From 0582c90a9ed4b965629267713f51c0da7c38b39d Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Wed, 4 Sep 2024 11:53:23 +0900 Subject: Rename remaining ntq[m-r]* related files to equivalent tq* (except ntqmodules.h) Signed-off-by: Michele Calgaro --- ChangeLog.immodule | 6 +- doc/application-walkthrough.doc | 2 +- doc/classchart.doc | 16 +- doc/dnd.doc | 2 +- doc/features.doc | 2 +- doc/html/aclock-example.html | 12 +- doc/html/annotated.html | 24 +- doc/html/appearance.html | 2 +- doc/html/archivesearch-example.html | 6 +- doc/html/biff-example.html | 4 +- doc/html/canvas-chart-example.html | 12 +- doc/html/canvas-example.html | 8 +- doc/html/chart-canvasview-cpp.html | 16 +- doc/html/chart-canvasview-h.html | 6 +- doc/html/chart-chartform-cpp.html | 10 +- doc/html/chart-element-h.html | 2 +- doc/html/classchart.html | 16 +- doc/html/classes.html | 24 +- doc/html/dclock-example.html | 6 +- doc/html/designer-manual-3.html | 8 +- doc/html/designer-manual-4.html | 2 +- doc/html/designer-manual-9.html | 2 +- doc/html/dialogs.html | 2 +- doc/html/dirview-example.html | 18 +- doc/html/distributor-example.html | 4 +- doc/html/dnd.html | 2 +- doc/html/drawdemo-example.html | 4 +- doc/html/drawlines-example.html | 16 +- doc/html/events.html | 6 +- doc/html/eventsandfilters.html | 12 +- doc/html/fileiconview-example.html | 12 +- doc/html/ftpclient-example.html | 8 +- doc/html/functions.html | 258 +-- doc/html/grapher-nsplugin-example.html | 44 +- doc/html/headerfilesynonyms | 18 +- doc/html/headers.html | 12 +- doc/html/hello-example.html | 6 +- doc/html/helpviewer-example.html | 6 +- doc/html/hierarchy.html | 24 +- doc/html/i18n-example.html | 4 +- doc/html/iconview-simple_dd-main-cpp.html | 4 +- doc/html/iconview-simple_dd-main-h.html | 4 +- doc/html/index | 338 ++-- doc/html/life-example.html | 22 +- doc/html/listbox-example.html | 4 +- doc/html/mail-example.html | 4 +- doc/html/mainclasses.html | 2 +- doc/html/mdi-example.html | 8 +- doc/html/menu-example.html | 10 +- doc/html/metaobjects.html | 2 +- doc/html/misc.html | 2 +- doc/html/motif-walkthrough-2.html | 2 +- doc/html/motif-walkthrough-3.html | 10 +- doc/html/motif-walkthrough-8.html | 2 +- doc/html/movies-example.html | 4 +- doc/html/netscape-plugin.html | 10 +- doc/html/ntqapplication.html | 6 +- doc/html/ntqmessagebox.html | 751 ------- doc/html/ntqmetaobject.html | 187 -- doc/html/ntqrangecontrol.html | 336 ---- doc/html/ntqt.html | 4 +- doc/html/objectmodel.html | 4 +- doc/html/outliner-example.html | 6 +- doc/html/picture-example.html | 4 +- doc/html/pictures.html | 6 +- doc/html/popup-example.html | 16 +- doc/html/porting.html | 12 +- doc/html/process-example.html | 4 +- doc/html/properties.html | 10 +- doc/html/propertydocs | 104 +- doc/html/propertyindex | 8 +- doc/html/qmacstyle-members.html | 115 -- doc/html/qmacstyle.html | 160 -- doc/html/qmacstyle_mac-h.html | 194 -- doc/html/qmag-example.html | 30 +- doc/html/qmessagebox-crit.png | Bin 262 -> 0 bytes doc/html/qmessagebox-h.html | 268 --- doc/html/qmessagebox-info.png | Bin 270 -> 0 bytes doc/html/qmessagebox-members.html | 368 ---- doc/html/qmessagebox-quest.png | Bin 277 -> 0 bytes doc/html/qmessagebox-warn.png | Bin 246 -> 0 bytes doc/html/qmetaobject-h.html | 331 ---- doc/html/qmetaobject-members.html | 60 - doc/html/qmetaproperty-members.html | 60 - doc/html/qmetaproperty.html | 173 -- doc/html/qmouseevent-members.html | 61 - doc/html/qmouseevent.html | 233 --- doc/html/qmoveevent-members.html | 51 - doc/html/qmoveevent.html | 82 - doc/html/qnamespace-h.html | 968 --------- 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 | 340 ---- doc/html/qnpwidget.html | 127 -- doc/html/qprintdlg-m.png | Bin 5058 -> 0 bytes doc/html/qrangecontrol-h.html | 239 --- doc/html/qrangecontrol-members.html | 70 - doc/html/qresizeevent-members.html | 51 - doc/html/qresizeevent.html | 82 - doc/html/qt-members.html | 2 +- doc/html/qt.dcf | 402 ++-- doc/html/qwerty-example.html | 14 +- doc/html/qwheelevent.html | 2 +- doc/html/qwindowdefs-h.html | 2 +- doc/html/scribble-example.html | 20 +- doc/html/scrollview-example.html | 2 +- doc/html/showimg-example.html | 34 +- doc/html/signalsandslots.html | 2 +- doc/html/simple-application-example.html | 8 +- doc/html/simple-application.html | 6 +- doc/html/simple_dd-example.html | 8 +- doc/html/sound-example.html | 4 +- doc/html/sqltable-example.html | 2 +- doc/html/t10-lcdrange-cpp.html | 4 +- doc/html/t11-lcdrange-cpp.html | 4 +- doc/html/t12-lcdrange-cpp.html | 4 +- doc/html/t13-lcdrange-cpp.html | 4 +- doc/html/t14-cannon-cpp.html | 14 +- doc/html/t14-cannon-h.html | 6 +- doc/html/t14-lcdrange-cpp.html | 4 +- doc/html/t7-lcdrange-cpp.html | 2 +- doc/html/t8-lcdrange-cpp.html | 4 +- doc/html/t9-lcdrange-cpp.html | 4 +- doc/html/themes-example.html | 10 +- doc/html/titleindex | 60 +- doc/html/tooltip-example.html | 12 +- doc/html/tqaccel.html | 2 +- doc/html/tqaction-application-example.html | 8 +- doc/html/tqcanvas.html | 2 +- doc/html/tqcanvasview.html | 4 +- doc/html/tqdatetime-h.html | 2 +- doc/html/tqdial-h.html | 2 +- doc/html/tqdial-members.html | 16 +- doc/html/tqdial.html | 22 +- doc/html/tqdialog.html | 2 +- doc/html/tqdrawutil-h.html | 2 +- doc/html/tqerrormessage.html | 2 +- doc/html/tqevent-h.html | 2 +- doc/html/tqevent.html | 14 +- doc/html/tqeventloop.html | 2 +- doc/html/tqfile.html | 2 +- doc/html/tqfontmetrics.html | 4 +- doc/html/tqframe.html | 2 +- doc/html/tqglwidget.html | 2 +- doc/html/tqiconview.html | 12 +- doc/html/tqkeysequence-h.html | 2 +- doc/html/tqkeysequence.html | 6 +- doc/html/tqlistbox.html | 8 +- doc/html/tqlistview.html | 10 +- doc/html/tqmacstyle-members.html | 115 ++ doc/html/tqmacstyle.html | 160 ++ doc/html/tqmacstyle_mac-h.html | 194 ++ doc/html/tqmenubar.html | 6 +- doc/html/tqmenudata.html | 10 +- doc/html/tqmessagebox-crit.png | Bin 0 -> 262 bytes doc/html/tqmessagebox-h.html | 268 +++ doc/html/tqmessagebox-info.png | Bin 0 -> 270 bytes doc/html/tqmessagebox-members.html | 368 ++++ doc/html/tqmessagebox-quest.png | Bin 0 -> 277 bytes doc/html/tqmessagebox-warn.png | Bin 0 -> 246 bytes doc/html/tqmessagebox.html | 751 +++++++ doc/html/tqmetaobject-h.html | 331 ++++ doc/html/tqmetaobject-members.html | 60 + doc/html/tqmetaobject.html | 187 ++ doc/html/tqmetaproperty-members.html | 60 + doc/html/tqmetaproperty.html | 173 ++ doc/html/tqmimesourcefactory.html | 4 +- doc/html/tqmouseevent-members.html | 61 + doc/html/tqmouseevent.html | 233 +++ doc/html/tqmoveevent-members.html | 51 + doc/html/tqmoveevent.html | 82 + doc/html/tqnamespace-h.html | 968 +++++++++ doc/html/tqnp-h.html | 231 +++ doc/html/tqnpinstance-members.html | 112 ++ doc/html/tqnpinstance.html | 320 +++ doc/html/tqnplugin-members.html | 58 + doc/html/tqnplugin.html | 180 ++ doc/html/tqnpstream-members.html | 58 + doc/html/tqnpstream.html | 129 ++ doc/html/tqnpwidget-members.html | 340 ++++ doc/html/tqnpwidget.html | 126 ++ doc/html/tqobject-h.html | 2 +- doc/html/tqobject.html | 10 +- doc/html/tqpixmap-h.html | 2 +- doc/html/tqpoint.html | 4 +- doc/html/tqpopupmenu.html | 10 +- doc/html/tqprintdlg-m.png | Bin 0 -> 5058 bytes doc/html/tqrangecontrol-h.html | 239 +++ doc/html/tqrangecontrol-members.html | 70 + doc/html/tqrangecontrol.html | 336 ++++ doc/html/tqresizeevent-members.html | 51 + doc/html/tqresizeevent.html | 82 + doc/html/tqscrollbar-h.html | 2 +- doc/html/tqscrollbar-members.html | 28 +- doc/html/tqscrollbar.html | 34 +- doc/html/tqscrollview.html | 10 +- doc/html/tqsessionmanager.html | 2 +- doc/html/tqsimplerichtext-h.html | 2 +- doc/html/tqsize-h.html | 2 +- doc/html/tqsizegrip.html | 4 +- doc/html/tqslider-h.html | 2 +- doc/html/tqslider-members.html | 24 +- doc/html/tqslider.html | 34 +- doc/html/tqspinbox-h.html | 2 +- doc/html/tqspinbox-members.html | 26 +- doc/html/tqspinbox.html | 34 +- doc/html/tqsqlerror.html | 2 +- doc/html/tqstylesheet.html | 4 +- doc/html/tqwidget.html | 38 +- doc/html/tqwindowsstyle.html | 2 +- doc/html/trivial-nsplugin-example.html | 16 +- doc/html/tutorial1-05.html | 6 +- doc/html/tutorial1-06.html | 4 +- doc/html/tutorial1-08.html | 2 +- doc/html/tutorial1-12.html | 2 +- doc/html/tutorial1-14.html | 20 +- doc/html/tutorial2-03.html | 6 +- doc/html/tutorial2-05.html | 6 +- doc/html/tutorial2-06.html | 22 +- doc/html/whatsthis | 24 +- doc/html/xform-example.html | 10 +- doc/man/man3/tqaccel.3qt | 2 +- doc/man/man3/tqapplication.3qt | 6 +- doc/man/man3/tqcanvas.3qt | 2 +- doc/man/man3/tqcanvasview.3qt | 2 +- doc/man/man3/tqdial.3qt | 12 +- doc/man/man3/tqdialog.3qt | 2 +- doc/man/man3/tqerrormessage.3qt | 2 +- doc/man/man3/tqevent.3qt | 14 +- doc/man/man3/tqeventloop.3qt | 2 +- doc/man/man3/tqfile.3qt | 2 +- doc/man/man3/tqfontmetrics.3qt | 4 +- doc/man/man3/tqframe.3qt | 4 +- doc/man/man3/tqglwidget.3qt | 4 +- doc/man/man3/tqiconview.3qt | 12 +- doc/man/man3/tqkeysequence.3qt | 6 +- doc/man/man3/tqlistbox.3qt | 8 +- doc/man/man3/tqlistview.3qt | 20 +- doc/man/man3/tqmacstyle.3qt | 60 +- doc/man/man3/tqmenubar.3qt | 6 +- doc/man/man3/tqmenudata.3qt | 10 +- doc/man/man3/tqmessagebox.3qt | 308 +-- doc/man/man3/tqmetaobject.3qt | 46 +- doc/man/man3/tqmetaproperty.3qt | 40 +- doc/man/man3/tqmimesourcefactory.3qt | 4 +- doc/man/man3/tqmouseevent.3qt | 42 +- doc/man/man3/tqmoveevent.3qt | 16 +- doc/man/man3/tqnpinstance.3qt | 120 +- doc/man/man3/tqnplugin.3qt | 62 +- doc/man/man3/tqnpstream.3qt | 50 +- doc/man/man3/tqnpwidget.3qt | 34 +- doc/man/man3/tqobject.3qt | 16 +- doc/man/man3/tqpoint.3qt | 2 +- doc/man/man3/tqpopupmenu.3qt | 10 +- doc/man/man3/tqprinter.3qt | 2 +- doc/man/man3/tqrangecontrol.3qt | 84 +- doc/man/man3/tqresizeevent.3qt | 16 +- doc/man/man3/tqscrollbar.3qt | 14 +- doc/man/man3/tqscrollview.3qt | 20 +- doc/man/man3/tqsessionmanager.3qt | 2 +- doc/man/man3/tqsizegrip.3qt | 8 +- doc/man/man3/tqslider.3qt | 22 +- doc/man/man3/tqspinbox.3qt | 18 +- doc/man/man3/tqsqlerror.3qt | 2 +- doc/man/man3/tqstylesheet.3qt | 4 +- doc/man/man3/tqt.3qt | 4 +- doc/man/man3/tqwheelevent.3qt | 2 +- doc/man/man3/tqwidget.3qt | 50 +- doc/man/man3/tqwindowsstyle.3qt | 2 +- doc/metaobjects.doc | 2 +- doc/object.doc | 24 +- doc/pictures.doc | 10 +- doc/porting3.doc | 12 +- doc/signalsandslots.doc | 4 +- doc/tutorial2.doc | 6 +- examples/action/application.cpp | 2 +- examples/application/application.cpp | 2 +- examples/canvas/canvas.cpp | 2 +- examples/canvas/main.cpp | 2 +- examples/chart/chartform.cpp | 2 +- examples/chart/element.h | 2 +- examples/demo/i18n/en.po | 28 +- examples/demo/i18n/ja.po | 20 +- examples/demo/i18n/ko.po | 82 +- examples/demo/i18n/no.po | 92 +- examples/demo/qasteroids/view.cpp | 2 +- examples/demo/qthumbwheel.h | 2 +- examples/demo/sql/sqlex.ui.h | 2 +- examples/demo/textdrawing/example.html | 2 +- examples/demo/textdrawing/helpwindow.cpp | 2 +- examples/dirview/dirview.cpp | 2 +- examples/distributor/distributor.ui.h | 2 +- examples/fileiconview/tqfileiconview.cpp | 2 +- examples/helpdemo/helpdemo.cpp | 2 +- examples/helpviewer/helpwindow.cpp | 2 +- examples/i18n/main.cpp | 2 +- examples/mdi/application.cpp | 2 +- examples/menu/menu.cpp | 2 +- examples/movies/main.cpp | 2 +- examples/network/archivesearch/archivedialog.ui | 2 +- examples/network/ftpclient/ftpmainwindow.ui.h | 2 +- .../network/infoprotocol/infoserver/server.cpp | 2 +- examples/network/mail/smtp.cpp | 2 +- examples/opengl/overlay/globjwin.cpp | 2 +- examples/opengl/overlay/main.cpp | 2 +- examples/picture/picture.cpp | 2 +- examples/process/process.cpp | 2 +- examples/qwerty/qwerty.cpp | 2 +- examples/scrollview/scrollview.cpp | 2 +- examples/showimg/showimg.cpp | 2 +- examples/sound/sound.cpp | 2 +- examples/sql/sqltable/main.cpp | 2 +- examples/themes/metal.cpp | 2 +- examples/themes/themes.cpp | 2 +- examples/themes/wood.cpp | 2 +- examples/thread/semaphores/main.cpp | 2 +- examples/widgets/widgets.cpp | 4 +- examples/xml/outliner/outlinetree.cpp | 2 +- extensions/nsplugin/doc/index.doc | 10 +- extensions/nsplugin/examples/grapher/grapher.cpp | 4 +- extensions/nsplugin/examples/grapher/grapher.doc | 4 +- extensions/nsplugin/examples/trivial/trivial.cpp | 4 +- extensions/nsplugin/src/ntqnp.h | 186 -- extensions/nsplugin/src/qnp.cpp | 2071 -------------------- extensions/nsplugin/src/qnp.pro | 14 - extensions/nsplugin/src/tqnp.cpp | 2071 ++++++++++++++++++++ extensions/nsplugin/src/tqnp.h | 186 ++ extensions/nsplugin/src/tqnp.pro | 14 + include/ntqmessagebox.h | 1 - include/ntqmetaobject.h | 1 - include/ntqmngio.h | 1 - include/ntqnamespace.h | 1 - include/ntqnp.h | 1 - include/ntqpolygonscanner.h | 1 - include/ntqprintdialog.h | 1 - include/ntqrangecontrol.h | 1 - include/tqmessagebox.h | 1 + include/tqmetaobject.h | 1 + include/tqmngio.h | 1 + include/tqnamespace.h | 1 + include/tqnp.h | 1 + include/tqpolygonscanner.h | 1 + include/tqprintdialog.h | 1 + include/tqrangecontrol.h | 1 + .../src/accessible/widgets/tqaccessiblewidget.cpp | 2 +- plugins/src/imageformats/mng/main.cpp | 2 +- plugins/src/imageformats/mng/mng.pro | 2 +- .../inputmethods/imsw-multi/qmultiinputcontext.h | 2 +- plugins/src/inputmethods/simple/composetable.cpp | 2 +- .../inputmethods/simple/qsimpleinputcontext.cpp | 2 +- .../src/inputmethods/simple/qsimpleinputcontext.h | 2 +- qmake/main.cpp | 2 +- src/canvas/tqcanvas.cpp | 2 +- src/codecs/tqtextcodec.cpp | 2 +- src/dialogs/ntqmessagebox.h | 223 --- src/dialogs/ntqprintdialog.h | 103 - src/dialogs/qmessagebox.cpp | 1664 ---------------- src/dialogs/qprintdialog.cpp | 1677 ---------------- src/dialogs/qt_dialogs.pri | 8 +- src/dialogs/tqdialog.cpp | 4 +- src/dialogs/tqerrormessage.cpp | 2 +- src/dialogs/tqfiledialog.cpp | 2 +- src/dialogs/tqmessagebox.cpp | 1664 ++++++++++++++++ src/dialogs/tqmessagebox.h | 223 +++ src/dialogs/tqprintdialog.cpp | 1677 ++++++++++++++++ src/dialogs/tqprintdialog.h | 103 + src/kernel/ntqmetaobject.h | 286 --- src/kernel/ntqmngio.h | 53 - src/kernel/ntqnamespace.h | 1035 ---------- src/kernel/ntqpolygonscanner.h | 61 - src/kernel/ntqt.h | 14 +- src/kernel/ntqwindowdefs.h | 2 +- src/kernel/qapplication.cpp | 4 +- src/kernel/qinternal_p.h | 2 +- src/kernel/qmetaobject.cpp | 1251 ------------ src/kernel/qmngio.cpp | 460 ----- src/kernel/qpolygonscanner.cpp | 937 --------- src/kernel/qt_gfx.pri | 4 +- src/kernel/qt_kernel.pri | 10 +- src/kernel/qt_pch.h | 2 +- src/kernel/tqaccel.cpp | 2 +- src/kernel/tqaccessible.cpp | 2 +- src/kernel/tqcolor.cpp | 2 +- src/kernel/tqcursor_x11.cpp | 2 +- src/kernel/tqdrawutil.h | 2 +- src/kernel/tqevent.h | 2 +- src/kernel/tqfont.cpp | 4 +- src/kernel/tqimage.cpp | 2 +- src/kernel/tqkeycode.h | 2 +- src/kernel/tqkeysequence.cpp | 6 +- src/kernel/tqkeysequence.h | 2 +- src/kernel/tqmetaobject.cpp | 1251 ++++++++++++ src/kernel/tqmetaobject.h | 286 +++ src/kernel/tqmngio.cpp | 460 +++++ src/kernel/tqmngio.h | 53 + src/kernel/tqnamespace.h | 1035 ++++++++++ src/kernel/tqobject.cpp | 4 +- src/kernel/tqobject.h | 2 +- src/kernel/tqobjectdict.h | 2 +- src/kernel/tqpixmap.h | 2 +- src/kernel/tqpolygonscanner.cpp | 937 +++++++++ src/kernel/tqpolygonscanner.h | 61 + src/kernel/tqprinter_unix.cpp | 2 +- src/kernel/tqsignal.cpp | 2 +- src/kernel/tqsimplerichtext.h | 2 +- src/kernel/tqsize.h | 2 +- src/kernel/tqtextengine_p.h | 2 +- src/kernel/tqtextlayout_p.h | 2 +- src/kernel/tqttdeintegration_x11.cpp | 2 +- src/kernel/tqwidget.cpp | 2 +- src/kernel/tqwidget_x11.cpp | 2 +- src/moc/moc.y | 6 +- src/moc/moc_yacc.cpp | 6 +- src/sql/tqsqlerror.cpp | 2 +- src/sql/tqsqlmanager_p.cpp | 2 +- src/sql/tqsqlpropertymap.cpp | 2 +- src/sql/tqsqlrecord.cpp | 2 +- src/styles/qt_styles.pri | 6 +- src/styles/tqcommonstyle.cpp | 4 +- src/styles/tqinterlacestyle.cpp | 2 +- src/styles/tqstylefactory.cpp | 2 +- src/styles/tqwindowsstyle.cpp | 2 +- src/tools/tqdatetime.h | 2 +- src/tools/tqfeatures.txt | 4 +- src/tools/tqlocale.cpp | 2 +- src/widgets/ntqrangecontrol.h | 194 -- src/widgets/qeffects_p.h | 2 +- src/widgets/qrangecontrol.cpp | 565 ------ src/widgets/qt_widgets.pri | 4 +- src/widgets/tqdatetimeedit.cpp | 2 +- src/widgets/tqdial.h | 2 +- src/widgets/tqmenudata.cpp | 10 +- src/widgets/tqrangecontrol.cpp | 565 ++++++ src/widgets/tqrangecontrol.h | 194 ++ src/widgets/tqscrollbar.h | 2 +- src/widgets/tqslider.h | 2 +- src/widgets/tqspinbox.h | 2 +- src/widgets/tqspinwidget.cpp | 2 +- src/widgets/tqtabbar.cpp | 2 +- src/widgets/tqtabwidget.cpp | 2 +- src/widgets/tqtextedit.cpp | 2 +- tools/assistant/helpdialogimpl.cpp | 2 +- tools/assistant/helpwindow.cpp | 2 +- tools/assistant/main.cpp | 2 +- tools/assistant/mainwindow.ui | 2 +- tools/assistant/mainwindow.ui.h | 2 +- tools/assistant/settingsdialogimpl.cpp | 2 +- tools/designer/designer/actiondnd.cpp | 2 +- tools/designer/designer/command.cpp | 4 +- tools/designer/designer/connectionitems.cpp | 2 +- tools/designer/designer/customwidgeteditorimpl.cpp | 4 +- tools/designer/designer/dbconnectionsimpl.cpp | 2 +- tools/designer/designer/designer_pch.h | 4 +- tools/designer/designer/designerappiface.cpp | 2 +- tools/designer/designer/editfunctionsimpl.cpp | 2 +- tools/designer/designer/formfile.cpp | 2 +- tools/designer/designer/formwindow.cpp | 4 +- tools/designer/designer/hierarchyview.cpp | 2 +- tools/designer/designer/mainwindow.cpp | 4 +- tools/designer/designer/mainwindowactions.cpp | 2 +- tools/designer/designer/metadatabase.cpp | 2 +- tools/designer/designer/multilineeditorimpl.cpp | 2 +- tools/designer/designer/newformimpl.cpp | 2 +- tools/designer/designer/project.cpp | 2 +- tools/designer/designer/propertyeditor.cpp | 2 +- tools/designer/designer/propertyobject.cpp | 2 +- tools/designer/designer/resource.cpp | 4 +- tools/designer/designer/sourceeditor.cpp | 2 +- tools/designer/designer/sourcefile.cpp | 2 +- tools/designer/designer/variabledialogimpl.cpp | 2 +- tools/designer/designer/widgetfactory.cpp | 2 +- tools/designer/examples/colortool/mainform.ui | 2 +- tools/designer/examples/richedit/richedit.ui | 2 +- tools/designer/plugins/cppeditor/cppcompletion.cpp | 2 +- .../plugins/cppeditor/languageinterfaceimpl.cpp | 2 +- tools/designer/plugins/dlg/dlg2ui.cpp | 2 +- tools/designer/plugins/glade/glade2ui.cpp | 2 +- tools/designer/shared/domtool.h | 2 +- tools/designer/shared/widgetdatabase.cpp | 4 +- tools/designer/tools/tqtcreatecw/main.cpp | 2 +- tools/designer/uilib/tqwidgetfactory.cpp | 2 +- tools/linguist/linguist/phrase.cpp | 2 +- tools/linguist/linguist/phrasebookbox.cpp | 2 +- tools/linguist/linguist/trwindow.cpp | 2 +- tools/linguist/shared/metatranslator.cpp | 2 +- tools/linguist/tutorial/tt3/mainwindow.cpp | 2 +- tools/qconfig/main.cpp | 2 +- tools/qtconfig/mainwindow.cpp | 2 +- translations/qt_ar.ts | 4 +- translations/qt_ca.ts | 4 +- translations/qt_cs.ts | 4 +- translations/qt_de.ts | 4 +- translations/qt_es.ts | 4 +- translations/qt_fr.ts | 4 +- translations/qt_he.ts | 4 +- translations/qt_it.ts | 4 +- translations/qt_ja.ts | 4 +- translations/qt_nb.ts | 4 +- translations/qt_pt-br.ts | 4 +- translations/qt_pt.ts | 4 +- translations/qt_ru.ts | 4 +- translations/qt_sk.ts | 4 +- translations/qt_tr.ts | 4 +- translations/qt_zh-cn.ts | 4 +- translations/qt_zh-tw.ts | 4 +- translations/template.ts | 4 +- 511 files changed, 19394 insertions(+), 19398 deletions(-) delete mode 100644 doc/html/ntqmessagebox.html delete mode 100644 doc/html/ntqmetaobject.html delete mode 100644 doc/html/ntqrangecontrol.html delete mode 100644 doc/html/qmacstyle-members.html delete mode 100644 doc/html/qmacstyle.html delete mode 100644 doc/html/qmacstyle_mac-h.html delete mode 100644 doc/html/qmessagebox-crit.png delete mode 100644 doc/html/qmessagebox-h.html delete mode 100644 doc/html/qmessagebox-info.png delete mode 100644 doc/html/qmessagebox-members.html delete mode 100644 doc/html/qmessagebox-quest.png delete mode 100644 doc/html/qmessagebox-warn.png delete mode 100644 doc/html/qmetaobject-h.html delete mode 100644 doc/html/qmetaobject-members.html delete mode 100644 doc/html/qmetaproperty-members.html delete mode 100644 doc/html/qmetaproperty.html delete mode 100644 doc/html/qmouseevent-members.html delete mode 100644 doc/html/qmouseevent.html delete mode 100644 doc/html/qmoveevent-members.html delete mode 100644 doc/html/qmoveevent.html delete mode 100644 doc/html/qnamespace-h.html delete mode 100644 doc/html/qnp-h.html delete mode 100644 doc/html/qnpinstance-members.html delete mode 100644 doc/html/qnpinstance.html delete mode 100644 doc/html/qnplugin-members.html delete mode 100644 doc/html/qnplugin.html delete mode 100644 doc/html/qnpstream-members.html delete mode 100644 doc/html/qnpstream.html delete mode 100644 doc/html/qnpwidget-members.html delete mode 100644 doc/html/qnpwidget.html delete mode 100644 doc/html/qprintdlg-m.png delete mode 100644 doc/html/qrangecontrol-h.html delete mode 100644 doc/html/qrangecontrol-members.html delete mode 100644 doc/html/qresizeevent-members.html delete mode 100644 doc/html/qresizeevent.html create mode 100644 doc/html/tqmacstyle-members.html create mode 100644 doc/html/tqmacstyle.html create mode 100644 doc/html/tqmacstyle_mac-h.html create mode 100644 doc/html/tqmessagebox-crit.png create mode 100644 doc/html/tqmessagebox-h.html create mode 100644 doc/html/tqmessagebox-info.png create mode 100644 doc/html/tqmessagebox-members.html create mode 100644 doc/html/tqmessagebox-quest.png create mode 100644 doc/html/tqmessagebox-warn.png create mode 100644 doc/html/tqmessagebox.html create mode 100644 doc/html/tqmetaobject-h.html create mode 100644 doc/html/tqmetaobject-members.html create mode 100644 doc/html/tqmetaobject.html create mode 100644 doc/html/tqmetaproperty-members.html create mode 100644 doc/html/tqmetaproperty.html create mode 100644 doc/html/tqmouseevent-members.html create mode 100644 doc/html/tqmouseevent.html create mode 100644 doc/html/tqmoveevent-members.html create mode 100644 doc/html/tqmoveevent.html create mode 100644 doc/html/tqnamespace-h.html create mode 100644 doc/html/tqnp-h.html create mode 100644 doc/html/tqnpinstance-members.html create mode 100644 doc/html/tqnpinstance.html create mode 100644 doc/html/tqnplugin-members.html create mode 100644 doc/html/tqnplugin.html create mode 100644 doc/html/tqnpstream-members.html create mode 100644 doc/html/tqnpstream.html create mode 100644 doc/html/tqnpwidget-members.html create mode 100644 doc/html/tqnpwidget.html create mode 100644 doc/html/tqprintdlg-m.png create mode 100644 doc/html/tqrangecontrol-h.html create mode 100644 doc/html/tqrangecontrol-members.html create mode 100644 doc/html/tqrangecontrol.html create mode 100644 doc/html/tqresizeevent-members.html create mode 100644 doc/html/tqresizeevent.html delete mode 100644 extensions/nsplugin/src/ntqnp.h delete mode 100644 extensions/nsplugin/src/qnp.cpp delete mode 100644 extensions/nsplugin/src/qnp.pro create mode 100644 extensions/nsplugin/src/tqnp.cpp create mode 100644 extensions/nsplugin/src/tqnp.h create mode 100644 extensions/nsplugin/src/tqnp.pro delete mode 120000 include/ntqmessagebox.h delete mode 120000 include/ntqmetaobject.h delete mode 120000 include/ntqmngio.h delete mode 120000 include/ntqnamespace.h delete mode 120000 include/ntqnp.h delete mode 120000 include/ntqpolygonscanner.h delete mode 120000 include/ntqprintdialog.h delete mode 120000 include/ntqrangecontrol.h create mode 120000 include/tqmessagebox.h create mode 120000 include/tqmetaobject.h create mode 120000 include/tqmngio.h create mode 120000 include/tqnamespace.h create mode 120000 include/tqnp.h create mode 120000 include/tqpolygonscanner.h create mode 120000 include/tqprintdialog.h create mode 120000 include/tqrangecontrol.h delete mode 100644 src/dialogs/ntqmessagebox.h delete mode 100644 src/dialogs/ntqprintdialog.h delete mode 100644 src/dialogs/qmessagebox.cpp delete mode 100644 src/dialogs/qprintdialog.cpp create mode 100644 src/dialogs/tqmessagebox.cpp create mode 100644 src/dialogs/tqmessagebox.h create mode 100644 src/dialogs/tqprintdialog.cpp create mode 100644 src/dialogs/tqprintdialog.h delete mode 100644 src/kernel/ntqmetaobject.h delete mode 100644 src/kernel/ntqmngio.h delete mode 100644 src/kernel/ntqnamespace.h delete mode 100644 src/kernel/ntqpolygonscanner.h delete mode 100644 src/kernel/qmetaobject.cpp delete mode 100644 src/kernel/qmngio.cpp delete mode 100644 src/kernel/qpolygonscanner.cpp create mode 100644 src/kernel/tqmetaobject.cpp create mode 100644 src/kernel/tqmetaobject.h create mode 100644 src/kernel/tqmngio.cpp create mode 100644 src/kernel/tqmngio.h create mode 100644 src/kernel/tqnamespace.h create mode 100644 src/kernel/tqpolygonscanner.cpp create mode 100644 src/kernel/tqpolygonscanner.h delete mode 100644 src/widgets/ntqrangecontrol.h delete mode 100644 src/widgets/qrangecontrol.cpp create mode 100644 src/widgets/tqrangecontrol.cpp create mode 100644 src/widgets/tqrangecontrol.h diff --git a/ChangeLog.immodule b/ChangeLog.immodule index 098cc0016..0d62b0222 100644 --- a/ChangeLog.immodule +++ b/ChangeLog.immodule @@ -253,7 +253,7 @@ 2004-08-17 YamaKen - * src/kernel/ntqnamespace.h + * src/kernel/qnamespace.h - (Qt::Key) Add a comment about Korean-specific keyboard support based on the information from Choe Hwanjin. Thanks for the information. See following discussion for further @@ -902,7 +902,7 @@ "deleteLater" is safer then "delete" QObject directly 2004-07-30 YamaKen - * src/kernel/ntqnamespace.h + * src/kernel/qnamespace.h - (Qt::Key): * Replace dead key values with new one to avoid keycode conflict * Add a comment about the latin 1 keycodes @@ -1181,7 +1181,7 @@ 2004-07-22 Kazuki Ohta - * kernel/qapplication_x11.cpp, kernel/ntqnamespace.h + * kernel/qapplication_x11.cpp, kernel/qnamespace.h - add dead key entries 2004-07-22 YamaKen diff --git a/doc/application-walkthrough.doc b/doc/application-walkthrough.doc index 0e187654e..08669fd98 100644 --- a/doc/application-walkthrough.doc +++ b/doc/application-walkthrough.doc @@ -395,7 +395,7 @@ will be closed, and because we used the \e WDestructiveClose widget flag in the \link #ApplicationWindow ApplicationWindow() constructor\endlink, the widget will be deleted. -\printline QMessageBox +\printline TQMessageBox \printuntil { Otherwise we ask the user: What do you want to do? diff --git a/doc/classchart.doc b/doc/classchart.doc index 59aab5504..b000e6294 100644 --- a/doc/classchart.doc +++ b/doc/classchart.doc @@ -64,7 +64,7 @@ - + @@ -82,14 +82,14 @@ - + - - + + @@ -185,7 +185,7 @@ - + @@ -275,8 +275,8 @@ - - + + @@ -289,7 +289,7 @@ - + diff --git a/doc/dnd.doc b/doc/dnd.doc index 0b7dae8b1..bb5b93fa8 100644 --- a/doc/dnd.doc +++ b/doc/dnd.doc @@ -170,7 +170,7 @@ void MyWidget::load() TQFile in(current_file_name); if ( in.open(IO_ReadOnly) ) { if ( !MyCadDrag::decode(in.readAll(), current_design) ) { - QMessageBox::warning( this, "Format error", + TQMessageBox::warning( this, "Format error", tr("The file \"%1\" is not in any supported format") .arg(current_file_name) ); diff --git a/doc/features.doc b/doc/features.doc index b6b54730b..57bf6788b 100644 --- a/doc/features.doc +++ b/doc/features.doc @@ -219,7 +219,7 @@ The available options are: \i Text input dialog (\l TQInputDialog) \i TQT_NO_DIALOGS \row \i TQT_NO_MESSAGEBOX - \i Message/prompting dialog (\l QMessageBox) + \i Message/prompting dialog (\l TQMessageBox) \i TQT_NO_DIALOGS \row \i TQT_NO_PROGRESSDIALOG \i Long-computation progress dialog (\l TQProgressDialog) diff --git a/doc/html/aclock-example.html b/doc/html/aclock-example.html index 0053b8a86..6470aa344 100644 --- a/doc/html/aclock-example.html +++ b/doc/html/aclock-example.html @@ -63,8 +63,8 @@ public: protected: void updateMask(); void paintEvent( TQPaintEvent *); - void mousePressEvent( TQMouseEvent *); - void mouseMoveEvent( TQMouseEvent *); + void mousePressEvent( TQMouseEvent *); + void mouseMoveEvent( TQMouseEvent *); void drawClock( TQPainter* ); private slots: @@ -113,16 +113,16 @@ private: internalTimer->start( 5000 ); // emit signal every 5 seconds } -void AnalogClock::mousePressEvent( TQMouseEvent *e ) +void AnalogClock::mousePressEvent( TQMouseEvent *e ) { if(isTopLevel()) - clickPos = e->pos() + TQPoint(geometry().topLeft() - frameGeometry().topLeft()); + clickPos = e->pos() + TQPoint(geometry().topLeft() - frameGeometry().topLeft()); } -void AnalogClock::mouseMoveEvent( TQMouseEvent *e ) +void AnalogClock::mouseMoveEvent( TQMouseEvent *e ) { if(isTopLevel()) - move( e->globalPos() - clickPos ); + move( e->globalPos() - clickPos ); } // diff --git a/doc/html/annotated.html b/doc/html/annotated.html index cf77a1224..99b8afb08 100644 --- a/doc/html/annotated.html +++ b/doc/html/annotated.html @@ -227,7 +227,7 @@ body { background: #ffffff; color: black; } 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 +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 @@ -235,9 +235,9 @@ body { background: #ffffff; color: black; } 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 +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 @@ -245,15 +245,15 @@ body { background: #ffffff; color: black; } TQMotifPlusStyleMore sophisticated Motif-ish look and feel TQMotifStyleMotif look and feel TQMotifWidgetThe TQWidget API for Xt/Motif widgets -TQMouseEventParameters that describe a mouse event -TQMoveEventEvent parameters for move events +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 +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 @@ -289,12 +289,12 @@ body { background: #ffffff; color: black; } TQPtrVectorTemplate collection class that provides a vector (array) TQPushButtonCommand button TQRadioButtonRadio button with a text or pixmap label -TQRangeControlInteger value within a range +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 +TQResizeEventEvent parameters for resize events TQSGIStyleSGI/Irix look and feel TQScrollBarVertical or horizontal scroll bar TQScrollViewScrolling area with on-demand scroll bars diff --git a/doc/html/appearance.html b/doc/html/appearance.html index a6eee40b8..78b0c0438 100644 --- a/doc/html/appearance.html +++ b/doc/html/appearance.html @@ -55,7 +55,7 @@ style. TQLayoutThe base class of geometry managers TQLayoutItemAbstract item that a TQLayout manipulates TQLayoutIteratorIterators over TQLayoutItem -TQMacStyleImplements an Appearance Manager style +TQMacStyleImplements an Appearance Manager style TQMotifPlusStyleMore sophisticated Motif-ish look and feel TQMotifStyleMotif look and feel TQPaletteColor groups for each widget state diff --git a/doc/html/archivesearch-example.html b/doc/html/archivesearch-example.html index dcafe5c98..fb9244d04 100644 --- a/doc/html/archivesearch-example.html +++ b/doc/html/archivesearch-example.html @@ -77,7 +77,7 @@ void ArchiveDialog::fetch( TQListViewItem *it void ArchiveDialog::fetchDone( bool error ) { if (error) { - TQMessageBox::critical(this, "Error fetching", + TQMessageBox::critical(this, "Error fetching", "An error occurred when fetching this document: " + articleFetcher.errorString(), TQMessageBox::Ok, TQMessageBox::NoButton); @@ -96,7 +96,7 @@ void ArchiveDialog::search() } if (myLineEdit->text() == "") { - TQMessageBox::critical(this, "Empty query", + TQMessageBox::critical(this, "Empty query", "Please type a search string.", TQMessageBox::Ok, TQMessageBox::NoButton); } else { @@ -120,7 +120,7 @@ void ArchiveDialog::search() void ArchiveDialog::searchDone( bool error ) { if (error) { - TQMessageBox::critical(this, "Error searching", + TQMessageBox::critical(this, "Error searching", "An error occurred when searching: " + articleSearcher.errorString(), TQMessageBox::Ok, TQMessageBox::NoButton); diff --git a/doc/html/biff-example.html b/doc/html/biff-example.html index 3249c804b..bfa199cd1 100644 --- a/doc/html/biff-example.html +++ b/doc/html/biff-example.html @@ -64,7 +64,7 @@ public: protected: void timerEvent( TQTimerEvent * ); void paintEvent( TQPaintEvent * ); - void mousePressEvent( TQMouseEvent * ); + void mousePressEvent( TQMouseEvent * ); private: TQDateTime lastModified; @@ -153,7 +153,7 @@ void Biff::paintEvent( void Biff::mousePressEvent( TQMouseEvent * ) +void Biff::mousePressEvent( TQMouseEvent * ) { TQFileInfo fi( mailbox ); lastModified = fi.lastModified(); diff --git a/doc/html/canvas-chart-example.html b/doc/html/canvas-chart-example.html index 94838a147..44dd30a49 100644 --- a/doc/html/canvas-chart-example.html +++ b/doc/html/canvas-chart-example.html @@ -68,7 +68,7 @@ SOURCES += element.cpp \ #define ELEMENT_H #include <tqcolor.h> -#include <ntqnamespace.h> +#include <tqnamespace.h> #include <tqstring.h> #include <tqvaluevector.h> @@ -257,7 +257,7 @@ private: #include <tqfont.h> #include <tqfontdialog.h> #include <tqmenubar.h> -#include <ntqmessagebox.h> +#include <tqmessagebox.h> #include <tqpixmap.h> #include <tqpopupmenu.h> #include <tqprinter.h> @@ -558,7 +558,7 @@ void ChartForm::fileSaveAs() if ( !filename.isEmpty() ) { int answer = 0; if ( TQFile::exists( filename ) ) - answer = TQMessageBox::warning( + answer = TQMessageBox::warning( this, "Chart -- Overwrite File", TQString( "Overwrite\n\'%1\'?" ). arg( filename ), @@ -629,7 +629,7 @@ bool ChartForm::okToClear() msg = TQString( "Chart '%1'\n" ).arg( m_filename ); msg += "has been changed."; - int x = TQMessageBox::information( this, "Chart -- Unsaved Changes", + int x = TQMessageBox::information( this, "Chart -- Unsaved Changes", msg, "&Save", "Cancel", "&Abandon", 0, 1 ); switch( x ) { @@ -763,7 +763,7 @@ void ChartForm::helpHelp() void ChartForm::helpAbout() { - TQMessageBox::about( this, "Chart -- About", + TQMessageBox::about( this, "Chart -- About", "<center><h1><font color=blue>Chart<font></h1></center>" "<p>Chart your data with <i>chart</i>.</p>" ); @@ -772,7 +772,7 @@ void ChartForm::helpAbout() void ChartForm::helpAboutTQt() { - TQMessageBox::aboutTQt( this, "Chart -- About TQt" ); + TQMessageBox::aboutTQt( this, "Chart -- About TQt" ); } diff --git a/doc/html/canvas-example.html b/doc/html/canvas-example.html index 1f91a482f..659f25d14 100644 --- a/doc/html/canvas-example.html +++ b/doc/html/canvas-example.html @@ -136,7 +136,7 @@ private:

#include <tqdatetime.h>
 #include <tqmainwindow.h>
 #include <tqstatusbar.h>
-#include <ntqmessagebox.h>
+#include <tqmessagebox.h>
 #include <tqmenubar.h>
 #include <ntqapplication.h>
 #include <tqpainter.h>
@@ -548,7 +548,7 @@ void Main::clear()
 
 void Main::help()
 {
-    static TQMessageBox* about = new TQMessageBox( "TQt Canvas Example",
+    static TQMessageBox* about = new TQMessageBox( "TQt Canvas Example",
             "<h3>The TQCanvas classes example</h3>"
             "<ul>"
                 "<li> Press ALT-S for some sprites."
@@ -563,7 +563,7 @@ void Main::help()
 
 void Main::aboutTQt()
 {
-    TQMessageBox::aboutTQt( this, "TQt Canvas Example" );
+    TQMessageBox::aboutTQt( this, "TQt Canvas Example" );
 }
 
 void Main::toggleDoubleBuffer()
@@ -877,7 +877,7 @@ void Main::addRectangle()
 


Main:

#include <tqstatusbar.h>
-#include <ntqmessagebox.h>
+#include <tqmessagebox.h>
 #include <tqmenubar.h>
 #include <ntqapplication.h>
 #include <tqimage.h>
diff --git a/doc/html/chart-canvasview-cpp.html b/doc/html/chart-canvasview-cpp.html
index 902c665c4..6e94de3e1 100644
--- a/doc/html/chart-canvasview-cpp.html
+++ b/doc/html/chart-canvasview-cpp.html
@@ -47,32 +47,32 @@ void CanvasView::contentsCo
 }
 
 
-void CanvasView::viewportResizeEvent( TQResizeEvent *e )
+void CanvasView::viewportResizeEvent( TQResizeEvent *e )
 {
-    canvas()->resize( e->size().width(), e->size().height() );
+    canvas()->resize( e->size().width(), e->size().height() );
     ((ChartForm*)parent())->drawElements();
 }
 
 
-void CanvasView::contentsMousePressEvent( TQMouseEvent *e )
+void CanvasView::contentsMousePressEvent( TQMouseEvent *e )
 {
-    TQCanvasItemList list = canvas()->collisions( e->pos() );
+    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();
+            m_pos = e->pos();
             return;
         }
     m_movingItem = 0;
 }
 
 
-void CanvasView::contentsMouseMoveEvent( TQMouseEvent *e )
+void CanvasView::contentsMouseMoveEvent( TQMouseEvent *e )
 {
     if ( m_movingItem ) {
-        TQPoint offset = e->pos() - m_pos;
+        TQPoint offset = e->pos() - m_pos;
         m_movingItem->moveBy( offset.x(), offset.y() );
-        m_pos = e->pos();
+        m_pos = e->pos();
         ChartForm *form = (ChartForm*)parent();
         form->setChanged( TRUE );
         int chartType = form->chartType();
diff --git a/doc/html/chart-canvasview-h.html b/doc/html/chart-canvasview-h.html
index 05a2e9a31..da85cc8b2 100644
--- a/doc/html/chart-canvasview-h.html
+++ b/doc/html/chart-canvasview-h.html
@@ -55,9 +55,9 @@ public:
           m_elements( elements ) {}
 
 protected:
-    void viewportResizeEvent( TQResizeEvent *e );
-    void contentsMousePressEvent( TQMouseEvent *e );
-    void contentsMouseMoveEvent( TQMouseEvent *e );
+    void viewportResizeEvent( TQResizeEvent *e );
+    void contentsMousePressEvent( TQMouseEvent *e );
+    void contentsMouseMoveEvent( TQMouseEvent *e );
     void contentsContextMenuEvent( TQContextMenuEvent *e );
 
 private:
diff --git a/doc/html/chart-chartform-cpp.html b/doc/html/chart-chartform-cpp.html
index 2622769b9..e96c9b926 100644
--- a/doc/html/chart-chartform-cpp.html
+++ b/doc/html/chart-chartform-cpp.html
@@ -45,7 +45,7 @@ body { background: #ffffff; color: black; }
 #include <tqfont.h>
 #include <tqfontdialog.h>
 #include <tqmenubar.h>
-#include <ntqmessagebox.h>
+#include <tqmessagebox.h>
 #include <tqpixmap.h>
 #include <tqpopupmenu.h>
 #include <tqprinter.h>
@@ -346,7 +346,7 @@ void ChartForm::fileSaveAs()
     if ( !filename.isEmpty() ) {
         int answer = 0;
         if ( TQFile::exists( filename ) )
-            answer = TQMessageBox::warning(
+            answer = TQMessageBox::warning(
                             this, "Chart -- Overwrite File",
                             TQString( "Overwrite\n\'%1\'?" ).
                                 arg( filename ),
@@ -417,7 +417,7 @@ bool ChartForm::okToClear()
             msg = TQString( "Chart '%1'\n" ).arg( m_filename );
         msg += "has been changed.";
 
-        int x = TQMessageBox::information( this, "Chart -- Unsaved Changes",
+        int x = TQMessageBox::information( this, "Chart -- Unsaved Changes",
                                           msg, "&Save", "Cancel", "&Abandon",
                                           0, 1 );
         switch( x ) {
@@ -551,7 +551,7 @@ void ChartForm::helpHelp()
 
 void ChartForm::helpAbout()
 {
-    TQMessageBox::about( this, "Chart -- About",
+    TQMessageBox::about( this, "Chart -- About",
                         "<center><h1><font color=blue>Chart<font></h1></center>"
                         "<p>Chart your data with <i>chart</i>.</p>"
                         );
@@ -560,7 +560,7 @@ void ChartForm::helpAbout()
 
 void ChartForm::helpAboutTQt()
 {
-    TQMessageBox::aboutTQt( this, "Chart -- About TQt" );
+    TQMessageBox::aboutTQt( this, "Chart -- About TQt" );
 }
 
 
diff --git a/doc/html/chart-element-h.html b/doc/html/chart-element-h.html index bb5bebe8e..4a35af9da 100644 --- a/doc/html/chart-element-h.html +++ b/doc/html/chart-element-h.html @@ -36,7 +36,7 @@ body { background: #ffffff; color: black; } #define ELEMENT_H #include <tqcolor.h> -#include <ntqnamespace.h> +#include <tqnamespace.h> #include <tqstring.h> #include <tqvaluevector.h> diff --git a/doc/html/classchart.html b/doc/html/classchart.html index baf66985b..150527e60 100644 --- a/doc/html/classchart.html +++ b/doc/html/classchart.html @@ -54,7 +54,7 @@ body { background: #ffffff; color: black; } - + @@ -72,14 +72,14 @@ body { background: #ffffff; color: black; } - + - - + + @@ -175,7 +175,7 @@ body { background: #ffffff; color: black; } - + @@ -265,8 +265,8 @@ body { background: #ffffff; color: black; } - - + + @@ -279,7 +279,7 @@ body { background: #ffffff; color: black; } - + diff --git a/doc/html/classes.html b/doc/html/classes.html index b6f5e09f8..486ef1054 100644 --- a/doc/html/classes.html +++ b/doc/html/classes.html @@ -264,7 +264,7 @@ classes, see TQt's Main Classes. -TQRangeControl +TQRangeControl TQTimeEdit @@ -319,7 +319,7 @@ classes, see TQt's Main Classes. TQLayoutItem -TQResizeEvent +TQResizeEvent TQToolButton @@ -482,7 +482,7 @@ classes, see TQt's Main Classes. TQFilePreview -TQMacStyle +TQMacStyle TQSizePolicy @@ -570,7 +570,7 @@ classes, see TQt's Main Classes. TQFontMetrics -TQMessageBox +TQMessageBox TQSpinBox @@ -581,7 +581,7 @@ classes, see TQt's Main Classes. TQFrame -TQMetaObject +TQMetaObject TQSplashScreen @@ -592,7 +592,7 @@ classes, see TQt's Main Classes. TQFtp -TQMetaProperty +TQMetaProperty TQSplitter @@ -702,7 +702,7 @@ classes, see TQt's Main Classes. TQGLFormat -TQMouseEvent +TQMouseEvent TQSqlForm @@ -713,7 +713,7 @@ classes, see TQt's Main Classes. TQGLWidget -TQMoveEvent +TQMoveEvent TQSqlIndex @@ -778,7 +778,7 @@ classes, see TQt's Main Classes. H TQHBox -TQNPInstance +TQNPInstance * TQSqlSelectCursor @@ -789,7 +789,7 @@ classes, see TQt's Main Classes. TQHBoxLayout -TQNPlugin +TQNPlugin * TQStatusBar @@ -800,7 +800,7 @@ classes, see TQt's Main Classes. TQHButtonGroup -TQNPStream +TQNPStream * TQStoredDrag @@ -811,7 +811,7 @@ classes, see TQt's Main Classes. TQHeader -TQNPWidget +TQNPWidget * TQStrIList diff --git a/doc/html/dclock-example.html b/doc/html/dclock-example.html index dc13195b2..05e21dee3 100644 --- a/doc/html/dclock-example.html +++ b/doc/html/dclock-example.html @@ -61,7 +61,7 @@ public: protected: // event handlers void timerEvent( TQTimerEvent * ); - void mousePressEvent( TQMouseEvent * ); + void mousePressEvent( TQMouseEvent * ); private slots: // internal slots void stopDate(); @@ -131,9 +131,9 @@ private: // internal data // Enters date mode when the left mouse button is pressed. // -void DigitalClock::mousePressEvent( TQMouseEvent *e ) +void DigitalClock::mousePressEvent( TQMouseEvent *e ) { - if ( e->button() == TQMouseEvent::LeftButton ) // left button pressed + if ( e->button() == TQMouseEvent::LeftButton ) // left button pressed showDate(); } diff --git a/doc/html/designer-manual-3.html b/doc/html/designer-manual-3.html index a70d05e7c..37321c869 100644 --- a/doc/html/designer-manual-3.html +++ b/doc/html/designer-manual-3.html @@ -585,7 +585,7 @@ body { background: #ffffff; color: black; } else msg = TQString( "Colors '%1'\n" ).arg( m_filename ); msg += TQString( "has been changed." ); - int ans = TQMessageBox::information( + int ans = TQMessageBox::information( this, "Color Tool -- Unsaved Changes", msg, "&Save", "Cancel", "&Abandon", @@ -600,9 +600,9 @@ body { background: #ffffff; color: black; } }

If the data has changed (m_changed is TRUE), we present the user with a message box offering the option of saving their data, or cancelling the current operation (e.g. not loading a new file, or not creating a new set of colors), or abandoning their changes and continuing. We make the Save button the default button (pressed by Enter) and the Cancel button the escape button (pressed by Esc).

-

Since we're using a TQMessageBox we need to include the relevant header. (Right click "Includes (in Implementation)", then click New. Type "ntqmessagebox.h" and press Enter.)

+

Since we're using a TQMessageBox we need to include the relevant header. (Right click "Includes (in Implementation)", then click New. Type "tqmessagebox.h" and press Enter.)

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

-
  • TQMenuData -
  • TQMetaObject -
  • TQMetaProperty +
  • TQMetaObject +
  • TQMetaProperty
  • TQMimeSource
  • TQMimeSourceFactory
  • TQMovie
  • TQMutex
  • TQMutexLocker -
  • TQNPlugin -
  • TQNPStream +
  • TQNPlugin +
  • TQNPStream
  • TQPaintDevice
    • TQPicture @@ -208,7 +208,7 @@ classes in the TQt API.
  • TQPtrQueue
  • TQPtrStack -
  • TQRangeControl +
  • TQRangeControl
  • TQRect
  • TQRegExp
  • TQRegion @@ -277,10 +277,10 @@ classes in the TQt API.
  • TQIconDragEvent
  • TQIMEvent
  • TQKeyEvent -
  • TQMouseEvent -
  • TQMoveEvent +
  • TQMouseEvent +
  • TQMoveEvent
  • TQPaintEvent -
  • TQResizeEvent +
  • TQResizeEvent
  • TQShowEvent
  • TQTabletEvent
  • TQTimerEvent @@ -344,7 +344,7 @@ classes in the TQt API.
  • TQHttp
  • TQLocalFs -
  • TQNPInstance +
  • TQNPInstance
  • TQObjectCleanupHandler
  • TQProcess
  • TQServerSocket @@ -369,7 +369,7 @@ classes in the TQt API.
  • TQWindowsStyle @@ -412,7 +412,7 @@ classes in the TQt API.
  • TQFileDialog
  • TQFontDialog
  • TQInputDialog -
  • TQMessageBox +
  • TQMessageBox
  • TQMotifDialog
  • TQProgressDialog
  • TQTabDialog @@ -472,7 +472,7 @@ classes in the TQt API.
  • TQHeader
  • TQMainWindow
  • TQMotifWidget -
  • TQNPWidget +
  • TQNPWidget
  • TQScrollBar
  • TQSizeGrip
  • TQSlider diff --git a/doc/html/i18n-example.html b/doc/html/i18n-example.html index 77514418d..f75fa5bc7 100644 --- a/doc/html/i18n-example.html +++ b/doc/html/i18n-example.html @@ -168,7 +168,7 @@ void MyWidget::initChoices(TQWidget* parent) #include <ntqapplication.h> #include <tqtranslator.h> #include <tqfileinfo.h> -#include <ntqmessagebox.h> +#include <tqmessagebox.h> #include <tqcheckbox.h> #include <tqvbox.h> #include <tqlayout.h> @@ -235,7 +235,7 @@ MyWidget* showLang(TQString lang) TQFileInfo fi( lang ); if ( !fi.exists() ) { - TQMessageBox::warning( 0, "File error", + TQMessageBox::warning( 0, "File error", TQString("Cannot find translation for language: "+lang+ "\n(try eg. 'de', 'ko' or 'no')") ); return 0; diff --git a/doc/html/iconview-simple_dd-main-cpp.html b/doc/html/iconview-simple_dd-main-cpp.html index fe22bed22..de9a6d21b 100644 --- a/doc/html/iconview-simple_dd-main-cpp.html +++ b/doc/html/iconview-simple_dd-main-cpp.html @@ -134,14 +134,14 @@ const char* green_icon[]={ } -void DDListBox::mousePressEvent( TQMouseEvent *evt ) +void DDListBox::mousePressEvent( TQMouseEvent *evt ) { TQListBox::mousePressEvent( evt ); dragging = TRUE; } -void DDListBox::mouseMoveEvent( TQMouseEvent * ) +void DDListBox::mouseMoveEvent( TQMouseEvent * ) { if ( dragging ) { TQDragObject *d = new TQTextDrag( currentText(), this ); diff --git a/doc/html/iconview-simple_dd-main-h.html b/doc/html/iconview-simple_dd-main-h.html index 5f463f035..cbce8eece 100644 --- a/doc/html/iconview-simple_dd-main-h.html +++ b/doc/html/iconview-simple_dd-main-h.html @@ -61,8 +61,8 @@ public: // Low-level drag and drop void dragEnterEvent( TQDragEnterEvent *evt ); void dropEvent( TQDropEvent *evt ); - void mousePressEvent( TQMouseEvent *evt ); - void mouseMoveEvent( TQMouseEvent * ); + void mousePressEvent( TQMouseEvent *evt ); + void mouseMoveEvent( TQMouseEvent * ); private: int dragging; }; diff --git a/doc/html/index b/doc/html/index index 485cb8ab6..f9b9d8e33 100644 --- a/doc/html/index +++ b/doc/html/index @@ -3759,14 +3759,14 @@ "TQMacMime::flavorToMime" tqmacmime.html#flavorToMime "TQMacMime::mimeFor" tqmacmime.html#mimeFor "TQMacMime::~TQMacMime" tqmacmime.html#~TQMacMime -"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 +"TQMacStyle" tqmacstyle.html +"TQMacStyle::FocusRectPolicy" tqmacstyle.html#FocusRectPolicy +"TQMacStyle::WidgetSizePolicy" tqmacstyle.html#WidgetSizePolicy +"TQMacStyle::focusRectPolicy" tqmacstyle.html#focusRectPolicy +"TQMacStyle::setFocusRectPolicy" tqmacstyle.html#setFocusRectPolicy +"TQMacStyle::setWidgetSizePolicy" tqmacstyle.html#setWidgetSizePolicy +"TQMacStyle::widgetSizePolicy" tqmacstyle.html#widgetSizePolicy +"TQMacStyle::~TQMacStyle" tqmacstyle.html#~TQMacStyle "QMag" qmag-example.html "TQMainWindow" tqmainwindow.html "TQMainWindow::DockWindows" tqmainwindow.html#DockWindows @@ -3963,61 +3963,61 @@ "TQMenuData::updateItem" tqmenudata.html#updateItem "TQMenuData::whatsThis" tqmenudata.html#whatsThis "TQMenuData::~TQMenuData" tqmenudata.html#~TQMenuData -"QMessageBox" ntqmessagebox.html -"QMessageBox::Icon" ntqmessagebox.html#Icon -"QMessageBox::about" ntqmessagebox.html#about -"QMessageBox::aboutTQt" ntqmessagebox.html#aboutTQt -"QMessageBox::adjustSize" ntqmessagebox.html#adjustSize -"QMessageBox::buttonText" ntqmessagebox.html#buttonText -"QMessageBox::critical" ntqmessagebox.html#critical -"QMessageBox::icon" ntqmessagebox.html#icon -"QMessageBox::icon" ntqmessagebox.html#icon-prop -"QMessageBox::iconPixmap" ntqmessagebox.html#iconPixmap -"QMessageBox::iconPixmap" ntqmessagebox.html#iconPixmap-prop -"QMessageBox::information" ntqmessagebox.html#information -"QMessageBox::question" ntqmessagebox.html#question -"QMessageBox::setButtonText" ntqmessagebox.html#setButtonText -"QMessageBox::setIcon" ntqmessagebox.html#setIcon -"QMessageBox::setIconPixmap" ntqmessagebox.html#setIconPixmap -"QMessageBox::setText" ntqmessagebox.html#setText -"QMessageBox::setTextFormat" ntqmessagebox.html#setTextFormat -"QMessageBox::standardIcon" ntqmessagebox.html#standardIcon -"QMessageBox::text" ntqmessagebox.html#text -"QMessageBox::text" ntqmessagebox.html#text-prop -"QMessageBox::textFormat" ntqmessagebox.html#textFormat -"QMessageBox::textFormat" ntqmessagebox.html#textFormat-prop -"QMessageBox::warning" ntqmessagebox.html#warning -"QMessageBox::~QMessageBox" ntqmessagebox.html#~QMessageBox -"QMetaObject" ntqmetaobject.html -"QMetaObject::classInfo" ntqmetaobject.html#classInfo -"QMetaObject::className" ntqmetaobject.html#className -"QMetaObject::findProperty" ntqmetaobject.html#findProperty -"QMetaObject::inherits" ntqmetaobject.html#inherits -"QMetaObject::numClassInfo" ntqmetaobject.html#numClassInfo -"QMetaObject::numProperties" ntqmetaobject.html#numProperties -"QMetaObject::numSignals" ntqmetaobject.html#numSignals -"QMetaObject::numSlots" ntqmetaobject.html#numSlots -"QMetaObject::property" ntqmetaobject.html#property -"QMetaObject::propertyNames" ntqmetaobject.html#propertyNames -"QMetaObject::signalNames" ntqmetaobject.html#signalNames -"QMetaObject::slotNames" ntqmetaobject.html#slotNames -"QMetaObject::superClass" ntqmetaobject.html#superClass -"QMetaObject::superClassName" ntqmetaobject.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 +"TQMessageBox" tqmessagebox.html +"TQMessageBox::Icon" tqmessagebox.html#Icon +"TQMessageBox::about" tqmessagebox.html#about +"TQMessageBox::aboutTQt" tqmessagebox.html#aboutTQt +"TQMessageBox::adjustSize" tqmessagebox.html#adjustSize +"TQMessageBox::buttonText" tqmessagebox.html#buttonText +"TQMessageBox::critical" tqmessagebox.html#critical +"TQMessageBox::icon" tqmessagebox.html#icon +"TQMessageBox::icon" tqmessagebox.html#icon-prop +"TQMessageBox::iconPixmap" tqmessagebox.html#iconPixmap +"TQMessageBox::iconPixmap" tqmessagebox.html#iconPixmap-prop +"TQMessageBox::information" tqmessagebox.html#information +"TQMessageBox::question" tqmessagebox.html#question +"TQMessageBox::setButtonText" tqmessagebox.html#setButtonText +"TQMessageBox::setIcon" tqmessagebox.html#setIcon +"TQMessageBox::setIconPixmap" tqmessagebox.html#setIconPixmap +"TQMessageBox::setText" tqmessagebox.html#setText +"TQMessageBox::setTextFormat" tqmessagebox.html#setTextFormat +"TQMessageBox::standardIcon" tqmessagebox.html#standardIcon +"TQMessageBox::text" tqmessagebox.html#text +"TQMessageBox::text" tqmessagebox.html#text-prop +"TQMessageBox::textFormat" tqmessagebox.html#textFormat +"TQMessageBox::textFormat" tqmessagebox.html#textFormat-prop +"TQMessageBox::warning" tqmessagebox.html#warning +"TQMessageBox::~TQMessageBox" tqmessagebox.html#~TQMessageBox +"TQMetaObject" tqmetaobject.html +"TQMetaObject::classInfo" tqmetaobject.html#classInfo +"TQMetaObject::className" tqmetaobject.html#className +"TQMetaObject::findProperty" tqmetaobject.html#findProperty +"TQMetaObject::inherits" tqmetaobject.html#inherits +"TQMetaObject::numClassInfo" tqmetaobject.html#numClassInfo +"TQMetaObject::numProperties" tqmetaobject.html#numProperties +"TQMetaObject::numSignals" tqmetaobject.html#numSignals +"TQMetaObject::numSlots" tqmetaobject.html#numSlots +"TQMetaObject::property" tqmetaobject.html#property +"TQMetaObject::propertyNames" tqmetaobject.html#propertyNames +"TQMetaObject::signalNames" tqmetaobject.html#signalNames +"TQMetaObject::slotNames" tqmetaobject.html#slotNames +"TQMetaObject::superClass" tqmetaobject.html#superClass +"TQMetaObject::superClassName" tqmetaobject.html#superClassName +"TQMetaProperty" tqmetaproperty.html +"TQMetaProperty::designable" tqmetaproperty.html#designable +"TQMetaProperty::enumKeys" tqmetaproperty.html#enumKeys +"TQMetaProperty::isEnumType" tqmetaproperty.html#isEnumType +"TQMetaProperty::isSetType" tqmetaproperty.html#isSetType +"TQMetaProperty::keyToValue" tqmetaproperty.html#keyToValue +"TQMetaProperty::keysToValue" tqmetaproperty.html#keysToValue +"TQMetaProperty::name" tqmetaproperty.html#name +"TQMetaProperty::reset" tqmetaproperty.html#reset +"TQMetaProperty::scriptable" tqmetaproperty.html#scriptable +"TQMetaProperty::stored" tqmetaproperty.html#stored +"TQMetaProperty::type" tqmetaproperty.html#type +"TQMetaProperty::valueToKey" tqmetaproperty.html#valueToKey +"TQMetaProperty::valueToKeys" tqmetaproperty.html#valueToKeys +"TQMetaProperty::writable" tqmetaproperty.html#writable "TQMimeSource" tqmimesource.html "TQMimeSource::encodedData" tqmimesource.html#encodedData "TQMimeSource::format" tqmimesource.html#format @@ -4058,22 +4058,22 @@ "TQMotifWidget" tqmotifwidget.html "TQMotifWidget::motifWidget" tqmotifwidget.html#motifWidget "TQMotifWidget::~TQMotifWidget" tqmotifwidget.html#~TQMotifWidget -"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 +"TQMouseEvent" tqmouseevent.html +"TQMouseEvent::accept" tqmouseevent.html#accept +"TQMouseEvent::button" tqmouseevent.html#button +"TQMouseEvent::globalPos" tqmouseevent.html#globalPos +"TQMouseEvent::globalX" tqmouseevent.html#globalX +"TQMouseEvent::globalY" tqmouseevent.html#globalY +"TQMouseEvent::ignore" tqmouseevent.html#ignore +"TQMouseEvent::isAccepted" tqmouseevent.html#isAccepted +"TQMouseEvent::pos" tqmouseevent.html#pos +"TQMouseEvent::state" tqmouseevent.html#state +"TQMouseEvent::stateAfter" tqmouseevent.html#stateAfter +"TQMouseEvent::x" tqmouseevent.html#x +"TQMouseEvent::y" tqmouseevent.html#y +"TQMoveEvent" tqmoveevent.html +"TQMoveEvent::oldPos" tqmoveevent.html#oldPos +"TQMoveEvent::pos" tqmoveevent.html#pos "TQMovie" tqmovie.html "TQMovie::Status" tqmovie.html#Status "TQMovie::backgroundColor" tqmovie.html#backgroundColor @@ -4150,62 +4150,62 @@ "TQMutexLocker::~TQMutexLocker" tqmutexlocker.html#~TQMutexLocker "TQMutexPool::get" tqmutexpool.html#get "TQMutexPool::~TQMutexPool" tqmutexpool.html#~TQMutexPool -"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 +"TQNPInstance" tqnpinstance.html +"TQNPInstance::InstanceMode" tqnpinstance.html#InstanceMode +"TQNPInstance::Reason" tqnpinstance.html#Reason +"TQNPInstance::StreamMode" tqnpinstance.html#StreamMode +"TQNPInstance::arg" tqnpinstance.html#arg +"TQNPInstance::argc" tqnpinstance.html#argc +"TQNPInstance::argn" tqnpinstance.html#argn +"TQNPInstance::argv" tqnpinstance.html#argv +"TQNPInstance::getJavaPeer" tqnpinstance.html#getJavaPeer +"TQNPInstance::getURL" tqnpinstance.html#getURL +"TQNPInstance::getURLNotify" tqnpinstance.html#getURLNotify +"TQNPInstance::mode" tqnpinstance.html#mode +"TQNPInstance::newStream" tqnpinstance.html#newStream +"TQNPInstance::newStreamCreated" tqnpinstance.html#newStreamCreated +"TQNPInstance::newWindow" tqnpinstance.html#newWindow +"TQNPInstance::notifyURL" tqnpinstance.html#notifyURL +"TQNPInstance::postURL" tqnpinstance.html#postURL +"TQNPInstance::print" tqnpinstance.html#print +"TQNPInstance::printFullPage" tqnpinstance.html#printFullPage +"TQNPInstance::status" tqnpinstance.html#status +"TQNPInstance::streamAsFile" tqnpinstance.html#streamAsFile +"TQNPInstance::streamDestroyed" tqnpinstance.html#streamDestroyed +"TQNPInstance::userAgent" tqnpinstance.html#userAgent +"TQNPInstance::widget" tqnpinstance.html#widget +"TQNPInstance::write" tqnpinstance.html#write +"TQNPInstance::writeReady" tqnpinstance.html#writeReady +"TQNPInstance::~TQNPInstance" tqnpinstance.html#~TQNPInstance +"TQNPStream" tqnpstream.html +"TQNPStream::complete" tqnpstream.html#complete +"TQNPStream::end" tqnpstream.html#end +"TQNPStream::instance" tqnpstream.html#instance +"TQNPStream::lastModified" tqnpstream.html#lastModified +"TQNPStream::okay" tqnpstream.html#okay +"TQNPStream::requestRead" tqnpstream.html#requestRead +"TQNPStream::seekable" tqnpstream.html#seekable +"TQNPStream::type" tqnpstream.html#type +"TQNPStream::url" tqnpstream.html#url +"TQNPStream::write" tqnpstream.html#write +"TQNPStream::~TQNPStream" tqnpstream.html#~TQNPStream +"TQNPWidget" tqnpwidget.html +"TQNPWidget::enterInstance" tqnpwidget.html#enterInstance +"TQNPWidget::instance" tqnpwidget.html#instance +"TQNPWidget::leaveInstance" tqnpwidget.html#leaveInstance +"TQNPWidget::~TQNPWidget" tqnpwidget.html#~TQNPWidget +"TQNPlugin" tqnplugin.html +"TQNPlugin::actual" tqnplugin.html#actual +"TQNPlugin::create" tqnplugin.html#create +"TQNPlugin::getJavaClass" tqnplugin.html#getJavaClass +"TQNPlugin::getJavaEnv" tqnplugin.html#getJavaEnv +"TQNPlugin::getMIMEDescription" tqnplugin.html#getMIMEDescription +"TQNPlugin::getPluginDescriptionString" tqnplugin.html#getPluginDescriptionString +"TQNPlugin::getPluginNameString" tqnplugin.html#getPluginNameString +"TQNPlugin::getVersionInfo" tqnplugin.html#getVersionInfo +"TQNPlugin::newInstance" tqnplugin.html#newInstance +"TQNPlugin::unuseJavaClass" tqnplugin.html#unuseJavaClass +"TQNPlugin::~TQNPlugin" tqnplugin.html#~TQNPlugin "TQNetworkOperation" tqnetworkoperation.html "TQNetworkOperation::arg" tqnetworkoperation.html#arg "TQNetworkOperation::errorCode" tqnetworkoperation.html#errorCode @@ -4568,7 +4568,7 @@ "TQPointArray::setPoints" tqpointarray.html#setPoints "TQPointArray::translate" tqpointarray.html#translate "TQPointArray::~TQPointArray" tqpointarray.html#~TQPointArray -"QPolygonScanner::scan" ntqpolygonscanner.html#scan +"TQPolygonScanner::scan" tqpolygonscanner.html#scan "TQPopupMenu" tqpopupmenu.html "TQPopupMenu::aboutToHide" tqpopupmenu.html#aboutToHide "TQPopupMenu::aboutToShow" tqpopupmenu.html#aboutToShow @@ -4588,12 +4588,12 @@ "TQPopupMenu::setCheckable" tqpopupmenu.html#setCheckable "TQPopupMenu::updateItem" tqpopupmenu.html#updateItem "TQPopupMenu::~TQPopupMenu" tqpopupmenu.html#~TQPopupMenu -"QPrintDialog::addButton" ntqprintdialog.html#addButton -"QPrintDialog::getPrinterSetup" ntqprintdialog.html#getPrinterSetup -"QPrintDialog::printer" ntqprintdialog.html#printer -"QPrintDialog::setGlobalPrintDialog" ntqprintdialog.html#setGlobalPrintDialog -"QPrintDialog::setPrinter" ntqprintdialog.html#setPrinter -"QPrintDialog::~QPrintDialog" ntqprintdialog.html#~QPrintDialog +"TQPrintDialog::addButton" tqprintdialog.html#addButton +"TQPrintDialog::getPrinterSetup" tqprintdialog.html#getPrinterSetup +"TQPrintDialog::printer" tqprintdialog.html#printer +"TQPrintDialog::setGlobalPrintDialog" tqprintdialog.html#setGlobalPrintDialog +"TQPrintDialog::setPrinter" tqprintdialog.html#setPrinter +"TQPrintDialog::~TQPrintDialog" tqprintdialog.html#~TQPrintDialog "TQPrinter" tqprinter.html "TQPrinter::ColorMode" tqprinter.html#ColorMode "TQPrinter::Orientation" tqprinter.html#Orientation @@ -4915,30 +4915,30 @@ "TQRadioButton::checked" tqradiobutton.html#checked-prop "TQRadioButton::isChecked" tqradiobutton.html#isChecked "TQRadioButton::setChecked" tqradiobutton.html#setChecked -"QRangeControl" ntqrangecontrol.html -"QRangeControl::addLine" ntqrangecontrol.html#addLine -"QRangeControl::addPage" ntqrangecontrol.html#addPage -"QRangeControl::bound" ntqrangecontrol.html#bound -"QRangeControl::directSetValue" ntqrangecontrol.html#directSetValue -"QRangeControl::lineStep" ntqrangecontrol.html#lineStep -"QRangeControl::maxValue" ntqrangecontrol.html#maxValue -"QRangeControl::minValue" ntqrangecontrol.html#minValue -"QRangeControl::pageStep" ntqrangecontrol.html#pageStep -"QRangeControl::positionFromValue" ntqrangecontrol.html#positionFromValue -"QRangeControl::prevValue" ntqrangecontrol.html#prevValue -"QRangeControl::rangeChange" ntqrangecontrol.html#rangeChange -"QRangeControl::setMaxValue" ntqrangecontrol.html#setMaxValue -"QRangeControl::setMinValue" ntqrangecontrol.html#setMinValue -"QRangeControl::setRange" ntqrangecontrol.html#setRange -"QRangeControl::setSteps" ntqrangecontrol.html#setSteps -"QRangeControl::setValue" ntqrangecontrol.html#setValue -"QRangeControl::stepChange" ntqrangecontrol.html#stepChange -"QRangeControl::subtractLine" ntqrangecontrol.html#subtractLine -"QRangeControl::subtractPage" ntqrangecontrol.html#subtractPage -"QRangeControl::value" ntqrangecontrol.html#value -"QRangeControl::valueChange" ntqrangecontrol.html#valueChange -"QRangeControl::valueFromPosition" ntqrangecontrol.html#valueFromPosition -"QRangeControl::~QRangeControl" ntqrangecontrol.html#~QRangeControl +"TQRangeControl" tqrangecontrol.html +"TQRangeControl::addLine" tqrangecontrol.html#addLine +"TQRangeControl::addPage" tqrangecontrol.html#addPage +"TQRangeControl::bound" tqrangecontrol.html#bound +"TQRangeControl::directSetValue" tqrangecontrol.html#directSetValue +"TQRangeControl::lineStep" tqrangecontrol.html#lineStep +"TQRangeControl::maxValue" tqrangecontrol.html#maxValue +"TQRangeControl::minValue" tqrangecontrol.html#minValue +"TQRangeControl::pageStep" tqrangecontrol.html#pageStep +"TQRangeControl::positionFromValue" tqrangecontrol.html#positionFromValue +"TQRangeControl::prevValue" tqrangecontrol.html#prevValue +"TQRangeControl::rangeChange" tqrangecontrol.html#rangeChange +"TQRangeControl::setMaxValue" tqrangecontrol.html#setMaxValue +"TQRangeControl::setMinValue" tqrangecontrol.html#setMinValue +"TQRangeControl::setRange" tqrangecontrol.html#setRange +"TQRangeControl::setSteps" tqrangecontrol.html#setSteps +"TQRangeControl::setValue" tqrangecontrol.html#setValue +"TQRangeControl::stepChange" tqrangecontrol.html#stepChange +"TQRangeControl::subtractLine" tqrangecontrol.html#subtractLine +"TQRangeControl::subtractPage" tqrangecontrol.html#subtractPage +"TQRangeControl::value" tqrangecontrol.html#value +"TQRangeControl::valueChange" tqrangecontrol.html#valueChange +"TQRangeControl::valueFromPosition" tqrangecontrol.html#valueFromPosition +"TQRangeControl::~TQRangeControl" tqrangecontrol.html#~TQRangeControl "TQRect" tqrect.html "TQRect::addCoords" tqrect.html#addCoords "TQRect::bottom" tqrect.html#bottom @@ -5058,9 +5058,9 @@ "TQRegion::translate" tqregion.html#translate "TQRegion::unite" tqregion.html#unite "TQRegion::~TQRegion" tqregion.html#~TQRegion -"QResizeEvent" qresizeevent.html -"QResizeEvent::oldSize" qresizeevent.html#oldSize -"QResizeEvent::size" qresizeevent.html#size +"TQResizeEvent" tqresizeevent.html +"TQResizeEvent::oldSize" tqresizeevent.html#oldSize +"TQResizeEvent::size" tqresizeevent.html#size "TQSGIStyle" tqsgistyle.html "TQSGIStyle::~TQSGIStyle" tqsgistyle.html#~TQSGIStyle "TQScrollBar" tqscrollbar.html diff --git a/doc/html/life-example.html b/doc/html/life-example.html index f76cf9762..0466bc92c 100644 --- a/doc/html/life-example.html +++ b/doc/html/life-example.html @@ -68,9 +68,9 @@ public slots: protected: virtual void paintEvent( TQPaintEvent * ); - virtual void mouseMoveEvent( TQMouseEvent * ); - virtual void mousePressEvent( TQMouseEvent * ); - virtual void resizeEvent( TQResizeEvent * ); + virtual void mouseMoveEvent( TQMouseEvent * ); + virtual void mousePressEvent( TQMouseEvent * ); + virtual void resizeEvent( TQResizeEvent * ); void mouseHandle( const TQPoint &pos ); private: @@ -152,10 +152,10 @@ void LifeWidget::clear() // this is not in general TRUE, but in practice it's good enough for // this program -void LifeWidget::resizeEvent( TQResizeEvent * e ) +void LifeWidget::resizeEvent( TQResizeEvent * e ) { - maxi = (e->size().width() - 2 * BORDER) / SCALE; - maxj = (e->size().height() - 2 * BORDER) / SCALE; + maxi = (e->size().width() - 2 * BORDER) / SCALE; + maxj = (e->size().height() - 2 * BORDER) / SCALE; } @@ -176,16 +176,16 @@ void LifeWidget::mouseHandle( const TQ } -void LifeWidget::mouseMoveEvent( TQMouseEvent *e ) +void LifeWidget::mouseMoveEvent( TQMouseEvent *e ) { - mouseHandle( e->pos() ); + mouseHandle( e->pos() ); } -void LifeWidget::mousePressEvent( TQMouseEvent *e ) +void LifeWidget::mousePressEvent( TQMouseEvent *e ) { - if ( e->button() == TQMouseEvent::LeftButton ) - mouseHandle( e->pos() ); + if ( e->button() == TQMouseEvent::LeftButton ) + mouseHandle( e->pos() ); } diff --git a/doc/html/listbox-example.html b/doc/html/listbox-example.html index 885ecf514..4f7020be7 100644 --- a/doc/html/listbox-example.html +++ b/doc/html/listbox-example.html @@ -209,9 +209,9 @@ private: while( ++i <= 2560 ) l->insertItem( TQString::fromLatin1( "Item " ) + TQString::number( i ), i ); - columns->setRange( 1, 256 ); + columns->setRange( 1, 256 ); columns->setValue( 1 ); - rows->setRange( 1, 256 ); + rows->setRange( 1, 256 ); rows->setValue( 256 ); connect( columns, TQ_SIGNAL(valueChanged(int)), this, TQ_SLOT(setNumCols()) ); diff --git a/doc/html/mail-example.html b/doc/html/mail-example.html index b2e4dee5b..2525a719c 100644 --- a/doc/html/mail-example.html +++ b/doc/html/mail-example.html @@ -118,7 +118,7 @@ private: #include <tqdns.h> #include <tqtimer.h> #include <ntqapplication.h> -#include <ntqmessagebox.h> +#include <tqmessagebox.h> #include <tqregexp.h> @@ -220,7 +220,7 @@ void Smtp::readyRead() return; } else { // something broke. - TQMessageBox::warning( tqApp->activeWindow(), + TQMessageBox::warning( tqApp->activeWindow(), tr( "TQt Mail Example" ), tr( "Unexpected reply from SMTP server:\n\n" ) + response ); diff --git a/doc/html/mainclasses.html b/doc/html/mainclasses.html index 9b71ba0e4..1fd314cc5 100644 --- a/doc/html/mainclasses.html +++ b/doc/html/mainclasses.html @@ -43,7 +43,7 @@ classes), see TQt's Classes. TQFileDialog -TQMessageBox +TQMessageBox TQSlider diff --git a/doc/html/mdi-example.html b/doc/html/mdi-example.html index fd89eaa4f..00f2fae7f 100644 --- a/doc/html/mdi-example.html +++ b/doc/html/mdi-example.html @@ -146,7 +146,7 @@ private: #include <tqfiledialog.h> #include <tqlabel.h> #include <tqstatusbar.h> -#include <ntqmessagebox.h> +#include <tqmessagebox.h> #include <tqprinter.h> #include <ntqapplication.h> #include <tqpushbutton.h> @@ -329,7 +329,7 @@ void ApplicationWindow::closeWindow() void ApplicationWindow::about() { - TQMessageBox::about( this, "TQt Application Example", + TQMessageBox::about( this, "TQt Application Example", "This example demonstrates simple use of\n " "TQt's Multiple Document Interface (MDI)."); } @@ -337,7 +337,7 @@ void ApplicationWindow::about() void ApplicationWindow::aboutTQt() { - TQMessageBox::aboutTQt( this, "TQt Application Example" ); + TQMessageBox::aboutTQt( this, "TQt Application Example" ); } @@ -425,7 +425,7 @@ MDIWindow::~MDIWindow() void MDIWindow::closeEvent( TQCloseEvent *e ) { if ( medit->isModified() ) { - switch( TQMessageBox::warning( this, "Save Changes", + switch( TQMessageBox::warning( this, "Save Changes", tr("Save changes to %1?").arg( caption() ), tr("Yes"), tr("No"), tr("Cancel") ) ) { case 0: diff --git a/doc/html/menu-example.html b/doc/html/menu-example.html index adf64a938..daff8ddbb 100644 --- a/doc/html/menu-example.html +++ b/doc/html/menu-example.html @@ -80,7 +80,7 @@ public slots: void printerSetup(); protected: - void resizeEvent( TQResizeEvent * ); + void resizeEvent( TQResizeEvent * ); signals: void explain( const TQString& ); @@ -116,7 +116,7 @@ private: #include <tqcursor.h> #include <tqpopupmenu.h> #include <ntqapplication.h> -#include <ntqmessagebox.h> +#include <tqmessagebox.h> #include <tqpixmap.h> #include <tqpainter.h> @@ -409,7 +409,7 @@ void MenuExample::underline() void MenuExample::about() { - TQMessageBox::about( this, "TQt Menu Example", + 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." ); @@ -418,7 +418,7 @@ void MenuExample::about() void MenuExample::aboutTQt() { - TQMessageBox::aboutTQt( this, "TQt Menu Example" ); + TQMessageBox::aboutTQt( this, "TQt Menu Example" ); } @@ -443,7 +443,7 @@ void MenuExample::printerSetup() } -void MenuExample::resizeEvent( TQResizeEvent * ) +void MenuExample::resizeEvent( TQResizeEvent * ) { label->setGeometry( 20, rect().center().y()-20, width()-40, 40 ); } diff --git a/doc/html/metaobjects.html b/doc/html/metaobjects.html index cfad30736..ae025c2c9 100644 --- a/doc/html/metaobjects.html +++ b/doc/html/metaobjects.html @@ -69,7 +69,7 @@ translation as used for internationaliz setting and getting object properties by name.

  • the metaObject() function that -returns the associated meta object for the +returns the associated meta object for the class.

    While it is possible to use TQObject as a base class without the diff --git a/doc/html/misc.html b/doc/html/misc.html index e8957e2b9..5fe0b80dd 100644 --- a/doc/html/misc.html +++ b/doc/html/misc.html @@ -51,7 +51,7 @@ body { background: #ffffff; color: black; } 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 +TQRangeControlInteger value within a range TQRegExpPattern matching using regular expressions TQRegExpValidatorUsed to check a string against a regular expression TQSettingsPersistent platform-independent application settings diff --git a/doc/html/motif-walkthrough-2.html b/doc/html/motif-walkthrough-2.html index 06c3649de..6d7c7978c 100644 --- a/doc/html/motif-walkthrough-2.html +++ b/doc/html/motif-walkthrough-2.html @@ -53,7 +53,7 @@ way up the dependency tree until all the pieces have been migrated. 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 +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 diff --git a/doc/html/motif-walkthrough-3.html b/doc/html/motif-walkthrough-3.html index d579c8618..22b522586 100644 --- a/doc/html/motif-walkthrough-3.html +++ b/doc/html/motif-walkthrough-3.html @@ -37,7 +37,7 @@ body { background: #ffffff; color: black; } [ Home ] [ Next: Using Custom TQDialogs ]

    We start by using two of the TQt Standard -Dialogs: TQFileDialog and TQMessageBox. Both of these classes +Dialogs: TQFileDialog and TQMessageBox. Both of these classes provide useful static convenience functions.

    TQFileDialog::getOpenFileName() replacement for the Open dialog @@ -112,9 +112,9 @@ the correct symbols for these functions.

    
     

    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(). +TQMessageBox::information().

    First, we need to make sure we include the proper header for -TQMessageBox. +TQMessageBox.

    
    @@ -147,8 +147,8 @@ functions.
     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. +TQMessageBox::warning(). +

    First, we need to make sure we include the proper header for TQMessageBox.

    
    diff --git a/doc/html/motif-walkthrough-8.html b/doc/html/motif-walkthrough-8.html
    index 82e95a073..15c54a2b1 100644
    --- a/doc/html/motif-walkthrough-8.html
    +++ b/doc/html/motif-walkthrough-8.html
    @@ -150,7 +150,7 @@ will not use any Xt/Motif functions, so we remove the Xt/Motif #include
     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
    +we can pass this as the parent argument to the TQMessageBox
     functions.
     

    
     

    After reading the file in the MainWindow::readDB() function, we set diff --git a/doc/html/movies-example.html b/doc/html/movies-example.html index 61ec709e1..2563fe8b2 100644 --- a/doc/html/movies-example.html +++ b/doc/html/movies-example.html @@ -53,7 +53,7 @@ The Movies example displays MNG and animated GIF files using the tqpushbutton.h> #include <tqlabel.h> #include <tqpainter.h> -#include <ntqmessagebox.h> +#include <tqmessagebox.h> #include <tqmovie.h> #include <tqvbox.h> @@ -227,7 +227,7 @@ private slots: if (status < 0) { TQString msg; msg.sprintf("Could not play movie \"%s\"", (const char*)filename); - TQMessageBox::warning(this, "movies", msg); + TQMessageBox::warning(this, "movies", msg); parentWidget()->close(); } else if (status == TQMovie::Paused || status == TQMovie::EndOfMovie) { repaint(); // Ensure status text is displayed diff --git a/doc/html/netscape-plugin.html b/doc/html/netscape-plugin.html index 3e1c663cb..472a7cc9b 100644 --- a/doc/html/netscape-plugin.html +++ b/doc/html/netscape-plugin.html @@ -42,10 +42,10 @@ protocol. Modern versions of MSIE do not support this protocol.

    The Netscape Plugin Extension consists of the follow classes:

    How-to

    @@ -65,7 +65,7 @@ protocol. Modern versions of MSIE do not support this protocol.
  • 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. -
  • Read the plugin class documentation, and +
  • Read the plugin class documentation, and examine the example plugins.
  • Do most of your development as a stand-alone TQt application - debugging Netscape Plugins is cumbersome. You may want to use signal(2) diff --git a/doc/html/ntqapplication.html b/doc/html/ntqapplication.html index a542212bb..a46b69afb 100644 --- a/doc/html/ntqapplication.html +++ b/doc/html/ntqapplication.html @@ -516,7 +516,7 @@ 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(). +

    This function is a convenience slot for TQMessageBox::aboutTQt().

    void TQApplication::aboutToQuit () [signal]

    @@ -799,7 +799,7 @@ exit() (which is 0 if exit() is called via quit()). 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 +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 @@ -1194,7 +1194,7 @@ 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 );
    +    TQMouseEvent me( TQEvent::MouseButtonPress, pos, 0, 0 );
         TQApplication::sendEvent( mainWindow, &me );
         
    diff --git a/doc/html/ntqmessagebox.html b/doc/html/ntqmessagebox.html deleted file mode 100644 index 09eb09508..000000000 --- a/doc/html/ntqmessagebox.html +++ /dev/null @@ -1,751 +0,0 @@ - - - - - -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 <ntqmessagebox.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/tqfileiconview.cpp, picture/picture.cpp and qwerty/qwerty.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 required 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 required 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/ntqmetaobject.html b/doc/html/ntqmetaobject.html deleted file mode 100644 index ee5f0f871..000000000 --- a/doc/html/ntqmetaobject.html +++ /dev/null @@ -1,187 +0,0 @@ - - - - - -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 <ntqmetaobject.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 required 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/ntqrangecontrol.html b/doc/html/ntqrangecontrol.html deleted file mode 100644 index 45be107f8..000000000 --- a/doc/html/ntqrangecontrol.html +++ /dev/null @@ -1,336 +0,0 @@ - - - - - -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 <ntqrangecontrol.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/ntqt.html b/doc/html/ntqt.html index bb33a3a80..5eace10cf 100644 --- a/doc/html/ntqt.html +++ b/doc/html/ntqt.html @@ -34,7 +34,7 @@ body { background: #ffffff; color: black; }

    The TQt class is a namespace for miscellaneous identifiers that need to be global-like. More... -

    #include <ntqnamespace.h> +

    #include <tqnamespace.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

    @@ -212,7 +212,7 @@ must use the control panel.) buttons.
    • TQt::NoButton - used when the button state does not refer to any -button (see TQMouseEvent::button()). +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.) diff --git a/doc/html/objectmodel.html b/doc/html/objectmodel.html index ffe27ee1d..96672231a 100644 --- a/doc/html/objectmodel.html +++ b/doc/html/objectmodel.html @@ -36,8 +36,8 @@ body { background: #ffffff; color: black; }

      TQGuardedPtrTemplate class that provides guarded pointers to TQObjects -
      TQMetaObjectMeta information about TQt objects -
      TQMetaPropertyStores meta data about a property +
      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 diff --git a/doc/html/outliner-example.html b/doc/html/outliner-example.html index b1ce465b2..d2fe63295 100644 --- a/doc/html/outliner-example.html +++ b/doc/html/outliner-example.html @@ -146,7 +146,7 @@ private: #include "outlinetree.h" #include <tqfile.h> -#include <ntqmessagebox.h> +#include <tqmessagebox.h> OutlineTree::OutlineTree( const TQString fileName, TQWidget *parent, const char *name ) : TQListView( parent, name ) @@ -159,13 +159,13 @@ private: // read the XML file and create DOM tree TQFile opmlFile( fileName ); if ( !opmlFile.open( IO_ReadOnly ) ) { - TQMessageBox::critical( 0, + TQMessageBox::critical( 0, tr( "Critical Error" ), tr( "Cannot open file %1" ).arg( fileName ) ); return; } if ( !domTree.setContent( &opmlFile ) ) { - TQMessageBox::critical( 0, + TQMessageBox::critical( 0, tr( "Critical Error" ), tr( "Parsing error for file %1" ).arg( fileName ) ); opmlFile.close(); diff --git a/doc/html/picture-example.html b/doc/html/picture-example.html index c0189b6a0..4303b8028 100644 --- a/doc/html/picture-example.html +++ b/doc/html/picture-example.html @@ -52,7 +52,7 @@ a set of drawing commands. #include <tqpicture.h> #include <tqpixmap.h> #include <tqwidget.h> -#include <ntqmessagebox.h> +#include <tqmessagebox.h> #include <tqfile.h> #include <ctype.h> @@ -157,7 +157,7 @@ int main( int argc, char **argv ) paint.end(); // painting done pict.save( fileName ); // save picture - TQMessageBox::information(0, "TQt Example - Picture", "Saved. Run me again!"); + TQMessageBox::information(0, "TQt Example - Picture", "Saved. Run me again!"); return 0; } else { PictureDisplay test( fileName ); // create picture display diff --git a/doc/html/pictures.html b/doc/html/pictures.html index e821d1770..1ee703985 100644 --- a/doc/html/pictures.html +++ b/doc/html/pictures.html @@ -59,13 +59,13 @@ dialog. This is explained in the TQFileDialog cl 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

      +

      Below is a TQFontDialog.

      The screenshot below shows a TQColorDialog.

      -

      Messages are presented using TQMessageBoxes, as shown below. +

      Messages are presented using TQMessageBoxes, as shown below.

      The image below shows a TQProgressDialog. The TQProgressBar can also be used as a separate widget. diff --git a/doc/html/popup-example.html b/doc/html/popup-example.html index 7d3979d9f..22d4864c9 100644 --- a/doc/html/popup-example.html +++ b/doc/html/popup-example.html @@ -65,8 +65,8 @@ public: void popup( TQWidget* parent = 0); protected: - virtual void mouseMoveEvent( TQMouseEvent * ); - virtual void mouseReleaseEvent( TQMouseEvent * ); + virtual void mouseMoveEvent( TQMouseEvent * ); + virtual void mouseReleaseEvent( TQMouseEvent * ); virtual void closeEvent( TQCloseEvent * ); private: @@ -123,17 +123,17 @@ private: setMouseTracking( TRUE ); } -void FancyPopup::mouseMoveEvent( TQMouseEvent * e){ +void FancyPopup::mouseMoveEvent( TQMouseEvent * e){ moves++; TQString s; - s.sprintf("%d/%d", e->pos().x(), e->pos().y()); - if (e->state() & TQMouseEvent::LeftButton) + 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) +void FancyPopup::mouseReleaseEvent( TQMouseEvent * e){ + if (rect().contains( e->pos() ) || moves > 5) close(); } @@ -148,7 +148,7 @@ private: // 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); + TQMouseEvent me( TQEvent::MouseButtonRelease, TQPoint(0,0), TQPoint(0,0), TQMouseEvent::LeftButton, TQMouseEvent::NoButton); TQApplication::sendEvent( popupParent, &me ); } diff --git a/doc/html/porting.html b/doc/html/porting.html index 56ba55585..1a0363153 100644 --- a/doc/html/porting.html +++ b/doc/html/porting.html @@ -184,7 +184,7 @@ the top of the file giving the error.

      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 ntqnamespace.h. If you get compilation +special TQt class defined in tqnamespace.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: @@ -358,9 +358,9 @@ new code.

    • TQMainWindow::setToolBarsMovable( bool )
    • TQMainWindow::toolBarPositionChanged( TQToolBar *)
    • TQMainWindow::toolBarsMovable() const -
    • TQMessageBox::message( const TQString & caption, const TQString & text, const TQString & buttonText = TQString::null, TQWidget *parent = 0, const char *= 0 ) -
    • TQMessageBox::query( const TQString & caption, const TQString & text, const TQString & yesButtonText = TQString::null, const TQString & noButtonText = TQString::null, TQWidget *parent = 0, const char *= 0 ) -
    • TQMessageBox::standardIcon( Icon icon, GUIStyle style ) +
    • TQMessageBox::message( const TQString & caption, const TQString & text, const TQString & buttonText = TQString::null, TQWidget *parent = 0, const char *= 0 ) +
    • TQMessageBox::query( const TQString & caption, const TQString & text, const TQString & yesButtonText = TQString::null, const TQString & noButtonText = TQString::null, TQWidget *parent = 0, const char *= 0 ) +
    • TQMessageBox::standardIcon( Icon icon, GUIStyle style )
    • TQRegExp::match( const TQString & str, int index = 0, int *len = 0, bool indexIsStart = TRUE ) const
    • TQScrollView::childIsVisible( TQWidget *child )
    • TQScrollView::showChild( TQWidget *child, bool show = TRUE ) @@ -479,9 +479,9 @@ for the echo parameter.

      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 +

      TQMoveEvent

      -

      In TQt 2.x, the function TQMoveEvent::pos() returned the position of the +

      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. diff --git a/doc/html/process-example.html b/doc/html/process-example.html index 01bcfb163..ccf76102c 100644 --- a/doc/html/process-example.html +++ b/doc/html/process-example.html @@ -55,7 +55,7 @@ output of the command. #include <tqtextview.h> #include <tqpushbutton.h> #include <ntqapplication.h> -#include <ntqmessagebox.h> +#include <tqmessagebox.h> #include <stdlib.h> @@ -104,7 +104,7 @@ private: if ( !proc->start() ) { // error handling - TQMessageBox::critical( 0, + TQMessageBox::critical( 0, tr("Fatal error"), tr("Could not start the uic command."), tr("Quit") ); diff --git a/doc/html/properties.html b/doc/html/properties.html index 0ab6e463e..cc8685f85 100644 --- a/doc/html/properties.html +++ b/doc/html/properties.html @@ -76,12 +76,12 @@ function calls are equivalent:

      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() +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 +

      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: @@ -173,7 +173,7 @@ meta object, for example:

      Like other meta data, class information is accessible at runtime -through the meta object, see TQMetaObject::classInfo() for details. +through the meta object, see TQMetaObject::classInfo() for details.

      TQ_OVERRIDE

      diff --git a/doc/html/propertydocs b/doc/html/propertydocs index 6d8d06c0e..0dc2c594c 100644 --- a/doc/html/propertydocs +++ b/doc/html/propertydocs @@ -844,9 +844,9 @@ date. The default minimum date is 1752-09-14. TQDial::lineStep <p>This property holds the current line step. -<p>setLineStep() calls the virtual <a href="ntqrangecontrol.html#stepChange">stepChange</a>() function if the new +<p>setLineStep() calls the virtual <a href="tqrangecontrol.html#stepChange">stepChange</a>() function if the new line step is different from the previous setting. -<p> <p>See also <a href="ntqrangecontrol.html#setSteps">QRangeControl::setSteps</a>(), <a href="tqdial.html#pageStep-prop">pageStep</a>, and <a href="ntqrangecontrol.html#setRange">setRange</a>(). +<p> <p>See also <a href="tqrangecontrol.html#setSteps">TQRangeControl::setSteps</a>(), <a href="tqdial.html#pageStep-prop">pageStep</a>, and <a href="tqrangecontrol.html#setRange">setRange</a>(). <p>Set this property's value with <a href="tqdial.html#setLineStep">setLineStep</a>() and get this property's value with <a href="tqdial.html#lineStep">lineStep</a>(). @@ -857,7 +857,7 @@ line step is different from the previous setting. <p>This property holds the current maximum value. <p>When setting this property, the <a href="tqdial.html#minValue-prop">TQDial::minValue</a> is adjusted if necessary to ensure that the range remains valid. -<p> <p>See also <a href="ntqrangecontrol.html#setRange">setRange</a>(). +<p> <p>See also <a href="tqrangecontrol.html#setRange">setRange</a>(). <p>Set this property's value with <a href="tqdial.html#setMaxValue">setMaxValue</a>() and get this property's value with <a href="tqdial.html#maxValue">maxValue</a>(). @@ -868,7 +868,7 @@ necessary to ensure that the range remains valid. <p>This property holds the current minimum value. <p>When setting this property, the <a href="tqdial.html#maxValue-prop">TQDial::maxValue</a> is adjusted if necessary to ensure that the range remains valid. -<p> <p>See also <a href="ntqrangecontrol.html#setRange">setRange</a>(). +<p> <p>See also <a href="tqrangecontrol.html#setRange">setRange</a>(). <p>Set this property's value with <a href="tqdial.html#setMinValue">setMinValue</a>() and get this property's value with <a href="tqdial.html#minValue">minValue</a>(). @@ -910,9 +910,9 @@ not shown. TQDial::pageStep <p>This property holds the current page step. -<p>setPageStep() calls the virtual <a href="ntqrangecontrol.html#stepChange">stepChange</a>() function if the new +<p>setPageStep() calls the virtual <a href="tqrangecontrol.html#stepChange">stepChange</a>() function if the new page step is different from the previous setting. -<p> <p>See also <a href="ntqrangecontrol.html#stepChange">stepChange</a>(). +<p> <p>See also <a href="tqrangecontrol.html#stepChange">stepChange</a>(). <p>Set this property's value with <a href="tqdial.html#setPageStep">setPageStep</a>() and get this property's value with <a href="tqdial.html#pageStep">pageStep</a>(). @@ -2590,61 +2590,61 @@ used automatically. - QMessageBox::icon - + TQMessageBox::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 +<li> TQMessageBox::NoIcon +<li> TQMessageBox::Question +<li> TQMessageBox::Information +<li> TQMessageBox::Warning +<li> TQMessageBox::Critical </ul> <p> The actual pixmap used for displaying the icon depends on the current <a href="tqwidget.html#style">GUI style</a>. You can also set -a custom pixmap icon using the <a href="ntqmessagebox.html#iconPixmap-prop">QMessageBox::iconPixmap</a> -property. The default icon is QMessageBox::NoIcon. -<p> <p>See also <a href="ntqmessagebox.html#iconPixmap-prop">iconPixmap</a>. +a custom pixmap icon using the <a href="tqmessagebox.html#iconPixmap-prop">TQMessageBox::iconPixmap</a> +property. The default icon is TQMessageBox::NoIcon. +<p> <p>See also <a href="tqmessagebox.html#iconPixmap-prop">iconPixmap</a>. -<p>Set this property's value with <a href="ntqmessagebox.html#setIcon">setIcon</a>() and get this property's value with <a href="ntqmessagebox.html#icon">icon</a>(). +<p>Set this property's value with <a href="tqmessagebox.html#setIcon">setIcon</a>() and get this property's value with <a href="tqmessagebox.html#icon">icon</a>(). - QMessageBox::iconPixmap - + TQMessageBox::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="ntqmessagebox.html#icon-prop">icon</a>. +<p> <p>See also <a href="tqmessagebox.html#icon-prop">icon</a>. -<p>Set this property's value with <a href="ntqmessagebox.html#setIconPixmap">setIconPixmap</a>() and get this property's value with <a href="ntqmessagebox.html#iconPixmap">iconPixmap</a>(). +<p>Set this property's value with <a href="tqmessagebox.html#setIconPixmap">setIconPixmap</a>() and get this property's value with <a href="tqmessagebox.html#iconPixmap">iconPixmap</a>(). - QMessageBox::text - + TQMessageBox::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="ntqmessagebox.html#textFormat-prop">QMessageBox::textFormat</a>). The default setting is <a href="ntqt.html#TextFormat-enum">AutoText</a>, i.e. +text, depending on the text format setting (<a href="tqmessagebox.html#textFormat-prop">TQMessageBox::textFormat</a>). The default setting is <a href="ntqt.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="tqstring.html#TQString-null">TQString::null</a>. -<p> <p>See also <a href="ntqmessagebox.html#textFormat-prop">textFormat</a>. +<p> <p>See also <a href="tqmessagebox.html#textFormat-prop">textFormat</a>. -<p>Set this property's value with <a href="ntqmessagebox.html#setText">setText</a>() and get this property's value with <a href="ntqmessagebox.html#text">text</a>(). +<p>Set this property's value with <a href="tqmessagebox.html#setText">setText</a>() and get this property's value with <a href="tqmessagebox.html#text">text</a>(). - QMessageBox::textFormat - + TQMessageBox::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="ntqt.html#TextFormat-enum">TQt::TextFormat</a> enum for an explanation of the possible options. <p> The default format is <a href="ntqt.html#TextFormat-enum">AutoText</a>. -<p> <p>See also <a href="ntqmessagebox.html#text-prop">text</a>. +<p> <p>See also <a href="tqmessagebox.html#text-prop">text</a>. -<p>Set this property's value with <a href="ntqmessagebox.html#setTextFormat">setTextFormat</a>() and get this property's value with <a href="ntqmessagebox.html#textFormat">textFormat</a>(). +<p>Set this property's value with <a href="tqmessagebox.html#setTextFormat">setTextFormat</a>() and get this property's value with <a href="tqmessagebox.html#textFormat">textFormat</a>(). @@ -2969,10 +2969,10 @@ FALSE (unchecked). TQScrollBar::lineStep <p>This property holds the line step. -<p>When setting lineStep, the virtual <a href="ntqrangecontrol.html#stepChange">stepChange</a>() function will be +<p>When setting lineStep, the virtual <a href="tqrangecontrol.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="ntqrangecontrol.html#setSteps">setSteps</a>(), <a href="ntqrangecontrol.html#pageStep">QRangeControl::pageStep</a>(), and <a href="ntqrangecontrol.html#setRange">setRange</a>(). +<p> <p>See also <a href="tqrangecontrol.html#setSteps">setSteps</a>(), <a href="tqrangecontrol.html#pageStep">TQRangeControl::pageStep</a>(), and <a href="tqrangecontrol.html#setRange">setRange</a>(). <p>Set this property's value with <a href="tqscrollbar.html#setLineStep">setLineStep</a>() and get this property's value with <a href="tqscrollbar.html#lineStep">lineStep</a>(). @@ -2983,7 +2983,7 @@ setting. <p>This property holds the scroll bar's maximum value. <p>When setting this property, the <a href="tqscrollbar.html#minValue-prop">TQScrollBar::minValue</a> is adjusted if necessary to ensure that the range remains valid. -<p> <p>See also <a href="ntqrangecontrol.html#setRange">setRange</a>(). +<p> <p>See also <a href="tqrangecontrol.html#setRange">setRange</a>(). <p>Set this property's value with <a href="tqscrollbar.html#setMaxValue">setMaxValue</a>() and get this property's value with <a href="tqscrollbar.html#maxValue">maxValue</a>(). @@ -2994,7 +2994,7 @@ adjusted if necessary to ensure that the range remains valid. <p>This property holds the scroll bar's minimum value. <p>When setting this property, the <a href="tqscrollbar.html#maxValue-prop">TQScrollBar::maxValue</a> is adjusted if necessary to ensure that the range remains valid. -<p> <p>See also <a href="ntqrangecontrol.html#setRange">setRange</a>(). +<p> <p>See also <a href="tqrangecontrol.html#setRange">setRange</a>(). <p>Set this property's value with <a href="tqscrollbar.html#setMinValue">setMinValue</a>() and get this property's value with <a href="tqscrollbar.html#minValue">minValue</a>(). @@ -3012,10 +3012,10 @@ adjusted if necessary to ensure that the range remains valid. TQScrollBar::pageStep <p>This property holds the page step. -<p>When setting pageStep, the virtual <a href="ntqrangecontrol.html#stepChange">stepChange</a>() function will be +<p>When setting pageStep, the virtual <a href="tqrangecontrol.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="ntqrangecontrol.html#setSteps">QRangeControl::setSteps</a>(), <a href="tqscrollbar.html#lineStep-prop">lineStep</a>, and <a href="ntqrangecontrol.html#setRange">setRange</a>(). +<p> <p>See also <a href="tqrangecontrol.html#setSteps">TQRangeControl::setSteps</a>(), <a href="tqscrollbar.html#lineStep-prop">lineStep</a>, and <a href="tqrangecontrol.html#setRange">setRange</a>(). <p>Set this property's value with <a href="tqscrollbar.html#setPageStep">setPageStep</a>() and get this property's value with <a href="tqscrollbar.html#pageStep">pageStep</a>(). @@ -3038,7 +3038,7 @@ the slider. <p>This property holds the scroll bar's value. <p>Set this property's value with <a href="tqscrollbar.html#setValue">setValue</a>() and get this property's value with <a href="tqscrollbar.html#value">value</a>(). -<p><p>See also <a href="ntqrangecontrol.html#value">QRangeControl::value</a>() and <a href="ntqrangecontrol.html#prevValue">prevValue</a>(). +<p><p>See also <a href="tqrangecontrol.html#value">TQRangeControl::value</a>() and <a href="tqrangecontrol.html#prevValue">prevValue</a>(). @@ -3142,10 +3142,10 @@ reimplementations. TQSlider::lineStep <p>This property holds the current line step. -<p>When setting lineStep, the virtual <a href="ntqrangecontrol.html#stepChange">stepChange</a>() function will be +<p>When setting lineStep, the virtual <a href="tqrangecontrol.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="ntqrangecontrol.html#setSteps">setSteps</a>(), <a href="ntqrangecontrol.html#pageStep">QRangeControl::pageStep</a>(), and <a href="ntqrangecontrol.html#setRange">setRange</a>(). +<p> <p>See also <a href="tqrangecontrol.html#setSteps">setSteps</a>(), <a href="tqrangecontrol.html#pageStep">TQRangeControl::pageStep</a>(), and <a href="tqrangecontrol.html#setRange">setRange</a>(). <p>Set this property's value with <a href="tqslider.html#setLineStep">setLineStep</a>() and get this property's value with <a href="tqslider.html#lineStep">lineStep</a>(). @@ -3156,7 +3156,7 @@ setting. <p>This property holds the current maximum value of the slider. <p>When setting this property, the <a href="tqslider.html#minValue-prop">TQSlider::minValue</a> is adjusted, if necessary, to ensure that the range remains valid. -<p> <p>See also <a href="ntqrangecontrol.html#setRange">setRange</a>(). +<p> <p>See also <a href="tqrangecontrol.html#setRange">setRange</a>(). <p>Set this property's value with <a href="tqslider.html#setMaxValue">setMaxValue</a>() and get this property's value with <a href="tqslider.html#maxValue">maxValue</a>(). @@ -3167,7 +3167,7 @@ if necessary, to ensure that the range remains valid. <p>This property holds the current minimum value of the slider. <p>When setting this property, the <a href="tqslider.html#maxValue-prop">TQSlider::maxValue</a> is adjusted, if necessary, to ensure that the range remains valid. -<p> <p>See also <a href="ntqrangecontrol.html#setRange">setRange</a>(). +<p> <p>See also <a href="tqrangecontrol.html#setRange">setRange</a>(). <p>Set this property's value with <a href="tqslider.html#setMinValue">setMinValue</a>() and get this property's value with <a href="tqslider.html#minValue">minValue</a>(). @@ -3185,10 +3185,10 @@ if necessary, to ensure that the range remains valid. TQSlider::pageStep <p>This property holds the current page step. -<p>When setting pageStep, the virtual <a href="ntqrangecontrol.html#stepChange">stepChange</a>() function will be +<p>When setting pageStep, the virtual <a href="tqrangecontrol.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="ntqrangecontrol.html#setSteps">QRangeControl::setSteps</a>(), <a href="tqslider.html#lineStep-prop">lineStep</a>, and <a href="ntqrangecontrol.html#setRange">setRange</a>(). +<p> <p>See also <a href="tqrangecontrol.html#setSteps">TQRangeControl::setSteps</a>(), <a href="tqslider.html#lineStep-prop">lineStep</a>, and <a href="tqrangecontrol.html#setRange">setRange</a>(). <p>Set this property's value with <a href="tqslider.html#setPageStep">setPageStep</a>() and get this property's value with <a href="tqslider.html#pageStep">pageStep</a>(). @@ -3200,7 +3200,7 @@ setting. <p>This is a value interval, not a pixel interval. If it is 0, the slider will choose between <a href="tqslider.html#lineStep">lineStep</a>() and <a href="tqslider.html#pageStep">pageStep</a>(). The initial value of tickInterval is 0. -<p> <p>See also <a href="ntqrangecontrol.html#lineStep">QRangeControl::lineStep</a>() and <a href="ntqrangecontrol.html#pageStep">QRangeControl::pageStep</a>(). +<p> <p>See also <a href="tqrangecontrol.html#lineStep">TQRangeControl::lineStep</a>() and <a href="tqrangecontrol.html#pageStep">TQRangeControl::pageStep</a>(). <p>Set this property's value with <a href="tqslider.html#setTickInterval">setTickInterval</a>() and get this property's value with <a href="tqslider.html#tickInterval">tickInterval</a>(). @@ -3234,7 +3234,7 @@ to be the same as before). <p>This property holds the current slider value. <p>Set this property's value with <a href="tqslider.html#setValue">setValue</a>() and get this property's value with <a href="tqslider.html#value">value</a>(). -<p><p>See also <a href="ntqrangecontrol.html#value">QRangeControl::value</a>() and <a href="ntqrangecontrol.html#prevValue">prevValue</a>(). +<p><p>See also <a href="tqrangecontrol.html#value">TQRangeControl::value</a>() and <a href="tqrangecontrol.html#prevValue">prevValue</a>(). @@ -3265,9 +3265,9 @@ The default is <a href="tqspinbox.html#ButtonSymbols-enum">UpDownArrows< <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="tqspinbox.html#setLineStep">setLineStep</a>() function calls the virtual <a href="ntqrangecontrol.html#stepChange">stepChange</a>() function +<p> The <a href="tqspinbox.html#setLineStep">setLineStep</a>() function calls the virtual <a href="tqrangecontrol.html#stepChange">stepChange</a>() function if the new line step is different from the previous setting. -<p> <p>See also <a href="ntqrangecontrol.html#setSteps">QRangeControl::setSteps</a>() and <a href="ntqrangecontrol.html#setRange">setRange</a>(). +<p> <p>See also <a href="tqrangecontrol.html#setSteps">TQRangeControl::setSteps</a>() and <a href="tqrangecontrol.html#setRange">setRange</a>(). <p>Set this property's value with <a href="tqspinbox.html#setLineStep">setLineStep</a>() and get this property's value with <a href="tqspinbox.html#lineStep">lineStep</a>(). @@ -3278,7 +3278,7 @@ if the new line step is different from the previous setting. <p>This property holds the maximum value of the spin box. <p>When setting this property, <a href="tqspinbox.html#minValue-prop">TQSpinBox::minValue</a> is adjusted, if necessary, to ensure that the range remains valid. -<p> <p>See also <a href="ntqrangecontrol.html#setRange">setRange</a>() and <a href="tqspinbox.html#specialValueText-prop">specialValueText</a>. +<p> <p>See also <a href="tqrangecontrol.html#setRange">setRange</a>() and <a href="tqspinbox.html#specialValueText-prop">specialValueText</a>. <p>Set this property's value with <a href="tqspinbox.html#setMaxValue">setMaxValue</a>() and get this property's value with <a href="tqspinbox.html#maxValue">maxValue</a>(). @@ -3289,7 +3289,7 @@ necessary, to ensure that the range remains valid. <p>This property holds the minimum value of the spin box. <p>When setting this property, <a href="tqspinbox.html#maxValue-prop">TQSpinBox::maxValue</a> is adjusted, if necessary, to ensure that the range remains valid. -<p> <p>See also <a href="ntqrangecontrol.html#setRange">setRange</a>() and <a href="tqspinbox.html#specialValueText-prop">specialValueText</a>. +<p> <p>See also <a href="tqrangecontrol.html#setRange">setRange</a>() and <a href="tqspinbox.html#specialValueText-prop">specialValueText</a>. <p>Set this property's value with <a href="tqspinbox.html#setMinValue">setMinValue</a>() and get this property's value with <a href="tqspinbox.html#minValue">minValue</a>(). @@ -3382,7 +3382,7 @@ the <a href="tqspinbox.html#minValue">minValue</a>() if <a href=" <p>This property holds the value of the spin box. <p>Set this property's value with <a href="tqspinbox.html#setValue">setValue</a>() and get this property's value with <a href="tqspinbox.html#value">value</a>(). -<p><p>See also <a href="ntqrangecontrol.html#setValue">QRangeControl::setValue</a>(). +<p><p>See also <a href="tqrangecontrol.html#setValue">TQRangeControl::setValue</a>(). @@ -3396,7 +3396,7 @@ 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="tqspinbox.html#minValue-prop">minValue</a>, <a href="tqspinbox.html#maxValue-prop">maxValue</a>, and <a href="ntqrangecontrol.html#setRange">setRange</a>(). +<p> <p>See also <a href="tqspinbox.html#minValue-prop">minValue</a>, <a href="tqspinbox.html#maxValue-prop">maxValue</a>, and <a href="tqrangecontrol.html#setRange">setRange</a>(). <p>Set this property's value with <a href="tqspinbox.html#setWrapping">setWrapping</a>() and get this property's value with <a href="tqspinbox.html#wrapping">wrapping</a>(). @@ -4438,7 +4438,7 @@ can reimplement the <a href="tqwidget.html#enabledChange">enabledChange< <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="tqwidget.html#enabled-prop">enabled</a>, <a href="tqwidget.html#isEnabledTo">isEnabledTo</a>(), <a href="tqkeyevent.html">TQKeyEvent</a>, <a href="qmouseevent.html">QMouseEvent</a>, and <a href="tqwidget.html#enabledChange">enabledChange</a>(). +<p> <p>See also <a href="tqwidget.html#enabled-prop">enabled</a>, <a href="tqwidget.html#isEnabledTo">isEnabledTo</a>(), <a href="tqkeyevent.html">TQKeyEvent</a>, <a href="tqmouseevent.html">TQMouseEvent</a>, and <a href="tqwidget.html#enabledChange">enabledChange</a>(). <p>Set this property's value with <a href="tqwidget.html#setEnabled">setEnabled</a>() and get this property's value with <a href="tqwidget.html#isEnabled">isEnabled</a>(). diff --git a/doc/html/propertyindex b/doc/html/propertyindex index 99e5c0d99..5cd7b29a7 100644 --- a/doc/html/propertyindex +++ b/doc/html/propertyindex @@ -214,10 +214,10 @@ "TQMainWindow/usesTextLabel" tqmainwindow.html#usesTextLabel-prop "TQMenuBar/defaultUp" tqmenubar.html#defaultUp-prop "TQMenuBar/separator" tqmenubar.html#separator-prop -"QMessageBox/icon" ntqmessagebox.html#icon-prop -"QMessageBox/iconPixmap" ntqmessagebox.html#iconPixmap-prop -"QMessageBox/text" ntqmessagebox.html#text-prop -"QMessageBox/textFormat" ntqmessagebox.html#textFormat-prop +"TQMessageBox/icon" tqmessagebox.html#icon-prop +"TQMessageBox/iconPixmap" tqmessagebox.html#iconPixmap-prop +"TQMessageBox/text" tqmessagebox.html#text-prop +"TQMessageBox/textFormat" tqmessagebox.html#textFormat-prop "TQMultiLineEdit/alignment" tqmultilineedit.html#alignment-prop "TQMultiLineEdit/atBeginning" tqmultilineedit.html#atBeginning-prop "TQMultiLineEdit/atEnd" tqmultilineedit.html#atEnd-prop diff --git a/doc/html/qmacstyle-members.html b/doc/html/qmacstyle-members.html deleted file mode 100644 index 7265e5ce0..000000000 --- a/doc/html/qmacstyle-members.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - -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 deleted file mode 100644 index 97ff9dea4..000000000 --- a/doc/html/qmacstyle.html +++ /dev/null @@ -1,160 +0,0 @@ - - - - - -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 deleted file mode 100644 index 360748b22..000000000 --- a/doc/html/qmacstyle_mac-h.html +++ /dev/null @@ -1,194 +0,0 @@ - - - - - -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 requirements will be met:
      -** http://trolltech.com/products/qt/licenses/licensing/opensource/.
      -** If you are unsure which license is appropriate for your use, please
      -** review the following information:
      -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
      -** or contact the sales department at sales@trolltech.com.
      -**
      -** This file may be used under the terms of the Q Public License as
      -** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
      -** included in the packaging of this file.  Licensees holding valid TQt
      -** Commercial licenses may use this file in accordance with the TQt
      -** Commercial License Agreement provided with the Software.
      -**
      -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
      -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
      -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
      -** herein.
      -**
      -**********************************************************************/
      -
      -#ifndef TQMACSTYLE_MAC_H
      -#define TQMACSTYLE_MAC_H
      -
      -#ifndef QT_H
      -#include "tqwindowsstyle.h"
      -#endif // QT_H
      -
      -#if defined( TQ_WS_MAC ) && !defined( TQT_NO_STYLE_MAC ) 
      -
      -class TQPalette;
      -
      -#if defined(QT_PLUGIN)
      -#define Q_EXPORT_STYLE_MAC
      -#else
      -#define Q_EXPORT_STYLE_MAC TQ_EXPORT
      -#endif
      -
      -class TQMacStylePrivate;
      -
      -class Q_EXPORT_STYLE_MAC TQMacStyle : public TQWindowsStyle
      -{
      -    TQ_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(TQ_DISABLE_COPY)
      -    TQMacStyle( const TQMacStyle & );
      -    TQMacStyle& operator=( const TQMacStyle & );
      -#endif
      -
      -protected:
      -    TQMacStylePrivate *d;
      -};
      -
      -#endif // TQ_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 index 61d9966fb..afb5485a8 100644 --- a/doc/html/qmag-example.html +++ b/doc/html/qmag-example.html @@ -79,12 +79,12 @@ public slots: protected: void paintEvent( TQPaintEvent * ); - void mousePressEvent( TQMouseEvent * ); - void mouseReleaseEvent( TQMouseEvent * ); - void mouseMoveEvent( TQMouseEvent * ); + void mousePressEvent( TQMouseEvent * ); + void mouseReleaseEvent( TQMouseEvent * ); + void mouseMoveEvent( TQMouseEvent * ); void focusOutEvent( TQFocusEvent * ); void timerEvent( TQTimerEvent * ); - void resizeEvent( TQResizeEvent * ); + void resizeEvent( TQResizeEvent * ); private: void grabAround(TQPoint pos); @@ -304,7 +304,7 @@ void MagWidget::grab() } -void MagWidget::mousePressEvent( TQMouseEvent *e ) +void MagWidget::mousePressEvent( TQMouseEvent *e ) { if ( !grabbing ) { // prepare to grab... grabbing = TRUE; @@ -313,18 +313,18 @@ void MagWidget::grab() grabx = -1; graby = -1; } else { // REALLY prepare to grab - grabx = mapToGlobal(e->pos()).x(); - graby = mapToGlobal(e->pos()).y(); + grabx = mapToGlobal(e->pos()).x(); + graby = mapToGlobal(e->pos()).y(); } } -void MagWidget::mouseReleaseEvent( TQMouseEvent * e ) +void MagWidget::mouseReleaseEvent( TQMouseEvent * e ) { if ( grabbing && grabx >= 0 && graby >= 0 ) { grabbing = FALSE; - grabAround(e->pos()); + grabAround(e->pos()); releaseMouse(); } } @@ -364,16 +364,16 @@ void MagWidget::grabAround(TQPoint pos) } -void MagWidget::mouseMoveEvent( TQMouseEvent *e ) +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) ) { + 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; + x = e->pos().x() / z; + y = (e->pos().y() - ( zoom ? zoom->height() : 0 ) - 4) / z; TQString pixelinfo; if ( image.valid(x,y) ) { @@ -414,7 +414,7 @@ void MagWidget::grabAround(TQPoint pos) } -void MagWidget::resizeEvent( TQResizeEvent * ) +void MagWidget::resizeEvent( TQResizeEvent * ) { rgb->setGeometry( 0, height() - rgb->height(), width(), rgb->height() ); grab(); diff --git a/doc/html/qmessagebox-crit.png b/doc/html/qmessagebox-crit.png deleted file mode 100644 index 1fecd57b2..000000000 Binary files a/doc/html/qmessagebox-crit.png and /dev/null differ diff --git a/doc/html/qmessagebox-h.html b/doc/html/qmessagebox-h.html deleted file mode 100644 index ec07d8d21..000000000 --- a/doc/html/qmessagebox-h.html +++ /dev/null @@ -1,268 +0,0 @@ - - - - - -ntqmessagebox.h Include File - - - - - - - -
      - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

      ntqmessagebox.h

      - -

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


      -
      -/****************************************************************************
      -** $Id: qt/ntqmessagebox.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 requirements will be met:
      -** http://trolltech.com/products/qt/licenses/licensing/opensource/.
      -** If you are unsure which license is appropriate for your use, please
      -** review the following information:
      -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
      -** or contact the sales department at sales@trolltech.com.
      -**
      -** This file may be used under the terms of the Q Public License as
      -** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
      -** included in the packaging of this file.  Licensees holding valid TQt
      -** Commercial licenses may use this file in accordance with the TQt
      -** Commercial License Agreement provided with the Software.
      -**
      -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
      -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
      -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
      -** herein.
      -**
      -**********************************************************************/
      -
      -#ifndef TQMESSAGEBOX_H
      -#define TQMESSAGEBOX_H
      -
      -#ifndef QT_H
      -#include "tqdialog.h"
      -#endif // QT_H
      -
      -#ifndef TQT_NO_MESSAGEBOX
      -
      -class  TQLabel;
      -class  TQPushButton;
      -struct TQMessageBoxData;
      -
      -class TQ_EXPORT TQMessageBox : public TQDialog
      -{
      -    TQ_OBJECT
      -    TQ_ENUMS( Icon )
      -    TQ_PROPERTY( TQString text READ text WRITE setText )
      -    TQ_PROPERTY( Icon icon READ icon WRITE setIcon )
      -    TQ_PROPERTY( TQPixmap iconPixmap READ iconPixmap WRITE setIconPixmap )
      -    TQ_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(TQ_DISABLE_COPY)
      -    TQMessageBox( const TQMessageBox & );
      -    TQMessageBox &operator=( const TQMessageBox & );
      -#endif
      -};
      -
      -/*
      -*  Macro to be used at the beginning of main(), e.g.
      -*
      -*   #include <ntqapplication.h>
      -*   #include <ntqmessagebox.h>
      -*   int main( int argc, char**argv )
      -*   {
      -*     QT_REQUIRE_VERSION( argc, argv, "3.0.5" )
      -*     ...
      -*   }
      -*/
      -#define QT_REQUIRE_VERSION( argc, argv, str ) { TQString s=TQString::fromLatin1(str);\
      -TQString sq=TQString::fromLatin1(tqVersion()); 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 ( !tqApp){ int c=0; new \
      -TQApplication(argc,argv);} TQString s = TQApplication::tr("Executable '%1' requires TQt "\
      - "%2, found TQt %3.").arg(TQString::fromLatin1(tqAppName())).arg(TQString::fromLatin1(\
      -str)).arg(TQString::fromLatin1(tqVersion()) ); TQMessageBox::critical( 0, TQApplication::tr(\
      -"Incompatible TQt Library Error" ), s, TQMessageBox::Abort,0 ); tqFatal(s.ascii()); }}
      -
      -
      -#endif // TQT_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 deleted file mode 100644 index bde8f94da..000000000 Binary files a/doc/html/qmessagebox-info.png and /dev/null differ diff --git a/doc/html/qmessagebox-members.html b/doc/html/qmessagebox-members.html deleted file mode 100644 index cd18e8555..000000000 --- a/doc/html/qmessagebox-members.html +++ /dev/null @@ -1,368 +0,0 @@ - - - - - -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 deleted file mode 100644 index b21426c3d..000000000 Binary files a/doc/html/qmessagebox-quest.png and /dev/null differ diff --git a/doc/html/qmessagebox-warn.png b/doc/html/qmessagebox-warn.png deleted file mode 100644 index fe1be23ea..000000000 Binary files a/doc/html/qmessagebox-warn.png and /dev/null differ diff --git a/doc/html/qmetaobject-h.html b/doc/html/qmetaobject-h.html deleted file mode 100644 index a9267cab8..000000000 --- a/doc/html/qmetaobject-h.html +++ /dev/null @@ -1,331 +0,0 @@ - - - - - -ntqmetaobject.h Include File - - - - - - - -
      - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

      ntqmetaobject.h

      - -

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


      -
      -/****************************************************************************
      -** $Id: qt/ntqmetaobject.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 requirements will be met:
      -** http://trolltech.com/products/qt/licenses/licensing/opensource/.
      -** If you are unsure which license is appropriate for your use, please
      -** review the following information:
      -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
      -** or contact the sales department at sales@trolltech.com.
      -**
      -** This file may be used under the terms of the Q Public License as
      -** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
      -** included in the packaging of this file.  Licensees holding valid TQt
      -** Commercial licenses may use this file in accordance with the TQt
      -** Commercial License Agreement provided with the Software.
      -**
      -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
      -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
      -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
      -** herein.
      -**
      -**********************************************************************/
      -
      -#ifndef TQMETAOBJECT_H
      -#define TQMETAOBJECT_H
      -
      -#ifndef QT_H
      -#include "tqconnection.h"
      -#include "tqstrlist.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 TQT_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 TQT_NO_PROPERTIES
      -
      -class TQ_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 // TQT_NO_PROPERTIES
      -
      -struct TQClassInfo				// class info meta data
      -{
      -    const char* name;				// - name of the info
      -    const char* value;				// - value of the info
      -};
      -
      -class TQ_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 TQT_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 TQT_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 (*tqt_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 TQT_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 TQT_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 TQT_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 (*tqt_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 TQT_NO_PROPERTIES
      -    int propertyoffset;
      -public:
      -    bool tqt_static_property( TQObject* o, int id, int f, TQVariant* v);
      -private:
      -    friend class TQMetaProperty;
      -#endif
      -
      -private:	// Disabled copy constructor and operator=
      -#if defined(TQ_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 TQT_NO_PROPERTIES
      -inline int TQMetaObject::propertyOffset() const
      -{ return propertyoffset; }
      -#endif
      -
      -typedef TQMetaObject *(*TQtStaticMetaObjectFunction)();
      -
      -class TQ_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 deleted file mode 100644 index 449ea34d2..000000000 --- a/doc/html/qmetaobject-members.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - -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/qmetaproperty-members.html b/doc/html/qmetaproperty-members.html deleted file mode 100644 index 48e1a30c6..000000000 --- a/doc/html/qmetaproperty-members.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - -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 deleted file mode 100644 index 284b16dd7..000000000 --- a/doc/html/qmetaproperty.html +++ /dev/null @@ -1,173 +0,0 @@ - - - - - -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 <ntqmetaobject.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/qmouseevent-members.html b/doc/html/qmouseevent-members.html deleted file mode 100644 index dc976eb36..000000000 --- a/doc/html/qmouseevent-members.html +++ /dev/null @@ -1,61 +0,0 @@ - - - - - -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 deleted file mode 100644 index cf36a1487..000000000 --- a/doc/html/qmouseevent.html +++ /dev/null @@ -1,233 +0,0 @@ - - - - - -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 <tqevent.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 deleted file mode 100644 index f95f13b07..000000000 --- a/doc/html/qmoveevent-members.html +++ /dev/null @@ -1,51 +0,0 @@ - - - - - -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 deleted file mode 100644 index eae9a1954..000000000 --- a/doc/html/qmoveevent.html +++ /dev/null @@ -1,82 +0,0 @@ - - - - - -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 <tqevent.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/qnamespace-h.html b/doc/html/qnamespace-h.html deleted file mode 100644 index d1ac1e763..000000000 --- a/doc/html/qnamespace-h.html +++ /dev/null @@ -1,968 +0,0 @@ - - - - - -ntqnamespace.h Include File - - - - - - - -
      - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

      ntqnamespace.h

      - -

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


      -
      -/****************************************************************************
      -** $Id: qt/ntqnamespace.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 requirements will be met:
      -** http://trolltech.com/products/qt/licenses/licensing/opensource/.
      -** If you are unsure which license is appropriate for your use, please
      -** review the following information:
      -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
      -** or contact the sales department at sales@trolltech.com.
      -**
      -** This file may be used under the terms of the Q Public License as
      -** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
      -** included in the packaging of this file.  Licensees holding valid TQt
      -** Commercial licenses may use this file in accordance with the TQt
      -** Commercial License Agreement provided with the Software.
      -**
      -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
      -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
      -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
      -** herein.
      -**
      -**********************************************************************/
      -
      -#ifndef TQNAMESPACE_H
      -#define TQNAMESPACE_H
      -
      -#ifndef QT_H
      -#include "tqglobal.h"
      -#endif // QT_H
      -
      -
      -class TQColor;
      -class TQCursor;
      -
      -
      -class TQ_EXPORT TQt {
      -public:
      -    static const TQColor & color0;
      -    static const TQColor & color1;
      -    static const TQColor & black;
      -    static const TQColor & white;
      -    static const TQColor & darkGray;
      -    static const TQColor & gray;
      -    static const TQColor & lightGray;
      -    static const TQColor & red;
      -    static const TQColor & green;
      -    static const TQColor & blue;
      -    static const TQColor & cyan;
      -    static const TQColor & magenta;
      -    static const TQColor & yellow;
      -    static const TQColor & darkRed;
      -    static const TQColor & darkGreen;
      -    static const TQColor & darkBlue;
      -    static const TQColor & darkCyan;
      -    static const TQColor & darkMagenta;
      -    static const TQColor & darkYellow;
      -
      -    // documented in tqevent.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 tqobject.cpp
      -    // ideally would start at 1, as in TQSizePolicy, but that breaks other things
      -    enum Orientation {
      -        Horizontal = 0,
      -	Vertical
      -    };
      -
      -    // documented in tqlistview.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 tqpainter.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 tqpainter.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 tqwidget.cpp
      -    typedef uint WState;
      -
      -    // TQWidget state flags (internal, barely documented in tqwidget.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 tqwidget.cpp
      -    typedef uint WFlags;
      -
      -    // documented in tqwidget.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(TQ_WS_X11)
      -	WX11BypassWM		= 0x01000000,
      -	WWinOwnDC		= 0x00000000,
      -	WMacNoSheet             = 0x00000000,
      -        WMacDrawer              = 0x00000000,
      -#elif defined(TQ_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(TQ_WS_X11)
      -        WStyle_Splash           = 0x20000000,
      -#else
      -	WStyle_Splash           = WStyle_NoBorder | WMacNoSheet | WStyle_Tool | WWinOwnDC,
      -#endif
      -	WNoAutoErase		= WRepaintNoErase | WResizeNoErase
      -#ifndef TQT_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 requirements.
      -    // Documented in tqimage.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 tqpainter.cpp
      -    enum BGMode	{				// background mode
      -	TransparentMode,
      -	OpaqueMode
      -    };
      -
      -#ifndef TQT_NO_COMPAT
      -    // documented in tqpainter.cpp
      -    enum PaintUnit {				// paint unit
      -	PixelUnit,
      -	LoMetricUnit, // OBSOLETE
      -	HiMetricUnit, // OBSOLETE
      -	LoEnglishUnit, // OBSOLETE
      -	HiEnglishUnit, // OBSOLETE
      -	TwipsUnit // OBSOLETE
      -    };
      -#endif
      -
      -    // documented in tqstyle.cpp
      -#ifdef TQT_NO_COMPAT
      -    enum GUIStyle {
      -	WindowsStyle = 1,     // ### TQt 4.0: either remove the obsolete enums or clean up compat vs.
      -	MotifStyle = 4        // ### TQT_NO_COMPAT by reordering or combination into one enum.
      -    };
      -#else
      -    enum GUIStyle {
      -	MacStyle, // OBSOLETE
      -	WindowsStyle,
      -	Win3Style, // OBSOLETE
      -	PMStyle, // OBSOLETE
      -	MotifStyle
      -    };
      -#endif
      -
      -    // documented in tqkeysequence.cpp
      -    enum SequenceMatch {
      -	NoMatch,
      -	PartialMatch,
      -	Identical
      -    };
      -
      -    // documented in tqevent.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 tqevent.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_MonBrightnessUp        = 0x010b2,
      -	Key_MonBrightnessDown      = 0x010b3,
      -	Key_KeyboardLightOnOff     = 0x010b4,
      -	Key_KeyboardBrightnessUp   = 0x010b5,
      -	Key_KeyboardBrightnessDown = 0x010b6,
      -
      -	Key_MediaLast = 0x1fff,
      -
      -	Key_unknown = 0xffff
      -    };
      -
      -    // documented in tqcommonstyle.cpp
      -    enum ArrowType {
      -	UpArrow,
      -	DownArrow,
      -	LeftArrow,
      -	RightArrow
      -    };
      -
      -    // documented in tqpainter.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 tqpainter.cpp
      -    enum PenStyle { // pen style
      -	NoPen,
      -	SolidLine,
      -	DashLine,
      -	DotLine,
      -	DashDotLine,
      -	DashDotDotLine,
      -	MPenStyle = 0x0f
      -    };
      -
      -    // documented in tqpainter.cpp
      -    enum PenCapStyle { // line endcap style
      -	FlatCap = 0x00,
      -	SquareCap = 0x10,
      -	RoundCap = 0x20,
      -	MPenCapStyle = 0x30
      -    };
      -
      -    // documented in tqpainter.cpp
      -    enum PenJoinStyle { // line join style
      -	MiterJoin = 0x00,
      -	BevelJoin = 0x40,
      -	RoundJoin = 0x80,
      -	MPenJoinStyle = 0xc0
      -    };
      -
      -    // documented in tqpainter.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 tqstyle.cpp
      -    enum UIEffect {
      -	UI_General,
      -	UI_AnimateMenu,
      -	UI_FadeMenu,
      -	UI_AnimateCombo,
      -	UI_AnimateTooltip,
      -	UI_FadeTooltip,
      -	UI_AnimateToolBox
      -    };
      -
      -    // documented in tqcursor.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
      -
      -    static const TQCursor & arrowCursor;	// standard arrow cursor
      -    static const TQCursor & upArrowCursor;	// upwards arrow
      -    static const TQCursor & crossCursor;	// crosshair
      -    static const TQCursor & waitCursor;	// hourglass/watch
      -    static const TQCursor & ibeamCursor;	// ibeam/text entry
      -    static const TQCursor & sizeVerCursor;	// vertical resize
      -    static const TQCursor & sizeHorCursor;	// horizontal resize
      -    static const TQCursor & sizeBDiagCursor;	// diagonal resize (/)
      -    static const TQCursor & sizeFDiagCursor;	// diagonal resize (\)
      -    static const TQCursor & sizeAllCursor;	// all directions resize
      -    static const TQCursor & blankCursor;	// blank/invisible cursor
      -    static const TQCursor & splitVCursor;	// vertical bar with left-right
      -						// arrows
      -    static const TQCursor & splitHCursor;	// horizontal bar with up-down
      -						// arrows
      -    static const TQCursor & pointingHandCursor;	// pointing hand
      -    static const TQCursor & forbiddenCursor;	// forbidden cursor (slashed circle)
      -    static const TQCursor & whatsThisCursor;  // arrow with a question mark
      -    static const TQCursor & busyCursor;	// arrow with hourglass
      -
      -
      -    enum TextFormat {
      -	PlainText,
      -	RichText,
      -	AutoText,
      -	LogText
      -    };
      -
      -    // Documented in tqtextedit.cpp
      -    enum AnchorAttribute {
      -	AnchorName,
      -	AnchorHref
      -    };
      -
      -    // Documented in tqmainwindow.cpp
      -    enum Dock {
      -	DockUnmanaged,
      -	DockTornOff,
      -	DockTop,
      -	DockBottom,
      -	DockRight,
      -	DockLeft,
      -	DockMinimized
      -#ifndef TQT_NO_COMPAT
      -        ,
      -	Unmanaged = DockUnmanaged,
      -	TornOff = DockTornOff,
      -	Top = DockTop,
      -	Bottom = DockBottom,
      -	Right = DockRight,
      -	Left = DockLeft,
      -	Minimized = DockMinimized
      -#endif
      -    };
      -    // compatibility
      -    typedef Dock ToolBarDock;
      -
      -    // documented in tqdatetime.cpp
      -    enum DateFormat {
      -	TextDate,      // default TQt
      -	ISODate,       // ISO 8601
      -	LocalDate      // locale dependent
      -    };
      -
      -    // documented in tqdatetime.cpp
      -    enum TimeSpec {
      -	LocalTime,
      -	UTC
      -    };
      -
      -    // documented in tqwidget.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 tqstring.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 tqtabwidget.cpp
      -    enum Corner {
      -	TopLeft     = 0x00000,
      -	TopRight    = 0x00001,
      -	BottomLeft  = 0x00002,
      -	BottomRight = 0x00003
      -    };
      -
      -    // "handle" type for system objects. Documented as \internal in
      -    // qapplication.cpp
      -#if defined(TQ_WS_MAC)
      -    typedef void * HANDLE;
      -#elif defined(TQ_WS_WIN)
      -    typedef void *HANDLE;
      -#elif defined(TQ_WS_X11)
      -    typedef unsigned long HANDLE;
      -#endif
      -};
      -
      -
      -class TQ_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/qnp-h.html b/doc/html/qnp-h.html deleted file mode 100644 index 9a1c51032..000000000 --- a/doc/html/qnp-h.html +++ /dev/null @@ -1,231 +0,0 @@ - - - - - -ntqnp.h Include File - - - - - - - -
      - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

      ntqnp.h

      - -

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


      -
      -/****************************************************************************
      -** $Id: qt/ntqnp.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 requirements will be met:
      -** http://trolltech.com/products/qt/licenses/licensing/opensource/.
      -** If you are unsure which license is appropriate for your use, please
      -** review the following information:
      -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
      -** or contact the sales department at sales@trolltech.com.
      -**
      -** This file may be used under the terms of the Q Public License as
      -** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
      -** included in the packaging of this file.  Licensees holding valid TQt
      -** Commercial licenses may use this file in accordance with the TQt
      -** Commercial License Agreement provided with the Software.
      -**
      -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
      -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
      -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
      -** herein.
      -**
      -**********************************************************************/
      -
      -#ifndef TQNP_H
      -#define TQNP_H
      -
      -#ifndef QT_H
      -#include "tqwidget.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 {
      -    TQ_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 {
      -    TQ_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 deleted file mode 100644 index ec434b9da..000000000 --- a/doc/html/qnpinstance-members.html +++ /dev/null @@ -1,112 +0,0 @@ - - - - - -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 deleted file mode 100644 index d3b7343e3..000000000 --- a/doc/html/qnpinstance.html +++ /dev/null @@ -1,321 +0,0 @@ - - - - - -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 <ntqnp.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 required (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 require 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 requires 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 requires a window, this function should -return a derived class of TQNPWidget that provides the required -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 deleted file mode 100644 index 1ea81193e..000000000 --- a/doc/html/qnplugin-members.html +++ /dev/null @@ -1,58 +0,0 @@ - - - - - -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 deleted file mode 100644 index 5bbfa8220..000000000 --- a/doc/html/qnplugin.html +++ /dev/null @@ -1,181 +0,0 @@ - - - - - -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 <ntqnp.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 require 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 require 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 deleted file mode 100644 index 5ef10701b..000000000 --- a/doc/html/qnpstream-members.html +++ /dev/null @@ -1,58 +0,0 @@ - - - - - -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 deleted file mode 100644 index 04c37fb22..000000000 --- a/doc/html/qnpstream.html +++ /dev/null @@ -1,130 +0,0 @@ - - - - - -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 <ntqnp.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 deleted file mode 100644 index b6abd2e79..000000000 --- a/doc/html/qnpwidget-members.html +++ /dev/null @@ -1,340 +0,0 @@ - - - - - -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 deleted file mode 100644 index 501776a1c..000000000 --- a/doc/html/qnpwidget.html +++ /dev/null @@ -1,127 +0,0 @@ - - - - - -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 <ntqnp.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 required. 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/qprintdlg-m.png b/doc/html/qprintdlg-m.png deleted file mode 100644 index dff011679..000000000 Binary files a/doc/html/qprintdlg-m.png and /dev/null differ diff --git a/doc/html/qrangecontrol-h.html b/doc/html/qrangecontrol-h.html deleted file mode 100644 index 0fa779b10..000000000 --- a/doc/html/qrangecontrol-h.html +++ /dev/null @@ -1,239 +0,0 @@ - - - - - -ntqrangecontrol.h Include File - - - - - - - -
      - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

      ntqrangecontrol.h

      - -

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


      -
      -/****************************************************************************
      -** $Id: qt/ntqrangecontrol.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 requirements will be met:
      -** http://trolltech.com/products/qt/licenses/licensing/opensource/.
      -** If you are unsure which license is appropriate for your use, please
      -** review the following information:
      -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
      -** or contact the sales department at sales@trolltech.com.
      -**
      -** This file may be used under the terms of the Q Public License as
      -** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
      -** included in the packaging of this file.  Licensees holding valid TQt
      -** Commercial licenses may use this file in accordance with the TQt
      -** Commercial License Agreement provided with the Software.
      -**
      -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
      -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
      -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
      -** herein.
      -**
      -**********************************************************************/
      -
      -#ifndef TQRANGECONTROL_H
      -#define TQRANGECONTROL_H
      -
      -#ifndef QT_H
      -#include "tqglobal.h"
      -#include "tqframe.h"
      -#endif // QT_H
      -
      -#ifndef TQT_NO_RANGECONTROL
      -
      -
      -class TQRangeControlPrivate;
      -
      -
      -class TQ_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(TQ_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 // TQT_NO_RANGECONTROL
      -
      -#ifndef TQT_NO_SPINWIDGET
      -
      -class TQSpinWidgetPrivate;
      -class TQ_EXPORT TQSpinWidget : public TQWidget
      -{
      -    TQ_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 TQT_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(TQ_DISABLE_COPY)
      -    TQSpinWidget( const TQSpinWidget& );
      -    TQSpinWidget& operator=( const TQSpinWidget& );
      -#endif
      -};
      -
      -#endif // TQT_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 deleted file mode 100644 index e28178dd6..000000000 --- a/doc/html/qrangecontrol-members.html +++ /dev/null @@ -1,70 +0,0 @@ - - - - - -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/qresizeevent-members.html b/doc/html/qresizeevent-members.html deleted file mode 100644 index f5d1705c5..000000000 --- a/doc/html/qresizeevent-members.html +++ /dev/null @@ -1,51 +0,0 @@ - - - - - -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 deleted file mode 100644 index 685271264..000000000 --- a/doc/html/qresizeevent.html +++ /dev/null @@ -1,82 +0,0 @@ - - - - - -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 <tqevent.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/qt-members.html b/doc/html/qt-members.html index c1e3db1b3..52976cb51 100644 --- a/doc/html/qt-members.html +++ b/doc/html/qt-members.html @@ -1,5 +1,5 @@ - + diff --git a/doc/html/qt.dcf b/doc/html/qt.dcf index b80661c85..d84152789 100644 --- a/doc/html/qt.dcf +++ b/doc/html/qt.dcf @@ -4361,17 +4361,17 @@
      -
      - QMacStyle - FocusRectPolicy - WidgetSizePolicy - focusRectPolicy - setFocusRectPolicy - setWidgetSizePolicy - widgetSizePolicy - ~QMacStyle -
      -
      +
      + TQMacStyle + FocusRectPolicy + WidgetSizePolicy + focusRectPolicy + setFocusRectPolicy + setWidgetSizePolicy + widgetSizePolicy + ~TQMacStyle +
      +
      TQMainWindow @@ -4603,72 +4603,72 @@
      -
      - QMessageBox - Icon - about - aboutTQt - 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 -
      -
      +
      + TQMessageBox + Icon + about + aboutTQt + adjustSize + buttonText + critical + icon + icon + iconPixmap + iconPixmap + information + question + setButtonText + setIcon + setIconPixmap + setText + setTextFormat + standardIcon + text + text + textFormat + textFormat + warning + ~TQMessageBox +
      +
      +
      +
      + TQMetaObject + classInfo + className + findProperty + inherits + numClassInfo + numProperties + numSignals + numSlots + property + propertyNames + signalNames + slotNames + superClass + superClassName +
      +
      +
      +
      + TQMetaProperty + designable + enumKeys + isEnumType + isSetType + keyToValue + keysToValue + name + reset + scriptable + stored + type + valueToKey + valueToKeys + writable +
      +
      TQMimeSource @@ -4738,28 +4738,28 @@
      -
      - QMouseEvent - accept - button - globalPos - globalX - globalY - ignore - isAccepted - pos - state - stateAfter - x - y -
      +
      + TQMouseEvent + accept + button + globalPos + globalX + globalY + ignore + isAccepted + pos + state + stateAfter + x + y +
      -
      - QMoveEvent - oldPos - pos -
      +
      + TQMoveEvent + oldPos + pos +
      @@ -4909,77 +4909,77 @@
      -
      - 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 -
      -
      +
      + TQNPInstance + 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 + ~TQNPInstance +
      +
      +
      +
      + TQNPlugin + actual + create + getJavaClass + getJavaEnv + getMIMEDescription + getPluginDescriptionString + getPluginNameString + getVersionInfo + newInstance + unuseJavaClass + ~TQNPlugin +
      +
      +
      +
      + TQNPStream + complete + end + instance + lastModified + okay + requestRead + seekable + type + url + write + ~TQNPStream +
      +
      +
      +
      + TQNPWidget + enterInstance + instance + leaveInstance + ~TQNPWidget +
      +
      TQObject @@ -5793,33 +5793,33 @@
      -
      - QRangeControl - addLine - addPage - bound - directSetValue - lineStep - maxValue - minValue - pageStep - positionFromValue - prevValue - rangeChange - setMaxValue - setMinValue - setRange - setSteps - setValue - stepChange - subtractLine - subtractPage - value - valueChange - valueFromPosition - ~QRangeControl -
      -
      +
      + TQRangeControl + addLine + addPage + bound + directSetValue + lineStep + maxValue + minValue + pageStep + positionFromValue + prevValue + rangeChange + setMaxValue + setMinValue + setRange + setSteps + setValue + stepChange + subtractLine + subtractPage + value + valueChange + valueFromPosition + ~TQRangeControl +
      +
      TQRect @@ -5962,11 +5962,11 @@
      -
      - QResizeEvent - oldSize - size -
      +
      + TQResizeEvent + oldSize + size +
      @@ -7253,7 +7253,7 @@ WindowState WindowsVersion
      -
      +
      TQTab diff --git a/doc/html/qwerty-example.html b/doc/html/qwerty-example.html index c516945c4..e2319aedf 100644 --- a/doc/html/qwerty-example.html +++ b/doc/html/qwerty-example.html @@ -72,7 +72,7 @@ public slots: void toLower(); void font(); protected: - void resizeEvent( TQResizeEvent * ); + void resizeEvent( TQResizeEvent * ); void closeEvent( TQCloseEvent * ); private slots: @@ -115,7 +115,7 @@ private: #include <tqpopupmenu.h> #include <tqtextstream.h> #include <tqpainter.h> -#include <ntqmessagebox.h> +#include <tqmessagebox.h> #include <tqpaintdevicemetrics.h> #include <tqptrlist.h> #include <tqfontdialog.h> @@ -275,7 +275,7 @@ void Editor::load( const TQString& fileName, int l=f.readBlock(buffer,l); TQTextCodec* codec = TQTextCodec::codecForContent(buffer, l); if ( codec ) { - TQMessageBox::information(this,"Encoding",TQString("Codec: ")+codec->name()); + TQMessageBox::information(this,"Encoding",TQString("Codec: ")+codec->name()); t.setCodec( codec ); } } @@ -330,7 +330,7 @@ void Editor::addEncoding() if (TQTextCodec::loadCharmap(&f)) { rebuildCodecList(); } else { - TQMessageBox::warning(0,"Charmap error", + 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" @@ -353,7 +353,7 @@ bool Editor::saveAs( const TQStringTQFile f( fileName ); if ( no_writing || !f.open( IO_WriteOnly ) ) { - TQMessageBox::warning(this,"I/O Error", + TQMessageBox::warning(this,"I/O Error", TQString("The file could not be opened.\n\n") +fileName); return FALSE; @@ -406,7 +406,7 @@ void Editor::print() #endif } -void Editor::resizeEvent( TQResizeEvent * ) +void Editor::resizeEvent( TQResizeEvent * ) { if ( e && m ) e->setGeometry( 0, m->height(), width(), height() - m->height() ); @@ -417,7 +417,7 @@ void Editor::resizeEvent( event->accept(); if ( changed ) { // the text has been changed - switch ( TQMessageBox::warning( this, "Qwerty", + switch ( TQMessageBox::warning( this, "Qwerty", "Save changes to Document?", tr("&Yes"), tr("&No"), diff --git a/doc/html/qwheelevent.html b/doc/html/qwheelevent.html index 1dfa32e51..8c625a4d4 100644 --- a/doc/html/qwheelevent.html +++ b/doc/html/qwheelevent.html @@ -69,7 +69,7 @@ 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. +

      See also TQMouseEvent, TQWidget::grabMouse(), and Event Classes.


      Member Function Documentation

      TQWheelEvent::TQWheelEvent ( const TQPoint & pos, int delta, int state, Orientation orient = Vertical ) diff --git a/doc/html/qwindowdefs-h.html b/doc/html/qwindowdefs-h.html index 0041b791d..824698e82 100644 --- a/doc/html/qwindowdefs-h.html +++ b/doc/html/qwindowdefs-h.html @@ -81,7 +81,7 @@ body { background: #ffffff; color: black; } #ifndef QT_H #include "tqobjectdefs.h" #include "tqstring.h" -#include "ntqnamespace.h" +#include "tqnamespace.h" #endif // QT_H // Class forward definitions diff --git a/doc/html/scribble-example.html b/doc/html/scribble-example.html index c09808ddb..b9c9ec1bf 100644 --- a/doc/html/scribble-example.html +++ b/doc/html/scribble-example.html @@ -88,10 +88,10 @@ public: void clearScreen(); protected: - void mousePressEvent( TQMouseEvent *e ); - void mouseReleaseEvent( TQMouseEvent *e ); - void mouseMoveEvent( TQMouseEvent *e ); - void resizeEvent( TQResizeEvent *e ); + void mousePressEvent( TQMouseEvent *e ); + void mouseReleaseEvent( TQMouseEvent *e ); + void mouseMoveEvent( TQMouseEvent *e ); + void resizeEvent( TQResizeEvent *e ); void paintEvent( TQPaintEvent *e ); TQPen pen; @@ -185,18 +185,18 @@ void Canvas::clearScreen() repaint( FALSE ); } -void Canvas::mousePressEvent( TQMouseEvent *e ) +void Canvas::mousePressEvent( TQMouseEvent *e ) { mousePressed = TRUE; - polyline[2] = polyline[1] = polyline[0] = e->pos(); + polyline[2] = polyline[1] = polyline[0] = e->pos(); } -void Canvas::mouseReleaseEvent( TQMouseEvent * ) +void Canvas::mouseReleaseEvent( TQMouseEvent * ) { mousePressed = FALSE; } -void Canvas::mouseMoveEvent( TQMouseEvent *e ) +void Canvas::mouseMoveEvent( TQMouseEvent *e ) { if ( mousePressed ) { TQPainter painter; @@ -204,7 +204,7 @@ void Canvas::clearScreen() painter.setPen( pen ); polyline[2] = polyline[1]; polyline[1] = polyline[0]; - polyline[0] = e->pos(); + polyline[0] = e->pos(); painter.drawPolyline( polyline ); painter.end(); @@ -219,7 +219,7 @@ void Canvas::clearScreen() } } -void Canvas::resizeEvent( TQResizeEvent *e ) +void Canvas::resizeEvent( TQResizeEvent *e ) { TQWidget::resizeEvent( e ); diff --git a/doc/html/scrollview-example.html b/doc/html/scrollview-example.html index 14372556c..0414b843b 100644 --- a/doc/html/scrollview-example.html +++ b/doc/html/scrollview-example.html @@ -54,7 +54,7 @@ optimized for very large contents. #include <tqpushbutton.h> #include <tqpainter.h> #include <tqpixmap.h> -#include <ntqmessagebox.h> +#include <tqmessagebox.h> #include <tqlayout.h> #include <tqlabel.h> #include <tqmultilineedit.h> diff --git a/doc/html/showimg-example.html b/doc/html/showimg-example.html index d259cd646..5a0e00f32 100644 --- a/doc/html/showimg-example.html +++ b/doc/html/showimg-example.html @@ -67,10 +67,10 @@ public: bool loadImage( const TQString& ); protected: void paintEvent( TQPaintEvent * ); - void resizeEvent( TQResizeEvent * ); - void mousePressEvent( TQMouseEvent * ); - void mouseReleaseEvent( TQMouseEvent * ); - void mouseMoveEvent( TQMouseEvent * ); + void resizeEvent( TQResizeEvent * ); + void mousePressEvent( TQMouseEvent * ); + void mouseReleaseEvent( TQMouseEvent * ); + void mouseMoveEvent( TQMouseEvent * ); private: void scale(); @@ -78,7 +78,7 @@ private: bool smooth() const; bool useColorContext() const; int alloc_context; - bool convertEvent( TQMouseEvent* e, int& x, int& y ); + bool convertEvent( TQMouseEvent* e, int& x, int& y ); TQString filename; TQImage image; // the loaded image TQPixmap pm; // the converted pixmap @@ -149,7 +149,7 @@ private slots: #include "imagetexteditor.h" #include <tqmenubar.h> #include <tqfiledialog.h> -#include <ntqmessagebox.h> +#include <tqmessagebox.h> #include <tqpopupmenu.h> #include <tqlabel.h> #include <tqpainter.h> @@ -430,7 +430,7 @@ void ImageViewer::saveImage( int item ) this, filename); if ( !savefilename.isEmpty() ) if ( !image.save( savefilename, fmt ) ) - TQMessageBox::warning( this, "Save failed", "Error saving file" ); + TQMessageBox::warning( this, "Save failed", "Error saving file" ); } /* @@ -443,7 +443,7 @@ void ImageViewer::savePixmap( int item ) TQString::null, this, filename); if ( !savefilename.isEmpty() ) if ( !pmScaled.save( savefilename, fmt ) ) - TQMessageBox::warning( this, "Save failed", "Error saving file" ); + TQMessageBox::warning( this, "Save failed", "Error saving file" ); } @@ -595,7 +595,7 @@ void ImageViewer::scale() scale() to fit the pixmap to the new widget size. */ -void ImageViewer::resizeEvent( TQResizeEvent * ) +void ImageViewer::resizeEvent( TQResizeEvent * ) { status->setGeometry(0, height() - status->height(), width(), status->height()); @@ -613,12 +613,12 @@ void ImageViewer::scale() erase(); } -bool ImageViewer::convertEvent( TQMouseEvent* e, int& x, int& y) +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; + 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; @@ -629,12 +629,12 @@ bool ImageViewer::convertEvent( TQ return FALSE; } -void ImageViewer::mousePressEvent( TQMouseEvent *e ) +void ImageViewer::mousePressEvent( TQMouseEvent *e ) { may_be_other = convertEvent(e, clickx, clicky); } -void ImageViewer::mouseReleaseEvent( TQMouseEvent * ) +void ImageViewer::mouseReleaseEvent( TQMouseEvent * ) { if ( may_be_other ) other = this; @@ -643,11 +643,11 @@ void ImageViewer::mousePressEvent( < /* Record the pixel position of interest. */ -void ImageViewer::mouseMoveEvent( TQMouseEvent *e ) +void ImageViewer::mouseMoveEvent( TQMouseEvent *e ) { if (convertEvent(e,pickx,picky)) { updateStatus(); - if ((e->state()&LeftButton)) { + if ((e->state()&LeftButton)) { may_be_other = FALSE; if ( clickx >= 0 && other) { copyFrom(other); @@ -687,7 +687,7 @@ void ImageViewer::giveHelp() helptext += TQImage::inputFormatList().join(", "); helptext += "</blockquote>"; - helpmsg = new TQMessageBox( "Help", helptext, + helpmsg = new TQMessageBox( "Help", helptext, TQMessageBox::Information, TQMessageBox::Ok, 0, 0, 0, 0, FALSE ); } helpmsg->show(); diff --git a/doc/html/signalsandslots.html b/doc/html/signalsandslots.html index 644a15b3a..1ea4a9f15 100644 --- a/doc/html/signalsandslots.html +++ b/doc/html/signalsandslots.html @@ -203,7 +203,7 @@ 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 +slots designed specifically for TQRangeControl. Something as simple as the program in Tutorial #1 part 5 would be impossible.

      Slots diff --git a/doc/html/simple-application-example.html b/doc/html/simple-application-example.html index 2b51c98b2..108859a6f 100644 --- a/doc/html/simple-application-example.html +++ b/doc/html/simple-application-example.html @@ -113,7 +113,7 @@ private: #include <tqfile.h> #include <tqfiledialog.h> #include <tqstatusbar.h> -#include <ntqmessagebox.h> +#include <tqmessagebox.h> #include <tqprinter.h> #include <ntqapplication.h> #include <tqaccel.h> @@ -354,7 +354,7 @@ void ApplicationWindow::print() return; } - switch( TQMessageBox::information( this, "TQt Application Example", + switch( TQMessageBox::information( this, "TQt Application Example", "Do you want to save the changes" " to the document?", "Yes", "No", "Cancel", @@ -376,7 +376,7 @@ void ApplicationWindow::print() void ApplicationWindow::about() { - TQMessageBox::about( this, "TQt Application Example", + TQMessageBox::about( this, "TQt Application Example", "This example demonstrates simple use of " "TQMainWindow,\nTQMenuBar and TQToolBar."); } @@ -384,7 +384,7 @@ void ApplicationWindow::about() void ApplicationWindow::aboutTQt() { - TQMessageBox::aboutTQt( this, "TQt Application Example" ); + TQMessageBox::aboutTQt( this, "TQt Application Example" ); } diff --git a/doc/html/simple-application.html b/doc/html/simple-application.html index 165f1971a..9713605b6 100644 --- a/doc/html/simple-application.html +++ b/doc/html/simple-application.html @@ -514,7 +514,7 @@ close means that the window is going away for good.

      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",
      +

              switch( TQMessageBox::information( this, "TQt Application Example",
                                                 "Do you want to save the changes"
                                                 " to the document?",
                                                 "Yes", "No", "Cancel",
      @@ -546,14 +546,14 @@ simple.
       

      Last but not least we implement the slots used by the help menu entries.

          void ApplicationWindow::about()
           {
      -        TQMessageBox::about( this, "TQt Application Example",
      +        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" );
      +        TQMessageBox::aboutTQt( this, "TQt Application Example" );
           }
       

      These two slots use ready-made "about" functions to provide some diff --git a/doc/html/simple_dd-example.html b/doc/html/simple_dd-example.html index 0a3a9c159..d1964f548 100644 --- a/doc/html/simple_dd-example.html +++ b/doc/html/simple_dd-example.html @@ -67,8 +67,8 @@ public: // Low-level drag and drop void dragEnterEvent( TQDragEnterEvent *evt ); void dropEvent( TQDropEvent *evt ); - void mousePressEvent( TQMouseEvent *evt ); - void mouseMoveEvent( TQMouseEvent * ); + void mousePressEvent( TQMouseEvent *evt ); + void mouseMoveEvent( TQMouseEvent * ); private: int dragging; }; @@ -205,14 +205,14 @@ const char* green_icon[]={ } -void DDListBox::mousePressEvent( TQMouseEvent *evt ) +void DDListBox::mousePressEvent( TQMouseEvent *evt ) { TQListBox::mousePressEvent( evt ); dragging = TRUE; } -void DDListBox::mouseMoveEvent( TQMouseEvent * ) +void DDListBox::mouseMoveEvent( TQMouseEvent * ) { if ( dragging ) { TQDragObject *d = new TQTextDrag( currentText(), this ); diff --git a/doc/html/sound-example.html b/doc/html/sound-example.html index ab2ca3115..2bf2a47de 100644 --- a/doc/html/sound-example.html +++ b/doc/html/sound-example.html @@ -93,7 +93,7 @@ private: #include "sound.h" #include <ntqapplication.h> -#include <ntqmessagebox.h> +#include <tqmessagebox.h> #include <tqmenubar.h> SoundPlayer::SoundPlayer() : @@ -105,7 +105,7 @@ private: // Bail out. Programs in which sound is not critical // could just silently (hehe) ignore the lack of a server. // - TQMessageBox::warning(this,"No Sound", + 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:" diff --git a/doc/html/sqltable-example.html b/doc/html/sqltable-example.html index 3cc2d5245..26b9eeeaf 100644 --- a/doc/html/sqltable-example.html +++ b/doc/html/sqltable-example.html @@ -49,7 +49,7 @@ This example shows how to use a TQDataTable to br #include <tqsqldatabase.h> #include <tqdatatable.h> #include <tqsqlcursor.h> -#include <ntqmessagebox.h> +#include <tqmessagebox.h> /* Modify the following to match your environment */ #define DRIVER "TQSQLITE" /* see the TQt SQL documentation for a list of available drivers */ diff --git a/doc/html/t10-lcdrange-cpp.html b/doc/html/t10-lcdrange-cpp.html index b24769f4a..d968251f4 100644 --- a/doc/html/t10-lcdrange-cpp.html +++ b/doc/html/t10-lcdrange-cpp.html @@ -48,7 +48,7 @@ body { background: #ffffff; color: black; } { TQLCDNumber *lcd = new TQLCDNumber( 2, this, "lcd" ); slider = new TQSlider( Horizontal, this, "slider" ); - slider->setRange( 0, 99 ); + slider->setRange( 0, 99 ); slider->setValue( 0 ); connect( slider, TQ_SIGNAL(valueChanged(int)), lcd, TQ_SLOT(display(int)) ); @@ -77,7 +77,7 @@ void LCDRange::setRange( int minVal, int maxVal ) minVal, maxVal ); return; } - slider->setRange( minVal, maxVal ); + slider->setRange( minVal, maxVal ); }


      diff --git a/doc/html/t11-lcdrange-cpp.html b/doc/html/t11-lcdrange-cpp.html index 969b4234a..b56909f85 100644 --- a/doc/html/t11-lcdrange-cpp.html +++ b/doc/html/t11-lcdrange-cpp.html @@ -48,7 +48,7 @@ body { background: #ffffff; color: black; } { TQLCDNumber *lcd = new TQLCDNumber( 2, this, "lcd" ); slider = new TQSlider( Horizontal, this, "slider" ); - slider->setRange( 0, 99 ); + slider->setRange( 0, 99 ); slider->setValue( 0 ); connect( slider, TQ_SIGNAL(valueChanged(int)), lcd, TQ_SLOT(display(int)) ); @@ -77,7 +77,7 @@ void LCDRange::setRange( int minVal, int maxVal ) minVal, maxVal ); return; } - slider->setRange( minVal, maxVal ); + slider->setRange( minVal, maxVal ); }


      diff --git a/doc/html/t12-lcdrange-cpp.html b/doc/html/t12-lcdrange-cpp.html index ab11acc58..99db6cf3e 100644 --- a/doc/html/t12-lcdrange-cpp.html +++ b/doc/html/t12-lcdrange-cpp.html @@ -65,7 +65,7 @@ void LCDRange::init() { TQLCDNumber *lcd = new TQLCDNumber( 2, this, "lcd" ); slider = new TQSlider( Horizontal, this, "slider" ); - slider->setRange( 0, 99 ); + slider->setRange( 0, 99 ); slider->setValue( 0 ); label = new TQLabel( " ", this, "label" ); @@ -107,7 +107,7 @@ void LCDRange::setRange( int minVal, int maxVal ) minVal, maxVal ); return; } - slider->setRange( minVal, maxVal ); + slider->setRange( minVal, maxVal ); } diff --git a/doc/html/t13-lcdrange-cpp.html b/doc/html/t13-lcdrange-cpp.html index b95972831..de56d8b44 100644 --- a/doc/html/t13-lcdrange-cpp.html +++ b/doc/html/t13-lcdrange-cpp.html @@ -65,7 +65,7 @@ void LCDRange::init() { TQLCDNumber *lcd = new TQLCDNumber( 2, this, "lcd" ); slider = new TQSlider( Horizontal, this, "slider" ); - slider->setRange( 0, 99 ); + slider->setRange( 0, 99 ); slider->setValue( 0 ); label = new TQLabel( " ", this, "label" ); @@ -112,7 +112,7 @@ void LCDRange::setRange( int minVal, int maxVal ) minVal, maxVal ); return; } - slider->setRange( minVal, maxVal ); + slider->setRange( minVal, maxVal ); } diff --git a/doc/html/t14-cannon-cpp.html b/doc/html/t14-cannon-cpp.html index 03fdc8fb6..1bb8925b6 100644 --- a/doc/html/t14-cannon-cpp.html +++ b/doc/html/t14-cannon-cpp.html @@ -161,20 +161,20 @@ void CannonField::moveShot() } -void CannonField::mousePressEvent( TQMouseEvent *e ) +void CannonField::mousePressEvent( TQMouseEvent *e ) { - if ( e->button() != LeftButton ) + if ( e->button() != LeftButton ) return; - if ( barrelHit( e->pos() ) ) + if ( barrelHit( e->pos() ) ) barrelPressed = TRUE; } -void CannonField::mouseMoveEvent( TQMouseEvent *e ) +void CannonField::mouseMoveEvent( TQMouseEvent *e ) { if ( !barrelPressed ) return; - TQPoint pnt = e->pos(); + TQPoint pnt = e->pos(); if ( pnt.x() <= 0 ) pnt.setX( 1 ); if ( pnt.y() >= height() ) @@ -184,9 +184,9 @@ void CannonField::mouseMoveEvent( mouseReleaseEvent( TQMouseEvent *e ) +void CannonField::mouseReleaseEvent( TQMouseEvent *e ) { - if ( e->button() == LeftButton ) + if ( e->button() == LeftButton ) barrelPressed = FALSE; } diff --git a/doc/html/t14-cannon-h.html b/doc/html/t14-cannon-h.html index 5de19c5c9..bb0f771a2 100644 --- a/doc/html/t14-cannon-h.html +++ b/doc/html/t14-cannon-h.html @@ -80,9 +80,9 @@ signals: protected: void paintEvent( TQPaintEvent * ); - void mousePressEvent( TQMouseEvent * ); - void mouseMoveEvent( TQMouseEvent * ); - void mouseReleaseEvent( TQMouseEvent * ); + void mousePressEvent( TQMouseEvent * ); + void mouseMoveEvent( TQMouseEvent * ); + void mouseReleaseEvent( TQMouseEvent * ); private: void paintShot( TQPainter * ); diff --git a/doc/html/t14-lcdrange-cpp.html b/doc/html/t14-lcdrange-cpp.html index 4498a4f74..aff77c859 100644 --- a/doc/html/t14-lcdrange-cpp.html +++ b/doc/html/t14-lcdrange-cpp.html @@ -65,7 +65,7 @@ void LCDRange::init() { TQLCDNumber *lcd = new TQLCDNumber( 2, this, "lcd" ); slider = new TQSlider( Horizontal, this, "slider" ); - slider->setRange( 0, 99 ); + slider->setRange( 0, 99 ); slider->setValue( 0 ); label = new TQLabel( " ", this, "label" ); @@ -112,7 +112,7 @@ void LCDRange::setRange( int minVal, int maxVal ) minVal, maxVal ); return; } - slider->setRange( minVal, maxVal ); + slider->setRange( minVal, maxVal ); } diff --git a/doc/html/t7-lcdrange-cpp.html b/doc/html/t7-lcdrange-cpp.html index 92afa1c74..a350fbb38 100644 --- a/doc/html/t7-lcdrange-cpp.html +++ b/doc/html/t7-lcdrange-cpp.html @@ -48,7 +48,7 @@ body { background: #ffffff; color: black; } { TQLCDNumber *lcd = new TQLCDNumber( 2, this, "lcd" ); slider = new TQSlider( Horizontal, this, "slider" ); - slider->setRange( 0, 99 ); + slider->setRange( 0, 99 ); slider->setValue( 0 ); connect( slider, TQ_SIGNAL(valueChanged(int)), lcd, TQ_SLOT(display(int)) ); diff --git a/doc/html/t8-lcdrange-cpp.html b/doc/html/t8-lcdrange-cpp.html index eef5caf2b..f8a9b851b 100644 --- a/doc/html/t8-lcdrange-cpp.html +++ b/doc/html/t8-lcdrange-cpp.html @@ -48,7 +48,7 @@ body { background: #ffffff; color: black; } { TQLCDNumber *lcd = new TQLCDNumber( 2, this, "lcd" ); slider = new TQSlider( Horizontal, this, "slider" ); - slider->setRange( 0, 99 ); + slider->setRange( 0, 99 ); slider->setValue( 0 ); connect( slider, TQ_SIGNAL(valueChanged(int)), lcd, TQ_SLOT(display(int)) ); @@ -77,7 +77,7 @@ void LCDRange::setRange( int minVal, int maxVal ) minVal, maxVal ); return; } - slider->setRange( minVal, maxVal ); + slider->setRange( minVal, maxVal ); }


      diff --git a/doc/html/t9-lcdrange-cpp.html b/doc/html/t9-lcdrange-cpp.html index 7644eeaab..607579d28 100644 --- a/doc/html/t9-lcdrange-cpp.html +++ b/doc/html/t9-lcdrange-cpp.html @@ -48,7 +48,7 @@ body { background: #ffffff; color: black; } { TQLCDNumber *lcd = new TQLCDNumber( 2, this, "lcd" ); slider = new TQSlider( Horizontal, this, "slider" ); - slider->setRange( 0, 99 ); + slider->setRange( 0, 99 ); slider->setValue( 0 ); connect( slider, TQ_SIGNAL(valueChanged(int)), lcd, TQ_SLOT(display(int)) ); @@ -77,7 +77,7 @@ void LCDRange::setRange( int minVal, int maxVal ) minVal, maxVal ); return; } - slider->setRange( minVal, maxVal ); + slider->setRange( minVal, maxVal ); }


      diff --git a/doc/html/themes-example.html b/doc/html/themes-example.html index 3d270718c..d0df907cf 100644 --- a/doc/html/themes-example.html +++ b/doc/html/themes-example.html @@ -159,7 +159,7 @@ private: #include "tqimage.h" #include "tqpushbutton.h" #include "tqwidget.h" -#include "ntqrangecontrol.h" +#include "tqrangecontrol.h" #include "tqscrollbar.h" #include <limits.h> #include "tqstylefactory.h" @@ -1655,7 +1655,7 @@ private: #include "tqimage.h" #include "tqpushbutton.h" #include "tqwidget.h" -#include "ntqrangecontrol.h" +#include "tqrangecontrol.h" #include "tqscrollbar.h" #include "tqslider.h" #include <limits.h> @@ -2190,7 +2190,7 @@ private: #include <ntqapplication.h> #include <tqpopupmenu.h> #include <tqmenubar.h> -#include <ntqmessagebox.h> +#include <tqmessagebox.h> #include <tqfont.h> #include <tqstylefactory.h> #include <tqaction.h> @@ -2316,7 +2316,7 @@ void Themes::makeStyle(const TQString void Themes::about() { - TQMessageBox::about( this, "TQt Themes Example", + 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>" ); @@ -2325,7 +2325,7 @@ void Themes::about() void Themes::aboutTQt() { - TQMessageBox::aboutTQt( this, "TQt Themes Example" ); + TQMessageBox::aboutTQt( this, "TQt Themes Example" ); } diff --git a/doc/html/titleindex b/doc/html/titleindex index 152f745f2..09f60b573 100644 --- a/doc/html/titleindex +++ b/doc/html/titleindex @@ -533,8 +533,8 @@ TQLocale Class | tqlocale.html TQLocale Member List | tqlocale-members.html TQMacMime Class | tqmacmime.html TQMacMime Member List | tqmacmime-members.html -QMacStyle Class | qmacstyle.html -QMacStyle Member List | qmacstyle-members.html +TQMacStyle Class | tqmacstyle.html +TQMacStyle Member List | tqmacstyle-members.html QMag | qmag-example.html TQMainWindow Class | tqmainwindow.html TQMainWindow Member List | tqmainwindow-members.html @@ -550,12 +550,12 @@ TQMenuBar Class | tqmenubar.html TQMenuBar Member List | tqmenubar-members.html TQMenuData Class | tqmenudata.html TQMenuData Member List | tqmenudata-members.html -QMessageBox Class | ntqmessagebox.html -QMessageBox Member List | qmessagebox-members.html -QMetaObject Class | ntqmetaobject.html -QMetaObject Member List | qmetaobject-members.html -QMetaProperty Class | qmetaproperty.html -QMetaProperty Member List | qmetaproperty-members.html +TQMessageBox Class | tqmessagebox.html +TQMessageBox Member List | tqmessagebox-members.html +TQMetaObject Class | tqmetaobject.html +TQMetaObject Member List | tqmetaobject-members.html +TQMetaProperty Class | tqmetaproperty.html +TQMetaProperty Member List | tqmetaproperty-members.html TQMimeSource Class | tqmimesource.html TQMimeSource Member List | tqmimesource-members.html TQMimeSourceFactory Class | tqmimesourcefactory.html @@ -571,10 +571,10 @@ TQMotifStyle Class | tqmotifstyle.html TQMotifStyle Member List | tqmotifstyle-members.html TQMotifWidget Class | tqmotifwidget.html TQMotifWidget Member List | tqmotifwidget-members.html -QMouseEvent Class | qmouseevent.html -QMouseEvent Member List | qmouseevent-members.html -QMoveEvent Class | qmoveevent.html -QMoveEvent Member List | qmoveevent-members.html +TQMouseEvent Class | tqmouseevent.html +TQMouseEvent Member List | tqmouseevent-members.html +TQMoveEvent Class | tqmoveevent.html +TQMoveEvent Member List | tqmoveevent-members.html TQMovie Class | tqmovie.html TQMovie Member List | tqmovie-members.html TQMultiLineEdit Class | tqmultilineedit.html @@ -583,14 +583,14 @@ TQMutex Class | tqmutex.html TQMutex Member List | tqmutex-members.html TQMutexLocker Class | tqmutexlocker.html TQMutexLocker Member List | tqmutexlocker-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 +TQNPInstance Class | tqnpinstance.html +TQNPInstance Member List | tqnpinstance-members.html +TQNPStream Class | tqnpstream.html +TQNPStream Member List | tqnpstream-members.html +TQNPWidget Class | tqnpwidget.html +TQNPWidget Member List | tqnpwidget-members.html +TQNPlugin Class | tqnplugin.html +TQNPlugin Member List | tqnplugin-members.html TQNetworkOperation Class | tqnetworkoperation.html TQNetworkOperation Member List | tqnetworkoperation-members.html TQNetworkProtocol Class | tqnetworkprotocol.html @@ -662,8 +662,8 @@ TQPushButton Class | tqpushbutton.html TQPushButton Member List | tqpushbutton-members.html TQRadioButton Class | tqradiobutton.html TQRadioButton Member List | tqradiobutton-members.html -QRangeControl Class | ntqrangecontrol.html -QRangeControl Member List | qrangecontrol-members.html +TQRangeControl Class | tqrangecontrol.html +TQRangeControl Member List | tqrangecontrol-members.html TQRect Class | tqrect.html TQRect Member List | tqrect-members.html TQRegExp Class | tqregexp.html @@ -672,8 +672,8 @@ TQRegExpValidator Class | tqregexpvalidator.html TQRegExpValidator Member List | tqregexpvalidator-members.html TQRegion Class | tqregion.html TQRegion Member List | tqregion-members.html -QResizeEvent Class | qresizeevent.html -QResizeEvent Member List | qresizeevent-members.html +TQResizeEvent Class | tqresizeevent.html +TQResizeEvent Member List | tqresizeevent-members.html TQSGIStyle Class | tqsgistyle.html TQSGIStyle Member List | tqsgistyle-members.html TQScrollBar Class | tqscrollbar.html @@ -1166,14 +1166,14 @@ tqlistbox.h Include File | tqlistbox-h.html tqlistview.h Include File | tqlistview-h.html tqlocale.h Include File | tqlocale-h.html tqlocalfs.h Include File | tqlocalfs-h.html -qmacstyle_mac.h Include File | qmacstyle_mac-h.html +tqmacstyle_mac.h Include File | tqmacstyle_mac-h.html tqmainwindow.h Include File | tqmainwindow-h.html tqmap.h Include File | tqmap-h.html tqmemarray.h Include File | tqmemarray-h.html tqmenubar.h Include File | tqmenubar-h.html tqmenudata.h Include File | tqmenudata-h.html -ntqmessagebox.h Include File | qmessagebox-h.html -ntqmetaobject.h Include File | qmetaobject-h.html +tqmessagebox.h Include File | tqmessagebox-h.html +tqmetaobject.h Include File | tqmetaobject-h.html tqmime.h Include File | tqmime-h.html tqmotif.h Include File | tqmotif-h.html tqmotifdialog.h Include File | tqmotifdialog-h.html @@ -1183,10 +1183,10 @@ tqmotifwidget.h Include File | tqmotifwidget-h.html tqmovie.h Include File | tqmovie-h.html tqmultilineedit.h Include File | tqmultilineedit-h.html tqmutex.h Include File | tqmutex-h.html -ntqnamespace.h Include File | qnamespace-h.html +tqnamespace.h Include File | tqnamespace-h.html tqnetwork.h Example File | tqnetwork-h.html tqnetworkprotocol.h Include File | tqnetworkprotocol-h.html -ntqnp.h Include File | qnp-h.html +tqnp.h Include File | tqnp-h.html tqobject.h Include File | tqobject-h.html tqobjectcleanuphandler.h Include File | tqobjectcleanuphandler-h.html tqobjectlist.h Include File | tqobjectlist-h.html @@ -1216,7 +1216,7 @@ tqptrstack.h Include File | tqptrstack-h.html tqptrvector.h Include File | tqptrvector-h.html tqpushbutton.h Include File | tqpushbutton-h.html tqradiobutton.h Include File | tqradiobutton-h.html -ntqrangecontrol.h Include File | qrangecontrol-h.html +tqrangecontrol.h Include File | tqrangecontrol-h.html tqrect.h Include File | tqrect-h.html tqregexp.h Include File | tqregexp-h.html tqregion.h Include File | tqregion-h.html diff --git a/doc/html/tooltip-example.html b/doc/html/tooltip-example.html index d0a60c690..fc7a0d071 100644 --- a/doc/html/tooltip-example.html +++ b/doc/html/tooltip-example.html @@ -75,8 +75,8 @@ public: protected: void paintEvent( TQPaintEvent * ); - void mousePressEvent( TQMouseEvent * ); - void resizeEvent( TQResizeEvent * ); + void mousePressEvent( TQMouseEvent * ); + void resizeEvent( TQResizeEvent * ); private: TQRect randomRect(); @@ -170,17 +170,17 @@ void TellMe::paintEvent( void TellMe::mousePressEvent( TQMouseEvent * e ) +void TellMe::mousePressEvent( TQMouseEvent * e ) { - if ( r1.contains( e->pos() ) ) + if ( r1.contains( e->pos() ) ) r1 = randomRect(); - if ( r2.contains( e->pos() ) ) + if ( r2.contains( e->pos() ) ) r2 = randomRect(); repaint(); } -void TellMe::resizeEvent( TQResizeEvent * ) +void TellMe::resizeEvent( TQResizeEvent * ) { if ( !rect().contains( r1 ) ) r1 = randomRect(); diff --git a/doc/html/tqaccel.html b/doc/html/tqaccel.html index 654202689..b682436da 100644 --- a/doc/html/tqaccel.html +++ b/doc/html/tqaccel.html @@ -100,7 +100,7 @@ manipulated using insertItem(), 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 ntqnamespace.h. As an alternative, use UNICODE_ACCEL with the +for printing a document. The key codes are listed in tqnamespace.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 diff --git a/doc/html/tqaction-application-example.html b/doc/html/tqaction-application-example.html index 9ccf17cf6..92351aa35 100644 --- a/doc/html/tqaction-application-example.html +++ b/doc/html/tqaction-application-example.html @@ -114,7 +114,7 @@ private: #include <tqfile.h> #include <tqfiledialog.h> #include <tqstatusbar.h> -#include <ntqmessagebox.h> +#include <tqmessagebox.h> #include <tqprinter.h> #include <ntqapplication.h> #include <tqaccel.h> @@ -367,7 +367,7 @@ void ApplicationWindow::print() return; } - switch( TQMessageBox::information( this, "TQt Application Example", + switch( TQMessageBox::information( this, "TQt Application Example", "The document has been changed since " "the last save.", "Save Now", "Cancel", "Leave Anyway", @@ -389,7 +389,7 @@ void ApplicationWindow::print() void ApplicationWindow::about() { - TQMessageBox::about( this, "TQt Application Example", + TQMessageBox::about( this, "TQt Application Example", "This example demonstrates simple use of " "TQMainWindow,\nTQMenuBar and TQToolBar."); } @@ -397,7 +397,7 @@ void ApplicationWindow::about() void ApplicationWindow::aboutTQt() { - TQMessageBox::aboutTQt( this, "TQt Application Example" ); + TQMessageBox::aboutTQt( this, "TQt Application Example" ); } diff --git a/doc/html/tqcanvas.html b/doc/html/tqcanvas.html index 35dc0dab5..cf1286a97 100644 --- a/doc/html/tqcanvas.html +++ b/doc/html/tqcanvas.html @@ -142,7 +142,7 @@ at such extremes).

    • 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.). +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 diff --git a/doc/html/tqcanvasview.html b/doc/html/tqcanvasview.html index 97d7d5b6c..a8443eef7 100644 --- a/doc/html/tqcanvasview.html +++ b/doc/html/tqcanvasview.html @@ -66,9 +66,9 @@ subclass TQCanvasView. You might then reimplement TQScrollView::contentsMousePressEvent(). For example, assuming no transformation matrix is set:

      -    void MyCanvasView::contentsMousePressEvent( TQMouseEvent* e )
      +    void MyCanvasView::contentsMousePressEvent( TQMouseEvent* e )
           {
      -        TQCanvasItemList l = canvas()->collisions(e->pos());
      +        TQCanvasItemList l = canvas()->collisions(e->pos());
               for (TQCanvasItemList::Iterator it=l.begin(); it!=l.end(); ++it) {
                   if ( (*it)->rtti() == TQCanvasRectangle::RTTI )
                       tqDebug("A TQCanvasRectangle lies somewhere at this point");
      diff --git a/doc/html/tqdatetime-h.html b/doc/html/tqdatetime-h.html
      index 04a278f02..23d6cc48c 100644
      --- a/doc/html/tqdatetime-h.html
      +++ b/doc/html/tqdatetime-h.html
      @@ -79,7 +79,7 @@ body { background: #ffffff; color: black; }
       
       #ifndef QT_H
       #include "tqstring.h"
      -#include "ntqnamespace.h"
      +#include "tqnamespace.h"
       #endif // QT_H
       
       
      diff --git a/doc/html/tqdial-h.html b/doc/html/tqdial-h.html
      index 7ba920253..4cfe43bf7 100644
      --- a/doc/html/tqdial-h.html
      +++ b/doc/html/tqdial-h.html
      @@ -80,7 +80,7 @@ body { background: #ffffff; color: black; }
       
       #ifndef QT_H
       #include "tqwidget.h"
      -#include "ntqrangecontrol.h"
      +#include "tqrangecontrol.h"
       #endif // QT_H
       
       #ifndef TQT_NO_DIAL
      diff --git a/doc/html/tqdial-members.html b/doc/html/tqdial-members.html
      index d99ffcd31..5c0ee453d 100644
      --- a/doc/html/tqdial-members.html
      +++ b/doc/html/tqdial-members.html
      @@ -49,7 +49,7 @@ body { background: #ffffff; color: black; }
       
    • backgroundPixmap()
    • baseSize()
    • blockSignals() -
    • bound() +
    • bound()
    • caption()
    • checkConnectArgs()
    • child() @@ -81,7 +81,7 @@ body { background: #ffffff; color: black; }
    • dialMoved()
    • dialPressed()
    • dialReleased() -
    • directSetValue() +
    • directSetValue()
    • disconnect()
    • disconnectNotify()
    • dragEnterEvent() @@ -214,8 +214,8 @@ body { background: #ffffff; color: black; }
    • parentWidget()
    • polish()
    • pos() -
    • positionFromValue() -
    • prevValue() +
    • positionFromValue() +
    • prevValue()
    • property()
    • queryList()
    • raise() @@ -282,11 +282,11 @@ body { background: #ffffff; color: black; }
    • setPaletteBackgroundPixmap()
    • setPaletteForegroundColor()
    • setProperty() -
    • setRange() +
    • setRange()
    • setShown()
    • setSizeIncrement()
    • setSizePolicy() -
    • setSteps() +
    • setSteps()
    • setStyle()
    • setTabOrder()
    • setTracking() @@ -309,7 +309,7 @@ body { background: #ffffff; color: black; }
    • sizePolicy()
    • stackUnder()
    • startTimer() -
    • stepChange() +
    • stepChange()
    • style()
    • styleChange()
    • subtractLine() @@ -330,7 +330,7 @@ body { background: #ffffff; color: black; }
    • value()
    • valueChange()
    • valueChanged() -
    • valueFromPosition() +
    • valueFromPosition()
    • visibleRect()
    • wheelEvent()
    • width() diff --git a/doc/html/tqdial.html b/doc/html/tqdial.html index 70a6662fb..6370b738e 100644 --- a/doc/html/tqdial.html +++ b/doc/html/tqdial.html @@ -34,7 +34,7 @@ body { background: #ffffff; color: black; }

      The TQDial class provides a rounded range control (like a speedometer or potentiometer). More...

      #include <tqdial.h> -

      Inherits TQWidget and TQRangeControl. +

      Inherits TQWidget and TQRangeControl.

      List of all member functions.

      Public Members

        @@ -125,7 +125,7 @@ etc., notch. notchSize() returns the number of units pe 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 +

        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 @@ -139,7 +139,7 @@ right/down arrow keys move by lineStep(), page up and page down by

    • Constructs a dial called name with parent parent. f is propagated to the TQWidget constructor. It has the default range of -a TQRangeControl. +a TQRangeControl.

      TQDial::TQDial ( int minValue, int maxValue, int pageStep, int value, TQWidget * parent = 0, const char * name = 0 )

      @@ -206,7 +206,7 @@ See the "pageStep" property for details. Reimplemented to ensure tick-marks are consistent with the new range. -

      Reimplemented from TQRangeControl. +

      Reimplemented from TQRangeControl.

      void TQDial::repaintScreen ( const TQRect * cr = 0 ) [virtual protected]

      Paints the dial using clip region cr. @@ -257,7 +257,7 @@ See the "value" property for details. Reimplemented to ensure the display is correct and to emit the valueChanged(int) signal when appropriate. -

      Reimplemented from TQRangeControl. +

      Reimplemented from TQRangeControl.

      void TQDial::valueChanged ( int value ) [signal]

      @@ -270,23 +270,23 @@ 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 +

      setLineStep() calls the virtual stepChange() function if the new line step is different from the previous setting. -

      See also TQRangeControl::setSteps(), pageStep, and setRange(). +

      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(). +

      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(). +

      See also setRange().

      Set this property's value with setMinValue() and get this property's value with minValue().

      int notchSize

      @@ -312,9 +312,9 @@ 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 +

      setPageStep() calls the virtual stepChange() function if the new page step is different from the previous setting. -

      See also stepChange(). +

      See also stepChange().

      Set this property's value with setPageStep() and get this property's value with pageStep().

      bool tracking

      diff --git a/doc/html/tqdialog.html b/doc/html/tqdialog.html index 050fe8bb1..4ade553c1 100644 --- a/doc/html/tqdialog.html +++ b/doc/html/tqdialog.html @@ -35,7 +35,7 @@ body { background: #ffffff; color: black; } More...

      #include <tqdialog.h>

      Inherits TQWidget. -

      Inherited by TQColorDialog, TQErrorMessage, TQFileDialog, TQFontDialog, TQInputDialog, TQMessageBox, TQMotifDialog, TQProgressDialog, TQTabDialog, and TQWizard. +

      Inherited by TQColorDialog, TQErrorMessage, TQFileDialog, TQFontDialog, TQInputDialog, TQMessageBox, TQMotifDialog, TQProgressDialog, TQTabDialog, and TQWizard.

      List of all member functions.

      Public Members

        diff --git a/doc/html/tqdrawutil-h.html b/doc/html/tqdrawutil-h.html index 57217decc..2ee29d9fe 100644 --- a/doc/html/tqdrawutil-h.html +++ b/doc/html/tqdrawutil-h.html @@ -78,7 +78,7 @@ body { background: #ffffff; color: black; } #define TQDRAWUTIL_H #ifndef QT_H -#include "ntqnamespace.h" +#include "tqnamespace.h" #include "tqstring.h" // char*->TQString conversion #endif // QT_H diff --git a/doc/html/tqerrormessage.html b/doc/html/tqerrormessage.html index b326bc761..de915eb43 100644 --- a/doc/html/tqerrormessage.html +++ b/doc/html/tqerrormessage.html @@ -70,7 +70,7 @@ that displays tqDebug(), -

        See also TQMessageBox, TQStatusBar::message(), Dialog Classes, and Miscellaneous Classes. +

        See also TQMessageBox, TQStatusBar::message(), Dialog Classes, and Miscellaneous Classes.


        Member Function Documentation

        TQErrorMessage::TQErrorMessage ( TQWidget * parent, const char * name = 0 ) diff --git a/doc/html/tqevent-h.html b/doc/html/tqevent-h.html index f2967186c..be4f804e8 100644 --- a/doc/html/tqevent-h.html +++ b/doc/html/tqevent-h.html @@ -80,7 +80,7 @@ body { background: #ffffff; color: black; } #ifndef QT_H #include "ntqwindowdefs.h" #include "tqregion.h" -#include "ntqnamespace.h" +#include "tqnamespace.h" #include "tqmime.h" #include "tqpair.h" #endif // QT_H diff --git a/doc/html/tqevent.html b/doc/html/tqevent.html index f0513e1ce..5731d2477 100644 --- a/doc/html/tqevent.html +++ b/doc/html/tqevent.html @@ -36,7 +36,7 @@ event classes. Event objects contain event parameters. More...

        #include <tqevent.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. +

        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

          @@ -81,10 +81,10 @@ 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::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. @@ -95,8 +95,8 @@ types and the specialized classes for each type are these:
        • 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::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. diff --git a/doc/html/tqeventloop.html b/doc/html/tqeventloop.html index 29cbf66a0..fa71020d5 100644 --- a/doc/html/tqeventloop.html +++ b/doc/html/tqeventloop.html @@ -158,7 +158,7 @@ returns the value that was set to exit(). 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 +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 diff --git a/doc/html/tqfile.html b/doc/html/tqfile.html index 2dc549dfb..11920a189 100644 --- a/doc/html/tqfile.html +++ b/doc/html/tqfile.html @@ -226,7 +226,7 @@ should translate it first, for example:

                   TQFile f( "address.dat" );
                   if ( !f.open( IO_ReadOnly ) {
          -            TQMessageBox::critical(
          +            TQMessageBox::critical(
                           this,
                           tr("Open failed"),
                           tr("Could not open file for reading: %1").arg( tqApp->translate("TQFile",f.errorString()) )
          diff --git a/doc/html/tqfontmetrics.html b/doc/html/tqfontmetrics.html
          index 8d65e14a2..3c94bd0fd 100644
          --- a/doc/html/tqfontmetrics.html
          +++ b/doc/html/tqfontmetrics.html
          @@ -212,7 +212,7 @@ Arabic and Hebrew where it aligns to the right.
           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 ntqnamespace.h. +

          These flags are defined in tqnamespace.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 @@ -352,7 +352,7 @@ Returns the size in pixels of the first len characters of str.

        • ShowPrefix interprets "&x" as "x", i.e. underlined.
        • WordBreak breaks the text to fit the rectangle.
        -

        These flags are defined in ntqnamespace.h. +

        These flags are defined in tqnamespace.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 diff --git a/doc/html/tqframe.html b/doc/html/tqframe.html index b07241d3a..695e7a5e2 100644 --- a/doc/html/tqframe.html +++ b/doc/html/tqframe.html @@ -254,7 +254,7 @@ Processes the paint event event.

        Examples: life/life.cpp and qfd/fontdisplayer.cpp.

        Reimplemented from TQWidget. -

        void TQFrame::resizeEvent ( TQResizeEvent * e ) [virtual protected] +

        void TQFrame::resizeEvent ( TQResizeEvent * e ) [virtual protected]

        Processes the resize event e.

        Adjusts the frame rectangle for the resized widget. The frame diff --git a/doc/html/tqglwidget.html b/doc/html/tqglwidget.html index a3dd9f6a8..3a271b9c5 100644 --- a/doc/html/tqglwidget.html +++ b/doc/html/tqglwidget.html @@ -503,7 +503,7 @@ 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] +

        void TQGLWidget::resizeEvent ( TQResizeEvent * ) [virtual protected]

        Handles resize events. Calls the virtual function resizeGL(). diff --git a/doc/html/tqiconview.html b/doc/html/tqiconview.html index b40dba0bb..056bd6412 100644 --- a/doc/html/tqiconview.html +++ b/doc/html/tqiconview.html @@ -444,7 +444,7 @@ This is an overloaded member function, provided for convenience. It behaves esse 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 +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(). @@ -656,7 +656,7 @@ See the "maxItemWidth" property

        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 +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(). @@ -666,7 +666,7 @@ position at release time.)

        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()). +coordinate system (TQMouseEvent::globalPos()).

        See also rightButtonClicked() and pressed().

        void TQIconView::moved () [signal] @@ -705,7 +705,7 @@ This is an overloaded member function, provided for convenience. It behaves esse 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 +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(). @@ -733,7 +733,7 @@ key. item is the currentItem() at the time o

        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 +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(). @@ -744,7 +744,7 @@ position at release time.)

        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()). +coordinate system (TQMouseEvent::globalPos()).

        void TQIconView::selectAll ( bool select ) [virtual]

        diff --git a/doc/html/tqkeysequence-h.html b/doc/html/tqkeysequence-h.html index 6f951a640..5fc567e28 100644 --- a/doc/html/tqkeysequence-h.html +++ b/doc/html/tqkeysequence-h.html @@ -79,7 +79,7 @@ body { background: #ffffff; color: black; } #ifndef QT_H #ifndef QT_H -#include "ntqnamespace.h" +#include "tqnamespace.h" #include "tqstring.h" #endif // QT_H #endif diff --git a/doc/html/tqkeysequence.html b/doc/html/tqkeysequence.html index fc5b7e41d..011025548 100644 --- a/doc/html/tqkeysequence.html +++ b/doc/html/tqkeysequence.html @@ -69,7 +69,7 @@ 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 ntqnamespace.h. As an alternative, +The key codes are listed in tqnamespace.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. @@ -108,14 +108,14 @@ 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 ntqnamespace.h and can be +

        The key codes are listed in tqnamespace.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 ntqnamespace.h and can be +

        The key codes are listed in tqnamespace.h and can be combined with modifiers, e.g. with SHIFT, CTRL, ALT, META or UNICODE_ACCEL.

        TQKeySequence::TQKeySequence ( const TQKeySequence & keysequence ) diff --git a/doc/html/tqlistbox.html b/doc/html/tqlistbox.html index 83583a466..eb70c0e7a 100644 --- a/doc/html/tqlistbox.html +++ b/doc/html/tqlistbox.html @@ -432,7 +432,7 @@ This is an overloaded member function, provided for convenience. It behaves esse 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 +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 @@ -731,7 +731,7 @@ Returns the width of the widest item in the list box.

        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 +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 @@ -743,7 +743,7 @@ connected to this 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()). +coordinate system (TQMouseEvent::globalPos()).

        Note that you must not delete any TQListBoxItem objects in slots connected to this signal. @@ -804,7 +804,7 @@ This is an overloaded member function, provided for convenience. It behaves esse 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()). +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(). diff --git a/doc/html/tqlistview.html b/doc/html/tqlistview.html index 64469e7d0..4e0cbc8f2 100644 --- a/doc/html/tqlistview.html +++ b/doc/html/tqlistview.html @@ -501,24 +501,24 @@ Returns the WidthMode for column c.

        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] +

        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] +

        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] +

        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] +

        void TQListView::contentsMouseReleaseEvent ( TQMouseEvent * e ) [virtual protected]

        Processes the mouse release event e on behalf of the viewed widget. @@ -867,7 +867,7 @@ list view will be cleared. Repaints item on the screen if item is currently visible. Takes care to avoid multiple repaints. -

        void TQListView::resizeEvent ( TQResizeEvent * e ) [virtual protected] +

        void TQListView::resizeEvent ( TQResizeEvent * e ) [virtual protected]

        Ensures that the header is correctly sized and positioned when the resize event e occurs. diff --git a/doc/html/tqmacstyle-members.html b/doc/html/tqmacstyle-members.html new file mode 100644 index 000000000..3ee05739a --- /dev/null +++ b/doc/html/tqmacstyle-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/tqmacstyle.html b/doc/html/tqmacstyle.html new file mode 100644 index 000000000..3a7644ece --- /dev/null +++ b/doc/html/tqmacstyle.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 <tqmacstyle_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/tqmacstyle_mac-h.html b/doc/html/tqmacstyle_mac-h.html new file mode 100644 index 000000000..d0348937f --- /dev/null +++ b/doc/html/tqmacstyle_mac-h.html @@ -0,0 +1,194 @@ + + + + + +tqmacstyle_mac.h Include File + + + + + + + +
        + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

        tqmacstyle_mac.h

        + +

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


        +
        +/****************************************************************************
        +** $Id: qt/tqmacstyle_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 requirements will be met:
        +** http://trolltech.com/products/qt/licenses/licensing/opensource/.
        +** If you are unsure which license is appropriate for your use, please
        +** review the following information:
        +** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
        +** or contact the sales department at sales@trolltech.com.
        +**
        +** This file may be used under the terms of the Q Public License as
        +** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
        +** included in the packaging of this file.  Licensees holding valid TQt
        +** Commercial licenses may use this file in accordance with the TQt
        +** Commercial License Agreement provided with the Software.
        +**
        +** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
        +** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
        +** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
        +** herein.
        +**
        +**********************************************************************/
        +
        +#ifndef TQMACSTYLE_MAC_H
        +#define TQMACSTYLE_MAC_H
        +
        +#ifndef QT_H
        +#include "tqwindowsstyle.h"
        +#endif // QT_H
        +
        +#if defined( TQ_WS_MAC ) && !defined( TQT_NO_STYLE_MAC ) 
        +
        +class TQPalette;
        +
        +#if defined(QT_PLUGIN)
        +#define Q_EXPORT_STYLE_MAC
        +#else
        +#define Q_EXPORT_STYLE_MAC TQ_EXPORT
        +#endif
        +
        +class TQMacStylePrivate;
        +
        +class Q_EXPORT_STYLE_MAC TQMacStyle : public TQWindowsStyle
        +{
        +    TQ_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(TQ_DISABLE_COPY)
        +    TQMacStyle( const TQMacStyle & );
        +    TQMacStyle& operator=( const TQMacStyle & );
        +#endif
        +
        +protected:
        +    TQMacStylePrivate *d;
        +};
        +
        +#endif // TQ_WS_MAC
        +
        +#endif // TQMACSTYLE_H
        +
        + +


        + +
        Copyright © 2007 +TrolltechTrademarks +
        TQt 3.3.8
        +
        + diff --git a/doc/html/tqmenubar.html b/doc/html/tqmenubar.html index 82260daff..1e73353f9 100644 --- a/doc/html/tqmenubar.html +++ b/doc/html/tqmenubar.html @@ -312,7 +312,7 @@ 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 ntqnamespace.h. +

        See also removeItem(), changeItem(), setAccel(), connectItem(), TQAccel, and tqnamespace.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 ) @@ -323,7 +323,7 @@ This is an overloaded member function, provided for convenience. It behaves esse 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 ntqnamespace.h. +

        See also removeItem(), changeItem(), setAccel(), connectItem(), TQAccel, and tqnamespace.h.

        int TQMenuData::insertItem ( const TQPixmap & pixmap, const TQObject * receiver, const char * member, const TQKeySequence & accel = 0, int id = -1, int index = -1 )

        @@ -347,7 +347,7 @@ the item. The item is connected to the member slot in the receiver<

        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 ntqnamespace.h. +

        See also removeItem(), changeItem(), setAccel(), connectItem(), TQAccel, and tqnamespace.h.

        int TQMenuData::insertItem ( const TQString & text, int id = -1, int index = -1 )

        diff --git a/doc/html/tqmenudata.html b/doc/html/tqmenudata.html index f24003be7..9d9448a62 100644 --- a/doc/html/tqmenudata.html +++ b/doc/html/tqmenudata.html @@ -146,7 +146,7 @@ connected. 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 ntqnamespace.h. +

        See also setAccel(), TQAccel, and tqnamespace.h.

        void TQMenuData::activateItemAt ( int index ) [virtual]

        @@ -336,7 +336,7 @@ 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 ntqnamespace.h. +

        See also removeItem(), changeItem(), setAccel(), connectItem(), TQAccel, and tqnamespace.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 ) @@ -347,7 +347,7 @@ This is an overloaded member function, provided for convenience. It behaves esse 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 ntqnamespace.h. +

        See also removeItem(), changeItem(), setAccel(), connectItem(), TQAccel, and tqnamespace.h.

        int TQMenuData::insertItem ( const TQPixmap & pixmap, const TQObject * receiver, const char * member, const TQKeySequence & accel = 0, int id = -1, int index = -1 )

        @@ -371,7 +371,7 @@ the item. The item is connected to the member slot in the receiver<

        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 ntqnamespace.h. +

        See also removeItem(), changeItem(), setAccel(), connectItem(), TQAccel, and tqnamespace.h.

        int TQMenuData::insertItem ( const TQString & text, int id = -1, int index = -1 )

        @@ -597,7 +597,7 @@ Removes the menu item at position index. 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 ntqnamespace.h contains a list of key +added). The header file tqnamespace.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 diff --git a/doc/html/tqmessagebox-crit.png b/doc/html/tqmessagebox-crit.png new file mode 100644 index 000000000..1fecd57b2 Binary files /dev/null and b/doc/html/tqmessagebox-crit.png differ diff --git a/doc/html/tqmessagebox-h.html b/doc/html/tqmessagebox-h.html new file mode 100644 index 000000000..bd33fecef --- /dev/null +++ b/doc/html/tqmessagebox-h.html @@ -0,0 +1,268 @@ + + + + + +tqmessagebox.h Include File + + + + + + + +
        + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

        tqmessagebox.h

        + +

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


        +
        +/****************************************************************************
        +** $Id: qt/tqmessagebox.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 requirements will be met:
        +** http://trolltech.com/products/qt/licenses/licensing/opensource/.
        +** If you are unsure which license is appropriate for your use, please
        +** review the following information:
        +** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
        +** or contact the sales department at sales@trolltech.com.
        +**
        +** This file may be used under the terms of the Q Public License as
        +** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
        +** included in the packaging of this file.  Licensees holding valid TQt
        +** Commercial licenses may use this file in accordance with the TQt
        +** Commercial License Agreement provided with the Software.
        +**
        +** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
        +** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
        +** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
        +** herein.
        +**
        +**********************************************************************/
        +
        +#ifndef TQMESSAGEBOX_H
        +#define TQMESSAGEBOX_H
        +
        +#ifndef QT_H
        +#include "tqdialog.h"
        +#endif // QT_H
        +
        +#ifndef TQT_NO_MESSAGEBOX
        +
        +class  TQLabel;
        +class  TQPushButton;
        +struct TQMessageBoxData;
        +
        +class TQ_EXPORT TQMessageBox : public TQDialog
        +{
        +    TQ_OBJECT
        +    TQ_ENUMS( Icon )
        +    TQ_PROPERTY( TQString text READ text WRITE setText )
        +    TQ_PROPERTY( Icon icon READ icon WRITE setIcon )
        +    TQ_PROPERTY( TQPixmap iconPixmap READ iconPixmap WRITE setIconPixmap )
        +    TQ_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(TQ_DISABLE_COPY)
        +    TQMessageBox( const TQMessageBox & );
        +    TQMessageBox &operator=( const TQMessageBox & );
        +#endif
        +};
        +
        +/*
        +*  Macro to be used at the beginning of main(), e.g.
        +*
        +*   #include <ntqapplication.h>
        +*   #include <tqmessagebox.h>
        +*   int main( int argc, char**argv )
        +*   {
        +*     QT_REQUIRE_VERSION( argc, argv, "3.0.5" )
        +*     ...
        +*   }
        +*/
        +#define QT_REQUIRE_VERSION( argc, argv, str ) { TQString s=TQString::fromLatin1(str);\
        +TQString sq=TQString::fromLatin1(tqVersion()); 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 ( !tqApp){ int c=0; new \
        +TQApplication(argc,argv);} TQString s = TQApplication::tr("Executable '%1' requires TQt "\
        + "%2, found TQt %3.").arg(TQString::fromLatin1(tqAppName())).arg(TQString::fromLatin1(\
        +str)).arg(TQString::fromLatin1(tqVersion()) ); TQMessageBox::critical( 0, TQApplication::tr(\
        +"Incompatible TQt Library Error" ), s, TQMessageBox::Abort,0 ); tqFatal(s.ascii()); }}
        +
        +
        +#endif // TQT_NO_MESSAGEBOX
        +
        +#endif // TQMESSAGEBOX_H
        +
        + +


        + +
        Copyright © 2007 +TrolltechTrademarks +
        TQt 3.3.8
        +
        + diff --git a/doc/html/tqmessagebox-info.png b/doc/html/tqmessagebox-info.png new file mode 100644 index 000000000..bde8f94da Binary files /dev/null and b/doc/html/tqmessagebox-info.png differ diff --git a/doc/html/tqmessagebox-members.html b/doc/html/tqmessagebox-members.html new file mode 100644 index 000000000..3293c902b --- /dev/null +++ b/doc/html/tqmessagebox-members.html @@ -0,0 +1,368 @@ + + + + + +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/tqmessagebox-quest.png b/doc/html/tqmessagebox-quest.png new file mode 100644 index 000000000..b21426c3d Binary files /dev/null and b/doc/html/tqmessagebox-quest.png differ diff --git a/doc/html/tqmessagebox-warn.png b/doc/html/tqmessagebox-warn.png new file mode 100644 index 000000000..fe1be23ea Binary files /dev/null and b/doc/html/tqmessagebox-warn.png differ diff --git a/doc/html/tqmessagebox.html b/doc/html/tqmessagebox.html new file mode 100644 index 000000000..66fbe832a --- /dev/null +++ b/doc/html/tqmessagebox.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 <tqmessagebox.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/tqfileiconview.cpp, picture/picture.cpp and qwerty/qwerty.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 required 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 required 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/tqmetaobject-h.html b/doc/html/tqmetaobject-h.html new file mode 100644 index 000000000..c887c11e3 --- /dev/null +++ b/doc/html/tqmetaobject-h.html @@ -0,0 +1,331 @@ + + + + + +tqmetaobject.h Include File + + + + + + + +
        + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

        tqmetaobject.h

        + +

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


        +
        +/****************************************************************************
        +** $Id: qt/tqmetaobject.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 requirements will be met:
        +** http://trolltech.com/products/qt/licenses/licensing/opensource/.
        +** If you are unsure which license is appropriate for your use, please
        +** review the following information:
        +** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
        +** or contact the sales department at sales@trolltech.com.
        +**
        +** This file may be used under the terms of the Q Public License as
        +** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
        +** included in the packaging of this file.  Licensees holding valid TQt
        +** Commercial licenses may use this file in accordance with the TQt
        +** Commercial License Agreement provided with the Software.
        +**
        +** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
        +** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
        +** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
        +** herein.
        +**
        +**********************************************************************/
        +
        +#ifndef TQMETAOBJECT_H
        +#define TQMETAOBJECT_H
        +
        +#ifndef QT_H
        +#include "tqconnection.h"
        +#include "tqstrlist.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 TQT_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 TQT_NO_PROPERTIES
        +
        +class TQ_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 // TQT_NO_PROPERTIES
        +
        +struct TQClassInfo				// class info meta data
        +{
        +    const char* name;				// - name of the info
        +    const char* value;				// - value of the info
        +};
        +
        +class TQ_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 TQT_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 TQT_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 (*tqt_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 TQT_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 TQT_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 TQT_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 (*tqt_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 TQT_NO_PROPERTIES
        +    int propertyoffset;
        +public:
        +    bool tqt_static_property( TQObject* o, int id, int f, TQVariant* v);
        +private:
        +    friend class TQMetaProperty;
        +#endif
        +
        +private:	// Disabled copy constructor and operator=
        +#if defined(TQ_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 TQT_NO_PROPERTIES
        +inline int TQMetaObject::propertyOffset() const
        +{ return propertyoffset; }
        +#endif
        +
        +typedef TQMetaObject *(*TQtStaticMetaObjectFunction)();
        +
        +class TQ_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/tqmetaobject-members.html b/doc/html/tqmetaobject-members.html new file mode 100644 index 000000000..0151af963 --- /dev/null +++ b/doc/html/tqmetaobject-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/tqmetaobject.html b/doc/html/tqmetaobject.html new file mode 100644 index 000000000..4139c53ef --- /dev/null +++ b/doc/html/tqmetaobject.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 <tqmetaobject.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 required 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/tqmetaproperty-members.html b/doc/html/tqmetaproperty-members.html new file mode 100644 index 000000000..67d91ec9a --- /dev/null +++ b/doc/html/tqmetaproperty-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/tqmetaproperty.html b/doc/html/tqmetaproperty.html new file mode 100644 index 000000000..37267700a --- /dev/null +++ b/doc/html/tqmetaproperty.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 <tqmetaobject.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/tqmimesourcefactory.html b/doc/html/tqmimesourcefactory.html index c1da24d8b..515dfef2c 100644 --- a/doc/html/tqmimesourcefactory.html +++ b/doc/html/tqmimesourcefactory.html @@ -83,7 +83,7 @@ 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. +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 @@ -193,7 +193,7 @@ file name is given in abs_or_rel_name and the path is in context Returns the application-wide default mime source factory. This factory is used by rich text rendering classes such as -TQSimpleRichText, TQWhatsThis and TQMessageBox to resolve named +TQSimpleRichText, TQWhatsThis and TQMessageBox to resolve named references within rich text documents. It serves also as the initial factory for the more complex render widgets, TQTextEdit and TQTextBrowser. diff --git a/doc/html/tqmouseevent-members.html b/doc/html/tqmouseevent-members.html new file mode 100644 index 000000000..66f0cc4ab --- /dev/null +++ b/doc/html/tqmouseevent-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/tqmouseevent.html b/doc/html/tqmouseevent.html new file mode 100644 index 000000000..6d57d7566 --- /dev/null +++ b/doc/html/tqmouseevent.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 <tqevent.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/tqmoveevent-members.html b/doc/html/tqmoveevent-members.html new file mode 100644 index 000000000..bd9d13587 --- /dev/null +++ b/doc/html/tqmoveevent-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/tqmoveevent.html b/doc/html/tqmoveevent.html new file mode 100644 index 000000000..f04bb9a6f --- /dev/null +++ b/doc/html/tqmoveevent.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 <tqevent.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/tqnamespace-h.html b/doc/html/tqnamespace-h.html new file mode 100644 index 000000000..8013db979 --- /dev/null +++ b/doc/html/tqnamespace-h.html @@ -0,0 +1,968 @@ + + + + + +tqnamespace.h Include File + + + + + + + +
        + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

        tqnamespace.h

        + +

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


        +
        +/****************************************************************************
        +** $Id: qt/tqnamespace.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 requirements will be met:
        +** http://trolltech.com/products/qt/licenses/licensing/opensource/.
        +** If you are unsure which license is appropriate for your use, please
        +** review the following information:
        +** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
        +** or contact the sales department at sales@trolltech.com.
        +**
        +** This file may be used under the terms of the Q Public License as
        +** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
        +** included in the packaging of this file.  Licensees holding valid TQt
        +** Commercial licenses may use this file in accordance with the TQt
        +** Commercial License Agreement provided with the Software.
        +**
        +** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
        +** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
        +** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
        +** herein.
        +**
        +**********************************************************************/
        +
        +#ifndef TQNAMESPACE_H
        +#define TQNAMESPACE_H
        +
        +#ifndef QT_H
        +#include "tqglobal.h"
        +#endif // QT_H
        +
        +
        +class TQColor;
        +class TQCursor;
        +
        +
        +class TQ_EXPORT TQt {
        +public:
        +    static const TQColor & color0;
        +    static const TQColor & color1;
        +    static const TQColor & black;
        +    static const TQColor & white;
        +    static const TQColor & darkGray;
        +    static const TQColor & gray;
        +    static const TQColor & lightGray;
        +    static const TQColor & red;
        +    static const TQColor & green;
        +    static const TQColor & blue;
        +    static const TQColor & cyan;
        +    static const TQColor & magenta;
        +    static const TQColor & yellow;
        +    static const TQColor & darkRed;
        +    static const TQColor & darkGreen;
        +    static const TQColor & darkBlue;
        +    static const TQColor & darkCyan;
        +    static const TQColor & darkMagenta;
        +    static const TQColor & darkYellow;
        +
        +    // documented in tqevent.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 tqobject.cpp
        +    // ideally would start at 1, as in TQSizePolicy, but that breaks other things
        +    enum Orientation {
        +        Horizontal = 0,
        +	Vertical
        +    };
        +
        +    // documented in tqlistview.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 tqpainter.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 tqpainter.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 tqwidget.cpp
        +    typedef uint WState;
        +
        +    // TQWidget state flags (internal, barely documented in tqwidget.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 tqwidget.cpp
        +    typedef uint WFlags;
        +
        +    // documented in tqwidget.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(TQ_WS_X11)
        +	WX11BypassWM		= 0x01000000,
        +	WWinOwnDC		= 0x00000000,
        +	WMacNoSheet             = 0x00000000,
        +        WMacDrawer              = 0x00000000,
        +#elif defined(TQ_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(TQ_WS_X11)
        +        WStyle_Splash           = 0x20000000,
        +#else
        +	WStyle_Splash           = WStyle_NoBorder | WMacNoSheet | WStyle_Tool | WWinOwnDC,
        +#endif
        +	WNoAutoErase		= WRepaintNoErase | WResizeNoErase
        +#ifndef TQT_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 requirements.
        +    // Documented in tqimage.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 tqpainter.cpp
        +    enum BGMode	{				// background mode
        +	TransparentMode,
        +	OpaqueMode
        +    };
        +
        +#ifndef TQT_NO_COMPAT
        +    // documented in tqpainter.cpp
        +    enum PaintUnit {				// paint unit
        +	PixelUnit,
        +	LoMetricUnit, // OBSOLETE
        +	HiMetricUnit, // OBSOLETE
        +	LoEnglishUnit, // OBSOLETE
        +	HiEnglishUnit, // OBSOLETE
        +	TwipsUnit // OBSOLETE
        +    };
        +#endif
        +
        +    // documented in tqstyle.cpp
        +#ifdef TQT_NO_COMPAT
        +    enum GUIStyle {
        +	WindowsStyle = 1,     // ### TQt 4.0: either remove the obsolete enums or clean up compat vs.
        +	MotifStyle = 4        // ### TQT_NO_COMPAT by reordering or combination into one enum.
        +    };
        +#else
        +    enum GUIStyle {
        +	MacStyle, // OBSOLETE
        +	WindowsStyle,
        +	Win3Style, // OBSOLETE
        +	PMStyle, // OBSOLETE
        +	MotifStyle
        +    };
        +#endif
        +
        +    // documented in tqkeysequence.cpp
        +    enum SequenceMatch {
        +	NoMatch,
        +	PartialMatch,
        +	Identical
        +    };
        +
        +    // documented in tqevent.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 tqevent.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_MonBrightnessUp        = 0x010b2,
        +	Key_MonBrightnessDown      = 0x010b3,
        +	Key_KeyboardLightOnOff     = 0x010b4,
        +	Key_KeyboardBrightnessUp   = 0x010b5,
        +	Key_KeyboardBrightnessDown = 0x010b6,
        +
        +	Key_MediaLast = 0x1fff,
        +
        +	Key_unknown = 0xffff
        +    };
        +
        +    // documented in tqcommonstyle.cpp
        +    enum ArrowType {
        +	UpArrow,
        +	DownArrow,
        +	LeftArrow,
        +	RightArrow
        +    };
        +
        +    // documented in tqpainter.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 tqpainter.cpp
        +    enum PenStyle { // pen style
        +	NoPen,
        +	SolidLine,
        +	DashLine,
        +	DotLine,
        +	DashDotLine,
        +	DashDotDotLine,
        +	MPenStyle = 0x0f
        +    };
        +
        +    // documented in tqpainter.cpp
        +    enum PenCapStyle { // line endcap style
        +	FlatCap = 0x00,
        +	SquareCap = 0x10,
        +	RoundCap = 0x20,
        +	MPenCapStyle = 0x30
        +    };
        +
        +    // documented in tqpainter.cpp
        +    enum PenJoinStyle { // line join style
        +	MiterJoin = 0x00,
        +	BevelJoin = 0x40,
        +	RoundJoin = 0x80,
        +	MPenJoinStyle = 0xc0
        +    };
        +
        +    // documented in tqpainter.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 tqstyle.cpp
        +    enum UIEffect {
        +	UI_General,
        +	UI_AnimateMenu,
        +	UI_FadeMenu,
        +	UI_AnimateCombo,
        +	UI_AnimateTooltip,
        +	UI_FadeTooltip,
        +	UI_AnimateToolBox
        +    };
        +
        +    // documented in tqcursor.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
        +
        +    static const TQCursor & arrowCursor;	// standard arrow cursor
        +    static const TQCursor & upArrowCursor;	// upwards arrow
        +    static const TQCursor & crossCursor;	// crosshair
        +    static const TQCursor & waitCursor;	// hourglass/watch
        +    static const TQCursor & ibeamCursor;	// ibeam/text entry
        +    static const TQCursor & sizeVerCursor;	// vertical resize
        +    static const TQCursor & sizeHorCursor;	// horizontal resize
        +    static const TQCursor & sizeBDiagCursor;	// diagonal resize (/)
        +    static const TQCursor & sizeFDiagCursor;	// diagonal resize (\)
        +    static const TQCursor & sizeAllCursor;	// all directions resize
        +    static const TQCursor & blankCursor;	// blank/invisible cursor
        +    static const TQCursor & splitVCursor;	// vertical bar with left-right
        +						// arrows
        +    static const TQCursor & splitHCursor;	// horizontal bar with up-down
        +						// arrows
        +    static const TQCursor & pointingHandCursor;	// pointing hand
        +    static const TQCursor & forbiddenCursor;	// forbidden cursor (slashed circle)
        +    static const TQCursor & whatsThisCursor;  // arrow with a question mark
        +    static const TQCursor & busyCursor;	// arrow with hourglass
        +
        +
        +    enum TextFormat {
        +	PlainText,
        +	RichText,
        +	AutoText,
        +	LogText
        +    };
        +
        +    // Documented in tqtextedit.cpp
        +    enum AnchorAttribute {
        +	AnchorName,
        +	AnchorHref
        +    };
        +
        +    // Documented in tqmainwindow.cpp
        +    enum Dock {
        +	DockUnmanaged,
        +	DockTornOff,
        +	DockTop,
        +	DockBottom,
        +	DockRight,
        +	DockLeft,
        +	DockMinimized
        +#ifndef TQT_NO_COMPAT
        +        ,
        +	Unmanaged = DockUnmanaged,
        +	TornOff = DockTornOff,
        +	Top = DockTop,
        +	Bottom = DockBottom,
        +	Right = DockRight,
        +	Left = DockLeft,
        +	Minimized = DockMinimized
        +#endif
        +    };
        +    // compatibility
        +    typedef Dock ToolBarDock;
        +
        +    // documented in tqdatetime.cpp
        +    enum DateFormat {
        +	TextDate,      // default TQt
        +	ISODate,       // ISO 8601
        +	LocalDate      // locale dependent
        +    };
        +
        +    // documented in tqdatetime.cpp
        +    enum TimeSpec {
        +	LocalTime,
        +	UTC
        +    };
        +
        +    // documented in tqwidget.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 tqstring.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 tqtabwidget.cpp
        +    enum Corner {
        +	TopLeft     = 0x00000,
        +	TopRight    = 0x00001,
        +	BottomLeft  = 0x00002,
        +	BottomRight = 0x00003
        +    };
        +
        +    // "handle" type for system objects. Documented as \internal in
        +    // qapplication.cpp
        +#if defined(TQ_WS_MAC)
        +    typedef void * HANDLE;
        +#elif defined(TQ_WS_WIN)
        +    typedef void *HANDLE;
        +#elif defined(TQ_WS_X11)
        +    typedef unsigned long HANDLE;
        +#endif
        +};
        +
        +
        +class TQ_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/tqnp-h.html b/doc/html/tqnp-h.html new file mode 100644 index 000000000..3ee1e0cd5 --- /dev/null +++ b/doc/html/tqnp-h.html @@ -0,0 +1,231 @@ + + + + + +tqnp.h Include File + + + + + + + +
        + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

        tqnp.h

        + +

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


        +
        +/****************************************************************************
        +** $Id: qt/tqnp.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 requirements will be met:
        +** http://trolltech.com/products/qt/licenses/licensing/opensource/.
        +** If you are unsure which license is appropriate for your use, please
        +** review the following information:
        +** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
        +** or contact the sales department at sales@trolltech.com.
        +**
        +** This file may be used under the terms of the Q Public License as
        +** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
        +** included in the packaging of this file.  Licensees holding valid TQt
        +** Commercial licenses may use this file in accordance with the TQt
        +** Commercial License Agreement provided with the Software.
        +**
        +** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
        +** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
        +** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
        +** herein.
        +**
        +**********************************************************************/
        +
        +#ifndef TQNP_H
        +#define TQNP_H
        +
        +#ifndef QT_H
        +#include "tqwidget.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 {
        +    TQ_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 {
        +    TQ_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/tqnpinstance-members.html b/doc/html/tqnpinstance-members.html new file mode 100644 index 000000000..de65fe313 --- /dev/null +++ b/doc/html/tqnpinstance-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/tqnpinstance.html b/doc/html/tqnpinstance.html new file mode 100644 index 000000000..8f474a66d --- /dev/null +++ b/doc/html/tqnpinstance.html @@ -0,0 +1,320 @@ + + + + +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 <tqnp.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 required (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 require 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 requires 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 requires a window, this function should +return a derived class of TQNPWidget that provides the required +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/tqnplugin-members.html b/doc/html/tqnplugin-members.html new file mode 100644 index 000000000..ecbf9a1c9 --- /dev/null +++ b/doc/html/tqnplugin-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/tqnplugin.html b/doc/html/tqnplugin.html new file mode 100644 index 000000000..7ae91600d --- /dev/null +++ b/doc/html/tqnplugin.html @@ -0,0 +1,180 @@ + + + + +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 <tqnp.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 require 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 require 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/tqnpstream-members.html b/doc/html/tqnpstream-members.html new file mode 100644 index 000000000..f34408d6e --- /dev/null +++ b/doc/html/tqnpstream-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/tqnpstream.html b/doc/html/tqnpstream.html new file mode 100644 index 000000000..2c6437a79 --- /dev/null +++ b/doc/html/tqnpstream.html @@ -0,0 +1,129 @@ + + + + +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 <tqnp.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/tqnpwidget-members.html b/doc/html/tqnpwidget-members.html new file mode 100644 index 000000000..1fee40d0e --- /dev/null +++ b/doc/html/tqnpwidget-members.html @@ -0,0 +1,340 @@ + + + + + +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/tqnpwidget.html b/doc/html/tqnpwidget.html new file mode 100644 index 000000000..846853bba --- /dev/null +++ b/doc/html/tqnpwidget.html @@ -0,0 +1,126 @@ + + + + +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 <tqnp.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 required. 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/tqobject-h.html b/doc/html/tqobject-h.html index 78f4f0999..c708329f7 100644 --- a/doc/html/tqobject-h.html +++ b/doc/html/tqobject-h.html @@ -82,7 +82,7 @@ body { background: #ffffff; color: black; } #include "ntqwindowdefs.h" #include "tqstring.h" #include "tqevent.h" -#include "ntqnamespace.h" +#include "tqnamespace.h" #endif // QT_H #define TQT_TR_NOOP(x) (x) diff --git a/doc/html/tqobject.html b/doc/html/tqobject.html index 8372a464d..9893db7f6 100644 --- a/doc/html/tqobject.html +++ b/doc/html/tqobject.html @@ -36,7 +36,7 @@ body { background: #ffffff; color: black; }

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

        #include <tqobject.h>

        Inherits TQt. --

        Inherited by TQAccel, TQAccessibleObject, TQAction, TQApplication, TQAssistantClient, TQDataPump, TQWidget, TQCanvas, TQStyle, TQClipboard, TQDns, TQLayout, TQDragObject, TQEditorFactory, TQEventLoop, TQFileIconProvider, TQNetworkProtocol, TQNetworkOperation, TQNPInstance, TQObjectCleanupHandler, TQProcess, TQServerSocket, TQSessionManager, TQSignal, TQSignalMapper, TQSocket, TQSocketNotifier, TQSound, TQSqlDatabase, TQSqlDriver, TQSqlForm, TQStyleSheet, TQTimer, TQToolTipGroup, TQTranslator, TQUrlOperator, and TQValidator. +-

        Inherited by TQAccel, TQAccessibleObject, TQAction, TQApplication, TQAssistantClient, TQDataPump, TQWidget, TQCanvas, TQStyle, TQClipboard, TQDns, TQLayout, TQDragObject, TQEditorFactory, TQEventLoop, TQFileIconProvider, TQNetworkProtocol, 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

          @@ -572,7 +572,7 @@ returns FALSE. s->inherits( "TQRangeControl" ); // returns FALSE -

          (TQRangeControl is not a TQObject.) +

          (TQRangeControl is not a TQObject.)

          See also isA() and metaObject().

          Examples: table/statistics/statistics.cpp, themes/metal.cpp, and themes/wood.cpp. @@ -678,7 +678,7 @@ 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] +

          TQMetaObject * TQObject::metaObject () const [virtual]

          Returns a pointer to the meta object of this object. @@ -726,7 +726,7 @@ 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(). +

          See also setProperty(), TQVariant::isValid(), metaObject(), TQMetaObject::propertyNames(), and TQMetaObject::property().

          TQObjectList * TQObject::queryList ( const char * inheritsClass = 0, const char * objName = 0, bool regexpMatch = TRUE, bool recursiveSearch = TRUE ) const

          @@ -813,7 +813,7 @@ Sets the value of the object's name property to value. FALSE.

          Information about all available properties is provided through the metaObject(). -

          See also property(), metaObject(), TQMetaObject::propertyNames(), and TQMetaObject::property(). +

          See also property(), metaObject(), TQMetaObject::propertyNames(), and TQMetaObject::property().

          bool TQObject::signalsBlocked () const

          diff --git a/doc/html/tqpixmap-h.html b/doc/html/tqpixmap-h.html index b406d9b71..ea688feaa 100644 --- a/doc/html/tqpixmap-h.html +++ b/doc/html/tqpixmap-h.html @@ -81,7 +81,7 @@ body { background: #ffffff; color: black; } #include "tqpaintdevice.h" #include "tqcolor.h" // char*->TQColor conversion #include "tqstring.h" // char*->TQString conversion -#include "ntqnamespace.h" +#include "tqnamespace.h" #endif // QT_H class TQPixmapPrivate; diff --git a/doc/html/tqpoint.html b/doc/html/tqpoint.html index f20c671b5..d0b85134d 100644 --- a/doc/html/tqpoint.html +++ b/doc/html/tqpoint.html @@ -99,9 +99,9 @@ approximation of the length of the TQPoint interpreted as a vector.

          Example:

                   //TQPoint oldPos is defined somewhere else
          -        MyWidget::mouseMoveEvent( TQMouseEvent *e )
          +        MyWidget::mouseMoveEvent( TQMouseEvent *e )
                   {
          -            TQPoint vector = e->pos() - oldPos;
          +            TQPoint vector = e->pos() - oldPos;
                       if ( vector.manhattanLength() > 3 )
                       ... //mouse has moved more than 3 pixels since oldPos
                   }
          diff --git a/doc/html/tqpopupmenu.html b/doc/html/tqpopupmenu.html
          index 9158f3699..47698fc9f 100644
          --- a/doc/html/tqpopupmenu.html
          +++ b/doc/html/tqpopupmenu.html
          @@ -213,7 +213,7 @@ You can connect it to any slot that sets up the menu contents
           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 ntqnamespace.h. +

          See also setAccel(), TQAccel, and tqnamespace.h.

          void TQPopupMenu::activated ( int id ) [signal]

          @@ -438,7 +438,7 @@ 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 ntqnamespace.h. +

          See also removeItem(), changeItem(), setAccel(), connectItem(), TQAccel, and tqnamespace.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 ) @@ -449,7 +449,7 @@ This is an overloaded member function, provided for convenience. It behaves esse 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 ntqnamespace.h. +

          See also removeItem(), changeItem(), setAccel(), connectItem(), TQAccel, and tqnamespace.h.

          int TQMenuData::insertItem ( const TQPixmap & pixmap, const TQObject * receiver, const char * member, const TQKeySequence & accel = 0, int id = -1, int index = -1 )

          @@ -473,7 +473,7 @@ the item. The item is connected to the member slot in the receiver<

          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 ntqnamespace.h. +

          See also removeItem(), changeItem(), setAccel(), connectItem(), TQAccel, and tqnamespace.h.

          int TQMenuData::insertItem ( const TQString & text, int id = -1, int index = -1 )

          @@ -713,7 +713,7 @@ Removes the menu item at position index. 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 ntqnamespace.h contains a list of key +added). The header file tqnamespace.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 diff --git a/doc/html/tqprintdlg-m.png b/doc/html/tqprintdlg-m.png new file mode 100644 index 000000000..dff011679 Binary files /dev/null and b/doc/html/tqprintdlg-m.png differ diff --git a/doc/html/tqrangecontrol-h.html b/doc/html/tqrangecontrol-h.html new file mode 100644 index 000000000..d5d7d68c6 --- /dev/null +++ b/doc/html/tqrangecontrol-h.html @@ -0,0 +1,239 @@ + + + + + +tqrangecontrol.h Include File + + + + + + + +
          + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

          tqrangecontrol.h

          + +

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


          +
          +/****************************************************************************
          +** $Id: qt/tqrangecontrol.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 requirements will be met:
          +** http://trolltech.com/products/qt/licenses/licensing/opensource/.
          +** If you are unsure which license is appropriate for your use, please
          +** review the following information:
          +** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
          +** or contact the sales department at sales@trolltech.com.
          +**
          +** This file may be used under the terms of the Q Public License as
          +** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
          +** included in the packaging of this file.  Licensees holding valid TQt
          +** Commercial licenses may use this file in accordance with the TQt
          +** Commercial License Agreement provided with the Software.
          +**
          +** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
          +** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
          +** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
          +** herein.
          +**
          +**********************************************************************/
          +
          +#ifndef TQRANGECONTROL_H
          +#define TQRANGECONTROL_H
          +
          +#ifndef QT_H
          +#include "tqglobal.h"
          +#include "tqframe.h"
          +#endif // QT_H
          +
          +#ifndef TQT_NO_RANGECONTROL
          +
          +
          +class TQRangeControlPrivate;
          +
          +
          +class TQ_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(TQ_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 // TQT_NO_RANGECONTROL
          +
          +#ifndef TQT_NO_SPINWIDGET
          +
          +class TQSpinWidgetPrivate;
          +class TQ_EXPORT TQSpinWidget : public TQWidget
          +{
          +    TQ_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 TQT_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(TQ_DISABLE_COPY)
          +    TQSpinWidget( const TQSpinWidget& );
          +    TQSpinWidget& operator=( const TQSpinWidget& );
          +#endif
          +};
          +
          +#endif // TQT_NO_SPINWIDGET
          +
          +#endif // TQRANGECONTROL_H
          +
          + +


          + +
          Copyright © 2007 +TrolltechTrademarks +
          TQt 3.3.8
          +
          + diff --git a/doc/html/tqrangecontrol-members.html b/doc/html/tqrangecontrol-members.html new file mode 100644 index 000000000..1e867a2dc --- /dev/null +++ b/doc/html/tqrangecontrol-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/tqrangecontrol.html b/doc/html/tqrangecontrol.html new file mode 100644 index 000000000..c792188fd --- /dev/null +++ b/doc/html/tqrangecontrol.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 <tqrangecontrol.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/tqresizeevent-members.html b/doc/html/tqresizeevent-members.html new file mode 100644 index 000000000..3320059e1 --- /dev/null +++ b/doc/html/tqresizeevent-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/tqresizeevent.html b/doc/html/tqresizeevent.html new file mode 100644 index 000000000..a66264a70 --- /dev/null +++ b/doc/html/tqresizeevent.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 <tqevent.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/tqscrollbar-h.html b/doc/html/tqscrollbar-h.html index 1c6773bba..6faedd4c6 100644 --- a/doc/html/tqscrollbar-h.html +++ b/doc/html/tqscrollbar-h.html @@ -81,7 +81,7 @@ class TQTimer; #ifndef QT_H #include "tqwidget.h" -#include "ntqrangecontrol.h" +#include "tqrangecontrol.h" #endif // QT_H #ifndef TQT_NO_SCROLLBAR diff --git a/doc/html/tqscrollbar-members.html b/doc/html/tqscrollbar-members.html index df2e60497..a11719dfa 100644 --- a/doc/html/tqscrollbar-members.html +++ b/doc/html/tqscrollbar-members.html @@ -38,8 +38,8 @@ body { background: #ffffff; color: black; }
        • TQScrollBar()
        • ~TQScrollBar()
        • acceptDrops() -
        • addLine() -
        • addPage() +
        • addLine() +
        • addPage()
        • adjustSize()
        • autoMask()
        • backgroundBrush() @@ -49,7 +49,7 @@ body { background: #ffffff; color: black; }
        • backgroundPixmap()
        • baseSize()
        • blockSignals() -
        • bound() +
        • bound()
        • caption()
        • checkConnectArgs()
        • child() @@ -78,7 +78,7 @@ body { background: #ffffff; color: black; }
        • deleteLater()
        • destroy()
        • destroyed() -
        • directSetValue() +
        • directSetValue()
        • disconnect()
        • disconnectNotify()
        • dragEnterEvent() @@ -212,14 +212,14 @@ body { background: #ffffff; color: black; }
        • parentWidget()
        • polish()
        • pos() -
        • positionFromValue() +
        • positionFromValue()
        • prevLine()
        • prevPage() -
        • prevValue() +
        • prevValue()
        • property()
        • queryList()
        • raise() -
        • rangeChange() +
        • rangeChange()
        • recreate()
        • rect()
        • releaseKeyboard() @@ -280,11 +280,11 @@ body { background: #ffffff; color: black; }
        • setPaletteBackgroundPixmap()
        • setPaletteForegroundColor()
        • setProperty() -
        • setRange() +
        • setRange()
        • setShown()
        • setSizeIncrement()
        • setSizePolicy() -
        • setSteps() +
        • setSteps()
        • setStyle()
        • setTabOrder()
        • setTracking() @@ -311,11 +311,11 @@ body { background: #ffffff; color: black; }
        • sliderStart()
        • stackUnder()
        • startTimer() -
        • stepChange() +
        • stepChange()
        • style()
        • styleChange() -
        • subtractLine() -
        • subtractPage() +
        • subtractLine() +
        • subtractPage()
        • tabletEvent()
        • testWFlags()
        • timerEvent() @@ -330,9 +330,9 @@ body { background: #ffffff; color: black; }
        • updateGeometry()
        • updateMask()
        • value() -
        • valueChange() +
        • valueChange()
        • valueChanged() -
        • valueFromPosition() +
        • valueFromPosition()
        • visibleRect()
        • wheelEvent()
        • width() diff --git a/doc/html/tqscrollbar.html b/doc/html/tqscrollbar.html index aff6a73b8..e08d30862 100644 --- a/doc/html/tqscrollbar.html +++ b/doc/html/tqscrollbar.html @@ -34,7 +34,7 @@ body { background: #ffffff; color: black; }

          The TQScrollBar widget provides a vertical or horizontal scroll bar. More...

          #include <tqscrollbar.h> -

          Inherits TQWidget and TQRangeControl. +

          Inherits TQWidget and TQRangeControl.

          List of all member functions.

          Public Members

            @@ -97,7 +97,7 @@ 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. +the current value of a range control.

            Scroll bars include four separate controls:

            • The line-up and line-down controls are little buttons @@ -114,18 +114,18 @@ 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 +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 +

            In addition to the access functions from TQRangeControl, TQScrollBar provides a comprehensive set of signals:

            Signal Emitted when @@ -141,7 +141,7 @@ interaction. the user releases the slider.
            nextLine() the scroll bar has moved one line down or right. Line is -defined in TQRangeControl. +defined in TQRangeControl.
            prevLine() the scroll bar has moved one line up or left.
            nextPage() @@ -186,7 +186,7 @@ constructor. 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()). +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 @@ -322,24 +322,24 @@ the new scroll bar value as an argument.

            Get this property's value with draggingSlider().

            int lineStep

            This property holds the line step. -

            When setting lineStep, the virtual stepChange() function will be +

            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(). +

            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(). +

            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(). +

            See also setRange().

            Set this property's value with setMinValue() and get this property's value with minValue().

            Orientation orientation

            @@ -349,10 +349,10 @@ adjusted if necessary to ensure that the range remains valid.

            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 +

            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(). +

            See also TQRangeControl::setSteps(), lineStep, and setRange().

            Set this property's value with setPageStep() and get this property's value with pageStep().

            bool tracking

            @@ -367,7 +367,7 @@ the slider.

            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(). +

            See also TQRangeControl::value() and prevValue().


            diff --git a/doc/html/tqscrollview.html b/doc/html/tqscrollview.html index f191c63b2..7b37b1c29 100644 --- a/doc/html/tqscrollview.html +++ b/doc/html/tqscrollview.html @@ -453,7 +453,7 @@ contents.

            int TQScrollView::contentsHeight () const

            Returns the height of the contents area. See the "contentsHeight" property for details. -

            void TQScrollView::contentsMouseDoubleClickEvent ( TQMouseEvent * e ) [virtual protected] +

            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 @@ -461,7 +461,7 @@ point on the contents.

            The default implementation generates a normal mouse press event.

            Reimplemented in TQListView. -

            void TQScrollView::contentsMouseMoveEvent ( TQMouseEvent * e ) [virtual protected] +

            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 @@ -469,7 +469,7 @@ on the contents.

            Examples: canvas/canvas.cpp and chart/canvasview.cpp.

            Reimplemented in TQListView. -

            void TQScrollView::contentsMousePressEvent ( TQMouseEvent * e ) [virtual protected] +

            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 @@ -477,7 +477,7 @@ on the contents.

            Examples: canvas/canvas.cpp and chart/canvasview.cpp.

            Reimplemented in TQListView. -

            void TQScrollView::contentsMouseReleaseEvent ( TQMouseEvent * e ) [virtual protected] +

            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 @@ -824,7 +824,7 @@ contents. Reimplement this if drawContents() is too (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] +

            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. diff --git a/doc/html/tqsessionmanager.html b/doc/html/tqsessionmanager.html index bc759fe82..cb49b2496 100644 --- a/doc/html/tqsessionmanager.html +++ b/doc/html/tqsessionmanager.html @@ -147,7 +147,7 @@ might be implemented:

             void MyApplication::commitData( TQSessionManager& sm ) {
                 if ( sm.allowsInteraction() ) {
            -        switch ( TQMessageBox::warning(
            +        switch ( TQMessageBox::warning(
                                 yourMainWindow,
                                 tr("Application Name"),
                                 tr("Save changes to document Foo?"),
            diff --git a/doc/html/tqsimplerichtext-h.html b/doc/html/tqsimplerichtext-h.html
            index 2061a3f53..6d8ec1a07 100644
            --- a/doc/html/tqsimplerichtext-h.html
            +++ b/doc/html/tqsimplerichtext-h.html
            @@ -78,7 +78,7 @@ body { background: #ffffff; color: black; }
             #define TQSIMPLERICHTEXT_H
             
             #ifndef QT_H
            -#include "ntqnamespace.h"
            +#include "tqnamespace.h"
             #include "tqstring.h"
             #include "tqregion.h"
             #endif // QT_H
            diff --git a/doc/html/tqsize-h.html b/doc/html/tqsize-h.html
            index 654cc71ed..b1883f8f6 100644
            --- a/doc/html/tqsize-h.html
            +++ b/doc/html/tqsize-h.html
            @@ -85,7 +85,7 @@ class TQ_EXPORT TQSize
             // ### Make TQSize inherit TQt in TQt 4.0
             {
             public:
            -    // ### Move this enum to ntqnamespace.h in TQt 4.0
            +    // ### Move this enum to tqnamespace.h in TQt 4.0
                 enum ScaleMode {
             	ScaleFree,
             	ScaleMin,
            diff --git a/doc/html/tqsizegrip.html b/doc/html/tqsizegrip.html
            index c2d03d342..c692555b3 100644
            --- a/doc/html/tqsizegrip.html
            +++ b/doc/html/tqsizegrip.html
            @@ -76,13 +76,13 @@ Constructs a resize corner called name, as a child widget of parent
             
             Destroys the size grip.
             
            -

            void TQSizeGrip::mouseMoveEvent ( TQMouseEvent * e ) [virtual protected] +

            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] +

            void TQSizeGrip::mousePressEvent ( TQMouseEvent * e ) [virtual protected]

            Primes the resize operation. The event is in e. diff --git a/doc/html/tqslider-h.html b/doc/html/tqslider-h.html index 301e45345..d029e4d30 100644 --- a/doc/html/tqslider-h.html +++ b/doc/html/tqslider-h.html @@ -79,7 +79,7 @@ body { background: #ffffff; color: black; } #ifndef QT_H #include "tqwidget.h" -#include "ntqrangecontrol.h" +#include "tqrangecontrol.h" #endif // QT_H #ifndef TQT_NO_SLIDER diff --git a/doc/html/tqslider-members.html b/doc/html/tqslider-members.html index 5aeb4ff70..71cf3db30 100644 --- a/doc/html/tqslider-members.html +++ b/doc/html/tqslider-members.html @@ -38,8 +38,8 @@ body { background: #ffffff; color: black; }
          • TQSlider()
          • ~TQSlider()
          • acceptDrops() -
          • addLine() -
          • addPage() +
          • addLine() +
          • addPage()
          • addStep()
          • adjustSize()
          • autoMask() @@ -50,7 +50,7 @@ body { background: #ffffff; color: black; }
          • backgroundPixmap()
          • baseSize()
          • blockSignals() -
          • bound() +
          • bound()
          • caption()
          • checkConnectArgs()
          • child() @@ -79,7 +79,7 @@ body { background: #ffffff; color: black; }
          • deleteLater()
          • destroy()
          • destroyed() -
          • directSetValue() +
          • directSetValue()
          • disconnect()
          • disconnectNotify()
          • dragEnterEvent() @@ -210,8 +210,8 @@ body { background: #ffffff; color: black; }
          • parentWidget()
          • polish()
          • pos() -
          • positionFromValue() -
          • prevValue() +
          • positionFromValue() +
          • prevValue()
          • property()
          • queryList()
          • raise() @@ -276,11 +276,11 @@ body { background: #ffffff; color: black; }
          • setPaletteBackgroundPixmap()
          • setPaletteForegroundColor()
          • setProperty() -
          • setRange() +
          • setRange()
          • setShown()
          • setSizeIncrement()
          • setSizePolicy() -
          • setSteps() +
          • setSteps()
          • setStyle()
          • setTabOrder()
          • setTickInterval() @@ -309,11 +309,11 @@ body { background: #ffffff; color: black; }
          • sliderStart()
          • stackUnder()
          • startTimer() -
          • stepChange() +
          • stepChange()
          • style()
          • styleChange() -
          • subtractLine() -
          • subtractPage() +
          • subtractLine() +
          • subtractPage()
          • subtractStep()
          • tabletEvent()
          • testWFlags() @@ -333,7 +333,7 @@ body { background: #ffffff; color: black; }
          • value()
          • valueChange()
          • valueChanged() -
          • valueFromPosition() +
          • valueFromPosition()
          • visibleRect()
          • wheelEvent()
          • width() diff --git a/doc/html/tqslider.html b/doc/html/tqslider.html index f63c4155d..7cfdf3f1e 100644 --- a/doc/html/tqslider.html +++ b/doc/html/tqslider.html @@ -34,7 +34,7 @@ body { background: #ffffff; color: black; }

            The TQSlider widget provides a vertical or horizontal slider. More...

            #include <tqslider.h> -

            Inherits TQWidget and TQRangeControl. +

            Inherits TQWidget and TQRangeControl.

            List of all member functions.

            Public Members

          • Now that we have a barrier, there are three ways to miss. We test for the third, too. -

                void CannonField::mousePressEvent( TQMouseEvent *e )
            +

                void CannonField::mousePressEvent( TQMouseEvent *e )
                 {
            -        if ( e->button() != LeftButton )
            +        if ( e->button() != LeftButton )
                         return;
            -        if ( barrelHit( e->pos() ) )
            +        if ( barrelHit( e->pos() ) )
                         barrelPressed = TRUE;
                 }
             
            @@ -111,11 +111,11 @@ 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 )
            +

                void CannonField::mouseMoveEvent( TQMouseEvent *e )
                 {
                     if ( !barrelPressed )
                         return;
            -        TQPoint pnt = e->pos();
            +        TQPoint pnt = e->pos();
                     if ( pnt.x() <= 0 )
                         pnt.setX( 1 );
                     if ( pnt.y() >= height() )
            @@ -138,9 +138,9 @@ 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 )
            +

                void CannonField::mouseReleaseEvent( TQMouseEvent *e )
                 {
            -        if ( e->button() == LeftButton )
            +        if ( e->button() == LeftButton )
                         barrelPressed = FALSE;
                 }
             
            diff --git a/doc/html/tutorial2-03.html b/doc/html/tutorial2-03.html index 26aa4864a..30eef5ceb 100644 --- a/doc/html/tutorial2-03.html +++ b/doc/html/tutorial2-03.html @@ -53,7 +53,7 @@ of chart has a (relative) position stored in the m_propoints array.

                #include <tqcolor.h>
            -    #include <ntqnamespace.h>
            +    #include <tqnamespace.h>
                 #include <tqstring.h>
                 #include <tqvaluevector.h>
             
            @@ -61,9 +61,9 @@ of chart has a (relative) position stored in the m_propoints array. #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 tqcolor.h so that we can hold the -paint color and text color in the Element class. The use of ntqnamespace.h is slightly obscure. Most TQt classes are derived from the +paint color and text color in the Element class. The use of tqnamespace.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 ntqnamespace.h to have access to +enumerations. The Element class does not derive from TQt, so we need to include tqnamespace.h to have access to the TQt enum names. An alternative approach would have been to have made Element a TQt subclass. We include tqstring.h to make use of TQt's Unicode strings. As a convenience we will typedef a vector container for Elements, which is why we diff --git a/doc/html/tutorial2-05.html b/doc/html/tutorial2-05.html index e4b2ea32b..3271b7df7 100644 --- a/doc/html/tutorial2-05.html +++ b/doc/html/tutorial2-05.html @@ -332,7 +332,7 @@ already have a unique color (which they can change of course). msg = TQString( "Chart '%1'\n" ).arg( m_filename ); msg += "has been changed."; - int x = TQMessageBox::information( this, "Chart -- Unsaved Changes", + int x = TQMessageBox::information( this, "Chart -- Unsaved Changes", msg, "&Save", "Cancel", "&Abandon", 0, 1 ); switch( x ) { @@ -405,7 +405,7 @@ the user wishes to load. If we get a filename we call load(). if ( !filename.isEmpty() ) { int answer = 0; if ( TQFile::exists( filename ) ) - answer = TQMessageBox::warning( + answer = TQMessageBox::warning( this, "Chart -- Overwrite File", TQString( "Overwrite\n\'%1\'?" ). arg( filename ), @@ -422,7 +422,7 @@ the user wishes to load. If we get a filename we call load().

            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 +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 diff --git a/doc/html/tutorial2-06.html b/doc/html/tutorial2-06.html index b3e21f675..3345bd76c 100644 --- a/doc/html/tutorial2-06.html +++ b/doc/html/tutorial2-06.html @@ -246,9 +246,9 @@ with this text item, and provided a getter and setter for this value. m_elements( elements ) {} protected: - void viewportResizeEvent( TQResizeEvent *e ); - void contentsMousePressEvent( TQMouseEvent *e ); - void contentsMouseMoveEvent( TQMouseEvent *e ); + void viewportResizeEvent( TQResizeEvent *e ); + void contentsMousePressEvent( TQMouseEvent *e ); + void contentsMouseMoveEvent( TQMouseEvent *e ); void contentsContextMenuEvent( TQContextMenuEvent *e ); private: @@ -282,9 +282,9 @@ to the right type and then exec()ute the options menu at the cursor position.

            Handling Resizing

            -

                void CanvasView::viewportResizeEvent( TQResizeEvent *e )
            +

                void CanvasView::viewportResizeEvent( TQResizeEvent *e )
                 {
            -        canvas()->resize( e->size().width(), e->size().height() );
            +        canvas()->resize( e->size().width(), e->size().height() );
                     ((ChartForm*)parent())->drawElements();
                 }
             
            @@ -297,13 +297,13 @@ drawn correctly.

            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 )
            +

                void CanvasView::contentsMousePressEvent( TQMouseEvent *e )
                 {
            -        TQCanvasItemList list = canvas()->collisions( e->pos() );
            +        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();
            +                m_pos = e->pos();
                             return;
                         }
                     m_movingItem = 0;
            @@ -313,12 +313,12 @@ drag and release at the new position.
             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 )
            +

                void CanvasView::contentsMouseMoveEvent( TQMouseEvent *e )
                 {
                     if ( m_movingItem ) {
            -            TQPoint offset = e->pos() - m_pos;
            +            TQPoint offset = e->pos() - m_pos;
                         m_movingItem->moveBy( offset.x(), offset.y() );
            -            m_pos = e->pos();
            +            m_pos = e->pos();
                         ChartForm *form = (ChartForm*)parent();
                         form->setChanged( TRUE );
                         int chartType = form->chartType();
            diff --git a/doc/html/whatsthis b/doc/html/whatsthis
            index e1630fe1f..1264bf28e 100644
            --- a/doc/html/whatsthis
            +++ b/doc/html/whatsthis
            @@ -118,9 +118,9 @@ Encapsulation of a set of text styles. | TQStyleSheetItem
             Enums and static functions relating to accessibility. | TQAccessible
             Error message display dialog. | TQErrorMessage
             Event parameters for child object events. | TQChildEvent
            -Event parameters for move events. | QMoveEvent
            +Event parameters for move events. | TQMoveEvent
             Event parameters for paint events. | TQPaintEvent
            -Event parameters for resize events. | QResizeEvent
            +Event parameters for resize events. | TQResizeEvent
             Event parameters for widget focus events. | TQFocusEvent
             Event which is sent after a widget is hidden. | TQHideEvent
             Event which is sent to the widget when a drag and drop first drags onto the widget. | TQDragEnterEvent
            @@ -164,7 +164,7 @@ Implementation of the HTTP protocol. | TQHttp
             Implements a list view item. | TQListViewItem
             Implements a list/tree view. | TQListView
             Implements a splitter widget. | QSplitter
            -Implements an Appearance Manager style. | QMacStyle
            +Implements an Appearance Manager style. | TQMacStyle
             Implements parts of the TQAccessibleInterface for TQObjects. | TQAccessibleObject
             Incremental image decoder for a specific image format. | TQImageFormat
             Incremental image decoder for all supported image formats. | TQImageDecoder
            @@ -172,7 +172,7 @@ Incremental loading of animations or images, signalling as it progresses. | TQMo
             Information about a paint device. | TQPaintDeviceMetrics
             Information about the features of the DOM implementation. | TQDomImplementation
             Information about the fonts available in the underlying window system. | TQFontDatabase
            -Integer value within a range. | QRangeControl
            +Integer value within a range. | TQRangeControl
             Interface for XML readers (i.e. parsers). | TQXmlReader
             Interface to report DTD content of XML data. | TQXmlDTDHandler
             Interface to report declaration content of XML data. | TQXmlDeclHandler
            @@ -223,9 +223,9 @@ Maps open-standard MIME to Window Clipboard formats. | TQWindowsMime
             Means of executing and manipulating SQL statements. | TQSqlQuery
             Means of using TQt Assistant as an application's help tool. | TQAssistantClient
             Means of using comboboxes in TQTables. | TQComboTableItem
            -Meta information about TQt objects. | QMetaObject
            +Meta information about TQt objects. | TQMetaObject
             Microsoft Windows-like look and feel. | TQWindowsStyle
            -Modal dialog with a short message, an icon, and some buttons. | QMessageBox
            +Modal dialog with a short message, an icon, and some buttons. | TQMessageBox
             Monochrome (1-bit depth) pixmaps. | TQBitmap
             More sophisticated Motif-ish look and feel. | TQMotifPlusStyle
             Motif look and feel. | TQMotifStyle
            @@ -251,7 +251,7 @@ Parameters for loading and saving images. | TQImageIO
             Parameters that describe a Tablet event. | TQTabletEvent
             Parameters that describe a close event. | TQCloseEvent
             Parameters that describe a context menu event. | TQContextMenuEvent
            -Parameters that describe a mouse event. | QMouseEvent
            +Parameters that describe a mouse event. | TQMouseEvent
             Parameters that describe a timer event. | TQTimerEvent
             Parameters that describe a wheel event. | QWheelEvent
             Pattern matching using regular expressions. | TQRegExp
            @@ -264,9 +264,9 @@ Polygon on a TQCanvas. | TQCanvasPolygon
             Polygonal canvas item on a TQCanvas. | TQCanvasPolygonalItem
             Popup menu widget. | TQPopupMenu
             Powerful single-page rich text editor. | TQTextEdit
            -TQObject that is a web browser plugin. | QNPInstance
            +TQObject that is a web browser plugin. | TQNPInstance
             TQPtrList of TQObjects. | TQObjectList
            -TQWidget that is a web browser plugin window. | QNPWidget
            +TQWidget that is a web browser plugin window. | TQNPWidget
             Quick-access button to commands or options, usually used inside a TQToolBar. | TQToolButton
             Radio button with a text or pixmap label. | TQRadioButton
             Range checking of floating-point numbers. | TQDoubleValidator
            @@ -309,9 +309,9 @@ Stack of widgets of which only the top widget is user-visible. | TQWidgetStack
             State-based decoder. | TQTextDecoder
             State-based encoder. | TQTextEncoder
             Stores information about URLs. | TQUrlInfo
            -Stores meta data about a property. | QMetaProperty
            +Stores meta data about a property. | TQMetaProperty
             Stores meta data associated with a SQL field. | TQSqlFieldInfo
            -Stream of data provided to a QNPInstance by the browser. | QNPStream
            +Stream of data provided to a TQNPInstance by the browser. | TQNPStream
             String objects using constant Unicode data. | TQConstString
             Support for custom events. | TQCustomEvent
             Support for socket callbacks. | TQSocketNotifier
            @@ -355,7 +355,7 @@ The cell content for TQTable cells. | TQTableItem
             The display format of an OpenGL rendering context. | TQGLFormat
             The input data for the TQXmlReader subclasses. | TQXmlInputSource
             The look and feel of a GUI. | TQStyle
            -The main factory for plugin objects. | QNPlugin
            +The main factory for plugin objects. | TQNPlugin
             The representation of the DTD in the document tree. | TQDomDocumentType
             The structures in a TQTabBar. | TQTab
             Time editor. | TQTimeEdit
            diff --git a/doc/html/xform-example.html b/doc/html/xform-example.html
            index 98077be81..8c68a619d 100644
            --- a/doc/html/xform-example.html
            +++ b/doc/html/xform-example.html
            @@ -141,7 +141,7 @@ private:
                 TQSizePolicy sizePolicy() const;
                 TQSize sizeHint() const;
                 void paintEvent( TQPaintEvent * );
            -    void resizeEvent( TQResizeEvent * );
            +    void resizeEvent( TQResizeEvent * );
                 TQWMatrix  mtx;                      // coordinate transform matrix
                 TQString   text;                     // text to be displayed
                 TQPixmap   pix;                      // pixmap to be displayed
            @@ -182,13 +182,13 @@ private:
             
                 rotLCD->display( "  0'" );
             
            -    rotS->setRange( -180, 180 );
            +    rotS->setRange( -180, 180 );
                 rotS->setValue( 0 );
                 connect( rotS, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(newMtx()) );
             
                 shearLCD->display( "0.00" );
             
            -    shearS->setRange( -25, 25 );
            +    shearS->setRange( -25, 25 );
                 shearS->setValue( 0 );
                 connect( shearS, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(newMtx()) );
             
            @@ -217,7 +217,7 @@ private:
                 magLCD->display( "100" );
                 magS = new TQSlider( TQSlider::Horizontal, optionals_other,
                                        "magnifySlider" );
            -    magS->setRange( 0, 800 );
            +    magS->setRange( 0, 800 );
                 connect( magS, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(newMtx()) );
                 magS->setValue( 0 );
                 connect( magS, TQ_SIGNAL(valueChanged(int)), magLCD, TQ_SLOT(display(int)));
            @@ -355,7 +355,7 @@ void ShowXForm::paintEvent( void ShowXForm::resizeEvent( TQResizeEvent * )
            +void ShowXForm::resizeEvent( TQResizeEvent * )
             {
                 eraseRect = TQRect( width()/2, height()/2, 0, 0 );
                 repaint(rect());
            diff --git a/doc/man/man3/tqaccel.3qt b/doc/man/man3/tqaccel.3qt
            index c97eec8df..7373921e7 100644
            --- a/doc/man/man3/tqaccel.3qt
            +++ b/doc/man/man3/tqaccel.3qt
            @@ -116,7 +116,7 @@ In most cases, you will not need to use this class directly. Use the TQAction cl
             .PP
             A TQAccel contains a list of accelerator items that can be manipulated using insertItem(), removeItem(), clear(), key() and findKey().
             .PP
            -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, \fCCTRL + Key_P\fR could be a shortcut for printing a document. The key codes are listed in ntqnamespace.h. As an alternative, use UNICODE_ACCEL with the unicode code point of the character. For example, \fCUNICODE_ACCEL + 'A'\fR gives the same accelerator as Key_A.
            +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, \fCCTRL + Key_P\fR could be a shortcut for printing a document. The key codes are listed in tqnamespace.h. As an alternative, use UNICODE_ACCEL with the unicode code point of the character. For example, \fCUNICODE_ACCEL + 'A'\fR gives the same accelerator as Key_A.
             .PP
             When an accelerator key is pressed, the accelerator sends out the signal activated() with a number that identifies this particular accelerator item. Accelerator items can also be individually connected, so that two different keys will activate two different slots (see connectItem() and disconnectItem()).
             .PP
            diff --git a/doc/man/man3/tqapplication.3qt b/doc/man/man3/tqapplication.3qt
            index b85395d29..3761797b7 100644
            --- a/doc/man/man3/tqapplication.3qt
            +++ b/doc/man/man3/tqapplication.3qt
            @@ -613,7 +613,7 @@ Displays a simple message box about Qt. The message includes the version number
             .PP
             This is useful for inclusion in the Help menu of an application. See the examples/menu/menu.cpp example.
             .PP
            -This function is a convenience slot for QMessageBox::aboutTQt().
            +This function is a convenience slot for TQMessageBox::aboutTQt().
             .SH "void QApplication::aboutToQuit ()\fC [signal]\fR"
             This signal is emitted when the application is about to quit the main event loop, e.g. when the event loop level drops to zero. This may happen either after a call to quit() from inside the application or when the users shuts down the entire desktop session.
             .PP
            @@ -873,7 +873,7 @@ Enters the main event loop and waits until exit() is called or the main widget i
             .PP
             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.
             .PP
            -Generally speaking, no user interaction can take place before calling exec(). As a special case, modal widgets like QMessageBox can be used before calling exec(), because modal widgets call exec() to start a local event loop.
            +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.
             .PP
             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().
             .PP
            @@ -1169,7 +1169,7 @@ The event is \fInot\fR deleted when the event has been sent. The normal approach
             .PP
             .nf
             .br
            -    QMouseEvent me( TQEvent::MouseButtonPress, pos, 0, 0 );
            +    TQMouseEvent me( TQEvent::MouseButtonPress, pos, 0, 0 );
             .br
                 QApplication::sendEvent( mainWindow, &me );
             .br
            diff --git a/doc/man/man3/tqcanvas.3qt b/doc/man/man3/tqcanvas.3qt
            index b8a425717..2a44079d3 100644
            --- a/doc/man/man3/tqcanvas.3qt
            +++ b/doc/man/man3/tqcanvas.3qt
            @@ -181,7 +181,7 @@ 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.
             .IP
             .TP
            -Widgets provide a lot more functionality, such as input (TQKeyEvent, QMouseEvent etc.) and layout management (TQGridLayout etc.).
            +Widgets provide a lot more functionality, such as input (TQKeyEvent, TQMouseEvent etc.) and layout management (TQGridLayout etc.).
             .IP
             .PP
             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.
            diff --git a/doc/man/man3/tqcanvasview.3qt b/doc/man/man3/tqcanvasview.3qt
            index 66253369e..f01a9d1da 100644
            --- a/doc/man/man3/tqcanvasview.3qt
            +++ b/doc/man/man3/tqcanvasview.3qt
            @@ -58,7 +58,7 @@ If you want users to be able to interact with a canvas view, subclass TQCanvasVi
             .PP
             .nf
             .br
            -    void MyCanvasView::contentsMousePressEvent( QMouseEvent* e )
            +    void MyCanvasView::contentsMousePressEvent( TQMouseEvent* e )
             .br
                 {
             .br
            diff --git a/doc/man/man3/tqdial.3qt b/doc/man/man3/tqdial.3qt
            index 3400b5df5..3b13d980c 100644
            --- a/doc/man/man3/tqdial.3qt
            +++ b/doc/man/man3/tqdial.3qt
            @@ -11,7 +11,7 @@ TQDial \- Rounded range control (like a speedometer or potentiometer)
             .SH SYNOPSIS
             \fC#include \fR
             .PP
            -Inherits TQWidget and QRangeControl.
            +Inherits TQWidget and TQRangeControl.
             .PP
             .SS "Public Members"
             .in +1c
            @@ -170,7 +170,7 @@ The slider also emits dialPressed() and dialReleased() signals when the mouse bu
             .PP
             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.
             .PP
            -Like the slider, the dial makes the QRangeControl functions setValue(), addLine(), subtractLine(), addPage() and subtractPage() available as slots.
            +Like the slider, the dial makes the TQRangeControl functions setValue(), addLine(), subtractLine(), addPage() and subtractPage() available as slots.
             .PP
             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().
             .PP
            @@ -184,7 +184,7 @@ The dial's keyboard interface is fairly simple: The left/up and right/down arrow
             See also TQScrollBar, TQSpinBox, GUI Design Handbook: Slider, and Basic Widgets.
             .SH MEMBER FUNCTION DOCUMENTATION
             .SH "TQDial::TQDial ( TQWidget * parent = 0, const char * name = 0, WFlags f = 0 )"
            -Constructs a dial called \fIname\fR with parent \fIparent\fR. \fIf\fR is propagated to the TQWidget constructor. It has the default range of a QRangeControl.
            +Constructs a dial called \fIname\fR with parent \fIparent\fR. \fIf\fR is propagated to the TQWidget constructor. It has the default range of a TQRangeControl.
             .SH "TQDial::TQDial ( int minValue, int maxValue, int pageStep, int value, TQWidget * parent = 0, const char * name = 0 )"
             Constructs a dial called \fIname\fR with parent \fIparent\fR. The dial's value can never be smaller than \fIminValue\fR or greater than \fImaxValue\fR. Its page step size is \fIpageStep\fR, and its initial value is \fIvalue\fR.
             .PP
            @@ -224,7 +224,7 @@ Returns the current page step. See the "pageStep" property for details.
             .SH "void TQDial::rangeChange ()\fC [virtual protected]\fR"
             Reimplemented to ensure tick-marks are consistent with the new range.
             .PP
            -Reimplemented from QRangeControl.
            +Reimplemented from TQRangeControl.
             .SH "void TQDial::repaintScreen ( const TQRect * cr = 0 )\fC [virtual protected]\fR"
             Paints the dial using clip region \fIcr\fR.
             .SH "void TQDial::setLineStep ( int )"
            @@ -256,7 +256,7 @@ Returns the current dial value. See the "value" property for details.
             .SH "void TQDial::valueChange ()\fC [virtual protected]\fR"
             Reimplemented to ensure the display is correct and to emit the valueChanged(int) signal when appropriate.
             .PP
            -Reimplemented from QRangeControl.
            +Reimplemented from TQRangeControl.
             .SH "void TQDial::valueChanged ( int value )\fC [signal]\fR"
             This signal is emitted whenever the dial's \fIvalue\fR changes. The frequency of this signal is influenced by setTracking().
             .SH "bool TQDial::wrapping () const"
            @@ -267,7 +267,7 @@ This property holds the current line step.
             .PP
             setLineStep() calls the virtual stepChange() function if the new line step is different from the previous setting.
             .PP
            -See also QRangeControl::setSteps(), pageStep, and setRange().
            +See also TQRangeControl::setSteps(), pageStep, and setRange().
             .PP
             Set this property's value with setLineStep() and get this property's value with lineStep().
             .SH "int maxValue"
            diff --git a/doc/man/man3/tqdialog.3qt b/doc/man/man3/tqdialog.3qt
            index 6df4d3fba..374634293 100644
            --- a/doc/man/man3/tqdialog.3qt
            +++ b/doc/man/man3/tqdialog.3qt
            @@ -13,7 +13,7 @@ TQDialog \- The base class of dialog windows
             .PP
             Inherits TQWidget.
             .PP
            -Inherited by TQColorDialog, TQErrorMessage, TQFileDialog, TQFontDialog, TQInputDialog, QMessageBox, TQMotifDialog, TQProgressDialog, TQTabDialog, and TQWizard.
            +Inherited by TQColorDialog, TQErrorMessage, TQFileDialog, TQFontDialog, TQInputDialog, TQMessageBox, TQMotifDialog, TQProgressDialog, TQTabDialog, and TQWizard.
             .PP
             .SS "Public Members"
             .in +1c
            diff --git a/doc/man/man3/tqerrormessage.3qt b/doc/man/man3/tqerrormessage.3qt
            index ae22276d3..fb85e8fd2 100644
            --- a/doc/man/man3/tqerrormessage.3qt
            +++ b/doc/man/man3/tqerrormessage.3qt
            @@ -53,7 +53,7 @@ In both cases TQErrorMessage will queue pending messages, and display them (or n
             .PP
             
             .PP
            -See also QMessageBox, TQStatusBar::message(), Dialog Classes, and Miscellaneous Classes.
            +See also TQMessageBox, TQStatusBar::message(), Dialog Classes, and Miscellaneous Classes.
             .SH MEMBER FUNCTION DOCUMENTATION
             .SH "TQErrorMessage::TQErrorMessage ( TQWidget * parent, const char * name = 0 )"
             Constructs and installs an error handler window. The parent \fIparent\fR and name \fIname\fR are passed on to the TQDialog constructor.
            diff --git a/doc/man/man3/tqevent.3qt b/doc/man/man3/tqevent.3qt
            index f0cbd8fb8..68f7462bc 100644
            --- a/doc/man/man3/tqevent.3qt
            +++ b/doc/man/man3/tqevent.3qt
            @@ -13,7 +13,7 @@ TQEvent \- The base class of all event classes. Event objects contain event para
             .PP
             Inherits Qt.
             .PP
            -Inherited by TQTimerEvent, QMouseEvent, QWheelEvent, TQTabletEvent, TQKeyEvent, TQFocusEvent, TQPaintEvent, QMoveEvent, QResizeEvent, TQCloseEvent, TQIconDragEvent, QShowEvent, TQHideEvent, TQContextMenuEvent, TQIMEvent, TQDropEvent, TQDragLeaveEvent, TQChildEvent, and TQCustomEvent.
            +Inherited by TQTimerEvent, TQMouseEvent, QWheelEvent, TQTabletEvent, TQKeyEvent, TQFocusEvent, TQPaintEvent, TQMoveEvent, TQResizeEvent, TQCloseEvent, TQIconDragEvent, QShowEvent, TQHideEvent, TQContextMenuEvent, TQIMEvent, TQDropEvent, TQDragLeaveEvent, TQChildEvent, and TQCustomEvent.
             .PP
             .SS "Public Members"
             .in +1c
            @@ -55,13 +55,13 @@ This enum type defines the valid event types in Qt. The event types and the spec
             .TP
             \fCTQEvent::Timer\fR - Regular timer events, TQTimerEvent.
             .TP
            -\fCTQEvent::MouseButtonPress\fR - Mouse press, QMouseEvent.
            +\fCTQEvent::MouseButtonPress\fR - Mouse press, TQMouseEvent.
             .TP
            -\fCTQEvent::MouseButtonRelease\fR - Mouse release, QMouseEvent.
            +\fCTQEvent::MouseButtonRelease\fR - Mouse release, TQMouseEvent.
             .TP
            -\fCTQEvent::MouseButtonDblClick\fR - Mouse press again, QMouseEvent.
            +\fCTQEvent::MouseButtonDblClick\fR - Mouse press again, TQMouseEvent.
             .TP
            -\fCTQEvent::MouseMove\fR - Mouse move, QMouseEvent.
            +\fCTQEvent::MouseMove\fR - Mouse move, TQMouseEvent.
             .TP
             \fCTQEvent::KeyPress\fR - Key press (including Shift, for example), TQKeyEvent.
             .TP
            @@ -83,9 +83,9 @@ This enum type defines the valid event types in Qt. The event types and the spec
             .TP
             \fCTQEvent::Paint\fR - Screen update necessary, TQPaintEvent.
             .TP
            -\fCTQEvent::Move\fR - Widget's position changed, QMoveEvent.
            +\fCTQEvent::Move\fR - Widget's position changed, TQMoveEvent.
             .TP
            -\fCTQEvent::Resize\fR - Widget's size changed, QResizeEvent.
            +\fCTQEvent::Resize\fR - Widget's size changed, TQResizeEvent.
             .TP
             \fCTQEvent::Show\fR - Widget was shown on screen, QShowEvent.
             .TP
            diff --git a/doc/man/man3/tqeventloop.3qt b/doc/man/man3/tqeventloop.3qt
            index cedefb413..c73086215 100644
            --- a/doc/man/man3/tqeventloop.3qt
            +++ b/doc/man/man3/tqeventloop.3qt
            @@ -143,7 +143,7 @@ Enters the main event loop and waits until exit() is called, and returns the val
             .PP
             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.
             .PP
            -Generally speaking, no user interaction can take place before calling exec(). As a special case, modal widgets like QMessageBox can be used before calling exec(), because modal widgets call exec() to start a local event loop.
            +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.
             .PP
             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().
             .PP
            diff --git a/doc/man/man3/tqfile.3qt b/doc/man/man3/tqfile.3qt
            index 6063665e7..6284c9938 100644
            --- a/doc/man/man3/tqfile.3qt
            +++ b/doc/man/man3/tqfile.3qt
            @@ -252,7 +252,7 @@ The returned strings are not translated with the TQObject::tr() or QApplication:
             .br
                     if ( !f.open( IO_ReadOnly ) {
             .br
            -            QMessageBox::critical(
            +            TQMessageBox::critical(
             .br
                             this,
             .br
            diff --git a/doc/man/man3/tqfontmetrics.3qt b/doc/man/man3/tqfontmetrics.3qt
            index 65aa43bc5..21955f594 100644
            --- a/doc/man/man3/tqfontmetrics.3qt
            +++ b/doc/man/man3/tqfontmetrics.3qt
            @@ -219,7 +219,7 @@ Horizontal alignment defaults to \fCAlignAuto\fR and vertical alignment defaults
             .PP
             If several of the horizontal or several of the vertical alignment flags are set, the resulting alignment is undefined.
             .PP
            -These flags are defined in ntqnamespace.h.
            +These flags are defined in tqnamespace.h.
             .PP
             If \fCExpandTabs\fR is set in \fIflgs\fR, then: if \fItabarray\fR is non-null, it specifies a 0-terminated sequence of pixel-positions for tabs; otherwise if \fItabstops\fR is non-zero, it is used as the tab spacing (in pixels).
             .PP
            @@ -346,7 +346,7 @@ The \fIflgs\fR argument is the bitwise OR of the following flags:
             .TP
             \fCWordBreak\fR breaks the text to fit the rectangle.
             .PP
            -These flags are defined in ntqnamespace.h.
            +These flags are defined in tqnamespace.h.
             .PP
             If \fCExpandTabs\fR is set in \fIflgs\fR, then: if \fItabarray\fR is non-null, it specifies a 0-terminated sequence of pixel-positions for tabs; otherwise if \fItabstops\fR is non-zero, it is used as the tab spacing (in pixels).
             .PP
            diff --git a/doc/man/man3/tqframe.3qt b/doc/man/man3/tqframe.3qt
            index f1e448aea..397bc1315 100644
            --- a/doc/man/man3/tqframe.3qt
            +++ b/doc/man/man3/tqframe.3qt
            @@ -108,7 +108,7 @@ Inherited by TQGroupBox, TQScrollView, TQDockWindow, TQGrid, TQHBox, TQLabel, TQ
             .BI "virtual void \fBpaintEvent\fR ( TQPaintEvent * event )"
             .br
             .ti -1c
            -.BI "virtual void \fBresizeEvent\fR ( QResizeEvent * e )"
            +.BI "virtual void \fBresizeEvent\fR ( TQResizeEvent * e )"
             .br
             .ti -1c
             .BI "virtual void \fBdrawFrame\fR ( TQPainter * p )"
            @@ -274,7 +274,7 @@ Examples:
             .)l life/life.cpp and qfd/fontdisplayer.cpp.
             .PP
             Reimplemented from TQWidget.
            -.SH "void TQFrame::resizeEvent ( QResizeEvent * e )\fC [virtual protected]\fR"
            +.SH "void TQFrame::resizeEvent ( TQResizeEvent * e )\fC [virtual protected]\fR"
             Processes the resize event \fIe\fR.
             .PP
             Adjusts the frame rectangle for the resized widget. The frame rectangle is elastic, and the surrounding area is static.
            diff --git a/doc/man/man3/tqglwidget.3qt b/doc/man/man3/tqglwidget.3qt
            index dd4885092..3184766d3 100644
            --- a/doc/man/man3/tqglwidget.3qt
            +++ b/doc/man/man3/tqglwidget.3qt
            @@ -127,7 +127,7 @@ Inherits TQWidget and TQGL.
             .BI "virtual void \fBpaintEvent\fR ( TQPaintEvent * )"
             .br
             .ti -1c
            -.BI "virtual void \fBresizeEvent\fR ( QResizeEvent * )"
            +.BI "virtual void \fBresizeEvent\fR ( TQResizeEvent * )"
             .br
             .ti -1c
             .BI "virtual void \fBglInit\fR ()"
            @@ -448,7 +448,7 @@ Note: This function only works reliably with ASCII strings.
             This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
             .PP
             \fIx\fR, \fIy\fR and \fIz\fR 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.
            -.SH "void TQGLWidget::resizeEvent ( QResizeEvent * )\fC [virtual protected]\fR"
            +.SH "void TQGLWidget::resizeEvent ( TQResizeEvent * )\fC [virtual protected]\fR"
             Handles resize events. Calls the virtual function resizeGL().
             .PP
             Reimplemented from TQWidget.
            diff --git a/doc/man/man3/tqiconview.3qt b/doc/man/man3/tqiconview.3qt
            index 5139b6295..9f9c57157 100644
            --- a/doc/man/man3/tqiconview.3qt
            +++ b/doc/man/man3/tqiconview.3qt
            @@ -552,7 +552,7 @@ This is an overloaded member function, provided for convenience. It behaves esse
             .PP
             This signal is emitted when the user clicks any mouse button on an icon view item. \fIitem\fR is a pointer to the item that has been clicked.
             .PP
            -\fIpos\fR is the position of the mouse cursor in the global coordinate system (QMouseEvent::globalPos()). (If the click's press and release differ by a pixel or two, \fIpos\fR is the position at release time.)
            +\fIpos\fR 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, \fIpos\fR is the position at release time.)
             .PP
             See also mouseButtonClicked(), rightButtonClicked(), and pressed().
             .SH "void TQIconView::contextMenuRequested ( TQIconViewItem * item, const TQPoint & pos )\fC [signal]\fR"
            @@ -678,13 +678,13 @@ Returns the maximum width that an item may have. See the "maxItemWidth" property
             .SH "void TQIconView::mouseButtonClicked ( int button, TQIconViewItem * item, const TQPoint & pos )\fC [signal]\fR"
             This signal is emitted when the user clicks mouse button \fIbutton\fR. If \fIitem\fR is non-null, the cursor is on \fIitem\fR. If \fIitem\fR is null, the mouse cursor isn't on any item.
             .PP
            -\fIpos\fR is the position of the mouse cursor in the global coordinate system (QMouseEvent::globalPos()). (If the click's press and release differ by a pixel or two, \fIpos\fR is the position at release time.)
            +\fIpos\fR 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, \fIpos\fR is the position at release time.)
             .PP
             See also mouseButtonPressed(), rightButtonClicked(), and clicked().
             .SH "void TQIconView::mouseButtonPressed ( int button, TQIconViewItem * item, const TQPoint & pos )\fC [signal]\fR"
             This signal is emitted when the user presses mouse button \fIbutton\fR. If \fIitem\fR is non-null, the cursor is on \fIitem\fR. If \fIitem\fR is null, the mouse cursor isn't on any item.
             .PP
            -\fIpos\fR is the position of the mouse cursor in the global coordinate system (QMouseEvent::globalPos()).
            +\fIpos\fR is the position of the mouse cursor in the global coordinate system (TQMouseEvent::globalPos()).
             .PP
             See also rightButtonClicked() and pressed().
             .SH "void TQIconView::moved ()\fC [signal]\fR"
            @@ -706,7 +706,7 @@ This is an overloaded member function, provided for convenience. It behaves esse
             .PP
             This signal is emitted when the user presses any mouse button. If \fIitem\fR is non-null, the cursor is on \fIitem\fR. If \fIitem\fR is null, the mouse cursor isn't on any item.
             .PP
            -\fIpos\fR is the position of the mouse cursor in the global coordinate system (QMouseEvent::globalPos()). (If the click's press and release differ by a pixel or two, \fIpos\fR is the position at release time.)
            +\fIpos\fR 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, \fIpos\fR is the position at release time.)
             .PP
             See also mouseButtonPressed(), rightButtonPressed(), and clicked().
             .SH "void TQIconView::repaintItem ( TQIconViewItem * item )\fC [virtual]\fR"
            @@ -720,13 +720,13 @@ This signal is emitted if the user presses the Return or Enter key. \fIitem\fR i
             .SH "void TQIconView::rightButtonClicked ( TQIconViewItem * item, const TQPoint & pos )\fC [signal]\fR"
             This signal is emitted when the user clicks the right mouse button. If \fIitem\fR is non-null, the cursor is on \fIitem\fR. If \fIitem\fR is null, the mouse cursor isn't on any item.
             .PP
            -\fIpos\fR is the position of the mouse cursor in the global coordinate system (QMouseEvent::globalPos()). (If the click's press and release differ by a pixel or two, \fIpos\fR is the position at release time.)
            +\fIpos\fR 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, \fIpos\fR is the position at release time.)
             .PP
             See also rightButtonPressed(), mouseButtonClicked(), and clicked().
             .SH "void TQIconView::rightButtonPressed ( TQIconViewItem * item, const TQPoint & pos )\fC [signal]\fR"
             This signal is emitted when the user presses the right mouse button. If \fIitem\fR is non-null, the cursor is on \fIitem\fR. If \fIitem\fR is null, the mouse cursor isn't on any item.
             .PP
            -\fIpos\fR is the position of the mouse cursor in the global coordinate system (QMouseEvent::globalPos()).
            +\fIpos\fR is the position of the mouse cursor in the global coordinate system (TQMouseEvent::globalPos()).
             .SH "void TQIconView::selectAll ( bool select )\fC [virtual]\fR"
             In Multi and Extended modes, this function sets all items to be selected if \fIselect\fR is TRUE, and to be unselected if \fIselect\fR is FALSE.
             .PP
            diff --git a/doc/man/man3/tqkeysequence.3qt b/doc/man/man3/tqkeysequence.3qt
            index 799fdd12c..d2caaf05d 100644
            --- a/doc/man/man3/tqkeysequence.3qt
            +++ b/doc/man/man3/tqkeysequence.3qt
            @@ -73,7 +73,7 @@ Inherits Qt.
             .SH DESCRIPTION
             The TQKeySequence class encapsulates a key sequence as used by accelerators.
             .PP
            -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, \fCCTRL + Key_P\fR might be a sequence used as a shortcut for printing a document. The key codes are listed in ntqnamespace.h. As an alternative, use UNICODE_ACCEL with the unicode code point of the character. For example, \fCUNICODE_ACCEL + 'A'\fR gives the same key sequence as Key_A.
            +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, \fCCTRL + Key_P\fR might be a sequence used as a shortcut for printing a document. The key codes are listed in tqnamespace.h. As an alternative, use UNICODE_ACCEL with the unicode code point of the character. For example, \fCUNICODE_ACCEL + 'A'\fR gives the same key sequence as Key_A.
             .PP
             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.
             .PP
            @@ -102,11 +102,11 @@ Note the \fC"File|Open"\fR translator comment. It is by no means necessary, but
             .SH "TQKeySequence::TQKeySequence ( int key )"
             Constructs a key sequence that has a single \fIkey\fR.
             .PP
            -The key codes are listed in ntqnamespace.h and can be combined with modifiers, e.g. with SHIFT, CTRL, ALT, META or UNICODE_ACCEL.
            +The key codes are listed in tqnamespace.h and can be combined with modifiers, e.g. with SHIFT, CTRL, ALT, META or UNICODE_ACCEL.
             .SH "TQKeySequence::TQKeySequence ( int k1, int k2, int k3 = 0, int k4 = 0 )"
             Constructs a key sequence with up to 4 keys \fIk1\fR, \fIk2\fR, \fIk3\fR and \fIk4\fR.
             .PP
            -The key codes are listed in ntqnamespace.h and can be combined with modifiers, e.g. with SHIFT, CTRL, ALT, META or UNICODE_ACCEL.
            +The key codes are listed in tqnamespace.h and can be combined with modifiers, e.g. with SHIFT, CTRL, ALT, META or UNICODE_ACCEL.
             .SH "TQKeySequence::TQKeySequence ( const TQKeySequence & keysequence )"
             Copy constructor. Makes a copy of \fIkeysequence\fR.
             .SH "TQKeySequence::~TQKeySequence ()"
            diff --git a/doc/man/man3/tqlistbox.3qt b/doc/man/man3/tqlistbox.3qt
            index 1e86f81f5..a66dc52b9 100644
            --- a/doc/man/man3/tqlistbox.3qt
            +++ b/doc/man/man3/tqlistbox.3qt
            @@ -578,7 +578,7 @@ This is an overloaded member function, provided for convenience. It behaves esse
             .PP
             This signal is emitted when the user clicks any mouse button. If \fIitem\fR is not 0, the cursor is on \fIitem\fR. If \fIitem\fR is 0, the mouse cursor isn't on any item.
             .PP
            -\fIpnt\fR is the position of the mouse cursor in the global coordinate system (QMouseEvent::globalPos()). (If the click's press and release differs by a pixel or two, \fIpnt\fR is the position at release time.)
            +\fIpnt\fR 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, \fIpnt\fR is the position at release time.)
             .PP
             Note that you must not delete any TQListBoxItem objects in slots connected to this signal.
             .SH "LayoutMode TQListBox::columnMode () const"
            @@ -781,13 +781,13 @@ Returns the width of the widest item in the list box.
             .SH "void TQListBox::mouseButtonClicked ( int button, TQListBoxItem * item, const TQPoint & pos )\fC [signal]\fR"
             This signal is emitted when the user clicks mouse button \fIbutton\fR. If \fIitem\fR is not 0, the cursor is on \fIitem\fR. If \fIitem\fR is 0, the mouse cursor isn't on any item.
             .PP
            -\fIpos\fR is the position of the mouse cursor in the global coordinate system (QMouseEvent::globalPos()). (If the click's press and release differs by a pixel or two, \fIpos\fR is the position at release time.)
            +\fIpos\fR 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, \fIpos\fR is the position at release time.)
             .PP
             Note that you must not delete any TQListBoxItem objects in slots connected to this signal.
             .SH "void TQListBox::mouseButtonPressed ( int button, TQListBoxItem * item, const TQPoint & pos )\fC [signal]\fR"
             This signal is emitted when the user presses mouse button \fIbutton\fR. If \fIitem\fR is not 0, the cursor is on \fIitem\fR. If \fIitem\fR is 0, the mouse cursor isn't on any item.
             .PP
            -\fIpos\fR is the position of the mouse cursor in the global coordinate system (QMouseEvent::globalPos()).
            +\fIpos\fR is the position of the mouse cursor in the global coordinate system (TQMouseEvent::globalPos()).
             .PP
             Note that you must not delete any TQListBoxItem objects in slots connected to this signal.
             .SH "int TQListBox::numCols () const"
            @@ -823,7 +823,7 @@ This is an overloaded member function, provided for convenience. It behaves esse
             .PP
             This signal is emitted when the user presses any mouse button. If \fIitem\fR is not 0, the cursor is on \fIitem\fR. If \fIitem\fR is 0, the mouse cursor isn't on any item.
             .PP
            -\fIpnt\fR is the position of the mouse cursor in the global coordinate system (QMouseEvent::globalPos()).
            +\fIpnt\fR is the position of the mouse cursor in the global coordinate system (TQMouseEvent::globalPos()).
             .PP
             Note that you must not delete any TQListBoxItem objects in slots connected to this signal.
             .PP
            diff --git a/doc/man/man3/tqlistview.3qt b/doc/man/man3/tqlistview.3qt
            index 172a004a7..604d2eaba 100644
            --- a/doc/man/man3/tqlistview.3qt
            +++ b/doc/man/man3/tqlistview.3qt
            @@ -358,16 +358,16 @@ Inherits TQScrollView.
             .SS "Protected Members"
             .in +1c
             .ti -1c
            -.BI "virtual void \fBcontentsMousePressEvent\fR ( QMouseEvent * e )"
            +.BI "virtual void \fBcontentsMousePressEvent\fR ( TQMouseEvent * e )"
             .br
             .ti -1c
            -.BI "virtual void \fBcontentsMouseReleaseEvent\fR ( QMouseEvent * e )"
            +.BI "virtual void \fBcontentsMouseReleaseEvent\fR ( TQMouseEvent * e )"
             .br
             .ti -1c
            -.BI "virtual void \fBcontentsMouseMoveEvent\fR ( QMouseEvent * e )"
            +.BI "virtual void \fBcontentsMouseMoveEvent\fR ( TQMouseEvent * e )"
             .br
             .ti -1c
            -.BI "virtual void \fBcontentsMouseDoubleClickEvent\fR ( QMouseEvent * e )"
            +.BI "virtual void \fBcontentsMouseDoubleClickEvent\fR ( TQMouseEvent * e )"
             .br
             .ti -1c
             .BI "virtual TQDragObject * \fBdragObject\fR ()"
            @@ -376,7 +376,7 @@ Inherits TQScrollView.
             .BI "virtual void \fBstartDrag\fR ()"
             .br
             .ti -1c
            -.BI "virtual void \fBresizeEvent\fR ( QResizeEvent * e )"
            +.BI "virtual void \fBresizeEvent\fR ( TQResizeEvent * e )"
             .br
             .ti -1c
             .BI "virtual void \fBdrawContentsOffset\fR ( TQPainter * p, int ox, int oy, int cx, int cy, int cw, int ch )"
            @@ -595,23 +595,23 @@ Returns the WidthMode for column \fIc\fR.
             See also setColumnWidthMode().
             .SH "int TQListView::columns () const"
             Returns the number of columns in this list view. See the "columns" property for details.
            -.SH "void TQListView::contentsMouseDoubleClickEvent ( QMouseEvent * e )\fC [virtual protected]\fR"
            +.SH "void TQListView::contentsMouseDoubleClickEvent ( TQMouseEvent * e )\fC [virtual protected]\fR"
             Processes the mouse double-click event \fIe\fR on behalf of the viewed widget.
             .PP
             Reimplemented from TQScrollView.
            -.SH "void TQListView::contentsMouseMoveEvent ( QMouseEvent * e )\fC [virtual protected]\fR"
            +.SH "void TQListView::contentsMouseMoveEvent ( TQMouseEvent * e )\fC [virtual protected]\fR"
             Processes the mouse move event \fIe\fR on behalf of the viewed widget.
             .PP
             Example: dirview/dirview.cpp.
             .PP
             Reimplemented from TQScrollView.
            -.SH "void TQListView::contentsMousePressEvent ( QMouseEvent * e )\fC [virtual protected]\fR"
            +.SH "void TQListView::contentsMousePressEvent ( TQMouseEvent * e )\fC [virtual protected]\fR"
             Processes the mouse press event \fIe\fR on behalf of the viewed widget.
             .PP
             Example: dirview/dirview.cpp.
             .PP
             Reimplemented from TQScrollView.
            -.SH "void TQListView::contentsMouseReleaseEvent ( QMouseEvent * e )\fC [virtual protected]\fR"
            +.SH "void TQListView::contentsMouseReleaseEvent ( TQMouseEvent * e )\fC [virtual protected]\fR"
             Processes the mouse release event \fIe\fR on behalf of the viewed widget.
             .PP
             Example: dirview/dirview.cpp.
            @@ -830,7 +830,7 @@ See also clear().
             This function has been renamed takeItem().
             .SH "void TQListView::repaintItem ( const TQListViewItem * item ) const"
             Repaints \fIitem\fR on the screen if \fIitem\fR is currently visible. Takes care to avoid multiple repaints.
            -.SH "void TQListView::resizeEvent ( QResizeEvent * e )\fC [virtual protected]\fR"
            +.SH "void TQListView::resizeEvent ( TQResizeEvent * e )\fC [virtual protected]\fR"
             Ensures that the header is correctly sized and positioned when the resize event \fIe\fR occurs.
             .SH "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.
            diff --git a/doc/man/man3/tqmacstyle.3qt b/doc/man/man3/tqmacstyle.3qt
            index e1978ffe2..359d740d2 100644
            --- a/doc/man/man3/tqmacstyle.3qt
            +++ b/doc/man/man3/tqmacstyle.3qt
            @@ -1,5 +1,5 @@
             '\" t
            -.TH QMacStyle 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*-
            +.TH TQMacStyle 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*-
             .\" Copyright 1992-2007 Trolltech ASA.  All rights reserved.  See the
             .\" license file included in the distribution for a complete license
             .\" statement.
            @@ -7,19 +7,19 @@
             .ad l
             .nh
             .SH NAME
            -QMacStyle \- Implements an Appearance Manager style
            +TQMacStyle \- Implements an Appearance Manager style
             .SH SYNOPSIS
            -\fC#include \fR
            +\fC#include \fR
             .PP
             Inherits TQWindowsStyle.
             .PP
             .SS "Public Members"
             .in +1c
             .ti -1c
            -.BI "\fBQMacStyle\fR ()"
            +.BI "\fBTQMacStyle\fR ()"
             .br
             .ti -1c
            -.BI "virtual \fB~QMacStyle\fR ()"
            +.BI "virtual \fB~TQMacStyle\fR ()"
             .br
             .ti -1c
             .BI "enum \fBFocusRectPolicy\fR { FocusEnabled, FocusDisabled, FocusDefault }"
            @@ -44,7 +44,7 @@ Inherits TQWindowsStyle.
             .br
             .in -1c
             .SH DESCRIPTION
            -The QMacStyle class implements an Appearance Manager style.
            +The TQMacStyle class implements an Appearance Manager style.
             .PP
             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).
             .PP
            @@ -57,60 +57,60 @@ Layout - The restrictions on window layout are such that some aspects of layout
             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).
             .IP
             .TP
            -Effects - QMacStyle (in contrast to QAquaStyle) 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.
            +Effects - TQMacStyle (in contrast to QAquaStyle) 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.
             .IP
             .PP
             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.
             .PP
            -Note that the functions provided by QMacStyle are reimplementations of TQStyle functions; see TQStyle for their documentation.
            +Note that the functions provided by TQMacStyle are reimplementations of TQStyle functions; see TQStyle for their documentation.
             .PP
             See also Widget Appearance and Style.
             .SS "Member Type Documentation"
            -.SH "QMacStyle::FocusRectPolicy"
            +.SH "TQMacStyle::FocusRectPolicy"
             This type is used to signify a widget's focus rectangle policy.
             .TP
            -\fCQMacStyle::FocusEnabled\fR - show a focus rectangle when the widget has focus.
            +\fCTQMacStyle::FocusEnabled\fR - show a focus rectangle when the widget has focus.
             .TP
            -\fCQMacStyle::FocusDisabled\fR - never show a focus rectangle for the widget.
            +\fCTQMacStyle::FocusDisabled\fR - never show a focus rectangle for the widget.
             .TP
            -\fCQMacStyle::FocusDefault\fR - 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.
            -.SH "QMacStyle::WidgetSizePolicy"
            +\fCTQMacStyle::FocusDefault\fR - 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.
            +.SH "TQMacStyle::WidgetSizePolicy"
             .TP
            -\fCQMacStyle::SizeSmall\fR
            +\fCTQMacStyle::SizeSmall\fR
             .TP
            -\fCQMacStyle::SizeLarge\fR
            +\fCTQMacStyle::SizeLarge\fR
             .TP
            -\fCQMacStyle::SizeNone\fR
            +\fCTQMacStyle::SizeNone\fR
             .TP
            -\fCQMacStyle::SizeDefault\fR
            +\fCTQMacStyle::SizeDefault\fR
             .SH MEMBER FUNCTION DOCUMENTATION
            -.SH "QMacStyle::QMacStyle ()"
            -Constructs a QMacStyle object.
            -.SH "QMacStyle::~QMacStyle ()\fC [virtual]\fR"
            -Destructs a QMacStyle object.
            -.SH "FocusRectPolicy QMacStyle::focusRectPolicy ( TQWidget * w )\fC [static]\fR"
            +.SH "TQMacStyle::TQMacStyle ()"
            +Constructs a TQMacStyle object.
            +.SH "TQMacStyle::~TQMacStyle ()\fC [virtual]\fR"
            +Destructs a TQMacStyle object.
            +.SH "FocusRectPolicy TQMacStyle::focusRectPolicy ( TQWidget * w )\fC [static]\fR"
             Returns the focus rectangle policy for the widget \fIw\fR.
             .PP
            -The focus rectangle policy can be one of QMacStyle::FocusRectPolicy.
            +The focus rectangle policy can be one of TQMacStyle::FocusRectPolicy.
             .PP
             See also setFocusRectPolicy().
            -.SH "void QMacStyle::setFocusRectPolicy ( TQWidget * w, FocusRectPolicy policy )\fC [static]\fR"
            -Sets the focus rectangle policy of \fIw\fR. The \fIpolicy\fR can be one of QMacStyle::FocusRectPolicy.
            +.SH "void TQMacStyle::setFocusRectPolicy ( TQWidget * w, FocusRectPolicy policy )\fC [static]\fR"
            +Sets the focus rectangle policy of \fIw\fR. The \fIpolicy\fR can be one of TQMacStyle::FocusRectPolicy.
             .PP
             See also focusRectPolicy().
            -.SH "void QMacStyle::setWidgetSizePolicy ( TQWidget * w, WidgetSizePolicy policy )\fC [static]\fR"
            -Sets the widget size policy of \fIw\fR. The \fIpolicy\fR can be one of QMacStyle::WidgetSizePolicy.
            +.SH "void TQMacStyle::setWidgetSizePolicy ( TQWidget * w, WidgetSizePolicy policy )\fC [static]\fR"
            +Sets the widget size policy of \fIw\fR. The \fIpolicy\fR can be one of TQMacStyle::WidgetSizePolicy.
             .PP
             See also widgetSizePolicy().
            -.SH "WidgetSizePolicy QMacStyle::widgetSizePolicy ( TQWidget * w )\fC [static]\fR"
            +.SH "WidgetSizePolicy TQMacStyle::widgetSizePolicy ( TQWidget * w )\fC [static]\fR"
             Returns the widget size policy for the widget \fIw\fR.
             .PP
            -The widget size policy can be one of QMacStyle::WidgetSizePolicy.
            +The widget size policy can be one of TQMacStyle::WidgetSizePolicy.
             .PP
             See also setWidgetSizePolicy().
             
             .SH "SEE ALSO"
            -.BR http://doc.trolltech.com/qmacstyle.html
            +.BR http://doc.trolltech.com/tqmacstyle.html
             .BR http://www.trolltech.com/faq/tech.html
             .SH COPYRIGHT
             Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com.  See the
            diff --git a/doc/man/man3/tqmenubar.3qt b/doc/man/man3/tqmenubar.3qt
            index 52ebfa967..7869ccf8f 100644
            --- a/doc/man/man3/tqmenubar.3qt
            +++ b/doc/man/man3/tqmenubar.3qt
            @@ -330,7 +330,7 @@ Note that keyboard accelerators in TQt are not application-global, instead they
             .PP
             Returns the allocated menu identifier number (\fIid\fR if \fIid\fR >= 0).
             .PP
            -See also removeItem(), changeItem(), setAccel(), connectItem(), TQAccel, and ntqnamespace.h.
            +See also removeItem(), changeItem(), setAccel(), connectItem(), TQAccel, and tqnamespace.h.
             .PP
             Examples:
             .)l addressbook/mainwindow.cpp, canvas/canvas.cpp, menu/menu.cpp, qwerty/qwerty.cpp, scrollview/scrollview.cpp, showimg/showimg.cpp, and sound/sound.cpp.
            @@ -341,7 +341,7 @@ Inserts a menu item with icon \fIicon\fR, text \fItext\fR, accelerator \fIaccel\
             .PP
             Returns the allocated menu identifier number (\fIid\fR if \fIid\fR >= 0).
             .PP
            -See also removeItem(), changeItem(), setAccel(), connectItem(), TQAccel, and ntqnamespace.h.
            +See also removeItem(), changeItem(), setAccel(), connectItem(), TQAccel, and tqnamespace.h.
             .SH "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.
             .PP
            @@ -361,7 +361,7 @@ To look best when being highlighted as a menu item, the pixmap should provide a
             .PP
             Returns the allocated menu identifier number (\fIid\fR if \fIid\fR >= 0).
             .PP
            -See also removeItem(), changeItem(), setAccel(), connectItem(), TQAccel, and ntqnamespace.h.
            +See also removeItem(), changeItem(), setAccel(), connectItem(), TQAccel, and tqnamespace.h.
             .SH "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.
             .PP
            diff --git a/doc/man/man3/tqmenudata.3qt b/doc/man/man3/tqmenudata.3qt
            index f241407fb..da5af429d 100644
            --- a/doc/man/man3/tqmenudata.3qt
            +++ b/doc/man/man3/tqmenudata.3qt
            @@ -217,7 +217,7 @@ Removes all menu items and disconnects any signals that have been connected.
             .SH "TQKeySequence TQMenuData::accel ( int id ) const"
             Returns the accelerator key that has been defined for the menu item \fIid\fR, or 0 if it has no accelerator key or if there is no such menu item.
             .PP
            -See also setAccel(), TQAccel, and ntqnamespace.h.
            +See also setAccel(), TQAccel, and tqnamespace.h.
             .SH "void TQMenuData::activateItemAt ( int index )\fC [virtual]\fR"
             Activates the menu item at position \fIindex\fR.
             .PP
            @@ -370,7 +370,7 @@ Note that keyboard accelerators in TQt are not application-global, instead they
             .PP
             Returns the allocated menu identifier number (\fIid\fR if \fIid\fR >= 0).
             .PP
            -See also removeItem(), changeItem(), setAccel(), connectItem(), TQAccel, and ntqnamespace.h.
            +See also removeItem(), changeItem(), setAccel(), connectItem(), TQAccel, and tqnamespace.h.
             .PP
             Examples:
             .)l addressbook/mainwindow.cpp, canvas/canvas.cpp, menu/menu.cpp, qwerty/qwerty.cpp, scrollview/scrollview.cpp, showimg/showimg.cpp, and sound/sound.cpp.
            @@ -381,7 +381,7 @@ Inserts a menu item with icon \fIicon\fR, text \fItext\fR, accelerator \fIaccel\
             .PP
             Returns the allocated menu identifier number (\fIid\fR if \fIid\fR >= 0).
             .PP
            -See also removeItem(), changeItem(), setAccel(), connectItem(), TQAccel, and ntqnamespace.h.
            +See also removeItem(), changeItem(), setAccel(), connectItem(), TQAccel, and tqnamespace.h.
             .SH "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.
             .PP
            @@ -401,7 +401,7 @@ To look best when being highlighted as a menu item, the pixmap should provide a
             .PP
             Returns the allocated menu identifier number (\fIid\fR if \fIid\fR >= 0).
             .PP
            -See also removeItem(), changeItem(), setAccel(), connectItem(), TQAccel, and ntqnamespace.h.
            +See also removeItem(), changeItem(), setAccel(), connectItem(), TQAccel, and tqnamespace.h.
             .SH "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.
             .PP
            @@ -587,7 +587,7 @@ See also removeItem() and clear().
             .SH "void TQMenuData::setAccel ( const TQKeySequence & key, int id )"
             Sets the accelerator key for the menu item \fIid\fR to \fIkey\fR.
             .PP
            -An accelerator key consists of a key code and a combination of the modifiers \fCSHIFT\fR, \fCCTRL\fR, \fCALT\fR or \fCUNICODE_ACCEL\fR (OR'ed or added). The header file ntqnamespace.h contains a list of key codes.
            +An accelerator key consists of a key code and a combination of the modifiers \fCSHIFT\fR, \fCCTRL\fR, \fCALT\fR or \fCUNICODE_ACCEL\fR (OR'ed or added). The header file tqnamespace.h contains a list of key codes.
             .PP
             Defining an accelerator key produces a text that is added to the menu item; for instance, \fCCTRL\fR + \fCKey_O\fR produces "Ctrl+O". The text is formatted differently for different platforms.
             .PP
            diff --git a/doc/man/man3/tqmessagebox.3qt b/doc/man/man3/tqmessagebox.3qt
            index 903aa367c..eae71d3df 100644
            --- a/doc/man/man3/tqmessagebox.3qt
            +++ b/doc/man/man3/tqmessagebox.3qt
            @@ -1,5 +1,5 @@
             '\" t
            -.TH QMessageBox 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*-
            +.TH TQMessageBox 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*-
             .\" Copyright 1992-2007 Trolltech ASA.  All rights reserved.  See the
             .\" license file included in the distribution for a complete license
             .\" statement.
            @@ -7,9 +7,9 @@
             .ad l
             .nh
             .SH NAME
            -QMessageBox \- Modal dialog with a short message, an icon, and some buttons
            +TQMessageBox \- Modal dialog with a short message, an icon, and some buttons
             .SH SYNOPSIS
            -\fC#include \fR
            +\fC#include \fR
             .PP
             Inherits TQDialog.
             .PP
            @@ -19,13 +19,13 @@ Inherits TQDialog.
             .BI "enum \fBIcon\fR { NoIcon = 0, Information = 1, Warning = 2, Critical = 3, Question = 4 }"
             .br
             .ti -1c
            -.BI "\fBQMessageBox\fR ( TQWidget * parent = 0, const char * name = 0 )"
            +.BI "\fBTQMessageBox\fR ( TQWidget * parent = 0, const char * name = 0 )"
             .br
             .ti -1c
            -.BI "\fBQMessageBox\fR ( 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 )"
            +.BI "\fBTQMessageBox\fR ( 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 )"
             .br
             .ti -1c
            -.BI "\fB~QMessageBox\fR ()"
            +.BI "\fB~TQMessageBox\fR ()"
             .br
             .ti -1c
             .BI "TQString \fBtext\fR () const"
            @@ -122,11 +122,11 @@ Inherits TQDialog.
             .br
             .in -1c
             .SH DESCRIPTION
            -The QMessageBox class provides a modal dialog with a short message, an icon, and some buttons.
            +The TQMessageBox class provides a modal dialog with a short message, an icon, and some buttons.
             .PP
             Message boxes are used to provide informative messages and to ask simple questions.
             .PP
            -QMessageBox provides a range of different messages, arranged roughly along two axes: severity and complexity.
            +TQMessageBox provides a range of different messages, arranged roughly along two axes: severity and complexity.
             .PP
             Severity is 
            .nf .TS @@ -148,7 +148,7 @@ If a program is unable to find a supporting file, but can do perfectly well with .PP .nf .br - QMessageBox::information( this, "Application name", + TQMessageBox::information( this, "Application name", .br "Unable to find the user preferences file.\\n" .br @@ -162,7 +162,7 @@ question() is useful for simple yes/no questions: .br if ( TQFile::exists( filename ) && .br - QMessageBox::question( + TQMessageBox::question( .br this, .br @@ -186,7 +186,7 @@ warning() can be used to tell the user about unusual errors, or errors which can .PP .nf .br - switch( QMessageBox::warning( this, "Application name", + switch( TQMessageBox::warning( this, "Application name", .br "Could not connect to the server.\\n" .br @@ -224,7 +224,7 @@ Exiting a program is part of its normal operation. If there is unsaved data the .PP .nf .br - switch( QMessageBox::information( this, "Application name here", + switch( TQMessageBox::information( this, "Application name here", .br "The document contains unsaved changes\\n" .br @@ -264,7 +264,7 @@ Disk full errors are unusual and they certainly can be hard to correct. This exa .PP .nf .br - switch( QMessageBox::warning( this, "Application name here", + switch( TQMessageBox::warning( this, "Application name here", .br "Could not save the user preferences,\\n" .br @@ -274,17 +274,17 @@ Disk full errors are unusual and they certainly can be hard to correct. This exa .br "abort the Save Preferences operation.", .br - QMessageBox::Retry | QMessageBox::Default, + TQMessageBox::Retry | TQMessageBox::Default, .br - QMessageBox::Abort | QMessageBox::Escape )) { + TQMessageBox::Abort | TQMessageBox::Escape )) { .br - case QMessageBox::Retry: // Retry clicked or Enter pressed + case TQMessageBox::Retry: // Retry clicked or Enter pressed .br // try again .br break; .br - case QMessageBox::Abort: // Abort clicked or Escape pressed + case TQMessageBox::Abort: // Abort clicked or Escape pressed .br // abort .br @@ -298,7 +298,7 @@ The critical() function should be reserved for critical errors. In this example .PP .nf .br - QMessageBox::critical( 0, "Application name here", + TQMessageBox::critical( 0, "Application name here", .br TQString("An internal error occurred. Please ") + .br @@ -312,11 +312,11 @@ The critical() function should be reserved for critical errors. In this example .PP In this example an OK button is displayed. .PP -QMessageBox provides a very simple About box which displays an appropriate icon and the string you provide: +TQMessageBox provides a very simple About box which displays an appropriate icon and the string you provide: .PP .nf .br - QMessageBox::about( this, "About ", + TQMessageBox::about( this, "About ", .br " is a \\n\\n" .br @@ -334,43 +334,43 @@ See about() for more information. .PP 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 Qt" menu option under the Help menu to invoke aboutTQt(). .PP -If none of the standard message boxes is suitable, you can create a QMessageBox from scratch and use custom button texts: +If none of the standard message boxes is suitable, you can create a TQMessageBox from scratch and use custom button texts: .PP .nf .br - QMessageBox mb( "Application name here", + TQMessageBox mb( "Application name here", .br "Saving the file will overwrite the original file on the disk.\\n" .br "Do you really want to save?", .br - QMessageBox::Information, + TQMessageBox::Information, .br - QMessageBox::Yes | QMessageBox::Default, + TQMessageBox::Yes | TQMessageBox::Default, .br - QMessageBox::No, + TQMessageBox::No, .br - QMessageBox::Cancel | QMessageBox::Escape ); + TQMessageBox::Cancel | TQMessageBox::Escape ); .br - mb.setButtonText( QMessageBox::Yes, "Save" ); + mb.setButtonText( TQMessageBox::Yes, "Save" ); .br - mb.setButtonText( QMessageBox::No, "Discard" ); + mb.setButtonText( TQMessageBox::No, "Discard" ); .br switch( mb.exec() ) { .br - case QMessageBox::Yes: + case TQMessageBox::Yes: .br // save and exit .br break; .br - case QMessageBox::No: + case TQMessageBox::No: .br // exit without saving .br break; .br - case QMessageBox::Cancel: + case TQMessageBox::Cancel: .br // don't save and don't exit .br @@ -380,7 +380,7 @@ If none of the standard message boxes is suitable, you can create a QMessageBox .br .fi .PP -QMessageBox 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. +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. .PP The button types are: .TP @@ -408,11 +408,11 @@ Default - makes pressing Enter equivalent to clicking this button. Normally used .TP Escape - makes pressing Escape equivalent to clicking this button. Normally used with Abort, Cancel or similar. .PP -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 QMessageBox::Icon and can be used to set standard icons, whereas the latter accepts a TQPixmap and can be used to set custom icons. +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. .PP setButtonText() and buttonText() provide access to the buttons. .PP -QMessageBox has no signals or slots. +TQMessageBox has no signals or slots. .PP .ce 1 .B "[Image Omitted]" @@ -423,86 +423,86 @@ QMessageBox has no signals or slots. .PP See also TQDialog, Isys on error messages, GUI Design Handbook: Message Box, and Dialog Classes. .SS "Member Type Documentation" -.SH "QMessageBox::Icon" +.SH "TQMessageBox::Icon" This enum has the following values: .TP -\fCQMessageBox::NoIcon\fR - the message box does not have any icon. +\fCTQMessageBox::NoIcon\fR - the message box does not have any icon. .TP -\fCQMessageBox::Question\fR - an icon indicating that the message is asking a question. +\fCTQMessageBox::Question\fR - an icon indicating that the message is asking a question. .TP -\fCQMessageBox::Information\fR - an icon indicating that the message is nothing out of the ordinary. +\fCTQMessageBox::Information\fR - an icon indicating that the message is nothing out of the ordinary. .TP -\fCQMessageBox::Warning\fR - an icon indicating that the message is a warning, but can be dealt with. +\fCTQMessageBox::Warning\fR - an icon indicating that the message is a warning, but can be dealt with. .TP -\fCQMessageBox::Critical\fR - an icon indicating that the message represents a critical problem. +\fCTQMessageBox::Critical\fR - an icon indicating that the message represents a critical problem. .PP .SH MEMBER FUNCTION DOCUMENTATION -.SH "QMessageBox::QMessageBox ( TQWidget * parent = 0, const char * name = 0 )" +.SH "TQMessageBox::TQMessageBox ( TQWidget * parent = 0, const char * name = 0 )" Constructs a message box with no text and a button with the label" OK". .PP If \fIparent\fR is 0, the message box becomes an application-global modal dialog box. If \fIparent\fR is a widget, the message box becomes modal relative to \fIparent\fR. .PP The \fIparent\fR and \fIname\fR arguments are passed to the TQDialog constructor. -.SH "QMessageBox::QMessageBox ( 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 )" +.SH "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 \fIcaption\fR, a \fItext\fR, an \fIicon\fR, and up to three buttons. .PP The \fIicon\fR must be one of the following: .TP -QMessageBox::NoIcon +TQMessageBox::NoIcon .TP -QMessageBox::Question +TQMessageBox::Question .TP -QMessageBox::Information +TQMessageBox::Information .TP -QMessageBox::Warning +TQMessageBox::Warning .TP -QMessageBox::Critical +TQMessageBox::Critical .PP Each button, \fIbutton0\fR, \fIbutton1\fR and \fIbutton2\fR, can have one of the following values: .TP -QMessageBox::NoButton +TQMessageBox::NoButton .TP -QMessageBox::Ok +TQMessageBox::Ok .TP -QMessageBox::Cancel +TQMessageBox::Cancel .TP -QMessageBox::Yes +TQMessageBox::Yes .TP -QMessageBox::No +TQMessageBox::No .TP -QMessageBox::Abort +TQMessageBox::Abort .TP -QMessageBox::Retry +TQMessageBox::Retry .TP -QMessageBox::Ignore +TQMessageBox::Ignore .TP -QMessageBox::YesAll +TQMessageBox::YesAll .TP -QMessageBox::NoAll +TQMessageBox::NoAll .PP -Use QMessageBox::NoButton for the later parameters to have fewer than three buttons in your message box. If you don't specify any buttons at all, QMessageBox will provide an Ok button. +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. .PP -One of the buttons can be OR-ed with the \fCQMessageBox::Default\fR flag to make it the default button (clicked when Enter is pressed). +One of the buttons can be OR-ed with the \fCTQMessageBox::Default\fR flag to make it the default button (clicked when Enter is pressed). .PP -One of the buttons can be OR-ed with the \fCQMessageBox::Escape\fR flag to make it the cancel or close button (clicked when Escape is pressed). +One of the buttons can be OR-ed with the \fCTQMessageBox::Escape\fR flag to make it the cancel or close button (clicked when Escape is pressed). .PP Example: .PP .nf .br - QMessageBox mb( "Application Name", + TQMessageBox mb( "Application Name", .br "Hardware failure.\\n\\nDisk error detected\\nDo you want to stop?", .br - QMessageBox::Question, + TQMessageBox::Question, .br - QMessageBox::Yes | QMessageBox::Default, + TQMessageBox::Yes | TQMessageBox::Default, .br - QMessageBox::No | QMessageBox::Escape, + TQMessageBox::No | TQMessageBox::Escape, .br - QMessageBox::NoButton ); + TQMessageBox::NoButton ); .br - if ( mb.exec() == QMessageBox::No ) + if ( mb.exec() == TQMessageBox::No ) .br // try again .br @@ -515,9 +515,9 @@ If \fImodal\fR is TRUE the message box is modal; otherwise it is modeless. The \fIparent\fR, \fIname\fR, \fImodal\fR, and \fIf\fR arguments are passed to the TQDialog constructor. .PP See also caption, text, and icon. -.SH "QMessageBox::~QMessageBox ()" +.SH "TQMessageBox::~TQMessageBox ()" Destroys the message box. -.SH "void QMessageBox::about ( TQWidget * parent, const TQString & caption, const TQString & text )\fC [static]\fR" +.SH "void TQMessageBox::about ( TQWidget * parent, const TQString & caption, const TQString & text )\fC [static]\fR" Displays a simple about box with caption \fIcaption\fR and text \fItext\fR. The about box's parent is \fIparent\fR. .PP about() looks for a suitable icon in four locations:
              @@ -536,7 +536,7 @@ See also TQWidget::icon and QApplication::mainWidget(). .PP Examples: .)l action/application.cpp, application/application.cpp, chart/chartform.cpp, helpviewer/helpwindow.cpp, mdi/application.cpp, menu/menu.cpp, and themes/themes.cpp. -.SH "void QMessageBox::aboutTQt ( TQWidget * parent, const TQString & caption = TQString::null )\fC [static]\fR" +.SH "void TQMessageBox::aboutTQt ( TQWidget * parent, const TQString & caption = TQString::null )\fC [static]\fR" Displays a simple message box about Qt, with caption \fIcaption\fR and centered over \fIparent\fR (if \fIparent\fR is not 0). The message includes the version number of TQt being used by the application. .PP This is useful for inclusion in the Help menu of an application. See the examples/menu/menu.cpp example. @@ -547,44 +547,44 @@ See also QApplication::aboutTQt(). .PP Examples: .)l action/application.cpp, application/application.cpp, chart/chartform.cpp, helpviewer/helpwindow.cpp, menu/menu.cpp, themes/themes.cpp, and trivial/trivial.cpp. -.SH "void QMessageBox::adjustSize ()\fC [virtual]\fR" +.SH "void TQMessageBox::adjustSize ()\fC [virtual]\fR" Adjusts the size of the message box to fit the contents just before TQDialog::exec() or TQDialog::show() is called. .PP This function will not be called if the message box has been explicitly resized before showing it. .PP Reimplemented from TQWidget. -.SH "TQString QMessageBox::buttonText ( int button ) const" +.SH "TQString TQMessageBox::buttonText ( int button ) const" Returns the text of the message box button \fIbutton\fR, or TQString::null if the message box does not contain the button. .PP See also setButtonText(). -.SH "int QMessageBox::critical ( TQWidget * parent, const TQString & caption, const TQString & text, int button0, int button1, int button2 = 0 )\fC [static]\fR" +.SH "int TQMessageBox::critical ( TQWidget * parent, const TQString & caption, const TQString & text, int button0, int button1, int button2 = 0 )\fC [static]\fR" Opens a critical message box with the caption \fIcaption\fR and the text \fItext\fR. The dialog may have up to three buttons. Each of the button parameters, \fIbutton0\fR, \fIbutton1\fR and \fIbutton2\fR may be set to one of the following values: .TP -QMessageBox::NoButton +TQMessageBox::NoButton .TP -QMessageBox::Ok +TQMessageBox::Ok .TP -QMessageBox::Cancel +TQMessageBox::Cancel .TP -QMessageBox::Yes +TQMessageBox::Yes .TP -QMessageBox::No +TQMessageBox::No .TP -QMessageBox::Abort +TQMessageBox::Abort .TP -QMessageBox::Retry +TQMessageBox::Retry .TP -QMessageBox::Ignore +TQMessageBox::Ignore .TP -QMessageBox::YesAll +TQMessageBox::YesAll .TP -QMessageBox::NoAll +TQMessageBox::NoAll .PP -If you don't want all three buttons, set the last button, or last two buttons to QMessageBox::NoButton. +If you don't want all three buttons, set the last button, or last two buttons to TQMessageBox::NoButton. .PP -One button can be OR-ed with \fCQMessageBox::Default\fR, and one button can be OR-ed with \fCQMessageBox::Escape\fR. +One button can be OR-ed with \fCTQMessageBox::Default\fR, and one button can be OR-ed with \fCTQMessageBox::Escape\fR. .PP -Returns the identity (QMessageBox::Ok, or QMessageBox::No, etc.) of the button that was clicked. +Returns the identity (TQMessageBox::Ok, or TQMessageBox::No, etc.) of the button that was clicked. .PP If \fIparent\fR is 0, the message box becomes an application-global modal dialog box. If \fIparent\fR is a widget, the message box becomes modal relative to \fIparent\fR. .PP @@ -592,7 +592,7 @@ See also information(), question(), and warning(). .PP Examples: .)l network/archivesearch/archivedialog.ui.h, network/ftpclient/ftpmainwindow.ui.h, process/process.cpp, and xml/outliner/outlinetree.cpp. -.SH "int QMessageBox::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 )\fC [static]\fR" +.SH "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 )\fC [static]\fR" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP 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). @@ -602,38 +602,38 @@ Displays a critical error message box with a caption, a text, and 1, 2 or 3 butt If \fIparent\fR is 0, the message box becomes an application-global modal dialog box. If \fIparent\fR is a widget, the message box becomes modal relative to \fIparent\fR. .PP See also information(), question(), and warning(). -.SH "Icon QMessageBox::icon () const" +.SH "Icon TQMessageBox::icon () const" Returns the message box's icon. See the "icon" property for details. -.SH "const TQPixmap * QMessageBox::iconPixmap () const" +.SH "const TQPixmap * TQMessageBox::iconPixmap () const" Returns the current icon. See the "iconPixmap" property for details. -.SH "int QMessageBox::information ( TQWidget * parent, const TQString & caption, const TQString & text, int button0, int button1 = 0, int button2 = 0 )\fC [static]\fR" +.SH "int TQMessageBox::information ( TQWidget * parent, const TQString & caption, const TQString & text, int button0, int button1 = 0, int button2 = 0 )\fC [static]\fR" Opens an information message box with the caption \fIcaption\fR and the text \fItext\fR. The dialog may have up to three buttons. Each of the buttons, \fIbutton0\fR, \fIbutton1\fR and \fIbutton2\fR may be set to one of the following values: .TP -QMessageBox::NoButton +TQMessageBox::NoButton .TP -QMessageBox::Ok +TQMessageBox::Ok .TP -QMessageBox::Cancel +TQMessageBox::Cancel .TP -QMessageBox::Yes +TQMessageBox::Yes .TP -QMessageBox::No +TQMessageBox::No .TP -QMessageBox::Abort +TQMessageBox::Abort .TP -QMessageBox::Retry +TQMessageBox::Retry .TP -QMessageBox::Ignore +TQMessageBox::Ignore .TP -QMessageBox::YesAll +TQMessageBox::YesAll .TP -QMessageBox::NoAll +TQMessageBox::NoAll .PP -If you don't want all three buttons, set the last button, or last two buttons to QMessageBox::NoButton. +If you don't want all three buttons, set the last button, or last two buttons to TQMessageBox::NoButton. .PP -One button can be OR-ed with \fCQMessageBox::Default\fR, and one button can be OR-ed with \fCQMessageBox::Escape\fR. +One button can be OR-ed with \fCTQMessageBox::Default\fR, and one button can be OR-ed with \fCTQMessageBox::Escape\fR. .PP -Returns the identity (QMessageBox::Ok, or QMessageBox::No, etc.) of the button that was clicked. +Returns the identity (TQMessageBox::Ok, or TQMessageBox::No, etc.) of the button that was clicked. .PP If \fIparent\fR is 0, the message box becomes an application-global modal dialog box. If \fIparent\fR is a widget, the message box becomes modal relative to \fIparent\fR. .PP @@ -641,7 +641,7 @@ See also question(), warning(), and critical(). .PP Examples: .)l action/application.cpp, application/application.cpp, dirview/dirview.cpp, fileiconview/tqfileiconview.cpp, picture/picture.cpp, qwerty/qwerty.cpp, and simple/main.cpp. -.SH "int QMessageBox::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 )\fC [static]\fR" +.SH "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 )\fC [static]\fR" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP Displays an information message box with caption \fIcaption\fR, text \fItext\fR and one, two or three buttons. Returns the index of the button that was clicked (0, 1 or 2). @@ -653,7 +653,7 @@ If \fIparent\fR is 0, the message box becomes an application-global modal dialog 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. .PP See also question(), warning(), and critical(). -.SH "int QMessageBox::message ( const TQString & caption, const TQString & text, const TQString & buttonText = TQString::null, TQWidget * parent = 0, const char * = 0 )\fC [static]\fR" +.SH "int TQMessageBox::message ( const TQString & caption, const TQString & text, const TQString & buttonText = TQString::null, TQWidget * parent = 0, const char * = 0 )\fC [static]\fR" \fBThis function is obsolete.\fR It is provided to keep old source working. We strongly advise against using it in new code. .PP Opens a modal message box directly using the specified parameters. @@ -661,45 +661,45 @@ Opens a modal message box directly using the specified parameters. Please use information(), warning(), question(), or critical() instead. .PP Example: grapher/grapher.cpp. -.SH "bool QMessageBox::query ( const TQString & caption, const TQString & text, const TQString & yesButtonText = TQString::null, const TQString & noButtonText = TQString::null, TQWidget * parent = 0, const char * = 0 )\fC [static]\fR" +.SH "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 )\fC [static]\fR" \fBThis function is obsolete.\fR It is provided to keep old source working. We strongly advise against using it in new code. .PP Queries the user using a modal message box with two buttons. Note that \fIcaption\fR is not always shown, it depends on the window manager. .PP Please use information(), question(), warning(), or critical() instead. -.SH "int QMessageBox::question ( TQWidget * parent, const TQString & caption, const TQString & text, int button0, int button1 = 0, int button2 = 0 )\fC [static]\fR" +.SH "int TQMessageBox::question ( TQWidget * parent, const TQString & caption, const TQString & text, int button0, int button1 = 0, int button2 = 0 )\fC [static]\fR" Opens a question message box with the caption \fIcaption\fR and the text \fItext\fR. The dialog may have up to three buttons. Each of the buttons, \fIbutton0\fR, \fIbutton1\fR and \fIbutton2\fR may be set to one of the following values: .TP -QMessageBox::NoButton +TQMessageBox::NoButton .TP -QMessageBox::Ok +TQMessageBox::Ok .TP -QMessageBox::Cancel +TQMessageBox::Cancel .TP -QMessageBox::Yes +TQMessageBox::Yes .TP -QMessageBox::No +TQMessageBox::No .TP -QMessageBox::Abort +TQMessageBox::Abort .TP -QMessageBox::Retry +TQMessageBox::Retry .TP -QMessageBox::Ignore +TQMessageBox::Ignore .TP -QMessageBox::YesAll +TQMessageBox::YesAll .TP -QMessageBox::NoAll +TQMessageBox::NoAll .PP -If you don't want all three buttons, set the last button, or last two buttons to QMessageBox::NoButton. +If you don't want all three buttons, set the last button, or last two buttons to TQMessageBox::NoButton. .PP -One button can be OR-ed with \fCQMessageBox::Default\fR, and one button can be OR-ed with \fCQMessageBox::Escape\fR. +One button can be OR-ed with \fCTQMessageBox::Default\fR, and one button can be OR-ed with \fCTQMessageBox::Escape\fR. .PP -Returns the identity (QMessageBox::Yes, or QMessageBox::No, etc.) of the button that was clicked. +Returns the identity (TQMessageBox::Yes, or TQMessageBox::No, etc.) of the button that was clicked. .PP If \fIparent\fR is 0, the message box becomes an application-global modal dialog box. If \fIparent\fR is a widget, the message box becomes modal relative to \fIparent\fR. .PP See also information(), warning(), and critical(). -.SH "int QMessageBox::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 )\fC [static]\fR" +.SH "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 )\fC [static]\fR" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP Displays a question message box with caption \fIcaption\fR, text \fItext\fR and one, two or three buttons. Returns the index of the button that was clicked (0, 1 or 2). @@ -711,58 +711,58 @@ If \fIparent\fR is 0, the message box becomes an application-global modal dialog 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. .PP See also information(), warning(), and critical(). -.SH "void QMessageBox::setButtonText ( int button, const TQString & text )" +.SH "void TQMessageBox::setButtonText ( int button, const TQString & text )" Sets the text of the message box button \fIbutton\fR to \fItext\fR. Setting the text of a button that is not in the message box is silently ignored. .PP See also buttonText(). -.SH "void QMessageBox::setIcon ( Icon )" +.SH "void TQMessageBox::setIcon ( Icon )" Sets the message box's icon. See the "icon" property for details. -.SH "void QMessageBox::setIconPixmap ( const TQPixmap & )" +.SH "void TQMessageBox::setIconPixmap ( const TQPixmap & )" Sets the current icon. See the "iconPixmap" property for details. -.SH "void QMessageBox::setText ( const TQString & )" +.SH "void TQMessageBox::setText ( const TQString & )" Sets the message box text to be displayed. See the "text" property for details. -.SH "void QMessageBox::setTextFormat ( TextFormat )" +.SH "void TQMessageBox::setTextFormat ( TextFormat )" Sets the format of the text displayed by the message box. See the "textFormat" property for details. -.SH "TQPixmap QMessageBox::standardIcon ( Icon icon )\fC [static]\fR" -Returns the pixmap used for a standard icon. This allows the pixmaps to be used in more complex message boxes. \fIicon\fR specifies the required icon, e.g. QMessageBox::Question, QMessageBox::Information, QMessageBox::Warning or QMessageBox::Critical. -.SH "TQPixmap QMessageBox::standardIcon ( Icon icon, GUIStyle style )\fC [static]\fR" +.SH "TQPixmap TQMessageBox::standardIcon ( Icon icon )\fC [static]\fR" +Returns the pixmap used for a standard icon. This allows the pixmaps to be used in more complex message boxes. \fIicon\fR specifies the required icon, e.g. TQMessageBox::Question, TQMessageBox::Information, TQMessageBox::Warning or TQMessageBox::Critical. +.SH "TQPixmap TQMessageBox::standardIcon ( Icon icon, GUIStyle style )\fC [static]\fR" \fBThis function is obsolete.\fR It is provided to keep old source working. We strongly advise against using it in new code. .PP -Returns the pixmap used for a standard icon. This allows the pixmaps to be used in more complex message boxes. \fIicon\fR specifies the required icon, e.g. QMessageBox::Information, QMessageBox::Warning or QMessageBox::Critical. +Returns the pixmap used for a standard icon. This allows the pixmaps to be used in more complex message boxes. \fIicon\fR specifies the required icon, e.g. TQMessageBox::Information, TQMessageBox::Warning or TQMessageBox::Critical. .PP \fIstyle\fR is unused. -.SH "TQString QMessageBox::text () const" +.SH "TQString TQMessageBox::text () const" Returns the message box text to be displayed. See the "text" property for details. -.SH "TextFormat QMessageBox::textFormat () const" +.SH "TextFormat TQMessageBox::textFormat () const" Returns the format of the text displayed by the message box. See the "textFormat" property for details. -.SH "int QMessageBox::warning ( TQWidget * parent, const TQString & caption, const TQString & text, int button0, int button1, int button2 = 0 )\fC [static]\fR" +.SH "int TQMessageBox::warning ( TQWidget * parent, const TQString & caption, const TQString & text, int button0, int button1, int button2 = 0 )\fC [static]\fR" Opens a warning message box with the caption \fIcaption\fR and the text \fItext\fR. The dialog may have up to three buttons. Each of the button parameters, \fIbutton0\fR, \fIbutton1\fR and \fIbutton2\fR may be set to one of the following values: .TP -QMessageBox::NoButton +TQMessageBox::NoButton .TP -QMessageBox::Ok +TQMessageBox::Ok .TP -QMessageBox::Cancel +TQMessageBox::Cancel .TP -QMessageBox::Yes +TQMessageBox::Yes .TP -QMessageBox::No +TQMessageBox::No .TP -QMessageBox::Abort +TQMessageBox::Abort .TP -QMessageBox::Retry +TQMessageBox::Retry .TP -QMessageBox::Ignore +TQMessageBox::Ignore .TP -QMessageBox::YesAll +TQMessageBox::YesAll .TP -QMessageBox::NoAll +TQMessageBox::NoAll .PP -If you don't want all three buttons, set the last button, or last two buttons to QMessageBox::NoButton. +If you don't want all three buttons, set the last button, or last two buttons to TQMessageBox::NoButton. .PP -One button can be OR-ed with \fCQMessageBox::Default\fR, and one button can be OR-ed with \fCQMessageBox::Escape\fR. +One button can be OR-ed with \fCTQMessageBox::Default\fR, and one button can be OR-ed with \fCTQMessageBox::Escape\fR. .PP -Returns the identity (QMessageBox::Ok, or QMessageBox::No, etc.) of the button that was clicked. +Returns the identity (TQMessageBox::Ok, or TQMessageBox::No, etc.) of the button that was clicked. .PP If \fIparent\fR is 0, the message box becomes an application-global modal dialog box. If \fIparent\fR is a widget, the message box becomes modal relative to \fIparent\fR. .PP @@ -770,7 +770,7 @@ See also information(), question(), and critical(). .PP Examples: .)l chart/chartform.cpp, i18n/main.cpp, network/mail/smtp.cpp, qwerty/qwerty.cpp, showimg/showimg.cpp, and sound/sound.cpp. -.SH "int QMessageBox::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 )\fC [static]\fR" +.SH "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 )\fC [static]\fR" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP 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). @@ -788,17 +788,17 @@ This property holds the message box's icon. .PP The icon of the message box can be one of the following predefined icons: .TP -QMessageBox::NoIcon +TQMessageBox::NoIcon .TP -QMessageBox::Question +TQMessageBox::Question .TP -QMessageBox::Information +TQMessageBox::Information .TP -QMessageBox::Warning +TQMessageBox::Warning .TP -QMessageBox::Critical +TQMessageBox::Critical .PP -The actual pixmap used for displaying the icon depends on the current GUI style. You can also set a custom pixmap icon using the QMessageBox::iconPixmap property. The default icon is QMessageBox::NoIcon. +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. .PP See also iconPixmap. .PP @@ -814,7 +814,7 @@ Set this property's value with setIconPixmap() and get this property's value wit .SH "TQString text" This property holds the message box text to be displayed. .PP -The text will be interpreted either as a plain text or as rich text, depending on the text format setting (QMessageBox::textFormat). The default setting is AutoText, i.e. the message box will try to auto-detect the format of the text. +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. .PP The default value of this property is TQString::null. .PP @@ -833,7 +833,7 @@ See also text. Set this property's value with setTextFormat() and get this property's value with textFormat(). .SH "SEE ALSO" -.BR http://doc.trolltech.com/ntqmessagebox.html +.BR http://doc.trolltech.com/tqmessagebox.html .BR http://www.trolltech.com/faq/tech.html .SH COPYRIGHT Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the diff --git a/doc/man/man3/tqmetaobject.3qt b/doc/man/man3/tqmetaobject.3qt index 3d2317fe0..7a68ee4d7 100644 --- a/doc/man/man3/tqmetaobject.3qt +++ b/doc/man/man3/tqmetaobject.3qt @@ -1,5 +1,5 @@ '\" t -.TH QMetaObject 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*- +.TH TQMetaObject 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*- .\" Copyright 1992-2007 Trolltech ASA. All rights reserved. See the .\" license file included in the distribution for a complete license .\" statement. @@ -7,9 +7,9 @@ .ad l .nh .SH NAME -QMetaObject \- Meta information about TQt objects +TQMetaObject \- Meta information about TQt objects .SH SYNOPSIS -\fC#include \fR +\fC#include \fR .PP .SS "Public Members" .in +1c @@ -20,7 +20,7 @@ QMetaObject \- Meta information about TQt objects .BI "const char * \fBsuperClassName\fR () const" .br .ti -1c -.BI "QMetaObject * \fBsuperClass\fR () const" +.BI "TQMetaObject * \fBsuperClass\fR () const" .br .ti -1c .BI "bool \fBinherits\fR ( const char * clname ) const" @@ -47,7 +47,7 @@ QMetaObject \- Meta information about TQt objects .BI "const char * \fBclassInfo\fR ( const char * name, bool super = FALSE ) const" .br .ti -1c -.BI "const QMetaProperty * \fBproperty\fR ( int index, bool super = FALSE ) const" +.BI "const TQMetaProperty * \fBproperty\fR ( int index, bool super = FALSE ) const" .br .ti -1c .BI "int \fBfindProperty\fR ( const char * name, bool super = FALSE ) const" @@ -60,9 +60,9 @@ QMetaObject \- Meta information about TQt objects .br .in -1c .SH DESCRIPTION -The QMetaObject class contains meta information about TQt objects. +The TQMetaObject class contains meta information about TQt objects. .PP -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 QMetaObject per class. +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. .PP This class is not normally required for application programming. But if you write meta applications, such as scripting engines or GUI builders, you might find these functions useful: .TP @@ -83,83 +83,83 @@ Classes may have a list of name-value pairs of class information. The number of See also moc (Meta Object Compiler) and Object Model. .PP .SH MEMBER FUNCTION DOCUMENTATION -.SH "const QClassInfo * QMetaObject::classInfo ( int index, bool super = FALSE ) const" +.SH "const QClassInfo * TQMetaObject::classInfo ( int index, bool super = FALSE ) const" Returns the class information with index \fIindex\fR or 0 if no such information exists. .PP If \fIsuper\fR is TRUE, inherited class information is included. -.SH "const char * QMetaObject::classInfo ( const char * name, bool super = FALSE ) const" +.SH "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. .PP Returns the class information with name \fIname\fR or 0 if no such information exists. .PP If \fIsuper\fR is TRUE, inherited class information is included. -.SH "const char * QMetaObject::className () const" +.SH "const char * TQMetaObject::className () const" Returns the class name. .PP See also TQObject::className() and superClassName(). -.SH "int QMetaObject::findProperty ( const char * name, bool super = FALSE ) const" +.SH "int TQMetaObject::findProperty ( const char * name, bool super = FALSE ) const" Returns the index for the property with name \fIname\fR or -1 if no such property exists. .PP If \fIsuper\fR is TRUE, inherited properties are included. .PP See also property() and propertyNames(). -.SH "bool QMetaObject::inherits ( const char * clname ) const" +.SH "bool TQMetaObject::inherits ( const char * clname ) const" Returns TRUE if this class inherits \fIclname\fR within the meta object inheritance chain; otherwise returns FALSE. .PP (A class is considered to inherit itself.) -.SH "int QMetaObject::numClassInfo ( bool super = FALSE ) const" +.SH "int TQMetaObject::numClassInfo ( bool super = FALSE ) const" Returns the number of items of class information available for this class. .PP If \fIsuper\fR is TRUE, inherited class information is included. -.SH "int QMetaObject::numProperties ( bool super = FALSE ) const" +.SH "int TQMetaObject::numProperties ( bool super = FALSE ) const" Returns the number of properties for this class. .PP If \fIsuper\fR is TRUE, inherited properties are included. .PP See also propertyNames(). -.SH "int QMetaObject::numSignals ( bool super = FALSE ) const" +.SH "int TQMetaObject::numSignals ( bool super = FALSE ) const" Returns the number of signals for this class. .PP If \fIsuper\fR is TRUE, inherited signals are included. .PP See also signalNames(). -.SH "int QMetaObject::numSlots ( bool super = FALSE ) const" +.SH "int TQMetaObject::numSlots ( bool super = FALSE ) const" Returns the number of slots for this class. .PP If \fIsuper\fR is TRUE, inherited slots are included. .PP See also slotNames(). -.SH "const QMetaProperty * QMetaObject::property ( int index, bool super = FALSE ) const" +.SH "const TQMetaProperty * TQMetaObject::property ( int index, bool super = FALSE ) const" Returns the property meta data for the property at index \fIindex\fR or 0 if no such property exists. .PP If \fIsuper\fR is TRUE, inherited properties are included. .PP See also propertyNames(). -.SH "TQStrList QMetaObject::propertyNames ( bool super = FALSE ) const" +.SH "TQStrList TQMetaObject::propertyNames ( bool super = FALSE ) const" Returns a list with the names of all this class's properties. .PP If \fIsuper\fR is TRUE, inherited properties are included. .PP See also property(). -.SH "TQStrList QMetaObject::signalNames ( bool super = FALSE ) const" +.SH "TQStrList TQMetaObject::signalNames ( bool super = FALSE ) const" Returns a list with the names of all this class's signals. .PP If \fIsuper\fR is TRUE, inherited signals are included. -.SH "TQStrList QMetaObject::slotNames ( bool super = FALSE ) const" +.SH "TQStrList TQMetaObject::slotNames ( bool super = FALSE ) const" Returns a list with the names of all this class's slots. .PP If \fIsuper\fR is TRUE, inherited slots are included. .PP See also numSlots(). -.SH "QMetaObject * QMetaObject::superClass () const" +.SH "TQMetaObject * TQMetaObject::superClass () const" Returns the meta object of the super class or 0 if there is no such object. -.SH "const char * QMetaObject::superClassName () const" +.SH "const char * TQMetaObject::superClassName () const" Returns the class name of the superclass or 0 if there is no superclass in the TQObject hierachy. .PP See also className(). .SH "SEE ALSO" -.BR http://doc.trolltech.com/ntqmetaobject.html +.BR http://doc.trolltech.com/tqmetaobject.html .BR http://www.trolltech.com/faq/tech.html .SH COPYRIGHT Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the diff --git a/doc/man/man3/tqmetaproperty.3qt b/doc/man/man3/tqmetaproperty.3qt index 08ec73579..8e424980b 100644 --- a/doc/man/man3/tqmetaproperty.3qt +++ b/doc/man/man3/tqmetaproperty.3qt @@ -1,5 +1,5 @@ '\" t -.TH QMetaProperty 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*- +.TH TQMetaProperty 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*- .\" Copyright 1992-2007 Trolltech ASA. All rights reserved. See the .\" license file included in the distribution for a complete license .\" statement. @@ -7,9 +7,9 @@ .ad l .nh .SH NAME -QMetaProperty \- Stores meta data about a property +TQMetaProperty \- Stores meta data about a property .SH SYNOPSIS -\fC#include \fR +\fC#include \fR .PP .SS "Public Members" .in +1c @@ -57,7 +57,7 @@ QMetaProperty \- Stores meta data about a property .br .in -1c .SH DESCRIPTION -The QMetaProperty class stores meta data about a property. +The TQMetaProperty class stores meta data about a property. .PP Property meta data includes type(), name(), and whether a property is writable(), designable() and stored(). .PP @@ -65,68 +65,68 @@ The functions isSetType(), isEnumType() and enumKeys() provide further informati .PP Actual property values are set and received through TQObject's set and get functions. See TQObject::setProperty() and TQObject::property() for details. .PP -You receive meta property data through an object's meta object. See QMetaObject::property() and QMetaObject::propertyNames() for details. +You receive meta property data through an object's meta object. See TQMetaObject::property() and TQMetaObject::propertyNames() for details. .PP See also Object Model. .SH MEMBER FUNCTION DOCUMENTATION -.SH "bool QMetaProperty::designable ( TQObject * o = 0 ) const" +.SH "bool TQMetaProperty::designable ( TQObject * o = 0 ) const" Returns TRUE if the property is designable for object \fIo\fR; otherwise returns FALSE. .PP If no object \fIo\fR is given, the function returns a static approximation. -.SH "TQStrList QMetaProperty::enumKeys () const" +.SH "TQStrList TQMetaProperty::enumKeys () const" Returns the possible enumeration keys if this property is an enumeration type (or a set type). .PP See also isEnumType(). -.SH "bool QMetaProperty::isEnumType () const" +.SH "bool TQMetaProperty::isEnumType () const" Returns TRUE if the property's type is an enumeration value; otherwise returns FALSE. .PP See also isSetType() and enumKeys(). -.SH "bool QMetaProperty::isSetType () const" +.SH "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. .PP See also isEnumType() and enumKeys(). -.SH "int QMetaProperty::keyToValue ( const char * key ) const" +.SH "int TQMetaProperty::keyToValue ( const char * key ) const" Converts the enumeration key \fIkey\fR to its integer value. .PP For set types, use keysToValue(). .PP See also valueToKey(), isSetType(), and keysToValue(). -.SH "int QMetaProperty::keysToValue ( const TQStrList & keys ) const" +.SH "int TQMetaProperty::keysToValue ( const TQStrList & keys ) const" Converts the list of keys \fIkeys\fR to their combined (OR-ed) integer value. .PP See also isSetType() and valueToKey(). -.SH "const char * QMetaProperty::name () const" +.SH "const char * TQMetaProperty::name () const" Returns the name of the property. -.SH "bool QMetaProperty::reset ( TQObject * o ) const" +.SH "bool TQMetaProperty::reset ( TQObject * o ) const" Tries to reset the property for object \fIo\fR with a reset method. On success, returns TRUE; otherwise returns FALSE. .PP Reset methods are optional, usually only a few properties support them. -.SH "bool QMetaProperty::scriptable ( TQObject * o = 0 ) const" +.SH "bool TQMetaProperty::scriptable ( TQObject * o = 0 ) const" Returns TRUE if the property is scriptable for object \fIo\fR; otherwise returns FALSE. .PP If no object \fIo\fR is given, the function returns a static approximation. -.SH "bool QMetaProperty::stored ( TQObject * o = 0 ) const" +.SH "bool TQMetaProperty::stored ( TQObject * o = 0 ) const" Returns TRUE if the property shall be stored for object \fIo\fR; otherwise returns FALSE. .PP If no object \fIo\fR is given, the function returns a static approximation. -.SH "const char * QMetaProperty::type () const" +.SH "const char * TQMetaProperty::type () const" Returns the type of the property. -.SH "const char * QMetaProperty::valueToKey ( int value ) const" +.SH "const char * TQMetaProperty::valueToKey ( int value ) const" Converts the enumeration value \fIvalue\fR to its literal key. .PP For set types, use valueToKeys(). .PP See also isSetType() and valueToKeys(). -.SH "TQStrList QMetaProperty::valueToKeys ( int value ) const" +.SH "TQStrList TQMetaProperty::valueToKeys ( int value ) const" Converts the set value \fIvalue\fR to a list of keys. .PP See also isSetType() and valueToKey(). -.SH "bool QMetaProperty::writable () const" +.SH "bool TQMetaProperty::writable () const" Returns TRUE if the property is writable; otherwise returns FALSE. .PP .SH "SEE ALSO" -.BR http://doc.trolltech.com/qmetaproperty.html +.BR http://doc.trolltech.com/tqmetaproperty.html .BR http://www.trolltech.com/faq/tech.html .SH COPYRIGHT Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the diff --git a/doc/man/man3/tqmimesourcefactory.3qt b/doc/man/man3/tqmimesourcefactory.3qt index 7f66d1202..d97bf7165 100644 --- a/doc/man/man3/tqmimesourcefactory.3qt +++ b/doc/man/man3/tqmimesourcefactory.3qt @@ -78,7 +78,7 @@ A TQMimeSourceFactory provides an abstract interface to a collection of informat .PP The base TQMimeSourceFactory can be used in two ways: as an abstraction of a collection of files or as specifically stored data. For it to access files, call setFilePath() before accessing data. For stored data, call setData() for each item (there are also convenience functions, e.g. setText(), setImage() and setPixmap(), that simply call setData() with appropriate parameters). .PP -The rich text widgets, TQTextEdit and TQTextBrowser, use TQMimeSourceFactory to resolve references such as images or links within rich text documents. They either access the default factory (see defaultFactory()) or their own (see TQTextEdit::setMimeSourceFactory()). Other classes that are capable of displaying rich text (such as TQLabel, TQWhatsThis or QMessageBox) always use the default factory. +The rich text widgets, TQTextEdit and TQTextBrowser, use TQMimeSourceFactory to resolve references such as images or links within rich text documents. They either access the default factory (see defaultFactory()) or their own (see TQTextEdit::setMimeSourceFactory()). Other classes that are capable of displaying rich text (such as TQLabel, TQWhatsThis or TQMessageBox) always use the default factory. .PP A factory can also be used as a container to store data associated with a name. This technique is useful whenever rich text contains images that are stored in the program itself, not loaded from the hard disk. Your program may, for example, define some image data as: .PP @@ -166,7 +166,7 @@ This is an overloaded member function, provided for convenience. It behaves esse .PP A convenience function. See data(const TQString& abs_name). The file name is given in \fIabs_or_rel_name\fR and the path is in \fIcontext\fR. .SH "TQMimeSourceFactory * TQMimeSourceFactory::defaultFactory ()\fC [static]\fR" -Returns the application-wide default mime source factory. This factory is used by rich text rendering classes such as TQSimpleRichText, TQWhatsThis and QMessageBox to resolve named references within rich text documents. It serves also as the initial factory for the more complex render widgets, TQTextEdit and TQTextBrowser. +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. .PP See also setDefaultFactory(). .PP diff --git a/doc/man/man3/tqmouseevent.3qt b/doc/man/man3/tqmouseevent.3qt index 91ea44b13..397a9e9ff 100644 --- a/doc/man/man3/tqmouseevent.3qt +++ b/doc/man/man3/tqmouseevent.3qt @@ -1,5 +1,5 @@ '\" t -.TH QMouseEvent 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*- +.TH TQMouseEvent 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*- .\" Copyright 1992-2007 Trolltech ASA. All rights reserved. See the .\" license file included in the distribution for a complete license .\" statement. @@ -7,7 +7,7 @@ .ad l .nh .SH NAME -QMouseEvent \- Parameters that describe a mouse event +TQMouseEvent \- Parameters that describe a mouse event .SH SYNOPSIS \fC#include \fR .PP @@ -16,10 +16,10 @@ Inherits TQEvent. .SS "Public Members" .in +1c .ti -1c -.BI "\fBQMouseEvent\fR ( Type type, const TQPoint & pos, int button, int state )" +.BI "\fBTQMouseEvent\fR ( Type type, const TQPoint & pos, int button, int state )" .br .ti -1c -.BI "\fBQMouseEvent\fR ( Type type, const TQPoint & pos, const TQPoint & globalPos, int button, int state )" +.BI "\fBTQMouseEvent\fR ( Type type, const TQPoint & pos, const TQPoint & globalPos, int button, int state )" .br .ti -1c .BI "const TQPoint & \fBpos\fR () const" @@ -59,7 +59,7 @@ Inherits TQEvent. .br .in -1c .SH DESCRIPTION -The QMouseEvent class contains parameters that describe a mouse event. +The TQMouseEvent class contains parameters that describe a mouse event. .PP Mouse events occur when a mouse button is pressed or released inside a widget or when the mouse cursor is moved. .PP @@ -67,7 +67,7 @@ Mouse move events will occur only when a mouse button is pressed down, unless mo .PP Qt 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. .PP -A mouse event contains a special accept flag that indicates whether the receiver wants the event. You should call QMouseEvent::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 QMouseEvent::accept() or an event filter consumes it. +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. .PP 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. .PP @@ -77,7 +77,7 @@ The event handlers TQWidget::mousePressEvent(), TQWidget::mouseReleaseEvent(), T .PP See also TQWidget::mouseTracking, TQWidget::grabMouse(), TQCursor::pos(), and Event Classes. .SH MEMBER FUNCTION DOCUMENTATION -.SH "QMouseEvent::QMouseEvent ( Type type, const TQPoint & pos, int button, int state )" +.SH "TQMouseEvent::TQMouseEvent ( Type type, const TQPoint & pos, int button, int state )" Constructs a mouse event object. .PP The \fItype\fR parameter must be one of TQEvent::MouseButtonPress, TQEvent::MouseButtonRelease, TQEvent::MouseButtonDblClick or TQEvent::MouseMove. @@ -85,13 +85,13 @@ The \fItype\fR parameter must be one of TQEvent::MouseButtonPress, TQEvent::Mous The \fIpos\fR parameter specifies the position relative to the receiving widget. \fIbutton\fR specifies the button that caused the event, which should be TQt::NoButton (0), if \fItype\fR is MouseMove. \fIstate\fR is the ButtonState at the time of the event. .PP The globalPos() is initialized to TQCursor::pos(), which may not be appropriate. Use the other constructor to specify the global position explicitly. -.SH "QMouseEvent::QMouseEvent ( Type type, const TQPoint & pos, const TQPoint & globalPos, int button, int state )" +.SH "TQMouseEvent::TQMouseEvent ( Type type, const TQPoint & pos, const TQPoint & globalPos, int button, int state )" Constructs a mouse event object. .PP The \fItype\fR parameter must be TQEvent::MouseButtonPress, TQEvent::MouseButtonRelease, TQEvent::MouseButtonDblClick or TQEvent::MouseMove. .PP The \fIpos\fR parameter specifies the position relative to the receiving widget. \fIglobalPos\fR is the position in absolute coordinates. \fIbutton\fR specifies the button that caused the event, which should be TQt::NoButton (0), if \fItype\fR is MouseMove. \fIstate\fR is the ButtonState at the time of the event. -.SH "void QMouseEvent::accept ()" +.SH "void TQMouseEvent::accept ()" Sets the accept flag of the mouse event object. .PP Setting the accept parameter indicates that the receiver of the event wants the mouse event. Unwanted mouse events are sent to the parent widget. @@ -99,7 +99,7 @@ Setting the accept parameter indicates that the receiver of the event wants the The accept flag is set by default. .PP See also ignore(). -.SH "ButtonState QMouseEvent::button () const" +.SH "ButtonState TQMouseEvent::button () const" Returns the button that caused the event. .PP Possible return values are LeftButton, RightButton, MidButton and NoButton. @@ -110,21 +110,21 @@ See also state() and TQt::ButtonState. .PP Examples: .)l dclock/dclock.cpp, life/life.cpp, and t14/cannon.cpp. -.SH "const TQPoint & QMouseEvent::globalPos () const" +.SH "const TQPoint & TQMouseEvent::globalPos () const" Returns the global position of the mouse pointer \fIat the time of the event\fR. 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() ). .PP See also globalX() and globalY(). .PP Example: aclock/aclock.cpp. -.SH "int QMouseEvent::globalX () const" +.SH "int TQMouseEvent::globalX () const" Returns the global x-position of the mouse pointer at the time of the event. .PP See also globalY() and globalPos(). -.SH "int QMouseEvent::globalY () const" +.SH "int TQMouseEvent::globalY () const" Returns the global y-position of the mouse pointer at the time of the event. .PP See also globalX() and globalPos(). -.SH "void QMouseEvent::ignore ()" +.SH "void TQMouseEvent::ignore ()" Clears the accept flag parameter of the mouse event object. .PP Clearing the accept parameter indicates that the event receiver does not want the mouse event. Unwanted mouse events are sent to the parent widget. @@ -132,9 +132,9 @@ Clearing the accept parameter indicates that the event receiver does not want th The accept flag is set by default. .PP See also accept(). -.SH "bool QMouseEvent::isAccepted () const" +.SH "bool TQMouseEvent::isAccepted () const" Returns TRUE if the receiver of the event wants to keep the key; otherwise returns FALSE. -.SH "const TQPoint & QMouseEvent::pos () const" +.SH "const TQPoint & TQMouseEvent::pos () const" Returns the position of the mouse pointer relative to the widget that received the event. .PP If you move the widget as a result of the mouse event, use the global position returned by globalPos() to avoid a shaking motion. @@ -143,7 +143,7 @@ See also x(), y(), and globalPos(). .PP Examples: .)l chart/canvasview.cpp, drawlines/connect.cpp, life/life.cpp, popup/popup.cpp, qmag/qmag.cpp, t14/cannon.cpp, and tooltip/tooltip.cpp. -.SH "ButtonState QMouseEvent::state () const" +.SH "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. .PP This means that if you have a TQEvent::MouseButtonPress or a TQEvent::MouseButtonDblClick state() will \fInot\fR 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. @@ -156,17 +156,17 @@ See also button(), stateAfter(), and TQt::ButtonState. .PP Examples: .)l popup/popup.cpp and showimg/showimg.cpp. -.SH "ButtonState QMouseEvent::stateAfter () const" +.SH "ButtonState TQMouseEvent::stateAfter () const" Returns the state of buttons after the event. .PP See also state() and TQt::ButtonState. -.SH "int QMouseEvent::x () const" +.SH "int TQMouseEvent::x () const" Returns the x-position of the mouse pointer, relative to the widget that received the event. .PP See also y() and pos(). .PP Example: showimg/showimg.cpp. -.SH "int QMouseEvent::y () const" +.SH "int TQMouseEvent::y () const" Returns the y-position of the mouse pointer, relative to the widget that received the event. .PP See also x() and pos(). @@ -174,7 +174,7 @@ See also x() and pos(). Example: showimg/showimg.cpp. .SH "SEE ALSO" -.BR http://doc.trolltech.com/qmouseevent.html +.BR http://doc.trolltech.com/tqmouseevent.html .BR http://www.trolltech.com/faq/tech.html .SH COPYRIGHT Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the diff --git a/doc/man/man3/tqmoveevent.3qt b/doc/man/man3/tqmoveevent.3qt index 21b70a476..872140efc 100644 --- a/doc/man/man3/tqmoveevent.3qt +++ b/doc/man/man3/tqmoveevent.3qt @@ -1,5 +1,5 @@ '\" t -.TH QMoveEvent 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*- +.TH TQMoveEvent 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*- .\" Copyright 1992-2007 Trolltech ASA. All rights reserved. See the .\" license file included in the distribution for a complete license .\" statement. @@ -7,7 +7,7 @@ .ad l .nh .SH NAME -QMoveEvent \- Event parameters for move events +TQMoveEvent \- Event parameters for move events .SH SYNOPSIS \fC#include \fR .PP @@ -16,7 +16,7 @@ Inherits TQEvent. .SS "Public Members" .in +1c .ti -1c -.BI "\fBQMoveEvent\fR ( const TQPoint & pos, const TQPoint & oldPos )" +.BI "\fBTQMoveEvent\fR ( const TQPoint & pos, const TQPoint & oldPos )" .br .ti -1c .BI "const TQPoint & \fBpos\fR () const" @@ -26,7 +26,7 @@ Inherits TQEvent. .br .in -1c .SH DESCRIPTION -The QMoveEvent class contains event parameters for move events. +The TQMoveEvent class contains event parameters for move events. .PP Move events are sent to widgets that have been moved to a new position relative to their parent. .PP @@ -34,16 +34,16 @@ The event handler TQWidget::moveEvent() receives move events. .PP See also TQWidget::pos, TQWidget::geometry, and Event Classes. .SH MEMBER FUNCTION DOCUMENTATION -.SH "QMoveEvent::QMoveEvent ( const TQPoint & pos, const TQPoint & oldPos )" +.SH "TQMoveEvent::TQMoveEvent ( const TQPoint & pos, const TQPoint & oldPos )" Constructs a move event with the new and old widget positions, \fIpos\fR and \fIoldPos\fR respectively. -.SH "const TQPoint & QMoveEvent::oldPos () const" +.SH "const TQPoint & TQMoveEvent::oldPos () const" Returns the old position of the widget. -.SH "const TQPoint & QMoveEvent::pos () const" +.SH "const TQPoint & TQMoveEvent::pos () const" Returns the new position of the widget. This excludes the window frame for top level widgets. .SH "SEE ALSO" -.BR http://doc.trolltech.com/qmoveevent.html +.BR http://doc.trolltech.com/tqmoveevent.html .BR http://www.trolltech.com/faq/tech.html .SH COPYRIGHT Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the diff --git a/doc/man/man3/tqnpinstance.3qt b/doc/man/man3/tqnpinstance.3qt index 1c2e2dabf..ef3eea78e 100644 --- a/doc/man/man3/tqnpinstance.3qt +++ b/doc/man/man3/tqnpinstance.3qt @@ -1,5 +1,5 @@ '\" t -.TH QNPInstance 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*- +.TH TQNPInstance 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*- .\" Copyright 1992-2007 Trolltech ASA. All rights reserved. See the .\" license file included in the distribution for a complete license .\" statement. @@ -7,18 +7,18 @@ .ad l .nh .SH NAME -QNPInstance \- TQObject that is a web browser plugin +TQNPInstance \- TQObject that is a web browser plugin .SH SYNOPSIS This class is part of the \fBQt Netscape Extension\fR. .PP -\fC#include \fR +\fC#include \fR .PP Inherits TQObject. .PP .SS "Public Members" .in +1c .ti -1c -.BI "\fB~QNPInstance\fR ()" +.BI "\fB~TQNPInstance\fR ()" .br .ti -1c .BI "int \fBargc\fR () const" @@ -45,25 +45,25 @@ Inherits TQObject. .BI "const char * \fBuserAgent\fR () const" .br .ti -1c -.BI "virtual QNPWidget * \fBnewWindow\fR ()" +.BI "virtual TQNPWidget * \fBnewWindow\fR ()" .br .ti -1c -.BI "QNPWidget * \fBwidget\fR ()" +.BI "TQNPWidget * \fBwidget\fR ()" .br .ti -1c .BI "enum \fBStreamMode\fR { Normal = 1, Seek = 2, AsFile = 3, AsFileOnly = 4 }" .br .ti -1c -.BI "virtual bool \fBnewStreamCreated\fR ( QNPStream *, StreamMode & smode )" +.BI "virtual bool \fBnewStreamCreated\fR ( TQNPStream *, StreamMode & smode )" .br .ti -1c -.BI "virtual int \fBwriteReady\fR ( QNPStream * )" +.BI "virtual int \fBwriteReady\fR ( TQNPStream * )" .br .ti -1c -.BI "virtual int \fBwrite\fR ( QNPStream *, int offset, int len, void * buffer )" +.BI "virtual int \fBwrite\fR ( TQNPStream *, int offset, int len, void * buffer )" .br .ti -1c -.BI "virtual void \fBstreamDestroyed\fR ( QNPStream * )" +.BI "virtual void \fBstreamDestroyed\fR ( TQNPStream * )" .br .ti -1c .BI "void \fBstatus\fR ( const char * msg )" @@ -78,10 +78,10 @@ Inherits TQObject. .BI "void \fBpostURL\fR ( const char * url, const char * window, uint len, const char * buf, bool file )" .br .ti -1c -.BI "QNPStream * \fBnewStream\fR ( const char * mimetype, const char * window, bool as_file = FALSE )" +.BI "TQNPStream * \fBnewStream\fR ( const char * mimetype, const char * window, bool as_file = FALSE )" .br .ti -1c -.BI "virtual void \fBstreamAsFile\fR ( QNPStream *, const char * fname )" +.BI "virtual void \fBstreamAsFile\fR ( TQNPStream *, const char * fname )" .br .ti -1c .BI "void * \fBgetJavaPeer\fR () const" @@ -99,58 +99,58 @@ Inherits TQObject. .SS "Protected Members" .in +1c .ti -1c -.BI "\fBQNPInstance\fR ()" +.BI "\fBTQNPInstance\fR ()" .br .in -1c .SH DESCRIPTION This class is defined in the \fBQt Netscape Extension\fR, which can be found in the \fCqt/extensions\fR directory. It is not included in the main TQt API. .PP -The QNPInstance class provides a TQObject that is a web browser plugin. +The TQNPInstance class provides a TQObject that is a web browser plugin. .PP -Deriving from QNPInstance creates an object that represents a single \fC\fR tag in an HTML document. +Deriving from TQNPInstance creates an object that represents a single \fC\fR tag in an HTML document. .PP -The QNPInstance is responsible for creating an appropriate QNPWidget window if required (not all plugins have windows), and for interacting with the input/output facilities intrinsic to plugins. +The TQNPInstance is responsible for creating an appropriate TQNPWidget window if required (not all plugins have windows), and for interacting with the input/output facilities intrinsic to plugins. .PP Note that there is \fIabsolutely no guarantee\fR 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 \fC\fR tag has a SRC parameter). .PP \fINone of Qt's GUI functionality\fR may be used until after the first call to newWindow(). This includes any use of TQPaintDevice (i.e. TQPixmap, TQWidget, and all subclasses), QApplication, anything related to TQPainter (TQBrush, etc.), fonts, TQMovie, TQToolTip, etc. Useful classes which specifically \fIcan\fR be used are TQImage, TQFile, and TQBuffer. .PP -This restriction can easily be accommodated by structuring your plugin so that the task of the QNPInstance is to gather data, while the task of the QNPWidget is to provide a graphical interface to that data. +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. .SS "Member Type Documentation" -.SH "QNPInstance::InstanceMode" +.SH "TQNPInstance::InstanceMode" This enum type provides Qt-style names for three #defines in \fCnpapi.h\fR: .TP -\fCQNPInstance::Embed\fR - corresponds to NP_EMBED +\fCTQNPInstance::Embed\fR - corresponds to NP_EMBED .TP -\fCQNPInstance::Full\fR - corresponds to NP_FULL +\fCTQNPInstance::Full\fR - corresponds to NP_FULL .TP -\fCQNPInstance::Background\fR - corresponds to NP_BACKGROUND -.SH "QNPInstance::Reason" +\fCTQNPInstance::Background\fR - corresponds to NP_BACKGROUND +.SH "TQNPInstance::Reason" .TP -\fCQNPInstance::ReasonDone\fR +\fCTQNPInstance::ReasonDone\fR .TP -\fCQNPInstance::ReasonBreak\fR +\fCTQNPInstance::ReasonBreak\fR .TP -\fCQNPInstance::ReasonError\fR +\fCTQNPInstance::ReasonError\fR .TP -\fCQNPInstance::ReasonUnknown\fR -.SH "QNPInstance::StreamMode" +\fCTQNPInstance::ReasonUnknown\fR +.SH "TQNPInstance::StreamMode" .TP -\fCQNPInstance::Normal\fR +\fCTQNPInstance::Normal\fR .TP -\fCQNPInstance::Seek\fR +\fCTQNPInstance::Seek\fR .TP -\fCQNPInstance::AsFile\fR +\fCTQNPInstance::AsFile\fR .TP -\fCQNPInstance::AsFileOnly\fR +\fCTQNPInstance::AsFileOnly\fR .SH MEMBER FUNCTION DOCUMENTATION -.SH "QNPInstance::QNPInstance ()\fC [protected]\fR" -Creates a QNPInstance. +.SH "TQNPInstance::TQNPInstance ()\fC [protected]\fR" +Creates a TQNPInstance. .PP -Can only be called from within a derived class created within QNPlugin::newInstance(). -.SH "QNPInstance::~QNPInstance ()" +Can only be called from within a derived class created within TQNPlugin::newInstance(). +.SH "TQNPInstance::~TQNPInstance ()" Called when the plugin instance is about to be deleted. -.SH "const char * QNPInstance::arg ( const char * name ) const" +.SH "const char * TQNPInstance::arg ( const char * name ) const" Returns the value of the named arguments, or 0 if no argument called \fIname\fR appears in the \fC\fR tag of this instance. If the argument appears, but has no value assigned, the empty string is returned. In summary: .PP
              .nf @@ -165,49 +165,49 @@ Tag Result .TE .fi
              -.SH "int QNPInstance::argc () const" +.SH "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. .PP See also arg() and argn(). -.SH "const char * QNPInstance::argn ( int i ) const" +.SH "const char * TQNPInstance::argn ( int i ) const" Returns the name of the \fIi\fR-th argument. .PP See also argc() and argv(). -.SH "const char * QNPInstance::argv ( int i ) const" +.SH "const char * TQNPInstance::argv ( int i ) const" Returns the value of the \fIi\fR-th argument. .PP \\as argc(), arg() -.SH "void * QNPInstance::getJavaPeer () const" +.SH "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. .PP The return value is actually a \fCjref\fR we use \fCvoid*\fR so as to avoid burdening plugins which do not require Java. .PP -See also QNPlugin::getJavaClass() and QNPlugin::getJavaEnv(). -.SH "void QNPInstance::getURL ( const char * url, const char * window = 0 )" +See also TQNPlugin::getJavaClass() and TQNPlugin::getJavaEnv(). +.SH "void TQNPInstance::getURL ( const char * url, const char * window = 0 )" Requests that the \fIurl\fR be retrieved and sent to the named \fIwindow\fR. See Netscape's JavaScript documentation for an explanation of window names. -.SH "void QNPInstance::getURLNotify ( const char * url, const char * window = 0, void * data = 0 )" +.SH "void TQNPInstance::getURLNotify ( const char * url, const char * window = 0, void * data = 0 )" Requests that the given \fIurl\fR be retrieved and sent to the named \fIwindow\fR. See Netscape's JavaScript documentation for an explanation of window names. Passes the arguments including \fIdata\fR to NPN_GetURLNotify. .PP Netscape: NPN_GetURLNotify method -.SH "InstanceMode QNPInstance::mode () const" +.SH "InstanceMode TQNPInstance::mode () const" Returns the mode of the plugin. -.SH "QNPStream * QNPInstance::newStream ( const char * mimetype, const char * window, bool as_file = FALSE )" +.SH "TQNPStream * TQNPInstance::newStream ( const char * mimetype, const char * window, bool as_file = FALSE )" \fBThis function is under development and is subject to change.\fR .PP This function is \fInot tested\fR. .PP Requests the creation of a new data stream \fIfrom\fR the plugin. The MIME type and window are passed in \fImimetype\fR and \fIwindow\fR. \fIas_file\fR holds the AsFileOnly flag. It is an interface to the NPN_NewStream function of the Netscape Plugin API. -.SH "bool QNPInstance::newStreamCreated ( QNPStream *, StreamMode & smode )\fC [virtual]\fR" +.SH "bool TQNPInstance::newStreamCreated ( TQNPStream *, StreamMode & smode )\fC [virtual]\fR" 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 requires the stream as a file, it should set \fIsmode\fR 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(). .PP Note that the AsFileOnly method is not supported by Netscape 2.0 and MSIE 3.0. .PP The default implementation accepts any stream. -.SH "QNPWidget * QNPInstance::newWindow ()\fC [virtual]\fR" -Called at most once, at some time after the QNPInstance is created. If the plugin requires a window, this function should return a derived class of QNPWidget that provides the required interface. +.SH "TQNPWidget * TQNPInstance::newWindow ()\fC [virtual]\fR" +Called at most once, at some time after the TQNPInstance is created. If the plugin requires a window, this function should return a derived class of TQNPWidget that provides the required interface. .PP Example: grapher/grapher.cpp. -.SH "void QNPInstance::notifyURL ( const char * url, Reason r, void * notifyData )\fC [virtual]\fR" +.SH "void TQNPInstance::notifyURL ( const char * url, Reason r, void * notifyData )\fC [virtual]\fR" \fBThis function is under development and is subject to change.\fR .PP This function is \fInot tested\fR. @@ -217,7 +217,7 @@ Called whenever a \fIurl\fR is notified after a call to NPN_GetURLNotify with \f It is an encapsulation of the NPP_URLNotify function of the Netscape Plugin API. .PP See also: Netscape: NPP_URLNotify method -.SH "void QNPInstance::postURL ( const char * url, const char * window, uint len, const char * buf, bool file )" +.SH "void TQNPInstance::postURL ( const char * url, const char * window, uint len, const char * buf, bool file )" \fBThis function is under development and is subject to change.\fR .PP This function is \fInot tested\fR. @@ -225,7 +225,7 @@ This function is \fInot tested\fR. It is an interface to the NPN_PostURL function of the Netscape Plugin API. .PP Passes \fIurl\fR, \fIwindow\fR, \fIbuf\fR, \fIlen\fR, and \fIfile\fR to NPN_PostURL. -.SH "void QNPInstance::print ( TQPainter * )\fC [virtual]\fR" +.SH "void TQNPInstance::print ( TQPainter * )\fC [virtual]\fR" \fBThis function is under development and is subject to change.\fR .PP This function is \fInot tested\fR. @@ -233,39 +233,39 @@ This function is \fInot tested\fR. Print the instance embedded in a page. .PP It is an encapsulation of the NPP_Print function of the Netscape Plugin API. -.SH "bool QNPInstance::printFullPage ()\fC [virtual]\fR" +.SH "bool TQNPInstance::printFullPage ()\fC [virtual]\fR" \fBThis function is under development and is subject to change.\fR .PP This function is \fInot tested\fR. .PP It is an encapsulation of the NPP_Print function of the Netscape Plugin API. -.SH "void QNPInstance::status ( const char * msg )" +.SH "void TQNPInstance::status ( const char * msg )" Sets the status message in the browser containing this instance to \fImsg\fR. -.SH "void QNPInstance::streamAsFile ( QNPStream *, const char * fname )\fC [virtual]\fR" +.SH "void TQNPInstance::streamAsFile ( TQNPStream *, const char * fname )\fC [virtual]\fR" Called when a stream is delivered as a single file called \fIfname\fR rather than as chunks. This may be simpler for a plugin to deal with, but precludes any incremental behavior. .PP Note that the AsFileOnly method is not supported by Netscape 2.0 and MSIE 3.0. .PP See also newStreamCreated() and newStream(). -.SH "void QNPInstance::streamDestroyed ( QNPStream * )\fC [virtual]\fR" +.SH "void TQNPInstance::streamDestroyed ( TQNPStream * )\fC [virtual]\fR" 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. -.SH "const char * QNPInstance::userAgent () const" +.SH "const char * TQNPInstance::userAgent () const" Returns the user agent (browser name) containing this instance. -.SH "QNPWidget * QNPInstance::widget ()" +.SH "TQNPWidget * TQNPInstance::widget ()" Returns the plugin window created by newWindow(), if any. -.SH "int QNPInstance::write ( QNPStream *, int offset, int len, void * buffer )\fC [virtual]\fR" +.SH "int TQNPInstance::write ( TQNPStream *, int offset, int len, void * buffer )\fC [virtual]\fR" Called when incoming data is available for processing by the instance. The instance \fImust\fR 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 \fIlen\fR. \fIbuffer\fR is the data available for consumption. The \fIoffset\fR argument is merely an informational value indicating the total amount of data that has been consumed in prior calls. .PP This function should return the amount of data actually consumed. .PP Example: grapher/grapher.cpp. -.SH "int QNPInstance::writeReady ( QNPStream * )\fC [virtual]\fR" +.SH "int TQNPInstance::writeReady ( TQNPStream * )\fC [virtual]\fR" Returns the minimum amount of data the instance is willing to receive from the given stream. .PP The default returns a very large value. .SH "SEE ALSO" -.BR http://doc.trolltech.com/qnpinstance.html +.BR http://doc.trolltech.com/tqnpinstance.html .BR http://www.trolltech.com/faq/tech.html .SH COPYRIGHT Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the diff --git a/doc/man/man3/tqnplugin.3qt b/doc/man/man3/tqnplugin.3qt index f2f5c91f9..0c18274f8 100644 --- a/doc/man/man3/tqnplugin.3qt +++ b/doc/man/man3/tqnplugin.3qt @@ -1,5 +1,5 @@ '\" t -.TH QNPlugin 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*- +.TH TQNPlugin 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*- .\" Copyright 1992-2007 Trolltech ASA. All rights reserved. See the .\" license file included in the distribution for a complete license .\" statement. @@ -7,22 +7,22 @@ .ad l .nh .SH NAME -QNPlugin \- The main factory for plugin objects +TQNPlugin \- The main factory for plugin objects .SH SYNOPSIS This class is part of the \fBQt Netscape Extension\fR. .PP -\fC#include \fR +\fC#include \fR .PP .SS "Public Members" .in +1c .ti -1c -.BI "virtual \fB~QNPlugin\fR ()" +.BI "virtual \fB~TQNPlugin\fR ()" .br .ti -1c .BI "void \fBgetVersionInfo\fR ( int & plugin_major, int & plugin_minor, int & browser_major, int & browser_minor )" .br .ti -1c -.BI "virtual QNPInstance * \fBnewInstance\fR () = 0" +.BI "virtual TQNPInstance * \fBnewInstance\fR () = 0" .br .ti -1c .BI "virtual const char * \fBgetMIMEDescription\fR () const = 0" @@ -46,50 +46,50 @@ This class is part of the \fBQt Netscape Extension\fR. .SS "Static Public Members" .in +1c .ti -1c -.BI "QNPlugin * \fBcreate\fR ()" +.BI "TQNPlugin * \fBcreate\fR ()" .br .ti -1c -.BI "QNPlugin * \fBactual\fR ()" +.BI "TQNPlugin * \fBactual\fR ()" .br .in -1c .SS "Protected Members" .in +1c .ti -1c -.BI "\fBQNPlugin\fR ()" +.BI "\fBTQNPlugin\fR ()" .br .in -1c .SH DESCRIPTION This class is defined in the \fBQt Netscape Extension\fR, which can be found in the \fCqt/extensions\fR directory. It is not included in the main TQt API. .PP -The QNPlugin class provides the main factory for plugin objects. +The TQNPlugin class provides the main factory for plugin objects. .PP -This class is the heart of the plugin. One instance of this object is created when the plugin is \fIfirst\fR needed, by calling QNPlugin::create(), which must be implemented in your plugin code to return some derived class of QNPlugin. The one QNPlugin object creates all QNPInstance instances for a web browser running in a single process. +This class is the heart of the plugin. One instance of this object is created when the plugin is \fIfirst\fR 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. .PP Additionally, if TQt is linked to the plugin as a dynamic library, only one instance of QApplication will exist \fIacross all plugins that have been made with Qt\fR. So, your plugin should tread lightly on global settings. Do not, for example, use QApplication::setFont() - that will change the font in every widget of every Qt-based plugin currently loaded! .SH MEMBER FUNCTION DOCUMENTATION -.SH "QNPlugin::QNPlugin ()\fC [protected]\fR" -Creates a QNPlugin. This may only be used by the constructor of the class, derived from QNPlugin, that is returned by your plugin's implementation of the QNPlugin::create() function. -.SH "QNPlugin::~QNPlugin ()\fC [virtual]\fR" -Destroys the QNPlugin. 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 QApplication will still exist at this time, but will be deleted shortly after, just before the plugin is deleted. -.SH "QNPlugin * QNPlugin::actual ()\fC [static]\fR" -Returns the plugin most recently returned by QNPlugin::create(). -.SH "QNPlugin * QNPlugin::create ()\fC [static]\fR" -This function must be implemented by your plugin code. It should return a derived class of QNPlugin. -.SH "void * QNPlugin::getJavaClass ()\fC [virtual]\fR" +.SH "TQNPlugin::TQNPlugin ()\fC [protected]\fR" +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. +.SH "TQNPlugin::~TQNPlugin ()\fC [virtual]\fR" +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 QApplication will still exist at this time, but will be deleted shortly after, just before the plugin is deleted. +.SH "TQNPlugin * TQNPlugin::actual ()\fC [static]\fR" +Returns the plugin most recently returned by TQNPlugin::create(). +.SH "TQNPlugin * TQNPlugin::create ()\fC [static]\fR" +This function must be implemented by your plugin code. It should return a derived class of TQNPlugin. +.SH "void * TQNPlugin::getJavaClass ()\fC [virtual]\fR" Override this function to return a reference to the Java class that represents the plugin. The default returns 0, indicating no class. .PP -If you override this class, you must also override QNPlugin::unuseJavaClass(). +If you override this class, you must also override TQNPlugin::unuseJavaClass(). .PP The return value is actually a \fCjref\fR; we use \fCvoid*\fR so as to avoid burdening plugins which do not require Java. .PP -See also getJavaEnv() and QNPInstance::getJavaPeer(). -.SH "void * QNPlugin::getJavaEnv () const" +See also getJavaEnv() and TQNPInstance::getJavaPeer(). +.SH "void * TQNPlugin::getJavaEnv () const" Returns a pointer to the Java execution environment, or 0 if either Java is disabled or an error occurred. .PP The return value is actually a \fCJRIEnv*\fR; we use \fCvoid*\fR so as to avoid burdening plugins which do not require Java. .PP -See also getJavaClass() and QNPInstance::getJavaPeer(). -.SH "const char * QNPlugin::getMIMEDescription () const\fC [pure virtual]\fR" +See also getJavaClass() and TQNPInstance::getJavaPeer(). +.SH "const char * TQNPlugin::getMIMEDescription () const\fC [pure virtual]\fR" 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: .PP .nf @@ -118,21 +118,21 @@ Override this function to return the MIME description of the data formats suppor .br } .fi -.SH "const char * QNPlugin::getPluginDescriptionString () const\fC [pure virtual]\fR" +.SH "const char * TQNPlugin::getPluginDescriptionString () const\fC [pure virtual]\fR" Returns a pointer to the plain-text description of the plugin. -.SH "const char * QNPlugin::getPluginNameString () const\fC [pure virtual]\fR" +.SH "const char * TQNPlugin::getPluginNameString () const\fC [pure virtual]\fR" Returns a pointer to the plain-text name of the plugin. -.SH "void QNPlugin::getVersionInfo ( int & plugin_major, int & plugin_minor, int & browser_major, int & browser_minor )" +.SH "void TQNPlugin::getVersionInfo ( int & plugin_major, int & plugin_minor, int & browser_major, int & browser_minor )" Populates \fI*\fR\fIplugin_major\fR and \fI*\fR\fIplugin_minor\fR with the version of the plugin API and populates \fI*\fR\fIbrowser_major\fR and \fI*\fR\fIbrowser_minor\fR with the version of the web browser. -.SH "QNPInstance * QNPlugin::newInstance ()\fC [pure virtual]\fR" -Override this function to return an appropriate derived class of QNPInstance. -.SH "void QNPlugin::unuseJavaClass ()\fC [virtual]\fR" +.SH "TQNPInstance * TQNPlugin::newInstance ()\fC [pure virtual]\fR" +Override this function to return an appropriate derived class of TQNPInstance. +.SH "void TQNPlugin::unuseJavaClass ()\fC [virtual]\fR" This function is called when the plugin is shutting down. The function should \fIunuse\fR the Java class returned earlier by getJavaClass(). .SH "SEE ALSO" -.BR http://doc.trolltech.com/qnplugin.html +.BR http://doc.trolltech.com/tqnplugin.html .BR http://www.trolltech.com/faq/tech.html .SH COPYRIGHT Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the diff --git a/doc/man/man3/tqnpstream.3qt b/doc/man/man3/tqnpstream.3qt index 958767d40..e185be6a8 100644 --- a/doc/man/man3/tqnpstream.3qt +++ b/doc/man/man3/tqnpstream.3qt @@ -1,5 +1,5 @@ '\" t -.TH QNPStream 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*- +.TH TQNPStream 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*- .\" Copyright 1992-2007 Trolltech ASA. All rights reserved. See the .\" license file included in the distribution for a complete license .\" statement. @@ -7,16 +7,16 @@ .ad l .nh .SH NAME -QNPStream \- Stream of data provided to a QNPInstance by the browser +TQNPStream \- Stream of data provided to a TQNPInstance by the browser .SH SYNOPSIS This class is part of the \fBQt Netscape Extension\fR. .PP -\fC#include \fR +\fC#include \fR .PP .SS "Public Members" .in +1c .ti -1c -.BI "\fB~QNPStream\fR ()" +.BI "\fB~TQNPStream\fR ()" .br .ti -1c .BI "const char * \fBurl\fR () const" @@ -46,50 +46,50 @@ This class is part of the \fBQt Netscape Extension\fR. .BI "int \fBwrite\fR ( int len, void * buffer )" .br .ti -1c -.BI "QNPInstance * \fBinstance\fR ()" +.BI "TQNPInstance * \fBinstance\fR ()" .br .ti -1c -.BI "\fBQNPStream\fR ( QNPInstance * in, const char * mt, _NPStream * st, bool se )" +.BI "\fBTQNPStream\fR ( TQNPInstance * in, const char * mt, _NPStream * st, bool se )" .br .in -1c .SH DESCRIPTION This class is defined in the \fBQt Netscape Extension\fR, which can be found in the \fCqt/extensions\fR directory. It is not included in the main TQt API. .PP -The QNPStream class provides a stream of data provided to a QNPInstance by the browser. +The TQNPStream class provides a stream of data provided to a TQNPInstance by the browser. .PP Note that this is neither a TQTextStream nor a TQDataStream. .PP -See also QNPInstance::write() and QNPInstance::newStreamCreated(). +See also TQNPInstance::write() and TQNPInstance::newStreamCreated(). .SH MEMBER FUNCTION DOCUMENTATION -.SH "QNPStream::QNPStream ( QNPInstance * in, const char * mt, _NPStream * st, bool se )" -Creates a stream. Plugins should not call this; they should call QNPInstance::newStream() if they need a stream. +.SH "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. .PP -Takes a QNPInstance \fIin\fR, MIME type \fImt\fR, a pointer to an _NPStream \fIst\fR and a seekable flag \fIse\fR. -.SH "QNPStream::~QNPStream ()" +Takes a TQNPInstance \fIin\fR, MIME type \fImt\fR, a pointer to an _NPStream \fIst\fR and a seekable flag \fIse\fR. +.SH "TQNPStream::~TQNPStream ()" Destroys the stream. -.SH "bool QNPStream::complete () const" +.SH "bool TQNPStream::complete () const" Returns TRUE if the stream has received all the data from the source; otherwise returns FALSE. -.SH "uint QNPStream::end () const" +.SH "uint TQNPStream::end () const" Returns the length of the stream in bytes. The function might return 0 for streams of unknown length. -.SH "QNPInstance * QNPStream::instance ()" -Returns the QNPInstance for which this stream was created. -.SH "uint QNPStream::lastModified () const" +.SH "TQNPInstance * TQNPStream::instance ()" +Returns the TQNPInstance for which this stream was created. +.SH "uint TQNPStream::lastModified () const" Returns the time when the source of the stream was last modified. -.SH "bool QNPStream::okay () const" +.SH "bool TQNPStream::okay () const" Returns TRUE if no errors have occurred on the stream; otherwise returns FALSE. -.SH "void QNPStream::requestRead ( int offset, uint length )" -Requests the section of the stream, of \fIlength\fR bytes from \fIoffset\fR, be sent to the QNPInstance::write() function of the instance() of this stream. -.SH "bool QNPStream::seekable () const" +.SH "void TQNPStream::requestRead ( int offset, uint length )" +Requests the section of the stream, of \fIlength\fR bytes from \fIoffset\fR, be sent to the TQNPInstance::write() function of the instance() of this stream. +.SH "bool TQNPStream::seekable () const" Returns TRUE if the stream is seekable; otherwise returns FALSE. -.SH "const char * QNPStream::type () const" +.SH "const char * TQNPStream::type () const" Returns the MIME type of the stream. -.SH "const char * QNPStream::url () const" +.SH "const char * TQNPStream::url () const" Returns the URL from which the stream was created. -.SH "int QNPStream::write ( int len, void * buffer )" +.SH "int TQNPStream::write ( int len, void * buffer )" Writes \fIlen\fR bytes from \fIbuffer\fR \fIto\fR the stream. .SH "SEE ALSO" -.BR http://doc.trolltech.com/qnpstream.html +.BR http://doc.trolltech.com/tqnpstream.html .BR http://www.trolltech.com/faq/tech.html .SH COPYRIGHT Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the diff --git a/doc/man/man3/tqnpwidget.3qt b/doc/man/man3/tqnpwidget.3qt index 58b4fa9e8..9f1ac1d0e 100644 --- a/doc/man/man3/tqnpwidget.3qt +++ b/doc/man/man3/tqnpwidget.3qt @@ -1,5 +1,5 @@ '\" t -.TH QNPWidget 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*- +.TH TQNPWidget 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*- .\" Copyright 1992-2007 Trolltech ASA. All rights reserved. See the .\" license file included in the distribution for a complete license .\" statement. @@ -7,21 +7,21 @@ .ad l .nh .SH NAME -QNPWidget \- TQWidget that is a web browser plugin window +TQNPWidget \- TQWidget that is a web browser plugin window .SH SYNOPSIS This class is part of the \fBQt Netscape Extension\fR. .PP -\fC#include \fR +\fC#include \fR .PP Inherits TQWidget. .PP .SS "Public Members" .in +1c .ti -1c -.BI "\fBQNPWidget\fR ()" +.BI "\fBTQNPWidget\fR ()" .br .ti -1c -.BI "\fB~QNPWidget\fR ()" +.BI "\fB~TQNPWidget\fR ()" .br .ti -1c .BI "virtual void \fBenterInstance\fR ()" @@ -30,21 +30,21 @@ Inherits TQWidget. .BI "virtual void \fBleaveInstance\fR ()" .br .ti -1c -.BI "QNPInstance * \fBinstance\fR ()" +.BI "TQNPInstance * \fBinstance\fR ()" .br .in -1c .SH DESCRIPTION This class is defined in the \fBQt Netscape Extension\fR, which can be found in the \fCqt/extensions\fR directory. It is not included in the main TQt API. .PP -The QNPWidget class provides a TQWidget that is a web browser plugin window. +The TQNPWidget class provides a TQWidget that is a web browser plugin window. .PP -Derive from QNPWidget to create a widget that can be used as a web browser plugin window, or create one and add child widgets. Instances of QNPWidget may only be created when QNPInstance::newWindow() is called by the browser. +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. .PP A common way to develop a plugin widget is to develop it as a stand-alone application window, then make it a \fIchild\fR of a plugin widget to use it as a browser plugin. The technique is: .PP .nf .br -class MyPluginWindow : public QNPWidget +class MyPluginWindow : public TQNPWidget .br { .br @@ -73,7 +73,7 @@ public: } .br .br - void resizeEvent(QResizeEvent*) + void resizeEvent(TQResizeEvent*) .br { .br @@ -88,23 +88,23 @@ public: .PP The default implementation is an empty window. .SH MEMBER FUNCTION DOCUMENTATION -.SH "QNPWidget::QNPWidget ()" -Creates a QNPWidget. -.SH "QNPWidget::~QNPWidget ()" +.SH "TQNPWidget::TQNPWidget ()" +Creates a TQNPWidget. +.SH "TQNPWidget::~TQNPWidget ()" Destroys the window. This will be called by the plugin binding code when the window is no longer required. 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. -.SH "void QNPWidget::enterInstance ()\fC [virtual]\fR" +.SH "void TQNPWidget::enterInstance ()\fC [virtual]\fR" Called when the mouse enters the plugin window. Does nothing by default. .PP Example: grapher/grapher.cpp. -.SH "QNPInstance * QNPWidget::instance ()" +.SH "TQNPInstance * TQNPWidget::instance ()" Returns the instance for which this widget is the plugin window. -.SH "void QNPWidget::leaveInstance ()\fC [virtual]\fR" +.SH "void TQNPWidget::leaveInstance ()\fC [virtual]\fR" Called when the mouse leaves the plugin window. Does nothing by default. .PP Example: grapher/grapher.cpp. .SH "SEE ALSO" -.BR http://doc.trolltech.com/qnpwidget.html +.BR http://doc.trolltech.com/tqnpwidget.html .BR http://www.trolltech.com/faq/tech.html .SH COPYRIGHT Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the diff --git a/doc/man/man3/tqobject.3qt b/doc/man/man3/tqobject.3qt index 841426d75..d32be74fd 100644 --- a/doc/man/man3/tqobject.3qt +++ b/doc/man/man3/tqobject.3qt @@ -15,7 +15,7 @@ All the functions in this class are reentrant when TQt is built with thread supp .PP Inherits Qt. .PP --Inherited by TQAccel, TQAccessibleObject, TQAction, QApplication, TQAssistantClient, TQDataPump, TQWidget, TQCanvas, TQStyle, TQClipboard, TQDns, TQLayout, TQDragObject, TQEditorFactory, TQEventLoop, TQFileIconProvider, TQNetworkProtocol, TQNetworkOperation, QNPInstance, TQObjectCleanupHandler, TQProcess, TQServerSocket, TQSessionManager, TQSignal, TQSignalMapper, TQSocket, TQSocketNotifier, QSound, TQSqlDatabase, TQSqlDriver, TQSqlForm, TQStyleSheet, TQTimer, TQToolTipGroup, TQTranslator, TQUrlOperator, and TQValidator. +-Inherited by TQAccel, TQAccessibleObject, TQAction, QApplication, TQAssistantClient, TQDataPump, TQWidget, TQCanvas, TQStyle, TQClipboard, TQDns, TQLayout, TQDragObject, TQEditorFactory, TQEventLoop, TQFileIconProvider, TQNetworkProtocol, TQNetworkOperation, TQNPInstance, TQObjectCleanupHandler, TQProcess, TQServerSocket, TQSessionManager, TQSignal, TQSignalMapper, TQSocket, TQSocketNotifier, QSound, TQSqlDatabase, TQSqlDriver, TQSqlForm, TQStyleSheet, TQTimer, TQToolTipGroup, TQTranslator, TQUrlOperator, and TQValidator. .PP .SS "Public Members" .in +1c @@ -29,7 +29,7 @@ Inherits Qt. .BI "virtual const char * \fBclassName\fR () const" .br .ti -1c -.BI "virtual QMetaObject * \fBmetaObject\fR () const" +.BI "virtual TQMetaObject * \fBmetaObject\fR () const" .br .ti -1c .BI "virtual bool \fBevent\fR ( TQEvent * e )" @@ -606,17 +606,17 @@ Example: t->inherits( "TQButton" ); // returns FALSE .br .br - // TQScrollBar inherits TQWidget and QRangeControl + // TQScrollBar inherits TQWidget and TQRangeControl .br TQScrollBar *s = new TQScrollBar( 0 ); .br s->inherits( "TQWidget" ); // returns TRUE .br - s->inherits( "QRangeControl" ); // returns FALSE + s->inherits( "TQRangeControl" ); // returns FALSE .br .fi .PP -(QRangeControl is not a TQObject.) +(TQRangeControl is not a TQObject.) .PP See also isA() and metaObject(). .PP @@ -738,7 +738,7 @@ Kills all timers that this object has started. \fBWarning:\fR 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(). .PP See also timerEvent(), startTimer(), and killTimer(). -.SH "QMetaObject * TQObject::metaObject () const\fC [virtual]\fR" +.SH "TQMetaObject * TQObject::metaObject () const\fC [virtual]\fR" Returns a pointer to the meta object of this object. .PP 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 TQ_OBJECT macro will also have a meta object. @@ -771,7 +771,7 @@ If no such property exists, the returned variant is invalid. .PP Information about all available properties are provided through the metaObject(). .PP -See also setProperty(), QVariant::isValid(), metaObject(), QMetaObject::propertyNames(), and QMetaObject::property(). +See also setProperty(), QVariant::isValid(), metaObject(), TQMetaObject::propertyNames(), and TQMetaObject::property(). .PP Example: qutlook/centralwidget.cpp. .SH "TQObjectList * TQObject::queryList ( const char * inheritsClass = 0, const char * objName = 0, bool regexpMatch = TRUE, bool recursiveSearch = TRUE ) const" @@ -844,7 +844,7 @@ Returns TRUE if the operation was successful; otherwise returns FALSE. .PP Information about all available properties is provided through the metaObject(). .PP -See also property(), metaObject(), QMetaObject::propertyNames(), and QMetaObject::property(). +See also property(), metaObject(), TQMetaObject::propertyNames(), and TQMetaObject::property(). .PP Example: qutlook/centralwidget.cpp. .SH "bool TQObject::signalsBlocked () const" diff --git a/doc/man/man3/tqpoint.3qt b/doc/man/man3/tqpoint.3qt index fedb4aef2..3c1626738 100644 --- a/doc/man/man3/tqpoint.3qt +++ b/doc/man/man3/tqpoint.3qt @@ -133,7 +133,7 @@ Example: .br //TQPoint oldPos is defined somewhere else .br - MyWidget::mouseMoveEvent( QMouseEvent *e ) + MyWidget::mouseMoveEvent( TQMouseEvent *e ) .br { .br diff --git a/doc/man/man3/tqpopupmenu.3qt b/doc/man/man3/tqpopupmenu.3qt index aeaf43a07..519dcbff9 100644 --- a/doc/man/man3/tqpopupmenu.3qt +++ b/doc/man/man3/tqpopupmenu.3qt @@ -269,7 +269,7 @@ Example: mdi/application.cpp. .SH "TQKeySequence TQMenuData::accel ( int id ) const" Returns the accelerator key that has been defined for the menu item \fIid\fR, or 0 if it has no accelerator key or if there is no such menu item. .PP -See also setAccel(), TQAccel, and ntqnamespace.h. +See also setAccel(), TQAccel, and tqnamespace.h. .SH "void TQPopupMenu::activated ( int id )\fC [signal]\fR" This signal is emitted when a menu item is selected; \fIid\fR is the id of the selected item. .PP @@ -458,7 +458,7 @@ Note that keyboard accelerators in TQt are not application-global, instead they .PP Returns the allocated menu identifier number (\fIid\fR if \fIid\fR >= 0). .PP -See also removeItem(), changeItem(), setAccel(), connectItem(), TQAccel, and ntqnamespace.h. +See also removeItem(), changeItem(), setAccel(), connectItem(), TQAccel, and tqnamespace.h. .PP Examples: .)l addressbook/mainwindow.cpp, canvas/canvas.cpp, menu/menu.cpp, qwerty/qwerty.cpp, scrollview/scrollview.cpp, showimg/showimg.cpp, and sound/sound.cpp. @@ -469,7 +469,7 @@ Inserts a menu item with icon \fIicon\fR, text \fItext\fR, accelerator \fIaccel\ .PP Returns the allocated menu identifier number (\fIid\fR if \fIid\fR >= 0). .PP -See also removeItem(), changeItem(), setAccel(), connectItem(), TQAccel, and ntqnamespace.h. +See also removeItem(), changeItem(), setAccel(), connectItem(), TQAccel, and tqnamespace.h. .SH "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. .PP @@ -489,7 +489,7 @@ To look best when being highlighted as a menu item, the pixmap should provide a .PP Returns the allocated menu identifier number (\fIid\fR if \fIid\fR >= 0). .PP -See also removeItem(), changeItem(), setAccel(), connectItem(), TQAccel, and ntqnamespace.h. +See also removeItem(), changeItem(), setAccel(), connectItem(), TQAccel, and tqnamespace.h. .SH "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. .PP @@ -683,7 +683,7 @@ See also removeItem() and clear(). .SH "void TQMenuData::setAccel ( const TQKeySequence & key, int id )" Sets the accelerator key for the menu item \fIid\fR to \fIkey\fR. .PP -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 ntqnamespace.h contains a list of key codes. +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 tqnamespace.h contains a list of key codes. .PP 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. .PP diff --git a/doc/man/man3/tqprinter.3qt b/doc/man/man3/tqprinter.3qt index aca49c390..23535157a 100644 --- a/doc/man/man3/tqprinter.3qt +++ b/doc/man/man3/tqprinter.3qt @@ -214,7 +214,7 @@ setFullPage() tells TQPrinter whether you want to deal with the full page or jus .TP setNumCopies() tells TQPrinter how many copies of the document it should print. .TP -setMinMax() tells TQPrinter and QPrintDialog what the allowed range for fromPage() and toPage() are. +setMinMax() tells TQPrinter and TQPrintDialog what the allowed range for fromPage() and toPage() are. .PP 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.) .PP diff --git a/doc/man/man3/tqrangecontrol.3qt b/doc/man/man3/tqrangecontrol.3qt index 681b8f1ce..9e5750938 100644 --- a/doc/man/man3/tqrangecontrol.3qt +++ b/doc/man/man3/tqrangecontrol.3qt @@ -1,5 +1,5 @@ '\" t -.TH QRangeControl 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*- +.TH TQRangeControl 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*- .\" Copyright 1992-2007 Trolltech ASA. All rights reserved. See the .\" license file included in the distribution for a complete license .\" statement. @@ -7,22 +7,22 @@ .ad l .nh .SH NAME -QRangeControl \- Integer value within a range +TQRangeControl \- Integer value within a range .SH SYNOPSIS -\fC#include \fR +\fC#include \fR .PP Inherited by TQDial, TQScrollBar, TQSlider, and TQSpinBox. .PP .SS "Public Members" .in +1c .ti -1c -.BI "\fBQRangeControl\fR ()" +.BI "\fBTQRangeControl\fR ()" .br .ti -1c -.BI "\fBQRangeControl\fR ( int minValue, int maxValue, int lineStep, int pageStep, int value )" +.BI "\fBTQRangeControl\fR ( int minValue, int maxValue, int lineStep, int pageStep, int value )" .br .ti -1c -.BI "virtual \fB~QRangeControl\fR ()" +.BI "virtual \fB~TQRangeControl\fR ()" .br .ti -1c .BI "int \fBvalue\fR () const" @@ -95,60 +95,60 @@ Inherited by TQDial, TQScrollBar, TQSlider, and TQSpinBox. .br .in -1c .SH DESCRIPTION -The QRangeControl class provides an integer value within a range. +The TQRangeControl class provides an integer value within a range. .PP -Although originally designed for the TQScrollBar widget, the QRangeControl can also be used in conjunction with other widgets such as TQSlider and TQSpinBox. Here are the five main concepts in the class: +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: .PP
                .IP 1 -\fICurrent value\fR The bounded integer that QRangeControl maintains. value() returns it, and several functions, including setValue(), set it. +\fICurrent value\fR The bounded integer that TQRangeControl maintains. value() returns it, and several functions, including setValue(), set it. .IP 2 \fIMinimum\fR The lowest value that value() can ever return. Returned by minValue() and set by setRange() or one of the constructors. .IP 3 \fIMaximum\fR The highest value that value() can ever return. Returned by maxValue() and set by setRange() or one of the constructors. .IP 4 -\fILine step\fR The smaller of two natural steps that QRangeControl 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(). +\fILine step\fR 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(). .IP 5 -\fIPage step\fR The larger of two natural steps that QRangeControl 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(). +\fIPage step\fR 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(). .IP .PP 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() + \fIn\fR * lineStep() for integer values of \fIn\fR. Some widgets may allow the user to set any value at all; others may just provide multiples of lineStep() or pageStep(). .PP -QRangeControl 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 provides three virtual functions that are well suited for updating the on-screen representation of range controls and emitting signals: valueChange(), rangeChange() and stepChange(). .PP -QRangeControl also provides a function called bound() which lets you force arbitrary integers to be within the allowed range of the range control. +TQRangeControl also provides a function called bound() which lets you force arbitrary integers to be within the allowed range of the range control. .PP -We recommend that all widgets that inherit QRangeControl provide at least a signal called valueChanged(); many widgets will want to provide addStep(), addPage(), substractStep() and substractPage() as slots. +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. .PP -Note that you must use multiple inheritance if you plan to implement a widget using QRangeControl because QRangeControl is not derived from TQWidget. +Note that you must use multiple inheritance if you plan to implement a widget using TQRangeControl because TQRangeControl is not derived from TQWidget. .PP See also Miscellaneous Classes. .SH MEMBER FUNCTION DOCUMENTATION -.SH "QRangeControl::QRangeControl ()" +.SH "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. -.SH "QRangeControl::QRangeControl ( int minValue, int maxValue, int lineStep, int pageStep, int value )" +.SH "TQRangeControl::TQRangeControl ( int minValue, int maxValue, int lineStep, int pageStep, int value )" Constructs a range control whose value can never be smaller than \fIminValue\fR or greater than \fImaxValue\fR, whose line step size is \fIlineStep\fR and page step size is \fIpageStep\fR and whose value is initially \fIvalue\fR (which is guaranteed to be in range using bound()). -.SH "QRangeControl::~QRangeControl ()\fC [virtual]\fR" +.SH "TQRangeControl::~TQRangeControl ()\fC [virtual]\fR" Destroys the range control -.SH "void QRangeControl::addLine ()" +.SH "void TQRangeControl::addLine ()" Equivalent to \fCsetValue( value() + lineStep() )\fR. .PP If the value is changed, then valueChange() is called. .PP See also subtractLine(), addPage(), and setValue(). -.SH "void QRangeControl::addPage ()" +.SH "void TQRangeControl::addPage ()" Equivalent to \fCsetValue( value() + pageStep() )\fR. .PP If the value is changed, then valueChange() is called. .PP See also subtractPage(), addLine(), and setValue(). -.SH "int QRangeControl::bound ( int v ) const" +.SH "int TQRangeControl::bound ( int v ) const" Forces the value \fIv\fR to be within the range from minValue() to maxValue() inclusive, and returns the result. .PP -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 QRangeControl itself. +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. .PP See also setValue(), value(), minValue(), and maxValue(). -.SH "void QRangeControl::directSetValue ( int value )\fC [protected]\fR" +.SH "void TQRangeControl::directSetValue ( int value )\fC [protected]\fR" Sets the range control \fIvalue\fR directly without calling valueChange(). .PP Forces the new \fIvalue\fR to be within the legal range. @@ -156,23 +156,23 @@ Forces the new \fIvalue\fR 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. .PP See also setValue(). -.SH "int QRangeControl::lineStep () const" +.SH "int TQRangeControl::lineStep () const" Returns the line step. .PP See also setSteps() and pageStep(). -.SH "int QRangeControl::maxValue () const" +.SH "int TQRangeControl::maxValue () const" Returns the maximum value of the range. .PP See also setMaxValue(), setRange(), and minValue(). -.SH "int QRangeControl::minValue () const" +.SH "int TQRangeControl::minValue () const" Returns the minimum value of the range. .PP See also setMinValue(), setRange(), and maxValue(). -.SH "int QRangeControl::pageStep () const" +.SH "int TQRangeControl::pageStep () const" Returns the page step. .PP See also setSteps() and lineStep(). -.SH "int QRangeControl::positionFromValue ( int logical_val, int span ) const\fC [protected]\fR" +.SH "int TQRangeControl::positionFromValue ( int logical_val, int span ) const\fC [protected]\fR" Converts \fIlogical_val\fR to a pixel position. minValue() maps to 0, maxValue() maps to \fIspan\fR and other values are distributed evenly in-between. .PP This function can handle the entire integer range without overflow, providing \fIspan\fR is <= 4096. @@ -180,13 +180,13 @@ This function can handle the entire integer range without overflow, providing \f Calling this method is useful when actually drawing a range control such as a TQScrollBar on-screen. .PP See also valueFromPosition(). -.SH "int QRangeControl::prevValue () const\fC [protected]\fR" +.SH "int TQRangeControl::prevValue () const\fC [protected]\fR" 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(). .PP 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. .PP See also value() and setRange(). -.SH "void QRangeControl::rangeChange ()\fC [virtual protected]\fR" +.SH "void TQRangeControl::rangeChange ()\fC [virtual protected]\fR" 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. .PP Note that this method is called after the range has changed. @@ -194,19 +194,19 @@ Note that this method is called after the range has changed. See also setRange(), valueChange(), and stepChange(). .PP Reimplemented in TQDial, TQSlider, and TQSpinBox. -.SH "void QRangeControl::setMaxValue ( int maxVal )" +.SH "void TQRangeControl::setMaxValue ( int maxVal )" Sets the minimum value of the range to \fImaxVal\fR. .PP If necessary, the minValue() is adjusted so that the range remains valid. .PP See also maxValue() and setMinValue(). -.SH "void QRangeControl::setMinValue ( int minVal )" +.SH "void TQRangeControl::setMinValue ( int minVal )" Sets the minimum value of the range to \fIminVal\fR. .PP If necessary, the maxValue() is adjusted so that the range remains valid. .PP See also minValue() and setMaxValue(). -.SH "void QRangeControl::setRange ( int minValue, int maxValue )" +.SH "void TQRangeControl::setRange ( int minValue, int maxValue )" Sets the range control's minimum value to \fIminValue\fR and its maximum value to \fImaxValue\fR. .PP 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. @@ -217,41 +217,41 @@ See also minValue() and maxValue(). .PP Examples: .)l listbox/listbox.cpp, t12/lcdrange.cpp, t5/main.cpp, t6/main.cpp, t8/lcdrange.cpp, and xform/xform.cpp. -.SH "void QRangeControl::setSteps ( int lineStep, int pageStep )" +.SH "void TQRangeControl::setSteps ( int lineStep, int pageStep )" Sets the range's line step to \fIlineStep\fR and page step to \fIpageStep\fR. .PP Calls the virtual stepChange() function if the new line step or page step are different from the previous settings. .PP See also lineStep(), pageStep(), and setRange(). -.SH "void QRangeControl::setValue ( int value )" +.SH "void TQRangeControl::setValue ( int value )" Sets the range control's value to \fIvalue\fR and forces it to be within the legal range. .PP Calls the virtual valueChange() function if the new value is different from the previous value. The old value can still be retrieved using prevValue(). .PP See also value(). -.SH "void QRangeControl::stepChange ()\fC [virtual protected]\fR" +.SH "void TQRangeControl::stepChange ()\fC [virtual protected]\fR" 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. .PP Note that this method is called after a step setting has changed. .PP See also setSteps(), rangeChange(), and valueChange(). -.SH "void QRangeControl::subtractLine ()" +.SH "void TQRangeControl::subtractLine ()" Equivalent to \fCsetValue( value() - lineStep() )\fR. .PP If the value is changed, then valueChange() is called. .PP See also addLine(), subtractPage(), and setValue(). -.SH "void QRangeControl::subtractPage ()" +.SH "void TQRangeControl::subtractPage ()" Equivalent to \fCsetValue( value() - pageStep() )\fR. .PP If the value is changed, then valueChange() is called. .PP See also addPage(), subtractLine(), and setValue(). -.SH "int QRangeControl::value () const" +.SH "int TQRangeControl::value () const" Returns the current range control value. This is guaranteed to be within the range [minValue(), maxValue()]. .PP See also setValue() and prevValue(). -.SH "void QRangeControl::valueChange ()\fC [virtual protected]\fR" +.SH "void TQRangeControl::valueChange ()\fC [virtual protected]\fR" 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. .PP Note that this method is called after the value has changed. The previous value can be retrieved using prevValue(). @@ -259,7 +259,7 @@ Note that this method is called after the value has changed. The previous value See also setValue(), addPage(), subtractPage(), addLine(), subtractLine(), rangeChange(), and stepChange(). .PP Reimplemented in TQDial, TQSlider, and TQSpinBox. -.SH "int QRangeControl::valueFromPosition ( int pos, int span ) const\fC [protected]\fR" +.SH "int TQRangeControl::valueFromPosition ( int pos, int span ) const\fC [protected]\fR" Converts the pixel position \fIpos\fR to a value. 0 maps to minValue(), \fIspan\fR maps to maxValue() and other values are distributed evenly in-between. .PP This function can handle the entire integer range without overflow. @@ -269,7 +269,7 @@ Calling this method is useful if you actually implemented a range control widget See also positionFromValue(). .SH "SEE ALSO" -.BR http://doc.trolltech.com/ntqrangecontrol.html +.BR http://doc.trolltech.com/tqrangecontrol.html .BR http://www.trolltech.com/faq/tech.html .SH COPYRIGHT Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the diff --git a/doc/man/man3/tqresizeevent.3qt b/doc/man/man3/tqresizeevent.3qt index 09c3c5ef9..fab034ec4 100644 --- a/doc/man/man3/tqresizeevent.3qt +++ b/doc/man/man3/tqresizeevent.3qt @@ -1,5 +1,5 @@ '\" t -.TH QResizeEvent 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*- +.TH TQResizeEvent 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*- .\" Copyright 1992-2007 Trolltech ASA. All rights reserved. See the .\" license file included in the distribution for a complete license .\" statement. @@ -7,7 +7,7 @@ .ad l .nh .SH NAME -QResizeEvent \- Event parameters for resize events +TQResizeEvent \- Event parameters for resize events .SH SYNOPSIS \fC#include \fR .PP @@ -16,7 +16,7 @@ Inherits TQEvent. .SS "Public Members" .in +1c .ti -1c -.BI "\fBQResizeEvent\fR ( const TQSize & size, const TQSize & oldSize )" +.BI "\fBTQResizeEvent\fR ( const TQSize & size, const TQSize & oldSize )" .br .ti -1c .BI "const TQSize & \fBsize\fR () const" @@ -26,7 +26,7 @@ Inherits TQEvent. .br .in -1c .SH DESCRIPTION -The QResizeEvent class contains event parameters for resize events. +The TQResizeEvent class contains event parameters for resize events. .PP Resize events are sent to widgets that have been resized. .PP @@ -34,18 +34,18 @@ The event handler TQWidget::resizeEvent() receives resize events. .PP See also TQWidget::size, TQWidget::geometry, and Event Classes. .SH MEMBER FUNCTION DOCUMENTATION -.SH "QResizeEvent::QResizeEvent ( const TQSize & size, const TQSize & oldSize )" +.SH "TQResizeEvent::TQResizeEvent ( const TQSize & size, const TQSize & oldSize )" Constructs a resize event with the new and old widget sizes, \fIsize\fR and \fIoldSize\fR respectively. -.SH "const TQSize & QResizeEvent::oldSize () const" +.SH "const TQSize & TQResizeEvent::oldSize () const" Returns the old size of the widget. -.SH "const TQSize & QResizeEvent::size () const" +.SH "const TQSize & TQResizeEvent::size () const" Returns the new size of the widget, which is the same as TQWidget::size(). .PP Examples: .)l chart/canvasview.cpp and life/life.cpp. .SH "SEE ALSO" -.BR http://doc.trolltech.com/qresizeevent.html +.BR http://doc.trolltech.com/tqresizeevent.html .BR http://www.trolltech.com/faq/tech.html .SH COPYRIGHT Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the diff --git a/doc/man/man3/tqscrollbar.3qt b/doc/man/man3/tqscrollbar.3qt index 16b0fa690..57a3d81a7 100644 --- a/doc/man/man3/tqscrollbar.3qt +++ b/doc/man/man3/tqscrollbar.3qt @@ -11,7 +11,7 @@ TQScrollBar \- Vertical or horizontal scroll bar .SH SYNOPSIS \fC#include \fR .PP -Inherits TQWidget and QRangeControl. +Inherits TQWidget and TQRangeControl. .PP .SS "Public Members" .in +1c @@ -162,13 +162,13 @@ The \fIslider\fR is the handle that indicates the current value of the scroll ba The \fIpage-up/page-down\fR 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. .IP .PP -TQScrollBar has very few of its own functions; it mostly relies on QRangeControl. 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. +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. .PP Some GUI styles (for example, the Windows and Motif styles provided with Qt), also use the pageStep() value to calculate the size of the slider. .PP -In addition to the access functions from QRangeControl, TQScrollBar provides a comprehensive set of signals:
                .nf +In addition to the access functions from TQRangeControl, TQScrollBar provides a comprehensive set of signals:
                .nf .TS -l - l. 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 QRangeControl. prevLine() the scroll bar has moved one line up or left. nextPage() the scroll bar has moved one page down or right. prevPage() +l - l. 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() .TE .fi
                @@ -288,7 +288,7 @@ This property holds the line step. .PP When setting lineStep, the virtual stepChange() function will be called if the new line step is different from the previous setting. .PP -See also setSteps(), QRangeControl::pageStep(), and setRange(). +See also setSteps(), TQRangeControl::pageStep(), and setRange(). .PP Set this property's value with setLineStep() and get this property's value with lineStep(). .SH "int maxValue" @@ -318,7 +318,7 @@ This property holds the page step. .PP When setting pageStep, the virtual stepChange() function will be called if the new page step is different from the previous setting. .PP -See also QRangeControl::setSteps(), lineStep, and setRange(). +See also TQRangeControl::setSteps(), lineStep, and setRange(). .PP Set this property's value with setPageStep() and get this property's value with pageStep(). .SH "bool tracking" @@ -332,7 +332,7 @@ This property holds the scroll bar's value. .PP Set this property's value with setValue() and get this property's value with value(). .PP -See also QRangeControl::value() and prevValue(). +See also TQRangeControl::value() and prevValue(). .SH "SEE ALSO" .BR http://doc.trolltech.com/tqscrollbar.html diff --git a/doc/man/man3/tqscrollview.3qt b/doc/man/man3/tqscrollview.3qt index d61bf9082..0c4c24fc4 100644 --- a/doc/man/man3/tqscrollview.3qt +++ b/doc/man/man3/tqscrollview.3qt @@ -246,16 +246,16 @@ Inherited by TQCanvasView, TQTable, TQGridView, TQIconView, TQListBox, TQListVie .BI "virtual void \fBdrawContentsOffset\fR ( TQPainter * p, int offsetx, int offsety, int clipx, int clipy, int clipw, int cliph )" .br .ti -1c -.BI "virtual void \fBcontentsMousePressEvent\fR ( QMouseEvent * e )" +.BI "virtual void \fBcontentsMousePressEvent\fR ( TQMouseEvent * e )" .br .ti -1c -.BI "virtual void \fBcontentsMouseReleaseEvent\fR ( QMouseEvent * e )" +.BI "virtual void \fBcontentsMouseReleaseEvent\fR ( TQMouseEvent * e )" .br .ti -1c -.BI "virtual void \fBcontentsMouseDoubleClickEvent\fR ( QMouseEvent * e )" +.BI "virtual void \fBcontentsMouseDoubleClickEvent\fR ( TQMouseEvent * e )" .br .ti -1c -.BI "virtual void \fBcontentsMouseMoveEvent\fR ( QMouseEvent * e )" +.BI "virtual void \fBcontentsMouseMoveEvent\fR ( TQMouseEvent * e )" .br .ti -1c .BI "virtual void \fBcontentsDragEnterEvent\fR ( TQDragEnterEvent * )" @@ -279,7 +279,7 @@ Inherited by TQCanvasView, TQTable, TQGridView, TQIconView, TQListBox, TQListVie .BI "virtual void \fBviewportPaintEvent\fR ( TQPaintEvent * pe )" .br .ti -1c -.BI "virtual void \fBviewportResizeEvent\fR ( QResizeEvent * )" +.BI "virtual void \fBviewportResizeEvent\fR ( TQResizeEvent * )" .br .ti -1c .BI "virtual void \fBsetMargins\fR ( int left, int top, int right, int bottom )" @@ -539,27 +539,27 @@ This event handler is called whenever the TQScrollView receives a dropEvent(): t Reimplemented in TQTable. .SH "int TQScrollView::contentsHeight () const" Returns the height of the contents area. See the "contentsHeight" property for details. -.SH "void TQScrollView::contentsMouseDoubleClickEvent ( QMouseEvent * e )\fC [virtual protected]\fR" +.SH "void TQScrollView::contentsMouseDoubleClickEvent ( TQMouseEvent * e )\fC [virtual protected]\fR" This event handler is called whenever the TQScrollView receives a mouseDoubleClickEvent(): the click position in \fIe\fR is translated to be a point on the contents. .PP The default implementation generates a normal mouse press event. .PP Reimplemented in TQListView. -.SH "void TQScrollView::contentsMouseMoveEvent ( QMouseEvent * e )\fC [virtual protected]\fR" +.SH "void TQScrollView::contentsMouseMoveEvent ( TQMouseEvent * e )\fC [virtual protected]\fR" This event handler is called whenever the TQScrollView receives a mouseMoveEvent(): the mouse position in \fIe\fR is translated to be a point on the contents. .PP Examples: .)l canvas/canvas.cpp and chart/canvasview.cpp. .PP Reimplemented in TQListView. -.SH "void TQScrollView::contentsMousePressEvent ( QMouseEvent * e )\fC [virtual protected]\fR" +.SH "void TQScrollView::contentsMousePressEvent ( TQMouseEvent * e )\fC [virtual protected]\fR" This event handler is called whenever the TQScrollView receives a mousePressEvent(): the press position in \fIe\fR is translated to be a point on the contents. .PP Examples: .)l canvas/canvas.cpp and chart/canvasview.cpp. .PP Reimplemented in TQListView. -.SH "void TQScrollView::contentsMouseReleaseEvent ( QMouseEvent * e )\fC [virtual protected]\fR" +.SH "void TQScrollView::contentsMouseReleaseEvent ( TQMouseEvent * e )\fC [virtual protected]\fR" This event handler is called whenever the TQScrollView receives a mouseReleaseEvent(): the release position in \fIe\fR is translated to be a point on the contents. .PP Reimplemented in TQListView. @@ -807,7 +807,7 @@ Examples: .)l helpsystem/tooltip.cpp and scrollview/scrollview.cpp. .SH "void TQScrollView::viewportPaintEvent ( TQPaintEvent * pe )\fC [virtual protected]\fR" 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 \fIpe\fR. -.SH "void TQScrollView::viewportResizeEvent ( QResizeEvent * )\fC [virtual protected]\fR" +.SH "void TQScrollView::viewportResizeEvent ( TQResizeEvent * )\fC [virtual protected]\fR" To provide simple processing of events on the contents, this function receives all resize events sent to the viewport. .PP See also TQWidget::resizeEvent(). diff --git a/doc/man/man3/tqsessionmanager.3qt b/doc/man/man3/tqsessionmanager.3qt index ce3995dc9..57edd4fdf 100644 --- a/doc/man/man3/tqsessionmanager.3qt +++ b/doc/man/man3/tqsessionmanager.3qt @@ -119,7 +119,7 @@ void MyApplication::commitData( TQSessionManager& sm ) { .br if ( sm.allowsInteraction() ) { .br - switch ( QMessageBox::warning( + switch ( TQMessageBox::warning( .br yourMainWindow, .br diff --git a/doc/man/man3/tqsizegrip.3qt b/doc/man/man3/tqsizegrip.3qt index bff19bf88..3d50f7bbb 100644 --- a/doc/man/man3/tqsizegrip.3qt +++ b/doc/man/man3/tqsizegrip.3qt @@ -31,10 +31,10 @@ Inherits TQWidget. .BI "virtual void \fBpaintEvent\fR ( TQPaintEvent * e )" .br .ti -1c -.BI "virtual void \fBmousePressEvent\fR ( QMouseEvent * e )" +.BI "virtual void \fBmousePressEvent\fR ( TQMouseEvent * e )" .br .ti -1c -.BI "virtual void \fBmouseMoveEvent\fR ( QMouseEvent * e )" +.BI "virtual void \fBmouseMoveEvent\fR ( TQMouseEvent * e )" .br .in -1c .SH DESCRIPTION @@ -57,11 +57,11 @@ See also TQStatusBar, Widget Appearance and Style, Main Window and Related Class Constructs a resize corner called \fIname\fR, as a child widget of \fIparent\fR. .SH "TQSizeGrip::~TQSizeGrip ()" Destroys the size grip. -.SH "void TQSizeGrip::mouseMoveEvent ( QMouseEvent * e )\fC [virtual protected]\fR" +.SH "void TQSizeGrip::mouseMoveEvent ( TQMouseEvent * e )\fC [virtual protected]\fR" Resizes the top-level widget containing this widget. The event is in \fIe\fR. .PP Reimplemented from TQWidget. -.SH "void TQSizeGrip::mousePressEvent ( QMouseEvent * e )\fC [virtual protected]\fR" +.SH "void TQSizeGrip::mousePressEvent ( TQMouseEvent * e )\fC [virtual protected]\fR" Primes the resize operation. The event is in \fIe\fR. .PP Reimplemented from TQWidget. diff --git a/doc/man/man3/tqslider.3qt b/doc/man/man3/tqslider.3qt index adbdcbab2..13a2afd95 100644 --- a/doc/man/man3/tqslider.3qt +++ b/doc/man/man3/tqslider.3qt @@ -11,7 +11,7 @@ TQSlider \- Vertical or horizontal slider .SH SYNOPSIS \fC#include \fR .PP -Inherits TQWidget and QRangeControl. +Inherits TQWidget and TQRangeControl. .PP .SS "Public Members" .in +1c @@ -168,7 +168,7 @@ The TQSlider widget provides a vertical or horizontal slider. .PP 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. .PP -TQSlider inherits QRangeControl, which provides the "integer" side of the slider. setRange() and value() are likely to be used by practically all slider users; see the QRangeControl documentation for information about the many other functions that class provides. +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. .PP 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. .PP @@ -229,9 +229,9 @@ Returns the slider's orientation. See the "orientation" property for details. .SH "int TQSlider::pageStep () const" Returns the current page step. See the "pageStep" property for details. .SH "void TQSlider::rangeChange ()\fC [virtual protected]\fR" -Implements the virtual QRangeControl function. +Implements the virtual TQRangeControl function. .PP -Reimplemented from QRangeControl. +Reimplemented from TQRangeControl. .SH "void TQSlider::setLineStep ( int )" Sets the current line step. See the "lineStep" property for details. .SH "void TQSlider::setMaxValue ( int )" @@ -248,7 +248,7 @@ Reimplements the virtual function TQWidget::setPalette(). Sets the background color to the mid color for Motif style sliders using palette \fIp\fR. .PP Reimplemented from TQWidget. -.SH "void QRangeControl::setRange ( int minValue, int maxValue )" +.SH "void TQRangeControl::setRange ( int minValue, int maxValue )" Sets the range control's minimum value to \fIminValue\fR and its maximum value to \fImaxValue\fR. .PP 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. @@ -288,9 +288,9 @@ Returns TRUE if slider tracking is enabled; otherwise returns FALSE. See the "tr .SH "int TQSlider::value () const" Returns the current slider value. See the "value" property for details. .SH "void TQSlider::valueChange ()\fC [virtual protected]\fR" -Implements the virtual QRangeControl function. +Implements the virtual TQRangeControl function. .PP -Reimplemented from QRangeControl. +Reimplemented from TQRangeControl. .SH "void TQSlider::valueChanged ( int value )\fC [signal]\fR" This signal is emitted when the slider value is changed, with the new slider \fIvalue\fR as its argument. .PP @@ -302,7 +302,7 @@ This property holds the current line step. .PP When setting lineStep, the virtual stepChange() function will be called if the new line step is different from the previous setting. .PP -See also setSteps(), QRangeControl::pageStep(), and setRange(). +See also setSteps(), TQRangeControl::pageStep(), and setRange(). .PP Set this property's value with setLineStep() and get this property's value with lineStep(). .SH "int maxValue" @@ -332,7 +332,7 @@ This property holds the current page step. .PP When setting pageStep, the virtual stepChange() function will be called if the new page step is different from the previous setting. .PP -See also QRangeControl::setSteps(), lineStep, and setRange(). +See also TQRangeControl::setSteps(), lineStep, and setRange(). .PP Set this property's value with setPageStep() and get this property's value with pageStep(). .SH "int tickInterval" @@ -340,7 +340,7 @@ This property holds the interval between tickmarks. .PP 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. .PP -See also QRangeControl::lineStep() and QRangeControl::pageStep(). +See also TQRangeControl::lineStep() and TQRangeControl::pageStep(). .PP Set this property's value with setTickInterval() and get this property's value with tickInterval(). .SH "TickSetting tickmarks" @@ -362,7 +362,7 @@ This property holds the current slider value. .PP Set this property's value with setValue() and get this property's value with value(). .PP -See also QRangeControl::value() and prevValue(). +See also TQRangeControl::value() and prevValue(). .SH "SEE ALSO" .BR http://doc.trolltech.com/tqslider.html diff --git a/doc/man/man3/tqspinbox.3qt b/doc/man/man3/tqspinbox.3qt index 60183decb..139e0d16d 100644 --- a/doc/man/man3/tqspinbox.3qt +++ b/doc/man/man3/tqspinbox.3qt @@ -11,7 +11,7 @@ TQSpinBox \- Spin box widget (spin button) .SH SYNOPSIS \fC#include \fR .PP -Inherits TQWidget and QRangeControl. +Inherits TQWidget and TQRangeControl. .PP .SS "Public Members" .in +1c @@ -200,7 +200,7 @@ TQSpinBox allows the user to choose a value either by clicking the up/down butto .PP Every time the value changes TQSpinBox emits the valueChanged() signal. The current value can be fetched with value() and set with setValue(). .PP -The spin box keeps the value within a numeric range, and to multiples of the lineStep() size (see QRangeControl 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(). +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(). .PP 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. .PP @@ -283,7 +283,7 @@ This enum type determines what the buttons in a spin box show. See also TQSpinBox::buttonSymbols. .SH MEMBER FUNCTION DOCUMENTATION .SH "TQSpinBox::TQSpinBox ( TQWidget * parent = 0, const char * name = 0 )" -Constructs a spin box with the default QRangeControl range and step values. It is called \fIname\fR and has parent \fIparent\fR. +Constructs a spin box with the default TQRangeControl range and step values. It is called \fIname\fR and has parent \fIparent\fR. .PP See also minValue, maxValue, setRange(), lineStep, and setSteps(). .SH "TQSpinBox::TQSpinBox ( int minValue, int maxValue, int step = 1, TQWidget * parent = 0, const char * name = 0 )" @@ -341,9 +341,9 @@ Returns the minimum value of the spin box. See the "minValue" property for detai .SH "TQString TQSpinBox::prefix () const\fC [virtual]\fR" Returns the spin box's prefix. See the "prefix" property for details. .SH "void TQSpinBox::rangeChange ()\fC [virtual protected]\fR" -This virtual function is called by QRangeControl whenever the range has changed. It adjusts the default validator and updates the display; if you need additional processing, you can reimplement this function. +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. .PP -Reimplemented from QRangeControl. +Reimplemented from TQRangeControl. .SH "void TQSpinBox::selectAll ()\fC [virtual slot]\fR" Selects all the text in the spin box's editor. .SH "void TQSpinBox::setButtonSymbols ( ButtonSymbols )\fC [virtual]\fR" @@ -397,9 +397,9 @@ See also setValidator() and TQValidator. .SH "int TQSpinBox::value () const" Returns the value of the spin box. See the "value" property for details. .SH "void TQSpinBox::valueChange ()\fC [virtual protected]\fR" -This virtual function is called by QRangeControl 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. +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. .PP -Reimplemented from QRangeControl. +Reimplemented from TQRangeControl. .SH "void TQSpinBox::valueChanged ( int value )\fC [signal]\fR" This signal is emitted every time the value of the spin box changes; the new value is passed in \fIvalue\fR. 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. .PP @@ -441,7 +441,7 @@ When the user uses the arrows to change the spin box's value the value will be i .PP The setLineStep() function calls the virtual stepChange() function if the new line step is different from the previous setting. .PP -See also QRangeControl::setSteps() and setRange(). +See also TQRangeControl::setSteps() and setRange(). .PP Set this property's value with setLineStep() and get this property's value with lineStep(). .SH "int maxValue" @@ -534,7 +534,7 @@ This property holds the value of the spin box. .PP Set this property's value with setValue() and get this property's value with value(). .PP -See also QRangeControl::setValue(). +See also TQRangeControl::setValue(). .SH "bool wrapping" This property holds whether it is possible to step the value from the highest value to the lowest value and vice versa. .PP diff --git a/doc/man/man3/tqsqlerror.3qt b/doc/man/man3/tqsqlerror.3qt index 560069030..30421bc0f 100644 --- a/doc/man/man3/tqsqlerror.3qt +++ b/doc/man/man3/tqsqlerror.3qt @@ -104,7 +104,7 @@ Sets the error type to the value of \fItype\fR. .SH "void TQSqlError::showMessage ( const TQString & msg = TQString::null ) const" \fBThis function is obsolete.\fR It is provided to keep old source working. We strongly advise against using it in new code. .PP -This is a convenience function that pops up a QMessageBox containing the message returned by text(). An additional string can be passed in via the \fImsg\fR parameter, which will be concatenated with the text() message. +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 \fImsg\fR parameter, which will be concatenated with the text() message. .PP See also text(), driverText(), and databaseText(). .SH "TQString TQSqlError::text () const" diff --git a/doc/man/man3/tqstylesheet.3qt b/doc/man/man3/tqstylesheet.3qt index c2d4a0922..48678dc44 100644 --- a/doc/man/man3/tqstylesheet.3qt +++ b/doc/man/man3/tqstylesheet.3qt @@ -58,7 +58,7 @@ Inherits TQObject. .SH DESCRIPTION The TQStyleSheet class is a collection of styles for rich text rendering and a generator of tags. .PP -By creating TQStyleSheetItem objects for a style sheet you build a definition of a set of tags. This definition will be used by the internal rich text rendering system to parse and display text documents to which the style sheet applies. Rich text is normally visualized in a TQTextEdit or a TQTextBrowser. However, TQLabel, TQWhatsThis and QMessageBox also support it, and other classes are likely to follow. With TQSimpleRichText it is possible to use the rich text renderer for custom widgets as well. +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. .PP The default TQStyleSheet object has the following style bindings, sorted by structuring bindings, anchors, character style bindings (i.e. inline styles), special elements such as horizontal lines or images, and other tags. In addition, rich text supports simple HTML tables. .PP @@ -152,7 +152,7 @@ See also escape(). Examples: .)l action/application.cpp, application/application.cpp, and mdi/application.cpp. .SH "TQStyleSheet * TQStyleSheet::defaultSheet ()\fC [static]\fR" -Returns the application-wide default style sheet. This style sheet is used by rich text rendering classes such as TQSimpleRichText, TQWhatsThis and QMessageBox to define the rendering style and available tags within rich text documents. It also serves as the initial style sheet for the more complex render widgets, TQTextEdit and TQTextBrowser. +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. .PP See also setDefaultSheet(). .SH "void TQStyleSheet::error ( const TQString & msg ) const\fC [virtual]\fR" diff --git a/doc/man/man3/tqt.3qt b/doc/man/man3/tqt.3qt index ba78e14b0..0ad1cca76 100644 --- a/doc/man/man3/tqt.3qt +++ b/doc/man/man3/tqt.3qt @@ -9,7 +9,7 @@ .SH NAME Qt \- Namespace for miscellaneous identifiers that need to be global-like .SH SYNOPSIS -\fC#include \fR +\fC#include \fR .PP Inherited by TQObject, TQPixmap, TQBrush, TQCanvasItem, TQCursor, TQPainter, TQEvent, TQIconViewItem, TQKeySequence, TQListViewItem, TQCustomMenuItem, TQPen, TQStyleSheetItem, TQSyntaxHighlighter, TQTab, TQTableItem, TQThread, TQToolTip, and TQWhatsThis. .PP @@ -276,7 +276,7 @@ See also TQWidget::backgroundMode, TQWidget::backgroundMode, TQWidget::setBackgr .SH "TQt::ButtonState" This enum type describes the state of the mouse and the modifier buttons. .TP -\fCQt::NoButton\fR - used when the button state does not refer to any button (see QMouseEvent::button()). +\fCQt::NoButton\fR - used when the button state does not refer to any button (see TQMouseEvent::button()). .TP \fCQt::LeftButton\fR - 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.) .TP diff --git a/doc/man/man3/tqwheelevent.3qt b/doc/man/man3/tqwheelevent.3qt index 290b161aa..3521b62af 100644 --- a/doc/man/man3/tqwheelevent.3qt +++ b/doc/man/man3/tqwheelevent.3qt @@ -69,7 +69,7 @@ The TQWidget::setEnable() function can be used to enable or disable mouse and ke .PP The event handler TQWidget::wheelEvent() receives wheel events. .PP -See also QMouseEvent, TQWidget::grabMouse(), and Event Classes. +See also TQMouseEvent, TQWidget::grabMouse(), and Event Classes. .SH MEMBER FUNCTION DOCUMENTATION .SH "QWheelEvent::QWheelEvent ( const TQPoint & pos, int delta, int state, Orientation orient = Vertical )" Constructs a wheel event object. diff --git a/doc/man/man3/tqwidget.3qt b/doc/man/man3/tqwidget.3qt index 4d2d3719e..4a91b0e7a 100644 --- a/doc/man/man3/tqwidget.3qt +++ b/doc/man/man3/tqwidget.3qt @@ -13,7 +13,7 @@ TQWidget \- The base class of all user interface objects .PP Inherits TQObject and TQPaintDevice. .PP -Inherited by TQButton, TQFrame, TQDialog, TQComboBox, TQDataBrowser, TQDataView, TQDateTimeEditBase, TQDateTimeEdit, TQDesktopWidget, TQDial, TQDockArea, TQGLWidget, TQHeader, TQMainWindow, TQMotifWidget, QNPWidget, TQScrollBar, TQSizeGrip, TQSlider, TQSpinBox, QSplashScreen, TQStatusBar, TQTabBar, TQTabWidget, TQWorkspace, and QXtWidget. +Inherited by TQButton, TQFrame, TQDialog, TQComboBox, TQDataBrowser, TQDataView, TQDateTimeEditBase, TQDateTimeEdit, TQDesktopWidget, TQDial, TQDockArea, TQGLWidget, TQHeader, TQMainWindow, TQMotifWidget, TQNPWidget, TQScrollBar, TQSizeGrip, TQSlider, TQSpinBox, QSplashScreen, TQStatusBar, TQTabBar, TQTabWidget, TQWorkspace, and QXtWidget. .PP .SS "Public Members" .in +1c @@ -855,16 +855,16 @@ Inherited by TQButton, TQFrame, TQDialog, TQComboBox, TQDataBrowser, TQDataView, .BI "virtual bool \fBevent\fR ( TQEvent * e )" .br .ti -1c -.BI "virtual void \fBmousePressEvent\fR ( QMouseEvent * e )" +.BI "virtual void \fBmousePressEvent\fR ( TQMouseEvent * e )" .br .ti -1c -.BI "virtual void \fBmouseReleaseEvent\fR ( QMouseEvent * e )" +.BI "virtual void \fBmouseReleaseEvent\fR ( TQMouseEvent * e )" .br .ti -1c -.BI "virtual void \fBmouseDoubleClickEvent\fR ( QMouseEvent * e )" +.BI "virtual void \fBmouseDoubleClickEvent\fR ( TQMouseEvent * e )" .br .ti -1c -.BI "virtual void \fBmouseMoveEvent\fR ( QMouseEvent * e )" +.BI "virtual void \fBmouseMoveEvent\fR ( TQMouseEvent * e )" .br .ti -1c .BI "virtual void \fBwheelEvent\fR ( QWheelEvent * e )" @@ -891,10 +891,10 @@ Inherited by TQButton, TQFrame, TQDialog, TQComboBox, TQDataBrowser, TQDataView, .BI "virtual void \fBpaintEvent\fR ( TQPaintEvent * )" .br .ti -1c -.BI "virtual void \fBmoveEvent\fR ( QMoveEvent * )" +.BI "virtual void \fBmoveEvent\fR ( TQMoveEvent * )" .br .ti -1c -.BI "virtual void \fBresizeEvent\fR ( QResizeEvent * )" +.BI "virtual void \fBresizeEvent\fR ( TQResizeEvent * )" .br .ti -1c .BI "virtual void \fBcloseEvent\fR ( TQCloseEvent * e )" @@ -1166,7 +1166,7 @@ See also sizeHint and childrenRect. .PP Example: xform/xform.cpp. .PP -Reimplemented in QMessageBox. +Reimplemented in TQMessageBox. .SH "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. .SH "const TQBrush & TQWidget::backgroundBrush () const" @@ -1729,50 +1729,50 @@ Returns the recommended minimum size for the widget. See the "minimumSizeHint" p Reimplemented in TQLineEdit. .SH "int TQWidget::minimumWidth () const" Returns the widget's minimum width. See the "minimumWidth" property for details. -.SH "void TQWidget::mouseDoubleClickEvent ( QMouseEvent * e )\fC [virtual protected]\fR" +.SH "void TQWidget::mouseDoubleClickEvent ( TQMouseEvent * e )\fC [virtual protected]\fR" This event handler, for event \fIe\fR, can be reimplemented in a subclass to receive mouse double click events for the widget. .PP The default implementation generates a normal mouse press event. .PP Note that the widgets gets a mousePressEvent() and a mouseReleaseEvent() before the mouseDoubleClickEvent(). .PP -See also mousePressEvent(), mouseReleaseEvent(), mouseMoveEvent(), event(), and QMouseEvent. +See also mousePressEvent(), mouseReleaseEvent(), mouseMoveEvent(), event(), and TQMouseEvent. .SH "TQWidget * TQWidget::mouseGrabber ()\fC [static]\fR" Returns the widget that is currently grabbing the mouse input. .PP If no widget in this application is currently grabbing the mouse, 0 is returned. .PP See also grabMouse() and keyboardGrabber(). -.SH "void TQWidget::mouseMoveEvent ( QMouseEvent * e )\fC [virtual protected]\fR" +.SH "void TQWidget::mouseMoveEvent ( TQMouseEvent * e )\fC [virtual protected]\fR" This event handler, for event \fIe\fR, can be reimplemented in a subclass to receive mouse move events for the widget. .PP 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. .PP -QMouseEvent::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 Qt. +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 Qt. .PP -See also mouseTracking, mousePressEvent(), mouseReleaseEvent(), mouseDoubleClickEvent(), event(), and QMouseEvent. +See also mouseTracking, mousePressEvent(), mouseReleaseEvent(), mouseDoubleClickEvent(), event(), and TQMouseEvent. .PP Examples: .)l aclock/aclock.cpp, drawlines/connect.cpp, iconview/simple_dd/main.cpp, life/life.cpp, popup/popup.cpp, qmag/qmag.cpp, and scribble/scribble.cpp. .PP Reimplemented in TQSizeGrip. -.SH "void TQWidget::mousePressEvent ( QMouseEvent * e )\fC [virtual protected]\fR" +.SH "void TQWidget::mousePressEvent ( TQMouseEvent * e )\fC [virtual protected]\fR" This event handler, for event \fIe\fR, can be reimplemented in a subclass to receive mouse press events for the widget. .PP 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. .PP The default implementation implements the closing of popup widgets when you click outside the window. For other widget types it does nothing. .PP -See also mouseReleaseEvent(), mouseDoubleClickEvent(), mouseMoveEvent(), event(), and QMouseEvent. +See also mouseReleaseEvent(), mouseDoubleClickEvent(), mouseMoveEvent(), event(), and TQMouseEvent. .PP Examples: .)l biff/biff.cpp, drawlines/connect.cpp, iconview/simple_dd/main.cpp, life/life.cpp, qmag/qmag.cpp, scribble/scribble.cpp, and tooltip/tooltip.cpp. .PP Reimplemented in TQSizeGrip. -.SH "void TQWidget::mouseReleaseEvent ( QMouseEvent * e )\fC [virtual protected]\fR" +.SH "void TQWidget::mouseReleaseEvent ( TQMouseEvent * e )\fC [virtual protected]\fR" This event handler, for event \fIe\fR, can be reimplemented in a subclass to receive mouse release events for the widget. .PP -See also mouseDoubleClickEvent(), mouseMoveEvent(), event(), and QMouseEvent. +See also mouseDoubleClickEvent(), mouseMoveEvent(), event(), and TQMouseEvent. .PP Examples: .)l drawlines/connect.cpp, hello/hello.cpp, popup/popup.cpp, qmag/qmag.cpp, scribble/scribble.cpp, showimg/showimg.cpp, and t14/cannon.cpp. @@ -1782,12 +1782,12 @@ Sets the position of the widget within its parent widget. See the "pos" property This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP This corresponds to move( TQPoint(\fIx\fR, \fIy\fR) ). -.SH "void TQWidget::moveEvent ( QMoveEvent * )\fC [virtual protected]\fR" +.SH "void TQWidget::moveEvent ( TQMoveEvent * )\fC [virtual protected]\fR" 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. .PP -The old position is accessible through QMoveEvent::oldPos(). +The old position is accessible through TQMoveEvent::oldPos(). .PP -See also resizeEvent(), event(), pos, and QMoveEvent. +See also resizeEvent(), event(), pos, and TQMoveEvent. .SH "bool TQWidget::ownCursor () const" Returns TRUE if the widget uses its own cursor; otherwise returns FALSE. See the "ownCursor" property for details. .SH "bool TQWidget::ownFont () const" @@ -1937,8 +1937,8 @@ Sets the size of the widget excluding any window frame. See the "size" property This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP This corresponds to resize( TQSize(\fIw\fR, \fIh\fR) ). -.SH "void TQWidget::resizeEvent ( QResizeEvent * )\fC [virtual protected]\fR" -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 QResizeEvent::oldSize(). +.SH "void TQWidget::resizeEvent ( TQResizeEvent * )\fC [virtual protected]\fR" +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(). .PP 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. .PP @@ -1946,7 +1946,7 @@ Widgets that have been created with the WNoAutoErase flag will not be erased. Ne .PP The default implementation calls updateMask() if the widget has automatic masking enabled. .PP -See also moveEvent(), event(), size, QResizeEvent, and paintEvent(). +See also moveEvent(), event(), size, TQResizeEvent, and paintEvent(). .PP Examples: .)l drawdemo/drawdemo.cpp, menu/menu.cpp, qmag/qmag.cpp, scribble/scribble.cpp, showimg/showimg.cpp, tooltip/tooltip.cpp, and xform/xform.cpp. @@ -2016,7 +2016,7 @@ Disables widget input events if \fIdisable\fR is TRUE; otherwise enables input e .PP See the enabled documentation for more information. .PP -See also isEnabledTo(), TQKeyEvent, QMouseEvent, and enabledChange(). +See also isEnabledTo(), TQKeyEvent, TQMouseEvent, and enabledChange(). .SH "void TQWidget::setEnabled ( bool )\fC [virtual slot]\fR" Sets whether the widget is enabled. See the "enabled" property for details. .SH "void TQWidget::setEraseColor ( const TQColor & color )\fC [virtual]\fR" @@ -2662,7 +2662,7 @@ Some widgets display themselves differently when they are disabled. For example .PP Disabling a widget implicitly disables all its children. Enabling respectively enables all child widgets unless they have been explicitly disabled. .PP -See also enabled, isEnabledTo(), TQKeyEvent, QMouseEvent, and enabledChange(). +See also enabled, isEnabledTo(), TQKeyEvent, TQMouseEvent, and enabledChange(). .PP Set this property's value with setEnabled() and get this property's value with isEnabled(). .SH "bool focus" diff --git a/doc/man/man3/tqwindowsstyle.3qt b/doc/man/man3/tqwindowsstyle.3qt index c12d822f8..3ad502bdc 100644 --- a/doc/man/man3/tqwindowsstyle.3qt +++ b/doc/man/man3/tqwindowsstyle.3qt @@ -13,7 +13,7 @@ TQWindowsStyle \- Microsoft Windows-like look and feel .PP Inherits TQCommonStyle. .PP -Inherited by QMacStyle and TQPlatinumStyle. +Inherited by TQMacStyle and TQPlatinumStyle. .PP .SS "Public Members" .in +1c diff --git a/doc/metaobjects.doc b/doc/metaobjects.doc index bd2612760..0e9cb162e 100644 --- a/doc/metaobjects.doc +++ b/doc/metaobjects.doc @@ -89,7 +89,7 @@ setting and getting \link properties.html object properties\endlink by name. \i the \link TQObject::metaObject() metaObject() \endlink function that -returns the associated \link QMetaObject meta object \endlink for the +returns the associated \link TQMetaObject meta object \endlink for the class. \endlist diff --git a/doc/object.doc b/doc/object.doc index 2df02d368..52dedbc61 100644 --- a/doc/object.doc +++ b/doc/object.doc @@ -274,14 +274,14 @@ function calls are equivalent: 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 \l QMetaObject, \l TQObject::setProperty() +for any TQObject through its \l TQMetaObject, \l TQObject::setProperty() can give you control over classes that weren't available at compile time. As well as TQObject::setProperty(), there is a corresponding \l -TQObject::property() function. \l QMetaObject::propertyNames() returns -the names of all available properties. \l QMetaObject::property() -returns the property data for a named property: a \l QMetaProperty +TQObject::property() function. \l TQMetaObject::propertyNames() returns +the names of all available properties. \l TQMetaObject::property() +returns the property data for a named property: a \l TQMetaProperty object. Here's a simple example that shows the most important property @@ -392,7 +392,7 @@ meta object, for example: \endcode Like other meta data, class information is accessible at runtime -through the meta object, see \l QMetaObject::classInfo() for details. +through the meta object, see \l TQMetaObject::classInfo() for details. \target override \section1 TQ_OVERRIDE @@ -447,20 +447,20 @@ important events that aren't related to graphics, for example, socket activation, which is the event used by \l TQSocketNotifier for its work. -Some events come from the window system, e.g. \l QMouseEvent, some +Some events come from the window system, e.g. \l TQMouseEvent, some from other sources, e.g. \l TQTimerEvent, and some come from the application program. TQt is symmetric, as usual, so you can send events in exactly the same ways as Qt's own event loop does. -Most events types have special classes, most commonly \l QResizeEvent, -\l TQPaintEvent, \l QMouseEvent, \l TQKeyEvent and \l TQCloseEvent. +Most events types have special classes, most commonly \l TQResizeEvent, +\l TQPaintEvent, \l TQMouseEvent, \l TQKeyEvent and \l TQCloseEvent. There are many others, perhaps forty or so, but most are rather odd. Each class subclasses TQEvent and adds event-specific functions; see, -for example, \l QResizeEvent. In the case of QResizeEvent, \l -QResizeEvent::size() and \l QResizeEvent::oldSize() are added. +for example, \l TQResizeEvent. In the case of TQResizeEvent, \l +TQResizeEvent::size() and \l TQResizeEvent::oldSize() are added. -Some classes support more than one event type. \l QMouseEvent +Some classes support more than one event type. \l TQMouseEvent supports mouse moves, presses, shift-presses, drags, clicks, right-presses, etc. @@ -477,7 +477,7 @@ do not perform all the necessary work in your implementation of the virtual function, you may need to call the base class's implementation; for example: \code - MyTable::contentsMouseMoveEvent( QMouseEvent *me ) + MyTable::contentsMouseMoveEvent( TQMouseEvent *me ) { // my implementation diff --git a/doc/pictures.doc b/doc/pictures.doc index 065d19d36..c3e6a457c 100644 --- a/doc/pictures.doc +++ b/doc/pictures.doc @@ -82,12 +82,12 @@ dialog. This is explained in the \l TQFileDialog class documentation. \img tqfiledlg-w.png -Below is a QPrintDialog. On Macintosh and Windows the native print -dialog is used, but for other platforms we provide QPrintDialog. Use -TQPrinter::setup() for portability instead of the QPrintDialog if you +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. -\img qprintdlg-m.png +\img tqprintdlg-m.png Below is a \l TQFontDialog. @@ -98,7 +98,7 @@ The screenshot below shows a \l TQColorDialog. \img tqcolordlg-w.png -Messages are presented using \l{QMessageBox}es, as shown below. +Messages are presented using \l{TQMessageBox}es, as shown below. \img qmsgbox-w.png diff --git a/doc/porting3.doc b/doc/porting3.doc index 7df520570..b65cbc4f7 100644 --- a/doc/porting3.doc +++ b/doc/porting3.doc @@ -126,7 +126,7 @@ Qt 3.x is namespace clean. A few global identifiers that had been left in TQt 2.x have been discarded. Enumeration \l TQt::CursorShape and its values are now part of the -special \c TQt class defined in ntqnamespace.h. If you get compilation +special \c TQt class defined in tqnamespace.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: @@ -311,9 +311,9 @@ new code. \i TQMainWindow::setToolBarsMovable( bool ) \i TQMainWindow::toolBarPositionChanged( TQToolBar *) \i TQMainWindow::toolBarsMovable() const -\i QMessageBox::message( const TQString \& caption, const TQString \& text, const TQString \& buttonText = TQString::null, TQWidget *parent = 0, const char *= 0 ) -\i QMessageBox::query( const TQString \& caption, const TQString \& text, const TQString \& yesButtonText = TQString::null, const TQString \& noButtonText = TQString::null, TQWidget *parent = 0, const char *= 0 ) -\i QMessageBox::standardIcon( Icon icon, GUIStyle style ) +\i TQMessageBox::message( const TQString \& caption, const TQString \& text, const TQString \& buttonText = TQString::null, TQWidget *parent = 0, const char *= 0 ) +\i TQMessageBox::query( const TQString \& caption, const TQString \& text, const TQString \& yesButtonText = TQString::null, const TQString \& noButtonText = TQString::null, TQWidget *parent = 0, const char *= 0 ) +\i TQMessageBox::standardIcon( Icon icon, GUIStyle style ) \i TQRegExp::match( const TQString \& str, int index = 0, int *len = 0, bool indexIsStart = TRUE ) const \i TQScrollView::childIsVisible( TQWidget *child ) \i TQScrollView::showChild( TQWidget *child, bool show = TRUE ) @@ -453,9 +453,9 @@ 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 \l TQStyle.) -\section1 QMoveEvent +\section1 TQMoveEvent -In TQt 2.x, the function QMoveEvent::pos() returned the position of the +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. diff --git a/doc/signalsandslots.doc b/doc/signalsandslots.doc index 65dfa9dfa..e58e199b5 100644 --- a/doc/signalsandslots.doc +++ b/doc/signalsandslots.doc @@ -240,8 +240,8 @@ return types (i.e. use \c void). A note about arguments. Our experience shows that signals and slots are more reusable if they do \e not use special types. If \l TQScrollBar::valueChanged() were to use a special type such as the -hypothetical \c QRangeControl::Range, it could only be connected to -slots designed specifically for QRangeControl. Something as simple as +hypothetical \c TQRangeControl::Range, it could only be connected to +slots designed specifically for TQRangeControl. Something as simple as the program in \link tutorial1-05.html Tutorial #1 part 5\endlink would be impossible. diff --git a/doc/tutorial2.doc b/doc/tutorial2.doc index 66ec3266d..8b8a93ab6 100644 --- a/doc/tutorial2.doc +++ b/doc/tutorial2.doc @@ -138,10 +138,10 @@ Although the \c Element class is a purely internal data class, it toolkit, but it provides many non-GUI classes to support most aspects of application programming. We use \c tqcolor.h so that we can hold the paint color and text color in the \c Element class. The use of \c -ntqnamespace.h is slightly obscure. Most TQt classes are derived from the +tqnamespace.h is slightly obscure. Most TQt classes are derived from the \link ntqt.html Qt\endlink superclass which contains various enumerations. The \c Element class does not derive from \link ntqt.html -Qt\endlink, so we need to include \c ntqnamespace.h to have access to +Qt\endlink, so we need to include \c tqnamespace.h to have access to the TQt enum names. An alternative approach would have been to have made \c Element a \link ntqt.html Qt\endlink subclass. We include \c tqstring.h to make use of Qt's Unicode strings. As a convenience we @@ -613,7 +613,7 @@ the user wishes to load. If we get a filename we call load(). 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 -QMessageBox::warning() to notify the user and give them the option of +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 \link tutorial2-07.html File Handling\endlink) to perform the save. diff --git a/examples/action/application.cpp b/examples/action/application.cpp index da4f96249..c599b29ff 100644 --- a/examples/action/application.cpp +++ b/examples/action/application.cpp @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/examples/application/application.cpp b/examples/application/application.cpp index f99271536..136a97030 100644 --- a/examples/application/application.cpp +++ b/examples/application/application.cpp @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/examples/canvas/canvas.cpp b/examples/canvas/canvas.cpp index e9d11040d..b0975a154 100644 --- a/examples/canvas/canvas.cpp +++ b/examples/canvas/canvas.cpp @@ -1,7 +1,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/examples/canvas/main.cpp b/examples/canvas/main.cpp index 24b1b2506..a1ae84472 100644 --- a/examples/canvas/main.cpp +++ b/examples/canvas/main.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include #include #include diff --git a/examples/chart/chartform.cpp b/examples/chart/chartform.cpp index 9a7abfefd..c4956db0a 100644 --- a/examples/chart/chartform.cpp +++ b/examples/chart/chartform.cpp @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/examples/chart/element.h b/examples/chart/element.h index a6827867c..4241a7fee 100644 --- a/examples/chart/element.h +++ b/examples/chart/element.h @@ -2,7 +2,7 @@ #define ELEMENT_H #include -#include +#include #include #include diff --git a/examples/demo/i18n/en.po b/examples/demo/i18n/en.po index ef6ebeed5..2e6ef09b9 100644 --- a/examples/demo/i18n/en.po +++ b/examples/demo/i18n/en.po @@ -218,34 +218,34 @@ msgstr "Cancel" #: none:0 msgid "" -"_: QPrintDialog\n" +"_: TQPrintDialog\n" "locally connected" msgstr "" -"_: QPrintDialog\n" +"_: TQPrintDialog\n" "locally connected" #: none:0 msgid "" -"_: QPrintDialog\n" +"_: TQPrintDialog\n" "Aliases: " msgstr "" -"_: QPrintDialog\n" +"_: TQPrintDialog\n" "Aliases: " #: none:0 msgid "" -"_: QPrintDialog\n" +"_: TQPrintDialog\n" "unknown" msgstr "" -"_: QPrintDialog\n" +"_: TQPrintDialog\n" "unknown" #: none:0 msgid "" -"_: QPrintDialog\n" +"_: TQPrintDialog\n" "Unknown Location" msgstr "" -"_: QPrintDialog\n" +"_: TQPrintDialog\n" "Unknown Location" #: none:0 @@ -793,37 +793,37 @@ msgstr "&OK" #: none:0 msgid "" -"_: QMessageBox\n" +"_: TQMessageBox\n" "OK" msgstr "OK" #: none:0 msgid "" -"_: QMessageBox\n" +"_: TQMessageBox\n" "Yes" msgstr "Yes" #: none:0 msgid "" -"_: QMessageBox\n" +"_: TQMessageBox\n" "No" msgstr "No" #: none:0 msgid "" -"_: QMessageBox\n" +"_: TQMessageBox\n" "Abort" msgstr "Abort" #: none:0 msgid "" -"_: QMessageBox\n" +"_: TQMessageBox\n" "Retry" msgstr "Retry" #: none:0 msgid "" -"_: QMessageBox\n" +"_: TQMessageBox\n" "Ignore" msgstr "Ignore" diff --git a/examples/demo/i18n/ja.po b/examples/demo/i18n/ja.po index a5a3ebc97..e6be082be 100644 --- a/examples/demo/i18n/ja.po +++ b/examples/demo/i18n/ja.po @@ -218,25 +218,25 @@ msgstr "キャンセル" #: none:0 msgid "" -"_: QPrintDialog\n" +"_: TQPrintDialog\n" "locally connected" msgstr "ローカルに接続中" #: none:0 msgid "" -"_: QPrintDialog\n" +"_: TQPrintDialog\n" "Aliases: " msgstr "エイリアス" #: none:0 msgid "" -"_: QPrintDialog\n" +"_: TQPrintDialog\n" "unknown" msgstr "未知" #: none:0 msgid "" -"_: QPrintDialog\n" +"_: TQPrintDialog\n" "Unknown Location" msgstr "未知の場所" @@ -790,37 +790,37 @@ msgstr "はい(&O)" #: none:0 msgid "" -"_: QMessageBox\n" +"_: TQMessageBox\n" "OK" msgstr "はい" #: none:0 msgid "" -"_: QMessageBox\n" +"_: TQMessageBox\n" "Yes" msgstr "はい" #: none:0 msgid "" -"_: QMessageBox\n" +"_: TQMessageBox\n" "No" msgstr "いいえ" #: none:0 msgid "" -"_: QMessageBox\n" +"_: TQMessageBox\n" "Abort" msgstr "中止" #: none:0 msgid "" -"_: QMessageBox\n" +"_: TQMessageBox\n" "Retry" msgstr "再試行" #: none:0 msgid "" -"_: QMessageBox\n" +"_: TQMessageBox\n" "Ignore" msgstr "無視" diff --git a/examples/demo/i18n/ko.po b/examples/demo/i18n/ko.po index d33eb30a2..24e59eaed 100644 --- a/examples/demo/i18n/ko.po +++ b/examples/demo/i18n/ko.po @@ -218,25 +218,25 @@ msgstr "취소" #: none:0 msgid "" -"_: QPrintDialog\n" +"_: TQPrintDialog\n" "locally connected" msgstr "로컬로 접속됨" #: none:0 msgid "" -"_: QPrintDialog\n" +"_: TQPrintDialog\n" "Aliases: " msgstr "Aliases: " #: none:0 msgid "" -"_: QPrintDialog\n" +"_: TQPrintDialog\n" "unknown" msgstr "알 수 없는 포맷" #: none:0 msgid "" -"_: QPrintDialog\n" +"_: TQPrintDialog\n" "Unknown Location" msgstr "Unknown Location" @@ -324,123 +324,123 @@ msgstr "묘사" msgid "Landscape" msgstr "풍경" -#: src/dialogs/qprintdialog.cpp:1069 +#: src/dialogs/tqprintdialog.cpp:1069 msgid "A0 (841 x 1189 mm)" msgstr "A0 (841 x 1189 mm)" -#: src/dialogs/qprintdialog.cpp:1070 +#: src/dialogs/tqprintdialog.cpp:1070 msgid "A1 (594 x 841 mm)" msgstr "A1 (594 x 841 mm)" -#: src/dialogs/qprintdialog.cpp:1071 +#: src/dialogs/tqprintdialog.cpp:1071 msgid "A2 (420 x 594 mm)" msgstr "A2 (420 x 594 mm)" -#: src/dialogs/qprintdialog.cpp:1072 +#: src/dialogs/tqprintdialog.cpp:1072 msgid "A3 (297 x 420 mm)" msgstr "A3 (297 x 420 mm)" -#: src/dialogs/qprintdialog.cpp:1073 +#: src/dialogs/tqprintdialog.cpp:1073 msgid "A4 (210x297 mm, 8.26x11.7 inches)" msgstr "A4 (210x297 mm, 8.26x11.7 inches)" -#: src/dialogs/qprintdialog.cpp:1074 +#: src/dialogs/tqprintdialog.cpp:1074 msgid "A5 (148 x 210 mm)" msgstr "A5 (148 x 210 mm)" -#: src/dialogs/qprintdialog.cpp:1075 +#: src/dialogs/tqprintdialog.cpp:1075 msgid "A6 (105 x 148 mm)" msgstr "A6 (105 x 148 mm)" -#: src/dialogs/qprintdialog.cpp:1076 +#: src/dialogs/tqprintdialog.cpp:1076 msgid "A7 (74 x 105 mm)" msgstr "A7 (74 x 105 mm)" -#: src/dialogs/qprintdialog.cpp:1077 +#: src/dialogs/tqprintdialog.cpp:1077 msgid "A8 (52 x 74 mm)" msgstr "A8 (52 x 74 mm)" -#: src/dialogs/qprintdialog.cpp:1078 +#: src/dialogs/tqprintdialog.cpp:1078 msgid "A9 (37 x 52 mm)" msgstr "A9 (37 x 52 mm)" -#: src/dialogs/qprintdialog.cpp:1079 +#: src/dialogs/tqprintdialog.cpp:1079 msgid "B0 (1030 x 1456 mm)" msgstr "B0 (1030 x 1456 mm)" -#: src/dialogs/qprintdialog.cpp:1080 +#: src/dialogs/tqprintdialog.cpp:1080 msgid "B1 (728 x 1030 mm)" msgstr "B1 (728 x 1030 mm)" -#: src/dialogs/qprintdialog.cpp:1081 +#: src/dialogs/tqprintdialog.cpp:1081 msgid "B10 (32 x 45 mm)" msgstr "B10 (32 x 45 mm)" -#: src/dialogs/qprintdialog.cpp:1082 +#: src/dialogs/tqprintdialog.cpp:1082 msgid "B2 (515 x 728 mm)" msgstr "B2 (515 x 728 mm)" -#: src/dialogs/qprintdialog.cpp:1083 +#: src/dialogs/tqprintdialog.cpp:1083 msgid "B3 (364 x 515 mm)" msgstr "B3 (364 x 515 mm)" -#: src/dialogs/qprintdialog.cpp:1084 +#: src/dialogs/tqprintdialog.cpp:1084 msgid "B4 (257 x 364 mm)" msgstr "B4 (257 x 364 mm)" -#: src/dialogs/qprintdialog.cpp:1085 +#: src/dialogs/tqprintdialog.cpp:1085 msgid "B5 (182x257 mm, 7.17x10.13 inches)" msgstr "B5 (182x257 mm, 7.17x10.13 inches)" -#: src/dialogs/qprintdialog.cpp:1086 +#: src/dialogs/tqprintdialog.cpp:1086 msgid "B6 (128 x 182 mm)" msgstr "B6 (128 x 182 mm)" -#: src/dialogs/qprintdialog.cpp:1087 +#: src/dialogs/tqprintdialog.cpp:1087 msgid "B7 (91 x 128 mm)" msgstr "B7 (91 x 128 mm)" -#: src/dialogs/qprintdialog.cpp:1088 +#: src/dialogs/tqprintdialog.cpp:1088 msgid "B8 (64 x 91 mm)" msgstr "B8 (64 x 91 mm)" -#: src/dialogs/qprintdialog.cpp:1089 +#: src/dialogs/tqprintdialog.cpp:1089 msgid "B9 (45 x 64 mm)" msgstr "B9 (45 x 64 mm)" -#: src/dialogs/qprintdialog.cpp:1090 +#: src/dialogs/tqprintdialog.cpp:1090 msgid "C5E (163 x 229 mm)" msgstr "C5E (163 x 229 mm)" -#: src/dialogs/qprintdialog.cpp:1091 +#: src/dialogs/tqprintdialog.cpp:1091 msgid "DLE (110 x 220 mm)" msgstr "DLE (110 x 220 mm)" -#: src/dialogs/qprintdialog.cpp:1092 +#: src/dialogs/tqprintdialog.cpp:1092 msgid "Executive (7.5x10 inches, 191x254 mm)" msgstr "Executive (7.5x10 inches, 191x254 mm)" -#: src/dialogs/qprintdialog.cpp:1094 +#: src/dialogs/tqprintdialog.cpp:1094 msgid "Folio (210 x 330 mm)" msgstr "Folio (210 x 330 mm)" -#: src/dialogs/qprintdialog.cpp:1095 +#: src/dialogs/tqprintdialog.cpp:1095 msgid "Ledger (432 x 279 mm)" msgstr "Ledger (432 x 279 mm)" -#: src/dialogs/qprintdialog.cpp:1096 +#: src/dialogs/tqprintdialog.cpp:1096 msgid "Legal (8.5x14 inches, 216x356 mm)" msgstr "Legal (8.5x14 inches, 216x356 mm)" -#: src/dialogs/qprintdialog.cpp:1097 +#: src/dialogs/tqprintdialog.cpp:1097 msgid "Letter (8.5x11 inches, 216x279 mm)" msgstr "Letter (8.5x11 inches, 216x279 mm)" -#: src/dialogs/qprintdialog.cpp:1098 +#: src/dialogs/tqprintdialog.cpp:1098 msgid "Tabloid (279 x 432 mm)" msgstr "Tabloid (279 x 432 mm)" -#: src/dialogs/qprintdialog.cpp:1099 +#: src/dialogs/tqprintdialog.cpp:1099 msgid "US Common #10 Envelope (105 x 241 mm)" msgstr "US Common #10 Envelope (105 x 241 mm)" @@ -785,44 +785,44 @@ msgstr "예(&O)" #: none:0 msgid "" -"_: QMessageBox\n" +"_: TQMessageBox\n" "OK" msgstr "확인" #: none:0 msgid "" -"_: QMessageBox\n" +"_: TQMessageBox\n" "Cancel" msgstr "취소" #: none:0 msgid "" -"_: QMessageBox\n" +"_: TQMessageBox\n" "Yes" msgstr "확인" #: none:0 msgid "" -"_: QMessageBox\n" +"_: TQMessageBox\n" "No" msgstr "취소" #: none:0 msgid "" -"_: QMessageBox\n" +"_: TQMessageBox\n" "Abort" msgstr "중지" #: none:0 msgid "" -"_: QMessageBox\n" +"_: TQMessageBox\n" "Retry" msgstr "재시도" #: none:0 msgid "" -"_: QMessageBox\n" +"_: TQMessageBox\n" "Ignore" msgstr "무시" diff --git a/examples/demo/i18n/no.po b/examples/demo/i18n/no.po index efe1b2111..47a42375d 100644 --- a/examples/demo/i18n/no.po +++ b/examples/demo/i18n/no.po @@ -218,34 +218,34 @@ msgstr "Avbryt" #: none:0 msgid "" -"_: QPrintDialog\n" +"_: TQPrintDialog\n" "locally connected" msgstr "" -"_: QPrintDialog\n" +"_: TQPrintDialog\n" "lokalt tilkoblet" #: none:0 msgid "" -"_: QPrintDialog\n" +"_: TQPrintDialog\n" "Aliases: " msgstr "" -"_: QPrintDialog\n" +"_: TQPrintDialog\n" "Aliaser: " #: none:0 msgid "" -"_: QPrintDialog\n" +"_: TQPrintDialog\n" "unknown" msgstr "" -"_: QPrintDialog\n" +"_: TQPrintDialog\n" "ukjent" #: none:0 msgid "" -"_: QPrintDialog\n" +"_: TQPrintDialog\n" "Unknown Location" msgstr "" -"_: QPrintDialog\n" +"_: TQPrintDialog\n" "Ukjent sted" #: none:0 @@ -332,131 +332,131 @@ msgstr "Stående" msgid "Landscape" msgstr "Sidelengs" -#: src/dialogs/qprintdialog.cpp:1069 +#: src/dialogs/tqprintdialog.cpp:1069 msgid "A0 (841 x 1189 mm)" msgstr "A0 (841 x 1189 mm)" -#: src/dialogs/qprintdialog.cpp:1070 +#: src/dialogs/tqprintdialog.cpp:1070 msgid "A1 (594 x 841 mm)" msgstr "A1 (594 x 841 mm)" -#: src/dialogs/qprintdialog.cpp:1071 +#: src/dialogs/tqprintdialog.cpp:1071 msgid "A2 (420 x 594 mm)" msgstr "A2 (420 x 594 mm)" -#: src/dialogs/qprintdialog.cpp:1072 +#: src/dialogs/tqprintdialog.cpp:1072 msgid "A3 (297 x 420 mm)" msgstr "A3 (297 x 420 mm)" -#: src/dialogs/qprintdialog.cpp:1073 +#: src/dialogs/tqprintdialog.cpp:1073 msgid "A4 (210x297 mm, 8.26x11.7 inches)" msgstr "A4 (210x297 mm, 8,26x11,7 tommer)" -#: src/dialogs/qprintdialog.cpp:1074 +#: src/dialogs/tqprintdialog.cpp:1074 msgid "A5 (148 x 210 mm)" msgstr "A5 (148 x 210 mm)" -#: src/dialogs/qprintdialog.cpp:1075 +#: src/dialogs/tqprintdialog.cpp:1075 msgid "A6 (105 x 148 mm)" msgstr "A6 (105 x 148 mm)" -#: src/dialogs/qprintdialog.cpp:1076 +#: src/dialogs/tqprintdialog.cpp:1076 msgid "A7 (74 x 105 mm)" msgstr "A7 (74 x 105 mm)" -#: src/dialogs/qprintdialog.cpp:1077 +#: src/dialogs/tqprintdialog.cpp:1077 msgid "A8 (52 x 74 mm)" msgstr "A8 (52 x 74 mm)" -#: src/dialogs/qprintdialog.cpp:1078 +#: src/dialogs/tqprintdialog.cpp:1078 msgid "A9 (37 x 52 mm)" msgstr "A9 (37 x 52 mm)" -#: src/dialogs/qprintdialog.cpp:1079 +#: src/dialogs/tqprintdialog.cpp:1079 msgid "B0 (1030 x 1456 mm)" msgstr "B0 (1030 x 1456 mm)" -#: src/dialogs/qprintdialog.cpp:1080 +#: src/dialogs/tqprintdialog.cpp:1080 msgid "B1 (728 x 1030 mm)" msgstr "B1 (728 x 1030 mm)" -#: src/dialogs/qprintdialog.cpp:1081 +#: src/dialogs/tqprintdialog.cpp:1081 msgid "B10 (32 x 45 mm)" msgstr "B10 (32 x 45 mm)" -#: src/dialogs/qprintdialog.cpp:1082 +#: src/dialogs/tqprintdialog.cpp:1082 msgid "B2 (515 x 728 mm)" msgstr "B2 (515 x 728 mm)" -#: src/dialogs/qprintdialog.cpp:1083 +#: src/dialogs/tqprintdialog.cpp:1083 msgid "B3 (364 x 515 mm)" msgstr "B3 (364 x 515 mm)" -#: src/dialogs/qprintdialog.cpp:1084 +#: src/dialogs/tqprintdialog.cpp:1084 msgid "B4 (257 x 364 mm)" msgstr "B4 (257 x 364 mm)" -#: src/dialogs/qprintdialog.cpp:1085 +#: src/dialogs/tqprintdialog.cpp:1085 msgid "B5 (182x257 mm, 7.17x10.13 inches)" msgstr "B5 (182x257 mm, 7,17x10,13 tommer)" -#: src/dialogs/qprintdialog.cpp:1086 +#: src/dialogs/tqprintdialog.cpp:1086 msgid "B6 (128 x 182 mm)" msgstr "B6 (128 x 182 mm)" -#: src/dialogs/qprintdialog.cpp:1087 +#: src/dialogs/tqprintdialog.cpp:1087 msgid "B7 (91 x 128 mm)" msgstr "B7 (91 x 128 mm)" -#: src/dialogs/qprintdialog.cpp:1088 +#: src/dialogs/tqprintdialog.cpp:1088 msgid "B8 (64 x 91 mm)" msgstr "B8 (64 x 91 mm)" -#: src/dialogs/qprintdialog.cpp:1089 +#: src/dialogs/tqprintdialog.cpp:1089 msgid "B9 (45 x 64 mm)" msgstr "B9 (45 x 64 mm)" -#: src/dialogs/qprintdialog.cpp:1090 +#: src/dialogs/tqprintdialog.cpp:1090 msgid "C5E (163 x 229 mm)" msgstr "C5E (163 x 229 mm)" -#: src/dialogs/qprintdialog.cpp:1091 +#: src/dialogs/tqprintdialog.cpp:1091 msgid "DLE (110 x 220 mm)" msgstr "DLE (110 x 220 mm)" -#: src/dialogs/qprintdialog.cpp:1092 +#: src/dialogs/tqprintdialog.cpp:1092 msgid "Executive (7.5x10 inches, 191x254 mm)" msgstr "Executive (7,5x10 tommer, 191x254 mm)" -#: src/dialogs/qprintdialog.cpp:1094 +#: src/dialogs/tqprintdialog.cpp:1094 msgid "Folio (210 x 330 mm)" msgstr "Folio (210 x 330 mm)" -#: src/dialogs/qprintdialog.cpp:1095 +#: src/dialogs/tqprintdialog.cpp:1095 msgid "Ledger (432 x 279 mm)" msgstr "Ledger (432 x 279 mm)" -#: src/dialogs/qprintdialog.cpp:1096 +#: src/dialogs/tqprintdialog.cpp:1096 msgid "Legal (8.5x14 inches, 216x356 mm)" msgstr "Legal (8,5x14 tommer, 216x356 mm)" -#: src/dialogs/qprintdialog.cpp:1097 +#: src/dialogs/tqprintdialog.cpp:1097 msgid "Letter (8.5x11 inches, 216x279 mm)" msgstr "Brev (8.5x11 tommer, 216x279 mm)" -#: src/dialogs/qprintdialog.cpp:1098 +#: src/dialogs/tqprintdialog.cpp:1098 msgid "Tabloid (279 x 432 mm)" msgstr "Tabloid (279 x 432 mm)" -#: src/dialogs/qprintdialog.cpp:1099 +#: src/dialogs/tqprintdialog.cpp:1099 msgid "US Common #10 Envelope (105 x 241 mm)" msgstr "Standard US-#10-konvolutt (105 x 241 mm)" -#: src/dialogs/qprintdialog.cpp:1123 +#: src/dialogs/tqprintdialog.cpp:1123 msgid "Setup Printer" msgstr "Oppsett av skriver" -#: src/dialogs/qprintdialog.cpp:1201 +#: src/dialogs/tqprintdialog.cpp:1201 msgid "Postscript files (*.ps);;All files (*)" msgstr "Postskript-filer (*.ps);;Alle filer (*)" @@ -792,37 +792,37 @@ msgstr "&OK" #: none:0 msgid "" -"_: QMessageBox\n" +"_: TQMessageBox\n" "OK" msgstr "OK" #: none:0 msgid "" -"_: QMessageBox\n" +"_: TQMessageBox\n" "Yes" msgstr "Ja" #: none:0 msgid "" -"_: QMessageBox\n" +"_: TQMessageBox\n" "No" msgstr "Nei" #: none:0 msgid "" -"_: QMessageBox\n" +"_: TQMessageBox\n" "Abort" msgstr "Avbryt" #: none:0 msgid "" -"_: QMessageBox\n" +"_: TQMessageBox\n" "Retry" msgstr "Prøv igjen" #: none:0 msgid "" -"_: QMessageBox\n" +"_: TQMessageBox\n" "Ignore" msgstr "Ignorer" diff --git a/examples/demo/qasteroids/view.cpp b/examples/demo/qasteroids/view.cpp index 06dfd1e6e..8b7ceeed3 100644 --- a/examples/demo/qasteroids/view.cpp +++ b/examples/demo/qasteroids/view.cpp @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include "view.h" diff --git a/examples/demo/qthumbwheel.h b/examples/demo/qthumbwheel.h index c7f837b7b..43a86bf39 100644 --- a/examples/demo/qthumbwheel.h +++ b/examples/demo/qthumbwheel.h @@ -43,7 +43,7 @@ #ifndef QT_H #include "tqframe.h" -#include "ntqrangecontrol.h" +#include "tqrangecontrol.h" #endif // QT_H #ifndef TQT_NO_THUMBWHEEL diff --git a/examples/demo/sql/sqlex.ui.h b/examples/demo/sql/sqlex.ui.h index a72272955..9c722760f 100644 --- a/examples/demo/sql/sqlex.ui.h +++ b/examples/demo/sql/sqlex.ui.h @@ -6,7 +6,7 @@ ** a constructor, and a destroy() slot in place of a destructor. *****************************************************************************/ #include -#include +#include #include #include #include diff --git a/examples/demo/textdrawing/example.html b/examples/demo/textdrawing/example.html index b0c7c1984..12c6f5e7f 100644 --- a/examples/demo/textdrawing/example.html +++ b/examples/demo/textdrawing/example.html @@ -179,7 +179,7 @@ returns 0.

                If the label contains a pixmap, returns a pointer to it. Otherwise, returns 0.

                See also setPixmap(). -

                voidTQLabel::resizeEvent(TQResizeEvent*e) [virtualprotected]

                +

                voidTQLabel::resizeEvent(TQResizeEvent*e) [virtualprotected]

                Reimplemented for internal reasons; the API is not affected.

                Reimplemented from TQWidget.

                voidTQLabel::setAlignment(intalignment) [virtual]

                diff --git a/examples/demo/textdrawing/helpwindow.cpp b/examples/demo/textdrawing/helpwindow.cpp index 099b5dde0..8804a513a 100644 --- a/examples/demo/textdrawing/helpwindow.cpp +++ b/examples/demo/textdrawing/helpwindow.cpp @@ -18,7 +18,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/examples/dirview/dirview.cpp b/examples/dirview/dirview.cpp index 52900c8cf..351c01d6b 100644 --- a/examples/dirview/dirview.cpp +++ b/examples/dirview/dirview.cpp @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/examples/distributor/distributor.ui.h b/examples/distributor/distributor.ui.h index b81b2e81e..e4045080a 100644 --- a/examples/distributor/distributor.ui.h +++ b/examples/distributor/distributor.ui.h @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include #include diff --git a/examples/fileiconview/tqfileiconview.cpp b/examples/fileiconview/tqfileiconview.cpp index cd9b78a16..ea3524bc1 100644 --- a/examples/fileiconview/tqfileiconview.cpp +++ b/examples/fileiconview/tqfileiconview.cpp @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/examples/helpdemo/helpdemo.cpp b/examples/helpdemo/helpdemo.cpp index b6d33bdf3..41563fab7 100644 --- a/examples/helpdemo/helpdemo.cpp +++ b/examples/helpdemo/helpdemo.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include #include #include diff --git a/examples/helpviewer/helpwindow.cpp b/examples/helpviewer/helpwindow.cpp index 5565d5275..121cd8a03 100644 --- a/examples/helpviewer/helpwindow.cpp +++ b/examples/helpviewer/helpwindow.cpp @@ -18,7 +18,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/examples/i18n/main.cpp b/examples/i18n/main.cpp index b32a985af..6774ca42d 100644 --- a/examples/i18n/main.cpp +++ b/examples/i18n/main.cpp @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/examples/mdi/application.cpp b/examples/mdi/application.cpp index 9429aae3d..5d3cff556 100644 --- a/examples/mdi/application.cpp +++ b/examples/mdi/application.cpp @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/examples/menu/menu.cpp b/examples/menu/menu.cpp index 558c6d50c..1c1af8f93 100644 --- a/examples/menu/menu.cpp +++ b/examples/menu/menu.cpp @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include #include diff --git a/examples/movies/main.cpp b/examples/movies/main.cpp index 15ac9befb..39cc3e337 100644 --- a/examples/movies/main.cpp +++ b/examples/movies/main.cpp @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include diff --git a/examples/network/archivesearch/archivedialog.ui b/examples/network/archivesearch/archivedialog.ui index 2c8bb8e31..637961456 100644 --- a/examples/network/archivesearch/archivedialog.ui +++ b/examples/network/archivesearch/archivedialog.ui @@ -114,7 +114,7 @@ tqhttp.h tqurl.h - ntqmessagebox.h + tqmessagebox.h ntqapplication.h tqcursor.h tqregexp.h diff --git a/examples/network/ftpclient/ftpmainwindow.ui.h b/examples/network/ftpclient/ftpmainwindow.ui.h index 6367c185a..d57b0b9f0 100644 --- a/examples/network/ftpclient/ftpmainwindow.ui.h +++ b/examples/network/ftpclient/ftpmainwindow.ui.h @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/examples/network/infoprotocol/infoserver/server.cpp b/examples/network/infoprotocol/infoserver/server.cpp index 509a55623..7e69d9791 100644 --- a/examples/network/infoprotocol/infoserver/server.cpp +++ b/examples/network/infoprotocol/infoserver/server.cpp @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include #include "server.h" diff --git a/examples/network/mail/smtp.cpp b/examples/network/mail/smtp.cpp index e04468a42..dd396ce2b 100644 --- a/examples/network/mail/smtp.cpp +++ b/examples/network/mail/smtp.cpp @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include diff --git a/examples/opengl/overlay/globjwin.cpp b/examples/opengl/overlay/globjwin.cpp index 69f1becd3..1beb9f0e0 100644 --- a/examples/opengl/overlay/globjwin.cpp +++ b/examples/opengl/overlay/globjwin.cpp @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include "globjwin.h" #include "glteapots.h" diff --git a/examples/opengl/overlay/main.cpp b/examples/opengl/overlay/main.cpp index d5ec55eae..9e7d9c7b0 100644 --- a/examples/opengl/overlay/main.cpp +++ b/examples/opengl/overlay/main.cpp @@ -19,7 +19,7 @@ #include "globjwin.h" #include #include -#include +#include /* The main program is here. diff --git a/examples/picture/picture.cpp b/examples/picture/picture.cpp index 49230d30b..acf305ad5 100644 --- a/examples/picture/picture.cpp +++ b/examples/picture/picture.cpp @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include diff --git a/examples/process/process.cpp b/examples/process/process.cpp index 5382c5e4a..52da5b92f 100644 --- a/examples/process/process.cpp +++ b/examples/process/process.cpp @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include diff --git a/examples/qwerty/qwerty.cpp b/examples/qwerty/qwerty.cpp index 748b032b6..c6f363811 100644 --- a/examples/qwerty/qwerty.cpp +++ b/examples/qwerty/qwerty.cpp @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/examples/scrollview/scrollview.cpp b/examples/scrollview/scrollview.cpp index 62e474d27..0eacabe58 100644 --- a/examples/scrollview/scrollview.cpp +++ b/examples/scrollview/scrollview.cpp @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/examples/showimg/showimg.cpp b/examples/showimg/showimg.cpp index f9fe0a5d8..52e2576e0 100644 --- a/examples/showimg/showimg.cpp +++ b/examples/showimg/showimg.cpp @@ -11,7 +11,7 @@ #include "imagetexteditor.h" #include #include -#include +#include #include #include #include diff --git a/examples/sound/sound.cpp b/examples/sound/sound.cpp index 9c79d5762..8333f464e 100644 --- a/examples/sound/sound.cpp +++ b/examples/sound/sound.cpp @@ -15,7 +15,7 @@ #include "sound.h" #include -#include +#include #include SoundPlayer::SoundPlayer() : diff --git a/examples/sql/sqltable/main.cpp b/examples/sql/sqltable/main.cpp index cda4113d4..86f6ac898 100644 --- a/examples/sql/sqltable/main.cpp +++ b/examples/sql/sqltable/main.cpp @@ -11,7 +11,7 @@ #include #include #include -#include +#include /* Modify the following to match your environment */ #define DRIVER "TQSQLITE" /* see the TQt SQL documentation for a list of available drivers */ diff --git a/examples/themes/metal.cpp b/examples/themes/metal.cpp index 22ca5a2b3..9d0e6fc2a 100644 --- a/examples/themes/metal.cpp +++ b/examples/themes/metal.cpp @@ -22,7 +22,7 @@ #include "tqimage.h" #include "tqpushbutton.h" #include "tqwidget.h" -#include "ntqrangecontrol.h" +#include "tqrangecontrol.h" #include "tqscrollbar.h" #include "tqslider.h" #include diff --git a/examples/themes/themes.cpp b/examples/themes/themes.cpp index c66605450..396354ce7 100644 --- a/examples/themes/themes.cpp +++ b/examples/themes/themes.cpp @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/examples/themes/wood.cpp b/examples/themes/wood.cpp index 351bd7496..b9ce0c89f 100644 --- a/examples/themes/wood.cpp +++ b/examples/themes/wood.cpp @@ -22,7 +22,7 @@ #include "tqimage.h" #include "tqpushbutton.h" #include "tqwidget.h" -#include "ntqrangecontrol.h" +#include "tqrangecontrol.h" #include "tqscrollbar.h" #include #include "tqstylefactory.h" diff --git a/examples/thread/semaphores/main.cpp b/examples/thread/semaphores/main.cpp index 3c7dbc4a2..ea32cca60 100644 --- a/examples/thread/semaphores/main.cpp +++ b/examples/thread/semaphores/main.cpp @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include #if defined(TQT_NO_THREAD) diff --git a/examples/widgets/widgets.cpp b/examples/widgets/widgets.cpp index 6680ade48..4ce159fa7 100644 --- a/examples/widgets/widgets.cpp +++ b/examples/widgets/widgets.cpp @@ -7,7 +7,7 @@ ** *****************************************************************************/ -#include +#include #include #include #include @@ -46,7 +46,7 @@ #include #include #include -#include +#include #include #include "widgets.h" diff --git a/examples/xml/outliner/outlinetree.cpp b/examples/xml/outliner/outlinetree.cpp index 965d0c0e8..16063ac15 100644 --- a/examples/xml/outliner/outlinetree.cpp +++ b/examples/xml/outliner/outlinetree.cpp @@ -9,7 +9,7 @@ #include "outlinetree.h" #include -#include +#include OutlineTree::OutlineTree( const TQString fileName, TQWidget *parent, const char *name ) : TQListView( parent, name ) diff --git a/extensions/nsplugin/doc/index.doc b/extensions/nsplugin/doc/index.doc index 50835de4d..0d7bd2139 100644 --- a/extensions/nsplugin/doc/index.doc +++ b/extensions/nsplugin/doc/index.doc @@ -23,10 +23,10 @@ protocol. Modern versions of MSIE do not support this protocol. The Netscape Plugin Extension consists of the follow classes: \list -\i \l QNPlugin -\i \l QNPInstance -\i \l QNPWidget -\i \l QNPStream +\i \l TQNPlugin +\i \l TQNPInstance +\i \l TQNPWidget +\i \l TQNPStream \endlist \section1 How-to @@ -48,7 +48,7 @@ The Netscape Plugin Extension consists of the follow classes: \i Build the Netscape Plugin extension library, found in the \c{extensions/nsplugin/src} directory of your TQt distribution. This produces a static library to be linked with your plugin code. - \i Read the \link qnplugin.html plugin class documentation \endlink, and + \i Read the \link tqnplugin.html plugin class documentation \endlink, and examine the \link nsplugin-examples.html example plugins \endlink. \i Do most of your development as a stand-alone TQt application - debugging Netscape Plugins is cumbersome. You may want to use \c{signal(2)} diff --git a/extensions/nsplugin/examples/grapher/grapher.cpp b/extensions/nsplugin/examples/grapher/grapher.cpp index 22b79f20e..22f7d09d6 100644 --- a/extensions/nsplugin/examples/grapher/grapher.cpp +++ b/extensions/nsplugin/examples/grapher/grapher.cpp @@ -1,5 +1,5 @@ // Include TQt Netscape Plugin classes. -#include "ntqnp.h" +#include "tqnp.h" // Include other TQt classes. #include @@ -9,7 +9,7 @@ #include #include #include -#include +#include // Include some C library functions. #include diff --git a/extensions/nsplugin/examples/grapher/grapher.doc b/extensions/nsplugin/examples/grapher/grapher.doc index 752499b9e..af6189cc4 100644 --- a/extensions/nsplugin/examples/grapher/grapher.doc +++ b/extensions/nsplugin/examples/grapher/grapher.doc @@ -4,8 +4,8 @@ \title Grapher Plugin This example graphs data from a simple text file. It - demonstrates the use of the QNPInstance::writeReady() - and QNPInstance::write() functions. + demonstrates the use of the TQNPInstance::writeReady() + and TQNPInstance::write() functions. To build the example, you must first build the TQt Netscape Plugin Extension library. diff --git a/extensions/nsplugin/examples/trivial/trivial.cpp b/extensions/nsplugin/examples/trivial/trivial.cpp index 043c333de..d2c57843d 100644 --- a/extensions/nsplugin/examples/trivial/trivial.cpp +++ b/extensions/nsplugin/examples/trivial/trivial.cpp @@ -1,7 +1,7 @@ // TQt stuff -#include "ntqnp.h" +#include "tqnp.h" #include -#include +#include class Trivial : public TQNPWidget { TQ_OBJECT diff --git a/extensions/nsplugin/src/ntqnp.h b/extensions/nsplugin/src/ntqnp.h deleted file mode 100644 index 3451afbb9..000000000 --- a/extensions/nsplugin/src/ntqnp.h +++ /dev/null @@ -1,186 +0,0 @@ -/**************************************************************************** -** -** Definition of TQt extension classes for Netscape Plugin support. -** -** Created : 970601 -** -** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. -** -** This file is part of the TQt GUI Toolkit. -** -** This file may be used under the terms of the GNU General -** Public License versions 2.0 or 3.0 as published by the Free -** Software Foundation and appearing in the files LICENSE.GPL2 -** and LICENSE.GPL3 included in the packaging of this file. -** Alternatively you may (at your option) use any later version -** of the GNU General Public License if such license has been -** publicly approved by Trolltech ASA (or its successors, if any) -** and the KDE Free TQt Foundation. -** -** Please review the following information to ensure GNU General -** Public Licensing requirements will be met: -** http://trolltech.com/products/qt/licenses/licensing/opensource/. -** If you are unsure which license is appropriate for your use, please -** review the following information: -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview -** or contact the sales department at sales@trolltech.com. -** -** This file may be used under the terms of the Q Public License as -** defined by Trolltech ASA and appearing in the file LICENSE.TQPL -** included in the packaging of this file. Licensees holding valid TQt -** Commercial licenses may use this file in accordance with the TQt -** Commercial License Agreement provided with the Software. -** -** This file is provided "AS IS" with NO 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 "tqwidget.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 { - TQ_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 { - TQ_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 diff --git a/extensions/nsplugin/src/qnp.cpp b/extensions/nsplugin/src/qnp.cpp deleted file mode 100644 index 455ebd638..000000000 --- a/extensions/nsplugin/src/qnp.cpp +++ /dev/null @@ -1,2071 +0,0 @@ -/**************************************************************************** -** -** Implementation of TQt extension classes for Netscape Plugin support. -** -** Created : 970601 -** -** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. -** -** This file is part of the TQt GUI Toolkit. -** -** This file may be used under the terms of the GNU General -** Public License versions 2.0 or 3.0 as published by the Free -** Software Foundation and appearing in the files LICENSE.GPL2 -** and LICENSE.GPL3 included in the packaging of this file. -** Alternatively you may (at your option) use any later version -** of the GNU General Public License if such license has been -** publicly approved by Trolltech ASA (or its successors, if any) -** and the KDE Free TQt Foundation. -** -** Please review the following information to ensure GNU General -** Public Licensing requirements will be met: -** http://trolltech.com/products/qt/licenses/licensing/opensource/. -** If you are unsure which license is appropriate for your use, please -** review the following information: -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview -** or contact the sales department at sales@trolltech.com. -** -** This file may be used under the terms of the Q Public License as -** defined by Trolltech ASA and appearing in the file LICENSE.TQPL -** included in the packaging of this file. Licensees holding valid TQt -** Commercial licenses may use this file in accordance with the TQt -** Commercial License Agreement provided with the Software. -** -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted -** herein. -** -**********************************************************************/ - - -// Remaining TQ_WS_X11 considerations: -// - What if !piApp upon NPP_NewStream? Are we safe? -// - Yes, but users need to know of this: that no GUI can be -// done until after setWindow is called. -// - Use NPN_GetValue in Communicator4.0 to get the display earlier! -// - For ClientMessage events, trap them, and if they are not for us, -// untrap them and retransmit them and set a timer to retrap them -// after N seconds. - -// Remaining TQ_WS_WIN considerations: -// - we need to activateZeroTimers() at some time. -// - we need to call winEventFilter on events -// - timers: -// if ( msg.message == WM_TIMER ) { // timer message received -// activateTimer( msg.wParam ); -// return TRUE; -// } -// if ( msg.message == WM_KEYDOWN || msg.message == WM_KEYUP ) { -// if ( translateKeyCode(msg.wParam) == 0 ) { -// TranslateMessage( &msg ); // translate to WM_CHAR -// return TRUE; -// } -// } -// - qWinProcessConfigRequests? - -// Remaining general stuff: -// - Provide the "reason" parameter to streamDestroyed - -// TQt stuff -#include -#include -#include -#include -#include -#include -#include -#include - -#include "ntqnp.h" - -#include // Must be here for Borland C++ -#include -#include -#include -#include - -#ifdef TQ_WS_X11 -#include - -class TQNPXtPrivate; - -class TQNPXt : public TQEventLoop -{ -public: - TQNPXt( const char *applicationClass, XtAppContext context = NULL, XrmOptionDescRec *options = 0, int numOptions = 0); - ~TQNPXt(); - - XtAppContext applicationContext() const; - - void registerSocketNotifier( TQSocketNotifier * ); - void unregisterSocketNotifier( TQSocketNotifier * ); - - static void registerWidget( TQWidget* ); - static void unregisterWidget( TQWidget* ); - static bool redeliverEvent( XEvent *event ); - static XEvent* lastEvent(); - -protected: - bool processEvents( ProcessEventsFlags flags ); - -private: - void appStartingUp(); - void appClosingDown(); - TQNPXtPrivate *d; - -}; - -#define GC GC_QQQ -#endif - -extern "C" { -// -// Netscape plugin API -// -#ifdef TQ_WS_WIN -#ifndef _WINDOWS -#define _WINDOWS -#endif -#endif -#ifdef TQ_WS_X11 -#define XP_UNIX -#endif - - -// This is to allow mingw support on windows without altering the sun header files -#if defined(Q_CC_GNU) && defined(TQ_WS_WIN) && !defined(_MSC_VER) -#define _MSC_VER 1 -#include "npapi.h" -#undef _MSC_VER -#else -#include "npapi.h" -#endif - -#ifdef TQ_WS_X11 -#undef XP_UNIX -#include "npunix.c" -#endif - -// -// Stuff for the NPP_SetWindow function: -// -#ifdef TQ_WS_X11 -#include -#include -#include // for XtCreateWindow -#include -#include -#include -#include -//#include -#endif -#ifdef TQ_WS_WIN -#include -#endif -} - -#ifdef TQ_WS_WIN -#include "npwin.cpp" -#endif - -static TQEventLoop* event_loop = 0; -static TQApplication* application = 0; - -struct _NPInstance -{ - uint16 fMode; - -#ifdef TQ_WS_WIN - HWND window; -#endif - - NPP npp; - -#ifdef TQ_WS_X11 - Window window; - Display *display; -#endif - - uint32 x, y; - uint32 width, height; - - TQNPWidget* widget; - TQNPInstance* instance; - - int16 argc; - TQString *argn; - TQString *argv; -}; - - - -// The single global plugin -static TQNPlugin *qNP=0; -static int instance_count=0; - -// Temporary parameter passed `around the side' of calls to user functions -static _NPInstance* next_pi=0; - -// To avoid looping when browser OR plugin can delete streams -static int qnps_no_call_back = 0; - -#ifdef TQ_WS_WIN -// defined in qapplication_win.cpp -TQ_EXPORT extern bool qt_win_use_simple_timers; -TQ_EXPORT void qWinProcessConfigRequests(); -static HHOOK hhook = 0; - -LRESULT CALLBACK FilterProc( int nCode, WPARAM wParam, LPARAM lParam ) -{ - if ( tqApp ) { - tqApp->sendPostedEvents(); - tqApp->eventLoop()->activateSocketNotifiers(); - qWinProcessConfigRequests(); - } - - return CallNextHookEx( hhook, nCode, wParam, lParam ); -} - -#endif - -#ifdef TQ_WS_X11 -static int (*original_x_errhandler)( Display *dpy, XErrorEvent * ) = 0; -static int dummy_x_errhandler( Display *, XErrorEvent * ) -{ - return 0; -} -#endif - -/****************************************************************************** - * Plug-in Calls - these are called by Netscape - *****************************************************************************/ - - -// Instance state information about the plugin. - -#ifdef TQ_WS_X11 - -extern "C" char* -NPP_GetMIMEDescription(void) -{ - if (!qNP) qNP = TQNPlugin::create(); - return (char*)qNP->getMIMEDescription(); -} - - - -extern "C" NPError -NPP_GetValue(void * /*future*/, NPPVariable variable, void *value) -{ - if (!qNP) qNP = TQNPlugin::create(); - NPError err = NPERR_NO_ERROR; - if (variable == NPPVpluginNameString) - *((const char **)value) = qNP->getPluginNameString(); - else if (variable == NPPVpluginDescriptionString) - *((const char **)value) = qNP->getPluginDescriptionString(); - else - err = NPERR_GENERIC_ERROR; - - return err; -} - -#endif - -/* -** NPP_Initialize is called when your DLL is being loaded to do any -** DLL-specific initialization. -*/ -extern "C" NPError -NPP_Initialize(void) -{ -#ifdef TQ_WS_WIN - qt_win_use_simple_timers = TRUE; - // Nothing more - we do it in DLLMain -#endif - - if (!qNP) qNP = TQNPlugin::create(); - return NPERR_NO_ERROR; -} - -static jref plugin_java_class = 0; - -/* -** NPP_GetJavaClass is called during initialization to ask your plugin -** what its associated Java class is. If you don't have one, just return -** NULL. Otherwise, use the javah-generated "use_" function to both -** initialize your class and return it. If you can't find your class, an -** error will be signalled by "use_" and will cause the Navigator to -** complain to the user. -*/ -extern "C" jref -NPP_GetJavaClass(void) -{ - if (!qNP) qNP = TQNPlugin::create(); - plugin_java_class = (jref)qNP->getJavaClass(); - return plugin_java_class; -} - -/* -** NPP_Shutdown is called when your DLL is being unloaded to do any -** DLL-specific shut-down. You should be a good citizen and declare that -** you're not using your java class any more. This allows java to unload -** it, freeing up memory. -*/ -extern "C" void -NPP_Shutdown(void) -{ - if (qNP) { - if (plugin_java_class) - qNP->unuseJavaClass(); - delete qNP; - qNP = 0; - } - -#ifdef TQ_WS_X11 - if ( original_x_errhandler ) - XSetErrorHandler( original_x_errhandler ); -#endif - if ( tqApp) { -#ifdef TQ_WS_WIN32 - if ( hhook ) - UnhookWindowsHookEx( hhook ); - hhook = 0; -#endif - delete application; - delete event_loop; - } - -} - - -struct NS_Private { - uchar* a; - uchar* b; -}; - -/* -** NPP_New is called when your plugin is instantiated (i.e. when an EMBED -** tag appears on a page). -*/ -extern "C" NPError -NPP_New(NPMIMEType /*pluginType*/, - NPP instance, - uint16 mode, - int16 argc, - char* argn[], - char* argv[], - NPSavedData* /*saved*/) -{ - NPError result = NPERR_NO_ERROR; - _NPInstance* This; - - if (instance == NULL) - return NPERR_INVALID_INSTANCE_ERROR; - - instance->pdata = new _NPInstance; - - This = (_NPInstance*) instance->pdata; - - if (This == NULL) - return NPERR_OUT_OF_MEMORY_ERROR; - - This->npp = instance; - - /* mode is NP_EMBED, NP_FULL, or NP_BACKGROUND (see npapi.h) */ - This->fMode = mode; - - This->window = 0; - This->widget = 0; - - This->argc = argc; - This->argn = new TQString[argc+1]; - This->argv = new TQString[argc+1]; - for (int i=0; iargc; i++) { - This->argn[i] = argn[i]; - This->argv[i] = argv[i]; - } - - // Everything is set up - we can let TQNPInstance be created now. - next_pi = This; - qNP->newInstance(); - instance_count++; - - return result; -} - -extern "C" NPError -NPP_Destroy(NPP instance, NPSavedData** /*save*/) -{ - _NPInstance* This; - - if (instance == NULL) - return NPERR_INVALID_INSTANCE_ERROR; - - This = (_NPInstance*) instance->pdata; - - if (This != NULL) { - delete This->widget; - delete This->instance; - delete [] This->argn; - delete [] This->argv; - - delete This; - instance->pdata = NULL; - - instance_count--; - } - - return NPERR_NO_ERROR; -} - -extern "C" NPError -NPP_SetWindow(NPP instance, NPWindow* window) -{ - if (!qNP) qNP = TQNPlugin::create(); - NPError result = NPERR_NO_ERROR; - _NPInstance* This; - - if (instance == NULL) - return NPERR_INVALID_INSTANCE_ERROR; - - This = (_NPInstance*) instance->pdata; - - - // take a shortcut if all that was changed is the geometry - if ( This->widget && window -#ifdef TQ_WS_X11 - && This->window == (Window) window->window -#endif -#ifdef TQ_WS_WIN - && This->window == (HWND) window->window -#endif - ) { - This->x = window->x; - This->y = window->y; - This->width = window->width; - This->height = window->height; - This->widget->resize( This->width, This->height ); - return result; - } - - delete This->widget; - - if ( !window ) - return result; - -#ifdef TQ_WS_X11 - This->window = (Window) window->window; - This->display = - ((NPSetWindowCallbackStruct *)window->ws_info)->display; -#endif -#ifdef TQ_WS_WIN - This->window = (HWND) window->window; -#endif - - This->x = window->x; - This->y = window->y; - This->width = window->width; - This->height = window->height; - - - if (!tqApp) { -#ifdef TQ_WS_X11 - // We are the first TQt-based plugin to arrive - event_loop = new TQNPXt( "qnp", XtDisplayToApplicationContext(This->display) ); - application = new TQApplication(This->display); -#endif -#ifdef TQ_WS_WIN - static int argc=0; - static char **argv={ 0 }; - application = new TQApplication( argc, argv ); -#ifdef UNICODE - if ( qWinVersion() & TQt::WV_NT_based ) - hhook = SetWindowsHookExW( WH_GETMESSAGE, FilterProc, 0, GetCurrentThreadId() ); - else -#endif - hhook = SetWindowsHookExA( WH_GETMESSAGE, FilterProc, 0, GetCurrentThreadId() ); -#endif - } - -#ifdef TQ_WS_X11 - if ( !original_x_errhandler ) - original_x_errhandler = XSetErrorHandler( dummy_x_errhandler ); -#endif - - // New widget on this new window. - next_pi = This; - /* This->widget = */ // (happens sooner - in TQNPWidget constructor) - This->instance->newWindow(); - - if ( !This->widget ) - return result; - -#ifdef TQ_WS_X11 - This->widget->resize( This->width, This->height ); - XReparentWindow( This->widget->x11Display(), This->widget->winId(), This->window, 0, 0 ); - XSync( This->widget->x11Display(), False ); -#endif -#ifdef TQ_WS_WIN - LONG oldLong = GetWindowLong(This->window, GWL_STYLE); - ::SetWindowLong(This->window, GWL_STYLE, oldLong | WS_CLIPCHILDREN | WS_CLIPSIBLINGS); - ::SetWindowLong( This->widget->winId(), GWL_STYLE, WS_CHILD | WS_CLIPCHILDREN | WS_CLIPSIBLINGS ); - ::SetParent( This->widget->winId(), This->window ); - This->widget->raise(); - This->widget->setGeometry( 0, 0, This->width, This->height ); -#endif - This->widget->show(); - return result; -} - - -extern "C" NPError -NPP_NewStream(NPP instance, - NPMIMEType type, - NPStream *stream, - NPBool seekable, - uint16 *stype) -{ - _NPInstance* This; - - if (instance == NULL) - return NPERR_INVALID_INSTANCE_ERROR; - - This = (_NPInstance*) instance->pdata; - - if ( This ) { - TQNPStream* qnps = new TQNPStream(This->instance,type,stream,seekable); - stream->pdata = qnps; - TQNPInstance::StreamMode sm = (TQNPInstance::StreamMode)*stype; - if (!This->instance->newStreamCreated(qnps, sm)) { - return NPERR_GENERIC_ERROR; - } - *stype = sm; - } - - return NPERR_NO_ERROR; -} - - -int32 STREAMBUFSIZE = 0X0FFFFFFF; /* If we are reading from a file in NPAsFile - * mode so we can take any size stream in our - * write call (since we ignore it) */ - -extern "C" int32 -NPP_WriteReady(NPP instance, NPStream *stream) -{ - _NPInstance* This; - if (instance != NULL) { - This = (_NPInstance*) instance->pdata; - } else { - // Yikes, that's unusual! - return 0; - } - - if (This) { - return This->instance->writeReady((TQNPStream*)stream->pdata); - } - - /* Number of bytes ready to accept in NPP_Write() */ - return STREAMBUFSIZE; -} - - -extern "C" int32 -NPP_Write(NPP instance, NPStream *stream, int32 offset, int32 len, void *buffer) -{ - if (instance != NULL) - { - _NPInstance* This = (_NPInstance*) instance->pdata; - - if (This) { - return This->instance->write((TQNPStream*)stream->pdata, - offset, len, buffer); - } - } - - return len; /* The number of bytes accepted */ -} - - -extern "C" NPError -NPP_DestroyStream(NPP instance, NPStream *stream, NPError reason) -{ - _NPInstance* This; - - if (instance == NULL) - return NPERR_INVALID_INSTANCE_ERROR; - - if (!qnps_no_call_back) { - This = (_NPInstance*) instance->pdata; - - TQNPStream* qnps = (TQNPStream*)stream->pdata; - if ( qnps ) - switch (reason) { - case NPRES_DONE: - qnps->setComplete(TRUE); - break; - case NPRES_USER_BREAK: - break; - case NPRES_NETWORK_ERR: - qnps->setOkay(FALSE); - break; - } - - if (This) { - // Give the instance a chance to do something - This->instance->streamDestroyed(qnps); - } - - qnps_no_call_back++; - delete qnps; - qnps_no_call_back--; - } - - return NPERR_NO_ERROR; -} - - -extern "C" void -NPP_StreamAsFile(NPP instance, NPStream *stream, const char* fname) -{ - _NPInstance* This; - - if (instance == NULL) return; - - This = (_NPInstance*) instance->pdata; - - if ( This ) { - TQNPStream* qnps = (TQNPStream*)stream->pdata; - This->instance->streamAsFile(qnps, fname); - } -} - -typedef struct -{ - int32 type; - FILE* fp; -} NPPrintCallbackStruct; - -#ifdef TQ_WS_X11 - -class TQNPPrinter : public TQPrinter { - TQFile file; -public: - TQNPPrinter(FILE* fp) - { - file.open(IO_WriteOnly, fp); - TQPDevCmdParam param; - param.device = &file; - cmd(PdcSetdev, 0, ¶m); - } - void end() - { - TQPDevCmdParam param; - param.device = 0; - cmd(PdcSetdev, 0, ¶m); - } -}; -#endif - -extern "C" void -NPP_Print(NPP instance, NPPrint* printInfo) -{ - if(printInfo == NULL) - return; - - if (instance != NULL) { - _NPInstance* This = (_NPInstance*) instance->pdata; - - if (printInfo->mode == NP_FULL) { - printInfo->print.fullPrint.pluginPrinted = - This->instance->printFullPage(); - } else if (printInfo->mode == NP_EMBED) { -#ifdef TQ_WS_X11 - void* platformPrint = - printInfo->print.embedPrint.platformPrint; - FILE* outfile = ((NPPrintCallbackStruct*)platformPrint)->fp; - if (ftell(outfile)) { -// NPWindow* w = -// &(printInfo->print.embedPrint.window); - TQNPPrinter prn(outfile); - TQPainter painter(&prn); - // #### config viewport with w->{x,y,width,height} - This->instance->print(&painter); - prn.end(); - } else { - // Why does the browser make spurious NPP_Print calls? - } -#endif -#ifdef TQ_WS_WIN - NPWindow* printWindow = - &(printInfo->print.embedPrint.window); - void* platformPrint = - printInfo->print.embedPrint.platformPrint; - // #### Nothing yet. -#endif - } - } -} - -extern "C" void -NPP_URLNotify(NPP instance, - const char* url, - NPReason reason, - void* notifyData) -{ - if (instance != NULL) { - TQNPInstance::Reason r; - switch (reason) { - case NPRES_DONE: - r = TQNPInstance::ReasonDone; - break; - case NPRES_USER_BREAK: - r = TQNPInstance::ReasonBreak; - break; - case NPRES_NETWORK_ERR: - r = TQNPInstance::ReasonError; - break; - default: - r = TQNPInstance::ReasonUnknown; - break; - } - _NPInstance* This = (_NPInstance*) instance->pdata; - This->instance->notifyURL(url, r, notifyData); - } -} - - - -#ifdef TQ_WS_WIN - -BOOL WINAPI DllMain (HANDLE hInst, - ULONG ul_reason_for_call, - LPVOID lpReserved) -{ - return TRUE; -} - -#endif - - - -/*! - \class TQNPWidget ntqnp.h - \brief The TQNPWidget class provides a TQWidget that is a web browser plugin window. - - \extension Netscape Plugin - - 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 \e child of a - plugin widget to use it as a browser plugin. The technique is: - -\code -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()); - } -}; -\endcode - - The default implementation is an empty window. -*/ - -/*! - Creates a TQNPWidget. -*/ -TQNPWidget::TQNPWidget() : - pi(next_pi) -{ - if (!next_pi) { - tqFatal("TQNPWidget must only be created within call to newWindow"); - } - next_pi->widget = this; - next_pi = 0; - -#ifdef TQ_WS_WIN - clearWFlags( WStyle_NormalBorder | WStyle_Title | WStyle_MinMax | WStyle_SysMenu ); - topData()->ftop = 0; - topData()->fright = 0; - topData()->fleft = 0; - topData()->fbottom = 0; -#endif -} - -/*! - Destroys the window. This will be called by the plugin binding - code when the window is no longer required. 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. -*/ -TQNPWidget::~TQNPWidget() -{ -#ifdef TQ_WS_X11 - destroy( FALSE, FALSE ); // X has destroyed all windows -#endif -} - - -/*!\internal */ -void TQNPWidget::enterEvent(TQEvent*) -{ - enterInstance(); -} - -/*!\internal */ -void TQNPWidget:: leaveEvent(TQEvent*) -{ - if ( !TQApplication::activePopupWidget() ) - leaveInstance(); -} - -/*! - Called when the mouse enters the plugin window. Does nothing by - default. -*/ -void TQNPWidget::enterInstance() -{ -} - -/*! - Called when the mouse leaves the plugin window. Does nothing by - default. -*/ -void TQNPWidget::leaveInstance() -{ -} - -/*! - Returns the instance for which this widget is the plugin window. -*/ -TQNPInstance* TQNPWidget::instance() -{ - return pi->instance; -} - - - - - -/*! - \class TQNPInstance ntqnp.h - \brief The TQNPInstance class provides a TQObject that is a web browser plugin. - - \extension Netscape Plugin - - Deriving from TQNPInstance creates an object that represents a - single \c{} tag in an HTML document. - - The TQNPInstance is responsible for creating an appropriate - TQNPWidget window if required (not all plugins have windows), and - for interacting with the input/output facilities intrinsic to - plugins. - - Note that there is \e{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 \c{} tag has a SRC parameter). - - \e{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 \e 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. -*/ - -/*! - \enum TQNPInstance::InstanceMode - - This enum type provides TQt-style names for three #defines in - \c npapi.h: - - \value Embed - corresponds to NP_EMBED - \value Full - corresponds to NP_FULL - \value Background - corresponds to NP_BACKGROUND - -*/ - -/*! - \enum TQNPInstance::Reason - - \value ReasonDone - \value ReasonBreak - \value ReasonError - \value ReasonUnknown -*/ - -/*! - \enum TQNPInstance::StreamMode - - \value Normal - \value Seek - \value AsFile - \value AsFileOnly -*/ - -/*! - Creates a TQNPInstance. - - Can only be called from within a derived class created within - TQNPlugin::newInstance(). -*/ -TQNPInstance::TQNPInstance() : - pi(next_pi) -{ - if (!next_pi) { - tqFatal("TQNPInstance must only be created within call to newInstance"); - } - next_pi->instance = this; - next_pi = 0; -} - -/*! - Called when the plugin instance is about to be deleted. -*/ -TQNPInstance::~TQNPInstance() -{ -} - -/*! - Called at most once, at some time after the TQNPInstance is - created. If the plugin requires a window, this function should - return a derived class of TQNPWidget that provides the required - interface. -*/ -TQNPWidget* TQNPInstance::newWindow() -{ - // No window by default - next_pi = 0; - return 0; -} - -/*! - Returns the plugin window created by newWindow(), if any. -*/ -TQNPWidget* TQNPInstance::widget() -{ - return pi->widget; -} - -/*! - \fn bool TQNPInstance::newStreamCreated(TQNPStream*, StreamMode& smode) - - 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 requires the stream as a file, it should - set \a smode to \c 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 \c AsFileOnly method is not supported by Netscape - 2.0 and MSIE 3.0. - - The default implementation accepts any stream. -*/ -bool TQNPInstance::newStreamCreated(TQNPStream*, StreamMode&) -{ - return TRUE; -} - -/*! - Called when a stream is delivered as a single file called \a fname - rather than as chunks. This may be simpler for a plugin to deal - with, but precludes any incremental behavior. - - Note that the \c AsFileOnly method is not supported by Netscape - 2.0 and MSIE 3.0. - - \sa newStreamCreated(), newStream() -*/ -void TQNPInstance::streamAsFile(TQNPStream*, const char* fname) -{ -} - -/*! - 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. -*/ -void TQNPInstance::streamDestroyed(TQNPStream*) -{ -} - -/*! - Returns the minimum amount of data the instance is willing to - receive from the given stream. - - The default returns a very large value. -*/ -int TQNPInstance::writeReady(TQNPStream*) -{ - // Yes, we can handle any amount of data at once. - return 0X0FFFFFFF; -} - -/*! - \fn int TQNPInstance::write(TQNPStream*, int offset, int len, void* buffer) - - Called when incoming data is available for processing by the - instance. The instance \e 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 \a len. \a buffer is the data - available for consumption. The \a 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. -*/ -int TQNPInstance::write(TQNPStream*, int, int len, void*) -{ - // Yes, we processed it all... into the bit bucket. - return len; -} - -/*! - Requests that the \a url be retrieved and sent to the named \a - window. See Netscape's JavaScript documentation for an explanation - of window names. -*/ -void TQNPInstance::getURL(const char* url, const char* window) -{ - NPN_GetURL( pi->npp, url, window ); -} - -/*! - \preliminary - - This function is \e{not tested}. - - It is an interface to the NPN_PostURL function of the Netscape - Plugin API. - - Passes \a url, \a window, \a buf, \a len, and \a file to - NPN_PostURL. -*/ -void TQNPInstance::postURL(const char* url, const char* window, - uint len, const char* buf, bool file) -{ - NPN_PostURL( pi->npp, url, window, len, buf, file ); -} - -/*! - Requests that the given \a url be retrieved and sent to - the named \a window. See Netscape's JavaScript documentation for - an explanation of window names. Passes the arguments including \a - data to NPN_GetURLNotify. - - \sa - \link http://developer.netscape.com/docs/manuals/communicator/plugin/refpgur.htm#npngeturlnotify - Netscape: NPN_GetURLNotify method\endlink -*/ -void TQNPInstance::getURLNotify(const char* url, const char* window, void*data) -{ -#ifdef TQ_WS_WIN // Only on Windows? - NPN_GetURLNotify( pi->npp, url, window, data ); -#else - Q_UNUSED( url ); - Q_UNUSED( window ); - Q_UNUSED( data ); -#endif -} - -/*! - \preliminary - - This function is \e{not tested}. - - It is an encapsulation of the NPP_Print function of the Netscape - Plugin API. -*/ -bool TQNPInstance::printFullPage() -{ - return FALSE; -} - -/*! - \preliminary - - This function is \e{not tested}. - - Print the instance embedded in a page. - - It is an encapsulation of the NPP_Print function of the Netscape - Plugin API. -*/ -void TQNPInstance::print(TQPainter*) -{ - // ### default could redirected-print the window. -} - -/*! - 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. - - \sa arg(), argn() -*/ -int TQNPInstance::argc() const -{ - return pi->argc; -} - -/*! - Returns the name of the \a{i}-th argument. - - \sa argc(), argv() -*/ -const char* TQNPInstance::argn(int i) const -{ - return pi->argn[i]; -} - -/*! - \preliminary - - This function is \e{not tested}. - - Called whenever a \a url is notified after a call to - NPN_GetURLNotify with \a notifyData. The reason is given in \a r. - - It is an encapsulation of the NPP_URLNotify function of the - Netscape Plugin API. - - See also: - \link http://developer.netscape.com/docs/manuals/communicator/plugin/refpgur.htm#nppurlnotify - Netscape: NPP_URLNotify method\endlink -*/ -void TQNPInstance::notifyURL(const char*, Reason, void*) -{ -} - -/*! - Returns the value of the \a{i}-th argument. - - \as argc(), arg() -*/ -const char* TQNPInstance::argv(int i) const -{ - return pi->argv[i]; -} - -/*! - Returns the mode of the plugin. -*/ -TQNPInstance::InstanceMode TQNPInstance::mode() const -{ - return (TQNPInstance::InstanceMode)pi->fMode; -} - -/*! - Returns the value of the named arguments, or 0 if no argument - called \a name appears in the \c{} tag of this instance. - If the argument appears, but has no value assigned, the empty - string is returned. In summary: - - \table - \header \i Tag \i Result - \row \i \c{} \i arg("FOO") == 0 - \row \i \c{} \i arg("FOO") == "" - \row \i \c{} \i arg("FOO") == "BAR" - \endtable -*/ -const char* TQNPInstance::arg(const char* name) const -{ - for (int i=0; iargc; i++) { - // SGML: names are case insensitive - if ( tqstricmp( name, pi->argn[i] ) == 0 ) { - if (pi->argv[i].isEmpty()) - return ""; - else - return pi->argv[i]; - } - } - return 0; -} - -/*! - Returns the user agent (browser name) containing this instance. -*/ -const char* TQNPInstance::userAgent() const -{ - return NPN_UserAgent(pi->npp); -} - -/*! - \preliminary - - This function is \e{not tested}. - - Requests the creation of a new data stream \e from the plugin. - The MIME type and window are passed in \a mimetype and \a window. - \a as_file holds the \c AsFileOnly flag. It is an interface to the - NPN_NewStream function of the Netscape Plugin API. -*/ -TQNPStream* TQNPInstance::newStream(const char* mimetype, const char* window, - bool as_file) -{ - NPStream* s=0; - NPError err = NPN_NewStream(pi->npp, (char*)mimetype, window, &s); - if (err != NPERR_NO_ERROR) return 0; - return s ? new TQNPStream(this, mimetype, s, as_file) : 0; -} - -/*! - Sets the status message in the browser containing this instance to - \a msg. -*/ -void TQNPInstance::status(const char* msg) -{ - NPN_Status(pi->npp, msg); -} - - -/*! - Returns the Java object associated with the plugin instance, an - object of the \link TQNPlugin::getJavaClass() plugin's Java - class\endlink, 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 \c{jref} we use \c{void*} so as to - avoid burdening plugins which do not require Java. - - \sa TQNPlugin::getJavaClass(), TQNPlugin::getJavaEnv(), getJavaPeer() -*/ -void* TQNPInstance::getJavaPeer() const -{ - return NPN_GetJavaPeer(pi->npp); -} - - -/*! - \class TQNPStream ntqnp.h - \brief The TQNPStream class provides a stream of data provided to a TQNPInstance by the browser. - - \extension Netscape Plugin - - Note that this is neither a TQTextStream nor a TQDataStream. - - \sa TQNPInstance::write(), TQNPInstance::newStreamCreated() -*/ - -/*! - Creates a stream. Plugins should not call this; they should call - TQNPInstance::newStream() if they need a stream. - - Takes a TQNPInstance \a in, MIME type \a mt, a pointer to an - _NPStream \a st and a seekable flag \a se. -*/ -TQNPStream::TQNPStream(TQNPInstance* in,const char* mt, _NPStream* st, bool se) : - inst(in), - stream(st), - mtype(mt), - seek(se) -{ - isokay = TRUE; - iscomplete = FALSE; -} - -/*! - Destroys the stream. -*/ -TQNPStream::~TQNPStream() -{ - if (!qnps_no_call_back) { - qnps_no_call_back++; - NPN_DestroyStream(inst->pi->npp, stream, NPRES_USER_BREAK); - qnps_no_call_back--; - } -} - -/*! - \fn TQNPInstance* TQNPStream::instance() - - Returns the TQNPInstance for which this stream was created. -*/ - -/*! - Returns the URL from which the stream was created. -*/ -const char* TQNPStream::url() const -{ - return stream->url; -} - -/*! - Returns the length of the stream in bytes. The function might - return 0 for streams of unknown length. -*/ -uint TQNPStream::end() const -{ - return stream->end; -} - -/*! - Returns the time when the source of the stream was last modified. -*/ -uint TQNPStream::lastModified() const -{ - return stream->lastmodified; -} - -/*! - Returns the MIME type of the stream. -*/ -const char* TQNPStream::type() const -{ - return mtype; -} - -/*! - Returns TRUE if the stream is seekable; otherwise returns FALSE. -*/ -bool TQNPStream::seekable() const -{ - return seek; -} - -/*! - \internal -*/ -void TQNPStream::setOkay(bool y) -{ - isokay = y; -} - -/*! - \internal -*/ -void TQNPStream::setComplete(bool y) -{ - iscomplete = y; -} - -/*! - Returns TRUE if no errors have occurred on the stream; otherwise - returns FALSE. -*/ -bool TQNPStream::okay() const -{ - return isokay; -} - -/*! - Returns TRUE if the stream has received all the data from the - source; otherwise returns FALSE. -*/ -bool TQNPStream::complete() const -{ - return iscomplete; -} - -/*! - Requests the section of the stream, of \a length bytes from \a - offset, be sent to the TQNPInstance::write() function of the - instance() of this stream. -*/ -void TQNPStream::requestRead(int offset, uint length) -{ - NPByteRange range; - range.offset = offset; - range.length = length; - range.next = 0; // ### Only one supported at this time - NPN_RequestRead(stream, &range); -} - -/*! - Writes \a len bytes from \a buffer \e to the stream. -*/ -int TQNPStream::write( int len, void* buffer ) -{ - return NPN_Write(inst->pi->npp, stream, len, buffer); -} - - - -/****************************************************************************** - * The plugin itself - only one ever exists, created by TQNPlugin::create() - *****************************************************************************/ - - -/*! - \class TQNPlugin ntqnp.h - \brief The TQNPlugin class provides the main factory for plugin objects. - - \extension Netscape Plugin - - This class is the heart of the plugin. One instance of this object - is created when the plugin is \e 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 \e{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! -*/ - -/*! - \fn TQNPlugin* TQNPlugin::create() - - This function must be implemented by your plugin code. It should return a - derived class of TQNPlugin. -*/ - -/*! - Returns the plugin most recently returned by TQNPlugin::create(). -*/ -TQNPlugin* TQNPlugin::actual() -{ - return qNP; -} - -/*! - 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() -{ - // Encourage linker to include stuff. - static void* a; - a = (void*)NP_Initialize; - a = (void*)NP_Shutdown; -} - -/*! - 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() -{ -} - -/*! - Populates \e *\a plugin_major and \e *\a plugin_minor with the - version of the plugin API and populates \e *\a browser_major and - \e *\a browser_minor with the version of the web browser. -*/ -void TQNPlugin::getVersionInfo(int& plugin_major, int& plugin_minor, - int& browser_major, int& browser_minor) -{ - NPN_Version(&plugin_major, &plugin_minor, &browser_major, &browser_minor); -} - -/*! - \fn TQNPInstance* TQNPlugin::newInstance() - - Override this function to return an appropriate derived class of - TQNPInstance. -*/ - -/*! - \fn const char* TQNPlugin::getMIMEDescription() const - - 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: - -\code - 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"; - } -\endcode -*/ - -/*! - \fn const char* TQNPlugin::getPluginNameString() const - - Returns a pointer to the plain-text name of the plugin. -*/ - -/*! - \fn const char* TQNPlugin::getPluginDescriptionString() const - - Returns a pointer to the plain-text description of the plugin. -*/ - -/*! - 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 \c{jref}; we use \c{void*} so as to - avoid burdening plugins which do not require Java. - - \sa getJavaEnv(), TQNPInstance::getJavaPeer() -*/ -void* TQNPlugin::getJavaClass() -{ - return NULL; -} - -/*! - This function is called when the plugin is shutting down. The - function should \e unuse the Java class returned earlier by - getJavaClass(). -*/ -void TQNPlugin::unuseJavaClass() -{ - tqFatal("TQNPlugin::unuseJavaClass() must be overridden along with getJavaClass()"); -} - -/*! - 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 \c{JRIEnv*}; we use \c{void*} so as - to avoid burdening plugins which do not require Java. - - \sa getJavaClass(), TQNPInstance::getJavaPeer() -*/ -void* TQNPlugin::getJavaEnv() const -{ - return NPN_GetJavaEnv(); -} - -#ifdef TQ_WS_X11 - -#include -#include - -// resolve the conflict between X11's FocusIn and TQEvent::FocusIn -const int XFocusOut = FocusOut; -const int XFocusIn = FocusIn; -#undef FocusOut -#undef FocusIn - -const int XKeyPress = KeyPress; -const int XKeyRelease = KeyRelease; -#undef KeyPress -#undef KeyRelease - -Boolean qnpxt_event_dispatcher( XEvent *event ); -static void qnpxt_keep_alive(); -void qnpxt_timeout_handler( XtPointer, XtIntervalId * ); - -class TQNPXtPrivate -{ -public: - TQNPXtPrivate(); - - void hookMeUp(); - void unhook(); - - XtAppContext appContext, ownContext; - TQMemArray dispatchers; - TQWidgetIntDict mapper; - - TQIntDict socknotDict; - uint pending_socknots; - bool activate_timers; - int timerid; - - // arguments for Xt display initialization - const char* applicationClass; - XrmOptionDescRec* options; - int numOptions; -}; -static TQNPXtPrivate *static_d = 0; -static XEvent* last_xevent = 0; - - -bool TQNPXt::redeliverEvent( XEvent *event ) -{ - // redeliver the event to Xt, NOT through TQt - if ( static_d->dispatchers[ event->type ]( event ) ) { - // tqDebug( "Xt: redelivered event" ); - return TRUE; - } - return FALSE; -}; - - -XEvent* TQNPXt::lastEvent() -{ - return last_xevent; -} - - -TQNPXtPrivate::TQNPXtPrivate() - : appContext(NULL), ownContext(NULL), - pending_socknots(0), activate_timers(FALSE), timerid(-1) -{ -} - -void TQNPXtPrivate::hookMeUp() -{ - // worker to plug TQt into Xt (event dispatchers) - // and Xt into TQt (TQNPXtEventLoop) - - // ### TODO extensions? - dispatchers.resize( LASTEvent ); - dispatchers.fill( 0 ); - int et; - for ( et = 2; et < LASTEvent; et++ ) - dispatchers[ et ] = - XtSetEventDispatcher( TQPaintDevice::x11AppDisplay(), - et, ::qnpxt_event_dispatcher ); -} - -void TQNPXtPrivate::unhook() -{ - // unhook TQt from Xt (event dispatchers) - // unhook Xt from TQt? (TQNPXtEventLoop) - - // ### TODO extensions? - int et; - for ( et = 2; et < LASTEvent; et++ ) - (void) XtSetEventDispatcher( TQPaintDevice::x11AppDisplay(), - et, dispatchers[ et ] ); - dispatchers.resize( 0 ); - - /* - We cannot destroy the app context here because it closes the X - display, something TQApplication does as well a bit later. - if ( ownContext ) - XtDestroyApplicationContext( ownContext ); - */ - appContext = ownContext = 0; -} - -extern bool tqt_try_modal( TQWidget *, XEvent * ); // defined in qapplication_x11.cpp -Boolean qnpxt_event_dispatcher( XEvent *event ) -{ - static bool grabbed = FALSE; - - TQApplication::sendPostedEvents(); - - TQWidgetIntDict *mapper = &static_d->mapper; - TQWidget* qnpxt = mapper->find( event->xany.window ); - if ( !qnpxt && TQWidget::find( event->xany.window) == 0 ) { - // event is not for TQt, try Xt - Widget w = XtWindowToWidget( TQPaintDevice::x11AppDisplay(), - event->xany.window ); - while ( w && ! ( qnpxt = mapper->find( XtWindow( w ) ) ) ) { - if ( XtIsShell( w ) ) { - break; - } - w = XtParent( w ); - } - - if ( qnpxt && ( event->type == XKeyPress || - event->type == XKeyRelease ) ) { - // remap key events to keep accelerators working - event->xany.window = qnpxt->winId(); - } - - if ( w ) { - if ( !grabbed && ( event->type == XFocusIn && - event->xfocus.mode == NotifyGrab ) ) { - // tqDebug( "Xt: grab started" ); - grabbed = TRUE; - } else if ( grabbed && ( event->type == XFocusOut && - event->xfocus.mode == NotifyUngrab ) ) { - // tqDebug( "Xt: grab ended" ); - grabbed = FALSE; - } - } - } - - /* - If the mouse has been grabbed for a window that we don't know - about, we shouldn't deliver any pointer events, since this will - intercept the event that ends the mouse grab that Xt/Motif - started. - */ - bool do_deliver = TRUE; - if ( grabbed && ( event->type == ButtonPress || - event->type == ButtonRelease || - event->type == MotionNotify || - event->type == EnterNotify || - event->type == LeaveNotify ) ) - do_deliver = FALSE; - - last_xevent = event; - bool delivered = do_deliver && ( tqApp->x11ProcessEvent( event ) != -1 ); - last_xevent = 0; - if ( qnpxt ) { - switch ( event->type ) { - case EnterNotify: - case LeaveNotify: - event->xcrossing.focus = False; - delivered = FALSE; - break; - case XKeyPress: - case XKeyRelease: - delivered = TRUE; - break; - case XFocusIn: - case XFocusOut: - delivered = FALSE; - break; - default: - delivered = FALSE; - break; - } - } - - qnpxt_keep_alive(); - - if ( delivered ) { - // tqDebug( "TQt: delivered event" ); - return True; - } - - // discard user input events when we have an active popup widget - if ( TQApplication::activePopupWidget() ) { - switch ( event->type ) { - case ButtonPress: // disallow mouse/key events - case ButtonRelease: - case MotionNotify: - case XKeyPress: - case XKeyRelease: - case EnterNotify: - case LeaveNotify: - case ClientMessage: - // tqDebug( "TQt: active popup - discarding event" ); - return True; - - default: - break; - } - } - - if ( TQApplication::activeModalWidget() ) { - if ( qnpxt ) { - // send event through TQt modality handling... - if ( !tqt_try_modal( qnpxt, event ) ) { - // tqDebug( "TQt: active modal widget discarded event" ); - return True; - } - } else if ( !grabbed ) { - // we could have a pure Xt shell as a child of the active - // modal widget - TQWidget *qw = 0; - Widget xw = XtWindowToWidget( TQPaintDevice::x11AppDisplay(), - event->xany.window ); - while ( xw && !( qw = mapper->find( XtWindow( xw ) ) ) ) - xw = XtParent( xw ); - - while ( qw && qw != TQApplication::activeModalWidget() ) - qw = qw->parentWidget(); - - if ( !qw ) { - // event is destined for an Xt widget, but since TQt has an - // active modal widget, we stop here... - switch ( event->type ) { - case ButtonPress: // disallow mouse/key events - case ButtonRelease: - case MotionNotify: - case XKeyPress: - case XKeyRelease: - case EnterNotify: - case LeaveNotify: - case ClientMessage: - // tqDebug( "TQt: active modal widget discarded unknown event" ); - return True; - default: - break; - } - } - } - } - - if ( static_d->dispatchers[ event->type ]( event ) ) { - // tqDebug( "Xt: delivered event" ); - // Xt handled the event. - return True; - } - - return False; -} - - - -TQNPXt::TQNPXt( const char *applicationClass, XtAppContext context, - XrmOptionDescRec *options , int numOptions) -{ -#if defined(QT_CHECK_STATE) - if ( static_d ) - tqWarning( "TQNPXt: should only have one TQNPXt instance!" ); -#endif - - d = static_d = new TQNPXtPrivate; - XtToolkitInitialize(); - if ( context ) - d->appContext = context; - else - d->ownContext = d->appContext = XtCreateApplicationContext(); - - d->applicationClass = applicationClass; - d->options = options; - d->numOptions = numOptions; -} - - -TQNPXt::~TQNPXt() -{ - delete d; - static_d = 0; -} - -XtAppContext TQNPXt::applicationContext() const -{ - return d->appContext; -} - - -void TQNPXt::appStartingUp() -{ - /* - TQApplication could be using a Display from an outside source, so - we should only initialize the display if the current application - context does not contain the TQApplication display - */ - - bool display_found = FALSE; - Display **displays; - Cardinal x, count; - XtGetDisplays( d->appContext, &displays, &count ); - for ( x = 0; x < count && ! display_found; ++x ) { - if ( displays[x] == TQPaintDevice::x11AppDisplay() ) - display_found = TRUE; - } - if ( displays ) - XtFree( (char *) displays ); - - if ( ! display_found ) { - int argc = tqApp->argc(); - XtDisplayInitialize( d->appContext, - TQPaintDevice::x11AppDisplay(), - tqApp->name(), - d->applicationClass, - d->options, - d->numOptions, - &argc, - tqApp->argv() ); - } - - d->hookMeUp(); - - // start a zero-timer to get the timer keep-alive working - d->timerid = XtAppAddTimeOut( d->appContext, 0, qnpxt_timeout_handler, 0 ); -} - -void TQNPXt::appClosingDown() -{ - if ( d->timerid != -1 ) - XtRemoveTimeOut( d->timerid ); - d->timerid = -1; - - d->unhook(); -} - - -void TQNPXt::registerWidget( TQWidget* w ) -{ - if ( !static_d ) - return; - static_d->mapper.insert( w->winId(), w ); -} - - -void TQNPXt::unregisterWidget( TQWidget* w ) -{ - if ( !static_d ) - return; - static_d->mapper.remove( w->winId() ); -} - - -void qnpxt_socknot_handler( XtPointer pointer, int *, XtInputId *id ) -{ - TQNPXt *eventloop = (TQNPXt *) pointer; - TQSocketNotifier *socknot = static_d->socknotDict.find( *id ); - if ( ! socknot ) // this shouldn't happen - return; - eventloop->setSocketNotifierPending( socknot ); - if ( ++static_d->pending_socknots > static_d->socknotDict.count() ) { - /* - We have too many pending socket notifiers. Since Xt prefers - socket notifiers over X events, we should go ahead and - activate all our pending socket notifiers so that the event - loop doesn't freeze up because of this. - */ - eventloop->activateSocketNotifiers(); - static_d->pending_socknots = 0; - } -} - -void TQNPXt::registerSocketNotifier( TQSocketNotifier *notifier ) -{ - XtInputMask mask; - switch ( notifier->type() ) { - case TQSocketNotifier::Read: - mask = XtInputReadMask; - break; - - case TQSocketNotifier::Write: - mask = XtInputWriteMask; - break; - - case TQSocketNotifier::Exception: - mask = XtInputExceptMask; - break; - - default: - tqWarning( "TQNPXtEventLoop: socket notifier has invalid type" ); - return; - } - - XtInputId id = XtAppAddInput( d->appContext, - notifier->socket(), (XtPointer) mask, - qnpxt_socknot_handler, this ); - d->socknotDict.insert( id, notifier ); - - TQEventLoop::registerSocketNotifier( notifier ); -} - -void TQNPXt::unregisterSocketNotifier( TQSocketNotifier *notifier ) -{ - TQIntDictIterator it( d->socknotDict ); - while ( it.current() && notifier != it.current() ) - ++it; - if ( ! it.current() ) { - // this shouldn't happen - tqWarning( "TQNPXtEventLoop: failed to unregister socket notifier" ); - return; - } - - XtRemoveInput( it.currentKey() ); - d->socknotDict.remove( it.currentKey() ); - - TQEventLoop::unregisterSocketNotifier( notifier ); -} - -static void qnpxt_keep_alive() { - // make sure we fire off TQt's timers - int ttw = TQApplication::eventLoop()->timeToWait(); - if ( static_d->timerid != -1 ) - XtRemoveTimeOut( static_d->timerid ); - static_d->timerid = -1; - if ( ttw != -1 ) { - static_d->timerid = - XtAppAddTimeOut( static_d->appContext, ttw, qnpxt_timeout_handler, 0 ); - } -} - -void qnpxt_timeout_handler( XtPointer, XtIntervalId * ) -{ - static_d->timerid = -1; - - if ( ! TQApplication::eventLoop()->loopLevel() ) { - /* - when the TQt eventloop is not running, make sure that TQt - timers still work with an Xt keep-alive timer - */ - TQApplication::eventLoop()->activateTimers(); - static_d->activate_timers = FALSE; - - qnpxt_keep_alive(); - } else { - static_d->activate_timers = TRUE; - } -} - -bool TQNPXt::processEvents( ProcessEventsFlags flags ) -{ - // TQt uses posted events to do lots of delayed operations, like - // repaints... these need to be delivered before we go to sleep - TQApplication::sendPostedEvents(); - - bool canWait = ( flags & WaitForMore ); - - qnpxt_keep_alive(); - - // get the pending event mask from Xt and process the next event - XtInputMask pendingmask = XtAppPending( d->appContext ); - XtInputMask mask = pendingmask; - if ( pendingmask & XtIMTimer ) { - mask &= ~XtIMTimer; - // zero timers will starve the Xt X event dispatcher... so - // process something *instead* of a timer first... - if ( mask != 0 ) - XtAppProcessEvent( d->appContext, mask ); - // and process a timer afterwards - mask = pendingmask & XtIMTimer; - } - - if ( canWait ) - XtAppProcessEvent( d->appContext, XtIMAll ); - else - XtAppProcessEvent( d->appContext, mask ); - - int nevents = 0; - if ( ! ( flags & ExcludeSocketNotifiers ) ) { - nevents += activateSocketNotifiers(); - d->pending_socknots = 0; - } - - if ( d->activate_timers ) { - nevents += activateTimers(); - } - d->activate_timers = FALSE; - - return ( canWait || ( pendingmask != 0 ) || nevents > 0 ); -} - - -#endif // TQ_WS_X11 diff --git a/extensions/nsplugin/src/qnp.pro b/extensions/nsplugin/src/qnp.pro deleted file mode 100644 index 60cc240e8..000000000 --- a/extensions/nsplugin/src/qnp.pro +++ /dev/null @@ -1,14 +0,0 @@ -TEMPLATE = lib -TARGET = qnp - -CONFIG -= dll -CONFIG += qt x11 release staticlib -DESTDIR = ../../../lib -VERSION = 0.4 - -SOURCES = qnp.cpp -unix:HEADERS += ntqnp.h -win32:HEADERS = ../../../include/ntqnp.h -win32:LIBS += -lqtmain -MOC_DIR = . -DESTINCDIR = ../../../include diff --git a/extensions/nsplugin/src/tqnp.cpp b/extensions/nsplugin/src/tqnp.cpp new file mode 100644 index 000000000..cd373ad45 --- /dev/null +++ b/extensions/nsplugin/src/tqnp.cpp @@ -0,0 +1,2071 @@ +/**************************************************************************** +** +** Implementation of TQt extension classes for Netscape Plugin support. +** +** Created : 970601 +** +** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. +** +** This file is part of the TQt GUI Toolkit. +** +** This file may be used under the terms of the GNU General +** Public License versions 2.0 or 3.0 as published by the Free +** Software Foundation and appearing in the files LICENSE.GPL2 +** and LICENSE.GPL3 included in the packaging of this file. +** Alternatively you may (at your option) use any later version +** of the GNU General Public License if such license has been +** publicly approved by Trolltech ASA (or its successors, if any) +** and the KDE Free TQt Foundation. +** +** Please review the following information to ensure GNU General +** Public Licensing requirements will be met: +** http://trolltech.com/products/qt/licenses/licensing/opensource/. +** If you are unsure which license is appropriate for your use, please +** review the following information: +** http://trolltech.com/products/qt/licenses/licensing/licensingoverview +** or contact the sales department at sales@trolltech.com. +** +** This file may be used under the terms of the Q Public License as +** defined by Trolltech ASA and appearing in the file LICENSE.TQPL +** included in the packaging of this file. Licensees holding valid TQt +** Commercial licenses may use this file in accordance with the TQt +** Commercial License Agreement provided with the Software. +** +** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, +** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted +** herein. +** +**********************************************************************/ + + +// Remaining TQ_WS_X11 considerations: +// - What if !piApp upon NPP_NewStream? Are we safe? +// - Yes, but users need to know of this: that no GUI can be +// done until after setWindow is called. +// - Use NPN_GetValue in Communicator4.0 to get the display earlier! +// - For ClientMessage events, trap them, and if they are not for us, +// untrap them and retransmit them and set a timer to retrap them +// after N seconds. + +// Remaining TQ_WS_WIN considerations: +// - we need to activateZeroTimers() at some time. +// - we need to call winEventFilter on events +// - timers: +// if ( msg.message == WM_TIMER ) { // timer message received +// activateTimer( msg.wParam ); +// return TRUE; +// } +// if ( msg.message == WM_KEYDOWN || msg.message == WM_KEYUP ) { +// if ( translateKeyCode(msg.wParam) == 0 ) { +// TranslateMessage( &msg ); // translate to WM_CHAR +// return TRUE; +// } +// } +// - qWinProcessConfigRequests? + +// Remaining general stuff: +// - Provide the "reason" parameter to streamDestroyed + +// TQt stuff +#include +#include +#include +#include +#include +#include +#include +#include + +#include "tqnp.h" + +#include // Must be here for Borland C++ +#include +#include +#include +#include + +#ifdef TQ_WS_X11 +#include + +class TQNPXtPrivate; + +class TQNPXt : public TQEventLoop +{ +public: + TQNPXt( const char *applicationClass, XtAppContext context = NULL, XrmOptionDescRec *options = 0, int numOptions = 0); + ~TQNPXt(); + + XtAppContext applicationContext() const; + + void registerSocketNotifier( TQSocketNotifier * ); + void unregisterSocketNotifier( TQSocketNotifier * ); + + static void registerWidget( TQWidget* ); + static void unregisterWidget( TQWidget* ); + static bool redeliverEvent( XEvent *event ); + static XEvent* lastEvent(); + +protected: + bool processEvents( ProcessEventsFlags flags ); + +private: + void appStartingUp(); + void appClosingDown(); + TQNPXtPrivate *d; + +}; + +#define GC GC_QQQ +#endif + +extern "C" { +// +// Netscape plugin API +// +#ifdef TQ_WS_WIN +#ifndef _WINDOWS +#define _WINDOWS +#endif +#endif +#ifdef TQ_WS_X11 +#define XP_UNIX +#endif + + +// This is to allow mingw support on windows without altering the sun header files +#if defined(Q_CC_GNU) && defined(TQ_WS_WIN) && !defined(_MSC_VER) +#define _MSC_VER 1 +#include "npapi.h" +#undef _MSC_VER +#else +#include "npapi.h" +#endif + +#ifdef TQ_WS_X11 +#undef XP_UNIX +#include "npunix.c" +#endif + +// +// Stuff for the NPP_SetWindow function: +// +#ifdef TQ_WS_X11 +#include +#include +#include // for XtCreateWindow +#include +#include +#include +#include +//#include +#endif +#ifdef TQ_WS_WIN +#include +#endif +} + +#ifdef TQ_WS_WIN +#include "npwin.cpp" +#endif + +static TQEventLoop* event_loop = 0; +static TQApplication* application = 0; + +struct _NPInstance +{ + uint16 fMode; + +#ifdef TQ_WS_WIN + HWND window; +#endif + + NPP npp; + +#ifdef TQ_WS_X11 + Window window; + Display *display; +#endif + + uint32 x, y; + uint32 width, height; + + TQNPWidget* widget; + TQNPInstance* instance; + + int16 argc; + TQString *argn; + TQString *argv; +}; + + + +// The single global plugin +static TQNPlugin *qNP=0; +static int instance_count=0; + +// Temporary parameter passed `around the side' of calls to user functions +static _NPInstance* next_pi=0; + +// To avoid looping when browser OR plugin can delete streams +static int qnps_no_call_back = 0; + +#ifdef TQ_WS_WIN +// defined in qapplication_win.cpp +TQ_EXPORT extern bool qt_win_use_simple_timers; +TQ_EXPORT void qWinProcessConfigRequests(); +static HHOOK hhook = 0; + +LRESULT CALLBACK FilterProc( int nCode, WPARAM wParam, LPARAM lParam ) +{ + if ( tqApp ) { + tqApp->sendPostedEvents(); + tqApp->eventLoop()->activateSocketNotifiers(); + qWinProcessConfigRequests(); + } + + return CallNextHookEx( hhook, nCode, wParam, lParam ); +} + +#endif + +#ifdef TQ_WS_X11 +static int (*original_x_errhandler)( Display *dpy, XErrorEvent * ) = 0; +static int dummy_x_errhandler( Display *, XErrorEvent * ) +{ + return 0; +} +#endif + +/****************************************************************************** + * Plug-in Calls - these are called by Netscape + *****************************************************************************/ + + +// Instance state information about the plugin. + +#ifdef TQ_WS_X11 + +extern "C" char* +NPP_GetMIMEDescription(void) +{ + if (!qNP) qNP = TQNPlugin::create(); + return (char*)qNP->getMIMEDescription(); +} + + + +extern "C" NPError +NPP_GetValue(void * /*future*/, NPPVariable variable, void *value) +{ + if (!qNP) qNP = TQNPlugin::create(); + NPError err = NPERR_NO_ERROR; + if (variable == NPPVpluginNameString) + *((const char **)value) = qNP->getPluginNameString(); + else if (variable == NPPVpluginDescriptionString) + *((const char **)value) = qNP->getPluginDescriptionString(); + else + err = NPERR_GENERIC_ERROR; + + return err; +} + +#endif + +/* +** NPP_Initialize is called when your DLL is being loaded to do any +** DLL-specific initialization. +*/ +extern "C" NPError +NPP_Initialize(void) +{ +#ifdef TQ_WS_WIN + qt_win_use_simple_timers = TRUE; + // Nothing more - we do it in DLLMain +#endif + + if (!qNP) qNP = TQNPlugin::create(); + return NPERR_NO_ERROR; +} + +static jref plugin_java_class = 0; + +/* +** NPP_GetJavaClass is called during initialization to ask your plugin +** what its associated Java class is. If you don't have one, just return +** NULL. Otherwise, use the javah-generated "use_" function to both +** initialize your class and return it. If you can't find your class, an +** error will be signalled by "use_" and will cause the Navigator to +** complain to the user. +*/ +extern "C" jref +NPP_GetJavaClass(void) +{ + if (!qNP) qNP = TQNPlugin::create(); + plugin_java_class = (jref)qNP->getJavaClass(); + return plugin_java_class; +} + +/* +** NPP_Shutdown is called when your DLL is being unloaded to do any +** DLL-specific shut-down. You should be a good citizen and declare that +** you're not using your java class any more. This allows java to unload +** it, freeing up memory. +*/ +extern "C" void +NPP_Shutdown(void) +{ + if (qNP) { + if (plugin_java_class) + qNP->unuseJavaClass(); + delete qNP; + qNP = 0; + } + +#ifdef TQ_WS_X11 + if ( original_x_errhandler ) + XSetErrorHandler( original_x_errhandler ); +#endif + if ( tqApp) { +#ifdef TQ_WS_WIN32 + if ( hhook ) + UnhookWindowsHookEx( hhook ); + hhook = 0; +#endif + delete application; + delete event_loop; + } + +} + + +struct NS_Private { + uchar* a; + uchar* b; +}; + +/* +** NPP_New is called when your plugin is instantiated (i.e. when an EMBED +** tag appears on a page). +*/ +extern "C" NPError +NPP_New(NPMIMEType /*pluginType*/, + NPP instance, + uint16 mode, + int16 argc, + char* argn[], + char* argv[], + NPSavedData* /*saved*/) +{ + NPError result = NPERR_NO_ERROR; + _NPInstance* This; + + if (instance == NULL) + return NPERR_INVALID_INSTANCE_ERROR; + + instance->pdata = new _NPInstance; + + This = (_NPInstance*) instance->pdata; + + if (This == NULL) + return NPERR_OUT_OF_MEMORY_ERROR; + + This->npp = instance; + + /* mode is NP_EMBED, NP_FULL, or NP_BACKGROUND (see npapi.h) */ + This->fMode = mode; + + This->window = 0; + This->widget = 0; + + This->argc = argc; + This->argn = new TQString[argc+1]; + This->argv = new TQString[argc+1]; + for (int i=0; iargc; i++) { + This->argn[i] = argn[i]; + This->argv[i] = argv[i]; + } + + // Everything is set up - we can let TQNPInstance be created now. + next_pi = This; + qNP->newInstance(); + instance_count++; + + return result; +} + +extern "C" NPError +NPP_Destroy(NPP instance, NPSavedData** /*save*/) +{ + _NPInstance* This; + + if (instance == NULL) + return NPERR_INVALID_INSTANCE_ERROR; + + This = (_NPInstance*) instance->pdata; + + if (This != NULL) { + delete This->widget; + delete This->instance; + delete [] This->argn; + delete [] This->argv; + + delete This; + instance->pdata = NULL; + + instance_count--; + } + + return NPERR_NO_ERROR; +} + +extern "C" NPError +NPP_SetWindow(NPP instance, NPWindow* window) +{ + if (!qNP) qNP = TQNPlugin::create(); + NPError result = NPERR_NO_ERROR; + _NPInstance* This; + + if (instance == NULL) + return NPERR_INVALID_INSTANCE_ERROR; + + This = (_NPInstance*) instance->pdata; + + + // take a shortcut if all that was changed is the geometry + if ( This->widget && window +#ifdef TQ_WS_X11 + && This->window == (Window) window->window +#endif +#ifdef TQ_WS_WIN + && This->window == (HWND) window->window +#endif + ) { + This->x = window->x; + This->y = window->y; + This->width = window->width; + This->height = window->height; + This->widget->resize( This->width, This->height ); + return result; + } + + delete This->widget; + + if ( !window ) + return result; + +#ifdef TQ_WS_X11 + This->window = (Window) window->window; + This->display = + ((NPSetWindowCallbackStruct *)window->ws_info)->display; +#endif +#ifdef TQ_WS_WIN + This->window = (HWND) window->window; +#endif + + This->x = window->x; + This->y = window->y; + This->width = window->width; + This->height = window->height; + + + if (!tqApp) { +#ifdef TQ_WS_X11 + // We are the first TQt-based plugin to arrive + event_loop = new TQNPXt( "qnp", XtDisplayToApplicationContext(This->display) ); + application = new TQApplication(This->display); +#endif +#ifdef TQ_WS_WIN + static int argc=0; + static char **argv={ 0 }; + application = new TQApplication( argc, argv ); +#ifdef UNICODE + if ( qWinVersion() & TQt::WV_NT_based ) + hhook = SetWindowsHookExW( WH_GETMESSAGE, FilterProc, 0, GetCurrentThreadId() ); + else +#endif + hhook = SetWindowsHookExA( WH_GETMESSAGE, FilterProc, 0, GetCurrentThreadId() ); +#endif + } + +#ifdef TQ_WS_X11 + if ( !original_x_errhandler ) + original_x_errhandler = XSetErrorHandler( dummy_x_errhandler ); +#endif + + // New widget on this new window. + next_pi = This; + /* This->widget = */ // (happens sooner - in TQNPWidget constructor) + This->instance->newWindow(); + + if ( !This->widget ) + return result; + +#ifdef TQ_WS_X11 + This->widget->resize( This->width, This->height ); + XReparentWindow( This->widget->x11Display(), This->widget->winId(), This->window, 0, 0 ); + XSync( This->widget->x11Display(), False ); +#endif +#ifdef TQ_WS_WIN + LONG oldLong = GetWindowLong(This->window, GWL_STYLE); + ::SetWindowLong(This->window, GWL_STYLE, oldLong | WS_CLIPCHILDREN | WS_CLIPSIBLINGS); + ::SetWindowLong( This->widget->winId(), GWL_STYLE, WS_CHILD | WS_CLIPCHILDREN | WS_CLIPSIBLINGS ); + ::SetParent( This->widget->winId(), This->window ); + This->widget->raise(); + This->widget->setGeometry( 0, 0, This->width, This->height ); +#endif + This->widget->show(); + return result; +} + + +extern "C" NPError +NPP_NewStream(NPP instance, + NPMIMEType type, + NPStream *stream, + NPBool seekable, + uint16 *stype) +{ + _NPInstance* This; + + if (instance == NULL) + return NPERR_INVALID_INSTANCE_ERROR; + + This = (_NPInstance*) instance->pdata; + + if ( This ) { + TQNPStream* qnps = new TQNPStream(This->instance,type,stream,seekable); + stream->pdata = qnps; + TQNPInstance::StreamMode sm = (TQNPInstance::StreamMode)*stype; + if (!This->instance->newStreamCreated(qnps, sm)) { + return NPERR_GENERIC_ERROR; + } + *stype = sm; + } + + return NPERR_NO_ERROR; +} + + +int32 STREAMBUFSIZE = 0X0FFFFFFF; /* If we are reading from a file in NPAsFile + * mode so we can take any size stream in our + * write call (since we ignore it) */ + +extern "C" int32 +NPP_WriteReady(NPP instance, NPStream *stream) +{ + _NPInstance* This; + if (instance != NULL) { + This = (_NPInstance*) instance->pdata; + } else { + // Yikes, that's unusual! + return 0; + } + + if (This) { + return This->instance->writeReady((TQNPStream*)stream->pdata); + } + + /* Number of bytes ready to accept in NPP_Write() */ + return STREAMBUFSIZE; +} + + +extern "C" int32 +NPP_Write(NPP instance, NPStream *stream, int32 offset, int32 len, void *buffer) +{ + if (instance != NULL) + { + _NPInstance* This = (_NPInstance*) instance->pdata; + + if (This) { + return This->instance->write((TQNPStream*)stream->pdata, + offset, len, buffer); + } + } + + return len; /* The number of bytes accepted */ +} + + +extern "C" NPError +NPP_DestroyStream(NPP instance, NPStream *stream, NPError reason) +{ + _NPInstance* This; + + if (instance == NULL) + return NPERR_INVALID_INSTANCE_ERROR; + + if (!qnps_no_call_back) { + This = (_NPInstance*) instance->pdata; + + TQNPStream* qnps = (TQNPStream*)stream->pdata; + if ( qnps ) + switch (reason) { + case NPRES_DONE: + qnps->setComplete(TRUE); + break; + case NPRES_USER_BREAK: + break; + case NPRES_NETWORK_ERR: + qnps->setOkay(FALSE); + break; + } + + if (This) { + // Give the instance a chance to do something + This->instance->streamDestroyed(qnps); + } + + qnps_no_call_back++; + delete qnps; + qnps_no_call_back--; + } + + return NPERR_NO_ERROR; +} + + +extern "C" void +NPP_StreamAsFile(NPP instance, NPStream *stream, const char* fname) +{ + _NPInstance* This; + + if (instance == NULL) return; + + This = (_NPInstance*) instance->pdata; + + if ( This ) { + TQNPStream* qnps = (TQNPStream*)stream->pdata; + This->instance->streamAsFile(qnps, fname); + } +} + +typedef struct +{ + int32 type; + FILE* fp; +} NPPrintCallbackStruct; + +#ifdef TQ_WS_X11 + +class TQNPPrinter : public TQPrinter { + TQFile file; +public: + TQNPPrinter(FILE* fp) + { + file.open(IO_WriteOnly, fp); + TQPDevCmdParam param; + param.device = &file; + cmd(PdcSetdev, 0, ¶m); + } + void end() + { + TQPDevCmdParam param; + param.device = 0; + cmd(PdcSetdev, 0, ¶m); + } +}; +#endif + +extern "C" void +NPP_Print(NPP instance, NPPrint* printInfo) +{ + if(printInfo == NULL) + return; + + if (instance != NULL) { + _NPInstance* This = (_NPInstance*) instance->pdata; + + if (printInfo->mode == NP_FULL) { + printInfo->print.fullPrint.pluginPrinted = + This->instance->printFullPage(); + } else if (printInfo->mode == NP_EMBED) { +#ifdef TQ_WS_X11 + void* platformPrint = + printInfo->print.embedPrint.platformPrint; + FILE* outfile = ((NPPrintCallbackStruct*)platformPrint)->fp; + if (ftell(outfile)) { +// NPWindow* w = +// &(printInfo->print.embedPrint.window); + TQNPPrinter prn(outfile); + TQPainter painter(&prn); + // #### config viewport with w->{x,y,width,height} + This->instance->print(&painter); + prn.end(); + } else { + // Why does the browser make spurious NPP_Print calls? + } +#endif +#ifdef TQ_WS_WIN + NPWindow* printWindow = + &(printInfo->print.embedPrint.window); + void* platformPrint = + printInfo->print.embedPrint.platformPrint; + // #### Nothing yet. +#endif + } + } +} + +extern "C" void +NPP_URLNotify(NPP instance, + const char* url, + NPReason reason, + void* notifyData) +{ + if (instance != NULL) { + TQNPInstance::Reason r; + switch (reason) { + case NPRES_DONE: + r = TQNPInstance::ReasonDone; + break; + case NPRES_USER_BREAK: + r = TQNPInstance::ReasonBreak; + break; + case NPRES_NETWORK_ERR: + r = TQNPInstance::ReasonError; + break; + default: + r = TQNPInstance::ReasonUnknown; + break; + } + _NPInstance* This = (_NPInstance*) instance->pdata; + This->instance->notifyURL(url, r, notifyData); + } +} + + + +#ifdef TQ_WS_WIN + +BOOL WINAPI DllMain (HANDLE hInst, + ULONG ul_reason_for_call, + LPVOID lpReserved) +{ + return TRUE; +} + +#endif + + + +/*! + \class TQNPWidget tqnp.h + \brief The TQNPWidget class provides a TQWidget that is a web browser plugin window. + + \extension Netscape Plugin + + 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 \e child of a + plugin widget to use it as a browser plugin. The technique is: + +\code +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()); + } +}; +\endcode + + The default implementation is an empty window. +*/ + +/*! + Creates a TQNPWidget. +*/ +TQNPWidget::TQNPWidget() : + pi(next_pi) +{ + if (!next_pi) { + tqFatal("TQNPWidget must only be created within call to newWindow"); + } + next_pi->widget = this; + next_pi = 0; + +#ifdef TQ_WS_WIN + clearWFlags( WStyle_NormalBorder | WStyle_Title | WStyle_MinMax | WStyle_SysMenu ); + topData()->ftop = 0; + topData()->fright = 0; + topData()->fleft = 0; + topData()->fbottom = 0; +#endif +} + +/*! + Destroys the window. This will be called by the plugin binding + code when the window is no longer required. 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. +*/ +TQNPWidget::~TQNPWidget() +{ +#ifdef TQ_WS_X11 + destroy( FALSE, FALSE ); // X has destroyed all windows +#endif +} + + +/*!\internal */ +void TQNPWidget::enterEvent(TQEvent*) +{ + enterInstance(); +} + +/*!\internal */ +void TQNPWidget:: leaveEvent(TQEvent*) +{ + if ( !TQApplication::activePopupWidget() ) + leaveInstance(); +} + +/*! + Called when the mouse enters the plugin window. Does nothing by + default. +*/ +void TQNPWidget::enterInstance() +{ +} + +/*! + Called when the mouse leaves the plugin window. Does nothing by + default. +*/ +void TQNPWidget::leaveInstance() +{ +} + +/*! + Returns the instance for which this widget is the plugin window. +*/ +TQNPInstance* TQNPWidget::instance() +{ + return pi->instance; +} + + + + + +/*! + \class TQNPInstance tqnp.h + \brief The TQNPInstance class provides a TQObject that is a web browser plugin. + + \extension Netscape Plugin + + Deriving from TQNPInstance creates an object that represents a + single \c{} tag in an HTML document. + + The TQNPInstance is responsible for creating an appropriate + TQNPWidget window if required (not all plugins have windows), and + for interacting with the input/output facilities intrinsic to + plugins. + + Note that there is \e{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 \c{} tag has a SRC parameter). + + \e{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 \e 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. +*/ + +/*! + \enum TQNPInstance::InstanceMode + + This enum type provides TQt-style names for three #defines in + \c npapi.h: + + \value Embed - corresponds to NP_EMBED + \value Full - corresponds to NP_FULL + \value Background - corresponds to NP_BACKGROUND + +*/ + +/*! + \enum TQNPInstance::Reason + + \value ReasonDone + \value ReasonBreak + \value ReasonError + \value ReasonUnknown +*/ + +/*! + \enum TQNPInstance::StreamMode + + \value Normal + \value Seek + \value AsFile + \value AsFileOnly +*/ + +/*! + Creates a TQNPInstance. + + Can only be called from within a derived class created within + TQNPlugin::newInstance(). +*/ +TQNPInstance::TQNPInstance() : + pi(next_pi) +{ + if (!next_pi) { + tqFatal("TQNPInstance must only be created within call to newInstance"); + } + next_pi->instance = this; + next_pi = 0; +} + +/*! + Called when the plugin instance is about to be deleted. +*/ +TQNPInstance::~TQNPInstance() +{ +} + +/*! + Called at most once, at some time after the TQNPInstance is + created. If the plugin requires a window, this function should + return a derived class of TQNPWidget that provides the required + interface. +*/ +TQNPWidget* TQNPInstance::newWindow() +{ + // No window by default + next_pi = 0; + return 0; +} + +/*! + Returns the plugin window created by newWindow(), if any. +*/ +TQNPWidget* TQNPInstance::widget() +{ + return pi->widget; +} + +/*! + \fn bool TQNPInstance::newStreamCreated(TQNPStream*, StreamMode& smode) + + 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 requires the stream as a file, it should + set \a smode to \c 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 \c AsFileOnly method is not supported by Netscape + 2.0 and MSIE 3.0. + + The default implementation accepts any stream. +*/ +bool TQNPInstance::newStreamCreated(TQNPStream*, StreamMode&) +{ + return TRUE; +} + +/*! + Called when a stream is delivered as a single file called \a fname + rather than as chunks. This may be simpler for a plugin to deal + with, but precludes any incremental behavior. + + Note that the \c AsFileOnly method is not supported by Netscape + 2.0 and MSIE 3.0. + + \sa newStreamCreated(), newStream() +*/ +void TQNPInstance::streamAsFile(TQNPStream*, const char* fname) +{ +} + +/*! + 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. +*/ +void TQNPInstance::streamDestroyed(TQNPStream*) +{ +} + +/*! + Returns the minimum amount of data the instance is willing to + receive from the given stream. + + The default returns a very large value. +*/ +int TQNPInstance::writeReady(TQNPStream*) +{ + // Yes, we can handle any amount of data at once. + return 0X0FFFFFFF; +} + +/*! + \fn int TQNPInstance::write(TQNPStream*, int offset, int len, void* buffer) + + Called when incoming data is available for processing by the + instance. The instance \e 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 \a len. \a buffer is the data + available for consumption. The \a 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. +*/ +int TQNPInstance::write(TQNPStream*, int, int len, void*) +{ + // Yes, we processed it all... into the bit bucket. + return len; +} + +/*! + Requests that the \a url be retrieved and sent to the named \a + window. See Netscape's JavaScript documentation for an explanation + of window names. +*/ +void TQNPInstance::getURL(const char* url, const char* window) +{ + NPN_GetURL( pi->npp, url, window ); +} + +/*! + \preliminary + + This function is \e{not tested}. + + It is an interface to the NPN_PostURL function of the Netscape + Plugin API. + + Passes \a url, \a window, \a buf, \a len, and \a file to + NPN_PostURL. +*/ +void TQNPInstance::postURL(const char* url, const char* window, + uint len, const char* buf, bool file) +{ + NPN_PostURL( pi->npp, url, window, len, buf, file ); +} + +/*! + Requests that the given \a url be retrieved and sent to + the named \a window. See Netscape's JavaScript documentation for + an explanation of window names. Passes the arguments including \a + data to NPN_GetURLNotify. + + \sa + \link http://developer.netscape.com/docs/manuals/communicator/plugin/refpgur.htm#npngeturlnotify + Netscape: NPN_GetURLNotify method\endlink +*/ +void TQNPInstance::getURLNotify(const char* url, const char* window, void*data) +{ +#ifdef TQ_WS_WIN // Only on Windows? + NPN_GetURLNotify( pi->npp, url, window, data ); +#else + Q_UNUSED( url ); + Q_UNUSED( window ); + Q_UNUSED( data ); +#endif +} + +/*! + \preliminary + + This function is \e{not tested}. + + It is an encapsulation of the NPP_Print function of the Netscape + Plugin API. +*/ +bool TQNPInstance::printFullPage() +{ + return FALSE; +} + +/*! + \preliminary + + This function is \e{not tested}. + + Print the instance embedded in a page. + + It is an encapsulation of the NPP_Print function of the Netscape + Plugin API. +*/ +void TQNPInstance::print(TQPainter*) +{ + // ### default could redirected-print the window. +} + +/*! + 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. + + \sa arg(), argn() +*/ +int TQNPInstance::argc() const +{ + return pi->argc; +} + +/*! + Returns the name of the \a{i}-th argument. + + \sa argc(), argv() +*/ +const char* TQNPInstance::argn(int i) const +{ + return pi->argn[i]; +} + +/*! + \preliminary + + This function is \e{not tested}. + + Called whenever a \a url is notified after a call to + NPN_GetURLNotify with \a notifyData. The reason is given in \a r. + + It is an encapsulation of the NPP_URLNotify function of the + Netscape Plugin API. + + See also: + \link http://developer.netscape.com/docs/manuals/communicator/plugin/refpgur.htm#nppurlnotify + Netscape: NPP_URLNotify method\endlink +*/ +void TQNPInstance::notifyURL(const char*, Reason, void*) +{ +} + +/*! + Returns the value of the \a{i}-th argument. + + \as argc(), arg() +*/ +const char* TQNPInstance::argv(int i) const +{ + return pi->argv[i]; +} + +/*! + Returns the mode of the plugin. +*/ +TQNPInstance::InstanceMode TQNPInstance::mode() const +{ + return (TQNPInstance::InstanceMode)pi->fMode; +} + +/*! + Returns the value of the named arguments, or 0 if no argument + called \a name appears in the \c{} tag of this instance. + If the argument appears, but has no value assigned, the empty + string is returned. In summary: + + \table + \header \i Tag \i Result + \row \i \c{} \i arg("FOO") == 0 + \row \i \c{} \i arg("FOO") == "" + \row \i \c{} \i arg("FOO") == "BAR" + \endtable +*/ +const char* TQNPInstance::arg(const char* name) const +{ + for (int i=0; iargc; i++) { + // SGML: names are case insensitive + if ( tqstricmp( name, pi->argn[i] ) == 0 ) { + if (pi->argv[i].isEmpty()) + return ""; + else + return pi->argv[i]; + } + } + return 0; +} + +/*! + Returns the user agent (browser name) containing this instance. +*/ +const char* TQNPInstance::userAgent() const +{ + return NPN_UserAgent(pi->npp); +} + +/*! + \preliminary + + This function is \e{not tested}. + + Requests the creation of a new data stream \e from the plugin. + The MIME type and window are passed in \a mimetype and \a window. + \a as_file holds the \c AsFileOnly flag. It is an interface to the + NPN_NewStream function of the Netscape Plugin API. +*/ +TQNPStream* TQNPInstance::newStream(const char* mimetype, const char* window, + bool as_file) +{ + NPStream* s=0; + NPError err = NPN_NewStream(pi->npp, (char*)mimetype, window, &s); + if (err != NPERR_NO_ERROR) return 0; + return s ? new TQNPStream(this, mimetype, s, as_file) : 0; +} + +/*! + Sets the status message in the browser containing this instance to + \a msg. +*/ +void TQNPInstance::status(const char* msg) +{ + NPN_Status(pi->npp, msg); +} + + +/*! + Returns the Java object associated with the plugin instance, an + object of the \link TQNPlugin::getJavaClass() plugin's Java + class\endlink, 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 \c{jref} we use \c{void*} so as to + avoid burdening plugins which do not require Java. + + \sa TQNPlugin::getJavaClass(), TQNPlugin::getJavaEnv(), getJavaPeer() +*/ +void* TQNPInstance::getJavaPeer() const +{ + return NPN_GetJavaPeer(pi->npp); +} + + +/*! + \class TQNPStream tqnp.h + \brief The TQNPStream class provides a stream of data provided to a TQNPInstance by the browser. + + \extension Netscape Plugin + + Note that this is neither a TQTextStream nor a TQDataStream. + + \sa TQNPInstance::write(), TQNPInstance::newStreamCreated() +*/ + +/*! + Creates a stream. Plugins should not call this; they should call + TQNPInstance::newStream() if they need a stream. + + Takes a TQNPInstance \a in, MIME type \a mt, a pointer to an + _NPStream \a st and a seekable flag \a se. +*/ +TQNPStream::TQNPStream(TQNPInstance* in,const char* mt, _NPStream* st, bool se) : + inst(in), + stream(st), + mtype(mt), + seek(se) +{ + isokay = TRUE; + iscomplete = FALSE; +} + +/*! + Destroys the stream. +*/ +TQNPStream::~TQNPStream() +{ + if (!qnps_no_call_back) { + qnps_no_call_back++; + NPN_DestroyStream(inst->pi->npp, stream, NPRES_USER_BREAK); + qnps_no_call_back--; + } +} + +/*! + \fn TQNPInstance* TQNPStream::instance() + + Returns the TQNPInstance for which this stream was created. +*/ + +/*! + Returns the URL from which the stream was created. +*/ +const char* TQNPStream::url() const +{ + return stream->url; +} + +/*! + Returns the length of the stream in bytes. The function might + return 0 for streams of unknown length. +*/ +uint TQNPStream::end() const +{ + return stream->end; +} + +/*! + Returns the time when the source of the stream was last modified. +*/ +uint TQNPStream::lastModified() const +{ + return stream->lastmodified; +} + +/*! + Returns the MIME type of the stream. +*/ +const char* TQNPStream::type() const +{ + return mtype; +} + +/*! + Returns TRUE if the stream is seekable; otherwise returns FALSE. +*/ +bool TQNPStream::seekable() const +{ + return seek; +} + +/*! + \internal +*/ +void TQNPStream::setOkay(bool y) +{ + isokay = y; +} + +/*! + \internal +*/ +void TQNPStream::setComplete(bool y) +{ + iscomplete = y; +} + +/*! + Returns TRUE if no errors have occurred on the stream; otherwise + returns FALSE. +*/ +bool TQNPStream::okay() const +{ + return isokay; +} + +/*! + Returns TRUE if the stream has received all the data from the + source; otherwise returns FALSE. +*/ +bool TQNPStream::complete() const +{ + return iscomplete; +} + +/*! + Requests the section of the stream, of \a length bytes from \a + offset, be sent to the TQNPInstance::write() function of the + instance() of this stream. +*/ +void TQNPStream::requestRead(int offset, uint length) +{ + NPByteRange range; + range.offset = offset; + range.length = length; + range.next = 0; // ### Only one supported at this time + NPN_RequestRead(stream, &range); +} + +/*! + Writes \a len bytes from \a buffer \e to the stream. +*/ +int TQNPStream::write( int len, void* buffer ) +{ + return NPN_Write(inst->pi->npp, stream, len, buffer); +} + + + +/****************************************************************************** + * The plugin itself - only one ever exists, created by TQNPlugin::create() + *****************************************************************************/ + + +/*! + \class TQNPlugin tqnp.h + \brief The TQNPlugin class provides the main factory for plugin objects. + + \extension Netscape Plugin + + This class is the heart of the plugin. One instance of this object + is created when the plugin is \e 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 \e{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! +*/ + +/*! + \fn TQNPlugin* TQNPlugin::create() + + This function must be implemented by your plugin code. It should return a + derived class of TQNPlugin. +*/ + +/*! + Returns the plugin most recently returned by TQNPlugin::create(). +*/ +TQNPlugin* TQNPlugin::actual() +{ + return qNP; +} + +/*! + 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() +{ + // Encourage linker to include stuff. + static void* a; + a = (void*)NP_Initialize; + a = (void*)NP_Shutdown; +} + +/*! + 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() +{ +} + +/*! + Populates \e *\a plugin_major and \e *\a plugin_minor with the + version of the plugin API and populates \e *\a browser_major and + \e *\a browser_minor with the version of the web browser. +*/ +void TQNPlugin::getVersionInfo(int& plugin_major, int& plugin_minor, + int& browser_major, int& browser_minor) +{ + NPN_Version(&plugin_major, &plugin_minor, &browser_major, &browser_minor); +} + +/*! + \fn TQNPInstance* TQNPlugin::newInstance() + + Override this function to return an appropriate derived class of + TQNPInstance. +*/ + +/*! + \fn const char* TQNPlugin::getMIMEDescription() const + + 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: + +\code + 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"; + } +\endcode +*/ + +/*! + \fn const char* TQNPlugin::getPluginNameString() const + + Returns a pointer to the plain-text name of the plugin. +*/ + +/*! + \fn const char* TQNPlugin::getPluginDescriptionString() const + + Returns a pointer to the plain-text description of the plugin. +*/ + +/*! + 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 \c{jref}; we use \c{void*} so as to + avoid burdening plugins which do not require Java. + + \sa getJavaEnv(), TQNPInstance::getJavaPeer() +*/ +void* TQNPlugin::getJavaClass() +{ + return NULL; +} + +/*! + This function is called when the plugin is shutting down. The + function should \e unuse the Java class returned earlier by + getJavaClass(). +*/ +void TQNPlugin::unuseJavaClass() +{ + tqFatal("TQNPlugin::unuseJavaClass() must be overridden along with getJavaClass()"); +} + +/*! + 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 \c{JRIEnv*}; we use \c{void*} so as + to avoid burdening plugins which do not require Java. + + \sa getJavaClass(), TQNPInstance::getJavaPeer() +*/ +void* TQNPlugin::getJavaEnv() const +{ + return NPN_GetJavaEnv(); +} + +#ifdef TQ_WS_X11 + +#include +#include + +// resolve the conflict between X11's FocusIn and TQEvent::FocusIn +const int XFocusOut = FocusOut; +const int XFocusIn = FocusIn; +#undef FocusOut +#undef FocusIn + +const int XKeyPress = KeyPress; +const int XKeyRelease = KeyRelease; +#undef KeyPress +#undef KeyRelease + +Boolean qnpxt_event_dispatcher( XEvent *event ); +static void qnpxt_keep_alive(); +void qnpxt_timeout_handler( XtPointer, XtIntervalId * ); + +class TQNPXtPrivate +{ +public: + TQNPXtPrivate(); + + void hookMeUp(); + void unhook(); + + XtAppContext appContext, ownContext; + TQMemArray dispatchers; + TQWidgetIntDict mapper; + + TQIntDict socknotDict; + uint pending_socknots; + bool activate_timers; + int timerid; + + // arguments for Xt display initialization + const char* applicationClass; + XrmOptionDescRec* options; + int numOptions; +}; +static TQNPXtPrivate *static_d = 0; +static XEvent* last_xevent = 0; + + +bool TQNPXt::redeliverEvent( XEvent *event ) +{ + // redeliver the event to Xt, NOT through TQt + if ( static_d->dispatchers[ event->type ]( event ) ) { + // tqDebug( "Xt: redelivered event" ); + return TRUE; + } + return FALSE; +}; + + +XEvent* TQNPXt::lastEvent() +{ + return last_xevent; +} + + +TQNPXtPrivate::TQNPXtPrivate() + : appContext(NULL), ownContext(NULL), + pending_socknots(0), activate_timers(FALSE), timerid(-1) +{ +} + +void TQNPXtPrivate::hookMeUp() +{ + // worker to plug TQt into Xt (event dispatchers) + // and Xt into TQt (TQNPXtEventLoop) + + // ### TODO extensions? + dispatchers.resize( LASTEvent ); + dispatchers.fill( 0 ); + int et; + for ( et = 2; et < LASTEvent; et++ ) + dispatchers[ et ] = + XtSetEventDispatcher( TQPaintDevice::x11AppDisplay(), + et, ::qnpxt_event_dispatcher ); +} + +void TQNPXtPrivate::unhook() +{ + // unhook TQt from Xt (event dispatchers) + // unhook Xt from TQt? (TQNPXtEventLoop) + + // ### TODO extensions? + int et; + for ( et = 2; et < LASTEvent; et++ ) + (void) XtSetEventDispatcher( TQPaintDevice::x11AppDisplay(), + et, dispatchers[ et ] ); + dispatchers.resize( 0 ); + + /* + We cannot destroy the app context here because it closes the X + display, something TQApplication does as well a bit later. + if ( ownContext ) + XtDestroyApplicationContext( ownContext ); + */ + appContext = ownContext = 0; +} + +extern bool tqt_try_modal( TQWidget *, XEvent * ); // defined in qapplication_x11.cpp +Boolean qnpxt_event_dispatcher( XEvent *event ) +{ + static bool grabbed = FALSE; + + TQApplication::sendPostedEvents(); + + TQWidgetIntDict *mapper = &static_d->mapper; + TQWidget* qnpxt = mapper->find( event->xany.window ); + if ( !qnpxt && TQWidget::find( event->xany.window) == 0 ) { + // event is not for TQt, try Xt + Widget w = XtWindowToWidget( TQPaintDevice::x11AppDisplay(), + event->xany.window ); + while ( w && ! ( qnpxt = mapper->find( XtWindow( w ) ) ) ) { + if ( XtIsShell( w ) ) { + break; + } + w = XtParent( w ); + } + + if ( qnpxt && ( event->type == XKeyPress || + event->type == XKeyRelease ) ) { + // remap key events to keep accelerators working + event->xany.window = qnpxt->winId(); + } + + if ( w ) { + if ( !grabbed && ( event->type == XFocusIn && + event->xfocus.mode == NotifyGrab ) ) { + // tqDebug( "Xt: grab started" ); + grabbed = TRUE; + } else if ( grabbed && ( event->type == XFocusOut && + event->xfocus.mode == NotifyUngrab ) ) { + // tqDebug( "Xt: grab ended" ); + grabbed = FALSE; + } + } + } + + /* + If the mouse has been grabbed for a window that we don't know + about, we shouldn't deliver any pointer events, since this will + intercept the event that ends the mouse grab that Xt/Motif + started. + */ + bool do_deliver = TRUE; + if ( grabbed && ( event->type == ButtonPress || + event->type == ButtonRelease || + event->type == MotionNotify || + event->type == EnterNotify || + event->type == LeaveNotify ) ) + do_deliver = FALSE; + + last_xevent = event; + bool delivered = do_deliver && ( tqApp->x11ProcessEvent( event ) != -1 ); + last_xevent = 0; + if ( qnpxt ) { + switch ( event->type ) { + case EnterNotify: + case LeaveNotify: + event->xcrossing.focus = False; + delivered = FALSE; + break; + case XKeyPress: + case XKeyRelease: + delivered = TRUE; + break; + case XFocusIn: + case XFocusOut: + delivered = FALSE; + break; + default: + delivered = FALSE; + break; + } + } + + qnpxt_keep_alive(); + + if ( delivered ) { + // tqDebug( "TQt: delivered event" ); + return True; + } + + // discard user input events when we have an active popup widget + if ( TQApplication::activePopupWidget() ) { + switch ( event->type ) { + case ButtonPress: // disallow mouse/key events + case ButtonRelease: + case MotionNotify: + case XKeyPress: + case XKeyRelease: + case EnterNotify: + case LeaveNotify: + case ClientMessage: + // tqDebug( "TQt: active popup - discarding event" ); + return True; + + default: + break; + } + } + + if ( TQApplication::activeModalWidget() ) { + if ( qnpxt ) { + // send event through TQt modality handling... + if ( !tqt_try_modal( qnpxt, event ) ) { + // tqDebug( "TQt: active modal widget discarded event" ); + return True; + } + } else if ( !grabbed ) { + // we could have a pure Xt shell as a child of the active + // modal widget + TQWidget *qw = 0; + Widget xw = XtWindowToWidget( TQPaintDevice::x11AppDisplay(), + event->xany.window ); + while ( xw && !( qw = mapper->find( XtWindow( xw ) ) ) ) + xw = XtParent( xw ); + + while ( qw && qw != TQApplication::activeModalWidget() ) + qw = qw->parentWidget(); + + if ( !qw ) { + // event is destined for an Xt widget, but since TQt has an + // active modal widget, we stop here... + switch ( event->type ) { + case ButtonPress: // disallow mouse/key events + case ButtonRelease: + case MotionNotify: + case XKeyPress: + case XKeyRelease: + case EnterNotify: + case LeaveNotify: + case ClientMessage: + // tqDebug( "TQt: active modal widget discarded unknown event" ); + return True; + default: + break; + } + } + } + } + + if ( static_d->dispatchers[ event->type ]( event ) ) { + // tqDebug( "Xt: delivered event" ); + // Xt handled the event. + return True; + } + + return False; +} + + + +TQNPXt::TQNPXt( const char *applicationClass, XtAppContext context, + XrmOptionDescRec *options , int numOptions) +{ +#if defined(QT_CHECK_STATE) + if ( static_d ) + tqWarning( "TQNPXt: should only have one TQNPXt instance!" ); +#endif + + d = static_d = new TQNPXtPrivate; + XtToolkitInitialize(); + if ( context ) + d->appContext = context; + else + d->ownContext = d->appContext = XtCreateApplicationContext(); + + d->applicationClass = applicationClass; + d->options = options; + d->numOptions = numOptions; +} + + +TQNPXt::~TQNPXt() +{ + delete d; + static_d = 0; +} + +XtAppContext TQNPXt::applicationContext() const +{ + return d->appContext; +} + + +void TQNPXt::appStartingUp() +{ + /* + TQApplication could be using a Display from an outside source, so + we should only initialize the display if the current application + context does not contain the TQApplication display + */ + + bool display_found = FALSE; + Display **displays; + Cardinal x, count; + XtGetDisplays( d->appContext, &displays, &count ); + for ( x = 0; x < count && ! display_found; ++x ) { + if ( displays[x] == TQPaintDevice::x11AppDisplay() ) + display_found = TRUE; + } + if ( displays ) + XtFree( (char *) displays ); + + if ( ! display_found ) { + int argc = tqApp->argc(); + XtDisplayInitialize( d->appContext, + TQPaintDevice::x11AppDisplay(), + tqApp->name(), + d->applicationClass, + d->options, + d->numOptions, + &argc, + tqApp->argv() ); + } + + d->hookMeUp(); + + // start a zero-timer to get the timer keep-alive working + d->timerid = XtAppAddTimeOut( d->appContext, 0, qnpxt_timeout_handler, 0 ); +} + +void TQNPXt::appClosingDown() +{ + if ( d->timerid != -1 ) + XtRemoveTimeOut( d->timerid ); + d->timerid = -1; + + d->unhook(); +} + + +void TQNPXt::registerWidget( TQWidget* w ) +{ + if ( !static_d ) + return; + static_d->mapper.insert( w->winId(), w ); +} + + +void TQNPXt::unregisterWidget( TQWidget* w ) +{ + if ( !static_d ) + return; + static_d->mapper.remove( w->winId() ); +} + + +void qnpxt_socknot_handler( XtPointer pointer, int *, XtInputId *id ) +{ + TQNPXt *eventloop = (TQNPXt *) pointer; + TQSocketNotifier *socknot = static_d->socknotDict.find( *id ); + if ( ! socknot ) // this shouldn't happen + return; + eventloop->setSocketNotifierPending( socknot ); + if ( ++static_d->pending_socknots > static_d->socknotDict.count() ) { + /* + We have too many pending socket notifiers. Since Xt prefers + socket notifiers over X events, we should go ahead and + activate all our pending socket notifiers so that the event + loop doesn't freeze up because of this. + */ + eventloop->activateSocketNotifiers(); + static_d->pending_socknots = 0; + } +} + +void TQNPXt::registerSocketNotifier( TQSocketNotifier *notifier ) +{ + XtInputMask mask; + switch ( notifier->type() ) { + case TQSocketNotifier::Read: + mask = XtInputReadMask; + break; + + case TQSocketNotifier::Write: + mask = XtInputWriteMask; + break; + + case TQSocketNotifier::Exception: + mask = XtInputExceptMask; + break; + + default: + tqWarning( "TQNPXtEventLoop: socket notifier has invalid type" ); + return; + } + + XtInputId id = XtAppAddInput( d->appContext, + notifier->socket(), (XtPointer) mask, + qnpxt_socknot_handler, this ); + d->socknotDict.insert( id, notifier ); + + TQEventLoop::registerSocketNotifier( notifier ); +} + +void TQNPXt::unregisterSocketNotifier( TQSocketNotifier *notifier ) +{ + TQIntDictIterator it( d->socknotDict ); + while ( it.current() && notifier != it.current() ) + ++it; + if ( ! it.current() ) { + // this shouldn't happen + tqWarning( "TQNPXtEventLoop: failed to unregister socket notifier" ); + return; + } + + XtRemoveInput( it.currentKey() ); + d->socknotDict.remove( it.currentKey() ); + + TQEventLoop::unregisterSocketNotifier( notifier ); +} + +static void qnpxt_keep_alive() { + // make sure we fire off TQt's timers + int ttw = TQApplication::eventLoop()->timeToWait(); + if ( static_d->timerid != -1 ) + XtRemoveTimeOut( static_d->timerid ); + static_d->timerid = -1; + if ( ttw != -1 ) { + static_d->timerid = + XtAppAddTimeOut( static_d->appContext, ttw, qnpxt_timeout_handler, 0 ); + } +} + +void qnpxt_timeout_handler( XtPointer, XtIntervalId * ) +{ + static_d->timerid = -1; + + if ( ! TQApplication::eventLoop()->loopLevel() ) { + /* + when the TQt eventloop is not running, make sure that TQt + timers still work with an Xt keep-alive timer + */ + TQApplication::eventLoop()->activateTimers(); + static_d->activate_timers = FALSE; + + qnpxt_keep_alive(); + } else { + static_d->activate_timers = TRUE; + } +} + +bool TQNPXt::processEvents( ProcessEventsFlags flags ) +{ + // TQt uses posted events to do lots of delayed operations, like + // repaints... these need to be delivered before we go to sleep + TQApplication::sendPostedEvents(); + + bool canWait = ( flags & WaitForMore ); + + qnpxt_keep_alive(); + + // get the pending event mask from Xt and process the next event + XtInputMask pendingmask = XtAppPending( d->appContext ); + XtInputMask mask = pendingmask; + if ( pendingmask & XtIMTimer ) { + mask &= ~XtIMTimer; + // zero timers will starve the Xt X event dispatcher... so + // process something *instead* of a timer first... + if ( mask != 0 ) + XtAppProcessEvent( d->appContext, mask ); + // and process a timer afterwards + mask = pendingmask & XtIMTimer; + } + + if ( canWait ) + XtAppProcessEvent( d->appContext, XtIMAll ); + else + XtAppProcessEvent( d->appContext, mask ); + + int nevents = 0; + if ( ! ( flags & ExcludeSocketNotifiers ) ) { + nevents += activateSocketNotifiers(); + d->pending_socknots = 0; + } + + if ( d->activate_timers ) { + nevents += activateTimers(); + } + d->activate_timers = FALSE; + + return ( canWait || ( pendingmask != 0 ) || nevents > 0 ); +} + + +#endif // TQ_WS_X11 diff --git a/extensions/nsplugin/src/tqnp.h b/extensions/nsplugin/src/tqnp.h new file mode 100644 index 000000000..3451afbb9 --- /dev/null +++ b/extensions/nsplugin/src/tqnp.h @@ -0,0 +1,186 @@ +/**************************************************************************** +** +** Definition of TQt extension classes for Netscape Plugin support. +** +** Created : 970601 +** +** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. +** +** This file is part of the TQt GUI Toolkit. +** +** This file may be used under the terms of the GNU General +** Public License versions 2.0 or 3.0 as published by the Free +** Software Foundation and appearing in the files LICENSE.GPL2 +** and LICENSE.GPL3 included in the packaging of this file. +** Alternatively you may (at your option) use any later version +** of the GNU General Public License if such license has been +** publicly approved by Trolltech ASA (or its successors, if any) +** and the KDE Free TQt Foundation. +** +** Please review the following information to ensure GNU General +** Public Licensing requirements will be met: +** http://trolltech.com/products/qt/licenses/licensing/opensource/. +** If you are unsure which license is appropriate for your use, please +** review the following information: +** http://trolltech.com/products/qt/licenses/licensing/licensingoverview +** or contact the sales department at sales@trolltech.com. +** +** This file may be used under the terms of the Q Public License as +** defined by Trolltech ASA and appearing in the file LICENSE.TQPL +** included in the packaging of this file. Licensees holding valid TQt +** Commercial licenses may use this file in accordance with the TQt +** Commercial License Agreement provided with the Software. +** +** This file is provided "AS IS" with NO 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 "tqwidget.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 { + TQ_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 { + TQ_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 diff --git a/extensions/nsplugin/src/tqnp.pro b/extensions/nsplugin/src/tqnp.pro new file mode 100644 index 000000000..e2d3047cf --- /dev/null +++ b/extensions/nsplugin/src/tqnp.pro @@ -0,0 +1,14 @@ +TEMPLATE = lib +TARGET = tqnp + +CONFIG -= dll +CONFIG += qt x11 release staticlib +DESTDIR = ../../../lib +VERSION = 0.4 + +SOURCES = tqnp.cpp +unix:HEADERS += tqnp.h +win32:HEADERS = ../../../include/tqnp.h +win32:LIBS += -lqtmain +MOC_DIR = . +DESTINCDIR = ../../../include diff --git a/include/ntqmessagebox.h b/include/ntqmessagebox.h deleted file mode 120000 index 7b8a51a7e..000000000 --- a/include/ntqmessagebox.h +++ /dev/null @@ -1 +0,0 @@ -../src/dialogs/ntqmessagebox.h \ No newline at end of file diff --git a/include/ntqmetaobject.h b/include/ntqmetaobject.h deleted file mode 120000 index 58dca63fe..000000000 --- a/include/ntqmetaobject.h +++ /dev/null @@ -1 +0,0 @@ -../src/kernel/ntqmetaobject.h \ No newline at end of file diff --git a/include/ntqmngio.h b/include/ntqmngio.h deleted file mode 120000 index 7ec33e6d9..000000000 --- a/include/ntqmngio.h +++ /dev/null @@ -1 +0,0 @@ -../src/kernel/ntqmngio.h \ No newline at end of file diff --git a/include/ntqnamespace.h b/include/ntqnamespace.h deleted file mode 120000 index fc7379b3e..000000000 --- a/include/ntqnamespace.h +++ /dev/null @@ -1 +0,0 @@ -../src/kernel/ntqnamespace.h \ No newline at end of file diff --git a/include/ntqnp.h b/include/ntqnp.h deleted file mode 120000 index eedb4e037..000000000 --- a/include/ntqnp.h +++ /dev/null @@ -1 +0,0 @@ -../extensions/nsplugin/src/ntqnp.h \ No newline at end of file diff --git a/include/ntqpolygonscanner.h b/include/ntqpolygonscanner.h deleted file mode 120000 index a398a55e1..000000000 --- a/include/ntqpolygonscanner.h +++ /dev/null @@ -1 +0,0 @@ -../src/kernel/ntqpolygonscanner.h \ No newline at end of file diff --git a/include/ntqprintdialog.h b/include/ntqprintdialog.h deleted file mode 120000 index c6bf774d5..000000000 --- a/include/ntqprintdialog.h +++ /dev/null @@ -1 +0,0 @@ -../src/dialogs/ntqprintdialog.h \ No newline at end of file diff --git a/include/ntqrangecontrol.h b/include/ntqrangecontrol.h deleted file mode 120000 index d37f0a8f9..000000000 --- a/include/ntqrangecontrol.h +++ /dev/null @@ -1 +0,0 @@ -../src/widgets/ntqrangecontrol.h \ No newline at end of file diff --git a/include/tqmessagebox.h b/include/tqmessagebox.h new file mode 120000 index 000000000..40f8a381c --- /dev/null +++ b/include/tqmessagebox.h @@ -0,0 +1 @@ +../src/dialogs/tqmessagebox.h \ No newline at end of file diff --git a/include/tqmetaobject.h b/include/tqmetaobject.h new file mode 120000 index 000000000..4fc5b0ce0 --- /dev/null +++ b/include/tqmetaobject.h @@ -0,0 +1 @@ +../src/kernel/tqmetaobject.h \ No newline at end of file diff --git a/include/tqmngio.h b/include/tqmngio.h new file mode 120000 index 000000000..0820dba82 --- /dev/null +++ b/include/tqmngio.h @@ -0,0 +1 @@ +../src/kernel/tqmngio.h \ No newline at end of file diff --git a/include/tqnamespace.h b/include/tqnamespace.h new file mode 120000 index 000000000..447cfed04 --- /dev/null +++ b/include/tqnamespace.h @@ -0,0 +1 @@ +../src/kernel/tqnamespace.h \ No newline at end of file diff --git a/include/tqnp.h b/include/tqnp.h new file mode 120000 index 000000000..bf3f2dc0b --- /dev/null +++ b/include/tqnp.h @@ -0,0 +1 @@ +../extensions/nsplugin/src/tqnp.h \ No newline at end of file diff --git a/include/tqpolygonscanner.h b/include/tqpolygonscanner.h new file mode 120000 index 000000000..1db806136 --- /dev/null +++ b/include/tqpolygonscanner.h @@ -0,0 +1 @@ +../src/kernel/tqpolygonscanner.h \ No newline at end of file diff --git a/include/tqprintdialog.h b/include/tqprintdialog.h new file mode 120000 index 000000000..f808b73a8 --- /dev/null +++ b/include/tqprintdialog.h @@ -0,0 +1 @@ +../src/dialogs/tqprintdialog.h \ No newline at end of file diff --git a/include/tqrangecontrol.h b/include/tqrangecontrol.h new file mode 120000 index 000000000..fb334df8e --- /dev/null +++ b/include/tqrangecontrol.h @@ -0,0 +1 @@ +../src/widgets/tqrangecontrol.h \ No newline at end of file diff --git a/plugins/src/accessible/widgets/tqaccessiblewidget.cpp b/plugins/src/accessible/widgets/tqaccessiblewidget.cpp index 99310dd89..2aedf5468 100644 --- a/plugins/src/accessible/widgets/tqaccessiblewidget.cpp +++ b/plugins/src/accessible/widgets/tqaccessiblewidget.cpp @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/plugins/src/imageformats/mng/main.cpp b/plugins/src/imageformats/mng/main.cpp index c26729873..dee984499 100644 --- a/plugins/src/imageformats/mng/main.cpp +++ b/plugins/src/imageformats/mng/main.cpp @@ -5,7 +5,7 @@ #ifdef TQT_NO_IMAGEIO_MNG #undef TQT_NO_IMAGEIO_MNG #endif -#include "../../../../src/kernel/qmngio.cpp" +#include "../../../../src/kernel/tqmngio.cpp" class MNGFormat : public TQImageFormatPlugin { diff --git a/plugins/src/imageformats/mng/mng.pro b/plugins/src/imageformats/mng/mng.pro index 2c39f9412..60049351b 100644 --- a/plugins/src/imageformats/mng/mng.pro +++ b/plugins/src/imageformats/mng/mng.pro @@ -1,5 +1,5 @@ TEMPLATE = lib -TARGET += qmng +TARGET += tqmng CONFIG += qt plugin DESTDIR = ../../../imageformats diff --git a/plugins/src/inputmethods/imsw-multi/qmultiinputcontext.h b/plugins/src/inputmethods/imsw-multi/qmultiinputcontext.h index 04f1c988c..aaf16506b 100644 --- a/plugins/src/inputmethods/imsw-multi/qmultiinputcontext.h +++ b/plugins/src/inputmethods/imsw-multi/qmultiinputcontext.h @@ -45,7 +45,7 @@ #ifndef TQT_NO_IM -#include +#include #include #include #include diff --git a/plugins/src/inputmethods/simple/composetable.cpp b/plugins/src/inputmethods/simple/composetable.cpp index 0a0552124..99a3e0ae7 100644 --- a/plugins/src/inputmethods/simple/composetable.cpp +++ b/plugins/src/inputmethods/simple/composetable.cpp @@ -51,7 +51,7 @@ #include "qsimpleinputcontext.h" -#include +#include static const TQComposeTableElement defaultTable[] = { // /* broken */ { {0x0000, 0x0000, 0, 0, 0, 0}, 0x1eda }, // U1EDA # LATIN CAPITAL LETTER O WITH HORN AND ACUTE diff --git a/plugins/src/inputmethods/simple/qsimpleinputcontext.cpp b/plugins/src/inputmethods/simple/qsimpleinputcontext.cpp index ea5e71beb..6088eeaca 100644 --- a/plugins/src/inputmethods/simple/qsimpleinputcontext.cpp +++ b/plugins/src/inputmethods/simple/qsimpleinputcontext.cpp @@ -42,7 +42,7 @@ #include "qsimpleinputcontext.h" -#include +#include #include #include #include diff --git a/plugins/src/inputmethods/simple/qsimpleinputcontext.h b/plugins/src/inputmethods/simple/qsimpleinputcontext.h index 8935fd6fe..fb3faaefe 100644 --- a/plugins/src/inputmethods/simple/qsimpleinputcontext.h +++ b/plugins/src/inputmethods/simple/qsimpleinputcontext.h @@ -44,7 +44,7 @@ #define TQSIMPLEINPUT_CONTEXT_H #include -#include +#include #define QT_KEYSEQUENCE_MAX_LEN 6 #define UNITIZE(tqkey) (0x02000000|tqkey) diff --git a/qmake/main.cpp b/qmake/main.cpp index d11e30531..b96d330d5 100644 --- a/qmake/main.cpp +++ b/qmake/main.cpp @@ -40,7 +40,7 @@ #include "property.h" #include "option.h" #include "makefile.h" -#include +#include #include #include #include diff --git a/src/canvas/tqcanvas.cpp b/src/canvas/tqcanvas.cpp index 2e0afadb2..2958a50f2 100644 --- a/src/canvas/tqcanvas.cpp +++ b/src/canvas/tqcanvas.cpp @@ -45,7 +45,7 @@ #include "tqimage.h" #include "tqptrdict.h" #include "tqpainter.h" -#include "ntqpolygonscanner.h" +#include "tqpolygonscanner.h" #include "tqtimer.h" #include "ntqtl.h" diff --git a/src/codecs/tqtextcodec.cpp b/src/codecs/tqtextcodec.cpp index ac22ea7f1..6c495df8f 100644 --- a/src/codecs/tqtextcodec.cpp +++ b/src/codecs/tqtextcodec.cpp @@ -51,7 +51,7 @@ #include "tqvaluelist.h" #include "tqtextcodecfactory.h" #include "tqutfcodec.h" -#include "ntqnamespace.h" +#include "tqnamespace.h" #ifndef TQT_NO_CODECS #include "tqhebrewcodec.h" #include "tqtsciicodec.h" diff --git a/src/dialogs/ntqmessagebox.h b/src/dialogs/ntqmessagebox.h deleted file mode 100644 index abaf25761..000000000 --- a/src/dialogs/ntqmessagebox.h +++ /dev/null @@ -1,223 +0,0 @@ -/**************************************************************************** -** -** Definition of TQMessageBox class -** -** Created : 950503 -** -** Copyright (C) 1992-2008 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 files LICENSE.GPL2 -** and LICENSE.GPL3 included in the packaging of this file. -** Alternatively you may (at your option) use any later version -** of the GNU General Public License if such license has been -** publicly approved by Trolltech ASA (or its successors, if any) -** and the KDE Free TQt Foundation. -** -** Please review the following information to ensure GNU General -** Public Licensing requirements will be met: -** http://trolltech.com/products/qt/licenses/licensing/opensource/. -** If you are unsure which license is appropriate for your use, please -** review the following information: -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview -** or contact the sales department at sales@trolltech.com. -** -** This file may be used under the terms of the Q Public License as -** defined by Trolltech ASA and appearing in the file LICENSE.TQPL -** included in the packaging of this file. Licensees holding valid TQt -** Commercial licenses may use this file in accordance with the TQt -** Commercial License Agreement provided with the Software. -** -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted -** herein. -** -**********************************************************************/ - -#ifndef TQMESSAGEBOX_H -#define TQMESSAGEBOX_H - -#ifndef QT_H -#include "tqdialog.h" -#endif // QT_H - -#ifndef TQT_NO_MESSAGEBOX - -class TQLabel; -class TQPushButton; -struct TQMessageBoxData; - -class TQ_EXPORT TQMessageBox : public TQDialog -{ - TQ_OBJECT - TQ_ENUMS( Icon ) - TQ_PROPERTY( TQString text READ text WRITE setText ) - TQ_PROPERTY( Icon icon READ icon WRITE setIcon ) - TQ_PROPERTY( TQPixmap iconPixmap READ iconPixmap WRITE setIconPixmap ) - TQ_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(TQ_DISABLE_COPY) - TQMessageBox( const TQMessageBox & ); - TQMessageBox &operator=( const TQMessageBox & ); -#endif -}; - -/* -* Macro to be used at the beginning of main(), e.g. -* -* #include -* #include -* int main( int argc, char**argv ) -* { -* QT_REQUIRE_VERSION( argc, argv, "3.0.5" ) -* ... -* } -*/ -#define QT_REQUIRE_VERSION( argc, argv, str ) { TQString s=TQString::fromLatin1(str);\ -TQString sq=TQString::fromLatin1(tqVersion()); 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 ( !tqApp){ int c=0; new \ -TQApplication(argc,argv);} TQString s = TQApplication::tr("Executable '%1' requires TQt "\ - "%2, found TQt %3.").arg(TQString::fromLatin1(tqAppName())).arg(TQString::fromLatin1(\ -str)).arg(TQString::fromLatin1(tqVersion()) ); TQMessageBox::critical( 0, TQApplication::tr(\ -"Incompatible TQt Library Error" ), s, TQMessageBox::Abort,0 ); tqFatal(s.ascii()); }} - - -#endif // TQT_NO_MESSAGEBOX - -#endif // TQMESSAGEBOX_H diff --git a/src/dialogs/ntqprintdialog.h b/src/dialogs/ntqprintdialog.h deleted file mode 100644 index 29824416a..000000000 --- a/src/dialogs/ntqprintdialog.h +++ /dev/null @@ -1,103 +0,0 @@ -/**************************************************************************** -** -** Definition of print dialog. -** -** Created : 950829 -** -** Copyright (C) 1992-2008 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 files LICENSE.GPL2 -** and LICENSE.GPL3 included in the packaging of this file. -** Alternatively you may (at your option) use any later version -** of the GNU General Public License if such license has been -** publicly approved by Trolltech ASA (or its successors, if any) -** and the KDE Free TQt Foundation. -** -** Please review the following information to ensure GNU General -** Public Licensing requirements will be met: -** http://trolltech.com/products/qt/licenses/licensing/opensource/. -** If you are unsure which license is appropriate for your use, please -** review the following information: -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview -** or contact the sales department at sales@trolltech.com. -** -** This file may be used under the terms of the Q Public License as -** defined by Trolltech ASA and appearing in the file LICENSE.TQPL -** included in the packaging of this file. Licensees holding valid TQt -** Commercial licenses may use this file in accordance with the TQt -** Commercial License Agreement provided with the Software. -** -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted -** herein. -** -**********************************************************************/ - -#ifndef TQPRINTDIALOG_H -#define TQPRINTDIALOG_H - -#ifndef QT_H -#include "tqdialog.h" -#endif // QT_H - -#ifndef TQT_NO_PRINTDIALOG - -class TQGroupBox; -class TQPrintDialogPrivate; -class TQListView; - -class TQ_EXPORT TQPrintDialog : public TQDialog -{ - TQ_OBJECT -public: - TQPrintDialog( TQPrinter *, TQWidget* parent=0, const char* name=0 ); - ~TQPrintDialog(); - - static bool getPrinterSetup( TQPrinter *, TQWidget* = 0 ); - static void setGlobalPrintDialog( TQPrintDialog * ); - - void setPrinter( TQPrinter *, bool = FALSE ); - TQPrinter * printer() const; - - void addButton( TQPushButton *but ); - -private slots: - void browseClicked(); - void okClicked(); - - void printerOrFileSelected( int ); - void landscapeSelected( int ); - void paperSizeSelected( int ); - void orientSelected( int ); - void pageOrderSelected( int ); - void colorModeSelected( int ); - void setNumCopies( int ); - void printRangeSelected( int ); - void setFirstPage( int ); - void setLastPage( int ); - - void fileNameEditChanged( const TQString &text ); - -private: - TQPrintDialogPrivate *d; - - TQGroupBox * setupDestination(); - TQGroupBox * setupOptions(); - TQGroupBox * setupPaper(); - TQGroupBox * setupPrinterSettings(); - -private: // Disabled copy constructor and operator= -#if defined(TQ_DISABLE_COPY) - TQPrintDialog( const TQPrintDialog & ); - TQPrintDialog &operator=( const TQPrintDialog & ); -#endif -}; - -#endif - -#endif // TQPRINTDIALOG_H diff --git a/src/dialogs/qmessagebox.cpp b/src/dialogs/qmessagebox.cpp deleted file mode 100644 index 381a9f4f0..000000000 --- a/src/dialogs/qmessagebox.cpp +++ /dev/null @@ -1,1664 +0,0 @@ -/**************************************************************************** -** -** Implementation of TQMessageBox class -** -** Created : 950503 -** -** Copyright (C) 1992-2008 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 files LICENSE.GPL2 -** and LICENSE.GPL3 included in the packaging of this file. -** Alternatively you may (at your option) use any later version -** of the GNU General Public License if such license has been -** publicly approved by Trolltech ASA (or its successors, if any) -** and the KDE Free TQt Foundation. -** -** Please review the following information to ensure GNU General -** Public Licensing requirements will be met: -** http://trolltech.com/products/qt/licenses/licensing/opensource/. -** If you are unsure which license is appropriate for your use, please -** review the following information: -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview -** or contact the sales department at sales@trolltech.com. -** -** This file may be used under the terms of the Q Public License as -** defined by Trolltech ASA and appearing in the file LICENSE.TQPL -** included in the packaging of this file. Licensees holding valid TQt -** Commercial licenses may use this file in accordance with the TQt -** Commercial License Agreement provided with the Software. -** -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted -** herein. -** -**********************************************************************/ - -#include "ntqmessagebox.h" - -#ifndef TQT_NO_MESSAGEBOX - -#include "tqaccel.h" -#include "tqlabel.h" -#include "tqpushbutton.h" -#include "tqimage.h" -#include "ntqapplication.h" -#include "tqstyle.h" -#include "tqobjectlist.h" -#if defined(QT_ACCESSIBILITY_SUPPORT) -#include "tqaccessible.h" -#endif - -#ifdef TQ_WS_X11 -#include "private/tqttdeintegration_x11_p.h" -#endif - -extern bool tqt_use_native_dialogs; - -// Internal class - don't touch - -class TQMessageBoxLabel : public TQLabel -{ - TQ_OBJECT -public: - TQMessageBoxLabel( TQWidget* parent ) : TQLabel( parent, "messageBoxText") - { - setAlignment( AlignAuto|ExpandTabs ); - } -}; -#include "qmessagebox.moc" - - - -// the TQt logo, for aboutTQt -/* XPM */ -static const char * const qtlogo_xpm[] = { -/* width height ncolors chars_per_pixel */ -"50 50 17 1", -/* colors */ -" c #000000", -". c #495808", -"X c #2A3304", -"o c #242B04", -"O c #030401", -"+ c #9EC011", -"@ c #93B310", -"# c #748E0C", -"$ c #A2C511", -"% c #8BA90E", -"& c #99BA10", -"* c #060701", -"= c #181D02", -"- c #212804", -"; c #61770A", -": c #0B0D01", -"/ c None", -/* pixels */ -"/$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$/", -"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$", -"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$", -"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$", -"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$", -"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$", -"$$$$$$$$$$$$$$$$$$$$$$$+++$$$$$$$$$$$$$$$$$$$$$$$$", -"$$$$$$$$$$$$$$$$$$$@;.o=::=o.;@$$$$$$$$$$$$$$$$$$$", -"$$$$$$$$$$$$$$$$+#X* **X#+$$$$$$$$$$$$$$$$", -"$$$$$$$$$$$$$$$#oO* O **o#+$$$$$$$$$$$$$$", -"$$$$$$$$$$$$$&.* OO O*.&$$$$$$$$$$$$$", -"$$$$$$$$$$$$@XOO * OO X&$$$$$$$$$$$$", -"$$$$$$$$$$$@XO OO O **:::OOO OOO X@$$$$$$$$$$$", -"$$$$$$$$$$&XO O-;#@++@%.oOO X&$$$$$$$$$$", -"$$$$$$$$$$.O : *-#+$$$$$$$$+#- : O O*.$$$$$$$$$$", -"$$$$$$$$$#*OO O*.&$$$$$$$$$$$$+.OOOO **#$$$$$$$$$", -"$$$$$$$$+-OO O *;$$$$$$$$$$$&$$$$;* o+$$$$$$$$", -"$$$$$$$$#O* O .+$$$$$$$$$$@X;$$$+.O *#$$$$$$$$", -"$$$$$$$$X* -&$$$$$$$$$$@- :;$$$&- OX$$$$$$$$", -"$$$$$$$@*O *O#$$$$$$$$$$@oOO**;$$$# O*%$$$$$$$", -"$$$$$$$; -+$$$$$$$$$@o O OO ;+$$-O *;$$$$$$$", -"$$$$$$$. ;$$$$$$$$$@-OO OO X&$$;O .$$$$$$$", -"$$$$$$$o *#$$$$$$$$@o O O O-@$$$#O *o$$$$$$$", -"$$$$$$+= *@$$$$$$$@o* OO -@$$$$&: =$$$$$$$", -"$$$$$$+: :+$$$$$$@- *-@$$$$$$: :+$$$$$$", -"$$$$$$+: :+$$$$$@o* O *-@$$$$$$: :+$$$$$$", -"$$$$$$$= :@$$$$@o*OOO -@$$$$@: =+$$$$$$", -"$$$$$$$- O%$$$@o* O O O O-@$$$#* OX$$$$$$$", -"$$$$$$$. O *O;$$&o O*O* *O -@$$; O.$$$$$$$", -"$$$$$$$;* Oo+$$;O*O:OO-- Oo@+= *;$$$$$$$", -"$$$$$$$@* O O#$$$;*OOOo@@-O Oo;O* **@$$$$$$$", -"$$$$$$$$X* OOO-+$$$;O o@$$@- O O OX$$$$$$$$", -"$$$$$$$$#* * O.$$$$;X@$$$$@-O O O#$$$$$$$$", -"$$$$$$$$+oO O OO.+$$+&$$$$$$@-O o+$$$$$$$$", -"$$$$$$$$$#* **.&$$$$$$$$$$@o OO:#$$$$$$$$$", -"$$$$$$$$$+. O* O-#+$$$$$$$$+;O OOO:@$$$$$$$$$", -"$$$$$$$$$$&X *O -;#@++@#;=O O -@$$$$$$$$", -"$$$$$$$$$$$&X O O*O::::O OO Oo@$$$$$$$", -"$$$$$$$$$$$$@XOO OO O*X+$$$$$$", -"$$$$$$$$$$$$$&.* ** O :: *:#$$$$$$$", -"$$$$$$$$$$$$$$$#o*OO O Oo#@-OOO=#$$$$$$$$", -"$$$$$$$$$$$$$$$$+#X:* * O**X#+$$@-*:#$$$$$$$$$", -"$$$$$$$$$$$$$$$$$$$%;.o=::=o.#@$$$$$$@X#$$$$$$$$$$", -"$$$$$$$$$$$$$$$$$$$$$$$$+++$$$$$$$$$$$+$$$$$$$$$$$", -"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$", -"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$", -"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$", -"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$", -"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$", -"/$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$/", -}; - - -/*! - \class TQMessageBox - \brief The TQMessageBox class provides a modal dialog with a short message, an icon, and some buttons. - \ingroup dialogs - \mainclass - - 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 - \table - \row - \i \img qmessagebox-quest.png - \i Question - \i For message boxes that ask a question as part of normal - operation. Some style guides recommend using Information for this - purpose. - \row - \i \img qmessagebox-info.png - \i Information - \i For message boxes that are part of normal operation. - \row - \i \img qmessagebox-warn.png - \i Warning - \i For message boxes that tell the user about unusual errors. - \row - \i \img qmessagebox-crit.png - \i Critical - \i For message boxes that tell the user about critical errors. - \endtable - - 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: - - \code - TQMessageBox::information( this, "Application name", - "Unable to find the user preferences file.\n" - "The factory default will be used instead." ); - \endcode - - question() is useful for simple yes/no questions: - - \code - 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; - \endcode - - warning() can be used to tell the user about unusual errors, or - errors which can't be easily fixed: - - \code - switch( TQMessageBox::warning( this, "Application name", - "Could not connect to the 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; - } - \endcode - - 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: - - \code - 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; - } - \endcode - - 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: - - \code - 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; - } - \endcode - - 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: - - \code - 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." ); - \endcode - - 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: - - \code - TQMessageBox::about( this, "About ", - " is a \n\n" - "Copyright 1991-2003 Such-and-such. " - "\n\n" - "For technical support, call 1234-56789 or see\n" - "http://www.such-and-such.com/Application/\n" ); - \endcode - - 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: - - \code - 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; - } - \endcode - - TQMessageBox defines two enum types: Icon and an unnamed button type. - Icon defines the \c Question, \c Information, \c Warning, and \c - 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: - \list - \i Ok - the default for single-button message boxes - \i Cancel - note that this is \e not automatically Escape - \i Yes - \i No - \i Abort - \i Retry - \i Ignore - \i YesAll - \i NoAll - \endlist - - Button types can be combined with two modifiers by using OR, '|': - \list - \i Default - makes pressing Enter equivalent to - clicking this button. Normally used with Ok, Yes or similar. - \i Escape - makes pressing Escape equivalent to clicking this button. - Normally used with Abort, Cancel or similar. - \endlist - - 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. - - - - \sa TQDialog, - \link http://www.iarchitect.com/errormsg.htm - Isys on error messages \endlink, - \link guibooks.html#fowler GUI Design Handbook: Message Box \endlink -*/ - - -/*! - \enum TQMessageBox::Icon - - This enum has the following values: - - \value NoIcon the message box does not have any icon. - - \value Question an icon indicating that - the message is asking a question. - - \value Information an icon indicating that - the message is nothing out of the ordinary. - - \value Warning an icon indicating that the - message is a warning, but can be dealt with. - - \value Critical an icon indicating that - the message represents a critical problem. - -*/ - - -struct TQMessageBoxData { - TQMessageBoxData(TQMessageBox* parent) : - iconLabel( parent, "icon" ) - { - } - - int numButtons; // number of buttons - TQMessageBox::Icon icon; // message box icon - TQLabel iconLabel; // label holding any icon - int button[3]; // button types - int defButton; // default button (index) - int escButton; // escape button (index) - TQSize buttonSize; // button size - TQPushButton *pb[3]; // buttons -}; - -static const int LastButton = TQMessageBox::NoAll; - -/* - NOTE: The table of button texts correspond to the button enum. -*/ - -#ifndef Q_OS_TEMP -static const char * const mb_texts[] = { -#else -const char * mb_texts[] = { -#endif - 0, - TQT_TRANSLATE_NOOP("TQMessageBox","OK"), - TQT_TRANSLATE_NOOP("TQMessageBox","Cancel"), - TQT_TRANSLATE_NOOP("TQMessageBox","&Yes"), - TQT_TRANSLATE_NOOP("TQMessageBox","&No"), - TQT_TRANSLATE_NOOP("TQMessageBox","&Abort"), - TQT_TRANSLATE_NOOP("TQMessageBox","&Retry"), - TQT_TRANSLATE_NOOP("TQMessageBox","&Ignore"), - TQT_TRANSLATE_NOOP("TQMessageBox","Yes to &All"), - TQT_TRANSLATE_NOOP("TQMessageBox","N&o to All"), - 0 -}; - -/*! - Constructs a message box with no text and a button with the label - "OK". - - If \a parent is 0, the message box becomes an application-global - modal dialog box. If \a parent is a widget, the message box - becomes modal relative to \a parent. - - The \a parent and \a name arguments are passed to the TQDialog - constructor. -*/ - -TQMessageBox::TQMessageBox( TQWidget *parent, const char *name ) - : TQDialog( parent, name, TRUE, WStyle_Customize | WStyle_DialogBorder | WStyle_Title | WStyle_SysMenu ) -{ - init( Ok, 0, 0 ); -} - - -/*! - Constructs a message box with a \a caption, a \a text, an \a icon, - and up to three buttons. - - The \a icon must be one of the following: - \list - \i TQMessageBox::NoIcon - \i TQMessageBox::Question - \i TQMessageBox::Information - \i TQMessageBox::Warning - \i TQMessageBox::Critical - \endlist - - Each button, \a button0, \a button1 and \a button2, can have one - of the following values: - \list - \i TQMessageBox::NoButton - \i TQMessageBox::Ok - \i TQMessageBox::Cancel - \i TQMessageBox::Yes - \i TQMessageBox::No - \i TQMessageBox::Abort - \i TQMessageBox::Retry - \i TQMessageBox::Ignore - \i TQMessageBox::YesAll - \i TQMessageBox::NoAll - \endlist - - 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 \c TQMessageBox::Default - flag to make it the default button (clicked when Enter is - pressed). - - One of the buttons can be OR-ed with the \c TQMessageBox::Escape - flag to make it the cancel or close button (clicked when Escape is - pressed). - - Example: - \code - 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 - \endcode - - If \a parent is 0, the message box becomes an application-global - modal dialog box. If \a parent is a widget, the message box - becomes modal relative to \a parent. - - If \a modal is TRUE the message box is modal; otherwise it - is modeless. - - The \a parent, \a name, \a modal, and \a f arguments are passed to - the TQDialog constructor. - - \sa setCaption(), setText(), setIcon() -*/ - -TQMessageBox::TQMessageBox( const TQString& caption, - const TQString &text, Icon icon, - int button0, int button1, int button2, - TQWidget *parent, const char *name, - bool modal, WFlags f ) - : TQDialog( parent, name, modal, f | WStyle_Customize | WStyle_DialogBorder | WStyle_Title | WStyle_SysMenu ) -{ - init( button0, button1, button2 ); -#ifndef TQT_NO_WIDGET_TOPEXTRA - setCaption( caption ); -#endif - setText( text ); - setIcon( icon ); -} - - -/*! - Destroys the message box. -*/ - -TQMessageBox::~TQMessageBox() -{ - delete mbd; -} - -static TQString * translatedTextAboutTQt = 0; - -void TQMessageBox::init( int button0, int button1, int button2 ) -{ - if ( !translatedTextAboutTQt ) { - translatedTextAboutTQt = new TQString; - - *translatedTextAboutTQt = tr( - "

                About TQt

                " - "

                This program uses TQt version %1.

                " - "

                TQt is a C++ toolkit for multiplatform GUI & " - "application development.

                " - "

                TQt provides single-source " - "portability across MS Windows, Mac OS X, " - "Linux, and all major commercial Unix variants.

                " - "

                See https://trinitydesktop.org/docs/qt3/ " - "for more information.

                " - ).arg( TQT_VERSION_STR ); - - } - label = new TQMessageBoxLabel( this ); - TQ_CHECK_PTR( label ); - - if ( (button2 && !button1) || (button1 && !button0) ) { -#if defined(QT_CHECK_RANGE) - tqWarning( "TQMessageBox: Inconsistent button parameters" ); -#endif - button0 = button1 = button2 = 0; - } - mbd = new TQMessageBoxData(this); - TQ_CHECK_PTR( mbd ); - mbd->icon = NoIcon; - mbd->iconLabel.setPixmap( TQPixmap() ); - mbd->numButtons = 0; - mbd->button[0] = button0; - mbd->button[1] = button1; - mbd->button[2] = button2; - mbd->defButton = -1; - mbd->escButton = -1; - int i; - for ( i=0; i<3; i++ ) { - int b = mbd->button[i]; - if ( (b & Default) ) { - if ( mbd->defButton >= 0 ) { -#if defined(QT_CHECK_RANGE) - tqWarning( "TQMessageBox: There can be at most one " - "default button" ); -#endif - } else { - mbd->defButton = i; - } - } - if ( (b & Escape) ) { - if ( mbd->escButton >= 0 ) { -#if defined(QT_CHECK_RANGE) - tqWarning( "TQMessageBox: There can be at most one " - "escape button" ); -#endif - } else { - mbd->escButton = i; - } - } - b &= ButtonMask; - if ( b == 0 ) { - if ( i == 0 ) // no buttons, add an Ok button - b = Ok; - } else if ( b < 0 || b > LastButton ) { -#if defined(QT_CHECK_RANGE) - tqWarning( "TQMessageBox: Invalid button specifier" ); -#endif - b = Ok; - } else { - if ( i > 0 && mbd->button[i-1] == 0 ) { -#if defined(QT_CHECK_RANGE) - tqWarning( "TQMessageBox: Inconsistent button parameters; " - "button %d defined but not button %d", - i+1, i ); -#endif - b = 0; - } - } - mbd->button[i] = b; - if ( b ) - mbd->numButtons++; - } - for ( i=0; i<3; i++ ) { - if ( i >= mbd->numButtons ) { - mbd->pb[i] = 0; - } else { - TQCString buttonName; - buttonName.sprintf( "button%d", i+1 ); - mbd->pb[i] = new TQPushButton( - tr(mb_texts[mbd->button[i]]), - this, buttonName ); - if ( mbd->defButton == i ) { - mbd->pb[i]->setDefault( TRUE ); - mbd->pb[i]->setFocus(); - } - mbd->pb[i]->setAutoDefault( TRUE ); - mbd->pb[i]->setFocusPolicy( TQWidget::StrongFocus ); - connect( mbd->pb[i], TQ_SIGNAL(clicked()), TQ_SLOT(buttonClicked()) ); - } - } - resizeButtons(); - reserved1 = reserved2 = 0; -} - - -int TQMessageBox::indexOf( int button ) const -{ - int index = -1; - for ( int i=0; inumButtons; i++ ) { - if ( mbd->button[i] == button ) { - index = i; - break; - } - } - return index; -} - - -void TQMessageBox::resizeButtons() -{ - int i; - TQSize maxSize; - for ( i=0; inumButtons; i++ ) { - TQSize s = mbd->pb[i]->sizeHint(); - maxSize.setWidth( TQMAX(maxSize.width(), s.width()) ); - maxSize.setHeight( TQMAX(maxSize.height(),s.height()) ); - } - mbd->buttonSize = maxSize; - for ( i=0; inumButtons; i++ ) - mbd->pb[i]->resize( maxSize ); -} - - -/*! - \property TQMessageBox::text - \brief 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 (\l - TQMessageBox::textFormat). The default setting is \c 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. - - \sa textFormat -*/ -TQString TQMessageBox::text() const -{ - return label->text(); -} - - -void TQMessageBox::setText( const TQString &text ) -{ - label->setText( text ); -} - - -/*! - \property TQMessageBox::icon - \brief the message box's icon - - The icon of the message box can be one of the following predefined - icons: - \list - \i TQMessageBox::NoIcon - \i TQMessageBox::Question - \i TQMessageBox::Information - \i TQMessageBox::Warning - \i TQMessageBox::Critical - \endlist - - The actual pixmap used for displaying the icon depends on the - current \link TQWidget::style() GUI style\endlink. You can also set - a custom pixmap icon using the \l TQMessageBox::iconPixmap - property. The default icon is TQMessageBox::NoIcon. - - \sa iconPixmap -*/ - -TQMessageBox::Icon TQMessageBox::icon() const -{ - return mbd->icon; -} - -void TQMessageBox::setIcon( Icon icon ) -{ - setIconPixmap( standardIcon(icon) ); - mbd->icon = icon; -} - -/*! - \obsolete - - Returns the pixmap used for a standard icon. This - allows the pixmaps to be used in more complex message boxes. - \a icon specifies the required icon, e.g. TQMessageBox::Information, - TQMessageBox::Warning or TQMessageBox::Critical. - - \a style is unused. -*/ - -TQPixmap TQMessageBox::standardIcon( Icon icon, GUIStyle style) -{ - Q_UNUSED(style); - return TQMessageBox::standardIcon(icon); -} - - -/*! - Returns the pixmap used for a standard icon. This allows the - pixmaps to be used in more complex message boxes. \a icon - specifies the required icon, e.g. TQMessageBox::Question, - TQMessageBox::Information, TQMessageBox::Warning or - TQMessageBox::Critical. -*/ - -TQPixmap TQMessageBox::standardIcon( Icon icon ) -{ - TQPixmap pm; - switch ( icon ) { - case Information: - pm = TQApplication::style().stylePixmap( TQStyle::SP_MessageBoxInformation ); - break; - case Warning: - pm = TQApplication::style().stylePixmap( TQStyle::SP_MessageBoxWarning ); - break; - case Critical: - pm = TQApplication::style().stylePixmap( TQStyle::SP_MessageBoxCritical ); - break; - case Question: - pm = TQApplication::style().stylePixmap( TQStyle::SP_MessageBoxQuestion ); - default: - break; - } - return pm; -} - - -/*! - \property TQMessageBox::iconPixmap - \brief 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. - - \sa icon -*/ - -const TQPixmap *TQMessageBox::iconPixmap() const -{ - return mbd->iconLabel.pixmap(); -} - - -void TQMessageBox::setIconPixmap( const TQPixmap &pixmap ) -{ - mbd->iconLabel.setPixmap(pixmap); - mbd->icon = NoIcon; -} - - -/*! - Returns the text of the message box button \a button, or - TQString::null if the message box does not contain the button. - - \sa setButtonText() -*/ - -TQString TQMessageBox::buttonText( int button ) const -{ - int index = indexOf(button); - return index >= 0 && mbd->pb[index] - ? mbd->pb[index]->text() - : TQString::null; -} - - -/*! - Sets the text of the message box button \a button to \a text. - Setting the text of a button that is not in the message box is - silently ignored. - - \sa buttonText() -*/ - -void TQMessageBox::setButtonText( int button, const TQString &text ) -{ - int index = indexOf(button); - if ( index >= 0 && mbd->pb[index] ) { - mbd->pb[index]->setText( text ); - resizeButtons(); - } -} - - -/*! - \internal - Internal slot to handle button clicks. -*/ - -void TQMessageBox::buttonClicked() -{ - int reply = 0; - const TQObject *s = sender(); - for ( int i=0; inumButtons; i++ ) { - if ( mbd->pb[i] == s ) - reply = mbd->button[i]; - } - done( reply ); -} - - -/*! - 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. -*/ -void TQMessageBox::adjustSize() -{ - if ( !testWState(WState_Polished) ) - polish(); - resizeButtons(); - label->adjustSize(); - TQSize labelSize( label->size() ); - int n = mbd->numButtons; - int bw = mbd->buttonSize.width(); - int bh = mbd->buttonSize.height(); - int border = bh / 2 - style().pixelMetric(TQStyle::PM_ButtonDefaultIndicator); - if ( border <= 0 ) - border = 10; - int btn_spacing = 7; - if ( style().styleHint(TQStyle::SH_GUIStyle) == MotifStyle ) - btn_spacing = border; -#ifndef Q_OS_TEMP - int buttons = mbd->numButtons * bw + (n-1) * btn_spacing; - int h = bh; -#else - int visibleButtons = 0; - for ( int i = 0; i < mbd->numButtons; ++i ) - visibleButtons += mbd->pb[i]->isVisible() ? 1 : 0; - int buttons = visibleButtons == 0 ? 0 : visibleButtons * bw + (visibleButtons-1) * btn_spacing; - int h = visibleButtons == 0 ? 0 : bh; - n = visibleButtons; -#endif - if ( labelSize.height() ) - h += labelSize.height() + 3*border; - else - h += 2*border; - int lmargin = 0; - if ( mbd->iconLabel.pixmap() && mbd->iconLabel.pixmap()->width() ) { - mbd->iconLabel.adjustSize(); - lmargin += mbd->iconLabel.width() + border; - if ( h < mbd->iconLabel.height() + 3*border + bh && n ) - h = mbd->iconLabel.height() + 3*border + bh; - } - int w = TQMAX( buttons, labelSize.width() + lmargin ) + 2*border; - TQRect screen = TQApplication::desktop()->screenGeometry( pos() ); - if ( w > screen.width() ) - w = screen.width(); - resize( w, h ); - setMinimumSize( size() ); -#ifdef TQ_WS_MAC - setMaximumSize(size()); -#endif -} - - -/*!\reimp -*/ -void TQMessageBox::resizeEvent( TQResizeEvent * ) -{ - int i; - int n = mbd->numButtons; - int bw = mbd->buttonSize.width(); - int bh = mbd->buttonSize.height(); -#ifdef Q_OS_TEMP - int visibleButtons = 0; - for ( i = 0; i < n; ++i ) - visibleButtons += mbd->pb[i]->isVisible() ? 1 : 0; - n = visibleButtons; - bw = visibleButtons == 0 ? 0 : bw; - bh = visibleButtons == 0 ? 0 : bh; -#endif - int border = bh / 2 - style().pixelMetric(TQStyle::PM_ButtonDefaultIndicator); - if ( border <= 0 ) - border = 10; - int btn_spacing = 7; - if ( style().styleHint(TQStyle::SH_GUIStyle) == MotifStyle ) - btn_spacing = border; - int lmargin = 0; - mbd->iconLabel.adjustSize(); - bool rtl = TQApplication::reverseLayout(); - if (rtl) - mbd->iconLabel.move(width() - border - mbd->iconLabel.width(), border); - else - mbd->iconLabel.move(border, border); - if ( mbd->iconLabel.pixmap() && mbd->iconLabel.pixmap()->width() ) - lmargin += mbd->iconLabel.width() + border; - label->setGeometry((rtl ? 0 : lmargin) + border, - border, - width() - lmargin -2*border, - height() - 3*border - bh); - int extra_space = (width() - bw*n - 2*border - (n-1)*btn_spacing); - if ( style().styleHint(TQStyle::SH_GUIStyle) == MotifStyle ) - for ( i=0; ipb[rtl ? n - i - 1 : i]->move(border + i*bw + i*btn_spacing + extra_space*(i+1)/(n+1), - height() - border - bh ); - else - for ( i=0; ipb[rtl ? n - i - 1 : i]->move(border + i*bw + extra_space/2 + i*btn_spacing, - height() - border - bh ); -} - - -/*!\reimp -*/ -void TQMessageBox::keyPressEvent( TQKeyEvent *e ) -{ - if ( e->key() == Key_Escape ) { - if ( mbd->escButton >= 0 ) { - TQPushButton *pb = mbd->pb[mbd->escButton]; - pb->animateClick(); - e->accept(); - return; - } - } -#ifndef TQT_NO_ACCEL - if ( !( e->state() & AltButton ) ) { - TQObjectList *list = queryList( "TQPushButton" ); - TQObjectListIt it( *list ); - TQPushButton *pb; - while ( (pb = (TQPushButton*)it.current()) ) { - int key = e->key() & ~(MODIFIER_MASK|UNICODE_ACCEL); - int acc = pb->accel() & ~(MODIFIER_MASK|UNICODE_ACCEL); - if ( key && acc && acc == key ) { - delete list; - emit pb->animateClick(); - return; - } - ++it; - } - delete list; - } -#endif - TQDialog::keyPressEvent( e ); -} - -/*!\reimp -*/ -void TQMessageBox::showEvent( TQShowEvent *e ) -{ -#if defined(QT_ACCESSIBILITY_SUPPORT) - TQAccessible::updateAccessibility( this, 0, TQAccessible::Alert ); -#endif - TQDialog::showEvent( e ); -} - -/*!\reimp -*/ -void TQMessageBox::closeEvent( TQCloseEvent *e ) -{ - TQDialog::closeEvent( e ); - if ( mbd->escButton != -1 ) - setResult( mbd->button[mbd->escButton] ); -} - -/***************************************************************************** - Static TQMessageBox functions - *****************************************************************************/ - -/*!\fn int TQMessageBox::message( const TQString &,const TQString&,const TQString&,TQWidget*,const char * ) - \obsolete - Opens a modal message box directly using the specified parameters. - - Please use information(), warning(), question(), or critical() instead. -*/ - -/*! \fn bool TQMessageBox::query( const TQString &,const TQString&,const TQString&,const TQString&,TQWidget *, const char * ) - \obsolete - Queries the user using a modal message box with two buttons. - Note that \a caption is not always shown, it depends on the window manager. - - Please use information(), question(), warning(), or critical() instead. -*/ - -/*! - Opens an information message box with the caption \a caption and - the text \a text. The dialog may have up to three buttons. Each of - the buttons, \a button0, \a button1 and \a button2 may be set to - one of the following values: - - \list - \i TQMessageBox::NoButton - \i TQMessageBox::Ok - \i TQMessageBox::Cancel - \i TQMessageBox::Yes - \i TQMessageBox::No - \i TQMessageBox::Abort - \i TQMessageBox::Retry - \i TQMessageBox::Ignore - \i TQMessageBox::YesAll - \i TQMessageBox::NoAll - \endlist - - 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 \c TQMessageBox::Default, and one - button can be OR-ed with \c TQMessageBox::Escape. - - Returns the identity (TQMessageBox::Ok, or TQMessageBox::No, etc.) - of the button that was clicked. - - If \a parent is 0, the message box becomes an application-global - modal dialog box. If \a parent is a widget, the message box - becomes modal relative to \a parent. - - \sa question(), warning(), critical() -*/ - -int TQMessageBox::information( TQWidget *parent, - const TQString& caption, const TQString& text, - int button0, int button1, int button2 ) -{ -#if defined(TQ_WS_X11) - if ( tqt_use_native_dialogs && TQTDEIntegration::enabled()) - return TQTDEIntegration::information( parent, caption, text, button0, button1, button2 ); -#endif - TQMessageBox *mb = new TQMessageBox( caption, text, Information, - button0, button1, button2, - parent, "qt_msgbox_information", TRUE, - WDestructiveClose); - TQ_CHECK_PTR( mb ); - return mb->exec(); -} - -/*! - Opens a question message box with the caption \a caption and the - text \a text. The dialog may have up to three buttons. Each of the - buttons, \a button0, \a button1 and \a button2 may be set to one - of the following values: - - \list - \i TQMessageBox::NoButton - \i TQMessageBox::Ok - \i TQMessageBox::Cancel - \i TQMessageBox::Yes - \i TQMessageBox::No - \i TQMessageBox::Abort - \i TQMessageBox::Retry - \i TQMessageBox::Ignore - \i TQMessageBox::YesAll - \i TQMessageBox::NoAll - \endlist - - 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 \c TQMessageBox::Default, and one - button can be OR-ed with \c TQMessageBox::Escape. - - Returns the identity (TQMessageBox::Yes, or TQMessageBox::No, etc.) - of the button that was clicked. - - If \a parent is 0, the message box becomes an application-global - modal dialog box. If \a parent is a widget, the message box - becomes modal relative to \a parent. - - \sa information(), warning(), critical() -*/ - -int TQMessageBox::question( TQWidget *parent, - const TQString& caption, const TQString& text, - int button0, int button1, int button2 ) -{ -#if defined(TQ_WS_X11) - if ( tqt_use_native_dialogs && TQTDEIntegration::enabled()) - return TQTDEIntegration::question( parent, caption, text, button0, button1, button2 ); -#endif - TQMessageBox *mb = new TQMessageBox( caption, text, Question, - button0, button1, button2, - parent, "qt_msgbox_information", TRUE, - WDestructiveClose); - TQ_CHECK_PTR( mb ); - return mb->exec(); -} - - -/*! - Opens a warning message box with the caption \a caption and the - text \a text. The dialog may have up to three buttons. Each of the - button parameters, \a button0, \a button1 and \a button2 may be - set to one of the following values: - - \list - \i TQMessageBox::NoButton - \i TQMessageBox::Ok - \i TQMessageBox::Cancel - \i TQMessageBox::Yes - \i TQMessageBox::No - \i TQMessageBox::Abort - \i TQMessageBox::Retry - \i TQMessageBox::Ignore - \i TQMessageBox::YesAll - \i TQMessageBox::NoAll - \endlist - - 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 \c TQMessageBox::Default, and one - button can be OR-ed with \c TQMessageBox::Escape. - - Returns the identity (TQMessageBox::Ok, or TQMessageBox::No, etc.) - of the button that was clicked. - - If \a parent is 0, the message box becomes an application-global - modal dialog box. If \a parent is a widget, the message box - becomes modal relative to \a parent. - - \sa information(), question(), critical() -*/ - -int TQMessageBox::warning( TQWidget *parent, - const TQString& caption, const TQString& text, - int button0, int button1, int button2 ) -{ -#if defined(TQ_WS_X11) - if ( tqt_use_native_dialogs && TQTDEIntegration::enabled()) - return TQTDEIntegration::warning( parent, caption, text, button0, button1, button2 ); -#endif - TQMessageBox *mb = new TQMessageBox( caption, text, Warning, - button0, button1, button2, - parent, "qt_msgbox_warning", TRUE, - WDestructiveClose); - TQ_CHECK_PTR( mb ); - return mb->exec(); -} - - -/*! - Opens a critical message box with the caption \a caption and the - text \a text. The dialog may have up to three buttons. Each of the - button parameters, \a button0, \a button1 and \a button2 may be - set to one of the following values: - - \list - \i TQMessageBox::NoButton - \i TQMessageBox::Ok - \i TQMessageBox::Cancel - \i TQMessageBox::Yes - \i TQMessageBox::No - \i TQMessageBox::Abort - \i TQMessageBox::Retry - \i TQMessageBox::Ignore - \i TQMessageBox::YesAll - \i TQMessageBox::NoAll - \endlist - - 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 \c TQMessageBox::Default, and one - button can be OR-ed with \c TQMessageBox::Escape. - - Returns the identity (TQMessageBox::Ok, or TQMessageBox::No, etc.) - of the button that was clicked. - - If \a parent is 0, the message box becomes an application-global - modal dialog box. If \a parent is a widget, the message box - becomes modal relative to \a parent. - - \sa information(), question(), warning() -*/ - -int TQMessageBox::critical( TQWidget *parent, - const TQString& caption, const TQString& text, - int button0, int button1, int button2 ) -{ -#if defined(TQ_WS_X11) - if ( tqt_use_native_dialogs && TQTDEIntegration::enabled()) - return TQTDEIntegration::critical( parent, caption, text, button0, button1, button2 ); -#endif - TQMessageBox *mb = new TQMessageBox( caption, text, Critical, - button0, button1, button2, - parent, "qt_msgbox_critical", TRUE, - WDestructiveClose); - TQ_CHECK_PTR( mb ); - return mb->exec(); -} - - -/*! - Displays a simple about box with caption \a caption and text \a - text. The about box's parent is \a parent. - - about() looks for a suitable icon in four locations: - \list 1 - \i It prefers \link TQWidget::icon() parent->icon() \endlink if that exists. - \i If not, it tries the top-level widget containing \a parent. - \i If that fails, it tries the \link - TQApplication::mainWidget() main widget. \endlink - \i As a last resort it uses the Information icon. - \endlist - - The about box has a single button labelled "OK". - - \sa TQWidget::icon() TQApplication::mainWidget() -*/ - -void TQMessageBox::about( TQWidget *parent, const TQString &caption, - const TQString& text ) -{ - TQMessageBox *mb = new TQMessageBox( caption, text, - Information, - Ok + Default, 0, 0, - parent, "qt_msgbox_simple_about_box", TRUE, - WDestructiveClose); - TQ_CHECK_PTR( mb ); -#ifndef TQT_NO_WIDGET_TOPEXTRA - const TQPixmap *pm = parent ? parent->icon() : 0; - if ( pm && !pm->isNull() ) - mb->setIconPixmap( *pm ); - else { - pm = parent ? parent->topLevelWidget()->icon() : 0; - if ( pm && !pm->isNull() ) - mb->setIconPixmap( *pm ); - else { - pm = tqApp && tqApp->mainWidget() ? tqApp->mainWidget()->icon() : 0; - if ( pm && !pm->isNull() ) - mb->setIconPixmap( *pm ); - } - } -#endif - mb->exec(); -} - - -/*! \reimp -*/ - -void TQMessageBox::styleChanged( TQStyle& ) -{ - if ( mbd->icon != NoIcon ) { - // Reload icon for new style - setIcon( mbd->icon ); - } -} - - -static int textBox( TQWidget *parent, TQMessageBox::Icon severity, - const TQString& caption, const TQString& text, - const TQString& button0Text, - const TQString& button1Text, - const TQString& button2Text, - int defaultButtonNumber, - int escapeButtonNumber ) -{ - int b[3]; - b[0] = 1; - b[1] = button1Text.isEmpty() ? 0 : 2; - b[2] = button2Text.isEmpty() ? 0 : 3; - - int i; - for( i=0; i<3; i++ ) { - if ( b[i] && defaultButtonNumber == i ) - b[i] += TQMessageBox::Default; - if ( b[i] && escapeButtonNumber == i ) - b[i] += TQMessageBox::Escape; - } - - TQMessageBox *mb = new TQMessageBox( caption, text, severity, - b[0], b[1], b[2], - parent, "qt_msgbox_information", TRUE, - TQt::WDestructiveClose); - TQ_CHECK_PTR( mb ); - if ( button0Text.isEmpty() ) - mb->setButtonText( 1, TQMessageBox::tr(mb_texts[TQMessageBox::Ok]) ); - else - mb->setButtonText( 1, button0Text ); - if ( b[1] ) - mb->setButtonText( 2, button1Text ); - if ( b[2] ) - mb->setButtonText( 3, button2Text ); - -#ifndef TQT_NO_CURSOR - mb->setCursor( TQt::arrowCursor ); -#endif - return mb->exec() - 1; -} - - -/*! - \overload - - Displays an information message box with caption \a caption, text - \a text and one, two or three buttons. Returns the index of the - button that was clicked (0, 1 or 2). - - \a button0Text is the text of the first button, and is optional. - If \a button0Text is not supplied, "OK" (translated) will be used. - \a button1Text is the text of the second button, and is optional. - \a button2Text is the text of the third button, and is optional. - \a 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). \a - 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 \a parent is 0, the message box becomes an application-global - modal dialog box. If \a parent is a widget, the message box - becomes modal relative to \a 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. - - \sa question(), warning(), critical() -*/ - -int TQMessageBox::information( TQWidget *parent, const TQString &caption, - const TQString& text, - const TQString& button0Text, - const TQString& button1Text, - const TQString& button2Text, - int defaultButtonNumber, - int escapeButtonNumber ) -{ -#if defined(TQ_WS_X11) - if ( tqt_use_native_dialogs && TQTDEIntegration::enabled()) - return TQTDEIntegration::information( parent, caption, text, - button0Text, button1Text, button2Text, defaultButtonNumber, escapeButtonNumber ); -#endif - return textBox( parent, Information, caption, text, - button0Text, button1Text, button2Text, - defaultButtonNumber, escapeButtonNumber ); -} - -/*! - \overload - - Displays a question message box with caption \a caption, text \a - text and one, two or three buttons. Returns the index of the - button that was clicked (0, 1 or 2). - - \a button0Text is the text of the first button, and is optional. - If \a button0Text is not supplied, "OK" (translated) will be used. - \a button1Text is the text of the second button, and is optional. - \a button2Text is the text of the third button, and is optional. - \a 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). \a - 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 \a parent is 0, the message box becomes an application-global - modal dialog box. If \a parent is a widget, the message box - becomes modal relative to \a 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. - - \sa information(), warning(), critical() -*/ -int TQMessageBox::question( TQWidget *parent, const TQString &caption, - const TQString& text, - const TQString& button0Text, - const TQString& button1Text, - const TQString& button2Text, - int defaultButtonNumber, - int escapeButtonNumber ) -{ -#if defined(TQ_WS_X11) - if ( tqt_use_native_dialogs && TQTDEIntegration::enabled()) - return TQTDEIntegration::question( parent, caption, text, - button0Text, button1Text, button2Text, defaultButtonNumber, escapeButtonNumber ); -#endif - return textBox( parent, Question, caption, text, - button0Text, button1Text, button2Text, - defaultButtonNumber, escapeButtonNumber ); -} - - -/*! - \overload - - 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). - - \a button0Text is the text of the first button, and is optional. - If \a button0Text is not supplied, "OK" (translated) will be used. - \a button1Text is the text of the second button, and is optional, - and \a button2Text is the text of the third button, and is - optional. \a 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). \a - 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 \a parent is 0, the message box becomes an application-global - modal dialog box. If \a parent is a widget, the message box - becomes modal relative to \a 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. - - \sa information(), question(), critical() -*/ - -int TQMessageBox::warning( TQWidget *parent, const TQString &caption, - const TQString& text, - const TQString& button0Text, - const TQString& button1Text, - const TQString& button2Text, - int defaultButtonNumber, - int escapeButtonNumber ) -{ -#if defined(TQ_WS_X11) - if ( tqt_use_native_dialogs && TQTDEIntegration::enabled()) - return TQTDEIntegration::warning( parent, caption, text, - button0Text, button1Text, button2Text, defaultButtonNumber, escapeButtonNumber ); -#endif - return textBox( parent, Warning, caption, text, - button0Text, button1Text, button2Text, - defaultButtonNumber, escapeButtonNumber ); -} - - -/*! - \overload - - 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). - - \a button0Text is the text of the first button, and is optional. - If \a button0Text is not supplied, "OK" (translated) will be used. - \a button1Text is the text of the second button, and is optional, - and \a button2Text is the text of the third button, and is - optional. \a 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). \a - 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 \a parent is 0, the message box becomes an application-global - modal dialog box. If \a parent is a widget, the message box - becomes modal relative to \a parent. - - \sa information(), question(), warning() -*/ - -int TQMessageBox::critical( TQWidget *parent, const TQString &caption, - const TQString& text, - const TQString& button0Text, - const TQString& button1Text, - const TQString& button2Text, - int defaultButtonNumber, - int escapeButtonNumber ) -{ -#if defined(TQ_WS_X11) - if ( tqt_use_native_dialogs && TQTDEIntegration::enabled()) - return TQTDEIntegration::critical( parent, caption, text, - button0Text, button1Text, button2Text, defaultButtonNumber, escapeButtonNumber ); -#endif - return textBox( parent, Critical, caption, text, - button0Text, button1Text, button2Text, - defaultButtonNumber, escapeButtonNumber ); -} - - -/*! - Displays a simple message box about TQt, with caption \a caption - and centered over \a parent (if \a 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. - - \sa TQApplication::aboutTQt() -*/ - -void TQMessageBox::aboutTQt( TQWidget *parent, const TQString &caption ) -{ - TQMessageBox *mb = new TQMessageBox( parent, "qt_msgbox_about_qt" ); - TQ_CHECK_PTR( mb ); - mb->setWFlags( WDestructiveClose ); - -#ifndef TQT_NO_WIDGET_TOPEXTRA - TQString c = caption; - if ( c.isNull() ) - c = tr( "About TQt" ); - mb->setCaption( c ); -#endif - mb->setText( *translatedTextAboutTQt ); -#ifndef TQT_NO_IMAGEIO - TQPixmap pm; - TQImage logo( (const char **)qtlogo_xpm); - if ( tqGray(mb->palette().active().text().rgb()) > - tqGray(mb->palette().active().base().rgb()) ) - { - // light on dark, adjust some colors (where's 10?) - logo.setColor( 0, 0xffffffff ); - logo.setColor( 1, 0xff666666 ); - logo.setColor( 2, 0xffcccc66 ); - logo.setColor( 4, 0xffcccccc ); - logo.setColor( 6, 0xffffff66 ); - logo.setColor( 7, 0xff999999 ); - logo.setColor( 8, 0xff3333ff ); - logo.setColor( 9, 0xffffff33 ); - logo.setColor( 11, 0xffcccc99 ); - } - if ( pm.convertFromImage( logo ) ) - mb->setIconPixmap( pm ); -#endif - mb->setButtonText( 0, tr("OK") ); - if ( mb->mbd && mb->mbd->pb[0] ) { - mb->mbd->pb[0]->setAutoDefault( TRUE ); - mb->mbd->pb[0]->setFocusPolicy( TQWidget::StrongFocus ); - mb->mbd->pb[0]->setDefault( TRUE ); - mb->mbd->pb[0]->setFocus(); - } - mb->exec(); -} - -/*! - \reimp -*/ - -void TQMessageBox::setIcon( const TQPixmap &pix ) -{ - //reimplemented to avoid compiler warning. -#ifndef TQT_NO_WIDGET_TOPEXTRA - TQDialog::setIcon( pix ); -#endif -} - - -/*! - \property TQMessageBox::textFormat - \brief the format of the text displayed by the message box - - The current text format used by the message box. See the \l - TQt::TextFormat enum for an explanation of the possible options. - - The default format is \c AutoText. - - \sa setText() -*/ - -TQt::TextFormat TQMessageBox::textFormat() const -{ - return label->textFormat(); -} - - -void TQMessageBox::setTextFormat( TQt::TextFormat format ) -{ - label->setTextFormat( format ); -} - - -#endif diff --git a/src/dialogs/qprintdialog.cpp b/src/dialogs/qprintdialog.cpp deleted file mode 100644 index 9096ff9f6..000000000 --- a/src/dialogs/qprintdialog.cpp +++ /dev/null @@ -1,1677 +0,0 @@ -/**************************************************************************** -** -** Implementation of internal print dialog (X11) used by TQPrinter::select(). -** -** Created : 950829 -** -** Copyright (C) 1992-2008 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 files LICENSE.GPL2 -** and LICENSE.GPL3 included in the packaging of this file. -** Alternatively you may (at your option) use any later version -** of the GNU General Public License if such license has been -** publicly approved by Trolltech ASA (or its successors, if any) -** and the KDE Free TQt Foundation. -** -** Please review the following information to ensure GNU General -** Public Licensing requirements will be met: -** http://trolltech.com/products/qt/licenses/licensing/opensource/. -** If you are unsure which license is appropriate for your use, please -** review the following information: -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview -** or contact the sales department at sales@trolltech.com. -** -** This file may be used under the terms of the Q Public License as -** defined by Trolltech ASA and appearing in the file LICENSE.TQPL -** included in the packaging of this file. Licensees holding valid TQt -** Commercial licenses may use this file in accordance with the TQt -** Commercial License Agreement provided with the Software. -** -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted -** herein. -** -**********************************************************************/ - -#include "ntqprintdialog.h" - -#ifndef TQT_NO_PRINTDIALOG - -#include "tqfiledialog.h" -#include "tqfile.h" -#include "tqtextstream.h" -#include "tqcombobox.h" -#include "tqframe.h" -#include "tqlabel.h" -#include "tqlineedit.h" -#include "tqpushbutton.h" -#include "tqprinter.h" -#include "tqlistview.h" -#include "tqlayout.h" -#include "tqbuttongroup.h" -#include "tqradiobutton.h" -#include "tqspinbox.h" -#include "ntqapplication.h" -#include "tqheader.h" -#include "tqstyle.h" -#include "tqstring.h" -#include "tqregexp.h" -#if !defined(TQT_NO_CUPS) || !defined(TQT_NO_NIS) -#include "tqlibrary.h" -#endif - -#ifndef TQT_NO_NIS - -#ifndef BOOL_DEFINED -#define BOOL_DEFINED -#endif - -#include -#include - -// Solaris redefines connect -> __xnet_connect with _XOPEN_SOURCE_EXTENDED. -#if defined(connect) -# undef connect -#endif - -#endif // TQT_NO_NIS - -// UNIX Large File Support redefines open -> open64 -#if defined(open) -# undef open -#endif - -#include -#include - - -class TQPrintDialogSpinBox : public TQSpinBox -{ -public: - TQPrintDialogSpinBox(int min, int max, int steps, TQWidget *parent, const char *name) - : TQSpinBox(min, max, steps, parent, name) - {} - - void interpretText() - { - TQSpinBox::interpretText(); - } -}; - - - - -enum { Success = 's', Unavail = 'u', NotFound = 'n', TryAgain = 't' }; -enum { Continue = 'c', Return = 'r' }; - -class TQPrintDialogPrivate -{ -public: - TQPrinter * printer; - - TQButtonGroup * printerOrFile; - - bool outputToFile; - TQListView * printers; - TQLineEdit * fileName; - TQPushButton * browse, *ok; - - TQButtonGroup * printRange; - TQLabel * firstPageLabel; - TQPrintDialogSpinBox * firstPage; - TQLabel * lastPageLabel; - TQPrintDialogSpinBox * lastPage; - TQRadioButton * printAllButton; - TQRadioButton * printRangeButton; - TQRadioButton * printSelectionButton; - TQRadioButton * printToFileButton; - TQComboBox *orientationCombo, *sizeCombo; - - TQPrinter::PageSize pageSize; - TQPrinter::Orientation orientation; - - TQButtonGroup * pageOrder; - TQPrinter::PageOrder pageOrder2; - - TQButtonGroup * colorMode; - TQPrinter::ColorMode colorMode2; - - TQPrintDialogSpinBox * copies; - int numCopies; - - TQBoxLayout *customLayout; - - TQPrinter::PageSize indexToPageSize[TQPrinter::NPageSize]; -}; - - -typedef void (*Q_PrintDialogHook)(TQListView *); -static Q_PrintDialogHook addPrinterHook = 0; - -void qt_set_printdialog_hook( Q_PrintDialogHook hook ) -{ - addPrinterHook = hook; -} - -static void isc( TQPrintDialogPrivate * d, const TQString & text, - TQPrinter::PageSize ps ); - -class TQPrinterListViewItem : public TQListViewItem -{ -public: - TQPrinterListViewItem( TQListView * printers, const TQString& name, - const TQString& host, const TQString& comment, - const TQStringList& aliases ) - : TQListViewItem( printers, name, host, comment ), ali( aliases ) { } - - bool samePrinter( const TQString& name ) { - return text( 0 ) == name || ali.find( name ) != ali.end(); - } - - TQStringList ali; -}; - -static void perhapsAddPrinter( TQListView * printers, const TQString &name, - TQString host, TQString comment, - TQStringList aliases = TQStringList() ) -{ - const TQListViewItem * i = printers->firstChild(); - while ( i && !((TQPrinterListViewItem *) i)->samePrinter(name) ) - i = i->nextSibling(); - if ( i ) - return; - if ( host.isEmpty() ) - host = TQPrintDialog::tr( "locally connected" ); - (void)new TQPrinterListViewItem( printers, - name.simplifyWhiteSpace(), - host.simplifyWhiteSpace(), - comment.simplifyWhiteSpace(), aliases ); -} - -static void parsePrinterDesc( TQString printerDesc, TQListView * printers ) -{ - if ( printerDesc.length() < 1 ) - return; - - printerDesc = printerDesc.simplifyWhiteSpace(); - int i = printerDesc.find( ':' ); - TQString printerName, printerComment, printerHost; - TQStringList aliases; - - if ( i >= 0 ) { - // have ':' want '|' - int j = printerDesc.find( '|' ); - if ( j > 0 && j < i ) { - printerName = printerDesc.left( j ); - aliases = TQStringList::split( '|', - printerDesc.mid(j + 1, i - j - 1) ); - // try extracting a comment from the aliases - printerComment = TQPrintDialog::tr( "Aliases: %1" ) - .arg( aliases.join(", ") ); - } else { - printerName = printerDesc.left( i ); - } - // look for lprng pseudo all printers entry - i = printerDesc.find( TQRegExp(TQString::fromLatin1(": *all *=")) ); - if ( i >= 0 ) - printerName = ""; - // look for signs of this being a remote printer - i = printerDesc.find( TQRegExp(TQString::fromLatin1(": *rm *=")) ); - if ( i >= 0 ) { - // point k at the end of remote host name - while ( printerDesc[i] != '=' ) - i++; - while ( printerDesc[i] == '=' || printerDesc[i].isSpace() ) - i++; - j = i; - while ( j < (int)printerDesc.length() && printerDesc[j] != ':' ) - j++; - - // and stuff that into the string - printerHost = printerDesc.mid( i, j - i ); - } - } - if ( printerName.length() ) - perhapsAddPrinter( printers, printerName, printerHost, printerComment, - aliases ); -} - -static int parsePrintcap( TQListView * printers, const TQString& fileName ) -{ - TQFile printcap( fileName ); - if ( !printcap.open( IO_ReadOnly ) ) - return NotFound; - - char * line_ascii = new char[1025]; - line_ascii[1024] = '\0'; - - TQString printerDesc; - bool atEnd = FALSE; - - while ( !atEnd ) { - if ( printcap.atEnd() || printcap.readLine( line_ascii, 1024 ) <= 0 ) - atEnd = TRUE; - TQString line = line_ascii; - line = line.stripWhiteSpace(); - if ( line.length() >= 1 && line[int(line.length()) - 1] == '\\' ) - line.truncate( line.length() - 1 ); - if ( line[0] == '#' ) { - if ( !atEnd ) - continue; - } else if ( line[0] == '|' || line[0] == ':' ) { - printerDesc += line; - if ( !atEnd ) - continue; - } - - parsePrinterDesc( printerDesc, printers ); - - // add the first line of the new printer definition - printerDesc = line; - } - delete[] line_ascii; - return Success; -} - - -// solaris, not 2.6 -static void parseEtcLpPrinters( TQListView * printers ) -{ - TQDir lp( TQString::fromLatin1("/etc/lp/printers") ); - const TQFileInfoList * dirs = lp.entryInfoList(); - if ( !dirs ) - return; - - TQFileInfoListIterator it( *dirs ); - TQFileInfo *printer; - TQString tmp; - while ( (printer = it.current()) != 0 ) { - ++it; - if ( printer->isDir() ) { - tmp.sprintf( "/etc/lp/printers/%s/configuration", - printer->fileName().ascii() ); - TQFile configuration( tmp ); - char * line = new char[1025]; - TQString remote( TQString::fromLatin1("Remote:") ); - TQString contentType( TQString::fromLatin1("Content types:") ); - TQString printerHost; - bool canPrintPostscript = FALSE; - if ( configuration.open( IO_ReadOnly ) ) { - while ( !configuration.atEnd() && - configuration.readLine( line, 1024 ) > 0 ) { - if ( TQString::fromLatin1(line).startsWith( remote ) ) { - const char * p = line; - while ( *p != ':' ) - p++; - p++; - while ( isspace((uchar) *p) ) - p++; - printerHost = TQString::fromLocal8Bit(p); - printerHost = printerHost.simplifyWhiteSpace(); - } else if ( TQString::fromLatin1(line).startsWith( contentType ) ) { - char * p = line; - while ( *p != ':' ) - p++; - p++; - char * e; - while ( *p ) { - while ( isspace((uchar) *p) ) - p++; - if ( *p ) { - char s; - e = p; - while ( isalnum((uchar) *e) ) - e++; - s = *e; - *e = '\0'; - if ( !qstrcmp( p, "postscript" ) || - !qstrcmp( p, "any" ) ) - canPrintPostscript = TRUE; - *e = s; - if ( s == ',' ) - e++; - p = e; - } - } - } - } - if ( canPrintPostscript ) - perhapsAddPrinter( printers, printer->fileName(), - printerHost, TQString::fromLatin1("") ); - } - delete[] line; - } - } -} - - -// solaris 2.6 -static char * parsePrintersConf( TQListView * printers, bool *found = 0 ) -{ - TQFile pc( TQString::fromLatin1("/etc/printers.conf") ); - if ( !pc.open( IO_ReadOnly ) ) { - if ( found ) - *found = FALSE; - return 0; - } - if ( found ) - *found = TRUE; - - char * line = new char[1025]; - line[1024] = '\0'; - - TQString printerDesc; - int lineLength = 0; - - char * defaultPrinter = 0; - - while ( !pc.atEnd() && - (lineLength=pc.readLine( line, 1024 )) > 0 ) { - if ( *line == '#' ) { - *line = '\0'; - lineLength = 0; - } - if ( lineLength >= 2 && line[lineLength-2] == '\\' ) { - line[lineLength-2] = '\0'; - printerDesc += TQString::fromLocal8Bit(line); - } else { - printerDesc += TQString::fromLocal8Bit(line); - printerDesc = printerDesc.simplifyWhiteSpace(); - int i = printerDesc.find( ':' ); - TQString printerName, printerHost, printerComment; - TQStringList aliases; - if ( i >= 0 ) { - // have : want | - int j = printerDesc.find( '|', 0 ); - if ( j >= i ) - j = -1; - printerName = printerDesc.mid( 0, j < 0 ? i : j ); - if ( printerName == TQString::fromLatin1("_default") ) { - i = printerDesc.find( - TQRegExp( TQString::fromLatin1(": *use *=") ) ); - while ( printerDesc[i] != '=' ) - i++; - while ( printerDesc[i] == '=' || printerDesc[i].isSpace() ) - i++; - j = i; - while ( j < (int)printerDesc.length() && - printerDesc[j] != ':' && printerDesc[j] != ',' ) - j++; - // that's our default printer - defaultPrinter = - tqstrdup( printerDesc.mid( i, j-i ).ascii() ); - printerName = ""; - printerDesc = ""; - } else if ( printerName == TQString::fromLatin1("_all") ) { - // skip it.. any other cases we want to skip? - printerName = ""; - printerDesc = ""; - } - - if ( j > 0 ) { - // try extracting a comment from the aliases - aliases = TQStringList::split( '|', - printerDesc.mid(j + 1, i - j - 1) ); - printerComment = TQPrintDialog::tr( "Aliases: %1" ) - .arg( aliases.join(", ") ); - } - // look for signs of this being a remote printer - i = printerDesc.find( - TQRegExp( TQString::fromLatin1(": *bsdaddr *=") ) ); - if ( i >= 0 ) { - // point k at the end of remote host name - while ( printerDesc[i] != '=' ) - i++; - while ( printerDesc[i] == '=' || printerDesc[i].isSpace() ) - i++; - j = i; - while ( j < (int)printerDesc.length() && - printerDesc[j] != ':' && printerDesc[j] != ',' ) - j++; - // and stuff that into the string - printerHost = printerDesc.mid( i, j-i ); - // maybe stick the remote printer name into the comment - if ( printerDesc[j] == ',' ) { - i = ++j; - while ( printerDesc[i].isSpace() ) - i++; - j = i; - while ( j < (int)printerDesc.length() && - printerDesc[j] != ':' && printerDesc[j] != ',' ) - j++; - if ( printerName != printerDesc.mid( i, j-i ) ) { - printerComment = - TQString::fromLatin1("Remote name: "); - printerComment += printerDesc.mid( i, j-i ); - } - } - } - } - if ( printerComment == ":" ) - printerComment = ""; // for cups - if ( printerName.length() ) - perhapsAddPrinter( printers, printerName, printerHost, - printerComment, aliases ); - // chop away the line, for processing the next one - printerDesc = ""; - } - } - delete[] line; - return defaultPrinter; -} - -#ifndef TQT_NO_NIS - -#if defined(Q_C_CALLBACKS) -extern "C" { -#endif - -static int foreach( int /* status */, char * /* key */, int /* keyLen */, - char * val, int valLen, char * data ) -{ - parsePrinterDesc( TQString::fromLatin1(val, valLen), (TQListView *) data ); - return 0; -} - -#if defined(Q_C_CALLBACKS) -} -#endif - -static int retrieveNisPrinters( TQListView * printers ) -{ - typedef int (*WildCast)( int, char *, int, char *, int, char * ); - char printersConfByname[] = "printers.conf.byname"; - char *domain; - int err; - - TQLibrary lib( "nsl" ); - typedef int (*ypGetDefaultDomain)(char **); - ypGetDefaultDomain _ypGetDefaultDomain = (ypGetDefaultDomain)lib.resolve( "yp_get_default_domain" ); - typedef int (*ypAll)(const char *, const char *, const struct ypall_callback *); - ypAll _ypAll = (ypAll)lib.resolve( "yp_all" ); - - if ( _ypGetDefaultDomain && _ypAll ) { - err = _ypGetDefaultDomain( &domain ); - if ( err == 0 ) { - ypall_callback cb; - // wild cast to support K&R-style system headers - (WildCast &) cb.foreach = (WildCast) foreach; - cb.data = (char *) printers; - err = _ypAll( domain, printersConfByname, &cb ); - } - if ( !err ) - return Success; - } - return Unavail; -} - -#endif // TQT_NO_NIS - -static char *parseNsswitchPrintersEntry( TQListView * printers, char *line ) -{ -#define skipSpaces() \ - while ( isspace((uchar) line[k]) ) \ - k++ - - char *defaultPrinter = 0; - bool stop = FALSE; - int lastStatus = NotFound; - - int k = 8; - skipSpaces(); - if ( line[k] != ':' ) - return 0; - k++; - - char *cp = strchr( line, '#' ); - if ( cp != 0 ) - *cp = '\0'; - - while ( line[k] != '\0' ) { - if ( isspace((uchar) line[k]) ) { - k++; - } else if ( line[k] == '[' ) { - k++; - skipSpaces(); - while ( line[k] != '\0' ) { - char status = tolower( line[k] ); - char action = '?'; - - while ( line[k] != '=' && line[k] != ']' && - line[k] != '\0' ) - k++; - if ( line[k] == '=' ) { - k++; - skipSpaces(); - action = tolower( line[k] ); - while ( line[k] != '\0' && !isspace((uchar) line[k]) && line[k] != ']' ) - k++; - } else if ( line[k] == ']' ) { - k++; - break; - } - skipSpaces(); - - if ( lastStatus == status ) - stop = ( action == (char) Return ); - } - } else { - if ( stop ) - break; - - TQCString source; - while ( line[k] != '\0' && !isspace((uchar) line[k]) && line[k] != '[' ) { - source += line[k]; - k++; - } - - if ( source == "user" ) { - lastStatus = parsePrintcap( printers, - TQDir::homeDirPath() + "/.printers" ); - } else if ( source == "files" ) { - bool found; - defaultPrinter = parsePrintersConf( printers, &found ); - if ( found ) - lastStatus = Success; -#ifndef TQT_NO_NIS - } else if ( source == "nis" ) { - lastStatus = retrieveNisPrinters( printers ); -#endif - } else { - // nisplus, dns, etc., are not implemented yet - lastStatus = NotFound; - } - stop = ( lastStatus == Success ); - } - } - return defaultPrinter; -} - -static char *parseNsswitchConf( TQListView * printers ) -{ - TQFile nc( TQString::fromLatin1("/etc/nsswitch.conf") ); - if ( !nc.open(IO_ReadOnly) ) - return 0; - - char *defaultPrinter = 0; - - char *line = new char[1025]; - line[1024] = '\0'; - - while ( !nc.atEnd() && - nc.readLine(line, 1024) > 0 ) { - if ( strncmp(line, "printers", 8) == 0 ) { - defaultPrinter = parseNsswitchPrintersEntry( printers, line ); - delete[] line; - return defaultPrinter; - } - } - - strcpy( line, "printers: user files nis nisplus xfn" ); - defaultPrinter = parseNsswitchPrintersEntry( printers, line ); - delete[] line; - return defaultPrinter; -} - -// HP-UX -static void parseEtcLpMember( TQListView * printers ) -{ - TQDir lp( TQString::fromLatin1("/etc/lp/member") ); - if ( !lp.exists() ) - return; - const TQFileInfoList * dirs = lp.entryInfoList(); - if ( !dirs ) - return; - - TQFileInfoListIterator it( *dirs ); - TQFileInfo *printer; - TQString tmp; - while ( (printer = it.current()) != 0 ) { - ++it; - // I haven't found any real documentation, so I'm guessing that - // since lpstat uses /etc/lp/member rather than one of the - // other directories, it's the one to use. I did not find a - // decent way to locate aliases and remote printers. - if ( printer->isFile() ) - perhapsAddPrinter( printers, printer->fileName(), - TQPrintDialog::tr("unknown"), - TQString::fromLatin1("") ); - } -} - -// IRIX 6.x -static void parseSpoolInterface( TQListView * printers ) -{ - TQDir lp( TQString::fromLatin1("/usr/spool/lp/interface") ); - if ( !lp.exists() ) - return; - const TQFileInfoList * files = lp.entryInfoList(); - if( !files ) - return; - - TQFileInfoListIterator it( *files ); - TQFileInfo *printer; - while ( (printer = it.current()) != 0) { - ++it; - - if ( !printer->isFile() ) - continue; - - // parse out some information - TQFile configFile( printer->filePath() ); - if ( !configFile.open( IO_ReadOnly ) ) - continue; - - TQCString line( 1025 ); - TQString namePrinter; - TQString hostName; - TQString hostPrinter; - TQString printerType; - - TQString nameKey( TQString::fromLatin1("NAME=") ); - TQString typeKey( TQString::fromLatin1("TYPE=") ); - TQString hostKey( TQString::fromLatin1("HOSTNAME=") ); - TQString hostPrinterKey( TQString::fromLatin1("HOSTPRINTER=") ); - - while ( !configFile.atEnd() && - (configFile.readLine(line.data(), 1024)) > 0 ) { - TQString uline = line; - if ( uline.startsWith( typeKey ) ) { - printerType = line.mid( nameKey.length() ); - printerType = printerType.simplifyWhiteSpace(); - } else if ( uline.startsWith( hostKey ) ) { - hostName = line.mid( hostKey.length() ); - hostName = hostName.simplifyWhiteSpace(); - } else if ( uline.startsWith( hostPrinterKey ) ) { - hostPrinter = line.mid( hostPrinterKey.length() ); - hostPrinter = hostPrinter.simplifyWhiteSpace(); - } else if ( uline.startsWith( nameKey ) ) { - namePrinter = line.mid( nameKey.length() ); - namePrinter = namePrinter.simplifyWhiteSpace(); - } - } - configFile.close(); - - printerType = printerType.stripWhiteSpace(); - if ( printerType.find("postscript", 0, FALSE) < 0 ) - continue; - - int ii = 0; - while ( (ii = namePrinter.find('"', ii)) >= 0 ) - namePrinter.remove( ii, 1 ); - - if ( hostName.isEmpty() || hostPrinter.isEmpty() ) { - perhapsAddPrinter( printers, printer->fileName(), - TQString::fromLatin1(""), namePrinter ); - } else { - TQString comment; - comment = namePrinter; - comment += " ("; - comment += hostPrinter; - comment += ")"; - perhapsAddPrinter( printers, printer->fileName(), - hostName, comment ); - } - } -} - - -// Every unix must have its own. It's a standard. Here is AIX. -static void parseQconfig( TQListView * printers ) -{ - TQFile qconfig( TQString::fromLatin1("/etc/qconfig") ); - if ( !qconfig.open( IO_ReadOnly ) ) - return; - - TQTextStream ts( &qconfig ); - TQString line; - - TQString stanzaName; // either a queue or a device name - bool up = TRUE; // queue up? default TRUE, can be FALSE - TQString remoteHost; // null if local - TQString deviceName; // null if remote - - TQRegExp newStanza( TQString::fromLatin1("^[0-z\\-]+:$") ); - - // our basic strategy here is to process each line, detecting new - // stanzas. each time we see a new stanza, we check if the - // previous stanza was a valid queue for a) a remote printer or b) - // a local printer. if it wasn't, we assume that what we see is - // the start of the first stanza, or that the previous stanza was - // a device stanza, or that there is some syntax error (we don't - // report those). - - do { - line = ts.readLine(); - bool indented = line[0].isSpace(); - line = line.simplifyWhiteSpace(); - - int i = line.find('='); - if ( indented && i != -1 ) { // line in stanza - TQString variable = line.left( i ).simplifyWhiteSpace(); - TQString value=line.mid( i+1, line.length() ).simplifyWhiteSpace(); - if ( variable == TQString::fromLatin1("device") ) - deviceName = value; - else if ( variable == TQString::fromLatin1("host") ) - remoteHost = value; - else if ( variable == TQString::fromLatin1("up") ) - up = !(value.lower() == TQString::fromLatin1("false")); - } else if ( line[0] == '*' ) { // comment - // nothing to do - } else if ( ts.atEnd() || // end of file, or beginning of new stanza - ( !indented && line.find( newStanza ) != -1 ) ) { - if ( up && stanzaName.length() > 0 && stanzaName.length() < 21 ) { - if ( remoteHost.length() ) // remote printer - perhapsAddPrinter( printers, stanzaName, remoteHost, - TQString::null ); - else if ( deviceName.length() ) // local printer - perhapsAddPrinter( printers, stanzaName, TQString::null, - TQString::null ); - } - line.truncate( line.length()-1 ); - if ( line.length() >= 1 && line.length() <= 20 ) - stanzaName = line; - up = TRUE; - remoteHost = TQString::null; - deviceName = TQString::null; - } else { - // syntax error? ignore. - } - } while ( !ts.atEnd() ); -} - - -#ifndef TQT_NO_CUPS -#include - -static char * parseCupsOutput( TQListView * printers ) -{ - char * defaultPrinter = 0; - int nd; - cups_dest_t * d; - TQLibrary lib( "cups" ); - typedef int (*CupsGetDests)(cups_dest_t **dests); - typedef void (*CupsFreeDests)(int num_dents, cups_dest_t *dests); - CupsGetDests _cupsGetDests = (CupsGetDests)lib.resolve( "cupsGetDests" ); - CupsFreeDests _cupsFreeDests = (CupsFreeDests)lib.resolve( "cupsFreeDests" ); - if ( _cupsGetDests ) { - nd = _cupsGetDests( &d ); - if ( nd < 1 ) - return 0; - - int n = 0; - while ( n < nd ) { - perhapsAddPrinter( printers, d[n].name, - TQPrintDialog::tr("Unknown Location"), 0 ); - if ( d[n].is_default && !defaultPrinter ) - defaultPrinter = tqstrdup( d[n].instance ); - n++; - } - if ( _cupsFreeDests ) { - _cupsFreeDests(nd, d); - } - } - return defaultPrinter; -} -#endif - -static TQPrintDialog * globalPrintDialog = 0; - -static void qpd_cleanup_globaldialog() -{ - if ( globalPrintDialog != 0 ) - delete globalPrintDialog; - globalPrintDialog = 0; -} - -/*! - \class TQPrintDialog ntqprintdialog.h - - \brief The TQPrintDialog class provides a dialog for specifying - the printer's configuration. - - \internal - - \warning The use of this class is not recommended since it is not - present on all platforms; use TQPrinter::setup() instead. - - \omit - - (ingroup dialogs) - - THIS DOCUMENTATION IS Not Revised. It must be revised before - becoming public API. - - It encompasses both the sort of details needed for doing a simple - print-out and some print configuration setup. - - The easiest way to use the class is through the static - function getPrinterSetup(). You can also subclass the TQPrintDialog - and add some custom buttons with addButton() to extend the - functionality of the print dialog. - -
                - The printer dialog, on a large screen, in Motif style. -*/ - - -/*! Constructs a new modal printer dialog that configures \a prn and is a - child of \a parent named \a name. -*/ - -TQPrintDialog::TQPrintDialog( TQPrinter *prn, TQWidget *parent, const char *name ) - : TQDialog( parent, name, TRUE ) -{ - d = new TQPrintDialogPrivate; - d->numCopies = 1; - - TQBoxLayout * tll = new TQBoxLayout( this, TQBoxLayout::Down, 12, 0 ); - - // destination - TQGroupBox * g; - g = setupDestination(); - tll->addWidget( g, 1 ); - - tll->addSpacing( 12 ); - - // printer and paper settings - TQBoxLayout * lay = new TQBoxLayout( TQBoxLayout::LeftToRight ); - tll->addLayout( lay ); - - g = setupPrinterSettings(); - lay->addWidget( g, 1 ); - - lay->addSpacing( 12 ); - - g = setupPaper(); - lay->addWidget( g ); - - tll->addSpacing( 12 ); - - // options - g = setupOptions(); - tll->addWidget( g ); - tll->addSpacing( 12 ); - - TQBoxLayout *l = new TQBoxLayout( TQBoxLayout::LeftToRight ); - d->customLayout = new TQBoxLayout( TQBoxLayout::LeftToRight ); - tll->addLayout( l ); - l->addLayout( d->customLayout ); - l->addStretch(); - tll->addSpacing( 12 ); - - // buttons - TQBoxLayout *horiz = new TQBoxLayout( TQBoxLayout::LeftToRight ); - tll->addLayout( horiz ); - - bool rightalign = - bool(style().styleHint(TQStyle::SH_PrintDialog_RightAlignButtons, this)); - - if (rightalign) - horiz->addStretch( 1 ); - - d->ok = new TQPushButton( this, "ok" ); - d->ok->setText( tr("OK") ); - d->ok->setDefault( TRUE ); - horiz->addWidget( d->ok ); - if (! rightalign) - horiz->addStretch( 1 ); - horiz->addSpacing( 6 ); - - TQPushButton * cancel = new TQPushButton( this, "cancel" ); - cancel->setText( tr("Cancel") ); - horiz->addWidget( cancel ); - - TQSize s1 = d->ok->sizeHint(); - TQSize s2 = cancel->sizeHint(); - s1 = TQSize( TQMAX(s1.width(), s2.width()), - TQMAX(s1.height(), s2.height()) ); - - d->ok->setFixedSize( s1 ); - cancel->setFixedSize( s1 ); - - tll->activate(); - - connect( d->ok, TQ_SIGNAL(clicked()), TQ_SLOT(okClicked()) ); - connect( cancel, TQ_SIGNAL(clicked()), TQ_SLOT(reject()) ); - - TQSize ms( minimumSize() ); - TQSize ss( TQApplication::desktop()->screenGeometry( pos() ).size() ); - if ( ms.height() < 512 && ss.height() >= 600 ) - ms.setHeight( 512 ); - else if ( ms.height() < 460 && ss.height() >= 480 ) - ms.setHeight( 460 ); - resize( ms ); - - setPrinter( prn, TRUE ); - d->printers->setFocus(); -} - - -/*! Destroys the object and frees any allocated resources. Does not - delete the associated TQPrinter object. -*/ - -TQPrintDialog::~TQPrintDialog() -{ - if ( this == globalPrintDialog ) - globalPrintDialog = 0; - delete d; -} - -/*! - This method allows you to specify a global print dialog, given in \a - pd, that will be used instead of the default dialog provided by TQt. - - This is useful, since there are many different printing systems on - Unix, and we cannot support all of them. Calling this method before - using a printer for the first time allows you to set up your own - print dialog. - - \sa setupPrinters() -*/ -void TQPrintDialog::setGlobalPrintDialog( TQPrintDialog *pd ) -{ - TQPrintDialog *oldPd = globalPrintDialog; - globalPrintDialog = pd; - if ( oldPd ) - delete oldPd; - else - tqAddPostRoutine( qpd_cleanup_globaldialog ); - globalPrintDialog->adjustSize(); -} - -TQGroupBox * TQPrintDialog::setupPrinterSettings() -{ - TQGroupBox * g = new TQGroupBox( 1, Horizontal, tr( "Printer settings"), - this, "settings group box" ); - - d->colorMode = new TQButtonGroup( this ); - d->colorMode->hide(); - connect( d->colorMode, TQ_SIGNAL(clicked(int)), - this, TQ_SLOT(colorModeSelected(int)) ); - - TQRadioButton *rb; - rb = new TQRadioButton( tr( "Print in color if available" ), - g, "color" ); - d->colorMode->insert( rb, TQPrinter::Color ); - rb->setChecked( TRUE ); - - rb = new TQRadioButton( tr("Print in grayscale"), - g, "graysacle" ); - d->colorMode->insert( rb, TQPrinter::GrayScale ); - - return g; -} - -TQGroupBox * TQPrintDialog::setupDestination() -{ - TQGroupBox * g = new TQGroupBox( 0, Horizontal, tr( "Print destination"), - this, "destination group box" ); - - TQBoxLayout * tll = new TQBoxLayout( g->layout(), TQBoxLayout::Down ); - - d->printerOrFile = new TQButtonGroup( this ); - d->printerOrFile->hide(); - connect( d->printerOrFile, TQ_SIGNAL(clicked(int)), - this, TQ_SLOT(printerOrFileSelected(int)) ); - - // printer radio button, list - TQRadioButton * rb = new TQRadioButton( tr( "Print to printer:" ), g, - "printer" ); - tll->addWidget( rb ); - d->printerOrFile->insert( rb, 0 ); - rb->setChecked( TRUE ); - d->outputToFile = FALSE; - - TQBoxLayout * horiz = new TQBoxLayout( TQBoxLayout::LeftToRight ); - tll->addLayout( horiz, 3 ); - horiz->addSpacing( 19 ); - - d->printers = new TQListView( g, "list of printers" ); - d->printers->setAllColumnsShowFocus( TRUE ); - d->printers->addColumn( tr("Printer"), 125 ); - d->printers->addColumn( tr("Host"), 125 ); - d->printers->addColumn( tr("Comment"), 150 ); - -#if defined(Q_OS_UNIX) - char * etcLpDefault = 0; - -#ifndef TQT_NO_CUPS - etcLpDefault = parseCupsOutput( d->printers ); -#endif - if ( d->printers->childCount() == 0 ) { - // we only use other schemes when cups fails. - - parsePrintcap( d->printers, TQString::fromLatin1("/etc/printcap") ); - parseEtcLpMember( d->printers ); - parseSpoolInterface( d->printers ); - parseQconfig( d->printers ); - if ( addPrinterHook ) - (*addPrinterHook)( d->printers ); - - TQFileInfo f; - f.setFile( TQString::fromLatin1("/etc/lp/printers") ); - if ( f.isDir() ) { - parseEtcLpPrinters( d->printers ); - TQFile def( TQString::fromLatin1("/etc/lp/default") ); - if ( def.open( IO_ReadOnly ) ) { - if ( etcLpDefault ) - delete[] etcLpDefault; - etcLpDefault = new char[1025]; - def.readLine( etcLpDefault, 1024 ); - char * p = etcLpDefault; - while ( p && *p ) { - if ( !isprint((uchar) *p) || isspace((uchar) *p) ) - *p = 0; - else - p++; - } - } - } - - char * def = 0; - f.setFile( TQString::fromLatin1("/etc/nsswitch.conf") ); - if ( f.isFile() ) { - def = parseNsswitchConf( d->printers ); - } else { - f.setFile( TQString::fromLatin1("/etc/printers.conf") ); - if ( f.isFile() ) - def = parsePrintersConf( d->printers ); - } - - if ( def ) { - if ( etcLpDefault ) - delete[] etcLpDefault; - etcLpDefault = def; - } - } - - // all printers hopefully known. try to find a good default - TQString dollarPrinter; - { - const char * t = getenv( "PRINTER" ); - if ( !t || !*t ) - t = getenv( "LPDEST" ); - dollarPrinter = TQString::fromLatin1( t ); - if ( !dollarPrinter.isEmpty() ) - perhapsAddPrinter( d->printers, dollarPrinter, - TQPrintDialog::tr("unknown"), - TQString::fromLatin1("") ); - } - int quality = 0; - - // bang the best default into the listview - const TQListViewItem * lvi = d->printers->firstChild(); - d->printers->setCurrentItem( (TQListViewItem *)lvi ); - while ( lvi ) { - TQRegExp ps( TQString::fromLatin1("[^a-z]ps(?:[^a-z]|$)") ); - TQRegExp lp( TQString::fromLatin1("[^a-z]lp(?:[^a-z]|$)") ); - - if ( quality < 4 && lvi->text(0) == dollarPrinter ) { - d->printers->setCurrentItem( (TQListViewItem *)lvi ); - quality = 4; - } else if ( quality < 3 && etcLpDefault && - lvi->text(0) == TQString::fromLatin1(etcLpDefault) ) { - d->printers->setCurrentItem( (TQListViewItem *)lvi ); - quality = 3; - } else if ( quality < 2 && - ( lvi->text(0) == TQString::fromLatin1("ps") || - ps.search(lvi->text(2)) != -1 ) ) { - d->printers->setCurrentItem( (TQListViewItem *)lvi ); - quality = 2; - } else if ( quality < 1 && - ( lvi->text(0) == TQString::fromLatin1("lp") || - lp.search(lvi->text(2)) > -1 ) ) { - d->printers->setCurrentItem( (TQListViewItem *)lvi ); - quality = 1; - } - lvi = lvi->nextSibling(); - } - - if ( d->printers->currentItem() ) - d->printers->setSelected( d->printers->currentItem(), TRUE ); - - if ( etcLpDefault ) // Avoid purify complaint - delete[] etcLpDefault; -#endif - - int h = fontMetrics().height(); - if ( d->printers->firstChild() ) - h = d->printers->firstChild()->height(); - d->printers->setMinimumSize( d->printers->sizeHint().width(), - d->printers->header()->height() + - 3 * h ); - horiz->addWidget( d->printers, 3 ); - - tll->addSpacing( 6 ); - - // file radio button, edit/browse - d->printToFileButton = new TQRadioButton( tr( "Print to file:" ), g, "file" ); - tll->addWidget( d->printToFileButton ); - d->printerOrFile->insert( d->printToFileButton, 1 ); - - horiz = new TQBoxLayout( TQBoxLayout::LeftToRight ); - tll->addLayout( horiz ); - horiz->addSpacing( 19 ); - - d->fileName = new TQLineEdit( g, "file name" ); - connect( d->fileName, TQ_SIGNAL( textChanged(const TQString&) ), - this, TQ_SLOT( fileNameEditChanged(const TQString&) ) ); - horiz->addWidget( d->fileName, 1 ); - horiz->addSpacing( 6 ); - d->browse = new TQPushButton( tr("Browse..."), g, "browse files" ); - d->browse->setAutoDefault( FALSE ); -#ifdef TQT_NO_FILEDIALOG - d->browse->setEnabled( FALSE ); -#endif - connect( d->browse, TQ_SIGNAL(clicked()), - this, TQ_SLOT(browseClicked()) ); - horiz->addWidget( d->browse ); - - d->fileName->setEnabled( FALSE ); - d->browse->setEnabled( FALSE ); - - tll->activate(); - - return g; -} - - -TQGroupBox * TQPrintDialog::setupOptions() -{ - TQGroupBox * g = new TQGroupBox( 0, Horizontal, tr( "Options"), - this, "options group box" ); - - TQBoxLayout * tll = new TQBoxLayout( g->layout(), TQBoxLayout::Down ); - - TQBoxLayout *lay = new TQBoxLayout( TQBoxLayout::LeftToRight ); - tll->addLayout( lay ); - - tll = new TQBoxLayout( lay, TQBoxLayout::Down ); - - d->printRange = new TQButtonGroup( this ); - d->printRange->hide(); - connect( d->printRange, TQ_SIGNAL(clicked(int)), - this, TQ_SLOT(printRangeSelected(int)) ); - - d->pageOrder = new TQButtonGroup( this ); - d->pageOrder->hide(); - connect( d->pageOrder, TQ_SIGNAL(clicked(int)), - this, TQ_SLOT(pageOrderSelected(int)) ); - - d->printAllButton = new TQRadioButton( tr("Print all"), g, "print all" ); - d->printRange->insert( d->printAllButton, 0 ); - tll->addWidget( d->printAllButton ); - - d->printSelectionButton = new TQRadioButton( tr("Print selection"), - g, "print selection" ); - d->printRange->insert( d->printSelectionButton, 1 ); - tll->addWidget( d->printSelectionButton ); - - d->printRangeButton = new TQRadioButton( tr("Print range"), - g, "print range" ); - d->printRange->insert( d->printRangeButton, 2 ); - tll->addWidget( d->printRangeButton ); - - TQBoxLayout * horiz = new TQBoxLayout( TQBoxLayout::LeftToRight ); - tll->addLayout( horiz ); - - d->firstPageLabel = new TQLabel( tr("From page:"), g, "first page" ); - horiz->addSpacing( 19 ); - horiz->addWidget( d->firstPageLabel ); - - d->firstPage = new TQPrintDialogSpinBox( 1, 9999, 1, g, "first page" ); - d->firstPage->setValue( 1 ); - horiz->addWidget( d->firstPage, 1 ); - connect( d->firstPage, TQ_SIGNAL(valueChanged(int)), - this, TQ_SLOT(setFirstPage(int)) ); - - horiz = new TQBoxLayout( TQBoxLayout::LeftToRight ); - tll->addLayout( horiz ); - - d->lastPageLabel = new TQLabel( tr("To page:"), g, "last page" ); - horiz->addSpacing( 19 ); - horiz->addWidget( d->lastPageLabel ); - - d->lastPage = new TQPrintDialogSpinBox( 1, 9999, 1, g, "last page" ); - d->lastPage->setValue( 9999 ); - horiz->addWidget( d->lastPage, 1 ); - connect( d->lastPage, TQ_SIGNAL(valueChanged(int)), - this, TQ_SLOT(setLastPage(int)) ); - - lay->addSpacing( 25 ); - tll = new TQBoxLayout( lay, TQBoxLayout::Down ); - - // print order - TQRadioButton * rb = new TQRadioButton( tr("Print first page first"), - g, "first page first" ); - tll->addWidget( rb ); - d->pageOrder->insert( rb, TQPrinter::FirstPageFirst ); - rb->setChecked( TRUE ); - - rb = new TQRadioButton( tr("Print last page first"), - g, "last page first" ); - tll->addWidget( rb ); - d->pageOrder->insert( rb, TQPrinter::LastPageFirst ); - - tll->addStretch(); - - // copies - - horiz = new TQBoxLayout( TQBoxLayout::LeftToRight ); - tll->addLayout( horiz ); - - TQLabel * l = new TQLabel( tr("Number of copies:"), g, "Number of copies" ); - horiz->addWidget( l ); - - d->copies = new TQPrintDialogSpinBox( 1, 99, 1, g, "copies" ); - d->copies->setValue( 1 ); - horiz->addWidget( d->copies, 1 ); - connect( d->copies, TQ_SIGNAL(valueChanged(int)), - this, TQ_SLOT(setNumCopies(int)) ); - - TQSize s = d->firstPageLabel->sizeHint() - .expandedTo( d->lastPageLabel->sizeHint() ) - .expandedTo( l->sizeHint() ); - d->firstPageLabel->setMinimumSize( s ); - d->lastPageLabel->setMinimumSize( s ); - l->setMinimumSize( s.width() + 19, s.height() ); - - tll->activate(); - - return g; -} - - -void isc( TQPrintDialogPrivate * d, - const TQString & text, - TQPrinter::PageSize ps ) -{ - if ( d && text && ps < TQPrinter::NPageSize ) { - d->sizeCombo->insertItem( text, -1 ); - int index = d->sizeCombo->count()-1; - if ( index >= 0 && index < TQPrinter::NPageSize ) - d->indexToPageSize[index] = ps; - } -} - -TQGroupBox * TQPrintDialog::setupPaper() -{ - TQGroupBox * g = new TQGroupBox( 1, Horizontal, tr( "Paper format"), - this, "Paper format" ); - d->pageSize = TQPrinter::A4; - - // page orientation - d->orientationCombo = new TQComboBox( FALSE, g ); - d->orientationCombo->insertItem( tr( "Portrait" ), -1 ); - d->orientationCombo->insertItem( tr( "Landscape" ), -1 ); - - d->orientation = TQPrinter::Portrait; - - g->addSpace( 8 ); - - connect( d->orientationCombo, TQ_SIGNAL( activated(int) ), - this, TQ_SLOT( orientSelected(int) ) ); - - // paper size - d->sizeCombo = new TQComboBox( FALSE, g ); - - int n; - for( n=0; nindexToPageSize[n] = TQPrinter::A4; - - isc( d, tr( "A0 (841 x 1189 mm)" ), TQPrinter::A0 ); - isc( d, tr( "A1 (594 x 841 mm)" ), TQPrinter::A1 ); - isc( d, tr( "A2 (420 x 594 mm)" ), TQPrinter::A2 ); - isc( d, tr( "A3 (297 x 420 mm)" ), TQPrinter::A3 ); - isc( d, tr( "A4 (210x297 mm, 8.26x11.7 inches)" ), TQPrinter::A4 ); - isc( d, tr( "A5 (148 x 210 mm)" ), TQPrinter::A5 ); - isc( d, tr( "A6 (105 x 148 mm)" ), TQPrinter::A6 ); - isc( d, tr( "A7 (74 x 105 mm)" ), TQPrinter::A7 ); - isc( d, tr( "A8 (52 x 74 mm)" ), TQPrinter::A8 ); - isc( d, tr( "A9 (37 x 52 mm)" ), TQPrinter::A9 ); - isc( d, tr( "B0 (1000 x 1414 mm)" ), TQPrinter::B0 ); - isc( d, tr( "B1 (707 x 1000 mm)" ), TQPrinter::B1 ); - isc( d, tr( "B2 (500 x 707 mm)" ), TQPrinter::B2 ); - isc( d, tr( "B3 (353 x 500 mm)" ), TQPrinter::B3 ); - isc( d, tr( "B4 (250 x 353 mm)" ), TQPrinter::B4 ); - isc( d, tr( "B5 (176 x 250 mm, 6.93x9.84 inches)" ), TQPrinter::B5 ); - isc( d, tr( "B6 (125 x 176 mm)" ), TQPrinter::B6 ); - isc( d, tr( "B7 (88 x 125 mm)" ), TQPrinter::B7 ); - isc( d, tr( "B8 (62 x 88 mm)" ), TQPrinter::B8 ); - isc( d, tr( "B9 (44 x 62 mm)" ), TQPrinter::B9 ); - isc( d, tr( "B10 (31 x 44 mm)" ), TQPrinter::B10 ); - isc( d, tr( "C5E (163 x 229 mm)" ), TQPrinter::C5E ); - isc( d, tr( "DLE (110 x 220 mm)" ), TQPrinter::DLE ); - isc( d, tr( "Executive (7.5x10 inches, 191x254 mm)" ), TQPrinter::Executive ); - isc( d, tr( "Folio (210 x 330 mm)" ), TQPrinter::Folio ); - isc( d, tr( "Ledger (432 x 279 mm)" ), TQPrinter::Ledger ); - isc( d, tr( "Legal (8.5x14 inches, 216x356 mm)" ), TQPrinter::Legal ); - isc( d, tr( "Letter (8.5x11 inches, 216x279 mm)" ), TQPrinter::Letter ); - isc( d, tr( "Tabloid (279 x 432 mm)" ), TQPrinter::Tabloid ); - isc( d, tr( "US Common #10 Envelope (105 x 241 mm)" ), TQPrinter::Comm10E ); - - connect( d->sizeCombo, TQ_SIGNAL( activated(int) ), - this, TQ_SLOT( paperSizeSelected(int) ) ); - - return g; -} - - -/*! - Display a dialog and allow the user to configure the TQPrinter \a - p for an optional widget \a w. Returns TRUE if the user clicks OK or - presses Enter, FALSE if the user clicks Cancel or presses Esc. - - getPrinterSetup() remembers the settings and provides the same - settings the next time the dialog is shown. -*/ - -bool TQPrintDialog::getPrinterSetup( TQPrinter * p, TQWidget* w ) -{ - if ( !globalPrintDialog ) { - globalPrintDialog = new TQPrintDialog( 0, 0, "global print dialog" ); -#ifndef TQT_NO_WIDGET_TOPEXTRA - globalPrintDialog->setCaption( TQPrintDialog::tr( "Setup Printer" ) ); -#endif - tqAddPostRoutine( qpd_cleanup_globaldialog ); - globalPrintDialog->setPrinter( p, TRUE ); - globalPrintDialog->adjustSize(); - } else { - globalPrintDialog->setPrinter( p, TRUE ); - } - globalPrintDialog->adjustPosition( w ); - #ifndef TQT_NO_WIDGET_TOPEXTRA - if ( w ) { - const TQPixmap *pm = w->icon(); - if ( pm && !pm->isNull() ) - globalPrintDialog->setIcon( *pm ); - else { - w = w ? w->topLevelWidget() : 0; - pm = w ? w->icon() : 0; - if ( pm && !pm->isNull() ) - globalPrintDialog->setIcon( *pm ); - } - } -#endif - bool r = globalPrintDialog->exec() == TQDialog::Accepted; - globalPrintDialog->setPrinter( 0 ); - return r; -} - - -void TQPrintDialog::printerOrFileSelected( int id ) -{ - d->outputToFile = id ? TRUE : FALSE; - if ( d->outputToFile ) { - d->ok->setEnabled( TRUE ); - fileNameEditChanged( d->fileName->text() ); - if ( !d->fileName->edited() && d->fileName->text().isEmpty() ) { - TQString home = TQString::fromLatin1( ::getenv( "HOME" ) ); - TQString cur = TQDir::currentDirPath(); - if ( home.at(home.length()-1) != '/' ) - home += '/'; - if ( cur.at(cur.length()-1) != '/' ) - cur += '/'; - if ( cur.left( home.length() ) != home ) - cur = home; -#ifdef TQ_WS_X11 - cur += "print.ps"; -#endif - d->fileName->setText( cur ); - d->fileName->setCursorPosition( cur.length() ); - d->fileName->selectAll(); - } - d->browse->setEnabled( TRUE ); - d->fileName->setEnabled( TRUE ); - d->fileName->setFocus(); - d->printers->setEnabled( FALSE ); - } else { - d->ok->setEnabled( d->printers->childCount() != 0 ); - d->printers->setEnabled( TRUE ); - if ( d->fileName->hasFocus() || d->browse->hasFocus() ) - d->printers->setFocus(); - d->browse->setEnabled( FALSE ); - d->fileName->setEnabled( FALSE ); - } -} - - -void TQPrintDialog::landscapeSelected( int id ) -{ - d->orientation = (TQPrinter::Orientation)id; -} - - -void TQPrintDialog::paperSizeSelected( int id ) -{ - if ( id < TQPrinter::NPageSize ) - d->pageSize = TQPrinter::PageSize( d->indexToPageSize[id] ); -} - - -void TQPrintDialog::orientSelected( int id ) -{ - d->orientation = (TQPrinter::Orientation)id; -} - - -void TQPrintDialog::pageOrderSelected( int id ) -{ - d->pageOrder2 = (TQPrinter::PageOrder)id; -} - - -void TQPrintDialog::setNumCopies( int copies ) -{ - d->numCopies = copies; -} - - -void TQPrintDialog::browseClicked() -{ -#ifndef TQT_NO_FILEDIALOG - TQString fn = TQFileDialog::getSaveFileName( d->fileName->text(), tr( "PostScript Files (*.ps);;All Files (*)" ), this ); - if ( !fn.isNull() ) - d->fileName->setText( fn ); -#endif -} - - -void TQPrintDialog::okClicked() -{ - d->lastPage->interpretText(); - d->firstPage->interpretText(); - d->copies->interpretText(); - if ( d->outputToFile ) { - d->printer->setOutputToFile( TRUE ); - d->printer->setOutputFileName( d->fileName->text() ); - } else { - d->printer->setOutputToFile( FALSE ); - TQListViewItem * l = d->printers->currentItem(); - if ( l ) - d->printer->setPrinterName( l->text( 0 ) ); - } - - d->printer->setOrientation( d->orientation ); - d->printer->setPageSize( d->pageSize ); - d->printer->setPageOrder( d->pageOrder2 ); - d->printer->setColorMode( d->colorMode2 ); - d->printer->setNumCopies( d->numCopies ); - if ( d->printAllButton->isChecked() ) { - d->printer->setPrintRange(TQPrinter::AllPages); - d->printer->setFromTo( d->printer->minPage(), d->printer->maxPage() ); - } else { - if (d->printSelectionButton->isChecked()) - d->printer->setPrintRange(TQPrinter::Selection); - else - d->printer->setPrintRange(TQPrinter::PageRange); - d->printer->setFromTo( d->firstPage->value(), d->lastPage->value() ); - } - - accept(); -} - - -void TQPrintDialog::printRangeSelected( int id ) -{ - bool enable = id == 2 ? TRUE : FALSE; - d->firstPage->setEnabled( enable ); - d->lastPage->setEnabled( enable ); - d->firstPageLabel->setEnabled( enable ); - d->lastPageLabel->setEnabled( enable ); -} - - -void TQPrintDialog::setFirstPage( int fp ) -{ - if ( d->printer ) - d->lastPage->setRange( fp, TQMAX(fp, TQPrintDialog::d->printer->maxPage()) ); -} - - -void TQPrintDialog::setLastPage( int lp ) -{ - if ( d->printer ) - d->firstPage->setRange( TQMIN(lp, TQPrintDialog::d->printer->minPage()), lp ); -} - - -/*! - Sets this dialog to configure printer \a p, or no printer if \a p - is null. If \a pickUpSettings is TRUE, the dialog reads most of - its settings from \a p. If \a pickUpSettings is FALSE (the - default) the dialog keeps its old settings. -*/ - -void TQPrintDialog::setPrinter( TQPrinter * p, bool pickUpSettings ) -{ - d->printer = p; - - if ( p && pickUpSettings ) { - // top to botton in the old dialog. - // printer or file - d->printerOrFile->setButton( p->outputToFile() ); - printerOrFileSelected( p->outputToFile() ); - - // printer name - if ( !!p->printerName() ) { - TQListViewItem * i = d->printers->firstChild(); - while ( i && i->text( 0 ) != p->printerName() ) - i = i->nextSibling(); - if ( i ) { - d->printers->setSelected( i, TRUE ); - d->ok->setEnabled( TRUE ); - } else if ( d->fileName->text().isEmpty() ) { - d->ok->setEnabled( d->printers->childCount() != 0 ); - } - } - - // print command does not exist any more - - // file name - d->printToFileButton->setEnabled( d->printer->isOptionEnabled( TQPrinter::PrintToFile ) ); - d->fileName->setText( p->outputFileName() ); - - // orientation - d->orientationCombo->setCurrentItem( (int)p->orientation() ); - orientSelected( p->orientation() ); - - // page size - int n = 0; - while ( n < TQPrinter::NPageSize && - d->indexToPageSize[n] != p->pageSize() ) - n++; - d->sizeCombo->setCurrentItem( n ); - paperSizeSelected( n ); - - // New stuff (Options) - - // page order - d->pageOrder->setButton( (int)p->pageOrder() ); - pageOrderSelected( p->pageOrder() ); - - // color mode - d->colorMode->setButton( (int)p->colorMode() ); - colorModeSelected( p->colorMode() ); - - // number of copies - d->copies->setValue( p->numCopies() ); - setNumCopies( p->numCopies() ); - } - - if( p ) { - d->printAllButton->setEnabled( TRUE ); - d->printSelectionButton - ->setEnabled( d->printer->isOptionEnabled( TQPrinter::PrintSelection ) ); - d->printRangeButton - ->setEnabled( d->printer->isOptionEnabled( TQPrinter::PrintPageRange ) ); - - TQPrinter::PrintRange range = p->printRange(); - switch ( range ) { - case TQPrinter::AllPages: - d->printAllButton->setChecked(TRUE); - printRangeSelected( d->printRange->id( d->printAllButton ) ); - break; - case TQPrinter::Selection: - d->printSelectionButton->setChecked(TRUE); - printRangeSelected( d->printRange->id( d->printSelectionButton ) ); - break; - case TQPrinter::PageRange: - d->printRangeButton->setChecked(TRUE); - printRangeSelected( d->printRange->id( d->printRangeButton ) ); - break; - } - } - - if ( p && p->maxPage() ) { - d->firstPage->setRange( p->minPage(), p->maxPage() ); - d->lastPage->setRange( p->minPage(), p->maxPage() ); - if ( p->fromPage() || p->toPage() ) { - setFirstPage( p->fromPage() ); - setLastPage( p->toPage() ); - d->firstPage->setValue(p->fromPage()); - d->lastPage->setValue(p->toPage()); - } - } -} - - -/*! Returns a pointer to the printer this dialog configures, or 0 if - this dialog does not operate on any printer. */ - -TQPrinter * TQPrintDialog::printer() const -{ - return d->printer; -} - - -void TQPrintDialog::colorModeSelected( int id ) -{ - d->colorMode2 = (TQPrinter::ColorMode)id; -} - -/*! - Adds the button \a but to the layout of the print dialog. The added - buttons are arranged from the left to the right below the - last groupbox of the printdialog. -*/ - -void TQPrintDialog::addButton( TQPushButton *but ) -{ - d->customLayout->addWidget( but ); -} - -void TQPrintDialog::fileNameEditChanged( const TQString &text ) -{ - if ( d->fileName->isEnabled() ) - d->ok->setEnabled( !text.isEmpty() ); -} - -#endif diff --git a/src/dialogs/qt_dialogs.pri b/src/dialogs/qt_dialogs.pri index 9702afad1..555633b88 100644 --- a/src/dialogs/qt_dialogs.pri +++ b/src/dialogs/qt_dialogs.pri @@ -8,7 +8,7 @@ dialogs { $$DIALOGS_H/tqerrormessage.h \ $$DIALOGS_H/tqfiledialog.h \ $$DIALOGS_H/tqfontdialog.h \ - $$DIALOGS_H/ntqmessagebox.h \ + $$DIALOGS_H/tqmessagebox.h \ $$DIALOGS_H/tqprogressdialog.h \ $$DIALOGS_H/tqtabdialog.h \ $$DIALOGS_H/tqwizard.h \ @@ -16,15 +16,15 @@ dialogs { !embedded:mac:SOURCES += $$DIALOGS_CPP/tqfiledialog_mac.cpp $$DIALOGS_CPP/tqcolordialog_mac.cpp win32:SOURCES += $$DIALOGS_CPP/tqfiledialog_win.cpp - unix:SOURCES += $$DIALOGS_CPP/qprintdialog.cpp - unix:HEADERS += $$DIALOGS_H/ntqprintdialog.h + unix:SOURCES += $$DIALOGS_CPP/tqprintdialog.cpp + unix:HEADERS += $$DIALOGS_H/tqprintdialog.h SOURCES += $$DIALOGS_CPP/tqcolordialog.cpp \ $$DIALOGS_CPP/tqdialog.cpp \ $$DIALOGS_CPP/tqerrormessage.cpp \ $$DIALOGS_CPP/tqfiledialog.cpp \ $$DIALOGS_CPP/tqfontdialog.cpp \ - $$DIALOGS_CPP/qmessagebox.cpp \ + $$DIALOGS_CPP/tqmessagebox.cpp \ $$DIALOGS_CPP/tqprogressdialog.cpp \ $$DIALOGS_CPP/tqtabdialog.cpp \ $$DIALOGS_CPP/tqwizard.cpp \ diff --git a/src/dialogs/tqdialog.cpp b/src/dialogs/tqdialog.cpp index 1f620cb6a..42853e00a 100644 --- a/src/dialogs/tqdialog.cpp +++ b/src/dialogs/tqdialog.cpp @@ -344,8 +344,8 @@ void TQDialog::hideDefault() Hides special buttons which are rather shown in the titlebar on WinCE, to conserve screen space. */ -# include "ntqmessagebox.h" -extern const char * mb_texts[]; // Defined in qmessagebox.cpp +# include "tqmessagebox.h" +extern const char * mb_texts[]; // Defined in tqmessagebox.cpp void TQDialog::hideSpecial() { // "OK" buttons are hidden, and (Ok) shown on titlebar diff --git a/src/dialogs/tqerrormessage.cpp b/src/dialogs/tqerrormessage.cpp index 2caa09498..f99db2c7a 100644 --- a/src/dialogs/tqerrormessage.cpp +++ b/src/dialogs/tqerrormessage.cpp @@ -47,7 +47,7 @@ #include "tqdict.h" #include "tqlabel.h" #include "tqlayout.h" -#include "ntqmessagebox.h" +#include "tqmessagebox.h" #include "tqpushbutton.h" #include "tqstringlist.h" #include "tqstylesheet.h" diff --git a/src/dialogs/tqfiledialog.cpp b/src/dialogs/tqfiledialog.cpp index 77de59b62..9937f69a7 100644 --- a/src/dialogs/tqfiledialog.cpp +++ b/src/dialogs/tqfiledialog.cpp @@ -75,7 +75,7 @@ #include "tqlistbox.h" #include "tqlistview.h" #include "tqmap.h" -#include "ntqmessagebox.h" +#include "tqmessagebox.h" #include "tqmime.h" #include "tqnetworkprotocol.h" #include "tqobjectlist.h" diff --git a/src/dialogs/tqmessagebox.cpp b/src/dialogs/tqmessagebox.cpp new file mode 100644 index 000000000..2a7178260 --- /dev/null +++ b/src/dialogs/tqmessagebox.cpp @@ -0,0 +1,1664 @@ +/**************************************************************************** +** +** Implementation of TQMessageBox class +** +** Created : 950503 +** +** Copyright (C) 1992-2008 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 files LICENSE.GPL2 +** and LICENSE.GPL3 included in the packaging of this file. +** Alternatively you may (at your option) use any later version +** of the GNU General Public License if such license has been +** publicly approved by Trolltech ASA (or its successors, if any) +** and the KDE Free TQt Foundation. +** +** Please review the following information to ensure GNU General +** Public Licensing requirements will be met: +** http://trolltech.com/products/qt/licenses/licensing/opensource/. +** If you are unsure which license is appropriate for your use, please +** review the following information: +** http://trolltech.com/products/qt/licenses/licensing/licensingoverview +** or contact the sales department at sales@trolltech.com. +** +** This file may be used under the terms of the Q Public License as +** defined by Trolltech ASA and appearing in the file LICENSE.TQPL +** included in the packaging of this file. Licensees holding valid TQt +** Commercial licenses may use this file in accordance with the TQt +** Commercial License Agreement provided with the Software. +** +** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, +** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted +** herein. +** +**********************************************************************/ + +#include "tqmessagebox.h" + +#ifndef TQT_NO_MESSAGEBOX + +#include "tqaccel.h" +#include "tqlabel.h" +#include "tqpushbutton.h" +#include "tqimage.h" +#include "ntqapplication.h" +#include "tqstyle.h" +#include "tqobjectlist.h" +#if defined(QT_ACCESSIBILITY_SUPPORT) +#include "tqaccessible.h" +#endif + +#ifdef TQ_WS_X11 +#include "private/tqttdeintegration_x11_p.h" +#endif + +extern bool tqt_use_native_dialogs; + +// Internal class - don't touch + +class TQMessageBoxLabel : public TQLabel +{ + TQ_OBJECT +public: + TQMessageBoxLabel( TQWidget* parent ) : TQLabel( parent, "messageBoxText") + { + setAlignment( AlignAuto|ExpandTabs ); + } +}; +#include "tqmessagebox.moc" + + + +// the TQt logo, for aboutTQt +/* XPM */ +static const char * const qtlogo_xpm[] = { +/* width height ncolors chars_per_pixel */ +"50 50 17 1", +/* colors */ +" c #000000", +". c #495808", +"X c #2A3304", +"o c #242B04", +"O c #030401", +"+ c #9EC011", +"@ c #93B310", +"# c #748E0C", +"$ c #A2C511", +"% c #8BA90E", +"& c #99BA10", +"* c #060701", +"= c #181D02", +"- c #212804", +"; c #61770A", +": c #0B0D01", +"/ c None", +/* pixels */ +"/$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$/", +"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$", +"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$", +"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$", +"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$", +"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$", +"$$$$$$$$$$$$$$$$$$$$$$$+++$$$$$$$$$$$$$$$$$$$$$$$$", +"$$$$$$$$$$$$$$$$$$$@;.o=::=o.;@$$$$$$$$$$$$$$$$$$$", +"$$$$$$$$$$$$$$$$+#X* **X#+$$$$$$$$$$$$$$$$", +"$$$$$$$$$$$$$$$#oO* O **o#+$$$$$$$$$$$$$$", +"$$$$$$$$$$$$$&.* OO O*.&$$$$$$$$$$$$$", +"$$$$$$$$$$$$@XOO * OO X&$$$$$$$$$$$$", +"$$$$$$$$$$$@XO OO O **:::OOO OOO X@$$$$$$$$$$$", +"$$$$$$$$$$&XO O-;#@++@%.oOO X&$$$$$$$$$$", +"$$$$$$$$$$.O : *-#+$$$$$$$$+#- : O O*.$$$$$$$$$$", +"$$$$$$$$$#*OO O*.&$$$$$$$$$$$$+.OOOO **#$$$$$$$$$", +"$$$$$$$$+-OO O *;$$$$$$$$$$$&$$$$;* o+$$$$$$$$", +"$$$$$$$$#O* O .+$$$$$$$$$$@X;$$$+.O *#$$$$$$$$", +"$$$$$$$$X* -&$$$$$$$$$$@- :;$$$&- OX$$$$$$$$", +"$$$$$$$@*O *O#$$$$$$$$$$@oOO**;$$$# O*%$$$$$$$", +"$$$$$$$; -+$$$$$$$$$@o O OO ;+$$-O *;$$$$$$$", +"$$$$$$$. ;$$$$$$$$$@-OO OO X&$$;O .$$$$$$$", +"$$$$$$$o *#$$$$$$$$@o O O O-@$$$#O *o$$$$$$$", +"$$$$$$+= *@$$$$$$$@o* OO -@$$$$&: =$$$$$$$", +"$$$$$$+: :+$$$$$$@- *-@$$$$$$: :+$$$$$$", +"$$$$$$+: :+$$$$$@o* O *-@$$$$$$: :+$$$$$$", +"$$$$$$$= :@$$$$@o*OOO -@$$$$@: =+$$$$$$", +"$$$$$$$- O%$$$@o* O O O O-@$$$#* OX$$$$$$$", +"$$$$$$$. O *O;$$&o O*O* *O -@$$; O.$$$$$$$", +"$$$$$$$;* Oo+$$;O*O:OO-- Oo@+= *;$$$$$$$", +"$$$$$$$@* O O#$$$;*OOOo@@-O Oo;O* **@$$$$$$$", +"$$$$$$$$X* OOO-+$$$;O o@$$@- O O OX$$$$$$$$", +"$$$$$$$$#* * O.$$$$;X@$$$$@-O O O#$$$$$$$$", +"$$$$$$$$+oO O OO.+$$+&$$$$$$@-O o+$$$$$$$$", +"$$$$$$$$$#* **.&$$$$$$$$$$@o OO:#$$$$$$$$$", +"$$$$$$$$$+. O* O-#+$$$$$$$$+;O OOO:@$$$$$$$$$", +"$$$$$$$$$$&X *O -;#@++@#;=O O -@$$$$$$$$", +"$$$$$$$$$$$&X O O*O::::O OO Oo@$$$$$$$", +"$$$$$$$$$$$$@XOO OO O*X+$$$$$$", +"$$$$$$$$$$$$$&.* ** O :: *:#$$$$$$$", +"$$$$$$$$$$$$$$$#o*OO O Oo#@-OOO=#$$$$$$$$", +"$$$$$$$$$$$$$$$$+#X:* * O**X#+$$@-*:#$$$$$$$$$", +"$$$$$$$$$$$$$$$$$$$%;.o=::=o.#@$$$$$$@X#$$$$$$$$$$", +"$$$$$$$$$$$$$$$$$$$$$$$$+++$$$$$$$$$$$+$$$$$$$$$$$", +"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$", +"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$", +"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$", +"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$", +"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$", +"/$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$/", +}; + + +/*! + \class TQMessageBox + \brief The TQMessageBox class provides a modal dialog with a short message, an icon, and some buttons. + \ingroup dialogs + \mainclass + + 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 + \table + \row + \i \img tqmessagebox-quest.png + \i Question + \i For message boxes that ask a question as part of normal + operation. Some style guides recommend using Information for this + purpose. + \row + \i \img tqmessagebox-info.png + \i Information + \i For message boxes that are part of normal operation. + \row + \i \img tqmessagebox-warn.png + \i Warning + \i For message boxes that tell the user about unusual errors. + \row + \i \img tqmessagebox-crit.png + \i Critical + \i For message boxes that tell the user about critical errors. + \endtable + + 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: + + \code + TQMessageBox::information( this, "Application name", + "Unable to find the user preferences file.\n" + "The factory default will be used instead." ); + \endcode + + question() is useful for simple yes/no questions: + + \code + 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; + \endcode + + warning() can be used to tell the user about unusual errors, or + errors which can't be easily fixed: + + \code + switch( TQMessageBox::warning( this, "Application name", + "Could not connect to the 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; + } + \endcode + + 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: + + \code + 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; + } + \endcode + + 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: + + \code + 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; + } + \endcode + + 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: + + \code + 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." ); + \endcode + + 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: + + \code + TQMessageBox::about( this, "About ", + " is a \n\n" + "Copyright 1991-2003 Such-and-such. " + "\n\n" + "For technical support, call 1234-56789 or see\n" + "http://www.such-and-such.com/Application/\n" ); + \endcode + + 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: + + \code + 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; + } + \endcode + + TQMessageBox defines two enum types: Icon and an unnamed button type. + Icon defines the \c Question, \c Information, \c Warning, and \c + 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: + \list + \i Ok - the default for single-button message boxes + \i Cancel - note that this is \e not automatically Escape + \i Yes + \i No + \i Abort + \i Retry + \i Ignore + \i YesAll + \i NoAll + \endlist + + Button types can be combined with two modifiers by using OR, '|': + \list + \i Default - makes pressing Enter equivalent to + clicking this button. Normally used with Ok, Yes or similar. + \i Escape - makes pressing Escape equivalent to clicking this button. + Normally used with Abort, Cancel or similar. + \endlist + + 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. + + + + \sa TQDialog, + \link http://www.iarchitect.com/errormsg.htm + Isys on error messages \endlink, + \link guibooks.html#fowler GUI Design Handbook: Message Box \endlink +*/ + + +/*! + \enum TQMessageBox::Icon + + This enum has the following values: + + \value NoIcon the message box does not have any icon. + + \value Question an icon indicating that + the message is asking a question. + + \value Information an icon indicating that + the message is nothing out of the ordinary. + + \value Warning an icon indicating that the + message is a warning, but can be dealt with. + + \value Critical an icon indicating that + the message represents a critical problem. + +*/ + + +struct TQMessageBoxData { + TQMessageBoxData(TQMessageBox* parent) : + iconLabel( parent, "icon" ) + { + } + + int numButtons; // number of buttons + TQMessageBox::Icon icon; // message box icon + TQLabel iconLabel; // label holding any icon + int button[3]; // button types + int defButton; // default button (index) + int escButton; // escape button (index) + TQSize buttonSize; // button size + TQPushButton *pb[3]; // buttons +}; + +static const int LastButton = TQMessageBox::NoAll; + +/* + NOTE: The table of button texts correspond to the button enum. +*/ + +#ifndef Q_OS_TEMP +static const char * const mb_texts[] = { +#else +const char * mb_texts[] = { +#endif + 0, + TQT_TRANSLATE_NOOP("TQMessageBox","OK"), + TQT_TRANSLATE_NOOP("TQMessageBox","Cancel"), + TQT_TRANSLATE_NOOP("TQMessageBox","&Yes"), + TQT_TRANSLATE_NOOP("TQMessageBox","&No"), + TQT_TRANSLATE_NOOP("TQMessageBox","&Abort"), + TQT_TRANSLATE_NOOP("TQMessageBox","&Retry"), + TQT_TRANSLATE_NOOP("TQMessageBox","&Ignore"), + TQT_TRANSLATE_NOOP("TQMessageBox","Yes to &All"), + TQT_TRANSLATE_NOOP("TQMessageBox","N&o to All"), + 0 +}; + +/*! + Constructs a message box with no text and a button with the label + "OK". + + If \a parent is 0, the message box becomes an application-global + modal dialog box. If \a parent is a widget, the message box + becomes modal relative to \a parent. + + The \a parent and \a name arguments are passed to the TQDialog + constructor. +*/ + +TQMessageBox::TQMessageBox( TQWidget *parent, const char *name ) + : TQDialog( parent, name, TRUE, WStyle_Customize | WStyle_DialogBorder | WStyle_Title | WStyle_SysMenu ) +{ + init( Ok, 0, 0 ); +} + + +/*! + Constructs a message box with a \a caption, a \a text, an \a icon, + and up to three buttons. + + The \a icon must be one of the following: + \list + \i TQMessageBox::NoIcon + \i TQMessageBox::Question + \i TQMessageBox::Information + \i TQMessageBox::Warning + \i TQMessageBox::Critical + \endlist + + Each button, \a button0, \a button1 and \a button2, can have one + of the following values: + \list + \i TQMessageBox::NoButton + \i TQMessageBox::Ok + \i TQMessageBox::Cancel + \i TQMessageBox::Yes + \i TQMessageBox::No + \i TQMessageBox::Abort + \i TQMessageBox::Retry + \i TQMessageBox::Ignore + \i TQMessageBox::YesAll + \i TQMessageBox::NoAll + \endlist + + 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 \c TQMessageBox::Default + flag to make it the default button (clicked when Enter is + pressed). + + One of the buttons can be OR-ed with the \c TQMessageBox::Escape + flag to make it the cancel or close button (clicked when Escape is + pressed). + + Example: + \code + 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 + \endcode + + If \a parent is 0, the message box becomes an application-global + modal dialog box. If \a parent is a widget, the message box + becomes modal relative to \a parent. + + If \a modal is TRUE the message box is modal; otherwise it + is modeless. + + The \a parent, \a name, \a modal, and \a f arguments are passed to + the TQDialog constructor. + + \sa setCaption(), setText(), setIcon() +*/ + +TQMessageBox::TQMessageBox( const TQString& caption, + const TQString &text, Icon icon, + int button0, int button1, int button2, + TQWidget *parent, const char *name, + bool modal, WFlags f ) + : TQDialog( parent, name, modal, f | WStyle_Customize | WStyle_DialogBorder | WStyle_Title | WStyle_SysMenu ) +{ + init( button0, button1, button2 ); +#ifndef TQT_NO_WIDGET_TOPEXTRA + setCaption( caption ); +#endif + setText( text ); + setIcon( icon ); +} + + +/*! + Destroys the message box. +*/ + +TQMessageBox::~TQMessageBox() +{ + delete mbd; +} + +static TQString * translatedTextAboutTQt = 0; + +void TQMessageBox::init( int button0, int button1, int button2 ) +{ + if ( !translatedTextAboutTQt ) { + translatedTextAboutTQt = new TQString; + + *translatedTextAboutTQt = tr( + "

                About TQt

                " + "

                This program uses TQt version %1.

                " + "

                TQt is a C++ toolkit for multiplatform GUI & " + "application development.

                " + "

                TQt provides single-source " + "portability across MS Windows, Mac OS X, " + "Linux, and all major commercial Unix variants.

                " + "

                See https://trinitydesktop.org/docs/qt3/ " + "for more information.

                " + ).arg( TQT_VERSION_STR ); + + } + label = new TQMessageBoxLabel( this ); + TQ_CHECK_PTR( label ); + + if ( (button2 && !button1) || (button1 && !button0) ) { +#if defined(QT_CHECK_RANGE) + tqWarning( "TQMessageBox: Inconsistent button parameters" ); +#endif + button0 = button1 = button2 = 0; + } + mbd = new TQMessageBoxData(this); + TQ_CHECK_PTR( mbd ); + mbd->icon = NoIcon; + mbd->iconLabel.setPixmap( TQPixmap() ); + mbd->numButtons = 0; + mbd->button[0] = button0; + mbd->button[1] = button1; + mbd->button[2] = button2; + mbd->defButton = -1; + mbd->escButton = -1; + int i; + for ( i=0; i<3; i++ ) { + int b = mbd->button[i]; + if ( (b & Default) ) { + if ( mbd->defButton >= 0 ) { +#if defined(QT_CHECK_RANGE) + tqWarning( "TQMessageBox: There can be at most one " + "default button" ); +#endif + } else { + mbd->defButton = i; + } + } + if ( (b & Escape) ) { + if ( mbd->escButton >= 0 ) { +#if defined(QT_CHECK_RANGE) + tqWarning( "TQMessageBox: There can be at most one " + "escape button" ); +#endif + } else { + mbd->escButton = i; + } + } + b &= ButtonMask; + if ( b == 0 ) { + if ( i == 0 ) // no buttons, add an Ok button + b = Ok; + } else if ( b < 0 || b > LastButton ) { +#if defined(QT_CHECK_RANGE) + tqWarning( "TQMessageBox: Invalid button specifier" ); +#endif + b = Ok; + } else { + if ( i > 0 && mbd->button[i-1] == 0 ) { +#if defined(QT_CHECK_RANGE) + tqWarning( "TQMessageBox: Inconsistent button parameters; " + "button %d defined but not button %d", + i+1, i ); +#endif + b = 0; + } + } + mbd->button[i] = b; + if ( b ) + mbd->numButtons++; + } + for ( i=0; i<3; i++ ) { + if ( i >= mbd->numButtons ) { + mbd->pb[i] = 0; + } else { + TQCString buttonName; + buttonName.sprintf( "button%d", i+1 ); + mbd->pb[i] = new TQPushButton( + tr(mb_texts[mbd->button[i]]), + this, buttonName ); + if ( mbd->defButton == i ) { + mbd->pb[i]->setDefault( TRUE ); + mbd->pb[i]->setFocus(); + } + mbd->pb[i]->setAutoDefault( TRUE ); + mbd->pb[i]->setFocusPolicy( TQWidget::StrongFocus ); + connect( mbd->pb[i], TQ_SIGNAL(clicked()), TQ_SLOT(buttonClicked()) ); + } + } + resizeButtons(); + reserved1 = reserved2 = 0; +} + + +int TQMessageBox::indexOf( int button ) const +{ + int index = -1; + for ( int i=0; inumButtons; i++ ) { + if ( mbd->button[i] == button ) { + index = i; + break; + } + } + return index; +} + + +void TQMessageBox::resizeButtons() +{ + int i; + TQSize maxSize; + for ( i=0; inumButtons; i++ ) { + TQSize s = mbd->pb[i]->sizeHint(); + maxSize.setWidth( TQMAX(maxSize.width(), s.width()) ); + maxSize.setHeight( TQMAX(maxSize.height(),s.height()) ); + } + mbd->buttonSize = maxSize; + for ( i=0; inumButtons; i++ ) + mbd->pb[i]->resize( maxSize ); +} + + +/*! + \property TQMessageBox::text + \brief 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 (\l + TQMessageBox::textFormat). The default setting is \c 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. + + \sa textFormat +*/ +TQString TQMessageBox::text() const +{ + return label->text(); +} + + +void TQMessageBox::setText( const TQString &text ) +{ + label->setText( text ); +} + + +/*! + \property TQMessageBox::icon + \brief the message box's icon + + The icon of the message box can be one of the following predefined + icons: + \list + \i TQMessageBox::NoIcon + \i TQMessageBox::Question + \i TQMessageBox::Information + \i TQMessageBox::Warning + \i TQMessageBox::Critical + \endlist + + The actual pixmap used for displaying the icon depends on the + current \link TQWidget::style() GUI style\endlink. You can also set + a custom pixmap icon using the \l TQMessageBox::iconPixmap + property. The default icon is TQMessageBox::NoIcon. + + \sa iconPixmap +*/ + +TQMessageBox::Icon TQMessageBox::icon() const +{ + return mbd->icon; +} + +void TQMessageBox::setIcon( Icon icon ) +{ + setIconPixmap( standardIcon(icon) ); + mbd->icon = icon; +} + +/*! + \obsolete + + Returns the pixmap used for a standard icon. This + allows the pixmaps to be used in more complex message boxes. + \a icon specifies the required icon, e.g. TQMessageBox::Information, + TQMessageBox::Warning or TQMessageBox::Critical. + + \a style is unused. +*/ + +TQPixmap TQMessageBox::standardIcon( Icon icon, GUIStyle style) +{ + Q_UNUSED(style); + return TQMessageBox::standardIcon(icon); +} + + +/*! + Returns the pixmap used for a standard icon. This allows the + pixmaps to be used in more complex message boxes. \a icon + specifies the required icon, e.g. TQMessageBox::Question, + TQMessageBox::Information, TQMessageBox::Warning or + TQMessageBox::Critical. +*/ + +TQPixmap TQMessageBox::standardIcon( Icon icon ) +{ + TQPixmap pm; + switch ( icon ) { + case Information: + pm = TQApplication::style().stylePixmap( TQStyle::SP_MessageBoxInformation ); + break; + case Warning: + pm = TQApplication::style().stylePixmap( TQStyle::SP_MessageBoxWarning ); + break; + case Critical: + pm = TQApplication::style().stylePixmap( TQStyle::SP_MessageBoxCritical ); + break; + case Question: + pm = TQApplication::style().stylePixmap( TQStyle::SP_MessageBoxQuestion ); + default: + break; + } + return pm; +} + + +/*! + \property TQMessageBox::iconPixmap + \brief 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. + + \sa icon +*/ + +const TQPixmap *TQMessageBox::iconPixmap() const +{ + return mbd->iconLabel.pixmap(); +} + + +void TQMessageBox::setIconPixmap( const TQPixmap &pixmap ) +{ + mbd->iconLabel.setPixmap(pixmap); + mbd->icon = NoIcon; +} + + +/*! + Returns the text of the message box button \a button, or + TQString::null if the message box does not contain the button. + + \sa setButtonText() +*/ + +TQString TQMessageBox::buttonText( int button ) const +{ + int index = indexOf(button); + return index >= 0 && mbd->pb[index] + ? mbd->pb[index]->text() + : TQString::null; +} + + +/*! + Sets the text of the message box button \a button to \a text. + Setting the text of a button that is not in the message box is + silently ignored. + + \sa buttonText() +*/ + +void TQMessageBox::setButtonText( int button, const TQString &text ) +{ + int index = indexOf(button); + if ( index >= 0 && mbd->pb[index] ) { + mbd->pb[index]->setText( text ); + resizeButtons(); + } +} + + +/*! + \internal + Internal slot to handle button clicks. +*/ + +void TQMessageBox::buttonClicked() +{ + int reply = 0; + const TQObject *s = sender(); + for ( int i=0; inumButtons; i++ ) { + if ( mbd->pb[i] == s ) + reply = mbd->button[i]; + } + done( reply ); +} + + +/*! + 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. +*/ +void TQMessageBox::adjustSize() +{ + if ( !testWState(WState_Polished) ) + polish(); + resizeButtons(); + label->adjustSize(); + TQSize labelSize( label->size() ); + int n = mbd->numButtons; + int bw = mbd->buttonSize.width(); + int bh = mbd->buttonSize.height(); + int border = bh / 2 - style().pixelMetric(TQStyle::PM_ButtonDefaultIndicator); + if ( border <= 0 ) + border = 10; + int btn_spacing = 7; + if ( style().styleHint(TQStyle::SH_GUIStyle) == MotifStyle ) + btn_spacing = border; +#ifndef Q_OS_TEMP + int buttons = mbd->numButtons * bw + (n-1) * btn_spacing; + int h = bh; +#else + int visibleButtons = 0; + for ( int i = 0; i < mbd->numButtons; ++i ) + visibleButtons += mbd->pb[i]->isVisible() ? 1 : 0; + int buttons = visibleButtons == 0 ? 0 : visibleButtons * bw + (visibleButtons-1) * btn_spacing; + int h = visibleButtons == 0 ? 0 : bh; + n = visibleButtons; +#endif + if ( labelSize.height() ) + h += labelSize.height() + 3*border; + else + h += 2*border; + int lmargin = 0; + if ( mbd->iconLabel.pixmap() && mbd->iconLabel.pixmap()->width() ) { + mbd->iconLabel.adjustSize(); + lmargin += mbd->iconLabel.width() + border; + if ( h < mbd->iconLabel.height() + 3*border + bh && n ) + h = mbd->iconLabel.height() + 3*border + bh; + } + int w = TQMAX( buttons, labelSize.width() + lmargin ) + 2*border; + TQRect screen = TQApplication::desktop()->screenGeometry( pos() ); + if ( w > screen.width() ) + w = screen.width(); + resize( w, h ); + setMinimumSize( size() ); +#ifdef TQ_WS_MAC + setMaximumSize(size()); +#endif +} + + +/*!\reimp +*/ +void TQMessageBox::resizeEvent( TQResizeEvent * ) +{ + int i; + int n = mbd->numButtons; + int bw = mbd->buttonSize.width(); + int bh = mbd->buttonSize.height(); +#ifdef Q_OS_TEMP + int visibleButtons = 0; + for ( i = 0; i < n; ++i ) + visibleButtons += mbd->pb[i]->isVisible() ? 1 : 0; + n = visibleButtons; + bw = visibleButtons == 0 ? 0 : bw; + bh = visibleButtons == 0 ? 0 : bh; +#endif + int border = bh / 2 - style().pixelMetric(TQStyle::PM_ButtonDefaultIndicator); + if ( border <= 0 ) + border = 10; + int btn_spacing = 7; + if ( style().styleHint(TQStyle::SH_GUIStyle) == MotifStyle ) + btn_spacing = border; + int lmargin = 0; + mbd->iconLabel.adjustSize(); + bool rtl = TQApplication::reverseLayout(); + if (rtl) + mbd->iconLabel.move(width() - border - mbd->iconLabel.width(), border); + else + mbd->iconLabel.move(border, border); + if ( mbd->iconLabel.pixmap() && mbd->iconLabel.pixmap()->width() ) + lmargin += mbd->iconLabel.width() + border; + label->setGeometry((rtl ? 0 : lmargin) + border, + border, + width() - lmargin -2*border, + height() - 3*border - bh); + int extra_space = (width() - bw*n - 2*border - (n-1)*btn_spacing); + if ( style().styleHint(TQStyle::SH_GUIStyle) == MotifStyle ) + for ( i=0; ipb[rtl ? n - i - 1 : i]->move(border + i*bw + i*btn_spacing + extra_space*(i+1)/(n+1), + height() - border - bh ); + else + for ( i=0; ipb[rtl ? n - i - 1 : i]->move(border + i*bw + extra_space/2 + i*btn_spacing, + height() - border - bh ); +} + + +/*!\reimp +*/ +void TQMessageBox::keyPressEvent( TQKeyEvent *e ) +{ + if ( e->key() == Key_Escape ) { + if ( mbd->escButton >= 0 ) { + TQPushButton *pb = mbd->pb[mbd->escButton]; + pb->animateClick(); + e->accept(); + return; + } + } +#ifndef TQT_NO_ACCEL + if ( !( e->state() & AltButton ) ) { + TQObjectList *list = queryList( "TQPushButton" ); + TQObjectListIt it( *list ); + TQPushButton *pb; + while ( (pb = (TQPushButton*)it.current()) ) { + int key = e->key() & ~(MODIFIER_MASK|UNICODE_ACCEL); + int acc = pb->accel() & ~(MODIFIER_MASK|UNICODE_ACCEL); + if ( key && acc && acc == key ) { + delete list; + emit pb->animateClick(); + return; + } + ++it; + } + delete list; + } +#endif + TQDialog::keyPressEvent( e ); +} + +/*!\reimp +*/ +void TQMessageBox::showEvent( TQShowEvent *e ) +{ +#if defined(QT_ACCESSIBILITY_SUPPORT) + TQAccessible::updateAccessibility( this, 0, TQAccessible::Alert ); +#endif + TQDialog::showEvent( e ); +} + +/*!\reimp +*/ +void TQMessageBox::closeEvent( TQCloseEvent *e ) +{ + TQDialog::closeEvent( e ); + if ( mbd->escButton != -1 ) + setResult( mbd->button[mbd->escButton] ); +} + +/***************************************************************************** + Static TQMessageBox functions + *****************************************************************************/ + +/*!\fn int TQMessageBox::message( const TQString &,const TQString&,const TQString&,TQWidget*,const char * ) + \obsolete + Opens a modal message box directly using the specified parameters. + + Please use information(), warning(), question(), or critical() instead. +*/ + +/*! \fn bool TQMessageBox::query( const TQString &,const TQString&,const TQString&,const TQString&,TQWidget *, const char * ) + \obsolete + Queries the user using a modal message box with two buttons. + Note that \a caption is not always shown, it depends on the window manager. + + Please use information(), question(), warning(), or critical() instead. +*/ + +/*! + Opens an information message box with the caption \a caption and + the text \a text. The dialog may have up to three buttons. Each of + the buttons, \a button0, \a button1 and \a button2 may be set to + one of the following values: + + \list + \i TQMessageBox::NoButton + \i TQMessageBox::Ok + \i TQMessageBox::Cancel + \i TQMessageBox::Yes + \i TQMessageBox::No + \i TQMessageBox::Abort + \i TQMessageBox::Retry + \i TQMessageBox::Ignore + \i TQMessageBox::YesAll + \i TQMessageBox::NoAll + \endlist + + 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 \c TQMessageBox::Default, and one + button can be OR-ed with \c TQMessageBox::Escape. + + Returns the identity (TQMessageBox::Ok, or TQMessageBox::No, etc.) + of the button that was clicked. + + If \a parent is 0, the message box becomes an application-global + modal dialog box. If \a parent is a widget, the message box + becomes modal relative to \a parent. + + \sa question(), warning(), critical() +*/ + +int TQMessageBox::information( TQWidget *parent, + const TQString& caption, const TQString& text, + int button0, int button1, int button2 ) +{ +#if defined(TQ_WS_X11) + if ( tqt_use_native_dialogs && TQTDEIntegration::enabled()) + return TQTDEIntegration::information( parent, caption, text, button0, button1, button2 ); +#endif + TQMessageBox *mb = new TQMessageBox( caption, text, Information, + button0, button1, button2, + parent, "qt_msgbox_information", TRUE, + WDestructiveClose); + TQ_CHECK_PTR( mb ); + return mb->exec(); +} + +/*! + Opens a question message box with the caption \a caption and the + text \a text. The dialog may have up to three buttons. Each of the + buttons, \a button0, \a button1 and \a button2 may be set to one + of the following values: + + \list + \i TQMessageBox::NoButton + \i TQMessageBox::Ok + \i TQMessageBox::Cancel + \i TQMessageBox::Yes + \i TQMessageBox::No + \i TQMessageBox::Abort + \i TQMessageBox::Retry + \i TQMessageBox::Ignore + \i TQMessageBox::YesAll + \i TQMessageBox::NoAll + \endlist + + 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 \c TQMessageBox::Default, and one + button can be OR-ed with \c TQMessageBox::Escape. + + Returns the identity (TQMessageBox::Yes, or TQMessageBox::No, etc.) + of the button that was clicked. + + If \a parent is 0, the message box becomes an application-global + modal dialog box. If \a parent is a widget, the message box + becomes modal relative to \a parent. + + \sa information(), warning(), critical() +*/ + +int TQMessageBox::question( TQWidget *parent, + const TQString& caption, const TQString& text, + int button0, int button1, int button2 ) +{ +#if defined(TQ_WS_X11) + if ( tqt_use_native_dialogs && TQTDEIntegration::enabled()) + return TQTDEIntegration::question( parent, caption, text, button0, button1, button2 ); +#endif + TQMessageBox *mb = new TQMessageBox( caption, text, Question, + button0, button1, button2, + parent, "qt_msgbox_information", TRUE, + WDestructiveClose); + TQ_CHECK_PTR( mb ); + return mb->exec(); +} + + +/*! + Opens a warning message box with the caption \a caption and the + text \a text. The dialog may have up to three buttons. Each of the + button parameters, \a button0, \a button1 and \a button2 may be + set to one of the following values: + + \list + \i TQMessageBox::NoButton + \i TQMessageBox::Ok + \i TQMessageBox::Cancel + \i TQMessageBox::Yes + \i TQMessageBox::No + \i TQMessageBox::Abort + \i TQMessageBox::Retry + \i TQMessageBox::Ignore + \i TQMessageBox::YesAll + \i TQMessageBox::NoAll + \endlist + + 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 \c TQMessageBox::Default, and one + button can be OR-ed with \c TQMessageBox::Escape. + + Returns the identity (TQMessageBox::Ok, or TQMessageBox::No, etc.) + of the button that was clicked. + + If \a parent is 0, the message box becomes an application-global + modal dialog box. If \a parent is a widget, the message box + becomes modal relative to \a parent. + + \sa information(), question(), critical() +*/ + +int TQMessageBox::warning( TQWidget *parent, + const TQString& caption, const TQString& text, + int button0, int button1, int button2 ) +{ +#if defined(TQ_WS_X11) + if ( tqt_use_native_dialogs && TQTDEIntegration::enabled()) + return TQTDEIntegration::warning( parent, caption, text, button0, button1, button2 ); +#endif + TQMessageBox *mb = new TQMessageBox( caption, text, Warning, + button0, button1, button2, + parent, "qt_msgbox_warning", TRUE, + WDestructiveClose); + TQ_CHECK_PTR( mb ); + return mb->exec(); +} + + +/*! + Opens a critical message box with the caption \a caption and the + text \a text. The dialog may have up to three buttons. Each of the + button parameters, \a button0, \a button1 and \a button2 may be + set to one of the following values: + + \list + \i TQMessageBox::NoButton + \i TQMessageBox::Ok + \i TQMessageBox::Cancel + \i TQMessageBox::Yes + \i TQMessageBox::No + \i TQMessageBox::Abort + \i TQMessageBox::Retry + \i TQMessageBox::Ignore + \i TQMessageBox::YesAll + \i TQMessageBox::NoAll + \endlist + + 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 \c TQMessageBox::Default, and one + button can be OR-ed with \c TQMessageBox::Escape. + + Returns the identity (TQMessageBox::Ok, or TQMessageBox::No, etc.) + of the button that was clicked. + + If \a parent is 0, the message box becomes an application-global + modal dialog box. If \a parent is a widget, the message box + becomes modal relative to \a parent. + + \sa information(), question(), warning() +*/ + +int TQMessageBox::critical( TQWidget *parent, + const TQString& caption, const TQString& text, + int button0, int button1, int button2 ) +{ +#if defined(TQ_WS_X11) + if ( tqt_use_native_dialogs && TQTDEIntegration::enabled()) + return TQTDEIntegration::critical( parent, caption, text, button0, button1, button2 ); +#endif + TQMessageBox *mb = new TQMessageBox( caption, text, Critical, + button0, button1, button2, + parent, "qt_msgbox_critical", TRUE, + WDestructiveClose); + TQ_CHECK_PTR( mb ); + return mb->exec(); +} + + +/*! + Displays a simple about box with caption \a caption and text \a + text. The about box's parent is \a parent. + + about() looks for a suitable icon in four locations: + \list 1 + \i It prefers \link TQWidget::icon() parent->icon() \endlink if that exists. + \i If not, it tries the top-level widget containing \a parent. + \i If that fails, it tries the \link + TQApplication::mainWidget() main widget. \endlink + \i As a last resort it uses the Information icon. + \endlist + + The about box has a single button labelled "OK". + + \sa TQWidget::icon() TQApplication::mainWidget() +*/ + +void TQMessageBox::about( TQWidget *parent, const TQString &caption, + const TQString& text ) +{ + TQMessageBox *mb = new TQMessageBox( caption, text, + Information, + Ok + Default, 0, 0, + parent, "qt_msgbox_simple_about_box", TRUE, + WDestructiveClose); + TQ_CHECK_PTR( mb ); +#ifndef TQT_NO_WIDGET_TOPEXTRA + const TQPixmap *pm = parent ? parent->icon() : 0; + if ( pm && !pm->isNull() ) + mb->setIconPixmap( *pm ); + else { + pm = parent ? parent->topLevelWidget()->icon() : 0; + if ( pm && !pm->isNull() ) + mb->setIconPixmap( *pm ); + else { + pm = tqApp && tqApp->mainWidget() ? tqApp->mainWidget()->icon() : 0; + if ( pm && !pm->isNull() ) + mb->setIconPixmap( *pm ); + } + } +#endif + mb->exec(); +} + + +/*! \reimp +*/ + +void TQMessageBox::styleChanged( TQStyle& ) +{ + if ( mbd->icon != NoIcon ) { + // Reload icon for new style + setIcon( mbd->icon ); + } +} + + +static int textBox( TQWidget *parent, TQMessageBox::Icon severity, + const TQString& caption, const TQString& text, + const TQString& button0Text, + const TQString& button1Text, + const TQString& button2Text, + int defaultButtonNumber, + int escapeButtonNumber ) +{ + int b[3]; + b[0] = 1; + b[1] = button1Text.isEmpty() ? 0 : 2; + b[2] = button2Text.isEmpty() ? 0 : 3; + + int i; + for( i=0; i<3; i++ ) { + if ( b[i] && defaultButtonNumber == i ) + b[i] += TQMessageBox::Default; + if ( b[i] && escapeButtonNumber == i ) + b[i] += TQMessageBox::Escape; + } + + TQMessageBox *mb = new TQMessageBox( caption, text, severity, + b[0], b[1], b[2], + parent, "qt_msgbox_information", TRUE, + TQt::WDestructiveClose); + TQ_CHECK_PTR( mb ); + if ( button0Text.isEmpty() ) + mb->setButtonText( 1, TQMessageBox::tr(mb_texts[TQMessageBox::Ok]) ); + else + mb->setButtonText( 1, button0Text ); + if ( b[1] ) + mb->setButtonText( 2, button1Text ); + if ( b[2] ) + mb->setButtonText( 3, button2Text ); + +#ifndef TQT_NO_CURSOR + mb->setCursor( TQt::arrowCursor ); +#endif + return mb->exec() - 1; +} + + +/*! + \overload + + Displays an information message box with caption \a caption, text + \a text and one, two or three buttons. Returns the index of the + button that was clicked (0, 1 or 2). + + \a button0Text is the text of the first button, and is optional. + If \a button0Text is not supplied, "OK" (translated) will be used. + \a button1Text is the text of the second button, and is optional. + \a button2Text is the text of the third button, and is optional. + \a 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). \a + 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 \a parent is 0, the message box becomes an application-global + modal dialog box. If \a parent is a widget, the message box + becomes modal relative to \a 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. + + \sa question(), warning(), critical() +*/ + +int TQMessageBox::information( TQWidget *parent, const TQString &caption, + const TQString& text, + const TQString& button0Text, + const TQString& button1Text, + const TQString& button2Text, + int defaultButtonNumber, + int escapeButtonNumber ) +{ +#if defined(TQ_WS_X11) + if ( tqt_use_native_dialogs && TQTDEIntegration::enabled()) + return TQTDEIntegration::information( parent, caption, text, + button0Text, button1Text, button2Text, defaultButtonNumber, escapeButtonNumber ); +#endif + return textBox( parent, Information, caption, text, + button0Text, button1Text, button2Text, + defaultButtonNumber, escapeButtonNumber ); +} + +/*! + \overload + + Displays a question message box with caption \a caption, text \a + text and one, two or three buttons. Returns the index of the + button that was clicked (0, 1 or 2). + + \a button0Text is the text of the first button, and is optional. + If \a button0Text is not supplied, "OK" (translated) will be used. + \a button1Text is the text of the second button, and is optional. + \a button2Text is the text of the third button, and is optional. + \a 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). \a + 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 \a parent is 0, the message box becomes an application-global + modal dialog box. If \a parent is a widget, the message box + becomes modal relative to \a 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. + + \sa information(), warning(), critical() +*/ +int TQMessageBox::question( TQWidget *parent, const TQString &caption, + const TQString& text, + const TQString& button0Text, + const TQString& button1Text, + const TQString& button2Text, + int defaultButtonNumber, + int escapeButtonNumber ) +{ +#if defined(TQ_WS_X11) + if ( tqt_use_native_dialogs && TQTDEIntegration::enabled()) + return TQTDEIntegration::question( parent, caption, text, + button0Text, button1Text, button2Text, defaultButtonNumber, escapeButtonNumber ); +#endif + return textBox( parent, Question, caption, text, + button0Text, button1Text, button2Text, + defaultButtonNumber, escapeButtonNumber ); +} + + +/*! + \overload + + 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). + + \a button0Text is the text of the first button, and is optional. + If \a button0Text is not supplied, "OK" (translated) will be used. + \a button1Text is the text of the second button, and is optional, + and \a button2Text is the text of the third button, and is + optional. \a 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). \a + 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 \a parent is 0, the message box becomes an application-global + modal dialog box. If \a parent is a widget, the message box + becomes modal relative to \a 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. + + \sa information(), question(), critical() +*/ + +int TQMessageBox::warning( TQWidget *parent, const TQString &caption, + const TQString& text, + const TQString& button0Text, + const TQString& button1Text, + const TQString& button2Text, + int defaultButtonNumber, + int escapeButtonNumber ) +{ +#if defined(TQ_WS_X11) + if ( tqt_use_native_dialogs && TQTDEIntegration::enabled()) + return TQTDEIntegration::warning( parent, caption, text, + button0Text, button1Text, button2Text, defaultButtonNumber, escapeButtonNumber ); +#endif + return textBox( parent, Warning, caption, text, + button0Text, button1Text, button2Text, + defaultButtonNumber, escapeButtonNumber ); +} + + +/*! + \overload + + 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). + + \a button0Text is the text of the first button, and is optional. + If \a button0Text is not supplied, "OK" (translated) will be used. + \a button1Text is the text of the second button, and is optional, + and \a button2Text is the text of the third button, and is + optional. \a 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). \a + 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 \a parent is 0, the message box becomes an application-global + modal dialog box. If \a parent is a widget, the message box + becomes modal relative to \a parent. + + \sa information(), question(), warning() +*/ + +int TQMessageBox::critical( TQWidget *parent, const TQString &caption, + const TQString& text, + const TQString& button0Text, + const TQString& button1Text, + const TQString& button2Text, + int defaultButtonNumber, + int escapeButtonNumber ) +{ +#if defined(TQ_WS_X11) + if ( tqt_use_native_dialogs && TQTDEIntegration::enabled()) + return TQTDEIntegration::critical( parent, caption, text, + button0Text, button1Text, button2Text, defaultButtonNumber, escapeButtonNumber ); +#endif + return textBox( parent, Critical, caption, text, + button0Text, button1Text, button2Text, + defaultButtonNumber, escapeButtonNumber ); +} + + +/*! + Displays a simple message box about TQt, with caption \a caption + and centered over \a parent (if \a 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. + + \sa TQApplication::aboutTQt() +*/ + +void TQMessageBox::aboutTQt( TQWidget *parent, const TQString &caption ) +{ + TQMessageBox *mb = new TQMessageBox( parent, "qt_msgbox_about_qt" ); + TQ_CHECK_PTR( mb ); + mb->setWFlags( WDestructiveClose ); + +#ifndef TQT_NO_WIDGET_TOPEXTRA + TQString c = caption; + if ( c.isNull() ) + c = tr( "About TQt" ); + mb->setCaption( c ); +#endif + mb->setText( *translatedTextAboutTQt ); +#ifndef TQT_NO_IMAGEIO + TQPixmap pm; + TQImage logo( (const char **)qtlogo_xpm); + if ( tqGray(mb->palette().active().text().rgb()) > + tqGray(mb->palette().active().base().rgb()) ) + { + // light on dark, adjust some colors (where's 10?) + logo.setColor( 0, 0xffffffff ); + logo.setColor( 1, 0xff666666 ); + logo.setColor( 2, 0xffcccc66 ); + logo.setColor( 4, 0xffcccccc ); + logo.setColor( 6, 0xffffff66 ); + logo.setColor( 7, 0xff999999 ); + logo.setColor( 8, 0xff3333ff ); + logo.setColor( 9, 0xffffff33 ); + logo.setColor( 11, 0xffcccc99 ); + } + if ( pm.convertFromImage( logo ) ) + mb->setIconPixmap( pm ); +#endif + mb->setButtonText( 0, tr("OK") ); + if ( mb->mbd && mb->mbd->pb[0] ) { + mb->mbd->pb[0]->setAutoDefault( TRUE ); + mb->mbd->pb[0]->setFocusPolicy( TQWidget::StrongFocus ); + mb->mbd->pb[0]->setDefault( TRUE ); + mb->mbd->pb[0]->setFocus(); + } + mb->exec(); +} + +/*! + \reimp +*/ + +void TQMessageBox::setIcon( const TQPixmap &pix ) +{ + //reimplemented to avoid compiler warning. +#ifndef TQT_NO_WIDGET_TOPEXTRA + TQDialog::setIcon( pix ); +#endif +} + + +/*! + \property TQMessageBox::textFormat + \brief the format of the text displayed by the message box + + The current text format used by the message box. See the \l + TQt::TextFormat enum for an explanation of the possible options. + + The default format is \c AutoText. + + \sa setText() +*/ + +TQt::TextFormat TQMessageBox::textFormat() const +{ + return label->textFormat(); +} + + +void TQMessageBox::setTextFormat( TQt::TextFormat format ) +{ + label->setTextFormat( format ); +} + + +#endif diff --git a/src/dialogs/tqmessagebox.h b/src/dialogs/tqmessagebox.h new file mode 100644 index 000000000..a8b563830 --- /dev/null +++ b/src/dialogs/tqmessagebox.h @@ -0,0 +1,223 @@ +/**************************************************************************** +** +** Definition of TQMessageBox class +** +** Created : 950503 +** +** Copyright (C) 1992-2008 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 files LICENSE.GPL2 +** and LICENSE.GPL3 included in the packaging of this file. +** Alternatively you may (at your option) use any later version +** of the GNU General Public License if such license has been +** publicly approved by Trolltech ASA (or its successors, if any) +** and the KDE Free TQt Foundation. +** +** Please review the following information to ensure GNU General +** Public Licensing requirements will be met: +** http://trolltech.com/products/qt/licenses/licensing/opensource/. +** If you are unsure which license is appropriate for your use, please +** review the following information: +** http://trolltech.com/products/qt/licenses/licensing/licensingoverview +** or contact the sales department at sales@trolltech.com. +** +** This file may be used under the terms of the Q Public License as +** defined by Trolltech ASA and appearing in the file LICENSE.TQPL +** included in the packaging of this file. Licensees holding valid TQt +** Commercial licenses may use this file in accordance with the TQt +** Commercial License Agreement provided with the Software. +** +** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, +** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted +** herein. +** +**********************************************************************/ + +#ifndef TQMESSAGEBOX_H +#define TQMESSAGEBOX_H + +#ifndef QT_H +#include "tqdialog.h" +#endif // QT_H + +#ifndef TQT_NO_MESSAGEBOX + +class TQLabel; +class TQPushButton; +struct TQMessageBoxData; + +class TQ_EXPORT TQMessageBox : public TQDialog +{ + TQ_OBJECT + TQ_ENUMS( Icon ) + TQ_PROPERTY( TQString text READ text WRITE setText ) + TQ_PROPERTY( Icon icon READ icon WRITE setIcon ) + TQ_PROPERTY( TQPixmap iconPixmap READ iconPixmap WRITE setIconPixmap ) + TQ_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(TQ_DISABLE_COPY) + TQMessageBox( const TQMessageBox & ); + TQMessageBox &operator=( const TQMessageBox & ); +#endif +}; + +/* +* Macro to be used at the beginning of main(), e.g. +* +* #include +* #include +* int main( int argc, char**argv ) +* { +* QT_REQUIRE_VERSION( argc, argv, "3.0.5" ) +* ... +* } +*/ +#define QT_REQUIRE_VERSION( argc, argv, str ) { TQString s=TQString::fromLatin1(str);\ +TQString sq=TQString::fromLatin1(tqVersion()); 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 ( !tqApp){ int c=0; new \ +TQApplication(argc,argv);} TQString s = TQApplication::tr("Executable '%1' requires TQt "\ + "%2, found TQt %3.").arg(TQString::fromLatin1(tqAppName())).arg(TQString::fromLatin1(\ +str)).arg(TQString::fromLatin1(tqVersion()) ); TQMessageBox::critical( 0, TQApplication::tr(\ +"Incompatible TQt Library Error" ), s, TQMessageBox::Abort,0 ); tqFatal(s.ascii()); }} + + +#endif // TQT_NO_MESSAGEBOX + +#endif // TQMESSAGEBOX_H diff --git a/src/dialogs/tqprintdialog.cpp b/src/dialogs/tqprintdialog.cpp new file mode 100644 index 000000000..a82ae4ee4 --- /dev/null +++ b/src/dialogs/tqprintdialog.cpp @@ -0,0 +1,1677 @@ +/**************************************************************************** +** +** Implementation of internal print dialog (X11) used by TQPrinter::select(). +** +** Created : 950829 +** +** Copyright (C) 1992-2008 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 files LICENSE.GPL2 +** and LICENSE.GPL3 included in the packaging of this file. +** Alternatively you may (at your option) use any later version +** of the GNU General Public License if such license has been +** publicly approved by Trolltech ASA (or its successors, if any) +** and the KDE Free TQt Foundation. +** +** Please review the following information to ensure GNU General +** Public Licensing requirements will be met: +** http://trolltech.com/products/qt/licenses/licensing/opensource/. +** If you are unsure which license is appropriate for your use, please +** review the following information: +** http://trolltech.com/products/qt/licenses/licensing/licensingoverview +** or contact the sales department at sales@trolltech.com. +** +** This file may be used under the terms of the Q Public License as +** defined by Trolltech ASA and appearing in the file LICENSE.TQPL +** included in the packaging of this file. Licensees holding valid TQt +** Commercial licenses may use this file in accordance with the TQt +** Commercial License Agreement provided with the Software. +** +** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, +** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted +** herein. +** +**********************************************************************/ + +#include "tqprintdialog.h" + +#ifndef TQT_NO_PRINTDIALOG + +#include "tqfiledialog.h" +#include "tqfile.h" +#include "tqtextstream.h" +#include "tqcombobox.h" +#include "tqframe.h" +#include "tqlabel.h" +#include "tqlineedit.h" +#include "tqpushbutton.h" +#include "tqprinter.h" +#include "tqlistview.h" +#include "tqlayout.h" +#include "tqbuttongroup.h" +#include "tqradiobutton.h" +#include "tqspinbox.h" +#include "ntqapplication.h" +#include "tqheader.h" +#include "tqstyle.h" +#include "tqstring.h" +#include "tqregexp.h" +#if !defined(TQT_NO_CUPS) || !defined(TQT_NO_NIS) +#include "tqlibrary.h" +#endif + +#ifndef TQT_NO_NIS + +#ifndef BOOL_DEFINED +#define BOOL_DEFINED +#endif + +#include +#include + +// Solaris redefines connect -> __xnet_connect with _XOPEN_SOURCE_EXTENDED. +#if defined(connect) +# undef connect +#endif + +#endif // TQT_NO_NIS + +// UNIX Large File Support redefines open -> open64 +#if defined(open) +# undef open +#endif + +#include +#include + + +class TQPrintDialogSpinBox : public TQSpinBox +{ +public: + TQPrintDialogSpinBox(int min, int max, int steps, TQWidget *parent, const char *name) + : TQSpinBox(min, max, steps, parent, name) + {} + + void interpretText() + { + TQSpinBox::interpretText(); + } +}; + + + + +enum { Success = 's', Unavail = 'u', NotFound = 'n', TryAgain = 't' }; +enum { Continue = 'c', Return = 'r' }; + +class TQPrintDialogPrivate +{ +public: + TQPrinter * printer; + + TQButtonGroup * printerOrFile; + + bool outputToFile; + TQListView * printers; + TQLineEdit * fileName; + TQPushButton * browse, *ok; + + TQButtonGroup * printRange; + TQLabel * firstPageLabel; + TQPrintDialogSpinBox * firstPage; + TQLabel * lastPageLabel; + TQPrintDialogSpinBox * lastPage; + TQRadioButton * printAllButton; + TQRadioButton * printRangeButton; + TQRadioButton * printSelectionButton; + TQRadioButton * printToFileButton; + TQComboBox *orientationCombo, *sizeCombo; + + TQPrinter::PageSize pageSize; + TQPrinter::Orientation orientation; + + TQButtonGroup * pageOrder; + TQPrinter::PageOrder pageOrder2; + + TQButtonGroup * colorMode; + TQPrinter::ColorMode colorMode2; + + TQPrintDialogSpinBox * copies; + int numCopies; + + TQBoxLayout *customLayout; + + TQPrinter::PageSize indexToPageSize[TQPrinter::NPageSize]; +}; + + +typedef void (*Q_PrintDialogHook)(TQListView *); +static Q_PrintDialogHook addPrinterHook = 0; + +void qt_set_printdialog_hook( Q_PrintDialogHook hook ) +{ + addPrinterHook = hook; +} + +static void isc( TQPrintDialogPrivate * d, const TQString & text, + TQPrinter::PageSize ps ); + +class TQPrinterListViewItem : public TQListViewItem +{ +public: + TQPrinterListViewItem( TQListView * printers, const TQString& name, + const TQString& host, const TQString& comment, + const TQStringList& aliases ) + : TQListViewItem( printers, name, host, comment ), ali( aliases ) { } + + bool samePrinter( const TQString& name ) { + return text( 0 ) == name || ali.find( name ) != ali.end(); + } + + TQStringList ali; +}; + +static void perhapsAddPrinter( TQListView * printers, const TQString &name, + TQString host, TQString comment, + TQStringList aliases = TQStringList() ) +{ + const TQListViewItem * i = printers->firstChild(); + while ( i && !((TQPrinterListViewItem *) i)->samePrinter(name) ) + i = i->nextSibling(); + if ( i ) + return; + if ( host.isEmpty() ) + host = TQPrintDialog::tr( "locally connected" ); + (void)new TQPrinterListViewItem( printers, + name.simplifyWhiteSpace(), + host.simplifyWhiteSpace(), + comment.simplifyWhiteSpace(), aliases ); +} + +static void parsePrinterDesc( TQString printerDesc, TQListView * printers ) +{ + if ( printerDesc.length() < 1 ) + return; + + printerDesc = printerDesc.simplifyWhiteSpace(); + int i = printerDesc.find( ':' ); + TQString printerName, printerComment, printerHost; + TQStringList aliases; + + if ( i >= 0 ) { + // have ':' want '|' + int j = printerDesc.find( '|' ); + if ( j > 0 && j < i ) { + printerName = printerDesc.left( j ); + aliases = TQStringList::split( '|', + printerDesc.mid(j + 1, i - j - 1) ); + // try extracting a comment from the aliases + printerComment = TQPrintDialog::tr( "Aliases: %1" ) + .arg( aliases.join(", ") ); + } else { + printerName = printerDesc.left( i ); + } + // look for lprng pseudo all printers entry + i = printerDesc.find( TQRegExp(TQString::fromLatin1(": *all *=")) ); + if ( i >= 0 ) + printerName = ""; + // look for signs of this being a remote printer + i = printerDesc.find( TQRegExp(TQString::fromLatin1(": *rm *=")) ); + if ( i >= 0 ) { + // point k at the end of remote host name + while ( printerDesc[i] != '=' ) + i++; + while ( printerDesc[i] == '=' || printerDesc[i].isSpace() ) + i++; + j = i; + while ( j < (int)printerDesc.length() && printerDesc[j] != ':' ) + j++; + + // and stuff that into the string + printerHost = printerDesc.mid( i, j - i ); + } + } + if ( printerName.length() ) + perhapsAddPrinter( printers, printerName, printerHost, printerComment, + aliases ); +} + +static int parsePrintcap( TQListView * printers, const TQString& fileName ) +{ + TQFile printcap( fileName ); + if ( !printcap.open( IO_ReadOnly ) ) + return NotFound; + + char * line_ascii = new char[1025]; + line_ascii[1024] = '\0'; + + TQString printerDesc; + bool atEnd = FALSE; + + while ( !atEnd ) { + if ( printcap.atEnd() || printcap.readLine( line_ascii, 1024 ) <= 0 ) + atEnd = TRUE; + TQString line = line_ascii; + line = line.stripWhiteSpace(); + if ( line.length() >= 1 && line[int(line.length()) - 1] == '\\' ) + line.truncate( line.length() - 1 ); + if ( line[0] == '#' ) { + if ( !atEnd ) + continue; + } else if ( line[0] == '|' || line[0] == ':' ) { + printerDesc += line; + if ( !atEnd ) + continue; + } + + parsePrinterDesc( printerDesc, printers ); + + // add the first line of the new printer definition + printerDesc = line; + } + delete[] line_ascii; + return Success; +} + + +// solaris, not 2.6 +static void parseEtcLpPrinters( TQListView * printers ) +{ + TQDir lp( TQString::fromLatin1("/etc/lp/printers") ); + const TQFileInfoList * dirs = lp.entryInfoList(); + if ( !dirs ) + return; + + TQFileInfoListIterator it( *dirs ); + TQFileInfo *printer; + TQString tmp; + while ( (printer = it.current()) != 0 ) { + ++it; + if ( printer->isDir() ) { + tmp.sprintf( "/etc/lp/printers/%s/configuration", + printer->fileName().ascii() ); + TQFile configuration( tmp ); + char * line = new char[1025]; + TQString remote( TQString::fromLatin1("Remote:") ); + TQString contentType( TQString::fromLatin1("Content types:") ); + TQString printerHost; + bool canPrintPostscript = FALSE; + if ( configuration.open( IO_ReadOnly ) ) { + while ( !configuration.atEnd() && + configuration.readLine( line, 1024 ) > 0 ) { + if ( TQString::fromLatin1(line).startsWith( remote ) ) { + const char * p = line; + while ( *p != ':' ) + p++; + p++; + while ( isspace((uchar) *p) ) + p++; + printerHost = TQString::fromLocal8Bit(p); + printerHost = printerHost.simplifyWhiteSpace(); + } else if ( TQString::fromLatin1(line).startsWith( contentType ) ) { + char * p = line; + while ( *p != ':' ) + p++; + p++; + char * e; + while ( *p ) { + while ( isspace((uchar) *p) ) + p++; + if ( *p ) { + char s; + e = p; + while ( isalnum((uchar) *e) ) + e++; + s = *e; + *e = '\0'; + if ( !qstrcmp( p, "postscript" ) || + !qstrcmp( p, "any" ) ) + canPrintPostscript = TRUE; + *e = s; + if ( s == ',' ) + e++; + p = e; + } + } + } + } + if ( canPrintPostscript ) + perhapsAddPrinter( printers, printer->fileName(), + printerHost, TQString::fromLatin1("") ); + } + delete[] line; + } + } +} + + +// solaris 2.6 +static char * parsePrintersConf( TQListView * printers, bool *found = 0 ) +{ + TQFile pc( TQString::fromLatin1("/etc/printers.conf") ); + if ( !pc.open( IO_ReadOnly ) ) { + if ( found ) + *found = FALSE; + return 0; + } + if ( found ) + *found = TRUE; + + char * line = new char[1025]; + line[1024] = '\0'; + + TQString printerDesc; + int lineLength = 0; + + char * defaultPrinter = 0; + + while ( !pc.atEnd() && + (lineLength=pc.readLine( line, 1024 )) > 0 ) { + if ( *line == '#' ) { + *line = '\0'; + lineLength = 0; + } + if ( lineLength >= 2 && line[lineLength-2] == '\\' ) { + line[lineLength-2] = '\0'; + printerDesc += TQString::fromLocal8Bit(line); + } else { + printerDesc += TQString::fromLocal8Bit(line); + printerDesc = printerDesc.simplifyWhiteSpace(); + int i = printerDesc.find( ':' ); + TQString printerName, printerHost, printerComment; + TQStringList aliases; + if ( i >= 0 ) { + // have : want | + int j = printerDesc.find( '|', 0 ); + if ( j >= i ) + j = -1; + printerName = printerDesc.mid( 0, j < 0 ? i : j ); + if ( printerName == TQString::fromLatin1("_default") ) { + i = printerDesc.find( + TQRegExp( TQString::fromLatin1(": *use *=") ) ); + while ( printerDesc[i] != '=' ) + i++; + while ( printerDesc[i] == '=' || printerDesc[i].isSpace() ) + i++; + j = i; + while ( j < (int)printerDesc.length() && + printerDesc[j] != ':' && printerDesc[j] != ',' ) + j++; + // that's our default printer + defaultPrinter = + tqstrdup( printerDesc.mid( i, j-i ).ascii() ); + printerName = ""; + printerDesc = ""; + } else if ( printerName == TQString::fromLatin1("_all") ) { + // skip it.. any other cases we want to skip? + printerName = ""; + printerDesc = ""; + } + + if ( j > 0 ) { + // try extracting a comment from the aliases + aliases = TQStringList::split( '|', + printerDesc.mid(j + 1, i - j - 1) ); + printerComment = TQPrintDialog::tr( "Aliases: %1" ) + .arg( aliases.join(", ") ); + } + // look for signs of this being a remote printer + i = printerDesc.find( + TQRegExp( TQString::fromLatin1(": *bsdaddr *=") ) ); + if ( i >= 0 ) { + // point k at the end of remote host name + while ( printerDesc[i] != '=' ) + i++; + while ( printerDesc[i] == '=' || printerDesc[i].isSpace() ) + i++; + j = i; + while ( j < (int)printerDesc.length() && + printerDesc[j] != ':' && printerDesc[j] != ',' ) + j++; + // and stuff that into the string + printerHost = printerDesc.mid( i, j-i ); + // maybe stick the remote printer name into the comment + if ( printerDesc[j] == ',' ) { + i = ++j; + while ( printerDesc[i].isSpace() ) + i++; + j = i; + while ( j < (int)printerDesc.length() && + printerDesc[j] != ':' && printerDesc[j] != ',' ) + j++; + if ( printerName != printerDesc.mid( i, j-i ) ) { + printerComment = + TQString::fromLatin1("Remote name: "); + printerComment += printerDesc.mid( i, j-i ); + } + } + } + } + if ( printerComment == ":" ) + printerComment = ""; // for cups + if ( printerName.length() ) + perhapsAddPrinter( printers, printerName, printerHost, + printerComment, aliases ); + // chop away the line, for processing the next one + printerDesc = ""; + } + } + delete[] line; + return defaultPrinter; +} + +#ifndef TQT_NO_NIS + +#if defined(Q_C_CALLBACKS) +extern "C" { +#endif + +static int foreach( int /* status */, char * /* key */, int /* keyLen */, + char * val, int valLen, char * data ) +{ + parsePrinterDesc( TQString::fromLatin1(val, valLen), (TQListView *) data ); + return 0; +} + +#if defined(Q_C_CALLBACKS) +} +#endif + +static int retrieveNisPrinters( TQListView * printers ) +{ + typedef int (*WildCast)( int, char *, int, char *, int, char * ); + char printersConfByname[] = "printers.conf.byname"; + char *domain; + int err; + + TQLibrary lib( "nsl" ); + typedef int (*ypGetDefaultDomain)(char **); + ypGetDefaultDomain _ypGetDefaultDomain = (ypGetDefaultDomain)lib.resolve( "yp_get_default_domain" ); + typedef int (*ypAll)(const char *, const char *, const struct ypall_callback *); + ypAll _ypAll = (ypAll)lib.resolve( "yp_all" ); + + if ( _ypGetDefaultDomain && _ypAll ) { + err = _ypGetDefaultDomain( &domain ); + if ( err == 0 ) { + ypall_callback cb; + // wild cast to support K&R-style system headers + (WildCast &) cb.foreach = (WildCast) foreach; + cb.data = (char *) printers; + err = _ypAll( domain, printersConfByname, &cb ); + } + if ( !err ) + return Success; + } + return Unavail; +} + +#endif // TQT_NO_NIS + +static char *parseNsswitchPrintersEntry( TQListView * printers, char *line ) +{ +#define skipSpaces() \ + while ( isspace((uchar) line[k]) ) \ + k++ + + char *defaultPrinter = 0; + bool stop = FALSE; + int lastStatus = NotFound; + + int k = 8; + skipSpaces(); + if ( line[k] != ':' ) + return 0; + k++; + + char *cp = strchr( line, '#' ); + if ( cp != 0 ) + *cp = '\0'; + + while ( line[k] != '\0' ) { + if ( isspace((uchar) line[k]) ) { + k++; + } else if ( line[k] == '[' ) { + k++; + skipSpaces(); + while ( line[k] != '\0' ) { + char status = tolower( line[k] ); + char action = '?'; + + while ( line[k] != '=' && line[k] != ']' && + line[k] != '\0' ) + k++; + if ( line[k] == '=' ) { + k++; + skipSpaces(); + action = tolower( line[k] ); + while ( line[k] != '\0' && !isspace((uchar) line[k]) && line[k] != ']' ) + k++; + } else if ( line[k] == ']' ) { + k++; + break; + } + skipSpaces(); + + if ( lastStatus == status ) + stop = ( action == (char) Return ); + } + } else { + if ( stop ) + break; + + TQCString source; + while ( line[k] != '\0' && !isspace((uchar) line[k]) && line[k] != '[' ) { + source += line[k]; + k++; + } + + if ( source == "user" ) { + lastStatus = parsePrintcap( printers, + TQDir::homeDirPath() + "/.printers" ); + } else if ( source == "files" ) { + bool found; + defaultPrinter = parsePrintersConf( printers, &found ); + if ( found ) + lastStatus = Success; +#ifndef TQT_NO_NIS + } else if ( source == "nis" ) { + lastStatus = retrieveNisPrinters( printers ); +#endif + } else { + // nisplus, dns, etc., are not implemented yet + lastStatus = NotFound; + } + stop = ( lastStatus == Success ); + } + } + return defaultPrinter; +} + +static char *parseNsswitchConf( TQListView * printers ) +{ + TQFile nc( TQString::fromLatin1("/etc/nsswitch.conf") ); + if ( !nc.open(IO_ReadOnly) ) + return 0; + + char *defaultPrinter = 0; + + char *line = new char[1025]; + line[1024] = '\0'; + + while ( !nc.atEnd() && + nc.readLine(line, 1024) > 0 ) { + if ( strncmp(line, "printers", 8) == 0 ) { + defaultPrinter = parseNsswitchPrintersEntry( printers, line ); + delete[] line; + return defaultPrinter; + } + } + + strcpy( line, "printers: user files nis nisplus xfn" ); + defaultPrinter = parseNsswitchPrintersEntry( printers, line ); + delete[] line; + return defaultPrinter; +} + +// HP-UX +static void parseEtcLpMember( TQListView * printers ) +{ + TQDir lp( TQString::fromLatin1("/etc/lp/member") ); + if ( !lp.exists() ) + return; + const TQFileInfoList * dirs = lp.entryInfoList(); + if ( !dirs ) + return; + + TQFileInfoListIterator it( *dirs ); + TQFileInfo *printer; + TQString tmp; + while ( (printer = it.current()) != 0 ) { + ++it; + // I haven't found any real documentation, so I'm guessing that + // since lpstat uses /etc/lp/member rather than one of the + // other directories, it's the one to use. I did not find a + // decent way to locate aliases and remote printers. + if ( printer->isFile() ) + perhapsAddPrinter( printers, printer->fileName(), + TQPrintDialog::tr("unknown"), + TQString::fromLatin1("") ); + } +} + +// IRIX 6.x +static void parseSpoolInterface( TQListView * printers ) +{ + TQDir lp( TQString::fromLatin1("/usr/spool/lp/interface") ); + if ( !lp.exists() ) + return; + const TQFileInfoList * files = lp.entryInfoList(); + if( !files ) + return; + + TQFileInfoListIterator it( *files ); + TQFileInfo *printer; + while ( (printer = it.current()) != 0) { + ++it; + + if ( !printer->isFile() ) + continue; + + // parse out some information + TQFile configFile( printer->filePath() ); + if ( !configFile.open( IO_ReadOnly ) ) + continue; + + TQCString line( 1025 ); + TQString namePrinter; + TQString hostName; + TQString hostPrinter; + TQString printerType; + + TQString nameKey( TQString::fromLatin1("NAME=") ); + TQString typeKey( TQString::fromLatin1("TYPE=") ); + TQString hostKey( TQString::fromLatin1("HOSTNAME=") ); + TQString hostPrinterKey( TQString::fromLatin1("HOSTPRINTER=") ); + + while ( !configFile.atEnd() && + (configFile.readLine(line.data(), 1024)) > 0 ) { + TQString uline = line; + if ( uline.startsWith( typeKey ) ) { + printerType = line.mid( nameKey.length() ); + printerType = printerType.simplifyWhiteSpace(); + } else if ( uline.startsWith( hostKey ) ) { + hostName = line.mid( hostKey.length() ); + hostName = hostName.simplifyWhiteSpace(); + } else if ( uline.startsWith( hostPrinterKey ) ) { + hostPrinter = line.mid( hostPrinterKey.length() ); + hostPrinter = hostPrinter.simplifyWhiteSpace(); + } else if ( uline.startsWith( nameKey ) ) { + namePrinter = line.mid( nameKey.length() ); + namePrinter = namePrinter.simplifyWhiteSpace(); + } + } + configFile.close(); + + printerType = printerType.stripWhiteSpace(); + if ( printerType.find("postscript", 0, FALSE) < 0 ) + continue; + + int ii = 0; + while ( (ii = namePrinter.find('"', ii)) >= 0 ) + namePrinter.remove( ii, 1 ); + + if ( hostName.isEmpty() || hostPrinter.isEmpty() ) { + perhapsAddPrinter( printers, printer->fileName(), + TQString::fromLatin1(""), namePrinter ); + } else { + TQString comment; + comment = namePrinter; + comment += " ("; + comment += hostPrinter; + comment += ")"; + perhapsAddPrinter( printers, printer->fileName(), + hostName, comment ); + } + } +} + + +// Every unix must have its own. It's a standard. Here is AIX. +static void parseQconfig( TQListView * printers ) +{ + TQFile qconfig( TQString::fromLatin1("/etc/qconfig") ); + if ( !qconfig.open( IO_ReadOnly ) ) + return; + + TQTextStream ts( &qconfig ); + TQString line; + + TQString stanzaName; // either a queue or a device name + bool up = TRUE; // queue up? default TRUE, can be FALSE + TQString remoteHost; // null if local + TQString deviceName; // null if remote + + TQRegExp newStanza( TQString::fromLatin1("^[0-z\\-]+:$") ); + + // our basic strategy here is to process each line, detecting new + // stanzas. each time we see a new stanza, we check if the + // previous stanza was a valid queue for a) a remote printer or b) + // a local printer. if it wasn't, we assume that what we see is + // the start of the first stanza, or that the previous stanza was + // a device stanza, or that there is some syntax error (we don't + // report those). + + do { + line = ts.readLine(); + bool indented = line[0].isSpace(); + line = line.simplifyWhiteSpace(); + + int i = line.find('='); + if ( indented && i != -1 ) { // line in stanza + TQString variable = line.left( i ).simplifyWhiteSpace(); + TQString value=line.mid( i+1, line.length() ).simplifyWhiteSpace(); + if ( variable == TQString::fromLatin1("device") ) + deviceName = value; + else if ( variable == TQString::fromLatin1("host") ) + remoteHost = value; + else if ( variable == TQString::fromLatin1("up") ) + up = !(value.lower() == TQString::fromLatin1("false")); + } else if ( line[0] == '*' ) { // comment + // nothing to do + } else if ( ts.atEnd() || // end of file, or beginning of new stanza + ( !indented && line.find( newStanza ) != -1 ) ) { + if ( up && stanzaName.length() > 0 && stanzaName.length() < 21 ) { + if ( remoteHost.length() ) // remote printer + perhapsAddPrinter( printers, stanzaName, remoteHost, + TQString::null ); + else if ( deviceName.length() ) // local printer + perhapsAddPrinter( printers, stanzaName, TQString::null, + TQString::null ); + } + line.truncate( line.length()-1 ); + if ( line.length() >= 1 && line.length() <= 20 ) + stanzaName = line; + up = TRUE; + remoteHost = TQString::null; + deviceName = TQString::null; + } else { + // syntax error? ignore. + } + } while ( !ts.atEnd() ); +} + + +#ifndef TQT_NO_CUPS +#include + +static char * parseCupsOutput( TQListView * printers ) +{ + char * defaultPrinter = 0; + int nd; + cups_dest_t * d; + TQLibrary lib( "cups" ); + typedef int (*CupsGetDests)(cups_dest_t **dests); + typedef void (*CupsFreeDests)(int num_dents, cups_dest_t *dests); + CupsGetDests _cupsGetDests = (CupsGetDests)lib.resolve( "cupsGetDests" ); + CupsFreeDests _cupsFreeDests = (CupsFreeDests)lib.resolve( "cupsFreeDests" ); + if ( _cupsGetDests ) { + nd = _cupsGetDests( &d ); + if ( nd < 1 ) + return 0; + + int n = 0; + while ( n < nd ) { + perhapsAddPrinter( printers, d[n].name, + TQPrintDialog::tr("Unknown Location"), 0 ); + if ( d[n].is_default && !defaultPrinter ) + defaultPrinter = tqstrdup( d[n].instance ); + n++; + } + if ( _cupsFreeDests ) { + _cupsFreeDests(nd, d); + } + } + return defaultPrinter; +} +#endif + +static TQPrintDialog * globalPrintDialog = 0; + +static void qpd_cleanup_globaldialog() +{ + if ( globalPrintDialog != 0 ) + delete globalPrintDialog; + globalPrintDialog = 0; +} + +/*! + \class TQPrintDialog tqprintdialog.h + + \brief The TQPrintDialog class provides a dialog for specifying + the printer's configuration. + + \internal + + \warning The use of this class is not recommended since it is not + present on all platforms; use TQPrinter::setup() instead. + + \omit + + (ingroup dialogs) + + THIS DOCUMENTATION IS Not Revised. It must be revised before + becoming public API. + + It encompasses both the sort of details needed for doing a simple + print-out and some print configuration setup. + + The easiest way to use the class is through the static + function getPrinterSetup(). You can also subclass the TQPrintDialog + and add some custom buttons with addButton() to extend the + functionality of the print dialog. + +
                + The printer dialog, on a large screen, in Motif style. +*/ + + +/*! Constructs a new modal printer dialog that configures \a prn and is a + child of \a parent named \a name. +*/ + +TQPrintDialog::TQPrintDialog( TQPrinter *prn, TQWidget *parent, const char *name ) + : TQDialog( parent, name, TRUE ) +{ + d = new TQPrintDialogPrivate; + d->numCopies = 1; + + TQBoxLayout * tll = new TQBoxLayout( this, TQBoxLayout::Down, 12, 0 ); + + // destination + TQGroupBox * g; + g = setupDestination(); + tll->addWidget( g, 1 ); + + tll->addSpacing( 12 ); + + // printer and paper settings + TQBoxLayout * lay = new TQBoxLayout( TQBoxLayout::LeftToRight ); + tll->addLayout( lay ); + + g = setupPrinterSettings(); + lay->addWidget( g, 1 ); + + lay->addSpacing( 12 ); + + g = setupPaper(); + lay->addWidget( g ); + + tll->addSpacing( 12 ); + + // options + g = setupOptions(); + tll->addWidget( g ); + tll->addSpacing( 12 ); + + TQBoxLayout *l = new TQBoxLayout( TQBoxLayout::LeftToRight ); + d->customLayout = new TQBoxLayout( TQBoxLayout::LeftToRight ); + tll->addLayout( l ); + l->addLayout( d->customLayout ); + l->addStretch(); + tll->addSpacing( 12 ); + + // buttons + TQBoxLayout *horiz = new TQBoxLayout( TQBoxLayout::LeftToRight ); + tll->addLayout( horiz ); + + bool rightalign = + bool(style().styleHint(TQStyle::SH_PrintDialog_RightAlignButtons, this)); + + if (rightalign) + horiz->addStretch( 1 ); + + d->ok = new TQPushButton( this, "ok" ); + d->ok->setText( tr("OK") ); + d->ok->setDefault( TRUE ); + horiz->addWidget( d->ok ); + if (! rightalign) + horiz->addStretch( 1 ); + horiz->addSpacing( 6 ); + + TQPushButton * cancel = new TQPushButton( this, "cancel" ); + cancel->setText( tr("Cancel") ); + horiz->addWidget( cancel ); + + TQSize s1 = d->ok->sizeHint(); + TQSize s2 = cancel->sizeHint(); + s1 = TQSize( TQMAX(s1.width(), s2.width()), + TQMAX(s1.height(), s2.height()) ); + + d->ok->setFixedSize( s1 ); + cancel->setFixedSize( s1 ); + + tll->activate(); + + connect( d->ok, TQ_SIGNAL(clicked()), TQ_SLOT(okClicked()) ); + connect( cancel, TQ_SIGNAL(clicked()), TQ_SLOT(reject()) ); + + TQSize ms( minimumSize() ); + TQSize ss( TQApplication::desktop()->screenGeometry( pos() ).size() ); + if ( ms.height() < 512 && ss.height() >= 600 ) + ms.setHeight( 512 ); + else if ( ms.height() < 460 && ss.height() >= 480 ) + ms.setHeight( 460 ); + resize( ms ); + + setPrinter( prn, TRUE ); + d->printers->setFocus(); +} + + +/*! Destroys the object and frees any allocated resources. Does not + delete the associated TQPrinter object. +*/ + +TQPrintDialog::~TQPrintDialog() +{ + if ( this == globalPrintDialog ) + globalPrintDialog = 0; + delete d; +} + +/*! + This method allows you to specify a global print dialog, given in \a + pd, that will be used instead of the default dialog provided by TQt. + + This is useful, since there are many different printing systems on + Unix, and we cannot support all of them. Calling this method before + using a printer for the first time allows you to set up your own + print dialog. + + \sa setupPrinters() +*/ +void TQPrintDialog::setGlobalPrintDialog( TQPrintDialog *pd ) +{ + TQPrintDialog *oldPd = globalPrintDialog; + globalPrintDialog = pd; + if ( oldPd ) + delete oldPd; + else + tqAddPostRoutine( qpd_cleanup_globaldialog ); + globalPrintDialog->adjustSize(); +} + +TQGroupBox * TQPrintDialog::setupPrinterSettings() +{ + TQGroupBox * g = new TQGroupBox( 1, Horizontal, tr( "Printer settings"), + this, "settings group box" ); + + d->colorMode = new TQButtonGroup( this ); + d->colorMode->hide(); + connect( d->colorMode, TQ_SIGNAL(clicked(int)), + this, TQ_SLOT(colorModeSelected(int)) ); + + TQRadioButton *rb; + rb = new TQRadioButton( tr( "Print in color if available" ), + g, "color" ); + d->colorMode->insert( rb, TQPrinter::Color ); + rb->setChecked( TRUE ); + + rb = new TQRadioButton( tr("Print in grayscale"), + g, "graysacle" ); + d->colorMode->insert( rb, TQPrinter::GrayScale ); + + return g; +} + +TQGroupBox * TQPrintDialog::setupDestination() +{ + TQGroupBox * g = new TQGroupBox( 0, Horizontal, tr( "Print destination"), + this, "destination group box" ); + + TQBoxLayout * tll = new TQBoxLayout( g->layout(), TQBoxLayout::Down ); + + d->printerOrFile = new TQButtonGroup( this ); + d->printerOrFile->hide(); + connect( d->printerOrFile, TQ_SIGNAL(clicked(int)), + this, TQ_SLOT(printerOrFileSelected(int)) ); + + // printer radio button, list + TQRadioButton * rb = new TQRadioButton( tr( "Print to printer:" ), g, + "printer" ); + tll->addWidget( rb ); + d->printerOrFile->insert( rb, 0 ); + rb->setChecked( TRUE ); + d->outputToFile = FALSE; + + TQBoxLayout * horiz = new TQBoxLayout( TQBoxLayout::LeftToRight ); + tll->addLayout( horiz, 3 ); + horiz->addSpacing( 19 ); + + d->printers = new TQListView( g, "list of printers" ); + d->printers->setAllColumnsShowFocus( TRUE ); + d->printers->addColumn( tr("Printer"), 125 ); + d->printers->addColumn( tr("Host"), 125 ); + d->printers->addColumn( tr("Comment"), 150 ); + +#if defined(Q_OS_UNIX) + char * etcLpDefault = 0; + +#ifndef TQT_NO_CUPS + etcLpDefault = parseCupsOutput( d->printers ); +#endif + if ( d->printers->childCount() == 0 ) { + // we only use other schemes when cups fails. + + parsePrintcap( d->printers, TQString::fromLatin1("/etc/printcap") ); + parseEtcLpMember( d->printers ); + parseSpoolInterface( d->printers ); + parseQconfig( d->printers ); + if ( addPrinterHook ) + (*addPrinterHook)( d->printers ); + + TQFileInfo f; + f.setFile( TQString::fromLatin1("/etc/lp/printers") ); + if ( f.isDir() ) { + parseEtcLpPrinters( d->printers ); + TQFile def( TQString::fromLatin1("/etc/lp/default") ); + if ( def.open( IO_ReadOnly ) ) { + if ( etcLpDefault ) + delete[] etcLpDefault; + etcLpDefault = new char[1025]; + def.readLine( etcLpDefault, 1024 ); + char * p = etcLpDefault; + while ( p && *p ) { + if ( !isprint((uchar) *p) || isspace((uchar) *p) ) + *p = 0; + else + p++; + } + } + } + + char * def = 0; + f.setFile( TQString::fromLatin1("/etc/nsswitch.conf") ); + if ( f.isFile() ) { + def = parseNsswitchConf( d->printers ); + } else { + f.setFile( TQString::fromLatin1("/etc/printers.conf") ); + if ( f.isFile() ) + def = parsePrintersConf( d->printers ); + } + + if ( def ) { + if ( etcLpDefault ) + delete[] etcLpDefault; + etcLpDefault = def; + } + } + + // all printers hopefully known. try to find a good default + TQString dollarPrinter; + { + const char * t = getenv( "PRINTER" ); + if ( !t || !*t ) + t = getenv( "LPDEST" ); + dollarPrinter = TQString::fromLatin1( t ); + if ( !dollarPrinter.isEmpty() ) + perhapsAddPrinter( d->printers, dollarPrinter, + TQPrintDialog::tr("unknown"), + TQString::fromLatin1("") ); + } + int quality = 0; + + // bang the best default into the listview + const TQListViewItem * lvi = d->printers->firstChild(); + d->printers->setCurrentItem( (TQListViewItem *)lvi ); + while ( lvi ) { + TQRegExp ps( TQString::fromLatin1("[^a-z]ps(?:[^a-z]|$)") ); + TQRegExp lp( TQString::fromLatin1("[^a-z]lp(?:[^a-z]|$)") ); + + if ( quality < 4 && lvi->text(0) == dollarPrinter ) { + d->printers->setCurrentItem( (TQListViewItem *)lvi ); + quality = 4; + } else if ( quality < 3 && etcLpDefault && + lvi->text(0) == TQString::fromLatin1(etcLpDefault) ) { + d->printers->setCurrentItem( (TQListViewItem *)lvi ); + quality = 3; + } else if ( quality < 2 && + ( lvi->text(0) == TQString::fromLatin1("ps") || + ps.search(lvi->text(2)) != -1 ) ) { + d->printers->setCurrentItem( (TQListViewItem *)lvi ); + quality = 2; + } else if ( quality < 1 && + ( lvi->text(0) == TQString::fromLatin1("lp") || + lp.search(lvi->text(2)) > -1 ) ) { + d->printers->setCurrentItem( (TQListViewItem *)lvi ); + quality = 1; + } + lvi = lvi->nextSibling(); + } + + if ( d->printers->currentItem() ) + d->printers->setSelected( d->printers->currentItem(), TRUE ); + + if ( etcLpDefault ) // Avoid purify complaint + delete[] etcLpDefault; +#endif + + int h = fontMetrics().height(); + if ( d->printers->firstChild() ) + h = d->printers->firstChild()->height(); + d->printers->setMinimumSize( d->printers->sizeHint().width(), + d->printers->header()->height() + + 3 * h ); + horiz->addWidget( d->printers, 3 ); + + tll->addSpacing( 6 ); + + // file radio button, edit/browse + d->printToFileButton = new TQRadioButton( tr( "Print to file:" ), g, "file" ); + tll->addWidget( d->printToFileButton ); + d->printerOrFile->insert( d->printToFileButton, 1 ); + + horiz = new TQBoxLayout( TQBoxLayout::LeftToRight ); + tll->addLayout( horiz ); + horiz->addSpacing( 19 ); + + d->fileName = new TQLineEdit( g, "file name" ); + connect( d->fileName, TQ_SIGNAL( textChanged(const TQString&) ), + this, TQ_SLOT( fileNameEditChanged(const TQString&) ) ); + horiz->addWidget( d->fileName, 1 ); + horiz->addSpacing( 6 ); + d->browse = new TQPushButton( tr("Browse..."), g, "browse files" ); + d->browse->setAutoDefault( FALSE ); +#ifdef TQT_NO_FILEDIALOG + d->browse->setEnabled( FALSE ); +#endif + connect( d->browse, TQ_SIGNAL(clicked()), + this, TQ_SLOT(browseClicked()) ); + horiz->addWidget( d->browse ); + + d->fileName->setEnabled( FALSE ); + d->browse->setEnabled( FALSE ); + + tll->activate(); + + return g; +} + + +TQGroupBox * TQPrintDialog::setupOptions() +{ + TQGroupBox * g = new TQGroupBox( 0, Horizontal, tr( "Options"), + this, "options group box" ); + + TQBoxLayout * tll = new TQBoxLayout( g->layout(), TQBoxLayout::Down ); + + TQBoxLayout *lay = new TQBoxLayout( TQBoxLayout::LeftToRight ); + tll->addLayout( lay ); + + tll = new TQBoxLayout( lay, TQBoxLayout::Down ); + + d->printRange = new TQButtonGroup( this ); + d->printRange->hide(); + connect( d->printRange, TQ_SIGNAL(clicked(int)), + this, TQ_SLOT(printRangeSelected(int)) ); + + d->pageOrder = new TQButtonGroup( this ); + d->pageOrder->hide(); + connect( d->pageOrder, TQ_SIGNAL(clicked(int)), + this, TQ_SLOT(pageOrderSelected(int)) ); + + d->printAllButton = new TQRadioButton( tr("Print all"), g, "print all" ); + d->printRange->insert( d->printAllButton, 0 ); + tll->addWidget( d->printAllButton ); + + d->printSelectionButton = new TQRadioButton( tr("Print selection"), + g, "print selection" ); + d->printRange->insert( d->printSelectionButton, 1 ); + tll->addWidget( d->printSelectionButton ); + + d->printRangeButton = new TQRadioButton( tr("Print range"), + g, "print range" ); + d->printRange->insert( d->printRangeButton, 2 ); + tll->addWidget( d->printRangeButton ); + + TQBoxLayout * horiz = new TQBoxLayout( TQBoxLayout::LeftToRight ); + tll->addLayout( horiz ); + + d->firstPageLabel = new TQLabel( tr("From page:"), g, "first page" ); + horiz->addSpacing( 19 ); + horiz->addWidget( d->firstPageLabel ); + + d->firstPage = new TQPrintDialogSpinBox( 1, 9999, 1, g, "first page" ); + d->firstPage->setValue( 1 ); + horiz->addWidget( d->firstPage, 1 ); + connect( d->firstPage, TQ_SIGNAL(valueChanged(int)), + this, TQ_SLOT(setFirstPage(int)) ); + + horiz = new TQBoxLayout( TQBoxLayout::LeftToRight ); + tll->addLayout( horiz ); + + d->lastPageLabel = new TQLabel( tr("To page:"), g, "last page" ); + horiz->addSpacing( 19 ); + horiz->addWidget( d->lastPageLabel ); + + d->lastPage = new TQPrintDialogSpinBox( 1, 9999, 1, g, "last page" ); + d->lastPage->setValue( 9999 ); + horiz->addWidget( d->lastPage, 1 ); + connect( d->lastPage, TQ_SIGNAL(valueChanged(int)), + this, TQ_SLOT(setLastPage(int)) ); + + lay->addSpacing( 25 ); + tll = new TQBoxLayout( lay, TQBoxLayout::Down ); + + // print order + TQRadioButton * rb = new TQRadioButton( tr("Print first page first"), + g, "first page first" ); + tll->addWidget( rb ); + d->pageOrder->insert( rb, TQPrinter::FirstPageFirst ); + rb->setChecked( TRUE ); + + rb = new TQRadioButton( tr("Print last page first"), + g, "last page first" ); + tll->addWidget( rb ); + d->pageOrder->insert( rb, TQPrinter::LastPageFirst ); + + tll->addStretch(); + + // copies + + horiz = new TQBoxLayout( TQBoxLayout::LeftToRight ); + tll->addLayout( horiz ); + + TQLabel * l = new TQLabel( tr("Number of copies:"), g, "Number of copies" ); + horiz->addWidget( l ); + + d->copies = new TQPrintDialogSpinBox( 1, 99, 1, g, "copies" ); + d->copies->setValue( 1 ); + horiz->addWidget( d->copies, 1 ); + connect( d->copies, TQ_SIGNAL(valueChanged(int)), + this, TQ_SLOT(setNumCopies(int)) ); + + TQSize s = d->firstPageLabel->sizeHint() + .expandedTo( d->lastPageLabel->sizeHint() ) + .expandedTo( l->sizeHint() ); + d->firstPageLabel->setMinimumSize( s ); + d->lastPageLabel->setMinimumSize( s ); + l->setMinimumSize( s.width() + 19, s.height() ); + + tll->activate(); + + return g; +} + + +void isc( TQPrintDialogPrivate * d, + const TQString & text, + TQPrinter::PageSize ps ) +{ + if ( d && text && ps < TQPrinter::NPageSize ) { + d->sizeCombo->insertItem( text, -1 ); + int index = d->sizeCombo->count()-1; + if ( index >= 0 && index < TQPrinter::NPageSize ) + d->indexToPageSize[index] = ps; + } +} + +TQGroupBox * TQPrintDialog::setupPaper() +{ + TQGroupBox * g = new TQGroupBox( 1, Horizontal, tr( "Paper format"), + this, "Paper format" ); + d->pageSize = TQPrinter::A4; + + // page orientation + d->orientationCombo = new TQComboBox( FALSE, g ); + d->orientationCombo->insertItem( tr( "Portrait" ), -1 ); + d->orientationCombo->insertItem( tr( "Landscape" ), -1 ); + + d->orientation = TQPrinter::Portrait; + + g->addSpace( 8 ); + + connect( d->orientationCombo, TQ_SIGNAL( activated(int) ), + this, TQ_SLOT( orientSelected(int) ) ); + + // paper size + d->sizeCombo = new TQComboBox( FALSE, g ); + + int n; + for( n=0; nindexToPageSize[n] = TQPrinter::A4; + + isc( d, tr( "A0 (841 x 1189 mm)" ), TQPrinter::A0 ); + isc( d, tr( "A1 (594 x 841 mm)" ), TQPrinter::A1 ); + isc( d, tr( "A2 (420 x 594 mm)" ), TQPrinter::A2 ); + isc( d, tr( "A3 (297 x 420 mm)" ), TQPrinter::A3 ); + isc( d, tr( "A4 (210x297 mm, 8.26x11.7 inches)" ), TQPrinter::A4 ); + isc( d, tr( "A5 (148 x 210 mm)" ), TQPrinter::A5 ); + isc( d, tr( "A6 (105 x 148 mm)" ), TQPrinter::A6 ); + isc( d, tr( "A7 (74 x 105 mm)" ), TQPrinter::A7 ); + isc( d, tr( "A8 (52 x 74 mm)" ), TQPrinter::A8 ); + isc( d, tr( "A9 (37 x 52 mm)" ), TQPrinter::A9 ); + isc( d, tr( "B0 (1000 x 1414 mm)" ), TQPrinter::B0 ); + isc( d, tr( "B1 (707 x 1000 mm)" ), TQPrinter::B1 ); + isc( d, tr( "B2 (500 x 707 mm)" ), TQPrinter::B2 ); + isc( d, tr( "B3 (353 x 500 mm)" ), TQPrinter::B3 ); + isc( d, tr( "B4 (250 x 353 mm)" ), TQPrinter::B4 ); + isc( d, tr( "B5 (176 x 250 mm, 6.93x9.84 inches)" ), TQPrinter::B5 ); + isc( d, tr( "B6 (125 x 176 mm)" ), TQPrinter::B6 ); + isc( d, tr( "B7 (88 x 125 mm)" ), TQPrinter::B7 ); + isc( d, tr( "B8 (62 x 88 mm)" ), TQPrinter::B8 ); + isc( d, tr( "B9 (44 x 62 mm)" ), TQPrinter::B9 ); + isc( d, tr( "B10 (31 x 44 mm)" ), TQPrinter::B10 ); + isc( d, tr( "C5E (163 x 229 mm)" ), TQPrinter::C5E ); + isc( d, tr( "DLE (110 x 220 mm)" ), TQPrinter::DLE ); + isc( d, tr( "Executive (7.5x10 inches, 191x254 mm)" ), TQPrinter::Executive ); + isc( d, tr( "Folio (210 x 330 mm)" ), TQPrinter::Folio ); + isc( d, tr( "Ledger (432 x 279 mm)" ), TQPrinter::Ledger ); + isc( d, tr( "Legal (8.5x14 inches, 216x356 mm)" ), TQPrinter::Legal ); + isc( d, tr( "Letter (8.5x11 inches, 216x279 mm)" ), TQPrinter::Letter ); + isc( d, tr( "Tabloid (279 x 432 mm)" ), TQPrinter::Tabloid ); + isc( d, tr( "US Common #10 Envelope (105 x 241 mm)" ), TQPrinter::Comm10E ); + + connect( d->sizeCombo, TQ_SIGNAL( activated(int) ), + this, TQ_SLOT( paperSizeSelected(int) ) ); + + return g; +} + + +/*! + Display a dialog and allow the user to configure the TQPrinter \a + p for an optional widget \a w. Returns TRUE if the user clicks OK or + presses Enter, FALSE if the user clicks Cancel or presses Esc. + + getPrinterSetup() remembers the settings and provides the same + settings the next time the dialog is shown. +*/ + +bool TQPrintDialog::getPrinterSetup( TQPrinter * p, TQWidget* w ) +{ + if ( !globalPrintDialog ) { + globalPrintDialog = new TQPrintDialog( 0, 0, "global print dialog" ); +#ifndef TQT_NO_WIDGET_TOPEXTRA + globalPrintDialog->setCaption( TQPrintDialog::tr( "Setup Printer" ) ); +#endif + tqAddPostRoutine( qpd_cleanup_globaldialog ); + globalPrintDialog->setPrinter( p, TRUE ); + globalPrintDialog->adjustSize(); + } else { + globalPrintDialog->setPrinter( p, TRUE ); + } + globalPrintDialog->adjustPosition( w ); + #ifndef TQT_NO_WIDGET_TOPEXTRA + if ( w ) { + const TQPixmap *pm = w->icon(); + if ( pm && !pm->isNull() ) + globalPrintDialog->setIcon( *pm ); + else { + w = w ? w->topLevelWidget() : 0; + pm = w ? w->icon() : 0; + if ( pm && !pm->isNull() ) + globalPrintDialog->setIcon( *pm ); + } + } +#endif + bool r = globalPrintDialog->exec() == TQDialog::Accepted; + globalPrintDialog->setPrinter( 0 ); + return r; +} + + +void TQPrintDialog::printerOrFileSelected( int id ) +{ + d->outputToFile = id ? TRUE : FALSE; + if ( d->outputToFile ) { + d->ok->setEnabled( TRUE ); + fileNameEditChanged( d->fileName->text() ); + if ( !d->fileName->edited() && d->fileName->text().isEmpty() ) { + TQString home = TQString::fromLatin1( ::getenv( "HOME" ) ); + TQString cur = TQDir::currentDirPath(); + if ( home.at(home.length()-1) != '/' ) + home += '/'; + if ( cur.at(cur.length()-1) != '/' ) + cur += '/'; + if ( cur.left( home.length() ) != home ) + cur = home; +#ifdef TQ_WS_X11 + cur += "print.ps"; +#endif + d->fileName->setText( cur ); + d->fileName->setCursorPosition( cur.length() ); + d->fileName->selectAll(); + } + d->browse->setEnabled( TRUE ); + d->fileName->setEnabled( TRUE ); + d->fileName->setFocus(); + d->printers->setEnabled( FALSE ); + } else { + d->ok->setEnabled( d->printers->childCount() != 0 ); + d->printers->setEnabled( TRUE ); + if ( d->fileName->hasFocus() || d->browse->hasFocus() ) + d->printers->setFocus(); + d->browse->setEnabled( FALSE ); + d->fileName->setEnabled( FALSE ); + } +} + + +void TQPrintDialog::landscapeSelected( int id ) +{ + d->orientation = (TQPrinter::Orientation)id; +} + + +void TQPrintDialog::paperSizeSelected( int id ) +{ + if ( id < TQPrinter::NPageSize ) + d->pageSize = TQPrinter::PageSize( d->indexToPageSize[id] ); +} + + +void TQPrintDialog::orientSelected( int id ) +{ + d->orientation = (TQPrinter::Orientation)id; +} + + +void TQPrintDialog::pageOrderSelected( int id ) +{ + d->pageOrder2 = (TQPrinter::PageOrder)id; +} + + +void TQPrintDialog::setNumCopies( int copies ) +{ + d->numCopies = copies; +} + + +void TQPrintDialog::browseClicked() +{ +#ifndef TQT_NO_FILEDIALOG + TQString fn = TQFileDialog::getSaveFileName( d->fileName->text(), tr( "PostScript Files (*.ps);;All Files (*)" ), this ); + if ( !fn.isNull() ) + d->fileName->setText( fn ); +#endif +} + + +void TQPrintDialog::okClicked() +{ + d->lastPage->interpretText(); + d->firstPage->interpretText(); + d->copies->interpretText(); + if ( d->outputToFile ) { + d->printer->setOutputToFile( TRUE ); + d->printer->setOutputFileName( d->fileName->text() ); + } else { + d->printer->setOutputToFile( FALSE ); + TQListViewItem * l = d->printers->currentItem(); + if ( l ) + d->printer->setPrinterName( l->text( 0 ) ); + } + + d->printer->setOrientation( d->orientation ); + d->printer->setPageSize( d->pageSize ); + d->printer->setPageOrder( d->pageOrder2 ); + d->printer->setColorMode( d->colorMode2 ); + d->printer->setNumCopies( d->numCopies ); + if ( d->printAllButton->isChecked() ) { + d->printer->setPrintRange(TQPrinter::AllPages); + d->printer->setFromTo( d->printer->minPage(), d->printer->maxPage() ); + } else { + if (d->printSelectionButton->isChecked()) + d->printer->setPrintRange(TQPrinter::Selection); + else + d->printer->setPrintRange(TQPrinter::PageRange); + d->printer->setFromTo( d->firstPage->value(), d->lastPage->value() ); + } + + accept(); +} + + +void TQPrintDialog::printRangeSelected( int id ) +{ + bool enable = id == 2 ? TRUE : FALSE; + d->firstPage->setEnabled( enable ); + d->lastPage->setEnabled( enable ); + d->firstPageLabel->setEnabled( enable ); + d->lastPageLabel->setEnabled( enable ); +} + + +void TQPrintDialog::setFirstPage( int fp ) +{ + if ( d->printer ) + d->lastPage->setRange( fp, TQMAX(fp, TQPrintDialog::d->printer->maxPage()) ); +} + + +void TQPrintDialog::setLastPage( int lp ) +{ + if ( d->printer ) + d->firstPage->setRange( TQMIN(lp, TQPrintDialog::d->printer->minPage()), lp ); +} + + +/*! + Sets this dialog to configure printer \a p, or no printer if \a p + is null. If \a pickUpSettings is TRUE, the dialog reads most of + its settings from \a p. If \a pickUpSettings is FALSE (the + default) the dialog keeps its old settings. +*/ + +void TQPrintDialog::setPrinter( TQPrinter * p, bool pickUpSettings ) +{ + d->printer = p; + + if ( p && pickUpSettings ) { + // top to botton in the old dialog. + // printer or file + d->printerOrFile->setButton( p->outputToFile() ); + printerOrFileSelected( p->outputToFile() ); + + // printer name + if ( !!p->printerName() ) { + TQListViewItem * i = d->printers->firstChild(); + while ( i && i->text( 0 ) != p->printerName() ) + i = i->nextSibling(); + if ( i ) { + d->printers->setSelected( i, TRUE ); + d->ok->setEnabled( TRUE ); + } else if ( d->fileName->text().isEmpty() ) { + d->ok->setEnabled( d->printers->childCount() != 0 ); + } + } + + // print command does not exist any more + + // file name + d->printToFileButton->setEnabled( d->printer->isOptionEnabled( TQPrinter::PrintToFile ) ); + d->fileName->setText( p->outputFileName() ); + + // orientation + d->orientationCombo->setCurrentItem( (int)p->orientation() ); + orientSelected( p->orientation() ); + + // page size + int n = 0; + while ( n < TQPrinter::NPageSize && + d->indexToPageSize[n] != p->pageSize() ) + n++; + d->sizeCombo->setCurrentItem( n ); + paperSizeSelected( n ); + + // New stuff (Options) + + // page order + d->pageOrder->setButton( (int)p->pageOrder() ); + pageOrderSelected( p->pageOrder() ); + + // color mode + d->colorMode->setButton( (int)p->colorMode() ); + colorModeSelected( p->colorMode() ); + + // number of copies + d->copies->setValue( p->numCopies() ); + setNumCopies( p->numCopies() ); + } + + if( p ) { + d->printAllButton->setEnabled( TRUE ); + d->printSelectionButton + ->setEnabled( d->printer->isOptionEnabled( TQPrinter::PrintSelection ) ); + d->printRangeButton + ->setEnabled( d->printer->isOptionEnabled( TQPrinter::PrintPageRange ) ); + + TQPrinter::PrintRange range = p->printRange(); + switch ( range ) { + case TQPrinter::AllPages: + d->printAllButton->setChecked(TRUE); + printRangeSelected( d->printRange->id( d->printAllButton ) ); + break; + case TQPrinter::Selection: + d->printSelectionButton->setChecked(TRUE); + printRangeSelected( d->printRange->id( d->printSelectionButton ) ); + break; + case TQPrinter::PageRange: + d->printRangeButton->setChecked(TRUE); + printRangeSelected( d->printRange->id( d->printRangeButton ) ); + break; + } + } + + if ( p && p->maxPage() ) { + d->firstPage->setRange( p->minPage(), p->maxPage() ); + d->lastPage->setRange( p->minPage(), p->maxPage() ); + if ( p->fromPage() || p->toPage() ) { + setFirstPage( p->fromPage() ); + setLastPage( p->toPage() ); + d->firstPage->setValue(p->fromPage()); + d->lastPage->setValue(p->toPage()); + } + } +} + + +/*! Returns a pointer to the printer this dialog configures, or 0 if + this dialog does not operate on any printer. */ + +TQPrinter * TQPrintDialog::printer() const +{ + return d->printer; +} + + +void TQPrintDialog::colorModeSelected( int id ) +{ + d->colorMode2 = (TQPrinter::ColorMode)id; +} + +/*! + Adds the button \a but to the layout of the print dialog. The added + buttons are arranged from the left to the right below the + last groupbox of the printdialog. +*/ + +void TQPrintDialog::addButton( TQPushButton *but ) +{ + d->customLayout->addWidget( but ); +} + +void TQPrintDialog::fileNameEditChanged( const TQString &text ) +{ + if ( d->fileName->isEnabled() ) + d->ok->setEnabled( !text.isEmpty() ); +} + +#endif diff --git a/src/dialogs/tqprintdialog.h b/src/dialogs/tqprintdialog.h new file mode 100644 index 000000000..29824416a --- /dev/null +++ b/src/dialogs/tqprintdialog.h @@ -0,0 +1,103 @@ +/**************************************************************************** +** +** Definition of print dialog. +** +** Created : 950829 +** +** Copyright (C) 1992-2008 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 files LICENSE.GPL2 +** and LICENSE.GPL3 included in the packaging of this file. +** Alternatively you may (at your option) use any later version +** of the GNU General Public License if such license has been +** publicly approved by Trolltech ASA (or its successors, if any) +** and the KDE Free TQt Foundation. +** +** Please review the following information to ensure GNU General +** Public Licensing requirements will be met: +** http://trolltech.com/products/qt/licenses/licensing/opensource/. +** If you are unsure which license is appropriate for your use, please +** review the following information: +** http://trolltech.com/products/qt/licenses/licensing/licensingoverview +** or contact the sales department at sales@trolltech.com. +** +** This file may be used under the terms of the Q Public License as +** defined by Trolltech ASA and appearing in the file LICENSE.TQPL +** included in the packaging of this file. Licensees holding valid TQt +** Commercial licenses may use this file in accordance with the TQt +** Commercial License Agreement provided with the Software. +** +** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, +** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted +** herein. +** +**********************************************************************/ + +#ifndef TQPRINTDIALOG_H +#define TQPRINTDIALOG_H + +#ifndef QT_H +#include "tqdialog.h" +#endif // QT_H + +#ifndef TQT_NO_PRINTDIALOG + +class TQGroupBox; +class TQPrintDialogPrivate; +class TQListView; + +class TQ_EXPORT TQPrintDialog : public TQDialog +{ + TQ_OBJECT +public: + TQPrintDialog( TQPrinter *, TQWidget* parent=0, const char* name=0 ); + ~TQPrintDialog(); + + static bool getPrinterSetup( TQPrinter *, TQWidget* = 0 ); + static void setGlobalPrintDialog( TQPrintDialog * ); + + void setPrinter( TQPrinter *, bool = FALSE ); + TQPrinter * printer() const; + + void addButton( TQPushButton *but ); + +private slots: + void browseClicked(); + void okClicked(); + + void printerOrFileSelected( int ); + void landscapeSelected( int ); + void paperSizeSelected( int ); + void orientSelected( int ); + void pageOrderSelected( int ); + void colorModeSelected( int ); + void setNumCopies( int ); + void printRangeSelected( int ); + void setFirstPage( int ); + void setLastPage( int ); + + void fileNameEditChanged( const TQString &text ); + +private: + TQPrintDialogPrivate *d; + + TQGroupBox * setupDestination(); + TQGroupBox * setupOptions(); + TQGroupBox * setupPaper(); + TQGroupBox * setupPrinterSettings(); + +private: // Disabled copy constructor and operator= +#if defined(TQ_DISABLE_COPY) + TQPrintDialog( const TQPrintDialog & ); + TQPrintDialog &operator=( const TQPrintDialog & ); +#endif +}; + +#endif + +#endif // TQPRINTDIALOG_H diff --git a/src/kernel/ntqmetaobject.h b/src/kernel/ntqmetaobject.h deleted file mode 100644 index 9db397f47..000000000 --- a/src/kernel/ntqmetaobject.h +++ /dev/null @@ -1,286 +0,0 @@ -/**************************************************************************** -** -** Definition of TQMetaObject class -** -** Created : 930419 -** -** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. -** -** This file is part of the kernel module of the TQt GUI Toolkit. -** -** This file may be used under the terms of the GNU General -** Public License versions 2.0 or 3.0 as published by the Free -** Software Foundation and appearing in the files LICENSE.GPL2 -** and LICENSE.GPL3 included in the packaging of this file. -** Alternatively you may (at your option) use any later version -** of the GNU General Public License if such license has been -** publicly approved by Trolltech ASA (or its successors, if any) -** and the KDE Free TQt Foundation. -** -** Please review the following information to ensure GNU General -** Public Licensing requirements will be met: -** http://trolltech.com/products/qt/licenses/licensing/opensource/. -** If you are unsure which license is appropriate for your use, please -** review the following information: -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview -** or contact the sales department at sales@trolltech.com. -** -** This file may be used under the terms of the Q Public License as -** defined by Trolltech ASA and appearing in the file LICENSE.TQPL -** included in the packaging of this file. Licensees holding valid TQt -** Commercial licenses may use this file in accordance with the TQt -** Commercial License Agreement provided with the Software. -** -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted -** herein. -** -**********************************************************************/ - -#ifndef TQMETAOBJECT_H -#define TQMETAOBJECT_H - -#ifndef QT_H -#include "tqconnection.h" -#include "tqstrlist.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 TQT_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 TQT_NO_PROPERTIES - -class TQ_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 // TQT_NO_PROPERTIES - -struct TQClassInfo // class info meta data -{ - const char* name; // - name of the info - const char* value; // - value of the info -}; - -class TQ_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 TQT_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 TQT_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 (*tqt_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 TQT_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 TQT_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 TQT_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 (*tqt_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 TQT_NO_PROPERTIES - int propertyoffset; -public: - bool tqt_static_property( TQObject* o, int id, int f, TQVariant* v); -private: - friend class TQMetaProperty; -#endif - -private: // Disabled copy constructor and operator= -#if defined(TQ_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 TQT_NO_PROPERTIES -inline int TQMetaObject::propertyOffset() const -{ return propertyoffset; } -#endif - -typedef TQMetaObject *(*TQtStaticMetaObjectFunction)(); - -class TQ_EXPORT TQMetaObjectCleanUp -{ -public: - TQMetaObjectCleanUp( const char *mo_name, TQtStaticMetaObjectFunction ); - TQMetaObjectCleanUp(); - ~TQMetaObjectCleanUp(); - - void setMetaObject( TQMetaObject *&mo ); - -private: - TQMetaObject **metaObject; -}; - -#endif // TQMETAOBJECT_H diff --git a/src/kernel/ntqmngio.h b/src/kernel/ntqmngio.h deleted file mode 100644 index 530a0aa1d..000000000 --- a/src/kernel/ntqmngio.h +++ /dev/null @@ -1,53 +0,0 @@ -/**************************************************************************** -** -** Definition of MNG TQImage IOHandler -** -** Created : 970521 -** -** Copyright (C) 2005-2008 Trolltech ASA. All rights reserved. -** -** This file is part of the kernel module of the TQt GUI Toolkit. -** -** This file may be used under the terms of the GNU General -** Public License versions 2.0 or 3.0 as published by the Free -** Software Foundation and appearing in the files LICENSE.GPL2 -** and LICENSE.GPL3 included in the packaging of this file. -** Alternatively you may (at your option) use any later version -** of the GNU General Public License if such license has been -** publicly approved by Trolltech ASA (or its successors, if any) -** and the KDE Free TQt Foundation. -** -** Please review the following information to ensure GNU General -** Public Licensing requirements will be met: -** http://trolltech.com/products/qt/licenses/licensing/opensource/. -** If you are unsure which license is appropriate for your use, please -** review the following information: -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview -** or contact the sales department at sales@trolltech.com. -** -** This file may be used under the terms of the Q Public License as -** defined by Trolltech ASA and appearing in the file LICENSE.TQPL -** included in the packaging of this file. Licensees holding valid TQt -** Commercial licenses may use this file in accordance with the TQt -** Commercial License Agreement provided with the Software. -** -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted -** herein. -** -**********************************************************************/ - -#ifndef TQMNGIO_H -#define TQMNGIO_H - -#ifndef QT_H -#endif // QT_H - -#ifndef TQT_NO_IMAGEIO_MNG - -void qInitMngIO(); - -#endif // TQT_NO_IMAGEIO_MNG - -#endif // TQMNGIO_H diff --git a/src/kernel/ntqnamespace.h b/src/kernel/ntqnamespace.h deleted file mode 100644 index f5ec7dd1d..000000000 --- a/src/kernel/ntqnamespace.h +++ /dev/null @@ -1,1035 +0,0 @@ -/**************************************************************************** -** -** Definition of TQt namespace (as class for compiler compatibility) -** -** Created : 980927 -** -** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. -** -** This file is part of the kernel module of the TQt GUI Toolkit. -** -** This file may be used under the terms of the GNU General -** Public License versions 2.0 or 3.0 as published by the Free -** Software Foundation and appearing in the files LICENSE.GPL2 -** and LICENSE.GPL3 included in the packaging of this file. -** Alternatively you may (at your option) use any later version -** of the GNU General Public License if such license has been -** publicly approved by Trolltech ASA (or its successors, if any) -** and the KDE Free TQt Foundation. -** -** Please review the following information to ensure GNU General -** Public Licensing requirements will be met: -** http://trolltech.com/products/qt/licenses/licensing/opensource/. -** If you are unsure which license is appropriate for your use, please -** review the following information: -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview -** or contact the sales department at sales@trolltech.com. -** -** This file may be used under the terms of the Q Public License as -** defined by Trolltech ASA and appearing in the file LICENSE.TQPL -** included in the packaging of this file. Licensees holding valid TQt -** Commercial licenses may use this file in accordance with the TQt -** Commercial License Agreement provided with the Software. -** -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted -** herein. -** -**********************************************************************/ - -#ifndef TQNAMESPACE_H -#define TQNAMESPACE_H - -#ifndef QT_H -#include "tqglobal.h" -#endif // QT_H - - -class TQColor; -class TQCursor; - - -class TQ_EXPORT TQt { -public: - static const TQColor & color0; - static const TQColor & color1; - static const TQColor & black; - static const TQColor & white; - static const TQColor & darkGray; - static const TQColor & gray; - static const TQColor & lightGray; - static const TQColor & red; - static const TQColor & green; - static const TQColor & blue; - static const TQColor & cyan; - static const TQColor & magenta; - static const TQColor & yellow; - static const TQColor & darkRed; - static const TQColor & darkGreen; - static const TQColor & darkBlue; - static const TQColor & darkCyan; - static const TQColor & darkMagenta; - static const TQColor & darkYellow; - - // documented in tqevent.cpp - enum ButtonState { // mouse/keyboard state values - NoButton = 0x0000, - LeftButton = 0x0001, - RightButton = 0x0002, - MidButton = 0x0004, - HistoryBackButton = 0x0008, - HistoryForwardButton = 0x0010, - MouseButtonMask = 0x001f, - ShiftButton = 0x0100, - ControlButton = 0x0200, - AltButton = 0x0400, - MetaButton = 0x0800, - KeyButtonMask = 0x0f00, - Keypad = 0x4000 - }; - - // documented in tqobject.cpp - // ideally would start at 1, as in TQSizePolicy, but that breaks other things - enum Orientation { - Horizontal = 0, - Vertical - }; - - // documented in tqlistview.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 tqpainter.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 tqpainter.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 tqwidget.cpp - typedef uint WState; - - // TQWidget state flags (internal, barely documented in tqwidget.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 - }; - - // NetWM flags; documented in tqwidget.cpp - typedef uint NFlags; - - // documented in tqwidget.cpp - enum NETWMFlags { -#if defined(TQ_WS_X11) - WX11DisableMove = 0x00000001, - WX11DisableClose = 0x00000002, - WX11DisableResize = 0x00000004, - WX11DisableMinimize = 0x00000008, - WX11DisableMaximize = 0x00000010, - WX11DisableShade = 0x00000020 -#else - WX11DisableMove = 0x00000000, - WX11DisableClose = 0x00000000, - WX11DisableResize = 0x00000000, - WX11DisableMinimize = 0x00000000, - WX11DisableMaximize = 0x00000000, - WX11DisableShade = 0x00000000 -#endif - }; - - // Widget flags2; documented in tqwidget.cpp - typedef uint WFlags; - - // documented in tqwidget.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(TQ_WS_X11) - WX11BypassWM = 0x01000000, - WWinOwnDC = 0x00000000, - WMacNoSheet = 0x00000000, - WMacDrawer = 0x00000000, -#elif defined(TQ_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(TQ_WS_X11) - WStyle_Splash = 0x20000000, -#else - WStyle_Splash = WStyle_NoBorder | WMacNoSheet | WStyle_Tool | WWinOwnDC, -#endif - WNoAutoErase = WRepaintNoErase | WResizeNoErase -#ifndef TQT_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 requirements. - // Documented in tqimage.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 tqpainter.cpp - enum BGMode { // background mode - TransparentMode, - OpaqueMode - }; - -#ifndef TQT_NO_COMPAT - // documented in tqpainter.cpp - enum PaintUnit { // paint unit - PixelUnit, - LoMetricUnit, // OBSOLETE - HiMetricUnit, // OBSOLETE - LoEnglishUnit, // OBSOLETE - HiEnglishUnit, // OBSOLETE - TwipsUnit // OBSOLETE - }; -#endif - - // documented in tqstyle.cpp -#ifdef TQT_NO_COMPAT - enum GUIStyle { - WindowsStyle = 1, // ### TQt 4.0: either remove the obsolete enums or clean up compat vs. - MotifStyle = 4, // ### TQT_NO_COMPAT by reordering or combination into one enum. - GtkStyle = 6 // Gtk compability mode - }; -#else - enum GUIStyle { - MacStyle, // OBSOLETE - WindowsStyle, - Win3Style, // OBSOLETE - PMStyle, // OBSOLETE - MotifStyle, - GtkStyle = 6 // Gtk compability mode - }; -#endif - - // documented in tqkeysequence.cpp - enum SequenceMatch { - NoMatch, - PartialMatch, - Identical - }; - - // documented in tqevent.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 tqevent.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, - - // International input method support (X keycode - 0xEE00). - // Only interesting if you are writing your own input method - - // International & multi-key character composition - Key_Multi_key = 0x1120, // Multi-key character compose - Key_Codeinput = 0x1137, - Key_SingleCandidate = 0x113c, - Key_MultipleCandidate = 0x113d, - Key_PreviousCandidate = 0x113e, - - // Misc Functions - Key_Mode_switch = 0x117e, // Character set switch - //Key_script_switch = 0x117e, // Alias for mode_switch - - // Japanese keyboard support - Key_Kanji = 0x1121, // Kanji, Kanji convert - Key_Muhenkan = 0x1122, // Cancel Conversion - //Key_Henkan_Mode = 0x1123, // Start/Stop Conversion - Key_Henkan = 0x1123, // Alias for Henkan_Mode - Key_Romaji = 0x1124, // to Romaji - Key_Hiragana = 0x1125, // to Hiragana - Key_Katakana = 0x1126, // to Katakana - Key_Hiragana_Katakana = 0x1127, // Hiragana/Katakana toggle - Key_Zenkaku = 0x1128, // to Zenkaku - Key_Hankaku = 0x1129, // to Hankaku - Key_Zenkaku_Hankaku = 0x112a, // Zenkaku/Hankaku toggle - Key_Touroku = 0x112b, // Add to Dictionary - Key_Massyo = 0x112c, // Delete from Dictionary - Key_Kana_Lock = 0x112d, // Kana Lock - Key_Kana_Shift = 0x112e, // Kana Shift - Key_Eisu_Shift = 0x112f, // Alphanumeric Shift - Key_Eisu_toggle = 0x1130, // Alphanumeric toggle - //Key_Kanji_Bangou = 0x1137, // Codeinput - //Key_Zen_Koho = 0x113d, // Multiple/All Candidate(s) - //Key_Mae_Koho = 0x113e, // Previous Candidate - - // Korean keyboard support - // - // In fact, many Korean users need only 2 keys, Key_Hangul and - // Key_Hangul_Hanja. But rest of the keys are good for future. - - Key_Hangul = 0x1131, // Hangul start/stop(toggle) - Key_Hangul_Start = 0x1132, // Hangul start - Key_Hangul_End = 0x1133, // Hangul end, English start - Key_Hangul_Hanja = 0x1134, // Start Hangul->Hanja Conversion - Key_Hangul_Jamo = 0x1135, // Hangul Jamo mode - Key_Hangul_Romaja = 0x1136, // Hangul Romaja mode - //Key_Hangul_Codeinput = 0x1137, // Hangul code input mode - Key_Hangul_Jeonja = 0x1138, // Jeonja mode - Key_Hangul_Banja = 0x1139, // Banja mode - Key_Hangul_PreHanja = 0x113a, // Pre Hanja conversion - Key_Hangul_PostHanja = 0x113b, // Post Hanja conversion - //Key_Hangul_SingleCandidate = 0x113c, // Single candidate - //Key_Hangul_MultipleCandidate = 0x113d, // Multiple candidate - //Key_Hangul_PreviousCandidate = 0x113e, // Previous candidate - Key_Hangul_Special = 0x113f, // Special symbols - //Key_Hangul_switch = 0x117e, // Alias for mode_switch - - // dead keys (X keycode - 0xED00 to avoid the conflict) - Key_Dead_Grave = 0x1250, - Key_Dead_Acute = 0x1251, - Key_Dead_Circumflex = 0x1252, - Key_Dead_Tilde = 0x1253, - Key_Dead_Macron = 0x1254, - Key_Dead_Breve = 0x1255, - Key_Dead_Abovedot = 0x1256, - Key_Dead_Diaeresis = 0x1257, - Key_Dead_Abovering = 0x1258, - Key_Dead_Doubleacute = 0x1259, - Key_Dead_Caron = 0x125a, - Key_Dead_Cedilla = 0x125b, - Key_Dead_Ogonek = 0x125c, - Key_Dead_Iota = 0x125d, - Key_Dead_Voiced_Sound = 0x125e, - Key_Dead_Semivoiced_Sound = 0x125f, - Key_Dead_Belowdot = 0x1260, - Key_Dead_Hook = 0x1261, - Key_Dead_Horn = 0x1262, - - 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 - // - // This is mainly for compatibility - applications and input - // methods should not use the TQt keycodes between 128 and 255, - // but should rather use the TQKeyEvent::text(). See - // TQETWidget::translateKeyEventInternal() for more details. - - 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_MonBrightnessUp = 0x010b2, - Key_MonBrightnessDown = 0x010b3, - Key_KeyboardLightOnOff = 0x010b4, - Key_KeyboardBrightnessUp = 0x010b5, - Key_KeyboardBrightnessDown = 0x010b6, - - Key_MediaLast = 0x1fff, - - Key_unknown = 0xffff - }; - - // documented in tqcommonstyle.cpp - enum ArrowType { - UpArrow, - DownArrow, - LeftArrow, - RightArrow - }; - - // documented in tqpainter.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 tqpainter.cpp - enum PenStyle { // pen style - NoPen, - SolidLine, - DashLine, - DotLine, - DashDotLine, - DashDotDotLine, - FineDotLine, - MPenStyle = 0x0f - }; - - // documented in tqpainter.cpp - enum PenCapStyle { // line endcap style - FlatCap = 0x00, - SquareCap = 0x10, - RoundCap = 0x20, - MPenCapStyle = 0x30 - }; - - // documented in tqpainter.cpp - enum PenJoinStyle { // line join style - MiterJoin = 0x00, - BevelJoin = 0x40, - RoundJoin = 0x80, - MPenJoinStyle = 0xc0 - }; - - // documented in tqpainter.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 tqstyle.cpp - enum UIEffect { - UI_General, - UI_AnimateMenu, - UI_FadeMenu, - UI_AnimateCombo, - UI_AnimateTooltip, - UI_FadeTooltip, - UI_AnimateToolBox - }; - - // documented in tqcursor.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 - - static const TQCursor & arrowCursor; // standard arrow cursor - static const TQCursor & upArrowCursor; // upwards arrow - static const TQCursor & crossCursor; // crosshair - static const TQCursor & waitCursor; // hourglass/watch - static const TQCursor & ibeamCursor; // ibeam/text entry - static const TQCursor & sizeVerCursor; // vertical resize - static const TQCursor & sizeHorCursor; // horizontal resize - static const TQCursor & sizeBDiagCursor; // diagonal resize (/) - static const TQCursor & sizeFDiagCursor; // diagonal resize (\) - static const TQCursor & sizeAllCursor; // all directions resize - static const TQCursor & blankCursor; // blank/invisible cursor - static const TQCursor & splitVCursor; // vertical bar with left-right - // arrows - static const TQCursor & splitHCursor; // horizontal bar with up-down - // arrows - static const TQCursor & pointingHandCursor; // pointing hand - static const TQCursor & forbiddenCursor; // forbidden cursor (slashed circle) - static const TQCursor & whatsThisCursor; // arrow with a question mark - static const TQCursor & busyCursor; // arrow with hourglass - - - enum TextFormat { - PlainText, - RichText, - AutoText, - LogText - }; - - // Documented in tqtextedit.cpp - enum AnchorAttribute { - AnchorName, - AnchorHref - }; - - // Documented in tqmainwindow.cpp - enum Dock { - DockUnmanaged, - DockTornOff, - DockTop, - DockBottom, - DockRight, - DockLeft, - DockMinimized -#ifndef TQT_NO_COMPAT - , - Unmanaged = DockUnmanaged, - TornOff = DockTornOff, - Top = DockTop, - Bottom = DockBottom, - Right = DockRight, - Left = DockLeft, - Minimized = DockMinimized -#endif - }; - // compatibility - typedef Dock ToolBarDock; - - // documented in tqdatetime.cpp - enum DateFormat { - TextDate, // default TQt - ISODate, // ISO 8601 - LocalDate // locale dependent - }; - - // documented in tqdatetime.cpp - enum TimeSpec { - LocalTime, - UTC - }; - - // documented in tqwidget.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 tqstring.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 tqtabwidget.cpp - enum Corner { - TopLeft = 0x00000, - TopRight = 0x00001, - BottomLeft = 0x00002, - BottomRight = 0x00003 - }; - - // "handle" type for system objects. Documented as \internal in - // qapplication.cpp -#if defined(TQ_WS_MAC) - typedef void * HANDLE; -#elif defined(TQ_WS_WIN) - typedef void *HANDLE; -#elif defined(TQ_WS_X11) - typedef unsigned long HANDLE; -#endif -}; - - -class TQ_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 diff --git a/src/kernel/ntqpolygonscanner.h b/src/kernel/ntqpolygonscanner.h deleted file mode 100644 index 2ab2c8e37..000000000 --- a/src/kernel/ntqpolygonscanner.h +++ /dev/null @@ -1,61 +0,0 @@ -/**************************************************************************** -** -** Definition of TQPolygonScanner class -** -** Created : 000120 -** -** Copyright (C) 1999-2008 Trolltech ASA. All rights reserved. -** -** This file is part of the kernel module of the TQt GUI Toolkit. -** -** This file may be used under the terms of the GNU General -** Public License versions 2.0 or 3.0 as published by the Free -** Software Foundation and appearing in the files LICENSE.GPL2 -** and LICENSE.GPL3 included in the packaging of this file. -** Alternatively you may (at your option) use any later version -** of the GNU General Public License if such license has been -** publicly approved by Trolltech ASA (or its successors, if any) -** and the KDE Free TQt Foundation. -** -** Please review the following information to ensure GNU General -** Public Licensing requirements will be met: -** http://trolltech.com/products/qt/licenses/licensing/opensource/. -** If you are unsure which license is appropriate for your use, please -** review the following information: -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview -** or contact the sales department at sales@trolltech.com. -** -** This file may be used under the terms of the Q Public License as -** defined by Trolltech ASA and appearing in the file LICENSE.TQPL -** included in the packaging of this file. Licensees holding valid TQt -** Commercial licenses may use this file in accordance with the TQt -** Commercial License Agreement provided with the Software. -** -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted -** herein. -** -**********************************************************************/ - -#ifndef TQPOLYGONSCANNER_H -#define TQPOLYGONSCANNER_H - -#ifndef QT_H -#include "tqglobal.h" -#endif // QT_H - -class TQPointArray; -class TQPoint; - -class TQ_EXPORT TQPolygonScanner { -public: - // BIC: fix for 3.0 - void scan( const TQPointArray& pa, bool winding, int index=0, int npoints=-1 ); - void scan( const TQPointArray& pa, bool winding, int index, int npoints, bool stitchable ); - enum Edge { Left=1, Right=2, Top=4, Bottom=8 }; - void scan( const TQPointArray& pa, bool winding, int index, int npoints, Edge edges ); - virtual void processSpans( int n, TQPoint* point, int* width )=0; -}; - -#endif // TQPOLYGONSCANNER_H diff --git a/src/kernel/ntqt.h b/src/kernel/ntqt.h index 0a1ffc22b..7032b7383 100644 --- a/src/kernel/ntqt.h +++ b/src/kernel/ntqt.h @@ -21,7 +21,7 @@ #include "tqptrcollection.h" #include "tqglist.h" #include "tqobjectdefs.h" -#include "ntqnamespace.h" +#include "tqnamespace.h" #include "tqgarray.h" #include "tqmemarray.h" #include "tqcstring.h" @@ -93,7 +93,7 @@ #include #include "tqgplugin.h" #include -#include "ntqrangecontrol.h" +#include "tqrangecontrol.h" #include "tqbuttongroup.h" #include #include "tqgvector.h" @@ -129,8 +129,8 @@ #include "tqbitmap.h" #include "ntqvariant.h" #include "tqsignal.h" -#include -#include "ntqmetaobject.h" +#include +#include "tqmetaobject.h" #include "tqheader.h" #include #include @@ -157,9 +157,9 @@ #include #include #include -#include +#include #include "tqpopupmenu.h" -#include +#include #include #include #include "tqprogressbar.h" @@ -312,7 +312,7 @@ #ifdef TQ_WS_MAC #include -#include +#include #endif // TQ_WS_MAC #ifdef TQ_WS_WIN diff --git a/src/kernel/ntqwindowdefs.h b/src/kernel/ntqwindowdefs.h index 812bf6f6c..166cc0638 100644 --- a/src/kernel/ntqwindowdefs.h +++ b/src/kernel/ntqwindowdefs.h @@ -45,7 +45,7 @@ #ifndef QT_H #include "tqobjectdefs.h" #include "tqstring.h" -#include "ntqnamespace.h" +#include "tqnamespace.h" #endif // QT_H // Class forward definitions diff --git a/src/kernel/qapplication.cpp b/src/kernel/qapplication.cpp index 8f04514cf..8ad7f5a55 100644 --- a/src/kernel/qapplication.cpp +++ b/src/kernel/qapplication.cpp @@ -57,7 +57,7 @@ #include "tqstyle.h" #include "tqstylefactory.h" #include "tqfile.h" -#include "ntqmessagebox.h" +#include "tqmessagebox.h" #include "tqdir.h" #include "tqfileinfo.h" #ifdef TQ_WS_WIN @@ -281,7 +281,7 @@ TQApplication. This can be useful if you wish to share code between a non-GUI server and a GUI client. - \headerfile ntqnamespace.h + \headerfile tqnamespace.h \headerfile ntqwindowdefs.h \headerfile tqglobal.h */ diff --git a/src/kernel/qinternal_p.h b/src/kernel/qinternal_p.h index 8992497e6..d8c29cc67 100644 --- a/src/kernel/qinternal_p.h +++ b/src/kernel/qinternal_p.h @@ -53,7 +53,7 @@ // // #ifndef QT_H -#include "ntqnamespace.h" +#include "tqnamespace.h" #include "tqrect.h" #include "tqptrlist.h" #include "tqcstring.h" diff --git a/src/kernel/qmetaobject.cpp b/src/kernel/qmetaobject.cpp deleted file mode 100644 index ae74503c3..000000000 --- a/src/kernel/qmetaobject.cpp +++ /dev/null @@ -1,1251 +0,0 @@ -/**************************************************************************** -** -** Implementation of TQMetaObject class -** -** Created : 930419 -** -** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. -** -** This file is part of the kernel module of the TQt GUI Toolkit. -** -** This file may be used under the terms of the GNU General -** Public License versions 2.0 or 3.0 as published by the Free -** Software Foundation and appearing in the files LICENSE.GPL2 -** and LICENSE.GPL3 included in the packaging of this file. -** Alternatively you may (at your option) use any later version -** of the GNU General Public License if such license has been -** publicly approved by Trolltech ASA (or its successors, if any) -** and the KDE Free TQt Foundation. -** -** Please review the following information to ensure GNU General -** Public Licensing requirements will be met: -** http://trolltech.com/products/qt/licenses/licensing/opensource/. -** If you are unsure which license is appropriate for your use, please -** review the following information: -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview -** or contact the sales department at sales@trolltech.com. -** -** This file may be used under the terms of the Q Public License as -** defined by Trolltech ASA and appearing in the file LICENSE.TQPL -** included in the packaging of this file. Licensees holding valid TQt -** Commercial licenses may use this file in accordance with the TQt -** Commercial License Agreement provided with the Software. -** -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted -** herein. -** -**********************************************************************/ - -#include "ntqmetaobject.h" -#include "tqasciidict.h" - -#ifdef TQT_THREAD_SUPPORT -#include -#endif // TQT_THREAD_SUPPORT - -/*! - \class TQMetaData ntqmetaobject.h - \reentrant - - \brief The TQMetaData class provides information about a member function that is known to the meta object system. - - \internal - - The struct consists of three members, \e name, \e method and \e access: - - \code - const char *name; // - member name - const TQUMethod* method; // - detailed method description - enum Access { Private, Protected, Public }; - Access access; // - access permission - \endcode - */ - -/*! - \class TQClassInfo ntqmetaobject.h - - \brief The TQClassInfo class provides a struct that stores some basic information about a single class. - - \internal - - The class information is a simple \e name - \e value pair: - - \code - const char* name; - const char* value; - \endcode - - */ - - -/*! - \class TQMetaObject ntqmetaobject.h - \brief The TQMetaObject class contains meta information about TQt objects. - - \ingroup objectmodel - - 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 required for application programming. - But if you write meta applications, such as scripting engines or - GUI builders, you might find these functions useful: - \list - \i className() to get the name of a class. - \i superClassName() to get the name of the superclass. - \i inherits(), the function called by TQObject::inherits(). - \i superClass() to access the superclass's meta object. - \i numSlots(), numSignals(), slotNames(), and signalNames() to get - information about a class's signals and slots. - \i property() and propertyNames() to obtain information about a - class's properties. - \endlist - - 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(). - - \sa \link moc.html moc (Meta Object Compiler)\endlink - -*/ - - -/***************************************************************************** - The private object. - *****************************************************************************/ - -// extra flags from moc.y -enum Flags { - Invalid = 0x00000000, - Readable = 0x00000001, - Writable = 0x00000002, - EnumOrSet = 0x00000004, - UnresolvedEnum = 0x00000008, - StdSet = 0x00000100, - Override = 0x00000200, - NotDesignable = 0x00001000, - DesignableOverride = 0x00002000, - NotScriptable = 0x00004000, - ScriptableOverride = 0x00008000, - NotStored = 0x00010000, - StoredOverride = 0x00020000 -}; - -static TQAsciiDict *qt_metaobjects = 0; -static int qt_metaobjects_count = 0; - -class TQMetaObjectPrivate -{ -public: - TQMetaObjectPrivate() : -#ifndef TQT_NO_PROPERTIES - enumData(0), numEnumData(0), - propData(0),numPropData(0), - tqt_static_property(0), -#endif - classInfo(0), numClassInfo(0) {} -#ifndef TQT_NO_PROPERTIES - const TQMetaEnum *enumData; - int numEnumData; - const TQMetaProperty *propData; - int numPropData; - bool (*tqt_static_property)(TQObject*, int, int, TQVariant*); -#endif - const TQClassInfo *classInfo; - int numClassInfo; -}; - - -/***************************************************************************** - Internal dictionary for fast access to class members - *****************************************************************************/ - -#if defined(Q_CANNOT_DELETE_CONSTANT) -typedef TQMetaData TQConstMetaData; -#else -typedef const TQMetaData TQConstMetaData; -#endif - -class TQ_EXPORT TQMemberDict : public TQAsciiDict -{ -public: - TQMemberDict( int size = 17, bool cs = TRUE, bool ck = TRUE ) : - TQAsciiDict(size,cs,ck) {} - TQMemberDict( const TQMemberDict &dict ) : TQAsciiDict(dict) {} - ~TQMemberDict() { clear(); } - TQMemberDict &operator=(const TQMemberDict &dict) - { return (TQMemberDict&)TQAsciiDict::operator=(dict); } -}; - - -/* - Calculate optimal dictionary size for n entries using prime numbers, - and assuming there are no more than 40 entries. -*/ - -static int optDictSize( int n ) -{ - if ( n < 6 ) - n = 5; - else if ( n < 10 ) - n = 11; - else if ( n < 14 ) - n = 17; - else - n = 23; - return n; -} - - -/***************************************************************************** - TQMetaObject member functions - *****************************************************************************/ - -/*!\internal - */ -TQMetaObject::TQMetaObject( const char *const class_name, TQMetaObject *super_class, - const TQMetaData *const slot_data, int n_slots, - const TQMetaData *const signal_data, int n_signals, -#ifndef TQT_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 ) -{ - classname = class_name; // set meta data - superclass = super_class; - superclassname = superclass ? superclass->className() : 0; - slotDict = init( slotData = slot_data, n_slots ); - signalDict = init( signalData = signal_data, n_signals ); - - d = new TQMetaObjectPrivate; - reserved = 0; - -#ifndef TQT_NO_PROPERTIES - d->propData = prop_data; - d->numPropData = n_props; - d->enumData = enum_data; - d->numEnumData = n_enums; -#endif - d->classInfo = class_info; - d->numClassInfo = n_info; - - signaloffset = superclass ? ( superclass->signalOffset() + superclass->numSignals() ) : 0; - slotoffset = superclass ? ( superclass->slotOffset() + superclass->numSlots() ) : 0; -#ifndef TQT_NO_PROPERTIES - propertyoffset = superclass ? ( superclass->propertyOffset() + superclass->numProperties() ) : 0; -#endif -} - -#ifndef TQT_NO_PROPERTIES -/*!\internal - */ -TQMetaObject::TQMetaObject( const char *const class_name, TQMetaObject *super_class, - 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 (*tqt_static_property)(TQObject*, int, int, TQVariant*), - const TQClassInfo *const class_info, int n_info ) -{ - classname = class_name; // set meta data - superclass = super_class; - superclassname = superclass ? superclass->className() : 0; - slotDict = init( slotData = slot_data, n_slots ); - signalDict = init( signalData = signal_data, n_signals ); - - d = new TQMetaObjectPrivate; - reserved = 0; - - d->propData = prop_data; - d->numPropData = n_props; - d->enumData = enum_data; - d->numEnumData = n_enums; - d->tqt_static_property = tqt_static_property; - d->classInfo = class_info; - d->numClassInfo = n_info; - - signaloffset = superclass ? ( superclass->signalOffset() + superclass->numSignals() ) : 0; - slotoffset = superclass ? ( superclass->slotOffset() + superclass->numSlots() ) : 0; - propertyoffset = superclass ? ( superclass->propertyOffset() + superclass->numProperties() ) : 0; -} -#endif - -/*!\internal - */ -TQMetaObject::~TQMetaObject() -{ - delete slotDict; // delete dicts - delete signalDict; - delete d; -#ifdef TQT_THREAD_SUPPORT - TQMutexLocker( tqt_global_mutexpool ? - tqt_global_mutexpool->get( &qt_metaobjects ) : 0 ); -#endif // TQT_THREAD_SUPPORT - if ( qt_metaobjects ) { - qt_metaobjects->remove( classname ); - if ( qt_metaobjects->isEmpty() ) { - delete qt_metaobjects; - qt_metaobjects = 0; - } - } - - // delete reserved; // Unused void* -} - - -/*! - \fn const char *TQMetaObject::className() const - - Returns the class name. - - \sa TQObject::className(), superClassName() -*/ - -/*! - \fn const char *TQMetaObject::superClassName() const - - Returns the class name of the superclass or 0 if there is no - superclass in the TQObject hierachy. - - \sa className() -*/ - -/*! - \fn TQMetaObject *TQMetaObject::superClass() const - - Returns the meta object of the super class or 0 if there is no - such object. -*/ - -/*! - Returns the number of slots for this class. - - If \a super is TRUE, inherited slots are included. - - \sa slotNames() -*/ -int TQMetaObject::numSlots( bool super ) const // number of slots -{ - int n = slotDict ? slotDict->count() : 0; - if ( !super || !superclass ) - return n; - return n + superclass->numSlots( super ); -} - -/*! - Returns the number of signals for this class. - - If \a super is TRUE, inherited signals are included. - - \sa signalNames() -*/ -int TQMetaObject::numSignals( bool super ) const // number of signals -{ - int n = signalDict ? signalDict->count() : 0; - if ( !super || !superclass ) - return n; - return n + superclass->numSignals( super ); -} - - -/*! \internal - - Returns the meta data of the slot with the name \a n or 0 if no - such slot exists. - - If \a super is TRUE, inherited slots are included. - */ -const TQMetaData* TQMetaObject::slot( int index, bool super ) const -{ - int idx = index - ( super ? slotOffset() : 0 ); - if ( slotDict && idx >= 0 && idx < (int) slotDict->count() ) { - return slotData + idx; - } - if ( !super || !superclass ) - return 0; - return superclass->slot( index, super ); -} - -/*! \internal - - Returns the meta data of the signal with the name \a n or 0 if no - such signal exists. - - If \a super is TRUE, inherited signals are included. - */ -const TQMetaData* TQMetaObject::signal( int index, bool super ) const -{ - int idx = index - ( super ? signalOffset() : 0 ); - if ( signalDict && idx >= 0 && idx < (int) signalDict->count() ) { - return signalData + idx; - } - if ( !super || !superclass ) - return 0; - return superclass->signal( index, super ); -} - - -/*! - \fn int TQMetaObject::signalOffset() const - - \internal - - Returns the signal offset for this metaobject. - -*/ - -/*! - \fn int TQMetaObject::propertyOffset() const - - \internal - - Returns the property offset for this metaobject. - -*/ - -/*! \internal - Returns the index of the signal with name \n or -1 if no such signal exists. - - If \a super is TRUE, inherited signals are included. -*/ -int TQMetaObject::findSignal( const char* n, bool super ) const -{ - const TQMetaObject *mo = this; - int offset = -1; - - do { - const TQMetaData *md = mo->signalDict ? mo->signalDict->find( n ) : 0; - if ( md ) { -#if defined(QT_CHECK_RANGE) - if ( offset != -1 ) { - tqWarning( "TQMetaObject::findSignal:%s: Conflict with %s::%s", - className(), mo->className(), n ); - return offset; - } -#endif - offset = mo->signalOffset() + ( md - mo->signalData ); -#if !defined(QT_CHECK_RANGE) - return offset; -#endif - } - } while ( super && (mo = mo->superclass) ); - - return offset; -} - -/*! - \fn int TQMetaObject::slotOffset() const - - \internal - - Returns the slot offset for this metaobject. - -*/ - -/*! \internal - Returns the index of the slot with name \n or -1 if no such slot exists. - - If \a super is TRUE, inherited slots are included. - */ -int TQMetaObject::findSlot( const char* n, bool super ) const -{ - const TQMetaData *md = slotDict ? slotDict->find( n ) : 0; - if ( md ) - return slotOffset() + ( md - slotData ); - if ( !super || !superclass) - return -1; - return superclass->findSlot( n, super ); -} - -/*!\internal - */ -TQMetaObject *TQMetaObject::new_metaobject( const char *classname, - TQMetaObject *superclassobject, - const TQMetaData * const slot_data, int n_slots, - const TQMetaData * const signal_data, int n_signals, -#ifndef TQT_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 ) -{ - return new TQMetaObject( classname, superclassobject, slot_data, n_slots, - signal_data, n_signals, -#ifndef TQT_NO_PROPERTIES - prop_data, n_props, - enum_data, n_enums, -#endif - class_info, n_info ); -} - -#ifndef TQT_NO_PROPERTIES -/*!\internal - */ -TQMetaObject *TQMetaObject::new_metaobject( const char *classname, - TQMetaObject *superclassobject, - 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 (*tqt_static_property)(TQObject*, int, int, TQVariant*), - const TQClassInfo * const class_info, int n_info ) -{ - return new TQMetaObject( classname, superclassobject, slot_data, n_slots, - signal_data, n_signals, - prop_data, n_props, - enum_data, n_enums, - tqt_static_property, - class_info, n_info ); -} -#endif - -/*!\internal - */ -TQMemberDict *TQMetaObject::init( const TQMetaData * data, int n ) -{ - if ( n == 0 ) // nothing, then make no dict - return 0; - TQMemberDict *dict = new TQMemberDict( optDictSize(n), TRUE, FALSE ); - TQ_CHECK_PTR( dict ); - while ( n-- ) { // put all members into dict - dict->insert( data->name, data ); - data++; - } - return dict; -} - -/*! - Returns the number of items of class information available for - this class. - - If \a super is TRUE, inherited class information is included. -*/ -int TQMetaObject::numClassInfo( bool super ) const -{ - return d->numClassInfo + ((super && superclass)?superclass->numClassInfo(super):0); -} - -/*! - Returns the class information with index \a index or 0 if no such - information exists. - - If \a super is TRUE, inherited class information is included. -*/ -const TQClassInfo* TQMetaObject::classInfo( int index, bool super ) const -{ - if ( index < 0 ) - return 0; - if ( index < d->numClassInfo ) - return &(d->classInfo[ index ]); - if ( !super || !superclass ) - return 0; - return superclass->classInfo( index - d->numClassInfo, super ); -} - -/*! - \overload - Returns the class information with name \a name or 0 if no such - information exists. - - If \a super is TRUE, inherited class information is included. -*/ -const char* TQMetaObject::classInfo( const char* name, bool super ) const -{ - for( int i = 0; i < d->numClassInfo; ++i ) { - if ( qstrcmp( d->classInfo[i].name, name ) == 0 ) - return d->classInfo[i].value; - } - if ( !super || !superclass ) - return 0; - return superclass->classInfo( name, super ); -} - -#ifndef TQT_NO_PROPERTIES - -/*! - Returns the number of properties for this class. - - If \a super is TRUE, inherited properties are included. - - \sa propertyNames() - */ -int TQMetaObject::numProperties( bool super ) const // number of signals -{ - int n = d->numPropData; - if ( !super || !superclass ) - return n; - return n + superclass->numProperties( super ); -} - -/*! - Returns the property meta data for the property at index \a index - or 0 if no such property exists. - - If \a super is TRUE, inherited properties are included. - - \sa propertyNames() - */ -const TQMetaProperty* TQMetaObject::property( int index, bool super ) const -{ - int idx = index - ( super ? propertyOffset() : 0 ); - if ( d->propData && idx >= 0 && idx < (int)d->numPropData ) - return d->propData + idx; - if ( !super || !superclass ) - return 0; - return superclass->property( index, super ); -} - - -/*! - Returns the index for the property with name \a name or -1 if no - such property exists. - - If \a super is TRUE, inherited properties are included. - - \sa property(), propertyNames() -*/ - -int TQMetaObject::findProperty( const char *name, bool super ) const -{ - for( int i = 0; i < d->numPropData; ++i ) { - if ( d->propData[i].isValid() && qstrcmp( d->propData[i].name(), name ) == 0 ) { - return ( super ? propertyOffset() : 0 ) + i; - } - } - if ( !super || !superclass ) - return -1; - return superclass->findProperty( name, super ); -} - -/*! \internal - - Returns the index for the property \a prop - or -1 if the property can not be found. - - If \a super is TRUE, inherited properties are included. - - \sa property(), propertyNames() -*/ - -int TQMetaObject::indexOfProperty( const TQMetaProperty* prop, bool super ) const -{ - if ( *prop->meta == this ) - return ( super ? propertyOffset() : 0 ) + ( prop - d->propData); - if ( !super || !superclass ) - return -1; - return superclass->indexOfProperty( prop, super ); -} - -/*!\internal - - Returns the parent property of property \a p or 0, if the property - cannot be resolved. - - \a p has to be contained in this meta object -*/ - -const TQMetaProperty* TQMetaObject::resolveProperty( const TQMetaProperty* p ) const -{ - if ( !superclass ) - return 0; - return superclass->property( superclass->findProperty( p->n, TRUE ), TRUE ); -} - -/*!\internal - - \overload - - The version of resolveProperty that is used by moc generated code -*/ - -int TQMetaObject::resolveProperty( int index ) const -{ - if ( !superclass ) - return -1; - const TQMetaProperty* p = d->propData + ( index - propertyOffset() ); - return superclass->findProperty( p->n, TRUE ); -} - - -/*! - Returns a list with the names of all this class's properties. - - If \a super is TRUE, inherited properties are included. - - \sa property() -*/ -TQStrList TQMetaObject::propertyNames( bool super ) const -{ - TQStrList l( FALSE ); - - if ( superclass && super ) { - TQStrList sl = superclass->propertyNames( super ); - for ( TQStrListIterator slit( sl ); slit.current(); ++slit ) - l.append( slit.current() ); - } - - for( int i = 0; i < d->numPropData; ++i ) { - if ( d->propData[i].isValid() ) - l.append( d->propData[i].name() ); - } - - return l; -} - -/*! - Returns a list with the names of all this class's signals. - - If \a super is TRUE, inherited signals are included. -*/ -TQStrList TQMetaObject::signalNames( bool super ) const -{ - TQStrList l( FALSE ); - int n = numSignals( super ); - for( int i = 0; i < n; ++i ) { - l.append( signal(i, super)->name ); - } - return l; -} - -/*! - Returns a list with the names of all this class's slots. - - If \a super is TRUE, inherited slots are included. - - \sa numSlots() -*/ -TQStrList TQMetaObject::slotNames( bool super ) const -{ - TQStrList l( FALSE ); - int n = numSlots( super ); - for( int i = 0; i < n; ++i ) - l.append( slot( i, super)->name ); - return l; -} - -/*!\internal - - */ - -int TQMetaObject::numEnumerators( bool super ) const -{ - int n = 0; - if ( superclass && super ) - n += superclass->numEnumerators( super ); - return n + d->numEnumData; -} - -/*!\internal - - */ -TQStrList TQMetaObject::enumeratorNames( bool super ) const -{ - TQStrList l( FALSE ); - - if ( superclass && super ) { - TQStrList sl = superclass->enumeratorNames( super ); - for ( TQStrListIterator slit( sl ); slit.current(); ++slit ) - l.append( slit.current() ); - } - - for( int i = 0; i < d->numEnumData; ++i ) { - if ( d->enumData[i].items ) - l.append( d->enumData[i].name ); - } - - return l; -} - -/*!\internal - */ -const TQMetaEnum* TQMetaObject::enumerator( const char* name, bool super ) const -{ - for( int i = 0; i < d->numEnumData; ++i ) - if ( qstrcmp( d->enumData[i].name, name ) == 0 ) - return &(d->enumData[i]); - if ( !super || !superclass ) - return 0; - return superclass->enumerator( name, super ); -} - -#endif // TQT_NO_PROPERTIES - - -/*! - Returns TRUE if this class inherits \a clname within the meta - object inheritance chain; otherwise returns FALSE. - - (A class is considered to inherit itself.) -*/ -bool TQMetaObject::inherits( const char* clname ) const -{ - const TQMetaObject *meta = this; - while ( meta ) { - if ( qstrcmp(clname, meta->className()) == 0 ) - return TRUE; - meta = meta->superclass; - } - return FALSE; -} - -/*! \internal */ - -TQMetaObject *TQMetaObject::metaObject( const char *class_name ) -{ - if ( !qt_metaobjects ) - return 0; -#ifdef TQT_THREAD_SUPPORT - TQMutexLocker( tqt_global_mutexpool ? - tqt_global_mutexpool->get( &qt_metaobjects ) : 0 ); -#endif // TQT_THREAD_SUPPORT - TQtStaticMetaObjectFunction func = (TQtStaticMetaObjectFunction)qt_metaobjects->find( class_name ); - if ( func ) - return func(); - return 0; -} - -/*! \internal */ -bool TQMetaObject::hasMetaObject( const char *class_name ) -{ - if ( !qt_metaobjects ) - return FALSE; -#ifdef TQT_THREAD_SUPPORT - TQMutexLocker( tqt_global_mutexpool ? - tqt_global_mutexpool->get( &qt_metaobjects ) : 0 ); -#endif // TQT_THREAD_SUPPORT - return !!qt_metaobjects->find( class_name ); -} - -#ifndef TQT_NO_PROPERTIES -/*! \internal - -### this functions will go away. It exists purely for the sake of meta -### object code generated with TQt 3.1.0 -*/ -bool TQMetaObject::tqt_static_property( TQObject* o, int id, int f, TQVariant* v) -{ - if ( d->tqt_static_property ) - return d->tqt_static_property( o, id, f, v ); - else if ( o ) // compatibility - return o->tqt_property( id, f, v ); - else if ( superclass ) - return superclass->tqt_static_property( o, id, f, v ); - switch ( f ) { - case 3: case 4: case 5: - return TRUE; - default: - return FALSE; - } -} - - -/*! - \class TQMetaProperty ntqmetaobject.h - - \brief The TQMetaProperty class stores meta data about a property. - - \ingroup objectmodel - - 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. -*/ - -/*! - Returns the possible enumeration keys if this property is an - enumeration type (or a set type). - - \sa isEnumType() -*/ -TQStrList TQMetaProperty::enumKeys() const -{ - TQStrList l( FALSE ); - const TQMetaEnum* ed = enumData; - if ( !enumData && meta ) - ed = (*meta)->enumerator( t, TRUE ); - if ( !ed ) - return l; - if ( ed != 0 ) { - for( uint i = 0; i < ed->count; ++i ) { - uint j = 0; - while ( j < i && - ed->items[j].value != ed->items[i].value ) - ++j; - if ( i == j ) - l.append( ed->items[i].key ); - } - } - return l; -} - -/*! - Converts the enumeration key \a key to its integer value. - - For set types, use keysToValue(). - - \sa valueToKey(), isSetType(), keysToValue() -*/ -int TQMetaProperty::keyToValue( const char* key ) const -{ - const TQMetaEnum* ed = enumData; - if ( !enumData && meta ) - ed = (*meta)->enumerator( t, TRUE ); - if ( !ed ) - return -1; - for ( uint i = 0; i < ed->count; ++i ) { - if ( !qstrcmp( key, ed->items[i].key) ) - return ed->items[i].value; - } - return -1; -} - -/*! - Converts the enumeration value \a value to its literal key. - - For set types, use valueToKeys(). - - \sa valueToKey(), isSetType(), valueToKeys() -*/ -const char* TQMetaProperty::valueToKey( int value ) const -{ - const TQMetaEnum* ed = enumData; - if ( !enumData && meta ) - ed = (*meta)->enumerator( t, TRUE ); - if ( !ed ) - return 0; - for ( uint i = 0; i < ed->count; ++i ) { - if ( value == ed->items[i].value ) - return ed->items[i].key ; - } - return 0; -} - -/*! - Converts the list of keys \a keys to their combined (OR-ed) - integer value. - - \sa isSetType(), valueToKey(), keysToValue() -*/ -int TQMetaProperty::keysToValue( const TQStrList& keys ) const -{ - const TQMetaEnum* ed = enumData; - if ( !enumData && meta ) - ed = (*meta)->enumerator( t, TRUE ); - if ( !ed ) - return -1; - int value = 0; - for ( TQStrListIterator it( keys ); it.current(); ++it ) { - uint i; - for( i = ed->count; i > 0; --i ) { - if ( !qstrcmp( it.current(), ed->items[i-1].key) ) { - value |= ed->items[i-1].value; - break; - } - } - if ( i == 0 ) - value |= -1; - } - return value; -} - -/*! - Converts the set value \a value to a list of keys. - - \sa isSetType(), valueToKey(), valueToKeys() -*/ -TQStrList TQMetaProperty::valueToKeys( int value ) const -{ - TQStrList keys; - const TQMetaEnum* ed = enumData; - if ( !enumData && meta ) - ed = (*meta)->enumerator( t, TRUE ); - if ( !ed ) - return keys; - - int v = value; - for( uint i = ed->count; i > 0; --i ) { - int k = ed->items[i-1].value; - if ( ( k != 0 && (v & k) == k ) || ( k == value) ) { - v = v & ~k; - keys.append( ed->items[i-1].key ); - } - } - return keys; -} - -bool TQMetaProperty::writable() const -{ - if ( !testFlags( Override ) || testFlags( Writable ) ) - return testFlags( Writable ); - const TQMetaObject* mo = (*meta); - const TQMetaProperty* parent = mo->resolveProperty( this ); - return parent ? parent->writable() : FALSE; -} - -/*!\internal - */ -bool TQMetaProperty::stdSet() const -{ - if ( !testFlags( Override ) || testFlags( Writable ) ) - return testFlags( StdSet ); - const TQMetaObject* mo = (*meta); - const TQMetaProperty* parent = mo->resolveProperty( this ); - return parent ? parent->stdSet() : FALSE; -} - -/*!\internal - */ -int TQMetaProperty::id() const -{ - return _id < 0 ? (*meta)->indexOfProperty( this, TRUE ) : _id; -} - -/*! \internal -*/ -void TQMetaProperty::clear() -{ - t = n = 0; - meta = 0; - enumData = 0; - _id = -1; - flags = 0; -} - -bool TQMetaProperty::isValid() const -{ - if ( testFlags( UnresolvedEnum ) ) { - if ( !enumData && (!meta || !(*meta)->enumerator( t, TRUE ) ) ) - return FALSE; - } - if ( !testFlags( Override ) || testFlags( Readable ) ) - return testFlags( Readable ); - const TQMetaObject* mo = (*meta); - const TQMetaProperty* parent = mo->resolveProperty( this ); - return parent ? parent->isValid() : FALSE; -} - -bool TQMetaProperty::isSetType() const -{ - const TQMetaEnum* ed = enumData; - if ( !enumData && meta ) - ed = (*meta)->enumerator( t, TRUE ); - return ( ed != 0 && ed->set ); -} - -bool TQMetaProperty::isEnumType() const -{ - return testFlags( EnumOrSet ); -} - - - -/*! - \fn const char* TQMetaProperty::type() const - - Returns the type of the property. -*/ - -/*! - \fn const char* TQMetaProperty::name() const - - Returns the name of the property. -*/ - -/*! - \fn bool TQMetaProperty::writable() const - - Returns TRUE if the property is writable; otherwise returns FALSE. - -*/ - -/*! \fn bool TQMetaProperty::isValid() const - - \internal - - Returns whether the property is valid. -*/ - -/*! - \fn bool TQMetaProperty::isEnumType() const - - Returns TRUE if the property's type is an enumeration value; - otherwise returns FALSE. - - \sa isSetType(), enumKeys() -*/ - -/*! - \fn 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. - - \sa isEnumType(), enumKeys() -*/ - - -/*! Returns TRUE if the property is designable for object \a o; - otherwise returns FALSE. - - If no object \a o is given, the function returns a static - approximation. - */ -bool TQMetaProperty::designable( TQObject* o ) const -{ - if ( !isValid() || !writable() ) - return FALSE; - if ( o ) { - int idx = _id >= 0 ? _id : (*meta)->indexOfProperty( this, TRUE ); - return idx >= 0 && o->tqt_property( idx, 3, 0 ); - } - if ( testFlags( DesignableOverride ) ) { - const TQMetaObject* mo = (*meta); - const TQMetaProperty* parent = mo->resolveProperty( this ); - return parent ? parent->designable() : FALSE; - } - return !testFlags( NotDesignable ); -} - -/*! - Returns TRUE if the property is scriptable for object \a o; - otherwise returns FALSE. - - If no object \a o is given, the function returns a static - approximation. - */ -bool TQMetaProperty::scriptable( TQObject* o ) const -{ - if ( o ) { - int idx = _id >= 0 ? _id : (*meta)->indexOfProperty( this, TRUE ); - return idx >= 0 && o->tqt_property( idx, 4, 0 ); - } - if ( testFlags( ScriptableOverride ) ) { - const TQMetaObject* mo = (*meta); - const TQMetaProperty* parent = mo->resolveProperty( this ); - return parent ? parent->scriptable() : FALSE; - } - return !testFlags( NotScriptable ); -} - -/*! - Returns TRUE if the property shall be stored for object \a o; - otherwise returns FALSE. - - If no object \a o is given, the function returns a static - approximation. - */ -bool TQMetaProperty::stored( TQObject* o ) const -{ - if ( !isValid() || !writable() ) - return FALSE; - if ( o ) { - int idx = _id >= 0 ? _id : (*meta)->indexOfProperty( this, TRUE ); - return idx >= 0 && o->tqt_property( idx, 5, 0 ); - } - if ( testFlags( StoredOverride ) ) { - const TQMetaObject* mo = (*meta); - const TQMetaProperty* parent = mo->resolveProperty( this ); - return parent ? parent->stored() : FALSE; - } - return !testFlags( NotStored ); -} - - -/*! - Tries to reset the property for object \a 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::reset( TQObject* o ) const -{ - if ( !o ) - return FALSE; - int idx = _id >= 0 ? _id : (*meta)->indexOfProperty( this, TRUE ); - if ( idx < 0 ) - return 0; - return o->tqt_property( idx, 2, 0 ); -} - - -/*! \enum TQMetaProperty::Flags - - \internal -*/ - -#endif // TQT_NO_PROPERTIES - -/* - * TQMetaObjectCleanUp is used as static global object in the moc-generated cpp - * files and deletes the TQMetaObject provided with setMetaObject. It sets the - * TQObject reference to the metaObj to NULL when it is destroyed. - */ -TQMetaObjectCleanUp::TQMetaObjectCleanUp( const char *mo_name, TQtStaticMetaObjectFunction func ) - : metaObject( 0 ) -{ -#ifdef TQT_THREAD_SUPPORT - TQMutexLocker( tqt_global_mutexpool ? - tqt_global_mutexpool->get( &qt_metaobjects ) : 0 ); -#endif // TQT_THREAD_SUPPORT - if ( !qt_metaobjects ) - qt_metaobjects = new TQAsciiDict( 257 ); - qt_metaobjects->insert( mo_name, (void*)func ); - - qt_metaobjects_count++; -} - -TQMetaObjectCleanUp::TQMetaObjectCleanUp() - : metaObject( 0 ) -{ -} - -/*! \fn bool TQMetaProperty::testFlags( uint f ) const - \internal -*/ - -TQMetaObjectCleanUp::~TQMetaObjectCleanUp() -{ -#ifdef TQT_THREAD_SUPPORT - TQMutexLocker( tqt_global_mutexpool ? - tqt_global_mutexpool->get( &qt_metaobjects ) : 0 ); -#endif // TQT_THREAD_SUPPORT - if ( !--qt_metaobjects_count ) { - delete qt_metaobjects; - qt_metaobjects = 0; - } - if ( metaObject ) { - delete *metaObject; - *metaObject = 0; - metaObject = 0; - } -} - -void TQMetaObjectCleanUp::setMetaObject( TQMetaObject *&mo ) -{ -#if defined(QT_CHECK_RANGE) - if (metaObject && metaObject != &mo) - tqWarning( "TQMetaObjectCleanUp::setMetaObject: Double use of TQMetaObjectCleanUp!" ); -#endif - metaObject = &mo; -} diff --git a/src/kernel/qmngio.cpp b/src/kernel/qmngio.cpp deleted file mode 100644 index 3e1678c4e..000000000 --- a/src/kernel/qmngio.cpp +++ /dev/null @@ -1,460 +0,0 @@ -/**************************************************************************** -** -** Implementation of MNG TQImage IOHandler -** -** Created : 970521 -** -** Copyright (C) 1997-2008 Trolltech ASA. All rights reserved. -** -** This file is part of the kernel module of the TQt GUI Toolkit. -** -** This file may be used under the terms of the GNU General -** Public License versions 2.0 or 3.0 as published by the Free -** Software Foundation and appearing in the files LICENSE.GPL2 -** and LICENSE.GPL3 included in the packaging of this file. -** Alternatively you may (at your option) use any later version -** of the GNU General Public License if such license has been -** publicly approved by Trolltech ASA (or its successors, if any) -** and the KDE Free TQt Foundation. -** -** Please review the following information to ensure GNU General -** Public Licensing requirements will be met: -** http://trolltech.com/products/qt/licenses/licensing/opensource/. -** If you are unsure which license is appropriate for your use, please -** review the following information: -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview -** or contact the sales department at sales@trolltech.com. -** -** This file may be used under the terms of the Q Public License as -** defined by Trolltech ASA and appearing in the file LICENSE.TQPL -** included in the packaging of this file. Licensees holding valid TQt -** Commercial licenses may use this file in accordance with the TQt -** Commercial License Agreement provided with the Software. -** -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted -** herein. -** -**********************************************************************/ - -#include "tqdatetime.h" - -#ifndef TQT_NO_IMAGEIO_MNG - -#include "tqimage.h" -#include "tqasyncimageio.h" -#include "tqiodevice.h" -#include "ntqmngio.h" - -// Define XMD_H prohibits the included headers of libmng.h to typedef INT32. -// This is needed for Borland with STL support, since in that case, INT32 is -// already defined by some Borland header. -#define XMD_H -#if defined(Q_OS_UNIXWARE) -# define HAVE_BOOLEAN // libjpeg under Unixware seems to need this -#endif -#include -#include - - -#ifndef TQT_NO_ASYNC_IMAGE_IO - -class TQMNGFormat : public TQImageFormat { -public: - TQMNGFormat(); - virtual ~TQMNGFormat(); - - int decode(TQImage& img, TQImageConsumer* consumer, - const uchar* buffer, int length); - - bool openstream() - { - // ### We should figure out how many loops an MNG has, but for now always assume infinite. - if (consumer) - consumer->setLooping(0); - return TRUE; - } - bool closestream( ) - { - if (consumer) - consumer->end(); - return TRUE; - } - bool readdata( mng_ptr pBuf, mng_uint32 iBuflen, mng_uint32p pRead ) - { - uint m = ndata + nbuffer - ubuffer; - if ( iBuflen > m ) { - iBuflen = m; - } - *pRead = iBuflen; - uint n = nbuffer-ubuffer; - if ( iBuflen < n ) { - // enough in buffer - memcpy(pBuf, buffer+ubuffer, iBuflen); - ubuffer += iBuflen; - return TRUE; - } - if ( n ) { - // consume buffer - memcpy(pBuf, buffer+ubuffer, n ); - pBuf = (mng_ptr)((char*)pBuf + n); - iBuflen -= n; - ubuffer = nbuffer; - } - if ( iBuflen ) { - // fill from incoming data - memcpy(pBuf, data, iBuflen); - data += iBuflen; - ndata -= iBuflen; - } - return TRUE; - } - bool errorproc( mng_int32 iErrorcode, - mng_int8 /*iSeverity*/, - mng_chunkid iChunkname, - mng_uint32 /*iChunkseq*/, - mng_int32 iExtra1, - mng_int32 iExtra2, - mng_pchar zErrortext ) - { - tqWarning("MNG error %d: %s; chunk %c%c%c%c; subcode %d:%d", - iErrorcode, zErrortext ? zErrortext : "", - (iChunkname>>24)&0xff, - (iChunkname>>16)&0xff, - (iChunkname>>8)&0xff, - (iChunkname>>0)&0xff, - iExtra1,iExtra2); - return TRUE; - } - bool processheader( mng_uint32 iWidth, mng_uint32 iHeight ) - { - image->create(iWidth,iHeight,32); - image->setAlphaBuffer(TRUE); - memset(image->bits(),0,iWidth*iHeight*4); - consumer->setSize(iWidth,iHeight); - mng_set_canvasstyle(handle, - TQImage::systemByteOrder() == TQImage::LittleEndian - ? MNG_CANVAS_BGRA8 : MNG_CANVAS_ARGB8 ); - return TRUE; - } - mng_ptr getcanvasline( mng_uint32 iLinenr ) - { - return image->scanLine(iLinenr); - } - mng_bool refresh( mng_uint32 x, mng_uint32 y, mng_uint32 w, mng_uint32 h ) - { - TQRect r(x,y,w,h); - consumer->changed(r); - consumer->setFramePeriod(0); - consumer->frameDone(); - return TRUE; - } - mng_uint32 gettickcount( ) - { - return timer.elapsed() - losttime; - } - bool settimer( mng_uint32 iMsecs ) - { - consumer->setFramePeriod(iMsecs); - consumer->frameDone(); - state = Time; - losingtimer.start(); - losttime -= iMsecs; - return TRUE; - } - -private: - // Animation-level information - enum { MovieStart, Time, Data, Data2 } state; - - // Image-level information - mng_handle handle; - - // For storing unused data - uchar *buffer; - uint maxbuffer; - uint nbuffer; - - // Timing - TQTime timer; - TQTime losingtimer; - int losttime; - - void enlargeBuffer(uint n) - { - if ( n > maxbuffer ) { - maxbuffer = n; - buffer = (uchar*)realloc(buffer,n); - } - } - - // Temporary locals during single data-chunk processing - const uchar* data; - uint ndata; - uint ubuffer; - TQImageConsumer* consumer; - TQImage* image; -}; - -class TQMNGFormatType : public TQImageFormatType -{ - TQImageFormat* decoderFor(const uchar* buffer, int length); - const char* formatName() const; -}; - - -/* - \class TQMNGFormat ntqmngio.h - \brief Incremental image decoder for MNG image format. - - \ingroup images - \ingroup graphics - - This subclass of TQImageFormat decodes MNG format images, - including animated MNGs. - - Animated MNG images are standard MNG images. The MNG standard - defines two extension chunks that are useful for animations: - -
                -
                gIFg - GIF-like Graphic Control Extension -
                Includes frame disposal, user input flag (we ignore this), - and inter-frame delay. -
                gIFx - GIF-like Application Extension -
                Multi-purpose, but we just use the Netscape extension - which specifies looping. -
                - - The subimages usually contain a offset chunk (oFFs) but need not. - - The first image defines the "screen" size. Any subsequent image that - doesn't fit is clipped. - -TODO: decide on this point. gIFg gives disposal types, so it can be done. - All images paste (\e not composite, just place all-channel copying) - over the previous image to produce a subsequent frame. -*/ - -/* - \class TQMNGFormatType tqasyncimageio.h - \brief Incremental image decoder for MNG image format. - - \ingroup images - \ingroup graphics - \ingroup io - - This subclass of TQImageFormatType recognizes MNG - format images, creating a TQMNGFormat when required. An instance - of this class is created automatically before any other factories, - so you should have no need for such objects. -*/ - -TQImageFormat* TQMNGFormatType::decoderFor( const uchar* buffer, int length ) -{ - if (length < 8) return 0; - - if ((buffer[0]==138 // MNG signature - && buffer[1]=='M' - && buffer[2]=='N' - && buffer[3]=='G' - && buffer[4]==13 - && buffer[5]==10 - && buffer[6]==26 - && buffer[7]==10) - || (buffer[0]==139 // JNG signature - && buffer[1]=='J' - && buffer[2]=='N' - && buffer[3]=='G' - && buffer[4]==13 - && buffer[5]==10 - && buffer[6]==26 - && buffer[7]==10) -#ifdef TQT_NO_IMAGEIO_PNG // if we don't have native PNG support use libmng - || (buffer[0]==137 // PNG signature - && buffer[1]=='P' - && buffer[2]=='N' - && buffer[3]=='G' - && buffer[4]==13 - && buffer[5]==10 - && buffer[6]==26 - && buffer[7]==10) -#endif - ) - return new TQMNGFormat; - return 0; -} - -const char* TQMNGFormatType::formatName() const -{ - return "MNG"; -} - - -/*! - Constructs a TQMNGFormat. -*/ -TQMNGFormat::TQMNGFormat() -{ - state = MovieStart; - handle = 0; - nbuffer = 0; - maxbuffer = 0; - buffer = 0; - losttime = 0; -} - -/* - Destroys a TQMNGFormat. -*/ -TQMNGFormat::~TQMNGFormat() -{ - // We're setting the consumer to 0 since it may have been - // deleted by read_async_image in tqimage.cpp - consumer = 0; - if (handle) mng_cleanup(&handle); -} - - -// C-callback to C++-member-function conversion -// -static mng_bool openstream( mng_handle handle ) -{ - return ((TQMNGFormat*)mng_get_userdata(handle))->openstream(); -} -static mng_bool closestream( mng_handle handle ) -{ - return ((TQMNGFormat*)mng_get_userdata(handle))->closestream(); -} -static mng_bool readdata( mng_handle handle, mng_ptr pBuf, mng_uint32 iBuflen, mng_uint32p pRead ) -{ - return ((TQMNGFormat*)mng_get_userdata(handle))->readdata(pBuf,iBuflen,pRead); -} -static mng_bool errorproc( mng_handle handle, - mng_int32 iErrorcode, - mng_int8 iSeverity, - mng_chunkid iChunkname, - mng_uint32 iChunkseq, - mng_int32 iExtra1, - mng_int32 iExtra2, - mng_pchar zErrortext ) -{ - return ((TQMNGFormat*)mng_get_userdata(handle))->errorproc(iErrorcode, - iSeverity,iChunkname,iChunkseq,iExtra1,iExtra2,zErrortext); -} -static mng_bool processheader( mng_handle handle, - mng_uint32 iWidth, mng_uint32 iHeight ) -{ - return ((TQMNGFormat*)mng_get_userdata(handle))->processheader(iWidth,iHeight); -} -static mng_ptr getcanvasline( mng_handle handle, mng_uint32 iLinenr ) -{ - return ((TQMNGFormat*)mng_get_userdata(handle))->getcanvasline(iLinenr); -} -static mng_bool refresh( mng_handle handle, - mng_uint32 iTop, - mng_uint32 iLeft, - mng_uint32 iBottom, - mng_uint32 iRight ) -{ - return ((TQMNGFormat*)mng_get_userdata(handle))->refresh(iTop,iLeft,iBottom,iRight); -} -static mng_uint32 gettickcount( mng_handle handle ) -{ - return ((TQMNGFormat*)mng_get_userdata(handle))->gettickcount(); -} -static mng_bool settimer( mng_handle handle, mng_uint32 iMsecs ) -{ - return ((TQMNGFormat*)mng_get_userdata(handle))->settimer(iMsecs); -} - -static mng_ptr memalloc( mng_size_t iLen ) -{ - return calloc(1,iLen); -} -static void memfree( mng_ptr iPtr, mng_size_t /*iLen*/ ) -{ - free(iPtr); -} - -/*! - This function decodes some data into image changes. - - Returns the number of bytes consumed. -*/ -int TQMNGFormat::decode( TQImage& img, TQImageConsumer* cons, - const uchar* buf, int length ) -{ - consumer = cons; - image = &img; - - data = buf; - ndata = length; - ubuffer = 0; - - if ( state == MovieStart ) { - handle = mng_initialize( (mng_ptr)this, ::memalloc, ::memfree, 0 ); - mng_set_suspensionmode( handle, MNG_TRUE ); - mng_setcb_openstream( handle, ::openstream ); - mng_setcb_closestream( handle, ::closestream ); - mng_setcb_readdata( handle, ::readdata ); - mng_setcb_errorproc( handle, ::errorproc ); - mng_setcb_processheader( handle, ::processheader ); - mng_setcb_getcanvasline( handle, ::getcanvasline ); - mng_setcb_refresh( handle, ::refresh ); - mng_setcb_gettickcount( handle, ::gettickcount ); - mng_setcb_settimer( handle, ::settimer ); - state = Data; - mng_readdisplay(handle); - losingtimer.start(); - } - - losttime += losingtimer.elapsed(); - if ( ndata || !length ) - mng_display_resume(handle); - losingtimer.start(); - - image = 0; - - nbuffer -= ubuffer; - if ( nbuffer ) { - // Move back unused tail - memcpy(buffer,buffer+ubuffer,nbuffer); - } - if ( ndata ) { - // Not all used. - enlargeBuffer(nbuffer+ndata); - memcpy(buffer+nbuffer,data,ndata); - nbuffer += ndata; - } - - return length; -} - -static TQMNGFormatType* globalMngFormatTypeObject = 0; - -#endif // TQT_NO_ASYNC_IMAGE_IO - -#ifndef TQT_NO_ASYNC_IMAGE_IO -void qCleanupMngIO() -{ - if ( globalMngFormatTypeObject ) { - delete globalMngFormatTypeObject; - globalMngFormatTypeObject = 0; - } -} -#endif - -void qInitMngIO() -{ - static bool done = FALSE; - if ( !done ) { - done = TRUE; -#ifndef TQT_NO_ASYNC_IMAGE_IO - globalMngFormatTypeObject = new TQMNGFormatType; - tqAddPostRoutine( qCleanupMngIO ); -#endif - } -} - -#endif // TQT_NO_IMAGEIO_MNG diff --git a/src/kernel/qpolygonscanner.cpp b/src/kernel/qpolygonscanner.cpp deleted file mode 100644 index 44d59e7b8..000000000 --- a/src/kernel/qpolygonscanner.cpp +++ /dev/null @@ -1,937 +0,0 @@ -/**************************************************************************** -** -** Implementation of TQPolygonScanner class -** -** Created : 000120 -** -** Copyright (C) 1999-2008 Trolltech ASA. All rights reserved. -** -** This file is part of the kernel module of the TQt GUI Toolkit. -** -** This file may be used under the terms of the GNU General -** Public License versions 2.0 or 3.0 as published by the Free -** Software Foundation and appearing in the files LICENSE.GPL2 -** and LICENSE.GPL3 included in the packaging of this file. -** Alternatively you may (at your option) use any later version -** of the GNU General Public License if such license has been -** publicly approved by Trolltech ASA (or its successors, if any) -** and the KDE Free TQt Foundation. -** -** Please review the following information to ensure GNU General -** Public Licensing requirements will be met: -** http://trolltech.com/products/qt/licenses/licensing/opensource/. -** If you are unsure which license is appropriate for your use, please -** review the following information: -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview -** or contact the sales department at sales@trolltech.com. -** -** This file may be used under the terms of the Q Public License as -** defined by Trolltech ASA and appearing in the file LICENSE.TQPL -** included in the packaging of this file. Licensees holding valid TQt -** Commercial licenses may use this file in accordance with the TQt -** Commercial License Agreement provided with the Software. -** -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted -** herein. -** -**********************************************************************/ - -#include "ntqpolygonscanner.h" -#include "tqpointarray.h" -#include - - -// Based on Xserver code miFillGeneralPoly... -/* - * - * Written by Brian Kelleher; Oct. 1985 - * - * Routine to fill a polygon. Two fill rules are - * supported: frWINDING and frEVENODD. - * - * See fillpoly.h for a complete description of the algorithm. - */ - -/* - * These are the data structures needed to scan - * convert regions. Two different scan conversion - * methods are available -- the even-odd method, and - * the winding number method. - * The even-odd rule states that a point is inside - * the polygon if a ray drawn from that point in any - * direction will pass through an odd number of - * path segments. - * By the winding number rule, a point is decided - * to be inside the polygon if a ray drawn from that - * point in any direction passes through a different - * number of clockwise and counterclockwise path - * segments. - * - * These data structures are adapted somewhat from - * the algorithm in (Foley/Van Dam) for scan converting - * polygons. - * The basic algorithm is to start at the top (smallest y) - * of the polygon, stepping down to the bottom of - * the polygon by incrementing the y coordinate. We - * keep a list of edges which the current scanline crosses, - * sorted by x. This list is called the Active Edge Table (AET) - * As we change the y-coordinate, we update each entry in - * in the active edge table to reflect the edges new xcoord. - * This list must be sorted at each scanline in case - * two edges intersect. - * We also keep a data structure known as the Edge Table (ET), - * which keeps track of all the edges which the current - * scanline has not yet reached. The ET is basically a - * list of ScanLineList structures containing a list of - * edges which are entered at a given scanline. There is one - * ScanLineList per scanline at which an edge is entered. - * When we enter a new edge, we move it from the ET to the AET. - * - * From the AET, we can implement the even-odd rule as in - * (Foley/Van Dam). - * The winding number rule is a little trickier. We also - * keep the EdgeTableEntries in the AET linked by the - * nextWETE (winding EdgeTableEntry) link. This allows - * the edges to be linked just as before for updating - * purposes, but only uses the edges linked by the nextWETE - * link as edges representing spans of the polygon to - * drawn (as with the even-odd rule). - */ - -/* $XConsortium: miscanfill.h,v 1.5 94/04/17 20:27:50 dpw Exp $ */ -/* - -Copyright (c) 1987 X Consortium - -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 X CONSORTIUM 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. - -Except as contained in this notice, the name of the X Consortium shall -not be used in advertising or otherwise to promote the sale, use or -other dealings in this Software without prior written authorization -from the X Consortium. - -*/ - - -/* - * scanfill.h - * - * Written by Brian Kelleher; Jan 1985 - * - * This file contains a few macros to help track - * the edge of a filled object. The object is assumed - * to be filled in scanline order, and thus the - * algorithm used is an extension of Bresenham's line - * drawing algorithm which assumes that y is always the - * major axis. - * Since these pieces of code are the same for any filled shape, - * it is more convenient to gather the library in one - * place, but since these pieces of code are also in - * the inner loops of output primitives, procedure call - * overhead is out of the question. - * See the author for a derivation if needed. - */ - -/* - * In scan converting polygons, we want to choose those pixels - * which are inside the polygon. Thus, we add .5 to the starting - * x coordinate for both left and right edges. Now we choose the - * first pixel which is inside the pgon for the left edge and the - * first pixel which is outside the pgon for the right edge. - * Draw the left pixel, but not the right. - * - * How to add .5 to the starting x coordinate: - * If the edge is moving to the right, then subtract dy from the - * error term from the general form of the algorithm. - * If the edge is moving to the left, then add dy to the error term. - * - * The reason for the difference between edges moving to the left - * and edges moving to the right is simple: If an edge is moving - * to the right, then we want the algorithm to flip immediately. - * If it is moving to the left, then we don't want it to flip until - * we traverse an entire pixel. - */ -#define BRESINITPGON(dy, x1, x2, xStart, d, m, m1, incr1, incr2) { \ - int dx; /* local storage */ \ -\ - /* \ - * if the edge is horizontal, then it is ignored \ - * and assumed not to be processed. Otherwise, do this stuff. \ - */ \ - if ((dy) != 0) { \ - xStart = (x1); \ - dx = (x2) - xStart; \ - if (dx < 0) { \ - m = dx / (dy); \ - m1 = m - 1; \ - incr1 = -2 * dx + 2 * (dy) * m1; \ - incr2 = -2 * dx + 2 * (dy) * m; \ - d = 2 * m * (dy) - 2 * dx - 2 * (dy); \ - } else { \ - m = dx / (dy); \ - m1 = m + 1; \ - incr1 = 2 * dx - 2 * (dy) * m1; \ - incr2 = 2 * dx - 2 * (dy) * m; \ - d = -2 * m * (dy) + 2 * dx; \ - } \ - } \ -} - -#define BRESINCRPGON(d, minval, m, m1, incr1, incr2) { \ - if (m1 > 0) { \ - if (d > 0) { \ - minval += m1; \ - d += incr1; \ - } \ - else { \ - minval += m; \ - d += incr2; \ - } \ - } else {\ - if (d >= 0) { \ - minval += m1; \ - d += incr1; \ - } \ - else { \ - minval += m; \ - d += incr2; \ - } \ - } \ -} - - -/* - * This structure contains all of the information needed - * to run the bresenham algorithm. - * The variables may be hardcoded into the declarations - * instead of using this structure to make use of - * register declarations. - */ -typedef struct { - int minor; /* minor axis */ - int d; /* decision variable */ - int m, m1; /* slope and slope+1 */ - int incr1, incr2; /* error increments */ -} BRESINFO; - - -#define BRESINITPGONSTRUCT(dmaj, min1, min2, bres) \ - BRESINITPGON(dmaj, min1, min2, bres.minor, bres.d, \ - bres.m, bres.m1, bres.incr1, bres.incr2) - -#define BRESINCRPGONSTRUCT(bres) \ - BRESINCRPGON(bres.d, bres.minor, bres.m, bres.m1, bres.incr1, bres.incr2) - - -typedef struct _EdgeTableEntry { - int ymax; /* ycoord at which we exit this edge. */ - BRESINFO bres; /* Bresenham info to run the edge */ - struct _EdgeTableEntry *next; /* next in the list */ - struct _EdgeTableEntry *back; /* for insertion sort */ - struct _EdgeTableEntry *nextWETE; /* for winding num rule */ - int ClockWise; /* flag for winding number rule */ -} EdgeTableEntry; - - -typedef struct _ScanLineList{ - int scanline; /* the scanline represented */ - EdgeTableEntry *edgelist; /* header node */ - struct _ScanLineList *next; /* next in the list */ -} ScanLineList; - - -typedef struct { - int ymax; /* ymax for the polygon */ - int ymin; /* ymin for the polygon */ - ScanLineList scanlines; /* header node */ -} EdgeTable; - - -/* - * Here is a struct to help with storage allocation - * so we can allocate a big chunk at a time, and then take - * pieces from this heap when we need to. - */ -#define SLLSPERBLOCK 25 - -typedef struct _ScanLineListBlock { - ScanLineList SLLs[SLLSPERBLOCK]; - struct _ScanLineListBlock *next; -} ScanLineListBlock; - -/* - * number of points to buffer before sending them off - * to scanlines() : Must be an even number - */ -#define NUMPTSTOBUFFER 200 - -/* - * - * a few macros for the inner loops of the fill code where - * performance considerations don't allow a procedure call. - * - * Evaluate the given edge at the given scanline. - * If the edge has expired, then we leave it and fix up - * the active edge table; otherwise, we increment the - * x value to be ready for the next scanline. - * The winding number rule is in effect, so we must notify - * the caller when the edge has been removed so he - * can reorder the Winding Active Edge Table. - */ -#define EVALUATEEDGEWINDING(pAET, pPrevAET, y, fixWAET) { \ - if (pAET->ymax == y) { /* leaving this edge */ \ - pPrevAET->next = pAET->next; \ - pAET = pPrevAET->next; \ - fixWAET = 1; \ - if (pAET) \ - pAET->back = pPrevAET; \ - } \ - else { \ - BRESINCRPGONSTRUCT(pAET->bres); \ - pPrevAET = pAET; \ - pAET = pAET->next; \ - } \ -} - - -/* - * Evaluate the given edge at the given scanline. - * If the edge has expired, then we leave it and fix up - * the active edge table; otherwise, we increment the - * x value to be ready for the next scanline. - * The even-odd rule is in effect. - */ -#define EVALUATEEDGEEVENODD(pAET, pPrevAET, y) { \ - if (pAET->ymax == y) { /* leaving this edge */ \ - pPrevAET->next = pAET->next; \ - pAET = pPrevAET->next; \ - if (pAET) \ - pAET->back = pPrevAET; \ - } \ - else { \ - BRESINCRPGONSTRUCT(pAET->bres) \ - pPrevAET = pAET; \ - pAET = pAET->next; \ - } \ -} - -/*********************************************************** - -Copyright (c) 1987 X Consortium - -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 -X CONSORTIUM 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. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - - -Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. - - All Rights Reserved - -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, and that the name of Digital not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. - -******************************************************************/ - -#define MAXINT 0x7fffffff -#define MININT -MAXINT - -/* - * fillUtils.c - * - * Written by Brian Kelleher; Oct. 1985 - * - * This module contains all of the utility functions - * needed to scan convert a polygon. - * - */ -/* - * InsertEdgeInET - * - * Insert the given edge into the edge table. - * First we must find the correct bucket in the - * Edge table, then find the right slot in the - * bucket. Finally, we can insert it. - * - */ -static bool -miInsertEdgeInET(EdgeTable *ET, EdgeTableEntry *ETE, - int scanline, ScanLineListBlock **SLLBlock, int *iSLLBlock) -{ - EdgeTableEntry *start, *prev; - ScanLineList *pSLL, *pPrevSLL; - ScanLineListBlock *tmpSLLBlock; - - /* - * find the right bucket to put the edge into - */ - pPrevSLL = &ET->scanlines; - pSLL = pPrevSLL->next; - while (pSLL && (pSLL->scanline < scanline)) - { - pPrevSLL = pSLL; - pSLL = pSLL->next; - } - - /* - * reassign pSLL (pointer to ScanLineList) if necessary - */ - if ((!pSLL) || (pSLL->scanline > scanline)) - { - if (*iSLLBlock > SLLSPERBLOCK-1) - { - tmpSLLBlock = - (ScanLineListBlock *)malloc(sizeof(ScanLineListBlock)); - if (!tmpSLLBlock) - return FALSE; - (*SLLBlock)->next = tmpSLLBlock; - tmpSLLBlock->next = 0; - *SLLBlock = tmpSLLBlock; - *iSLLBlock = 0; - } - pSLL = &((*SLLBlock)->SLLs[(*iSLLBlock)++]); - - pSLL->next = pPrevSLL->next; - pSLL->edgelist = 0; - pPrevSLL->next = pSLL; - } - pSLL->scanline = scanline; - - /* - * now insert the edge in the right bucket - */ - prev = 0; - start = pSLL->edgelist; - while (start && (start->bres.minor < ETE->bres.minor)) - { - prev = start; - start = start->next; - } - ETE->next = start; - - if (prev) - prev->next = ETE; - else - pSLL->edgelist = ETE; - return TRUE; -} - -/* - * CreateEdgeTable - * - * This routine creates the edge table for - * scan converting polygons. - * The Edge Table (ET) looks like: - * - * EdgeTable - * -------- - * | ymax | ScanLineLists - * |scanline|-->------------>-------------->... - * -------- |scanline| |scanline| - * |edgelist| |edgelist| - * --------- --------- - * | | - * | | - * V V - * list of ETEs list of ETEs - * - * where ETE is an EdgeTableEntry data structure, - * and there is one ScanLineList per scanline at - * which an edge is initially entered. - * - */ - -typedef struct { -#if defined(Q_OS_MAC) - int y, x; -#else - int x, y; -#endif - -} DDXPointRec, *DDXPointPtr; - -/* - * Clean up our act. - */ -static void -miFreeStorage(ScanLineListBlock *pSLLBlock) -{ - ScanLineListBlock *tmpSLLBlock; - - while (pSLLBlock) - { - tmpSLLBlock = pSLLBlock->next; - free(pSLLBlock); - pSLLBlock = tmpSLLBlock; - } -} - -static bool -miCreateETandAET(int count, DDXPointPtr pts, EdgeTable *ET, - EdgeTableEntry *AET, EdgeTableEntry *pETEs, ScanLineListBlock *pSLLBlock) -{ - DDXPointPtr top, bottom; - DDXPointPtr PrevPt, CurrPt; - int iSLLBlock = 0; - - int dy; - - if (count < 2) return TRUE; - - /* - * initialize the Active Edge Table - */ - AET->next = 0; - AET->back = 0; - AET->nextWETE = 0; - AET->bres.minor = MININT; - - /* - * initialize the Edge Table. - */ - ET->scanlines.next = 0; - ET->ymax = MININT; - ET->ymin = MAXINT; - pSLLBlock->next = 0; - - PrevPt = &pts[count-1]; - - /* - * for each vertex in the array of points. - * In this loop we are dealing with two vertices at - * a time -- these make up one edge of the polygon. - */ - while (count--) - { - CurrPt = pts++; - - /* - * find out which point is above and which is below. - */ - if (PrevPt->y > CurrPt->y) - { - bottom = PrevPt, top = CurrPt; - pETEs->ClockWise = 0; - } - else - { - bottom = CurrPt, top = PrevPt; - pETEs->ClockWise = 1; - } - - /* - * don't add horizontal edges to the Edge table. - */ - if (bottom->y != top->y) - { - pETEs->ymax = bottom->y-1; /* -1 so we don't get last scanline */ - - /* - * initialize integer edge algorithm - */ - dy = bottom->y - top->y; - BRESINITPGONSTRUCT(dy, top->x, bottom->x, pETEs->bres) - - if (!miInsertEdgeInET(ET, pETEs, top->y, &pSLLBlock, &iSLLBlock)) - { - miFreeStorage(pSLLBlock->next); - return FALSE; - } - - ET->ymax = TQMAX(ET->ymax, PrevPt->y); - ET->ymin = TQMIN(ET->ymin, PrevPt->y); - pETEs++; - } - - PrevPt = CurrPt; - } - return TRUE; -} - -/* - * loadAET - * - * This routine moves EdgeTableEntries from the - * EdgeTable into the Active Edge Table, - * leaving them sorted by smaller x coordinate. - * - */ - -static void -miloadAET(EdgeTableEntry *AET, EdgeTableEntry *ETEs) -{ - EdgeTableEntry *pPrevAET; - EdgeTableEntry *tmp; - - pPrevAET = AET; - AET = AET->next; - while (ETEs) - { - while (AET && (AET->bres.minor < ETEs->bres.minor)) - { - pPrevAET = AET; - AET = AET->next; - } - tmp = ETEs->next; - ETEs->next = AET; - if (AET) - AET->back = ETEs; - ETEs->back = pPrevAET; - pPrevAET->next = ETEs; - pPrevAET = ETEs; - - ETEs = tmp; - } -} - -/* - * computeWAET - * - * This routine links the AET by the - * nextWETE (winding EdgeTableEntry) link for - * use by the winding number rule. The final - * Active Edge Table (AET) might look something - * like: - * - * AET - * ---------- --------- --------- - * |ymax | |ymax | |ymax | - * | ... | |... | |... | - * |next |->|next |->|next |->... - * |nextWETE| |nextWETE| |nextWETE| - * --------- --------- ^-------- - * | | | - * V-------------------> V---> ... - * - */ -static void -micomputeWAET(EdgeTableEntry *AET) -{ - EdgeTableEntry *pWETE; - int inside = 1; - int isInside = 0; - - AET->nextWETE = 0; - pWETE = AET; - AET = AET->next; - while (AET) - { - if (AET->ClockWise) - isInside++; - else - isInside--; - - if ((!inside && !isInside) || - ( inside && isInside)) - { - pWETE->nextWETE = AET; - pWETE = AET; - inside = !inside; - } - AET = AET->next; - } - pWETE->nextWETE = 0; -} - -/* - * InsertionSort - * - * Just a simple insertion sort using - * pointers and back pointers to sort the Active - * Edge Table. - * - */ - -static int -miInsertionSort(EdgeTableEntry *AET) -{ - EdgeTableEntry *pETEchase; - EdgeTableEntry *pETEinsert; - EdgeTableEntry *pETEchaseBackTMP; - int changed = 0; - - AET = AET->next; - while (AET) - { - pETEinsert = AET; - pETEchase = AET; - while (pETEchase->back->bres.minor > AET->bres.minor) - pETEchase = pETEchase->back; - - AET = AET->next; - if (pETEchase != pETEinsert) - { - pETEchaseBackTMP = pETEchase->back; - pETEinsert->back->next = AET; - if (AET) - AET->back = pETEinsert->back; - pETEinsert->next = pETEchase; - pETEchase->back->next = pETEinsert; - pETEchase->back = pETEinsert; - pETEinsert->back = pETEchaseBackTMP; - changed = 1; - } - } - return(changed); -} - -/*! - \overload -*/ -void TQPolygonScanner::scan(const TQPointArray& pa, bool winding, int index, int npoints) -{ - scan( pa, winding, index, npoints, TRUE ); -} - -/*! - \overload - - If \a stitchable is FALSE, the right and bottom edges of the - polygon are included. This causes adjacent polygons to overlap. -*/ -void TQPolygonScanner::scan(const TQPointArray& pa, bool winding, int index, int npoints, bool stitchable) -{ - scan( pa, winding, index, npoints, - stitchable ? Edge(Left+Top) : Edge(Left+Right+Top+Bottom) ); -} - -/*! - Calls processSpans() for all scanlines of the polygon defined by - \a npoints starting at \a index in \a pa. - - If \a winding is TRUE, the Winding algorithm rather than the - Odd-Even rule is used. - - The \a edges is any bitwise combination of: - \list - \i \c TQPolygonScanner::Left - \i \c TQPolygonScanner::Right - \i \c TQPolygonScanner::Top - \i \c TQPolygonScanner::Bottom - \endlist - \a edges determines which edges are included. - - \warning The edges feature does not work properly. - -*/ -void TQPolygonScanner::scan( const TQPointArray& pa, bool winding, int index, int npoints, Edge edges ) -{ - - - DDXPointPtr ptsIn = (DDXPointPtr)pa.data(); - ptsIn += index; - EdgeTableEntry *pAET; /* the Active Edge Table */ - int y; /* the current scanline */ - int nPts = 0; /* number of pts in buffer */ - EdgeTableEntry *pWETE; /* Winding Edge Table */ - ScanLineList *pSLL; /* Current ScanLineList */ - DDXPointPtr ptsOut; /* ptr to output buffers */ - int *width; - DDXPointRec FirstPoint[NUMPTSTOBUFFER]; /* the output buffers */ - int FirstWidth[NUMPTSTOBUFFER]; - EdgeTableEntry *pPrevAET; /* previous AET entry */ - EdgeTable ET; /* Edge Table header node */ - EdgeTableEntry AET; /* Active ET header node */ - EdgeTableEntry *pETEs; /* Edge Table Entries buff */ - ScanLineListBlock SLLBlock; /* header for ScanLineList */ - int fixWAET = 0; - int edge_l = (edges & Left) ? 1 : 0; - int edge_r = (edges & Right) ? 1 : 0; - int edge_t = 1; //#### (edges & Top) ? 1 : 0; - int edge_b = (edges & Bottom) ? 1 : 0; - - if (npoints == -1) - npoints = pa.size(); - - if (npoints < 3) - return; - - if(!(pETEs = (EdgeTableEntry *) - malloc(sizeof(EdgeTableEntry) * npoints))) - return; - ptsOut = FirstPoint; - width = FirstWidth; - if (!miCreateETandAET(npoints, ptsIn, &ET, &AET, pETEs, &SLLBlock)) - { - free(pETEs); - return; - } - pSLL = ET.scanlines.next; - - if (!winding) - { - /* - * for each scanline - */ - for (y = ET.ymin+1-edge_t; y < ET.ymax+edge_b; y++) - { - /* - * Add a new edge to the active edge table when we - * get to the next edge. - */ - if (pSLL && y == pSLL->scanline) - { - miloadAET(&AET, pSLL->edgelist); - pSLL = pSLL->next; - } - pPrevAET = &AET; - pAET = AET.next; - - /* - * for each active edge - */ - while (pAET) - { - ptsOut->x = pAET->bres.minor + 1 - edge_l; - ptsOut++->y = y; - *width++ = pAET->next->bres.minor - pAET->bres.minor - - 1 + edge_l + edge_r; - nPts++; - - /* - * send out the buffer when its full - */ - if (nPts == NUMPTSTOBUFFER) - { - processSpans( nPts, (TQPoint*)FirstPoint, FirstWidth ); - ptsOut = FirstPoint; - width = FirstWidth; - nPts = 0; - } - EVALUATEEDGEEVENODD(pAET, pPrevAET, y) - EVALUATEEDGEEVENODD(pAET, pPrevAET, y) - } - miInsertionSort(&AET); - } - } - else /* default to WindingNumber */ - { - /* - * for each scanline - */ - for (y = ET.ymin+1-edge_t; y < ET.ymax+edge_b; y++) - { - /* - * Add a new edge to the active edge table when we - * get to the next edge. - */ - if (pSLL && y == pSLL->scanline) - { - miloadAET(&AET, pSLL->edgelist); - micomputeWAET(&AET); - pSLL = pSLL->next; - } - pPrevAET = &AET; - pAET = AET.next; - pWETE = pAET; - - /* - * for each active edge - */ - while (pAET) - { - /* - * if the next edge in the active edge table is - * also the next edge in the winding active edge - * table. - */ - if (pWETE == pAET) - { - ptsOut->x = pAET->bres.minor + 1 - edge_l; - ptsOut++->y = y; - *width++ = pAET->nextWETE->bres.minor - pAET->bres.minor - 1 + edge_l + edge_r; - nPts++; - - /* - * send out the buffer - */ - if (nPts == NUMPTSTOBUFFER) - { - processSpans( nPts, (TQPoint*)FirstPoint, FirstWidth ); - ptsOut = FirstPoint; - width = FirstWidth; - nPts = 0; - } - - pWETE = pWETE->nextWETE; - while (pWETE != pAET) { - EVALUATEEDGEWINDING(pAET, pPrevAET, y, fixWAET) - } - pWETE = pWETE->nextWETE; - } - EVALUATEEDGEWINDING(pAET, pPrevAET, y, fixWAET) - } - - /* - * reevaluate the Winding active edge table if we - * just had to resort it or if we just exited an edge. - */ - if (miInsertionSort(&AET) || fixWAET) - { - micomputeWAET(&AET); - fixWAET = 0; - } - } - } - - /* - * Get any spans that we missed by buffering - */ - - - processSpans( nPts, (TQPoint*)FirstPoint, FirstWidth ); - free(pETEs); - miFreeStorage(SLLBlock.next); -} -/***** END OF X11-based CODE *****/ - - diff --git a/src/kernel/qt_gfx.pri b/src/kernel/qt_gfx.pri index fadd1277f..a30d86f17 100644 --- a/src/kernel/qt_gfx.pri +++ b/src/kernel/qt_gfx.pri @@ -1,8 +1,8 @@ # TQt graphics #mng support -HEADERS += $$KERNEL_H/ntqmngio.h -SOURCES += $$KERNEL_CPP/qmngio.cpp +HEADERS += $$KERNEL_H/tqmngio.h +SOURCES += $$KERNEL_CPP/tqmngio.cpp mng { system-mng { win32:LIBS += libmng.lib diff --git a/src/kernel/qt_kernel.pri b/src/kernel/qt_kernel.pri index 03904d262..d3e214b06 100644 --- a/src/kernel/qt_kernel.pri +++ b/src/kernel/qt_kernel.pri @@ -40,10 +40,10 @@ kernel { $$KERNEL_H/tqlayout.h \ $$KERNEL_P/tqlayoutengine_p.h \ $$KERNEL_H/tqtranslator.h \ - $$KERNEL_H/ntqmetaobject.h \ + $$KERNEL_H/tqmetaobject.h \ $$KERNEL_H/tqmime.h \ $$KERNEL_H/tqmovie.h \ - $$KERNEL_H/ntqnamespace.h \ + $$KERNEL_H/tqnamespace.h \ $$KERNEL_H/tqnetworkprotocol.h \ $$KERNEL_H/tqobject.h \ $$KERNEL_H/tqobjectcleanuphandler.h \ @@ -61,7 +61,7 @@ kernel { $$KERNEL_H/tqpixmapcache.h \ $$KERNEL_H/tqpointarray.h \ $$KERNEL_H/tqpoint.h \ - $$KERNEL_H/ntqpolygonscanner.h \ + $$KERNEL_H/tqpolygonscanner.h \ $$KERNEL_H/tqprinter.h \ $$KERNEL_H/tqprocess.h \ $$KERNEL_H/tqrect.h \ @@ -221,7 +221,7 @@ kernel { $$KERNEL_CPP/tqlayout.cpp \ $$KERNEL_CPP/tqlayoutengine.cpp \ $$KERNEL_CPP/tqtranslator.cpp \ - $$KERNEL_CPP/qmetaobject.cpp \ + $$KERNEL_CPP/tqmetaobject.cpp \ $$KERNEL_CPP/tqmime.cpp \ $$KERNEL_CPP/tqmovie.cpp \ $$KERNEL_CPP/tqnetworkprotocol.cpp \ @@ -235,7 +235,7 @@ kernel { $$KERNEL_CPP/tqpixmapcache.cpp \ $$KERNEL_CPP/tqpointarray.cpp \ $$KERNEL_CPP/tqpoint.cpp \ - $$KERNEL_CPP/qpolygonscanner.cpp \ + $$KERNEL_CPP/tqpolygonscanner.cpp \ $$KERNEL_CPP/tqprinter.cpp \ $$KERNEL_CPP/tqprocess.cpp \ $$KERNEL_CPP/tqrect.cpp \ diff --git a/src/kernel/qt_pch.h b/src/kernel/qt_pch.h index 982ea2946..690551eb6 100644 --- a/src/kernel/qt_pch.h +++ b/src/kernel/qt_pch.h @@ -29,7 +29,7 @@ #include #include #include -#include // All moc genereated code has this include +#include // All moc genereated code has this include #include #include #include diff --git a/src/kernel/tqaccel.cpp b/src/kernel/tqaccel.cpp index 39e0213f0..ef6b665e6 100644 --- a/src/kernel/tqaccel.cpp +++ b/src/kernel/tqaccel.cpp @@ -85,7 +85,7 @@ combined with modifiers (\c SHIFT, \c CTRL, \c ALT or \c UNICODE_ACCEL). For example, \c{CTRL + Key_P} could be a shortcut for printing a document. The key codes are listed in \c - ntqnamespace.h. As an alternative, use \c UNICODE_ACCEL with the + tqnamespace.h. As an alternative, use \c UNICODE_ACCEL with the unicode code point of the character. For example, \c{UNICODE_ACCEL + 'A'} gives the same accelerator as \c Key_A. diff --git a/src/kernel/tqaccessible.cpp b/src/kernel/tqaccessible.cpp index 243c4384c..6cbe717e6 100644 --- a/src/kernel/tqaccessible.cpp +++ b/src/kernel/tqaccessible.cpp @@ -41,7 +41,7 @@ #if defined(QT_ACCESSIBILITY_SUPPORT) #include "tqptrdict.h" -#include "ntqmetaobject.h" +#include "tqmetaobject.h" #include #include "ntqapplication.h" #include diff --git a/src/kernel/tqcolor.cpp b/src/kernel/tqcolor.cpp index 59f726694..142fb408a 100644 --- a/src/kernel/tqcolor.cpp +++ b/src/kernel/tqcolor.cpp @@ -39,7 +39,7 @@ **********************************************************************/ #include "tqcolor.h" -#include "ntqnamespace.h" +#include "tqnamespace.h" #include "tqdatastream.h" #include diff --git a/src/kernel/tqcursor_x11.cpp b/src/kernel/tqcursor_x11.cpp index fd2aea158..9facf093c 100644 --- a/src/kernel/tqcursor_x11.cpp +++ b/src/kernel/tqcursor_x11.cpp @@ -43,7 +43,7 @@ #include "tqimage.h" #include "ntqapplication.h" #include "tqdatastream.h" -#include "ntqnamespace.h" +#include "tqnamespace.h" #include "qt_x11_p.h" #include diff --git a/src/kernel/tqdrawutil.h b/src/kernel/tqdrawutil.h index d8e2703d2..113d6095f 100644 --- a/src/kernel/tqdrawutil.h +++ b/src/kernel/tqdrawutil.h @@ -42,7 +42,7 @@ #define TQDRAWUTIL_H #ifndef QT_H -#include "ntqnamespace.h" +#include "tqnamespace.h" #include "tqstring.h" // char*->TQString conversion #endif // QT_H diff --git a/src/kernel/tqevent.h b/src/kernel/tqevent.h index f05fc2c94..fc229f9ab 100644 --- a/src/kernel/tqevent.h +++ b/src/kernel/tqevent.h @@ -44,7 +44,7 @@ #ifndef QT_H #include "ntqwindowdefs.h" #include "tqregion.h" -#include "ntqnamespace.h" +#include "tqnamespace.h" #include "tqmime.h" #include "tqpair.h" #endif // QT_H diff --git a/src/kernel/tqfont.cpp b/src/kernel/tqfont.cpp index fa050a234..a3e21c655 100644 --- a/src/kernel/tqfont.cpp +++ b/src/kernel/tqfont.cpp @@ -2435,7 +2435,7 @@ TQRect TQFontMetrics::boundingRect( TQChar ch ) const If several of the horizontal or several of the vertical alignment flags are set, the resulting alignment is undefined. - These flags are defined in \c ntqnamespace.h. + These flags are defined in \c tqnamespace.h. If \c ExpandTabs is set in \a flgs, then: if \a tabarray is non-null, it specifies a 0-terminated sequence of pixel-positions @@ -2497,7 +2497,7 @@ TQRect TQFontMetrics::boundingRect( int x, int y, int w, int h, int flgs, \i \c WordBreak breaks the text to fit the rectangle. \endlist - These flags are defined in \c ntqnamespace.h. + These flags are defined in \c tqnamespace.h. If \c ExpandTabs is set in \a flgs, then: if \a tabarray is non-null, it specifies a 0-terminated sequence of pixel-positions diff --git a/src/kernel/tqimage.cpp b/src/kernel/tqimage.cpp index b71804321..0a2995ede 100644 --- a/src/kernel/tqimage.cpp +++ b/src/kernel/tqimage.cpp @@ -47,7 +47,7 @@ #include "tqptrlist.h" #include "tqasyncimageio.h" #include "tqpngio.h" -#include "ntqmngio.h" +#include "tqmngio.h" #include "tqjpegio.h" #include "tqmap.h" #include diff --git a/src/kernel/tqkeycode.h b/src/kernel/tqkeycode.h index bca9305ba..45aec20b6 100644 --- a/src/kernel/tqkeycode.h +++ b/src/kernel/tqkeycode.h @@ -42,7 +42,7 @@ #define TQKEYCODE_H #ifndef QT_H -#include "ntqnamespace.h" +#include "tqnamespace.h" #endif // QT_H // all key codes are now in the TQt namespace class diff --git a/src/kernel/tqkeysequence.cpp b/src/kernel/tqkeysequence.cpp index 94ba5cf53..88ea36bd5 100644 --- a/src/kernel/tqkeysequence.cpp +++ b/src/kernel/tqkeysequence.cpp @@ -67,7 +67,7 @@ optionally combined with modifiers, e.g. \c SHIFT, \c CTRL, \c ALT, \c META, or \c UNICODE_ACCEL. For example, \c{CTRL + Key_P} might be a sequence used as a shortcut for printing a document. - The key codes are listed in \c{ntqnamespace.h}. As an alternative, + The key codes are listed in \c{tqnamespace.h}. As an alternative, use \c UNICODE_ACCEL with the unicode code point of the character. For example, \c{UNICODE_ACCEL + 'A'} gives the same key sequence as \c Key_A. @@ -246,7 +246,7 @@ TQKeySequence::TQKeySequence( const TQString& key ) /*! Constructs a key sequence that has a single \a key. - The key codes are listed in \c{ntqnamespace.h} and can be + The key codes are listed in \c{tqnamespace.h} and can be combined with modifiers, e.g. with \c SHIFT, \c CTRL, \c ALT, \c META or \c UNICODE_ACCEL. */ @@ -261,7 +261,7 @@ TQKeySequence::TQKeySequence( int key ) Constructs a key sequence with up to 4 keys \a k1, \a k2, \a k3 and \a k4. - The key codes are listed in \c{ntqnamespace.h} and can be + The key codes are listed in \c{tqnamespace.h} and can be combined with modifiers, e.g. with \c SHIFT, \c CTRL, \c ALT, \c META or \c UNICODE_ACCEL. */ diff --git a/src/kernel/tqkeysequence.h b/src/kernel/tqkeysequence.h index e4800839d..d4965fd5c 100644 --- a/src/kernel/tqkeysequence.h +++ b/src/kernel/tqkeysequence.h @@ -43,7 +43,7 @@ #ifndef QT_H #ifndef QT_H -#include "ntqnamespace.h" +#include "tqnamespace.h" #include "tqstring.h" #endif // QT_H #endif diff --git a/src/kernel/tqmetaobject.cpp b/src/kernel/tqmetaobject.cpp new file mode 100644 index 000000000..06fd7c86f --- /dev/null +++ b/src/kernel/tqmetaobject.cpp @@ -0,0 +1,1251 @@ +/**************************************************************************** +** +** Implementation of TQMetaObject class +** +** Created : 930419 +** +** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. +** +** This file is part of the kernel module of the TQt GUI Toolkit. +** +** This file may be used under the terms of the GNU General +** Public License versions 2.0 or 3.0 as published by the Free +** Software Foundation and appearing in the files LICENSE.GPL2 +** and LICENSE.GPL3 included in the packaging of this file. +** Alternatively you may (at your option) use any later version +** of the GNU General Public License if such license has been +** publicly approved by Trolltech ASA (or its successors, if any) +** and the KDE Free TQt Foundation. +** +** Please review the following information to ensure GNU General +** Public Licensing requirements will be met: +** http://trolltech.com/products/qt/licenses/licensing/opensource/. +** If you are unsure which license is appropriate for your use, please +** review the following information: +** http://trolltech.com/products/qt/licenses/licensing/licensingoverview +** or contact the sales department at sales@trolltech.com. +** +** This file may be used under the terms of the Q Public License as +** defined by Trolltech ASA and appearing in the file LICENSE.TQPL +** included in the packaging of this file. Licensees holding valid TQt +** Commercial licenses may use this file in accordance with the TQt +** Commercial License Agreement provided with the Software. +** +** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, +** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted +** herein. +** +**********************************************************************/ + +#include "tqmetaobject.h" +#include "tqasciidict.h" + +#ifdef TQT_THREAD_SUPPORT +#include +#endif // TQT_THREAD_SUPPORT + +/*! + \class TQMetaData tqmetaobject.h + \reentrant + + \brief The TQMetaData class provides information about a member function that is known to the meta object system. + + \internal + + The struct consists of three members, \e name, \e method and \e access: + + \code + const char *name; // - member name + const TQUMethod* method; // - detailed method description + enum Access { Private, Protected, Public }; + Access access; // - access permission + \endcode + */ + +/*! + \class TQClassInfo tqmetaobject.h + + \brief The TQClassInfo class provides a struct that stores some basic information about a single class. + + \internal + + The class information is a simple \e name - \e value pair: + + \code + const char* name; + const char* value; + \endcode + + */ + + +/*! + \class TQMetaObject tqmetaobject.h + \brief The TQMetaObject class contains meta information about TQt objects. + + \ingroup objectmodel + + 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 required for application programming. + But if you write meta applications, such as scripting engines or + GUI builders, you might find these functions useful: + \list + \i className() to get the name of a class. + \i superClassName() to get the name of the superclass. + \i inherits(), the function called by TQObject::inherits(). + \i superClass() to access the superclass's meta object. + \i numSlots(), numSignals(), slotNames(), and signalNames() to get + information about a class's signals and slots. + \i property() and propertyNames() to obtain information about a + class's properties. + \endlist + + 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(). + + \sa \link moc.html moc (Meta Object Compiler)\endlink + +*/ + + +/***************************************************************************** + The private object. + *****************************************************************************/ + +// extra flags from moc.y +enum Flags { + Invalid = 0x00000000, + Readable = 0x00000001, + Writable = 0x00000002, + EnumOrSet = 0x00000004, + UnresolvedEnum = 0x00000008, + StdSet = 0x00000100, + Override = 0x00000200, + NotDesignable = 0x00001000, + DesignableOverride = 0x00002000, + NotScriptable = 0x00004000, + ScriptableOverride = 0x00008000, + NotStored = 0x00010000, + StoredOverride = 0x00020000 +}; + +static TQAsciiDict *qt_metaobjects = 0; +static int qt_metaobjects_count = 0; + +class TQMetaObjectPrivate +{ +public: + TQMetaObjectPrivate() : +#ifndef TQT_NO_PROPERTIES + enumData(0), numEnumData(0), + propData(0),numPropData(0), + tqt_static_property(0), +#endif + classInfo(0), numClassInfo(0) {} +#ifndef TQT_NO_PROPERTIES + const TQMetaEnum *enumData; + int numEnumData; + const TQMetaProperty *propData; + int numPropData; + bool (*tqt_static_property)(TQObject*, int, int, TQVariant*); +#endif + const TQClassInfo *classInfo; + int numClassInfo; +}; + + +/***************************************************************************** + Internal dictionary for fast access to class members + *****************************************************************************/ + +#if defined(Q_CANNOT_DELETE_CONSTANT) +typedef TQMetaData TQConstMetaData; +#else +typedef const TQMetaData TQConstMetaData; +#endif + +class TQ_EXPORT TQMemberDict : public TQAsciiDict +{ +public: + TQMemberDict( int size = 17, bool cs = TRUE, bool ck = TRUE ) : + TQAsciiDict(size,cs,ck) {} + TQMemberDict( const TQMemberDict &dict ) : TQAsciiDict(dict) {} + ~TQMemberDict() { clear(); } + TQMemberDict &operator=(const TQMemberDict &dict) + { return (TQMemberDict&)TQAsciiDict::operator=(dict); } +}; + + +/* + Calculate optimal dictionary size for n entries using prime numbers, + and assuming there are no more than 40 entries. +*/ + +static int optDictSize( int n ) +{ + if ( n < 6 ) + n = 5; + else if ( n < 10 ) + n = 11; + else if ( n < 14 ) + n = 17; + else + n = 23; + return n; +} + + +/***************************************************************************** + TQMetaObject member functions + *****************************************************************************/ + +/*!\internal + */ +TQMetaObject::TQMetaObject( const char *const class_name, TQMetaObject *super_class, + const TQMetaData *const slot_data, int n_slots, + const TQMetaData *const signal_data, int n_signals, +#ifndef TQT_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 ) +{ + classname = class_name; // set meta data + superclass = super_class; + superclassname = superclass ? superclass->className() : 0; + slotDict = init( slotData = slot_data, n_slots ); + signalDict = init( signalData = signal_data, n_signals ); + + d = new TQMetaObjectPrivate; + reserved = 0; + +#ifndef TQT_NO_PROPERTIES + d->propData = prop_data; + d->numPropData = n_props; + d->enumData = enum_data; + d->numEnumData = n_enums; +#endif + d->classInfo = class_info; + d->numClassInfo = n_info; + + signaloffset = superclass ? ( superclass->signalOffset() + superclass->numSignals() ) : 0; + slotoffset = superclass ? ( superclass->slotOffset() + superclass->numSlots() ) : 0; +#ifndef TQT_NO_PROPERTIES + propertyoffset = superclass ? ( superclass->propertyOffset() + superclass->numProperties() ) : 0; +#endif +} + +#ifndef TQT_NO_PROPERTIES +/*!\internal + */ +TQMetaObject::TQMetaObject( const char *const class_name, TQMetaObject *super_class, + 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 (*tqt_static_property)(TQObject*, int, int, TQVariant*), + const TQClassInfo *const class_info, int n_info ) +{ + classname = class_name; // set meta data + superclass = super_class; + superclassname = superclass ? superclass->className() : 0; + slotDict = init( slotData = slot_data, n_slots ); + signalDict = init( signalData = signal_data, n_signals ); + + d = new TQMetaObjectPrivate; + reserved = 0; + + d->propData = prop_data; + d->numPropData = n_props; + d->enumData = enum_data; + d->numEnumData = n_enums; + d->tqt_static_property = tqt_static_property; + d->classInfo = class_info; + d->numClassInfo = n_info; + + signaloffset = superclass ? ( superclass->signalOffset() + superclass->numSignals() ) : 0; + slotoffset = superclass ? ( superclass->slotOffset() + superclass->numSlots() ) : 0; + propertyoffset = superclass ? ( superclass->propertyOffset() + superclass->numProperties() ) : 0; +} +#endif + +/*!\internal + */ +TQMetaObject::~TQMetaObject() +{ + delete slotDict; // delete dicts + delete signalDict; + delete d; +#ifdef TQT_THREAD_SUPPORT + TQMutexLocker( tqt_global_mutexpool ? + tqt_global_mutexpool->get( &qt_metaobjects ) : 0 ); +#endif // TQT_THREAD_SUPPORT + if ( qt_metaobjects ) { + qt_metaobjects->remove( classname ); + if ( qt_metaobjects->isEmpty() ) { + delete qt_metaobjects; + qt_metaobjects = 0; + } + } + + // delete reserved; // Unused void* +} + + +/*! + \fn const char *TQMetaObject::className() const + + Returns the class name. + + \sa TQObject::className(), superClassName() +*/ + +/*! + \fn const char *TQMetaObject::superClassName() const + + Returns the class name of the superclass or 0 if there is no + superclass in the TQObject hierachy. + + \sa className() +*/ + +/*! + \fn TQMetaObject *TQMetaObject::superClass() const + + Returns the meta object of the super class or 0 if there is no + such object. +*/ + +/*! + Returns the number of slots for this class. + + If \a super is TRUE, inherited slots are included. + + \sa slotNames() +*/ +int TQMetaObject::numSlots( bool super ) const // number of slots +{ + int n = slotDict ? slotDict->count() : 0; + if ( !super || !superclass ) + return n; + return n + superclass->numSlots( super ); +} + +/*! + Returns the number of signals for this class. + + If \a super is TRUE, inherited signals are included. + + \sa signalNames() +*/ +int TQMetaObject::numSignals( bool super ) const // number of signals +{ + int n = signalDict ? signalDict->count() : 0; + if ( !super || !superclass ) + return n; + return n + superclass->numSignals( super ); +} + + +/*! \internal + + Returns the meta data of the slot with the name \a n or 0 if no + such slot exists. + + If \a super is TRUE, inherited slots are included. + */ +const TQMetaData* TQMetaObject::slot( int index, bool super ) const +{ + int idx = index - ( super ? slotOffset() : 0 ); + if ( slotDict && idx >= 0 && idx < (int) slotDict->count() ) { + return slotData + idx; + } + if ( !super || !superclass ) + return 0; + return superclass->slot( index, super ); +} + +/*! \internal + + Returns the meta data of the signal with the name \a n or 0 if no + such signal exists. + + If \a super is TRUE, inherited signals are included. + */ +const TQMetaData* TQMetaObject::signal( int index, bool super ) const +{ + int idx = index - ( super ? signalOffset() : 0 ); + if ( signalDict && idx >= 0 && idx < (int) signalDict->count() ) { + return signalData + idx; + } + if ( !super || !superclass ) + return 0; + return superclass->signal( index, super ); +} + + +/*! + \fn int TQMetaObject::signalOffset() const + + \internal + + Returns the signal offset for this metaobject. + +*/ + +/*! + \fn int TQMetaObject::propertyOffset() const + + \internal + + Returns the property offset for this metaobject. + +*/ + +/*! \internal + Returns the index of the signal with name \n or -1 if no such signal exists. + + If \a super is TRUE, inherited signals are included. +*/ +int TQMetaObject::findSignal( const char* n, bool super ) const +{ + const TQMetaObject *mo = this; + int offset = -1; + + do { + const TQMetaData *md = mo->signalDict ? mo->signalDict->find( n ) : 0; + if ( md ) { +#if defined(QT_CHECK_RANGE) + if ( offset != -1 ) { + tqWarning( "TQMetaObject::findSignal:%s: Conflict with %s::%s", + className(), mo->className(), n ); + return offset; + } +#endif + offset = mo->signalOffset() + ( md - mo->signalData ); +#if !defined(QT_CHECK_RANGE) + return offset; +#endif + } + } while ( super && (mo = mo->superclass) ); + + return offset; +} + +/*! + \fn int TQMetaObject::slotOffset() const + + \internal + + Returns the slot offset for this metaobject. + +*/ + +/*! \internal + Returns the index of the slot with name \n or -1 if no such slot exists. + + If \a super is TRUE, inherited slots are included. + */ +int TQMetaObject::findSlot( const char* n, bool super ) const +{ + const TQMetaData *md = slotDict ? slotDict->find( n ) : 0; + if ( md ) + return slotOffset() + ( md - slotData ); + if ( !super || !superclass) + return -1; + return superclass->findSlot( n, super ); +} + +/*!\internal + */ +TQMetaObject *TQMetaObject::new_metaobject( const char *classname, + TQMetaObject *superclassobject, + const TQMetaData * const slot_data, int n_slots, + const TQMetaData * const signal_data, int n_signals, +#ifndef TQT_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 ) +{ + return new TQMetaObject( classname, superclassobject, slot_data, n_slots, + signal_data, n_signals, +#ifndef TQT_NO_PROPERTIES + prop_data, n_props, + enum_data, n_enums, +#endif + class_info, n_info ); +} + +#ifndef TQT_NO_PROPERTIES +/*!\internal + */ +TQMetaObject *TQMetaObject::new_metaobject( const char *classname, + TQMetaObject *superclassobject, + 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 (*tqt_static_property)(TQObject*, int, int, TQVariant*), + const TQClassInfo * const class_info, int n_info ) +{ + return new TQMetaObject( classname, superclassobject, slot_data, n_slots, + signal_data, n_signals, + prop_data, n_props, + enum_data, n_enums, + tqt_static_property, + class_info, n_info ); +} +#endif + +/*!\internal + */ +TQMemberDict *TQMetaObject::init( const TQMetaData * data, int n ) +{ + if ( n == 0 ) // nothing, then make no dict + return 0; + TQMemberDict *dict = new TQMemberDict( optDictSize(n), TRUE, FALSE ); + TQ_CHECK_PTR( dict ); + while ( n-- ) { // put all members into dict + dict->insert( data->name, data ); + data++; + } + return dict; +} + +/*! + Returns the number of items of class information available for + this class. + + If \a super is TRUE, inherited class information is included. +*/ +int TQMetaObject::numClassInfo( bool super ) const +{ + return d->numClassInfo + ((super && superclass)?superclass->numClassInfo(super):0); +} + +/*! + Returns the class information with index \a index or 0 if no such + information exists. + + If \a super is TRUE, inherited class information is included. +*/ +const TQClassInfo* TQMetaObject::classInfo( int index, bool super ) const +{ + if ( index < 0 ) + return 0; + if ( index < d->numClassInfo ) + return &(d->classInfo[ index ]); + if ( !super || !superclass ) + return 0; + return superclass->classInfo( index - d->numClassInfo, super ); +} + +/*! + \overload + Returns the class information with name \a name or 0 if no such + information exists. + + If \a super is TRUE, inherited class information is included. +*/ +const char* TQMetaObject::classInfo( const char* name, bool super ) const +{ + for( int i = 0; i < d->numClassInfo; ++i ) { + if ( qstrcmp( d->classInfo[i].name, name ) == 0 ) + return d->classInfo[i].value; + } + if ( !super || !superclass ) + return 0; + return superclass->classInfo( name, super ); +} + +#ifndef TQT_NO_PROPERTIES + +/*! + Returns the number of properties for this class. + + If \a super is TRUE, inherited properties are included. + + \sa propertyNames() + */ +int TQMetaObject::numProperties( bool super ) const // number of signals +{ + int n = d->numPropData; + if ( !super || !superclass ) + return n; + return n + superclass->numProperties( super ); +} + +/*! + Returns the property meta data for the property at index \a index + or 0 if no such property exists. + + If \a super is TRUE, inherited properties are included. + + \sa propertyNames() + */ +const TQMetaProperty* TQMetaObject::property( int index, bool super ) const +{ + int idx = index - ( super ? propertyOffset() : 0 ); + if ( d->propData && idx >= 0 && idx < (int)d->numPropData ) + return d->propData + idx; + if ( !super || !superclass ) + return 0; + return superclass->property( index, super ); +} + + +/*! + Returns the index for the property with name \a name or -1 if no + such property exists. + + If \a super is TRUE, inherited properties are included. + + \sa property(), propertyNames() +*/ + +int TQMetaObject::findProperty( const char *name, bool super ) const +{ + for( int i = 0; i < d->numPropData; ++i ) { + if ( d->propData[i].isValid() && qstrcmp( d->propData[i].name(), name ) == 0 ) { + return ( super ? propertyOffset() : 0 ) + i; + } + } + if ( !super || !superclass ) + return -1; + return superclass->findProperty( name, super ); +} + +/*! \internal + + Returns the index for the property \a prop + or -1 if the property can not be found. + + If \a super is TRUE, inherited properties are included. + + \sa property(), propertyNames() +*/ + +int TQMetaObject::indexOfProperty( const TQMetaProperty* prop, bool super ) const +{ + if ( *prop->meta == this ) + return ( super ? propertyOffset() : 0 ) + ( prop - d->propData); + if ( !super || !superclass ) + return -1; + return superclass->indexOfProperty( prop, super ); +} + +/*!\internal + + Returns the parent property of property \a p or 0, if the property + cannot be resolved. + + \a p has to be contained in this meta object +*/ + +const TQMetaProperty* TQMetaObject::resolveProperty( const TQMetaProperty* p ) const +{ + if ( !superclass ) + return 0; + return superclass->property( superclass->findProperty( p->n, TRUE ), TRUE ); +} + +/*!\internal + + \overload + + The version of resolveProperty that is used by moc generated code +*/ + +int TQMetaObject::resolveProperty( int index ) const +{ + if ( !superclass ) + return -1; + const TQMetaProperty* p = d->propData + ( index - propertyOffset() ); + return superclass->findProperty( p->n, TRUE ); +} + + +/*! + Returns a list with the names of all this class's properties. + + If \a super is TRUE, inherited properties are included. + + \sa property() +*/ +TQStrList TQMetaObject::propertyNames( bool super ) const +{ + TQStrList l( FALSE ); + + if ( superclass && super ) { + TQStrList sl = superclass->propertyNames( super ); + for ( TQStrListIterator slit( sl ); slit.current(); ++slit ) + l.append( slit.current() ); + } + + for( int i = 0; i < d->numPropData; ++i ) { + if ( d->propData[i].isValid() ) + l.append( d->propData[i].name() ); + } + + return l; +} + +/*! + Returns a list with the names of all this class's signals. + + If \a super is TRUE, inherited signals are included. +*/ +TQStrList TQMetaObject::signalNames( bool super ) const +{ + TQStrList l( FALSE ); + int n = numSignals( super ); + for( int i = 0; i < n; ++i ) { + l.append( signal(i, super)->name ); + } + return l; +} + +/*! + Returns a list with the names of all this class's slots. + + If \a super is TRUE, inherited slots are included. + + \sa numSlots() +*/ +TQStrList TQMetaObject::slotNames( bool super ) const +{ + TQStrList l( FALSE ); + int n = numSlots( super ); + for( int i = 0; i < n; ++i ) + l.append( slot( i, super)->name ); + return l; +} + +/*!\internal + + */ + +int TQMetaObject::numEnumerators( bool super ) const +{ + int n = 0; + if ( superclass && super ) + n += superclass->numEnumerators( super ); + return n + d->numEnumData; +} + +/*!\internal + + */ +TQStrList TQMetaObject::enumeratorNames( bool super ) const +{ + TQStrList l( FALSE ); + + if ( superclass && super ) { + TQStrList sl = superclass->enumeratorNames( super ); + for ( TQStrListIterator slit( sl ); slit.current(); ++slit ) + l.append( slit.current() ); + } + + for( int i = 0; i < d->numEnumData; ++i ) { + if ( d->enumData[i].items ) + l.append( d->enumData[i].name ); + } + + return l; +} + +/*!\internal + */ +const TQMetaEnum* TQMetaObject::enumerator( const char* name, bool super ) const +{ + for( int i = 0; i < d->numEnumData; ++i ) + if ( qstrcmp( d->enumData[i].name, name ) == 0 ) + return &(d->enumData[i]); + if ( !super || !superclass ) + return 0; + return superclass->enumerator( name, super ); +} + +#endif // TQT_NO_PROPERTIES + + +/*! + Returns TRUE if this class inherits \a clname within the meta + object inheritance chain; otherwise returns FALSE. + + (A class is considered to inherit itself.) +*/ +bool TQMetaObject::inherits( const char* clname ) const +{ + const TQMetaObject *meta = this; + while ( meta ) { + if ( qstrcmp(clname, meta->className()) == 0 ) + return TRUE; + meta = meta->superclass; + } + return FALSE; +} + +/*! \internal */ + +TQMetaObject *TQMetaObject::metaObject( const char *class_name ) +{ + if ( !qt_metaobjects ) + return 0; +#ifdef TQT_THREAD_SUPPORT + TQMutexLocker( tqt_global_mutexpool ? + tqt_global_mutexpool->get( &qt_metaobjects ) : 0 ); +#endif // TQT_THREAD_SUPPORT + TQtStaticMetaObjectFunction func = (TQtStaticMetaObjectFunction)qt_metaobjects->find( class_name ); + if ( func ) + return func(); + return 0; +} + +/*! \internal */ +bool TQMetaObject::hasMetaObject( const char *class_name ) +{ + if ( !qt_metaobjects ) + return FALSE; +#ifdef TQT_THREAD_SUPPORT + TQMutexLocker( tqt_global_mutexpool ? + tqt_global_mutexpool->get( &qt_metaobjects ) : 0 ); +#endif // TQT_THREAD_SUPPORT + return !!qt_metaobjects->find( class_name ); +} + +#ifndef TQT_NO_PROPERTIES +/*! \internal + +### this functions will go away. It exists purely for the sake of meta +### object code generated with TQt 3.1.0 +*/ +bool TQMetaObject::tqt_static_property( TQObject* o, int id, int f, TQVariant* v) +{ + if ( d->tqt_static_property ) + return d->tqt_static_property( o, id, f, v ); + else if ( o ) // compatibility + return o->tqt_property( id, f, v ); + else if ( superclass ) + return superclass->tqt_static_property( o, id, f, v ); + switch ( f ) { + case 3: case 4: case 5: + return TRUE; + default: + return FALSE; + } +} + + +/*! + \class TQMetaProperty tqmetaobject.h + + \brief The TQMetaProperty class stores meta data about a property. + + \ingroup objectmodel + + 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. +*/ + +/*! + Returns the possible enumeration keys if this property is an + enumeration type (or a set type). + + \sa isEnumType() +*/ +TQStrList TQMetaProperty::enumKeys() const +{ + TQStrList l( FALSE ); + const TQMetaEnum* ed = enumData; + if ( !enumData && meta ) + ed = (*meta)->enumerator( t, TRUE ); + if ( !ed ) + return l; + if ( ed != 0 ) { + for( uint i = 0; i < ed->count; ++i ) { + uint j = 0; + while ( j < i && + ed->items[j].value != ed->items[i].value ) + ++j; + if ( i == j ) + l.append( ed->items[i].key ); + } + } + return l; +} + +/*! + Converts the enumeration key \a key to its integer value. + + For set types, use keysToValue(). + + \sa valueToKey(), isSetType(), keysToValue() +*/ +int TQMetaProperty::keyToValue( const char* key ) const +{ + const TQMetaEnum* ed = enumData; + if ( !enumData && meta ) + ed = (*meta)->enumerator( t, TRUE ); + if ( !ed ) + return -1; + for ( uint i = 0; i < ed->count; ++i ) { + if ( !qstrcmp( key, ed->items[i].key) ) + return ed->items[i].value; + } + return -1; +} + +/*! + Converts the enumeration value \a value to its literal key. + + For set types, use valueToKeys(). + + \sa valueToKey(), isSetType(), valueToKeys() +*/ +const char* TQMetaProperty::valueToKey( int value ) const +{ + const TQMetaEnum* ed = enumData; + if ( !enumData && meta ) + ed = (*meta)->enumerator( t, TRUE ); + if ( !ed ) + return 0; + for ( uint i = 0; i < ed->count; ++i ) { + if ( value == ed->items[i].value ) + return ed->items[i].key ; + } + return 0; +} + +/*! + Converts the list of keys \a keys to their combined (OR-ed) + integer value. + + \sa isSetType(), valueToKey(), keysToValue() +*/ +int TQMetaProperty::keysToValue( const TQStrList& keys ) const +{ + const TQMetaEnum* ed = enumData; + if ( !enumData && meta ) + ed = (*meta)->enumerator( t, TRUE ); + if ( !ed ) + return -1; + int value = 0; + for ( TQStrListIterator it( keys ); it.current(); ++it ) { + uint i; + for( i = ed->count; i > 0; --i ) { + if ( !qstrcmp( it.current(), ed->items[i-1].key) ) { + value |= ed->items[i-1].value; + break; + } + } + if ( i == 0 ) + value |= -1; + } + return value; +} + +/*! + Converts the set value \a value to a list of keys. + + \sa isSetType(), valueToKey(), valueToKeys() +*/ +TQStrList TQMetaProperty::valueToKeys( int value ) const +{ + TQStrList keys; + const TQMetaEnum* ed = enumData; + if ( !enumData && meta ) + ed = (*meta)->enumerator( t, TRUE ); + if ( !ed ) + return keys; + + int v = value; + for( uint i = ed->count; i > 0; --i ) { + int k = ed->items[i-1].value; + if ( ( k != 0 && (v & k) == k ) || ( k == value) ) { + v = v & ~k; + keys.append( ed->items[i-1].key ); + } + } + return keys; +} + +bool TQMetaProperty::writable() const +{ + if ( !testFlags( Override ) || testFlags( Writable ) ) + return testFlags( Writable ); + const TQMetaObject* mo = (*meta); + const TQMetaProperty* parent = mo->resolveProperty( this ); + return parent ? parent->writable() : FALSE; +} + +/*!\internal + */ +bool TQMetaProperty::stdSet() const +{ + if ( !testFlags( Override ) || testFlags( Writable ) ) + return testFlags( StdSet ); + const TQMetaObject* mo = (*meta); + const TQMetaProperty* parent = mo->resolveProperty( this ); + return parent ? parent->stdSet() : FALSE; +} + +/*!\internal + */ +int TQMetaProperty::id() const +{ + return _id < 0 ? (*meta)->indexOfProperty( this, TRUE ) : _id; +} + +/*! \internal +*/ +void TQMetaProperty::clear() +{ + t = n = 0; + meta = 0; + enumData = 0; + _id = -1; + flags = 0; +} + +bool TQMetaProperty::isValid() const +{ + if ( testFlags( UnresolvedEnum ) ) { + if ( !enumData && (!meta || !(*meta)->enumerator( t, TRUE ) ) ) + return FALSE; + } + if ( !testFlags( Override ) || testFlags( Readable ) ) + return testFlags( Readable ); + const TQMetaObject* mo = (*meta); + const TQMetaProperty* parent = mo->resolveProperty( this ); + return parent ? parent->isValid() : FALSE; +} + +bool TQMetaProperty::isSetType() const +{ + const TQMetaEnum* ed = enumData; + if ( !enumData && meta ) + ed = (*meta)->enumerator( t, TRUE ); + return ( ed != 0 && ed->set ); +} + +bool TQMetaProperty::isEnumType() const +{ + return testFlags( EnumOrSet ); +} + + + +/*! + \fn const char* TQMetaProperty::type() const + + Returns the type of the property. +*/ + +/*! + \fn const char* TQMetaProperty::name() const + + Returns the name of the property. +*/ + +/*! + \fn bool TQMetaProperty::writable() const + + Returns TRUE if the property is writable; otherwise returns FALSE. + +*/ + +/*! \fn bool TQMetaProperty::isValid() const + + \internal + + Returns whether the property is valid. +*/ + +/*! + \fn bool TQMetaProperty::isEnumType() const + + Returns TRUE if the property's type is an enumeration value; + otherwise returns FALSE. + + \sa isSetType(), enumKeys() +*/ + +/*! + \fn 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. + + \sa isEnumType(), enumKeys() +*/ + + +/*! Returns TRUE if the property is designable for object \a o; + otherwise returns FALSE. + + If no object \a o is given, the function returns a static + approximation. + */ +bool TQMetaProperty::designable( TQObject* o ) const +{ + if ( !isValid() || !writable() ) + return FALSE; + if ( o ) { + int idx = _id >= 0 ? _id : (*meta)->indexOfProperty( this, TRUE ); + return idx >= 0 && o->tqt_property( idx, 3, 0 ); + } + if ( testFlags( DesignableOverride ) ) { + const TQMetaObject* mo = (*meta); + const TQMetaProperty* parent = mo->resolveProperty( this ); + return parent ? parent->designable() : FALSE; + } + return !testFlags( NotDesignable ); +} + +/*! + Returns TRUE if the property is scriptable for object \a o; + otherwise returns FALSE. + + If no object \a o is given, the function returns a static + approximation. + */ +bool TQMetaProperty::scriptable( TQObject* o ) const +{ + if ( o ) { + int idx = _id >= 0 ? _id : (*meta)->indexOfProperty( this, TRUE ); + return idx >= 0 && o->tqt_property( idx, 4, 0 ); + } + if ( testFlags( ScriptableOverride ) ) { + const TQMetaObject* mo = (*meta); + const TQMetaProperty* parent = mo->resolveProperty( this ); + return parent ? parent->scriptable() : FALSE; + } + return !testFlags( NotScriptable ); +} + +/*! + Returns TRUE if the property shall be stored for object \a o; + otherwise returns FALSE. + + If no object \a o is given, the function returns a static + approximation. + */ +bool TQMetaProperty::stored( TQObject* o ) const +{ + if ( !isValid() || !writable() ) + return FALSE; + if ( o ) { + int idx = _id >= 0 ? _id : (*meta)->indexOfProperty( this, TRUE ); + return idx >= 0 && o->tqt_property( idx, 5, 0 ); + } + if ( testFlags( StoredOverride ) ) { + const TQMetaObject* mo = (*meta); + const TQMetaProperty* parent = mo->resolveProperty( this ); + return parent ? parent->stored() : FALSE; + } + return !testFlags( NotStored ); +} + + +/*! + Tries to reset the property for object \a 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::reset( TQObject* o ) const +{ + if ( !o ) + return FALSE; + int idx = _id >= 0 ? _id : (*meta)->indexOfProperty( this, TRUE ); + if ( idx < 0 ) + return 0; + return o->tqt_property( idx, 2, 0 ); +} + + +/*! \enum TQMetaProperty::Flags + + \internal +*/ + +#endif // TQT_NO_PROPERTIES + +/* + * TQMetaObjectCleanUp is used as static global object in the moc-generated cpp + * files and deletes the TQMetaObject provided with setMetaObject. It sets the + * TQObject reference to the metaObj to NULL when it is destroyed. + */ +TQMetaObjectCleanUp::TQMetaObjectCleanUp( const char *mo_name, TQtStaticMetaObjectFunction func ) + : metaObject( 0 ) +{ +#ifdef TQT_THREAD_SUPPORT + TQMutexLocker( tqt_global_mutexpool ? + tqt_global_mutexpool->get( &qt_metaobjects ) : 0 ); +#endif // TQT_THREAD_SUPPORT + if ( !qt_metaobjects ) + qt_metaobjects = new TQAsciiDict( 257 ); + qt_metaobjects->insert( mo_name, (void*)func ); + + qt_metaobjects_count++; +} + +TQMetaObjectCleanUp::TQMetaObjectCleanUp() + : metaObject( 0 ) +{ +} + +/*! \fn bool TQMetaProperty::testFlags( uint f ) const + \internal +*/ + +TQMetaObjectCleanUp::~TQMetaObjectCleanUp() +{ +#ifdef TQT_THREAD_SUPPORT + TQMutexLocker( tqt_global_mutexpool ? + tqt_global_mutexpool->get( &qt_metaobjects ) : 0 ); +#endif // TQT_THREAD_SUPPORT + if ( !--qt_metaobjects_count ) { + delete qt_metaobjects; + qt_metaobjects = 0; + } + if ( metaObject ) { + delete *metaObject; + *metaObject = 0; + metaObject = 0; + } +} + +void TQMetaObjectCleanUp::setMetaObject( TQMetaObject *&mo ) +{ +#if defined(QT_CHECK_RANGE) + if (metaObject && metaObject != &mo) + tqWarning( "TQMetaObjectCleanUp::setMetaObject: Double use of TQMetaObjectCleanUp!" ); +#endif + metaObject = &mo; +} diff --git a/src/kernel/tqmetaobject.h b/src/kernel/tqmetaobject.h new file mode 100644 index 000000000..9db397f47 --- /dev/null +++ b/src/kernel/tqmetaobject.h @@ -0,0 +1,286 @@ +/**************************************************************************** +** +** Definition of TQMetaObject class +** +** Created : 930419 +** +** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. +** +** This file is part of the kernel module of the TQt GUI Toolkit. +** +** This file may be used under the terms of the GNU General +** Public License versions 2.0 or 3.0 as published by the Free +** Software Foundation and appearing in the files LICENSE.GPL2 +** and LICENSE.GPL3 included in the packaging of this file. +** Alternatively you may (at your option) use any later version +** of the GNU General Public License if such license has been +** publicly approved by Trolltech ASA (or its successors, if any) +** and the KDE Free TQt Foundation. +** +** Please review the following information to ensure GNU General +** Public Licensing requirements will be met: +** http://trolltech.com/products/qt/licenses/licensing/opensource/. +** If you are unsure which license is appropriate for your use, please +** review the following information: +** http://trolltech.com/products/qt/licenses/licensing/licensingoverview +** or contact the sales department at sales@trolltech.com. +** +** This file may be used under the terms of the Q Public License as +** defined by Trolltech ASA and appearing in the file LICENSE.TQPL +** included in the packaging of this file. Licensees holding valid TQt +** Commercial licenses may use this file in accordance with the TQt +** Commercial License Agreement provided with the Software. +** +** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, +** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted +** herein. +** +**********************************************************************/ + +#ifndef TQMETAOBJECT_H +#define TQMETAOBJECT_H + +#ifndef QT_H +#include "tqconnection.h" +#include "tqstrlist.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 TQT_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 TQT_NO_PROPERTIES + +class TQ_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 // TQT_NO_PROPERTIES + +struct TQClassInfo // class info meta data +{ + const char* name; // - name of the info + const char* value; // - value of the info +}; + +class TQ_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 TQT_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 TQT_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 (*tqt_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 TQT_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 TQT_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 TQT_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 (*tqt_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 TQT_NO_PROPERTIES + int propertyoffset; +public: + bool tqt_static_property( TQObject* o, int id, int f, TQVariant* v); +private: + friend class TQMetaProperty; +#endif + +private: // Disabled copy constructor and operator= +#if defined(TQ_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 TQT_NO_PROPERTIES +inline int TQMetaObject::propertyOffset() const +{ return propertyoffset; } +#endif + +typedef TQMetaObject *(*TQtStaticMetaObjectFunction)(); + +class TQ_EXPORT TQMetaObjectCleanUp +{ +public: + TQMetaObjectCleanUp( const char *mo_name, TQtStaticMetaObjectFunction ); + TQMetaObjectCleanUp(); + ~TQMetaObjectCleanUp(); + + void setMetaObject( TQMetaObject *&mo ); + +private: + TQMetaObject **metaObject; +}; + +#endif // TQMETAOBJECT_H diff --git a/src/kernel/tqmngio.cpp b/src/kernel/tqmngio.cpp new file mode 100644 index 000000000..0f257ae88 --- /dev/null +++ b/src/kernel/tqmngio.cpp @@ -0,0 +1,460 @@ +/**************************************************************************** +** +** Implementation of MNG TQImage IOHandler +** +** Created : 970521 +** +** Copyright (C) 1997-2008 Trolltech ASA. All rights reserved. +** +** This file is part of the kernel module of the TQt GUI Toolkit. +** +** This file may be used under the terms of the GNU General +** Public License versions 2.0 or 3.0 as published by the Free +** Software Foundation and appearing in the files LICENSE.GPL2 +** and LICENSE.GPL3 included in the packaging of this file. +** Alternatively you may (at your option) use any later version +** of the GNU General Public License if such license has been +** publicly approved by Trolltech ASA (or its successors, if any) +** and the KDE Free TQt Foundation. +** +** Please review the following information to ensure GNU General +** Public Licensing requirements will be met: +** http://trolltech.com/products/qt/licenses/licensing/opensource/. +** If you are unsure which license is appropriate for your use, please +** review the following information: +** http://trolltech.com/products/qt/licenses/licensing/licensingoverview +** or contact the sales department at sales@trolltech.com. +** +** This file may be used under the terms of the Q Public License as +** defined by Trolltech ASA and appearing in the file LICENSE.TQPL +** included in the packaging of this file. Licensees holding valid TQt +** Commercial licenses may use this file in accordance with the TQt +** Commercial License Agreement provided with the Software. +** +** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, +** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted +** herein. +** +**********************************************************************/ + +#include "tqdatetime.h" + +#ifndef TQT_NO_IMAGEIO_MNG + +#include "tqimage.h" +#include "tqasyncimageio.h" +#include "tqiodevice.h" +#include "tqmngio.h" + +// Define XMD_H prohibits the included headers of libmng.h to typedef INT32. +// This is needed for Borland with STL support, since in that case, INT32 is +// already defined by some Borland header. +#define XMD_H +#if defined(Q_OS_UNIXWARE) +# define HAVE_BOOLEAN // libjpeg under Unixware seems to need this +#endif +#include +#include + + +#ifndef TQT_NO_ASYNC_IMAGE_IO + +class TQMNGFormat : public TQImageFormat { +public: + TQMNGFormat(); + virtual ~TQMNGFormat(); + + int decode(TQImage& img, TQImageConsumer* consumer, + const uchar* buffer, int length); + + bool openstream() + { + // ### We should figure out how many loops an MNG has, but for now always assume infinite. + if (consumer) + consumer->setLooping(0); + return TRUE; + } + bool closestream( ) + { + if (consumer) + consumer->end(); + return TRUE; + } + bool readdata( mng_ptr pBuf, mng_uint32 iBuflen, mng_uint32p pRead ) + { + uint m = ndata + nbuffer - ubuffer; + if ( iBuflen > m ) { + iBuflen = m; + } + *pRead = iBuflen; + uint n = nbuffer-ubuffer; + if ( iBuflen < n ) { + // enough in buffer + memcpy(pBuf, buffer+ubuffer, iBuflen); + ubuffer += iBuflen; + return TRUE; + } + if ( n ) { + // consume buffer + memcpy(pBuf, buffer+ubuffer, n ); + pBuf = (mng_ptr)((char*)pBuf + n); + iBuflen -= n; + ubuffer = nbuffer; + } + if ( iBuflen ) { + // fill from incoming data + memcpy(pBuf, data, iBuflen); + data += iBuflen; + ndata -= iBuflen; + } + return TRUE; + } + bool errorproc( mng_int32 iErrorcode, + mng_int8 /*iSeverity*/, + mng_chunkid iChunkname, + mng_uint32 /*iChunkseq*/, + mng_int32 iExtra1, + mng_int32 iExtra2, + mng_pchar zErrortext ) + { + tqWarning("MNG error %d: %s; chunk %c%c%c%c; subcode %d:%d", + iErrorcode, zErrortext ? zErrortext : "", + (iChunkname>>24)&0xff, + (iChunkname>>16)&0xff, + (iChunkname>>8)&0xff, + (iChunkname>>0)&0xff, + iExtra1,iExtra2); + return TRUE; + } + bool processheader( mng_uint32 iWidth, mng_uint32 iHeight ) + { + image->create(iWidth,iHeight,32); + image->setAlphaBuffer(TRUE); + memset(image->bits(),0,iWidth*iHeight*4); + consumer->setSize(iWidth,iHeight); + mng_set_canvasstyle(handle, + TQImage::systemByteOrder() == TQImage::LittleEndian + ? MNG_CANVAS_BGRA8 : MNG_CANVAS_ARGB8 ); + return TRUE; + } + mng_ptr getcanvasline( mng_uint32 iLinenr ) + { + return image->scanLine(iLinenr); + } + mng_bool refresh( mng_uint32 x, mng_uint32 y, mng_uint32 w, mng_uint32 h ) + { + TQRect r(x,y,w,h); + consumer->changed(r); + consumer->setFramePeriod(0); + consumer->frameDone(); + return TRUE; + } + mng_uint32 gettickcount( ) + { + return timer.elapsed() - losttime; + } + bool settimer( mng_uint32 iMsecs ) + { + consumer->setFramePeriod(iMsecs); + consumer->frameDone(); + state = Time; + losingtimer.start(); + losttime -= iMsecs; + return TRUE; + } + +private: + // Animation-level information + enum { MovieStart, Time, Data, Data2 } state; + + // Image-level information + mng_handle handle; + + // For storing unused data + uchar *buffer; + uint maxbuffer; + uint nbuffer; + + // Timing + TQTime timer; + TQTime losingtimer; + int losttime; + + void enlargeBuffer(uint n) + { + if ( n > maxbuffer ) { + maxbuffer = n; + buffer = (uchar*)realloc(buffer,n); + } + } + + // Temporary locals during single data-chunk processing + const uchar* data; + uint ndata; + uint ubuffer; + TQImageConsumer* consumer; + TQImage* image; +}; + +class TQMNGFormatType : public TQImageFormatType +{ + TQImageFormat* decoderFor(const uchar* buffer, int length); + const char* formatName() const; +}; + + +/* + \class TQMNGFormat tqmngio.h + \brief Incremental image decoder for MNG image format. + + \ingroup images + \ingroup graphics + + This subclass of TQImageFormat decodes MNG format images, + including animated MNGs. + + Animated MNG images are standard MNG images. The MNG standard + defines two extension chunks that are useful for animations: + +
                +
                gIFg - GIF-like Graphic Control Extension +
                Includes frame disposal, user input flag (we ignore this), + and inter-frame delay. +
                gIFx - GIF-like Application Extension +
                Multi-purpose, but we just use the Netscape extension + which specifies looping. +
                + + The subimages usually contain a offset chunk (oFFs) but need not. + + The first image defines the "screen" size. Any subsequent image that + doesn't fit is clipped. + +TODO: decide on this point. gIFg gives disposal types, so it can be done. + All images paste (\e not composite, just place all-channel copying) + over the previous image to produce a subsequent frame. +*/ + +/* + \class TQMNGFormatType tqasyncimageio.h + \brief Incremental image decoder for MNG image format. + + \ingroup images + \ingroup graphics + \ingroup io + + This subclass of TQImageFormatType recognizes MNG + format images, creating a TQMNGFormat when required. An instance + of this class is created automatically before any other factories, + so you should have no need for such objects. +*/ + +TQImageFormat* TQMNGFormatType::decoderFor( const uchar* buffer, int length ) +{ + if (length < 8) return 0; + + if ((buffer[0]==138 // MNG signature + && buffer[1]=='M' + && buffer[2]=='N' + && buffer[3]=='G' + && buffer[4]==13 + && buffer[5]==10 + && buffer[6]==26 + && buffer[7]==10) + || (buffer[0]==139 // JNG signature + && buffer[1]=='J' + && buffer[2]=='N' + && buffer[3]=='G' + && buffer[4]==13 + && buffer[5]==10 + && buffer[6]==26 + && buffer[7]==10) +#ifdef TQT_NO_IMAGEIO_PNG // if we don't have native PNG support use libmng + || (buffer[0]==137 // PNG signature + && buffer[1]=='P' + && buffer[2]=='N' + && buffer[3]=='G' + && buffer[4]==13 + && buffer[5]==10 + && buffer[6]==26 + && buffer[7]==10) +#endif + ) + return new TQMNGFormat; + return 0; +} + +const char* TQMNGFormatType::formatName() const +{ + return "MNG"; +} + + +/*! + Constructs a TQMNGFormat. +*/ +TQMNGFormat::TQMNGFormat() +{ + state = MovieStart; + handle = 0; + nbuffer = 0; + maxbuffer = 0; + buffer = 0; + losttime = 0; +} + +/* + Destroys a TQMNGFormat. +*/ +TQMNGFormat::~TQMNGFormat() +{ + // We're setting the consumer to 0 since it may have been + // deleted by read_async_image in tqimage.cpp + consumer = 0; + if (handle) mng_cleanup(&handle); +} + + +// C-callback to C++-member-function conversion +// +static mng_bool openstream( mng_handle handle ) +{ + return ((TQMNGFormat*)mng_get_userdata(handle))->openstream(); +} +static mng_bool closestream( mng_handle handle ) +{ + return ((TQMNGFormat*)mng_get_userdata(handle))->closestream(); +} +static mng_bool readdata( mng_handle handle, mng_ptr pBuf, mng_uint32 iBuflen, mng_uint32p pRead ) +{ + return ((TQMNGFormat*)mng_get_userdata(handle))->readdata(pBuf,iBuflen,pRead); +} +static mng_bool errorproc( mng_handle handle, + mng_int32 iErrorcode, + mng_int8 iSeverity, + mng_chunkid iChunkname, + mng_uint32 iChunkseq, + mng_int32 iExtra1, + mng_int32 iExtra2, + mng_pchar zErrortext ) +{ + return ((TQMNGFormat*)mng_get_userdata(handle))->errorproc(iErrorcode, + iSeverity,iChunkname,iChunkseq,iExtra1,iExtra2,zErrortext); +} +static mng_bool processheader( mng_handle handle, + mng_uint32 iWidth, mng_uint32 iHeight ) +{ + return ((TQMNGFormat*)mng_get_userdata(handle))->processheader(iWidth,iHeight); +} +static mng_ptr getcanvasline( mng_handle handle, mng_uint32 iLinenr ) +{ + return ((TQMNGFormat*)mng_get_userdata(handle))->getcanvasline(iLinenr); +} +static mng_bool refresh( mng_handle handle, + mng_uint32 iTop, + mng_uint32 iLeft, + mng_uint32 iBottom, + mng_uint32 iRight ) +{ + return ((TQMNGFormat*)mng_get_userdata(handle))->refresh(iTop,iLeft,iBottom,iRight); +} +static mng_uint32 gettickcount( mng_handle handle ) +{ + return ((TQMNGFormat*)mng_get_userdata(handle))->gettickcount(); +} +static mng_bool settimer( mng_handle handle, mng_uint32 iMsecs ) +{ + return ((TQMNGFormat*)mng_get_userdata(handle))->settimer(iMsecs); +} + +static mng_ptr memalloc( mng_size_t iLen ) +{ + return calloc(1,iLen); +} +static void memfree( mng_ptr iPtr, mng_size_t /*iLen*/ ) +{ + free(iPtr); +} + +/*! + This function decodes some data into image changes. + + Returns the number of bytes consumed. +*/ +int TQMNGFormat::decode( TQImage& img, TQImageConsumer* cons, + const uchar* buf, int length ) +{ + consumer = cons; + image = &img; + + data = buf; + ndata = length; + ubuffer = 0; + + if ( state == MovieStart ) { + handle = mng_initialize( (mng_ptr)this, ::memalloc, ::memfree, 0 ); + mng_set_suspensionmode( handle, MNG_TRUE ); + mng_setcb_openstream( handle, ::openstream ); + mng_setcb_closestream( handle, ::closestream ); + mng_setcb_readdata( handle, ::readdata ); + mng_setcb_errorproc( handle, ::errorproc ); + mng_setcb_processheader( handle, ::processheader ); + mng_setcb_getcanvasline( handle, ::getcanvasline ); + mng_setcb_refresh( handle, ::refresh ); + mng_setcb_gettickcount( handle, ::gettickcount ); + mng_setcb_settimer( handle, ::settimer ); + state = Data; + mng_readdisplay(handle); + losingtimer.start(); + } + + losttime += losingtimer.elapsed(); + if ( ndata || !length ) + mng_display_resume(handle); + losingtimer.start(); + + image = 0; + + nbuffer -= ubuffer; + if ( nbuffer ) { + // Move back unused tail + memcpy(buffer,buffer+ubuffer,nbuffer); + } + if ( ndata ) { + // Not all used. + enlargeBuffer(nbuffer+ndata); + memcpy(buffer+nbuffer,data,ndata); + nbuffer += ndata; + } + + return length; +} + +static TQMNGFormatType* globalMngFormatTypeObject = 0; + +#endif // TQT_NO_ASYNC_IMAGE_IO + +#ifndef TQT_NO_ASYNC_IMAGE_IO +void qCleanupMngIO() +{ + if ( globalMngFormatTypeObject ) { + delete globalMngFormatTypeObject; + globalMngFormatTypeObject = 0; + } +} +#endif + +void qInitMngIO() +{ + static bool done = FALSE; + if ( !done ) { + done = TRUE; +#ifndef TQT_NO_ASYNC_IMAGE_IO + globalMngFormatTypeObject = new TQMNGFormatType; + tqAddPostRoutine( qCleanupMngIO ); +#endif + } +} + +#endif // TQT_NO_IMAGEIO_MNG diff --git a/src/kernel/tqmngio.h b/src/kernel/tqmngio.h new file mode 100644 index 000000000..530a0aa1d --- /dev/null +++ b/src/kernel/tqmngio.h @@ -0,0 +1,53 @@ +/**************************************************************************** +** +** Definition of MNG TQImage IOHandler +** +** Created : 970521 +** +** Copyright (C) 2005-2008 Trolltech ASA. All rights reserved. +** +** This file is part of the kernel module of the TQt GUI Toolkit. +** +** This file may be used under the terms of the GNU General +** Public License versions 2.0 or 3.0 as published by the Free +** Software Foundation and appearing in the files LICENSE.GPL2 +** and LICENSE.GPL3 included in the packaging of this file. +** Alternatively you may (at your option) use any later version +** of the GNU General Public License if such license has been +** publicly approved by Trolltech ASA (or its successors, if any) +** and the KDE Free TQt Foundation. +** +** Please review the following information to ensure GNU General +** Public Licensing requirements will be met: +** http://trolltech.com/products/qt/licenses/licensing/opensource/. +** If you are unsure which license is appropriate for your use, please +** review the following information: +** http://trolltech.com/products/qt/licenses/licensing/licensingoverview +** or contact the sales department at sales@trolltech.com. +** +** This file may be used under the terms of the Q Public License as +** defined by Trolltech ASA and appearing in the file LICENSE.TQPL +** included in the packaging of this file. Licensees holding valid TQt +** Commercial licenses may use this file in accordance with the TQt +** Commercial License Agreement provided with the Software. +** +** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, +** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted +** herein. +** +**********************************************************************/ + +#ifndef TQMNGIO_H +#define TQMNGIO_H + +#ifndef QT_H +#endif // QT_H + +#ifndef TQT_NO_IMAGEIO_MNG + +void qInitMngIO(); + +#endif // TQT_NO_IMAGEIO_MNG + +#endif // TQMNGIO_H diff --git a/src/kernel/tqnamespace.h b/src/kernel/tqnamespace.h new file mode 100644 index 000000000..f5ec7dd1d --- /dev/null +++ b/src/kernel/tqnamespace.h @@ -0,0 +1,1035 @@ +/**************************************************************************** +** +** Definition of TQt namespace (as class for compiler compatibility) +** +** Created : 980927 +** +** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. +** +** This file is part of the kernel module of the TQt GUI Toolkit. +** +** This file may be used under the terms of the GNU General +** Public License versions 2.0 or 3.0 as published by the Free +** Software Foundation and appearing in the files LICENSE.GPL2 +** and LICENSE.GPL3 included in the packaging of this file. +** Alternatively you may (at your option) use any later version +** of the GNU General Public License if such license has been +** publicly approved by Trolltech ASA (or its successors, if any) +** and the KDE Free TQt Foundation. +** +** Please review the following information to ensure GNU General +** Public Licensing requirements will be met: +** http://trolltech.com/products/qt/licenses/licensing/opensource/. +** If you are unsure which license is appropriate for your use, please +** review the following information: +** http://trolltech.com/products/qt/licenses/licensing/licensingoverview +** or contact the sales department at sales@trolltech.com. +** +** This file may be used under the terms of the Q Public License as +** defined by Trolltech ASA and appearing in the file LICENSE.TQPL +** included in the packaging of this file. Licensees holding valid TQt +** Commercial licenses may use this file in accordance with the TQt +** Commercial License Agreement provided with the Software. +** +** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, +** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted +** herein. +** +**********************************************************************/ + +#ifndef TQNAMESPACE_H +#define TQNAMESPACE_H + +#ifndef QT_H +#include "tqglobal.h" +#endif // QT_H + + +class TQColor; +class TQCursor; + + +class TQ_EXPORT TQt { +public: + static const TQColor & color0; + static const TQColor & color1; + static const TQColor & black; + static const TQColor & white; + static const TQColor & darkGray; + static const TQColor & gray; + static const TQColor & lightGray; + static const TQColor & red; + static const TQColor & green; + static const TQColor & blue; + static const TQColor & cyan; + static const TQColor & magenta; + static const TQColor & yellow; + static const TQColor & darkRed; + static const TQColor & darkGreen; + static const TQColor & darkBlue; + static const TQColor & darkCyan; + static const TQColor & darkMagenta; + static const TQColor & darkYellow; + + // documented in tqevent.cpp + enum ButtonState { // mouse/keyboard state values + NoButton = 0x0000, + LeftButton = 0x0001, + RightButton = 0x0002, + MidButton = 0x0004, + HistoryBackButton = 0x0008, + HistoryForwardButton = 0x0010, + MouseButtonMask = 0x001f, + ShiftButton = 0x0100, + ControlButton = 0x0200, + AltButton = 0x0400, + MetaButton = 0x0800, + KeyButtonMask = 0x0f00, + Keypad = 0x4000 + }; + + // documented in tqobject.cpp + // ideally would start at 1, as in TQSizePolicy, but that breaks other things + enum Orientation { + Horizontal = 0, + Vertical + }; + + // documented in tqlistview.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 tqpainter.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 tqpainter.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 tqwidget.cpp + typedef uint WState; + + // TQWidget state flags (internal, barely documented in tqwidget.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 + }; + + // NetWM flags; documented in tqwidget.cpp + typedef uint NFlags; + + // documented in tqwidget.cpp + enum NETWMFlags { +#if defined(TQ_WS_X11) + WX11DisableMove = 0x00000001, + WX11DisableClose = 0x00000002, + WX11DisableResize = 0x00000004, + WX11DisableMinimize = 0x00000008, + WX11DisableMaximize = 0x00000010, + WX11DisableShade = 0x00000020 +#else + WX11DisableMove = 0x00000000, + WX11DisableClose = 0x00000000, + WX11DisableResize = 0x00000000, + WX11DisableMinimize = 0x00000000, + WX11DisableMaximize = 0x00000000, + WX11DisableShade = 0x00000000 +#endif + }; + + // Widget flags2; documented in tqwidget.cpp + typedef uint WFlags; + + // documented in tqwidget.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(TQ_WS_X11) + WX11BypassWM = 0x01000000, + WWinOwnDC = 0x00000000, + WMacNoSheet = 0x00000000, + WMacDrawer = 0x00000000, +#elif defined(TQ_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(TQ_WS_X11) + WStyle_Splash = 0x20000000, +#else + WStyle_Splash = WStyle_NoBorder | WMacNoSheet | WStyle_Tool | WWinOwnDC, +#endif + WNoAutoErase = WRepaintNoErase | WResizeNoErase +#ifndef TQT_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 requirements. + // Documented in tqimage.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 tqpainter.cpp + enum BGMode { // background mode + TransparentMode, + OpaqueMode + }; + +#ifndef TQT_NO_COMPAT + // documented in tqpainter.cpp + enum PaintUnit { // paint unit + PixelUnit, + LoMetricUnit, // OBSOLETE + HiMetricUnit, // OBSOLETE + LoEnglishUnit, // OBSOLETE + HiEnglishUnit, // OBSOLETE + TwipsUnit // OBSOLETE + }; +#endif + + // documented in tqstyle.cpp +#ifdef TQT_NO_COMPAT + enum GUIStyle { + WindowsStyle = 1, // ### TQt 4.0: either remove the obsolete enums or clean up compat vs. + MotifStyle = 4, // ### TQT_NO_COMPAT by reordering or combination into one enum. + GtkStyle = 6 // Gtk compability mode + }; +#else + enum GUIStyle { + MacStyle, // OBSOLETE + WindowsStyle, + Win3Style, // OBSOLETE + PMStyle, // OBSOLETE + MotifStyle, + GtkStyle = 6 // Gtk compability mode + }; +#endif + + // documented in tqkeysequence.cpp + enum SequenceMatch { + NoMatch, + PartialMatch, + Identical + }; + + // documented in tqevent.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 tqevent.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, + + // International input method support (X keycode - 0xEE00). + // Only interesting if you are writing your own input method + + // International & multi-key character composition + Key_Multi_key = 0x1120, // Multi-key character compose + Key_Codeinput = 0x1137, + Key_SingleCandidate = 0x113c, + Key_MultipleCandidate = 0x113d, + Key_PreviousCandidate = 0x113e, + + // Misc Functions + Key_Mode_switch = 0x117e, // Character set switch + //Key_script_switch = 0x117e, // Alias for mode_switch + + // Japanese keyboard support + Key_Kanji = 0x1121, // Kanji, Kanji convert + Key_Muhenkan = 0x1122, // Cancel Conversion + //Key_Henkan_Mode = 0x1123, // Start/Stop Conversion + Key_Henkan = 0x1123, // Alias for Henkan_Mode + Key_Romaji = 0x1124, // to Romaji + Key_Hiragana = 0x1125, // to Hiragana + Key_Katakana = 0x1126, // to Katakana + Key_Hiragana_Katakana = 0x1127, // Hiragana/Katakana toggle + Key_Zenkaku = 0x1128, // to Zenkaku + Key_Hankaku = 0x1129, // to Hankaku + Key_Zenkaku_Hankaku = 0x112a, // Zenkaku/Hankaku toggle + Key_Touroku = 0x112b, // Add to Dictionary + Key_Massyo = 0x112c, // Delete from Dictionary + Key_Kana_Lock = 0x112d, // Kana Lock + Key_Kana_Shift = 0x112e, // Kana Shift + Key_Eisu_Shift = 0x112f, // Alphanumeric Shift + Key_Eisu_toggle = 0x1130, // Alphanumeric toggle + //Key_Kanji_Bangou = 0x1137, // Codeinput + //Key_Zen_Koho = 0x113d, // Multiple/All Candidate(s) + //Key_Mae_Koho = 0x113e, // Previous Candidate + + // Korean keyboard support + // + // In fact, many Korean users need only 2 keys, Key_Hangul and + // Key_Hangul_Hanja. But rest of the keys are good for future. + + Key_Hangul = 0x1131, // Hangul start/stop(toggle) + Key_Hangul_Start = 0x1132, // Hangul start + Key_Hangul_End = 0x1133, // Hangul end, English start + Key_Hangul_Hanja = 0x1134, // Start Hangul->Hanja Conversion + Key_Hangul_Jamo = 0x1135, // Hangul Jamo mode + Key_Hangul_Romaja = 0x1136, // Hangul Romaja mode + //Key_Hangul_Codeinput = 0x1137, // Hangul code input mode + Key_Hangul_Jeonja = 0x1138, // Jeonja mode + Key_Hangul_Banja = 0x1139, // Banja mode + Key_Hangul_PreHanja = 0x113a, // Pre Hanja conversion + Key_Hangul_PostHanja = 0x113b, // Post Hanja conversion + //Key_Hangul_SingleCandidate = 0x113c, // Single candidate + //Key_Hangul_MultipleCandidate = 0x113d, // Multiple candidate + //Key_Hangul_PreviousCandidate = 0x113e, // Previous candidate + Key_Hangul_Special = 0x113f, // Special symbols + //Key_Hangul_switch = 0x117e, // Alias for mode_switch + + // dead keys (X keycode - 0xED00 to avoid the conflict) + Key_Dead_Grave = 0x1250, + Key_Dead_Acute = 0x1251, + Key_Dead_Circumflex = 0x1252, + Key_Dead_Tilde = 0x1253, + Key_Dead_Macron = 0x1254, + Key_Dead_Breve = 0x1255, + Key_Dead_Abovedot = 0x1256, + Key_Dead_Diaeresis = 0x1257, + Key_Dead_Abovering = 0x1258, + Key_Dead_Doubleacute = 0x1259, + Key_Dead_Caron = 0x125a, + Key_Dead_Cedilla = 0x125b, + Key_Dead_Ogonek = 0x125c, + Key_Dead_Iota = 0x125d, + Key_Dead_Voiced_Sound = 0x125e, + Key_Dead_Semivoiced_Sound = 0x125f, + Key_Dead_Belowdot = 0x1260, + Key_Dead_Hook = 0x1261, + Key_Dead_Horn = 0x1262, + + 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 + // + // This is mainly for compatibility - applications and input + // methods should not use the TQt keycodes between 128 and 255, + // but should rather use the TQKeyEvent::text(). See + // TQETWidget::translateKeyEventInternal() for more details. + + 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_MonBrightnessUp = 0x010b2, + Key_MonBrightnessDown = 0x010b3, + Key_KeyboardLightOnOff = 0x010b4, + Key_KeyboardBrightnessUp = 0x010b5, + Key_KeyboardBrightnessDown = 0x010b6, + + Key_MediaLast = 0x1fff, + + Key_unknown = 0xffff + }; + + // documented in tqcommonstyle.cpp + enum ArrowType { + UpArrow, + DownArrow, + LeftArrow, + RightArrow + }; + + // documented in tqpainter.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 tqpainter.cpp + enum PenStyle { // pen style + NoPen, + SolidLine, + DashLine, + DotLine, + DashDotLine, + DashDotDotLine, + FineDotLine, + MPenStyle = 0x0f + }; + + // documented in tqpainter.cpp + enum PenCapStyle { // line endcap style + FlatCap = 0x00, + SquareCap = 0x10, + RoundCap = 0x20, + MPenCapStyle = 0x30 + }; + + // documented in tqpainter.cpp + enum PenJoinStyle { // line join style + MiterJoin = 0x00, + BevelJoin = 0x40, + RoundJoin = 0x80, + MPenJoinStyle = 0xc0 + }; + + // documented in tqpainter.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 tqstyle.cpp + enum UIEffect { + UI_General, + UI_AnimateMenu, + UI_FadeMenu, + UI_AnimateCombo, + UI_AnimateTooltip, + UI_FadeTooltip, + UI_AnimateToolBox + }; + + // documented in tqcursor.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 + + static const TQCursor & arrowCursor; // standard arrow cursor + static const TQCursor & upArrowCursor; // upwards arrow + static const TQCursor & crossCursor; // crosshair + static const TQCursor & waitCursor; // hourglass/watch + static const TQCursor & ibeamCursor; // ibeam/text entry + static const TQCursor & sizeVerCursor; // vertical resize + static const TQCursor & sizeHorCursor; // horizontal resize + static const TQCursor & sizeBDiagCursor; // diagonal resize (/) + static const TQCursor & sizeFDiagCursor; // diagonal resize (\) + static const TQCursor & sizeAllCursor; // all directions resize + static const TQCursor & blankCursor; // blank/invisible cursor + static const TQCursor & splitVCursor; // vertical bar with left-right + // arrows + static const TQCursor & splitHCursor; // horizontal bar with up-down + // arrows + static const TQCursor & pointingHandCursor; // pointing hand + static const TQCursor & forbiddenCursor; // forbidden cursor (slashed circle) + static const TQCursor & whatsThisCursor; // arrow with a question mark + static const TQCursor & busyCursor; // arrow with hourglass + + + enum TextFormat { + PlainText, + RichText, + AutoText, + LogText + }; + + // Documented in tqtextedit.cpp + enum AnchorAttribute { + AnchorName, + AnchorHref + }; + + // Documented in tqmainwindow.cpp + enum Dock { + DockUnmanaged, + DockTornOff, + DockTop, + DockBottom, + DockRight, + DockLeft, + DockMinimized +#ifndef TQT_NO_COMPAT + , + Unmanaged = DockUnmanaged, + TornOff = DockTornOff, + Top = DockTop, + Bottom = DockBottom, + Right = DockRight, + Left = DockLeft, + Minimized = DockMinimized +#endif + }; + // compatibility + typedef Dock ToolBarDock; + + // documented in tqdatetime.cpp + enum DateFormat { + TextDate, // default TQt + ISODate, // ISO 8601 + LocalDate // locale dependent + }; + + // documented in tqdatetime.cpp + enum TimeSpec { + LocalTime, + UTC + }; + + // documented in tqwidget.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 tqstring.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 tqtabwidget.cpp + enum Corner { + TopLeft = 0x00000, + TopRight = 0x00001, + BottomLeft = 0x00002, + BottomRight = 0x00003 + }; + + // "handle" type for system objects. Documented as \internal in + // qapplication.cpp +#if defined(TQ_WS_MAC) + typedef void * HANDLE; +#elif defined(TQ_WS_WIN) + typedef void *HANDLE; +#elif defined(TQ_WS_X11) + typedef unsigned long HANDLE; +#endif +}; + + +class TQ_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 diff --git a/src/kernel/tqobject.cpp b/src/kernel/tqobject.cpp index 756117fff..cb1dfe7ab 100644 --- a/src/kernel/tqobject.cpp +++ b/src/kernel/tqobject.cpp @@ -44,7 +44,7 @@ #include "tqobjectlist.h" #include "tqsignalslotimp.h" #include "tqregexp.h" -#include "ntqmetaobject.h" +#include "tqmetaobject.h" #include #include "qucomextra_p.h" #include "tqptrvector.h" @@ -314,7 +314,7 @@ TQMetaCallEvent::~TQMetaCallEvent() { } /*! - \class TQt ntqnamespace.h + \class TQt tqnamespace.h \brief The TQt class is a namespace for miscellaneous identifiers that need to be global-like. diff --git a/src/kernel/tqobject.h b/src/kernel/tqobject.h index 3ee1c6c19..eb627831d 100644 --- a/src/kernel/tqobject.h +++ b/src/kernel/tqobject.h @@ -47,7 +47,7 @@ #include "tqstring.h" #include "tqevent.h" #include "tqmutex.h" -#include "ntqnamespace.h" +#include "tqnamespace.h" #endif // QT_H #include diff --git a/src/kernel/tqobjectdict.h b/src/kernel/tqobjectdict.h index 8ff8c31f4..c51123054 100644 --- a/src/kernel/tqobjectdict.h +++ b/src/kernel/tqobjectdict.h @@ -42,7 +42,7 @@ #define TQOBJECTDICT_H #ifndef QT_H -#include "ntqmetaobject.h" +#include "tqmetaobject.h" #include "tqasciidict.h" #endif // QT_H diff --git a/src/kernel/tqpixmap.h b/src/kernel/tqpixmap.h index 70609d4a7..1ab6dd0b9 100644 --- a/src/kernel/tqpixmap.h +++ b/src/kernel/tqpixmap.h @@ -45,7 +45,7 @@ #include "tqpaintdevice.h" #include "tqcolor.h" // char*->TQColor conversion #include "tqstring.h" // char*->TQString conversion -#include "ntqnamespace.h" +#include "tqnamespace.h" #endif // QT_H class TQPixmapPrivate; diff --git a/src/kernel/tqpolygonscanner.cpp b/src/kernel/tqpolygonscanner.cpp new file mode 100644 index 000000000..2df631730 --- /dev/null +++ b/src/kernel/tqpolygonscanner.cpp @@ -0,0 +1,937 @@ +/**************************************************************************** +** +** Implementation of TQPolygonScanner class +** +** Created : 000120 +** +** Copyright (C) 1999-2008 Trolltech ASA. All rights reserved. +** +** This file is part of the kernel module of the TQt GUI Toolkit. +** +** This file may be used under the terms of the GNU General +** Public License versions 2.0 or 3.0 as published by the Free +** Software Foundation and appearing in the files LICENSE.GPL2 +** and LICENSE.GPL3 included in the packaging of this file. +** Alternatively you may (at your option) use any later version +** of the GNU General Public License if such license has been +** publicly approved by Trolltech ASA (or its successors, if any) +** and the KDE Free TQt Foundation. +** +** Please review the following information to ensure GNU General +** Public Licensing requirements will be met: +** http://trolltech.com/products/qt/licenses/licensing/opensource/. +** If you are unsure which license is appropriate for your use, please +** review the following information: +** http://trolltech.com/products/qt/licenses/licensing/licensingoverview +** or contact the sales department at sales@trolltech.com. +** +** This file may be used under the terms of the Q Public License as +** defined by Trolltech ASA and appearing in the file LICENSE.TQPL +** included in the packaging of this file. Licensees holding valid TQt +** Commercial licenses may use this file in accordance with the TQt +** Commercial License Agreement provided with the Software. +** +** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, +** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted +** herein. +** +**********************************************************************/ + +#include "tqpolygonscanner.h" +#include "tqpointarray.h" +#include + + +// Based on Xserver code miFillGeneralPoly... +/* + * + * Written by Brian Kelleher; Oct. 1985 + * + * Routine to fill a polygon. Two fill rules are + * supported: frWINDING and frEVENODD. + * + * See fillpoly.h for a complete description of the algorithm. + */ + +/* + * These are the data structures needed to scan + * convert regions. Two different scan conversion + * methods are available -- the even-odd method, and + * the winding number method. + * The even-odd rule states that a point is inside + * the polygon if a ray drawn from that point in any + * direction will pass through an odd number of + * path segments. + * By the winding number rule, a point is decided + * to be inside the polygon if a ray drawn from that + * point in any direction passes through a different + * number of clockwise and counterclockwise path + * segments. + * + * These data structures are adapted somewhat from + * the algorithm in (Foley/Van Dam) for scan converting + * polygons. + * The basic algorithm is to start at the top (smallest y) + * of the polygon, stepping down to the bottom of + * the polygon by incrementing the y coordinate. We + * keep a list of edges which the current scanline crosses, + * sorted by x. This list is called the Active Edge Table (AET) + * As we change the y-coordinate, we update each entry in + * in the active edge table to reflect the edges new xcoord. + * This list must be sorted at each scanline in case + * two edges intersect. + * We also keep a data structure known as the Edge Table (ET), + * which keeps track of all the edges which the current + * scanline has not yet reached. The ET is basically a + * list of ScanLineList structures containing a list of + * edges which are entered at a given scanline. There is one + * ScanLineList per scanline at which an edge is entered. + * When we enter a new edge, we move it from the ET to the AET. + * + * From the AET, we can implement the even-odd rule as in + * (Foley/Van Dam). + * The winding number rule is a little trickier. We also + * keep the EdgeTableEntries in the AET linked by the + * nextWETE (winding EdgeTableEntry) link. This allows + * the edges to be linked just as before for updating + * purposes, but only uses the edges linked by the nextWETE + * link as edges representing spans of the polygon to + * drawn (as with the even-odd rule). + */ + +/* $XConsortium: miscanfill.h,v 1.5 94/04/17 20:27:50 dpw Exp $ */ +/* + +Copyright (c) 1987 X Consortium + +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 X CONSORTIUM 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. + +Except as contained in this notice, the name of the X Consortium shall +not be used in advertising or otherwise to promote the sale, use or +other dealings in this Software without prior written authorization +from the X Consortium. + +*/ + + +/* + * scanfill.h + * + * Written by Brian Kelleher; Jan 1985 + * + * This file contains a few macros to help track + * the edge of a filled object. The object is assumed + * to be filled in scanline order, and thus the + * algorithm used is an extension of Bresenham's line + * drawing algorithm which assumes that y is always the + * major axis. + * Since these pieces of code are the same for any filled shape, + * it is more convenient to gather the library in one + * place, but since these pieces of code are also in + * the inner loops of output primitives, procedure call + * overhead is out of the question. + * See the author for a derivation if needed. + */ + +/* + * In scan converting polygons, we want to choose those pixels + * which are inside the polygon. Thus, we add .5 to the starting + * x coordinate for both left and right edges. Now we choose the + * first pixel which is inside the pgon for the left edge and the + * first pixel which is outside the pgon for the right edge. + * Draw the left pixel, but not the right. + * + * How to add .5 to the starting x coordinate: + * If the edge is moving to the right, then subtract dy from the + * error term from the general form of the algorithm. + * If the edge is moving to the left, then add dy to the error term. + * + * The reason for the difference between edges moving to the left + * and edges moving to the right is simple: If an edge is moving + * to the right, then we want the algorithm to flip immediately. + * If it is moving to the left, then we don't want it to flip until + * we traverse an entire pixel. + */ +#define BRESINITPGON(dy, x1, x2, xStart, d, m, m1, incr1, incr2) { \ + int dx; /* local storage */ \ +\ + /* \ + * if the edge is horizontal, then it is ignored \ + * and assumed not to be processed. Otherwise, do this stuff. \ + */ \ + if ((dy) != 0) { \ + xStart = (x1); \ + dx = (x2) - xStart; \ + if (dx < 0) { \ + m = dx / (dy); \ + m1 = m - 1; \ + incr1 = -2 * dx + 2 * (dy) * m1; \ + incr2 = -2 * dx + 2 * (dy) * m; \ + d = 2 * m * (dy) - 2 * dx - 2 * (dy); \ + } else { \ + m = dx / (dy); \ + m1 = m + 1; \ + incr1 = 2 * dx - 2 * (dy) * m1; \ + incr2 = 2 * dx - 2 * (dy) * m; \ + d = -2 * m * (dy) + 2 * dx; \ + } \ + } \ +} + +#define BRESINCRPGON(d, minval, m, m1, incr1, incr2) { \ + if (m1 > 0) { \ + if (d > 0) { \ + minval += m1; \ + d += incr1; \ + } \ + else { \ + minval += m; \ + d += incr2; \ + } \ + } else {\ + if (d >= 0) { \ + minval += m1; \ + d += incr1; \ + } \ + else { \ + minval += m; \ + d += incr2; \ + } \ + } \ +} + + +/* + * This structure contains all of the information needed + * to run the bresenham algorithm. + * The variables may be hardcoded into the declarations + * instead of using this structure to make use of + * register declarations. + */ +typedef struct { + int minor; /* minor axis */ + int d; /* decision variable */ + int m, m1; /* slope and slope+1 */ + int incr1, incr2; /* error increments */ +} BRESINFO; + + +#define BRESINITPGONSTRUCT(dmaj, min1, min2, bres) \ + BRESINITPGON(dmaj, min1, min2, bres.minor, bres.d, \ + bres.m, bres.m1, bres.incr1, bres.incr2) + +#define BRESINCRPGONSTRUCT(bres) \ + BRESINCRPGON(bres.d, bres.minor, bres.m, bres.m1, bres.incr1, bres.incr2) + + +typedef struct _EdgeTableEntry { + int ymax; /* ycoord at which we exit this edge. */ + BRESINFO bres; /* Bresenham info to run the edge */ + struct _EdgeTableEntry *next; /* next in the list */ + struct _EdgeTableEntry *back; /* for insertion sort */ + struct _EdgeTableEntry *nextWETE; /* for winding num rule */ + int ClockWise; /* flag for winding number rule */ +} EdgeTableEntry; + + +typedef struct _ScanLineList{ + int scanline; /* the scanline represented */ + EdgeTableEntry *edgelist; /* header node */ + struct _ScanLineList *next; /* next in the list */ +} ScanLineList; + + +typedef struct { + int ymax; /* ymax for the polygon */ + int ymin; /* ymin for the polygon */ + ScanLineList scanlines; /* header node */ +} EdgeTable; + + +/* + * Here is a struct to help with storage allocation + * so we can allocate a big chunk at a time, and then take + * pieces from this heap when we need to. + */ +#define SLLSPERBLOCK 25 + +typedef struct _ScanLineListBlock { + ScanLineList SLLs[SLLSPERBLOCK]; + struct _ScanLineListBlock *next; +} ScanLineListBlock; + +/* + * number of points to buffer before sending them off + * to scanlines() : Must be an even number + */ +#define NUMPTSTOBUFFER 200 + +/* + * + * a few macros for the inner loops of the fill code where + * performance considerations don't allow a procedure call. + * + * Evaluate the given edge at the given scanline. + * If the edge has expired, then we leave it and fix up + * the active edge table; otherwise, we increment the + * x value to be ready for the next scanline. + * The winding number rule is in effect, so we must notify + * the caller when the edge has been removed so he + * can reorder the Winding Active Edge Table. + */ +#define EVALUATEEDGEWINDING(pAET, pPrevAET, y, fixWAET) { \ + if (pAET->ymax == y) { /* leaving this edge */ \ + pPrevAET->next = pAET->next; \ + pAET = pPrevAET->next; \ + fixWAET = 1; \ + if (pAET) \ + pAET->back = pPrevAET; \ + } \ + else { \ + BRESINCRPGONSTRUCT(pAET->bres); \ + pPrevAET = pAET; \ + pAET = pAET->next; \ + } \ +} + + +/* + * Evaluate the given edge at the given scanline. + * If the edge has expired, then we leave it and fix up + * the active edge table; otherwise, we increment the + * x value to be ready for the next scanline. + * The even-odd rule is in effect. + */ +#define EVALUATEEDGEEVENODD(pAET, pPrevAET, y) { \ + if (pAET->ymax == y) { /* leaving this edge */ \ + pPrevAET->next = pAET->next; \ + pAET = pPrevAET->next; \ + if (pAET) \ + pAET->back = pPrevAET; \ + } \ + else { \ + BRESINCRPGONSTRUCT(pAET->bres) \ + pPrevAET = pAET; \ + pAET = pAET->next; \ + } \ +} + +/*********************************************************** + +Copyright (c) 1987 X Consortium + +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 +X CONSORTIUM 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. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + + +Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. + + All Rights Reserved + +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, and that the name of Digital not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +******************************************************************/ + +#define MAXINT 0x7fffffff +#define MININT -MAXINT + +/* + * fillUtils.c + * + * Written by Brian Kelleher; Oct. 1985 + * + * This module contains all of the utility functions + * needed to scan convert a polygon. + * + */ +/* + * InsertEdgeInET + * + * Insert the given edge into the edge table. + * First we must find the correct bucket in the + * Edge table, then find the right slot in the + * bucket. Finally, we can insert it. + * + */ +static bool +miInsertEdgeInET(EdgeTable *ET, EdgeTableEntry *ETE, + int scanline, ScanLineListBlock **SLLBlock, int *iSLLBlock) +{ + EdgeTableEntry *start, *prev; + ScanLineList *pSLL, *pPrevSLL; + ScanLineListBlock *tmpSLLBlock; + + /* + * find the right bucket to put the edge into + */ + pPrevSLL = &ET->scanlines; + pSLL = pPrevSLL->next; + while (pSLL && (pSLL->scanline < scanline)) + { + pPrevSLL = pSLL; + pSLL = pSLL->next; + } + + /* + * reassign pSLL (pointer to ScanLineList) if necessary + */ + if ((!pSLL) || (pSLL->scanline > scanline)) + { + if (*iSLLBlock > SLLSPERBLOCK-1) + { + tmpSLLBlock = + (ScanLineListBlock *)malloc(sizeof(ScanLineListBlock)); + if (!tmpSLLBlock) + return FALSE; + (*SLLBlock)->next = tmpSLLBlock; + tmpSLLBlock->next = 0; + *SLLBlock = tmpSLLBlock; + *iSLLBlock = 0; + } + pSLL = &((*SLLBlock)->SLLs[(*iSLLBlock)++]); + + pSLL->next = pPrevSLL->next; + pSLL->edgelist = 0; + pPrevSLL->next = pSLL; + } + pSLL->scanline = scanline; + + /* + * now insert the edge in the right bucket + */ + prev = 0; + start = pSLL->edgelist; + while (start && (start->bres.minor < ETE->bres.minor)) + { + prev = start; + start = start->next; + } + ETE->next = start; + + if (prev) + prev->next = ETE; + else + pSLL->edgelist = ETE; + return TRUE; +} + +/* + * CreateEdgeTable + * + * This routine creates the edge table for + * scan converting polygons. + * The Edge Table (ET) looks like: + * + * EdgeTable + * -------- + * | ymax | ScanLineLists + * |scanline|-->------------>-------------->... + * -------- |scanline| |scanline| + * |edgelist| |edgelist| + * --------- --------- + * | | + * | | + * V V + * list of ETEs list of ETEs + * + * where ETE is an EdgeTableEntry data structure, + * and there is one ScanLineList per scanline at + * which an edge is initially entered. + * + */ + +typedef struct { +#if defined(Q_OS_MAC) + int y, x; +#else + int x, y; +#endif + +} DDXPointRec, *DDXPointPtr; + +/* + * Clean up our act. + */ +static void +miFreeStorage(ScanLineListBlock *pSLLBlock) +{ + ScanLineListBlock *tmpSLLBlock; + + while (pSLLBlock) + { + tmpSLLBlock = pSLLBlock->next; + free(pSLLBlock); + pSLLBlock = tmpSLLBlock; + } +} + +static bool +miCreateETandAET(int count, DDXPointPtr pts, EdgeTable *ET, + EdgeTableEntry *AET, EdgeTableEntry *pETEs, ScanLineListBlock *pSLLBlock) +{ + DDXPointPtr top, bottom; + DDXPointPtr PrevPt, CurrPt; + int iSLLBlock = 0; + + int dy; + + if (count < 2) return TRUE; + + /* + * initialize the Active Edge Table + */ + AET->next = 0; + AET->back = 0; + AET->nextWETE = 0; + AET->bres.minor = MININT; + + /* + * initialize the Edge Table. + */ + ET->scanlines.next = 0; + ET->ymax = MININT; + ET->ymin = MAXINT; + pSLLBlock->next = 0; + + PrevPt = &pts[count-1]; + + /* + * for each vertex in the array of points. + * In this loop we are dealing with two vertices at + * a time -- these make up one edge of the polygon. + */ + while (count--) + { + CurrPt = pts++; + + /* + * find out which point is above and which is below. + */ + if (PrevPt->y > CurrPt->y) + { + bottom = PrevPt, top = CurrPt; + pETEs->ClockWise = 0; + } + else + { + bottom = CurrPt, top = PrevPt; + pETEs->ClockWise = 1; + } + + /* + * don't add horizontal edges to the Edge table. + */ + if (bottom->y != top->y) + { + pETEs->ymax = bottom->y-1; /* -1 so we don't get last scanline */ + + /* + * initialize integer edge algorithm + */ + dy = bottom->y - top->y; + BRESINITPGONSTRUCT(dy, top->x, bottom->x, pETEs->bres) + + if (!miInsertEdgeInET(ET, pETEs, top->y, &pSLLBlock, &iSLLBlock)) + { + miFreeStorage(pSLLBlock->next); + return FALSE; + } + + ET->ymax = TQMAX(ET->ymax, PrevPt->y); + ET->ymin = TQMIN(ET->ymin, PrevPt->y); + pETEs++; + } + + PrevPt = CurrPt; + } + return TRUE; +} + +/* + * loadAET + * + * This routine moves EdgeTableEntries from the + * EdgeTable into the Active Edge Table, + * leaving them sorted by smaller x coordinate. + * + */ + +static void +miloadAET(EdgeTableEntry *AET, EdgeTableEntry *ETEs) +{ + EdgeTableEntry *pPrevAET; + EdgeTableEntry *tmp; + + pPrevAET = AET; + AET = AET->next; + while (ETEs) + { + while (AET && (AET->bres.minor < ETEs->bres.minor)) + { + pPrevAET = AET; + AET = AET->next; + } + tmp = ETEs->next; + ETEs->next = AET; + if (AET) + AET->back = ETEs; + ETEs->back = pPrevAET; + pPrevAET->next = ETEs; + pPrevAET = ETEs; + + ETEs = tmp; + } +} + +/* + * computeWAET + * + * This routine links the AET by the + * nextWETE (winding EdgeTableEntry) link for + * use by the winding number rule. The final + * Active Edge Table (AET) might look something + * like: + * + * AET + * ---------- --------- --------- + * |ymax | |ymax | |ymax | + * | ... | |... | |... | + * |next |->|next |->|next |->... + * |nextWETE| |nextWETE| |nextWETE| + * --------- --------- ^-------- + * | | | + * V-------------------> V---> ... + * + */ +static void +micomputeWAET(EdgeTableEntry *AET) +{ + EdgeTableEntry *pWETE; + int inside = 1; + int isInside = 0; + + AET->nextWETE = 0; + pWETE = AET; + AET = AET->next; + while (AET) + { + if (AET->ClockWise) + isInside++; + else + isInside--; + + if ((!inside && !isInside) || + ( inside && isInside)) + { + pWETE->nextWETE = AET; + pWETE = AET; + inside = !inside; + } + AET = AET->next; + } + pWETE->nextWETE = 0; +} + +/* + * InsertionSort + * + * Just a simple insertion sort using + * pointers and back pointers to sort the Active + * Edge Table. + * + */ + +static int +miInsertionSort(EdgeTableEntry *AET) +{ + EdgeTableEntry *pETEchase; + EdgeTableEntry *pETEinsert; + EdgeTableEntry *pETEchaseBackTMP; + int changed = 0; + + AET = AET->next; + while (AET) + { + pETEinsert = AET; + pETEchase = AET; + while (pETEchase->back->bres.minor > AET->bres.minor) + pETEchase = pETEchase->back; + + AET = AET->next; + if (pETEchase != pETEinsert) + { + pETEchaseBackTMP = pETEchase->back; + pETEinsert->back->next = AET; + if (AET) + AET->back = pETEinsert->back; + pETEinsert->next = pETEchase; + pETEchase->back->next = pETEinsert; + pETEchase->back = pETEinsert; + pETEinsert->back = pETEchaseBackTMP; + changed = 1; + } + } + return(changed); +} + +/*! + \overload +*/ +void TQPolygonScanner::scan(const TQPointArray& pa, bool winding, int index, int npoints) +{ + scan( pa, winding, index, npoints, TRUE ); +} + +/*! + \overload + + If \a stitchable is FALSE, the right and bottom edges of the + polygon are included. This causes adjacent polygons to overlap. +*/ +void TQPolygonScanner::scan(const TQPointArray& pa, bool winding, int index, int npoints, bool stitchable) +{ + scan( pa, winding, index, npoints, + stitchable ? Edge(Left+Top) : Edge(Left+Right+Top+Bottom) ); +} + +/*! + Calls processSpans() for all scanlines of the polygon defined by + \a npoints starting at \a index in \a pa. + + If \a winding is TRUE, the Winding algorithm rather than the + Odd-Even rule is used. + + The \a edges is any bitwise combination of: + \list + \i \c TQPolygonScanner::Left + \i \c TQPolygonScanner::Right + \i \c TQPolygonScanner::Top + \i \c TQPolygonScanner::Bottom + \endlist + \a edges determines which edges are included. + + \warning The edges feature does not work properly. + +*/ +void TQPolygonScanner::scan( const TQPointArray& pa, bool winding, int index, int npoints, Edge edges ) +{ + + + DDXPointPtr ptsIn = (DDXPointPtr)pa.data(); + ptsIn += index; + EdgeTableEntry *pAET; /* the Active Edge Table */ + int y; /* the current scanline */ + int nPts = 0; /* number of pts in buffer */ + EdgeTableEntry *pWETE; /* Winding Edge Table */ + ScanLineList *pSLL; /* Current ScanLineList */ + DDXPointPtr ptsOut; /* ptr to output buffers */ + int *width; + DDXPointRec FirstPoint[NUMPTSTOBUFFER]; /* the output buffers */ + int FirstWidth[NUMPTSTOBUFFER]; + EdgeTableEntry *pPrevAET; /* previous AET entry */ + EdgeTable ET; /* Edge Table header node */ + EdgeTableEntry AET; /* Active ET header node */ + EdgeTableEntry *pETEs; /* Edge Table Entries buff */ + ScanLineListBlock SLLBlock; /* header for ScanLineList */ + int fixWAET = 0; + int edge_l = (edges & Left) ? 1 : 0; + int edge_r = (edges & Right) ? 1 : 0; + int edge_t = 1; //#### (edges & Top) ? 1 : 0; + int edge_b = (edges & Bottom) ? 1 : 0; + + if (npoints == -1) + npoints = pa.size(); + + if (npoints < 3) + return; + + if(!(pETEs = (EdgeTableEntry *) + malloc(sizeof(EdgeTableEntry) * npoints))) + return; + ptsOut = FirstPoint; + width = FirstWidth; + if (!miCreateETandAET(npoints, ptsIn, &ET, &AET, pETEs, &SLLBlock)) + { + free(pETEs); + return; + } + pSLL = ET.scanlines.next; + + if (!winding) + { + /* + * for each scanline + */ + for (y = ET.ymin+1-edge_t; y < ET.ymax+edge_b; y++) + { + /* + * Add a new edge to the active edge table when we + * get to the next edge. + */ + if (pSLL && y == pSLL->scanline) + { + miloadAET(&AET, pSLL->edgelist); + pSLL = pSLL->next; + } + pPrevAET = &AET; + pAET = AET.next; + + /* + * for each active edge + */ + while (pAET) + { + ptsOut->x = pAET->bres.minor + 1 - edge_l; + ptsOut++->y = y; + *width++ = pAET->next->bres.minor - pAET->bres.minor + - 1 + edge_l + edge_r; + nPts++; + + /* + * send out the buffer when its full + */ + if (nPts == NUMPTSTOBUFFER) + { + processSpans( nPts, (TQPoint*)FirstPoint, FirstWidth ); + ptsOut = FirstPoint; + width = FirstWidth; + nPts = 0; + } + EVALUATEEDGEEVENODD(pAET, pPrevAET, y) + EVALUATEEDGEEVENODD(pAET, pPrevAET, y) + } + miInsertionSort(&AET); + } + } + else /* default to WindingNumber */ + { + /* + * for each scanline + */ + for (y = ET.ymin+1-edge_t; y < ET.ymax+edge_b; y++) + { + /* + * Add a new edge to the active edge table when we + * get to the next edge. + */ + if (pSLL && y == pSLL->scanline) + { + miloadAET(&AET, pSLL->edgelist); + micomputeWAET(&AET); + pSLL = pSLL->next; + } + pPrevAET = &AET; + pAET = AET.next; + pWETE = pAET; + + /* + * for each active edge + */ + while (pAET) + { + /* + * if the next edge in the active edge table is + * also the next edge in the winding active edge + * table. + */ + if (pWETE == pAET) + { + ptsOut->x = pAET->bres.minor + 1 - edge_l; + ptsOut++->y = y; + *width++ = pAET->nextWETE->bres.minor - pAET->bres.minor - 1 + edge_l + edge_r; + nPts++; + + /* + * send out the buffer + */ + if (nPts == NUMPTSTOBUFFER) + { + processSpans( nPts, (TQPoint*)FirstPoint, FirstWidth ); + ptsOut = FirstPoint; + width = FirstWidth; + nPts = 0; + } + + pWETE = pWETE->nextWETE; + while (pWETE != pAET) { + EVALUATEEDGEWINDING(pAET, pPrevAET, y, fixWAET) + } + pWETE = pWETE->nextWETE; + } + EVALUATEEDGEWINDING(pAET, pPrevAET, y, fixWAET) + } + + /* + * reevaluate the Winding active edge table if we + * just had to resort it or if we just exited an edge. + */ + if (miInsertionSort(&AET) || fixWAET) + { + micomputeWAET(&AET); + fixWAET = 0; + } + } + } + + /* + * Get any spans that we missed by buffering + */ + + + processSpans( nPts, (TQPoint*)FirstPoint, FirstWidth ); + free(pETEs); + miFreeStorage(SLLBlock.next); +} +/***** END OF X11-based CODE *****/ + + diff --git a/src/kernel/tqpolygonscanner.h b/src/kernel/tqpolygonscanner.h new file mode 100644 index 000000000..2ab2c8e37 --- /dev/null +++ b/src/kernel/tqpolygonscanner.h @@ -0,0 +1,61 @@ +/**************************************************************************** +** +** Definition of TQPolygonScanner class +** +** Created : 000120 +** +** Copyright (C) 1999-2008 Trolltech ASA. All rights reserved. +** +** This file is part of the kernel module of the TQt GUI Toolkit. +** +** This file may be used under the terms of the GNU General +** Public License versions 2.0 or 3.0 as published by the Free +** Software Foundation and appearing in the files LICENSE.GPL2 +** and LICENSE.GPL3 included in the packaging of this file. +** Alternatively you may (at your option) use any later version +** of the GNU General Public License if such license has been +** publicly approved by Trolltech ASA (or its successors, if any) +** and the KDE Free TQt Foundation. +** +** Please review the following information to ensure GNU General +** Public Licensing requirements will be met: +** http://trolltech.com/products/qt/licenses/licensing/opensource/. +** If you are unsure which license is appropriate for your use, please +** review the following information: +** http://trolltech.com/products/qt/licenses/licensing/licensingoverview +** or contact the sales department at sales@trolltech.com. +** +** This file may be used under the terms of the Q Public License as +** defined by Trolltech ASA and appearing in the file LICENSE.TQPL +** included in the packaging of this file. Licensees holding valid TQt +** Commercial licenses may use this file in accordance with the TQt +** Commercial License Agreement provided with the Software. +** +** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, +** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted +** herein. +** +**********************************************************************/ + +#ifndef TQPOLYGONSCANNER_H +#define TQPOLYGONSCANNER_H + +#ifndef QT_H +#include "tqglobal.h" +#endif // QT_H + +class TQPointArray; +class TQPoint; + +class TQ_EXPORT TQPolygonScanner { +public: + // BIC: fix for 3.0 + void scan( const TQPointArray& pa, bool winding, int index=0, int npoints=-1 ); + void scan( const TQPointArray& pa, bool winding, int index, int npoints, bool stitchable ); + enum Edge { Left=1, Right=2, Top=4, Bottom=8 }; + void scan( const TQPointArray& pa, bool winding, int index, int npoints, Edge edges ); + virtual void processSpans( int n, TQPoint* point, int* width )=0; +}; + +#endif // TQPOLYGONSCANNER_H diff --git a/src/kernel/tqprinter_unix.cpp b/src/kernel/tqprinter_unix.cpp index b5ae63926..06eeabbdd 100644 --- a/src/kernel/tqprinter_unix.cpp +++ b/src/kernel/tqprinter_unix.cpp @@ -53,7 +53,7 @@ static inline int qt_open(const char *pathname, int flags, mode_t mode) #include "tqpaintdevicemetrics.h" #include "qpsprinter_p.h" -#include "ntqprintdialog.h" +#include "tqprintdialog.h" #include "ntqapplication.h" #include "tqprinter_p.h" diff --git a/src/kernel/tqsignal.cpp b/src/kernel/tqsignal.cpp index 3be5bb960..073b61949 100644 --- a/src/kernel/tqsignal.cpp +++ b/src/kernel/tqsignal.cpp @@ -39,7 +39,7 @@ **********************************************************************/ #include "tqsignal.h" -#include "ntqmetaobject.h" +#include "tqmetaobject.h" #include "tqguardedptr.h" /*! diff --git a/src/kernel/tqsimplerichtext.h b/src/kernel/tqsimplerichtext.h index 8d3d9ad8b..45ddd6b10 100644 --- a/src/kernel/tqsimplerichtext.h +++ b/src/kernel/tqsimplerichtext.h @@ -42,7 +42,7 @@ #define TQSIMPLERICHTEXT_H #ifndef QT_H -#include "ntqnamespace.h" +#include "tqnamespace.h" #include "tqstring.h" #include "tqregion.h" #endif // QT_H diff --git a/src/kernel/tqsize.h b/src/kernel/tqsize.h index 6bfb60865..a49dd25a9 100644 --- a/src/kernel/tqsize.h +++ b/src/kernel/tqsize.h @@ -49,7 +49,7 @@ class TQ_EXPORT TQSize // ### Make TQSize inherit TQt in TQt 4.0 { public: - // ### Move this enum to ntqnamespace.h in TQt 4.0 + // ### Move this enum to tqnamespace.h in TQt 4.0 enum ScaleMode { ScaleFree, ScaleMin, diff --git a/src/kernel/tqtextengine_p.h b/src/kernel/tqtextengine_p.h index d1a467f2b..d092a3e7d 100644 --- a/src/kernel/tqtextengine_p.h +++ b/src/kernel/tqtextengine_p.h @@ -40,7 +40,7 @@ #ifndef QT_H #include "tqglobal.h" #include "tqstring.h" -#include "ntqnamespace.h" +#include "tqnamespace.h" #include #endif // QT_H diff --git a/src/kernel/tqtextlayout_p.h b/src/kernel/tqtextlayout_p.h index 58dced19b..a95f28e78 100644 --- a/src/kernel/tqtextlayout_p.h +++ b/src/kernel/tqtextlayout_p.h @@ -39,7 +39,7 @@ #ifndef QT_H #include "tqstring.h" -#include "ntqnamespace.h" +#include "tqnamespace.h" #include "tqrect.h" #endif // QT_H diff --git a/src/kernel/tqttdeintegration_x11.cpp b/src/kernel/tqttdeintegration_x11.cpp index 0b8e794c2..48aeb0dc9 100644 --- a/src/kernel/tqttdeintegration_x11.cpp +++ b/src/kernel/tqttdeintegration_x11.cpp @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include bool TQTDEIntegration::inited = false; diff --git a/src/kernel/tqwidget.cpp b/src/kernel/tqwidget.cpp index 4aa4a09ed..e2e6c44f8 100644 --- a/src/kernel/tqwidget.cpp +++ b/src/kernel/tqwidget.cpp @@ -54,7 +54,7 @@ #include "tqstylefactory.h" #include "tqcleanuphandler.h" #include "tqstyle.h" -#include "ntqmetaobject.h" +#include "tqmetaobject.h" #include "tqguardedptr.h" #if defined(TQT_THREAD_SUPPORT) #include "tqthread.h" diff --git a/src/kernel/tqwidget_x11.cpp b/src/kernel/tqwidget_x11.cpp index b7136818f..cc16871a7 100644 --- a/src/kernel/tqwidget_x11.cpp +++ b/src/kernel/tqwidget_x11.cpp @@ -40,7 +40,7 @@ #include "ntqapplication.h" #include "qapplication_p.h" -#include "ntqnamespace.h" +#include "tqnamespace.h" #include "tqpaintdevicemetrics.h" #include "tqpainter.h" #include "tqbitmap.h" diff --git a/src/moc/moc.y b/src/moc/moc.y index 1691c5805..a393aa868 100644 --- a/src/moc/moc.y +++ b/src/moc/moc.y @@ -646,10 +646,10 @@ int tmpYYStart; // Used to store the lexers current mode int tmpYYStart2; // Used to store the lexers current mode // (if tmpYYStart is already used) -// if the format revision changes, you MUST change it in ntqmetaobject.h too +// if the format revision changes, you MUST change it in tqmetaobject.h too const int formatRevision = 26; // moc output format revision -// if the flags change, you HAVE to change it in ntqmetaobject.h too +// if the flags change, you HAVE to change it in tqmetaobject.h too enum Flags { Invalid = 0x00000000, Readable = 0x00000001, @@ -2904,7 +2904,7 @@ void generateClass() // generate C++ source code for a class g->includeFiles.next(); } } - fprintf( out, "#include <%sntqmetaobject.h>\n", (const char*)g->qtPath ); + fprintf( out, "#include <%stqmetaobject.h>\n", (const char*)g->qtPath ); fprintf( out, "#include <%sntqapplication.h>\n\n", (const char*)g->qtPath ); fprintf( out, "#include <%sprivate/qucomextra_p.h>\n", (const char*)g->qtPath ); fprintf( out, "#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != %d)\n", formatRevision ); diff --git a/src/moc/moc_yacc.cpp b/src/moc/moc_yacc.cpp index dcf19ab2a..ae23163da 100644 --- a/src/moc/moc_yacc.cpp +++ b/src/moc/moc_yacc.cpp @@ -659,10 +659,10 @@ int tmpYYStart; // Used to store the lexers current mode int tmpYYStart2; // Used to store the lexers current mode // (if tmpYYStart is already used) -// if the format revision changes, you MUST change it in ntqmetaobject.h too +// if the format revision changes, you MUST change it in tqmetaobject.h too const int formatRevision = 26; // moc output format revision -// if the flags change, you HAVE to change it in ntqmetaobject.h too +// if the flags change, you HAVE to change it in tqmetaobject.h too enum Flags { Invalid = 0x00000000, Readable = 0x00000001, @@ -5779,7 +5779,7 @@ void generateClass() // generate C++ source code for a class g->includeFiles.next(); } } - fprintf( out, "#include <%sntqmetaobject.h>\n", (const char*)g->qtPath ); + fprintf( out, "#include <%stqmetaobject.h>\n", (const char*)g->qtPath ); fprintf( out, "#include <%sntqapplication.h>\n\n", (const char*)g->qtPath ); fprintf( out, "#include <%sprivate/qucomextra_p.h>\n", (const char*)g->qtPath ); fprintf( out, "#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != %d)\n", formatRevision ); diff --git a/src/sql/tqsqlerror.cpp b/src/sql/tqsqlerror.cpp index 1b9f69ca8..55d98202d 100644 --- a/src/sql/tqsqlerror.cpp +++ b/src/sql/tqsqlerror.cpp @@ -39,7 +39,7 @@ **********************************************************************/ #include "tqsqlerror.h" -#include +#include #ifndef TQT_NO_SQL diff --git a/src/sql/tqsqlmanager_p.cpp b/src/sql/tqsqlmanager_p.cpp index 4b9597319..754d572a9 100644 --- a/src/sql/tqsqlmanager_p.cpp +++ b/src/sql/tqsqlmanager_p.cpp @@ -48,7 +48,7 @@ #include "tqsqlform.h" #include "tqsqldriver.h" #include "tqstring.h" -#include "ntqmessagebox.h" +#include "tqmessagebox.h" #include "tqbitarray.h" //#define QT_DEBUG_DATAMANAGER diff --git a/src/sql/tqsqlpropertymap.cpp b/src/sql/tqsqlpropertymap.cpp index 81a0dd4a5..55a9f6843 100644 --- a/src/sql/tqsqlpropertymap.cpp +++ b/src/sql/tqsqlpropertymap.cpp @@ -44,7 +44,7 @@ #include "tqwidget.h" #include "tqcleanuphandler.h" -#include "ntqmetaobject.h" +#include "tqmetaobject.h" #include "tqmap.h" class TQSqlPropertyMapPrivate diff --git a/src/sql/tqsqlrecord.cpp b/src/sql/tqsqlrecord.cpp index dd4432aa1..9c567c126 100644 --- a/src/sql/tqsqlrecord.cpp +++ b/src/sql/tqsqlrecord.cpp @@ -45,7 +45,7 @@ #include "tqregexp.h" #include "tqvaluevector.h" #include "ntqshared.h" -#include "ntqnamespace.h" +#include "tqnamespace.h" class TQSqlRecordPrivate { diff --git a/src/styles/qt_styles.pri b/src/styles/qt_styles.pri index b0daa8513..eedd54754 100644 --- a/src/styles/qt_styles.pri +++ b/src/styles/qt_styles.pri @@ -16,9 +16,9 @@ styles { x11|embedded|!macx-*:styles -= mac contains( styles, mac ) { - HEADERS +=$$STYLES_H/qmacstyle_mac.h \ - $$STYLES_H/qmacstylepixmaps_mac_p.h - SOURCES +=$$STYLES_CPP/qmacstyle_mac.cpp + HEADERS +=$$STYLES_H/tqmacstyle_mac.h \ + $$STYLES_H/tqmacstylepixmaps_mac_p.h + SOURCES +=$$STYLES_CPP/tqmacstyle_mac.cpp HEADERS *= $$STYLES_CPP/qaquastyle_p.h SOURCES *= $$STYLES_CPP/qaquastyle_p.cpp diff --git a/src/styles/tqcommonstyle.cpp b/src/styles/tqcommonstyle.cpp index 6158189d5..287bc5e8b 100644 --- a/src/styles/tqcommonstyle.cpp +++ b/src/styles/tqcommonstyle.cpp @@ -59,7 +59,7 @@ #include "tqdockarea.h" #include "tqheader.h" #include "tqspinbox.h" -#include "ntqrangecontrol.h" +#include "tqrangecontrol.h" #include "tqgroupbox.h" #include "tqslider.h" #include "tqlistview.h" @@ -170,7 +170,7 @@ static void tqt_style_control_element_data_null_cleanup() { TQStyleControlElementData_null =0; } -#include +#include // Keep in sync with duplicate definition in tqobject.cpp class TQStyleControlElementDataPrivate { diff --git a/src/styles/tqinterlacestyle.cpp b/src/styles/tqinterlacestyle.cpp index 8ddd55940..3c86f0638 100644 --- a/src/styles/tqinterlacestyle.cpp +++ b/src/styles/tqinterlacestyle.cpp @@ -52,7 +52,7 @@ #include "tqlabel.h" #include "tqpushbutton.h" #include "tqwidget.h" -#include "ntqrangecontrol.h" +#include "tqrangecontrol.h" #include "tqscrollbar.h" #include "tqlistbox.h" diff --git a/src/styles/tqstylefactory.cpp b/src/styles/tqstylefactory.cpp index 7a5706c64..29a3ad5ec 100644 --- a/src/styles/tqstylefactory.cpp +++ b/src/styles/tqstylefactory.cpp @@ -64,7 +64,7 @@ #if !defined( TQT_NO_STYLE_MAC ) && defined( TQ_WS_MAC ) TQString p2qstring(const unsigned char *c); //tqglobal.cpp #include "qt_mac.h" -#include "qmacstyle_mac.h" +#include "tqmacstyle_mac.h" #endif #include diff --git a/src/styles/tqwindowsstyle.cpp b/src/styles/tqwindowsstyle.cpp index 284da1617..03fc62dd5 100644 --- a/src/styles/tqwindowsstyle.cpp +++ b/src/styles/tqwindowsstyle.cpp @@ -54,7 +54,7 @@ #include "tqcombobox.h" #include "tqlistbox.h" #include "tqwidget.h" -#include "ntqrangecontrol.h" +#include "tqrangecontrol.h" #include "tqscrollbar.h" #include "tqslider.h" #include "tqtabwidget.h" diff --git a/src/tools/tqdatetime.h b/src/tools/tqdatetime.h index 545f1f56b..874246bf8 100644 --- a/src/tools/tqdatetime.h +++ b/src/tools/tqdatetime.h @@ -43,7 +43,7 @@ #ifndef QT_H #include "tqstring.h" -#include "ntqnamespace.h" +#include "tqnamespace.h" #endif // QT_H #include diff --git a/src/tools/tqfeatures.txt b/src/tools/tqfeatures.txt index ef466fd36..d6a05abb4 100644 --- a/src/tools/tqfeatures.txt +++ b/src/tools/tqfeatures.txt @@ -988,7 +988,7 @@ SeeAlso: ??? Feature: MESSAGEBOX Section: Widgets Requires: DIALOG PUSHBUTTON LABEL -Name: QMessageBox +Name: TQMessageBox SeeAlso: ??? Feature: TABDIALOG @@ -1018,7 +1018,7 @@ SeeAlso: ??? Feature: PRINTDIALOG Section: Widgets Requires: DIALOG LISTVIEW PRINTER COMBOBOX LABEL BUTTONGROUP SPINBOX RADIOBUTTON PUSHBUTTON DIR -Name: QPrintDialog +Name: TQPrintDialog SeeAlso: ??? Feature: PROGRESSDIALOG diff --git a/src/tools/tqlocale.cpp b/src/tools/tqlocale.cpp index 57ddcfb3f..77f3cae19 100644 --- a/src/tools/tqlocale.cpp +++ b/src/tools/tqlocale.cpp @@ -45,7 +45,7 @@ #include "tqlocale.h" #include "tqlocale_p.h" -#include "ntqnamespace.h" +#include "tqnamespace.h" #ifdef QT_QLOCALE_USES_FCVT # include diff --git a/src/widgets/ntqrangecontrol.h b/src/widgets/ntqrangecontrol.h deleted file mode 100644 index 39f2e2abc..000000000 --- a/src/widgets/ntqrangecontrol.h +++ /dev/null @@ -1,194 +0,0 @@ -/**************************************************************************** -** -** Definition of TQRangeControl class -** -** Created : 940427 -** -** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. -** -** This file is part of the widgets module of the TQt GUI Toolkit. -** -** This file may be used under the terms of the GNU General -** Public License versions 2.0 or 3.0 as published by the Free -** Software Foundation and appearing in the files LICENSE.GPL2 -** and LICENSE.GPL3 included in the packaging of this file. -** Alternatively you may (at your option) use any later version -** of the GNU General Public License if such license has been -** publicly approved by Trolltech ASA (or its successors, if any) -** and the KDE Free TQt Foundation. -** -** Please review the following information to ensure GNU General -** Public Licensing requirements will be met: -** http://trolltech.com/products/qt/licenses/licensing/opensource/. -** If you are unsure which license is appropriate for your use, please -** review the following information: -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview -** or contact the sales department at sales@trolltech.com. -** -** This file may be used under the terms of the Q Public License as -** defined by Trolltech ASA and appearing in the file LICENSE.TQPL -** included in the packaging of this file. Licensees holding valid TQt -** Commercial licenses may use this file in accordance with the TQt -** Commercial License Agreement provided with the Software. -** -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted -** herein. -** -**********************************************************************/ - -#ifndef TQRANGECONTROL_H -#define TQRANGECONTROL_H - -#ifndef QT_H -#include "tqglobal.h" -#include "tqframe.h" -#endif // QT_H - -#ifndef TQT_NO_RANGECONTROL - - -class TQRangeControlPrivate; - - -class TQ_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(TQ_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 // TQT_NO_RANGECONTROL - -#ifndef TQT_NO_SPINWIDGET - -class TQSpinWidgetPrivate; -class TQ_EXPORT TQSpinWidget : public TQWidget -{ - TQ_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 TQT_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(TQ_DISABLE_COPY) - TQSpinWidget( const TQSpinWidget& ); - TQSpinWidget& operator=( const TQSpinWidget& ); -#endif -}; - -#endif // TQT_NO_SPINWIDGET - -#endif // TQRANGECONTROL_H diff --git a/src/widgets/qeffects_p.h b/src/widgets/qeffects_p.h index d3beb3055..4d9845c01 100644 --- a/src/widgets/qeffects_p.h +++ b/src/widgets/qeffects_p.h @@ -56,7 +56,7 @@ // #ifndef QT_H -#include "ntqnamespace.h" +#include "tqnamespace.h" #endif // QT_H #ifndef TQT_NO_EFFECTS diff --git a/src/widgets/qrangecontrol.cpp b/src/widgets/qrangecontrol.cpp deleted file mode 100644 index 95056e578..000000000 --- a/src/widgets/qrangecontrol.cpp +++ /dev/null @@ -1,565 +0,0 @@ -/**************************************************************************** -** -** Implementation of TQRangeControl class -** -** Created : 940427 -** -** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. -** -** This file is part of the widgets module of the TQt GUI Toolkit. -** -** This file may be used under the terms of the GNU General -** Public License versions 2.0 or 3.0 as published by the Free -** Software Foundation and appearing in the files LICENSE.GPL2 -** and LICENSE.GPL3 included in the packaging of this file. -** Alternatively you may (at your option) use any later version -** of the GNU General Public License if such license has been -** publicly approved by Trolltech ASA (or its successors, if any) -** and the KDE Free TQt Foundation. -** -** Please review the following information to ensure GNU General -** Public Licensing requirements will be met: -** http://trolltech.com/products/qt/licenses/licensing/opensource/. -** If you are unsure which license is appropriate for your use, please -** review the following information: -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview -** or contact the sales department at sales@trolltech.com. -** -** This file may be used under the terms of the Q Public License as -** defined by Trolltech ASA and appearing in the file LICENSE.TQPL -** included in the packaging of this file. Licensees holding valid TQt -** Commercial licenses may use this file in accordance with the TQt -** Commercial License Agreement provided with the Software. -** -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted -** herein. -** -**********************************************************************/ - -#include "ntqrangecontrol.h" -#ifndef TQT_NO_RANGECONTROL -#include "tqglobal.h" -#include - -static bool sumOutOfRange(int current, int add); - - -/*! - \class TQRangeControl ntqrangecontrol.h - \brief The TQRangeControl class provides an integer value within a range. - - \ingroup misc - - 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: - - \list 1 - - \i \e{Current value} The bounded integer that - TQRangeControl maintains. value() returns it, and several - functions, including setValue(), set it. - - \i \e{Minimum} The lowest value that value() can ever - return. Returned by minValue() and set by setRange() or one of the - constructors. - - \i \e{Maximum} The highest value that value() can ever - return. Returned by maxValue() and set by setRange() or one of the - constructors. - - \i \e{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(). - - \i \e{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(). - - \endlist - - 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() + \e n * lineStep() for integer values of \e 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. -*/ - - -/*! - 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() -{ - minVal = 0; - maxVal = 99; - line = 1; - page = 10; - val = 0; - prevVal = -1; - d = 0; -} - -/*! - Constructs a range control whose value can never be smaller than - \a minValue or greater than \a maxValue, whose line step size is - \a lineStep and page step size is \a pageStep and whose value is - initially \a value (which is guaranteed to be in range using - bound()). -*/ - -TQRangeControl::TQRangeControl( int minValue, int maxValue, - int lineStep, int pageStep, - int value ) -{ - minVal = minValue; - maxVal = maxValue; - line = TQABS( lineStep ); - page = TQABS( pageStep ); - prevVal = minVal - 1; - val = bound( value ); - d = 0; -} - -/*! - Destroys the range control -*/ - -TQRangeControl::~TQRangeControl() -{ -} - - -/*! - \fn int TQRangeControl::value() const - - Returns the current range control value. This is guaranteed to be - within the range [minValue(), maxValue()]. - - \sa setValue() prevValue() -*/ - -/*! - \fn int TQRangeControl::prevValue() const - - 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. - - \sa value() setRange() -*/ - -/*! - Sets the range control's value to \a 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(). - - \sa value() -*/ - -void TQRangeControl::setValue( int value ) -{ - directSetValue( value ); - if ( prevVal != val ) - valueChange(); -} - -/*! - Sets the range control \a value directly without calling - valueChange(). - - Forces the new \a 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. - - \sa setValue() -*/ - -void TQRangeControl::directSetValue(int value) -{ - prevVal = val; - val = bound( value ); -} - -/*! - Equivalent to \c{setValue( value() + pageStep() )}. - - If the value is changed, then valueChange() is called. - - \sa subtractPage() addLine() setValue() -*/ - -void TQRangeControl::addPage() -{ - if (!sumOutOfRange(value(), pageStep())) - setValue(value() + pageStep()); -} - -/*! - Equivalent to \c{setValue( value() - pageStep() )}. - - If the value is changed, then valueChange() is called. - - \sa addPage() subtractLine() setValue() -*/ - -void TQRangeControl::subtractPage() -{ - if (!sumOutOfRange(value(), -pageStep())) - setValue(value() - pageStep()); -} - -/*! - Equivalent to \c{setValue( value() + lineStep() )}. - - If the value is changed, then valueChange() is called. - - \sa subtractLine() addPage() setValue() -*/ - -void TQRangeControl::addLine() -{ - if (!sumOutOfRange(value(), lineStep())) - setValue(value() + lineStep()); -} - -/*! - Equivalent to \c{setValue( value() - lineStep() )}. - - If the value is changed, then valueChange() is called. - - \sa addLine() subtractPage() setValue() -*/ - -void TQRangeControl::subtractLine() -{ - if (!sumOutOfRange(value(), -lineStep())) - setValue(value() - lineStep()); -} - - -/*! - \fn int TQRangeControl::minValue() const - - Returns the minimum value of the range. - - \sa setMinValue() setRange() maxValue() -*/ - -/*! - \fn int TQRangeControl::maxValue() const - - Returns the maximum value of the range. - - \sa setMaxValue() setRange() minValue() -*/ - -/*! - Sets the minimum value of the range to \a minVal. - - If necessary, the maxValue() is adjusted so that the range remains - valid. - - \sa minValue() setMaxValue() -*/ -void TQRangeControl::setMinValue( int minVal ) -{ - int maxVal = maxValue(); - if ( maxVal < minVal ) - maxVal = minVal; - setRange( minVal, maxVal ); -} - -/*! - Sets the minimum value of the range to \a maxVal. - - If necessary, the minValue() is adjusted so that the range remains - valid. - - \sa maxValue() setMinValue() -*/ -void TQRangeControl::setMaxValue( int maxVal ) -{ - int minVal = minValue(); - if ( minVal > maxVal ) - minVal = maxVal; - setRange( minVal, maxVal ); -} - -/*! - Sets the range control's minimum value to \a minValue and its - maximum value to \a 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 \a maxValue is smaller than \a minValue, \a minValue becomes - the only legal value. - - \sa minValue() maxValue() -*/ - -void TQRangeControl::setRange( int minValue, int maxValue ) -{ - if ( minValue > maxValue ) { -#if defined(QT_CHECK_RANGE) - tqWarning( "TQRangeControl::setRange: minValue %d > maxValue %d", - minValue, maxValue ); -#endif - maxValue = minValue; - } - if ( minValue == minVal && maxValue == maxVal ) - return; - minVal = minValue; - maxVal = maxValue; - int tmp = bound( val ); - rangeChange(); - if ( tmp != val ) { - prevVal = val; - val = tmp; - valueChange(); - } -} - - -/*! - \fn int TQRangeControl::lineStep() const - - Returns the line step. - - \sa setSteps() pageStep() -*/ - -/*! - \fn int TQRangeControl::pageStep() const - - Returns the page step. - - \sa setSteps() lineStep() -*/ - -/*! - Sets the range's line step to \a lineStep and page step to \a - pageStep. - - Calls the virtual stepChange() function if the new line step - or page step are different from the previous settings. - - \sa lineStep() pageStep() setRange() -*/ - -void TQRangeControl::setSteps( int lineStep, int pageStep ) -{ - if ( lineStep != line || pageStep != page ) { - line = TQABS( lineStep ); - page = TQABS( pageStep ); - stepChange(); - } -} - - -/*! - 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(). - - \sa setValue(), addPage(), subtractPage(), addLine(), - subtractLine() rangeChange(), stepChange() -*/ - -void TQRangeControl::valueChange() -{ -} - - -/*! - 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. - - \sa setRange(), valueChange(), stepChange() -*/ - -void TQRangeControl::rangeChange() -{ -} - - -/*! - 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. - - \sa setSteps(), rangeChange(), valueChange() -*/ - -void TQRangeControl::stepChange() -{ -} - - -/*! - Forces the value \a 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. - - \sa setValue() value() minValue() maxValue() -*/ - -int TQRangeControl::bound( int v ) const -{ - if ( v < minVal ) - return minVal; - if ( v > maxVal ) - return maxVal; - return v; -} - - -/*! - Converts \a logical_val to a pixel position. minValue() maps to 0, - maxValue() maps to \a span and other values are distributed evenly - in-between. - - This function can handle the entire integer range without - overflow, providing \a span is \<= 4096. - - Calling this method is useful when actually drawing a range - control such as a TQScrollBar on-screen. - - \sa valueFromPosition() -*/ - -int TQRangeControl::positionFromValue( int logical_val, int span ) const -{ - if ( span <= 0 || logical_val < minValue() || maxValue() <= minValue() ) - return 0; - if ( logical_val > maxValue() ) - return span; - - uint range = maxValue() - minValue(); - uint p = logical_val - minValue(); - - if ( range > (uint)INT_MAX/4096 ) { - const int scale = 4096*2; - return ( (p/scale) * span ) / (range/scale); - // ### the above line is probably not 100% correct - // ### but fixing it isn't worth the extreme pain... - } else if ( range > (uint)span ) { - return (2*p*span + range) / (2*range); - } else { - uint div = span / range; - uint mod = span % range; - return p*div + (2*p*mod + range) / (2*range); - } - //equiv. to (p*span)/range + 0.5 - // no overflow because of this implicit assumption: - // span <= 4096 -} - - -/*! - Converts the pixel position \a pos to a value. 0 maps to - minValue(), \a 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. - - \sa positionFromValue() -*/ - -int TQRangeControl::valueFromPosition( int pos, int span ) const -{ - if ( span <= 0 || pos <= 0 ) - return minValue(); - if ( pos >= span ) - return maxValue(); - - uint range = maxValue() - minValue(); - - if ( (uint)span > range ) - return minValue() + (2*pos*range + span) / (2*span); - else { - uint div = range / span; - uint mod = range % span; - return minValue() + pos*div + (2*pos*mod + span) / (2*span); - } - // equiv. to minValue() + (pos*range)/span + 0.5 - // no overflow because of this implicit assumption: - // pos <= span < sqrt(INT_MAX+0.0625)+0.25 ~ sqrt(INT_MAX) -} - -static bool sumOutOfRange(int current, int add) -{ - if (add > 0 && INT_MAX - add < current) { - return true; - } - if (add < 0 && INT_MIN - add > current) { - return true; - } - return false; -} - -#endif diff --git a/src/widgets/qt_widgets.pri b/src/widgets/qt_widgets.pri index 93acd0832..4d124e940 100644 --- a/src/widgets/qt_widgets.pri +++ b/src/widgets/qt_widgets.pri @@ -34,7 +34,7 @@ widgets { $$WIDGETS_H/tqprogressbar.h \ $$WIDGETS_H/tqpushbutton.h \ $$WIDGETS_H/tqradiobutton.h \ - $$WIDGETS_H/ntqrangecontrol.h \ + $$WIDGETS_H/tqrangecontrol.h \ $$WIDGETS_H/tqscrollbar.h \ $$WIDGETS_H/tqscrollview.h \ $$WIDGETS_H/tqslider.h \ @@ -96,7 +96,7 @@ widgets { $$WIDGETS_CPP/tqprogressbar.cpp \ $$WIDGETS_CPP/tqpushbutton.cpp \ $$WIDGETS_CPP/tqradiobutton.cpp \ - $$WIDGETS_CPP/qrangecontrol.cpp \ + $$WIDGETS_CPP/tqrangecontrol.cpp \ $$WIDGETS_CPP/tqscrollbar.cpp \ $$WIDGETS_CPP/tqscrollview.cpp \ $$WIDGETS_CPP/tqslider.cpp \ diff --git a/src/widgets/tqdatetimeedit.cpp b/src/widgets/tqdatetimeedit.cpp index 203d310de..6e32d3aaf 100644 --- a/src/widgets/tqdatetimeedit.cpp +++ b/src/widgets/tqdatetimeedit.cpp @@ -44,7 +44,7 @@ #include "../kernel/qinternal_p.h" #include "../kernel/qrichtext_p.h" -#include "ntqrangecontrol.h" +#include "tqrangecontrol.h" #include "ntqapplication.h" #include "tqpixmap.h" #include "ntqapplication.h" diff --git a/src/widgets/tqdial.h b/src/widgets/tqdial.h index 7baf98e53..ae3689705 100644 --- a/src/widgets/tqdial.h +++ b/src/widgets/tqdial.h @@ -44,7 +44,7 @@ #ifndef QT_H #include "tqwidget.h" -#include "ntqrangecontrol.h" +#include "tqrangecontrol.h" #endif // QT_H #ifndef TQT_NO_DIAL diff --git a/src/widgets/tqmenudata.cpp b/src/widgets/tqmenudata.cpp index 5a3872d31..148d79790 100644 --- a/src/widgets/tqmenudata.cpp +++ b/src/widgets/tqmenudata.cpp @@ -415,7 +415,7 @@ void TQMenuData::removePopup( TQPopupMenu *popup ) Returns the allocated menu identifier number (\a id if \a id >= 0). \sa removeItem(), changeItem(), setAccel(), connectItem(), TQAccel, - ntqnamespace.h + tqnamespace.h */ int TQMenuData::insertItem( const TQString &text, @@ -442,7 +442,7 @@ int TQMenuData::insertItem( const TQString &text, Returns the allocated menu identifier number (\a id if \a id >= 0). \sa removeItem(), changeItem(), setAccel(), connectItem(), TQAccel, - ntqnamespace.h + tqnamespace.h */ int TQMenuData::insertItem( const TQIconSet& icon, @@ -504,7 +504,7 @@ int TQMenuData::insertItem( const TQPixmap &pixmap, Returns the allocated menu identifier number (\a id if \a id >= 0). \sa removeItem(), changeItem(), setAccel(), connectItem(), TQAccel, - ntqnamespace.h + tqnamespace.h */ int TQMenuData::insertItem( const TQIconSet& icon, @@ -864,7 +864,7 @@ void TQMenuData::clear() item \a id, or 0 if it has no accelerator key or if there is no such menu item. - \sa setAccel(), TQAccel, ntqnamespace.h + \sa setAccel(), TQAccel, tqnamespace.h */ TQKeySequence TQMenuData::accel( int id ) const @@ -880,7 +880,7 @@ TQKeySequence TQMenuData::accel( int id ) const An accelerator key consists of a key code and a combination of the modifiers \c SHIFT, \c CTRL, \c ALT or \c UNICODE_ACCEL (OR'ed or - added). The header file \c ntqnamespace.h contains a list of key + added). The header file \c tqnamespace.h contains a list of key codes. Defining an accelerator key produces a text that is added to the diff --git a/src/widgets/tqrangecontrol.cpp b/src/widgets/tqrangecontrol.cpp new file mode 100644 index 000000000..03d9cecd0 --- /dev/null +++ b/src/widgets/tqrangecontrol.cpp @@ -0,0 +1,565 @@ +/**************************************************************************** +** +** Implementation of TQRangeControl class +** +** Created : 940427 +** +** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. +** +** This file is part of the widgets module of the TQt GUI Toolkit. +** +** This file may be used under the terms of the GNU General +** Public License versions 2.0 or 3.0 as published by the Free +** Software Foundation and appearing in the files LICENSE.GPL2 +** and LICENSE.GPL3 included in the packaging of this file. +** Alternatively you may (at your option) use any later version +** of the GNU General Public License if such license has been +** publicly approved by Trolltech ASA (or its successors, if any) +** and the KDE Free TQt Foundation. +** +** Please review the following information to ensure GNU General +** Public Licensing requirements will be met: +** http://trolltech.com/products/qt/licenses/licensing/opensource/. +** If you are unsure which license is appropriate for your use, please +** review the following information: +** http://trolltech.com/products/qt/licenses/licensing/licensingoverview +** or contact the sales department at sales@trolltech.com. +** +** This file may be used under the terms of the Q Public License as +** defined by Trolltech ASA and appearing in the file LICENSE.TQPL +** included in the packaging of this file. Licensees holding valid TQt +** Commercial licenses may use this file in accordance with the TQt +** Commercial License Agreement provided with the Software. +** +** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, +** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted +** herein. +** +**********************************************************************/ + +#include "tqrangecontrol.h" +#ifndef TQT_NO_RANGECONTROL +#include "tqglobal.h" +#include + +static bool sumOutOfRange(int current, int add); + + +/*! + \class TQRangeControl tqrangecontrol.h + \brief The TQRangeControl class provides an integer value within a range. + + \ingroup misc + + 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: + + \list 1 + + \i \e{Current value} The bounded integer that + TQRangeControl maintains. value() returns it, and several + functions, including setValue(), set it. + + \i \e{Minimum} The lowest value that value() can ever + return. Returned by minValue() and set by setRange() or one of the + constructors. + + \i \e{Maximum} The highest value that value() can ever + return. Returned by maxValue() and set by setRange() or one of the + constructors. + + \i \e{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(). + + \i \e{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(). + + \endlist + + 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() + \e n * lineStep() for integer values of \e 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. +*/ + + +/*! + 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() +{ + minVal = 0; + maxVal = 99; + line = 1; + page = 10; + val = 0; + prevVal = -1; + d = 0; +} + +/*! + Constructs a range control whose value can never be smaller than + \a minValue or greater than \a maxValue, whose line step size is + \a lineStep and page step size is \a pageStep and whose value is + initially \a value (which is guaranteed to be in range using + bound()). +*/ + +TQRangeControl::TQRangeControl( int minValue, int maxValue, + int lineStep, int pageStep, + int value ) +{ + minVal = minValue; + maxVal = maxValue; + line = TQABS( lineStep ); + page = TQABS( pageStep ); + prevVal = minVal - 1; + val = bound( value ); + d = 0; +} + +/*! + Destroys the range control +*/ + +TQRangeControl::~TQRangeControl() +{ +} + + +/*! + \fn int TQRangeControl::value() const + + Returns the current range control value. This is guaranteed to be + within the range [minValue(), maxValue()]. + + \sa setValue() prevValue() +*/ + +/*! + \fn int TQRangeControl::prevValue() const + + 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. + + \sa value() setRange() +*/ + +/*! + Sets the range control's value to \a 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(). + + \sa value() +*/ + +void TQRangeControl::setValue( int value ) +{ + directSetValue( value ); + if ( prevVal != val ) + valueChange(); +} + +/*! + Sets the range control \a value directly without calling + valueChange(). + + Forces the new \a 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. + + \sa setValue() +*/ + +void TQRangeControl::directSetValue(int value) +{ + prevVal = val; + val = bound( value ); +} + +/*! + Equivalent to \c{setValue( value() + pageStep() )}. + + If the value is changed, then valueChange() is called. + + \sa subtractPage() addLine() setValue() +*/ + +void TQRangeControl::addPage() +{ + if (!sumOutOfRange(value(), pageStep())) + setValue(value() + pageStep()); +} + +/*! + Equivalent to \c{setValue( value() - pageStep() )}. + + If the value is changed, then valueChange() is called. + + \sa addPage() subtractLine() setValue() +*/ + +void TQRangeControl::subtractPage() +{ + if (!sumOutOfRange(value(), -pageStep())) + setValue(value() - pageStep()); +} + +/*! + Equivalent to \c{setValue( value() + lineStep() )}. + + If the value is changed, then valueChange() is called. + + \sa subtractLine() addPage() setValue() +*/ + +void TQRangeControl::addLine() +{ + if (!sumOutOfRange(value(), lineStep())) + setValue(value() + lineStep()); +} + +/*! + Equivalent to \c{setValue( value() - lineStep() )}. + + If the value is changed, then valueChange() is called. + + \sa addLine() subtractPage() setValue() +*/ + +void TQRangeControl::subtractLine() +{ + if (!sumOutOfRange(value(), -lineStep())) + setValue(value() - lineStep()); +} + + +/*! + \fn int TQRangeControl::minValue() const + + Returns the minimum value of the range. + + \sa setMinValue() setRange() maxValue() +*/ + +/*! + \fn int TQRangeControl::maxValue() const + + Returns the maximum value of the range. + + \sa setMaxValue() setRange() minValue() +*/ + +/*! + Sets the minimum value of the range to \a minVal. + + If necessary, the maxValue() is adjusted so that the range remains + valid. + + \sa minValue() setMaxValue() +*/ +void TQRangeControl::setMinValue( int minVal ) +{ + int maxVal = maxValue(); + if ( maxVal < minVal ) + maxVal = minVal; + setRange( minVal, maxVal ); +} + +/*! + Sets the minimum value of the range to \a maxVal. + + If necessary, the minValue() is adjusted so that the range remains + valid. + + \sa maxValue() setMinValue() +*/ +void TQRangeControl::setMaxValue( int maxVal ) +{ + int minVal = minValue(); + if ( minVal > maxVal ) + minVal = maxVal; + setRange( minVal, maxVal ); +} + +/*! + Sets the range control's minimum value to \a minValue and its + maximum value to \a 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 \a maxValue is smaller than \a minValue, \a minValue becomes + the only legal value. + + \sa minValue() maxValue() +*/ + +void TQRangeControl::setRange( int minValue, int maxValue ) +{ + if ( minValue > maxValue ) { +#if defined(QT_CHECK_RANGE) + tqWarning( "TQRangeControl::setRange: minValue %d > maxValue %d", + minValue, maxValue ); +#endif + maxValue = minValue; + } + if ( minValue == minVal && maxValue == maxVal ) + return; + minVal = minValue; + maxVal = maxValue; + int tmp = bound( val ); + rangeChange(); + if ( tmp != val ) { + prevVal = val; + val = tmp; + valueChange(); + } +} + + +/*! + \fn int TQRangeControl::lineStep() const + + Returns the line step. + + \sa setSteps() pageStep() +*/ + +/*! + \fn int TQRangeControl::pageStep() const + + Returns the page step. + + \sa setSteps() lineStep() +*/ + +/*! + Sets the range's line step to \a lineStep and page step to \a + pageStep. + + Calls the virtual stepChange() function if the new line step + or page step are different from the previous settings. + + \sa lineStep() pageStep() setRange() +*/ + +void TQRangeControl::setSteps( int lineStep, int pageStep ) +{ + if ( lineStep != line || pageStep != page ) { + line = TQABS( lineStep ); + page = TQABS( pageStep ); + stepChange(); + } +} + + +/*! + 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(). + + \sa setValue(), addPage(), subtractPage(), addLine(), + subtractLine() rangeChange(), stepChange() +*/ + +void TQRangeControl::valueChange() +{ +} + + +/*! + 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. + + \sa setRange(), valueChange(), stepChange() +*/ + +void TQRangeControl::rangeChange() +{ +} + + +/*! + 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. + + \sa setSteps(), rangeChange(), valueChange() +*/ + +void TQRangeControl::stepChange() +{ +} + + +/*! + Forces the value \a 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. + + \sa setValue() value() minValue() maxValue() +*/ + +int TQRangeControl::bound( int v ) const +{ + if ( v < minVal ) + return minVal; + if ( v > maxVal ) + return maxVal; + return v; +} + + +/*! + Converts \a logical_val to a pixel position. minValue() maps to 0, + maxValue() maps to \a span and other values are distributed evenly + in-between. + + This function can handle the entire integer range without + overflow, providing \a span is \<= 4096. + + Calling this method is useful when actually drawing a range + control such as a TQScrollBar on-screen. + + \sa valueFromPosition() +*/ + +int TQRangeControl::positionFromValue( int logical_val, int span ) const +{ + if ( span <= 0 || logical_val < minValue() || maxValue() <= minValue() ) + return 0; + if ( logical_val > maxValue() ) + return span; + + uint range = maxValue() - minValue(); + uint p = logical_val - minValue(); + + if ( range > (uint)INT_MAX/4096 ) { + const int scale = 4096*2; + return ( (p/scale) * span ) / (range/scale); + // ### the above line is probably not 100% correct + // ### but fixing it isn't worth the extreme pain... + } else if ( range > (uint)span ) { + return (2*p*span + range) / (2*range); + } else { + uint div = span / range; + uint mod = span % range; + return p*div + (2*p*mod + range) / (2*range); + } + //equiv. to (p*span)/range + 0.5 + // no overflow because of this implicit assumption: + // span <= 4096 +} + + +/*! + Converts the pixel position \a pos to a value. 0 maps to + minValue(), \a 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. + + \sa positionFromValue() +*/ + +int TQRangeControl::valueFromPosition( int pos, int span ) const +{ + if ( span <= 0 || pos <= 0 ) + return minValue(); + if ( pos >= span ) + return maxValue(); + + uint range = maxValue() - minValue(); + + if ( (uint)span > range ) + return minValue() + (2*pos*range + span) / (2*span); + else { + uint div = range / span; + uint mod = range % span; + return minValue() + pos*div + (2*pos*mod + span) / (2*span); + } + // equiv. to minValue() + (pos*range)/span + 0.5 + // no overflow because of this implicit assumption: + // pos <= span < sqrt(INT_MAX+0.0625)+0.25 ~ sqrt(INT_MAX) +} + +static bool sumOutOfRange(int current, int add) +{ + if (add > 0 && INT_MAX - add < current) { + return true; + } + if (add < 0 && INT_MIN - add > current) { + return true; + } + return false; +} + +#endif diff --git a/src/widgets/tqrangecontrol.h b/src/widgets/tqrangecontrol.h new file mode 100644 index 000000000..39f2e2abc --- /dev/null +++ b/src/widgets/tqrangecontrol.h @@ -0,0 +1,194 @@ +/**************************************************************************** +** +** Definition of TQRangeControl class +** +** Created : 940427 +** +** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. +** +** This file is part of the widgets module of the TQt GUI Toolkit. +** +** This file may be used under the terms of the GNU General +** Public License versions 2.0 or 3.0 as published by the Free +** Software Foundation and appearing in the files LICENSE.GPL2 +** and LICENSE.GPL3 included in the packaging of this file. +** Alternatively you may (at your option) use any later version +** of the GNU General Public License if such license has been +** publicly approved by Trolltech ASA (or its successors, if any) +** and the KDE Free TQt Foundation. +** +** Please review the following information to ensure GNU General +** Public Licensing requirements will be met: +** http://trolltech.com/products/qt/licenses/licensing/opensource/. +** If you are unsure which license is appropriate for your use, please +** review the following information: +** http://trolltech.com/products/qt/licenses/licensing/licensingoverview +** or contact the sales department at sales@trolltech.com. +** +** This file may be used under the terms of the Q Public License as +** defined by Trolltech ASA and appearing in the file LICENSE.TQPL +** included in the packaging of this file. Licensees holding valid TQt +** Commercial licenses may use this file in accordance with the TQt +** Commercial License Agreement provided with the Software. +** +** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, +** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted +** herein. +** +**********************************************************************/ + +#ifndef TQRANGECONTROL_H +#define TQRANGECONTROL_H + +#ifndef QT_H +#include "tqglobal.h" +#include "tqframe.h" +#endif // QT_H + +#ifndef TQT_NO_RANGECONTROL + + +class TQRangeControlPrivate; + + +class TQ_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(TQ_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 // TQT_NO_RANGECONTROL + +#ifndef TQT_NO_SPINWIDGET + +class TQSpinWidgetPrivate; +class TQ_EXPORT TQSpinWidget : public TQWidget +{ + TQ_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 TQT_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(TQ_DISABLE_COPY) + TQSpinWidget( const TQSpinWidget& ); + TQSpinWidget& operator=( const TQSpinWidget& ); +#endif +}; + +#endif // TQT_NO_SPINWIDGET + +#endif // TQRANGECONTROL_H diff --git a/src/widgets/tqscrollbar.h b/src/widgets/tqscrollbar.h index 6a298c96f..d5cc1a502 100644 --- a/src/widgets/tqscrollbar.h +++ b/src/widgets/tqscrollbar.h @@ -45,7 +45,7 @@ class TQTimer; #ifndef QT_H #include "tqwidget.h" -#include "ntqrangecontrol.h" +#include "tqrangecontrol.h" #endif // QT_H #ifndef TQT_NO_SCROLLBAR diff --git a/src/widgets/tqslider.h b/src/widgets/tqslider.h index af60245e3..1ce9883ef 100644 --- a/src/widgets/tqslider.h +++ b/src/widgets/tqslider.h @@ -43,7 +43,7 @@ #ifndef QT_H #include "tqwidget.h" -#include "ntqrangecontrol.h" +#include "tqrangecontrol.h" #endif // QT_H #ifndef TQT_NO_SLIDER diff --git a/src/widgets/tqspinbox.h b/src/widgets/tqspinbox.h index 345857c74..390c6bbd2 100644 --- a/src/widgets/tqspinbox.h +++ b/src/widgets/tqspinbox.h @@ -43,7 +43,7 @@ #ifndef QT_H #include "tqwidget.h" -#include "ntqrangecontrol.h" +#include "tqrangecontrol.h" #endif // QT_H #ifndef TQT_NO_SPINBOX diff --git a/src/widgets/tqspinwidget.cpp b/src/widgets/tqspinwidget.cpp index a66e90d1d..893fa0f0c 100644 --- a/src/widgets/tqspinwidget.cpp +++ b/src/widgets/tqspinwidget.cpp @@ -36,7 +36,7 @@ ** **********************************************************************/ -#include "ntqrangecontrol.h" +#include "tqrangecontrol.h" #ifndef TQT_NO_SPINWIDGET diff --git a/src/widgets/tqtabbar.cpp b/src/widgets/tqtabbar.cpp index 140473e6a..7c9ebb2c4 100644 --- a/src/widgets/tqtabbar.cpp +++ b/src/widgets/tqtabbar.cpp @@ -53,7 +53,7 @@ #endif #ifdef TQ_WS_MACX -#include +#include #endif diff --git a/src/widgets/tqtabwidget.cpp b/src/widgets/tqtabwidget.cpp index fdf857050..88ec8a06e 100644 --- a/src/widgets/tqtabwidget.cpp +++ b/src/widgets/tqtabwidget.cpp @@ -51,7 +51,7 @@ #include "tqtoolbutton.h" #ifdef Q_OS_MACX -#include +#include #endif /*! diff --git a/src/widgets/tqtextedit.cpp b/src/widgets/tqtextedit.cpp index 54dc1b2db..2c8bf3ba4 100644 --- a/src/widgets/tqtextedit.cpp +++ b/src/widgets/tqtextedit.cpp @@ -72,7 +72,7 @@ #include "tqregexp.h" #include "tqpopupmenu.h" #include "tqptrstack.h" -#include "ntqmetaobject.h" +#include "tqmetaobject.h" #include "tqtextbrowser.h" #include #include "private/tqsyntaxhighlighter_p.h" diff --git a/tools/assistant/helpdialogimpl.cpp b/tools/assistant/helpdialogimpl.cpp index 9c4cd2a75..fce5ceeea 100644 --- a/tools/assistant/helpdialogimpl.cpp +++ b/tools/assistant/helpdialogimpl.cpp @@ -49,7 +49,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tools/assistant/helpwindow.cpp b/tools/assistant/helpwindow.cpp index d543a0594..5f5777233 100644 --- a/tools/assistant/helpwindow.cpp +++ b/tools/assistant/helpwindow.cpp @@ -40,7 +40,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tools/assistant/main.cpp b/tools/assistant/main.cpp index 670767f17..b1bbb5066 100644 --- a/tools/assistant/main.cpp +++ b/tools/assistant/main.cpp @@ -42,7 +42,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tools/assistant/mainwindow.ui b/tools/assistant/mainwindow.ui index b6fcc94db..9a65861ea 100644 --- a/tools/assistant/mainwindow.ui +++ b/tools/assistant/mainwindow.ui @@ -572,7 +572,7 @@ tqtoolbutton.h settingsdialogimpl.h - ntqmessagebox.h + tqmessagebox.h tqfontdatabase.h tqaccel.h tqcombobox.h diff --git a/tools/assistant/mainwindow.ui.h b/tools/assistant/mainwindow.ui.h index 779c1e426..046ab043a 100644 --- a/tools/assistant/mainwindow.ui.h +++ b/tools/assistant/mainwindow.ui.h @@ -41,7 +41,7 @@ #include #include #include -#include +#include #include TQPtrList *MainWindow::windows = 0; diff --git a/tools/assistant/settingsdialogimpl.cpp b/tools/assistant/settingsdialogimpl.cpp index e06dea5a7..42eeca0fe 100644 --- a/tools/assistant/settingsdialogimpl.cpp +++ b/tools/assistant/settingsdialogimpl.cpp @@ -45,7 +45,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tools/designer/designer/actiondnd.cpp b/tools/designer/designer/actiondnd.cpp index 3b4978eaf..f744e34ff 100644 --- a/tools/designer/designer/actiondnd.cpp +++ b/tools/designer/designer/actiondnd.cpp @@ -48,7 +48,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tools/designer/designer/command.cpp b/tools/designer/designer/command.cpp index 5987e2d58..6906daf7e 100644 --- a/tools/designer/designer/command.cpp +++ b/tools/designer/designer/command.cpp @@ -48,10 +48,10 @@ #include #include -#include +#include #include #include -#include +#include #include #include #include diff --git a/tools/designer/designer/connectionitems.cpp b/tools/designer/designer/connectionitems.cpp index f787faff9..ca8625e77 100644 --- a/tools/designer/designer/connectionitems.cpp +++ b/tools/designer/designer/connectionitems.cpp @@ -39,7 +39,7 @@ #include "project.h" #include #include -#include +#include #include #include #include diff --git a/tools/designer/designer/customwidgeteditorimpl.cpp b/tools/designer/designer/customwidgeteditorimpl.cpp index 01f1cc17d..5eb81d29c 100644 --- a/tools/designer/designer/customwidgeteditorimpl.cpp +++ b/tools/designer/designer/customwidgeteditorimpl.cpp @@ -46,9 +46,9 @@ #include #include #include -#include +#include #include -#include +#include #include #include #include diff --git a/tools/designer/designer/dbconnectionsimpl.cpp b/tools/designer/designer/dbconnectionsimpl.cpp index 09d85aed3..37c4b8a43 100644 --- a/tools/designer/designer/dbconnectionsimpl.cpp +++ b/tools/designer/designer/dbconnectionsimpl.cpp @@ -42,7 +42,7 @@ #include #include #include -#include +#include #include #include "mainwindow.h" #include "asciivalidator.h" diff --git a/tools/designer/designer/designer_pch.h b/tools/designer/designer/designer_pch.h index 52a190185..70fe57c5b 100644 --- a/tools/designer/designer/designer_pch.h +++ b/tools/designer/designer/designer_pch.h @@ -21,8 +21,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/tools/designer/designer/designerappiface.cpp b/tools/designer/designer/designerappiface.cpp index e6cd98563..f22a9bd18 100644 --- a/tools/designer/designer/designerappiface.cpp +++ b/tools/designer/designer/designerappiface.cpp @@ -49,7 +49,7 @@ #include "pixmapcollection.h" #include "hierarchyview.h" #include -#include +#include #include "popupmenueditor.h" #include "menubareditor.h" diff --git a/tools/designer/designer/editfunctionsimpl.cpp b/tools/designer/designer/editfunctionsimpl.cpp index eee9df12b..48949dde2 100644 --- a/tools/designer/designer/editfunctionsimpl.cpp +++ b/tools/designer/designer/editfunctionsimpl.cpp @@ -44,7 +44,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tools/designer/designer/formfile.cpp b/tools/designer/designer/formfile.cpp index c18335ef1..322dcff19 100644 --- a/tools/designer/designer/formfile.cpp +++ b/tools/designer/designer/formfile.cpp @@ -41,7 +41,7 @@ #include "../interfaces/languageinterface.h" #include "resource.h" #include "workspace.h" -#include +#include #include #include #include "propertyeditor.h" diff --git a/tools/designer/designer/formwindow.cpp b/tools/designer/designer/formwindow.cpp index 0e54d49aa..506f3d08f 100644 --- a/tools/designer/designer/formwindow.cpp +++ b/tools/designer/designer/formwindow.cpp @@ -63,12 +63,12 @@ #include #include #include -#include +#include #include #include #include #include -#include +#include #include #include #include diff --git a/tools/designer/designer/hierarchyview.cpp b/tools/designer/designer/hierarchyview.cpp index 786386f5f..a80a44cf7 100644 --- a/tools/designer/designer/hierarchyview.cpp +++ b/tools/designer/designer/hierarchyview.cpp @@ -63,7 +63,7 @@ #include "../interfaces/languageinterface.h" #include #include -#include +#include #include diff --git a/tools/designer/designer/mainwindow.cpp b/tools/designer/designer/mainwindow.cpp index 44246fd22..06ade5a3d 100644 --- a/tools/designer/designer/mainwindow.cpp +++ b/tools/designer/designer/mainwindow.cpp @@ -90,13 +90,13 @@ #include #include #include -#include +#include #include #include #include #include #include -#include +#include #include #include #include diff --git a/tools/designer/designer/mainwindowactions.cpp b/tools/designer/designer/mainwindowactions.cpp index fe0588bff..cf392f9af 100644 --- a/tools/designer/designer/mainwindowactions.cpp +++ b/tools/designer/designer/mainwindowactions.cpp @@ -44,7 +44,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tools/designer/designer/metadatabase.cpp b/tools/designer/designer/metadatabase.cpp index 14734ac91..1ff6a1c5a 100644 --- a/tools/designer/designer/metadatabase.cpp +++ b/tools/designer/designer/metadatabase.cpp @@ -47,7 +47,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tools/designer/designer/multilineeditorimpl.cpp b/tools/designer/designer/multilineeditorimpl.cpp index 8a609c223..9e9ecce35 100644 --- a/tools/designer/designer/multilineeditorimpl.cpp +++ b/tools/designer/designer/multilineeditorimpl.cpp @@ -46,7 +46,7 @@ #include #include #include -#include +#include ToolBarItem::ToolBarItem( TQWidget *parent, TQWidget *toolBar, const TQString &label, const TQString &tagstr, diff --git a/tools/designer/designer/newformimpl.cpp b/tools/designer/designer/newformimpl.cpp index 75fd0c0c1..fb68cb19b 100644 --- a/tools/designer/designer/newformimpl.cpp +++ b/tools/designer/designer/newformimpl.cpp @@ -52,7 +52,7 @@ #include #include #include -#include +#include static int forms = 0; diff --git a/tools/designer/designer/project.cpp b/tools/designer/designer/project.cpp index af12adc3b..5f20067d9 100644 --- a/tools/designer/designer/project.cpp +++ b/tools/designer/designer/project.cpp @@ -50,7 +50,7 @@ #include #include #include -#include +#include #include #include "mainwindow.h" #include diff --git a/tools/designer/designer/propertyeditor.cpp b/tools/designer/designer/propertyeditor.cpp index 3775c82f8..4772806c1 100644 --- a/tools/designer/designer/propertyeditor.cpp +++ b/tools/designer/designer/propertyeditor.cpp @@ -57,7 +57,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tools/designer/designer/propertyobject.cpp b/tools/designer/designer/propertyobject.cpp index 61c789d27..5d4319541 100644 --- a/tools/designer/designer/propertyobject.cpp +++ b/tools/designer/designer/propertyobject.cpp @@ -35,7 +35,7 @@ #include "metadatabase.h" #include #include -#include +#include #include PropertyObject::PropertyObject( const TQWidgetList &objs ) diff --git a/tools/designer/designer/resource.cpp b/tools/designer/designer/resource.cpp index 397ea0618..d7f963213 100644 --- a/tools/designer/designer/resource.cpp +++ b/tools/designer/designer/resource.cpp @@ -65,8 +65,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/tools/designer/designer/sourceeditor.cpp b/tools/designer/designer/sourceeditor.cpp index e876be9ab..46fc9319a 100644 --- a/tools/designer/designer/sourceeditor.cpp +++ b/tools/designer/designer/sourceeditor.cpp @@ -42,7 +42,7 @@ #include "project.h" #include "sourcefile.h" #include "hierarchyview.h" -#include +#include #include SourceEditor::SourceEditor( TQWidget *parent, EditorInterface *iface, LanguageInterface *liface ) diff --git a/tools/designer/designer/sourcefile.cpp b/tools/designer/designer/sourcefile.cpp index b0d21b2a8..dbf47f9ef 100644 --- a/tools/designer/designer/sourcefile.cpp +++ b/tools/designer/designer/sourcefile.cpp @@ -39,7 +39,7 @@ #include "metadatabase.h" #include "../interfaces/languageinterface.h" #include -#include +#include #include "mainwindow.h" #include "workspace.h" #include diff --git a/tools/designer/designer/variabledialogimpl.cpp b/tools/designer/designer/variabledialogimpl.cpp index d0698d4ff..1c2d0a9ef 100644 --- a/tools/designer/designer/variabledialogimpl.cpp +++ b/tools/designer/designer/variabledialogimpl.cpp @@ -35,7 +35,7 @@ #include #include #include -#include +#include #include "metadatabase.h" #include "formwindow.h" diff --git a/tools/designer/designer/widgetfactory.cpp b/tools/designer/designer/widgetfactory.cpp index 5cb6fc6af..4f30b6fc3 100644 --- a/tools/designer/designer/widgetfactory.cpp +++ b/tools/designer/designer/widgetfactory.cpp @@ -83,7 +83,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tools/designer/examples/colortool/mainform.ui b/tools/designer/examples/colortool/mainform.ui index 6a054f59e..43c77db51 100644 --- a/tools/designer/examples/colortool/mainform.ui +++ b/tools/designer/examples/colortool/mainform.ui @@ -525,7 +525,7 @@ tqstring.h tqpainter.h tqstatusbar.h - ntqmessagebox.h + tqmessagebox.h tqclipboard.h tqlabel.h tqlineedit.h diff --git a/tools/designer/examples/richedit/richedit.ui b/tools/designer/examples/richedit/richedit.ui index 204ba2302..88e829a90 100644 --- a/tools/designer/examples/richedit/richedit.ui +++ b/tools/designer/examples/richedit/richedit.ui @@ -2,7 +2,7 @@ EditorForm tqfile.h tqfontdatabase.h -ntqmessagebox.h +tqmessagebox.h ntqapplication.h tqfiledialog.h tqtextstream.h diff --git a/tools/designer/plugins/cppeditor/cppcompletion.cpp b/tools/designer/plugins/cppeditor/cppcompletion.cpp index 4f4cd52ea..bef386eef 100644 --- a/tools/designer/plugins/cppeditor/cppcompletion.cpp +++ b/tools/designer/plugins/cppeditor/cppcompletion.cpp @@ -34,7 +34,7 @@ #include "cppcompletion.h" #include -#include +#include #include #include diff --git a/tools/designer/plugins/cppeditor/languageinterfaceimpl.cpp b/tools/designer/plugins/cppeditor/languageinterfaceimpl.cpp index 3e7d81c07..2b85ee919 100644 --- a/tools/designer/plugins/cppeditor/languageinterfaceimpl.cpp +++ b/tools/designer/plugins/cppeditor/languageinterfaceimpl.cpp @@ -37,7 +37,7 @@ #include #include #include "yyreg.h" -#include +#include LanguageInterfaceImpl::LanguageInterfaceImpl( TQUnknownInterface *outer ) : parent( outer ), ref( 0 ) diff --git a/tools/designer/plugins/dlg/dlg2ui.cpp b/tools/designer/plugins/dlg/dlg2ui.cpp index 2d4087729..0529b97e3 100644 --- a/tools/designer/plugins/dlg/dlg2ui.cpp +++ b/tools/designer/plugins/dlg/dlg2ui.cpp @@ -37,7 +37,7 @@ #include "dlg2ui.h" #include #include -#include +#include #include #include diff --git a/tools/designer/plugins/glade/glade2ui.cpp b/tools/designer/plugins/glade/glade2ui.cpp index 49027ba4a..3ede1321d 100644 --- a/tools/designer/plugins/glade/glade2ui.cpp +++ b/tools/designer/plugins/glade/glade2ui.cpp @@ -40,7 +40,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tools/designer/shared/domtool.h b/tools/designer/shared/domtool.h index 8eea8d676..26c7b6803 100644 --- a/tools/designer/shared/domtool.h +++ b/tools/designer/shared/domtool.h @@ -35,7 +35,7 @@ #define DOMTOOL_H #include -#include +#include class TQDomElement; class TQDomDocument; diff --git a/tools/designer/shared/widgetdatabase.cpp b/tools/designer/shared/widgetdatabase.cpp index 23f59ded6..a4532401f 100644 --- a/tools/designer/shared/widgetdatabase.cpp +++ b/tools/designer/shared/widgetdatabase.cpp @@ -72,8 +72,8 @@ static TQString converted_widgets[] = "TQHBox", "TQHButtonGroup", "TQHeader", "TQHGroupBox", "TQIconView", "TQInputDialog", "TQLabel", "TQLCDNumber", "TQLineEdit", "TQListBox", "TQListView", - "TQMainWindow", "TQMenuBar", "TQMultiLineEdit", - "TQPopupMenu", "TQProgressBar", "TQProgressDialog", "TQPushButton", + "TQMainWindow", "TQMenuBar", "TQMessageBox", "TQMultiLineEdit", + "TQPopupMenu", "TQPrintDialog", "TQProgressBar", "TQProgressDialog", "TQPushButton", "TQRadioButton", "TQScrollBar", "TQScrollView", "TQSizeGrip", "TQSlider", "TQSpinBox", "TQStatusBar", "TQTabBar", "TQTabDialog", "TQTabWidget", "TQTable", "TQTextBrowser", "TQTextEdit", "TQTextView", "TQToolBar", "TQToolBox", "TQToolButton", "TQToolTip", diff --git a/tools/designer/tools/tqtcreatecw/main.cpp b/tools/designer/tools/tqtcreatecw/main.cpp index e925c9a67..02633f37d 100644 --- a/tools/designer/tools/tqtcreatecw/main.cpp +++ b/tools/designer/tools/tqtcreatecw/main.cpp @@ -35,7 +35,7 @@ #include #include #include -#include +#include #include // STEP1: Include header files of the widgets for which a description diff --git a/tools/designer/uilib/tqwidgetfactory.cpp b/tools/designer/uilib/tqwidgetfactory.cpp index 0d765e781..39b9bf079 100644 --- a/tools/designer/uilib/tqwidgetfactory.cpp +++ b/tools/designer/uilib/tqwidgetfactory.cpp @@ -41,7 +41,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tools/linguist/linguist/phrase.cpp b/tools/linguist/linguist/phrase.cpp index 30e010408..44b380571 100644 --- a/tools/linguist/linguist/phrase.cpp +++ b/tools/linguist/linguist/phrase.cpp @@ -36,7 +36,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tools/linguist/linguist/phrasebookbox.cpp b/tools/linguist/linguist/phrasebookbox.cpp index b18afc0e8..093c68daf 100644 --- a/tools/linguist/linguist/phrasebookbox.cpp +++ b/tools/linguist/linguist/phrasebookbox.cpp @@ -44,7 +44,7 @@ #include #include #include -#include +#include #include #include diff --git a/tools/linguist/linguist/trwindow.cpp b/tools/linguist/linguist/trwindow.cpp index 28e87bf9e..790695759 100644 --- a/tools/linguist/linguist/trwindow.cpp +++ b/tools/linguist/linguist/trwindow.cpp @@ -60,7 +60,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tools/linguist/shared/metatranslator.cpp b/tools/linguist/shared/metatranslator.cpp index a9ab53120..6c63a9871 100644 --- a/tools/linguist/shared/metatranslator.cpp +++ b/tools/linguist/shared/metatranslator.cpp @@ -36,7 +36,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tools/linguist/tutorial/tt3/mainwindow.cpp b/tools/linguist/tutorial/tt3/mainwindow.cpp index 70483b991..ad3e41cf9 100644 --- a/tools/linguist/tutorial/tt3/mainwindow.cpp +++ b/tools/linguist/tutorial/tt3/mainwindow.cpp @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include MainWindow::MainWindow( TQWidget *parent, const char *name ) diff --git a/tools/qconfig/main.cpp b/tools/qconfig/main.cpp index 52fe4407f..9dd943b75 100644 --- a/tools/qconfig/main.cpp +++ b/tools/qconfig/main.cpp @@ -38,7 +38,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tools/qtconfig/mainwindow.cpp b/tools/qtconfig/mainwindow.cpp index 06b6b5ec0..a3d0a14f8 100644 --- a/tools/qtconfig/mainwindow.cpp +++ b/tools/qtconfig/mainwindow.cpp @@ -51,7 +51,7 @@ #include #include #include -#include +#include #include #include diff --git a/translations/qt_ar.ts b/translations/qt_ar.ts index 882e715bd..ad788413a 100644 --- a/translations/qt_ar.ts +++ b/translations/qt_ar.ts @@ -1233,7 +1233,7 @@ to - QMessageBox + TQMessageBox OK موافقة @@ -1275,7 +1275,7 @@ to - QPrintDialog + TQPrintDialog locally connected موصل محليّا diff --git a/translations/qt_ca.ts b/translations/qt_ca.ts index edc12d575..e19912815 100644 --- a/translations/qt_ca.ts +++ b/translations/qt_ca.ts @@ -1234,7 +1234,7 @@ a - QMessageBox + TQMessageBox OK @@ -1283,7 +1283,7 @@ per a més informació.</p> - QPrintDialog + TQPrintDialog locally connected connectat localment diff --git a/translations/qt_cs.ts b/translations/qt_cs.ts index 9d46d8e13..747b0268f 100644 --- a/translations/qt_cs.ts +++ b/translations/qt_cs.ts @@ -1235,7 +1235,7 @@ na(new line) - QMessageBox + TQMessageBox OK OK @@ -1283,7 +1283,7 @@ dalšími verzemi Unixu s grafickým prostředím X11. - QPrintDialog + TQPrintDialog locally connected připojen lokálně diff --git a/translations/qt_de.ts b/translations/qt_de.ts index f572717e8..f997b0366 100644 --- a/translations/qt_de.ts +++ b/translations/qt_de.ts @@ -1328,7 +1328,7 @@ nach - QMessageBox + TQMessageBox OK OK @@ -1374,7 +1374,7 @@ nach - QPrintDialog + TQPrintDialog locally connected direkt verbunden diff --git a/translations/qt_es.ts b/translations/qt_es.ts index 5ba68121f..2570cb1b6 100644 --- a/translations/qt_es.ts +++ b/translations/qt_es.ts @@ -1235,7 +1235,7 @@ a - QMessageBox + TQMessageBox OK OK @@ -1277,7 +1277,7 @@ a - QPrintDialog + TQPrintDialog locally connected Conectada localmente diff --git a/translations/qt_fr.ts b/translations/qt_fr.ts index fecd9cb29..9618ae8d4 100644 --- a/translations/qt_fr.ts +++ b/translations/qt_fr.ts @@ -1335,7 +1335,7 @@ en - QMessageBox + TQMessageBox OK OK @@ -1381,7 +1381,7 @@ en - QPrintDialog + TQPrintDialog locally connected connecté en local diff --git a/translations/qt_he.ts b/translations/qt_he.ts index 3a14acd21..48bec70a8 100644 --- a/translations/qt_he.ts +++ b/translations/qt_he.ts @@ -1321,7 +1321,7 @@ to - QMessageBox + TQMessageBox OK אישור @@ -1371,7 +1371,7 @@ to - QPrintDialog + TQPrintDialog locally connected מחוברת מקומית diff --git a/translations/qt_it.ts b/translations/qt_it.ts index 343cc1eae..905b57113 100644 --- a/translations/qt_it.ts +++ b/translations/qt_it.ts @@ -1235,7 +1235,7 @@ in - QMessageBox + TQMessageBox OK OK @@ -1277,7 +1277,7 @@ in - QPrintDialog + TQPrintDialog locally connected connesso localmente diff --git a/translations/qt_ja.ts b/translations/qt_ja.ts index 01edcd951..efed90783 100644 --- a/translations/qt_ja.ts +++ b/translations/qt_ja.ts @@ -1233,7 +1233,7 @@ to - QMessageBox + TQMessageBox OK OK @@ -1275,7 +1275,7 @@ to - QPrintDialog + TQPrintDialog locally connected ローカルに接続しています diff --git a/translations/qt_nb.ts b/translations/qt_nb.ts index 900b781a8..37397bff9 100644 --- a/translations/qt_nb.ts +++ b/translations/qt_nb.ts @@ -1235,7 +1235,7 @@ til - QMessageBox + TQMessageBox OK OK @@ -1277,7 +1277,7 @@ til - QPrintDialog + TQPrintDialog locally connected lokal tilkobling diff --git a/translations/qt_pt-br.ts b/translations/qt_pt-br.ts index 59022dd03..90ed5a4c9 100644 --- a/translations/qt_pt-br.ts +++ b/translations/qt_pt-br.ts @@ -1235,7 +1235,7 @@ para - QMessageBox + TQMessageBox OK OK @@ -1277,7 +1277,7 @@ para - QPrintDialog + TQPrintDialog locally connected conectado localmente diff --git a/translations/qt_pt.ts b/translations/qt_pt.ts index c2dadd1cf..aa728eb68 100644 --- a/translations/qt_pt.ts +++ b/translations/qt_pt.ts @@ -1235,7 +1235,7 @@ para - QMessageBox + TQMessageBox OK OK @@ -1277,7 +1277,7 @@ para - QPrintDialog + TQPrintDialog locally connected ligado localmente diff --git a/translations/qt_ru.ts b/translations/qt_ru.ts index 41e0bbebe..e76288ff1 100644 --- a/translations/qt_ru.ts +++ b/translations/qt_ru.ts @@ -1433,7 +1433,7 @@ to - QMessageBox + TQMessageBox OK OK @@ -1494,7 +1494,7 @@ to - QPrintDialog + TQPrintDialog locally connected локальный diff --git a/translations/qt_sk.ts b/translations/qt_sk.ts index f7435ec85..0f8a78b6d 100644 --- a/translations/qt_sk.ts +++ b/translations/qt_sk.ts @@ -1235,7 +1235,7 @@ na - QMessageBox + TQMessageBox OK OK @@ -1284,7 +1284,7 @@ Mac&nbsp;OS&nbsp;X, Linux, a mnohé ďalšie komerčné verzie Unixu. - QPrintDialog + TQPrintDialog locally connected pripojený lokálne diff --git a/translations/qt_tr.ts b/translations/qt_tr.ts index d2d56dc65..7ef64db17 100644 --- a/translations/qt_tr.ts +++ b/translations/qt_tr.ts @@ -1216,7 +1216,7 @@ to - QMessageBox + TQMessageBox OK @@ -1258,7 +1258,7 @@ to - QPrintDialog + TQPrintDialog locally connected diff --git a/translations/qt_zh-cn.ts b/translations/qt_zh-cn.ts index 36b44ea95..dd132e36c 100644 --- a/translations/qt_zh-cn.ts +++ b/translations/qt_zh-cn.ts @@ -1232,7 +1232,7 @@ to - QMessageBox + TQMessageBox OK 确定 @@ -1274,7 +1274,7 @@ to - QPrintDialog + TQPrintDialog locally connected 已建立本地连接 diff --git a/translations/qt_zh-tw.ts b/translations/qt_zh-tw.ts index 46aa94fcc..18e42dbdd 100644 --- a/translations/qt_zh-tw.ts +++ b/translations/qt_zh-tw.ts @@ -1233,7 +1233,7 @@ to - QMessageBox + TQMessageBox OK 確定 @@ -1275,7 +1275,7 @@ to - QPrintDialog + TQPrintDialog locally connected 本機連接 diff --git a/translations/template.ts b/translations/template.ts index b74febca7..07432c421 100644 --- a/translations/template.ts +++ b/translations/template.ts @@ -1214,7 +1214,7 @@ to - QMessageBox + TQMessageBox OK @@ -1256,7 +1256,7 @@ to - QPrintDialog + TQPrintDialog locally connected -- cgit v1.2.1