From 0a80cfd57d271dd44221467efb426675fa470356 Mon Sep 17 00:00:00 2001 From: tpearson Date: Tue, 28 Jun 2011 18:31:12 +0000 Subject: TQt4 port kvirc This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kvirc@1238719 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- admin/acinclude.m4.in | 131 ++-- data/defscript/aliases.kvs | 30 +- data/defscript/installer.kvs | 6 +- data/defscript/popups.kvs | 178 ++--- data/deftheme/silverirc/themedata.kvc | 2 +- data/doctemplates/rfc2812.template | 110 +-- data/resources_mac/kvirc.icns | Bin 52772 -> 52771 bytes src/config.h.in | 2 +- src/kvi_configstatus.h | 2 +- src/kvilib/config/kvi_debug.h | 2 +- src/kvilib/config/kvi_defaults.h | 4 +- src/kvilib/config/kvi_settings.h | 2 +- src/kvilib/config/kvi_wincfg.h | 4 +- src/kvilib/core/kvi_error.cpp | 6 +- src/kvilib/core/kvi_error.h | 2 +- src/kvilib/core/kvi_pointerhashtable.h | 54 +- src/kvilib/core/kvi_pointerlist.h | 34 +- src/kvilib/core/kvi_qcstring.h | 16 +- src/kvilib/core/kvi_qstring.cpp | 410 +++++------ src/kvilib/core/kvi_qstring.h | 207 +++--- src/kvilib/core/kvi_string.cpp | 100 +-- src/kvilib/core/kvi_string.h | 36 +- src/kvilib/core/kvi_valuelist.h | 6 +- src/kvilib/ext/kvi_accel.h | 6 +- src/kvilib/ext/kvi_cmdformatter.cpp | 50 +- src/kvilib/ext/kvi_cmdformatter.h | 20 +- src/kvilib/ext/kvi_config.cpp | 266 ++++---- src/kvilib/ext/kvi_config.h | 112 +-- src/kvilib/ext/kvi_crypt.cpp | 12 +- src/kvilib/ext/kvi_crypt.h | 27 +- src/kvilib/ext/kvi_databuffer.cpp | 4 +- src/kvilib/ext/kvi_databuffer.h | 4 +- src/kvilib/ext/kvi_dcophelper.cpp | 154 ++--- src/kvilib/ext/kvi_dcophelper.h | 44 +- src/kvilib/ext/kvi_doublebuffer.cpp | 14 +- src/kvilib/ext/kvi_doublebuffer.h | 4 +- src/kvilib/ext/kvi_draganddrop.h | 12 +- src/kvilib/ext/kvi_garbage.cpp | 28 +- src/kvilib/ext/kvi_garbage.h | 13 +- src/kvilib/ext/kvi_imagelib.cpp | 34 +- src/kvilib/ext/kvi_imagelib.h | 18 +- src/kvilib/ext/kvi_mediatype.cpp | 48 +- src/kvilib/ext/kvi_mediatype.h | 2 +- src/kvilib/ext/kvi_miscutils.cpp | 24 +- src/kvilib/ext/kvi_miscutils.h | 4 +- src/kvilib/ext/kvi_osinfo.cpp | 56 +- src/kvilib/ext/kvi_osinfo.h | 16 +- src/kvilib/ext/kvi_parameterlist.cpp | 24 +- src/kvilib/ext/kvi_parameterlist.h | 12 +- src/kvilib/ext/kvi_pixmap.cpp | 32 +- src/kvilib/ext/kvi_pixmap.h | 18 +- src/kvilib/ext/kvi_proxydb.cpp | 4 +- src/kvilib/ext/kvi_proxydb.h | 4 +- src/kvilib/ext/kvi_regchan.cpp | 22 +- src/kvilib/ext/kvi_regchan.h | 10 +- src/kvilib/ext/kvi_regusersdb.cpp | 318 ++++----- src/kvilib/ext/kvi_regusersdb.h | 115 ++-- src/kvilib/ext/kvi_sharedfiles.cpp | 104 +-- src/kvilib/ext/kvi_sharedfiles.h | 39 +- src/kvilib/ext/kvi_stringconversion.cpp | 100 +-- src/kvilib/ext/kvi_stringconversion.h | 78 +-- src/kvilib/ext/kvi_xlib.h | 2 +- src/kvilib/ext/moc_kvi_crypt.cpp | 80 +-- src/kvilib/ext/moc_kvi_garbage.cpp | 90 +-- src/kvilib/ext/moc_kvi_regusersdb.cpp | 132 ++-- src/kvilib/ext/moc_kvi_sharedfiles.cpp | 136 ++-- src/kvilib/file/kvi_file.cpp | 32 +- src/kvilib/file/kvi_file.h | 32 +- src/kvilib/file/kvi_fileutils.cpp | 204 +++--- src/kvilib/file/kvi_fileutils.h | 58 +- src/kvilib/file/kvi_packagefile.cpp | 174 ++--- src/kvilib/file/kvi_packagefile.h | 62 +- src/kvilib/irc/kvi_avatar.cpp | 16 +- src/kvilib/irc/kvi_avatar.h | 24 +- src/kvilib/irc/kvi_avatarcache.cpp | 50 +- src/kvilib/irc/kvi_avatarcache.h | 14 +- src/kvilib/irc/kvi_ircmask.cpp | 196 +++--- src/kvilib/irc/kvi_ircmask.h | 76 +-- src/kvilib/irc/kvi_ircserver.cpp | 146 ++-- src/kvilib/irc/kvi_ircserver.h | 170 ++--- src/kvilib/irc/kvi_ircserverdb.cpp | 168 ++--- src/kvilib/irc/kvi_ircserverdb.h | 36 +- src/kvilib/irc/kvi_ircuserdb.cpp | 62 +- src/kvilib/irc/kvi_ircuserdb.h | 59 +- src/kvilib/irc/kvi_mirccntrl.cpp | 22 +- src/kvilib/irc/kvi_mirccntrl.h | 12 +- src/kvilib/irc/kvi_nickserv.cpp | 98 +-- src/kvilib/irc/kvi_nickserv.h | 68 +- src/kvilib/irc/kvi_useridentity.cpp | 58 +- src/kvilib/irc/kvi_useridentity.h | 120 ++-- src/kvilib/irc/moc_kvi_ircuserdb.cpp | 116 ++-- src/kvilib/net/kvi_dns.cpp | 58 +- src/kvilib/net/kvi_dns.h | 41 +- src/kvilib/net/kvi_http.cpp | 154 ++--- src/kvilib/net/kvi_http.h | 59 +- src/kvilib/net/kvi_netutils.cpp | 56 +- src/kvilib/net/kvi_netutils.h | 28 +- src/kvilib/net/kvi_socket.h | 2 +- src/kvilib/net/kvi_ssl.cpp | 6 +- src/kvilib/net/kvi_url.cpp | 2 +- src/kvilib/net/kvi_url.h | 2 +- src/kvilib/net/moc_kvi_dns.cpp | 114 ++-- src/kvilib/net/moc_kvi_http.cpp | 250 +++---- src/kvilib/system/kvi_locale.cpp | 206 +++--- src/kvilib/system/kvi_locale.h | 57 +- src/kvilib/system/kvi_process.h | 6 +- src/kvilib/system/kvi_stdarg.h | 2 +- src/kvilib/system/kvi_thread.cpp | 32 +- src/kvilib/system/kvi_thread.h | 35 +- src/kvilib/system/kvi_time.cpp | 18 +- src/kvilib/system/kvi_time.h | 4 +- src/kvilib/system/moc_kvi_locale.cpp | 80 +-- src/kvilib/system/moc_kvi_thread.cpp | 92 +-- src/kvilib/tal/kvi_tal_application.cpp | 2 +- src/kvilib/tal/kvi_tal_application_kde.h | 1 + src/kvilib/tal/kvi_tal_application_qt.h | 11 +- src/kvilib/tal/kvi_tal_filedialog.cpp | 50 +- src/kvilib/tal/kvi_tal_filedialog_kde.h | 15 +- src/kvilib/tal/kvi_tal_filedialog_qt.h | 19 +- src/kvilib/tal/kvi_tal_filedialog_qt4.h | 15 +- src/kvilib/tal/kvi_tal_grid_qt3.h | 9 +- src/kvilib/tal/kvi_tal_grid_qt4.h | 5 +- src/kvilib/tal/kvi_tal_groupbox_qt3.h | 21 +- src/kvilib/tal/kvi_tal_groupbox_qt4.h | 19 +- src/kvilib/tal/kvi_tal_hbox_qt3.h | 9 +- src/kvilib/tal/kvi_tal_hbox_qt4.h | 5 +- src/kvilib/tal/kvi_tal_iconview.cpp | 104 +-- src/kvilib/tal/kvi_tal_iconview_qt3.h | 87 +-- src/kvilib/tal/kvi_tal_iconview_qt4.h | 57 +- src/kvilib/tal/kvi_tal_listbox.cpp | 218 +++--- src/kvilib/tal/kvi_tal_listbox.h | 10 +- src/kvilib/tal/kvi_tal_listbox_qt3.h | 107 +-- src/kvilib/tal/kvi_tal_listbox_qt4.h | 63 +- src/kvilib/tal/kvi_tal_listview.cpp | 604 ++++++++-------- src/kvilib/tal/kvi_tal_listview.h | 10 +- src/kvilib/tal/kvi_tal_listview_qt3.h | 141 ++-- src/kvilib/tal/kvi_tal_listview_qt4.h | 93 +-- src/kvilib/tal/kvi_tal_mainwindow.cpp | 14 +- src/kvilib/tal/kvi_tal_mainwindow_kde.h | 3 +- src/kvilib/tal/kvi_tal_mainwindow_qt3.h | 13 +- src/kvilib/tal/kvi_tal_mainwindow_qt4.h | 13 +- src/kvilib/tal/kvi_tal_menubar.cpp | 8 +- src/kvilib/tal/kvi_tal_menubar_kde.h | 3 +- src/kvilib/tal/kvi_tal_menubar_qt.h | 13 +- src/kvilib/tal/kvi_tal_popupmenu_qt3.h | 9 +- src/kvilib/tal/kvi_tal_popupmenu_qt4.h | 37 +- src/kvilib/tal/kvi_tal_scrollview_qt3.h | 9 +- src/kvilib/tal/kvi_tal_scrollview_qt4.h | 5 +- src/kvilib/tal/kvi_tal_tabdialog_qt3.h | 9 +- src/kvilib/tal/kvi_tal_tabdialog_qt4.h | 5 +- src/kvilib/tal/kvi_tal_textedit_qt3.h | 9 +- src/kvilib/tal/kvi_tal_textedit_qt4.h | 5 +- src/kvilib/tal/kvi_tal_toolbar.cpp | 40 +- src/kvilib/tal/kvi_tal_toolbar_kde.h | 3 +- src/kvilib/tal/kvi_tal_toolbar_qt3.h | 17 +- src/kvilib/tal/kvi_tal_toolbar_qt4.h | 19 +- src/kvilib/tal/kvi_tal_toolbardocktype.h | 61 +- src/kvilib/tal/kvi_tal_tooltip.cpp | 34 +- src/kvilib/tal/kvi_tal_tooltip.h | 29 +- src/kvilib/tal/kvi_tal_vbox_qt3.h | 9 +- src/kvilib/tal/kvi_tal_vbox_qt4.h | 5 +- src/kvilib/tal/kvi_tal_widgetstack_qt3.h | 9 +- src/kvilib/tal/kvi_tal_widgetstack_qt4.h | 7 +- src/kvilib/tal/kvi_tal_windowstate.h | 12 +- src/kvilib/tal/kvi_tal_wizard.cpp | 192 +++--- src/kvilib/tal/kvi_tal_wizard.h | 49 +- src/kvilib/tal/moc_kvi_tal_wizard.cpp | 110 +-- src/kvirc/kernel/kvi_action.cpp | 70 +- src/kvirc/kernel/kvi_action.h | 71 +- src/kvirc/kernel/kvi_actionmanager.cpp | 68 +- src/kvirc/kernel/kvi_actionmanager.h | 31 +- src/kvirc/kernel/kvi_app.cpp | 330 ++++----- src/kvirc/kernel/kvi_app.h | 93 +-- src/kvirc/kernel/kvi_app_fs.cpp | 160 ++--- src/kvirc/kernel/kvi_app_setup.cpp | 122 ++-- src/kvirc/kernel/kvi_asynchronousconnectiondata.h | 14 +- src/kvirc/kernel/kvi_coreactionnames.h | 2 +- src/kvirc/kernel/kvi_coreactions.cpp | 246 +++---- src/kvirc/kernel/kvi_coreactions.h | 65 +- src/kvirc/kernel/kvi_customtoolbardescriptor.cpp | 62 +- src/kvirc/kernel/kvi_customtoolbardescriptor.h | 30 +- src/kvirc/kernel/kvi_customtoolbarmanager.cpp | 62 +- src/kvirc/kernel/kvi_customtoolbarmanager.h | 20 +- src/kvirc/kernel/kvi_filetransfer.cpp | 24 +- src/kvirc/kernel/kvi_filetransfer.h | 18 +- src/kvirc/kernel/kvi_iconmanager.cpp | 182 ++--- src/kvirc/kernel/kvi_iconmanager.h | 90 +-- src/kvirc/kernel/kvi_internalcmd.h | 2 +- src/kvirc/kernel/kvi_ipc.cpp | 22 +- src/kvirc/kernel/kvi_ipc.h | 7 +- src/kvirc/kernel/kvi_ircconnection.cpp | 146 ++-- src/kvirc/kernel/kvi_ircconnection.h | 47 +- .../kernel/kvi_ircconnectionasyncwhoisdata.cpp | 4 +- src/kvirc/kernel/kvi_ircconnectionasyncwhoisdata.h | 24 +- .../kernel/kvi_ircconnectionnetsplitdetectordata.h | 6 +- src/kvirc/kernel/kvi_ircconnectionserverinfo.cpp | 96 +-- src/kvirc/kernel/kvi_ircconnectionserverinfo.h | 82 +-- src/kvirc/kernel/kvi_ircconnectionstatedata.h | 6 +- src/kvirc/kernel/kvi_ircconnectiontarget.cpp | 6 +- src/kvirc/kernel/kvi_ircconnectiontarget.h | 12 +- .../kernel/kvi_ircconnectiontargetresolver.cpp | 62 +- src/kvirc/kernel/kvi_ircconnectiontargetresolver.h | 19 +- src/kvirc/kernel/kvi_ircconnectionuserinfo.cpp | 12 +- src/kvirc/kernel/kvi_ircconnectionuserinfo.h | 68 +- src/kvirc/kernel/kvi_irccontext.cpp | 60 +- src/kvirc/kernel/kvi_irccontext.h | 17 +- src/kvirc/kernel/kvi_irclink.cpp | 18 +- src/kvirc/kernel/kvi_irclink.h | 7 +- src/kvirc/kernel/kvi_ircsocket.cpp | 110 +-- src/kvirc/kernel/kvi_ircsocket.h | 33 +- src/kvirc/kernel/kvi_ircurl.cpp | 46 +- src/kvirc/kernel/kvi_ircurl.h | 14 +- src/kvirc/kernel/kvi_lagmeter.cpp | 10 +- src/kvirc/kernel/kvi_lagmeter.h | 7 +- src/kvirc/kernel/kvi_main.cpp | 150 ++-- src/kvirc/kernel/kvi_notifylist.cpp | 268 ++++---- src/kvirc/kernel/kvi_notifylist.h | 46 +- src/kvirc/kernel/kvi_options.cpp | 130 ++-- src/kvirc/kernel/kvi_options.h | 28 +- src/kvirc/kernel/kvi_out.h | 18 +- src/kvirc/kernel/kvi_sslmaster.cpp | 4 +- src/kvirc/kernel/kvi_texticonmanager.cpp | 60 +- src/kvirc/kernel/kvi_texticonmanager.h | 29 +- src/kvirc/kernel/kvi_theme.cpp | 88 +-- src/kvirc/kernel/kvi_theme.h | 86 +-- src/kvirc/kernel/kvi_userinput.cpp | 58 +- src/kvirc/kernel/kvi_userinput.h | 8 +- src/kvirc/kernel/moc_kvi_action.cpp | 124 ++-- src/kvirc/kernel/moc_kvi_actionmanager.cpp | 114 ++-- src/kvirc/kernel/moc_kvi_coreactions.cpp | 748 ++++++++++---------- src/kvirc/kernel/moc_kvi_filetransfer.cpp | 186 ++--- src/kvirc/kernel/moc_kvi_ircconnection.cpp | 180 ++--- .../kernel/moc_kvi_ircconnectiontargetresolver.cpp | 114 ++-- src/kvirc/kernel/moc_kvi_irccontext.cpp | 98 +-- src/kvirc/kernel/moc_kvi_irclink.cpp | 98 +-- src/kvirc/kernel/moc_kvi_ircsocket.cpp | 140 ++-- src/kvirc/kvs/kvi_kvs.cpp | 20 +- src/kvirc/kvs/kvi_kvs.h | 20 +- src/kvirc/kvs/kvi_kvs_action.cpp | 18 +- src/kvirc/kvs/kvi_kvs_action.h | 17 +- src/kvirc/kvs/kvi_kvs_aliasmanager.cpp | 24 +- src/kvirc/kvs/kvi_kvs_aliasmanager.h | 20 +- src/kvirc/kvs/kvi_kvs_array.cpp | 6 +- src/kvirc/kvs/kvi_kvs_array.h | 4 +- src/kvirc/kvs/kvi_kvs_asyncdnsoperation.cpp | 24 +- src/kvirc/kvs/kvi_kvs_asyncdnsoperation.h | 5 +- src/kvirc/kvs/kvi_kvs_asyncoperation.cpp | 2 +- src/kvirc/kvs/kvi_kvs_asyncoperation.h | 5 +- src/kvirc/kvs/kvi_kvs_callbackobject.cpp | 6 +- src/kvirc/kvs/kvi_kvs_callbackobject.h | 8 +- src/kvirc/kvs/kvi_kvs_corecallbackcommands.cpp | 104 +-- src/kvirc/kvs/kvi_kvs_corecallbackcommands.h | 2 +- src/kvirc/kvs/kvi_kvs_corefunctions.cpp | 10 +- src/kvirc/kvs/kvi_kvs_corefunctions.h | 6 +- src/kvirc/kvs/kvi_kvs_corefunctions_af.cpp | 80 +-- src/kvirc/kvs/kvi_kvs_corefunctions_gl.cpp | 38 +- src/kvirc/kvs/kvi_kvs_corefunctions_mr.cpp | 70 +- src/kvirc/kvs/kvi_kvs_corefunctions_sz.cpp | 70 +- src/kvirc/kvs/kvi_kvs_coresimplecommands.cpp | 30 +- src/kvirc/kvs/kvi_kvs_coresimplecommands.h | 2 +- src/kvirc/kvs/kvi_kvs_coresimplecommands_af.cpp | 154 ++--- src/kvirc/kvs/kvi_kvs_coresimplecommands_gl.cpp | 84 +-- src/kvirc/kvs/kvi_kvs_coresimplecommands_mr.cpp | 186 ++--- src/kvirc/kvs/kvi_kvs_coresimplecommands_sz.cpp | 74 +- src/kvirc/kvs/kvi_kvs_dnsmanager.cpp | 28 +- src/kvirc/kvs/kvi_kvs_dnsmanager.h | 13 +- src/kvirc/kvs/kvi_kvs_event.h | 8 +- src/kvirc/kvs/kvi_kvs_eventhandler.cpp | 4 +- src/kvirc/kvs/kvi_kvs_eventhandler.h | 10 +- src/kvirc/kvs/kvi_kvs_eventmanager.cpp | 94 +-- src/kvirc/kvs/kvi_kvs_eventmanager.h | 24 +- src/kvirc/kvs/kvi_kvs_eventtable.cpp | 76 +-- src/kvirc/kvs/kvi_kvs_hash.cpp | 24 +- src/kvirc/kvs/kvi_kvs_hash.h | 18 +- src/kvirc/kvs/kvi_kvs_kernel.cpp | 70 +- src/kvirc/kvs/kvi_kvs_kernel.h | 62 +- src/kvirc/kvs/kvi_kvs_moduleinterface.cpp | 36 +- src/kvirc/kvs/kvi_kvs_moduleinterface.h | 42 +- src/kvirc/kvs/kvi_kvs_object.cpp | 378 +++++----- src/kvirc/kvs/kvi_kvs_object.h | 67 +- src/kvirc/kvs/kvi_kvs_object_class.cpp | 52 +- src/kvirc/kvs/kvi_kvs_object_class.h | 42 +- src/kvirc/kvs/kvi_kvs_object_controller.cpp | 42 +- src/kvirc/kvs/kvi_kvs_object_controller.h | 8 +- src/kvirc/kvs/kvi_kvs_object_functionhandler.cpp | 4 +- src/kvirc/kvs/kvi_kvs_object_functionhandler.h | 2 +- .../kvs/kvi_kvs_object_functionhandlerimpl.cpp | 4 +- src/kvirc/kvs/kvi_kvs_object_functionhandlerimpl.h | 4 +- src/kvirc/kvs/kvi_kvs_parameterprocessor.cpp | 84 +-- src/kvirc/kvs/kvi_kvs_parameterprocessor.h | 14 +- src/kvirc/kvs/kvi_kvs_parser.cpp | 140 ++-- src/kvirc/kvs/kvi_kvs_parser.h | 24 +- src/kvirc/kvs/kvi_kvs_parser_command.cpp | 24 +- src/kvirc/kvs/kvi_kvs_parser_comment.cpp | 4 +- src/kvirc/kvs/kvi_kvs_parser_dollar.cpp | 26 +- src/kvirc/kvs/kvi_kvs_parser_expression.cpp | 18 +- src/kvirc/kvs/kvi_kvs_parser_lside.cpp | 42 +- src/kvirc/kvs/kvi_kvs_parser_macros.h | 8 +- src/kvirc/kvs/kvi_kvs_parser_specialcommands.cpp | 184 ++--- src/kvirc/kvs/kvi_kvs_popupmanager.cpp | 16 +- src/kvirc/kvs/kvi_kvs_popupmanager.h | 16 +- src/kvirc/kvs/kvi_kvs_popupmenu.cpp | 340 ++++----- src/kvirc/kvs/kvi_kvs_popupmenu.h | 86 +-- src/kvirc/kvs/kvi_kvs_processmanager.cpp | 72 +- src/kvirc/kvs/kvi_kvs_processmanager.h | 17 +- src/kvirc/kvs/kvi_kvs_report.cpp | 72 +- src/kvirc/kvs/kvi_kvs_report.h | 36 +- src/kvirc/kvs/kvi_kvs_runtimecall.cpp | 6 +- src/kvirc/kvs/kvi_kvs_runtimecall.h | 6 +- src/kvirc/kvs/kvi_kvs_runtimecontext.cpp | 42 +- src/kvirc/kvs/kvi_kvs_runtimecontext.h | 20 +- src/kvirc/kvs/kvi_kvs_rwevaluationresult.cpp | 2 +- src/kvirc/kvs/kvi_kvs_rwevaluationresult.h | 6 +- src/kvirc/kvs/kvi_kvs_script.cpp | 50 +- src/kvirc/kvs/kvi_kvs_script.h | 36 +- src/kvirc/kvs/kvi_kvs_scriptaddonmanager.cpp | 102 +-- src/kvirc/kvs/kvi_kvs_scriptaddonmanager.h | 80 +-- src/kvirc/kvs/kvi_kvs_switchlist.cpp | 8 +- src/kvirc/kvs/kvi_kvs_switchlist.h | 26 +- src/kvirc/kvs/kvi_kvs_timermanager.cpp | 20 +- src/kvirc/kvs/kvi_kvs_timermanager.h | 23 +- .../kvs/kvi_kvs_treenode_aliasfunctioncall.cpp | 8 +- src/kvirc/kvs/kvi_kvs_treenode_aliasfunctioncall.h | 4 +- .../kvs/kvi_kvs_treenode_aliassimplecommand.cpp | 10 +- .../kvs/kvi_kvs_treenode_aliassimplecommand.h | 4 +- src/kvirc/kvs/kvi_kvs_treenode_arraycount.cpp | 6 +- src/kvirc/kvs/kvi_kvs_treenode_arraycount.h | 4 +- src/kvirc/kvs/kvi_kvs_treenode_arrayelement.cpp | 10 +- src/kvirc/kvs/kvi_kvs_treenode_arrayelement.h | 4 +- .../kvs/kvi_kvs_treenode_arrayorhashelement.cpp | 2 +- .../kvs/kvi_kvs_treenode_arrayorhashelement.h | 2 +- .../kvs/kvi_kvs_treenode_arrayreferenceassert.cpp | 6 +- .../kvs/kvi_kvs_treenode_arrayreferenceassert.h | 4 +- src/kvirc/kvs/kvi_kvs_treenode_base.cpp | 2 +- src/kvirc/kvs/kvi_kvs_treenode_base.h | 12 +- .../kvi_kvs_treenode_baseobjectfunctioncall.cpp | 8 +- .../kvs/kvi_kvs_treenode_baseobjectfunctioncall.h | 6 +- src/kvirc/kvs/kvi_kvs_treenode_callbackcommand.cpp | 8 +- src/kvirc/kvs/kvi_kvs_treenode_callbackcommand.h | 4 +- src/kvirc/kvs/kvi_kvs_treenode_command.cpp | 8 +- src/kvirc/kvs/kvi_kvs_treenode_command.h | 8 +- .../kvs/kvi_kvs_treenode_commandevaluation.cpp | 2 +- src/kvirc/kvs/kvi_kvs_treenode_commandevaluation.h | 2 +- .../kvs/kvi_kvs_treenode_commandwithparameters.cpp | 8 +- .../kvs/kvi_kvs_treenode_commandwithparameters.h | 4 +- src/kvirc/kvs/kvi_kvs_treenode_compositedata.cpp | 10 +- src/kvirc/kvs/kvi_kvs_treenode_compositedata.h | 4 +- src/kvirc/kvs/kvi_kvs_treenode_constantdata.cpp | 6 +- src/kvirc/kvs/kvi_kvs_treenode_constantdata.h | 4 +- .../kvs/kvi_kvs_treenode_corecallbackcommand.cpp | 6 +- .../kvs/kvi_kvs_treenode_corecallbackcommand.h | 4 +- .../kvs/kvi_kvs_treenode_corefunctioncall.cpp | 8 +- src/kvirc/kvs/kvi_kvs_treenode_corefunctioncall.h | 4 +- .../kvs/kvi_kvs_treenode_coresimplecommand.cpp | 6 +- src/kvirc/kvs/kvi_kvs_treenode_coresimplecommand.h | 4 +- src/kvirc/kvs/kvi_kvs_treenode_data.cpp | 4 +- src/kvirc/kvs/kvi_kvs_treenode_data.h | 10 +- src/kvirc/kvs/kvi_kvs_treenode_datalist.cpp | 6 +- src/kvirc/kvs/kvi_kvs_treenode_datalist.h | 4 +- src/kvirc/kvs/kvi_kvs_treenode_expression.cpp | 66 +- src/kvirc/kvs/kvi_kvs_treenode_expression.h | 50 +- .../kvs/kvi_kvs_treenode_expressionreturn.cpp | 6 +- src/kvirc/kvs/kvi_kvs_treenode_expressionreturn.h | 4 +- .../kvs/kvi_kvs_treenode_extendedscopevariable.cpp | 6 +- .../kvs/kvi_kvs_treenode_extendedscopevariable.h | 4 +- src/kvirc/kvs/kvi_kvs_treenode_functioncall.cpp | 4 +- src/kvirc/kvs/kvi_kvs_treenode_functioncall.h | 6 +- src/kvirc/kvs/kvi_kvs_treenode_globalvariable.cpp | 6 +- src/kvirc/kvs/kvi_kvs_treenode_globalvariable.h | 4 +- src/kvirc/kvs/kvi_kvs_treenode_hashcount.cpp | 6 +- src/kvirc/kvs/kvi_kvs_treenode_hashcount.h | 4 +- src/kvirc/kvs/kvi_kvs_treenode_hashelement.cpp | 16 +- src/kvirc/kvs/kvi_kvs_treenode_hashelement.h | 4 +- .../kvs/kvi_kvs_treenode_hashreferenceassert.cpp | 6 +- .../kvs/kvi_kvs_treenode_hashreferenceassert.h | 4 +- src/kvirc/kvs/kvi_kvs_treenode_indirectdata.cpp | 2 +- src/kvirc/kvs/kvi_kvs_treenode_indirectdata.h | 2 +- src/kvirc/kvs/kvi_kvs_treenode_instruction.cpp | 2 +- src/kvirc/kvs/kvi_kvs_treenode_instruction.h | 4 +- .../kvs/kvi_kvs_treenode_instructionblock.cpp | 6 +- src/kvirc/kvs/kvi_kvs_treenode_instructionblock.h | 4 +- src/kvirc/kvs/kvi_kvs_treenode_localvariable.cpp | 6 +- src/kvirc/kvs/kvi_kvs_treenode_localvariable.h | 4 +- .../kvs/kvi_kvs_treenode_modulecallbackcommand.cpp | 6 +- .../kvs/kvi_kvs_treenode_modulecallbackcommand.h | 6 +- .../kvs/kvi_kvs_treenode_modulefunctioncall.cpp | 8 +- .../kvs/kvi_kvs_treenode_modulefunctioncall.h | 6 +- .../kvs/kvi_kvs_treenode_modulesimplecommand.cpp | 6 +- .../kvs/kvi_kvs_treenode_modulesimplecommand.h | 6 +- ...vi_kvs_treenode_multipleparameteridentifier.cpp | 14 +- .../kvi_kvs_treenode_multipleparameteridentifier.h | 4 +- src/kvirc/kvs/kvi_kvs_treenode_objectfield.cpp | 6 +- src/kvirc/kvs/kvi_kvs_treenode_objectfield.h | 4 +- .../kvs/kvi_kvs_treenode_objectfunctioncall.cpp | 6 +- .../kvs/kvi_kvs_treenode_objectfunctioncall.h | 4 +- src/kvirc/kvs/kvi_kvs_treenode_operation.cpp | 172 ++--- src/kvirc/kvs/kvi_kvs_treenode_operation.h | 80 +-- src/kvirc/kvs/kvi_kvs_treenode_parameterreturn.cpp | 8 +- src/kvirc/kvs/kvi_kvs_treenode_parameterreturn.h | 4 +- src/kvirc/kvs/kvi_kvs_treenode_rebindingswitch.cpp | 10 +- src/kvirc/kvs/kvi_kvs_treenode_rebindingswitch.h | 6 +- src/kvirc/kvs/kvi_kvs_treenode_scopeoperator.cpp | 6 +- src/kvirc/kvs/kvi_kvs_treenode_scopeoperator.h | 4 +- src/kvirc/kvs/kvi_kvs_treenode_simplecommand.cpp | 4 +- src/kvirc/kvs/kvi_kvs_treenode_simplecommand.h | 4 +- .../kvi_kvs_treenode_singleparameteridentifier.cpp | 6 +- .../kvi_kvs_treenode_singleparameteridentifier.h | 4 +- src/kvirc/kvs/kvi_kvs_treenode_specialcommand.cpp | 4 +- src/kvirc/kvs/kvi_kvs_treenode_specialcommand.h | 4 +- .../kvs/kvi_kvs_treenode_specialcommandbreak.cpp | 4 +- .../kvs/kvi_kvs_treenode_specialcommandbreak.h | 4 +- .../kvs/kvi_kvs_treenode_specialcommandclass.cpp | 22 +- .../kvs/kvi_kvs_treenode_specialcommandclass.h | 16 +- .../kvi_kvs_treenode_specialcommanddefpopup.cpp | 50 +- .../kvs/kvi_kvs_treenode_specialcommanddefpopup.h | 62 +- .../kvs/kvi_kvs_treenode_specialcommanddo.cpp | 6 +- src/kvirc/kvs/kvi_kvs_treenode_specialcommanddo.h | 4 +- .../kvs/kvi_kvs_treenode_specialcommandfor.cpp | 6 +- src/kvirc/kvs/kvi_kvs_treenode_specialcommandfor.h | 4 +- .../kvs/kvi_kvs_treenode_specialcommandforeach.cpp | 8 +- .../kvs/kvi_kvs_treenode_specialcommandforeach.h | 4 +- .../kvs/kvi_kvs_treenode_specialcommandif.cpp | 6 +- src/kvirc/kvs/kvi_kvs_treenode_specialcommandif.h | 4 +- .../kvs/kvi_kvs_treenode_specialcommandswitch.cpp | 50 +- .../kvs/kvi_kvs_treenode_specialcommandswitch.h | 22 +- .../kvs/kvi_kvs_treenode_specialcommandunset.cpp | 6 +- .../kvs/kvi_kvs_treenode_specialcommandunset.h | 4 +- .../kvs/kvi_kvs_treenode_specialcommandwhile.cpp | 6 +- .../kvs/kvi_kvs_treenode_specialcommandwhile.h | 4 +- src/kvirc/kvs/kvi_kvs_treenode_stringcast.cpp | 8 +- src/kvirc/kvs/kvi_kvs_treenode_stringcast.h | 4 +- src/kvirc/kvs/kvi_kvs_treenode_switchlist.cpp | 26 +- src/kvirc/kvs/kvi_kvs_treenode_switchlist.h | 8 +- .../kvi_kvs_treenode_thisobjectfunctioncall.cpp | 8 +- .../kvs/kvi_kvs_treenode_thisobjectfunctioncall.h | 4 +- src/kvirc/kvs/kvi_kvs_treenode_variable.cpp | 2 +- src/kvirc/kvs/kvi_kvs_treenode_variable.h | 4 +- .../kvs/kvi_kvs_treenode_voidfunctioncall.cpp | 6 +- src/kvirc/kvs/kvi_kvs_treenode_voidfunctioncall.h | 4 +- src/kvirc/kvs/kvi_kvs_useraction.cpp | 106 +-- src/kvirc/kvs/kvi_kvs_useraction.h | 77 +-- src/kvirc/kvs/kvi_kvs_variant.cpp | 162 ++--- src/kvirc/kvs/kvi_kvs_variant.h | 50 +- src/kvirc/kvs/kvi_kvs_variantlist.cpp | 20 +- src/kvirc/kvs/kvi_kvs_variantlist.h | 20 +- src/kvirc/kvs/moc_kvi_kvs_action.cpp | 74 +- src/kvirc/kvs/moc_kvi_kvs_asyncdnsoperation.cpp | 90 +-- src/kvirc/kvs/moc_kvi_kvs_asyncoperation.cpp | 80 +-- src/kvirc/kvs/moc_kvi_kvs_dnsmanager.cpp | 92 +-- src/kvirc/kvs/moc_kvi_kvs_object.cpp | 90 +-- src/kvirc/kvs/moc_kvi_kvs_popupmenu.cpp | 184 ++--- src/kvirc/kvs/moc_kvi_kvs_processmanager.cpp | 100 +-- src/kvirc/kvs/moc_kvi_kvs_timermanager.cpp | 80 +-- src/kvirc/kvs/moc_kvi_kvs_useraction.cpp | 74 +- src/kvirc/module/kvi_mexlinkfilter.cpp | 2 +- src/kvirc/module/kvi_mexlinkfilter.h | 5 +- src/kvirc/module/kvi_mexserverimport.cpp | 2 +- src/kvirc/module/kvi_mexserverimport.h | 5 +- src/kvirc/module/kvi_mextoolbar.cpp | 4 +- src/kvirc/module/kvi_mextoolbar.h | 3 +- src/kvirc/module/kvi_module.cpp | 38 +- src/kvirc/module/kvi_module.h | 8 +- src/kvirc/module/kvi_moduleextension.cpp | 30 +- src/kvirc/module/kvi_moduleextension.h | 28 +- src/kvirc/module/kvi_modulemanager.cpp | 48 +- src/kvirc/module/kvi_modulemanager.h | 13 +- src/kvirc/module/moc_kvi_mexlinkfilter.cpp | 80 +-- src/kvirc/module/moc_kvi_mexserverimport.cpp | 108 +-- src/kvirc/module/moc_kvi_mextoolbar.cpp | 74 +- src/kvirc/module/moc_kvi_modulemanager.cpp | 110 +-- src/kvirc/sparser/kvi_antispam.cpp | 6 +- src/kvirc/sparser/kvi_ircmessage.cpp | 14 +- src/kvirc/sparser/kvi_ircmessage.h | 4 +- src/kvirc/sparser/kvi_numeric.h | 22 +- src/kvirc/sparser/kvi_sp_ctcp.cpp | 190 +++--- src/kvirc/sparser/kvi_sp_literal.cpp | 288 ++++---- src/kvirc/sparser/kvi_sp_numeric.cpp | 354 +++++----- src/kvirc/sparser/kvi_sp_tables.cpp | 2 +- src/kvirc/sparser/kvi_sparser.cpp | 4 +- src/kvirc/sparser/kvi_sparser.h | 19 +- src/kvirc/ui/kvi_actiondrawer.cpp | 82 +-- src/kvirc/ui/kvi_actiondrawer.h | 39 +- src/kvirc/ui/kvi_channel.cpp | 312 ++++----- src/kvirc/ui/kvi_channel.h | 131 ++-- src/kvirc/ui/kvi_colorwin.cpp | 44 +- src/kvirc/ui/kvi_colorwin.h | 17 +- src/kvirc/ui/kvi_console.cpp | 318 ++++----- src/kvirc/ui/kvi_console.h | 55 +- src/kvirc/ui/kvi_cryptcontroller.cpp | 54 +- src/kvirc/ui/kvi_cryptcontroller.h | 35 +- src/kvirc/ui/kvi_ctcppagedialog.cpp | 44 +- src/kvirc/ui/kvi_ctcppagedialog.h | 19 +- src/kvirc/ui/kvi_customtoolbar.cpp | 276 ++++---- src/kvirc/ui/kvi_customtoolbar.h | 42 +- src/kvirc/ui/kvi_debugwindow.cpp | 24 +- src/kvirc/ui/kvi_debugwindow.h | 11 +- src/kvirc/ui/kvi_dynamictooltip.cpp | 16 +- src/kvirc/ui/kvi_dynamictooltip.h | 17 +- src/kvirc/ui/kvi_filedialog.cpp | 76 +-- src/kvirc/ui/kvi_filedialog.h | 15 +- src/kvirc/ui/kvi_frame.cpp | 383 +++++------ src/kvirc/ui/kvi_frame.h | 32 +- src/kvirc/ui/kvi_historywin.cpp | 48 +- src/kvirc/ui/kvi_historywin.h | 11 +- src/kvirc/ui/kvi_htmldialog.cpp | 42 +- src/kvirc/ui/kvi_htmldialog.h | 27 +- src/kvirc/ui/kvi_imagedialog.cpp | 122 ++-- src/kvirc/ui/kvi_imagedialog.h | 49 +- src/kvirc/ui/kvi_input.cpp | 760 ++++++++++----------- src/kvirc/ui/kvi_input.h | 130 ++-- src/kvirc/ui/kvi_ipeditor.cpp | 146 ++-- src/kvirc/ui/kvi_ipeditor.h | 29 +- src/kvirc/ui/kvi_irctoolbar.cpp | 120 ++-- src/kvirc/ui/kvi_irctoolbar.h | 36 +- src/kvirc/ui/kvi_ircview.cpp | 706 ++++++++++--------- src/kvirc/ui/kvi_ircview.h | 117 ++-- src/kvirc/ui/kvi_ircviewprivate.h | 10 +- src/kvirc/ui/kvi_ircviewtools.cpp | 118 ++-- src/kvirc/ui/kvi_ircviewtools.h | 31 +- src/kvirc/ui/kvi_listview.cpp | 86 +-- src/kvirc/ui/kvi_listview.h | 19 +- src/kvirc/ui/kvi_maskeditor.cpp | 124 ++-- src/kvirc/ui/kvi_maskeditor.h | 44 +- src/kvirc/ui/kvi_mdicaption.cpp | 118 ++-- src/kvirc/ui/kvi_mdicaption.h | 47 +- src/kvirc/ui/kvi_mdichild.cpp | 144 ++-- src/kvirc/ui/kvi_mdichild.h | 75 +- src/kvirc/ui/kvi_mdimanager.cpp | 184 ++--- src/kvirc/ui/kvi_mdimanager.h | 25 +- src/kvirc/ui/kvi_menubar.cpp | 94 +-- src/kvirc/ui/kvi_menubar.h | 11 +- src/kvirc/ui/kvi_modeeditor.cpp | 100 +-- src/kvirc/ui/kvi_modeeditor.h | 17 +- src/kvirc/ui/kvi_modew.cpp | 70 +- src/kvirc/ui/kvi_modew.h | 17 +- src/kvirc/ui/kvi_msgbox.cpp | 30 +- src/kvirc/ui/kvi_msgbox.h | 6 +- src/kvirc/ui/kvi_optionswidget.cpp | 216 +++--- src/kvirc/ui/kvi_optionswidget.h | 149 ++-- src/kvirc/ui/kvi_query.cpp | 194 +++--- src/kvirc/ui/kvi_query.h | 49 +- src/kvirc/ui/kvi_scriptbutton.cpp | 10 +- src/kvirc/ui/kvi_scriptbutton.h | 17 +- src/kvirc/ui/kvi_scripteditor.cpp | 38 +- src/kvirc/ui/kvi_scripteditor.h | 31 +- src/kvirc/ui/kvi_selectors.cpp | 218 +++--- src/kvirc/ui/kvi_selectors.h | 164 +++-- src/kvirc/ui/kvi_splash.cpp | 70 +- src/kvirc/ui/kvi_splash.h | 31 +- src/kvirc/ui/kvi_statusbar.cpp | 164 ++--- src/kvirc/ui/kvi_statusbar.h | 45 +- src/kvirc/ui/kvi_statusbarapplet.cpp | 100 +-- src/kvirc/ui/kvi_statusbarapplet.h | 60 +- src/kvirc/ui/kvi_styled_controls.cpp | 174 ++--- src/kvirc/ui/kvi_styled_controls.h | 53 +- src/kvirc/ui/kvi_taskbar.cpp | 300 ++++---- src/kvirc/ui/kvi_taskbar.h | 91 +-- src/kvirc/ui/kvi_texticonwin.cpp | 98 +-- src/kvirc/ui/kvi_texticonwin.h | 17 +- src/kvirc/ui/kvi_themedlabel.cpp | 50 +- src/kvirc/ui/kvi_themedlabel.h | 23 +- src/kvirc/ui/kvi_toolbar.cpp | 46 +- src/kvirc/ui/kvi_toolbar.h | 7 +- src/kvirc/ui/kvi_toolwindows_container.cpp | 66 +- src/kvirc/ui/kvi_toolwindows_container.h | 20 +- src/kvirc/ui/kvi_topicw.cpp | 234 +++---- src/kvirc/ui/kvi_topicw.h | 69 +- src/kvirc/ui/kvi_userlistview.cpp | 318 ++++----- src/kvirc/ui/kvi_userlistview.h | 126 ++-- src/kvirc/ui/kvi_window.cpp | 469 ++++++------- src/kvirc/ui/kvi_window.h | 151 ++-- src/kvirc/ui/moc_kvi_actiondrawer.cpp | 200 +++--- src/kvirc/ui/moc_kvi_customtoolbar.cpp | 152 ++--- src/kvirc/ui/moc_kvi_debugwindow.cpp | 74 +- src/kvirc/ui/moc_kvi_htmldialog.cpp | 94 +-- src/kvirc/ui/moc_kvi_imagedialog.cpp | 126 ++-- src/kvirc/ui/moc_kvi_ircviewtools.cpp | 106 +-- src/kvirc/ui/moc_kvi_listview.cpp | 74 +- src/kvirc/ui/moc_kvi_mdicaption.cpp | 200 +++--- src/kvirc/ui/moc_kvi_mdichild.cpp | 128 ++-- src/kvirc/ui/moc_kvi_mdimanager.cpp | 188 ++--- src/kvirc/ui/moc_kvi_statusbar.cpp | 124 ++-- src/kvirc/ui/moc_kvi_statusbarapplet.cpp | 390 +++++------ src/kvirc/ui/moc_kvi_toolwindows_container.cpp | 138 ++-- src/modules/about/aboutdialog.cpp | 46 +- src/modules/about/aboutdialog.h | 3 +- src/modules/action/libkviaction.cpp | 60 +- src/modules/actioneditor/actioneditor.cpp | 320 ++++----- src/modules/actioneditor/actioneditor.h | 114 ++-- src/modules/addon/libkviaddon.cpp | 78 +-- src/modules/addon/managementdialog.cpp | 136 ++-- src/modules/addon/managementdialog.h | 54 +- src/modules/aliaseditor/aliaseditor.cpp | 374 +++++----- src/modules/aliaseditor/aliaseditor.h | 116 ++-- src/modules/avatar/libkviavatar.cpp | 120 ++-- src/modules/avatar/libkviavatar.h | 17 +- src/modules/chan/libkvichan.cpp | 178 ++--- src/modules/channelsjoin/channelsjoinwindow.cpp | 76 +-- src/modules/channelsjoin/channelsjoinwindow.h | 21 +- src/modules/channelsjoin/libkvichannelsjoin.cpp | 10 +- src/modules/clock/libkviclock.cpp | 28 +- src/modules/clock/libkviclock.h | 7 +- src/modules/codetester/codetester.cpp | 40 +- src/modules/codetester/codetester.h | 22 +- src/modules/config/libkviconfig.cpp | 100 +-- src/modules/context/libkvicontext.cpp | 10 +- src/modules/dcc/adpcmcodec.h | 2 +- src/modules/dcc/broker.cpp | 140 ++-- src/modules/dcc/broker.h | 17 +- src/modules/dcc/canvas.cpp | 38 +- src/modules/dcc/canvas.h | 17 +- src/modules/dcc/canvaswidget.cpp | 462 ++++++------- src/modules/dcc/canvaswidget.h | 167 ++--- src/modules/dcc/chat.cpp | 88 +-- src/modules/dcc/chat.h | 25 +- src/modules/dcc/descriptor.cpp | 6 +- src/modules/dcc/descriptor.h | 72 +- src/modules/dcc/dialogs.cpp | 88 +-- src/modules/dcc/dialogs.h | 20 +- src/modules/dcc/libkvidcc.cpp | 148 ++-- src/modules/dcc/marshal.cpp | 40 +- src/modules/dcc/marshal.h | 35 +- src/modules/dcc/requests.cpp | 68 +- src/modules/dcc/send.cpp | 312 ++++----- src/modules/dcc/send.h | 60 +- src/modules/dcc/thread.cpp | 2 +- src/modules/dcc/thread.h | 8 +- src/modules/dcc/utils.cpp | 8 +- src/modules/dcc/utils.h | 2 +- src/modules/dcc/voice.cpp | 101 ++- src/modules/dcc/voice.h | 59 +- src/modules/dcc/window.h | 1 + src/modules/dialog/libkvidialog.cpp | 230 +++---- src/modules/dialog/libkvidialog.h | 62 +- src/modules/dockwidget/libkvidockwidget_qt3.cpp | 150 ++-- src/modules/dockwidget/libkvidockwidget_qt3.h | 17 +- src/modules/dockwidget/libkvidockwidget_qt4.cpp | 116 ++-- src/modules/dockwidget/libkvidockwidget_qt4.h | 17 +- src/modules/editor/libkvieditor.cpp | 6 +- src/modules/editor/scripteditor.cpp | 546 +++++++-------- src/modules/editor/scripteditor.h | 129 ++-- src/modules/eventeditor/eventeditor.cpp | 160 ++--- src/modules/eventeditor/eventeditor.h | 46 +- src/modules/file/libkvifile.cpp | 194 +++--- .../filetransferwindow/filetransferwindow.cpp | 216 +++--- .../filetransferwindow/filetransferwindow.h | 35 +- .../libkvifiletransferwindow.cpp | 18 +- src/modules/help/helpwidget.cpp | 64 +- src/modules/help/helpwidget.h | 29 +- src/modules/help/helpwindow.cpp | 134 ++-- src/modules/help/helpwindow.h | 29 +- src/modules/help/index.cpp | 176 ++--- src/modules/help/index.h | 71 +- src/modules/help/libkvihelp.cpp | 14 +- src/modules/http/httpfiletransfer.cpp | 162 ++--- src/modules/http/httpfiletransfer.h | 39 +- src/modules/http/libkvihttp.cpp | 40 +- src/modules/ident/libkviident.cpp | 12 +- src/modules/ident/libkviident.h | 7 +- src/modules/iograph/libkviiograph.cpp | 26 +- src/modules/iograph/libkviiograph.h | 7 +- src/modules/lamerizer/libkvilamerizer.h | 1 + src/modules/links/libkvilinks.cpp | 2 +- src/modules/links/linkswindow.cpp | 88 +-- src/modules/links/linkswindow.h | 21 +- src/modules/list/libkvilist.cpp | 2 +- src/modules/list/listwindow.cpp | 126 ++-- src/modules/list/listwindow.h | 47 +- src/modules/log/libkvilog.cpp | 12 +- src/modules/logview/libkvilogview.cpp | 18 +- src/modules/logview/logviewmdiwindow.cpp | 228 +++---- src/modules/logview/logviewmdiwindow.h | 79 +-- src/modules/logview/logviewwidget.cpp | 14 +- src/modules/logview/logviewwidget.h | 18 +- src/modules/mask/libkvimask.cpp | 118 ++-- src/modules/mediaplayer/libkvimediaplayer.cpp | 58 +- src/modules/mediaplayer/mp_amarokinterface.cpp | 28 +- src/modules/mediaplayer/mp_amarokinterface.h | 20 +- src/modules/mediaplayer/mp_amipinterface.cpp | 58 +- src/modules/mediaplayer/mp_amipinterface.h | 22 +- src/modules/mediaplayer/mp_dcopinterface.cpp | 96 +-- src/modules/mediaplayer/mp_dcopinterface.h | 28 +- src/modules/mediaplayer/mp_interface.cpp | 78 +-- src/modules/mediaplayer/mp_interface.h | 52 +- src/modules/mediaplayer/mp_jukinterface.cpp | 32 +- src/modules/mediaplayer/mp_jukinterface.h | 20 +- src/modules/mediaplayer/mp_mp3.cpp | 10 +- src/modules/mediaplayer/mp_mp3.h | 6 +- src/modules/mediaplayer/mp_winampinterface.cpp | 52 +- src/modules/mediaplayer/mp_winampinterface.h | 8 +- src/modules/mediaplayer/mp_xmmsinterface.cpp | 30 +- src/modules/mediaplayer/mp_xmmsinterface.h | 10 +- src/modules/mircimport/libkvimircimport.cpp | 76 +-- src/modules/mircimport/libkvimircimport.h | 21 +- src/modules/my/idle.cpp | 22 +- src/modules/my/idle.h | 19 +- src/modules/my/idle_mac.cpp | 6 +- src/modules/my/idle_x11.cpp | 12 +- src/modules/my/libkvimy.cpp | 2 +- src/modules/notifier/libkvinotifier.cpp | 12 +- src/modules/notifier/notifiermessage.cpp | 34 +- src/modules/notifier/notifiermessage.h | 38 +- src/modules/notifier/notifiersettings.h | 2 +- src/modules/notifier/notifierwindow.cpp | 350 +++++----- src/modules/notifier/notifierwindow.h | 117 ++-- src/modules/notifier/notifierwindowbody.cpp | 22 +- src/modules/notifier/notifierwindowbody.h | 88 +-- src/modules/notifier/notifierwindowborder.cpp | 28 +- src/modules/notifier/notifierwindowborder.h | 116 ++-- src/modules/notifier/notifierwindowprogressbar.cpp | 10 +- src/modules/notifier/notifierwindowprogressbar.h | 10 +- src/modules/notifier/notifierwindowtabs.cpp | 102 +-- src/modules/notifier/notifierwindowtabs.h | 133 ++-- src/modules/objects/class_button.cpp | 38 +- src/modules/objects/class_button.h | 5 +- src/modules/objects/class_buttongroup.cpp | 14 +- src/modules/objects/class_buttongroup.h | 4 +- src/modules/objects/class_checkbox.cpp | 10 +- src/modules/objects/class_checkbox.h | 5 +- src/modules/objects/class_combobox.cpp | 90 +-- src/modules/objects/class_combobox.h | 7 +- src/modules/objects/class_dialog.cpp | 16 +- src/modules/objects/class_dialog.h | 4 +- src/modules/objects/class_dockwindow.cpp | 98 +-- src/modules/objects/class_dockwindow.h | 1 + src/modules/objects/class_file.cpp | 52 +- src/modules/objects/class_file.h | 17 +- src/modules/objects/class_groupbox.cpp | 98 +-- src/modules/objects/class_groupbox.h | 2 +- src/modules/objects/class_hbox.cpp | 12 +- src/modules/objects/class_hbox.h | 2 +- src/modules/objects/class_label.cpp | 152 ++--- src/modules/objects/class_label.h | 4 +- src/modules/objects/class_layout.cpp | 94 +-- src/modules/objects/class_layout.h | 4 +- src/modules/objects/class_lcd.cpp | 34 +- src/modules/objects/class_lcd.h | 4 +- src/modules/objects/class_lineedit.cpp | 76 +-- src/modules/objects/class_lineedit.h | 7 +- src/modules/objects/class_listbox.cpp | 34 +- src/modules/objects/class_listbox.h | 5 +- src/modules/objects/class_listview.cpp | 74 +- src/modules/objects/class_listview.h | 16 +- src/modules/objects/class_listviewitem.cpp | 42 +- src/modules/objects/class_listviewitem.h | 1 + src/modules/objects/class_mainwindow.cpp | 50 +- src/modules/objects/class_mainwindow.h | 4 +- src/modules/objects/class_menubar.cpp | 6 +- src/modules/objects/class_menubar.h | 4 +- src/modules/objects/class_multilineedit.cpp | 194 +++--- src/modules/objects/class_multilineedit.h | 5 +- src/modules/objects/class_painter.cpp | 128 ++-- src/modules/objects/class_painter.h | 11 +- src/modules/objects/class_pixmap.cpp | 40 +- src/modules/objects/class_pixmap.h | 21 +- src/modules/objects/class_popupmenu.cpp | 24 +- src/modules/objects/class_popupmenu.h | 5 +- src/modules/objects/class_process.cpp | 34 +- src/modules/objects/class_process.h | 9 +- src/modules/objects/class_progressbar.cpp | 10 +- src/modules/objects/class_progressbar.h | 4 +- src/modules/objects/class_radiobutton.cpp | 16 +- src/modules/objects/class_radiobutton.h | 5 +- src/modules/objects/class_slider.cpp | 66 +- src/modules/objects/class_slider.h | 5 +- src/modules/objects/class_socket.cpp | 102 +-- src/modules/objects/class_socket.h | 32 +- src/modules/objects/class_spinbox.cpp | 38 +- src/modules/objects/class_spinbox.h | 5 +- src/modules/objects/class_tabwidget.cpp | 104 +-- src/modules/objects/class_tabwidget.h | 5 +- src/modules/objects/class_tbrowser.cpp | 24 +- src/modules/objects/class_tbrowser.h | 9 +- src/modules/objects/class_toolbar.cpp | 16 +- src/modules/objects/class_toolbar.h | 3 +- src/modules/objects/class_toolbutton.cpp | 66 +- src/modules/objects/class_toolbutton.h | 5 +- src/modules/objects/class_urllabel.cpp | 108 +-- src/modules/objects/class_urllabel.h | 14 +- src/modules/objects/class_vbox.cpp | 12 +- src/modules/objects/class_vbox.h | 2 +- src/modules/objects/class_widget.cpp | 412 +++++------ src/modules/objects/class_widget.h | 13 +- src/modules/objects/class_window.cpp | 20 +- src/modules/objects/class_window.h | 13 +- src/modules/objects/class_wizard.cpp | 40 +- src/modules/objects/class_wizard.h | 5 +- src/modules/objects/class_workspace.cpp | 26 +- src/modules/objects/class_workspace.h | 4 +- src/modules/objects/class_wrapper.cpp | 72 +- src/modules/objects/class_wrapper.h | 9 +- src/modules/objects/class_xmlreader.cpp | 52 +- src/modules/objects/class_xmlreader.h | 5 +- src/modules/objects/libkviobjects.cpp | 161 +++-- src/modules/objects/object_macros.h | 6 +- src/modules/options/container.cpp | 32 +- src/modules/options/container.h | 15 +- src/modules/options/dialog.cpp | 220 +++--- src/modules/options/dialog.h | 48 +- src/modules/options/instances.cpp | 348 +++++----- src/modules/options/instances.h | 19 +- src/modules/options/libkvioptions.cpp | 34 +- src/modules/options/mkcreateinstanceproc.sh | 20 +- src/modules/options/optw_antispam.cpp | 14 +- src/modules/options/optw_antispam.h | 3 +- src/modules/options/optw_avatar.cpp | 14 +- src/modules/options/optw_avatar.h | 3 +- src/modules/options/optw_away.cpp | 12 +- src/modules/options/optw_away.h | 3 +- src/modules/options/optw_connection.cpp | 70 +- src/modules/options/optw_connection.h | 23 +- src/modules/options/optw_ctcp.cpp | 6 +- src/modules/options/optw_ctcp.h | 3 +- src/modules/options/optw_ctcpfloodprotection.cpp | 12 +- src/modules/options/optw_ctcpfloodprotection.h | 5 +- src/modules/options/optw_dcc.cpp | 58 +- src/modules/options/optw_dcc.h | 24 +- src/modules/options/optw_generalopt.cpp | 6 +- src/modules/options/optw_generalopt.h | 3 +- src/modules/options/optw_highlighting.cpp | 26 +- src/modules/options/optw_highlighting.h | 9 +- src/modules/options/optw_identity.cpp | 214 +++--- src/modules/options/optw_identity.h | 79 ++- src/modules/options/optw_ignore.cpp | 8 +- src/modules/options/optw_ignore.h | 3 +- src/modules/options/optw_input.cpp | 44 +- src/modules/options/optw_input.h | 12 +- src/modules/options/optw_interfacefeatures.cpp | 12 +- src/modules/options/optw_interfacefeatures.h | 7 +- src/modules/options/optw_interfacelookglobal.cpp | 48 +- src/modules/options/optw_interfacelookglobal.h | 15 +- src/modules/options/optw_irc.cpp | 42 +- src/modules/options/optw_irc.h | 22 +- src/modules/options/optw_ircoutput.cpp | 14 +- src/modules/options/optw_ircoutput.h | 7 +- src/modules/options/optw_ircview.cpp | 46 +- src/modules/options/optw_ircview.h | 15 +- src/modules/options/optw_lag.cpp | 14 +- src/modules/options/optw_lag.h | 3 +- src/modules/options/optw_logging.cpp | 6 +- src/modules/options/optw_logging.h | 3 +- src/modules/options/optw_mediatypes.cpp | 100 +-- src/modules/options/optw_mediatypes.h | 25 +- src/modules/options/optw_messages.cpp | 172 +++-- src/modules/options/optw_messages.h | 38 +- src/modules/options/optw_nickserv.cpp | 114 ++-- src/modules/options/optw_nickserv.h | 36 +- src/modules/options/optw_notify.cpp | 52 +- src/modules/options/optw_notify.h | 6 +- src/modules/options/optw_protection.cpp | 8 +- src/modules/options/optw_protection.h | 3 +- src/modules/options/optw_proxy.cpp | 78 +-- src/modules/options/optw_proxy.h | 39 +- src/modules/options/optw_query.cpp | 6 +- src/modules/options/optw_query.h | 9 +- src/modules/options/optw_servers.cpp | 368 +++++----- src/modules/options/optw_servers.h | 133 ++-- src/modules/options/optw_sound.cpp | 58 +- src/modules/options/optw_sound.h | 29 +- src/modules/options/optw_ssl.cpp | 2 +- src/modules/options/optw_taskbar.cpp | 58 +- src/modules/options/optw_taskbar.h | 24 +- src/modules/options/optw_textencoding.cpp | 44 +- src/modules/options/optw_textencoding.h | 11 +- src/modules/options/optw_texticons.cpp | 62 +- src/modules/options/optw_texticons.h | 28 +- src/modules/options/optw_tools.cpp | 8 +- src/modules/options/optw_tools.h | 3 +- src/modules/options/optw_topiclabel.cpp | 4 +- src/modules/options/optw_topiclabel.h | 3 +- src/modules/options/optw_tray.cpp | 10 +- src/modules/options/optw_tray.h | 5 +- src/modules/options/optw_uparser.cpp | 8 +- src/modules/options/optw_uparser.h | 3 +- src/modules/options/optw_urlhandlers.cpp | 58 +- src/modules/options/optw_urlhandlers.h | 3 +- src/modules/options/optw_userlist.cpp | 70 +- src/modules/options/optw_userlist.h | 23 +- src/modules/perl/libkviperl.cpp | 24 +- src/modules/perlcore/KVIrc.xs | 18 +- src/modules/perlcore/libkviperlcore.cpp | 58 +- src/modules/perlcore/perlcoreinterface.h | 16 +- src/modules/perlcore/ppport.h | 6 +- src/modules/perlcore/xs.inc | 18 +- src/modules/popupeditor/popupeditor.cpp | 310 ++++----- src/modules/popupeditor/popupeditor.h | 69 +- src/modules/raweditor/raweditor.cpp | 156 ++--- src/modules/raweditor/raweditor.h | 42 +- src/modules/regchan/libkviregchan.cpp | 102 +-- src/modules/reguser/dialog.cpp | 244 +++---- src/modules/reguser/dialog.h | 49 +- src/modules/reguser/edituser.cpp | 282 ++++---- src/modules/reguser/edituser.h | 85 +-- src/modules/reguser/libkvireguser.cpp | 324 ++++----- src/modules/reguser/wizard.cpp | 198 +++--- src/modules/reguser/wizard.h | 65 +- src/modules/rijndael/libkvirijndael.cpp | 12 +- src/modules/rijndael/libkvirijndael.h | 12 +- src/modules/setup/libkvisetup.cpp | 22 +- src/modules/setup/setupwizard.cpp | 304 ++++----- src/modules/setup/setupwizard.h | 82 +-- src/modules/sharedfile/libkvisharedfile.cpp | 36 +- .../sharedfileswindow/libkvisharedfileswindow.cpp | 16 +- .../sharedfileswindow/sharedfileswindow.cpp | 210 +++--- src/modules/sharedfileswindow/sharedfileswindow.h | 42 +- src/modules/snd/libkvisnd.cpp | 77 +-- src/modules/snd/libkvisnd.h | 47 +- src/modules/socketspy/libkvisocketspy.cpp | 2 +- src/modules/socketspy/socketspywindow.cpp | 28 +- src/modules/socketspy/socketspywindow.h | 7 +- src/modules/spaste/controller.cpp | 28 +- src/modules/spaste/controller.h | 19 +- src/modules/spaste/libkvispaste.cpp | 20 +- src/modules/spaste/libkvispaste.h | 2 +- src/modules/str/libkvistr.cpp | 316 ++++----- src/modules/system/libkvisystem.cpp | 86 +-- src/modules/system/plugin.cpp | 42 +- src/modules/system/plugin.h | 22 +- src/modules/term/libkviterm.cpp | 2 +- src/modules/term/termwidget.cpp | 52 +- src/modules/term/termwidget.h | 27 +- src/modules/term/termwindow.cpp | 8 +- src/modules/term/termwindow.h | 7 +- src/modules/texticons/libkvitexticons.cpp | 6 +- src/modules/theme/libkvitheme.cpp | 22 +- src/modules/theme/managementdialog.cpp | 142 ++-- src/modules/theme/managementdialog.h | 37 +- src/modules/theme/packthemedialog.cpp | 210 +++--- src/modules/theme/packthemedialog.h | 27 +- src/modules/theme/savethemedialog.cpp | 142 ++-- src/modules/theme/savethemedialog.h | 33 +- src/modules/theme/themefunctions.cpp | 164 ++--- src/modules/theme/themefunctions.h | 28 +- src/modules/tip/libkvitip.cpp | 68 +- src/modules/tip/libkvitip.h | 28 +- src/modules/tip/libkvitip_cs.kvc | 4 +- src/modules/tip/libkvitip_it.kvc | 2 +- src/modules/tmphighlight/libkvitmphighlight.cpp | 6 +- src/modules/toolbar/libkvitoolbar.cpp | 74 +- src/modules/toolbareditor/libkvitoolbareditor.cpp | 8 +- src/modules/toolbareditor/toolbareditor.cpp | 194 +++--- src/modules/toolbareditor/toolbareditor.h | 79 +-- src/modules/torrent/libkvitorrent.cpp | 22 +- src/modules/torrent/tc_interface.h | 40 +- src/modules/torrent/tc_ktorrentdcopinterface.cpp | 48 +- src/modules/torrent/tc_ktorrentdcopinterface.h | 17 +- src/modules/torrent/tc_statusbarapplet.cpp | 30 +- src/modules/torrent/tc_statusbarapplet.h | 3 +- src/modules/url/libkviurl.cpp | 162 ++--- src/modules/url/libkviurl.h | 66 +- src/modules/window/libkviwindow.cpp | 94 +-- src/modules/window/userwindow.cpp | 12 +- src/modules/window/userwindow.h | 7 +- 953 files changed, 27802 insertions(+), 27573 deletions(-) diff --git a/admin/acinclude.m4.in b/admin/acinclude.m4.in index bcb1ce14..89ab7a77 100644 --- a/admin/acinclude.m4.in +++ b/admin/acinclude.m4.in @@ -1589,30 +1589,46 @@ AC_DEFUN([AC_SS_FIND_QT3_INCLUDE_DIR], AC_SS_FIND_FILE_PATH($SS_QT3_INCLUDE_FILE_TO_SEARCH,$ss_qt_include_test_dirs,SS_QT3_INCDIR) if test "$SS_QT3_INCDIR" = "FAILED"; then - AC_MSG_RESULT([FAILED]) - AC_SS_SET_REDINK - echo "################################################################################" - echo "### CONFIGURE ERROR:" - echo "### Can not find the qt 3.x header files." - echo "### Make sure that qt is correctly installed on your system," - echo "### and the qt version is the one requested by this version of kvirc." - echo "### Try to run configure again, this time passing the --with-qt-include-dir" - echo "### option (see ./configure --help)." - echo "### You may also take a look at the config.log file in this directory," - echo "### that will tell you which check has failed and maybe more about the reason" - echo "### of the failure." - echo "### If you're feeling that this may be a bug in this configure script" - echo "### and want to report this to me , please include your configure script," - echo "### the config.log file as well as the complete configure output." - echo "################################################################################" - AC_SS_SET_NORMALINK - AC_MSG_ERROR([This was a fatal one...aborting]) + + dnl HACK HACK HACK + + ss_qt_include_test_dirs="$SS_QT4_GENERAL_DIR/include /include /usr/include /usr/local/include /usr/qt/include /usr/include/qt4 /usr/qt4/include /usr/local/qt/include /usr/X11R6/include /usr/lib/qt/include /usr/lib/qt /usr/include/X11" + test -n "$QTDIR" && ss_qt_include_test_dirs="$QTDIR/include $QTDIR $ss_qt_include_test_dirs" + ss_qt_include_test_dirs="$ss_qt_include_test_dirs /usr/include/qt /usr/include/qt4 /usr/local/include/qt /include/qt /usr/X11R6/include/qt /usr/build/qt/include" + ss_qt_include_test_dirs="$ss_qt_include_test_dirs /usr/include/qt$SS_QT4_MAJOR_VERSION_REQUIRED /usr/include/qt-$SS_QT4_MAJOR_VERSION_REQUIRED /usr/local/include/qt$SS_QT4_MAJOR_VERSION_REQUIRED" + ss_qt_include_test_dirs="$ss_qt_include_test_dirs /include/qt$SS_QT4_MAJOR_VERSION_REQUIRED /usr/X11R6/include/qt$SS_QT4_MAJOR_VERSION_REQUIRED" + ss_qt_include_test_dirs="$ss_qt_include_test_dirs /usr/include/X11/qt$SS_QT4_MAJOR_VERSION_REQUIRED /opt/qt /opt/kde/qt" + + AC_SS_FIND_FILE_PATH($SS_QT4_INCLUDE_FILE_TO_SEARCH,$ss_qt_include_test_dirs,SS_QT4_INCDIR) + + SS_QT3_INCDIR="$SS_QT4_INCDIR -include tqt.h" + AC_MSG_RESULT([TQt4 detected--Qt4 found in $SS_QT3_INCDIR]) + +dnl AC_MSG_RESULT([FAILED]) +dnl AC_SS_SET_REDINK +dnl echo "################################################################################" +dnl echo "### CONFIGURE ERROR:" +dnl echo "### Can not find the qt 3.x header files." +dnl echo "### Make sure that qt is correctly installed on your system," +dnl echo "### and the qt version is the one requested by this version of kvirc." +dnl echo "### Try to run configure again, this time passing the --with-qt-include-dir" +dnl echo "### option (see ./configure --help)." +dnl echo "### You may also take a look at the config.log file in this directory," +dnl echo "### that will tell you which check has failed and maybe more about the reason" +dnl echo "### of the failure." +dnl echo "### If you're feeling that this may be a bug in this configure script" +dnl echo "### and want to report this to me , please include your configure script," +dnl echo "### the config.log file as well as the complete configure output." +dnl echo "################################################################################" +dnl AC_SS_SET_NORMALINK +dnl AC_MSG_ERROR([This was a fatal one...aborting]) else AC_MSG_RESULT([found in $SS_QT3_INCDIR]) fi else AC_MSG_RESULT([using user supplied path for the Qt 3.x include files $SS_QT3_INCDIR]) + SS_QT3_INCDIR="$SS_QT3_INCDIR -include tqt.h" fi ]) @@ -1696,27 +1712,53 @@ AC_DEFUN([AC_SS_FIND_QT3_LIBRARY_DIR], AC_SS_FIND_FILE_PATH($ss_qt_libs_to_find,$ss_qt_library_test_dirs,SS_QT3_LIBDIR) if test "$SS_QT3_LIBDIR" = "FAILED"; then - AC_MSG_RESULT([FAILED]) - AC_SS_SET_REDINK - echo "################################################################################" - echo "### CONFIGURE ERROR:" - echo "### Can not find the qt 3.x library file." - echo "### Make sure that qt is correctly installed on your system," - echo "### and the qt version is the one requested by this version of kvirc." - echo "### (Usually a greater version is OK too)" - echo "### Try to run configure again, this time passing the --with-qt-library-dir" - echo "### option (see ./configure --help)." - echo "### You may also take a look at the config.log file in this directory," - echo "### that will tell you which check has failed and maybe more about the reason" - echo "### of the failure." - echo "### If you're feeling that this may be a bug in this configure script" - echo "### and want to report this to me , please include your configure script," - echo "### the config.log file as well as the complete configure output." - echo "################################################################################" - AC_SS_SET_NORMALINK - AC_MSG_ERROR([This was a fatal one...aborting]) + + dnl HACK HACK HACK + + AC_MSG_CHECKING([for the Qt 4.x libraries]) + + ss_qt_library_test_dirs="$SS_QT4_GENERAL_DIR/lib /lib /usr/lib /usr/local/lib /usr/qt/lib /usr/local/qt/lib /usr/X11R6/lib /usr/lib/qt/lib /usr/lib/qt /usr/local/lib/qt/lib" + test -n "$QTDIR" && ss_qt_library_test_dirs="$QTDIR/lib $QTDIR $ss_qt_library_test_dirs" + ss_qt_library_test_dirs="$ss_qt_library_test_dirs /usr/local/lib/qt /usr/X11R6/lib/qt /usr/build/qt/lib /opt/lib /opt/qt/lib" + ss_qt_library_test_dirs="$ss_qt_library_test_dirs /usr/lib/qt4 /usr/local/lib/qt4 /usr/X11R6/lib/qt4" + ss_qt_library_test_dirs="$ss_qt_library_test_dirs /usr/build/qt4/lib /opt/qt4/lib" + + ss_qt_libs_to_find="libQtCore.so.$SS_QT4_MAJOR_VERSION_REQUIRED.$SS_QT4_MINOR_VERSION_REQUIRED.$SS_QT4_PATCH_LEVEL_REQUIRED" + ss_qt_libs_to_find="$ss_qt_libs_to_find libQtCore.so.$SS_QT4_MAJOR_VERSION_REQUIRED.$SS_QT4_MINOR_VERSION_REQUIRED" + ss_qt_libs_to_find="$ss_qt_libs_to_find libQtCore.so.$SS_QT4_MAJOR_VERSION_REQUIRED" + ss_qt_libs_to_find="$ss_qt_libs_to_find libQtCore.so" + ss_qt_libs_to_find="$ss_qt_libs_to_find libQtCore.so.$SS_QT4_MAJOR_VERSION_REQUIRED.$SS_QT4_MINOR_VERSION_REQUIRED.dylib" + ss_qt_libs_to_find="$ss_qt_libs_to_find libQtCore.so.$SS_QT4_MAJOR_VERSION_REQUIRED.dylib" + ss_qt_libs_to_find="$ss_qt_libs_to_find libQtCore.so.dylib" + ss_qt_libs_to_find="$ss_qt_libs_to_find libQtCore.so.a" + + AC_SS_FIND_FILE_PATH($ss_qt_libs_to_find,$ss_qt_library_test_dirs,SS_QT4_LIBDIR) + + SS_QT3_LIBDIR="$SS_QT4_LIBDIR" + SS_QTLIB_NAME="tqt" + AC_MSG_RESULT([TQt4 detected--Qt4 found in $SS_QT3_LIBDIR]) + +dnl AC_MSG_RESULT([FAILED]) +dnl AC_SS_SET_REDINK +dnl echo "################################################################################" +dnl echo "### CONFIGURE ERROR:" +dnl echo "### Can not find the qt 3.x library file." +dnl echo "### Make sure that qt is correctly installed on your system," +dnl echo "### and the qt version is the one requested by this version of kvirc." +dnl echo "### (Usually a greater version is OK too)" +dnl echo "### Try to run configure again, this time passing the --with-qt-library-dir" +dnl echo "### option (see ./configure --help)." +dnl echo "### You may also take a look at the config.log file in this directory," +dnl echo "### that will tell you which check has failed and maybe more about the reason" +dnl echo "### of the failure." +dnl echo "### If you're feeling that this may be a bug in this configure script" +dnl echo "### and want to report this to me , please include your configure script," +dnl echo "### the config.log file as well as the complete configure output." +dnl echo "################################################################################" +dnl AC_SS_SET_NORMALINK +dnl AC_MSG_ERROR([This was a fatal one...aborting]) else - AC_MSG_RESULT([found in $SS_QT3_LIBDIR]) + AC_MSG_RESULT([TQt3 found in $SS_QT3_LIBDIR]) fi else AC_MSG_RESULT([using user supplied path for the Qt library $SS_QT3_LIBDIR]) @@ -1781,7 +1823,7 @@ AC_DEFUN([AC_SS_FIND_QT3_MOC], AC_ARG_WITH(qt-moc,[ --with-qt-moc filename of the Qt 3.x meta object compiler ],SS_QT3_MOC="$withval",SS_QT3_MOC="NOTGIVEN") if test "$SS_QT3_MOC" = "NOTGIVEN"; then - AC_MSG_CHECKING([for the Qt 3.x moc]) + AC_MSG_CHECKING([for the Qt 3.x tmoc]) unset SS_QT3_MOC ss_moc_test_dirs="$QTDIR/bin $PATH /usr/bin /bin /usr/local/bin /usr/X11R6/bin /usr/lib/qt/bin /usr/local/qt/bin /usr/X11R6/qt/bin /usr/qt/bin /usr/build/qt/bin" @@ -1789,7 +1831,7 @@ AC_DEFUN([AC_SS_FIND_QT3_MOC], ss_moc_test_dirs="$SS_QT3_GENERAL_DIR/bin $ss_moc_test_dirs" fi - AC_SS_FIND_FILE_PATH(moc,$ss_moc_test_dirs,SS_QT3_MOC) + AC_SS_FIND_FILE_PATH(tmoc,$ss_moc_test_dirs,SS_QT3_MOC) if test "$SS_QT3_MOC" = "FAILED"; then AC_MSG_RESULT([FAILED]) @@ -1811,7 +1853,7 @@ AC_DEFUN([AC_SS_FIND_QT3_MOC], AC_SS_SET_NORMALINK AC_MSG_ERROR([This was a fatal one...aborting]) else - SS_QT3_MOC="$SS_QT3_MOC/moc" + SS_QT3_MOC="$SS_QT3_MOC/tmoc" AC_MSG_RESULT([found as $SS_QT3_MOC]) fi else @@ -1910,7 +1952,7 @@ AC_DEFUN([AC_SS_ENSURE_CAN_COMPILE_X_AND_QT3], CPPFLAGS="" fi CPPFLAGS="$CPPFLAGS -I$SS_QT3_INCDIR" - CXXFLAGS="-O2 -Wall $CXXFLAGS" + CXXFLAGS="-O2 -Wall -include tqt.h $CXXFLAGS" if test -n "$SS_X_LIBDIR"; then LIBS="-L$SS_X_LIBDIR" else @@ -1925,10 +1967,7 @@ AC_DEFUN([AC_SS_ENSURE_CAN_COMPILE_X_AND_QT3], fi LDFLAGS="-s $LDFLAGS" AC_TRY_LINK([ - #include - #if (QT_VERSION < 221) - #error "Bad qt version: too old" - #endif + #include ],[return 0; ],SS_QTX_LINKED_OK="TRUE",SS_QTX_LINKED_OK="FALSE") if test "$SS_QTX_LINKED_OK" = "FALSE"; then AC_MSG_RESULT([FAILED]); diff --git a/data/defscript/aliases.kvs b/data/defscript/aliases.kvs index 5d8d7299..e8845ba3 100644 --- a/data/defscript/aliases.kvs +++ b/data/defscript/aliases.kvs @@ -234,9 +234,9 @@ alias(kb) { if(%nick) { - %mask = $mask(%nick,$option(uintDefaultBanType)); + %tqmask = $tqmask(%nick,$option(uintDefaultBanType)); - if(!%mask)%mask = %nick; # plain ban + if(!%tqmask)%tqmask = %nick; # plain ban %reason = $1- #if(!%reason)%reason = "You're not welcome here!" @@ -250,8 +250,8 @@ alias(kb) # kick %nick %reason - if($chan.isOp(%nick))%raw2 = "mode $target -o+b %nick %mask" - else %raw2 = "mode $target +b %mask" + if($chan.isOp(%nick))%raw2 = "mode $target -o+b %nick %tqmask" + else %raw2 = "mode $target +b %tqmask" raw -q %raw2$cr$lf%raw } @@ -484,28 +484,28 @@ alias(awayall) alias(notify) { # This one adds a registered users database entry - # For the specified nick and uses the specified mask - # If no mask is specified , a default one is constructed + # For the specified nick and uses the specified tqmask + # If no tqmask is specified , a default one is constructed # Then the "notify" property is set for the user if(!$0) { echo $tr("Usage:") - echo " /notify [mask]" + echo " /notify [tqmask]" halt } - # Get the mask + # Get the tqmask - %mask = $1 + %tqmask = $1 - # no mask specified ? build it + # no tqmask specified ? build it - if(!%mask)%mask = $0!*@* + if(!%tqmask)%tqmask = $0!*@* # Now add the user (but do not replace old entries) - reguser.add -f -q $0 %mask + reguser.add -f -q $0 %tqmask # Merge the notify property part with the old one (if any) @@ -526,8 +526,8 @@ alias(notify) alias(ignore) { # This one adds a registered users database entry - # For the specified nick and uses the specified mask - # If no mask is specified , a default one is constructed + # For the specified nick and uses the specified tqmask + # If no tqmask is specified , a default one is constructed # Then the "ignore" property is set for the user to 1 if(!$0) @@ -539,7 +539,7 @@ alias(ignore) # Now add the user (but do not replace old entries) - reguser.add $0 $mask($0,15); + reguser.add $0 $tqmask($0,15); # And finally set the property (use -n so the notify lists will be restarted) # Check if ignore or unignore the user diff --git a/data/defscript/installer.kvs b/data/defscript/installer.kvs index f974b7ed..f25aa78d 100644 --- a/data/defscript/installer.kvs +++ b/data/defscript/installer.kvs @@ -71,7 +71,7 @@ class(installer,object) @$mkdir($2) foreach(%file,%files) { - $this->%lFiles <+ $str.replace($file.fixpath("$2/%file"),"\\\\","\\") + $this->%lFiles <+ $str.tqreplace($file.fixpath("$2/%file"),"\\\\","\\") file.copy -o $file.fixpath($0/%file) $file.fixpath($2/%file) } } @@ -117,7 +117,7 @@ class(installer,object) { foreach(%file,%files) { - $this->%lSources <+ $str.replace($file.fixpath("$0/%file"),"\\\\","\\") + $this->%lSources <+ $str.tqreplace($file.fixpath("$0/%file"),"\\\\","\\") include $file.fixpath("$0/%file") } } @@ -150,7 +150,7 @@ class(installer,object) else if($str.match("toolbar.create * *",%line,e)) %c .= " toolbar.destroy -q "$str.word(1,%line)"$lf" else if($str.match("action.create* (*)",%line,e)) - %c .= " action.destroy -q "$str.replace($str.token(1,"(,)",%line),,\")"$lf" + %c .= " action.destroy -q "$str.tqreplace($str.token(1,"(,)",%line),,\")"$lf" else if($str.match("class(*)*",%line,e)) %c .= " objects.killclass -q "$str.token(1,"(,)",%line)"$lf" } diff --git a/data/defscript/popups.kvs b/data/defscript/popups.kvs index 7197c923..35d39ab3 100644 --- a/data/defscript/popups.kvs +++ b/data/defscript/popups.kvs @@ -9,7 +9,7 @@ defpopup(highlight) prologue { if($0!=""){ - %:regName = $reguser.match($mask($0)) + %:regName = $reguser.match($tqmask($0)) %:beingHl = $reguser.property(%:regName,highlight) %:beingHlTmp = $tmphighlight.ishighlighted($0) } @@ -27,34 +27,34 @@ defpopup(highlight) popup($tr("Always Highlight")) (!%:beingHl && !%:regName) { - item($tr("Highlight as") $0 "("$mask($0,11)")") ("$reguser.exactMatch($mask($0,11))" == "") + item($tr("Highlight as") $0 "("$tqmask($0,11)")") ("$reguser.exactMatch($tqmask($0,11))" == "") { - reguser.add $0 $mask($0,11); reguser.setproperty $0 highlight 1; + reguser.add $0 $tqmask($0,11); reguser.setproperty $0 highlight 1; } - item($tr("Highlight as") $0 "("$mask($0,12)")") ("$reguser.exactMatch($mask($0,12))" == "") + item($tr("Highlight as") $0 "("$tqmask($0,12)")") ("$reguser.exactMatch($tqmask($0,12))" == "") { - reguser.add $0 $mask($0,12); reguser.setproperty $0 highlight 1; + reguser.add $0 $tqmask($0,12); reguser.setproperty $0 highlight 1; } - item($tr("Highlight as") $0 "("$mask($0,13)")") ("$reguser.exactMatch($mask($0,13))" == "") + item($tr("Highlight as") $0 "("$tqmask($0,13)")") ("$reguser.exactMatch($tqmask($0,13))" == "") { - reguser.add $0 $mask($0,13); reguser.setproperty $0 highlight 1; + reguser.add $0 $tqmask($0,13); reguser.setproperty $0 highlight 1; } - item($tr("Highlight as") $0 "("$mask($0,3)")") ("$reguser.exactMatch($mask($0,3))" == "") + item($tr("Highlight as") $0 "("$tqmask($0,3)")") ("$reguser.exactMatch($tqmask($0,3))" == "") { - reguser.add $0 $mask($0,3); reguser.setproperty $0 highlight 1; + reguser.add $0 $tqmask($0,3); reguser.setproperty $0 highlight 1; } - item($tr("Highlight as") $0 "("$mask($0,4)")") ("$reguser.exactMatch($mask($0,4))" == "") + item($tr("Highlight as") $0 "("$tqmask($0,4)")") ("$reguser.exactMatch($tqmask($0,4))" == "") { - reguser.add $0 $mask($0,4); reguser.setproperty $0 highlight 1; + reguser.add $0 $tqmask($0,4); reguser.setproperty $0 highlight 1; } - item($tr("Highlight as") $0 "("$mask($0,5)")") ("$reguser.exactMatch($mask($0,5))" == "") + item($tr("Highlight as") $0 "("$tqmask($0,5)")") ("$reguser.exactMatch($tqmask($0,5))" == "") { - reguser.add $0 $mask($0,5); reguser.setproperty $0 highlight 1; + reguser.add $0 $tqmask($0,5); reguser.setproperty $0 highlight 1; } } @@ -74,7 +74,7 @@ defpopup(ignore) prologue { %:inIgnoreList = 0 - %:regName = $reguser.match($mask($0)) + %:regName = $reguser.match($tqmask($0)) %:ignLabelText = "

$0 " if(%:regName) { @@ -97,191 +97,191 @@ defpopup(ignore) popup($tr("Ignore as..."),44) (!%:inIgnoreList) { - item($tr("Ignore as") $0 "("$mask($0,0)")") ("$reguser.exactMatch($mask($0,0))" == "") + item($tr("Ignore as") $0 "("$tqmask($0,0)")") ("$reguser.exactMatch($tqmask($0,0))" == "") { - if(!%:regName) reguser.add $0 $mask($0,0); + if(!%:regName) reguser.add $0 $tqmask($0,0); reguser.setIgnoreEnabled $0 1; reguser.setIgnoreFlags -p -c -n -t -i -d $0; } - item($tr("Ignore as") $0 "("$mask($0,1)")") ("$reguser.exactMatch($mask($0,1))" == "") + item($tr("Ignore as") $0 "("$tqmask($0,1)")") ("$reguser.exactMatch($tqmask($0,1))" == "") { - if(!%:regName) reguser.add $0 $mask($0,1); + if(!%:regName) reguser.add $0 $tqmask($0,1); reguser.setIgnoreEnabled $0 1; reguser.setIgnoreFlags -p -c -n -t -i -d $0; } - item($tr("Ignore as") $0 "("$mask($0,2)")") ("$reguser.exactMatch($mask($0,2))" == "") + item($tr("Ignore as") $0 "("$tqmask($0,2)")") ("$reguser.exactMatch($tqmask($0,2))" == "") { - if(!%:regName) reguser.add $0 $mask($0,2); + if(!%:regName) reguser.add $0 $tqmask($0,2); reguser.setIgnoreEnabled $0 1; reguser.setIgnoreFlags -p -c -n -t -i -d $0; } - item($tr("Ignore as") $0 "("$mask($0,3)")") ("$reguser.exactMatch($mask($0,3))" == "") + item($tr("Ignore as") $0 "("$tqmask($0,3)")") ("$reguser.exactMatch($tqmask($0,3))" == "") { - if(!%:regName) reguser.add $0 $mask($0,3); + if(!%:regName) reguser.add $0 $tqmask($0,3); reguser.setIgnoreEnabled $0 1; reguser.setIgnoreFlags -p -c -n -t -i -d $0; } - item($tr("Ignore as") $0 "("$mask($0,4)")") ("$reguser.exactMatch($mask($0,4))" == "") + item($tr("Ignore as") $0 "("$tqmask($0,4)")") ("$reguser.exactMatch($tqmask($0,4))" == "") { - if(!%:regName) reguser.add $0 $mask($0,4); + if(!%:regName) reguser.add $0 $tqmask($0,4); reguser.setIgnoreEnabled $0 1; reguser.setIgnoreFlags -p -c -n -t -i -d $0; } - item($tr("Ignore as") $0 "("$mask($0,5)")") ("$reguser.exactMatch($mask($0,5))" == "") + item($tr("Ignore as") $0 "("$tqmask($0,5)")") ("$reguser.exactMatch($tqmask($0,5))" == "") { - if(!%:regName) reguser.add $0 $mask($0,5); + if(!%:regName) reguser.add $0 $tqmask($0,5); reguser.setIgnoreEnabled $0 1; reguser.setIgnoreFlags -p -c -n -t -i -d $0; } - item($tr("Ignore as") $0 "("$mask($0,6)")") ("$reguser.exactMatch($mask($0,6))" == "") + item($tr("Ignore as") $0 "("$tqmask($0,6)")") ("$reguser.exactMatch($tqmask($0,6))" == "") { - if(!%:regName) reguser.add $0 $mask($0,6); + if(!%:regName) reguser.add $0 $tqmask($0,6); reguser.setIgnoreEnabled $0 1; reguser.setIgnoreFlags -p -c -n -t -i -d $0; } - item($tr("Ignore as") $0 "("$mask($0,7)")") ("$reguser.exactMatch($mask($0,7))" == "") + item($tr("Ignore as") $0 "("$tqmask($0,7)")") ("$reguser.exactMatch($tqmask($0,7))" == "") { - if(!%:regName) reguser.add $0 $mask($0,7); + if(!%:regName) reguser.add $0 $tqmask($0,7); reguser.setIgnoreEnabled $0 1; reguser.setIgnoreFlags -p -c -n -t -i -d $0; } - item($tr("Ignore as") $0 "("$mask($0,8)")") ("$reguser.exactMatch($mask($0,8))" == "") + item($tr("Ignore as") $0 "("$tqmask($0,8)")") ("$reguser.exactMatch($tqmask($0,8))" == "") { - if(!%:regName) reguser.add $0 $mask($0,8); + if(!%:regName) reguser.add $0 $tqmask($0,8); reguser.setIgnoreEnabled $0 1; reguser.setIgnoreFlags -p -c -n -t -i -d $0; } - item($tr("Ignore as") $0 "("$mask($0,9)")") ("$reguser.exactMatch($mask($0,9))" == "") + item($tr("Ignore as") $0 "("$tqmask($0,9)")") ("$reguser.exactMatch($tqmask($0,9))" == "") { - if(!%:regName) reguser.add $0 $mask($0,9); + if(!%:regName) reguser.add $0 $tqmask($0,9); reguser.setIgnoreEnabled $0 1; reguser.setIgnoreFlags -p -c -n -t -i -d $0; } - item($tr("Ignore as") $0 "("$mask($0,10)")") ("$reguser.exactMatch($mask($0,10))" == "") + item($tr("Ignore as") $0 "("$tqmask($0,10)")") ("$reguser.exactMatch($tqmask($0,10))" == "") { - if(!%:regName) reguser.add $0 $mask($0,10); + if(!%:regName) reguser.add $0 $tqmask($0,10); reguser.setIgnoreEnabled $0 1; reguser.setIgnoreFlags -p -c -n -t -i -d $0; } - item($tr("Ignore as") $0 "("$mask($0,11)")") ("$reguser.exactMatch($mask($0,11))" == "") + item($tr("Ignore as") $0 "("$tqmask($0,11)")") ("$reguser.exactMatch($tqmask($0,11))" == "") { - if(!%:regName) reguser.add $0 $mask($0,11); + if(!%:regName) reguser.add $0 $tqmask($0,11); reguser.setIgnoreEnabled $0 1; reguser.setIgnoreFlags -p -c -n -t -i -d $0; } - item($tr("Ignore as") $0 "("$mask($0,12)")") ("$reguser.exactMatch($mask($0,12))" == "") + item($tr("Ignore as") $0 "("$tqmask($0,12)")") ("$reguser.exactMatch($tqmask($0,12))" == "") { - if(!%:regName) reguser.add $0 $mask($0,12); + if(!%:regName) reguser.add $0 $tqmask($0,12); reguser.setIgnoreEnabled $0 1; reguser.setIgnoreFlags -p -c -n -t -i -d $0; } - item($tr("Ignore as") $0 "("$mask($0,13)")") ("$reguser.exactMatch($mask($0,13))" == "") + item($tr("Ignore as") $0 "("$tqmask($0,13)")") ("$reguser.exactMatch($tqmask($0,13))" == "") { - if(!%:regName) reguser.add $0 $mask($0,13); + if(!%:regName) reguser.add $0 $tqmask($0,13); reguser.setIgnoreEnabled $0 1; reguser.setIgnoreFlags -p -c -n -t -i -d $0; } - item($tr("Ignore as") $0 "("$mask($0,14)")") ("$reguser.exactMatch($mask($0,14))" == "") + item($tr("Ignore as") $0 "("$tqmask($0,14)")") ("$reguser.exactMatch($tqmask($0,14))" == "") { - if(!%:regName) reguser.add $0 $mask($0,14); + if(!%:regName) reguser.add $0 $tqmask($0,14); reguser.setIgnoreEnabled $0 1; reguser.setIgnoreFlags -p -c -n -t -i -d $0; } - item($tr("Ignore as") $0 "("$mask($0,15)")") ("$reguser.exactMatch($mask($0,15))" == "") + item($tr("Ignore as") $0 "("$tqmask($0,15)")") ("$reguser.exactMatch($tqmask($0,15))" == "") { - if(!%:regName) reguser.add $0 $mask($0,15); + if(!%:regName) reguser.add $0 $tqmask($0,15); reguser.setIgnoreEnabled $0 1; reguser.setIgnoreFlags -p -c -n -t -i -d $0; } - item($tr("Ignore as") $0 "("$mask($0,16)")") ("$reguser.exactMatch($mask($0,16))" == "") + item($tr("Ignore as") $0 "("$tqmask($0,16)")") ("$reguser.exactMatch($tqmask($0,16))" == "") { - if(!%:regName) reguser.add $0 $mask($0,16); + if(!%:regName) reguser.add $0 $tqmask($0,16); reguser.setIgnoreEnabled $0 1; reguser.setIgnoreFlags -p -c -n -t -i -d $0; } - item($tr("Ignore as") $0 "("$mask($0,17)")") ("$reguser.exactMatch($mask($0,17))" == "") + item($tr("Ignore as") $0 "("$tqmask($0,17)")") ("$reguser.exactMatch($tqmask($0,17))" == "") { - if(!%:regName) reguser.add $0 $mask($0,17); + if(!%:regName) reguser.add $0 $tqmask($0,17); reguser.setIgnoreEnabled $0 1; reguser.setIgnoreFlags -p -c -n -t -i -d $0; } - item($tr("Ignore as") $0 "("$mask($0,18)")") ("$reguser.exactMatch($mask($0,18))" == "") + item($tr("Ignore as") $0 "("$tqmask($0,18)")") ("$reguser.exactMatch($tqmask($0,18))" == "") { - if(!%:regName) reguser.add $0 $mask($0,18); + if(!%:regName) reguser.add $0 $tqmask($0,18); reguser.setIgnoreEnabled $0 1; reguser.setIgnoreFlags -p -c -n -t -i -d $0; } - item($tr("Ignore as") $0 "("$mask($0,19)")") ("$reguser.exactMatch($mask($0,19))" == "") + item($tr("Ignore as") $0 "("$tqmask($0,19)")") ("$reguser.exactMatch($tqmask($0,19))" == "") { - if(!%:regName) reguser.add $0 $mask($0,19); + if(!%:regName) reguser.add $0 $tqmask($0,19); reguser.setIgnoreEnabled $0 1; reguser.setIgnoreFlags -p -c -n -t -i -d $0; } - item($tr("Ignore as") $0 "("$mask($0,20)")") ("$reguser.exactMatch($mask($0,20))" == "") + item($tr("Ignore as") $0 "("$tqmask($0,20)")") ("$reguser.exactMatch($tqmask($0,20))" == "") { - if(!%:regName) reguser.add $0 $mask($0,20); + if(!%:regName) reguser.add $0 $tqmask($0,20); reguser.setIgnoreEnabled $0 1; reguser.setIgnoreFlags -p -c -n -t -i -d $0; } - item($tr("Ignore as") $0 "("$mask($0,21)")") ("$reguser.exactMatch($mask($0,21))" == "") + item($tr("Ignore as") $0 "("$tqmask($0,21)")") ("$reguser.exactMatch($tqmask($0,21))" == "") { - if(!%:regName) reguser.add $0 $mask($0,21); + if(!%:regName) reguser.add $0 $tqmask($0,21); reguser.setIgnoreEnabled $0 1; reguser.setIgnoreFlags -p -c -n -t -i -d $0; } - item($tr("Ignore as") $0 "("$mask($0,22)")") ("$reguser.exactMatch($mask($0,22))" == "") + item($tr("Ignore as") $0 "("$tqmask($0,22)")") ("$reguser.exactMatch($tqmask($0,22))" == "") { - if(!%:regName) reguser.add $0 $mask($0,22); + if(!%:regName) reguser.add $0 $tqmask($0,22); reguser.setIgnoreEnabled $0 1; reguser.setIgnoreFlags -p -c -n -t -i -d $0; } - item($tr("Ignore as") $0 "("$mask($0,23)")") ("$reguser.exactMatch($mask($0,23))" == "") + item($tr("Ignore as") $0 "("$tqmask($0,23)")") ("$reguser.exactMatch($tqmask($0,23))" == "") { - if(!%:regName) reguser.add $0 $mask($0,23); + if(!%:regName) reguser.add $0 $tqmask($0,23); reguser.setIgnoreEnabled $0 1; reguser.setIgnoreFlags -p -c -n -t -i -d $0; } - item($tr("Ignore as") $0 "("$mask($0,24)")") ("$reguser.exactMatch($mask($0,24))" == "") + item($tr("Ignore as") $0 "("$tqmask($0,24)")") ("$reguser.exactMatch($tqmask($0,24))" == "") { - if(!%:regName) reguser.add $0 $mask($0,24); + if(!%:regName) reguser.add $0 $tqmask($0,24); reguser.setIgnoreEnabled $0 1; reguser.setIgnoreFlags -p -c -n -t -i -d $0; } - item($tr("Ignore as") $0 "("$mask($0,25)")") ("$reguser.exactMatch($mask($0,25))" == "") + item($tr("Ignore as") $0 "("$tqmask($0,25)")") ("$reguser.exactMatch($tqmask($0,25))" == "") { - if(!%:regName) reguser.add $0 $mask($0,25); + if(!%:regName) reguser.add $0 $tqmask($0,25); reguser.setIgnoreEnabled $0 1; reguser.setIgnoreFlags -p -c -n -t -i -d $0; } - item($tr("Ignore as") $0 "("$mask($0,26)")") ("$reguser.exactMatch($mask($0,26))" == "") + item($tr("Ignore as") $0 "("$tqmask($0,26)")") ("$reguser.exactMatch($tqmask($0,26))" == "") { - if(!%:regName) reguser.add $0 $mask($0,26); + if(!%:regName) reguser.add $0 $tqmask($0,26); reguser.setIgnoreEnabled $0 1; reguser.setIgnoreFlags -p -c -n -t -i -d $0; } @@ -301,12 +301,12 @@ defpopup(registration) # This is really smart...we are loading # the reguser module only if this popup is being requested (the user effectively # puts the mouse on the "Registration" item and the sub-popup is being shown) - %:regName = $reguser.match($mask($0)) + %:regName = $reguser.match($tqmask($0)) %:labelText = "

$0"; if(%:regName) { %:labelText << $tr("is registered as") ": "%:regName"" - # We want to display masks here!!! + # We want to display tqmasks here!!! %:inNotifyList = $reguser.property(%:regName,notify); if(%:inNotifyList)%:labelText << "
$0" $tr("is in the notify list") %:curAvatar = $avatar.name($0); @@ -322,39 +322,39 @@ defpopup(registration) item($tr("Register")"...") (!%:regName) { - reguser.wizard $mask($0) + reguser.wizard $tqmask($0) } popup($tr("Quick Registration")) (!%:regName) { - item($tr("Register as") $0 "("$mask($0,11)")") ("$reguser.exactMatch($mask($0,11))" == "") + item($tr("Register as") $0 "("$tqmask($0,11)")") ("$reguser.exactMatch($tqmask($0,11))" == "") { - reguser.add $0 $mask($0,11) + reguser.add $0 $tqmask($0,11) } - item($tr("Register as") $0 "("$mask($0,12)")") ("$reguser.exactMatch($mask($0,12))" == "") + item($tr("Register as") $0 "("$tqmask($0,12)")") ("$reguser.exactMatch($tqmask($0,12))" == "") { - reguser.add $0 $mask($0,12) + reguser.add $0 $tqmask($0,12) } - item($tr("Register as") $0 "("$mask($0,13)")") ("$reguser.exactMatch($mask($0,13))" == "") + item($tr("Register as") $0 "("$tqmask($0,13)")") ("$reguser.exactMatch($tqmask($0,13))" == "") { - reguser.add $0 $mask($0,13) + reguser.add $0 $tqmask($0,13) } - item($tr("Register as") $0 "("$mask($0,3)")") ("$reguser.exactMatch($mask($0,3))" == "") + item($tr("Register as") $0 "("$tqmask($0,3)")") ("$reguser.exactMatch($tqmask($0,3))" == "") { - reguser.add $0 $mask($0,3) + reguser.add $0 $tqmask($0,3) } - item($tr("Register as") $0 "("$mask($0,4)")") ("$reguser.exactMatch($mask($0,4))" == "") + item($tr("Register as") $0 "("$tqmask($0,4)")") ("$reguser.exactMatch($tqmask($0,4))" == "") { - reguser.add $0 $mask($0,4) + reguser.add $0 $tqmask($0,4) } - item($tr("Register as") $0 "("$mask($0,5)")") ("$reguser.exactMatch($mask($0,5))" == "") + item($tr("Register as") $0 "("$tqmask($0,5)")") ("$reguser.exactMatch($tqmask($0,5))" == "") { - reguser.add $0 $mask($0,5) + reguser.add $0 $tqmask($0,5) } } @@ -439,7 +439,7 @@ defpopup(channel) %:itemBanMask = "*!user@*.host.tld" %:itemBanNick = "nick" } else { - %:itemBanMask = $mask(%:visible,$option(uintDefaultBanType)) + %:itemBanMask = $tqmask(%:visible,$option(uintDefaultBanType)) if("%:itemBanMask" == "*!*@*")%:itemBanName = $tr("&Ban") %:itemBanNick = %:visible } @@ -498,7 +498,7 @@ defpopup(channel) item($tr("Mask for") %:visible,75) (!%:multiple) { - echo $mask($0,11) + echo $tqmask($0,11) } } @@ -576,7 +576,7 @@ defpopup(channel) item($tr("&Ban") %:visible "("%:itemBanMask")",67) (("%:itemBanMask" != "*!*@*") && %:bCanKB) { - ban $mask($0,$option(uintDefaultBanType)) + ban $tqmask($0,$option(uintDefaultBanType)) } item(%:itemBanName %:visible "("%:itemBanNick!*@*")",67) (%:bCanKB) @@ -601,7 +601,7 @@ defpopup(channel) } separator - item($tr("Configure ban mask..."),20) + item($tr("Configure ban tqmask..."),20) { options.edit KviChannelAdvancedOptionsWidget } @@ -1119,7 +1119,7 @@ defpopup(querytextview) item($tr("Mask for") $0,75) (!%:multiple) { - echo $mask($0,11) + echo $tqmask($0,11) } } @@ -1159,7 +1159,7 @@ defpopup(logging) # If this window is being logged actually , $log.file will be non empty # and pointing to the log file actually open. - %:logfile = $str.replace($log.file,,$file.localdir) + %:logfile = $str.tqreplace($log.file,,$file.localdir) } label($tr("Logging to"):
%:logfile) ("%:logfile" != "") diff --git a/data/deftheme/silverirc/themedata.kvc b/data/deftheme/silverirc/themedata.kvc index a83296b8..ddad668a 100644 --- a/data/deftheme/silverirc/themedata.kvc +++ b/data/deftheme/silverirc/themedata.kvc @@ -163,7 +163,7 @@ iccolor1=0,0,0 mirccolor12=15,15,255 mirccolor5=150,0,0 msgtypeChanAdmin=242,3,100,1,1 -msgtypeGenericStatus=133,14,100,1,1 +msgtypeGenerictqStatus=133,14,100,1,1 msgtypeHalfOp=174,3,100,1,1 msgtypeDevoice=63,3,100,1,1 msgtypeJoin=39,14,100,1,2 diff --git a/data/doctemplates/rfc2812.template b/data/doctemplates/rfc2812.template index 9d81a1c8..df6a12f5 100644 --- a/data/doctemplates/rfc2812.template +++ b/data/doctemplates/rfc2812.template @@ -23,7 +23,7 @@ Category: Informational [/td][/tr] [tr][td] -[b]Status of this Memo[/b] +[b]tqStatus of this Memo[/b] [/td][/tr] [tr][td] @@ -281,7 +281,7 @@ the only restriction on a channel name is that it SHALL NOT contain any spaces (' '), a control G (^G or ASCII 7), a comma (','). Space is used as parameter separator and command is used as a list item separator by the protocol). A colon (':') can also be used as a -delimiter for the channel mask. Channel names are case insensitive. +delimiter for the channel tqmask. Channel names are case insensitive. See the protocol grammar rules (section 2.3.1) for the exact syntax of a channel name.[br] [p] @@ -414,7 +414,7 @@ The extracted message is parsed into the components , target = nickname / server msgtarget = msgto *( "," msgto ) msgto = channel / ( user [ "%" host ] "@" servername ) - msgto =/ ( user "%" host ) / targetmask + msgto =/ ( user "%" host ) / targettqmask msgto =/ nickname / ( nickname "!" user "@" host ) channel = ( "#" / "+" / ( "!" channelid ) / "&" ) chanstring [ ":" chanstring ] @@ -429,8 +429,8 @@ The extracted message is parsed into the components , ip6addr = 1*hexdigit 7( ":" 1*hexdigit ) ip6addr =/ "0:0:0:0:0:" ( "0" / "FFFF" ) ":" ip4addr nickname = ( letter / special ) *8( letter / digit / special / "-" ) - targetmask = ( "$" / "#" ) mask - ; see details on allowed masks in section 3.3.1 + targettqmask = ( "$" / "#" ) tqmask + ; see details on allowed tqmasks in section 3.3.1 chanstring = %x01-07 / %x08-09 / %x0B-0C / %x0E-1F / %x21-2B chanstring =/ %x2D-39 / %x3B-FF ; any octet except NUL, BELL, CR, LF, " ", "," and ":" @@ -493,7 +493,7 @@ is supplied in section 5 (Replies). [/td][/tr] [tr][td] -When wildcards are allowed in a string, it is referred as a "mask". +When wildcards are allowed in a string, it is referred as a "tqmask". [p] For string matching purposes, the protocol allows the use of two special characters: '?' (%x3F) to match one and only one character, @@ -503,7 +503,7 @@ characters can be escaped using the character '\' (%x5C). [pre] The Augmented BNF syntax for this is: - mask = *( nowild / noesc wildone / noesc wildmany ) + tqmask = *( nowild / noesc wildone / noesc wildmany ) wildone = %x3F wildmany = %x2A nowild = %x01-29 / %x2B-3E / %x40-FF @@ -638,7 +638,7 @@ the username, hostname and realname of a new user. The parameter should be a numeric, and can be used to automatically set user modes when registering with the server. This -parameter is a bitmask, with only 2 bits having any signification: if +parameter is a bittqmask, with only 2 bits having any signification: if the bit 2 is set, the user mode 'w' will be set and if the bit 3 is set, the user mode 'i' will be set. (See Section 3.1.5 "User Modes"). @@ -769,7 +769,7 @@ service. The service may only be known to servers which have a name matching the distribution. For a matching server to have knowledge of the service, the network path between that server and the server on which the service is connected MUST be composed of servers which -names all match the mask. +names all match the tqmask. The parameter is currently reserved for future usage. @@ -1032,7 +1032,7 @@ command for modes that take a parameter. the number of users on channel "#eu- opers". - MODE &oulu +b ; Command to list ban masks set for + MODE &oulu +b ; Command to list ban tqmasks set for the channel "&oulu". MODE &oulu +b *!*@* ; Command to prevent all users from @@ -1048,10 +1048,10 @@ command for modes that take a parameter. hostname matching *.edu from joining, except if matching *.bu.edu - MODE #meditation e ; Command to list exception masks set + MODE #meditation e ; Command to list exception tqmasks set for the channel "#meditation". - MODE #meditation I ; Command to list invitations masks + MODE #meditation I ; Command to list invitations tqmasks set for the channel "#meditation". MODE !12345ircd O ; Command to ask who the channel @@ -1266,9 +1266,9 @@ PRIVMSG is used to send private messages between users, as well as to send messages to channels. is usually the nickname of the recipient of the message, or a channel name. -The parameter may also be a host mask (#) or server -mask ($). In both cases the server will only send the PRIVMSG -to those who have a server or host matching the mask. The mask MUST +The parameter may also be a host tqmask (#) or server +tqmask ($). In both cases the server will only send the PRIVMSG +to those who have a server or host matching the tqmask. The tqmask MUST have at least 1 (one) "." in it and no wildcards following the last ".". This requirement exists to prevent people sending messages to "#*" or "$*", which would broadcast to all users. Wildcards are the @@ -1357,7 +1357,7 @@ The server query group of commands has been designed to return information about any server which is connected to the network. In these queries, where a parameter appears as , wildcard -masks are usually valid. For each parameter, however, only one query +tqmasks are usually valid. For each parameter, however, only one query and set of replies is to be generated. In most cases, if a nickname is given, it will mean the server to which the user is connected. @@ -1389,13 +1389,13 @@ Wildcards are allowed in the parameter. [tr][td][pre] Command: LUSERS -Parameters: [ [ ] ] +Parameters: [ [ ] ] The LUSERS command is used to get statistics about the size of the IRC network. If no parameter is given, the reply will be about the -whole net. If a is specified, then the reply will only +whole net. If a is specified, then the reply will only concern the part of the network formed by the servers matching the -mask. Finally, if the parameter is specified, the request +tqmask. Finally, if the parameter is specified, the request is forwarded to that server which will generate the reply. Wildcards are allowed in the parameter. @@ -1486,13 +1486,13 @@ published this way. [tr][td][pre] Command: LINKS -Parameters: [ [ ] ] +Parameters: [ [ ] ] With LINKS, a user can list all servernames, which are known by the server answering the query. The returned list of servers MUST match -the mask, or if no mask is given, the full list is returned. +the tqmask, or if no tqmask is given, the full list is returned. -If is given in addition to , the LINKS +If is given in addition to , the LINKS command is forwarded to the first server found that matches that name (if any), and that server is then required to answer the query. @@ -1545,7 +1545,7 @@ Parameters: [ ] The CONNECT command can be used to request a server to try to establish a new connection to another server immediately. CONNECT is a privileged command and SHOULD be available only to IRC Operators. -If a is given and its mask doesn't match name of the +If a is given and its tqmask doesn't match name of the parsing server, the CONNECT attempt is sent to the first match of remote server. Otherwise the CONNECT attempt is made by the server processing the request. @@ -1698,7 +1698,7 @@ information about any service which is connected to the network. [tr][td][pre] Command: SERVLIST -Parameters: [ [ ] ] +Parameters: [ [ ] ] The SERVLIST command is used to list services currently connected to the network and visible to the user issuing the command. The @@ -1756,20 +1756,20 @@ allowed to. [tr][td][pre] Command: WHO -Parameters: [ [ "o" ] ] +Parameters: [ [ "o" ] ] The WHO command is used by a client to generate a query which returns -a list of information which 'matches' the parameter given by -the client. In the absence of the parameter, all visible +a list of information which 'matches' the parameter given by +the client. In the absence of the parameter, all visible (users who aren't invisible (user mode +i) and who don't have a common channel with the requesting client) are listed. The same -result can be achieved by using a of "0" or any wildcard which +result can be achieved by using a of "0" or any wildcard which will end up matching every visible user. -The passed to WHO is matched against users' host, server, real -name and nickname if the channel cannot be found. +The passed to WHO is matched against users' host, server, real +name and nickname if the channel cannot be found. If the "o" parameter is passed only operators are returned according -to the supplied. +to the supplied. Numeric Replies: @@ -1792,13 +1792,13 @@ to the supplied. [tr][td][pre] Command: WHOIS -Parameters: [ ] *( "," ) +Parameters: [ ] *( "," ) This command is used to query information about particular user. The server will answer this command with several numeric messages -indicating different statuses of each user which matches the mask (if +indicating different statuses of each user which matches the tqmask (if you are entitled to see them). If no wildcard is present in the -, any information about that nick which you are allowed to see +, any information about that nick which you are allowed to see is presented. If the parameter is specified, it sends the query to a @@ -2477,27 +2477,27 @@ to 399. indicate that it is summoning that user. 346 RPL_INVITELIST - " " + " " 347 RPL_ENDOFINVITELIST " :End of channel invite list" - - When listing the 'invitations masks' for a given channel, + - When listing the 'invitations tqmasks' for a given channel, a server is required to send the list back using the RPL_INVITELIST and RPL_ENDOFINVITELIST messages. A - separate RPL_INVITELIST is sent for each active mask. - After the masks have been listed (or if none present) a + separate RPL_INVITELIST is sent for each active tqmask. + After the tqmasks have been listed (or if none present) a RPL_ENDOFINVITELIST MUST be sent. 348 RPL_EXCEPTLIST - " " + " " 349 RPL_ENDOFEXCEPTLIST " :End of channel exception list" - - When listing the 'exception masks' for a given channel, + - When listing the 'exception tqmasks' for a given channel, a server is required to send the list back using the RPL_EXCEPTLIST and RPL_ENDOFEXCEPTLIST messages. A - separate RPL_EXCEPTLIST is sent for each active mask. - After the masks have been listed (or if none present) + separate RPL_EXCEPTLIST is sent for each active tqmask. + After the tqmasks have been listed (or if none present) a RPL_ENDOFEXCEPTLIST MUST be sent. 351 RPL_VERSION @@ -2548,24 +2548,24 @@ to 399. the end. 364 RPL_LINKS - " : " + " : " 365 RPL_ENDOFLINKS - " :End of LINKS list" + " :End of LINKS list" - In replying to the LINKS message, a server MUST send replies back using the RPL_LINKS numeric and mark the end of the list using an RPL_ENDOFLINKS reply. 367 RPL_BANLIST - " " + " " 368 RPL_ENDOFBANLIST " :End of channel ban list" - When listing the active 'bans' for a given channel, a server is required to send the list back using the RPL_BANLIST and RPL_ENDOFBANLIST messages. A separate - RPL_BANLIST is sent for each active banmask. After the - banmasks have been listed (or if none present) a + RPL_BANLIST is sent for each active bantqmask. After the + bantqmasks have been listed (or if none present) a RPL_ENDOFBANLIST MUST be sent. 371 RPL_INFO @@ -2719,7 +2719,7 @@ to 399. - reports the server uptime. 243 RPL_STATSOLINE - "O * " + "O * " - reports the allowed hosts from where user may become IRC operators. @@ -2731,10 +2731,10 @@ to 399. RPL_UMODEIS is sent back. 234 RPL_SERVLIST - " " + " " 235 RPL_SERVLISTEND - " :End of service listing" + " :End of service listing" - When listing services in reply to a SERVLIST message, a server is required to send the list back using the @@ -2869,11 +2869,11 @@ to 399. 412 ERR_NOTEXTTOSEND ":No text to send" 413 ERR_NOTOPLEVEL - " :No toplevel domain specified" + " :No toplevel domain specified" 414 ERR_WILDTOPLEVEL - " :Wildcard in toplevel domain" + " :Wildcard in toplevel domain" 415 ERR_BADMASK - " :Bad Server/host mask" + " :Bad Server/host tqmask" - 412 - 415 are returned by PRIVMSG to indicate that the message wasn't delivered for some reason. @@ -2914,7 +2914,7 @@ to 399. 432 ERR_ERRONEUSNICKNAME " :Erroneous nickname" - - Returned after receiving a NICK message which contains + - Returned after receiving a NICK message which tqcontains characters which do not fall in the defined set. See section 2.3.1 for details on valid nicknames. @@ -3180,7 +3180,7 @@ both will removed by use of a server KILL (See Section 3.7.1). [tr][td] There is no way to escape the escape character "\" (%x5C). While -this isn't usually a problem, it makes it impossible to form a mask +this isn't usually a problem, it makes it impossible to form a tqmask with a backslash character ("\") preceding a wildcard. [/td][/tr] diff --git a/data/resources_mac/kvirc.icns b/data/resources_mac/kvirc.icns index 87fcdac4..c02a2ad8 100644 Binary files a/data/resources_mac/kvirc.icns and b/data/resources_mac/kvirc.icns differ diff --git a/src/config.h.in b/src/config.h.in index e79ea040..a03a7c5b 100644 --- a/src/config.h.in +++ b/src/config.h.in @@ -88,7 +88,7 @@ /* define if you have libgsm and want the GSM code to be compiled */ #undef COMPILE_USE_GSM -/* define if you want to compile the Qt 4.x support */ +/* define if you want to compile the TQt 4.x support */ #undef COMPILE_USE_QT4 /* define if you trust your memmove() function */ diff --git a/src/kvi_configstatus.h b/src/kvi_configstatus.h index c776b26a..7a23d15f 100644 --- a/src/kvi_configstatus.h +++ b/src/kvi_configstatus.h @@ -89,7 +89,7 @@ /* define if you have libgsm and want the GSM code to be compiled */ #define COMPILE_USE_GSM 1 -/* define if you want to compile the Qt 4.x support */ +/* define if you want to compile the TQt 4.x support */ /* #undef COMPILE_USE_QT4 */ /* define if you trust your memmove() function */ diff --git a/src/kvilib/config/kvi_debug.h b/src/kvilib/config/kvi_debug.h index 8ae1a120..a54704a5 100644 --- a/src/kvilib/config/kvi_debug.h +++ b/src/kvilib/config/kvi_debug.h @@ -25,7 +25,7 @@ // //============================================================================= -#include +#include //============================================================================= // This file contains the definition of the debug macros diff --git a/src/kvilib/config/kvi_defaults.h b/src/kvilib/config/kvi_defaults.h index fc375b05..05b9c032 100644 --- a/src/kvilib/config/kvi_defaults.h +++ b/src/kvilib/config/kvi_defaults.h @@ -26,7 +26,7 @@ //============================================================================= //============================================================================= -// This file contains (more or less) freely customizable compile time defaults +// This file tqcontains (more or less) freely customizable compile time defaults // // You can safely play with the ones you understand the meaning of //============================================================================= @@ -50,7 +50,7 @@ #define KVI_DEFAULT_REALNAME "KVIrc " VERSION " '" KVI_RELEASE_NAME "' http://kvirc.net/" #define KVI_DEFAULT_PART_MESSAGE "No matter how dark the night, somehow the Sun rises once again" -#define KVI_DEFAULT_QUIT_MESSAGE "KVIrc $version $version(r) http://www.kvirc.net/" +#define KVI_DEFAULT_TQUIT_MESSAGE "KVIrc $version $version(r) http://www.kvirc.net/" #define KVI_DEFAULT_CTCP_USERINFO_REPLY "I'm too lazy to edit this field." #define KVI_DEFAULT_CTCP_PAGE_REPLY "Your message has been received and logged" #define KVI_DEFAULT_AWAY_MESSAGE "I'm off to see the wizard." diff --git a/src/kvilib/config/kvi_settings.h b/src/kvilib/config/kvi_settings.h index ee6044bd..5c8d8c13 100644 --- a/src/kvilib/config/kvi_settings.h +++ b/src/kvilib/config/kvi_settings.h @@ -32,7 +32,7 @@ // Better do not touch this //============================================================================= -#include +#include #if defined(_OS_WIN32_) || defined(Q_OS_WIN32) || defined(Q_OS_WIN32_) diff --git a/src/kvilib/config/kvi_wincfg.h b/src/kvilib/config/kvi_wincfg.h index f90998a8..3441e7b2 100644 --- a/src/kvilib/config/kvi_wincfg.h +++ b/src/kvilib/config/kvi_wincfg.h @@ -32,7 +32,7 @@ /* define if you want to compile with new parser */ #define COMPILE_NEW_KVS 1 -/* define if you want to use the Qt 4.x support */ +/* define if you want to use the TQt 4.x support */ /* #undef COMPILE_USE_QT4 */ #define COMPILE_USE_QT4 @@ -132,7 +132,7 @@ /* define this if you are on a big endian machine */ /* #undef BIG_ENDIAN_MACHINE_BYTE_ORDER */ -/* define this if you want to use the unicode-local 8bit charset translation */ +/* define this if you want to use the tqunicode-local 8bit charset translation */ /* #undef COMPILE_USE_LOCAL_8BIT */ /* define this if you want to disable the inter-process communication support */ diff --git a/src/kvilib/core/kvi_error.cpp b/src/kvilib/core/kvi_error.cpp index 6497c757..bbd1abcd 100644 --- a/src/kvilib/core/kvi_error.cpp +++ b/src/kvilib/core/kvi_error.cpp @@ -57,7 +57,7 @@ const char * g_errorTable[KVI_NUM_ERRORS]= __tr_no_lookup("Unexpected end of command in dictionary key"), // 006: unexpectedEndInDictionaryKey __tr_no_lookup("Switch dash without switch letter"), // 007: switchDashWithoutSwitchLetter __tr_no_lookup("Unknown function"), // 008: unknownFunction - __tr_no_lookup("Unexpected end of command in parenthesis"), // 009: unexpectedEndInParenthesis + __tr_no_lookup("Unexpected end of command in tqparenthesis"), // 009: unexpectedEndInParenthesis __tr_no_lookup("Unexpected end of command in function parameters"), // 010: unexpectedEndInFunctionParams __tr_no_lookup("Missing variable name"), // 011: missingVariableName __tr_no_lookup("Variable or identifier expected"), // 012: variableOrIdentifierExpected @@ -112,7 +112,7 @@ const char * g_errorTable[KVI_NUM_ERRORS]= __tr_no_lookup("Integer parameter expected"), // 061 __tr_no_lookup("Invalid parameter"), // 062 __tr_no_lookup("No such file"), // 063 - __tr_no_lookup("Open parenthesis expected"), // 064 + __tr_no_lookup("Open tqparenthesis expected"), // 064 __tr_no_lookup("Open brace expected"), // 065 __tr_no_lookup("Can't kill a builtin class"), // 066 __tr_no_lookup("The SOCKSV4 protocol lacks IpV6 support"), // 067 @@ -183,7 +183,7 @@ namespace KviError return g_errorTable[KviError_unknownError]; } - QString getDescription(int iErrorCode) + TQString getDescription(int iErrorCode) { return __tr2qs_no_xgettext(getUntranslatedDescription(iErrorCode)); } diff --git a/src/kvilib/core/kvi_error.h b/src/kvilib/core/kvi_error.h index 7ab55e88..c295dfe2 100644 --- a/src/kvilib/core/kvi_error.h +++ b/src/kvilib/core/kvi_error.h @@ -180,7 +180,7 @@ namespace KviError { - KVILIB_API QString getDescription(int iErrorCode); + KVILIB_API TQString getDescription(int iErrorCode); KVILIB_API const char * getUntranslatedDescription(int iErrorCode); KVILIB_API int translateSystemError(int iErrNo); }; diff --git a/src/kvilib/core/kvi_pointerhashtable.h b/src/kvilib/core/kvi_pointerhashtable.h index 9066c091..4a9b20d8 100644 --- a/src/kvilib/core/kvi_pointerhashtable.h +++ b/src/kvilib/core/kvi_pointerhashtable.h @@ -229,25 +229,25 @@ inline void * & kvi_hash_key_default(void *) return static_default; } -inline unsigned int kvi_hash_hash(const QString &szKey,bool bCaseSensitive) +inline unsigned int kvi_hash_hash(const TQString &szKey,bool bCaseSensitive) { unsigned int uResult = 0; - const QChar * p = KviQString::nullTerminatedArray(szKey); + const TQChar * p = KviTQString::nullTerminatedArray(szKey); if(!p)return 0; if(bCaseSensitive) { - while(p->unicode()) + while(p->tqunicode()) { - uResult += p->unicode(); + uResult += p->tqunicode(); p++; } } else { - while(p->unicode()) + while(p->tqunicode()) { #ifdef COMPILE_USE_QT4 - uResult += p->toLower().unicode(); + uResult += p->toLower().tqunicode(); #else - uResult += p->lower().unicode(); + uResult += p->lower().tqunicode(); #endif p++; } @@ -255,25 +255,25 @@ inline unsigned int kvi_hash_hash(const QString &szKey,bool bCaseSensitive) return uResult; } -inline bool kvi_hash_key_equal(const QString &szKey1,const QString &szKey2,bool bCaseSensitive) +inline bool kvi_hash_key_equal(const TQString &szKey1,const TQString &szKey2,bool bCaseSensitive) { if(bCaseSensitive) - return KviQString::equalCS(szKey1,szKey2); - return KviQString::equalCI(szKey1,szKey2); + return KviTQString::equalCS(szKey1,szKey2); + return KviTQString::equalCI(szKey1,szKey2); } -inline void kvi_hash_key_copy(const QString &szFrom,QString &szTo,bool) +inline void kvi_hash_key_copy(const TQString &szFrom,TQString &szTo,bool) { szTo = szFrom; } -inline void kvi_hash_key_destroy(QString &szKey,bool) +inline void kvi_hash_key_destroy(TQString &szKey,bool) { } -inline const QString & kvi_hash_key_default(QString *) +inline const TQString & kvi_hash_key_default(TQString *) { - return KviQString::empty; + return KviTQString::empty; } template class KviPointerHashTable; @@ -311,7 +311,7 @@ public: /// \endverbatim /// /// Implementations for the most likey Key data types are provided below. -/// KviPointerHashTable will automagically work with const char *,QString,KviStr +/// KviPointerHashTable will automagically work with const char *,TQString,KviStr /// and integer types as keys. /// /// For string Key types, the hash table may or may not be case sensitive. @@ -349,7 +349,7 @@ public: /// Places the hash table iterator at the position /// of the item found. /// - T * find(const Key & hKey) + T * tqfind(const Key & hKey) { m_uIteratorIdx = kvi_hash_hash(hKey,m_bCaseSensitive) % m_uSize; if(!m_pDataArray[m_uIteratorIdx])return 0; @@ -364,11 +364,11 @@ public: /// Returns the item associated to the key hKey /// or NULL if no such item exists in the hash table. /// Places the hash table iterator at the position - /// of the item found. This is an alias to find(). + /// of the item found. This is an alias to tqfind(). /// T * operator[](const Key & hKey) { - return find(hKey); + return tqfind(hKey); } /// @@ -427,7 +427,7 @@ public: /// The hash table iterator is placed at the newly inserted item. /// This is just an alias to insert() with a different name. /// - void replace(const Key & hKey,T * pData) + void tqreplace(const Key & hKey,T * pData) { insert(hKey,pData); } @@ -522,7 +522,7 @@ public: /// it's hash table entry, if found, and NULL otherwise. /// The hash table iterator is placed at the item found. /// - KviPointerHashTableEntry * findRef(const T * pRef) + KviPointerHashTableEntry * tqfindRef(const T * pRef) { for(m_uIteratorIdx = 0;m_uIteratorIdx * currentEntry() { @@ -568,7 +568,7 @@ public: /// Places the hash table iterator at the next entry /// and returns it. /// This function must be preceeded by a call to firstEntry(), first() - /// or findRef(). + /// or tqfindRef(). /// KviPointerHashTableEntry * nextEntry() { @@ -596,7 +596,7 @@ public: /// /// Returns the data value pointer pointed by the hash table iterator. /// This function must be preceeded by a call to firstEntry(), first() - /// or findRef(). + /// or tqfindRef(). /// T * current() { @@ -613,7 +613,7 @@ public: /// /// Returns the key pointed by the hash table iterator. /// This function must be preceeded by a call to firstEntry(), first() - /// or findRef(). + /// or tqfindRef(). /// const Key & currentKey() { @@ -648,7 +648,7 @@ public: /// Places the hash table iterator at the next entry /// and returns the associated data value pointer. /// This function must be preceeded by a call to firstEntry(), first() - /// or findRef(). + /// or tqfindRef(). /// T * next() { @@ -681,7 +681,7 @@ public: /// Removes all items in the hash table and then /// makes a complete shallow copy of the data contained in t. /// The removed items are deleted if autodeletion is enabled. - /// The hash table iterator is invalidated. + /// The hash table iterator is tqinvalidated. /// Does not change autodelete flag: make sure you not delete the items twice :) /// void copyFrom(KviPointerHashTable &t) @@ -693,7 +693,7 @@ public: /// /// Inserts a complete shallow copy of the data contained in t. - /// The hash table iterator is invalidated. + /// The hash table iterator is tqinvalidated. /// void insert(KviPointerHashTable &t) { diff --git a/src/kvilib/core/kvi_pointerlist.h b/src/kvilib/core/kvi_pointerlist.h index 381780c8..8b5cb9c5 100644 --- a/src/kvilib/core/kvi_pointerlist.h +++ b/src/kvilib/core/kvi_pointerlist.h @@ -32,13 +32,13 @@ // //============================================================================= -// Qt changes the collection classes too much and too frequently. +// TQt changes the collection classes too much and too frequently. // I think we need to be independent of that to the maximum degree possible. // That's why we have our own fast pointer list class. -// This does not depend on Qt AT ALL and has an interface similar -// to the Qt<=3.x series. The pointer lists with the autodelete +// This does not depend on TQt AT ALL and has an interface similar +// to the TQt<=3.x series. The pointer lists with the autodelete // feature was great and I don't completly understand why they have -// been removed from Qt4 in favor of the value based non-autodeleting +// been removed from TQt4 in favor of the value based non-autodeleting // lists... anyway: here we go :) #include "kvi_settings.h" @@ -288,7 +288,7 @@ public: /// Iterating over pointers is also very fast and this /// class contains an internal iterator that allows to /// write loops in a compact and clean way. -/// See the first(), next(), current() and findRef() +/// See the first(), next(), current() and tqfindRef() /// functions for the description of this feature. /// /// There is also a non-const external iterator @@ -297,11 +297,11 @@ public: /// since the list provides the autoDelete() method /// which vould implicitly violate constness. /// If you have to deal with const objects then -/// you need to use a QList instead. +/// you need to use a TQList instead. /// /// Your objects also do not need to support copy constructors /// or >= operators. This class will work fine without them -/// as opposed to a plain QList. +/// as opposed to a plain TQList. /// /// This class also supports automatic deletion of the inseted items. /// See the setAutoDelete() and autoDelete() members for the @@ -618,7 +618,7 @@ public: /// /// Returns the current iteration item /// A call to this function MUST be preceded by a call to - /// first(),last(),at() or findRef() + /// first(),last(),at() or tqfindRef() /// T * current() { @@ -628,9 +628,9 @@ public: /// /// Returns the current iteration item /// A call to this function should be preceded by a call to - /// first(),last(),at() or findRef(). + /// first(),last(),at() or tqfindRef(). /// This function will return a NULL pointer if the current - /// item has been invalidated due to a remove operation. + /// item has been tqinvalidated due to a remove operation. /// T * safeCurrent() { @@ -641,7 +641,7 @@ public: /// /// Returns an iterator pointing to the current item in the list. /// A call to this function MUST be preceded by a call to - /// first(),last(),at() or findRef() + /// first(),last(),at() or tqfindRef() /// KviPointerListIterator iteratorAtCurrent() { @@ -652,7 +652,7 @@ public: /// Sets the iteration pointer to the next item in the list /// and returns that item (or 0 if the end of the list has been reached) /// A call to this function MUST be preceded by a _succesfull_ call to - /// first(),last(),at() or findRef(). + /// first(),last(),at() or tqfindRef(). /// T * next() { @@ -666,7 +666,7 @@ public: /// Sets the iteration pointer to the previous item in the list /// and returns that item (or 0 if the beginning of the list has been reached) /// A call to this function MUST be preceded by a _succesfull_ call to - /// first(),last(),at() or findRef() + /// first(),last(),at() or tqfindRef() /// T * prev() { @@ -715,7 +715,7 @@ public: /// and returns its position (zero based index) in the list or -1 if the /// item cannot be found /// - int findRef(const T * d) + int tqfindRef(const T * d) { int ret = 0; for(T * t = first();t;t = next()) @@ -945,7 +945,7 @@ public: /// bool removeRef(const T * d) { - if(findRef(d) == -1)return false; + if(tqfindRef(d) == -1)return false; removeCurrentSafe(); return true; } @@ -957,7 +957,7 @@ public: /// void insertAfter(const T * ref,const T * d) { - if(findRef(ref) == -1) + if(tqfindRef(ref) == -1) { append(d); return; @@ -981,7 +981,7 @@ public: /// void insertBefore(const T * ref,const T * d) { - if(findRef(ref) == -1) + if(tqfindRef(ref) == -1) { prepend(d); return; diff --git a/src/kvilib/core/kvi_qcstring.h b/src/kvilib/core/kvi_qcstring.h index 0693e205..9406115c 100644 --- a/src/kvilib/core/kvi_qcstring.h +++ b/src/kvilib/core/kvi_qcstring.h @@ -1,5 +1,5 @@ -#ifndef _KVI_QCSTRING_H_ -#define _KVI_QCSTRING_H_ +#ifndef _KVI_TQCSTRING_H_ +#define _KVI_TQCSTRING_H_ //============================================================================= // @@ -28,12 +28,12 @@ #include "kvi_settings.h" #ifdef COMPILE_USE_QT4 - #include // includes - #define KviQCString QByteArray + #include // includes + #define KviTQCString TQByteArray #else - // this is dead in Qt 4.x - #include - #define KviQCString QCString + // this is dead in TQt 4.x + #include + #define KviTQCString TQCString #endif -#endif //!_KVI_QCSTRING_H_ +#endif //!_KVI_TQCSTRING_H_ diff --git a/src/kvilib/core/kvi_qstring.cpp b/src/kvilib/core/kvi_qstring.cpp index eba255aa..fd61aed4 100644 --- a/src/kvilib/core/kvi_qstring.cpp +++ b/src/kvilib/core/kvi_qstring.cpp @@ -24,7 +24,7 @@ //============================================================================= // -// Helper functions for the QString class +// Helper functions for the TQString class // //============================================================================= @@ -38,7 +38,7 @@ #include // for tolower() #include // for sprintf() -#include +#include // kvi_string.cpp extern unsigned char iso88591_toLower_map[256]; @@ -46,48 +46,48 @@ extern unsigned char iso88591_toUpper_map[256]; #define MY_MIN(a,b) (((a) < (b)) ? (a) : (b)) -namespace KviQString +namespace KviTQString { // The global empty (and null) string - const QString empty; + const TQString empty; - bool equalCSN(const QString &sz1,const QString &sz2,unsigned int len) + bool equalCSN(const TQString &sz1,const TQString &sz2,unsigned int len) { if(len == 0)return true; // assume equal - const QChar * c1 = sz1.unicode(); - const QChar * c2 = sz2.unicode(); + const TQChar * c1 = sz1.tqunicode(); + const TQChar * c2 = sz2.tqunicode(); unsigned int lmin = MY_MIN(sz1.length(),sz2.length()); if(lmin < len)return false; - const QChar * c1e = c1 + len; + const TQChar * c1e = c1 + len; if(!c1 || !c2)return (c1 == c2); while(c1 < c1e) { - if(c1->unicode() != c2->unicode())return false; + if(c1->tqunicode() != c2->tqunicode())return false; c1++; c2++; } return (c1 == c1e); } - bool equalCIN(const QString &sz1,const QString &sz2,unsigned int len) + bool equalCIN(const TQString &sz1,const TQString &sz2,unsigned int len) { if(len == 0)return true; // assume equal - const QChar * c1 = sz1.unicode(); - const QChar * c2 = sz2.unicode(); + const TQChar * c1 = sz1.tqunicode(); + const TQChar * c2 = sz2.tqunicode(); unsigned int lmin = MY_MIN(sz1.length(),sz2.length()); if(lmin < len)return false; - const QChar * c1e = c1 + len; + const TQChar * c1e = c1 + len; if(!c1 || !c2)return (c1 == c2); while(c1 < c1e) { #ifdef COMPILE_USE_QT4 - if(c1->toLower().unicode() != c2->toLower().unicode())return false; + if(c1->toLower().tqunicode() != c2->toLower().tqunicode())return false; #else - if(c1->lower().unicode() != c2->lower().unicode())return false; + if(c1->lower().tqunicode() != c2->lower().tqunicode())return false; #endif c1++; c2++; @@ -95,31 +95,31 @@ namespace KviQString return (c1 == c1e); } - bool equalCSN(const QString &sz1,const char * sz2,unsigned int len) + bool equalCSN(const TQString &sz1,const char * sz2,unsigned int len) { if(len == 0)return true; // assume equal - const QChar * c1 = sz1.unicode(); + const TQChar * c1 = sz1.tqunicode(); if(sz1.length() < len)return false; - const QChar * c1e = c1 + len; + const TQChar * c1e = c1 + len; if(!sz2)return !c1; if(!c1)return !sz2; while((c1 < c1e) && (*sz2)) { - if(c1->unicode() != *sz2)return false; + if(c1->tqunicode() != *sz2)return false; c1++; sz2++; } return (c1 == c1e); } - bool equalCIN(const QString &sz1,const char * sz2,unsigned int len) + bool equalCIN(const TQString &sz1,const char * sz2,unsigned int len) { if(len == 0)return true; // assume equal - const QChar * c1 = sz1.unicode(); + const TQChar * c1 = sz1.tqunicode(); if(sz1.length() < len)return false; - const QChar * c1e = c1 + len; + const TQChar * c1e = c1 + len; if(!sz2)return !c1; if(!c1)return !(*sz2); @@ -127,9 +127,9 @@ namespace KviQString while((c1 < c1e) && (*sz2)) { #ifdef COMPILE_USE_QT4 - if(c1->toLower().unicode() != tolower(*sz2))return false; + if(c1->toLower().tqunicode() != tolower(*sz2))return false; #else - if(c1->lower().unicode() != tolower(*sz2))return false; + if(c1->lower().tqunicode() != tolower(*sz2))return false; #endif c1++; sz2++; @@ -138,22 +138,22 @@ namespace KviQString } // sz2 is assumed to be null terminated, sz1 is not! - bool equalCIN(const QString &sz1,const QChar *sz2,unsigned int len) + bool equalCIN(const TQString &sz1,const TQChar *sz2,unsigned int len) { if(len == 0)return true; // assume equal - const QChar * c1 = sz1.unicode(); + const TQChar * c1 = sz1.tqunicode(); if(sz1.length() < len)return false; - const QChar * c1e = c1 + len; + const TQChar * c1e = c1 + len; if(!sz2)return !c1; - if(!c1)return !(sz2->unicode()); + if(!c1)return !(sz2->tqunicode()); - while((c1 < c1e) && (sz2->unicode())) + while((c1 < c1e) && (sz2->tqunicode())) { #ifdef COMPILE_USE_QT4 - if(c1->toLower().unicode() != sz2->toLower().unicode())return false; + if(c1->toLower().tqunicode() != sz2->toLower().tqunicode())return false; #else - if(c1->lower().unicode() != sz2->lower().unicode())return false; + if(c1->lower().tqunicode() != sz2->lower().tqunicode())return false; #endif c1++; sz2++; @@ -161,65 +161,65 @@ namespace KviQString return (c1 == c1e); } - QString makeSizeReadable(size_t bytes) + TQString makeSizeReadable(size_t bytes) { double size = bytes; if(size<900) - return QString(__tr2qs("%1 bytes")).arg(size,0,'f',3); + return TQString(__tr2qs("%1 bytes")).tqarg(size,0,'f',3); size/=1024; if(size<900) - return QString(__tr2qs("%1 KB")).arg(size,0,'f',3); + return TQString(__tr2qs("%1 KB")).tqarg(size,0,'f',3); size/=1024; if(size<900) - return QString(__tr2qs("%1 MB")).arg(size,0,'f',3); + return TQString(__tr2qs("%1 MB")).tqarg(size,0,'f',3); //Pirated DVD?;) size/=1024; if(size<900) - return QString(__tr2qs("%1 GB")).arg(size,0,'f',3); + return TQString(__tr2qs("%1 GB")).tqarg(size,0,'f',3); //Uhm.. We are downloading a whole internet:))) size/=1024; - return QString(__tr2qs("%1 TB")).arg(size,0,'f',3); + return TQString(__tr2qs("%1 TB")).tqarg(size,0,'f',3); } - bool equalCS(const QString &sz1,const QString &sz2) + bool equalCS(const TQString &sz1,const TQString &sz2) { if(sz1.length() != sz2.length())return false; - const QChar * c1 = sz1.unicode(); - const QChar * c2 = sz2.unicode(); - const QChar * c1e = c1 + sz1.length(); + const TQChar * c1 = sz1.tqunicode(); + const TQChar * c2 = sz2.tqunicode(); + const TQChar * c1e = c1 + sz1.length(); if(!c1 || !c2)return (c1 == c2); while(c1 < c1e) { - if(c1->unicode() != c2->unicode())return false; + if(c1->tqunicode() != c2->tqunicode())return false; c1++; c2++; } return (c1 == c1e); } - bool equalCI(const QString &sz1,const QString &sz2) + bool equalCI(const TQString &sz1,const TQString &sz2) { if(sz1.length() != sz2.length())return false; - const QChar * c1 = sz1.unicode(); - const QChar * c2 = sz2.unicode(); - const QChar * c1e = c1 + sz1.length(); + const TQChar * c1 = sz1.tqunicode(); + const TQChar * c2 = sz2.tqunicode(); + const TQChar * c1e = c1 + sz1.length(); if(!c1 || !c2)return (c1 == c2); while(c1 < c1e) { #ifdef COMPILE_USE_QT4 - if(c1->toLower().unicode() != c2->toLower().unicode())return false; + if(c1->toLower().tqunicode() != c2->toLower().tqunicode())return false; #else - if(c1->lower().unicode() != c2->lower().unicode())return false; + if(c1->lower().tqunicode() != c2->lower().tqunicode())return false; #endif c1++; c2++; @@ -228,56 +228,56 @@ namespace KviQString } // sz2 is assumed to be null terminated, sz1 is not! - bool equalCI(const QString &sz1,const QChar *sz2) + bool equalCI(const TQString &sz1,const TQChar *sz2) { - const QChar * c1 = sz1.unicode(); - const QChar * c1e = c1 + sz1.length(); + const TQChar * c1 = sz1.tqunicode(); + const TQChar * c1e = c1 + sz1.length(); if(!c1 || !sz2)return (c1 == sz2); while(c1 < c1e) { - if(!sz2->unicode())return false; // sz1 has at least another character + if(!sz2->tqunicode())return false; // sz1 has at least another character #ifdef COMPILE_USE_QT4 - if(c1->toLower().unicode() != sz2->toLower().unicode())return false; + if(c1->toLower().tqunicode() != sz2->toLower().tqunicode())return false; #else - if(c1->lower().unicode() != sz2->lower().unicode())return false; + if(c1->lower().tqunicode() != sz2->lower().tqunicode())return false; #endif c1++; sz2++; } - return (c1 == c1e) && (!sz2->unicode()); + return (c1 == c1e) && (!sz2->tqunicode()); } - bool equalCS(const QString &sz1,const char * sz2) + bool equalCS(const TQString &sz1,const char * sz2) { - const QChar * c1 = sz1.unicode(); - const QChar * c1e = c1 + sz1.length(); + const TQChar * c1 = sz1.tqunicode(); + const TQChar * c1e = c1 + sz1.length(); if(!c1)return !sz2; while((c1 < c1e) && (*sz2)) { - if(c1->unicode() != *sz2)return false; + if(c1->tqunicode() != *sz2)return false; c1++; sz2++; } return ((c1 == c1e) && (*sz2 == '\0')); } - bool equalCI(const QString &sz1,const char * sz2) + bool equalCI(const TQString &sz1,const char * sz2) { - const QChar * c1 = sz1.unicode(); - const QChar * c1e = c1 + sz1.length(); + const TQChar * c1 = sz1.tqunicode(); + const TQChar * c1e = c1 + sz1.length(); if(!c1)return !sz2; while((c1 < c1e) && (*sz2)) { #ifdef COMPILE_USE_QT4 - if(c1->toLower().unicode() != tolower(*sz2))return false; + if(c1->toLower().tqunicode() != tolower(*sz2))return false; #else - if(c1->lower().unicode() != tolower(*sz2))return false; + if(c1->lower().tqunicode() != tolower(*sz2))return false; #endif c1++; sz2++; @@ -285,12 +285,12 @@ namespace KviQString return ((c1 == c1e) && (*sz2 == '\0')); } - int cmpCS(const QString &sz1,const QString &sz2) + int cmpCS(const TQString &sz1,const TQString &sz2) { - const QChar * c1 = sz1.unicode(); - const QChar * c2 = sz2.unicode(); - const QChar * c1e = c1 + sz1.length(); - const QChar * c2e = c2 + sz2.length(); + const TQChar * c1 = sz1.tqunicode(); + const TQChar * c2 = sz2.tqunicode(); + const TQChar * c1e = c1 + sz1.length(); + const TQChar * c2e = c2 + sz2.length(); if(!c1) { @@ -304,12 +304,12 @@ namespace KviQString { if(c1 >= c1e) { - if(c2 < c2e)return /* 0 */ - (c2->unicode()); + if(c2 < c2e)return /* 0 */ - (c2->tqunicode()); return 0; } - if(c2 >= c2e)return c1->unicode() /* - 0 */; + if(c2 >= c2e)return c1->tqunicode() /* - 0 */; - int diff = c1->unicode() - c2->unicode(); + int diff = c1->tqunicode() - c2->tqunicode(); if(diff)return diff; c1++; @@ -319,12 +319,12 @@ namespace KviQString return 0; // never here } - int cmpCI(const QString &sz1,const QString &sz2) + int cmpCI(const TQString &sz1,const TQString &sz2) { - const QChar * c1 = sz1.unicode(); - const QChar * c2 = sz2.unicode(); - const QChar * c1e = c1 + sz1.length(); - const QChar * c2e = c2 + sz2.length(); + const TQChar * c1 = sz1.tqunicode(); + const TQChar * c2 = sz2.tqunicode(); + const TQChar * c1e = c1 + sz1.length(); + const TQChar * c2e = c2 + sz2.length(); if(!c1) { @@ -338,22 +338,22 @@ namespace KviQString if(c1 >= c1e) { #ifdef COMPILE_USE_QT4 - if(c2 < c2e)return /* 0 */ - (c2->toLower().unicode()); + if(c2 < c2e)return /* 0 */ - (c2->toLower().tqunicode()); #else - if(c2 < c2e)return /* 0 */ - (c2->lower().unicode()); + if(c2 < c2e)return /* 0 */ - (c2->lower().tqunicode()); #endif return 0; } #ifdef COMPILE_USE_QT4 - if(c2 >= c2e)return c1->toLower().unicode() /* - 0 */; + if(c2 >= c2e)return c1->toLower().tqunicode() /* - 0 */; #else - if(c2 >= c2e)return c1->lower().unicode() /* - 0 */; + if(c2 >= c2e)return c1->lower().tqunicode() /* - 0 */; #endif #ifdef COMPILE_USE_QT4 - int diff = c1->toLower().unicode() - c2->toLower().unicode(); + int diff = c1->toLower().tqunicode() - c2->toLower().tqunicode(); #else - int diff = c1->lower().unicode() - c2->lower().unicode(); + int diff = c1->lower().tqunicode() - c2->lower().tqunicode(); #endif if(diff)return diff; @@ -364,15 +364,15 @@ namespace KviQString return 0; // never here } - int cmpCIN(const QString &sz1,const QString &sz2,unsigned int len) + int cmpCIN(const TQString &sz1,const TQString &sz2,unsigned int len) { if(len == 0)return 0; // assume equal unsigned int l1 = MY_MIN(len,sz1.length()); unsigned int l = MY_MIN(l1,sz2.length()); // FIXME: THIS IS NOT OK - const QChar * c1 = sz1.unicode(); - const QChar * c2 = sz2.unicode(); - const QChar * c1e = c1 + l; + const TQChar * c1 = sz1.tqunicode(); + const TQChar * c2 = sz2.tqunicode(); + const TQChar * c1e = c1 + l; if(!c1) { @@ -384,9 +384,9 @@ namespace KviQString int diff = 0; #ifdef COMPILE_USE_QT4 - while((c1 < c1e) && !(diff = (c1->toLower().unicode() - c2->toLower().unicode()))) + while((c1 < c1e) && !(diff = (c1->toLower().tqunicode() - c2->toLower().tqunicode()))) #else - while((c1 < c1e) && !(diff = (c1->lower().unicode() - c2->lower().unicode()))) + while((c1 < c1e) && !(diff = (c1->lower().tqunicode() - c2->lower().tqunicode()))) #endif { c1++; @@ -396,12 +396,12 @@ namespace KviQString return diff; } - void ensureLastCharIs(QString &szString,const QChar &c) + void ensureLastCharIs(TQString &szString,const TQChar &c) { if(!lastCharIs(szString,c))szString.append(c); } - QString getToken(QString &szString,const QChar &sep) + TQString getToken(TQString &szString,const TQChar &sep) { int i=0; while(i < szString.length()) @@ -409,7 +409,7 @@ namespace KviQString if(szString[i] == sep)break; i++; } - QString ret; + TQString ret; if(i == szString.length()) { ret = szString; @@ -427,7 +427,7 @@ namespace KviQString return ret; } - void stripRightWhiteSpace(QString &s) + void stripRightWhiteSpace(TQString &s) { int iRemove = 0; while(iRemove < s.length()) @@ -438,7 +438,7 @@ namespace KviQString if(iRemove > 0)s.remove(s.length() - iRemove,iRemove); } - void stripRight(QString &s,const QChar &c) + void stripRight(TQString &s,const TQChar &c) { int iRemove = 0; while(iRemove < s.length()) @@ -449,7 +449,7 @@ namespace KviQString if(iRemove > 0)s.remove(s.length() - iRemove,iRemove); } - void stripLeft(QString &s,const QChar &c) + void stripLeft(TQString &s,const TQChar &c) { int iRemove = 0; while(iRemove < s.length()) @@ -462,7 +462,7 @@ namespace KviQString if(iRemove > 0)s.remove(0,iRemove); } - void detach(QString &sz) + void detach(TQString &sz) { #ifdef COMPILE_USE_QT4 sz.resize(sz.length()); @@ -471,52 +471,52 @@ namespace KviQString #endif } - const QChar * nullTerminatedArray(const QString &sz) + const TQChar * nullTerminatedArray(const TQString &sz) { //sz.setLength(sz.length()); // detach! #ifdef COMPILE_USE_QT4 return sz.constData(); #else - return (const QChar *)sz.ucs2(); // MAY BE NULL! + return (const TQChar *)sz.ucs2(); // MAY BE NULL! #endif } - void appendNumber(QString &s,double dReal) + void appendNumber(TQString &s,double dReal) { char buffer[512]; ::sprintf(buffer,"%f",dReal); s.append(buffer); } - void appendNumber(QString &s,int iInteger) + void appendNumber(TQString &s,int iInteger) { char buffer[64]; ::sprintf(buffer,"%d",iInteger); s.append(buffer); } - void appendNumber(QString &s,kvi_i64_t iInteger) + void appendNumber(TQString &s,kvi_i64_t iInteger) { char buffer[64]; ::sprintf(buffer,"%ld",iInteger); s.append(buffer); } - void appendNumber(QString &s,kvi_u64_t uInteger) + void appendNumber(TQString &s,kvi_u64_t uInteger) { char buffer[64]; ::sprintf(buffer,"%lu",uInteger); s.append(buffer); } - void appendNumber(QString &s,unsigned int uInteger) + void appendNumber(TQString &s,unsigned int uInteger) { char buffer[64]; ::sprintf(buffer,"%u",uInteger); s.append(buffer); } - void vsprintf(QString &s,const QString &szFmt,kvi_va_list list) + void vsprintf(TQString &s,const TQString &szFmt,kvi_va_list list) { #define MEMINCREMENT 32 @@ -525,15 +525,15 @@ namespace KviQString //s.setLength(allocsize); - const QChar * fmt = nullTerminatedArray(szFmt); + const TQChar * fmt = nullTerminatedArray(szFmt); if(!fmt) { - s = QString::null; + s = TQString(); return; } - QChar * buffer = (QChar *)kvi_malloc(sizeof(QChar) * allocsize); - //QChar * p = (QChar *)s.unicode(); + TQChar * buffer = (TQChar *)kvi_malloc(sizeof(TQChar) * allocsize); + //TQChar * p = (TQChar *)s.tqunicode(); char *argString; long argValue; @@ -544,29 +544,29 @@ namespace KviQString char *pNumBuf; unsigned int tmp; - QChar * p = buffer; + TQChar * p = buffer; #define INCREMENT_MEM \ { \ allocsize += MEMINCREMENT; \ - buffer = (QChar *)kvi_realloc(buffer,sizeof(QChar) * allocsize); \ + buffer = (TQChar *)kvi_realloc(buffer,sizeof(TQChar) * allocsize); \ p = buffer + reallen; \ } #define INCREMENT_MEM_BY(numchars) \ { \ allocsize += numchars + MEMINCREMENT; \ - buffer = (QChar *)kvi_realloc(buffer,sizeof(QChar) * allocsize); \ + buffer = (TQChar *)kvi_realloc(buffer,sizeof(TQChar) * allocsize); \ p = buffer + reallen; \ } - for(; fmt->unicode() ; ++fmt) + for(; fmt->tqunicode() ; ++fmt) { if(reallen == allocsize)INCREMENT_MEM //copy up to a '%' - if(fmt->unicode() != '%') + if(fmt->tqunicode() != '%') { *p++ = *fmt; reallen++; @@ -574,16 +574,16 @@ namespace KviQString } ++fmt; //skip this '%' - switch(fmt->unicode()) + switch(fmt->tqunicode()) { case 's': // char * string { argString = kvi_va_arg(list,char *); if(!argString)argString = "[!NULL!]"; - QString str(argString); + TQString str(argString); if(str.isEmpty())continue; int len = str.length(); - const QChar * ch = str.unicode(); + const TQChar * ch = str.tqunicode(); if(!ch)continue; if((allocsize - reallen) < len)INCREMENT_MEM_BY(len) while(len--)*p++ = *ch++; @@ -596,17 +596,17 @@ namespace KviQString if(!str)continue; if((allocsize - reallen) < str->len())INCREMENT_MEM_BY(str->len()) argString = str->ptr(); - while(*argString)*p++ = QChar(*argString++); + while(*argString)*p++ = TQChar(*argString++); reallen += str->len(); continue; } - case 'Q': // QString * string + case 'Q': // TQString * string { - QString * str = kvi_va_arg(list,QString *); + TQString * str = kvi_va_arg(list,TQString *); if(!str)continue; if(str->isEmpty())continue; int len = str->length(); - const QChar * ch = str->unicode(); + const TQChar * ch = str->tqunicode(); if(!ch)continue; if((allocsize - reallen) < len)INCREMENT_MEM_BY(len) while(len--)*p++ = *ch++; @@ -627,7 +627,7 @@ namespace KviQString reallen++; continue; } - case 'q': // QChar * + case 'q': // TQChar * { // // I'm not sure about this... @@ -637,7 +637,7 @@ namespace KviQString // as sizeof(int) bytes value. // Is this always true ? // - *p++ = *((QChar *)kvi_va_arg(list,QChar *)); + *p++ = *((TQChar *)kvi_va_arg(list,TQChar *)); reallen++; continue; } @@ -661,7 +661,7 @@ namespace KviQString //copy now.... argUValue = pNumBuf - numberBuffer; //length of the number string if((allocsize - reallen) < (int)argUValue)INCREMENT_MEM_BY(argUValue) - do { *p++ = QChar(*--pNumBuf); } while(pNumBuf != numberBuffer); + do { *p++ = TQChar(*--pNumBuf); } while(pNumBuf != numberBuffer); reallen += argUValue; continue; } @@ -721,7 +721,7 @@ namespace KviQString { *p++ = '%'; //write it reallen++; - if(fmt->unicode()) + if(fmt->tqunicode()) { if(reallen == allocsize)INCREMENT_MEM *p++ = *fmt; @@ -738,35 +738,35 @@ namespace KviQString } - QString & sprintf(QString &s,const QString &szFmt,...) + TQString & sprintf(TQString &s,const TQString &szFmt,...) { kvi_va_list list; kvi_va_start_by_reference(list,szFmt); //print...with max 256 chars - KviQString::vsprintf(s,szFmt,list); + KviTQString::vsprintf(s,szFmt,list); kvi_va_end(list); return s; } - void appendFormatted(QString &s,const QString &szFmt,...) + void appendFormatted(TQString &s,const TQString &szFmt,...) { - QString tmp; + TQString tmp; kvi_va_list list; kvi_va_start_by_reference(list,szFmt); //print...with max 256 chars - KviQString::vsprintf(tmp,szFmt,list); + KviTQString::vsprintf(tmp,szFmt,list); kvi_va_end(list); s.append(tmp); } - bool matchWildExpressionsCI(const QString &szM1,const QString &szM2) + bool matchWildExpressionsCI(const TQString &szM1,const TQString &szM2) { //Matches two regular expressions containging wildcards (* and ?) // s1 // m1 - // mask1 : *xor - // mask2 : xorand*xor + // tqmask1 : *xor + // tqmask2 : xorand*xor // m2 // s2 @@ -782,28 +782,28 @@ namespace KviQString // #ifdef COMPILE_USE_QT4 - const QChar * m1 = (const QChar *)szM1.constData(); - const QChar * m2 = (const QChar *)szM2.constData(); + const TQChar * m1 = (const TQChar *)szM1.constData(); + const TQChar * m2 = (const TQChar *)szM2.constData(); #else - const QChar * m1 = (const QChar *)szM1.ucs2(); - const QChar * m2 = (const QChar *)szM2.ucs2(); + const TQChar * m1 = (const TQChar *)szM1.ucs2(); + const TQChar * m2 = (const TQChar *)szM2.ucs2(); #endif - if(!(m1 && m2 && (m1->unicode())))return false; - const QChar * savePos1 = 0; - const QChar * savePos2 = m2; - while(m1->unicode()) + if(!(m1 && m2 && (m1->tqunicode())))return false; + const TQChar * savePos1 = 0; + const TQChar * savePos2 = m2; + while(m1->tqunicode()) { - //loop managed by m1 (initially first mask) - if(m1->unicode()=='*') + //loop managed by m1 (initially first tqmask) + if(m1->tqunicode()=='*') { //Found a wildcard in m1 savePos1 = ++m1; //move to the next char and save the position...this is our jolly - if(!savePos1->unicode())return true; //last was a wildcard , matches everything ahead... + if(!savePos1->tqunicode())return true; //last was a wildcard , matches everything ahead... savePos2 = m2+1; //next return state for the second string continue; //and return } - if(!m2->unicode())return false; //m2 finished and we had something to match here! + if(!m2->tqunicode())return false; //m2 finished and we had something to match here! #ifdef COMPILE_USE_QT4 if(m1->toLower()==m2->toLower()) #else @@ -813,7 +813,7 @@ namespace KviQString //chars matched m1++; //Go ahead in the two strings m2++; // - if((!(m1->unicode())) && m2->unicode() && savePos1) + if((!(m1->tqunicode())) && m2->tqunicode() && savePos1) { //m1 finished , but m2 not yet and we have a savePosition for m1 (there was a wildcard)... //retry matching the string following the * from the savePos2 (one char ahead last time) @@ -822,11 +822,11 @@ namespace KviQString savePos2++; //next savePos2 will be next char } } else { - if(m2->unicode() == '*') + if(m2->tqunicode() == '*') { //A wlidcard in the second string - //Invert the game : mask1 <-> mask2 - //mask2 now leads the game... + //Invert the game : tqmask1 <-> tqmask2 + //tqmask2 now leads the game... savePos1 = m1; //aux m1 = m2; //...swap m2 = savePos1; //...swap @@ -835,11 +835,11 @@ namespace KviQString continue; //...and again } // m1 != m2 , m1 != * , m2 != * - if((m1->unicode() == '?') || (m2->unicode() == '?')) + if((m1->tqunicode() == '?') || (m2->tqunicode() == '?')) { m1++; m2++; - if((!(m1->unicode())) && m2->unicode() && savePos1) + if((!(m1->tqunicode())) && m2->tqunicode() && savePos1) { //m1 finished , but m2 not yet and we have a savePosition for m1 (there was a wildcard)... //retry matching the string following the * from the savePos2 (one char ahead last time) @@ -858,21 +858,21 @@ namespace KviQString } } } - return (!(m2->unicode())); //m1 surely finished , so for the match , m2 must be finished too + return (!(m2->tqunicode())); //m1 surely finished , so for the match , m2 must be finished too } - bool matchStringCI(const QString &szExp,const QString &szStr,bool bIsRegExp,bool bExact) + bool matchStringCI(const TQString &szExp,const TQString &szStr,bool bIsRegExp,bool bExact) { - QString szWildcard; + TQString szWildcard; #ifdef COMPILE_USE_QT4 - QChar* ptr=(QChar*)szExp.constData(); + TQChar* ptr=(TQChar*)szExp.constData(); #else - QChar* ptr=(QChar*)szExp.ucs2(); + TQChar* ptr=(TQChar*)szExp.ucs2(); #endif if(!ptr) return 0; - while(ptr->unicode()) + while(ptr->tqunicode()) { - if((ptr->unicode()=='[') || (ptr->unicode()==']')) + if((ptr->tqunicode()=='[') || (ptr->tqunicode()==']')) { szWildcard.append("["); szWildcard.append(*ptr); @@ -883,9 +883,9 @@ namespace KviQString ptr++; } #ifdef COMPILE_USE_QT4 - QRegExp re(szWildcard,Qt::CaseInsensitive,bIsRegExp ? QRegExp::RegExp : QRegExp::Wildcard); + TQRegExp re(szWildcard,TQt::CaseInsensitive,bIsRegExp ? TQRegExp::RegExp : TQRegExp::Wildcard); #else - QRegExp re(szWildcard,false,!bIsRegExp); + TQRegExp re(szWildcard,false,!bIsRegExp); #endif if(bExact) return re.exactMatch(szStr); #ifdef COMPILE_USE_QT4 @@ -895,18 +895,18 @@ namespace KviQString #endif } - bool matchStringCS(const QString &szExp,const QString &szStr,bool bIsRegExp,bool bExact) + bool matchStringCS(const TQString &szExp,const TQString &szStr,bool bIsRegExp,bool bExact) { - QString szWildcard; + TQString szWildcard; #ifdef COMPILE_USE_QT4 - QChar* ptr=(QChar*)szExp.constData(); + TQChar* ptr=(TQChar*)szExp.constData(); #else - QChar* ptr=(QChar*)szExp.ucs2(); + TQChar* ptr=(TQChar*)szExp.ucs2(); #endif if(!ptr) return 0; - while(ptr->unicode()) + while(ptr->tqunicode()) { - if((ptr->unicode()=='[')) // <-- hum ? + if((ptr->tqunicode()=='[')) // <-- hum ? { szWildcard.append("["); szWildcard.append(*ptr); @@ -917,9 +917,9 @@ namespace KviQString ptr++; } #ifdef COMPILE_USE_QT4 - QRegExp re(szWildcard,Qt::CaseSensitive,bIsRegExp ? QRegExp::RegExp : QRegExp::Wildcard); + TQRegExp re(szWildcard,TQt::CaseSensitive,bIsRegExp ? TQRegExp::RegExp : TQRegExp::Wildcard); #else - QRegExp re(szWildcard,true,!bIsRegExp); + TQRegExp re(szWildcard,true,!bIsRegExp); #endif if(bExact) return re.exactMatch(szStr); #ifdef COMPILE_USE_QT4 @@ -929,34 +929,34 @@ namespace KviQString #endif } - void cutFromFirst(QString &s,const QChar &c,bool bIncluded) + void cutFromFirst(TQString &s,const TQChar &c,bool bIncluded) { #ifdef COMPILE_USE_QT4 int idx = s.indexOf(c); #else - int idx = s.find(c); + int idx = s.tqfind(c); #endif if(idx == -1)return; s.truncate(bIncluded ? idx : idx + 1); } - void cutFromLast(QString &s,const QChar &c,bool bIncluded) + void cutFromLast(TQString &s,const TQChar &c,bool bIncluded) { #ifdef COMPILE_USE_QT4 int idx = s.lastIndexOf(c); #else - int idx = s.findRev(c); + int idx = s.tqfindRev(c); #endif if(idx == -1)return; s.truncate(bIncluded ? idx : idx + 1); } - void cutToFirst(QString &s,const QChar &c,bool bIncluded,bool bClearIfNotFound) + void cutToFirst(TQString &s,const TQChar &c,bool bIncluded,bool bClearIfNotFound) { #ifdef COMPILE_USE_QT4 int idx = s.indexOf(c); #else - int idx = s.find(c); + int idx = s.tqfind(c); #endif if(idx == -1) { @@ -966,12 +966,12 @@ namespace KviQString s.remove(0,bIncluded ? idx + 1 : idx); } - void cutToLast(QString &s,const QChar &c,bool bIncluded,bool bClearIfNotFound) + void cutToLast(TQString &s,const TQChar &c,bool bIncluded,bool bClearIfNotFound) { #ifdef COMPILE_USE_QT4 int idx = s.lastIndexOf(c); #else - int idx = s.findRev(c); + int idx = s.tqfindRev(c); #endif if(idx == -1) { @@ -981,34 +981,34 @@ namespace KviQString s.remove(0,bIncluded ? idx + 1 : idx); } - void cutFromFirst(QString &s,const QString &c,bool bIncluded) + void cutFromFirst(TQString &s,const TQString &c,bool bIncluded) { #ifdef COMPILE_USE_QT4 int idx = s.indexOf(c); #else - int idx = s.find(c); + int idx = s.tqfind(c); #endif if(idx == -1)return; s.truncate(bIncluded ? idx : idx + c.length()); } - void cutFromLast(QString &s,const QString &c,bool bIncluded) + void cutFromLast(TQString &s,const TQString &c,bool bIncluded) { #ifdef COMPILE_USE_QT4 int idx = s.lastIndexOf(c); #else - int idx = s.findRev(c); + int idx = s.tqfindRev(c); #endif if(idx == -1)return; s.truncate(bIncluded ? idx : idx + c.length()); } - void cutToFirst(QString &s,const QString &c,bool bIncluded,bool bClearIfNotFound) + void cutToFirst(TQString &s,const TQString &c,bool bIncluded,bool bClearIfNotFound) { #ifdef COMPILE_USE_QT4 int idx = s.indexOf(c); #else - int idx = s.find(c); + int idx = s.tqfind(c); #endif if(idx == -1) { @@ -1018,12 +1018,12 @@ namespace KviQString s.remove(0,bIncluded ? idx + c.length() : idx); } - void cutToLast(QString &s,const QString &c,bool bIncluded,bool bClearIfNotFound) + void cutToLast(TQString &s,const TQString &c,bool bIncluded,bool bClearIfNotFound) { #ifdef COMPILE_USE_QT4 int idx = s.lastIndexOf(c); #else - int idx = s.findRev(c); + int idx = s.tqfindRev(c); #endif if(idx == -1) { @@ -1033,60 +1033,60 @@ namespace KviQString s.remove(0,bIncluded ? idx + c.length() : idx); } - QString upperISO88591(const QString &szSrc) + TQString upperISO88591(const TQString &szSrc) { - const QChar * c = nullTerminatedArray(szSrc); + const TQChar * c = nullTerminatedArray(szSrc); if(!c) { - QString ret; + TQString ret; return ret; } - QChar * buffer = (QChar *)kvi_malloc(sizeof(QChar) * szSrc.length()); - QChar * b = buffer; - unsigned short us = c->unicode(); + TQChar * buffer = (TQChar *)kvi_malloc(sizeof(TQChar) * szSrc.length()); + TQChar * b = buffer; + unsigned short us = c->tqunicode(); while(us) { if(us < 256) - *b=QChar((unsigned short)iso88591_toUpper_map[us]); + *b=TQChar((unsigned short)iso88591_toUpper_map[us]); else *b = *c; c++; b++; - us = c->unicode(); + us = c->tqunicode(); } - QString ret(buffer,szSrc.length()); + TQString ret(buffer,szSrc.length()); kvi_free(buffer); return ret; } - QString lowerISO88591(const QString &szSrc) + TQString lowerISO88591(const TQString &szSrc) { - const QChar * c = nullTerminatedArray(szSrc); + const TQChar * c = nullTerminatedArray(szSrc); if(!c) { - QString ret; + TQString ret; return ret; } - QChar * buffer = (QChar *)kvi_malloc(sizeof(QChar) * szSrc.length()); - QChar * b = buffer; - unsigned short us = c->unicode(); + TQChar * buffer = (TQChar *)kvi_malloc(sizeof(TQChar) * szSrc.length()); + TQChar * b = buffer; + unsigned short us = c->tqunicode(); while(us) { if(us < 256) { - *b=QChar((unsigned short)iso88591_toLower_map[us]); + *b=TQChar((unsigned short)iso88591_toLower_map[us]); } else *b = *c; c++; b++; - us = c->unicode(); + us = c->tqunicode(); } - QString ret(buffer,szSrc.length()); + TQString ret(buffer,szSrc.length()); kvi_free(buffer); return ret; } - void transliterate(QString &s,const QString &szToFind,const QString &szReplacement) + void transliterate(TQString &s,const TQString &szToFind,const TQString &szReplacement) { int i=0; int il = MY_MIN(szToFind.length(),szReplacement.length()); @@ -1105,7 +1105,7 @@ namespace KviQString static char hexdigits[16] = { '0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f' }; - void bufferToHex(QString &szRetBuffer,const unsigned char * buffer,unsigned int len) + void bufferToHex(TQString &szRetBuffer,const unsigned char * buffer,unsigned int len) { #ifdef COMPILE_USE_QT4 szRetBuffer.resize(len * 2); @@ -1115,9 +1115,9 @@ namespace KviQString unsigned int i=0; while(i < (len*2)) { - szRetBuffer[int(i)] = QChar( (unsigned int) hexdigits[(*buffer) / 16] ); + szRetBuffer[int(i)] = TQChar( (unsigned int) hexdigits[(*buffer) / 16] ); i++; - szRetBuffer[int(i)] = QChar( (unsigned int)hexdigits[(*buffer) % 16] ); + szRetBuffer[int(i)] = TQChar( (unsigned int)hexdigits[(*buffer) % 16] ); i++; buffer++; } diff --git a/src/kvilib/core/kvi_qstring.h b/src/kvilib/core/kvi_qstring.h index c82063e9..d5addebf 100644 --- a/src/kvilib/core/kvi_qstring.h +++ b/src/kvilib/core/kvi_qstring.h @@ -1,5 +1,5 @@ -#ifndef _KVI_QSTRING_H_ -#define _KVI_QSTRING_H_ +#ifndef _KVI_TQSTRING_H_ +#define _KVI_TQSTRING_H_ //============================================================================= // @@ -27,7 +27,7 @@ //============================================================================= // -// Helper functions for the QString class +// Helper functions for the TQString class // //============================================================================= @@ -36,109 +36,110 @@ #include "kvi_stdarg.h" #include "kvi_qcstring.h" -#include +#include +#include /// -/// \namespace KviQString +/// \namespace KviTQString /// -/// \brief A namespace for QString helper functions +/// \brief A namespace for TQString helper functions /// /// This namespace contains several helper functions -/// that are used when dealing with QString. +/// that are used when dealing with TQString. /// -namespace KviQString +namespace KviTQString { - extern KVILIB_API QString makeSizeReadable(size_t size); - extern KVILIB_API bool equalCS(const QString &sz1,const QString &sz2); - extern KVILIB_API bool equalCI(const QString &sz1,const QString &sz2); - extern KVILIB_API bool equalCS(const QString &sz1,const char * sz2); - extern KVILIB_API bool equalCI(const QString &sz1,const char * sz2); + extern KVILIB_API TQString makeSizeReadable(size_t size); + extern KVILIB_API bool equalCS(const TQString &sz1,const TQString &sz2); + extern KVILIB_API bool equalCI(const TQString &sz1,const TQString &sz2); + extern KVILIB_API bool equalCS(const TQString &sz1,const char * sz2); + extern KVILIB_API bool equalCI(const TQString &sz1,const char * sz2); // sz2 is assumed to be null terminated here! - extern KVILIB_API bool equalCI(const QString &sz1,const QChar * sz2); - inline bool equalCS(const char * sz1,const QString &sz2) + extern KVILIB_API bool equalCI(const TQString &sz1,const TQChar * sz2); + inline bool equalCS(const char * sz1,const TQString &sz2) { return equalCS(sz2,sz1); }; - inline bool equalCI(const char * sz1,const QString &sz2) + inline bool equalCI(const char * sz1,const TQString &sz2) { return equalCI(sz2,sz1); }; // sz1 is assumed to be null terminated here! - inline bool equalCI(const QChar * sz1,const QString &sz2) + inline bool equalCI(const TQChar * sz1,const TQString &sz2) { return equalCI(sz2,sz1); }; - extern KVILIB_API bool equalCSN(const QString &sz1,const QString &sz2,unsigned int len); - extern KVILIB_API bool equalCIN(const QString &sz1,const QString &sz2,unsigned int len); - extern KVILIB_API bool equalCSN(const QString &sz1,const char * sz2,unsigned int len); - extern KVILIB_API bool equalCIN(const QString &sz1,const char * sz2,unsigned int len); + extern KVILIB_API bool equalCSN(const TQString &sz1,const TQString &sz2,unsigned int len); + extern KVILIB_API bool equalCIN(const TQString &sz1,const TQString &sz2,unsigned int len); + extern KVILIB_API bool equalCSN(const TQString &sz1,const char * sz2,unsigned int len); + extern KVILIB_API bool equalCIN(const TQString &sz1,const char * sz2,unsigned int len); // sz2 is assumed to be null terminated here! - extern KVILIB_API bool equalCIN(const QString &sz1,const QChar * sz2,unsigned int len); - inline bool equalCSN(const char * sz1,const QString &sz2,unsigned int len) + extern KVILIB_API bool equalCIN(const TQString &sz1,const TQChar * sz2,unsigned int len); + inline bool equalCSN(const char * sz1,const TQString &sz2,unsigned int len) { return equalCSN(sz2,sz1,len); }; - inline bool equalCIN(const char * sz1,const QString &sz2,unsigned int len) + inline bool equalCIN(const char * sz1,const TQString &sz2,unsigned int len) { return equalCIN(sz2,sz1,len); }; // sz1 is assumed to be null terminated here! - inline bool equalCIN(const QChar * sz1,const QString &sz2,unsigned int len) + inline bool equalCIN(const TQChar * sz1,const TQString &sz2,unsigned int len) { return equalCIN(sz2,sz1,len); }; //note that greater here means that come AFTER in the alphabetic order // return < 0 ---> str1 < str2 // return = 0 ---> str1 = str2 // return > 0 ---> str1 > str2 - extern KVILIB_API int cmpCI(const QString &sz1,const QString &sz2); - extern KVILIB_API int cmpCIN(const QString &sz1,const QString &sz2,unsigned int len); - extern KVILIB_API int cmpCS(const QString &sz1,const QString &sz2); + extern KVILIB_API int cmpCI(const TQString &sz1,const TQString &sz2); + extern KVILIB_API int cmpCIN(const TQString &sz1,const TQString &sz2,unsigned int len); + extern KVILIB_API int cmpCS(const TQString &sz1,const TQString &sz2); - extern KVILIB_API void detach(QString &sz); + extern KVILIB_API void detach(TQString &sz); - // this makes the QString sz appear as a null terminated array - // it MAY RETURN 0 when the QString is null! - extern KVILIB_API const QChar * nullTerminatedArray(const QString &sz); + // this makes the TQString sz appear as a null terminated array + // it MAY RETURN 0 when the TQString is null! + extern KVILIB_API const TQChar * nullTerminatedArray(const TQString &sz); - inline bool lastCharIs(QString &szString,const QChar &c) + inline bool lastCharIs(TQString &szString,const TQChar &c) { return szString.endsWith(c); }; - extern KVILIB_API void ensureLastCharIs(QString &szString,const QChar &c); + extern KVILIB_API void ensureLastCharIs(TQString &szString,const TQChar &c); // wild expression matching - extern KVILIB_API bool matchWildExpressionsCI(const QString &szM1,const QString &szM2); + extern KVILIB_API bool matchWildExpressionsCI(const TQString &szM1,const TQString &szM2); // wild or regexp matching - extern KVILIB_API bool matchStringCI(const QString &szExp,const QString &szStr,bool bIsRegExp = false,bool bExact = false); - extern KVILIB_API bool matchStringCS(const QString &szExp,const QString &szStr,bool bIsRegExp = false,bool bExact = false); + extern KVILIB_API bool matchStringCI(const TQString &szExp,const TQString &szStr,bool bIsRegExp = false,bool bExact = false); + extern KVILIB_API bool matchStringCS(const TQString &szExp,const TQString &szStr,bool bIsRegExp = false,bool bExact = false); - extern KVILIB_API void vsprintf(QString &s,const QString &szFmt,kvi_va_list list); - extern KVILIB_API QString & sprintf(QString &s,const QString &szFmt,...); - extern KVILIB_API void stripRightWhiteSpace(QString &s); - extern KVILIB_API void stripLeft(QString &s,const QChar &c); - extern KVILIB_API void stripRight(QString &s,const QChar &c); - extern KVILIB_API void appendFormatted(QString &s,const QString &szFmt,...); - extern KVILIB_API void appendNumber(QString &s,double dReal); - extern KVILIB_API void appendNumber(QString &s,kvi_i64_t iInteger); - extern KVILIB_API void appendNumber(QString &s,int iInteger); - extern KVILIB_API void appendNumber(QString &s,unsigned int uInteger); - extern KVILIB_API void appendNumber(QString &s,kvi_u64_t uInteger); + extern KVILIB_API void vsprintf(TQString &s,const TQString &szFmt,kvi_va_list list); + extern KVILIB_API TQString & sprintf(TQString &s,const TQString &szFmt,...); + extern KVILIB_API void stripRightWhiteSpace(TQString &s); + extern KVILIB_API void stripLeft(TQString &s,const TQChar &c); + extern KVILIB_API void stripRight(TQString &s,const TQChar &c); + extern KVILIB_API void appendFormatted(TQString &s,const TQString &szFmt,...); + extern KVILIB_API void appendNumber(TQString &s,double dReal); + extern KVILIB_API void appendNumber(TQString &s,kvi_i64_t iInteger); + extern KVILIB_API void appendNumber(TQString &s,int iInteger); + extern KVILIB_API void appendNumber(TQString &s,unsigned int uInteger); + extern KVILIB_API void appendNumber(TQString &s,kvi_u64_t uInteger); - extern KVILIB_API void cutFromFirst(QString &s,const QChar &c,bool bIncluded = true); - extern KVILIB_API void cutFromLast(QString &s,const QChar &c,bool bIncluded = true); - extern KVILIB_API void cutToFirst(QString &s,const QChar &c,bool bIncluded = true,bool bClearIfNotFound = false); - extern KVILIB_API void cutToLast(QString &s,const QChar &c,bool bIncluded = true,bool bClearIfNotFound = false); - extern KVILIB_API void cutFromFirst(QString &s,const QString &c,bool bIncluded = true); - extern KVILIB_API void cutFromLast(QString &s,const QString &c,bool bIncluded = true); - extern KVILIB_API void cutToFirst(QString &s,const QString &c,bool bIncluded = true,bool bClearIfNotFound = false); - extern KVILIB_API void cutToLast(QString &s,const QString &c,bool bIncluded = true,bool bClearIfNotFound = false); + extern KVILIB_API void cutFromFirst(TQString &s,const TQChar &c,bool bIncluded = true); + extern KVILIB_API void cutFromLast(TQString &s,const TQChar &c,bool bIncluded = true); + extern KVILIB_API void cutToFirst(TQString &s,const TQChar &c,bool bIncluded = true,bool bClearIfNotFound = false); + extern KVILIB_API void cutToLast(TQString &s,const TQChar &c,bool bIncluded = true,bool bClearIfNotFound = false); + extern KVILIB_API void cutFromFirst(TQString &s,const TQString &c,bool bIncluded = true); + extern KVILIB_API void cutFromLast(TQString &s,const TQString &c,bool bIncluded = true); + extern KVILIB_API void cutToFirst(TQString &s,const TQString &c,bool bIncluded = true,bool bClearIfNotFound = false); + extern KVILIB_API void cutToLast(TQString &s,const TQString &c,bool bIncluded = true,bool bClearIfNotFound = false); - extern KVILIB_API QString upperISO88591(const QString &szSrc); - extern KVILIB_API QString lowerISO88591(const QString &szSrc); - extern KVILIB_API QString getToken(QString &szString,const QChar &sep); + extern KVILIB_API TQString upperISO88591(const TQString &szSrc); + extern KVILIB_API TQString lowerISO88591(const TQString &szSrc); + extern KVILIB_API TQString getToken(TQString &szString,const TQChar &sep); - extern KVILIB_API void transliterate(QString &s,const QString &szToFind,const QString &szReplacement); + extern KVILIB_API void transliterate(TQString &s,const TQString &szToFind,const TQString &szReplacement); - extern KVILIB_API void bufferToHex(QString &szRetBuffer,const unsigned char * buffer,unsigned int len); + extern KVILIB_API void bufferToHex(TQString &szRetBuffer,const unsigned char * buffer,unsigned int len); - // a global empty string (note that this is ALSO NULL under Qt 3.x) - extern KVILIB_API const QString empty; + // a global empty string (note that this is ALSO NULL under TQt 3.x) + extern KVILIB_API const TQString empty; /// - /// A portability wrapper which with Qt3 and Qt4. + /// A portability wrapper which with TQt3 and TQt4. /// Returns a lowcase version of the parameter string. /// - inline QString toLower(const QString &s) + inline TQString toLower(const TQString &s) { #ifdef COMPILE_USE_QT4 return s.toLower(); @@ -147,97 +148,97 @@ namespace KviQString #endif } - inline int find(const QString &s,QChar c,int index = 0,bool cs = true) + inline int tqfind(const TQString &s,TQChar c,int index = 0,bool cs = true) { #ifdef COMPILE_USE_QT4 - return s.indexOf(c,index,cs ? Qt::CaseSensitive : Qt::CaseInsensitive); + return s.indexOf(c,index,cs ? TQt::CaseSensitive : TQt::CaseInsensitive); #else - return s.find(c,index,cs); + return s.tqfind(c,index,cs); #endif } - inline int find(const QString &s,char c,int index = 0,bool cs = true) + inline int tqfind(const TQString &s,char c,int index = 0,bool cs = true) { #ifdef COMPILE_USE_QT4 - return s.indexOf(c,index,cs ? Qt::CaseSensitive : Qt::CaseInsensitive); + return s.indexOf(c,index,cs ? TQt::CaseSensitive : TQt::CaseInsensitive); #else - return s.find(c,index,cs); + return s.tqfind(c,index,cs); #endif } - inline int find(const QString &s,const QString & str,int index = 0,bool cs = true) + inline int tqfind(const TQString &s,const TQString & str,int index = 0,bool cs = true) { #ifdef COMPILE_USE_QT4 - return s.indexOf(str,index,cs ? Qt::CaseSensitive : Qt::CaseInsensitive); + return s.indexOf(str,index,cs ? TQt::CaseSensitive : TQt::CaseInsensitive); #else - return s.find(str,index,cs); + return s.tqfind(str,index,cs); #endif } - inline int find(const QString &s,const QRegExp & rx,int index = 0) + inline int tqfind(const TQString &s,const TQRegExp & rx,int index = 0) { #ifdef COMPILE_USE_QT4 return s.indexOf(rx,index); #else - return s.find(rx,index); + return s.tqfind(rx,index); #endif } - inline int find(const QString &s,const char * str,int index = 0) + inline int tqfind(const TQString &s,const char * str,int index = 0) { #ifdef COMPILE_USE_QT4 - return s.indexOf(QString(str),index); + return s.indexOf(TQString(str),index); #else - return s.find(str,index); + return s.tqfind(str,index); #endif } - inline int findRev(const QString &s,QChar c,int index = -1,bool cs = true) + inline int tqfindRev(const TQString &s,TQChar c,int index = -1,bool cs = true) { #ifdef COMPILE_USE_QT4 - return s.lastIndexOf(c,index,cs ? Qt::CaseSensitive : Qt::CaseInsensitive); + return s.lastIndexOf(c,index,cs ? TQt::CaseSensitive : TQt::CaseInsensitive); #else - return s.findRev(c,index,cs); + return s.tqfindRev(c,index,cs); #endif } - inline int findRev(const QString &s,char c,int index = -1,bool cs = true) + inline int tqfindRev(const TQString &s,char c,int index = -1,bool cs = true) { #ifdef COMPILE_USE_QT4 - return s.lastIndexOf(c,index,cs ? Qt::CaseSensitive : Qt::CaseInsensitive); + return s.lastIndexOf(c,index,cs ? TQt::CaseSensitive : TQt::CaseInsensitive); #else - return s.findRev(c,index,cs); + return s.tqfindRev(c,index,cs); #endif } - inline int findRev(const QString &s,const QString & str,int index = -1,bool cs = true) + inline int tqfindRev(const TQString &s,const TQString & str,int index = -1,bool cs = true) { #ifdef COMPILE_USE_QT4 - return s.lastIndexOf(str,index,cs ? Qt::CaseSensitive : Qt::CaseInsensitive); + return s.lastIndexOf(str,index,cs ? TQt::CaseSensitive : TQt::CaseInsensitive); #else - return s.findRev(str,index,cs); + return s.tqfindRev(str,index,cs); #endif } - inline int findRev(const QString &s,const QRegExp & rx,int index = -1) + inline int tqfindRev(const TQString &s,const TQRegExp & rx,int index = -1) { #ifdef COMPILE_USE_QT4 return s.lastIndexOf(rx,index); #else - return s.findRev(rx,index); + return s.tqfindRev(rx,index); #endif } - inline int findRev(const QString &s,const char * str,int index = -1) + inline int tqfindRev(const TQString &s,const char * str,int index = -1) { #ifdef COMPILE_USE_QT4 - return s.lastIndexOf(QString(str),index); + return s.lastIndexOf(TQString(str),index); #else - return s.findRev(str,index); + return s.tqfindRev(str,index); #endif } - inline QString trimmed(const QString &s) + inline TQString trimmed(const TQString &s) { #ifdef COMPILE_USE_QT4 return s.trimmed(); @@ -246,16 +247,16 @@ namespace KviQString #endif } - // WARNING: DO NOT USE CONSTRUCTS LIKE char * c = KviQString::toUtf8(something).data(); + // WARNING: DO NOT USE CONSTRUCTS LIKE char * c = KviTQString::toUtf8(something).data(); // They are dangerous since with many compilers the returned string gets destroyed - // at the end of the instruction and the c pointer gets thus invalidated. + // at the end of the instruction and the c pointer gets thus tqinvalidated. // Use - // KviQCString tmp = KviQString::toUtf8(something); + // KviTQCString tmp = KviTQString::toUtf8(something); // char * c = tmp.data(); // instead. // Yes, I know that it sucks, but it's the only way to // transit to qt 4.x more or less cleanly... - inline KviQCString toUtf8(const QString &s) + inline KviTQCString toUtf8(const TQString &s) { #ifdef COMPILE_USE_QT4 return s.toUtf8(); @@ -264,12 +265,12 @@ namespace KviQString #endif } - inline KviQCString toLocal8Bit(const QString &s) + inline KviTQCString toLocal8Bit(const TQString &s) { return s.local8Bit(); } - inline kvi_i64_t toI64(QString &szNumber,bool * bOk) + inline kvi_i64_t toI64(TQString &szNumber,bool * bOk) { #if SIZEOF_LONG_INT == 8 return szNumber.toLong(bOk); @@ -278,7 +279,7 @@ namespace KviQString #endif } - inline kvi_u64_t toU64(QString &szNumber,bool * bOk) + inline kvi_u64_t toU64(TQString &szNumber,bool * bOk) { #if SIZEOF_LONG_INT == 8 return szNumber.toULong(bOk); @@ -288,6 +289,6 @@ namespace KviQString } }; -// QT4SUX: Because QString::null is gone. QString() is SLOWER than QString::null since it invokes a constructor and destructor. +// QT4SUX: Because TQString() is gone. TQString() is SLOWER than TQString() since it invokes a constructor and destructor. -#endif //!_KVI_QSTRING_H_ +#endif //!_KVI_TQSTRING_H_ diff --git a/src/kvilib/core/kvi_string.cpp b/src/kvilib/core/kvi_string.cpp index 3f201352..df89122a 100644 --- a/src/kvilib/core/kvi_string.cpp +++ b/src/kvilib/core/kvi_string.cpp @@ -55,7 +55,7 @@ kvi_wslen_t kvi_wstrlen(const kvi_wchar_t * str) // %S = Latin1 KviStr pointer (#ifdef WSTRINGCONFIG_USE_KVISTR) : can't be NULL! // %W = KviWStr pointer : can't be NULL! -// %Q = QString pointer : can't be NULL! +// %Q = TQString pointer : can't be NULL! #define _WSTRING_WMEMCPY(_dst,_src,_len) kvi_fastmoveodd((void *)(_dst),(const void *)(_src),sizeof(kvi_wchar_t) * (_len)) #define _WSTRING_STRLEN(_str) kvi_strLen(_str) @@ -105,11 +105,11 @@ kvi_wslen_t kvi_wstrlen(const kvi_wchar_t * str) break; \ case 'Q': \ { \ - QString * pString = kvi_va_arg(list,QString *); \ + TQString * pString = kvi_va_arg(list,TQString *); \ if(pString->length() > 0) \ { \ if(len <= ((int)(pString->length())))return (-1); \ - _WSTRING_WMEMCPY(p,pString->unicode(),pString->length()); \ + _WSTRING_WMEMCPY(p,pString->tqunicode(),pString->length()); \ p += pString->length(); \ len -= pString->length(); \ } \ @@ -190,10 +190,10 @@ int kvi_wvsnprintf(kvi_wchar_t *buffer,kvi_wslen_t len,const kvi_wchar_t *fmt,kv WVSNPRINTF_BODY } -bool kvi_qstringEqualCI(const QString &s1,const QString &s2) +bool kvi_qstringEqualCI(const TQString &s1,const TQString &s2) { - const QChar * p1 = s1.unicode(); - const QChar * p2 = s2.unicode(); + const TQChar * p1 = s1.tqunicode(); + const TQChar * p2 = s2.tqunicode(); int l = s1.length() < s2.length() ? s1.length() : s2.length(); #ifdef COMPILE_USE_QT4 while(l-- && (p1->toLower() == p2->toLower()))p1++,p2++; @@ -402,8 +402,8 @@ bool kvi_matchWildExpr(register const char *m1,register const char *m2) // s1 // m1 - // mask1 : *xor - // mask2 : xorand*xor + // tqmask1 : *xor + // tqmask2 : xorand*xor // m2 // s2 @@ -423,7 +423,7 @@ bool kvi_matchWildExpr(register const char *m1,register const char *m2) const char * savePos2 = m2; while(*m1) { - //loop managed by m1 (initially first mask) + //loop managed by m1 (initially first tqmask) if(*m1=='*') { //Found a wildcard in m1 @@ -450,8 +450,8 @@ bool kvi_matchWildExpr(register const char *m1,register const char *m2) if(*m2 == '*') { //A wlidcard in the second string - //Invert the game : mask1 <-> mask2 - //mask2 now leads the game... + //Invert the game : tqmask1 <-> tqmask2 + //tqmask2 now leads the game... savePos1 = m1; //aux m1 = m2; //...swap m2 = savePos1; //...swap @@ -497,7 +497,7 @@ bool kvi_matchWildExprCS(register const char *m1,register const char *m2) if(!(m1 && m2 && (*m1)))return false; const char * savePos1 = 0; const char * savePos2 = m2; - while(*m1){ //loop managed by m1 (initially first mask) + while(*m1){ //loop managed by m1 (initially first tqmask) if(*m1=='*'){ //Found a wildcard in m1 savePos1 = ++m1; //move to the next char and save the position...this is our jolly @@ -520,8 +520,8 @@ bool kvi_matchWildExprCS(register const char *m1,register const char *m2) } else { if(*m2 == '*'){ //A wlidcard in the second string - //Invert the game : mask1 <-> mask2 - //mask2 now leads the game... + //Invert the game : tqmask1 <-> tqmask2 + //tqmask2 now leads the game... savePos1 = m1; //aux m1 = m2; //...swap m2 = savePos1; //...swap @@ -554,7 +554,7 @@ bool kvi_matchWildExprWithTerminator(register const char *m1,register const char const char * savePos2 = m2; while(NOT_AT_END(m1)) { - //loop managed by m1 (initially first mask) + //loop managed by m1 (initially first tqmask) if(*m1=='*') { //Found a wildcard in m1 @@ -588,8 +588,8 @@ bool kvi_matchWildExprWithTerminator(register const char *m1,register const char if(*m2 == '*') { //A wlidcard in the second string - //Invert the game : mask1 <-> mask2 - //mask2 now leads the game... + //Invert the game : tqmask1 <-> tqmask2 + //tqmask2 now leads the game... bSwapped = !bSwapped; savePos1 = m1; //aux m1 = m2; //...swap @@ -745,10 +745,10 @@ int kvi_vsnprintf(char *buffer,int len,const char *fmt,kvi_va_list list) *p++ = (char)kvi_va_arg(list,int); --len; continue; - case 'Q': // QString! (this should almost never happen) + case 'Q': // TQString! (this should almost never happen) { - QString * s = kvi_va_arg(list,QString *); - KviQCString cs = KviQString::toUtf8(*s); + TQString * s = kvi_va_arg(list,TQString *); + KviTQCString cs = KviTQString::toUtf8(*s); const char * t = cs.data(); if(!t)continue; // nothing to do //check for space... @@ -810,10 +810,10 @@ int kvi_irc_vsnprintf(char *buffer,const char *fmt,kvi_va_list list,bool *bTrunc if(--len < 3)goto truncate; } continue; - case 'Q': // QString! (this should almost never happen) + case 'Q': // TQString! (this should almost never happen) { - QString * s = kvi_va_arg(list,QString *); - KviQCString cs = KviQString::toUtf8(*s); + TQString * s = kvi_va_arg(list,TQString *); + KviTQCString cs = KviTQString::toUtf8(*s); const char * t = cs.data(); if(!t)continue; // nothing to do while(*t) @@ -1038,7 +1038,7 @@ KviStr::KviStr(const char *str) } } -KviStr::KviStr(const KviQCString &str) +KviStr::KviStr(const KviTQCString &str) { //Deep copy constructor if(str.data()) @@ -1115,9 +1115,9 @@ KviStr::KviStr(const KviStr &str) kvi_fastmove(m_ptr,str.m_ptr,m_len+1); } -KviStr::KviStr(const QString &str) +KviStr::KviStr(const TQString &str) { - KviQCString sz = KviQString::toUtf8(str); + KviTQCString sz = KviTQString::toUtf8(str); if(sz.length() > 0) { m_len = sz.length(); @@ -1141,23 +1141,23 @@ KviStr::KviStr(char c,int fillLen) } -KviStr::KviStr(const kvi_wchar_t * unicode) +KviStr::KviStr(const kvi_wchar_t * tqunicode) { - if(!unicode) + if(!tqunicode) { m_len = 0; m_ptr = (char *)kvi_malloc(1); *m_ptr = 0; } else { - m_len = kvi_wstrlen(unicode); + m_len = kvi_wstrlen(tqunicode); m_ptr = (char *)kvi_malloc(m_len + 1); register char * p = m_ptr; - while(*unicode)*p++ = *unicode++; + while(*tqunicode)*p++ = *tqunicode++; *p = 0; } } -KviStr::KviStr(const kvi_wchar_t * unicode,int len) +KviStr::KviStr(const kvi_wchar_t * tqunicode,int len) { m_len = len; m_ptr = (char *)kvi_malloc(m_len + 1); @@ -1165,7 +1165,7 @@ KviStr::KviStr(const kvi_wchar_t * unicode,int len) char * end = p + len; while(p != end) { - *p++ = *unicode++; + *p++ = *tqunicode++; } *p = 0; } @@ -1196,7 +1196,7 @@ KviStr & KviStr::operator=(const KviStr &str) return (*this); } -KviStr & KviStr::operator=(const KviQCString &str) +KviStr & KviStr::operator=(const KviTQCString &str) { m_len = str.length(); m_ptr = (char *)kvi_realloc(m_ptr,m_len+1); @@ -1342,7 +1342,7 @@ int KviStr::hexToBuffer(char ** buffer,bool bNullToNewlines) return len; } -static const char * base64_chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; +static const char * base64_chars = "ABCDEFGHIJKLMNOPTQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; void KviStr::bufferToBase64(const char * buffer,int len) @@ -1490,9 +1490,9 @@ KviStr & KviStr::setStr(const char *str,int len) return (*this); } -KviStr & KviStr::operator=(const QString &str) +KviStr & KviStr::operator=(const TQString &str) { - KviQCString sz = KviQString::toUtf8(str); + KviTQCString sz = KviTQString::toUtf8(str); if(sz.length() > 0){ m_len = sz.length(); m_ptr = (char *)kvi_realloc(m_ptr,m_len+1); @@ -1539,9 +1539,9 @@ void KviStr::append(const char *str) m_len += len; } -void KviStr::append(const QString &str) +void KviStr::append(const TQString &str) { - KviQCString sz = KviQString::toUtf8(str); + KviTQCString sz = KviTQString::toUtf8(str); if(sz.length() < 1)return; m_ptr = (char *)kvi_realloc(m_ptr,m_len+sz.length()+1); kvi_fastmove((m_ptr+m_len),sz.data(),sz.length()+1); @@ -2203,7 +2203,7 @@ int KviStr::occurences(const char *str,bool caseS) const return cnt; } -bool KviStr::contains(char c,bool caseS) const +bool KviStr::tqcontains(char c,bool caseS) const { register char *p = m_ptr; if(caseS) @@ -2224,7 +2224,7 @@ bool KviStr::contains(char c,bool caseS) const return false; } -bool KviStr::contains(const char *str,bool caseS) const +bool KviStr::tqcontains(const char *str,bool caseS) const { __range_valid(str); register char *p = m_ptr; @@ -2657,7 +2657,7 @@ KviStr & KviStr::sprintf(const char *fmt,...) return (*this); } -int KviStr::find(const char *str,int idx,bool caseS) const +int KviStr::tqfind(const char *str,int idx,bool caseS) const { if(idx >= m_len)return -1; register char *p=m_ptr + idx; @@ -2682,7 +2682,7 @@ int KviStr::find(const char *str,int idx,bool caseS) const } } -int KviStr::find(char c,int idx) const +int KviStr::tqfind(char c,int idx) const { if(idx >= m_len)return -1; register char *p=m_ptr + idx; @@ -2691,7 +2691,7 @@ int KviStr::find(char c,int idx) const } -int KviStr::findRev(const char *str,int idx,bool caseS) const +int KviStr::tqfindRev(const char *str,int idx,bool caseS) const { if((m_len + idx) < 0)return -1; register char *p=m_ptr + m_len + idx; @@ -2729,17 +2729,17 @@ int KviStr::findFirstIdx(const char *str,bool caseS) const { // This function can't be used to search inside // multibyte encoded strings... convert your - // code to QString and use QString::findRev(). + // code to TQString and use TQString::tqfindRev(). // We must throw away KviStr at all in this case... - // return QString(m_ptr).find(QString(str),0,caseS);; + // return TQString(m_ptr).tqfind(TQString(str),0,caseS);; // Both this KviStr and the const char * str are assumed // to be in the proper (and same) encoding. - // If KviStr is in encoding A then QString(m_ptr) might + // If KviStr is in encoding A then TQString(m_ptr) might // or not be decoded correctly. // Also if KviStr is in UTF-8 (for example), then - // a position in QString() does not map to the position in the char array + // a position in TQString() does not map to the position in the char array // since a single UNICODE char may use one or more bytes... __range_valid(str); @@ -2782,10 +2782,10 @@ int KviStr::findLastIdx(const char *str,bool caseS) const { // This function can't be used to search inside // multibyte encoded strings... convert your - // code to QString and use QString::findRev(). + // code to TQString and use TQString::tqfindRev(). // We must throw away KviStr at all in this case... - // return QString(m_ptr).findRev(QString(str),-1,caseS); + // return TQString(m_ptr).tqfindRev(TQString(str),-1,caseS); __range_valid(str); //Calc the len of the searched string @@ -2948,7 +2948,7 @@ KviStr & KviStr::emptyString() } -bool KviStr::ext_contains(register const char * data,const char * item,bool caseS) +bool KviStr::ext_tqcontains(register const char * data,const char * item,bool caseS) { if(item && data) { diff --git a/src/kvilib/core/kvi_string.h b/src/kvilib/core/kvi_string.h index 602173cd..4a7991bb 100644 --- a/src/kvilib/core/kvi_string.h +++ b/src/kvilib/core/kvi_string.h @@ -34,8 +34,8 @@ #include // useless ? #endif -#include -#include +#include +#include #include "kvi_qcstring.h" @@ -58,7 +58,7 @@ #endif -__KVI_EXTERN KVILIB_API bool kvi_qstringEqualCI(const QString &s1,const QString &s2); +__KVI_EXTERN KVILIB_API bool kvi_qstringEqualCI(const TQString &s1,const TQString &s2); // Include inlined assembly implementations if required @@ -146,18 +146,18 @@ public: // Compat with QT...
// WARNING : With QT2.x it WILL loose UNICODE data.
- // Safe even if the QString is null. - KviStr(const QString &str); + // Safe even if the TQString is null. + KviStr(const TQString &str); - KviStr(const KviQCString &str); + KviStr(const KviTQCString &str); // Fill sonstructor. // Creates a string long fillLen characters filled with character c.
KviStr(char c,int fillLen = 1); - KviStr(const kvi_wchar_t * unicode); + KviStr(const kvi_wchar_t * tqunicode); - KviStr(const kvi_wchar_t * unicode,int len); + KviStr(const kvi_wchar_t * tqunicode,int len); // just free(m_ptr) ~KviStr(); @@ -233,7 +233,7 @@ public: // append functions void append(const KviStr &str); - void append(const QString &str); + void append(const TQString &str); void append(char c); void append(const char *str); // str CAN be 0 void append(const char *str,int len); // str CAN NOT be 0, and MUST be at least len chars long @@ -257,14 +257,14 @@ public: KviStr & operator=(const KviStr &str); // deep copy KviStr & operator=(const char *str); // str can be NULL here KviStr & operator=(char c); // 2 bytes allocated ,m_len = 1 - KviStr & operator=(const QString &str); - KviStr & operator=(const KviQCString &str); + KviStr & operator=(const TQString &str); + KviStr & operator=(const KviTQCString &str); // Append operators KviStr & operator+=(const KviStr &str) { append(str); return (*this); }; KviStr & operator+=(const char *str) { append(str); return (*this); }; KviStr & operator+=(char c) { append(c); return (*this); }; - KviStr & operator+=(const QString &str) { append(str); return (*this); }; + KviStr & operator+=(const TQString &str) { append(str); return (*this); }; // Comparison bool equalsCI(const KviStr &other) const { if(m_len != other.m_len)return false; return kvi_strEqualCI(m_ptr,other.m_ptr); }; @@ -376,9 +376,9 @@ public: //============================================================================= // Returns true if at least one occurence of str is found - bool contains(const char *str,bool caseS=true) const; + bool tqcontains(const char *str,bool caseS=true) const; // Returns true if at least one occurence of character c is found in this string - bool contains(char c,bool caseS=true) const; + bool tqcontains(char c,bool caseS=true) const; // Returns the number of occurences of string str in this string.
// Overlapped matches are counted. int occurences(const char *str,bool caseS=true) const; @@ -405,9 +405,9 @@ public: // str can NOT be 0 here. int findLastIdx(const char *str,bool caseS = true) const; - int find(char c,int startIdx) const; - int find(const char * str,int startIdx,bool caseS = true) const; - int findRev(const char * str,int startIdx,bool caseS = true) const; + int tqfind(char c,int startIdx) const; + int tqfind(const char * str,int startIdx,bool caseS = true) const; + int tqfindRev(const char * str,int startIdx,bool caseS = true) const; //============================================================================= // Numbers @@ -462,7 +462,7 @@ public: //============================================================================= // FIXME: Should it be KviStrExt::contains namespace ? - static bool ext_contains(register const char * data,const char * item,bool caseS = true); + static bool ext_tqcontains(register const char * data,const char * item,bool caseS = true); }; // FIXME: the functions below should end in the KviStr namespace ??? diff --git a/src/kvilib/core/kvi_valuelist.h b/src/kvilib/core/kvi_valuelist.h index fde9d5b6..9ad234f2 100644 --- a/src/kvilib/core/kvi_valuelist.h +++ b/src/kvilib/core/kvi_valuelist.h @@ -27,11 +27,11 @@ #include "kvi_settings.h" #ifdef COMPILE_USE_QT4 - #include + #include #define KviValueList Q3ValueList #else - #include - #define KviValueList QValueList + #include + #define KviValueList TQValueList #endif #endif //_KVI_VALUELIST_H_ diff --git a/src/kvilib/ext/kvi_accel.h b/src/kvilib/ext/kvi_accel.h index 34cca3c1..1014b2cb 100644 --- a/src/kvilib/ext/kvi_accel.h +++ b/src/kvilib/ext/kvi_accel.h @@ -28,11 +28,11 @@ #include "kvi_settings.h" #ifdef COMPILE_USE_QT4 - #include + #include #define KviAccel Q3Accel #else - #include - #define KviAccel QAccel + #include + #define KviAccel TQAccel #endif #endif //!_KVI_ACCEL_H_ diff --git a/src/kvilib/ext/kvi_cmdformatter.cpp b/src/kvilib/ext/kvi_cmdformatter.cpp index e2b3e1f6..153557b2 100644 --- a/src/kvilib/ext/kvi_cmdformatter.cpp +++ b/src/kvilib/ext/kvi_cmdformatter.cpp @@ -50,10 +50,10 @@ namespace KviCommandFormatter return bGotIt; } - bool hasLeadingChars(QStringList &list,const QChar &c) + bool hasLeadingChars(TQStringList &list,const TQChar &c) { bool bGotIt = false; - for(QStringList::Iterator it = list.begin();it != list.end();++it) + for(TQStringList::Iterator it = list.begin();it != list.end();++it) { if((*it).length() < 1)continue; if((*it).at(0) == c) @@ -62,7 +62,7 @@ namespace KviCommandFormatter bGotIt = true; } else { // we pretend this line to be empty - QString tmp = *it; + TQString tmp = *it; #ifdef COMPILE_USE_QT4 tmp = tmp.trimmed(); #else @@ -84,9 +84,9 @@ namespace KviCommandFormatter } } - void trimLeading(QStringList &list) + void trimLeading(TQStringList &list) { - for(QStringList::Iterator it = list.begin();it != list.end();++it) + for(TQStringList::Iterator it = list.begin();it != list.end();++it) { (*it).remove(0,1); } @@ -102,9 +102,9 @@ namespace KviCommandFormatter } } - void addLeading(QStringList &list,const QChar & c) + void addLeading(TQStringList &list,const TQChar & c) { - for(QStringList::Iterator it = list.begin();it != list.end();++it) + for(TQStringList::Iterator it = list.begin();it != list.end();++it) { (*it).prepend(c); } @@ -125,21 +125,21 @@ namespace KviCommandFormatter } - void unindent(QString &buffer) + void unindent(TQString &buffer) { #ifdef COMPILE_USE_QT4 - QStringList list = buffer.split("\n",QString::KeepEmptyParts); + TQStringList list = buffer.split("\n",TQString::KeepEmptyParts); #else - QStringList list = QStringList::split("\n",buffer,true); + TQStringList list = TQStringList::split("\n",buffer,true); #endif - while(hasLeadingChars(list,QChar('\t')) || hasLeadingChars(list,QChar(' ')))trimLeading(list); + while(hasLeadingChars(list,TQChar('\t')) || hasLeadingChars(list,TQChar(' ')))trimLeading(list); //buffer = list.join("\n"); join implementation sux :D // we WANT the last newline buffer = ""; - for(QStringList::Iterator it = list.begin();it != list.end();++it) + for(TQStringList::Iterator it = list.begin();it != list.end();++it) { buffer.append(*it); - buffer.append(QChar('\n')); + buffer.append(TQChar('\n')); } } @@ -160,7 +160,7 @@ namespace KviCommandFormatter buffer.stripWhiteSpace(); } - void bufferFromBlock(QString &buffer) + void bufferFromBlock(TQString &buffer) { #ifdef COMPILE_USE_QT4 buffer = buffer.trimmed(); @@ -170,11 +170,11 @@ namespace KviCommandFormatter if(buffer.isEmpty())return; - if((buffer.at(0) == QChar('{')) && buffer.endsWith(QChar('}'))) + if((buffer.at(0) == TQChar('{')) && buffer.endsWith(TQChar('}'))) { buffer.remove(0,1); buffer.remove(buffer.length() - 1,1); - while((buffer.length() > 0) && ((buffer.at(0) == QChar('\n')) || (buffer.at(0) == QChar('\r')))) + while((buffer.length() > 0) && ((buffer.at(0) == TQChar('\n')) || (buffer.at(0) == TQChar('\r')))) buffer.remove(0,1); } @@ -201,21 +201,21 @@ namespace KviCommandFormatter } } - void indent(QString &buffer) + void indent(TQString &buffer) { #ifdef COMPILE_USE_QT4 - QStringList list = buffer.split("\n",QString::KeepEmptyParts); + TQStringList list = buffer.split("\n",TQString::KeepEmptyParts); #else - QStringList list = QStringList::split("\n",buffer,true); + TQStringList list = TQStringList::split("\n",buffer,true); #endif - addLeading(list,QChar('\t')); + addLeading(list,TQChar('\t')); //buffer = list.join("\n"); join implementation sux :D // we WANT the last newline buffer = ""; - for(QStringList::Iterator it = list.begin();it != list.end();++it) + for(TQStringList::Iterator it = list.begin();it != list.end();++it) { buffer.append(*it); - buffer.append(QChar('\n')); + buffer.append(TQChar('\n')); } } @@ -229,12 +229,12 @@ namespace KviCommandFormatter buffer.append("}\n"); } - void blockFromBuffer(QString &buffer) + void blockFromBuffer(TQString &buffer) { indent(buffer); buffer.prepend("{\n"); - KviQString::stripRightWhiteSpace(buffer); - KviQString::ensureLastCharIs(buffer,'\n'); + KviTQString::stripRightWhiteSpace(buffer); + KviTQString::ensureLastCharIs(buffer,'\n'); buffer.append("}\n"); } }; diff --git a/src/kvilib/ext/kvi_cmdformatter.h b/src/kvilib/ext/kvi_cmdformatter.h index b6efa98b..043a6ec1 100644 --- a/src/kvilib/ext/kvi_cmdformatter.h +++ b/src/kvilib/ext/kvi_cmdformatter.h @@ -29,36 +29,36 @@ #include "kvi_settings.h" #include "kvi_qstring.h" -#include +#include namespace KviCommandFormatter { extern KVILIB_API bool hasLeadingChars(KviStr * array,char c); - extern KVILIB_API bool hasLeadingChars(QStringList &list,const QChar &c); + extern KVILIB_API bool hasLeadingChars(TQStringList &list,const TQChar &c); extern KVILIB_API void trimLeading(KviStr ** array); - extern KVILIB_API void trimLeading(QStringList &list); + extern KVILIB_API void trimLeading(TQStringList &list); extern KVILIB_API void addLeading(KviStr ** array,char c); - extern KVILIB_API void addLeading(QStringList &list,const QChar &c); + extern KVILIB_API void addLeading(TQStringList &list,const TQChar &c); extern KVILIB_API void trimBlockBraces(KviStr &buffer); - extern KVILIB_API void trimBlockBraces(QString &buffer); + extern KVILIB_API void trimBlockBraces(TQString &buffer); extern KVILIB_API void unindent(KviStr &buffer); - extern KVILIB_API void unindent(QString &buffer); + extern KVILIB_API void unindent(TQString &buffer); extern KVILIB_API void bufferFromBlock(KviStr &buffer); - extern KVILIB_API void bufferFromBlock(QString &buffer); + extern KVILIB_API void bufferFromBlock(TQString &buffer); extern KVILIB_API void addBlockBraces(KviStr &buffer); - extern KVILIB_API void addBlockBraces(QString &buffer); + extern KVILIB_API void addBlockBraces(TQString &buffer); extern KVILIB_API void indent(KviStr &buffer); - extern KVILIB_API void indent(QString &buffer); + extern KVILIB_API void indent(TQString &buffer); extern KVILIB_API void blockFromBuffer(KviStr &buffer); - extern KVILIB_API void blockFromBuffer(QString &buffer); + extern KVILIB_API void blockFromBuffer(TQString &buffer); }; #endif //_KVI_CMDFORMATTER_H_ diff --git a/src/kvilib/ext/kvi_config.cpp b/src/kvilib/ext/kvi_config.cpp index eb3dc0bc..c0eb124e 100644 --- a/src/kvilib/ext/kvi_config.cpp +++ b/src/kvilib/ext/kvi_config.cpp @@ -34,7 +34,7 @@ #include "kvi_file.h" -KviConfig::KviConfig(const QString &filename,FileMode f,bool bLocal8Bit) +KviConfig::KviConfig(const TQString &filename,FileMode f,bool bLocal8Bit) { m_bLocal8Bit = bLocal8Bit; m_szFileName = filename; @@ -42,7 +42,7 @@ KviConfig::KviConfig(const QString &filename,FileMode f,bool bLocal8Bit) m_szGroup = KVI_CONFIG_DEFAULT_GROUP; m_bPreserveEmptyGroups = false; m_bReadOnly = (f == KviConfig::Read); - m_pDict = new KviPointerHashTable(17,false); + m_pDict = new KviPointerHashTable(17,false); m_pDict->setAutoDelete(true); if(f != KviConfig::Write)load(); } @@ -50,12 +50,12 @@ KviConfig::KviConfig(const QString &filename,FileMode f,bool bLocal8Bit) KviConfig::KviConfig(const char* filename,FileMode f,bool bLocal8Bit) { m_bLocal8Bit = bLocal8Bit; - m_szFileName = QString::fromUtf8(filename); + m_szFileName = TQString::fromUtf8(filename); m_bDirty = false; m_szGroup = KVI_CONFIG_DEFAULT_GROUP; m_bPreserveEmptyGroups = false; m_bReadOnly = (f == KviConfig::Read); - m_pDict = new KviPointerHashTable(17,false); + m_pDict = new KviPointerHashTable(17,false); m_pDict->setAutoDelete(true); if(f != KviConfig::Write)load(); } @@ -70,20 +70,20 @@ KviConfig::~KviConfig() void KviConfig::clear() { delete m_pDict; - m_pDict = new KviPointerHashTable(17,false); + m_pDict = new KviPointerHashTable(17,false); m_pDict->setAutoDelete(true); m_bDirty = false; m_szGroup = KVI_CONFIG_DEFAULT_GROUP; } -void KviConfig::clearGroup(const QString & szGroup) +void KviConfig::clearGroup(const TQString & szGroup) { m_bDirty = true; m_pDict->remove(szGroup); - if(!m_pDict->find(m_szGroup))m_szGroup = KVI_CONFIG_DEFAULT_GROUP; //removed the current one + if(!m_pDict->tqfind(m_szGroup))m_szGroup = KVI_CONFIG_DEFAULT_GROUP; //removed the current one } -void KviConfig::clearKey(const QString & szKey) +void KviConfig::clearKey(const TQString & szKey) { m_bDirty = true; KviConfigGroup * p_group = getCurrentGroup(); @@ -99,13 +99,13 @@ void KviConfig::getContentsString(KviStr &buffer) buffer.append('\n'); int sections = 0; int keys = 0; - KviPointerHashTableIterator it(*m_pDict); + KviPointerHashTableIterator it(*m_pDict); while(it.current()){ buffer.append(" Section ["); buffer.append(it.currentKey()); buffer.append("]\n"); int sectionKeys = 0; - KviPointerHashTableIterator it2(*it.current()); + KviPointerHashTableIterator it2(*it.current()); while(it2.current()){ buffer.append(" Key ["); buffer.append(it2.currentKey()); @@ -279,10 +279,10 @@ bool KviConfig::load() if(!tmp.isEmpty()) { - QString szGroup = m_bLocal8Bit ? - QString::fromLocal8Bit(tmp.ptr(),tmp.len()) : - QString::fromUtf8(tmp.ptr(),tmp.len()); - p_group = m_pDict->find(szGroup); + TQString szGroup = m_bLocal8Bit ? + TQString::fromLocal8Bit(tmp.ptr(),tmp.len()) : + TQString::fromUtf8(tmp.ptr(),tmp.len()); + p_group = m_pDict->tqfind(szGroup); if(!p_group) { p_group = new KviConfigGroup(17,false); @@ -304,17 +304,17 @@ bool KviConfig::load() tmp.stripRightWhiteSpace(); // No external spaces at all in keys if(!tmp.isEmpty()) { - QString szKey = m_bLocal8Bit ? - QString::fromLocal8Bit(tmp.ptr(),tmp.len()) : - QString::fromUtf8(tmp.ptr(),tmp.len()); + TQString szKey = m_bLocal8Bit ? + TQString::fromLocal8Bit(tmp.ptr(),tmp.len()) : + TQString::fromUtf8(tmp.ptr(),tmp.len()); z++; while(*z && ((*z == ' ') || (*z == '\t')))z++; if(*z) { tmp.hexDecode(z); - QString * pVal = new QString( m_bLocal8Bit ? - QString::fromLocal8Bit(tmp.ptr(),tmp.len()) : - QString::fromUtf8(tmp.ptr(),tmp.len()) + TQString * pVal = new TQString( m_bLocal8Bit ? + TQString::fromLocal8Bit(tmp.ptr(),tmp.len()) : + TQString::fromUtf8(tmp.ptr(),tmp.len()) ); if(!p_group) { @@ -324,13 +324,13 @@ bool KviConfig::load() p_group->setAutoDelete(true); m_pDict->insert(KVI_CONFIG_DEFAULT_GROUP,p_group); } - p_group->replace(szKey,pVal); + p_group->tqreplace(szKey,pVal); } else { // we in fact need this (mercy :D) // otherwise the empty options will be treated as non-existing ones // and will get the defaults (which is bad) - QString * pVal = new QString(QString::null); - p_group->replace(szKey,pVal); + TQString * pVal = new TQString(TQString()); + p_group->tqreplace(szKey,pVal); } } } @@ -362,7 +362,7 @@ bool KviConfig::load() bool KviConfig::load() { - QFile f(m_szFileName); + TQFile f(m_szFileName); if(!f.open(IO_ReadOnly))return false; @@ -389,8 +389,8 @@ bool KviConfig::load() dataLine.hexDecode(); if(dataLine.hasData()) { - QString szUtf8 = QString::fromUtf8(dataLine.ptr()); - p_group = m_pDict->find(szUtf8); + TQString szUtf8 = TQString::fromUtf8(dataLine.ptr()); + p_group = m_pDict->tqfind(szUtf8); if(!p_group) { @@ -412,7 +412,7 @@ bool KviConfig::load() dataLine.stripLeftWhiteSpace(); // strip any whitespace added externally dataLine.hexDecode(); //insert (replace items if needed) - QString *p_data=new QString(QString::fromUtf8(dataLine.ptr())); + TQString *p_data=new TQString(TQString::fromUtf8(dataLine.ptr())); if(!p_group) { // ops...we're missing a group @@ -421,8 +421,8 @@ bool KviConfig::load() p_group->setAutoDelete(true); m_pDict->insert(KVI_CONFIG_DEFAULT_GROUP,p_group); } - QString szName = QString::fromUtf8(name.ptr()); - p_group->replace(szName,p_data); + TQString szName = TQString::fromUtf8(name.ptr()); + p_group->tqreplace(szName,p_data); } } break; @@ -497,12 +497,12 @@ bool KviConfig::save() if(!f.openForWriting())return false; if(f.writeBlock("# KVIrc configuration file\n",27) != 27)return false; - KviPointerHashTableIterator it(*m_pDict); + KviPointerHashTableIterator it(*m_pDict); while (it.current()) { if((it.current()->count() != 0) || (m_bPreserveEmptyGroups)) { - KviStr group(m_bLocal8Bit ? KviQString::toLocal8Bit(it.currentKey()) : KviQString::toUtf8(it.currentKey())); + KviStr group(m_bLocal8Bit ? KviTQString::toLocal8Bit(it.currentKey()) : KviTQString::toUtf8(it.currentKey())); group.hexEncodeWithTable(encode_table); if(!f.putChar('['))return false; @@ -513,10 +513,10 @@ bool KviConfig::save() KviConfigGroupIterator it2(*dict); KviStr szName,szValue; - while(QString * p_str = it2.current()) + while(TQString * p_str = it2.current()) { - szName = m_bLocal8Bit ? KviQString::toLocal8Bit(it2.currentKey()) : KviQString::toUtf8(it2.currentKey()); - szValue = m_bLocal8Bit ? KviQString::toLocal8Bit(*p_str) : KviQString::toUtf8(*p_str); + szName = m_bLocal8Bit ? KviTQString::toLocal8Bit(it2.currentKey()) : KviTQString::toUtf8(it2.currentKey()); + szValue = m_bLocal8Bit ? KviTQString::toLocal8Bit(*p_str) : KviTQString::toUtf8(*p_str); szName.hexEncodeWithTable(encode_table); szValue.hexEncodeWhiteSpace(); @@ -534,7 +534,7 @@ bool KviConfig::save() return true; } -void KviConfig::setGroup(const QString & szGroup) +void KviConfig::setGroup(const TQString & szGroup) { m_szGroup = szGroup; if(m_bPreserveEmptyGroups) @@ -547,21 +547,21 @@ void KviConfig::setGroup(const QString & szGroup) } } -bool KviConfig::hasKey(const QString & szKey) +bool KviConfig::hasKey(const TQString & szKey) { KviConfigGroup * p_group = getCurrentGroup(); - return (p_group->find(szKey) != 0); + return (p_group->tqfind(szKey) != 0); } -bool KviConfig::hasGroup(const QString & szGroup) +bool KviConfig::hasGroup(const TQString & szGroup) { - return (m_pDict->find(szGroup) != 0); + return (m_pDict->tqfind(szGroup) != 0); } KviConfigGroup * KviConfig::getCurrentGroup() { if(m_szGroup.isEmpty())m_szGroup = KVI_CONFIG_DEFAULT_GROUP; - KviConfigGroup * p_group = m_pDict->find(m_szGroup); + KviConfigGroup * p_group = m_pDict->tqfind(m_szGroup); if(!p_group) { //create the group @@ -574,20 +574,20 @@ KviConfigGroup * KviConfig::getCurrentGroup() ////////////////////////////////// KviStr -void KviConfig::writeEntry(const QString & szKey,const QString & szValue) +void KviConfig::writeEntry(const TQString & szKey,const TQString & szValue) { m_bDirty = true; KviConfigGroup * p_group = getCurrentGroup(); - QString *p_data=new QString(szValue); - p_group->replace(szKey,p_data); + TQString *p_data=new TQString(szValue); + p_group->tqreplace(szKey,p_data); } // FIXME: #warning "We have probs here ?" -QString KviConfig::readEntry(const QString & szKey,const QString & szDefault) +TQString KviConfig::readEntry(const TQString & szKey,const TQString & szDefault) { KviConfigGroup * p_group = getCurrentGroup(); - QString * p_str = p_group->find(szKey); + TQString * p_str = p_group->tqfind(szKey); if(!p_str) { m_szStrBuffer = szDefault; @@ -597,72 +597,72 @@ QString KviConfig::readEntry(const QString & szKey,const QString & szDefault) return m_szStrBuffer; } -//////////////////////////////////// QString +//////////////////////////////////// TQString /* -QString KviConfig::readQStringEntry(const char *szKey,const QString &szDefault) +TQString KviConfig::readTQStringEntry(const char *szKey,const TQString &szDefault) { KviStrDict * p_group = getCurrentGroup(); - KviStr * p_str = p_group->find(szKey); + KviStr * p_str = p_group->tqfind(szKey); if(!p_str)return szDefault; - return QString::fromUtf8(p_str->ptr()); + return TQString::fromUtf8(p_str->ptr()); } */ /* -void KviConfig::writeEntry(const char *szKey,const QString &szValue) +void KviConfig::writeEntry(const char *szKey,const TQString &szValue) { m_bDirty = true; KviStrDict * p_group = getCurrentGroup(); - p_group->replace(szKey,new KviStr(szValue.utf8().data())); + p_group->tqreplace(szKey,new KviStr(szValue.utf8().data())); } */ -////////////////////////////////// QStringList +////////////////////////////////// TQStringList -static QString g_szConfigStringListSeparator(",\\[ITEM],"); +static TQString g_szConfigStringListSeparator(",\\[ITEM],"); -QStringList KviConfig::readStringListEntry(const QString & szKey,const QStringList &list) +TQStringList KviConfig::readStringListEntry(const TQString & szKey,const TQStringList &list) { KviConfigGroup * p_group = getCurrentGroup(); - QString * p_str = p_group->find(szKey); + TQString * p_str = p_group->tqfind(szKey); if(!p_str)return list; #ifdef COMPILE_USE_QT4 return p_str->split(g_szConfigStringListSeparator); #else - return QStringList::split(g_szConfigStringListSeparator,*p_str); + return TQStringList::split(g_szConfigStringListSeparator,*p_str); #endif } -void KviConfig::writeEntry(const QString & szKey,const QStringList &list) +void KviConfig::writeEntry(const TQString & szKey,const TQStringList &list) { m_bDirty = true; KviConfigGroup * p_group = getCurrentGroup(); - QString *p_data=new QString(list.join(g_szConfigStringListSeparator)); - p_group->replace(szKey,p_data); + TQString *p_data=new TQString(list.join(g_szConfigStringListSeparator)); + p_group->tqreplace(szKey,p_data); } ////////////////////////////////// KviValueList -KviValueList KviConfig::readIntListEntry(const QString & szKey,const KviValueList &list) +KviValueList KviConfig::readIntListEntry(const TQString & szKey,const KviValueList &list) { KviConfigGroup * p_group = getCurrentGroup(); - QString * p_str = p_group->find(szKey); + TQString * p_str = p_group->tqfind(szKey); if(!p_str) { //debug("Returning default list for group %s and key %s",m_szGroup.latin1(),szKey.latin1()); return list; } #ifdef COMPILE_USE_QT4 - QStringList sl = p_str->split(","); + TQStringList sl = p_str->split(","); #else - QStringList sl = QStringList::split(",",*p_str); + TQStringList sl = TQStringList::split(",",*p_str); #endif KviValueList ret; //debug("Got option list for group %s and key %s: %s",m_szGroup.latin1(),szKey.latin1(),p_str->latin1()); - for(QStringList::Iterator it = sl.begin();it != sl.end();++it) + for(TQStringList::Iterator it = sl.begin();it != sl.end();++it) { bool bOk; int iTmp = (*it).toInt(&bOk); @@ -673,7 +673,7 @@ KviValueList KviConfig::readIntListEntry(const QString & szKey,const KviVal } -void KviConfig::writeEntry(const QString & szKey,const KviValueList &list) +void KviConfig::writeEntry(const TQString & szKey,const KviValueList &list) { m_bDirty = true; KviConfigGroup * p_group = getCurrentGroup(); @@ -685,26 +685,26 @@ void KviConfig::writeEntry(const QString & szKey,const KviValueList &list) } //debug("Writing option list for group %s and key %s: %s",m_szGroup.latin1(),szKey.latin1(),szData.ptr()); - p_group->replace(szKey,new QString(szData.ptr())); + p_group->tqreplace(szKey,new TQString(szData.ptr())); } ////////////////////////////////// KviPixmap // FIXME: #warning "Spaces in image names ?" -void KviConfig::writeEntry(const QString & szKey,const KviPixmap &pixmap) +void KviConfig::writeEntry(const TQString & szKey,const KviPixmap &pixmap) { m_bDirty = true; KviConfigGroup * p_group = getCurrentGroup(); - QString *p_data=new QString(); + TQString *p_data=new TQString(); KviStringConversion::toString(pixmap,*p_data); - p_group->replace(szKey,p_data); + p_group->tqreplace(szKey,p_data); } -KviPixmap KviConfig::readPixmapEntry(const QString & szKey,const KviPixmap &pixDef) +KviPixmap KviConfig::readPixmapEntry(const TQString & szKey,const KviPixmap &pixDef) { KviConfigGroup * p_group = getCurrentGroup(); - QString * p_str = p_group->find(szKey); + TQString * p_str = p_group->tqfind(szKey); if(p_str) { KviPixmap ret(""); @@ -716,40 +716,40 @@ KviPixmap KviConfig::readPixmapEntry(const QString & szKey,const KviPixmap &pixD ////////////////////////////////// KviMsgType -void KviConfig::writeEntry(const QString & szKey,const KviMsgType &msg) +void KviConfig::writeEntry(const TQString & szKey,const KviMsgType &msg) { m_bDirty = true; KviConfigGroup * p_group = getCurrentGroup(); - QString szData; + TQString szData; KviStringConversion::toString(msg,szData); - p_group->replace(szKey,new QString(szData)); + p_group->tqreplace(szKey,new TQString(szData)); } -KviMsgType KviConfig::readMsgTypeEntry(const QString & szKey,const KviMsgType &msgDef) +KviMsgType KviConfig::readMsgTypeEntry(const TQString & szKey,const KviMsgType &msgDef) { KviConfigGroup * p_group = getCurrentGroup(); - QString * p_str = p_group->find(szKey); + TQString * p_str = p_group->tqfind(szKey); if(!p_str)return msgDef; KviMsgType ret = msgDef; KviStringConversion::fromString(*p_str,ret); return ret; } -////////////////////////////////// QColor +////////////////////////////////// TQColor -void KviConfig::writeEntry(const QString & szKey,const QColor &clr) +void KviConfig::writeEntry(const TQString & szKey,const TQColor &clr) { m_bDirty = true; KviConfigGroup * p_group = getCurrentGroup(); KviStr szData(KviStr::Format,"%d,%d,%d",clr.red(),clr.green(),clr.blue()); - p_group->replace(szKey,new QString(szData.ptr())); + p_group->tqreplace(szKey,new TQString(szData.ptr())); } -QColor KviConfig::readColorEntry(const QString & szKey,const QColor &clr) +TQColor KviConfig::readColorEntry(const TQString & szKey,const TQColor &clr) { KviConfigGroup * p_group = getCurrentGroup(); - QColor color(clr); - QString * pointer_that_IS_initialized = p_group->find(szKey); + TQColor color(clr); + TQString * pointer_that_IS_initialized = p_group->tqfind(szKey); if(pointer_that_IS_initialized) @@ -778,35 +778,35 @@ QColor KviConfig::readColorEntry(const QString & szKey,const QColor &clr) return color; } -////////////////////////////////// QFont +////////////////////////////////// TQFont -void KviConfig::getFontProperties(KviStr & buffer,QFont *fnt) +void KviConfig::getFontProperties(KviStr & buffer,TQFont *fnt) { - QString tmp; + TQString tmp; KviStringConversion::toString(*fnt,tmp); buffer = tmp; } -void KviConfig::writeEntry(const QString & szKey,QFont &fnt) +void KviConfig::writeEntry(const TQString & szKey,TQFont &fnt) { m_bDirty = true; KviConfigGroup * p_group = getCurrentGroup(); - QString *p_data = new QString(); + TQString *p_data = new TQString(); KviStringConversion::toString(fnt,*p_data); - p_group->replace(szKey,p_data); + p_group->tqreplace(szKey,p_data); } -void KviConfig::setFontProperties(KviStr & str,QFont *fnt) +void KviConfig::setFontProperties(KviStr & str,TQFont *fnt) { KviStringConversion::fromString(str.ptr(),*fnt); } -QFont KviConfig::readFontEntry(const QString & szKey,const QFont &fnt) +TQFont KviConfig::readFontEntry(const TQString & szKey,const TQFont &fnt) { - QFont font(fnt); + TQFont font(fnt); KviConfigGroup * p_group = getCurrentGroup(); - QString * p_str = p_group->find(szKey); + TQString * p_str = p_group->tqfind(szKey); if(p_str) { //FontEntry=Arial,12,9,0,100,italic,underline,strikeout, @@ -819,58 +819,58 @@ QFont KviConfig::readFontEntry(const QString & szKey,const QFont &fnt) ////////////////////////////////// bool -void KviConfig::writeEntry(const QString & szKey,bool bTrue) +void KviConfig::writeEntry(const TQString & szKey,bool bTrue) { m_bDirty = true; KviConfigGroup * p_group = getCurrentGroup(); - QString *p_data = new QString(bTrue ? "true" : "false"); - p_group->replace(szKey,p_data); + TQString *p_data = new TQString(bTrue ? "true" : "false"); + p_group->tqreplace(szKey,p_data); } -bool KviConfig::readBoolEntry(const QString & szKey,bool bTrue) +bool KviConfig::readBoolEntry(const TQString & szKey,bool bTrue) { KviConfigGroup * p_group = getCurrentGroup(); - QString * p_str = p_group->find(szKey); + TQString * p_str = p_group->tqfind(szKey); if(!p_str)return bTrue; - static QString szTrue = "true"; - return (KviQString::toLower(*p_str) == szTrue); + static TQString szTrue = "true"; + return (KviTQString::toLower(*p_str) == szTrue); } -////////////////////////////////// QRect +////////////////////////////////// TQRect -void KviConfig::writeEntry(const QString & szKey,const QRect &rct) +void KviConfig::writeEntry(const TQString & szKey,const TQRect &rct) { m_bDirty = true; KviConfigGroup * p_group = getCurrentGroup(); - QString szBuf; + TQString szBuf; KviStringConversion::toString(rct,szBuf); - p_group->replace(szKey,new QString(szBuf)); + p_group->tqreplace(szKey,new TQString(szBuf)); } -QRect KviConfig::readRectEntry(const QString & szKey,const QRect &rct) +TQRect KviConfig::readRectEntry(const TQString & szKey,const TQRect &rct) { KviConfigGroup * p_group = getCurrentGroup(); - QString * str = p_group->find(szKey); + TQString * str = p_group->tqfind(szKey); if(!str)return rct; - QRect ret; + TQRect ret; return KviStringConversion::fromString(*str,ret) ? ret : rct; } ////////////////////////////////// unsigned short -void KviConfig::writeEntry(const QString & szKey,unsigned short usValue) +void KviConfig::writeEntry(const TQString & szKey,unsigned short usValue) { m_bDirty = true; KviConfigGroup * p_group = getCurrentGroup(); - QString *p_data = new QString(); + TQString *p_data = new TQString(); p_data->setNum(usValue); - p_group->replace(szKey,p_data); + p_group->tqreplace(szKey,p_data); } -unsigned short int KviConfig::readUShortEntry(const QString & szKey,unsigned short int usDefault) +unsigned short int KviConfig::readUShortEntry(const TQString & szKey,unsigned short int usDefault) { KviConfigGroup * p_group = getCurrentGroup(); - QString * p_str = p_group->find(szKey); + TQString * p_str = p_group->tqfind(szKey); if(!p_str)return usDefault; bool bOk; unsigned short int usVal=p_str->toUShort(&bOk); @@ -887,13 +887,13 @@ void KviConfig::writeEntry(const char *szKey,unsigned long lValue) KviStrDict * p_group = getCurrentGroup(); KviStr *p_data = new KviStr(); p_data->setNum(lValue); - p_group->replace(szKey,p_data); + p_group->tqreplace(szKey,p_data); } unsigned long KviConfig::readULongEntry(const char *szKey,unsigned long lDefault) { KviStrDict * p_group = getCurrentGroup(); - KviStr * p_str = p_group->find(szKey); + KviStr * p_str = p_group->tqfind(szKey); if(!p_str)return lDefault; bool bOk; unsigned long lVal=p_str->toULong(&bOk); @@ -903,19 +903,19 @@ unsigned long KviConfig::readULongEntry(const char *szKey,unsigned long lDefault ////////////////////////////////// int -void KviConfig::writeEntry(const QString & szKey,int iValue) +void KviConfig::writeEntry(const TQString & szKey,int iValue) { m_bDirty = true; KviConfigGroup * p_group = getCurrentGroup(); - QString *p_data = new QString(); + TQString *p_data = new TQString(); p_data->setNum(iValue); - p_group->replace(szKey,p_data); + p_group->tqreplace(szKey,p_data); } -int KviConfig::readIntEntry(const QString & szKey,int iDefault) +int KviConfig::readIntEntry(const TQString & szKey,int iDefault) { KviConfigGroup * p_group = getCurrentGroup(); - QString * p_str = p_group->find(szKey); + TQString * p_str = p_group->tqfind(szKey); if(!p_str)return iDefault; bool bOk; int iVal=p_str->toInt(&bOk); @@ -924,19 +924,19 @@ int KviConfig::readIntEntry(const QString & szKey,int iDefault) ////////////////////////////////// unsigned int -void KviConfig::writeEntry(const QString & szKey,unsigned int iValue) +void KviConfig::writeEntry(const TQString & szKey,unsigned int iValue) { m_bDirty = true; KviConfigGroup * p_group = getCurrentGroup(); - QString *p_data = new QString(); + TQString *p_data = new TQString(); p_data->setNum(iValue); - p_group->replace(szKey,p_data); + p_group->tqreplace(szKey,p_data); } -unsigned int KviConfig::readUIntEntry(const QString & szKey,unsigned int iDefault) +unsigned int KviConfig::readUIntEntry(const TQString & szKey,unsigned int iDefault) { KviConfigGroup * p_group = getCurrentGroup(); - QString * p_str = p_group->find(szKey); + TQString * p_str = p_group->tqfind(szKey); if(!p_str)return iDefault; bool bOk; unsigned int iVal=p_str->toUInt(&bOk); @@ -945,19 +945,19 @@ unsigned int KviConfig::readUIntEntry(const QString & szKey,unsigned int iDefaul ////////////////////////////////// char -void KviConfig::writeEntry(const QString & szKey,char iValue) +void KviConfig::writeEntry(const TQString & szKey,char iValue) { m_bDirty = true; KviConfigGroup * p_group = getCurrentGroup(); - QString * p_data = new QString(); + TQString * p_data = new TQString(); p_data->setNum(iValue); - p_group->replace(szKey,p_data); + p_group->tqreplace(szKey,p_data); } -char KviConfig::readCharEntry(const QString & szKey,char iDefault) +char KviConfig::readCharEntry(const TQString & szKey,char iDefault) { KviConfigGroup * p_group = getCurrentGroup(); - QString * p_str = p_group->find(szKey); + TQString * p_str = p_group->tqfind(szKey); if(!p_str)return iDefault; bool bOk; char iVal=(char)p_str->toInt(&bOk); @@ -966,19 +966,19 @@ char KviConfig::readCharEntry(const QString & szKey,char iDefault) ////////////////////////////////// unsigned char -void KviConfig::writeEntry(const QString & szKey,unsigned char iValue) +void KviConfig::writeEntry(const TQString & szKey,unsigned char iValue) { m_bDirty = true; KviConfigGroup * p_group = getCurrentGroup(); - QString *p_data = new QString(); + TQString *p_data = new TQString(); p_data->setNum(iValue); - p_group->replace(szKey,p_data); + p_group->tqreplace(szKey,p_data); } -unsigned char KviConfig::readUCharEntry(const QString & szKey,unsigned char iDefault) +unsigned char KviConfig::readUCharEntry(const TQString & szKey,unsigned char iDefault) { KviConfigGroup * p_group = getCurrentGroup(); - QString * p_str = p_group->find(szKey); + TQString * p_str = p_group->tqfind(szKey); if(!p_str)return iDefault; bool bOk; unsigned char iVal=(unsigned char)p_str->toUInt(&bOk); diff --git a/src/kvilib/ext/kvi_config.h b/src/kvilib/ext/kvi_config.h index 6eef4e05..46924418 100644 --- a/src/kvilib/ext/kvi_config.h +++ b/src/kvilib/ext/kvi_config.h @@ -31,35 +31,35 @@ #include "kvi_pointerhashtable.h" #include "kvi_valuelist.h" -#include -#include -#include -#include +#include +#include +#include +#include #define KVI_CONFIG_DEFAULT_GROUP "KVIrc" class KviPixmap; class KviMsgType; -typedef KviPointerHashTable KviConfigGroup; -typedef KviPointerHashTableIterator KviConfigGroupIterator; -typedef KviPointerHashTableIterator KviConfigIterator; +typedef KviPointerHashTable KviConfigGroup; +typedef KviPointerHashTableIterator KviConfigGroupIterator; +typedef KviPointerHashTableIterator KviConfigIterator; class KVILIB_API KviConfig : public KviHeapObject { public: enum FileMode { Read = 1 , Write = 2 , ReadWrite = 3 }; public: - KviConfig(const QString &filename,FileMode f/* = ReadWrite*/,bool bLocal8Bit = false); + KviConfig(const TQString &filename,FileMode f/* = ReadWrite*/,bool bLocal8Bit = false); KviConfig(const char *filename,FileMode f/* = ReadWrite*/,bool bLocal8Bit = false); ~KviConfig(); private: bool m_bLocal8Bit; - KviPointerHashTable * m_pDict; - QString m_szFileName; + KviPointerHashTable * m_pDict; + TQString m_szFileName; bool m_bDirty; - QString m_szStrBuffer; - QString m_szGroup; + TQString m_szStrBuffer; + TQString m_szGroup; bool m_bPreserveEmptyGroups; bool m_bReadOnly; private: @@ -79,7 +79,7 @@ public: // as modified). // void preserveEmptyGroups(bool bPreserve){ m_bPreserveEmptyGroups = bPreserve; }; - const QString & fileName(){ return m_szFileName; }; + const TQString & fileName(){ return m_szFileName; }; bool readOnly(){ return m_bReadOnly; }; void setReadOnly(bool bReadOnly){ m_bReadOnly = bReadOnly; }; bool dirty(){ return m_bDirty; }; @@ -88,65 +88,65 @@ public: // In this way you can load a system-wide read-only config file // as default configuration, alter its settings and save it to the // user local configuration directory - void setSavePath(const QString & savePath){ m_szFileName = savePath; }; - KviPointerHashTable *dict(){ return m_pDict; }; + void setSavePath(const TQString & savePath){ m_szFileName = savePath; }; + KviPointerHashTable *dict(){ return m_pDict; }; void clearDirtyFlag(){ m_bDirty = false; }; void clear(); - void clearGroup(const QString & szGroup); - void clearKey(const QString & szKey); + void clearGroup(const TQString & szGroup); + void clearKey(const TQString & szKey); unsigned int groupsCount(){ return m_pDict->count(); }; bool sync(){ return save(); }; - bool hasKey(const QString & szKey); - bool hasGroup(const QString & szGroup); - void setGroup(const QString & szGroup); + bool hasKey(const TQString & szKey); + bool hasGroup(const TQString & szGroup); + void setGroup(const TQString & szGroup); //void getContentsString(KviStr &buffer); - const QString & group(){ return m_szGroup; }; - void writeEntry(const QString & szKey,const QString & szValue); - void writeEntry(const QString & szKey,const char * szValue) - { writeEntry(szKey,QString::fromUtf8(szValue)); }; - QString readEntry(const QString & szKey,const QString & szDefault = QString::null); + const TQString & group(){ return m_szGroup; }; + void writeEntry(const TQString & szKey,const TQString & szValue); + void writeEntry(const TQString & szKey,const char * szValue) + { writeEntry(szKey,TQString::fromUtf8(szValue)); }; + TQString readEntry(const TQString & szKey,const TQString & szDefault = TQString()); // HACK for KviOptions.. (FIXME) - QString readKviStrEntry(const QString &szKey,const KviStr &szDefault) + TQString readKviStrEntry(const TQString &szKey,const KviStr &szDefault) { return readEntry(szKey,szDefault.ptr()); }; //void writeEntry(const char *szKey,KviStr &szValue); //const char * readEntry(const char *szKey,KviStr &szDefault); - void writeEntry(const QString & szKey,const KviPixmap &pixmap); - KviPixmap readPixmapEntry(const QString & szKey,const KviPixmap &pixDef); - void writeEntry(const QString & szKey,const KviMsgType &msg); - KviMsgType readMsgTypeEntry(const QString & szKey,const KviMsgType &msgDef); - void writeEntry(const QString & szKey,const QColor &clr); - QColor readColorEntry(const QString & szKey,const QColor &clr); - void writeEntry(const QString & szKey,QFont &fnt); - QFont readFontEntry(const QString & szKey,const QFont &fnt); - void writeEntry(const QString & szKey,bool bTrue); - bool readBoolEntry(const QString & szKey,bool bTrue); - QRect readRectEntry(const QString & szKey,const QRect &rct); - void writeEntry(const QString & szKey,const QRect &rct); - QStringList readStringListEntry(const QString & szKey,const QStringList &list); - void writeEntry(const QString & szKey,const QStringList &list); - KviValueList readIntListEntry(const QString & ,const KviValueList &list); - void writeEntry(const QString & szKey,const KviValueList &list); - QString readQStringEntry(const QString & szKey,const QString &szDefault = QString::null) + void writeEntry(const TQString & szKey,const KviPixmap &pixmap); + KviPixmap readPixmapEntry(const TQString & szKey,const KviPixmap &pixDef); + void writeEntry(const TQString & szKey,const KviMsgType &msg); + KviMsgType readMsgTypeEntry(const TQString & szKey,const KviMsgType &msgDef); + void writeEntry(const TQString & szKey,const TQColor &clr); + TQColor readColorEntry(const TQString & szKey,const TQColor &clr); + void writeEntry(const TQString & szKey,TQFont &fnt); + TQFont readFontEntry(const TQString & szKey,const TQFont &fnt); + void writeEntry(const TQString & szKey,bool bTrue); + bool readBoolEntry(const TQString & szKey,bool bTrue); + TQRect readRectEntry(const TQString & szKey,const TQRect &rct); + void writeEntry(const TQString & szKey,const TQRect &rct); + TQStringList readStringListEntry(const TQString & szKey,const TQStringList &list); + void writeEntry(const TQString & szKey,const TQStringList &list); + KviValueList readIntListEntry(const TQString & ,const KviValueList &list); + void writeEntry(const TQString & szKey,const KviValueList &list); + TQString readTQStringEntry(const TQString & szKey,const TQString &szDefault = TQString()) { return readEntry(szKey,szDefault); }; - //void writeEntry(const QString & szKey,const QString &szValue); + //void writeEntry(const TQString & szKey,const TQString &szValue); //void writeEntry(const char *szKey,unsigned long lValue); //unsigned long readULongEntry(const char *szKey,unsigned long lDefault); //void writeEntry(const char *szKey,long lValue); //long readLongEntry(const char *szKey,long lDefault); - void writeEntry(const QString & szKey,int iValue); - int readIntEntry(const QString & szKey,int iDefault); - void writeEntry(const QString & szKey,unsigned short int usValue); - unsigned short int readUShortEntry(const QString & szKey,unsigned short int usDefault); - void writeEntry(const QString & szKey,unsigned int iValue); - unsigned int readUIntEntry(const QString & szKey,unsigned int iDefault); - void writeEntry(const QString & szKey,char iValue); - char readCharEntry(const QString & szKey,char iDefault); - void writeEntry(const QString & szKey,unsigned char iValue); - unsigned char readUCharEntry(const QString & szKey,unsigned char iDefault); + void writeEntry(const TQString & szKey,int iValue); + int readIntEntry(const TQString & szKey,int iDefault); + void writeEntry(const TQString & szKey,unsigned short int usValue); + unsigned short int readUShortEntry(const TQString & szKey,unsigned short int usDefault); + void writeEntry(const TQString & szKey,unsigned int iValue); + unsigned int readUIntEntry(const TQString & szKey,unsigned int iDefault); + void writeEntry(const TQString & szKey,char iValue); + char readCharEntry(const TQString & szKey,char iDefault); + void writeEntry(const TQString & szKey,unsigned char iValue); + unsigned char readUCharEntry(const TQString & szKey,unsigned char iDefault); - static void getFontProperties(KviStr & buffer,QFont *fnt); - static void setFontProperties(KviStr & str,QFont *fnt); + static void getFontProperties(KviStr & buffer,TQFont *fnt); + static void setFontProperties(KviStr & str,TQFont *fnt); #ifdef COMPILE_ON_WINDOWS // On windows we need to override new and delete operators diff --git a/src/kvilib/ext/kvi_crypt.cpp b/src/kvilib/ext/kvi_crypt.cpp index 84a636aa..52a747ae 100644 --- a/src/kvilib/ext/kvi_crypt.cpp +++ b/src/kvilib/ext/kvi_crypt.cpp @@ -189,7 +189,7 @@ KviCryptEngineManager::KviCryptEngineManager() { - m_pEngineDict = new KviPointerHashTable; + m_pEngineDict = new KviPointerHashTable; m_pEngineDict->setAutoDelete(true); } @@ -200,17 +200,17 @@ void KviCryptEngineManager::registerEngine(KviCryptEngineDescription * d) { - m_pEngineDict->replace(d->szName,d); + m_pEngineDict->tqreplace(d->szName,d); } - void KviCryptEngineManager::unregisterEngine(const QString &szName) + void KviCryptEngineManager::unregisterEngine(const TQString &szName) { m_pEngineDict->remove(szName); } void KviCryptEngineManager::unregisterEngines(void * providerHandle) { - KviPointerHashTableIterator it(*m_pEngineDict); + KviPointerHashTableIterator it(*m_pEngineDict); while(it.current()) { if(it.current()->providerHandle == providerHandle) @@ -220,9 +220,9 @@ } } - KviCryptEngine * KviCryptEngineManager::allocateEngine(const QString &szName) + KviCryptEngine * KviCryptEngineManager::allocateEngine(const TQString &szName) { - KviCryptEngineDescription * d = m_pEngineDict->find(szName); + KviCryptEngineDescription * d = m_pEngineDict->tqfind(szName); if(!d)return 0; KviCryptEngine * e = d->allocFunc(); if(!e)return 0; diff --git a/src/kvilib/ext/kvi_crypt.h b/src/kvilib/ext/kvi_crypt.h index ae3bc4f0..8b36d0be 100644 --- a/src/kvilib/ext/kvi_crypt.h +++ b/src/kvilib/ext/kvi_crypt.h @@ -42,7 +42,7 @@ #include "kvi_heapobject.h" #include "kvi_pointerhashtable.h" -#include +#include #ifdef COMPILE_CRYPT_SUPPORT class KviCryptEngine; @@ -51,12 +51,13 @@ typedef void (*crypt_engine_deallocator_func)(KviCryptEngine *); #endif //COMPILE_CRYPT_SUPPORT - // we must include this declaration to make moc happy even + // we must include this declaration to make tqmoc happy even // if we're not compiling the crypt support - class KVILIB_API KviCryptEngine : public QObject, public KviHeapObject + class KVILIB_API KviCryptEngine : public TQObject, public KviHeapObject { Q_OBJECT + TQ_OBJECT friend class KviCryptEngineManager; public: KviCryptEngine(); @@ -65,7 +66,7 @@ #ifdef COMPILE_CRYPT_SUPPORT private: crypt_engine_deallocator_func m_deallocFunc; // this is accessed by KviCryptEngineManager only - QString m_szLastError; + TQString m_szLastError; int m_iMaxEncryptLen; public: void setMaxEncryptLen(int m){ m_iMaxEncryptLen = m; }; @@ -101,13 +102,13 @@ // of the last error or an empty string if there // was no error after the last init() call. // - const QString &lastError(){ return m_szLastError; }; + const TQString &lastError(){ return m_szLastError; }; protected: // // The following two should have clear meaning // void clearLastError(){ m_szLastError = ""; }; - void setLastError(const QString &err){ m_szLastError = err; }; + void setLastError(const TQString &err){ m_szLastError = err; }; #endif //COMPILE_CRYPT_SUPPORT }; @@ -123,9 +124,9 @@ KviCryptEngineDescription(){}; virtual ~KviCryptEngineDescription(){}; public: - QString szName; // engine name - QString szDescription; // details - QString szAuthor; // algorithm author + TQString szName; // engine name + TQString szDescription; // details + TQString szAuthor; // algorithm author int iFlags; // properties crypt_engine_allocator_func allocFunc; // engine allocator crypt_engine_deallocator_func deallocFunc; // deallocation function (if called from outside the origin module) @@ -139,18 +140,18 @@ KviCryptEngineManager(); virtual ~KviCryptEngineManager(); private: - KviPointerHashTable * m_pEngineDict; + KviPointerHashTable * m_pEngineDict; public: - const KviPointerHashTable * engineDict(){ return m_pEngineDict; }; + const KviPointerHashTable * engineDict(){ return m_pEngineDict; }; void registerEngine(KviCryptEngineDescription * d); - void unregisterEngine(const QString &szName); + void unregisterEngine(const TQString &szName); void unregisterEngines(void * providerHandle); // // Allocates a crypt engine // Please note that the engine may be deleted from outside // so you'd better connect the "destroyed" signal // - KviCryptEngine * allocateEngine(const QString &szName); + KviCryptEngine * allocateEngine(const TQString &szName); void deallocateEngine(KviCryptEngine * e); }; diff --git a/src/kvilib/ext/kvi_databuffer.cpp b/src/kvilib/ext/kvi_databuffer.cpp index 7cad39c4..b0ca288c 100644 --- a/src/kvilib/ext/kvi_databuffer.cpp +++ b/src/kvilib/ext/kvi_databuffer.cpp @@ -56,7 +56,7 @@ KviDataBuffer::~KviDataBuffer() } } -int KviDataBuffer::find(const unsigned char * block,int uSize) +int KviDataBuffer::tqfind(const unsigned char * block,int uSize) { if(uSize < 1)return -1; if(uSize > m_uSize)return -1; @@ -85,7 +85,7 @@ int KviDataBuffer::find(const unsigned char * block,int uSize) return -1; } -int KviDataBuffer::find(unsigned char c) +int KviDataBuffer::tqfind(unsigned char c) { const unsigned char * p = m_pData; const unsigned char * e = p + m_uSize; diff --git a/src/kvilib/ext/kvi_databuffer.h b/src/kvilib/ext/kvi_databuffer.h index 62e09b06..9fa7487b 100644 --- a/src/kvilib/ext/kvi_databuffer.h +++ b/src/kvilib/ext/kvi_databuffer.h @@ -49,8 +49,8 @@ public: void addSize(int uSize){ resize(m_uSize + uSize); }; void append(const unsigned char * data,int uSize); void append(const KviDataBuffer &b){ append(b.data(),b.size()); }; - int find(unsigned char c); - int find(const unsigned char * block,int uSize); + int tqfind(unsigned char c); + int tqfind(const unsigned char * block,int uSize); }; #endif //_KVI_DATABUFFER_H_ diff --git a/src/kvilib/ext/kvi_dcophelper.cpp b/src/kvilib/ext/kvi_dcophelper.cpp index 83f34f4e..7528c5a7 100644 --- a/src/kvilib/ext/kvi_dcophelper.cpp +++ b/src/kvilib/ext/kvi_dcophelper.cpp @@ -30,15 +30,15 @@ #include "dcopclient.h" -#include -#include +#include +#include // must be included this way, since kvilib is built // before kvirc and symlinks to headers aren't set yet #include "../../kvirc/kernel/kvi_app.h" #include "kvi_thread.h" -KviDCOPHelper::KviDCOPHelper(bool bStartApp, const KviQCString &szAppId) +KviDCOPHelper::KviDCOPHelper(bool bStartApp, const KviTQCString &szAppId) { m_szAppId = szAppId; } @@ -47,7 +47,7 @@ KviDCOPHelper::~KviDCOPHelper() { } -bool KviDCOPHelper::ensureAppRunning(const QString &szApp) +bool KviDCOPHelper::ensureAppRunning(const TQString &szApp) { if (findRunningApp(m_szAppId)) return true; @@ -59,79 +59,79 @@ bool KviDCOPHelper::ensureAppRunning(const QString &szApp) } -bool KviDCOPHelper::voidRetVoidDCOPCall(const KviQCString &szObj,const KviQCString &szFunc) +bool KviDCOPHelper::voidRetVoidDCOPCall(const KviTQCString &szObj,const KviTQCString &szFunc) { if(!ensureAppRunning(m_szAppId))return false; - QByteArray data; + TQByteArray data; return g_pApp->dcopClient()->send(m_szAppId,szObj,szFunc,data); } -bool KviDCOPHelper::voidRetBoolDCOPCall(const KviQCString &szObj,const KviQCString &szFunc,bool bVal) +bool KviDCOPHelper::voidRetBoolDCOPCall(const KviTQCString &szObj,const KviTQCString &szFunc,bool bVal) { if(!ensureAppRunning(m_szAppId))return false; - QByteArray data; - QDataStream arg(data, IO_WriteOnly); + TQByteArray data; + TQDataStream arg(data, IO_WriteOnly); arg << bVal; return g_pApp->dcopClient()->send(m_szAppId,szObj,szFunc,data); } -bool KviDCOPHelper::voidRetIntDCOPCall(const KviQCString &szObj,const KviQCString &szFunc,int iVal) +bool KviDCOPHelper::voidRetIntDCOPCall(const KviTQCString &szObj,const KviTQCString &szFunc,int iVal) { if(!ensureAppRunning(m_szAppId))return false; - QByteArray data; - QDataStream arg(data, IO_WriteOnly); + TQByteArray data; + TQDataStream arg(data, IO_WriteOnly); arg << iVal; return g_pApp->dcopClient()->send(m_szAppId,szObj,szFunc,data); } -bool KviDCOPHelper::voidRetIntBoolDCOPCall(const KviQCString &szObj,const KviQCString &szFunc,int iVal, bool bVal) +bool KviDCOPHelper::voidRetIntBoolDCOPCall(const KviTQCString &szObj,const KviTQCString &szFunc,int iVal, bool bVal) { if(!ensureAppRunning(m_szAppId))return false; - QByteArray data; - QDataStream arg(data, IO_WriteOnly); + TQByteArray data; + TQDataStream arg(data, IO_WriteOnly); arg << iVal; arg << bVal; return g_pApp->dcopClient()->send(m_szAppId,szObj,szFunc,data); } -bool KviDCOPHelper::voidRetIntIntIntDCOPCall(const KviQCString &szObj,const KviQCString &szFunc,int iVal1, int iVal2, int iVal3) +bool KviDCOPHelper::voidRetIntIntIntDCOPCall(const KviTQCString &szObj,const KviTQCString &szFunc,int iVal1, int iVal2, int iVal3) { if(!ensureAppRunning(m_szAppId))return false; - QByteArray data; - QDataStream arg(data, IO_WriteOnly); + TQByteArray data; + TQDataStream arg(data, IO_WriteOnly); arg << iVal1; arg << iVal2; arg << iVal3; return g_pApp->dcopClient()->send(m_szAppId,szObj,szFunc,data); } -bool KviDCOPHelper::voidRetFloatDCOPCall(const KviQCString &szObj,const KviQCString &szFunc,float fVal) +bool KviDCOPHelper::voidRetFloatDCOPCall(const KviTQCString &szObj,const KviTQCString &szFunc,float fVal) { if(!ensureAppRunning(m_szAppId))return false; - QByteArray data; - QDataStream arg(data, IO_WriteOnly); + TQByteArray data; + TQDataStream arg(data, IO_WriteOnly); arg << fVal; return g_pApp->dcopClient()->send(m_szAppId,szObj,szFunc,data); } -bool KviDCOPHelper::voidRetStringDCOPCall(const KviQCString &szObj,const KviQCString &szFunc,const QString &szVal) +bool KviDCOPHelper::voidRetStringDCOPCall(const KviTQCString &szObj,const KviTQCString &szFunc,const TQString &szVal) { if(!ensureAppRunning(m_szAppId))return false; - QByteArray data; - QDataStream arg(data, IO_WriteOnly); + TQByteArray data; + TQDataStream arg(data, IO_WriteOnly); arg << szVal; return g_pApp->dcopClient()->send(m_szAppId,szObj,szFunc,data); } -bool KviDCOPHelper::stringRetVoidDCOPCall(const KviQCString &szObj,const KviQCString &szFunc,QString &szRet) +bool KviDCOPHelper::stringRetVoidDCOPCall(const KviTQCString &szObj,const KviTQCString &szFunc,TQString &szRet) { if(!ensureAppRunning(m_szAppId))return false; - QByteArray data, replyData; - KviQCString replyType; + TQByteArray data, replyData; + KviTQCString replyType; if(!g_pApp->dcopClient()->call(m_szAppId,szObj,szFunc,data,replyType,replyData)) return false; - QDataStream reply( replyData, IO_ReadOnly ); - if(replyType == "QString") + TQDataStream reply( replyData, IO_ReadOnly ); + if(replyType == TQSTRING_OBJECT_NAME_STRING) { reply >> szRet; return true; @@ -139,20 +139,20 @@ bool KviDCOPHelper::stringRetVoidDCOPCall(const KviQCString &szObj,const KviQCSt return false; } -bool KviDCOPHelper::stringRetIntDCOPCall(const KviQCString &szObj,const KviQCString &szFunc,QString &szRet,int iVal) +bool KviDCOPHelper::stringRetIntDCOPCall(const KviTQCString &szObj,const KviTQCString &szFunc,TQString &szRet,int iVal) { if(!ensureAppRunning(m_szAppId))return false; - QByteArray data, replyData; - KviQCString replyType; + TQByteArray data, replyData; + KviTQCString replyType; - QDataStream arg(data, IO_WriteOnly); + TQDataStream arg(data, IO_WriteOnly); arg << iVal; if(!g_pApp->dcopClient()->call(m_szAppId,szObj,szFunc,data,replyType,replyData)) return false; - QDataStream reply( replyData, IO_ReadOnly ); - if(replyType == "QString") + TQDataStream reply( replyData, IO_ReadOnly ); + if(replyType == TQSTRING_OBJECT_NAME_STRING) { reply >> szRet; return true; @@ -160,14 +160,14 @@ bool KviDCOPHelper::stringRetIntDCOPCall(const KviQCString &szObj,const KviQCStr return false; } -bool KviDCOPHelper::intRetVoidDCOPCall(const KviQCString &szObj,const KviQCString &szFunc,int &ret) +bool KviDCOPHelper::intRetVoidDCOPCall(const KviTQCString &szObj,const KviTQCString &szFunc,int &ret) { if(!ensureAppRunning(m_szAppId))return false; - QByteArray data, replyData; - KviQCString replyType; + TQByteArray data, replyData; + KviTQCString replyType; if(!g_pApp->dcopClient()->call(m_szAppId,szObj,szFunc,data,replyType,replyData)) return false; - QDataStream reply( replyData, IO_ReadOnly ); + TQDataStream reply( replyData, IO_ReadOnly ); if(replyType == "int") { reply >> ret; @@ -176,19 +176,19 @@ bool KviDCOPHelper::intRetVoidDCOPCall(const KviQCString &szObj,const KviQCStrin return false; } -bool KviDCOPHelper::intRetIntDCOPCall(const KviQCString &szObj,const KviQCString &szFunc,int &ret, int iVal) +bool KviDCOPHelper::intRetIntDCOPCall(const KviTQCString &szObj,const KviTQCString &szFunc,int &ret, int iVal) { if(!ensureAppRunning(m_szAppId))return false; - QByteArray data, replyData; - KviQCString replyType; + TQByteArray data, replyData; + KviTQCString replyType; - QDataStream arg(data, IO_WriteOnly); + TQDataStream arg(data, IO_WriteOnly); arg << iVal; if(!g_pApp->dcopClient()->call(m_szAppId,szObj,szFunc,data,replyType,replyData)) return false; - QDataStream reply( replyData, IO_ReadOnly ); + TQDataStream reply( replyData, IO_ReadOnly ); if(replyType == "int") { reply >> ret; @@ -197,14 +197,14 @@ bool KviDCOPHelper::intRetIntDCOPCall(const KviQCString &szObj,const KviQCString return false; } -bool KviDCOPHelper::boolRetVoidDCOPCall(const KviQCString &szObj,const KviQCString &szFunc,bool &ret) +bool KviDCOPHelper::boolRetVoidDCOPCall(const KviTQCString &szObj,const KviTQCString &szFunc,bool &ret) { if(!ensureAppRunning(m_szAppId))return false; - QByteArray data, replyData; - KviQCString replyType; + TQByteArray data, replyData; + KviTQCString replyType; if(!g_pApp->dcopClient()->call(m_szAppId,szObj,szFunc,data,replyType,replyData)) return false; - QDataStream reply( replyData, IO_ReadOnly ); + TQDataStream reply( replyData, IO_ReadOnly ); if(replyType == "bool") { reply >> ret; @@ -213,14 +213,14 @@ bool KviDCOPHelper::boolRetVoidDCOPCall(const KviQCString &szObj,const KviQCStri return false; } -bool KviDCOPHelper::qvalueListIntRetIntDCOPCall(const KviQCString &szObj,const KviQCString &szFunc,KviValueList &ret, int iVal) +bool KviDCOPHelper::qvalueListIntRetIntDCOPCall(const KviTQCString &szObj,const KviTQCString &szFunc,KviValueList &ret, int iVal) { if(!ensureAppRunning(m_szAppId)) return false; - QByteArray data, replyData; - KviQCString replyType; - QDataStream arg(data, IO_WriteOnly); + TQByteArray data, replyData; + KviTQCString replyType; + TQDataStream arg(data, IO_WriteOnly); arg << iVal; @@ -228,19 +228,19 @@ bool KviDCOPHelper::qvalueListIntRetIntDCOPCall(const KviQCString &szObj,const K if(!g_pApp->dcopClient()->call(m_szAppId,szObj,szFunc,data,replyType,replyData)) return false; - if(replyType != "QValueList") + if(replyType != "TQValueList") return false; - QDataStream replyStream(replyData, IO_ReadOnly); + TQDataStream replyStream(replyData, IO_ReadOnly); replyStream >> ret; return true; } -bool KviDCOPHelper::qcstringListRetVoidDCOPCall(const KviQCString &szObj,const KviQCString &szFunc,KviQCStringList &ret) +bool KviDCOPHelper::qcstringListRetVoidDCOPCall(const KviTQCString &szObj,const KviTQCString &szFunc,KviQCStringList &ret) { - QByteArray data, replyData; - KviQCString replyType; + TQByteArray data, replyData; + KviTQCString replyType; if (!g_pApp->dcopClient()->call(m_szAppId,szObj,szFunc,data,replyType,replyData)) return false; @@ -248,18 +248,18 @@ bool KviDCOPHelper::qcstringListRetVoidDCOPCall(const KviQCString &szObj,const K if (replyType != "KviQCStringList") return false; - QDataStream replyStream(replyData, IO_ReadOnly); + TQDataStream replyStream(replyData, IO_ReadOnly); replyStream >> ret; return true; } -bool KviDCOPHelper::qcstringListRetIntDCOPCall(const KviQCString &szObj,const KviQCString &szFunc,KviQCStringList &ret, int iVal) +bool KviDCOPHelper::qcstringListRetIntDCOPCall(const KviTQCString &szObj,const KviTQCString &szFunc,KviQCStringList &ret, int iVal) { - QByteArray data, replyData; - KviQCString replyType; + TQByteArray data, replyData; + KviTQCString replyType; - QDataStream arg(data, IO_WriteOnly); + TQDataStream arg(data, IO_WriteOnly); arg << iVal; if (!g_pApp->dcopClient()->call(m_szAppId,szObj,szFunc,data,replyType,replyData)) @@ -268,17 +268,17 @@ bool KviDCOPHelper::qcstringListRetIntDCOPCall(const KviQCString &szObj,const Kv if (replyType != "KviQCStringList") return false; - QDataStream replyStream(replyData, IO_ReadOnly); + TQDataStream replyStream(replyData, IO_ReadOnly); replyStream >> ret; return true; } -bool KviDCOPHelper::findRunningApp(const QString &szApp) +bool KviDCOPHelper::findRunningApp(const TQString &szApp) { - QValueList allApps = g_pApp->dcopClient() ->registeredApplications(); - QValueList::iterator iterator; - KviQCString sz = szApp.local8Bit(); + TQValueList allApps = g_pApp->dcopClient() ->registeredApplications(); + TQValueList::iterator iterator; + KviTQCString sz = szApp.local8Bit(); for (iterator = allApps.begin();iterator != allApps.end();iterator++) { if(*iterator == sz) @@ -287,7 +287,7 @@ bool KviDCOPHelper::findRunningApp(const QString &szApp) return false; } -int KviDCOPHelper::detectApp(const QString &szApp,bool bStart,int iScoreWhenFound,int iScoreWhenStarted) +int KviDCOPHelper::detectApp(const TQString &szApp,bool bStart,int iScoreWhenFound,int iScoreWhenStarted) { // dcop available if(!g_pApp->dcopClient()) @@ -309,30 +309,30 @@ int KviDCOPHelper::detectApp(const QString &szApp,bool bStart,int iScoreWhenFoun } -bool KviDCOPHelper::startApp(const QString &szApp,int iWaitMSecs) +bool KviDCOPHelper::startApp(const TQString &szApp,int iWaitMSecs) { // we could use KApplication::startServiceByDesktopName here // but we want to be able to wait a defined amount of time - QStringList tmp; - QByteArray data, replyData; - KviQCString replyType; - QDataStream arg(data, IO_WriteOnly); + TQStringList tmp; + TQByteArray data, replyData; + KviTQCString replyType; + TQDataStream arg(data, IO_WriteOnly); arg << szApp << tmp; if(!g_pApp->dcopClient()->call( "klauncher", "klauncher", - "start_service_by_desktop_name(QString,QStringList)", + "start_service_by_desktop_name(TQString,TQStringList)", data, replyType, replyData)) { return false; } else { - QDataStream reply(replyData, IO_ReadOnly); + TQDataStream reply(replyData, IO_ReadOnly); if(replyType != "serviceResult")return false; int result; - KviQCString dcopName; - QString error; + KviTQCString dcopName; + TQString error; reply >> result >> dcopName >> error; if(result != 0)return false; } diff --git a/src/kvilib/ext/kvi_dcophelper.h b/src/kvilib/ext/kvi_dcophelper.h index de605e37..431394d3 100644 --- a/src/kvilib/ext/kvi_dcophelper.h +++ b/src/kvilib/ext/kvi_dcophelper.h @@ -32,7 +32,7 @@ #ifdef COMPILE_KDE_SUPPORT -typedef KviValueList KviQCStringList; +typedef KviValueList KviQCStringList; class KVILIB_API KviDCOPHelper { @@ -42,39 +42,39 @@ public: // Constructs a DCOP helper object. // bStartApp: tries to start application when a dcop call is about to be made and the app is not already running // szAppID: application name as seen by DCOP - KviDCOPHelper(bool bStartApp, const KviQCString &szAppId); + KviDCOPHelper(bool bStartApp, const KviTQCString &szAppId); ~KviDCOPHelper(); protected: - KviQCString m_szAppId; + KviTQCString m_szAppId; bool m_bStartApp; protected: - bool ensureAppRunning(const QString &szApp); - bool findRunningApp(const QString &szApp); - bool startApp(const QString &szApp,int iWaitMSecs = 0); - int detectApp(const QString &szApp,bool bStart,int iScoreWhenFound,int iScoreWhenStarted); + bool ensureAppRunning(const TQString &szApp); + bool findRunningApp(const TQString &szApp); + bool startApp(const TQString &szApp,int iWaitMSecs = 0); + int detectApp(const TQString &szApp,bool bStart,int iScoreWhenFound,int iScoreWhenStarted); // naming convention: [return value] Ret [argument type(s)] DCOPCall - bool voidRetVoidDCOPCall(const KviQCString &szObj,const KviQCString &szFunc); - bool voidRetIntDCOPCall(const KviQCString &szObj,const KviQCString &szFunc,int iVal); - bool voidRetIntBoolDCOPCall(const KviQCString &szObj,const KviQCString &szFunc,int iVal, bool bVal); - bool voidRetIntIntIntDCOPCall(const KviQCString &szObj,const KviQCString &szFunc,int iVal1, int iVal2, int iVal3); - bool voidRetBoolDCOPCall(const KviQCString &szObj,const KviQCString &szFunc,bool bVal); - bool voidRetStringDCOPCall(const KviQCString &szObj,const KviQCString &szFunc,const QString &szVal); - bool voidRetFloatDCOPCall(const KviQCString &szObj,const KviQCString &szFunc,float fVal); - bool stringRetVoidDCOPCall(const KviQCString &szObj,const KviQCString &szFunc,QString &szRet); - bool stringRetIntDCOPCall(const KviQCString &szObj,const KviQCString &szFunc,QString &szRet,int iVal); - bool intRetVoidDCOPCall(const KviQCString &szObj,const KviQCString &szFunc,int &ret); - bool intRetIntDCOPCall(const KviQCString &szObj,const KviQCString &szFunc,int &ret, int iVal); - bool boolRetVoidDCOPCall(const KviQCString &szObj,const KviQCString &szFunc,bool &ret); + bool voidRetVoidDCOPCall(const KviTQCString &szObj,const KviTQCString &szFunc); + bool voidRetIntDCOPCall(const KviTQCString &szObj,const KviTQCString &szFunc,int iVal); + bool voidRetIntBoolDCOPCall(const KviTQCString &szObj,const KviTQCString &szFunc,int iVal, bool bVal); + bool voidRetIntIntIntDCOPCall(const KviTQCString &szObj,const KviTQCString &szFunc,int iVal1, int iVal2, int iVal3); + bool voidRetBoolDCOPCall(const KviTQCString &szObj,const KviTQCString &szFunc,bool bVal); + bool voidRetStringDCOPCall(const KviTQCString &szObj,const KviTQCString &szFunc,const TQString &szVal); + bool voidRetFloatDCOPCall(const KviTQCString &szObj,const KviTQCString &szFunc,float fVal); + bool stringRetVoidDCOPCall(const KviTQCString &szObj,const KviTQCString &szFunc,TQString &szRet); + bool stringRetIntDCOPCall(const KviTQCString &szObj,const KviTQCString &szFunc,TQString &szRet,int iVal); + bool intRetVoidDCOPCall(const KviTQCString &szObj,const KviTQCString &szFunc,int &ret); + bool intRetIntDCOPCall(const KviTQCString &szObj,const KviTQCString &szFunc,int &ret, int iVal); + bool boolRetVoidDCOPCall(const KviTQCString &szObj,const KviTQCString &szFunc,bool &ret); - bool qvalueListIntRetIntDCOPCall(const KviQCString &szObj,const KviQCString &szFunc,KviValueList &ret, int iVal); - bool qcstringListRetIntDCOPCall(const KviQCString &szObj,const KviQCString &szFunc,KviQCStringList &ret, int iVal); - bool qcstringListRetVoidDCOPCall(const KviQCString &szObj,const KviQCString &szFunc,KviQCStringList &ret); + bool qvalueListIntRetIntDCOPCall(const KviTQCString &szObj,const KviTQCString &szFunc,KviValueList &ret, int iVal); + bool qcstringListRetIntDCOPCall(const KviTQCString &szObj,const KviTQCString &szFunc,KviQCStringList &ret, int iVal); + bool qcstringListRetVoidDCOPCall(const KviTQCString &szObj,const KviTQCString &szFunc,KviQCStringList &ret); }; #endif //COMPILE_KDE_SUPPORT diff --git a/src/kvilib/ext/kvi_doublebuffer.cpp b/src/kvilib/ext/kvi_doublebuffer.cpp index 5997e934..5f48a0cb 100644 --- a/src/kvilib/ext/kvi_doublebuffer.cpp +++ b/src/kvilib/ext/kvi_doublebuffer.cpp @@ -26,7 +26,7 @@ #include "kvi_doublebuffer.h" -static QPixmap * g_pMemoryPixmap = 0; +static TQPixmap * g_pMemoryPixmap = 0; static unsigned int g_uMaxRequestedWidth = 0; static unsigned int g_uMaxRequestedHeight = 0; @@ -39,8 +39,8 @@ KviDoubleBuffer::KviDoubleBuffer(unsigned int uWidth,unsigned int uHeight) unsigned int uMaxW = uWidth > g_pMemoryPixmap->width() ? uWidth : g_pMemoryPixmap->width(); unsigned int uMaxH = uHeight > g_pMemoryPixmap->height() ? uHeight : g_pMemoryPixmap->height(); #ifdef COMPILE_USE_QT4 - // QT4SUX: QPixmap::resize() is missing (it's a widely used function and assigning a new QPixmap() seems to be slower and not intuitive) - *g_pMemoryPixmap = QPixmap(uMaxW,uMaxH); + // QT4SUX: TQPixmap::resize() is missing (it's a widely used function and assigning a new TQPixmap() seems to be slower and not intuitive) + *g_pMemoryPixmap = TQPixmap(uMaxW,uMaxH); #else g_pMemoryPixmap->resize(uMaxW,uMaxH); #endif @@ -55,7 +55,7 @@ KviDoubleBuffer::~KviDoubleBuffer() // We never shrink here (it's time consuming) } -QPixmap * KviDoubleBuffer::pixmap() +TQPixmap * KviDoubleBuffer::pixmap() { return g_pMemoryPixmap; } @@ -63,7 +63,7 @@ QPixmap * KviDoubleBuffer::pixmap() void KviDoubleBuffer::init() { if(g_pMemoryPixmap)return; - g_pMemoryPixmap = new QPixmap(); + g_pMemoryPixmap = new TQPixmap(); } void KviDoubleBuffer::done() @@ -79,8 +79,8 @@ void KviDoubleBuffer::heartbeat() { // do shrink :) #ifdef COMPILE_USE_QT4 - // QT4SUX: QPixmap::resize() is missing (it's a widely used function and assigning a new QPixmap() seems to be slower and not intuitive) - *g_pMemoryPixmap = QPixmap(g_uMaxRequestedWidth,g_uMaxRequestedHeight); + // QT4SUX: TQPixmap::resize() is missing (it's a widely used function and assigning a new TQPixmap() seems to be slower and not intuitive) + *g_pMemoryPixmap = TQPixmap(g_uMaxRequestedWidth,g_uMaxRequestedHeight); #else g_pMemoryPixmap->resize(g_uMaxRequestedWidth,g_uMaxRequestedHeight); #endif diff --git a/src/kvilib/ext/kvi_doublebuffer.h b/src/kvilib/ext/kvi_doublebuffer.h index 103759a1..0d78fb4c 100644 --- a/src/kvilib/ext/kvi_doublebuffer.h +++ b/src/kvilib/ext/kvi_doublebuffer.h @@ -26,7 +26,7 @@ #include "kvi_settings.h" -#include +#include // // This class is basically a huge shared memory pixmap meant to be used in double-buffer @@ -48,7 +48,7 @@ public: public: // This returns a pointer to the memory buffer. The buffer is at least // of the size declared in the constructor. - QPixmap * pixmap(); + TQPixmap * pixmap(); // The stuff below is internal (used only by KviApp) diff --git a/src/kvilib/ext/kvi_draganddrop.h b/src/kvilib/ext/kvi_draganddrop.h index c8bd9f3e..0ad6e9a2 100644 --- a/src/kvilib/ext/kvi_draganddrop.h +++ b/src/kvilib/ext/kvi_draganddrop.h @@ -29,17 +29,17 @@ #ifdef COMPILE_USE_QT4 - #include + #include #define KviDragObject Q3DragObject #define KviUriDrag Q3UriDrag #define KviTextDrag Q3TextDrag #define KviImageDrag Q3ImageDrag #else - #include - #define KviDragObject QDragObject - #define KviUriDrag QUriDrag - #define KviTextDrag QTextDrag - #define KviImageDrag QImageDrag + #include + #define KviDragObject TQDragObject + #define KviUriDrag TQUriDrag + #define KviTextDrag TQTextDrag + #define KviImageDrag TQImageDrag #endif #endif //!_KVI_DRAGANDDROP_H_ diff --git a/src/kvilib/ext/kvi_garbage.cpp b/src/kvilib/ext/kvi_garbage.cpp index 0e2e8881..10aacd26 100644 --- a/src/kvilib/ext/kvi_garbage.cpp +++ b/src/kvilib/ext/kvi_garbage.cpp @@ -25,10 +25,10 @@ #include "kvi_garbage.h" -#include +#include KviGarbageCollector::KviGarbageCollector() -: QObject(0) +: TQObject(0) { m_pGarbageList = 0; m_pCleanupTimer = 0; @@ -41,17 +41,17 @@ KviGarbageCollector::~KviGarbageCollector() cleanup(); } -void KviGarbageCollector::collect(QObject * g) +void KviGarbageCollector::collect(TQObject * g) { if(!m_pGarbageList) { - m_pGarbageList = new KviPointerList; + m_pGarbageList = new KviPointerList; m_pGarbageList->setAutoDelete(true); } //debug("COLLECTING GARBAGE %s",g->className()); m_pGarbageList->append(g); // debug("Registering garbage object %d (%s:%s)",g,g->className(),g->name()); - connect(g,SIGNAL(destroyed()),this,SLOT(garbageSuicide())); + connect(g,TQT_SIGNAL(destroyed()),this,TQT_SLOT(garbageSuicide())); triggerCleanup(0); } @@ -62,13 +62,13 @@ void KviGarbageCollector::garbageSuicide() debug("Ops... garbage suicide while no garbage list"); return; } - int idx = m_pGarbageList->findRef(sender()); + int idx = m_pGarbageList->tqfindRef(TQT_TQOBJECT(const_cast(sender()))); if(idx == -1) { debug("Ops... unregistered garbage suicide"); return; } - m_pGarbageList->removeRef(sender()); + m_pGarbageList->removeRef(TQT_TQOBJECT(const_cast(sender()))); if(m_pGarbageList->isEmpty()) { cleanup(); @@ -82,8 +82,8 @@ void KviGarbageCollector::triggerCleanup(int iTimeout) { m_pCleanupTimer->stop(); } else { - m_pCleanupTimer = new QTimer(this); - connect(m_pCleanupTimer,SIGNAL(timeout()),this,SLOT(cleanup())); + m_pCleanupTimer = new TQTimer(this); + connect(m_pCleanupTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(cleanup())); } m_pCleanupTimer->start(iTimeout); } @@ -94,16 +94,16 @@ void KviGarbageCollector::cleanup() if(m_pGarbageList) { //debug("SOME GARBAGE TO DELETE"); - KviPointerList dying; + KviPointerList dying; dying.setAutoDelete(false); - for(QObject * o = m_pGarbageList->first();o;o = m_pGarbageList->next()) + for(TQObject * o = m_pGarbageList->first();o;o = m_pGarbageList->next()) { //debug("CHECKING GARBAGE CLASS %s",o->className()); bool bDeleteIt = m_bForceCleanupNow; if(!bDeleteIt) { //debug("CLEANUP NOT FORCED"); - QVariant v = o->property("blockingDelete"); + TQVariant v = o->property("blockingDelete"); if(v.isValid()) { //debug("HAS A VALID VARIANT!"); @@ -115,10 +115,10 @@ void KviGarbageCollector::cleanup() if(bDeleteIt)dying.append(o); } - for(QObject * o2 = dying.first();o2;o2 = dying.next()) + for(TQObject * o2 = dying.first();o2;o2 = dying.next()) { //debug("KILLING GARBAGE CLASS %s",o2->className()); - disconnect(o2,SIGNAL(destroyed()),this,SLOT(garbageSuicide())); + disconnect(o2,TQT_SIGNAL(destroyed()),this,TQT_SLOT(garbageSuicide())); m_pGarbageList->removeRef(o2); } diff --git a/src/kvilib/ext/kvi_garbage.h b/src/kvilib/ext/kvi_garbage.h index 6bb75641..8c8e71e4 100644 --- a/src/kvilib/ext/kvi_garbage.h +++ b/src/kvilib/ext/kvi_garbage.h @@ -24,23 +24,24 @@ #include "kvi_settings.h" -#include +#include #include "kvi_pointerlist.h" -#include +#include -class KVILIB_API KviGarbageCollector : public QObject +class KVILIB_API KviGarbageCollector : public TQObject { Q_OBJECT + TQ_OBJECT public: KviGarbageCollector(); ~KviGarbageCollector(); protected: - KviPointerList * m_pGarbageList; - QTimer * m_pCleanupTimer; + KviPointerList * m_pGarbageList; + TQTimer * m_pCleanupTimer; bool m_bForceCleanupNow; public: - void collect(QObject * g); + void collect(TQObject * g); protected: void triggerCleanup(int iTimeout); protected slots: diff --git a/src/kvilib/ext/kvi_imagelib.cpp b/src/kvilib/ext/kvi_imagelib.cpp index 10835b25..90b21af6 100644 --- a/src/kvilib/ext/kvi_imagelib.cpp +++ b/src/kvilib/ext/kvi_imagelib.cpp @@ -24,31 +24,31 @@ #define __KVILIB__ -#include +#include #include "kvi_imagelib.h" #include "kvi_fileutils.h" #include "kvi_locale.h" #include "kvi_memmove.h" -#include +#include -//KviImageLibrary::KviImageLibrary(const QPixmap &pixmap,int imageWidth,int imageHeight) +//KviImageLibrary::KviImageLibrary(const TQPixmap &pixmap,int imageWidth,int imageHeight) //{ // if(pixmap.isNull())m_pLibrary=0; -// else m_pLibrary=new QPixmap(pixmap); +// else m_pLibrary=new TQPixmap(pixmap); // setImageSize(imageWidth,imageHeight); //} -KviImageLibrary::KviImageLibrary(const QString &path,int imageWidth,int imageHeight) +KviImageLibrary::KviImageLibrary(const TQString &path,int imageWidth,int imageHeight) { m_pLibrary=0; loadLibrary(path); setImageSize(imageWidth,imageHeight); } -KviImageLibrary::KviImageLibrary(const QString &path1,const QString &path2,int imageWidth,int imageHeight) +KviImageLibrary::KviImageLibrary(const TQString &path1,const TQString &path2,int imageWidth,int imageHeight) { m_pLibrary=0; if(KviFileUtils::fileExists(path1)) @@ -78,15 +78,15 @@ bool KviImageLibrary::setImageSize(int imageWidth,int imageHeight) return true; } -bool KviImageLibrary::loadLibrary(const QString &path) +bool KviImageLibrary::loadLibrary(const TQString &path) { if(m_pLibrary)delete m_pLibrary; - m_pLibrary=new QImage(path); + m_pLibrary=new TQImage(path); if(m_pLibrary->isNull()) { delete m_pLibrary; m_pLibrary=0; - debug("WARNING : Can not load image library %s",KviQString::toUtf8(path).data()); + debug("WARNING : Can not load image library %s",KviTQString::toUtf8(path).data()); } return (m_pLibrary != 0); } @@ -99,11 +99,11 @@ int KviImageLibrary::imageCount() return ( nRows * (m_pLibrary->height()/m_iHeight)); } -QPixmap KviImageLibrary::getImage(int zeroBasedIndex) +TQPixmap KviImageLibrary::getImage(int zeroBasedIndex) { if((zeroBasedIndex >= imageCount())||(zeroBasedIndex < 0)||(m_pLibrary->depth() < 8)) { - QPixmap image(32,32); + TQPixmap image(32,32); image.fill(); //White fill return image; } @@ -114,25 +114,25 @@ QPixmap KviImageLibrary::getImage(int zeroBasedIndex) int yOffset=(zeroBasedIndex / imPerRow) * m_iHeight; #ifdef COMPILE_USE_QT4 - QImage image(m_iWidth,m_iHeight,m_pLibrary->format()); + TQImage image(m_iWidth,m_iHeight,m_pLibrary->format()); #else - QImage image(m_iWidth,m_iHeight,m_pLibrary->depth()); + TQImage image(m_iWidth,m_iHeight,m_pLibrary->depth()); #endif int d = image.depth() / 8; #ifndef COMPILE_USE_QT4 - if(d == 4)image.setAlphaBuffer(true); // Qt 4.x should manage it automagically + if(d == 4)image.setAlphaBuffer(true); // TQt 4.x should manage it automagically #endif //Copy the image data - //bitBlt(&image,0,0,m_pLibrary,xOffset,yOffset,m_iWidth,m_iHeight,Qt::CopyROP,false); + //bitBlt(&image,0,0,m_pLibrary,xOffset,yOffset,m_iWidth,m_iHeight,TQt::CopyROP,false); for(int i=0;iscanLine(i + yOffset) + (xOffset * d),m_iWidth * d); #ifdef COMPILE_USE_QT4 - QPixmap p = QPixmap::fromImage(image); + TQPixmap p = TQPixmap::fromImage(image); #else - QPixmap p(image); + TQPixmap p(image); #endif return p; } diff --git a/src/kvilib/ext/kvi_imagelib.h b/src/kvilib/ext/kvi_imagelib.h index d78c8d19..1bbccb1b 100644 --- a/src/kvilib/ext/kvi_imagelib.h +++ b/src/kvilib/ext/kvi_imagelib.h @@ -25,7 +25,7 @@ // // A class to manage multiple image libraries. -// The library is in fact a big image that contains +// The library is in fact a big image that tqcontains // several rows of other smaller images of the same size. // The images inside the 'library' are indexed in the following way: // @@ -47,26 +47,26 @@ #include "kvi_settings.h" -#include +#include class KVILIB_API KviImageLibrary { public: // Consruction & Destruction -// KviImageLibrary(const QPixmap &pixmap,int imageWidth,int imageHeight); - KviImageLibrary(const QString &path,int imageWidth,int imageHeight); - KviImageLibrary(const QString &path1,const QString &path2,int imageWidth,int imageHeight); +// KviImageLibrary(const TQPixmap &pixmap,int imageWidth,int imageHeight); + KviImageLibrary(const TQString &path,int imageWidth,int imageHeight); + KviImageLibrary(const TQString &path1,const TQString &path2,int imageWidth,int imageHeight); ~KviImageLibrary(); public: // Fields - QImage *m_pLibrary; + TQImage *m_pLibrary; int m_iWidth; int m_iHeight; public: // Methods - bool loadLibrary(const QString &path); + bool loadLibrary(const TQString &path); void unloadLibrary(); int imageCount(); bool libraryLoaded(){ return (m_pLibrary != 0); }; - QImage *getLibrary(){ return m_pLibrary; }; - QPixmap getImage(int zeroBasedIndex); + TQImage *getLibrary(){ return m_pLibrary; }; + TQPixmap getImage(int zeroBasedIndex); bool setImageSize(int imageWidth,int imageHeight); }; diff --git a/src/kvilib/ext/kvi_mediatype.cpp b/src/kvilib/ext/kvi_mediatype.cpp index 87c7926d..36cc6dfc 100644 --- a/src/kvilib/ext/kvi_mediatype.cpp +++ b/src/kvilib/ext/kvi_mediatype.cpp @@ -36,8 +36,8 @@ #include "kvi_settings.h" -#include -#include +#include +#include #include #include @@ -98,13 +98,13 @@ KviMediaType * KviMediaManager::findMediaTypeByIanaType(const char * ianaType) return 0; } -KviMediaType * KviMediaManager::findMediaTypeByFileMask(const char * filemask) +KviMediaType * KviMediaManager::findMediaTypeByFileMask(const char * filetqmask) { __range_valid(locked()); for(KviMediaType * mt = m_pMediaTypeList->first();mt;mt = m_pMediaTypeList->next()) { // FIXME: #warning "Should this be case sensitive ?" - if(kvi_strEqualCI(mt->szFileMask.ptr(),filemask))return mt; + if(kvi_strEqualCI(mt->szFileMask.ptr(),filetqmask))return mt; } return 0; @@ -129,7 +129,7 @@ void KviMediaManager::insertMediaType(KviMediaType * m) int iWildCount = m->szFileMask.occurences('*'); int iNonWildCount = m->szFileMask.len() - iWildCount; - // The masks with no wildcards go first in the list + // The tqmasks with no wildcards go first in the list // then we insert the ones with more non-wild chars int index = 0; @@ -137,7 +137,7 @@ void KviMediaManager::insertMediaType(KviMediaType * m) { if(iWildCount) { - // the new mask has wildcards... if the current one has none, skip it + // the new tqmask has wildcards... if the current one has none, skip it int iWildCountExisting = mt->szFileMask.occurences('*'); if(iWildCountExisting) { @@ -164,15 +164,15 @@ void KviMediaManager::insertMediaType(KviMediaType * m) } } // else the current has no wildcards...skip } else { - // the new mask has no wildcards.... - if(mt->szFileMask.contains('*')) + // the new tqmask has no wildcards.... + if(mt->szFileMask.tqcontains('*')) { // current one has wildcards...insert m_pMediaTypeList->insert(index,m); return; } // the current one has no wildcards... - // the longer masks go first.... + // the longer tqmasks go first.... if(mt->szFileMask.len() < m->szFileMask.len()) { // the current one is shorter than the new one...insert @@ -185,10 +185,10 @@ void KviMediaManager::insertMediaType(KviMediaType * m) m_pMediaTypeList->append(m); /* - // the masks with no wildcards go first - // longer masks go first + // the tqmasks with no wildcards go first + // longer tqmasks go first - bool bHasWildcards = m->szFileMask.contains('*'); + bool bHasWildcards = m->szFileMask.tqcontains('*'); int index = 0; for(KviMediaType * mt = m_pMediaTypeList->first();mt;mt = m_pMediaTypeList->next()) { @@ -207,7 +207,7 @@ void KviMediaManager::insertMediaType(KviMediaType * m) } } } else { - if(mt->szFileMask.contains('*')) + if(mt->szFileMask.tqcontains('*')) { m_pMediaTypeList->insert(index,m); return; @@ -235,16 +235,16 @@ void KviMediaManager::insertMediaType(KviMediaType * m) KviMediaType * KviMediaManager::findMediaType(const char * filename,bool bCheckMagic) { - // FIXME: This should be ported at least to QString.... + // FIXME: This should be ported at least to TQString.... __range_valid(locked()); KviStr szFullPath = filename; if(!kvi_isAbsolutePath(szFullPath.ptr())) { #ifdef COMPILE_USE_QT4 - KviStr tmp = QDir::currentPath(); + KviStr tmp = TQDir::currentPath(); #else - KviStr tmp = QDir::currentDirPath(); + KviStr tmp = TQDir::currentDirPath(); #endif tmp.ensureLastCharIs('/'); szFullPath.prepend(tmp); @@ -382,7 +382,7 @@ KviMediaType * KviMediaManager::findMediaTypeForRegularFile(const char * szFullP if(bCheckMagic) { - QString szTmp=QString::fromUtf8(szFullPath); + TQString szTmp=TQString::fromUtf8(szFullPath); KviFile f(szTmp); if(f.openForReading()) { @@ -403,17 +403,13 @@ KviMediaType * KviMediaManager::findMediaTypeForRegularFile(const char * szFullP { if(len && m->szMagicBytes.hasData()) { - QRegExp re(m->szMagicBytes.ptr()); + TQRegExp re(m->szMagicBytes.ptr()); // It looks like they can't decide the name for this function :D // ... well, maybe the latest choice is the best one. #ifdef COMPILE_USE_QT4 if(re.indexIn(buffer) > -1)return m; // matched! #else - #if QT_VERSION >= 300 if(re.search(buffer) > -1)return m; // matched! - #else - if(re.find(buffer,0) > -1)return m; // matched! - #endif #endif // else magic failed...not a match } else return m; // matched! (no magic check) @@ -437,7 +433,7 @@ KviMediaType * KviMediaManager::findMediaTypeForRegularFile(const char * szFullP typedef struct _KviDefaultMediaType { - const char * filemask; + const char * filetqmask; const char * magicbytes; const char * ianatype; const char * description; @@ -493,12 +489,12 @@ void KviMediaManager::load(const char * filename) insertMediaType(m); } - for(int u = 0;g_defMediaTypes[u].filemask;u++) + for(int u = 0;g_defMediaTypes[u].filetqmask;u++) { - if(!findMediaTypeByFileMask(g_defMediaTypes[u].filemask)) + if(!findMediaTypeByFileMask(g_defMediaTypes[u].filetqmask)) { KviMediaType * m = new KviMediaType; - m->szFileMask = g_defMediaTypes[u].filemask; + m->szFileMask = g_defMediaTypes[u].filetqmask; m->szMagicBytes = g_defMediaTypes[u].magicbytes; m->szIanaType = g_defMediaTypes[u].ianatype; m->szDescription = g_defMediaTypes[u].description; diff --git a/src/kvilib/ext/kvi_mediatype.h b/src/kvilib/ext/kvi_mediatype.h index 77e96594..99b427f9 100644 --- a/src/kvilib/ext/kvi_mediatype.h +++ b/src/kvilib/ext/kvi_mediatype.h @@ -67,7 +67,7 @@ private: KviMediaType * findMediaTypeForRegularFile(const char * szFullPath,const char * szFileName,bool bCheckMagic); public: KviPointerList * mediaTypeList(){ return m_pMediaTypeList; }; - KviMediaType * findMediaTypeByFileMask(const char * filemask); + KviMediaType * findMediaTypeByFileMask(const char * filetqmask); KviMediaType * findMediaTypeByIanaType(const char * ianaType); bool removeMediaType(KviMediaType * t){ return m_pMediaTypeList->removeRef(t); }; void clear(){ m_pMediaTypeList->clear(); }; diff --git a/src/kvilib/ext/kvi_miscutils.cpp b/src/kvilib/ext/kvi_miscutils.cpp index 184345ed..7b3c4caa 100644 --- a/src/kvilib/ext/kvi_miscutils.cpp +++ b/src/kvilib/ext/kvi_miscutils.cpp @@ -25,22 +25,22 @@ #define __KVILIB__ #include "kvi_miscutils.h" -#include +#include namespace KviMiscUtils { - int compareVersions(const QString &szVersion1,const QString &szVersion2) + int compareVersions(const TQString &szVersion1,const TQString &szVersion2) { #ifdef COMPILE_USE_QT4 - QStringList sl1 = szVersion1.split("."); - QStringList sl2 = szVersion2.split("."); + TQStringList sl1 = szVersion1.split("."); + TQStringList sl2 = szVersion2.split("."); #else - QStringList sl1 = QStringList::split(".",szVersion1); - QStringList sl2 = QStringList::split(".",szVersion2); + TQStringList sl1 = TQStringList::split(".",szVersion1); + TQStringList sl2 = TQStringList::split(".",szVersion2); #endif - QStringList::Iterator it1 = sl1.begin(); - QStringList::Iterator it2 = sl2.begin(); + TQStringList::Iterator it1 = sl1.begin(); + TQStringList::Iterator it2 = sl2.begin(); while((it1 != sl1.end()) && (it2 != sl2.end())) { bool bOk; @@ -64,16 +64,16 @@ namespace KviMiscUtils return 0; } - bool isValidVersionString(const QString &szVersion) + bool isValidVersionString(const TQString &szVersion) { #ifdef COMPILE_USE_QT4 - QStringList sl = szVersion.split("."); + TQStringList sl = szVersion.split("."); #else - QStringList sl = QStringList::split(".",szVersion); + TQStringList sl = TQStringList::split(".",szVersion); #endif if(sl.isEmpty())return false; // must all be numbers - for(QStringList::Iterator it = sl.begin();it != sl.end();++it) + for(TQStringList::Iterator it = sl.begin();it != sl.end();++it) { bool bOk; int i = (*it).toInt(&bOk); diff --git a/src/kvilib/ext/kvi_miscutils.h b/src/kvilib/ext/kvi_miscutils.h index f09d63a7..7bda3277 100644 --- a/src/kvilib/ext/kvi_miscutils.h +++ b/src/kvilib/ext/kvi_miscutils.h @@ -34,10 +34,10 @@ namespace KviMiscUtils // Compare two x.y.z... version strings. // The function behaves like strcmp: it returns 0 when the versions // are equal, -1 if the szVersion1 is greater and 1 if szVersion2 is greater - extern KVILIB_API int compareVersions(const QString &szVersion1,const QString &szVersion2); + extern KVILIB_API int compareVersions(const TQString &szVersion1,const TQString &szVersion2); // Check if the argument string is a valid x.y.z.... version string - extern KVILIB_API bool isValidVersionString(const QString &szVersion); + extern KVILIB_API bool isValidVersionString(const TQString &szVersion); }; diff --git a/src/kvilib/ext/kvi_osinfo.cpp b/src/kvilib/ext/kvi_osinfo.cpp index 51037a48..9d443c0b 100644 --- a/src/kvilib/ext/kvi_osinfo.cpp +++ b/src/kvilib/ext/kvi_osinfo.cpp @@ -78,9 +78,9 @@ typedef BOOL (WINAPI *PGETPRODUCTINFO)(DWORD,DWORD,DWORD,DWORD,PDWORD); #define PRODUCT_ULTIMATE 0x00000001 #define PRODUCT_WEB_SERVER 0x00000011 -static QString queryWinInfo( QueryInfo info) +static TQString queryWinInfo( QueryInfo info) { - QString szVersion; + TQString szVersion; OSVERSIONINFOEX osvi; SYSTEM_INFO si; PGNSI pGNSI; @@ -317,7 +317,7 @@ static QString queryWinInfo( QueryInfo info) lRet = RegOpenKeyEx( HKEY_LOCAL_MACHINE, TEXT("SYSTEM\\CurrentControlSet\\Control\\ProductOptions"), - 0, KEY_QUERY_VALUE, &hKey ); + 0, KEY_TQUERY_VALUE, &hKey ); if( lRet != ERROR_SUCCESS ) return FALSE; @@ -348,19 +348,19 @@ static QString queryWinInfo( QueryInfo info) // Test for SP6 versus SP6a. lRet = RegOpenKeyEx( HKEY_LOCAL_MACHINE, TEXT("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Hotfix\\Q246009"), - 0, KEY_QUERY_VALUE, &hKey ); + 0, KEY_TQUERY_VALUE, &hKey ); if( lRet == ERROR_SUCCESS ) - szVersion+= QString("Service Pack 6a (Build %1)").arg( osvi.dwBuildNumber & 0xFFFF ); + szVersion+= TQString("Service Pack 6a (Build %1)").tqarg( osvi.dwBuildNumber & 0xFFFF ); else // Windows NT 4.0 prior to SP6a { - szVersion+= QString( "%1 (Build %2)").arg( osvi.szCSDVersion).arg( osvi.dwBuildNumber & 0xFFFF); + szVersion+= TQString( "%1 (Build %2)").tqarg( osvi.szCSDVersion).tqarg( osvi.dwBuildNumber & 0xFFFF); } RegCloseKey( hKey ); } else // not Windows NT 4.0 { - szVersion+= QString( "%1 (Build %2)").arg( osvi.szCSDVersion).arg( osvi.dwBuildNumber & 0xFFFF); + szVersion+= TQString( "%1 (Build %2)").tqarg( osvi.szCSDVersion).tqarg( osvi.dwBuildNumber & 0xFFFF); } break; @@ -398,7 +398,7 @@ static QString queryWinInfo( QueryInfo info) unsigned long major = osvi.dwMajorVersion; unsigned long minor = osvi.dwMinorVersion; unsigned long release = osvi.dwBuildNumber; - QString szMajor, szMinor, szRelease, szVersion; + TQString szMajor, szMinor, szRelease, szVersion; szMajor.setNum(major); szMinor.setNum(minor); szRelease.setNum(release); @@ -424,7 +424,7 @@ static QString queryWinInfo( QueryInfo info) namespace KviOsInfo { - QString type() + TQString type() { #ifdef COMPILE_ON_WINDOWS return queryWinInfo(Os_Type); @@ -437,74 +437,74 @@ namespace KviOsInfo #endif } - QString name() + TQString name() { #ifdef COMPILE_ON_WINDOWS return "windows"; #else struct utsname uts; if(uname(&uts) == 0) - return QString::fromLocal8Bit(uts.sysname); - return KviQString::empty; + return TQString::fromLocal8Bit(uts.sysname); + return KviTQString::empty; #endif } - QString version() + TQString version() { #ifdef COMPILE_ON_WINDOWS return queryWinInfo(Os_Version); #else struct utsname uts; if(uname(&uts) == 0) - return QString::fromLocal8Bit(uts.version); - return KviQString::empty; + return TQString::fromLocal8Bit(uts.version); + return KviTQString::empty; #endif } - QString release() + TQString release() { #ifdef COMPILE_ON_WINDOWS return queryWinInfo(Os_Release); #else struct utsname uts; if(uname(&uts) == 0) - return QString::fromLocal8Bit(uts.release); - return KviQString::empty; + return TQString::fromLocal8Bit(uts.release); + return KviTQString::empty; #endif } - QString machine() + TQString machine() { #ifdef COMPILE_ON_WINDOWS - QString mach = getenv("PROCESSOR_IDENTIFIER"); + TQString mach = getenv("PROCESSOR_IDENTIFIER"); return mach.section(",",0,0); #else struct utsname uts; if(uname(&uts) == 0) - return QString::fromLocal8Bit(uts.machine); - return KviQString::empty; + return TQString::fromLocal8Bit(uts.machine); + return KviTQString::empty; #endif } - QString nodename() + TQString nodename() { #ifdef COMPILE_ON_WINDOWS return "windows"; #else struct utsname uts; if(uname(&uts) == 0) - return QString::fromLocal8Bit(uts.nodename); - return KviQString::empty; + return TQString::fromLocal8Bit(uts.nodename); + return KviTQString::empty; #endif } - QString hostname() + TQString hostname() { char hbuffer[1024]; if(gethostname(hbuffer,1024) == 0) - return QString::fromLocal8Bit(hbuffer); + return TQString::fromLocal8Bit(hbuffer); else - return KviQString::empty; + return KviTQString::empty; } } diff --git a/src/kvilib/ext/kvi_osinfo.h b/src/kvilib/ext/kvi_osinfo.h index 9df4a990..5f864657 100644 --- a/src/kvilib/ext/kvi_osinfo.h +++ b/src/kvilib/ext/kvi_osinfo.h @@ -27,17 +27,17 @@ #include "kvi_settings.h" -#include +#include namespace KviOsInfo { - extern KVILIB_API QString type(); - extern KVILIB_API QString name(); - extern KVILIB_API QString version(); - extern KVILIB_API QString release(); - extern KVILIB_API QString machine(); - extern KVILIB_API QString nodename(); - extern KVILIB_API QString hostname(); + extern KVILIB_API TQString type(); + extern KVILIB_API TQString name(); + extern KVILIB_API TQString version(); + extern KVILIB_API TQString release(); + extern KVILIB_API TQString machine(); + extern KVILIB_API TQString nodename(); + extern KVILIB_API TQString hostname(); }; #endif //!_KVI_OSINFO_H_ diff --git a/src/kvilib/ext/kvi_parameterlist.cpp b/src/kvilib/ext/kvi_parameterlist.cpp index 318cd3d1..9affcab3 100644 --- a/src/kvilib/ext/kvi_parameterlist.cpp +++ b/src/kvilib/ext/kvi_parameterlist.cpp @@ -166,7 +166,7 @@ unsigned int KviParameterList::getUInt(bool * bOk) return 0; } -QRect KviParameterList::getRect(bool * bOk) +TQRect KviParameterList::getRect(bool * bOk) { int val[4]; for(int i=0;i<4;i++) @@ -176,21 +176,21 @@ QRect KviParameterList::getRect(bool * bOk) if(!pszv) { if(bOk)*bOk = false; - return QRect(); // invalid + return TQRect(); // invalid } bool mybOk; val[i] = pszv->toInt(&mybOk); if(!mybOk) { if(bOk)*bOk = false; - return QRect(); // invalid + return TQRect(); // invalid } } if(bOk)*bOk = true; - return QRect(val[0],val[1],val[2],val[3]); + return TQRect(val[0],val[1],val[2],val[3]); } -QPoint KviParameterList::getPoint(bool * bOk) +TQPoint KviParameterList::getPoint(bool * bOk) { int val[2]; for(int i=0;i<2;i++) @@ -200,21 +200,21 @@ QPoint KviParameterList::getPoint(bool * bOk) if(!pszv) { if(bOk)*bOk = false; - return QPoint(); // invalid + return TQPoint(); // invalid } bool mybOk; val[i] = pszv->toInt(&mybOk); if(!mybOk) { if(bOk)*bOk = false; - return QPoint(); // invalid + return TQPoint(); // invalid } } if(bOk)*bOk = true; - return QPoint(val[0],val[1]); + return TQPoint(val[0],val[1]); } -QSize KviParameterList::getSize(bool * bOk) +TQSize KviParameterList::getSize(bool * bOk) { int val[2]; for(int i=0;i<2;i++) @@ -224,18 +224,18 @@ QSize KviParameterList::getSize(bool * bOk) if(!pszv) { if(bOk)*bOk = false; - return QSize(); // invalid + return TQSize(); // invalid } bool mybOk; val[i] = pszv->toInt(&mybOk); if(!mybOk) { if(bOk)*bOk = false; - return QSize(); // invalid + return TQSize(); // invalid } } if(bOk)*bOk = true; - return QSize(val[0],val[1]); + return TQSize(val[0],val[1]); } //#ifdef COMPILE_ON_WINDOWS diff --git a/src/kvilib/ext/kvi_parameterlist.h b/src/kvilib/ext/kvi_parameterlist.h index 51c573e0..3d3dd6db 100644 --- a/src/kvilib/ext/kvi_parameterlist.h +++ b/src/kvilib/ext/kvi_parameterlist.h @@ -28,9 +28,9 @@ #include "kvi_string.h" #include "kvi_pointerlist.h" -#include -#include -#include +#include +#include +#include class KVILIB_API KviParameterList : public KviPointerList, public KviHeapObject { @@ -57,9 +57,9 @@ public: bool getBool(); int getInt(bool * bOk = 0); unsigned int getUInt(bool * bOk = 0); - QRect getRect(bool * bOk = 0); - QPoint getPoint(bool * bOk = 0); - QSize getSize(bool * bOk = 0); + TQRect getRect(bool * bOk = 0); + TQPoint getPoint(bool * bOk = 0); + TQSize getSize(bool * bOk = 0); KviStr * safeFirst(); KviStr * safeNext(); const char * safeFirstParam(){ return safeFirst()->ptr(); }; diff --git a/src/kvilib/ext/kvi_pixmap.cpp b/src/kvilib/ext/kvi_pixmap.cpp index f22b03ef..c5877300 100644 --- a/src/kvilib/ext/kvi_pixmap.cpp +++ b/src/kvilib/ext/kvi_pixmap.cpp @@ -30,7 +30,7 @@ #include "kvi_pixmap.h" #include "kvi_qstring.h" -#include +#include KviPixmap::KviPixmap() { @@ -52,7 +52,7 @@ KviPixmap::KviPixmap(const KviPixmap &pix) { if(pix.pixmap()) { - m_pPix = new QPixmap(*(pix.pixmap())); + m_pPix = new TQPixmap(*(pix.pixmap())); } } } @@ -70,7 +70,7 @@ bool KviPixmap::load(const char * path) m_szPath = path; if(m_szPath.isEmpty())return false; - m_pPix = new QPixmap(m_szPath); + m_pPix = new TQPixmap(m_szPath); if(m_pPix->isNull()) { @@ -82,14 +82,14 @@ bool KviPixmap::load(const char * path) return true; } -bool KviPixmap::load(const QString& path) +bool KviPixmap::load(const TQString& path) { if(m_pPix)delete m_pPix; m_pPix = 0; m_szPath = path; if(m_szPath.isEmpty())return false; - m_pPix = new QPixmap(m_szPath); + m_pPix = new TQPixmap(m_szPath); if(m_pPix->isNull()) { @@ -101,7 +101,7 @@ bool KviPixmap::load(const QString& path) return true; } -void KviPixmap::set(const QPixmap &pix,const QString &szPath) +void KviPixmap::set(const TQPixmap &pix,const TQString &szPath) { if(pix.isNull()) { @@ -110,7 +110,7 @@ void KviPixmap::set(const QPixmap &pix,const QString &szPath) } if(m_pPix)delete m_pPix; - m_pPix = new QPixmap(pix); + m_pPix = new TQPixmap(pix); m_szPath = szPath; } @@ -125,7 +125,7 @@ void KviPixmap::setNull() KviPixmap & KviPixmap::operator=(const KviPixmap &pix) { if(m_pPix == pix.m_pPix)return (*this); // self assignment (!!!) - if(KviQString::equalCI(m_szPath,pix.path()))return (*this); // same pix + if(KviTQString::equalCI(m_szPath,pix.path()))return (*this); // same pix if(m_pPix)delete m_pPix; m_pPix = 0; @@ -135,14 +135,14 @@ KviPixmap & KviPixmap::operator=(const KviPixmap &pix) { if(pix.pixmap()) { - m_pPix = new QPixmap(*(pix.pixmap())); + m_pPix = new TQPixmap(*(pix.pixmap())); } } return (*this); } -void KviPixmapUtils::drawPixmapWithPainter(QPainter* p,QPixmap * pix,int flags,const QRect& paintRect,int iWidgetWidth,int iWidgetHeight,int dx,int dy) +void KviPixmapUtils::drawPixmapWithPainter(TQPainter* p,TQPixmap * pix,int flags,const TQRect& paintRect,int iWidgetWidth,int iWidgetHeight,int dx,int dy) { if(!pix)return; if(!flags) @@ -156,18 +156,18 @@ void KviPixmapUtils::drawPixmapWithPainter(QPainter* p,QPixmap * pix,int flags,c int x=0; int y=0; - if( !(flags & Qt::AlignHorizontal_Mask )) + if( !(flags & TQt::AlignHorizontal_Mask )) x=-1; - else if ( flags & Qt::AlignRight ) + else if ( flags & TQt::AlignRight ) x=iWidgetWidth - iPixWidth; - else if( flags & Qt::AlignHCenter ) + else if( flags & TQt::AlignHCenter ) x=(iWidgetWidth - iPixWidth)/2; - if( !(flags & Qt::AlignVertical_Mask )) + if( !(flags & TQt::AlignVertical_Mask )) y=-1; - else if ( flags & Qt::AlignBottom ) + else if ( flags & TQt::AlignBottom ) y=iWidgetHeight - iPixHeight; - else if( flags & Qt::AlignVCenter ) + else if( flags & TQt::AlignVCenter ) y=(iWidgetHeight - iPixHeight)/2; if(x==-1) { diff --git a/src/kvilib/ext/kvi_pixmap.h b/src/kvilib/ext/kvi_pixmap.h index 7ba91cec..9f92e456 100644 --- a/src/kvilib/ext/kvi_pixmap.h +++ b/src/kvilib/ext/kvi_pixmap.h @@ -28,7 +28,7 @@ #include "kvi_settings.h" #include "kvi_string.h" -#include +#include class KVILIB_API KviPixmap { @@ -38,23 +38,23 @@ public: KviPixmap(const KviPixmap &pix); ~KviPixmap(); private: - QPixmap * m_pPix; - QString m_szPath; + TQPixmap * m_pPix; + TQString m_szPath; public: bool isNull(){ return m_pPix == 0; }; bool load(const char * path); - bool load(const QString& path); - const QString& path() const { return m_szPath; }; - QPixmap * pixmap() const { return m_pPix; }; - void set(const QPixmap &pix,const QString &szPath); + bool load(const TQString& path); + const TQString& path() const { return m_szPath; }; + TQPixmap * pixmap() const { return m_pPix; }; + void set(const TQPixmap &pix,const TQString &szPath); KviPixmap & operator=(const KviPixmap &pix); // deep copy void setNull(); }; namespace KviPixmapUtils { - extern KVILIB_API void drawPixmapWithPainter(QPainter* p,QPixmap * pix,int flags,const QRect& paintRect,int iWidgetWidth,int iWidgetHeight,int dx,int dy); - inline void drawPixmapWithPainter(QPainter* p,QPixmap * pix,int flags,const QRect& paintRect,int iWidgetWidth,int iWidgetHeight) + extern KVILIB_API void drawPixmapWithPainter(TQPainter* p,TQPixmap * pix,int flags,const TQRect& paintRect,int iWidgetWidth,int iWidgetHeight,int dx,int dy); + inline void drawPixmapWithPainter(TQPainter* p,TQPixmap * pix,int flags,const TQRect& paintRect,int iWidgetWidth,int iWidgetHeight) { KviPixmapUtils::drawPixmapWithPainter(p,pix,flags,paintRect,iWidgetWidth,iWidgetHeight,paintRect.left(),paintRect.top()); }; }; diff --git a/src/kvilib/ext/kvi_proxydb.cpp b/src/kvilib/ext/kvi_proxydb.cpp index 917795c3..95bf66a4 100644 --- a/src/kvilib/ext/kvi_proxydb.cpp +++ b/src/kvilib/ext/kvi_proxydb.cpp @@ -71,9 +71,9 @@ void KviProxy::setNamedProtocol(const char * proto) else m_protocol = KviProxy::Socks4; } -void KviProxy::getSupportedProtocolNames(QStringList & buf) +void KviProxy::getSupportedProtocolNames(TQStringList & buf) { - for(int i=0;i<3;i++)buf.append(QString(proxy_protocols_table[i])); + for(int i=0;i<3;i++)buf.append(TQString(proxy_protocols_table[i])); } void KviProxy::normalizeUserAndPass() diff --git a/src/kvilib/ext/kvi_proxydb.h b/src/kvilib/ext/kvi_proxydb.h index 92fa2c44..0ab18f5e 100644 --- a/src/kvilib/ext/kvi_proxydb.h +++ b/src/kvilib/ext/kvi_proxydb.h @@ -28,7 +28,7 @@ #include "kvi_string.h" #include "kvi_inttypes.h" #include "kvi_pointerlist.h" -#include +#include class KVILIB_API KviProxy { @@ -60,7 +60,7 @@ public: bool hasUser() const { return m_szUser.hasData(); }; unsigned int passLen() const { return (unsigned int)m_szPass.len(); }; unsigned int userLen() const { return (unsigned int)m_szUser.len(); }; - static void getSupportedProtocolNames(QStringList & buf); + static void getSupportedProtocolNames(TQStringList & buf); }; diff --git a/src/kvilib/ext/kvi_regchan.cpp b/src/kvilib/ext/kvi_regchan.cpp index a26c5969..d5eff0a3 100644 --- a/src/kvilib/ext/kvi_regchan.cpp +++ b/src/kvilib/ext/kvi_regchan.cpp @@ -28,10 +28,10 @@ #include "kvi_config.h" #include "kvi_qstring.h" -KviRegisteredChannel::KviRegisteredChannel(const KviStr &name,const KviStr &netmask) +KviRegisteredChannel::KviRegisteredChannel(const KviStr &name,const KviStr &nettqmask) { m_szName = name; - m_szNetMask = netmask; + m_szNetMask = nettqmask; m_pPropertyDict = new KviPointerHashTable(7,false,true); m_pPropertyDict->setAutoDelete(true); } @@ -67,9 +67,9 @@ void KviRegisteredChannelDataBase::load(const char * filename) KviRegisteredChannel * c = new KviRegisteredChannel(szChan,szMask); add(c); KviConfigGroupIterator sit(*d); - while(QString * s = sit.current()) + while(TQString * s = sit.current()) { - c->setProperty(KviQString::toUtf8(sit.currentKey()).data(),new KviStr(*s)); + c->setProperty(KviTQString::toUtf8(sit.currentKey()).data(),new KviStr(*s)); ++sit; } ++it; @@ -99,9 +99,9 @@ void KviRegisteredChannelDataBase::save(const char * filename) } } -KviRegisteredChannel * KviRegisteredChannelDataBase::find(const char * name,const char * net) +KviRegisteredChannel * KviRegisteredChannelDataBase::tqfind(const char * name,const char * net) { - KviRegisteredChannelList * l = m_pChannelDict->find(name); + KviRegisteredChannelList * l = m_pChannelDict->tqfind(name); if(!l)return 0; for(KviRegisteredChannel * c = l->first();c;c = l->next()) { @@ -111,20 +111,20 @@ KviRegisteredChannel * KviRegisteredChannelDataBase::find(const char * name,cons return 0; } -KviRegisteredChannel * KviRegisteredChannelDataBase::findExact(const char * name,const char * netmask) +KviRegisteredChannel * KviRegisteredChannelDataBase::findExact(const char * name,const char * nettqmask) { - KviRegisteredChannelList * l = m_pChannelDict->find(name); + KviRegisteredChannelList * l = m_pChannelDict->tqfind(name); if(!l)return 0; for(KviRegisteredChannel * c = l->first();c;c = l->next()) { - if(kvi_strEqualCI(c->netMask().ptr(),netmask))return c; + if(kvi_strEqualCI(c->netMask().ptr(),nettqmask))return c; } return 0; } void KviRegisteredChannelDataBase::remove(KviRegisteredChannel * c) { - KviRegisteredChannelList * l = m_pChannelDict->find(c->name().ptr()); + KviRegisteredChannelList * l = m_pChannelDict->tqfind(c->name().ptr()); if(!l)return; for(KviRegisteredChannel * ch = l->first();ch;ch = l->next()) { @@ -156,7 +156,7 @@ void KviRegisteredChannelDataBase::add(KviRegisteredChannel * c) } remove(old); } - KviRegisteredChannelList * l = m_pChannelDict->find(c->name().ptr()); + KviRegisteredChannelList * l = m_pChannelDict->tqfind(c->name().ptr()); if(!l) { l = new KviRegisteredChannelList; diff --git a/src/kvilib/ext/kvi_regchan.h b/src/kvilib/ext/kvi_regchan.h index f447c313..65393918 100644 --- a/src/kvilib/ext/kvi_regchan.h +++ b/src/kvilib/ext/kvi_regchan.h @@ -35,7 +35,7 @@ class KVILIB_API KviRegisteredChannel : public KviHeapObject { friend class KviRegisteredChannelDataBase; public: - KviRegisteredChannel(const KviStr &name,const KviStr &netmask); + KviRegisteredChannel(const KviStr &name,const KviStr &nettqmask); ~KviRegisteredChannel(); protected: KviStr m_szName; @@ -45,9 +45,9 @@ public: KviPointerHashTable * propertyDict(){ return m_pPropertyDict; }; const KviStr & name(){ return m_szName; }; const KviStr & netMask(){ return m_szNetMask; }; - KviStr * property(const char * name){ return m_pPropertyDict->find(name); }; + KviStr * property(const char * name){ return m_pPropertyDict->tqfind(name); }; // val must be allocated with NEW! - void setProperty(const char * name,KviStr * val){ m_pPropertyDict->replace(name,val); }; + void setProperty(const char * name,KviStr * val){ m_pPropertyDict->tqreplace(name,val); }; void removeProperty(const char * name){ m_pPropertyDict->remove(name); }; }; @@ -62,8 +62,8 @@ protected: KviPointerHashTable * m_pChannelDict; public: KviPointerHashTable * channelDict(){ return m_pChannelDict; }; - KviRegisteredChannel * find(const char * name,const char * net); - KviRegisteredChannel * findExact(const char * name,const char * netmask); + KviRegisteredChannel * tqfind(const char * name,const char * net); + KviRegisteredChannel * findExact(const char * name,const char * nettqmask); void remove(KviRegisteredChannel * c); void add(KviRegisteredChannel * c); void load(const char * filename); diff --git a/src/kvilib/ext/kvi_regusersdb.cpp b/src/kvilib/ext/kvi_regusersdb.cpp index 6d36c975..c60d2c9e 100644 --- a/src/kvilib/ext/kvi_regusersdb.cpp +++ b/src/kvilib/ext/kvi_regusersdb.cpp @@ -42,12 +42,12 @@ @short: Registration of users in KVIrc @keyterms: - registered users, registration mask, registered user properties, + registered users, registration tqmask, registered user properties, user properties, notify property, avatar property @body: [big]Introduction[/big][br] The "registered user database" is basically a set of users with associated - [doc:irc_masks]irc-masks[/doc] and properties.[br] + [doc:irc_tqmasks]irc-tqmasks[/doc] and properties.[br] It is used to recognize users on IRC and associate properties to them.[br] This works more or less like the IRC ban list, K-Line list, or invite list.[br] [big]User entry[/big][br] @@ -55,50 +55,50 @@ It may be the nickname of the user that you want to match, or the real name (if you know it) or any other string (even with spaces). The name is an "internal identifier" for the user entry: each name maps to a single entry and each entry has a single name.[br] - Each entry has a set of registration [doc:irc_masks]irc-masks[/doc]: these masks + Each entry has a set of registration [doc:irc_tqmasks]irc-tqmasks[/doc]: these tqmasks are used to recognize the user on irc.[br] [br] - [big]Registration masks[/big][br] - The masks have the common IRC mask format: [b]!@[/b][br] - The masks may contain '*' and '?' wildcards that match any portion of text.[br] + [big]Registration tqmasks[/big][br] + The tqmasks have the common IRC tqmask format: [b]!@[/b][br] + The tqmasks may contain '*' and '?' wildcards that match any portion of text.[br] [b]*!*@*[/b][br] [b]Pragma!*@*[/b][br] [b]*!~daemon@*[/b][br] [b]Pragma!*daemon@*.it[/b][br] [b]Pragma!?daemon@some*.it[/b][br] [b]Pragma!~daemon@some.host.it[/b][br] - Are examples of valid registration masks.[br] - The masks with wildcards can actually match more than a single user.[br] - For example the mask *!root@*.host.com will match all the users + Are examples of valid registration tqmasks.[br] + The tqmasks with wildcards can actually match more than a single user.[br] + For example the tqmask *!root@*.host.com will match all the users having root as username and coming from the host.com domain.[br] For this reason putting wildcards in nicknames could become a problem if not used carefully (but may also be used to achieve interesting tricks).[br] If you don't use wildcards in nicknames you are sure that - in a single irc connection , a mask will always refer to a single user.[br] + in a single irc connection , a tqmask will always refer to a single user.[br] You will commonly use the following format:[br] !*@*..[br] or[br] !*@...*[br] - In this way you can be 95% sure that the mask will really match the correct user.[br] + In this way you can be 95% sure that the tqmask will really match the correct user.[br] [br] [big]Example of registration and lookups[/big] Assume that you want to registere a friend of yours: Derek Riggs.[br] Derek often uses "Eddie" as his nickname "stranger" as username and has a dial-up connection that makes his IP address appear as .somewhere.in.time.org.[br] - You will add an entry with name "Derek Riggs" and a registration mask like the following: + You will add an entry with name "Derek Riggs" and a registration tqmask like the following: Eddie!stranger@*.somewhere.in.time.org.[br] - If the IRC servers keep adding strange characters ([doc:irc_masks]prefixes[/doc]) at the beginning of his username you may use + If the IRC servers keep adding strange characters ([doc:irc_tqmasks]prefixes[/doc]) at the beginning of his username you may use Eddie!*stranger@*.somewhere.in.time.org.[br] - If Eddie also often connects from the wasted.years.org domain and gets 'eddie' as username there, you might add a second registration mask as follows: + If Eddie also often connects from the wasted.years.org domain and gets 'eddie' as username there, you might add a second registration tqmask as follows: Eddie!*eddie@*.wasted.years.org.[br] - An alternative could be use only one mask with *.org as domain and allow any username (Eddie!*@*.org) but this + An alternative could be use only one tqmask with *.org as domain and allow any username (Eddie!*@*.org) but this could become dangerous since it could match the users that you don't want to.[br] On the other hand, if you dislike the users with the nickname Eddie that come from .org - and you're implementing an auto-kick system, the correct mask to register is "Eddie!*@*.org".[br] + and you're implementing an auto-kick system, the correct tqmask to register is "Eddie!*@*.org".[br] [br] KVirc ties to be smart , and always find the most correct match for an user: - If you have two masks registered: Pragma!*xor@*.myisp.it and *!*@*.myisp.it, + If you have two tqmasks registered: Pragma!*xor@*.myisp.it and *!*@*.myisp.it, kvirc will match Pragma!~xor@233-dyn.myisp.it with the first one even if the second one matches too; the firs one is a best match.[br] [br] @@ -117,7 +117,7 @@ [br] [big]The interface to the database[/big][br] The [module:reguser]reguser module[/module] is the interface to the "registered users database".[br] - It provides a set of commands for adding and removing masks and manipulating properties.[br] + It provides a set of commands for adding and removing tqmasks and manipulating properties.[br] */ //============================================================================================================ @@ -140,7 +140,7 @@ KviRegisteredMask::KviRegisteredMask(KviRegisteredUser * u,KviIrcMask * m) // -KviRegisteredUser::KviRegisteredUser(const QString & name) +KviRegisteredUser::KviRegisteredUser(const TQString & name) { m_iIgnoreFlags =0; m_bIgnoreEnabled=false; @@ -162,52 +162,52 @@ bool KviRegisteredUser::isIgnoreEnabledFor(IgnoreFlags flag) return m_iIgnoreFlags & flag; } -KviIrcMask * KviRegisteredUser::findMask(const KviIrcMask &mask) +KviIrcMask * KviRegisteredUser::findMask(const KviIrcMask &tqmask) { for(KviIrcMask * m = m_pMaskList->first();m;m = m_pMaskList->next()) { - if(*m == mask)return m; + if(*m == tqmask)return m; } return 0; } -bool KviRegisteredUser::addMask(KviIrcMask * mask) +bool KviRegisteredUser::addMask(KviIrcMask * tqmask) { - if(findMask(*mask)) + if(findMask(*tqmask)) { - delete mask; - mask = 0; + delete tqmask; + tqmask = 0; return false; } - m_pMaskList->append(mask); + m_pMaskList->append(tqmask); return true; } -bool KviRegisteredUser::removeMask(KviIrcMask * mask) +bool KviRegisteredUser::removeMask(KviIrcMask * tqmask) { - if(!mask)return false; - return m_pMaskList->removeRef(mask); + if(!tqmask)return false; + return m_pMaskList->removeRef(tqmask); } -bool KviRegisteredUser::matches(const KviIrcMask &mask) +bool KviRegisteredUser::matches(const KviIrcMask &tqmask) { for(KviIrcMask * m = m_pMaskList->first();m;m = m_pMaskList->next()) { - if(m->matches(mask))return true; + if(m->matches(tqmask))return true; } return false; } -bool KviRegisteredUser::matchesFixed(const KviIrcMask &mask) +bool KviRegisteredUser::matchesFixed(const KviIrcMask &tqmask) { for(KviIrcMask * m = m_pMaskList->first();m;m = m_pMaskList->next()) { - if(m->matchesFixed(mask))return true; + if(m->matchesFixed(tqmask))return true; } return false; } -bool KviRegisteredUser::matchesFixed(const QString & nick,const QString & user,const QString & host) +bool KviRegisteredUser::matchesFixed(const TQString & nick,const TQString & user,const TQString & host) { for(KviIrcMask * m = m_pMaskList->first();m;m = m_pMaskList->next()) { @@ -216,28 +216,28 @@ bool KviRegisteredUser::matchesFixed(const QString & nick,const QString & user,c return false; } -void KviRegisteredUser::setProperty(const QString &name,bool value) +void KviRegisteredUser::setProperty(const TQString &name,bool value) { - setProperty(name,value ? QString("true") : QString("false")); + setProperty(name,value ? TQString("true") : TQString("false")); } -void KviRegisteredUser::setProperty(const QString & name,const QString & value) +void KviRegisteredUser::setProperty(const TQString & name,const TQString & value) { if(!value.isEmpty()) { if(!m_pPropertyDict) { - m_pPropertyDict = new KviPointerHashTable(7,false); + m_pPropertyDict = new KviPointerHashTable(7,false); m_pPropertyDict->setAutoDelete(true); } #ifdef COMPILE_USE_QT4 - QString * val = new QString(value.trimmed()); + TQString * val = new TQString(value.trimmed()); #else - QString * val = new QString(value.stripWhiteSpace()); + TQString * val = new TQString(value.stripWhiteSpace()); #endif if(!val->isEmpty()) { - m_pPropertyDict->replace(name,val); + m_pPropertyDict->tqreplace(name,val); } else { delete val; val = 0; @@ -247,39 +247,39 @@ void KviRegisteredUser::setProperty(const QString & name,const QString & value) } } -bool KviRegisteredUser::getProperty(const QString & name,QString &value) +bool KviRegisteredUser::getProperty(const TQString & name,TQString &value) { if(!m_pPropertyDict)return false; if(name.isEmpty()) return false; - QString * pValue = m_pPropertyDict->find(name); + TQString * pValue = m_pPropertyDict->tqfind(name); if(pValue)value = *pValue; else return false; return true; } -const QString & KviRegisteredUser::getProperty(const QString & name) +const TQString & KviRegisteredUser::getProperty(const TQString & name) { - if(!m_pPropertyDict)return KviQString::empty; - if(name.isEmpty())return KviQString::empty; - QString * pValue = m_pPropertyDict->find(name); + if(!m_pPropertyDict)return KviTQString::empty; + if(name.isEmpty())return KviTQString::empty; + TQString * pValue = m_pPropertyDict->tqfind(name); if(pValue)return *pValue; - return KviQString::empty; + return KviTQString::empty; } -bool KviRegisteredUser::getBoolProperty(const QString & name,bool def) +bool KviRegisteredUser::getBoolProperty(const TQString & name,bool def) { if(!m_pPropertyDict)return def; if(name.isEmpty()) return def; - QString * pValue = m_pPropertyDict->find(name); + TQString * pValue = m_pPropertyDict->tqfind(name); if(pValue) { // be flexible , allow more "true" values (pragma) - if(KviQString::equalCS(*pValue,"1"))return true; - if(KviQString::equalCI(*pValue,"true"))return true; - if(KviQString::equalCI(*pValue,"yes"))return true; - //if(KviQString::equalCI(*pValue,"yeah"))return true; - //if(KviQString::equalCI(*pValue,"sure"))return true; - //if(KviQString::equalCI(*pValue,"sureashell"))return true; + if(KviTQString::equalCS(*pValue,"1"))return true; + if(KviTQString::equalCI(*pValue,"true"))return true; + if(KviTQString::equalCI(*pValue,"yes"))return true; + //if(KviTQString::equalCI(*pValue,"yeah"))return true; + //if(KviTQString::equalCI(*pValue,"sure"))return true; + //if(KviTQString::equalCI(*pValue,"sureashell"))return true; } return def; } @@ -289,7 +289,7 @@ bool KviRegisteredUser::getBoolProperty(const QString & name,bool def) // KviRegisteredUserGroup // -KviRegisteredUserGroup::KviRegisteredUserGroup(const QString &name) +KviRegisteredUserGroup::KviRegisteredUserGroup(const TQString &name) { setName(name); } @@ -306,16 +306,16 @@ KviRegisteredUserGroup::~KviRegisteredUserGroup() KviRegisteredUserDataBase::KviRegisteredUserDataBase() { - m_pUserDict = new KviPointerHashTable(31,false); // do not copy keys + m_pUserDict = new KviPointerHashTable(31,false); // do not copy keys m_pUserDict->setAutoDelete(true); m_pWildMaskList = new KviRegisteredMaskList; m_pWildMaskList->setAutoDelete(true); - m_pMaskDict = new KviPointerHashTable(49,false); // copy keys here! + m_pMaskDict = new KviPointerHashTable(49,false); // copy keys here! m_pMaskDict->setAutoDelete(true); - m_pGroupDict = new KviPointerHashTable(5,false); // copy keys here! + m_pGroupDict = new KviPointerHashTable(5,false); // copy keys here! m_pGroupDict->setAutoDelete(true); } @@ -328,40 +328,40 @@ KviRegisteredUserDataBase::~KviRegisteredUserDataBase() delete m_pGroupDict; } -KviRegisteredUser * KviRegisteredUserDataBase::addUser(const QString & name) +KviRegisteredUser * KviRegisteredUserDataBase::addUser(const TQString & name) { if(name.isEmpty()) return false; - if(m_pUserDict->find(name))return 0; + if(m_pUserDict->tqfind(name))return 0; KviRegisteredUser * u = new KviRegisteredUser(name); - m_pUserDict->replace(u->name(),u); //u->name() because we're NOT copying keys! + m_pUserDict->tqreplace(u->name(),u); //u->name() because we're NOT copying keys! emit(userAdded(name)); return u; } -KviRegisteredUserGroup * KviRegisteredUserDataBase::addGroup(const QString & name) +KviRegisteredUserGroup * KviRegisteredUserDataBase::addGroup(const TQString & name) { if(name.isEmpty()) return false; - if(m_pGroupDict->find(name))return 0; + if(m_pGroupDict->tqfind(name))return 0; KviRegisteredUserGroup * pGroup = new KviRegisteredUserGroup(name); - m_pGroupDict->replace(pGroup->name(),pGroup); //u->name() because we're NOT copying keys! + m_pGroupDict->tqreplace(pGroup->name(),pGroup); //u->name() because we're NOT copying keys! return pGroup; } -KviRegisteredUser * KviRegisteredUserDataBase::getUser(const QString & name) +KviRegisteredUser * KviRegisteredUserDataBase::getUser(const TQString & name) { if(name.isEmpty()) return 0; - KviRegisteredUser * u = m_pUserDict->find(name); + KviRegisteredUser * u = m_pUserDict->tqfind(name); if(!u) { u = new KviRegisteredUser(name); - m_pUserDict->replace(u->name(),u); //u->name() because we're NOT copying keys! + m_pUserDict->tqreplace(u->name(),u); //u->name() because we're NOT copying keys! } return u; } -static void append_mask_to_list(KviRegisteredMaskList *l,KviRegisteredUser *u,KviIrcMask *mask) +static void append_tqmask_to_list(KviRegisteredMaskList *l,KviRegisteredUser *u,KviIrcMask *tqmask) { - KviRegisteredMask * newMask = new KviRegisteredMask(u,mask); + KviRegisteredMask * newMask = new KviRegisteredMask(u,tqmask); int idx = 0; for(KviRegisteredMask * m = l->first();m;m = l->next()) { @@ -375,65 +375,65 @@ static void append_mask_to_list(KviRegisteredMaskList *l,KviRegisteredUser *u,Kv l->append(newMask); } -KviRegisteredUser * KviRegisteredUserDataBase::addMask(KviRegisteredUser * u,KviIrcMask * mask) +KviRegisteredUser * KviRegisteredUserDataBase::addMask(KviRegisteredUser * u,KviIrcMask * tqmask) { - if(!u || !mask) return 0; - __range_valid(u == m_pUserDict->find(u->name())); + if(!u || !tqmask) return 0; + __range_valid(u == m_pUserDict->tqfind(u->name())); KviRegisteredMaskList * l; - if(mask->hasWildNick()) + if(tqmask->hasWildNick()) { for(KviRegisteredMask * m = m_pWildMaskList->first();m;m = m_pWildMaskList->next()) { - if(*(m->mask()) == *mask) + if(*(m->tqmask()) == *tqmask) { - delete mask; - mask = 0; + delete tqmask; + tqmask = 0; return m->user(); } } // not found ...ok... add it - // masks with more info go first in the list + // tqmasks with more info go first in the list l = m_pWildMaskList; } else { - l = m_pMaskDict->find(mask->nick()); + l = m_pMaskDict->tqfind(tqmask->nick()); if(l) { // FIXME: #warning "Here we could compare the host and username only: nick matches for sure" for(KviRegisteredMask * m = l->first();m;m = l->next()) { - if(*(m->mask()) == *mask) + if(*(m->tqmask()) == *tqmask) { - delete mask; - mask = 0; + delete tqmask; + tqmask = 0; return m->user(); } } // not found ...ok... add it } else { // not found ...ok... add it - // this is the first mask in the list + // this is the first tqmask in the list l = new KviRegisteredMaskList; l->setAutoDelete(true); - if(!u->addMask(mask)) + if(!u->addMask(tqmask)) { debug(" Ops...got an incoherent regusers action...recovered ?"); delete l; l = 0; } else { - append_mask_to_list(l,u,mask); - m_pMaskDict->insert(mask->nick(),l); + append_tqmask_to_list(l,u,tqmask); + m_pMaskDict->insert(tqmask->nick(),l); } return 0; } } // Ok...add it - if(!u->addMask(mask)) + if(!u->addMask(tqmask)) { debug("ops...got an incoherent regusers action...recovered ?"); return 0; // ops...already there ? } - append_mask_to_list(l,u,mask); + append_tqmask_to_list(l,u,tqmask); return 0; } @@ -445,23 +445,23 @@ void KviRegisteredUserDataBase::copyFrom(KviRegisteredUserDataBase * db) m_pGroupDict->clear(); emit(databaseCleared()); - KviPointerHashTableIterator it(*(db->m_pUserDict)); + KviPointerHashTableIterator it(*(db->m_pUserDict)); while(KviRegisteredUser * theCur = it.current()) { KviRegisteredUser * u = getUser(theCur->name()); - // copy masks - KviPointerList * l = theCur->maskList(); + // copy tqmasks + KviPointerList * l = theCur->tqmaskList(); for(KviIrcMask * m=l->first();m;m = l->next()) { KviIrcMask * m2 = new KviIrcMask(*m); addMask(u,m2); } // copy properties - KviPointerHashTable * pd = theCur->propertyDict(); + KviPointerHashTable * pd = theCur->propertyDict(); if(pd) { - KviPointerHashTableIterator pdi(*pd); + KviPointerHashTableIterator pdi(*pd); while(pdi.current()) { u->setProperty(pdi.currentKey(),*(pdi.current())); @@ -474,7 +474,7 @@ void KviRegisteredUserDataBase::copyFrom(KviRegisteredUserDataBase * db) ++it; } - KviPointerHashTableIterator git(*db->m_pGroupDict); + KviPointerHashTableIterator git(*db->m_pGroupDict); while(git.current()) { addGroup(git.currentKey()); @@ -483,34 +483,34 @@ void KviRegisteredUserDataBase::copyFrom(KviRegisteredUserDataBase * db) } -bool KviRegisteredUserDataBase::removeUser(const QString & name) +bool KviRegisteredUserDataBase::removeUser(const TQString & name) { if(name.isEmpty()) return false; - KviRegisteredUser * u = m_pUserDict->find(name); + KviRegisteredUser * u = m_pUserDict->tqfind(name); if(!u)return false; - while(KviIrcMask * mask = u->maskList()->first()) + while(KviIrcMask * tqmask = u->tqmaskList()->first()) { - if(!removeMaskByPointer(mask)) - debug("Ops... removeMaskByPointer(%s) failed ?",KviQString::toUtf8(name).data()); + if(!removeMaskByPointer(tqmask)) + debug("Ops... removeMaskByPointer(%s) failed ?",KviTQString::toUtf8(name).data()); } emit(userRemoved(name)); m_pUserDict->remove(name); return true; } -bool KviRegisteredUserDataBase::removeGroup(const QString & name) +bool KviRegisteredUserDataBase::removeGroup(const TQString & name) { if(name.isEmpty()) return false; m_pGroupDict->remove(name); return true; } -bool KviRegisteredUserDataBase::removeMask(const KviIrcMask &mask) +bool KviRegisteredUserDataBase::removeMask(const KviIrcMask &tqmask) { - // find the mask pointer - KviRegisteredMask * m = findExactMask(mask); + // find the tqmask pointer + KviRegisteredMask * m = findExactMask(tqmask); // and remove it if(m){ - if(removeMaskByPointer(m->mask())) + if(removeMaskByPointer(m->tqmask())) { return true; } @@ -518,36 +518,36 @@ bool KviRegisteredUserDataBase::removeMask(const KviIrcMask &mask) return 0; } -bool KviRegisteredUserDataBase::removeMaskByPointer(KviIrcMask * mask) +bool KviRegisteredUserDataBase::removeMaskByPointer(KviIrcMask * tqmask) { - if(!mask) return 0; - if(mask->hasWildNick()) + if(!tqmask) return 0; + if(tqmask->hasWildNick()) { // remove from the wild list for(KviRegisteredMask * m = m_pWildMaskList->first();m;m = m_pWildMaskList->next()) { - if(m->mask() == mask) + if(m->tqmask() == tqmask) { // ok..got it, remove from the list and from the user struct (user struct deletes it!) - emit(userChanged(mask->nick())); - m->user()->removeMask(mask); // this one deletes m->mask() + emit(userChanged(tqmask->nick())); + m->user()->removeMask(tqmask); // this one deletes m->tqmask() m_pWildMaskList->removeRef(m); // this one deletes m return true; } } // not found ...opz :) } else { - KviRegisteredMaskList * l = m_pMaskDict->find(mask->nick()); + KviRegisteredMaskList * l = m_pMaskDict->tqfind(tqmask->nick()); if(l) { // FIXME: #warning "Here we could compare the host and username only: nick matches for sure" for(KviRegisteredMask * m = l->first();m;m = l->next()) { - if(m->mask() == mask) + if(m->tqmask() == tqmask) { - QString nick = mask->nick(); + TQString nick = tqmask->nick(); emit(userChanged(nick)); - m->user()->removeMask(mask); // this one deletes m->mask() (or mask) + m->user()->removeMask(tqmask); // this one deletes m->tqmask() (or tqmask) l->removeRef(m); // this one deletes m if(l->count() == 0)m_pMaskDict->remove(nick); return true; @@ -563,89 +563,89 @@ bool KviRegisteredUserDataBase::removeMaskByPointer(KviIrcMask * mask) /* -KviRegisteredUser * KviRegisteredUserDataBase::findMatchingUser(const KviIrcMask &mask) +KviRegisteredUser * KviRegisteredUserDataBase::findMatchingUser(const KviIrcMask &tqmask) { - // first lookup the nickname in the maskDict - KviRegisteredMaskList * l = m_pMaskDict->find(mask.nick()); + // first lookup the nickname in the tqmaskDict + KviRegisteredMaskList * l = m_pMaskDict->tqfind(tqmask.nick()); if(l) { for(KviRegisteredMask *m = l->first();m;m = l->next()) { - if(m->mask()->matchesFixed(0,mask.user(),mask.host()))return m->user(); + if(m->tqmask()->matchesFixed(0,tqmask.user(),tqmask.host()))return m->user(); } } // not found....lookup the wild ones for(KviRegisteredMask * m = m_pWildMaskList->first();m;m = m_pWildMaskList->next()) { - if(m->mask()->matchesFixed(mask))return m->user(); + if(m->tqmask()->matchesFixed(tqmask))return m->user(); } return 0; // no match at all } */ -KviRegisteredUser * KviRegisteredUserDataBase::findMatchingUser(const QString & nick,const QString &user,const QString & host) +KviRegisteredUser * KviRegisteredUserDataBase::findMatchingUser(const TQString & nick,const TQString &user,const TQString & host) { KviRegisteredMask * m = findMatchingMask(nick,user,host); if(m)return m->user(); return 0; // no match at all } -KviRegisteredMask * KviRegisteredUserDataBase::findMatchingMask(const QString & nick,const QString &user,const QString & host) +KviRegisteredMask * KviRegisteredUserDataBase::findMatchingMask(const TQString & nick,const TQString &user,const TQString & host) { - // first lookup the nickname in the maskDict + // first lookup the nickname in the tqmaskDict if(nick.isEmpty()) return false; - KviRegisteredMaskList * l = m_pMaskDict->find(nick); + KviRegisteredMaskList * l = m_pMaskDict->tqfind(nick); if(l) { for(KviRegisteredMask *m = l->first();m;m = l->next()) { - if(m->mask()->matchesFixed(nick,user,host))return m; + if(m->tqmask()->matchesFixed(nick,user,host))return m; } } // not found....lookup the wild ones for(KviRegisteredMask * m = m_pWildMaskList->first();m;m = m_pWildMaskList->next()) { - if(m->mask()->matchesFixed(nick,user,host))return m; + if(m->tqmask()->matchesFixed(nick,user,host))return m; } return 0; // no match at all } -KviRegisteredUser * KviRegisteredUserDataBase::findUserWithMask(const KviIrcMask &mask) +KviRegisteredUser * KviRegisteredUserDataBase::findUserWithMask(const KviIrcMask &tqmask) { - KviRegisteredMask * m = findExactMask(mask); + KviRegisteredMask * m = findExactMask(tqmask); if(m)return m->user(); return 0; } -KviRegisteredMask * KviRegisteredUserDataBase::findExactMask(const KviIrcMask &mask) +KviRegisteredMask * KviRegisteredUserDataBase::findExactMask(const KviIrcMask &tqmask) { - // first lookup the nickname in the maskDict - if(mask.nick()=="") return 0; - KviRegisteredMaskList * l = m_pMaskDict->find(mask.nick()); + // first lookup the nickname in the tqmaskDict + if(tqmask.nick()=="") return 0; + KviRegisteredMaskList * l = m_pMaskDict->tqfind(tqmask.nick()); if(l) { for(KviRegisteredMask *m = l->first();m;m = l->next()) { - if(*(m->mask()) == mask)return m; + if(*(m->tqmask()) == tqmask)return m; } } // not found....lookup the wild ones for(KviRegisteredMask * m = m_pWildMaskList->first();m;m = m_pWildMaskList->next()) { - if(*(m->mask()) == mask)return m; + if(*(m->tqmask()) == tqmask)return m; } return 0; // no match at all } /* -bool KviRegisteredUserDataBase::isIgnoredUser(const QString & nick,const QString & user,const QString & host) +bool KviRegisteredUserDataBase::isIgnoredUser(const TQString & nick,const TQString & user,const TQString & host) { KviRegisteredUser * u = findMatchingUser(nick,user,host); if(u)return u->getBoolProperty("IGNORE"); else return false; } */ -void KviRegisteredUserDataBase::load(const QString & filename) +void KviRegisteredUserDataBase::load(const TQString & filename) { - QString szCurrent; + TQString szCurrent; KviConfig cfg(filename,KviConfig::Read); KviConfigIterator it(*cfg.dict()); @@ -653,7 +653,7 @@ void KviRegisteredUserDataBase::load(const QString & filename) { cfg.setGroup(it.currentKey()); szCurrent=it.currentKey(); - if(KviQString::equalCSN("#Group ",szCurrent,7)) + if(KviTQString::equalCSN("#Group ",szCurrent,7)) { szCurrent.remove(0,7); addGroup(szCurrent); @@ -667,16 +667,16 @@ void KviRegisteredUserDataBase::load(const QString & filename) KviConfigGroupIterator sdi(*(it.current())); while(sdi.current()) { - QString tmp = sdi.currentKey(); - if(KviQString::equalCSN("prop_",tmp,5)) + TQString tmp = sdi.currentKey(); + if(KviTQString::equalCSN("prop_",tmp,5)) { tmp.remove(0,5); u->setProperty(tmp,*(sdi.current())); - } else if(KviQString::equalCSN("mask_",tmp,5)) + } else if(KviTQString::equalCSN("tqmask_",tmp,5)) { - KviIrcMask * mask = new KviIrcMask(*(sdi.current())); - addMask(u,mask); - } else if(KviQString::equalCI(tmp,"Group")) + KviIrcMask * tqmask = new KviIrcMask(*(sdi.current())); + addMask(u,tqmask); + } else if(KviTQString::equalCI(tmp,"Group")) { u->setGroup(*(sdi.current())); } @@ -686,18 +686,18 @@ void KviRegisteredUserDataBase::load(const QString & filename) } ++it; } - if(!m_pGroupDict->find(__tr("Default"))) + if(!m_pGroupDict->tqfind(__tr("Default"))) addGroup(__tr("Default")); } -void KviRegisteredUserDataBase::save(const QString & filename) +void KviRegisteredUserDataBase::save(const TQString & filename) { KviConfig cfg(filename,KviConfig::Write); cfg.clear(); cfg.preserveEmptyGroups(true); - KviPointerHashTableIterator it(*m_pUserDict); + KviPointerHashTableIterator it(*m_pUserDict); while(it.current()) { @@ -707,35 +707,35 @@ void KviRegisteredUserDataBase::save(const QString & filename) cfg.writeEntry("IgnoreFlags",it.current()->ignoreFlags()); if(it.current()->propertyDict()) { - KviPointerHashTableIterator pit(*(it.current()->propertyDict())); + KviPointerHashTableIterator pit(*(it.current()->propertyDict())); while(pit.current()) { - QString tmp = "prop_"; + TQString tmp = "prop_"; tmp.append(pit.currentKey()); cfg.writeEntry(tmp,*(pit.current())); ++pit; } } - // Write masks + // Write tqmasks int idx = 0; - for(KviIrcMask * m = it.current()->maskList()->first();m;m = it.current()->maskList()->next()) + for(KviIrcMask * m = it.current()->tqmaskList()->first();m;m = it.current()->tqmaskList()->next()) { - QString tmp; - KviQString::sprintf(tmp,"mask_%d",idx); - QString mask; - m->mask(mask,KviIrcMask::NickUserHost); - cfg.writeEntry(tmp,mask); + TQString tmp; + KviTQString::sprintf(tmp,"tqmask_%d",idx); + TQString tqmask; + m->tqmask(tqmask,KviIrcMask::NickUserHost); + cfg.writeEntry(tmp,tqmask); ++idx; } cfg.writeEntry("Group",it.current()->group()); ++it; } - KviPointerHashTableIterator git(*m_pGroupDict); - QString szTmp; + KviPointerHashTableIterator git(*m_pGroupDict); + TQString szTmp; while(git.current()) { - KviQString::sprintf(szTmp,"#Group %Q",&(git.current()->name())); + KviTQString::sprintf(szTmp,"#Group %Q",&(git.current()->name())); cfg.setGroup(szTmp); ++git; } diff --git a/src/kvilib/ext/kvi_regusersdb.h b/src/kvilib/ext/kvi_regusersdb.h index 06152f24..0cfd6c71 100644 --- a/src/kvilib/ext/kvi_regusersdb.h +++ b/src/kvilib/ext/kvi_regusersdb.h @@ -27,7 +27,7 @@ // // REGISTERED USERS // -// Here we manage users resigered by mask and their (generic!) properties +// Here we manage users resigered by tqmask and their (generic!) properties // #include "kvi_settings.h" @@ -38,7 +38,7 @@ #include "kvi_pointerlist.h" #include "kvi_pointerhashtable.h" -#include +#include class KviRegisteredUserDataBase; @@ -64,20 +64,20 @@ public: Dcc=32 }; - KviRegisteredUser(const QString &name); + KviRegisteredUser(const TQString &name); ~KviRegisteredUser(); private: int m_iIgnoreFlags; bool m_bIgnoreEnabled; - QString m_szName; - QString m_szGroup; - KviPointerHashTable * m_pPropertyDict; // owned properties - KviPointerList * m_pMaskList; // owned masks + TQString m_szName; + TQString m_szGroup; + KviPointerHashTable * m_pPropertyDict; // owned properties + KviPointerList * m_pMaskList; // owned tqmasks protected: - // mask ownership is transferred! (always!) returns false if the mask was already there - bool addMask(KviIrcMask * mask); - bool removeMask(KviIrcMask * mask); - KviIrcMask * findMask(const KviIrcMask &mask); + // tqmask ownership is transferred! (always!) returns false if the tqmask was already there + bool addMask(KviIrcMask * tqmask); + bool removeMask(KviIrcMask * tqmask); + KviIrcMask * findMask(const KviIrcMask &tqmask); public: int ignoreFlags() { return m_iIgnoreFlags; }; void setIgnoreFlags(int flags) {m_iIgnoreFlags=flags; }; @@ -85,24 +85,24 @@ public: void setIgnoreEnabled(bool enabled) {m_bIgnoreEnabled=enabled;}; bool isIgnoreEnabledFor(IgnoreFlags flag); - const QString &name(){ return m_szName; }; - bool matches(const KviIrcMask &mask); - bool matchesFixed(const KviIrcMask &mask); - bool matchesFixed(const QString &nick,const QString &user,const QString &host); + const TQString &name(){ return m_szName; }; + bool matches(const KviIrcMask &tqmask); + bool matchesFixed(const KviIrcMask &tqmask); + bool matchesFixed(const TQString &nick,const TQString &user,const TQString &host); - void setProperty(const QString &name,const QString &value); - void setProperty(const QString &name,bool value); + void setProperty(const TQString &name,const TQString &value); + void setProperty(const TQString &name,bool value); - void setGroup(const QString &name) { m_szGroup=name; }; - const QString &group(){ return m_szGroup; }; + void setGroup(const TQString &name) { m_szGroup=name; }; + const TQString &group(){ return m_szGroup; }; - const QString & getProperty(const QString &name); // returns 0 if the property is not there - bool getProperty(const QString &name,QString &value); // returns false if the property is not there - bool getBoolProperty(const QString &name,bool def=FALSE); // returns true if the property is there and is true + const TQString & getProperty(const TQString &name); // returns 0 if the property is not there + bool getProperty(const TQString &name,TQString &value); // returns false if the property is not there + bool getBoolProperty(const TQString &name,bool def=FALSE); // returns true if the property is there and is true // the propertyDict may be 0! - KviPointerHashTable * propertyDict(){ return m_pPropertyDict; }; - // this is never zero (but may contain no masks) - KviPointerList * maskList(){ return m_pMaskList; }; + KviPointerHashTable * propertyDict(){ return m_pPropertyDict; }; + // this is never zero (but may contain no tqmasks) + KviPointerList * tqmaskList(){ return m_pMaskList; }; }; //============================================================================================================ @@ -114,13 +114,13 @@ class KVILIB_API KviRegisteredUserGroup : public KviHeapObject { friend class KviRegisteredUserDataBase; public: - KviRegisteredUserGroup(const QString &name); + KviRegisteredUserGroup(const TQString &name); ~KviRegisteredUserGroup(); - void setName(const QString &name) { m_szName=name; }; - const QString &name(){ return m_szName; }; + void setName(const TQString &name) { m_szName=name; }; + const TQString &name(){ return m_szName; }; private: - QString m_szName; + TQString m_szName; }; //============================================================================================================ // @@ -139,7 +139,7 @@ public: public: int nonWildChars(){ return m_iMaskNonWildChars; }; KviRegisteredUser * user(){ return m_pUser; }; - KviIrcMask * mask(){ return m_pMask; }; + KviIrcMask * tqmask(){ return m_pMask; }; }; typedef KviPointerList KviRegisteredMaskList; @@ -149,51 +149,52 @@ typedef KviPointerList KviRegisteredMaskList; // KviRegisteredUsersDb // // Manages a set of KviRegisteredUser instances stored in the m_pUserDict dictionary -// The users are identified by masks stored in m_pMaskDict and m_pWildMaskList +// The users are identified by tqmasks stored in m_pMaskDict and m_pWildMaskList // m_pMaskDict contains lists of non wild-nick KviRegisteredMask that point to users // m_pWildMaskList is a list of wild-nick KviRegisteredMask that point to users // -class KVILIB_API KviRegisteredUserDataBase : public QObject +class KVILIB_API KviRegisteredUserDataBase : public TQObject { Q_OBJECT + TQ_OBJECT public: KviRegisteredUserDataBase(); ~KviRegisteredUserDataBase(); private: - KviPointerHashTable * m_pUserDict; // unique namespace, owns the objects, does not copy keys - KviPointerHashTable * m_pMaskDict; // owns the objects, copies the keys + KviPointerHashTable * m_pUserDict; // unique namespace, owns the objects, does not copy keys + KviPointerHashTable * m_pMaskDict; // owns the objects, copies the keys KviRegisteredMaskList * m_pWildMaskList; // owns the objects - KviPointerHashTable* m_pGroupDict; + KviPointerHashTable* m_pGroupDict; public: void copyFrom(KviRegisteredUserDataBase * db); - KviRegisteredUser * addUser(const QString &name); // returns 0 if already there - KviRegisteredUser * getUser(const QString &name); // returns existing or adds - bool removeUser(const QString &name); - bool removeGroup(const QString &name); - KviRegisteredUser * findUserByName(const QString &name){ return m_pUserDict->find(name); }; - // mask must be allocated on the heap and the ownership is transferred! - // returns non zero if there is already an user with this mask (returns the pointer to it!) - KviRegisteredUser * addMask(KviRegisteredUser * u,KviIrcMask * mask); - bool removeMaskByPointer(KviIrcMask * mask); - bool removeMask(const KviIrcMask &mask); - KviRegisteredUser * findMatchingUser(const QString &nick,const QString &user,const QString &host); - KviRegisteredUser * findUserWithMask(const KviIrcMask &mask); - KviRegisteredMask * findExactMask(const KviIrcMask &mask); - KviRegisteredMask * findMatchingMask(const QString &nick,const QString &user,const QString &host); + KviRegisteredUser * addUser(const TQString &name); // returns 0 if already there + KviRegisteredUser * getUser(const TQString &name); // returns existing or adds + bool removeUser(const TQString &name); + bool removeGroup(const TQString &name); + KviRegisteredUser * findUserByName(const TQString &name){ return m_pUserDict->tqfind(name); }; + // tqmask must be allocated on the heap and the ownership is transferred! + // returns non zero if there is already an user with this tqmask (returns the pointer to it!) + KviRegisteredUser * addMask(KviRegisteredUser * u,KviIrcMask * tqmask); + bool removeMaskByPointer(KviIrcMask * tqmask); + bool removeMask(const KviIrcMask &tqmask); + KviRegisteredUser * findMatchingUser(const TQString &nick,const TQString &user,const TQString &host); + KviRegisteredUser * findUserWithMask(const KviIrcMask &tqmask); + KviRegisteredMask * findExactMask(const KviIrcMask &tqmask); + KviRegisteredMask * findMatchingMask(const TQString &nick,const TQString &user,const TQString &host); //Only used in few places (actually one) of the code, but lot of times;perfect for inlining... //bool isIgnoredUser(const char * nick,const char * user,const char * host); - void load(const QString &filename); - void save(const QString &filename); + void load(const TQString &filename); + void save(const TQString &filename); - KviPointerHashTable * userDict(){ return m_pUserDict; }; - KviPointerHashTable* groupDict() { return m_pGroupDict; }; + KviPointerHashTable * userDict(){ return m_pUserDict; }; + KviPointerHashTable* groupDict() { return m_pGroupDict; }; - KviRegisteredUserGroup* addGroup(const QString &name); + KviRegisteredUserGroup* addGroup(const TQString &name); signals: - void userRemoved(const QString&); - void userChanged(const QString&); - void userAdded (const QString&); + void userRemoved(const TQString&); + void userChanged(const TQString&); + void userAdded (const TQString&); void databaseCleared(); }; diff --git a/src/kvilib/ext/kvi_sharedfiles.cpp b/src/kvilib/ext/kvi_sharedfiles.cpp index 65ce0d69..b3c96e11 100644 --- a/src/kvilib/ext/kvi_sharedfiles.cpp +++ b/src/kvilib/ext/kvi_sharedfiles.cpp @@ -30,7 +30,7 @@ #include "kvi_config.h" #include "kvi_fileutils.h" -#include +#include // TODO: Match servers that the file requests come from // TODO: Max number of downloads ? @@ -60,7 +60,7 @@ with /usr/arch/mp3/SonataArctica_SingInSilence_Live.mp3 as real file path , something like "SonataArctica_SingInSilence.mp3". A remote user will then request you a DCC GET SonataArctica_SingInSilence.mp3 and KVIrc will automatically send the file.[br] - Each file offer has an "user mask" that the requesting remote users must match to + Each file offer has an "user tqmask" that the requesting remote users must match to obtain the file: *!*@* matches any user, Pragma!*@* matches any user with nickname pragma, *!*@*.omnikron.net matches any user coming from the omnikron.net domain.[br] Each offer can have an expire time: the offer will be automatically removed after @@ -69,8 +69,8 @@ use an additional "size" parameter in the DCC GET request.[br] [big]Security issues[/big] This is a nice but unsecure method of sharing files.[br] - The user mask is a good protection but you have to use it properly!.[br] - Setting the user mask to Nick!*@* can be easily exploited (just by making an user disconnect + The user tqmask is a good protection but you have to use it properly!.[br] + Setting the user tqmask to Nick!*@* can be easily exploited (just by making an user disconnect in one of the well known ways and then by using his nickname).[br] On the other side, the remote end must know exactly the visible name of the offer to request and noone but you will tell him that name.[br] @@ -79,7 +79,7 @@ Please don't send complains if someone stoles your /etc/passwd : it is because you have permitted that.[br] */ -KviSharedFile::KviSharedFile(const QString &szName,const QString &szAbsPath,const QString &szUserMask,time_t expireTime,unsigned int uFileSize) +KviSharedFile::KviSharedFile(const TQString &szName,const TQString &szAbsPath,const TQString &szUserMask,time_t expireTime,unsigned int uFileSize) { m_szName = szName; m_szAbsFilePath = szAbsPath; @@ -87,10 +87,10 @@ KviSharedFile::KviSharedFile(const QString &szName,const QString &szAbsPath,cons m_expireTime = expireTime; m_uFileSize = uFileSize; #ifdef COMPILE_USE_QT4 - // QT4ROX: Because they have finally moved the functionality of QString::contains() to QString::count(), and QString::contains() now does the right job + // QT4ROX: Because they have finally moved the functionality of TQString::tqcontains() to TQString::count(), and TQString::tqcontains() now does the right job m_uWildCount = m_szUserMask.count('*'); #else - m_uWildCount = m_szUserMask.contains('*'); + m_uWildCount = m_szUserMask.tqcontains('*'); #endif m_uNonWildCount = m_szUserMask.length() - m_uWildCount; } @@ -101,12 +101,12 @@ KviSharedFile::~KviSharedFile() KviSharedFilesManager::KviSharedFilesManager() -: QObject() +: TQObject() { - m_pSharedListDict = new KviPointerHashTable(); + m_pSharedListDict = new KviPointerHashTable(); m_pSharedListDict->setAutoDelete(true); - m_pCleanupTimer = new QTimer(); - connect(m_pCleanupTimer,SIGNAL(timeout()),this,SLOT(cleanup())); + m_pCleanupTimer = new TQTimer(); + connect(m_pCleanupTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(cleanup())); } KviSharedFilesManager::~KviSharedFilesManager() @@ -118,13 +118,13 @@ KviSharedFilesManager::~KviSharedFilesManager() void KviSharedFilesManager::cleanup() { - KviPointerHashTableIterator it(*m_pSharedListDict); + KviPointerHashTableIterator it(*m_pSharedListDict); time_t curTime = time(0); bool bOtherStuffToCleanup = false; //bool bChanged = false; - KviPointerList lDying; + KviPointerList lDying; lDying.setAutoDelete(true); while(KviSharedFileList * l = it.current()) @@ -150,12 +150,12 @@ void KviSharedFilesManager::cleanup() emit sharedFileRemoved(fo); } if(l->count() == 0) - lDying.append(new QString(it.currentKey())); + lDying.append(new TQString(it.currentKey())); ++it; } - for(QString * pDyingKey = lDying.first();pDyingKey;pDyingKey = lDying.next()) + for(TQString * pDyingKey = lDying.first();pDyingKey;pDyingKey = lDying.next()) m_pSharedListDict->remove(*pDyingKey); if(!bOtherStuffToCleanup)m_pCleanupTimer->stop(); @@ -175,7 +175,7 @@ void KviSharedFilesManager::doInsert(KviSharedFileList * l, KviSharedFile * o) { if(o->wildcardCount() > 0) { - // the new mask has wildcards... if the current one has none, skip it + // the new tqmask has wildcards... if the current one has none, skip it if(fo->wildcardCount() > 0) { // the one in the list has wildcards too... @@ -200,7 +200,7 @@ void KviSharedFilesManager::doInsert(KviSharedFileList * l, KviSharedFile * o) } } // else the current has no wildcards...skip } else { - // the new mask has no wildcards.... + // the new tqmask has no wildcards.... if(fo->wildcardCount() > 0) { // current one has wildcards...insert @@ -208,8 +208,8 @@ void KviSharedFilesManager::doInsert(KviSharedFileList * l, KviSharedFile * o) return; } // the current one has no wildcards... - // the longer masks go first.... - if(fo->maskLength() < o->maskLength()) + // the longer tqmasks go first.... + if(fo->tqmaskLength() < o->tqmaskLength()) { // the current one is shorter than the new one...insert l->insert(index,o); @@ -224,12 +224,12 @@ void KviSharedFilesManager::doInsert(KviSharedFileList * l, KviSharedFile * o) void KviSharedFilesManager::addSharedFile(KviSharedFile * f) { // First find the list - KviSharedFileList * l = m_pSharedListDict->find(f->name()); + KviSharedFileList * l = m_pSharedListDict->tqfind(f->name()); if(!l) { l = new KviSharedFileList; l->setAutoDelete(true); - m_pSharedListDict->replace(f->name(),l); + m_pSharedListDict->tqreplace(f->name(),l); } doInsert(l,f); @@ -242,18 +242,18 @@ void KviSharedFilesManager::addSharedFile(KviSharedFile * f) emit sharedFileAdded(f); } -KviSharedFile * KviSharedFilesManager::addSharedFile(const QString &szName,const QString &szAbsPath,const QString &szMask,int timeoutInSecs) +KviSharedFile * KviSharedFilesManager::addSharedFile(const TQString &szName,const TQString &szAbsPath,const TQString &szMask,int timeoutInSecs) { - QFileInfo inf(szAbsPath); + TQFileInfo inf(szAbsPath); if(inf.exists() && inf.isFile() && inf.isReadable() && (inf.size() > 0)) { // First find the list - KviSharedFileList * l = m_pSharedListDict->find(szName); + KviSharedFileList * l = m_pSharedListDict->tqfind(szName); if(!l) { l = new KviSharedFileList; l->setAutoDelete(true); - m_pSharedListDict->replace(szName,l); + m_pSharedListDict->tqreplace(szName,l); } // Now insert @@ -270,24 +270,24 @@ KviSharedFile * KviSharedFilesManager::addSharedFile(const QString &szName,const return o; } else { - debug("File %s unreadable: can't add offer",KviQString::toUtf8(szAbsPath).data()); + debug("File %s unreadable: can't add offer",KviTQString::toUtf8(szAbsPath).data()); return 0; } } -KviSharedFile * KviSharedFilesManager::lookupSharedFile(const QString &szName,KviIrcMask * mask,unsigned int uFileSize) +KviSharedFile * KviSharedFilesManager::lookupSharedFile(const TQString &szName,KviIrcMask * tqmask,unsigned int uFileSize) { - KviSharedFileList * l = m_pSharedListDict->find(szName); + KviSharedFileList * l = m_pSharedListDict->tqfind(szName); if(!l)return 0; for(KviSharedFile * o = l->first();o;o = l->next()) { bool bMatch; - if(mask) + if(tqmask) { KviIrcMask umask(o->userMask()); - bMatch = mask->matchedBy(umask); - } else bMatch = KviQString::equalCS(o->userMask(),"*!*@*"); + bMatch = tqmask->matchedBy(umask); + } else bMatch = KviTQString::equalCS(o->userMask(),"*!*@*"); if(bMatch) { if(uFileSize > 0) @@ -299,18 +299,18 @@ KviSharedFile * KviSharedFilesManager::lookupSharedFile(const QString &szName,Kv return 0; } -bool KviSharedFilesManager::removeSharedFile(const QString &szName,const QString &szMask,unsigned int uFileSize) +bool KviSharedFilesManager::removeSharedFile(const TQString &szName,const TQString &szMask,unsigned int uFileSize) { - KviSharedFileList * l = m_pSharedListDict->find(szName); + KviSharedFileList * l = m_pSharedListDict->tqfind(szName); if(!l)return false; for(KviSharedFile * o = l->first();o;o = l->next()) { - if(KviQString::equalCI(szMask,o->userMask())) + if(KviTQString::equalCI(szMask,o->userMask())) { bool bMatch = uFileSize > 0 ? uFileSize == o->fileSize() : true; if(bMatch) { - QString save = szName; // <-- szName MAY Be a pointer to o->name() + TQString save = szName; // <-- szName MAY Be a pointer to o->name() l->removeRef(o); if(l->count() == 0)m_pSharedListDict->remove(save); emit sharedFileRemoved(o); @@ -321,15 +321,15 @@ bool KviSharedFilesManager::removeSharedFile(const QString &szName,const QString return false; } -bool KviSharedFilesManager::removeSharedFile(const QString &szName,KviSharedFile * off) +bool KviSharedFilesManager::removeSharedFile(const TQString &szName,KviSharedFile * off) { - KviSharedFileList * l = m_pSharedListDict->find(szName); + KviSharedFileList * l = m_pSharedListDict->tqfind(szName); if(!l)return false; for(KviSharedFile * o = l->first();o;o = l->next()) { if(off == o) { - QString save = szName; // <-- szName MAY Be a pointer to o->name() + TQString save = szName; // <-- szName MAY Be a pointer to o->name() l->removeRef(o); if(l->count() == 0)m_pSharedListDict->remove(save); emit sharedFileRemoved(off); @@ -340,7 +340,7 @@ bool KviSharedFilesManager::removeSharedFile(const QString &szName,KviSharedFile } -void KviSharedFilesManager::load(const QString &filename) +void KviSharedFilesManager::load(const TQString &filename) { KviConfig cfg(filename,KviConfig::Read); //cfg.clear(); @@ -348,25 +348,25 @@ void KviSharedFilesManager::load(const QString &filename) int num = cfg.readIntEntry("NEntries",0); for(int idx=0;idx it(*m_pSharedListDict); + KviPointerHashTableIterator it(*m_pSharedListDict); int idx = 0; while(KviSharedFileList * l = it.current()) { @@ -374,12 +374,12 @@ void KviSharedFilesManager::save(const QString &filename) { if(((int)(o->expireTime())) == 0) { - QString tmp; - KviQString::sprintf(tmp,"%dFName",idx); + TQString tmp; + KviTQString::sprintf(tmp,"%dFName",idx); cfg.writeEntry(tmp,it.currentKey()); - KviQString::sprintf(tmp,"%dFilePath",idx); + KviTQString::sprintf(tmp,"%dFilePath",idx); cfg.writeEntry(tmp,o->absFilePath()); - KviQString::sprintf(tmp,"%dUserMask",idx); + KviTQString::sprintf(tmp,"%dUserMask",idx); cfg.writeEntry(tmp,o->userMask()); ++idx; } diff --git a/src/kvilib/ext/kvi_sharedfiles.h b/src/kvilib/ext/kvi_sharedfiles.h index 3a6d2239..560e7494 100644 --- a/src/kvilib/ext/kvi_sharedfiles.h +++ b/src/kvilib/ext/kvi_sharedfiles.h @@ -34,28 +34,28 @@ #include "kvi_pointerhashtable.h" #include -#include +#include class KVILIB_API KviSharedFile : public KviHeapObject { public: - KviSharedFile(const QString &szName,const QString &szAbsPath,const QString &szUserMask,time_t expireTime,unsigned int uFileSize); + KviSharedFile(const TQString &szName,const TQString &szAbsPath,const TQString &szUserMask,time_t expireTime,unsigned int uFileSize); ~KviSharedFile(); private: - QString m_szName; - QString m_szAbsFilePath; + TQString m_szName; + TQString m_szAbsFilePath; time_t m_expireTime; - QString m_szUserMask; + TQString m_szUserMask; unsigned int m_uFileSize; unsigned int m_uWildCount; unsigned int m_uNonWildCount; public: - const QString &name(){ return m_szName; }; + const TQString &name(){ return m_szName; }; - const QString &absFilePath(){ return m_szAbsFilePath; }; + const TQString &absFilePath(){ return m_szAbsFilePath; }; - const QString &userMask(){ return m_szUserMask; }; + const TQString &userMask(){ return m_szUserMask; }; time_t expireTime(){ return m_expireTime; }; bool expires(){ return (m_expireTime != 0); }; @@ -64,32 +64,33 @@ public: unsigned int wildcardCount(){ return m_uWildCount; }; unsigned int nonWildcardCount(){ return m_uNonWildCount; }; - int maskLength(){ return m_szUserMask.length(); }; + int tqmaskLength(){ return m_szUserMask.length(); }; }; typedef KviPointerList KviSharedFileList; -class KVILIB_API KviSharedFilesManager : public QObject +class KVILIB_API KviSharedFilesManager : public TQObject { Q_OBJECT + TQ_OBJECT public: KviSharedFilesManager(); ~KviSharedFilesManager(); private: - QTimer * m_pCleanupTimer; - KviPointerHashTable * m_pSharedListDict; + TQTimer * m_pCleanupTimer; + KviPointerHashTable * m_pSharedListDict; public: void addSharedFile(KviSharedFile * f); - KviSharedFile * addSharedFile(const QString &szName,const QString &szAbsPath,const QString &szMask,int timeoutInSecs); - KviSharedFile * lookupSharedFile(const QString &szName,KviIrcMask * mask,unsigned int uFileSize = 0); - bool removeSharedFile(const QString &szName,const QString &szMask,unsigned int uFileSize); - bool removeSharedFile(const QString &szName,KviSharedFile * off); - void load(const QString &filename); - void save(const QString &filename); + KviSharedFile * addSharedFile(const TQString &szName,const TQString &szAbsPath,const TQString &szMask,int timeoutInSecs); + KviSharedFile * lookupSharedFile(const TQString &szName,KviIrcMask * tqmask,unsigned int uFileSize = 0); + bool removeSharedFile(const TQString &szName,const TQString &szMask,unsigned int uFileSize); + bool removeSharedFile(const TQString &szName,KviSharedFile * off); + void load(const TQString &filename); + void save(const TQString &filename); void clear(); - KviPointerHashTable * sharedFileListDict(){ return m_pSharedListDict; }; + KviPointerHashTable * sharedFileListDict(){ return m_pSharedListDict; }; private: void doInsert(KviSharedFileList * l, KviSharedFile * o); private slots: diff --git a/src/kvilib/ext/kvi_stringconversion.cpp b/src/kvilib/ext/kvi_stringconversion.cpp index 3d0255cc..accba786 100644 --- a/src/kvilib/ext/kvi_stringconversion.cpp +++ b/src/kvilib/ext/kvi_stringconversion.cpp @@ -31,25 +31,25 @@ #include "kvi_qstring.h" #include -QString g_szGlobalDir; -QString g_szLocalDir; +TQString g_szGlobalDir; +TQString g_szLocalDir; namespace KviStringConversion { - void init(const QString& szGlobalDir,const QString& szLocalDir) + void init(const TQString& szGlobalDir,const TQString& szLocalDir) { g_szGlobalDir=szGlobalDir; g_szLocalDir=szLocalDir; } - void encodePath(QString& buffer) + void encodePath(TQString& buffer) { if(!buffer.isEmpty()) { if(!g_szLocalDir.isEmpty()) { - if(KviQString::find(buffer,g_szLocalDir)==0) + if(KviTQString::tqfind(buffer,g_szLocalDir)==0) { buffer.remove(0,g_szLocalDir.length()); buffer.prepend("local://"); @@ -57,7 +57,7 @@ namespace KviStringConversion } if(!g_szGlobalDir.isEmpty()) { - if(KviQString::find(buffer,g_szGlobalDir)==0) + if(KviTQString::tqfind(buffer,g_szGlobalDir)==0) { buffer.remove(0,g_szGlobalDir.length()); buffer.prepend("global://"); @@ -66,13 +66,13 @@ namespace KviStringConversion } } - void decodePath(QString& buffer) + void decodePath(TQString& buffer) { if(!buffer.isEmpty()) { if(!g_szLocalDir.isEmpty()) { - if(KviQString::find(buffer,"local://")==0) + if(KviTQString::tqfind(buffer,"local://")==0) { buffer.remove(0,8); buffer.prepend(g_szLocalDir); @@ -80,7 +80,7 @@ namespace KviStringConversion } if(!g_szGlobalDir.isEmpty()) { - if(KviQString::find(buffer,"global://")==0) + if(KviTQString::tqfind(buffer,"global://")==0) { buffer.remove(0,9); buffer.prepend(g_szGlobalDir); @@ -89,66 +89,66 @@ namespace KviStringConversion } } - void encodePath(QStringList& buffer) + void encodePath(TQStringList& buffer) { - for ( QStringList::Iterator it = buffer.begin(); it != buffer.end(); ++it ) + for ( TQStringList::Iterator it = buffer.begin(); it != buffer.end(); ++it ) { encodePath(*it); } } - void decodePath(QStringList& buffer) + void decodePath(TQStringList& buffer) { - for ( QStringList::Iterator it = buffer.begin(); it != buffer.end(); ++it ) + for ( TQStringList::Iterator it = buffer.begin(); it != buffer.end(); ++it ) { decodePath(*it); } } - void toString(const bool bValue,QString &buffer) + void toString(const bool bValue,TQString &buffer) { buffer = bValue ? '1' : '0'; } - bool fromString(const QString & szValue,bool &buffer) + bool fromString(const TQString & szValue,bool &buffer) { if(szValue.isEmpty())buffer = false; - else buffer = !((KviQString::equalCS(szValue,"0")) || (KviQString::equalCI(szValue,"false"))); + else buffer = !((KviTQString::equalCS(szValue,"0")) || (KviTQString::equalCI(szValue,"false"))); return true; } - void toString(const int iValue,QString &buffer) + void toString(const int iValue,TQString &buffer) { buffer.setNum(iValue); } - bool fromString(const QString &szValue,int &buffer) + bool fromString(const TQString &szValue,int &buffer) { bool bOk; buffer = szValue.toInt(&bOk); return bOk; } - void toString(const unsigned int uValue,QString &buffer) + void toString(const unsigned int uValue,TQString &buffer) { buffer.setNum(uValue); } - bool fromString(const QString & szValue,unsigned int &buffer) + bool fromString(const TQString & szValue,unsigned int &buffer) { bool bOk; buffer= szValue.toUInt(&bOk); return bOk; } - void toString(const QRect &rValue,QString &buffer) + void toString(const TQRect &rValue,TQString &buffer) { buffer.sprintf("%d,%d,%d,%d",rValue.x(),rValue.y(),rValue.width(),rValue.height()); } - bool fromString(const QString & szValue,QRect &buffer) + bool fromString(const TQString & szValue,TQRect &buffer) { - KviQCString tmp = KviQString::toUtf8(szValue); + KviTQCString tmp = KviTQString::toUtf8(szValue); const char * c = tmp.data(); if(!c)return false; int l,t,w,h; @@ -157,26 +157,26 @@ namespace KviStringConversion return true; } - void toString(const QString &szValue,QString &buffer) + void toString(const TQString &szValue,TQString &buffer) { buffer = szValue; } - bool fromString(const QString & szValue,QString &buffer) + bool fromString(const TQString & szValue,TQString &buffer) { buffer = szValue; return true; } - void toString(const KviPixmap &pValue,QString &buffer) + void toString(const KviPixmap &pValue,TQString &buffer) { buffer=pValue.path(); encodePath(buffer); } - bool fromString(const QString & szValue,KviPixmap &buffer) + bool fromString(const TQString & szValue,KviPixmap &buffer) { - QString szPath(szValue); + TQString szPath(szValue); decodePath(szPath); if(szPath.isEmpty()) { buffer.setNull(); @@ -186,16 +186,16 @@ namespace KviStringConversion } } - void toString(const KviMsgType &mValue,QString &buffer) + void toString(const KviMsgType &mValue,TQString &buffer) { buffer.sprintf("%d,%u,%u,%d,%d",mValue.m_iPixId,mValue.m_cForeColor,mValue.m_cBackColor,mValue.m_bLogEnabled,mValue.m_iLevel); } - bool fromString(const QString & szValue,KviMsgType &buffer) + bool fromString(const TQString & szValue,KviMsgType &buffer) { int iId,iLog,iLevel; unsigned int uFore,uBack; - KviQCString tmp = KviQString::toUtf8(szValue); + KviTQCString tmp = KviTQString::toUtf8(szValue); char * cx = tmp.data(); if(!cx)return false; if(sscanf(cx,"%d,%u,%u,%d,%d",&iId,&uFore,&uBack,&iLog,&iLevel) != 5)return false; @@ -203,21 +203,21 @@ namespace KviStringConversion return true; } - void toString(const QColor &cValue,QString &buffer) + void toString(const TQColor &cValue,TQString &buffer) { buffer = cValue.name(); } - bool fromString(const QString & szValue,QColor &buffer) + bool fromString(const TQString & szValue,TQColor &buffer) { buffer.setNamedColor(szValue); return true; } - void toString(const QFont &fValue,QString &buffer) + void toString(const TQFont &fValue,TQString &buffer) { - QString family(fValue.family()); - buffer.sprintf("%s,%d,%d,%d",KviQString::toUtf8(family).data(),fValue.pointSize(),fValue.styleHint(),fValue.weight()); - QString options; + TQString family(fValue.family()); + buffer.sprintf("%s,%d,%d,%d",KviTQString::toUtf8(family).data(),fValue.pointSize(),fValue.styleHint(),fValue.weight()); + TQString options; if(fValue.bold())options.append('b'); if(fValue.italic())options.append('i'); if(fValue.underline())options.append('u'); @@ -231,45 +231,45 @@ namespace KviStringConversion } } - bool fromString(const QString & szValue,QFont &buffer) + bool fromString(const TQString & szValue,TQFont &buffer) { KviStr str = szValue; - KviStr family,pointSize,styleHint,weight,options; + KviStr family,pointSize,tqstyleHint,weight,options; str.getToken(family,','); str.getToken(pointSize,','); - str.getToken(styleHint,','); + str.getToken(tqstyleHint,','); str.getToken(weight,','); if(!family.isEmpty())buffer.setFamily(family.ptr()); int i; bool bOk; i = pointSize.toInt(&bOk); if(bOk && (i > 0))buffer.setPointSize(i); - i = styleHint.toInt(&bOk); - if(bOk && (i >= 0))buffer.setStyleHint((QFont::StyleHint)i); + i = tqstyleHint.toInt(&bOk); + if(bOk && (i >= 0))buffer.setStyleHint((TQFont::StyleHint)i); i = weight.toInt(&bOk); if(bOk && (i >= 0))buffer.setWeight(i); if(!str.isEmpty()) { - buffer.setBold(str.contains("b")); - buffer.setItalic(str.contains("i")); - buffer.setUnderline(str.contains("u")); - buffer.setStrikeOut(str.contains("s")); - buffer.setFixedPitch(str.contains("f")); + buffer.setBold(str.tqcontains("b")); + buffer.setItalic(str.tqcontains("i")); + buffer.setUnderline(str.tqcontains("u")); + buffer.setStrikeOut(str.tqcontains("s")); + buffer.setFixedPitch(str.tqcontains("f")); } return true; } - void toString(const QStringList &sValue,QString &buffer) + void toString(const TQStringList &sValue,TQString &buffer) { buffer = sValue.join(","); } - bool fromString(const QString & szValue,QStringList &buffer) + bool fromString(const TQString & szValue,TQStringList &buffer) { #ifdef COMPILE_USE_QT4 buffer = szValue.split(","); #else - buffer = QStringList::split(",",szValue); + buffer = TQStringList::split(",",szValue); #endif return true; } diff --git a/src/kvilib/ext/kvi_stringconversion.h b/src/kvilib/ext/kvi_stringconversion.h index 78f8d417..0412a0e4 100644 --- a/src/kvilib/ext/kvi_stringconversion.h +++ b/src/kvilib/ext/kvi_stringconversion.h @@ -30,62 +30,62 @@ #include "kvi_pixmap.h" #include "kvi_msgtype.h" -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include namespace KviStringConversion { - extern KVILIB_API void init(const QString& szGlobalDir,const QString& szLocalDir); + extern KVILIB_API void init(const TQString& szGlobalDir,const TQString& szLocalDir); - extern KVILIB_API void encodePath(QString& buffer); - extern KVILIB_API void decodePath(QString& buffer); + extern KVILIB_API void encodePath(TQString& buffer); + extern KVILIB_API void decodePath(TQString& buffer); - extern KVILIB_API void encodePath(QStringList& buffer); - extern KVILIB_API void decodePath(QStringList& buffer); + extern KVILIB_API void encodePath(TQStringList& buffer); + extern KVILIB_API void decodePath(TQStringList& buffer); // bool <-> - extern KVILIB_API void toString(const bool bValue,QString &buffer); - extern KVILIB_API bool fromString(const QString &szValue,bool &buffer); + extern KVILIB_API void toString(const bool bValue,TQString &buffer); + extern KVILIB_API bool fromString(const TQString &szValue,bool &buffer); - // int <-> QString - extern KVILIB_API void toString(const int iValue,QString &buffer); - extern KVILIB_API bool fromString(const QString &szValue,int &buffer); + // int <-> TQString + extern KVILIB_API void toString(const int iValue,TQString &buffer); + extern KVILIB_API bool fromString(const TQString &szValue,int &buffer); - // uint <-> QString - extern KVILIB_API void toString(const unsigned int uValue,QString &buffer); - extern KVILIB_API bool fromString(const QString &szValue,unsigned int &buffer); + // uint <-> TQString + extern KVILIB_API void toString(const unsigned int uValue,TQString &buffer); + extern KVILIB_API bool fromString(const TQString &szValue,unsigned int &buffer); - // QRect <-> QString - extern KVILIB_API void toString(const QRect &rValue,QString &buffer); - extern KVILIB_API bool fromString(const QString &szValue,QRect &buffer); + // TQRect <-> TQString + extern KVILIB_API void toString(const TQRect &rValue,TQString &buffer); + extern KVILIB_API bool fromString(const TQString &szValue,TQRect &buffer); - // QString <-> QString (Null conversion) - extern KVILIB_API void toString(const QString &szValue,QString &buffer); - extern KVILIB_API bool fromString(const QString &szValue,QString &buffer); + // TQString <-> TQString (Null conversion) + extern KVILIB_API void toString(const TQString &szValue,TQString &buffer); + extern KVILIB_API bool fromString(const TQString &szValue,TQString &buffer); - // KviPixmap <-> QString - extern KVILIB_API void toString(const KviPixmap &pValue,QString &buffer); - extern KVILIB_API bool fromString(const QString &szValue,KviPixmap &buffer); + // KviPixmap <-> TQString + extern KVILIB_API void toString(const KviPixmap &pValue,TQString &buffer); + extern KVILIB_API bool fromString(const TQString &szValue,KviPixmap &buffer); - // QFont <-> QString - extern KVILIB_API void toString(const QFont &fValue,QString &buffer); - extern KVILIB_API bool fromString(const QString &szValue,QFont &buffer); + // TQFont <-> TQString + extern KVILIB_API void toString(const TQFont &fValue,TQString &buffer); + extern KVILIB_API bool fromString(const TQString &szValue,TQFont &buffer); - // KviMsgType <-> QString - extern KVILIB_API void toString(const KviMsgType &mValue,QString &buffer); - extern KVILIB_API bool fromString(const QString &szValue,KviMsgType &buffer); + // KviMsgType <-> TQString + extern KVILIB_API void toString(const KviMsgType &mValue,TQString &buffer); + extern KVILIB_API bool fromString(const TQString &szValue,KviMsgType &buffer); - // QColor <-> QString - extern KVILIB_API void toString(const QColor &cValue,QString &buffer); - extern KVILIB_API bool fromString(const QString &szValue,QColor &buffer); + // TQColor <-> TQString + extern KVILIB_API void toString(const TQColor &cValue,TQString &buffer); + extern KVILIB_API bool fromString(const TQString &szValue,TQColor &buffer); - // QStringList <-> QString - extern KVILIB_API void toString(const QStringList &sValue,QString &buffer); - extern KVILIB_API bool fromString(const QString &szValue,QStringList &buffer); + // TQStringList <-> TQString + extern KVILIB_API void toString(const TQStringList &sValue,TQString &buffer); + extern KVILIB_API bool fromString(const TQString &szValue,TQStringList &buffer); }; #endif //!_KVI_STRINGCONVERSION_H_ diff --git a/src/kvilib/ext/kvi_xlib.h b/src/kvilib/ext/kvi_xlib.h index ef6ca177..0c14a05e 100644 --- a/src/kvilib/ext/kvi_xlib.h +++ b/src/kvilib/ext/kvi_xlib.h @@ -37,7 +37,7 @@ // Too bad that X11/Xlib.h defines Bool, Error and Success... this basically // SUX since we can't use them anywhere in the source! - // this breaks, enums in Qt, enums in KVIrc and other stuff all around... + // this breaks, enums in TQt, enums in KVIrc and other stuff all around... // Shame on you Xlib.h author :D #endif // !COMPILE_NO_X diff --git a/src/kvilib/ext/moc_kvi_crypt.cpp b/src/kvilib/ext/moc_kvi_crypt.cpp index 89c29d46..cbb8ef7d 100644 --- a/src/kvilib/ext/moc_kvi_crypt.cpp +++ b/src/kvilib/ext/moc_kvi_crypt.cpp @@ -2,21 +2,21 @@ ** KviCryptEngine meta object code from reading C++ file 'kvi_crypt.h' ** ** Created: Sun Mar 23 20:56:10 2008 -** by: The Qt MOC ($Id: qt/moc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) +** by: The TQt TQMOC ($Id: qt/tqmoc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ -#undef QT_NO_COMPAT +#undef TQT_NO_COMPAT #include "kvi_crypt.h" -#include -#include +#include +#include -#include -#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26) -#error "This file was generated using the moc from 3.3.8. It" -#error "cannot be used with the include files from this version of Qt." -#error "(The moc has changed too much.)" +#include +#if !defined(TQ_TQMOC_OUTPUT_REVISION) || (TQ_TQMOC_OUTPUT_REVISION != 26) +#error "This file was generated using the tqmoc from 3.3.8. It" +#error "cannot be used with the include files from this version of TQt." +#error "(The tqmoc has changed too much.)" #endif const char *KviCryptEngine::className() const @@ -24,71 +24,71 @@ const char *KviCryptEngine::className() const return "KviCryptEngine"; } -QMetaObject *KviCryptEngine::metaObj = 0; -static QMetaObjectCleanUp cleanUp_KviCryptEngine( "KviCryptEngine", &KviCryptEngine::staticMetaObject ); +TQMetaObject *KviCryptEngine::metaObj = 0; +static TQMetaObjectCleanUp cleanUp_KviCryptEngine( "KviCryptEngine", &KviCryptEngine::staticMetaObject ); -#ifndef QT_NO_TRANSLATION -QString KviCryptEngine::tr( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION +TQString KviCryptEngine::tr( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviCryptEngine", s, c, QApplication::DefaultCodec ); + if ( tqApp ) + return tqApp->translate( "KviCryptEngine", s, c, TQApplication::DefaultCodec ); else - return QString::fromLatin1( s ); + return TQString::tqfromLatin1( s ); } -#ifndef QT_NO_TRANSLATION_UTF8 -QString KviCryptEngine::trUtf8( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION_UTF8 +TQString KviCryptEngine::trUtf8( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviCryptEngine", s, c, QApplication::UnicodeUTF8 ); + if ( tqApp ) + return tqApp->translate( "KviCryptEngine", s, c, TQApplication::UnicodeUTF8 ); else - return QString::fromUtf8( s ); + return TQString::fromUtf8( s ); } -#endif // QT_NO_TRANSLATION_UTF8 +#endif // TQT_NO_TRANSLATION_UTF8 -#endif // QT_NO_TRANSLATION +#endif // TQT_NO_TRANSLATION -QMetaObject* KviCryptEngine::staticMetaObject() +TQMetaObject* KviCryptEngine::staticMetaObject() { if ( metaObj ) return metaObj; - QMetaObject* parentObject = QObject::staticMetaObject(); - metaObj = QMetaObject::new_metaobject( - "KviCryptEngine", parentObject, + TQMetaObject* tqparentObject = TQObject::staticMetaObject(); + metaObj = TQMetaObject::new_metaobject( + "KviCryptEngine", tqparentObject, 0, 0, 0, 0, -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES 0, 0, 0, 0, -#endif // QT_NO_PROPERTIES +#endif // TQT_NO_PROPERTIES 0, 0 ); cleanUp_KviCryptEngine.setMetaObject( metaObj ); return metaObj; } -void* KviCryptEngine::qt_cast( const char* clname ) +void* KviCryptEngine::tqqt_cast( const char* clname ) { if ( !qstrcmp( clname, "KviCryptEngine" ) ) return this; if ( !qstrcmp( clname, "KviHeapObject" ) ) return (KviHeapObject*)this; - return QObject::qt_cast( clname ); + return TQObject::tqqt_cast( clname ); } -bool KviCryptEngine::qt_invoke( int _id, QUObject* _o ) +bool KviCryptEngine::qt_invoke( int _id, TQUObject* _o ) { - return QObject::qt_invoke(_id,_o); + return TQObject::qt_invoke(_id,_o); } -bool KviCryptEngine::qt_emit( int _id, QUObject* _o ) +bool KviCryptEngine::qt_emit( int _id, TQUObject* _o ) { - return QObject::qt_emit(_id,_o); + return TQObject::qt_emit(_id,_o); } -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES -bool KviCryptEngine::qt_property( int id, int f, QVariant* v) +bool KviCryptEngine::qt_property( int id, int f, TQVariant* v) { - return QObject::qt_property( id, f, v); + return TQObject::qt_property( id, f, v); } -bool KviCryptEngine::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; } -#endif // QT_NO_PROPERTIES +bool KviCryptEngine::qt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; } +#endif // TQT_NO_PROPERTIES diff --git a/src/kvilib/ext/moc_kvi_garbage.cpp b/src/kvilib/ext/moc_kvi_garbage.cpp index 0c1a98ef..a54094dc 100644 --- a/src/kvilib/ext/moc_kvi_garbage.cpp +++ b/src/kvilib/ext/moc_kvi_garbage.cpp @@ -2,21 +2,21 @@ ** KviGarbageCollector meta object code from reading C++ file 'kvi_garbage.h' ** ** Created: Sun Mar 23 20:56:12 2008 -** by: The Qt MOC ($Id: qt/moc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) +** by: The TQt TQMOC ($Id: qt/tqmoc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ -#undef QT_NO_COMPAT +#undef TQT_NO_COMPAT #include "kvi_garbage.h" -#include -#include +#include +#include -#include -#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26) -#error "This file was generated using the moc from 3.3.8. It" -#error "cannot be used with the include files from this version of Qt." -#error "(The moc has changed too much.)" +#include +#if !defined(TQ_TQMOC_OUTPUT_REVISION) || (TQ_TQMOC_OUTPUT_REVISION != 26) +#error "This file was generated using the tqmoc from 3.3.8. It" +#error "cannot be used with the include files from this version of TQt." +#error "(The tqmoc has changed too much.)" #endif const char *KviGarbageCollector::className() const @@ -24,81 +24,81 @@ const char *KviGarbageCollector::className() const return "KviGarbageCollector"; } -QMetaObject *KviGarbageCollector::metaObj = 0; -static QMetaObjectCleanUp cleanUp_KviGarbageCollector( "KviGarbageCollector", &KviGarbageCollector::staticMetaObject ); +TQMetaObject *KviGarbageCollector::metaObj = 0; +static TQMetaObjectCleanUp cleanUp_KviGarbageCollector( "KviGarbageCollector", &KviGarbageCollector::staticMetaObject ); -#ifndef QT_NO_TRANSLATION -QString KviGarbageCollector::tr( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION +TQString KviGarbageCollector::tr( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviGarbageCollector", s, c, QApplication::DefaultCodec ); + if ( tqApp ) + return tqApp->translate( "KviGarbageCollector", s, c, TQApplication::DefaultCodec ); else - return QString::fromLatin1( s ); + return TQString::tqfromLatin1( s ); } -#ifndef QT_NO_TRANSLATION_UTF8 -QString KviGarbageCollector::trUtf8( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION_UTF8 +TQString KviGarbageCollector::trUtf8( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviGarbageCollector", s, c, QApplication::UnicodeUTF8 ); + if ( tqApp ) + return tqApp->translate( "KviGarbageCollector", s, c, TQApplication::UnicodeUTF8 ); else - return QString::fromUtf8( s ); + return TQString::fromUtf8( s ); } -#endif // QT_NO_TRANSLATION_UTF8 +#endif // TQT_NO_TRANSLATION_UTF8 -#endif // QT_NO_TRANSLATION +#endif // TQT_NO_TRANSLATION -QMetaObject* KviGarbageCollector::staticMetaObject() +TQMetaObject* KviGarbageCollector::staticMetaObject() { if ( metaObj ) return metaObj; - QMetaObject* parentObject = QObject::staticMetaObject(); - static const QUMethod slot_0 = {"cleanup", 0, 0 }; - static const QUMethod slot_1 = {"garbageSuicide", 0, 0 }; - static const QMetaData slot_tbl[] = { - { "cleanup()", &slot_0, QMetaData::Protected }, - { "garbageSuicide()", &slot_1, QMetaData::Protected } + TQMetaObject* tqparentObject = TQObject::staticMetaObject(); + static const TQUMethod slot_0 = {"cleanup", 0, 0 }; + static const TQUMethod slot_1 = {"garbageSuicide", 0, 0 }; + static const TQMetaData slot_tbl[] = { + { "cleanup()", &slot_0, TQMetaData::Protected }, + { "garbageSuicide()", &slot_1, TQMetaData::Protected } }; - metaObj = QMetaObject::new_metaobject( - "KviGarbageCollector", parentObject, + metaObj = TQMetaObject::new_metaobject( + "KviGarbageCollector", tqparentObject, slot_tbl, 2, 0, 0, -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES 0, 0, 0, 0, -#endif // QT_NO_PROPERTIES +#endif // TQT_NO_PROPERTIES 0, 0 ); cleanUp_KviGarbageCollector.setMetaObject( metaObj ); return metaObj; } -void* KviGarbageCollector::qt_cast( const char* clname ) +void* KviGarbageCollector::tqqt_cast( const char* clname ) { if ( !qstrcmp( clname, "KviGarbageCollector" ) ) return this; - return QObject::qt_cast( clname ); + return TQObject::tqqt_cast( clname ); } -bool KviGarbageCollector::qt_invoke( int _id, QUObject* _o ) +bool KviGarbageCollector::qt_invoke( int _id, TQUObject* _o ) { switch ( _id - staticMetaObject()->slotOffset() ) { case 0: cleanup(); break; case 1: garbageSuicide(); break; default: - return QObject::qt_invoke( _id, _o ); + return TQObject::qt_invoke( _id, _o ); } return TRUE; } -bool KviGarbageCollector::qt_emit( int _id, QUObject* _o ) +bool KviGarbageCollector::qt_emit( int _id, TQUObject* _o ) { - return QObject::qt_emit(_id,_o); + return TQObject::qt_emit(_id,_o); } -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES -bool KviGarbageCollector::qt_property( int id, int f, QVariant* v) +bool KviGarbageCollector::qt_property( int id, int f, TQVariant* v) { - return QObject::qt_property( id, f, v); + return TQObject::qt_property( id, f, v); } -bool KviGarbageCollector::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; } -#endif // QT_NO_PROPERTIES +bool KviGarbageCollector::qt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; } +#endif // TQT_NO_PROPERTIES diff --git a/src/kvilib/ext/moc_kvi_regusersdb.cpp b/src/kvilib/ext/moc_kvi_regusersdb.cpp index 092add9f..88a76f83 100644 --- a/src/kvilib/ext/moc_kvi_regusersdb.cpp +++ b/src/kvilib/ext/moc_kvi_regusersdb.cpp @@ -2,21 +2,21 @@ ** KviRegisteredUserDataBase meta object code from reading C++ file 'kvi_regusersdb.h' ** ** Created: Sun Mar 23 20:56:14 2008 -** by: The Qt MOC ($Id: qt/moc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) +** by: The TQt TQMOC ($Id: qt/tqmoc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ -#undef QT_NO_COMPAT +#undef TQT_NO_COMPAT #include "kvi_regusersdb.h" -#include -#include - -#include -#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26) -#error "This file was generated using the moc from 3.3.8. It" -#error "cannot be used with the include files from this version of Qt." -#error "(The moc has changed too much.)" +#include +#include + +#include +#if !defined(TQ_TQMOC_OUTPUT_REVISION) || (TQ_TQMOC_OUTPUT_REVISION != 26) +#error "This file was generated using the tqmoc from 3.3.8. It" +#error "cannot be used with the include files from this version of TQt." +#error "(The tqmoc has changed too much.)" #endif const char *KviRegisteredUserDataBase::className() const @@ -24,120 +24,120 @@ const char *KviRegisteredUserDataBase::className() const return "KviRegisteredUserDataBase"; } -QMetaObject *KviRegisteredUserDataBase::metaObj = 0; -static QMetaObjectCleanUp cleanUp_KviRegisteredUserDataBase( "KviRegisteredUserDataBase", &KviRegisteredUserDataBase::staticMetaObject ); +TQMetaObject *KviRegisteredUserDataBase::metaObj = 0; +static TQMetaObjectCleanUp cleanUp_KviRegisteredUserDataBase( "KviRegisteredUserDataBase", &KviRegisteredUserDataBase::staticMetaObject ); -#ifndef QT_NO_TRANSLATION -QString KviRegisteredUserDataBase::tr( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION +TQString KviRegisteredUserDataBase::tr( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviRegisteredUserDataBase", s, c, QApplication::DefaultCodec ); + if ( tqApp ) + return tqApp->translate( "KviRegisteredUserDataBase", s, c, TQApplication::DefaultCodec ); else - return QString::fromLatin1( s ); + return TQString::tqfromLatin1( s ); } -#ifndef QT_NO_TRANSLATION_UTF8 -QString KviRegisteredUserDataBase::trUtf8( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION_UTF8 +TQString KviRegisteredUserDataBase::trUtf8( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviRegisteredUserDataBase", s, c, QApplication::UnicodeUTF8 ); + if ( tqApp ) + return tqApp->translate( "KviRegisteredUserDataBase", s, c, TQApplication::UnicodeUTF8 ); else - return QString::fromUtf8( s ); + return TQString::fromUtf8( s ); } -#endif // QT_NO_TRANSLATION_UTF8 +#endif // TQT_NO_TRANSLATION_UTF8 -#endif // QT_NO_TRANSLATION +#endif // TQT_NO_TRANSLATION -QMetaObject* KviRegisteredUserDataBase::staticMetaObject() +TQMetaObject* KviRegisteredUserDataBase::staticMetaObject() { if ( metaObj ) return metaObj; - QMetaObject* parentObject = QObject::staticMetaObject(); - static const QUParameter param_signal_0[] = { - { 0, &static_QUType_QString, 0, QUParameter::In } + TQMetaObject* tqparentObject = TQObject::staticMetaObject(); + static const TQUParameter param_signal_0[] = { + { 0, &static_TQUType_TQString, 0, TQUParameter::In } }; - static const QUMethod signal_0 = {"userRemoved", 1, param_signal_0 }; - static const QUParameter param_signal_1[] = { - { 0, &static_QUType_QString, 0, QUParameter::In } + static const TQUMethod signal_0 = {"userRemoved", 1, param_signal_0 }; + static const TQUParameter param_signal_1[] = { + { 0, &static_TQUType_TQString, 0, TQUParameter::In } }; - static const QUMethod signal_1 = {"userChanged", 1, param_signal_1 }; - static const QUParameter param_signal_2[] = { - { 0, &static_QUType_QString, 0, QUParameter::In } + static const TQUMethod signal_1 = {"userChanged", 1, param_signal_1 }; + static const TQUParameter param_signal_2[] = { + { 0, &static_TQUType_TQString, 0, TQUParameter::In } }; - static const QUMethod signal_2 = {"userAdded", 1, param_signal_2 }; - static const QUMethod signal_3 = {"databaseCleared", 0, 0 }; - static const QMetaData signal_tbl[] = { - { "userRemoved(const QString&)", &signal_0, QMetaData::Public }, - { "userChanged(const QString&)", &signal_1, QMetaData::Public }, - { "userAdded(const QString&)", &signal_2, QMetaData::Public }, - { "databaseCleared()", &signal_3, QMetaData::Public } + static const TQUMethod signal_2 = {"userAdded", 1, param_signal_2 }; + static const TQUMethod signal_3 = {"databaseCleared", 0, 0 }; + static const TQMetaData signal_tbl[] = { + { "userRemoved(const TQString&)", &signal_0, TQMetaData::Public }, + { "userChanged(const TQString&)", &signal_1, TQMetaData::Public }, + { "userAdded(const TQString&)", &signal_2, TQMetaData::Public }, + { "databaseCleared()", &signal_3, TQMetaData::Public } }; - metaObj = QMetaObject::new_metaobject( - "KviRegisteredUserDataBase", parentObject, + metaObj = TQMetaObject::new_metaobject( + "KviRegisteredUserDataBase", tqparentObject, 0, 0, signal_tbl, 4, -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES 0, 0, 0, 0, -#endif // QT_NO_PROPERTIES +#endif // TQT_NO_PROPERTIES 0, 0 ); cleanUp_KviRegisteredUserDataBase.setMetaObject( metaObj ); return metaObj; } -void* KviRegisteredUserDataBase::qt_cast( const char* clname ) +void* KviRegisteredUserDataBase::tqqt_cast( const char* clname ) { if ( !qstrcmp( clname, "KviRegisteredUserDataBase" ) ) return this; - return QObject::qt_cast( clname ); + return TQObject::tqqt_cast( clname ); } -// SIGNAL userRemoved -void KviRegisteredUserDataBase::userRemoved( const QString& t0 ) +// TQT_SIGNAL userRemoved +void KviRegisteredUserDataBase::userRemoved( const TQString& t0 ) { activate_signal( staticMetaObject()->signalOffset() + 0, t0 ); } -// SIGNAL userChanged -void KviRegisteredUserDataBase::userChanged( const QString& t0 ) +// TQT_SIGNAL userChanged +void KviRegisteredUserDataBase::userChanged( const TQString& t0 ) { activate_signal( staticMetaObject()->signalOffset() + 1, t0 ); } -// SIGNAL userAdded -void KviRegisteredUserDataBase::userAdded( const QString& t0 ) +// TQT_SIGNAL userAdded +void KviRegisteredUserDataBase::userAdded( const TQString& t0 ) { activate_signal( staticMetaObject()->signalOffset() + 2, t0 ); } -// SIGNAL databaseCleared +// TQT_SIGNAL databaseCleared void KviRegisteredUserDataBase::databaseCleared() { activate_signal( staticMetaObject()->signalOffset() + 3 ); } -bool KviRegisteredUserDataBase::qt_invoke( int _id, QUObject* _o ) +bool KviRegisteredUserDataBase::qt_invoke( int _id, TQUObject* _o ) { - return QObject::qt_invoke(_id,_o); + return TQObject::qt_invoke(_id,_o); } -bool KviRegisteredUserDataBase::qt_emit( int _id, QUObject* _o ) +bool KviRegisteredUserDataBase::qt_emit( int _id, TQUObject* _o ) { switch ( _id - staticMetaObject()->signalOffset() ) { - case 0: userRemoved((const QString&)static_QUType_QString.get(_o+1)); break; - case 1: userChanged((const QString&)static_QUType_QString.get(_o+1)); break; - case 2: userAdded((const QString&)static_QUType_QString.get(_o+1)); break; + case 0: userRemoved((const TQString&)static_TQUType_TQString.get(_o+1)); break; + case 1: userChanged((const TQString&)static_TQUType_TQString.get(_o+1)); break; + case 2: userAdded((const TQString&)static_TQUType_TQString.get(_o+1)); break; case 3: databaseCleared(); break; default: - return QObject::qt_emit(_id,_o); + return TQObject::qt_emit(_id,_o); } return TRUE; } -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES -bool KviRegisteredUserDataBase::qt_property( int id, int f, QVariant* v) +bool KviRegisteredUserDataBase::qt_property( int id, int f, TQVariant* v) { - return QObject::qt_property( id, f, v); + return TQObject::qt_property( id, f, v); } -bool KviRegisteredUserDataBase::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; } -#endif // QT_NO_PROPERTIES +bool KviRegisteredUserDataBase::qt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; } +#endif // TQT_NO_PROPERTIES diff --git a/src/kvilib/ext/moc_kvi_sharedfiles.cpp b/src/kvilib/ext/moc_kvi_sharedfiles.cpp index 83ea82a4..86c1837e 100644 --- a/src/kvilib/ext/moc_kvi_sharedfiles.cpp +++ b/src/kvilib/ext/moc_kvi_sharedfiles.cpp @@ -2,21 +2,21 @@ ** KviSharedFilesManager meta object code from reading C++ file 'kvi_sharedfiles.h' ** ** Created: Sun Mar 23 20:56:15 2008 -** by: The Qt MOC ($Id: qt/moc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) +** by: The TQt TQMOC ($Id: qt/tqmoc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ -#undef QT_NO_COMPAT +#undef TQT_NO_COMPAT #include "kvi_sharedfiles.h" -#include -#include - -#include -#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26) -#error "This file was generated using the moc from 3.3.8. It" -#error "cannot be used with the include files from this version of Qt." -#error "(The moc has changed too much.)" +#include +#include + +#include +#if !defined(TQ_TQMOC_OUTPUT_REVISION) || (TQ_TQMOC_OUTPUT_REVISION != 26) +#error "This file was generated using the tqmoc from 3.3.8. It" +#error "cannot be used with the include files from this version of TQt." +#error "(The tqmoc has changed too much.)" #endif const char *KviSharedFilesManager::className() const @@ -24,134 +24,134 @@ const char *KviSharedFilesManager::className() const return "KviSharedFilesManager"; } -QMetaObject *KviSharedFilesManager::metaObj = 0; -static QMetaObjectCleanUp cleanUp_KviSharedFilesManager( "KviSharedFilesManager", &KviSharedFilesManager::staticMetaObject ); +TQMetaObject *KviSharedFilesManager::metaObj = 0; +static TQMetaObjectCleanUp cleanUp_KviSharedFilesManager( "KviSharedFilesManager", &KviSharedFilesManager::staticMetaObject ); -#ifndef QT_NO_TRANSLATION -QString KviSharedFilesManager::tr( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION +TQString KviSharedFilesManager::tr( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviSharedFilesManager", s, c, QApplication::DefaultCodec ); + if ( tqApp ) + return tqApp->translate( "KviSharedFilesManager", s, c, TQApplication::DefaultCodec ); else - return QString::fromLatin1( s ); + return TQString::tqfromLatin1( s ); } -#ifndef QT_NO_TRANSLATION_UTF8 -QString KviSharedFilesManager::trUtf8( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION_UTF8 +TQString KviSharedFilesManager::trUtf8( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviSharedFilesManager", s, c, QApplication::UnicodeUTF8 ); + if ( tqApp ) + return tqApp->translate( "KviSharedFilesManager", s, c, TQApplication::UnicodeUTF8 ); else - return QString::fromUtf8( s ); + return TQString::fromUtf8( s ); } -#endif // QT_NO_TRANSLATION_UTF8 +#endif // TQT_NO_TRANSLATION_UTF8 -#endif // QT_NO_TRANSLATION +#endif // TQT_NO_TRANSLATION -QMetaObject* KviSharedFilesManager::staticMetaObject() +TQMetaObject* KviSharedFilesManager::staticMetaObject() { if ( metaObj ) return metaObj; - QMetaObject* parentObject = QObject::staticMetaObject(); - static const QUMethod slot_0 = {"cleanup", 0, 0 }; - static const QMetaData slot_tbl[] = { - { "cleanup()", &slot_0, QMetaData::Private } + TQMetaObject* tqparentObject = TQObject::staticMetaObject(); + static const TQUMethod slot_0 = {"cleanup", 0, 0 }; + static const TQMetaData slot_tbl[] = { + { "cleanup()", &slot_0, TQMetaData::Private } }; - static const QUMethod signal_0 = {"sharedFilesChanged", 0, 0 }; - static const QUParameter param_signal_1[] = { - { "f", &static_QUType_ptr, "KviSharedFile", QUParameter::In } + static const TQUMethod signal_0 = {"sharedFilesChanged", 0, 0 }; + static const TQUParameter param_signal_1[] = { + { "f", &static_TQUType_ptr, "KviSharedFile", TQUParameter::In } }; - static const QUMethod signal_1 = {"sharedFileAdded", 1, param_signal_1 }; - static const QUParameter param_signal_2[] = { - { "f", &static_QUType_ptr, "KviSharedFile", QUParameter::In } + static const TQUMethod signal_1 = {"sharedFileAdded", 1, param_signal_1 }; + static const TQUParameter param_signal_2[] = { + { "f", &static_TQUType_ptr, "KviSharedFile", TQUParameter::In } }; - static const QUMethod signal_2 = {"sharedFileRemoved", 1, param_signal_2 }; - static const QMetaData signal_tbl[] = { - { "sharedFilesChanged()", &signal_0, QMetaData::Private }, - { "sharedFileAdded(KviSharedFile*)", &signal_1, QMetaData::Private }, - { "sharedFileRemoved(KviSharedFile*)", &signal_2, QMetaData::Private } + static const TQUMethod signal_2 = {"sharedFileRemoved", 1, param_signal_2 }; + static const TQMetaData signal_tbl[] = { + { "sharedFilesChanged()", &signal_0, TQMetaData::Private }, + { "sharedFileAdded(KviSharedFile*)", &signal_1, TQMetaData::Private }, + { "sharedFileRemoved(KviSharedFile*)", &signal_2, TQMetaData::Private } }; - metaObj = QMetaObject::new_metaobject( - "KviSharedFilesManager", parentObject, + metaObj = TQMetaObject::new_metaobject( + "KviSharedFilesManager", tqparentObject, slot_tbl, 1, signal_tbl, 3, -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES 0, 0, 0, 0, -#endif // QT_NO_PROPERTIES +#endif // TQT_NO_PROPERTIES 0, 0 ); cleanUp_KviSharedFilesManager.setMetaObject( metaObj ); return metaObj; } -void* KviSharedFilesManager::qt_cast( const char* clname ) +void* KviSharedFilesManager::tqqt_cast( const char* clname ) { if ( !qstrcmp( clname, "KviSharedFilesManager" ) ) return this; - return QObject::qt_cast( clname ); + return TQObject::tqqt_cast( clname ); } -// SIGNAL sharedFilesChanged +// TQT_SIGNAL sharedFilesChanged void KviSharedFilesManager::sharedFilesChanged() { activate_signal( staticMetaObject()->signalOffset() + 0 ); } -#include -#include +#include +#include -// SIGNAL sharedFileAdded +// TQT_SIGNAL sharedFileAdded void KviSharedFilesManager::sharedFileAdded( KviSharedFile* t0 ) { if ( signalsBlocked() ) return; - QConnectionList *clist = receivers( staticMetaObject()->signalOffset() + 1 ); + TQConnectionList *clist = tqreceivers( staticMetaObject()->signalOffset() + 1 ); if ( !clist ) return; - QUObject o[2]; - static_QUType_ptr.set(o+1,t0); + TQUObject o[2]; + static_TQUType_ptr.set(o+1,t0); activate_signal( clist, o ); } -// SIGNAL sharedFileRemoved +// TQT_SIGNAL sharedFileRemoved void KviSharedFilesManager::sharedFileRemoved( KviSharedFile* t0 ) { if ( signalsBlocked() ) return; - QConnectionList *clist = receivers( staticMetaObject()->signalOffset() + 2 ); + TQConnectionList *clist = tqreceivers( staticMetaObject()->signalOffset() + 2 ); if ( !clist ) return; - QUObject o[2]; - static_QUType_ptr.set(o+1,t0); + TQUObject o[2]; + static_TQUType_ptr.set(o+1,t0); activate_signal( clist, o ); } -bool KviSharedFilesManager::qt_invoke( int _id, QUObject* _o ) +bool KviSharedFilesManager::qt_invoke( int _id, TQUObject* _o ) { switch ( _id - staticMetaObject()->slotOffset() ) { case 0: cleanup(); break; default: - return QObject::qt_invoke( _id, _o ); + return TQObject::qt_invoke( _id, _o ); } return TRUE; } -bool KviSharedFilesManager::qt_emit( int _id, QUObject* _o ) +bool KviSharedFilesManager::qt_emit( int _id, TQUObject* _o ) { switch ( _id - staticMetaObject()->signalOffset() ) { case 0: sharedFilesChanged(); break; - case 1: sharedFileAdded((KviSharedFile*)static_QUType_ptr.get(_o+1)); break; - case 2: sharedFileRemoved((KviSharedFile*)static_QUType_ptr.get(_o+1)); break; + case 1: sharedFileAdded((KviSharedFile*)static_TQUType_ptr.get(_o+1)); break; + case 2: sharedFileRemoved((KviSharedFile*)static_TQUType_ptr.get(_o+1)); break; default: - return QObject::qt_emit(_id,_o); + return TQObject::qt_emit(_id,_o); } return TRUE; } -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES -bool KviSharedFilesManager::qt_property( int id, int f, QVariant* v) +bool KviSharedFilesManager::qt_property( int id, int f, TQVariant* v) { - return QObject::qt_property( id, f, v); + return TQObject::qt_property( id, f, v); } -bool KviSharedFilesManager::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; } -#endif // QT_NO_PROPERTIES +bool KviSharedFilesManager::qt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; } +#endif // TQT_NO_PROPERTIES diff --git a/src/kvilib/file/kvi_file.cpp b/src/kvilib/file/kvi_file.cpp index 8ab1e739..227a4997 100644 --- a/src/kvilib/file/kvi_file.cpp +++ b/src/kvilib/file/kvi_file.cpp @@ -30,12 +30,12 @@ KviFile::KviFile() -: QFile() +: TQFile() { } -KviFile::KviFile(const QString &name) -: QFile(name) +KviFile::KviFile(const TQString &name) +: TQFile(name) { } @@ -46,7 +46,7 @@ KviFile::~KviFile() bool KviFile::openForReading() { #ifdef COMPILE_USE_QT4 - return open(QFile::ReadOnly); + return open(TQFile::ReadOnly); #else return open(IO_ReadOnly); #endif @@ -55,41 +55,41 @@ bool KviFile::openForReading() bool KviFile::openForWriting(bool bAppend) { #ifdef COMPILE_USE_QT4 - return open(QFile::WriteOnly | (bAppend ? QFile::Append : QFile::Truncate)); + return open(TQFile::WriteOnly | (bAppend ? TQFile::Append : TQFile::Truncate)); #else return open(IO_WriteOnly | (bAppend ? IO_Append : IO_Truncate)); #endif } -bool KviFile::save(const QByteArray &bData) +bool KviFile::save(const TQByteArray &bData) { if(!save((kvi_u32_t)(bData.size())))return false; return (writeBlock(bData.data(),bData.size()) == ((int)(bData.size()))); } -bool KviFile::load(QByteArray &bData) +bool KviFile::load(TQByteArray &bData) { kvi_u32_t iLen; if(!load(iLen))return false; - bData.resize(iLen); // it is automatically null terminated in Qt 4.x... BLEAH :D + bData.resize(iLen); // it is automatically null terminated in TQt 4.x... BLEAH :D if(readBlock((char *)(bData.data()),iLen) != iLen)return false; return true; } #ifndef COMPILE_USE_QT4 -bool KviFile::save(const KviQCString &szData) +bool KviFile::save(const KviTQCString &szData) { if(!save((kvi_u32_t)(szData.length())))return false; return (writeBlock(szData.data(),szData.length()) == ((int)(szData.length()))); } -bool KviFile::load(KviQCString &szData) +bool KviFile::load(KviTQCString &szData) { kvi_u32_t iLen; if(!load(iLen))return false; - szData.resize(iLen + 1); // this would allocate one extra byte with Qt 4.x... + szData.resize(iLen + 1); // this would allocate one extra byte with TQt 4.x... if(readBlock((char *)(szData.data()),iLen) != iLen)return false; *(szData.data() + iLen) = 0; return true; @@ -98,22 +98,22 @@ bool KviFile::load(KviQCString &szData) #endif -bool KviFile::save(const QString &szData) +bool KviFile::save(const TQString &szData) { - KviQCString c = KviQString::toUtf8(szData); + KviTQCString c = KviTQString::toUtf8(szData); if(!save((kvi_u32_t)(c.length())))return false; return (writeBlock(c.data(),c.length()) == ((int)(c.length()))); } -bool KviFile::load(QString &szData) +bool KviFile::load(TQString &szData) { kvi_u32_t iLen; if(!load(iLen))return false; - KviQCString tmp; + KviTQCString tmp; tmp.resize(iLen + 1); if(readBlock((char *)(tmp.data()),iLen) != iLen)return false; *(tmp.data() + iLen) = 0; - szData = QString::fromUtf8(tmp.data()); + szData = TQString::fromUtf8(tmp.data()); return true; } diff --git a/src/kvilib/file/kvi_file.h b/src/kvilib/file/kvi_file.h index 188a9dad..7cce041f 100644 --- a/src/kvilib/file/kvi_file.h +++ b/src/kvilib/file/kvi_file.h @@ -33,29 +33,33 @@ #include "kvi_inttypes.h" #include "kvi_qcstring.h" -#include +#include #include #ifdef COMPILE_USE_QT4 #define kvi_file_offset_t qlonglong #else - #define kvi_file_offset_t QFile::Offset +#ifdef USE_QT4 + #define kvi_file_offset_t qint64 +#else // USE_QT4 + #define kvi_file_offset_t TQFile::Offset +#endif // USE_QT4 #endif -class KVILIB_API KviFile : public QFile, public KviHeapObject +class KVILIB_API KviFile : public TQFile, public KviHeapObject { public: KviFile(); - KviFile(const QString &name); + KviFile(const TQString &name); ~KviFile(); public: - // Wrappers portable across Qt 3.x and Qt 4.x + // Wrappers portable across TQt 3.x and TQt 4.x bool openForReading(); bool openForWriting(bool bAppend = false); #ifndef COMPILE_USE_QT4 - // Functions present in Qt 4.x but not Qt 3.x + // Functions present in TQt 4.x but not TQt 3.x bool putChar(char c){ return putch(c) != -1; }; bool ungetChar(char c){ return ungetch(c) != -1; }; bool getChar(char * c){ *c = getch(); return *c != -1; }; @@ -64,7 +68,7 @@ public: #endif #ifdef COMPILE_USE_QT4 - // Missing functions in Qt 4.x + // Missing functions in TQt 4.x quint64 writeBlock(const char * data,quint64 uLen){ return write(data,uLen); }; quint64 readBlock(char * data,quint64 uLen){ return read(data,uLen); }; #endif @@ -98,16 +102,16 @@ public: bool load(KviStr &szData); #ifndef COMPILE_USE_QT4 - // Under Qt 4.x these collide with QByteArray - bool save(const KviQCString &szData); - bool load(KviQCString &szData); + // Under TQt 4.x these collide with TQByteArray + bool save(const KviTQCString &szData); + bool load(KviTQCString &szData); #endif - bool save(const QByteArray &bData); - bool load(QByteArray &bData); + bool save(const TQByteArray &bData); + bool load(TQByteArray &bData); - bool save(const QString &szData); - bool load(QString &szData); + bool save(const TQString &szData); + bool load(TQString &szData); bool skipFirst(char t,unsigned int maxdist = 0xffffffff); bool skipFirst(const KviStr &t,unsigned int maxdist = 0xffffffff); diff --git a/src/kvilib/file/kvi_fileutils.cpp b/src/kvilib/file/kvi_fileutils.cpp index 648d9125..1ad09d60 100644 --- a/src/kvilib/file/kvi_fileutils.cpp +++ b/src/kvilib/file/kvi_fileutils.cpp @@ -31,18 +31,18 @@ #include "kvi_file.h" #include "kvi_malloc.h" -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include namespace KviFileUtils { /* WORKING CODE BUT UNUSED FOR NOW - bool readLine(QFile * f,QString &szBuffer,bool bClearBuffer) + bool readLine(TQFile * f,TQString &szBuffer,bool bClearBuffer) { // FIXME: Should this assume UTF8 encoding ? char tmp_buf[256]; @@ -60,7 +60,7 @@ namespace KviFileUtils if(tmp_buf[255] == '\r')cur_len--; //Ignore CR... int lastlen = szBuffer.length(); szBuffer.setLength(lastlen + cur_len); - QChar *p1 = szBuffer.unicode() + lastlen; + TQChar *p1 = szBuffer.tqunicode() + lastlen; char * p2 = tmp_buf; for(int i=0;i 2) && (szPath.at(0) != QChar('/'))) + if((szPath.length() > 2) && (szPath.at(0) != TQChar('/'))) { - if((szPath.at(1) == QChar(':')) && (szPath.at(2) == QChar('/'))) + if((szPath.at(1) == TQChar(':')) && (szPath.at(2) == TQChar('/'))) { szPath.remove(0,2); } } #ifdef COMPILE_USE_QT4 - szPath=QDir::cleanPath(szPath); + szPath=TQDir::cleanPath(szPath); #else - szPath=QDir::cleanDirPath(szPath); + szPath=TQDir::cleanDirPath(szPath); #endif #endif } - bool directoryExists(const QString &szPath) + bool directoryExists(const TQString &szPath) { - QFileInfo f(szPath); + TQFileInfo f(szPath); return (f.exists() && f.isDir()); } bool directoryExists(const char* path) { - QString szPath=QString::fromUtf8(path); - QFileInfo f(szPath); + TQString szPath=TQString::fromUtf8(path); + TQFileInfo f(szPath); return (f.exists() && f.isDir()); } - bool fileExists(const QString &szPath) + bool fileExists(const TQString &szPath) { - QFileInfo f(szPath); + TQFileInfo f(szPath); return (f.exists() && f.isFile()); } bool fileExists(const char* path) { - QString szPath=QString::fromUtf8(path); + TQString szPath=TQString::fromUtf8(path); return fileExists(szPath); } - bool removeFile(const QString &szPath) + bool removeFile(const TQString &szPath) { - QDir d; + TQDir d; return d.remove(szPath); } bool removeFile(const char* path) { - QString szPath=QString::fromUtf8(path); + TQString szPath=TQString::fromUtf8(path); return removeFile(szPath); } - bool removeDir(const QString &szPath) + bool removeDir(const TQString &szPath) { - QDir d; + TQDir d; return d.rmdir(szPath); } bool removeDir(const char* path) { - QString szPath=QString::fromUtf8(path); + TQString szPath=TQString::fromUtf8(path); return removeDir(szPath); } - bool deleteDir(const QString &szPath) + bool deleteDir(const TQString &szPath) { - QDir d(szPath); - QStringList sl = d.entryList(QDir::Dirs); - QStringList::Iterator it; + TQDir d(szPath); + TQStringList sl = d.entryList(TQDir::Dirs); + TQStringList::Iterator it; for(it=sl.begin();it != sl.end();it++) { - QString szSubdir = *it; - if(!(KviQString::equalCS(szSubdir,"..") || KviQString::equalCS(szSubdir,"."))) + TQString szSubdir = *it; + if(!(KviTQString::equalCS(szSubdir,"..") || KviTQString::equalCS(szSubdir,"."))) { - QString szSubPath = szPath; - KviQString::ensureLastCharIs(szSubPath,QChar(KVI_PATH_SEPARATOR_CHAR)); + TQString szSubPath = szPath; + KviTQString::ensureLastCharIs(szSubPath,TQChar(KVI_PATH_SEPARATOR_CHAR)); szSubPath += szSubdir; if(!KviFileUtils::deleteDir(szSubPath)) return false; } } - sl = d.entryList(QDir::Files); + sl = d.entryList(TQDir::Files); for(it=sl.begin();it != sl.end();it++) { - QString szFilePath = szPath; - KviQString::ensureLastCharIs(szFilePath,QChar(KVI_PATH_SEPARATOR_CHAR)); + TQString szFilePath = szPath; + KviTQString::ensureLastCharIs(szFilePath,TQChar(KVI_PATH_SEPARATOR_CHAR)); szFilePath += *it; if(!KviFileUtils::removeFile(szFilePath)) return false; @@ -324,39 +324,39 @@ namespace KviFileUtils return KviFileUtils::removeDir(szPath); } - bool writeFile(const QString &szPath,const QString &szData,bool bAppend) + bool writeFile(const TQString &szPath,const TQString &szData,bool bAppend) { KviFile f(szPath); if(!f.openForWriting(bAppend))return false; - KviQCString szTmp = KviQString::toUtf8(szData); + KviTQCString szTmp = KviTQString::toUtf8(szData); if(!szTmp.data())return true; if(f.writeBlock(szTmp.data(),szTmp.length()) != ((int)(szTmp.length())))return false; return true; } - bool writeFile(const char* path,const QString &szData,bool bAppend) + bool writeFile(const char* path,const TQString &szData,bool bAppend) { - QString szPath=QString::fromUtf8(path); + TQString szPath=TQString::fromUtf8(path); return writeFile(szPath,szData,bAppend); } - bool writeFileLocal8Bit(const QString &szPath,const QString &szData,bool bAppend) + bool writeFileLocal8Bit(const TQString &szPath,const TQString &szData,bool bAppend) { KviFile f(szPath); if(!f.openForWriting(bAppend))return false; - KviQCString szTmp = QTextCodec::codecForLocale()->fromUnicode(szData); + KviTQCString szTmp = TQTextCodec::codecForLocale()->fromUnicode(szData); if(!szTmp.data())return true; if(f.writeBlock(szTmp.data(),szTmp.length()) != ((int)(szTmp.length())))return false; return true; } - bool writeFileLocal8Bit(const char* path,const QString &szData,bool bAppend) + bool writeFileLocal8Bit(const char* path,const TQString &szData,bool bAppend) { - QString szPath=QString::fromUtf8(path); + TQString szPath=TQString::fromUtf8(path); return writeFileLocal8Bit(szPath,szData,bAppend); } - bool readFile(const QString &szPath,QString &szBuffer,unsigned int uMaxSize) + bool readFile(const TQString &szPath,TQString &szBuffer,unsigned int uMaxSize) { KviFile f(szPath); if(!f.openForReading())return false; @@ -375,40 +375,40 @@ namespace KviFileUtils return false; } buf[f.size()] = '\0'; - szBuffer = QString::fromUtf8(buf); + szBuffer = TQString::fromUtf8(buf); delete[] buf; return true; } - bool readFile(const char* path,QString &szBuffer,unsigned int uMaxSize) + bool readFile(const char* path,TQString &szBuffer,unsigned int uMaxSize) { - QString szPath=QString::fromUtf8(path); + TQString szPath=TQString::fromUtf8(path); return readFile(szPath,szBuffer,uMaxSize); } - QString extractFileName(const QString &szFileNameWithPath) + TQString extractFileName(const TQString &szFileNameWithPath) { - return QFileInfo(szFileNameWithPath).fileName(); + return TQFileInfo(szFileNameWithPath).fileName(); } - QString extractFilePath(const QString &szFileNameWithPath) + TQString extractFilePath(const TQString &szFileNameWithPath) { - return QFileInfo(szFileNameWithPath).dirPath(true); + return TQFileInfo(szFileNameWithPath).dirPath(true); } - bool readLine(QFile * f,QString &szBuffer,bool bUtf8) + bool readLine(TQFile * f,TQString &szBuffer,bool bUtf8) { - QTextStream stream(f); - stream.setEncoding(bUtf8 ? QTextStream::UnicodeUTF8 : QTextStream::Locale); + TQTextStream stream(f); + stream.setEncoding(bUtf8 ? TQTextStream::UnicodeUTF8 : TQTextStream::Locale); szBuffer=stream.readLine(); return !szBuffer.isNull(); } - bool readLines(QFile * f,QStringList &buffer,int iStartLine, int iCount, bool bUtf8) + bool readLines(TQFile * f,TQStringList &buffer,int iStartLine, int iCount, bool bUtf8) { - QTextStream stream( f ); - stream.setEncoding(bUtf8 ? QTextStream::UnicodeUTF8 : QTextStream::Locale); + TQTextStream stream( f ); + stream.setEncoding(bUtf8 ? TQTextStream::UnicodeUTF8 : TQTextStream::Locale); for(int i=0;i -#include +#include +#include #include @@ -44,55 +44,55 @@ // #warning "or should it be availible only for dirbrowser module ?" namespace KviFileUtils { - //extern KVILIB_API bool readLine(QFile * f,QString &szBuffer,bool bClearBuffer = true); - //extern KVILIB_API bool loadFileStripCR(const QString &szPath,QString &szBuffer); + //extern KVILIB_API bool readLine(TQFile * f,TQString &szBuffer,bool bClearBuffer = true); + //extern KVILIB_API bool loadFileStripCR(const TQString &szPath,TQString &szBuffer); // loads the file at szPath to szBuffer eventually converting from utf8 - extern KVILIB_API bool loadFile(const QString &szPath,QString &szBuffer,bool bUtf8 = true); - extern KVILIB_API bool loadFile(const char* szPath,QString &szBuffer,bool bUtf8 = true); + extern KVILIB_API bool loadFile(const TQString &szPath,TQString &szBuffer,bool bUtf8 = true); + extern KVILIB_API bool loadFile(const char* szPath,TQString &szBuffer,bool bUtf8 = true); // adjusts the file path to the current platform - extern KVILIB_API void adjustFilePath(QString &szPath); + extern KVILIB_API void adjustFilePath(TQString &szPath); // returns true if szPath points to an existing directory - extern KVILIB_API bool directoryExists(const QString &szPath); + extern KVILIB_API bool directoryExists(const TQString &szPath); extern KVILIB_API bool directoryExists(const char* path); // returns true if szPath points to an existing file - extern KVILIB_API bool fileExists(const QString &szPath); + extern KVILIB_API bool fileExists(const TQString &szPath); extern KVILIB_API bool fileExists(const char* szPath); // removes a file - extern KVILIB_API bool removeFile(const QString &szPath); + extern KVILIB_API bool removeFile(const TQString &szPath); extern KVILIB_API bool removeFile(const char* path); // removes a dir (must be empty) - extern KVILIB_API bool removeDir(const QString &szPath); + extern KVILIB_API bool removeDir(const TQString &szPath); extern KVILIB_API bool removeDir(const char* path); // removes a dir recursively - extern KVILIB_API bool deleteDir(const QString &szPath); + extern KVILIB_API bool deleteDir(const TQString &szPath); // writes a complete file (utf8 version) - extern KVILIB_API bool writeFile(const QString &szPath,const QString &szData,bool bAppend = false); - extern KVILIB_API bool writeFile(const char* path,const QString &szData,bool bAppend = false); + extern KVILIB_API bool writeFile(const TQString &szPath,const TQString &szData,bool bAppend = false); + extern KVILIB_API bool writeFile(const char* path,const TQString &szData,bool bAppend = false); // writes a complete file (local 8 bit version) - extern KVILIB_API bool writeFileLocal8Bit(const QString &szPath,const QString &szData,bool bAppend = false); - extern KVILIB_API bool writeFileLocal8Bit(const char* path,const QString &szData,bool bAppend = false); + extern KVILIB_API bool writeFileLocal8Bit(const TQString &szPath,const TQString &szData,bool bAppend = false); + extern KVILIB_API bool writeFileLocal8Bit(const char* path,const TQString &szData,bool bAppend = false); // reads a complete file and puts it in the string szBuffer, if the file is smaller than uMaxSize bytes - extern KVILIB_API bool readFile(const QString &szPath,QString &szBuffer,unsigned int uMaxSize = 65535); - extern KVILIB_API bool readFile(const char* path,QString &szBuffer,unsigned int uMaxSize = 65535); + extern KVILIB_API bool readFile(const TQString &szPath,TQString &szBuffer,unsigned int uMaxSize = 65535); + extern KVILIB_API bool readFile(const char* path,TQString &szBuffer,unsigned int uMaxSize = 65535); // extracts the filename from a complete path (strips leading path) - extern KVILIB_API QString extractFileName(const QString &szFileNameWithPath); + extern KVILIB_API TQString extractFileName(const TQString &szFileNameWithPath); - extern KVILIB_API QString extractFilePath(const QString &szFileNameWithPath); + extern KVILIB_API TQString extractFilePath(const TQString &szFileNameWithPath); // cp -f - extern KVILIB_API bool copyFile(const QString &szSrc,const QString &szDst); + extern KVILIB_API bool copyFile(const TQString &szSrc,const TQString &szDst); extern KVILIB_API bool copyFile(const char* src,const char* dst); // mv - extern KVILIB_API bool renameFile(const QString &szSrc,const QString &szDst); + extern KVILIB_API bool renameFile(const TQString &szSrc,const TQString &szDst); extern KVILIB_API bool renameFile(const char* src,const char* dst); // mkdir - extern KVILIB_API bool makeDir(const QString &szPath); + extern KVILIB_API bool makeDir(const TQString &szPath); extern KVILIB_API bool makeDir(const char* path); // reads a text line, returns false if EOF is reached - extern KVILIB_API bool readLine(QFile * f,QString &szBuffer,bool bUtf8 = true); - extern KVILIB_API bool readLines(QFile * f,QStringList &buffer,int iStartLine = 0, int iCount = -1, bool bUtf8 = true); - extern KVILIB_API bool isReadable(const QString &szFname); - extern KVILIB_API bool isAbsolutePath(const QString &szPath); + extern KVILIB_API bool readLine(TQFile * f,TQString &szBuffer,bool bUtf8 = true); + extern KVILIB_API bool readLines(TQFile * f,TQStringList &buffer,int iStartLine = 0, int iCount = -1, bool bUtf8 = true); + extern KVILIB_API bool isReadable(const TQString &szFname); + extern KVILIB_API bool isAbsolutePath(const TQString &szPath); }; // ALL THIS STUFF BELOW SHOULD DIE: IF YOU SEE IT, REPLACE WITH THE FUNCTIONS IN THE NAMESPACE ABOVE @@ -103,10 +103,10 @@ KVILIB_API extern bool kvi_isAbsolutePath(const char *path); // There is NO way to come back to the original string // the algo is one-way only KVILIB_API extern void kvi_encodeFileName(KviStr & path); -KVILIB_API extern void kvi_encodeFileName(QString & path); +KVILIB_API extern void kvi_encodeFileName(TQString & path); // Reads a single line from the file and returns false if EOF was encountered. -KVILIB_API extern bool kvi_readLine(QFile *f,KviStr &str); +KVILIB_API extern bool kvi_readLine(TQFile *f,KviStr &str); // Removes a file #endif //_KVI_FILEUTILS_H_INCLUDED_ diff --git a/src/kvilib/file/kvi_packagefile.cpp b/src/kvilib/file/kvi_packagefile.cpp index 3e7bcc17..5700f4e8 100644 --- a/src/kvilib/file/kvi_packagefile.cpp +++ b/src/kvilib/file/kvi_packagefile.cpp @@ -30,10 +30,10 @@ #include "kvi_locale.h" #include "kvi_inttypes.h" -#include -#include +#include +#include -#include +#include #ifdef COMPILE_ZLIB_SUPPORT #include @@ -98,7 +98,7 @@ // FieldData Variable FieldLen The data of the field, see below for defined values // FieldData for FieldType 1 (file field) -// Flags uint32 4 Bitmask. Bits: 1=FileIsDeflated +// Flags uint32 4 Bittqmask. Bits: 1=FileIsDeflated // Path UniString Variable A relative path expressed as utf8 string. \ AND / are considered to be separators // Size uint32 4 Size of the following file data // FilePayload Bytes Variable @@ -111,9 +111,9 @@ KviPackageIOEngine::KviPackageIOEngine() { m_pProgressDialog = 0; - m_pStringInfoFields = new KviPointerHashTable(); + m_pStringInfoFields = new KviPointerHashTable(); m_pStringInfoFields->setAutoDelete(true); - m_pBinaryInfoFields = new KviPointerHashTable(); + m_pBinaryInfoFields = new KviPointerHashTable(); m_pBinaryInfoFields->setAutoDelete(true); } @@ -125,7 +125,7 @@ KviPackageIOEngine::~KviPackageIOEngine() } -bool KviPackageIOEngine::updateProgress(int iProgress,const QString &szLabel) +bool KviPackageIOEngine::updateProgress(int iProgress,const TQString &szLabel) { if(!m_pProgressDialog)return true; #ifdef COMPILE_USE_QT4 @@ -134,7 +134,7 @@ bool KviPackageIOEngine::updateProgress(int iProgress,const QString &szLabel) m_pProgressDialog->setProgress(iProgress); #endif m_pProgressDialogLabel->setText(szLabel); - qApp->processEvents(); + tqApp->processEvents(); if(m_pProgressDialog->wasCanceled()) { setLastError(__tr2qs("Operation cancelled")); @@ -143,17 +143,17 @@ bool KviPackageIOEngine::updateProgress(int iProgress,const QString &szLabel) return true; } -void KviPackageIOEngine::showProgressDialog(const QString &szCaption,int iTotalSteps) +void KviPackageIOEngine::showProgressDialog(const TQString &szCaption,int iTotalSteps) { #ifdef COMPILE_USE_QT4 - m_pProgressDialog = new QProgressDialog(QString(""),__tr2qs("Cancel"),0,iTotalSteps,0); + m_pProgressDialog = new TQProgressDialog(TQString(""),__tr2qs("Cancel"),0,iTotalSteps,0); m_pProgressDialog->setModal(true); m_pProgressDialog->setWindowTitle(szCaption); #else - m_pProgressDialog = new QProgressDialog(QString(""),__tr2qs("Cancel"),iTotalSteps,0,"",true); + m_pProgressDialog = new TQProgressDialog(TQString(""),__tr2qs("Cancel"),iTotalSteps,0,"",true); m_pProgressDialog->setCaption(szCaption); #endif - m_pProgressDialogLabel = new QLabel(m_pProgressDialog); + m_pProgressDialogLabel = new TQLabel(m_pProgressDialog); m_pProgressDialogLabel->setMaximumSize(500,300); m_pProgressDialog->setLabel(m_pProgressDialogLabel); } @@ -194,23 +194,23 @@ KviPackageWriter::~KviPackageWriter() delete m_pDataFields; } -void KviPackageWriter::addInfoField(const QString &szName,const QString &szValue) +void KviPackageWriter::addInfoField(const TQString &szName,const TQString &szValue) { - m_pStringInfoFields->replace(szName,new QString(szValue)); + m_pStringInfoFields->tqreplace(szName,new TQString(szValue)); } -void KviPackageWriter::addInfoField(const QString &szName,QByteArray * pValue) +void KviPackageWriter::addInfoField(const TQString &szName,TQByteArray * pValue) { - m_pBinaryInfoFields->replace(szName,pValue); + m_pBinaryInfoFields->tqreplace(szName,pValue); } -bool KviPackageWriter::addFile(const QString &szLocalFileName,const QString &szTargetFileName,kvi_u32_t uAddFileFlags) +bool KviPackageWriter::addFile(const TQString &szLocalFileName,const TQString &szTargetFileName,kvi_u32_t uAddFileFlags) { - QFileInfo fi(szLocalFileName); + TQFileInfo fi(szLocalFileName); return addFileInternal(&fi,szLocalFileName,szTargetFileName,uAddFileFlags); } -bool KviPackageWriter::addFileInternal(const QFileInfo * fi,const QString &szLocalFileName,const QString &szTargetFileName,kvi_u32_t uAddFileFlags) +bool KviPackageWriter::addFileInternal(const TQFileInfo * fi,const TQString &szLocalFileName,const TQString &szTargetFileName,kvi_u32_t uAddFileFlags) { if(!(fi->isFile() && fi->isReadable())) return false; @@ -231,42 +231,42 @@ bool KviPackageWriter::addFileInternal(const QFileInfo * fi,const QString &szLoc return true; } -bool KviPackageWriter::addDirectory(const QString &szLocalDirectoryName,const QString &szTargetDirectoryPrefix,kvi_u32_t uAddFileFlags) +bool KviPackageWriter::addDirectory(const TQString &szLocalDirectoryName,const TQString &szTargetDirectoryPrefix,kvi_u32_t uAddFileFlags) { - QDir d(szLocalDirectoryName); + TQDir d(szLocalDirectoryName); #ifdef COMPILE_USE_QT4 - QDir::Filters iFlags; + TQDir::Filters iFlags; #else int iFlags; #endif - iFlags = QDir::Files | QDir::Readable; + iFlags = TQDir::Files | TQDir::Readable; if(!(uAddFileFlags & FollowSymLinks)) - iFlags |= QDir::NoSymLinks; + iFlags |= TQDir::NoSymLinks; - // QT4SUX: Because the QDir::entryInfoList() breaks really a lot of code by returning an object that behaves in a _totally_ different way.. it's also much slower + // QT4SUX: Because the TQDir::entryInfoList() breaks really a lot of code by returning an object that behaves in a _totally_ different way.. it's also much slower #ifdef COMPILE_USE_QT4 int j; - QFileInfoList sl = d.entryInfoList(iFlags); + TQFileInfoList sl = d.entryInfoList(iFlags); for(j=0;jfileName(); #endif - QString szDFileName = szTargetDirectoryPrefix; - KviQString::ensureLastCharIs(szDFileName,QChar(KVI_PATH_SEPARATOR_CHAR)); + TQString szDFileName = szTargetDirectoryPrefix; + KviTQString::ensureLastCharIs(szDFileName,TQChar(KVI_PATH_SEPARATOR_CHAR)); #ifdef COMPILE_USE_QT4 szDFileName += slowCopy.fileName(); if(!addFileInternal(&slowCopy,szSFileName,szDFileName,uAddFileFlags)) @@ -280,28 +280,28 @@ bool KviPackageWriter::addDirectory(const QString &szLocalDirectoryName,const QS ++it; #endif } - iFlags = QDir::Dirs | QDir::Readable; + iFlags = TQDir::Dirs | TQDir::Readable; if(!(uAddFileFlags & FollowSymLinks)) - iFlags |= QDir::NoSymLinks; + iFlags |= TQDir::NoSymLinks; sl = d.entryInfoList(iFlags); #ifdef COMPILE_USE_QT4 for(j=0;jfileName(); + TQString szDir = fi2->fileName(); #endif - if(!KviQString::equalCS(szDir,"..") && !KviQString::equalCS(szDir,".")) + if(!KviTQString::equalCS(szDir,"..") && !KviTQString::equalCS(szDir,".")) { - QString szSDirName = szLocalDirectoryName; - KviQString::ensureLastCharIs(szSDirName,QChar(KVI_PATH_SEPARATOR_CHAR)); + TQString szSDirName = szLocalDirectoryName; + KviTQString::ensureLastCharIs(szSDirName,TQChar(KVI_PATH_SEPARATOR_CHAR)); szSDirName += szDir; - QString szDDirName = szTargetDirectoryPrefix; - KviQString::ensureLastCharIs(szDDirName,QChar(KVI_PATH_SEPARATOR_CHAR)); + TQString szDDirName = szTargetDirectoryPrefix; + KviTQString::ensureLastCharIs(szDDirName,TQChar(KVI_PATH_SEPARATOR_CHAR)); szDDirName += szDir; if(!addDirectory(szSDirName,szDDirName,uAddFileFlags)) return false; @@ -320,8 +320,8 @@ bool KviPackageWriter::addDirectory(const QString &szLocalDirectoryName,const QS bool KviPackageWriter::packFile(KviFile * pFile,DataField * pDataField) { - QString szProgressText; - KviQString::sprintf(szProgressText,__tr2qs("Packaging file %Q"),&(pDataField->m_szFileLocalName)); + TQString szProgressText; + KviTQString::sprintf(szProgressText,__tr2qs("Packaging file %Q"),&(pDataField->m_szFileLocalName)); if(!updateProgress(m_iCurrentProgress,szProgressText)) return false; // aborted @@ -346,7 +346,7 @@ bool KviPackageWriter::packFile(KviFile * pFile,DataField * pDataField) if(!pFile->save(uFlags))return writeError(); - KviQCString szTargetFileName = KviQString::toUtf8(pDataField->m_szFileTargetName); + KviTQCString szTargetFileName = KviTQString::toUtf8(pDataField->m_szFileTargetName); // Path if(!pFile->save(szTargetFileName))return writeError(); @@ -429,9 +429,9 @@ bool KviPackageWriter::packFile(KviFile * pFile,DataField * pDataField) if((zstr.total_in % 2000000) == 0) { - QString szTmp; - KviQString::sprintf(szTmp,QString(" (%d of %d bytes)"),zstr.total_in,uSize); - QString szPrg = szProgressText + szTmp; + TQString szTmp; + KviTQString::sprintf(szTmp,TQString(" (%d of %d bytes)"),zstr.total_in,uSize); + TQString szPrg = szProgressText + szTmp; if(!updateProgress(m_iCurrentProgress,szPrg)) return false; // aborted } @@ -499,9 +499,9 @@ bool KviPackageWriter::packFile(KviFile * pFile,DataField * pDataField) iTotalFileSize += iReaded; if((iTotalFileSize % 1000000) == 0) { - QString szTmp; - KviQString::sprintf(szTmp,QString(" (%d of %d bytes)"),iTotalFileSize,uSize); - QString szPrg = szProgressText + szTmp; + TQString szTmp; + KviTQString::sprintf(szTmp,TQString(" (%d of %d bytes)"),iTotalFileSize,uSize); + TQString szPrg = szProgressText + szTmp; if(!updateProgress(m_iCurrentProgress,szPrg)) return false; // aborted } @@ -518,7 +518,7 @@ bool KviPackageWriter::packFile(KviFile * pFile,DataField * pDataField) return true; } -bool KviPackageWriter::pack(const QString &szFileName,kvi_u32_t uPackFlags) +bool KviPackageWriter::pack(const TQString &szFileName,kvi_u32_t uPackFlags) { m_iCurrentProgress = 0; if(!(uPackFlags & NoProgressDialog)) @@ -533,7 +533,7 @@ bool KviPackageWriter::pack(const QString &szFileName,kvi_u32_t uPackFlags) return bRet; } -bool KviPackageWriter::packInternal(const QString &szFileName,kvi_u32_t uPackFlags) +bool KviPackageWriter::packInternal(const TQString &szFileName,kvi_u32_t uPackFlags) { KviFile f(szFileName); @@ -572,8 +572,8 @@ bool KviPackageWriter::packInternal(const QString &szFileName,kvi_u32_t uPackFla return false; // aborted // InfoFields (string) - KviPointerHashTableIterator it(*m_pStringInfoFields); - while(QString * s = it.current()) + KviPointerHashTableIterator it(*m_pStringInfoFields); + while(TQString * s = it.current()) { if(!f.save(it.currentKey()))return writeError(); kvi_u32_t uType = KVI_PACKAGE_INFOFIELD_TYPE_STRING; @@ -583,8 +583,8 @@ bool KviPackageWriter::packInternal(const QString &szFileName,kvi_u32_t uPackFla } // InfoFields (binary) - KviPointerHashTableIterator it2(*m_pBinaryInfoFields); - while(QByteArray * b = it2.current()) + KviPointerHashTableIterator it2(*m_pBinaryInfoFields); + while(TQByteArray * b = it2.current()) { if(!f.save(it2.currentKey()))return writeError(); kvi_u32_t uType = KVI_PACKAGE_INFOFIELD_TYPE_BINARYBUFFER; @@ -646,7 +646,7 @@ KviPackageReader::~KviPackageReader() { } -bool KviPackageReader::readHeaderInternal(KviFile * pFile,const QString &szLocalFileName) +bool KviPackageReader::readHeaderInternal(KviFile * pFile,const TQString &szLocalFileName) { // read the PackageHeader @@ -686,7 +686,7 @@ bool KviPackageReader::readHeaderInternal(KviFile * pFile,const QString &szLocal kvi_u32_t uIdx = 0; while(uIdx < uCount) { - QString szKey; + TQString szKey; if(!pFile->load(szKey))return readError(); kvi_u32_t uFieldType; if(!pFile->load(uFieldType))return readError(); @@ -694,20 +694,20 @@ bool KviPackageReader::readHeaderInternal(KviFile * pFile,const QString &szLocal { case KVI_PACKAGE_INFOFIELD_TYPE_STRING: { - QString szValue; + TQString szValue; if(!pFile->load(szValue))return readError(); - m_pStringInfoFields->replace(szKey,new QString(szValue)); + m_pStringInfoFields->tqreplace(szKey,new TQString(szValue)); } break; case KVI_PACKAGE_INFOFIELD_TYPE_BINARYBUFFER: { - QByteArray * pbValue = new QByteArray(); + TQByteArray * pbValue = new TQByteArray(); if(!pFile->load(*pbValue)) { delete pbValue; return readError(); } - m_pBinaryInfoFields->replace(szKey,pbValue); + m_pBinaryInfoFields->tqreplace(szKey,pbValue); } break; default: @@ -721,7 +721,7 @@ bool KviPackageReader::readHeaderInternal(KviFile * pFile,const QString &szLocal } -bool KviPackageReader::readHeader(const QString &szLocalFileName) +bool KviPackageReader::readHeader(const TQString &szLocalFileName) { KviFile f(szLocalFileName); if(!f.openForReading()) @@ -733,7 +733,7 @@ bool KviPackageReader::readHeader(const QString &szLocalFileName) return readHeaderInternal(&f,szLocalFileName); } -bool KviPackageReader::unpackFile(KviFile * pFile,const QString &szUnpackPath) +bool KviPackageReader::unpackFile(KviFile * pFile,const TQString &szUnpackPath) { // Flags kvi_u32_t uFlags; @@ -748,24 +748,24 @@ bool KviPackageReader::unpackFile(KviFile * pFile,const QString &szUnpackPath) #endif // Path - QString szPath; + TQString szPath; if(!pFile->load(szPath))return readError(); - QString szFileName = szUnpackPath; - KviQString::ensureLastCharIs(szFileName,QChar(KVI_PATH_SEPARATOR_CHAR)); + TQString szFileName = szUnpackPath; + KviTQString::ensureLastCharIs(szFileName,TQChar(KVI_PATH_SEPARATOR_CHAR)); szFileName += szPath; // no attacks please :) - szFileName.replace(QString("..\\"),QString("")); - szFileName.replace(QString("..//"),QString("")); + szFileName.tqreplace(TQString("..\\"),TQString("")); + szFileName.tqreplace(TQString("..//"),TQString("")); KviFileUtils::adjustFilePath(szFileName); - int idx = KviQString::findRev(szFileName,QChar(KVI_PATH_SEPARATOR_CHAR)); + int idx = KviTQString::tqfindRev(szFileName,TQChar(KVI_PATH_SEPARATOR_CHAR)); if(idx != -1) { - QString szPrefixPath = szFileName.left(idx); + TQString szPrefixPath = szFileName.left(idx); if(!KviFileUtils::makeDir(szPrefixPath)) { setLastError(__tr2qs("Failed to create the target directory")); @@ -780,8 +780,8 @@ bool KviPackageReader::unpackFile(KviFile * pFile,const QString &szUnpackPath) return false; } - QString szProgressText; - KviQString::sprintf(szProgressText,__tr2qs("Unpacking file %Q"),&szFileName); + TQString szProgressText; + KviTQString::sprintf(szProgressText,__tr2qs("Unpacking file %Q"),&szFileName); if(!updateProgress(pFile->pos(),szProgressText)) return false; // aborted @@ -868,9 +868,9 @@ bool KviPackageReader::unpackFile(KviFile * pFile,const QString &szUnpackPath) if((zstr.total_in % 2000000) == 0) { - QString szTmp; - KviQString::sprintf(szTmp,QString(" (%d of %d bytes)"),zstr.total_in,uSize); - QString szPrg = szProgressText + szTmp; + TQString szTmp; + KviTQString::sprintf(szTmp,TQString(" (%d of %d bytes)"),zstr.total_in,uSize); + TQString szPrg = szProgressText + szTmp; if(!updateProgress(pFile->pos(),szPrg)) return false; // aborted } @@ -936,9 +936,9 @@ bool KviPackageReader::unpackFile(KviFile * pFile,const QString &szUnpackPath) if((iTotalFileSize % 3000000) == 0) { - QString szTmp; - KviQString::sprintf(szTmp,QString(" (%d of %d bytes)"),iTotalFileSize,uSize); - QString szPrg = szProgressText + szTmp; + TQString szTmp; + KviTQString::sprintf(szTmp,TQString(" (%d of %d bytes)"),iTotalFileSize,uSize); + TQString szPrg = szProgressText + szTmp; if(!updateProgress(pFile->pos(),szPrg)) return false; // aborted } @@ -958,22 +958,22 @@ bool KviPackageReader::unpackFile(KviFile * pFile,const QString &szUnpackPath) return true; } -bool KviPackageReader::getStringInfoField(const QString &szName,QString &szBuffer) +bool KviPackageReader::getStringInfoField(const TQString &szName,TQString &szBuffer) { - QString * pVal = m_pStringInfoFields->find(szName); + TQString * pVal = m_pStringInfoFields->tqfind(szName); if(!pVal)return false; szBuffer = *pVal; return true; } -bool KviPackageReader::unpack(const QString &szLocalFileName,const QString &szUnpackPath,kvi_u32_t uUnpackFlags) +bool KviPackageReader::unpack(const TQString &szLocalFileName,const TQString &szUnpackPath,kvi_u32_t uUnpackFlags) { bool bRet = unpackInternal(szLocalFileName,szUnpackPath,uUnpackFlags); hideProgressDialog(); return bRet; } -bool KviPackageReader::unpackInternal(const QString &szLocalFileName,const QString &szUnpackPath,kvi_u32_t uUnpackFlags) +bool KviPackageReader::unpackInternal(const TQString &szLocalFileName,const TQString &szUnpackPath,kvi_u32_t uUnpackFlags) { KviFile f(szLocalFileName); diff --git a/src/kvilib/file/kvi_packagefile.h b/src/kvilib/file/kvi_packagefile.h index 3e330554..c32329f1 100644 --- a/src/kvilib/file/kvi_packagefile.h +++ b/src/kvilib/file/kvi_packagefile.h @@ -27,14 +27,14 @@ #include "kvi_settings.h" #include "kvi_qstring.h" #include "kvi_pointerhashtable.h" -#include "kvi_qcstring.h" // QByteArray anyway -#include +#include "kvi_qcstring.h" // TQByteArray anyway +#include #include "kvi_pointerlist.h" class KviFile; -class QProgressDialog; -class QLabel; -class QFileInfo; +class TQProgressDialog; +class TQLabel; +class TQFileInfo; // // This class is used for creating KVIrc package files. @@ -47,20 +47,20 @@ public: KviPackageIOEngine(); virtual ~KviPackageIOEngine(); protected: - QString m_szLastError; - KviPointerHashTable * m_pStringInfoFields; - KviPointerHashTable * m_pBinaryInfoFields; - QProgressDialog * m_pProgressDialog; - QLabel * m_pProgressDialogLabel; + TQString m_szLastError; + KviPointerHashTable * m_pStringInfoFields; + KviPointerHashTable * m_pBinaryInfoFields; + TQProgressDialog * m_pProgressDialog; + TQLabel * m_pProgressDialogLabel; public: - const QString & lastError(){ return m_szLastError; }; - void setLastError(const QString &szLastError){ m_szLastError = szLastError; }; - KviPointerHashTable * stringInfoFields(){ return m_pStringInfoFields; }; - KviPointerHashTable * binaryInfoFields(){ return m_pBinaryInfoFields; }; + const TQString & lastError(){ return m_szLastError; }; + void setLastError(const TQString &szLastError){ m_szLastError = szLastError; }; + KviPointerHashTable * stringInfoFields(){ return m_pStringInfoFields; }; + KviPointerHashTable * binaryInfoFields(){ return m_pBinaryInfoFields; }; protected: - void showProgressDialog(const QString &szCaption,int iTotalSteps); + void showProgressDialog(const TQString &szCaption,int iTotalSteps); void hideProgressDialog(); - bool updateProgress(int iProgress,const QString &szLabel); + bool updateProgress(int iProgress,const TQString &szLabel); bool writeError(); bool readError(); }; @@ -87,8 +87,8 @@ protected: kvi_u32_t m_uWrittenFieldLength; // data fields for the File DataFieldType bool m_bFileAllowCompression; - QString m_szFileLocalName; - QString m_szFileTargetName; + TQString m_szFileLocalName; + TQString m_szFileTargetName; }; KviPointerList * m_pDataFields; @@ -101,22 +101,22 @@ public: NoCompression = 1, FollowSymLinks = 2 }; - bool addFile(const QString &szLocalFileName,const QString &szTargetFileName,kvi_u32_t uAddFileFlags = 0); - bool addDirectory(const QString &szLocalDirectoryName,const QString &szTargetDirectoryPrefix,kvi_u32_t uAddFileFlags = 0); + bool addFile(const TQString &szLocalFileName,const TQString &szTargetFileName,kvi_u32_t uAddFileFlags = 0); + bool addDirectory(const TQString &szLocalDirectoryName,const TQString &szTargetDirectoryPrefix,kvi_u32_t uAddFileFlags = 0); // Adds an info field as a name=value pair - void addInfoField(const QString &szName,const QString &szValue); - void addInfoField(const QString &szName,QByteArray * pArray); + void addInfoField(const TQString &szName,const TQString &szValue); + void addInfoField(const TQString &szName,TQByteArray * pArray); // Attempts to pack everything and store it as the specified file. // There is no mandatory extension but you *should* use KVI_FILEEXTENSION_THEMEPACKAGE for themes // and KVI_FILEEXTENSION_ADDONPACKAGE for addons. See kvi_fileextension.h enum PackFlags { NoProgressDialog = 1 }; - bool pack(const QString &szFileName,kvi_u32_t uPackFlags = 0); + bool pack(const TQString &szFileName,kvi_u32_t uPackFlags = 0); private: - bool packInternal(const QString &szFileName,kvi_u32_t uPackFlags = 0); + bool packInternal(const TQString &szFileName,kvi_u32_t uPackFlags = 0); bool packFile(KviFile * pFile,DataField * pDataField); - bool addFileInternal(const QFileInfo * fi,const QString &szLocalFileName,const QString &szTargetFileName,kvi_u32_t uAddFileFlags = 0); + bool addFileInternal(const TQFileInfo * fi,const TQString &szLocalFileName,const TQString &szTargetFileName,kvi_u32_t uAddFileFlags = 0); }; class KVILIB_API KviPackageReader : public KviPackageIOEngine @@ -125,16 +125,16 @@ public: KviPackageReader(); virtual ~KviPackageReader(); public: - bool readHeader(const QString &szLocalFileName); + bool readHeader(const TQString &szLocalFileName); enum UnpackFlags { NoProgressDialog = 1 }; - bool getStringInfoField(const QString &szName,QString &szBuffer); - bool unpack(const QString &szLocalFileName,const QString &szUnpackPath,kvi_u32_t uUnpackFlags = 0); + bool getStringInfoField(const TQString &szName,TQString &szBuffer); + bool unpack(const TQString &szLocalFileName,const TQString &szUnpackPath,kvi_u32_t uUnpackFlags = 0); private: - bool unpackInternal(const QString &szLocalFileName,const QString &szUnpackPath,kvi_u32_t uUnpackFlags = 0); - bool unpackFile(KviFile * pFile,const QString &szUnpackPath); - bool readHeaderInternal(KviFile * pFile,const QString &szLocalFileName); + bool unpackInternal(const TQString &szLocalFileName,const TQString &szUnpackPath,kvi_u32_t uUnpackFlags = 0); + bool unpackFile(KviFile * pFile,const TQString &szUnpackPath); + bool readHeaderInternal(KviFile * pFile,const TQString &szLocalFileName); }; diff --git a/src/kvilib/irc/kvi_avatar.cpp b/src/kvilib/irc/kvi_avatar.cpp index 1642560a..680e7978 100644 --- a/src/kvilib/irc/kvi_avatar.cpp +++ b/src/kvilib/irc/kvi_avatar.cpp @@ -27,7 +27,7 @@ #include "kvi_avatar.h" #include "kvi_qstring.h" -#include +#include /* @@ -95,13 +95,13 @@ The "preferred" image size may grow with time, as the network transmission speed grows. */ -KviAvatar::KviAvatar(const QString &szLocalPath,const QString &szName,QPixmap * pix) +KviAvatar::KviAvatar(const TQString &szLocalPath,const TQString &szName,TQPixmap * pix) { m_pPixmap = pix; m_pScaledPixmap = 0; - if(m_pPixmap == 0)m_pPixmap = new QPixmap(32,32); // cool memory map :) + if(m_pPixmap == 0)m_pPixmap = new TQPixmap(32,32); // cool memory map :) - m_bRemote = KviQString::equalCIN("http://",szName,7); + m_bRemote = KviTQString::equalCIN("http://",szName,7); m_szLocalPath = szLocalPath; m_szName = szName; @@ -113,7 +113,7 @@ KviAvatar::~KviAvatar() if(m_pScaledPixmap)delete m_pScaledPixmap; } -QPixmap * KviAvatar::scaledPixmap(unsigned int w,unsigned int h) +TQPixmap * KviAvatar::scaledPixmap(unsigned int w,unsigned int h) { if(((unsigned int)(m_pPixmap->width())) == w) { @@ -154,11 +154,11 @@ QPixmap * KviAvatar::scaledPixmap(unsigned int w,unsigned int h) } #ifdef COMPILE_USE_QT4 - m_pScaledPixmap = new QPixmap(m_pPixmap->scaled(scaleW,scaleH)); + m_pScaledPixmap = new TQPixmap(m_pPixmap->scaled(scaleW,scaleH)); #else - QImage img = m_pPixmap->convertToImage(); + TQImage img = m_pPixmap->convertToImage(); - m_pScaledPixmap = new QPixmap(); + m_pScaledPixmap = new TQPixmap(); m_pScaledPixmap->convertFromImage(img.smoothScale(scaleW,scaleH)); #endif return m_pScaledPixmap; diff --git a/src/kvilib/irc/kvi_avatar.h b/src/kvilib/irc/kvi_avatar.h index ba8edbc5..fddecf4d 100644 --- a/src/kvilib/irc/kvi_avatar.h +++ b/src/kvilib/irc/kvi_avatar.h @@ -29,37 +29,37 @@ #include "kvi_heapobject.h" #include "kvi_settings.h" -#include +#include class KVILIB_API KviAvatar : public KviHeapObject { public: - KviAvatar(const QString &szLocalPath,const QString &szName,QPixmap * pix); + KviAvatar(const TQString &szLocalPath,const TQString &szName,TQPixmap * pix); ~KviAvatar(); private: - QString m_szLocalPath; - QString m_szName; + TQString m_szLocalPath; + TQString m_szName; bool m_bRemote; - QPixmap * m_pPixmap; - QPixmap * m_pScaledPixmap; + TQPixmap * m_pPixmap; + TQPixmap * m_pScaledPixmap; unsigned int m_uLastScaleWidth; unsigned int m_uLastScaleHeight; public: - QPixmap * pixmap(){ return m_pPixmap; }; - QPixmap * scaledPixmap(unsigned int w,unsigned int h); + TQPixmap * pixmap(){ return m_pPixmap; }; + TQPixmap * scaledPixmap(unsigned int w,unsigned int h); bool isRemote(){ return m_bRemote; }; - const QString &localPath(){ return m_szLocalPath; }; - const QString &name(){ return m_szName; }; + const TQString &localPath(){ return m_szLocalPath; }; + const TQString &name(){ return m_szName; }; // string that uniquely identifies this avatar // for remote avatars that have name starting with http:// // the name is used. // for local avatars the localPath is used instead - const QString &identificationString(){ return m_bRemote ? m_szName : m_szLocalPath; }; + const TQString &identificationString(){ return m_bRemote ? m_szName : m_szLocalPath; }; // if name is http://xxxx @@ -76,7 +76,7 @@ public: // ex: /home/pragma/.kvirc/avatars/pragma.png // local path->name : strip leading path informations - // name->local path : replace : / and + // name->local path : tqreplace : / and }; diff --git a/src/kvilib/irc/kvi_avatarcache.cpp b/src/kvilib/irc/kvi_avatarcache.cpp index d24562ea..59c0ed61 100644 --- a/src/kvilib/irc/kvi_avatarcache.cpp +++ b/src/kvilib/irc/kvi_avatarcache.cpp @@ -66,7 +66,7 @@ void KviAvatarCache::done() KviAvatarCache::KviAvatarCache() { - m_pAvatarDict = new KviPointerHashTable(CACHE_DICT_SIZE,false); + m_pAvatarDict = new KviPointerHashTable(CACHE_DICT_SIZE,false); m_pAvatarDict->setAutoDelete(true); } @@ -76,19 +76,19 @@ KviAvatarCache::~KviAvatarCache() } -void KviAvatarCache::replace(const QString &szIdString,const KviIrcMask &mask,const QString &szNetwork) +void KviAvatarCache::tqreplace(const TQString &szIdString,const KviIrcMask &tqmask,const TQString &szNetwork) { - QString szKey; + TQString szKey; - mask.mask(szKey,KviIrcMask::NickCleanUserSmartNet); - szKey.append(QChar('+')); + tqmask.tqmask(szKey,KviIrcMask::NickCleanUserSmartNet); + szKey.append(TQChar('+')); szKey.append(szNetwork); KviAvatarCacheEntry * e = new KviAvatarCacheEntry; e->szIdString = szIdString; e->tLastAccess = kvi_unixTime(); - m_pAvatarDict->replace(szKey,e); + m_pAvatarDict->tqreplace(szKey,e); if(m_pAvatarDict->count() > MAX_AVATARS_IN_CACHE) { @@ -96,12 +96,12 @@ void KviAvatarCache::replace(const QString &szIdString,const KviIrcMask &mask,co } } -void KviAvatarCache::remove(const KviIrcMask &mask,const QString &szNetwork) +void KviAvatarCache::remove(const KviIrcMask &tqmask,const TQString &szNetwork) { - QString szKey; + TQString szKey; - mask.mask(szKey,KviIrcMask::NickCleanUserSmartNet); - szKey.append(QChar('+')); + tqmask.tqmask(szKey,KviIrcMask::NickCleanUserSmartNet); + szKey.append(TQChar('+')); szKey.append(szNetwork); m_pAvatarDict->remove(szKey); @@ -109,21 +109,21 @@ void KviAvatarCache::remove(const KviIrcMask &mask,const QString &szNetwork) -const QString & KviAvatarCache::lookup(const KviIrcMask &mask,const QString &szNetwork) +const TQString & KviAvatarCache::lookup(const KviIrcMask &tqmask,const TQString &szNetwork) { - QString szKey; + TQString szKey; - mask.mask(szKey,KviIrcMask::NickCleanUserSmartNet); - szKey.append(QChar('+')); + tqmask.tqmask(szKey,KviIrcMask::NickCleanUserSmartNet); + szKey.append(TQChar('+')); szKey.append(szNetwork); - KviAvatarCacheEntry * e = m_pAvatarDict->find(szKey); - if(!e)return KviQString::empty; + KviAvatarCacheEntry * e = m_pAvatarDict->tqfind(szKey); + if(!e)return KviTQString::empty; e->tLastAccess = kvi_unixTime(); return e->szIdString; } -void KviAvatarCache::load(const QString &szFileName) +void KviAvatarCache::load(const TQString &szFileName) { m_pAvatarDict->clear(); @@ -142,14 +142,14 @@ void KviAvatarCache::load(const QString &szFileName) kvi_time_t tLastAccess = cfg.readUIntEntry("LastAccess",0); if((tNow - tLastAccess) < MAX_UNACCESSED_TIME) { - QString szIdString = cfg.readQStringEntry("Avatar",""); + TQString szIdString = cfg.readTQStringEntry("Avatar",""); if(!szIdString.isEmpty()) { KviAvatarCacheEntry * e = new KviAvatarCacheEntry; e->tLastAccess = tLastAccess; e->szIdString = szIdString; - m_pAvatarDict->replace(it.currentKey(),e); + m_pAvatarDict->tqreplace(it.currentKey(),e); cnt++; if(cnt >= MAX_AVATARS_IN_CACHE)return; // done } @@ -158,12 +158,12 @@ void KviAvatarCache::load(const QString &szFileName) } } -void KviAvatarCache::save(const QString &szFileName) +void KviAvatarCache::save(const TQString &szFileName) { KviConfig cfg(szFileName,KviConfig::Write); // cfg.clear(); // not needed with KviConfig::Write - KviPointerHashTableIterator it(*m_pAvatarDict); + KviPointerHashTableIterator it(*m_pAvatarDict); while(KviAvatarCacheEntry * e = it.current()) { @@ -180,11 +180,11 @@ void KviAvatarCache::save(const QString &szFileName) void KviAvatarCache::cleanup() { // first do a quick run deleting the avatars really too old - KviPointerHashTableIterator it(*m_pAvatarDict); + KviPointerHashTableIterator it(*m_pAvatarDict); kvi_time_t tNow = kvi_unixTime(); - KviPointerList l; + KviPointerList l; l.setAutoDelete(false); KviAvatarCacheEntry * e; @@ -193,12 +193,12 @@ void KviAvatarCache::cleanup() { if((tNow - e->tLastAccess) > MAX_UNACCESSED_TIME) { - l.append(new QString(it.currentKey())); + l.append(new TQString(it.currentKey())); } ++it; } - for(QString *s = l.first();s;s = l.next())m_pAvatarDict->remove(*s); + for(TQString *s = l.first();s;s = l.next())m_pAvatarDict->remove(*s); if(m_pAvatarDict->count() < CACHE_GUARD_LEVEL)return; diff --git a/src/kvilib/irc/kvi_avatarcache.h b/src/kvilib/irc/kvi_avatarcache.h index 7d715256..7f2ff822 100644 --- a/src/kvilib/irc/kvi_avatarcache.h +++ b/src/kvilib/irc/kvi_avatarcache.h @@ -34,7 +34,7 @@ typedef struct _KviAvatarCacheEntry { - QString szIdString; + TQString szIdString; kvi_time_t tLastAccess; } KviAvatarCacheEntry; @@ -46,7 +46,7 @@ protected: KviAvatarCache(); ~KviAvatarCache(); public: - KviPointerHashTable * m_pAvatarDict; + KviPointerHashTable * m_pAvatarDict; protected: static KviAvatarCache * m_pAvatarCacheInstance; public: @@ -55,14 +55,14 @@ public: static KviAvatarCache * instance(){ return m_pAvatarCacheInstance; }; - void replace(const QString &szIdString,const KviIrcMask &mask,const QString &szNetwork); - void remove(const KviIrcMask &mask,const QString &szNetwork); - const QString & lookup(const KviIrcMask &mask,const QString &szNetwork); + void tqreplace(const TQString &szIdString,const KviIrcMask &tqmask,const TQString &szNetwork); + void remove(const KviIrcMask &tqmask,const TQString &szNetwork); + const TQString & lookup(const KviIrcMask &tqmask,const TQString &szNetwork); void cleanup(); - void load(const QString &szFileName); - void save(const QString &szFileName); + void load(const TQString &szFileName); + void save(const TQString &szFileName); }; diff --git a/src/kvilib/irc/kvi_ircmask.cpp b/src/kvilib/irc/kvi_ircmask.cpp index dbdc1b6c..4460cba6 100644 --- a/src/kvilib/irc/kvi_ircmask.cpp +++ b/src/kvilib/irc/kvi_ircmask.cpp @@ -29,18 +29,18 @@ #include "kvi_ircmask.h" /* - @doc: irc_masks + @doc: irc_tqmasks @title: - Irc masks + Irc tqmasks @type: generic @short: - Decription of the standard IRC masks + Decription of the standard IRC tqmasks @keyterms: - irc masks , nickname , username , hostname , wildcard + irc tqmasks , nickname , username , hostname , wildcard @body: - [big]Simple masks[/big][br] - An irc mask is a string in a special format that identifies an user on irc.[br] + [big]Simple tqmasks[/big][br] + An irc tqmask is a string in a special format that identifies an user on irc.[br] The standard basic format is:[br] [b]!@[/b][br] The part contains the nickname with that the user is widely known across the network.[br] @@ -60,7 +60,7 @@ +: i line with ident[br] =: i line with OTHER type ident[br] -: i line, no ident[br] - So finally you can find strings like "~pragma" or "^pragma", where "pragma" + So finally you can tqfind strings like "~pragma" or "^pragma", where "pragma" is the system username of the irc-user and ~ and ^ are prefixes.[br] The part is the hostname of the remote user.[br] In most cases it is the human-readable format of the host name, but sometimes @@ -68,23 +68,23 @@ The IP address can be either in IPV4 format or in IPV6 format.[br] Some (weird from my point of view) servers hide certain parts of the IP address to prevent attacks to the user's machine.[br] - Here are some examples of full irc-masks:[br] + Here are some examples of full irc-tqmasks:[br] Pragma!^pragma@staff.kvirc.net[br] [jazz]!~jazz@jazz.myhome.com[br] luke!=skywalker@212.213.41.12[br] HAN!^solo@ff0f:a0a0:1011::ea80:1[br] Darth!vader@210.11.12.XXX[br] - The irc-masks are [b]case insensitive[/b].[br] + The irc-tqmasks are [b]case insensitive[/b].[br] [br] - [big]Wildcard masks[/big][br] - In some contexts the irc-masks can contain '*' and '?' wildcards.[br] - The wild masks are used to "match" an user within a set of them.[br] + [big]Wildcard tqmasks[/big][br] + In some contexts the irc-tqmasks can contain '*' and '?' wildcards.[br] + The wild tqmasks are used to "match" an user within a set of them.[br] '*' matches any sequence (eventually empty) of characters and '?' matches a single character.[br] Wildcards are allowed only in the , and part: so the - "wildest" mask possible is:[br] + "wildest" tqmask possible is:[br] [b]*!*@*[/b][br] that designates "any nickname, any username on any host".[br] - Here are some examples of wild masks:[br] + Here are some examples of wild tqmasks:[br] Pragma!*pragma@212.101.102.*: matches any user with nickname "Pragma" , username that ends with "pragma" and coming from any machine on the 212.101.102 network.[br] *!solo@*.starwars.org: matches any nick with username solo (no prefix!) coming from any machine in @@ -225,15 +225,15 @@ KviIrcMask::KviIrcMask() m_szNick = m_szWild; } -KviIrcMask::KviIrcMask(const QString &szMask) +KviIrcMask::KviIrcMask(const TQString &szMask) { - static QString szWild("*"); - const QChar * b = KviQString::nullTerminatedArray(szMask); + static TQString szWild("*"); + const TQChar * b = KviTQString::nullTerminatedArray(szMask); if(b) { - const QChar * p = b; - while(p->unicode() && (p->unicode() != '!'))p++; - if(p->unicode()) + const TQChar * p = b; + while(p->tqunicode() && (p->tqunicode() != '!'))p++; + if(p->tqunicode()) { if(p != b) { @@ -250,8 +250,8 @@ KviIrcMask::KviIrcMask(const QString &szMask) } p++; b = p; - while(p->unicode() && (p->unicode() != '@'))p++; - if(p->unicode()) + while(p->tqunicode() && (p->tqunicode() != '@'))p++; + if(p->tqunicode()) { if(p != b) { @@ -267,7 +267,7 @@ KviIrcMask::KviIrcMask(const QString &szMask) } p++; b=p; - while(p->unicode())p++; + while(p->tqunicode())p++; if(p != b) { m_szHost.setUnicode(b,p-b); @@ -282,27 +282,27 @@ KviIrcMask::KviIrcMask(const QString &szMask) } } -QString KviIrcMask::m_szWild("*"); +TQString KviIrcMask::m_szWild("*"); bool KviIrcMask::hasNumericHost() const { - const QChar * p = KviQString::nullTerminatedArray(m_szHost); + const TQChar * p = KviTQString::nullTerminatedArray(m_szHost); if(!p)return false; int nPoints = 0; int nDoublePoints = 0; unsigned short uc; - while((uc = p->unicode())) + while((uc = p->tqunicode())) { - if(uc == '.')nPoints++; // ipv6 masks can contain dots too! + if(uc == '.')nPoints++; // ipv6 tqmasks can contain dots too! else { if(uc == ':')nDoublePoints++; else { if((uc < '0') || (uc > '9')) { #ifdef COMPILE_USE_QT4 - uc = p->toUpper().unicode(); + uc = p->toUpper().tqunicode(); #else - uc = p->upper().unicode(); + uc = p->upper().tqunicode(); #endif if((uc < 'A') || (uc > 'F'))return false; } @@ -315,8 +315,8 @@ bool KviIrcMask::hasNumericHost() const /** -* Retuns in szMask the specified (if possible) mask of this user.
-* If the host or username are not known , the mask may contain less information +* Retuns in szMask the specified (if possible) tqmask of this user.
+* If the host or username are not known , the tqmask may contain less information * than requested.
* Mask types:
* 0 : nick!user@machine.host.top (nick!user@XXX.XXX.XXX.XXX) (default)
@@ -341,7 +341,7 @@ bool KviIrcMask::hasNumericHost() const * 19: *!~user@*.host.top (*!~user@XXX.XXX.*) * 20: nick!*user@*.host.top (nick!*user@XXX.XXX.*) * 21: *!*user@*.host.top (*!user@*XXX.XXX.*) -* smart versions of the masks 17-21 that try take care of masked ip addresses +* smart versions of the tqmasks 17-21 that try take care of tqmasked ip addresses * in the form xxx.xxx.INVALID-TOP-MASK * 22: nick!~user@*.host.top (nick!~user@XXX.XXX.*) * 23: nick!*@*.host.top (nick!*@XXX.XXX.*) @@ -349,7 +349,7 @@ bool KviIrcMask::hasNumericHost() const * 25: nick!*user@*.host.top (nick!*user@XXX.XXX.*) * 26: *!*user@*.host.top (*!user@*XXX.XXX.*) * If some data is missing , these types may change:
-* For example , if hostname is missing , the mask type 3 or 4 may be reduced to type 5 +* For example , if hostname is missing , the tqmask type 3 or 4 may be reduced to type 5 */ /* @@ -363,13 +363,13 @@ bool KviIrcMask::hasNumericHost() const ** - i line, no ident */ -static unsigned char maskTable[27][3] = { +static unsigned char tqmaskTable[27][3] = { { 0 , 0 , 0 }, //0 means normal block - { 0 , 0 , 2 }, //2 in the third field means type *.abc.host.top (or XXX.XXX.XXX.*) host mask + { 0 , 0 , 2 }, //2 in the third field means type *.abc.host.top (or XXX.XXX.XXX.*) host tqmask { 0 , 0 , 1 }, //2 in the second field means *user (strip prefixes) { 0 , 1 , 0 }, //1 means * - { 0 , 1 , 2 }, //3 in the third field means type *.host.top (or XXX.XXX.*) host mask - { 0 , 1 , 1 }, //4 in the third field is like 3 but tries to detect masked ip addresses too + { 0 , 1 , 2 }, //3 in the third field means type *.host.top (or XXX.XXX.*) host tqmask + { 0 , 1 , 1 }, //4 in the third field is like 3 but tries to detect tqmasked ip addresses too { 1 , 0 , 0 }, { 1 , 0 , 2 }, { 1 , 0 , 1 }, @@ -393,12 +393,12 @@ static unsigned char maskTable[27][3] = { { 1 , 2 , 4 } }; -void KviIrcMask::mask(QString &szMask,MaskType eMaskType) const +void KviIrcMask::tqmask(TQString &szMask,MaskType eMaskType) const { if((((int)eMaskType) > 26)||(((int)eMaskType) < 0))eMaskType = NickUserHost; - szMask = maskTable[((int)eMaskType)][0] ? m_szWild : m_szNick; + szMask = tqmaskTable[((int)eMaskType)][0] ? m_szWild : m_szNick; szMask.append("!"); - switch(maskTable[((int)eMaskType)][1]) + switch(tqmaskTable[((int)eMaskType)][1]) { case 0: szMask.append(m_szUser); @@ -408,20 +408,20 @@ void KviIrcMask::mask(QString &szMask,MaskType eMaskType) const break; default: if (m_szUser.length() > 0) { - if(m_szUser[0].unicode() != '*') + if(m_szUser[0].tqunicode() != '*') szMask.append(m_szWild); - if ((m_szUser[0].unicode() == '~') || - (m_szUser[0].unicode() == '^') || - (m_szUser[0].unicode() == '+') || - (m_szUser[0].unicode() == '-') || - (m_szUser[0].unicode() == '='))szMask.append(m_szUser.right(m_szUser.length() - 1)); + if ((m_szUser[0].tqunicode() == '~') || + (m_szUser[0].tqunicode() == '^') || + (m_szUser[0].tqunicode() == '+') || + (m_szUser[0].tqunicode() == '-') || + (m_szUser[0].tqunicode() == '='))szMask.append(m_szUser.right(m_szUser.length() - 1)); else szMask.append(m_szUser); } break; } szMask.append('@'); - switch(maskTable[((int)eMaskType)][2]) + switch(tqmaskTable[((int)eMaskType)][2]) { case 0: szMask.append(m_szHost); @@ -434,7 +434,7 @@ void KviIrcMask::mask(QString &szMask,MaskType eMaskType) const { if(hasNumericHost()) { - QString szHost(m_szHost.left(getIpDomainMaskLen())); + TQString szHost(m_szHost.left(getIpDomainMaskLen())); szMask.append(szHost); szMask.append(m_szWild); } else { @@ -450,7 +450,7 @@ void KviIrcMask::mask(QString &szMask,MaskType eMaskType) const { if(hasNumericHost()) { - QString szHost(m_szHost.left(getLargeIpDomainMaskLen())); + TQString szHost(m_szHost.left(getLargeIpDomainMaskLen())); szMask.append(szHost); szMask.append(m_szWild); } else { @@ -466,7 +466,7 @@ void KviIrcMask::mask(QString &szMask,MaskType eMaskType) const { if(hasNumericHost() || hasMaskedIp()) { - QString szHost(m_szHost.left(getLargeIpDomainMaskLen())); + TQString szHost(m_szHost.left(getLargeIpDomainMaskLen())); szMask.append(szHost); szMask.append(m_szWild); } else { @@ -532,7 +532,7 @@ bool KviIrcMask::matchesFixed(const char *szMask) const */ /* -bool KviIrcMask::matchedBy(const QString &szMask) const +bool KviIrcMask::matchedBy(const TQString &szMask) const { const char * ret1; const char * ret2; @@ -556,25 +556,25 @@ bool KviIrcMask::matchedBy(const QString &szMask) const } */ -bool KviIrcMask::matches(const KviIrcMask &mask) const +bool KviIrcMask::matches(const KviIrcMask &tqmask) const { - if(KviQString::matchWildExpressionsCI(m_szNick,mask.m_szNick)) + if(KviTQString::matchWildExpressionsCI(m_szNick,tqmask.m_szNick)) { - if(KviQString::matchWildExpressionsCI(m_szUser,mask.m_szUser)) + if(KviTQString::matchWildExpressionsCI(m_szUser,tqmask.m_szUser)) { - if(KviQString::matchWildExpressionsCI(m_szHost,mask.m_szHost))return true; + if(KviTQString::matchWildExpressionsCI(m_szHost,tqmask.m_szHost))return true; } } return false; } -bool KviIrcMask::matchesFixed(const KviIrcMask &mask) const +bool KviIrcMask::matchesFixed(const KviIrcMask &tqmask) const { - if(KviQString::matchStringCI(m_szNick,mask.m_szNick,0,1)) + if(KviTQString::matchStringCI(m_szNick,tqmask.m_szNick,0,1)) { - if(KviQString::matchStringCI(m_szUser,mask.m_szUser,0,1)) + if(KviTQString::matchStringCI(m_szUser,tqmask.m_szUser,0,1)) { - if(KviQString::matchStringCI(m_szHost,mask.m_szHost,0,1))return true; + if(KviTQString::matchStringCI(m_szHost,tqmask.m_szHost,0,1))return true; } } return false; @@ -601,26 +601,26 @@ bool KviIrcMask::matches(const char * nick,const char * user,const char * host) } */ -bool KviIrcMask::matchesFixed(const QString &nick,const QString &user,const QString &host) const +bool KviIrcMask::matchesFixed(const TQString &nick,const TQString &user,const TQString &host) const { - if(!KviQString::matchStringCI(m_szNick,nick,0,1))return false; - if(!KviQString::matchStringCI(m_szUser,user,0,1))return false; - if(!KviQString::matchStringCI(m_szHost,host,0,1))return false; + if(!KviTQString::matchStringCI(m_szNick,nick,0,1))return false; + if(!KviTQString::matchStringCI(m_szUser,user,0,1))return false; + if(!KviTQString::matchStringCI(m_szHost,host,0,1))return false; return true; } -//Internals for mask() +//Internals for tqmask() int KviIrcMask::getIpDomainMaskLen() const { int len = m_szHost.length(); - const QChar *p = m_szHost.unicode(); - const QChar *b = p; + const TQChar *p = m_szHost.tqunicode(); + const TQChar *b = p; p += len; if(b < p) { p--; - while((b < p) && (p->unicode() != '.') && (p->unicode() != ':'))p--; + while((b < p) && (p->tqunicode() != '.') && (p->tqunicode() != ':'))p--; } // 000.000.000.000 // p @@ -632,17 +632,17 @@ int KviIrcMask::getIpDomainMaskLen() const int KviIrcMask::getLargeIpDomainMaskLen() const { int len = m_szHost.length(); - const QChar *p = m_szHost.unicode(); - const QChar *b = p; + const TQChar *p = m_szHost.tqunicode(); + const TQChar *b = p; p += len; if(b < p) { p--; - while((b < p) && (p->unicode() != '.') && (p->unicode() != ':'))p--; + while((b < p) && (p->tqunicode() != '.') && (p->tqunicode() != ':'))p--; if(b < p) { p--; - while((b < p) && (p->unicode() != '.') && (p->unicode() != ':'))p--; + while((b < p) && (p->tqunicode() != '.') && (p->tqunicode() != ':'))p--; } } // 000.000.000.000 @@ -651,40 +651,40 @@ int KviIrcMask::getLargeIpDomainMaskLen() const return (p == b) ? 0 : ((p-b) + 1); } -QString KviIrcMask::getHostDomainMask() const +TQString KviIrcMask::getHostDomainMask() const { int len = m_szHost.length(); - const QChar *p=KviQString::nullTerminatedArray(m_szHost); - if(!p)return QString::null; - const QChar *b = p; - while(p->unicode() && p->unicode() != '.')p++; - QString ret(p,len - (p - b)); + const TQChar *p=KviTQString::nullTerminatedArray(m_szHost); + if(!p)return TQString(); + const TQChar *b = p; + while(p->tqunicode() && p->tqunicode() != '.')p++; + TQString ret(p,len - (p - b)); return ret; } -QString KviIrcMask::getLargeHostDomainMask() const +TQString KviIrcMask::getLargeHostDomainMask() const { int len = m_szHost.length(); - const QChar *p = m_szHost.unicode(); - const QChar *b = p; + const TQChar *p = m_szHost.tqunicode(); + const TQChar *b = p; p += len; if(b < p) { p--; - while((b < p) && (p->unicode() != '.'))p--; + while((b < p) && (p->tqunicode() != '.'))p--; if(b < p) { p--; - while((b < p) && (p->unicode() != '.'))p--; + while((b < p) && (p->tqunicode() != '.'))p--; } } // xyz.klm.abc.host.top // p - QString ret(p,len - (p - b)); + TQString ret(p,len - (p - b)); return ret; } @@ -692,25 +692,25 @@ QString KviIrcMask::getLargeHostDomainMask() const bool KviIrcMask::hasMaskedIp() const { int len = m_szHost.length(); - const QChar *p = m_szHost.unicode(); - const QChar *b = p; + const TQChar *p = m_szHost.tqunicode(); + const TQChar *b = p; if(len == 0)return false; //run to the end p += len; - const QChar *e = p; + const TQChar *e = p; p--; - while((b < p) && (p->unicode() != '.'))p--; + while((b < p) && (p->tqunicode() != '.'))p--; return ((e - p) > 4); // at the moment 4 should be enough : the largest top part is "name" } bool KviIrcMask::operator==(const KviIrcMask &user) { - if(KviQString::equalCI(m_szNick,user.m_szNick)) + if(KviTQString::equalCI(m_szNick,user.m_szNick)) { - if(KviQString::equalCI(m_szUser,user.m_szUser)) + if(KviTQString::equalCI(m_szUser,user.m_szUser)) { - if(KviQString::equalCI(m_szHost,user.m_szHost))return true; + if(KviTQString::equalCI(m_szHost,user.m_szHost))return true; } } return false; @@ -718,10 +718,10 @@ bool KviIrcMask::operator==(const KviIrcMask &user) bool KviIrcMask::hasWildNick() { - const QChar * aux = KviQString::nullTerminatedArray(m_szNick); + const TQChar * aux = KviTQString::nullTerminatedArray(m_szNick); if(!aux)return false; unsigned short uc; - while((uc = aux->unicode())) + while((uc = aux->tqunicode())) { if((uc == '*') || (uc == '?'))return true; aux++; @@ -732,26 +732,26 @@ bool KviIrcMask::hasWildNick() int KviIrcMask::nonWildChars() { int iCnt = 0; - const QChar * aux = KviQString::nullTerminatedArray(m_szNick); + const TQChar * aux = KviTQString::nullTerminatedArray(m_szNick); if(!aux)return 0; unsigned short uc; - while((uc = aux->unicode())) + while((uc = aux->tqunicode())) { if((uc != '*') && (uc != '?'))iCnt++; aux++; } - aux = KviQString::nullTerminatedArray(m_szUser); - while((uc = aux->unicode())) + aux = KviTQString::nullTerminatedArray(m_szUser); + while((uc = aux->tqunicode())) { if((uc != '*') && (uc != '?'))iCnt++; aux++; } - aux = KviQString::nullTerminatedArray(m_szHost); - while((uc = aux->unicode())) + aux = KviTQString::nullTerminatedArray(m_szHost); + while((uc = aux->tqunicode())) { if((uc != '*') && (uc != '?'))iCnt++; aux++; diff --git a/src/kvilib/irc/kvi_ircmask.h b/src/kvilib/irc/kvi_ircmask.h index 3c9ccf5d..18d6d70b 100644 --- a/src/kvilib/irc/kvi_ircmask.h +++ b/src/kvilib/irc/kvi_ircmask.h @@ -3,7 +3,7 @@ //============================================================================= // -// File : kvi_ircmask.h +// File : kvi_irctqmask.h // Creation date : Fri Jan 8 1999 19:50:35 by Szymon Stefanek // // This file is part of the KVirc irc client distribution @@ -33,7 +33,7 @@ #include "kvi_qstring.h" //============================================================================= -// Irc user mask abstraction +// Irc user tqmask abstraction //============================================================================= class KVILIB_API KviIrcMask : public KviHeapObject @@ -41,47 +41,47 @@ class KVILIB_API KviIrcMask : public KviHeapObject friend class KviIrcUserList; friend class KviIrcUserChanList; private: - QString m_szNick; - QString m_szUser; - QString m_szHost; - static QString m_szWild; + TQString m_szNick; + TQString m_szUser; + TQString m_szHost; + static TQString m_szWild; public: // Sets the nick for this user.
// If szNick is NULL or it points to an empty string the nick is set to "*".
- void setNick(const QString &szNick){ m_szNick = szNick.isEmpty() ? m_szWild : szNick; }; + void setNick(const TQString &szNick){ m_szNick = szNick.isEmpty() ? m_szWild : szNick; }; // Sets the username for this user.
// If szUsername is NULL or it points to an empty string the username is set to "*".
- void setUsername(const QString &szUser){ m_szUser = szUser.isEmpty() ? m_szWild : szUser; }; - void setUser(const QString &szUser){ m_szUser = szUser.isEmpty() ? m_szWild : szUser; }; + void setUsername(const TQString &szUser){ m_szUser = szUser.isEmpty() ? m_szWild : szUser; }; + void setUser(const TQString &szUser){ m_szUser = szUser.isEmpty() ? m_szWild : szUser; }; // Sets the host for this user.
// If szHost is NULL or it points to an empty string the host is set to "*".
- void setHost(const QString &szHost){ m_szHost = szHost.isEmpty() ? m_szWild : szHost; }; - // Sets the host , nick and username extracting it from an irc mask:
+ void setHost(const TQString &szHost){ m_szHost = szHost.isEmpty() ? m_szWild : szHost; }; + // Sets the host , nick and username extracting it from an irc tqmask:
// nick!user@host
- // The mask is terminated by end-of string null character or a character equal to c in the string.
- // Returns the pointer to the end of the mask in the szMask string.(c or null-terminator)
- //const char * setMask(const QString &szMask,char c=' '); - // Sets the host , nick and username extracting it from an userhost mask:
+ // The tqmask is terminated by end-of string null character or a character equal to c in the string.
+ // Returns the pointer to the end of the tqmask in the szMask string.(c or null-terminator)
+ //const char * setMask(const TQString &szMask,char c=' '); + // Sets the host , nick and username extracting it from an userhost tqmask:
// nick[*]=<+|->user@host
- // The mask is terminated by end-of string null char or a space character.
+ // The tqmask is terminated by end-of string null char or a space character.
// Returns the pointer to the next non-space char in the szMask string or to the null-terminator
- // If there are no more masks avaiable. + // If there are no more tqmasks avaiable. // WARNING : the szMask pointer can NOT be NULL - //const char *setUserhostMask(const QString &szMask); + //const char *setUserhostMask(const TQString &szMask); // Returns the nick of this user.
// In the worst case you get a string == "*"
- const QString &nick() const { return m_szNick; }; + const TQString &nick() const { return m_szNick; }; // DEPRECATED! - const QString &username() const { return m_szUser; }; - const QString &user() const { return m_szUser; }; - const QString &host() const { return m_szHost; }; + const TQString &username() const { return m_szUser; }; + const TQString &user() const { return m_szUser; }; + const TQString &host() const { return m_szHost; }; bool hasUser() const { return !(m_szUser.isEmpty() || (m_szUser == m_szWild)); }; bool hasHost() const { return !(m_szHost.isEmpty() || (m_szHost == m_szWild)); }; bool hasNumericHost() const; - // Retuns in szMask the specified (if possible) mask of this user.
- // If the host or username are not known , the mask may contain less information + // Retuns in szMask the specified (if possible) tqmask of this user.
+ // If the host or username are not known , the tqmask may contain less information // than requested.
enum MaskType @@ -108,7 +108,7 @@ public: UserLargeNet = 19, // 19 : *!~user@*.host.top (*!~user@XXX.XXX.*) NickCleanUserLargeNet = 20, // 20 : nick!*user@*.host.top (nick!*user@XXX.XXX.*) CleanUserLargeNet = 21, // 21 : *!*user@*.host.top (*!user@*XXX.XXX.*) - // smart versions of the masks 17-21 that try take care of masked ip addresses + // smart versions of the tqmasks 17-21 that try take care of tqmasked ip addresses // in the form xxx.xxx.INVALID-TOP-MASK NickUserSmartNet = 22, // 22 : nick!~user@*.host.top (nick!~user@XXX.XXX.*) NickSmartNet = 23, // 23 : nick!*@*.host.top (nick!*@XXX.XXX.*) @@ -117,7 +117,7 @@ public: CleanUserSmartNet = 26 // 26 : *!*user@*.host.top (*!user@*XXX.XXX.*) }; - void mask(QString &szMask,MaskType eMaskType = NickCleanUserHost) const; + void tqmask(TQString &szMask,MaskType eMaskType = NickCleanUserHost) const; bool hasWildNick(); // Wild external matches (this and external are wild) @@ -125,35 +125,35 @@ public: // bool matches(const char *szMask); // // passing 0 as one of params here means that it is a match by default // bool matches(const char *nick,const char *user,const char *host); - bool matches(const KviIrcMask &mask) const; + bool matches(const KviIrcMask &tqmask) const; // Fixed external matches (this is wild , external is fixed) - bool matchesFixed(const QString &nick,const QString &user,const QString &host) const; -// bool matchesFixed(const QString &szMask) const; - bool matchesFixed(const KviIrcMask &mask) const; + bool matchesFixed(const TQString &nick,const TQString &user,const TQString &host) const; +// bool matchesFixed(const TQString &szMask) const; + bool matchesFixed(const KviIrcMask &tqmask) const; // Fixed internal matches (this is fixed , external is wild) - //bool matchedBy(const QString &szMask) const; - bool matchedBy(const KviIrcMask &mask) const { return mask.matchesFixed(*this); }; + //bool matchedBy(const TQString &szMask) const; + bool matchedBy(const KviIrcMask &tqmask) const { return tqmask.matchesFixed(*this); }; int nonWildChars(); bool operator==(const KviIrcMask &user); public: - // Constructs an empty mask (*!*@*) + // Constructs an empty tqmask (*!*@*) KviIrcMask(); - // Constructs this KviIrcMask object from a string mask - KviIrcMask(const QString &szMask); + // Constructs this KviIrcMask object from a string tqmask + KviIrcMask(const TQString &szMask); // Carbon copy KviIrcMask(const KviIrcMask &ircUser) : m_szNick(ircUser.m_szNick), m_szUser(ircUser.m_szUser), m_szHost(ircUser.m_szHost) {}; - KviIrcMask(const QString &nick,const QString &user,const QString &host) + KviIrcMask(const TQString &nick,const TQString &user,const TQString &host) : m_szNick(nick), m_szUser(user), m_szHost(host) {}; private: int getIpDomainMaskLen() const; - QString getHostDomainMask() const; + TQString getHostDomainMask() const; int getLargeIpDomainMaskLen() const; - QString getLargeHostDomainMask() const; + TQString getLargeHostDomainMask() const; // this is just a GUESS and must be called AFTER making sure that it is NOT a plain numeric IP bool hasMaskedIp() const; }; diff --git a/src/kvilib/irc/kvi_ircserver.cpp b/src/kvilib/irc/kvi_ircserver.cpp index 5f03fb5e..8e1898fa 100644 --- a/src/kvilib/irc/kvi_ircserver.cpp +++ b/src/kvilib/irc/kvi_ircserver.cpp @@ -89,7 +89,7 @@ KviIrcServer::KviIrcServer(const KviIrcServer &serv) m_iProxy = serv.m_iProxy; m_szUserIdentityId = serv.m_szUserIdentityId; if(serv.m_pChannelList) - m_pChannelList = new QStringList(*(serv.m_pChannelList)); + m_pChannelList = new TQStringList(*(serv.m_pChannelList)); else m_pChannelList = 0; m_bAutoConnect = serv.m_bAutoConnect; } @@ -115,7 +115,7 @@ void KviIrcServer::operator=(const KviIrcServer &serv) m_iProxy = serv.m_iProxy; if(m_pChannelList)delete m_pChannelList; if(serv.m_pChannelList) - m_pChannelList = new QStringList(*(serv.m_pChannelList)); + m_pChannelList = new TQStringList(*(serv.m_pChannelList)); else m_pChannelList = 0; m_bAutoConnect = serv.m_bAutoConnect; } @@ -131,12 +131,12 @@ void KviIrcServer::generateUniqueId() { struct timeval tv; kvi_gettimeofday(&tv,0); - KviQString::sprintf(m_szId,"myserver%d%d%d",tv.tv_usec,rand() % 1000,rand() % 1000); + KviTQString::sprintf(m_szId,"myserver%d%d%d",tv.tv_usec,rand() % 1000,rand() % 1000); } -QString KviIrcServer::ircUri() +TQString KviIrcServer::ircUri() { - QString uri("irc"); + TQString uri("irc"); if(useSSL())uri += "s"; if(isIpV6())uri += "6"; uri += "://"; @@ -145,171 +145,171 @@ QString KviIrcServer::ircUri() if(m_uPort!=6667) { uri += ":"; - QString num; + TQString num; num.setNum(m_uPort); uri += num; } return uri; } -void KviIrcServer::setAutoJoinChannelList(QStringList * pNewChannelList) +void KviIrcServer::setAutoJoinChannelList(TQStringList * pNewChannelList) { if(m_pChannelList)delete m_pChannelList; m_pChannelList = pNewChannelList; } -bool KviIrcServer::load(KviConfig * cfg,const QString &prefix) +bool KviIrcServer::load(KviConfig * cfg,const TQString &prefix) { - QString tmp; - KviQString::sprintf(tmp,"%QHostname",&prefix); - m_szHostname = cfg->readQStringEntry(tmp); - KviQString::sprintf(tmp,"%QIp",&prefix); - m_szIp = cfg->readQStringEntry(tmp); + TQString tmp; + KviTQString::sprintf(tmp,"%TQHostname",&prefix); + m_szHostname = cfg->readTQStringEntry(tmp); + KviTQString::sprintf(tmp,"%TQIp",&prefix); + m_szIp = cfg->readTQStringEntry(tmp); if(m_szHostname.isEmpty() && m_szIp.isEmpty())return false; - KviQString::sprintf(tmp,"%QDescription",&prefix); - m_szDescription = cfg->readQStringEntry(tmp); - KviQString::sprintf(tmp,"%QUser",&prefix); - m_szUser = cfg->readQStringEntry(tmp); - KviQString::sprintf(tmp,"%QPass",&prefix); - m_szPass = cfg->readQStringEntry(tmp); - KviQString::sprintf(tmp,"%QNick",&prefix); - m_szNick = cfg->readQStringEntry(tmp); - KviQString::sprintf(tmp,"%QRealName",&prefix); - m_szRealName = cfg->readQStringEntry(tmp); - KviQString::sprintf(tmp,"%QInitUmode",&prefix); - m_szInitUMode = cfg->readQStringEntry(tmp); - KviQString::sprintf(tmp,"%QAutoJoinChannels",&prefix); - QStringList l = cfg->readStringListEntry(tmp,QStringList()); - if(l.count() > 0)setAutoJoinChannelList(new QStringList(l)); - KviQString::sprintf(tmp,"%QAutoConnect",&prefix); + KviTQString::sprintf(tmp,"%TQDescription",&prefix); + m_szDescription = cfg->readTQStringEntry(tmp); + KviTQString::sprintf(tmp,"%TQUser",&prefix); + m_szUser = cfg->readTQStringEntry(tmp); + KviTQString::sprintf(tmp,"%TQPass",&prefix); + m_szPass = cfg->readTQStringEntry(tmp); + KviTQString::sprintf(tmp,"%TQNick",&prefix); + m_szNick = cfg->readTQStringEntry(tmp); + KviTQString::sprintf(tmp,"%TQRealName",&prefix); + m_szRealName = cfg->readTQStringEntry(tmp); + KviTQString::sprintf(tmp,"%TQInitUmode",&prefix); + m_szInitUMode = cfg->readTQStringEntry(tmp); + KviTQString::sprintf(tmp,"%TQAutoJoinChannels",&prefix); + TQStringList l = cfg->readStringListEntry(tmp,TQStringList()); + if(l.count() > 0)setAutoJoinChannelList(new TQStringList(l)); + KviTQString::sprintf(tmp,"%TQAutoConnect",&prefix); m_bAutoConnect = cfg->readBoolEntry(tmp,false); - KviQString::sprintf(tmp,"%QEncoding",&prefix); - m_szEncoding = cfg->readQStringEntry(tmp); - KviQString::sprintf(tmp,"%QOnConnectCommand",&prefix); - m_szOnConnectCommand = cfg->readQStringEntry(tmp); - KviQString::sprintf(tmp,"%QOnLoginCommand",&prefix); - m_szOnLoginCommand = cfg->readQStringEntry(tmp); - KviQString::sprintf(tmp,"%QLinkFilter",&prefix); - m_szLinkFilter = cfg->readQStringEntry(tmp); - KviQString::sprintf(tmp,"%QPort",&prefix); + KviTQString::sprintf(tmp,"%TQEncoding",&prefix); + m_szEncoding = cfg->readTQStringEntry(tmp); + KviTQString::sprintf(tmp,"%TQOnConnectCommand",&prefix); + m_szOnConnectCommand = cfg->readTQStringEntry(tmp); + KviTQString::sprintf(tmp,"%TQOnLoginCommand",&prefix); + m_szOnLoginCommand = cfg->readTQStringEntry(tmp); + KviTQString::sprintf(tmp,"%TQLinkFilter",&prefix); + m_szLinkFilter = cfg->readTQStringEntry(tmp); + KviTQString::sprintf(tmp,"%TQPort",&prefix); m_uPort = cfg->readUIntEntry(tmp,6667); - KviQString::sprintf(tmp,"%QId",&prefix); - m_szId = cfg->readQStringEntry(tmp); + KviTQString::sprintf(tmp,"%TQId",&prefix); + m_szId = cfg->readTQStringEntry(tmp); if(m_szId.isEmpty())generateUniqueId(); - KviQString::sprintf(tmp,"%QIpV6",&prefix); + KviTQString::sprintf(tmp,"%TQIpV6",&prefix); setIpV6(cfg->readBoolEntry(tmp,false)); - KviQString::sprintf(tmp,"%QCacheIp",&prefix); + KviTQString::sprintf(tmp,"%TQCacheIp",&prefix); setCacheIp(cfg->readBoolEntry(tmp,false)); // true ? - KviQString::sprintf(tmp,"%QSSL",&prefix); + KviTQString::sprintf(tmp,"%TQSSL",&prefix); setUseSSL(cfg->readBoolEntry(tmp,false)); - KviQString::sprintf(tmp,"%QProxy",&prefix); + KviTQString::sprintf(tmp,"%TQProxy",&prefix); setProxy(cfg->readIntEntry(tmp,-2)); - KviQString::sprintf(tmp,"%QUserIdentityId",&prefix); - m_szUserIdentityId = cfg->readQStringEntry(tmp); + KviTQString::sprintf(tmp,"%TQUserIdentityId",&prefix); + m_szUserIdentityId = cfg->readTQStringEntry(tmp); return true; } -void KviIrcServer::save(KviConfig * cfg,const QString &prefix) +void KviIrcServer::save(KviConfig * cfg,const TQString &prefix) { - QString tmp; - KviQString::sprintf(tmp,"%QHostname",&prefix); + TQString tmp; + KviTQString::sprintf(tmp,"%TQHostname",&prefix); cfg->writeEntry(tmp,m_szHostname); - KviQString::sprintf(tmp,"%QId",&prefix); + KviTQString::sprintf(tmp,"%TQId",&prefix); cfg->writeEntry(tmp,m_szId); if(!m_szIp.isEmpty()) { - KviQString::sprintf(tmp,"%QIp",&prefix); + KviTQString::sprintf(tmp,"%TQIp",&prefix); cfg->writeEntry(tmp,m_szIp); } if(!m_szDescription.isEmpty()) { - KviQString::sprintf(tmp,"%QDescription",&prefix); + KviTQString::sprintf(tmp,"%TQDescription",&prefix); cfg->writeEntry(tmp,m_szDescription); } if(!m_szUser.isEmpty()) { - KviQString::sprintf(tmp,"%QUser",&prefix); + KviTQString::sprintf(tmp,"%TQUser",&prefix); cfg->writeEntry(tmp,m_szUser); } if(!m_szPass.isEmpty()) { - KviQString::sprintf(tmp,"%QPass",&prefix); + KviTQString::sprintf(tmp,"%TQPass",&prefix); cfg->writeEntry(tmp,m_szPass); } if(!m_szNick.isEmpty()) { - KviQString::sprintf(tmp,"%QNick",&prefix); + KviTQString::sprintf(tmp,"%TQNick",&prefix); cfg->writeEntry(tmp,m_szNick); } if(!m_szRealName.isEmpty()) { - KviQString::sprintf(tmp,"%QRealName",&prefix); + KviTQString::sprintf(tmp,"%TQRealName",&prefix); cfg->writeEntry(tmp,m_szRealName); } if(!m_szInitUMode.isEmpty()) { - KviQString::sprintf(tmp,"%QInitUMode",&prefix); + KviTQString::sprintf(tmp,"%TQInitUMode",&prefix); cfg->writeEntry(tmp,m_szInitUMode); } if(autoJoinChannelList()) { - KviQString::sprintf(tmp,"%QAutoJoinChannels",&prefix); + KviTQString::sprintf(tmp,"%TQAutoJoinChannels",&prefix); cfg->writeEntry(tmp,*(autoJoinChannelList())); } if(autoConnect()) // otherwise it defaults to false anyway { - KviQString::sprintf(tmp,"%QAutoConnect",&prefix); + KviTQString::sprintf(tmp,"%TQAutoConnect",&prefix); cfg->writeEntry(tmp,autoConnect()); } if(!m_szEncoding.isEmpty()) { - KviQString::sprintf(tmp,"%QEncoding",&prefix); + KviTQString::sprintf(tmp,"%TQEncoding",&prefix); cfg->writeEntry(tmp,m_szEncoding); } if(!m_szOnConnectCommand.isEmpty()) { - KviQString::sprintf(tmp,"%QOnConnectCommand",&prefix); + KviTQString::sprintf(tmp,"%TQOnConnectCommand",&prefix); cfg->writeEntry(tmp,m_szOnConnectCommand); } if(!m_szOnLoginCommand.isEmpty()) { - KviQString::sprintf(tmp,"%QOnLoginCommand",&prefix); + KviTQString::sprintf(tmp,"%TQOnLoginCommand",&prefix); cfg->writeEntry(tmp,m_szOnLoginCommand); } if(!m_szLinkFilter.isEmpty()) { - KviQString::sprintf(tmp,"%QLinkFilter",&prefix); + KviTQString::sprintf(tmp,"%TQLinkFilter",&prefix); cfg->writeEntry(tmp,m_szLinkFilter); } if(m_uPort != 6667) { - KviQString::sprintf(tmp,"%QPort",&prefix); + KviTQString::sprintf(tmp,"%TQPort",&prefix); cfg->writeEntry(tmp,m_uPort); } if(isIpV6()) { - KviQString::sprintf(tmp,"%QIpV6",&prefix); + KviTQString::sprintf(tmp,"%TQIpV6",&prefix); cfg->writeEntry(tmp,isIpV6()); } if(cacheIp()) { - KviQString::sprintf(tmp,"%QCacheIp",&prefix); + KviTQString::sprintf(tmp,"%TQCacheIp",&prefix); cfg->writeEntry(tmp,cacheIp()); } if(useSSL()) { - KviQString::sprintf(tmp,"%QSSL",&prefix); + KviTQString::sprintf(tmp,"%TQSSL",&prefix); cfg->writeEntry(tmp,useSSL()); } if(proxy()!=-2) { - KviQString::sprintf(tmp,"%QProxy",&prefix); + KviTQString::sprintf(tmp,"%TQProxy",&prefix); cfg->writeEntry(tmp,proxy()); } if(!m_szUserIdentityId.isEmpty()) { - KviQString::sprintf(tmp,"%QUserIdentityId",&prefix); + KviTQString::sprintf(tmp,"%TQUserIdentityId",&prefix); cfg->writeEntry(tmp,m_szUserIdentityId); } } @@ -323,13 +323,13 @@ KviIrcNetwork::KviIrcNetwork(const KviIrcNetwork &src) copyFrom(src); } -KviIrcNetwork::KviIrcNetwork(const QString &name) +KviIrcNetwork::KviIrcNetwork(const TQString &name) { m_szName = name; m_pChannelList = 0; m_pNickServRuleSet = 0; m_bAutoConnect = false; - // m_szEncoding = QString::null; // set by default + // m_szEncoding = TQString(); // set by default } KviIrcNetwork::~KviIrcNetwork() @@ -338,7 +338,7 @@ KviIrcNetwork::~KviIrcNetwork() if(m_pNickServRuleSet)delete m_pNickServRuleSet; } -void KviIrcNetwork::setAutoJoinChannelList(QStringList * pNewChannelList) +void KviIrcNetwork::setAutoJoinChannelList(TQStringList * pNewChannelList) { if(m_pChannelList)delete m_pChannelList; m_pChannelList = pNewChannelList; @@ -364,7 +364,7 @@ void KviIrcNetwork::copyFrom(const KviIrcNetwork &src) m_szOnConnectCommand = src.m_szOnConnectCommand; m_szOnLoginCommand = src.m_szOnLoginCommand; if(m_pChannelList)delete m_pChannelList; - if(src.m_pChannelList)m_pChannelList = new QStringList(*(src.m_pChannelList)); + if(src.m_pChannelList)m_pChannelList = new TQStringList(*(src.m_pChannelList)); else m_pChannelList = 0; if(m_pNickServRuleSet)delete m_pNickServRuleSet; if(src.m_pNickServRuleSet)m_pNickServRuleSet = new KviNickServRuleSet(*(src.m_pNickServRuleSet)); diff --git a/src/kvilib/irc/kvi_ircserver.h b/src/kvilib/irc/kvi_ircserver.h index 4c0ca54d..13876b3e 100644 --- a/src/kvilib/irc/kvi_ircserver.h +++ b/src/kvilib/irc/kvi_ircserver.h @@ -30,7 +30,7 @@ #include "kvi_qstring.h" #include "kvi_pointerlist.h" -#include +#include class KviConfig; class KviNickServRuleSet; @@ -44,10 +44,10 @@ class KviIrcServer; class KVILIB_API KviIrcServerReconnectInfo { public: - QString m_szNick; - QString m_szAwayReason; - QString m_szJoinChannels; - QStringList m_szOpenQueryes; + TQString m_szNick; + TQString m_szAwayReason; + TQString m_szJoinChannels; + TQStringList m_szOpenQueryes; bool m_bIsAway; }; @@ -59,73 +59,73 @@ public: ~KviIrcServer(); public: KviIrcServerReconnectInfo *m_pReconnectInfo; - QString m_szHostname; // the server hostname (or ip eventually) - QString m_szIp; // the server's cached ip (if we're caching) - QString m_szDescription; // the server description + TQString m_szHostname; // the server hostname (or ip eventually) + TQString m_szIp; // the server's cached ip (if we're caching) + TQString m_szDescription; // the server description kvi_u32_t m_uPort; // the server's port unsigned short int m_uFlags; // flags // Extended data - QString m_szUserIdentityId; // The user identity to use for this server: if empty + TQString m_szUserIdentityId; // The user identity to use for this server: if empty // Then use the network identity instead - QString m_szUser; // special username - QString m_szPass; // special password - QString m_szNick; // special nickname - QString m_szRealName; // special real name - QString m_szInitUMode; // special user mode - QString m_szOnConnectCommand; // the command to run on connect - QString m_szOnLoginCommand; // the command to run after login - QString m_szLinkFilter; // the link filter object - QString m_szEncoding; // if empty, use network encoding - QStringList * m_pChannelList; // Channels to auto join + TQString m_szUser; // special username + TQString m_szPass; // special password + TQString m_szNick; // special nickname + TQString m_szRealName; // special real name + TQString m_szInitUMode; // special user mode + TQString m_szOnConnectCommand; // the command to run on connect + TQString m_szOnLoginCommand; // the command to run after login + TQString m_szLinkFilter; // the link filter object + TQString m_szEncoding; // if empty, use network encoding + TQStringList * m_pChannelList; // Channels to auto join bool m_bAutoConnect; // autoconnect - QString m_szId; // the server's may-be-unique id, may be auto-generated + TQString m_szId; // the server's may-be-unique id, may be auto-generated int m_iProxy; // proxy server's id public: int proxy() { return m_iProxy; }; KviProxy* proxyServer(KviProxyDataBase * pDb); kvi_u32_t port() const { return m_uPort; }; - const QString & ipAddress() const { return m_szIp; }; - const QString & password() const { return m_szPass; }; - const QString & nickName() const { return m_szNick; }; - const QString & initUMode() const { return m_szInitUMode; }; - const QString & hostName() const { return m_szHostname; }; - const QString & ip() const { return m_szIp; }; - const QString & onLoginCommand() const { return m_szOnLoginCommand; }; - const QString & onConnectCommand() const { return m_szOnConnectCommand; }; - const QString & userName() const { return m_szUser; }; - const QString & realName() const { return m_szRealName; }; - const QString & linkFilter() const { return m_szLinkFilter; }; - const QString & description() const { return m_szDescription; }; - const QString & encoding() const { return m_szEncoding; }; - const QString & id() const { return m_szId; }; - const QString & userIdentityId() const { return m_szUserIdentityId; }; + const TQString & ipAddress() const { return m_szIp; }; + const TQString & password() const { return m_szPass; }; + const TQString & nickName() const { return m_szNick; }; + const TQString & initUMode() const { return m_szInitUMode; }; + const TQString & hostName() const { return m_szHostname; }; + const TQString & ip() const { return m_szIp; }; + const TQString & onLoginCommand() const { return m_szOnLoginCommand; }; + const TQString & onConnectCommand() const { return m_szOnConnectCommand; }; + const TQString & userName() const { return m_szUser; }; + const TQString & realName() const { return m_szRealName; }; + const TQString & linkFilter() const { return m_szLinkFilter; }; + const TQString & description() const { return m_szDescription; }; + const TQString & encoding() const { return m_szEncoding; }; + const TQString & id() const { return m_szId; }; + const TQString & userIdentityId() const { return m_szUserIdentityId; }; bool autoConnect() const { return m_bAutoConnect; }; - QStringList* autoJoinChannelList(){ return m_pChannelList; }; + TQStringList* autoJoinChannelList(){ return m_pChannelList; }; bool isIpV6() const { return (m_uFlags & KVI_IRCSERVER_FLAG_IPV6); }; bool useSSL() const { return (m_uFlags & KVI_IRCSERVER_FLAG_SSL); }; bool cacheIp() const { return (m_uFlags & KVI_IRCSERVER_FLAG_CACHEIP); }; void setProxy(int p){ m_iProxy = p; }; - void setIpAddress(const QString &a){ m_szIp = a; }; + void setIpAddress(const TQString &a){ m_szIp = a; }; void setPort(kvi_u32_t p){ m_uPort = p; }; - void setHostName(const QString &n){ m_szHostname = n; }; - void setDescription(const QString &d){ m_szDescription = d; }; - void setUserName(const QString &u){ m_szUser = u; }; - void setPassword(const QString &p){ m_szPass = p; }; - void setNickName(const QString &n){ m_szNick = n; }; - void setRealName(const QString &r){ m_szRealName = r; }; - void setEncoding(const QString &e){ m_szEncoding = e; }; - void setInitUMode(const QString &u){ m_szInitUMode = u; }; - void setOnConnectCommand(const QString &cmd){ m_szOnConnectCommand = cmd; }; - void setOnLoginCommand(const QString &cmd){ m_szOnLoginCommand = cmd; }; - void setLinkFilter(const QString &f){ m_szLinkFilter = f; }; + void setHostName(const TQString &n){ m_szHostname = n; }; + void setDescription(const TQString &d){ m_szDescription = d; }; + void setUserName(const TQString &u){ m_szUser = u; }; + void setPassword(const TQString &p){ m_szPass = p; }; + void setNickName(const TQString &n){ m_szNick = n; }; + void setRealName(const TQString &r){ m_szRealName = r; }; + void setEncoding(const TQString &e){ m_szEncoding = e; }; + void setInitUMode(const TQString &u){ m_szInitUMode = u; }; + void setOnConnectCommand(const TQString &cmd){ m_szOnConnectCommand = cmd; }; + void setOnLoginCommand(const TQString &cmd){ m_szOnLoginCommand = cmd; }; + void setLinkFilter(const TQString &f){ m_szLinkFilter = f; }; // the channel list must be allocated with new! - void setAutoJoinChannelList(QStringList * pNewChannelList); + void setAutoJoinChannelList(TQStringList * pNewChannelList); void setAutoConnect(bool autoconnect) { m_bAutoConnect = autoconnect; }; - void setUserIdentityId(const QString &szUserIdentityId){ m_szUserIdentityId = szUserIdentityId; }; + void setUserIdentityId(const TQString &szUserIdentityId){ m_szUserIdentityId = szUserIdentityId; }; void setIpV6(bool bSet) { if(bSet)m_uFlags |= KVI_IRCSERVER_FLAG_IPV6; @@ -143,13 +143,13 @@ public: }; void operator =(const KviIrcServer &s); - bool load(KviConfig * cfg,const QString &prefix); - void save(KviConfig * cfg,const QString &prefix); + bool load(KviConfig * cfg,const TQString &prefix); + void save(KviConfig * cfg,const TQString &prefix); void generateUniqueId(); - void setId(const QString &szId){ m_szId = szId; if(m_szId.isEmpty())generateUniqueId(); }; + void setId(const TQString &szId){ m_szId = szId; if(m_szId.isEmpty())generateUniqueId(); }; - QString ircUri(); + TQString ircUri(); }; class KVILIB_API KviIrcNetwork : public KviHeapObject @@ -157,48 +157,48 @@ class KVILIB_API KviIrcNetwork : public KviHeapObject friend class KviIrcServerDataBase; public: KviIrcNetwork(const KviIrcNetwork &src); - KviIrcNetwork(const QString &name); + KviIrcNetwork(const TQString &name); ~KviIrcNetwork(); protected: - QString m_szName; - QString m_szDescription; - QString m_szEncoding; // if empty, use system default - QString m_szNickName; // preferred nick name - QString m_szUserName; // preferred user name - QString m_szRealName; // preferred real name - QString m_szOnConnectCommand; // the command to run on connect - QString m_szOnLoginCommand; // the command to run after login - QStringList * m_pChannelList; // Channels to auto join + TQString m_szName; + TQString m_szDescription; + TQString m_szEncoding; // if empty, use system default + TQString m_szNickName; // preferred nick name + TQString m_szUserName; // preferred user name + TQString m_szRealName; // preferred real name + TQString m_szOnConnectCommand; // the command to run on connect + TQString m_szOnLoginCommand; // the command to run after login + TQStringList * m_pChannelList; // Channels to auto join KviNickServRuleSet * m_pNickServRuleSet; // set of nick serv rules bool m_bAutoConnect; // autoconnect - QString m_szUserIdentityId; // The user identity to use for this server: if empty + TQString m_szUserIdentityId; // The user identity to use for this server: if empty // Then use the global primary identity public: - const QString & name() const { return m_szName; }; - const QString & encoding() const { return m_szEncoding; }; - const QString & description() const { return m_szDescription; }; - const QString & nickName() const { return m_szNickName; }; - const QString & realName() const { return m_szRealName; }; - const QString & userName() const { return m_szUserName; }; - const QString & onLoginCommand() const { return m_szOnLoginCommand; }; - const QString & onConnectCommand() const { return m_szOnConnectCommand; }; - const QString & userIdentityId() const { return m_szUserIdentityId; }; + const TQString & name() const { return m_szName; }; + const TQString & encoding() const { return m_szEncoding; }; + const TQString & description() const { return m_szDescription; }; + const TQString & nickName() const { return m_szNickName; }; + const TQString & realName() const { return m_szRealName; }; + const TQString & userName() const { return m_szUserName; }; + const TQString & onLoginCommand() const { return m_szOnLoginCommand; }; + const TQString & onConnectCommand() const { return m_szOnConnectCommand; }; + const TQString & userIdentityId() const { return m_szUserIdentityId; }; bool autoConnect() const { return m_bAutoConnect; }; - QStringList* autoJoinChannelList(){ return m_pChannelList; }; + TQStringList* autoJoinChannelList(){ return m_pChannelList; }; KviNickServRuleSet * nickServRuleSet(){ return m_pNickServRuleSet; }; void setNickServRuleSet(KviNickServRuleSet * s); void copyFrom(const KviIrcNetwork &d); - void setName(const QString &szName){ m_szName = szName; }; - void setEncoding(const QString &szEncoding){ m_szEncoding = szEncoding; }; - void setDescription(const QString &szDescription){ m_szDescription = szDescription; }; - void setOnConnectCommand(const QString &cmd){ m_szOnConnectCommand = cmd; }; - void setOnLoginCommand(const QString &cmd){ m_szOnLoginCommand = cmd; }; - void setNickName(const QString &n){ m_szNickName = n; }; - void setRealName(const QString &r){ m_szRealName = r; }; - void setUserName(const QString &u){ m_szUserName = u; }; - void setAutoJoinChannelList(QStringList * pNewChannelList); + void setName(const TQString &szName){ m_szName = szName; }; + void setEncoding(const TQString &szEncoding){ m_szEncoding = szEncoding; }; + void setDescription(const TQString &szDescription){ m_szDescription = szDescription; }; + void setOnConnectCommand(const TQString &cmd){ m_szOnConnectCommand = cmd; }; + void setOnLoginCommand(const TQString &cmd){ m_szOnLoginCommand = cmd; }; + void setNickName(const TQString &n){ m_szNickName = n; }; + void setRealName(const TQString &r){ m_szRealName = r; }; + void setUserName(const TQString &u){ m_szUserName = u; }; + void setAutoJoinChannelList(TQStringList * pNewChannelList); void setAutoConnect(bool bAutoConnect){ m_bAutoConnect = bAutoConnect; }; - void setUserIdentityId(const QString &szUserIdentityId){ m_szUserIdentityId = szUserIdentityId; }; + void setUserIdentityId(const TQString &szUserIdentityId){ m_szUserIdentityId = szUserIdentityId; }; }; diff --git a/src/kvilib/irc/kvi_ircserverdb.cpp b/src/kvilib/irc/kvi_ircserverdb.cpp index 88198b12..172da1f6 100644 --- a/src/kvilib/irc/kvi_ircserverdb.cpp +++ b/src/kvilib/irc/kvi_ircserverdb.cpp @@ -25,10 +25,10 @@ #define __KVILIB__ -#include -#include -#include -#include +#include +#include +#include +#include #include "kvi_ircserverdb.h" #include "kvi_config.h" @@ -59,7 +59,7 @@ KviIrcServer * KviIrcServerDataBaseRecord::findServer(const KviIrcServer * pServ { for(KviIrcServer *s=m_pServerList->first();s;s=m_pServerList->next()) { - if(KviQString::equalCI(s->m_szHostname,pServer->m_szHostname) && + if(KviTQString::equalCI(s->m_szHostname,pServer->m_szHostname) && (s->m_uPort == pServer->m_uPort) && (s->useSSL() == pServer->useSSL()) && (s->isIpV6() == pServer->isIpV6()))return s; @@ -69,7 +69,7 @@ KviIrcServer * KviIrcServerDataBaseRecord::findServer(const KviIrcServer * pServ void KviIrcServerDataBaseRecord::setCurrentServer(KviIrcServer *srv) { - if(m_pServerList->findRef(srv) != -1)m_pCurrentServer = srv; + if(m_pServerList->tqfindRef(srv) != -1)m_pCurrentServer = srv; } KviIrcServer * KviIrcServerDataBaseRecord::currentServer() @@ -90,7 +90,7 @@ KviIrcServer * KviIrcServerDataBaseRecord::currentServer() KviIrcServerDataBase::KviIrcServerDataBase() { - m_pRecords = new KviPointerHashTable(17,false); + m_pRecords = new KviPointerHashTable(17,false); m_pRecords->setAutoDelete(true); m_pAutoConnectOnStartupServers = 0; m_pAutoConnectOnStartupNetworks = 0; @@ -126,19 +126,19 @@ void KviIrcServerDataBase::clear() KviIrcServerDataBaseRecord * KviIrcServerDataBase::insertNetwork(KviIrcNetwork *n) { KviIrcServerDataBaseRecord * r = new KviIrcServerDataBaseRecord(n); - m_pRecords->replace(n->name(),r); + m_pRecords->tqreplace(n->name(),r); return r; } -KviIrcServerDataBaseRecord * KviIrcServerDataBase::findRecord(const QString &szNetName) +KviIrcServerDataBaseRecord * KviIrcServerDataBase::findRecord(const TQString &szNetName) { - return m_pRecords->find(szNetName); + return m_pRecords->tqfind(szNetName); } -KviIrcNetwork * KviIrcServerDataBase::findNetwork(const QString &szName) +KviIrcNetwork * KviIrcServerDataBase::findNetwork(const TQString &szName) { - KviIrcServerDataBaseRecord * r = m_pRecords->find(szName); + KviIrcServerDataBaseRecord * r = m_pRecords->tqfind(szName); if(!r)return 0; return r->network(); } @@ -146,19 +146,19 @@ KviIrcNetwork * KviIrcServerDataBase::findNetwork(const QString &szName) KviIrcServerDataBaseRecord * KviIrcServerDataBase::currentRecord() { KviIrcServerDataBaseRecord * r = 0; - if(!m_szCurrentNetwork.isEmpty())r = m_pRecords->find(m_szCurrentNetwork); + if(!m_szCurrentNetwork.isEmpty())r = m_pRecords->tqfind(m_szCurrentNetwork); if(r)return r; - KviPointerHashTableIterator it(*m_pRecords); + KviPointerHashTableIterator it(*m_pRecords); r = it.current(); if(!r)return 0; m_szCurrentNetwork = r->network()->name(); return r; } -void KviIrcServerDataBase::updateServerIp(KviIrcServer * pServer,const QString & ip) +void KviIrcServerDataBase::updateServerIp(KviIrcServer * pServer,const TQString & ip) { - KviPointerHashTableIterator it(*m_pRecords); + KviPointerHashTableIterator it(*m_pRecords); while(KviIrcServerDataBaseRecord * r = it.current()) { KviIrcServer * srv = r->findServer(pServer); @@ -171,7 +171,7 @@ void KviIrcServerDataBase::updateServerIp(KviIrcServer * pServer,const QString & } } -bool KviIrcServerDataBase::makeCurrentBestServerInNetwork(const QString &szNetName,KviIrcServerDataBaseRecord * r,QString &szError) +bool KviIrcServerDataBase::makeCurrentBestServerInNetwork(const TQString &szNetName,KviIrcServerDataBaseRecord * r,TQString &szError) { m_szCurrentNetwork = szNetName; // find a round-robin server in that network @@ -185,11 +185,11 @@ bool KviIrcServerDataBase::makeCurrentBestServerInNetwork(const QString &szNetNa for(KviIrcServer * s = r->m_pServerList->first();s;s = r->m_pServerList->next()) { #ifdef COMPILE_USE_QT4 - if(s->m_szDescription.contains("random",Qt::CaseInsensitive) || - (s->m_szDescription.contains("round",Qt::CaseInsensitive) && s->m_szDescription.contains("robin",Qt::CaseInsensitive))) + if(s->m_szDescription.tqcontains("random",TQt::CaseInsensitive) || + (s->m_szDescription.tqcontains("round",TQt::CaseInsensitive) && s->m_szDescription.tqcontains("robin",TQt::CaseInsensitive))) #else - if(s->m_szDescription.contains("random",false) || - (s->m_szDescription.contains("round",false) && s->m_szDescription.contains("robin",false))) + if(s->m_szDescription.tqcontains("random",false) || + (s->m_szDescription.tqcontains("round",false) && s->m_szDescription.tqcontains("robin",false))) #endif { r->setCurrentServer(s); @@ -199,17 +199,17 @@ bool KviIrcServerDataBase::makeCurrentBestServerInNetwork(const QString &szNetNa // no explicit round robin... try some common names - QString tryAlso1,tryAlso2,tryAlso3; + TQString tryAlso1,tryAlso2,tryAlso3; - KviQString::sprintf(tryAlso1,"irc.%Q.org",&szNetName); - KviQString::sprintf(tryAlso2,"irc.%Q.net",&szNetName); - KviQString::sprintf(tryAlso3,"irc.%Q.com",&szNetName); + KviTQString::sprintf(tryAlso1,"irc.%Q.org",&szNetName); + KviTQString::sprintf(tryAlso2,"irc.%Q.net",&szNetName); + KviTQString::sprintf(tryAlso3,"irc.%Q.com",&szNetName); for(KviIrcServer * ss = r->m_pServerList->first();ss;ss = r->m_pServerList->next()) { - if(KviQString::equalCI(ss->m_szHostname,tryAlso1) || - KviQString::equalCI(ss->m_szHostname,tryAlso2) || - KviQString::equalCI(ss->m_szHostname,tryAlso3)) + if(KviTQString::equalCI(ss->m_szHostname,tryAlso1) || + KviTQString::equalCI(ss->m_szHostname,tryAlso2) || + KviTQString::equalCI(ss->m_szHostname,tryAlso3)) { r->setCurrentServer(ss); return true; @@ -221,36 +221,36 @@ bool KviIrcServerDataBase::makeCurrentBestServerInNetwork(const QString &szNetNa } -bool KviIrcServerDataBase::makeCurrentServer(KviIrcServerDefinition * d,QString &szError) +bool KviIrcServerDataBase::makeCurrentServer(KviIrcServerDefinition * d,TQString &szError) { KviIrcServer * pServer = 0; - KviPointerHashTableIterator it(*m_pRecords); + KviPointerHashTableIterator it(*m_pRecords); KviIrcServerDataBaseRecord * r = 0; KviIrcServer * srv; - if(KviQString::equalCIN(d->szServer,"net:",4)) + if(KviTQString::equalCIN(d->szServer,"net:",4)) { // net:networkname form - QString szNet = d->szServer; + TQString szNet = d->szServer; szNet.remove(0,4); - KviIrcServerDataBaseRecord * r = m_pRecords->find(szNet); + KviIrcServerDataBaseRecord * r = m_pRecords->tqfind(szNet); if(r)return makeCurrentBestServerInNetwork(szNet,r,szError); szError = __tr2qs("The server specification seems to be in the net: but the network couln't be found in the database"); return false; } - if(KviQString::equalCIN(d->szServer,"id:",3)) + if(KviTQString::equalCIN(d->szServer,"id:",3)) { // id:serverid form - QString szId = d->szServer; + TQString szId = d->szServer; szId.remove(0,3); while((r = it.current())) { for(srv = r->serverList()->first();srv && (!pServer);srv = r->serverList()->next()) { - if(KviQString::equalCI(srv->id(),szId)) + if(KviTQString::equalCI(srv->id(),szId)) { pServer = srv; goto search_finished; @@ -268,7 +268,7 @@ bool KviIrcServerDataBase::makeCurrentServer(KviIrcServerDefinition * d,QString { for(srv = r->serverList()->first();srv && (!pServer);srv = r->serverList()->next()) { - if(KviQString::equalCI(srv->hostName(),d->szServer)) + if(KviTQString::equalCI(srv->hostName(),d->szServer)) { if(d->bIpV6 == srv->isIpV6()) { @@ -283,7 +283,7 @@ bool KviIrcServerDataBase::makeCurrentServer(KviIrcServerDefinition * d,QString if(!d->szLinkFilter.isEmpty()) { // must match the link filter - if(KviQString::equalCI(d->szLinkFilter,srv->linkFilter())) + if(KviTQString::equalCI(d->szLinkFilter,srv->linkFilter())) { // link filter matches pServer = srv; @@ -300,7 +300,7 @@ bool KviIrcServerDataBase::makeCurrentServer(KviIrcServerDefinition * d,QString if(!d->szLinkFilter.isEmpty()) { // must match the link filter - if(KviQString::equalCI(d->szLinkFilter,srv->linkFilter())) + if(KviTQString::equalCI(d->szLinkFilter,srv->linkFilter())) { // link filter matches pServer = srv; @@ -344,13 +344,13 @@ search_finished: { // is it a valid hostname ? (must contain at least one dot) #ifdef COMPILE_USE_QT4 - if(!d->szServer.contains('.')) + if(!d->szServer.tqcontains('.')) #else - if(d->szServer.contains('.') < 1) + if(d->szServer.tqcontains('.') < 1) #endif { // assume it is a network name! - KviIrcServerDataBaseRecord * r = m_pRecords->find(d->szServer); + KviIrcServerDataBaseRecord * r = m_pRecords->tqfind(d->szServer); if(r)return makeCurrentBestServerInNetwork(d->szServer,r,szError); // else probably not a network name } @@ -358,11 +358,11 @@ search_finished: // a valid hostname or ip address , not found in list : add it and make it current - r = m_pRecords->find(__tr2qs("Standalone Servers")); + r = m_pRecords->tqfind(__tr2qs("Standalone Servers")); if(!r) { r = new KviIrcServerDataBaseRecord(new KviIrcNetwork(__tr2qs("Standalone Servers"))); - m_pRecords->replace(r->network()->name(),r); + m_pRecords->tqreplace(r->network()->name(),r); } KviIrcServer * s = new KviIrcServer(); @@ -397,11 +397,11 @@ search_finished: return true; } -void parseMircServerRecord(QString entry,QString& szNet, - QString& szDescription,QString& szHost,QString& szPort,bool& bSsl,kvi_u32_t& uPort) +void parseMircServerRecord(TQString entry,TQString& szNet, + TQString& szDescription,TQString& szHost,TQString& szPort,bool& bSsl,kvi_u32_t& uPort) { bSsl = false; - int idx = KviQString::find(entry,"SERVER:"); + int idx = KviTQString::tqfind(entry,"SERVER:"); if(idx != -1) { szDescription = entry.left(idx); @@ -409,7 +409,7 @@ void parseMircServerRecord(QString entry,QString& szNet, szDescription=szDescription.section(':',1,1); entry.remove(0,idx + 7); - idx = KviQString::find(entry,"GROUP:"); + idx = KviTQString::tqfind(entry,"GROUP:"); if(idx != -1) { szHost = entry.left(idx); @@ -431,35 +431,35 @@ void parseMircServerRecord(QString entry,QString& szNet, } } -void KviIrcServerDataBase::loadFromMircIni(const QString & filename, const QString & szMircIni, QStringList& recentServers) +void KviIrcServerDataBase::loadFromMircIni(const TQString & filename, const TQString & szMircIni, TQStringList& recentServers) { clear(); recentServers.clear(); - QString szDefaultServer; + TQString szDefaultServer; KviConfig mircCfg(szMircIni,KviConfig::Read,true); if(mircCfg.hasGroup("mirc")) { mircCfg.setGroup("mirc"); - szDefaultServer = mircCfg.readQStringEntry("host"); + szDefaultServer = mircCfg.readTQStringEntry("host"); } KviConfig cfg(filename,KviConfig::Read,true); int i = 0; - QString entry; - QString key; + TQString entry; + TQString key; if(cfg.hasGroup("recent")) { cfg.setGroup("recent"); do { - KviQString::sprintf(key,"n%d",i); + KviTQString::sprintf(key,"n%d",i); entry = cfg.readEntry(key); if(!entry.isEmpty()) { - QString szNet; - QString szDescription; - QString szHost; - QString szPort; + TQString szNet; + TQString szDescription; + TQString szHost; + TQString szPort; bool bSsl = false; kvi_u32_t uPort = 0; @@ -477,15 +477,15 @@ void KviIrcServerDataBase::loadFromMircIni(const QString & filename, const QStri { cfg.setGroup("servers"); do { - KviQString::sprintf(key,"n%d",i); + KviTQString::sprintf(key,"n%d",i); entry = cfg.readEntry(key); if(!entry.isEmpty()) { bool bDefault = false; - QString szNet; - QString szDescription; - QString szHost; - QString szPort; + TQString szNet; + TQString szDescription; + TQString szHost; + TQString szPort; bool bSsl = false; kvi_u32_t uPort = 0; // :SERVER:GROUP: @@ -520,14 +520,14 @@ void KviIrcServerDataBase::loadFromMircIni(const QString & filename, const QStri } -void KviIrcServerDataBase::load(const QString & filename) +void KviIrcServerDataBase::load(const TQString & filename) { clear(); KviConfig cfg(filename,KviConfig::Read); KviConfigIterator it(*(cfg.dict())); - QString tmp; + TQString tmp; while(it.current()) { @@ -536,16 +536,16 @@ void KviIrcServerDataBase::load(const QString & filename) KviIrcNetwork * n = new KviIrcNetwork(it.currentKey()); KviIrcServerDataBaseRecord * r = insertNetwork(n); cfg.setGroup(it.currentKey()); - n->m_szEncoding = cfg.readQStringEntry("Encoding"); - n->m_szDescription = cfg.readQStringEntry("Description"); - n->m_szNickName = cfg.readQStringEntry("NickName"); - n->m_szRealName = cfg.readQStringEntry("RealName"); - n->m_szUserName = cfg.readQStringEntry("UserName"); - n->m_szOnConnectCommand = cfg.readQStringEntry("OnConnectCommand"); - n->m_szOnLoginCommand = cfg.readQStringEntry("OnLoginCommand"); - n->m_pNickServRuleSet = KviNickServRuleSet::load(&cfg,QString::null); + n->m_szEncoding = cfg.readTQStringEntry("Encoding"); + n->m_szDescription = cfg.readTQStringEntry("Description"); + n->m_szNickName = cfg.readTQStringEntry("NickName"); + n->m_szRealName = cfg.readTQStringEntry("RealName"); + n->m_szUserName = cfg.readTQStringEntry("UserName"); + n->m_szOnConnectCommand = cfg.readTQStringEntry("OnConnectCommand"); + n->m_szOnLoginCommand = cfg.readTQStringEntry("OnLoginCommand"); + n->m_pNickServRuleSet = KviNickServRuleSet::load(&cfg,TQString()); n->m_bAutoConnect = cfg.readBoolEntry("AutoConnect",false); - n->m_szUserIdentityId = cfg.readQStringEntry("UserIdentityId"); + n->m_szUserIdentityId = cfg.readTQStringEntry("UserIdentityId"); if(n->m_bAutoConnect) { if(!m_pAutoConnectOnStartupNetworks) @@ -555,8 +555,8 @@ void KviIrcServerDataBase::load(const QString & filename) } m_pAutoConnectOnStartupNetworks->append(r); } - QStringList l = cfg.readStringListEntry("AutoJoinChannels",QStringList()); - if(l.count() > 0)n->setAutoJoinChannelList(new QStringList(l)); + TQStringList l = cfg.readStringListEntry("AutoJoinChannels",TQStringList()); + if(l.count() > 0)n->setAutoJoinChannelList(new TQStringList(l)); if(cfg.readBoolEntry("Current",false))m_szCurrentNetwork = it.currentKey(); @@ -564,11 +564,11 @@ void KviIrcServerDataBase::load(const QString & filename) for(int i=0;i < nServers;i++) { KviIrcServer *s = new KviIrcServer(); - KviQString::sprintf(tmp,"%d_",i); + KviTQString::sprintf(tmp,"%d_",i); if(s->load(&cfg,tmp)) { r->m_pServerList->append(s); - KviQString::sprintf(tmp,"%d_Current",i); + KviTQString::sprintf(tmp,"%d_Current",i); if(cfg.readBoolEntry(tmp,false))r->m_pCurrentServer = s; if(s->autoConnect()) { @@ -587,15 +587,15 @@ void KviIrcServerDataBase::load(const QString & filename) } } -void KviIrcServerDataBase::save(const QString &filename) +void KviIrcServerDataBase::save(const TQString &filename) { KviConfig cfg(filename,KviConfig::Write); cfg.clear(); // clear any old entry - KviPointerHashTableIterator it(*m_pRecords); + KviPointerHashTableIterator it(*m_pRecords); - QString tmp; + TQString tmp; while(KviIrcServerDataBaseRecord * r = it.current()) { @@ -618,7 +618,7 @@ void KviIrcServerDataBase::save(const QString &filename) cfg.writeEntry("OnConnectCommand",n->m_szOnConnectCommand); if(!n->m_szOnLoginCommand.isEmpty()) cfg.writeEntry("OnLoginCommand",n->m_szOnLoginCommand); - if(n->m_pNickServRuleSet)n->m_pNickServRuleSet->save(&cfg,QString::null); + if(n->m_pNickServRuleSet)n->m_pNickServRuleSet->save(&cfg,TQString()); if(n->autoJoinChannelList()) cfg.writeEntry("AutoJoinChannels",*(n->autoJoinChannelList())); if(n->m_szName == m_szCurrentNetwork)cfg.writeEntry("Current",true); @@ -627,12 +627,12 @@ void KviIrcServerDataBase::save(const QString &filename) int i=0; for(KviIrcServer *s = r->m_pServerList->first();s;s = r->m_pServerList->next()) { - KviQString::sprintf(tmp,"%d_",i); + KviTQString::sprintf(tmp,"%d_",i); s->save(&cfg,tmp); if(s == r->m_pCurrentServer) { - KviQString::sprintf(tmp,"%d_Current",i); + KviTQString::sprintf(tmp,"%d_Current",i); cfg.writeEntry(tmp,true); } diff --git a/src/kvilib/irc/kvi_ircserverdb.h b/src/kvilib/irc/kvi_ircserverdb.h index b5d55231..ad3b9529 100644 --- a/src/kvilib/irc/kvi_ircserverdb.h +++ b/src/kvilib/irc/kvi_ircserverdb.h @@ -32,15 +32,15 @@ typedef struct _KviIrcServerDefinition { - QString szServer; + TQString szServer; kvi_u32_t uPort; bool bPortIsValid; bool bIpV6; bool bSSL; - QString szLinkFilter; - QString szPass; - QString szNick; - QString szInitUMode; + TQString szLinkFilter; + TQString szPass; + TQString szNick; + TQString szInitUMode; } KviIrcServerDefinition; @@ -75,8 +75,8 @@ public: KviIrcServerDataBase(); ~KviIrcServerDataBase(); private: - KviPointerHashTable * m_pRecords; - QString m_szCurrentNetwork; + KviPointerHashTable * m_pRecords; + TQString m_szCurrentNetwork; // This list is computed when the data are loaded from disk // during the startup and is used by KviApp to // start the connections. @@ -89,23 +89,23 @@ private: KviPointerList * m_pAutoConnectOnStartupNetworks; public: void clear(); - KviPointerHashTable * recordDict(){ return m_pRecords; }; + KviPointerHashTable * recordDict(){ return m_pRecords; }; KviPointerList * autoConnectOnStartupServers(){ return m_pAutoConnectOnStartupServers; }; KviPointerList * autoConnectOnStartupNetworks(){ return m_pAutoConnectOnStartupNetworks; }; void clearAutoConnectOnStartupServers(); void clearAutoConnectOnStartupNetworks(); - void setCurrentNetwork(const QString &szNetName){ m_szCurrentNetwork = szNetName; }; - const QString & currentNetworkName(){ return m_szCurrentNetwork; }; + void setCurrentNetwork(const TQString &szNetName){ m_szCurrentNetwork = szNetName; }; + const TQString & currentNetworkName(){ return m_szCurrentNetwork; }; KviIrcServerDataBaseRecord * currentRecord(); - KviIrcServerDataBaseRecord * findRecord(const QString &szNetName); - KviIrcNetwork * findNetwork(const QString &name); - void loadFromMircIni(const QString & filename, const QString & szMircIni, QStringList& recentServers); - void load(const QString & filename); - void save(const QString & filename); + KviIrcServerDataBaseRecord * findRecord(const TQString &szNetName); + KviIrcNetwork * findNetwork(const TQString &name); + void loadFromMircIni(const TQString & filename, const TQString & szMircIni, TQStringList& recentServers); + void load(const TQString & filename); + void save(const TQString & filename); KviIrcServerDataBaseRecord * insertNetwork(KviIrcNetwork * n); - void updateServerIp(KviIrcServer * pServer,const QString &ip); - bool makeCurrentServer(KviIrcServerDefinition * d,QString &szError); - bool makeCurrentBestServerInNetwork(const QString &szNetName,KviIrcServerDataBaseRecord * d,QString &szError); + void updateServerIp(KviIrcServer * pServer,const TQString &ip); + bool makeCurrentServer(KviIrcServerDefinition * d,TQString &szError); + bool makeCurrentBestServerInNetwork(const TQString &szNetName,KviIrcServerDataBaseRecord * d,TQString &szError); }; diff --git a/src/kvilib/irc/kvi_ircuserdb.cpp b/src/kvilib/irc/kvi_ircuserdb.cpp index 38b52522..bfc1c615 100644 --- a/src/kvilib/irc/kvi_ircuserdb.cpp +++ b/src/kvilib/irc/kvi_ircuserdb.cpp @@ -34,7 +34,7 @@ //static int cacheHit = 0; //static int cacheMiss = 0; -KviIrcUserEntry::KviIrcUserEntry(const QString &user,const QString &host) +KviIrcUserEntry::KviIrcUserEntry(const TQString &user,const TQString &host) { m_szUser = user; m_szHost = host; @@ -48,15 +48,15 @@ KviIrcUserEntry::KviIrcUserEntry(const QString &user,const QString &host) m_bUseCustomColor=false; } -void KviIrcUserEntry::setRealName(const QString &rn) +void KviIrcUserEntry::setRealName(const TQString &rn) { m_szRealName = rn; - m_szRealName = KviQString::trimmed(m_szRealName); + m_szRealName = KviTQString::trimmed(m_szRealName); if(m_szRealName.length()>=3) { - if( (m_szRealName[0].unicode()==KVI_TEXT_COLOR) && (m_szRealName[2].unicode()==KVI_TEXT_RESET) ) + if( (m_szRealName[0].tqunicode()==KVI_TEXT_COLOR) && (m_szRealName[2].tqunicode()==KVI_TEXT_RESET) ) { - switch(m_szRealName[1].unicode()) + switch(m_szRealName[1].tqunicode()) { case '1': // hum.. encoded as hidden color code eh ? publish is somewhere, so others might implement this... setGender(Male); @@ -92,7 +92,7 @@ KviAvatar * KviIrcUserEntry::forgetAvatar() } KviIrcUserDataBase::KviIrcUserDataBase() -: QObject() +: TQObject() { // we expect a maximum of ~4000 users (= ~16 KB array on a 32 bit machine) // ...after that we will loose in performance @@ -102,7 +102,7 @@ KviIrcUserDataBase::KviIrcUserDataBase() // the performance increase since kvirc versions < 3.0.0 // is really big anyway (there was a linear list instead of a hash!!!) - m_pDict = new KviPointerHashTable(4001,false); + m_pDict = new KviPointerHashTable(4001,false); m_pDict->setAutoDelete(true); setupConnectionWithReguserDb(); } @@ -112,9 +112,9 @@ KviIrcUserDataBase::~KviIrcUserDataBase() delete m_pDict; } -bool KviIrcUserDataBase::haveCustomColor(const QString & nick) +bool KviIrcUserDataBase::haveCustomColor(const TQString & nick) { - KviIrcUserEntry *u = find(nick); + KviIrcUserEntry *u = tqfind(nick); if(!u) return false; if( u->m_szLastRegisteredMatchNick!=nick) registeredUser(nick); @@ -125,9 +125,9 @@ bool KviIrcUserDataBase::haveCustomColor(const QString & nick) return false; } -QColor* KviIrcUserDataBase::customColor(const QString & nick) +TQColor* KviIrcUserDataBase::customColor(const TQString & nick) { - KviIrcUserEntry *u = find(nick); + KviIrcUserEntry *u = tqfind(nick); if(!u) return 0; if( u->m_szLastRegisteredMatchNick!=nick) registeredUser(nick); @@ -140,10 +140,10 @@ QColor* KviIrcUserDataBase::customColor(const QString & nick) } -KviRegisteredUser* KviIrcUserDataBase::registeredUser(const QString & nick,const QString & user,const QString & host) +KviRegisteredUser* KviIrcUserDataBase::registeredUser(const TQString & nick,const TQString & user,const TQString & host) { if(nick.isEmpty()) return 0; - KviIrcUserEntry *u = find(nick); + KviIrcUserEntry *u = tqfind(nick); if(!u) return g_pRegisteredUserDataBase->findMatchingUser(nick,user,host); KviRegisteredUser* pUser=0; @@ -171,7 +171,7 @@ KviRegisteredUser* KviIrcUserDataBase::registeredUser(const QString & nick,const u->m_szRegisteredUserName=pUser->name(); u->m_bUseCustomColor=pUser->getBoolProperty("useCustomColor"); - QString szTmp=pUser->getProperty("customColor"); + TQString szTmp=pUser->getProperty("customColor"); KviStringConversion::fromString(szTmp,u->m_cachedColor); u->m_bNotFoundRegUserLoockup=false; //to be shure @@ -186,10 +186,10 @@ KviRegisteredUser* KviIrcUserDataBase::registeredUser(const QString & nick,const return pUser; } -KviRegisteredUser* KviIrcUserDataBase::registeredUser(const QString & nick) +KviRegisteredUser* KviIrcUserDataBase::registeredUser(const TQString & nick) { if(nick.isEmpty()) return 0; - KviIrcUserEntry *u = find(nick); + KviIrcUserEntry *u = tqfind(nick); if(!u) return 0; return registeredUser(nick,u->user(),u->host()); } @@ -197,13 +197,13 @@ KviRegisteredUser* KviIrcUserDataBase::registeredUser(const QString & nick) void KviIrcUserDataBase::clear() { delete m_pDict; - m_pDict = new KviPointerHashTable(4001,false); + m_pDict = new KviPointerHashTable(4001,false); m_pDict->setAutoDelete(true); } -KviIrcUserEntry * KviIrcUserDataBase::insertUser(const QString &nick,const QString &user,const QString &hostname) +KviIrcUserEntry * KviIrcUserDataBase::insertUser(const TQString &nick,const TQString &user,const TQString &hostname) { - KviIrcUserEntry * e = m_pDict->find(nick); + KviIrcUserEntry * e = m_pDict->tqfind(nick); if(e) { e->m_nRefs++; @@ -219,7 +219,7 @@ KviIrcUserEntry * KviIrcUserDataBase::insertUser(const QString &nick,const QStri return e; } -void KviIrcUserDataBase::removeUser(const QString &nick,KviIrcUserEntry * e) +void KviIrcUserDataBase::removeUser(const TQString &nick,KviIrcUserEntry * e) { e->m_nRefs--; if(e->m_nRefs == 0)m_pDict->remove(nick); @@ -227,17 +227,17 @@ void KviIrcUserDataBase::removeUser(const QString &nick,KviIrcUserEntry * e) void KviIrcUserDataBase::setupConnectionWithReguserDb() { - connect(g_pRegisteredUserDataBase,SIGNAL(userRemoved(const QString&)),this,SLOT(registeredUserRemoved(const QString&))); - connect(g_pRegisteredUserDataBase,SIGNAL(userChanged(const QString&)),this,SLOT(registeredUserChanged(const QString&))); - connect(g_pRegisteredUserDataBase,SIGNAL(userAdded(const QString&)),this,SLOT(registeredUserAdded(const QString&))); - connect(g_pRegisteredUserDataBase,SIGNAL(databaseCleared()),this,SLOT(registeredDatabaseCleared())); + connect(g_pRegisteredUserDataBase,TQT_SIGNAL(userRemoved(const TQString&)),this,TQT_SLOT(registeredUserRemoved(const TQString&))); + connect(g_pRegisteredUserDataBase,TQT_SIGNAL(userChanged(const TQString&)),this,TQT_SLOT(registeredUserChanged(const TQString&))); + connect(g_pRegisteredUserDataBase,TQT_SIGNAL(userAdded(const TQString&)),this,TQT_SLOT(registeredUserAdded(const TQString&))); + connect(g_pRegisteredUserDataBase,TQT_SIGNAL(databaseCleared()),this,TQT_SLOT(registeredDatabaseCleared())); } -void KviIrcUserDataBase::registeredUserRemoved(const QString& user) +void KviIrcUserDataBase::registeredUserRemoved(const TQString& user) { - KviPointerHashTableIterator it( *m_pDict ); + KviPointerHashTableIterator it( *m_pDict ); for( ; it.current(); ++it ) { if(it.current()->m_szRegisteredUserName==user) @@ -248,10 +248,10 @@ void KviIrcUserDataBase::registeredUserRemoved(const QString& user) } } -void KviIrcUserDataBase::registeredUserChanged(const QString& user) +void KviIrcUserDataBase::registeredUserChanged(const TQString& user) { //the same as above - KviPointerHashTableIterator it( *m_pDict ); + KviPointerHashTableIterator it( *m_pDict ); for( ; it.current(); ++it ) { if(it.current()->m_szRegisteredUserName==user) @@ -262,9 +262,9 @@ void KviIrcUserDataBase::registeredUserChanged(const QString& user) } } -void KviIrcUserDataBase::registeredUserAdded(const QString& user) +void KviIrcUserDataBase::registeredUserAdded(const TQString& user) { - KviPointerHashTableIterator it( *m_pDict ); + KviPointerHashTableIterator it( *m_pDict ); for( ; it.current(); ++it ) { if(it.current()->m_szRegisteredUserName.isEmpty()) @@ -276,7 +276,7 @@ void KviIrcUserDataBase::registeredUserAdded(const QString& user) void KviIrcUserDataBase::registeredDatabaseCleared() { - KviPointerHashTableIterator it( *m_pDict ); + KviPointerHashTableIterator it( *m_pDict ); for( ; it.current(); ++it ) { it.current()->m_szRegisteredUserName=""; diff --git a/src/kvilib/irc/kvi_ircuserdb.h b/src/kvilib/irc/kvi_ircuserdb.h index bdf7c51c..ec967331 100644 --- a/src/kvilib/irc/kvi_ircuserdb.h +++ b/src/kvilib/irc/kvi_ircuserdb.h @@ -39,7 +39,7 @@ class KVILIB_API KviIrcUserEntry { friend class KviIrcUserDataBase; public: - KviIrcUserEntry(const QString &user,const QString &host); + KviIrcUserEntry(const TQString &user,const TQString &host); ~KviIrcUserEntry(); enum Gender { @@ -49,11 +49,11 @@ public: }; protected: - QString m_szUser; - QString m_szHost; + TQString m_szUser; + TQString m_szHost; - QString m_szServer; - QString m_szRealName; + TQString m_szServer; + TQString m_szRealName; int m_iHops; Gender m_eGender; @@ -65,29 +65,29 @@ protected: bool m_bBot; bool m_bNotFoundRegUserLoockup; - QString m_szRegisteredUserName; - QString m_szLastRegisteredMatchNick; + TQString m_szRegisteredUserName; + TQString m_szLastRegisteredMatchNick; - QColor m_cachedColor; + TQColor m_cachedColor; bool m_bUseCustomColor; public: Gender gender() { return m_eGender; }; void setBot(bool bIsBot) { m_bBot = bIsBot; }; bool isBot() { return m_bBot; }; void setGender(Gender g) { m_eGender=g; }; - void setUser(const QString &user) { m_szUser = user; }; + void setUser(const TQString &user) { m_szUser = user; }; bool hasUser() { return (!m_szUser.isEmpty()); }; - void setHost(const QString &host) { m_szHost = host; }; + void setHost(const TQString &host) { m_szHost = host; }; bool hasHost() { return (!m_szHost.isEmpty()); }; - void setServer(const QString &serv) { m_szServer = serv; }; - void setRealName(const QString &rn); + void setServer(const TQString &serv) { m_szServer = serv; }; + void setRealName(const TQString &rn); void setHops(int hops) { m_iHops = hops; }; - const QString &user() { return m_szUser; }; - const QString &host() { return m_szHost; }; + const TQString &user() { return m_szUser; }; + const TQString &host() { return m_szHost; }; bool hasServer() { return (!m_szServer.isEmpty()); }; - const QString &server() { return m_szServer; }; + const TQString &server() { return m_szServer; }; bool hasRealName() { return (!m_szRealName.isEmpty()); }; - const QString &realName() { return m_szRealName; }; + const TQString &realName() { return m_szRealName; }; bool hasHops() { return m_iHops >= 0; }; int hops() { return m_iHops; }; KviAvatar * avatar() { return m_pAvatar; }; @@ -113,32 +113,33 @@ public: #define KVI_USERFLAG_MODEMASK KVI_USERFLAG_MASK -class KVILIB_API KviIrcUserDataBase : public QObject +class KVILIB_API KviIrcUserDataBase : public TQObject { Q_OBJECT + TQ_OBJECT public: KviIrcUserDataBase(); ~KviIrcUserDataBase(); private: - KviPointerHashTable * m_pDict; + KviPointerHashTable * m_pDict; public: void clear(); - KviIrcUserEntry * insertUser(const QString &nick,const QString &user,const QString &hostname); - KviIrcUserEntry * find(const QString &nick){ return m_pDict->find(nick); }; - void removeUser(const QString &nick,KviIrcUserEntry * e); - KviPointerHashTable * dict(){ return m_pDict; }; + KviIrcUserEntry * insertUser(const TQString &nick,const TQString &user,const TQString &hostname); + KviIrcUserEntry * tqfind(const TQString &nick){ return m_pDict->tqfind(nick); }; + void removeUser(const TQString &nick,KviIrcUserEntry * e); + KviPointerHashTable * dict(){ return m_pDict; }; - KviRegisteredUser* registeredUser(const QString & nick); - KviRegisteredUser* registeredUser(const QString & nick,const QString & user,const QString & host); + KviRegisteredUser* registeredUser(const TQString & nick); + KviRegisteredUser* registeredUser(const TQString & nick,const TQString & user,const TQString & host); - bool haveCustomColor(const QString & nick); - QColor* customColor(const QString & nick); + bool haveCustomColor(const TQString & nick); + TQColor* customColor(const TQString & nick); void setupConnectionWithReguserDb(); protected slots: - void registeredUserRemoved(const QString&); - void registeredUserChanged(const QString&); - void registeredUserAdded (const QString&); + void registeredUserRemoved(const TQString&); + void registeredUserChanged(const TQString&); + void registeredUserAdded (const TQString&); void registeredDatabaseCleared(); }; diff --git a/src/kvilib/irc/kvi_mirccntrl.cpp b/src/kvilib/irc/kvi_mirccntrl.cpp index fbf3c2d3..21b5258a 100644 --- a/src/kvilib/irc/kvi_mirccntrl.cpp +++ b/src/kvilib/irc/kvi_mirccntrl.cpp @@ -155,7 +155,7 @@ KVILIB_API const kvi_wchar_t * getColorBytesW(const kvi_wchar_t *data_ptr,unsign } } -KVILIB_API unsigned int getUnicodeColorBytes(const QString &szData,unsigned int charIdx,unsigned char *byte_1,unsigned char *byte_2) +KVILIB_API unsigned int getUnicodeColorBytes(const TQString &szData,unsigned int charIdx,unsigned char *byte_1,unsigned char *byte_2) { // // Scans the szData for a mIrc color code XX,XX @@ -169,7 +169,7 @@ KVILIB_API unsigned int getUnicodeColorBytes(const QString &szData,unsigned int return charIdx; } - unsigned short c = szData[(int)charIdx].unicode(); + unsigned short c = szData[(int)charIdx].tqunicode(); //First we can have a digit or a coma if(((c < '0') || (c > '9'))) @@ -189,7 +189,7 @@ KVILIB_API unsigned int getUnicodeColorBytes(const QString &szData,unsigned int return charIdx; } - c = szData[(int)charIdx].unicode(); + c = szData[(int)charIdx].tqunicode(); if(((c < '0') || (c > '9')) && (c != ',')) { @@ -207,7 +207,7 @@ KVILIB_API unsigned int getUnicodeColorBytes(const QString &szData,unsigned int (*byte_2)=KVI_NOCHANGE; return charIdx; } - c = szData[(int)charIdx].unicode(); + c = szData[(int)charIdx].tqunicode(); } if(c == ',') @@ -218,7 +218,7 @@ KVILIB_API unsigned int getUnicodeColorBytes(const QString &szData,unsigned int (*byte_2)=KVI_NOCHANGE; return charIdx; } - c = szData[(int)charIdx].unicode(); + c = szData[(int)charIdx].tqunicode(); } else { (*byte_2)=KVI_NOCHANGE; return charIdx; @@ -227,7 +227,7 @@ KVILIB_API unsigned int getUnicodeColorBytes(const QString &szData,unsigned int if((c < '0') || (c > '9')) { (*byte_2)=KVI_NOCHANGE; - if(szData[(int)(charIdx-1)].unicode()==',') + if(szData[(int)(charIdx-1)].tqunicode()==',') return charIdx-1; else return charIdx; @@ -237,7 +237,7 @@ KVILIB_API unsigned int getUnicodeColorBytes(const QString &szData,unsigned int (*byte_2)=c-'0'; charIdx++; if(charIdx >= szData.length())return charIdx; - c = szData[(int)charIdx].unicode(); + c = szData[(int)charIdx].tqunicode(); if((c >= '0') && (c <='9')) { @@ -251,9 +251,9 @@ KVILIB_API unsigned int getUnicodeColorBytes(const QString &szData,unsigned int namespace KviMircCntrl { - QString stripControlBytes(const QString &szData) + TQString stripControlBytes(const TQString &szData) { - QString ret; + TQString ret; int i = 0; int l = szData.length(); @@ -262,7 +262,7 @@ namespace KviMircCntrl unsigned char b2; while(i < l) { - switch(szData[i].unicode()) + switch(szData[i].tqunicode()) { case KVI_TEXT_UNDERLINE: case KVI_TEXT_BOLD: @@ -288,7 +288,7 @@ namespace KviMircCntrl i++; while(i < l) { - if(szData[i].unicode() == ' ')break; + if(szData[i].tqunicode() == ' ')break; else i++; } begin = i; diff --git a/src/kvilib/irc/kvi_mirccntrl.h b/src/kvilib/irc/kvi_mirccntrl.h index c3028568..b02165d0 100644 --- a/src/kvilib/irc/kvi_mirccntrl.h +++ b/src/kvilib/irc/kvi_mirccntrl.h @@ -91,9 +91,9 @@ // 006 ACK Acknowledge (Not so good, but can be used as last resource) // 007 BEL Bell ( Recognized as bell by terminals and IRCII ) (Used also by some IRC servers) // 008 BS Backspace (Should not be assigned: terminal control) -// 009 HT Horizontal tabulation (Should not be assigned: terminal control) +// 009 HT Qt::Horizontal tabulation (Should not be assigned: terminal control) // 010 LF Line feed (Should not be assigned: terminal control) -// 011 VT Vertical tabulation (Should not be assigned: terminal control) +// 011 VT Qt::Vertical tabulation (Should not be assigned: terminal control) // 012 FF Form feed (Should not be assigned: terminal control) // 013 CR Carriage return (Should not be assigned: terminal control) // 014 SO Shift out (Should not be assigned: terminal control) @@ -148,15 +148,15 @@ #ifndef _KVI_MIRCCNTRL_CPP_ extern KVILIB_API const char * getColorBytes(const char *data_ptr,unsigned char *byte_1,unsigned char *byte_2); extern KVILIB_API const kvi_wchar_t * getColorBytesW(const kvi_wchar_t *data_ptr,unsigned char *byte_1,unsigned char *byte_2); - extern KVILIB_API unsigned int getUnicodeColorBytes(const QString &szData,unsigned int charIdx,unsigned char *byte_1,unsigned char *byte_2); - inline const QChar * getUnicodeColorBytes(const QChar *pData,unsigned char *byte_1,unsigned char *byte_2) - { return (QChar *)getColorBytesW((const kvi_wchar_t *)pData,byte_1,byte_2); }; + extern KVILIB_API unsigned int getUnicodeColorBytes(const TQString &szData,unsigned int charIdx,unsigned char *byte_1,unsigned char *byte_2); + inline const TQChar * getUnicodeColorBytes(const TQChar *pData,unsigned char *byte_1,unsigned char *byte_2) + { return (TQChar *)getColorBytesW((const kvi_wchar_t *)pData,byte_1,byte_2); }; #endif namespace KviMircCntrl { - KVILIB_API QString stripControlBytes(const QString &szData); + KVILIB_API TQString stripControlBytes(const TQString &szData); } diff --git a/src/kvilib/irc/kvi_nickserv.cpp b/src/kvilib/irc/kvi_nickserv.cpp index a1809f84..24a50e96 100644 --- a/src/kvilib/irc/kvi_nickserv.cpp +++ b/src/kvilib/irc/kvi_nickserv.cpp @@ -29,7 +29,7 @@ #include "kvi_config.h" #include "kvi_ircmask.h" -#include +#include @@ -85,31 +85,31 @@ KviNickServRuleSet::~KviNickServRuleSet() if(m_pRules)delete m_pRules; } -void KviNickServRuleSet::save(KviConfig * cfg,const QString &prefix) +void KviNickServRuleSet::save(KviConfig * cfg,const TQString &prefix) { if(!m_pRules)return; // nothing to save if(m_pRules->isEmpty())return; // should never happen anyway - QString tmp; + TQString tmp; if(m_bEnabled) { - KviQString::sprintf(tmp,"%QNSEnabled",&prefix); + KviTQString::sprintf(tmp,"%TQNSEnabled",&prefix); cfg->writeEntry(tmp,m_bEnabled); } - KviQString::sprintf(tmp,"%QNSRules",&prefix); + KviTQString::sprintf(tmp,"%TQNSRules",&prefix); cfg->writeEntry(tmp,m_pRules->count()); int idx = 0; for(KviNickServRule * r = m_pRules->first();r;r = m_pRules->next()) { - KviQString::sprintf(tmp,"%QNSRule%d_",&prefix,idx); + KviTQString::sprintf(tmp,"%TQNSRule%d_",&prefix,idx); r->save(cfg,tmp); idx++; } } -KviNickServRuleSet * KviNickServRuleSet::load(KviConfig * cfg,const QString &prefix) +KviNickServRuleSet * KviNickServRuleSet::load(KviConfig * cfg,const TQString &prefix) { - QString tmp; - KviQString::sprintf(tmp,"%QNSRules",&prefix); + TQString tmp; + KviTQString::sprintf(tmp,"%TQNSRules",&prefix); unsigned int cnt = cfg->readUIntEntry(tmp,0); if(cnt == 0)return 0; KviNickServRuleSet * s = new KviNickServRuleSet(); @@ -118,26 +118,26 @@ KviNickServRuleSet * KviNickServRuleSet::load(KviConfig * cfg,const QString &pre return 0; } -void KviNickServRuleSet::load(const QString &szConfigFile) +void KviNickServRuleSet::load(const TQString &szConfigFile) { clear(); KviConfig cfg(szConfigFile,KviConfig::Read); - QString tmp; - KviQString::sprintf(tmp,"NSRules"); + TQString tmp; + KviTQString::sprintf(tmp,"NSRules"); unsigned int cnt = cfg.readUIntEntry(tmp,0); if(cnt == 0)return; - loadPrivate(&cfg,QString(""),cnt); + loadPrivate(&cfg,TQString(""),cnt); } -void KviNickServRuleSet::save(const QString &szConfigFile) +void KviNickServRuleSet::save(const TQString &szConfigFile) { KviConfig cfg(szConfigFile,KviConfig::Write); cfg.clear(); - save(&cfg,QString("")); + save(&cfg,TQString("")); } -bool KviNickServRuleSet::loadPrivate(KviConfig * cfg,const QString &prefix,unsigned int nEntries) +bool KviNickServRuleSet::loadPrivate(KviConfig * cfg,const TQString &prefix,unsigned int nEntries) { if(m_pRules)m_pRules->clear(); else { @@ -147,12 +147,12 @@ bool KviNickServRuleSet::loadPrivate(KviConfig * cfg,const QString &prefix,unsig if(nEntries != 0) { - QString tmp; - KviQString::sprintf(tmp,"%QNSEnabled",&prefix); + TQString tmp; + KviTQString::sprintf(tmp,"%TQNSEnabled",&prefix); m_bEnabled = cfg->readBoolEntry(tmp,false); for(unsigned int u=0;uload(cfg,tmp))delete r; else m_pRules->append(r); @@ -195,26 +195,26 @@ KviNickServRuleSet * KviNickServRuleSet::createInstance() } -KviNickServRule * KviNickServRuleSet::matchRule(const QString &szNick,const KviIrcMask *nickServ,const QString &szMsg,const QString &szServer) +KviNickServRule * KviNickServRuleSet::matchRule(const TQString &szNick,const KviIrcMask *nickServ,const TQString &szMsg,const TQString &szServer) { if(!m_pRules)return 0; for(KviNickServRule *r = m_pRules->first();r;r = m_pRules->next()) { - if(!KviQString::matchStringCI(r->registeredNick(),szNick,false,true)) continue; + if(!KviTQString::matchStringCI(r->registeredNick(),szNick,false,true)) continue; if(!szServer.isEmpty()) { #ifdef COMPILE_USE_QT4 - QRegExp res(r->serverMask(),Qt::CaseInsensitive,QRegExp::Wildcard); + TQRegExp res(r->serverMask(),TQt::CaseInsensitive,TQRegExp::Wildcard); #else - QRegExp res(r->serverMask(),false,true); + TQRegExp res(r->serverMask(),false,true); #endif if(!res.exactMatch(szServer))continue; } if(!nickServ->matchedBy(KviIrcMask(r->nickServMask())))continue; #ifdef COMPILE_USE_QT4 - QRegExp re(r->messageRegexp(),Qt::CaseInsensitive,QRegExp::Wildcard); + TQRegExp re(r->messageRegexp(),TQt::CaseInsensitive,TQRegExp::Wildcard); #else - QRegExp re(r->messageRegexp(),false,true); + TQRegExp re(r->messageRegexp(),false,true); #endif if(re.exactMatch(szMsg))return r; } @@ -264,45 +264,45 @@ void KviNickServRule::copyFrom(const KviNickServRule &src) m_szServerMask = src.m_szServerMask; } -void KviNickServRule::save(KviConfig * cfg,const QString &prefix) +void KviNickServRule::save(KviConfig * cfg,const TQString &prefix) { - QString tmp; - KviQString::sprintf(tmp,"%QRegisteredNick",&prefix); + TQString tmp; + KviTQString::sprintf(tmp,"%TQRegisteredNick",&prefix); cfg->writeEntry(tmp,m_szRegisteredNick); - KviQString::sprintf(tmp,"%QNickServMask",&prefix); + KviTQString::sprintf(tmp,"%TQNickServMask",&prefix); cfg->writeEntry(tmp,m_szNickServMask); - KviQString::sprintf(tmp,"%QMessageRegexp",&prefix); + KviTQString::sprintf(tmp,"%TQMessageRegexp",&prefix); cfg->writeEntry(tmp,m_szMessageRegexp); - KviQString::sprintf(tmp,"%QIdentifyCommand",&prefix); + KviTQString::sprintf(tmp,"%TQIdentifyCommand",&prefix); cfg->writeEntry(tmp,m_szIdentifyCommand); - KviQString::sprintf(tmp,"%QServerMask",&prefix); + KviTQString::sprintf(tmp,"%TQServerMask",&prefix); cfg->writeEntry(tmp,m_szServerMask); } -bool KviNickServRule::load(KviConfig * cfg,const QString &prefix) +bool KviNickServRule::load(KviConfig * cfg,const TQString &prefix) { - QString tmp; - KviQString::sprintf(tmp,"%QRegisteredNick",&prefix); - m_szRegisteredNick = KviQString::trimmed(cfg->readQStringEntry(tmp)); + TQString tmp; + KviTQString::sprintf(tmp,"%TQRegisteredNick",&prefix); + m_szRegisteredNick = KviTQString::trimmed(cfg->readTQStringEntry(tmp)); if(m_szRegisteredNick.isEmpty())return false; - KviQString::sprintf(tmp,"%QNickServMask",&prefix); - m_szNickServMask = cfg->readQStringEntry(tmp); + KviTQString::sprintf(tmp,"%TQNickServMask",&prefix); + m_szNickServMask = cfg->readTQStringEntry(tmp); if(m_szNickServMask.isEmpty())return false; - KviQString::sprintf(tmp,"%QServerMask",&prefix); - m_szServerMask = cfg->readQStringEntry(tmp,QString::null); - KviQString::sprintf(tmp,"%QMessageRegexp",&prefix); - m_szMessageRegexp = cfg->readQStringEntry(tmp); + KviTQString::sprintf(tmp,"%TQServerMask",&prefix); + m_szServerMask = cfg->readTQStringEntry(tmp,TQString()); + KviTQString::sprintf(tmp,"%TQMessageRegexp",&prefix); + m_szMessageRegexp = cfg->readTQStringEntry(tmp); if(m_szMessageRegexp.isEmpty())return false; - KviQString::sprintf(tmp,"%QIdentifyCommand",&prefix); - m_szIdentifyCommand = cfg->readQStringEntry(tmp); + KviTQString::sprintf(tmp,"%TQIdentifyCommand",&prefix); + m_szIdentifyCommand = cfg->readTQStringEntry(tmp); return !m_szIdentifyCommand.isEmpty(); } -KviNickServRule * KviNickServRule::createInstance(const QString &szRegisteredNick, - const QString &szNickServMask, - const QString &szMessageRegexp, - const QString &szIdentifyCommand, - const QString &szServerMask) +KviNickServRule * KviNickServRule::createInstance(const TQString &szRegisteredNick, + const TQString &szNickServMask, + const TQString &szMessageRegexp, + const TQString &szIdentifyCommand, + const TQString &szServerMask) { return new KviNickServRule(szRegisteredNick,szNickServMask,szMessageRegexp,szIdentifyCommand,szServerMask); } diff --git a/src/kvilib/irc/kvi_nickserv.h b/src/kvilib/irc/kvi_nickserv.h index 105eed1c..f259f1f5 100644 --- a/src/kvilib/irc/kvi_nickserv.h +++ b/src/kvilib/irc/kvi_nickserv.h @@ -35,19 +35,19 @@ class KviIrcMask; class KVILIB_API KviNickServRule : public KviHeapObject { protected: - QString m_szRegisteredNick; // my registered nickname - QString m_szNickServMask; // the NickServ service mask - QString m_szMessageRegexp; // the NickServ message regexp - QString m_szIdentifyCommand; // the IDENTIFY command to send to server - QString m_szServerMask; // the mask that the server must match (not used in per-network rules) + TQString m_szRegisteredNick; // my registered nickname + TQString m_szNickServMask; // the NickServ service tqmask + TQString m_szMessageRegexp; // the NickServ message regexp + TQString m_szIdentifyCommand; // the IDENTIFY command to send to server + TQString m_szServerMask; // the tqmask that the server must match (not used in per-network rules) public: KviNickServRule() : KviHeapObject() {}; KviNickServRule( - const QString &szRegisteredNick, - const QString &szNickServMask, - const QString &szMessageRegexp, - const QString &szIdentifyCommand, - const QString &szServerMask = QString::null) + const TQString &szRegisteredNick, + const TQString &szNickServMask, + const TQString &szMessageRegexp, + const TQString &szIdentifyCommand, + const TQString &szServerMask = TQString()) : KviHeapObject(), m_szRegisteredNick(szRegisteredNick), m_szNickServMask(szNickServMask), @@ -56,27 +56,27 @@ public: m_szServerMask(szServerMask) {}; public: - const QString & registeredNick() const { return m_szRegisteredNick; }; - const QString & nickServMask() const { return m_szNickServMask; }; - const QString & messageRegexp() const { return m_szMessageRegexp; }; - const QString & identifyCommand() const { return m_szIdentifyCommand; }; - const QString & serverMask() const { return m_szServerMask; }; - void setRegisteredNick(const QString &szRegisteredNick){ m_szRegisteredNick = szRegisteredNick; }; - void setNickServMask(const QString &szNickServMask){ m_szNickServMask = szNickServMask; }; - void setMessageRegexp(const QString &szMessageRegexp){ m_szMessageRegexp = szMessageRegexp; }; - void setIdentifyCommand(const QString &szIdentifyCommand){ m_szIdentifyCommand = szIdentifyCommand; }; - void setServerMask(const QString &szServerMask){ m_szServerMask = szServerMask; }; + const TQString & registeredNick() const { return m_szRegisteredNick; }; + const TQString & nickServMask() const { return m_szNickServMask; }; + const TQString & messageRegexp() const { return m_szMessageRegexp; }; + const TQString & identifyCommand() const { return m_szIdentifyCommand; }; + const TQString & serverMask() const { return m_szServerMask; }; + void setRegisteredNick(const TQString &szRegisteredNick){ m_szRegisteredNick = szRegisteredNick; }; + void setNickServMask(const TQString &szNickServMask){ m_szNickServMask = szNickServMask; }; + void setMessageRegexp(const TQString &szMessageRegexp){ m_szMessageRegexp = szMessageRegexp; }; + void setIdentifyCommand(const TQString &szIdentifyCommand){ m_szIdentifyCommand = szIdentifyCommand; }; + void setServerMask(const TQString &szServerMask){ m_szServerMask = szServerMask; }; public: // avoid crashes under windows - static KviNickServRule * createInstance(const QString &szRegisteredNick, - const QString &szNickServMask, - const QString &szMessageRegexp, - const QString &szIdentifyCommand, - const QString &szServerMask = QString::null); + static KviNickServRule * createInstance(const TQString &szRegisteredNick, + const TQString &szNickServMask, + const TQString &szMessageRegexp, + const TQString &szIdentifyCommand, + const TQString &szServerMask = TQString()); - void save(KviConfig * cfg,const QString &prefix); + void save(KviConfig * cfg,const TQString &prefix); // returns false if the loaded data has no sense - bool load(KviConfig * cfg,const QString &prefix); + bool load(KviConfig * cfg,const TQString &prefix); void copyFrom(const KviNickServRule &src); }; @@ -87,7 +87,7 @@ public: KviNickServRuleSet(const KviNickServRuleSet &s); ~KviNickServRuleSet(); protected: - KviPointerList * m_pRules; // FIXME: Replace with KviPointerHashTable + KviPointerList * m_pRules; // FIXME: Replace with KviPointerHashTable bool m_bEnabled; public: // avoid crashes under windows @@ -97,15 +97,15 @@ public: void setEnabled(bool bEnabled){ m_bEnabled = bEnabled; }; bool isEmpty(){ return m_pRules ? m_pRules->isEmpty() : true; }; void addRule(KviNickServRule * r); - KviNickServRule * matchRule(const QString &szNick,const KviIrcMask *nickServ,const QString &szMsg,const QString &szServer = QString::null); + KviNickServRule * matchRule(const TQString &szNick,const KviIrcMask *nickServ,const TQString &szMsg,const TQString &szServer = TQString()); void copyFrom(const KviNickServRuleSet &src); - void load(const QString &szConfigFile); - void save(const QString &szConfigFile); - void save(KviConfig * cfg,const QString &prefix); + void load(const TQString &szConfigFile); + void save(const TQString &szConfigFile); + void save(KviConfig * cfg,const TQString &prefix); KviPointerList * rules(){ return m_pRules; }; - static KviNickServRuleSet * load(KviConfig * cfg,const QString &prefix); + static KviNickServRuleSet * load(KviConfig * cfg,const TQString &prefix); protected: - bool loadPrivate(KviConfig * cfg,const QString &prefix,unsigned int nEntries); + bool loadPrivate(KviConfig * cfg,const TQString &prefix,unsigned int nEntries); }; diff --git a/src/kvilib/irc/kvi_useridentity.cpp b/src/kvilib/irc/kvi_useridentity.cpp index d4791333..67887e9c 100644 --- a/src/kvilib/irc/kvi_useridentity.cpp +++ b/src/kvilib/irc/kvi_useridentity.cpp @@ -33,25 +33,25 @@ bool KviUserIdentity::load(KviConfig &cfg) { m_szId = cfg.group(); - m_szNickName = cfg.readQStringEntry("NickName"); - m_szAltNickName1 = cfg.readQStringEntry("AltNickName1"); - m_szAltNickName2 = cfg.readQStringEntry("AltNickName2"); - m_szAltNickName3 = cfg.readQStringEntry("AltNickName3"); - m_szUserName = cfg.readQStringEntry("UserName"); + m_szNickName = cfg.readTQStringEntry("NickName"); + m_szAltNickName1 = cfg.readTQStringEntry("AltNickName1"); + m_szAltNickName2 = cfg.readTQStringEntry("AltNickName2"); + m_szAltNickName3 = cfg.readTQStringEntry("AltNickName3"); + m_szUserName = cfg.readTQStringEntry("UserName"); // FIXME: At least scramble the pass ? - m_szPassword = cfg.readQStringEntry("Password"); + m_szPassword = cfg.readTQStringEntry("Password"); KviPixmap def; m_pixAvatar = cfg.readPixmapEntry("Avatar",def); - m_szPartMessage = cfg.readQStringEntry("PartMessage"); - m_szQuitMessage= cfg.readQStringEntry("QuitMessage"); - m_szAge = cfg.readQStringEntry("Age"); - m_szGender = cfg.readQStringEntry("Gender"); - m_szLocation = cfg.readQStringEntry("Location"); - m_szLanguages = cfg.readQStringEntry("Languages"); - m_szOtherInfo = cfg.readQStringEntry("OtherInfo"); - m_szUserMode = cfg.readQStringEntry("UserMode"); - m_szOnConnectCommand = cfg.readQStringEntry("OnConnectCommand"); - m_szOnLoginCommand = cfg.readQStringEntry("OnLoginCommand"); + m_szPartMessage = cfg.readTQStringEntry("PartMessage"); + m_szQuitMessage= cfg.readTQStringEntry("QuitMessage"); + m_szAge = cfg.readTQStringEntry("Age"); + m_szGender = cfg.readTQStringEntry("Gender"); + m_szLocation = cfg.readTQStringEntry("Location"); + m_szLanguages = cfg.readTQStringEntry("Languages"); + m_szOtherInfo = cfg.readTQStringEntry("OtherInfo"); + m_szUserMode = cfg.readTQStringEntry("UserMode"); + m_szOnConnectCommand = cfg.readTQStringEntry("OnConnectCommand"); + m_szOnLoginCommand = cfg.readTQStringEntry("OnLoginCommand"); return !(m_szId.isEmpty() || m_szNickName.isEmpty()); } @@ -121,7 +121,7 @@ KviUserIdentityManager * KviUserIdentityManager::m_pInstance = 0; KviUserIdentityManager::KviUserIdentityManager() : KviHeapObject() { - m_pIdentityDict = new KviPointerHashTable(); + m_pIdentityDict = new KviPointerHashTable(); m_pIdentityDict->setAutoDelete(true); } @@ -148,13 +148,13 @@ const KviUserIdentity * KviUserIdentityManager::defaultIdentity() KviUserIdentity * ret; if(!m_szDefaultIdentity.isEmpty()) { - ret = m_pIdentityDict->find(m_szDefaultIdentity); + ret = m_pIdentityDict->tqfind(m_szDefaultIdentity); if(ret)return ret; } // the default identity is borken :/ // grab the first one - KviPointerHashTableIterator it(*m_pIdentityDict); + KviPointerHashTableIterator it(*m_pIdentityDict); ret = it.current(); if(ret) { @@ -172,14 +172,14 @@ const KviUserIdentity * KviUserIdentityManager::defaultIdentity() ret->setUserName(KVI_DEFAULT_USERNAME); ret->setRealName(KVI_DEFAULT_REALNAME); ret->setPartMessage(KVI_DEFAULT_PART_MESSAGE); - ret->setQuitMessage(KVI_DEFAULT_QUIT_MESSAGE); + ret->setQuitMessage(KVI_DEFAULT_TQUIT_MESSAGE); - m_pIdentityDict->replace(ret->id(),ret); + m_pIdentityDict->tqreplace(ret->id(),ret); return ret; } -void KviUserIdentityManager::load(const QString &szFileName) +void KviUserIdentityManager::load(const TQString &szFileName) { m_pIdentityDict->clear(); @@ -187,18 +187,18 @@ void KviUserIdentityManager::load(const QString &szFileName) cfg.setGroup("KVIrc"); - m_szDefaultIdentity = cfg.readQStringEntry("DefaultIdentity",""); + m_szDefaultIdentity = cfg.readTQStringEntry("DefaultIdentity",""); KviConfigIterator it(*(cfg.dict())); while(KviConfigGroup * grp = it.current()) { - if(!KviQString::equalCI(it.currentKey(),"KVIrc")) + if(!KviTQString::equalCI(it.currentKey(),"KVIrc")) { cfg.setGroup(it.currentKey()); KviUserIdentity * id = new KviUserIdentity(); if(id->load(cfg)) - m_pIdentityDict->replace(id->id(),id); + m_pIdentityDict->tqreplace(id->id(),id); else delete id; } @@ -206,7 +206,7 @@ void KviUserIdentityManager::load(const QString &szFileName) } } -void KviUserIdentityManager::save(const QString &szFileName) +void KviUserIdentityManager::save(const TQString &szFileName) { KviConfig cfg(szFileName,KviConfig::Write); cfg.clear(); @@ -215,7 +215,7 @@ void KviUserIdentityManager::save(const QString &szFileName) cfg.writeEntry("DefaultIdentity",m_szDefaultIdentity); - KviPointerHashTableIterator it(*m_pIdentityDict); + KviPointerHashTableIterator it(*m_pIdentityDict); while(KviUserIdentity * id = it.current()) { id->save(cfg); @@ -227,12 +227,12 @@ void KviUserIdentityManager::copyFrom(KviUserIdentityManager * pWorkingCopy) { m_pIdentityDict->clear(); m_szDefaultIdentity = pWorkingCopy->m_szDefaultIdentity; - KviPointerHashTableIterator it(*(pWorkingCopy->m_pIdentityDict)); + KviPointerHashTableIterator it(*(pWorkingCopy->m_pIdentityDict)); while(KviUserIdentity * id = it.current()) { KviUserIdentity * pNew = new KviUserIdentity(); pNew->copyFrom(*id); - m_pIdentityDict->replace(pNew->id(),pNew); + m_pIdentityDict->tqreplace(pNew->id(),pNew); ++it; } } diff --git a/src/kvilib/irc/kvi_useridentity.h b/src/kvilib/irc/kvi_useridentity.h index c1018f1a..bcc5e1b4 100644 --- a/src/kvilib/irc/kvi_useridentity.h +++ b/src/kvilib/irc/kvi_useridentity.h @@ -42,71 +42,71 @@ public: { } protected: - QString m_szId; // the identity set name + TQString m_szId; // the identity set name - QString m_szNickName; + TQString m_szNickName; - QString m_szAltNickName1; - QString m_szAltNickName2; - QString m_szAltNickName3; + TQString m_szAltNickName1; + TQString m_szAltNickName2; + TQString m_szAltNickName3; - QString m_szUserName; - QString m_szRealName; - QString m_szPassword; + TQString m_szUserName; + TQString m_szRealName; + TQString m_szPassword; KviPixmap m_pixAvatar; - QString m_szPartMessage; - QString m_szQuitMessage; + TQString m_szPartMessage; + TQString m_szQuitMessage; - QString m_szAge; - QString m_szGender; - QString m_szLocation; - QString m_szLanguages; - QString m_szOtherInfo; + TQString m_szAge; + TQString m_szGender; + TQString m_szLocation; + TQString m_szLanguages; + TQString m_szOtherInfo; - QString m_szUserMode; + TQString m_szUserMode; - QString m_szOnConnectCommand; - QString m_szOnLoginCommand; + TQString m_szOnConnectCommand; + TQString m_szOnLoginCommand; public: - const QString & id() const { return m_szId; }; - const QString & nickName() const { return m_szNickName; }; - const QString & altNickName1() const { return m_szAltNickName1; }; - const QString & altNickName2() const { return m_szAltNickName2; }; - const QString & altNickName3() const { return m_szAltNickName3; }; - const QString & userName() const { return m_szUserName; }; - const QString & password() const { return m_szPassword; }; + const TQString & id() const { return m_szId; }; + const TQString & nickName() const { return m_szNickName; }; + const TQString & altNickName1() const { return m_szAltNickName1; }; + const TQString & altNickName2() const { return m_szAltNickName2; }; + const TQString & altNickName3() const { return m_szAltNickName3; }; + const TQString & userName() const { return m_szUserName; }; + const TQString & password() const { return m_szPassword; }; const KviPixmap & avatar() const { return m_pixAvatar; }; - const QString & partMessage() const { return m_szPartMessage; }; - const QString & quitMessage() const { return m_szQuitMessage; }; - const QString & age() const { return m_szAge; }; - const QString & gender() const { return m_szGender; }; - const QString & location() const { return m_szLocation; }; - const QString & languages() const { return m_szLanguages; }; - const QString & otherInfo() const { return m_szOtherInfo; }; - const QString & userMode() const { return m_szUserMode; }; - const QString & onConnectCommand() const { return m_szOnConnectCommand; }; - const QString & onLoginCommand() const { return m_szOnLoginCommand; }; - void setId(const QString &szId){ m_szId = szId; }; - void setNickName(const QString &szNickName){ m_szNickName = szNickName; }; - void setAltNickName1(const QString &szNickName){ m_szAltNickName1 = szNickName; }; - void setAltNickName2(const QString &szNickName){ m_szAltNickName2 = szNickName; }; - void setAltNickName3(const QString &szNickName){ m_szAltNickName3 = szNickName; }; - void setUserName(const QString &szUserName){ m_szUserName = szUserName; }; - void setRealName(const QString &szRealName){ m_szRealName = szRealName; }; - void setPassword(const QString &szPassword){ m_szPassword = szPassword; }; + const TQString & partMessage() const { return m_szPartMessage; }; + const TQString & quitMessage() const { return m_szQuitMessage; }; + const TQString & age() const { return m_szAge; }; + const TQString & gender() const { return m_szGender; }; + const TQString & location() const { return m_szLocation; }; + const TQString & languages() const { return m_szLanguages; }; + const TQString & otherInfo() const { return m_szOtherInfo; }; + const TQString & userMode() const { return m_szUserMode; }; + const TQString & onConnectCommand() const { return m_szOnConnectCommand; }; + const TQString & onLoginCommand() const { return m_szOnLoginCommand; }; + void setId(const TQString &szId){ m_szId = szId; }; + void setNickName(const TQString &szNickName){ m_szNickName = szNickName; }; + void setAltNickName1(const TQString &szNickName){ m_szAltNickName1 = szNickName; }; + void setAltNickName2(const TQString &szNickName){ m_szAltNickName2 = szNickName; }; + void setAltNickName3(const TQString &szNickName){ m_szAltNickName3 = szNickName; }; + void setUserName(const TQString &szUserName){ m_szUserName = szUserName; }; + void setRealName(const TQString &szRealName){ m_szRealName = szRealName; }; + void setPassword(const TQString &szPassword){ m_szPassword = szPassword; }; void setAvatar(const KviPixmap &pix){ m_pixAvatar = pix; }; - void setPartMessage(const QString &szMsg){ m_szPartMessage = szMsg; }; - void setQuitMessage(const QString &szMsg){ m_szQuitMessage = szMsg; }; - void setAge(const QString &szAge){ m_szAge = szAge; }; - void setGender(const QString &szGender){ m_szGender = szGender; }; - void setLocation(const QString &szLocation){ m_szLocation = szLocation; }; - void setLanguages(const QString &szLanguages){ m_szLanguages = szLanguages; }; - void setOtherInfo(const QString &szOtherInfo){ m_szOtherInfo = szOtherInfo; }; - void setUserMode(const QString &szUserMode){ m_szUserMode = szUserMode; }; - void setOnConnectCommand(const QString &szOnConnectCommand){ m_szOnConnectCommand = szOnConnectCommand; }; - void setOnLoginCommand(const QString &szOnLoginCommand){ m_szOnLoginCommand = szOnLoginCommand; }; + void setPartMessage(const TQString &szMsg){ m_szPartMessage = szMsg; }; + void setQuitMessage(const TQString &szMsg){ m_szQuitMessage = szMsg; }; + void setAge(const TQString &szAge){ m_szAge = szAge; }; + void setGender(const TQString &szGender){ m_szGender = szGender; }; + void setLocation(const TQString &szLocation){ m_szLocation = szLocation; }; + void setLanguages(const TQString &szLanguages){ m_szLanguages = szLanguages; }; + void setOtherInfo(const TQString &szOtherInfo){ m_szOtherInfo = szOtherInfo; }; + void setUserMode(const TQString &szUserMode){ m_szUserMode = szUserMode; }; + void setOnConnectCommand(const TQString &szOnConnectCommand){ m_szOnConnectCommand = szOnConnectCommand; }; + void setOnLoginCommand(const TQString &szOnLoginCommand){ m_szOnLoginCommand = szOnLoginCommand; }; protected: void copyFrom(const KviUserIdentity &src); bool save(KviConfig &cfg); @@ -120,26 +120,26 @@ protected: ~KviUserIdentityManager(); protected: static KviUserIdentityManager * m_pInstance; - KviPointerHashTable * m_pIdentityDict; - QString m_szDefaultIdentity; + KviPointerHashTable * m_pIdentityDict; + TQString m_szDefaultIdentity; public: static void init(); static void done(); static KviUserIdentityManager * instance(){ return m_pInstance; }; - KviPointerHashTable * identityDict(){ return m_pIdentityDict; }; - const KviUserIdentity * findIdentity(const QString &szId){ return m_pIdentityDict->find(szId); }; + KviPointerHashTable * identityDict(){ return m_pIdentityDict; }; + const KviUserIdentity * findIdentity(const TQString &szId){ return m_pIdentityDict->tqfind(szId); }; // NEVER NULL const KviUserIdentity * defaultIdentity(); - void setDefaultIdentity(const QString &szIdentityId){ m_szDefaultIdentity = szIdentityId; }; + void setDefaultIdentity(const TQString &szIdentityId){ m_szDefaultIdentity = szIdentityId; }; KviUserIdentityManager * createWorkingCopy(); void copyFrom(KviUserIdentityManager * pWorkingCopy); void releaseWorkingCopy(KviUserIdentityManager * pWorkingCopy); - void save(const QString &szFileName); - void load(const QString &szFileName); + void save(const TQString &szFileName); + void load(const TQString &szFileName); }; #endif //!_KVI_USERIDENTITY_H_ diff --git a/src/kvilib/irc/moc_kvi_ircuserdb.cpp b/src/kvilib/irc/moc_kvi_ircuserdb.cpp index 2b4d1482..92833beb 100644 --- a/src/kvilib/irc/moc_kvi_ircuserdb.cpp +++ b/src/kvilib/irc/moc_kvi_ircuserdb.cpp @@ -2,21 +2,21 @@ ** KviIrcUserDataBase meta object code from reading C++ file 'kvi_ircuserdb.h' ** ** Created: Sun Mar 23 20:56:18 2008 -** by: The Qt MOC ($Id: qt/moc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) +** by: The TQt TQMOC ($Id: qt/tqmoc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ -#undef QT_NO_COMPAT +#undef TQT_NO_COMPAT #include "kvi_ircuserdb.h" -#include -#include +#include +#include -#include -#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26) -#error "This file was generated using the moc from 3.3.8. It" -#error "cannot be used with the include files from this version of Qt." -#error "(The moc has changed too much.)" +#include +#if !defined(TQ_TQMOC_OUTPUT_REVISION) || (TQ_TQMOC_OUTPUT_REVISION != 26) +#error "This file was generated using the tqmoc from 3.3.8. It" +#error "cannot be used with the include files from this version of TQt." +#error "(The tqmoc has changed too much.)" #endif const char *KviIrcUserDataBase::className() const @@ -24,96 +24,96 @@ const char *KviIrcUserDataBase::className() const return "KviIrcUserDataBase"; } -QMetaObject *KviIrcUserDataBase::metaObj = 0; -static QMetaObjectCleanUp cleanUp_KviIrcUserDataBase( "KviIrcUserDataBase", &KviIrcUserDataBase::staticMetaObject ); +TQMetaObject *KviIrcUserDataBase::metaObj = 0; +static TQMetaObjectCleanUp cleanUp_KviIrcUserDataBase( "KviIrcUserDataBase", &KviIrcUserDataBase::staticMetaObject ); -#ifndef QT_NO_TRANSLATION -QString KviIrcUserDataBase::tr( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION +TQString KviIrcUserDataBase::tr( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviIrcUserDataBase", s, c, QApplication::DefaultCodec ); + if ( tqApp ) + return tqApp->translate( "KviIrcUserDataBase", s, c, TQApplication::DefaultCodec ); else - return QString::fromLatin1( s ); + return TQString::tqfromLatin1( s ); } -#ifndef QT_NO_TRANSLATION_UTF8 -QString KviIrcUserDataBase::trUtf8( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION_UTF8 +TQString KviIrcUserDataBase::trUtf8( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviIrcUserDataBase", s, c, QApplication::UnicodeUTF8 ); + if ( tqApp ) + return tqApp->translate( "KviIrcUserDataBase", s, c, TQApplication::UnicodeUTF8 ); else - return QString::fromUtf8( s ); + return TQString::fromUtf8( s ); } -#endif // QT_NO_TRANSLATION_UTF8 +#endif // TQT_NO_TRANSLATION_UTF8 -#endif // QT_NO_TRANSLATION +#endif // TQT_NO_TRANSLATION -QMetaObject* KviIrcUserDataBase::staticMetaObject() +TQMetaObject* KviIrcUserDataBase::staticMetaObject() { if ( metaObj ) return metaObj; - QMetaObject* parentObject = QObject::staticMetaObject(); - static const QUParameter param_slot_0[] = { - { 0, &static_QUType_QString, 0, QUParameter::In } + TQMetaObject* tqparentObject = TQObject::staticMetaObject(); + static const TQUParameter param_slot_0[] = { + { 0, &static_TQUType_TQString, 0, TQUParameter::In } }; - static const QUMethod slot_0 = {"registeredUserRemoved", 1, param_slot_0 }; - static const QUParameter param_slot_1[] = { - { 0, &static_QUType_QString, 0, QUParameter::In } + static const TQUMethod slot_0 = {"registeredUserRemoved", 1, param_slot_0 }; + static const TQUParameter param_slot_1[] = { + { 0, &static_TQUType_TQString, 0, TQUParameter::In } }; - static const QUMethod slot_1 = {"registeredUserChanged", 1, param_slot_1 }; - static const QUParameter param_slot_2[] = { - { 0, &static_QUType_QString, 0, QUParameter::In } + static const TQUMethod slot_1 = {"registeredUserChanged", 1, param_slot_1 }; + static const TQUParameter param_slot_2[] = { + { 0, &static_TQUType_TQString, 0, TQUParameter::In } }; - static const QUMethod slot_2 = {"registeredUserAdded", 1, param_slot_2 }; - static const QUMethod slot_3 = {"registeredDatabaseCleared", 0, 0 }; - static const QMetaData slot_tbl[] = { - { "registeredUserRemoved(const QString&)", &slot_0, QMetaData::Protected }, - { "registeredUserChanged(const QString&)", &slot_1, QMetaData::Protected }, - { "registeredUserAdded(const QString&)", &slot_2, QMetaData::Protected }, - { "registeredDatabaseCleared()", &slot_3, QMetaData::Protected } + static const TQUMethod slot_2 = {"registeredUserAdded", 1, param_slot_2 }; + static const TQUMethod slot_3 = {"registeredDatabaseCleared", 0, 0 }; + static const TQMetaData slot_tbl[] = { + { "registeredUserRemoved(const TQString&)", &slot_0, TQMetaData::Protected }, + { "registeredUserChanged(const TQString&)", &slot_1, TQMetaData::Protected }, + { "registeredUserAdded(const TQString&)", &slot_2, TQMetaData::Protected }, + { "registeredDatabaseCleared()", &slot_3, TQMetaData::Protected } }; - metaObj = QMetaObject::new_metaobject( - "KviIrcUserDataBase", parentObject, + metaObj = TQMetaObject::new_metaobject( + "KviIrcUserDataBase", tqparentObject, slot_tbl, 4, 0, 0, -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES 0, 0, 0, 0, -#endif // QT_NO_PROPERTIES +#endif // TQT_NO_PROPERTIES 0, 0 ); cleanUp_KviIrcUserDataBase.setMetaObject( metaObj ); return metaObj; } -void* KviIrcUserDataBase::qt_cast( const char* clname ) +void* KviIrcUserDataBase::tqqt_cast( const char* clname ) { if ( !qstrcmp( clname, "KviIrcUserDataBase" ) ) return this; - return QObject::qt_cast( clname ); + return TQObject::tqqt_cast( clname ); } -bool KviIrcUserDataBase::qt_invoke( int _id, QUObject* _o ) +bool KviIrcUserDataBase::qt_invoke( int _id, TQUObject* _o ) { switch ( _id - staticMetaObject()->slotOffset() ) { - case 0: registeredUserRemoved((const QString&)static_QUType_QString.get(_o+1)); break; - case 1: registeredUserChanged((const QString&)static_QUType_QString.get(_o+1)); break; - case 2: registeredUserAdded((const QString&)static_QUType_QString.get(_o+1)); break; + case 0: registeredUserRemoved((const TQString&)static_TQUType_TQString.get(_o+1)); break; + case 1: registeredUserChanged((const TQString&)static_TQUType_TQString.get(_o+1)); break; + case 2: registeredUserAdded((const TQString&)static_TQUType_TQString.get(_o+1)); break; case 3: registeredDatabaseCleared(); break; default: - return QObject::qt_invoke( _id, _o ); + return TQObject::qt_invoke( _id, _o ); } return TRUE; } -bool KviIrcUserDataBase::qt_emit( int _id, QUObject* _o ) +bool KviIrcUserDataBase::qt_emit( int _id, TQUObject* _o ) { - return QObject::qt_emit(_id,_o); + return TQObject::qt_emit(_id,_o); } -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES -bool KviIrcUserDataBase::qt_property( int id, int f, QVariant* v) +bool KviIrcUserDataBase::qt_property( int id, int f, TQVariant* v) { - return QObject::qt_property( id, f, v); + return TQObject::qt_property( id, f, v); } -bool KviIrcUserDataBase::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; } -#endif // QT_NO_PROPERTIES +bool KviIrcUserDataBase::qt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; } +#endif // TQT_NO_PROPERTIES diff --git a/src/kvilib/net/kvi_dns.cpp b/src/kvilib/net/kvi_dns.cpp index faa2e126..285c45e3 100644 --- a/src/kvilib/net/kvi_dns.cpp +++ b/src/kvilib/net/kvi_dns.cpp @@ -60,9 +60,9 @@ KviDnsResult::KviDnsResult() { m_iError = KviError_success; - m_pHostnameList = new KviPointerList; + m_pHostnameList = new KviPointerList; m_pHostnameList->setAutoDelete(true); - m_pIpAddressList = new KviPointerList; + m_pIpAddressList = new KviPointerList; m_pIpAddressList->setAutoDelete(true); } @@ -73,15 +73,15 @@ KviDnsResult::~KviDnsResult() delete m_pIpAddressList; } -void KviDnsResult::appendHostname(const QString &host) +void KviDnsResult::appendHostname(const TQString &host) { - m_pHostnameList->append(new QString(host)); + m_pHostnameList->append(new TQString(host)); } -void KviDnsResult::appendAddress(const QString &addr) +void KviDnsResult::appendAddress(const TQString &addr) { - m_pIpAddressList->append(new QString(addr)); + m_pIpAddressList->append(new TQString(addr)); } @@ -197,22 +197,22 @@ void KviDnsThread::run() } } else { dns->appendHostname(pHostEntry->h_name); - QString szIp; + TQString szIp; KviNetUtils::binaryIpToStringIp(* ((struct in_addr*)(pHostEntry->h_addr)),szIp); dns->appendAddress(szIp); int idx = 1; while(pHostEntry->h_addr_list[idx]) { - QString tmp; + TQString tmp; KviNetUtils::binaryIpToStringIp(* ((struct in_addr*)(pHostEntry->h_addr_list[idx])),tmp); if(tmp.hasData())dns->appendAddress(tmp); ++idx; } if(pHostEntry->h_aliases[0]) { - dns->appendHostname(QString::fromUtf8(pHostEntry->h_aliases[0])); - if(pHostEntry->h_aliases[1])dns->appendHostname(QString::fromUtf8(pHostEntry->h_aliases[1])); + dns->appendHostname(TQString::fromUtf8(pHostEntry->h_aliases[0])); + if(pHostEntry->h_aliases[1])dns->appendHostname(TQString::fromUtf8(pHostEntry->h_aliases[1])); } } @@ -293,12 +293,12 @@ void KviDnsThread::run() hints.ai_addr = 0; hints.ai_next = 0; - retVal = getaddrinfo(KviQString::toUtf8(m_szQuery).data(),0,&hints,&pRet); + retVal = getaddrinfo(KviTQString::toUtf8(m_szQuery).data(),0,&hints,&pRet); if(retVal != 0)dns->setError(translateDnsError(retVal)); else { - dns->appendHostname(pRet->ai_canonname ? QString::fromUtf8(pRet->ai_canonname) : m_szQuery); - QString szIp; + dns->appendHostname(pRet->ai_canonname ? TQString::fromUtf8(pRet->ai_canonname) : m_szQuery); + TQString szIp; #ifdef COMPILE_IPV6_SUPPORT if(pRet->ai_family == PF_INET6)KviNetUtils::binaryIpToStringIp_V6(((sockaddr_in6 *)(pRet->ai_addr))->sin6_addr,szIp); else { @@ -312,7 +312,7 @@ void KviDnsThread::run() pNext = pRet->ai_next; while(pNext) { - QString tmp; + TQString tmp; #ifdef COMPILE_IPV6_SUPPORT if(pNext->ai_family == PF_INET6)KviNetUtils::binaryIpToStringIp_V6(((sockaddr_in6 *)(pNext->ai_addr))->sin6_addr,tmp); else { @@ -326,7 +326,7 @@ void KviDnsThread::run() if(pNext->ai_canonname) { // FIXME: only of not equal to other names ? - dns->appendHostname(QString::fromUtf8(pNext->ai_canonname)); + dns->appendHostname(TQString::fromUtf8(pNext->ai_canonname)); } pNext = pNext->ai_next; @@ -350,7 +350,7 @@ void KviDnsThread::run() KviDns::KviDns() -: QObject() +: TQObject() { m_pSlaveThread = new KviDnsThread(this); m_pDnsResult = new KviDnsResult(); @@ -372,10 +372,10 @@ bool KviDns::isRunning() const return (m_state == Busy); }; -bool KviDns::lookup(const QString &query,QueryType type) +bool KviDns::lookup(const TQString &query,QueryType type) { if(m_state == Busy)return false; - m_pSlaveThread->setQuery(KviQString::trimmed(query),type); + m_pSlaveThread->setQuery(KviTQString::trimmed(query),type); bool bStarted = m_pSlaveThread->start(); m_state = bStarted ? Busy : Failure; return bStarted; @@ -393,12 +393,12 @@ KviDnsResult * KviDns::result() return m_pDnsResult; } -KviPointerList * KviDns::hostnameList() +KviPointerList * KviDns::hostnameList() { return result()->hostnameList(); } -KviPointerList * KviDns::ipAddressList() +KviPointerList * KviDns::ipAddressList() { return result()->ipAddressList(); } @@ -413,26 +413,26 @@ int KviDns::ipAddressCount() return result()->ipAddressList()->count(); } -const QString & KviDns::firstHostname() +const TQString & KviDns::firstHostname() { - QString * pStr = result()->hostnameList()->first(); + TQString * pStr = result()->hostnameList()->first(); if(pStr)return *pStr; - return KviQString::empty; + return KviTQString::empty; } -const QString & KviDns::firstIpAddress() +const TQString & KviDns::firstIpAddress() { - QString * pStr = result()->ipAddressList()->first(); + TQString * pStr = result()->ipAddressList()->first(); if(pStr)return *pStr; - return KviQString::empty; + return KviTQString::empty; } -const QString & KviDns::query() +const TQString & KviDns::query() { return result()->query(); } -bool KviDns::event(QEvent *e) +bool KviDns::event(TQEvent *e) { if(e->type() == KVI_THREAD_EVENT) { @@ -445,6 +445,6 @@ bool KviDns::event(QEvent *e) return true; } // else ops... unknown thread event ? } - return QObject::event(e); + return TQObject::event(e); } diff --git a/src/kvilib/net/kvi_dns.h b/src/kvilib/net/kvi_dns.h index 3f423c24..70dbf8c1 100644 --- a/src/kvilib/net/kvi_dns.h +++ b/src/kvilib/net/kvi_dns.h @@ -44,29 +44,30 @@ public: ~KviDnsResult(); protected: int m_iError; - KviPointerList * m_pHostnameList; - KviPointerList * m_pIpAddressList; - QString m_szQuery; + KviPointerList * m_pHostnameList; + KviPointerList * m_pIpAddressList; + TQString m_szQuery; public: int error(){ return m_iError; }; // never store nor delete these pointers! // (these are NEVER 0) - KviPointerList * hostnameList(){ return m_pHostnameList; }; - KviPointerList * ipAddressList(){ return m_pIpAddressList; }; - const QString &query(){ return m_szQuery; }; + KviPointerList * hostnameList(){ return m_pHostnameList; }; + KviPointerList * ipAddressList(){ return m_pIpAddressList; }; + const TQString &query(){ return m_szQuery; }; protected: void setError(int iError){ m_iError = iError; }; - void setQuery(const QString &query){ m_szQuery = query; }; - void appendHostname(const QString &host); - void appendAddress(const QString &addr); + void setQuery(const TQString &query){ m_szQuery = query; }; + void appendHostname(const TQString &host); + void appendAddress(const TQString &addr); }; -class KVILIB_API KviDns : public QObject, public KviHeapObject +class KVILIB_API KviDns : public TQObject, public KviHeapObject { Q_OBJECT - Q_PROPERTY(bool blockingDelete READ isRunning) + TQ_OBJECT + TQ_PROPERTY(bool blockingDelete READ isRunning) public: KviDns(); ~KviDns(); @@ -85,27 +86,27 @@ public: // // Lookup start - bool lookup(const QString &szQuery,QueryType type); + bool lookup(const TQString &szQuery,QueryType type); // Current object state State state(){ return m_state; }; // Results (return always non null-data..but valid results only if state() == Success or Failure) int error(); - const QString & firstHostname(); - const QString & firstIpAddress(); + const TQString & firstHostname(); + const TQString & firstIpAddress(); int hostnameCount(); int ipAddressCount(); - KviPointerList * hostnameList(); - KviPointerList * ipAddressList(); - const QString & query(); + KviPointerList * hostnameList(); + KviPointerList * ipAddressList(); + const TQString & query(); bool isRunning() const; // Auxiliary data store void setAuxData(void * pAuxData){ m_pAuxData = pAuxData; }; void * releaseAuxData(){ void * pData = m_pAuxData; m_pAuxData = 0; return pData; }; protected: - virtual bool event(QEvent *e); + virtual bool event(TQEvent *e); private: KviDnsResult * result(); signals: @@ -127,11 +128,11 @@ protected: KviDnsThread(KviDns * pDns); ~KviDnsThread(); protected: - QString m_szQuery; + TQString m_szQuery; KviDns::QueryType m_queryType; KviDns * m_pParentDns; public: - void setQuery(const QString &query,KviDns::QueryType type){ m_szQuery = query; m_queryType = type; }; + void setQuery(const TQString &query,KviDns::QueryType type){ m_szQuery = query; m_queryType = type; }; protected: virtual void run(); int translateDnsError(int iErr); diff --git a/src/kvilib/net/kvi_http.cpp b/src/kvilib/net/kvi_http.cpp index 2e94abbe..07a69658 100644 --- a/src/kvilib/net/kvi_http.cpp +++ b/src/kvilib/net/kvi_http.cpp @@ -25,8 +25,8 @@ #define __KVILIB__ -#include -#include +#include +#include //#include #include "kvi_http.h" @@ -46,7 +46,7 @@ #define KVI_HTTP_REQUEST_THREAD_EVENT_REQUESTSENT (KVI_THREAD_USER_EVENT_BASE + 0xCAFF) KviHttpRequest::KviHttpRequest() -: QObject() +: TQObject() { m_pDns = 0; m_pThread = 0; @@ -55,24 +55,24 @@ KviHttpRequest::KviHttpRequest() m_bHeaderProcessed = false; m_pBuffer = new KviDataBuffer(); - resetStatus(); + resettqStatus(); resetData(); } KviHttpRequest::~KviHttpRequest() { - resetInternalStatus(); + resetInternaltqStatus(); delete m_pBuffer; } void KviHttpRequest::abort() { - resetInternalStatus(); + resetInternaltqStatus(); m_szLastError = __tr2qs("Aborted"); emit terminated(false); } -void KviHttpRequest::resetInternalStatus() +void KviHttpRequest::resetInternaltqStatus() { if(m_pThread)delete m_pThread; if(m_pDns)delete m_pDns; @@ -91,7 +91,7 @@ void KviHttpRequest::resetInternalStatus() KviThreadManager::killPendingEvents(this); } -void KviHttpRequest::resetStatus() +void KviHttpRequest::resettqStatus() { m_szLastError = __tr2qs("No request"); m_uTotalSize = 0; @@ -114,12 +114,12 @@ void KviHttpRequest::resetData() void KviHttpRequest::reset() { - resetStatus(); + resettqStatus(); resetData(); - resetInternalStatus(); + resetInternaltqStatus(); } -bool KviHttpRequest::get(const KviUrl &u,ProcessingType p,const QString &szFileName) +bool KviHttpRequest::get(const KviUrl &u,ProcessingType p,const TQString &szFileName) { reset(); setUrl(u); @@ -131,8 +131,8 @@ bool KviHttpRequest::get(const KviUrl &u,ProcessingType p,const QString &szFileN bool KviHttpRequest::start() { // ensure that the file is closed - resetInternalStatus(); - resetStatus(); + resetInternaltqStatus(); + resettqStatus(); if(m_eProcessingType == StoreToFile) { @@ -148,7 +148,7 @@ bool KviHttpRequest::start() if(KviFile::exists(m_szFileName)) { // we check it - QFileInfo fi(m_szFileName); + TQFileInfo fi(m_szFileName); m_uContentOffset = fi.size(); } } @@ -156,22 +156,22 @@ bool KviHttpRequest::start() if(m_url.host().isEmpty()) { - resetInternalStatus(); + resetInternaltqStatus(); m_szLastError = __tr2qs("Invalid URL: Missing hostname"); return false; } if((!kvi_strEqualCI(m_url.protocol().ptr(),"http")) && (!kvi_strEqualCI(m_url.protocol().ptr(),"https"))) { - resetInternalStatus(); - m_szLastError=__tr2qs("Unsupported protocol %1").arg(m_url.protocol().ptr()); + resetInternaltqStatus(); + m_szLastError=__tr2qs("Unsupported protocol %1").tqarg(m_url.protocol().ptr()); return false; } if(kvi_isValidStringIp(m_url.host().ptr())) { m_szIp = m_url.host(); - QTimer::singleShot(10,this,SLOT(haveServerIp())); + TQTimer::singleShot(10,this,TQT_SLOT(haveServerIp())); return true; } @@ -181,20 +181,20 @@ bool KviHttpRequest::start() bool KviHttpRequest::startDnsLookup() { m_pDns = new KviDns(); - connect(m_pDns,SIGNAL(lookupDone(KviDns *)),this,SLOT(dnsLookupDone(KviDns *))); + connect(m_pDns,TQT_SIGNAL(lookupDone(KviDns *)),this,TQT_SLOT(dnsLookupDone(KviDns *))); if(!m_pDns->lookup(m_url.host().ptr(),KviDns::IpV4)) { - resetInternalStatus(); + resetInternaltqStatus(); m_szLastError = __tr2qs("Unable to start the DNS lookup"); return false; } - QString tmp; - KviQString::sprintf(tmp,__tr2qs("Looking up host %s"),m_url.host().ptr()); + TQString tmp; + KviTQString::sprintf(tmp,__tr2qs("Looking up host %s"),m_url.host().ptr()); emit status(tmp); // FIXME - emit resolvingHost(QString(m_url.host().ptr())); + emit resolvingHost(TQString(m_url.host().ptr())); return true; } @@ -206,13 +206,13 @@ void KviHttpRequest::dnsLookupDone(KviDns *d) m_szIp = d->firstIpAddress(); delete m_pDns; m_pDns = 0; - QString tmp; - KviQString::sprintf(tmp,__tr2qs("Host %s resolved to %Q"),m_url.host().ptr(),&m_szIp); + TQString tmp; + KviTQString::sprintf(tmp,__tr2qs("Host %s resolved to %Q"),m_url.host().ptr(),&m_szIp); emit status(tmp); haveServerIp(); } else { int iErr = d->error(); - resetInternalStatus(); + resetInternaltqStatus(); m_szLastError = KviError::getDescription(iErr); emit terminated(false); } @@ -223,8 +223,8 @@ void KviHttpRequest::haveServerIp() unsigned short uPort = m_url.port(); if(uPort == 0)uPort = 80; - QString tmp; - KviQString::sprintf(tmp,"%Q:%u",&m_szIp,uPort); + TQString tmp; + KviTQString::sprintf(tmp,"%Q:%u",&m_szIp,uPort); emit contactingHost(tmp); if(m_pThread)delete m_pThread; @@ -242,17 +242,17 @@ void KviHttpRequest::haveServerIp() if(!m_pThread->start()) { - resetInternalStatus(); + resetInternaltqStatus(); m_szLastError = __tr2qs("Unable to start the request slave thread"); emit terminated(false); return; } - KviQString::sprintf(tmp,__tr2qs("Contacting host %Q on port %u"),&m_szIp,uPort); + KviTQString::sprintf(tmp,__tr2qs("Contacting host %Q on port %u"),&m_szIp,uPort); emit status(tmp); } -bool KviHttpRequest::event(QEvent *e) +bool KviHttpRequest::event(TQEvent *e) { if(e->type() == KVI_THREAD_EVENT) { @@ -273,11 +273,11 @@ bool KviHttpRequest::event(QEvent *e) break; case KVI_HTTP_REQUEST_THREAD_EVENT_REQUESTSENT: { - QString * req = ((KviThreadDataEvent *)e)->getData(); + TQString * req = ((KviThreadDataEvent *)e)->getData(); #ifdef COMPILE_USE_QT4 - QStringList sl = req->split("\r\n"); + TQStringList sl = req->split("\r\n"); #else - QStringList sl = QStringList::split("\r\n",*req); + TQStringList sl = TQStringList::split("\r\n",*req); #endif emit requestSent(sl); delete req; @@ -318,7 +318,7 @@ bool KviHttpRequest::event(QEvent *e) // nothing... just make gcc happy break; } - resetInternalStatus(); + resetInternaltqStatus(); m_szLastError = __tr2qs("Success"); emit terminated(true); return true; @@ -328,7 +328,7 @@ bool KviHttpRequest::event(QEvent *e) KviStr * err = ((KviThreadDataEvent *)e)->getData(); m_szLastError = __tr2qs_no_xgettext(err->ptr()); delete err; - resetInternalStatus(); + resetInternaltqStatus(); emit terminated(false); return true; } @@ -343,24 +343,24 @@ bool KviHttpRequest::event(QEvent *e) break; } } - return QObject::event(e); + return TQObject::event(e); } void KviHttpRequest::emitLines(KviDataBuffer * pDataBuffer) { - int idx = pDataBuffer->find((const unsigned char *)"\n",1); + int idx = pDataBuffer->tqfind((const unsigned char *)"\n",1); while(idx != -1) { KviStr tmp((const char *)(m_pBuffer->data()),idx); tmp.stripRight('\r'); pDataBuffer->remove(idx + 1); - idx = pDataBuffer->find((const unsigned char *)"\n",1); + idx = pDataBuffer->tqfind((const unsigned char *)"\n",1); emit data(tmp); } } // header += "Accept: "; -// QString acceptHeader = metaData("accept"); +// TQString acceptHeader = metaData("accept"); // if (!acceptHeader.isEmpty()) // header += acceptHeader; // else @@ -406,26 +406,26 @@ bool KviHttpRequest::openFile() case RenameIncoming: { int i=0; - QString tmp = m_szFileName; + TQString tmp = m_szFileName; do { i++; - m_szFileName = tmp + QString(".kvirnm-%1").arg(i); + m_szFileName = tmp + TQString(".kvirnm-%1").tqarg(i); } while(KviFile::exists(m_szFileName)); } break; case RenameExisting: { int i=0; - QString tmp; + TQString tmp; do { i++; - tmp = m_szFileName + QString(".kvirnm-%1").arg(i); + tmp = m_szFileName + TQString(".kvirnm-%1").tqarg(i); } while(KviFile::exists(tmp)); - QDir d; + TQDir d; if(!d.rename(m_szFileName,tmp)) { // fail :( - resetInternalStatus(); + resetInternaltqStatus(); m_szLastError = __tr2qs("Failed to rename the existing file, please rename manually and retry"); emit terminated(false); return false; @@ -443,8 +443,8 @@ bool KviHttpRequest::openFile() if(!m_pFile->openForWriting(bAppend)) { - resetInternalStatus(); - KviQString::sprintf(m_szLastError,__tr2qs("Can't open file \"%Q\" for writing"),&m_szFileName); + resetInternaltqStatus(); + KviTQString::sprintf(m_szLastError,__tr2qs("Can't open file \"%Q\" for writing"),&m_szFileName); emit terminated(false); return false; } @@ -473,7 +473,7 @@ bool KviHttpRequest::processHeader(KviStr &szHeader) bool bValid = false; - unsigned int uStatus = 0; + unsigned int utqStatus = 0; // check the response value if(kvi_strEqualCSN(szResponse.ptr(),"HTTP",4)) @@ -486,24 +486,24 @@ bool KviHttpRequest::processHeader(KviStr &szHeader) if(idx != -1)szNumber = szR.left(idx); else szNumber = szR; bool bOk; - uStatus = szNumber.toUInt(&bOk); + utqStatus = szNumber.toUInt(&bOk); if(bOk)bValid = true; } if(!bValid) { // the response is invalid ? - resetInternalStatus(); - m_szLastError=__tr2qs("Invalid HTTP response: %s").arg(szResponse.ptr()); + resetInternaltqStatus(); + m_szLastError=__tr2qs("Invalid HTTP response: %s").tqarg(szResponse.ptr()); emit terminated(false); return false; } - QString tmp; - KviQString::sprintf(tmp,__tr2qs("Received HTTP response: %s"),szResponse.ptr()); + TQString tmp; + KviTQString::sprintf(tmp,__tr2qs("Received HTTP response: %s"),szResponse.ptr()); emit status(tmp); - emit receivedResponse(QString(szResponse.ptr())); + emit receivedResponse(TQString(szResponse.ptr())); KviPointerList hlist; hlist.setAutoDelete(true); @@ -531,12 +531,12 @@ bool KviHttpRequest::processHeader(KviStr &szHeader) KviStr szName = s->left(idx); s->cutLeft(idx + 1); s->stripWhiteSpace(); - hdr.replace(szName.ptr(),new KviStr(*s)); + hdr.tqreplace(szName.ptr(),new KviStr(*s)); //debug("FOUND HEADER (%s)=(%s)",szName.ptr(),s->ptr()); } } - KviStr * size = hdr.find("Content-length"); + KviStr * size = hdr.tqfind("Content-length"); if(size) { bool bOk; @@ -544,13 +544,13 @@ bool KviHttpRequest::processHeader(KviStr &szHeader) if(!bOk)m_uTotalSize = 0; } - KviStr * contentEncoding = hdr.find("Content-encoding"); + KviStr * contentEncoding = hdr.tqfind("Content-encoding"); if(contentEncoding) { m_bGzip = contentEncoding->equalsCI("gzip"); } - KviStr * transferEncoding = hdr.find("Transfer-Encoding"); + KviStr * transferEncoding = hdr.tqfind("Transfer-Encoding"); if(transferEncoding) { if(kvi_strEqualCI(transferEncoding->ptr(),"chunked")) @@ -608,14 +608,14 @@ bool KviHttpRequest::processHeader(KviStr &szHeader) // case 504: // Gateway timeout // case 505: // HTTP Version not supported - if((uStatus != 200) && (uStatus != 206)) + if((utqStatus != 200) && (utqStatus != 206)) { // this is not "OK" and not "Partial content" // Error , redirect or something confusing if(m_eProcessingType != HeadersOnly) { // this is an error then - resetInternalStatus(); + resetInternaltqStatus(); m_szLastError = szResponse.ptr(); emit terminated(false); return false; @@ -624,7 +624,7 @@ bool KviHttpRequest::processHeader(KviStr &szHeader) if((m_uMaxContentLength > 0) && (m_uTotalSize > ((unsigned int)m_uMaxContentLength))) { - resetInternalStatus(); + resetInternaltqStatus(); m_szLastError=__tr2qs("Stream exceeding maximum length"); emit terminated(false); return false; @@ -651,13 +651,13 @@ void KviHttpRequest::processData(KviDataBuffer * data) // time to process the header m_pBuffer->append(*data); - int idx = m_pBuffer->find((const unsigned char *)"\r\n\r\n",4); + int idx = m_pBuffer->tqfind((const unsigned char *)"\r\n\r\n",4); if(idx == -1) { // header not complete if(m_pBuffer->size() > 4096) { - resetInternalStatus(); + resetInternaltqStatus(); m_szLastError = __tr2qs("Header too long: exceeded 4096 bytes"); emit terminated(false); } @@ -706,7 +706,7 @@ void KviHttpRequest::processData(KviDataBuffer * data) if(((m_uTotalSize > 0) && (m_uReceivedSize > m_uTotalSize)) || ((m_uMaxContentLength > 0) && (m_uReceivedSize > m_uMaxContentLength))) { - resetInternalStatus(); + resetInternaltqStatus(); m_szLastError=__tr2qs("Stream exceeded expected length"); emit terminated(false); } @@ -721,7 +721,7 @@ void KviHttpRequest::processData(KviDataBuffer * data) // we're processing data in m_pBuffer here if(m_bChunkedTransferEncoding) { - // The transfer encoding is chunked: the buffer contains + // The transfer encoding is chunked: the buffer tqcontains // chunks of data with an initial header composed // of a hexadecimal length, an optional bullshit and a single CRLF // The transfer terminates when we read a last chunk of size 0 @@ -776,7 +776,7 @@ void KviHttpRequest::processData(KviDataBuffer * data) // We're looking for the beginning of a chunk now. // Note that we might be at the end of a previous chunk that has a CRLF terminator // we need to skip it. - int crlf = m_pBuffer->find((const unsigned char *)"\r\n",2); + int crlf = m_pBuffer->tqfind((const unsigned char *)"\r\n",2); if(crlf != -1) { if(crlf == 0) @@ -789,12 +789,12 @@ void KviHttpRequest::processData(KviDataBuffer * data) KviStr szHeader((const char *)(m_pBuffer->data()),crlf); szHeader.cutFromFirst(' '); // now szHeader should contain a hexadecimal chunk length... (why the hell it is hex and not decimal ????) - QString szHexHeader = szHeader.ptr(); + TQString szHexHeader = szHeader.ptr(); bool bOk; m_uRemainingChunkSize = szHexHeader.toLong(&bOk,16); if(!bOk) { - resetInternalStatus(); + resetInternaltqStatus(); m_szLastError = __tr2qs("Protocol error: invalid chunk size"); emit terminated(false); return; @@ -814,7 +814,7 @@ void KviHttpRequest::processData(KviDataBuffer * data) // chunk header not complete if(m_pBuffer->size() > 4096) { - resetInternalStatus(); + resetInternaltqStatus(); m_szLastError = __tr2qs("Chunk header too long: exceeded 4096 bytes"); emit terminated(false); return; @@ -848,7 +848,7 @@ check_stream_length: if(((m_uTotalSize > 0) && (m_uReceivedSize > m_uTotalSize)) || ((m_uMaxContentLength > 0) && (m_uReceivedSize > m_uMaxContentLength))) { - resetInternalStatus(); + resetInternaltqStatus(); m_szLastError=__tr2qs("Stream exceeded expected length"); emit terminated(false); } @@ -872,13 +872,13 @@ check_stream_length: KviHttpRequestThread::KviHttpRequestThread( KviHttpRequest * r, - const QString &szHost, - const QString &szIp, + const TQString &szHost, + const TQString &szIp, unsigned short uPort, - const QString & szPath, + const TQString & szPath, unsigned int uContentOffset, RequestMethod m, - const QString &szPostData, + const TQString &szPostData, bool bUseSSL ) : KviSensitiveThread() { @@ -1403,7 +1403,7 @@ void KviHttpRequestThread::runInternal() "Connection: Close\r\n" \ "User-Agent: KVIrc-http-slave/1.0.0\r\n" \ "Accept: */*\r\n", - szMethod.ptr(),KviQString::toUtf8(m_szPath).data(),KviQString::toUtf8(m_szHost).data()); + szMethod.ptr(),KviTQString::toUtf8(m_szPath).data(),KviTQString::toUtf8(m_szHost).data()); if(m_uContentOffset > 0) szRequest.append(KviStr::Format,"Range: bytes=%u-\r\n",m_uContentOffset); @@ -1430,7 +1430,7 @@ void KviHttpRequestThread::runInternal() if(!sendBuffer(szRequest.ptr(),szRequest.len(),60))return; // now loop reading data - postEvent(m_pRequest,new KviThreadDataEvent(KVI_HTTP_REQUEST_THREAD_EVENT_REQUESTSENT,new QString(szRequest))); + postEvent(m_pRequest,new KviThreadDataEvent(KVI_HTTP_REQUEST_THREAD_EVENT_REQUESTSENT,new TQString(szRequest))); for(;;) { diff --git a/src/kvilib/net/kvi_http.h b/src/kvilib/net/kvi_http.h index 1bd6a9d9..de4457d8 100644 --- a/src/kvilib/net/kvi_http.h +++ b/src/kvilib/net/kvi_http.h @@ -33,10 +33,10 @@ #include "kvi_inttypes.h" #include "kvi_url.h" -#include +#include #include "kvi_pointerhashtable.h" #include "kvi_file.h" -#include +#include class KviDns; class KviSSL; @@ -45,12 +45,13 @@ class KviHttpRequestThread; // // This class implements a HTTP protocol client. // It's able to send GET, POST and HEAD requests, -// download stuff to a file or to a qt SLOT(). +// download stuff to a file or to a qt TQT_SLOT(). // -class KVILIB_API KviHttpRequest : public QObject, public KviHeapObject +class KVILIB_API KviHttpRequest : public TQObject, public KviHeapObject { Q_OBJECT + TQ_OBJECT public: enum ProcessingType { @@ -73,19 +74,19 @@ public: protected: // data KviUrl m_url; - QString m_szFileName; + TQString m_szFileName; ProcessingType m_eProcessingType; ExistingFileAction m_eExistingFileAction; void * m_pPrivateData; unsigned int m_uMaxContentLength; unsigned int m_uContentOffset; - QString m_szPostData; + TQString m_szPostData; // status - QString m_szLastError; + TQString m_szLastError; unsigned int m_uTotalSize; unsigned int m_uReceivedSize; // internal status - QString m_szIp; + TQString m_szIp; KviDns * m_pDns; KviHttpRequestThread * m_pThread; KviDataBuffer * m_pBuffer; @@ -97,15 +98,15 @@ protected: KviFile * m_pFile; protected: bool startDnsLookup(); - virtual bool event(QEvent *e); + virtual bool event(TQEvent *e); void processData(KviDataBuffer * data); bool processHeader(KviStr &szHeader); bool openFile(); void emitLines(KviDataBuffer * pDataBuffer); - void resetStatus(); + void resettqStatus(); void resetData(); - void resetInternalStatus(); + void resetInternaltqStatus(); protected slots: void dnsLookupDone(KviDns *d); void haveServerIp(); @@ -113,7 +114,7 @@ public: const KviUrl & url(){ return m_url; }; ProcessingType processingType(){ return m_eProcessingType; }; ExistingFileAction existingFileAction(){ return m_eExistingFileAction; }; - const QString &fileName(){ return m_szFileName; }; + const TQString &fileName(){ return m_szFileName; }; void * privateData(){ return m_pPrivateData; }; unsigned int maxContentLength(){ return m_uMaxContentLength; }; unsigned int contentOffset(){ return m_uContentOffset; }; @@ -122,11 +123,11 @@ public: void reset(); - void setPostData(const QString &szPostData){ m_szPostData = szPostData; }; + void setPostData(const TQString &szPostData){ m_szPostData = szPostData; }; void setUrl(const KviUrl &u){ m_url = u; }; void setProcessingType(ProcessingType t){ m_eProcessingType = t; }; void setExistingFileAction(ExistingFileAction a){ m_eExistingFileAction = a; }; - void setFileName(const QString &szFileName){ m_szFileName = szFileName; }; + void setFileName(const TQString &szFileName){ m_szFileName = szFileName; }; void setPrivateData(void * ptr){ m_pPrivateData = ptr; }; void setMaxContentLength(int uMaxContentLength){ m_uMaxContentLength = uMaxContentLength; }; //0 means unlimited // this will work regardless of ExistingFileAction : even if the file doesn't exist @@ -135,25 +136,25 @@ public: bool start(); // this is a shortcut for reset()+setUrl()+setProcessingType()+setFileName()+start() - bool get(const KviUrl &u,ProcessingType p = WholeFile,const QString &szFileName = QString::null); + bool get(const KviUrl &u,ProcessingType p = WholeFile,const TQString &szFileName = TQString()); - const QString & lastError(){ return m_szLastError; }; + const TQString & lastError(){ return m_szLastError; }; void abort(); signals: - void resolvingHost(const QString &hostname); - void contactingHost(const QString &ipandport); + void resolvingHost(const TQString &hostname); + void contactingHost(const TQString &ipandport); void connectionEstabilished(); - void receivedResponse(const QString &response); + void receivedResponse(const TQString &response); void terminated(bool bSuccess); - void status(const QString &message); + void status(const TQString &message); void data(const KviStr &data); void binaryData(const KviDataBuffer &data); void header(KviPointerHashTable * hdr); - void requestSent(const QStringList &request); + void requestSent(const TQStringList &request); }; @@ -164,13 +165,13 @@ public: enum RequestMethod { Post, Get , Head }; protected: KviHttpRequestThread(KviHttpRequest * r, - const QString &szHost, - const QString &szIp, + const TQString &szHost, + const TQString &szIp, unsigned short uPort, - const QString &szPath, + const TQString &szPath, unsigned int uContentOffset, RequestMethod m, - const QString &szPostData = QString::null, + const TQString &szPostData = TQString(), bool bUseSSL = false); public: @@ -178,12 +179,12 @@ public: protected: KviHttpRequest * m_pRequest; - QString m_szHost; - QString m_szIp; - QString m_szPath; + TQString m_szHost; + TQString m_szIp; + TQString m_szPath; unsigned int m_uContentOffset; RequestMethod m_eRequestMethod; - QString m_szPostData; + TQString m_szPostData; unsigned short m_uPort; kvi_socket_t m_sock; diff --git a/src/kvilib/net/kvi_netutils.cpp b/src/kvilib/net/kvi_netutils.cpp index 0cdb8b02..3ff5d9b0 100644 --- a/src/kvilib/net/kvi_netutils.cpp +++ b/src/kvilib/net/kvi_netutils.cpp @@ -61,7 +61,7 @@ #include "kvi_netutils.h" #include "kvi_memmove.h" -#include +#include #ifndef COMPILE_ON_WINDOWS @@ -318,7 +318,7 @@ bool kvi_stringIpToBinaryIp(const char *szIp,struct in_addr *address) -bool kvi_binaryIpToStringIp(struct in_addr in,QString &szBuffer) +bool kvi_binaryIpToStringIp(struct in_addr in,TQString &szBuffer) { @@ -346,7 +346,7 @@ bool kvi_binaryIpToStringIp(struct in_addr in,QString &szBuffer) -bool kvi_binaryIpToStringIp(struct in_addr in,QString &szBuffer) +bool kvi_binaryIpToStringIp(struct in_addr in,TQString &szBuffer) { @@ -886,7 +886,7 @@ bool kvi_isValidStringIp_V6(const char *szIp) -bool kvi_binaryIpToStringIp_V6(struct in6_addr in,QString &szBuffer) +bool kvi_binaryIpToStringIp_V6(struct in6_addr in,TQString &szBuffer) { @@ -952,12 +952,12 @@ namespace KviNetUtils { - bool stringIpToBinaryIp(const QString &szStringIp,struct in_addr * address) + bool stringIpToBinaryIp(const TQString &szStringIp,struct in_addr * address) { #ifndef HAVE_INET_ATON - QString szAddr = szStringIp.simplifyWhiteSpace(); - Q_UINT32 iAddr=0; - QStringList ipv4 = QStringList::split(".", szAddr, FALSE); + TQString szAddr = szStringIp.simplifyWhiteSpace(); + TQ_UINT32 iAddr=0; + TQStringList ipv4 = TQStringList::split(".", szAddr, FALSE); if (ipv4.count() == 4) { int i = 0; bool ok = TRUE; @@ -978,12 +978,12 @@ namespace KviNetUtils return FALSE; #else //HAVE_INET_ATON if(szStringIp.isEmpty())return false; - return (inet_aton(KviQString::toUtf8(szStringIp).data(),address) != 0); + return (inet_aton(KviTQString::toUtf8(szStringIp).data(),address) != 0); #endif //HAVE_INET_ATON } - bool isValidStringIp(const QString &szIp) + bool isValidStringIp(const TQString &szIp) { @@ -1001,17 +1001,17 @@ namespace KviNetUtils #ifdef COMPILE_IPV6_SUPPORT - bool stringIpToBinaryIp_V6(const QString &szStringIp,struct in6_addr * address) + bool stringIpToBinaryIp_V6(const TQString &szStringIp,struct in6_addr * address) { - return (inet_pton(AF_INET6,KviQString::toUtf8(szStringIp).data(),(void *)address) == 1); + return (inet_pton(AF_INET6,KviTQString::toUtf8(szStringIp).data(),(void *)address) == 1); } - bool isValidStringIp_V6(const QString &szIp) + bool isValidStringIp_V6(const TQString &szIp) { @@ -1023,7 +1023,7 @@ namespace KviNetUtils } - bool binaryIpToStringIp_V6(struct in6_addr in,QString &szBuffer) + bool binaryIpToStringIp_V6(struct in6_addr in,TQString &szBuffer) { char buf[46]; bool bRet = inet_ntop(AF_INET6,(void *)&in,buf,46); @@ -1036,7 +1036,7 @@ namespace KviNetUtils - bool binaryIpToStringIp(struct in_addr in,QString &szBuffer) + bool binaryIpToStringIp(struct in_addr in,TQString &szBuffer) { @@ -1052,7 +1052,7 @@ namespace KviNetUtils - bool isRoutableIpString(const QString &szIpString) + bool isRoutableIpString(const TQString &szIpString) { @@ -1100,7 +1100,7 @@ namespace KviNetUtils - bool getInterfaceAddress(const QString &szInterfaceName,QString &szBuffer) + bool getInterfaceAddress(const TQString &szInterfaceName,TQString &szBuffer) { @@ -1118,7 +1118,7 @@ namespace KviNetUtils - kvi_memmove(ifr.ifr_name,KviQString::toUtf8(szInterfaceName).data(),len + 1); + kvi_memmove(ifr.ifr_name,KviTQString::toUtf8(szInterfaceName).data(),len + 1); @@ -1158,7 +1158,7 @@ namespace KviNetUtils - void formatNetworkBandwidthString(QString &szBuffer,unsigned int uBytesPerSec) + void formatNetworkBandwidthString(TQString &szBuffer,unsigned int uBytesPerSec) { @@ -1170,7 +1170,7 @@ namespace KviNetUtils unsigned int uRem = ((uBytesPerSec % (1024 * 1024)) * 100) / (1024 * 1024); - KviQString::sprintf(szBuffer,"%u.%u%u MB/s",uMB,uRem / 10,uRem % 10); + KviTQString::sprintf(szBuffer,"%u.%u%u MB/s",uMB,uRem / 10,uRem % 10); return; @@ -1184,13 +1184,13 @@ namespace KviNetUtils unsigned int uRem = ((uBytesPerSec % 1024) * 100) / 1024; - KviQString::sprintf(szBuffer,"%u.%u%u KB/s",uKB,uRem / 10,uRem % 10); + KviTQString::sprintf(szBuffer,"%u.%u%u KB/s",uKB,uRem / 10,uRem % 10); return; } - KviQString::sprintf(szBuffer,"%u B/s",uBytesPerSec); + KviTQString::sprintf(szBuffer,"%u B/s",uBytesPerSec); } @@ -1202,15 +1202,15 @@ namespace KviNetUtils -bool kvi_getInterfaceAddress(const char * ifname,QString &buffer) +bool kvi_getInterfaceAddress(const char * ifname,TQString &buffer) { debug("kvi_getInterfaceAddress is deprecated: use KviNetUtils::getInterfaceAddress"); - QString szRet; + TQString szRet; - bool bRes = KviNetUtils::getInterfaceAddress(QString(ifname),szRet); + bool bRes = KviNetUtils::getInterfaceAddress(TQString(ifname),szRet); buffer = szRet; @@ -1268,7 +1268,7 @@ bool kvi_isRoutableIp(const char * ipaddr) -bool kvi_getLocalHostAddress(QString &buffer) +bool kvi_getLocalHostAddress(TQString &buffer) { @@ -1282,7 +1282,7 @@ bool kvi_getLocalHostAddress(QString &buffer) if(!h)return false; - QString tmp; + TQString tmp; int i=0; @@ -1466,7 +1466,7 @@ kvi_u32_t KviSockaddr::port() -bool KviSockaddr::getStringAddress(QString &szBuffer) +bool KviSockaddr::getStringAddress(TQString &szBuffer) { diff --git a/src/kvilib/net/kvi_netutils.h b/src/kvilib/net/kvi_netutils.h index b43326f0..99e4bff8 100644 --- a/src/kvilib/net/kvi_netutils.h +++ b/src/kvilib/net/kvi_netutils.h @@ -49,12 +49,12 @@ KVILIB_API extern bool kvi_isValidStringIp(const char * szIp); KVILIB_API extern bool kvi_stringIpToBinaryIp(const char * szIp,struct in_addr * address); -KVILIB_API extern bool kvi_binaryIpToStringIp(struct in_addr in,QString &szBuffer); +KVILIB_API extern bool kvi_binaryIpToStringIp(struct in_addr in,TQString &szBuffer); #ifdef COMPILE_IPV6_SUPPORT KVILIB_API extern bool kvi_isValidStringIp_V6(const char * szIp); KVILIB_API extern bool kvi_stringIpToBinaryIp_V6(const char * szIp,struct in6_addr * address); - KVILIB_API extern bool kvi_binaryIpToStringIp_V6(struct in6_addr in,QString &szBuffer); + KVILIB_API extern bool kvi_binaryIpToStringIp_V6(struct in6_addr in,TQString &szBuffer); #endif class KVILIB_API KviSockaddr @@ -70,34 +70,34 @@ public: size_t addressLength(); int addressFamily(); bool isIpV6(); - bool getStringAddress(QString &szBuffer); + bool getStringAddress(TQString &szBuffer); kvi_u32_t port(); }; KVILIB_API extern bool kvi_select(int fd,bool * bCanRead,bool * bCanWrite,int iUSecs = 0); -KVILIB_API extern bool kvi_getInterfaceAddress(const char * ifname,QString &buffer); +KVILIB_API extern bool kvi_getInterfaceAddress(const char * ifname,TQString &buffer); // Warning : NOT THREAD SAFE! -KVILIB_API extern bool kvi_getLocalHostAddress(QString &buffer); +KVILIB_API extern bool kvi_getLocalHostAddress(TQString &buffer); KVILIB_API extern bool kvi_isRoutableIp(const char * ipaddr); KVILIB_API extern bool kvi_isRoutableIpString(const char * ipstring); namespace KviNetUtils { - KVILIB_API bool stringIpToBinaryIp(const QString &szStringIp,struct in_addr * address); - KVILIB_API bool isValidStringIp(const QString &szStringIp); - KVILIB_API bool binaryIpToStringIp(struct in_addr in,QString &szBuffer); - KVILIB_API bool getInterfaceAddress(const QString &szInterfaceName,QString &szBuffer); + KVILIB_API bool stringIpToBinaryIp(const TQString &szStringIp,struct in_addr * address); + KVILIB_API bool isValidStringIp(const TQString &szStringIp); + KVILIB_API bool binaryIpToStringIp(struct in_addr in,TQString &szBuffer); + KVILIB_API bool getInterfaceAddress(const TQString &szInterfaceName,TQString &szBuffer); #ifdef COMPILE_IPV6_SUPPORT - KVILIB_API bool isValidStringIp_V6(const QString &szStringIp); - KVILIB_API bool stringIpToBinaryIp_V6(const QString &szStringIp,struct in6_addr * address); - KVILIB_API bool binaryIpToStringIp_V6(struct in6_addr in,QString &szBuffer); + KVILIB_API bool isValidStringIp_V6(const TQString &szStringIp); + KVILIB_API bool stringIpToBinaryIp_V6(const TQString &szStringIp,struct in6_addr * address); + KVILIB_API bool binaryIpToStringIp_V6(struct in6_addr in,TQString &szBuffer); #endif KVILIB_API bool isRoutableIp(const char * ipaddr); - KVILIB_API bool isRoutableIpString(const QString &szIpString); - KVILIB_API void formatNetworkBandwidthString(QString &szBuffer,unsigned int uBytesPerSec); + KVILIB_API bool isRoutableIpString(const TQString &szIpString); + KVILIB_API void formatNetworkBandwidthString(TQString &szBuffer,unsigned int uBytesPerSec); }; diff --git a/src/kvilib/net/kvi_socket.h b/src/kvilib/net/kvi_socket.h index 47d51510..66c336d9 100644 --- a/src/kvilib/net/kvi_socket.h +++ b/src/kvilib/net/kvi_socket.h @@ -62,7 +62,7 @@ #ifndef MSG_NOSIGNAL // At least solaris seems to not have it - #define MSG_NOSIGNAL 0 + #define MSG_NOTQT_SIGNAL 0 #endif //#include "kvi_socketcalls.h" diff --git a/src/kvilib/net/kvi_ssl.cpp b/src/kvilib/net/kvi_ssl.cpp index 6748e062..b6cb2c21 100644 --- a/src/kvilib/net/kvi_ssl.cpp +++ b/src/kvilib/net/kvi_ssl.cpp @@ -326,7 +326,7 @@ static int cb(char *buf, int size, int rwflag, void *u) int len = p->len(); if(len >= size)return 0; kvi_memmove(buf,p->ptr(),len + 1); -// debug("PASS REQYESTED: %s",p->ptr()); +// debug("PASS RETQYESTED: %s",p->ptr()); return len; } @@ -564,7 +564,7 @@ void KviSSLCertificate::splitX509String(KviPointerHashTable arr[i]->cutLeft(idx + 1); if(szTok.hasData() && arr[i]->hasData()) { - dict->replace(szTok.ptr(),new KviStr(arr[i]->ptr())); + dict->tqreplace(szTok.ptr(),new KviStr(arr[i]->ptr())); } } } @@ -577,7 +577,7 @@ void KviSSLCertificate::splitX509String(KviPointerHashTable const char * KviSSLCertificate::dictEntry(KviPointerHashTable * dict,const char * entry) { - KviStr * t = dict->find(entry); + KviStr * t = dict->tqfind(entry); if(!t)return __tr("Unknown"); return t->ptr(); } diff --git a/src/kvilib/net/kvi_url.cpp b/src/kvilib/net/kvi_url.cpp index f980729c..41a6e556 100644 --- a/src/kvilib/net/kvi_url.cpp +++ b/src/kvilib/net/kvi_url.cpp @@ -41,7 +41,7 @@ KviUrl::KviUrl(const char * szUrl) parse(); } -KviUrl::KviUrl(const QString &szUrl) +KviUrl::KviUrl(const TQString &szUrl) { m_szUrl = szUrl; parse(); diff --git a/src/kvilib/net/kvi_url.h b/src/kvilib/net/kvi_url.h index 89adeb9f..ab37b1bb 100644 --- a/src/kvilib/net/kvi_url.h +++ b/src/kvilib/net/kvi_url.h @@ -31,7 +31,7 @@ class KVILIB_API KviUrl : public KviHeapObject public: KviUrl(); KviUrl(const char * szUrl); - KviUrl(const QString &szUrl); + KviUrl(const TQString &szUrl); KviUrl(const KviUrl &u); ~KviUrl(); protected: diff --git a/src/kvilib/net/moc_kvi_dns.cpp b/src/kvilib/net/moc_kvi_dns.cpp index 5b8857a9..cb25e6c7 100644 --- a/src/kvilib/net/moc_kvi_dns.cpp +++ b/src/kvilib/net/moc_kvi_dns.cpp @@ -2,136 +2,136 @@ ** KviDns meta object code from reading C++ file 'kvi_dns.h' ** ** Created: Sun Mar 23 20:56:20 2008 -** by: The Qt MOC ($Id: qt/moc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) +** by: The TQt TQMOC ($Id: qt/tqmoc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ -#undef QT_NO_COMPAT +#undef TQT_NO_COMPAT #include "kvi_dns.h" -#include -#include +#include +#include -#include -#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26) -#error "This file was generated using the moc from 3.3.8. It" -#error "cannot be used with the include files from this version of Qt." -#error "(The moc has changed too much.)" +#include +#if !defined(TQ_TQMOC_OUTPUT_REVISION) || (TQ_TQMOC_OUTPUT_REVISION != 26) +#error "This file was generated using the tqmoc from 3.3.8. It" +#error "cannot be used with the include files from this version of TQt." +#error "(The tqmoc has changed too much.)" #endif -#include +#include const char *KviDns::className() const { return "KviDns"; } -QMetaObject *KviDns::metaObj = 0; -static QMetaObjectCleanUp cleanUp_KviDns( "KviDns", &KviDns::staticMetaObject ); +TQMetaObject *KviDns::metaObj = 0; +static TQMetaObjectCleanUp cleanUp_KviDns( "KviDns", &KviDns::staticMetaObject ); -#ifndef QT_NO_TRANSLATION -QString KviDns::tr( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION +TQString KviDns::tr( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviDns", s, c, QApplication::DefaultCodec ); + if ( tqApp ) + return tqApp->translate( "KviDns", s, c, TQApplication::DefaultCodec ); else - return QString::fromLatin1( s ); + return TQString::tqfromLatin1( s ); } -#ifndef QT_NO_TRANSLATION_UTF8 -QString KviDns::trUtf8( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION_UTF8 +TQString KviDns::trUtf8( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviDns", s, c, QApplication::UnicodeUTF8 ); + if ( tqApp ) + return tqApp->translate( "KviDns", s, c, TQApplication::UnicodeUTF8 ); else - return QString::fromUtf8( s ); + return TQString::fromUtf8( s ); } -#endif // QT_NO_TRANSLATION_UTF8 +#endif // TQT_NO_TRANSLATION_UTF8 -#endif // QT_NO_TRANSLATION +#endif // TQT_NO_TRANSLATION -QMetaObject* KviDns::staticMetaObject() +TQMetaObject* KviDns::staticMetaObject() { if ( metaObj ) return metaObj; - QMetaObject* parentObject = QObject::staticMetaObject(); - static const QUParameter param_signal_0[] = { - { 0, &static_QUType_ptr, "KviDns", QUParameter::In } + TQMetaObject* tqparentObject = TQObject::staticMetaObject(); + static const TQUParameter param_signal_0[] = { + { 0, &static_TQUType_ptr, "KviDns", TQUParameter::In } }; - static const QUMethod signal_0 = {"lookupDone", 1, param_signal_0 }; - static const QMetaData signal_tbl[] = { - { "lookupDone(KviDns*)", &signal_0, QMetaData::Private } + static const TQUMethod signal_0 = {"lookupDone", 1, param_signal_0 }; + static const TQMetaData signal_tbl[] = { + { "lookupDone(KviDns*)", &signal_0, TQMetaData::Private } }; -#ifndef QT_NO_PROPERTIES - static const QMetaProperty props_tbl[1] = { +#ifndef TQT_NO_PROPERTIES + static const TQMetaProperty props_tbl[1] = { { "bool","blockingDelete", 0x12000001, &KviDns::metaObj, 0, -1 } }; -#endif // QT_NO_PROPERTIES - metaObj = QMetaObject::new_metaobject( - "KviDns", parentObject, +#endif // TQT_NO_PROPERTIES + metaObj = TQMetaObject::new_metaobject( + "KviDns", tqparentObject, 0, 0, signal_tbl, 1, -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES props_tbl, 1, 0, 0, -#endif // QT_NO_PROPERTIES +#endif // TQT_NO_PROPERTIES 0, 0 ); cleanUp_KviDns.setMetaObject( metaObj ); return metaObj; } -void* KviDns::qt_cast( const char* clname ) +void* KviDns::tqqt_cast( const char* clname ) { if ( !qstrcmp( clname, "KviDns" ) ) return this; if ( !qstrcmp( clname, "KviHeapObject" ) ) return (KviHeapObject*)this; - return QObject::qt_cast( clname ); + return TQObject::tqqt_cast( clname ); } -#include -#include +#include +#include -// SIGNAL lookupDone +// TQT_SIGNAL lookupDone void KviDns::lookupDone( KviDns* t0 ) { if ( signalsBlocked() ) return; - QConnectionList *clist = receivers( staticMetaObject()->signalOffset() + 0 ); + TQConnectionList *clist = tqreceivers( staticMetaObject()->signalOffset() + 0 ); if ( !clist ) return; - QUObject o[2]; - static_QUType_ptr.set(o+1,t0); + TQUObject o[2]; + static_TQUType_ptr.set(o+1,t0); activate_signal( clist, o ); } -bool KviDns::qt_invoke( int _id, QUObject* _o ) +bool KviDns::qt_invoke( int _id, TQUObject* _o ) { - return QObject::qt_invoke(_id,_o); + return TQObject::qt_invoke(_id,_o); } -bool KviDns::qt_emit( int _id, QUObject* _o ) +bool KviDns::qt_emit( int _id, TQUObject* _o ) { switch ( _id - staticMetaObject()->signalOffset() ) { - case 0: lookupDone((KviDns*)static_QUType_ptr.get(_o+1)); break; + case 0: lookupDone((KviDns*)static_TQUType_ptr.get(_o+1)); break; default: - return QObject::qt_emit(_id,_o); + return TQObject::qt_emit(_id,_o); } return TRUE; } -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES -bool KviDns::qt_property( int id, int f, QVariant* v) +bool KviDns::qt_property( int id, int f, TQVariant* v) { switch ( id - staticMetaObject()->propertyOffset() ) { case 0: switch( f ) { - case 1: *v = QVariant( this->isRunning(), 0 ); break; + case 1: *v = TQVariant( this->isRunning(), 0 ); break; case 3: case 4: case 5: break; default: return FALSE; } break; default: - return QObject::qt_property( id, f, v ); + return TQObject::qt_property( id, f, v ); } return TRUE; } -bool KviDns::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; } -#endif // QT_NO_PROPERTIES +bool KviDns::qt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; } +#endif // TQT_NO_PROPERTIES diff --git a/src/kvilib/net/moc_kvi_http.cpp b/src/kvilib/net/moc_kvi_http.cpp index 7ea9b591..632ce590 100644 --- a/src/kvilib/net/moc_kvi_http.cpp +++ b/src/kvilib/net/moc_kvi_http.cpp @@ -2,21 +2,21 @@ ** KviHttpRequest meta object code from reading C++ file 'kvi_http.h' ** ** Created: Sun Mar 23 20:56:22 2008 -** by: The Qt MOC ($Id: qt/moc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) +** by: The TQt TQMOC ($Id: qt/tqmoc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ -#undef QT_NO_COMPAT +#undef TQT_NO_COMPAT #include "kvi_http.h" -#include -#include +#include +#include -#include -#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26) -#error "This file was generated using the moc from 3.3.8. It" -#error "cannot be used with the include files from this version of Qt." -#error "(The moc has changed too much.)" +#include +#if !defined(TQ_TQMOC_OUTPUT_REVISION) || (TQ_TQMOC_OUTPUT_REVISION != 26) +#error "This file was generated using the tqmoc from 3.3.8. It" +#error "cannot be used with the include files from this version of TQt." +#error "(The tqmoc has changed too much.)" #endif const char *KviHttpRequest::className() const @@ -24,240 +24,240 @@ const char *KviHttpRequest::className() const return "KviHttpRequest"; } -QMetaObject *KviHttpRequest::metaObj = 0; -static QMetaObjectCleanUp cleanUp_KviHttpRequest( "KviHttpRequest", &KviHttpRequest::staticMetaObject ); +TQMetaObject *KviHttpRequest::metaObj = 0; +static TQMetaObjectCleanUp cleanUp_KviHttpRequest( "KviHttpRequest", &KviHttpRequest::staticMetaObject ); -#ifndef QT_NO_TRANSLATION -QString KviHttpRequest::tr( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION +TQString KviHttpRequest::tr( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviHttpRequest", s, c, QApplication::DefaultCodec ); + if ( tqApp ) + return tqApp->translate( "KviHttpRequest", s, c, TQApplication::DefaultCodec ); else - return QString::fromLatin1( s ); + return TQString::tqfromLatin1( s ); } -#ifndef QT_NO_TRANSLATION_UTF8 -QString KviHttpRequest::trUtf8( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION_UTF8 +TQString KviHttpRequest::trUtf8( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviHttpRequest", s, c, QApplication::UnicodeUTF8 ); + if ( tqApp ) + return tqApp->translate( "KviHttpRequest", s, c, TQApplication::UnicodeUTF8 ); else - return QString::fromUtf8( s ); + return TQString::fromUtf8( s ); } -#endif // QT_NO_TRANSLATION_UTF8 +#endif // TQT_NO_TRANSLATION_UTF8 -#endif // QT_NO_TRANSLATION +#endif // TQT_NO_TRANSLATION -QMetaObject* KviHttpRequest::staticMetaObject() +TQMetaObject* KviHttpRequest::staticMetaObject() { if ( metaObj ) return metaObj; - QMetaObject* parentObject = QObject::staticMetaObject(); - static const QUParameter param_slot_0[] = { - { "d", &static_QUType_ptr, "KviDns", QUParameter::In } + TQMetaObject* tqparentObject = TQObject::staticMetaObject(); + static const TQUParameter param_slot_0[] = { + { "d", &static_TQUType_ptr, "KviDns", TQUParameter::In } }; - static const QUMethod slot_0 = {"dnsLookupDone", 1, param_slot_0 }; - static const QUMethod slot_1 = {"haveServerIp", 0, 0 }; - static const QMetaData slot_tbl[] = { - { "dnsLookupDone(KviDns*)", &slot_0, QMetaData::Protected }, - { "haveServerIp()", &slot_1, QMetaData::Protected } + static const TQUMethod slot_0 = {"dnsLookupDone", 1, param_slot_0 }; + static const TQUMethod slot_1 = {"haveServerIp", 0, 0 }; + static const TQMetaData slot_tbl[] = { + { "dnsLookupDone(KviDns*)", &slot_0, TQMetaData::Protected }, + { "haveServerIp()", &slot_1, TQMetaData::Protected } }; - static const QUParameter param_signal_0[] = { - { "hostname", &static_QUType_QString, 0, QUParameter::In } + static const TQUParameter param_signal_0[] = { + { "hostname", &static_TQUType_TQString, 0, TQUParameter::In } }; - static const QUMethod signal_0 = {"resolvingHost", 1, param_signal_0 }; - static const QUParameter param_signal_1[] = { - { "ipandport", &static_QUType_QString, 0, QUParameter::In } + static const TQUMethod signal_0 = {"resolvingHost", 1, param_signal_0 }; + static const TQUParameter param_signal_1[] = { + { "ipandport", &static_TQUType_TQString, 0, TQUParameter::In } }; - static const QUMethod signal_1 = {"contactingHost", 1, param_signal_1 }; - static const QUMethod signal_2 = {"connectionEstabilished", 0, 0 }; - static const QUParameter param_signal_3[] = { - { "response", &static_QUType_QString, 0, QUParameter::In } + static const TQUMethod signal_1 = {"contactingHost", 1, param_signal_1 }; + static const TQUMethod signal_2 = {"connectionEstabilished", 0, 0 }; + static const TQUParameter param_signal_3[] = { + { "response", &static_TQUType_TQString, 0, TQUParameter::In } }; - static const QUMethod signal_3 = {"receivedResponse", 1, param_signal_3 }; - static const QUParameter param_signal_4[] = { - { "bSuccess", &static_QUType_bool, 0, QUParameter::In } + static const TQUMethod signal_3 = {"receivedResponse", 1, param_signal_3 }; + static const TQUParameter param_signal_4[] = { + { "bSuccess", &static_TQUType_bool, 0, TQUParameter::In } }; - static const QUMethod signal_4 = {"terminated", 1, param_signal_4 }; - static const QUParameter param_signal_5[] = { - { "message", &static_QUType_QString, 0, QUParameter::In } + static const TQUMethod signal_4 = {"terminated", 1, param_signal_4 }; + static const TQUParameter param_signal_5[] = { + { "message", &static_TQUType_TQString, 0, TQUParameter::In } }; - static const QUMethod signal_5 = {"status", 1, param_signal_5 }; - static const QUParameter param_signal_6[] = { - { "data", &static_QUType_ptr, "KviStr", QUParameter::In } + static const TQUMethod signal_5 = {"status", 1, param_signal_5 }; + static const TQUParameter param_signal_6[] = { + { "data", &static_TQUType_ptr, "KviStr", TQUParameter::In } }; - static const QUMethod signal_6 = {"data", 1, param_signal_6 }; - static const QUParameter param_signal_7[] = { - { "data", &static_QUType_ptr, "KviDataBuffer", QUParameter::In } + static const TQUMethod signal_6 = {"data", 1, param_signal_6 }; + static const TQUParameter param_signal_7[] = { + { "data", &static_TQUType_ptr, "KviDataBuffer", TQUParameter::In } }; - static const QUMethod signal_7 = {"binaryData", 1, param_signal_7 }; - static const QUParameter param_signal_8[] = { - { "hdr", &static_QUType_ptr, "KviPointerHashTable", QUParameter::In } + static const TQUMethod signal_7 = {"binaryData", 1, param_signal_7 }; + static const TQUParameter param_signal_8[] = { + { "hdr", &static_TQUType_ptr, "KviPointerHashTable", TQUParameter::In } }; - static const QUMethod signal_8 = {"header", 1, param_signal_8 }; - static const QUParameter param_signal_9[] = { - { "request", &static_QUType_varptr, "\x04", QUParameter::In } + static const TQUMethod signal_8 = {"header", 1, param_signal_8 }; + static const TQUParameter param_signal_9[] = { + { "request", &static_TQUType_varptr, "\x04", TQUParameter::In } }; - static const QUMethod signal_9 = {"requestSent", 1, param_signal_9 }; - static const QMetaData signal_tbl[] = { - { "resolvingHost(const QString&)", &signal_0, QMetaData::Public }, - { "contactingHost(const QString&)", &signal_1, QMetaData::Public }, - { "connectionEstabilished()", &signal_2, QMetaData::Public }, - { "receivedResponse(const QString&)", &signal_3, QMetaData::Public }, - { "terminated(bool)", &signal_4, QMetaData::Public }, - { "status(const QString&)", &signal_5, QMetaData::Public }, - { "data(const KviStr&)", &signal_6, QMetaData::Public }, - { "binaryData(const KviDataBuffer&)", &signal_7, QMetaData::Public }, - { "header(KviPointerHashTable*)", &signal_8, QMetaData::Public }, - { "requestSent(const QStringList&)", &signal_9, QMetaData::Public } + static const TQUMethod signal_9 = {"requestSent", 1, param_signal_9 }; + static const TQMetaData signal_tbl[] = { + { "resolvingHost(const TQString&)", &signal_0, TQMetaData::Public }, + { "contactingHost(const TQString&)", &signal_1, TQMetaData::Public }, + { "connectionEstabilished()", &signal_2, TQMetaData::Public }, + { "receivedResponse(const TQString&)", &signal_3, TQMetaData::Public }, + { "terminated(bool)", &signal_4, TQMetaData::Public }, + { "status(const TQString&)", &signal_5, TQMetaData::Public }, + { "data(const KviStr&)", &signal_6, TQMetaData::Public }, + { "binaryData(const KviDataBuffer&)", &signal_7, TQMetaData::Public }, + { "header(KviPointerHashTable*)", &signal_8, TQMetaData::Public }, + { "requestSent(const TQStringList&)", &signal_9, TQMetaData::Public } }; - metaObj = QMetaObject::new_metaobject( - "KviHttpRequest", parentObject, + metaObj = TQMetaObject::new_metaobject( + "KviHttpRequest", tqparentObject, slot_tbl, 2, signal_tbl, 10, -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES 0, 0, 0, 0, -#endif // QT_NO_PROPERTIES +#endif // TQT_NO_PROPERTIES 0, 0 ); cleanUp_KviHttpRequest.setMetaObject( metaObj ); return metaObj; } -void* KviHttpRequest::qt_cast( const char* clname ) +void* KviHttpRequest::tqqt_cast( const char* clname ) { if ( !qstrcmp( clname, "KviHttpRequest" ) ) return this; if ( !qstrcmp( clname, "KviHeapObject" ) ) return (KviHeapObject*)this; - return QObject::qt_cast( clname ); + return TQObject::tqqt_cast( clname ); } -// SIGNAL resolvingHost -void KviHttpRequest::resolvingHost( const QString& t0 ) +// TQT_SIGNAL resolvingHost +void KviHttpRequest::resolvingHost( const TQString& t0 ) { activate_signal( staticMetaObject()->signalOffset() + 0, t0 ); } -// SIGNAL contactingHost -void KviHttpRequest::contactingHost( const QString& t0 ) +// TQT_SIGNAL contactingHost +void KviHttpRequest::contactingHost( const TQString& t0 ) { activate_signal( staticMetaObject()->signalOffset() + 1, t0 ); } -// SIGNAL connectionEstabilished +// TQT_SIGNAL connectionEstabilished void KviHttpRequest::connectionEstabilished() { activate_signal( staticMetaObject()->signalOffset() + 2 ); } -// SIGNAL receivedResponse -void KviHttpRequest::receivedResponse( const QString& t0 ) +// TQT_SIGNAL receivedResponse +void KviHttpRequest::receivedResponse( const TQString& t0 ) { activate_signal( staticMetaObject()->signalOffset() + 3, t0 ); } -// SIGNAL terminated +// TQT_SIGNAL terminated void KviHttpRequest::terminated( bool t0 ) { activate_signal_bool( staticMetaObject()->signalOffset() + 4, t0 ); } -// SIGNAL status -void KviHttpRequest::status( const QString& t0 ) +// TQT_SIGNAL status +void KviHttpRequest::status( const TQString& t0 ) { activate_signal( staticMetaObject()->signalOffset() + 5, t0 ); } -#include -#include +#include +#include -// SIGNAL data +// TQT_SIGNAL data void KviHttpRequest::data( const KviStr& t0 ) { if ( signalsBlocked() ) return; - QConnectionList *clist = receivers( staticMetaObject()->signalOffset() + 6 ); + TQConnectionList *clist = tqreceivers( staticMetaObject()->signalOffset() + 6 ); if ( !clist ) return; - QUObject o[2]; - static_QUType_ptr.set(o+1,&t0); + TQUObject o[2]; + static_TQUType_ptr.set(o+1,&t0); activate_signal( clist, o ); } -// SIGNAL binaryData +// TQT_SIGNAL binaryData void KviHttpRequest::binaryData( const KviDataBuffer& t0 ) { if ( signalsBlocked() ) return; - QConnectionList *clist = receivers( staticMetaObject()->signalOffset() + 7 ); + TQConnectionList *clist = tqreceivers( staticMetaObject()->signalOffset() + 7 ); if ( !clist ) return; - QUObject o[2]; - static_QUType_ptr.set(o+1,&t0); + TQUObject o[2]; + static_TQUType_ptr.set(o+1,&t0); activate_signal( clist, o ); } -// SIGNAL header +// TQT_SIGNAL header void KviHttpRequest::header( KviPointerHashTable* t0 ) { if ( signalsBlocked() ) return; - QConnectionList *clist = receivers( staticMetaObject()->signalOffset() + 8 ); + TQConnectionList *clist = tqreceivers( staticMetaObject()->signalOffset() + 8 ); if ( !clist ) return; - QUObject o[2]; - static_QUType_ptr.set(o+1,t0); + TQUObject o[2]; + static_TQUType_ptr.set(o+1,t0); activate_signal( clist, o ); } -// SIGNAL requestSent -void KviHttpRequest::requestSent( const QStringList& t0 ) +// TQT_SIGNAL requestSent +void KviHttpRequest::requestSent( const TQStringList& t0 ) { if ( signalsBlocked() ) return; - QConnectionList *clist = receivers( staticMetaObject()->signalOffset() + 9 ); + TQConnectionList *clist = tqreceivers( staticMetaObject()->signalOffset() + 9 ); if ( !clist ) return; - QUObject o[2]; - static_QUType_varptr.set(o+1,&t0); + TQUObject o[2]; + static_TQUType_varptr.set(o+1,&t0); activate_signal( clist, o ); } -bool KviHttpRequest::qt_invoke( int _id, QUObject* _o ) +bool KviHttpRequest::qt_invoke( int _id, TQUObject* _o ) { switch ( _id - staticMetaObject()->slotOffset() ) { - case 0: dnsLookupDone((KviDns*)static_QUType_ptr.get(_o+1)); break; + case 0: dnsLookupDone((KviDns*)static_TQUType_ptr.get(_o+1)); break; case 1: haveServerIp(); break; default: - return QObject::qt_invoke( _id, _o ); + return TQObject::qt_invoke( _id, _o ); } return TRUE; } -bool KviHttpRequest::qt_emit( int _id, QUObject* _o ) +bool KviHttpRequest::qt_emit( int _id, TQUObject* _o ) { switch ( _id - staticMetaObject()->signalOffset() ) { - case 0: resolvingHost((const QString&)static_QUType_QString.get(_o+1)); break; - case 1: contactingHost((const QString&)static_QUType_QString.get(_o+1)); break; + case 0: resolvingHost((const TQString&)static_TQUType_TQString.get(_o+1)); break; + case 1: contactingHost((const TQString&)static_TQUType_TQString.get(_o+1)); break; case 2: connectionEstabilished(); break; - case 3: receivedResponse((const QString&)static_QUType_QString.get(_o+1)); break; - case 4: terminated((bool)static_QUType_bool.get(_o+1)); break; - case 5: status((const QString&)static_QUType_QString.get(_o+1)); break; - case 6: data((const KviStr&)*((const KviStr*)static_QUType_ptr.get(_o+1))); break; - case 7: binaryData((const KviDataBuffer&)*((const KviDataBuffer*)static_QUType_ptr.get(_o+1))); break; - case 8: header((KviPointerHashTable*)static_QUType_ptr.get(_o+1)); break; - case 9: requestSent((const QStringList&)*((const QStringList*)static_QUType_ptr.get(_o+1))); break; + case 3: receivedResponse((const TQString&)static_TQUType_TQString.get(_o+1)); break; + case 4: terminated((bool)static_TQUType_bool.get(_o+1)); break; + case 5: status((const TQString&)static_TQUType_TQString.get(_o+1)); break; + case 6: data((const KviStr&)*((const KviStr*)static_TQUType_ptr.get(_o+1))); break; + case 7: binaryData((const KviDataBuffer&)*((const KviDataBuffer*)static_TQUType_ptr.get(_o+1))); break; + case 8: header((KviPointerHashTable*)static_TQUType_ptr.get(_o+1)); break; + case 9: requestSent((const TQStringList&)*((const TQStringList*)static_TQUType_ptr.get(_o+1))); break; default: - return QObject::qt_emit(_id,_o); + return TQObject::qt_emit(_id,_o); } return TRUE; } -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES -bool KviHttpRequest::qt_property( int id, int f, QVariant* v) +bool KviHttpRequest::qt_property( int id, int f, TQVariant* v) { - return QObject::qt_property( id, f, v); + return TQObject::qt_property( id, f, v); } -bool KviHttpRequest::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; } -#endif // QT_NO_PROPERTIES +bool KviHttpRequest::qt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; } +#endif // TQT_NO_PROPERTIES diff --git a/src/kvilib/system/kvi_locale.cpp b/src/kvilib/system/kvi_locale.cpp index f49eabe4..296db7be 100644 --- a/src/kvilib/system/kvi_locale.cpp +++ b/src/kvilib/system/kvi_locale.cpp @@ -33,12 +33,12 @@ #define _KVI_LOCALE_CPP_ #include "kvi_locale.h" -#include //for debug() -#include -#include +#include //for debug() +#include +#include #ifdef COMPILE_USE_QT4 - #include + #include #endif #include "kvi_string.h" @@ -53,7 +53,7 @@ KVILIB_API KviMessageCatalogue * g_pMainCatalogue = 0; static KviStr g_szLang; static KviTranslator * g_pTranslator = 0; static KviPointerHashTable * g_pCatalogueDict = 0; -static QTextCodec * g_pUtf8TextCodec = 0; +static TQTextCodec * g_pUtf8TextCodec = 0; ///////////////////////////////////////////////////////////////////////////////////////////////////// @@ -271,27 +271,27 @@ static bool g_utf8_validate (const char *str, /////////////////////////////////////////////////////////////////////////////////////////////// -class KviSmartTextCodec : public QTextCodec +class KviSmartTextCodec : public TQTextCodec { protected: - KviQCString m_szName; - QTextCodec * m_pRecvCodec; - QTextCodec * m_pSendCodec; + KviTQCString m_szName; + TQTextCodec * m_pRecvCodec; + TQTextCodec * m_pSendCodec; public: KviSmartTextCodec(const char * szName,const char * szChildCodecName,bool bSendInUtf8) - : QTextCodec() + : TQTextCodec() { m_szName = szName; if(!g_pUtf8TextCodec) { - g_pUtf8TextCodec = QTextCodec::codecForName("UTF-8"); + g_pUtf8TextCodec = TQTextCodec::codecForName("UTF-8"); if(!g_pUtf8TextCodec) { debug("Can't find the global utf8 text codec!"); - g_pUtf8TextCodec = QTextCodec::codecForLocale(); // try anything else... + g_pUtf8TextCodec = TQTextCodec::codecForLocale(); // try anything else... } } - m_pRecvCodec = QTextCodec::codecForName(szChildCodecName); + m_pRecvCodec = TQTextCodec::codecForName(szChildCodecName); if(!m_pRecvCodec) { debug("Can't find the codec for name %s (composite codec creation)",szName); @@ -308,13 +308,13 @@ public: virtual int mibEnum () const { return 0; }; #ifdef COMPILE_USE_QT4 - virtual QByteArray name() const { return m_szName; }; + virtual TQByteArray name() const { return m_szName; }; protected: - virtual QByteArray convertFromUnicode(const QChar * input,int number,ConverterState * state) const + virtual TQByteArray convertFromUnicode(const TQChar * input,int number,ConverterState * state) const { return m_pSendCodec->fromUnicode(input,number,state); } - virtual QString convertToUnicode(const char * chars,int len,ConverterState * state) const + virtual TQString convertToUnicode(const char * chars,int len,ConverterState * state) const { if(g_utf8_validate(chars,len,NULL))return g_pUtf8TextCodec->toUnicode(chars,len,state); return m_pRecvCodec->toUnicode(chars,len,state); @@ -323,43 +323,43 @@ protected: public: virtual const char * mimeName () const { return m_pRecvCodec->mimeName(); }; virtual const char * name () const { return m_szName.data(); }; - virtual QTextDecoder * makeDecoder () const { return m_pRecvCodec->makeDecoder(); }; - virtual QTextEncoder * makeEncoder () const { return m_pSendCodec->makeEncoder(); }; - QCString fromUnicode (const QString & uc) const { return m_pSendCodec->fromUnicode(uc); }; - virtual QCString fromUnicode (const QString & uc,int & lenInOut) const { return m_pSendCodec->fromUnicode(uc,lenInOut); }; - QString toUnicode(const char * chars) const + virtual TQTextDecoder * makeDecoder () const { return m_pRecvCodec->makeDecoder(); }; + virtual TQTextEncoder * makeEncoder () const { return m_pSendCodec->makeEncoder(); }; + TQCString fromUnicode (const TQString & uc) const { return m_pSendCodec->fromUnicode(uc); }; + virtual TQCString fromUnicode (const TQString & uc,int & lenInOut) const { return m_pSendCodec->fromUnicode(uc,lenInOut); }; + TQString toUnicode(const char * chars) const { if(g_utf8_validate(chars,-1,NULL))return g_pUtf8TextCodec->toUnicode(chars); return m_pRecvCodec->toUnicode(chars); }; - virtual QString toUnicode(const char * chars,int len) const + virtual TQString toUnicode(const char * chars,int len) const { if(g_utf8_validate(chars,len,NULL))return g_pUtf8TextCodec->toUnicode(chars,len); return m_pRecvCodec->toUnicode(chars,len); }; - QString toUnicode(const QByteArray & a,int len) const + TQString toUnicode(const TQByteArray & a,int len) const { if(g_utf8_validate(a.data(),len,NULL))return g_pUtf8TextCodec->toUnicode(a,len); return m_pRecvCodec->toUnicode(a,len); }; - QString toUnicode(const QByteArray & a) const + TQString toUnicode(const TQByteArray & a) const { if(g_utf8_validate(a.data(),a.size(),NULL))return g_pUtf8TextCodec->toUnicode(a); return m_pRecvCodec->toUnicode(a); }; - QString toUnicode(const QCString & a,int len) const + TQString toUnicode(const TQCString & a,int len) const { if(g_utf8_validate(a.data(),len,NULL))return g_pUtf8TextCodec->toUnicode(a,len); return m_pRecvCodec->toUnicode(a,len); }; - QString toUnicode(const QCString & a) const + TQString toUnicode(const TQCString & a) const { if(g_utf8_validate(a.data(),-1,NULL))return g_pUtf8TextCodec->toUnicode(a); return m_pRecvCodec->toUnicode(a); }; - virtual bool canEncode(QChar ch) const { return m_pSendCodec->canEncode(ch); }; - virtual bool canEncode(const QString &s) const { return m_pSendCodec->canEncode(s); }; + virtual bool canEncode(TQChar ch) const { return m_pSendCodec->canEncode(ch); }; + virtual bool canEncode(const TQString &s) const { return m_pSendCodec->canEncode(s); }; virtual int heuristicContentMatch(const char * chars,int len) const { int iii = g_pUtf8TextCodec->heuristicContentMatch(chars,len); @@ -474,7 +474,7 @@ int kvi_getFirstBiggerPrime(int number) KviMessageCatalogue::KviMessageCatalogue() { //m_uEncoding = 0; - m_pTextCodec = QTextCodec::codecForLocale(); + m_pTextCodec = TQTextCodec::codecForLocale(); //m_pMessages = new KviPointerHashTable(1123,true,false); // dictSize, case sensitive , don't copy keys m_pMessages = new KviPointerHashTable(32,true,false); // dictSize, case sensitive , don't copy keys @@ -487,15 +487,15 @@ KviMessageCatalogue::~KviMessageCatalogue() delete m_pMessages; } -bool KviMessageCatalogue::load(const QString& name) +bool KviMessageCatalogue::load(const TQString& name) { - QString szCatalogueFile(name); + TQString szCatalogueFile(name); // Try to load the header KviFile f(szCatalogueFile); if(!f.openForReading()) { - debug("[KviLocale]: Failed to open the messages file %s: probably doesn't exist",KviQString::toUtf8(szCatalogueFile).data()); + debug("[KviLocale]: Failed to open the messages file %s: probably doesn't exist",KviTQString::toUtf8(szCatalogueFile).data()); return false; } @@ -503,7 +503,7 @@ bool KviMessageCatalogue::load(const QString& name) if(f.readBlock((char *)&hdr,sizeof(GnuMoFileHeader)) < (int)sizeof(GnuMoFileHeader)) { - debug("KviLocale: Failed to read header of %s",KviQString::toUtf8(szCatalogueFile).data()); + debug("KviLocale: Failed to read header of %s",KviTQString::toUtf8(szCatalogueFile).data()); f.close(); return false; } @@ -514,10 +514,10 @@ bool KviMessageCatalogue::load(const QString& name) { if(hdr.magic == KVI_LOCALE_MAGIC_SWAPPED) { - debug("KviLocale: Swapped magic for file %s: swapping data too",KviQString::toUtf8(szCatalogueFile).data()); + debug("KviLocale: Swapped magic for file %s: swapping data too",KviTQString::toUtf8(szCatalogueFile).data()); bMustSwap = true; } else { - debug("KviLocale: Bad locale magic for file %s: not a *.mo file ?",KviQString::toUtf8(szCatalogueFile).data()); + debug("KviLocale: Bad locale magic for file %s: not a *.mo file ?",KviTQString::toUtf8(szCatalogueFile).data()); f.close(); return false; } @@ -525,7 +525,7 @@ bool KviMessageCatalogue::load(const QString& name) if(KVI_SWAP_IF_NEEDED(bMustSwap,hdr.revision) != MO_REVISION_NUMBER) { - debug("KviLocale: Invalid *.mo file revision number for file %s",KviQString::toUtf8(szCatalogueFile).data()); + debug("KviLocale: Invalid *.mo file revision number for file %s",KviTQString::toUtf8(szCatalogueFile).data()); f.close(); return false; } @@ -534,7 +534,7 @@ bool KviMessageCatalogue::load(const QString& name) if(numberOfStrings <= 0) { - debug("KviLocale: No translated messages found in file %s",KviQString::toUtf8(szCatalogueFile).data()); + debug("KviLocale: No translated messages found in file %s",KviTQString::toUtf8(szCatalogueFile).data()); f.close(); return false; } @@ -554,7 +554,7 @@ bool KviMessageCatalogue::load(const QString& name) // FIXME: maybe read it in blocks eh ? if(f.readBlock(buffer,fSize) < (int)fSize) { - debug("KviLocale: Error while reading the translation file %s",KviQString::toUtf8(szCatalogueFile).data()); + debug("KviLocale: Error while reading the translation file %s",KviTQString::toUtf8(szCatalogueFile).data()); kvi_free(buffer); f.close(); return false; @@ -563,7 +563,7 @@ bool KviMessageCatalogue::load(const QString& name) // Check for broken *.mo files if(fSize < (24 + (sizeof(GnuMoStringDescriptor) * numberOfStrings))) { - debug("KviLocale: Broken translation file %s (too small for all descriptors)",KviQString::toUtf8(szCatalogueFile).data()); + debug("KviLocale: Broken translation file %s (too small for all descriptors)",KviTQString::toUtf8(szCatalogueFile).data()); kvi_free(buffer); f.close(); return false; @@ -578,7 +578,7 @@ bool KviMessageCatalogue::load(const QString& name) if(fSize < (unsigned int)expectedFileSize) { - debug("KviLocale: Broken translation file %s (too small for all the message strings)",KviQString::toUtf8(szCatalogueFile).data()); + debug("KviLocale: Broken translation file %s (too small for all the message strings)",KviTQString::toUtf8(szCatalogueFile).data()); kvi_free(buffer); f.close(); return false; @@ -609,7 +609,7 @@ bool KviMessageCatalogue::load(const QString& name) KVI_SWAP_IF_NEEDED(bMustSwap,transDescriptor[i].length)); // In some (or all?) *.mo files the first string - // is zero bytes long and the translated one contains + // is zero bytes long and the translated one tqcontains // informations about the translation if(e->m_szKey.len() == 0) { @@ -629,7 +629,7 @@ bool KviMessageCatalogue::load(const QString& name) // find out the text encoding , if possible if(szHeader.hasData()) { - // find "charset=*\n" + // tqfind "charset=*\n" int idx = szHeader.findFirstIdx("charset="); if(idx != -1) { @@ -641,7 +641,7 @@ bool KviMessageCatalogue::load(const QString& name) { debug("Can't find the codec for charset=%s",szHeader.ptr()); debug("Falling back to codecForLocale()"); - m_pTextCodec = QTextCodec::codecForLocale(); + m_pTextCodec = TQTextCodec::codecForLocale(); } } } @@ -650,7 +650,7 @@ bool KviMessageCatalogue::load(const QString& name) { debug("The message catalogue does not have a \"charset\" header"); debug("Assuming utf8"); // FIXME: or codecForLocale() ? - m_pTextCodec = QTextCodec::codecForName("UTF-8"); + m_pTextCodec = TQTextCodec::codecForName("UTF-8"); } return true; @@ -658,25 +658,25 @@ bool KviMessageCatalogue::load(const QString& name) const char * KviMessageCatalogue::translate(const char *text) { - KviTranslationEntry * aux = m_pMessages->find(text); + KviTranslationEntry * aux = m_pMessages->tqfind(text); if(aux)return aux->m_szEncodedTranslation.ptr(); return text; } -const QString & KviMessageCatalogue::translateToQString(const char *text) +const TQString & KviMessageCatalogue::translateToTQString(const char *text) { - KviTranslationEntry * aux = m_pMessages->find(text); + KviTranslationEntry * aux = m_pMessages->tqfind(text); if(aux) { - if(aux->m_pQTranslation)return *(aux->m_pQTranslation); - aux->m_pQTranslation = new QString(m_pTextCodec->toUnicode(aux->m_szEncodedTranslation.ptr())); - return *(aux->m_pQTranslation); + if(aux->m_pTQTranslation)return *(aux->m_pTQTranslation); + aux->m_pTQTranslation = new TQString(m_pTextCodec->toUnicode(aux->m_szEncodedTranslation.ptr())); + return *(aux->m_pTQTranslation); } // no translation is available: let's avoid continous string decoding aux = new KviTranslationEntry(text); m_pMessages->insert(aux->m_szKey.ptr(),aux); - aux->m_pQTranslation = new QString(m_pTextCodec->toUnicode(aux->m_szEncodedTranslation.ptr())); - return *(aux->m_pQTranslation); + aux->m_pTQTranslation = new TQString(m_pTextCodec->toUnicode(aux->m_szEncodedTranslation.ptr())); + return *(aux->m_pTQTranslation); } @@ -684,7 +684,7 @@ const QString & KviMessageCatalogue::translateToQString(const char *text) namespace KviLocale { -#ifndef QT_NO_BIG_CODECS +#ifndef TQT_NO_BIG_CODECS #define NUM_ENCODINGS 109 #else #define NUM_ENCODINGS 85 @@ -717,7 +717,7 @@ namespace KviLocale { "CP-1255" , 0 , 0 , "Hebrew, CP" }, { "CP-1254" , 0 , 0 , "Turkish, CP" }, { "TIS-620" , 0 , 0 , "Thai" }, -#ifndef QT_NO_BIG_CODECS +#ifndef TQT_NO_BIG_CODECS { "Big5" , 0 , 0 , "Chinese Traditional" }, { "Big5-HKSCS" , 0 , 0 , "Chinese Traditional, Hong Kong" }, { "GB18030" , 0 , 0 , "Chinese Simplified" }, @@ -757,7 +757,7 @@ namespace KviLocale { "CP-1255 [UTF-8]" , 1 , 0 , "I: 8-bit Unicode / Hebrew, CP, O: Hebrew, CP" }, { "CP-1254 [UTF-8]" , 1 , 0 , "I: 8-bit Unicode / Turkish, CP, O: Turkish, CP" }, { "TIS-620 [UTF-8]" , 1 , 0 , "I: 8-bit Unicode / Thai, O: Thai" }, -#ifndef QT_NO_BIG_CODECS +#ifndef TQT_NO_BIG_CODECS { "Big5 [UTF-8]" , 1 , 0 , "I: 8-bit Unicode / Chinese Traditional, O: Chinese Traditional" }, { "Big5-HKSCS [UTF-8]" , 1 , 0 , "I: 8-bit Unicode / Chinese Traditional, Hong Kong, O: Chinese Traditional, Hong Kong" }, { "GB18030 [UTF-8]" , 1 , 0 , "I: 8-bit Unicode / Chinese Simplified, O: Chinese Simplified" }, @@ -802,7 +802,7 @@ namespace KviLocale { "UTF-8 [CP-1254]" , 1 , 1 , "I: 8-bit Unicode / Turkish, CP, O: 8-bit Unicode" }, { "UTF-8 [TIS-620]" , 1 , 1 , "I: 8-bit Unicode / Thai, O: 8-bit Unicode" }, -#ifndef QT_NO_BIG_CODECS +#ifndef TQT_NO_BIG_CODECS { "UTF-8 [Big5]" , 1 , 1 , "I: 8-bit Unicode / Chinese Traditional, O: 8-bit Unicode" }, { "UTF-8 [Big5-HKSCS]" , 1 , 1 , "I: 8-bit Unicode / Chinese Traditional, Hong Kong, O: 8-bit Unicode" }, @@ -831,14 +831,14 @@ namespace KviLocale return &(supported_encodings[iIdx]); } - QTextCodec * codecForName(const char * szName) + TQTextCodec * codecForName(const char * szName) { KviStr szTmp = szName; int idx = szTmp.findFirstIdx('['); if(idx != -1) { // composite codec: either UTF-8 [child codec] or child codec [UTF-8] - KviSmartTextCodec * c = g_pSmartCodecDict->find(szName); + KviSmartTextCodec * c = g_pSmartCodecDict->tqfind(szName); if(c)return c; @@ -855,13 +855,13 @@ namespace KviLocale } if(c->ok()) { - g_pSmartCodecDict->replace(szName,c); + g_pSmartCodecDict->tqreplace(szName,c); return c; } else { delete c; } } - return QTextCodec::codecForName(szName); + return TQTextCodec::codecForName(szName); } const KviStr & localeName() @@ -869,12 +869,12 @@ namespace KviLocale return g_szLang; } - bool loadCatalogue(const QString &name,const QString &szLocaleDir) + bool loadCatalogue(const TQString &name,const TQString &szLocaleDir) { //debug("Looking up catalogue %s",name); - if(g_pCatalogueDict->find(KviQString::toUtf8(name).data()))return true; // already loaded + if(g_pCatalogueDict->tqfind(KviTQString::toUtf8(name).data()))return true; // already loaded - QString szBuffer; + TQString szBuffer; if(findCatalogue(szBuffer,name,szLocaleDir)) { @@ -882,27 +882,27 @@ namespace KviLocale if(c->load(szBuffer)) { //debug("KviLocale: loaded catalogue %s",name); - g_pCatalogueDict->insert(KviQString::toUtf8(name).data(),c); + g_pCatalogueDict->insert(KviTQString::toUtf8(name).data(),c); return true; } } return false; } - bool unloadCatalogue(const QString &name) + bool unloadCatalogue(const TQString &name) { //debug("Unloading catalogue : %s",name); - return g_pCatalogueDict->remove(KviQString::toUtf8(name).data()); + return g_pCatalogueDict->remove(KviTQString::toUtf8(name).data()); } - bool findCatalogue(QString &szBuffer,const QString& name,const QString& szLocaleDir) + bool findCatalogue(TQString &szBuffer,const TQString& name,const TQString& szLocaleDir) { KviStr szLocale = g_szLang; - QString szLocDir = szLocaleDir; - KviQString::ensureLastCharIs(szLocDir,KVI_PATH_SEPARATOR_CHAR); + TQString szLocDir = szLocaleDir; + KviTQString::ensureLastCharIs(szLocDir,KVI_PATH_SEPARATOR_CHAR); - KviQString::sprintf(szBuffer,"%Q%Q_%s.mo",&szLocDir,&name,szLocale.ptr()); + KviTQString::sprintf(szBuffer,"%Q%TQ_%s.mo",&szLocDir,&name,szLocale.ptr()); if(KviFileUtils::fileExists(szBuffer))return true; @@ -912,7 +912,7 @@ namespace KviLocale // kill them szLocale.cutFromFirst('.'); - KviQString::sprintf(szBuffer,"%Q%Q_%s.mo",&szLocDir,&name,szLocale.ptr()); + KviTQString::sprintf(szBuffer,"%Q%TQ_%s.mo",&szLocDir,&name,szLocale.ptr()); if(KviFileUtils::fileExists(szBuffer))return true; } @@ -921,7 +921,7 @@ namespace KviLocale // things like @euro ? // kill them szLocale.cutFromFirst('@'); - KviQString::sprintf(szBuffer,"%Q%Q_%s.mo",&szLocDir,&name,szLocale.ptr()); + KviTQString::sprintf(szBuffer,"%Q%TQ_%s.mo",&szLocDir,&name,szLocale.ptr()); if(KviFileUtils::fileExists(szBuffer))return true; } @@ -930,13 +930,13 @@ namespace KviLocale // things like en_GB // kill them szLocale.cutFromFirst('_'); - KviQString::sprintf(szBuffer,"%Q%Q_%s.mo",&szLocDir,&name,szLocale.ptr()); + KviTQString::sprintf(szBuffer,"%Q%TQ_%s.mo",&szLocDir,&name,szLocale.ptr()); if(KviFileUtils::fileExists(szBuffer))return true; } // try the lower case version too szLocale.toLower(); - KviQString::sprintf(szBuffer,"%Q%Q_%s.mo",&szLocDir,&name,szLocale.ptr()); + KviTQString::sprintf(szBuffer,"%Q%TQ_%s.mo",&szLocDir,&name,szLocale.ptr()); if(KviFileUtils::fileExists(szBuffer))return true; return false; @@ -952,26 +952,26 @@ namespace KviLocale // translation map was sucesfully loaded // - void init(QApplication * app,const QString &localeDir) + void init(TQApplication * app,const TQString &localeDir) { // first of all try to find out the current locale g_szLang=""; #ifdef COMPILE_USE_QT4 - QString szLangFile=QString("%1/.kvirc_force_locale").arg(QDir::homePath()); + TQString szLangFile=TQString("%1/.kvirc_force_locale").tqarg(TQDir::homePath()); #else - QString szLangFile=QString("%1/.kvirc_force_locale").arg(QDir::homeDirPath()); + TQString szLangFile=TQString("%1/.kvirc_force_locale").tqarg(TQDir::homeDirPath()); #endif if(KviFileUtils::fileExists(szLangFile)) { - QString szTmp; + TQString szTmp; KviFileUtils::readFile(szLangFile,szTmp); g_szLang=szTmp; } if(g_szLang.isEmpty())g_szLang = kvi_getenv("KVIRC_LANG"); #ifdef COMPILE_USE_QT4 - if(g_szLang.isEmpty())g_szLang = QLocale::system().name(); + if(g_szLang.isEmpty())g_szLang = TQLocale::system().name(); #else - if(g_szLang.isEmpty())g_szLang = QTextCodec::locale(); + if(g_szLang.isEmpty())g_szLang = TQTextCodec::locale(); #endif if(g_szLang.isEmpty())g_szLang = kvi_getenv("LC_MESSAGES"); if(g_szLang.isEmpty())g_szLang = kvi_getenv("LANG"); @@ -986,17 +986,17 @@ namespace KviLocale // the smart codec dict g_pSmartCodecDict = new KviPointerHashTable; - // the Qt docs explicitly state that we shouldn't delete + // the TQt docs explicitly state that we shouldn't delete // the codecs by ourselves... g_pSmartCodecDict->setAutoDelete(false); if(g_szLang.hasData()) { - QString szBuffer; + TQString szBuffer; if(findCatalogue(szBuffer,"kvirc",localeDir)) { g_pMainCatalogue->load(szBuffer); - g_pTranslator = new KviTranslator(app,"kvirc_translator"); + g_pTranslator = new KviTranslator(TQT_TQOBJECT(app),"kvirc_translator"); app->installTranslator(g_pTranslator); } else { KviStr szTmp = g_szLang; @@ -1019,11 +1019,11 @@ namespace KviLocale } } - //g_pTextCodec = QTextCodec::codecForLocale(); - //if(!g_pTextCodec)g_pTextCodec = QTextCodec::codecForLocale(); + //g_pTextCodec = TQTextCodec::codecForLocale(); + //if(!g_pTextCodec)g_pTextCodec = TQTextCodec::codecForLocale(); } - void done(QApplication * app) + void done(TQApplication * app) { delete g_pMainCatalogue; delete g_pCatalogueDict; @@ -1039,9 +1039,9 @@ namespace KviLocale } } - KviMessageCatalogue * getLoadedCatalogue(const QString& name) + KviMessageCatalogue * getLoadedCatalogue(const TQString& name) { - return g_pCatalogueDict->find(KviQString::toUtf8(name).data()); + return g_pCatalogueDict->tqfind(KviTQString::toUtf8(name).data()); } @@ -1049,7 +1049,7 @@ namespace KviLocale { if(context) { - KviMessageCatalogue * c = g_pCatalogueDict->find(context); + KviMessageCatalogue * c = g_pCatalogueDict->tqfind(context); if(!c) { // FIXME: Should really try to load the catalogue here! @@ -1061,28 +1061,28 @@ namespace KviLocale return g_pMainCatalogue->translate(text); } - const QString & translateToQString(const char * text,const char * context) + const TQString & translateToTQString(const char * text,const char * context) { if(context) { - KviMessageCatalogue * c = g_pCatalogueDict->find(context); + KviMessageCatalogue * c = g_pCatalogueDict->tqfind(context); if(!c) { // FIXME: Should really try to load the catalogue here! c = new KviMessageCatalogue(); g_pCatalogueDict->insert(context,c); } - return c->translateToQString(text); + return c->translateToTQString(text); } - return g_pMainCatalogue->translateToQString(text); + return g_pMainCatalogue->translateToTQString(text); } }; -KviTranslator::KviTranslator(QObject * par,const char * nam) +KviTranslator::KviTranslator(TQObject * par,const char * nam) #ifdef COMPILE_USE_QT4 -: QTranslator(par) +: TQTranslator(par) #else -: QTranslator(par,nam) +: TQTranslator(par,nam) #endif { } @@ -1092,24 +1092,24 @@ KviTranslator::~KviTranslator() } #ifdef COMPILE_USE_QT4 -QString KviTranslator::translate(const char *context,const char * message,const char * comment) const +TQString KviTranslator::translate(const char *context,const char * message,const char * comment) const { // we ignore contexts and comments for qt translations - return g_pMainCatalogue->translateToQString(message); + return g_pMainCatalogue->translateToTQString(message); } #endif -QString KviTranslator::find(const char *context,const char * message) const +TQString KviTranslator::tqfind(const char *context,const char * message) const { // we ignore contexts for qt translations - return g_pMainCatalogue->translateToQString(message); + return g_pMainCatalogue->translateToTQString(message); } #ifndef COMPILE_USE_QT4 -QTranslatorMessage KviTranslator::findMessage(const char * context,const char * sourceText,const char * comment) const +TQTranslatorMessage KviTranslator::findMessage(const char * context,const char * sourceText,const char * comment) const { // we ignore contexts for qt translations - return QTranslatorMessage(context,sourceText,comment,g_pMainCatalogue->translateToQString(sourceText)); + return TQTranslatorMessage(context,sourceText,comment,g_pMainCatalogue->translateToTQString(sourceText)); } #endif @@ -1118,7 +1118,7 @@ QTranslatorMessage KviTranslator::findMessage(const char * context,const char * // a fake table that will force these translations // to be included in the *.pot file -static QString fake_translations_table[]= +static TQString fake_translations_table[]= { // global __tr2qs("OK"), diff --git a/src/kvilib/system/kvi_locale.h b/src/kvilib/system/kvi_locale.h index bc3ed8eb..27b666b7 100644 --- a/src/kvilib/system/kvi_locale.h +++ b/src/kvilib/system/kvi_locale.h @@ -31,9 +31,9 @@ #include "kvi_string.h" #include "kvi_pointerhashtable.h" -#include +#include -class QTextCodec; +class TQTextCodec; class KviMessageCatalogue; namespace KviLocale @@ -49,16 +49,16 @@ namespace KviLocale // you MUST start iterating from 0 and terminate when // you get an entry with a NULL szName KVILIB_API EncodingDescription * encodingDescription(int iIdx); - KVILIB_API QTextCodec * codecForName(const char * szName); + KVILIB_API TQTextCodec * codecForName(const char * szName); KVILIB_API const KviStr & localeName(); - KVILIB_API bool findCatalogue(QString &szBuffer,const QString& name,const QString& szLocaleDir); - KVILIB_API bool loadCatalogue(const QString& name,const QString& szLocaleDir); - KVILIB_API KviMessageCatalogue * getLoadedCatalogue(const QString& name); - KVILIB_API bool unloadCatalogue(const QString& name); - KVILIB_API void init(QApplication * app,const QString& localeDir); - KVILIB_API void done(QApplication * app); + KVILIB_API bool findCatalogue(TQString &szBuffer,const TQString& name,const TQString& szLocaleDir); + KVILIB_API bool loadCatalogue(const TQString& name,const TQString& szLocaleDir); + KVILIB_API KviMessageCatalogue * getLoadedCatalogue(const TQString& name); + KVILIB_API bool unloadCatalogue(const TQString& name); + KVILIB_API void init(TQApplication * app,const TQString& localeDir); + KVILIB_API void done(TQApplication * app); KVILIB_API const char * translate(const char * text,const char * context); - KVILIB_API const QString & translateToQString(const char * text,const char * context); + KVILIB_API const TQString & translateToTQString(const char * text,const char * context); }; // not exported @@ -67,23 +67,23 @@ class KviTranslationEntry public: KviStr m_szKey; KviStr m_szEncodedTranslation; - QString * m_pQTranslation; + TQString * m_pTQTranslation; public: KviTranslationEntry(char * keyptr,int keylen,char * trptr,int trlen) : m_szKey(keyptr,keylen) , m_szEncodedTranslation(trptr,trlen) { - m_pQTranslation = 0; + m_pTQTranslation = 0; } KviTranslationEntry(const char * keyandtr) : m_szKey(keyandtr) , m_szEncodedTranslation(keyandtr) { - m_pQTranslation = 0; + m_pTQTranslation = 0; } ~KviTranslationEntry() { - if(m_pQTranslation)delete m_pQTranslation; + if(m_pTQTranslation)delete m_pTQTranslation; } }; @@ -96,11 +96,11 @@ public: protected: //KviPointerHashTable * m_pMessages; KviPointerHashTable * m_pMessages; - QTextCodec * m_pTextCodec; + TQTextCodec * m_pTextCodec; public: - bool load(const QString& name); + bool load(const TQString& name); const char * translate(const char * text); - const QString & translateToQString(const char * text); + const TQString & translateToTQString(const char * text); }; #ifndef _KVI_LOCALE_CPP_ @@ -111,34 +111,35 @@ public: #define __tr_no_lookup(__text__) __text__ #define __tr_no_xgettext(__text__) g_pMainCatalogue->translate(__text__) -#define __tr2qs(__text__) g_pMainCatalogue->translateToQString(__text__) -#define __tr2qs_no_xgettext(__text__) g_pMainCatalogue->translateToQString(__text__) +#define __tr2qs(__text__) g_pMainCatalogue->translateToTQString(__text__) +#define __tr2qs_no_xgettext(__text__) g_pMainCatalogue->translateToTQString(__text__) #define __tr_ctx(__text__,__context__) KviLocale::translate(__text__,__context__) #define __tr_no_lookup_ctx(__text__,__context__) __text__ #define __tr_no_xgettext_ctx(__text__,__context__) KviLocale::translate(__text__,__context__) -#define __tr2qs_ctx(__text__,__context__) KviLocale::translateToQString(__text__,__context__) -#define __tr2qs_ctx_no_xgettext(__text__,__context__) KviLocale::translateToQString(__text__,__context__) +#define __tr2qs_ctx(__text__,__context__) KviLocale::translateToTQString(__text__,__context__) +#define __tr2qs_ctx_no_xgettext(__text__,__context__) KviLocale::translateToTQString(__text__,__context__) #define __tr2qs_no_lookup(__text__) __text__ -#include -#include +#include +#include -class KVILIB_API KviTranslator : public QTranslator +class KVILIB_API KviTranslator : public TQTranslator { Q_OBJECT + TQ_OBJECT public: - KviTranslator(QObject * parent,const char * name); + KviTranslator(TQObject * tqparent,const char * name); ~KviTranslator(); public: #ifdef COMPILE_USE_QT4 - virtual QString translate(const char * context,const char * message,const char * comment) const; + virtual TQString translate(const char * context,const char * message,const char * comment) const; #endif // Deprecated in qt 4.x - virtual QString find(const char * context,const char * message) const; + virtual TQString tqfind(const char * context,const char * message) const; #ifndef COMPILE_USE_QT4 // Dead in qt 4.x - virtual QTranslatorMessage findMessage(const char * context,const char * sourceText,const char * comment = 0) const; + virtual TQTranslatorMessage findMessage(const char * context,const char * sourceText,const char * comment = 0) const; #endif }; diff --git a/src/kvilib/system/kvi_process.h b/src/kvilib/system/kvi_process.h index ea2275dc..649e40d7 100644 --- a/src/kvilib/system/kvi_process.h +++ b/src/kvilib/system/kvi_process.h @@ -27,11 +27,11 @@ #include "kvi_settings.h" #ifdef COMPILE_USE_QT4 - #include + #include #define KviProcess Q3Process #else - #include - #define KviProcess QProcess + #include + #define KviProcess TQProcess #endif #endif //!_KVI_PROCESS_H_ diff --git a/src/kvilib/system/kvi_stdarg.h b/src/kvilib/system/kvi_stdarg.h index 15c5e078..659e7a70 100644 --- a/src/kvilib/system/kvi_stdarg.h +++ b/src/kvilib/system/kvi_stdarg.h @@ -34,7 +34,7 @@ // kvi_va_start_by_reference should be used when the last known argument // is a reference type and not a pointer // -// int SomeClass::sprintf(const QString &fmt,...) +// int SomeClass::sprintf(const TQString &fmt,...) // { // kvi_va_list list; // kvi_va_start_by_reference(list,fmt); diff --git a/src/kvilib/system/kvi_thread.cpp b/src/kvilib/system/kvi_thread.cpp index e9ec3ac5..b3cb7708 100644 --- a/src/kvilib/system/kvi_thread.cpp +++ b/src/kvilib/system/kvi_thread.cpp @@ -47,7 +47,7 @@ #include "kvi_error.h" -#include +#include static void kvi_threadIgnoreSigalarm() @@ -58,7 +58,7 @@ static void kvi_threadIgnoreSigalarm() // Funky hack for some Solaris machines (maybe others ?) // For an obscure (at least to me) reason // when using threads ,some part of the system - // starts kidding us by sending a SIGALRM in apparently + // starts kidding us by sending a SIGALRM in aptqparently // "random" circumstances. (Xlib ?) (XServer ?) // The default action for SIGALRM is to exit the application. // Could not guess more about this stuff... @@ -152,7 +152,7 @@ static void kvi_threadInitialize() // the maximum length of the slave->master queue // over this length , the slave is forced to usleep() -#define KVI_THREAD_MAX_EVENT_QUEUE_LENGTH 50 +#define KVI_THREAD_MAX_EVENT_TQUEUE_LENGTH 50 static KviThreadManager * g_pThreadManager = 0; @@ -169,7 +169,7 @@ void KviThreadManager::globalDestroy() } KviThreadManager::KviThreadManager() -: QObject() +: TQObject() { if(g_pThreadManager)debug("Hey...what are ya doing ?"); @@ -189,21 +189,21 @@ KviThreadManager::KviThreadManager() if(pipe(m_fd) != 0) { - debug("Ops...thread manager pipe creation failed (%s)",KviQString::toUtf8(KviError::getDescription(KviError::translateSystemError(errno))).data()); + debug("Ops...thread manager pipe creation failed (%s)",KviTQString::toUtf8(KviError::getDescription(KviError::translateSystemError(errno))).data()); } if(fcntl(m_fd[KVI_THREAD_PIPE_SIDE_SLAVE],F_SETFL,O_NONBLOCK) == -1) { - debug("Ops...thread manager slave pipe initialisation failed (%s)",KviQString::toUtf8(KviError::getDescription(KviError::translateSystemError(errno))).data()); + debug("Ops...thread manager slave pipe initialisation failed (%s)",KviTQString::toUtf8(KviError::getDescription(KviError::translateSystemError(errno))).data()); } if(fcntl(m_fd[KVI_THREAD_PIPE_SIDE_MASTER],F_SETFL,O_NONBLOCK) == -1) { - debug("Ops...thread manager master pipe initialisation failed (%s)",KviQString::toUtf8(KviError::getDescription(KviError::translateSystemError(errno))).data()); + debug("Ops...thread manager master pipe initialisation failed (%s)",KviTQString::toUtf8(KviError::getDescription(KviError::translateSystemError(errno))).data()); } - m_pSn = new QSocketNotifier(m_fd[KVI_THREAD_PIPE_SIDE_MASTER],QSocketNotifier::Read); - connect(m_pSn,SIGNAL(activated(int)),this,SLOT(eventsPending(int))); + m_pSn = new TQSocketNotifier(m_fd[KVI_THREAD_PIPE_SIDE_MASTER],TQSocketNotifier::Read); + connect(m_pSn,TQT_SIGNAL(activated(int)),this,TQT_SLOT(eventsPending(int))); m_pSn->setEnabled(true); #endif } @@ -257,7 +257,7 @@ KviThreadManager::~KviThreadManager() // byez :) } -void KviThreadManager::killPendingEvents(QObject * receiver) +void KviThreadManager::killPendingEvents(TQObject * receiver) { #ifndef COMPILE_ON_WINDOWS if(!g_pThreadManager)return; @@ -265,7 +265,7 @@ void KviThreadManager::killPendingEvents(QObject * receiver) #endif } -void KviThreadManager::killPendingEventsByReceiver(QObject * receiver) +void KviThreadManager::killPendingEventsByReceiver(TQObject * receiver) { #ifndef COMPILE_ON_WINDOWS KviPointerList l; @@ -298,10 +298,10 @@ void KviThreadManager::unregisterSlaveThread(KviThread *t) m_pMutex->unlock(); } -void KviThreadManager::postSlaveEvent(QObject *o,QEvent *e) +void KviThreadManager::postSlaveEvent(TQObject *o,TQEvent *e) { #ifdef COMPILE_ON_WINDOWS - QApplication::postEvent(o,e); // we believe this to be thread-safe + TQApplication::postEvent(o,e); // we believe this to be thread-safe #else KviThreadPendingEvent * ev = new KviThreadPendingEvent; ev->o = o; @@ -319,7 +319,7 @@ void KviThreadManager::postSlaveEvent(QObject *o,QEvent *e) // on the main application thread we also can't artificially process the events. // So the solution is to skip this algorithm when at least one // thread is in waiting state. - while((m_pEventQueue->count() > KVI_THREAD_MAX_EVENT_QUEUE_LENGTH) && (m_iWaitingThreads < 1)) + while((m_pEventQueue->count() > KVI_THREAD_MAX_EVENT_TQUEUE_LENGTH) && (m_iWaitingThreads < 1)) { // wait for the master to process the queue @@ -379,7 +379,7 @@ void KviThreadManager::eventsPending(int fd) m_pMutex->unlock(); // let the app process the event // DANGER ! - QApplication::postEvent(ev->o,ev->e); + TQApplication::postEvent(ev->o,ev->e); // jump out of the loop if we have been destroyed if(!g_pThreadManager)return; @@ -574,7 +574,7 @@ void KviThread::sleep(unsigned long sec) #endif } -void KviThread::postEvent(QObject * o,QEvent *e) +void KviThread::postEvent(TQObject * o,TQEvent *e) { // slave side g_pThreadManager->postSlaveEvent(o,e); diff --git a/src/kvilib/system/kvi_thread.h b/src/kvilib/system/kvi_thread.h index bd6dab3b..f024505f 100644 --- a/src/kvilib/system/kvi_thread.h +++ b/src/kvilib/system/kvi_thread.h @@ -26,11 +26,11 @@ #include "kvi_heapobject.h" #include "kvi_string.h" -#include -#include -#include +#include +#include +#include #include "kvi_pointerlist.h" -#include +#include // @@ -181,7 +181,7 @@ private: bool m_bRunning; bool m_bStartingUp; KviMutex * m_pRunningMutex; - KviPointerList * m_pLocalEventQueue; + KviPointerList * m_pLocalEventQueue; public: // public KviThread interface // HANDLE WITH CARE @@ -215,14 +215,14 @@ protected: void exit(); // The tricky part: threadsafe event dispatching // Slave thread -> main thread objects - void postEvent(QObject *o,QEvent *e); + void postEvent(TQObject *o,TQEvent *e); private: void setRunning(bool bRunning); void setStartingUp(bool bStartingUp); }; -// QEvent::Type for Thread events -#define KVI_THREAD_EVENT (((int)QEvent::User) + 2000) +// TQEvent::Type for Thread events +#define KVI_THREAD_EVENT (((int)TQEvent::User) + 2000) // CONSTANTS FOR KviThreadEvent::eventId(); @@ -261,14 +261,14 @@ private: // #warning "Get rid of the m_szMessage member of KviThreadEvent : eventual data should be passed with a KviThreadDataEvent" // Base class for all thread events -class KVILIB_API KviThreadEvent : public QEvent, public KviHeapObject +class KVILIB_API KviThreadEvent : public TQEvent, public KviHeapObject { protected: int m_eventId; KviThread * m_pSender; public: KviThreadEvent(int evId,KviThread * sender = 0) - : QEvent((QEvent::Type)KVI_THREAD_EVENT) , m_eventId(evId) , m_pSender(sender) {}; + : TQEvent((TQEvent::Type)KVI_THREAD_EVENT) , m_eventId(evId) , m_pSender(sender) {}; virtual ~KviThreadEvent(){}; public: // This is the sender of the event @@ -329,25 +329,26 @@ protected: typedef struct _KviThreadPendingEvent { - QObject *o; - QEvent *e; + TQObject *o; + TQEvent *e; } KviThreadPendingEvent; -class KVILIB_API KviThreadManager : public QObject +class KVILIB_API KviThreadManager : public TQObject { friend class KviApp; friend class KviThread; Q_OBJECT + TQ_OBJECT protected: // These should be private...but we don't want anyone to complain // Treat as private plz. KviThreadManager(); ~KviThreadManager(); public: - static void killPendingEvents(QObject * receiver); + static void killPendingEvents(TQObject * receiver); private: #ifndef COMPILE_ON_WINDOWS - QSocketNotifier * m_pSn; + TQSocketNotifier * m_pSn; #endif KviMutex * m_pMutex; // This class performs only atomic operations KviPointerList * m_pThreadList; @@ -365,8 +366,8 @@ protected: void threadEnteredWaitState(); void threadLeftWaitState(); - void postSlaveEvent(QObject *o,QEvent *e); - void killPendingEventsByReceiver(QObject * receiver); + void postSlaveEvent(TQObject *o,TQEvent *e); + void killPendingEventsByReceiver(TQObject * receiver); // Public to KviApp only static void globalInit(); static void globalDestroy(); diff --git a/src/kvilib/system/kvi_time.cpp b/src/kvilib/system/kvi_time.cpp index f500b7d4..a61b3e76 100644 --- a/src/kvilib/system/kvi_time.cpp +++ b/src/kvilib/system/kvi_time.cpp @@ -93,11 +93,11 @@ namespace KviTimeUtils *uS = uSecs % 60; } - QString formatTimeInterval(unsigned int uSeconds,int iFlags) + TQString formatTimeInterval(unsigned int uSeconds,int iFlags) { unsigned int d,h,m,s; secondsToDaysHoursMinsSecs(uSeconds,&d,&h,&m,&s); - QString ret; + TQString ret; // the following tricks maybe will help translators a bit... if(iFlags & FillWithHypens) { @@ -108,25 +108,25 @@ namespace KviTimeUtils if(h > 0) { if(iFlags & NoLeadingZeroes) - KviQString::sprintf(ret,__tr2qs("%u h %u m %u s"),h,m,s); + KviTQString::sprintf(ret,__tr2qs("%u h %u m %u s"),h,m,s); else - KviQString::sprintf(ret,__tr2qs("%u h %u%u m %u%u s"),h,m / 10,m % 10,s / 10,s % 10); + KviTQString::sprintf(ret,__tr2qs("%u h %u%u m %u%u s"),h,m / 10,m % 10,s / 10,s % 10); } else { if(m > 0) { if(iFlags & NoLeadingZeroes) - KviQString::sprintf(ret,__tr2qs("%u m %u s"),m,s); + KviTQString::sprintf(ret,__tr2qs("%u m %u s"),m,s); else - KviQString::sprintf(ret,__tr2qs("%u m %u%u s"),m,s / 10,s % 10); + KviTQString::sprintf(ret,__tr2qs("%u m %u%u s"),m,s / 10,s % 10); } else { - KviQString::sprintf(ret,__tr2qs("%u s"),s); + KviTQString::sprintf(ret,__tr2qs("%u s"),s); } } } else { if(iFlags & NoLeadingZeroes) - KviQString::sprintf(ret,__tr2qs("%u d %u h %u m %u s"),d,h,m,s); + KviTQString::sprintf(ret,__tr2qs("%u d %u h %u m %u s"),d,h,m,s); else - KviQString::sprintf(ret,__tr2qs("%u d %u%u h %u%u m %u%u s"),d,h / 10,h % 10,m / 10,m % 10,s / 10,s % 10); + KviTQString::sprintf(ret,__tr2qs("%u d %u%u h %u%u m %u%u s"),d,h / 10,h % 10,m / 10,m % 10,s / 10,s % 10); } } return ret; diff --git a/src/kvilib/system/kvi_time.h b/src/kvilib/system/kvi_time.h index 309eec10..67997e30 100644 --- a/src/kvilib/system/kvi_time.h +++ b/src/kvilib/system/kvi_time.h @@ -26,7 +26,7 @@ //============================================================================= #include "kvi_settings.h" -#include +#include #include // for time() @@ -86,7 +86,7 @@ namespace KviTimeUtils NoLeadingZeroes = 2, // no leading zeroes are printed in hours and seconds FillWithHypens = 4 // uses only -- %d -- %h -- etc.. discards all other flags }; - KVILIB_API QString formatTimeInterval(unsigned int uSeconds,int iFlags = 0); + KVILIB_API TQString formatTimeInterval(unsigned int uSeconds,int iFlags = 0); }; #endif //_KVI_TIME_H_ diff --git a/src/kvilib/system/moc_kvi_locale.cpp b/src/kvilib/system/moc_kvi_locale.cpp index 52e2ae22..5d31d72a 100644 --- a/src/kvilib/system/moc_kvi_locale.cpp +++ b/src/kvilib/system/moc_kvi_locale.cpp @@ -2,21 +2,21 @@ ** KviTranslator meta object code from reading C++ file 'kvi_locale.h' ** ** Created: Sun Mar 23 20:56:24 2008 -** by: The Qt MOC ($Id: qt/moc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) +** by: The TQt TQMOC ($Id: qt/tqmoc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ -#undef QT_NO_COMPAT +#undef TQT_NO_COMPAT #include "kvi_locale.h" -#include -#include +#include +#include -#include -#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26) -#error "This file was generated using the moc from 3.3.8. It" -#error "cannot be used with the include files from this version of Qt." -#error "(The moc has changed too much.)" +#include +#if !defined(TQ_TQMOC_OUTPUT_REVISION) || (TQ_TQMOC_OUTPUT_REVISION != 26) +#error "This file was generated using the tqmoc from 3.3.8. It" +#error "cannot be used with the include files from this version of TQt." +#error "(The tqmoc has changed too much.)" #endif const char *KviTranslator::className() const @@ -24,69 +24,69 @@ const char *KviTranslator::className() const return "KviTranslator"; } -QMetaObject *KviTranslator::metaObj = 0; -static QMetaObjectCleanUp cleanUp_KviTranslator( "KviTranslator", &KviTranslator::staticMetaObject ); +TQMetaObject *KviTranslator::metaObj = 0; +static TQMetaObjectCleanUp cleanUp_KviTranslator( "KviTranslator", &KviTranslator::staticMetaObject ); -#ifndef QT_NO_TRANSLATION -QString KviTranslator::tr( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION +TQString KviTranslator::tr( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviTranslator", s, c, QApplication::DefaultCodec ); + if ( tqApp ) + return tqApp->translate( "KviTranslator", s, c, TQApplication::DefaultCodec ); else - return QString::fromLatin1( s ); + return TQString::tqfromLatin1( s ); } -#ifndef QT_NO_TRANSLATION_UTF8 -QString KviTranslator::trUtf8( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION_UTF8 +TQString KviTranslator::trUtf8( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviTranslator", s, c, QApplication::UnicodeUTF8 ); + if ( tqApp ) + return tqApp->translate( "KviTranslator", s, c, TQApplication::UnicodeUTF8 ); else - return QString::fromUtf8( s ); + return TQString::fromUtf8( s ); } -#endif // QT_NO_TRANSLATION_UTF8 +#endif // TQT_NO_TRANSLATION_UTF8 -#endif // QT_NO_TRANSLATION +#endif // TQT_NO_TRANSLATION -QMetaObject* KviTranslator::staticMetaObject() +TQMetaObject* KviTranslator::staticMetaObject() { if ( metaObj ) return metaObj; - QMetaObject* parentObject = QTranslator::staticMetaObject(); - metaObj = QMetaObject::new_metaobject( - "KviTranslator", parentObject, + TQMetaObject* tqparentObject = TQTranslator::staticMetaObject(); + metaObj = TQMetaObject::new_metaobject( + "KviTranslator", tqparentObject, 0, 0, 0, 0, -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES 0, 0, 0, 0, -#endif // QT_NO_PROPERTIES +#endif // TQT_NO_PROPERTIES 0, 0 ); cleanUp_KviTranslator.setMetaObject( metaObj ); return metaObj; } -void* KviTranslator::qt_cast( const char* clname ) +void* KviTranslator::tqqt_cast( const char* clname ) { if ( !qstrcmp( clname, "KviTranslator" ) ) return this; - return QTranslator::qt_cast( clname ); + return TQTranslator::tqqt_cast( clname ); } -bool KviTranslator::qt_invoke( int _id, QUObject* _o ) +bool KviTranslator::qt_invoke( int _id, TQUObject* _o ) { - return QTranslator::qt_invoke(_id,_o); + return TQTranslator::qt_invoke(_id,_o); } -bool KviTranslator::qt_emit( int _id, QUObject* _o ) +bool KviTranslator::qt_emit( int _id, TQUObject* _o ) { - return QTranslator::qt_emit(_id,_o); + return TQTranslator::qt_emit(_id,_o); } -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES -bool KviTranslator::qt_property( int id, int f, QVariant* v) +bool KviTranslator::qt_property( int id, int f, TQVariant* v) { - return QTranslator::qt_property( id, f, v); + return TQTranslator::qt_property( id, f, v); } -bool KviTranslator::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; } -#endif // QT_NO_PROPERTIES +bool KviTranslator::qt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; } +#endif // TQT_NO_PROPERTIES diff --git a/src/kvilib/system/moc_kvi_thread.cpp b/src/kvilib/system/moc_kvi_thread.cpp index 556849a9..41a824a9 100644 --- a/src/kvilib/system/moc_kvi_thread.cpp +++ b/src/kvilib/system/moc_kvi_thread.cpp @@ -2,21 +2,21 @@ ** KviThreadManager meta object code from reading C++ file 'kvi_thread.h' ** ** Created: Sun Mar 23 20:56:25 2008 -** by: The Qt MOC ($Id: qt/moc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) +** by: The TQt TQMOC ($Id: qt/tqmoc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ -#undef QT_NO_COMPAT +#undef TQT_NO_COMPAT #include "kvi_thread.h" -#include -#include +#include +#include -#include -#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26) -#error "This file was generated using the moc from 3.3.8. It" -#error "cannot be used with the include files from this version of Qt." -#error "(The moc has changed too much.)" +#include +#if !defined(TQ_TQMOC_OUTPUT_REVISION) || (TQ_TQMOC_OUTPUT_REVISION != 26) +#error "This file was generated using the tqmoc from 3.3.8. It" +#error "cannot be used with the include files from this version of TQt." +#error "(The tqmoc has changed too much.)" #endif const char *KviThreadManager::className() const @@ -24,81 +24,81 @@ const char *KviThreadManager::className() const return "KviThreadManager"; } -QMetaObject *KviThreadManager::metaObj = 0; -static QMetaObjectCleanUp cleanUp_KviThreadManager( "KviThreadManager", &KviThreadManager::staticMetaObject ); +TQMetaObject *KviThreadManager::metaObj = 0; +static TQMetaObjectCleanUp cleanUp_KviThreadManager( "KviThreadManager", &KviThreadManager::staticMetaObject ); -#ifndef QT_NO_TRANSLATION -QString KviThreadManager::tr( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION +TQString KviThreadManager::tr( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviThreadManager", s, c, QApplication::DefaultCodec ); + if ( tqApp ) + return tqApp->translate( "KviThreadManager", s, c, TQApplication::DefaultCodec ); else - return QString::fromLatin1( s ); + return TQString::tqfromLatin1( s ); } -#ifndef QT_NO_TRANSLATION_UTF8 -QString KviThreadManager::trUtf8( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION_UTF8 +TQString KviThreadManager::trUtf8( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviThreadManager", s, c, QApplication::UnicodeUTF8 ); + if ( tqApp ) + return tqApp->translate( "KviThreadManager", s, c, TQApplication::UnicodeUTF8 ); else - return QString::fromUtf8( s ); + return TQString::fromUtf8( s ); } -#endif // QT_NO_TRANSLATION_UTF8 +#endif // TQT_NO_TRANSLATION_UTF8 -#endif // QT_NO_TRANSLATION +#endif // TQT_NO_TRANSLATION -QMetaObject* KviThreadManager::staticMetaObject() +TQMetaObject* KviThreadManager::staticMetaObject() { if ( metaObj ) return metaObj; - QMetaObject* parentObject = QObject::staticMetaObject(); - static const QUParameter param_slot_0[] = { - { "fd", &static_QUType_int, 0, QUParameter::In } + TQMetaObject* tqparentObject = TQObject::staticMetaObject(); + static const TQUParameter param_slot_0[] = { + { "fd", &static_TQUType_int, 0, TQUParameter::In } }; - static const QUMethod slot_0 = {"eventsPending", 1, param_slot_0 }; - static const QMetaData slot_tbl[] = { - { "eventsPending(int)", &slot_0, QMetaData::Private } + static const TQUMethod slot_0 = {"eventsPending", 1, param_slot_0 }; + static const TQMetaData slot_tbl[] = { + { "eventsPending(int)", &slot_0, TQMetaData::Private } }; - metaObj = QMetaObject::new_metaobject( - "KviThreadManager", parentObject, + metaObj = TQMetaObject::new_metaobject( + "KviThreadManager", tqparentObject, slot_tbl, 1, 0, 0, -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES 0, 0, 0, 0, -#endif // QT_NO_PROPERTIES +#endif // TQT_NO_PROPERTIES 0, 0 ); cleanUp_KviThreadManager.setMetaObject( metaObj ); return metaObj; } -void* KviThreadManager::qt_cast( const char* clname ) +void* KviThreadManager::tqqt_cast( const char* clname ) { if ( !qstrcmp( clname, "KviThreadManager" ) ) return this; - return QObject::qt_cast( clname ); + return TQObject::tqqt_cast( clname ); } -bool KviThreadManager::qt_invoke( int _id, QUObject* _o ) +bool KviThreadManager::qt_invoke( int _id, TQUObject* _o ) { switch ( _id - staticMetaObject()->slotOffset() ) { - case 0: eventsPending((int)static_QUType_int.get(_o+1)); break; + case 0: eventsPending((int)static_TQUType_int.get(_o+1)); break; default: - return QObject::qt_invoke( _id, _o ); + return TQObject::qt_invoke( _id, _o ); } return TRUE; } -bool KviThreadManager::qt_emit( int _id, QUObject* _o ) +bool KviThreadManager::qt_emit( int _id, TQUObject* _o ) { - return QObject::qt_emit(_id,_o); + return TQObject::qt_emit(_id,_o); } -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES -bool KviThreadManager::qt_property( int id, int f, QVariant* v) +bool KviThreadManager::qt_property( int id, int f, TQVariant* v) { - return QObject::qt_property( id, f, v); + return TQObject::qt_property( id, f, v); } -bool KviThreadManager::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; } -#endif // QT_NO_PROPERTIES +bool KviThreadManager::qt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; } +#endif // TQT_NO_PROPERTIES diff --git a/src/kvilib/tal/kvi_tal_application.cpp b/src/kvilib/tal/kvi_tal_application.cpp index 4d8bd0d5..b78e1567 100644 --- a/src/kvilib/tal/kvi_tal_application.cpp +++ b/src/kvilib/tal/kvi_tal_application.cpp @@ -56,7 +56,7 @@ #else KviTalApplication::KviTalApplication(int &argc,char ** argv) - : QApplication(argc,argv) + : TQApplication(argc,argv) { } diff --git a/src/kvilib/tal/kvi_tal_application_kde.h b/src/kvilib/tal/kvi_tal_application_kde.h index 05d6e87f..c3149e3d 100644 --- a/src/kvilib/tal/kvi_tal_application_kde.h +++ b/src/kvilib/tal/kvi_tal_application_kde.h @@ -29,6 +29,7 @@ class KVILIB_API KviTalApplication : public KApplication { Q_OBJECT + TQ_OBJECT public: KviTalApplication(int &argc,char ** argv); ~KviTalApplication(); diff --git a/src/kvilib/tal/kvi_tal_application_qt.h b/src/kvilib/tal/kvi_tal_application_qt.h index 953608fe..96ff1dbb 100644 --- a/src/kvilib/tal/kvi_tal_application_qt.h +++ b/src/kvilib/tal/kvi_tal_application_qt.h @@ -1,5 +1,5 @@ -#ifndef _KVI_TAL_APPLICATION_QT_H_ -#define _KVI_TAL_APPLICATION_QT_H_ +#ifndef _KVI_TAL_APPLICATION_TQT_H_ +#define _KVI_TAL_APPLICATION_TQT_H_ // // File : kvi_tal_application_qt.h @@ -23,15 +23,16 @@ // Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // -#include +#include -class KVILIB_API KviTalApplication : public QApplication +class KVILIB_API KviTalApplication : public TQApplication { Q_OBJECT + TQ_OBJECT public: KviTalApplication(int &argc,char ** argv); ~KviTalApplication(); }; -#endif // _KVI_TAL_APPLICATION_QT_H_ +#endif // _KVI_TAL_APPLICATION_TQT_H_ diff --git a/src/kvilib/tal/kvi_tal_filedialog.cpp b/src/kvilib/tal/kvi_tal_filedialog.cpp index b345fd0b..5760a90c 100644 --- a/src/kvilib/tal/kvi_tal_filedialog.cpp +++ b/src/kvilib/tal/kvi_tal_filedialog.cpp @@ -29,10 +29,10 @@ #ifdef COMPILE_USE_QT4 - #include + #include - KviTalFileDialog::KviTalFileDialog(const QString &dirName,const QString &filter,QWidget *parent,const char *name,bool modal) - : QFileDialog(parent,"",dirName,filter) + KviTalFileDialog::KviTalFileDialog(const TQString &dirName,const TQString &filter,TQWidget *tqparent,const char *name,bool modal) + : TQFileDialog(tqparent,"",dirName,filter) { setModal(modal); } @@ -46,29 +46,29 @@ switch(m) { case AnyFile: - QFileDialog::setFileMode(QFileDialog::AnyFile); + TQFileDialog::setFileMode(TQFileDialog::AnyFile); break; case ExistingFile: - QFileDialog::setFileMode(QFileDialog::ExistingFile); + TQFileDialog::setFileMode(TQFileDialog::ExistingFile); break; case ExistingFiles: - QFileDialog::setFileMode(QFileDialog::ExistingFiles); + TQFileDialog::setFileMode(TQFileDialog::ExistingFiles); break; case Directory: - QFileDialog::setFileMode(QFileDialog::Directory); + TQFileDialog::setFileMode(TQFileDialog::Directory); break; case DirectoryOnly: - QFileDialog::setFileMode(QFileDialog::DirectoryOnly); + TQFileDialog::setFileMode(TQFileDialog::DirectoryOnly); break; default: - QFileDialog::setFileMode(QFileDialog::AnyFile); + TQFileDialog::setFileMode(TQFileDialog::AnyFile); break; } } - void KviTalFileDialog::setDirectory(const QString &szDirectory) + void KviTalFileDialog::setDirectory(const TQString &szDirectory) { - QFileDialog::setDirectory(szDirectory); + TQFileDialog::setDirectory(szDirectory); } @@ -78,8 +78,8 @@ #ifdef COMPILE_KDE_SUPPORT - KviTalFileDialog::KviTalFileDialog(const QString &dirName,const QString &filter,QWidget *parent,const char *name,bool modal) - : KFileDialog(dirName,filter,parent,name,modal) + KviTalFileDialog::KviTalFileDialog(const TQString &dirName,const TQString &filter,TQWidget *tqparent,const char *name,bool modal) + : KFileDialog(dirName,filter,tqparent,name,modal) { clearWFlags(WDestructiveClose); } @@ -117,7 +117,7 @@ } } - void KviTalFileDialog::setDirectory(const QString &szDirectory) + void KviTalFileDialog::setDirectory(const TQString &szDirectory) { setURL(szDirectory); } @@ -127,10 +127,10 @@ #else - #include + #include - KviTalFileDialog::KviTalFileDialog(const QString &dirName,const QString &filter,QWidget *parent,const char *name,bool modal) - : QFileDialog(dirName,filter,parent,name,modal) + KviTalFileDialog::KviTalFileDialog(const TQString &dirName,const TQString &filter,TQWidget *tqparent,const char *name,bool modal) + : TQFileDialog(dirName,filter,tqparent,name,modal) { clearWFlags(WDestructiveClose); } @@ -144,29 +144,29 @@ switch(m) { case AnyFile: - setMode(QFileDialog::AnyFile); + setMode(TQFileDialog::AnyFile); break; case ExistingFile: - setMode(QFileDialog::ExistingFile); + setMode(TQFileDialog::ExistingFile); break; case ExistingFiles: - setMode(QFileDialog::ExistingFiles); + setMode(TQFileDialog::ExistingFiles); break; case Directory: - setMode(QFileDialog::Directory); + setMode(TQFileDialog::Directory); break; case DirectoryOnly: - setMode(QFileDialog::DirectoryOnly); + setMode(TQFileDialog::DirectoryOnly); break; default: - setMode(QFileDialog::AnyFile); + setMode(TQFileDialog::AnyFile); break; } } - void KviTalFileDialog::setDirectory(const QString &szDirectory) + void KviTalFileDialog::setDirectory(const TQString &szDirectory) { - setDir(QDir(szDirectory)); + setDir(TQDir(szDirectory)); } diff --git a/src/kvilib/tal/kvi_tal_filedialog_kde.h b/src/kvilib/tal/kvi_tal_filedialog_kde.h index 0f04a80c..5285aa16 100644 --- a/src/kvilib/tal/kvi_tal_filedialog_kde.h +++ b/src/kvilib/tal/kvi_tal_filedialog_kde.h @@ -24,26 +24,27 @@ // #include -#include +#include class KVILIB_API KviTalFileDialog : public KFileDialog { Q_OBJECT + TQ_OBJECT public: - KviTalFileDialog(const QString &dirName,const QString &filter = QString::null,QWidget *parent = 0,const char *name = 0,bool modal = FALSE); + KviTalFileDialog(const TQString &dirName,const TQString &filter = TQString(),TQWidget *tqparent = 0,const char *name = 0,bool modal = FALSE); ~KviTalFileDialog(); public: enum FileMode { AnyFile, ExistingFile, ExistingFiles, Directory, DirectoryOnly }; void setFileMode(FileMode m); - void setDirectory(const QString &szDirectory); + void setDirectory(const TQString &szDirectory); - static QString getExistingDirectoryPath(const QString &dir = QString::null,const QString &caption = QString::null,QWidget *parent = 0) + static TQString getExistingDirectoryPath(const TQString &dir = TQString(),const TQString &caption = TQString(),TQWidget *tqparent = 0) { - // QFileDialog allows making new directories...kfiledialog not :/ - return QFileDialog::getExistingDirectory(dir,parent,0,caption); - //return getExistingDirectory(dir,parent,caption); + // TQFileDialog allows making new directories...kfiledialog not :/ + return TQFileDialog::getExistingDirectory(dir,tqparent,0,caption); + //return getExistingDirectory(dir,tqparent,caption); }; }; diff --git a/src/kvilib/tal/kvi_tal_filedialog_qt.h b/src/kvilib/tal/kvi_tal_filedialog_qt.h index 14a24854..0eebfc61 100644 --- a/src/kvilib/tal/kvi_tal_filedialog_qt.h +++ b/src/kvilib/tal/kvi_tal_filedialog_qt.h @@ -1,5 +1,5 @@ -#ifndef _KVI_TAL_FILEDIALOG_QT_H_ -#define _KVI_TAL_FILEDIALOG_QT_H_ +#ifndef _KVI_TAL_FILEDIALOG_TQT_H_ +#define _KVI_TAL_FILEDIALOG_TQT_H_ // // File : kvi_tal_filedialog_qt.h @@ -23,22 +23,23 @@ // Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // -#include +#include -class KVILIB_API KviTalFileDialog : public QFileDialog +class KVILIB_API KviTalFileDialog : public TQFileDialog { Q_OBJECT + TQ_OBJECT public: - KviTalFileDialog(const QString &dirName,const QString &filter = QString::null,QWidget *parent = 0,const char *name = 0,bool modal = FALSE); + KviTalFileDialog(const TQString &dirName,const TQString &filter = TQString(),TQWidget *tqparent = 0,const char *name = 0,bool modal = FALSE); ~KviTalFileDialog(); public: enum FileMode { AnyFile, ExistingFile, ExistingFiles, Directory, DirectoryOnly }; void setFileMode(FileMode m); - void setDirectory(const QString &szDirectory); + void setDirectory(const TQString &szDirectory); - static QString getExistingDirectoryPath(const QString &dir = QString::null,const QString &caption = QString::null,QWidget *parent = 0) - { return getExistingDirectory(dir,parent,0 /* name */,caption); }; + static TQString getExistingDirectoryPath(const TQString &dir = TQString(),const TQString &caption = TQString(),TQWidget *tqparent = 0) + { return getExistingDirectory(dir,tqparent,0 /* name */,caption); }; }; -#endif // _KVI_TAL_FILEDIALOG_QT_H_ +#endif // _KVI_TAL_FILEDIALOG_TQT_H_ diff --git a/src/kvilib/tal/kvi_tal_filedialog_qt4.h b/src/kvilib/tal/kvi_tal_filedialog_qt4.h index eb5f7ab6..18bb420e 100644 --- a/src/kvilib/tal/kvi_tal_filedialog_qt4.h +++ b/src/kvilib/tal/kvi_tal_filedialog_qt4.h @@ -25,22 +25,23 @@ // //============================================================================= -#include +#include -class KVILIB_API KviTalFileDialog : public QFileDialog +class KVILIB_API KviTalFileDialog : public TQFileDialog { Q_OBJECT + TQ_OBJECT public: - KviTalFileDialog(const QString &dirName,const QString &filter = QString::null,QWidget *parent = 0,const char *name = 0,bool modal = FALSE); + KviTalFileDialog(const TQString &dirName,const TQString &filter = TQString(),TQWidget *tqparent = 0,const char *name = 0,bool modal = FALSE); ~KviTalFileDialog(); public: enum FileMode { AnyFile, ExistingFile, ExistingFiles, Directory, DirectoryOnly }; void setFileMode(FileMode m); - void setDirectory(const QString &szDirectory); + void setDirectory(const TQString &szDirectory); - static QString getExistingDirectoryPath(const QString &dir = QString::null,const QString &caption = QString::null,QWidget *parent = 0) - { return getExistingDirectory(parent,caption,dir); }; + static TQString getExistingDirectoryPath(const TQString &dir = TQString(),const TQString &caption = TQString(),TQWidget *tqparent = 0) + { return getExistingDirectory(tqparent,caption,dir); }; }; -#endif // _KVI_TAL_FILEDIALOG_QT_H_ +#endif // _KVI_TAL_FILEDIALOG_TQT_H_ diff --git a/src/kvilib/tal/kvi_tal_grid_qt3.h b/src/kvilib/tal/kvi_tal_grid_qt3.h index fd77d15c..80ab6387 100644 --- a/src/kvilib/tal/kvi_tal_grid_qt3.h +++ b/src/kvilib/tal/kvi_tal_grid_qt3.h @@ -25,14 +25,15 @@ // //============================================================================= -#include +#include -class KVILIB_API KviTalGrid : public QGrid +class KVILIB_API KviTalGrid : public TQGrid { Q_OBJECT + TQ_OBJECT public: - KviTalGrid(int n,Qt::Orientation orient,QWidget * pParent = 0) - : QGrid(n,orient,pParent) {}; + KviTalGrid(int n,Qt::Orientation orient,TQWidget * pParent = 0) + : TQGrid(n,orient,pParent) {}; ~KviTalGrid() {}; }; diff --git a/src/kvilib/tal/kvi_tal_grid_qt4.h b/src/kvilib/tal/kvi_tal_grid_qt4.h index 57612b3c..c117ec17 100644 --- a/src/kvilib/tal/kvi_tal_grid_qt4.h +++ b/src/kvilib/tal/kvi_tal_grid_qt4.h @@ -27,13 +27,14 @@ #include "kvi_settings.h" -#include +#include class KVILIB_API KviTalGrid : public Q3Grid { Q_OBJECT + TQ_OBJECT public: - KviTalGrid(int n,Qt::Orientation orient,QWidget * pParent = 0) + KviTalGrid(int n,Qt::Orientation orient,TQWidget * pParent = 0) : Q3Grid(n,orient,pParent) {}; ~KviTalGrid() {}; }; diff --git a/src/kvilib/tal/kvi_tal_groupbox_qt3.h b/src/kvilib/tal/kvi_tal_groupbox_qt3.h index be3340a3..12369208 100644 --- a/src/kvilib/tal/kvi_tal_groupbox_qt3.h +++ b/src/kvilib/tal/kvi_tal_groupbox_qt3.h @@ -25,20 +25,21 @@ // //============================================================================= -#include +#include -class KVILIB_API KviTalGroupBox : public QGroupBox +class KVILIB_API KviTalGroupBox : public TQGroupBox { Q_OBJECT + TQ_OBJECT public: - KviTalGroupBox(QWidget * parent = 0) - : QGroupBox(parent) {}; - KviTalGroupBox(const QString & title,QWidget * parent = 0) - : QGroupBox(title,parent) {}; - KviTalGroupBox(int strips,Qt::Orientation orientation,QWidget * parent = 0) - : QGroupBox(strips,orientation,parent) {}; - KviTalGroupBox(int strips,Qt::Orientation orientation,const QString & title,QWidget * parent = 0) - : QGroupBox(strips,orientation,title,parent) {}; + KviTalGroupBox(TQWidget * tqparent = 0) + : TQGroupBox(tqparent) {}; + KviTalGroupBox(const TQString & title,TQWidget * tqparent = 0) + : TQGroupBox(title,tqparent) {}; + KviTalGroupBox(int strips,Qt::Orientation orientation,TQWidget * tqparent = 0) + : TQGroupBox(strips,orientation,tqparent) {}; + KviTalGroupBox(int strips,Qt::Orientation orientation,const TQString & title,TQWidget * tqparent = 0) + : TQGroupBox(strips,orientation,title,tqparent) {}; ~KviTalGroupBox() {}; }; diff --git a/src/kvilib/tal/kvi_tal_groupbox_qt4.h b/src/kvilib/tal/kvi_tal_groupbox_qt4.h index c8917385..1b34de14 100644 --- a/src/kvilib/tal/kvi_tal_groupbox_qt4.h +++ b/src/kvilib/tal/kvi_tal_groupbox_qt4.h @@ -25,20 +25,21 @@ // //============================================================================= -#include +#include class KVILIB_API KviTalGroupBox : public Q3GroupBox { Q_OBJECT + TQ_OBJECT public: - KviTalGroupBox(QWidget * parent = 0) - : Q3GroupBox(parent) {}; - KviTalGroupBox(const QString & title,QWidget * parent = 0) - : Q3GroupBox(title,parent) {}; - KviTalGroupBox(int strips,Qt::Orientation orientation,QWidget * parent = 0) - : Q3GroupBox(strips,orientation,parent) {}; - KviTalGroupBox(int strips,Qt::Orientation orientation,const QString & title,QWidget * parent = 0) - : Q3GroupBox(strips,orientation,title,parent) {}; + KviTalGroupBox(TQWidget * tqparent = 0) + : Q3GroupBox(tqparent) {}; + KviTalGroupBox(const TQString & title,TQWidget * tqparent = 0) + : Q3GroupBox(title,tqparent) {}; + KviTalGroupBox(int strips,Qt::Orientation orientation,TQWidget * tqparent = 0) + : Q3GroupBox(strips,orientation,tqparent) {}; + KviTalGroupBox(int strips,Qt::Orientation orientation,const TQString & title,TQWidget * tqparent = 0) + : Q3GroupBox(strips,orientation,title,tqparent) {}; ~KviTalGroupBox() {}; }; diff --git a/src/kvilib/tal/kvi_tal_hbox_qt3.h b/src/kvilib/tal/kvi_tal_hbox_qt3.h index 992ca03a..79d25b32 100644 --- a/src/kvilib/tal/kvi_tal_hbox_qt3.h +++ b/src/kvilib/tal/kvi_tal_hbox_qt3.h @@ -27,14 +27,15 @@ #include "kvi_settings.h" -#include +#include -class KVILIB_API KviTalHBox : public QHBox +class KVILIB_API KviTalHBox : public TQHBox { Q_OBJECT + TQ_OBJECT public: - KviTalHBox(QWidget * pParent) - : QHBox(pParent) {}; + KviTalHBox(TQWidget * pParent) + : TQHBox(pParent) {}; virtual ~KviTalHBox() {}; }; diff --git a/src/kvilib/tal/kvi_tal_hbox_qt4.h b/src/kvilib/tal/kvi_tal_hbox_qt4.h index 384910c2..3ac5f426 100644 --- a/src/kvilib/tal/kvi_tal_hbox_qt4.h +++ b/src/kvilib/tal/kvi_tal_hbox_qt4.h @@ -27,13 +27,14 @@ #include "kvi_settings.h" -#include +#include class KVILIB_API KviTalHBox : public Q3HBox { Q_OBJECT + TQ_OBJECT public: - KviTalHBox(QWidget * pParent,char* name=0) + KviTalHBox(TQWidget * pParent,char* name=0) : Q3HBox(pParent,name) {}; virtual ~KviTalHBox() {}; }; diff --git a/src/kvilib/tal/kvi_tal_iconview.cpp b/src/kvilib/tal/kvi_tal_iconview.cpp index 2f63388c..45b640fd 100644 --- a/src/kvilib/tal/kvi_tal_iconview.cpp +++ b/src/kvilib/tal/kvi_tal_iconview.cpp @@ -27,23 +27,23 @@ #ifdef COMPILE_USE_QT4 - KviTalIconView::KviTalIconView(QWidget * pParent,Qt::WFlags f) + KviTalIconView::KviTalIconView(TQWidget * pParent,TQt::WFlags f) : Q3IconView(pParent,0,f) { - connect(this,SIGNAL(selectionChanged(Q3IconViewItem *)),this,SLOT(redirect_selectionChanged(Q3IconViewItem *))); - connect(this,SIGNAL(currentChanged(Q3IconViewItem *)),this,SLOT(redirect_currentChanged(Q3IconViewItem *))); - connect(this,SIGNAL(clicked(Q3IconViewItem *)),this,SLOT(redirect_clicked(Q3IconViewItem *))); - connect(this,SIGNAL(clicked(Q3IconViewItem *,const QPoint &)),this,SLOT(redirect_clicked(Q3IconViewItem *,const QPoint &))); - connect(this,SIGNAL(pressed(Q3IconViewItem *)),this,SLOT(redirect_pressed(Q3IconViewItem *))); - connect(this,SIGNAL(pressed(Q3IconViewItem *,const QPoint &)),this,SLOT(redirect_pressed(Q3IconViewItem *,const QPoint &))); - connect(this,SIGNAL(doubleClicked(Q3IconViewItem *)),this,SLOT(redirect_doubleClicked(Q3IconViewItem *))); - connect(this,SIGNAL(returnPressed(Q3IconViewItem *)),this,SLOT(redirect_returnPressed(Q3IconViewItem *))); - connect(this,SIGNAL(rightButtonClicked(Q3IconViewItem *,const QPoint &)),this,SLOT(redirect_rightButtonClicked(Q3IconViewItem *,const QPoint &))); - connect(this,SIGNAL(rightButtonPressed(Q3IconViewItem *,const QPoint &)),this,SLOT(redirect_rightButtonPressed(Q3IconViewItem *,const QPoint &))); - connect(this,SIGNAL(mouseButtonClicked(int,Q3IconViewItem *,const QPoint &)),this,SLOT(redirect_mouseButtonClicked(int,Q3IconViewItem *,const QPoint &))); - connect(this,SIGNAL(mouseButtonPressed(int,Q3IconViewItem *,const QPoint &)),this,SLOT(redirect_mouseButtonPressed(int,Q3IconViewItem *,const QPoint &))); - connect(this,SIGNAL(contextMenuRequested(Q3IconViewItem *,const QPoint &)),this,SLOT(redirect_contextMenuRequested(Q3IconViewItem *,const QPoint &))); - connect(this,SIGNAL(onItem(Q3IconViewItem *)),this,SLOT(redirect_onItem(Q3IconViewItem *))); + connect(this,TQT_SIGNAL(selectionChanged(Q3IconViewItem *)),this,TQT_SLOT(redirect_selectionChanged(Q3IconViewItem *))); + connect(this,TQT_SIGNAL(currentChanged(Q3IconViewItem *)),this,TQT_SLOT(redirect_currentChanged(Q3IconViewItem *))); + connect(this,TQT_SIGNAL(clicked(Q3IconViewItem *)),this,TQT_SLOT(redirect_clicked(Q3IconViewItem *))); + connect(this,TQT_SIGNAL(clicked(Q3IconViewItem *,const TQPoint &)),this,TQT_SLOT(redirect_clicked(Q3IconViewItem *,const TQPoint &))); + connect(this,TQT_SIGNAL(pressed(Q3IconViewItem *)),this,TQT_SLOT(redirect_pressed(Q3IconViewItem *))); + connect(this,TQT_SIGNAL(pressed(Q3IconViewItem *,const TQPoint &)),this,TQT_SLOT(redirect_pressed(Q3IconViewItem *,const TQPoint &))); + connect(this,TQT_SIGNAL(doubleClicked(Q3IconViewItem *)),this,TQT_SLOT(redirect_doubleClicked(Q3IconViewItem *))); + connect(this,TQT_SIGNAL(returnPressed(Q3IconViewItem *)),this,TQT_SLOT(redirect_returnPressed(Q3IconViewItem *))); + connect(this,TQT_SIGNAL(rightButtonClicked(Q3IconViewItem *,const TQPoint &)),this,TQT_SLOT(redirect_rightButtonClicked(Q3IconViewItem *,const TQPoint &))); + connect(this,TQT_SIGNAL(rightButtonPressed(Q3IconViewItem *,const TQPoint &)),this,TQT_SLOT(redirect_rightButtonPressed(Q3IconViewItem *,const TQPoint &))); + connect(this,TQT_SIGNAL(mouseButtonClicked(int,Q3IconViewItem *,const TQPoint &)),this,TQT_SLOT(redirect_mouseButtonClicked(int,Q3IconViewItem *,const TQPoint &))); + connect(this,TQT_SIGNAL(mouseButtonPressed(int,Q3IconViewItem *,const TQPoint &)),this,TQT_SLOT(redirect_mouseButtonPressed(int,Q3IconViewItem *,const TQPoint &))); + connect(this,TQT_SIGNAL(contextMenuRequested(Q3IconViewItem *,const TQPoint &)),this,TQT_SLOT(redirect_contextMenuRequested(Q3IconViewItem *,const TQPoint &))); + connect(this,TQT_SIGNAL(onItem(Q3IconViewItem *)),this,TQT_SLOT(redirect_onItem(Q3IconViewItem *))); } void KviTalIconView::redirect_selectionChanged(Q3IconViewItem * pItem) @@ -61,7 +61,7 @@ emit clicked((KviTalIconViewItem *)pItem); } - void KviTalIconView::redirect_clicked(Q3IconViewItem * pItem,const QPoint &pnt) + void KviTalIconView::redirect_clicked(Q3IconViewItem * pItem,const TQPoint &pnt) { emit clicked((KviTalIconViewItem *)pItem,pnt); } @@ -71,7 +71,7 @@ emit pressed((KviTalIconViewItem *)pItem); } - void KviTalIconView::redirect_pressed(Q3IconViewItem * pItem,const QPoint &pnt) + void KviTalIconView::redirect_pressed(Q3IconViewItem * pItem,const TQPoint &pnt) { emit pressed((KviTalIconViewItem *)pItem,pnt); } @@ -86,27 +86,27 @@ emit returnPressed((KviTalIconViewItem *)pItem); } - void KviTalIconView::redirect_rightButtonClicked(Q3IconViewItem * pItem,const QPoint &pnt) + void KviTalIconView::redirect_rightButtonClicked(Q3IconViewItem * pItem,const TQPoint &pnt) { emit rightButtonClicked((KviTalIconViewItem *)pItem,pnt); } - void KviTalIconView::redirect_rightButtonPressed(Q3IconViewItem * pItem,const QPoint &pnt) + void KviTalIconView::redirect_rightButtonPressed(Q3IconViewItem * pItem,const TQPoint &pnt) { emit rightButtonPressed((KviTalIconViewItem *)pItem,pnt); } - void KviTalIconView::redirect_mouseButtonClicked(int iButton,Q3IconViewItem * pItem,const QPoint &pnt) + void KviTalIconView::redirect_mouseButtonClicked(int iButton,Q3IconViewItem * pItem,const TQPoint &pnt) { emit mouseButtonClicked(iButton,(KviTalIconViewItem *)pItem,pnt); } - void KviTalIconView::redirect_mouseButtonPressed(int iButton,Q3IconViewItem * pItem,const QPoint &pnt) + void KviTalIconView::redirect_mouseButtonPressed(int iButton,Q3IconViewItem * pItem,const TQPoint &pnt) { emit mouseButtonPressed(iButton,(KviTalIconViewItem *)pItem,pnt); } - void KviTalIconView::redirect_contextMenuRequested(Q3IconViewItem * pItem,const QPoint &pnt) + void KviTalIconView::redirect_contextMenuRequested(Q3IconViewItem * pItem,const TQPoint &pnt) { emit contextMenuRequested((KviTalIconViewItem *)pItem,pnt); } @@ -120,91 +120,91 @@ #include "kvi_tal_iconview_qt4.moc" #else - KviTalIconView::KviTalIconView(QWidget * pParent,Qt::WFlags f) - : QIconView(pParent,0,f) + KviTalIconView::KviTalIconView(TQWidget * pParent,TQt::WFlags f) + : TQIconView(pParent,0,f) { - connect(this,SIGNAL(selectionChanged(QIconViewItem *)),this,SLOT(redirect_selectionChanged(QIconViewItem *))); - connect(this,SIGNAL(currentChanged(QIconViewItem *)),this,SLOT(redirect_currentChanged(QIconViewItem *))); - connect(this,SIGNAL(clicked(QIconViewItem *)),this,SLOT(redirect_clicked(QIconViewItem *))); - connect(this,SIGNAL(clicked(QIconViewItem *,const QPoint &)),this,SLOT(redirect_clicked(QIconViewItem *,const QPoint &))); - connect(this,SIGNAL(pressed(QIconViewItem *)),this,SLOT(redirect_pressed(QIconViewItem *))); - connect(this,SIGNAL(pressed(QIconViewItem *,const QPoint &)),this,SLOT(redirect_pressed(QIconViewItem *,const QPoint &))); - connect(this,SIGNAL(doubleClicked(QIconViewItem *)),this,SLOT(redirect_doubleClicked(QIconViewItem *))); - connect(this,SIGNAL(returnPressed(QIconViewItem *)),this,SLOT(redirect_returnPressed(QIconViewItem *))); - connect(this,SIGNAL(rightButtonClicked(QIconViewItem *,const QPoint &)),this,SLOT(redirect_rightButtonClicked(QIconViewItem *,const QPoint &))); - connect(this,SIGNAL(rightButtonPressed(QIconViewItem *,const QPoint &)),this,SLOT(redirect_rightButtonPressed(QIconViewItem *,const QPoint &))); - connect(this,SIGNAL(mouseButtonClicked(int,QIconViewItem *,const QPoint &)),this,SLOT(redirect_mouseButtonClicked(int,QIconViewItem *,const QPoint &))); - connect(this,SIGNAL(mouseButtonPressed(int,QIconViewItem *,const QPoint &)),this,SLOT(redirect_mouseButtonPressed(int,QIconViewItem *,const QPoint &))); - connect(this,SIGNAL(contextMenuRequested(QIconViewItem *,const QPoint &)),this,SLOT(redirect_contextMenuRequested(QIconViewItem *,const QPoint &))); - connect(this,SIGNAL(onItem(QIconViewItem *)),this,SLOT(redirect_onItem(QIconViewItem *))); + connect(this,TQT_SIGNAL(selectionChanged(TQIconViewItem *)),this,TQT_SLOT(redirect_selectionChanged(TQIconViewItem *))); + connect(this,TQT_SIGNAL(currentChanged(TQIconViewItem *)),this,TQT_SLOT(redirect_currentChanged(TQIconViewItem *))); + connect(this,TQT_SIGNAL(clicked(TQIconViewItem *)),this,TQT_SLOT(redirect_clicked(TQIconViewItem *))); + connect(this,TQT_SIGNAL(clicked(TQIconViewItem *,const TQPoint &)),this,TQT_SLOT(redirect_clicked(TQIconViewItem *,const TQPoint &))); + connect(this,TQT_SIGNAL(pressed(TQIconViewItem *)),this,TQT_SLOT(redirect_pressed(TQIconViewItem *))); + connect(this,TQT_SIGNAL(pressed(TQIconViewItem *,const TQPoint &)),this,TQT_SLOT(redirect_pressed(TQIconViewItem *,const TQPoint &))); + connect(this,TQT_SIGNAL(doubleClicked(TQIconViewItem *)),this,TQT_SLOT(redirect_doubleClicked(TQIconViewItem *))); + connect(this,TQT_SIGNAL(returnPressed(TQIconViewItem *)),this,TQT_SLOT(redirect_returnPressed(TQIconViewItem *))); + connect(this,TQT_SIGNAL(rightButtonClicked(TQIconViewItem *,const TQPoint &)),this,TQT_SLOT(redirect_rightButtonClicked(TQIconViewItem *,const TQPoint &))); + connect(this,TQT_SIGNAL(rightButtonPressed(TQIconViewItem *,const TQPoint &)),this,TQT_SLOT(redirect_rightButtonPressed(TQIconViewItem *,const TQPoint &))); + connect(this,TQT_SIGNAL(mouseButtonClicked(int,TQIconViewItem *,const TQPoint &)),this,TQT_SLOT(redirect_mouseButtonClicked(int,TQIconViewItem *,const TQPoint &))); + connect(this,TQT_SIGNAL(mouseButtonPressed(int,TQIconViewItem *,const TQPoint &)),this,TQT_SLOT(redirect_mouseButtonPressed(int,TQIconViewItem *,const TQPoint &))); + connect(this,TQT_SIGNAL(contextMenuRequested(TQIconViewItem *,const TQPoint &)),this,TQT_SLOT(redirect_contextMenuRequested(TQIconViewItem *,const TQPoint &))); + connect(this,TQT_SIGNAL(onItem(TQIconViewItem *)),this,TQT_SLOT(redirect_onItem(TQIconViewItem *))); } - void KviTalIconView::redirect_selectionChanged(QIconViewItem * pItem) + void KviTalIconView::redirect_selectionChanged(TQIconViewItem * pItem) { emit selectionChanged((KviTalIconViewItem *)pItem); } - void KviTalIconView::redirect_currentChanged(QIconViewItem * pItem) + void KviTalIconView::redirect_currentChanged(TQIconViewItem * pItem) { emit currentChanged((KviTalIconViewItem *)pItem); } - void KviTalIconView::redirect_clicked(QIconViewItem * pItem) + void KviTalIconView::redirect_clicked(TQIconViewItem * pItem) { emit clicked((KviTalIconViewItem *)pItem); } - void KviTalIconView::redirect_clicked(QIconViewItem * pItem,const QPoint &pnt) + void KviTalIconView::redirect_clicked(TQIconViewItem * pItem,const TQPoint &pnt) { emit clicked((KviTalIconViewItem *)pItem,pnt); } - void KviTalIconView::redirect_pressed(QIconViewItem * pItem) + void KviTalIconView::redirect_pressed(TQIconViewItem * pItem) { emit pressed((KviTalIconViewItem *)pItem); } - void KviTalIconView::redirect_pressed(QIconViewItem * pItem,const QPoint &pnt) + void KviTalIconView::redirect_pressed(TQIconViewItem * pItem,const TQPoint &pnt) { emit pressed((KviTalIconViewItem *)pItem,pnt); } - void KviTalIconView::redirect_doubleClicked(QIconViewItem * pItem) + void KviTalIconView::redirect_doubleClicked(TQIconViewItem * pItem) { emit doubleClicked((KviTalIconViewItem *)pItem); } - void KviTalIconView::redirect_returnPressed(QIconViewItem * pItem) + void KviTalIconView::redirect_returnPressed(TQIconViewItem * pItem) { emit returnPressed((KviTalIconViewItem *)pItem); } - void KviTalIconView::redirect_rightButtonClicked(QIconViewItem * pItem,const QPoint &pnt) + void KviTalIconView::redirect_rightButtonClicked(TQIconViewItem * pItem,const TQPoint &pnt) { emit rightButtonClicked((KviTalIconViewItem *)pItem,pnt); } - void KviTalIconView::redirect_rightButtonPressed(QIconViewItem * pItem,const QPoint &pnt) + void KviTalIconView::redirect_rightButtonPressed(TQIconViewItem * pItem,const TQPoint &pnt) { emit rightButtonPressed((KviTalIconViewItem *)pItem,pnt); } - void KviTalIconView::redirect_mouseButtonClicked(int iButton,QIconViewItem * pItem,const QPoint &pnt) + void KviTalIconView::redirect_mouseButtonClicked(int iButton,TQIconViewItem * pItem,const TQPoint &pnt) { emit mouseButtonClicked(iButton,(KviTalIconViewItem *)pItem,pnt); } - void KviTalIconView::redirect_mouseButtonPressed(int iButton,QIconViewItem * pItem,const QPoint &pnt) + void KviTalIconView::redirect_mouseButtonPressed(int iButton,TQIconViewItem * pItem,const TQPoint &pnt) { emit mouseButtonPressed(iButton,(KviTalIconViewItem *)pItem,pnt); } - void KviTalIconView::redirect_contextMenuRequested(QIconViewItem * pItem,const QPoint &pnt) + void KviTalIconView::redirect_contextMenuRequested(TQIconViewItem * pItem,const TQPoint &pnt) { emit contextMenuRequested((KviTalIconViewItem *)pItem,pnt); } - void KviTalIconView::redirect_onItem(QIconViewItem * pItem) + void KviTalIconView::redirect_onItem(TQIconViewItem * pItem) { emit onItem((KviTalIconViewItem *)pItem); } diff --git a/src/kvilib/tal/kvi_tal_iconview_qt3.h b/src/kvilib/tal/kvi_tal_iconview_qt3.h index 7cfec586..73d367c6 100644 --- a/src/kvilib/tal/kvi_tal_iconview_qt3.h +++ b/src/kvilib/tal/kvi_tal_iconview_qt3.h @@ -28,72 +28,73 @@ #include "kvi_settings.h" #include "kvi_qstring.h" -#include +#include class KviTalIconViewItem; -class KVILIB_API KviTalIconView : public QIconView +class KVILIB_API KviTalIconView : public TQIconView { Q_OBJECT + TQ_OBJECT public: - KviTalIconView(QWidget * pParent,Qt::WFlags f = 0); + KviTalIconView(TQWidget * pParent,TQt::WFlags f = 0); virtual ~KviTalIconView() {}; signals: void selectionChanged(KviTalIconViewItem * pItem); void currentChanged(KviTalIconViewItem * pItem); void clicked(KviTalIconViewItem * pItem); - void clicked(KviTalIconViewItem * pItem,const QPoint &pnt); + void clicked(KviTalIconViewItem * pItem,const TQPoint &pnt); void pressed(KviTalIconViewItem * pItem); - void pressed(KviTalIconViewItem * pItem,const QPoint &pnt); + void pressed(KviTalIconViewItem * pItem,const TQPoint &pnt); void doubleClicked(KviTalIconViewItem * pItem); void returnPressed(KviTalIconViewItem * pItem); - void rightButtonClicked(KviTalIconViewItem * pItem,const QPoint &pnt); - void rightButtonPressed(KviTalIconViewItem * pItem,const QPoint &pnt); - void mouseButtonClicked(int iButton,KviTalIconViewItem * pItem,const QPoint &pnt); - void mouseButtonPressed(int iButton,KviTalIconViewItem * pItem,const QPoint &pnt); - void contextMenuRequested(KviTalIconViewItem * pItem,const QPoint &pnt); + void rightButtonClicked(KviTalIconViewItem * pItem,const TQPoint &pnt); + void rightButtonPressed(KviTalIconViewItem * pItem,const TQPoint &pnt); + void mouseButtonClicked(int iButton,KviTalIconViewItem * pItem,const TQPoint &pnt); + void mouseButtonPressed(int iButton,KviTalIconViewItem * pItem,const TQPoint &pnt); + void contextMenuRequested(KviTalIconViewItem * pItem,const TQPoint &pnt); void onItem(KviTalIconViewItem * pItem); protected slots: - void redirect_selectionChanged(QIconViewItem * pItem); - void redirect_currentChanged(QIconViewItem * pItem); - void redirect_clicked(QIconViewItem * pItem); - void redirect_clicked(QIconViewItem * pItem,const QPoint &pnt); - void redirect_pressed(QIconViewItem * pItem); - void redirect_pressed(QIconViewItem * pItem,const QPoint &pnt); - void redirect_doubleClicked(QIconViewItem * pItem); - void redirect_returnPressed(QIconViewItem * pItem); - void redirect_rightButtonClicked(QIconViewItem * pItem,const QPoint &pnt); - void redirect_rightButtonPressed(QIconViewItem * pItem,const QPoint &pnt); - void redirect_mouseButtonClicked(int iButton,QIconViewItem * pItem,const QPoint &pnt); - void redirect_mouseButtonPressed(int iButton,QIconViewItem * pItem,const QPoint &pnt); - void redirect_contextMenuRequested(QIconViewItem * pItem,const QPoint &pnt); - void redirect_onItem(QIconViewItem * pItem); + void redirect_selectionChanged(TQIconViewItem * pItem); + void redirect_currentChanged(TQIconViewItem * pItem); + void redirect_clicked(TQIconViewItem * pItem); + void redirect_clicked(TQIconViewItem * pItem,const TQPoint &pnt); + void redirect_pressed(TQIconViewItem * pItem); + void redirect_pressed(TQIconViewItem * pItem,const TQPoint &pnt); + void redirect_doubleClicked(TQIconViewItem * pItem); + void redirect_returnPressed(TQIconViewItem * pItem); + void redirect_rightButtonClicked(TQIconViewItem * pItem,const TQPoint &pnt); + void redirect_rightButtonPressed(TQIconViewItem * pItem,const TQPoint &pnt); + void redirect_mouseButtonClicked(int iButton,TQIconViewItem * pItem,const TQPoint &pnt); + void redirect_mouseButtonPressed(int iButton,TQIconViewItem * pItem,const TQPoint &pnt); + void redirect_contextMenuRequested(TQIconViewItem * pItem,const TQPoint &pnt); + void redirect_onItem(TQIconViewItem * pItem); public: - KviTalIconViewItem * firstItem() const { return (KviTalIconViewItem *)QIconView::firstItem(); }; - KviTalIconViewItem * lastItem() const { return (KviTalIconViewItem *)QIconView::lastItem(); }; - KviTalIconViewItem * currentItem() const { return (KviTalIconViewItem *)QIconView::currentItem(); }; + KviTalIconViewItem * firstItem() const { return (KviTalIconViewItem *)TQIconView::firstItem(); }; + KviTalIconViewItem * lastItem() const { return (KviTalIconViewItem *)TQIconView::lastItem(); }; + KviTalIconViewItem * currentItem() const { return (KviTalIconViewItem *)TQIconView::currentItem(); }; }; -class KVILIB_API KviTalIconViewItem : public QIconViewItem +class KVILIB_API KviTalIconViewItem : public TQIconViewItem { public: - KviTalIconViewItem(KviTalIconView * parent) - : QIconViewItem(parent) {}; - KviTalIconViewItem(KviTalIconView * parent,KviTalIconViewItem * after) - : QIconViewItem(parent,after) {}; - KviTalIconViewItem(KviTalIconView * parent, const QString & text) - : QIconViewItem(parent,text) {}; - KviTalIconViewItem(KviTalIconView * parent, KviTalIconViewItem * after, const QString & text) - : QIconViewItem(parent,after,text) {}; - KviTalIconViewItem(KviTalIconView * parent, const QString & text, const QPixmap & icon) - : QIconViewItem(parent,text,icon) {}; - KviTalIconViewItem(KviTalIconView * parent, KviTalIconViewItem * after, const QString & text, const QPixmap & icon) - : QIconViewItem(parent,after,text,icon) {}; + KviTalIconViewItem(KviTalIconView * tqparent) + : TQIconViewItem(tqparent) {}; + KviTalIconViewItem(KviTalIconView * tqparent,KviTalIconViewItem * after) + : TQIconViewItem(tqparent,after) {}; + KviTalIconViewItem(KviTalIconView * tqparent, const TQString & text) + : TQIconViewItem(tqparent,text) {}; + KviTalIconViewItem(KviTalIconView * tqparent, KviTalIconViewItem * after, const TQString & text) + : TQIconViewItem(tqparent,after,text) {}; + KviTalIconViewItem(KviTalIconView * tqparent, const TQString & text, const TQPixmap & icon) + : TQIconViewItem(tqparent,text,icon) {}; + KviTalIconViewItem(KviTalIconView * tqparent, KviTalIconViewItem * after, const TQString & text, const TQPixmap & icon) + : TQIconViewItem(tqparent,after,text,icon) {}; public: - KviTalIconView * iconView() const { return (KviTalIconView *)QIconViewItem::iconView(); }; - KviTalIconViewItem * prevItem() const { return (KviTalIconViewItem *)QIconViewItem::prevItem(); }; - KviTalIconViewItem * nextItem() const { return (KviTalIconViewItem *)QIconViewItem::nextItem(); }; + KviTalIconView * iconView() const { return (KviTalIconView *)TQIconViewItem::iconView(); }; + KviTalIconViewItem * prevItem() const { return (KviTalIconViewItem *)TQIconViewItem::prevItem(); }; + KviTalIconViewItem * nextItem() const { return (KviTalIconViewItem *)TQIconViewItem::nextItem(); }; }; diff --git a/src/kvilib/tal/kvi_tal_iconview_qt4.h b/src/kvilib/tal/kvi_tal_iconview_qt4.h index 899acaac..99554341 100644 --- a/src/kvilib/tal/kvi_tal_iconview_qt4.h +++ b/src/kvilib/tal/kvi_tal_iconview_qt4.h @@ -28,45 +28,46 @@ #include "kvi_settings.h" #include "kvi_qstring.h" -#include +#include class KviTalIconViewItem; class KVILIB_API KviTalIconView : public Q3IconView { Q_OBJECT + TQ_OBJECT public: - KviTalIconView(QWidget * pParent,Qt::WFlags f = 0); + KviTalIconView(TQWidget * pParent,TQt::WFlags f = 0); virtual ~KviTalIconView() {}; signals: void selectionChanged(KviTalIconViewItem * pItem); void currentChanged(KviTalIconViewItem * pItem); void clicked(KviTalIconViewItem * pItem); - void clicked(KviTalIconViewItem * pItem,const QPoint &pnt); + void clicked(KviTalIconViewItem * pItem,const TQPoint &pnt); void pressed(KviTalIconViewItem * pItem); - void pressed(KviTalIconViewItem * pItem,const QPoint &pnt); + void pressed(KviTalIconViewItem * pItem,const TQPoint &pnt); void doubleClicked(KviTalIconViewItem * pItem); void returnPressed(KviTalIconViewItem * pItem); - void rightButtonClicked(KviTalIconViewItem * pItem,const QPoint &pnt); - void rightButtonPressed(KviTalIconViewItem * pItem,const QPoint &pnt); - void mouseButtonClicked(int iButton,KviTalIconViewItem * pItem,const QPoint &pnt); - void mouseButtonPressed(int iButton,KviTalIconViewItem * pItem,const QPoint &pnt); - void contextMenuRequested(KviTalIconViewItem * pItem,const QPoint &pnt); + void rightButtonClicked(KviTalIconViewItem * pItem,const TQPoint &pnt); + void rightButtonPressed(KviTalIconViewItem * pItem,const TQPoint &pnt); + void mouseButtonClicked(int iButton,KviTalIconViewItem * pItem,const TQPoint &pnt); + void mouseButtonPressed(int iButton,KviTalIconViewItem * pItem,const TQPoint &pnt); + void contextMenuRequested(KviTalIconViewItem * pItem,const TQPoint &pnt); void onItem(KviTalIconViewItem * pItem); protected slots: void redirect_selectionChanged(Q3IconViewItem * pItem); void redirect_currentChanged(Q3IconViewItem * pItem); void redirect_clicked(Q3IconViewItem * pItem); - void redirect_clicked(Q3IconViewItem * pItem,const QPoint &pnt); + void redirect_clicked(Q3IconViewItem * pItem,const TQPoint &pnt); void redirect_pressed(Q3IconViewItem * pItem); - void redirect_pressed(Q3IconViewItem * pItem,const QPoint &pnt); + void redirect_pressed(Q3IconViewItem * pItem,const TQPoint &pnt); void redirect_doubleClicked(Q3IconViewItem * pItem); void redirect_returnPressed(Q3IconViewItem * pItem); - void redirect_rightButtonClicked(Q3IconViewItem * pItem,const QPoint &pnt); - void redirect_rightButtonPressed(Q3IconViewItem * pItem,const QPoint &pnt); - void redirect_mouseButtonClicked(int iButton,Q3IconViewItem * pItem,const QPoint &pnt); - void redirect_mouseButtonPressed(int iButton,Q3IconViewItem * pItem,const QPoint &pnt); - void redirect_contextMenuRequested(Q3IconViewItem * pItem,const QPoint &pnt); + void redirect_rightButtonClicked(Q3IconViewItem * pItem,const TQPoint &pnt); + void redirect_rightButtonPressed(Q3IconViewItem * pItem,const TQPoint &pnt); + void redirect_mouseButtonClicked(int iButton,Q3IconViewItem * pItem,const TQPoint &pnt); + void redirect_mouseButtonPressed(int iButton,Q3IconViewItem * pItem,const TQPoint &pnt); + void redirect_contextMenuRequested(Q3IconViewItem * pItem,const TQPoint &pnt); void redirect_onItem(Q3IconViewItem * pItem); public: KviTalIconViewItem * firstItem() const { return (KviTalIconViewItem *)Q3IconView::firstItem(); }; @@ -77,18 +78,18 @@ public: class KVILIB_API KviTalIconViewItem : public Q3IconViewItem { public: - KviTalIconViewItem(KviTalIconView * parent) - : Q3IconViewItem(parent) {}; - KviTalIconViewItem(KviTalIconView * parent,KviTalIconViewItem * after) - : Q3IconViewItem(parent,after) {}; - KviTalIconViewItem(KviTalIconView * parent, const QString & text) - : Q3IconViewItem(parent,text) {}; - KviTalIconViewItem(KviTalIconView * parent, KviTalIconViewItem * after, const QString & text) - : Q3IconViewItem(parent,after,text) {}; - KviTalIconViewItem(KviTalIconView * parent, const QString & text, const QPixmap & icon) - : Q3IconViewItem(parent,text,icon) {}; - KviTalIconViewItem(KviTalIconView * parent, KviTalIconViewItem * after, const QString & text, const QPixmap & icon) - : Q3IconViewItem(parent,after,text,icon) {}; + KviTalIconViewItem(KviTalIconView * tqparent) + : Q3IconViewItem(tqparent) {}; + KviTalIconViewItem(KviTalIconView * tqparent,KviTalIconViewItem * after) + : Q3IconViewItem(tqparent,after) {}; + KviTalIconViewItem(KviTalIconView * tqparent, const TQString & text) + : Q3IconViewItem(tqparent,text) {}; + KviTalIconViewItem(KviTalIconView * tqparent, KviTalIconViewItem * after, const TQString & text) + : Q3IconViewItem(tqparent,after,text) {}; + KviTalIconViewItem(KviTalIconView * tqparent, const TQString & text, const TQPixmap & icon) + : Q3IconViewItem(tqparent,text,icon) {}; + KviTalIconViewItem(KviTalIconView * tqparent, KviTalIconViewItem * after, const TQString & text, const TQPixmap & icon) + : Q3IconViewItem(tqparent,after,text,icon) {}; public: KviTalIconView * iconView() const { return (KviTalIconView *)Q3IconViewItem::iconView(); }; KviTalIconViewItem * prevItem() const { return (KviTalIconViewItem *)Q3IconViewItem::prevItem(); }; diff --git a/src/kvilib/tal/kvi_tal_listbox.cpp b/src/kvilib/tal/kvi_tal_listbox.cpp index f5fcc087..e96cc012 100644 --- a/src/kvilib/tal/kvi_tal_listbox.cpp +++ b/src/kvilib/tal/kvi_tal_listbox.cpp @@ -26,29 +26,29 @@ #include "kvi_tal_listbox.h" #ifdef COMPILE_USE_QT4 - #include - #include - #include + #include + #include + #include - KviTalListBox::KviTalListBox(QWidget * pParent,Qt::WFlags f) + KviTalListBox::KviTalListBox(TQWidget * pParent,TQt::WFlags f) : Q3ListBox(pParent,0,f) { - connect(this,SIGNAL(highlighted(Q3ListBoxItem *)),this,SLOT(redirect_highlighted(Q3ListBoxItem *))); - connect(this,SIGNAL(selected(Q3ListBoxItem *)),this,SLOT(redirect_selected(Q3ListBoxItem *))); - connect(this,SIGNAL(selectionChanged(Q3ListBoxItem *)),this,SLOT(redirect_selectionChanged(Q3ListBoxItem *))); - connect(this,SIGNAL(currentChanged(Q3ListBoxItem *)),this,SLOT(redirect_currentChanged(Q3ListBoxItem *))); - connect(this,SIGNAL(clicked(Q3ListBoxItem *)),this,SLOT(redirect_clicked(Q3ListBoxItem *))); - connect(this,SIGNAL(clicked(Q3ListBoxItem *,const QPoint &)),this,SLOT(redirect_clicked(Q3ListBoxItem *,const QPoint &))); - connect(this,SIGNAL(pressed(Q3ListBoxItem *)),this,SLOT(redirect_pressed(Q3ListBoxItem *))); - connect(this,SIGNAL(pressed(Q3ListBoxItem *,const QPoint &)),this,SLOT(redirect_pressed(Q3ListBoxItem *,const QPoint &))); - connect(this,SIGNAL(doubleClicked(Q3ListBoxItem *)),this,SLOT(redirect_doubleClicked(Q3ListBoxItem *))); - connect(this,SIGNAL(returnPressed(Q3ListBoxItem *)),this,SLOT(redirect_returnPressed(Q3ListBoxItem *))); - connect(this,SIGNAL(rightButtonClicked(Q3ListBoxItem *, const QPoint &)),this,SLOT(redirect_rightButtonClicked(Q3ListBoxItem *, const QPoint &))); - connect(this,SIGNAL(rightButtonPressed(Q3ListBoxItem *, const QPoint &)),this,SLOT(redirect_rightButtonPressed(Q3ListBoxItem *, const QPoint &))); - connect(this,SIGNAL(mouseButtonPressed(int,Q3ListBoxItem *,const QPoint &)),this,SLOT(redirect_mouseButtonPressed(int,Q3ListBoxItem *,const QPoint &))); - connect(this,SIGNAL(mouseButtonClicked(int,Q3ListBoxItem *,const QPoint &)),this,SLOT(redirect_mouseButtonClicked(int,Q3ListBoxItem *,const QPoint &))); - connect(this,SIGNAL(contextMenuRequested(Q3ListBoxItem *,const QPoint &)),this,SLOT(redirect_contextMenuRequested(Q3ListBoxItem *,const QPoint &))); - connect(this,SIGNAL(onItem(Q3ListBoxItem *)),this,SLOT(redirect_onItem(Q3ListBoxItem *))); + connect(this,TQT_SIGNAL(highlighted(Q3ListBoxItem *)),this,TQT_SLOT(redirect_highlighted(Q3ListBoxItem *))); + connect(this,TQT_SIGNAL(selected(Q3ListBoxItem *)),this,TQT_SLOT(redirect_selected(Q3ListBoxItem *))); + connect(this,TQT_SIGNAL(selectionChanged(Q3ListBoxItem *)),this,TQT_SLOT(redirect_selectionChanged(Q3ListBoxItem *))); + connect(this,TQT_SIGNAL(currentChanged(Q3ListBoxItem *)),this,TQT_SLOT(redirect_currentChanged(Q3ListBoxItem *))); + connect(this,TQT_SIGNAL(clicked(Q3ListBoxItem *)),this,TQT_SLOT(redirect_clicked(Q3ListBoxItem *))); + connect(this,TQT_SIGNAL(clicked(Q3ListBoxItem *,const TQPoint &)),this,TQT_SLOT(redirect_clicked(Q3ListBoxItem *,const TQPoint &))); + connect(this,TQT_SIGNAL(pressed(Q3ListBoxItem *)),this,TQT_SLOT(redirect_pressed(Q3ListBoxItem *))); + connect(this,TQT_SIGNAL(pressed(Q3ListBoxItem *,const TQPoint &)),this,TQT_SLOT(redirect_pressed(Q3ListBoxItem *,const TQPoint &))); + connect(this,TQT_SIGNAL(doubleClicked(Q3ListBoxItem *)),this,TQT_SLOT(redirect_doubleClicked(Q3ListBoxItem *))); + connect(this,TQT_SIGNAL(returnPressed(Q3ListBoxItem *)),this,TQT_SLOT(redirect_returnPressed(Q3ListBoxItem *))); + connect(this,TQT_SIGNAL(rightButtonClicked(Q3ListBoxItem *, const TQPoint &)),this,TQT_SLOT(redirect_rightButtonClicked(Q3ListBoxItem *, const TQPoint &))); + connect(this,TQT_SIGNAL(rightButtonPressed(Q3ListBoxItem *, const TQPoint &)),this,TQT_SLOT(redirect_rightButtonPressed(Q3ListBoxItem *, const TQPoint &))); + connect(this,TQT_SIGNAL(mouseButtonPressed(int,Q3ListBoxItem *,const TQPoint &)),this,TQT_SLOT(redirect_mouseButtonPressed(int,Q3ListBoxItem *,const TQPoint &))); + connect(this,TQT_SIGNAL(mouseButtonClicked(int,Q3ListBoxItem *,const TQPoint &)),this,TQT_SLOT(redirect_mouseButtonClicked(int,Q3ListBoxItem *,const TQPoint &))); + connect(this,TQT_SIGNAL(contextMenuRequested(Q3ListBoxItem *,const TQPoint &)),this,TQT_SLOT(redirect_contextMenuRequested(Q3ListBoxItem *,const TQPoint &))); + connect(this,TQT_SIGNAL(onItem(Q3ListBoxItem *)),this,TQT_SLOT(redirect_onItem(Q3ListBoxItem *))); } void KviTalListBox::redirect_highlighted(Q3ListBoxItem *item) @@ -76,7 +76,7 @@ emit clicked((KviTalListBoxItem *)item); } - void KviTalListBox::redirect_clicked(Q3ListBoxItem * item,const QPoint & pnt) + void KviTalListBox::redirect_clicked(Q3ListBoxItem * item,const TQPoint & pnt) { emit clicked((KviTalListBoxItem *)item,pnt); } @@ -86,7 +86,7 @@ emit pressed((KviTalListBoxItem *)item); } - void KviTalListBox::redirect_pressed(Q3ListBoxItem * item,const QPoint & pnt) + void KviTalListBox::redirect_pressed(Q3ListBoxItem * item,const TQPoint & pnt) { emit pressed((KviTalListBoxItem *)item,pnt); } @@ -101,27 +101,27 @@ emit returnPressed((KviTalListBoxItem *)item); } - void KviTalListBox::redirect_rightButtonClicked(Q3ListBoxItem * item, const QPoint &pnt) + void KviTalListBox::redirect_rightButtonClicked(Q3ListBoxItem * item, const TQPoint &pnt) { emit rightButtonClicked((KviTalListBoxItem *)item,pnt); } - void KviTalListBox::redirect_rightButtonPressed(Q3ListBoxItem * item, const QPoint &pnt) + void KviTalListBox::redirect_rightButtonPressed(Q3ListBoxItem * item, const TQPoint &pnt) { emit rightButtonPressed((KviTalListBoxItem *)item,pnt); } - void KviTalListBox::redirect_mouseButtonPressed(int button,Q3ListBoxItem * item,const QPoint & pos) + void KviTalListBox::redirect_mouseButtonPressed(int button,Q3ListBoxItem * item,const TQPoint & pos) { emit mouseButtonPressed(button,(KviTalListBoxItem *)item,pos); } - void KviTalListBox::redirect_mouseButtonClicked(int button,Q3ListBoxItem * item,const QPoint & pos) + void KviTalListBox::redirect_mouseButtonClicked(int button,Q3ListBoxItem * item,const TQPoint & pos) { emit mouseButtonClicked(button,(KviTalListBoxItem *)item,pos); } - void KviTalListBox::redirect_contextMenuRequested(Q3ListBoxItem * item,const QPoint & pos) + void KviTalListBox::redirect_contextMenuRequested(Q3ListBoxItem * item,const TQPoint & pos) { emit contextMenuRequested((KviTalListBoxItem *)item,pos); } @@ -131,19 +131,19 @@ emit onItem((KviTalListBoxItem *)i); } - KviTalListBoxText::KviTalListBoxText(KviTalListBox *listbox, const QString &text) + KviTalListBoxText::KviTalListBoxText(KviTalListBox *listbox, const TQString &text) :KviTalListBoxItem(listbox) { setText(text); } - KviTalListBoxText::KviTalListBoxText(const QString &text) + KviTalListBoxText::KviTalListBoxText(const TQString &text) :KviTalListBoxItem() { setText(text); } - KviTalListBoxText::KviTalListBoxText(KviTalListBox* listbox, const QString &text, KviTalListBoxItem *after) + KviTalListBoxText::KviTalListBoxText(KviTalListBox* listbox, const TQString &text, KviTalListBoxItem *after) : KviTalListBoxItem(listbox, after) { setText(text); @@ -153,10 +153,10 @@ { } - void KviTalListBoxText::paint(QPainter *painter) + void KviTalListBoxText::paint(TQPainter *painter) { int itemHeight = height(listBox()); - QFontMetrics fm = painter->fontMetrics(); + TQFontMetrics fm = painter->fontMetrics(); int yPos = ((itemHeight - fm.height()) / 2) + fm.ascent(); painter->drawText(3, yPos, text()); } @@ -164,13 +164,13 @@ int KviTalListBoxText::height(const KviTalListBox* lb) const { int h = lb ? lb->fontMetrics().lineSpacing() + 2 : 0; - return qMax(h, QApplication::globalStrut().height()); + return qMax(h, TQApplication::globalStrut().height()); } int KviTalListBoxText::width(const KviTalListBox* lb) const { int w = lb ? lb->fontMetrics().width(text()) + 6 : 0; - return qMax(w, QApplication::globalStrut().width()); + return qMax(w, TQApplication::globalStrut().width()); } int KviTalListBoxText::rtti() const @@ -178,19 +178,19 @@ return RTTI; } - KviTalListBoxPixmap::KviTalListBoxPixmap(KviTalListBox* listbox, const QPixmap &pixmap) + KviTalListBoxPixmap::KviTalListBoxPixmap(KviTalListBox* listbox, const TQPixmap &pixmap) : KviTalListBoxItem(listbox) { pm = pixmap; } - KviTalListBoxPixmap::KviTalListBoxPixmap(const QPixmap &pixmap) + KviTalListBoxPixmap::KviTalListBoxPixmap(const TQPixmap &pixmap) : KviTalListBoxItem() { pm = pixmap; } - KviTalListBoxPixmap::KviTalListBoxPixmap(KviTalListBox* listbox, const QPixmap &pixmap, KviTalListBoxItem *after) + KviTalListBoxPixmap::KviTalListBoxPixmap(KviTalListBox* listbox, const TQPixmap &pixmap, KviTalListBoxItem *after) : KviTalListBoxItem(listbox, after) { pm = pixmap; @@ -200,21 +200,21 @@ { } - KviTalListBoxPixmap::KviTalListBoxPixmap(KviTalListBox* listbox, const QPixmap &pix, const QString& text) + KviTalListBoxPixmap::KviTalListBoxPixmap(KviTalListBox* listbox, const TQPixmap &pix, const TQString& text) : KviTalListBoxItem(listbox) { pm = pix; setText(text); } - KviTalListBoxPixmap::KviTalListBoxPixmap(const QPixmap & pix, const QString& text) + KviTalListBoxPixmap::KviTalListBoxPixmap(const TQPixmap & pix, const TQString& text) : KviTalListBoxItem() { pm = pix; setText(text); } - KviTalListBoxPixmap::KviTalListBoxPixmap(KviTalListBox* listbox, const QPixmap & pix, const QString& text, + KviTalListBoxPixmap::KviTalListBoxPixmap(KviTalListBox* listbox, const TQPixmap & pix, const TQString& text, KviTalListBoxItem *after) : KviTalListBoxItem(listbox, after) { @@ -222,19 +222,19 @@ setText(text); } - void KviTalListBoxPixmap::paint(QPainter *painter) + void KviTalListBoxPixmap::paint(TQPainter *painter) { int itemHeight = height(listBox()); int yPos; - const QPixmap *pm = pixmap(); + const TQPixmap *pm = pixmap(); if (pm && ! pm->isNull()) { yPos = (itemHeight - pm->height()) / 2; painter->drawPixmap(3, yPos, *pm); } if (!text().isEmpty()) { - QFontMetrics fm = painter->fontMetrics(); + TQFontMetrics fm = painter->fontMetrics(); yPos = ((itemHeight - fm.height()) / 2) + fm.ascent(); painter->drawText(pm->width() + 5, yPos, text()); } @@ -247,15 +247,15 @@ h = pm.height(); else h = qMax(pm.height(), lb->fontMetrics().lineSpacing() + 2); - return qMax(h, QApplication::globalStrut().height()); + return qMax(h, TQApplication::globalStrut().height()); } int KviTalListBoxPixmap::width(const KviTalListBox* lb) const { if (text().isEmpty()) - return qMax(pm.width() + 6, QApplication::globalStrut().width()); + return qMax(pm.width() + 6, TQApplication::globalStrut().width()); return qMax(pm.width() + lb->fontMetrics().width(text()) + 6, - QApplication::globalStrut().width()); + TQApplication::globalStrut().width()); } int KviTalListBoxPixmap::rtti() const @@ -266,125 +266,125 @@ #include "kvi_tal_listbox_qt4.moc" #else - #include - #include - #include - - - KviTalListBox::KviTalListBox(QWidget * pParent,Qt::WFlags f) - : QListBox(pParent,0,f) - { - connect(this,SIGNAL(highlighted(QListBoxItem *)),this,SLOT(redirect_highlighted(QListBoxItem *))); - connect(this,SIGNAL(selected(QListBoxItem *)),this,SLOT(redirect_selected(QListBoxItem *))); - connect(this,SIGNAL(selectionChanged(QListBoxItem *)),this,SLOT(redirect_selectionChanged(QListBoxItem *))); - connect(this,SIGNAL(currentChanged(QListBoxItem *)),this,SLOT(redirect_currentChanged(QListBoxItem *))); - connect(this,SIGNAL(clicked(QListBoxItem *)),this,SLOT(redirect_clicked(QListBoxItem *))); - connect(this,SIGNAL(clicked(QListBoxItem *,const QPoint &)),this,SLOT(redirect_clicked(QListBoxItem *,const QPoint &))); - connect(this,SIGNAL(pressed(QListBoxItem *)),this,SLOT(redirect_pressed(QListBoxItem *))); - connect(this,SIGNAL(pressed(QListBoxItem *,const QPoint &)),this,SLOT(redirect_pressed(QListBoxItem *,const QPoint &))); - connect(this,SIGNAL(doubleClicked(QListBoxItem *)),this,SLOT(redirect_doubleClicked(QListBoxItem *))); - connect(this,SIGNAL(returnPressed(QListBoxItem *)),this,SLOT(redirect_returnPressed(QListBoxItem *))); - connect(this,SIGNAL(rightButtonClicked(QListBoxItem *, const QPoint &)),this,SLOT(redirect_rightButtonClicked(QListBoxItem *, const QPoint &))); - connect(this,SIGNAL(rightButtonPressed(QListBoxItem *, const QPoint &)),this,SLOT(redirect_rightButtonPressed(QListBoxItem *, const QPoint &))); - connect(this,SIGNAL(mouseButtonPressed(int,QListBoxItem *,const QPoint &)),this,SLOT(redirect_mouseButtonPressed(int,QListBoxItem *,const QPoint &))); - connect(this,SIGNAL(mouseButtonClicked(int,QListBoxItem *,const QPoint &)),this,SLOT(redirect_mouseButtonClicked(int,QListBoxItem *,const QPoint &))); - connect(this,SIGNAL(contextMenuRequested(QListBoxItem *,const QPoint &)),this,SLOT(redirect_contextMenuRequested(QListBoxItem *,const QPoint &))); - connect(this,SIGNAL(onItem(QListBoxItem *)),this,SLOT(redirect_onItem(QListBoxItem *))); - } - - void KviTalListBox::redirect_highlighted(QListBoxItem *item) + #include + #include + #include + + + KviTalListBox::KviTalListBox(TQWidget * pParent,TQt::WFlags f) + : TQListBox(pParent,0,f) + { + connect(this,TQT_SIGNAL(highlighted(TQListBoxItem *)),this,TQT_SLOT(redirect_highlighted(TQListBoxItem *))); + connect(this,TQT_SIGNAL(selected(TQListBoxItem *)),this,TQT_SLOT(redirect_selected(TQListBoxItem *))); + connect(this,TQT_SIGNAL(selectionChanged(TQListBoxItem *)),this,TQT_SLOT(redirect_selectionChanged(TQListBoxItem *))); + connect(this,TQT_SIGNAL(currentChanged(TQListBoxItem *)),this,TQT_SLOT(redirect_currentChanged(TQListBoxItem *))); + connect(this,TQT_SIGNAL(clicked(TQListBoxItem *)),this,TQT_SLOT(redirect_clicked(TQListBoxItem *))); + connect(this,TQT_SIGNAL(clicked(TQListBoxItem *,const TQPoint &)),this,TQT_SLOT(redirect_clicked(TQListBoxItem *,const TQPoint &))); + connect(this,TQT_SIGNAL(pressed(TQListBoxItem *)),this,TQT_SLOT(redirect_pressed(TQListBoxItem *))); + connect(this,TQT_SIGNAL(pressed(TQListBoxItem *,const TQPoint &)),this,TQT_SLOT(redirect_pressed(TQListBoxItem *,const TQPoint &))); + connect(this,TQT_SIGNAL(doubleClicked(TQListBoxItem *)),this,TQT_SLOT(redirect_doubleClicked(TQListBoxItem *))); + connect(this,TQT_SIGNAL(returnPressed(TQListBoxItem *)),this,TQT_SLOT(redirect_returnPressed(TQListBoxItem *))); + connect(this,TQT_SIGNAL(rightButtonClicked(TQListBoxItem *, const TQPoint &)),this,TQT_SLOT(redirect_rightButtonClicked(TQListBoxItem *, const TQPoint &))); + connect(this,TQT_SIGNAL(rightButtonPressed(TQListBoxItem *, const TQPoint &)),this,TQT_SLOT(redirect_rightButtonPressed(TQListBoxItem *, const TQPoint &))); + connect(this,TQT_SIGNAL(mouseButtonPressed(int,TQListBoxItem *,const TQPoint &)),this,TQT_SLOT(redirect_mouseButtonPressed(int,TQListBoxItem *,const TQPoint &))); + connect(this,TQT_SIGNAL(mouseButtonClicked(int,TQListBoxItem *,const TQPoint &)),this,TQT_SLOT(redirect_mouseButtonClicked(int,TQListBoxItem *,const TQPoint &))); + connect(this,TQT_SIGNAL(contextMenuRequested(TQListBoxItem *,const TQPoint &)),this,TQT_SLOT(redirect_contextMenuRequested(TQListBoxItem *,const TQPoint &))); + connect(this,TQT_SIGNAL(onItem(TQListBoxItem *)),this,TQT_SLOT(redirect_onItem(TQListBoxItem *))); + } + + void KviTalListBox::redirect_highlighted(TQListBoxItem *item) { emit highlighted((KviTalListBoxItem *)item); } - void KviTalListBox::redirect_selected(QListBoxItem *item) + void KviTalListBox::redirect_selected(TQListBoxItem *item) { emit selected((KviTalListBoxItem *)item); } - void KviTalListBox::redirect_selectionChanged(QListBoxItem * item) + void KviTalListBox::redirect_selectionChanged(TQListBoxItem * item) { emit selectionChanged((KviTalListBoxItem *)item); } - void KviTalListBox::redirect_currentChanged(QListBoxItem * item) + void KviTalListBox::redirect_currentChanged(TQListBoxItem * item) { emit currentChanged((KviTalListBoxItem *)item); } - void KviTalListBox::redirect_clicked(QListBoxItem * item) + void KviTalListBox::redirect_clicked(TQListBoxItem * item) { emit clicked((KviTalListBoxItem *)item); } - void KviTalListBox::redirect_clicked(QListBoxItem * item,const QPoint & pnt) + void KviTalListBox::redirect_clicked(TQListBoxItem * item,const TQPoint & pnt) { emit clicked((KviTalListBoxItem *)item,pnt); } - void KviTalListBox::redirect_pressed(QListBoxItem * item) + void KviTalListBox::redirect_pressed(TQListBoxItem * item) { emit pressed((KviTalListBoxItem *)item); } - void KviTalListBox::redirect_pressed(QListBoxItem * item,const QPoint & pnt) + void KviTalListBox::redirect_pressed(TQListBoxItem * item,const TQPoint & pnt) { emit pressed((KviTalListBoxItem *)item,pnt); } - void KviTalListBox::redirect_doubleClicked(QListBoxItem * item) + void KviTalListBox::redirect_doubleClicked(TQListBoxItem * item) { emit doubleClicked((KviTalListBoxItem *)item); } - void KviTalListBox::redirect_returnPressed(QListBoxItem * item) + void KviTalListBox::redirect_returnPressed(TQListBoxItem * item) { emit returnPressed((KviTalListBoxItem *)item); } - void KviTalListBox::redirect_rightButtonClicked(QListBoxItem * item, const QPoint &pnt) + void KviTalListBox::redirect_rightButtonClicked(TQListBoxItem * item, const TQPoint &pnt) { emit rightButtonClicked((KviTalListBoxItem *)item,pnt); } - void KviTalListBox::redirect_rightButtonPressed(QListBoxItem * item, const QPoint &pnt) + void KviTalListBox::redirect_rightButtonPressed(TQListBoxItem * item, const TQPoint &pnt) { emit rightButtonPressed((KviTalListBoxItem *)item,pnt); } - void KviTalListBox::redirect_mouseButtonPressed(int button,QListBoxItem * item,const QPoint & pos) + void KviTalListBox::redirect_mouseButtonPressed(int button,TQListBoxItem * item,const TQPoint & pos) { emit mouseButtonPressed(button,(KviTalListBoxItem *)item,pos); } - void KviTalListBox::redirect_mouseButtonClicked(int button,QListBoxItem * item,const QPoint & pos) + void KviTalListBox::redirect_mouseButtonClicked(int button,TQListBoxItem * item,const TQPoint & pos) { emit mouseButtonClicked(button,(KviTalListBoxItem *)item,pos); } - void KviTalListBox::redirect_contextMenuRequested(QListBoxItem * item,const QPoint & pos) + void KviTalListBox::redirect_contextMenuRequested(TQListBoxItem * item,const TQPoint & pos) { emit contextMenuRequested((KviTalListBoxItem *)item,pos); } - void KviTalListBox::redirect_onItem(QListBoxItem * i) + void KviTalListBox::redirect_onItem(TQListBoxItem * i) { emit onItem((KviTalListBoxItem *)i); } - KviTalListBoxText::KviTalListBoxText( KviTalListBox *listbox, const QString &text ) + KviTalListBoxText::KviTalListBoxText( KviTalListBox *listbox, const TQString &text ) :KviTalListBoxItem( listbox ) { setText( text ); } - KviTalListBoxText::KviTalListBoxText( const QString &text ) + KviTalListBoxText::KviTalListBoxText( const TQString &text ) :KviTalListBoxItem() { setText( text ); } - KviTalListBoxText::KviTalListBoxText( KviTalListBox* listbox, const QString &text, KviTalListBoxItem *after ) + KviTalListBoxText::KviTalListBoxText( KviTalListBox* listbox, const TQString &text, KviTalListBoxItem *after ) : KviTalListBoxItem( listbox, after ) { setText( text ); @@ -394,10 +394,10 @@ { } - void KviTalListBoxText::paint( QPainter *painter ) + void KviTalListBoxText::paint( TQPainter *painter ) { int itemHeight = height( listBox() ); - QFontMetrics fm = painter->fontMetrics(); + TQFontMetrics fm = painter->fontMetrics(); int yPos = ( ( itemHeight - fm.height() ) / 2 ) + fm.ascent(); painter->drawText( 3, yPos, text() ); } @@ -405,13 +405,13 @@ int KviTalListBoxText::height( const KviTalListBox* lb ) const { int h = lb ? lb->fontMetrics().lineSpacing() + 2 : 0; - return QMAX( h, QApplication::globalStrut().height() ); + return TQMAX( h, TQApplication::globalStrut().height() ); } int KviTalListBoxText::width( const KviTalListBox* lb ) const { int w = lb ? lb->fontMetrics().width( text() ) + 6 : 0; - return QMAX( w, QApplication::globalStrut().width() ); + return TQMAX( w, TQApplication::globalStrut().width() ); } int KviTalListBoxText::RTTI = 1; @@ -421,19 +421,19 @@ return RTTI; } - KviTalListBoxPixmap::KviTalListBoxPixmap( KviTalListBox* listbox, const QPixmap &pixmap ) + KviTalListBoxPixmap::KviTalListBoxPixmap( KviTalListBox* listbox, const TQPixmap &pixmap ) : KviTalListBoxItem( listbox ) { pm = pixmap; } - KviTalListBoxPixmap::KviTalListBoxPixmap( const QPixmap &pixmap ) + KviTalListBoxPixmap::KviTalListBoxPixmap( const TQPixmap &pixmap ) : KviTalListBoxItem() { pm = pixmap; } - KviTalListBoxPixmap::KviTalListBoxPixmap( KviTalListBox* listbox, const QPixmap &pixmap, KviTalListBoxItem *after ) + KviTalListBoxPixmap::KviTalListBoxPixmap( KviTalListBox* listbox, const TQPixmap &pixmap, KviTalListBoxItem *after ) : KviTalListBoxItem( listbox, after ) { pm = pixmap; @@ -443,21 +443,21 @@ { } - KviTalListBoxPixmap::KviTalListBoxPixmap( KviTalListBox* listbox, const QPixmap &pix, const QString& text) + KviTalListBoxPixmap::KviTalListBoxPixmap( KviTalListBox* listbox, const TQPixmap &pix, const TQString& text) : KviTalListBoxItem( listbox ) { pm = pix; setText( text ); } - KviTalListBoxPixmap::KviTalListBoxPixmap( const QPixmap & pix, const QString& text) + KviTalListBoxPixmap::KviTalListBoxPixmap( const TQPixmap & pix, const TQString& text) : KviTalListBoxItem() { pm = pix; setText( text ); } - KviTalListBoxPixmap::KviTalListBoxPixmap( KviTalListBox* listbox, const QPixmap & pix, const QString& text, + KviTalListBoxPixmap::KviTalListBoxPixmap( KviTalListBox* listbox, const TQPixmap & pix, const TQString& text, KviTalListBoxItem *after ) : KviTalListBoxItem( listbox, after ) { @@ -465,19 +465,19 @@ setText( text ); } - void KviTalListBoxPixmap::paint( QPainter *painter ) + void KviTalListBoxPixmap::paint( TQPainter *painter ) { int itemHeight = height( listBox() ); int yPos; - const QPixmap *pm = pixmap(); + const TQPixmap *pm = pixmap(); if ( pm && ! pm->isNull() ) { yPos = ( itemHeight - pm->height() ) / 2; painter->drawPixmap( 3, yPos, *pm); } if ( !text().isEmpty() ) { - QFontMetrics fm = painter->fontMetrics(); + TQFontMetrics fm = painter->fontMetrics(); yPos = ( ( itemHeight - fm.height() ) / 2 ) + fm.ascent(); painter->drawText( pm->width() + 5, yPos, text() ); } @@ -489,16 +489,16 @@ if ( text().isEmpty() ) h = pm.height(); else - h = QMAX( pm.height(), lb->fontMetrics().lineSpacing() + 2 ); - return QMAX( h, QApplication::globalStrut().height() ); + h = TQMAX( pm.height(), lb->fontMetrics().lineSpacing() + 2 ); + return TQMAX( h, TQApplication::globalStrut().height() ); } int KviTalListBoxPixmap::width( const KviTalListBox* lb ) const { if ( text().isEmpty() ) - return QMAX( pm.width() + 6, QApplication::globalStrut().width() ); - return QMAX( pm.width() + lb->fontMetrics().width( text() ) + 6, - QApplication::globalStrut().width() ); + return TQMAX( pm.width() + 6, TQApplication::globalStrut().width() ); + return TQMAX( pm.width() + lb->fontMetrics().width( text() ) + 6, + TQApplication::globalStrut().width() ); } int KviTalListBoxPixmap::RTTI = 2; diff --git a/src/kvilib/tal/kvi_tal_listbox.h b/src/kvilib/tal/kvi_tal_listbox.h index 18594539..4cddaeac 100644 --- a/src/kvilib/tal/kvi_tal_listbox.h +++ b/src/kvilib/tal/kvi_tal_listbox.h @@ -29,13 +29,13 @@ // // This is the only reasonable CROSS-QT3-QT4-COMPATIBLE implementation -// of QListBox I've been able to find. -// Note that using macros for the items will NOT work since moc +// of TQListBox I've been able to find. +// Note that using macros for the items will NOT work since tqmoc // doesn't expand them. Note also that KviTalListBoxText must -// be fully reimplemented and not be inherited from QListBoxText +// be fully reimplemented and not be inherited from TQListBoxText // to build up a consistent item object hierarchy. To complete -// the obscenity, we need TWO COMPLETE implementations: one for Qt3 -// and one for Qt4... bleah :D +// the obscenity, we need TWO COMPLETE implementations: one for TQt3 +// and one for TQt4... bleah :D // // The code for KviTalListBoxText is adapted from qlistbox.h/cpp // present in qt 3.3.6 AND in qt 4.1.2. diff --git a/src/kvilib/tal/kvi_tal_listbox_qt3.h b/src/kvilib/tal/kvi_tal_listbox_qt3.h index d65b7929..dcc3c0d9 100644 --- a/src/kvilib/tal/kvi_tal_listbox_qt3.h +++ b/src/kvilib/tal/kvi_tal_listbox_qt3.h @@ -27,82 +27,83 @@ #include "kvi_settings.h" #include "kvi_qstring.h" -#include +#include class KviTalListBoxItem; -class KVILIB_API KviTalListBox : public QListBox +class KVILIB_API KviTalListBox : public TQListBox { Q_OBJECT + TQ_OBJECT public: - KviTalListBox(QWidget * pParent,Qt::WFlags f = 0); + KviTalListBox(TQWidget * pParent,TQt::WFlags f = 0); virtual ~KviTalListBox() {}; public: - KviTalListBoxItem * firstItem() const { return (KviTalListBoxItem *)QListBox::firstItem(); }; - KviTalListBoxItem * selectedItem() const { return (KviTalListBoxItem *)QListBox::selectedItem(); }; - KviTalListBoxItem * item(int iIndex) const { return (KviTalListBoxItem *)QListBox::item(iIndex); }; + KviTalListBoxItem * firstItem() const { return (KviTalListBoxItem *)TQListBox::firstItem(); }; + KviTalListBoxItem * selectedItem() const { return (KviTalListBoxItem *)TQListBox::selectedItem(); }; + KviTalListBoxItem * item(int iIndex) const { return (KviTalListBoxItem *)TQListBox::item(iIndex); }; signals: void highlighted(KviTalListBoxItem *); void selected(KviTalListBoxItem *); void selectionChanged(KviTalListBoxItem * item); void currentChanged(KviTalListBoxItem * item); void clicked(KviTalListBoxItem * item); - void clicked(KviTalListBoxItem * item,const QPoint & pnt); + void clicked(KviTalListBoxItem * item,const TQPoint & pnt); void pressed(KviTalListBoxItem * item); - void pressed(KviTalListBoxItem * item,const QPoint & pnt); + void pressed(KviTalListBoxItem * item,const TQPoint & pnt); void doubleClicked(KviTalListBoxItem * item); void returnPressed(KviTalListBoxItem * item); - void rightButtonClicked(KviTalListBoxItem *, const QPoint &); - void rightButtonPressed(KviTalListBoxItem *, const QPoint &); - void mouseButtonPressed(int button,KviTalListBoxItem * item,const QPoint & pos); - void mouseButtonClicked(int button,KviTalListBoxItem * item,const QPoint & pos); - void contextMenuRequested(KviTalListBoxItem * item,const QPoint & pos); + void rightButtonClicked(KviTalListBoxItem *, const TQPoint &); + void rightButtonPressed(KviTalListBoxItem *, const TQPoint &); + void mouseButtonPressed(int button,KviTalListBoxItem * item,const TQPoint & pos); + void mouseButtonClicked(int button,KviTalListBoxItem * item,const TQPoint & pos); + void contextMenuRequested(KviTalListBoxItem * item,const TQPoint & pos); void onItem(KviTalListBoxItem * i); protected slots: - void redirect_highlighted(QListBoxItem *item); - void redirect_selected(QListBoxItem *item); - void redirect_selectionChanged(QListBoxItem * item); - void redirect_currentChanged(QListBoxItem * item); - void redirect_clicked(QListBoxItem * item); - void redirect_clicked(QListBoxItem * item,const QPoint & pnt); - void redirect_pressed(QListBoxItem * item); - void redirect_pressed(QListBoxItem * item,const QPoint & pnt); - void redirect_doubleClicked(QListBoxItem * item); - void redirect_returnPressed(QListBoxItem * item); - void redirect_rightButtonClicked(QListBoxItem * item, const QPoint &pnt); - void redirect_rightButtonPressed(QListBoxItem * item, const QPoint &pnt); - void redirect_mouseButtonPressed(int button,QListBoxItem * item,const QPoint & pos); - void redirect_mouseButtonClicked(int button,QListBoxItem * item,const QPoint & pos); - void redirect_contextMenuRequested(QListBoxItem * item,const QPoint & pos); - void redirect_onItem(QListBoxItem * i); + void redirect_highlighted(TQListBoxItem *item); + void redirect_selected(TQListBoxItem *item); + void redirect_selectionChanged(TQListBoxItem * item); + void redirect_currentChanged(TQListBoxItem * item); + void redirect_clicked(TQListBoxItem * item); + void redirect_clicked(TQListBoxItem * item,const TQPoint & pnt); + void redirect_pressed(TQListBoxItem * item); + void redirect_pressed(TQListBoxItem * item,const TQPoint & pnt); + void redirect_doubleClicked(TQListBoxItem * item); + void redirect_returnPressed(TQListBoxItem * item); + void redirect_rightButtonClicked(TQListBoxItem * item, const TQPoint &pnt); + void redirect_rightButtonPressed(TQListBoxItem * item, const TQPoint &pnt); + void redirect_mouseButtonPressed(int button,TQListBoxItem * item,const TQPoint & pos); + void redirect_mouseButtonClicked(int button,TQListBoxItem * item,const TQPoint & pos); + void redirect_contextMenuRequested(TQListBoxItem * item,const TQPoint & pos); + void redirect_onItem(TQListBoxItem * i); }; -class KVILIB_API KviTalListBoxItem : public QListBoxItem +class KVILIB_API KviTalListBoxItem : public TQListBoxItem { public: KviTalListBoxItem() - : QListBoxItem() {}; + : TQListBoxItem() {}; KviTalListBoxItem(KviTalListBox * pParent) - : QListBoxItem(pParent) {}; + : TQListBoxItem(pParent) {}; KviTalListBoxItem(KviTalListBox * pParent,KviTalListBoxItem * pAfter) - : QListBoxItem(pParent,pAfter) {}; + : TQListBoxItem(pParent,pAfter) {}; virtual ~KviTalListBoxItem() {}; public: - KviTalListBoxItem * next() const { return (KviTalListBoxItem *)QListBoxItem::next(); }; - KviTalListBoxItem * prev() const { return (KviTalListBoxItem *)QListBoxItem::prev(); }; - KviTalListBox * listBox() const { return (KviTalListBox *)QListBoxItem::listBox(); }; + KviTalListBoxItem * next() const { return (KviTalListBoxItem *)TQListBoxItem::next(); }; + KviTalListBoxItem * prev() const { return (KviTalListBoxItem *)TQListBoxItem::prev(); }; + KviTalListBox * listBox() const { return (KviTalListBox *)TQListBoxItem::listBox(); }; virtual int height(const KviTalListBox *) const { return 0; }; - int height(const QListBox *lb) const { return height((KviTalListBox *)lb); }; + int height(const TQListBox *lb) const { return height((KviTalListBox *)lb); }; virtual int width(const KviTalListBox *) const { return 0; }; - int width(const QListBox *lb) const { return width((KviTalListBox *)lb); }; + int width(const TQListBox *lb) const { return width((KviTalListBox *)lb); }; }; class KVILIB_API KviTalListBoxText : public KviTalListBoxItem { public: - KviTalListBoxText( KviTalListBox* listbox, const QString & text=QString::null ); - KviTalListBoxText( const QString & text=QString::null ); - KviTalListBoxText( KviTalListBox* listbox, const QString & text, KviTalListBoxItem *after ); + KviTalListBoxText( KviTalListBox* listbox, const TQString & text=TQString() ); + KviTalListBoxText( const TQString & text=TQString() ); + KviTalListBoxText( KviTalListBox* listbox, const TQString & text, KviTalListBoxItem *after ); ~KviTalListBoxText(); int height( const KviTalListBox * ) const; @@ -112,10 +113,10 @@ public: static int RTTI; protected: - virtual void paint( QPainter * ); + virtual void paint( TQPainter * ); private: // Disabled copy constructor and operator= -#if defined(Q_DISABLE_COPY) +#if defined(TQ_DISABLE_COPY) KviTalListBoxText( const KviTalListBoxText & ); KviTalListBoxText &operator=( const KviTalListBoxText & ); #endif @@ -125,15 +126,15 @@ private: // Disabled copy constructor and operator= class KVILIB_API KviTalListBoxPixmap : public KviTalListBoxItem { public: - KviTalListBoxPixmap( KviTalListBox* listbox, const QPixmap & ); - KviTalListBoxPixmap( const QPixmap & ); - KviTalListBoxPixmap( KviTalListBox* listbox, const QPixmap & pix, KviTalListBoxItem *after ); - KviTalListBoxPixmap( KviTalListBox* listbox, const QPixmap &, const QString& ); - KviTalListBoxPixmap( const QPixmap &, const QString& ); - KviTalListBoxPixmap( KviTalListBox* listbox, const QPixmap & pix, const QString&, KviTalListBoxItem *after ); + KviTalListBoxPixmap( KviTalListBox* listbox, const TQPixmap & ); + KviTalListBoxPixmap( const TQPixmap & ); + KviTalListBoxPixmap( KviTalListBox* listbox, const TQPixmap & pix, KviTalListBoxItem *after ); + KviTalListBoxPixmap( KviTalListBox* listbox, const TQPixmap &, const TQString& ); + KviTalListBoxPixmap( const TQPixmap &, const TQString& ); + KviTalListBoxPixmap( KviTalListBox* listbox, const TQPixmap & pix, const TQString&, KviTalListBoxItem *after ); ~KviTalListBoxPixmap(); - const QPixmap *pixmap() const { return ± } + const TQPixmap *pixmap() const { return ± } int height( const KviTalListBox * ) const; int width( const KviTalListBox * ) const; @@ -142,12 +143,12 @@ public: static int RTTI; protected: - virtual void paint( QPainter * ); + virtual void paint( TQPainter * ); private: - QPixmap pm; + TQPixmap pm; private: // Disabled copy constructor and operator= -#if defined(Q_DISABLE_COPY) +#if defined(TQ_DISABLE_COPY) KviTalListBoxPixmap( const KviTalListBoxPixmap & ); KviTalListBoxPixmap &operator=( const KviTalListBoxPixmap & ); #endif diff --git a/src/kvilib/tal/kvi_tal_listbox_qt4.h b/src/kvilib/tal/kvi_tal_listbox_qt4.h index dcb92f4d..4222fc1c 100644 --- a/src/kvilib/tal/kvi_tal_listbox_qt4.h +++ b/src/kvilib/tal/kvi_tal_listbox_qt4.h @@ -27,7 +27,7 @@ #include "kvi_settings.h" -#include +#include class KviTalListBoxItem; @@ -35,8 +35,9 @@ class KviTalListBoxItem; class KVILIB_API KviTalListBox : public Q3ListBox { Q_OBJECT + TQ_OBJECT public: - KviTalListBox(QWidget * pParent,Qt::WFlags f = 0); + KviTalListBox(TQWidget * pParent,TQt::WFlags f = 0); virtual ~KviTalListBox() {}; public: KviTalListBoxItem * firstItem() const { return (KviTalListBoxItem *)Q3ListBox::firstItem(); }; @@ -48,16 +49,16 @@ signals: void selectionChanged(KviTalListBoxItem * item); void currentChanged(KviTalListBoxItem * item); void clicked(KviTalListBoxItem * item); - void clicked(KviTalListBoxItem * item,const QPoint & pnt); + void clicked(KviTalListBoxItem * item,const TQPoint & pnt); void pressed(KviTalListBoxItem * item); - void pressed(KviTalListBoxItem * item,const QPoint & pnt); + void pressed(KviTalListBoxItem * item,const TQPoint & pnt); void doubleClicked(KviTalListBoxItem * item); void returnPressed(KviTalListBoxItem * item); - void rightButtonClicked(KviTalListBoxItem *, const QPoint &); - void rightButtonPressed(KviTalListBoxItem *, const QPoint &); - void mouseButtonPressed(int button,KviTalListBoxItem * item,const QPoint & pos); - void mouseButtonClicked(int button,KviTalListBoxItem * item,const QPoint & pos); - void contextMenuRequested(KviTalListBoxItem * item,const QPoint & pos); + void rightButtonClicked(KviTalListBoxItem *, const TQPoint &); + void rightButtonPressed(KviTalListBoxItem *, const TQPoint &); + void mouseButtonPressed(int button,KviTalListBoxItem * item,const TQPoint & pos); + void mouseButtonClicked(int button,KviTalListBoxItem * item,const TQPoint & pos); + void contextMenuRequested(KviTalListBoxItem * item,const TQPoint & pos); void onItem(KviTalListBoxItem * i); protected slots: void redirect_highlighted(Q3ListBoxItem *); @@ -65,16 +66,16 @@ protected slots: void redirect_selectionChanged(Q3ListBoxItem * item); void redirect_currentChanged(Q3ListBoxItem * item); void redirect_clicked(Q3ListBoxItem * item); - void redirect_clicked(Q3ListBoxItem * item,const QPoint & pnt); + void redirect_clicked(Q3ListBoxItem * item,const TQPoint & pnt); void redirect_pressed(Q3ListBoxItem * item); - void redirect_pressed(Q3ListBoxItem * item,const QPoint & pnt); + void redirect_pressed(Q3ListBoxItem * item,const TQPoint & pnt); void redirect_doubleClicked(Q3ListBoxItem * item); void redirect_returnPressed(Q3ListBoxItem *); - void redirect_rightButtonClicked(Q3ListBoxItem *, const QPoint &); - void redirect_rightButtonPressed(Q3ListBoxItem *, const QPoint &); - void redirect_mouseButtonPressed(int button,Q3ListBoxItem * item,const QPoint & pos); - void redirect_mouseButtonClicked(int button,Q3ListBoxItem * item,const QPoint & pos); - void redirect_contextMenuRequested(Q3ListBoxItem * item,const QPoint & pos); + void redirect_rightButtonClicked(Q3ListBoxItem *, const TQPoint &); + void redirect_rightButtonPressed(Q3ListBoxItem *, const TQPoint &); + void redirect_mouseButtonPressed(int button,Q3ListBoxItem * item,const TQPoint & pos); + void redirect_mouseButtonClicked(int button,Q3ListBoxItem * item,const TQPoint & pos); + void redirect_contextMenuRequested(Q3ListBoxItem * item,const TQPoint & pos); void redirect_onItem(Q3ListBoxItem * i); }; @@ -102,9 +103,9 @@ public: class KVILIB_API KviTalListBoxText : public KviTalListBoxItem { public: - KviTalListBoxText(KviTalListBox* listbox, const QString & text=QString()); - KviTalListBoxText(const QString & text=QString()); - KviTalListBoxText(KviTalListBox* listbox, const QString & text, KviTalListBoxItem *after); + KviTalListBoxText(KviTalListBox* listbox, const TQString & text=TQString()); + KviTalListBoxText(const TQString & text=TQString()); + KviTalListBoxText(KviTalListBox* listbox, const TQString & text, KviTalListBoxItem *after); ~KviTalListBoxText(); int height(const KviTalListBox *) const; @@ -114,25 +115,25 @@ public: enum { RTTI = 1 }; protected: - virtual void paint(QPainter *); + virtual void paint(TQPainter *); private: - Q_DISABLE_COPY(KviTalListBoxText) + TQ_DISABLE_COPY(KviTalListBoxText) }; class KVILIB_API KviTalListBoxPixmap : public KviTalListBoxItem { public: - KviTalListBoxPixmap(KviTalListBox* listbox, const QPixmap &); - KviTalListBoxPixmap(const QPixmap &); - KviTalListBoxPixmap(KviTalListBox* listbox, const QPixmap & pix, KviTalListBoxItem *after); - KviTalListBoxPixmap(KviTalListBox* listbox, const QPixmap &, const QString&); - KviTalListBoxPixmap(const QPixmap &, const QString&); - KviTalListBoxPixmap(KviTalListBox* listbox, const QPixmap & pix, const QString&, KviTalListBoxItem *after); + KviTalListBoxPixmap(KviTalListBox* listbox, const TQPixmap &); + KviTalListBoxPixmap(const TQPixmap &); + KviTalListBoxPixmap(KviTalListBox* listbox, const TQPixmap & pix, KviTalListBoxItem *after); + KviTalListBoxPixmap(KviTalListBox* listbox, const TQPixmap &, const TQString&); + KviTalListBoxPixmap(const TQPixmap &, const TQString&); + KviTalListBoxPixmap(KviTalListBox* listbox, const TQPixmap & pix, const TQString&, KviTalListBoxItem *after); ~KviTalListBoxPixmap(); - const QPixmap *pixmap() const { return ± } + const TQPixmap *pixmap() const { return ± } int height(const KviTalListBox *) const; int width(const KviTalListBox *) const; @@ -141,12 +142,12 @@ public: enum { RTTI = 2 }; protected: - virtual void paint(QPainter *); + virtual void paint(TQPainter *); private: - Q_DISABLE_COPY(KviTalListBoxPixmap) + TQ_DISABLE_COPY(KviTalListBoxPixmap) - QPixmap pm; + TQPixmap pm; }; #endif // _KVI_TAL_LISTBOX_QT4_H_ diff --git a/src/kvilib/tal/kvi_tal_listview.cpp b/src/kvilib/tal/kvi_tal_listview.cpp index 01b253b3..6181d804 100644 --- a/src/kvilib/tal/kvi_tal_listview.cpp +++ b/src/kvilib/tal/kvi_tal_listview.cpp @@ -29,21 +29,21 @@ #ifdef COMPILE_USE_QT4 - #include - #include - #include - #include - #include - #include - #include + #include + #include + #include + #include + #include + #include + #include - static QStyleOptionQ3ListView getStyleOption(const Q3ListView *lv, const Q3ListViewItem *item) + static TQStyleOptionQ3ListView getStyleOption(const Q3ListView *lv, const Q3ListViewItem *item) { - QStyleOptionQ3ListView opt; + TQStyleOptionQ3ListView opt; opt.init(lv); - opt.subControls = QStyle::SC_None; - opt.activeSubControls = QStyle::SC_None; - QWidget *vp = lv->viewport(); + opt.subControls = TQStyle::SC_None; + opt.activeSubControls = TQStyle::SC_None; + TQWidget *vp = lv->viewport(); opt.viewportPalette = vp->palette(); opt.viewportBGRole = vp->backgroundRole(); opt.itemMargin = lv->itemMargin(); @@ -52,26 +52,26 @@ opt.rootIsDecorated = lv->rootIsDecorated(); bool firstItem = true; while (item) { - QStyleOptionQ3ListViewItem lvi; + TQStyleOptionQ3ListViewItem lvi; lvi.height = item->height(); lvi.totalHeight = item->totalHeight(); lvi.itemY = item->itemPos(); lvi.childCount = item->childCount(); - lvi.features = QStyleOptionQ3ListViewItem::None; - lvi.state = QStyle::State_None; + lvi.features = TQStyleOptionQ3ListViewItem::None; + lvi.state = TQStyle::State_None; if (item->isEnabled()) - lvi.state |= QStyle::State_Enabled; + lvi.state |= TQStyle::State_Enabled; if (item->isOpen()) - lvi.state |= QStyle::State_Open; + lvi.state |= TQStyle::State_Open; if (item->isExpandable()) - lvi.features |= QStyleOptionQ3ListViewItem::Expandable; + lvi.features |= TQStyleOptionQ3ListViewItem::Expandable; if (item->multiLinesEnabled()) - lvi.features |= QStyleOptionQ3ListViewItem::MultiLine; + lvi.features |= TQStyleOptionQ3ListViewItem::MultiLine; if (item->isVisible()) - lvi.features |= QStyleOptionQ3ListViewItem::Visible; - if (item->parent() && item->parent()->rtti() == 1 - && static_cast(item->parent())->type() == Q3CheckListItem::Controller) - lvi.features |= QStyleOptionQ3ListViewItem::ParentControl; + lvi.features |= TQStyleOptionQ3ListViewItem::Visible; + if (item->tqparent() && item->tqparent()->rtti() == 1 + && static_cast(item->tqparent())->type() == Q3CheckListItem::Controller) + lvi.features |= TQStyleOptionQ3ListViewItem::ParentControl; opt.items.append(lvi); if (!firstItem) { item = item->nextSibling(); @@ -83,27 +83,27 @@ return opt; } - KviTalListView::KviTalListView(QWidget * pParent) + KviTalListView::KviTalListView(TQWidget * pParent) : Q3ListView(pParent) { - connect(this,SIGNAL(selectionChanged(Q3ListViewItem *)),this,SLOT(redirect_selectionChanged(Q3ListViewItem *))); - connect(this,SIGNAL(currentChanged(Q3ListViewItem *)),this,SLOT(redirect_currentChanged(Q3ListViewItem *))); - connect(this,SIGNAL(clicked(Q3ListViewItem *)),this,SLOT(redirect_clicked(Q3ListViewItem *))); - connect(this,SIGNAL(clicked(Q3ListViewItem *,const QPoint &,int)),this,SLOT(redirect_clicked(Q3ListViewItem *,const QPoint &,int))); - connect(this,SIGNAL(pressed(Q3ListViewItem *)),this,SLOT(redirect_pressed(Q3ListViewItem *))); - connect(this,SIGNAL(pressed(Q3ListViewItem *,const QPoint &,int)),this,SLOT(redirect_pressed(Q3ListViewItem *,const QPoint &,int))); - connect(this,SIGNAL(doubleClicked(Q3ListViewItem *)),this,SLOT(redirect_doubleClicked(Q3ListViewItem *))); - connect(this,SIGNAL(doubleClicked(Q3ListViewItem *,const QPoint &,int)),this,SLOT(redirect_doubleClicked(Q3ListViewItem *,const QPoint &,int))); - connect(this,SIGNAL(returnPressed(Q3ListViewItem *)),this,SLOT(redirect_returnPressed(Q3ListViewItem *))); - connect(this,SIGNAL(spacePressed(Q3ListViewItem *)),this,SLOT(redirect_spacePressed(Q3ListViewItem *))); - connect(this,SIGNAL(rightButtonClicked(Q3ListViewItem *,const QPoint &,int)),this,SLOT(redirect_rightButtonClicked(Q3ListViewItem *,const QPoint &,int))); - connect(this,SIGNAL(rightButtonPressed(Q3ListViewItem *,const QPoint &,int)),this,SLOT(redirect_rightButtonPressed(Q3ListViewItem *,const QPoint &,int))); - connect(this,SIGNAL(mouseButtonClicked(int,Q3ListViewItem *,const QPoint &,int)),this,SLOT(redirect_mouseButtonClicked(int,Q3ListViewItem *,const QPoint &,int))); - connect(this,SIGNAL(mouseButtonPressed(int,Q3ListViewItem *,const QPoint &,int)),this,SLOT(redirect_mouseButtonPressed(int,Q3ListViewItem *,const QPoint &,int))); - connect(this,SIGNAL(contextMenuRequested(Q3ListViewItem *,const QPoint &,int)),this,SLOT(redirect_contextMenuRequested(Q3ListViewItem *,const QPoint &,int))); - connect(this,SIGNAL(onItem(Q3ListViewItem *)),this,SLOT(redirect_onItem(Q3ListViewItem *))); - connect(this,SIGNAL(expanded(Q3ListViewItem *)),this,SLOT(redirect_expanded(Q3ListViewItem *))); - connect(this,SIGNAL(collapsed(Q3ListViewItem *)),this,SLOT(redirect_collapsed(Q3ListViewItem *))); + connect(this,TQT_SIGNAL(selectionChanged(Q3ListViewItem *)),this,TQT_SLOT(redirect_selectionChanged(Q3ListViewItem *))); + connect(this,TQT_SIGNAL(currentChanged(Q3ListViewItem *)),this,TQT_SLOT(redirect_currentChanged(Q3ListViewItem *))); + connect(this,TQT_SIGNAL(clicked(Q3ListViewItem *)),this,TQT_SLOT(redirect_clicked(Q3ListViewItem *))); + connect(this,TQT_SIGNAL(clicked(Q3ListViewItem *,const TQPoint &,int)),this,TQT_SLOT(redirect_clicked(Q3ListViewItem *,const TQPoint &,int))); + connect(this,TQT_SIGNAL(pressed(Q3ListViewItem *)),this,TQT_SLOT(redirect_pressed(Q3ListViewItem *))); + connect(this,TQT_SIGNAL(pressed(Q3ListViewItem *,const TQPoint &,int)),this,TQT_SLOT(redirect_pressed(Q3ListViewItem *,const TQPoint &,int))); + connect(this,TQT_SIGNAL(doubleClicked(Q3ListViewItem *)),this,TQT_SLOT(redirect_doubleClicked(Q3ListViewItem *))); + connect(this,TQT_SIGNAL(doubleClicked(Q3ListViewItem *,const TQPoint &,int)),this,TQT_SLOT(redirect_doubleClicked(Q3ListViewItem *,const TQPoint &,int))); + connect(this,TQT_SIGNAL(returnPressed(Q3ListViewItem *)),this,TQT_SLOT(redirect_returnPressed(Q3ListViewItem *))); + connect(this,TQT_SIGNAL(spacePressed(Q3ListViewItem *)),this,TQT_SLOT(redirect_spacePressed(Q3ListViewItem *))); + connect(this,TQT_SIGNAL(rightButtonClicked(Q3ListViewItem *,const TQPoint &,int)),this,TQT_SLOT(redirect_rightButtonClicked(Q3ListViewItem *,const TQPoint &,int))); + connect(this,TQT_SIGNAL(rightButtonPressed(Q3ListViewItem *,const TQPoint &,int)),this,TQT_SLOT(redirect_rightButtonPressed(Q3ListViewItem *,const TQPoint &,int))); + connect(this,TQT_SIGNAL(mouseButtonClicked(int,Q3ListViewItem *,const TQPoint &,int)),this,TQT_SLOT(redirect_mouseButtonClicked(int,Q3ListViewItem *,const TQPoint &,int))); + connect(this,TQT_SIGNAL(mouseButtonPressed(int,Q3ListViewItem *,const TQPoint &,int)),this,TQT_SLOT(redirect_mouseButtonPressed(int,Q3ListViewItem *,const TQPoint &,int))); + connect(this,TQT_SIGNAL(contextMenuRequested(Q3ListViewItem *,const TQPoint &,int)),this,TQT_SLOT(redirect_contextMenuRequested(Q3ListViewItem *,const TQPoint &,int))); + connect(this,TQT_SIGNAL(onItem(Q3ListViewItem *)),this,TQT_SLOT(redirect_onItem(Q3ListViewItem *))); + connect(this,TQT_SIGNAL(expanded(Q3ListViewItem *)),this,TQT_SLOT(redirect_expanded(Q3ListViewItem *))); + connect(this,TQT_SIGNAL(collapsed(Q3ListViewItem *)),this,TQT_SLOT(redirect_collapsed(Q3ListViewItem *))); } void KviTalListView::redirect_selectionChanged(Q3ListViewItem * pItem) @@ -121,7 +121,7 @@ emit clicked((KviTalListViewItem *)pItem); } - void KviTalListView::redirect_clicked(Q3ListViewItem * pItem,const QPoint &pnt,int uColumn) + void KviTalListView::redirect_clicked(Q3ListViewItem * pItem,const TQPoint &pnt,int uColumn) { emit clicked((KviTalListViewItem *)pItem,pnt,uColumn); } @@ -131,7 +131,7 @@ emit pressed((KviTalListViewItem *)pItem); } - void KviTalListView::redirect_pressed(Q3ListViewItem * pItem,const QPoint &pnt,int uColumn) + void KviTalListView::redirect_pressed(Q3ListViewItem * pItem,const TQPoint &pnt,int uColumn) { emit pressed((KviTalListViewItem *)pItem,pnt,uColumn); } @@ -141,7 +141,7 @@ emit doubleClicked((KviTalListViewItem *)pItem); } - void KviTalListView::redirect_doubleClicked(Q3ListViewItem * pItem,const QPoint &pnt,int uColumn) + void KviTalListView::redirect_doubleClicked(Q3ListViewItem * pItem,const TQPoint &pnt,int uColumn) { emit doubleClicked((KviTalListViewItem *)pItem,pnt,uColumn); } @@ -156,27 +156,27 @@ emit spacePressed((KviTalListViewItem *)pItem); } - void KviTalListView::redirect_rightButtonClicked(Q3ListViewItem * pItem,const QPoint &pnt,int uColumn) + void KviTalListView::redirect_rightButtonClicked(Q3ListViewItem * pItem,const TQPoint &pnt,int uColumn) { emit rightButtonClicked((KviTalListViewItem *)pItem,pnt,uColumn); } - void KviTalListView::redirect_rightButtonPressed(Q3ListViewItem * pItem,const QPoint &pnt,int uColumn) + void KviTalListView::redirect_rightButtonPressed(Q3ListViewItem * pItem,const TQPoint &pnt,int uColumn) { emit rightButtonPressed((KviTalListViewItem *)pItem,pnt,uColumn); } - void KviTalListView::redirect_mouseButtonClicked(int iButton,Q3ListViewItem * pItem,const QPoint &pnt,int uColumn) + void KviTalListView::redirect_mouseButtonClicked(int iButton,Q3ListViewItem * pItem,const TQPoint &pnt,int uColumn) { emit mouseButtonClicked(iButton,(KviTalListViewItem *)pItem,pnt,uColumn); } - void KviTalListView::redirect_mouseButtonPressed(int iButton,Q3ListViewItem * pItem,const QPoint &pnt,int uColumn) + void KviTalListView::redirect_mouseButtonPressed(int iButton,Q3ListViewItem * pItem,const TQPoint &pnt,int uColumn) { emit mouseButtonPressed(iButton,(KviTalListViewItem *)pItem,pnt,uColumn); } - void KviTalListView::redirect_contextMenuRequested(Q3ListViewItem * pItem,const QPoint &pnt,int uColumn) + void KviTalListView::redirect_contextMenuRequested(Q3ListViewItem * pItem,const TQPoint &pnt,int uColumn) { emit contextMenuRequested((KviTalListViewItem *)pItem,pnt,uColumn); } @@ -206,43 +206,43 @@ KviTalCheckListItem *exclusive; KviTalCheckListItem::ToggleState currentState; - QHash statesDict; + TQHash statesDict; bool tristate; }; - KviTalCheckListItem::KviTalCheckListItem(KviTalCheckListItem *parent, const QString &text, + KviTalCheckListItem::KviTalCheckListItem(KviTalCheckListItem *tqparent, const TQString &text, Type tt) - : KviTalListViewItem(parent, text, QString()) + : KviTalListViewItem(tqparent, text, TQString()) { myType = tt; init(); if (myType == RadioButton) { - if (parent->type() != RadioButtonController) + if (tqparent->type() != RadioButtonController) qWarning("KviTalCheckListItem::KviTalCheckListItem(), radio button must be " "child of a controller"); else - d->exclusive = parent; + d->exclusive = tqparent; } } - KviTalCheckListItem::KviTalCheckListItem(KviTalCheckListItem *parent, KviTalListViewItem *after, - const QString &text, Type tt) - : KviTalListViewItem(parent, after, text) + KviTalCheckListItem::KviTalCheckListItem(KviTalCheckListItem *tqparent, KviTalListViewItem *after, + const TQString &text, Type tt) + : KviTalListViewItem(tqparent, after, text) { myType = tt; init(); if (myType == RadioButton) { - if (parent->type() != RadioButtonController) + if (tqparent->type() != RadioButtonController) qWarning("KviTalCheckListItem::KviTalCheckListItem(), radio button must be " "child of a controller"); else - d->exclusive = parent; + d->exclusive = tqparent; } } - KviTalCheckListItem::KviTalCheckListItem(KviTalListViewItem *parent, const QString &text, + KviTalCheckListItem::KviTalCheckListItem(KviTalListViewItem *tqparent, const TQString &text, Type tt) - : KviTalListViewItem(parent, text, QString()) + : KviTalListViewItem(tqparent, text, TQString()) { myType = tt; if (myType == RadioButton) { @@ -252,9 +252,9 @@ init(); } - KviTalCheckListItem::KviTalCheckListItem(KviTalListViewItem *parent, KviTalListViewItem *after, - const QString &text, Type tt) - : KviTalListViewItem(parent, after, text) + KviTalCheckListItem::KviTalCheckListItem(KviTalListViewItem *tqparent, KviTalListViewItem *after, + const TQString &text, Type tt) + : KviTalListViewItem(tqparent, after, text) { myType = tt; if (myType == RadioButton) { @@ -264,9 +264,9 @@ init(); } - KviTalCheckListItem::KviTalCheckListItem(KviTalListView *parent, const QString &text, + KviTalCheckListItem::KviTalCheckListItem(KviTalListView *tqparent, const TQString &text, Type tt) - : KviTalListViewItem(parent, text) + : KviTalListViewItem(tqparent, text) { myType = tt; if (tt == RadioButton) @@ -275,9 +275,9 @@ init(); } - KviTalCheckListItem::KviTalCheckListItem(KviTalListView *parent, KviTalListViewItem *after, - const QString &text, Type tt) - : KviTalListViewItem(parent, after, text) + KviTalCheckListItem::KviTalCheckListItem(KviTalListView *tqparent, KviTalListViewItem *after, + const TQString &text, Type tt) + : KviTalListViewItem(tqparent, after, text) { myType = tt; if (tt == RadioButton) @@ -291,18 +291,18 @@ return RTTI; } - KviTalCheckListItem::KviTalCheckListItem(KviTalListView *parent, const QString &text, - const QPixmap & p) - : KviTalListViewItem(parent, text) + KviTalCheckListItem::KviTalCheckListItem(KviTalListView *tqparent, const TQString &text, + const TQPixmap & p) + : KviTalListViewItem(tqparent, text) { myType = RadioButtonController; setPixmap(0, p); init(); } - KviTalCheckListItem::KviTalCheckListItem(KviTalListViewItem *parent, const QString &text, - const QPixmap & p) - : KviTalListViewItem(parent, text) + KviTalCheckListItem::KviTalCheckListItem(KviTalListViewItem *tqparent, const TQString &text, + const TQPixmap & p) + : KviTalListViewItem(tqparent, text) { myType = RadioButtonController; setPixmap(0, p); @@ -324,7 +324,7 @@ && d->exclusive && d->exclusive->d && d->exclusive->d->exclusive == this) d->exclusive->turnOffChild(); - d->exclusive = 0; // so the children won't try to access us. + d->exclusive = 0; // so the tqchildren won't try to access us. delete d; d = 0; } @@ -373,9 +373,9 @@ if (myType == CheckBox) { setCurrentState(s); stateChange(state()); - if (update && parent() && parent()->rtti() == 1 - && ((KviTalCheckListItem*)parent())->type() == CheckBoxController) - ((KviTalCheckListItem*)parent())->updateController(update, store); + if (update && tqparent() && tqparent()->rtti() == 1 + && ((KviTalCheckListItem*)tqparent())->type() == CheckBoxController) + ((KviTalCheckListItem*)tqparent())->updateController(update, store); } else if (myType == CheckBoxController) { if (s == NoChange && childCount()) { restoreState(this); @@ -397,18 +397,18 @@ ToggleState oldState = internalState(); updateController(false, false); if (oldState != internalState() && - parent() && parent()->rtti() == 1 && - ((KviTalCheckListItem*)parent())->type() == CheckBoxController) - ((KviTalCheckListItem*)parent())->updateController(update, store); + tqparent() && tqparent()->rtti() == 1 && + ((KviTalCheckListItem*)tqparent())->type() == CheckBoxController) + ((KviTalCheckListItem*)tqparent())->updateController(update, store); updateController(update, store); } else { - // if there are no children we simply set the CheckBoxController and update its parent + // if there are no tqchildren we simply set the CheckBoxController and update its tqparent setCurrentState(s); stateChange(state()); - if (parent() && parent()->rtti() == 1 - && ((KviTalCheckListItem*)parent())->type() == CheckBoxController) - ((KviTalCheckListItem*)parent())->updateController(update, store); + if (tqparent() && tqparent()->rtti() == 1 + && ((KviTalCheckListItem*)tqparent())->type() == CheckBoxController) + ((KviTalCheckListItem*)tqparent())->updateController(update, store); } } else { setCurrentState(s); @@ -430,7 +430,7 @@ } stateChange(state()); } - repaint(); + tqrepaint(); } void KviTalCheckListItem::setCurrentState(ToggleState s) @@ -442,9 +442,9 @@ else on = false; - //#ifndef QT_NO_ACCESSIBILITY + //#ifndef TQT_NO_ACCESSIBILITY // if (old != d->currentState && listView()) - // QAccessible::updateAccessibility(listView()->viewport(), indexOfItem(this), QAccessible::StateChanged); + // TQAccessible::updateAccessibility(listView()->viewport(), indexOfItem(this), TQAccessible::StateChanged); //#else // Q_UNUSED(old); //#endif @@ -458,7 +458,7 @@ KviTalCheckListItem::ToggleState KviTalCheckListItem::storedState(KviTalCheckListItem *key) const { - QHash::Iterator it = d->statesDict.find(key); + TQHash::Iterator it = d->statesDict.tqfind(key); if (it != d->statesDict.end()) return it.value(); else @@ -478,28 +478,28 @@ if (lv && !lv->isEnabled() || !isEnabled()) return; - QPoint pos; - int boxsize = lv->style()->pixelMetric(QStyle::PM_CheckListButtonSize, 0, lv); + TQPoint pos; + int boxsize = lv->tqstyle()->tqpixelMetric(TQStyle::PM_CheckListButtonSize, 0, lv); if (activatedPos(pos)) { - bool parentControl = false; - if (parent() && parent()->rtti() == 1 && - ((KviTalCheckListItem*) parent())->type() == RadioButtonController) - parentControl = true; + bool tqparentControl = false; + if (tqparent() && tqparent()->rtti() == 1 && + ((KviTalCheckListItem*) tqparent())->type() == RadioButtonController) + tqparentControl = true; - int x = parentControl ? 0 : 3; + int x = tqparentControl ? 0 : 3; int align = lv->columnAlignment(0); int marg = lv->itemMargin(); int y = 0; - if (align & Qt::AlignVCenter) + if (align & TQt::AlignVCenter) y = ((height() - boxsize) / 2) + marg; else y = (lv->fontMetrics().height() + 2 + marg - boxsize) / 2; - QRect r(x, y, boxsize-3, boxsize-3); + TQRect r(x, y, boxsize-3, boxsize-3); // columns might have been swapped r.moveBy(lv->header()->sectionPos(0), 0); - if (!r.contains(pos)) + if (!r.tqcontains(pos)) return; } if ((myType == CheckBox) || (myType == CheckBoxController)) { @@ -551,13 +551,13 @@ case CheckBox: setCurrentState(storedState(key)); stateChange(state()); - repaint(); + tqrepaint(); break; case CheckBoxController: { KviTalListViewItem *item = firstChild(); int childCount = 0; while (item) { - // recursively calling restoreState for children of type CheckBox and CheckBoxController + // recursively calling restoreState for tqchildren of type CheckBox and CheckBoxController if (item->rtti() == 1 && (((KviTalCheckListItem*)item)->type() == CheckBox || ((KviTalCheckListItem*)item)->type() == CheckBoxController)) { @@ -572,7 +572,7 @@ else updateController(false); } else { - // if there are no children we retrieve the CheckBoxController state directly. + // if there are no tqchildren we retrieve the CheckBoxController state directly. setState(storedState(key), true, false); } } @@ -588,10 +588,10 @@ return; KviTalCheckListItem *controller = 0; - // checks if this CheckBoxController has another CheckBoxController as parent - if (parent() && parent()->rtti() == 1 - && ((KviTalCheckListItem*)parent())->type() == CheckBoxController) - controller = (KviTalCheckListItem*)parent(); + // checks if this CheckBoxController has another CheckBoxController as tqparent + if (tqparent() && tqparent()->rtti() == 1 + && ((KviTalCheckListItem*)tqparent())->type() == CheckBoxController) + controller = (KviTalCheckListItem*)tqparent(); ToggleState theState = Off; bool first = true; @@ -622,7 +622,7 @@ if (update && controller) { controller->updateController(update, store); } - repaint(); + tqrepaint(); } } @@ -642,7 +642,7 @@ } item = item->nextSibling(); } - // this state is only needed if the CheckBoxController has no CheckBox / CheckBoxController children. + // this state is only needed if the CheckBoxController has no CheckBox / CheckBoxController tqchildren. setStoredState(internalState() , key); } @@ -652,13 +652,13 @@ int h = height(); KviTalListView *lv = listView(); if (lv) - h = qMax(lv->style()->pixelMetric(QStyle::PM_CheckListButtonSize, 0, lv), + h = qMax(lv->tqstyle()->tqpixelMetric(TQStyle::PM_CheckListButtonSize, 0, lv), h); - h = qMax(h, QApplication::globalStrut().height()); + h = qMax(h, TQApplication::globalStrut().height()); setHeight(h); } - int KviTalCheckListItem::width(const QFontMetrics& fm, const KviTalListView* lv, int column) const + int KviTalCheckListItem::width(const TQFontMetrics& fm, const KviTalListView* lv, int column) const { int r = KviTalListViewItem::width(fm, lv, column); if (column == 0) { @@ -666,13 +666,13 @@ if (myType == RadioButtonController && pixmap(0)) { // r += 0; } else { - r += lv->style()->pixelMetric(QStyle::PM_CheckListButtonSize, 0, lv) + 4; + r += lv->tqstyle()->tqpixelMetric(TQStyle::PM_CheckListButtonSize, 0, lv) + 4; } } - return qMax(r, QApplication::globalStrut().width()); + return qMax(r, TQApplication::globalStrut().width()); } - void KviTalCheckListItem::paintCell(QPainter * p, const QColorGroup & cg, + void KviTalCheckListItem::paintCell(TQPainter * p, const TQColorGroup & cg, int column, int width, int align) { if (!p) @@ -682,11 +682,11 @@ if (!lv) return; - const QPalette::ColorRole crole = lv->foregroundRole(); + const TQPalette::ColorRole crole = lv->foregroundRole(); if (cg.brush(crole) != lv->palette().brush(crole)) p->fillRect(0, 0, width, height(), cg.brush(crole)); else - lv->paintEmptyArea(p, QRect(0, 0, width, height())); + lv->paintEmptyArea(p, TQRect(0, 0, width, height())); if (column != 0) { // The rest is text, or for subclasses to change. @@ -694,77 +694,77 @@ return; } - bool parentControl = false; - if (parent() && parent()->rtti() == 1 && - ((KviTalCheckListItem*) parent())->type() == RadioButtonController) - parentControl = true; + bool tqparentControl = false; + if (tqparent() && tqparent()->rtti() == 1 && + ((KviTalCheckListItem*) tqparent())->type() == RadioButtonController) + tqparentControl = true; - QFontMetrics fm(lv->fontMetrics()); - int boxsize = lv->style()->pixelMetric(myType == RadioButtonController ? QStyle::PM_CheckListControllerSize : - QStyle::PM_CheckListButtonSize, 0, lv); + TQFontMetrics fm(lv->fontMetrics()); + int boxsize = lv->tqstyle()->tqpixelMetric(myType == RadioButtonController ? TQStyle::PM_CheckListControllerSize : + TQStyle::PM_CheckListButtonSize, 0, lv); int marg = lv->itemMargin(); int r = marg; // Draw controller / checkbox / radiobutton --------------------- - QStyle::State styleflags = QStyle::State_None; + TQStyle::State styleflags = TQStyle::State_None; if (internalState() == On) { - styleflags |= QStyle::State_On; + styleflags |= TQStyle::State_On; } else if (internalState() == NoChange) { if (myType == CheckBoxController && !isTristate()) - styleflags |= QStyle::State_Off; + styleflags |= TQStyle::State_Off; else - styleflags |= QStyle::State_NoChange; + styleflags |= TQStyle::State_NoChange; } else { - styleflags |= QStyle::State_Off; + styleflags |= TQStyle::State_Off; } if (isSelected()) - styleflags |= QStyle::State_Selected; + styleflags |= TQStyle::State_Selected; if (isEnabled() && lv->isEnabled()) - styleflags |= QStyle::State_Enabled; + styleflags |= TQStyle::State_Enabled; if (lv->window()->isActiveWindow()) - styleflags |= QStyle::State_Active; + styleflags |= TQStyle::State_Active; if (myType == RadioButtonController) { int x = 0; - if(!parentControl) + if(!tqparentControl) x += 3; if (!pixmap(0)) { - QStyleOptionQ3ListView opt = getStyleOption(lv, this); + TQStyleOptionQ3ListView opt = getStyleOption(lv, this); opt.rect.setRect(x, 0, boxsize, fm.height() + 2 + marg); opt.palette = cg; opt.state = styleflags; - lv->style()->drawPrimitive(QStyle::PE_Q3CheckListController, &opt, p, lv); + lv->tqstyle()->drawPrimitive(TQStyle::PE_Q3CheckListController, &opt, p, lv); r += boxsize + 4; } } else { Q_ASSERT(lv); //### int x = 0; int y = 0; - if (!parentControl) + if (!tqparentControl) x += 3; - if (align & Qt::AlignVCenter) + if (align & TQt::AlignVCenter) y = ((height() - boxsize) / 2) + marg; else y = (fm.height() + 2 + marg - boxsize) / 2; - QStyleOptionQ3ListView opt = getStyleOption(lv, this); + TQStyleOptionQ3ListView opt = getStyleOption(lv, this); opt.rect.setRect(x, y, boxsize, fm.height() + 2 + marg); opt.palette = cg; opt.state = styleflags; - lv->style()->drawPrimitive((myType == CheckBox || myType == CheckBoxController) - ? QStyle::PE_Q3CheckListIndicator - : QStyle::PE_Q3CheckListExclusiveIndicator, &opt, p, lv); + lv->tqstyle()->drawPrimitive((myType == CheckBox || myType == CheckBoxController) + ? TQStyle::PE_Q3CheckListIndicator + : TQStyle::PE_Q3CheckListExclusiveIndicator, &opt, p, lv); r += boxsize + 4; } // Draw text ---------------------------------------------------- p->translate(r, 0); - p->setPen(QPen(cg.text())); + p->setPen(TQPen(cg.text())); KviTalListViewItem::paintCell(p, cg, column, width - r, align); } - void KviTalCheckListItem::paintFocus(QPainter *p, const QColorGroup & cg, - const QRect & r) + void KviTalCheckListItem::paintFocus(TQPainter *p, const TQColorGroup & cg, + const TQRect & r) { bool intersect = true; KviTalListView *lv = listView(); @@ -772,19 +772,19 @@ int xdepth = lv->treeStepSize() * (depth() + (lv->rootIsDecorated() ? 1 : 0)) + lv->itemMargin(); int p = lv->header()->cellPos(lv->header()->mapToActual(0)); xdepth += p; - intersect = r.intersects(QRect(p, r.y(), xdepth - p + 1, r.height())); + intersect = r.intersects(TQRect(p, r.y(), xdepth - p + 1, r.height())); } - bool parentControl = false; - if (parent() && parent()->rtti() == 1 && - ((KviTalCheckListItem*) parent())->type() == RadioButtonController) - parentControl = true; + bool tqparentControl = false; + if (tqparent() && tqparent()->rtti() == 1 && + ((KviTalCheckListItem*) tqparent())->type() == RadioButtonController) + tqparentControl = true; if (myType != RadioButtonController && intersect && (lv->rootIsDecorated() || myType == RadioButton || - (myType == CheckBox && parentControl))) { - QRect rect; - int boxsize = lv->style()->pixelMetric(QStyle::PM_CheckListButtonSize, 0, lv); - if (lv->columnAlignment(0) == Qt::AlignCenter) { - QFontMetrics fm(lv->font()); + (myType == CheckBox && tqparentControl))) { + TQRect rect; + int boxsize = lv->tqstyle()->tqpixelMetric(TQStyle::PM_CheckListButtonSize, 0, lv); + if (lv->columnAlignment(0) == TQt::AlignCenter) { + TQFontMetrics fm(lv->font()); int bx = (lv->columnWidth(0) - (boxsize + fm.width(text())))/2 + boxsize; if (bx < 0) bx = 0; rect.setRect(r.x() + bx + 5, r.y(), r.width() - bx - 5, @@ -801,120 +801,120 @@ #include "kvi_tal_listview_qt4.moc" #else - #include - #include - #include - #include + #include + #include + #include + #include - KviTalListView::KviTalListView(QWidget * pParent) - : QListView(pParent) - { - connect(this,SIGNAL(selectionChanged(QListViewItem *)),this,SLOT(redirect_selectionChanged(QListViewItem *))); - connect(this,SIGNAL(currentChanged(QListViewItem *)),this,SLOT(redirect_currentChanged(QListViewItem *))); - connect(this,SIGNAL(clicked(QListViewItem *)),this,SLOT(redirect_clicked(QListViewItem *))); - connect(this,SIGNAL(clicked(QListViewItem *,const QPoint &,int)),this,SLOT(redirect_clicked(QListViewItem *,const QPoint &,int))); - connect(this,SIGNAL(pressed(QListViewItem *)),this,SLOT(redirect_pressed(QListViewItem *))); - connect(this,SIGNAL(pressed(QListViewItem *,const QPoint &,int)),this,SLOT(redirect_pressed(QListViewItem *,const QPoint &,int))); - connect(this,SIGNAL(doubleClicked(QListViewItem *)),this,SLOT(redirect_doubleClicked(QListViewItem *))); - connect(this,SIGNAL(doubleClicked(QListViewItem *,const QPoint &,int)),this,SLOT(redirect_doubleClicked(QListViewItem *,const QPoint &,int))); - connect(this,SIGNAL(returnPressed(QListViewItem *)),this,SLOT(redirect_returnPressed(QListViewItem *))); - connect(this,SIGNAL(spacePressed(QListViewItem *)),this,SLOT(redirect_spacePressed(QListViewItem *))); - connect(this,SIGNAL(rightButtonClicked(QListViewItem *,const QPoint &,int)),this,SLOT(redirect_rightButtonClicked(QListViewItem *,const QPoint &,int))); - connect(this,SIGNAL(rightButtonPressed(QListViewItem *,const QPoint &,int)),this,SLOT(redirect_rightButtonPressed(QListViewItem *,const QPoint &,int))); - connect(this,SIGNAL(mouseButtonClicked(int,QListViewItem *,const QPoint &,int)),this,SLOT(redirect_mouseButtonClicked(int,QListViewItem *,const QPoint &,int))); - connect(this,SIGNAL(mouseButtonPressed(int,QListViewItem *,const QPoint &,int)),this,SLOT(redirect_mouseButtonPressed(int,QListViewItem *,const QPoint &,int))); - connect(this,SIGNAL(contextMenuRequested(QListViewItem *,const QPoint &,int)),this,SLOT(redirect_contextMenuRequested(QListViewItem *,const QPoint &,int))); - connect(this,SIGNAL(onItem(QListViewItem *)),this,SLOT(redirect_onItem(QListViewItem *))); - connect(this,SIGNAL(expanded(QListViewItem *)),this,SLOT(redirect_expanded(QListViewItem *))); - connect(this,SIGNAL(collapsed(QListViewItem *)),this,SLOT(redirect_collapsed(QListViewItem *))); + KviTalListView::KviTalListView(TQWidget * pParent) + : TQListView(pParent) + { + connect(this,TQT_SIGNAL(selectionChanged(TQListViewItem *)),this,TQT_SLOT(redirect_selectionChanged(TQListViewItem *))); + connect(this,TQT_SIGNAL(currentChanged(TQListViewItem *)),this,TQT_SLOT(redirect_currentChanged(TQListViewItem *))); + connect(this,TQT_SIGNAL(clicked(TQListViewItem *)),this,TQT_SLOT(redirect_clicked(TQListViewItem *))); + connect(this,TQT_SIGNAL(clicked(TQListViewItem *,const TQPoint &,int)),this,TQT_SLOT(redirect_clicked(TQListViewItem *,const TQPoint &,int))); + connect(this,TQT_SIGNAL(pressed(TQListViewItem *)),this,TQT_SLOT(redirect_pressed(TQListViewItem *))); + connect(this,TQT_SIGNAL(pressed(TQListViewItem *,const TQPoint &,int)),this,TQT_SLOT(redirect_pressed(TQListViewItem *,const TQPoint &,int))); + connect(this,TQT_SIGNAL(doubleClicked(TQListViewItem *)),this,TQT_SLOT(redirect_doubleClicked(TQListViewItem *))); + connect(this,TQT_SIGNAL(doubleClicked(TQListViewItem *,const TQPoint &,int)),this,TQT_SLOT(redirect_doubleClicked(TQListViewItem *,const TQPoint &,int))); + connect(this,TQT_SIGNAL(returnPressed(TQListViewItem *)),this,TQT_SLOT(redirect_returnPressed(TQListViewItem *))); + connect(this,TQT_SIGNAL(spacePressed(TQListViewItem *)),this,TQT_SLOT(redirect_spacePressed(TQListViewItem *))); + connect(this,TQT_SIGNAL(rightButtonClicked(TQListViewItem *,const TQPoint &,int)),this,TQT_SLOT(redirect_rightButtonClicked(TQListViewItem *,const TQPoint &,int))); + connect(this,TQT_SIGNAL(rightButtonPressed(TQListViewItem *,const TQPoint &,int)),this,TQT_SLOT(redirect_rightButtonPressed(TQListViewItem *,const TQPoint &,int))); + connect(this,TQT_SIGNAL(mouseButtonClicked(int,TQListViewItem *,const TQPoint &,int)),this,TQT_SLOT(redirect_mouseButtonClicked(int,TQListViewItem *,const TQPoint &,int))); + connect(this,TQT_SIGNAL(mouseButtonPressed(int,TQListViewItem *,const TQPoint &,int)),this,TQT_SLOT(redirect_mouseButtonPressed(int,TQListViewItem *,const TQPoint &,int))); + connect(this,TQT_SIGNAL(contextMenuRequested(TQListViewItem *,const TQPoint &,int)),this,TQT_SLOT(redirect_contextMenuRequested(TQListViewItem *,const TQPoint &,int))); + connect(this,TQT_SIGNAL(onItem(TQListViewItem *)),this,TQT_SLOT(redirect_onItem(TQListViewItem *))); + connect(this,TQT_SIGNAL(expanded(TQListViewItem *)),this,TQT_SLOT(redirect_expanded(TQListViewItem *))); + connect(this,TQT_SIGNAL(collapsed(TQListViewItem *)),this,TQT_SLOT(redirect_collapsed(TQListViewItem *))); } - void KviTalListView::redirect_selectionChanged(QListViewItem * pItem) + void KviTalListView::redirect_selectionChanged(TQListViewItem * pItem) { emit selectionChanged((KviTalListViewItem *)pItem); } - void KviTalListView::redirect_currentChanged(QListViewItem * pItem) + void KviTalListView::redirect_currentChanged(TQListViewItem * pItem) { emit currentChanged((KviTalListViewItem *)pItem); } - void KviTalListView::redirect_clicked(QListViewItem * pItem) + void KviTalListView::redirect_clicked(TQListViewItem * pItem) { emit clicked((KviTalListViewItem *)pItem); } - void KviTalListView::redirect_clicked(QListViewItem * pItem,const QPoint &pnt,int uColumn) + void KviTalListView::redirect_clicked(TQListViewItem * pItem,const TQPoint &pnt,int uColumn) { emit clicked((KviTalListViewItem *)pItem,pnt,uColumn); } - void KviTalListView::redirect_pressed(QListViewItem * pItem) + void KviTalListView::redirect_pressed(TQListViewItem * pItem) { emit pressed((KviTalListViewItem *)pItem); } - void KviTalListView::redirect_pressed(QListViewItem * pItem,const QPoint &pnt,int uColumn) + void KviTalListView::redirect_pressed(TQListViewItem * pItem,const TQPoint &pnt,int uColumn) { emit pressed((KviTalListViewItem *)pItem,pnt,uColumn); } - void KviTalListView::redirect_doubleClicked(QListViewItem * pItem) + void KviTalListView::redirect_doubleClicked(TQListViewItem * pItem) { emit doubleClicked((KviTalListViewItem *)pItem); } - void KviTalListView::redirect_doubleClicked(QListViewItem * pItem,const QPoint &pnt,int uColumn) + void KviTalListView::redirect_doubleClicked(TQListViewItem * pItem,const TQPoint &pnt,int uColumn) { emit doubleClicked((KviTalListViewItem *)pItem,pnt,uColumn); } - void KviTalListView::redirect_returnPressed(QListViewItem * pItem) + void KviTalListView::redirect_returnPressed(TQListViewItem * pItem) { emit returnPressed((KviTalListViewItem *)pItem); } - void KviTalListView::redirect_spacePressed(QListViewItem * pItem) + void KviTalListView::redirect_spacePressed(TQListViewItem * pItem) { emit spacePressed((KviTalListViewItem *)pItem); } - void KviTalListView::redirect_rightButtonClicked(QListViewItem * pItem,const QPoint &pnt,int uColumn) + void KviTalListView::redirect_rightButtonClicked(TQListViewItem * pItem,const TQPoint &pnt,int uColumn) { emit rightButtonClicked((KviTalListViewItem *)pItem,pnt,uColumn); } - void KviTalListView::redirect_rightButtonPressed(QListViewItem * pItem,const QPoint &pnt,int uColumn) + void KviTalListView::redirect_rightButtonPressed(TQListViewItem * pItem,const TQPoint &pnt,int uColumn) { emit rightButtonPressed((KviTalListViewItem *)pItem,pnt,uColumn); } - void KviTalListView::redirect_mouseButtonClicked(int iButton,QListViewItem * pItem,const QPoint &pnt,int uColumn) + void KviTalListView::redirect_mouseButtonClicked(int iButton,TQListViewItem * pItem,const TQPoint &pnt,int uColumn) { emit mouseButtonClicked(iButton,(KviTalListViewItem *)pItem,pnt,uColumn); } - void KviTalListView::redirect_mouseButtonPressed(int iButton,QListViewItem * pItem,const QPoint &pnt,int uColumn) + void KviTalListView::redirect_mouseButtonPressed(int iButton,TQListViewItem * pItem,const TQPoint &pnt,int uColumn) { emit mouseButtonPressed(iButton,(KviTalListViewItem *)pItem,pnt,uColumn); } - void KviTalListView::redirect_contextMenuRequested(QListViewItem * pItem,const QPoint &pnt,int uColumn) + void KviTalListView::redirect_contextMenuRequested(TQListViewItem * pItem,const TQPoint &pnt,int uColumn) { emit contextMenuRequested((KviTalListViewItem *)pItem,pnt,uColumn); } - void KviTalListView::redirect_onItem(QListViewItem * pItem) + void KviTalListView::redirect_onItem(TQListViewItem * pItem) { emit onItem((KviTalListViewItem *)pItem); } - void KviTalListView::redirect_expanded(QListViewItem * pItem) + void KviTalListView::redirect_expanded(TQListViewItem * pItem) { emit expanded((KviTalListViewItem *)pItem); } - void KviTalListView::redirect_collapsed(QListViewItem * pItem) + void KviTalListView::redirect_collapsed(TQListViewItem * pItem) { emit collapsed((KviTalListViewItem *)pItem); } @@ -935,39 +935,39 @@ // ### obscenity is warranted. - KviTalCheckListItem::KviTalCheckListItem( KviTalCheckListItem *parent, const QString &text, + KviTalCheckListItem::KviTalCheckListItem( KviTalCheckListItem *tqparent, const TQString &text, Type tt ) - : KviTalListViewItem( parent, text, QString::null ) + : KviTalListViewItem( tqparent, text, TQString() ) { myType = tt; init(); if ( myType == RadioButton ) { - if ( parent->type() != RadioButtonController ) + if ( tqparent->type() != RadioButtonController ) qWarning( "KviTalCheckListItem::KviTalCheckListItem(), radio button must be " "child of a controller" ); else - d->exclusive = parent; + d->exclusive = tqparent; } } - KviTalCheckListItem::KviTalCheckListItem( KviTalCheckListItem *parent, KviTalListViewItem *after, - const QString &text, Type tt ) - : KviTalListViewItem( parent, after, text ) + KviTalCheckListItem::KviTalCheckListItem( KviTalCheckListItem *tqparent, KviTalListViewItem *after, + const TQString &text, Type tt ) + : KviTalListViewItem( tqparent, after, text ) { myType = tt; init(); if ( myType == RadioButton ) { - if ( parent->type() != RadioButtonController ) + if ( tqparent->type() != RadioButtonController ) qWarning( "KviTalCheckListItem::KviTalCheckListItem(), radio button must be " "child of a controller" ); else - d->exclusive = parent; + d->exclusive = tqparent; } } - KviTalCheckListItem::KviTalCheckListItem( KviTalListViewItem *parent, const QString &text, + KviTalCheckListItem::KviTalCheckListItem( KviTalListViewItem *tqparent, const TQString &text, Type tt ) - : KviTalListViewItem( parent, text, QString::null ) + : KviTalListViewItem( tqparent, text, TQString() ) { myType = tt; if ( myType == RadioButton ) { @@ -977,9 +977,9 @@ init(); } - KviTalCheckListItem::KviTalCheckListItem( KviTalListViewItem *parent, KviTalListViewItem *after, - const QString &text, Type tt ) - : KviTalListViewItem( parent, after, text ) + KviTalCheckListItem::KviTalCheckListItem( KviTalListViewItem *tqparent, KviTalListViewItem *after, + const TQString &text, Type tt ) + : KviTalListViewItem( tqparent, after, text ) { myType = tt; if ( myType == RadioButton ) { @@ -989,9 +989,9 @@ init(); } - KviTalCheckListItem::KviTalCheckListItem( KviTalListView *parent, const QString &text, + KviTalCheckListItem::KviTalCheckListItem( KviTalListView *tqparent, const TQString &text, Type tt ) - : KviTalListViewItem( parent, text ) + : KviTalListViewItem( tqparent, text ) { myType = tt; if ( tt == RadioButton ) @@ -1000,9 +1000,9 @@ init(); } - KviTalCheckListItem::KviTalCheckListItem( KviTalListView *parent, KviTalListViewItem *after, - const QString &text, Type tt ) - : KviTalListViewItem( parent, after, text ) + KviTalCheckListItem::KviTalCheckListItem( KviTalListView *tqparent, KviTalListViewItem *after, + const TQString &text, Type tt ) + : KviTalListViewItem( tqparent, after, text ) { myType = tt; if ( tt == RadioButton ) @@ -1019,18 +1019,18 @@ return RTTI; } - KviTalCheckListItem::KviTalCheckListItem( KviTalListView *parent, const QString &text, - const QPixmap & p ) - : KviTalListViewItem( parent, text ) + KviTalCheckListItem::KviTalCheckListItem( KviTalListView *tqparent, const TQString &text, + const TQPixmap & p ) + : KviTalListViewItem( tqparent, text ) { myType = RadioButtonController; setPixmap( 0, p ); init(); } - KviTalCheckListItem::KviTalCheckListItem( KviTalListViewItem *parent, const QString &text, - const QPixmap & p ) - : KviTalListViewItem( parent, text ) + KviTalCheckListItem::KviTalCheckListItem( KviTalListViewItem *tqparent, const TQString &text, + const TQPixmap & p ) + : KviTalListViewItem( tqparent, text ) { myType = RadioButtonController; setPixmap( 0, p ); @@ -1056,7 +1056,7 @@ && d->exclusive && d->exclusive->d && d->exclusive->d->exclusive == this ) d->exclusive->turnOffChild(); - d->exclusive = 0; // so the children won't try to access us. + d->exclusive = 0; // so the tqchildren won't try to access us. if ( d->statesDict ) delete d->statesDict; delete d; @@ -1107,9 +1107,9 @@ if ( myType == CheckBox ) { setCurrentState( s ); stateChange( state() ); - if ( update && parent() && parent()->rtti() == 1 - && ((KviTalCheckListItem*)parent())->type() == CheckBoxController ) - ((KviTalCheckListItem*)parent())->updateController( update, store ); + if ( update && tqparent() && tqparent()->rtti() == 1 + && ((KviTalCheckListItem*)tqparent())->type() == CheckBoxController ) + ((KviTalCheckListItem*)tqparent())->updateController( update, store ); } else if ( myType == CheckBoxController ) { if ( s == NoChange && childCount()) { restoreState( (void*) this ); @@ -1131,18 +1131,18 @@ ToggleState oldState = internalState(); updateController( FALSE, FALSE ); if ( oldState != internalState() && - parent() && parent()->rtti() == 1 && - ((KviTalCheckListItem*)parent())->type() == CheckBoxController ) - ((KviTalCheckListItem*)parent())->updateController( update, store ); + tqparent() && tqparent()->rtti() == 1 && + ((KviTalCheckListItem*)tqparent())->type() == CheckBoxController ) + ((KviTalCheckListItem*)tqparent())->updateController( update, store ); updateController( update, store ); } else { - // if there are no children we simply set the CheckBoxController and update its parent + // if there are no tqchildren we simply set the CheckBoxController and update its tqparent setCurrentState( s ); stateChange( state() ); - if ( parent() && parent()->rtti() == 1 - && ((KviTalCheckListItem*)parent())->type() == CheckBoxController ) - ((KviTalCheckListItem*)parent())->updateController( update, store ); + if ( tqparent() && tqparent()->rtti() == 1 + && ((KviTalCheckListItem*)tqparent())->type() == CheckBoxController ) + ((KviTalCheckListItem*)tqparent())->updateController( update, store ); } } else { setCurrentState( s ); @@ -1164,7 +1164,7 @@ } stateChange( state() ); } - repaint(); + tqrepaint(); } void KviTalCheckListItem::setCurrentState( ToggleState s ) @@ -1176,9 +1176,9 @@ else on = FALSE; - #if defined(QT_ACCESSIBILITY_SUPPORT) + #if defined(TQT_ACCESSIBILITY_SUPPORT) if ( old != d->currentState && listView() ) - QAccessible::updateAccessibility( listView()->viewport(), indexOfItem( this ), QAccessible::StateChanged ); + TQAccessible::updateAccessibility( listView()->viewport(), indexOfItem( this ), TQAccessible::StateChanged ); #else Q_UNUSED( old ); #endif @@ -1187,7 +1187,7 @@ void KviTalCheckListItem::setStoredState( ToggleState newState, void *key ) { if ( myType == CheckBox || myType == CheckBoxController ) - d->statesDict->replace( key, new ToggleState(newState) ); + d->statesDict->tqreplace( key, new ToggleState(newState) ); } KviTalCheckListItem::ToggleState KviTalCheckListItem::storedState( void *key ) const @@ -1195,7 +1195,7 @@ if ( !d->statesDict ) return Off; - ToggleState *foundState = d->statesDict->find( key ); + ToggleState *foundState = d->statesDict->tqfind( key ); if ( foundState ) return ToggleState( *foundState ); else @@ -1215,15 +1215,15 @@ if ( lv && !lv->isEnabled() || !isEnabled() ) return; - QPoint pos; - int boxsize = lv->style().pixelMetric(QStyle::PM_CheckListButtonSize, lv); + TQPoint pos; + int boxsize = lv->tqstyle().tqpixelMetric(TQStyle::PM_CheckListButtonSize, lv); if ( activatedPos( pos ) ) { - bool parentControl = FALSE; - if ( parent() && parent()->rtti() == 1 && - ((KviTalCheckListItem*) parent())->type() == RadioButtonController ) - parentControl = TRUE; + bool tqparentControl = FALSE; + if ( tqparent() && tqparent()->rtti() == 1 && + ((KviTalCheckListItem*) tqparent())->type() == RadioButtonController ) + tqparentControl = TRUE; - int x = parentControl ? 0 : 3; + int x = tqparentControl ? 0 : 3; int align = lv->columnAlignment( 0 ); int marg = lv->itemMargin(); int y = 0; @@ -1233,10 +1233,10 @@ else y = (lv->fontMetrics().height() + 2 + marg - boxsize) / 2; - QRect r( x, y, boxsize-3, boxsize-3 ); + TQRect r( x, y, boxsize-3, boxsize-3 ); // columns might have been swapped r.moveBy( lv->header()->sectionPos( 0 ), 0 ); - if ( !r.contains( pos ) ) + if ( !r.tqcontains( pos ) ) return; } if ( ( myType == CheckBox ) || ( myType == CheckBoxController) ) { @@ -1287,13 +1287,13 @@ case CheckBox: setCurrentState( storedState( key ) ); stateChange( state() ); - repaint(); + tqrepaint(); break; case CheckBoxController: { KviTalListViewItem *item = firstChild(); int childCount = 0; while ( item ) { - // recursively calling restoreState for children of type CheckBox and CheckBoxController + // recursively calling restoreState for tqchildren of type CheckBox and CheckBoxController if ( item->rtti() == 1 && ( ((KviTalCheckListItem*)item)->type() == CheckBox || ((KviTalCheckListItem*)item)->type() == CheckBoxController ) ) { @@ -1308,7 +1308,7 @@ else updateController( FALSE ); } else { - // if there are no children we retrieve the CheckBoxController state directly. + // if there are no tqchildren we retrieve the CheckBoxController state directly. setState( storedState( key ), TRUE, FALSE ); } } @@ -1324,10 +1324,10 @@ return; KviTalCheckListItem *controller = 0; - // checks if this CheckBoxController has another CheckBoxController as parent - if ( parent() && parent()->rtti() == 1 - && ((KviTalCheckListItem*)parent())->type() == CheckBoxController ) - controller = (KviTalCheckListItem*)parent(); + // checks if this CheckBoxController has another CheckBoxController as tqparent + if ( tqparent() && tqparent()->rtti() == 1 + && ((KviTalCheckListItem*)tqparent())->type() == CheckBoxController ) + controller = (KviTalCheckListItem*)tqparent(); ToggleState theState = Off; bool first = TRUE; @@ -1358,7 +1358,7 @@ if ( update && controller ) { controller->updateController( update, store ); } - repaint(); + tqrepaint(); } } @@ -1378,7 +1378,7 @@ } item = item->nextSibling(); } - // this state is only needed if the CheckBoxController has no CheckBox / CheckBoxController children. + // this state is only needed if the CheckBoxController has no CheckBox / CheckBoxController tqchildren. setStoredState( internalState() , key ); } @@ -1388,13 +1388,13 @@ int h = height(); KviTalListView *lv = listView(); if ( lv ) - h = QMAX( lv->style().pixelMetric(QStyle::PM_CheckListButtonSize, lv), + h = TQMAX( lv->tqstyle().tqpixelMetric(TQStyle::PM_CheckListButtonSize, lv), h ); - h = QMAX( h, QApplication::globalStrut().height() ); + h = TQMAX( h, TQApplication::globalStrut().height() ); setHeight( h ); } - int KviTalCheckListItem::width( const QFontMetrics& fm, const KviTalListView* lv, int column) const + int KviTalCheckListItem::width( const TQFontMetrics& fm, const KviTalListView* lv, int column) const { int r = KviTalListViewItem::width( fm, lv, column ); if ( column == 0 ) { @@ -1402,13 +1402,13 @@ if ( myType == RadioButtonController && pixmap( 0 ) ) { // r += 0; } else { - r += lv->style().pixelMetric(QStyle::PM_CheckListButtonSize, lv) + 4; + r += lv->tqstyle().tqpixelMetric(TQStyle::PM_CheckListButtonSize, lv) + 4; } } - return QMAX( r, QApplication::globalStrut().width() ); + return TQMAX( r, TQApplication::globalStrut().width() ); } - void KviTalCheckListItem::paintCell( QPainter * p, const QColorGroup & cg, + void KviTalCheckListItem::paintCell( TQPainter * p, const TQColorGroup & cg, int column, int width, int align ) { if ( !p ) @@ -1419,11 +1419,11 @@ return; const BackgroundMode bgmode = lv->viewport()->backgroundMode(); - const QColorGroup::ColorRole crole = QPalette::backgroundRoleFromMode( bgmode ); - if ( cg.brush( crole ) != lv->colorGroup().brush( crole ) ) + const TQColorGroup::ColorRole crole = TQPalette::backgroundRoleFromMode( bgmode ); + if ( cg.brush( crole ) != lv->tqcolorGroup().brush( crole ) ) p->fillRect( 0, 0, width, height(), cg.brush( crole ) ); else - lv->paintEmptyArea( p, QRect( 0, 0, width, height() ) ); + lv->paintEmptyArea( p, TQRect( 0, 0, width, height() ) ); if ( column != 0 ) { // The rest is text, or for subclasses to change. @@ -1431,50 +1431,50 @@ return; } - bool parentControl = FALSE; - if ( parent() && parent()->rtti() == 1 && - ((KviTalCheckListItem*) parent())->type() == RadioButtonController ) - parentControl = TRUE; + bool tqparentControl = FALSE; + if ( tqparent() && tqparent()->rtti() == 1 && + ((KviTalCheckListItem*) tqparent())->type() == RadioButtonController ) + tqparentControl = TRUE; - QFontMetrics fm( lv->fontMetrics() ); - int boxsize = lv->style().pixelMetric( myType == RadioButtonController ? QStyle::PM_CheckListControllerSize : - QStyle::PM_CheckListButtonSize, lv); + TQFontMetrics fm( lv->fontMetrics() ); + int boxsize = lv->tqstyle().tqpixelMetric( myType == RadioButtonController ? TQStyle::PM_CheckListControllerSize : + TQStyle::PM_CheckListButtonSize, lv); int marg = lv->itemMargin(); int r = marg; // Draw controller / checkbox / radiobutton --------------------- - int styleflags = QStyle::Style_Default; + int styleflags = TQStyle::Style_Default; if ( internalState() == On ) { - styleflags |= QStyle::Style_On; + styleflags |= TQStyle::Style_On; } else if ( internalState() == NoChange ) { if ( myType == CheckBoxController && !isTristate() ) - styleflags |= QStyle::Style_Off; + styleflags |= TQStyle::Style_Off; else - styleflags |= QStyle::Style_NoChange; + styleflags |= TQStyle::Style_NoChange; } else { - styleflags |= QStyle::Style_Off; + styleflags |= TQStyle::Style_Off; } if ( isSelected() ) - styleflags |= QStyle::Style_Selected; + styleflags |= TQStyle::Style_Selected; if ( isEnabled() && lv->isEnabled() ) - styleflags |= QStyle::Style_Enabled; + styleflags |= TQStyle::Style_Enabled; if ( myType == RadioButtonController ) { int x = 0; - if(!parentControl) + if(!tqparentControl) x += 3; if ( !pixmap( 0 ) ) { - lv->style().drawPrimitive(QStyle::PE_CheckListController, p, - QRect(x, 0, boxsize, + lv->tqstyle().tqdrawPrimitive(TQStyle::PE_CheckListController, p, + TQRect(x, 0, boxsize, fm.height() + 2 + marg), - cg, styleflags, QStyleOption(this)); + cg, styleflags, TQStyleOption(this)); r += boxsize + 4; } } else { Q_ASSERT( lv ); //### int x = 0; int y = 0; - if ( !parentControl ) + if ( !tqparentControl ) x += 3; if ( align & AlignVCenter ) y = ( ( height() - boxsize ) / 2 ) + marg; @@ -1482,26 +1482,26 @@ y = (fm.height() + 2 + marg - boxsize) / 2; if ( ( myType == CheckBox ) || ( myType == CheckBoxController ) ) { - lv->style().drawPrimitive(QStyle::PE_CheckListIndicator, p, - QRect(x, y, boxsize, + lv->tqstyle().tqdrawPrimitive(TQStyle::PE_CheckListIndicator, p, + TQRect(x, y, boxsize, fm.height() + 2 + marg), - cg, styleflags, QStyleOption(this)); + cg, styleflags, TQStyleOption(this)); } else { //radio button look - lv->style().drawPrimitive(QStyle::PE_CheckListExclusiveIndicator, - p, QRect(x, y, boxsize, + lv->tqstyle().tqdrawPrimitive(TQStyle::PE_CheckListExclusiveIndicator, + p, TQRect(x, y, boxsize, fm.height() + 2 + marg), - cg, styleflags, QStyleOption(this)); + cg, styleflags, TQStyleOption(this)); } r += boxsize + 4; } // Draw text ---------------------------------------------------- p->translate( r, 0 ); - p->setPen( QPen( cg.text() ) ); + p->setPen( TQPen( cg.text() ) ); KviTalListViewItem::paintCell( p, cg, column, width - r, align ); } - void KviTalCheckListItem::paintFocus( QPainter *p, const QColorGroup & cg,const QRect & r ) + void KviTalCheckListItem::paintFocus( TQPainter *p, const TQColorGroup & cg,const TQRect & r ) { bool intersect = TRUE; KviTalListView *lv = listView(); @@ -1509,19 +1509,19 @@ int xdepth = lv->treeStepSize() * ( depth() + ( lv->rootIsDecorated() ? 1 : 0) ) + lv->itemMargin(); int p = lv->header()->cellPos( lv->header()->mapToActual( 0 ) ); xdepth += p; - intersect = r.intersects( QRect( p, r.y(), xdepth - p + 1, r.height() ) ); + intersect = r.intersects( TQRect( p, r.y(), xdepth - p + 1, r.height() ) ); } - bool parentControl = FALSE; - if ( parent() && parent()->rtti() == 1 && - ((KviTalCheckListItem*) parent())->type() == RadioButtonController ) - parentControl = TRUE; + bool tqparentControl = FALSE; + if ( tqparent() && tqparent()->rtti() == 1 && + ((KviTalCheckListItem*) tqparent())->type() == RadioButtonController ) + tqparentControl = TRUE; if ( myType != RadioButtonController && intersect && (lv->rootIsDecorated() || myType == RadioButton || - (myType == CheckBox && parentControl) ) ) { - QRect rect; - int boxsize = lv->style().pixelMetric(QStyle::PM_CheckListButtonSize, lv); + (myType == CheckBox && tqparentControl) ) ) { + TQRect rect; + int boxsize = lv->tqstyle().tqpixelMetric(TQStyle::PM_CheckListButtonSize, lv); if ( lv->columnAlignment(0) == AlignCenter ) { - QFontMetrics fm( lv->font() ); + TQFontMetrics fm( lv->font() ); int bx = (lv->columnWidth(0) - (boxsize + fm.width(text())))/2 + boxsize; if ( bx < 0 ) bx = 0; rect.setRect( r.x() + bx + 5, r.y(), r.width() - bx - 5, diff --git a/src/kvilib/tal/kvi_tal_listview.h b/src/kvilib/tal/kvi_tal_listview.h index 9b95e2f8..0bf48740 100644 --- a/src/kvilib/tal/kvi_tal_listview.h +++ b/src/kvilib/tal/kvi_tal_listview.h @@ -28,13 +28,13 @@ // // This is the only reasonable CROSS-QT3-QT4-COMPATIBLE implementation -// of QListView I've been able to find. -// Note that using macros for the items will NOT work since moc +// of TQListView I've been able to find. +// Note that using macros for the items will NOT work since tqmoc // doesn't expand them. Note also that KviTalCheckListItem must -// be fully reimplemented and not be inherited from QCheckListItem +// be fully reimplemented and not be inherited from TQCheckListItem // to build up a consistent item object hierarchy. To complete -// the obscenity, we need TWO COMPLETE implementations: one for Qt3 -// and one for Qt4... bleah :D +// the obscenity, we need TWO COMPLETE implementations: one for TQt3 +// and one for TQt4... bleah :D // // The code for KviTalCheckListItem is adapted from qlistview.h/cpp // present in qt 3.3.6 AND in qt 4.1.2. diff --git a/src/kvilib/tal/kvi_tal_listview_qt3.h b/src/kvilib/tal/kvi_tal_listview_qt3.h index 4fe4a766..75b062a4 100644 --- a/src/kvilib/tal/kvi_tal_listview_qt3.h +++ b/src/kvilib/tal/kvi_tal_listview_qt3.h @@ -29,93 +29,94 @@ #include "kvi_qstring.h" -#include +#include class KviTalListViewItem; -class KVILIB_API KviTalListView : public QListView +class KVILIB_API KviTalListView : public TQListView { friend class KviTalCheckListItem; Q_OBJECT + TQ_OBJECT public: - KviTalListView(QWidget * pParent); + KviTalListView(TQWidget * pParent); virtual ~KviTalListView() {}; public: - // Shadow the internal Qt methods - KviTalListViewItem * firstChild() const { return (KviTalListViewItem *)QListView::firstChild(); }; - KviTalListViewItem * lastItem() const { return (KviTalListViewItem *)QListView::lastItem(); }; - KviTalListViewItem * selectedItem() const { return (KviTalListViewItem *)QListView::selectedItem(); }; - KviTalListViewItem * currentItem() const { return (KviTalListViewItem *)QListView::currentItem(); }; - KviTalListViewItem * itemAt(const QPoint &pnt) const { return (KviTalListViewItem *)QListView::itemAt(pnt); }; + // Shadow the internal TQt methods + KviTalListViewItem * firstChild() const { return (KviTalListViewItem *)TQListView::firstChild(); }; + KviTalListViewItem * lastItem() const { return (KviTalListViewItem *)TQListView::lastItem(); }; + KviTalListViewItem * selectedItem() const { return (KviTalListViewItem *)TQListView::selectedItem(); }; + KviTalListViewItem * currentItem() const { return (KviTalListViewItem *)TQListView::currentItem(); }; + KviTalListViewItem * itemAt(const TQPoint &pnt) const { return (KviTalListViewItem *)TQListView::itemAt(pnt); }; signals: void selectionChanged(KviTalListViewItem * pItem); void currentChanged(KviTalListViewItem * pItem); void clicked(KviTalListViewItem * pItem); - void clicked(KviTalListViewItem * pItem,const QPoint &pnt,int uColumn); + void clicked(KviTalListViewItem * pItem,const TQPoint &pnt,int uColumn); void pressed(KviTalListViewItem * pItem); - void pressed(KviTalListViewItem * pItem,const QPoint &pnt,int uColumn); + void pressed(KviTalListViewItem * pItem,const TQPoint &pnt,int uColumn); void doubleClicked(KviTalListViewItem * pItem); - void doubleClicked(KviTalListViewItem * pItem,const QPoint &pnt,int uColumn); + void doubleClicked(KviTalListViewItem * pItem,const TQPoint &pnt,int uColumn); void returnPressed(KviTalListViewItem * pItem); void spacePressed(KviTalListViewItem * pItem); - void rightButtonClicked(KviTalListViewItem * pItem,const QPoint &pnt,int uColumn); - void rightButtonPressed(KviTalListViewItem * pItem,const QPoint &pnt,int uColumn); - void mouseButtonClicked(int iButton,KviTalListViewItem * pItem,const QPoint &pnt,int uColumn); - void mouseButtonPressed(int iButton,KviTalListViewItem * pItem,const QPoint &pnt,int uColumn); - void contextMenuRequested(KviTalListViewItem * pItem,const QPoint &pnt,int uColumn); + void rightButtonClicked(KviTalListViewItem * pItem,const TQPoint &pnt,int uColumn); + void rightButtonPressed(KviTalListViewItem * pItem,const TQPoint &pnt,int uColumn); + void mouseButtonClicked(int iButton,KviTalListViewItem * pItem,const TQPoint &pnt,int uColumn); + void mouseButtonPressed(int iButton,KviTalListViewItem * pItem,const TQPoint &pnt,int uColumn); + void contextMenuRequested(KviTalListViewItem * pItem,const TQPoint &pnt,int uColumn); void onItem(KviTalListViewItem * pItem); void expanded(KviTalListViewItem * pItem); void collapsed(KviTalListViewItem * pItem); protected slots: - void redirect_selectionChanged(QListViewItem * pItem); - void redirect_currentChanged(QListViewItem * pItem); - void redirect_clicked(QListViewItem * pItem); - void redirect_clicked(QListViewItem * pItem,const QPoint &pnt,int uColumn); - void redirect_pressed(QListViewItem * pItem); - void redirect_pressed(QListViewItem * pItem,const QPoint &pnt,int uColumn); - void redirect_doubleClicked(QListViewItem * pItem); - void redirect_doubleClicked(QListViewItem * pItem,const QPoint &pnt,int uColumn); - void redirect_returnPressed(QListViewItem * pItem); - void redirect_spacePressed(QListViewItem * pItem); - void redirect_rightButtonClicked(QListViewItem * pItem,const QPoint &pnt,int uColumn); - void redirect_rightButtonPressed(QListViewItem * pItem,const QPoint &pnt,int uColumn); - void redirect_mouseButtonClicked(int iButton,QListViewItem * pItem,const QPoint &pnt,int uColumn); - void redirect_mouseButtonPressed(int iButton,QListViewItem * pItem,const QPoint &pnt,int uColumn); - void redirect_contextMenuRequested(QListViewItem * pItem,const QPoint &pnt,int uColumn); - void redirect_onItem(QListViewItem * pItem); - void redirect_expanded(QListViewItem * pItem); - void redirect_collapsed(QListViewItem * pItem); + void redirect_selectionChanged(TQListViewItem * pItem); + void redirect_currentChanged(TQListViewItem * pItem); + void redirect_clicked(TQListViewItem * pItem); + void redirect_clicked(TQListViewItem * pItem,const TQPoint &pnt,int uColumn); + void redirect_pressed(TQListViewItem * pItem); + void redirect_pressed(TQListViewItem * pItem,const TQPoint &pnt,int uColumn); + void redirect_doubleClicked(TQListViewItem * pItem); + void redirect_doubleClicked(TQListViewItem * pItem,const TQPoint &pnt,int uColumn); + void redirect_returnPressed(TQListViewItem * pItem); + void redirect_spacePressed(TQListViewItem * pItem); + void redirect_rightButtonClicked(TQListViewItem * pItem,const TQPoint &pnt,int uColumn); + void redirect_rightButtonPressed(TQListViewItem * pItem,const TQPoint &pnt,int uColumn); + void redirect_mouseButtonClicked(int iButton,TQListViewItem * pItem,const TQPoint &pnt,int uColumn); + void redirect_mouseButtonPressed(int iButton,TQListViewItem * pItem,const TQPoint &pnt,int uColumn); + void redirect_contextMenuRequested(TQListViewItem * pItem,const TQPoint &pnt,int uColumn); + void redirect_onItem(TQListViewItem * pItem); + void redirect_expanded(TQListViewItem * pItem); + void redirect_collapsed(TQListViewItem * pItem); }; -class KVILIB_API KviTalListViewItem : public QListViewItem +class KVILIB_API KviTalListViewItem : public TQListViewItem { public: KviTalListViewItem(KviTalListView * pParent) - : QListViewItem(pParent) {}; + : TQListViewItem(pParent) {}; KviTalListViewItem(KviTalListViewItem * pParent) - : QListViewItem(pParent) {}; + : TQListViewItem(pParent) {}; KviTalListViewItem(KviTalListView * pParent,KviTalListViewItem * pAfter) - : QListViewItem(pParent,pAfter) {}; + : TQListViewItem(pParent,pAfter) {}; KviTalListViewItem(KviTalListViewItem * pParent,KviTalListViewItem * pAfter) - : QListViewItem(pParent,pAfter) {}; - KviTalListViewItem(KviTalListView * pParent,const QString &szLabel1,const QString &szLabel2 = KviQString::empty,const QString &szLabel3 = KviQString::empty,const QString &szLabel4 = KviQString::empty,const QString &szLabel5 = KviQString::empty) - : QListViewItem(pParent,szLabel1,szLabel2,szLabel3,szLabel4,szLabel5) {}; - KviTalListViewItem(KviTalListView * pParent,KviTalListViewItem * pAfter,const QString &szLabel1,const QString &szLabel2 = KviQString::empty,const QString &szLabel3 = KviQString::empty,const QString &szLabel4 = KviQString::empty,const QString &szLabel5 = KviQString::empty) - : QListViewItem(pParent,pAfter,szLabel1,szLabel2,szLabel3,szLabel4,szLabel5) {}; - KviTalListViewItem(KviTalListViewItem * pParent,const QString &szLabel1,const QString &szLabel2 = KviQString::empty,const QString &szLabel3 = KviQString::empty,const QString &szLabel4 = KviQString::empty) - : QListViewItem(pParent,szLabel1,szLabel2,szLabel3,szLabel4) {}; - KviTalListViewItem(KviTalListViewItem * pParent,KviTalListViewItem * pAfter,const QString &szLabel1,const QString &szLabel2 = KviQString::empty,const QString &szLabel3 = KviQString::empty,const QString &szLabel4 = KviQString::empty) - : QListViewItem(pParent,pAfter,szLabel1,szLabel2,szLabel3,szLabel4) {}; + : TQListViewItem(pParent,pAfter) {}; + KviTalListViewItem(KviTalListView * pParent,const TQString &szLabel1,const TQString &szLabel2 = KviTQString::empty,const TQString &szLabel3 = KviTQString::empty,const TQString &szLabel4 = KviTQString::empty,const TQString &szLabel5 = KviTQString::empty) + : TQListViewItem(pParent,szLabel1,szLabel2,szLabel3,szLabel4,szLabel5) {}; + KviTalListViewItem(KviTalListView * pParent,KviTalListViewItem * pAfter,const TQString &szLabel1,const TQString &szLabel2 = KviTQString::empty,const TQString &szLabel3 = KviTQString::empty,const TQString &szLabel4 = KviTQString::empty,const TQString &szLabel5 = KviTQString::empty) + : TQListViewItem(pParent,pAfter,szLabel1,szLabel2,szLabel3,szLabel4,szLabel5) {}; + KviTalListViewItem(KviTalListViewItem * pParent,const TQString &szLabel1,const TQString &szLabel2 = KviTQString::empty,const TQString &szLabel3 = KviTQString::empty,const TQString &szLabel4 = KviTQString::empty) + : TQListViewItem(pParent,szLabel1,szLabel2,szLabel3,szLabel4) {}; + KviTalListViewItem(KviTalListViewItem * pParent,KviTalListViewItem * pAfter,const TQString &szLabel1,const TQString &szLabel2 = KviTQString::empty,const TQString &szLabel3 = KviTQString::empty,const TQString &szLabel4 = KviTQString::empty) + : TQListViewItem(pParent,pAfter,szLabel1,szLabel2,szLabel3,szLabel4) {}; virtual ~KviTalListViewItem() {}; public: - // Shadow the internal Qt methods - KviTalListViewItem * firstChild() const { return (KviTalListViewItem *)QListViewItem::firstChild(); }; - KviTalListViewItem * nextSibling() const { return (KviTalListViewItem *)QListViewItem::nextSibling(); }; - KviTalListViewItem * parent() const { return (KviTalListViewItem *)QListViewItem::parent(); }; - KviTalListView * listView() const { return (KviTalListView *)QListViewItem::listView(); }; - KviTalListViewItem * itemAbove() { return (KviTalListViewItem *)QListViewItem::itemAbove(); }; - KviTalListViewItem * itemBelow() { return (KviTalListViewItem *)QListViewItem::itemBelow(); }; + // Shadow the internal TQt methods + KviTalListViewItem * firstChild() const { return (KviTalListViewItem *)TQListViewItem::firstChild(); }; + KviTalListViewItem * nextSibling() const { return (KviTalListViewItem *)TQListViewItem::nextSibling(); }; + KviTalListViewItem * tqparent() const { return (KviTalListViewItem *)TQListViewItem::tqparent(); }; + KviTalListView * listView() const { return (KviTalListView *)TQListViewItem::listView(); }; + KviTalListViewItem * itemAbove() { return (KviTalListViewItem *)TQListViewItem::itemAbove(); }; + KviTalListViewItem * itemBelow() { return (KviTalListViewItem *)TQListViewItem::itemBelow(); }; }; struct KviTalCheckListItemPrivate; @@ -132,27 +133,27 @@ public: }; enum ToggleState { Off, NoChange, On }; - KviTalCheckListItem(KviTalCheckListItem *parent, const QString &text,Type = RadioButtonController); - KviTalCheckListItem(KviTalCheckListItem *parent, KviTalListViewItem *after,const QString &text, Type = RadioButtonController); - KviTalCheckListItem( KviTalListViewItem *parent, const QString &text,Type = RadioButtonController ); - KviTalCheckListItem( KviTalListViewItem *parent, KviTalListViewItem *after,const QString &text, Type = RadioButtonController ); - KviTalCheckListItem( KviTalListView *parent, const QString &text,Type = RadioButtonController ); - KviTalCheckListItem( KviTalListView *parent, KviTalListViewItem *after,const QString &text, Type = RadioButtonController ); - KviTalCheckListItem( KviTalListViewItem *parent, const QString &text,const QPixmap & ); - KviTalCheckListItem( KviTalListView *parent, const QString &text,const QPixmap & ); + KviTalCheckListItem(KviTalCheckListItem *tqparent, const TQString &text,Type = RadioButtonController); + KviTalCheckListItem(KviTalCheckListItem *tqparent, KviTalListViewItem *after,const TQString &text, Type = RadioButtonController); + KviTalCheckListItem( KviTalListViewItem *tqparent, const TQString &text,Type = RadioButtonController ); + KviTalCheckListItem( KviTalListViewItem *tqparent, KviTalListViewItem *after,const TQString &text, Type = RadioButtonController ); + KviTalCheckListItem( KviTalListView *tqparent, const TQString &text,Type = RadioButtonController ); + KviTalCheckListItem( KviTalListView *tqparent, KviTalListViewItem *after,const TQString &text, Type = RadioButtonController ); + KviTalCheckListItem( KviTalListViewItem *tqparent, const TQString &text,const TQPixmap & ); + KviTalCheckListItem( KviTalListView *tqparent, const TQString &text,const TQPixmap & ); ~KviTalCheckListItem(); - void paintCell( QPainter *,const QColorGroup & cg,int column, int width, int alignment ); - virtual void paintFocus( QPainter *, const QColorGroup & cg, - const QRect & r ); - int width( const QFontMetrics&, const KviTalListView*, int column) const; + void paintCell( TQPainter *,const TQColorGroup & cg,int column, int width, int tqalignment ); + virtual void paintFocus( TQPainter *, const TQColorGroup & cg, + const TQRect & r ); + int width( const TQFontMetrics&, const KviTalListView*, int column) const; void setup(); virtual void setOn( bool ); // ### should be replaced by setChecked in ver4 bool isOn() const { return on; } Type type() const { return myType; } - QString text() const { return KviTalListViewItem::text( 0 ); } - QString text( int n ) const { return KviTalListViewItem::text( n ); } + TQString text() const { return KviTalListViewItem::text( 0 ); } + TQString text( int n ) const { return KviTalListViewItem::text( n ); } void setTristate( bool ); bool isTristate() const; @@ -185,6 +186,6 @@ private: }; -#define KviTalListViewItemIterator QListViewItemIterator +#define KviTalListViewItemIterator TQListViewItemIterator #endif // _KVI_TAL_LISTVIEW_QT3_H_ diff --git a/src/kvilib/tal/kvi_tal_listview_qt4.h b/src/kvilib/tal/kvi_tal_listview_qt4.h index e6ccc829..d6f2bba6 100644 --- a/src/kvilib/tal/kvi_tal_listview_qt4.h +++ b/src/kvilib/tal/kvi_tal_listview_qt4.h @@ -29,7 +29,7 @@ #include "kvi_qstring.h" -#include +#include class KviTalListViewItem; @@ -38,32 +38,33 @@ class KVILIB_API KviTalListView : public Q3ListView { friend class KviTalCheckListItem; Q_OBJECT + TQ_OBJECT public: - KviTalListView(QWidget * pParent); + KviTalListView(TQWidget * pParent); virtual ~KviTalListView() {}; public: - // Shadow the internal Qt methods + // Shadow the internal TQt methods KviTalListViewItem * firstChild() const { return (KviTalListViewItem *)Q3ListView::firstChild(); }; KviTalListViewItem * lastItem() const { return (KviTalListViewItem *)Q3ListView::lastItem(); }; KviTalListViewItem * selectedItem() const { return (KviTalListViewItem *)Q3ListView::selectedItem(); }; KviTalListViewItem * currentItem() const { return (KviTalListViewItem *)Q3ListView::currentItem(); }; - KviTalListViewItem * itemAt(const QPoint &pnt) const { return (KviTalListViewItem *)Q3ListView::itemAt(pnt); }; + KviTalListViewItem * itemAt(const TQPoint &pnt) const { return (KviTalListViewItem *)Q3ListView::itemAt(pnt); }; signals: void selectionChanged(KviTalListViewItem * pItem); void currentChanged(KviTalListViewItem * pItem); void clicked(KviTalListViewItem * pItem); - void clicked(KviTalListViewItem * pItem,const QPoint &pnt,int uColumn); + void clicked(KviTalListViewItem * pItem,const TQPoint &pnt,int uColumn); void pressed(KviTalListViewItem * pItem); - void pressed(KviTalListViewItem * pItem,const QPoint &pnt,int uColumn); + void pressed(KviTalListViewItem * pItem,const TQPoint &pnt,int uColumn); void doubleClicked(KviTalListViewItem * pItem); - void doubleClicked(KviTalListViewItem * pItem,const QPoint &pnt,int uColumn); + void doubleClicked(KviTalListViewItem * pItem,const TQPoint &pnt,int uColumn); void returnPressed(KviTalListViewItem * pItem); void spacePressed(KviTalListViewItem * pItem); - void rightButtonClicked(KviTalListViewItem * pItem,const QPoint &pnt,int uColumn); - void rightButtonPressed(KviTalListViewItem * pItem,const QPoint &pnt,int uColumn); - void mouseButtonClicked(int iButton,KviTalListViewItem * pItem,const QPoint &pnt,int uColumn); - void mouseButtonPressed(int iButton,KviTalListViewItem * pItem,const QPoint &pnt,int uColumn); - void contextMenuRequested(KviTalListViewItem * pItem,const QPoint &pnt,int uColumn); + void rightButtonClicked(KviTalListViewItem * pItem,const TQPoint &pnt,int uColumn); + void rightButtonPressed(KviTalListViewItem * pItem,const TQPoint &pnt,int uColumn); + void mouseButtonClicked(int iButton,KviTalListViewItem * pItem,const TQPoint &pnt,int uColumn); + void mouseButtonPressed(int iButton,KviTalListViewItem * pItem,const TQPoint &pnt,int uColumn); + void contextMenuRequested(KviTalListViewItem * pItem,const TQPoint &pnt,int uColumn); void onItem(KviTalListViewItem * pItem); void expanded(KviTalListViewItem * pItem); void collapsed(KviTalListViewItem * pItem); @@ -71,18 +72,18 @@ protected slots: void redirect_selectionChanged(Q3ListViewItem * pItem); void redirect_currentChanged(Q3ListViewItem * pItem); void redirect_clicked(Q3ListViewItem * pItem); - void redirect_clicked(Q3ListViewItem * pItem,const QPoint &pnt,int uColumn); + void redirect_clicked(Q3ListViewItem * pItem,const TQPoint &pnt,int uColumn); void redirect_pressed(Q3ListViewItem * pItem); - void redirect_pressed(Q3ListViewItem * pItem,const QPoint &pnt,int uColumn); + void redirect_pressed(Q3ListViewItem * pItem,const TQPoint &pnt,int uColumn); void redirect_doubleClicked(Q3ListViewItem * pItem); - void redirect_doubleClicked(Q3ListViewItem * pItem,const QPoint &pnt,int uColumn); + void redirect_doubleClicked(Q3ListViewItem * pItem,const TQPoint &pnt,int uColumn); void redirect_returnPressed(Q3ListViewItem * pItem); void redirect_spacePressed(Q3ListViewItem * pItem); - void redirect_rightButtonClicked(Q3ListViewItem * pItem,const QPoint &pnt,int uColumn); - void redirect_rightButtonPressed(Q3ListViewItem * pItem,const QPoint &pnt,int uColumn); - void redirect_mouseButtonClicked(int iButton,Q3ListViewItem * pItem,const QPoint &pnt,int uColumn); - void redirect_mouseButtonPressed(int iButton,Q3ListViewItem * pItem,const QPoint &pnt,int uColumn); - void redirect_contextMenuRequested(Q3ListViewItem * pItem,const QPoint &pnt,int uColumn); + void redirect_rightButtonClicked(Q3ListViewItem * pItem,const TQPoint &pnt,int uColumn); + void redirect_rightButtonPressed(Q3ListViewItem * pItem,const TQPoint &pnt,int uColumn); + void redirect_mouseButtonClicked(int iButton,Q3ListViewItem * pItem,const TQPoint &pnt,int uColumn); + void redirect_mouseButtonPressed(int iButton,Q3ListViewItem * pItem,const TQPoint &pnt,int uColumn); + void redirect_contextMenuRequested(Q3ListViewItem * pItem,const TQPoint &pnt,int uColumn); void redirect_onItem(Q3ListViewItem * pItem); void redirect_expanded(Q3ListViewItem * pItem); void redirect_collapsed(Q3ListViewItem * pItem); @@ -101,19 +102,19 @@ public: : Q3ListViewItem(pParent,pAfter) {}; KviTalListViewItem(KviTalListViewItem * pParent,KviTalListViewItem * pAfter) : Q3ListViewItem(pParent,pAfter) {}; - KviTalListViewItem(KviTalListView * pParent,const QString &szLabel1,const QString &szLabel2 = KviQString::empty,const QString &szLabel3 = KviQString::empty,const QString &szLabel4 = KviQString::empty,const QString &szLabel5 = KviQString::empty) + KviTalListViewItem(KviTalListView * pParent,const TQString &szLabel1,const TQString &szLabel2 = KviTQString::empty,const TQString &szLabel3 = KviTQString::empty,const TQString &szLabel4 = KviTQString::empty,const TQString &szLabel5 = KviTQString::empty) : Q3ListViewItem(pParent,szLabel1,szLabel2,szLabel3,szLabel4,szLabel5) {}; - KviTalListViewItem(KviTalListView * pParent,KviTalListViewItem * pAfter,const QString &szLabel1,const QString &szLabel2 = KviQString::empty,const QString &szLabel3 = KviQString::empty,const QString &szLabel4 = KviQString::empty,const QString &szLabel5 = KviQString::empty) + KviTalListViewItem(KviTalListView * pParent,KviTalListViewItem * pAfter,const TQString &szLabel1,const TQString &szLabel2 = KviTQString::empty,const TQString &szLabel3 = KviTQString::empty,const TQString &szLabel4 = KviTQString::empty,const TQString &szLabel5 = KviTQString::empty) : Q3ListViewItem(pParent,pAfter,szLabel1,szLabel2,szLabel3,szLabel4,szLabel5) {}; - KviTalListViewItem(KviTalListViewItem * pParent,const QString &szLabel1,const QString &szLabel2 = KviQString::empty,const QString &szLabel3 = KviQString::empty,const QString &szLabel4 = KviQString::empty) + KviTalListViewItem(KviTalListViewItem * pParent,const TQString &szLabel1,const TQString &szLabel2 = KviTQString::empty,const TQString &szLabel3 = KviTQString::empty,const TQString &szLabel4 = KviTQString::empty) : Q3ListViewItem(pParent,szLabel1,szLabel2,szLabel3,szLabel4) {}; - KviTalListViewItem(KviTalListViewItem * pParent,KviTalListViewItem * pAfter,const QString &szLabel1,const QString &szLabel2 = KviQString::empty,const QString &szLabel3 = KviQString::empty,const QString &szLabel4 = KviQString::empty) + KviTalListViewItem(KviTalListViewItem * pParent,KviTalListViewItem * pAfter,const TQString &szLabel1,const TQString &szLabel2 = KviTQString::empty,const TQString &szLabel3 = KviTQString::empty,const TQString &szLabel4 = KviTQString::empty) : Q3ListViewItem(pParent,pAfter,szLabel1,szLabel2,szLabel3,szLabel4) {}; public: - // Shadow the internal Qt methods + // Shadow the internal TQt methods KviTalListViewItem * firstChild() const { return (KviTalListViewItem *)Q3ListViewItem::firstChild(); }; KviTalListViewItem * nextSibling() const { return (KviTalListViewItem *)Q3ListViewItem::nextSibling(); }; - KviTalListViewItem * parent() const { return (KviTalListViewItem *)Q3ListViewItem::parent(); }; + KviTalListViewItem * tqparent() const { return (KviTalListViewItem *)Q3ListViewItem::tqparent(); }; KviTalListView * listView() const { return (KviTalListView *)Q3ListViewItem::listView(); }; KviTalListViewItem * itemAbove() { return (KviTalListViewItem *)Q3ListViewItem::itemAbove(); }; KviTalListViewItem * itemBelow() { return (KviTalListViewItem *)Q3ListViewItem::itemBelow(); }; @@ -132,36 +133,36 @@ public: enum ToggleState { Off, NoChange, On }; - KviTalCheckListItem(KviTalCheckListItem *parent, const QString &text, + KviTalCheckListItem(KviTalCheckListItem *tqparent, const TQString &text, Type = RadioButtonController); - KviTalCheckListItem(KviTalCheckListItem *parent, KviTalListViewItem *after, - const QString &text, Type = RadioButtonController); - KviTalCheckListItem(KviTalListViewItem *parent, const QString &text, + KviTalCheckListItem(KviTalCheckListItem *tqparent, KviTalListViewItem *after, + const TQString &text, Type = RadioButtonController); + KviTalCheckListItem(KviTalListViewItem *tqparent, const TQString &text, Type = RadioButtonController); - KviTalCheckListItem(KviTalListViewItem *parent, KviTalListViewItem *after, - const QString &text, Type = RadioButtonController); - KviTalCheckListItem(KviTalListView *parent, const QString &text, + KviTalCheckListItem(KviTalListViewItem *tqparent, KviTalListViewItem *after, + const TQString &text, Type = RadioButtonController); + KviTalCheckListItem(KviTalListView *tqparent, const TQString &text, Type = RadioButtonController); - KviTalCheckListItem(KviTalListView *parent, KviTalListViewItem *after, - const QString &text, Type = RadioButtonController); - KviTalCheckListItem(KviTalListViewItem *parent, const QString &text, - const QPixmap &); - KviTalCheckListItem(KviTalListView *parent, const QString &text, - const QPixmap &); + KviTalCheckListItem(KviTalListView *tqparent, KviTalListViewItem *after, + const TQString &text, Type = RadioButtonController); + KviTalCheckListItem(KviTalListViewItem *tqparent, const TQString &text, + const TQPixmap &); + KviTalCheckListItem(KviTalListView *tqparent, const TQString &text, + const TQPixmap &); ~KviTalCheckListItem(); - void paintCell(QPainter *, const QColorGroup & cg, - int column, int width, int alignment); - virtual void paintFocus(QPainter *, const QColorGroup &cg, - const QRect & r); - int width(const QFontMetrics&, const KviTalListView*, int column) const; + void paintCell(TQPainter *, const TQColorGroup & cg, + int column, int width, int tqalignment); + virtual void paintFocus(TQPainter *, const TQColorGroup &cg, + const TQRect & r); + int width(const TQFontMetrics&, const KviTalListView*, int column) const; void setup(); virtual void setOn(bool); bool isOn() const { return on; } Type type() const { return myType; } - QString text() const { return KviTalListViewItem::text(0); } - QString text(int n) const { return KviTalListViewItem::text(n); } + TQString text() const { return KviTalListViewItem::text(0); } + TQString text(int n) const { return KviTalListViewItem::text(n); } void setTristate(bool); bool isTristate() const; diff --git a/src/kvilib/tal/kvi_tal_mainwindow.cpp b/src/kvilib/tal/kvi_tal_mainwindow.cpp index c2e52b2d..ff2e7b17 100644 --- a/src/kvilib/tal/kvi_tal_mainwindow.cpp +++ b/src/kvilib/tal/kvi_tal_mainwindow.cpp @@ -27,7 +27,7 @@ #ifdef COMPILE_KDE_SUPPORT - KviTalMainWindow::KviTalMainWindow(QWidget * par,const char * nam) + KviTalMainWindow::KviTalMainWindow(TQWidget * par,const char * nam) : KMainWindow(par,nam) { } @@ -37,8 +37,8 @@ #else #ifdef COMPILE_USE_QT4 - KviTalMainWindow::KviTalMainWindow(QWidget * par,const char * nam) - : QMainWindow(par,nam) + KviTalMainWindow::KviTalMainWindow(TQWidget * par,const char * nam) + : TQMainWindow(par,nam) { } @@ -49,13 +49,13 @@ void KviTalMainWindow::setUsesBigPixmaps(bool b) { - if(b)setIconSize(QSize(48,48)); - else setIconSize(QSize(24,24)); + if(b)setIconSize(TQSize(48,48)); + else setIconSize(TQSize(24,24)); } #include "kvi_tal_mainwindow_qt4.moc" #else - KviTalMainWindow::KviTalMainWindow(QWidget * par,const char * nam) - : QMainWindow(par,nam) + KviTalMainWindow::KviTalMainWindow(TQWidget * par,const char * nam) + : TQMainWindow(par,nam) { } #include "kvi_tal_mainwindow_qt3.moc" diff --git a/src/kvilib/tal/kvi_tal_mainwindow_kde.h b/src/kvilib/tal/kvi_tal_mainwindow_kde.h index 9f38aede..1edcba85 100644 --- a/src/kvilib/tal/kvi_tal_mainwindow_kde.h +++ b/src/kvilib/tal/kvi_tal_mainwindow_kde.h @@ -28,8 +28,9 @@ class KVILIB_API KviTalMainWindow : public KMainWindow { Q_OBJECT + TQ_OBJECT public: - KviTalMainWindow(QWidget * par,const char * nam); + KviTalMainWindow(TQWidget * par,const char * nam); ~KviTalMainWindow(); }; diff --git a/src/kvilib/tal/kvi_tal_mainwindow_qt3.h b/src/kvilib/tal/kvi_tal_mainwindow_qt3.h index d328774f..34dc9cb9 100644 --- a/src/kvilib/tal/kvi_tal_mainwindow_qt3.h +++ b/src/kvilib/tal/kvi_tal_mainwindow_qt3.h @@ -1,5 +1,5 @@ -#ifndef _KVI_TAL_MAINWINDOW_QT_H_ -#define _KVI_TAL_MAINWINDOW_QT_H_ +#ifndef _KVI_TAL_MAINWINDOW_TQT_H_ +#define _KVI_TAL_MAINWINDOW_TQT_H_ // // File : kvi_tal_mainwindow_qt.h @@ -23,14 +23,15 @@ // Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // -#include +#include -class KVILIB_API KviTalMainWindow : public QMainWindow +class KVILIB_API KviTalMainWindow : public TQMainWindow { Q_OBJECT + TQ_OBJECT public: - KviTalMainWindow(QWidget * par,const char * nam); + KviTalMainWindow(TQWidget * par,const char * nam); ~KviTalMainWindow(); }; -#endif // _KVI_TAL_MAINWINDOW_QT_H_ +#endif // _KVI_TAL_MAINWINDOW_TQT_H_ diff --git a/src/kvilib/tal/kvi_tal_mainwindow_qt4.h b/src/kvilib/tal/kvi_tal_mainwindow_qt4.h index b6c2c1be..9669cb27 100644 --- a/src/kvilib/tal/kvi_tal_mainwindow_qt4.h +++ b/src/kvilib/tal/kvi_tal_mainwindow_qt4.h @@ -1,5 +1,5 @@ -#ifndef _KVI_TAL_MAINWINDOW_QT_H_ -#define _KVI_TAL_MAINWINDOW_QT_H_ +#ifndef _KVI_TAL_MAINWINDOW_TQT_H_ +#define _KVI_TAL_MAINWINDOW_TQT_H_ // // File : kvi_tal_mainwindow_qt.h @@ -23,17 +23,18 @@ // Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // -#include +#include -class KVILIB_API KviTalMainWindow : public QMainWindow +class KVILIB_API KviTalMainWindow : public TQMainWindow { Q_OBJECT + TQ_OBJECT public: - KviTalMainWindow(QWidget * par,const char * nam); + KviTalMainWindow(TQWidget * par,const char * nam); ~KviTalMainWindow(); public: bool usesBigPixmaps(); void setUsesBigPixmaps(bool b); }; -#endif // _KVI_TAL_MAINWINDOW_QT_H_ +#endif // _KVI_TAL_MAINWINDOW_TQT_H_ diff --git a/src/kvilib/tal/kvi_tal_menubar.cpp b/src/kvilib/tal/kvi_tal_menubar.cpp index 0fbb28be..4db85f74 100644 --- a/src/kvilib/tal/kvi_tal_menubar.cpp +++ b/src/kvilib/tal/kvi_tal_menubar.cpp @@ -27,7 +27,7 @@ #ifdef COMPILE_KDE_SUPPORT - KviTalMenuBar::KviTalMenuBar(QWidget * par,const char * nam) + KviTalMenuBar::KviTalMenuBar(TQWidget * par,const char * nam) : KMenuBar(par,nam) { } @@ -40,11 +40,11 @@ #else - KviTalMenuBar::KviTalMenuBar(QWidget * par,const char * nam) + KviTalMenuBar::KviTalMenuBar(TQWidget * par,const char * nam) #ifdef COMPILE_USE_QT4 - : QMenuBar(par) + : TQMenuBar(par) #else - : QMenuBar(par,nam) + : TQMenuBar(par,nam) #endif { } diff --git a/src/kvilib/tal/kvi_tal_menubar_kde.h b/src/kvilib/tal/kvi_tal_menubar_kde.h index e345d221..2889d9ee 100644 --- a/src/kvilib/tal/kvi_tal_menubar_kde.h +++ b/src/kvilib/tal/kvi_tal_menubar_kde.h @@ -27,8 +27,9 @@ class KVILIB_API KviTalMenuBar : public KMenuBar { Q_OBJECT + TQ_OBJECT public: - KviTalMenuBar(QWidget * par,const char * nam); + KviTalMenuBar(TQWidget * par,const char * nam); ~KviTalMenuBar(); }; diff --git a/src/kvilib/tal/kvi_tal_menubar_qt.h b/src/kvilib/tal/kvi_tal_menubar_qt.h index c42dab7f..da030b8a 100644 --- a/src/kvilib/tal/kvi_tal_menubar_qt.h +++ b/src/kvilib/tal/kvi_tal_menubar_qt.h @@ -1,5 +1,5 @@ -#ifndef _KVI_TAL_MENUBAR_QT_H_ -#define _KVI_TAL_MENUBAR_QT_H_ +#ifndef _KVI_TAL_MENUBAR_TQT_H_ +#define _KVI_TAL_MENUBAR_TQT_H_ // // File : kvi_tal_menubar_qt.h // Creation date : Sun Aug 12 06:35:24 2001 GMT by Szymon Stefanek @@ -22,14 +22,15 @@ // Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // -#include +#include -class KVILIB_API KviTalMenuBar : public QMenuBar +class KVILIB_API KviTalMenuBar : public TQMenuBar { Q_OBJECT + TQ_OBJECT public: - KviTalMenuBar(QWidget * par,const char * nam); + KviTalMenuBar(TQWidget * par,const char * nam); ~KviTalMenuBar(); }; -#endif //_KVI_TAL_MENUBAR_QT_H_ +#endif //_KVI_TAL_MENUBAR_TQT_H_ diff --git a/src/kvilib/tal/kvi_tal_popupmenu_qt3.h b/src/kvilib/tal/kvi_tal_popupmenu_qt3.h index 3340945b..755a9ef6 100644 --- a/src/kvilib/tal/kvi_tal_popupmenu_qt3.h +++ b/src/kvilib/tal/kvi_tal_popupmenu_qt3.h @@ -28,14 +28,15 @@ #include "kvi_settings.h" #include "kvi_qstring.h" -#include +#include -class KVILIB_API KviTalPopupMenu : public QPopupMenu +class KVILIB_API KviTalPopupMenu : public TQPopupMenu { Q_OBJECT + TQ_OBJECT public: - KviTalPopupMenu(QWidget * pParent=0,const QString &szName = KviQString::empty) - : QPopupMenu(pParent,KviQString::toUtf8(szName).data()) {}; + KviTalPopupMenu(TQWidget * pParent=0,const TQString &szName = KviTQString::empty) + : TQPopupMenu(pParent,KviTQString::toUtf8(szName).data()) {}; virtual ~KviTalPopupMenu() {}; }; diff --git a/src/kvilib/tal/kvi_tal_popupmenu_qt4.h b/src/kvilib/tal/kvi_tal_popupmenu_qt4.h index 58da15ef..79e5e5f3 100644 --- a/src/kvilib/tal/kvi_tal_popupmenu_qt4.h +++ b/src/kvilib/tal/kvi_tal_popupmenu_qt4.h @@ -28,56 +28,57 @@ #include "kvi_settings.h" #include "kvi_qstring.h" -#include -#include +#include +#include class KVILIB_API KviTalPopupMenu : public Q3PopupMenu { Q_OBJECT + TQ_OBJECT public: - KviTalPopupMenu(QWidget * pParent=0,const QString &szName = KviQString::empty) + KviTalPopupMenu(TQWidget * pParent=0,const TQString &szName = KviTQString::empty) : Q3PopupMenu(pParent) { setName(szName); }; virtual ~KviTalPopupMenu() {}; - int insertItem(const QString &szText) + int insertItem(const TQString &szText) { return Q3PopupMenu::insertItem(szText); } - int insertItem(const QPixmap &pix,const QString &szText) + int insertItem(const TQPixmap &pix,const TQString &szText) { - return Q3PopupMenu::insertItem(QIcon(pix),szText,-1,-1); + return Q3PopupMenu::insertItem(TQIcon(pix),szText,-1,-1); } - int insertItem(const QString &szText,int id) + int insertItem(const TQString &szText,int id) { return Q3PopupMenu::insertItem(szText,id); } - int insertItem(const QPixmap &pix,const QString &szText,int id) + int insertItem(const TQPixmap &pix,const TQString &szText,int id) { - return Q3PopupMenu::insertItem(QIcon(pix),szText,id,-1); + return Q3PopupMenu::insertItem(TQIcon(pix),szText,id,-1); } - int insertItem(const QString &szText,const QObject * pReceiver,const char * szSlot) + int insertItem(const TQString &szText,const TQObject * pReceiver,const char * szSlot) { return Q3PopupMenu::insertItem(szText,pReceiver,szSlot); } - int insertItem(const QPixmap &pix,const QString &szText,const QObject * pReceiver,const char * szSlot) + int insertItem(const TQPixmap &pix,const TQString &szText,const TQObject * pReceiver,const char * szSlot) { - return Q3PopupMenu::insertItem(QIcon(pix),szText,pReceiver,szSlot); + return Q3PopupMenu::insertItem(TQIcon(pix),szText,pReceiver,szSlot); } - int insertItem(const QPixmap &pix,const QString &szText,QMenu *pMenu) + int insertItem(const TQPixmap &pix,const TQString &szText,TQMenu *pMenu) { - return Q3PopupMenu::insertItem(QIcon(pix),szText,pMenu,-1,-1); + return Q3PopupMenu::insertItem(TQIcon(pix),szText,pMenu,-1,-1); } - int insertItem(const QString &szText,QMenu *pMenu) + int insertItem(const TQString &szText,TQMenu *pMenu) { return Q3PopupMenu::insertItem(szText,pMenu,-1,-1); } - int insertItem(QWidget * pWidget) + int insertItem(TQWidget * pWidget) { - // needs Qt 4.2 - QWidgetAction * pAct = new QWidgetAction(this); + // needs TQt 4.2 + TQWidgetAction * pAct = new TQWidgetAction(this); pAct->setDefaultWidget(pWidget); addAction(pAct); return 0; diff --git a/src/kvilib/tal/kvi_tal_scrollview_qt3.h b/src/kvilib/tal/kvi_tal_scrollview_qt3.h index da6141e1..9cf783cd 100644 --- a/src/kvilib/tal/kvi_tal_scrollview_qt3.h +++ b/src/kvilib/tal/kvi_tal_scrollview_qt3.h @@ -27,14 +27,15 @@ #include "kvi_settings.h" -#include +#include -class KVILIB_API KviTalScrollView : public QScrollView +class KVILIB_API KviTalScrollView : public TQScrollView { Q_OBJECT + TQ_OBJECT public: - KviTalScrollView(QWidget * pParent) - : QScrollView(pParent) {}; + KviTalScrollView(TQWidget * pParent) + : TQScrollView(pParent) {}; virtual ~KviTalScrollView() {}; }; diff --git a/src/kvilib/tal/kvi_tal_scrollview_qt4.h b/src/kvilib/tal/kvi_tal_scrollview_qt4.h index c82f5723..b9106e4e 100644 --- a/src/kvilib/tal/kvi_tal_scrollview_qt4.h +++ b/src/kvilib/tal/kvi_tal_scrollview_qt4.h @@ -27,13 +27,14 @@ #include "kvi_settings.h" -#include +#include class KVILIB_API KviTalScrollView : public Q3ScrollView { Q_OBJECT + TQ_OBJECT public: - KviTalScrollView(QWidget * pParent) + KviTalScrollView(TQWidget * pParent) : Q3ScrollView(pParent) {}; virtual ~KviTalScrollView() {}; }; diff --git a/src/kvilib/tal/kvi_tal_tabdialog_qt3.h b/src/kvilib/tal/kvi_tal_tabdialog_qt3.h index 061053a3..2ff4794d 100644 --- a/src/kvilib/tal/kvi_tal_tabdialog_qt3.h +++ b/src/kvilib/tal/kvi_tal_tabdialog_qt3.h @@ -25,14 +25,15 @@ // //============================================================================= -#include +#include -class KVILIB_API KviTalTabDialog : public QTabDialog +class KVILIB_API KviTalTabDialog : public TQTabDialog { Q_OBJECT + TQ_OBJECT public: - KviTalTabDialog(QWidget * pParent = 0,const char * name = 0,bool bModal = false) - : QTabDialog(pParent,name,bModal) {}; + KviTalTabDialog(TQWidget * pParent = 0,const char * name = 0,bool bModal = false) + : TQTabDialog(pParent,name,bModal) {}; ~KviTalTabDialog() {}; }; diff --git a/src/kvilib/tal/kvi_tal_tabdialog_qt4.h b/src/kvilib/tal/kvi_tal_tabdialog_qt4.h index c9e3eb0b..dc773cad 100644 --- a/src/kvilib/tal/kvi_tal_tabdialog_qt4.h +++ b/src/kvilib/tal/kvi_tal_tabdialog_qt4.h @@ -25,13 +25,14 @@ // //============================================================================= -#include +#include class KVILIB_API KviTalTabDialog : public Q3TabDialog { Q_OBJECT + TQ_OBJECT public: - KviTalTabDialog(QWidget * pParent = 0,const char * name = 0,bool bModal = false) + KviTalTabDialog(TQWidget * pParent = 0,const char * name = 0,bool bModal = false) : Q3TabDialog(pParent,name,bModal) {}; ~KviTalTabDialog() {}; }; diff --git a/src/kvilib/tal/kvi_tal_textedit_qt3.h b/src/kvilib/tal/kvi_tal_textedit_qt3.h index b698f483..68e86ce7 100644 --- a/src/kvilib/tal/kvi_tal_textedit_qt3.h +++ b/src/kvilib/tal/kvi_tal_textedit_qt3.h @@ -25,14 +25,15 @@ // //============================================================================= -#include +#include -class KVILIB_API KviTalTextEdit : public QTextEdit +class KVILIB_API KviTalTextEdit : public TQTextEdit { Q_OBJECT + TQ_OBJECT public: - KviTalTextEdit(QWidget * pParent = 0,const char * name = 0) - : QTextEdit(pParent,name) {}; + KviTalTextEdit(TQWidget * pParent = 0,const char * name = 0) + : TQTextEdit(pParent,name) {}; ~KviTalTextEdit() {}; }; diff --git a/src/kvilib/tal/kvi_tal_textedit_qt4.h b/src/kvilib/tal/kvi_tal_textedit_qt4.h index a3403d7c..574cda96 100644 --- a/src/kvilib/tal/kvi_tal_textedit_qt4.h +++ b/src/kvilib/tal/kvi_tal_textedit_qt4.h @@ -25,13 +25,14 @@ // //============================================================================= -#include +#include class KVILIB_API KviTalTextEdit : public Q3TextEdit { Q_OBJECT + TQ_OBJECT public: - KviTalTextEdit(QWidget * pParent = 0,const char * name = 0) + KviTalTextEdit(TQWidget * pParent = 0,const char * name = 0) : Q3TextEdit(pParent,name) {}; ~KviTalTextEdit() {}; }; diff --git a/src/kvilib/tal/kvi_tal_toolbar.cpp b/src/kvilib/tal/kvi_tal_toolbar.cpp index f54dc973..80ac44aa 100644 --- a/src/kvilib/tal/kvi_tal_toolbar.cpp +++ b/src/kvilib/tal/kvi_tal_toolbar.cpp @@ -27,7 +27,7 @@ #ifdef COMPILE_KDE_SUPPORT - KviTalToolBar::KviTalToolBar(const QString &label,QMainWindow *w,QT_TOOLBARDOCK_TYPE dock,bool bNewLine,const char * nam) + KviTalToolBar::KviTalToolBar(const TQString &label,TQMainWindow *w,TQT_TOOLBARDOCK_TYPE dock,bool bNewLine,const char * nam) : KToolBar(w,dock,bNewLine,nam) { setLabel(label); @@ -43,32 +43,32 @@ #ifdef COMPILE_USE_QT4 - KviTalToolBar::KviTalToolBar(const QString &label,QMainWindow *w,QT_TOOLBARDOCK_TYPE dock,bool bNewLine,const char * nam) + KviTalToolBar::KviTalToolBar(const TQString &label,TQMainWindow *w,TQT_TOOLBARDOCK_TYPE dock,bool bNewLine,const char * nam) //: Q3ToolBar(label,w,dock,bNewLine,nam) - : QToolBar(label,w) + : TQToolBar(label,w) { - //setFrameStyle(QFrame::NoFrame); + //setFrameStyle(TQFrame::NoFrame); setObjectName(nam); - if(!layout()) - this->setLayout(new QBoxLayout(QBoxLayout::LeftToRight)); + if(!tqlayout()) + this->setLayout(new TQBoxLayout(TQBoxLayout::LeftToRight)); w->addToolBar(dock,this); } - KviTalToolBar::KviTalToolBar(QMainWindow *w,const char * name) - : QToolBar(w) + KviTalToolBar::KviTalToolBar(TQMainWindow *w,const char * name) + : TQToolBar(w) { - //setFrameStyle(QFrame::NoFrame); + //setFrameStyle(TQFrame::NoFrame); setObjectName(name); - if(!layout()) - this->setLayout(new QBoxLayout(QBoxLayout::LeftToRight)); + if(!tqlayout()) + this->setLayout(new TQBoxLayout(TQBoxLayout::LeftToRight)); w->addToolBar(this); } - QBoxLayout * KviTalToolBar::boxLayout() + TQBoxLayout * KviTalToolBar::boxLayout() { - return (QBoxLayout*)this->layout(); + return (TQBoxLayout*)this->tqlayout(); } - void KviTalToolBar::setBoxLayout(QBoxLayout * l) + void KviTalToolBar::setBoxLayout(TQBoxLayout * l) { this->setLayout(l); } @@ -80,19 +80,19 @@ void KviTalToolBar::setUsesBigPixmaps(bool b) { - if(b)setIconSize(QSize(48,48)); - else setIconSize(QSize(22,22)); + if(b)setIconSize(TQSize(48,48)); + else setIconSize(TQSize(22,22)); } #include "kvi_tal_toolbar_qt4.moc" #else - KviTalToolBar::KviTalToolBar(const QString &label,QMainWindow *w,QT_TOOLBARDOCK_TYPE dock,bool bNewLine,const char * nam) - : QToolBar(label,w,dock,bNewLine,nam) + KviTalToolBar::KviTalToolBar(const TQString &label,TQMainWindow *w,TQT_TOOLBARDOCK_TYPE dock,bool bNewLine,const char * nam) + : TQToolBar(label,w,dock,bNewLine,nam) { } - KviTalToolBar::KviTalToolBar(QMainWindow *w,const char * name) - : QToolBar(w,name) + KviTalToolBar::KviTalToolBar(TQMainWindow *w,const char * name) + : TQToolBar(w,name) { } diff --git a/src/kvilib/tal/kvi_tal_toolbar_kde.h b/src/kvilib/tal/kvi_tal_toolbar_kde.h index f6415f26..3da32998 100644 --- a/src/kvilib/tal/kvi_tal_toolbar_kde.h +++ b/src/kvilib/tal/kvi_tal_toolbar_kde.h @@ -29,8 +29,9 @@ class KVILIB_API KviTalToolBar : public KToolBar { Q_OBJECT + TQ_OBJECT public: - KviTalToolBar(const QString &label,QMainWindow *w,QT_TOOLBARDOCK_TYPE dock = QT_DOCK_TOP,bool bNewLine = false,const char * nam = 0); + KviTalToolBar(const TQString &label,TQMainWindow *w,TQT_TOOLBARDOCK_TYPE dock = TQT_DOCK_TOP,bool bNewLine = false,const char * nam = 0); ~KviTalToolBar(); }; diff --git a/src/kvilib/tal/kvi_tal_toolbar_qt3.h b/src/kvilib/tal/kvi_tal_toolbar_qt3.h index a9b15b52..83d0dc70 100644 --- a/src/kvilib/tal/kvi_tal_toolbar_qt3.h +++ b/src/kvilib/tal/kvi_tal_toolbar_qt3.h @@ -1,5 +1,5 @@ -#ifndef _KVI_TAL_TOOLBAR_QT_H_ -#define _KVI_TAL_TOOLBAR_QT_H_ +#ifndef _KVI_TAL_TOOLBAR_TQT_H_ +#define _KVI_TAL_TOOLBAR_TQT_H_ // // File : kvi_tal_toolbar_qt.h // Creation date : Mon Aug 13 05:05:50 2001 GMT by Szymon Stefanek @@ -22,18 +22,19 @@ // Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // -#include -#include +#include +#include #include "kvi_tal_toolbardocktype.h" -class KVILIB_API KviTalToolBar : public QToolBar +class KVILIB_API KviTalToolBar : public TQToolBar { Q_OBJECT + TQ_OBJECT public: - KviTalToolBar(const QString &label,QMainWindow *w,QT_TOOLBARDOCK_TYPE dock = QT_DOCK_TOP,bool bNewLine = false,const char * nam = 0); - KviTalToolBar(QMainWindow *w,const char * name=0); + KviTalToolBar(const TQString &label,TQMainWindow *w,TQT_TOOLBARDOCK_TYPE dock = TQT_DOCK_TOP,bool bNewLine = false,const char * nam = 0); + KviTalToolBar(TQMainWindow *w,const char * name=0); ~KviTalToolBar(); }; -#endif //_KVI_TAL_TOOLBAR_QT_H_ +#endif //_KVI_TAL_TOOLBAR_TQT_H_ diff --git a/src/kvilib/tal/kvi_tal_toolbar_qt4.h b/src/kvilib/tal/kvi_tal_toolbar_qt4.h index 753d5a5c..50ef3637 100644 --- a/src/kvilib/tal/kvi_tal_toolbar_qt4.h +++ b/src/kvilib/tal/kvi_tal_toolbar_qt4.h @@ -25,23 +25,24 @@ #include "kvi_settings.h" #include "kvi_tal_toolbardocktype.h" -#include -#include -#include +#include +#include +#include -class KVILIB_API KviTalToolBar : public QToolBar +class KVILIB_API KviTalToolBar : public TQToolBar { Q_OBJECT + TQ_OBJECT public: - KviTalToolBar(const QString &label,QMainWindow *w,QT_TOOLBARDOCK_TYPE dock = QT_DOCK_TOP,bool bNewLine = false,const char * nam = 0); - KviTalToolBar(QMainWindow *w,const char * name=0); + KviTalToolBar(const TQString &label,TQMainWindow *w,TQT_TOOLBARDOCK_TYPE dock = TQT_DOCK_TOP,bool bNewLine = false,const char * nam = 0); + KviTalToolBar(TQMainWindow *w,const char * name=0); ~KviTalToolBar(); public: - QBoxLayout * boxLayout(); - void setBoxLayout(QBoxLayout *l); + TQBoxLayout * boxLayout(); + void setBoxLayout(TQBoxLayout *l); bool usesBigPixmaps(); void setUsesBigPixmaps(bool b); }; -#endif //_KVI_TAL_TOOLBAR_QT_H_ +#endif //_KVI_TAL_TOOLBAR_TQT_H_ diff --git a/src/kvilib/tal/kvi_tal_toolbardocktype.h b/src/kvilib/tal/kvi_tal_toolbardocktype.h index a7c9697a..0295f7d4 100644 --- a/src/kvilib/tal/kvi_tal_toolbardocktype.h +++ b/src/kvilib/tal/kvi_tal_toolbardocktype.h @@ -26,46 +26,35 @@ //#define COMPILE_USE_QT4 #ifdef COMPILE_USE_QT4 /* - #define QT_TOOLBARDOCK_TYPE Qt::Dock - #define QT_DOCK_TOP Qt::DockTop - #define QT_DOCK_LEFT Qt::DockLeft - #define QT_DOCK_RIGHT Qt::DockRight - #define QT_DOCK_BOTTOM Qt::DockBottom - #define QT_DOCK_MINIMIZED Qt::DockMinimized - #define QT_DOCK_TORNOFF Qt::DockTornOff - #define QT_DOCK_UNMANAGED Qt::DockUnmanaged + #define TQT_TOOLBARDOCK_TYPE TQt::Dock + #define TQT_DOCK_TOP TQt::DockTop + #define TQT_DOCK_LEFT TQt::DockLeft + #define TQT_DOCK_RIGHT TQt::DockRight + #define TQT_DOCK_BOTTOM TQt::DockBottom + #define TQT_DOCK_MINIMIZED TQt::DockMinimized + #define TQT_DOCK_TORNOFF TQt::DockTornOff + #define TQT_DOCK_UNMANAGED TQt::DockUnmanaged */ - // We will need these when we'll use the real QToolBar in Qt 4.x - #define QT_TOOLBARDOCK_TYPE Qt::ToolBarArea - #define QT_DOCK_TOP Qt::TopToolBarArea - #define QT_DOCK_LEFT Qt::LeftToolBarArea - #define QT_DOCK_RIGHT Qt::RightToolBarArea - #define QT_DOCK_BOTTOM Qt::BottomToolBarArea + // We will need these when we'll use the real TQToolBar in TQt 4.x + #define TQT_TOOLBARDOCK_TYPE TQt::ToolBarArea + #define TQT_DOCK_TOP TQt::TopToolBarArea + #define TQT_DOCK_LEFT TQt::LeftToolBarArea + #define TQT_DOCK_RIGHT TQt::RightToolBarArea + #define TQT_DOCK_BOTTOM TQt::BottomToolBarArea // THESE ARE UNSUPPORTED UNDER QT4! - #define QT_DOCK_MINIMIZED Qt::TopToolBarArea - #define QT_DOCK_TORNOFF Qt::TopToolBarArea - #define QT_DOCK_UNMANAGED Qt::TopToolBarArea + #define TQT_DOCK_MINIMIZED TQt::TopToolBarArea + #define TQT_DOCK_TORNOFF TQt::TopToolBarArea + #define TQT_DOCK_UNMANAGED TQt::TopToolBarArea #else - #if QT_VERSION >= 300 - #define QT_TOOLBARDOCK_TYPE Qt::Dock - #define QT_DOCK_TOP Qt::DockTop - #define QT_DOCK_LEFT Qt::DockLeft - #define QT_DOCK_RIGHT Qt::DockRight - #define QT_DOCK_BOTTOM Qt::DockBottom - #define QT_DOCK_MINIMIZED Qt::DockMinimized - #define QT_DOCK_TORNOFF Qt::DockTornOff - #define QT_DOCK_UNMANAGED Qt::DockUnmanaged - #else - #define QT_TOOLBARDOCK_TYPE QMainWindow::ToolBarDock - #define QT_DOCK_TOP QMainWindow::Top - #define QT_DOCK_LEFT QMainWindow::Left - #define QT_DOCK_RIGHT QMainWindow::Right - #define QT_DOCK_BOTTOM QMainWindow::Bottom - #define QT_DOCK_MINIMIZED QMainWindow::Minimized - #define QT_DOCK_TORNOFF QMainWindow::TornOff - #define QT_DOCK_UNMANAGED QMainWindow::Unmanaged - #endif + #define TQT_TOOLBARDOCK_TYPE TQt::Dock + #define TQT_DOCK_TOP TQt::DockTop + #define TQT_DOCK_LEFT TQt::DockLeft + #define TQT_DOCK_RIGHT TQt::DockRight + #define TQT_DOCK_BOTTOM TQt::DockBottom + #define TQT_DOCK_MINIMIZED TQt::DockMinimized + #define TQT_DOCK_TORNOFF TQt::DockTornOff + #define TQT_DOCK_UNMANAGED TQt::DockUnmanaged #endif #endif //_KVI_TAL_TOOLBARDOCKTYPE_H_ diff --git a/src/kvilib/tal/kvi_tal_tooltip.cpp b/src/kvilib/tal/kvi_tal_tooltip.cpp index 3bd384d2..90d09631 100644 --- a/src/kvilib/tal/kvi_tal_tooltip.cpp +++ b/src/kvilib/tal/kvi_tal_tooltip.cpp @@ -25,10 +25,10 @@ #define __KVILIB__ #include "kvi_tal_tooltip.h" -#include +#include -KviTalToolTipHelper::KviTalToolTipHelper(KviTalToolTip * pToolTip,QWidget * pWidget) -: QObject(pWidget) +KviTalToolTipHelper::KviTalToolTipHelper(KviTalToolTip * pToolTip,TQWidget * pWidget) +: TQObject(pWidget) { #ifdef COMPILE_USE_QT4 m_pToolTip = pToolTip; @@ -54,13 +54,13 @@ void KviTalToolTipHelper::toolTipDying() #endif } -bool KviTalToolTipHelper::eventFilter(QObject * pObject,QEvent * pEvent) +bool KviTalToolTipHelper::eventFilter(TQObject * pObject,TQEvent * pEvent) { #ifdef COMPILE_USE_QT4 - if((pEvent->type() == QEvent::ToolTip) && m_pToolTip) + if((pEvent->type() == TQEvent::ToolTip) && m_pToolTip) { - debug("TOOL TIP EVENT WITH POSITION %d,%d",((QHelpEvent *)pEvent)->pos().x(),((QHelpEvent *)pEvent)->pos().y()); - m_pToolTip->maybeTip(((QHelpEvent *)pEvent)->pos()); + debug("TOOL TIP EVENT WITH POSITION %d,%d",((TQHelpEvent *)pEvent)->pos().x(),((TQHelpEvent *)pEvent)->pos().y()); + m_pToolTip->maybeTip(((TQHelpEvent *)pEvent)->pos()); return true; } #endif @@ -68,9 +68,9 @@ bool KviTalToolTipHelper::eventFilter(QObject * pObject,QEvent * pEvent) } -KviTalToolTip::KviTalToolTip(QWidget * pParent) +KviTalToolTip::KviTalToolTip(TQWidget * pParent) #ifndef COMPILE_USE_QT4 -: QToolTip(pParent) +: TQToolTip(pParent) #endif { #ifdef COMPILE_USE_QT4 @@ -98,26 +98,26 @@ void KviTalToolTip::helperDying() #endif #ifdef COMPILE_USE_QT4 -void KviTalToolTip::add(QWidget * widget,const QString & text) +void KviTalToolTip::add(TQWidget * widget,const TQString & text) { - QToolTip::add(widget,text); + TQToolTip::add(widget,text); } -void KviTalToolTip::remove(QWidget * widget) +void KviTalToolTip::remove(TQWidget * widget) { - QToolTip::remove(widget); + TQToolTip::remove(widget); } -void KviTalToolTip::tip(const QRect & rect,const QString & text) +void KviTalToolTip::tip(const TQRect & rect,const TQString & text) { debug("TOOL TIP AT %d,%d",rect.topLeft().x(),rect.topLeft().y()); - QToolTip::showText(m_pParent->mapToGlobal(rect.topLeft()),text); + TQToolTip::showText(m_pParent->mapToGlobal(rect.topLeft()),text); } #endif -void KviTalToolTip::maybeTip(const QPoint & p) +void KviTalToolTip::maybeTip(const TQPoint & p) { - // does nothing here.. and in Qt 4.x will even fail to work + // does nothing here.. and in TQt 4.x will even fail to work } #ifndef COMPILE_ON_WINDOWS diff --git a/src/kvilib/tal/kvi_tal_tooltip.h b/src/kvilib/tal/kvi_tal_tooltip.h index 91811c3c..3c5cfb2a 100644 --- a/src/kvilib/tal/kvi_tal_tooltip.h +++ b/src/kvilib/tal/kvi_tal_tooltip.h @@ -27,50 +27,51 @@ #include "kvi_settings.h" -#include -#include +#include +#include class KviTalToolTip; -// This is useful only with Qt4, but we put it here anyway -// to have both a consistent API and make moc happy -class KviTalToolTipHelper : public QObject +// This is useful only with TQt4, but we put it here anyway +// to have both a consistent API and make tqmoc happy +class KviTalToolTipHelper : public TQObject { friend class KviTalToolTip; Q_OBJECT + TQ_OBJECT public: - KviTalToolTipHelper(KviTalToolTip * pToolTip,QWidget * pWidget); + KviTalToolTipHelper(KviTalToolTip * pToolTip,TQWidget * pWidget); ~KviTalToolTipHelper(); protected: KviTalToolTip * m_pToolTip; protected: - virtual bool eventFilter(QObject * pObject,QEvent * pEvent); + virtual bool eventFilter(TQObject * pObject,TQEvent * pEvent); void toolTipDying(); }; class KVILIB_API KviTalToolTip #ifndef COMPILE_USE_QT4 - : public QToolTip + : public TQToolTip #endif { friend class KviTalToolTipHelper; public: - KviTalToolTip(QWidget * pParent); + KviTalToolTip(TQWidget * pParent); virtual ~KviTalToolTip(); protected: #ifdef COMPILE_USE_QT4 KviTalToolTipHelper * m_pHelper; - QWidget * m_pParent; + TQWidget * m_pParent; #endif public: #ifdef COMPILE_USE_QT4 - static void add(QWidget * widget,const QString & text); - static void remove(QWidget * widget); - virtual void tip(const QRect & rect,const QString & text); + static void add(TQWidget * widget,const TQString & text); + static void remove(TQWidget * widget); + virtual void tip(const TQRect & rect,const TQString & text); #endif protected: - virtual void maybeTip(const QPoint & p); + virtual void maybeTip(const TQPoint & p); #ifdef COMPILE_USE_QT4 void helperDying(); #endif diff --git a/src/kvilib/tal/kvi_tal_vbox_qt3.h b/src/kvilib/tal/kvi_tal_vbox_qt3.h index 440a2436..d7f6ae40 100644 --- a/src/kvilib/tal/kvi_tal_vbox_qt3.h +++ b/src/kvilib/tal/kvi_tal_vbox_qt3.h @@ -27,14 +27,15 @@ #include "kvi_settings.h" -#include +#include -class KVILIB_API KviTalVBox : public QVBox +class KVILIB_API KviTalVBox : public TQVBox { Q_OBJECT + TQ_OBJECT public: - KviTalVBox(QWidget * pParent) - : QVBox(pParent) {}; + KviTalVBox(TQWidget * pParent) + : TQVBox(pParent) {}; virtual ~KviTalVBox() {}; }; diff --git a/src/kvilib/tal/kvi_tal_vbox_qt4.h b/src/kvilib/tal/kvi_tal_vbox_qt4.h index 86de700d..715d09c0 100644 --- a/src/kvilib/tal/kvi_tal_vbox_qt4.h +++ b/src/kvilib/tal/kvi_tal_vbox_qt4.h @@ -27,13 +27,14 @@ #include "kvi_settings.h" -#include +#include class KVILIB_API KviTalVBox : public Q3VBox { Q_OBJECT + TQ_OBJECT public: - KviTalVBox(QWidget * pParent) + KviTalVBox(TQWidget * pParent) : Q3VBox(pParent) {}; virtual ~KviTalVBox() {}; }; diff --git a/src/kvilib/tal/kvi_tal_widgetstack_qt3.h b/src/kvilib/tal/kvi_tal_widgetstack_qt3.h index cc0eb969..3fd50684 100644 --- a/src/kvilib/tal/kvi_tal_widgetstack_qt3.h +++ b/src/kvilib/tal/kvi_tal_widgetstack_qt3.h @@ -27,15 +27,16 @@ #include "kvi_settings.h" -#include +#include -class KVILIB_API KviTalWidgetStack : public QWidgetStack +class KVILIB_API KviTalWidgetStack : public TQWidgetStack { Q_OBJECT + TQ_OBJECT public: - KviTalWidgetStack(QWidget * pParent) - : QWidgetStack(pParent) {}; + KviTalWidgetStack(TQWidget * pParent) + : TQWidgetStack(pParent) {}; virtual ~KviTalWidgetStack() {}; }; diff --git a/src/kvilib/tal/kvi_tal_widgetstack_qt4.h b/src/kvilib/tal/kvi_tal_widgetstack_qt4.h index 6d0cc53f..02037393 100644 --- a/src/kvilib/tal/kvi_tal_widgetstack_qt4.h +++ b/src/kvilib/tal/kvi_tal_widgetstack_qt4.h @@ -27,14 +27,15 @@ #include "kvi_settings.h" -//#include -#include +//#include +#include class KVILIB_API KviTalWidgetStack : public Q3WidgetStack { Q_OBJECT + TQ_OBJECT public: - KviTalWidgetStack(QWidget * pParent) + KviTalWidgetStack(TQWidget * pParent) : Q3WidgetStack(pParent) {}; virtual ~KviTalWidgetStack() {}; }; diff --git a/src/kvilib/tal/kvi_tal_windowstate.h b/src/kvilib/tal/kvi_tal_windowstate.h index 9510ba4a..bbd7c925 100644 --- a/src/kvilib/tal/kvi_tal_windowstate.h +++ b/src/kvilib/tal/kvi_tal_windowstate.h @@ -28,15 +28,15 @@ #include "kvi_settings.h" #ifdef COMPILE_USE_QT4 - #define QT_WINDOWSTATE_FLAGS Qt::WindowState + #define TQT_WINDOWSTATE_FLAGS TQt::WindowState - #define QT_WINDOWSTATE_MAXIMIZED Qt::WindowMaximized - #define QT_WINDOWSTATE_MINIMIZED Qt::WindowMinimized + #define TQT_WINDOWSTATE_MAXIMIZED TQt::WindowMaximized + #define TQT_WINDOWSTATE_MINIMIZED TQt::WindowMinimized #else - #define QT_WINDOWSTATE_FLAGS Qt::WidgetState + #define TQT_WINDOWSTATE_FLAGS TQt::WidgetState - #define QT_WINDOWSTATE_MAXIMIZED Qt::WState_Maximized - #define QT_WINDOWSTATE_MINIMIZED Qt::WState_Minimized + #define TQT_WINDOWSTATE_MAXIMIZED TQt::WState_Maximized + #define TQT_WINDOWSTATE_MINIMIZED TQt::WState_Minimized #endif #endif // _KVI_TAL_WINDOWSTATE_H_ diff --git a/src/kvilib/tal/kvi_tal_wizard.cpp b/src/kvilib/tal/kvi_tal_wizard.cpp index 6f5f39da..53b7c03f 100644 --- a/src/kvilib/tal/kvi_tal_wizard.cpp +++ b/src/kvilib/tal/kvi_tal_wizard.cpp @@ -29,21 +29,21 @@ #include "kvi_locale.h" #ifdef COMPILE_USE_QT4 - #include - #include - #include - #include - #include - #include - #include + #include + #include + #include + #include + #include + #include + #include #else - #include - #include - #include - #include - #include - #include - #include + #include + #include + #include + #include + #include + #include + #include #endif @@ -59,8 +59,8 @@ public: EnableFinish = 16 }; public: - QWidget * pWidget; - QString szTitle; + TQWidget * pWidget; + TQString szTitle; bool bEnabled; int iEnableFlags; int iVisibleIndex; @@ -72,23 +72,23 @@ public: KviPointerList * pPageList; int iEnabledPageCount; KviTalWizardPageData * pCurrentPage; - QGridLayout * pLayout; - QLabel * pTitleLabel; - QLabel * pStepsLabel; - QPushButton * pBackButton; - QPushButton * pCancelButton; - QPushButton * pHelpButton; - QPushButton * pNextButton; - QWidget * pNextSpacer; - QPushButton * pFinishButton; - QWidget * pFinishSpacer; + TQGridLayout * pLayout; + TQLabel * pTitleLabel; + TQLabel * pStepsLabel; + TQPushButton * pBackButton; + TQPushButton * pCancelButton; + TQPushButton * pHelpButton; + TQPushButton * pNextButton; + TQWidget * pNextSpacer; + TQPushButton * pFinishButton; + TQWidget * pFinishSpacer; #ifdef COMPILE_USE_QT4 - QStackedWidget * pWidgetStack; + TQStackedWidget * pWidgetStack; #else - QWidgetStack * pWidgetStack; + TQWidgetStack * pWidgetStack; #endif public: - KviTalWizardPageData * findPage(QWidget * pWidget) + KviTalWizardPageData * findPage(TQWidget * pWidget) { for(KviTalWizardPageData * pData = pPageList->first();pData;pData = pPageList->next()) { @@ -120,7 +120,7 @@ public: return NULL; } - KviTalWizardPageData * findNextEnabledPage(QWidget * pReference) + KviTalWizardPageData * findNextEnabledPage(TQWidget * pReference) { if(!pReference) return findFirstEnabledPage(); @@ -135,7 +135,7 @@ public: return NULL; } - KviTalWizardPageData * findPrevEnabledPage(QWidget * pReference) + KviTalWizardPageData * findPrevEnabledPage(TQWidget * pReference) { if(!pReference) return findLastEnabledPage(); @@ -166,33 +166,33 @@ public: }; -KviTalWizard::KviTalWizard(QWidget * pParent) -: QDialog(pParent) +KviTalWizard::KviTalWizard(TQWidget * pParent) +: TQDialog(pParent) { m_p = new KviTalWizardPrivate; m_p->pPageList = new KviPointerList; m_p->pPageList->setAutoDelete(true); m_p->pCurrentPage = NULL; m_p->iEnabledPageCount = 0; - m_p->pLayout = new QGridLayout(this); + m_p->pLayout = new TQGridLayout(this); - m_p->pTitleLabel = new QLabel(this); + m_p->pTitleLabel = new TQLabel(this); #ifdef COMPILE_USE_QT4 m_p->pLayout->addWidget(m_p->pTitleLabel,0,0,1,3); #else m_p->pLayout->addMultiCellWidget(m_p->pTitleLabel,0,0,0,3); #endif - m_p->pStepsLabel = new QLabel(this); + m_p->pStepsLabel = new TQLabel(this); m_p->pStepsLabel->setMinimumWidth(80); - m_p->pStepsLabel->setAlignment(Qt::AlignRight); + m_p->pStepsLabel->tqsetAlignment(TQt::AlignRight); #ifdef COMPILE_USE_QT4 m_p->pLayout->addWidget(m_p->pStepsLabel,0,4,1,3); #else m_p->pLayout->addMultiCellWidget(m_p->pStepsLabel,0,0,4,6); #endif - QFrame * f1 = new QFrame(this); - f1->setFrameStyle(QFrame::Sunken | QFrame::HLine); + TQFrame * f1 = new TQFrame(this); + f1->setFrameStyle(TQFrame::Sunken | TQFrame::HLine); #ifdef COMPILE_USE_QT4 m_p->pLayout->addWidget(f1,1,0,1,7); #else @@ -200,15 +200,15 @@ KviTalWizard::KviTalWizard(QWidget * pParent) #endif #ifdef COMPILE_USE_QT4 - m_p->pWidgetStack = new QStackedWidget(this); + m_p->pWidgetStack = new TQStackedWidget(this); m_p->pLayout->addWidget(m_p->pWidgetStack,2,0,1,7); #else - m_p->pWidgetStack = new QWidgetStack(this); + m_p->pWidgetStack = new TQWidgetStack(this); m_p->pLayout->addMultiCellWidget(m_p->pWidgetStack,2,2,0,6); #endif - QFrame * f2 = new QFrame(this); - f2->setFrameStyle(QFrame::Sunken | QFrame::HLine); + TQFrame * f2 = new TQFrame(this); + f2->setFrameStyle(TQFrame::Sunken | TQFrame::HLine); #ifdef COMPILE_USE_QT4 m_p->pLayout->addWidget(f2,3,0,1,7); #else @@ -226,66 +226,66 @@ KviTalWizard::KviTalWizard(QWidget * pParent) pButtonBox->setSpacing(0); - m_p->pCancelButton = new QPushButton(__tr("Cancel"),pButtonBox); + m_p->pCancelButton = new TQPushButton(__tr("Cancel"),pButtonBox); m_p->pCancelButton->setMinimumWidth(80); - QObject::connect( + TQObject::connect( m_p->pCancelButton, - SIGNAL(clicked()), + TQT_SIGNAL(clicked()), this, - SLOT(cancelButtonClicked()) + TQT_SLOT(cancelButtonClicked()) ); - QWidget * pSpacer = new QWidget(pButtonBox); + TQWidget * pSpacer = new TQWidget(pButtonBox); pSpacer->setFixedWidth(4); - m_p->pHelpButton = new QPushButton(__tr("Help"),pButtonBox); + m_p->pHelpButton = new TQPushButton(__tr("Help"),pButtonBox); m_p->pHelpButton->setMinimumWidth(80); - QObject::connect( + TQObject::connect( m_p->pHelpButton, - SIGNAL(clicked()), + TQT_SIGNAL(clicked()), this, - SLOT(helpButtonClicked()) + TQT_SLOT(helpButtonClicked()) ); - QWidget * pLargeSpacer = new QWidget(pButtonBox); + TQWidget * pLargeSpacer = new TQWidget(pButtonBox); pLargeSpacer->setMinimumWidth(50); pButtonBox->setStretchFactor(pLargeSpacer,100); - QString szText = "< "; + TQString szText = "< "; szText += __tr("Back"); - m_p->pBackButton = new QPushButton(szText,pButtonBox); + m_p->pBackButton = new TQPushButton(szText,pButtonBox); m_p->pBackButton->setMinimumWidth(80); - QObject::connect( + TQObject::connect( m_p->pBackButton, - SIGNAL(clicked()), + TQT_SIGNAL(clicked()), this, - SLOT(backButtonClicked()) + TQT_SLOT(backButtonClicked()) ); - m_p->pNextSpacer = new QWidget(pButtonBox); + m_p->pNextSpacer = new TQWidget(pButtonBox); m_p->pNextSpacer->setFixedWidth(4); szText = __tr("Next"); szText += " >"; - m_p->pNextButton = new QPushButton(szText,pButtonBox); + m_p->pNextButton = new TQPushButton(szText,pButtonBox); m_p->pNextButton->setMinimumWidth(80); - QObject::connect( + TQObject::connect( m_p->pNextButton, - SIGNAL(clicked()), + TQT_SIGNAL(clicked()), this, - SLOT(nextButtonClicked()) + TQT_SLOT(nextButtonClicked()) ); - m_p->pFinishSpacer = new QWidget(pButtonBox); + m_p->pFinishSpacer = new TQWidget(pButtonBox); m_p->pFinishSpacer->setFixedWidth(4); - m_p->pFinishButton = new QPushButton(__tr("Finish"),pButtonBox); + m_p->pFinishButton = new TQPushButton(__tr("Finish"),pButtonBox); m_p->pFinishButton->setMinimumWidth(80); - QObject::connect( + TQObject::connect( m_p->pFinishButton, - SIGNAL(clicked()), + TQT_SIGNAL(clicked()), this, - SLOT(finishButtonClicked()) + TQT_SLOT(finishButtonClicked()) ); m_p->pLayout->setMargin(8); @@ -300,7 +300,7 @@ KviTalWizard::~KviTalWizard() delete m_p; } -void KviTalWizard::insertPage(QWidget * pWidget,const QString &szTitle,int iIndex) +void KviTalWizard::insertPage(TQWidget * pWidget,const TQString &szTitle,int iIndex) { KviTalWizardPageData * pPageData = m_p->findPage(pWidget); if(!pPageData) @@ -327,12 +327,12 @@ void KviTalWizard::insertPage(QWidget * pWidget,const QString &szTitle,int iInde } -void KviTalWizard::addPage(QWidget * pWidget,const QString &szTitle) +void KviTalWizard::addPage(TQWidget * pWidget,const TQString &szTitle) { insertPage(pWidget,szTitle,-1); } -bool KviTalWizard::setPageEnabled(QWidget * pWidget,bool bEnabled) +bool KviTalWizard::setPageEnabled(TQWidget * pWidget,bool bEnabled) { KviTalWizardPageData * pData = m_p->findPage(pWidget); if(!pData) @@ -343,7 +343,7 @@ bool KviTalWizard::setPageEnabled(QWidget * pWidget,bool bEnabled) return true; } -bool KviTalWizard::setPageTitle(QWidget * pWidget,const QString &szTitle) +bool KviTalWizard::setPageTitle(TQWidget * pWidget,const TQString &szTitle) { KviTalWizardPageData * pData = m_p->findPage(pWidget); if(!pData) @@ -352,7 +352,7 @@ bool KviTalWizard::setPageTitle(QWidget * pWidget,const QString &szTitle) return true; } -bool KviTalWizard::setCurrentPage(QWidget * pWidget) +bool KviTalWizard::setCurrentPage(TQWidget * pWidget) { KviTalWizardPageData * pData = m_p->findPage(pWidget); if(!pData) @@ -361,7 +361,7 @@ bool KviTalWizard::setCurrentPage(QWidget * pWidget) return true; } -QWidget * KviTalWizard::currentPage() +TQWidget * KviTalWizard::currentPage() { if(!m_p->pCurrentPage) return NULL; @@ -378,8 +378,8 @@ void KviTalWizard::setCurrentPage(KviTalWizardPageData * pData) bool bHelpEnabled = false; bool bFinishEnabled = false; - QString szTitle; - QString szSteps; + TQString szTitle; + TQString szSteps; if(pData) { @@ -396,15 +396,15 @@ void KviTalWizard::setCurrentPage(KviTalWizardPageData * pData) szTitle = ""; szTitle += pData->szTitle; szTitle += ""; - QPalette pal = m_p->pStepsLabel->palette(); + TQPalette pal = m_p->pStepsLabel->palette(); #ifdef COMPILE_USE_QT4 - QColor clrWin = pal.color(QPalette::Normal,QPalette::Window); - QColor clrTxt = pal.color(QPalette::Normal,QPalette::WindowText); + TQColor clrWin = pal.color(TQPalette::Normal,TQPalette::Window); + TQColor clrTxt = pal.color(TQPalette::Normal,TQPalette::WindowText); #else - QColor clrWin = pal.color(QPalette::Normal,QColorGroup::Foreground); - QColor clrTxt = pal.color(QPalette::Normal,QColorGroup::Background); + TQColor clrWin = pal.color(TQPalette::Normal,TQColorGroup::Foreground); + TQColor clrTxt = pal.color(TQPalette::Normal,TQColorGroup::Background); #endif - QColor clrMid = qRgb( + TQColor clrMid = tqRgb( (clrWin.red() + clrTxt.red()) / 2, (clrWin.green() + clrTxt.green()) / 2, (clrWin.blue() + clrTxt.blue()) / 2 @@ -413,7 +413,7 @@ void KviTalWizard::setCurrentPage(KviTalWizardPageData * pData) szSteps = "["; - szSteps += QString("Step %1 of %2").arg(pData->iVisibleIndex).arg(m_p->iEnabledPageCount); + szSteps += TQString("Step %1 of %2").tqarg(pData->iVisibleIndex).tqarg(m_p->iEnabledPageCount); szSteps += "]"; } @@ -447,7 +447,7 @@ void KviTalWizard::setCurrentPage(KviTalWizardPageData * pData) } } -void KviTalWizard::showEvent(QShowEvent * e) +void KviTalWizard::showEvent(TQShowEvent * e) { if(!(m_p->pCurrentPage)) { @@ -456,10 +456,10 @@ void KviTalWizard::showEvent(QShowEvent * e) if(pData) setCurrentPage(pData->pWidget); } - QDialog::showEvent(e); + TQDialog::showEvent(e); } -void KviTalWizard::closeEvent(QCloseEvent * e) +void KviTalWizard::closeEvent(TQCloseEvent * e) { e->ignore(); cancelButtonClicked(); @@ -492,7 +492,7 @@ void KviTalWizard::finishButtonClicked() accept(); } -void KviTalWizard::setHelpEnabled(QWidget * pWidget,bool bEnabled) +void KviTalWizard::setHelpEnabled(TQWidget * pWidget,bool bEnabled) { KviTalWizardPageData * pData = m_p->findPage(pWidget); if(!pData) @@ -505,7 +505,7 @@ void KviTalWizard::setHelpEnabled(QWidget * pWidget,bool bEnabled) setCurrentPage(pData); } -void KviTalWizard::setCancelEnabled(QWidget * pWidget,bool bEnabled) +void KviTalWizard::setCancelEnabled(TQWidget * pWidget,bool bEnabled) { KviTalWizardPageData * pData = m_p->findPage(pWidget); if(!pData) @@ -518,7 +518,7 @@ void KviTalWizard::setCancelEnabled(QWidget * pWidget,bool bEnabled) setCurrentPage(pData); } -void KviTalWizard::setFinishEnabled(QWidget * pWidget,bool bEnabled) +void KviTalWizard::setFinishEnabled(TQWidget * pWidget,bool bEnabled) { KviTalWizardPageData * pData = m_p->findPage(pWidget); if(!pData) @@ -531,7 +531,7 @@ void KviTalWizard::setFinishEnabled(QWidget * pWidget,bool bEnabled) setCurrentPage(pData); } -void KviTalWizard::setNextEnabled(QWidget * pWidget,bool bEnabled) +void KviTalWizard::setNextEnabled(TQWidget * pWidget,bool bEnabled) { KviTalWizardPageData * pData = m_p->findPage(pWidget); if(!pData) @@ -544,7 +544,7 @@ void KviTalWizard::setNextEnabled(QWidget * pWidget,bool bEnabled) setCurrentPage(pData); } -void KviTalWizard::setBackEnabled(QWidget * pWidget,bool bEnabled) +void KviTalWizard::setBackEnabled(TQWidget * pWidget,bool bEnabled) { KviTalWizardPageData * pData = m_p->findPage(pWidget); if(!pData) @@ -557,27 +557,27 @@ void KviTalWizard::setBackEnabled(QWidget * pWidget,bool bEnabled) setCurrentPage(pData); } -QPushButton * KviTalWizard::cancelButton() +TQPushButton * KviTalWizard::cancelButton() { return m_p->pCancelButton; } -QPushButton * KviTalWizard::helpButton() +TQPushButton * KviTalWizard::helpButton() { return m_p->pHelpButton; } -QPushButton * KviTalWizard::finishButton() +TQPushButton * KviTalWizard::finishButton() { return m_p->pFinishButton; } -QPushButton * KviTalWizard::nextButton() +TQPushButton * KviTalWizard::nextButton() { return m_p->pNextButton; } -QPushButton * KviTalWizard::backButton() +TQPushButton * KviTalWizard::backButton() { return m_p->pBackButton; } diff --git a/src/kvilib/tal/kvi_tal_wizard.h b/src/kvilib/tal/kvi_tal_wizard.h index f84e3555..80e0afcf 100644 --- a/src/kvilib/tal/kvi_tal_wizard.h +++ b/src/kvilib/tal/kvi_tal_wizard.h @@ -28,13 +28,13 @@ #include "kvi_settings.h" #ifdef COMPILE_USE_QT4 - #include + #include #else - #include + #include #endif -class QShowEvent; -class QPushButton; +class TQShowEvent; +class TQPushButton; class KviTalWizardPrivate; class KviTalWizardPageData; @@ -43,11 +43,12 @@ class KviTalWizardPageData; /// /// \brief Provides a wizard-style dialog with steps /// -class KVILIB_API KviTalWizard : public QDialog +class KVILIB_API KviTalWizard : public TQDialog { Q_OBJECT + TQ_OBJECT public: - KviTalWizard(QWidget * pParent); + KviTalWizard(TQWidget * pParent); ~KviTalWizard(); protected: KviTalWizardPrivate * m_p; @@ -58,14 +59,14 @@ public: /// Adding a page a second time is equivalent to calling /// setPageTitle() and enabling the page. /// - void addPage(QWidget * pWidget,const QString &szTitle); + void addPage(TQWidget * pWidget,const TQString &szTitle); /// /// Adds a page to the wizard with the specified title /// and in the specified position. /// Adding a page a second time is equivalent to calling /// setPageTitle() and enabling the page. /// - void insertPage(QWidget * pWidget,const QString &szTitle,int iIndex); + void insertPage(TQWidget * pWidget,const TQString &szTitle,int iIndex); /// /// Enables or disables a page. A disabled page /// is skipped when the user presses "Next" in the @@ -75,14 +76,14 @@ public: /// Returns true on success or false if the pWidget /// does not identify a page that has been added to this wizard. /// - bool setPageEnabled(QWidget * pWidget,bool bEnabled); + bool setPageEnabled(TQWidget * pWidget,bool bEnabled); /// /// Changes a page title. /// /// Returns true on success or false if the pWidget /// does not identify a page that has been added to this wizard. /// - bool setPageTitle(QWidget * pWidget,const QString &szTitle); + bool setPageTitle(TQWidget * pWidget,const TQString &szTitle); /// /// Switches the wizard to the specified page. /// Please note that this class handles page switching @@ -91,56 +92,56 @@ public: /// Returns true on success or false if the pWidget /// does not identify a page that has been added to this wizard. /// - bool setCurrentPage(QWidget * pWidget); + bool setCurrentPage(TQWidget * pWidget); /// /// Returns a pointer to the current page /// - QWidget * currentPage(); + TQWidget * currentPage(); /// /// Enables or disables the help button for the specified page. /// By default the help button is always disabled. /// - void setHelpEnabled(QWidget * pWidget,bool bEnabled); + void setHelpEnabled(TQWidget * pWidget,bool bEnabled); /// /// Enables or disables the cancel button for the specified page. /// By default the cancel button is always enabled. /// - void setCancelEnabled(QWidget * pWidget,bool bEnabled); + void setCancelEnabled(TQWidget * pWidget,bool bEnabled); /// /// Enables or disables the finish button for the specified page. /// By default the finish button is always disabled. /// - void setFinishEnabled(QWidget * pWidget,bool bEnabled); + void setFinishEnabled(TQWidget * pWidget,bool bEnabled); /// /// Enables or disables the next button for the specified page. /// By default the next button is always enabled. /// - void setNextEnabled(QWidget * pWidget,bool bEnabled); + void setNextEnabled(TQWidget * pWidget,bool bEnabled); /// /// Enables or disables the prev button for the specified page. /// By default the prev button is always enabled. /// - void setBackEnabled(QWidget * pWidget,bool bEnabled); + void setBackEnabled(TQWidget * pWidget,bool bEnabled); /// /// Returns a pointer to the cancel button displayed in the dialog. /// - QPushButton * cancelButton(); + TQPushButton * cancelButton(); /// /// Returns a pointer to the help button displayed in the dialog. /// - QPushButton * helpButton(); + TQPushButton * helpButton(); /// /// Returns a pointer to the finish button displayed in the dialog. /// - QPushButton * finishButton(); + TQPushButton * finishButton(); /// /// Returns a pointer to the next button displayed in the dialog. /// - QPushButton * nextButton(); + TQPushButton * nextButton(); /// /// Returns a pointer to the back button displayed in the dialog. /// - QPushButton * backButton(); + TQPushButton * backButton(); signals: /// /// Emitted when the help button is clicked. @@ -150,11 +151,11 @@ protected: /// /// Displays the first page if no other page is shown yet. /// - virtual void showEvent(QShowEvent * e); + virtual void showEvent(TQShowEvent * e); /// /// Handles redirects the close button to the "cancel" operation. /// - virtual void closeEvent(QCloseEvent * e); + virtual void closeEvent(TQCloseEvent * e); protected: void setCurrentPage(KviTalWizardPageData * pData); protected slots: diff --git a/src/kvilib/tal/moc_kvi_tal_wizard.cpp b/src/kvilib/tal/moc_kvi_tal_wizard.cpp index 0ad29754..edf13270 100644 --- a/src/kvilib/tal/moc_kvi_tal_wizard.cpp +++ b/src/kvilib/tal/moc_kvi_tal_wizard.cpp @@ -2,21 +2,21 @@ ** KviTalWizard meta object code from reading C++ file 'kvi_tal_wizard.h' ** ** Created: Sun Mar 23 20:56:27 2008 -** by: The Qt MOC ($Id: qt/moc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) +** by: The TQt TQMOC ($Id: qt/tqmoc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ -#undef QT_NO_COMPAT +#undef TQT_NO_COMPAT #include "kvi_tal_wizard.h" -#include -#include +#include +#include -#include -#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26) -#error "This file was generated using the moc from 3.3.8. It" -#error "cannot be used with the include files from this version of Qt." -#error "(The moc has changed too much.)" +#include +#if !defined(TQ_TQMOC_OUTPUT_REVISION) || (TQ_TQMOC_OUTPUT_REVISION != 26) +#error "This file was generated using the tqmoc from 3.3.8. It" +#error "cannot be used with the include files from this version of TQt." +#error "(The tqmoc has changed too much.)" #endif const char *KviTalWizard::className() const @@ -24,77 +24,77 @@ const char *KviTalWizard::className() const return "KviTalWizard"; } -QMetaObject *KviTalWizard::metaObj = 0; -static QMetaObjectCleanUp cleanUp_KviTalWizard( "KviTalWizard", &KviTalWizard::staticMetaObject ); +TQMetaObject *KviTalWizard::metaObj = 0; +static TQMetaObjectCleanUp cleanUp_KviTalWizard( "KviTalWizard", &KviTalWizard::staticMetaObject ); -#ifndef QT_NO_TRANSLATION -QString KviTalWizard::tr( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION +TQString KviTalWizard::tr( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviTalWizard", s, c, QApplication::DefaultCodec ); + if ( tqApp ) + return tqApp->translate( "KviTalWizard", s, c, TQApplication::DefaultCodec ); else - return QString::fromLatin1( s ); + return TQString::tqfromLatin1( s ); } -#ifndef QT_NO_TRANSLATION_UTF8 -QString KviTalWizard::trUtf8( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION_UTF8 +TQString KviTalWizard::trUtf8( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviTalWizard", s, c, QApplication::UnicodeUTF8 ); + if ( tqApp ) + return tqApp->translate( "KviTalWizard", s, c, TQApplication::UnicodeUTF8 ); else - return QString::fromUtf8( s ); + return TQString::fromUtf8( s ); } -#endif // QT_NO_TRANSLATION_UTF8 +#endif // TQT_NO_TRANSLATION_UTF8 -#endif // QT_NO_TRANSLATION +#endif // TQT_NO_TRANSLATION -QMetaObject* KviTalWizard::staticMetaObject() +TQMetaObject* KviTalWizard::staticMetaObject() { if ( metaObj ) return metaObj; - QMetaObject* parentObject = QDialog::staticMetaObject(); - static const QUMethod slot_0 = {"backButtonClicked", 0, 0 }; - static const QUMethod slot_1 = {"nextButtonClicked", 0, 0 }; - static const QUMethod slot_2 = {"helpButtonClicked", 0, 0 }; - static const QUMethod slot_3 = {"cancelButtonClicked", 0, 0 }; - static const QUMethod slot_4 = {"finishButtonClicked", 0, 0 }; - static const QMetaData slot_tbl[] = { - { "backButtonClicked()", &slot_0, QMetaData::Protected }, - { "nextButtonClicked()", &slot_1, QMetaData::Protected }, - { "helpButtonClicked()", &slot_2, QMetaData::Protected }, - { "cancelButtonClicked()", &slot_3, QMetaData::Protected }, - { "finishButtonClicked()", &slot_4, QMetaData::Protected } + TQMetaObject* tqparentObject = TQDialog::staticMetaObject(); + static const TQUMethod slot_0 = {"backButtonClicked", 0, 0 }; + static const TQUMethod slot_1 = {"nextButtonClicked", 0, 0 }; + static const TQUMethod slot_2 = {"helpButtonClicked", 0, 0 }; + static const TQUMethod slot_3 = {"cancelButtonClicked", 0, 0 }; + static const TQUMethod slot_4 = {"finishButtonClicked", 0, 0 }; + static const TQMetaData slot_tbl[] = { + { "backButtonClicked()", &slot_0, TQMetaData::Protected }, + { "nextButtonClicked()", &slot_1, TQMetaData::Protected }, + { "helpButtonClicked()", &slot_2, TQMetaData::Protected }, + { "cancelButtonClicked()", &slot_3, TQMetaData::Protected }, + { "finishButtonClicked()", &slot_4, TQMetaData::Protected } }; - static const QUMethod signal_0 = {"helpClicked", 0, 0 }; - static const QMetaData signal_tbl[] = { - { "helpClicked()", &signal_0, QMetaData::Public } + static const TQUMethod signal_0 = {"helpClicked", 0, 0 }; + static const TQMetaData signal_tbl[] = { + { "helpClicked()", &signal_0, TQMetaData::Public } }; - metaObj = QMetaObject::new_metaobject( - "KviTalWizard", parentObject, + metaObj = TQMetaObject::new_metaobject( + "KviTalWizard", tqparentObject, slot_tbl, 5, signal_tbl, 1, -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES 0, 0, 0, 0, -#endif // QT_NO_PROPERTIES +#endif // TQT_NO_PROPERTIES 0, 0 ); cleanUp_KviTalWizard.setMetaObject( metaObj ); return metaObj; } -void* KviTalWizard::qt_cast( const char* clname ) +void* KviTalWizard::tqqt_cast( const char* clname ) { if ( !qstrcmp( clname, "KviTalWizard" ) ) return this; - return QDialog::qt_cast( clname ); + return TQDialog::tqqt_cast( clname ); } -// SIGNAL helpClicked +// TQT_SIGNAL helpClicked void KviTalWizard::helpClicked() { activate_signal( staticMetaObject()->signalOffset() + 0 ); } -bool KviTalWizard::qt_invoke( int _id, QUObject* _o ) +bool KviTalWizard::qt_invoke( int _id, TQUObject* _o ) { switch ( _id - staticMetaObject()->slotOffset() ) { case 0: backButtonClicked(); break; @@ -103,26 +103,26 @@ bool KviTalWizard::qt_invoke( int _id, QUObject* _o ) case 3: cancelButtonClicked(); break; case 4: finishButtonClicked(); break; default: - return QDialog::qt_invoke( _id, _o ); + return TQDialog::qt_invoke( _id, _o ); } return TRUE; } -bool KviTalWizard::qt_emit( int _id, QUObject* _o ) +bool KviTalWizard::qt_emit( int _id, TQUObject* _o ) { switch ( _id - staticMetaObject()->signalOffset() ) { case 0: helpClicked(); break; default: - return QDialog::qt_emit(_id,_o); + return TQDialog::qt_emit(_id,_o); } return TRUE; } -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES -bool KviTalWizard::qt_property( int id, int f, QVariant* v) +bool KviTalWizard::qt_property( int id, int f, TQVariant* v) { - return QDialog::qt_property( id, f, v); + return TQDialog::qt_property( id, f, v); } -bool KviTalWizard::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; } -#endif // QT_NO_PROPERTIES +bool KviTalWizard::qt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; } +#endif // TQT_NO_PROPERTIES diff --git a/src/kvirc/kernel/kvi_action.cpp b/src/kvirc/kernel/kvi_action.cpp index 4764fcfd..0c10f990 100644 --- a/src/kvirc/kernel/kvi_action.cpp +++ b/src/kvirc/kernel/kvi_action.cpp @@ -37,7 +37,7 @@ #include "kvi_query.h" #include "kvi_styled_controls.h" -#include +#include #include "kvi_tal_popupmenu.h" @@ -45,19 +45,19 @@ KviAction::~KviAction() { if(m_pWidgetList) { - for(QWidget * b = m_pWidgetList->first();b;b = m_pWidgetList->next()) - disconnect(b,SIGNAL(destroyed()),this,SLOT(widgetDestroyed())); + for(TQWidget * b = m_pWidgetList->first();b;b = m_pWidgetList->next()) + disconnect(b,TQT_SIGNAL(destroyed()),this,TQT_SLOT(widgetDestroyed())); m_pWidgetList->setAutoDelete(true); delete m_pWidgetList; } } -const QString & KviAction::visibleName() +const TQString & KviAction::visibleName() { return m_szVisibleName; } -const QString & KviAction::description() +const TQString & KviAction::description() { return m_szDescription; } @@ -70,7 +70,7 @@ bool KviAction::isKviUserActionNeverOverrideThis() void KviAction::registerAccelerator() { if(!m_szKeySequence.isEmpty()) - m_iAccelId = g_pFrame->registerAccelerator(m_szKeySequence,this,SLOT(activate())); + m_iAccelId = g_pFrame->registerAccelerator(m_szKeySequence,this,TQT_SLOT(activate())); } void KviAction::unregisterAccelerator() @@ -94,10 +94,10 @@ void KviAction::setEnabled(bool bEnabled) { if(bEnabled) { - for(QWidget * t = m_pWidgetList->first();t;t = m_pWidgetList->next()) + for(TQWidget * t = m_pWidgetList->first();t;t = m_pWidgetList->next()) if(!t->isEnabled())t->setEnabled(true); } else { - for(QWidget * t = m_pWidgetList->first();t;t = m_pWidgetList->next()) + for(TQWidget * t = m_pWidgetList->first();t;t = m_pWidgetList->next()) if(t->isEnabled())t->setEnabled(false); } } @@ -117,31 +117,31 @@ int KviAction::validateFlags(int iFlagsToValidate) return iFlagsToValidate; } -QPixmap * KviAction::smallIcon() +TQPixmap * KviAction::smallIcon() { if(m_iSmallIconId != 0)return g_pIconManager->getSmallIcon(m_iSmallIconId); return 0; } -QPixmap * KviAction::bigIcon() +TQPixmap * KviAction::bigIcon() { return g_pIconManager->getBigIcon(m_szBigIcon); } void KviAction::setup() { - connect(g_pApp,SIGNAL(reloadImages()),this,SLOT(reloadImages())); + connect(g_pApp,TQT_SIGNAL(reloadImages()),this,TQT_SLOT(reloadImages())); if(m_uFlags & InternalWindowMask) { - connect(g_pFrame,SIGNAL(activeWindowChanged()),this,SLOT(activeWindowChanged())); + connect(g_pFrame,TQT_SIGNAL(activeWindowChanged()),this,TQT_SLOT(activeWindowChanged())); if((m_uFlags & WindowOnlyIfUsersSelected) && (m_uFlags & (WindowChannel | WindowConsole | WindowQuery))) - connect(g_pFrame,SIGNAL(activeWindowSelectionStateChanged(bool)),this,SLOT(activeWindowSelectionStateChanged(bool))); + connect(g_pFrame,TQT_SIGNAL(activeWindowSelectionStateChanged(bool)),this,TQT_SLOT(activeWindowSelectionStateChanged(bool))); activeWindowChanged(); } else { if(m_uFlags & NeedsConnection) { - connect(g_pFrame,SIGNAL(activeContextChanged()),this,SLOT(activeContextChanged())); - connect(g_pFrame,SIGNAL(activeContextStateChanged()),this,SLOT(activeContextStateChanged())); + connect(g_pFrame,TQT_SIGNAL(activeContextChanged()),this,TQT_SLOT(activeContextChanged())); + connect(g_pFrame,TQT_SIGNAL(activeContextStateChanged()),this,TQT_SLOT(activeContextStateChanged())); KviIrcContext * c = g_pFrame->activeContext(); if(!c)setEnabled(false); else { @@ -161,7 +161,7 @@ void KviAction::setup() } else { if(m_uFlags & NeedsContext) { - connect(g_pFrame,SIGNAL(activeContextChanged()),this,SLOT(activeContextChanged())); + connect(g_pFrame,TQT_SIGNAL(activeContextChanged()),this,TQT_SLOT(activeContextChanged())); if(!g_pFrame->activeContext())setEnabled(false); else setEnabled(true); } @@ -175,11 +175,11 @@ void KviAction::setup() void KviAction::reloadImages() { if(!m_pWidgetList)return; - QPixmap * p = bigIcon(); - for(QWidget * b = m_pWidgetList->first();b;b = m_pWidgetList->next()) + TQPixmap * p = bigIcon(); + for(TQWidget * b = m_pWidgetList->first();b;b = m_pWidgetList->next()) { - if(b->inherits("QToolButton")) - ((QToolButton *)b)->setIconSet(p ? *p : QPixmap()); + if(b->inherits(TQTOOLBUTTON_OBJECT_NAME_STRING)) + ((TQToolButton *)b)->setIconSet(p ? *p : TQPixmap()); } } @@ -251,7 +251,7 @@ void KviAction::activeWindowChanged() if(isEnabled())setEnabled(false); } break; - case KVI_WINDOW_TYPE_QUERY: + case KVI_WINDOW_TYPE_TQUERY: if(m_uFlags & WindowQuery) { if(m_uFlags & WindowOnlyIfUsersSelected) @@ -305,7 +305,7 @@ void KviAction::activeWindowSelectionStateChanged(bool bSelectedNow) if(isEnabled())setEnabled(false); } break; - case KVI_WINDOW_TYPE_QUERY: + case KVI_WINDOW_TYPE_TQUERY: if(m_uFlags & WindowQuery) { if(bSelectedNow != isEnabled())setEnabled(bSelectedNow); @@ -377,15 +377,15 @@ void KviAction::activeContextStateChanged() bool KviAction::addToPopupMenu(KviTalPopupMenu *pMenu) { if(!setupDone())setup(); - QPixmap * p = smallIcon(); + TQPixmap * p = smallIcon(); int id; - QString t = visibleName(); + TQString t = visibleName(); if(!m_szKeySequence.isEmpty())t += '\t' + m_szKeySequence; if(p) { - id = pMenu->insertItem(*p,t,this,SLOT(activate())); + id = pMenu->insertItem(*p,t,this,TQT_SLOT(activate())); } else { - id = pMenu->insertItem(t,this,SLOT(activate())); + id = pMenu->insertItem(t,this,TQT_SLOT(activate())); } if(!isEnabled())pMenu->setItemEnabled(id,false); return true; @@ -394,30 +394,30 @@ bool KviAction::addToPopupMenu(KviTalPopupMenu *pMenu) void KviAction::widgetDestroyed() { if(!m_pWidgetList)return; - QWidget * b = (QWidget *)sender(); + TQWidget * b = (TQWidget *)sender(); m_pWidgetList->removeRef(b); } -void KviAction::registerWidget(QWidget * b) +void KviAction::registerWidget(TQWidget * b) { - connect(b,SIGNAL(destroyed()),this,SLOT(widgetDestroyed())); + connect(b,TQT_SIGNAL(destroyed()),this,TQT_SLOT(widgetDestroyed())); if(!m_pWidgetList) { - m_pWidgetList = new KviPointerList; + m_pWidgetList = new KviPointerList; m_pWidgetList->setAutoDelete(false); } m_pWidgetList->append(b); } -QWidget * KviAction::addToCustomToolBar(KviCustomToolBar *pParentToolBar) +TQWidget * KviAction::addToCustomToolBar(KviCustomToolBar *pParentToolBar) { if(!setupDone())setup(); - QPixmap * p = bigIcon(); - QToolButton * b = new KviStyledToolButton( - p ? *p : QPixmap(), + TQPixmap * p = bigIcon(); + TQToolButton * b = new KviStyledToolButton( + p ? *p : TQPixmap(), visibleName(), visibleName(), - this,SLOT(activate()),pParentToolBar,m_szName); + this,TQT_SLOT(activate()),pParentToolBar,m_szName); #ifdef COMPILE_USE_QT4 pParentToolBar->addWidget(b); #endif diff --git a/src/kvirc/kernel/kvi_action.h b/src/kvirc/kernel/kvi_action.h index 18669634..37a397e0 100644 --- a/src/kvirc/kernel/kvi_action.h +++ b/src/kvirc/kernel/kvi_action.h @@ -27,8 +27,8 @@ #include "kvi_settings.h" #include "kvi_pointerlist.h" -#include -#include +#include +#include // The action name is INTERNAL: it should be never shown to the user // if it contains a dot then the part before the dot is considered to @@ -38,46 +38,47 @@ // class KviTalPopupMenu; -class QWidget; +class TQWidget; class KviCustomToolBar; -class QPixmap; +class TQPixmap; class KviKvsScript; class KVIRC_API KviActionCategory { protected: - QString m_szName; - QString m_szVisibleName; - QString m_szDescription; + TQString m_szName; + TQString m_szVisibleName; + TQString m_szDescription; public: - KviActionCategory(const QString &szName,const QString &szVisibleName,const QString &szDescription) + KviActionCategory(const TQString &szName,const TQString &szVisibleName,const TQString &szDescription) : m_szName(szName), m_szVisibleName(szVisibleName), m_szDescription(szDescription) {}; ~KviActionCategory(){}; public: - const QString & name(){ return m_szName; }; - const QString & visibleName(){ return m_szVisibleName; }; - const QString & description(){ return m_szDescription; }; + const TQString & name(){ return m_szName; }; + const TQString & visibleName(){ return m_szVisibleName; }; + const TQString & description(){ return m_szDescription; }; }; // these flags are INTERNAL #define KVI_ACTION_FLAG_ENABLED 1 #define KVI_ACTION_FLAG_SETUPDONE 2 -class KVIRC_API KviAction : public QObject +class KVIRC_API KviAction : public TQObject { friend class KviActionManager; Q_OBJECT + TQ_OBJECT protected: - QString m_szName; // the internal name of the action, must be in form [module.]name - QString m_szVisibleName; - QString m_szDescription; + TQString m_szName; // the internal name of the action, must be in form [module.]name + TQString m_szVisibleName; + TQString m_szDescription; KviActionCategory * m_pCategory; // may be 0, not owned! - QString m_szBigIcon; + TQString m_szBigIcon; int m_iSmallIconId; - KviPointerList * m_pWidgetList; + KviPointerList * m_pWidgetList; unsigned short int m_uInternalFlags; unsigned int m_uFlags; - QString m_szKeySequence; + TQString m_szKeySequence; int m_iAccelId; public: enum Flags { @@ -92,16 +93,16 @@ public: WindowOnlyIfUsersSelected = 128 // implies at least one of WindowConsole | WindowChannel | WindowQuery }; public: - KviAction(QObject * pParent, // can be 0, but using a QObject will help in deleting this action :) - const QString &szName, // internal name of this action, in form [module.]name - const QString &szVisibleName, // permanent visible name, visible at least in the action drawer - const QString &szDescription, // what this action does ? + KviAction(TQObject * pParent, // can be 0, but using a TQObject will help in deleting this action :) + const TQString &szName, // internal name of this action, in form [module.]name + const TQString &szVisibleName, // permanent visible name, visible at least in the action drawer + const TQString &szDescription, // what this action does ? KviActionCategory * pCategory = 0, // one of KviActionManager::category*() or 0 (default category) - const QString &szBigIcon = QString::null, + const TQString &szBigIcon = TQString(), int iSmallIconId = 0, unsigned int uFlags = 0, - const QString &szKeySequence = QString::null) - : QObject(pParent), + const TQString &szKeySequence = TQString()) + : TQObject(pParent), m_szName(szName), m_szVisibleName(szVisibleName), m_szDescription(szDescription), @@ -116,29 +117,29 @@ public: virtual ~KviAction(); public: static int validateFlags(int iFlagsToValidate); - const QString & name() const { return m_szName; }; - virtual const QString & visibleName(); - virtual const QString & description(); - const QString & keySequence() const { return m_szKeySequence; }; - const QString & bigIconString() const { return m_szBigIcon; }; + const TQString & name() const { return m_szName; }; + virtual const TQString & visibleName(); + virtual const TQString & description(); + const TQString & keySequence() const { return m_szKeySequence; }; + const TQString & bigIconString() const { return m_szBigIcon; }; KviActionCategory * category() const { return m_pCategory; }; bool isEnabled() const { return (m_uInternalFlags & KVI_ACTION_FLAG_ENABLED); }; unsigned int flags(){ return m_uFlags; }; virtual bool isKviUserActionNeverOverrideThis(); virtual void setEnabled(bool bEnabled); - virtual QPixmap * smallIcon(); - virtual QPixmap * bigIcon(); + virtual TQPixmap * smallIcon(); + virtual TQPixmap * bigIcon(); virtual bool addToPopupMenu(KviTalPopupMenu *pMenu); - virtual QWidget * addToCustomToolBar(KviCustomToolBar *pParentToolBar); + virtual TQWidget * addToCustomToolBar(KviCustomToolBar *pParentToolBar); void suicide() { delete this; }; protected: // called once before the FIRST button or menu item is created bool setupDone() const { return (m_uInternalFlags & KVI_ACTION_FLAG_SETUPDONE); }; virtual void setup(); - KviPointerList * widgetList(){ return m_pWidgetList; }; + KviPointerList * widgetList(){ return m_pWidgetList; }; void registerAccelerator(); void unregisterAccelerator(); - void registerWidget(QWidget * b); + void registerWidget(TQWidget * b); protected slots: virtual void widgetDestroyed(); virtual void reloadImages(); diff --git a/src/kvirc/kernel/kvi_actionmanager.cpp b/src/kvirc/kernel/kvi_actionmanager.cpp index 3a325a6e..296de6a6 100644 --- a/src/kvirc/kernel/kvi_actionmanager.cpp +++ b/src/kvirc/kernel/kvi_actionmanager.cpp @@ -50,17 +50,17 @@ KviCustomToolBar * KviActionManager::m_pCurrentToolBar = 0; extern void register_core_actions(KviActionManager *); KviActionManager::KviActionManager() -: QObject() +: TQObject() { - m_pActions = new KviPointerHashTable(101); + m_pActions = new KviPointerHashTable(101); m_pActions->setAutoDelete(false); - m_pCategories = new KviPointerHashTable(17,false); + m_pCategories = new KviPointerHashTable(17,false); m_pCategories->setAutoDelete(true); #define CATEGORY(__var,__name,__vname,__descr) \ __var = new KviActionCategory(__name,__vname,__descr); \ - m_pCategories->replace(__name,__var) + m_pCategories->tqreplace(__name,__var) CATEGORY(m_pCategoryIrc,"irc",__tr2qs("IRC"),__tr2qs("IRC Context related actions")); CATEGORY(m_pCategoryGeneric,"generic",__tr2qs("Generic"),__tr2qs("Generic actions")); @@ -82,10 +82,10 @@ KviActionManager::~KviActionManager() // killed all the modules at this point... //KviActionDialog::cleanup(); - KviPointerHashTableIterator it(*m_pActions); + KviPointerHashTableIterator it(*m_pActions); while(KviAction * a = it.current()) { - disconnect(a,SIGNAL(destroyed()),this,SLOT(actionDestroyed())); + disconnect(a,TQT_SIGNAL(destroyed()),this,TQT_SLOT(actionDestroyed())); ++it; } delete m_pActions; @@ -93,7 +93,7 @@ KviActionManager::~KviActionManager() delete m_pCategories; } -void KviActionManager::load(const QString &szFileName) +void KviActionManager::load(const TQString &szFileName) { KviConfig cfg(szFileName,KviConfig::Read); @@ -108,12 +108,12 @@ void KviActionManager::load(const QString &szFileName) } } -void KviActionManager::save(const QString &szFileName) +void KviActionManager::save(const TQString &szFileName) { KviConfig cfg(szFileName,KviConfig::Write); cfg.clear(); - KviPointerHashTableIterator it(*m_pActions); + KviPointerHashTableIterator it(*m_pActions); while(KviAction * a = it.current()) { if(a->isKviUserActionNeverOverrideThis()) @@ -130,7 +130,7 @@ void KviActionManager::killAllKvsUserActions() KviPointerList dying; dying.setAutoDelete(true); - KviPointerHashTableIterator it(*m_pActions); + KviPointerHashTableIterator it(*m_pActions); while(KviAction * a = it.current()) { if(a->isKviUserActionNeverOverrideThis()) @@ -144,22 +144,22 @@ void KviActionManager::killAllKvsUserActions() } -bool KviActionManager::coreActionExists(const QString &szName) +bool KviActionManager::coreActionExists(const TQString &szName) { - KviAction *a = m_pActions->find(szName); + KviAction *a = m_pActions->tqfind(szName); if(a)return (!a->isKviUserActionNeverOverrideThis()); return false; } -QString KviActionManager::nameForAutomaticAction(const QString &szTemplate) +TQString KviActionManager::nameForAutomaticAction(const TQString &szTemplate) { - QString ret; + TQString ret; int i = 1; do { - KviQString::sprintf(ret,"%Q%d",&szTemplate,i); + KviTQString::sprintf(ret,"%Q%d",&szTemplate,i); i++; - } while(m_pActions->find(ret)); + } while(m_pActions->tqfind(ret)); return ret; } @@ -169,11 +169,11 @@ void KviActionManager::emitRemoveActionsHintRequest() emit removeActionsHintRequest(); } -KviActionCategory * KviActionManager::category(const QString &szName) +KviActionCategory * KviActionManager::category(const TQString &szName) { if(!szName.isEmpty()) { - KviActionCategory * c = m_pCategories->find(szName); + KviActionCategory * c = m_pCategories->tqfind(szName); if(c)return c; } return m_pCategoryGeneric; @@ -238,7 +238,7 @@ void KviActionManager::done() void KviActionManager::delayedRegisterAccelerators() { - KviPointerHashTableIterator it(*m_pActions); + KviPointerHashTableIterator it(*m_pActions); while(KviAction * a = it.current()) { a->registerAccelerator(); @@ -248,8 +248,8 @@ void KviActionManager::delayedRegisterAccelerators() bool KviActionManager::registerAction(KviAction * a) { - if(m_pActions->find(a->name()))return false; - connect(a,SIGNAL(destroyed()),this,SLOT(actionDestroyed())); + if(m_pActions->tqfind(a->name()))return false; + connect(a,TQT_SIGNAL(destroyed()),this,TQT_SLOT(actionDestroyed())); m_pActions->insert(a->name(),a); if(g_pFrame)a->registerAccelerator(); // otherwise it is delayed! return true; @@ -261,26 +261,26 @@ void KviActionManager::actionDestroyed() m_pActions->remove(a->name()); } -bool KviActionManager::unregisterAction(const QString &szName) +bool KviActionManager::unregisterAction(const TQString &szName) { - KviAction * a = m_pActions->find(szName); + KviAction * a = m_pActions->tqfind(szName); if(!a)return false; - disconnect(a,SIGNAL(destroyed()),this,SLOT(actionDestroyed())); + disconnect(a,TQT_SIGNAL(destroyed()),this,TQT_SLOT(actionDestroyed())); a->unregisterAccelerator(); return m_pActions->remove(szName); } -KviAction * KviActionManager::getAction(const QString &szName) +KviAction * KviActionManager::getAction(const TQString &szName) { - KviAction * a = m_pActions->find(szName); + KviAction * a = m_pActions->tqfind(szName); if(a)return a; - int idx = szName.find('.'); + int idx = szName.tqfind('.'); if(idx < 0) { // backward compatibility: try to lookup the name with the kvirc. prefix - QString s = "kvirc."; + TQString s = "kvirc."; s += szName; - return m_pActions->find(s); + return m_pActions->tqfind(s); } if((idx == 5) && (!m_bCoreActionsRegistered)) { @@ -293,24 +293,24 @@ KviAction * KviActionManager::getAction(const QString &szName) { register_core_actions(this); m_bCoreActionsRegistered = true; - a = m_pActions->find(szName); + a = m_pActions->tqfind(szName); return a; } } // try to preload the module that might register this action... - QString szModule = szName.left(idx); + TQString szModule = szName.left(idx); if(!g_pModuleManager->getModule(szModule))return 0; - return m_pActions->find(szName); + return m_pActions->tqfind(szName); } -void KviActionManager::listActionsByCategory(const QString &szCatName,KviPointerList * pBuffer) +void KviActionManager::listActionsByCategory(const TQString &szCatName,KviPointerList * pBuffer) { loadAllAvailableActions(); KviActionCategory * pCat = category(szCatName); pBuffer->setAutoDelete(false); pBuffer->clear(); if(!pCat)return; - KviPointerHashTableIterator it(*m_pActions); + KviPointerHashTableIterator it(*m_pActions); while(KviAction * a = it.current()) { if(a->category() == pCat) diff --git a/src/kvirc/kernel/kvi_actionmanager.h b/src/kvirc/kernel/kvi_actionmanager.h index c68e3f82..d707e881 100644 --- a/src/kvirc/kernel/kvi_actionmanager.h +++ b/src/kvirc/kernel/kvi_actionmanager.h @@ -27,26 +27,27 @@ #include "kvi_settings.h" #include "kvi_action.h" -#include +#include #include "kvi_pointerhashtable.h" class KviActionDrawer; class KviCustomToolBar; -class KVIRC_API KviActionManager : public QObject +class KVIRC_API KviActionManager : public TQObject { friend class KviActionDrawer; friend class KviCustomizeToolBarsDialog; friend class KviCustomToolBar; friend class KviFrame; Q_OBJECT + TQ_OBJECT public: KviActionManager(); ~KviActionManager(); protected: static KviActionManager * m_pInstance; - KviPointerHashTable * m_pActions; - KviPointerHashTable * m_pCategories; + KviPointerHashTable * m_pActions; + KviPointerHashTable * m_pCategories; static bool m_bCustomizingToolBars; // action categories @@ -74,28 +75,28 @@ public: static KviActionCategory * categoryChannel(){ return m_pCategoryChannel; }; static KviActionCategory * categoryTools(){ return m_pCategoryTools; }; - KviPointerHashTable * actions(){ return m_pActions; }; - KviActionCategory * category(const QString &szName); - KviPointerHashTable * categories(){ return m_pCategories; }; + KviPointerHashTable * actions(){ return m_pActions; }; + KviActionCategory * category(const TQString &szName); + KviPointerHashTable * categories(){ return m_pCategories; }; void killAllKvsUserActions(); static KviCustomToolBar * currentToolBar(){ return m_pCurrentToolBar; }; - KviAction * getAction(const QString &szName); - void listActionsByCategory(const QString &szCatName,KviPointerList * pBuffer); - QString nameForAutomaticAction(const QString &szTemplate); - bool coreActionExists(const QString &szName); + KviAction * getAction(const TQString &szName); + void listActionsByCategory(const TQString &szCatName,KviPointerList * pBuffer); + TQString nameForAutomaticAction(const TQString &szTemplate); + bool coreActionExists(const TQString &szName); - void load(const QString &szFileName); - void save(const QString &szFileName); + void load(const TQString &szFileName); + void save(const TQString &szFileName); bool registerAction(KviAction * a); - bool unregisterAction(const QString &szName); + bool unregisterAction(const TQString &szName); void emitRemoveActionsHintRequest(); protected: void setCurrentToolBar(KviCustomToolBar * t); - KviAction * findAction(const QString &szName){ return m_pActions->find(szName); }; + KviAction * findAction(const TQString &szName){ return m_pActions->tqfind(szName); }; void customizeToolBarsDialogCreated(); void customizeToolBarsDialogDestroyed(); void tryFindCurrentToolBar(); diff --git a/src/kvirc/kernel/kvi_app.cpp b/src/kvirc/kernel/kvi_app.cpp index 2e66d2ba..3b2944ba 100644 --- a/src/kvirc/kernel/kvi_app.cpp +++ b/src/kvirc/kernel/kvi_app.cpp @@ -86,18 +86,18 @@ #include "kvi_sourcesdate.h" #include "kvi_tal_popupmenu.h" -#include -#include +#include +#include #include "kvi_pointerhashtable.h" -#include +#include #ifdef COMPILE_USE_QT4 - #include + #include #endif #include "kvi_tal_listbox.h" -#include -#include -#include -#include +#include +#include +#include +#include #ifdef COMPILE_SSL_SUPPORT #include "kvi_ssl.h" @@ -105,14 +105,14 @@ #ifdef COMPILE_USE_QT4 #ifdef COMPILE_ON_WINDOWS -#include +#include #endif #endif #ifdef COMPILE_USE_QT4 - #include + #include #else - #include + #include #endif KVIRC_API KviApp * g_pApp = 0; // global application pointer @@ -126,8 +126,8 @@ KVIRC_API KviProxyDataBase * g_pProxyDataBase = 0; KVIRC_API KviColorWindow * g_pColorWindow = 0; KVIRC_API KviTextIconWindow * g_pTextIconWindow = 0; KVIRC_API KviTalPopupMenu * g_pInputPopup = 0; -KVIRC_API QStringList * g_pRecentTopicList = 0; -//KVIRC_API QStringList * g_pBookmarkList = 0; +KVIRC_API TQStringList * g_pRecentTopicList = 0; +//KVIRC_API TQStringList * g_pBookmarkList = 0; KVIRC_API KviPointerHashTable * g_pGlobalWindowDict = 0; KVIRC_API KviMediaManager * g_pMediaManager = 0; //KVIRC_API KviRegisteredUserDataBase * g_pRegisteredUserDataBase = 0; @@ -147,8 +147,8 @@ KVIRC_API KviSplashScreen * g_pSplashScreen = 0; // Loaded and destroyed by KviIconManager -QPixmap * g_pUserChanStatePixmap = 0; -QPixmap * g_pActivityMeterPixmap = 0; +TQPixmap * g_pUserChanStatePixmap = 0; +TQPixmap * g_pActivityMeterPixmap = 0; #ifdef COMPILE_PSEUDO_TRANSPARENCY @@ -158,16 +158,16 @@ QPixmap * g_pActivityMeterPixmap = 0; #include #include #include - #include - #include + #include + #include KSharedPixmap * g_pKdeDesktopBackground = 0; // the shared pixmap that we get from KWin #endif - #include + #include - KVIRC_API QPixmap * g_pShadedParentGlobalDesktopBackground = 0; // the pixmap that we use for MdiManager - KVIRC_API QPixmap * g_pShadedChildGlobalDesktopBackground = 0; // the pixmap that we use for MdiChild + KVIRC_API TQPixmap * g_pShadedParentGlobalDesktopBackground = 0; // the pixmap that we use for MdiManager + KVIRC_API TQPixmap * g_pShadedChildGlobalDesktopBackground = 0; // the pixmap that we use for MdiChild #endif #ifdef COMPILE_CRYPT_SUPPORT @@ -180,7 +180,7 @@ KviApp::KviApp(int &argc,char ** argv) { // Ok...everything begins here g_pApp = this; - m_szConfigFile = QString::null; + m_szConfigFile = TQString(); m_bCreateConfig = false; m_bShowSplashScreen = true; m_bUpdateGuiPending = false; @@ -226,9 +226,9 @@ void KviApp::setup() #ifdef COMPILE_USE_QT4 #ifdef COMPILE_ON_WINDOWS //need to load image plugins:( - QString szPluginsDir; + TQString szPluginsDir; getGlobalKvircDirectory(szPluginsDir,None,"qt-plugins/"); - setLibraryPaths(QStringList(szPluginsDir)); + tqsetLibraryPaths(TQStringList(szPluginsDir)); //KviMessageBox::information(libraryPaths().join(";")); //debug("%1",loader.isLoaded()); #endif @@ -237,7 +237,7 @@ void KviApp::setup() // check if we want to permanently disable the splash screen // we do it once for every version: the user should see the new splash screens at least once - QString szSplashDisableFile; + TQString szSplashDisableFile; getLocalKvircDirectory(szSplashDisableFile,Pics,"disable-splash." KVI_VERSION); if(KviFileUtils::fileExists(szSplashDisableFile)) @@ -252,11 +252,11 @@ void KviApp::setup() // Make sure that the C strings are translated to utf8 // This is a fallback solution anyway: we should use the appropriate // encoding every time. - QTextCodec::setCodecForCStrings(KviLocale::codecForName("UTF-8")); + TQTextCodec::setCodecForCStrings(KviLocale::codecForName("UTF-8")); // Set the default help files search path - QStringList list; - QString tmp; + TQStringList list; + TQString tmp; getLocalKvircDirectory(tmp,Help); // localized help/lang or help if help/lang doesn't exist list.append(tmp); getLocalKvircDirectory(tmp,HelpEN); // help/en @@ -272,7 +272,7 @@ void KviApp::setup() #ifdef COMPILE_USE_QT4 Q3MimeSourceFactory::defaultFactory()->setFilePath(list); #else - QMimeSourceFactory::defaultFactory()->setFilePath(list); + TQMimeSourceFactory::defaultFactory()->setFilePath(list); #endif KVI_SPLASH_SET_PROGRESS(1) @@ -395,8 +395,8 @@ void KviApp::setup() KVI_SPLASH_SET_PROGRESS(80) // load the recent data lists - g_pRecentTopicList = new QStringList(); - //g_pBookmarkList = new QStringList(); + g_pRecentTopicList = new TQStringList(); + //g_pBookmarkList = new TQStringList(); loadRecentEntries(); KVI_SPLASH_SET_PROGRESS(81) @@ -476,14 +476,14 @@ void KviApp::setup() KviDoubleBuffer::init(); #ifdef COMPILE_USE_QT4 - QString szStylesheetFile; + TQString szStylesheetFile; getGlobalKvircDirectory(szStylesheetFile,Config,"style.css"); if(KviFileUtils::fileExists(szStylesheetFile)) { - QString szStyleData; + TQString szStyleData; KviFileUtils::readFile(szStylesheetFile,szStyleData); - szStyleData.replace("global://",m_szGlobalKvircDir); - szStyleData.replace("local://",m_szLocalKvircDir); + szStyleData.tqreplace("global://",m_szGlobalKvircDir); + szStyleData.tqreplace("local://",m_szLocalKvircDir); setStyleSheet(szStyleData); } #endif @@ -656,12 +656,12 @@ int KviApp::getGloballyUniqueId() typedef struct _NotifierMessageSupaDupaParameterStruct { KviWindow * pWindow; - QString szIcon; - QString szMessage; + TQString szIcon; + TQString szMessage; unsigned int uMessageLifetime; // 0 means no hide } NotifierMessageSupaDupaParameterStruct; -void KviApp::notifierMessage(KviWindow * pWnd,int iIconId,const QString &szMsg,unsigned int uMessageLifetime) +void KviApp::notifierMessage(KviWindow * pWnd,int iIconId,const TQString &szMsg,unsigned int uMessageLifetime) { KviModule * m = g_pModuleManager->getModule("notifier"); if(!m)return; @@ -675,15 +675,15 @@ void KviApp::notifierMessage(KviWindow * pWnd,int iIconId,const QString &szMsg,u m->ctrl("notifier::message",(void *)&s); } -QTextCodec * KviApp::defaultTextCodec() +TQTextCodec * KviApp::defaultTextCodec() { - QTextCodec * c = 0; + TQTextCodec * c = 0; if(!KVI_OPTION_STRING(KviOption_stringDefaultTextEncoding).isEmpty()) { c = KviLocale::codecForName(KVI_OPTION_STRING(KviOption_stringDefaultTextEncoding).latin1()); if(c)return c; } - c = QTextCodec::codecForLocale(); + c = TQTextCodec::codecForLocale(); if(c)return c; c = KviLocale::codecForName("UTF-8"); if(!c)debug("KviApp::defaultTextCodec(): cannot find a suitable text codec for locale :/"); @@ -692,26 +692,26 @@ QTextCodec * KviApp::defaultTextCodec() void KviApp::contextSensitiveHelp() { - // this stuff doesn't work with Qt 4.x + // this stuff doesn't work with TQt 4.x #ifndef COMPILE_USE_QT4 // the F1 Key has been pressed - // try to pass it to the active widget or one of its parents - QWidget * w = g_pApp->focusWidget(); + // try to pass it to the active widget or one of its tqparents + TQWidget * w = g_pApp->tqfocusWidget(); while(w) { - //QVariant v = w->property("contextSensitiveHelp"); <-- this prints a lot of warnings: this is a QT BUG - QMetaObject * o = w->metaObject(); + //TQVariant v = w->property("contextSensitiveHelp"); <-- this prints a lot of warnings: this is a QT BUG + TQMetaObject * o = w->tqmetaObject(); if(o) { - int i = o->findProperty("contextSensitiveHelp",true); + int i = o->tqfindProperty("contextSensitiveHelp",true); if(i != -1) { - QVariant v = w->property("contextSensitiveHelp"); + TQVariant v = w->property("contextSensitiveHelp"); if(v.isValid() && v.toBool()) return; // done! } } - w = w->parentWidget(); + w = w->tqparentWidget(); } // no way // FIXME: just show up simple plain online help @@ -720,7 +720,7 @@ void KviApp::contextSensitiveHelp() } -void KviApp::collectGarbage(QObject * garbage) +void KviApp::collectGarbage(TQObject * garbage) { // if(!g_pGarbageCollector)debug("Ops... no garbage collector ?"); g_pGarbageCollector->collect(garbage); @@ -728,17 +728,17 @@ void KviApp::collectGarbage(QObject * garbage) void KviApp::loadDefaultScript() { - QString cmd; + TQString cmd; getGlobalKvircDirectory(cmd,KviApp::DefScript,"default.kvs"); cmd.prepend("parse \""); cmd.append("\""); #ifdef COMPILE_ON_WINDOWS - cmd.replace("\\","\\\\"); + cmd.tqreplace("\\","\\\\"); #endif KviKvsScript::run(cmd,g_pFrame->firstConsole()); // now line up the toolbars (they may get messed while loading the script) #ifndef COMPILE_USE_QT4 - g_pFrame->lineUpDockWindows(); // missing on Qt 4.x + g_pFrame->lineUpDockWindows(); // missing on TQt 4.x #endif } @@ -793,7 +793,7 @@ void KviApp::checkSuggestRestoreDefaultScript() bSuggestedOnce = true; - switch(QMessageBox::question(0,__tr2qs("Installation problems ?"), + switch(TQMessageBox::question(0,__tr2qs("Installation problems ?"), __tr2qs("Ooops...

" \ "There are some reasons that make me think that your KVIrc installation is incomplete.

" \ "I might be wrong, but you seem to miss some of the features that the default KVIrc script provides." \ @@ -831,9 +831,9 @@ void KviApp::checkSuggestRestoreDefaultScript() void KviApp::restoreDefaultScript() { - if(QMessageBox::warning(0,__tr2qs("Restore Default Script - KVIrc"), + if(TQMessageBox::warning(0,__tr2qs("Restore Default Script - KVIrc"), __tr2qs("You are about to restore the default script.
This will erase any script changes you have made.
Do you wish to proceed?"), - QMessageBox::Yes,QMessageBox::No|QMessageBox::Default|QMessageBox::Escape) != QMessageBox::Yes)return; + TQMessageBox::Yes,TQMessageBox::No|TQMessageBox::Default|TQMessageBox::Escape) != TQMessageBox::Yes)return; KviKvs::clearAliases(); KviKvs::clearAppEvents(); @@ -895,16 +895,16 @@ void KviApp::destroySplashScreen() } -QString KviApp::getClipboardText() +TQString KviApp::getClipboardText() { /* - QString buffer; -#if QT_VERSION >= 300 + TQString buffer; +#if [[[TQT_VERSION IS DEPRECATED]]] >= 300 bool bOldMode = clipboard()->selectionModeEnabled(); clipboard()->setSelectionMode(false); #endif buffer = clipboard()->text(); -#if QT_VERSION >= 300 +#if [[[TQT_VERSION IS DEPRECATED]]] >= 300 if(buffer.isEmpty()) { // lookup the global clipboard @@ -916,8 +916,8 @@ QString KviApp::getClipboardText() return buffer; */ - QString buffer = clipboard()->text(QClipboard::Clipboard); - if(buffer.isEmpty())return clipboard()->text(QClipboard::Selection); + TQString buffer = tqclipboard()->text(TQClipboard::Clipboard); + if(buffer.isEmpty())return tqclipboard()->text(TQClipboard::Selection); return buffer; } @@ -927,10 +927,10 @@ void KviApp::getClipboardText(KviStr &buffer) buffer = getClipboardText(); } -void KviApp::setClipboardText(const QString &str) +void KviApp::setClipboardText(const TQString &str) { /* -#if QT_VERSION >= 300 +#if [[[TQT_VERSION IS DEPRECATED]]] >= 300 if(clipboard()->supportsSelection()) { bool bOldMode = clipboard()->selectionModeEnabled(); @@ -942,17 +942,17 @@ void KviApp::setClipboardText(const QString &str) } else { #endif clipboard()->setText(str); -#if QT_VERSION >= 300 +#if [[[TQT_VERSION IS DEPRECATED]]] >= 300 } #endif*/ - clipboard()->setText(str,QClipboard::Clipboard); - clipboard()->setText(str,QClipboard::Selection); + tqclipboard()->setText(str,TQClipboard::Clipboard); + tqclipboard()->setText(str,TQClipboard::Selection); } void KviApp::setClipboardText(const KviStr &str) { debug("WARNING : KviApp::setClipboardText(const KviStr &) is deprecated!"); - setClipboardText(QString(str.ptr())); + setClipboardText(TQString(str.ptr())); } void KviApp::setAvatarFromOptions() @@ -970,7 +970,7 @@ void KviApp::setAvatarFromOptions() } -void KviApp::setAvatarOnFileReceived(KviConsole * pConsole,const QString &szRemoteUrl,const QString &szNick,const QString &szUser,const QString &szHost) +void KviApp::setAvatarOnFileReceived(KviConsole * pConsole,const TQString &szRemoteUrl,const TQString &szNick,const TQString &szUser,const TQString &szHost) { if(!m_pPendingAvatarChanges) { @@ -993,7 +993,7 @@ void KviApp::setAvatarOnFileReceived(KviConsole * pConsole,const QString &szRemo m_pPendingAvatarChanges->append(p); } -KviPendingAvatarChange * KviApp::findPendingAvatarChange(KviConsole * pConsole,const QString &szNick,const QString &szRemoteUrl) +KviPendingAvatarChange * KviApp::findPendingAvatarChange(KviConsole * pConsole,const TQString &szNick,const TQString &szRemoteUrl) { if(!m_pPendingAvatarChanges)return 0; @@ -1013,7 +1013,7 @@ KviPendingAvatarChange * KviApp::findPendingAvatarChange(KviConsole * pConsole,c return 0; } -void KviApp::fileDownloadTerminated(bool bSuccess,const QString &szRemoteUrl,const QString &szLocalFileName,const QString &szNick,const QString &szError,bool bQuiet) +void KviApp::fileDownloadTerminated(bool bSuccess,const TQString &szRemoteUrl,const TQString &szLocalFileName,const TQString &szNick,const TQString &szError,bool bQuiet) { KviPendingAvatarChange * p; @@ -1030,7 +1030,7 @@ void KviApp::fileDownloadTerminated(bool bSuccess,const QString &szRemoteUrl,con { if(!g_pActiveWindow)return; if(g_pActiveWindow->hasAttention())return; - QString szMsg; + TQString szMsg; int iIconId; if(!bSuccess) { @@ -1038,7 +1038,7 @@ void KviApp::fileDownloadTerminated(bool bSuccess,const QString &szRemoteUrl,con if(szNick.isEmpty()) szMsg = __tr2qs("File download failed"); else - szMsg = __tr2qs("File download from %1 failed").arg(szNick); + szMsg = __tr2qs("File download from %1 failed").tqarg(szNick); szMsg += ": "; szMsg += szError; szMsg += " ("; @@ -1049,15 +1049,15 @@ void KviApp::fileDownloadTerminated(bool bSuccess,const QString &szRemoteUrl,con if(szNick.isEmpty()) szMsg = __tr2qs("File download successfully complete"); else - szMsg = __tr2qs("File download from %1 successfully complete").arg(szNick); + szMsg = __tr2qs("File download from %1 successfully complete").tqarg(szNick); szMsg += " ("; szMsg += szLocalFileName; szMsg += ")"; } #ifdef COMPILE_USE_QT4 - notifierMessage(0,iIconId,Qt::escape(szMsg),30); + notifierMessage(0,iIconId,TQt::escape(szMsg),30); #else - notifierMessage(0,iIconId,QStyleSheet::escape(szMsg),30); + notifierMessage(0,iIconId,TQStyleSheet::escape(szMsg),30); #endif } return; @@ -1068,7 +1068,7 @@ void KviApp::fileDownloadTerminated(bool bSuccess,const QString &szRemoteUrl,con if(windowExists(p->pConsole)) { p->pConsole->setAvatar(p->szNick,p->szUser,p->szHost, - szLocalFileName,KviQString::equalCIN("http://",szRemoteUrl,7) ? szRemoteUrl : QString::null); + szLocalFileName,KviTQString::equalCIN("http://",szRemoteUrl,7) ? szRemoteUrl : TQString()); } } else { if((!_OUTPUT_MUTE) && (!bQuiet)) @@ -1102,7 +1102,7 @@ void KviApp::fileDownloadTerminated(bool bSuccess,const QString &szRemoteUrl,con delete g_pKdeDesktopBackground; g_pKdeDesktopBackground = 0; // this signal shouldn't be connected ,but well.. let's make sure - disconnect(this,SIGNAL(backgroundChanged(int)),this,SLOT(kdeRootPixmapChanged(int))); + disconnect(this,TQT_SIGNAL(backgroundChanged(int)),this,TQT_SLOT(kdeRootPixmapChanged(int))); } g_pKdeDesktopBackground = 0; @@ -1117,10 +1117,10 @@ void KviApp::fileDownloadTerminated(bool bSuccess,const QString &szRemoteUrl,con #endif rinfo.activate(); - QString name = QString("DESKTOP%1").arg(rinfo.currentDesktop()); + TQString name = TQString("DESKTOP%1").tqarg(rinfo.currentDesktop()); g_pKdeDesktopBackground = new KSharedPixmap(); - connect(g_pKdeDesktopBackground,SIGNAL(done(bool)),this,SLOT(kdeRootPixmapDownloadComplete(bool))); + connect(g_pKdeDesktopBackground,TQT_SIGNAL(done(bool)),this,TQT_SLOT(kdeRootPixmapDownloadComplete(bool))); if(!(g_pKdeDesktopBackground->isAvailable(name))) { @@ -1131,17 +1131,17 @@ void KviApp::fileDownloadTerminated(bool bSuccess,const QString &szRemoteUrl,con // Send a request to kdesktop.... DCOPClient *client = kapp->dcopClient(); if(!client->isAttached())client->attach(); - QByteArray data; - QDataStream args(data,IO_WriteOnly); + TQByteArray data; + TQDataStream args(data,IO_WriteOnly); args << 1; client->send("kdesktop","KBackgroundIface","setExport(int)",data); m_bUpdatePseudoTransparencyPending = true; // Now wait a while and try again.... - QTimer::singleShot(500,this,SLOT(updatePseudoTransparency())); + TQTimer::singleShot(500,this,TQT_SLOT(updatePseudoTransparency())); return; } - if(!g_pKdeDesktopBackground->loadFromShared(QString("DESKTOP%1").arg(rinfo.currentDesktop()))) + if(!g_pKdeDesktopBackground->loadFromShared(TQString("DESKTOP%1").tqarg(rinfo.currentDesktop()))) { debug("Can't load the KDE root background image..."); delete g_pKdeDesktopBackground; @@ -1162,7 +1162,7 @@ void KviApp::fileDownloadTerminated(bool bSuccess,const QString &szRemoteUrl,con g_pKdeDesktopBackground = 0; } // forget the backgroundChanged signal (will do nothing if it is not connected) - disconnect(this,SIGNAL(backgroundChanged(int)),this,SLOT(kdeRootPixmapChanged(int))); + disconnect(this,TQT_SIGNAL(backgroundChanged(int)),this,TQT_SLOT(kdeRootPixmapChanged(int))); #endif //COMPILE_KDE_SUPPORT if(g_pShadedParentGlobalDesktopBackground) { @@ -1180,7 +1180,7 @@ void KviApp::fileDownloadTerminated(bool bSuccess,const QString &szRemoteUrl,con { if(m_bUpdatePseudoTransparencyPending)return; m_bUpdatePseudoTransparencyPending = true; - QTimer::singleShot(0,this,SLOT(updatePseudoTransparency())); + TQTimer::singleShot(0,this,TQT_SLOT(updatePseudoTransparency())); } #ifdef COMPILE_KDE_SUPPORT @@ -1198,7 +1198,7 @@ void KviApp::fileDownloadTerminated(bool bSuccess,const QString &szRemoteUrl,con // (C) 2000 Josef Weidendorfer // - QImage& kimageeffect_fade(QImage &img,float val,const QColor &color) + TQImage& kimageeffect_fade(TQImage &img,float val,const TQColor &color) { if(img.width() == 0 || img.height() == 0)return img; @@ -1212,7 +1212,7 @@ void KviApp::fileDownloadTerminated(bool bSuccess,const QString &szRemoteUrl,con int green = color.green(); int blue = color.blue(); - QRgb col; + TQRgb col; int r, g, b, cr, cg, cb; if (img.depth() <= 8) @@ -1221,31 +1221,31 @@ void KviApp::fileDownloadTerminated(bool bSuccess,const QString &szRemoteUrl,con for(int i=0; i red)r = cr - tbl[cr - red]; else r = cr + tbl[red - cr]; if (cg > green)g = cg - tbl[cg - green]; else g = cg + tbl[green - cg]; if (cb > blue)b = cb - tbl[cb - blue]; else b = cb + tbl[blue - cb]; - img.setColor(i, qRgb(r, g, b)); + img.setColor(i, tqRgb(r, g, b)); } } else { // truecolor for(int y=0; y red)r = cr - tbl[cr - red]; else r = cr + tbl[red - cr]; if (cg > green)g = cg - tbl[cg - green]; else g = cg + tbl[green - cg]; if (cb > blue)b = cb - tbl[cb - blue]; else b = cb + tbl[blue - cb]; - *data++ = qRgb(r, g, b); + *data++ = tqRgb(r, g, b); } } } @@ -1254,14 +1254,14 @@ void KviApp::fileDownloadTerminated(bool bSuccess,const QString &szRemoteUrl,con #endif //!COMPILE_KDE_SUPPORT - void KviApp::createGlobalBackgrounds(QPixmap * pix) + void KviApp::createGlobalBackgrounds(TQPixmap * pix) { // create shaded copies... if(g_pShadedParentGlobalDesktopBackground)delete g_pShadedParentGlobalDesktopBackground; if(g_pShadedChildGlobalDesktopBackground)delete g_pShadedChildGlobalDesktopBackground; - g_pShadedParentGlobalDesktopBackground = new QPixmap(); - g_pShadedChildGlobalDesktopBackground = new QPixmap(); - QImage img = pix->convertToImage(); + g_pShadedParentGlobalDesktopBackground = new TQPixmap(); + g_pShadedChildGlobalDesktopBackground = new TQPixmap(); + TQImage img = pix->convertToImage(); // play with the fade factors KVI_OPTION_UINT(KviOption_uintGlobalTransparencyParentFadeFactor) %= 100; if(KVI_OPTION_UINT(KviOption_uintGlobalTransparencyParentFadeFactor) > 0) @@ -1309,9 +1309,9 @@ void KviApp::kdeRootPixmapDownloadComplete(bool bSuccess) // create shaded copies... createGlobalBackgrounds(g_pKdeDesktopBackground); // make sure that this signal is not connected twice - disconnect(this,SIGNAL(backgroundChanged(int)),this,SLOT(kdeRootPixmapChanged(int))); + disconnect(this,TQT_SIGNAL(backgroundChanged(int)),this,TQT_SLOT(kdeRootPixmapChanged(int))); // connect it - connect(this,SIGNAL(backgroundChanged(int)),this,SLOT(kdeRootPixmapChanged(int))); + connect(this,TQT_SIGNAL(backgroundChanged(int)),this,TQT_SLOT(kdeRootPixmapChanged(int))); } delete g_pKdeDesktopBackground; g_pKdeDesktopBackground = 0; @@ -1354,7 +1354,7 @@ void KviApp::triggerUpdateGui() { if(m_bUpdateGuiPending)return; m_bUpdateGuiPending = true; - QTimer::singleShot(0,this,SLOT(updateGui())); + TQTimer::singleShot(0,this,TQT_SLOT(updateGui())); } void KviApp::updateGui() @@ -1368,22 +1368,22 @@ void KviApp::updateApplicationFont() if(KVI_OPTION_BOOL(KviOption_boolUseGlobalApplicationFont)) { if(font() != KVI_OPTION_FONT(KviOption_fontApplication)) - setFont(KVI_OPTION_FONT(KviOption_fontApplication),true); + tqsetFont(KVI_OPTION_FONT(KviOption_fontApplication),true); } // FIXME: #warning "And what if this option is turned off ?...a reboot only" } void KviApp::loadRecentEntries() { - QString tmp; + TQString tmp; getLocalKvircDirectory(tmp,Config,KVI_CONFIGFILE_RECENT); KviConfig cfg(tmp,KviConfig::Read); - *g_pRecentTopicList = cfg.readStringListEntry("RecentTopicList",QStringList()); - //*g_pBookmarkList = cfg.readStringListEntry("Bookmarks",QStringList()); + *g_pRecentTopicList = cfg.readStringListEntry("RecentTopicList",TQStringList()); + //*g_pBookmarkList = cfg.readStringListEntry("Bookmarks",TQStringList()); } void KviApp::saveRecentEntries() { - QString tmp; + TQString tmp; getLocalKvircDirectory(tmp,Config,KVI_CONFIGFILE_RECENT); KviConfig cfg(tmp,KviConfig::Write); cfg.writeEntry("RecentTopicList",*g_pRecentTopicList); @@ -1392,7 +1392,7 @@ void KviApp::saveRecentEntries() void KviApp::saveAvatarCache() { - QString tmp; + TQString tmp; getLocalKvircDirectory(tmp,Config,KVI_CONFIGFILE_AVATARCACHE); KviAvatarCache::instance()->save(tmp); } @@ -1400,14 +1400,14 @@ void KviApp::saveAvatarCache() void KviApp::saveToolBars() { - QString tmp; + TQString tmp; getLocalKvircDirectory(tmp,Config,KVI_CONFIGFILE_CUSTOMTOOLBARS); KviCustomToolBarManager::instance()->save(tmp); } void KviApp::savePopups() { - QString tmp; + TQString tmp; getLocalKvircDirectory(tmp,Config,KVI_CONFIGFILE_POPUPS); KviKvs::savePopups(tmp); } @@ -1416,7 +1416,7 @@ void KviApp::saveInputHistory() { if(!KVI_OPTION_BOOL(KviOption_boolDisableInputHistory)) { - QString tmp; + TQString tmp; getLocalKvircDirectory(tmp,Config,KVI_CONFIGFILE_INPUTHISTORY); g_pInputHistory->save(tmp); } @@ -1425,14 +1425,14 @@ void KviApp::saveInputHistory() void KviApp::saveAliases() { - QString tmp; + TQString tmp; getLocalKvircDirectory(tmp,Config,KVI_CONFIGFILE_ALIASES); KviKvs::saveAliases(tmp); } void KviApp::saveScriptAddons() { - QString tmp; + TQString tmp; getLocalKvircDirectory(tmp,Config,KVI_CONFIGFILE_SCRIPTADDONS); KviKvs::saveScriptAddons(tmp); } @@ -1444,21 +1444,21 @@ void KviApp::saveTextIcons() void KviApp::saveAppEvents() { - QString tmp; + TQString tmp; getLocalKvircDirectory(tmp,Config,KVI_CONFIGFILE_EVENTS); KviKvs::saveAppEvents(tmp); } void KviApp::saveRawEvents() { - QString tmp; + TQString tmp; getLocalKvircDirectory(tmp,Config,KVI_CONFIGFILE_RAWEVENTS); KviKvs::saveRawEvents(tmp); } void KviApp::saveMediaTypes() { - QString tmp; + TQString tmp; getLocalKvircDirectory(tmp,Config,KVI_CONFIGFILE_MEDIATYPES); g_pMediaManager->lock(); g_pMediaManager->save(tmp); @@ -1467,56 +1467,56 @@ void KviApp::saveMediaTypes() void KviApp::saveIrcServerDataBase() { - QString tmp; + TQString tmp; getLocalKvircDirectory(tmp,Config,KVI_CONFIGFILE_SERVERDB); g_pIrcServerDataBase->save(tmp); } void KviApp::saveProxyDataBase() { - QString tmp; + TQString tmp; getLocalKvircDirectory(tmp,Config,KVI_CONFIGFILE_PROXYDB); g_pProxyDataBase->save(tmp); } void KviApp::saveRegisteredUsers() { - QString tmp; + TQString tmp; getLocalKvircDirectory(tmp,Config,KVI_CONFIGFILE_REGUSERDB); g_pRegisteredUserDataBase->save(tmp); } void KviApp::saveRegisteredChannels() { - QString tmp; + TQString tmp; getLocalKvircDirectory(tmp,Config,KVI_CONFIGFILE_REGCHANDB); g_pRegisteredChannelDataBase->save(tmp); } void KviApp::saveNickServ() { - QString tmp; + TQString tmp; getLocalKvircDirectory(tmp,Config,KVI_CONFIGFILE_NICKSERVDATABASE); g_pNickServRuleSet->save(tmp); } void KviApp::saveSharedFiles() { - QString tmp; + TQString tmp; getLocalKvircDirectory(tmp,Config,KVI_CONFIGFILE_SHAREDFILES); g_pSharedFilesManager->save(tmp); } void KviApp::saveActions() { - QString tmp; + TQString tmp; getLocalKvircDirectory(tmp,Config,KVI_CONFIGFILE_USERACTIONS); KviActionManager::instance()->save(tmp); } void KviApp::saveIdentities() { - QString tmp; + TQString tmp; getLocalKvircDirectory(tmp,Config,KVI_CONFIGFILE_IDENTITIES); KviUserIdentityManager::instance()->save(tmp); } @@ -1556,7 +1556,7 @@ void KviApp::autoConnectToServers() { for(KviIrcServer * s = l->first();s;s = l->next()) { - QString szCommand = "server -u \"id:"; + TQString szCommand = "server -u \"id:"; if(s->id().isEmpty())s->generateUniqueId(); szCommand += s->id(); szCommand += "\""; @@ -1570,7 +1570,7 @@ void KviApp::autoConnectToServers() { for(KviIrcServerDataBaseRecord * r = lr->first();r;r = lr->next()) { - QString szCommandx = "server -u \"net:"; + TQString szCommandx = "server -u \"net:"; szCommandx += r->network()->name(); szCommandx += "\""; KviKvsScript::run(szCommandx,activeConsole()); @@ -1588,7 +1588,7 @@ void KviApp::createFrame() if(m_szExecAfterStartup.hasData()) { - // FIXME , this should be a QString + // FIXME , this should be a TQString KviKvsScript::run(m_szExecAfterStartup.ptr(),g_pFrame->firstConsole()); m_szExecAfterStartup = ""; } @@ -1652,7 +1652,7 @@ unsigned int KviApp::windowCount() return g_pGlobalWindowDict->count(); } -KviConsole * KviApp::findConsole(QString &server,QString &nick) +KviConsole * KviApp::findConsole(TQString &server,TQString &nick) { KviPointerHashTableIterator it(*g_pGlobalWindowDict); @@ -1664,12 +1664,12 @@ KviConsole * KviApp::findConsole(QString &server,QString &nick) { if(!server.isEmpty()) { - if(KviQString::equalCI(server, + if(KviTQString::equalCI(server, ((KviConsole *)it.current())->connection()->currentServerName())) { if(!nick.isEmpty()) { - if(KviQString::equalCI(nick, + if(KviTQString::equalCI(nick, ((KviConsole *)it.current())->connection()->currentNickName())) return ((KviConsole *)it.current()); } else return ((KviConsole *)it.current()); @@ -1677,7 +1677,7 @@ KviConsole * KviApp::findConsole(QString &server,QString &nick) } else { if(!nick.isEmpty()) { - if(KviQString::equalCI(nick, + if(KviTQString::equalCI(nick, ((KviConsole *)it.current())->connection()->currentNickName())) return ((KviConsole *)it.current()); } @@ -1692,8 +1692,8 @@ KviConsole * KviApp::findConsole(QString &server,QString &nick) KviConsole * KviApp::findConsole(KviStr &server,KviStr &nick) { // DEPRECATED: TO BE KILLED (if nobody is using it) - QString s = server.ptr(); - QString n = nick.ptr(); + TQString s = server.ptr(); + TQString n = nick.ptr(); return findConsole(s,n); } @@ -1785,16 +1785,16 @@ KviConsole * KviApp::topmostConnectedConsole() KviWindow * KviApp::findWindow(const char * windowId) { - return g_pGlobalWindowDict->find(windowId); + return g_pGlobalWindowDict->tqfind(windowId); } -KviWindow * KviApp::findWindowByCaption(const QString &windowCaption,int iContextId) +KviWindow * KviApp::findWindowByCaption(const TQString &windowCaption,int iContextId) { KviPointerHashTableIterator it(*g_pGlobalWindowDict); while(it.current()) { - if(KviQString::equalCI(windowCaption,it.current()->plainTextCaption()) && + if(KviTQString::equalCI(windowCaption,it.current()->plainTextCaption()) && (iContextId==-1 || it.current()->context()->id() == iContextId)) return it.current(); ++it; @@ -1827,13 +1827,13 @@ KviConsole * KviApp::activeConsole() /////////////////// RECENT STUFF LISTS & POPUPS HANDLING // Helper for KviApp::addRecent*() -static void merge_to_stringlist_option(const QString &item,int iOption,int iMaxEntries) +static void merge_to_stringlist_option(const TQString &item,int iOption,int iMaxEntries) { - for(QStringList::Iterator it = KVI_OPTION_STRINGLIST(iOption).begin(); + for(TQStringList::Iterator it = KVI_OPTION_STRINGLIST(iOption).begin(); it != KVI_OPTION_STRINGLIST(iOption).end(); ++it) { // Do a case-insensitive search (for nicknames, servers, and channels) - if(!QString::compare(item.lower(),(*it).lower())) + if(!TQString::compare(item.lower(),(*it).lower())) { // In the recent list, remove and put as first so more recent items // are always first @@ -1848,7 +1848,7 @@ static void merge_to_stringlist_option(const QString &item,int iOption,int iMaxE KVI_OPTION_STRINGLIST(iOption).prepend(item); } -void KviApp::addRecentUrl(const QString& text) +void KviApp::addRecentUrl(const TQString& text) { merge_to_stringlist_option(text,KviOption_stringlistRecentIrcUrls,50); emit(recentUrlsChanged()); @@ -1856,27 +1856,27 @@ void KviApp::addRecentUrl(const QString& text) void KviApp::addRecentNickname(const char * newNick) { - QString nk(newNick); + TQString nk(newNick); merge_to_stringlist_option(nk,KviOption_stringlistRecentNicknames,KVI_MAX_RECENT_NICKNAMES); } -void KviApp::addRecentNickname(const QString& newNick) +void KviApp::addRecentNickname(const TQString& newNick) { merge_to_stringlist_option(newNick,KviOption_stringlistRecentNicknames,KVI_MAX_RECENT_NICKNAMES); } -void KviApp::addRecentChannel(const QString& szChan,const QString& net) +void KviApp::addRecentChannel(const TQString& szChan,const TQString& net) { if(!m_pRecentChannelsDict) buildRecentChannels(); - QStringList* pList=m_pRecentChannelsDict->find(net.utf8().data()); + TQStringList* pList=m_pRecentChannelsDict->tqfind(net.utf8().data()); if(pList) { - if(!pList->contains(szChan)) pList->append(szChan); + if(!pList->tqcontains(szChan)) pList->append(szChan); } else { - pList=new QStringList(szChan); + pList=new TQStringList(szChan); m_pRecentChannelsDict->insert(net.utf8().data(),pList); } } @@ -1885,11 +1885,11 @@ void KviApp::buildRecentChannels() { if(m_pRecentChannelsDict) delete m_pRecentChannelsDict; - m_pRecentChannelsDict = new KviPointerHashTable; + m_pRecentChannelsDict = new KviPointerHashTable; m_pRecentChannelsDict->setAutoDelete(TRUE); - QString szChan,szNet; + TQString szChan,szNet; for ( - QStringList::Iterator it = KVI_OPTION_STRINGLIST(KviOption_stringlistRecentChannels).begin(); + TQStringList::Iterator it = KVI_OPTION_STRINGLIST(KviOption_stringlistRecentChannels).begin(); it != KVI_OPTION_STRINGLIST(KviOption_stringlistRecentChannels).end(); ++it ) @@ -1900,14 +1900,14 @@ void KviApp::buildRecentChannels() szNet = (*it).section( KVI_RECENT_CHANNELS_SEPARATOR, 1 ); if(!szNet.isEmpty()) { - QStringList* pList=m_pRecentChannelsDict->find(szNet.utf8().data()); + TQStringList* pList=m_pRecentChannelsDict->tqfind(szNet.utf8().data()); if(pList) { - if(!pList->contains(szChan)) pList->append(szChan); + if(!pList->tqcontains(szChan)) pList->append(szChan); } else { - pList=new QStringList(szChan); + pList=new TQStringList(szChan); m_pRecentChannelsDict->insert(szNet.utf8().data(),pList); } } @@ -1918,12 +1918,12 @@ void KviApp::buildRecentChannels() void KviApp::saveRecentChannels() { if(!m_pRecentChannelsDict) return; - QString szTmp; + TQString szTmp; KVI_OPTION_STRINGLIST(KviOption_stringlistRecentChannels).clear(); - KviPointerHashTableIterator it( *m_pRecentChannelsDict ); + KviPointerHashTableIterator it( *m_pRecentChannelsDict ); for( ; it.current(); ++it ) { - for ( QStringList::Iterator it_str = it.current()->begin(); it_str != it.current()->end(); ++it_str ) { + for ( TQStringList::Iterator it_str = it.current()->begin(); it_str != it.current()->end(); ++it_str ) { szTmp=*it_str; szTmp.append(KVI_RECENT_CHANNELS_SEPARATOR); szTmp.append(it.currentKey()); @@ -1932,14 +1932,14 @@ void KviApp::saveRecentChannels() } } -QStringList* KviApp::getRecentChannels(const QString& net) +TQStringList* KviApp::getRecentChannels(const TQString& net) { if(!m_pRecentChannelsDict) buildRecentChannels(); - return m_pRecentChannelsDict->find(net.utf8().data()); + return m_pRecentChannelsDict->tqfind(net.utf8().data()); } -void KviApp::addRecentServer(const QString& server) +void KviApp::addRecentServer(const TQString& server) { merge_to_stringlist_option(server,KviOption_stringlistRecentServers,KVI_MAX_RECENT_SERVERS); } @@ -1948,7 +1948,7 @@ void KviApp::fillRecentServersPopup(KviTalPopupMenu * m) { // FIXME: #warning "MAYBE DISABLE THE SERVERS THAT WE ARE ALREADY CONNECTED TO ?" m->clear(); - for(QStringList::Iterator it = KVI_OPTION_STRINGLIST(KviOption_stringlistRecentServers).begin(); it != KVI_OPTION_STRINGLIST(KviOption_stringlistRecentServers).end(); ++it) + for(TQStringList::Iterator it = KVI_OPTION_STRINGLIST(KviOption_stringlistRecentServers).begin(); it != KVI_OPTION_STRINGLIST(KviOption_stringlistRecentServers).end(); ++it) { m->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_SERVER)),*it); } @@ -1959,14 +1959,14 @@ void KviApp::fillRecentNicknamesPopup(KviTalPopupMenu * m,KviConsole * pConsole) m->clear(); int id; bool bAlreadyFound = false; - for(QStringList::Iterator it = KVI_OPTION_STRINGLIST(KviOption_stringlistRecentNicknames).begin(); it != KVI_OPTION_STRINGLIST(KviOption_stringlistRecentNicknames).end(); ++it) + for(TQStringList::Iterator it = KVI_OPTION_STRINGLIST(KviOption_stringlistRecentNicknames).begin(); it != KVI_OPTION_STRINGLIST(KviOption_stringlistRecentNicknames).end(); ++it) { id = m->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_NICK)),*it); if(!pConsole->isConnected())m->setItemEnabled(id,false); else { if(!bAlreadyFound) { - bool bIsCurrent = KviQString::equalCS(pConsole->connection()->currentNickName(),*it); + bool bIsCurrent = KviTQString::equalCS(pConsole->connection()->currentNickName(),*it); m->setItemEnabled(id,!bIsCurrent); if(bIsCurrent)bAlreadyFound = true; } @@ -1978,10 +1978,10 @@ void KviApp::fillRecentChannelsPopup(KviTalPopupMenu * m,KviConsole * pConsole) { m->clear(); int id; - QStringList* pList=getRecentChannels(pConsole->currentNetworkName()); + TQStringList* pList=getRecentChannels(pConsole->currentNetworkName()); if(pList) { - for(QStringList::Iterator it = pList->begin(); it != pList->end(); ++it) + for(TQStringList::Iterator it = pList->begin(); it != pList->end(); ++it) { id = m->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_CHANNEL)),*it); if(!pConsole->isConnected())m->setItemEnabled(id,false); @@ -1997,7 +1997,7 @@ void KviApp::fillRecentChannelsPopup(KviTalPopupMenu * m,KviConsole * pConsole) void KviApp::fillRecentServersListBox(KviTalListBox * l) { l->clear(); - for(QStringList::Iterator it = KVI_OPTION_STRINGLIST(KviOption_stringlistRecentServers).begin(); it != KVI_OPTION_STRINGLIST(KviOption_stringlistRecentServers).end(); ++it) + for(TQStringList::Iterator it = KVI_OPTION_STRINGLIST(KviOption_stringlistRecentServers).begin(); it != KVI_OPTION_STRINGLIST(KviOption_stringlistRecentServers).end(); ++it) l->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_SERVER)),*it); } */ @@ -2017,7 +2017,7 @@ bool KviApp::playFile(const char * filename,KviStr &error,KviWindow * w) if(szCommandline.hasData()) { KviKvsVariantList l; - l.append(new KviKvsVariant(QString(filename))); + l.append(new KviKvsVariant(TQString(filename))); if(!KviKvsScript::run(szCommandline.ptr(),w ? w : g_pActiveWindow,&l)) { @@ -2050,11 +2050,11 @@ void KviApp::heartbeat(kvi_time_t tNow) KviDoubleBuffer::heartbeat(); } -void KviApp::timerEvent(QTimerEvent *e) +void KviApp::timerEvent(TQTimerEvent *e) { if(e->timerId() != m_iHeartbeatTimerId) { - QObject::timerEvent(e); + TQT_BASE_OBJECT_NAME::timerEvent(e); return; } @@ -2065,7 +2065,7 @@ void KviApp::timerEvent(QTimerEvent *e) heartbeat(tNow); } -// qvariant.h uses this , and it is included by the qt generated moc file for Qt >= 3.0.0 +// qvariant.h uses this , and it is included by the qt generated tqmoc file for TQt >= 3.0.0 #ifdef Bool #undef Bool #endif diff --git a/src/kvirc/kernel/kvi_app.h b/src/kvirc/kernel/kvi_app.h index d31bd401..30e49f95 100644 --- a/src/kvirc/kernel/kvi_app.h +++ b/src/kvirc/kernel/kvi_app.h @@ -49,10 +49,10 @@ #endif // !COMPILE_NO_IPC class KviTalPopupMenu; -class QPixmap; +class TQPixmap; class KviTalListBox; -class QTextCodec; -class QDomElement; +class TQTextCodec; +class TQDomElement; class KviConsole; class KviConfig; @@ -63,10 +63,10 @@ class KviIrcServerDataBase; typedef struct _KviPendingAvatarChange { KviConsole * pConsole; - QString szRemoteUrl; - QString szNick; - QString szUser; - QString szHost; + TQString szRemoteUrl; + TQString szNick; + TQString szUser; + TQString szHost; } KviPendingAvatarChange; #ifdef Unsorted @@ -82,21 +82,22 @@ class KVIRC_API KviApp : public KviTalApplication friend class KviWindow; friend class KviSetupWizard; // this resides in a module! Q_OBJECT + TQ_OBJECT public: KviApp(int &argc,char ** argv); ~KviApp(); protected: // directories - QString m_szGlobalKvircDir; - QString m_szLocalKvircDir; + TQString m_szGlobalKvircDir; + TQString m_szLocalKvircDir; int m_iHeartbeatTimerId; bool m_bFirstTimeRun; KviWindow * m_pActiveWindow; bool m_bUpdateGuiPending; KviPointerList * m_pPendingAvatarChanges; bool m_bSetupDone; - KviPointerHashTable * m_pRecentChannelsDict; + KviPointerHashTable * m_pRecentChannelsDict; #ifdef COMPILE_PSEUDO_TRANSPARENCY bool m_bUpdatePseudoTransparencyPending; #endif @@ -105,7 +106,7 @@ protected: #endif public: // setup stuff (accessed from kvi_main.cpp: consider private othwerise) - QString m_szConfigFile; // setup + TQString m_szConfigFile; // setup bool m_bCreateConfig; // setup KviStr m_szExecAfterStartup; bool m_bShowSplashScreen; @@ -129,11 +130,11 @@ public: void getClipboardText(KviStr &buffer); void setClipboardText(const KviStr &str); - QString getClipboardText(); - void setClipboardText(const QString &str); + TQString getClipboardText(); + void setClipboardText(const TQString &str); - void collectGarbage(QObject * garbage); + void collectGarbage(TQObject * garbage); void destroyFrame(); void setup(); // THIS SHOULD BE PRIVATE! (but is accessed from kvi_main.cpp) @@ -142,7 +143,7 @@ public: void ipcMessage(char * message); #endif - //static QTextCodec * defaultTextCodec(); + //static TQTextCodec * defaultTextCodec(); //static const char * defaultTextEncoding(); static int getGloballyUniqueId(); // returns an unique integer identifier across the application @@ -178,22 +179,22 @@ public: void saveOptions(); void listAvailableOptions(KviWindow *wnd); - bool getOptionString(const char * optName,QString &buffer); - bool setOptionValue(const char * optName,const QString &value); + bool getOptionString(const char * optName,TQString &buffer); + bool setOptionValue(const char * optName,const TQString &value); void optionResetUpdate(int flags); void contextSensitiveHelp(); // kvi_app_fs.cpp : Filesystem thingies - void getGlobalKvircDirectory(QString &szData,KvircSubdir dir,const QString &appendFile = QString::null); - void getGlobalKvircDirectory(KviStr &szData,KvircSubdir dir,const QString &appendFile = QString::null); - void getLocalKvircDirectory(KviStr &szData,KvircSubdir dir,const QString &appendFile = QString::null,bool bCreateIfNeeded = true); - void getLocalKvircDirectory(QString &szData,KvircSubdir dir,const QString &appendFile = QString::null,bool bCreateIfNeeded = true); - void getTmpFileName(QString &szBuffer,const QString &szEndingFileName = QString::null); + void getGlobalKvircDirectory(TQString &szData,KvircSubdir dir,const TQString &appendFile = TQString()); + void getGlobalKvircDirectory(KviStr &szData,KvircSubdir dir,const TQString &appendFile = TQString()); + void getLocalKvircDirectory(KviStr &szData,KvircSubdir dir,const TQString &appendFile = TQString(),bool bCreateIfNeeded = true); + void getLocalKvircDirectory(TQString &szData,KvircSubdir dir,const TQString &appendFile = TQString(),bool bCreateIfNeeded = true); + void getTmpFileName(TQString &szBuffer,const TQString &szEndingFileName = TQString()); bool trashFile(const char *filename); - void getChannelDumpLogFileName(QString &str); + void getChannelDumpLogFileName(TQString &str); - static QTextCodec * defaultTextCodec(); + static TQTextCodec * defaultTextCodec(); // if the mediatype can be guessed ,it is looked up in the media type save path // if found , true is returned @@ -201,21 +202,21 @@ public: bool findFileByMediaType(KviStr &szRetPath,const char * filename); bool findImageInImageSearchPath(KviStr &szRetPath,const char * filename); - bool findImageInImageSearchPath(QString &szRetPath,const char * filename); + bool findImageInImageSearchPath(TQString &szRetPath,const char * filename); bool findUserFile(KviStr &szRetPath,const char *filename); bool findImage(KviStr &szRetPath,const char *filename); - bool findImage(QString &szRetPath,const char *filename); - bool findImageThemeOnlyCompat(QString &szRetPath,const char *filename); // temporary compat, will be removed soon (do not use) - bool findSmallIcon(QString &szRetPath,const char *filename); + bool findImage(TQString &szRetPath,const char *filename); + bool findImageThemeOnlyCompat(TQString &szRetPath,const char *filename); // temporary compat, will be removed soon (do not use) + bool findSmallIcon(TQString &szRetPath,const char *filename); // tries to map the full path filename to one of the KVIrc's mapped directories // if it doesn't succeed it just returns the complete filename in szRetPath bool mapImageFile(KviStr &szRetPath,const char * filename); - bool mapImageFile(QString &szRetPath,const char * filename); + bool mapImageFile(TQString &szRetPath,const char * filename); //void getDefaultDccSaveFilePath(KviStr &path,const char *filename); - void completeDirectory(const QString &word,KviPointerList * matches); + void completeDirectory(const TQString &word,KviPointerList * matches); // // Returns a config path suitable for reading (at least) // First lookups the user local config directory, @@ -226,14 +227,14 @@ public: // directory is used // bool getReadOnlyConfigPath(KviStr &buffer,const char *config_name,KvircSubdir sbd = Config,bool bNoFail = false); - bool getReadOnlyConfigPath(QString &buffer,const char *config_name,KvircSubdir sbd = Config,bool bNoFail = false); + bool getReadOnlyConfigPath(TQString &buffer,const char *config_name,KvircSubdir sbd = Config,bool bNoFail = false); // kvi_app.cpp : Window stuff KviWindow * findWindow(const char * windowId); - KviWindow * findWindowByCaption(const QString &windowCaption,int iContextId=-1); + KviWindow * findWindowByCaption(const TQString &windowCaption,int iContextId=-1); KviConsole * findConsole(unsigned int ircContextId); KviConsole * findConsole(KviStr & server,KviStr & nick); - KviConsole * findConsole(QString & servr,QString & nick); + KviConsole * findConsole(TQString & servr,TQString & nick); KviConsole * topmostConnectedConsole(); KviConsole * activeConsole(); bool windowExists(KviWindow *wnd); @@ -250,24 +251,24 @@ public: #endif // kvi_app.cpp : DCC (and CTCP AVATAR & SOUND) related stuff - void setAvatarOnFileReceived(KviConsole * pConsole,const QString &szRemoteUrl,const QString &szNick,const QString &szUser,const QString &szHost); - KviPendingAvatarChange * findPendingAvatarChange(KviConsole * pConsole,const QString &szNick,const QString &szRemoteUrl); - void fileDownloadTerminated(bool bSuccess,const QString &szRemoteUrl,const QString &szLocalFileName,const QString &szNick = QString::null,const QString &szError = QString::null,bool bQuiet = false); + void setAvatarOnFileReceived(KviConsole * pConsole,const TQString &szRemoteUrl,const TQString &szNick,const TQString &szUser,const TQString &szHost); + KviPendingAvatarChange * findPendingAvatarChange(KviConsole * pConsole,const TQString &szNick,const TQString &szRemoteUrl); + void fileDownloadTerminated(bool bSuccess,const TQString &szRemoteUrl,const TQString &szLocalFileName,const TQString &szNick = TQString(),const TQString &szError = TQString(),bool bQuiet = false); void setAvatarFromOptions(); bool playFile(const char * filename,KviStr &error,KviWindow * w = 0); // uMessageLifetime is in seconds! and 0 means "forever" - void notifierMessage(KviWindow * pWnd,int iIconId,const QString &szMsg,unsigned int uMessageLifetime); + void notifierMessage(KviWindow * pWnd,int iIconId,const TQString &szMsg,unsigned int uMessageLifetime); void addRecentNickname(const char * newNick); - void addRecentNickname(const QString& newNick); - void addRecentChannel(const QString& chan,const QString& net); - QStringList* getRecentChannels(const QString& net); + void addRecentNickname(const TQString& newNick); + void addRecentChannel(const TQString& chan,const TQString& net); + TQStringList* getRecentChannels(const TQString& net); - void addRecentServer(const QString& server); + void addRecentServer(const TQString& server); void fillRecentServersPopup(KviTalPopupMenu * m); void fillRecentNicknamesPopup(KviTalPopupMenu * m,KviConsole * pConsole); void fillRecentChannelsPopup(KviTalPopupMenu * m,KviConsole * pConsole); @@ -285,7 +286,7 @@ protected: void unregisterWindow(KviWindow *wnd); void frameDestructorCallback(); void heartbeat(kvi_time_t tNow); - virtual void timerEvent(QTimerEvent *e); + virtual void timerEvent(TQTimerEvent *e); public slots: // kvi_app.cpp : Slots void saveConfiguration(); @@ -294,7 +295,7 @@ public slots: void kdeRootPixmapChanged(int iDesktop); void updatePseudoTransparency(); void restoreDefaultScript(); - void addRecentUrl(const QString& text); + void addRecentUrl(const TQString& text); private: void createSplashScreen(); void destroySplashScreen(); @@ -303,8 +304,8 @@ private: void loadDirectories(); void findGlobalKvircDirectory(); bool findLocalKvircDirectory(); - bool checkGlobalKvircDirectory(const QString); - bool checkLocalKvircDirectory(const QString); + bool checkGlobalKvircDirectory(const TQString); + bool checkLocalKvircDirectory(const TQString); bool checkFileAssociations(); void setupFileAssociations(); @@ -317,7 +318,7 @@ private: void updateApplicationFont(); #ifdef COMPILE_PSEUDO_TRANSPARENCY - void createGlobalBackgrounds(QPixmap * pix); + void createGlobalBackgrounds(TQPixmap * pix); void destroyPseudoTransparency(); #ifdef COMPILE_KDE_SUPPORT void downloadKdeRootPixmap(); diff --git a/src/kvirc/kernel/kvi_app_fs.cpp b/src/kvirc/kernel/kvi_app_fs.cpp index ee5eacd3..61272d1b 100644 --- a/src/kvirc/kernel/kvi_app_fs.cpp +++ b/src/kvirc/kernel/kvi_app_fs.cpp @@ -35,18 +35,18 @@ #include "kvi_defaults.h" #include "kvi_iconmanager.h" -#include -#include -#include +#include +#include +#include extern KviMediaManager * g_pMediaManager; //============ getGlobalKvircDirectory ================// -void KviApp::getGlobalKvircDirectory(QString &szData,KvircSubdir dir,const QString &appendFile) +void KviApp::getGlobalKvircDirectory(TQString &szData,KvircSubdir dir,const TQString &appendFile) { szData=m_szGlobalKvircDir; - KviQString::ensureLastCharIs(szData,KVI_PATH_SEPARATOR_CHAR); + KviTQString::ensureLastCharIs(szData,KVI_PATH_SEPARATOR_CHAR); switch(dir) { @@ -58,23 +58,23 @@ void KviApp::getGlobalKvircDirectory(QString &szData,KvircSubdir dir,const QStri case Plugins : szData = "/opt/kde3/lib/kvirc/" KVI_VERSION_BRANCH "/modules"; break; case EasyPlugins : szData.append("easyplugins"); break; - case ConfigPlugins : KviQString::appendFormatted(szData,"config%smodules",KVI_PATH_SEPARATOR); break; - case ConfigScripts : KviQString::appendFormatted(szData,"config%sscripts",KVI_PATH_SEPARATOR); break; + case ConfigPlugins : KviTQString::appendFormatted(szData,"config%smodules",KVI_PATH_SEPARATOR); break; + case ConfigScripts : KviTQString::appendFormatted(szData,"config%sscripts",KVI_PATH_SEPARATOR); break; case Help : szData.append("help"); { // Localized help - QString tmp(KviLocale::localeName().ptr()); + TQString tmp(KviLocale::localeName().ptr()); tmp.prepend(KVI_PATH_SEPARATOR_CHAR); tmp.prepend(szData); if(KviFileUtils::directoryExists(tmp))szData = tmp; else { - tmp = szData; KviQString::appendFormatted(tmp,"%sen",KVI_PATH_SEPARATOR); + tmp = szData; KviTQString::appendFormatted(tmp,"%sen",KVI_PATH_SEPARATOR); if(KviFileUtils::directoryExists(tmp))szData = tmp; } } break; - case HelpEN : KviQString::appendFormatted(szData,"help%sen",KVI_PATH_SEPARATOR); break; + case HelpEN : KviTQString::appendFormatted(szData,"help%sen",KVI_PATH_SEPARATOR); break; case HelpNoIntl : szData.append("help"); break; case Log : debug("WARNING Global log directory requested!"); break; case Incoming : debug("WARNING Global incoming directory requested!"); break; @@ -97,17 +97,17 @@ void KviApp::getGlobalKvircDirectory(QString &szData,KvircSubdir dir,const QStri if(!appendFile.isEmpty()) { - KviQString::ensureLastCharIs(szData,KVI_PATH_SEPARATOR_CHAR); + KviTQString::ensureLastCharIs(szData,KVI_PATH_SEPARATOR_CHAR); szData.append(appendFile); } KviFileUtils::adjustFilePath(szData); } -void KviApp::getLocalKvircDirectory(QString &szData,KvircSubdir dir,const QString & appendFile,bool bCreateIfNeeded) +void KviApp::getLocalKvircDirectory(TQString &szData,KvircSubdir dir,const TQString & appendFile,bool bCreateIfNeeded) { szData=m_szLocalKvircDir; - KviQString::ensureLastCharIs(szData,KVI_PATH_SEPARATOR_CHAR); + KviTQString::ensureLastCharIs(szData,KVI_PATH_SEPARATOR_CHAR); switch(dir) { @@ -123,13 +123,13 @@ void KviApp::getLocalKvircDirectory(QString &szData,KvircSubdir dir,const QStrin // we should take special care here // the user is likely to mess the path behind our back // try to recover from most common problems - while(KviQString::lastCharIs(szData,KVI_PATH_SEPARATOR_CHAR)) + while(KviTQString::lastCharIs(szData,KVI_PATH_SEPARATOR_CHAR)) szData = szData.remove(szData.length()-1,1); if(szData.isEmpty()) { // unset ? - KVI_OPTION_STRING(KviOption_stringIncomingPath) = QDir::homeDirPath(); - if(!KVI_OPTION_STRING(KviOption_stringIncomingPath).endsWith(QString(QChar(KVI_PATH_SEPARATOR_CHAR)))) + KVI_OPTION_STRING(KviOption_stringIncomingPath) = TQDir::homeDirPath(); + if(!KVI_OPTION_STRING(KviOption_stringIncomingPath).endsWith(TQString(TQChar(KVI_PATH_SEPARATOR_CHAR)))) KVI_OPTION_STRING(KviOption_stringIncomingPath).append(KVI_PATH_SEPARATOR_CHAR); KVI_OPTION_STRING(KviOption_stringIncomingPath).append(KVI_DEFAULT_INCOMING_SUBDIRECTORY_NAME); } @@ -138,7 +138,7 @@ void KviApp::getLocalKvircDirectory(QString &szData,KvircSubdir dir,const QStrin szData.append("help"); { // Localized help - QString tmp = KviLocale::localeName().ptr(); + TQString tmp = KviLocale::localeName().ptr(); tmp.prepend(KVI_PATH_SEPARATOR_CHAR); tmp.prepend(szData); if(KviFileUtils::directoryExists(tmp))szData = tmp; @@ -171,7 +171,7 @@ void KviApp::getLocalKvircDirectory(QString &szData,KvircSubdir dir,const QStrin if(!appendFile.isEmpty()) { - KviQString::ensureLastCharIs(szData,KVI_PATH_SEPARATOR_CHAR); + KviTQString::ensureLastCharIs(szData,KVI_PATH_SEPARATOR_CHAR); szData.append(appendFile); } @@ -179,9 +179,9 @@ void KviApp::getLocalKvircDirectory(QString &szData,KvircSubdir dir,const QStrin } -void KviApp::getGlobalKvircDirectory(KviStr &szData,KvircSubdir dir,const QString &appendFile) +void KviApp::getGlobalKvircDirectory(KviStr &szData,KvircSubdir dir,const TQString &appendFile) { - QString szBuffer = szData.ptr(); + TQString szBuffer = szData.ptr(); getGlobalKvircDirectory(szBuffer,dir,appendFile); szData=szBuffer; @@ -189,26 +189,26 @@ void KviApp::getGlobalKvircDirectory(KviStr &szData,KvircSubdir dir,const QStrin //=============== getLocalKvircDirectory ================// -void KviApp::getLocalKvircDirectory(KviStr &szData,KvircSubdir dir,const QString &appendFile,bool bCreateIfNeeded) +void KviApp::getLocalKvircDirectory(KviStr &szData,KvircSubdir dir,const TQString &appendFile,bool bCreateIfNeeded) { - QString szBuffer = szData.ptr(); + TQString szBuffer = szData.ptr(); getLocalKvircDirectory(szBuffer,dir,appendFile,bCreateIfNeeded); szData=szBuffer; } -void KviApp::getTmpFileName(QString &szBuffer,const QString &szEndingFileName) +void KviApp::getTmpFileName(TQString &szBuffer,const TQString &szEndingFileName) { - QString tmp; + TQString tmp; getLocalKvircDirectory(tmp,Tmp); - KviQString::ensureLastCharIs(tmp,KVI_PATH_SEPARATOR_CHAR); + KviTQString::ensureLastCharIs(tmp,KVI_PATH_SEPARATOR_CHAR); struct timeval tmv; kvi_gettimeofday(&tmv,0); - QString szFileName = szEndingFileName.isNull() ? QString("file.tmp") : szEndingFileName; + TQString szFileName = szEndingFileName.isNull() ? TQString("file.tmp") : szEndingFileName; do { szBuffer = tmp; - KviQString::appendFormatted(szBuffer,"kvirc_%d_%Q",tmv.tv_usec,&szFileName); + KviTQString::appendFormatted(szBuffer,"kvirc_%d_%Q",tmv.tv_usec,&szFileName); tmv.tv_usec++; } while(KviFileUtils::fileExists(szBuffer)); } @@ -221,14 +221,14 @@ void KviApp::getTmpFileName(QString &szBuffer,const QString &szEndingFileName) bool KviApp::trashFile(const char *filename) { // Exists ? - QFileInfo fi = QFileInfo(QString::fromUtf8(filename)); + TQFileInfo fi = TQFileInfo(TQString::fromUtf8(filename)); if( !fi.exists() ) return false; // nothing to trash // Build the filename KviStr lastPart = filename; lastPart.cutToLast(KVI_PATH_SEPARATOR_CHAR); // need only the filename lastPart.append(".bak_"); - QDateTime tm(QDateTime::currentDateTime()); + TQDateTime tm(TQDateTime::tqcurrentDateTime()); lastPart.append(tm.toString()); lastPart.replaceAll(' ',"_"); // Ok...have lastPart.bak_Dec_11_31_1999 @@ -246,31 +246,31 @@ bool KviApp::trashFile(const char *filename) return KviFileUtils::renameFile(filename,trashFile.ptr()); } -void KviApp::completeDirectory(const QString &word,KviPointerList * matches) +void KviApp::completeDirectory(const TQString &word,KviPointerList * matches) { - QString szDir = word; - QString szFile = word; - KviQString::cutToLast(szFile,KVI_PATH_SEPARATOR_CHAR); - KviQString::cutFromLast(szDir,KVI_PATH_SEPARATOR_CHAR); + TQString szDir = word; + TQString szFile = word; + KviTQString::cutToLast(szFile,KVI_PATH_SEPARATOR_CHAR); + KviTQString::cutFromLast(szDir,KVI_PATH_SEPARATOR_CHAR); KviFileUtils::adjustFilePath(szDir); - KviQString::ensureLastCharIs(szDir,KVI_PATH_SEPARATOR_CHAR); - QDir d(szDir); + KviTQString::ensureLastCharIs(szDir,KVI_PATH_SEPARATOR_CHAR); + TQDir d(szDir); // FIXME: maybe check timestamps ? (old modules) - QStringList sl = d.entryList(QDir::Dirs); - QStringList::Iterator it; + TQStringList sl = d.entryList(TQDir::Dirs); + TQStringList::Iterator it; for(it = sl.begin();it != sl.end();++it) { - QString * t = new QString(*it); - if(KviQString::equalCS(*t,".") || KviQString::equalCS(*t,"..")) + TQString * t = new TQString(*it); + if(KviTQString::equalCS(*t,".") || KviTQString::equalCS(*t,"..")) { delete t; } else { #ifdef COMPILE_ON_WINDOWS - if(KviQString::equalCIN(szFile,*t,szFile.length())) + if(KviTQString::equalCIN(szFile,*t,szFile.length())) #else //!COMPILE_ON_WINDOWS - if(KviQString::equalCSN(szFile,*t,szFile.length())) + if(KviTQString::equalCSN(szFile,*t,szFile.length())) #endif //COMPILE_ON_WINDOWS { t->prepend(szDir); @@ -282,15 +282,15 @@ void KviApp::completeDirectory(const QString &word,KviPointerList * mat } } - sl = d.entryList(QDir::Files); + sl = d.entryList(TQDir::Files); for(it = sl.begin();it != sl.end();++it) { - QString * t = new QString(*it); + TQString * t = new TQString(*it); #ifdef COMPILE_ON_WINDOWS - if(KviQString::equalCIN(szFile,*t,szFile.length())) + if(KviTQString::equalCIN(szFile,*t,szFile.length())) #else //!COMPILE_ON_WINDOWS - if(KviQString::equalCSN(szFile,*t,szFile.length())) + if(KviTQString::equalCSN(szFile,*t,szFile.length())) #endif //COMPILE_ON_WINDOWS { t->prepend(szDir); @@ -307,13 +307,13 @@ void KviApp::completeDirectory(const QString &word,KviPointerList * mat // Returns a valid filename for the channel dump log // -void KviApp::getChannelDumpLogFileName(QString &str) +void KviApp::getChannelDumpLogFileName(TQString &str) { unsigned int logN = 0; - QString fPrefix="kick_"; + TQString fPrefix="kick_"; do{ - QString fName; - KviQString::sprintf(fName,"%Q%u.log",&fPrefix,logN); + TQString fName; + KviTQString::sprintf(fName,"%Q%u.log",&fPrefix,logN); getLocalKvircDirectory(str,Log,fName); logN++; if(logN > 9999) @@ -346,7 +346,7 @@ bool KviApp::findFileByMediaType(KviStr &szRetPath,const char * filename) { g_pMediaManager->unlock(); //if(retMediaType)*retMediaType = mt; - QString szTmp = szRetPath.ptr(); // FIXME + TQString szTmp = szRetPath.ptr(); // FIXME KviFileUtils::adjustFilePath(szTmp); szRetPath = szTmp; return true; @@ -373,7 +373,7 @@ bool KviApp::findUserFile(KviStr &szRetPath,const char *filename) if(kvi_isAbsolutePath(filename)) { szRetPath=filename; - QString szTmp = szRetPath.ptr(); // FIXME + TQString szTmp = szRetPath.ptr(); // FIXME KviFileUtils::adjustFilePath(szTmp); szRetPath = szTmp; return KviFileUtils::fileExists(filename); @@ -402,7 +402,7 @@ bool KviApp::findUserFile(KviStr &szRetPath,const char *filename) if(findImageInImageSearchPath(szRetPath,filename))return true; // Last resort ... - szRetPath = QDir::homeDirPath(); + szRetPath = TQDir::homeDirPath(); szRetPath.ensureLastCharIs(KVI_PATH_SEPARATOR_CHAR); szRetPath.append(filename); if(KviFileUtils::fileExists(szRetPath.ptr()))return true;; @@ -430,7 +430,7 @@ bool KviApp::findUserFile(KviStr &szRetPath,const char *filename) bool KviApp::findImageInImageSearchPath(KviStr &szRetPath,const char * filename) { // first lookup the user defined paths - for(QStringList::Iterator it = KVI_OPTION_STRINGLIST(KviOption_stringlistImageSearchPaths).begin(); + for(TQStringList::Iterator it = KVI_OPTION_STRINGLIST(KviOption_stringlistImageSearchPaths).begin(); it != KVI_OPTION_STRINGLIST(KviOption_stringlistImageSearchPaths).end();++it) { szRetPath = *it; @@ -443,14 +443,14 @@ bool KviApp::findImageInImageSearchPath(KviStr &szRetPath,const char * filename) return false; } -bool KviApp::findImageInImageSearchPath(QString &szRetPath,const char * filename) +bool KviApp::findImageInImageSearchPath(TQString &szRetPath,const char * filename) { // first lookup the user defined paths - for(QStringList::Iterator it = KVI_OPTION_STRINGLIST(KviOption_stringlistImageSearchPaths).begin(); + for(TQStringList::Iterator it = KVI_OPTION_STRINGLIST(KviOption_stringlistImageSearchPaths).begin(); it != KVI_OPTION_STRINGLIST(KviOption_stringlistImageSearchPaths).end();++it) { szRetPath = *it; - KviQString::ensureLastCharIs(szRetPath,KVI_PATH_SEPARATOR_CHAR); + KviTQString::ensureLastCharIs(szRetPath,KVI_PATH_SEPARATOR_CHAR); szRetPath.append(filename); //debug("LOOK FOR %s",szRetPath.ptr()); if(KviFileUtils::fileExists(szRetPath))return true; @@ -464,13 +464,13 @@ static KviApp::KvircSubdir pics_globalsubdirs[2]={ KviApp::Pics , KviApp::Avatar bool KviApp::mapImageFile(KviStr &szRetPath,const char * filename) { - QString buff; + TQString buff; bool ret=mapImageFile(buff,filename); szRetPath=buff; return ret; } -bool KviApp::mapImageFile(QString &szRetPath,const char * filename) +bool KviApp::mapImageFile(TQString &szRetPath,const char * filename) { szRetPath = filename; // can't map non absolute paths @@ -478,15 +478,15 @@ bool KviApp::mapImageFile(QString &szRetPath,const char * filename) // can't map non existing paths if(!KviFileUtils::fileExists(filename))return false; - QFileInfo fi = QFileInfo(QString::fromUtf8(filename)); + TQFileInfo fi = TQFileInfo(TQString::fromUtf8(filename)); unsigned int size = fi.size(); KviStr szBestMatch; - while(szRetPath.find(KVI_PATH_SEPARATOR) != -1) + while(szRetPath.tqfind(KVI_PATH_SEPARATOR) != -1) { - KviQString::cutToFirst(szRetPath,KVI_PATH_SEPARATOR); + KviTQString::cutToFirst(szRetPath,KVI_PATH_SEPARATOR); if(szRetPath.isEmpty())break; @@ -499,7 +499,7 @@ bool KviApp::mapImageFile(QString &szRetPath,const char * filename) getLocalKvircDirectory(szBuffer,pics_localsubdirs[i],szRetPath); if(KviFileUtils::fileExists(szBuffer.ptr())) { - QFileInfo fi2(QString::fromUtf8(szBuffer.ptr())); + TQFileInfo fi2(TQString::fromUtf8(szBuffer.ptr())); if(size == fi2.size()) { // probably the same file @@ -514,7 +514,7 @@ bool KviApp::mapImageFile(QString &szRetPath,const char * filename) //debug("CHECK %s",szBuffer.ptr()); if(KviFileUtils::fileExists(szBuffer.ptr())) { - QFileInfo fi2(QString::fromUtf8(szBuffer.ptr())); + TQFileInfo fi2(TQString::fromUtf8(szBuffer.ptr())); if(size == fi2.size()) { // probably the same file @@ -524,12 +524,12 @@ bool KviApp::mapImageFile(QString &szRetPath,const char * filename) } // Last resort - szBuffer = QDir::homeDirPath(); + szBuffer = TQDir::homeDirPath(); szBuffer.ensureLastCharIs(KVI_PATH_SEPARATOR_CHAR); szBuffer.append(szRetPath); if(KviFileUtils::fileExists(szBuffer.ptr())) { - QFileInfo fi2(QString::fromUtf8(szBuffer.ptr())); + TQFileInfo fi2(TQString::fromUtf8(szBuffer.ptr())); if(size == fi2.size()) { // prolly the same file @@ -553,13 +553,13 @@ bool KviApp::mapImageFile(QString &szRetPath,const char * filename) bool KviApp::findImage(KviStr &szRetPath,const char *filename) { - QString buff; + TQString buff; bool ret=findImage(buff,filename); szRetPath=buff; return ret; } -bool KviApp::findImage(QString &szRetPath,const char *filename) +bool KviApp::findImage(TQString &szRetPath,const char *filename) { // Find an user file... if(kvi_isAbsolutePath(filename)) @@ -571,7 +571,7 @@ bool KviApp::findImage(QString &szRetPath,const char *filename) // if we have a theme, look it up as first if(!KVI_OPTION_STRING(KviOption_stringIconThemeSubdir).isEmpty()) { - QString szTmp = KVI_OPTION_STRING(KviOption_stringIconThemeSubdir); + TQString szTmp = KVI_OPTION_STRING(KviOption_stringIconThemeSubdir); szTmp.append(KVI_PATH_SEPARATOR_CHAR); szTmp.append(filename); @@ -599,8 +599,8 @@ bool KviApp::findImage(QString &szRetPath,const char *filename) if(findImageInImageSearchPath(szRetPath,filename))return true; // Last resort - szRetPath = QDir::homeDirPath(); - KviQString::ensureLastCharIs(szRetPath,KVI_PATH_SEPARATOR_CHAR); + szRetPath = TQDir::homeDirPath(); + KviTQString::ensureLastCharIs(szRetPath,KVI_PATH_SEPARATOR_CHAR); szRetPath.append(filename); if(KviFileUtils::fileExists(szRetPath))return true; @@ -609,12 +609,12 @@ bool KviApp::findImage(QString &szRetPath,const char *filename) return false; } -bool KviApp::findImageThemeOnlyCompat(QString &szRetPath,const char *filename) +bool KviApp::findImageThemeOnlyCompat(TQString &szRetPath,const char *filename) { // if we have a theme, look it up as first if(!KVI_OPTION_STRING(KviOption_stringIconThemeSubdir).isEmpty()) { - QString szTmp = KVI_OPTION_STRING(KviOption_stringIconThemeSubdir); + TQString szTmp = KVI_OPTION_STRING(KviOption_stringIconThemeSubdir); szTmp.append(KVI_PATH_SEPARATOR_CHAR); szTmp.append(filename); @@ -636,7 +636,7 @@ bool KviApp::findImageThemeOnlyCompat(QString &szRetPath,const char *filename) return false; } -bool KviApp::findSmallIcon(QString &szRetPath,const char *filename) +bool KviApp::findSmallIcon(TQString &szRetPath,const char *filename) { // this is a bit optimized for the small builtin icons // looks up less places. @@ -651,7 +651,7 @@ bool KviApp::findSmallIcon(QString &szRetPath,const char *filename) // if we have a theme, look it up as first if(!KVI_OPTION_STRING(KviOption_stringIconThemeSubdir).isEmpty()) { - QString szTmp = KVI_OPTION_STRING(KviOption_stringIconThemeSubdir); + TQString szTmp = KVI_OPTION_STRING(KviOption_stringIconThemeSubdir); szTmp.append(KVI_PATH_SEPARATOR_CHAR); szTmp.append(KVI_SMALLICONS_SUBDIRECTORY); szTmp.append(KVI_PATH_SEPARATOR_CHAR); @@ -680,8 +680,8 @@ bool KviApp::findSmallIcon(QString &szRetPath,const char *filename) if(findImageInImageSearchPath(szRetPath,filename))return true; // Last resort... bleah :/ - szRetPath = QDir::homeDirPath(); - KviQString::ensureLastCharIs(szRetPath,KVI_PATH_SEPARATOR_CHAR); + szRetPath = TQDir::homeDirPath(); + KviTQString::ensureLastCharIs(szRetPath,KVI_PATH_SEPARATOR_CHAR); szRetPath.append(filename); if(KviFileUtils::fileExists(szRetPath))return true; @@ -699,13 +699,13 @@ bool KviApp::findSmallIcon(QString &szRetPath,const char *filename) bool KviApp::getReadOnlyConfigPath(KviStr &buffer,const char *config_name,KvircSubdir sbd,bool bNoFail) { // DEPRECATED - QString tmp; + TQString tmp; bool bRet = getReadOnlyConfigPath(tmp,config_name,sbd,bNoFail); buffer = tmp; return bRet; } -bool KviApp::getReadOnlyConfigPath(QString &buffer,const char *config_name,KvircSubdir sbd,bool bNoFail) +bool KviApp::getReadOnlyConfigPath(TQString &buffer,const char *config_name,KvircSubdir sbd,bool bNoFail) { // Take a look in the local directory.... getLocalKvircDirectory(buffer,sbd,config_name); @@ -713,7 +713,7 @@ bool KviApp::getReadOnlyConfigPath(QString &buffer,const char *config_name,Kvirc if(!KviFileUtils::fileExists(buffer)) { // No saved config yet... check for defaults - QString tmp; + TQString tmp; getGlobalKvircDirectory(tmp,sbd,config_name); if(!KviFileUtils::fileExists(tmp)) { diff --git a/src/kvirc/kernel/kvi_app_setup.cpp b/src/kvirc/kernel/kvi_app_setup.cpp index 1c9f3886..4d2f255f 100644 --- a/src/kvirc/kernel/kvi_app_setup.cpp +++ b/src/kvirc/kernel/kvi_app_setup.cpp @@ -27,7 +27,7 @@ //#define _KVI_DEBUG_CHECK_RANGE_ //#include "kvi_debug.h" -#include +#include #include "kvi_settings.h" #include "kvi_defaults.h" @@ -62,9 +62,9 @@ #endif //COMPILE_ON_WINDOWS -#include -#include -#include +#include +#include +#include @@ -76,14 +76,14 @@ // and if it is not found , ask the user to choose one // -bool KviApp::checkGlobalKvircDirectory(const QString dir) +bool KviApp::checkGlobalKvircDirectory(const TQString dir) { //First check if the help subdir exists - QString szDir2 = dir; + TQString szDir2 = dir; szDir2+=KVI_PATH_SEPARATOR"help"; if(!KviFileUtils::directoryExists(szDir2))return false; //Then check if the pics subdir exists - QString szDir = dir; + TQString szDir = dir; szDir+=KVI_PATH_SEPARATOR"pics"; if(!KviFileUtils::directoryExists(szDir))return false; //Now make sure that it is the dir that we're looking for. @@ -93,13 +93,13 @@ bool KviApp::checkGlobalKvircDirectory(const QString dir) return KviFileUtils::isReadable(szDir); } -bool KviApp::checkLocalKvircDirectory(const QString szDir) +bool KviApp::checkLocalKvircDirectory(const TQString szDir) { //First check if the dir exists if(!KviFileUtils::directoryExists(szDir))return false; - if(!QFileInfo(szDir).isWritable()) return false; + if(!TQFileInfo(szDir).isWritable()) return false; - QString szBuff; + TQString szBuff; getLocalKvircDirectory(szBuff,Config); if(!KviFileUtils::directoryExists(szBuff)) return false; @@ -109,9 +109,9 @@ bool KviApp::checkLocalKvircDirectory(const QString szDir) bool KviApp::checkFileAssociations() { #ifdef COMPILE_ON_WINDOWS -#define QUERY_BUFFER 2048 +#define TQUERY_BUFFER 2048 char* buffer; - DWORD len = QUERY_BUFFER; + DWORD len = TQUERY_BUFFER; DWORD err; buffer = (char*)malloc(len*sizeof(char)); HKEY hKey; @@ -130,7 +130,7 @@ bool KviApp::checkFileAssociations() } } - len = QUERY_BUFFER; + len = TQUERY_BUFFER; if(RegOpenKeyEx(HKEY_CLASSES_ROOT,"KVIrcScript",0,KEY_READ,&hKey) != ERROR_SUCCESS ) return false; @@ -145,7 +145,7 @@ bool KviApp::checkFileAssociations() } } - len = QUERY_BUFFER; + len = TQUERY_BUFFER; if(RegOpenKeyEx(HKEY_CLASSES_ROOT,"KVIrcScript\\DefaultIcon",0,KEY_READ,&hKey) != ERROR_SUCCESS ) return false; @@ -154,15 +154,15 @@ bool KviApp::checkFileAssociations() free(buffer); return false; } else { - QString szIcon = applicationFilePath()+",1"; - szIcon.replace('/',"\\"); + TQString szIcon = applicationFilePath()+",1"; + szIcon.tqreplace('/',"\\"); if(!kvi_strEqualCI(szIcon.local8Bit().data(),buffer)){ free(buffer); return false; } } - len = QUERY_BUFFER; + len = TQUERY_BUFFER; if(RegOpenKeyEx(HKEY_CLASSES_ROOT,"KVIrcScript\\Shell\\Parse",0,KEY_READ,&hKey) != ERROR_SUCCESS ) return false; @@ -177,7 +177,7 @@ bool KviApp::checkFileAssociations() } } - len = QUERY_BUFFER; + len = TQUERY_BUFFER; if(RegOpenKeyEx(HKEY_CLASSES_ROOT,"KVIrcScript\\Shell\\Parse\\command",0,KEY_READ,&hKey) != ERROR_SUCCESS ) return false; @@ -186,8 +186,8 @@ bool KviApp::checkFileAssociations() free(buffer); return false; } else { - QString szCmd = applicationFilePath()+" \"%1\""; - szCmd.replace('/',"\\"); + TQString szCmd = applicationFilePath()+" \"%1\""; + szCmd.tqreplace('/',"\\"); if(!kvi_strEqualCI(szCmd.local8Bit().data(),buffer)) { free(buffer); return false; @@ -210,7 +210,7 @@ bool KviApp::checkFileAssociations() } } - len = QUERY_BUFFER; + len = TQUERY_BUFFER; if(RegOpenKeyEx(HKEY_CLASSES_ROOT,"KVIrcConfig",0,KEY_READ,&hKey) != ERROR_SUCCESS ) return false; @@ -229,7 +229,7 @@ bool KviApp::checkFileAssociations() } } - len = QUERY_BUFFER; + len = TQUERY_BUFFER; if(RegOpenKeyEx(HKEY_CLASSES_ROOT,"KVIrcAddon",0,KEY_READ,&hKey) != ERROR_SUCCESS ) return false; //Theme @@ -247,7 +247,7 @@ bool KviApp::checkFileAssociations() } } - len = QUERY_BUFFER; + len = TQUERY_BUFFER; if(RegOpenKeyEx(HKEY_CLASSES_ROOT,"KVIrcTheme",0,KEY_READ,&hKey) != ERROR_SUCCESS ) return false; @@ -261,9 +261,9 @@ bool KviApp::checkFileAssociations() bool KviApp::checkUriAssociations(char * proto) { #ifdef COMPILE_ON_WINDOWS -#define QUERY_BUFFER 2048 +#define TQUERY_BUFFER 2048 char* buffer; - DWORD len = QUERY_BUFFER; + DWORD len = TQUERY_BUFFER; DWORD err; buffer = (char*)malloc(len*sizeof(char)); HKEY hKey; @@ -272,7 +272,7 @@ bool KviApp::checkUriAssociations(char * proto) KviStr key=storedKey; - len = QUERY_BUFFER; + len = TQUERY_BUFFER; if(RegOpenKeyEx(HKEY_CLASSES_ROOT,key,0,KEY_READ,&hKey) != ERROR_SUCCESS ) return false; @@ -287,7 +287,7 @@ bool KviApp::checkUriAssociations(char * proto) } } - len = QUERY_BUFFER; + len = TQUERY_BUFFER; if( (err=RegQueryValueEx( hKey,"URL Protocol",0,0,(LPBYTE)buffer,&len)) != ERROR_SUCCESS) { free(buffer); @@ -295,7 +295,7 @@ bool KviApp::checkUriAssociations(char * proto) } key = storedKey+"\\DefaultIcon"; - len = QUERY_BUFFER; + len = TQUERY_BUFFER; if(RegOpenKeyEx(HKEY_CLASSES_ROOT,key,0,KEY_READ,&hKey) != ERROR_SUCCESS ) return false; @@ -304,15 +304,15 @@ bool KviApp::checkUriAssociations(char * proto) free(buffer); return false; } else { - QString szIcon = applicationFilePath()+",0"; - szIcon.replace('/',"\\"); + TQString szIcon = applicationFilePath()+",0"; + szIcon.tqreplace('/',"\\"); if(!kvi_strEqualCI(szIcon.local8Bit().data(),buffer)){ free(buffer); return false; } } - len = QUERY_BUFFER; + len = TQUERY_BUFFER; key = storedKey+"\\Shell\\open"; if(RegOpenKeyEx(HKEY_CLASSES_ROOT,key,0,KEY_READ,&hKey) != ERROR_SUCCESS ) return false; @@ -328,7 +328,7 @@ bool KviApp::checkUriAssociations(char * proto) } } - len = QUERY_BUFFER; + len = TQUERY_BUFFER; key = storedKey+"\\Shell\\open\\command"; if(RegOpenKeyEx(HKEY_CLASSES_ROOT,key,0,KEY_READ,&hKey) != ERROR_SUCCESS ) return false; @@ -338,8 +338,8 @@ bool KviApp::checkUriAssociations(char * proto) free(buffer); return false; } else { - QString szCmd = applicationFilePath()+" \"%1\""; - szCmd.replace('/',"\\"); + TQString szCmd = applicationFilePath()+" \"%1\""; + szCmd.tqreplace('/',"\\"); if(!kvi_strEqualCI(szCmd.local8Bit().data(),buffer)) { free(buffer); return false; @@ -363,9 +363,9 @@ void KviApp::setupUriAssociations(char * proto) KviStr key=storedKey; - KviQCString tmp; - QString appPath = applicationFilePath(); - appPath.replace('/',"\\"); + KviTQCString tmp; + TQString appPath = applicationFilePath(); + appPath.tqreplace('/',"\\"); SHDeleteKey(HKEY_CLASSES_ROOT,key); @@ -375,7 +375,7 @@ void KviApp::setupUriAssociations(char * proto) key=storedKey+"\\DefaultIcon"; RegCreateKeyEx(HKEY_CLASSES_ROOT,key,0,0,0,KEY_WRITE,0,&hKey,0); - tmp=QString(appPath+",0").local8Bit(); + tmp=TQString(appPath+",0").local8Bit(); RegSetValueEx( hKey,0,0,REG_SZ,(LPBYTE)tmp.data(),tmp.length()); key=storedKey+"\\Shell\\open"; @@ -385,7 +385,7 @@ void KviApp::setupUriAssociations(char * proto) key=storedKey+"\\Shell\\open\\command"; RegCreateKeyEx(HKEY_CLASSES_ROOT,key,0,0,0,KEY_WRITE,0,&hKey,0); - tmp=QString(appPath+" \"%1\"").local8Bit(); + tmp=TQString(appPath+" \"%1\"").local8Bit(); RegSetValueEx( hKey,0,0,REG_SZ,(LPBYTE)tmp.data(),tmp.length()); #endif @@ -397,9 +397,9 @@ void KviApp::setupFileAssociations() HKEY hKey; DWORD err; - KviQCString tmp; - QString appPath = applicationFilePath(); - appPath.replace('/',"\\"); + KviTQCString tmp; + TQString appPath = applicationFilePath(); + appPath.tqreplace('/',"\\"); SHDeleteKey(HKEY_CLASSES_ROOT,".kvs"); @@ -413,7 +413,7 @@ void KviApp::setupFileAssociations() RegSetValueEx( hKey,0,0,REG_SZ,(LPBYTE)tmp.data(),tmp.length()); RegCreateKeyEx(HKEY_CLASSES_ROOT,"KVIrcScript\\DefaultIcon",0,0,0,KEY_WRITE,0,&hKey,0); - tmp=QString(appPath+",1").local8Bit(); + tmp=TQString(appPath+",1").local8Bit(); RegSetValueEx( hKey,0,0,REG_SZ,(LPBYTE)tmp.data(),tmp.length()); RegCreateKeyEx(HKEY_CLASSES_ROOT,"KVIrcScript\\Shell\\Parse",0,0,0,KEY_WRITE,0,&hKey,0); @@ -421,7 +421,7 @@ void KviApp::setupFileAssociations() RegSetValueEx( hKey,0,0,REG_SZ,(LPBYTE)tmp.data(),tmp.length()); RegCreateKeyEx(HKEY_CLASSES_ROOT,"KVIrcScript\\Shell\\Parse\\command",0,0,0,KEY_WRITE,0,&hKey,0); - tmp=QString(appPath+" \"%1\"").local8Bit(); + tmp=TQString(appPath+" \"%1\"").local8Bit(); RegSetValueEx( hKey,0,0,REG_SZ,(LPBYTE)tmp.data(),tmp.length()); //Configs @@ -437,7 +437,7 @@ void KviApp::setupFileAssociations() RegSetValueEx( hKey,0,0,REG_SZ,(LPBYTE)tmp.data(),tmp.length()); RegCreateKeyEx(HKEY_CLASSES_ROOT,"KVIrcConfig\\DefaultIcon",0,0,0,KEY_WRITE,0,&hKey,0); - tmp=QString(appPath+",2").local8Bit(); + tmp=TQString(appPath+",2").local8Bit(); RegSetValueEx( hKey,0,0,REG_SZ,(LPBYTE)tmp.data(),tmp.length()); // Themes @@ -454,7 +454,7 @@ void KviApp::setupFileAssociations() RegSetValueEx( hKey,0,0,REG_SZ,(LPBYTE)tmp.data(),tmp.length()); RegCreateKeyEx(HKEY_CLASSES_ROOT,"KVIrcTheme\\DefaultIcon",0,0,0,KEY_WRITE,0,&hKey,0); - tmp=QString(appPath+",3").local8Bit(); + tmp=TQString(appPath+",3").local8Bit(); RegSetValueEx( hKey,0,0,REG_SZ,(LPBYTE)tmp.data(),tmp.length()); RegCreateKeyEx(HKEY_CLASSES_ROOT,"KVIrcTheme\\Shell\\Install",0,0,0,KEY_WRITE,0,&hKey,0); @@ -462,7 +462,7 @@ void KviApp::setupFileAssociations() RegSetValueEx( hKey,0,0,REG_SZ,(LPBYTE)tmp.data(),tmp.length()); RegCreateKeyEx(HKEY_CLASSES_ROOT,"KVIrcTheme\\Shell\\Install\\command",0,0,0,KEY_WRITE,0,&hKey,0); - tmp=QString(appPath+" \"%1\"").local8Bit(); + tmp=TQString(appPath+" \"%1\"").local8Bit(); RegSetValueEx( hKey,0,0,REG_SZ,(LPBYTE)tmp.data(),tmp.length()); //Addons @@ -479,7 +479,7 @@ void KviApp::setupFileAssociations() RegSetValueEx( hKey,0,0,REG_SZ,(LPBYTE)tmp.data(),tmp.length()); RegCreateKeyEx(HKEY_CLASSES_ROOT,"KVIrcAddon\\DefaultIcon",0,0,0,KEY_WRITE,0,&hKey,0); - tmp=QString(appPath+",4").local8Bit(); + tmp=TQString(appPath+",4").local8Bit(); RegSetValueEx( hKey,0,0,REG_SZ,(LPBYTE)tmp.data(),tmp.length()); RegCreateKeyEx(HKEY_CLASSES_ROOT,"KVIrcAddon\\Shell\\Install",0,0,0,KEY_WRITE,0,&hKey,0); @@ -487,7 +487,7 @@ void KviApp::setupFileAssociations() RegSetValueEx( hKey,0,0,REG_SZ,(LPBYTE)tmp.data(),tmp.length()); RegCreateKeyEx(HKEY_CLASSES_ROOT,"KVIrcAddon\\Shell\\Install\\command",0,0,0,KEY_WRITE,0,&hKey,0); - tmp=QString(appPath+" \"%1\"").local8Bit(); + tmp=TQString(appPath+" \"%1\"").local8Bit(); RegSetValueEx( hKey,0,0,REG_SZ,(LPBYTE)tmp.data(),tmp.length()); #endif @@ -589,7 +589,7 @@ void KviApp::findGlobalKvircDirectory() //Last resource , try $HOME and $HOME/.kde for(int k=0;usualKvircGlobalDir[k] != 0;k++){ - m_szGlobalKvircDir = QDir::homeDirPath(); + m_szGlobalKvircDir = TQDir::homeDirPath(); m_szGlobalKvircDir+= usualKvircGlobalDir[k]; m_szGlobalKvircDir+= KVI_VERSION_BRANCH; if(checkGlobalKvircDirectory(m_szGlobalKvircDir))return; @@ -597,7 +597,7 @@ void KviApp::findGlobalKvircDirectory() #ifdef COMPILE_KDE_SUPPORT for(int k=0;usualKvircGlobalDir[k] != 0;k++){ - m_szGlobalKvircDir = QDir::homeDirPath(); + m_szGlobalKvircDir = TQDir::homeDirPath(); m_szGlobalKvircDir+= "/.kde"; m_szGlobalKvircDir+= usualKvircGlobalDir[k]; m_szGlobalKvircDir+= KVI_VERSION_BRANCH; @@ -673,12 +673,12 @@ bool KviApp::findLocalKvircDirectory() } #endif //Check if we have a special .kvirc.rc in $HOME - QString szF = QDir::homeDirPath(); + TQString szF = TQDir::homeDirPath(); if(!m_szConfigFile.isEmpty()) { - QString szConfig = m_szConfigFile; - if(QDir::isRelativePath(szConfig)) + TQString szConfig = m_szConfigFile; + if(TQDir::isRelativePath(szConfig)) { szF+=KVI_PATH_SEPARATOR; szF+=szConfig; @@ -710,7 +710,7 @@ void KviApp::loadDirectories() // First find the global (readable) one... findGlobalKvircDirectory(); // Init locale - QString szLocalePath = m_szGlobalKvircDir; + TQString szLocalePath = m_szGlobalKvircDir; szLocalePath.append(KVI_PATH_SEPARATOR); szLocalePath.append("locale"); szLocalePath.append(KVI_PATH_SEPARATOR); @@ -735,9 +735,9 @@ static kvi_library_t g_hSetupLibrary = 0; void KviApp::setupBegin() { //We must do the setup...ask the user.. - QString szSetupLib; + TQString szSetupLib; getGlobalKvircDirectory(szSetupLib,KviApp::Modules); - KviQString::ensureLastCharIs(szSetupLib,KVI_PATH_SEPARATOR_CHAR); + KviTQString::ensureLastCharIs(szSetupLib,KVI_PATH_SEPARATOR_CHAR); #ifdef COMPILE_ON_WINDOWS szSetupLib.append("kvisetup.dll"); #else @@ -839,11 +839,11 @@ void KviApp::saveKvircDirectory() #endif //COMPILE_KDE_SUPPORT // In NON-KDE we use $HOME/.kvirc.rc or $HOME/kvirc.ini - QString szF = QDir::homeDirPath(); + TQString szF = TQDir::homeDirPath(); if(!m_szConfigFile.isEmpty()) - {//Must be changed from QString::fromLocal8Bit to QTextCodec::codecForLocale() - QString szConfig = m_szConfigFile; - if(QDir::isRelativePath(szConfig)) + {//Must be changed from TQString::fromLocal8Bit to TQTextCodec::codecForLocale() + TQString szConfig = m_szConfigFile; + if(TQDir::isRelativePath(szConfig)) { szF+=KVI_PATH_SEPARATOR; szF+=szConfig; diff --git a/src/kvirc/kernel/kvi_asynchronousconnectiondata.h b/src/kvirc/kernel/kvi_asynchronousconnectiondata.h index 35c41ed3..2018289d 100644 --- a/src/kvirc/kernel/kvi_asynchronousconnectiondata.h +++ b/src/kvirc/kernel/kvi_asynchronousconnectiondata.h @@ -36,18 +36,18 @@ public: KviAsynchronousConnectionData(); ~KviAsynchronousConnectionData(); public: - QString szServer; + TQString szServer; bool bUseLastServerInContext; // this is checked ONLY if szServer is empty kvi_u32_t uPort; bool bPortIsOk; bool bUseIpV6; bool bUseSSL; - QString szBindAddress; // ip address (or interface name) to bind the connection to - QString szCommandToExecAfterConnect; - QString szLinkFilter; - QString szPass; - QString szNick; - QString szInitUMode; + TQString szBindAddress; // ip address (or interface name) to bind the connection to + TQString szCommandToExecAfterConnect; + TQString szLinkFilter; + TQString szPass; + TQString szNick; + TQString szInitUMode; KviIrcServerReconnectInfo * m_pReconnectInfo; }; diff --git a/src/kvirc/kernel/kvi_coreactionnames.h b/src/kvirc/kernel/kvi_coreactionnames.h index 7309e286..2c211edb 100644 --- a/src/kvirc/kernel/kvi_coreactionnames.h +++ b/src/kvirc/kernel/kvi_coreactionnames.h @@ -45,7 +45,7 @@ #define KVI_COREACTION_TILEWINDOWS (KVI_COREACTION_NAME_PREFIX "tilewindows") #define KVI_COREACTION_MINIMIZEALLWINDOWS (KVI_COREACTION_NAME_PREFIX "minimizeallwindows") #define KVI_COREACTION_NEWIRCCONTEXT (KVI_COREACTION_NAME_PREFIX "newirccontext") -#define KVI_COREACTION_QUITKVIRC (KVI_COREACTION_NAME_PREFIX "quitkvirc") +#define KVI_COREACTION_TQUITKVIRC (KVI_COREACTION_NAME_PREFIX "quitkvirc") #define KVI_COREACTION_IRCCONTEXTDISPLAY (KVI_COREACTION_NAME_PREFIX "irccontextdisplay") #define KVI_COREACTION_SEPARATOR (KVI_COREACTION_NAME_PREFIX "separator") #define KVI_COREACTION_CONNECT (KVI_COREACTION_NAME_PREFIX "connect") diff --git a/src/kvirc/kernel/kvi_coreactions.cpp b/src/kvirc/kernel/kvi_coreactions.cpp index 071f4ac9..7f32861b 100644 --- a/src/kvirc/kernel/kvi_coreactions.cpp +++ b/src/kvirc/kernel/kvi_coreactions.cpp @@ -47,7 +47,7 @@ #include "kvi_kvs_script.h" #include "kvi_tal_popupmenu.h" -#include +#include // Ctrl+Alt+A : KviGoAwayAction @@ -72,7 +72,7 @@ void register_core_actions(KviActionManager * m) { - m->registerAction(new KviConnectAction(m)); // this as parent will destroy it on exit! + m->registerAction(new KviConnectAction(m)); // this as tqparent will destroy it on exit! m->registerAction(new KviSeparatorAction(m)); m->registerAction(new KviIrcContextDisplayAction(m)); m->registerAction(new KviJoinChannelAction(m)); @@ -87,12 +87,12 @@ void register_core_actions(KviActionManager * m) #define SCRIPT_ACTION(__name,__code,__visible,__description,__category,__icon,__smallicon,__flags,__accel) \ a = new KviKvsAction(m, \ - QString(__name), \ - QString(__code), \ - QString(__visible), \ - QString(__description), \ + TQString(__name), \ + TQString(__code), \ + TQString(__visible), \ + TQString(__description), \ __category, \ - QString(__icon), \ + TQString(__icon), \ __smallicon, \ __flags, \ __accel); \ @@ -100,15 +100,15 @@ void register_core_actions(KviActionManager * m) #define SLOT_ACTION(__name,__object,__slot,__visible,__description,__category,__icon,__smallicon,__flags,__accel) \ a = new KviAction(m, \ - QString(__name), \ - QString(__visible), \ - QString(__description), \ + TQString(__name), \ + TQString(__visible), \ + TQString(__description), \ __category, \ - QString(__icon), \ + TQString(__icon), \ __smallicon, \ __flags, \ __accel); \ - QObject::connect(a,SIGNAL(activated()),__object,__slot); \ + TQObject::connect(a,TQT_SIGNAL(activated()),__object,__slot); \ m->registerAction(a) SCRIPT_ACTION( @@ -164,7 +164,7 @@ void register_core_actions(KviActionManager * m) "kvi_bigicon_socketspy.png", KVI_SMALLICON_SPY, KviAction::NeedsContext, - QString::null); + TQString()); SCRIPT_ACTION( KVI_COREACTION_NETWORKLINKS, @@ -175,7 +175,7 @@ void register_core_actions(KviActionManager * m) "kvi_bigicon_networklinks.png", KVI_SMALLICON_LINKS, KviAction::NeedsContext, - QString::null); + TQString()); SCRIPT_ACTION( KVI_COREACTION_CHANNELLIST, @@ -186,7 +186,7 @@ void register_core_actions(KviActionManager * m) "kvi_bigicon_channellist.png", KVI_SMALLICON_LIST, KviAction::NeedsContext, - QString::null); + TQString()); SCRIPT_ACTION( KVI_COREACTION_GENERALOPTIONS, @@ -309,7 +309,7 @@ void register_core_actions(KviActionManager * m) "kvi_bigicon_codetester.png", KVI_SMALLICON_BOMB, 0, - QString::null); + TQString()); SCRIPT_ACTION( KVI_COREACTION_EXECUTEKVS, @@ -342,7 +342,7 @@ void register_core_actions(KviActionManager * m) "kvi_bigicon_mailinglist.png", KVI_SMALLICON_MESSAGE, 0, - QString::null); + TQString()); SCRIPT_ACTION( KVI_COREACTION_KVIRCHOMEPAGE, @@ -353,7 +353,7 @@ void register_core_actions(KviActionManager * m) "kvi_bigicon_kvircwww.png", KVI_SMALLICON_KVIRC, 0, - QString::null); + TQString()); SCRIPT_ACTION( KVI_COREACTION_KVIRCRUHOMEPAGE, @@ -364,7 +364,7 @@ void register_core_actions(KviActionManager * m) "kvi_bigicon_kvircwww.png", KVI_SMALLICON_KVIRC, 0, - QString::null); + TQString()); SCRIPT_ACTION( KVI_COREACTION_SCREENSHOT, @@ -375,49 +375,49 @@ void register_core_actions(KviActionManager * m) "kvi_bigicon_screenshot.png", KVI_SMALLICON_SCREENSHOT, 0, - QString::null); + TQString()); SLOT_ACTION( KVI_COREACTION_CASCADEWINDOWS, g_pFrame->mdiManager(), - SLOT(cascadeMaximized()), + TQT_SLOT(cascadeMaximized()), __tr2qs("Cascade windows"), __tr2qs("Arranges the MDI windows in a maximized-cascade fashion"), KviActionManager::categoryGUI(), "kvi_bigicon_cascadewindows.png", KVI_SMALLICON_CASCADEWINDOWS, 0, - QString::null); + TQString()); SLOT_ACTION( KVI_COREACTION_TILEWINDOWS, g_pFrame->mdiManager(), - SLOT(tile()), + TQT_SLOT(tile()), __tr2qs("Tile windows"), __tr2qs("Tiles the MDI windows with the currently selected tile method"), KviActionManager::categoryGUI(), "kvi_bigicon_tilewindows.png", KVI_SMALLICON_TILEWINDOWS, 0, - QString::null); + TQString()); SLOT_ACTION( KVI_COREACTION_MINIMIZEALLWINDOWS, g_pFrame->mdiManager(), - SLOT(minimizeAll()), + TQT_SLOT(minimizeAll()), __tr2qs("Minimize all windows"), __tr2qs("Minimized all the currently visible MDI windows"), KviActionManager::categoryGUI(), "kvi_bigicon_minimizeallwindows.png", KVI_SMALLICON_MINIMIZE, 0, - QString::null); + TQString()); SLOT_ACTION( KVI_COREACTION_NEWIRCCONTEXT, g_pFrame, - SLOT(newConsole()), + TQT_SLOT(newConsole()), __tr2qs("New IRC Context"), __tr2qs("Creates a new IRC context console"), KviActionManager::categoryIrc(), @@ -427,24 +427,24 @@ void register_core_actions(KviActionManager * m) "Ctrl+Alt+N"); SLOT_ACTION( - KVI_COREACTION_QUITKVIRC, + KVI_COREACTION_TQUITKVIRC, g_pApp, - SLOT(quit()), + TQT_SLOT(quit()), __tr2qs("Quit KVIrc"), __tr2qs("Quits KVIrc closing all the current connections"), KviActionManager::categoryGeneric(), "kvi_bigicon_quit.png", - KVI_SMALLICON_QUITAPP, + KVI_SMALLICON_TQUITAPP, 0, - QString::null); + TQString()); } -KviIrcContextDisplayAction::KviIrcContextDisplayAction(QObject * pParent) +KviIrcContextDisplayAction::KviIrcContextDisplayAction(TQObject * pParent) : KviAction(pParent, - QString(KVI_COREACTION_IRCCONTEXTDISPLAY), + TQString(KVI_COREACTION_IRCCONTEXTDISPLAY), __tr2qs("IRC Context Display"), __tr2qs("Shows a small display with IRC context informations"), KviActionManager::categoryIrc(), @@ -457,11 +457,11 @@ KviIrcContextDisplayAction::KviIrcContextDisplayAction(QObject * pParent) void KviIrcContextDisplayAction::setup() { KviAction::setup(); - connect(g_pFrame,SIGNAL(activeConnectionServerInfoChanged()),this,SLOT(activeContextStateChanged())); - connect(g_pFrame,SIGNAL(activeConnectionNickNameChanged()),this,SLOT(activeContextStateChanged())); - connect(g_pFrame,SIGNAL(activeConnectionUserModeChanged()),this,SLOT(activeContextStateChanged())); - connect(g_pFrame,SIGNAL(activeConnectionAwayStateChanged()),this,SLOT(activeContextStateChanged())); - connect(g_pFrame,SIGNAL(activeConnectionLagChanged()),this,SLOT(activeContextStateChanged())); + connect(g_pFrame,TQT_SIGNAL(activeConnectionServerInfoChanged()),this,TQT_SLOT(activeContextStateChanged())); + connect(g_pFrame,TQT_SIGNAL(activeConnectionNickNameChanged()),this,TQT_SLOT(activeContextStateChanged())); + connect(g_pFrame,TQT_SIGNAL(activeConnectionUserModeChanged()),this,TQT_SLOT(activeContextStateChanged())); + connect(g_pFrame,TQT_SIGNAL(activeConnectionAwayStateChanged()),this,TQT_SLOT(activeContextStateChanged())); + connect(g_pFrame,TQT_SIGNAL(activeConnectionLagChanged()),this,TQT_SLOT(activeContextStateChanged())); } bool KviIrcContextDisplayAction::addToPopupMenu(KviTalPopupMenu *p) @@ -476,7 +476,7 @@ bool KviIrcContextDisplayAction::addToPopupMenu(KviTalPopupMenu *p) return true; } -QWidget * KviIrcContextDisplayAction::addToCustomToolBar(KviCustomToolBar *t) +TQWidget * KviIrcContextDisplayAction::addToCustomToolBar(KviCustomToolBar *t) { if(!setupDone())setup(); KviIrcContextDisplay * w = new KviIrcContextDisplay(t,"kvirc.irccontextdisplay"); @@ -491,7 +491,7 @@ void KviIrcContextDisplayAction::activeContextChanged() { if(m_pWidgetList) { - for(QWidget * w = m_pWidgetList->first();w;w = m_pWidgetList->next()) + for(TQWidget * w = m_pWidgetList->first();w;w = m_pWidgetList->next()) w->update(); } } @@ -500,7 +500,7 @@ void KviIrcContextDisplayAction::activeContextStateChanged() { if(m_pWidgetList) { - for(QWidget * w = m_pWidgetList->first();w;w = m_pWidgetList->next()) + for(TQWidget * w = m_pWidgetList->first();w;w = m_pWidgetList->next()) w->update(); } } @@ -513,9 +513,9 @@ void KviIrcContextDisplayAction::setEnabled(bool) -KviSeparatorAction::KviSeparatorAction(QObject * pParent) +KviSeparatorAction::KviSeparatorAction(TQObject * pParent) : KviAction(pParent, - QString(KVI_COREACTION_SEPARATOR), + TQString(KVI_COREACTION_SEPARATOR), __tr2qs("Separator"), __tr2qs("Acts as a separator for other items: performs no action"), KviActionManager::categoryGeneric(), @@ -533,10 +533,10 @@ bool KviSeparatorAction::addToPopupMenu(KviTalPopupMenu *p) return true; } -QWidget * KviSeparatorAction::addToCustomToolBar(KviCustomToolBar *t) +TQWidget * KviSeparatorAction::addToCustomToolBar(KviCustomToolBar *t) { if(!setupDone())setup(); - QWidget * w = new KviCustomToolBarSeparator(t,"kvirc.separator"); + TQWidget * w = new KviCustomToolBarSeparator(t,"kvirc.separator"); registerWidget(w); #ifdef COMPILE_USE_QT4 t->addWidget(w); @@ -548,16 +548,16 @@ QWidget * KviSeparatorAction::addToCustomToolBar(KviCustomToolBar *t) -KviConnectAction::KviConnectAction(QObject * pParent) +KviConnectAction::KviConnectAction(TQObject * pParent) : KviAction(pParent, - QString(KVI_COREACTION_CONNECT), + TQString(KVI_COREACTION_CONNECT), __tr2qs("Connect/Disconnect"), __tr2qs("Allows you to connect to a server or to terminate the current connection"), KviActionManager::categoryIrc(), KVI_BIGICON_CONNECTED, KVI_SMALLICON_NONE, // no small icon for now NeedsContext | NeedsConnection, - QString("Ctrl+Alt+C")) + TQString("Ctrl+Alt+C")) { } @@ -575,11 +575,11 @@ void KviConnectAction::activeContextChanged() void KviConnectAction::activeContextStateChanged() { - KviPointerList * bl = widgetList(); + KviPointerList * bl = widgetList(); if(!bl)return; - QPixmap * p; - QString txt; + TQPixmap * p; + TQString txt; KviIrcContext * c = g_pFrame->activeContext(); if(c) { @@ -608,14 +608,14 @@ void KviConnectAction::activeContextStateChanged() if(p) { - for(QToolButton * b = (QToolButton *)bl->first();b;b =(QToolButton *)bl->next()) + for(TQToolButton * b = (TQToolButton *)bl->first();b;b =(TQToolButton *)bl->next()) { if(!b->isEnabled())b->setEnabled(true); b->setPixmap(*p); b->setTextLabel(txt); } } else { - for(QToolButton * b = (QToolButton *)bl->first();b;b = (QToolButton *)bl->next()) + for(TQToolButton * b = (TQToolButton *)bl->first();b;b = (TQToolButton *)bl->next()) { if(b->isEnabled())b->setEnabled(false); } @@ -643,7 +643,7 @@ bool KviConnectAction::addToPopupMenu(KviTalPopupMenu *p) int id; - QString t; + TQString t; if(c) { switch(c->state()) @@ -651,43 +651,43 @@ bool KviConnectAction::addToPopupMenu(KviTalPopupMenu *p) case KviIrcContext::Idle: t = m_szConnectString; if(!m_szKeySequence.isEmpty())t += '\t' + m_szKeySequence; - p->insertItem(t,this,SLOT(activate())); + p->insertItem(t,this,TQT_SLOT(activate())); break; case KviIrcContext::Connecting: case KviIrcContext::LoggingIn: t = m_szAbortConnectionString; if(!m_szKeySequence.isEmpty())t += '\t' + m_szKeySequence; - p->insertItem(t,this,SLOT(activate())); + p->insertItem(t,this,TQT_SLOT(activate())); break; case KviIrcContext::Connected: t = m_szDisconnectString; if(!m_szKeySequence.isEmpty())t += '\t' + m_szKeySequence; - p->insertItem(t,this,SLOT(activate())); + p->insertItem(t,this,TQT_SLOT(activate())); break; default: t = m_szConnectString; if(!m_szKeySequence.isEmpty())t += '\t' + m_szKeySequence; - id = p->insertItem(t,this,SLOT(activate())); + id = p->insertItem(t,this,TQT_SLOT(activate())); p->setItemEnabled(id,false); break; } } else { t = m_szConnectString; if(!m_szKeySequence.isEmpty())t += '\t' + m_szKeySequence; - id = p->insertItem(t,this,SLOT(activate())); + id = p->insertItem(t,this,TQT_SLOT(activate())); p->setItemEnabled(id,false); } return true; } -QWidget * KviConnectAction::addToCustomToolBar(KviCustomToolBar *t) +TQWidget * KviConnectAction::addToCustomToolBar(KviCustomToolBar *t) { if(!setupDone())setup(); - QToolButton * b = new KviStyledToolButton( + TQToolButton * b = new KviStyledToolButton( *(g_pIconManager->getBigIcon(KVI_BIGICON_DISCONNECTED)), m_szConnectString, m_szConnectString, - this,SLOT(activate()),t,name()); + this,TQT_SLOT(activate()),t,name()); registerWidget(b); #ifdef COMPILE_USE_QT4 t->addWidget(b); @@ -702,13 +702,13 @@ QWidget * KviConnectAction::addToCustomToolBar(KviCustomToolBar *t) -KviSubmenuAction::KviSubmenuAction(QObject * pParent, - const QString &szName, - const QString &szScriptCode, - const QString &szVisibleName, - const QString &szDescription, +KviSubmenuAction::KviSubmenuAction(TQObject * pParent, + const TQString &szName, + const TQString &szScriptCode, + const TQString &szVisibleName, + const TQString &szDescription, KviActionCategory * pCategory, - const QString &szBigIcon, + const TQString &szBigIcon, int iSmallIconId, unsigned int uFlags) : KviKvsAction(pParent, @@ -735,8 +735,8 @@ void KviSubmenuAction::setup() if(!m_pPopup) { m_pPopup = new KviTalPopupMenu(); - connect(m_pPopup,SIGNAL(aboutToShow()),this,SLOT(popupAboutToShow())); - connect(m_pPopup,SIGNAL(activated(int)),this,SLOT(popupActivated(int))); + connect(m_pPopup,TQT_SIGNAL(aboutToShow()),this,TQT_SLOT(popupAboutToShow())); + connect(m_pPopup,TQT_SIGNAL(activated(int)),this,TQT_SLOT(popupActivated(int))); } } @@ -756,18 +756,18 @@ bool KviSubmenuAction::addToPopupMenu(KviTalPopupMenu *p) return true; } -QWidget * KviSubmenuAction::addToCustomToolBar(KviCustomToolBar *t) +TQWidget * KviSubmenuAction::addToCustomToolBar(KviCustomToolBar *t) { if(!setupDone())setup(); KviStyledToolButton * b = new KviStyledToolButton( *(bigIcon()), visibleName(), visibleName(), - this,SLOT(activate()),t,name()); + this,TQT_SLOT(activate()),t,name()); b->setPopup(m_pPopup); #ifdef COMPILE_USE_QT4 - b->setPopupMode( scriptCode().isEmpty() ? QToolButton::InstantPopup : QToolButton::MenuButtonPopup); + b->setPopupMode( scriptCode().isEmpty() ? TQToolButton::InstantPopup : TQToolButton::MenuButtonPopup); t->addWidget(b); #else b->setShowSubmenuIndicator(true); @@ -783,10 +783,10 @@ QWidget * KviSubmenuAction::addToCustomToolBar(KviCustomToolBar *t) -KviJoinChannelAction::KviJoinChannelAction(QObject * pParent) +KviJoinChannelAction::KviJoinChannelAction(TQObject * pParent) : KviSubmenuAction(pParent, - QString(KVI_COREACTION_CHANNELMENU), - QString("channelsjoin.open"), + TQString(KVI_COREACTION_CHANNELMENU), + TQString("channelsjoin.open"), __tr2qs("Join Channel"), __tr2qs("Shows a popup menu that allows quickly selecting a channel to join"), KviActionManager::categoryIrc(), @@ -812,10 +812,10 @@ void KviJoinChannelAction::popupActivated(int id) KviConsole * c = g_pActiveWindow->console(); if(!c)return; - QString text = m_pPopup->text(id); + TQString text = m_pPopup->text(id); if(!text.isEmpty()) { - QString szText; + TQString szText; if(__tr2qs("Other...") == text)szText = "channelsjoin.open"; else { szText = text; @@ -827,10 +827,10 @@ void KviJoinChannelAction::popupActivated(int id) -KviChangeNickAction::KviChangeNickAction(QObject * pParent) +KviChangeNickAction::KviChangeNickAction(TQObject * pParent) : KviSubmenuAction(pParent, - QString(KVI_COREACTION_NICKNAMEMENU), - QString("dialog.textinput(\"Change Nickname\",\"Please enter the new nickname\",\"Cancel\",\"default=OK\"){ if($0 == 1)nick $1; }"), + TQString(KVI_COREACTION_NICKNAMEMENU), + TQString("dialog.textinput(\"Change Nickname\",\"Please enter the new nickname\",\"Cancel\",\"default=OK\"){ if($0 == 1)nick $1; }"), __tr2qs("Change Nickname"), __tr2qs("Shows a popup menu that allows quickly changing the nickname"), KviActionManager::categoryIrc(), @@ -856,10 +856,10 @@ void KviChangeNickAction::popupActivated(int id) KviConsole * c = g_pActiveWindow->console(); if(!c)return; - QString text = m_pPopup->text(id); + TQString text = m_pPopup->text(id); if(!text.isEmpty()) { - QString szText; + TQString szText; if(__tr2qs("Other...") == text) { activate(); @@ -876,10 +876,10 @@ void KviChangeNickAction::popupActivated(int id) -KviConnectToServerAction::KviConnectToServerAction(QObject * pParent) +KviConnectToServerAction::KviConnectToServerAction(TQObject * pParent) : KviSubmenuAction(pParent, - QString(KVI_COREACTION_SERVERMENU), - QString("options.edit KviServerOptionsWidget"), + TQString(KVI_COREACTION_SERVERMENU), + TQString("options.edit KviServerOptionsWidget"), __tr2qs("Connect To"), __tr2qs("Shows a popup menu that allows quickly connecting to a server"), KviActionManager::categoryIrc(), @@ -901,7 +901,7 @@ void KviConnectToServerAction::popupActivated(int id) KviConsole * c = g_pActiveWindow->console(); if(!c)return; - QString text = m_pPopup->text(id); + TQString text = m_pPopup->text(id); if(!text.isEmpty()) { if(__tr2qs("Other...") == text) @@ -922,10 +922,10 @@ void KviConnectToServerAction::popupActivated(int id) -KviChangeUserModeAction::KviChangeUserModeAction(QObject * pParent) +KviChangeUserModeAction::KviChangeUserModeAction(TQObject * pParent) : KviSubmenuAction(pParent, - QString(KVI_COREACTION_USERMODEMENU), - QString(""), + TQString(KVI_COREACTION_USERMODEMENU), + TQString(""), __tr2qs("User Mode"), __tr2qs("Shows a popup menu that allows quickly changing user modes"), KviActionManager::categoryIrc(), @@ -942,7 +942,7 @@ void KviChangeUserModeAction::popupAboutToShow() m_pPopup->clear(); int id; - QString szModes = g_pActiveWindow->console()->connection()->serverInfo()->supportedUserModes(); + TQString szModes = g_pActiveWindow->console()->connection()->serverInfo()->supportedUserModes(); id = m_pPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_WALLOPS)),__tr2qs("Wallops (+w)")); m_pPopup->setItemChecked(id,c->connection()->userInfo()->hasUserMode('w')); @@ -951,14 +951,14 @@ void KviChangeUserModeAction::popupAboutToShow() id = m_pPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_INVISIBLE)),__tr2qs("Invisible (+i)")); m_pPopup->setItemChecked(id,c->connection()->userInfo()->hasUserMode('i')); - szModes.replace("w",""); - szModes.replace("s",""); - szModes.replace("i",""); + szModes.tqreplace("w",""); + szModes.tqreplace("s",""); + szModes.tqreplace("i",""); while(!szModes.isEmpty()) { - QChar ccc = szModes[0]; + TQChar ccc = szModes[0]; szModes.remove(0,1); - id = m_pPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_MODE)),QString("+%1 Mode").arg(ccc)); + id = m_pPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_MODE)),TQString("+%1 Mode").tqarg(ccc)); m_pPopup->setItemChecked(id,c->connection()->userInfo()->hasUserMode(ccc.latin1())); } } @@ -968,18 +968,18 @@ void KviChangeUserModeAction::popupActivated(int id) KviConsole * c = g_pActiveWindow->console(); if(!c)return; - QString text = m_pPopup->text(id); + TQString text = m_pPopup->text(id); if(!c->isConnected())return; if(!text.isEmpty()) { - int idx = text.find('+'); + int idx = text.tqfind('+'); if(idx != -1) { idx++; if(idx < text.length()) { - QChar m = text[idx]; - QString command = "mode "; + TQChar m = text[idx]; + TQString command = "mode "; command.append(c->connection()->userInfo()->nickName()); command.append(c->connection()->userInfo()->hasUserMode(m) ? " -" : " +"); command.append(m); @@ -990,10 +990,10 @@ void KviChangeUserModeAction::popupActivated(int id) } -KviGoAwayAction::KviGoAwayAction(QObject * pParent) +KviGoAwayAction::KviGoAwayAction(TQObject * pParent) : KviKvsAction(pParent, - QString(KVI_COREACTION_AWAYBACK), - QString("if($away())back; else away;"), + TQString(KVI_COREACTION_AWAYBACK), + TQString("if($away())back; else away;"), __tr2qs("Away/Back"), __tr2qs("Allows entering and leaving away state"), KviActionManager::categoryIrc(), @@ -1016,11 +1016,11 @@ void KviGoAwayAction::activeContextChanged() void KviGoAwayAction::activeContextStateChanged() { - KviPointerList * bl = widgetList(); + KviPointerList * bl = widgetList(); if(!bl)return; - QPixmap * p; - QString txt; + TQPixmap * p; + TQString txt; KviIrcContext * c = g_pFrame->activeContext(); if(c) { @@ -1043,7 +1043,7 @@ void KviGoAwayAction::activeContextStateChanged() if(p) { - for(QToolButton * b = (QToolButton *)bl->first();b;b =(QToolButton *)bl->next()) + for(TQToolButton * b = (TQToolButton *)bl->first();b;b =(TQToolButton *)bl->next()) { if(!b->isEnabled())b->setEnabled(true); b->setPixmap(*p); @@ -1052,7 +1052,7 @@ void KviGoAwayAction::activeContextStateChanged() m_uInternalFlags |= KVI_ACTION_FLAG_ENABLED; setEnabled(true); } else { - for(QToolButton * b = (QToolButton *)bl->first();b;b = (QToolButton *)bl->next()) + for(TQToolButton * b = (TQToolButton *)bl->first();b;b = (TQToolButton *)bl->next()) { if(b->isEnabled())b->setEnabled(false); } @@ -1066,7 +1066,7 @@ void KviGoAwayAction::setup() KviKvsAction::setup(); m_szAwayString = __tr2qs("Enter Away Mode"); m_szBackString = __tr2qs("Leave Away Mode"); - connect(g_pFrame,SIGNAL(activeConnectionAwayStateChanged()),this,SLOT(activeContextStateChanged())); + connect(g_pFrame,TQT_SIGNAL(activeConnectionAwayStateChanged()),this,TQT_SLOT(activeContextStateChanged())); } bool KviGoAwayAction::addToPopupMenu(KviTalPopupMenu *p) @@ -1074,7 +1074,7 @@ bool KviGoAwayAction::addToPopupMenu(KviTalPopupMenu *p) if(!setupDone())setup(); KviIrcContext * c = g_pFrame->activeContext(); int id; - QString t; + TQString t; if(c) { if(c->state() == KviIrcContext::Connected) @@ -1083,35 +1083,35 @@ bool KviGoAwayAction::addToPopupMenu(KviTalPopupMenu *p) { t = m_szBackString; if(!m_szKeySequence.isEmpty())t += '\t' + m_szKeySequence; - p->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_AWAY)),t,this,SLOT(activate())); + p->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_AWAY)),t,this,TQT_SLOT(activate())); } else { t = m_szAwayString; if(!m_szKeySequence.isEmpty())t += '\t' + m_szKeySequence; - p->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_NOTAWAY)),t,this,SLOT(activate())); + p->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_NOTAWAY)),t,this,TQT_SLOT(activate())); } } else { t = m_szAwayString; if(!m_szKeySequence.isEmpty())t += '\t' + m_szKeySequence; - id = p->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_NOTAWAY)),t,this,SLOT(activate())); + id = p->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_NOTAWAY)),t,this,TQT_SLOT(activate())); p->setItemEnabled(id,false); } } else { t = m_szAwayString; if(!m_szKeySequence.isEmpty())t += '\t' + m_szKeySequence; - id = p->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_NOTAWAY)),t,this,SLOT(activate())); + id = p->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_NOTAWAY)),t,this,TQT_SLOT(activate())); p->setItemEnabled(id,false); } return true; } -QWidget * KviGoAwayAction::addToCustomToolBar(KviCustomToolBar *t) +TQWidget * KviGoAwayAction::addToCustomToolBar(KviCustomToolBar *t) { if(!setupDone())setup(); - QToolButton * b = new KviStyledToolButton( + TQToolButton * b = new KviStyledToolButton( *(g_pIconManager->getBigIcon("kvi_bigicon_nokeyboard.png")), m_szAwayString, m_szAwayString, - this,SLOT(activate()),t,name()); + this,TQT_SLOT(activate()),t,name()); registerWidget(b); #ifdef COMPILE_USE_QT4 t->addWidget(b); @@ -1130,10 +1130,10 @@ QWidget * KviGoAwayAction::addToCustomToolBar(KviCustomToolBar *t) -KviIrcToolsAction::KviIrcToolsAction(QObject * pParent) +KviIrcToolsAction::KviIrcToolsAction(TQObject * pParent) : KviSubmenuAction(pParent, - QString(KVI_COREACTION_IRCTOOLS), - QString(""), + TQString(KVI_COREACTION_IRCTOOLS), + TQString(""), __tr2qs("Irc Tools"), __tr2qs("Shows a popup menu with some IRC Tools"), KviActionManager::categoryIrc(), @@ -1166,10 +1166,10 @@ void KviIrcToolsAction::popupActivated(int id) -KviIrcOperationsAction::KviIrcOperationsAction(QObject * pParent) +KviIrcOperationsAction::KviIrcOperationsAction(TQObject * pParent) : KviSubmenuAction(pParent, - QString(KVI_COREACTION_IRCACTIONS), - QString(""), + TQString(KVI_COREACTION_IRCACTIONS), + TQString(""), __tr2qs("Irc Actions"), __tr2qs("Shows a popup menu with some IRC Actions"), KviActionManager::categoryIrc(), diff --git a/src/kvirc/kernel/kvi_coreactions.h b/src/kvirc/kernel/kvi_coreactions.h index 4e79fd3a..b4ee3c60 100644 --- a/src/kvirc/kernel/kvi_coreactions.h +++ b/src/kvirc/kernel/kvi_coreactions.h @@ -29,20 +29,21 @@ #include "kvi_kvs_action.h" #include "kvi_pointerlist.h" -#include +#include class KviConnectAction : public KviAction { Q_OBJECT + TQ_OBJECT public: - KviConnectAction(QObject * pParent); + KviConnectAction(TQObject * pParent); protected: - QString m_szConnectString; - QString m_szAbortConnectionString; - QString m_szDisconnectString; + TQString m_szConnectString; + TQString m_szAbortConnectionString; + TQString m_szDisconnectString; public: virtual bool addToPopupMenu(KviTalPopupMenu *p); - virtual QWidget * addToCustomToolBar(KviCustomToolBar *t); + virtual TQWidget * addToCustomToolBar(KviCustomToolBar *t); protected: virtual void setup(); virtual void reloadImages(); @@ -54,11 +55,12 @@ protected: class KviSeparatorAction : public KviAction { Q_OBJECT + TQ_OBJECT public: - KviSeparatorAction(QObject * pParent); + KviSeparatorAction(TQObject * pParent); public: virtual bool addToPopupMenu(KviTalPopupMenu *p); - virtual QWidget * addToCustomToolBar(KviCustomToolBar *t); + virtual TQWidget * addToCustomToolBar(KviCustomToolBar *t); }; class KviTalPopupMenu; @@ -66,14 +68,15 @@ class KviTalPopupMenu; class KviSubmenuAction : public KviKvsAction { Q_OBJECT + TQ_OBJECT public: - KviSubmenuAction(QObject * pParent, - const QString &szName, - const QString &szScriptCode, - const QString &szVisibleName, - const QString &szDescription, + KviSubmenuAction(TQObject * pParent, + const TQString &szName, + const TQString &szScriptCode, + const TQString &szVisibleName, + const TQString &szDescription, KviActionCategory * pCategory = 0, - const QString &szBigIcon = QString::null, + const TQString &szBigIcon = TQString(), int iSmallIconId = 0, unsigned int uFlags = 0); ~KviSubmenuAction(); @@ -83,7 +86,7 @@ protected: virtual void setup(); public: virtual bool addToPopupMenu(KviTalPopupMenu *p); - virtual QWidget * addToCustomToolBar(KviCustomToolBar *t); + virtual TQWidget * addToCustomToolBar(KviCustomToolBar *t); protected slots: virtual void popupAboutToShow(); virtual void popupActivated(int id); @@ -92,8 +95,9 @@ protected slots: class KviJoinChannelAction : public KviSubmenuAction { Q_OBJECT + TQ_OBJECT public: - KviJoinChannelAction(QObject * pParent); + KviJoinChannelAction(TQObject * pParent); protected slots: virtual void popupAboutToShow(); virtual void popupActivated(int); @@ -102,8 +106,9 @@ protected slots: class KviChangeNickAction : public KviSubmenuAction { Q_OBJECT + TQ_OBJECT public: - KviChangeNickAction(QObject * pParent); + KviChangeNickAction(TQObject * pParent); protected slots: void popupAboutToShow(); void popupActivated(int); @@ -112,8 +117,9 @@ protected slots: class KviConnectToServerAction : public KviSubmenuAction { Q_OBJECT + TQ_OBJECT public: - KviConnectToServerAction(QObject * pParent); + KviConnectToServerAction(TQObject * pParent); protected slots: void popupAboutToShow(); void popupActivated(int); @@ -122,8 +128,9 @@ protected slots: class KviChangeUserModeAction : public KviSubmenuAction { Q_OBJECT + TQ_OBJECT public: - KviChangeUserModeAction(QObject * pParent); + KviChangeUserModeAction(TQObject * pParent); protected slots: void popupAboutToShow(); void popupActivated(int); @@ -132,8 +139,9 @@ protected slots: class KviIrcToolsAction : public KviSubmenuAction { Q_OBJECT + TQ_OBJECT public: - KviIrcToolsAction(QObject * pParent); + KviIrcToolsAction(TQObject * pParent); protected slots: void popupAboutToShow(); void popupActivated(int); @@ -143,8 +151,9 @@ protected slots: class KviIrcOperationsAction : public KviSubmenuAction { Q_OBJECT + TQ_OBJECT public: - KviIrcOperationsAction(QObject * pParent); + KviIrcOperationsAction(TQObject * pParent); protected slots: void popupAboutToShow(); void popupActivated(int); @@ -155,11 +164,12 @@ protected slots: class KviIrcContextDisplayAction : public KviAction { Q_OBJECT + TQ_OBJECT public: - KviIrcContextDisplayAction(QObject * pParent); + KviIrcContextDisplayAction(TQObject * pParent); public: virtual bool addToPopupMenu(KviTalPopupMenu *p); - virtual QWidget * addToCustomToolBar(KviCustomToolBar *t); + virtual TQWidget * addToCustomToolBar(KviCustomToolBar *t); virtual void activeContextStateChanged(); virtual void activeContextChanged(); virtual void setEnabled(bool); @@ -170,14 +180,15 @@ public: class KviGoAwayAction : public KviKvsAction { Q_OBJECT + TQ_OBJECT public: - KviGoAwayAction(QObject * pParent); + KviGoAwayAction(TQObject * pParent); protected: - QString m_szAwayString; - QString m_szBackString; + TQString m_szAwayString; + TQString m_szBackString; public: virtual bool addToPopupMenu(KviTalPopupMenu *p); - virtual QWidget * addToCustomToolBar(KviCustomToolBar *t); + virtual TQWidget * addToCustomToolBar(KviCustomToolBar *t); protected: virtual void setup(); virtual void reloadImages(); diff --git a/src/kvirc/kernel/kvi_customtoolbardescriptor.cpp b/src/kvirc/kernel/kvi_customtoolbardescriptor.cpp index d8c246b9..2e3b8faf 100644 --- a/src/kvirc/kernel/kvi_customtoolbardescriptor.cpp +++ b/src/kvirc/kernel/kvi_customtoolbardescriptor.cpp @@ -34,11 +34,11 @@ #include "kvi_kvs_script.h" #include "kvi_window.h" -KviCustomToolBarDescriptor::KviCustomToolBarDescriptor(const QString &szId,const QString &szLabelCode) +KviCustomToolBarDescriptor::KviCustomToolBarDescriptor(const TQString &szId,const TQString &szLabelCode) { m_iInternalId = g_pApp->getGloballyUniqueId(); m_szId = szId; - m_pActions = new KviPointerList; + m_pActions = new KviPointerList; m_pActions->setAutoDelete(true); m_pToolBar = 0; m_bVisibleAtStartup = false; @@ -52,31 +52,31 @@ KviCustomToolBarDescriptor::~KviCustomToolBarDescriptor() delete m_pLabelScript; } -void KviCustomToolBarDescriptor::createLabelScript(const QString &szLabelCode) +void KviCustomToolBarDescriptor::createLabelScript(const TQString &szLabelCode) { - QString szTmp = "toolbar::"; + TQString szTmp = "toolbar::"; szTmp += m_szId; szTmp += "::label"; m_pLabelScript = new KviKvsScript(szTmp,szLabelCode,KviKvsScript::Parameter); } -const QString & KviCustomToolBarDescriptor::label() +const TQString & KviCustomToolBarDescriptor::label() { if(!m_pLabelScript->run(g_pActiveWindow,0,m_szParsedLabel))m_szParsedLabel = m_pLabelScript->code(); return m_szParsedLabel; } -const QString & KviCustomToolBarDescriptor::labelCode() +const TQString & KviCustomToolBarDescriptor::labelCode() { return m_pLabelScript->code(); } -bool KviCustomToolBarDescriptor::addAction(const QString &szAction) +bool KviCustomToolBarDescriptor::addAction(const TQString &szAction) { KviAction *a = KviActionManager::instance()->getAction(szAction); if(a) { - m_pActions->append(new QString(szAction)); + m_pActions->append(new TQString(szAction)); if(m_pToolBar)a->addToCustomToolBar(m_pToolBar); return true; } @@ -96,9 +96,9 @@ bool KviCustomToolBarDescriptor::removeAction(unsigned int iAction) return true; } -bool KviCustomToolBarDescriptor::removeAction(const QString &szAction) +bool KviCustomToolBarDescriptor::removeAction(const TQString &szAction) { - for(QString *s = m_pActions->first();s;s = m_pActions->next()) + for(TQString *s = m_pActions->first();s;s = m_pActions->next()) { if(*s == szAction) { @@ -127,18 +127,18 @@ void KviCustomToolBarDescriptor::fillToolBar() { if(m_pActions->count() == 0) { - // force layout of the toolbar - QApplication::postEvent(m_pToolBar,new QEvent(QEvent::LayoutHint)); + // force tqlayout of the toolbar + TQApplication::postEvent(m_pToolBar,new TQEvent(TQEvent::LayoutHint)); } else { - KviPointerList dying; + KviPointerList dying; dying.setAutoDelete(false); - for(QString *p = m_pActions->first();p;p = m_pActions->next()) + for(TQString *p = m_pActions->first();p;p = m_pActions->next()) { KviAction *a = KviActionManager::instance()->getAction(*p); if(a)a->addToCustomToolBar(m_pToolBar); else dying.append(p); } - for(QString *d = dying.first();d;d = dying.next()) + for(TQString *d = dying.first();d;d = dying.next()) m_pActions->removeRef(d); } } @@ -147,7 +147,7 @@ KviCustomToolBar * KviCustomToolBarDescriptor::createToolBar() { if(!m_pToolBar) { - m_pToolBar = new KviCustomToolBar(this,label(),QT_DOCK_TOP,false,id().utf8().data()); + m_pToolBar = new KviCustomToolBar(this,label(),TQT_DOCK_TOP,false,id().utf8().data()); fillToolBar(); } return m_pToolBar; @@ -163,7 +163,7 @@ void KviCustomToolBarDescriptor::unregisterToolBar(KviCustomToolBar * t) m_pToolBar = 0; } -void KviCustomToolBarDescriptor::rename(const QString &szNewLabelCode) +void KviCustomToolBarDescriptor::rename(const TQString &szNewLabelCode) { delete m_pLabelScript; createLabelScript(szNewLabelCode); @@ -190,9 +190,9 @@ bool KviCustomToolBarDescriptor::loadScripttoolbarCompat(const char * szPrefix,K m_pActions->clear(); KviStr tmp; tmp.sprintf("%s_Name",szPrefix); - m_szId = cfg->readQStringEntry(tmp.ptr(),""); + m_szId = cfg->readTQStringEntry(tmp.ptr(),""); tmp.sprintf("%s_Label",szPrefix); - QString szLabelCode = cfg->readQStringEntry(tmp.ptr(),""); + TQString szLabelCode = cfg->readTQStringEntry(tmp.ptr(),""); if(szLabelCode.isEmpty())szLabelCode = "$tr(Unnamed)"; delete m_pLabelScript; createLabelScript(szLabelCode); @@ -210,13 +210,13 @@ bool KviCustomToolBarDescriptor::loadScripttoolbarCompat(const char * szPrefix,K if(kvi_strEqualCI(tmp2.ptr(),"button")) { tmp2.sprintf("%s_Name",tmp.ptr()); - QString szName = cfg->readQStringEntry(tmp2.ptr(),""); + TQString szName = cfg->readTQStringEntry(tmp2.ptr(),""); tmp2.sprintf("%s_Code",tmp.ptr()); - QString szCode = cfg->readQStringEntry(tmp2.ptr(),""); + TQString szCode = cfg->readTQStringEntry(tmp2.ptr(),""); tmp2.sprintf("%s_Icon",tmp.ptr()); - QString szIcon = cfg->readQStringEntry(tmp2.ptr(),""); + TQString szIcon = cfg->readTQStringEntry(tmp2.ptr(),""); tmp2.sprintf("%s_Text",tmp.ptr()); - QString szText = cfg->readQStringEntry(tmp2.ptr(),""); + TQString szText = cfg->readTQStringEntry(tmp2.ptr(),""); //tmp2.sprintf("%s_Enabled",tmp.ptr()); //bool bEnabled = cfg->readBoolEntry(tmp2.ptr(),true); @@ -230,9 +230,9 @@ bool KviCustomToolBarDescriptor::loadScripttoolbarCompat(const char * szPrefix,K __tr2qs("Backward compatibility action for toolbar.define"), "generic",szIcon,szIcon,0); KviActionManager::instance()->registerAction(a); - m_pActions->append(new QString(szName)); + m_pActions->append(new TQString(szName)); } else { - m_pActions->append(new QString("separator")); + m_pActions->append(new TQString("separator")); } } return true; @@ -243,17 +243,17 @@ bool KviCustomToolBarDescriptor::load(KviConfig * cfg) { m_pActions->clear(); m_szId = cfg->group(); - QString szLabelCode = cfg->readQStringEntry("Label"); + TQString szLabelCode = cfg->readTQStringEntry("Label"); if(szLabelCode.isEmpty())szLabelCode = "$tr(Unnamed)"; delete m_pLabelScript; createLabelScript(szLabelCode); - m_szIconId = cfg->readQStringEntry("IconId",""); + m_szIconId = cfg->readTQStringEntry("IconId",""); unsigned int n = cfg->readUIntEntry("Count",0); - QString tmp; + TQString tmp; for(unsigned int i=0;ireadQStringEntry(tmp)); + TQString * p = new TQString(cfg->readTQStringEntry(tmp)); if(p->isEmpty())delete p; else m_pActions->append(p); } @@ -267,8 +267,8 @@ void KviCustomToolBarDescriptor::save(KviConfig * cfg) cfg->writeEntry("Count",m_pActions->count()); if(!m_szIconId.isEmpty())cfg->writeEntry("IconId",m_szIconId); int i = 0; - QString tmp; - for(QString * p = m_pActions->first();p;p = m_pActions->next()) + TQString tmp; + for(TQString * p = m_pActions->first();p;p = m_pActions->next()) { tmp.setNum(i); cfg->writeEntry(tmp,*p); diff --git a/src/kvirc/kernel/kvi_customtoolbardescriptor.h b/src/kvirc/kernel/kvi_customtoolbardescriptor.h index f900d63a..a369f157 100644 --- a/src/kvirc/kernel/kvi_customtoolbardescriptor.h +++ b/src/kvirc/kernel/kvi_customtoolbardescriptor.h @@ -41,36 +41,36 @@ class KVIRC_API KviCustomToolBarDescriptor friend class KviCustomToolBar; friend class KviCustomToolBarManager; protected: - KviCustomToolBarDescriptor(const QString &szId,const QString &szLabelCode); + KviCustomToolBarDescriptor(const TQString &szId,const TQString &szLabelCode); public: ~KviCustomToolBarDescriptor(); protected: - QString m_szId; - QString m_szIconId; - QString m_szParsedLabel; - KviPointerList * m_pActions; + TQString m_szId; + TQString m_szIconId; + TQString m_szParsedLabel; + KviPointerList * m_pActions; KviCustomToolBar * m_pToolBar; int m_iInternalId; bool m_bVisibleAtStartup; KviKvsScript * m_pLabelScript; public: - const QString & iconId(){ return m_szIconId; }; - const QString & label(); - const QString & labelCode(); - const QString & id(){ return m_szId; }; + const TQString & iconId(){ return m_szIconId; }; + const TQString & label(); + const TQString & labelCode(); + const TQString & id(){ return m_szId; }; int internalId(){ return m_iInternalId; }; // useful only for KviFrame KviCustomToolBar * toolBar(){ return m_pToolBar; }; KviCustomToolBar * createToolBar(); - void setIconId(const QString &szIconId){ m_szIconId = szIconId; }; - bool addAction(const QString &szAction); - bool removeAction(const QString &szAction); + void setIconId(const TQString &szIconId){ m_szIconId = szIconId; }; + bool addAction(const TQString &szAction); + bool removeAction(const TQString &szAction); bool removeAction(unsigned int iAction); void clear(); - void rename(const QString &szNewName); - KviPointerList * actions(){ return m_pActions; }; + void rename(const TQString &szNewName); + KviPointerList * actions(){ return m_pActions; }; void updateToolBar(); protected: - void createLabelScript(const QString &szNewLabelCode); + void createLabelScript(const TQString &szNewLabelCode); void fillToolBar(); bool load(KviConfig * cfg); #ifdef SCRIPTTOOLBARDESCRIPTOR_COMPAT diff --git a/src/kvirc/kernel/kvi_customtoolbarmanager.cpp b/src/kvirc/kernel/kvi_customtoolbarmanager.cpp index 62ea6cac..eac0cdf1 100644 --- a/src/kvirc/kernel/kvi_customtoolbarmanager.cpp +++ b/src/kvirc/kernel/kvi_customtoolbarmanager.cpp @@ -33,7 +33,7 @@ KviCustomToolBarManager * KviCustomToolBarManager::m_pInstance = 0; KviCustomToolBarManager::KviCustomToolBarManager() { - m_pDescriptors = new KviPointerHashTable(17,false); + m_pDescriptors = new KviPointerHashTable(17,false); m_pDescriptors->setAutoDelete(true); } @@ -44,7 +44,7 @@ KviCustomToolBarManager::~KviCustomToolBarManager() KviCustomToolBar * KviCustomToolBarManager::firstExistingToolBar() { - KviPointerHashTableIterator it(*m_pDescriptors); + KviPointerHashTableIterator it(*m_pDescriptors); while(KviCustomToolBarDescriptor * d = it.current()) { if(d->toolBar())return d->toolBar(); @@ -67,10 +67,10 @@ void KviCustomToolBarManager::done() } } -QString KviCustomToolBarManager::idForNewToolBar(const QString &szTemplate) +TQString KviCustomToolBarManager::idForNewToolBar(const TQString &szTemplate) { - QString s; - QString szTT = szTemplate.lower(); + TQString s; + TQString szTT = szTemplate.lower(); szTT.remove(" "); szTT.remove("$tr"); szTT.remove("("); @@ -82,11 +82,11 @@ QString KviCustomToolBarManager::idForNewToolBar(const QString &szTemplate) s = szTT; if(idx > 0) { - QString tmp; + TQString tmp; tmp.setNum(idx); s += tmp; } - if(!m_pDescriptors->find(s))return s; + if(!m_pDescriptors->tqfind(s))return s; idx++; } return s; @@ -94,7 +94,7 @@ QString KviCustomToolBarManager::idForNewToolBar(const QString &szTemplate) KviCustomToolBarDescriptor * KviCustomToolBarManager::findDescriptorByInternalId(int id) { - KviPointerHashTableIterator it(*m_pDescriptors); + KviPointerHashTableIterator it(*m_pDescriptors); while(KviCustomToolBarDescriptor * d = it.current()) { if(d->internalId() == id)return d; @@ -103,22 +103,22 @@ KviCustomToolBarDescriptor * KviCustomToolBarManager::findDescriptorByInternalId return 0; } -bool KviCustomToolBarManager::renameDescriptor(const QString &szId,const QString &szNewId,const QString &szNewLabelCode) +bool KviCustomToolBarManager::renameDescriptor(const TQString &szId,const TQString &szNewId,const TQString &szNewLabelCode) { - KviCustomToolBarDescriptor * d = m_pDescriptors->find(szId); + KviCustomToolBarDescriptor * d = m_pDescriptors->tqfind(szId); if(!d)return false; d->rename(szNewLabelCode); if(szId == szNewId)return true; // already done m_pDescriptors->setAutoDelete(false); m_pDescriptors->remove(szId); - m_pDescriptors->replace(szNewId,d); + m_pDescriptors->tqreplace(szNewId,d); m_pDescriptors->setAutoDelete(true); return true; } -bool KviCustomToolBarManager::destroyDescriptor(const QString &szId) +bool KviCustomToolBarManager::destroyDescriptor(const TQString &szId) { - KviCustomToolBarDescriptor * d = m_pDescriptors->find(szId); + KviCustomToolBarDescriptor * d = m_pDescriptors->tqfind(szId); if(!d)return false; m_pDescriptors->remove(szId); // will delete it too! return true; @@ -129,18 +129,18 @@ void KviCustomToolBarManager::clear() m_pDescriptors->clear(); // bye! } -KviCustomToolBarDescriptor * KviCustomToolBarManager::create(const QString &szId,const QString &szLabelCode) +KviCustomToolBarDescriptor * KviCustomToolBarManager::create(const TQString &szId,const TQString &szLabelCode) { - KviCustomToolBarDescriptor * d = m_pDescriptors->find(szId); + KviCustomToolBarDescriptor * d = m_pDescriptors->tqfind(szId); if(d)return d; d = new KviCustomToolBarDescriptor(szId,szLabelCode); - m_pDescriptors->replace(szId,d); + m_pDescriptors->tqreplace(szId,d); return d; } void KviCustomToolBarManager::storeVisibilityState() { - KviPointerHashTableIterator it(*m_pDescriptors); + KviPointerHashTableIterator it(*m_pDescriptors); while(KviCustomToolBarDescriptor * d = it.current()) { d->m_bVisibleAtStartup = d->toolBar() != 0; @@ -152,7 +152,7 @@ void KviCustomToolBarManager::storeVisibilityState() int KviCustomToolBarManager::visibleToolBarCount() { int cnt = 0; - KviPointerHashTableIterator it(*m_pDescriptors); + KviPointerHashTableIterator it(*m_pDescriptors); while(KviCustomToolBarDescriptor * d = it.current()) { if(d->toolBar() != 0)cnt++; @@ -163,7 +163,7 @@ int KviCustomToolBarManager::visibleToolBarCount() void KviCustomToolBarManager::createToolBarsVisibleAtStartup() { - KviPointerHashTableIterator it(*m_pDescriptors); + KviPointerHashTableIterator it(*m_pDescriptors); while(KviCustomToolBarDescriptor * d = it.current()) { if(d->m_bVisibleAtStartup && (!d->toolBar())) @@ -174,7 +174,7 @@ void KviCustomToolBarManager::createToolBarsVisibleAtStartup() void KviCustomToolBarManager::updateVisibleToolBars() { - KviPointerHashTableIterator it(*m_pDescriptors); + KviPointerHashTableIterator it(*m_pDescriptors); while(KviCustomToolBarDescriptor * d = it.current()) { if(d->toolBar())d->updateToolBar(); @@ -182,7 +182,7 @@ void KviCustomToolBarManager::updateVisibleToolBars() } } -void KviCustomToolBarManager::load(const QString &szFileName) +void KviCustomToolBarManager::load(const TQString &szFileName) { KviConfig cfg(szFileName,KviConfig::Read); @@ -190,18 +190,18 @@ void KviCustomToolBarManager::load(const QString &szFileName) while(it.current()) { cfg.setGroup(it.currentKey()); - KviCustomToolBarDescriptor * d = new KviCustomToolBarDescriptor(it.currentKey(),QString::null); + KviCustomToolBarDescriptor * d = new KviCustomToolBarDescriptor(it.currentKey(),TQString()); d->m_bVisibleAtStartup = (cfg.readIntEntry("Visible",0) > 0); if(!d->load(&cfg))delete d; - else m_pDescriptors->replace(it.currentKey(),d); + else m_pDescriptors->tqreplace(it.currentKey(),d); ++it; } } -void KviCustomToolBarManager::save(const QString &szFileName) +void KviCustomToolBarManager::save(const TQString &szFileName) { KviConfig cfg(szFileName,KviConfig::Write); - KviPointerHashTableIterator it(*m_pDescriptors); + KviPointerHashTableIterator it(*m_pDescriptors); while(KviCustomToolBarDescriptor * d = it.current()) { cfg.setGroup(d->id()); @@ -215,8 +215,8 @@ void KviCustomToolBarManager::save(const QString &szFileName) // THIS IS A COMPATIBILITY ENTRY ADDED AT 3.0.2 TIME THAT SHOULD BE DROPPED IN A COUPLE OF VERSION BUMPS! #ifdef SCRIPTTOOLBAR_COMPAT -#include -void KviCustomToolBarManager::loadScripttoolbarsCompat(const QString &szFileName) +#include +void KviCustomToolBarManager::loadScripttoolbarsCompat(const TQString &szFileName) { KviConfig cfg(szFileName,KviConfig::Read); @@ -226,14 +226,14 @@ void KviCustomToolBarManager::loadScripttoolbarsCompat(const QString &szFileName for(unsigned int i=0;iloadScripttoolbarCompat(tmp.ptr(),&cfg))delete d; - else m_pDescriptors->replace(d->id(),d); + else m_pDescriptors->tqreplace(d->id(),d); } // get rid of the file now... - QString szNewFileName = szFileName + ".old"; - QDir d; + TQString szNewFileName = szFileName + ".old"; + TQDir d; d.rename(szFileName,szNewFileName); } #endif diff --git a/src/kvirc/kernel/kvi_customtoolbarmanager.h b/src/kvirc/kernel/kvi_customtoolbarmanager.h index eec1921b..cafe743b 100644 --- a/src/kvirc/kernel/kvi_customtoolbarmanager.h +++ b/src/kvirc/kernel/kvi_customtoolbarmanager.h @@ -45,7 +45,7 @@ protected: ~KviCustomToolBarManager(); protected: static KviCustomToolBarManager * m_pInstance; - KviPointerHashTable * m_pDescriptors; + KviPointerHashTable * m_pDescriptors; public: static KviCustomToolBarManager * instance(){ return m_pInstance; }; static void init(); @@ -53,23 +53,23 @@ public: void clear(); int descriptorCount(){ return m_pDescriptors->count(); }; int visibleToolBarCount(); - QString idForNewToolBar(const QString &szTemplate); - KviPointerHashTable * descriptors(){ return m_pDescriptors; }; + TQString idForNewToolBar(const TQString &szTemplate); + KviPointerHashTable * descriptors(){ return m_pDescriptors; }; KviCustomToolBar * firstExistingToolBar(); - KviCustomToolBarDescriptor * create(const QString &szId,const QString &szLabelCode); - KviCustomToolBarDescriptor * find(const QString &szId){ return m_pDescriptors->find(szId); }; + KviCustomToolBarDescriptor * create(const TQString &szId,const TQString &szLabelCode); + KviCustomToolBarDescriptor * tqfind(const TQString &szId){ return m_pDescriptors->tqfind(szId); }; KviCustomToolBarDescriptor * findDescriptorByInternalId(int id); void updateVisibleToolBars(); void createToolBarsVisibleAtStartup(); void storeVisibilityState(); - bool renameDescriptor(const QString &szId,const QString &szNewId,const QString &szNewLabelCode); - bool destroyDescriptor(const QString &szId); - void load(const QString &szFileName); + bool renameDescriptor(const TQString &szId,const TQString &szNewId,const TQString &szNewLabelCode); + bool destroyDescriptor(const TQString &szId); + void load(const TQString &szFileName); // THIS IS A COMPATIBILITY ENTRY ADDED AT 3.0.2 TIME THAT SHOULD BE DROPPED IN A COUPLE OF VERSION BUMPS! #ifdef SCRIPTTOOLBAR_COMPAT - void loadScripttoolbarsCompat(const QString &szFileName); + void loadScripttoolbarsCompat(const TQString &szFileName); #endif - void save(const QString &szFileName); + void save(const TQString &szFileName); }; diff --git a/src/kvirc/kernel/kvi_filetransfer.cpp b/src/kvirc/kernel/kvi_filetransfer.cpp index 507c96f2..5c72e7cb 100644 --- a/src/kvirc/kernel/kvi_filetransfer.cpp +++ b/src/kvirc/kernel/kvi_filetransfer.cpp @@ -35,7 +35,7 @@ static KviFileTransferManager * g_pFileTransferManager = 0; KviFileTransferManager::KviFileTransferManager() -: QObject() +: TQObject() { m_pTransferList = 0; m_pTransferWindow = 0; @@ -88,10 +88,10 @@ void KviFileTransferManager::invokeTransferWindow(KviWindow * pWnd,bool bCreateM { if(!m_pTransferWindow) { - KviPointerHashTable d(7,false); + KviPointerHashTable d(7,false); d.setAutoDelete(true); - d.replace("bCreateMinimized",new QVariant(bCreateMinimized,0)); - d.replace("bNoRaise",new QVariant(bNoRaise,0)); + d.tqreplace("bCreateMinimized",new TQVariant(bCreateMinimized,0)); + d.tqreplace("bNoRaise",new TQVariant(bNoRaise,0)); KviModuleExtensionManager::instance()->allocateExtension( "tool", @@ -135,7 +135,7 @@ void KviFileTransferManager::unregisterTransfer(KviFileTransfer * t) KviFileTransfer::KviFileTransfer() -: QObject() +: TQObject() { m_pDisplayItem = 0; m_iId = g_pApp->getGloballyUniqueId(); @@ -159,14 +159,14 @@ void KviFileTransfer::invokeTransferWindow(KviWindow * pWnd,bool bCreateMinimize manager()->invokeTransferWindow(pWnd,bCreateMinimized,bNoRaise); } -QString KviFileTransfer::localFileName() +TQString KviFileTransfer::localFileName() { - return QString::null; + return TQString(); } -QString KviFileTransfer::retryCommand() +TQString KviFileTransfer::retryCommand() { - return QString::null; + return TQString(); } bool KviFileTransfer::terminated() @@ -174,9 +174,9 @@ bool KviFileTransfer::terminated() return !active(); } -QString KviFileTransfer::tipText() +TQString KviFileTransfer::tipText() { - return QString::null; + return TQString(); } int KviFileTransfer::displayHeight(int iLineSpacing) @@ -186,5 +186,5 @@ int KviFileTransfer::displayHeight(int iLineSpacing) void KviFileTransfer::displayUpdate() { - if(m_pDisplayItem)m_pDisplayItem->repaint(); + if(m_pDisplayItem)m_pDisplayItem->tqrepaint(); } diff --git a/src/kvirc/kernel/kvi_filetransfer.h b/src/kvirc/kernel/kvi_filetransfer.h index e6071ff1..819de8ea 100644 --- a/src/kvirc/kernel/kvi_filetransfer.h +++ b/src/kvirc/kernel/kvi_filetransfer.h @@ -27,7 +27,7 @@ #include "kvi_settings.h" -#include +#include #include "kvi_pointerlist.h" #include "kvi_tal_listview.h" @@ -35,18 +35,19 @@ class KviFileTransfer; class KviWindow; class KviTalPopupMenu; -class QPainter; +class TQPainter; // This is for the external extension #define KVI_FILE_TRANSFER_WINDOW_EXTENSION_NAME "File transfer extension" -class KVIRC_API KviFileTransferManager : public QObject +class KVIRC_API KviFileTransferManager : public TQObject { friend class KviApp; friend class KviFileTransfer; friend class KviFileTransferWindow; Q_OBJECT + TQ_OBJECT public: KviFileTransferManager(); ~KviFileTransferManager(); @@ -76,9 +77,10 @@ signals: #define COLUMN_PROGRESS 2 -class KVIRC_API KviFileTransfer : public QObject +class KVIRC_API KviFileTransfer : public TQObject { Q_OBJECT + TQ_OBJECT public: KviFileTransfer(); ~KviFileTransfer(); @@ -104,10 +106,10 @@ public: // this must be implemented by the transfer virtual bool active() = 0; - virtual void displayPaint(QPainter * p,int column,int width,int height) = 0; - virtual QString tipText(); - virtual QString localFileName(); - virtual QString retryCommand(); + virtual void displayPaint(TQPainter * p,int column,int width,int height) = 0; + virtual TQString tipText(); + virtual TQString localFileName(); + virtual TQString retryCommand(); virtual int displayHeight(int iLineSpacing); virtual void fillContextPopup(KviTalPopupMenu * m,int column) = 0; virtual void die() = 0; diff --git a/src/kvirc/kernel/kvi_iconmanager.cpp b/src/kvirc/kernel/kvi_iconmanager.cpp index 1876b115..f50e6f67 100644 --- a/src/kvirc/kernel/kvi_iconmanager.cpp +++ b/src/kvirc/kernel/kvi_iconmanager.cpp @@ -36,22 +36,22 @@ #include "kvi_fileutils.h" #include "kvi_options.h" -#include -#include +#include +#include #ifndef COMPILE_USE_QT4 - // In Qt.4 we need to use QMimeData ? - #include + // In TQt.4 we need to use TQMimeData ? + #include #endif -#include +#include #ifdef COMPILE_USE_QT4 - #include + #include #endif // kvi_app.cpp -extern QPixmap * g_pUserChanStatePixmap; -extern QPixmap * g_pActivityMeterPixmap; +extern TQPixmap * g_pUserChanStatePixmap; +extern TQPixmap * g_pActivityMeterPixmap; KviIconManager * g_pIconManager = 0; @@ -353,16 +353,16 @@ static const char * g_szIconNames[KVI_NUM_SMALL_ICONS]= KviIconWidget::KviIconWidget() #ifdef COMPILE_USE_QT4 -: QWidget(0,"global_icon_widget" /*,WType_TopLevel | WStyle_Customize | WStyle_Title | WStyle_StaysOnTop | WStyle_DialogBorder | WStyle_SysMenu | WStyle_Minimize*/) +: TQWidget(0,"global_icon_widget" /*,WType_TopLevel | WStyle_Customize | WStyle_Title | WStyle_StaysOnTop | WStyle_DialogBorder | WStyle_SysMenu | WStyle_Minimize*/) #else -: QWidget(0,"global_icon_widget",WType_TopLevel | WStyle_Customize | WStyle_Title | WStyle_StaysOnTop | WStyle_DialogBorder | WStyle_SysMenu | WStyle_Minimize) +: TQWidget(0,"global_icon_widget",WType_TopLevel | WStyle_Customize | WStyle_Title | WStyle_StaysOnTop | WStyle_DialogBorder | WStyle_SysMenu | WStyle_Minimize) #endif { init(); } -KviIconWidget::KviIconWidget(QWidget * par) -: QWidget(par,"global_icon_widget") +KviIconWidget::KviIconWidget(TQWidget * par) +: TQWidget(par,"global_icon_widget") { init(); } @@ -374,24 +374,24 @@ void KviIconWidget::init() int rows = KVI_NUM_SMALL_ICONS / 10; if((rows * 10) < KVI_NUM_SMALL_ICONS)rows++; - QGridLayout * g = new QGridLayout(this,rows + 1,11,0,2); + TQGridLayout * g = new TQGridLayout(this,rows + 1,11,0,2); int i; for(i = 0;i < 10;i++) { KviStr tmp(KviStr::Format,"%d",i); - QLabel * l = new QLabel(tmp.ptr(),this); + TQLabel * l = new TQLabel(tmp.ptr(),this); g->addWidget(l,0,i + 1); } for(i = 0;i < rows;i++) { KviStr tmp(KviStr::Format,"%d",i * 10); - QLabel * l = new QLabel(tmp.ptr(),this); + TQLabel * l = new TQLabel(tmp.ptr(),this); g->addWidget(l,i + 1,0); } for(i = 0;i < KVI_NUM_SMALL_ICONS;i++) { KviStr tmp(KviStr::Format,"%d",i); - QLabel * l = new QLabel(this,tmp.ptr()); + TQLabel * l = new TQLabel(this,tmp.ptr()); l->setPixmap(*(g_pIconManager->getSmallIcon(i))); g->addWidget(l,(i / 10) + 1,(i % 10) + 1); l->installEventFilter(this); @@ -403,51 +403,51 @@ KviIconWidget::~KviIconWidget() { } -void KviIconWidget::closeEvent(QCloseEvent * e) +void KviIconWidget::closeEvent(TQCloseEvent * e) { e->ignore(); emit closed(); } -bool KviIconWidget::eventFilter(QObject * o,QEvent *e) +bool KviIconWidget::eventFilter(TQObject * o,TQEvent *e) { - if(e->type() == QEvent::MouseButtonPress) + if(e->type() == TQEvent::MouseButtonPress) { - if(o->inherits("QLabel")) + if(o->inherits(TQLABEL_OBJECT_NAME_STRING)) { - KviStr szName = ((QLabel *)o)->name(); + KviStr szName = ((TQLabel *)o)->name(); bool bOk; int iVal = szName.toInt(&bOk); if(bOk)emit selected(iVal); - if(parentWidget() && isVisible() && parentWidget()->inherits("KviTalPopupMenu")) + if(tqparentWidget() && isVisible() && tqparentWidget()->inherits("KviTalPopupMenu")) { - parentWidget()->close(); + tqparentWidget()->close(); return true; } else { - if(const QPixmap * pix = ((QLabel *)o)->pixmap()) + if(const TQPixmap * pix = ((TQLabel *)o)->pixmap()) { -// FIXME: In Qt 4.x this stuff needs to be ported to a different api.. which one ? +// FIXME: In TQt 4.x this stuff needs to be ported to a different api.. which one ? #ifndef COMPILE_USE_QT4 - QDragObject * drobj = new QTextDrag(o->name(),this); - drobj->setPixmap(*pix,((QLabel *)o)->mapFromGlobal(QCursor::pos())); + TQDragObject * drobj = new TQTextDrag(o->name(),this); + drobj->setPixmap(*pix,((TQLabel *)o)->mapFromGlobal(TQCursor::pos())); drobj->dragCopy(); #endif return true; } } } - } else if(e->type() == QEvent::DragEnter) + } else if(e->type() == TQEvent::DragEnter) { - ((QDragEnterEvent *)e)->accept(true); + ((TQDragEnterEvent *)e)->accept(true); return true; } - return QWidget::eventFilter(o,e); + return TQWidget::eventFilter(o,e); } -KviCachedPixmap::KviCachedPixmap(QPixmap * ptr,const QString &szPath) +KviCachedPixmap::KviCachedPixmap(TQPixmap * ptr,const TQString &szPath) { m_szPath = szPath; m_tLastAccess = kvi_unixTime(); @@ -475,7 +475,7 @@ KviIconManager::KviIconManager() //loadSmallIcons(); - m_pCachedImages = new KviPointerHashTable(21,true); + m_pCachedImages = new KviPointerHashTable(21,true); m_pCachedImages->setAutoDelete(true); m_uCacheTotalSize = 0; @@ -487,10 +487,10 @@ KviIconManager::KviIconManager() // Load the userchanstate image g_pApp->findImage(buffer,KVI_USERCHANSTATE_IMAGE_NAME); - g_pUserChanStatePixmap = new QPixmap(buffer.ptr()); + g_pUserChanStatePixmap = new TQPixmap(TQString(buffer.ptr())); g_pApp->findImage(buffer,KVI_ACTIVITYMETER_IMAGE_NAME); - g_pActivityMeterPixmap = new QPixmap(buffer.ptr()); + g_pActivityMeterPixmap = new TQPixmap(TQString(buffer.ptr())); m_pIconNames = 0; @@ -499,8 +499,8 @@ KviIconManager::KviIconManager() /* for(i=0;iisNull()) @@ -536,21 +536,21 @@ const char * KviIconManager::getSmallIconName(int idx) return g_szIconNames[idx]; } -int KviIconManager::getSmallIconIdFromName(const QString &szName) +int KviIconManager::getSmallIconIdFromName(const TQString &szName) { if(!m_pIconNames) { - m_pIconNames = new KviPointerHashTable(257,false); + m_pIconNames = new KviPointerHashTable(257,false); m_pIconNames->setAutoDelete(true); for(int i=0;ireplace(QString(g_szIconNames[i]),pInt); + m_pIconNames->tqreplace(TQString(g_szIconNames[i]),pInt); } } - int * pInt = m_pIconNames->find(szName); + int * pInt = m_pIconNames->tqfind(szName); if(!pInt)return 0; return *pInt; } @@ -561,7 +561,7 @@ void KviIconManager::showIconWidget() if(!m_pIconWidget) { m_pIconWidget = new KviIconWidget(); - connect(m_pIconWidget,SIGNAL(closed()),this,SLOT(iconWidgetClosed())); + connect(m_pIconWidget,TQT_SIGNAL(closed()),this,TQT_SLOT(iconWidgetClosed())); } m_pIconWidget->show(); m_pIconWidget->raise(); @@ -606,11 +606,11 @@ void KviIconManager::iconWidgetClosed() and in the current directory.[br] */ -KviCachedPixmap * KviIconManager::getPixmapWithCache(const QString &szName) +KviCachedPixmap * KviIconManager::getPixmapWithCache(const TQString &szName) { if(szName.isEmpty())return 0; - KviCachedPixmap * p = m_pCachedImages->find(szName); + KviCachedPixmap * p = m_pCachedImages->tqfind(szName); if(p) { @@ -618,13 +618,13 @@ KviCachedPixmap * KviIconManager::getPixmapWithCache(const QString &szName) return p; } - QPixmap * pix = 0; + TQPixmap * pix = 0; - QString szRetPath; + TQString szRetPath; if(g_pApp->findImage(szRetPath,szName)) { - pix = new QPixmap(szRetPath); + pix = new TQPixmap(szRetPath); if(pix->isNull()) { delete pix; // it is not an valid image!!! (really bad situation...) @@ -635,17 +635,17 @@ KviCachedPixmap * KviIconManager::getPixmapWithCache(const QString &szName) return 0; } - p = new KviCachedPixmap(pix,QString(szRetPath)); + p = new KviCachedPixmap(pix,TQString(szRetPath)); addToCache(szName,p); return p; } -KviCachedPixmap * KviIconManager::getPixmapWithCacheScaleOnLoad(const QString &szName,int iMaxWidth,int iMaxHeight) +KviCachedPixmap * KviIconManager::getPixmapWithCacheScaleOnLoad(const TQString &szName,int iMaxWidth,int iMaxHeight) { if(szName.isEmpty())return 0; - KviCachedPixmap * p = m_pCachedImages->find(szName); + KviCachedPixmap * p = m_pCachedImages->tqfind(szName); if(p) { @@ -653,13 +653,13 @@ KviCachedPixmap * KviIconManager::getPixmapWithCacheScaleOnLoad(const QString &s return p; } - QPixmap * pix = 0; + TQPixmap * pix = 0; - QString szRetPath; + TQString szRetPath; if(g_pApp->findImage(szRetPath,szName)) { - pix = new QPixmap(szRetPath); + pix = new TQPixmap(szRetPath); if(pix->isNull()) { delete pix; // it is not an valid image!!! (really bad situation...) @@ -678,21 +678,21 @@ KviCachedPixmap * KviIconManager::getPixmapWithCacheScaleOnLoad(const QString &s scaleW = (scaleH * pix->width()) / pix->height(); } - QImage img = pix->convertToImage(); + TQImage img = pix->convertToImage(); pix->convertFromImage(img.smoothScale(scaleW,scaleH)); } } else { return 0; } - p = new KviCachedPixmap(pix,QString(szRetPath)); + p = new KviCachedPixmap(pix,TQString(szRetPath)); addToCache(szName,p); return p; } -void KviIconManager::addToCache(const QString &szName,KviCachedPixmap * p) +void KviIconManager::addToCache(const TQString &szName,KviCachedPixmap * p) { if((m_uCacheTotalSize + p->size()) >= m_uCacheMaxSize)cacheCleanup(); @@ -700,13 +700,13 @@ void KviIconManager::addToCache(const QString &szName,KviCachedPixmap * p) m_uCacheTotalSize += p->size(); } -QPixmap * KviIconManager::getImage(const char * id,bool bCanBeNumber,QString* pRetPath) +TQPixmap * KviIconManager::getImage(const char * id,bool bCanBeNumber,TQString* pRetPath) { if(!id)return 0; if(bCanBeNumber) { bool bOk; - QString tmp = id; + TQString tmp = id; int idx = tmp.toInt(&bOk); if(bOk) { @@ -723,9 +723,9 @@ QPixmap * KviIconManager::getImage(const char * id,bool bCanBeNumber,QString* pR -QPixmap * KviIconManager::getBigIcon(const QString &szName) +TQPixmap * KviIconManager::getBigIcon(const TQString &szName) { - QPixmap * p = getPixmap(szName); + TQPixmap * p = getPixmap(szName); if(p)return p; bool bOk; @@ -734,16 +734,16 @@ QPixmap * KviIconManager::getBigIcon(const QString &szName) { // was a number : this is not a filename // it was a small icon: scale it and cache it - QString tmpName = szName; + TQString tmpName = szName; tmpName += ".scaled16to32"; p = getPixmap(tmpName); if(p)return p; p = getSmallIcon(idx % KVI_NUM_SMALL_ICONS); if(p) { - QImage tmpi = p->convertToImage(); - QImage tmp2 = tmpi.smoothScale(32,32); - KviCachedPixmap * cp = new KviCachedPixmap(new QPixmap(tmp2),QString::null); + TQImage tmpi = p->convertToImage(); + TQImage tmp2 = tmpi.smoothScale(32,32); + KviCachedPixmap * cp = new KviCachedPixmap(new TQPixmap(tmp2),TQString()); addToCache(tmpName,cp); return cp->pixmap(); } @@ -751,7 +751,7 @@ QPixmap * KviIconManager::getBigIcon(const QString &szName) p = getPixmap("kvi_bigicon_unknown.png"); if(p)return p; - KviCachedPixmap * cp = new KviCachedPixmap(new QPixmap(32,32),QString::null); + KviCachedPixmap * cp = new KviCachedPixmap(new TQPixmap(32,32),TQString()); addToCache(szName,cp); return cp->pixmap(); } @@ -770,28 +770,28 @@ void KviIconManager::urlToCachedFileName(KviStr &szFName) szFName.replaceAll("___","."); } -void KviIconManager::urlToCachedFileName(QString &szFName) +void KviIconManager::urlToCachedFileName(TQString &szFName) { - szFName.replace(":","_"); - szFName.replace(";","_"); - szFName.replace("/","_"); - szFName.replace("\\","_"); - szFName.replace("\"","_"); - szFName.replace("\'","_"); - szFName.replace("(","_"); - szFName.replace(")","_"); - szFName.replace("?","_"); - szFName.replace("___","."); + szFName.tqreplace(":","_"); + szFName.tqreplace(";","_"); + szFName.tqreplace("/","_"); + szFName.tqreplace("\\","_"); + szFName.tqreplace("\"","_"); + szFName.tqreplace("\'","_"); + szFName.tqreplace("(","_"); + szFName.tqreplace(")","_"); + szFName.tqreplace("?","_"); + szFName.tqreplace("___","."); } -KviAvatar * KviIconManager::getAvatar(const QString &szLocalPath,const QString &szName) +KviAvatar * KviIconManager::getAvatar(const TQString &szLocalPath,const TQString &szName) { - QString szP,szN; + TQString szP,szN; if(szLocalPath.isEmpty()) { if(szName.isEmpty())return 0; - if(KviQString::equalCIN("http://",szName,7)) + if(KviTQString::equalCIN("http://",szName,7)) { szN = szName; szP = szName; @@ -816,7 +816,7 @@ KviAvatar * KviIconManager::getAvatar(const QString &szLocalPath,const QString & ,KVI_OPTION_UINT(KviOption_uintScaleAvatarsOnLoadHeight)) : getPixmapWithCache(szP); if(!p)return 0; - return new KviAvatar(p->path(),szN,new QPixmap(*(p->pixmap()))); + return new KviAvatar(p->path(),szN,new TQPixmap(*(p->pixmap()))); } void KviIconManager::clearCache() @@ -835,7 +835,7 @@ void KviIconManager::reloadImages() } -QPixmap * KviIconManager::loadSmallIcon(int idx) +TQPixmap * KviIconManager::loadSmallIcon(int idx) { if(idx >= KVI_NUM_SMALL_ICONS)return 0; if(idx < 0)return 0; @@ -846,14 +846,14 @@ QPixmap * KviIconManager::loadSmallIcon(int idx) // to preserve backward compatibility with old themes. // We lookup such files ONLY in the themes directories. - QString szFileName = KVI_SMALLICONS_IMAGELIB_PREFIX; + TQString szFileName = KVI_SMALLICONS_IMAGELIB_PREFIX; int fileidx = idx / 16; - if(fileidx >= 10)KviQString::appendFormatted(szFileName,"%d.png",fileidx); - else KviQString::appendFormatted(szFileName,"0%d.png",fileidx); + if(fileidx >= 10)KviTQString::appendFormatted(szFileName,"%d.png",fileidx); + else KviTQString::appendFormatted(szFileName,"0%d.png",fileidx); - QString buffer; + TQString buffer; if(g_pApp->findImageThemeOnlyCompat(buffer,szFileName)) { KviImageLibrary l1(buffer,16,16); @@ -865,18 +865,18 @@ QPixmap * KviIconManager::loadSmallIcon(int idx) int io = i + offset; if(io >= KVI_NUM_SMALL_ICONS)break; if(m_smallIcons[io])delete m_smallIcons[io]; - m_smallIcons[io] = new QPixmap(l1.getImage(i)); + m_smallIcons[io] = new TQPixmap(l1.getImage(i)); } return m_smallIcons[idx]; } // otherwise we use the NEW method: separate small icons in the "coresmall" subdirectory. - QString szPath; - KviQString::sprintf(szPath,KVI_SMALLICONS_PREFIX "%s.png",g_szIconNames[idx]); + TQString szPath; + KviTQString::sprintf(szPath,KVI_SMALLICONS_PREFIX "%s.png",g_szIconNames[idx]); g_pApp->findSmallIcon(buffer,szPath); - m_smallIcons[idx] = new QPixmap(buffer); + m_smallIcons[idx] = new TQPixmap(buffer); //if(m_smallIcon[idx]->isNull()) //{ @@ -887,9 +887,9 @@ QPixmap * KviIconManager::loadSmallIcon(int idx) void KviIconManager::cacheCleanup() { - QStringList l; + TQStringList l; - KviPointerHashTableIterator it(*m_pCachedImages); + KviPointerHashTableIterator it(*m_pCachedImages); //#warning "IMPLEMENT CLEANUP" @@ -907,7 +907,7 @@ void KviIconManager::cacheCleanup() ++it; } - for(QStringList::Iterator it = l.begin();it != l.end();++it) + for(TQStringList::Iterator it = l.begin();it != l.end();++it) { m_pCachedImages->remove(*it); } diff --git a/src/kvirc/kernel/kvi_iconmanager.h b/src/kvirc/kernel/kvi_iconmanager.h index d8f2abb9..62188f9d 100644 --- a/src/kvirc/kernel/kvi_iconmanager.h +++ b/src/kvirc/kernel/kvi_iconmanager.h @@ -30,9 +30,9 @@ #include "kvi_avatar.h" #include "kvi_time.h" -#include -#include -#include +#include +#include +#include #include "kvi_pointerhashtable.h" @@ -45,7 +45,7 @@ #define KVI_SMALLICON_DEFAULTICON 5 #define KVI_SMALLICON_DOCK 6 #define KVI_SMALLICON_UNDOCK 7 -#define KVI_SMALLICON_QUITAPP 8 +#define KVI_SMALLICON_TQUITAPP 8 #define KVI_SMALLICON_CONSOLE 9 #define KVI_SMALLICON_FLOPPY 10 #define KVI_SMALLICON_PARSERERROR 11 @@ -84,8 +84,8 @@ #define KVI_SMALLICON_DISCARD 44 #define KVI_SMALLICON_OWNPRIVMSG 45 #define KVI_SMALLICON_CHANPRIVMSG 46 -#define KVI_SMALLICON_QUERY 47 -#define KVI_SMALLICON_QUERYPRIVMSG 48 +#define KVI_SMALLICON_TQUERY 47 +#define KVI_SMALLICON_TQUERYPRIVMSG 48 #define KVI_SMALLICON_HELP 49 #define KVI_SMALLICON_MDIHELP 50 #define KVI_SMALLICON_CTCPREPLY 51 @@ -95,9 +95,9 @@ #define KVI_SMALLICON_CTCPREQUESTUNKNOWN 55 #define KVI_SMALLICON_ACTION 56 #define KVI_SMALLICON_AVATAR 57 -#define KVI_SMALLICON_QUIT 58 +#define KVI_SMALLICON_TQUIT 58 #define KVI_SMALLICON_SPLIT 59 -#define KVI_SMALLICON_QUITSPLIT 60 +#define KVI_SMALLICON_TQUITSPLIT 60 #define KVI_SMALLICON_NICK 61 #define KVI_SMALLICON_DEOP 62 #define KVI_SMALLICON_DEVOICE 63 @@ -139,7 +139,7 @@ #define KVI_SMALLICON_UNLOCKEDOFF 99 #define KVI_SMALLICON_OWNPRIVMSGCRYPTED 100 #define KVI_SMALLICON_CHANPRIVMSGCRYPTED 101 -#define KVI_SMALLICON_QUERYPRIVMSGCRYPTED 102 +#define KVI_SMALLICON_TQUERYPRIVMSGCRYPTED 102 #define KVI_SMALLICON_DCCCHATMSG 103 #define KVI_SMALLICON_DCCCHATMSGCRYPTED 104 #define KVI_SMALLICON_IRC 105 @@ -160,11 +160,11 @@ #define KVI_SMALLICON_SPAM 120 #define KVI_SMALLICON_FILE 121 #define KVI_SMALLICON_ICQ 122 -#define KVI_SMALLICON_ICQYELLOW 123 -#define KVI_SMALLICON_ICQRED 124 -#define KVI_SMALLICON_ICQBLUE 125 -#define KVI_SMALLICON_ICQLIGHTGREEN 126 -#define KVI_SMALLICON_ICQLIGHTYELLOW 127 +#define KVI_SMALLICON_ICTQYELLOW 123 +#define KVI_SMALLICON_ICTQRED 124 +#define KVI_SMALLICON_ICTQBLUE 125 +#define KVI_SMALLICON_ICTQLIGHTGREEN 126 +#define KVI_SMALLICON_ICTQLIGHTYELLOW 127 #define KVI_SMALLICON_MESSAGE 128 #define KVI_SMALLICON_MESSAGESENT 129 #define KVI_SMALLICON_BLUESQUARE 130 @@ -192,8 +192,8 @@ #define KVI_SMALLICON_ALIAS 152 #define KVI_SMALLICON_CHANNELNOTICE 153 #define KVI_SMALLICON_CHANNELNOTICECRYPTED 154 -#define KVI_SMALLICON_QUERYNOTICE 155 -#define KVI_SMALLICON_QUERYNOTICECRYPTED 156 +#define KVI_SMALLICON_TQUERYNOTICE 155 +#define KVI_SMALLICON_TQUERYNOTICECRYPTED 156 // FIXME: rename the icon 157: it was colliding with 141 #define KVI_SMALLICON_SERVNOTICE 157 #define KVI_SMALLICON_POPUP 158 @@ -219,7 +219,7 @@ #define KVI_SMALLICON_LOOK 178 #define KVI_SMALLICON_INPUT 179 #define KVI_SMALLICON_MESSAGES 180 -#define KVI_SMALLICON_QUERYTRACE 181 +#define KVI_SMALLICON_TQUERYTRACE 181 #define KVI_SMALLICON_NOCHANNEL 182 #define KVI_SMALLICON_BROADCASTPRIVMSG 183 #define KVI_SMALLICON_BROADCASTNOTICE 184 @@ -271,7 +271,7 @@ #define KVI_SMALLICON_CRY 230 #define KVI_SMALLICON_EYE 231 #define KVI_SMALLICON_DEADCHANNEL 232 -#define KVI_SMALLICON_DEADQUERY 233 +#define KVI_SMALLICON_DEADTQUERY 233 #define KVI_SMALLICON_SOUND 234 #define KVI_SMALLICON_TOOLBAR 235 #define KVI_SMALLICON_TEXTENCODING 236 @@ -376,34 +376,35 @@ class KviIconManager; class KVIRC_API KviCachedPixmap { public: - // the pixmap MUST be allocated with new QPixmap() + // the pixmap MUST be allocated with new TQPixmap() // this calss takes the ownership - KviCachedPixmap(QPixmap * ptr,const QString &szPath); + KviCachedPixmap(TQPixmap * ptr,const TQString &szPath); ~KviCachedPixmap(); private: - QString m_szPath; + TQString m_szPath; kvi_time_t m_tLastAccess; - QPixmap * m_pPixmap; + TQPixmap * m_pPixmap; unsigned int m_uSize; public: - QPixmap * pixmap(){ return m_pPixmap; }; - const QString & path(){ return m_szPath; }; + TQPixmap * pixmap(){ return m_pPixmap; }; + const TQString & path(){ return m_szPath; }; unsigned int size(){ return m_uSize; }; kvi_time_t lastAccessTime(){ return m_tLastAccess; }; void updateLastAccessTime(); }; -class KVIRC_API KviIconWidget : public QWidget +class KVIRC_API KviIconWidget : public TQWidget { Q_OBJECT + TQ_OBJECT public: KviIconWidget(); - KviIconWidget(QWidget * par); + KviIconWidget(TQWidget * par); ~KviIconWidget(); protected: void init(); - virtual void closeEvent(QCloseEvent *e); - virtual bool eventFilter(QObject * o,QEvent *e); + virtual void closeEvent(TQCloseEvent *e); + virtual bool eventFilter(TQObject * o,TQEvent *e); signals: void closed(); void selected(int iIcon); @@ -420,7 +421,7 @@ signals: // since it's a linear search...), are 16x16 in size and are indexed by numbers in a way that their // access is really fast. The icons used here are used mostly in KviIrcView (but not exclusively). // -// The generic images are just "any" image that the underlying Qt engine +// The generic images are just "any" image that the underlying TQt engine // is able to load. They are loaded by (relative) path and // cached by name. // @@ -430,66 +431,67 @@ signals: // to the size of 32x32 as a big icon too. // -class KVIRC_API KviIconManager : public QObject +class KVIRC_API KviIconManager : public TQObject { Q_OBJECT + TQ_OBJECT public: KviIconManager(); ~KviIconManager(); private: - QPixmap * m_smallIcons[KVI_NUM_SMALL_ICONS]; + TQPixmap * m_smallIcons[KVI_NUM_SMALL_ICONS]; KviIconWidget * m_pIconWidget; - KviPointerHashTable * m_pCachedImages; - KviPointerHashTable * m_pIconNames; + KviPointerHashTable * m_pCachedImages; + KviPointerHashTable * m_pIconNames; unsigned int m_uCacheTotalSize; unsigned int m_uCacheMaxSize; public: // WARNING: Don't store this pointer! // id == filename | number that indicates an internal pixmap // 0 stands for "any" - QPixmap * getImage(const char * id,bool bCanBeNumber = true,QString* pRetPath = 0); + TQPixmap * getImage(const char * id,bool bCanBeNumber = true,TQString* pRetPath = 0); // The returned pointer is owned by the icon manager // and can be deleted at any time : so don't store it - KviCachedPixmap * getPixmapWithCache(const QString &szName); + KviCachedPixmap * getPixmapWithCache(const TQString &szName); // The returned pointer is owned by the icon manager // and can be deleted at any time : so don't store it - KviCachedPixmap * getPixmapWithCacheScaleOnLoad(const QString &szName,int iMaxWidth,int iMaxHeight); + KviCachedPixmap * getPixmapWithCacheScaleOnLoad(const TQString &szName,int iMaxWidth,int iMaxHeight); // The returned pointer is owned by the icon manager // and can be deleted at any time : so don't store it - QPixmap * getPixmap(const QString &szName) + TQPixmap * getPixmap(const TQString &szName) { KviCachedPixmap * p = getPixmapWithCache(szName); return p ? p->pixmap() : 0; }; // this one never fails... if the image can't be found // a default 32x32 image is returned - QPixmap * getBigIcon(const QString &szName); + TQPixmap * getBigIcon(const TQString &szName); // this one never fails... if the icon isn't there // then a default 16x16 image is returned - QPixmap * getSmallIcon(int idx){ return idx < KVI_NUM_SMALL_ICONS ? (m_smallIcons[idx] ? m_smallIcons[idx] : loadSmallIcon(idx) ) : 0; }; + TQPixmap * getSmallIcon(int idx){ return idx < KVI_NUM_SMALL_ICONS ? (m_smallIcons[idx] ? m_smallIcons[idx] : loadSmallIcon(idx) ) : 0; }; const char * getSmallIconName(int idx); - int getSmallIconIdFromName(const QString &szName); + int getSmallIconIdFromName(const TQString &szName); // if szLocalPath is empty then szName can be the identification // string for the avatar // if szName is empty then it is found from szLocalPath - KviAvatar * getAvatar(const QString &szLocalPath,const QString &szName); + KviAvatar * getAvatar(const TQString &szLocalPath,const TQString &szName); void urlToCachedFileName(KviStr &szFName); - void urlToCachedFileName(QString &szFName); + void urlToCachedFileName(TQString &szFName); void clearCache(); void reloadImages(); void cacheCleanup(); protected: - void addToCache(const QString &szName,KviCachedPixmap * p); + void addToCache(const TQString &szName,KviCachedPixmap * p); //void loadSmallIcons(); - QPixmap * loadSmallIcon(int idx); + TQPixmap * loadSmallIcon(int idx); public slots: void showIconWidget(); protected slots: diff --git a/src/kvirc/kernel/kvi_internalcmd.h b/src/kvirc/kernel/kvi_internalcmd.h index 533dfc05..8ac0343d 100644 --- a/src/kvirc/kernel/kvi_internalcmd.h +++ b/src/kvirc/kernel/kvi_internalcmd.h @@ -56,7 +56,7 @@ #define KVI_INTERNALCOMMAND_POPUPEDITOR_OPEN 29 #define KVI_INTERNALCOMMAND_EXECUTE_SCRIPT_FROM_DISK 30 #define KVI_INTERNALCOMMAND_ACTIONEDITOR_OPEN 31 -#define KVI_INTERNALCOMMAND_QUIT 32 +#define KVI_INTERNALCOMMAND_TQUIT 32 #define KVI_INTERNALCOMMAND_KVIRC_HOMEPAGE_RU 33 #define KVI_INTERNALCOMMAND_OPENURL_KVIRC_ON_FREENODE 34 #define KVI_INTERNALCOMMAND_OPENURL_KVIRC_ON_IRCNET 35 diff --git a/src/kvirc/kernel/kvi_ipc.cpp b/src/kvirc/kernel/kvi_ipc.cpp index 3927f275..376ce7ab 100644 --- a/src/kvirc/kernel/kvi_ipc.cpp +++ b/src/kvirc/kernel/kvi_ipc.cpp @@ -38,11 +38,11 @@ static HWND kvi_win_findIpcSentinel() { - HWND hWnd = ::FindWindow("QWidget","[Non-Commercial] - kvirc_ipc_sentinel"); + HWND hWnd = ::FindWindow(TQWIDGET_OBJECT_NAME_STRING,"[Non-Commercial] - kvirc_ipc_sentinel"); if(hWnd)return hWnd; - hWnd = ::FindWindow("QWidget","[Freeware] - kvirc_ipc_sentinel"); + hWnd = ::FindWindow(TQWIDGET_OBJECT_NAME_STRING,"[Freeware] - kvirc_ipc_sentinel"); if(hWnd)return hWnd; - hWnd = ::FindWindow("QWidget","kvirc_ipc_sentinel"); + hWnd = ::FindWindow(TQWIDGET_OBJECT_NAME_STRING,"kvirc_ipc_sentinel"); return hWnd; } @@ -55,7 +55,7 @@ #include // for getuid #ifdef COMPILE_USE_QT4 - #include + #include #define kvi_ipc_get_xdisplay QX11Info::display #define kvi_ipc_get_xrootwin QX11Info::appRootWindow #else @@ -107,22 +107,22 @@ } } - Window root,parent; - Window * children; + Window root,tqparent; + Window * tqchildren; unsigned int nChildren; - if(!XQueryTree(kvi_ipc_get_xdisplay(),win,&root,&parent,&children,&nChildren)) + if(!XQueryTree(kvi_ipc_get_xdisplay(),win,&root,&tqparent,&tqchildren,&nChildren)) { - if(children)XFree((char *)children); + if(tqchildren)XFree((char *)tqchildren); return 0; } Window found = 0; for(int i=nChildren-1;(!found) && (i >= 0);i--) - found = kvi_x11_findIpcSentinel(children[i]); + found = kvi_x11_findIpcSentinel(tqchildren[i]); - if(children)XFree((char *)children); + if(tqchildren)XFree((char *)tqchildren); return found; } @@ -186,7 +186,7 @@ ////////////////////////////////////////////////////////////////////// KviIpcSentinel::KviIpcSentinel() - : QWidget(0,"kvirc_ipc_sentinel") + : TQWidget(0,"kvirc_ipc_sentinel") { #ifdef COMPILE_ON_WINDOWS setCaption("kvirc_ipc_sentinel"); diff --git a/src/kvirc/kernel/kvi_ipc.h b/src/kvirc/kernel/kvi_ipc.h index 432c2615..7317baa9 100644 --- a/src/kvirc/kernel/kvi_ipc.h +++ b/src/kvirc/kernel/kvi_ipc.h @@ -31,7 +31,7 @@ #include "kvi_string.h" - #include + #include #ifdef COMPILE_ON_WINDOWS #include @@ -41,7 +41,7 @@ #ifdef COMPILE_USE_QT4 // We need this to be included BEFORE X11/Xlib.h // because of preprocessor constant collisions... - #include + #include #endif #include "kvi_xlib.h" // for XEvent #endif //!COMPILE_NO_X @@ -52,9 +52,10 @@ // ////////////////////////////////////////////////////////////////////// - class KVIRC_API KviIpcSentinel : public QWidget + class KVIRC_API KviIpcSentinel : public TQWidget { Q_OBJECT + TQ_OBJECT public: KviIpcSentinel(); ~KviIpcSentinel(); diff --git a/src/kvirc/kernel/kvi_ircconnection.cpp b/src/kvirc/kernel/kvi_ircconnection.cpp index 4bf59055..0748501a 100644 --- a/src/kvirc/kernel/kvi_ircconnection.cpp +++ b/src/kvirc/kernel/kvi_ircconnection.cpp @@ -66,15 +66,15 @@ #include "kvi_mirccntrl.h" #include "kvi_useridentity.h" -#include -#include +#include +#include extern KVIRC_API KviIrcServerDataBase * g_pIrcServerDataBase; extern KVIRC_API KviProxyDataBase * g_pProxyDataBase; extern KVIRC_API KviGarbageCollector * g_pGarbageCollector; KviIrcConnection::KviIrcConnection(KviIrcContext * pContext,KviIrcConnectionTarget * pTarget,KviUserIdentity * pIdentity) -: QObject() +: TQObject() { m_bIdentdAttached = false; m_pContext = pContext; @@ -109,7 +109,7 @@ KviIrcConnection::~KviIrcConnection() m_bIdentdAttached = false; if(m_pLocalhostDns) { - QObject::disconnect(m_pLocalhostDns,SIGNAL(lookupDone(KviDns *)),0,0); + TQObject::disconnect(m_pLocalhostDns,TQT_SIGNAL(lookupDone(KviDns *)),0,0); if(m_pLocalhostDns->isRunning()) { g_pGarbageCollector->collect(m_pLocalhostDns); @@ -149,16 +149,16 @@ KviIrcConnection::~KviIrcConnection() delete m_pUserIdentity; } -void KviIrcConnection::setEncoding(const QString &szEncoding) +void KviIrcConnection::setEncoding(const TQString &szEncoding) { - QTextCodec * c = KviLocale::codecForName(szEncoding.latin1()); + TQTextCodec * c = KviLocale::codecForName(szEncoding.latin1()); if(c == m_pTextCodec)return; if(!c) { m_pConsole->output(KVI_OUT_SYSTEMERROR,__tr2qs("Failed to set the encoding to %Q: mapping not available."),&szEncoding); return; } - QString tmp = c->name(); + TQString tmp = c->name(); for(KviChannel * ch = m_pChannelList->first();ch;ch = m_pChannelList->next()) { if((ch->textCodec() != c) && (ch->textCodec() != ch->defaultTextCodec())) // actually not using the default! @@ -186,7 +186,7 @@ void KviIrcConnection::setupTextCodec() if(!m_pTarget->server()->encoding().isEmpty()) { m_pTextCodec = KviLocale::codecForName(m_pTarget->server()->encoding().latin1()); - if(!m_pTextCodec)debug("KviIrcConnection: can't find QTextCodec for encoding %s",m_pTarget->server()->encoding().utf8().data()); + if(!m_pTextCodec)debug("KviIrcConnection: can't find TQTextCodec for encoding %s",m_pTarget->server()->encoding().utf8().data()); } if(!m_pTextCodec) { @@ -194,29 +194,29 @@ void KviIrcConnection::setupTextCodec() if(!m_pTarget->network()->encoding().isEmpty()) { m_pTextCodec = KviLocale::codecForName(m_pTarget->network()->encoding().latin1()); - if(!m_pTextCodec)debug("KviIrcConnection: can't find QTextCodec for encoding %s",m_pTarget->network()->encoding().utf8().data()); + if(!m_pTextCodec)debug("KviIrcConnection: can't find TQTextCodec for encoding %s",m_pTarget->network()->encoding().utf8().data()); } } if(!m_pTextCodec) { m_pTextCodec = KviApp::defaultTextCodec(); } - m_pConsole->setTextEncoding(QString(m_pTextCodec->name())); + m_pConsole->setTextEncoding(TQString(m_pTextCodec->name())); } -KviQCString KviIrcConnection::encodeText(const QString &szText) +KviTQCString KviIrcConnection::encodeText(const TQString &szText) { if(!m_pTextCodec)return szText.utf8(); return m_pTextCodec->fromUnicode(szText); } -QString KviIrcConnection::decodeText(const char * szText) +TQString KviIrcConnection::decodeText(const char * szText) { - if(!m_pTextCodec)return QString(szText); + if(!m_pTextCodec)return TQString(szText); return m_pTextCodec->toUnicode(szText); } -void KviIrcConnection::serverInfoReceived(const QString &szServerName,const QString &szUserModes,const QString &szChanModes) +void KviIrcConnection::serverInfoReceived(const TQString &szServerName,const TQString &szUserModes,const TQString &szChanModes) { serverInfo()->setName(szServerName); serverInfo()->setSupportedUserModes(szUserModes); @@ -225,17 +225,17 @@ void KviIrcConnection::serverInfoReceived(const QString &szServerName,const QStr m_pFrame->childConnectionServerInfoChange(this); } -const QString & KviIrcConnection::currentServerName() +const TQString & KviIrcConnection::currentServerName() { return serverInfo()->name(); } -const QString & KviIrcConnection::currentNickName() +const TQString & KviIrcConnection::currentNickName() { return userInfo()->nickName(); } -const QString & KviIrcConnection::currentUserName() +const TQString & KviIrcConnection::currentUserName() { return userInfo()->userName(); } @@ -250,7 +250,7 @@ KviProxy * KviIrcConnection::proxy() return m_pTarget->proxy(); } -const QString & KviIrcConnection::networkName() +const TQString & KviIrcConnection::networkName() { return m_pTarget->networkName(); } @@ -341,16 +341,16 @@ void KviIrcConnection::linkAttemptFailed(int iError) context()->connectionFailed(iError); } -KviChannel * KviIrcConnection::findChannel(const QString &name) +KviChannel * KviIrcConnection::findChannel(const TQString &name) { for(KviChannel * c = m_pChannelList->first();c;c = m_pChannelList->next()) { - if(KviQString::equalCI(name,c->windowName()))return c; + if(KviTQString::equalCI(name,c->windowName()))return c; } return 0; } -int KviIrcConnection::getCommonChannels(const QString &nick,QString &szChansBuffer,bool bAddEscapeSequences) +int KviIrcConnection::getCommonChannels(const TQString &nick,TQString &szChansBuffer,bool bAddEscapeSequences) { int count = 0; for(KviChannel * c = m_pChannelList->first();c;c = m_pChannelList->next()) @@ -361,9 +361,9 @@ int KviIrcConnection::getCommonChannels(const QString &nick,QString &szChansBuff char uFlag = c->getUserFlag(nick); if(uFlag) { - KviQString::appendFormatted(szChansBuffer,bAddEscapeSequences ? "%c\r!c\r%Q\r" : "%c%Q",uFlag,&(c->windowName())); + KviTQString::appendFormatted(szChansBuffer,bAddEscapeSequences ? "%c\r!c\r%Q\r" : "%c%Q",uFlag,&(c->windowName())); } else { - if(bAddEscapeSequences)KviQString::appendFormatted(szChansBuffer,"\r!c\r%Q\r",&(c->windowName())); + if(bAddEscapeSequences)KviTQString::appendFormatted(szChansBuffer,"\r!c\r%Q\r",&(c->windowName())); else szChansBuffer.append(c->windowName()); } count++; @@ -408,7 +408,7 @@ void KviIrcConnection::closeAllQueries() } } -KviChannel * KviIrcConnection::createChannel(const QString &szName) +KviChannel * KviIrcConnection::createChannel(const TQString &szName) { KviChannel * c = m_pContext->findDeadChannel(szName); if(c) @@ -427,7 +427,7 @@ KviChannel * KviIrcConnection::createChannel(const QString &szName) return c; } -KviQuery * KviIrcConnection::createQuery(const QString &szNick) +KviQuery * KviIrcConnection::createQuery(const TQString &szNick) { KviQuery * q = m_pContext->findDeadQuery(szNick); if(!q) @@ -451,11 +451,11 @@ KviQuery * KviIrcConnection::createQuery(const QString &szNick) return q; } -KviQuery * KviIrcConnection::findQuery(const QString &name) +KviQuery * KviIrcConnection::findQuery(const TQString &name) { for(KviQuery * c = m_pQueryList->first();c;c = m_pQueryList->next()) { - if(KviQString::equalCI(name,c->windowName()))return c; + if(KviTQString::equalCI(name,c->windowName()))return c; } return 0; } @@ -599,8 +599,8 @@ void KviIrcConnection::delayedStartNotifyList() __range_invalid(m_pNotifyListTimer); if(m_pNotifyListTimer)delete m_pNotifyListTimer; - m_pNotifyListTimer = new QTimer(); - connect(m_pNotifyListTimer,SIGNAL(timeout()),this,SLOT(restartNotifyList())); + m_pNotifyListTimer = new TQTimer(); + connect(m_pNotifyListTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(restartNotifyList())); m_pNotifyListTimer->start(15000,true); // This delay is large enough to fire after the MOTD has been sent, @@ -663,7 +663,7 @@ void KviIrcConnection::restartLagMeter() void KviIrcConnection::resolveLocalHost() { - QString szIp; + TQString szIp; if(!socket()->getLocalHostIp(szIp,server()->isIpV6())) { @@ -697,7 +697,7 @@ void KviIrcConnection::resolveLocalHost() } } else { m_pUserInfo->setLocalHostIp(szIp); - if(!_OUTPUT_QUIET) + if(!_OUTPUT_TQUIET) m_pConsole->output(KVI_OUT_SYSTEMMESSAGE,__tr2qs("Local host address is %Q"), &(m_pUserInfo->localHostIp())); } @@ -718,12 +718,12 @@ void KviIrcConnection::changeAwayState(bool bAway) emit awayStateChanged(); } -void KviIrcConnection::userInfoReceived(const QString &szUserName,const QString &szHostName) +void KviIrcConnection::userInfoReceived(const TQString &szUserName,const TQString &szHostName) { userInfo()->setUserName(szUserName); - QString szUnmaskedHost = m_pUserInfo->unmaskedHostName(); + TQString szUntqmaskedHost = m_pUserInfo->untqmaskedHostName(); // Update the user entry - KviIrcUserEntry * e = userDataBase()->find(userInfo()->nickName()); + KviIrcUserEntry * e = userDataBase()->tqfind(userInfo()->nickName()); if(e) // should be there! (we have the permanent entry in the notify list view) { e->setUser(szUserName); @@ -732,13 +732,13 @@ void KviIrcConnection::userInfoReceived(const QString &szUserName,const QString if(szHostName.isEmpty())return; // nothing to do anyway - if(KviQString::equalCS(m_pUserInfo->hostName(),szHostName))return; // again nothing to do + if(KviTQString::equalCS(m_pUserInfo->hostName(),szHostName))return; // again nothing to do static bool warned_once = false; if(!warned_once) { - if(!(m_pUserInfo->hostName().isEmpty() || KviQString::equalCS(m_pUserInfo->hostName(),m_pUserInfo->localHostIp()))) + if(!(m_pUserInfo->hostName().isEmpty() || KviTQString::equalCS(m_pUserInfo->hostName(),m_pUserInfo->localHostIp()))) { // ok, something weird is probably going on // is is non-empty and it is NOT the IP address we have set @@ -792,27 +792,27 @@ void KviIrcConnection::userInfoReceived(const QString &szUserName,const QString m_pUserInfo->setHostIp(szHostName); } else #ifdef COMPILE_IPV6_SUPPORT - if(KviNetUtils::isValidStringIp(szUnmaskedHost) || KviNetUtils::isValidStringIp_V6(szUnmaskedHost)) + if(KviNetUtils::isValidStringIp(szUntqmaskedHost) || KviNetUtils::isValidStringIp_V6(szUntqmaskedHost)) #else - if(KviNetUtils::isValidStringIp(szUnmaskedHost)) + if(KviNetUtils::isValidStringIp(szUntqmaskedHost)) #endif { if(!_OUTPUT_MUTE) - m_pConsole->output(KVI_OUT_SYSTEMMESSAGE,__tr2qs("The local IP address as seen by the IRC server is %Q"),&szUnmaskedHost); - m_pUserInfo->setHostIp(szUnmaskedHost); + m_pConsole->output(KVI_OUT_SYSTEMMESSAGE,__tr2qs("The local IP address as seen by the IRC server is %Q"),&szUntqmaskedHost); + m_pUserInfo->setHostIp(szUntqmaskedHost); } else { // look it up too if(m_pLocalhostDns)delete m_pLocalhostDns; // it could be only another local host lookup m_pLocalhostDns = new KviDns(); - connect(m_pLocalhostDns,SIGNAL(lookupDone(KviDns *)),this,SLOT(hostNameLookupTerminated(KviDns *))); + connect(m_pLocalhostDns,TQT_SIGNAL(lookupDone(KviDns *)),this,TQT_SLOT(hostNameLookupTerminated(KviDns *))); if(!m_pLocalhostDns->lookup(szHostName,KviDns::Any)) { if(!_OUTPUT_MUTE) { // don't change the string to aid the translators - QString szTmp = __tr2qs("Can't start the DNS slave thread"); + TQString szTmp = __tr2qs("Can't start the DNS slave thread"); m_pConsole->output(KVI_OUT_SYSTEMMESSAGE,__tr2qs("Unable to resolve the local hostname as seen by the IRC server: %Q"),&szTmp); } delete m_pLocalhostDns; @@ -838,7 +838,7 @@ void KviIrcConnection::hostNameLookupTerminated(KviDns *pDns) if(m_pLocalhostDns->state() != KviDns::Success) { - QString szErr = KviError::getDescription(m_pLocalhostDns->error()); + TQString szErr = KviError::getDescription(m_pLocalhostDns->error()); if(!m_pUserInfo->hostIp().isEmpty()) m_pConsole->output(KVI_OUT_SYSTEMMESSAGE,__tr2qs("Unable to resolve the local hostname as seen by the IRC server: %Q, using previously resolved %Q"), &szErr,&(m_pUserInfo->hostIp())); @@ -846,7 +846,7 @@ void KviIrcConnection::hostNameLookupTerminated(KviDns *pDns) m_pConsole->output(KVI_OUT_SYSTEMMESSAGE,__tr2qs("Unable to resolve the local hostname as seen by the IRC server: %Q"), &szErr); } else { - QString szIpAddr = m_pLocalhostDns->firstIpAddress(); + TQString szIpAddr = m_pLocalhostDns->firstIpAddress(); m_pConsole->output(KVI_OUT_SYSTEMMESSAGE,__tr2qs("Local hostname as seen by the IRC server resolved to %Q"),&szIpAddr); m_pUserInfo->setHostIp(m_pLocalhostDns->firstIpAddress()); } @@ -936,9 +936,9 @@ void KviIrcConnection::loginToIrcServer() // FIXME: The server's encoding! setupTextCodec(); - KviQCString szNick = encodeText(m_pUserInfo->nickName()); // never empty - KviQCString szUser = encodeText(m_pUserInfo->userName()); // never empty - KviQCString szReal = encodeText(m_pUserInfo->realName()); // may be empty + KviTQCString szNick = encodeText(m_pUserInfo->nickName()); // never empty + KviTQCString szUser = encodeText(m_pUserInfo->userName()); // never empty + KviTQCString szReal = encodeText(m_pUserInfo->realName()); // may be empty if(!szReal.data())szReal = ""; @@ -977,23 +977,23 @@ void KviIrcConnection::loginToIrcServer() return; } - QString szGenderTag; + TQString szGenderTag; if(KVI_OPTION_BOOL(KviOption_boolPrependGenderInfoToRealname) && !KVI_OPTION_STRING(KviOption_stringCtcpUserInfoGender).isEmpty()) { szGenderTag.append(KVI_TEXT_COLOR); - if(KVI_OPTION_STRING(KviOption_stringCtcpUserInfoGender).startsWith("m",false)) + if(KVI_OPTION_STRING(KviOption_stringCtcpUserInfoGender).tqstartsWith("m",false)) { szGenderTag.append("1"); - } else if(KVI_OPTION_STRING(KviOption_stringCtcpUserInfoGender).startsWith("f",false)) + } else if(KVI_OPTION_STRING(KviOption_stringCtcpUserInfoGender).tqstartsWith("f",false)) { szGenderTag.append("2"); } szGenderTag.append(KVI_TEXT_RESET); - szReal.prepend(KviQString::toUtf8(szGenderTag)); + szReal.prepend(KviTQString::toUtf8(szGenderTag)); } if(!sendFmtData("USER %s 0 %s :%s",szUser.data(), - KviQString::toUtf8(pServer->m_szHostname).data(),szReal.data())) + KviTQString::toUtf8(pServer->m_szHostname).data(),szReal.data())) { // disconnected in the meantime! return; @@ -1003,7 +1003,7 @@ void KviIrcConnection::loginToIrcServer() m_pConsole->notifyListView()->join(m_pUserInfo->nickName(),"*","*"); // set own avatar if we have it - KviIrcUserEntry * e = userDataBase()->find(userInfo()->nickName()); + KviIrcUserEntry * e = userDataBase()->tqfind(userInfo()->nickName()); if(e) // should be there! { if(!e->avatar()) @@ -1017,15 +1017,15 @@ void KviIrcConnection::loginToIrcServer() } } // else buuug - if(KVI_OPTION_STRING(KviOption_stringCtcpUserInfoGender).startsWith("m",false)){ + if(KVI_OPTION_STRING(KviOption_stringCtcpUserInfoGender).tqstartsWith("m",false)){ e->setGender(KviIrcUserEntry::Male); - } else if(KVI_OPTION_STRING(KviOption_stringCtcpUserInfoGender).startsWith("f",false)){ + } else if(KVI_OPTION_STRING(KviOption_stringCtcpUserInfoGender).tqstartsWith("f",false)){ e->setGender(KviIrcUserEntry::Female); } // on connect stuff ? - QString tmp = pNet->onConnectCommand(); + TQString tmp = pNet->onConnectCommand(); tmp.stripWhiteSpace(); if(!tmp.isEmpty()) { @@ -1055,7 +1055,7 @@ void KviIrcConnection::loginToIrcServer() // and wait for the server to agree... } -void KviIrcConnection::nickChange(const QString &szNewNick) +void KviIrcConnection::nickChange(const TQString &szNewNick) { // FIXME: should the new nickname be decoded in some way ? m_pConsole->notifyListView()->nickChange(m_pUserInfo->nickName(),szNewNick); @@ -1084,7 +1084,7 @@ bool KviIrcConnection::changeUserMode(char mode,bool bSet) return true; } -void KviIrcConnection::loginComplete(const QString &szNickName) +void KviIrcConnection::loginComplete(const TQString &szNickName) { if(context()->state() == KviIrcContext::Connected)return; @@ -1115,7 +1115,7 @@ void KviIrcConnection::loginComplete(const QString &szNickName) resurrectDeadQueries(); // on connect stuff ? - QString tmp = target()->network()->onLoginCommand(); + TQString tmp = target()->network()->onLoginCommand(); tmp.stripWhiteSpace(); if(!tmp.isEmpty()) { @@ -1151,7 +1151,7 @@ void KviIrcConnection::loginComplete(const QString &szNickName) { if(_OUTPUT_VERBOSE) m_pConsole->output(KVI_OUT_VERBOSE,__tr2qs("Setting configured user mode")); - sendFmtData("MODE %s +%s",encodeText(QString(m_pUserInfo->nickName())).data(),modeStr.ptr()); + sendFmtData("MODE %s +%s",encodeText(TQString(m_pUserInfo->nickName())).data(),modeStr.ptr()); } delayedStartNotifyList(); @@ -1162,7 +1162,7 @@ void KviIrcConnection::loginComplete(const QString &szNickName) // join saved channels - QString szChannels,szProtectedChannels,szPasswords,szCurPass,szCurChan; + TQString szChannels,szProtectedChannels,szPasswords,szCurPass,szCurChan; if(!(m_pStateData->commandToExecAfterConnect().isEmpty())) { @@ -1177,19 +1177,19 @@ void KviIrcConnection::loginComplete(const QString &szNickName) KviQuery * query; - for(QStringList::Iterator it = target()->server()->m_pReconnectInfo->m_szOpenQueryes.begin(); + for(TQStringList::Iterator it = target()->server()->m_pReconnectInfo->m_szOpenQueryes.begin(); it != target()->server()->m_pReconnectInfo->m_szOpenQueryes.end();it++) { - QString szNick = *it; + TQString szNick = *it; query = findQuery(szNick); if(!query) { query = createQuery(szNick); - QString user; - QString host; + TQString user; + TQString host; KviIrcUserDataBase * db = userDataBase(); if(db) { - KviIrcUserEntry * e = db->find(szNick); + KviIrcUserEntry * e = db->tqfind(szNick); if(e) { user = e->user(); @@ -1209,10 +1209,10 @@ void KviIrcConnection::loginComplete(const QString &szNickName) if(_OUTPUT_VERBOSE) m_pConsole->output(KVI_OUT_VERBOSE,__tr2qs("Auto-joining network specific channels")); - QStringList * l = target()->network()->autoJoinChannelList(); + TQStringList * l = target()->network()->autoJoinChannelList(); if(l->count()!=0) { - for ( QStringList::Iterator it = l->begin(); it != l->end(); ++it ) { + for ( TQStringList::Iterator it = l->begin(); it != l->end(); ++it ) { szCurPass=(*it).section(':',1); if(szCurPass.isEmpty()) @@ -1243,10 +1243,10 @@ void KviIrcConnection::loginComplete(const QString &szNickName) if(_OUTPUT_VERBOSE) m_pConsole->output(KVI_OUT_VERBOSE,__tr2qs("Auto-joining server specific channels")); - QStringList * l = server()->autoJoinChannelList(); + TQStringList * l = server()->autoJoinChannelList(); if(l->count()!=0) { - for ( QStringList::Iterator it = l->begin(); it != l->end(); ++it ) { + for ( TQStringList::Iterator it = l->begin(); it != l->end(); ++it ) { szCurPass=(*it).section(':',1); if(szCurPass.isEmpty()) { @@ -1271,7 +1271,7 @@ void KviIrcConnection::loginComplete(const QString &szNickName) } } - QString szCommand; + TQString szCommand; if( (!szChannels.isEmpty()) || (!szProtectedChannels.isEmpty()) ) { szCommand.append(szProtectedChannels); @@ -1336,7 +1336,7 @@ void KviIrcConnection::heartbeat(kvi_time_t tNow) { // ok, sent the request for this channel stateData()->setLastSentChannelWhoRequest(tNow); - QString szChanName = encodeText(pOldest->name()); + TQString szChanName = encodeText(pOldest->name()); if(_OUTPUT_PARANOIC) console()->output(KVI_OUT_VERBOSE,__tr2qs("Updating away state for channel %Q"),&szChanName); if(lagMeter()) @@ -1345,7 +1345,7 @@ void KviIrcConnection::heartbeat(kvi_time_t tNow) lagMeter()->lagCheckRegister(tmp.ptr(),70); } pOldest->setSentSyncWhoRequest(); - if(!sendFmtData("WHO %s",encodeText(QString(pOldest->name())).data()))return; + if(!sendFmtData("WHO %s",encodeText(TQString(pOldest->name())).data()))return; } } } diff --git a/src/kvirc/kernel/kvi_ircconnection.h b/src/kvirc/kernel/kvi_ircconnection.h index fc6acf25..28609ea5 100644 --- a/src/kvirc/kernel/kvi_ircconnection.h +++ b/src/kvirc/kernel/kvi_ircconnection.h @@ -29,7 +29,7 @@ #include "kvi_qcstring.h" #include "kvi_pointerlist.h" #include "kvi_time.h" -#include +#include class KviConsole; class KviIrcNetworkData; @@ -56,17 +56,18 @@ class KviNotifyListManager; class KviDns; class KviUserIdentity; -class QTimer; -class QTextCodec; +class TQTimer; +class TQTextCodec; -class KVIRC_API KviIrcConnection : public QObject +class KVIRC_API KviIrcConnection : public TQObject { friend class KviConsole; friend class KviIrcContext; friend class KviIrcLink; friend class KviServerParser; Q_OBJECT + TQ_OBJECT public: // only KviConsole can create this // pContext must NOT be null @@ -104,7 +105,7 @@ private: KviIrcUserDataBase * m_pUserDataBase; // owned, never null KviNotifyListManager * m_pNotifyListManager; // owned, see restartNotifyList() - QTimer * m_pNotifyListTimer; // delayed startup timer for the notify lists + TQTimer * m_pNotifyListTimer; // delayed startup timer for the notify lists KviLagMeter * m_pLagMeter; // owned, may be null (when not running) @@ -116,7 +117,7 @@ private: KviDns * m_pLocalhostDns; // FIXME: this should go to an aux structure - QTextCodec * m_pTextCodec; // connection codec: never null + TQTextCodec * m_pTextCodec; // connection codec: never null public: // returns a pointer to the owning console // the pointer is NEVER null @@ -138,7 +139,7 @@ public: // the current state State state(){ return m_eState; }; // forwarder from KviIrcConnectionTarget, always non-empty string - const QString & networkName(); + const TQString & networkName(); // never null! KviIrcUserDataBase * userDataBase(){ return m_pUserDataBase; }; // never null. Use #include "kvi_ircconnectionuserinfo.h" @@ -160,14 +161,14 @@ public: // may be null (when not running) KviLagMeter * lagMeter(){ return m_pLagMeter; }; // should be never null.. but if really everything goes wrong, it might be... - QTextCodec * textCodec(){ return m_pTextCodec; }; + TQTextCodec * textCodec(){ return m_pTextCodec; }; public: // helper (really common access to userInfo()->nickName()) - const QString & currentNickName(); + const TQString & currentNickName(); // helper (really common access to userInfo()->userName()) - const QString & currentUserName(); + const TQString & currentUserName(); // helper (really common access to serverInfo()->name()) - const QString & currentServerName(); + const TQString & currentServerName(); // world interface: the following three functions use m_pLink->sendPacket() bool sendData(const char *buffer,int buflen = -1); @@ -176,15 +177,15 @@ public: // channel management // // ----> KviChannelManager ? - KviChannel * findChannel(const QString &name); + KviChannel * findChannel(const TQString &name); KviPointerList * channelList(){ return m_pChannelList; }; - int getCommonChannels(const QString &nick,QString &szChansBuffer,bool bAddEscapeSequences = true); - KviChannel * createChannel(const QString &name); + int getCommonChannels(const TQString &nick,TQString &szChansBuffer,bool bAddEscapeSequences = true); + KviChannel * createChannel(const TQString &name); void registerChannel(KviChannel *c); void unregisterChannel(KviChannel *c); void keepChannelsOpenAfterDisconnect(); void closeAllChannels(); - void setEncoding(const QString &szEncoding); + void setEncoding(const TQString &szEncoding); public slots: void partAllChannels(); void unhighlightAllChannels(); @@ -196,9 +197,9 @@ public: // query management // // ----> KviQueryManager ? - KviQuery * findQuery(const QString &nick); + KviQuery * findQuery(const TQString &nick); KviPointerList * queryList(){ return m_pQueryList; }; - KviQuery * createQuery(const QString &nick); + KviQuery * createQuery(const TQString &nick); void registerQuery(KviQuery *q); void unregisterQuery(KviQuery *q); void keepQueriesOpenAfterDisconnect(); @@ -221,17 +222,17 @@ protected: // called to start the notify lists when RPL_ENDOFMOTD is received void endOfMotdReceived(); // called when RPL_SERVINFO (004) is received - void serverInfoReceived(const QString &szServerName,const QString &szUserModes,const QString &szChanModes); + void serverInfoReceived(const TQString &szServerName,const TQString &szUserModes,const TQString &szChanModes); // called to update the away state void changeAwayState(bool bAway); // called on each JOIN (but meaningful almost only on the first one) (FIXME: call it also on other messages ?) - void userInfoReceived(const QString &szUserName,const QString &szHostName); + void userInfoReceived(const TQString &szUserName,const TQString &szHostName); // called when NICK is received - void nickChange(const QString &szNewNick); + void nickChange(const TQString &szNewNick); // called when MODE is received for each mode character bool changeUserMode(char mode,bool bSet); // called on the first numerics received from server - void loginComplete(const QString &szNickName); + void loginComplete(const TQString &szNickName); private slots: void hostNameLookupTerminated(KviDns * pDns); protected: @@ -268,8 +269,8 @@ signals: void channelUnregistered(KviChannel*); void chanListChanged(); public: - QString decodeText(const char * szText); - KviQCString encodeText(const QString &szText); + TQString decodeText(const char * szText); + KviTQCString encodeText(const TQString &szText); private: void setupTextCodec(); }; diff --git a/src/kvirc/kernel/kvi_ircconnectionasyncwhoisdata.cpp b/src/kvirc/kernel/kvi_ircconnectionasyncwhoisdata.cpp index fce0a23e..ecbd7866 100644 --- a/src/kvirc/kernel/kvi_ircconnectionasyncwhoisdata.cpp +++ b/src/kvirc/kernel/kvi_ircconnectionasyncwhoisdata.cpp @@ -59,12 +59,12 @@ void KviIrcConnectionAsyncWhoisData::add(KviAsyncWhoisInfo * i) m_pWhoisInfoList->append(i); } -KviAsyncWhoisInfo * KviIrcConnectionAsyncWhoisData::lookup(const QString &nick) +KviAsyncWhoisInfo * KviIrcConnectionAsyncWhoisData::lookup(const TQString &nick) { if(!m_pWhoisInfoList)return 0; for(KviAsyncWhoisInfo * i = m_pWhoisInfoList->first();i;i = m_pWhoisInfoList->next()) { - if(KviQString::equalCI(nick,i->szNick))return i; + if(KviTQString::equalCI(nick,i->szNick))return i; } return 0; } diff --git a/src/kvirc/kernel/kvi_ircconnectionasyncwhoisdata.h b/src/kvirc/kernel/kvi_ircconnectionasyncwhoisdata.h index c623f64e..96d0c3c5 100644 --- a/src/kvirc/kernel/kvi_ircconnectionasyncwhoisdata.h +++ b/src/kvirc/kernel/kvi_ircconnectionasyncwhoisdata.h @@ -35,19 +35,19 @@ class KviKvsVariant; class KVIRC_API KviAsyncWhoisInfo { public: - QString szNick; - QString szUser; - QString szHost; - QString szReal; - QString szServer; - QString szIdle; - QString szSignon; - QString szChannels; - QString szSpecial; + TQString szNick; + TQString szUser; + TQString szHost; + TQString szReal; + TQString szServer; + TQString szIdle; + TQString szSignon; + TQString szChannels; + TQString szSpecial; KviKvsScript * pCallback; KviKvsVariant * pMagic; - QString szCode; // <-- kill this when KVS is hardwired! - QString szMagic; // <-- kill this when KVS is hardwired! + TQString szCode; // <-- kill this when KVS is hardwired! + TQString szMagic; // <-- kill this when KVS is hardwired! KviWindow * pWindow; public: KviAsyncWhoisInfo(); @@ -65,7 +65,7 @@ protected: KviPointerList * m_pWhoisInfoList; // awhois pending stuff public: void add(KviAsyncWhoisInfo * i); - KviAsyncWhoisInfo * lookup(const QString &nick); + KviAsyncWhoisInfo * lookup(const TQString &nick); void remove(KviAsyncWhoisInfo * i); }; diff --git a/src/kvirc/kernel/kvi_ircconnectionnetsplitdetectordata.h b/src/kvirc/kernel/kvi_ircconnectionnetsplitdetectordata.h index 3aa96528..66ae4c09 100644 --- a/src/kvirc/kernel/kvi_ircconnectionnetsplitdetectordata.h +++ b/src/kvirc/kernel/kvi_ircconnectionnetsplitdetectordata.h @@ -34,11 +34,11 @@ public: KviIrcConnectionNetsplitDetectorData(); ~KviIrcConnectionNetsplitDetectorData(); protected: - QString m_szLastNetsplitOnQuitReason; + TQString m_szLastNetsplitOnQuitReason; kvi_time_t m_tLastNetsplitOnQuit; public: - const QString & lastNetsplitOnQuitReason(){ return m_szLastNetsplitOnQuitReason; }; - void setLastNetsplitOnQuitReason(const QString &szReason){ m_szLastNetsplitOnQuitReason = szReason; }; + const TQString & lastNetsplitOnQuitReason(){ return m_szLastNetsplitOnQuitReason; }; + void setLastNetsplitOnQuitReason(const TQString &szReason){ m_szLastNetsplitOnQuitReason = szReason; }; kvi_time_t lastNetsplitOnQuitTime(){ return m_tLastNetsplitOnQuit; }; void setLastNetsplitOnQuitTime(kvi_time_t t){ m_tLastNetsplitOnQuit = t; }; }; diff --git a/src/kvirc/kernel/kvi_ircconnectionserverinfo.cpp b/src/kvirc/kernel/kvi_ircconnectionserverinfo.cpp index e057aa09..ec82da51 100644 --- a/src/kvirc/kernel/kvi_ircconnectionserverinfo.cpp +++ b/src/kvirc/kernel/kvi_ircconnectionserverinfo.cpp @@ -53,29 +53,29 @@ KviIrcConnectionServerInfo::~KviIrcConnectionServerInfo() if(m_pModePrefixTable) kvi_free(m_pModePrefixTable); } -void KviIrcConnectionServerInfo::setSupportedChannelModes(const QString &szSupportedChannelModes) +void KviIrcConnectionServerInfo::setSupportedChannelModes(const TQString &szSupportedChannelModes) { int pos=-1; - pos=szSupportedChannelModes.find(','); + pos=szSupportedChannelModes.tqfind(','); if(pos>=0) m_szListModes=szSupportedChannelModes.left(pos); - pos=szSupportedChannelModes.findRev(','); + pos=szSupportedChannelModes.tqfindRev(','); if(pos>=0) m_szPlainModes=szSupportedChannelModes.right(szSupportedChannelModes.length()+pos-1); m_szSupportedChannelModes = szSupportedChannelModes; - m_bSupportsModesIe = (szSupportedChannelModes.contains('e') && szSupportedChannelModes.contains('I')); + m_bSupportsModesIe = (szSupportedChannelModes.tqcontains('e') && szSupportedChannelModes.tqcontains('I')); - QChar* aux=(QChar*)szSupportedChannelModes.ucs2(); - while(aux->unicode()) + TQChar* aux=(TQChar*)szSupportedChannelModes.ucs2(); + while(aux->tqunicode()) { - if(!m_szSupportedChannelModes.contains(*aux)) + if(!m_szSupportedChannelModes.tqcontains(*aux)) m_szSupportedChannelModes.append(*aux); aux++; } } -void KviIrcConnectionServerInfo::setSupportedModePrefixes(const QString &szSupportedModePrefixes,const QString &szSupportedModeFlags) +void KviIrcConnectionServerInfo::setSupportedModePrefixes(const TQString &szSupportedModePrefixes,const TQString &szSupportedModeFlags) { m_szSupportedModeFlags = szSupportedModeFlags; m_szSupportedModePrefixes = szSupportedModePrefixes; @@ -85,11 +85,11 @@ void KviIrcConnectionServerInfo::setSupportedModePrefixes(const QString &szSuppo void KviIrcConnectionServerInfo::buildModePrefixTable() { if(m_pModePrefixTable) kvi_free(m_pModePrefixTable); - const QChar * cPrefix = KviQString::nullTerminatedArray(m_szSupportedModePrefixes); - const QChar * cFlag = KviQString::nullTerminatedArray(m_szSupportedModeFlags); + const TQChar * cPrefix = KviTQString::nullTerminatedArray(m_szSupportedModePrefixes); + const TQChar * cFlag = KviTQString::nullTerminatedArray(m_szSupportedModeFlags); if(!cPrefix || !cFlag)return; // eh ? - m_uPrefixes=QMIN(m_szSupportedModePrefixes.length(),m_szSupportedModePrefixes.length()); + m_uPrefixes=TQMIN(m_szSupportedModePrefixes.length(),m_szSupportedModePrefixes.length()); m_pModePrefixTable=(kvi_u32_t*)kvi_malloc(sizeof(kvi_u32_t)*3*m_uPrefixes); unsigned short uPrefix,uFlag; @@ -98,7 +98,7 @@ void KviIrcConnectionServerInfo::buildModePrefixTable() // Alexey: FIXED: rethinked:) // Pragma: LOL :DDDD int i=0; - while( (uPrefix = cPrefix->unicode()) && (uFlag = cFlag->unicode()) && itqunicode()) && (uFlag = cFlag->tqunicode()) && igetRegisterModeChar() : 0; }; - const QString & name(){ return m_szName; }; - const QString & supportedUserModes(){ return m_szSupportedUserModes; }; - const QString & supportedChannelModes(){ return m_szSupportedChannelModes; }; - const QString & supportedChannelTypes(){ return m_szSupportedChannelTypes; }; - const QString & supportedModePrefixes(){ return m_szSupportedModePrefixes; }; - const QString & supportedModeFlags(){ return m_szSupportedModeFlags; }; - const QString & supportedListModes(){ return m_szListModes; }; - const QString & supportedPlainModes(){ return m_szPlainModes; }; + const TQString & name(){ return m_szName; }; + const TQString & supportedUserModes(){ return m_szSupportedUserModes; }; + const TQString & supportedChannelModes(){ return m_szSupportedChannelModes; }; + const TQString & supportedChannelTypes(){ return m_szSupportedChannelTypes; }; + const TQString & supportedModePrefixes(){ return m_szSupportedModePrefixes; }; + const TQString & supportedModeFlags(){ return m_szSupportedModeFlags; }; + const TQString & supportedListModes(){ return m_szListModes; }; + const TQString & supportedPlainModes(){ return m_szPlainModes; }; bool supportsModesIe(){ return m_bSupportsModesIe; }; bool supportsWatchList(){ return m_bSupportsWatchList; }; bool supportsCodePages(){ return m_bSupportsCodePages; }; @@ -113,23 +113,23 @@ public: int maxTopicLen() { return m_iMaxTopicLen; }; int maxModeChanges() { return m_iMaxModeChanges; }; - void setServerVersion(const QString & version); + void setServerVersion(const TQString & version); - const QString & getChannelModeDescription(QChar mode) { return m_pServInfo->getChannelModeDescription(mode); }; - const QString & getUserModeDescription(QChar mode) { return m_pServInfo->getUserModeDescription(mode); }; + const TQString & getChannelModeDescription(TQChar mode) { return m_pServInfo->getChannelModeDescription(mode); }; + const TQString & getUserModeDescription(TQChar mode) { return m_pServInfo->getUserModeDescription(mode); }; - bool isSupportedModePrefix(QChar c); - bool isSupportedModeFlag(QChar c); - QChar modePrefixChar(kvi_u32_t flag); - QChar modeFlagChar(kvi_u32_t flag); - kvi_u32_t modeFlagFromPrefixChar(QChar c); - kvi_u32_t modeFlagFromModeChar(QChar c); + bool isSupportedModePrefix(TQChar c); + bool isSupportedModeFlag(TQChar c); + TQChar modePrefixChar(kvi_u32_t flag); + TQChar modeFlagChar(kvi_u32_t flag); + kvi_u32_t modeFlagFromPrefixChar(TQChar c); + kvi_u32_t modeFlagFromModeChar(TQChar c); protected: - void setName(const QString &szName){ m_szName = szName; }; - void setSupportedUserModes(const QString &szSupportedUserModes){ m_szSupportedUserModes = szSupportedUserModes; }; - void setSupportedChannelModes(const QString &szSupportedChannelModes); - void setSupportedModePrefixes(const QString &szSupportedModePrefixes,const QString &szSupportedModeFlags); - void setSupportedChannelTypes(const QString &szSupportedChannelTypes){ m_szSupportedChannelTypes = szSupportedChannelTypes; }; + void setName(const TQString &szName){ m_szName = szName; }; + void setSupportedUserModes(const TQString &szSupportedUserModes){ m_szSupportedUserModes = szSupportedUserModes; }; + void setSupportedChannelModes(const TQString &szSupportedChannelModes); + void setSupportedModePrefixes(const TQString &szSupportedModePrefixes,const TQString &szSupportedModeFlags); + void setSupportedChannelTypes(const TQString &szSupportedChannelTypes){ m_szSupportedChannelTypes = szSupportedChannelTypes; }; void setSupportsWatchList(bool bSupportsWatchList){ m_bSupportsWatchList = bSupportsWatchList; }; void setSupportsCodePages(bool bSupportsCodePages){ m_bSupportsCodePages = bSupportsCodePages; }; void setMaxTopicLen( int iTopLen ) { m_iMaxTopicLen=iTopLen; }; diff --git a/src/kvirc/kernel/kvi_ircconnectionstatedata.h b/src/kvirc/kernel/kvi_ircconnectionstatedata.h index 3a70c749..7c9df71c 100644 --- a/src/kvirc/kernel/kvi_ircconnectionstatedata.h +++ b/src/kvirc/kernel/kvi_ircconnectionstatedata.h @@ -46,7 +46,7 @@ public: protected: bool m_bSentQuit; // have we sent the quit message for this connection ? unsigned int m_uLoginNickIndex; // the index of the identity nicknames used until now (see KviIrcConnection::loginToIrcServer()) - QString m_szCommandToExecAfterConnect; // yes.. this is a special command to execute after connection + TQString m_szCommandToExecAfterConnect; // yes.. this is a special command to execute after connection bool m_bSimulateUnexpectedDisconnect; // this is set to true if we have to simulate an unexpected disconnect even if we have sent a normal quit message kvi_time_t m_tLastReceivedChannelWhoReply; // the time that we have received our last channel who reply kvi_time_t m_tLastSentChannelWhoRequest; // the time that we have sent our last channel who request @@ -70,8 +70,8 @@ public: unsigned int loginNickIndex(){ return m_uLoginNickIndex; }; void setLoginNickIndex(unsigned int uNickIdx){ m_uLoginNickIndex = uNickIdx; }; - const QString & commandToExecAfterConnect(){ return m_szCommandToExecAfterConnect; }; - void setCommandToExecAfterConnect(const QString &szCmd){ m_szCommandToExecAfterConnect = szCmd; }; + const TQString & commandToExecAfterConnect(){ return m_szCommandToExecAfterConnect; }; + void setCommandToExecAfterConnect(const TQString &szCmd){ m_szCommandToExecAfterConnect = szCmd; }; }; #endif //!_KVI_IRCCONNECTIONSTATEDATA_H_ diff --git a/src/kvirc/kernel/kvi_ircconnectiontarget.cpp b/src/kvirc/kernel/kvi_ircconnectiontarget.cpp index 1c7e3bbb..a2bb2e28 100644 --- a/src/kvirc/kernel/kvi_ircconnectiontarget.cpp +++ b/src/kvirc/kernel/kvi_ircconnectiontarget.cpp @@ -31,7 +31,7 @@ KviIrcConnectionTarget::KviIrcConnectionTarget(const KviIrcNetwork * pNetwork, const KviIrcServer * pServer, const KviProxy * pProxy, - const QString &szBindAddress) + const TQString &szBindAddress) { m_pNetwork = new KviIrcNetwork(*pNetwork); m_pServer = new KviIrcServer(*pServer); @@ -46,12 +46,12 @@ KviIrcConnectionTarget::~KviIrcConnectionTarget() if(m_pProxy)delete m_pProxy; } -const QString & KviIrcConnectionTarget::networkName() +const TQString & KviIrcConnectionTarget::networkName() { return m_pNetwork->name(); } -void KviIrcConnectionTarget::setNetworkName(const QString &szNetName) +void KviIrcConnectionTarget::setNetworkName(const TQString &szNetName) { m_pNetwork->setName(szNetName); } diff --git a/src/kvirc/kernel/kvi_ircconnectiontarget.h b/src/kvirc/kernel/kvi_ircconnectiontarget.h index 31e179da..fa5d3ade 100644 --- a/src/kvirc/kernel/kvi_ircconnectiontarget.h +++ b/src/kvirc/kernel/kvi_ircconnectiontarget.h @@ -41,29 +41,29 @@ public: KviIrcConnectionTarget(const KviIrcNetwork * pNetwork, const KviIrcServer * pServer, const KviProxy * pProxy = 0, - const QString &szBindAddress = QString::null); + const TQString &szBindAddress = TQString()); ~KviIrcConnectionTarget(); private: KviIrcNetwork * m_pNetwork; // owned, never null KviIrcServer * m_pServer; // owned, never null KviProxy * m_pProxy; // owned, may be null - QString m_szBindAddress; // forced bind address + TQString m_szBindAddress; // forced bind address public: KviIrcServer * server(){ return m_pServer; }; KviIrcNetwork * network(){ return m_pNetwork; }; KviProxy * proxy(){ return m_pProxy; }; - const QString & bindAddress(){ return m_szBindAddress; }; + const TQString & bindAddress(){ return m_szBindAddress; }; bool hasBindAddress(){ return (!m_szBindAddress.isEmpty()); }; - const QString & networkName(); + const TQString & networkName(); // this allows to force the network name: it should be used only by KviConsole // but it's KviServerParser (kvi_sp_numeric.cpp) that first // gets the new network name... thus we make it public // to remove one level of indirection. - void setNetworkName(const QString &szNetName); + void setNetworkName(const TQString &szNetName); protected: // this is for KviIrcConnectionTargetResolver only void clearProxy(); - void setBindAddress(const QString &szBindAddress){ m_szBindAddress = szBindAddress; }; + void setBindAddress(const TQString &szBindAddress){ m_szBindAddress = szBindAddress; }; }; #endif //!_KVI_IRCCONNECTIONTARGET_H_ diff --git a/src/kvirc/kernel/kvi_ircconnectiontargetresolver.cpp b/src/kvirc/kernel/kvi_ircconnectiontargetresolver.cpp index 824993bb..49e88644 100644 --- a/src/kvirc/kernel/kvi_ircconnectiontargetresolver.cpp +++ b/src/kvirc/kernel/kvi_ircconnectiontargetresolver.cpp @@ -50,7 +50,7 @@ #define __KVI_DEBUG__ #include "kvi_debug.h" -#include +#include extern KVIRC_API KviIrcServerDataBase * g_pIrcServerDataBase; extern KVIRC_API KviProxyDataBase * g_pProxyDataBase; @@ -59,7 +59,7 @@ extern KVIRC_API KviGarbageCollector * g_pGarbageCollector; KviIrcConnectionTargetResolver::KviIrcConnectionTargetResolver(KviIrcConnection * pConnection) -: QObject() +: TQObject() { m_pConnection = pConnection; m_pTarget = 0; @@ -70,7 +70,7 @@ KviIrcConnectionTargetResolver::KviIrcConnectionTargetResolver(KviIrcConnection m_pServerDns = 0; m_eState = Idle; - m_eStatus = Success; + m_etqStatus = Success; m_iLastError = KviError_success; } @@ -126,8 +126,8 @@ void KviIrcConnectionTargetResolver::start(KviIrcConnectionTarget * t) delete m_pStartTimer; m_pStartTimer = 0; } - m_pStartTimer = new QTimer(this); - connect(m_pStartTimer,SIGNAL(timeout()),this,SLOT(asyncStartResolve())); + m_pStartTimer = new TQTimer(this); + connect(m_pStartTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(asyncStartResolve())); m_pTarget = t; @@ -189,7 +189,7 @@ void KviIrcConnectionTargetResolver::lookupProxyHostname() if(bValidIp) { - if(!_OUTPUT_QUIET) + if(!_OUTPUT_TQUIET) m_pConsole->output(KVI_OUT_SYSTEMMESSAGE, __tr2qs("Using cached proxy IP address (%s)"), m_pTarget->proxy()->m_szIp.ptr()); @@ -228,7 +228,7 @@ void KviIrcConnectionTargetResolver::lookupProxyHostname() } m_pProxyDns = new KviDns(); - connect(m_pProxyDns,SIGNAL(lookupDone(KviDns *)),this,SLOT(proxyLookupTerminated(KviDns *))); + connect(m_pProxyDns,TQT_SIGNAL(lookupDone(KviDns *)),this,TQT_SLOT(proxyLookupTerminated(KviDns *))); if(!m_pProxyDns->lookup(m_pTarget->proxy()->m_szHostname.ptr(), m_pTarget->proxy()->isIpV6() ? KviDns::IpV6 : KviDns::IpV4)) @@ -256,7 +256,7 @@ void KviIrcConnectionTargetResolver::proxyLookupTerminated(KviDns *) { if(m_pProxyDns->state() != KviDns::Success) { - QString szErr = KviError::getDescription(m_pProxyDns->error()); + TQString szErr = KviError::getDescription(m_pProxyDns->error()); m_pConsole->output(KVI_OUT_SYSTEMERROR, __tr2qs("Can't find the proxy IP address: %Q"), &szErr); @@ -265,7 +265,7 @@ void KviIrcConnectionTargetResolver::proxyLookupTerminated(KviDns *) __tr2qs("Resuming direct server connection")); m_pTarget->clearProxy(); } else { - QString szFirstIpAddress = m_pProxyDns->firstIpAddress(); + TQString szFirstIpAddress = m_pProxyDns->firstIpAddress(); if(!_OUTPUT_MUTE) m_pConsole->output(KVI_OUT_SYSTEMMESSAGE, __tr2qs("Proxy hostname resolved to %Q"),&szFirstIpAddress); @@ -275,11 +275,11 @@ void KviIrcConnectionTargetResolver::proxyLookupTerminated(KviDns *) if(m_pProxyDns->hostnameCount() > 1) { - QString szFirstHostname = m_pProxyDns->firstHostname(); + TQString szFirstHostname = m_pProxyDns->firstHostname(); - for(QString * addr = m_pProxyDns->hostnameList()->next();addr;addr = m_pProxyDns->hostnameList()->next()) + for(TQString * addr = m_pProxyDns->hostnameList()->next();addr;addr = m_pProxyDns->hostnameList()->next()) { - if(!_OUTPUT_QUIET) + if(!_OUTPUT_TQUIET) m_pConsole->output(KVI_OUT_SYSTEMMESSAGE, __tr2qs("Proxy %Q has a nickname: %Q"),&szFirstHostname,addr); } @@ -317,7 +317,7 @@ void KviIrcConnectionTargetResolver::lookupServerHostname() if(bValidIp && m_pTarget->server()->cacheIp()) { - if(!_OUTPUT_QUIET) + if(!_OUTPUT_TQUIET) m_pConsole->output(KVI_OUT_SYSTEMMESSAGE, __tr2qs("Using cached server IP address (%s)"), m_pTarget->server()->m_szIp.utf8().data()); @@ -345,8 +345,8 @@ void KviIrcConnectionTargetResolver::lookupServerHostname() m_pServerDns = 0; } m_pServerDns = new KviDns(); - connect(m_pServerDns,SIGNAL(lookupDone(KviDns *)),this, - SLOT(serverLookupTerminated(KviDns *))); + connect(m_pServerDns,TQT_SIGNAL(lookupDone(KviDns *)),this, + TQT_SLOT(serverLookupTerminated(KviDns *))); if(!m_pServerDns->lookup(m_pTarget->server()->m_szHostname, m_pTarget->server()->isIpV6() ? KviDns::IpV6 : KviDns::IpV4)) { @@ -368,7 +368,7 @@ void KviIrcConnectionTargetResolver::serverLookupTerminated(KviDns *) { if(m_pServerDns->state() != KviDns::Success) { - QString szErr = KviError::getDescription(m_pServerDns->error()); + TQString szErr = KviError::getDescription(m_pServerDns->error()); m_pConsole->output(KVI_OUT_SYSTEMERROR, __tr2qs("Can't find the server IP address: %Q"), &szErr); @@ -384,18 +384,18 @@ void KviIrcConnectionTargetResolver::serverLookupTerminated(KviDns *) terminate(Error,m_pServerDns->error()); return; } - QString szFirstIpAddress = m_pServerDns->firstIpAddress(); + TQString szFirstIpAddress = m_pServerDns->firstIpAddress(); if(!_OUTPUT_MUTE) m_pConsole->output(KVI_OUT_SYSTEMMESSAGE, __tr2qs("Server hostname resolved to %Q"), &szFirstIpAddress); g_pIrcServerDataBase->updateServerIp(m_pTarget->server(),szFirstIpAddress); - QString szFirstHostname = m_pServerDns->firstHostname(); + TQString szFirstHostname = m_pServerDns->firstHostname(); - if(!KviQString::equalCI(m_pTarget->server()->m_szHostname,m_pServerDns->firstHostname())) + if(!KviTQString::equalCI(m_pTarget->server()->m_szHostname,m_pServerDns->firstHostname())) { - if(!_OUTPUT_QUIET) + if(!_OUTPUT_TQUIET) m_pConsole->output(KVI_OUT_SYSTEMMESSAGE, __tr2qs("Real hostname for %Q is %Q"), &(m_pTarget->server()->m_szHostname), @@ -407,9 +407,9 @@ void KviIrcConnectionTargetResolver::serverLookupTerminated(KviDns *) if(m_pServerDns->hostnameCount() > 1) { - for(QString * addr = m_pServerDns->hostnameList()->next();addr;addr = m_pServerDns->hostnameList()->next()) + for(TQString * addr = m_pServerDns->hostnameList()->next();addr;addr = m_pServerDns->hostnameList()->next()) { - if(!_OUTPUT_QUIET) + if(!_OUTPUT_TQUIET) m_pConsole->output(KVI_OUT_SYSTEMMESSAGE, __tr2qs("Server %Q has a nickname: %Q"), &szFirstHostname,addr); @@ -421,7 +421,7 @@ void KviIrcConnectionTargetResolver::serverLookupTerminated(KviDns *) haveServerIp(); } -bool KviIrcConnectionTargetResolver::validateLocalAddress(const QString &szAddress,QString &szBuffer) +bool KviIrcConnectionTargetResolver::validateLocalAddress(const TQString &szAddress,TQString &szBuffer) { // szAddress may be an ip address or an interface name #ifdef COMPILE_IPV6_SUPPORT @@ -453,15 +453,15 @@ void KviIrcConnectionTargetResolver::haveServerIp() if(KVI_OPTION_BOOL(KviOption_boolUseIdentService) && !KVI_OPTION_BOOL(KviOption_boolUseIdentServiceOnlyOnConnect)) m_pConsole->frame()->executeInternalCommand(KVI_INTERNALCOMMAND_IDENT_START); - QString bindAddress; + TQString bindAddress; if(m_pTarget->hasBindAddress()) { if(!validateLocalAddress(m_pTarget->bindAddress(),bindAddress)) { - QString szBindAddress = m_pTarget->bindAddress(); - if((szBindAddress.find('.') != -1) || - (szBindAddress.find(':') != -1)) + TQString szBindAddress = m_pTarget->bindAddress(); + if((szBindAddress.tqfind('.') != -1) || + (szBindAddress.tqfind(':') != -1)) { if(!_OUTPUT_MUTE) m_pConsole->output(KVI_OUT_SYSTEMWARNING, @@ -486,7 +486,7 @@ void KviIrcConnectionTargetResolver::haveServerIp() if(!validateLocalAddress(KVI_OPTION_STRING(KviOption_stringIpV6ConnectionBindAddress),bindAddress)) { // if it is not an interface name , kill it for now and let the user correct the address - if(KVI_OPTION_STRING(KviOption_stringIpV6ConnectionBindAddress).find(':') != -1) + if(KVI_OPTION_STRING(KviOption_stringIpV6ConnectionBindAddress).tqfind(':') != -1) { if(!_OUTPUT_MUTE) m_pConsole->output(KVI_OUT_SYSTEMWARNING, @@ -515,7 +515,7 @@ void KviIrcConnectionTargetResolver::haveServerIp() if(!validateLocalAddress(KVI_OPTION_STRING(KviOption_stringIpV4ConnectionBindAddress),bindAddress)) { // if it is not an interface name , kill it for now and let the user correct the address - if(KVI_OPTION_STRING(KviOption_stringIpV4ConnectionBindAddress).find(':') != -1) + if(KVI_OPTION_STRING(KviOption_stringIpV4ConnectionBindAddress).tqfind(':') != -1) { if(!_OUTPUT_MUTE) m_pConsole->output(KVI_OUT_SYSTEMWARNING, @@ -544,12 +544,12 @@ void KviIrcConnectionTargetResolver::haveServerIp() terminate(Success,KviError_success); } -void KviIrcConnectionTargetResolver::terminate(Status s,int iLastError) +void KviIrcConnectionTargetResolver::terminate(tqStatus s,int iLastError) { __ASSERT(m_eState != Terminated); cleanup(); // do a cleanup anyway m_eState = Terminated; - m_eStatus = s; + m_etqStatus = s; m_iLastError = iLastError; emit terminated(); } diff --git a/src/kvirc/kernel/kvi_ircconnectiontargetresolver.h b/src/kvirc/kernel/kvi_ircconnectiontargetresolver.h index 947cc711..4d5d72c0 100644 --- a/src/kvirc/kernel/kvi_ircconnectiontargetresolver.h +++ b/src/kvirc/kernel/kvi_ircconnectiontargetresolver.h @@ -26,34 +26,35 @@ #include "kvi_settings.h" #include "kvi_qstring.h" -#include +#include class KviConsole; class KviDns; class KviIrcConnection; class KviIrcConnectionTarget; -class QTimer; +class TQTimer; -class KVIRC_API KviIrcConnectionTargetResolver : public QObject +class KVIRC_API KviIrcConnectionTargetResolver : public TQObject { friend class KviIrcLink; // upper protocol in the stack Q_OBJECT + TQ_OBJECT protected: KviIrcConnectionTargetResolver(KviIrcConnection * pConnection); ~KviIrcConnectionTargetResolver(); public: - enum Status { Success, Error }; + enum tqStatus { Success, Error }; enum State { Idle, Running, Terminated }; private: KviIrcConnection * m_pConnection; // shallow, never null KviIrcConnectionTarget * m_pTarget; // shallow, never null KviConsole * m_pConsole; // shallow, never null - Status m_eStatus; + tqStatus m_etqStatus; State m_eState; // Auxiliary stuff - QTimer * m_pStartTimer; // timer used to start the connection + TQTimer * m_pStartTimer; // timer used to start the connection KviDns * m_pProxyDns; // the dns object for the proxy hostnames KviDns * m_pServerDns; // the dns object for the server hostnames @@ -65,7 +66,7 @@ private: public: void start(KviIrcConnectionTarget * t); // valid only after the terminated() signal - Status status(){ return m_eStatus; }; + tqStatus status(){ return m_etqStatus; }; int lastError(){ return m_iLastError; }; // causes the resolver to terminate with iLastError == KviError_operationAborted // the terminated() signal is emitted. @@ -79,8 +80,8 @@ private: void lookupProxyHostname(); void lookupServerHostname(); void haveServerIp(); - bool validateLocalAddress(const QString &szAddress,QString &szBuffer); - void terminate(Status s,int iLastError); + bool validateLocalAddress(const TQString &szAddress,TQString &szBuffer); + void terminate(tqStatus s,int iLastError); signals: void terminated(); }; diff --git a/src/kvirc/kernel/kvi_ircconnectionuserinfo.cpp b/src/kvirc/kernel/kvi_ircconnectionuserinfo.cpp index f4d0ae4c..22674f00 100644 --- a/src/kvirc/kernel/kvi_ircconnectionuserinfo.cpp +++ b/src/kvirc/kernel/kvi_ircconnectionuserinfo.cpp @@ -31,23 +31,23 @@ KviIrcConnectionUserInfo::KviIrcConnectionUserInfo() m_bAway = false; } -bool KviIrcConnectionUserInfo::hasUserMode(const QChar &m) +bool KviIrcConnectionUserInfo::hasUserMode(const TQChar &m) { - return m_szUserMode.contains(m) > 0; + return m_szUserMode.tqcontains(m) > 0; } -bool KviIrcConnectionUserInfo::addUserMode(const QChar &m) +bool KviIrcConnectionUserInfo::addUserMode(const TQChar &m) { if(hasUserMode(m))return false; m_szUserMode.append(m); return true; } -bool KviIrcConnectionUserInfo::removeUserMode(const QChar &m) +bool KviIrcConnectionUserInfo::removeUserMode(const TQChar &m) { - int idx = m_szUserMode.find(m,0); + int idx = m_szUserMode.tqfind(m,0); if(idx == -1)return false; - m_szUserMode.replace(m,QString("")); + m_szUserMode.tqreplace(m,TQString("")); return true; } diff --git a/src/kvirc/kernel/kvi_ircconnectionuserinfo.h b/src/kvirc/kernel/kvi_ircconnectionuserinfo.h index fbb66ffd..ba1f1b86 100644 --- a/src/kvirc/kernel/kvi_ircconnectionuserinfo.h +++ b/src/kvirc/kernel/kvi_ircconnectionuserinfo.h @@ -37,50 +37,50 @@ protected: KviIrcConnectionUserInfo(); ~KviIrcConnectionUserInfo(){}; private: - QString m_szRealName; // the actual real name sent from the server - QString m_szNickName; // the actual nick name acknowledged by the server - QString m_szUserMode; // the actual user mode - QString m_szUserName; // user name with ident char - QString m_szLocalHostIp; // the local host ip as found by resolveLocalHost() at connection startup - QString m_szHostName; // the local host name that the server reports - QString m_szHostIp; // the host name above resolved, if possible - QString m_szAwayReason; + TQString m_szRealName; // the actual real name sent from the server + TQString m_szNickName; // the actual nick name acknowledged by the server + TQString m_szUserMode; // the actual user mode + TQString m_szUserName; // user name with ident char + TQString m_szLocalHostIp; // the local host ip as found by resolveLocalHost() at connection startup + TQString m_szHostName; // the local host name that the server reports + TQString m_szHostIp; // the host name above resolved, if possible + TQString m_szAwayReason; bool m_bAway; // is the user away ? kvi_time_t m_tAway; // time at that the user went away - QString m_szNickBeforeAway; // the nickname that the user had just before going away + TQString m_szNickBeforeAway; // the nickname that the user had just before going away // From bugtrack: - // On many IRC networks the host is masked or hashed, and if one also is connected through a LAN, + // On many IRC networks the host is tqmasked or hashed, and if one also is connected through a LAN, // it is basically impossible to initiate DCC transfers, as 192.168.0.13 or similar will be sent as IP. - // But IRC servers usually (at least in my experience) send the unmasked host in the 001 raw event + // But IRC servers usually (at least in my experience) send the untqmasked host in the 001 raw event // with something like ":Welcome to the Internet Relay Chat network, nick!ident@host". I think // it'd be a good idea to just grab the IP from that event and use it for DCC transfers by default. - QString m_szUnmaskedHostName; + TQString m_szUntqmaskedHostName; public: - const QString & realName(){ return m_szRealName; }; - const QString & nickName(){ return m_szNickName; }; - const QString & userMode(){ return m_szUserMode; }; - const QString & userName(){ return m_szUserName; }; - const QString & localHostIp(){ return m_szLocalHostIp; }; - const QString & hostName(){ return m_szHostName; }; - const QString & unmaskedHostName(){ return m_szUnmaskedHostName; }; - const QString & hostIp(){ return m_szHostIp; }; - const QString & awayReason() { return m_szAwayReason; }; - bool hasUserMode(const QChar & m); + const TQString & realName(){ return m_szRealName; }; + const TQString & nickName(){ return m_szNickName; }; + const TQString & userMode(){ return m_szUserMode; }; + const TQString & userName(){ return m_szUserName; }; + const TQString & localHostIp(){ return m_szLocalHostIp; }; + const TQString & hostName(){ return m_szHostName; }; + const TQString & untqmaskedHostName(){ return m_szUntqmaskedHostName; }; + const TQString & hostIp(){ return m_szHostIp; }; + const TQString & awayReason() { return m_szAwayReason; }; + bool hasUserMode(const TQChar & m); bool isAway(){ return m_bAway; }; time_t awayTime(){ return m_tAway; }; - const QString & nickNameBeforeAway(){ return m_szNickBeforeAway; }; + const TQString & nickNameBeforeAway(){ return m_szNickBeforeAway; }; protected: - void setRealName(const QString &szRealName){ m_szRealName = szRealName; }; - void setNickName(const QString &szNickName){ m_szNickName = szNickName; }; - void setUserMode(const QString &szUserMode){ m_szUserMode = szUserMode; }; - void setUserName(const QString &szUserName){ m_szUserName = szUserName; }; - void setHostName(const QString &szHostName){ m_szHostName = szHostName; }; - void setUnmaskedHostName(const QString &szHostName){ m_szUnmaskedHostName = szHostName; }; - void setHostIp(const QString &szHostIp){ m_szHostIp = szHostIp; }; - void setLocalHostIp(const QString &szLocalHostIp){ m_szLocalHostIp = szLocalHostIp; }; - bool addUserMode(const QChar &m); // returns false if the mode was already there - bool removeUserMode(const QChar &m); // returns fales if the mode was not there - void setAwayReason(const QString& szReazon) { m_szAwayReason=szReazon; }; + void setRealName(const TQString &szRealName){ m_szRealName = szRealName; }; + void setNickName(const TQString &szNickName){ m_szNickName = szNickName; }; + void setUserMode(const TQString &szUserMode){ m_szUserMode = szUserMode; }; + void setUserName(const TQString &szUserName){ m_szUserName = szUserName; }; + void setHostName(const TQString &szHostName){ m_szHostName = szHostName; }; + void setUntqmaskedHostName(const TQString &szHostName){ m_szUntqmaskedHostName = szHostName; }; + void setHostIp(const TQString &szHostIp){ m_szHostIp = szHostIp; }; + void setLocalHostIp(const TQString &szLocalHostIp){ m_szLocalHostIp = szLocalHostIp; }; + bool addUserMode(const TQChar &m); // returns false if the mode was already there + bool removeUserMode(const TQChar &m); // returns fales if the mode was not there + void setAwayReason(const TQString& szReazon) { m_szAwayReason=szReazon; }; void setAway(); void setBack(); }; diff --git a/src/kvirc/kernel/kvi_irccontext.cpp b/src/kvirc/kernel/kvi_irccontext.cpp index 34257588..ce71efa1 100644 --- a/src/kvirc/kernel/kvi_irccontext.cpp +++ b/src/kvirc/kernel/kvi_irccontext.cpp @@ -56,7 +56,7 @@ #define __KVI_DEBUG__ #include "kvi_debug.h" -#include +#include // the irc context identifiers start from 1 static unsigned int g_uNextIrcContextId = 1; @@ -66,7 +66,7 @@ extern KVIRC_API KviProxyDataBase * g_pProxyDataBase; KviIrcContext::KviIrcContext(KviConsole * pConsole) -: QObject(0) +: TQObject(0) { m_uId = g_uNextIrcContextId; g_uNextIrcContextId++; @@ -194,24 +194,24 @@ void KviIrcContext::closeAllContextWindows() } } -KviChannel * KviIrcContext::findDeadChannel(const QString &name) +KviChannel * KviIrcContext::findDeadChannel(const TQString &name) { if(!m_pDeadChannels)return 0; for(KviChannel * c = m_pDeadChannels->first();c;c = m_pDeadChannels->next()) { __range_valid(c->isDeadChan()); - if(KviQString::equalCI(name,c->windowName()))return c; + if(KviTQString::equalCI(name,c->windowName()))return c; } return 0; } -KviQuery * KviIrcContext::findDeadQuery(const QString &name) +KviQuery * KviIrcContext::findDeadQuery(const TQString &name) { if(!m_pDeadQueries)return 0; for(KviQuery * c = m_pDeadQueries->first();c;c = m_pDeadQueries->next()) { __range_valid(c->isDeadQuery()); - if(KviQString::equalCI(name,c->windowName()))return c; + if(KviTQString::equalCI(name,c->windowName()))return c; } return 0; } @@ -458,7 +458,7 @@ void KviIrcContext::connectToCurrentServer() d.szPass = m_pAsynchronousConnectionData->szPass; d.szNick = m_pAsynchronousConnectionData->szNick; d.szInitUMode = m_pAsynchronousConnectionData->szInitUMode; - QString szError; + TQString szError; if(!g_pIrcServerDataBase->makeCurrentServer(&d,szError)) { m_pConsole->outputNoFmt(KVI_OUT_SYSTEMERROR,szError); @@ -518,7 +518,7 @@ void KviIrcContext::connectToCurrentServer() const KviUserIdentity * pIdentity = 0; - QString szUserIdentityId = srv->userIdentityId(); + TQString szUserIdentityId = srv->userIdentityId(); if(!szUserIdentityId.isEmpty()) pIdentity = KviUserIdentityManager::instance()->findIdentity(szUserIdentityId); @@ -596,21 +596,21 @@ void KviIrcContext::connectionFailed(int iError) //FIXME: Multiply the delay by (m_uConnectAttemptCount / 2) so later connects are less frequent. if(!_OUTPUT_MUTE) { - QString tmp; - KviQString::sprintf(tmp,__tr2qs("Will attempt to reconnect in %d seconds"),KVI_OPTION_UINT(KviOption_uintAutoReconnectDelay)); - QString num; + TQString tmp; + KviTQString::sprintf(tmp,__tr2qs("Will attempt to reconnect in %d seconds"),KVI_OPTION_UINT(KviOption_uintAutoReconnectDelay)); + TQString num; if(!KVI_OPTION_UINT(KviOption_uintMaxAutoReconnectAttempts)) - KviQString::sprintf(num,__tr2qs("%d"),m_uConnectAttemptCount); + KviTQString::sprintf(num,__tr2qs("%d"),m_uConnectAttemptCount); else - KviQString::sprintf(num,__tr2qs("%d of %d"), + KviTQString::sprintf(num,__tr2qs("%d of %d"), m_uConnectAttemptCount,KVI_OPTION_UINT(KviOption_uintMaxAutoReconnectAttempts)); tmp += " [" + num + "]"; m_pConsole->outputNoFmt(KVI_OUT_SYSTEMMESSAGE,tmp); } KviIrcServer oldServer(*(connection()->server())); - QString oldNickname = connection()->userInfo()->isAway() ? connection()->userInfo()->nickNameBeforeAway() : connection()->userInfo()->nickName(); + TQString oldNickname = connection()->userInfo()->isAway() ? connection()->userInfo()->nickNameBeforeAway() : connection()->userInfo()->nickName(); KviAsynchronousConnectionData * d = new KviAsynchronousConnectionData(); d->szServer = oldServer.m_szHostname; @@ -678,7 +678,7 @@ void KviIrcContext::connectionEstabilished() } // Add to recent server list (build the url of type irc[6]://: - QString url; + TQString url; KviIrcUrl::join(url,connection()->server()); g_pApp->addRecentServer(url); @@ -698,12 +698,12 @@ void KviIrcContext::connectionTerminated() pInfo->m_bIsAway=connection()->userInfo()->isAway(); pInfo->m_szAwayReason=connection()->userInfo()->awayReason(); - // we consider it unexpected when we haven't sent a QUIT message and we're connected + // we consider it unexpected when we haven't sent a TQUIT message and we're connected // or alternatively when a simulation of such a termination is requested (this is used to keep the queries open etc..) bool bUnexpectedDisconnect = (!(connection()->stateData()->sentQuit())) && (m_eState == KviIrcContext::Connected) || connection()->stateData()->simulateUnexpectedDisconnect(); - QString szChannels,szProtectedChannels,szPasswords,szCurPass,szCurChan; + TQString szChannels,szProtectedChannels,szPasswords,szCurPass,szCurChan; if(bUnexpectedDisconnect) { @@ -714,7 +714,7 @@ void KviIrcContext::connectionTerminated() // FIXME: THIS SHOULD BE A KviIrcConnection FUNCTION int idx = 0; KviChannel * c; - QString szChannels,szProtectedChannels,szPasswords,szCurPass,szCurChan; + TQString szChannels,szProtectedChannels,szPasswords,szCurPass,szCurChan; // first only chans without key, in groups of 4 for(c = connection()->channelList()->first();c;c = connection()->channelList()->next()) { @@ -807,8 +807,8 @@ void KviIrcContext::connectionTerminated() void KviIrcContext::beginAsynchronousConnect(unsigned int uDelayInMSecs) { if(m_pReconnectTimer)delete m_pReconnectTimer; - m_pReconnectTimer = new QTimer(this); - connect(m_pReconnectTimer,SIGNAL(timeout()),this,SLOT(asynchronousConnect())); + m_pReconnectTimer = new TQTimer(this); + connect(m_pReconnectTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(asynchronousConnect())); m_pReconnectTimer->start(uDelayInMSecs); } @@ -828,7 +828,7 @@ void KviIrcContext::asynchronousConnect() } -void KviIrcContext::terminateConnectionRequest(bool bForce,const QString &szQuitMsg,bool bSimulateUnexpectedDisconnect) +void KviIrcContext::terminateConnectionRequest(bool bForce,const TQString &szQuitMsg,bool bSimulateUnexpectedDisconnect) { if(!connection())return; // hm ? @@ -843,20 +843,20 @@ void KviIrcContext::terminateConnectionRequest(bool bForce,const QString &szQuit if(!connection()->stateData()->sentQuit()) { KVS_TRIGGER_EVENT_0(KviEvent_OnDisconnectRequest,m_pConsole); - QString szQuit = szQuitMsg; + TQString szQuit = szQuitMsg; if(szQuit.isEmpty())szQuit = KVI_OPTION_STRING(KviOption_stringQuitMessage); - szQuit.replace(";","\\;"); - szQuit.replace("\n"," "); - QString buffer; + szQuit.tqreplace(";","\\;"); + szQuit.tqreplace("\n"," "); + TQString buffer; KviKvsVariant ret; if(KviKvsScript::evaluate(szQuit,console(),0,&ret)) ret.asString(buffer); else buffer = szQuit; - KviQCString dat = console()->encodeText(buffer); + KviTQCString dat = console()->encodeText(buffer); bWasSentQuit = false; connection()->stateData()->setSentQuit(); - connection()->sendFmtData("QUIT :%s",dat.data() ? dat.data() : ""); // here theoretically we COULD get disconnected + connection()->sendFmtData("TQUIT :%s",dat.data() ? dat.data() : ""); // here theoretically we COULD get disconnected } // else it was already sent anyway if(KVI_OPTION_BOOL(KviOption_boolForceBrutalQuit) || bWasSentQuit || bForce) @@ -871,7 +871,7 @@ void KviIrcContext::terminateConnectionRequest(bool bForce,const QString &szQuit if(connection())connection()->abort(); } else { if(!bWasSentQuit) - m_pConsole->outputNoFmt(KVI_OUT_SYSTEMMESSAGE,__tr2qs("Sent QUIT, waiting for the server to close the connection...")); + m_pConsole->outputNoFmt(KVI_OUT_SYSTEMMESSAGE,__tr2qs("Sent TQUIT, waiting for the server to close the connection...")); // else it was already sent anyway } } @@ -888,11 +888,11 @@ void KviIrcContext::terminateConnectionRequest(bool bForce,const QString &szQuit } } -void KviIrcContext::timerEvent(QTimerEvent *e) +void KviIrcContext::timerEvent(TQTimerEvent *e) { if(e->timerId() != m_iHeartbeatTimerId) { - QObject::timerEvent(e); + TQObject::timerEvent(e); return; } diff --git a/src/kvirc/kernel/kvi_irccontext.h b/src/kvirc/kernel/kvi_irccontext.h index 07c6ef97..8cad6759 100644 --- a/src/kvirc/kernel/kvi_irccontext.h +++ b/src/kvirc/kernel/kvi_irccontext.h @@ -26,7 +26,7 @@ #include "kvi_settings.h" #include "kvi_pointerlist.h" -#include +#include class KviChannel; class KviQuery; @@ -37,7 +37,7 @@ class KviExternalServerDataParser; class KviAsynchronousConnectionData; class KviIrcDataStreamMonitor; class KviWindow; -class QTimer; +class TQTimer; class KviConsole; class KviIrcNetwork; class KviIrcServer; @@ -55,7 +55,7 @@ class KviIrcServer; in the KviConsole destructor. No other class can allocate KviIrcContext objects. */ -class KVIRC_API KviIrcContext : public QObject +class KVIRC_API KviIrcContext : public TQObject { friend class KviConsole; friend class KviChannel; @@ -63,6 +63,7 @@ class KVIRC_API KviIrcContext : public QObject friend class KviIrcConnection; friend class KviIrcContextToolBar; Q_OBJECT + TQ_OBJECT protected: KviIrcContext(KviConsole * pConsole); // only KviConsole can create this public: @@ -94,7 +95,7 @@ protected: KviAsynchronousConnectionData * m_pSavedAsynchronousConnectionData; // owned, may be null, this is used to reconnect to the last server in this context unsigned int m_uConnectAttemptCount; - QTimer * m_pReconnectTimer; + TQTimer * m_pReconnectTimer; KviPointerList * m_pMonitorList; // owned, may be null @@ -124,8 +125,8 @@ public: bool unregisterDeadQuery(KviQuery * q); void registerDeadChannel(KviChannel * c); void registerDeadQuery(KviQuery * q); - KviChannel * findDeadChannel(const QString &name); - KviQuery * findDeadQuery(const QString &nick); + KviChannel * findDeadChannel(const TQString &name); + KviQuery * findDeadQuery(const TQString &nick); KviQuery * firstDeadQuery(); // other windows bound to the context void closeAllContextWindows(); @@ -155,7 +156,7 @@ public: void registerDataStreamMonitor(KviIrcDataStreamMonitor * m); void unregisterDataStreamMonitor(KviIrcDataStreamMonitor *m); - void terminateConnectionRequest(bool bForce,const QString &szQuitMessage = QString::null,bool bSimulateUnexpectedDisconnect = false); + void terminateConnectionRequest(bool bForce,const TQString &szQuitMessage = TQString(),bool bSimulateUnexpectedDisconnect = false); protected: // called by KviIrcContextToolBar: this will DIE in favor of connectOrDisconnect() @@ -167,7 +168,7 @@ protected: // called by KviIrcConnection void loginComplete(); // our heartbeat timer event - virtual void timerEvent(QTimerEvent *e); + virtual void timerEvent(TQTimerEvent *e); public: void connectOrDisconnect(){ connectButtonClicked(); }; protected: diff --git a/src/kvirc/kernel/kvi_irclink.cpp b/src/kvirc/kernel/kvi_irclink.cpp index 8c79507c..132da95e 100644 --- a/src/kvirc/kernel/kvi_irclink.cpp +++ b/src/kvirc/kernel/kvi_irclink.cpp @@ -50,7 +50,7 @@ #define __KVI_DEBUG__ #include "kvi_debug.h" -#include +#include extern KVIRC_API KviIrcServerDataBase * g_pIrcServerDataBase; extern KVIRC_API KviProxyDataBase * g_pProxyDataBase; @@ -59,7 +59,7 @@ extern KVIRC_API KviGarbageCollector * g_pGarbageCollector; KviIrcLink::KviIrcLink(KviIrcConnection * pConnection) -: QObject() +: TQObject() { m_pConnection = pConnection; m_pTarget = pConnection->target(); @@ -105,7 +105,7 @@ void KviIrcLink::destroySocket() { if(m_pLinkFilter) { - QObject::disconnect(m_pLinkFilter,0,this,0); + TQObject::disconnect(m_pLinkFilter,0,this,0); // the module extension server links must be destroyed in the module that provided it m_pLinkFilter->die(); m_pLinkFilter = 0; @@ -118,7 +118,7 @@ void KviIrcLink::destroySocket() } } -void KviIrcLink::createSocket(const QString &szLinkFilterName) +void KviIrcLink::createSocket(const TQString &szLinkFilterName) { destroySocket(); // make sure we do not leak memory @@ -126,14 +126,14 @@ void KviIrcLink::createSocket(const QString &szLinkFilterName) if(szLinkFilterName.isEmpty())return; - if(KviQString::equalCI(szLinkFilterName,"irc"))return; + if(KviTQString::equalCI(szLinkFilterName,"irc"))return; m_pLinkFilter = (KviMexLinkFilter *)g_pModuleExtensionManager->allocateExtension("linkfilter", szLinkFilterName.utf8().data(),m_pConsole,0,this,szLinkFilterName.utf8().data()); if(m_pLinkFilter) { - connect(m_pLinkFilter,SIGNAL(destroyed()),this,SLOT(linkFilterDestroyed())); + connect(m_pLinkFilter,TQT_SIGNAL(destroyed()),this,TQT_SLOT(linkFilterDestroyed())); m_pConsole->output(KVI_OUT_SYSTEMMESSAGE, __tr2qs("Using filtered IRC protocol: Link filter is \"%Q\""),&szLinkFilterName); return; @@ -167,7 +167,7 @@ void KviIrcLink::start() m_eState = Connecting; if(m_pResolver)delete m_pResolver; // this should never happen m_pResolver = new KviIrcConnectionTargetResolver(m_pConnection); - connect(m_pResolver,SIGNAL(terminated()),this,SLOT(resolverTerminated())); + connect(m_pResolver,TQT_SIGNAL(terminated()),this,TQT_SLOT(resolverTerminated())); m_pResolver->start(m_pTarget); } @@ -197,7 +197,7 @@ void KviIrcLink::resolverTerminated() if(iErr != KviError_success) { - QString strDescription(KviError::getDescription(iErr)); + TQString strDescription(KviError::getDescription(iErr)); m_pConsole->output(KVI_OUT_SYSTEMERROR, __tr2qs("Failed to start the connection: %Q"), &strDescription); @@ -276,7 +276,7 @@ void KviIrcLink::processData(char * buffer,int len) // handler event that disconnects explicitly) // // We handle it by simply returning control to readData() which - // will return immediately (and safely) control to Qt + // will return immediately (and safely) control to TQt kvi_free(messageBuffer); return; } diff --git a/src/kvirc/kernel/kvi_irclink.h b/src/kvirc/kernel/kvi_irclink.h index bb220ecf..1426d2e4 100644 --- a/src/kvirc/kernel/kvi_irclink.h +++ b/src/kvirc/kernel/kvi_irclink.h @@ -26,7 +26,7 @@ #include "kvi_settings.h" #include "kvi_qstring.h" -#include +#include class KviConsole; class KviIrcServer; @@ -40,11 +40,12 @@ class KviDataBuffer; class KviMexLinkFilter; -class KVIRC_API KviIrcLink : public QObject +class KVIRC_API KviIrcLink : public TQObject { friend class KviIrcConnection; // upper protocol in the stack friend class KviIrcSocket; // lower protocol in the stack Q_OBJECT + TQ_OBJECT public: enum State { Idle, Connecting, Connected }; protected: @@ -112,7 +113,7 @@ protected slots: void linkFilterDestroyed(); private: void destroySocket(); - void createSocket(const QString &szLinkFilterName); + void createSocket(const TQString &szLinkFilterName); signals: void connectionFailed(); // the connection attempt has failed private slots: diff --git a/src/kvirc/kernel/kvi_ircsocket.cpp b/src/kvirc/kernel/kvi_ircsocket.cpp index 45df5617..45852760 100644 --- a/src/kvirc/kernel/kvi_ircsocket.cpp +++ b/src/kvirc/kernel/kvi_ircsocket.cpp @@ -47,8 +47,8 @@ #include "kvi_sslmaster.h" #endif -#include -#include +#include +#include #ifndef COMPILE_ON_WINDOWS #include //for gettimeofday() @@ -63,7 +63,7 @@ unsigned int g_uNextIrcLinkId = 1; KviIrcSocket::KviIrcSocket(KviIrcLink * pLink) -: QObject() +: TQObject() { m_uId = g_uNextIrcLinkId; g_uNextIrcLinkId++; @@ -103,8 +103,8 @@ KviIrcSocket::KviIrcSocket(KviIrcLink * pLink) m_bInProcessData = false; - m_pFlushTimer = new QTimer(); // queue flush timer - connect(m_pFlushTimer,SIGNAL(timeout()),this,SLOT(flushSendQueue())); + m_pFlushTimer = new TQTimer(); // queue flush timer + connect(m_pFlushTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(flushSendQueue())); } KviIrcSocket::~KviIrcSocket() @@ -171,49 +171,49 @@ void KviIrcSocket::reset() setState(Idle); } -void KviIrcSocket::outputSSLMessage(const QString &szMsg) +void KviIrcSocket::outputSSLMessage(const TQString &szMsg) { m_pConsole->output(KVI_OUT_SSL,__tr2qs("[SSL]: %Q"),&szMsg); } -void KviIrcSocket::outputSSLError(const QString &szMsg) +void KviIrcSocket::outputSSLError(const TQString &szMsg) { m_pConsole->output(KVI_OUT_SSL,__tr2qs("[SSL ERROR]: %Q"),&szMsg); } -void KviIrcSocket::outputProxyMessage(const QString &szMsg) +void KviIrcSocket::outputProxyMessage(const TQString &szMsg) { - QStringList list=QStringList::split("\n",szMsg); - for(QStringList::Iterator it = list.begin(); it != list.end(); ++it) + TQStringList list=TQStringList::split("\n",szMsg); + for(TQStringList::Iterator it = list.begin(); it != list.end(); ++it) { - QString szTemporary = (*it).stripWhiteSpace(); + TQString szTemporary = (*it).stripWhiteSpace(); m_pConsole->output(KVI_OUT_SOCKETMESSAGE,__tr2qs("[PROXY]: %Q"),&(szTemporary)); } } -void KviIrcSocket::outputProxyError(const QString &szMsg) +void KviIrcSocket::outputProxyError(const TQString &szMsg) { - QStringList list=QStringList::split("\n",szMsg); - for(QStringList::Iterator it = list.begin(); it != list.end(); ++it) + TQStringList list=TQStringList::split("\n",szMsg); + for(TQStringList::Iterator it = list.begin(); it != list.end(); ++it) { - QString szTemporary = (*it).stripWhiteSpace(); + TQString szTemporary = (*it).stripWhiteSpace(); m_pConsole->output(KVI_OUT_SOCKETERROR,__tr2qs("[PROXY ERROR]: %Q"),&(szTemporary)); } } -void KviIrcSocket::outputSocketMessage(const QString &szMsg) +void KviIrcSocket::outputSocketMessage(const TQString &szMsg) { m_pConsole->output(KVI_OUT_SOCKETMESSAGE,__tr2qs("[SOCKET]: %Q"),&szMsg); } -void KviIrcSocket::outputSocketError(const QString &szMsg) +void KviIrcSocket::outputSocketError(const TQString &szMsg) { m_pConsole->output(KVI_OUT_SOCKETERROR,__tr2qs("[SOCKET ERROR]: %Q"),&szMsg); } -void KviIrcSocket::outputSocketWarning(const QString &szMsg) +void KviIrcSocket::outputSocketWarning(const TQString &szMsg) { m_pConsole->output(KVI_OUT_SOCKETWARNING,__tr2qs("[SOCKET WARNING]: %Q"),&szMsg); } @@ -273,7 +273,7 @@ int KviIrcSocket::startConnection(KviIrcServer *srv,KviProxy * prx,const char * // check the proxy IP address if(m_pProxy->isIpV6()) { - // IpV6 proxy :) (STILL QUITE UNTESTED ?) + // IpV6 proxy :) (STILL TQUITE UNTESTED ?) #ifdef COMPILE_IPV6_SUPPORT bTargetIpV6 = true; if(!kvi_isValidStringIp_V6(m_pProxy->ip()))return KviError_invalidProxyAddress; @@ -330,15 +330,15 @@ int KviIrcSocket::startConnection(KviIrcServer *srv,KviProxy * prx,const char * bBindOk = kvi_socket_bind(m_sock,localSa.socketAddress(),((int)(localSa.addressLength()))); } - QString tmp; + TQString tmp; if(bBindOk) { if(_OUTPUT_VERBOSE) - KviQString::sprintf(tmp,__tr2qs("Binding to local address %s"),bindAddress); + KviTQString::sprintf(tmp,__tr2qs("Binding to local address %s"),bindAddress); outputSocketMessage(tmp); } else { if(_OUTPUT_VERBOSE) - KviQString::sprintf(tmp,__tr2qs("Binding to local address %s failed: the kernel will choose the correct interface"),bindAddress); + KviTQString::sprintf(tmp,__tr2qs("Binding to local address %s failed: the kernel will choose the correct interface"),bindAddress); outputSocketWarning(tmp); } } @@ -374,14 +374,14 @@ int KviIrcSocket::startConnection(KviIrcServer *srv,KviProxy * prx,const char * } // and setup the WRITE notifier... - m_pWsn = new QSocketNotifier((int)m_sock,QSocketNotifier::Write); - QObject::connect(m_pWsn,SIGNAL(activated(int)),this,SLOT(writeNotifierFired(int))); + m_pWsn = new TQSocketNotifier((int)m_sock,TQSocketNotifier::Write); + TQObject::connect(m_pWsn,TQT_SIGNAL(activated(int)),this,TQT_SLOT(writeNotifierFired(int))); m_pWsn->setEnabled(true); // set the timer if(KVI_OPTION_UINT(KviOption_uintIrcSocketTimeout) < 5)KVI_OPTION_UINT(KviOption_uintIrcSocketTimeout) = 5; - m_pTimeoutTimer = new QTimer(); - QObject::connect(m_pTimeoutTimer,SIGNAL(timeout()),this,SLOT(connectionTimedOut())); + m_pTimeoutTimer = new TQTimer(); + TQObject::connect(m_pTimeoutTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(connectionTimedOut())); m_pTimeoutTimer->start(KVI_OPTION_UINT(KviOption_uintIrcSocketTimeout) * 1000,true); // and wait for connect @@ -456,9 +456,9 @@ void KviIrcSocket::connectedToProxy() m_pRsn = 0; } - m_pRsn = new QSocketNotifier((int)m_sock,QSocketNotifier::Read); + m_pRsn = new TQSocketNotifier((int)m_sock,TQSocketNotifier::Read); - QObject::connect(m_pRsn,SIGNAL(activated(int)),this,SLOT(readProxyData(int))); + TQObject::connect(m_pRsn,TQT_SIGNAL(activated(int)),this,TQT_SLOT(readProxyData(int))); switch(m_pProxy->protocol()) { @@ -696,7 +696,7 @@ void KviIrcSocket::proxyLoginV4() char *bufToSend = new char[iLen]; bufToSend[0]=(unsigned char)4; //Version 4 bufToSend[1]=(unsigned char)1; //Connect - Q_UINT16 port=(Q_UINT16)htons(m_pIrcServer->port()); + TQ_UINT16 port=(TQ_UINT16)htons(m_pIrcServer->port()); kvi_memmove((void *)(bufToSend+2),(void *)&port,2); struct in_addr ircInAddr; @@ -704,7 +704,7 @@ void KviIrcSocket::proxyLoginV4() if(!kvi_stringIpToBinaryIp(m_pIrcServer->ip(),&ircInAddr)) debug("SOCKET INTERNAL ERROR IN IPV4 (SOCKS4) ADDR CONVERSION"); - Q_UINT32 host=(Q_UINT32)ircInAddr.s_addr; + TQ_UINT32 host=(TQ_UINT32)ircInAddr.s_addr; kvi_memmove((void *)(bufToSend+4),(void *)&host,4); kvi_memmove((void *)(bufToSend+8),(void *)(szUserAndPass.ptr()),szUserAndPass.len()); // send it into hyperspace... @@ -741,9 +741,9 @@ void KviIrcSocket::proxyLoginV5() // The VER field is set to X'05' for this version of the protocol. The // NMETHODS field contains the number of method identifier octets that // appear in the METHODS field. - // The values currently defined for METHOD are: + // The values currently defined for TQT_METHOD are: // - // o X'00' NO AUTHENTICATION REQUIRED + // o X'00' NO AUTHENTICATION RETQUIRED // o X'01' GSSAPI // o X'02' USERNAME/PASSWORD // o X'03' CHAP @@ -908,7 +908,7 @@ void KviIrcSocket::proxySendTargetDataV5() kvi_memmove((void *)(bufToSend + 5), (void *)(m_pIrcServer->hostName().utf8().data()), m_pIrcServer->hostName().utf8().length()); - Q_UINT16 port = (Q_UINT16)htons(m_pIrcServer->port()); + TQ_UINT16 port = (TQ_UINT16)htons(m_pIrcServer->port()); kvi_memmove((void *)(bufToSend + 4 + 1 + m_pIrcServer->hostName().utf8().length()),(void *)&port,2); } else if(m_pIrcServer->isIpV6()) { #ifdef COMPILE_IPV6_SUPPORT @@ -916,16 +916,16 @@ void KviIrcSocket::proxySendTargetDataV5() if(!kvi_stringIpToBinaryIp_V6(m_pIrcServer->ip(),&ircInAddr))debug("SOCKET INTERNAL ERROR IN IPV6 ADDR CONVERSION"); kvi_memmove((void *)(bufToSend + 4),(void *)(&ircInAddr),4); - Q_UINT16 port = (Q_UINT16)htons(m_pIrcServer->port()); + TQ_UINT16 port = (TQ_UINT16)htons(m_pIrcServer->port()); kvi_memmove((void *)(bufToSend + 20),(void *)&port,2); #endif } else { struct in_addr ircInAddr; if(!kvi_stringIpToBinaryIp(m_pIrcServer->ip(),&ircInAddr))debug("SOCKET INTERNAL ERROR IN IPV4 ADDR CONVERSION"); - Q_UINT32 host = (Q_UINT32)ircInAddr.s_addr; + TQ_UINT32 host = (TQ_UINT32)ircInAddr.s_addr; kvi_memmove((void *)(bufToSend + 4),(void *)&host,4); - Q_UINT16 port = (Q_UINT16)htons(m_pIrcServer->port()); + TQ_UINT16 port = (TQ_UINT16)htons(m_pIrcServer->port()); kvi_memmove((void *)(bufToSend + 8),(void *)&port,2); } @@ -966,20 +966,20 @@ void KviIrcSocket::proxyHandleV5AuthReply(unsigned char reply) void KviIrcSocket::proxyHandleV5MethodReply(unsigned char reply) { // The server selects from one of the methods given in METHODS, and - // sends a METHOD selection message: + // sends a TQT_METHOD selection message: // // +----+--------+ - // |VER | METHOD | + // |VER | TQT_METHOD | // +----+--------+ // | 1 | 1 | // +----+--------+ // - // If the selected METHOD is X'FF', none of the methods listed by the + // If the selected TQT_METHOD is X'FF', none of the methods listed by the // client are acceptable, and the client MUST close the connection. // - // The values currently defined for METHOD are: + // The values currently defined for TQT_METHOD are: // - // o X'00' NO AUTHENTICATION REQUIRED + // o X'00' NO AUTHENTICATION RETQUIRED // o X'01' GSSAPI // o X'02' USERNAME/PASSWORD // o X'03' CHAP @@ -1150,7 +1150,7 @@ void KviIrcSocket::proxyHandleHttpFinalReply(const char * buffer,int bufLen) { if(idx == tmp.findFirstIdx(' ')) { - QString msg = __tr2qs("Proxy response: "); + TQString msg = __tr2qs("Proxy response: "); msg += tmp.ptr(); if(_OUTPUT_VERBOSE) outputProxyMessage(msg); @@ -1178,8 +1178,8 @@ void KviIrcSocket::proxyHandleHttpFinalReply(const char * buffer,int bufLen) m_pRsn = 0; } - m_pRsn = new QSocketNotifier((int)m_sock,QSocketNotifier::Read); - QObject::connect(m_pRsn,SIGNAL(activated(int)),this,SLOT(readHttpProxyErrorData(int))); + m_pRsn = new TQSocketNotifier((int)m_sock,TQSocketNotifier::Read); + TQObject::connect(m_pRsn,TQT_SIGNAL(activated(int)),this,TQT_SLOT(readHttpProxyErrorData(int))); m_pRsn->setEnabled(true); setState(ProxyHttpError); @@ -1268,13 +1268,13 @@ void KviIrcSocket::doSSLHandshake(int) linkUp(); break; case KviSSL::WantRead: - m_pRsn = new QSocketNotifier((int)m_sock,QSocketNotifier::Read); - QObject::connect(m_pRsn,SIGNAL(activated(int)),this,SLOT(doSSLHandshake(int))); + m_pRsn = new TQSocketNotifier((int)m_sock,TQSocketNotifier::Read); + TQObject::connect(m_pRsn,TQT_SIGNAL(activated(int)),this,TQT_SLOT(doSSLHandshake(int))); m_pRsn->setEnabled(true); break; case KviSSL::WantWrite: - m_pWsn = new QSocketNotifier((int)m_sock,QSocketNotifier::Write); - QObject::connect(m_pWsn,SIGNAL(activated(int)),this,SLOT(doSSLHandshake(int))); + m_pWsn = new TQSocketNotifier((int)m_sock,TQSocketNotifier::Write); + TQObject::connect(m_pWsn,TQT_SIGNAL(activated(int)),this,TQT_SLOT(doSSLHandshake(int))); m_pWsn->setEnabled(true); break; case KviSSL::RemoteEndClosedConnection: @@ -1296,8 +1296,8 @@ void KviIrcSocket::doSSLHandshake(int) raiseError((err ? KviError::translateSystemError(err) : KviError_unknownError)); } else { // can recover ? (EAGAIN , EINTR ?) - m_pWsn = new QSocketNotifier((int)m_sock,QSocketNotifier::Write); - QObject::connect(m_pWsn,SIGNAL(activated(int)),this,SLOT(doSSLHandshake(int))); + m_pWsn = new TQSocketNotifier((int)m_sock,TQSocketNotifier::Write); + TQObject::connect(m_pWsn,TQT_SIGNAL(activated(int)),this,TQT_SLOT(doSSLHandshake(int))); m_pWsn->setEnabled(true); return; } @@ -1340,8 +1340,8 @@ void KviIrcSocket::linkUp() m_pRsn = 0; } - m_pRsn = new QSocketNotifier((int)m_sock,QSocketNotifier::Read); - QObject::connect(m_pRsn,SIGNAL(activated(int)),this,SLOT(readData(int))); + m_pRsn = new TQSocketNotifier((int)m_sock,TQSocketNotifier::Read); + TQObject::connect(m_pRsn,TQT_SIGNAL(activated(int)),this,TQT_SLOT(readData(int))); m_pRsn->setEnabled(true); // yahoo! @@ -1505,7 +1505,7 @@ void KviIrcSocket::processData(char * buffer,int) // handler event that disconnects explicitly) // // We handle it by simply returning control to readData() which - // will return immediately (and safely) control to Qt + // will return immediately (and safely) control to TQt kvi_free(messageBuffer); m_bInProcessData = false; return; @@ -1647,7 +1647,7 @@ void KviIrcSocket::queue_removeAllMessages() // // Attempts to send as much as possible to the server // If fails (happens only on really lagged servers) -// calls itself with a QTimer shot after KVI_OPTION_UINT(KviOption_uintSocketQueueFlushTimeout) ms +// calls itself with a TQTimer shot after KVI_OPTION_UINT(KviOption_uintSocketQueueFlushTimeout) ms // to retry again... // void KviIrcSocket::flushSendQueue() @@ -1800,7 +1800,7 @@ handle_system_error: //flushed completely ... } -bool KviIrcSocket::getLocalHostIp(QString &szIp,bool bIpV6) +bool KviIrcSocket::getLocalHostIp(TQString &szIp,bool bIpV6) { if(m_state != Connected)return false; diff --git a/src/kvirc/kernel/kvi_ircsocket.h b/src/kvirc/kernel/kvi_ircsocket.h index 4946fd28..b17f9357 100644 --- a/src/kvirc/kernel/kvi_ircsocket.h +++ b/src/kvirc/kernel/kvi_ircsocket.h @@ -30,7 +30,7 @@ #include "kvi_time.h" #include "kvi_pointerlist.h" -#include +#include class KviIrcServer; class KviProxy; @@ -41,8 +41,8 @@ class KviSSL; class KviConsole; class KviDataBuffer; -class QTimer; -class QSocketNotifier; +class TQTimer; +class TQSocketNotifier; // // This class is the lowest level of the KVIrc networking stack @@ -58,9 +58,10 @@ typedef struct _KviIrcSocketMsgEntry } KviIrcSocketMsgEntry; -class KVIRC_API KviIrcSocket : public QObject +class KVIRC_API KviIrcSocket : public TQObject { Q_OBJECT + TQ_OBJECT public: KviIrcSocket(KviIrcLink * pLink); ~KviIrcSocket(); @@ -84,18 +85,18 @@ protected: KviConsole * m_pConsole; kvi_socket_t m_sock; SocketState m_state; - QSocketNotifier * m_pWsn; - QSocketNotifier * m_pRsn; + TQSocketNotifier * m_pWsn; + TQSocketNotifier * m_pRsn; KviIrcServer * m_pIrcServer; KviProxy * m_pProxy; - QTimer * m_pTimeoutTimer; + TQTimer * m_pTimeoutTimer; unsigned int m_uReadBytes; unsigned int m_uSentBytes; int m_iLastError; unsigned int m_uSentPackets; KviIrcSocketMsgEntry * m_pSendQueueHead; KviIrcSocketMsgEntry * m_pSendQueueTail; - QTimer * m_pFlushTimer; + TQTimer * m_pFlushTimer; struct timeval m_tAntiFloodLastMessageTime; bool m_bInProcessData; #ifdef COMPILE_SSL_SUPPORT @@ -123,7 +124,7 @@ public: //bool sendFmtData(const char *fmt,...) KVI_DEPRECATED; bool sendPacket(KviDataBuffer * pData); void abort(); - bool getLocalHostIp(QString &szIp,bool bIpV6); + bool getLocalHostIp(TQString &szIp,bool bIpV6); protected slots: void connectionTimedOut(); void writeNotifierFired(int); @@ -162,13 +163,13 @@ protected: virtual void queue_insertMessage(KviIrcSocketMsgEntry *msg_ptr); virtual void setState(SocketState st); private: - void outputSSLMessage(const QString &szMsg); - void outputSSLError(const QString &szMsg); - void outputProxyMessage(const QString &szMsg); - void outputProxyError(const QString &szMsg); - void outputSocketMessage(const QString &szMsg); - void outputSocketWarning(const QString &szMsg); - void outputSocketError(const QString &szMsg); + void outputSSLMessage(const TQString &szMsg); + void outputSSLError(const TQString &szMsg); + void outputProxyMessage(const TQString &szMsg); + void outputProxyError(const TQString &szMsg); + void outputSocketMessage(const TQString &szMsg); + void outputSocketWarning(const TQString &szMsg); + void outputSocketError(const TQString &szMsg); }; #endif //_KVI_IRCSOCKET_H_ diff --git a/src/kvirc/kernel/kvi_ircurl.cpp b/src/kvirc/kernel/kvi_ircurl.cpp index 5b443103..2a35d787 100644 --- a/src/kvirc/kernel/kvi_ircurl.cpp +++ b/src/kvirc/kernel/kvi_ircurl.cpp @@ -141,7 +141,7 @@ bool KviIrcUrl::parse(const char * url,KviStr &cmdBuffer,int contextSpec) return true; } -void KviIrcUrl::split(QString url, KviIrcUrlParts& result) +void KviIrcUrl::split(TQString url, KviIrcUrlParts& result) { // irc[s][6]://[:][/[?]][[,[?]] @@ -151,24 +151,24 @@ void KviIrcUrl::split(QString url, KviIrcUrlParts& result) result.iPort = 6667; result.iError=0; - int iProtoLen = url.find("://"); + int iProtoLen = url.tqfind("://"); if(iProtoLen!=-1) { - if(KviQString::equalCIN(url,"irc",3)) { + if(KviTQString::equalCIN(url,"irc",3)) { // OK, seems to be a valid proto; url = url.right(url.length()-3); - if(KviQString::equalCIN(url,"s",1)) { + if(KviTQString::equalCIN(url,"s",1)) { result.bSsl=true; url = url.right(url.length()-1); } - if(KviQString::equalCIN(url,"6",1)) { + if(KviTQString::equalCIN(url,"6",1)) { result.bIpV6=true; url = url.right(url.length()-1); } - if(!KviQString::equalCIN(url,"://",3)) { + if(!KviTQString::equalCIN(url,"://",3)) { //irc(???):// proto?? result.iError |= InvalidProtocol; } - iProtoLen = url.find("://"); + iProtoLen = url.tqfind("://"); url = url.right(url.length()-iProtoLen-3); } else { result.iError |= InvalidProtocol; @@ -176,13 +176,13 @@ void KviIrcUrl::split(QString url, KviIrcUrlParts& result) } //Ok, we understand a protocol.. Now we shuld find a server name:) int iTmp; - iTmp = url.find(':'); + iTmp = url.tqfind(':'); if(iTmp!=-1) { result.szHost = url.left(iTmp); url = url.right(url.length()-iTmp-1); // Accepted, now the time for the port:) bool bOk; - if( (iTmp = url.find('/')) != -1) { // any channels pending? + if( (iTmp = url.tqfind('/')) != -1) { // any channels pending? result.iPort = url.left(iTmp).toUInt(&bOk); if(!bOk) { result.iPort = 6667; @@ -197,7 +197,7 @@ void KviIrcUrl::split(QString url, KviIrcUrlParts& result) } url = ""; } - } else if( (iTmp = url.find('/')) != -1) { // have channels?? + } else if( (iTmp = url.tqfind('/')) != -1) { // have channels?? result.szHost = url.left(iTmp); url = url.right(url.length()-iTmp-1); } else { @@ -207,11 +207,11 @@ void KviIrcUrl::split(QString url, KviIrcUrlParts& result) //and, finally, channels:D - result.chanList = QStringList::split(',',url); + result.chanList = TQStringList::split(',',url); } -void KviIrcUrl::join(QString &uri, KviIrcServer* server) +void KviIrcUrl::join(TQString &uri, KviIrcServer* server) { if(server) { @@ -222,18 +222,18 @@ void KviIrcUrl::join(QString &uri, KviIrcServer* server) uri.append("://"); uri.append(server->hostName()); - if(server->port()!=6667) uri.append(QString(":%1").arg(server->port())); + if(server->port()!=6667) uri.append(TQString(":%1").tqarg(server->port())); uri.append("/"); } } -void KviIrcUrl::makeJoinCmd(const QStringList& chans, QString& szJoinCommand) +void KviIrcUrl::makeJoinCmd(const TQStringList& chans, TQString& szJoinCommand) { - QString szChannels,szProtectedChannels,szPasswords,szCurPass,szCurChan; + TQString szChannels,szProtectedChannels,szPasswords,szCurPass,szCurChan; if(chans.count()!=0) { - for ( QStringList::ConstIterator it = chans.begin(); it != chans.end(); ++it ) { + for ( TQStringList::ConstIterator it = chans.begin(); it != chans.end(); ++it ) { szCurPass=(*it).section('?',1); if(szCurPass.isEmpty()) @@ -266,11 +266,11 @@ void KviIrcUrl::makeJoinCmd(const QStringList& chans, QString& szJoinCommand) } } -int KviIrcUrl::run(const QString& text,int contextSpec,KviConsole* pConsole) +int KviIrcUrl::run(const TQString& text,int contextSpec,KviConsole* pConsole) { KviIrcUrlParts parts; KviIrcUrl::split(text,parts); - QString cmdBuffer; + TQString cmdBuffer; if( (contextSpec & CurrentContext) && !pConsole) { contextSpec = FirstFreeContext; @@ -300,9 +300,9 @@ int KviIrcUrl::run(const QString& text,int contextSpec,KviConsole* pConsole) if(!(parts.iError & KviIrcUrl::InvalidProtocol)) { g_pApp->addRecentUrl(text); - QString szJoinCommand; + TQString szJoinCommand; makeJoinCmd(parts.chanList,szJoinCommand); - QString szCommand("server "); + TQString szCommand("server "); if(parts.bSsl) szCommand.append("-s "); if(parts.bIpV6) szCommand.append("-i "); if(!szJoinCommand.isEmpty()){ @@ -310,7 +310,7 @@ int KviIrcUrl::run(const QString& text,int contextSpec,KviConsole* pConsole) szCommand.append(szJoinCommand); szCommand.append("\" "); } - szCommand.append(QString("%1 %2 ").arg(parts.szHost).arg(parts.iPort)); + szCommand.append(TQString("%1 %2 ").tqarg(parts.szHost).tqarg(parts.iPort)); if(pConsole->connection()) { KviIrcServer* server = pConsole->connection()->target()->server(); @@ -324,8 +324,8 @@ int KviIrcUrl::run(const QString& text,int contextSpec,KviConsole* pConsole) return parts.iError; } else { // the same server, but probably new chanlist - QString tmp; - QString toPart; + TQString tmp; + TQString toPart; for(KviChannel * c = pConsole->connection()->channelList()->first();c;c = pConsole->connection()->channelList()->next()) { tmp=c->name(); diff --git a/src/kvirc/kernel/kvi_ircurl.h b/src/kvirc/kernel/kvi_ircurl.h index f3a8f10c..39a2db2d 100644 --- a/src/kvirc/kernel/kvi_ircurl.h +++ b/src/kvirc/kernel/kvi_ircurl.h @@ -30,7 +30,7 @@ class KviIrcServer; class KviConsole; -#include +#include // Create /server -u commands (first free context) #define KVI_IRCURL_CONTEXT_FIRSTFREE 0 @@ -40,11 +40,11 @@ class KviConsole; #define KVI_IRCURL_CONTEXT_THIS 2 typedef struct _KviIrcUrlParts { - QString szHost; + TQString szHost; kvi_u32_t iPort; bool bIpV6; bool bSsl; - QStringList chanList; + TQStringList chanList; int iError; } KviIrcUrlParts; @@ -68,11 +68,11 @@ namespace KviIrcUrl extern KVIRC_API bool parse(const char * url,KviStr &cmdBuffer,int contextSpec = KVI_IRCURL_CONTEXT_FIRSTFREE); - extern KVIRC_API int run(const QString& url,int contextSpec = FirstFreeContext,KviConsole* pConsole = 0); + extern KVIRC_API int run(const TQString& url,int contextSpec = FirstFreeContext,KviConsole* pConsole = 0); - extern KVIRC_API void split(QString url, KviIrcUrlParts& parts); - extern KVIRC_API void join(QString &url, KviIrcServer* server); - extern KVIRC_API void makeJoinCmd(const QStringList& chans, QString& szJoinCommand); + extern KVIRC_API void split(TQString url, KviIrcUrlParts& parts); + extern KVIRC_API void join(TQString &url, KviIrcServer* server); + extern KVIRC_API void makeJoinCmd(const TQStringList& chans, TQString& szJoinCommand); } #endif // _KVI_IRCURL_H_ diff --git a/src/kvirc/kernel/kvi_lagmeter.cpp b/src/kvirc/kernel/kvi_lagmeter.cpp index 5e7a4abe..43b3fa16 100644 --- a/src/kvirc/kernel/kvi_lagmeter.cpp +++ b/src/kvirc/kernel/kvi_lagmeter.cpp @@ -39,7 +39,7 @@ #include "kvi_locale.h" KviLagMeter::KviLagMeter(KviIrcConnection * c) -: QObject() +: TQObject() { m_pConnection = c; m_pCheckList = new KviPointerList; @@ -79,7 +79,7 @@ unsigned int KviLagMeter::secondsSinceLastCompleted() return tv.tv_sec - m_tLastCompleted; } -void KviLagMeter::timerEvent(QTimerEvent *) +void KviLagMeter::timerEvent(TQTimerEvent *) { if(m_pConnection->state() != KviIrcConnection::Connected)return; // do nothing atm @@ -97,19 +97,19 @@ void KviLagMeter::timerEvent(QTimerEvent *) if((!m_bOnAlarm) && (m_uLag > KVI_OPTION_UINT(KviOption_uintLagAlarmTime))) { KVS_TRIGGER_EVENT_2_HALTED(KviEvent_OnLagAlarmTimeUp, - m_pConnection->console(),m_pConnection->serverInfo()->name(),QString(szLag.ptr())); + m_pConnection->console(),m_pConnection->serverInfo()->name(),TQString(szLag.ptr())); if(bDeletionSignal)return; // killed , probably by a quit -f -u m_bOnAlarm = true; } else if(m_bOnAlarm) { KVS_TRIGGER_EVENT_2_HALTED(KviEvent_OnLagAlarmTimeDown, - m_pConnection->console(),m_pConnection->serverInfo()->name(),QString(szLag.ptr())); + m_pConnection->console(),m_pConnection->serverInfo()->name(),TQString(szLag.ptr())); if(bDeletionSignal)return; // killed , probably by a quit -f -u m_bOnAlarm = false; } KVS_TRIGGER_EVENT_2_HALTED(KviEvent_OnLagCheck, - m_pConnection->console(),m_pConnection->serverInfo()->name(),QString(szLag.ptr())); + m_pConnection->console(),m_pConnection->serverInfo()->name(),TQString(szLag.ptr())); if(bDeletionSignal)return; // killed , probably by a quit -f -u m_pDeletionSignal = 0; diff --git a/src/kvirc/kernel/kvi_lagmeter.h b/src/kvirc/kernel/kvi_lagmeter.h index 6fb68ae5..da8b076d 100644 --- a/src/kvirc/kernel/kvi_lagmeter.h +++ b/src/kvirc/kernel/kvi_lagmeter.h @@ -28,7 +28,7 @@ #include "kvi_string.h" #include "kvi_pointerlist.h" -#include +#include class KviIrcConnection; @@ -41,9 +41,10 @@ public: unsigned int uReliability; // [0-100] }; -class KVIRC_API KviLagMeter : public QObject +class KVIRC_API KviLagMeter : public TQObject { Q_OBJECT + TQ_OBJECT friend class KviIrcConnection; protected: KviLagMeter(KviIrcConnection * c); @@ -68,7 +69,7 @@ public: unsigned int lag(){ return m_uLag; }; unsigned int secondsSinceLastCompleted(); protected: - virtual void timerEvent(QTimerEvent * e); + virtual void timerEvent(TQTimerEvent * e); }; #endif // _KVI_LAGMETER_H_ diff --git a/src/kvirc/kernel/kvi_main.cpp b/src/kvirc/kernel/kvi_main.cpp index 90518b63..959978b4 100644 --- a/src/kvirc/kernel/kvi_main.cpp +++ b/src/kvirc/kernel/kvi_main.cpp @@ -36,9 +36,9 @@ extern bool kvi_sendIpcMessage(const char * message); // kvi_ipc.cpp #endif -#include //for debug() +#include //for debug() -#include +#include #define KVI_ARGS_RETCODE_OK 0 #define KVI_ARGS_RETCODE_ERROR 1 @@ -68,17 +68,17 @@ int parseArgs(ParseArgs * a) for(idx = 1;idx < a->argc;idx++) { - QString szMessage; + TQString szMessage; char * p = a->argv[idx]; if((kvi_strLen(p) > 3) && (*p == '-') && (*(p+1) == '-'))p++; if(kvi_strEqualCI("-v",p) || kvi_strEqualCI("-version",p)) { - KviQString::appendFormatted(szMessage,"KVIrc %s '%s'\n",KVI_VERSION,KVI_RELEASE_NAME); - KviQString::appendFormatted(szMessage,"Sources date: %s\n",KVI_SOURCES_DATE); - KviQString::appendFormatted(szMessage,"Build date: %s\n",KVI_BUILD_DATE); - KviQString::appendFormatted(szMessage,"Home page: http://www.kvirc.net/\n"); + KviTQString::appendFormatted(szMessage,"KVIrc %s '%s'\n",KVI_VERSION,KVI_RELEASE_NAME); + KviTQString::appendFormatted(szMessage,"Sources date: %s\n",KVI_SOURCES_DATE); + KviTQString::appendFormatted(szMessage,"Build date: %s\n",KVI_BUILD_DATE); + KviTQString::appendFormatted(szMessage,"Home page: http://www.kvirc.net/\n"); #ifdef COMPILE_ON_WINDOWS MessageBox(0,szMessage.local8Bit().data(),"KVIrc",0); @@ -91,42 +91,42 @@ int parseArgs(ParseArgs * a) if(kvi_strEqualCI("-h",p) || kvi_strEqualCI("-help",p)) { - KviQString::appendFormatted(szMessage,"Usage:\n"); - KviQString::appendFormatted(szMessage," %s [options] [server [port]] [ircurl [ircurl [...]]]\n",a->argv[0]); - KviQString::appendFormatted(szMessage," \n"); - KviQString::appendFormatted(szMessage,"Available options:\n"); - KviQString::appendFormatted(szMessage," -h, --help : Print this help and exit\n"); - KviQString::appendFormatted(szMessage," -v, --version: Print version information and exit\n"); - KviQString::appendFormatted(szMessage," -c : Use as config file instead of ~/%s\n",KVI_HOME_CONFIG_FILE_NAME); - KviQString::appendFormatted(szMessage," (defaults to $HOME/%s if does not exist)\n",KVI_HOME_CONFIG_FILE_NAME); - KviQString::appendFormatted(szMessage," -n : Use as config file instead of $HOME/%s\n",KVI_HOME_CONFIG_FILE_NAME); - KviQString::appendFormatted(szMessage," (create if it does not exist)\n"); + KviTQString::appendFormatted(szMessage,"Usage:\n"); + KviTQString::appendFormatted(szMessage," %s [options] [server [port]] [ircurl [ircurl [...]]]\n",a->argv[0]); + KviTQString::appendFormatted(szMessage," \n"); + KviTQString::appendFormatted(szMessage,"Available options:\n"); + KviTQString::appendFormatted(szMessage," -h, --help : Print this help and exit\n"); + KviTQString::appendFormatted(szMessage," -v, --version: Print version information and exit\n"); + KviTQString::appendFormatted(szMessage," -c : Use as config file instead of ~/%s\n",KVI_HOME_CONFIG_FILE_NAME); + KviTQString::appendFormatted(szMessage," (defaults to $HOME/%s if does not exist)\n",KVI_HOME_CONFIG_FILE_NAME); + KviTQString::appendFormatted(szMessage," -n : Use as config file instead of $HOME/%s\n",KVI_HOME_CONFIG_FILE_NAME); + KviTQString::appendFormatted(szMessage," (create if it does not exist)\n"); #ifdef COMPILE_NO_IPC - KviQString::appendFormatted(szMessage," -f : Accepted but ignored (for compatibility)\n"); + KviTQString::appendFormatted(szMessage," -f : Accepted but ignored (for compatibility)\n"); #else - KviQString::appendFormatted(szMessage," -f : Force a new KVIrc session, even if there is already\n"); - KviQString::appendFormatted(szMessage," a running one.\n"); + KviTQString::appendFormatted(szMessage," -f : Force a new KVIrc session, even if there is already\n"); + KviTQString::appendFormatted(szMessage," a running one.\n"); #endif - KviQString::appendFormatted(szMessage," -e : If a KVIrc session is already running, execute\n"); - KviQString::appendFormatted(szMessage," the in that session, otherwise start up\n"); - KviQString::appendFormatted(szMessage," normally and execute \n"); - KviQString::appendFormatted(szMessage," must be a single shell token.\n"); - KviQString::appendFormatted(szMessage," You can eventually use this switch more than once\n"); - KviQString::appendFormatted(szMessage," -x : If a KVIrc session is already running, execute\n"); - KviQString::appendFormatted(szMessage," the in that session, otherwise exit from application without doing anything/\n"); - KviQString::appendFormatted(szMessage," must be a single shell token.\n"); - KviQString::appendFormatted(szMessage," You can eventually use this switch more than once\n"); - KviQString::appendFormatted(szMessage," -r : If a KVIrc session is already running, execute the \n"); - KviQString::appendFormatted(szMessage," in that session, otherwise start up normally (do not execute).\n"); - KviQString::appendFormatted(szMessage," must be a single shell token.\n"); - KviQString::appendFormatted(szMessage," You can eventually use this switch more than once\n"); - KviQString::appendFormatted(szMessage," -m : If a KVIrc session is already running, show an informational\n"); - KviQString::appendFormatted(szMessage," popup dialog instead of writing to the console"); - KviQString::appendFormatted(szMessage," --nosplash : Do not show the splash screen at startup\n"); - KviQString::appendFormatted(szMessage," [server] : Connect to this server after startup\n"); - KviQString::appendFormatted(szMessage," [port] : Use this port for connection\n"); - KviQString::appendFormatted(szMessage," [ircurl] : URL in the following form:\n"); - KviQString::appendFormatted(szMessage," irc[6]://[:][/[?]]\n"); + KviTQString::appendFormatted(szMessage," -e : If a KVIrc session is already running, execute\n"); + KviTQString::appendFormatted(szMessage," the in that session, otherwise start up\n"); + KviTQString::appendFormatted(szMessage," normally and execute \n"); + KviTQString::appendFormatted(szMessage," must be a single shell token.\n"); + KviTQString::appendFormatted(szMessage," You can eventually use this switch more than once\n"); + KviTQString::appendFormatted(szMessage," -x : If a KVIrc session is already running, execute\n"); + KviTQString::appendFormatted(szMessage," the in that session, otherwise exit from application without doing anything/\n"); + KviTQString::appendFormatted(szMessage," must be a single shell token.\n"); + KviTQString::appendFormatted(szMessage," You can eventually use this switch more than once\n"); + KviTQString::appendFormatted(szMessage," -r : If a KVIrc session is already running, execute the \n"); + KviTQString::appendFormatted(szMessage," in that session, otherwise start up normally (do not execute).\n"); + KviTQString::appendFormatted(szMessage," must be a single shell token.\n"); + KviTQString::appendFormatted(szMessage," You can eventually use this switch more than once\n"); + KviTQString::appendFormatted(szMessage," -m : If a KVIrc session is already running, show an informational\n"); + KviTQString::appendFormatted(szMessage," popup dialog instead of writing to the console"); + KviTQString::appendFormatted(szMessage," --nosplash : Do not show the splash screen at startup\n"); + KviTQString::appendFormatted(szMessage," [server] : Connect to this server after startup\n"); + KviTQString::appendFormatted(szMessage," [port] : Use this port for connection\n"); + KviTQString::appendFormatted(szMessage," [ircurl] : URL in the following form:\n"); + KviTQString::appendFormatted(szMessage," irc[6]://[:][/[?]]\n"); #ifdef COMPILE_ON_WINDOWS MessageBox(0,szMessage.local8Bit().data(),"KVIrc",0); @@ -228,7 +228,7 @@ int parseArgs(ParseArgs * a) if(kvi_strEqualCI("-session",p)||kvi_strEqualCI("-display",p)) { - // Qt apps are supposed to handle the params to these switches, but we'll skip arg for now + // TQt apps are supposed to handle the params to these switches, but we'll skip arg for now idx++; continue; } @@ -238,33 +238,33 @@ int parseArgs(ParseArgs * a) // no dash if(kvi_strEqualCIN(p,"irc://",6) || kvi_strEqualCIN(p,"irc6://",7) || kvi_strEqualCIN(p,"ircs://",7) || kvi_strEqualCIN(p,"ircs6://",8)) { - KviStr tmp = QString::fromLocal8Bit(p); + KviStr tmp = TQString(TQString::fromLocal8Bit(p)); if(a->szExecCommand.hasData())a->szExecCommand.append('\n'); a->szExecCommand.append("openurl "); tmp.replaceAll("$",""); // the urls can't contain $ signs tmp.replaceAll(";",""); // the urls can't contain ; signs a->szExecCommand.append(tmp); } else { - QString tmp = QString::fromLocal8Bit(p); + TQString tmp = TQString::fromLocal8Bit(p); bool bOk; tmp.toUInt(&bOk); if(bOk)szPort = tmp; else { - QString ri = tmp.right(4); - if(KviQString::equalCI(ri,".kvs")) + TQString ri = tmp.right(4); + if(KviTQString::equalCI(ri,".kvs")) { if(a->szExecCommand.hasData())a->szExecCommand.append('\n'); a->szExecCommand.append("parse \""); - tmp.replace('$',"\\$"); - tmp.replace('\\',"\\\\"); + tmp.tqreplace('$',"\\$"); + tmp.tqreplace('\\',"\\\\"); a->szExecCommand.append(tmp); a->szExecCommand.append('"'); - } else if(KviQString::equalCI(ri,".kvt")) + } else if(KviTQString::equalCI(ri,".kvt")) { if(a->szExecCommand.hasData())a->szExecCommand.append('\n'); a->szExecCommand.append("theme.install \""); - tmp.replace('$',"\\$"); - tmp.replace('\\',"\\\\"); + tmp.tqreplace('$',"\\$"); + tmp.tqreplace('\\',"\\\\"); a->szExecCommand.append(tmp); a->szExecCommand.append('"'); } else @@ -293,27 +293,27 @@ int parseArgs(ParseArgs * a) // Repair broken colour definitions due to "lazy" static object initialization void repair_colors(void) { - if(Qt::white.red() == 0) + if(TQt::white.red() == 0) { - Qt::color0 = (qRgb(255,255,255 ),0); - Qt::color1 = (qRgb(0,0,0),1); - Qt::black.setRgb(0,0,0); - Qt::white.setRgb(255,255,255); - Qt::darkGray.setRgb(128,128,128); - Qt::gray.setRgb(160,160,164); - Qt::lightGray.setRgb(192,192,192); - Qt::red.setRgb(255,0,0); - Qt::green.setRgb(0,255,0); - Qt::blue.setRgb(0,0,255); - Qt::cyan.setRgb(0,255,255); - Qt::magenta.setRgb(255,0,255); - Qt::yellow.setRgb(255,255,0); - Qt::darkRed.setRgb(128,0,0); - Qt::darkGreen.setRgb(0,128,0); - Qt::darkBlue.setRgb(0,0,128); - Qt::darkCyan.setRgb(0,128,128); - Qt::darkMagenta.setRgb(128,0,128); - Qt::darkYellow.setRgb(128,128,0); + TQt::color0 = (tqRgb(255,255,255 ),0); + TQt::color1 = (tqRgb(0,0,0),1); + TQt::black.setRgb(0,0,0); + TQt::white.setRgb(255,255,255); + TQt::darkGray.setRgb(128,128,128); + TQt::gray.setRgb(160,160,164); + TQt::lightGray.setRgb(192,192,192); + TQt::red.setRgb(255,0,0); + TQt::green.setRgb(0,255,0); + TQt::blue.setRgb(0,0,255); + TQt::cyan.setRgb(0,255,255); + TQt::magenta.setRgb(255,0,255); + TQt::yellow.setRgb(255,255,0); + TQt::darkRed.setRgb(128,0,0); + TQt::darkGreen.setRgb(0,128,0); + TQt::darkBlue.setRgb(0,0,128); + TQt::darkCyan.setRgb(0,128,128); + TQt::darkMagenta.setRgb(128,0,128); + TQt::darkYellow.setRgb(128,128,0); } } #endif //Q_OS_MACX @@ -358,16 +358,16 @@ int main(int argc,char ** argv) A weak file locking mechanism should be used too... #ifdef COMPILE_ON_WINDOWS - QString szLock = convertSeparators(cleanDirPath(QDir::homeDirPath() + "/.kvirc.lock")); + TQString szLock = convertSeparators(cleanDirPath(TQDir::homeDirPath() + "/.kvirc.lock")); #else - QString szLock = convertSeparators(cleanDirPath(QDir::homeDirPath() + "/.kvirc.lock")); + TQString szLock = convertSeparators(cleanDirPath(TQDir::homeDirPath() + "/.kvirc.lock")); #endif - QFileInfo inf(szLock); + TQFileInfo inf(szLock); bool bLocked = false; if(inf.exists()) { - iLocked = inf.lastModified().secsTo(QDateTime::currentDateTime()); + iLocked = inf.lastModified().secsTo(TQDateTime::tqcurrentDateTime()); } */ @@ -383,7 +383,7 @@ int main(int argc,char ** argv) { KviStr tmp(KviStr::Format,"Another KVIrc session is already running on this display and with this user id.\nUse %s -f if you want to force a new session.",argv[0]); if(a.bShowPopup) - QMessageBox::information(0,"Session - KVIrc",tmp.ptr(),QMessageBox::Ok); + TQMessageBox::information(0,"Session - KVIrc",tmp.ptr(),TQMessageBox::Ok); else debug(tmp.ptr()); } diff --git a/src/kvirc/kernel/kvi_notifylist.cpp b/src/kvirc/kernel/kvi_notifylist.cpp index bee7fd43..312c184d 100644 --- a/src/kvirc/kernel/kvi_notifylist.cpp +++ b/src/kvirc/kernel/kvi_notifylist.cpp @@ -47,7 +47,7 @@ #include "kvi_kvs_eventtriggers.h" #include "kvi_qcstring.h" -#include +#include // FIXME: #warning "Finish this doc!" @@ -70,7 +70,7 @@ So for example, assume to register a frend of yours like Szymon:[br] [example] [cmd:reguser.add]reguser.add[/cmd] Szymon - [cmd:reguser.addmask]reguser.addmask[/cmd] Szymon Pragma!*@*.it + [cmd:reguser.addtqmask]reguser.addtqmask[/cmd] Szymon Pragma!*@*.it [/example] And then want it in the notify list; nothing easier, just set hist "notify" property to the nickname that you want him to be "looked for":[br] @@ -82,7 +82,7 @@ "Pragma [someuser@somehost.it] is on IRC".[br] If Szymon uses often "[Pragma]" as his secondary nickname , you can do the following:[br] [example] - [cmd:reguser.addmask]reguser.addmask[/cmd] Szymon [Pragma]*@*.it + [cmd:reguser.addtqmask]reguser.addtqmask[/cmd] Szymon [Pragma]*@*.it [cmd:reguser.setproperty]reguser.setproperty[/cmd] Szymon notify "Pragma [Pragma]" [/example] KVIrc will then look for both nicknames getting online.[br] @@ -94,7 +94,7 @@ This might be a false assumption (since somehod.com does not even match *.it), but it is the best result that the "stupid ISON method" can achieve.[br] The "intelligent ISON method" will also check the Pragma's username and hostname - and match it in the registered masks; so in the example above, you will be notified if + and match it in the registered tqmasks; so in the example above, you will be notified if any user that matches Pragma!*@*.it gets online; (but you will NOT be notified if (for example) Pragma!someuser@somehost.com gets online).[br] So what's the point in including a stupid method? :) Well...the intelligent @@ -117,7 +117,7 @@ // Basic NotifyListManager: this does completely nothing KviNotifyListManager::KviNotifyListManager(KviIrcConnection * pConnection) -: QObject(0,"notify_list_manager") +: TQObject(0,"notify_list_manager") { m_pConnection = pConnection; m_pConsole = pConnection->console(); @@ -150,7 +150,7 @@ bool KviNotifyListManager::handleWatchReply(KviIrcMessage *) return false; } -void KviNotifyListManager::notifyOnLine(const QString &nick,const QString &user,const QString &host,const QString &szReason,bool bJoin) +void KviNotifyListManager::notifyOnLine(const TQString &nick,const TQString &user,const TQString &host,const TQString &szReason,bool bJoin) { if(bJoin) m_pConsole->notifyListView()->join(nick,user,host); @@ -158,35 +158,35 @@ void KviNotifyListManager::notifyOnLine(const QString &nick,const QString &user, KviWindow * out = KVI_OPTION_BOOL(KviOption_boolNotifyListChangesToActiveWindow) ? m_pConsole->activeWindow() : m_pConsole; if(KVS_TRIGGER_EVENT_1_HALTED(KviEvent_OnNotifyOnLine,out,nick))return; - QString szWho; - QString szMsg; + TQString szWho; + TQString szMsg; if(!(user.isEmpty() || host.isEmpty())) - KviQString::sprintf(szWho,"\r!n\r%Q\r [%Q@\r!h\r%Q\r]",&nick,&user,&host); + KviTQString::sprintf(szWho,"\r!n\r%Q\r [%Q@\r!h\r%Q\r]",&nick,&user,&host); else - KviQString::sprintf(szWho,"\r!n\r%Q\r",&nick); + KviTQString::sprintf(szWho,"\r!n\r%Q\r",&nick); - KviPointerHashTable * d = g_pRegisteredUserDataBase->userDict(); - KviPointerHashTableIterator it(*d); - QString szNotify; + KviPointerHashTable * d = g_pRegisteredUserDataBase->userDict(); + KviPointerHashTableIterator it(*d); + TQString szNotify; while(KviRegisteredUser * u = it.current()) { - if(QStringList::split(",",u->getProperty("notify")).findIndex(nick)!=-1) + if(TQStringList::split(",",u->getProperty("notify")).tqfindIndex(nick)!=-1) { - QString szComment=u->getProperty("comment"); + TQString szComment=u->getProperty("comment"); if(!szComment.isEmpty()) - KviQString::sprintf(szMsg,"%Q (%Q), Group \"%Q\" is on IRC as (%Q)",&(u->name()),&szComment,&(u->group()),&szWho); + KviTQString::sprintf(szMsg,"%Q (%Q), Group \"%Q\" is on IRC as (%Q)",&(u->name()),&szComment,&(u->group()),&szWho); else - KviQString::sprintf(szMsg,"%Q, Group \"%Q\" is on IRC as (%Q)",&(u->name()),&(u->group()),&szWho); + KviTQString::sprintf(szMsg,"%Q, Group \"%Q\" is on IRC as (%Q)",&(u->name()),&(u->group()),&szWho); break; } ++it; } - QString szFmt = __tr2qs("%Q is on IRC"); + TQString szFmt = __tr2qs("%Q is on IRC"); if(szMsg.isEmpty()) - KviQString::sprintf(szMsg,szFmt,&szWho); + KviTQString::sprintf(szMsg,szFmt,&szWho); if((!szReason.isEmpty()) && (_OUTPUT_VERBOSE)) { @@ -206,46 +206,46 @@ void KviNotifyListManager::notifyOnLine(const QString &nick,const QString &user, szWho = ""; szWho += nick; szWho += ""; - KviQString::sprintf(szMsg,szFmt,&szWho); + KviTQString::sprintf(szMsg,szFmt,&szWho); g_pApp->notifierMessage(0,KVI_OPTION_MSGTYPE(KVI_OUT_NOTIFYONLINE).pixId(),szMsg,15); } } } -void KviNotifyListManager::notifyOffLine(const QString &nick,const QString &user,const QString &host,const QString &szReason) +void KviNotifyListManager::notifyOffLine(const TQString &nick,const TQString &user,const TQString &host,const TQString &szReason) { KviWindow * out = KVI_OPTION_BOOL(KviOption_boolNotifyListChangesToActiveWindow) ? m_pConsole->activeWindow() : m_pConsole; if(!KVS_TRIGGER_EVENT_1_HALTED(KviEvent_OnNotifyOffLine,out,nick)) { - QString szWho; + TQString szWho; if(!(user.isEmpty() || host.isEmpty())) - KviQString::sprintf(szWho,"\r!n\r%Q\r [%Q@\r!h\r%Q\r]",&nick,&user,&host); + KviTQString::sprintf(szWho,"\r!n\r%Q\r [%Q@\r!h\r%Q\r]",&nick,&user,&host); else - KviQString::sprintf(szWho,"\r!n\r%Q\r",&nick); + KviTQString::sprintf(szWho,"\r!n\r%Q\r",&nick); - QString szMsg; + TQString szMsg; - KviPointerHashTable * d = g_pRegisteredUserDataBase->userDict(); - KviPointerHashTableIterator it(*d); - QString szNotify; + KviPointerHashTable * d = g_pRegisteredUserDataBase->userDict(); + KviPointerHashTableIterator it(*d); + TQString szNotify; while(KviRegisteredUser * u = it.current()) { - if(QStringList::split(",",u->getProperty("notify")).findIndex(nick)!=-1) + if(TQStringList::split(",",u->getProperty("notify")).tqfindIndex(nick)!=-1) { - QString szComment=u->getProperty("comment"); + TQString szComment=u->getProperty("comment"); if(!szComment.isEmpty()) - KviQString::sprintf(szMsg,"%Q (%Q), Group \"%Q\" has left IRC as (%Q)",&(u->name()),&szComment,&(u->group()),&szWho); + KviTQString::sprintf(szMsg,"%Q (%Q), Group \"%Q\" has left IRC as (%Q)",&(u->name()),&szComment,&(u->group()),&szWho); else - KviQString::sprintf(szMsg,"%Q, Group \"%Q\" has left IRC as (%Q)",&(u->name()),&(u->group()),&szWho); + KviTQString::sprintf(szMsg,"%Q, Group \"%Q\" has left IRC as (%Q)",&(u->name()),&(u->group()),&szWho); break; } ++it; } if(szMsg.isEmpty()) - KviQString::sprintf(szMsg,__tr2qs("%Q has left IRC"),&szWho); + KviTQString::sprintf(szMsg,__tr2qs("%Q has left IRC"),&szWho); if((!szReason.isEmpty()) && (_OUTPUT_VERBOSE)) { @@ -319,22 +319,22 @@ void KviNotifyListManager::notifyOffLine(const QString &nick,const QString &user KviIsOnNotifyListManager::KviIsOnNotifyListManager(KviIrcConnection * pConnection) : KviNotifyListManager(pConnection) { - m_pRegUserDict = new KviPointerHashTable(17,false); // case insensitive , copy keys + m_pRegUserDict = new KviPointerHashTable(17,false); // case insensitive , copy keys m_pRegUserDict->setAutoDelete(true); - m_pNotifyList = new KviPointerList; + m_pNotifyList = new KviPointerList; m_pNotifyList->setAutoDelete(true); - m_pIsOnList = new KviPointerList; + m_pIsOnList = new KviPointerList; m_pIsOnList->setAutoDelete(true); - m_pOnlineList = new KviPointerList; + m_pOnlineList = new KviPointerList; m_pOnlineList->setAutoDelete(true); - m_pUserhostList = new KviPointerList; + m_pUserhostList = new KviPointerList; m_pUserhostList->setAutoDelete(true); - m_pDelayedNotifyTimer = new QTimer(); - connect(m_pDelayedNotifyTimer,SIGNAL(timeout()),this,SLOT(newNotifySession())); - m_pDelayedIsOnTimer = new QTimer(); - connect(m_pDelayedIsOnTimer,SIGNAL(timeout()),this,SLOT(newIsOnSession())); - m_pDelayedUserhostTimer = new QTimer(); - connect(m_pDelayedUserhostTimer,SIGNAL(timeout()),this,SLOT(newUserhostSession())); + m_pDelayedNotifyTimer = new TQTimer(); + connect(m_pDelayedNotifyTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(newNotifySession())); + m_pDelayedIsOnTimer = new TQTimer(); + connect(m_pDelayedIsOnTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(newIsOnSession())); + m_pDelayedUserhostTimer = new TQTimer(); + connect(m_pDelayedUserhostTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(newUserhostSession())); m_bRunning = false; } @@ -376,24 +376,24 @@ void KviIsOnNotifyListManager::buildRegUserDict() { m_pRegUserDict->clear(); - const KviPointerHashTable * d = g_pRegisteredUserDataBase->userDict(); - KviPointerHashTableIterator it(*d); + const KviPointerHashTable * d = g_pRegisteredUserDataBase->userDict(); + KviPointerHashTableIterator it(*d); while(KviRegisteredUser * u = it.current()) { - QString notify; + TQString notify; if(u->getProperty("notify",notify)) { notify.stripWhiteSpace(); while(!notify.isEmpty()) { - int idx = notify.find(' '); + int idx = notify.tqfind(' '); if(idx > 0) { - QString single = notify.left(idx); - m_pRegUserDict->replace(single,new QString(u->name())); + TQString single = notify.left(idx); + m_pRegUserDict->tqreplace(single,new TQString(u->name())); notify.remove(0,idx+1); } else { - m_pRegUserDict->replace(notify,new QString(u->name())); + m_pRegUserDict->tqreplace(notify,new TQString(u->name())); notify = ""; } } @@ -435,10 +435,10 @@ void KviIsOnNotifyListManager::newNotifySession() void KviIsOnNotifyListManager::buildNotifyList() { m_pNotifyList->clear(); - KviPointerHashTableIterator it(*m_pRegUserDict); + KviPointerHashTableIterator it(*m_pRegUserDict); while(it.current()) { - m_pNotifyList->append(new QString(it.currentKey())); + m_pNotifyList->append(new TQString(it.currentKey())); ++it; } } @@ -472,7 +472,7 @@ void KviIsOnNotifyListManager::buildIsOnList() m_pIsOnList->clear(); m_szIsOnString = ""; m_pNotifyList->setAutoDelete(false); - while(QString * s = m_pNotifyList->first()) + while(TQString * s = m_pNotifyList->first()) { if(((m_szIsOnString.length() + s->length()) + 1) < 504) { @@ -489,7 +489,7 @@ void KviIsOnNotifyListManager::sendIsOn() { if(_OUTPUT_PARANOIC) m_pConsole->output(KVI_OUT_SYSTEMMESSAGE,__tr2qs("Notify list: Checking for: %Q"),&m_szIsOnString); - KviQCString szDec = m_pConnection->encodeText(m_szIsOnString); + KviTQCString szDec = m_pConnection->encodeText(m_szIsOnString); m_pConnection->sendFmtData("ISON %s",szDec.data()); if(m_pConnection->lagMeter()) m_pConnection->lagMeter()->lagCheckRegister("@notify_ison",40); // not that reliable @@ -506,7 +506,7 @@ bool KviIsOnNotifyListManager::handleIsOn(KviIrcMessage *msg) // Check if it is our ISON // all the nicks must be on the IsOnList - KviPointerList tmplist; + KviPointerList tmplist; tmplist.setAutoDelete(false); KviStr nk; @@ -519,10 +519,10 @@ bool KviIsOnNotifyListManager::handleIsOn(KviIrcMessage *msg) if(nk.hasData()) { bool bGotIt = false; - QString dnk = m_pConnection->decodeText(nk.ptr()); - for(QString * s = m_pIsOnList->first();s && (!bGotIt);s = m_pIsOnList->next()) + TQString dnk = m_pConnection->decodeText(nk.ptr()); + for(TQString * s = m_pIsOnList->first();s && (!bGotIt);s = m_pIsOnList->next()) { - if(KviQString::equalCI(*s,dnk)) + if(KviTQString::equalCI(*s,dnk)) { tmplist.append(s); bGotIt = true; @@ -552,7 +552,7 @@ bool KviIsOnNotifyListManager::handleIsOn(KviIrcMessage *msg) // The nicks in the IsOnList that are also in the reply are online , and go to the OnlineList // the remaining in the IsOnList are offline - QString * s; + TQString * s; for(s = tmplist.first();s;s = tmplist.next()) { @@ -579,12 +579,12 @@ bool KviIsOnNotifyListManager::handleIsOn(KviIrcMessage *msg) // ok... complex step now: the remaining users in the userhost list are online // if they have been online before, just remove them from the list - // otherwise they must be matched for masks + // otherwise they must be matched for tqmasks // and eventually inserted in the notify view later KviIrcUserDataBase * db = console()->connection()->userDataBase(); - KviPointerList l; + KviPointerList l; l.setAutoDelete(false); for(s = m_pOnlineList->first();s;s = m_pOnlineList->next()) @@ -592,7 +592,7 @@ bool KviIsOnNotifyListManager::handleIsOn(KviIrcMessage *msg) if(KviUserListEntry * ent = m_pConsole->notifyListView()->findEntry(*s)) { // the user was online from a previous notify session - // might the mask have been changed ? (heh...this is tricky, maybe too much even) + // might the tqmask have been changed ? (heh...this is tricky, maybe too much even) if(KVI_OPTION_BOOL(KviOption_boolNotifyListSendUserhostForOnlineUsers)) { // user wants to be sure about online users.... @@ -621,15 +621,15 @@ bool KviIsOnNotifyListManager::handleIsOn(KviIrcMessage *msg) //l.append(s); // we will remove him from the list } else { // the user was not online! - // check if we have a cached mask + // check if we have a cached tqmask if(db) { - if(KviIrcUserEntry * ue = db->find(*s)) + if(KviIrcUserEntry * ue = db->tqfind(*s)) { - // already in the db... do we have a mask ? + // already in the db... do we have a tqmask ? if(ue->hasUser() && ue->hasHost()) { - // yup! we have a complete mask to match on + // yup! we have a complete tqmask to match on KviIrcMask mk(*s,ue->user(),ue->host()); // lookup the user's name in the m_pRegUserDict if(!doMatchUser(*s,mk))return true; // critical problems = have to restart!!! @@ -656,34 +656,34 @@ bool KviIsOnNotifyListManager::handleIsOn(KviIrcMessage *msg) // FIXME: #warning "Nickname escapes (links) in the notifylist messages!" -bool KviIsOnNotifyListManager::doMatchUser(const QString ¬ifyString,const KviIrcMask & mask) +bool KviIsOnNotifyListManager::doMatchUser(const TQString ¬ifyString,const KviIrcMask & tqmask) { - QString * nam = m_pRegUserDict->find(notifyString); + TQString * nam = m_pRegUserDict->tqfind(notifyString); if(nam) { // ok...find the user if(KviRegisteredUser * u = g_pRegisteredUserDataBase->findUserByName(*nam)) { // ok ... match the user - if(u->matchesFixed(mask)) + if(u->matchesFixed(tqmask)) { // new user online - if(!(m_pConsole->notifyListView()->findEntry(mask.nick()))) + if(!(m_pConsole->notifyListView()->findEntry(tqmask.nick()))) { - notifyOnLine(mask.nick(),mask.user(),mask.host()); + notifyOnLine(tqmask.nick(),tqmask.user(),tqmask.host()); } // else already online , and matching...all ok } else { // not matched.... has he been online before ? - if(m_pConsole->notifyListView()->findEntry(mask.nick())) + if(m_pConsole->notifyListView()->findEntry(tqmask.nick())) { - // has been online just a sec ago , but now the mask does not match + // has been online just a sec ago , but now the tqmask does not match // either reguserdb has changed , or the user went offline and another one got his nick // in the meantime... (ugly situation anyway) - notifyOffLine(mask.nick(),mask.user(),mask.host(),__tr2qs("registration mask changed, or nickname is being used by someone else")); + notifyOffLine(tqmask.nick(),tqmask.user(),tqmask.host(),__tr2qs("registration tqmask changed, or nickname is being used by someone else")); } else { // has never been online if(_OUTPUT_VERBOSE) - m_pConsole->output(KVI_OUT_SYSTEMMESSAGE,__tr2qs("Notify list: \r!n\r%Q\r appears to be online, but the mask [%Q@\r!h\r%Q\r] does not match (registration mask does not match, or nickname is being used by someone else)"),&(mask.nick()),&(mask.user()),&(mask.host())); + m_pConsole->output(KVI_OUT_SYSTEMMESSAGE,__tr2qs("Notify list: \r!n\r%Q\r appears to be online, but the tqmask [%Q@\r!h\r%Q\r] does not match (registration tqmask does not match, or nickname is being used by someone else)"),&(tqmask.nick()),&(tqmask.user()),&(tqmask.host())); } } } else { @@ -743,7 +743,7 @@ void KviIsOnNotifyListManager::buildUserhostList() m_pOnlineList->setAutoDelete(false); int i = 0; - QString * s; + TQString * s; while((s = m_pOnlineList->first()) && (i < MAX_USERHOST_ENTRIES)) { if(!m_szUserhostString.isEmpty())m_szUserhostString.append(' '); @@ -759,7 +759,7 @@ void KviIsOnNotifyListManager::sendUserhost() { if(_OUTPUT_PARANOIC) m_pConsole->output(KVI_OUT_SYSTEMMESSAGE,__tr2qs("Notify list: Checking userhost for: %Q"),&m_szUserhostString); - KviQCString ccc = m_pConnection->encodeText(m_szUserhostString); + KviTQCString ccc = m_pConnection->encodeText(m_szUserhostString); m_pConnection->sendFmtData("USERHOST %s",ccc.data()); if(m_pConnection->lagMeter()) m_pConnection->lagMeter()->lagCheckRegister("@notify_userhost",50); @@ -784,7 +784,7 @@ bool KviIsOnNotifyListManager::handleUserhost(KviIrcMessage *msg) aux = kvi_extractToken(nk,aux,' '); if(nk.hasData()) { - // split it in a mask + // split it in a tqmask KviStr nick; KviStr user; KviStr host; @@ -809,13 +809,13 @@ bool KviIsOnNotifyListManager::handleUserhost(KviIrcMessage *msg) } bool bGotIt = false; - QString szNick = m_pConnection->decodeText(nick.ptr()); - QString szUser = m_pConnection->decodeText(user.ptr()); - QString szHost = m_pConnection->decodeText(host.ptr()); + TQString szNick = m_pConnection->decodeText(nick.ptr()); + TQString szUser = m_pConnection->decodeText(user.ptr()); + TQString szHost = m_pConnection->decodeText(host.ptr()); - for(QString * s = m_pUserhostList->first();s && (!bGotIt);s = m_pUserhostList->next()) + for(TQString * s = m_pUserhostList->first();s && (!bGotIt);s = m_pUserhostList->next()) { - if(KviQString::equalCI(*s,szNick)) + if(KviTQString::equalCI(*s,szNick)) { KviIrcMask * mk = new KviIrcMask(szNick,szUser,szHost); tmplist.append(mk); @@ -854,7 +854,7 @@ bool KviIsOnNotifyListManager::handleUserhost(KviIrcMessage *msg) if(!(m_pUserhostList->isEmpty())) { // ops...someone is no longer online ? - while(QString * s = m_pUserhostList->first()) + while(TQString * s = m_pUserhostList->first()) { if(_OUTPUT_VERBOSE) m_pConsole->output(KVI_OUT_SYSTEMMESSAGE,__tr2qs("Notify list: \r!n\r%Q\r appears to have gone offline before USERHOST reply was received, will recheck in the next loop"),s); @@ -905,7 +905,7 @@ void KviIsOnNotifyListManager::stop() KviStupidNotifyListManager::KviStupidNotifyListManager(KviIrcConnection * pConnection) : KviNotifyListManager(pConnection) { - m_pNickList = new KviPointerList; + m_pNickList = new KviPointerList; m_pNickList->setAutoDelete(true); m_iRestartTimer = 0; } @@ -944,19 +944,19 @@ void KviStupidNotifyListManager::start() void KviStupidNotifyListManager::sendIsOn() { m_szLastIsOnMsg = ""; - QString * nick = m_pNickList->at(m_iNextNickToCheck); + TQString * nick = m_pNickList->at(m_iNextNickToCheck); __range_valid(nick); int i = 0; while(nick && ((nick->length() + 5 + m_szLastIsOnMsg.length()) < 510)) { - KviQString::appendFormatted(m_szLastIsOnMsg," %Q",nick); + KviTQString::appendFormatted(m_szLastIsOnMsg," %Q",nick); nick = m_pNickList->next(); i++; } if(_OUTPUT_PARANOIC) m_pConsole->output(KVI_OUT_SYSTEMMESSAGE,__tr2qs("Notify list: Checking for:%Q"),&m_szLastIsOnMsg); - KviQCString dat = m_pConnection->encodeText(m_szLastIsOnMsg); + KviTQCString dat = m_pConnection->encodeText(m_szLastIsOnMsg); m_pConnection->sendFmtData("ISON%s",dat.data()); if(m_pConnection->lagMeter()) @@ -978,9 +978,9 @@ bool KviStupidNotifyListManager::handleIsOn(KviIrcMessage * msg) aux = kvi_extractToken(nk,aux,' '); if(nk.hasData()) { - QString nkd = m_pConnection->decodeText(nk.ptr()); - QString nksp = " " + nkd; - m_szLastIsOnMsg.replace(nksp,"",false); + TQString nkd = m_pConnection->decodeText(nk.ptr()); + TQString nksp = " " + nkd; + m_szLastIsOnMsg.tqreplace(nksp,"",false); if(!(m_pConsole->notifyListView()->findEntry(nkd))) { // not yet notified @@ -989,9 +989,9 @@ bool KviStupidNotifyListManager::handleIsOn(KviIrcMessage * msg) } } // ok...check the users that have left irc now... - QStringList sl = QStringList::split(' ',m_szLastIsOnMsg); + TQStringList sl = TQStringList::split(' ',m_szLastIsOnMsg); - for(QStringList::Iterator it = sl.begin();it != sl.end();++it) + for(TQStringList::Iterator it = sl.begin();it != sl.end();++it) { if(m_pConsole->notifyListView()->findEntry(*it)) { @@ -1020,7 +1020,7 @@ bool KviStupidNotifyListManager::handleIsOn(KviIrcMessage * msg) return true; } -void KviStupidNotifyListManager::timerEvent(QTimerEvent *e) +void KviStupidNotifyListManager::timerEvent(TQTimerEvent *e) { if(e->timerId() == m_iRestartTimer) { @@ -1030,7 +1030,7 @@ void KviStupidNotifyListManager::timerEvent(QTimerEvent *e) sendIsOn(); return; } - QObject::timerEvent(e); + TQObject::timerEvent(e); } void KviStupidNotifyListManager::stop() @@ -1050,15 +1050,15 @@ void KviStupidNotifyListManager::stop() void KviStupidNotifyListManager::buildNickList() { - const KviPointerHashTable * d = g_pRegisteredUserDataBase->userDict(); - KviPointerHashTableIterator it(*d); + const KviPointerHashTable * d = g_pRegisteredUserDataBase->userDict(); + KviPointerHashTableIterator it(*d); m_pNickList->clear(); while(it.current()) { - QString notify; + TQString notify; if(it.current()->getProperty("notify",notify)) { - m_pNickList->append(new QString(notify)); + m_pNickList->append(new TQString(notify)); } ++it; } @@ -1073,7 +1073,7 @@ void KviStupidNotifyListManager::buildNickList() KviWatchNotifyListManager::KviWatchNotifyListManager(KviIrcConnection * pConnection) : KviNotifyListManager(pConnection) { - m_pRegUserDict = new KviPointerHashTable(17,false); + m_pRegUserDict = new KviPointerHashTable(17,false); m_pRegUserDict->setAutoDelete(true); } @@ -1086,18 +1086,18 @@ void KviWatchNotifyListManager::buildRegUserDict() { m_pRegUserDict->clear(); - const KviPointerHashTable * d = g_pRegisteredUserDataBase->userDict(); - KviPointerHashTableIterator it(*d); + const KviPointerHashTable * d = g_pRegisteredUserDataBase->userDict(); + KviPointerHashTableIterator it(*d); while(KviRegisteredUser * u = it.current()) { - QString notify; + TQString notify; if(u->getProperty("notify",notify)) { notify.stripWhiteSpace(); - QStringList sl = QStringList::split(' ',notify); - for(QStringList::Iterator it = sl.begin();it != sl.end();++it) + TQStringList sl = TQStringList::split(' ',notify); + for(TQStringList::Iterator it = sl.begin();it != sl.end();++it) { - m_pRegUserDict->replace(*it,new QString(u->name())); + m_pRegUserDict->tqreplace(*it,new TQString(u->name())); } } ++it; @@ -1110,30 +1110,30 @@ void KviWatchNotifyListManager::start() buildRegUserDict(); - QString watchStr; + TQString watchStr; - KviPointerHashTableIterator it(*m_pRegUserDict); + KviPointerHashTableIterator it(*m_pRegUserDict); while(it.current()) { - QString nk = it.currentKey(); - if(nk.find('*') == -1) + TQString nk = it.currentKey(); + if(nk.tqfind('*') == -1) { if((watchStr.length() + nk.length() + 2) > 501) { - KviQCString dat = m_pConnection->encodeText(watchStr); + KviTQCString dat = m_pConnection->encodeText(watchStr); m_pConnection->sendFmtData("WATCH%s",dat.data()); if(_OUTPUT_VERBOSE) m_pConsole->output(KVI_OUT_SYSTEMMESSAGE,__tr2qs("Notify list: Adding watch entries for%Q"),&watchStr); watchStr = ""; } - KviQString::appendFormatted(watchStr," +%Q",&nk); + KviTQString::appendFormatted(watchStr," +%Q",&nk); } ++it; } if(!watchStr.isEmpty()) { - KviQCString dat = m_pConnection->encodeText(watchStr); + KviTQCString dat = m_pConnection->encodeText(watchStr); m_pConnection->sendFmtData("WATCH%s",dat.data()); if(_OUTPUT_VERBOSE) m_pConsole->output(KVI_OUT_SYSTEMMESSAGE,__tr2qs("Notify list: Adding watch entries for%Q"),&watchStr); @@ -1146,9 +1146,9 @@ void KviWatchNotifyListManager::stop() m_pRegUserDict->clear(); } -bool KviWatchNotifyListManager::doMatchUser(KviIrcMessage * msg,const QString ¬ifyString,const KviIrcMask & mask) +bool KviWatchNotifyListManager::doMatchUser(KviIrcMessage * msg,const TQString ¬ifyString,const KviIrcMask & tqmask) { - QString * nam = m_pRegUserDict->find(notifyString); + TQString * nam = m_pRegUserDict->tqfind(notifyString); if(nam) { @@ -1156,39 +1156,39 @@ bool KviWatchNotifyListManager::doMatchUser(KviIrcMessage * msg,const QString &n if(KviRegisteredUser * u = g_pRegisteredUserDataBase->findUserByName(*nam)) { // ok ... match the user - if(u->matchesFixed(mask)) + if(u->matchesFixed(tqmask)) { // new user online - if(!(m_pConsole->notifyListView()->findEntry(mask.nick()))) + if(!(m_pConsole->notifyListView()->findEntry(tqmask.nick()))) { - notifyOnLine(mask.nick(),mask.user(),mask.host(),"watch"); + notifyOnLine(tqmask.nick(),tqmask.user(),tqmask.host(),"watch"); } else { // else already online , and matching...all ok if(msg->numeric() == RPL_NOWON) { // This is a reply to a /watch +something (should not happen, unless the user is messing) or to /watch l (user requested) - notifyOnLine(mask.nick(),mask.user(),mask.host(), + notifyOnLine(tqmask.nick(),tqmask.user(),tqmask.host(), __tr2qs("watch entry listing requested by user"),false); } else { // This is a RPL_LOGON....we're desynched ? - notifyOnLine(mask.nick(),mask.user(),mask.host(), + notifyOnLine(tqmask.nick(),tqmask.user(),tqmask.host(), __tr2qs("possible watch list desync"),false); } } } else { // not matched.... has he been online before ? - if(m_pConsole->notifyListView()->findEntry(mask.nick())) + if(m_pConsole->notifyListView()->findEntry(tqmask.nick())) { - // has been online just a sec ago , but now the mask does not match + // has been online just a sec ago , but now the tqmask does not match // prolly the reguserdb has been changed - notifyOffLine(mask.nick(),mask.user(),mask.host(), - __tr2qs("registration mask changed or desync with the watch service")); + notifyOffLine(tqmask.nick(),tqmask.user(),tqmask.host(), + __tr2qs("registration tqmask changed or desync with the watch service")); } else { // has never been online if(_OUTPUT_VERBOSE) m_pConsole->output(KVI_OUT_SYSTEMMESSAGE, - __tr("Notify list: \r!n\r%Q\r appears to be online, but the mask [%Q@\r!h\r%Q\r] does not match (watch: registration mask does not match, or nickname is being used by someone else)"), - &(mask.nick()),&(mask.user()),&(mask.host())); + __tr("Notify list: \r!n\r%Q\r appears to be online, but the tqmask [%Q@\r!h\r%Q\r] does not match (watch: registration tqmask does not match, or nickname is being used by someone else)"), + &(tqmask.nick()),&(tqmask.user()),&(tqmask.host())); } } } else { @@ -1202,9 +1202,9 @@ bool KviWatchNotifyListManager::doMatchUser(KviIrcMessage * msg,const QString &n } else { // not in our dictionary // prolly someone used /WATCH behind our back... bad boy! - if(!(m_pConsole->notifyListView()->findEntry(mask.nick()))) + if(!(m_pConsole->notifyListView()->findEntry(tqmask.nick()))) { - notifyOnLine(mask.nick(),mask.user(),mask.host(),__tr2qs("watch entry added by user")); + notifyOnLine(tqmask.nick(),tqmask.user(),tqmask.host(),__tr2qs("watch entry added by user")); } } return true; @@ -1228,9 +1228,9 @@ bool KviWatchNotifyListManager::handleWatchReply(KviIrcMessage *msg) const char * nk = msg->safeParam(1); const char * us = msg->safeParam(2); const char * ho = msg->safeParam(3); - QString dnk = m_pConnection->decodeText(nk); - QString dus = m_pConnection->decodeText(us); - QString dho = m_pConnection->decodeText(ho); + TQString dnk = m_pConnection->decodeText(nk); + TQString dus = m_pConnection->decodeText(us); + TQString dho = m_pConnection->decodeText(ho); if((msg->numeric() == RPL_LOGON) || (msg->numeric() == RPL_NOWON)) { @@ -1247,7 +1247,7 @@ bool KviWatchNotifyListManager::handleWatchReply(KviIrcMessage *msg) if(_OUTPUT_VERBOSE) m_pConsole->output(KVI_OUT_SYSTEMMESSAGE,__tr2qs("Notify list: Stopped watching for \r!n\r%Q\r"),&dnk); } - if(m_pRegUserDict->find(dnk))m_pRegUserDict->remove(dnk); // kill that + if(m_pRegUserDict->tqfind(dnk))m_pRegUserDict->remove(dnk); // kill that return true; @@ -1263,7 +1263,7 @@ bool KviWatchNotifyListManager::handleWatchReply(KviIrcMessage *msg) if(_OUTPUT_VERBOSE) m_pConsole->output(KVI_OUT_SYSTEMMESSAGE,__tr2qs("Notify list: \r!n\r%Q\r is offline (watch)"),&dnk); } else { - // This is a RPL_LOGOFF for an user that has not matched the reg-mask + // This is a RPL_LOGOFF for an user that has not matched the reg-tqmask notifyOffLine(dnk,dus,dho,__tr2qs("unmatched watch list entry")); } } diff --git a/src/kvirc/kernel/kvi_notifylist.h b/src/kvirc/kernel/kvi_notifylist.h index 8484f3f7..ebf6151e 100644 --- a/src/kvirc/kernel/kvi_notifylist.h +++ b/src/kvirc/kernel/kvi_notifylist.h @@ -28,10 +28,10 @@ #include "kvi_settings.h" -#include +#include #include "kvi_pointerlist.h" #include "kvi_pointerhashtable.h" -#include +#include #include "kvi_qstring.h" @@ -40,13 +40,14 @@ class KviIrcMessage; class KviIrcMask; class KviIrcConnection; -class KVIRC_API KviNotifyListManager : public QObject +class KVIRC_API KviNotifyListManager : public TQObject { friend class KviConsole; friend class KviConnectionInfo; friend class KviServerParser; friend class KviIrcConnection; Q_OBJECT + TQ_OBJECT protected: KviNotifyListManager(KviIrcConnection * pConnection); ~KviNotifyListManager(); @@ -59,8 +60,8 @@ protected: virtual bool handleUserhost(KviIrcMessage * msg); virtual bool handleIsOn(KviIrcMessage * msg); virtual bool handleWatchReply(KviIrcMessage *msg); - void notifyOnLine(const QString &nick,const QString &user = QString::null,const QString &host = QString::null,const QString &szReason = QString::null,bool bJoin=true); - void notifyOffLine(const QString &nick,const QString &user = QString::null,const QString &host = QString::null,const QString &szReason = QString::null); + void notifyOnLine(const TQString &nick,const TQString &user = TQString(),const TQString &host = TQString(),const TQString &szReason = TQString(),bool bJoin=true); + void notifyOffLine(const TQString &nick,const TQString &user = TQString(),const TQString &host = TQString(),const TQString &szReason = TQString()); public: KviConsole * console(){ return m_pConsole; }; }; @@ -71,22 +72,23 @@ class KVIRC_API KviIsOnNotifyListManager : public KviNotifyListManager friend class KviServerParser; friend class KviIrcConnection; Q_OBJECT + TQ_OBJECT protected: KviIsOnNotifyListManager(KviIrcConnection * pConnection); ~KviIsOnNotifyListManager(); private: - KviPointerHashTable * m_pRegUserDict; // dict notifystring->reguser name - KviPointerList * m_pNotifyList; // list of notifystring (total) - KviPointerList * m_pIsOnList; // list of notifystring (one session) - QString m_szIsOnString; // m_pIsOnList in form of a string - KviPointerList * m_pOnlineList; // - KviPointerList * m_pUserhostList; - QString m_szUserhostString; + KviPointerHashTable * m_pRegUserDict; // dict notifystring->reguser name + KviPointerList * m_pNotifyList; // list of notifystring (total) + KviPointerList * m_pIsOnList; // list of notifystring (one session) + TQString m_szIsOnString; // m_pIsOnList in form of a string + KviPointerList * m_pOnlineList; // + KviPointerList * m_pUserhostList; + TQString m_szUserhostString; bool m_bExpectingIsOn; bool m_bExpectingUserhost; - QTimer * m_pDelayedIsOnTimer; - QTimer * m_pDelayedNotifyTimer; - QTimer * m_pDelayedUserhostTimer; + TQTimer * m_pDelayedIsOnTimer; + TQTimer * m_pDelayedNotifyTimer; + TQTimer * m_pDelayedUserhostTimer; bool m_bRunning; protected: virtual void start(); @@ -108,7 +110,7 @@ private slots: void buildNotifyList(); void sendIsOn(); void sendUserhost(); - bool doMatchUser(const QString ¬ifyString,const KviIrcMask & mask); + bool doMatchUser(const TQString ¬ifyString,const KviIrcMask & tqmask); }; @@ -119,12 +121,13 @@ class KVIRC_API KviStupidNotifyListManager : public KviNotifyListManager friend class KviServerParser; friend class KviIrcConnection; Q_OBJECT + TQ_OBJECT protected: KviStupidNotifyListManager(KviIrcConnection * pConnection); ~KviStupidNotifyListManager(); protected: - KviPointerList * m_pNickList; - QString m_szLastIsOnMsg; + KviPointerList * m_pNickList; + TQString m_szLastIsOnMsg; int m_iNextNickToCheck; int m_iRestartTimer; protected: @@ -132,7 +135,7 @@ protected: virtual void stop(); virtual bool handleIsOn(KviIrcMessage *msg); protected: - virtual void timerEvent(QTimerEvent *e); + virtual void timerEvent(TQTimerEvent *e); private: void buildNickList(); void sendIsOn(); @@ -144,17 +147,18 @@ class KVIRC_API KviWatchNotifyListManager : public KviNotifyListManager friend class KviServerParser; friend class KviIrcConnection; Q_OBJECT + TQ_OBJECT public: KviWatchNotifyListManager(KviIrcConnection * pConnection); ~KviWatchNotifyListManager(); protected: - KviPointerHashTable * m_pRegUserDict; // dict notifystring->reguser name + KviPointerHashTable * m_pRegUserDict; // dict notifystring->reguser name protected: void buildRegUserDict(); virtual void start(); virtual void stop(); virtual bool handleWatchReply(KviIrcMessage *msg); - bool doMatchUser(KviIrcMessage *msg,const QString ¬ifyString,const KviIrcMask & mask); + bool doMatchUser(KviIrcMessage *msg,const TQString ¬ifyString,const KviIrcMask & tqmask); }; diff --git a/src/kvirc/kernel/kvi_options.cpp b/src/kvirc/kernel/kvi_options.cpp index 84bf4500..602e7786 100644 --- a/src/kvirc/kernel/kvi_options.cpp +++ b/src/kvirc/kernel/kvi_options.cpp @@ -42,21 +42,21 @@ #include "kvi_frame.h" #include "kvi_internalcmd.h" #include "kvi_theme.h" -#include -#include +#include +#include //#include "kvi_textencoding.h" //xml parser -#include +#include //!xml parser #include -#include +#include #include "kvi_fileutils.h" -#include -#include +#include +#include // kvi_app.cpp extern KVIRC_API int g_iIdentDaemonRunningUsers; @@ -66,9 +66,9 @@ extern KVIRC_API int g_iIdentDaemonRunningUsers; KviRectOption g_rectOptionsTable[KVI_NUM_RECT_OPTIONS]= { - RECT_OPTION("FrameGeometry",QRect(0,0,10,10),KviOption_sectFlagGeometry), - RECT_OPTION("GeneralOptionsDialogGeometry",QRect(50,50,600,450),KviOption_sectFlagGeometry), - RECT_OPTION("RegisteredUsersDialogGeometry",QRect(50,50,600,450),KviOption_sectFlagGeometry) + RECT_OPTION("FrameGeometry",TQRect(0,0,10,10),KviOption_sectFlagGeometry), + RECT_OPTION("GeneralOptionsDialogGeometry",TQRect(50,50,600,450),KviOption_sectFlagGeometry), + RECT_OPTION("RegisteredUsersDialogGeometry",TQRect(50,50,600,450),KviOption_sectFlagGeometry) }; #define BOOL_OPTION(_txt,_val,_flags) KviBoolOption(KVI_BOOL_OPTIONS_PREFIX _txt,_val,_flags) @@ -338,7 +338,7 @@ KviStringOption g_stringOptionsTable[KVI_NUM_STRING_OPTIONS]= STRING_OPTION("Realname",KVI_DEFAULT_REALNAME,KviOption_sectFlagUser), STRING_OPTION("LocalHostIp","127.0.0.1",KviOption_sectFlagIrcSocket), STRING_OPTION("PartMessage",KVI_DEFAULT_PART_MESSAGE,KviOption_sectFlagConnection), - STRING_OPTION("QuitMessage",KVI_DEFAULT_QUIT_MESSAGE,KviOption_sectFlagConnection), + STRING_OPTION("QuitMessage",KVI_DEFAULT_TQUIT_MESSAGE,KviOption_sectFlagConnection), STRING_OPTION("UrlHttpCommand",RUN_THE_BROWSER,KviOption_sectFlagUrl), STRING_OPTION("ExtendedPrivmsgPrefix","[",KviOption_sectFlagIrcView | KviOption_groupTheme), STRING_OPTION("ExtendedPrivmsgPostfix","] ",KviOption_sectFlagIrcView | KviOption_groupTheme), @@ -389,10 +389,10 @@ KviStringOption g_stringOptionsTable[KVI_NUM_STRING_OPTIONS]= }; #define STRINGLIST_OPTION(_txt,_flags) \ - KviStringListOption(KVI_STRINGLIST_OPTIONS_PREFIX _txt,QStringList(),_flags) + KviStringListOption(KVI_STRINGLIST_OPTIONS_PREFIX _txt,TQStringList(),_flags) #define STRINGLIST_OPTION_WITHDEFAULT(_txt,_flags,_def) \ - KviStringListOption(KVI_STRINGLIST_OPTIONS_PREFIX _txt,QStringList(_def),_flags) + KviStringListOption(KVI_STRINGLIST_OPTIONS_PREFIX _txt,TQStringList(_def),_flags) KviStringListOption g_stringlistOptionsTable[KVI_NUM_STRINGLIST_OPTIONS]= @@ -408,7 +408,7 @@ KviStringListOption g_stringlistOptionsTable[KVI_NUM_STRINGLIST_OPTIONS]= }; #define MIRC_COLOR_OPTION(_num,_red,_green,_blue) \ - KviColorOption(KVI_MIRCCOLOR_OPTIONS_PREFIX _num,QColor(_red,_green,_blue), \ + KviColorOption(KVI_MIRCCOLOR_OPTIONS_PREFIX _num,TQColor(_red,_green,_blue), \ KviOption_sectFlagMircColor | KviOption_resetUpdateGui | KviOption_groupTheme) KviColorOption g_mirccolorOptionsTable[KVI_NUM_MIRCCOLOR_OPTIONS]= @@ -433,7 +433,7 @@ KviColorOption g_mirccolorOptionsTable[KVI_NUM_MIRCCOLOR_OPTIONS]= #define COLOR_OPTION(_name,_red,_green,_blue,_flags) \ KviColorOption(KVI_COLOR_OPTIONS_PREFIX _name, \ - QColor(_red,_green,_blue), \ + TQColor(_red,_green,_blue), \ _flags | KviOption_resetUpdateGui | KviOption_groupTheme) KviColorOption g_colorOptionsTable[KVI_NUM_COLOR_OPTIONS]= @@ -500,7 +500,7 @@ KviColorOption g_colorOptionsTable[KVI_NUM_COLOR_OPTIONS]= #define IC_COLOR_OPTION(_num,_red,_green,_blue) \ KviColorOption( \ KVI_ICCOLOR_OPTIONS_PREFIX _num, \ - QColor(_red,_green,_blue), \ + TQColor(_red,_green,_blue), \ KviOption_sectFlagTaskBar | KviOption_resetUpdateGui | KviOption_groupTheme) KviColorOption g_iccolorOptionsTable[KVI_NUM_ICCOLOR_OPTIONS]= @@ -627,7 +627,7 @@ KviUIntOption g_uintOptionsTable[KVI_NUM_UINT_OPTIONS]= #define FONT_OPTION(_name,_face,_size,_flags) \ KviFontOption( \ KVI_FONT_OPTIONS_PREFIX _name , \ - QFont(_face,_size) , \ + TQFont(_face,_size) , \ _flags | KviOption_groupTheme \ ) @@ -642,23 +642,13 @@ KviFontOption g_fontOptionsTable[KVI_NUM_FONT_OPTIONS]= FONT_OPTION("IrcToolBarApplet","Arial",9,KviOption_sectFlagIrcToolBar | KviOption_resetUpdateGui), FONT_OPTION("Taskbar","Arial",9,KviOption_sectFlagTaskBar | KviOption_resetUpdateTaskBar) #else - #if QT_VERSION >= 300 - FONT_OPTION("IrcView","Monospace",10,KviOption_sectFlagIrcView | KviOption_resetUpdateGui), - FONT_OPTION("Input","Sans Serif",12,KviOption_sectFlagInput | KviOption_resetUpdateGui), - FONT_OPTION("UserListView","Sans Serif",10,KviOption_sectFlagUserListView | KviOption_resetUpdateGui), - FONT_OPTION("Label","Sans Serif",10,KviOption_sectFlagLabel | KviOption_resetUpdateGui), - FONT_OPTION("Application","Sans Serif",10,KviOption_sectFlagGui | KviOption_resetUpdateAppFont), - FONT_OPTION("IrcToolBarApplet","Sans Serif",10,KviOption_sectFlagIrcToolBar | KviOption_resetUpdateGui), - FONT_OPTION("Taskbar","Sans Serif",10,KviOption_sectFlagTaskBar | KviOption_resetUpdateTaskBar) - #else - FONT_OPTION("IrcView","Monospace",12,KviOption_sectFlagIrcView | KviOption_resetUpdateGui), - FONT_OPTION("Input","Sans Serif",16,KviOption_sectFlagInput | KviOption_resetUpdateGui), - FONT_OPTION("UserListView","Sans Serif",12,KviOption_sectFlagUserListView | KviOption_resetUpdateGui), - FONT_OPTION("Label","Sans Serif",12,KviOption_sectFlagLabel | KviOption_resetUpdateGui), - FONT_OPTION("Application","Sans Serif",12,KviOption_sectFlagGui | KviOption_resetUpdateAppFont), - FONT_OPTION("IrcToolBarApplet","Sans Serif",10,KviOption_sectFlagIrcToolBar | KviOption_resetUpdateGui), - FONT_OPTION("Taskbar","Sans Serif",10,KviOption_sectFlagTaskBar | KviOption_resetUpdateTaskBar) - #endif + FONT_OPTION("IrcView","Monospace",10,KviOption_sectFlagIrcView | KviOption_resetUpdateGui), + FONT_OPTION("Input","Sans Serif",12,KviOption_sectFlagInput | KviOption_resetUpdateGui), + FONT_OPTION("UserListView","Sans Serif",10,KviOption_sectFlagUserListView | KviOption_resetUpdateGui), + FONT_OPTION("Label","Sans Serif",10,KviOption_sectFlagLabel | KviOption_resetUpdateGui), + FONT_OPTION("Application","Sans Serif",10,KviOption_sectFlagGui | KviOption_resetUpdateAppFont), + FONT_OPTION("IrcToolBarApplet","Sans Serif",10,KviOption_sectFlagIrcToolBar | KviOption_resetUpdateGui), + FONT_OPTION("Taskbar","Sans Serif",10,KviOption_sectFlagTaskBar | KviOption_resetUpdateTaskBar) #endif }; @@ -708,7 +698,7 @@ KviMsgTypeOption g_msgtypeOptionsTable[KVI_NUM_MSGTYPE_OPTIONS]= MSGTYPE_OPTION("Topic",__tr_no_lookup("Topic message"),KVI_SMALLICON_TOPIC,KVI_MSGTYPE_LEVEL_3), MSGTYPE_OPTION("OwnPrivateMessage",__tr_no_lookup("Own private message"),KVI_SMALLICON_OWNPRIVMSG,KVI_MSGTYPE_LEVEL_1), MSGTYPE_OPTION("ChannelPrivateMessage",__tr_no_lookup("Channel private message"),KVI_SMALLICON_CHANPRIVMSG,KVI_MSGTYPE_LEVEL_4), - MSGTYPE_OPTION("QueryPrivateMessage",__tr_no_lookup("Query private message"),KVI_SMALLICON_QUERYPRIVMSG,KVI_MSGTYPE_LEVEL_4), + MSGTYPE_OPTION("QueryPrivateMessage",__tr_no_lookup("Query private message"),KVI_SMALLICON_TQUERYPRIVMSG,KVI_MSGTYPE_LEVEL_4), MSGTYPE_OPTION("CtcpReply",__tr_no_lookup("CTCP reply"),KVI_SMALLICON_CTCPREPLY,KVI_MSGTYPE_LEVEL_3), MSGTYPE_OPTION("CtcpRequestReplied",__tr_no_lookup("CTCP request replied"),KVI_SMALLICON_CTCPREQUESTREPLIED,KVI_MSGTYPE_LEVEL_3), MSGTYPE_OPTION("CtcpRequestIgnored",__tr_no_lookup("CTCP request ignored"),KVI_SMALLICON_CTCPREQUESTIGNORED,KVI_MSGTYPE_LEVEL_3), @@ -716,9 +706,9 @@ KviMsgTypeOption g_msgtypeOptionsTable[KVI_NUM_MSGTYPE_OPTIONS]= MSGTYPE_OPTION("CtcpRequestUnknown",__tr_no_lookup("CTCP request unknown"),KVI_SMALLICON_CTCPREQUESTUNKNOWN,KVI_MSGTYPE_LEVEL_3), MSGTYPE_OPTION("Action",__tr_no_lookup("User action"),KVI_SMALLICON_ACTION,KVI_MSGTYPE_LEVEL_3), MSGTYPE_OPTION("AvatarChange",__tr_no_lookup("Avatar change"),KVI_SMALLICON_AVATAR,KVI_MSGTYPE_LEVEL_3), - MSGTYPE_OPTION("Quit",__tr_no_lookup("Quit message"),KVI_SMALLICON_QUIT,KVI_MSGTYPE_LEVEL_1), + MSGTYPE_OPTION("Quit",__tr_no_lookup("Quit message"),KVI_SMALLICON_TQUIT,KVI_MSGTYPE_LEVEL_1), MSGTYPE_OPTION("Split",__tr_no_lookup("Split message"),KVI_SMALLICON_SPLIT,KVI_MSGTYPE_LEVEL_2), - MSGTYPE_OPTION("QuitSplit",__tr_no_lookup("Quit on netsplit message"),KVI_SMALLICON_QUITSPLIT,KVI_MSGTYPE_LEVEL_2), + MSGTYPE_OPTION("QuitSplit",__tr_no_lookup("Quit on netsplit message"),KVI_SMALLICON_TQUITSPLIT,KVI_MSGTYPE_LEVEL_2), MSGTYPE_OPTION("Nick",__tr_no_lookup("Nick changes"),KVI_SMALLICON_NICK,KVI_MSGTYPE_LEVEL_2), MSGTYPE_OPTION("Op",__tr_no_lookup("+o mode change"),KVI_SMALLICON_OP,KVI_MSGTYPE_LEVEL_2), MSGTYPE_OPTION("Deop",__tr_no_lookup("-o mode change"),KVI_SMALLICON_DEOP,KVI_MSGTYPE_LEVEL_2), @@ -749,7 +739,7 @@ KviMsgTypeOption g_msgtypeOptionsTable[KVI_NUM_MSGTYPE_OPTIONS]= MSGTYPE_OPTION("NotifyOffLine",__tr_no_lookup("Notify list leaves"),KVI_SMALLICON_NOTIFYOFFLINE,KVI_MSGTYPE_LEVEL_3), MSGTYPE_OPTION("OwnPrivmsgCrypted",__tr_no_lookup("Own encrypted private message"),KVI_SMALLICON_OWNPRIVMSGCRYPTED,KVI_MSGTYPE_LEVEL_1), MSGTYPE_OPTION("ChanPrivmsgCrypted",__tr_no_lookup("Channel encrypted private message"),KVI_SMALLICON_CHANPRIVMSGCRYPTED,KVI_MSGTYPE_LEVEL_3), - MSGTYPE_OPTION("QueryPrivmsgCrypted",__tr_no_lookup("Query encrypted private message"),KVI_SMALLICON_QUERYPRIVMSGCRYPTED,KVI_MSGTYPE_LEVEL_3), + MSGTYPE_OPTION("QueryPrivmsgCrypted",__tr_no_lookup("Query encrypted private message"),KVI_SMALLICON_TQUERYPRIVMSGCRYPTED,KVI_MSGTYPE_LEVEL_3), MSGTYPE_OPTION("DccChatMsg",__tr_no_lookup("DCC chat message"),KVI_SMALLICON_DCCCHATMSG,KVI_MSGTYPE_LEVEL_3), MSGTYPE_OPTION("DccChatMsgCrypted",__tr_no_lookup("Encrypted DCC chat message"),KVI_SMALLICON_DCCCHATMSGCRYPTED,KVI_MSGTYPE_LEVEL_3), MSGTYPE_OPTION("Irc",__tr_no_lookup("Login operations completed"),KVI_SMALLICON_IRC,KVI_MSGTYPE_LEVEL_1), @@ -761,8 +751,8 @@ KviMsgTypeOption g_msgtypeOptionsTable[KVI_NUM_MSGTYPE_OPTIONS]= MSGTYPE_OPTION("IcqMessageSent",__tr_no_lookup("Outgoing ICQ user-message"),KVI_SMALLICON_MESSAGESENT,KVI_MSGTYPE_LEVEL_1), MSGTYPE_OPTION("ChannelNotice",__tr_no_lookup("Channel notice"),KVI_SMALLICON_CHANNELNOTICE,KVI_MSGTYPE_LEVEL_3), MSGTYPE_OPTION("ChannelNoticeCrypted",__tr_no_lookup("Encrypted channel notice"),KVI_SMALLICON_CHANNELNOTICECRYPTED,KVI_MSGTYPE_LEVEL_3), - MSGTYPE_OPTION("QueryNotice",__tr_no_lookup("Query notice"),KVI_SMALLICON_QUERYNOTICE,KVI_MSGTYPE_LEVEL_3), - MSGTYPE_OPTION("QueryNoticeCrypted",__tr_no_lookup("Encrypted query notice"),KVI_SMALLICON_QUERYNOTICECRYPTED,KVI_MSGTYPE_LEVEL_3), + MSGTYPE_OPTION("QueryNotice",__tr_no_lookup("Query notice"),KVI_SMALLICON_TQUERYNOTICE,KVI_MSGTYPE_LEVEL_3), + MSGTYPE_OPTION("QueryNoticeCrypted",__tr_no_lookup("Encrypted query notice"),KVI_SMALLICON_TQUERYNOTICECRYPTED,KVI_MSGTYPE_LEVEL_3), MSGTYPE_OPTION("ServerNotice",__tr_no_lookup("Server notice"),KVI_SMALLICON_SERVERNOTICE,KVI_MSGTYPE_LEVEL_3), MSGTYPE_OPTION("HalfOp",__tr_no_lookup("Halfop mode change"),KVI_SMALLICON_HALFOP,KVI_MSGTYPE_LEVEL_2), MSGTYPE_OPTION("CtcpReplyUnknown",__tr_no_lookup("Unknown CTCP reply"),KVI_SMALLICON_CTCPREPLYUNKNOWN,KVI_MSGTYPE_LEVEL_3), @@ -774,7 +764,7 @@ KviMsgTypeOption g_msgtypeOptionsTable[KVI_NUM_MSGTYPE_OPTIONS]= MSGTYPE_OPTION("HalfDeOp",__tr_no_lookup("Half-deop mode change"),KVI_SMALLICON_HALFDEOP,KVI_MSGTYPE_LEVEL_2), MSGTYPE_OPTION("Invite",__tr_no_lookup("Invite message"),KVI_SMALLICON_INVITE,KVI_MSGTYPE_LEVEL_3), MSGTYPE_OPTION("Multimedia",__tr_no_lookup("Multimedia message"),KVI_SMALLICON_MULTIMEDIA,KVI_MSGTYPE_LEVEL_2), - MSGTYPE_OPTION("QueryTrace",__tr_no_lookup("Query trace message"),KVI_SMALLICON_QUERYTRACE,KVI_MSGTYPE_LEVEL_1), + MSGTYPE_OPTION("QueryTrace",__tr_no_lookup("Query trace message"),KVI_SMALLICON_TQUERYTRACE,KVI_MSGTYPE_LEVEL_1), MSGTYPE_OPTION("Wallops",__tr_no_lookup("Wallops message"),KVI_SMALLICON_WALLOPS,KVI_MSGTYPE_LEVEL_3), MSGTYPE_OPTION("JoinError",__tr_no_lookup("Join error message"),KVI_SMALLICON_NOCHANNEL,KVI_MSGTYPE_LEVEL_3), MSGTYPE_OPTION("BroadcastPrivmsg",__tr_no_lookup("Broadcast private message"),KVI_SMALLICON_BROADCASTPRIVMSG,KVI_MSGTYPE_LEVEL_3), @@ -786,18 +776,18 @@ KviMsgTypeOption g_msgtypeOptionsTable[KVI_NUM_MSGTYPE_OPTIONS]= MSGTYPE_OPTION("MeDeVoice",__tr_no_lookup("Am devoiced"),KVI_SMALLICON_MEDEVOICE,KVI_MSGTYPE_LEVEL_5), MSGTYPE_OPTION("MeHalfOp",__tr_no_lookup("Am halfop'd"),KVI_SMALLICON_MEHALFOP,KVI_MSGTYPE_LEVEL_5), MSGTYPE_OPTION("MeDeHalfOp",__tr_no_lookup("Am de-halfop'd"),KVI_SMALLICON_MEDEHALFOP,KVI_MSGTYPE_LEVEL_5), - MSGTYPE_OPTION("MeBan",__tr_no_lookup("Ban matching my mask"),KVI_SMALLICON_MEBAN,KVI_MSGTYPE_LEVEL_5), - MSGTYPE_OPTION("MeUnban",__tr_no_lookup("Unban matching my mask"),KVI_SMALLICON_MEUNBAN,KVI_MSGTYPE_LEVEL_5), - MSGTYPE_OPTION("MeBanExcept",__tr_no_lookup("Ban exception matching my mask"),KVI_SMALLICON_MEBANEXCEPT,KVI_MSGTYPE_LEVEL_5), - MSGTYPE_OPTION("MeBanUnExcept",__tr_no_lookup("Ban unexception matching my mask"),KVI_SMALLICON_MEBANUNEXCEPT,KVI_MSGTYPE_LEVEL_5), - MSGTYPE_OPTION("MeInviteExcept",__tr_no_lookup("Invite exception matching my mask"),KVI_SMALLICON_MEINVITEEXCEPT,KVI_MSGTYPE_LEVEL_5), - MSGTYPE_OPTION("MeInviteUnexcept",__tr_no_lookup("Invite unexception matching my mask"),KVI_SMALLICON_MEINVITEUNEXCEPT,KVI_MSGTYPE_LEVEL_5), + MSGTYPE_OPTION("MeBan",__tr_no_lookup("Ban matching my tqmask"),KVI_SMALLICON_MEBAN,KVI_MSGTYPE_LEVEL_5), + MSGTYPE_OPTION("MeUnban",__tr_no_lookup("Unban matching my tqmask"),KVI_SMALLICON_MEUNBAN,KVI_MSGTYPE_LEVEL_5), + MSGTYPE_OPTION("MeBanExcept",__tr_no_lookup("Ban exception matching my tqmask"),KVI_SMALLICON_MEBANEXCEPT,KVI_MSGTYPE_LEVEL_5), + MSGTYPE_OPTION("MeBanUnExcept",__tr_no_lookup("Ban unexception matching my tqmask"),KVI_SMALLICON_MEBANUNEXCEPT,KVI_MSGTYPE_LEVEL_5), + MSGTYPE_OPTION("MeInviteExcept",__tr_no_lookup("Invite exception matching my tqmask"),KVI_SMALLICON_MEINVITEEXCEPT,KVI_MSGTYPE_LEVEL_5), + MSGTYPE_OPTION("MeInviteUnexcept",__tr_no_lookup("Invite unexception matching my tqmask"),KVI_SMALLICON_MEINVITEUNEXCEPT,KVI_MSGTYPE_LEVEL_5), MSGTYPE_OPTION("Ignore",__tr_no_lookup("Ignored user message"),KVI_SMALLICON_IGNORE,KVI_MSGTYPE_LEVEL_3), MSGTYPE_OPTION("Stats",__tr_no_lookup("Server statistics"),KVI_SMALLICON_STATS,KVI_MSGTYPE_LEVEL_1), MSGTYPE_OPTION("SSL",__tr_no_lookup("SSL message"),KVI_SMALLICON_SSL,KVI_MSGTYPE_LEVEL_1), MSGTYPE_OPTION("Search",__tr_no_lookup("Search"),KVI_SMALLICON_SEARCH,KVI_MSGTYPE_LEVEL_1), MSGTYPE_OPTION("GenericSuccess",__tr_no_lookup("Generic success"),KVI_SMALLICON_CYANSQUARE,KVI_MSGTYPE_LEVEL_3), - MSGTYPE_OPTION("GenericStatus",__tr_no_lookup("Generic status"),KVI_SMALLICON_GREENSQUARE,KVI_MSGTYPE_LEVEL_2), + MSGTYPE_OPTION("GenerictqStatus",__tr_no_lookup("Generic status"),KVI_SMALLICON_GREENSQUARE,KVI_MSGTYPE_LEVEL_2), MSGTYPE_OPTION("GenericVerbose",__tr_no_lookup("Generic verbose message"),KVI_SMALLICON_DKGREENSQUARE,KVI_MSGTYPE_LEVEL_1), MSGTYPE_OPTION("GenericWarning",__tr_no_lookup("Generic warning"),KVI_SMALLICON_YELLOWSQUARE,KVI_MSGTYPE_LEVEL_3), MSGTYPE_OPTION_SPEC("GenericError",__tr_no_lookup("Generic error"),KVI_SMALLICON_REDSQUARE,KVI_RED,KVI_TRANSPARENT,KVI_MSGTYPE_LEVEL_5), @@ -868,7 +858,7 @@ void KviApp::loadOptions() READ_OPTIONS(KVI_NUM_RECT_OPTIONS,g_rectOptionsTable,readRectEntry) READ_OPTIONS(KVI_NUM_BOOL_OPTIONS,g_boolOptionsTable,readBoolEntry) - READ_OPTIONS(KVI_NUM_STRING_OPTIONS,g_stringOptionsTable,readQStringEntry) + READ_OPTIONS(KVI_NUM_STRING_OPTIONS,g_stringOptionsTable,readTQStringEntry) READ_OPTIONS(KVI_NUM_COLOR_OPTIONS,g_colorOptionsTable,readColorEntry) READ_OPTIONS(KVI_NUM_PIXMAP_OPTIONS,g_pixmapOptionsTable,readPixmapEntry) READ_OPTIONS(KVI_NUM_UINT_OPTIONS,g_uintOptionsTable,readUIntEntry) @@ -896,7 +886,7 @@ void KviApp::loadOptions() void KviApp::saveOptions() { - QString buffer; + TQString buffer; saveRecentChannels(); @@ -963,7 +953,7 @@ namespace KviTheme // that are implemented here for convenience (in saving the options) bool save(KviThemeInfo &options) { - QString szD = options.absoluteDirectory(); + TQString szD = options.absoluteDirectory(); if(szD.isEmpty()) { @@ -1018,9 +1008,9 @@ namespace KviTheme { if(g_pixmapOptionsTable[i].option.pixmap()) { - QString szPixPath = options.absoluteDirectory(); + TQString szPixPath = options.absoluteDirectory(); szPixPath.append(KVI_PATH_SEPARATOR_CHAR); - QString szPixName = g_pixmapOptionsTable[i].name; + TQString szPixName = g_pixmapOptionsTable[i].name; szPixName += ".png"; szPixPath += szPixName; @@ -1041,18 +1031,18 @@ namespace KviTheme cfg.writeEntry("stringIconThemeSubdir",options.subdirectory()); // find all the "kvi_bigicon" images that we can find in the main pics directory - QString szPicsPath; + TQString szPicsPath; g_pApp->getGlobalKvircDirectory(szPicsPath,KviApp::Pics); - QDir d(szPicsPath); - QStringList sl = d.entryList("kvi_bigicon_*.png",QDir::Files); + TQDir d(szPicsPath); + TQStringList sl = d.entryList("kvi_bigicon_*.png",TQDir::Files); - for(QStringList::Iterator it=sl.begin();it != sl.end();it++) + for(TQStringList::Iterator it=sl.begin();it != sl.end();it++) { KviCachedPixmap * p = g_pIconManager->getPixmapWithCache(*it); if(p) { - QString szPixPath = options.absoluteDirectory(); + TQString szPixPath = options.absoluteDirectory(); szPixPath.append(KVI_PATH_SEPARATOR_CHAR); szPixPath += *it; @@ -1081,9 +1071,9 @@ namespace KviTheme for(int j=0;jgetSmallIcon(j); + TQPixmap * pix = g_pIconManager->getSmallIcon(j); - QString szPixPath = options.absoluteDirectory(); + TQString szPixPath = options.absoluteDirectory(); szPixPath.append(KVI_PATH_SEPARATOR_CHAR); szPixPath.append(KVI_SMALLICONS_SUBDIRECTORY); szPixPath.append(KVI_PATH_SEPARATOR_CHAR); @@ -1101,7 +1091,7 @@ namespace KviTheme return true; } - bool load(const QString &themeDir,KviThemeInfo &buffer) + bool load(const TQString &themeDir,KviThemeInfo &buffer) { if(!buffer.loadFromDirectory(themeDir)) return false; // makes sure that themedata exists too @@ -1110,12 +1100,12 @@ namespace KviTheme KVI_OPTION_STRING(KviOption_stringIconThemeSubdir) = ""; // reset the splash screen pointer - QString szPointerFile; + TQString szPointerFile; g_pApp->getLocalKvircDirectory(szPointerFile,KviApp::Themes,"current-splash"); KviFileUtils::removeFile(szPointerFile); - QString szD = themeDir; - KviQString::ensureLastCharIs(szD,KVI_PATH_SEPARATOR_CHAR); + TQString szD = themeDir; + KviTQString::ensureLastCharIs(szD,KVI_PATH_SEPARATOR_CHAR); szD.append(KVI_THEMEDATA_FILE_NAME); KviConfig cfg(szD,KviConfig::Read); @@ -1152,7 +1142,7 @@ namespace KviTheme READ_OPTIONS(KVI_NUM_RECT_OPTIONS,g_rectOptionsTable,readRectEntry) READ_OPTIONS(KVI_NUM_BOOL_OPTIONS,g_boolOptionsTable,readBoolEntry) - READ_OPTIONS(KVI_NUM_STRING_OPTIONS,g_stringOptionsTable,readQStringEntry) + READ_OPTIONS(KVI_NUM_STRING_OPTIONS,g_stringOptionsTable,readTQStringEntry) READ_OPTIONS(KVI_NUM_COLOR_OPTIONS,g_colorOptionsTable,readColorEntry) READ_OPTIONS(KVI_NUM_UINT_OPTIONS,g_uintOptionsTable,readUIntEntry) READ_OPTIONS(KVI_NUM_FONT_OPTIONS,g_fontOptionsTable,readFontEntry) @@ -1173,9 +1163,9 @@ namespace KviTheme { if(cfg.hasKey(g_pixmapOptionsTable[i].name)) { - QString szVal = cfg.readQStringEntry(g_pixmapOptionsTable[i].name,""); + TQString szVal = cfg.readTQStringEntry(g_pixmapOptionsTable[i].name,""); szVal.stripWhiteSpace(); - QString szBuffer; + TQString szBuffer; if(!szVal.isEmpty()) { g_pApp->findImage(szBuffer,szVal); @@ -1227,7 +1217,7 @@ void KviApp::listAvailableOptions(KviWindow *wnd) //using namespace KviStringConversion; -bool KviApp::getOptionString(const char * optName,QString &buffer) +bool KviApp::getOptionString(const char * optName,TQString &buffer) { #define GET_OPTION_STRING(__numOpt,__table,__prefix,__prefixLen) \ @@ -1317,7 +1307,7 @@ void KviApp::optionResetUpdate(int flags) } } -bool KviApp::setOptionValue(const char * optName,const QString &value) +bool KviApp::setOptionValue(const char * optName,const TQString &value) { #define SET_OPTION_VALUE(__numOpt,__table,__prefix,__prefixLen) \ @@ -1353,9 +1343,9 @@ bool KviApp::setOptionValue(const char * optName,const QString &value) if(kvi_strEqualCIN(optName,KVI_PIXMAP_OPTIONS_PREFIX,KVI_PIXMAP_OPTIONS_PREFIX_LEN)) { // We lookup the image path (so we allow also relative paths for this option type) - QString szVal = value; + TQString szVal = value; szVal.stripWhiteSpace(); - QString szBuffer; + TQString szBuffer; if(!szVal.isEmpty()) { findImage(szBuffer,szVal); diff --git a/src/kvirc/kernel/kvi_options.h b/src/kvirc/kernel/kvi_options.h index 1bd264e9..1395aba4 100644 --- a/src/kvirc/kernel/kvi_options.h +++ b/src/kvirc/kernel/kvi_options.h @@ -30,11 +30,11 @@ #include "kvi_pixmap.h" #include "kvi_msgtype.h" -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include // option structures @@ -53,15 +53,15 @@ }; DECLARE_OPTION_STRUCT(KviBoolOption,bool) -DECLARE_OPTION_STRUCT(KviRectOption,QRect) -DECLARE_OPTION_STRUCT(KviStringOption,QString) -DECLARE_OPTION_STRUCT(KviColorOption,QColor) -DECLARE_OPTION_STRUCT(KviFontOption,QFont) +DECLARE_OPTION_STRUCT(KviRectOption,TQRect) +DECLARE_OPTION_STRUCT(KviStringOption,TQString) +DECLARE_OPTION_STRUCT(KviColorOption,TQColor) +DECLARE_OPTION_STRUCT(KviFontOption,TQFont) DECLARE_OPTION_STRUCT(KviPixmapOption,KviPixmap) //DECLARE_OPTION_STRUCT(KviIntOption,int) DECLARE_OPTION_STRUCT(KviUIntOption,unsigned int) DECLARE_OPTION_STRUCT(KviMsgTypeOption,KviMsgType) -DECLARE_OPTION_STRUCT(KviStringListOption,QStringList) +DECLARE_OPTION_STRUCT(KviStringListOption,TQStringList) #define KVI_COLOR_EXT_USER_OP 50 #define KVI_COLOR_EXT_USER_HALFOP 51 @@ -641,14 +641,14 @@ extern KVIRC_API KviStringListOption g_stringlistOptionsTable[KVI_NUM_STRINGLIST // Verbosity constants #define KVI_VERBOSITY_LEVEL_MUTE 0 -#define KVI_VERBOSITY_LEVEL_QUIET 1 +#define KVI_VERBOSITY_LEVEL_TQUIET 1 #define KVI_VERBOSITY_LEVEL_NORMAL 2 #define KVI_VERBOSITY_LEVEL_VERBOSE 3 #define KVI_VERBOSITY_LEVEL_PARANOIC 4 #define _OUTPUT_PARANOIC (KVI_OPTION_UINT(KviOption_uintOutputVerbosityLevel) >= KVI_VERBOSITY_LEVEL_PARANOIC) #define _OUTPUT_VERBOSE (KVI_OPTION_UINT(KviOption_uintOutputVerbosityLevel) >= KVI_VERBOSITY_LEVEL_VERBOSE) -#define _OUTPUT_QUIET (KVI_OPTION_UINT(KviOption_uintOutputVerbosityLevel) <= KVI_VERBOSITY_LEVEL_QUIET) +#define _OUTPUT_TQUIET (KVI_OPTION_UINT(KviOption_uintOutputVerbosityLevel) <= KVI_VERBOSITY_LEVEL_TQUIET) #define _OUTPUT_MUTE (KVI_OPTION_UINT(KviOption_uintOutputVerbosityLevel) <= KVI_VERBOSITY_LEVEL_MUTE) #ifdef COMPILE_USE_QT4 @@ -658,8 +658,8 @@ extern KVIRC_API KviStringListOption g_stringlistOptionsTable[KVI_NUM_STRINGLIST #define START_TABLE_NORMAL_ROW "" #define SET_ANTI_ALIASING(p) \ - (p).setRenderHint(QPainter::Antialiasing, KVI_OPTION_BOOL(KviOption_boolUseAntiAliasing)); \ - (p).setRenderHint(QPainter::TextAntialiasing, KVI_OPTION_BOOL(KviOption_boolUseAntiAliasing)); + (p).setRenderHint(TQPainter::Antialiasing, KVI_OPTION_BOOL(KviOption_boolUseAntiAliasing)); \ + (p).setRenderHint(TQPainter::TextAntialiasing, KVI_OPTION_BOOL(KviOption_boolUseAntiAliasing)); #else #define START_TABLE_BOLD_ROW "" \ "" diff --git a/src/kvirc/kernel/kvi_out.h b/src/kvirc/kernel/kvi_out.h index f73a4f69..9a5bdc03 100644 --- a/src/kvirc/kernel/kvi_out.h +++ b/src/kvirc/kernel/kvi_out.h @@ -50,7 +50,7 @@ #define KVI_OUT_TOPIC 23 #define KVI_OUT_OWNPRIVMSG 24 #define KVI_OUT_CHANPRIVMSG 25 -#define KVI_OUT_QUERYPRIVMSG 26 +#define KVI_OUT_TQUERYPRIVMSG 26 #define KVI_OUT_CTCPREPLY 27 #define KVI_OUT_CTCPREQUESTREPLIED 28 #define KVI_OUT_CTCPREQUESTIGNORED 29 @@ -58,9 +58,9 @@ #define KVI_OUT_CTCPREQUESTUNKNOWN 31 #define KVI_OUT_ACTION 32 #define KVI_OUT_AVATAR 33 -#define KVI_OUT_QUIT 34 +#define KVI_OUT_TQUIT 34 #define KVI_OUT_SPLIT 35 -#define KVI_OUT_QUITSPLIT 36 +#define KVI_OUT_TQUITSPLIT 36 #define KVI_OUT_NICK 37 #define KVI_OUT_OP 38 #define KVI_OUT_DEOP 39 @@ -91,7 +91,7 @@ #define KVI_OUT_NOTIFYOFFLINE 64 #define KVI_OUT_OWNPRIVMSGCRYPTED 65 #define KVI_OUT_CHANPRIVMSGCRYPTED 66 -#define KVI_OUT_QUERYPRIVMSGCRYPTED 67 +#define KVI_OUT_TQUERYPRIVMSGCRYPTED 67 #define KVI_OUT_DCCCHATMSG 68 #define KVI_OUT_DCCCHATMSGCRYPTED 69 #define KVI_OUT_IRC 70 @@ -99,12 +99,12 @@ #define KVI_OUT_LINKS 72 #define KVI_OUT_SPAM 73 #define KVI_OUT_ICQ 74 -#define KVI_OUT_ICQMESSAGE 75 -#define KVI_OUT_ICQMESSAGESENT 76 +#define KVI_OUT_ICTQMESSAGE 75 +#define KVI_OUT_ICTQMESSAGESENT 76 #define KVI_OUT_CHANNELNOTICE 77 #define KVI_OUT_CHANNELNOTICECRYPTED 78 -#define KVI_OUT_QUERYNOTICE 79 -#define KVI_OUT_QUERYNOTICECRYPTED 80 +#define KVI_OUT_TQUERYNOTICE 79 +#define KVI_OUT_TQUERYNOTICECRYPTED 80 #define KVI_OUT_SERVERNOTICE 81 #define KVI_OUT_HALFOP 82 #define KVI_OUT_CTCPREPLYUNKNOWN 83 @@ -116,7 +116,7 @@ #define KVI_OUT_HALFDEOP 89 #define KVI_OUT_INVITE 90 #define KVI_OUT_MULTIMEDIA 91 -#define KVI_OUT_QUERYTRACE 92 +#define KVI_OUT_TQUERYTRACE 92 #define KVI_OUT_WALLOPS 93 #define KVI_OUT_JOINERROR 94 #define KVI_OUT_BROADCASTPRIVMSG 95 diff --git a/src/kvirc/kernel/kvi_sslmaster.cpp b/src/kvirc/kernel/kvi_sslmaster.cpp index 20630486..d4b22196 100644 --- a/src/kvirc/kernel/kvi_sslmaster.cpp +++ b/src/kvirc/kernel/kvi_sslmaster.cpp @@ -79,14 +79,14 @@ KVIRC_API void printSSLConnectionInfo(KviWindow * wnd,KviSSL * s) KviSSLCertificate * sc = s->getPeerCertificate(); if(sc) { - QString tmp(__tr2qs("Peer X509 certificate")); + TQString tmp(__tr2qs("Peer X509 certificate")); KviSSLMaster::printSSLCertificate(wnd,tmp,sc); delete sc; } else wnd->outputNoFmt(KVI_OUT_SSL,__tr2qs("[SSL]: The peer didn't provide a certificate")); KviSSLCipherInfo * ci = s->getCurrentCipherInfo(); if(ci) { - QString tmp(__tr2qs("Current transmission cipher")); + TQString tmp(__tr2qs("Current transmission cipher")); KviSSLMaster::printSSLCipherInfo(wnd,tmp,ci); delete ci; } else wnd->outputNoFmt(KVI_OUT_SSL,__tr2qs("[SSL]: Can't find out the current cipher info")); diff --git a/src/kvirc/kernel/kvi_texticonmanager.cpp b/src/kvirc/kernel/kvi_texticonmanager.cpp index e15496bc..32962220 100644 --- a/src/kvirc/kernel/kvi_texticonmanager.cpp +++ b/src/kvirc/kernel/kvi_texticonmanager.cpp @@ -35,8 +35,8 @@ #include "kvi_app.h" #include "kvi_confignames.h" -#include -#include +#include +#include KVIRC_API KviTextIconManager * g_pTextIconManager = 0; @@ -49,16 +49,16 @@ KviTextIcon::KviTextIcon(KviTextIcon* icon) void KviTextIcon::setId(int id) { m_iId=id; - m_szFilename=QString::null; + m_szFilename=TQString(); } -void KviTextIcon::setFilename(QString filename) +void KviTextIcon::setFilename(TQString filename) { m_iId=-1; m_szFilename=filename; } -QPixmap * KviTextIcon::pixmap() +TQPixmap * KviTextIcon::pixmap() { if(m_iId>=0) { @@ -73,9 +73,9 @@ QPixmap * KviTextIcon::pixmap() } KviTextIconManager::KviTextIconManager() -: QObject() +: TQObject() { - m_pTextIconDict = new KviPointerHashTable(47,false); + m_pTextIconDict = new KviPointerHashTable(47,false); m_pTextIconDict->setAutoDelete(true); } @@ -89,15 +89,15 @@ void KviTextIconManager::clear() m_pTextIconDict->clear(); } -void KviTextIconManager::insert(const QString &name,int id) +void KviTextIconManager::insert(const TQString &name,int id) { - m_pTextIconDict->replace(name,new KviTextIcon(id)); + m_pTextIconDict->tqreplace(name,new KviTextIcon(id)); emit changed(); } -void KviTextIconManager::insert(const QString &name,KviTextIcon& icon) +void KviTextIconManager::insert(const TQString &name,KviTextIcon& icon) { - m_pTextIconDict->replace(name,new KviTextIcon(&icon)); + m_pTextIconDict->tqreplace(name,new KviTextIcon(&icon)); emit changed(); } @@ -129,8 +129,8 @@ void KviTextIconManager::checkDefaultAssociations() { for(int i=0;default_associations[i].name;i++) { - if(!m_pTextIconDict->find(default_associations[i].name)) - insert(QString::fromUtf8(default_associations[i].name),default_associations[i].iVal); + if(!m_pTextIconDict->tqfind(default_associations[i].name)) + insert(TQString::fromUtf8(default_associations[i].name),default_associations[i].iVal); } emit changed(); } @@ -151,20 +151,20 @@ void KviTextIconManager::load() if(upd == TEXTICONMANAGER_CURRENT_CONFIG_UPDATE)return; // do a merge of the texticons if we have a new config version - QString tmp; + TQString tmp; g_pApp->getGlobalKvircDirectory(tmp,KviApp::Config,KVI_CONFIGFILE_TEXTICONS); - if(QFile::exists(tmp))load(tmp,true); + if(TQFile::exists(tmp))load(tmp,true); } void KviTextIconManager::save() { - QString tmp; + TQString tmp; g_pApp->getLocalKvircDirectory(tmp,KviApp::Config,KVI_CONFIGFILE_TEXTICONS); save(tmp); } // returns the config update -int KviTextIconManager::load(const QString &filename,bool bMerge) +int KviTextIconManager::load(const TQString &filename,bool bMerge) { if(!bMerge)m_pTextIconDict->clear(); KviConfig cfg(filename,KviConfig::Read); @@ -172,27 +172,27 @@ int KviTextIconManager::load(const QString &filename,bool bMerge) cfg.setGroup("Manager"); int upd = cfg.readIntEntry("ConfigUpdate",0); - KviConfigGroup * dict = cfg.dict()->find("TextIcons"); + KviConfigGroup * dict = cfg.dict()->tqfind("TextIcons"); if(dict) { KviConfigGroupIterator it(*dict); - KviPointerList names; + KviPointerList names; names.setAutoDelete(true); while(it.current()) { - names.append(new QString(it.currentKey())); + names.append(new TQString(it.currentKey())); ++it; } cfg.setGroup("TextIcons"); - for(QString * s = names.first();s;s = names.next()) + for(TQString * s = names.first();s;s = names.next()) { int id = cfg.readIntEntry(*s,-1); - QString szTmp; - QPixmap * pix=0; + TQString szTmp; + TQPixmap * pix=0; // debug("%s %s %i %i",__FILE__,__FUNCTION__,__LINE__,id); if(id!=-1) pix = g_pIconManager->getSmallIcon(id); @@ -209,16 +209,16 @@ int KviTextIconManager::load(const QString &filename,bool bMerge) { if(bMerge) { - if(!m_pTextIconDict->find(*s)) + if(!m_pTextIconDict->tqfind(*s)) if(id!=-1) - m_pTextIconDict->replace(*s,new KviTextIcon(id)); + m_pTextIconDict->tqreplace(*s,new KviTextIcon(id)); else - m_pTextIconDict->replace(*s,new KviTextIcon(szTmp)); + m_pTextIconDict->tqreplace(*s,new KviTextIcon(szTmp)); } else { if(id!=-1) - m_pTextIconDict->replace(*s,new KviTextIcon(id)); + m_pTextIconDict->tqreplace(*s,new KviTextIcon(id)); else - m_pTextIconDict->replace(*s,new KviTextIcon(szTmp)); + m_pTextIconDict->tqreplace(*s,new KviTextIcon(szTmp)); } } } @@ -230,7 +230,7 @@ int KviTextIconManager::load(const QString &filename,bool bMerge) return upd; } -void KviTextIconManager::save(const QString &filename) +void KviTextIconManager::save(const TQString &filename) { KviConfig cfg(filename,KviConfig::Write); @@ -240,7 +240,7 @@ void KviTextIconManager::save(const QString &filename) cfg.setGroup("TextIcons"); - KviPointerHashTableIterator it(*m_pTextIconDict); + KviPointerHashTableIterator it(*m_pTextIconDict); while(KviTextIcon * i = it.current()) { if(i->id()!=-1) diff --git a/src/kvirc/kernel/kvi_texticonmanager.h b/src/kvirc/kernel/kvi_texticonmanager.h index 5f76697c..83580146 100644 --- a/src/kvirc/kernel/kvi_texticonmanager.h +++ b/src/kvirc/kernel/kvi_texticonmanager.h @@ -27,7 +27,7 @@ #include "kvi_settings.h" -#include +#include #include "kvi_pointerhashtable.h" @@ -35,46 +35,47 @@ class KVIRC_API KviTextIcon { protected: int m_iId; - QString m_szFilename; + TQString m_szFilename; public: KviTextIcon(int id) : m_iId(id) {}; - KviTextIcon(QString szFile) + KviTextIcon(TQString szFile) : m_iId(-1),m_szFilename(szFile) {}; KviTextIcon(KviTextIcon* icon); ~KviTextIcon(){}; public: int id(){ return m_iId; }; void setId(int id); - void setFilename(QString filename); - QString filename(){ return m_szFilename; }; - QPixmap * pixmap(); + void setFilename(TQString filename); + TQString filename(){ return m_szFilename; }; + TQPixmap * pixmap(); }; -class KVIRC_API KviTextIconManager : public QObject +class KVIRC_API KviTextIconManager : public TQObject { friend class KviTextIconWindow; friend class KviTextIconsOptionsWidget; Q_OBJECT + TQ_OBJECT public: KviTextIconManager(); ~KviTextIconManager(); private: - KviPointerHashTable * m_pTextIconDict; + KviPointerHashTable * m_pTextIconDict; signals: void changed(); public: - KviPointerHashTable * textIconDict(){ return m_pTextIconDict; }; + KviPointerHashTable * textIconDict(){ return m_pTextIconDict; }; void checkDefaultAssociations(); void clear(); - void insert(const QString &name,int id); - void insert(const QString &name,KviTextIcon& icon); - KviTextIcon * lookupTextIcon(const QString &name){ return m_pTextIconDict->find(name); }; + void insert(const TQString &name,int id); + void insert(const TQString &name,KviTextIcon& icon); + KviTextIcon * lookupTextIcon(const TQString &name){ return m_pTextIconDict->tqfind(name); }; void load(); void save(); protected: - void save(const QString &filename); - int load(const QString &filename,bool bMerge = false); + void save(const TQString &filename); + int load(const TQString &filename,bool bMerge = false); }; #ifndef _KVI_TEXTICONMANAGER_CPP_ diff --git a/src/kvirc/kernel/kvi_theme.cpp b/src/kvirc/kernel/kvi_theme.cpp index e9ac22ec..4d1d06fb 100644 --- a/src/kvirc/kernel/kvi_theme.cpp +++ b/src/kvirc/kernel/kvi_theme.cpp @@ -30,16 +30,16 @@ #include "kvi_miscutils.h" #include "kvi_sourcesdate.h" -#include +#include #define KVI_THEME_SMALL_SCREENSHOT_NAME "screenshot_small.png" #define KVI_THEME_MEDIUM_SCREENSHOT_NAME "screenshot_medium.png" #define KVI_THEME_LARGE_SCREENSHOT_NAME "screenshot.png" #ifdef COMPILE_USE_QT4 - #define QIMAGE_SCALE_MIN Qt::KeepAspectRatio + #define TQIMAGE_SCALE_MIN TQt::KeepAspectRatio #else - #define QIMAGE_SCALE_MIN QImage::ScaleMin + #define TQIMAGE_SCALE_MIN TQ_ScaleMin #endif KviThemeInfo::KviThemeInfo() @@ -53,7 +53,7 @@ KviThemeInfo::~KviThemeInfo() -bool KviThemeInfo::load(const QString &szThemeFileName) +bool KviThemeInfo::load(const TQString &szThemeFileName) { if(!KviFileUtils::fileExists(szThemeFileName)) { @@ -65,15 +65,15 @@ bool KviThemeInfo::load(const QString &szThemeFileName) cfg.setGroup(KVI_THEMEINFO_CONFIG_GROUP); - m_szThemeEngineVersion = cfg.readQStringEntry("ThemeEngineVersion","1.0.0"); + m_szThemeEngineVersion = cfg.readTQStringEntry("ThemeEngineVersion","1.0.0"); if(KviMiscUtils::compareVersions(m_szThemeEngineVersion,KVI_CURRENT_THEME_ENGINE_VERSION) < 0) { - KviQString::sprintf(m_szLastError,__tr2qs("This KVIrc executable is too old for this theme (minimum theme engine version required is %Q while this theme engine has version %s)"),&m_szThemeEngineVersion,KVI_CURRENT_THEME_ENGINE_VERSION); + KviTQString::sprintf(m_szLastError,__tr2qs("This KVIrc executable is too old for this theme (minimum theme engine version required is %Q while this theme engine has version %s)"),&m_szThemeEngineVersion,KVI_CURRENT_THEME_ENGINE_VERSION); return false; // incompatible theme engine (will not work) } // mandatory fields - m_szName = cfg.readQStringEntry("Name",""); + m_szName = cfg.readTQStringEntry("Name",""); if(m_szName.isEmpty()) { @@ -82,25 +82,25 @@ bool KviThemeInfo::load(const QString &szThemeFileName) } // optional fields - m_szVersion = cfg.readQStringEntry("Version",""); + m_szVersion = cfg.readTQStringEntry("Version",""); if(m_szVersion.isEmpty()) m_szVersion = "?.?.?"; - m_szAuthor = cfg.readQStringEntry("Author",""); - QString szUnknown = __tr2qs("Unknown"); + m_szAuthor = cfg.readTQStringEntry("Author",""); + TQString szUnknown = __tr2qs("Unknown"); if(m_szAuthor.isEmpty()) m_szAuthor = szUnknown; - m_szDescription = cfg.readQStringEntry("Description",""); - m_szDate = cfg.readQStringEntry("Date",""); + m_szDescription = cfg.readTQStringEntry("Description",""); + m_szDate = cfg.readTQStringEntry("Date",""); if(m_szDate.isEmpty()) m_szDate = szUnknown; - m_szApplication = cfg.readQStringEntry("Application",""); + m_szApplication = cfg.readTQStringEntry("Application",""); if(m_szApplication.isEmpty()) m_szApplication = szUnknown; return true; } -bool KviThemeInfo::save(const QString &szThemeFileName) +bool KviThemeInfo::save(const TQString &szThemeFileName) { KviConfig inf(szThemeFileName,KviConfig::Write); @@ -119,9 +119,9 @@ bool KviThemeInfo::save(const QString &szThemeFileName) return true; } -bool KviThemeInfo::loadFromDirectory(const QString &szThemeDirectory,bool bIgnoreThemeData) +bool KviThemeInfo::loadFromDirectory(const TQString &szThemeDirectory,bool bIgnoreThemeData) { - QString szD = szThemeDirectory; + TQString szD = szThemeDirectory; szD.append(KVI_PATH_SEPARATOR_CHAR); szD.append(KVI_THEMEINFO_FILE_NAME); @@ -141,28 +141,28 @@ bool KviThemeInfo::loadFromDirectory(const QString &szThemeDirectory,bool bIgnor return KviFileUtils::fileExists(szD); } -QString KviThemeInfo::smallScreenshotPath() +TQString KviThemeInfo::smallScreenshotPath() { - QString ret; + TQString ret; if(!m_szAbsoluteDirectory.isEmpty()) { ret = m_szAbsoluteDirectory; - KviQString::ensureLastCharIs(ret,KVI_PATH_SEPARATOR_CHAR); + KviTQString::ensureLastCharIs(ret,KVI_PATH_SEPARATOR_CHAR); ret.append(KVI_THEME_SMALL_SCREENSHOT_NAME); } return ret; } -const QPixmap & KviThemeInfo::smallScreenshot() +const TQPixmap & KviThemeInfo::smallScreenshot() { if(!m_pixScreenshotSmall.isNull())return m_pixScreenshotSmall; if(!m_szAbsoluteDirectory.isEmpty()) { - QString szFileName = m_szAbsoluteDirectory; - KviQString::ensureLastCharIs(szFileName,KVI_PATH_SEPARATOR_CHAR); + TQString szFileName = m_szAbsoluteDirectory; + KviTQString::ensureLastCharIs(szFileName,KVI_PATH_SEPARATOR_CHAR); szFileName.append(KVI_THEME_SMALL_SCREENSHOT_NAME); - QPixmap pix(szFileName); + TQPixmap pix(szFileName); if(!pix.isNull()) { m_pixScreenshotSmall = pix; @@ -174,8 +174,8 @@ const QPixmap & KviThemeInfo::smallScreenshot() if(pix.width() > 300 || pix.height() > 225) { - QImage sbri = pix.convertToImage(); - pix.convertFromImage(sbri.smoothScale(300,225,QIMAGE_SCALE_MIN)); + TQImage sbri = pix.convertToImage(); + pix.convertFromImage(sbri.smoothScale(300,225,TQIMAGE_SCALE_MIN)); } pix.save(szFileName,"PNG"); @@ -187,16 +187,16 @@ const QPixmap & KviThemeInfo::smallScreenshot() return m_pixScreenshotSmall; } -const QPixmap & KviThemeInfo::mediumScreenshot() +const TQPixmap & KviThemeInfo::mediumScreenshot() { if(!m_pixScreenshotMedium.isNull())return m_pixScreenshotMedium; if(!m_szAbsoluteDirectory.isEmpty()) { - QString szFileName = m_szAbsoluteDirectory; - KviQString::ensureLastCharIs(szFileName,KVI_PATH_SEPARATOR_CHAR); + TQString szFileName = m_szAbsoluteDirectory; + KviTQString::ensureLastCharIs(szFileName,KVI_PATH_SEPARATOR_CHAR); szFileName.append(KVI_THEME_MEDIUM_SCREENSHOT_NAME); - QPixmap pix(szFileName); + TQPixmap pix(szFileName); if(!pix.isNull()) { m_pixScreenshotMedium = pix; @@ -208,8 +208,8 @@ const QPixmap & KviThemeInfo::mediumScreenshot() if(pix.width() > 600 || pix.height() > 450) { - QImage sbri = pix.convertToImage(); - pix.convertFromImage(sbri.smoothScale(600,450,QIMAGE_SCALE_MIN)); + TQImage sbri = pix.convertToImage(); + pix.convertFromImage(sbri.smoothScale(600,450,TQIMAGE_SCALE_MIN)); } pix.save(szFileName,"PNG"); @@ -221,16 +221,16 @@ const QPixmap & KviThemeInfo::mediumScreenshot() return m_pixScreenshotMedium; } -const QPixmap & KviThemeInfo::largeScreenshot() +const TQPixmap & KviThemeInfo::largeScreenshot() { if(!m_pixScreenshotLarge.isNull())return m_pixScreenshotLarge; if(!m_szAbsoluteDirectory.isEmpty()) { - QString szFileName = m_szAbsoluteDirectory; - KviQString::ensureLastCharIs(szFileName,KVI_PATH_SEPARATOR_CHAR); + TQString szFileName = m_szAbsoluteDirectory; + KviTQString::ensureLastCharIs(szFileName,KVI_PATH_SEPARATOR_CHAR); szFileName.append(KVI_THEME_LARGE_SCREENSHOT_NAME); - QPixmap pix(szFileName); + TQPixmap pix(szFileName); if(pix.isNull())return m_pixScreenshotLarge; m_pixScreenshotLarge = pix; } @@ -240,25 +240,25 @@ const QPixmap & KviThemeInfo::largeScreenshot() namespace KviTheme { - bool saveScreenshots(KviThemeInfo &options,const QString &szOriginalScreenshotPath) + bool saveScreenshots(KviThemeInfo &options,const TQString &szOriginalScreenshotPath) { - QImage pix(szOriginalScreenshotPath); + TQImage pix(szOriginalScreenshotPath); if(pix.isNull()) { options.setLastError(__tr2qs("Failed to load the specified screenshot image")); return false; } - QPixmap out; + TQPixmap out; - QString szScreenshotFileName = options.absoluteDirectory(); + TQString szScreenshotFileName = options.absoluteDirectory(); if(szScreenshotFileName.isEmpty()) { options.setLastError(__tr2qs("Invalid option")); return false; } - KviQString::ensureLastCharIs(szScreenshotFileName,KVI_PATH_SEPARATOR_CHAR); + KviTQString::ensureLastCharIs(szScreenshotFileName,KVI_PATH_SEPARATOR_CHAR); szScreenshotFileName.append(KVI_THEME_LARGE_SCREENSHOT_NAME); if(!pix.save(szScreenshotFileName,"PNG")) { @@ -267,12 +267,12 @@ namespace KviTheme } if(pix.width() > 600 || pix.height() > 450) - out.convertFromImage(pix.smoothScale(600,450,QIMAGE_SCALE_MIN)); + out.convertFromImage(pix.smoothScale(600,450,TQIMAGE_SCALE_MIN)); else out.convertFromImage(pix); szScreenshotFileName = options.absoluteDirectory(); - KviQString::ensureLastCharIs(szScreenshotFileName,KVI_PATH_SEPARATOR_CHAR); + KviTQString::ensureLastCharIs(szScreenshotFileName,KVI_PATH_SEPARATOR_CHAR); szScreenshotFileName.append(KVI_THEME_MEDIUM_SCREENSHOT_NAME); if(!out.save(szScreenshotFileName,"PNG")) { @@ -281,12 +281,12 @@ namespace KviTheme } if(pix.width() > 300 || pix.height() > 225) - out.convertFromImage(pix.smoothScale(300,225,QIMAGE_SCALE_MIN)); + out.convertFromImage(pix.smoothScale(300,225,TQIMAGE_SCALE_MIN)); else out.convertFromImage(pix); szScreenshotFileName = options.absoluteDirectory(); - KviQString::ensureLastCharIs(szScreenshotFileName,KVI_PATH_SEPARATOR_CHAR); + KviTQString::ensureLastCharIs(szScreenshotFileName,KVI_PATH_SEPARATOR_CHAR); szScreenshotFileName.append(KVI_THEME_SMALL_SCREENSHOT_NAME); if(!out.save(szScreenshotFileName,"PNG")) { diff --git a/src/kvirc/kernel/kvi_theme.h b/src/kvirc/kernel/kvi_theme.h index 2545e51e..38c8bf2a 100644 --- a/src/kvirc/kernel/kvi_theme.h +++ b/src/kvirc/kernel/kvi_theme.h @@ -31,7 +31,7 @@ #include "kvi_fileextensions.h" -#include +#include #define KVI_THEMEINFO_FILE_NAME "themeinfo." KVI_FILEEXTENSION_CONFIG #define KVI_THEMEDATA_FILE_NAME "themedata." KVI_FILEEXTENSION_CONFIG @@ -60,83 +60,83 @@ public: KviThemeInfo(); ~KviThemeInfo(); protected: - QString m_szName; //< name of the theme - QString m_szVersion; //< version of the theme - QString m_szSubdirectory; //< subdirectory of $LOCALKVIRCDIR/themes where the theme is saved to (not always used) - QString m_szAbsoluteDirectory; //< absolute directory where the theme should be saved to (or is loaded from) - QString m_szAuthor; //< author of the theme - QString m_szDescription; //< description of the theme - QString m_szDate; //< theme creation date - QString m_szApplication; //< theme creation (KVIrc) version - QString m_szThemeEngineVersion; //< the theme engine version that saved this theme + TQString m_szName; //< name of the theme + TQString m_szVersion; //< version of the theme + TQString m_szSubdirectory; //< subdirectory of $LOCALKVIRCDIR/themes where the theme is saved to (not always used) + TQString m_szAbsoluteDirectory; //< absolute directory where the theme should be saved to (or is loaded from) + TQString m_szAuthor; //< author of the theme + TQString m_szDescription; //< description of the theme + TQString m_szDate; //< theme creation date + TQString m_szApplication; //< theme creation (KVIrc) version + TQString m_szThemeEngineVersion; //< the theme engine version that saved this theme - QString m_szLastError; //< reported when some function fails + TQString m_szLastError; //< reported when some function fails - QPixmap m_pixScreenshotLarge; //< the large screenshot pixmap - QPixmap m_pixScreenshotMedium; //< the medium screenshot pixmap - QPixmap m_pixScreenshotSmall; //< the small screenshot pixmap + TQPixmap m_pixScreenshotLarge; //< the large screenshot pixmap + TQPixmap m_pixScreenshotMedium; //< the medium screenshot pixmap + TQPixmap m_pixScreenshotSmall; //< the small screenshot pixmap public: /// /// load data from a specified theme config file /// - bool load(const QString &szThemeFileName); + bool load(const TQString &szThemeFileName); /// /// save the currently defined theme configuration in the specified file /// - bool save(const QString &szThemeFileName); + bool save(const TQString &szThemeFileName); - const QString & lastError(){ return m_szLastError; }; - void setLastError(const QString &szLastError){ m_szLastError = szLastError; }; - const QString & name(){ return m_szName; }; - void setName(const QString &szName){ m_szName = szName; }; - const QString & version(){ return m_szVersion; }; - void setVersion(const QString &szVersion){ m_szVersion = szVersion; }; - const QString & subdirectory(){ return m_szSubdirectory; }; - void setSubdirectory(const QString &szSubdirectory){ m_szSubdirectory = szSubdirectory; }; - const QString & absoluteDirectory(){ return m_szAbsoluteDirectory; }; - void setAbsoluteDirectory(const QString &szAbsoluteDirectory){ m_szAbsoluteDirectory = szAbsoluteDirectory; } - const QString & author(){ return m_szAuthor; }; - void setAuthor(const QString &szAuthor){ m_szAuthor = szAuthor; }; - const QString & description(){ return m_szDescription; }; - void setDescription(const QString &szDescription){ m_szDescription = szDescription; }; - const QString & date(){ return m_szDate; }; - void setDate(const QString &szDate){ m_szDate = szDate; }; - const QString & application(){ return m_szApplication; }; - void setApplication(const QString &szApplication){ m_szApplication = szApplication; }; - const QString & themeEngineVersion(){ return m_szThemeEngineVersion; }; - void setThemeEngineVersion(const QString &szThemeEngineVersion){ m_szThemeEngineVersion = szThemeEngineVersion; }; + const TQString & lastError(){ return m_szLastError; }; + void setLastError(const TQString &szLastError){ m_szLastError = szLastError; }; + const TQString & name(){ return m_szName; }; + void setName(const TQString &szName){ m_szName = szName; }; + const TQString & version(){ return m_szVersion; }; + void setVersion(const TQString &szVersion){ m_szVersion = szVersion; }; + const TQString & subdirectory(){ return m_szSubdirectory; }; + void setSubdirectory(const TQString &szSubdirectory){ m_szSubdirectory = szSubdirectory; }; + const TQString & absoluteDirectory(){ return m_szAbsoluteDirectory; }; + void setAbsoluteDirectory(const TQString &szAbsoluteDirectory){ m_szAbsoluteDirectory = szAbsoluteDirectory; } + const TQString & author(){ return m_szAuthor; }; + void setAuthor(const TQString &szAuthor){ m_szAuthor = szAuthor; }; + const TQString & description(){ return m_szDescription; }; + void setDescription(const TQString &szDescription){ m_szDescription = szDescription; }; + const TQString & date(){ return m_szDate; }; + void setDate(const TQString &szDate){ m_szDate = szDate; }; + const TQString & application(){ return m_szApplication; }; + void setApplication(const TQString &szApplication){ m_szApplication = szApplication; }; + const TQString & themeEngineVersion(){ return m_szThemeEngineVersion; }; + void setThemeEngineVersion(const TQString &szThemeEngineVersion){ m_szThemeEngineVersion = szThemeEngineVersion; }; /// /// Attempt to load a themeinfo.kvc file present in the specified directory. /// This function will fail if the directory contains a valid themeinfo.kvc /// file but no themedata.kvc file unless bIgnoreThemeData is set to true /// - bool loadFromDirectory(const QString &szThemeDirectory,bool bIgnoreThemeData = false); + bool loadFromDirectory(const TQString &szThemeDirectory,bool bIgnoreThemeData = false); /// /// Attempt to load the theme screenshot from THEMEDIR/screenshot_*.png /// This function will work only if the absoluteDirectory() of the theme /// has been set, otherwise the returned pixmap will be null. /// - const QPixmap & smallScreenshot(); + const TQPixmap & smallScreenshot(); /// /// Attempt to load the theme screenshot from THEMEDIR/screenshot_*.png /// This function will work only if the absoluteDirectory() of the theme /// has been set, otherwise the returned pixmap will be null. /// - const QPixmap & mediumScreenshot(); + const TQPixmap & mediumScreenshot(); /// /// Attempt to load the theme screenshot from THEMEDIR/screenshot_*.png /// This function will work only if the absoluteDirectory() of the theme /// has been set, otherwise the returned pixmap will be null. /// - const QPixmap & largeScreenshot(); + const TQPixmap & largeScreenshot(); /// /// Attempt to load the theme screenshot from THEMEDIR/screenshot_*.png /// This function will work only if the absoluteDirectory() of the theme /// has been set, otherwise the returned pixmap will be null. /// - QString smallScreenshotPath(); + TQString smallScreenshotPath(); }; namespace KviTheme @@ -148,7 +148,7 @@ namespace KviTheme /// On failure this function will also set buffer.lastError() to a meaningful value /// Note that for convenience this function is implemented in kvi_options.cpp /// - bool KVIRC_API load(const QString &szThemeDir,KviThemeInfo &buffer); + bool KVIRC_API load(const TQString &szThemeDir,KviThemeInfo &buffer); /// /// Save a theme given the specified options. /// Will return true on success and false on failure. @@ -164,7 +164,7 @@ namespace KviTheme /// Save the theme screenshots in the given EXISTING directory and given /// an existing screenshot on disk (usually in the tmp directory). /// - bool KVIRC_API saveScreenshots(KviThemeInfo &options,const QString &szOriginalScreenshotPath); + bool KVIRC_API saveScreenshots(KviThemeInfo &options,const TQString &szOriginalScreenshotPath); }; diff --git a/src/kvirc/kernel/kvi_userinput.cpp b/src/kvirc/kernel/kvi_userinput.cpp index 134d4256..07849cf1 100644 --- a/src/kvirc/kernel/kvi_userinput.cpp +++ b/src/kvirc/kernel/kvi_userinput.cpp @@ -37,24 +37,24 @@ namespace KviUserInput { - bool parse(QString &szData,KviWindow * pWindow,const QString &szContext,bool bUserFriendlyCommandline) + bool parse(TQString &szData,KviWindow * pWindow,const TQString &szContext,bool bUserFriendlyCommandline) { - const QChar * b = KviQString::nullTerminatedArray(szData); - const QChar * c = b; + const TQChar * b = KviTQString::nullTerminatedArray(szData); + const TQChar * c = b; if(!c)return true; // empty while(c->isSpace())c++; - if(!c->unicode())return true; // empty + if(!c->tqunicode())return true; // empty - if(c->unicode() == '\\') + if(c->tqunicode() == '\\') { c++; - if(c->unicode() != '/')c--; + if(c->tqunicode() != '/')c--; } else { - if(c->unicode() == '/') + if(c->tqunicode() == '/') { c++; - if(c->unicode() != '/') + if(c->tqunicode() != '/') { szData.remove(0,c-b); return parseCommand(szData,pWindow,szContext,bUserFriendlyCommandline); @@ -73,41 +73,41 @@ namespace KviUserInput return true; } - bool parseCommand(const QString &szData,KviWindow * pWindow,const QString &szContext,bool bUserFriendlyCommandline) + bool parseCommand(const TQString &szData,KviWindow * pWindow,const TQString &szContext,bool bUserFriendlyCommandline) { if(bUserFriendlyCommandline) { - static QString szUserFriendlyCommandlineContext(__tr2qs("commandline::userfriendly")); - QString szCmd=szData; + static TQString szUserFriendlyCommandlineContext(__tr2qs("commandline::userfriendly")); + TQString szCmd=szData; // escape any -$;\%( - szCmd.replace("\\","\\\\"); - szCmd.replace("\"","\\\""); - szCmd.replace("$","\\$"); - szCmd.replace("%","\\%"); - szCmd.replace("(","\\("); - szCmd.replace(";","\\;"); - szCmd.replace("-","\\-"); - szCmd.replace("+","\\+"); + szCmd.tqreplace("\\","\\\\"); + szCmd.tqreplace("\"","\\\""); + szCmd.tqreplace("$","\\$"); + szCmd.tqreplace("%","\\%"); + szCmd.tqreplace("(","\\("); + szCmd.tqreplace(";","\\;"); + szCmd.tqreplace("-","\\-"); + szCmd.tqreplace("+","\\+"); KviKvsScript kvs(szContext.isEmpty() ? szUserFriendlyCommandlineContext : szContext,szCmd); return (kvs.run(pWindow,0,0) != KviKvsScript::Error); } else { - static QString szCommandlineContext(__tr2qs("commandline::kvs")); + static TQString szCommandlineContext(__tr2qs("commandline::kvs")); KviKvsScript kvs(szContext.isEmpty() ? szCommandlineContext : szContext,szData); return (kvs.run(pWindow,0,0/*,KviKvsScript::AssumeLocals*/) != KviKvsScript::Error); } } - void parseNonCommand(QString &szData,KviWindow * pWindow) + void parseNonCommand(TQString &szData,KviWindow * pWindow) { - const QChar * aux = KviQString::nullTerminatedArray(szData); - const QChar * beg = aux; + const TQChar * aux = KviTQString::nullTerminatedArray(szData); + const TQChar * beg = aux; if(!beg)return; // empty - while(aux->unicode()) + while(aux->tqunicode()) { - while(aux->unicode() && (aux->unicode() != '\n'))aux++; - QString buf(beg,aux-beg); - if(aux->unicode() == '\n')aux++; + while(aux->tqunicode() && (aux->tqunicode() != '\n'))aux++; + TQString buf(beg,aux-beg); + if(aux->tqunicode() == '\n')aux++; beg = aux; if(buf.isEmpty())buf = " "; // avoid "No text to send" (d3vah) @@ -117,7 +117,7 @@ namespace KviUserInput case KVI_WINDOW_TYPE_CONSOLE: if(pWindow->connection()) { - KviQCString data = pWindow->connection()->encodeText(buf); + KviTQCString data = pWindow->connection()->encodeText(buf); if(((KviConsole *)pWindow)->connection()->sendData(data.data())) { pWindow->output(KVI_OUT_RAW,"[RAW]: %Q",&buf); @@ -127,7 +127,7 @@ namespace KviUserInput pWindow->output(KVI_OUT_PARSERERROR,__tr2qs("You are not connected to a server")); break; case KVI_WINDOW_TYPE_CHANNEL: - case KVI_WINDOW_TYPE_QUERY: + case KVI_WINDOW_TYPE_TQUERY: if(pWindow->connection()) { if(KVI_OPTION_BOOL(KviOption_boolExitAwayOnInput)) diff --git a/src/kvirc/kernel/kvi_userinput.h b/src/kvirc/kernel/kvi_userinput.h index 08dac61e..91a947f8 100644 --- a/src/kvirc/kernel/kvi_userinput.h +++ b/src/kvirc/kernel/kvi_userinput.h @@ -32,11 +32,11 @@ namespace KviUserInput { // WARNING: May destroy szData // returns false if szData is a command and it fails to run - KVIRC_API bool parse(QString &szData,KviWindow * pWindow,const QString &szContext = KviQString::empty,bool bUserFriendlyCommandline = false); + KVIRC_API bool parse(TQString &szData,KviWindow * pWindow,const TQString &szContext = KviTQString::empty,bool bUserFriendlyCommandline = false); - KVIRC_API bool parseCommand(const QString &szData,KviWindow * pWindow,const QString &szContext = KviQString::empty,bool bUserFriendlyCommandline = false); - //bool parseCommandWithSingleArgument(const QString &szData,KviWindow * pWindow,const QString &szContext = KviQString::empty); - KVIRC_API void parseNonCommand(QString &szData,KviWindow * pWindow); + KVIRC_API bool parseCommand(const TQString &szData,KviWindow * pWindow,const TQString &szContext = KviTQString::empty,bool bUserFriendlyCommandline = false); + //bool parseCommandWithSingleArgument(const TQString &szData,KviWindow * pWindow,const TQString &szContext = KviTQString::empty); + KVIRC_API void parseNonCommand(TQString &szData,KviWindow * pWindow); }; diff --git a/src/kvirc/kernel/moc_kvi_action.cpp b/src/kvirc/kernel/moc_kvi_action.cpp index 673a52d5..4719f8de 100644 --- a/src/kvirc/kernel/moc_kvi_action.cpp +++ b/src/kvirc/kernel/moc_kvi_action.cpp @@ -2,21 +2,21 @@ ** KviAction meta object code from reading C++ file 'kvi_action.h' ** ** Created: Mon Feb 25 00:11:38 2008 -** by: The Qt MOC ($Id: qt/moc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) +** by: The TQt TQMOC ($Id: qt/tqmoc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ -#undef QT_NO_COMPAT +#undef TQT_NO_COMPAT #include "kvi_action.h" -#include -#include +#include +#include -#include -#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26) -#error "This file was generated using the moc from 3.3.8. It" -#error "cannot be used with the include files from this version of Qt." -#error "(The moc has changed too much.)" +#include +#if !defined(TQ_TQMOC_OUTPUT_REVISION) || (TQ_TQMOC_OUTPUT_REVISION != 26) +#error "This file was generated using the tqmoc from 3.3.8. It" +#error "cannot be used with the include files from this version of TQt." +#error "(The tqmoc has changed too much.)" #endif const char *KviAction::className() const @@ -24,84 +24,84 @@ const char *KviAction::className() const return "KviAction"; } -QMetaObject *KviAction::metaObj = 0; -static QMetaObjectCleanUp cleanUp_KviAction( "KviAction", &KviAction::staticMetaObject ); +TQMetaObject *KviAction::metaObj = 0; +static TQMetaObjectCleanUp cleanUp_KviAction( "KviAction", &KviAction::staticMetaObject ); -#ifndef QT_NO_TRANSLATION -QString KviAction::tr( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION +TQString KviAction::tr( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviAction", s, c, QApplication::DefaultCodec ); + if ( tqApp ) + return tqApp->translate( "KviAction", s, c, TQApplication::DefaultCodec ); else - return QString::fromLatin1( s ); + return TQString::tqfromLatin1( s ); } -#ifndef QT_NO_TRANSLATION_UTF8 -QString KviAction::trUtf8( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION_UTF8 +TQString KviAction::trUtf8( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviAction", s, c, QApplication::UnicodeUTF8 ); + if ( tqApp ) + return tqApp->translate( "KviAction", s, c, TQApplication::UnicodeUTF8 ); else - return QString::fromUtf8( s ); + return TQString::fromUtf8( s ); } -#endif // QT_NO_TRANSLATION_UTF8 +#endif // TQT_NO_TRANSLATION_UTF8 -#endif // QT_NO_TRANSLATION +#endif // TQT_NO_TRANSLATION -QMetaObject* KviAction::staticMetaObject() +TQMetaObject* KviAction::staticMetaObject() { if ( metaObj ) return metaObj; - QMetaObject* parentObject = QObject::staticMetaObject(); - static const QUMethod slot_0 = {"widgetDestroyed", 0, 0 }; - static const QUMethod slot_1 = {"reloadImages", 0, 0 }; - static const QUMethod slot_2 = {"activeContextChanged", 0, 0 }; - static const QUMethod slot_3 = {"activeContextStateChanged", 0, 0 }; - static const QUMethod slot_4 = {"activeWindowChanged", 0, 0 }; - static const QUParameter param_slot_5[] = { - { "bSelectedNow", &static_QUType_bool, 0, QUParameter::In } + TQMetaObject* tqparentObject = TQObject::staticMetaObject(); + static const TQUMethod slot_0 = {"widgetDestroyed", 0, 0 }; + static const TQUMethod slot_1 = {"reloadImages", 0, 0 }; + static const TQUMethod slot_2 = {"activeContextChanged", 0, 0 }; + static const TQUMethod slot_3 = {"activeContextStateChanged", 0, 0 }; + static const TQUMethod slot_4 = {"activeWindowChanged", 0, 0 }; + static const TQUParameter param_slot_5[] = { + { "bSelectedNow", &static_TQUType_bool, 0, TQUParameter::In } }; - static const QUMethod slot_5 = {"activeWindowSelectionStateChanged", 1, param_slot_5 }; - static const QUMethod slot_6 = {"activate", 0, 0 }; - static const QMetaData slot_tbl[] = { - { "widgetDestroyed()", &slot_0, QMetaData::Protected }, - { "reloadImages()", &slot_1, QMetaData::Protected }, - { "activeContextChanged()", &slot_2, QMetaData::Protected }, - { "activeContextStateChanged()", &slot_3, QMetaData::Protected }, - { "activeWindowChanged()", &slot_4, QMetaData::Protected }, - { "activeWindowSelectionStateChanged(bool)", &slot_5, QMetaData::Protected }, - { "activate()", &slot_6, QMetaData::Public } + static const TQUMethod slot_5 = {"activeWindowSelectionStateChanged", 1, param_slot_5 }; + static const TQUMethod slot_6 = {"activate", 0, 0 }; + static const TQMetaData slot_tbl[] = { + { "widgetDestroyed()", &slot_0, TQMetaData::Protected }, + { "reloadImages()", &slot_1, TQMetaData::Protected }, + { "activeContextChanged()", &slot_2, TQMetaData::Protected }, + { "activeContextStateChanged()", &slot_3, TQMetaData::Protected }, + { "activeWindowChanged()", &slot_4, TQMetaData::Protected }, + { "activeWindowSelectionStateChanged(bool)", &slot_5, TQMetaData::Protected }, + { "activate()", &slot_6, TQMetaData::Public } }; - static const QUMethod signal_0 = {"activated", 0, 0 }; - static const QMetaData signal_tbl[] = { - { "activated()", &signal_0, QMetaData::Public } + static const TQUMethod signal_0 = {"activated", 0, 0 }; + static const TQMetaData signal_tbl[] = { + { "activated()", &signal_0, TQMetaData::Public } }; - metaObj = QMetaObject::new_metaobject( - "KviAction", parentObject, + metaObj = TQMetaObject::new_metaobject( + "KviAction", tqparentObject, slot_tbl, 7, signal_tbl, 1, -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES 0, 0, 0, 0, -#endif // QT_NO_PROPERTIES +#endif // TQT_NO_PROPERTIES 0, 0 ); cleanUp_KviAction.setMetaObject( metaObj ); return metaObj; } -void* KviAction::qt_cast( const char* clname ) +void* KviAction::tqqt_cast( const char* clname ) { if ( !qstrcmp( clname, "KviAction" ) ) return this; - return QObject::qt_cast( clname ); + return TQObject::tqqt_cast( clname ); } -// SIGNAL activated +// TQT_SIGNAL activated void KviAction::activated() { activate_signal( staticMetaObject()->signalOffset() + 0 ); } -bool KviAction::qt_invoke( int _id, QUObject* _o ) +bool KviAction::qt_invoke( int _id, TQUObject* _o ) { switch ( _id - staticMetaObject()->slotOffset() ) { case 0: widgetDestroyed(); break; @@ -109,29 +109,29 @@ bool KviAction::qt_invoke( int _id, QUObject* _o ) case 2: activeContextChanged(); break; case 3: activeContextStateChanged(); break; case 4: activeWindowChanged(); break; - case 5: activeWindowSelectionStateChanged((bool)static_QUType_bool.get(_o+1)); break; + case 5: activeWindowSelectionStateChanged((bool)static_TQUType_bool.get(_o+1)); break; case 6: activate(); break; default: - return QObject::qt_invoke( _id, _o ); + return TQObject::qt_invoke( _id, _o ); } return TRUE; } -bool KviAction::qt_emit( int _id, QUObject* _o ) +bool KviAction::qt_emit( int _id, TQUObject* _o ) { switch ( _id - staticMetaObject()->signalOffset() ) { case 0: activated(); break; default: - return QObject::qt_emit(_id,_o); + return TQObject::qt_emit(_id,_o); } return TRUE; } -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES -bool KviAction::qt_property( int id, int f, QVariant* v) +bool KviAction::qt_property( int id, int f, TQVariant* v) { - return QObject::qt_property( id, f, v); + return TQObject::qt_property( id, f, v); } -bool KviAction::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; } -#endif // QT_NO_PROPERTIES +bool KviAction::qt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; } +#endif // TQT_NO_PROPERTIES diff --git a/src/kvirc/kernel/moc_kvi_actionmanager.cpp b/src/kvirc/kernel/moc_kvi_actionmanager.cpp index 9a8f581a..575696ff 100644 --- a/src/kvirc/kernel/moc_kvi_actionmanager.cpp +++ b/src/kvirc/kernel/moc_kvi_actionmanager.cpp @@ -2,21 +2,21 @@ ** KviActionManager meta object code from reading C++ file 'kvi_actionmanager.h' ** ** Created: Mon Feb 25 00:11:40 2008 -** by: The Qt MOC ($Id: qt/moc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) +** by: The TQt TQMOC ($Id: qt/tqmoc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ -#undef QT_NO_COMPAT +#undef TQT_NO_COMPAT #include "kvi_actionmanager.h" -#include -#include - -#include -#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26) -#error "This file was generated using the moc from 3.3.8. It" -#error "cannot be used with the include files from this version of Qt." -#error "(The moc has changed too much.)" +#include +#include + +#include +#if !defined(TQ_TQMOC_OUTPUT_REVISION) || (TQ_TQMOC_OUTPUT_REVISION != 26) +#error "This file was generated using the tqmoc from 3.3.8. It" +#error "cannot be used with the include files from this version of TQt." +#error "(The tqmoc has changed too much.)" #endif const char *KviActionManager::className() const @@ -24,103 +24,103 @@ const char *KviActionManager::className() const return "KviActionManager"; } -QMetaObject *KviActionManager::metaObj = 0; -static QMetaObjectCleanUp cleanUp_KviActionManager( "KviActionManager", &KviActionManager::staticMetaObject ); +TQMetaObject *KviActionManager::metaObj = 0; +static TQMetaObjectCleanUp cleanUp_KviActionManager( "KviActionManager", &KviActionManager::staticMetaObject ); -#ifndef QT_NO_TRANSLATION -QString KviActionManager::tr( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION +TQString KviActionManager::tr( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviActionManager", s, c, QApplication::DefaultCodec ); + if ( tqApp ) + return tqApp->translate( "KviActionManager", s, c, TQApplication::DefaultCodec ); else - return QString::fromLatin1( s ); + return TQString::tqfromLatin1( s ); } -#ifndef QT_NO_TRANSLATION_UTF8 -QString KviActionManager::trUtf8( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION_UTF8 +TQString KviActionManager::trUtf8( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviActionManager", s, c, QApplication::UnicodeUTF8 ); + if ( tqApp ) + return tqApp->translate( "KviActionManager", s, c, TQApplication::UnicodeUTF8 ); else - return QString::fromUtf8( s ); + return TQString::fromUtf8( s ); } -#endif // QT_NO_TRANSLATION_UTF8 +#endif // TQT_NO_TRANSLATION_UTF8 -#endif // QT_NO_TRANSLATION +#endif // TQT_NO_TRANSLATION -QMetaObject* KviActionManager::staticMetaObject() +TQMetaObject* KviActionManager::staticMetaObject() { if ( metaObj ) return metaObj; - QMetaObject* parentObject = QObject::staticMetaObject(); - static const QUMethod slot_0 = {"actionDestroyed", 0, 0 }; - static const QMetaData slot_tbl[] = { - { "actionDestroyed()", &slot_0, QMetaData::Protected } + TQMetaObject* tqparentObject = TQObject::staticMetaObject(); + static const TQUMethod slot_0 = {"actionDestroyed", 0, 0 }; + static const TQMetaData slot_tbl[] = { + { "actionDestroyed()", &slot_0, TQMetaData::Protected } }; - static const QUMethod signal_0 = {"beginCustomizeToolBars", 0, 0 }; - static const QUMethod signal_1 = {"endCustomizeToolBars", 0, 0 }; - static const QUMethod signal_2 = {"currentToolBarChanged", 0, 0 }; - static const QUMethod signal_3 = {"removeActionsHintRequest", 0, 0 }; - static const QMetaData signal_tbl[] = { - { "beginCustomizeToolBars()", &signal_0, QMetaData::Protected }, - { "endCustomizeToolBars()", &signal_1, QMetaData::Protected }, - { "currentToolBarChanged()", &signal_2, QMetaData::Protected }, - { "removeActionsHintRequest()", &signal_3, QMetaData::Protected } + static const TQUMethod signal_0 = {"beginCustomizeToolBars", 0, 0 }; + static const TQUMethod signal_1 = {"endCustomizeToolBars", 0, 0 }; + static const TQUMethod signal_2 = {"currentToolBarChanged", 0, 0 }; + static const TQUMethod signal_3 = {"removeActionsHintRequest", 0, 0 }; + static const TQMetaData signal_tbl[] = { + { "beginCustomizeToolBars()", &signal_0, TQMetaData::Protected }, + { "endCustomizeToolBars()", &signal_1, TQMetaData::Protected }, + { "currentToolBarChanged()", &signal_2, TQMetaData::Protected }, + { "removeActionsHintRequest()", &signal_3, TQMetaData::Protected } }; - metaObj = QMetaObject::new_metaobject( - "KviActionManager", parentObject, + metaObj = TQMetaObject::new_metaobject( + "KviActionManager", tqparentObject, slot_tbl, 1, signal_tbl, 4, -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES 0, 0, 0, 0, -#endif // QT_NO_PROPERTIES +#endif // TQT_NO_PROPERTIES 0, 0 ); cleanUp_KviActionManager.setMetaObject( metaObj ); return metaObj; } -void* KviActionManager::qt_cast( const char* clname ) +void* KviActionManager::tqqt_cast( const char* clname ) { if ( !qstrcmp( clname, "KviActionManager" ) ) return this; - return QObject::qt_cast( clname ); + return TQObject::tqqt_cast( clname ); } -// SIGNAL beginCustomizeToolBars +// TQT_SIGNAL beginCustomizeToolBars void KviActionManager::beginCustomizeToolBars() { activate_signal( staticMetaObject()->signalOffset() + 0 ); } -// SIGNAL endCustomizeToolBars +// TQT_SIGNAL endCustomizeToolBars void KviActionManager::endCustomizeToolBars() { activate_signal( staticMetaObject()->signalOffset() + 1 ); } -// SIGNAL currentToolBarChanged +// TQT_SIGNAL currentToolBarChanged void KviActionManager::currentToolBarChanged() { activate_signal( staticMetaObject()->signalOffset() + 2 ); } -// SIGNAL removeActionsHintRequest +// TQT_SIGNAL removeActionsHintRequest void KviActionManager::removeActionsHintRequest() { activate_signal( staticMetaObject()->signalOffset() + 3 ); } -bool KviActionManager::qt_invoke( int _id, QUObject* _o ) +bool KviActionManager::qt_invoke( int _id, TQUObject* _o ) { switch ( _id - staticMetaObject()->slotOffset() ) { case 0: actionDestroyed(); break; default: - return QObject::qt_invoke( _id, _o ); + return TQObject::qt_invoke( _id, _o ); } return TRUE; } -bool KviActionManager::qt_emit( int _id, QUObject* _o ) +bool KviActionManager::qt_emit( int _id, TQUObject* _o ) { switch ( _id - staticMetaObject()->signalOffset() ) { case 0: beginCustomizeToolBars(); break; @@ -128,16 +128,16 @@ bool KviActionManager::qt_emit( int _id, QUObject* _o ) case 2: currentToolBarChanged(); break; case 3: removeActionsHintRequest(); break; default: - return QObject::qt_emit(_id,_o); + return TQObject::qt_emit(_id,_o); } return TRUE; } -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES -bool KviActionManager::qt_property( int id, int f, QVariant* v) +bool KviActionManager::qt_property( int id, int f, TQVariant* v) { - return QObject::qt_property( id, f, v); + return TQObject::qt_property( id, f, v); } -bool KviActionManager::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; } -#endif // QT_NO_PROPERTIES +bool KviActionManager::qt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; } +#endif // TQT_NO_PROPERTIES diff --git a/src/kvirc/kernel/moc_kvi_coreactions.cpp b/src/kvirc/kernel/moc_kvi_coreactions.cpp index 73f14280..2bacfad3 100644 --- a/src/kvirc/kernel/moc_kvi_coreactions.cpp +++ b/src/kvirc/kernel/moc_kvi_coreactions.cpp @@ -2,21 +2,21 @@ ** KviConnectAction meta object code from reading C++ file 'kvi_coreactions.h' ** ** Created: Mon Feb 25 00:11:42 2008 -** by: The Qt MOC ($Id: qt/moc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) +** by: The TQt TQMOC ($Id: qt/tqmoc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ -#undef QT_NO_COMPAT +#undef TQT_NO_COMPAT #include "kvi_coreactions.h" -#include -#include - -#include -#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26) -#error "This file was generated using the moc from 3.3.8. It" -#error "cannot be used with the include files from this version of Qt." -#error "(The moc has changed too much.)" +#include +#include + +#include +#if !defined(TQ_TQMOC_OUTPUT_REVISION) || (TQ_TQMOC_OUTPUT_REVISION != 26) +#error "This file was generated using the tqmoc from 3.3.8. It" +#error "cannot be used with the include files from this version of TQt." +#error "(The tqmoc has changed too much.)" #endif const char *KviConnectAction::className() const @@ -24,72 +24,72 @@ const char *KviConnectAction::className() const return "KviConnectAction"; } -QMetaObject *KviConnectAction::metaObj = 0; -static QMetaObjectCleanUp cleanUp_KviConnectAction( "KviConnectAction", &KviConnectAction::staticMetaObject ); +TQMetaObject *KviConnectAction::metaObj = 0; +static TQMetaObjectCleanUp cleanUp_KviConnectAction( "KviConnectAction", &KviConnectAction::staticMetaObject ); -#ifndef QT_NO_TRANSLATION -QString KviConnectAction::tr( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION +TQString KviConnectAction::tr( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviConnectAction", s, c, QApplication::DefaultCodec ); + if ( tqApp ) + return tqApp->translate( "KviConnectAction", s, c, TQApplication::DefaultCodec ); else - return QString::fromLatin1( s ); + return TQString::tqfromLatin1( s ); } -#ifndef QT_NO_TRANSLATION_UTF8 -QString KviConnectAction::trUtf8( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION_UTF8 +TQString KviConnectAction::trUtf8( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviConnectAction", s, c, QApplication::UnicodeUTF8 ); + if ( tqApp ) + return tqApp->translate( "KviConnectAction", s, c, TQApplication::UnicodeUTF8 ); else - return QString::fromUtf8( s ); + return TQString::fromUtf8( s ); } -#endif // QT_NO_TRANSLATION_UTF8 +#endif // TQT_NO_TRANSLATION_UTF8 -#endif // QT_NO_TRANSLATION +#endif // TQT_NO_TRANSLATION -QMetaObject* KviConnectAction::staticMetaObject() +TQMetaObject* KviConnectAction::staticMetaObject() { if ( metaObj ) return metaObj; - QMetaObject* parentObject = KviAction::staticMetaObject(); - metaObj = QMetaObject::new_metaobject( - "KviConnectAction", parentObject, + TQMetaObject* tqparentObject = KviAction::staticMetaObject(); + metaObj = TQMetaObject::new_metaobject( + "KviConnectAction", tqparentObject, 0, 0, 0, 0, -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES 0, 0, 0, 0, -#endif // QT_NO_PROPERTIES +#endif // TQT_NO_PROPERTIES 0, 0 ); cleanUp_KviConnectAction.setMetaObject( metaObj ); return metaObj; } -void* KviConnectAction::qt_cast( const char* clname ) +void* KviConnectAction::tqqt_cast( const char* clname ) { if ( !qstrcmp( clname, "KviConnectAction" ) ) return this; - return KviAction::qt_cast( clname ); + return KviAction::tqqt_cast( clname ); } -bool KviConnectAction::qt_invoke( int _id, QUObject* _o ) +bool KviConnectAction::qt_invoke( int _id, TQUObject* _o ) { return KviAction::qt_invoke(_id,_o); } -bool KviConnectAction::qt_emit( int _id, QUObject* _o ) +bool KviConnectAction::qt_emit( int _id, TQUObject* _o ) { return KviAction::qt_emit(_id,_o); } -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES -bool KviConnectAction::qt_property( int id, int f, QVariant* v) +bool KviConnectAction::qt_property( int id, int f, TQVariant* v) { return KviAction::qt_property( id, f, v); } -bool KviConnectAction::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; } -#endif // QT_NO_PROPERTIES +bool KviConnectAction::qt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; } +#endif // TQT_NO_PROPERTIES const char *KviSeparatorAction::className() const @@ -97,72 +97,72 @@ const char *KviSeparatorAction::className() const return "KviSeparatorAction"; } -QMetaObject *KviSeparatorAction::metaObj = 0; -static QMetaObjectCleanUp cleanUp_KviSeparatorAction( "KviSeparatorAction", &KviSeparatorAction::staticMetaObject ); +TQMetaObject *KviSeparatorAction::metaObj = 0; +static TQMetaObjectCleanUp cleanUp_KviSeparatorAction( "KviSeparatorAction", &KviSeparatorAction::staticMetaObject ); -#ifndef QT_NO_TRANSLATION -QString KviSeparatorAction::tr( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION +TQString KviSeparatorAction::tr( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviSeparatorAction", s, c, QApplication::DefaultCodec ); + if ( tqApp ) + return tqApp->translate( "KviSeparatorAction", s, c, TQApplication::DefaultCodec ); else - return QString::fromLatin1( s ); + return TQString::tqfromLatin1( s ); } -#ifndef QT_NO_TRANSLATION_UTF8 -QString KviSeparatorAction::trUtf8( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION_UTF8 +TQString KviSeparatorAction::trUtf8( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviSeparatorAction", s, c, QApplication::UnicodeUTF8 ); + if ( tqApp ) + return tqApp->translate( "KviSeparatorAction", s, c, TQApplication::UnicodeUTF8 ); else - return QString::fromUtf8( s ); + return TQString::fromUtf8( s ); } -#endif // QT_NO_TRANSLATION_UTF8 +#endif // TQT_NO_TRANSLATION_UTF8 -#endif // QT_NO_TRANSLATION +#endif // TQT_NO_TRANSLATION -QMetaObject* KviSeparatorAction::staticMetaObject() +TQMetaObject* KviSeparatorAction::staticMetaObject() { if ( metaObj ) return metaObj; - QMetaObject* parentObject = KviAction::staticMetaObject(); - metaObj = QMetaObject::new_metaobject( - "KviSeparatorAction", parentObject, + TQMetaObject* tqparentObject = KviAction::staticMetaObject(); + metaObj = TQMetaObject::new_metaobject( + "KviSeparatorAction", tqparentObject, 0, 0, 0, 0, -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES 0, 0, 0, 0, -#endif // QT_NO_PROPERTIES +#endif // TQT_NO_PROPERTIES 0, 0 ); cleanUp_KviSeparatorAction.setMetaObject( metaObj ); return metaObj; } -void* KviSeparatorAction::qt_cast( const char* clname ) +void* KviSeparatorAction::tqqt_cast( const char* clname ) { if ( !qstrcmp( clname, "KviSeparatorAction" ) ) return this; - return KviAction::qt_cast( clname ); + return KviAction::tqqt_cast( clname ); } -bool KviSeparatorAction::qt_invoke( int _id, QUObject* _o ) +bool KviSeparatorAction::qt_invoke( int _id, TQUObject* _o ) { return KviAction::qt_invoke(_id,_o); } -bool KviSeparatorAction::qt_emit( int _id, QUObject* _o ) +bool KviSeparatorAction::qt_emit( int _id, TQUObject* _o ) { return KviAction::qt_emit(_id,_o); } -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES -bool KviSeparatorAction::qt_property( int id, int f, QVariant* v) +bool KviSeparatorAction::qt_property( int id, int f, TQVariant* v) { return KviAction::qt_property( id, f, v); } -bool KviSeparatorAction::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; } -#endif // QT_NO_PROPERTIES +bool KviSeparatorAction::qt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; } +#endif // TQT_NO_PROPERTIES const char *KviSubmenuAction::className() const @@ -170,87 +170,87 @@ const char *KviSubmenuAction::className() const return "KviSubmenuAction"; } -QMetaObject *KviSubmenuAction::metaObj = 0; -static QMetaObjectCleanUp cleanUp_KviSubmenuAction( "KviSubmenuAction", &KviSubmenuAction::staticMetaObject ); +TQMetaObject *KviSubmenuAction::metaObj = 0; +static TQMetaObjectCleanUp cleanUp_KviSubmenuAction( "KviSubmenuAction", &KviSubmenuAction::staticMetaObject ); -#ifndef QT_NO_TRANSLATION -QString KviSubmenuAction::tr( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION +TQString KviSubmenuAction::tr( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviSubmenuAction", s, c, QApplication::DefaultCodec ); + if ( tqApp ) + return tqApp->translate( "KviSubmenuAction", s, c, TQApplication::DefaultCodec ); else - return QString::fromLatin1( s ); + return TQString::tqfromLatin1( s ); } -#ifndef QT_NO_TRANSLATION_UTF8 -QString KviSubmenuAction::trUtf8( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION_UTF8 +TQString KviSubmenuAction::trUtf8( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviSubmenuAction", s, c, QApplication::UnicodeUTF8 ); + if ( tqApp ) + return tqApp->translate( "KviSubmenuAction", s, c, TQApplication::UnicodeUTF8 ); else - return QString::fromUtf8( s ); + return TQString::fromUtf8( s ); } -#endif // QT_NO_TRANSLATION_UTF8 +#endif // TQT_NO_TRANSLATION_UTF8 -#endif // QT_NO_TRANSLATION +#endif // TQT_NO_TRANSLATION -QMetaObject* KviSubmenuAction::staticMetaObject() +TQMetaObject* KviSubmenuAction::staticMetaObject() { if ( metaObj ) return metaObj; - QMetaObject* parentObject = KviKvsAction::staticMetaObject(); - static const QUMethod slot_0 = {"popupAboutToShow", 0, 0 }; - static const QUParameter param_slot_1[] = { - { "id", &static_QUType_int, 0, QUParameter::In } + TQMetaObject* tqparentObject = KviKvsAction::staticMetaObject(); + static const TQUMethod slot_0 = {"popupAboutToShow", 0, 0 }; + static const TQUParameter param_slot_1[] = { + { "id", &static_TQUType_int, 0, TQUParameter::In } }; - static const QUMethod slot_1 = {"popupActivated", 1, param_slot_1 }; - static const QMetaData slot_tbl[] = { - { "popupAboutToShow()", &slot_0, QMetaData::Protected }, - { "popupActivated(int)", &slot_1, QMetaData::Protected } + static const TQUMethod slot_1 = {"popupActivated", 1, param_slot_1 }; + static const TQMetaData slot_tbl[] = { + { "popupAboutToShow()", &slot_0, TQMetaData::Protected }, + { "popupActivated(int)", &slot_1, TQMetaData::Protected } }; - metaObj = QMetaObject::new_metaobject( - "KviSubmenuAction", parentObject, + metaObj = TQMetaObject::new_metaobject( + "KviSubmenuAction", tqparentObject, slot_tbl, 2, 0, 0, -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES 0, 0, 0, 0, -#endif // QT_NO_PROPERTIES +#endif // TQT_NO_PROPERTIES 0, 0 ); cleanUp_KviSubmenuAction.setMetaObject( metaObj ); return metaObj; } -void* KviSubmenuAction::qt_cast( const char* clname ) +void* KviSubmenuAction::tqqt_cast( const char* clname ) { if ( !qstrcmp( clname, "KviSubmenuAction" ) ) return this; - return KviKvsAction::qt_cast( clname ); + return KviKvsAction::tqqt_cast( clname ); } -bool KviSubmenuAction::qt_invoke( int _id, QUObject* _o ) +bool KviSubmenuAction::qt_invoke( int _id, TQUObject* _o ) { switch ( _id - staticMetaObject()->slotOffset() ) { case 0: popupAboutToShow(); break; - case 1: popupActivated((int)static_QUType_int.get(_o+1)); break; + case 1: popupActivated((int)static_TQUType_int.get(_o+1)); break; default: return KviKvsAction::qt_invoke( _id, _o ); } return TRUE; } -bool KviSubmenuAction::qt_emit( int _id, QUObject* _o ) +bool KviSubmenuAction::qt_emit( int _id, TQUObject* _o ) { return KviKvsAction::qt_emit(_id,_o); } -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES -bool KviSubmenuAction::qt_property( int id, int f, QVariant* v) +bool KviSubmenuAction::qt_property( int id, int f, TQVariant* v) { return KviKvsAction::qt_property( id, f, v); } -bool KviSubmenuAction::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; } -#endif // QT_NO_PROPERTIES +bool KviSubmenuAction::qt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; } +#endif // TQT_NO_PROPERTIES const char *KviJoinChannelAction::className() const @@ -258,87 +258,87 @@ const char *KviJoinChannelAction::className() const return "KviJoinChannelAction"; } -QMetaObject *KviJoinChannelAction::metaObj = 0; -static QMetaObjectCleanUp cleanUp_KviJoinChannelAction( "KviJoinChannelAction", &KviJoinChannelAction::staticMetaObject ); +TQMetaObject *KviJoinChannelAction::metaObj = 0; +static TQMetaObjectCleanUp cleanUp_KviJoinChannelAction( "KviJoinChannelAction", &KviJoinChannelAction::staticMetaObject ); -#ifndef QT_NO_TRANSLATION -QString KviJoinChannelAction::tr( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION +TQString KviJoinChannelAction::tr( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviJoinChannelAction", s, c, QApplication::DefaultCodec ); + if ( tqApp ) + return tqApp->translate( "KviJoinChannelAction", s, c, TQApplication::DefaultCodec ); else - return QString::fromLatin1( s ); + return TQString::tqfromLatin1( s ); } -#ifndef QT_NO_TRANSLATION_UTF8 -QString KviJoinChannelAction::trUtf8( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION_UTF8 +TQString KviJoinChannelAction::trUtf8( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviJoinChannelAction", s, c, QApplication::UnicodeUTF8 ); + if ( tqApp ) + return tqApp->translate( "KviJoinChannelAction", s, c, TQApplication::UnicodeUTF8 ); else - return QString::fromUtf8( s ); + return TQString::fromUtf8( s ); } -#endif // QT_NO_TRANSLATION_UTF8 +#endif // TQT_NO_TRANSLATION_UTF8 -#endif // QT_NO_TRANSLATION +#endif // TQT_NO_TRANSLATION -QMetaObject* KviJoinChannelAction::staticMetaObject() +TQMetaObject* KviJoinChannelAction::staticMetaObject() { if ( metaObj ) return metaObj; - QMetaObject* parentObject = KviSubmenuAction::staticMetaObject(); - static const QUMethod slot_0 = {"popupAboutToShow", 0, 0 }; - static const QUParameter param_slot_1[] = { - { 0, &static_QUType_int, 0, QUParameter::In } + TQMetaObject* tqparentObject = KviSubmenuAction::staticMetaObject(); + static const TQUMethod slot_0 = {"popupAboutToShow", 0, 0 }; + static const TQUParameter param_slot_1[] = { + { 0, &static_TQUType_int, 0, TQUParameter::In } }; - static const QUMethod slot_1 = {"popupActivated", 1, param_slot_1 }; - static const QMetaData slot_tbl[] = { - { "popupAboutToShow()", &slot_0, QMetaData::Protected }, - { "popupActivated(int)", &slot_1, QMetaData::Protected } + static const TQUMethod slot_1 = {"popupActivated", 1, param_slot_1 }; + static const TQMetaData slot_tbl[] = { + { "popupAboutToShow()", &slot_0, TQMetaData::Protected }, + { "popupActivated(int)", &slot_1, TQMetaData::Protected } }; - metaObj = QMetaObject::new_metaobject( - "KviJoinChannelAction", parentObject, + metaObj = TQMetaObject::new_metaobject( + "KviJoinChannelAction", tqparentObject, slot_tbl, 2, 0, 0, -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES 0, 0, 0, 0, -#endif // QT_NO_PROPERTIES +#endif // TQT_NO_PROPERTIES 0, 0 ); cleanUp_KviJoinChannelAction.setMetaObject( metaObj ); return metaObj; } -void* KviJoinChannelAction::qt_cast( const char* clname ) +void* KviJoinChannelAction::tqqt_cast( const char* clname ) { if ( !qstrcmp( clname, "KviJoinChannelAction" ) ) return this; - return KviSubmenuAction::qt_cast( clname ); + return KviSubmenuAction::tqqt_cast( clname ); } -bool KviJoinChannelAction::qt_invoke( int _id, QUObject* _o ) +bool KviJoinChannelAction::qt_invoke( int _id, TQUObject* _o ) { switch ( _id - staticMetaObject()->slotOffset() ) { case 0: popupAboutToShow(); break; - case 1: popupActivated((int)static_QUType_int.get(_o+1)); break; + case 1: popupActivated((int)static_TQUType_int.get(_o+1)); break; default: return KviSubmenuAction::qt_invoke( _id, _o ); } return TRUE; } -bool KviJoinChannelAction::qt_emit( int _id, QUObject* _o ) +bool KviJoinChannelAction::qt_emit( int _id, TQUObject* _o ) { return KviSubmenuAction::qt_emit(_id,_o); } -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES -bool KviJoinChannelAction::qt_property( int id, int f, QVariant* v) +bool KviJoinChannelAction::qt_property( int id, int f, TQVariant* v) { return KviSubmenuAction::qt_property( id, f, v); } -bool KviJoinChannelAction::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; } -#endif // QT_NO_PROPERTIES +bool KviJoinChannelAction::qt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; } +#endif // TQT_NO_PROPERTIES const char *KviChangeNickAction::className() const @@ -346,87 +346,87 @@ const char *KviChangeNickAction::className() const return "KviChangeNickAction"; } -QMetaObject *KviChangeNickAction::metaObj = 0; -static QMetaObjectCleanUp cleanUp_KviChangeNickAction( "KviChangeNickAction", &KviChangeNickAction::staticMetaObject ); +TQMetaObject *KviChangeNickAction::metaObj = 0; +static TQMetaObjectCleanUp cleanUp_KviChangeNickAction( "KviChangeNickAction", &KviChangeNickAction::staticMetaObject ); -#ifndef QT_NO_TRANSLATION -QString KviChangeNickAction::tr( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION +TQString KviChangeNickAction::tr( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviChangeNickAction", s, c, QApplication::DefaultCodec ); + if ( tqApp ) + return tqApp->translate( "KviChangeNickAction", s, c, TQApplication::DefaultCodec ); else - return QString::fromLatin1( s ); + return TQString::tqfromLatin1( s ); } -#ifndef QT_NO_TRANSLATION_UTF8 -QString KviChangeNickAction::trUtf8( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION_UTF8 +TQString KviChangeNickAction::trUtf8( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviChangeNickAction", s, c, QApplication::UnicodeUTF8 ); + if ( tqApp ) + return tqApp->translate( "KviChangeNickAction", s, c, TQApplication::UnicodeUTF8 ); else - return QString::fromUtf8( s ); + return TQString::fromUtf8( s ); } -#endif // QT_NO_TRANSLATION_UTF8 +#endif // TQT_NO_TRANSLATION_UTF8 -#endif // QT_NO_TRANSLATION +#endif // TQT_NO_TRANSLATION -QMetaObject* KviChangeNickAction::staticMetaObject() +TQMetaObject* KviChangeNickAction::staticMetaObject() { if ( metaObj ) return metaObj; - QMetaObject* parentObject = KviSubmenuAction::staticMetaObject(); - static const QUMethod slot_0 = {"popupAboutToShow", 0, 0 }; - static const QUParameter param_slot_1[] = { - { 0, &static_QUType_int, 0, QUParameter::In } + TQMetaObject* tqparentObject = KviSubmenuAction::staticMetaObject(); + static const TQUMethod slot_0 = {"popupAboutToShow", 0, 0 }; + static const TQUParameter param_slot_1[] = { + { 0, &static_TQUType_int, 0, TQUParameter::In } }; - static const QUMethod slot_1 = {"popupActivated", 1, param_slot_1 }; - static const QMetaData slot_tbl[] = { - { "popupAboutToShow()", &slot_0, QMetaData::Protected }, - { "popupActivated(int)", &slot_1, QMetaData::Protected } + static const TQUMethod slot_1 = {"popupActivated", 1, param_slot_1 }; + static const TQMetaData slot_tbl[] = { + { "popupAboutToShow()", &slot_0, TQMetaData::Protected }, + { "popupActivated(int)", &slot_1, TQMetaData::Protected } }; - metaObj = QMetaObject::new_metaobject( - "KviChangeNickAction", parentObject, + metaObj = TQMetaObject::new_metaobject( + "KviChangeNickAction", tqparentObject, slot_tbl, 2, 0, 0, -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES 0, 0, 0, 0, -#endif // QT_NO_PROPERTIES +#endif // TQT_NO_PROPERTIES 0, 0 ); cleanUp_KviChangeNickAction.setMetaObject( metaObj ); return metaObj; } -void* KviChangeNickAction::qt_cast( const char* clname ) +void* KviChangeNickAction::tqqt_cast( const char* clname ) { if ( !qstrcmp( clname, "KviChangeNickAction" ) ) return this; - return KviSubmenuAction::qt_cast( clname ); + return KviSubmenuAction::tqqt_cast( clname ); } -bool KviChangeNickAction::qt_invoke( int _id, QUObject* _o ) +bool KviChangeNickAction::qt_invoke( int _id, TQUObject* _o ) { switch ( _id - staticMetaObject()->slotOffset() ) { case 0: popupAboutToShow(); break; - case 1: popupActivated((int)static_QUType_int.get(_o+1)); break; + case 1: popupActivated((int)static_TQUType_int.get(_o+1)); break; default: return KviSubmenuAction::qt_invoke( _id, _o ); } return TRUE; } -bool KviChangeNickAction::qt_emit( int _id, QUObject* _o ) +bool KviChangeNickAction::qt_emit( int _id, TQUObject* _o ) { return KviSubmenuAction::qt_emit(_id,_o); } -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES -bool KviChangeNickAction::qt_property( int id, int f, QVariant* v) +bool KviChangeNickAction::qt_property( int id, int f, TQVariant* v) { return KviSubmenuAction::qt_property( id, f, v); } -bool KviChangeNickAction::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; } -#endif // QT_NO_PROPERTIES +bool KviChangeNickAction::qt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; } +#endif // TQT_NO_PROPERTIES const char *KviConnectToServerAction::className() const @@ -434,87 +434,87 @@ const char *KviConnectToServerAction::className() const return "KviConnectToServerAction"; } -QMetaObject *KviConnectToServerAction::metaObj = 0; -static QMetaObjectCleanUp cleanUp_KviConnectToServerAction( "KviConnectToServerAction", &KviConnectToServerAction::staticMetaObject ); +TQMetaObject *KviConnectToServerAction::metaObj = 0; +static TQMetaObjectCleanUp cleanUp_KviConnectToServerAction( "KviConnectToServerAction", &KviConnectToServerAction::staticMetaObject ); -#ifndef QT_NO_TRANSLATION -QString KviConnectToServerAction::tr( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION +TQString KviConnectToServerAction::tr( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviConnectToServerAction", s, c, QApplication::DefaultCodec ); + if ( tqApp ) + return tqApp->translate( "KviConnectToServerAction", s, c, TQApplication::DefaultCodec ); else - return QString::fromLatin1( s ); + return TQString::tqfromLatin1( s ); } -#ifndef QT_NO_TRANSLATION_UTF8 -QString KviConnectToServerAction::trUtf8( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION_UTF8 +TQString KviConnectToServerAction::trUtf8( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviConnectToServerAction", s, c, QApplication::UnicodeUTF8 ); + if ( tqApp ) + return tqApp->translate( "KviConnectToServerAction", s, c, TQApplication::UnicodeUTF8 ); else - return QString::fromUtf8( s ); + return TQString::fromUtf8( s ); } -#endif // QT_NO_TRANSLATION_UTF8 +#endif // TQT_NO_TRANSLATION_UTF8 -#endif // QT_NO_TRANSLATION +#endif // TQT_NO_TRANSLATION -QMetaObject* KviConnectToServerAction::staticMetaObject() +TQMetaObject* KviConnectToServerAction::staticMetaObject() { if ( metaObj ) return metaObj; - QMetaObject* parentObject = KviSubmenuAction::staticMetaObject(); - static const QUMethod slot_0 = {"popupAboutToShow", 0, 0 }; - static const QUParameter param_slot_1[] = { - { 0, &static_QUType_int, 0, QUParameter::In } + TQMetaObject* tqparentObject = KviSubmenuAction::staticMetaObject(); + static const TQUMethod slot_0 = {"popupAboutToShow", 0, 0 }; + static const TQUParameter param_slot_1[] = { + { 0, &static_TQUType_int, 0, TQUParameter::In } }; - static const QUMethod slot_1 = {"popupActivated", 1, param_slot_1 }; - static const QMetaData slot_tbl[] = { - { "popupAboutToShow()", &slot_0, QMetaData::Protected }, - { "popupActivated(int)", &slot_1, QMetaData::Protected } + static const TQUMethod slot_1 = {"popupActivated", 1, param_slot_1 }; + static const TQMetaData slot_tbl[] = { + { "popupAboutToShow()", &slot_0, TQMetaData::Protected }, + { "popupActivated(int)", &slot_1, TQMetaData::Protected } }; - metaObj = QMetaObject::new_metaobject( - "KviConnectToServerAction", parentObject, + metaObj = TQMetaObject::new_metaobject( + "KviConnectToServerAction", tqparentObject, slot_tbl, 2, 0, 0, -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES 0, 0, 0, 0, -#endif // QT_NO_PROPERTIES +#endif // TQT_NO_PROPERTIES 0, 0 ); cleanUp_KviConnectToServerAction.setMetaObject( metaObj ); return metaObj; } -void* KviConnectToServerAction::qt_cast( const char* clname ) +void* KviConnectToServerAction::tqqt_cast( const char* clname ) { if ( !qstrcmp( clname, "KviConnectToServerAction" ) ) return this; - return KviSubmenuAction::qt_cast( clname ); + return KviSubmenuAction::tqqt_cast( clname ); } -bool KviConnectToServerAction::qt_invoke( int _id, QUObject* _o ) +bool KviConnectToServerAction::qt_invoke( int _id, TQUObject* _o ) { switch ( _id - staticMetaObject()->slotOffset() ) { case 0: popupAboutToShow(); break; - case 1: popupActivated((int)static_QUType_int.get(_o+1)); break; + case 1: popupActivated((int)static_TQUType_int.get(_o+1)); break; default: return KviSubmenuAction::qt_invoke( _id, _o ); } return TRUE; } -bool KviConnectToServerAction::qt_emit( int _id, QUObject* _o ) +bool KviConnectToServerAction::qt_emit( int _id, TQUObject* _o ) { return KviSubmenuAction::qt_emit(_id,_o); } -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES -bool KviConnectToServerAction::qt_property( int id, int f, QVariant* v) +bool KviConnectToServerAction::qt_property( int id, int f, TQVariant* v) { return KviSubmenuAction::qt_property( id, f, v); } -bool KviConnectToServerAction::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; } -#endif // QT_NO_PROPERTIES +bool KviConnectToServerAction::qt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; } +#endif // TQT_NO_PROPERTIES const char *KviChangeUserModeAction::className() const @@ -522,87 +522,87 @@ const char *KviChangeUserModeAction::className() const return "KviChangeUserModeAction"; } -QMetaObject *KviChangeUserModeAction::metaObj = 0; -static QMetaObjectCleanUp cleanUp_KviChangeUserModeAction( "KviChangeUserModeAction", &KviChangeUserModeAction::staticMetaObject ); +TQMetaObject *KviChangeUserModeAction::metaObj = 0; +static TQMetaObjectCleanUp cleanUp_KviChangeUserModeAction( "KviChangeUserModeAction", &KviChangeUserModeAction::staticMetaObject ); -#ifndef QT_NO_TRANSLATION -QString KviChangeUserModeAction::tr( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION +TQString KviChangeUserModeAction::tr( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviChangeUserModeAction", s, c, QApplication::DefaultCodec ); + if ( tqApp ) + return tqApp->translate( "KviChangeUserModeAction", s, c, TQApplication::DefaultCodec ); else - return QString::fromLatin1( s ); + return TQString::tqfromLatin1( s ); } -#ifndef QT_NO_TRANSLATION_UTF8 -QString KviChangeUserModeAction::trUtf8( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION_UTF8 +TQString KviChangeUserModeAction::trUtf8( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviChangeUserModeAction", s, c, QApplication::UnicodeUTF8 ); + if ( tqApp ) + return tqApp->translate( "KviChangeUserModeAction", s, c, TQApplication::UnicodeUTF8 ); else - return QString::fromUtf8( s ); + return TQString::fromUtf8( s ); } -#endif // QT_NO_TRANSLATION_UTF8 +#endif // TQT_NO_TRANSLATION_UTF8 -#endif // QT_NO_TRANSLATION +#endif // TQT_NO_TRANSLATION -QMetaObject* KviChangeUserModeAction::staticMetaObject() +TQMetaObject* KviChangeUserModeAction::staticMetaObject() { if ( metaObj ) return metaObj; - QMetaObject* parentObject = KviSubmenuAction::staticMetaObject(); - static const QUMethod slot_0 = {"popupAboutToShow", 0, 0 }; - static const QUParameter param_slot_1[] = { - { 0, &static_QUType_int, 0, QUParameter::In } + TQMetaObject* tqparentObject = KviSubmenuAction::staticMetaObject(); + static const TQUMethod slot_0 = {"popupAboutToShow", 0, 0 }; + static const TQUParameter param_slot_1[] = { + { 0, &static_TQUType_int, 0, TQUParameter::In } }; - static const QUMethod slot_1 = {"popupActivated", 1, param_slot_1 }; - static const QMetaData slot_tbl[] = { - { "popupAboutToShow()", &slot_0, QMetaData::Protected }, - { "popupActivated(int)", &slot_1, QMetaData::Protected } + static const TQUMethod slot_1 = {"popupActivated", 1, param_slot_1 }; + static const TQMetaData slot_tbl[] = { + { "popupAboutToShow()", &slot_0, TQMetaData::Protected }, + { "popupActivated(int)", &slot_1, TQMetaData::Protected } }; - metaObj = QMetaObject::new_metaobject( - "KviChangeUserModeAction", parentObject, + metaObj = TQMetaObject::new_metaobject( + "KviChangeUserModeAction", tqparentObject, slot_tbl, 2, 0, 0, -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES 0, 0, 0, 0, -#endif // QT_NO_PROPERTIES +#endif // TQT_NO_PROPERTIES 0, 0 ); cleanUp_KviChangeUserModeAction.setMetaObject( metaObj ); return metaObj; } -void* KviChangeUserModeAction::qt_cast( const char* clname ) +void* KviChangeUserModeAction::tqqt_cast( const char* clname ) { if ( !qstrcmp( clname, "KviChangeUserModeAction" ) ) return this; - return KviSubmenuAction::qt_cast( clname ); + return KviSubmenuAction::tqqt_cast( clname ); } -bool KviChangeUserModeAction::qt_invoke( int _id, QUObject* _o ) +bool KviChangeUserModeAction::qt_invoke( int _id, TQUObject* _o ) { switch ( _id - staticMetaObject()->slotOffset() ) { case 0: popupAboutToShow(); break; - case 1: popupActivated((int)static_QUType_int.get(_o+1)); break; + case 1: popupActivated((int)static_TQUType_int.get(_o+1)); break; default: return KviSubmenuAction::qt_invoke( _id, _o ); } return TRUE; } -bool KviChangeUserModeAction::qt_emit( int _id, QUObject* _o ) +bool KviChangeUserModeAction::qt_emit( int _id, TQUObject* _o ) { return KviSubmenuAction::qt_emit(_id,_o); } -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES -bool KviChangeUserModeAction::qt_property( int id, int f, QVariant* v) +bool KviChangeUserModeAction::qt_property( int id, int f, TQVariant* v) { return KviSubmenuAction::qt_property( id, f, v); } -bool KviChangeUserModeAction::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; } -#endif // QT_NO_PROPERTIES +bool KviChangeUserModeAction::qt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; } +#endif // TQT_NO_PROPERTIES const char *KviIrcToolsAction::className() const @@ -610,87 +610,87 @@ const char *KviIrcToolsAction::className() const return "KviIrcToolsAction"; } -QMetaObject *KviIrcToolsAction::metaObj = 0; -static QMetaObjectCleanUp cleanUp_KviIrcToolsAction( "KviIrcToolsAction", &KviIrcToolsAction::staticMetaObject ); +TQMetaObject *KviIrcToolsAction::metaObj = 0; +static TQMetaObjectCleanUp cleanUp_KviIrcToolsAction( "KviIrcToolsAction", &KviIrcToolsAction::staticMetaObject ); -#ifndef QT_NO_TRANSLATION -QString KviIrcToolsAction::tr( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION +TQString KviIrcToolsAction::tr( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviIrcToolsAction", s, c, QApplication::DefaultCodec ); + if ( tqApp ) + return tqApp->translate( "KviIrcToolsAction", s, c, TQApplication::DefaultCodec ); else - return QString::fromLatin1( s ); + return TQString::tqfromLatin1( s ); } -#ifndef QT_NO_TRANSLATION_UTF8 -QString KviIrcToolsAction::trUtf8( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION_UTF8 +TQString KviIrcToolsAction::trUtf8( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviIrcToolsAction", s, c, QApplication::UnicodeUTF8 ); + if ( tqApp ) + return tqApp->translate( "KviIrcToolsAction", s, c, TQApplication::UnicodeUTF8 ); else - return QString::fromUtf8( s ); + return TQString::fromUtf8( s ); } -#endif // QT_NO_TRANSLATION_UTF8 +#endif // TQT_NO_TRANSLATION_UTF8 -#endif // QT_NO_TRANSLATION +#endif // TQT_NO_TRANSLATION -QMetaObject* KviIrcToolsAction::staticMetaObject() +TQMetaObject* KviIrcToolsAction::staticMetaObject() { if ( metaObj ) return metaObj; - QMetaObject* parentObject = KviSubmenuAction::staticMetaObject(); - static const QUMethod slot_0 = {"popupAboutToShow", 0, 0 }; - static const QUParameter param_slot_1[] = { - { 0, &static_QUType_int, 0, QUParameter::In } + TQMetaObject* tqparentObject = KviSubmenuAction::staticMetaObject(); + static const TQUMethod slot_0 = {"popupAboutToShow", 0, 0 }; + static const TQUParameter param_slot_1[] = { + { 0, &static_TQUType_int, 0, TQUParameter::In } }; - static const QUMethod slot_1 = {"popupActivated", 1, param_slot_1 }; - static const QMetaData slot_tbl[] = { - { "popupAboutToShow()", &slot_0, QMetaData::Protected }, - { "popupActivated(int)", &slot_1, QMetaData::Protected } + static const TQUMethod slot_1 = {"popupActivated", 1, param_slot_1 }; + static const TQMetaData slot_tbl[] = { + { "popupAboutToShow()", &slot_0, TQMetaData::Protected }, + { "popupActivated(int)", &slot_1, TQMetaData::Protected } }; - metaObj = QMetaObject::new_metaobject( - "KviIrcToolsAction", parentObject, + metaObj = TQMetaObject::new_metaobject( + "KviIrcToolsAction", tqparentObject, slot_tbl, 2, 0, 0, -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES 0, 0, 0, 0, -#endif // QT_NO_PROPERTIES +#endif // TQT_NO_PROPERTIES 0, 0 ); cleanUp_KviIrcToolsAction.setMetaObject( metaObj ); return metaObj; } -void* KviIrcToolsAction::qt_cast( const char* clname ) +void* KviIrcToolsAction::tqqt_cast( const char* clname ) { if ( !qstrcmp( clname, "KviIrcToolsAction" ) ) return this; - return KviSubmenuAction::qt_cast( clname ); + return KviSubmenuAction::tqqt_cast( clname ); } -bool KviIrcToolsAction::qt_invoke( int _id, QUObject* _o ) +bool KviIrcToolsAction::qt_invoke( int _id, TQUObject* _o ) { switch ( _id - staticMetaObject()->slotOffset() ) { case 0: popupAboutToShow(); break; - case 1: popupActivated((int)static_QUType_int.get(_o+1)); break; + case 1: popupActivated((int)static_TQUType_int.get(_o+1)); break; default: return KviSubmenuAction::qt_invoke( _id, _o ); } return TRUE; } -bool KviIrcToolsAction::qt_emit( int _id, QUObject* _o ) +bool KviIrcToolsAction::qt_emit( int _id, TQUObject* _o ) { return KviSubmenuAction::qt_emit(_id,_o); } -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES -bool KviIrcToolsAction::qt_property( int id, int f, QVariant* v) +bool KviIrcToolsAction::qt_property( int id, int f, TQVariant* v) { return KviSubmenuAction::qt_property( id, f, v); } -bool KviIrcToolsAction::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; } -#endif // QT_NO_PROPERTIES +bool KviIrcToolsAction::qt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; } +#endif // TQT_NO_PROPERTIES const char *KviIrcOperationsAction::className() const @@ -698,87 +698,87 @@ const char *KviIrcOperationsAction::className() const return "KviIrcOperationsAction"; } -QMetaObject *KviIrcOperationsAction::metaObj = 0; -static QMetaObjectCleanUp cleanUp_KviIrcOperationsAction( "KviIrcOperationsAction", &KviIrcOperationsAction::staticMetaObject ); +TQMetaObject *KviIrcOperationsAction::metaObj = 0; +static TQMetaObjectCleanUp cleanUp_KviIrcOperationsAction( "KviIrcOperationsAction", &KviIrcOperationsAction::staticMetaObject ); -#ifndef QT_NO_TRANSLATION -QString KviIrcOperationsAction::tr( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION +TQString KviIrcOperationsAction::tr( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviIrcOperationsAction", s, c, QApplication::DefaultCodec ); + if ( tqApp ) + return tqApp->translate( "KviIrcOperationsAction", s, c, TQApplication::DefaultCodec ); else - return QString::fromLatin1( s ); + return TQString::tqfromLatin1( s ); } -#ifndef QT_NO_TRANSLATION_UTF8 -QString KviIrcOperationsAction::trUtf8( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION_UTF8 +TQString KviIrcOperationsAction::trUtf8( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviIrcOperationsAction", s, c, QApplication::UnicodeUTF8 ); + if ( tqApp ) + return tqApp->translate( "KviIrcOperationsAction", s, c, TQApplication::UnicodeUTF8 ); else - return QString::fromUtf8( s ); + return TQString::fromUtf8( s ); } -#endif // QT_NO_TRANSLATION_UTF8 +#endif // TQT_NO_TRANSLATION_UTF8 -#endif // QT_NO_TRANSLATION +#endif // TQT_NO_TRANSLATION -QMetaObject* KviIrcOperationsAction::staticMetaObject() +TQMetaObject* KviIrcOperationsAction::staticMetaObject() { if ( metaObj ) return metaObj; - QMetaObject* parentObject = KviSubmenuAction::staticMetaObject(); - static const QUMethod slot_0 = {"popupAboutToShow", 0, 0 }; - static const QUParameter param_slot_1[] = { - { 0, &static_QUType_int, 0, QUParameter::In } + TQMetaObject* tqparentObject = KviSubmenuAction::staticMetaObject(); + static const TQUMethod slot_0 = {"popupAboutToShow", 0, 0 }; + static const TQUParameter param_slot_1[] = { + { 0, &static_TQUType_int, 0, TQUParameter::In } }; - static const QUMethod slot_1 = {"popupActivated", 1, param_slot_1 }; - static const QMetaData slot_tbl[] = { - { "popupAboutToShow()", &slot_0, QMetaData::Protected }, - { "popupActivated(int)", &slot_1, QMetaData::Protected } + static const TQUMethod slot_1 = {"popupActivated", 1, param_slot_1 }; + static const TQMetaData slot_tbl[] = { + { "popupAboutToShow()", &slot_0, TQMetaData::Protected }, + { "popupActivated(int)", &slot_1, TQMetaData::Protected } }; - metaObj = QMetaObject::new_metaobject( - "KviIrcOperationsAction", parentObject, + metaObj = TQMetaObject::new_metaobject( + "KviIrcOperationsAction", tqparentObject, slot_tbl, 2, 0, 0, -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES 0, 0, 0, 0, -#endif // QT_NO_PROPERTIES +#endif // TQT_NO_PROPERTIES 0, 0 ); cleanUp_KviIrcOperationsAction.setMetaObject( metaObj ); return metaObj; } -void* KviIrcOperationsAction::qt_cast( const char* clname ) +void* KviIrcOperationsAction::tqqt_cast( const char* clname ) { if ( !qstrcmp( clname, "KviIrcOperationsAction" ) ) return this; - return KviSubmenuAction::qt_cast( clname ); + return KviSubmenuAction::tqqt_cast( clname ); } -bool KviIrcOperationsAction::qt_invoke( int _id, QUObject* _o ) +bool KviIrcOperationsAction::qt_invoke( int _id, TQUObject* _o ) { switch ( _id - staticMetaObject()->slotOffset() ) { case 0: popupAboutToShow(); break; - case 1: popupActivated((int)static_QUType_int.get(_o+1)); break; + case 1: popupActivated((int)static_TQUType_int.get(_o+1)); break; default: return KviSubmenuAction::qt_invoke( _id, _o ); } return TRUE; } -bool KviIrcOperationsAction::qt_emit( int _id, QUObject* _o ) +bool KviIrcOperationsAction::qt_emit( int _id, TQUObject* _o ) { return KviSubmenuAction::qt_emit(_id,_o); } -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES -bool KviIrcOperationsAction::qt_property( int id, int f, QVariant* v) +bool KviIrcOperationsAction::qt_property( int id, int f, TQVariant* v) { return KviSubmenuAction::qt_property( id, f, v); } -bool KviIrcOperationsAction::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; } -#endif // QT_NO_PROPERTIES +bool KviIrcOperationsAction::qt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; } +#endif // TQT_NO_PROPERTIES const char *KviIrcContextDisplayAction::className() const @@ -786,72 +786,72 @@ const char *KviIrcContextDisplayAction::className() const return "KviIrcContextDisplayAction"; } -QMetaObject *KviIrcContextDisplayAction::metaObj = 0; -static QMetaObjectCleanUp cleanUp_KviIrcContextDisplayAction( "KviIrcContextDisplayAction", &KviIrcContextDisplayAction::staticMetaObject ); +TQMetaObject *KviIrcContextDisplayAction::metaObj = 0; +static TQMetaObjectCleanUp cleanUp_KviIrcContextDisplayAction( "KviIrcContextDisplayAction", &KviIrcContextDisplayAction::staticMetaObject ); -#ifndef QT_NO_TRANSLATION -QString KviIrcContextDisplayAction::tr( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION +TQString KviIrcContextDisplayAction::tr( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviIrcContextDisplayAction", s, c, QApplication::DefaultCodec ); + if ( tqApp ) + return tqApp->translate( "KviIrcContextDisplayAction", s, c, TQApplication::DefaultCodec ); else - return QString::fromLatin1( s ); + return TQString::tqfromLatin1( s ); } -#ifndef QT_NO_TRANSLATION_UTF8 -QString KviIrcContextDisplayAction::trUtf8( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION_UTF8 +TQString KviIrcContextDisplayAction::trUtf8( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviIrcContextDisplayAction", s, c, QApplication::UnicodeUTF8 ); + if ( tqApp ) + return tqApp->translate( "KviIrcContextDisplayAction", s, c, TQApplication::UnicodeUTF8 ); else - return QString::fromUtf8( s ); + return TQString::fromUtf8( s ); } -#endif // QT_NO_TRANSLATION_UTF8 +#endif // TQT_NO_TRANSLATION_UTF8 -#endif // QT_NO_TRANSLATION +#endif // TQT_NO_TRANSLATION -QMetaObject* KviIrcContextDisplayAction::staticMetaObject() +TQMetaObject* KviIrcContextDisplayAction::staticMetaObject() { if ( metaObj ) return metaObj; - QMetaObject* parentObject = KviAction::staticMetaObject(); - metaObj = QMetaObject::new_metaobject( - "KviIrcContextDisplayAction", parentObject, + TQMetaObject* tqparentObject = KviAction::staticMetaObject(); + metaObj = TQMetaObject::new_metaobject( + "KviIrcContextDisplayAction", tqparentObject, 0, 0, 0, 0, -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES 0, 0, 0, 0, -#endif // QT_NO_PROPERTIES +#endif // TQT_NO_PROPERTIES 0, 0 ); cleanUp_KviIrcContextDisplayAction.setMetaObject( metaObj ); return metaObj; } -void* KviIrcContextDisplayAction::qt_cast( const char* clname ) +void* KviIrcContextDisplayAction::tqqt_cast( const char* clname ) { if ( !qstrcmp( clname, "KviIrcContextDisplayAction" ) ) return this; - return KviAction::qt_cast( clname ); + return KviAction::tqqt_cast( clname ); } -bool KviIrcContextDisplayAction::qt_invoke( int _id, QUObject* _o ) +bool KviIrcContextDisplayAction::qt_invoke( int _id, TQUObject* _o ) { return KviAction::qt_invoke(_id,_o); } -bool KviIrcContextDisplayAction::qt_emit( int _id, QUObject* _o ) +bool KviIrcContextDisplayAction::qt_emit( int _id, TQUObject* _o ) { return KviAction::qt_emit(_id,_o); } -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES -bool KviIrcContextDisplayAction::qt_property( int id, int f, QVariant* v) +bool KviIrcContextDisplayAction::qt_property( int id, int f, TQVariant* v) { return KviAction::qt_property( id, f, v); } -bool KviIrcContextDisplayAction::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; } -#endif // QT_NO_PROPERTIES +bool KviIrcContextDisplayAction::qt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; } +#endif // TQT_NO_PROPERTIES const char *KviGoAwayAction::className() const @@ -859,69 +859,69 @@ const char *KviGoAwayAction::className() const return "KviGoAwayAction"; } -QMetaObject *KviGoAwayAction::metaObj = 0; -static QMetaObjectCleanUp cleanUp_KviGoAwayAction( "KviGoAwayAction", &KviGoAwayAction::staticMetaObject ); +TQMetaObject *KviGoAwayAction::metaObj = 0; +static TQMetaObjectCleanUp cleanUp_KviGoAwayAction( "KviGoAwayAction", &KviGoAwayAction::staticMetaObject ); -#ifndef QT_NO_TRANSLATION -QString KviGoAwayAction::tr( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION +TQString KviGoAwayAction::tr( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviGoAwayAction", s, c, QApplication::DefaultCodec ); + if ( tqApp ) + return tqApp->translate( "KviGoAwayAction", s, c, TQApplication::DefaultCodec ); else - return QString::fromLatin1( s ); + return TQString::tqfromLatin1( s ); } -#ifndef QT_NO_TRANSLATION_UTF8 -QString KviGoAwayAction::trUtf8( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION_UTF8 +TQString KviGoAwayAction::trUtf8( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviGoAwayAction", s, c, QApplication::UnicodeUTF8 ); + if ( tqApp ) + return tqApp->translate( "KviGoAwayAction", s, c, TQApplication::UnicodeUTF8 ); else - return QString::fromUtf8( s ); + return TQString::fromUtf8( s ); } -#endif // QT_NO_TRANSLATION_UTF8 +#endif // TQT_NO_TRANSLATION_UTF8 -#endif // QT_NO_TRANSLATION +#endif // TQT_NO_TRANSLATION -QMetaObject* KviGoAwayAction::staticMetaObject() +TQMetaObject* KviGoAwayAction::staticMetaObject() { if ( metaObj ) return metaObj; - QMetaObject* parentObject = KviKvsAction::staticMetaObject(); - metaObj = QMetaObject::new_metaobject( - "KviGoAwayAction", parentObject, + TQMetaObject* tqparentObject = KviKvsAction::staticMetaObject(); + metaObj = TQMetaObject::new_metaobject( + "KviGoAwayAction", tqparentObject, 0, 0, 0, 0, -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES 0, 0, 0, 0, -#endif // QT_NO_PROPERTIES +#endif // TQT_NO_PROPERTIES 0, 0 ); cleanUp_KviGoAwayAction.setMetaObject( metaObj ); return metaObj; } -void* KviGoAwayAction::qt_cast( const char* clname ) +void* KviGoAwayAction::tqqt_cast( const char* clname ) { if ( !qstrcmp( clname, "KviGoAwayAction" ) ) return this; - return KviKvsAction::qt_cast( clname ); + return KviKvsAction::tqqt_cast( clname ); } -bool KviGoAwayAction::qt_invoke( int _id, QUObject* _o ) +bool KviGoAwayAction::qt_invoke( int _id, TQUObject* _o ) { return KviKvsAction::qt_invoke(_id,_o); } -bool KviGoAwayAction::qt_emit( int _id, QUObject* _o ) +bool KviGoAwayAction::qt_emit( int _id, TQUObject* _o ) { return KviKvsAction::qt_emit(_id,_o); } -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES -bool KviGoAwayAction::qt_property( int id, int f, QVariant* v) +bool KviGoAwayAction::qt_property( int id, int f, TQVariant* v) { return KviKvsAction::qt_property( id, f, v); } -bool KviGoAwayAction::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; } -#endif // QT_NO_PROPERTIES +bool KviGoAwayAction::qt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; } +#endif // TQT_NO_PROPERTIES diff --git a/src/kvirc/kernel/moc_kvi_filetransfer.cpp b/src/kvirc/kernel/moc_kvi_filetransfer.cpp index b395379f..346beea3 100644 --- a/src/kvirc/kernel/moc_kvi_filetransfer.cpp +++ b/src/kvirc/kernel/moc_kvi_filetransfer.cpp @@ -2,21 +2,21 @@ ** KviFileTransferManager meta object code from reading C++ file 'kvi_filetransfer.h' ** ** Created: Mon Feb 25 00:11:45 2008 -** by: The Qt MOC ($Id: qt/moc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) +** by: The TQt TQMOC ($Id: qt/tqmoc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ -#undef QT_NO_COMPAT +#undef TQT_NO_COMPAT #include "kvi_filetransfer.h" -#include -#include - -#include -#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26) -#error "This file was generated using the moc from 3.3.8. It" -#error "cannot be used with the include files from this version of Qt." -#error "(The moc has changed too much.)" +#include +#include + +#include +#if !defined(TQ_TQMOC_OUTPUT_REVISION) || (TQ_TQMOC_OUTPUT_REVISION != 26) +#error "This file was generated using the tqmoc from 3.3.8. It" +#error "cannot be used with the include files from this version of TQt." +#error "(The tqmoc has changed too much.)" #endif const char *KviFileTransferManager::className() const @@ -24,119 +24,119 @@ const char *KviFileTransferManager::className() const return "KviFileTransferManager"; } -QMetaObject *KviFileTransferManager::metaObj = 0; -static QMetaObjectCleanUp cleanUp_KviFileTransferManager( "KviFileTransferManager", &KviFileTransferManager::staticMetaObject ); +TQMetaObject *KviFileTransferManager::metaObj = 0; +static TQMetaObjectCleanUp cleanUp_KviFileTransferManager( "KviFileTransferManager", &KviFileTransferManager::staticMetaObject ); -#ifndef QT_NO_TRANSLATION -QString KviFileTransferManager::tr( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION +TQString KviFileTransferManager::tr( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviFileTransferManager", s, c, QApplication::DefaultCodec ); + if ( tqApp ) + return tqApp->translate( "KviFileTransferManager", s, c, TQApplication::DefaultCodec ); else - return QString::fromLatin1( s ); + return TQString::tqfromLatin1( s ); } -#ifndef QT_NO_TRANSLATION_UTF8 -QString KviFileTransferManager::trUtf8( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION_UTF8 +TQString KviFileTransferManager::trUtf8( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviFileTransferManager", s, c, QApplication::UnicodeUTF8 ); + if ( tqApp ) + return tqApp->translate( "KviFileTransferManager", s, c, TQApplication::UnicodeUTF8 ); else - return QString::fromUtf8( s ); + return TQString::fromUtf8( s ); } -#endif // QT_NO_TRANSLATION_UTF8 +#endif // TQT_NO_TRANSLATION_UTF8 -#endif // QT_NO_TRANSLATION +#endif // TQT_NO_TRANSLATION -QMetaObject* KviFileTransferManager::staticMetaObject() +TQMetaObject* KviFileTransferManager::staticMetaObject() { if ( metaObj ) return metaObj; - QMetaObject* parentObject = QObject::staticMetaObject(); - static const QUParameter param_signal_0[] = { - { "t", &static_QUType_ptr, "KviFileTransfer", QUParameter::In } + TQMetaObject* tqparentObject = TQObject::staticMetaObject(); + static const TQUParameter param_signal_0[] = { + { "t", &static_TQUType_ptr, "KviFileTransfer", TQUParameter::In } }; - static const QUMethod signal_0 = {"transferRegistered", 1, param_signal_0 }; - static const QUParameter param_signal_1[] = { - { "t", &static_QUType_ptr, "KviFileTransfer", QUParameter::In } + static const TQUMethod signal_0 = {"transferRegistered", 1, param_signal_0 }; + static const TQUParameter param_signal_1[] = { + { "t", &static_TQUType_ptr, "KviFileTransfer", TQUParameter::In } }; - static const QUMethod signal_1 = {"transferUnregistering", 1, param_signal_1 }; - static const QMetaData signal_tbl[] = { - { "transferRegistered(KviFileTransfer*)", &signal_0, QMetaData::Public }, - { "transferUnregistering(KviFileTransfer*)", &signal_1, QMetaData::Public } + static const TQUMethod signal_1 = {"transferUnregistering", 1, param_signal_1 }; + static const TQMetaData signal_tbl[] = { + { "transferRegistered(KviFileTransfer*)", &signal_0, TQMetaData::Public }, + { "transferUnregistering(KviFileTransfer*)", &signal_1, TQMetaData::Public } }; - metaObj = QMetaObject::new_metaobject( - "KviFileTransferManager", parentObject, + metaObj = TQMetaObject::new_metaobject( + "KviFileTransferManager", tqparentObject, 0, 0, signal_tbl, 2, -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES 0, 0, 0, 0, -#endif // QT_NO_PROPERTIES +#endif // TQT_NO_PROPERTIES 0, 0 ); cleanUp_KviFileTransferManager.setMetaObject( metaObj ); return metaObj; } -void* KviFileTransferManager::qt_cast( const char* clname ) +void* KviFileTransferManager::tqqt_cast( const char* clname ) { if ( !qstrcmp( clname, "KviFileTransferManager" ) ) return this; - return QObject::qt_cast( clname ); + return TQObject::tqqt_cast( clname ); } -#include -#include +#include +#include -// SIGNAL transferRegistered +// TQT_SIGNAL transferRegistered void KviFileTransferManager::transferRegistered( KviFileTransfer* t0 ) { if ( signalsBlocked() ) return; - QConnectionList *clist = receivers( staticMetaObject()->signalOffset() + 0 ); + TQConnectionList *clist = tqreceivers( staticMetaObject()->signalOffset() + 0 ); if ( !clist ) return; - QUObject o[2]; - static_QUType_ptr.set(o+1,t0); + TQUObject o[2]; + static_TQUType_ptr.set(o+1,t0); activate_signal( clist, o ); } -// SIGNAL transferUnregistering +// TQT_SIGNAL transferUnregistering void KviFileTransferManager::transferUnregistering( KviFileTransfer* t0 ) { if ( signalsBlocked() ) return; - QConnectionList *clist = receivers( staticMetaObject()->signalOffset() + 1 ); + TQConnectionList *clist = tqreceivers( staticMetaObject()->signalOffset() + 1 ); if ( !clist ) return; - QUObject o[2]; - static_QUType_ptr.set(o+1,t0); + TQUObject o[2]; + static_TQUType_ptr.set(o+1,t0); activate_signal( clist, o ); } -bool KviFileTransferManager::qt_invoke( int _id, QUObject* _o ) +bool KviFileTransferManager::qt_invoke( int _id, TQUObject* _o ) { - return QObject::qt_invoke(_id,_o); + return TQObject::qt_invoke(_id,_o); } -bool KviFileTransferManager::qt_emit( int _id, QUObject* _o ) +bool KviFileTransferManager::qt_emit( int _id, TQUObject* _o ) { switch ( _id - staticMetaObject()->signalOffset() ) { - case 0: transferRegistered((KviFileTransfer*)static_QUType_ptr.get(_o+1)); break; - case 1: transferUnregistering((KviFileTransfer*)static_QUType_ptr.get(_o+1)); break; + case 0: transferRegistered((KviFileTransfer*)static_TQUType_ptr.get(_o+1)); break; + case 1: transferUnregistering((KviFileTransfer*)static_TQUType_ptr.get(_o+1)); break; default: - return QObject::qt_emit(_id,_o); + return TQObject::qt_emit(_id,_o); } return TRUE; } -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES -bool KviFileTransferManager::qt_property( int id, int f, QVariant* v) +bool KviFileTransferManager::qt_property( int id, int f, TQVariant* v) { - return QObject::qt_property( id, f, v); + return TQObject::qt_property( id, f, v); } -bool KviFileTransferManager::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; } -#endif // QT_NO_PROPERTIES +bool KviFileTransferManager::qt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; } +#endif // TQT_NO_PROPERTIES const char *KviFileTransfer::className() const @@ -144,69 +144,69 @@ const char *KviFileTransfer::className() const return "KviFileTransfer"; } -QMetaObject *KviFileTransfer::metaObj = 0; -static QMetaObjectCleanUp cleanUp_KviFileTransfer( "KviFileTransfer", &KviFileTransfer::staticMetaObject ); +TQMetaObject *KviFileTransfer::metaObj = 0; +static TQMetaObjectCleanUp cleanUp_KviFileTransfer( "KviFileTransfer", &KviFileTransfer::staticMetaObject ); -#ifndef QT_NO_TRANSLATION -QString KviFileTransfer::tr( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION +TQString KviFileTransfer::tr( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviFileTransfer", s, c, QApplication::DefaultCodec ); + if ( tqApp ) + return tqApp->translate( "KviFileTransfer", s, c, TQApplication::DefaultCodec ); else - return QString::fromLatin1( s ); + return TQString::tqfromLatin1( s ); } -#ifndef QT_NO_TRANSLATION_UTF8 -QString KviFileTransfer::trUtf8( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION_UTF8 +TQString KviFileTransfer::trUtf8( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviFileTransfer", s, c, QApplication::UnicodeUTF8 ); + if ( tqApp ) + return tqApp->translate( "KviFileTransfer", s, c, TQApplication::UnicodeUTF8 ); else - return QString::fromUtf8( s ); + return TQString::fromUtf8( s ); } -#endif // QT_NO_TRANSLATION_UTF8 +#endif // TQT_NO_TRANSLATION_UTF8 -#endif // QT_NO_TRANSLATION +#endif // TQT_NO_TRANSLATION -QMetaObject* KviFileTransfer::staticMetaObject() +TQMetaObject* KviFileTransfer::staticMetaObject() { if ( metaObj ) return metaObj; - QMetaObject* parentObject = QObject::staticMetaObject(); - metaObj = QMetaObject::new_metaobject( - "KviFileTransfer", parentObject, + TQMetaObject* tqparentObject = TQObject::staticMetaObject(); + metaObj = TQMetaObject::new_metaobject( + "KviFileTransfer", tqparentObject, 0, 0, 0, 0, -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES 0, 0, 0, 0, -#endif // QT_NO_PROPERTIES +#endif // TQT_NO_PROPERTIES 0, 0 ); cleanUp_KviFileTransfer.setMetaObject( metaObj ); return metaObj; } -void* KviFileTransfer::qt_cast( const char* clname ) +void* KviFileTransfer::tqqt_cast( const char* clname ) { if ( !qstrcmp( clname, "KviFileTransfer" ) ) return this; - return QObject::qt_cast( clname ); + return TQObject::tqqt_cast( clname ); } -bool KviFileTransfer::qt_invoke( int _id, QUObject* _o ) +bool KviFileTransfer::qt_invoke( int _id, TQUObject* _o ) { - return QObject::qt_invoke(_id,_o); + return TQObject::qt_invoke(_id,_o); } -bool KviFileTransfer::qt_emit( int _id, QUObject* _o ) +bool KviFileTransfer::qt_emit( int _id, TQUObject* _o ) { - return QObject::qt_emit(_id,_o); + return TQObject::qt_emit(_id,_o); } -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES -bool KviFileTransfer::qt_property( int id, int f, QVariant* v) +bool KviFileTransfer::qt_property( int id, int f, TQVariant* v) { - return QObject::qt_property( id, f, v); + return TQObject::qt_property( id, f, v); } -bool KviFileTransfer::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; } -#endif // QT_NO_PROPERTIES +bool KviFileTransfer::qt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; } +#endif // TQT_NO_PROPERTIES diff --git a/src/kvirc/kernel/moc_kvi_ircconnection.cpp b/src/kvirc/kernel/moc_kvi_ircconnection.cpp index dbe025a5..4e646655 100644 --- a/src/kvirc/kernel/moc_kvi_ircconnection.cpp +++ b/src/kvirc/kernel/moc_kvi_ircconnection.cpp @@ -2,21 +2,21 @@ ** KviIrcConnection meta object code from reading C++ file 'kvi_ircconnection.h' ** ** Created: Mon Feb 25 00:11:48 2008 -** by: The Qt MOC ($Id: qt/moc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) +** by: The TQt TQMOC ($Id: qt/tqmoc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ -#undef QT_NO_COMPAT +#undef TQT_NO_COMPAT #include "kvi_ircconnection.h" -#include -#include - -#include -#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26) -#error "This file was generated using the moc from 3.3.8. It" -#error "cannot be used with the include files from this version of Qt." -#error "(The moc has changed too much.)" +#include +#include + +#include +#if !defined(TQ_TQMOC_OUTPUT_REVISION) || (TQ_TQMOC_OUTPUT_REVISION != 26) +#error "This file was generated using the tqmoc from 3.3.8. It" +#error "cannot be used with the include files from this version of TQt." +#error "(The tqmoc has changed too much.)" #endif const char *KviIrcConnection::className() const @@ -24,145 +24,145 @@ const char *KviIrcConnection::className() const return "KviIrcConnection"; } -QMetaObject *KviIrcConnection::metaObj = 0; -static QMetaObjectCleanUp cleanUp_KviIrcConnection( "KviIrcConnection", &KviIrcConnection::staticMetaObject ); +TQMetaObject *KviIrcConnection::metaObj = 0; +static TQMetaObjectCleanUp cleanUp_KviIrcConnection( "KviIrcConnection", &KviIrcConnection::staticMetaObject ); -#ifndef QT_NO_TRANSLATION -QString KviIrcConnection::tr( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION +TQString KviIrcConnection::tr( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviIrcConnection", s, c, QApplication::DefaultCodec ); + if ( tqApp ) + return tqApp->translate( "KviIrcConnection", s, c, TQApplication::DefaultCodec ); else - return QString::fromLatin1( s ); + return TQString::tqfromLatin1( s ); } -#ifndef QT_NO_TRANSLATION_UTF8 -QString KviIrcConnection::trUtf8( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION_UTF8 +TQString KviIrcConnection::trUtf8( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviIrcConnection", s, c, QApplication::UnicodeUTF8 ); + if ( tqApp ) + return tqApp->translate( "KviIrcConnection", s, c, TQApplication::UnicodeUTF8 ); else - return QString::fromUtf8( s ); + return TQString::fromUtf8( s ); } -#endif // QT_NO_TRANSLATION_UTF8 +#endif // TQT_NO_TRANSLATION_UTF8 -#endif // QT_NO_TRANSLATION +#endif // TQT_NO_TRANSLATION -QMetaObject* KviIrcConnection::staticMetaObject() +TQMetaObject* KviIrcConnection::staticMetaObject() { if ( metaObj ) return metaObj; - QMetaObject* parentObject = QObject::staticMetaObject(); - static const QUMethod slot_0 = {"partAllChannels", 0, 0 }; - static const QUMethod slot_1 = {"unhighlightAllChannels", 0, 0 }; - static const QUMethod slot_2 = {"unhighlightAllQueries", 0, 0 }; - static const QUMethod slot_3 = {"restartNotifyList", 0, 0 }; - static const QUMethod slot_4 = {"closeAllQueries", 0, 0 }; - static const QUParameter param_slot_5[] = { - { "pDns", &static_QUType_ptr, "KviDns", QUParameter::In } + TQMetaObject* tqparentObject = TQObject::staticMetaObject(); + static const TQUMethod slot_0 = {"partAllChannels", 0, 0 }; + static const TQUMethod slot_1 = {"unhighlightAllChannels", 0, 0 }; + static const TQUMethod slot_2 = {"unhighlightAllQueries", 0, 0 }; + static const TQUMethod slot_3 = {"restartNotifyList", 0, 0 }; + static const TQUMethod slot_4 = {"closeAllQueries", 0, 0 }; + static const TQUParameter param_slot_5[] = { + { "pDns", &static_TQUType_ptr, "KviDns", TQUParameter::In } }; - static const QUMethod slot_5 = {"hostNameLookupTerminated", 1, param_slot_5 }; - static const QMetaData slot_tbl[] = { - { "partAllChannels()", &slot_0, QMetaData::Public }, - { "unhighlightAllChannels()", &slot_1, QMetaData::Public }, - { "unhighlightAllQueries()", &slot_2, QMetaData::Public }, - { "restartNotifyList()", &slot_3, QMetaData::Public }, - { "closeAllQueries()", &slot_4, QMetaData::Public }, - { "hostNameLookupTerminated(KviDns*)", &slot_5, QMetaData::Private } + static const TQUMethod slot_5 = {"hostNameLookupTerminated", 1, param_slot_5 }; + static const TQMetaData slot_tbl[] = { + { "partAllChannels()", &slot_0, TQMetaData::Public }, + { "unhighlightAllChannels()", &slot_1, TQMetaData::Public }, + { "unhighlightAllQueries()", &slot_2, TQMetaData::Public }, + { "restartNotifyList()", &slot_3, TQMetaData::Public }, + { "closeAllQueries()", &slot_4, TQMetaData::Public }, + { "hostNameLookupTerminated(KviDns*)", &slot_5, TQMetaData::Private } }; - static const QUMethod signal_0 = {"awayStateChanged", 0, 0 }; - static const QUMethod signal_1 = {"userModeChanged", 0, 0 }; - static const QUMethod signal_2 = {"nickNameChanged", 0, 0 }; - static const QUParameter param_signal_3[] = { - { 0, &static_QUType_ptr, "KviChannel", QUParameter::In } + static const TQUMethod signal_0 = {"awayStateChanged", 0, 0 }; + static const TQUMethod signal_1 = {"userModeChanged", 0, 0 }; + static const TQUMethod signal_2 = {"nickNameChanged", 0, 0 }; + static const TQUParameter param_signal_3[] = { + { 0, &static_TQUType_ptr, "KviChannel", TQUParameter::In } }; - static const QUMethod signal_3 = {"channelRegistered", 1, param_signal_3 }; - static const QUParameter param_signal_4[] = { - { 0, &static_QUType_ptr, "KviChannel", QUParameter::In } + static const TQUMethod signal_3 = {"channelRegistered", 1, param_signal_3 }; + static const TQUParameter param_signal_4[] = { + { 0, &static_TQUType_ptr, "KviChannel", TQUParameter::In } }; - static const QUMethod signal_4 = {"channelUnregistered", 1, param_signal_4 }; - static const QUMethod signal_5 = {"chanListChanged", 0, 0 }; - static const QMetaData signal_tbl[] = { - { "awayStateChanged()", &signal_0, QMetaData::Public }, - { "userModeChanged()", &signal_1, QMetaData::Public }, - { "nickNameChanged()", &signal_2, QMetaData::Public }, - { "channelRegistered(KviChannel*)", &signal_3, QMetaData::Public }, - { "channelUnregistered(KviChannel*)", &signal_4, QMetaData::Public }, - { "chanListChanged()", &signal_5, QMetaData::Public } + static const TQUMethod signal_4 = {"channelUnregistered", 1, param_signal_4 }; + static const TQUMethod signal_5 = {"chanListChanged", 0, 0 }; + static const TQMetaData signal_tbl[] = { + { "awayStateChanged()", &signal_0, TQMetaData::Public }, + { "userModeChanged()", &signal_1, TQMetaData::Public }, + { "nickNameChanged()", &signal_2, TQMetaData::Public }, + { "channelRegistered(KviChannel*)", &signal_3, TQMetaData::Public }, + { "channelUnregistered(KviChannel*)", &signal_4, TQMetaData::Public }, + { "chanListChanged()", &signal_5, TQMetaData::Public } }; - metaObj = QMetaObject::new_metaobject( - "KviIrcConnection", parentObject, + metaObj = TQMetaObject::new_metaobject( + "KviIrcConnection", tqparentObject, slot_tbl, 6, signal_tbl, 6, -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES 0, 0, 0, 0, -#endif // QT_NO_PROPERTIES +#endif // TQT_NO_PROPERTIES 0, 0 ); cleanUp_KviIrcConnection.setMetaObject( metaObj ); return metaObj; } -void* KviIrcConnection::qt_cast( const char* clname ) +void* KviIrcConnection::tqqt_cast( const char* clname ) { if ( !qstrcmp( clname, "KviIrcConnection" ) ) return this; - return QObject::qt_cast( clname ); + return TQObject::tqqt_cast( clname ); } -// SIGNAL awayStateChanged +// TQT_SIGNAL awayStateChanged void KviIrcConnection::awayStateChanged() { activate_signal( staticMetaObject()->signalOffset() + 0 ); } -// SIGNAL userModeChanged +// TQT_SIGNAL userModeChanged void KviIrcConnection::userModeChanged() { activate_signal( staticMetaObject()->signalOffset() + 1 ); } -// SIGNAL nickNameChanged +// TQT_SIGNAL nickNameChanged void KviIrcConnection::nickNameChanged() { activate_signal( staticMetaObject()->signalOffset() + 2 ); } -#include -#include +#include +#include -// SIGNAL channelRegistered +// TQT_SIGNAL channelRegistered void KviIrcConnection::channelRegistered( KviChannel* t0 ) { if ( signalsBlocked() ) return; - QConnectionList *clist = receivers( staticMetaObject()->signalOffset() + 3 ); + TQConnectionList *clist = tqreceivers( staticMetaObject()->signalOffset() + 3 ); if ( !clist ) return; - QUObject o[2]; - static_QUType_ptr.set(o+1,t0); + TQUObject o[2]; + static_TQUType_ptr.set(o+1,t0); activate_signal( clist, o ); } -// SIGNAL channelUnregistered +// TQT_SIGNAL channelUnregistered void KviIrcConnection::channelUnregistered( KviChannel* t0 ) { if ( signalsBlocked() ) return; - QConnectionList *clist = receivers( staticMetaObject()->signalOffset() + 4 ); + TQConnectionList *clist = tqreceivers( staticMetaObject()->signalOffset() + 4 ); if ( !clist ) return; - QUObject o[2]; - static_QUType_ptr.set(o+1,t0); + TQUObject o[2]; + static_TQUType_ptr.set(o+1,t0); activate_signal( clist, o ); } -// SIGNAL chanListChanged +// TQT_SIGNAL chanListChanged void KviIrcConnection::chanListChanged() { activate_signal( staticMetaObject()->signalOffset() + 5 ); } -bool KviIrcConnection::qt_invoke( int _id, QUObject* _o ) +bool KviIrcConnection::qt_invoke( int _id, TQUObject* _o ) { switch ( _id - staticMetaObject()->slotOffset() ) { case 0: partAllChannels(); break; @@ -170,33 +170,33 @@ bool KviIrcConnection::qt_invoke( int _id, QUObject* _o ) case 2: unhighlightAllQueries(); break; case 3: restartNotifyList(); break; case 4: closeAllQueries(); break; - case 5: hostNameLookupTerminated((KviDns*)static_QUType_ptr.get(_o+1)); break; + case 5: hostNameLookupTerminated((KviDns*)static_TQUType_ptr.get(_o+1)); break; default: - return QObject::qt_invoke( _id, _o ); + return TQObject::qt_invoke( _id, _o ); } return TRUE; } -bool KviIrcConnection::qt_emit( int _id, QUObject* _o ) +bool KviIrcConnection::qt_emit( int _id, TQUObject* _o ) { switch ( _id - staticMetaObject()->signalOffset() ) { case 0: awayStateChanged(); break; case 1: userModeChanged(); break; case 2: nickNameChanged(); break; - case 3: channelRegistered((KviChannel*)static_QUType_ptr.get(_o+1)); break; - case 4: channelUnregistered((KviChannel*)static_QUType_ptr.get(_o+1)); break; + case 3: channelRegistered((KviChannel*)static_TQUType_ptr.get(_o+1)); break; + case 4: channelUnregistered((KviChannel*)static_TQUType_ptr.get(_o+1)); break; case 5: chanListChanged(); break; default: - return QObject::qt_emit(_id,_o); + return TQObject::qt_emit(_id,_o); } return TRUE; } -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES -bool KviIrcConnection::qt_property( int id, int f, QVariant* v) +bool KviIrcConnection::qt_property( int id, int f, TQVariant* v) { - return QObject::qt_property( id, f, v); + return TQObject::qt_property( id, f, v); } -bool KviIrcConnection::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; } -#endif // QT_NO_PROPERTIES +bool KviIrcConnection::qt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; } +#endif // TQT_NO_PROPERTIES diff --git a/src/kvirc/kernel/moc_kvi_ircconnectiontargetresolver.cpp b/src/kvirc/kernel/moc_kvi_ircconnectiontargetresolver.cpp index 89aa1bc6..85774715 100644 --- a/src/kvirc/kernel/moc_kvi_ircconnectiontargetresolver.cpp +++ b/src/kvirc/kernel/moc_kvi_ircconnectiontargetresolver.cpp @@ -2,21 +2,21 @@ ** KviIrcConnectionTargetResolver meta object code from reading C++ file 'kvi_ircconnectiontargetresolver.h' ** ** Created: Mon Feb 25 00:11:55 2008 -** by: The Qt MOC ($Id: qt/moc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) +** by: The TQt TQMOC ($Id: qt/tqmoc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ -#undef QT_NO_COMPAT +#undef TQT_NO_COMPAT #include "kvi_ircconnectiontargetresolver.h" -#include -#include +#include +#include -#include -#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26) -#error "This file was generated using the moc from 3.3.8. It" -#error "cannot be used with the include files from this version of Qt." -#error "(The moc has changed too much.)" +#include +#if !defined(TQ_TQMOC_OUTPUT_REVISION) || (TQ_TQMOC_OUTPUT_REVISION != 26) +#error "This file was generated using the tqmoc from 3.3.8. It" +#error "cannot be used with the include files from this version of TQt." +#error "(The tqmoc has changed too much.)" #endif const char *KviIrcConnectionTargetResolver::className() const @@ -24,105 +24,105 @@ const char *KviIrcConnectionTargetResolver::className() const return "KviIrcConnectionTargetResolver"; } -QMetaObject *KviIrcConnectionTargetResolver::metaObj = 0; -static QMetaObjectCleanUp cleanUp_KviIrcConnectionTargetResolver( "KviIrcConnectionTargetResolver", &KviIrcConnectionTargetResolver::staticMetaObject ); +TQMetaObject *KviIrcConnectionTargetResolver::metaObj = 0; +static TQMetaObjectCleanUp cleanUp_KviIrcConnectionTargetResolver( "KviIrcConnectionTargetResolver", &KviIrcConnectionTargetResolver::staticMetaObject ); -#ifndef QT_NO_TRANSLATION -QString KviIrcConnectionTargetResolver::tr( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION +TQString KviIrcConnectionTargetResolver::tr( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviIrcConnectionTargetResolver", s, c, QApplication::DefaultCodec ); + if ( tqApp ) + return tqApp->translate( "KviIrcConnectionTargetResolver", s, c, TQApplication::DefaultCodec ); else - return QString::fromLatin1( s ); + return TQString::tqfromLatin1( s ); } -#ifndef QT_NO_TRANSLATION_UTF8 -QString KviIrcConnectionTargetResolver::trUtf8( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION_UTF8 +TQString KviIrcConnectionTargetResolver::trUtf8( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviIrcConnectionTargetResolver", s, c, QApplication::UnicodeUTF8 ); + if ( tqApp ) + return tqApp->translate( "KviIrcConnectionTargetResolver", s, c, TQApplication::UnicodeUTF8 ); else - return QString::fromUtf8( s ); + return TQString::fromUtf8( s ); } -#endif // QT_NO_TRANSLATION_UTF8 +#endif // TQT_NO_TRANSLATION_UTF8 -#endif // QT_NO_TRANSLATION +#endif // TQT_NO_TRANSLATION -QMetaObject* KviIrcConnectionTargetResolver::staticMetaObject() +TQMetaObject* KviIrcConnectionTargetResolver::staticMetaObject() { if ( metaObj ) return metaObj; - QMetaObject* parentObject = QObject::staticMetaObject(); - static const QUMethod slot_0 = {"asyncStartResolve", 0, 0 }; - static const QUParameter param_slot_1[] = { - { 0, &static_QUType_ptr, "KviDns", QUParameter::In } + TQMetaObject* tqparentObject = TQObject::staticMetaObject(); + static const TQUMethod slot_0 = {"asyncStartResolve", 0, 0 }; + static const TQUParameter param_slot_1[] = { + { 0, &static_TQUType_ptr, "KviDns", TQUParameter::In } }; - static const QUMethod slot_1 = {"serverLookupTerminated", 1, param_slot_1 }; - static const QUParameter param_slot_2[] = { - { 0, &static_QUType_ptr, "KviDns", QUParameter::In } + static const TQUMethod slot_1 = {"serverLookupTerminated", 1, param_slot_1 }; + static const TQUParameter param_slot_2[] = { + { 0, &static_TQUType_ptr, "KviDns", TQUParameter::In } }; - static const QUMethod slot_2 = {"proxyLookupTerminated", 1, param_slot_2 }; - static const QMetaData slot_tbl[] = { - { "asyncStartResolve()", &slot_0, QMetaData::Protected }, - { "serverLookupTerminated(KviDns*)", &slot_1, QMetaData::Protected }, - { "proxyLookupTerminated(KviDns*)", &slot_2, QMetaData::Protected } + static const TQUMethod slot_2 = {"proxyLookupTerminated", 1, param_slot_2 }; + static const TQMetaData slot_tbl[] = { + { "asyncStartResolve()", &slot_0, TQMetaData::Protected }, + { "serverLookupTerminated(KviDns*)", &slot_1, TQMetaData::Protected }, + { "proxyLookupTerminated(KviDns*)", &slot_2, TQMetaData::Protected } }; - static const QUMethod signal_0 = {"terminated", 0, 0 }; - static const QMetaData signal_tbl[] = { - { "terminated()", &signal_0, QMetaData::Private } + static const TQUMethod signal_0 = {"terminated", 0, 0 }; + static const TQMetaData signal_tbl[] = { + { "terminated()", &signal_0, TQMetaData::Private } }; - metaObj = QMetaObject::new_metaobject( - "KviIrcConnectionTargetResolver", parentObject, + metaObj = TQMetaObject::new_metaobject( + "KviIrcConnectionTargetResolver", tqparentObject, slot_tbl, 3, signal_tbl, 1, -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES 0, 0, 0, 0, -#endif // QT_NO_PROPERTIES +#endif // TQT_NO_PROPERTIES 0, 0 ); cleanUp_KviIrcConnectionTargetResolver.setMetaObject( metaObj ); return metaObj; } -void* KviIrcConnectionTargetResolver::qt_cast( const char* clname ) +void* KviIrcConnectionTargetResolver::tqqt_cast( const char* clname ) { if ( !qstrcmp( clname, "KviIrcConnectionTargetResolver" ) ) return this; - return QObject::qt_cast( clname ); + return TQObject::tqqt_cast( clname ); } -// SIGNAL terminated +// TQT_SIGNAL terminated void KviIrcConnectionTargetResolver::terminated() { activate_signal( staticMetaObject()->signalOffset() + 0 ); } -bool KviIrcConnectionTargetResolver::qt_invoke( int _id, QUObject* _o ) +bool KviIrcConnectionTargetResolver::qt_invoke( int _id, TQUObject* _o ) { switch ( _id - staticMetaObject()->slotOffset() ) { case 0: asyncStartResolve(); break; - case 1: serverLookupTerminated((KviDns*)static_QUType_ptr.get(_o+1)); break; - case 2: proxyLookupTerminated((KviDns*)static_QUType_ptr.get(_o+1)); break; + case 1: serverLookupTerminated((KviDns*)static_TQUType_ptr.get(_o+1)); break; + case 2: proxyLookupTerminated((KviDns*)static_TQUType_ptr.get(_o+1)); break; default: - return QObject::qt_invoke( _id, _o ); + return TQObject::qt_invoke( _id, _o ); } return TRUE; } -bool KviIrcConnectionTargetResolver::qt_emit( int _id, QUObject* _o ) +bool KviIrcConnectionTargetResolver::qt_emit( int _id, TQUObject* _o ) { switch ( _id - staticMetaObject()->signalOffset() ) { case 0: terminated(); break; default: - return QObject::qt_emit(_id,_o); + return TQObject::qt_emit(_id,_o); } return TRUE; } -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES -bool KviIrcConnectionTargetResolver::qt_property( int id, int f, QVariant* v) +bool KviIrcConnectionTargetResolver::qt_property( int id, int f, TQVariant* v) { - return QObject::qt_property( id, f, v); + return TQObject::qt_property( id, f, v); } -bool KviIrcConnectionTargetResolver::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; } -#endif // QT_NO_PROPERTIES +bool KviIrcConnectionTargetResolver::qt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; } +#endif // TQT_NO_PROPERTIES diff --git a/src/kvirc/kernel/moc_kvi_irccontext.cpp b/src/kvirc/kernel/moc_kvi_irccontext.cpp index 2319d11f..d7393066 100644 --- a/src/kvirc/kernel/moc_kvi_irccontext.cpp +++ b/src/kvirc/kernel/moc_kvi_irccontext.cpp @@ -2,21 +2,21 @@ ** KviIrcContext meta object code from reading C++ file 'kvi_irccontext.h' ** ** Created: Mon Feb 25 00:11:50 2008 -** by: The Qt MOC ($Id: qt/moc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) +** by: The TQt TQMOC ($Id: qt/tqmoc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ -#undef QT_NO_COMPAT +#undef TQT_NO_COMPAT #include "kvi_irccontext.h" -#include -#include +#include +#include -#include -#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26) -#error "This file was generated using the moc from 3.3.8. It" -#error "cannot be used with the include files from this version of Qt." -#error "(The moc has changed too much.)" +#include +#if !defined(TQ_TQMOC_OUTPUT_REVISION) || (TQ_TQMOC_OUTPUT_REVISION != 26) +#error "This file was generated using the tqmoc from 3.3.8. It" +#error "cannot be used with the include files from this version of TQt." +#error "(The tqmoc has changed too much.)" #endif const char *KviIrcContext::className() const @@ -24,96 +24,96 @@ const char *KviIrcContext::className() const return "KviIrcContext"; } -QMetaObject *KviIrcContext::metaObj = 0; -static QMetaObjectCleanUp cleanUp_KviIrcContext( "KviIrcContext", &KviIrcContext::staticMetaObject ); +TQMetaObject *KviIrcContext::metaObj = 0; +static TQMetaObjectCleanUp cleanUp_KviIrcContext( "KviIrcContext", &KviIrcContext::staticMetaObject ); -#ifndef QT_NO_TRANSLATION -QString KviIrcContext::tr( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION +TQString KviIrcContext::tr( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviIrcContext", s, c, QApplication::DefaultCodec ); + if ( tqApp ) + return tqApp->translate( "KviIrcContext", s, c, TQApplication::DefaultCodec ); else - return QString::fromLatin1( s ); + return TQString::tqfromLatin1( s ); } -#ifndef QT_NO_TRANSLATION_UTF8 -QString KviIrcContext::trUtf8( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION_UTF8 +TQString KviIrcContext::trUtf8( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviIrcContext", s, c, QApplication::UnicodeUTF8 ); + if ( tqApp ) + return tqApp->translate( "KviIrcContext", s, c, TQApplication::UnicodeUTF8 ); else - return QString::fromUtf8( s ); + return TQString::fromUtf8( s ); } -#endif // QT_NO_TRANSLATION_UTF8 +#endif // TQT_NO_TRANSLATION_UTF8 -#endif // QT_NO_TRANSLATION +#endif // TQT_NO_TRANSLATION -QMetaObject* KviIrcContext::staticMetaObject() +TQMetaObject* KviIrcContext::staticMetaObject() { if ( metaObj ) return metaObj; - QMetaObject* parentObject = QObject::staticMetaObject(); - static const QUMethod slot_0 = {"asynchronousConnect", 0, 0 }; - static const QUMethod slot_1 = {"unhighlightAllWindows", 0, 0 }; - static const QMetaData slot_tbl[] = { - { "asynchronousConnect()", &slot_0, QMetaData::Protected }, - { "unhighlightAllWindows()", &slot_1, QMetaData::Protected } + TQMetaObject* tqparentObject = TQObject::staticMetaObject(); + static const TQUMethod slot_0 = {"asynchronousConnect", 0, 0 }; + static const TQUMethod slot_1 = {"unhighlightAllWindows", 0, 0 }; + static const TQMetaData slot_tbl[] = { + { "asynchronousConnect()", &slot_0, TQMetaData::Protected }, + { "unhighlightAllWindows()", &slot_1, TQMetaData::Protected } }; - static const QUMethod signal_0 = {"stateChanged", 0, 0 }; - static const QMetaData signal_tbl[] = { - { "stateChanged()", &signal_0, QMetaData::Protected } + static const TQUMethod signal_0 = {"stateChanged", 0, 0 }; + static const TQMetaData signal_tbl[] = { + { "stateChanged()", &signal_0, TQMetaData::Protected } }; - metaObj = QMetaObject::new_metaobject( - "KviIrcContext", parentObject, + metaObj = TQMetaObject::new_metaobject( + "KviIrcContext", tqparentObject, slot_tbl, 2, signal_tbl, 1, -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES 0, 0, 0, 0, -#endif // QT_NO_PROPERTIES +#endif // TQT_NO_PROPERTIES 0, 0 ); cleanUp_KviIrcContext.setMetaObject( metaObj ); return metaObj; } -void* KviIrcContext::qt_cast( const char* clname ) +void* KviIrcContext::tqqt_cast( const char* clname ) { if ( !qstrcmp( clname, "KviIrcContext" ) ) return this; - return QObject::qt_cast( clname ); + return TQObject::tqqt_cast( clname ); } -// SIGNAL stateChanged +// TQT_SIGNAL stateChanged void KviIrcContext::stateChanged() { activate_signal( staticMetaObject()->signalOffset() + 0 ); } -bool KviIrcContext::qt_invoke( int _id, QUObject* _o ) +bool KviIrcContext::qt_invoke( int _id, TQUObject* _o ) { switch ( _id - staticMetaObject()->slotOffset() ) { case 0: asynchronousConnect(); break; case 1: unhighlightAllWindows(); break; default: - return QObject::qt_invoke( _id, _o ); + return TQObject::qt_invoke( _id, _o ); } return TRUE; } -bool KviIrcContext::qt_emit( int _id, QUObject* _o ) +bool KviIrcContext::qt_emit( int _id, TQUObject* _o ) { switch ( _id - staticMetaObject()->signalOffset() ) { case 0: stateChanged(); break; default: - return QObject::qt_emit(_id,_o); + return TQObject::qt_emit(_id,_o); } return TRUE; } -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES -bool KviIrcContext::qt_property( int id, int f, QVariant* v) +bool KviIrcContext::qt_property( int id, int f, TQVariant* v) { - return QObject::qt_property( id, f, v); + return TQObject::qt_property( id, f, v); } -bool KviIrcContext::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; } -#endif // QT_NO_PROPERTIES +bool KviIrcContext::qt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; } +#endif // TQT_NO_PROPERTIES diff --git a/src/kvirc/kernel/moc_kvi_irclink.cpp b/src/kvirc/kernel/moc_kvi_irclink.cpp index 1bf804e4..c686359d 100644 --- a/src/kvirc/kernel/moc_kvi_irclink.cpp +++ b/src/kvirc/kernel/moc_kvi_irclink.cpp @@ -2,21 +2,21 @@ ** KviIrcLink meta object code from reading C++ file 'kvi_irclink.h' ** ** Created: Mon Feb 25 00:11:51 2008 -** by: The Qt MOC ($Id: qt/moc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) +** by: The TQt TQMOC ($Id: qt/tqmoc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ -#undef QT_NO_COMPAT +#undef TQT_NO_COMPAT #include "kvi_irclink.h" -#include -#include +#include +#include -#include -#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26) -#error "This file was generated using the moc from 3.3.8. It" -#error "cannot be used with the include files from this version of Qt." -#error "(The moc has changed too much.)" +#include +#if !defined(TQ_TQMOC_OUTPUT_REVISION) || (TQ_TQMOC_OUTPUT_REVISION != 26) +#error "This file was generated using the tqmoc from 3.3.8. It" +#error "cannot be used with the include files from this version of TQt." +#error "(The tqmoc has changed too much.)" #endif const char *KviIrcLink::className() const @@ -24,96 +24,96 @@ const char *KviIrcLink::className() const return "KviIrcLink"; } -QMetaObject *KviIrcLink::metaObj = 0; -static QMetaObjectCleanUp cleanUp_KviIrcLink( "KviIrcLink", &KviIrcLink::staticMetaObject ); +TQMetaObject *KviIrcLink::metaObj = 0; +static TQMetaObjectCleanUp cleanUp_KviIrcLink( "KviIrcLink", &KviIrcLink::staticMetaObject ); -#ifndef QT_NO_TRANSLATION -QString KviIrcLink::tr( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION +TQString KviIrcLink::tr( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviIrcLink", s, c, QApplication::DefaultCodec ); + if ( tqApp ) + return tqApp->translate( "KviIrcLink", s, c, TQApplication::DefaultCodec ); else - return QString::fromLatin1( s ); + return TQString::tqfromLatin1( s ); } -#ifndef QT_NO_TRANSLATION_UTF8 -QString KviIrcLink::trUtf8( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION_UTF8 +TQString KviIrcLink::trUtf8( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviIrcLink", s, c, QApplication::UnicodeUTF8 ); + if ( tqApp ) + return tqApp->translate( "KviIrcLink", s, c, TQApplication::UnicodeUTF8 ); else - return QString::fromUtf8( s ); + return TQString::fromUtf8( s ); } -#endif // QT_NO_TRANSLATION_UTF8 +#endif // TQT_NO_TRANSLATION_UTF8 -#endif // QT_NO_TRANSLATION +#endif // TQT_NO_TRANSLATION -QMetaObject* KviIrcLink::staticMetaObject() +TQMetaObject* KviIrcLink::staticMetaObject() { if ( metaObj ) return metaObj; - QMetaObject* parentObject = QObject::staticMetaObject(); - static const QUMethod slot_0 = {"linkFilterDestroyed", 0, 0 }; - static const QUMethod slot_1 = {"resolverTerminated", 0, 0 }; - static const QMetaData slot_tbl[] = { - { "linkFilterDestroyed()", &slot_0, QMetaData::Protected }, - { "resolverTerminated()", &slot_1, QMetaData::Private } + TQMetaObject* tqparentObject = TQObject::staticMetaObject(); + static const TQUMethod slot_0 = {"linkFilterDestroyed", 0, 0 }; + static const TQUMethod slot_1 = {"resolverTerminated", 0, 0 }; + static const TQMetaData slot_tbl[] = { + { "linkFilterDestroyed()", &slot_0, TQMetaData::Protected }, + { "resolverTerminated()", &slot_1, TQMetaData::Private } }; - static const QUMethod signal_0 = {"connectionFailed", 0, 0 }; - static const QMetaData signal_tbl[] = { - { "connectionFailed()", &signal_0, QMetaData::Private } + static const TQUMethod signal_0 = {"connectionFailed", 0, 0 }; + static const TQMetaData signal_tbl[] = { + { "connectionFailed()", &signal_0, TQMetaData::Private } }; - metaObj = QMetaObject::new_metaobject( - "KviIrcLink", parentObject, + metaObj = TQMetaObject::new_metaobject( + "KviIrcLink", tqparentObject, slot_tbl, 2, signal_tbl, 1, -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES 0, 0, 0, 0, -#endif // QT_NO_PROPERTIES +#endif // TQT_NO_PROPERTIES 0, 0 ); cleanUp_KviIrcLink.setMetaObject( metaObj ); return metaObj; } -void* KviIrcLink::qt_cast( const char* clname ) +void* KviIrcLink::tqqt_cast( const char* clname ) { if ( !qstrcmp( clname, "KviIrcLink" ) ) return this; - return QObject::qt_cast( clname ); + return TQObject::tqqt_cast( clname ); } -// SIGNAL connectionFailed +// TQT_SIGNAL connectionFailed void KviIrcLink::connectionFailed() { activate_signal( staticMetaObject()->signalOffset() + 0 ); } -bool KviIrcLink::qt_invoke( int _id, QUObject* _o ) +bool KviIrcLink::qt_invoke( int _id, TQUObject* _o ) { switch ( _id - staticMetaObject()->slotOffset() ) { case 0: linkFilterDestroyed(); break; case 1: resolverTerminated(); break; default: - return QObject::qt_invoke( _id, _o ); + return TQObject::qt_invoke( _id, _o ); } return TRUE; } -bool KviIrcLink::qt_emit( int _id, QUObject* _o ) +bool KviIrcLink::qt_emit( int _id, TQUObject* _o ) { switch ( _id - staticMetaObject()->signalOffset() ) { case 0: connectionFailed(); break; default: - return QObject::qt_emit(_id,_o); + return TQObject::qt_emit(_id,_o); } return TRUE; } -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES -bool KviIrcLink::qt_property( int id, int f, QVariant* v) +bool KviIrcLink::qt_property( int id, int f, TQVariant* v) { - return QObject::qt_property( id, f, v); + return TQObject::qt_property( id, f, v); } -bool KviIrcLink::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; } -#endif // QT_NO_PROPERTIES +bool KviIrcLink::qt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; } +#endif // TQT_NO_PROPERTIES diff --git a/src/kvirc/kernel/moc_kvi_ircsocket.cpp b/src/kvirc/kernel/moc_kvi_ircsocket.cpp index b4863f82..1b5c173d 100644 --- a/src/kvirc/kernel/moc_kvi_ircsocket.cpp +++ b/src/kvirc/kernel/moc_kvi_ircsocket.cpp @@ -2,21 +2,21 @@ ** KviIrcSocket meta object code from reading C++ file 'kvi_ircsocket.h' ** ** Created: Mon Feb 25 00:11:53 2008 -** by: The Qt MOC ($Id: qt/moc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) +** by: The TQt TQMOC ($Id: qt/tqmoc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ -#undef QT_NO_COMPAT +#undef TQT_NO_COMPAT #include "kvi_ircsocket.h" -#include -#include +#include +#include -#include -#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26) -#error "This file was generated using the moc from 3.3.8. It" -#error "cannot be used with the include files from this version of Qt." -#error "(The moc has changed too much.)" +#include +#if !defined(TQ_TQMOC_OUTPUT_REVISION) || (TQ_TQMOC_OUTPUT_REVISION != 26) +#error "This file was generated using the tqmoc from 3.3.8. It" +#error "cannot be used with the include files from this version of TQt." +#error "(The tqmoc has changed too much.)" #endif const char *KviIrcSocket::className() const @@ -24,111 +24,111 @@ const char *KviIrcSocket::className() const return "KviIrcSocket"; } -QMetaObject *KviIrcSocket::metaObj = 0; -static QMetaObjectCleanUp cleanUp_KviIrcSocket( "KviIrcSocket", &KviIrcSocket::staticMetaObject ); +TQMetaObject *KviIrcSocket::metaObj = 0; +static TQMetaObjectCleanUp cleanUp_KviIrcSocket( "KviIrcSocket", &KviIrcSocket::staticMetaObject ); -#ifndef QT_NO_TRANSLATION -QString KviIrcSocket::tr( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION +TQString KviIrcSocket::tr( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviIrcSocket", s, c, QApplication::DefaultCodec ); + if ( tqApp ) + return tqApp->translate( "KviIrcSocket", s, c, TQApplication::DefaultCodec ); else - return QString::fromLatin1( s ); + return TQString::tqfromLatin1( s ); } -#ifndef QT_NO_TRANSLATION_UTF8 -QString KviIrcSocket::trUtf8( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION_UTF8 +TQString KviIrcSocket::trUtf8( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviIrcSocket", s, c, QApplication::UnicodeUTF8 ); + if ( tqApp ) + return tqApp->translate( "KviIrcSocket", s, c, TQApplication::UnicodeUTF8 ); else - return QString::fromUtf8( s ); + return TQString::fromUtf8( s ); } -#endif // QT_NO_TRANSLATION_UTF8 +#endif // TQT_NO_TRANSLATION_UTF8 -#endif // QT_NO_TRANSLATION +#endif // TQT_NO_TRANSLATION -QMetaObject* KviIrcSocket::staticMetaObject() +TQMetaObject* KviIrcSocket::staticMetaObject() { if ( metaObj ) return metaObj; - QMetaObject* parentObject = QObject::staticMetaObject(); - static const QUMethod slot_0 = {"connectionTimedOut", 0, 0 }; - static const QUParameter param_slot_1[] = { - { 0, &static_QUType_int, 0, QUParameter::In } + TQMetaObject* tqparentObject = TQObject::staticMetaObject(); + static const TQUMethod slot_0 = {"connectionTimedOut", 0, 0 }; + static const TQUParameter param_slot_1[] = { + { 0, &static_TQUType_int, 0, TQUParameter::In } }; - static const QUMethod slot_1 = {"writeNotifierFired", 1, param_slot_1 }; - static const QUParameter param_slot_2[] = { - { 0, &static_QUType_int, 0, QUParameter::In } + static const TQUMethod slot_1 = {"writeNotifierFired", 1, param_slot_1 }; + static const TQUParameter param_slot_2[] = { + { 0, &static_TQUType_int, 0, TQUParameter::In } }; - static const QUMethod slot_2 = {"readData", 1, param_slot_2 }; - static const QUParameter param_slot_3[] = { - { 0, &static_QUType_int, 0, QUParameter::In } + static const TQUMethod slot_2 = {"readData", 1, param_slot_2 }; + static const TQUParameter param_slot_3[] = { + { 0, &static_TQUType_int, 0, TQUParameter::In } }; - static const QUMethod slot_3 = {"readProxyData", 1, param_slot_3 }; - static const QUParameter param_slot_4[] = { - { 0, &static_QUType_int, 0, QUParameter::In } + static const TQUMethod slot_3 = {"readProxyData", 1, param_slot_3 }; + static const TQUParameter param_slot_4[] = { + { 0, &static_TQUType_int, 0, TQUParameter::In } }; - static const QUMethod slot_4 = {"readHttpProxyErrorData", 1, param_slot_4 }; - static const QUMethod slot_5 = {"flushSendQueue", 0, 0 }; - static const QUParameter param_slot_6[] = { - { 0, &static_QUType_int, 0, QUParameter::In } + static const TQUMethod slot_4 = {"readHttpProxyErrorData", 1, param_slot_4 }; + static const TQUMethod slot_5 = {"flushSendQueue", 0, 0 }; + static const TQUParameter param_slot_6[] = { + { 0, &static_TQUType_int, 0, TQUParameter::In } }; - static const QUMethod slot_6 = {"doSSLHandshake", 1, param_slot_6 }; - static const QMetaData slot_tbl[] = { - { "connectionTimedOut()", &slot_0, QMetaData::Protected }, - { "writeNotifierFired(int)", &slot_1, QMetaData::Protected }, - { "readData(int)", &slot_2, QMetaData::Protected }, - { "readProxyData(int)", &slot_3, QMetaData::Protected }, - { "readHttpProxyErrorData(int)", &slot_4, QMetaData::Protected }, - { "flushSendQueue()", &slot_5, QMetaData::Protected }, - { "doSSLHandshake(int)", &slot_6, QMetaData::Protected } + static const TQUMethod slot_6 = {"doSSLHandshake", 1, param_slot_6 }; + static const TQMetaData slot_tbl[] = { + { "connectionTimedOut()", &slot_0, TQMetaData::Protected }, + { "writeNotifierFired(int)", &slot_1, TQMetaData::Protected }, + { "readData(int)", &slot_2, TQMetaData::Protected }, + { "readProxyData(int)", &slot_3, TQMetaData::Protected }, + { "readHttpProxyErrorData(int)", &slot_4, TQMetaData::Protected }, + { "flushSendQueue()", &slot_5, TQMetaData::Protected }, + { "doSSLHandshake(int)", &slot_6, TQMetaData::Protected } }; - metaObj = QMetaObject::new_metaobject( - "KviIrcSocket", parentObject, + metaObj = TQMetaObject::new_metaobject( + "KviIrcSocket", tqparentObject, slot_tbl, 7, 0, 0, -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES 0, 0, 0, 0, -#endif // QT_NO_PROPERTIES +#endif // TQT_NO_PROPERTIES 0, 0 ); cleanUp_KviIrcSocket.setMetaObject( metaObj ); return metaObj; } -void* KviIrcSocket::qt_cast( const char* clname ) +void* KviIrcSocket::tqqt_cast( const char* clname ) { if ( !qstrcmp( clname, "KviIrcSocket" ) ) return this; - return QObject::qt_cast( clname ); + return TQObject::tqqt_cast( clname ); } -bool KviIrcSocket::qt_invoke( int _id, QUObject* _o ) +bool KviIrcSocket::qt_invoke( int _id, TQUObject* _o ) { switch ( _id - staticMetaObject()->slotOffset() ) { case 0: connectionTimedOut(); break; - case 1: writeNotifierFired((int)static_QUType_int.get(_o+1)); break; - case 2: readData((int)static_QUType_int.get(_o+1)); break; - case 3: readProxyData((int)static_QUType_int.get(_o+1)); break; - case 4: readHttpProxyErrorData((int)static_QUType_int.get(_o+1)); break; + case 1: writeNotifierFired((int)static_TQUType_int.get(_o+1)); break; + case 2: readData((int)static_TQUType_int.get(_o+1)); break; + case 3: readProxyData((int)static_TQUType_int.get(_o+1)); break; + case 4: readHttpProxyErrorData((int)static_TQUType_int.get(_o+1)); break; case 5: flushSendQueue(); break; - case 6: doSSLHandshake((int)static_QUType_int.get(_o+1)); break; + case 6: doSSLHandshake((int)static_TQUType_int.get(_o+1)); break; default: - return QObject::qt_invoke( _id, _o ); + return TQObject::qt_invoke( _id, _o ); } return TRUE; } -bool KviIrcSocket::qt_emit( int _id, QUObject* _o ) +bool KviIrcSocket::qt_emit( int _id, TQUObject* _o ) { - return QObject::qt_emit(_id,_o); + return TQObject::qt_emit(_id,_o); } -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES -bool KviIrcSocket::qt_property( int id, int f, QVariant* v) +bool KviIrcSocket::qt_property( int id, int f, TQVariant* v) { - return QObject::qt_property( id, f, v); + return TQObject::qt_property( id, f, v); } -bool KviIrcSocket::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; } -#endif // QT_NO_PROPERTIES +bool KviIrcSocket::qt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; } +#endif // TQT_NO_PROPERTIES diff --git a/src/kvirc/kvs/kvi_kvs.cpp b/src/kvirc/kvs/kvi_kvs.cpp index 9c36a34c..96d74f95 100644 --- a/src/kvirc/kvs/kvi_kvs.cpp +++ b/src/kvirc/kvs/kvi_kvs.cpp @@ -61,12 +61,12 @@ namespace KviKvs KviKvsKernel::done(); } - void loadPopups(const QString &szFileName) + void loadPopups(const TQString &szFileName) { KviKvsPopupManager::instance()->load(szFileName); } - void savePopups(const QString &szFileName) + void savePopups(const TQString &szFileName) { KviKvsPopupManager::instance()->save(szFileName); } @@ -76,12 +76,12 @@ namespace KviKvs KviKvsPopupManager::instance()->clear(); } - void loadAliases(const QString &szFileName) + void loadAliases(const TQString &szFileName) { KviKvsAliasManager::instance()->load(szFileName); } - void saveAliases(const QString &szFileName) + void saveAliases(const TQString &szFileName) { KviKvsAliasManager::instance()->save(szFileName); } @@ -91,12 +91,12 @@ namespace KviKvs KviKvsAliasManager::instance()->clear(); } - void loadAppEvents(const QString &szFileName) + void loadAppEvents(const TQString &szFileName) { KviKvsEventManager::instance()->loadAppEvents(szFileName); } - void saveAppEvents(const QString &szFileName) + void saveAppEvents(const TQString &szFileName) { KviKvsEventManager::instance()->saveAppEvents(szFileName); } @@ -106,12 +106,12 @@ namespace KviKvs KviKvsEventManager::instance()->removeAllScriptAppHandlers(); } - void loadRawEvents(const QString &szFileName) + void loadRawEvents(const TQString &szFileName) { KviKvsEventManager::instance()->loadRawEvents(szFileName); } - void saveRawEvents(const QString &szFileName) + void saveRawEvents(const TQString &szFileName) { KviKvsEventManager::instance()->saveRawEvents(szFileName); } @@ -121,12 +121,12 @@ namespace KviKvs KviKvsEventManager::instance()->removeAllScriptRawHandlers(); } - void loadScriptAddons(const QString &szFileName) + void loadScriptAddons(const TQString &szFileName) { KviKvsScriptAddonManager::instance()->load(szFileName); } - void saveScriptAddons(const QString &szFileName) + void saveScriptAddons(const TQString &szFileName) { KviKvsScriptAddonManager::instance()->save(szFileName); } diff --git a/src/kvirc/kvs/kvi_kvs.h b/src/kvirc/kvs/kvi_kvs.h index bb92a300..3a083aba 100644 --- a/src/kvirc/kvs/kvi_kvs.h +++ b/src/kvirc/kvs/kvi_kvs.h @@ -32,24 +32,24 @@ namespace KviKvs void init(); // this never fails void done(); // this never fails - void loadAliases(const QString &szFileName); - void saveAliases(const QString &szFileName); + void loadAliases(const TQString &szFileName); + void saveAliases(const TQString &szFileName); void clearAliases(); - void loadPopups(const QString &szFileName); - void savePopups(const QString &szFileName); + void loadPopups(const TQString &szFileName); + void savePopups(const TQString &szFileName); void clearPopups(); - void loadAppEvents(const QString &szFileName); - void saveAppEvents(const QString &szFileName); + void loadAppEvents(const TQString &szFileName); + void saveAppEvents(const TQString &szFileName); void clearAppEvents(); - void loadRawEvents(const QString &szFileName); - void saveRawEvents(const QString &szFileName); + void loadRawEvents(const TQString &szFileName); + void saveRawEvents(const TQString &szFileName); void clearRawEvents(); - void loadScriptAddons(const QString &szFileName); - void saveScriptAddons(const QString &szFileName); + void loadScriptAddons(const TQString &szFileName); + void saveScriptAddons(const TQString &szFileName); void clearScriptAddons(); void flushUserClasses(); diff --git a/src/kvirc/kvs/kvi_kvs_action.cpp b/src/kvirc/kvs/kvi_kvs_action.cpp index 08291145..82972d32 100644 --- a/src/kvirc/kvs/kvi_kvs_action.cpp +++ b/src/kvirc/kvs/kvi_kvs_action.cpp @@ -28,19 +28,19 @@ #include "kvi_kvs_script.h" #include "kvi_window.h" -KviKvsAction::KviKvsAction(QObject * pParent, - const QString &szName, - const QString &szScriptCode, - const QString &szVisibleName, - const QString &szDescription, +KviKvsAction::KviKvsAction(TQObject * pParent, + const TQString &szName, + const TQString &szScriptCode, + const TQString &szVisibleName, + const TQString &szDescription, KviActionCategory * pCategory, - const QString &szBigIcon, + const TQString &szBigIcon, int iSmallIconId, unsigned int uFlags, - const QString &szKeySequence) + const TQString &szKeySequence) : KviAction(pParent,szName,szVisibleName,szDescription,pCategory,szBigIcon,iSmallIconId,uFlags,szKeySequence) { - QString tmp = KVI_KVS_ACTION_SCRIPT_NAME_PREFIX; + TQString tmp = KVI_KVS_ACTION_SCRIPT_NAME_PREFIX; tmp += szName; m_pScript = new KviKvsScript(tmp,szScriptCode); } @@ -52,7 +52,7 @@ KviKvsAction::~KviKvsAction() delete m_pScript; } -const QString & KviKvsAction::scriptCode() +const TQString & KviKvsAction::scriptCode() { return m_pScript->code(); } diff --git a/src/kvirc/kvs/kvi_kvs_action.h b/src/kvirc/kvs/kvi_kvs_action.h index 0a33569e..25edfd79 100644 --- a/src/kvirc/kvs/kvi_kvs_action.h +++ b/src/kvirc/kvs/kvi_kvs_action.h @@ -34,22 +34,23 @@ class KviKvsScript; class KVIRC_API KviKvsAction : public KviAction { Q_OBJECT + TQ_OBJECT protected: KviKvsScript * m_pScript; public: - KviKvsAction(QObject * pParent, - const QString &szName, - const QString &szScriptCode, - const QString &szVisibleName, - const QString &szDescription, + KviKvsAction(TQObject * pParent, + const TQString &szName, + const TQString &szScriptCode, + const TQString &szVisibleName, + const TQString &szDescription, KviActionCategory * pCategory = 0, - const QString &szBigIcon = QString::null, + const TQString &szBigIcon = TQString(), int iSmallIconId = 0, unsigned int uFlags = 0, - const QString &szKeySequence = QString::null); + const TQString &szKeySequence = TQString()); ~KviKvsAction(); public: - const QString & scriptCode(); + const TQString & scriptCode(); virtual void activate(); }; diff --git a/src/kvirc/kvs/kvi_kvs_aliasmanager.cpp b/src/kvirc/kvs/kvi_kvs_aliasmanager.cpp index 257b6cf8..2192dc54 100644 --- a/src/kvirc/kvs/kvi_kvs_aliasmanager.cpp +++ b/src/kvirc/kvs/kvi_kvs_aliasmanager.cpp @@ -32,7 +32,7 @@ KviKvsAliasManager * KviKvsAliasManager::m_pAliasManager = 0; KviKvsAliasManager::KviKvsAliasManager() { m_pAliasManager = this; - m_pAliasDict = new KviPointerHashTable(51,false); + m_pAliasDict = new KviPointerHashTable(51,false); m_pAliasDict->setAutoDelete(true); } @@ -61,25 +61,25 @@ void KviKvsAliasManager::done() delete KviKvsAliasManager::instance(); } -void KviKvsAliasManager::completeCommand(const QString &word,KviPointerList * matches) +void KviKvsAliasManager::completeCommand(const TQString &word,KviPointerList * matches) { - KviPointerHashTableIterator it(*m_pAliasDict); + KviPointerHashTableIterator it(*m_pAliasDict); while(it.current()) { - if(KviQString::equalCIN(word,it.current()->name(),word.length())) - matches->append(new QString(it.current()->name())); + if(KviTQString::equalCIN(word,it.current()->name(),word.length())) + matches->append(new TQString(it.current()->name())); ++it; } } // FIXME: #warning "A binary config would work better and faster here!" -void KviKvsAliasManager::save(const QString & filename) +void KviKvsAliasManager::save(const TQString & filename) { KviConfig cfg(filename,KviConfig::Write); cfg.clear(); - KviPointerHashTableIterator it(*m_pAliasDict); + KviPointerHashTableIterator it(*m_pAliasDict); while(it.current()) { @@ -89,26 +89,26 @@ void KviKvsAliasManager::save(const QString & filename) } } -void KviKvsAliasManager::load(const QString & filename) +void KviKvsAliasManager::load(const TQString & filename) { m_pAliasDict->clear(); KviConfig cfg(filename,KviConfig::Read); KviConfigIterator it(*(cfg.dict())); - KviPointerList l; + KviPointerList l; l.setAutoDelete(true); while(it.current()) { - l.append(new QString(it.currentKey())); + l.append(new TQString(it.currentKey())); ++it; } - for(QString * s = l.first();s;s = l.next()) + for(TQString * s = l.first();s;s = l.next()) { cfg.setGroup(*s); - QString szCode = cfg.readQStringEntry("_Buffer",""); + TQString szCode = cfg.readTQStringEntry("_Buffer",""); if(!szCode.isEmpty()) { KviKvsScript * m = new KviKvsScript(*s,szCode); diff --git a/src/kvirc/kvs/kvi_kvs_aliasmanager.h b/src/kvirc/kvs/kvi_kvs_aliasmanager.h index 6f25eccb..49fda27a 100644 --- a/src/kvirc/kvs/kvi_kvs_aliasmanager.h +++ b/src/kvirc/kvs/kvi_kvs_aliasmanager.h @@ -38,7 +38,7 @@ protected: // it only can be created and destroyed by KviKvsAliasManager::init() KviKvsAliasManager(); ~KviKvsAliasManager(); protected: - KviPointerHashTable * m_pAliasDict; + KviPointerHashTable * m_pAliasDict; static KviKvsAliasManager * m_pAliasManager; public: static KviKvsAliasManager * instance() @@ -46,20 +46,20 @@ public: static void init(); // called by KviKvs::init() static void done(); // called by KviKvs::done() - KviPointerHashTable * aliasDict(){ return m_pAliasDict; }; - const KviKvsScript * lookup(const QString & szName) - { return m_pAliasDict->find(szName); }; - void add(const QString &szName,KviKvsScript * pAlias) - { m_pAliasDict->replace(szName,pAlias); }; - bool remove(const QString & szName) + KviPointerHashTable * aliasDict(){ return m_pAliasDict; }; + const KviKvsScript * lookup(const TQString & szName) + { return m_pAliasDict->tqfind(szName); }; + void add(const TQString &szName,KviKvsScript * pAlias) + { m_pAliasDict->tqreplace(szName,pAlias); }; + bool remove(const TQString & szName) { return m_pAliasDict->remove(szName); }; void clear() { m_pAliasDict->clear(); }; - void save(const QString & filename); - void load(const QString & filename); + void save(const TQString & filename); + void load(const TQString & filename); - void completeCommand(const QString &word,KviPointerList * matches); + void completeCommand(const TQString &word,KviPointerList * matches); }; // namespaces are handled completly in the editing! diff --git a/src/kvirc/kvs/kvi_kvs_array.cpp b/src/kvirc/kvs/kvi_kvs_array.cpp index 545d8285..9d19aaee 100644 --- a/src/kvirc/kvs/kvi_kvs_array.cpp +++ b/src/kvirc/kvs/kvi_kvs_array.cpp @@ -191,9 +191,9 @@ KviKvsVariant * KviKvsArray::getAt(kvs_uint_t uIdx) return m_pData[uIdx]; } -void KviKvsArray::serialize(QString& result) +void KviKvsArray::serialize(TQString& result) { - QString tmpBuffer; + TQString tmpBuffer; result="["; kvs_uint_t u = 0; bool bNeedComma = false; @@ -212,7 +212,7 @@ void KviKvsArray::serialize(QString& result) result.append(']'); } -void KviKvsArray::appendAsString(QString &szBuffer) +void KviKvsArray::appendAsString(TQString &szBuffer) { kvs_uint_t u = 0; bool bNeedComma = false; diff --git a/src/kvirc/kvs/kvi_kvs_array.h b/src/kvirc/kvs/kvi_kvs_array.h index 6c6ca463..73ec29d4 100644 --- a/src/kvirc/kvs/kvi_kvs_array.h +++ b/src/kvirc/kvs/kvi_kvs_array.h @@ -51,8 +51,8 @@ public: KviKvsVariant * getAt(kvs_uint_t uIdx); bool isEmpty(){ return m_uSize == 0; }; kvs_uint_t size(){ return m_uSize; }; - void appendAsString(QString &szBuffer); - void serialize(QString& result); + void appendAsString(TQString &szBuffer); + void serialize(TQString& result); void sort(); void rsort(); protected: diff --git a/src/kvirc/kvs/kvi_kvs_asyncdnsoperation.cpp b/src/kvirc/kvs/kvi_kvs_asyncdnsoperation.cpp index e7e2b626..b9f85d02 100644 --- a/src/kvirc/kvs/kvi_kvs_asyncdnsoperation.cpp +++ b/src/kvirc/kvs/kvi_kvs_asyncdnsoperation.cpp @@ -34,10 +34,10 @@ #include "kvi_error.h" #include "kvi_kvs_variantlist.h" -#include +#include -KviKvsAsyncDnsOperation::KviKvsAsyncDnsOperation(KviWindow * pWnd,QString &szQuery,KviDns::QueryType eType,KviKvsScript * pCallback,KviKvsVariant * pMagic) +KviKvsAsyncDnsOperation::KviKvsAsyncDnsOperation(KviWindow * pWnd,TQString &szQuery,KviDns::QueryType eType,KviKvsScript * pCallback,KviKvsVariant * pMagic) : KviKvsAsyncOperation(pWnd) { m_pDns = new KviDns(); @@ -45,9 +45,9 @@ KviKvsAsyncDnsOperation::KviKvsAsyncDnsOperation(KviWindow * pWnd,QString &szQue m_eType = eType; m_pCallback = pCallback; m_pMagic = pMagic; - connect(m_pDns,SIGNAL(lookupDone(KviDns *)),this,SLOT(lookupTerminated(KviDns *))); + connect(m_pDns,TQT_SIGNAL(lookupDone(KviDns *)),this,TQT_SLOT(lookupTerminated(KviDns *))); if(!m_pDns->lookup(szQuery,eType)) - QTimer::singleShot(10,this,SLOT(dnsStartFailed())); + TQTimer::singleShot(10,this,TQT_SLOT(dnsStartFailed())); } KviKvsAsyncDnsOperation::~KviKvsAsyncDnsOperation() @@ -79,13 +79,13 @@ void KviKvsAsyncDnsOperation::lookupTerminated(KviDns *) params.append(new KviKvsVariant()); params.append(new KviKvsVariant(*m_pMagic)); } else { - QString * fh = m_pDns->hostnameList()->first(); - QString * fi = m_pDns->ipAddressList()->first(); + TQString * fh = m_pDns->hostnameList()->first(); + TQString * fi = m_pDns->ipAddressList()->first(); params.append(new KviKvsVariant(m_szQuery)); params.append(new KviKvsVariant((kvs_int_t)1)); - params.append(new KviKvsVariant(fi ? *fi : QString("?.?.?.?"))); - params.append(new KviKvsVariant(fh ? *fh : QString("?.?"))); + params.append(new KviKvsVariant(fi ? *fi : TQString("?.?.?.?"))); + params.append(new KviKvsVariant(fh ? *fh : TQString("?.?"))); params.append(new KviKvsVariant(*m_pMagic)); } @@ -96,22 +96,22 @@ void KviKvsAsyncDnsOperation::lookupTerminated(KviDns *) } // we have no callback : output the results - QString szQuery = m_pDns->query(); + TQString szQuery = m_pDns->query(); pWnd->output(KVI_OUT_HOSTLOOKUP,__tr2qs("DNS Lookup result for query \"%Q\""),&szQuery); if(m_pDns->state() == KviDns::Failure) { - QString strDescription(KviError::getDescription(m_pDns->error())); + TQString strDescription(KviError::getDescription(m_pDns->error())); pWnd->output(KVI_OUT_HOSTLOOKUP,__tr2qs("Error: %Q"),&strDescription); } else { int idx = 1; - for(QString * h = m_pDns->hostnameList()->first();h;h = m_pDns->hostnameList()->next()) + for(TQString * h = m_pDns->hostnameList()->first();h;h = m_pDns->hostnameList()->next()) { pWnd->output(KVI_OUT_HOSTLOOKUP,__tr2qs("Hostname %d: %Q"),idx,h); idx++; } idx = 1; - for(QString * a = m_pDns->ipAddressList()->first();a;a = m_pDns->ipAddressList()->next()) + for(TQString * a = m_pDns->ipAddressList()->first();a;a = m_pDns->ipAddressList()->next()) { pWnd->output(KVI_OUT_HOSTLOOKUP,__tr2qs("IP address %d: %Q"),idx,a); idx++; diff --git a/src/kvirc/kvs/kvi_kvs_asyncdnsoperation.h b/src/kvirc/kvs/kvi_kvs_asyncdnsoperation.h index 4e2046c6..78909a50 100644 --- a/src/kvirc/kvs/kvi_kvs_asyncdnsoperation.h +++ b/src/kvirc/kvs/kvi_kvs_asyncdnsoperation.h @@ -36,15 +36,16 @@ class KviKvsVariant; class KVIRC_API KviKvsAsyncDnsOperation : public KviKvsAsyncOperation { Q_OBJECT + TQ_OBJECT public: - KviKvsAsyncDnsOperation(KviWindow * pWnd,QString &szQuery,KviDns::QueryType eType,KviKvsScript * pCallback = 0,KviKvsVariant * pMagic = 0); + KviKvsAsyncDnsOperation(KviWindow * pWnd,TQString &szQuery,KviDns::QueryType eType,KviKvsScript * pCallback = 0,KviKvsVariant * pMagic = 0); virtual ~KviKvsAsyncDnsOperation(); protected: KviDns * m_pDns; KviDns::QueryType m_eType; KviKvsVariant * m_pMagic; KviKvsScript * m_pCallback; - QString m_szQuery; + TQString m_szQuery; protected slots: void lookupTerminated(KviDns *); void dnsStartFailed(); diff --git a/src/kvirc/kvs/kvi_kvs_asyncoperation.cpp b/src/kvirc/kvs/kvi_kvs_asyncoperation.cpp index 549627ed..19e4656d 100644 --- a/src/kvirc/kvs/kvi_kvs_asyncoperation.cpp +++ b/src/kvirc/kvs/kvi_kvs_asyncoperation.cpp @@ -29,7 +29,7 @@ #include "kvi_window.h" KviKvsAsyncOperation::KviKvsAsyncOperation(KviWindow * pWnd) -: QObject() +: TQObject() { m_pWnd = pWnd; KviKvsKernel::instance()->asyncOperationManager()->registerOperation(this); diff --git a/src/kvirc/kvs/kvi_kvs_asyncoperation.h b/src/kvirc/kvs/kvi_kvs_asyncoperation.h index 2b5641bd..83aaa36b 100644 --- a/src/kvirc/kvs/kvi_kvs_asyncoperation.h +++ b/src/kvirc/kvs/kvi_kvs_asyncoperation.h @@ -26,13 +26,14 @@ #include "kvi_settings.h" #include "kvi_pointerlist.h" -#include +#include class KviWindow; -class KVIRC_API KviKvsAsyncOperation : public QObject +class KVIRC_API KviKvsAsyncOperation : public TQObject { Q_OBJECT + TQ_OBJECT public: KviKvsAsyncOperation(KviWindow * pWnd); virtual ~KviKvsAsyncOperation(); diff --git a/src/kvirc/kvs/kvi_kvs_callbackobject.cpp b/src/kvirc/kvs/kvi_kvs_callbackobject.cpp index 7f304245..7222f05d 100644 --- a/src/kvirc/kvs/kvi_kvs_callbackobject.cpp +++ b/src/kvirc/kvs/kvi_kvs_callbackobject.cpp @@ -29,7 +29,7 @@ #include "kvi_app.h" -KviKvsCallbackObject::KviKvsCallbackObject(const QString &szCallbackName,KviWindow * pTargetWindow,const QString &szCallbackCode,KviKvsVariantList * pMagicParams,unsigned int uFlags) +KviKvsCallbackObject::KviKvsCallbackObject(const TQString &szCallbackName,KviWindow * pTargetWindow,const TQString &szCallbackCode,KviKvsVariantList * pMagicParams,unsigned int uFlags) : KviHeapObject() { m_uFlags = uFlags; @@ -42,7 +42,7 @@ KviKvsCallbackObject::KviKvsCallbackObject(const QString &szCallbackName,KviWind if(pMagicParams) for(KviKvsVariant * v = pMagicParams->first();v;v = pMagicParams->next()) m_pMagicParams->append(new KviKvsVariant(*v)); - QString szName; + TQString szName; szName = szCallbackName; szName += "::"; szName += "callback"; @@ -55,7 +55,7 @@ KviKvsCallbackObject::~KviKvsCallbackObject() delete m_pMagicParams; } -KviKvsCallbackObject::CallbackStatus KviKvsCallbackObject::execute(KviKvsVariantList * pParams,KviKvsVariant * pRetVal) +KviKvsCallbackObject::CallbacktqStatus KviKvsCallbackObject::execute(KviKvsVariantList * pParams,KviKvsVariant * pRetVal) { // first of all check the window if(!m_pTargetWindow) diff --git a/src/kvirc/kvs/kvi_kvs_callbackobject.h b/src/kvirc/kvs/kvi_kvs_callbackobject.h index fb6e7090..c45ec1b8 100644 --- a/src/kvirc/kvs/kvi_kvs_callbackobject.h +++ b/src/kvirc/kvs/kvi_kvs_callbackobject.h @@ -49,7 +49,7 @@ public: // the callback is executed in another window (the associated console, if possible, otherwise the first available console) OnlyIfWindowExists = 1 }; - enum CallbackStatus { + enum CallbacktqStatus { // succesfull execution Success, // error in command @@ -61,9 +61,9 @@ public: }; public: KviKvsCallbackObject( - const QString &szCallbackSource, // the name of this callback (should identify its source, like "dialog.message"): displayed in error messages + const TQString &szCallbackSource, // the name of this callback (should identify its source, like "dialog.message"): displayed in error messages KviWindow * pTargetWindow, // the window that this callback should be triggered in (can be zero: to execute in the first available console) - const QString &szCallbackCode, // the callback code (may be empty!) + const TQString &szCallbackCode, // the callback code (may be empty!) KviKvsVariantList * pMagicParams, // magic parameters that should be passed to the callback (this class makes a copy of them) unsigned int uFlags = 0 // a combination of CallbackFlags ); @@ -76,7 +76,7 @@ protected: unsigned int m_uFlags; protected: // the parameter list is always shallow! - CallbackStatus execute(KviKvsVariantList * pParams = 0,KviKvsVariant * pRetVal = 0); + CallbacktqStatus execute(KviKvsVariantList * pParams = 0,KviKvsVariant * pRetVal = 0); }; diff --git a/src/kvirc/kvs/kvi_kvs_corecallbackcommands.cpp b/src/kvirc/kvs/kvi_kvs_corecallbackcommands.cpp index 308ac8d8..e9254926 100644 --- a/src/kvirc/kvs/kvi_kvs_corecallbackcommands.cpp +++ b/src/kvirc/kvs/kvi_kvs_corecallbackcommands.cpp @@ -42,7 +42,7 @@ #include "kvi_iconmanager.h" #include "kvi_locale.h" -#include +#include #include "kvi_tal_tooltip.h" namespace KviKvsCoreCallbackCommands @@ -135,7 +135,7 @@ namespace KviKvsCoreCallbackCommands KVSCCC(ahost) { - QString szQuery; + TQString szQuery; KviKvsVariant * pMagicPtr; KVSCCC_PARAMETERS_BEGIN KVSCCC_PARAMETER("dnsquery",KVS_PT_NONEMPTYSTRING,0,szQuery) @@ -143,8 +143,8 @@ namespace KviKvsCoreCallbackCommands KVSCCC_PARAMETERS_END KviDns::QueryType queryType = KviDns::IpV4; - if(KVSCCC_pSwitches->find('i',"ipv6"))queryType = KviDns::IpV6; - if(KVSCCC_pSwitches->find('a',"any"))queryType = KviDns::Any; + if(KVSCCC_pSwitches->tqfind('i',"ipv6"))queryType = KviDns::IpV6; + if(KVSCCC_pSwitches->tqfind('a',"any"))queryType = KviDns::Any; KviKvsVariant * pMagic = pMagicPtr ? new KviKvsVariant(*pMagicPtr) : new KviKvsVariant(); @@ -243,11 +243,11 @@ namespace KviKvsCoreCallbackCommands return false; } - QString szName; + TQString szName; vName->asString(szName); // we allow only [\w:]+ - QRegExp re("[\\w:]+"); + TQRegExp re("[\\w:]+"); if(!re.exactMatch(szName)) { KVSCCC_pContext->error(__tr2qs("Alias names can contain only letters, digits, underscores and '::' namespace separators")); @@ -255,15 +255,15 @@ namespace KviKvsCoreCallbackCommands } // make sure that we have only doubled "::" and not ":" or ":::..." - QString tmp = szName; - tmp.replace("::","@"); // @ is not allowed by the rule above - if(tmp.find(":") != -1) + TQString tmp = szName; + tmp.tqreplace("::","@"); // @ is not allowed by the rule above + if(tmp.tqfind(":") != -1) { KVSCCC_pContext->error(__tr2qs("Stray ':' character in alias name: did you mean ...:: ?")); return false; } - if(tmp.find("@@") != -1) + if(tmp.tqfind("@@") != -1) { KVSCCC_pContext->error(__tr2qs("Found an empty namespace in alias name")); return false; @@ -273,7 +273,7 @@ namespace KviKvsCoreCallbackCommands { if(!KviKvsAliasManager::instance()->remove(szName)) { - if(!KVSCCC_pSwitches->find('q',"quiet")) + if(!KVSCCC_pSwitches->tqfind('q',"quiet")) KVSCCC_pContext->warning(__tr2qs("The alias %Q is not existing"),&szName); } } else { @@ -340,16 +340,16 @@ namespace KviKvsCoreCallbackCommands KVSCCC(awhois) { - QString szNick; + TQString szNick; KviKvsVariant * pMagic; KVSCCC_PARAMETERS_BEGIN KVSCCC_PARAMETER("nickname",KVS_PT_NONEMPTYSTRING,0,szNick) KVSCCC_PARAMETER("magic",KVS_PT_VARIANT,KVS_PF_OPTIONAL,pMagic) KVSCCC_PARAMETERS_END - KVSCCC_REQUIRE_CONNECTION + KVSCCC_RETQUIRE_CONNECTION - KviQCString szN = KVSCCC_pConnection->encodeText(szNick); + KviTQCString szN = KVSCCC_pConnection->encodeText(szNick); KviAsyncWhoisInfo * info = new KviAsyncWhoisInfo(); info->pCallback = new KviKvsScript(*KVSCCC_pCallback); @@ -359,7 +359,7 @@ namespace KviKvsCoreCallbackCommands KVSCCC_pConnection->asyncWhoisData()->add(info); - if(KVSCCC_pSwitches->find('i',"idle-time"))KVSCCC_pConnection->sendFmtData("WHOIS %s %s",szN.data(),szN.data()); + if(KVSCCC_pSwitches->tqfind('i',"idle-time"))KVSCCC_pConnection->sendFmtData("WHOIS %s %s",szN.data(),szN.data()); else KVSCCC_pConnection->sendFmtData("WHOIS %s",szN.data()); return true; @@ -420,7 +420,7 @@ namespace KviKvsCoreCallbackCommands KVSCCC(button) { KviKvsVariant * pUnused; - QString szName,szIcon,szLabel; + TQString szName,szIcon,szLabel; KVSCCC_PARAMETERS_BEGIN KVSCCC_PARAMETER("type_unused",KVS_PT_VARIANT,0,pUnused) KVSCCC_PARAMETER("name",KVS_PT_NONEMPTYSTRING,0,szName) @@ -432,7 +432,7 @@ namespace KviKvsCoreCallbackCommands if(!KVSCCC_pWindow->buttonContainer()) { - if(!KVSCCC_pSwitches->find('q',"quiet")) + if(!KVSCCC_pSwitches->tqfind('q',"quiet")) KVSCCC_pContext->warning(__tr2qs("The specified window has no button containers")); return true; } @@ -443,7 +443,7 @@ namespace KviKvsCoreCallbackCommands { if(pButton)delete pButton; else { - if(!KVSCCC_pSwitches->find('q',"quiet")) + if(!KVSCCC_pSwitches->tqfind('q',"quiet")) KVSCCC_pContext->warning(__tr2qs("Window button '%Q' not found"),&szName); } return true; @@ -466,17 +466,17 @@ namespace KviKvsCoreCallbackCommands if(!szIcon.isEmpty()) { - QPixmap * pix = g_pIconManager->getImage(szIcon); + TQPixmap * pix = g_pIconManager->getImage(szIcon); if(pix) { pButton->setButtonPixmap(*pix); } else { - if(!KVSCCC_pSwitches->find('q',"quiet")) + if(!KVSCCC_pSwitches->tqfind('q',"quiet")) KVSCCC_pContext->warning(__tr2qs("Can't find the icon '%Q'"),&szIcon); } } - pButton->setEnabled(!(KVSCCC_pSwitches->find('d',"disabled"))); + pButton->setEnabled(!(KVSCCC_pSwitches->tqfind('d',"disabled"))); return true; } @@ -514,7 +514,7 @@ namespace KviKvsCoreCallbackCommands KVSCCC(event) { - QString szEventName,szHandlerName; + TQString szEventName,szHandlerName; KVSCCC_PARAMETERS_BEGIN KVSCCC_PARAMETER("event_name",KVS_PT_NONEMPTYSTRING,0,szEventName) KVSCCC_PARAMETER("handler_name",KVS_PT_NONEMPTYSTRING,0,szHandlerName) @@ -528,7 +528,7 @@ namespace KviKvsCoreCallbackCommands { if(!KviKvsEventManager::instance()->isValidRawEvent(iNumber)) { - if(!KVSCCC_pSwitches->find('q',"quiet")) + if(!KVSCCC_pSwitches->tqfind('q',"quiet")) KVSCCC_pContext->warning(__tr2qs("No such event (%Q)"),&szEventName); return true; } @@ -536,7 +536,7 @@ namespace KviKvsCoreCallbackCommands iNumber = KviKvsEventManager::instance()->findAppEventIndexByName(szEventName); if(!KviKvsEventManager::instance()->isValidAppEvent(iNumber)) { - if(!KVSCCC_pSwitches->find('q',"quiet")) + if(!KVSCCC_pSwitches->tqfind('q',"quiet")) KVSCCC_pContext->warning(__tr2qs("No such event (%Q)"),&szEventName); return true; } @@ -548,13 +548,13 @@ namespace KviKvsCoreCallbackCommands { if(!KviKvsEventManager::instance()->removeScriptRawHandler(iNumber,szHandlerName)) { - if(!KVSCCC_pSwitches->find('q',"quiet")) + if(!KVSCCC_pSwitches->tqfind('q',"quiet")) KVSCCC_pContext->warning(__tr2qs("No handler '%Q' for raw numeric event '%d'"),&szHandlerName,iNumber); } } else { if(!KviKvsEventManager::instance()->removeScriptAppHandler(iNumber,szHandlerName)) { - if(!KVSCCC_pSwitches->find('q',"quiet")) + if(!KVSCCC_pSwitches->tqfind('q',"quiet")) KVSCCC_pContext->warning(__tr2qs("No handler '%Q' for event '%Q'"),&szHandlerName,&szEventName); } } @@ -563,15 +563,15 @@ namespace KviKvsCoreCallbackCommands { // remove the old handler KviKvsEventManager::instance()->removeScriptRawHandler(iNumber,szHandlerName); - QString contextName; - KviQString::sprintf(contextName,"RawEvent%d::%Q",iNumber,&szHandlerName); + TQString contextName; + KviTQString::sprintf(contextName,"RawEvent%d::%Q",iNumber,&szHandlerName); KviKvsScriptEventHandler * pHandler = new KviKvsScriptEventHandler(szHandlerName,contextName,KVSCCC_pCallback->code()); KviKvsEventManager::instance()->addRawHandler(iNumber,pHandler); } else { // remove the old handler KviKvsEventManager::instance()->removeScriptAppHandler(iNumber,szHandlerName); - QString contextName; - KviQString::sprintf(contextName,"%Q::%Q",&szEventName,&szHandlerName); + TQString contextName; + KviTQString::sprintf(contextName,"%Q::%Q",&szEventName,&szHandlerName); KviKvsScriptEventHandler * pHandler = new KviKvsScriptEventHandler(szHandlerName,contextName,KVSCCC_pCallback->code()); KviKvsEventManager::instance()->addAppHandler(iNumber,pHandler); } @@ -618,7 +618,7 @@ namespace KviKvsCoreCallbackCommands Trigger with "ping" events every milliseconds. !sw: -w | --bind-to-window Kill the process if the current window is closed. In this case the - termination event is NOT triggered (since the parent window has been lost). + termination event is NOT triggered (since the tqparent window has been lost). If this switch is not used then the process is rebound to the active console window and continues running. !sw: -s= | --shell= @@ -679,7 +679,7 @@ namespace KviKvsCoreCallbackCommands The stderr data event is similar to the stdout one but there are three differences. The first one is that the stderr event is NOT triggered by default: you must use the -e switch to enable it. The second difference is that $0 - contains "stderr" instead of "stdout". The last difference is that $1 contains data + tqcontains "stderr" instead of "stdout". The last difference is that $1 contains data coming from the slave process stderr stream.[br] [br] [b]Termination event[/b][br] @@ -883,8 +883,8 @@ namespace KviKvsCoreCallbackCommands { [comment]# We don't wait anymore :)[/comment] %:state++ - echo "Sending QUIT..." - return "QUIT$cr$lf" + echo "Sending TQUIT..." + return "TQUIT$cr$lf" } break; default: @@ -905,7 +905,7 @@ namespace KviKvsCoreCallbackCommands KVSCCC(exec) { - QString szCommandline; + TQString szCommandline; KviKvsVariant * pMagic; KVSCCC_PARAMETERS_BEGIN KVSCCC_PARAMETER("commandline",KVS_PT_NONEMPTYSTRING,0,szCommandline) @@ -914,21 +914,21 @@ namespace KviKvsCoreCallbackCommands int f = 0; - if(KVSCCC_pSwitches->find('t',"trigger-termination") != 0)f |= KVI_KVS_PROCESSDESCRIPTOR_TRIGGERTERMINATED; - if(KVSCCC_pSwitches->find('n',"no-stdout") == 0)f |= KVI_KVS_PROCESSDESCRIPTOR_TRIGGERSTDOUT; - if(KVSCCC_pSwitches->find('e',"trigger-stderr") != 0)f |= KVI_KVS_PROCESSDESCRIPTOR_TRIGGERSTDERR; - if(KVSCCC_pSwitches->find('x',"trigger-startup") != 0)f |= KVI_KVS_PROCESSDESCRIPTOR_TRIGGERSTARTED; - if(KVSCCC_pSwitches->find('b',"output-block") != 0)f |= KVI_KVS_PROCESSDESCRIPTOR_OUTPUTBYBLOCKS; - if(KVSCCC_pSwitches->find('w',"bind-to-window") != 0)f |= KVI_KVS_PROCESSDESCRIPTOR_KILLIFNOWINDOW; - if(KVSCCC_pSwitches->find('d',"direct") != 0)f |= KVI_KVS_PROCESSDESCRIPTOR_NOSHELL; - - QString szShell; + if(KVSCCC_pSwitches->tqfind('t',"trigger-termination") != 0)f |= KVI_KVS_PROCESSDESCRIPTOR_TRIGGERTERMINATED; + if(KVSCCC_pSwitches->tqfind('n',"no-stdout") == 0)f |= KVI_KVS_PROCESSDESCRIPTOR_TRIGGERSTDOUT; + if(KVSCCC_pSwitches->tqfind('e',"trigger-stderr") != 0)f |= KVI_KVS_PROCESSDESCRIPTOR_TRIGGERSTDERR; + if(KVSCCC_pSwitches->tqfind('x',"trigger-startup") != 0)f |= KVI_KVS_PROCESSDESCRIPTOR_TRIGGERSTARTED; + if(KVSCCC_pSwitches->tqfind('b',"output-block") != 0)f |= KVI_KVS_PROCESSDESCRIPTOR_OUTPUTBYBLOCKS; + if(KVSCCC_pSwitches->tqfind('w',"bind-to-window") != 0)f |= KVI_KVS_PROCESSDESCRIPTOR_KILLIFNOWINDOW; + if(KVSCCC_pSwitches->tqfind('d',"direct") != 0)f |= KVI_KVS_PROCESSDESCRIPTOR_NOSHELL; + + TQString szShell; KVSCCC_pSwitches->getAsStringIfExisting('s',"shell",szShell); kvs_int_t iPingTime = 0; kvs_int_t iMaxRunTime = 0; - KviKvsVariant * pPing = KVSCCC_pSwitches->find('p',"trigger-ping"); + KviKvsVariant * pPing = KVSCCC_pSwitches->tqfind('p',"trigger-ping"); if(pPing) { if(!(pPing->asInteger(iPingTime) && iPingTime > 0)) @@ -938,7 +938,7 @@ namespace KviKvsCoreCallbackCommands } } - KviKvsVariant * pKill = KVSCCC_pSwitches->find('k',"kill-after"); + KviKvsVariant * pKill = KVSCCC_pSwitches->tqfind('k',"kill-after"); if(pKill) { if(!(pKill->asInteger(iMaxRunTime) && iMaxRunTime > 0)) @@ -962,7 +962,7 @@ namespace KviKvsCoreCallbackCommands KviKvsProcessAsyncOperation * op = new KviKvsProcessAsyncOperation(d); if(!op->start()) { - if(KVSCCC_pSwitches->find('q',"quiet") == 0)KVSCCC_pContext->warning(__tr2qs("Failed to start the process")); + if(KVSCCC_pSwitches->tqfind('q',"quiet") == 0)KVSCCC_pContext->warning(__tr2qs("Failed to start the process")); delete op; } @@ -998,7 +998,7 @@ namespace KviKvsCoreCallbackCommands KVSCCC(privateimpl) { kvs_hobject_t hObject; - QString szFunctionName; + TQString szFunctionName; KVSCCC_PARAMETERS_BEGIN KVSCCC_PARAMETER("object_handle",KVS_PT_HOBJECT,0,hObject) KVSCCC_PARAMETER("function_name",KVS_PT_NONEMPTYSTRING,0,szFunctionName) @@ -1114,7 +1114,7 @@ namespace KviKvsCoreCallbackCommands return false; } - QString szName; + TQString szName; vName->asString(szName); if(!vDelay) @@ -1132,8 +1132,8 @@ namespace KviKvsCoreCallbackCommands KviKvsTimer::Lifetime lt; - if(KVSCCC_pSwitches->find('s',"single-shot"))lt = KviKvsTimer::SingleShot; - else if(KVSCCC_pSwitches->find('p',"persistent"))lt = KviKvsTimer::Persistent; + if(KVSCCC_pSwitches->tqfind('s',"single-shot"))lt = KviKvsTimer::SingleShot; + else if(KVSCCC_pSwitches->tqfind('p',"persistent"))lt = KviKvsTimer::Persistent; else lt = KviKvsTimer::WindowLifetime; // prepare the callback parameters @@ -1165,7 +1165,7 @@ namespace KviKvsCoreCallbackCommands { \ KviKvsCoreCallbackCommandExecRoutine * r = new KviKvsCoreCallbackCommandExecRoutine; \ r->proc = KVI_PTR2MEMBER(KviKvsCoreCallbackCommands::__routine); \ - pKern->registerCoreCallbackCommandExecRoutine(QString(__cmdName),r); \ + pKern->registerCoreCallbackCommandExecRoutine(TQString(__cmdName),r); \ } #ifdef COMPILE_NEW_KVS diff --git a/src/kvirc/kvs/kvi_kvs_corecallbackcommands.h b/src/kvirc/kvs/kvi_kvs_corecallbackcommands.h index ce77ec6d..478358da 100644 --- a/src/kvirc/kvs/kvi_kvs_corecallbackcommands.h +++ b/src/kvirc/kvs/kvi_kvs_corecallbackcommands.h @@ -48,7 +48,7 @@ KVS_PARAMETERS_END \ if(!KviKvsParameterProcessor::process(KVSCCC_pParams,KVSCCC_pContext,parameter_format_list))return false; -#define KVSCCC_REQUIRE_CONNECTION \ +#define KVSCCC_RETQUIRE_CONNECTION \ if(!KVSCCC_pContext->window()->context())return KVSCCC_pContext->errorNoIrcContext(); \ if(!KVSCCC_pContext->window()->connection())return KVSCCC_pContext->warningNoIrcConnection(); diff --git a/src/kvirc/kvs/kvi_kvs_corefunctions.cpp b/src/kvirc/kvs/kvi_kvs_corefunctions.cpp index 74aa4565..6af8b981 100644 --- a/src/kvirc/kvs/kvi_kvs_corefunctions.cpp +++ b/src/kvirc/kvs/kvi_kvs_corefunctions.cpp @@ -41,13 +41,13 @@ namespace KviKvsCoreFunctions { \ KviKvsCoreFunctionExecRoutine * r = new KviKvsCoreFunctionExecRoutine; \ r->proc = KVI_PTR2MEMBER(KviKvsCoreFunctions::__routine); \ - pKern->registerCoreFunctionExecRoutine(QString(__fncName),r); \ + pKern->registerCoreFunctionExecRoutine(TQString(__fncName),r); \ } // a_f _REGFNC("active",active) _REGFNC("array",array) - _REGFNC("ascii",unicode) + _REGFNC("ascii",tqunicode) _REGFNC("asciiToHex",asciiToHex) _REGFNC("asciiToBase64",asciiToBase64) _REGFNC("away",away) @@ -93,7 +93,7 @@ namespace KviKvsCoreFunctions _REGFNC("length",length) _REGFNC("lf",lf) // m_r - _REGFNC("mask",mask) + _REGFNC("tqmask",tqmask) _REGFNC("me",me) _REGFNC("msgtype",msgtype) _REGFNC("new",newCKEYWORDWORKAROUND) @@ -121,7 +121,7 @@ namespace KviKvsCoreFunctions _REGFNC("true",trueCKEYWORDWORKAROUND) _REGFNC("typeof",typeofCKEYWORDWORKAROUND) _REGFNC("u",u) - _REGFNC("unicode",unicode) + _REGFNC("tqunicode",tqunicode) _REGFNC("unixtime",unixtime) _REGFNC("unserialize",unserialize) _REGFNC("username",username) @@ -133,7 +133,7 @@ namespace KviKvsCoreFunctions #undef _REGCMD } - static QString g_szStaticStrayConstantAt("@"); + static TQString g_szStaticStrayConstantAt("@"); KVSCF(strayAt) { diff --git a/src/kvirc/kvs/kvi_kvs_corefunctions.h b/src/kvirc/kvs/kvi_kvs_corefunctions.h index 9fd25eaf..16d281ad 100644 --- a/src/kvirc/kvs/kvi_kvs_corefunctions.h +++ b/src/kvirc/kvs/kvi_kvs_corefunctions.h @@ -101,7 +101,7 @@ namespace KviKvsCoreFunctions KVSCF(length); KVSCF(lf); // m_r - KVSCF(mask); + KVSCF(tqmask); KVSCF(me); KVSCF(msgtype); KVSCF(newCKEYWORDWORKAROUND); @@ -131,7 +131,7 @@ namespace KviKvsCoreFunctions KVSCF(trueCKEYWORDWORKAROUND); KVSCF(typeofCKEYWORDWORKAROUND); KVSCF(u); - KVSCF(unicode); + KVSCF(tqunicode); KVSCF(unixtime); KVSCF(unserialize); KVSCF(username); @@ -140,7 +140,7 @@ namespace KviKvsCoreFunctions // specials KVSCF(strayAt); KVSCF(mightBeStrayAtOrThis); - //bool redirectToModule(const QString &szFrom,const QString &szModName,const QString &szFuncName + //bool redirectToModule(const TQString &szFrom,const TQString &szModName,const TQString &szFuncName void init(); }; diff --git a/src/kvirc/kvs/kvi_kvs_corefunctions_af.cpp b/src/kvirc/kvs/kvi_kvs_corefunctions_af.cpp index 0fba8d70..508ec52d 100644 --- a/src/kvirc/kvs/kvi_kvs_corefunctions_af.cpp +++ b/src/kvirc/kvs/kvi_kvs_corefunctions_af.cpp @@ -108,7 +108,7 @@ namespace KviKvsCoreFunctions @syntax: $ascii() @description: - This function has been renamed to $unicode and is present + This function has been renamed to $tqunicode and is present only for backward compatibility. @seealso: [fnc]$cr[/fnc], [fnc]$lf[/fnc], [fnc]$char[/fnc] @@ -139,7 +139,7 @@ namespace KviKvsCoreFunctions KVSCF(asciiToBase64) { - QString szAscii; + TQString szAscii; KVSCF_PARAMETERS_BEGIN KVSCF_PARAMETER("ascii_string",KVS_PT_STRING,0,szAscii) KVSCF_PARAMETERS_END @@ -149,9 +149,9 @@ namespace KviKvsCoreFunctions { KviStr tmp2; tmp2.bufferToBase64(tmp1.ptr(),tmp1.len()); - KVSCF_pRetBuffer->setString(QString(tmp2.ptr())); + KVSCF_pRetBuffer->setString(TQString(tmp2.ptr())); } else { - KVSCF_pRetBuffer->setString(QString::null); + KVSCF_pRetBuffer->setString(TQString()); } return true; } @@ -181,7 +181,7 @@ namespace KviKvsCoreFunctions KVSCF(asciiToHex) { - QString szAscii; + TQString szAscii; KVSCF_PARAMETERS_BEGIN KVSCF_PARAMETER("ascii_string",KVS_PT_STRING,0,szAscii) KVSCF_PARAMETERS_END @@ -191,9 +191,9 @@ namespace KviKvsCoreFunctions { KviStr tmp2; tmp2.bufferToHex(tmp1.ptr(),tmp1.len()); - KVSCF_pRetBuffer->setString(QString(tmp2.ptr())); + KVSCF_pRetBuffer->setString(TQString(tmp2.ptr())); } else { - KVSCF_pRetBuffer->setString(QString::null); + KVSCF_pRetBuffer->setString(TQString()); } return true; } @@ -320,7 +320,7 @@ namespace KviKvsCoreFunctions KVSCF(b) { - KVSCF_pRetBuffer->setString(QString(QChar(KVI_TEXT_BOLD))); + KVSCF_pRetBuffer->setString(TQString(TQChar(KVI_TEXT_BOLD))); return true; } @@ -344,7 +344,7 @@ namespace KviKvsCoreFunctions KVSCF(base64ToAscii) { - QString szBase64; + TQString szBase64; KVSCF_PARAMETERS_BEGIN KVSCF_PARAMETER("base64_encoded_string",KVS_PT_STRING,0,szBase64) KVSCF_PARAMETERS_END @@ -352,7 +352,7 @@ namespace KviKvsCoreFunctions KviStr tmp1(szBase64); char * buf; int len = tmp1.base64ToBuffer(&buf,true); - KVSCF_pRetBuffer->setString(QString(buf)); + KVSCF_pRetBuffer->setString(TQString(buf)); KviStr::freeBuffer(buf); return true; } @@ -444,7 +444,7 @@ namespace KviKvsCoreFunctions KVSCF(channel) { - QString szName; + TQString szName; kvs_uint_t uContextId; KVSCF_PARAMETERS_BEGIN KVSCF_PARAMETER("channel_name",KVS_PT_NONEMPTYSTRING,KVS_PF_OPTIONAL,szName) @@ -489,30 +489,30 @@ namespace KviKvsCoreFunctions @title: $char @short: - Returns a character specified by unicode + Returns a character specified by tqunicode @syntax: - $char() + $char() @description: - Returns a character corresponding to the UNICODE code .[br] + Returns a character corresponding to the UNICODE code .[br] This function can not return NUL character (UNICODE 0). Basically you should never need it: if you do, drop me a mail.[br] - If the is not a valid UNICODE code (or is 0), this function returns + If the is not a valid UNICODE code (or is 0), this function returns an empty string.[br] @seealso: - [fnc]$cr[/fnc], [fnc]$lf[/fnc], [fnc]$unicode[/fnc] + [fnc]$cr[/fnc], [fnc]$lf[/fnc], [fnc]$tqunicode[/fnc] */ KVSCF(charCKEYWORDWORKAROUND) { kvs_uint_t ac; KVSCF_PARAMETERS_BEGIN - KVSCF_PARAMETER("unicode_value",KVS_PT_UINT,0,ac) + KVSCF_PARAMETER("tqunicode_value",KVS_PT_UINT,0,ac) KVSCF_PARAMETERS_END if(ac != 0 && ac < 65536) - KVSCF_pRetBuffer->setString(QString(QChar((unsigned short)ac))); + KVSCF_pRetBuffer->setString(TQString(TQChar((unsigned short)ac))); else - KVSCF_pRetBuffer->setString(QString::null); + KVSCF_pRetBuffer->setString(TQString()); return true; } @@ -535,7 +535,7 @@ namespace KviKvsCoreFunctions KVSCF(classDefined) { // prologue: parameter handling - QString szClassName; + TQString szClassName; KVSCF_PARAMETERS_BEGIN KVSCF_PARAMETER("className",KVS_PT_NONEMPTYSTRING,0,szClassName) @@ -627,7 +627,7 @@ namespace KviKvsCoreFunctions KVSCF(context) { - QString szServer,szNick; + TQString szServer,szNick; KVSCF_PARAMETERS_BEGIN KVSCF_PARAMETER("server",KVS_PT_STRING,KVS_PF_OPTIONAL,szServer) KVSCF_PARAMETER("nick",KVS_PT_STRING,KVS_PF_OPTIONAL,szNick) @@ -665,7 +665,7 @@ namespace KviKvsCoreFunctions KVSCF(cr) { - KVSCF_pRetBuffer->setString(QString(QChar('\r'))); + KVSCF_pRetBuffer->setString(TQString(TQChar('\r'))); return true; } @@ -761,7 +761,7 @@ namespace KviKvsCoreFunctions KVSCF(date) { - QString szFormat; + TQString szFormat; kvs_int_t iTime; KVSCF_PARAMETERS_BEGIN KVSCF_PARAMETER("format",KVS_PT_NONEMPTYSTRING,0,szFormat) @@ -771,24 +771,24 @@ namespace KviKvsCoreFunctions KviStr tmpFormat(""); #ifdef COMPILE_ON_WINDOWS - QString szAllowedCharacters; + TQString szAllowedCharacters; //windows version of strftime() //kvirc crashes if other then these characters get an % character in front of them szAllowedCharacters = "AaBbcdHIjMmpSUWwXxYyZz"; #endif - const QChar * c = KviQString::nullTerminatedArray(szFormat); + const TQChar * c = KviTQString::nullTerminatedArray(szFormat); if(c) { - while(c->unicode()) + while(c->tqunicode()) { //Check for right Characters #ifdef COMPILE_ON_WINDOWS - if (szAllowedCharacters.find((char)(c->unicode()),0,true) >= 0) tmpFormat += '%'; + if (szAllowedCharacters.tqfind((char)(c->tqunicode()),0,true) >= 0) tmpFormat += '%'; #else if (c->isLetter()) tmpFormat += '%'; #endif - tmpFormat += (char)(c->unicode()); + tmpFormat += (char)(c->tqunicode()); c++; } } @@ -804,7 +804,7 @@ namespace KviKvsCoreFunctions { KviStr tmp = buf; if(tmp.lastCharIs('\n'))tmp.cutRight(1); - KVSCF_pRetBuffer->setString(QString(buf)); + KVSCF_pRetBuffer->setString(TQString(buf)); } else { KVSCF_pContext->warning(__tr2qs("The specified format string wasn't accepted by the underlying system time formatting function")); } @@ -900,7 +900,7 @@ namespace KviKvsCoreFunctions KVSCF(features) { - QString szFeature; + TQString szFeature; KVSCF_PARAMETERS_BEGIN KVSCF_PARAMETER("test_feature",KVS_PT_STRING,KVS_PF_OPTIONAL,szFeature) KVSCF_PARAMETERS_END @@ -948,9 +948,9 @@ namespace KviKvsCoreFunctions "ScriptToolBar", #endif // COMPILE_SCRIPTTOOLBAR #ifdef COMPILE_USE_QT4 - "Qt4", + "TQt4", #else - "Qt3", + "TQt3", #endif #ifdef COMPILE_NEW_KVS "KVS", @@ -962,7 +962,7 @@ namespace KviKvsCoreFunctions { for(int i=0;feature_array[i];i++) { - if(KviQString::equalCI(feature_array[i],szFeature)) + if(KviTQString::equalCI(feature_array[i],szFeature)) { KVSCF_pRetBuffer->setBoolean(true); return true; @@ -972,7 +972,7 @@ namespace KviKvsCoreFunctions } else { KviKvsArray * a = new KviKvsArray(); int id = 0; - for(int i=0;feature_array[i];i++)a->set(i,new KviKvsVariant(QString(feature_array[i]))); + for(int i=0;feature_array[i];i++)a->set(i,new KviKvsVariant(TQString(feature_array[i]))); KVSCF_pRetBuffer->setArray(a); } @@ -1111,18 +1111,18 @@ namespace KviKvsCoreFunctions KVSCF(fmtlink) { - QString szLinkText,szCmd,szToolTip; + TQString szLinkText,szCmd,szToolTip; KVSCF_PARAMETERS_BEGIN KVSCF_PARAMETER("link_text",KVS_PT_NONEMPTYSTRING,0,szLinkText) KVSCF_PARAMETER("double_click_command",KVS_PT_STRING,0,szCmd) KVSCF_PARAMETER("tooltip_text",KVS_PT_STRING,KVS_PF_OPTIONAL,szToolTip) KVSCF_PARAMETERS_END - QString szPart; - KviQString::sprintf(szPart,"[!dbl]%Q",&szCmd); - if(!szToolTip.isEmpty())KviQString::appendFormatted(szPart,"[!txt]%Q",&szToolTip); - QString szLink; - KviQString::sprintf(szLink,"\r!%Q\r%Q\r",&szPart,&szLinkText); + TQString szPart; + KviTQString::sprintf(szPart,"[!dbl]%Q",&szCmd); + if(!szToolTip.isEmpty())KviTQString::appendFormatted(szPart,"[!txt]%Q",&szToolTip); + TQString szLink; + KviTQString::sprintf(szLink,"\r!%Q\r%Q\r",&szPart,&szLinkText); KVSCF_pRetBuffer->setString(szLink); return true; } diff --git a/src/kvirc/kvs/kvi_kvs_corefunctions_gl.cpp b/src/kvirc/kvs/kvi_kvs_corefunctions_gl.cpp index ce8728d1..4e9f3c72 100644 --- a/src/kvirc/kvs/kvi_kvs_corefunctions_gl.cpp +++ b/src/kvirc/kvs/kvi_kvs_corefunctions_gl.cpp @@ -41,7 +41,7 @@ #include "kvi_time.h" #include "kvi_kvs_eventmanager.h" #include "kvi_kvs_eventhandler.h" -#include +#include #include "kvi_lagmeter.h" namespace KviKvsCoreFunctions @@ -88,7 +88,7 @@ namespace KviKvsCoreFunctions { KviKvsVariant * val = KVSCF_pParams->next(); if(!val)break; - QString sz; + TQString sz; key->asString(sz); a->set(sz,new KviKvsVariant(*val)); } @@ -122,7 +122,7 @@ namespace KviKvsCoreFunctions KVSCF(hexToAscii) { - QString szHex; + TQString szHex; KVSCF_PARAMETERS_BEGIN KVSCF_PARAMETER("hex_encoded_string",KVS_PT_STRING,0,szHex) KVSCF_PARAMETERS_END @@ -130,7 +130,7 @@ namespace KviKvsCoreFunctions KviStr tmp1(szHex); char * buf; int len = tmp1.hexToBuffer(&buf,true); - KVSCF_pRetBuffer->setString(QString(KviQCString(buf,len+1))); + KVSCF_pRetBuffer->setString(TQString(KviTQCString(buf,len+1))); KviStr::freeBuffer(buf); return true; } @@ -172,7 +172,7 @@ namespace KviKvsCoreFunctions KVSCF(hostname) { - QString szNick; + TQString szNick; KVSCF_PARAMETERS_BEGIN KVSCF_PARAMETER("nick",KVS_PT_NONEMPTYSTRING,0,szNick) @@ -182,7 +182,7 @@ namespace KviKvsCoreFunctions { if(KVSCF_pContext->window()->console()->isConnected()) { - KviIrcUserEntry * e = KVSCF_pContext->window()->connection()->userDataBase()->find(szNick); + KviIrcUserEntry * e = KVSCF_pContext->window()->connection()->userDataBase()->tqfind(szNick); if(e) { KVSCF_pRetBuffer->setString(e->host()); @@ -289,7 +289,7 @@ namespace KviKvsCoreFunctions KVSCF(icon) { - QString szName; + TQString szName; KVSCF_PARAMETERS_BEGIN KVSCF_PARAMETER("iconName",KVS_PT_NONEMPTYSTRING,0,szName) KVSCF_PARAMETERS_END @@ -511,7 +511,7 @@ namespace KviKvsCoreFunctions KVSCF(isEventEnabled) { - QString szEventName,szHandlerName; + TQString szEventName,szHandlerName; KviKvsScriptEventHandler *h=0; KVSCF_PARAMETERS_BEGIN @@ -635,7 +635,7 @@ namespace KviKvsCoreFunctions KVSCF(isTimer) { - QString szName; + TQString szName; KVSCF_PARAMETERS_BEGIN KVSCF_PARAMETER("timerName",KVS_PT_NONEMPTYSTRING,0,szName) @@ -668,7 +668,7 @@ namespace KviKvsCoreFunctions KVSCF(isWellKnown) { - QString szNick; + TQString szNick; KVSCF_PARAMETERS_BEGIN KVSCF_PARAMETER("nick",KVS_PT_NONEMPTYSTRING,0,szNick) @@ -678,7 +678,7 @@ namespace KviKvsCoreFunctions { if(KVSCF_pContext->window()->console()->isConnected()) { - KviIrcUserEntry * e = KVSCF_pContext->window()->connection()->userDataBase()->find(szNick); + KviIrcUserEntry * e = KVSCF_pContext->window()->connection()->userDataBase()->tqfind(szNick); if(e) { KVSCF_pRetBuffer->setBoolean(e->hasHost() && e->hasUser()); @@ -705,7 +705,7 @@ namespace KviKvsCoreFunctions $k([,]) $k @description: - Returns the COLOR mIRC control character (Qt::CTRL+K).[br] + Returns the COLOR mIRC control character (TQt::CTRL+K).[br] If and are passed, a standard mIRC color escape is returned.[br] @seealso: @@ -720,12 +720,12 @@ namespace KviKvsCoreFunctions KVSCF_PARAMETER("background",KVS_PT_UINT,KVS_PF_OPTIONAL,iBack) KVSCF_PARAMETERS_END - QString szRet = QChar(KVI_TEXT_COLOR); + TQString szRet = TQChar(KVI_TEXT_COLOR); if(KVSCF_pParams->count() > 0) { - KviQString::appendFormatted(szRet,"%u",iFore); + KviTQString::appendFormatted(szRet,"%u",iFore); if(KVSCF_pParams->count() > 1) - KviQString::appendFormatted(szRet,",%u",iBack); + KviTQString::appendFormatted(szRet,",%u",iBack); } KVSCF_pRetBuffer->setString(szRet); return true; @@ -794,13 +794,13 @@ namespace KviKvsCoreFunctions KVSCF(lang) { - QString szType; + TQString szType; KVSCF_PARAMETERS_BEGIN KVSCF_PARAMETER("type",KVS_PT_NONEMPTYSTRING,KVS_PF_OPTIONAL,szType) KVSCF_PARAMETERS_END - QString szLocale(KviLocale::localeName().ptr()); + TQString szLocale(KviLocale::localeName().ptr()); if(szType=="lang") KVSCF_pRetBuffer->setString(szLocale.left(5)); else if(szType=="short") KVSCF_pRetBuffer->setString(szLocale.left(2)); else KVSCF_pRetBuffer->setString(szLocale); @@ -851,7 +851,7 @@ namespace KviKvsCoreFunctions break; default: { - QString tmp; + TQString tmp; pVar->asString(tmp); KVSCF_pRetBuffer->setInteger(tmp.length()); } @@ -880,7 +880,7 @@ namespace KviKvsCoreFunctions KVSCF(lf) { - KVSCF_pRetBuffer->setString(QString(QChar('\n'))); + KVSCF_pRetBuffer->setString(TQString(TQChar('\n'))); return true; } diff --git a/src/kvirc/kvs/kvi_kvs_corefunctions_mr.cpp b/src/kvirc/kvs/kvi_kvs_corefunctions_mr.cpp index 6316f1d7..d3d68ec0 100644 --- a/src/kvirc/kvs/kvi_kvs_corefunctions_mr.cpp +++ b/src/kvirc/kvs/kvi_kvs_corefunctions_mr.cpp @@ -48,22 +48,22 @@ namespace KviKvsCoreFunctions /////////////////////////////////////////////////////////////////////////////////////////////// /* - @doc: mask + @doc: tqmask @type: function @title: - $mask + $tqmask @short: - Retrieves the host mask of a user + Retrieves the host tqmask of a user @syntax: - $mask[([,])] + $tqmask[([,])] @description: - Returns the specified type of mask for the user with .[br] - If the host or username are not known, the mask may contain less information + Returns the specified type of tqmask for the user with .[br] + If the host or username are not known, the tqmask may contain less information than requested.[br] If the is not given it is assumed to be the current nickname.[br] - If is not given or is invalid, it is assumed to be 0.[br] - Available mask types:[br] + If is not given or is invalid, it is assumed to be 0.[br] + Available tqmask types:[br] 0 : nick!user@machine.host.top (nick!user@XXX.XXX.XXX.XXX) (default)[br] 1 : nick!user@*.abc.host.top (nick!user@XXX.XXX.XXX.*)[br] 2 : nick!user@*[br] @@ -92,33 +92,33 @@ namespace KviKvsCoreFunctions 25: nick!*user@*.host.top (nick!*user@XXX.XXX.*)[br] 26: *!*user@*.host.top (*!user@*XXX.XXX.*)[br] If some data is missing, these types may change:[br] - For example, if the hostname is missing, the mask type 3 or 4 may be reduced to type 5.[br] + For example, if the hostname is missing, the tqmask type 3 or 4 may be reduced to type 5.[br] If the user with is not found in the current IRC context user database, an empty string is returned.[br] - The masks 22-26 are the smart versions of the masks 17-21 that try take care of masked ip addresses - in the form xxx.xxx.INVALID-TOP-MASK. If a masked ip address is found then - the XXX.XXX.* or XXX.* host mask is returned instead of the (wrong) *.INVALID-TOP-MASK + The tqmasks 22-26 are the smart versions of the tqmasks 17-21 that try take care of tqmasked ip addresses + in the form xxx.xxx.INVALID-TOP-MASK. If a tqmasked ip address is found then + the XXX.XXX.* or XXX.* host tqmask is returned instead of the (wrong) *.INVALID-TOP-MASK @examples: @seealso: */ - KVSCF(mask) + KVSCF(tqmask) { - QString szNick; - kvs_uint_t maskType; + TQString szNick; + kvs_uint_t tqmaskType; KVSCF_PARAMETERS_BEGIN KVSCF_PARAMETER("nickname",KVS_PT_STRING,KVS_PF_OPTIONAL,szNick) - KVSCF_PARAMETER("maskType",KVS_PT_UINT,KVS_PF_OPTIONAL,maskType) + KVSCF_PARAMETER("tqmaskType",KVS_PT_UINT,KVS_PF_OPTIONAL,tqmaskType) KVSCF_PARAMETERS_END - if(maskType > 26) maskType = 0; + if(tqmaskType > 26) tqmaskType = 0; if(KVSCF_pContext->window()->console()) { if(KVSCF_pContext->window()->console()->isConnected()) { - KviIrcUserEntry * e = KVSCF_pContext->window()->connection()->userDataBase()->find(szNick.isEmpty() ? KVSCF_pContext->window()->connection()->currentNickName() : szNick); + KviIrcUserEntry * e = KVSCF_pContext->window()->connection()->userDataBase()->tqfind(szNick.isEmpty() ? KVSCF_pContext->window()->connection()->currentNickName() : szNick); if(e) { KviIrcMask u; @@ -126,8 +126,8 @@ namespace KviKvsCoreFunctions u.setUsername(e->user()); u.setHost(e->host()); - QString tmp; - u.mask(tmp,(KviIrcMask::MaskType)maskType); + TQString tmp; + u.tqmask(tmp,(KviIrcMask::MaskType)tqmaskType); KVSCF_pRetBuffer->setString(tmp); return true; } @@ -228,7 +228,7 @@ namespace KviKvsCoreFunctions KVSCF(msgtype) { - QString szName; + TQString szName; KVSCF_PARAMETERS_BEGIN KVSCF_PARAMETER("msg_type_color_set_name",KVS_PT_NONEMPTYSTRING,0,szName) KVSCF_PARAMETERS_END @@ -257,12 +257,12 @@ namespace KviKvsCoreFunctions @short: Creates a new object @syntax: - $new(,[ [,[,[,[...]]]]) + $new(,[ [,[,[,[...]]]]) @description: Creates a new instance of the object with - the parent object and the specified .[br] - and are optional: if not specified, - is assumed to be an empty string and default to 0 (parentless object).[br] + the tqparent object and the specified .[br] + and are optional: if not specified, + is assumed to be an empty string and default to 0 (tqparentless object).[br] Please see the [doc:objects]objects documentation[/doc] for more information.[br] @examples: [example] @@ -275,14 +275,14 @@ namespace KviKvsCoreFunctions KVSCF(newCKEYWORDWORKAROUND) { // prologue: parameter handling - QString szClassName; - QString szName; + TQString szClassName; + TQString szName; kvs_hobject_t hParent; KviKvsVariantList vList; KVSCF_PARAMETERS_BEGIN KVSCF_PARAMETER("className",KVS_PT_NONEMPTYSTRING,0,szClassName) - KVSCF_PARAMETER("parentHandle",KVS_PT_HOBJECT,KVS_PF_OPTIONAL,hParent) + KVSCF_PARAMETER("tqparentHandle",KVS_PT_HOBJECT,KVS_PF_OPTIONAL,hParent) KVSCF_PARAMETER("name",KVS_PT_STRING,KVS_PF_OPTIONAL,szName) KVSCF_PARAMETER("parameterList",KVS_PT_VARIANTLIST,KVS_PF_OPTIONAL,vList) KVSCF_PARAMETERS_END @@ -300,7 +300,7 @@ namespace KviKvsCoreFunctions pParent = KviKvsKernel::instance()->objectController()->lookupObject(hParent); if(!pParent) { - KVSCF_pContext->error(__tr2qs("The specified parent object does not exist")); + KVSCF_pContext->error(__tr2qs("The specified tqparent object does not exist")); return false; } } else { @@ -390,7 +390,7 @@ namespace KviKvsCoreFunctions KVSCF(o) { - KVSCF_pRetBuffer->setString(QString(QChar(KVI_TEXT_RESET))); + KVSCF_pRetBuffer->setString(TQString(TQChar(KVI_TEXT_RESET))); return true; } @@ -419,12 +419,12 @@ namespace KviKvsCoreFunctions KVSCF(option) { - QString szOpt; + TQString szOpt; // FIXME: This should return a variant in general KVSCF_PARAMETERS_BEGIN KVSCF_PARAMETER("optionName",KVS_PT_NONEMPTYSTRING,0,szOpt) KVSCF_PARAMETERS_END - QString tmp; + TQString tmp; if(g_pApp->getOptionString(szOpt,tmp))KVSCF_pRetBuffer->setString(tmp); else { KVSCF_pContext->warning(__tr2qs("There is no option named '%Q'"),&szOpt); @@ -467,7 +467,7 @@ namespace KviKvsCoreFunctions KVSCF(query) { - QString szName; + TQString szName; kvs_uint_t uContextId; KVSCF_PARAMETERS_BEGIN KVSCF_PARAMETER("query_name",KVS_PT_NONEMPTYSTRING,KVS_PF_OPTIONAL,szName) @@ -496,7 +496,7 @@ namespace KviKvsCoreFunctions } } } else { - if(KVSCF_pContext->window()->type() == KVI_WINDOW_TYPE_QUERY)wnd = KVSCF_pContext->window(); + if(KVSCF_pContext->window()->type() == KVI_WINDOW_TYPE_TQUERY)wnd = KVSCF_pContext->window(); } KVSCF_pRetBuffer->setInteger((kvs_int_t)(wnd ? wnd->numericId() : 0)); @@ -523,7 +523,7 @@ namespace KviKvsCoreFunctions KVSCF(r) { - KVSCF_pRetBuffer->setString(QString(QChar(KVI_TEXT_REVERSE))); + KVSCF_pRetBuffer->setString(TQString(TQChar(KVI_TEXT_REVERSE))); return true; } diff --git a/src/kvirc/kvs/kvi_kvs_corefunctions_sz.cpp b/src/kvirc/kvs/kvi_kvs_corefunctions_sz.cpp index 64b16c0d..8b4ef73c 100644 --- a/src/kvirc/kvs/kvi_kvs_corefunctions_sz.cpp +++ b/src/kvirc/kvs/kvi_kvs_corefunctions_sz.cpp @@ -73,7 +73,7 @@ namespace KviKvsCoreFunctions { ///////////////////////////////////////////////////////////////////////////////////////// - // FIXME: #warning "THIS HAS TO WORK FOR QUERIES TOO!" + // FIXME: #warning "THIS HAS TO WORK FOR TQUERIES TOO!" /* @doc: selected @type: @@ -106,7 +106,7 @@ namespace KviKvsCoreFunctions KVSCF(selected) { - QString winId; + TQString winId; KVSCF_PARAMETERS_BEGIN KVSCF_PARAMETER("winId",KVS_PT_NONEMPTYSTRING,KVS_PF_OPTIONAL,winId) KVSCF_PARAMETERS_END @@ -135,7 +135,7 @@ namespace KviKvsCoreFunctions KviKvsArray * a = new KviKvsArray(); kvs_int_t i = 0; - for(QString * s = ((KviChannel *)wnd)->firstSelectedNickname();s;s = ((KviChannel *)wnd)->nextSelectedNickname()) + for(TQString * s = ((KviChannel *)wnd)->firstSelectedNickname();s;s = ((KviChannel *)wnd)->nextSelectedNickname()) { a->set(i,new KviKvsVariant(*s)); i++; @@ -187,7 +187,7 @@ namespace KviKvsCoreFunctions KVSCF(serialize) { KviKvsVariant *pVar = 0; - QString szBuffer; + TQString szBuffer; KVSCF_PARAMETERS_BEGIN KVSCF_PARAMETER("data",KVS_PT_VARIANT,0,pVar) @@ -332,7 +332,7 @@ namespace KviKvsCoreFunctions KVSCF_PARAMETER("data",KVS_PT_VARIANT,0,v) KVSCF_PARAMETERS_END - QString szVal; + TQString szVal; v->asString(szVal); KVSCF_pRetBuffer->setString(szVal); return true; @@ -378,8 +378,8 @@ namespace KviKvsCoreFunctions KVSCF(sw) { - QString szSwitch; - QString szLongSwitch; + TQString szSwitch; + TQString szLongSwitch; KVSCF_PARAMETERS_BEGIN KVSCF_PARAMETER("switch_name",KVS_PT_STRING,0,szSwitch) @@ -399,14 +399,14 @@ namespace KviKvsCoreFunctions if(szSwitch.length() > 1) { if(szLongSwitch.isEmpty()) - v = sl->find(szSwitch); + v = sl->tqfind(szSwitch); else - v = sl->find(szSwitch[0].unicode(),szLongSwitch); + v = sl->tqfind(szSwitch[0].tqunicode(),szLongSwitch); }else { if(szLongSwitch.isEmpty()) - v = sl->find(szSwitch[0]); + v = sl->tqfind(szSwitch[0]); else - v = sl->find(szSwitch[0].unicode(),szLongSwitch); + v = sl->tqfind(szSwitch[0].tqunicode(),szLongSwitch); } if(v)KVSCF_pRetBuffer->copyFrom(*v); @@ -450,7 +450,7 @@ namespace KviKvsCoreFunctions KVSCF(target) { - QString winId; + TQString winId; KVSCF_PARAMETERS_BEGIN KVSCF_PARAMETER("winId",KVS_PT_NONEMPTYSTRING,KVS_PF_OPTIONAL,winId) KVSCF_PARAMETERS_END @@ -470,7 +470,7 @@ namespace KviKvsCoreFunctions } //debug("CALLING $target on window %s",wnd->name()); - QString szTa = wnd->target(); + TQString szTa = wnd->target(); KVSCF_pRetBuffer->setString(wnd->target()); @@ -689,8 +689,8 @@ namespace KviKvsCoreFunctions KVSCF(tr) { // prologue: parameter handling - QString szString; - QString szCatalogue; + TQString szString; + TQString szCatalogue; KVSCF_PARAMETERS_BEGIN KVSCF_PARAMETER("default_language_string",KVS_PT_STRING,0,szString) @@ -698,17 +698,17 @@ namespace KviKvsCoreFunctions KVSCF_PARAMETERS_END if(szString.isEmpty()) return true; // body: the real job - QString translation; + TQString translation; if(!szCatalogue.isEmpty()) { KviMessageCatalogue * pCat = KviLocale::getLoadedCatalogue(szCatalogue); if(pCat) { - translation = pCat->translateToQString(szString); + translation = pCat->translateToTQString(szString); } else { // attempt to load it automatically - QString szDir; + TQString szDir; g_pApp->getLocalKvircDirectory(szDir,KviApp::Locale); if(!KviLocale::loadCatalogue(szCatalogue,szDir)) { @@ -808,7 +808,7 @@ namespace KviKvsCoreFunctions KVSCF_PARAMETER("data",KVS_PT_VARIANT,0,v) KVSCF_PARAMETERS_END - QString szType; + TQString szType; v->getTypeName(szType); KVSCF_pRetBuffer->setString(szType); #endif @@ -835,22 +835,22 @@ namespace KviKvsCoreFunctions KVSCF(u) { - KVSCF_pRetBuffer->setString(QString(QChar(KVI_TEXT_UNDERLINE))); + KVSCF_pRetBuffer->setString(TQString(TQChar(KVI_TEXT_UNDERLINE))); return true; } ///////////////////////////////////////////////////////////////////////////////////////// /* - @doc: unicode + @doc: tqunicode @type: function @title: - $unicode + $tqunicode @short: Returns the UNICODE code of a sets of characters @syntax: - $unicode() + $tqunicode() @description: If is composed only of a single character then returns its UNICODE code point as an integer. @@ -860,9 +860,9 @@ namespace KviKvsCoreFunctions [fnc]$cr[/fnc], [fnc]$lf[/fnc], [fnc]$char[/fnc] */ - KVSCF(unicode) + KVSCF(tqunicode) { - QString sz; + TQString sz; KVSCF_PARAMETERS_BEGIN KVSCF_PARAMETER("char",KVS_PT_NONEMPTYSTRING,0,sz) KVSCF_PARAMETERS_END @@ -871,10 +871,10 @@ namespace KviKvsCoreFunctions { KviKvsArray * a = new KviKvsArray(); for(kvs_int_t i=0;iset(i,new KviKvsVariant((kvs_int_t)(sz[(int)i].unicode()))); + a->set(i,new KviKvsVariant((kvs_int_t)(sz[(int)i].tqunicode()))); KVSCF_pRetBuffer->setArray(a); } else { - KVSCF_pRetBuffer->setInteger((kvs_int_t)(sz[0].unicode())); + KVSCF_pRetBuffer->setInteger((kvs_int_t)(sz[0].tqunicode())); } return true; } @@ -922,7 +922,7 @@ namespace KviKvsCoreFunctions KVSCF(unserialize) { - QString szData; + TQString szData; KVSCF_PARAMETERS_BEGIN KVSCF_PARAMETER("data",KVS_PT_NONEMPTYSTRING,0,szData) @@ -971,7 +971,7 @@ namespace KviKvsCoreFunctions KVSCF(username) { - QString szNick; + TQString szNick; KVSCF_PARAMETERS_BEGIN KVSCF_PARAMETER("nick",KVS_PT_NONEMPTYSTRING,0,szNick) @@ -981,7 +981,7 @@ namespace KviKvsCoreFunctions { if(KVSCF_pContext->window()->console()->isConnected()) { - KviIrcUserEntry * e = KVSCF_pContext->window()->connection()->userDataBase()->find(szNick); + KviIrcUserEntry * e = KVSCF_pContext->window()->connection()->userDataBase()->tqfind(szNick); if(e) { KVSCF_pRetBuffer->setString(e->user()); @@ -1027,7 +1027,7 @@ namespace KviKvsCoreFunctions KVSCF(version) { - QString szType; + TQString szType; KVSCF_PARAMETERS_BEGIN KVSCF_PARAMETER("type",KVS_PT_STRING,KVS_PF_OPTIONAL,szType) KVSCF_PARAMETERS_END @@ -1035,9 +1035,9 @@ namespace KviKvsCoreFunctions if(szType.isEmpty()) KVSCF_pRetBuffer->setString(KVI_VERSION); else { - if(szType.find('r') != -1)KVSCF_pRetBuffer->setString(KVI_RELEASE_NAME); - else if(szType.find('s') != -1)KVSCF_pRetBuffer->setString(KVI_SOURCES_DATE); - else if(szType.find('b') != -1)KVSCF_pRetBuffer->setString(KVI_BUILD_DATE); + if(szType.tqfind('r') != -1)KVSCF_pRetBuffer->setString(KVI_RELEASE_NAME); + else if(szType.tqfind('s') != -1)KVSCF_pRetBuffer->setString(KVI_SOURCES_DATE); + else if(szType.tqfind('b') != -1)KVSCF_pRetBuffer->setString(KVI_BUILD_DATE); else KVSCF_pRetBuffer->setString(KVI_VERSION); } return true; @@ -1078,7 +1078,7 @@ namespace KviKvsCoreFunctions KVSCF(window) { //#warning "FIXME: the window identifiers could be numbers!" - QString szCaption; + TQString szCaption; kvs_int_t iContextId; // kvs_int_t is 64bit while int is 32 (and thus KVSCF_PARAMETER() crashes) KVSCF_PARAMETERS_BEGIN diff --git a/src/kvirc/kvs/kvi_kvs_coresimplecommands.cpp b/src/kvirc/kvs/kvi_kvs_coresimplecommands.cpp index a5979631..97a669f2 100644 --- a/src/kvirc/kvs/kvi_kvs_coresimplecommands.cpp +++ b/src/kvirc/kvs/kvi_kvs_coresimplecommands.cpp @@ -34,8 +34,8 @@ #include "kvi_locale.h" #include "kvi_kvs_treenode_command.h" -#include -#include +#include +#include namespace KviKvsCoreSimpleCommands { @@ -47,7 +47,7 @@ namespace KviKvsCoreSimpleCommands { \ KviKvsCoreSimpleCommandExecRoutine * r = new KviKvsCoreSimpleCommandExecRoutine; \ r->proc = KVI_PTR2MEMBER(KviKvsCoreSimpleCommands::__routine); \ - pKern->registerCoreSimpleCommandExecRoutine(QString(__cmdName),r); \ + pKern->registerCoreSimpleCommandExecRoutine(TQString(__cmdName),r); \ } // a_f _REGCMD("admin",rfc2812wrapper) @@ -141,12 +141,12 @@ namespace KviKvsCoreSimpleCommands bool multipleModeCommand(KviKvsRunTimeContext * __pContext,KviKvsVariantList * __pParams,KviKvsSwitchList * __pSwitches,char plusminus,char flag) { - QString szTokens; + TQString szTokens; KVSCSC_PARAMETERS_BEGIN KVSCSC_PARAMETER("tokens",KVS_PT_STRING,KVS_PF_APPENDREMAINING,szTokens) KVSCSC_PARAMETERS_END - KVSCSC_REQUIRE_CONNECTION + KVSCSC_RETQUIRE_CONNECTION if(KVSCSC_pWindow->type() != KVI_WINDOW_TYPE_CHANNEL) { @@ -154,16 +154,16 @@ namespace KviKvsCoreSimpleCommands return true; } - QStringList sl = QStringList::split(QRegExp("[, ]+"),szTokens,false); + TQStringList sl = TQStringList::split(TQRegExp("[, ]+"),szTokens,false); - KviQCString szFlags; - KviQCString szTarget = KVSCSC_pConnection->encodeText(KVSCSC_pWindow->windowName()); - KviQCString szMessage; + KviTQCString szFlags; + KviTQCString szTarget = KVSCSC_pConnection->encodeText(KVSCSC_pWindow->windowName()); + KviTQCString szMessage; int i = 0; - for(QStringList::Iterator it = sl.begin();it != sl.end();++it) + for(TQStringList::Iterator it = sl.begin();it != sl.end();++it) { - KviQCString szTxt = KVSCSC_pConnection->encodeText(*it); + KviTQCString szTxt = KVSCSC_pConnection->encodeText(*it); if(!szTxt.isEmpty()) { szFlags += flag; @@ -217,15 +217,15 @@ namespace KviKvsCoreSimpleCommands KVSCSC(rfc2812wrapper) { - QString szText; + TQString szText; KVSCSC_PARAMETERS_BEGIN KVSCSC_PARAMETER("text",KVS_PT_STRING,KVS_PF_OPTIONAL | KVS_PF_APPENDREMAINING,szText) KVSCSC_PARAMETERS_END - KVSCSC_REQUIRE_CONNECTION + KVSCSC_RETQUIRE_CONNECTION - KviQCString txt = KVSCSC_pConnection->encodeText(szText); - KviQCString cmd = KVSCSC_pConnection->encodeText(((KviKvsTreeNodeCommand *)(KVSCSC_pContext->defaultReportLocation()))->commandName()); + KviTQCString txt = KVSCSC_pConnection->encodeText(szText); + KviTQCString cmd = KVSCSC_pConnection->encodeText(((KviKvsTreeNodeCommand *)(KVSCSC_pContext->defaultReportLocation()))->commandName()); if(!KVSCSC_pConnection->sendFmtData("%s %s",cmd.data(),txt.data() ? txt.data() : "")) return KVSCSC_pContext->warningNoIrcConnection(); diff --git a/src/kvirc/kvs/kvi_kvs_coresimplecommands.h b/src/kvirc/kvs/kvi_kvs_coresimplecommands.h index 94acbdc6..9c773a99 100644 --- a/src/kvirc/kvs/kvi_kvs_coresimplecommands.h +++ b/src/kvirc/kvs/kvi_kvs_coresimplecommands.h @@ -46,7 +46,7 @@ KVS_PARAMETERS_END \ if(!KviKvsParameterProcessor::process(KVSCSC_pParams,KVSCSC_pContext,parameter_format_list))return false; -#define KVSCSC_REQUIRE_CONNECTION \ +#define KVSCSC_RETQUIRE_CONNECTION \ if(!KVSCSC_pContext->window()->context())return KVSCSC_pContext->errorNoIrcContext(); \ if(!KVSCSC_pContext->window()->connection())return KVSCSC_pContext->warningNoIrcConnection(); diff --git a/src/kvirc/kvs/kvi_kvs_coresimplecommands_af.cpp b/src/kvirc/kvs/kvi_kvs_coresimplecommands_af.cpp index c3911a30..cf86ed6c 100644 --- a/src/kvirc/kvs/kvi_kvs_coresimplecommands_af.cpp +++ b/src/kvirc/kvs/kvi_kvs_coresimplecommands_af.cpp @@ -48,7 +48,7 @@ #include // for usleep(); #ifdef COMPILE_USE_QT4 - #include + #include #define get_xdisplay QX11Info::display #else #define get_xdisplay qt_xdisplay @@ -113,16 +113,16 @@ namespace KviKvsCoreSimpleCommands KVSCSC(away) { - QString szReason; + TQString szReason; KVSCSC_PARAMETERS_BEGIN KVSCSC_PARAMETER("reason",KVS_PT_STRING,KVS_PF_OPTIONAL | KVS_PF_APPENDREMAINING,szReason) KVSCSC_PARAMETERS_END - KVSCSC_REQUIRE_CONNECTION + KVSCSC_RETQUIRE_CONNECTION if(szReason.isEmpty())szReason = KVI_OPTION_STRING(KviOption_stringAwayMessage); - if(KVSCSC_pSwitches->find('a',"all-networks")) + if(KVSCSC_pSwitches->tqfind('a',"all-networks")) { KviPointerHashTableIterator it(*g_pGlobalWindowDict); while(KviWindow * wnd = it.current()) @@ -138,7 +138,7 @@ namespace KviKvsCoreSimpleCommands ++it; } } else { - KviQCString szR = KVSCSC_pConnection->encodeText(szReason); + KviTQCString szR = KVSCSC_pConnection->encodeText(szReason); if(!(KVSCSC_pConnection->sendFmtData("AWAY :%s",szR.data()))) return KVSCSC_pContext->warningNoIrcConnection(); } @@ -176,7 +176,7 @@ namespace KviKvsCoreSimpleCommands KVSCSC(back) { - if(KVSCSC_pSwitches->find('a',"all-networks")) + if(KVSCSC_pSwitches->tqfind('a',"all-networks")) { KviPointerHashTableIterator it(*g_pGlobalWindowDict); while(KviWindow * wnd = it.current()) @@ -190,7 +190,7 @@ namespace KviKvsCoreSimpleCommands ++it; } } else { - KVSCSC_REQUIRE_CONNECTION + KVSCSC_RETQUIRE_CONNECTION if(!(KVSCSC_pConnection->sendFmtData("AWAY"))) return KVSCSC_pContext->warningNoIrcConnection(); @@ -208,11 +208,11 @@ namespace KviKvsCoreSimpleCommands @title: ban @syntax: - ban + ban @short: - Sets ban masks for the channel + Sets ban tqmasks for the channel @description: - Sets the ban masks specified in the , + Sets the ban tqmasks specified in the , which is a comma separated list of nicknames. This command works only if executed in a channel window. The command is translated to a set of MODE messages containing @@ -291,10 +291,10 @@ namespace KviKvsCoreSimpleCommands kvs_int_t pitch = -1; kvs_int_t duration = -1; - bool bSync = (KVSCSC_pSwitches->find('s',"sync") != 0); + bool bSync = (KVSCSC_pSwitches->tqfind('s',"sync") != 0); bool bOk = false; - KviKvsVariant * pPitch = KVSCSC_pSwitches->find('p',"pitch"); + KviKvsVariant * pPitch = KVSCSC_pSwitches->tqfind('p',"pitch"); if(pPitch) { if(!pPitch->asInteger(pitch)) @@ -304,7 +304,7 @@ namespace KviKvsCoreSimpleCommands } } - KviKvsVariant * pDuration = KVSCSC_pSwitches->find('d',"duration"); + KviKvsVariant * pDuration = KVSCSC_pSwitches->tqfind('d',"duration"); if(pDuration) { if(!pDuration->asInteger(duration)) @@ -328,19 +328,19 @@ namespace KviKvsCoreSimpleCommands XGetKeyboardControl(get_xdisplay(),&st); - unsigned long mask = KBBellPercent; + unsigned long tqmask = KBBellPercent; ctl.bell_percent = uVolume; if(pitch >= 0) { ctl.bell_pitch = pitch; - mask |= KBBellPitch; + tqmask |= KBBellPitch; } if(duration >= 0) { ctl.bell_duration = duration; - mask |= KBBellDuration; + tqmask |= KBBellDuration; } - XChangeKeyboardControl(get_xdisplay(),mask,&ctl); + XChangeKeyboardControl(get_xdisplay(),tqmask,&ctl); XBell(get_xdisplay(),100); @@ -354,7 +354,7 @@ namespace KviKvsCoreSimpleCommands ctl.bell_duration = st.bell_duration; ctl.bell_percent = st.bell_percent; - XChangeKeyboardControl(get_xdisplay(),mask,&ctl); + XChangeKeyboardControl(get_xdisplay(),tqmask,&ctl); #endif //COMPILE_NO_X_BELL #endif @@ -398,7 +398,7 @@ namespace KviKvsCoreSimpleCommands KVSCSC(buttonctl) { - QString tbTypeUnused,tbName,tbOp,tbPar; + TQString tbTypeUnused,tbName,tbOp,tbPar; KVSCSC_PARAMETERS_BEGIN KVSCSC_PARAMETER("type",KVS_PT_STRING,0,tbTypeUnused) KVSCSC_PARAMETER("name",KVS_PT_STRING,0,tbName) @@ -410,7 +410,7 @@ namespace KviKvsCoreSimpleCommands if(!KVSCSC_pWindow->buttonContainer()) { - if(!KVSCSC_pSwitches->find('q',"quiet"))KVSCSC_pContext->warning(__tr2qs("The specified window has no button containers")); + if(!KVSCSC_pSwitches->tqfind('q',"quiet"))KVSCSC_pContext->warning(__tr2qs("The specified window has no button containers")); return true; } @@ -418,16 +418,16 @@ namespace KviKvsCoreSimpleCommands if(!pButton) { - if(!KVSCSC_pSwitches->find('q',"quiet"))KVSCSC_pContext->warning(__tr2qs("No button with type %Q named %Q"),&tbTypeUnused,&tbName); + if(!KVSCSC_pSwitches->tqfind('q',"quiet"))KVSCSC_pContext->warning(__tr2qs("No button with type %Q named %Q"),&tbTypeUnused,&tbName); return true; } - QChar o; + TQChar o; if (tbOp.length() > 0) o=tbOp[0]; - else o=QChar('x'); + else o=TQChar('x'); - // QChar o = tbOp.length() > 0 ? tbOp[0] : QChar('x'); + // TQChar o = tbOp.length() > 0 ? tbOp[0] : TQChar('x'); - switch(o.unicode()) + switch(o.tqunicode()) { case 't': KviTalToolTip::remove(pButton); @@ -437,12 +437,12 @@ namespace KviKvsCoreSimpleCommands case 'i': if(!tbPar.isEmpty()) { - QPixmap * pix = g_pIconManager->getImage(tbPar); + TQPixmap * pix = g_pIconManager->getImage(tbPar); if(pix) { pButton->setButtonPixmap(*pix); } else { - if(!KVSCSC_pSwitches->find('q',"quiet"))KVSCSC_pContext->warning(__tr2qs("Can't find the icon '%Q'"),&tbPar); + if(!KVSCSC_pSwitches->tqfind('q',"quiet"))KVSCSC_pContext->warning(__tr2qs("Can't find the icon '%Q'"),&tbPar); } } break; @@ -508,26 +508,26 @@ namespace KviKvsCoreSimpleCommands KVSCSC(ctcp) { - QString szTarget,szCtcpData; + TQString szTarget,szCtcpData; KVSCSC_PARAMETERS_BEGIN KVSCSC_PARAMETER("target",KVS_PT_NONEMPTYSTRING,0,szTarget) KVSCSC_PARAMETER("ctcp_data",KVS_PT_STRING,KVS_PF_OPTIONAL | KVS_PF_APPENDREMAINING,szCtcpData) KVSCSC_PARAMETERS_END - KVSCSC_REQUIRE_CONNECTION + KVSCSC_RETQUIRE_CONNECTION - if(KviQString::equalCI(szCtcpData,"PING")) + if(KviTQString::equalCI(szCtcpData,"PING")) { struct timeval tv; kvi_gettimeofday(&tv,0); - KviQString::appendFormatted(szCtcpData," %d.%d",tv.tv_sec,tv.tv_usec); + KviTQString::appendFormatted(szCtcpData," %d.%d",tv.tv_sec,tv.tv_usec); } - KviQCString szT = KVSCSC_pConnection->encodeText(szTarget); - KviQCString szD = KVSCSC_pConnection->encodeText(szCtcpData); + KviTQCString szT = KVSCSC_pConnection->encodeText(szTarget); + KviTQCString szD = KVSCSC_pConnection->encodeText(szCtcpData); if(!(KVSCSC_pConnection->sendFmtData("%s %s :%c%s%c", - KVSCSC_pSwitches->find('n',"notice") ? "NOTICE" : "PRIVMSG",szT.data(),0x01,szD.data(),0x01))) + KVSCSC_pSwitches->tqfind('n',"notice") ? "NOTICE" : "PRIVMSG",szT.data(),0x01,szD.data(),0x01))) return KVSCSC_pContext->warningNoIrcConnection(); return true; @@ -553,7 +553,7 @@ namespace KviKvsCoreSimpleCommands KVSCSC(debug) { - QString szAll; + TQString szAll; KVSCSC_pParams->allAsString(szAll); KviWindow * pWnd = KviDebugWindow::getInstance(); pWnd->outputNoFmt(KVI_OUT_NONE,szAll); @@ -628,16 +628,16 @@ namespace KviKvsCoreSimpleCommands KVSCSC_PARAMETERS_END if(hObject == (kvs_hobject_t)0) { - if(!KVSCSC_pSwitches->find('q',"quiet")) + if(!KVSCSC_pSwitches->tqfind('q',"quiet")) KVSCSC_pContext->warning(__tr2qs("Can't delete a null object reference")); } else { KviKvsObject * o = KviKvsKernel::instance()->objectController()->lookupObject(hObject); if(!o) { - if(!KVSCSC_pSwitches->find('q',"quiet")) + if(!KVSCSC_pSwitches->tqfind('q',"quiet")) KVSCSC_pContext->warning(__tr2qs("Can't delete an inexisting object")); } else { - if(KVSCSC_pSwitches->find('i',"immediate")) + if(KVSCSC_pSwitches->tqfind('i',"immediate")) o->dieNow(); else o->die(); @@ -679,7 +679,7 @@ namespace KviKvsCoreSimpleCommands KVSCSC(delpopupitem) { - QString szPopupName,szItemId; + TQString szPopupName,szItemId; KVSCSC_PARAMETERS_BEGIN KVSCSC_PARAMETER("popupname",KVS_PT_NONEMPTYSTRING,0,szPopupName) KVSCSC_PARAMETER("item_id",KVS_PT_NONEMPTYSTRING,0,szItemId) @@ -688,7 +688,7 @@ namespace KviKvsCoreSimpleCommands KviKvsPopupMenu * p = KviKvsPopupManager::instance()->lookup(szPopupName); if(!p) { - if(!KVSCSC_pSwitches->find('q',"quiet")) + if(!KVSCSC_pSwitches->tqfind('q',"quiet")) KVSCSC_pContext->warning(__tr2qs("Inexisting popup \"%Q\""),&szPopupName); return true; } @@ -699,9 +699,9 @@ namespace KviKvsCoreSimpleCommands return false; } - if(!p->removeItemByName(szItemId,KVSCSC_pSwitches->find('d',"deep"))) + if(!p->removeItemByName(szItemId,KVSCSC_pSwitches->tqfind('d',"deep"))) { - if(!KVSCSC_pSwitches->find('q',"quiet")) + if(!KVSCSC_pSwitches->tqfind('q',"quiet")) KVSCSC_pContext->warning(__tr2qs("The menu item with id \"%Q\" does not exist in popup \"%Q\""),&szItemId,&szPopupName); } @@ -840,7 +840,7 @@ namespace KviKvsCoreSimpleCommands KVSCSC(echo) { - QString szAll; + TQString szAll; KVSCSC_pParams->allAsString(szAll); kvs_int_t iMsgType = KVI_OUT_NONE; @@ -849,11 +849,11 @@ namespace KviKvsCoreSimpleCommands if(!KVSCSC_pSwitches->isEmpty()) { KviKvsVariant * v; - if((v = KVSCSC_pSwitches->find('w',"window"))) + if((v = KVSCSC_pSwitches->tqfind('w',"window"))) { - QString szWnd; + TQString szWnd; v->asString(szWnd); - //#warning "FIXME: the window database is not unicode! (we even could keep integer window id's at this point!)" + //#warning "FIXME: the window database is not tqunicode! (we even could keep integer window id's at this point!)" pWnd = g_pApp->findWindow(szWnd.utf8().data()); if(!pWnd) { @@ -862,7 +862,7 @@ namespace KviKvsCoreSimpleCommands } } - if((v = KVSCSC_pSwitches->find('i',"icon"))) + if((v = KVSCSC_pSwitches->tqfind('i',"icon"))) { if(!v->asInteger(iMsgType)) { @@ -873,13 +873,13 @@ namespace KviKvsCoreSimpleCommands } } - if(KVSCSC_pSwitches->find('d',"debug")) + if(KVSCSC_pSwitches->tqfind('d',"debug")) { pWnd = KviDebugWindow::getInstance(); } } - int iFlags = KVSCSC_pSwitches->find('n',"no-timestamp") ? KviIrcView::NoTimestamp : 0; + int iFlags = KVSCSC_pSwitches->tqfind('n',"no-timestamp") ? KviIrcView::NoTimestamp : 0; pWnd->outputNoFmt(iMsgType,szAll,iFlags); return true; } @@ -956,7 +956,7 @@ namespace KviKvsCoreSimpleCommands KVSCSC(echoprivmsg) { - QString szNick,szUser,szHost,szText; + TQString szNick,szUser,szHost,szText; KVSCSC_PARAMETERS_BEGIN KVSCSC_PARAMETER("nick",KVS_PT_NONEMPTYSTRING,0,szNick) KVSCSC_PARAMETER("user",KVS_PT_STRING,0,szUser) @@ -971,7 +971,7 @@ namespace KviKvsCoreSimpleCommands KviKvsVariant * v; - if(v = KVSCSC_pSwitches->find('i',"color-set")) + if(v = KVSCSC_pSwitches->tqfind('i',"color-set")) { kvs_int_t msgType; if(v->asInteger(msgType)) @@ -981,9 +981,9 @@ namespace KviKvsCoreSimpleCommands } else KVSCSC_pContext->warning(__tr2qs("Invalid color-set specification, using default")); } - if(v = KVSCSC_pSwitches->find('w',"window")) + if(v = KVSCSC_pSwitches->tqfind('w',"window")) { - QString szWin; + TQString szWin; v->asString(szWin); KviStr window = szWin; pWnd = g_pApp->findWindow(window.ptr()); @@ -994,30 +994,30 @@ namespace KviKvsCoreSimpleCommands } } - QString szPrefix,szSuffix; + TQString szPrefix,szSuffix; bool bPrefix = false; bool bSuffix = false; - if(v = KVSCSC_pSwitches->find('p',"prefix")) + if(v = KVSCSC_pSwitches->tqfind('p',"prefix")) { v->asString(szPrefix); bPrefix = true; } - if(v = KVSCSC_pSwitches->find('s',"suffix")) + if(v = KVSCSC_pSwitches->tqfind('s',"suffix")) { v->asString(szSuffix); bSuffix = true; } int iFlags = 0; - if(KVSCSC_pSwitches->find('n',"no-highlighting"))iFlags |= KviConsole::NoHighlighting; - if(KVSCSC_pSwitches->find('f',"no-flashing"))iFlags |= KviConsole::NoWindowFlashing; - if(KVSCSC_pSwitches->find('x',"no-notifier"))iFlags |= KviConsole::NoNotifier; + if(KVSCSC_pSwitches->tqfind('n',"no-highlighting"))iFlags |= KviConsole::NoHighlighting; + if(KVSCSC_pSwitches->tqfind('f',"no-flashing"))iFlags |= KviConsole::NoWindowFlashing; + if(KVSCSC_pSwitches->tqfind('x',"no-notifier"))iFlags |= KviConsole::NoNotifier; pConsole->outputPrivmsg(pWnd,type, szNick,szUser,szHost,szText, iFlags, - bPrefix ? szPrefix : QString::null,bSuffix ? szSuffix : QString::null); + bPrefix ? szPrefix : TQString(),bSuffix ? szSuffix : TQString()); return true; } @@ -1044,7 +1044,7 @@ namespace KviKvsCoreSimpleCommands KVSCSC(error) { #ifdef COMPILE_NEW_KVS - QString szAll; + TQString szAll; KVSCSC_pParams->allAsString(szAll); KVSCSC_pContext->error("%Q",&szAll); #endif @@ -1114,19 +1114,19 @@ namespace KviKvsCoreSimpleCommands KVSCSC(eval) { - QString szCommands; + TQString szCommands; KVSCSC_PARAMETERS_BEGIN KVSCSC_PARAMETER("commands",KVS_PT_STRING,KVS_PF_APPENDREMAINING,szCommands) KVSCSC_PARAMETERS_END KviKvsScript s("eval::inner",szCommands); int iRunFlags = 0; - if(KVSCSC_pContext->reportingDisabled() || KVSCSC_pSwitches->find('q',"quiet")) + if(KVSCSC_pContext->reportingDisabled() || KVSCSC_pSwitches->tqfind('q',"quiet")) iRunFlags |= KviKvsScript::Quiet; bool bRet = s.run(KVSCSC_pContext,iRunFlags) ? true : false; if(!bRet) { - if(!KVSCSC_pSwitches->find('f',"force")) + if(!KVSCSC_pSwitches->tqfind('f',"force")) return false; KVSCSC_pContext->clearError(); } @@ -1169,7 +1169,7 @@ namespace KviKvsCoreSimpleCommands */ KVSCSC(eventctl) { - QString szEventName,szHandlerName; + TQString szEventName,szHandlerName; KviKvsVariantList vList; KVSCSC_PARAMETERS_BEGIN KVSCSC_PARAMETER("event_name",KVS_PT_NONEMPTYSTRING,0,szEventName) @@ -1185,7 +1185,7 @@ namespace KviKvsCoreSimpleCommands { if(!KviKvsEventManager::instance()->isValidRawEvent(iNumber)) { - if(!KVSCSC_pSwitches->find('q',"quiet")) + if(!KVSCSC_pSwitches->tqfind('q',"quiet")) KVSCSC_pContext->warning(__tr2qs("No such event (%Q)"),&szEventName); return true; } @@ -1193,42 +1193,42 @@ namespace KviKvsCoreSimpleCommands iNumber = KviKvsEventManager::instance()->findAppEventIndexByName(szEventName); if(!KviKvsEventManager::instance()->isValidAppEvent(iNumber)) { - if(!KVSCSC_pSwitches->find('q',"quiet")) + if(!KVSCSC_pSwitches->tqfind('q',"quiet")) KVSCSC_pContext->warning(__tr2qs("No such event (%Q)"),&szEventName); return true; } } - if(KVSCSC_pSwitches->find('u',"unregister")) + if(KVSCSC_pSwitches->tqfind('u',"unregister")) { // unregister it if(bIsRaw) { if(!KviKvsEventManager::instance()->removeScriptRawHandler(iNumber,szHandlerName)) - if(!KVSCSC_pSwitches->find('q',"quiet")) + if(!KVSCSC_pSwitches->tqfind('q',"quiet")) KVSCSC_pContext->warning(__tr2qs("No handler '%Q' for raw numeric event '%d'"),&szHandlerName,iNumber); } else { if(!KviKvsEventManager::instance()->removeScriptAppHandler(iNumber,szHandlerName)) - if(!KVSCSC_pSwitches->find('q',"quiet")) + if(!KVSCSC_pSwitches->tqfind('q',"quiet")) KVSCSC_pContext->warning(__tr2qs("No handler '%Q' for event '%Q'"),&szHandlerName,&szEventName); } - } else if(KVSCSC_pSwitches->find('e',"enable") || KVSCSC_pSwitches->find('d',"disable")) + } else if(KVSCSC_pSwitches->tqfind('e',"enable") || KVSCSC_pSwitches->tqfind('d',"disable")) { // enable it if(bIsRaw) { - if(!KviKvsEventManager::instance()->enableScriptRawHandler(iNumber,szHandlerName,KVSCSC_pSwitches->find('e',"enable"))) - if(!KVSCSC_pSwitches->find('q',"quiet")) + if(!KviKvsEventManager::instance()->enableScriptRawHandler(iNumber,szHandlerName,KVSCSC_pSwitches->tqfind('e',"enable"))) + if(!KVSCSC_pSwitches->tqfind('q',"quiet")) KVSCSC_pContext->warning(__tr2qs("No handler '%Q' for raw numeric event '%d'"),&szHandlerName,iNumber); } else { - if(!KviKvsEventManager::instance()->enableScriptAppHandler(iNumber,szHandlerName,KVSCSC_pSwitches->find('e',"enable"))) - if(!KVSCSC_pSwitches->find('q',"quiet")) + if(!KviKvsEventManager::instance()->enableScriptAppHandler(iNumber,szHandlerName,KVSCSC_pSwitches->tqfind('e',"enable"))) + if(!KVSCSC_pSwitches->tqfind('q',"quiet")) KVSCSC_pContext->warning(__tr2qs("No handler '%Q' for event '%Q'"),&szHandlerName,&szEventName); } } else { // trigger it KviKvsScriptEventHandler * h; - QString code; + TQString code; if(bIsRaw) { @@ -1244,7 +1244,7 @@ namespace KviKvsCoreSimpleCommands KviKvsVariant retVal; copy.run(KVSCSC_pWindow,&vList,0,KviKvsScript::PreserveParams); } else { - if(!KVSCSC_pSwitches->find('q',"quiet")) + if(!KVSCSC_pSwitches->tqfind('q',"quiet")) KVSCSC_pContext->warning(__tr2qs("No handler '%Q' for event '%Q'"),&szHandlerName,&szEventName); } } diff --git a/src/kvirc/kvs/kvi_kvs_coresimplecommands_gl.cpp b/src/kvirc/kvs/kvi_kvs_coresimplecommands_gl.cpp index a43a33cf..43222d44 100644 --- a/src/kvirc/kvs/kvi_kvs_coresimplecommands_gl.cpp +++ b/src/kvirc/kvs/kvi_kvs_coresimplecommands_gl.cpp @@ -38,7 +38,7 @@ #include "kvi_out.h" #ifdef COMPILE_USE_QT4 - #include + #include #endif namespace KviKvsCoreSimpleCommands @@ -94,16 +94,16 @@ namespace KviKvsCoreSimpleCommands help run help help help index - help $mask + help $tqmask help /home/pragma/myfile.html [/example] */ - static bool file_in_path(QStringList &pathlist,QString &file) + static bool file_in_path(TQStringList &pathlist,TQString &file) { - for(QStringList::Iterator it = pathlist.begin();it != pathlist.end();++it) + for(TQStringList::Iterator it = pathlist.begin();it != pathlist.end();++it) { - QString tmp = *it; + TQString tmp = *it; tmp.append('/'); tmp.append(file); KviFileUtils::adjustFilePath(tmp); @@ -114,7 +114,7 @@ namespace KviKvsCoreSimpleCommands KVSCSC(help) { - QString szTopic; + TQString szTopic; KVSCSC_PARAMETERS_BEGIN KVSCSC_PARAMETER("topic",KVS_PT_STRING,KVS_PF_OPTIONAL | KVS_PF_APPENDREMAINING,szTopic) KVSCSC_PARAMETERS_END @@ -126,23 +126,23 @@ namespace KviKvsCoreSimpleCommands szTopic.stripWhiteSpace(); } - QString szCommand; + TQString szCommand; if(szTopic.isEmpty())szCommand = "help.open index.html"; else { bool bWasFunc = false; - if(szTopic[0] == QChar('$')) + if(szTopic[0] == TQChar('$')) { bWasFunc = true; szTopic.remove(0,1); } - QString szOriginal = szTopic; + TQString szOriginal = szTopic; - QString topik = szTopic; + TQString topik = szTopic; #ifdef COMPILE_USE_QT4 - QStringList pl = Q3MimeSourceFactory::defaultFactory()->filePath(); + TQStringList pl = Q3MimeSourceFactory::defaultFactory()->filePath(); #else - QStringList pl = QMimeSourceFactory::defaultFactory()->filePath(); + TQStringList pl = TQMimeSourceFactory::defaultFactory()->filePath(); #endif bool bLowCaseTried = false; @@ -285,14 +285,14 @@ try_again: KVSCSC(host) { - QString szQuery; + TQString szQuery; KVSCSC_PARAMETERS_BEGIN KVSCSC_PARAMETER("dnsquery",KVS_PT_NONEMPTYSTRING,0,szQuery) KVSCSC_PARAMETERS_END KviDns::QueryType queryType = KviDns::IpV4; - if(KVSCSC_pSwitches->find('i',"ipv6"))queryType = KviDns::IpV6; - if(KVSCSC_pSwitches->find('a',"any"))queryType = KviDns::Any; + if(KVSCSC_pSwitches->tqfind('i',"ipv6"))queryType = KviDns::IpV6; + if(KVSCSC_pSwitches->tqfind('a',"any"))queryType = KviDns::Any; KviKvsAsyncDnsOperation * op = new KviKvsAsyncDnsOperation( KVSCSC_pContext->window(), @@ -383,24 +383,24 @@ try_again: KVSCSC(join) { - QString szChans,szKeys; + TQString szChans,szKeys; KVSCSC_PARAMETERS_BEGIN KVSCSC_PARAMETER("chans",KVS_PT_NONEMPTYSTRING,0,szChans) KVSCSC_PARAMETER("keys",KVS_PT_STRING,KVS_PF_OPTIONAL,szKeys) KVSCSC_PARAMETERS_END - KVSCSC_REQUIRE_CONNECTION + KVSCSC_RETQUIRE_CONNECTION - QStringList slChans = QStringList::split(",",szChans); + TQStringList slChans = TQStringList::split(",",szChans); - QString szChanTypes = KVSCSC_pConnection->serverInfo()->supportedChannelTypes(); - for(QStringList::Iterator it=slChans.begin();it != slChans.end();++it) + TQString szChanTypes = KVSCSC_pConnection->serverInfo()->supportedChannelTypes(); + for(TQStringList::Iterator it=slChans.begin();it != slChans.end();++it) { if(!(*it).isEmpty()) { bool bFound = false; int id = 0; - QChar f = (*it)[0]; + TQChar f = (*it)[0]; while((id < szChanTypes.length()) && !bFound) { if(f == szChanTypes[id])bFound = true; @@ -412,14 +412,14 @@ try_again: } szChans = slChans.join(","); - KviQCString szEncodedChans = KVSCSC_pConnection->encodeText(szChans); + KviTQCString szEncodedChans = KVSCSC_pConnection->encodeText(szChans); if(szKeys.isEmpty()) { if(!(KVSCSC_pConnection->sendFmtData("JOIN %s",szEncodedChans.data()))) return KVSCSC_pContext->warningNoIrcConnection(); } else { - KviQCString szEncodedKeys = KVSCSC_pConnection->encodeText(szKeys); + KviTQCString szEncodedKeys = KVSCSC_pConnection->encodeText(szKeys); if(!(KVSCSC_pConnection->sendFmtData("JOIN %s %s",szEncodedChans.data(),szEncodedKeys.data()))) return KVSCSC_pContext->warningNoIrcConnection(); } @@ -451,14 +451,14 @@ try_again: KVSCSC(kick) { - QString szUser; - QString szReason; + TQString szUser; + TQString szReason; KVSCSC_PARAMETERS_BEGIN KVSCSC_PARAMETER("user",KVS_PT_NONEMPTYSTRING,0,szUser) KVSCSC_PARAMETER("reason",KVS_PT_STRING,KVS_PF_OPTIONAL | KVS_PF_APPENDREMAINING,szReason) KVSCSC_PARAMETERS_END - KVSCSC_REQUIRE_CONNECTION + KVSCSC_RETQUIRE_CONNECTION if(KVSCSC_pWindow->type() != KVI_WINDOW_TYPE_CHANNEL) { @@ -466,9 +466,9 @@ try_again: return false; } - KviQCString szC = KVSCSC_pConnection->encodeText(KVSCSC_pWindow->target()); - KviQCString szU = KVSCSC_pConnection->encodeText(szUser); - KviQCString szR = KVSCSC_pConnection->encodeText(szReason); + KviTQCString szC = KVSCSC_pConnection->encodeText(KVSCSC_pWindow->target()); + KviTQCString szU = KVSCSC_pConnection->encodeText(szUser); + KviTQCString szR = KVSCSC_pConnection->encodeText(szReason); if(szR.isEmpty()) { @@ -513,12 +513,12 @@ try_again: KVSCSC(killtimer) { - QString szName; + TQString szName; KVSCSC_PARAMETERS_BEGIN KVSCSC_PARAMETER("name",KVS_PT_STRING,KVS_PF_OPTIONAL,szName) KVSCSC_PARAMETERS_END - if(KVSCSC_pSwitches->find('a',"active")) + if(KVSCSC_pSwitches->tqfind('a',"active")) { KviKvsTimerManager::instance()->deleteAllTimers(); return true; @@ -528,13 +528,13 @@ try_again: { if(!KviKvsTimerManager::instance()->deleteCurrentTimer()) { - if(!KVSCSC_pSwitches->find('q',"quiet")) + if(!KVSCSC_pSwitches->tqfind('q',"quiet")) KVSCSC_pContext->warning(__tr2qs("Timer name omitted but there is not current timer (this is not a timer callback)")); } } else { if(!KviKvsTimerManager::instance()->deleteTimer(szName)) { - if(!KVSCSC_pSwitches->find('q',"quiet")) + if(!KVSCSC_pSwitches->tqfind('q',"quiet")) KVSCSC_pContext->warning(__tr2qs("Can't kill the timer '%Q' since it is not running"),&szName); } } @@ -616,12 +616,12 @@ try_again: KVSCSC(listtimers) { - KviPointerHashTable * pTimerDict = KviKvsTimerManager::instance()->timerDict(); + KviPointerHashTable * pTimerDict = KviKvsTimerManager::instance()->timerDict(); if(!pTimerDict) return true; - KviPointerHashTableIterator it(*pTimerDict); + KviPointerHashTableIterator it(*pTimerDict); KVSCSC_pContext->window()->outputNoFmt(KVI_OUT_VERBOSE,__tr2qs("List of active timers")); @@ -629,8 +629,8 @@ try_again: while(KviKvsTimer * pTimer = it.current()) { - QString szName = pTimer->name(); - QString szLifetime; + TQString szName = pTimer->name(); + TQString szLifetime; switch(pTimer->lifetime()) { case KviKvsTimer::Persistent: @@ -646,9 +646,9 @@ try_again: szLifetime = __tr2qs("Unknown"); break; } - QString szDelay; + TQString szDelay; szDelay.setNum(pTimer->delay()); - QString szWindow; + TQString szWindow; szWindow = pTimer->window() ? pTimer->window()->id() : __tr2qs("None"); KVSCSC_pContext->window()->output(KVI_OUT_VERBOSE, @@ -674,15 +674,15 @@ try_again: @title: lusers @syntax: - lusers [ [ ] ] + lusers [ [ ] ] @short: Requests statistics about users on IRC @description: The LUSERS command is used to get statistics about the size of the IRC network.[br]If no parameter is given, the reply will be about the - whole net.[br]If a is specified, then the reply will only + whole net.[br]If a is specified, then the reply will only concern the part of the network formed by the servers matching the - mask.[br]Finally, if the parameter is specified, the request + tqmask.[br]Finally, if the parameter is specified, the request is forwarded to that server which will generate the reply.[br] This command is a [doc:rfc2821wrappers]RFC2821 command wrapper[/doc]; see that document for more information.[br] */ diff --git a/src/kvirc/kvs/kvi_kvs_coresimplecommands_mr.cpp b/src/kvirc/kvs/kvi_kvs_coresimplecommands_mr.cpp index e0ac9174..9744b6fd 100644 --- a/src/kvirc/kvs/kvi_kvs_coresimplecommands_mr.cpp +++ b/src/kvirc/kvs/kvi_kvs_coresimplecommands_mr.cpp @@ -47,9 +47,9 @@ #include "kvi_kvs_script.h" #include "kvi_kvs_popupmanager.h" -#include -#include -#include +#include +#include +#include namespace KviKvsCoreSimpleCommands { @@ -78,17 +78,17 @@ namespace KviKvsCoreSimpleCommands KVSCSC(me) { - QString szText; + TQString szText; KVSCSC_PARAMETERS_BEGIN KVSCSC_PARAMETER("text",KVS_PT_STRING,KVS_PF_OPTIONAL | KVS_PF_APPENDREMAINING,szText) KVSCSC_PARAMETERS_END - KVSCSC_REQUIRE_CONNECTION + KVSCSC_RETQUIRE_CONNECTION switch(KVSCSC_pWindow->type()) { case KVI_WINDOW_TYPE_CHANNEL: - case KVI_WINDOW_TYPE_QUERY: + case KVI_WINDOW_TYPE_TQUERY: case KVI_WINDOW_TYPE_DCCCHAT: KVSCSC_pWindow->ownAction(szText); break; @@ -125,14 +125,14 @@ namespace KviKvsCoreSimpleCommands KVSCSC(mode) { - QString szText; + TQString szText; KVSCSC_PARAMETERS_BEGIN KVSCSC_PARAMETER("text",KVS_PT_STRING,KVS_PF_APPENDREMAINING,szText) KVSCSC_PARAMETERS_END - KVSCSC_REQUIRE_CONNECTION + KVSCSC_RETQUIRE_CONNECTION - KviQCString szTxt = KVSCSC_pConnection->encodeText(szText); + KviTQCString szTxt = KVSCSC_pConnection->encodeText(szText); if(!szTxt.isEmpty()) { @@ -212,14 +212,14 @@ namespace KviKvsCoreSimpleCommands KVSCSC(nick) { - QString szNick; + TQString szNick; KVSCSC_PARAMETERS_BEGIN KVSCSC_PARAMETER("nickname",KVS_PT_NONEMPTYSTRING,0,szNick) KVSCSC_PARAMETERS_END - KVSCSC_REQUIRE_CONNECTION + KVSCSC_RETQUIRE_CONNECTION - KviQCString szData = KVSCSC_pConnection->encodeText(szNick); + KviTQCString szData = KVSCSC_pConnection->encodeText(szNick); if(!szData.data())szData = ""; if(!KVSCSC_pConnection->sendFmtData("NICK %s",szData.data())) @@ -259,26 +259,26 @@ namespace KviKvsCoreSimpleCommands KVSCSC(notice) { - QString szTarget,szText; + TQString szTarget,szText; KVSCSC_PARAMETERS_BEGIN KVSCSC_PARAMETER("target",KVS_PT_NONEMPTYSTRING,0,szTarget) KVSCSC_PARAMETER("text",KVS_PT_STRING,KVS_PF_OPTIONAL | KVS_PF_APPENDREMAINING,szText) KVSCSC_PARAMETERS_END - KVSCSC_REQUIRE_CONNECTION + KVSCSC_RETQUIRE_CONNECTION KviWindow * w = KVSCSC_pConnection->findChannel(szTarget); if(!w)w = KVSCSC_pConnection->findQuery(szTarget); - KviQCString szT = KVSCSC_pConnection->encodeText(szTarget); - KviQCString szD = w ? w->encodeText(szText) : KVSCSC_pConnection->encodeText(szText); + KviTQCString szT = KVSCSC_pConnection->encodeText(szTarget); + KviTQCString szD = w ? w->encodeText(szText) : KVSCSC_pConnection->encodeText(szText); if(!szT.data())szT = ""; // encoding problems ? if(!szD.data())szD = ""; // encoding problems ? if(!(KVSCSC_pConnection->sendFmtData("NOTICE %s :%s",szT.data(),szD.data()))) return KVSCSC_pContext->warningNoIrcConnection(); - if(!KVSCSC_pSwitches->find('q',"quiet")) + if(!KVSCSC_pSwitches->tqfind('q',"quiet")) KVSCSC_pWindow->output(KVI_OUT_OWNPRIVMSG,"[NOTICE >>> %Q]: %Q",&szTarget,&szText); return true; @@ -355,37 +355,37 @@ namespace KviKvsCoreSimpleCommands KVSCSC(openurl) { - QString szUrl; + TQString szUrl; KVSCSC_PARAMETERS_BEGIN KVSCSC_PARAMETER("url",KVS_PT_NONEMPTYSTRING,KVS_PF_APPENDREMAINING,szUrl) KVSCSC_PARAMETERS_END - QString szCommand; - if(KviQString::equalCIN(szUrl,"www.",4)) + TQString szCommand; + if(KviTQString::equalCIN(szUrl,"www.",4)) { szCommand = KVI_OPTION_STRING(KviOption_stringUrlHttpCommand); szUrl.prepend("http://"); - } else if(KviQString::equalCIN(szUrl,"http:",5)) + } else if(KviTQString::equalCIN(szUrl,"http:",5)) { szCommand = KVI_OPTION_STRING(KviOption_stringUrlHttpCommand); - } else if(KviQString::equalCIN(szUrl,"https:",6)) + } else if(KviTQString::equalCIN(szUrl,"https:",6)) { szCommand = KVI_OPTION_STRING(KviOption_stringUrlHttpsCommand); - } else if(KviQString::equalCIN(szUrl,"ftp",3)) + } else if(KviTQString::equalCIN(szUrl,"ftp",3)) { szCommand = KVI_OPTION_STRING(KviOption_stringUrlFtpCommand); - if(KviQString::equalCIN(szUrl,"ftp.",4))szUrl.prepend("ftp://"); - } else if(KviQString::equalCIN(szUrl,"file",4)) + if(KviTQString::equalCIN(szUrl,"ftp.",4))szUrl.prepend("ftp://"); + } else if(KviTQString::equalCIN(szUrl,"file",4)) { szCommand = KVI_OPTION_STRING(KviOption_stringUrlFileCommand); - } else if(KviQString::equalCIN(szUrl,"irc",3)) + } else if(KviTQString::equalCIN(szUrl,"irc",3)) { if(KviIrcUrl::run(szUrl,KviIrcUrl::FirstFreeContext,KVSCSC_pContext->console()) & KviIrcUrl::InvalidProtocol) { KVSCSC_pContext->warning(__tr2qs("Invalid IRC url (%Q)"),&szUrl); } return true; - } else if(KviQString::equalCIN(szUrl,"mailto",6)) + } else if(KviTQString::equalCIN(szUrl,"mailto",6)) { szCommand = KVI_OPTION_STRING(KviOption_stringUrlMailtoCommand); } @@ -403,7 +403,7 @@ namespace KviKvsCoreSimpleCommands KviKvsVariantList vList; vList.append(new KviKvsVariant(szUrl)); - QString szName = "openurl::handler"; + TQString szName = "openurl::handler"; KviKvsScript script(szName,szCommand); if(!script.run(KVSCSC_pWindow,&vList,0,KviKvsScript::PreserveParams)) @@ -497,8 +497,8 @@ namespace KviKvsCoreSimpleCommands KVSCSC(option) { - QString szName; - QString szValue; + TQString szName; + TQString szValue; KVSCSC_PARAMETERS_BEGIN KVSCSC_PARAMETER("optName",KVS_PT_STRING,KVS_PF_OPTIONAL,szName) KVSCSC_PARAMETER("optValue",KVS_PT_STRING,KVS_PF_OPTIONAL | KVS_PF_APPENDREMAINING,szValue) @@ -589,7 +589,7 @@ namespace KviKvsCoreSimpleCommands KVSCSC(parse) { - QString szFileName; + TQString szFileName; KviKvsVariantList vList; KVSCSC_PARAMETERS_BEGIN KVSCSC_PARAMETER("filename",KVS_PT_NONEMPTYSTRING,0,szFileName) @@ -600,7 +600,7 @@ namespace KviKvsCoreSimpleCommands if(KviFileUtils::directoryExists(szFileName)) { - QString szTmp; + TQString szTmp; KVSCSC_pContext->enterBlockingSection(); bool bResult = KviFileDialog::askForOpenFileName(szTmp,__tr2qs("Choose a file to parse"),szFileName.utf8().data(),"*.kvs"); @@ -613,14 +613,14 @@ namespace KviKvsCoreSimpleCommands if(szFileName.isEmpty())return true; // done KviFileUtils::adjustFilePath(szFileName); } else { - QFileInfo inf(szFileName); + TQFileInfo inf(szFileName); if(inf.isRelative()) { - if(QString * pszPath = KVSCSC_pContext->scriptFilePath()) + if(TQString * pszPath = KVSCSC_pContext->scriptFilePath()) { - QFileInfo inf2(*pszPath); - QString szCheckFileName = inf2.dirPath(); - KviQString::ensureLastCharIs(szCheckFileName,KVI_PATH_SEPARATOR_CHAR); + TQFileInfo inf2(*pszPath); + TQString szCheckFileName = inf2.dirPath(); + KviTQString::ensureLastCharIs(szCheckFileName,KVI_PATH_SEPARATOR_CHAR); szCheckFileName += szFileName; if(KviFileUtils::fileExists(szCheckFileName)) szFileName = szCheckFileName; @@ -628,18 +628,18 @@ namespace KviKvsCoreSimpleCommands } } - QFileInfo infz(szFileName); + TQFileInfo infz(szFileName); szFileName = infz.absFilePath(); - QString szBuffer; + TQString szBuffer; if(!KviFileUtils::loadFile(szFileName,szBuffer,true)) // <-- scripts SHOULD be shipped in utf8 format { - if(KVSCSC_pSwitches->find('e',"fail-on-load")) + if(KVSCSC_pSwitches->tqfind('e',"fail-on-load")) { KVSCSC_pContext->error(__tr2qs("Failed to load the file '%Q' for parsing"),&szFileName); return false; } else { - if(!KVSCSC_pSwitches->find('q',"quiet")) + if(!KVSCSC_pSwitches->tqfind('q',"quiet")) KVSCSC_pContext->warning(__tr2qs("Failed to load the file '%Q' for parsing"),&szFileName); return true; } @@ -647,7 +647,7 @@ namespace KviKvsCoreSimpleCommands KviKvsScript s(szFileName,szBuffer); - KviKvsVariant * pRetVal = KVSCSC_pSwitches->find('r',"propagate-return") ? KVSCSC_pContext->returnValue() : 0; + KviKvsVariant * pRetVal = KVSCSC_pSwitches->tqfind('r',"propagate-return") ? KVSCSC_pContext->returnValue() : 0; KviKvsVariant vFileName(szFileName); vList.prepend(&vFileName); @@ -655,7 +655,7 @@ namespace KviKvsCoreSimpleCommands if(!s.run(KVSCSC_pContext->window(),&vList,pRetVal,KviKvsScript::PreserveParams,&rtd)) { - if(KVSCSC_pSwitches->find('f',"fail-on-error"))return false; + if(KVSCSC_pSwitches->tqfind('f',"fail-on-error"))return false; } return true; } @@ -699,31 +699,31 @@ namespace KviKvsCoreSimpleCommands KVSCSC(part) { - QString szChans,szMsg; + TQString szChans,szMsg; KVSCSC_PARAMETERS_BEGIN KVSCSC_PARAMETER("chans",KVS_PT_STRING,KVS_PF_OPTIONAL,szChans) KVSCSC_PARAMETER("part_message",KVS_PT_STRING,KVS_PF_OPTIONAL | KVS_PF_APPENDREMAINING,szMsg) KVSCSC_PARAMETERS_END - KVSCSC_REQUIRE_CONNECTION + KVSCSC_RETQUIRE_CONNECTION if(szChans.isEmpty()) { if(KVSCSC_pWindow->type() == KVI_WINDOW_TYPE_CHANNEL) szChans = KVSCSC_pWindow->target(); else { - if(!KVSCSC_pSwitches->find('q',"quiet"))KVSCSC_pContext->warning(__tr2qs("Missing channel list")); + if(!KVSCSC_pSwitches->tqfind('q',"quiet"))KVSCSC_pContext->warning(__tr2qs("Missing channel list")); return true; } } - KviQCString szEncodedChans = KVSCSC_pConnection->encodeText(szChans); + KviTQCString szEncodedChans = KVSCSC_pConnection->encodeText(szChans); - QStringList sl = QStringList::split(",",szChans); + TQStringList sl = TQStringList::split(",",szChans); if(!szMsg.isEmpty()) { - KviQCString szText; + KviTQCString szText; if(sl.count() == 1) { // single chan , use channel encoding if possible @@ -743,14 +743,14 @@ namespace KviKvsCoreSimpleCommands return KVSCSC_pContext->warningNoIrcConnection(); } - for(QStringList::Iterator it=sl.begin();it != sl.end();it++) + for(TQStringList::Iterator it=sl.begin();it != sl.end();it++) { KviChannel * ch = KVSCSC_pConnection->findChannel(*it); if(ch) { - ch->partMessageSent(!KVSCSC_pSwitches->find('k',"keep"),!KVSCSC_pSwitches->find('s',"silent")); + ch->partMessageSent(!KVSCSC_pSwitches->tqfind('k',"keep"),!KVSCSC_pSwitches->tqfind('s',"silent")); } else { - if(!KVSCSC_pSwitches->find('q',"quiet"))KVSCSC_pContext->warning(__tr2qs("You don't appear to be on channel %s"),(*it).utf8().data()); + if(!KVSCSC_pSwitches->tqfind('q',"quiet"))KVSCSC_pContext->warning(__tr2qs("You don't appear to be on channel %s"),(*it).utf8().data()); } } @@ -845,7 +845,7 @@ namespace KviKvsCoreSimpleCommands KVSCSC(popup) { - QString szPopupName; + TQString szPopupName; KVSCSC_PARAMETERS_BEGIN KVSCSC_PARAMETER("popup_name",KVS_PT_NONEMPTYSTRING,0,szPopupName) KVSCSC_PARAMETERS_END @@ -873,24 +873,24 @@ namespace KviKvsCoreSimpleCommands return false; } - QPoint pnt = QCursor::pos(); + TQPoint pnt = TQCursor::pos(); - KviKvsVariant * pCoords = KVSCSC_pSwitches->find('p',"point"); + KviKvsVariant * pCoords = KVSCSC_pSwitches->tqfind('p',"point"); if(pCoords) { - QString szCoords; + TQString szCoords; pCoords->asString(szCoords); - int idx = szCoords.find(','); + int idx = szCoords.tqfind(','); bool bCoordsOk = true; if(idx == -1)bCoordsOk = false; else { - QString szX = szCoords.left(idx); + TQString szX = szCoords.left(idx); szCoords.remove(0,idx + 1); bool bOk1,bOk2; int iX = szX.toInt(&bOk1); int iY = szCoords.toInt(&bOk2); - if(bOk1 && bOk2)pnt = QPoint(iX,iY); + if(bOk1 && bOk2)pnt = TQPoint(iX,iY); else bCoordsOk = false; } @@ -934,13 +934,13 @@ namespace KviKvsCoreSimpleCommands KVSCSC(privmsg) { - QString szTarget,szText; + TQString szTarget,szText; KVSCSC_PARAMETERS_BEGIN KVSCSC_PARAMETER("target",KVS_PT_NONEMPTYSTRING,0,szTarget) KVSCSC_PARAMETER("text",KVS_PT_STRING,KVS_PF_OPTIONAL | KVS_PF_APPENDREMAINING,szText) KVSCSC_PARAMETERS_END - KVSCSC_REQUIRE_CONNECTION + KVSCSC_RETQUIRE_CONNECTION KviWindow * w = KVSCSC_pConnection->findChannel(szTarget); if(!w)w = KVSCSC_pConnection->findQuery(szTarget); @@ -948,15 +948,15 @@ namespace KviKvsCoreSimpleCommands if(w)w->ownMessage(szText); else { - KviQCString szT = KVSCSC_pConnection->encodeText(szTarget); - KviQCString szD = w ? w->encodeText(szText) : KVSCSC_pConnection->encodeText(szText); + KviTQCString szT = KVSCSC_pConnection->encodeText(szTarget); + KviTQCString szD = w ? w->encodeText(szText) : KVSCSC_pConnection->encodeText(szText); if(!szT.data())szT = ""; // encoding problems ? if(!szD.data())szD = ""; // encoding problems ? if(!(KVSCSC_pConnection->sendFmtData("PRIVMSG %s :%s",szT.data(),szD.data()))) return KVSCSC_pContext->warningNoIrcConnection(); - if(!KVSCSC_pSwitches->find('q',"quiet")) + if(!KVSCSC_pSwitches->tqfind('q',"quiet")) KVSCSC_pWindow->output(KVI_OUT_OWNPRIVMSG,"[PRIVMSG >>> %Q]: %Q",&szTarget,&szText); } @@ -994,31 +994,31 @@ namespace KviKvsCoreSimpleCommands KVSCSC(query) { - QString szTargets,szText; + TQString szTargets,szText; KVSCSC_PARAMETERS_BEGIN KVSCSC_PARAMETER("targets",KVS_PT_NONEMPTYSTRING,0,szTargets) KVSCSC_PARAMETER("text",KVS_PT_STRING,KVS_PF_OPTIONAL | KVS_PF_APPENDREMAINING,szText) KVSCSC_PARAMETERS_END - KVSCSC_REQUIRE_CONNECTION + KVSCSC_RETQUIRE_CONNECTION KviQuery * query; - QStringList sl = QStringList::split(",",szTargets); - for(QStringList::Iterator it = sl.begin();it != sl.end();it++) + TQStringList sl = TQStringList::split(",",szTargets); + for(TQStringList::Iterator it = sl.begin();it != sl.end();it++) { - QString szNick = *it; + TQString szNick = *it; if(szNick.isEmpty())KVSCSC_pContext->warning(__tr2qs("Empty target specified")); else { query = KVSCSC_pWindow->console()->connection()->findQuery(szNick); if(!query) { query = KVSCSC_pWindow->console()->connection()->createQuery(szNick); - QString user; - QString host; + TQString user; + TQString host; KviIrcUserDataBase * db = KVSCSC_pWindow->connection()->userDataBase(); if(db) { - KviIrcUserEntry * e = db->find(szNick); + KviIrcUserEntry * e = db->tqfind(szNick); if(e) { user = e->user(); @@ -1053,21 +1053,21 @@ namespace KviKvsCoreSimpleCommands !sw: -q | --quit Terminates this KVIrc application instance !sw: -f | --force - Forces the immediate termination of the current IRC session (The QUIT message may be not sent) + Forces the immediate termination of the current IRC session (The TQUIT message may be not sent) !sw: -u | --unexpected Simulates an "unexpected disconnection" @description: Terminates the current IRC session.[br] - By default this command sends a QUIT message + By default this command sends a TQUIT message and waits for the server to close the connection.[br] If you want to force KVIrc to close the connection - immediately after sending the QUIT message you must use the -f switch.[br] + immediately after sending the TQUIT message you must use the -f switch.[br] Forcing the connection may cause your quit message to not be displayed to the other IRC users: most likely it will be replaced by a 'Connection reset by peer' or a 'EOF from client'.[br] If the -u switch is specified then an "unexpected disconnection" will be simulated and all the related options will be applied (e.g. automatic reconnection, - channels and queries kept open etc..). The QUIT message will be still sent unless + channels and queries kept open etc..). The TQUIT message will be still sent unless the -f switch is used. You can control all the "unexpected disconnection" options in the options dialog. If the -q switch is specified , this command terminates KVIrc immediately.[br] @@ -1079,17 +1079,17 @@ namespace KviKvsCoreSimpleCommands KVSCSC(quit) { - QString szReason; + TQString szReason; KVSCSC_PARAMETERS_BEGIN KVSCSC_PARAMETER("reason",KVS_PT_STRING,KVS_PF_OPTIONAL | KVS_PF_APPENDREMAINING,szReason) KVSCSC_PARAMETERS_END - if(KVSCSC_pSwitches->find('q',"quit")) + if(KVSCSC_pSwitches->tqfind('q',"quit")) { - QTimer::singleShot(0,g_pApp,SLOT(quit())); + TQTimer::singleShot(0,g_pApp,TQT_SLOT(quit())); } else { - KVSCSC_REQUIRE_CONNECTION - KVSCSC_pWindow->context()->terminateConnectionRequest(KVSCSC_pSwitches->find('f',"force"),szReason,KVSCSC_pSwitches->find('u',"unexpected")); + KVSCSC_RETQUIRE_CONNECTION + KVSCSC_pWindow->context()->terminateConnectionRequest(KVSCSC_pSwitches->tqfind('f',"force"),szReason,KVSCSC_pSwitches->tqfind('u',"unexpected")); } return true; } @@ -1170,20 +1170,20 @@ namespace KviKvsCoreSimpleCommands KVSCSC(raw) { - QString szRawCommand; + TQString szRawCommand; KVSCSC_PARAMETERS_BEGIN KVSCSC_PARAMETER("raw_command",KVS_PT_STRING,KVS_PF_APPENDREMAINING,szRawCommand) KVSCSC_PARAMETERS_END - KVSCSC_REQUIRE_CONNECTION + KVSCSC_RETQUIRE_CONNECTION - KviQCString szData = KVSCSC_pConnection->encodeText(szRawCommand); + KviTQCString szData = KVSCSC_pConnection->encodeText(szRawCommand); if(!szData.data())szData = ""; if(!KVSCSC_pConnection->sendData(szData.data())) return KVSCSC_pContext->warningNoIrcConnection(); - if(!KVSCSC_pSwitches->find('q',"quiet")) + if(!KVSCSC_pSwitches->tqfind('q',"quiet")) KVSCSC_pWindow->output(KVI_OUT_RAW,__tr2qs("[RAW]: %Q"),&szRawCommand); return true; @@ -1225,7 +1225,7 @@ namespace KviKvsCoreSimpleCommands KVSCSC(rebind) { - QString szWinId; + TQString szWinId; KVSCSC_PARAMETERS_BEGIN KVSCSC_PARAMETER("window_id",KVS_PT_NONEMPTYSTRING,0,szWinId) KVSCSC_PARAMETERS_END @@ -1233,7 +1233,7 @@ namespace KviKvsCoreSimpleCommands KviWindow * pAux = g_pApp->findWindow(szWinId.utf8().data()); if(pAux)KVSCSC_pContext->setWindow(pAux); else { - if(!KVSCSC_pSwitches->find('q',"quiet")) + if(!KVSCSC_pSwitches->tqfind('q',"quiet")) KVSCSC_pContext->warning(__tr2qs("Window with id %Q not found: no rebinding performed"),&szWinId); } return true; @@ -1277,7 +1277,7 @@ namespace KviKvsCoreSimpleCommands return false; } - QString all; + TQString all; KVSCSC_pParams->allAsString(all); KVSCSC_pContext->returnValue()->setString(all); return false; @@ -1313,20 +1313,20 @@ namespace KviKvsCoreSimpleCommands KVSCSC(run) { - QString szCommand; - QStringList l; + TQString szCommand; + TQStringList l; KVSCSC_PARAMETERS_BEGIN KVSCSC_PARAMETER("command",KVS_PT_STRING,0,szCommand) KVSCSC_PARAMETER("parameters",KVS_PT_STRINGLIST,KVS_PF_OPTIONAL,l) KVSCSC_PARAMETERS_END #ifdef COMPILE_USE_QT4 - QProcess proc; + TQProcess proc; proc.start(szCommand,l); // FIXME: KVSCSC_pContext->warning(__tr2qs("Failed to execute command '%Q'"),&szCommand); #else - QProcess proc(szCommand); - for ( QStringList::Iterator it = l.begin(); it != l.end(); ++it ) proc.addArgument(*it); + TQProcess proc(szCommand); + for ( TQStringList::Iterator it = l.begin(); it != l.end(); ++it ) proc.addArgument(*it); if(!proc.start())KVSCSC_pContext->warning(__tr2qs("Failed to execute command '%Q'"),&szCommand); #endif return true; diff --git a/src/kvirc/kvs/kvi_kvs_coresimplecommands_sz.cpp b/src/kvirc/kvs/kvi_kvs_coresimplecommands_sz.cpp index 1dfc4549..96548ad9 100644 --- a/src/kvirc/kvs/kvi_kvs_coresimplecommands_sz.cpp +++ b/src/kvirc/kvs/kvi_kvs_coresimplecommands_sz.cpp @@ -81,17 +81,17 @@ namespace KviKvsCoreSimpleCommands KVSCSC(say) { - QString szText; + TQString szText; KVSCSC_PARAMETERS_BEGIN KVSCSC_PARAMETER("text",KVS_PT_STRING,KVS_PF_APPENDREMAINING,szText) KVSCSC_PARAMETERS_END - if(KVSCSC_pSwitches->find('x',"allow-exec")) + if(KVSCSC_pSwitches->tqfind('x',"allow-exec")) { // allow execution of commands if(!KviUserInput::parse(szText,KVSCSC_pWindow,__tr2qs("say: injected commandline"))) { - if(!KVSCSC_pSwitches->find('q',"quiet")) + if(!KVSCSC_pSwitches->tqfind('q',"quiet")) KVSCSC_pContext->warning(__tr2qs("Say parse error: Broken command")); } } else { @@ -205,7 +205,7 @@ namespace KviKvsCoreSimpleCommands KVSCSC(server) { - QString szServer; + TQString szServer; kvs_uint_t uPort; KVSCSC_PARAMETERS_BEGIN KVSCSC_PARAMETER("server",KVS_PT_STRING,KVS_PF_OPTIONAL,szServer) @@ -213,9 +213,9 @@ namespace KviKvsCoreSimpleCommands KVSCSC_PARAMETERS_END KviConsole * console = 0; - if(KVSCSC_pSwitches->find('n',"new-context"))console = KVSCSC_pWindow->frame()->createNewConsole(); + if(KVSCSC_pSwitches->tqfind('n',"new-context"))console = KVSCSC_pWindow->frame()->createNewConsole(); else { - if(KVSCSC_pSwitches->find('u',"unused-context")) + if(KVSCSC_pSwitches->tqfind('u',"unused-context")) { // first try the current console console = KVSCSC_pWindow->console(); @@ -239,7 +239,7 @@ namespace KviKvsCoreSimpleCommands } else console = KVSCSC_pWindow->console(); } - QString szCmd,szBindAddress,szSocketFilter,szPassword,szNick; + TQString szCmd,szBindAddress,szSocketFilter,szPassword,szNick; KVSCSC_pSwitches->getAsStringIfExisting('c',"command",szCmd); KVSCSC_pSwitches->getAsStringIfExisting('b',"bind-address",szBindAddress); KVSCSC_pSwitches->getAsStringIfExisting('f',"filter",szSocketFilter); @@ -261,7 +261,7 @@ namespace KviKvsCoreSimpleCommands return false; } else { KviAsynchronousConnectionData * d = new KviAsynchronousConnectionData(); - d->bUseLastServerInContext = KVSCSC_pSwitches->find('l',"last") != 0; + d->bUseLastServerInContext = KVSCSC_pSwitches->tqfind('l',"last") != 0; d->szCommandToExecAfterConnect = szCmd; d->szBindAddress = szBindAddress; d->szPass = szPassword; @@ -273,13 +273,13 @@ namespace KviKvsCoreSimpleCommands } else { // server is not empty. KviAsynchronousConnectionData * d = new KviAsynchronousConnectionData(); - d->bUseSSL = (KVSCSC_pSwitches->find('s',"ssl") != 0); + d->bUseSSL = (KVSCSC_pSwitches->tqfind('s',"ssl") != 0); d->szServer = szServer; d->uPort = (kvi_u32_t)uPort; d->szLinkFilter = szSocketFilter; d->bPortIsOk = (uPort > 0); #ifdef COMPILE_IPV6_SUPPORT - d->bUseIpV6 = (KVSCSC_pSwitches->find('i',"ipv6") != 0) || KviNetUtils::isValidStringIp_V6(szServer); + d->bUseIpV6 = (KVSCSC_pSwitches->tqfind('i',"ipv6") != 0) || KviNetUtils::isValidStringIp_V6(szServer); #else d->bUseIpV6 = false; #endif @@ -357,7 +357,7 @@ namespace KviKvsCoreSimpleCommands KVSCSC(setmenu) { - QString szVisibleText,szPopupName; + TQString szVisibleText,szPopupName; KVSCSC_PARAMETERS_BEGIN KVSCSC_PARAMETER("visible_text",KVS_PT_NONEMPTYSTRING,0,szVisibleText) KVSCSC_PARAMETER("popup_name",KVS_PT_STRING,KVS_PF_OPTIONAL,szPopupName) @@ -367,20 +367,20 @@ namespace KviKvsCoreSimpleCommands { if(!(KVSCSC_pWindow->frame()->mainMenuBar()->removeMenu(szVisibleText))) { - if(!KVSCSC_pSwitches->find('q',"quiet"))KVSCSC_pContext->warning(__tr2qs("No menu bar item with text '%Q'"),&szPopupName); + if(!KVSCSC_pSwitches->tqfind('q',"quiet"))KVSCSC_pContext->warning(__tr2qs("No menu bar item with text '%Q'"),&szPopupName); } return true; } KviKvsPopupMenu * p = KviKvsPopupManager::instance()->lookup(szPopupName); int idx = -1; - if(KviKvsVariant * pIdx = KVSCSC_pSwitches->find('i',"index")) + if(KviKvsVariant * pIdx = KVSCSC_pSwitches->tqfind('i',"index")) { kvs_int_t iIdx; if(pIdx->asInteger(iIdx)) idx = iIdx; else { - if(!KVSCSC_pSwitches->find('q',"quiet")) + if(!KVSCSC_pSwitches->tqfind('q',"quiet")) KVSCSC_pContext->warning(__tr2qs("Invalid index specified: ignored")); } } @@ -390,7 +390,7 @@ namespace KviKvsCoreSimpleCommands if(p)KVSCSC_pWindow->frame()->mainMenuBar()->addMenu(szVisibleText,p,idx); else { - if(!KVSCSC_pSwitches->find('q',"quiet"))KVSCSC_pContext->warning(__tr2qs("The popup '%Q' is not defined"),&szPopupName); + if(!KVSCSC_pSwitches->tqfind('q',"quiet"))KVSCSC_pContext->warning(__tr2qs("The popup '%Q' is not defined"),&szPopupName); } return true; @@ -430,7 +430,7 @@ namespace KviKvsCoreSimpleCommands return false; } - QString all; + TQString all; KVSCSC_pParams->allAsString(all); KVSCSC_pContext->returnValue()->setString(all); return true; @@ -445,12 +445,12 @@ namespace KviKvsCoreSimpleCommands @title: sockets @syntax: - sockets [[remote server] server mask] + sockets [[remote server] server tqmask] @short: Requests the sockets info from a server @description: Requests the sockets information from the specified server or the current server if no [remote server] is specified.[br] - The reply can be filtered by .[br] + The reply can be filtered by .[br] This command is a [doc:rfc2821wrappers]RFC2821 command wrapper[/doc]; see that document for more information.[br] */ // RFC2821 wrapper @@ -588,14 +588,14 @@ namespace KviKvsCoreSimpleCommands KVSCSC(topic) { - QString szChannel; - QString szTopic; + TQString szChannel; + TQString szTopic; KVSCSC_PARAMETERS_BEGIN KVSCSC_PARAMETER("channel",KVS_PT_NONEMPTYSTRING,KVS_PF_OPTIONAL,szChannel) KVSCSC_PARAMETER("topic",KVS_PT_STRING,KVS_PF_OPTIONAL | KVS_PF_APPENDREMAINING,szTopic) KVSCSC_PARAMETERS_END - KVSCSC_REQUIRE_CONNECTION + KVSCSC_RETQUIRE_CONNECTION if(szChannel.isEmpty()) { @@ -607,8 +607,8 @@ namespace KviKvsCoreSimpleCommands } } - KviQCString szC = KVSCSC_pConnection->encodeText(szChannel); - KviQCString szT = KVSCSC_pConnection->encodeText(szTopic); + KviTQCString szC = KVSCSC_pConnection->encodeText(szChannel); + KviTQCString szT = KVSCSC_pConnection->encodeText(szTopic); if(szTopic.isEmpty()) { if(!KVSCSC_pConnection->sendFmtData("TOPIC %s",szC.data())) @@ -673,14 +673,14 @@ namespace KviKvsCoreSimpleCommands to load catalogues that reside in different directories.[br] [b]NOTE[/b][br] This feature is currently work in progress: the scripting engine - is not yet fully unicode and thus some more exotic translations may still suffer... + is not yet fully tqunicode and thus some more exotic translations may still suffer... @seealso: [fnc]$tr[/fnc], [cmd]trunload[/cmd] */ KVSCSC(trload) { - QString szCatalogue,szDir; + TQString szCatalogue,szDir; KVSCSC_PARAMETERS_BEGIN KVSCSC_PARAMETER("catalogue",KVS_PT_NONEMPTYSTRING,0,szCatalogue) KVSCSC_PARAMETER("catalogueDir",KVS_PT_STRING,KVS_PF_OPTIONAL,szDir) @@ -702,7 +702,7 @@ namespace KviKvsCoreSimpleCommands if(KviLocale::loadCatalogue(szCatalogue,szDir)) return true; - if(KVSCSC_pSwitches->find('v',"verbose")) + if(KVSCSC_pSwitches->tqfind('v',"verbose")) KVSCSC_pContext->warning(__tr2qs("No catalogue %Q for the current language found"),&szCatalogue); return true; @@ -734,14 +734,14 @@ namespace KviKvsCoreSimpleCommands KVSCSC(trunload) { - QString szCatalogue; + TQString szCatalogue; KVSCSC_PARAMETERS_BEGIN KVSCSC_PARAMETER("catalogue",KVS_PT_NONEMPTYSTRING,0,szCatalogue) KVSCSC_PARAMETERS_END if(!KviLocale::unloadCatalogue(szCatalogue)) { - if(KVSCSC_pSwitches->find('v',"verbose")) + if(KVSCSC_pSwitches->tqfind('v',"verbose")) KVSCSC_pContext->warning(__tr2qs("The catalogue %Q was not loaded"),&szCatalogue); } return true; @@ -756,11 +756,11 @@ namespace KviKvsCoreSimpleCommands @title: unban @syntax: - unban + unban @short: - Unsets ban masks for the channel + Unsets ban tqmasks for the channel @description: - Removes the ban masks specified in the , + Removes the ban tqmasks specified in the , which is a comma separated list of nicknames. This command works only if executed in a channel window. The command is translated to a set of MODE messages containing @@ -859,7 +859,7 @@ namespace KviKvsCoreSimpleCommands KVSCSC(warning) { - QString szAll; + TQString szAll; KVSCSC_pParams->allAsString(szAll); KVSCSC_pContext->warning("%Q",&szAll); @@ -875,7 +875,7 @@ namespace KviKvsCoreSimpleCommands @title: who @syntax: - who {[mask] | [channel]} + who {[tqmask] | [channel]} @short: Requests WHO information @description: @@ -919,12 +919,12 @@ namespace KviKvsCoreSimpleCommands KVSCSC(whois) { - QString szNick; + TQString szNick; KVSCSC_PARAMETERS_BEGIN KVSCSC_PARAMETER("nickname",KVS_PT_NONEMPTYSTRING,KVS_PF_APPENDREMAINING,szNick) KVSCSC_PARAMETERS_END - KviQCString szData = KVSCSC_pContext->window()->encodeText(szNick); + KviTQCString szData = KVSCSC_pContext->window()->encodeText(szNick); if(!KVSCSC_pContext->connection())return KVSCSC_pContext->warningNoIrcConnection(); if(!KVSCSC_pContext->connection()->sendFmtData("WHOIS %s",szData.data()))return KVSCSC_pContext->warningNoIrcConnection(); @@ -959,12 +959,12 @@ namespace KviKvsCoreSimpleCommands KVSCSC(whowas) { - QString szNick; + TQString szNick; KVSCSC_PARAMETERS_BEGIN KVSCSC_PARAMETER("nickname",KVS_PT_NONEMPTYSTRING,KVS_PF_APPENDREMAINING,szNick) KVSCSC_PARAMETERS_END - KviQCString szData = KVSCSC_pContext->window()->encodeText(szNick); + KviTQCString szData = KVSCSC_pContext->window()->encodeText(szNick); if(!KVSCSC_pContext->connection())return KVSCSC_pContext->warningNoIrcConnection(); if(!KVSCSC_pContext->connection()->sendFmtData("WHOWAS %s",szData.data()))return KVSCSC_pContext->warningNoIrcConnection(); diff --git a/src/kvirc/kvs/kvi_kvs_dnsmanager.cpp b/src/kvirc/kvs/kvi_kvs_dnsmanager.cpp index ec1efde6..2170362a 100644 --- a/src/kvirc/kvs/kvi_kvs_dnsmanager.cpp +++ b/src/kvirc/kvs/kvi_kvs_dnsmanager.cpp @@ -39,7 +39,7 @@ KviKvsDnsManager * KviKvsDnsManager::m_pInstance = 0; -KviKvsDnsObject::KviKvsDnsObject(KviDns * pDns,KviWindow * pWnd,const QString &szQuery,bool bRebindOnWindowClose,KviKvsScript * pCallback,KviKvsVariantList * pParameterList) +KviKvsDnsObject::KviKvsDnsObject(KviDns * pDns,KviWindow * pWnd,const TQString &szQuery,bool bRebindOnWindowClose,KviKvsScript * pCallback,KviKvsVariantList * pParameterList) { m_pDns = pDns; m_pWindow = pWnd; @@ -51,7 +51,7 @@ KviKvsDnsObject::KviKvsDnsObject(KviDns * pDns,KviWindow * pWnd,const QString &s KviKvsDnsObject::~KviKvsDnsObject() { - QObject::disconnect(m_pDns,0,0,0); + TQObject::disconnect(m_pDns,0,0,0); if(m_pDns->isRunning()) { g_pApp->collectGarbage(m_pDns); @@ -64,7 +64,7 @@ KviKvsDnsObject::~KviKvsDnsObject() KviKvsDnsManager::KviKvsDnsManager() -: QObject() +: TQObject() { m_pDnsObjects = 0; } @@ -102,13 +102,13 @@ void KviKvsDnsManager::addDns(KviKvsDnsObject * pObject) m_pDnsObjects = new KviPointerHashTable; m_pDnsObjects->setAutoDelete(true); } - m_pDnsObjects->replace(pObject->dns(),pObject); - connect(pObject->dns(),SIGNAL(lookupDone(KviDns *)),this,SLOT(dnsLookupTerminated(KviDns *))); + m_pDnsObjects->tqreplace(pObject->dns(),pObject); + connect(pObject->dns(),TQT_SIGNAL(lookupDone(KviDns *)),this,TQT_SLOT(dnsLookupTerminated(KviDns *))); } void KviKvsDnsManager::dnsLookupTerminated(KviDns * pDns) { - KviKvsDnsObject * o = m_pDnsObjects->find(pDns); + KviKvsDnsObject * o = m_pDnsObjects->tqfind(pDns); if(!o) { debug("KviKvsDnsManager::dnsLookupTerminated(): can't find the KviKvsDnsObject structure"); @@ -140,12 +140,12 @@ void KviKvsDnsManager::dnsLookupTerminated(KviDns * pDns) o->parameterList()->prepend(new KviKvsVariant(KviError::getDescription(o->dns()->error()))); // $2 o->parameterList()->prepend(new KviKvsVariant((kvs_int_t)0)); // $1 } else { - QString * fh = o->dns()->hostnameList()->first(); - QString * fi = o->dns()->ipAddressList()->first(); + TQString * fh = o->dns()->hostnameList()->first(); + TQString * fi = o->dns()->ipAddressList()->first(); // $4... is the magic data - o->parameterList()->prepend(new KviKvsVariant(fh ? *fh : QString("?.?"))); // $3 - o->parameterList()->prepend(new KviKvsVariant(fi ? *fi : QString("?.?.?.?"))); // $2 + o->parameterList()->prepend(new KviKvsVariant(fh ? *fh : TQString("?.?"))); // $3 + o->parameterList()->prepend(new KviKvsVariant(fi ? *fi : TQString("?.?.?.?"))); // $2 o->parameterList()->prepend(new KviKvsVariant((kvs_int_t)1)); // $1 } o->parameterList()->prepend(new KviKvsVariant(o->query())); // $0 @@ -153,22 +153,22 @@ void KviKvsDnsManager::dnsLookupTerminated(KviDns * pDns) copy.run(o->window(),o->parameterList(),0,KviKvsScript::PreserveParams); } else { - QString szQuery = o->dns()->query(); + TQString szQuery = o->dns()->query(); o->window()->output(KVI_OUT_HOSTLOOKUP,__tr2qs("DNS Lookup result for query \"%Q\""),&szQuery); if(o->dns()->state() == KviDns::Failure) { - QString szErr = KviError::getDescription(o->dns()->error()); + TQString szErr = KviError::getDescription(o->dns()->error()); o->window()->output(KVI_OUT_HOSTLOOKUP,__tr2qs("Error: %Q"),&szErr); } else { int idx = 1; - for(QString * h = o->dns()->hostnameList()->first();h;h = o->dns()->hostnameList()->next()) + for(TQString * h = o->dns()->hostnameList()->first();h;h = o->dns()->hostnameList()->next()) { o->window()->output(KVI_OUT_HOSTLOOKUP,__tr2qs("Hostname %d: %Q"),idx,h); idx++; } idx = 1; - for(QString * a = o->dns()->ipAddressList()->first();a;a = o->dns()->ipAddressList()->next()) + for(TQString * a = o->dns()->ipAddressList()->first();a;a = o->dns()->ipAddressList()->next()) { o->window()->output(KVI_OUT_HOSTLOOKUP,__tr2qs("IP address %d: %Q"),idx,a); idx++; diff --git a/src/kvirc/kvs/kvi_kvs_dnsmanager.h b/src/kvirc/kvs/kvi_kvs_dnsmanager.h index 69d152c5..f01f93fb 100644 --- a/src/kvirc/kvs/kvi_kvs_dnsmanager.h +++ b/src/kvirc/kvs/kvi_kvs_dnsmanager.h @@ -25,9 +25,9 @@ //============================================================================= #include "kvi_settings.h" -#include +#include #include "kvi_pointerhashtable.h" -#include +#include class KviDns; class KviWindow; @@ -39,7 +39,7 @@ class KviKvsDnsObject public: KviKvsDnsObject(KviDns * pDns, KviWindow * pWnd, - const QString &szQuery, + const TQString &szQuery, bool bRebindOnWindowClose = true, KviKvsScript * pCallback = 0, KviKvsVariantList * pParameterList = 0); @@ -47,7 +47,7 @@ public: protected: KviDns * m_pDns; KviWindow * m_pWindow; - QString m_szQuery; + TQString m_szQuery; KviKvsScript * m_pCallback; // callback to be executed when the dns terminates KviKvsVariantList * m_pParameterList; // parameter list (magic) bool m_bRebindOnWindowClose; // should we trigger the callback even if m_pWindow no longer exists ? @@ -56,15 +56,16 @@ public: KviWindow * window(){ return m_pWindow; }; KviKvsScript * callback(){ return m_pCallback; }; KviKvsVariantList * parameterList(){ return m_pParameterList; }; - const QString & query(){ return m_szQuery; }; + const TQString & query(){ return m_szQuery; }; bool rebindOnWindowClose(){ return m_bRebindOnWindowClose; }; void setWindow(KviWindow * pWnd){ m_pWindow = pWnd; }; void setParameterList(KviKvsVariantList * pList){ m_pParameterList = pList; }; }; -class KviKvsDnsManager : public QObject +class KviKvsDnsManager : public TQObject { Q_OBJECT + TQ_OBJECT public: KviKvsDnsManager(); ~KviKvsDnsManager(); diff --git a/src/kvirc/kvs/kvi_kvs_event.h b/src/kvirc/kvs/kvi_kvs_event.h index 663777be..49ef57f6 100644 --- a/src/kvirc/kvs/kvi_kvs_event.h +++ b/src/kvirc/kvs/kvi_kvs_event.h @@ -33,8 +33,8 @@ class KVIRC_API KviKvsEvent { protected: - QString m_szName; - QString m_szParameterDescription; + TQString m_szName; + TQString m_szParameterDescription; KviPointerList * m_pHandlers; public: // the event name and the parameter description are NOT translated @@ -47,8 +47,8 @@ public: KviPointerList * handlers(){ return m_pHandlers; }; void addHandler(KviKvsEventHandler * h); void removeHandler(KviKvsEventHandler * h); - const QString & name(){ return m_szName; }; - const QString & parameterDescription(){ return m_szParameterDescription; }; + const TQString & name(){ return m_szName; }; + const TQString & parameterDescription(){ return m_szParameterDescription; }; }; #endif //!_KVI_KVS_EVENT_H_ diff --git a/src/kvirc/kvs/kvi_kvs_eventhandler.cpp b/src/kvirc/kvs/kvi_kvs_eventhandler.cpp index f6e311f0..14fa7252 100644 --- a/src/kvirc/kvs/kvi_kvs_eventhandler.cpp +++ b/src/kvirc/kvs/kvi_kvs_eventhandler.cpp @@ -37,7 +37,7 @@ KviKvsEventHandler::~KviKvsEventHandler() -KviKvsScriptEventHandler::KviKvsScriptEventHandler(const QString &szHandlerName,const QString &szContextName,const QString &szCode,bool bEnabled) +KviKvsScriptEventHandler::KviKvsScriptEventHandler(const TQString &szHandlerName,const TQString &szContextName,const TQString &szCode,bool bEnabled) : KviKvsEventHandler(KviKvsEventHandler::Script), m_szName(szHandlerName), m_bEnabled(bEnabled) { m_pScript = new KviKvsScript(szContextName,szCode); @@ -48,7 +48,7 @@ KviKvsScriptEventHandler::~KviKvsScriptEventHandler() delete m_pScript; } -KviKvsScriptEventHandler * KviKvsScriptEventHandler::createInstance(const QString &szHandlerName,const QString &szContextName,const QString &szCode,bool bEnabled) +KviKvsScriptEventHandler * KviKvsScriptEventHandler::createInstance(const TQString &szHandlerName,const TQString &szContextName,const TQString &szCode,bool bEnabled) { return new KviKvsScriptEventHandler(szHandlerName,szContextName,szCode,bEnabled); } diff --git a/src/kvirc/kvs/kvi_kvs_eventhandler.h b/src/kvirc/kvs/kvi_kvs_eventhandler.h index f8124b68..cba6a183 100644 --- a/src/kvirc/kvs/kvi_kvs_eventhandler.h +++ b/src/kvirc/kvs/kvi_kvs_eventhandler.h @@ -48,16 +48,16 @@ class KVIRC_API KviKvsScriptEventHandler : public KviKvsEventHandler { public: // the event handler becomes the owned of pszCode! - KviKvsScriptEventHandler(const QString &szHandlerName,const QString &szContextName,const QString &szCode,bool bEnabled = true); + KviKvsScriptEventHandler(const TQString &szHandlerName,const TQString &szContextName,const TQString &szCode,bool bEnabled = true); virtual ~KviKvsScriptEventHandler(); protected: - QString m_szName; + TQString m_szName; KviKvsScript * m_pScript; bool m_bEnabled; public: KviKvsScript * script(){ return m_pScript; }; - const QString & name(){ return m_szName; }; - const QString & code(){ return m_pScript->code(); }; + const TQString & name(){ return m_szName; }; + const TQString & code(){ return m_pScript->code(); }; bool isEnabled(){ return m_bEnabled; }; void setEnabled(bool bEnabled){ m_bEnabled = bEnabled; }; @@ -66,7 +66,7 @@ public: // This MUST be used by the modules to allocate event structures // instead of the new operator. // See kvi_heapobject.cpp for an explaination. - static KviKvsScriptEventHandler * createInstance(const QString &szHandlerName,const QString &szContextName,const QString &szCode,bool bEnabled = true); + static KviKvsScriptEventHandler * createInstance(const TQString &szHandlerName,const TQString &szContextName,const TQString &szCode,bool bEnabled = true); }; diff --git a/src/kvirc/kvs/kvi_kvs_eventmanager.cpp b/src/kvirc/kvs/kvi_kvs_eventmanager.cpp index 1a2131c0..f84aee92 100644 --- a/src/kvirc/kvs/kvi_kvs_eventmanager.cpp +++ b/src/kvirc/kvs/kvi_kvs_eventmanager.cpp @@ -123,25 +123,25 @@ void KviKvsEventManager::done() delete KviKvsEventManager::instance(); } -unsigned int KviKvsEventManager::findAppEventIndexByName(const QString &szName) +unsigned int KviKvsEventManager::findAppEventIndexByName(const TQString &szName) { for(unsigned int u = 0;u < KVI_KVS_NUM_APP_EVENTS;u++) { - if(KviQString::equalCI(szName,m_appEventTable[u].name()))return u; + if(KviTQString::equalCI(szName,m_appEventTable[u].name()))return u; //Backwards compatibility >_< - if((u == 4) && KviQString::equalCI(szName,"OnIrcConnectionEstabilished")) + if((u == 4) && KviTQString::equalCI(szName,"OnIrcConnectionEstabilished")) return u; } return KVI_KVS_NUM_APP_EVENTS; // <-- invalid event number } -KviKvsEvent * KviKvsEventManager::findAppEventByName(const QString &szName) +KviKvsEvent * KviKvsEventManager::findAppEventByName(const TQString &szName) { for(unsigned int u = 0;u < KVI_KVS_NUM_APP_EVENTS;u++) { - if(KviQString::equalCI(szName,m_appEventTable[u].name()))return &(m_appEventTable[u]); + if(KviTQString::equalCI(szName,m_appEventTable[u].name()))return &(m_appEventTable[u]); //Backwards compatibility >_< - if((u == 4) && KviQString::equalCI(szName,"OnIrcConnectionEstabilished")) + if((u == 4) && KviTQString::equalCI(szName,"OnIrcConnectionEstabilished")) return &(m_appEventTable[u]); } return 0; @@ -166,7 +166,7 @@ bool KviKvsEventManager::addRawHandler(unsigned int uRawIdx,KviKvsEventHandler * return true; } -bool KviKvsEventManager::removeScriptAppHandler(unsigned int uEvIdx,const QString &szName) +bool KviKvsEventManager::removeScriptAppHandler(unsigned int uEvIdx,const TQString &szName) { if(uEvIdx >= KVI_KVS_NUM_APP_EVENTS)return false; KviKvsEventHandler * h; @@ -175,7 +175,7 @@ bool KviKvsEventManager::removeScriptAppHandler(unsigned int uEvIdx,const QStrin { if(h->type() == KviKvsEventHandler::Script) { - if(KviQString::equalCI(((KviKvsScriptEventHandler *)h)->name(),szName)) + if(KviTQString::equalCI(((KviKvsScriptEventHandler *)h)->name(),szName)) { m_appEventTable[uEvIdx].removeHandler(h); return true; @@ -185,7 +185,7 @@ bool KviKvsEventManager::removeScriptAppHandler(unsigned int uEvIdx,const QStrin return false; } -KviKvsScriptEventHandler * KviKvsEventManager::findScriptRawHandler(unsigned int uEvIdx,const QString &szName) +KviKvsScriptEventHandler * KviKvsEventManager::findScriptRawHandler(unsigned int uEvIdx,const TQString &szName) { if(uEvIdx >= KVI_KVS_NUM_RAW_EVENTS)return 0; if(!m_rawEventTable[uEvIdx])return 0; @@ -194,7 +194,7 @@ KviKvsScriptEventHandler * KviKvsEventManager::findScriptRawHandler(unsigned int { if(h->type() == KviKvsEventHandler::Script) { - if(KviQString::equalCI(((KviKvsScriptEventHandler *)h)->name(),szName)) + if(KviTQString::equalCI(((KviKvsScriptEventHandler *)h)->name(),szName)) { return (KviKvsScriptEventHandler *)h; } @@ -203,7 +203,7 @@ KviKvsScriptEventHandler * KviKvsEventManager::findScriptRawHandler(unsigned int return 0; } -KviKvsScriptEventHandler * KviKvsEventManager::findScriptAppHandler(unsigned int uEvIdx,const QString &szName) +KviKvsScriptEventHandler * KviKvsEventManager::findScriptAppHandler(unsigned int uEvIdx,const TQString &szName) { if(uEvIdx >= KVI_KVS_NUM_APP_EVENTS)return 0; KviKvsEventHandler * h; @@ -212,7 +212,7 @@ KviKvsScriptEventHandler * KviKvsEventManager::findScriptAppHandler(unsigned int { if(h->type() == KviKvsEventHandler::Script) { - if(KviQString::equalCI(((KviKvsScriptEventHandler *)h)->name(),szName)) + if(KviTQString::equalCI(((KviKvsScriptEventHandler *)h)->name(),szName)) { return (KviKvsScriptEventHandler *)h; } @@ -221,7 +221,7 @@ KviKvsScriptEventHandler * KviKvsEventManager::findScriptAppHandler(unsigned int return 0; } -bool KviKvsEventManager::enableScriptAppHandler(unsigned int uEvIdx,const QString &szName,bool bEnable) +bool KviKvsEventManager::enableScriptAppHandler(unsigned int uEvIdx,const TQString &szName,bool bEnable) { KviKvsScriptEventHandler * h = findScriptAppHandler(uEvIdx,szName); if(!h)return false; @@ -336,7 +336,7 @@ void KviKvsEventManager::removeAllModuleRawHandlers(KviKvsModuleInterface *pIfac } } -bool KviKvsEventManager::removeScriptRawHandler(unsigned int uEvIdx,const QString &szName) +bool KviKvsEventManager::removeScriptRawHandler(unsigned int uEvIdx,const TQString &szName) { if(uEvIdx >= KVI_KVS_NUM_RAW_EVENTS)return false; if(!m_rawEventTable[uEvIdx])return false; @@ -345,7 +345,7 @@ bool KviKvsEventManager::removeScriptRawHandler(unsigned int uEvIdx,const QStrin { if(h->type() == KviKvsEventHandler::Script) { - if(KviQString::equalCI(((KviKvsScriptEventHandler *)h)->name(),szName)) + if(KviTQString::equalCI(((KviKvsScriptEventHandler *)h)->name(),szName)) { m_rawEventTable[uEvIdx]->removeRef(h); if(m_rawEventTable[uEvIdx]->isEmpty()) @@ -361,7 +361,7 @@ bool KviKvsEventManager::removeScriptRawHandler(unsigned int uEvIdx,const QStrin } -bool KviKvsEventManager::enableScriptRawHandler(unsigned int uEvIdx,const QString &szName,bool bEnable) +bool KviKvsEventManager::enableScriptRawHandler(unsigned int uEvIdx,const TQString &szName,bool bEnable) { KviKvsScriptEventHandler * h = findScriptRawHandler(uEvIdx,szName); if(!h)return false; @@ -523,7 +523,7 @@ bool KviKvsEventManager::triggerHandlers(KviPointerList * pH } -void KviKvsEventManager::loadRawEvents(const QString &szFileName) +void KviKvsEventManager::loadRawEvents(const TQString &szFileName) { KviConfig cfg(szFileName,KviConfig::Read); removeAllScriptRawHandlers(); @@ -531,8 +531,8 @@ void KviKvsEventManager::loadRawEvents(const QString &szFileName) for(i=0;isetAutoDelete(true); for(unsigned int index = 0;index < nHandlers;index++) { - KviQString::sprintf(tmp,"Name%u",index); - QString szName = cfg.readQStringEntry(tmp,"unnamed"); - KviQString::sprintf(tmp,"Buffer%u",index); - QString szCode = cfg.readQStringEntry(tmp,""); - KviQString::sprintf(tmp,"RawEvent%u::%Q",index,&szName); + KviTQString::sprintf(tmp,"Name%u",index); + TQString szName = cfg.readTQStringEntry(tmp,"unnamed"); + KviTQString::sprintf(tmp,"Buffer%u",index); + TQString szCode = cfg.readTQStringEntry(tmp,""); + KviTQString::sprintf(tmp,"RawEvent%u::%Q",index,&szName); KviKvsScriptEventHandler * s = new KviKvsScriptEventHandler(szName,tmp,szCode); - KviQString::sprintf(tmp,"Enabled%u",index); + KviTQString::sprintf(tmp,"Enabled%u",index); s->setEnabled(cfg.readBoolEntry(tmp,false)); m_rawEventTable[i]->append(s); } @@ -558,7 +558,7 @@ void KviKvsEventManager::loadRawEvents(const QString &szFileName) } } -void KviKvsEventManager::saveRawEvents(const QString &szFileName) +void KviKvsEventManager::saveRawEvents(const TQString &szFileName) { KviConfig cfg(szFileName,KviConfig::Write); cfg.clear(); @@ -568,8 +568,8 @@ void KviKvsEventManager::saveRawEvents(const QString &szFileName) { if(m_rawEventTable[i]) { - QString tmp; - KviQString::sprintf(tmp,"RAW%d",i); + TQString tmp; + KviTQString::sprintf(tmp,"RAW%d",i); cfg.setGroup(tmp); int index = 0; @@ -577,11 +577,11 @@ void KviKvsEventManager::saveRawEvents(const QString &szFileName) { if(s->type() == KviKvsEventHandler::Script) { - KviQString::sprintf(tmp,"Name%d",index); + KviTQString::sprintf(tmp,"Name%d",index); cfg.writeEntry(tmp,((KviKvsScriptEventHandler *)s)->name()); - KviQString::sprintf(tmp,"Buffer%d",index); + KviTQString::sprintf(tmp,"Buffer%d",index); cfg.writeEntry(tmp,((KviKvsScriptEventHandler *)s)->code()); - KviQString::sprintf(tmp,"Enabled%d",index); + KviTQString::sprintf(tmp,"Enabled%d",index); cfg.writeEntry(tmp,((KviKvsScriptEventHandler *)s)->isEnabled()); index++; } @@ -592,7 +592,7 @@ void KviKvsEventManager::saveRawEvents(const QString &szFileName) } -void KviKvsEventManager::loadAppEvents(const QString &szFileName) +void KviKvsEventManager::loadAppEvents(const TQString &szFileName) { KviConfig cfg(szFileName,KviConfig::Read); removeAllScriptAppHandlers(); @@ -600,7 +600,7 @@ void KviKvsEventManager::loadAppEvents(const QString &szFileName) int i; for(i=0;i_< if((i == 4) && !cfg.hasGroup(szEventName)) szEventName = "OnIrcConnectionEstabilished"; @@ -612,15 +612,15 @@ void KviKvsEventManager::loadAppEvents(const QString &szFileName) { for(unsigned int index = 0;index < nHandlers;index++) { - QString tmp; - KviQString::sprintf(tmp,"Name%u",index); - QString szName = cfg.readQStringEntry(tmp,"unnamed"); - KviQString::sprintf(tmp,"Buffer%u",index); - QString szCode = cfg.readQStringEntry(tmp,""); - KviQString::sprintf(tmp,"Enabled%u",index); + TQString tmp; + KviTQString::sprintf(tmp,"Name%u",index); + TQString szName = cfg.readTQStringEntry(tmp,"unnamed"); + KviTQString::sprintf(tmp,"Buffer%u",index); + TQString szCode = cfg.readTQStringEntry(tmp,""); + KviTQString::sprintf(tmp,"Enabled%u",index); bool bEnabled = cfg.readBoolEntry(tmp,false); - QString szCntx; - KviQString::sprintf(szCntx,"%Q::%Q",&(m_appEventTable[i].name()),&szName); + TQString szCntx; + KviTQString::sprintf(szCntx,"%Q::%Q",&(m_appEventTable[i].name()),&szName); KviKvsScriptEventHandler *s = new KviKvsScriptEventHandler(szName,szCntx,szCode,bEnabled); m_appEventTable[i].addHandler(s); } @@ -630,7 +630,7 @@ void KviKvsEventManager::loadAppEvents(const QString &szFileName) } -void KviKvsEventManager::saveAppEvents(const QString &szFileName) +void KviKvsEventManager::saveAppEvents(const TQString &szFileName) { KviConfig cfg(szFileName,KviConfig::Write); cfg.clear(); @@ -641,7 +641,7 @@ void KviKvsEventManager::saveAppEvents(const QString &szFileName) { if(m_appEventTable[i].hasHandlers()) { - QString szEventName(m_appEventTable[i].name()); + TQString szEventName(m_appEventTable[i].name()); // Backwards compatibility >_< if((i == 4) && cfg.hasGroup(szEventName)) { @@ -654,12 +654,12 @@ void KviKvsEventManager::saveAppEvents(const QString &szFileName) { if(s->type() == KviKvsEventHandler::Script) { - QString tmp; - KviQString::sprintf(tmp,"Name%d",index); + TQString tmp; + KviTQString::sprintf(tmp,"Name%d",index); cfg.writeEntry(tmp,((KviKvsScriptEventHandler *)s)->name()); - KviQString::sprintf(tmp,"Buffer%d",index); + KviTQString::sprintf(tmp,"Buffer%d",index); cfg.writeEntry(tmp,((KviKvsScriptEventHandler *)s)->code()); - KviQString::sprintf(tmp,"Enabled%d",index); + KviTQString::sprintf(tmp,"Enabled%d",index); cfg.writeEntry(tmp,((KviKvsScriptEventHandler *)s)->isEnabled()); index++; } diff --git a/src/kvirc/kvs/kvi_kvs_eventmanager.h b/src/kvirc/kvs/kvi_kvs_eventmanager.h index d31d2197..93691d31 100644 --- a/src/kvirc/kvs/kvi_kvs_eventmanager.h +++ b/src/kvirc/kvs/kvi_kvs_eventmanager.h @@ -60,8 +60,8 @@ public: bool hasRawHandlers(unsigned int uEvIdx){ return m_rawEventTable[uEvIdx]; }; KviPointerList * rawHandlers(unsigned int uEvIdx){ return m_rawEventTable[uEvIdx]; }; - KviKvsEvent * findAppEventByName(const QString &szName); - unsigned int findAppEventIndexByName(const QString &szName); + KviKvsEvent * findAppEventByName(const TQString &szName); + unsigned int findAppEventIndexByName(const TQString &szName); bool isValidAppEvent(unsigned int uEvIdx){ return (uEvIdx < KVI_KVS_NUM_APP_EVENTS); }; bool isValidRawEvent(unsigned int uEvIdx){ return (uEvIdx < KVI_KVS_NUM_RAW_EVENTS); }; @@ -69,11 +69,11 @@ public: bool addAppHandler(unsigned int uEvIdx,KviKvsEventHandler * h); bool addRawHandler(unsigned int uRawIdx,KviKvsEventHandler * h); - bool removeScriptAppHandler(unsigned int uEvIdx,const QString &szName); - bool removeScriptRawHandler(unsigned int uEvIdx,const QString &szName); + bool removeScriptAppHandler(unsigned int uEvIdx,const TQString &szName); + bool removeScriptRawHandler(unsigned int uEvIdx,const TQString &szName); - bool enableScriptAppHandler(unsigned int uEvIdx,const QString &szName,bool bEnable); - bool enableScriptRawHandler(unsigned int uEvIdx,const QString &szName,bool bEnable); + bool enableScriptAppHandler(unsigned int uEvIdx,const TQString &szName,bool bEnable); + bool enableScriptRawHandler(unsigned int uEvIdx,const TQString &szName,bool bEnable); bool removeModuleAppHandler(unsigned int uEvIdx,KviKvsModuleInterface *i); bool removeModuleRawHandler(unsigned int uRawIdx,KviKvsModuleInterface *i); @@ -83,8 +83,8 @@ public: void removeAllModuleHandlers(KviKvsModuleInterface * i); - KviKvsScriptEventHandler * findScriptRawHandler(unsigned int uEvIdx,const QString &szName); - KviKvsScriptEventHandler * findScriptAppHandler(unsigned int uEvIdx,const QString &szName); + KviKvsScriptEventHandler * findScriptRawHandler(unsigned int uEvIdx,const TQString &szName); + KviKvsScriptEventHandler * findScriptAppHandler(unsigned int uEvIdx,const TQString &szName); // returns true if further processing should be stopped // none of these functions takes params ownership, so be sure to delete them ! @@ -109,10 +109,10 @@ public: void clearRawEvents(); void clear(); - void loadAppEvents(const QString &szFileName); - void saveAppEvents(const QString &szFileName); - void loadRawEvents(const QString &szFileName); - void saveRawEvents(const QString &szFileName); + void loadAppEvents(const TQString &szFileName); + void saveAppEvents(const TQString &szFileName); + void loadRawEvents(const TQString &szFileName); + void saveRawEvents(const TQString &szFileName); }; diff --git a/src/kvirc/kvs/kvi_kvs_eventtable.cpp b/src/kvirc/kvs/kvi_kvs_eventtable.cpp index 4b8c8c98..e2bab770 100644 --- a/src/kvirc/kvs/kvi_kvs_eventtable.cpp +++ b/src/kvirc/kvs/kvi_kvs_eventtable.cpp @@ -254,7 +254,7 @@ KviKvsEvent KviKvsEventManager::m_appEventTable[KVI_NUM_SCRIPT_EVENTS]= @description: This event is triggered in the first console of a new frame window. A frame window is the toplevel window that contains the consoles - and the other MDI children windows. + and the other MDI tqchildren windows. @seealso: [event:onframewindowdestroyed]OnFrameWindowDestroyed[/event] */ @@ -842,7 +842,7 @@ KviKvsEvent KviKvsEventManager::m_appEventTable[KVI_NUM_SCRIPT_EVENTS]= Console @description: Triggered when an user is quitting IRC.[br] - The QUIT message has already been processed by the server , so + The TQUIT message has already been processed by the server , so the user is effectively no longer on IRC. On the other side, it might be useful to access the user-related data from this event, thus the handler is called effectively just BEFORE the @@ -1035,7 +1035,7 @@ KviKvsEvent KviKvsEventManager::m_appEventTable[KVI_NUM_SCRIPT_EVENTS]= $0 = source nick $1 = source username $2 = source hostname - $3 = ban mask + $3 = ban tqmask @window: Channel window @description: @@ -1043,7 +1043,7 @@ KviKvsEvent KviKvsEventManager::m_appEventTable[KVI_NUM_SCRIPT_EVENTS]= @seealso: [event:onunban]OnUnban[/event] */ - EVENT("OnBan","$0 = source nick\n$1 = source username\n$2 = source hostname\n$3 = ban mask"), + EVENT("OnBan","$0 = source nick\n$1 = source username\n$2 = source hostname\n$3 = ban tqmask"), /* @doc: onunban @type: @@ -1056,7 +1056,7 @@ KviKvsEvent KviKvsEventManager::m_appEventTable[KVI_NUM_SCRIPT_EVENTS]= $0 = source nick $1 = source username $2 = source hostname - $3 = unban mask + $3 = unban tqmask @window: Channel window @description: @@ -1064,7 +1064,7 @@ KviKvsEvent KviKvsEventManager::m_appEventTable[KVI_NUM_SCRIPT_EVENTS]= @seealso: [event:onban]OnBan[/event] */ - EVENT("OnUnBan","$0 = source nick\n$1 = source username\n$2 = source hostname\n$3 = ban mask"), + EVENT("OnUnBan","$0 = source nick\n$1 = source username\n$2 = source hostname\n$3 = ban tqmask"), /* @doc: onmeban @type: @@ -1077,15 +1077,15 @@ KviKvsEvent KviKvsEventManager::m_appEventTable[KVI_NUM_SCRIPT_EVENTS]= $0 = source nickname $1 = source username $2 = source hostname - $3 = ban mask + $3 = ban tqmask @window: Channel @description: - Triggered when someone has set a +b flag that matches your mask (bans you) in the channel.[br] + Triggered when someone has set a +b flag that matches your tqmask (bans you) in the channel.[br] @seealso: [event:onmeunban]OnMeUnban[/event] */ - EVENT("OnMeBan","$0 = source nick\n$1 = source username\n$2 = source hostname\n$3 = ban mask"), + EVENT("OnMeBan","$0 = source nick\n$1 = source username\n$2 = source hostname\n$3 = ban tqmask"), /* @doc: onmeunban @type: @@ -1098,15 +1098,15 @@ KviKvsEvent KviKvsEventManager::m_appEventTable[KVI_NUM_SCRIPT_EVENTS]= $0 = source nickname $1 = source username $2 = source hostname - $3 = ban mask + $3 = ban tqmask @window: Channel @description: - Triggered when someone has set a -b flag that matches your mask (debans you) in the channel.[br] + Triggered when someone has set a -b flag that matches your tqmask (debans you) in the channel.[br] @seealso: [event:onmeban]OnMeBan[/event] */ -EVENT("OnMeUnban","$0 = source nick\n$1 = source username\n$2 = source hostname\n$3 = ban mask"), +EVENT("OnMeUnban","$0 = source nick\n$1 = source username\n$2 = source hostname\n$3 = ban tqmask"), /* @doc: onbanexception @type: @@ -1119,7 +1119,7 @@ EVENT("OnMeUnban","$0 = source nick\n$1 = source username\n$2 = source hostname\ $0 = source nick $1 = source username $2 = source hostname - $3 = banexception mask + $3 = banexception tqmask @window: Channel window @description: @@ -1128,7 +1128,7 @@ EVENT("OnMeUnban","$0 = source nick\n$1 = source username\n$2 = source hostname\ [event:onbanexceptionremove]OnBanExceptionRemove[/event] */ - EVENT("OnBanException","$0 = source nick\n$1 = source username\n$2 = source hostname\n$3 = ban exception mask"), + EVENT("OnBanException","$0 = source nick\n$1 = source username\n$2 = source hostname\n$3 = ban exception tqmask"), /* @doc: onbanexceptionremove @type: @@ -1141,7 +1141,7 @@ EVENT("OnMeUnban","$0 = source nick\n$1 = source username\n$2 = source hostname\ $0 = source nick $1 = source username $2 = source hostname - $3 = unban mask + $3 = unban tqmask @window: Channel window @description: @@ -1149,7 +1149,7 @@ EVENT("OnMeUnban","$0 = source nick\n$1 = source username\n$2 = source hostname\ @seealso: [event:onbanexception]OnBanException[/event] */ - EVENT("OnBanExceptionRemove","$0 = source nick\n$1 = source username\n$2 = source hostname\n$3 = ban exception mask"), + EVENT("OnBanExceptionRemove","$0 = source nick\n$1 = source username\n$2 = source hostname\n$3 = ban exception tqmask"), /* @doc: onmebanexception @type: @@ -1162,7 +1162,7 @@ EVENT("OnMeUnban","$0 = source nick\n$1 = source username\n$2 = source hostname\ $0 = source nick $1 = source username $2 = source hostname - $3 = mask + $3 = tqmask @window: Channel window @description: @@ -1171,7 +1171,7 @@ channel @seealso: [event:onmebanexceptionremove]OnMeBanExceptionRemove[/event] */ - EVENT("OnMeBanException","$0 = source nick\n$1 = source username\n$2 = source hostname\n$3 = mask"), + EVENT("OnMeBanException","$0 = source nick\n$1 = source username\n$2 = source hostname\n$3 = tqmask"), /* @doc: onmebanexceptionremove @type: @@ -1184,7 +1184,7 @@ channel $0 = source nick $1 = source username $2 = source hostname - $3 = mask + $3 = tqmask @window: Channel window @description: @@ -1192,7 +1192,7 @@ channel @seealso: [event:onmebanexception]OnMeBanException[/event] */ - EVENT("OnMeBanExceptionRemove","$0 = source nick\n$1 = source username\n$2 = source hostname\n$3 = mask"), + EVENT("OnMeBanExceptionRemove","$0 = source nick\n$1 = source username\n$2 = source hostname\n$3 = tqmask"), /* @doc: onop @type: @@ -1622,7 +1622,7 @@ channel @short: An unhandled literal server message has been received @parameters: - $0 = source mask + $0 = source tqmask $1 = message (literal) $2- = parameters @window: @@ -1636,7 +1636,7 @@ channel raw numeric events to handle them.[br] @seealso: */ - EVENT("OnUnhandledLiteral","$0 = source mask\n$1 = message\n$2- parameters"), + EVENT("OnUnhandledLiteral","$0 = source tqmask\n$1 = message\n$2- parameters"), /* @doc: onmehalfop @type: @@ -1731,7 +1731,7 @@ channel $0 = source nick $1 = source username $2 = source host - $3 = target mask + $3 = target tqmask @window: Channels window @description: @@ -1739,7 +1739,7 @@ channel @seealso: [event:oninviteexceptionremove]OnInviteExceptionRemove[/event] */ - EVENT("OnInviteException","$0 = source nick\n$1 = source username\n$2 = source hostname\n$3 = target mask"), + EVENT("OnInviteException","$0 = source nick\n$1 = source username\n$2 = source hostname\n$3 = target tqmask"), /* @doc: oninviteexceptionremove @type: @@ -1752,7 +1752,7 @@ channel $0 = source nick $1 = source username $2 = source host - $3 = target mask + $3 = target tqmask @window: Channels window @description: @@ -1760,7 +1760,7 @@ channel @seealso: [event:oninviteexceptionremove]OnInviteExceptionRemove[/event] */ - EVENT("OnInviteExceptionRemove","$0 = source nick\n$1 = source username\n$2 = source hostname\n$3 = target mask"), + EVENT("OnInviteExceptionRemove","$0 = source nick\n$1 = source username\n$2 = source hostname\n$3 = target tqmask"), /* @doc: onmeinviteexception @type: @@ -1773,16 +1773,16 @@ channel $0 = source nick $1 = source username $2 = source host - $3 = mask + $3 = tqmask @window: Channels window @description: - Someone has set mode +I on a channel with a target mask that matches - the local user mask + Someone has set mode +I on a channel with a target tqmask that matches + the local user tqmask @seealso: [event:onmeinviteexceptionremove]OnMeInviteExceptionRemove[/event] */ - EVENT("OnMeInviteException","$0 = source nick\n$1 = source username\n$2 = source hostname\n$3 = mask"), + EVENT("OnMeInviteException","$0 = source nick\n$1 = source username\n$2 = source hostname\n$3 = tqmask"), /* @doc: onmeinviteexceptionremove @type: @@ -1795,16 +1795,16 @@ channel $0 = source nick $1 = source username $2 = source host - $3 = mask + $3 = tqmask @window: Channels window @description: - Someone has set mode -I on a channel with a target mask that matches - the local user mask + Someone has set mode -I on a channel with a target tqmask that matches + the local user tqmask @seealso: [event:onmeinviteexceptionremove]OnMeInviteExceptionRemove[/event] */ - EVENT("OnMeInviteExceptionRemove","$0 = source nick\n$1 = source username\n$2 = source hostname\n$3 = mask"), + EVENT("OnMeInviteExceptionRemove","$0 = source nick\n$1 = source username\n$2 = source hostname\n$3 = tqmask"), /* @doc: onaction @type: @@ -2107,7 +2107,7 @@ channel $5 contains the original color/icon set of the message that depends on the type of the message itself.[br] Since the CTCP ACTION messages generally have different format of output - then for your convenience $6 contains 1 if the message was caused by a + then for your convenience $6 tqcontains 1 if the message was caused by a CTCP ACTION and 0 otherwise.[br] If you call [cmd]halt[/cmd] in this event the message output will be completely disabled (thus, KVIrc assumes that YOU have provided the necessary output and feedback to the user).[br] @@ -2797,11 +2797,11 @@ channel Triggered when the user requests a disconnection from a server by pressing the "disconnect", by closing the console or closing KVIrc. It is your last chance - to send some meaningful data to the server before the QUIT message + to send some meaningful data to the server before the TQUIT message is sent. You can't prevent the user from disconnecting: [cmd]halt [/cmd]does nothing here.[br] This event is useful to either give a salute to all the users you were talking with or maybe to send some commands to the - bouncer you're connected to. Note that you can override the QUIT + bouncer you're connected to. Note that you can override the TQUIT message sent by KVIrc by sending it by youself first.[br] @seealso: */ @@ -2967,7 +2967,7 @@ channel channel @description: Triggered when a channel mode has been changed, AFTER all the mode specific events - were triggered. $3 contains the unparsed mode flags (-o+b...) and $4 contains + were triggered. $3 contains the unparsed mode flags (-o+b...) and $4 tqcontains the unparsed mode parameter string (you need to split it!). */ EVENT("OnChannelModeChange","$0 = sourcenick\n$1 = sourceusername\n$2 = sourcehost\n$3 = modeflags\n$4 = mode params"), diff --git a/src/kvirc/kvs/kvi_kvs_hash.cpp b/src/kvirc/kvs/kvi_kvs_hash.cpp index 3c391fcd..0d4c93f8 100644 --- a/src/kvirc/kvs/kvi_kvs_hash.cpp +++ b/src/kvirc/kvs/kvi_kvs_hash.cpp @@ -28,18 +28,18 @@ KviKvsHash::KviKvsHash() { - m_pDict = new KviPointerHashTable(17,false); + m_pDict = new KviPointerHashTable(17,false); m_pDict->setAutoDelete(true); } KviKvsHash::KviKvsHash(const KviKvsHash &h) { - m_pDict = new KviPointerHashTable(); + m_pDict = new KviPointerHashTable(); m_pDict->setAutoDelete(true); - KviPointerHashTableIterator it(*(h.m_pDict)); + KviPointerHashTableIterator it(*(h.m_pDict)); while(it.current()) { - m_pDict->replace(it.currentKey(),new KviKvsVariant(*(it.current()))); + m_pDict->tqreplace(it.currentKey(),new KviKvsVariant(*(it.current()))); ++it; } } @@ -49,9 +49,9 @@ KviKvsHash::~KviKvsHash() delete m_pDict; } -void KviKvsHash::appendAsString(QString &szBuffer) const +void KviKvsHash::appendAsString(TQString &szBuffer) const { - KviPointerHashTableIterator it(*m_pDict); + KviPointerHashTableIterator it(*m_pDict); bool bNeedComma = false; while(KviKvsVariant * s = it.current()) { @@ -62,11 +62,11 @@ void KviKvsHash::appendAsString(QString &szBuffer) const } } -void KviKvsHash::serialize(QString& result) +void KviKvsHash::serialize(TQString& result) { - QString tmpBuffer; + TQString tmpBuffer; result="{"; - KviPointerHashTableIterator it(*m_pDict); + KviPointerHashTableIterator it(*m_pDict); bool bNeedComma = false; while(KviKvsVariant * s = it.current()) { @@ -86,11 +86,11 @@ void KviKvsHash::serialize(QString& result) result.append('}'); } -KviKvsVariant * KviKvsHash::get(const QString &szKey) +KviKvsVariant * KviKvsHash::get(const TQString &szKey) { - KviKvsVariant * v = m_pDict->find(szKey); + KviKvsVariant * v = m_pDict->tqfind(szKey); if(v)return v; v = new KviKvsVariant(); - m_pDict->replace(szKey,v); + m_pDict->tqreplace(szKey,v); return v; } diff --git a/src/kvirc/kvs/kvi_kvs_hash.h b/src/kvirc/kvs/kvi_kvs_hash.h index e0b2d865..69ce6929 100644 --- a/src/kvirc/kvs/kvi_kvs_hash.h +++ b/src/kvirc/kvs/kvi_kvs_hash.h @@ -32,7 +32,7 @@ #include "kvi_kvs_variant.h" #include "kvi_heapobject.h" -typedef KVIRC_API KviPointerHashTableIterator KviKvsHashIterator; +typedef KVIRC_API KviPointerHashTableIterator KviKvsHashIterator; // This class must not have virtual funcitons nor destructor // Otherwise it will happily crash on windows when it is @@ -44,21 +44,21 @@ public: KviKvsHash(const KviKvsHash &h); ~KviKvsHash(); protected: - KviPointerHashTable * m_pDict; + KviPointerHashTable * m_pDict; public: - void unset(const QString &szKey){ m_pDict->remove(szKey); }; - void set(const QString &szKey,KviKvsVariant * pVal){ m_pDict->replace(szKey,pVal); }; - KviKvsVariant * find(const QString &szKey) const { return m_pDict->find(szKey); }; - KviKvsVariant * get(const QString &szKey); + void unset(const TQString &szKey){ m_pDict->remove(szKey); }; + void set(const TQString &szKey,KviKvsVariant * pVal){ m_pDict->tqreplace(szKey,pVal); }; + KviKvsVariant * tqfind(const TQString &szKey) const { return m_pDict->tqfind(szKey); }; + KviKvsVariant * get(const TQString &szKey); bool isEmpty() const { return m_pDict->isEmpty(); }; kvs_uint_t size() const { return m_pDict->count(); }; - void appendAsString(QString &szBuffer) const; + void appendAsString(TQString &szBuffer) const; - const KviPointerHashTable * dict(){ return m_pDict; }; + const KviPointerHashTable * dict(){ return m_pDict; }; - void serialize(QString& result); + void serialize(TQString& result); }; #endif //!_KVI_KVS_HASH_H_ diff --git a/src/kvirc/kvs/kvi_kvs_kernel.cpp b/src/kvirc/kvs/kvi_kvs_kernel.cpp index 9c709fe0..e16bed3b 100644 --- a/src/kvirc/kvs/kvi_kvs_kernel.cpp +++ b/src/kvirc/kvs/kvi_kvs_kernel.cpp @@ -47,13 +47,13 @@ KviKvsKernel::KviKvsKernel() { m_pKvsKernel = this; - m_pSpecialCommandParsingRoutineDict = new KviPointerHashTable(17,false); + m_pSpecialCommandParsingRoutineDict = new KviPointerHashTable(17,false); m_pSpecialCommandParsingRoutineDict->setAutoDelete(true); - m_pCoreSimpleCommandExecRoutineDict = new KviPointerHashTable(51,false); + m_pCoreSimpleCommandExecRoutineDict = new KviPointerHashTable(51,false); m_pCoreSimpleCommandExecRoutineDict->setAutoDelete(true); - m_pCoreFunctionExecRoutineDict = new KviPointerHashTable(51,false); + m_pCoreFunctionExecRoutineDict = new KviPointerHashTable(51,false); m_pCoreFunctionExecRoutineDict->setAutoDelete(true); - m_pCoreCallbackCommandExecRoutineDict = new KviPointerHashTable(17,false); + m_pCoreCallbackCommandExecRoutineDict = new KviPointerHashTable(17,false); m_pCoreCallbackCommandExecRoutineDict->setAutoDelete(true); m_pGlobalVariables = new KviKvsHash(); @@ -101,20 +101,20 @@ void KviKvsKernel::done() #define COMPLETE_COMMAND_BY_DICT(__type,__dict) \ { \ - KviPointerHashTableIterator it(*__dict); \ + KviPointerHashTableIterator it(*__dict); \ int l = szCommandBegin.length(); \ while(it.current()) \ { \ - if(KviQString::equalCIN(szCommandBegin,it.currentKey(),l)) \ - pMatches->append(new QString(it.currentKey())); \ + if(KviTQString::equalCIN(szCommandBegin,it.currentKey(),l)) \ + pMatches->append(new TQString(it.currentKey())); \ ++it; \ } \ } -void KviKvsKernel::completeCommand(const QString &szCommandBegin,KviPointerList * pMatches) +void KviKvsKernel::completeCommand(const TQString &szCommandBegin,KviPointerList * pMatches) { - int idx = szCommandBegin.find(QChar('.')); + int idx = szCommandBegin.tqfind(TQChar('.')); if(idx == -1) { // no module name inside @@ -122,97 +122,97 @@ void KviKvsKernel::completeCommand(const QString &szCommandBegin,KviPointerList< COMPLETE_COMMAND_BY_DICT(KviKvsSpecialCommandParsingRoutine,m_pSpecialCommandParsingRoutineDict) COMPLETE_COMMAND_BY_DICT(KviKvsCoreCallbackCommandExecRoutine,m_pCoreCallbackCommandExecRoutineDict) - KviPointerList lModules; + KviPointerList lModules; lModules.setAutoDelete(true); g_pModuleManager->completeModuleNames(szCommandBegin,&lModules); - QString szEmpty = ""; - for(QString * pszModuleName = lModules.first();pszModuleName;pszModuleName = lModules.next()) + TQString szEmpty = ""; + for(TQString * pszModuleName = lModules.first();pszModuleName;pszModuleName = lModules.next()) completeModuleCommand(*pszModuleName,szEmpty,pMatches); KviKvsAliasManager::instance()->completeCommand(szCommandBegin,pMatches); } else { // contains a module name - QString szModuleName = szCommandBegin.left(idx); - QString szRight = szCommandBegin.right(szCommandBegin.length() - (idx+1)); + TQString szModuleName = szCommandBegin.left(idx); + TQString szRight = szCommandBegin.right(szCommandBegin.length() - (idx+1)); completeModuleCommand(szModuleName,szRight,pMatches); } } -void KviKvsKernel::completeModuleCommand(const QString &szModuleName,const QString &szCommandBegin,KviPointerList * pMatches) +void KviKvsKernel::completeModuleCommand(const TQString &szModuleName,const TQString &szCommandBegin,KviPointerList * pMatches) { KviModule * pModule = g_pModuleManager->getModule(szModuleName.latin1()); if(!pModule)return; - KviPointerList lModuleMatches; + KviPointerList lModuleMatches; lModuleMatches.setAutoDelete(true); pModule->completeCommand(szCommandBegin,&lModuleMatches); - for(QString * pszModuleMatch = lModuleMatches.first();pszModuleMatch;pszModuleMatch = lModuleMatches.next()) + for(TQString * pszModuleMatch = lModuleMatches.first();pszModuleMatch;pszModuleMatch = lModuleMatches.next()) { - QString * pszMatch = new QString(*pszModuleMatch); + TQString * pszMatch = new TQString(*pszModuleMatch); pszMatch->prepend("."); pszMatch->prepend(szModuleName); pMatches->append(pszMatch); } } -void KviKvsKernel::completeFunction(const QString &szFunctionBegin,KviPointerList * pMatches) +void KviKvsKernel::completeFunction(const TQString &szFunctionBegin,KviPointerList * pMatches) { - int idx = szFunctionBegin.find(QChar('.')); + int idx = szFunctionBegin.tqfind(TQChar('.')); if(idx == -1) { // no module name inside - KviPointerHashTableIterator it(*m_pCoreFunctionExecRoutineDict); + KviPointerHashTableIterator it(*m_pCoreFunctionExecRoutineDict); int l = szFunctionBegin.length(); while(it.current()) { - if(KviQString::equalCIN(szFunctionBegin,it.currentKey(),l)) + if(KviTQString::equalCIN(szFunctionBegin,it.currentKey(),l)) { - QString * pMatch = new QString(it.currentKey()); + TQString * pMatch = new TQString(it.currentKey()); //pMatch->prepend("$"); pMatches->append(pMatch); } ++it; } - KviPointerList lModules; + KviPointerList lModules; lModules.setAutoDelete(true); g_pModuleManager->completeModuleNames(szFunctionBegin,&lModules); - QString szEmpty = ""; - for(QString * pszModuleName = lModules.first();pszModuleName;pszModuleName = lModules.next()) + TQString szEmpty = ""; + for(TQString * pszModuleName = lModules.first();pszModuleName;pszModuleName = lModules.next()) completeModuleFunction(*pszModuleName,szEmpty,pMatches); - KviPointerList lAliases; + KviPointerList lAliases; lAliases.setAutoDelete(true); KviKvsAliasManager::instance()->completeCommand(szFunctionBegin,&lAliases); - for(QString * pszAlias = lAliases.first();pszAlias;pszAlias = lAliases.next()) + for(TQString * pszAlias = lAliases.first();pszAlias;pszAlias = lAliases.next()) { - QString * pszAliasMatch = new QString(*pszAlias); + TQString * pszAliasMatch = new TQString(*pszAlias); //pszAliasMatch->prepend("$"); pMatches->append(pszAliasMatch); } } else { // contains a module name - QString szModuleName = szFunctionBegin.left(idx); - QString szRight = szFunctionBegin.right(szFunctionBegin.length() - (idx+1)); + TQString szModuleName = szFunctionBegin.left(idx); + TQString szRight = szFunctionBegin.right(szFunctionBegin.length() - (idx+1)); completeModuleFunction(szModuleName,szRight,pMatches); } } -void KviKvsKernel::completeModuleFunction(const QString &szModuleName,const QString &szCommandBegin,KviPointerList * pMatches) +void KviKvsKernel::completeModuleFunction(const TQString &szModuleName,const TQString &szCommandBegin,KviPointerList * pMatches) { KviModule * pModule = g_pModuleManager->getModule(szModuleName.latin1()); if(!pModule)return; - KviPointerList lModuleMatches; + KviPointerList lModuleMatches; lModuleMatches.setAutoDelete(true); pModule->completeFunction(szCommandBegin,&lModuleMatches); - for(QString * pszModuleMatch = lModuleMatches.first();pszModuleMatch;pszModuleMatch = lModuleMatches.next()) + for(TQString * pszModuleMatch = lModuleMatches.first();pszModuleMatch;pszModuleMatch = lModuleMatches.next()) { - QString * pszMatch = new QString(*pszModuleMatch); + TQString * pszMatch = new TQString(*pszModuleMatch); pszMatch->prepend("."); pszMatch->prepend(szModuleName); //pszMatch->prepend("$"); diff --git a/src/kvirc/kvs/kvi_kvs_kernel.h b/src/kvirc/kvs/kvi_kvs_kernel.h index a6f8eb2c..7c15655f 100644 --- a/src/kvirc/kvs/kvi_kvs_kernel.h +++ b/src/kvirc/kvs/kvi_kvs_kernel.h @@ -76,11 +76,11 @@ public: private: static KviKvsKernel * m_pKvsKernel; // global kernel object - KviPointerHashTable * m_pSpecialCommandParsingRoutineDict; + KviPointerHashTable * m_pSpecialCommandParsingRoutineDict; - KviPointerHashTable * m_pCoreSimpleCommandExecRoutineDict; - KviPointerHashTable * m_pCoreCallbackCommandExecRoutineDict; - KviPointerHashTable * m_pCoreFunctionExecRoutineDict; + KviPointerHashTable * m_pCoreSimpleCommandExecRoutineDict; + KviPointerHashTable * m_pCoreCallbackCommandExecRoutineDict; + KviPointerHashTable * m_pCoreFunctionExecRoutineDict; KviKvsHash * m_pGlobalVariables; KviKvsVariantList * m_pEmptyParameterList; @@ -100,34 +100,34 @@ public: KviKvsAsyncOperationManager * asyncOperationManager(){ return m_pAsyncOperationManager; }; - void registerSpecialCommandParsingRoutine(const QString &szCmdName,KviKvsSpecialCommandParsingRoutine * r) - { m_pSpecialCommandParsingRoutineDict->replace(szCmdName,r); }; - KviKvsSpecialCommandParsingRoutine * findSpecialCommandParsingRoutine(const QString &szCmdName) - { return m_pSpecialCommandParsingRoutineDict->find(szCmdName); }; - - void registerCoreSimpleCommandExecRoutine(const QString &szCmdName,KviKvsCoreSimpleCommandExecRoutine * r) - { m_pCoreSimpleCommandExecRoutineDict->replace(szCmdName,r); }; - KviKvsCoreSimpleCommandExecRoutine * findCoreSimpleCommandExecRoutine(const QString &szCmdName) - { return m_pCoreSimpleCommandExecRoutineDict->find(szCmdName); }; - - void registerCoreFunctionExecRoutine(const QString &szFncName,KviKvsCoreFunctionExecRoutine * r) - { m_pCoreFunctionExecRoutineDict->replace(szFncName,r); }; - KviKvsCoreFunctionExecRoutine * findCoreFunctionExecRoutine(const QString &szFncName) - { return m_pCoreFunctionExecRoutineDict->find(szFncName); }; - - void registerCoreCallbackCommandExecRoutine(const QString &szCmdName,KviKvsCoreCallbackCommandExecRoutine * r) - { m_pCoreCallbackCommandExecRoutineDict->replace(szCmdName,r); }; - KviKvsCoreCallbackCommandExecRoutine * findCoreCallbackCommandExecRoutine(const QString &szCmdName) - { return m_pCoreCallbackCommandExecRoutineDict->find(szCmdName); }; - - void completeCommand(const QString &szCommandBegin,KviPointerList * pMatches); - void completeFunction(const QString &szFunctionBegin,KviPointerList * pMatches); - void completeModuleCommand(const QString &szModuleName,const QString &szCommandBegin,KviPointerList * matches); - void completeModuleFunction(const QString &szModuleName,const QString &szFunctionBegin,KviPointerList * matches); + void registerSpecialCommandParsingRoutine(const TQString &szCmdName,KviKvsSpecialCommandParsingRoutine * r) + { m_pSpecialCommandParsingRoutineDict->tqreplace(szCmdName,r); }; + KviKvsSpecialCommandParsingRoutine * findSpecialCommandParsingRoutine(const TQString &szCmdName) + { return m_pSpecialCommandParsingRoutineDict->tqfind(szCmdName); }; + + void registerCoreSimpleCommandExecRoutine(const TQString &szCmdName,KviKvsCoreSimpleCommandExecRoutine * r) + { m_pCoreSimpleCommandExecRoutineDict->tqreplace(szCmdName,r); }; + KviKvsCoreSimpleCommandExecRoutine * findCoreSimpleCommandExecRoutine(const TQString &szCmdName) + { return m_pCoreSimpleCommandExecRoutineDict->tqfind(szCmdName); }; + + void registerCoreFunctionExecRoutine(const TQString &szFncName,KviKvsCoreFunctionExecRoutine * r) + { m_pCoreFunctionExecRoutineDict->tqreplace(szFncName,r); }; + KviKvsCoreFunctionExecRoutine * findCoreFunctionExecRoutine(const TQString &szFncName) + { return m_pCoreFunctionExecRoutineDict->tqfind(szFncName); }; + + void registerCoreCallbackCommandExecRoutine(const TQString &szCmdName,KviKvsCoreCallbackCommandExecRoutine * r) + { m_pCoreCallbackCommandExecRoutineDict->tqreplace(szCmdName,r); }; + KviKvsCoreCallbackCommandExecRoutine * findCoreCallbackCommandExecRoutine(const TQString &szCmdName) + { return m_pCoreCallbackCommandExecRoutineDict->tqfind(szCmdName); }; + + void completeCommand(const TQString &szCommandBegin,KviPointerList * pMatches); + void completeFunction(const TQString &szFunctionBegin,KviPointerList * pMatches); + void completeModuleCommand(const TQString &szModuleName,const TQString &szCommandBegin,KviPointerList * matches); + void completeModuleFunction(const TQString &szModuleName,const TQString &szFunctionBegin,KviPointerList * matches); /* - KviPointerList * completeCommandAllocateResult(const QString &szCommandBegin); - KviPointerList * completeFunctionAllocateResult(const QString &szFunctionBegin); - void freeCompletionResult(KviPointerList * l); + KviPointerList * completeCommandAllocateResult(const TQString &szCommandBegin); + KviPointerList * completeFunctionAllocateResult(const TQString &szFunctionBegin); + void freeCompletionResult(KviPointerList * l); */ }; diff --git a/src/kvirc/kvs/kvi_kvs_moduleinterface.cpp b/src/kvirc/kvs/kvi_kvs_moduleinterface.cpp index 911eb8c0..c678cef7 100644 --- a/src/kvirc/kvs/kvi_kvs_moduleinterface.cpp +++ b/src/kvirc/kvs/kvi_kvs_moduleinterface.cpp @@ -32,13 +32,13 @@ #include "kvi_kvs_treenode_data.h" #include "kvi_kvs_treenode_datalist.h" -bool KviKvsModuleCallbackCommandCall::getParameterCode(unsigned int uParamIdx,QString &szParamBuffer) +bool KviKvsModuleCallbackCommandCall::getParameterCode(unsigned int uParamIdx,TQString &szParamBuffer) { if(!m_pParameterDataList)return false; KviKvsTreeNodeData * d = m_pParameterDataList->item(uParamIdx); if(!d)return false; - const QChar * pBegin = d->location(); - const QChar * pEnd = d->endingLocation(); + const TQChar * pBegin = d->location(); + const TQChar * pEnd = d->endingLocation(); if(!(pBegin && pEnd))return false; szParamBuffer.setUnicode(pBegin,pEnd - pBegin); szParamBuffer.stripWhiteSpace(); @@ -48,11 +48,11 @@ bool KviKvsModuleCallbackCommandCall::getParameterCode(unsigned int uParamIdx,QS KviKvsModuleInterface::KviKvsModuleInterface() { - m_pModuleSimpleCommandExecRoutineDict = new KviPointerHashTable(17,false); + m_pModuleSimpleCommandExecRoutineDict = new KviPointerHashTable(17,false); m_pModuleSimpleCommandExecRoutineDict->setAutoDelete(true); - m_pModuleFunctionExecRoutineDict = new KviPointerHashTable(17,false); + m_pModuleFunctionExecRoutineDict = new KviPointerHashTable(17,false); m_pModuleFunctionExecRoutineDict->setAutoDelete(true); - m_pModuleCallbackCommandExecRoutineDict = new KviPointerHashTable(17,false); + m_pModuleCallbackCommandExecRoutineDict = new KviPointerHashTable(17,false); m_pModuleCallbackCommandExecRoutineDict->setAutoDelete(true); } @@ -66,41 +66,41 @@ KviKvsModuleInterface::~KviKvsModuleInterface() #define COMPLETE_WORD_BY_DICT(__word,__list,__type,__dict) \ { \ - KviPointerHashTableIterator it(*__dict); \ + KviPointerHashTableIterator it(*__dict); \ int l = __word.length(); \ while(it.current()) \ { \ - if(KviQString::equalCIN(__word,it.currentKey(),l)) \ - __list->append(new QString(it.currentKey())); \ + if(KviTQString::equalCIN(__word,it.currentKey(),l)) \ + __list->append(new TQString(it.currentKey())); \ ++it; \ } \ } -void KviKvsModuleInterface::completeCommand(const QString &szCommandBegin,KviPointerList * pMatches) +void KviKvsModuleInterface::completeCommand(const TQString &szCommandBegin,KviPointerList * pMatches) { COMPLETE_WORD_BY_DICT(szCommandBegin,pMatches,KviKvsModuleSimpleCommandExecRoutine,m_pModuleSimpleCommandExecRoutineDict) COMPLETE_WORD_BY_DICT(szCommandBegin,pMatches,KviKvsModuleCallbackCommandExecRoutine,m_pModuleCallbackCommandExecRoutineDict) } -void KviKvsModuleInterface::completeFunction(const QString &szFunctionBegin,KviPointerList * pMatches) +void KviKvsModuleInterface::completeFunction(const TQString &szFunctionBegin,KviPointerList * pMatches) { COMPLETE_WORD_BY_DICT(szFunctionBegin,pMatches,KviKvsModuleFunctionExecRoutine,m_pModuleFunctionExecRoutineDict) } -void KviKvsModuleInterface::kvsRegisterSimpleCommand(const QString &szCommand,KviKvsModuleSimpleCommandExecRoutine r) +void KviKvsModuleInterface::kvsRegisterSimpleCommand(const TQString &szCommand,KviKvsModuleSimpleCommandExecRoutine r) { - m_pModuleSimpleCommandExecRoutineDict->replace(szCommand,new KviKvsModuleSimpleCommandExecRoutine(r)); + m_pModuleSimpleCommandExecRoutineDict->tqreplace(szCommand,new KviKvsModuleSimpleCommandExecRoutine(r)); } -void KviKvsModuleInterface::kvsRegisterCallbackCommand(const QString &szCommand,KviKvsModuleCallbackCommandExecRoutine r) +void KviKvsModuleInterface::kvsRegisterCallbackCommand(const TQString &szCommand,KviKvsModuleCallbackCommandExecRoutine r) { - m_pModuleCallbackCommandExecRoutineDict->replace(szCommand,new KviKvsModuleCallbackCommandExecRoutine(r)); + m_pModuleCallbackCommandExecRoutineDict->tqreplace(szCommand,new KviKvsModuleCallbackCommandExecRoutine(r)); } -void KviKvsModuleInterface::kvsRegisterFunction(const QString &szFunction,KviKvsModuleFunctionExecRoutine r) +void KviKvsModuleInterface::kvsRegisterFunction(const TQString &szFunction,KviKvsModuleFunctionExecRoutine r) { - m_pModuleFunctionExecRoutineDict->replace(szFunction,new KviKvsModuleFunctionExecRoutine(r)); + m_pModuleFunctionExecRoutineDict->tqreplace(szFunction,new KviKvsModuleFunctionExecRoutine(r)); } @@ -161,7 +161,7 @@ static bool default_module_kvs_cmd_unload(KviKvsModuleCommandCall *c) { if(c->module()->isLocked()) { - if(!c->switches()->find('f',"force")) + if(!c->switches()->tqfind('f',"force")) { c->warning(__tr2qs("Can't unload the module: it has locked itself in memory")); return true; diff --git a/src/kvirc/kvs/kvi_kvs_moduleinterface.h b/src/kvirc/kvs/kvi_kvs_moduleinterface.h index ccfbaca7..698c393d 100644 --- a/src/kvirc/kvs/kvi_kvs_moduleinterface.h +++ b/src/kvirc/kvs/kvi_kvs_moduleinterface.h @@ -79,8 +79,8 @@ public: KviKvsSwitchList * switchList(){ return m_pSwitchList; }; // forwarders for the switch list - bool hasSwitch(unsigned short u,const QString &szSwitch){ return (m_pSwitchList->find(u,szSwitch) != 0); }; - KviKvsVariant * getSwitch(unsigned short u,const QString &szSwitch){ return m_pSwitchList->find(u,szSwitch); }; + bool hasSwitch(unsigned short u,const TQString &szSwitch){ return (m_pSwitchList->tqfind(u,szSwitch) != 0); }; + KviKvsVariant * getSwitch(unsigned short u,const TQString &szSwitch){ return m_pSwitchList->tqfind(u,szSwitch); }; }; class KVIRC_API KviKvsModuleCallbackCommandCall : public KviKvsModuleCommandCall @@ -100,7 +100,7 @@ public: public: // Never NULL, but may have empty code const KviKvsScript * callback(){ return m_pCallback; }; - virtual bool getParameterCode(unsigned int uParamIdx,QString &szParamBuffer); + virtual bool getParameterCode(unsigned int uParamIdx,TQString &szParamBuffer); }; @@ -137,21 +137,21 @@ public: KviKvsModuleInterface(); ~KviKvsModuleInterface(); protected: - KviPointerHashTable * m_pModuleSimpleCommandExecRoutineDict; - KviPointerHashTable * m_pModuleFunctionExecRoutineDict; - KviPointerHashTable * m_pModuleCallbackCommandExecRoutineDict; + KviPointerHashTable * m_pModuleSimpleCommandExecRoutineDict; + KviPointerHashTable * m_pModuleFunctionExecRoutineDict; + KviPointerHashTable * m_pModuleCallbackCommandExecRoutineDict; public: - void kvsRegisterSimpleCommand(const QString &szCommand,KviKvsModuleSimpleCommandExecRoutine r); - void kvsRegisterCallbackCommand(const QString &szCommand,KviKvsModuleCallbackCommandExecRoutine r); - void kvsRegisterFunction(const QString &szFunction,KviKvsModuleFunctionExecRoutine r); + void kvsRegisterSimpleCommand(const TQString &szCommand,KviKvsModuleSimpleCommandExecRoutine r); + void kvsRegisterCallbackCommand(const TQString &szCommand,KviKvsModuleCallbackCommandExecRoutine r); + void kvsRegisterFunction(const TQString &szFunction,KviKvsModuleFunctionExecRoutine r); bool kvsRegisterAppEventHandler(unsigned int iEventIdx,KviKvsModuleEventHandlerRoutine r); bool kvsRegisterRawEventHandler(unsigned int iRawIdx,KviKvsModuleEventHandlerRoutine r); - void kvsUnregisterSimpleCommand(const QString &szCommand) + void kvsUnregisterSimpleCommand(const TQString &szCommand) { m_pModuleSimpleCommandExecRoutineDict->remove(szCommand); }; - void kvsUnregisterCallbackCommand(const QString &szCommand) + void kvsUnregisterCallbackCommand(const TQString &szCommand) { m_pModuleCallbackCommandExecRoutineDict->remove(szCommand); }; - void kvsUnregisterFunction(const QString &szFunction) + void kvsUnregisterFunction(const TQString &szFunction) { m_pModuleFunctionExecRoutineDict->remove(szFunction); }; void kvsUnregisterAppEventHandler(unsigned int iEventIdx); void kvsUnregisterRawEventHandler(unsigned int iRawIdx); @@ -166,15 +166,15 @@ public: void kvsUnregisterAllRawEventHandlers(); void kvsUnregisterAllEventHandlers(); - KviKvsModuleSimpleCommandExecRoutine * kvsFindSimpleCommand(const QString &szCommand) - { return m_pModuleSimpleCommandExecRoutineDict->find(szCommand); }; - KviKvsModuleCallbackCommandExecRoutine * kvsFindCallbackCommand(const QString &szCommand) - { return m_pModuleCallbackCommandExecRoutineDict->find(szCommand); }; - KviKvsModuleFunctionExecRoutine * kvsFindFunction(const QString &szFunction) - { return m_pModuleFunctionExecRoutineDict->find(szFunction); }; + KviKvsModuleSimpleCommandExecRoutine * kvsFindSimpleCommand(const TQString &szCommand) + { return m_pModuleSimpleCommandExecRoutineDict->tqfind(szCommand); }; + KviKvsModuleCallbackCommandExecRoutine * kvsFindCallbackCommand(const TQString &szCommand) + { return m_pModuleCallbackCommandExecRoutineDict->tqfind(szCommand); }; + KviKvsModuleFunctionExecRoutine * kvsFindFunction(const TQString &szFunction) + { return m_pModuleFunctionExecRoutineDict->tqfind(szFunction); }; - void completeCommand(const QString &cmd,KviPointerList * matches); - void completeFunction(const QString &cmd,KviPointerList * matches); + void completeCommand(const TQString &cmd,KviPointerList * matches); + void completeFunction(const TQString &cmd,KviPointerList * matches); protected: void registerDefaultCommands(); }; @@ -219,7 +219,7 @@ protected: KVS_PARAMETERS_END \ if(!KviKvsParameterProcessor::process(pCall->params(),pCall->context(),parameter_format_list))return false; -#define KVSM_REQUIRE_CONNECTION(pCall) \ +#define KVSM_RETQUIRE_CONNECTION(pCall) \ if(!pCall->window()->context())return c->context()->errorNoIrcContext(); \ if(!pCall->window()->connection())return c->context()->warningNoIrcConnection(); diff --git a/src/kvirc/kvs/kvi_kvs_object.cpp b/src/kvirc/kvs/kvi_kvs_object.cpp index 0447cfd9..6d51de2f 100644 --- a/src/kvirc/kvs/kvi_kvs_object.cpp +++ b/src/kvirc/kvs/kvi_kvs_object.cpp @@ -43,10 +43,10 @@ #include "kvi_kvs_object_functioncall.h" #include "kvi_kvs_object_functionhandlerimpl.h" -#include -#include +#include +#include #include -#include +#include @@ -69,11 +69,11 @@ [big]Basic concepts[/big] Objects are arranged in tree structures. - Each object that you create is either toplevel object or a children - of another object. A toplevel object is a parentless one. - Obviously all objects can have children objects.[br][br] + Each object that you create is either toplevel object or a tqchildren + of another object. A toplevel object is a tqparentless one. + Obviously all objects can have tqchildren objects.[br][br] - When an object is destroyed , all its children are also destroyed. + When an object is destroyed , all its tqchildren are also destroyed. The toplevel objects are automatically destroyed when KVIrc quits. The objects are global to the entire application (this is different from previous KVIrc releases where the objects were local @@ -85,7 +85,7 @@ by the programmer; the name is just a mnemonic expedient, and you may also not need it.[br][br] - Each object is identified by an [b]OPAQUE UNIQUE ID[/b]. + Each object is identified by an [b]OPAQUE UNITQUE ID[/b]. The ID is assigned by KVIrc and can be held in any variable. You can think the object id as a "handle for the object" or the object's pointer. Any action performed on the object will require its ID.[br][br] @@ -95,7 +95,7 @@ To create an object you must use the [fnc]$new[/fnc]() function. [fnc]$new[/fnc]() requires three parameters:[br] - The object class (more about object classes later in this document)[br] - - The ID of the parent object , (that can be 0 for toplevel objects).[br] + - The ID of the tqparent object , (that can be 0 for toplevel objects).[br] - The object name (eventually empty)[br] [example] %myobject = [fnc]$new[/fnc]([class]object[/class],0,theName) @@ -113,7 +113,7 @@ [example] [cmd]if[/cmd](%myobject == %anotherobject)[cmd]echo[/cmd] "This is the same object!"; [/example] - The parent object id is optional, if not specified it is assumed to be 0. + The tqparent object id is optional, if not specified it is assumed to be 0. The object name is optional , but it may help you later in finding the object.[br][br] To destroy an object use the [cmd]delete[/cmd] command. (In previous versions @@ -121,7 +121,7 @@ [example] [cmd]delete[/cmd] %myobject [/example] - If the destroyed object has children objects , these are destroyed too.[br][br] + If the destroyed object has tqchildren objects , these are destroyed too.[br][br] [big]Fields : objects as pseudo-structures[/big] @@ -196,15 +196,15 @@ [cmd]delete[/cmd] %tmp [/example] Another cool function exported by the [class:object]object[/class] class is the - [classfnc:object]$children[/classfnc]() function. - It returns a comma separated list of children identifiers.[br] + [classfnc:object]$tqchildren[/classfnc]() function. + It returns a comma separated list of tqchildren identifiers.[br] [example] %tmp = [fnc]$new[/fnc]([class]object[/class],0,myobject) %tmpchild = [fnc]$new[/fnc]([class]object[/class],%tmp,child1) %tmpchild = [fnc]$new[/fnc]([class]object[/class],%tmp,child2) %tmpchild = [fnc]$new[/fnc]([class]object[/class],%tmp,child3) - [cmd]echo[/cmd] The object's children list is : %tmp->[classfnc:object]$children[/classfnc]() - # Destroy the object and the children + [cmd]echo[/cmd] The object's tqchildren list is : %tmp->[classfnc:object]$tqchildren[/classfnc]() + # Destroy the object and the tqchildren [cmd]delete[/cmd] %tmp [/example] There are two special functions for each objects: the "constructor" and the "destructor". @@ -230,25 +230,25 @@ [cmd]privateimpl[/cmd](%tmp,destructor) { %count = 0; - [cmd]foreach[/cmd](%t,[fnc]$this[/fnc]->[classfnc:object]$children[/classfnc]()) + [cmd]foreach[/cmd](%t,[fnc]$this[/fnc]->[classfnc:object]$tqchildren[/classfnc]()) { [cmd]echo[/cmd] Children : %t->[classfnc:object]$name[/classfnc]() with class %t->[classfnc:object]$class[/classfnc]() %count++ } - [cmd]echo[/cmd] Just before destroying my %count children. + [cmd]echo[/cmd] Just before destroying my %count tqchildren. } - # Destroy the object and the children + # Destroy the object and the tqchildren [cmd]delete[/cmd] %tmp [/example] In the example above four objects have been created. - A "parent" object named "myobject" , and three children objects. + A "tqparent" object named "myobject" , and three tqchildren objects. The destructor has been reimplemented for each child object, to make it "say" its name (Please note the usage of [fnc]$this[/fnc]). - In the parent destructor the children have been counted and listed.[br] - Then the parent object is destroyed causing to:[br] - - trigger the parent destructor.[br] - - destroy all the children (and conseguently trigger all the "individual" destructors).[br][br] + In the tqparent destructor the tqchildren have been counted and listed.[br] + Then the tqparent object is destroyed causing to:[br] + - trigger the tqparent destructor.[br] + - destroy all the tqchildren (and conseguently trigger all the "individual" destructors).[br][br] Not all the object functions must return a value: If a function does not return a meaningful value , or you just want to ignore it , you can call it in the following way:[br] @@ -339,7 +339,7 @@ The above class is named "helloworld". It inherits the [class]object[/class] class. This means that it acquires all the [class]object[/class] fuunctions: [classfnc:object]$name[/classfnc]() , - [classfnc:object]$class[/class]() , [classfnc:object]$children[/classfnc]()... + [classfnc:object]$class[/class]() , [classfnc:object]$tqchildren[/classfnc]()... Additionally , it has the $sayhello() function, that "echoes Hello world" to the console. Now you can create an instance of this class: [example] @@ -486,7 +486,7 @@ @description: This is the base class for all the builtin KVirc object classes. It exports the functions to retrieve the object name, to iterate - through children objects and to lookup a child object by name or class. + through tqchildren objects and to lookup a child object by name or class. Additionally , this class provides the builtin timer functionality. The [classfnc]$constructor[/classfnc] and [classfnc]$destructor[/classfnc] functions are empty implementations that all the other classes inherit. @@ -499,8 +499,8 @@ The default implementation emits the signal "[classsignal]destroyed[/classsignal]". !fn: $name() Returns the name of this object. - !fn: $parent() - Returns the parent object of this object or 0 if this object has no parent. + !fn: $tqparent() + Returns the tqparent object of this object or 0 if this object has no tqparent. !fn: $timerEvent() Handler for the timer events. The default implementation does nothing. @@ -521,15 +521,15 @@ Returns the first child that matches and . If is an empty string, any class matches, if is an empty string, any name matches. - This function traverses the entire tree of children + This function traverses the entire tree of tqchildren but is NOT recursive. !fn: $childCount() - Returns the number of children objects + Returns the number of tqchildren objects !fn: $emit([,parameters]) Emits the signal passing the optional [parameters]. See the [doc:objects]objects documentation[/doc] for an overview of signals and slots. - !fn: $children() - Returns an array of children object identifiers. + !fn: $tqchildren() + Returns an array of tqchildren object identifiers. !fn: $signalSender() Returns the current signal sender when in a slot connected to a signal. In other contexts this function returns an empty string. @@ -540,11 +540,11 @@ one of this object's slots. This means that in a slot handler it returns the name of the signal that has triggered it. - !fn: $property([,bNowarning:boolean]) + !fn: $property([,bNowarning:boolean]) This is for really advanced scripting.[br] - All KVIrc widgets are based on the Qt library ones.[br] - The Qt library allow to set and read special properties.[br] - You will have to take a look at the Qt documentation for each widget type + All KVIrc widgets are based on the TQt library ones.[br] + The TQt library allow to set and read special properties.[br] + You will have to take a look at the TQt documentation for each widget type to see the available property names.[br] The supported property types are: Rect, Size, Point, Color, String, CString, Int, UInt, Bool and enumeration types.[br] @@ -553,9 +553,9 @@ There are many properties that are available ony through the [classfnc]$property()[classfnc]" call:[br] For example, you can find out if the widget accepts drops by calling [classfnc]$property(acceptDrops)[classfnc].[br] This function will be mainly useful in the [class]wrapper[/class] class. - !fn: $setProperty(,) + !fn: $setProperty(,) Sets a qt property for this widget.[br] - This is for advanced scripting, and can control really many features of the Qt widgets.[br] + This is for advanced scripting, and can control really many features of the TQt widgets.[br] For example, the [class]multilineedit[/class] widgets can be set to the "password" echo mode only by using this function call:[br] [example] @@ -586,8 +586,8 @@ static char * g_hNextObjectHandle = (char *)0; -KviKvsObject::KviKvsObject(KviKvsObjectClass * pClass,KviKvsObject * pParent,const QString &szName) -: QObject(pParent) +KviKvsObject::KviKvsObject(KviKvsObjectClass * pClass,KviKvsObject * pParent,const TQString &szName) +: TQObject(pParent) { if(g_hNextObjectHandle == 0)g_hNextObjectHandle++; // make sure it's never 0 m_hObject = (kvs_hobject_t)g_hNextObjectHandle; @@ -639,7 +639,7 @@ KviKvsObject::~KviKvsObject() // Disconnect all the signals if(m_pSignalDict) { - KviPointerHashTableIterator it(*m_pSignalDict); + KviPointerHashTableIterator it(*m_pSignalDict); while(it.current()) { @@ -660,7 +660,7 @@ KviKvsObject::~KviKvsObject() KviKvsObjectConnectionListIterator cit(*m_pConnectionList); while(cit.current()) { - QString szSig = cit.current()->szSignal; + TQString szSig = cit.current()->szSignal; cit.current()->pSourceObject->disconnectSignal(szSig,cit.current()); //++cit;// NO!... we point to the next now! } @@ -670,7 +670,7 @@ KviKvsObject::~KviKvsObject() for(;;) { if(!m_pSignalDict)break; - KviPointerHashTableEntry * pSignalList = m_pSignalDict->firstEntry(); + KviPointerHashTableEntry * pSignalList = m_pSignalDict->firstEntry(); if(!pSignalList)break; KviKvsObjectConnection * pConnection = pSignalList->data()->first(); if(!pConnection)break; @@ -683,18 +683,18 @@ KviKvsObject::~KviKvsObject() if(!m_pConnectionList)break; KviKvsObjectConnection * pConnection = m_pConnectionList->first(); if(!pConnection)break; - QString szSignalCopy = pConnection->szSignal; // we need this since pConnection is deleted inside disconnectSignal() and pConnection->szSignal dies too (but is referenced after the connection delete) + TQString szSignalCopy = pConnection->szSignal; // we need this since pConnection is deleted inside disconnectSignal() and pConnection->szSignal dies too (but is referenced after the connection delete) pConnection->pSourceObject->disconnectSignal(szSignalCopy,pConnection); } #endif KviKvsKernel::instance()->objectController()->unregisterObject(this); - if(parentObject())parentObject()->unregisterChild(this); + if(tqparentObject())tqparentObject()->unregisterChild(this); if(m_pObject) { - disconnect(m_pObject,SIGNAL(destroyed()),this,SLOT(objectDestroyed())); + disconnect(m_pObject,TQT_SIGNAL(destroyed()),this,TQT_SLOT(objectDestroyed())); if(m_bObjectOwner)delete m_pObject; } @@ -707,14 +707,14 @@ bool KviKvsObject::init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pPara return true; } -QWidget * KviKvsObject::parentScriptWidget() +TQWidget * KviKvsObject::tqparentScriptWidget() { - if(parentObject()) + if(tqparentObject()) { - if(parentObject()->object()) + if(tqparentObject()->object()) { - if(parentObject()->object()->isWidgetType()) - return (QWidget *)(parentObject()->object()); + if(tqparentObject()->object()->isWidgetType()) + return (TQWidget *)(tqparentObject()->object()); } } return 0; @@ -730,19 +730,19 @@ void KviKvsObject::registerChild(KviKvsObject *pChild) m_pChildList->append(pChild); } -// SIGNAL/SLOT stuff +// SIGNAL/TQT_SLOT stuff -bool KviKvsObject::connectSignal(const QString &sigName,KviKvsObject * pTarget,const QString &slotName) +bool KviKvsObject::connectSignal(const TQString &sigName,KviKvsObject * pTarget,const TQString &slotName) { if(!pTarget->lookupFunctionHandler(slotName))return false; // no such slot if(!m_pSignalDict) { - m_pSignalDict = new KviPointerHashTable(7,false); + m_pSignalDict = new KviPointerHashTable(7,false); m_pSignalDict->setAutoDelete(true); } - KviKvsObjectConnectionList * l = m_pSignalDict->find(sigName); + KviKvsObjectConnectionList * l = m_pSignalDict->tqfind(sigName); if(!l) { l = new KviKvsObjectConnectionList; @@ -772,11 +772,11 @@ void KviKvsObject::registerConnection(KviKvsObjectConnection *pConnection) m_pConnectionList->append(pConnection); } -bool KviKvsObject::disconnectSignal(const QString &sigName,KviKvsObject * pTarget,const QString &slotName) +bool KviKvsObject::disconnectSignal(const TQString &sigName,KviKvsObject * pTarget,const TQString &slotName) { if(!m_pSignalDict)return false; //no such signal to disconnect - KviKvsObjectConnectionList * l = m_pSignalDict->find(sigName); + KviKvsObjectConnectionList * l = m_pSignalDict->tqfind(sigName); if(!l)return false; KviKvsObjectConnectionListIterator it(*l); @@ -785,7 +785,7 @@ bool KviKvsObject::disconnectSignal(const QString &sigName,KviKvsObject * pTarge { if(sl->pTargetObject == pTarget) { - if(KviQString::equalCI(sl->szSlot,slotName)) + if(KviTQString::equalCI(sl->szSlot,slotName)) { pTarget->unregisterConnection(sl); l->removeRef(sl); @@ -803,14 +803,14 @@ bool KviKvsObject::disconnectSignal(const QString &sigName,KviKvsObject * pTarge return false; } -bool KviKvsObject::disconnectSignal(const QString &sigName,KviKvsObjectConnection * pConnection) +bool KviKvsObject::disconnectSignal(const TQString &sigName,KviKvsObjectConnection * pConnection) { if(!m_pSignalDict)return false; - KviKvsObjectConnectionList * l = m_pSignalDict->find(sigName); + KviKvsObjectConnectionList * l = m_pSignalDict->tqfind(sigName); //__range_valid(l); if(!l)return false; pConnection->pTargetObject->unregisterConnection(pConnection); - //__range_valid(l->findRef(pConnection) > -1); + //__range_valid(l->tqfindRef(pConnection) > -1); l->removeRef(pConnection); if(l->isEmpty())m_pSignalDict->remove(sigName); if(m_pSignalDict->isEmpty()) @@ -834,11 +834,11 @@ bool KviKvsObject::unregisterConnection(KviKvsObjectConnection * pConnection) return true; } -int KviKvsObject::emitSignal(const QString &sigName,KviKvsObjectFunctionCall * pOuterCall,KviKvsVariantList * pParams) +int KviKvsObject::emitSignal(const TQString &sigName,KviKvsObjectFunctionCall * pOuterCall,KviKvsVariantList * pParams) { if(!m_pSignalDict)return 0; - KviKvsObjectConnectionList * l = m_pSignalDict->find(sigName); + KviKvsObjectConnectionList * l = m_pSignalDict->tqfind(sigName); if(!l)return 0; // no slots registered KviKvsVariant retVal; @@ -863,7 +863,7 @@ int KviKvsObject::emitSignal(const QString &sigName,KviKvsObjectFunctionCall * p pTarget->setSignalSender(m_hObject); pTarget->setSignalName(sigName); - if(!pTarget->callFunction(this,s->szSlot,QString::null,pOuterCall->context(),&retVal,pParams)) + if(!pTarget->callFunction(this,s->szSlot,TQString(),pOuterCall->context(),&retVal,pParams)) { if(KviKvsKernel::instance()->objectController()->lookupObject(hTarget) && it.current()) { @@ -920,7 +920,7 @@ bool KviKvsObject::function_name(KviKvsObjectFunctionCall * c) bool KviKvsObject::function_parent(KviKvsObjectFunctionCall * c) { - KviKvsObject * o = parentObject(); + KviKvsObject * o = tqparentObject(); c->returnValue()->setHObject(o ? o->handle() : (kvs_hobject_t)0); return true; } @@ -955,7 +955,7 @@ bool KviKvsObject::function_destructor(KviKvsObjectFunctionCall * c) return true; } -bool KviKvsObject::function_children(KviKvsObjectFunctionCall * c) +bool KviKvsObject::function_tqchildren(KviKvsObjectFunctionCall * c) { KviKvsArray * a = new KviKvsArray(); int id=0; @@ -969,7 +969,7 @@ bool KviKvsObject::function_children(KviKvsObjectFunctionCall * c) } bool KviKvsObject::function_findChild(KviKvsObjectFunctionCall * c) { - QString szClass,szName; + TQString szClass,szName; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("className",KVS_PT_STRING,KVS_PF_OPTIONAL,szClass) KVSO_PARAMETER("objectName",KVS_PT_STRING,KVS_PF_OPTIONAL,szName) @@ -983,7 +983,7 @@ bool KviKvsObject::function_findChild(KviKvsObjectFunctionCall * c) bool KviKvsObject::function_emit(KviKvsObjectFunctionCall * c) { - QString szSignal; + TQString szSignal; KviKvsVariantList vList; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("signal",KVS_PT_NONEMPTYSTRING,0,szSignal) @@ -1017,7 +1017,7 @@ bool KviKvsObject::function_killTimer(KviKvsObjectFunctionCall * c) bool KviKvsObject::function_killTimers(KviKvsObjectFunctionCall * c) { - // FIXME: QT4 does not seem to have QObject::killTimers() + // FIXME: QT4 does not seem to have TQObject::killTimers() #ifndef COMPILE_USE_QT4 killTimers(); #endif @@ -1038,38 +1038,38 @@ bool KviKvsObject::function_listProperties(KviKvsObjectFunctionCall * c) KviWindow * w = c->context()->window(); if(!bArray) - w->output(KVI_OUT_SYSTEMMESSAGE,__tr2qs("Listing Qt properties for object named \"%Q\" of KVS class %Q"),&m_szName,&(m_pClass->name())); + w->output(KVI_OUT_SYSTEMMESSAGE,__tr2qs("Listing TQt properties for object named \"%Q\" of KVS class %Q"),&m_szName,&(m_pClass->name())); kvs_int_t cnt = 0; if(m_pObject) { - const QMetaObject *o = m_pObject->metaObject(); + const TQMetaObject *o = m_pObject->tqmetaObject(); if(!bArray) - w->output(KVI_OUT_SYSTEMMESSAGE,__tr2qs("Properties for Qt class %s"),o->className()); + w->output(KVI_OUT_SYSTEMMESSAGE,__tr2qs("Properties for TQt class %s"),o->className()); #ifndef COMPILE_USE_QT4 while(o) { #endif kvs_int_t idx = 0; #ifdef COMPILE_USE_QT4 - QMetaProperty prop = o->property(idx); - const QMetaProperty *p = ∝ + TQMetaProperty prop = o->property(idx); + const TQMetaProperty *p = ∝ #else - const QMetaProperty *p = o->property(idx); + const TQMetaProperty *p = o->property(idx); #endif while(p) { - QString szOut; - QString szName = p->name(); + TQString szOut; + TQString szName = p->name(); #ifdef COMPILE_USE_QT4 - QString szType = p->typeName(); + TQString szType = p->typeName(); #else - QString szType = p->type(); + TQString szType = p->type(); #endif if(bArray) - KviQString::sprintf(szOut,"%Q, %Q",&szName,&szType); + KviTQString::sprintf(szOut,"%Q, %Q",&szName,&szType); else { - KviQString::sprintf(szOut,__tr2qs("Property: %c%Q%c, type %Q"),KVI_TEXT_BOLD,&szName,KVI_TEXT_BOLD,&szType); + KviTQString::sprintf(szOut,__tr2qs("Property: %c%Q%c, type %Q"),KVI_TEXT_BOLD,&szName,KVI_TEXT_BOLD,&szType); szOut.prepend(" "); } @@ -1077,8 +1077,8 @@ bool KviKvsObject::function_listProperties(KviKvsObjectFunctionCall * c) { szOut += ", enum("; #ifndef COMPILE_USE_QT4 - // FIXME: Qt 4.x needs QMetaEnum for this loop - QStrList le = p->enumKeys(); + // FIXME: TQt 4.x needs TQMetaEnum for this loop + TQStrList le = p->enumKeys(); int i = 0; for(char *c2 = le.first(); c2; c2 = le.next()) { @@ -1120,7 +1120,7 @@ bool KviKvsObject::function_listProperties(KviKvsObjectFunctionCall * c) cnt++; } #ifndef COMPILE_USE_QT4 - o = o->superClass(); + o = o->tqsuperClass(); } #endif @@ -1137,7 +1137,7 @@ bool KviKvsObject::function_listProperties(KviKvsObjectFunctionCall * c) // rewritten using the new KVS features :) bool KviKvsObject::function_setProperty(KviKvsObjectFunctionCall * c) { - QString szName; + TQString szName; KviKvsVariant * v; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("propertyName",KVS_PT_NONEMPTYSTRING,0,szName) @@ -1148,26 +1148,26 @@ bool KviKvsObject::function_setProperty(KviKvsObjectFunctionCall * c) if(!m_pObject) { - // there are no Qt properties at all - c->warning(__tr2qs("The object named \"%Q\" of class %Q has no Qt properties"),&m_szName,&(m_pClass->name())); + // there are no TQt properties at all + c->warning(__tr2qs("The object named \"%Q\" of class %Q has no TQt properties"),&m_szName,&(m_pClass->name())); return true; } #ifdef COMPILE_USE_QT4 - int idx = m_pObject->metaObject()->indexOfProperty(szName); + int idx = m_pObject->tqmetaObject()->indexOfProperty(szName); #else - int idx = m_pObject->metaObject()->findProperty(szName,true); + int idx = m_pObject->tqmetaObject()->tqfindProperty(szName,true); #endif if(idx < 0) { - c->warning(__tr2qs("No Qt property named \"%Q\" for object named \"%Q\" of class %Q"),&szName,&m_szName,&(m_pClass->name())); + c->warning(__tr2qs("No TQt property named \"%Q\" for object named \"%Q\" of class %Q"),&szName,&m_szName,&(m_pClass->name())); return true; } #ifdef COMPILE_USE_QT4 - QMetaProperty prop = m_pObject->metaObject()->property(idx); - const QMetaProperty * p = ∝ + TQMetaProperty prop = m_pObject->tqmetaObject()->property(idx); + const TQMetaProperty * p = ∝ #else - const QMetaProperty * p = m_pObject->metaObject()->property(idx,true); + const TQMetaProperty * p = m_pObject->tqmetaObject()->property(idx,true); #endif if(!p) { @@ -1175,7 +1175,7 @@ bool KviKvsObject::function_setProperty(KviKvsObjectFunctionCall * c) return true; } - QVariant vv = m_pObject->property(szName); + TQVariant vv = m_pObject->property(szName); if(!vv.isValid()) { c->warning(__tr2qs("Can't find property named \"%Q\" for object named \"%Q\" of class %Q: the property is indexed and defined but the returned variant is not valid"),&szName,&m_szName,&(m_pClass->name())); @@ -1184,14 +1184,14 @@ bool KviKvsObject::function_setProperty(KviKvsObjectFunctionCall * c) if(p->isEnumType()) { - QString szKey; + TQString szKey; v->asString(szKey); #ifdef COMPILE_USE_QT4 int val = p->enumerator().keyToValue(szKey); #else int val = p->keyToValue(szKey); #endif - QVariant var(val); + TQVariant var(val); m_pObject->setProperty(szName,var); return true; } @@ -1204,39 +1204,39 @@ bool KviKvsObject::function_setProperty(KviKvsObjectFunctionCall * c) switch(vv.type()) { - case QVariant::Int: + case TQVariant::Int: { kvs_int_t i; if(!v->asInteger(i))WRONG_TYPE("integer") - m_pObject->setProperty(szName,QVariant((int)i)); + m_pObject->setProperty(szName,TQVariant((int)i)); } break; - case QVariant::UInt: + case TQVariant::UInt: { kvs_int_t i; if(!v->asInteger(i))WRONG_TYPE("unsigned integer") if(i < 0)WRONG_TYPE("unsigned integer") - m_pObject->setProperty(szName,QVariant((unsigned int)i)); + m_pObject->setProperty(szName,TQVariant((unsigned int)i)); } break; - case QVariant::Bool: - m_pObject->setProperty(szName,QVariant(v->asBoolean())); + case TQVariant::Bool: + m_pObject->setProperty(szName,TQVariant(v->asBoolean())); break; - case QVariant::String: + case TQVariant::String: { - QString s; + TQString s; v->asString(s); - m_pObject->setProperty(szName,QVariant(s)); + m_pObject->setProperty(szName,TQVariant(s)); } break; - case QVariant::CString: + case TQVariant::CString: { - QString s; + TQString s; v->asString(s); - m_pObject->setProperty(szName,QVariant(s.utf8())); + m_pObject->setProperty(szName,TQVariant(s.utf8())); } break; - case QVariant::Point: + case TQVariant::Point: { if(!v->isArray())WRONG_TYPE("array(integer,integer)") KviKvsArray * a = v->array(); @@ -1245,10 +1245,10 @@ bool KviKvsObject::function_setProperty(KviKvsObjectFunctionCall * c) if(!x || !y)WRONG_TYPE("array(integer,integer)") kvs_int_t iX,iY; if(!x->asInteger(iX) || !y->asInteger(iY))WRONG_TYPE("array(integer,integer)") - m_pObject->setProperty(szName,QVariant(QPoint(iX,iY))); + m_pObject->setProperty(szName,TQVariant(TQPoint(iX,iY))); } break; - case QVariant::Size: + case TQVariant::Size: { if(!v->isArray())WRONG_TYPE("array(integer,integer)") KviKvsArray * a = v->array(); @@ -1257,10 +1257,10 @@ bool KviKvsObject::function_setProperty(KviKvsObjectFunctionCall * c) if(!w || !h)WRONG_TYPE("array(integer,integer)") kvs_int_t iW,iH; if(!w->asInteger(iW) || !h->asInteger(iH))WRONG_TYPE("array(integer,integer)") - m_pObject->setProperty(szName,QVariant(QSize(iW,iH))); + m_pObject->setProperty(szName,TQVariant(TQSize(iW,iH))); } break; - case QVariant::Rect: + case TQVariant::Rect: { if(!v->isArray())WRONG_TYPE("array(integer,integer,integer,integer)") KviKvsArray * a = v->array(); @@ -1271,12 +1271,12 @@ bool KviKvsObject::function_setProperty(KviKvsObjectFunctionCall * c) if(!x || !y || !w || !h)WRONG_TYPE("array(integer,integer,integer,integer)") kvs_int_t iX,iY,iW,iH; if(!x->asInteger(iX) || !y->asInteger(iY) || !w->asInteger(iW) || !h->asInteger(iH))WRONG_TYPE("array(integer,integer,integer,integer)") - m_pObject->setProperty(szName,QVariant(QRect(iX,iY,iW,iH))); + m_pObject->setProperty(szName,TQVariant(TQRect(iX,iY,iW,iH))); } break; #ifndef COMPILE_USE_QT4 // FIXME: QT4 ???? - case QVariant::Color: + case TQVariant::Color: { if(!v->isArray())WRONG_TYPE("array(integer,integer,integer)") KviKvsArray * a = v->array(); @@ -1286,10 +1286,10 @@ bool KviKvsObject::function_setProperty(KviKvsObjectFunctionCall * c) if(!r || !g || !b)WRONG_TYPE("array(integer,integer,integer)") kvs_int_t iR,iG,iB; if(!r->asInteger(iR) || !g->asInteger(iG) || !b->asInteger(iB))WRONG_TYPE("array(integer,integer,integer)") - m_pObject->setProperty(szName,QVariant(QColor(iR,iG,iB))); + m_pObject->setProperty(szName,TQVariant(TQColor(iR,iG,iB))); } break; - case QVariant::Font: + case TQVariant::Font: { if(!v->isArray())WRONG_TYPE("array(string,integer,string)") KviKvsArray * a = v->array(); @@ -1299,55 +1299,55 @@ bool KviKvsObject::function_setProperty(KviKvsObjectFunctionCall * c) if(!ff || !ps)WRONG_TYPE("array(string,integer,string)") kvs_int_t iPs; if(!ps->asInteger(iPs))WRONG_TYPE("array(string,integer,string)") - QString szFf,szFl; + TQString szFf,szFl; ff->asString(szFf); if(fl)fl->asString(szFl); - QFont fnt; + TQFont fnt; fnt.setFamily(szFf); fnt.setPointSize(iPs); - if(szFl.find('b') != -1)fnt.setBold(true); - if(szFl.find('i') != -1)fnt.setItalic(true); - if(szFl.find('u') != -1)fnt.setUnderline(true); - if(szFl.find('o') != -1)fnt.setOverline(true); - if(szFl.find('f') != -1)fnt.setFixedPitch(true); - if(szFl.find('s') != -1)fnt.setStrikeOut(true); - m_pObject->setProperty(szName,QVariant(fnt)); + if(szFl.tqfind('b') != -1)fnt.setBold(true); + if(szFl.tqfind('i') != -1)fnt.setItalic(true); + if(szFl.tqfind('u') != -1)fnt.setUnderline(true); + if(szFl.tqfind('o') != -1)fnt.setOverline(true); + if(szFl.tqfind('f') != -1)fnt.setFixedPitch(true); + if(szFl.tqfind('s') != -1)fnt.setStrikeOut(true); + m_pObject->setProperty(szName,TQVariant(fnt)); } break; - case QVariant::Pixmap: - case QVariant::IconSet: + case TQVariant::Pixmap: + case TQVariant::IconSet: { if(v->isHObject()) { if(v->hobject() == (kvs_hobject_t)0) { // null pixmap - if(vv.type() == QVariant::Pixmap) - m_pObject->setProperty(szName,QVariant(QPixmap())); + if(vv.type() == TQVariant::Pixmap) + m_pObject->setProperty(szName,TQVariant(TQPixmap())); else - m_pObject->setProperty(szName,QVariant(QIconSet())); + m_pObject->setProperty(szName,TQVariant(TQIconSet())); } else { KviKvsObject * pix = KviKvsKernel::instance()->objectController()->lookupObject(v->hobject()); if(!pix->inherits("KviScriptPixmapObject")) c->warning(__tr2qs("A pixmap object, an image_id or an image file path is required for this property")); else { - QVariant pixv = pix->property("pixmap"); - if(vv.type() == QVariant::Pixmap) + TQVariant pixv = pix->property("pixmap"); + if(vv.type() == TQVariant::Pixmap) m_pObject->setProperty(szName,pixv); else - m_pObject->setProperty(szName,QVariant(QIconSet(pixv.toPixmap()))); + m_pObject->setProperty(szName,TQVariant(TQIconSet(pixv.toPixmap()))); } } } else { - QString szStr; + TQString szStr; v->asString(szStr); - QPixmap * pPix = g_pIconManager->getImage(szStr); + TQPixmap * pPix = g_pIconManager->getImage(szStr); if(pPix) { - if(vv.type() == QVariant::Pixmap) - m_pObject->setProperty(szName,QVariant(*pPix)); + if(vv.type() == TQVariant::Pixmap) + m_pObject->setProperty(szName,TQVariant(*pPix)); else - m_pObject->setProperty(szName,QVariant(QIconSet(*pPix))); + m_pObject->setProperty(szName,TQVariant(TQIconSet(*pPix))); } else c->warning(__tr2qs("Can't find the requested image")); @@ -1365,7 +1365,7 @@ bool KviKvsObject::function_setProperty(KviKvsObjectFunctionCall * c) bool KviKvsObject::function_property(KviKvsObjectFunctionCall * c) { - QString szName; + TQString szName; bool bNoerror; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("propertyName",KVS_PT_NONEMPTYSTRING,0,szName) @@ -1374,36 +1374,36 @@ bool KviKvsObject::function_property(KviKvsObjectFunctionCall * c) if(!m_pObject) { - // there are no Qt properties at all - if (bNoerror) c->returnValue()->setString("No Qt properties"); + // there are no TQt properties at all + if (bNoerror) c->returnValue()->setString("No TQt properties"); else { - c->warning(__tr2qs("The object named \"%Q\" of class %Q has no Qt properties"),&m_szName,&(m_pClass->name())); + c->warning(__tr2qs("The object named \"%Q\" of class %Q has no TQt properties"),&m_szName,&(m_pClass->name())); c->returnValue()->setNothing(); } return true; } #ifdef COMPILE_USE_QT4 - int idx = m_pObject->metaObject()->indexOfProperty(szName); + int idx = m_pObject->tqmetaObject()->indexOfProperty(szName); #else - int idx = m_pObject->metaObject()->findProperty(szName,true); + int idx = m_pObject->tqmetaObject()->tqfindProperty(szName,true); #endif if(idx < 0) { - if (bNoerror) c->returnValue()->setString("No Qt properties"); + if (bNoerror) c->returnValue()->setString("No TQt properties"); else { - c->warning(__tr2qs("No Qt property named \"%Q\" for object named \"%Q\" of class %Q"),&szName,&m_szName,&(m_pClass->name())); + c->warning(__tr2qs("No TQt property named \"%Q\" for object named \"%Q\" of class %Q"),&szName,&m_szName,&(m_pClass->name())); c->returnValue()->setNothing(); } return true; } #ifdef COMPILE_USE_QT4 - QMetaProperty prop = m_pObject->metaObject()->property(idx); - const QMetaProperty * p = ∝ + TQMetaProperty prop = m_pObject->tqmetaObject()->property(idx); + const TQMetaProperty * p = ∝ #else - const QMetaProperty * p = m_pObject->metaObject()->property(idx,true); + const TQMetaProperty * p = m_pObject->tqmetaObject()->property(idx,true); #endif if(!p) { @@ -1412,7 +1412,7 @@ bool KviKvsObject::function_property(KviKvsObjectFunctionCall * c) return true; } - QVariant v = m_pObject->property(szName); + TQVariant v = m_pObject->property(szName); if(!v.isValid()) { c->warning(__tr2qs("Can't find property named \"%Q\" for object named \"%Q\" of class %Q: the property is indexed and defined but the returned variant is not valid"),&szName,&m_szName,&(m_pClass->name())); @@ -1432,42 +1432,42 @@ bool KviKvsObject::function_property(KviKvsObjectFunctionCall * c) switch(v.type()) { - case QVariant::Int: + case TQVariant::Int: c->returnValue()->setInteger((kvs_int_t)v.toInt()); break; - case QVariant::UInt: + case TQVariant::UInt: c->returnValue()->setInteger((kvs_int_t)v.toUInt()); break; - case QVariant::Bool: + case TQVariant::Bool: c->returnValue()->setBoolean(v.toBool()); break; - case QVariant::String: + case TQVariant::String: c->returnValue()->setString(v.toString()); break; - case QVariant::CString: - c->returnValue()->setString(QString::fromUtf8(v.toCString().data())); + case TQVariant::CString: + c->returnValue()->setString(TQString::fromUtf8(v.toCString().data())); break; - case QVariant::Point: + case TQVariant::Point: { - QPoint p = v.toPoint(); + TQPoint p = v.toPoint(); KviKvsArray * a = new KviKvsArray(); a->set(0,new KviKvsVariant((kvs_int_t)p.x())); a->set(1,new KviKvsVariant((kvs_int_t)p.y())); c->returnValue()->setArray(a); } break; - case QVariant::Size: + case TQVariant::Size: { - QSize p = v.toSize(); + TQSize p = v.toSize(); KviKvsArray * a = new KviKvsArray(); a->set(0,new KviKvsVariant((kvs_int_t)p.width())); a->set(1,new KviKvsVariant((kvs_int_t)p.height())); c->returnValue()->setArray(a); } break; - case QVariant::Rect: + case TQVariant::Rect: { - QRect p = v.toRect(); + TQRect p = v.toRect(); KviKvsArray * a = new KviKvsArray(); a->set(0,new KviKvsVariant((kvs_int_t)p.x())); a->set(1,new KviKvsVariant((kvs_int_t)p.y())); @@ -1478,9 +1478,9 @@ bool KviKvsObject::function_property(KviKvsObjectFunctionCall * c) break; #ifndef COMPILE_USE_QT4 // FIXME: QT4 ? - case QVariant::Color: + case TQVariant::Color: { - QColor clr = v.toColor(); + TQColor clr = v.toColor(); KviKvsArray * a = new KviKvsArray(); a->set(0,new KviKvsVariant((kvs_int_t)clr.red())); a->set(1,new KviKvsVariant((kvs_int_t)clr.green())); @@ -1488,13 +1488,13 @@ bool KviKvsObject::function_property(KviKvsObjectFunctionCall * c) c->returnValue()->setArray(a); } break; - case QVariant::Font: + case TQVariant::Font: { - QFont f = v.toFont(); + TQFont f = v.toFont(); KviKvsArray * a = new KviKvsArray(); a->set(0,new KviKvsVariant(f.family())); a->set(1,new KviKvsVariant((kvs_int_t)f.pointSize())); - QString szFlags; + TQString szFlags; if(f.bold())szFlags += "b"; if(f.underline())szFlags += "u"; if(f.overline())szFlags += "o"; @@ -1543,7 +1543,7 @@ bool KviKvsObject::inheritsClass(KviKvsObjectClass * pClass) return false; } -KviKvsObjectClass * KviKvsObject::getClass(const QString & classOverride) +KviKvsObjectClass * KviKvsObject::getClass(const TQString & classOverride) { if(classOverride.isEmpty())return m_pClass; KviKvsObjectClass * cl = m_pClass; // class override can be also THIS class @@ -1551,20 +1551,20 @@ KviKvsObjectClass * KviKvsObject::getClass(const QString & classOverride) // is the class member function (not the local override) while(cl) { - if(KviQString::equalCI(cl->name(),classOverride))break; + if(KviTQString::equalCI(cl->name(),classOverride))break; else cl = cl->m_pParentClass; } return cl; } -KviKvsObjectFunctionHandler * KviKvsObject::lookupFunctionHandler(const QString & funcName,const QString & classOverride) +KviKvsObjectFunctionHandler * KviKvsObject::lookupFunctionHandler(const TQString & funcName,const TQString & classOverride) { KviKvsObjectFunctionHandler * h = 0; if(classOverride.isEmpty() && m_pFunctionHandlers) { // lookup the local overrides - h = m_pFunctionHandlers->find(funcName); + h = m_pFunctionHandlers->tqfind(funcName); } if(!h) @@ -1582,7 +1582,7 @@ bool KviKvsObject::die() { if(m_bInDelayedDeath)return false; m_bInDelayedDeath = true; - QTimer::singleShot(0,this,SLOT(delayedDie())); + TQTimer::singleShot(0,this,TQT_SLOT(delayedDie())); return true; } @@ -1599,13 +1599,13 @@ void KviKvsObject::delayedDie() delete this; // byez! } -void KviKvsObject::setObject(QObject * o,bool bIsOwned) +void KviKvsObject::setObject(TQObject * o,bool bIsOwned) { //__range_invalid(m_pObject); m_bObjectOwner = bIsOwned; m_pObject = o; o->installEventFilter(this); - connect(m_pObject,SIGNAL(destroyed()),this,SLOT(objectDestroyed())); + connect(m_pObject,TQT_SIGNAL(destroyed()),this,TQT_SLOT(objectDestroyed())); } void KviKvsObject::objectDestroyed() @@ -1614,12 +1614,12 @@ void KviKvsObject::objectDestroyed() die(); } -bool KviKvsObject::eventFilter(QObject *o,QEvent *e) +bool KviKvsObject::eventFilter(TQObject *o,TQEvent *e) { return false; // do not stop } -void KviKvsObject::timerEvent(QTimerEvent *e) +void KviKvsObject::timerEvent(TQTimerEvent *e) { KviKvsVariant * v = new KviKvsVariant(); v->setInteger(e->timerId()); @@ -1628,17 +1628,17 @@ void KviKvsObject::timerEvent(QTimerEvent *e) callFunction(this,"timerEvent",&parms); } -bool KviKvsObject::callFunction(KviKvsObject * pCaller,const QString &fncName,KviKvsVariant * pRetVal,KviKvsVariantList * pParams) +bool KviKvsObject::callFunction(KviKvsObject * pCaller,const TQString &fncName,KviKvsVariant * pRetVal,KviKvsVariantList * pParams) { KviKvsVariant rv; if(!pRetVal)pRetVal = &rv; KviKvsRunTimeContext ctx(0,g_pApp->activeConsole(),KviKvsKernel::instance()->emptyParameterList(),pRetVal,0); if(!pParams)pParams = KviKvsKernel::instance()->emptyParameterList(); - return callFunction(pCaller,fncName,QString::null,&ctx,pRetVal,pParams); + return callFunction(pCaller,fncName,TQString(),&ctx,pRetVal,pParams); } -bool KviKvsObject::callFunction(KviKvsObject * pCaller,const QString &fncName,KviKvsVariantList * pParams) +bool KviKvsObject::callFunction(KviKvsObject * pCaller,const TQString &fncName,KviKvsVariantList * pParams) { KviKvsVariant fakeRetVal; return callFunction(pCaller,fncName,&fakeRetVal,pParams); @@ -1646,8 +1646,8 @@ bool KviKvsObject::callFunction(KviKvsObject * pCaller,const QString &fncName,Kv bool KviKvsObject::callFunction( KviKvsObject * pCaller, - const QString & fncName, - const QString & classOverride, + const TQString & fncName, + const TQString & classOverride, KviKvsRunTimeContext * pContext, KviKvsVariant * pRetVal, KviKvsVariantList * pParams) @@ -1687,7 +1687,7 @@ bool KviKvsObject::callFunction( -void KviKvsObject::registerPrivateImplementation(const QString &szFunctionName,const QString &szCode) +void KviKvsObject::registerPrivateImplementation(const TQString &szFunctionName,const TQString &szCode) { if(szCode.isEmpty()) { @@ -1703,20 +1703,20 @@ void KviKvsObject::registerPrivateImplementation(const QString &szFunctionName,c } else { if(!m_pFunctionHandlers) { - m_pFunctionHandlers = new KviPointerHashTable(7,false); + m_pFunctionHandlers = new KviPointerHashTable(7,false); m_pFunctionHandlers->setAutoDelete(true); } - QString szContext = m_pClass->name(); + TQString szContext = m_pClass->name(); szContext += "[privateimpl]::"; szContext += szFunctionName; - m_pFunctionHandlers->replace(szFunctionName,new KviKvsObjectScriptFunctionHandler(szContext,szCode)); + m_pFunctionHandlers->tqreplace(szFunctionName,new KviKvsObjectScriptFunctionHandler(szContext,szCode)); } } -KviKvsObject * KviKvsObject::findChild(const QString &szClass,const QString &szName) +KviKvsObject * KviKvsObject::findChild(const TQString &szClass,const TQString &szName) { for(KviKvsObject * o = m_pChildList->first();o;o= m_pChildList->next()) { @@ -1725,13 +1725,13 @@ KviKvsObject * KviKvsObject::findChild(const QString &szClass,const QString &szN // any class matches if(szName.isEmpty())return o; // any name matches // name must match - if(KviQString::equalCI(szName,o->name()))return o; + if(KviTQString::equalCI(szName,o->name()))return o; } else { - if(KviQString::equalCI(szClass,o->getClass()->name())) + if(KviTQString::equalCI(szClass,o->getClass()->name())) { if(szName.isEmpty())return o; // any name matches // name must match - if(KviQString::equalCI(szName,o->name()))return o; + if(KviTQString::equalCI(szName,o->name()))return o; } } KviKvsObject * c = o->findChild(szClass,szName); diff --git a/src/kvirc/kvs/kvi_kvs_object.h b/src/kvirc/kvs/kvi_kvs_object.h index 7cd64682..10f2564e 100644 --- a/src/kvirc/kvs/kvi_kvs_object.h +++ b/src/kvirc/kvs/kvi_kvs_object.h @@ -32,7 +32,7 @@ #include "kvi_kvs_object_functionhandler.h" #include "kvi_kvs_types.h" -#include +#include class KviKvsObjectFunctionCall; @@ -41,24 +41,25 @@ typedef struct _KviKvsObjectConnection { KviKvsObject * pSourceObject; // source object (owner of the struct) KviKvsObject * pTargetObject; // target object - QString szSignal; // source signal name - QString szSlot; // target slot function + TQString szSignal; // source signal name + TQString szSlot; // target slot function } KviKvsObjectConnection; typedef KviPointerList KviKvsObjectConnectionList; typedef KviPointerListIterator KviKvsObjectConnectionListIterator; -class KVIRC_API KviKvsObject : public QObject +class KVIRC_API KviKvsObject : public TQObject { friend class KviKvsObjectController; friend class KviKvsObjectClass; Q_OBJECT + TQ_OBJECT public: - KviKvsObject(KviKvsObjectClass * pClass,KviKvsObject * pParent,const QString &szName); + KviKvsObject(KviKvsObjectClass * pClass,KviKvsObject * pParent,const TQString &szName); virtual ~KviKvsObject(); protected: // main data - QString m_szName; // object name + TQString m_szName; // object name kvs_hobject_t m_hObject; // global object handle KviKvsObjectClass * m_pClass; // the class definition @@ -66,18 +67,18 @@ protected: KviPointerList * m_pChildList; - KviPointerHashTable * m_pFunctionHandlers; // our function handlers + KviPointerHashTable * m_pFunctionHandlers; // our function handlers - KviPointerHashTable * m_pSignalDict; // our signals connected to other object functions + KviPointerHashTable * m_pSignalDict; // our signals connected to other object functions KviKvsObjectConnectionList * m_pConnectionList; // signals connected to this object functions // this is valid when processing one of our slots kvs_hobject_t m_hSignalSender; - QString m_szSignalName; + TQString m_szSignalName; // if this object wraps a qt one, it is here - QObject * m_pObject; + TQObject * m_pObject; bool m_bObjectOwner; // do we have to destroy it ? // internal stuff for die() @@ -85,18 +86,18 @@ protected: public: kvs_hobject_t handle(){ return m_hObject; }; - // the wrapped Qt object (may be 0!) - QObject * object() const { return m_pObject; }; - void setObject(QObject * o,bool bIsOwned = true); + // the wrapped TQt object (may be 0!) + TQObject * object() const { return m_pObject; }; + void setObject(TQObject * o,bool bIsOwned = true); - const QString & getName(){ return m_szName; }; + const TQString & getName(){ return m_szName; }; - KviKvsObject * parentObject(){ return (KviKvsObject *)parent(); }; - QWidget * parentScriptWidget(); + KviKvsObject * tqparentObject(){ return (KviKvsObject *)tqparent(); }; + TQWidget * tqparentScriptWidget(); - bool connectSignal(const QString &sigName,KviKvsObject * target,const QString &slotName); - bool disconnectSignal(const QString &sigName,KviKvsObjectConnection * con); - bool disconnectSignal(const QString &sigName,KviKvsObject * target,const QString & slotName); + bool connectSignal(const TQString &sigName,KviKvsObject * target,const TQString &slotName); + bool disconnectSignal(const TQString &sigName,KviKvsObjectConnection * con); + bool disconnectSignal(const TQString &sigName,KviKvsObject * target,const TQString & slotName); // Emits a signal by calling all the attacched slots in an unspecified order. // Returns the number of slots called (may be 0, if no slot is connected) @@ -104,13 +105,13 @@ public: // this is intended to be called from other function calls (the parameters are copied from pOuterCall) // since we should NEVER emit totally spontaneous signals: all of them // should be generated inside object functions (either from scripting or by core calls) - int emitSignal(const QString &sigName,KviKvsObjectFunctionCall * pOuterCall,KviKvsVariantList * pParams = 0); + int emitSignal(const TQString &sigName,KviKvsObjectFunctionCall * pOuterCall,KviKvsVariantList * pParams = 0); void setSignalSender(kvs_hobject_t hObject){ m_hSignalSender = hObject; }; kvs_hobject_t signalSender(){ return m_hSignalSender; }; - void setSignalName(const QString &szSigName){ m_szSignalName = szSigName; }; + void setSignalName(const TQString &szSigName){ m_szSignalName = szSigName; }; - KviPointerHashTable * functionHandlers(){ return m_pFunctionHandlers; }; + KviPointerHashTable * functionHandlers(){ return m_pFunctionHandlers; }; KviKvsHash * dataContainer(){ return m_pDataContainer; }; @@ -118,30 +119,30 @@ public: bool dieNow(); KviKvsObjectClass * getExactClass(){ return m_pClass; }; - KviKvsObjectClass * getClass(const QString & classOverride = QString::null); + KviKvsObjectClass * getClass(const TQString & classOverride = TQString()); bool inheritsClass(KviKvsObjectClass * pClass); - KviKvsObjectFunctionHandler * lookupFunctionHandler(const QString & funcName,const QString & classOverride = QString::null); + KviKvsObjectFunctionHandler * lookupFunctionHandler(const TQString & funcName,const TQString & classOverride = TQString()); // Registers a private implementation of a function // The function may or may not be already registered in the class // If szCode is empty the the private implementation is removed instead - void registerPrivateImplementation(const QString &szFunctionName,const QString &szCode); + void registerPrivateImplementation(const TQString &szFunctionName,const TQString &szCode); // ONLY pCaller can be zero here! // please use one of the wrappers, if possible bool callFunction( KviKvsObject * pCaller, // calling object, can be zero (used for the "internal" access list verification) - const QString & fncName, // name of the function to call - const QString & classOverride, // eventual class override for the functon call, may be QString::null + const TQString & fncName, // name of the function to call + const TQString & classOverride, // eventual class override for the functon call, may be TQString() KviKvsRunTimeContext * pContext, // calling runtime context (you'll have problems with instantiating this... :P ) KviKvsVariant * pRetVal, // the return value KviKvsVariantList * pParams); // the parameters for the call // a nice and simple wrapper: it accepts a parameter list only (eventually 0) - bool callFunction(KviKvsObject * pCaller,const QString &fncName,KviKvsVariantList * pParams = 0); + bool callFunction(KviKvsObject * pCaller,const TQString &fncName,KviKvsVariantList * pParams = 0); // this one gets a non null ret val too - bool callFunction(KviKvsObject * pCaller,const QString &fncName,KviKvsVariant * pRetVal,KviKvsVariantList * pParams = 0); + bool callFunction(KviKvsObject * pCaller,const TQString &fncName,KviKvsVariant * pRetVal,KviKvsVariantList * pParams = 0); - KviKvsObject * findChild(const QString &szClass,const QString &szName); + KviKvsObject * findChild(const TQString &szClass,const TQString &szName); void killAllChildrenWithClass(KviKvsObjectClass *cl); protected: void registerConnection(KviKvsObjectConnection * con); @@ -152,8 +153,8 @@ protected: void registerChild(KviKvsObject * c); void unregisterChild(KviKvsObject *c); - virtual bool eventFilter(QObject *o,QEvent *e); //necessary ? - virtual void timerEvent(QTimerEvent *e); + virtual bool eventFilter(TQObject *o,TQEvent *e); //necessary ? + virtual void timerEvent(TQTimerEvent *e); protected: bool function_name(KviKvsObjectFunctionCall *c); bool function_startTimer(KviKvsObjectFunctionCall *c); @@ -163,7 +164,7 @@ protected: bool function_findChild(KviKvsObjectFunctionCall *c); bool function_childCount(KviKvsObjectFunctionCall *c); bool function_emit(KviKvsObjectFunctionCall *c); - bool function_children(KviKvsObjectFunctionCall *c); + bool function_tqchildren(KviKvsObjectFunctionCall *c); bool function_signalSender(KviKvsObjectFunctionCall *c); bool function_signalName(KviKvsObjectFunctionCall *c); bool function_destructor(KviKvsObjectFunctionCall *c); diff --git a/src/kvirc/kvs/kvi_kvs_object_class.cpp b/src/kvirc/kvs/kvi_kvs_object_class.cpp index 312fcb46..7a01532b 100644 --- a/src/kvirc/kvs/kvi_kvs_object_class.cpp +++ b/src/kvirc/kvs/kvi_kvs_object_class.cpp @@ -39,7 +39,7 @@ KviKvsObjectClass::KviKvsObjectClass( KviKvsObjectClass * pParent, - const QString &szName, + const TQString &szName, KviKvsObjectAllocateInstanceProc pProc, bool bBuiltin) { @@ -49,7 +49,7 @@ KviKvsObjectClass::KviKvsObjectClass( m_szName = szName; m_bBuiltin = bBuiltin; m_bDirty = !bBuiltin; - m_pFunctionHandlers = new KviPointerHashTable(17,false); + m_pFunctionHandlers = new KviPointerHashTable(17,false); m_pFunctionHandlers->setAutoDelete(true); m_pChildClasses = new KviPointerList; m_pChildClasses->setAutoDelete(false); @@ -58,7 +58,7 @@ KviKvsObjectClass::KviKvsObjectClass( // inherit everything from the class above if(pParent) { - KviPointerHashTableIterator it(*(pParent->functionHandlers())); + KviPointerHashTableIterator it(*(pParent->functionHandlers())); while(KviKvsObjectFunctionHandler * fh = it.current()) { m_pFunctionHandlers->insert(it.currentKey(),fh->clone()); @@ -79,7 +79,7 @@ KviKvsObjectClass::~KviKvsObjectClass() // then kill all objects that belong to our class KviKvsKernel::instance()->objectController()->killAllObjectsWithClass(this); // now we're quite clean: should have no object depending on us alive - // unregister from the parent, if any + // unregister from the tqparent, if any if(m_pParentClass)m_pParentClass->unregisterChildClass(this); // unregister from the object controller KviKvsKernel::instance()->objectController()->unregisterClass(this); @@ -89,36 +89,36 @@ KviKvsObjectClass::~KviKvsObjectClass() delete m_pChildClasses; } -void KviKvsObjectClass::registerFunctionHandler(const QString & szFunctionName,KviKvsObjectFunctionHandlerProc pProc,unsigned int uFlags) +void KviKvsObjectClass::registerFunctionHandler(const TQString & szFunctionName,KviKvsObjectFunctionHandlerProc pProc,unsigned int uFlags) { - m_pFunctionHandlers->replace(szFunctionName,new KviKvsObjectCoreCallFunctionHandler(pProc,uFlags)); + m_pFunctionHandlers->tqreplace(szFunctionName,new KviKvsObjectCoreCallFunctionHandler(pProc,uFlags)); } -void KviKvsObjectClass::registerFunctionHandler(const QString & szFunctionName,const QString &szBuffer,unsigned int uFlags) +void KviKvsObjectClass::registerFunctionHandler(const TQString & szFunctionName,const TQString &szBuffer,unsigned int uFlags) { - QString szContext = m_szName; + TQString szContext = m_szName; szContext += "::"; szContext += szFunctionName; - m_pFunctionHandlers->replace(szFunctionName,new KviKvsObjectScriptFunctionHandler(szContext,szBuffer,uFlags)); + m_pFunctionHandlers->tqreplace(szFunctionName,new KviKvsObjectScriptFunctionHandler(szContext,szBuffer,uFlags)); } -void KviKvsObjectClass::registerStandardNothingReturnFunctionHandler(const QString &szFunctionName) +void KviKvsObjectClass::registerStandardNothingReturnFunctionHandler(const TQString &szFunctionName) { - m_pFunctionHandlers->replace(szFunctionName,new KviKvsObjectStandardNothingReturnFunctionHandler()); + m_pFunctionHandlers->tqreplace(szFunctionName,new KviKvsObjectStandardNothingReturnFunctionHandler()); } -void KviKvsObjectClass::registerStandardTrueReturnFunctionHandler(const QString &szFunctionName) +void KviKvsObjectClass::registerStandardTrueReturnFunctionHandler(const TQString &szFunctionName) { - m_pFunctionHandlers->replace(szFunctionName,new KviKvsObjectStandardTrueReturnFunctionHandler()); + m_pFunctionHandlers->tqreplace(szFunctionName,new KviKvsObjectStandardTrueReturnFunctionHandler()); } -void KviKvsObjectClass::registerStandardFalseReturnFunctionHandler(const QString &szFunctionName) +void KviKvsObjectClass::registerStandardFalseReturnFunctionHandler(const TQString &szFunctionName) { - m_pFunctionHandlers->replace(szFunctionName,new KviKvsObjectStandardFalseReturnFunctionHandler()); + m_pFunctionHandlers->tqreplace(szFunctionName,new KviKvsObjectStandardFalseReturnFunctionHandler()); } -KviKvsObject * KviKvsObjectClass::allocateInstance(KviKvsObject * pParent,const QString &szName,KviKvsRunTimeContext * pContext,KviKvsVariantList * pParams) +KviKvsObject * KviKvsObjectClass::allocateInstance(KviKvsObject * pParent,const TQString &szName,KviKvsRunTimeContext * pContext,KviKvsVariantList * pParams) { if(!m_allocProc)return 0; KviKvsObject * pObject = m_allocProc(this,pParent,szName); @@ -141,7 +141,7 @@ KviKvsObject * KviKvsObjectClass::allocateInstance(KviKvsObject * pParent,const v = pParams->next(); } - if(!pObject->callFunction(pObject,"constructor",QString::null,pContext,&ret,©)) + if(!pObject->callFunction(pObject,"constructor",TQString(),pContext,&ret,©)) { // ops...constructor failed (script error!) delete pObject; @@ -179,22 +179,22 @@ void KviKvsObjectClass::unregisterChildClass(KviKvsObjectClass *pClass) m_pChildClasses->removeRef(pClass); } -bool KviKvsObjectClass::save(const QString &szFileName) +bool KviKvsObjectClass::save(const TQString &szFileName) { if(!m_pParentClass)return false; if(isBuiltin())return false; - QString szBuffer; - QString szParentName = m_pParentClass->name(); + TQString szBuffer; + TQString szParentName = m_pParentClass->name(); - KviQString::sprintf(szBuffer, + KviTQString::sprintf(szBuffer, "# Automatically generated KVS class dump\n\n" \ "class(\"%Q\",\"%Q\")\n" \ "{\n", &m_szName,&szParentName); - KviPointerHashTableIterator it(*m_pFunctionHandlers); + KviPointerHashTableIterator it(*m_pFunctionHandlers); while(KviKvsObjectFunctionHandler * h = it.current()) { @@ -206,7 +206,7 @@ bool KviKvsObjectClass::save(const QString &szFileName) szBuffer += "function "; szBuffer += it.currentKey(); szBuffer += "()\n"; - QString szCode = h->scriptHandlerCode(); + TQString szCode = h->scriptHandlerCode(); KviCommandFormatter::blockFromBuffer(szCode); KviCommandFormatter::indent(szCode); szBuffer += szCode; @@ -219,16 +219,16 @@ bool KviKvsObjectClass::save(const QString &szFileName) return KviFileUtils::writeFile(szFileName,szBuffer); } -void KviKvsObjectClass::getFunctionCode(QString &szCode,KviKvsObjectFunctionHandler &h) +void KviKvsObjectClass::getFunctionCode(TQString &szCode,KviKvsObjectFunctionHandler &h) { szCode=h.scriptHandlerCode(); } -bool KviKvsObjectClass::load(const QString &szFileName) +bool KviKvsObjectClass::load(const TQString &szFileName) { - QString szBuffer; + TQString szBuffer; if(!KviFileUtils::readFile(szFileName,szBuffer,0xffffff))return false; return KviKvsScript::run(szBuffer,g_pActiveWindow); } diff --git a/src/kvirc/kvs/kvi_kvs_object_class.h b/src/kvirc/kvs/kvi_kvs_object_class.h index 44b093a1..6b334ddf 100644 --- a/src/kvirc/kvs/kvi_kvs_object_class.h +++ b/src/kvirc/kvs/kvi_kvs_object_class.h @@ -38,8 +38,8 @@ class KviKvsRunTimeContext; class KviKvsVariantList; // Object allocation function -// parameters are: the class, the parent object (eventually 0), the object name (eventually empty) -typedef KviKvsObject * (*KviKvsObjectAllocateInstanceProc)(KviKvsObjectClass *,KviKvsObject *,const QString &); +// parameters are: the class, the tqparent object (eventually 0), the object name (eventually empty) +typedef KviKvsObject * (*KviKvsObjectAllocateInstanceProc)(KviKvsObjectClass *,KviKvsObject *,const TQString &); // An object function callback typedef bool (KviKvsObject::*KviKvsObjectFunctionHandlerProc)(KviKvsObjectFunctionCall * pCall); @@ -53,48 +53,48 @@ class KVIRC_API KviKvsObjectClass friend class KviKvsObjectController; public: KviKvsObjectClass( - KviKvsObjectClass * pParent, // parent class - const QString & szName, // class name + KviKvsObjectClass * pParent, // tqparent class + const TQString & szName, // class name KviKvsObjectAllocateInstanceProc proc, // intance allocation proc bool bBuiltin = true // this is a builtin or script based class ? ); ~KviKvsObjectClass(); protected: - KviKvsObjectClass * m_pParentClass; // the parent (base) class - QString m_szName; // the class name + KviKvsObjectClass * m_pParentClass; // the tqparent (base) class + TQString m_szName; // the class name bool m_bBuiltin; // is this a builtin or script based class ? - KviPointerHashTable * m_pFunctionHandlers; // all our function handlers + KviPointerHashTable * m_pFunctionHandlers; // all our function handlers KviPointerList * m_pChildClasses; // KviKvsObjectAllocateInstanceProc m_allocProc; bool m_bDirty; // not yet flushed to disk (only for not builtin classes) protected: void registerChildClass(KviKvsObjectClass *pClass); void unregisterChildClass(KviKvsObjectClass *pClass); - KviPointerHashTable * functionHandlers(){ return m_pFunctionHandlers; }; + KviPointerHashTable * functionHandlers(){ return m_pFunctionHandlers; }; public: void clearDirtyFlag(){ m_bDirty = false; }; bool isDirty(){ return m_bDirty; }; bool isBuiltin(){ return m_bBuiltin; }; - const QString & name(){ return m_szName; }; - KviKvsObjectClass * parentClass(){ return m_pParentClass; }; + const TQString & name(){ return m_szName; }; + KviKvsObjectClass * tqparentClass(){ return m_pParentClass; }; // pProc CAN'T be zero here! - void registerFunctionHandler(const QString & szFunctionName,KviKvsObjectFunctionHandlerProc pProc,unsigned int uFlags = 0); - void registerFunctionHandler(const QString & szFunctionName,const QString &szBuffer,unsigned int uFlags = 0); + void registerFunctionHandler(const TQString & szFunctionName,KviKvsObjectFunctionHandlerProc pProc,unsigned int uFlags = 0); + void registerFunctionHandler(const TQString & szFunctionName,const TQString &szBuffer,unsigned int uFlags = 0); // registers an empty handler that returns "nothing" - void registerStandardNothingReturnFunctionHandler(const QString & szFunc); + void registerStandardNothingReturnFunctionHandler(const TQString & szFunc); // retisters an empty handler that returns $true - void registerStandardTrueReturnFunctionHandler(const QString & szFunc); + void registerStandardTrueReturnFunctionHandler(const TQString & szFunc); // retisters an empty handler that returns $false - void registerStandardFalseReturnFunctionHandler(const QString & szFunc); + void registerStandardFalseReturnFunctionHandler(const TQString & szFunc); - KviKvsObjectFunctionHandler * lookupFunctionHandler(const QString & szFunc){ return m_pFunctionHandlers->find(szFunc); }; - KviKvsObject * allocateInstance(KviKvsObject * pParent,const QString &szName,KviKvsRunTimeContext * pContext,KviKvsVariantList * pParams); + KviKvsObjectFunctionHandler * lookupFunctionHandler(const TQString & szFunc){ return m_pFunctionHandlers->tqfind(szFunc); }; + KviKvsObject * allocateInstance(KviKvsObject * pParent,const TQString &szName,KviKvsRunTimeContext * pContext,KviKvsVariantList * pParams); - bool save(const QString &szFileName); - static bool load(const QString &szFileName); - void getFunctionCode(QString &szCode,KviKvsObjectFunctionHandler &h); - KviPointerHashTable * getHandlers(){return m_pFunctionHandlers;}; + bool save(const TQString &szFileName); + static bool load(const TQString &szFileName); + void getFunctionCode(TQString &szCode,KviKvsObjectFunctionHandler &h); + KviPointerHashTable * getHandlers(){return m_pFunctionHandlers;}; }; diff --git a/src/kvirc/kvs/kvi_kvs_object_controller.cpp b/src/kvirc/kvs/kvi_kvs_object_controller.cpp index c13b068c..583641ee 100644 --- a/src/kvirc/kvs/kvi_kvs_object_controller.cpp +++ b/src/kvirc/kvs/kvi_kvs_object_controller.cpp @@ -31,7 +31,7 @@ //////////////////////////////////////////////////////////////////////////////////////// -static KviKvsObject * objectClassCreateInstance(KviKvsObjectClass *pClass,KviKvsObject *pParent,const QString &szName) +static KviKvsObject * objectClassCreateInstance(KviKvsObjectClass *pClass,KviKvsObject *pParent,const TQString &szName) { return new KviKvsObject(pClass,pParent,szName); } @@ -44,7 +44,7 @@ KviKvsObjectController::KviKvsObjectController() m_pTopLevelObjectList->setAutoDelete(false); m_pObjectDict = new KviPointerHashTable(101); m_pObjectDict->setAutoDelete(false); - m_pClassDict = new KviPointerHashTable(31,false); + m_pClassDict = new KviPointerHashTable(31,false); m_pClassDict->setAutoDelete(false); } @@ -73,11 +73,11 @@ void KviKvsObjectController::init() m_pObjectClass->registerFunctionHandler("findChild",KVI_PTR2MEMBER(KviKvsObject::function_findChild)); m_pObjectClass->registerFunctionHandler("childCount",KVI_PTR2MEMBER(KviKvsObject::function_childCount)); m_pObjectClass->registerFunctionHandler("emit",KVI_PTR2MEMBER(KviKvsObject::function_emit)); - m_pObjectClass->registerFunctionHandler("children",KVI_PTR2MEMBER(KviKvsObject::function_children)); + m_pObjectClass->registerFunctionHandler("tqchildren",KVI_PTR2MEMBER(KviKvsObject::function_tqchildren)); m_pObjectClass->registerFunctionHandler("signalSender",KVI_PTR2MEMBER(KviKvsObject::function_signalSender)); m_pObjectClass->registerFunctionHandler("signalName",KVI_PTR2MEMBER(KviKvsObject::function_signalName)); m_pObjectClass->registerFunctionHandler("destructor",KVI_PTR2MEMBER(KviKvsObject::function_destructor)); - m_pObjectClass->registerFunctionHandler("parent",KVI_PTR2MEMBER(KviKvsObject::function_parent)); + m_pObjectClass->registerFunctionHandler("tqparent",KVI_PTR2MEMBER(KviKvsObject::function_parent)); m_pObjectClass->registerFunctionHandler("property",KVI_PTR2MEMBER(KviKvsObject::function_property)); m_pObjectClass->registerFunctionHandler("setProperty",KVI_PTR2MEMBER(KviKvsObject::function_setProperty)); m_pObjectClass->registerFunctionHandler("listProperties",KVI_PTR2MEMBER(KviKvsObject::function_listProperties)); @@ -104,7 +104,7 @@ void KviKvsObjectController::killAllObjectsWithClass(KviKvsObjectClass * pClass) void KviKvsObjectController::clearUserClasses() { flushUserClasses(); - KviPointerHashTableIterator it(*m_pClassDict); + KviPointerHashTableIterator it(*m_pClassDict); KviPointerList l; l.setAutoDelete(true); while(it.current()) @@ -145,28 +145,28 @@ void KviKvsObjectController::unregisterClass(KviKvsObjectClass *pClass) void KviKvsObjectController::registerObject(KviKvsObject *pObject) { m_pObjectDict->insert(pObject->handle(),pObject); - if(pObject->parent() == 0)m_pTopLevelObjectList->append(pObject); + if(pObject->tqparent() == 0)m_pTopLevelObjectList->append(pObject); } void KviKvsObjectController::unregisterObject(KviKvsObject *pObject) { m_pObjectDict->remove(pObject->handle()); - if(pObject->parent() == 0)m_pTopLevelObjectList->removeRef(pObject); + if(pObject->tqparent() == 0)m_pTopLevelObjectList->removeRef(pObject); } void KviKvsObjectController::flushUserClasses() { - KviPointerHashTableIterator it(*m_pClassDict); + KviPointerHashTableIterator it(*m_pClassDict); while(KviKvsObjectClass * c = it.current()) { if(!c->isBuiltin()) { if(c->isDirty()) { - QString szPath; - QString szFileName = c->name().lower(); + TQString szPath; + TQString szFileName = c->name().lower(); szFileName += ".kvs"; - szFileName.replace("::","--"); + szFileName.tqreplace("::","--"); g_pApp->getLocalKvircDirectory(szPath,KviApp::Classes,szFileName); if(c->save(szPath)) c->clearDirtyFlag(); @@ -178,9 +178,9 @@ void KviKvsObjectController::flushUserClasses() } } -KviKvsObjectClass * KviKvsObjectController::lookupClass(const QString &szClass,bool bBuiltinOnly) +KviKvsObjectClass * KviKvsObjectController::lookupClass(const TQString &szClass,bool bBuiltinOnly) { - KviKvsObjectClass * pC = m_pClassDict->find(szClass); + KviKvsObjectClass * pC = m_pClassDict->tqfind(szClass); if(!pC) { // maybe we need to load the object library ? @@ -189,21 +189,21 @@ KviKvsObjectClass * KviKvsObjectController::lookupClass(const QString &szClass,b { debug("ops...something wrong with the libkviobjects module!"); return 0; - } else pC = m_pClassDict->find(szClass); + } else pC = m_pClassDict->tqfind(szClass); if(!pC) { if(bBuiltinOnly)return 0; // maybe we need to load it from permanent storage... - QString szPath; - QString szFileName = szClass.lower(); + TQString szPath; + TQString szFileName = szClass.lower(); szFileName += ".kvs"; - szFileName.replace("::","--"); + szFileName.tqreplace("::","--"); g_pApp->getLocalKvircDirectory(szPath,KviApp::Classes,szFileName); if(!KviFileUtils::fileExists(szPath)) g_pApp->getGlobalKvircDirectory(szPath,KviApp::Classes,szFileName); if(!KviFileUtils::fileExists(szPath))return 0; if(!KviKvsObjectClass::load(szPath))return 0; - pC = m_pClassDict->find(szClass); + pC = m_pClassDict->tqfind(szClass); if(pC)pC->clearDirtyFlag(); // just loaded from disk: no need to sync it } } else { @@ -218,10 +218,10 @@ KviKvsObjectClass * KviKvsObjectController::lookupClass(const QString &szClass,b void KviKvsObjectController::deleteClass(KviKvsObjectClass * pClass) { - QString szPath; - QString szFileName = pClass->name().lower(); + TQString szPath; + TQString szFileName = pClass->name().lower(); szFileName += ".kvs"; - szFileName.replace("::","--"); + szFileName.tqreplace("::","--"); g_pApp->getLocalKvircDirectory(szPath,KviApp::Classes,szFileName); KviFileUtils::removeFile(szPath); delete pClass; diff --git a/src/kvirc/kvs/kvi_kvs_object_controller.h b/src/kvirc/kvs/kvi_kvs_object_controller.h index 3df0daad..28b9ae5f 100644 --- a/src/kvirc/kvs/kvi_kvs_object_controller.h +++ b/src/kvirc/kvs/kvi_kvs_object_controller.h @@ -46,7 +46,7 @@ public: protected: KviPointerList * m_pTopLevelObjectList; KviPointerHashTable * m_pObjectDict; - KviPointerHashTable * m_pClassDict; + KviPointerHashTable * m_pClassDict; KviKvsObjectClass * m_pObjectClass; //base class protected: // the classes and the objects register themselves with the controller @@ -61,10 +61,10 @@ public: void clearUserClasses(); void flushUserClasses(); void killAllObjectsWithClass(KviKvsObjectClass * pClass); - KviKvsObjectClass * lookupClass(const QString &szClass,bool bBuiltinOnly = false); - KviKvsObject * lookupObject(kvs_hobject_t hObject){ return m_pObjectDict->find(hObject); }; + KviKvsObjectClass * lookupClass(const TQString &szClass,bool bBuiltinOnly = false); + KviKvsObject * lookupObject(kvs_hobject_t hObject){ return m_pObjectDict->tqfind(hObject); }; KviPointerHashTable * objectDict(){ return m_pObjectDict; }; - KviPointerHashTable * classDict(){ return m_pClassDict; }; + KviPointerHashTable * classDict(){ return m_pClassDict; }; }; #endif //!_KVI_KVS_OBJECT_CONTROLLER_H_ diff --git a/src/kvirc/kvs/kvi_kvs_object_functionhandler.cpp b/src/kvirc/kvs/kvi_kvs_object_functionhandler.cpp index 9dbf541c..28563899 100644 --- a/src/kvirc/kvs/kvi_kvs_object_functionhandler.cpp +++ b/src/kvirc/kvs/kvi_kvs_object_functionhandler.cpp @@ -40,9 +40,9 @@ bool KviKvsObjectFunctionHandler::isScriptHandler() return false; } -QString KviKvsObjectFunctionHandler::scriptHandlerCode() +TQString KviKvsObjectFunctionHandler::scriptHandlerCode() { - return QString::null; + return TQString(); } diff --git a/src/kvirc/kvs/kvi_kvs_object_functionhandler.h b/src/kvirc/kvs/kvi_kvs_object_functionhandler.h index 6b241e28..53f8d587 100644 --- a/src/kvirc/kvs/kvi_kvs_object_functionhandler.h +++ b/src/kvirc/kvs/kvi_kvs_object_functionhandler.h @@ -48,7 +48,7 @@ public: unsigned int flags(){ return m_uFlags; }; protected: virtual bool isScriptHandler(); - virtual QString scriptHandlerCode(); + virtual TQString scriptHandlerCode(); virtual KviKvsObjectFunctionHandler * clone() = 0; virtual bool call(KviKvsObject * pObject,KviKvsObjectFunctionCall * pCall) = 0; }; diff --git a/src/kvirc/kvs/kvi_kvs_object_functionhandlerimpl.cpp b/src/kvirc/kvs/kvi_kvs_object_functionhandlerimpl.cpp index 77c41019..c22bccc3 100644 --- a/src/kvirc/kvs/kvi_kvs_object_functionhandlerimpl.cpp +++ b/src/kvirc/kvs/kvi_kvs_object_functionhandlerimpl.cpp @@ -104,7 +104,7 @@ bool KviKvsObjectCoreCallFunctionHandler::call(KviKvsObject * pObject,KviKvsObje /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -KviKvsObjectScriptFunctionHandler::KviKvsObjectScriptFunctionHandler(const QString &szScriptContext,const QString &szCode,unsigned int uFlags) +KviKvsObjectScriptFunctionHandler::KviKvsObjectScriptFunctionHandler(const TQString &szScriptContext,const TQString &szCode,unsigned int uFlags) : KviKvsObjectFunctionHandler(uFlags) { m_pHandler = new KviKvsScript(szScriptContext,szCode,KviKvsScript::InstructionList); @@ -127,7 +127,7 @@ bool KviKvsObjectScriptFunctionHandler::isScriptHandler() return true; } -QString KviKvsObjectScriptFunctionHandler::scriptHandlerCode() +TQString KviKvsObjectScriptFunctionHandler::scriptHandlerCode() { return m_pHandler->code(); } diff --git a/src/kvirc/kvs/kvi_kvs_object_functionhandlerimpl.h b/src/kvirc/kvs/kvi_kvs_object_functionhandlerimpl.h index 37f506a9..e01a59fe 100644 --- a/src/kvirc/kvs/kvi_kvs_object_functionhandlerimpl.h +++ b/src/kvirc/kvs/kvi_kvs_object_functionhandlerimpl.h @@ -57,7 +57,7 @@ class KVIRC_API KviKvsObjectScriptFunctionHandler : public KviKvsObjectFunctionH friend class KviKvsObject; friend class KviKvsObjectClass; protected: - KviKvsObjectScriptFunctionHandler(const QString &szScriptContext,const QString &szCode,unsigned int uFlags = 0); + KviKvsObjectScriptFunctionHandler(const TQString &szScriptContext,const TQString &szCode,unsigned int uFlags = 0); KviKvsObjectScriptFunctionHandler(const KviKvsObjectScriptFunctionHandler &h); public: virtual ~KviKvsObjectScriptFunctionHandler(); @@ -65,7 +65,7 @@ protected: KviKvsScript * m_pHandler; protected: virtual bool isScriptHandler(); - virtual QString scriptHandlerCode(); + virtual TQString scriptHandlerCode(); virtual KviKvsObjectFunctionHandler * clone(); virtual bool call(KviKvsObject * pObject,KviKvsObjectFunctionCall * pCall); }; diff --git a/src/kvirc/kvs/kvi_kvs_parameterprocessor.cpp b/src/kvirc/kvs/kvi_kvs_parameterprocessor.cpp index fdd0639f..fd625929 100644 --- a/src/kvirc/kvs/kvi_kvs_parameterprocessor.cpp +++ b/src/kvirc/kvs/kvi_kvs_parameterprocessor.cpp @@ -38,7 +38,7 @@ #include "kvi_pointerlist.h" -#include +#include namespace KviKvsParameterProcessor { @@ -49,7 +49,7 @@ namespace KviKvsParameterProcessor { case KVS_PT_STRING: case KVS_PT_NONEMPTYSTRING: - *((QString *)(pFmtArray->pContainer)) = QString::null; + *((TQString *)(pFmtArray->pContainer)) = TQString(); break; case KVS_PT_INT: *((kvs_int_t *)(pFmtArray->pContainer)) = 0; @@ -77,10 +77,10 @@ namespace KviKvsParameterProcessor break; case KVS_PT_CSTRING: case KVS_PT_NONEMPTYCSTRING: - *((KviQCString *)(pFmtArray->pContainer)) = 0; + *((KviTQCString *)(pFmtArray->pContainer)) = 0; break; case KVS_PT_STRINGLIST: - ((QStringList *)(pFmtArray->pContainer))->clear(); + ((TQStringList *)(pFmtArray->pContainer))->clear(); break; case KVS_PT_VARIANTLIST: ((KviKvsVariantList *)(pFmtArray->pContainer))->clear(); @@ -110,28 +110,28 @@ namespace KviKvsParameterProcessor } } - QString szError; - KviQString::sprintf(szError,__tr2qs("Invalid data type for parameter \"%s\""),pFmtArray->szName); + TQString szError; + KviTQString::sprintf(szError,__tr2qs("Invalid data type for parameter \"%s\""),pFmtArray->szName); szError += ": "; if(v->isString()) { - QString tmp = v->string(); + TQString tmp = v->string(); if(tmp.isEmpty()) { - KviQString::appendFormatted(szError,__tr2qs("found empty string where type '%s' was expected"),&tmp,szExpectedType); + KviTQString::appendFormatted(szError,__tr2qs("found empty string where type '%s' was expected"),&tmp,szExpectedType); } else { if(tmp.length() > 15) { tmp.truncate(15); tmp.append("..."); } - KviQString::appendFormatted(szError,__tr2qs("found string value \"%Q\" where type '%s' was expected"),&tmp,szExpectedType); + KviTQString::appendFormatted(szError,__tr2qs("found string value \"%Q\" where type '%s' was expected"),&tmp,szExpectedType); } } else { - QString tmp; + TQString tmp; v->getTypeName(tmp); - KviQString::appendFormatted(szError,__tr2qs("found type %Q where type '%s' was expected"),&tmp,szExpectedType); + KviTQString::appendFormatted(szError,__tr2qs("found type %Q where type '%s' was expected"),&tmp,szExpectedType); } pContext->error(szError); return false; @@ -150,8 +150,8 @@ namespace KviKvsParameterProcessor if(!(pFmtArray->uFlags & KVS_PF_OPTIONAL)) { // bad luck - QString szError; - KviQString::sprintf(szError,__tr2qs("Missing non-optional parameter \"%s\""),pFmtArray->szName); + TQString szError; + KviTQString::sprintf(szError,__tr2qs("Missing non-optional parameter \"%s\""),pFmtArray->szName); pContext->error(szError); return false; } @@ -167,14 +167,14 @@ namespace KviKvsParameterProcessor switch(pFmtArray->uType) { case KVS_PT_STRING: - v->asString(*((QString *)(pFmtArray->pContainer))); + v->asString(*((TQString *)(pFmtArray->pContainer))); if(pFmtArray->uFlags & KVS_PF_APPENDREMAINING) { v = pVariantList->next(); while(v) { - *((QString *)(pFmtArray->pContainer)) += QChar(' '); - v->appendAsString(*((QString *)(pFmtArray->pContainer))); + *((TQString *)(pFmtArray->pContainer)) += TQChar(' '); + v->appendAsString(*((TQString *)(pFmtArray->pContainer))); v = pVariantList->next(); } return true; @@ -182,15 +182,15 @@ namespace KviKvsParameterProcessor break; case KVS_PT_STRINGLIST: { - ((QStringList *)(pFmtArray->pContainer))->clear(); - QString pSz; + ((TQStringList *)(pFmtArray->pContainer))->clear(); + TQString pSz; v->asString(pSz); - ((QStringList *)(pFmtArray->pContainer))->append(pSz); + ((TQStringList *)(pFmtArray->pContainer))->append(pSz); v = pVariantList->next(); while(v) { v->asString(pSz); - ((QStringList *)(pFmtArray->pContainer))->append(pSz); + ((TQStringList *)(pFmtArray->pContainer))->append(pSz); v = pVariantList->next(); } return true; @@ -212,25 +212,25 @@ namespace KviKvsParameterProcessor break; case KVS_PT_NONEMPTYSTRING: { - v->asString(*((QString *)(pFmtArray->pContainer))); + v->asString(*((TQString *)(pFmtArray->pContainer))); bool bDoReturn = false; if(pFmtArray->uFlags & KVS_PF_APPENDREMAINING) { v = pVariantList->next(); while(v) { - *((QString *)(pFmtArray->pContainer)) += QChar(' '); - v->appendAsString(*((QString *)(pFmtArray->pContainer))); + *((TQString *)(pFmtArray->pContainer)) += TQChar(' '); + v->appendAsString(*((TQString *)(pFmtArray->pContainer))); v = pVariantList->next(); } bDoReturn = true; } - if(((QString *)(pFmtArray->pContainer))->isEmpty()) + if(((TQString *)(pFmtArray->pContainer))->isEmpty()) { - QString szError; - KviQString::sprintf(szError,__tr2qs("Invalid data type for parameter \"%s\""),pFmtArray->szName); + TQString szError; + KviTQString::sprintf(szError,__tr2qs("Invalid data type for parameter \"%s\""),pFmtArray->szName); szError += ": "; - KviQString::sprintf(szError,__tr2qs("found empty string while a non empty one was expected")); + KviTQString::sprintf(szError,__tr2qs("found empty string while a non empty one was expected")); pContext->error(szError); return false; } @@ -239,26 +239,26 @@ namespace KviKvsParameterProcessor break; case KVS_PT_CSTRING: { - QString tmp; + TQString tmp; v->asString(tmp); if(pFmtArray->uFlags & KVS_PF_APPENDREMAINING) { v = pVariantList->next(); while(v) { - *((KviQCString *)(pFmtArray->pContainer)) += ' '; + *((KviTQCString *)(pFmtArray->pContainer)) += ' '; v->appendAsString(tmp); v = pVariantList->next(); } - *((KviQCString *)(pFmtArray->pContainer)) = tmp.utf8(); + *((KviTQCString *)(pFmtArray->pContainer)) = tmp.utf8(); return true; } - *((KviQCString *)(pFmtArray->pContainer)) = tmp.utf8(); + *((KviTQCString *)(pFmtArray->pContainer)) = tmp.utf8(); } break; case KVS_PT_NONEMPTYCSTRING: { - QString tmp; + TQString tmp; v->asString(tmp); bool bDoReturn = false; if(pFmtArray->uFlags & KVS_PF_APPENDREMAINING) @@ -266,20 +266,20 @@ namespace KviKvsParameterProcessor v = pVariantList->next(); while(v) { - *((KviQCString *)(pFmtArray->pContainer)) += ' '; + *((KviTQCString *)(pFmtArray->pContainer)) += ' '; v->appendAsString(tmp); v = pVariantList->next(); } - *((KviQCString *)(pFmtArray->pContainer)) = tmp.utf8(); + *((KviTQCString *)(pFmtArray->pContainer)) = tmp.utf8(); bDoReturn = true; } - *((KviQCString *)(pFmtArray->pContainer)) = tmp.utf8(); - if(((KviQCString *)(pFmtArray->pContainer))->isEmpty()) + *((KviTQCString *)(pFmtArray->pContainer)) = tmp.utf8(); + if(((KviTQCString *)(pFmtArray->pContainer))->isEmpty()) { - QString szError; - KviQString::sprintf(szError,__tr2qs("Invalid data type for parameter \"%s\""),pFmtArray->szName); + TQString szError; + KviTQString::sprintf(szError,__tr2qs("Invalid data type for parameter \"%s\""),pFmtArray->szName); szError += ": "; - KviQString::sprintf(szError,__tr2qs("found empty string while a non empty one was expected")); + KviTQString::sprintf(szError,__tr2qs("found empty string while a non empty one was expected")); pContext->error(szError); return false; } @@ -303,10 +303,10 @@ namespace KviKvsParameterProcessor } if(iTmp < 0) { - QString szError; - KviQString::sprintf(szError,__tr2qs("Invalid data type for parameter \"%s\""),pFmtArray->szName); + TQString szError; + KviTQString::sprintf(szError,__tr2qs("Invalid data type for parameter \"%s\""),pFmtArray->szName); szError += ": "; - KviQString::sprintf(szError,__tr2qs("found signed integer \"%d\" where type 'unsigned integer' was expected"),iTmp); + KviTQString::sprintf(szError,__tr2qs("found signed integer \"%d\" where type 'unsigned integer' was expected"),iTmp); pContext->error(szError); return false; } diff --git a/src/kvirc/kvs/kvi_kvs_parameterprocessor.h b/src/kvirc/kvs/kvi_kvs_parameterprocessor.h index 3d8483f9..15b06e5a 100644 --- a/src/kvirc/kvs/kvi_kvs_parameterprocessor.h +++ b/src/kvirc/kvs/kvi_kvs_parameterprocessor.h @@ -27,12 +27,12 @@ #include "kvi_settings.h" -// Data type: QString -// Default: QString::null +// Data type: TQString +// Default: TQString() #define KVS_PT_STRING 0 -// Data type: QString -// Default: QString::null +// Data type: TQString +// Default: TQString() #define KVS_PT_NONEMPTYSTRING 1 // Data type: kvs_int_t @@ -67,15 +67,15 @@ // default: 0 #define KVS_PT_VARIANT 8 -// Data type: QCString +// Data type: TQCString // default null string (0) #define KVS_PT_CSTRING 9 -// Data type: QCString +// Data type: TQCString // default null string (0) #define KVS_PT_NONEMPTYCSTRING 10 -// Data type: QStringList +// Data type: TQStringList // default: list cleared // This eats all the remaining params in the list! #define KVS_PT_STRINGLIST 11 diff --git a/src/kvirc/kvs/kvi_kvs_parser.cpp b/src/kvirc/kvs/kvi_kvs_parser.cpp index 37e462c0..3d439fde 100644 --- a/src/kvirc/kvs/kvi_kvs_parser.cpp +++ b/src/kvirc/kvs/kvi_kvs_parser.cpp @@ -68,7 +68,7 @@ void KviKvsParser::init() { \ KviKvsSpecialCommandParsingRoutine * r = new KviKvsSpecialCommandParsingRoutine; \ r->proc = KVI_PTR2MEMBER(KviKvsParser::__parsingRoutine); \ - pKern->registerSpecialCommandParsingRoutine(QString(__cntrlCmdName),r); \ + pKern->registerSpecialCommandParsingRoutine(TQString(__cntrlCmdName),r); \ } _REG_CNTRL_CMD("if",parseSpecialCommandIf); @@ -87,24 +87,24 @@ void KviKvsParser::init() #undef _REG_CNTRL_CMD } -void KviKvsParser::report(bool bError,const QChar * pLocation,const QString &szMsgFmt,kvi_va_list va) +void KviKvsParser::report(bool bError,const TQChar * pLocation,const TQString &szMsgFmt,kvi_va_list va) { - QString szMsg; - KviQString::vsprintf(szMsg,szMsgFmt,va); + TQString szMsg; + KviTQString::vsprintf(szMsg,szMsgFmt,va); - KviPointerList * pCodeListing = 0; - QString szLocation; + KviPointerList * pCodeListing = 0; + TQString szLocation; if(pLocation) { - pCodeListing = new KviPointerList; + pCodeListing = new KviPointerList; pCodeListing->setAutoDelete(true); int iLine,iCol; KviKvsReport::findLineColAndListing(m_pBuffer,pLocation,iLine,iCol,pCodeListing); - KviQString::sprintf(szLocation,__tr2qs("line %d, near character %d"),iLine,iCol); + KviTQString::sprintf(szLocation,__tr2qs("line %d, near character %d"),iLine,iCol); } else { szLocation = __tr2qs("beginning of input"); } @@ -115,17 +115,17 @@ void KviKvsParser::report(bool bError,const QChar * pLocation,const QString &szM KviKvsReport::report(&rep,m_pWindow); } -void KviKvsParser::errorBadChar(const QChar * pLocation,char cExpected,const char * szCommandName) +void KviKvsParser::errorBadChar(const TQChar * pLocation,char cExpected,const char * szCommandName) { - if(pLocation->unicode()) - error(pLocation,__tr2qs("Found character '%q' (unicode 0x%x) where '%c' was expected: see \"/help %s\" for the command syntax"), - pLocation,pLocation->unicode(),cExpected,szCommandName); + if(pLocation->tqunicode()) + error(pLocation,__tr2qs("Found character '%q' (tqunicode 0x%x) where '%c' was expected: see \"/help %s\" for the command syntax"), + pLocation,pLocation->tqunicode(),cExpected,szCommandName); else error(pLocation,__tr2qs("Found end of input where character '%c' was expected: see \"/help %s\" for the command syntax"), cExpected,szCommandName); } -void KviKvsParser::error(const QChar * pLocation,const QString &szMsgFmt,...) +void KviKvsParser::error(const TQChar * pLocation,const TQString &szMsgFmt,...) { m_bError = true; @@ -135,7 +135,7 @@ void KviKvsParser::error(const QChar * pLocation,const QString &szMsgFmt,...) kvi_va_end(va); } -void KviKvsParser::warning(const QChar * pLocation,const QString &szMsgFmt,...) +void KviKvsParser::warning(const TQChar * pLocation,const TQString &szMsgFmt,...) { kvi_va_list va; kvi_va_start_by_reference(va,szMsgFmt); @@ -143,7 +143,7 @@ void KviKvsParser::warning(const QChar * pLocation,const QString &szMsgFmt,...) kvi_va_end(va); } -KviKvsTreeNodeInstruction * KviKvsParser::parse(const QChar * pBuffer,int iFlags) +KviKvsTreeNodeInstruction * KviKvsParser::parse(const TQChar * pBuffer,int iFlags) { m_iFlags = iFlags; @@ -161,7 +161,7 @@ KviKvsTreeNodeInstruction * KviKvsParser::parse(const QChar * pBuffer,int iFlags return parseInstructionList(); } -KviKvsTreeNodeInstruction * KviKvsParser::parseAsExpression(const QChar * pBuffer,int iFlags) +KviKvsTreeNodeInstruction * KviKvsParser::parseAsExpression(const TQChar * pBuffer,int iFlags) { m_iFlags = iFlags; @@ -182,7 +182,7 @@ KviKvsTreeNodeInstruction * KviKvsParser::parseAsExpression(const QChar * pBuffe return new KviKvsTreeNodeExpressionReturn(pBuffer,expr); } -KviKvsTreeNodeInstruction * KviKvsParser::parseAsParameter(const QChar * pBuffer,int iFlags) +KviKvsTreeNodeInstruction * KviKvsParser::parseAsParameter(const TQChar * pBuffer,int iFlags) { m_iFlags = iFlags; @@ -428,10 +428,10 @@ KviKvsTreeNodeInstruction * KviKvsParser::parseAsParameter(const QChar * pBuffer [/example] The line above is an example of syntax specification. All the commands are described by such syntax lines. [cmd]join[/cmd] is the command and it stands exactly - for the literal string "join" typed in a script. is in angular parenthesis + for the literal string "join" typed in a script. is in angular tqparenthesis and rappresents a mandatory parameter: you must substitute a real channel name in its place otherwise the command will fail and KVIrc will probably complain too. - [password] is still a parameter but the square parentheses indicate that it is + [password] is still a parameter but the square tqparentheses indicate that it is optional: if you specify it, then it will be interpreted as the channel password, if you don't then no password will be used. [note] @@ -701,7 +701,7 @@ KviKvsTreeNodeInstruction * KviKvsParser::parseAsParameter(const QChar * pBuffer The function [fnc]$str.len[/fnc] accepts a single parameter and returns the length in characters of the parameter string. The returned value is always a string: in this case it can be also interpreted as a number.[br] - When passing an empty list you can avoid the parenthesis. + When passing an empty list you can avoid the tqparenthesis. (And you have found the "simple" functions shown above). So the followind two calls are equal:[br] [example] @@ -719,7 +719,7 @@ KviKvsTreeNodeInstruction * KviKvsParser::parseAsParameter(const QChar * pBuffer [/example] If you want to place a literal '(' or ')' in the function parameters you must escape it. - A special case for when you want to use 'matching' parentheses: + A special case for when you want to use 'matching' tqparentheses: an opened '(' corresponds to a closed ')'. In this case you can omit the 'escape' character.[br] [example] @@ -1349,7 +1349,7 @@ KviKvsTreeNodeInstruction * KviKvsParser::parseAsParameter(const QChar * pBuffer so the callback code is empty, but if you continue reading we will soon fill it. [/p] - [big]A typical addon layout[/big] + [big]A typical addon tqlayout[/big] [p] As stated above, the addons are usually shipped in a compressed archive. Once uncompressed, the archive will expand into a small directory tree @@ -1400,7 +1400,7 @@ KviKvsTreeNodeInstruction * KviKvsParser::parseAsParameter(const QChar * pBuffer [/p] [p] The entries in [b]bold[/b] are directories while the other are files. - Please note that this is a general layout for a huge and rather complex + Please note that this is a general tqlayout for a huge and rather complex addon: you might not need all of these directories. Remember: the minimal addon has only an install.kvs file. Anyway, a really cool addon will probably have all of them and maybe some more. @@ -1496,7 +1496,7 @@ KviKvsTreeNodeInstruction * KviKvsParser::parseAsParameter(const QChar * pBuffer [p] It is a good idea to start on the KVIrc web site. There are surely several addons to look at. Pick one that seems simple and analyze its - layout and code (wow... the free software!). It will be easier to do than it was to explain it :D + tqlayout and code (wow... the free software!). It will be easier to do than it was to explain it :D [/p] [p] Have fun! :) @@ -2402,7 +2402,7 @@ KviKvsTreeNodeData * KviKvsParser::parseParameterPercentOrDollar() if(!KVSP_curCharIsLetter && (KVSP_curCharUnicode != ':')) { // be flexible : allow an "alone" '%' char - return new KviKvsTreeNodeConstantData(KVSP_curCharPointer - 1,new KviKvsVariant(QString("%"))); + return new KviKvsTreeNodeConstantData(KVSP_curCharPointer - 1,new KviKvsVariant(TQString("%"))); } // this is surely a variable or function KVSP_backChar; @@ -2412,7 +2412,7 @@ KviKvsTreeNodeData * KviKvsParser::parseParameterPercentOrDollar() if(!KVSP_curCharIsFunctionStart) { // be flexible : allow an "alone" '$' char - return new KviKvsTreeNodeConstantData(KVSP_curCharPointer - 1,new KviKvsVariant(QString("$"))); + return new KviKvsTreeNodeConstantData(KVSP_curCharPointer - 1,new KviKvsVariant(TQString("$"))); } // this is surely a variable or function KVSP_backChar; @@ -2428,7 +2428,7 @@ KviKvsTreeNodeData * KviKvsParser::parsePercentOrDollar(bool bInObjScope) KVSP_ASSERT((KVSP_curCharUnicode == '%') || (KVSP_curCharUnicode == '$') || (KVSP_curCharUnicode == '@')); KviKvsTreeNodeData * r; - const QChar * pBegin; + const TQChar * pBegin; if(KVSP_curCharUnicode == '%') { @@ -2440,8 +2440,8 @@ KviKvsTreeNodeData * KviKvsParser::parsePercentOrDollar(bool bInObjScope) if(!r)return 0; } else { // this is @ - static QString szStrayAtRoutineName("@"); - static QString szMightBeStrayAtOrThisRoutineName("@?"); + static TQString szStrayAtRoutineName("@"); + static TQString szMightBeStrayAtOrThisRoutineName("@?"); pBegin = KVSP_curCharPointer; @@ -2458,7 +2458,7 @@ KviKvsTreeNodeData * KviKvsParser::parsePercentOrDollar(bool bInObjScope) return r; } // we're not in object scope and cur char is either $ or % - // check for the common syntax $0!$1@$2 seen in hostmasks + // check for the common syntax $0!$1@$2 seen in hosttqmasks // @$ is non valid anyway if(KVSP_curCharUnicode == '$') { @@ -2631,7 +2631,7 @@ KviKvsTreeNodeVariable * KviKvsParser::parsePercent(bool bInObjScope) { KVSP_ASSERT(KVSP_curCharUnicode == '%'); - const QChar * pBegin = KVSP_curCharPointer; + const TQChar * pBegin = KVSP_curCharPointer; KVSP_skipChar; @@ -2651,11 +2651,11 @@ KviKvsTreeNodeVariable * KviKvsParser::parsePercent(bool bInObjScope) return 0; } - const QChar * pIdBegin = KVSP_curCharPointer; + const TQChar * pIdBegin = KVSP_curCharPointer; while((KVSP_curCharIsLetterOrNumber) || (KVSP_curCharUnicode == '_') || (KVSP_curCharUnicode == '.'))KVSP_skipChar; - QString szIdentifier(pIdBegin,KVSP_curCharPointer - pIdBegin); + TQString szIdentifier(pIdBegin,KVSP_curCharPointer - pIdBegin); //#warning "ADD A KviKvsTreeNodeBuiltinCleanupVariablesCommand on this KviKvsParser object" //#warning "KviKvsParser will append it to the script" @@ -2675,13 +2675,13 @@ KviKvsTreeNodeVariable * KviKvsParser::parsePercent(bool bInObjScope) if(m_pGlobals) { - if(m_pGlobals->find(szIdentifier))return new KviKvsTreeNodeGlobalVariable(pBegin,szIdentifier); + if(m_pGlobals->tqfind(szIdentifier))return new KviKvsTreeNodeGlobalVariable(pBegin,szIdentifier); } if(m_iFlags & AssumeLocals) return new KviKvsTreeNodeLocalVariable(pBegin,szIdentifier); - if(pIdBegin->category() & QChar::Letter_Uppercase) + if(pIdBegin->category() & TQChar::Letter_Uppercase) { //if(m_iFlags & Pedantic) // warning(pIdBegin,__tr2qs("Declaring global variables with an uppercase letter is deprecated. Global variables should be declared with 'global'")); @@ -2724,7 +2724,7 @@ KviKvsTreeNodeInstruction * KviKvsParser::parseInstruction() return parseCommand(); } else { // what the heck is this ? - error(KVSP_curCharPointer,__tr2qs("Found character '%q' (unicode %x) where an instruction was expected"),KVSP_curCharPointer,KVSP_curCharUnicode); + error(KVSP_curCharPointer,__tr2qs("Found character '%q' (tqunicode %x) where an instruction was expected"),KVSP_curCharPointer,KVSP_curCharUnicode); return 0; } break; @@ -2741,7 +2741,7 @@ KviKvsTreeNodeInstruction * KviKvsParser::parseInstructionBlock() KVSP_skipChar; - const QChar * pBegin = KVSP_curCharPointer; + const TQChar * pBegin = KVSP_curCharPointer; KviKvsTreeNodeInstructionBlock * b = new KviKvsTreeNodeInstructionBlock(pBegin - 1); @@ -2804,7 +2804,7 @@ KviKvsTreeNodeSwitchList * KviKvsParser::parseCommandSwitchList() while(KVSP_curCharUnicode == '-') { - const QChar * pBegin = KVSP_curCharPointer; + const TQChar * pBegin = KVSP_curCharPointer; KVSP_skipChar; bool bLong = false; @@ -2839,7 +2839,7 @@ KviKvsTreeNodeSwitchList * KviKvsParser::parseCommandSwitchList() if(KVSP_curCharUnicode == 0) { - error(KVSP_curCharPointer,__tr2qs("Unexpected character '%q' (unicode %x) after a switch dash"),KVSP_curCharPointer,KVSP_curCharUnicode); + error(KVSP_curCharPointer,__tr2qs("Unexpected character '%q' (tqunicode %x) after a switch dash"),KVSP_curCharPointer,KVSP_curCharUnicode); } else { error(KVSP_curCharPointer,__tr2qs("Unexpected end of script after a switch dash")); } @@ -2847,12 +2847,12 @@ KviKvsTreeNodeSwitchList * KviKvsParser::parseCommandSwitchList() } } - const QChar * pSw = KVSP_curCharPointer; + const TQChar * pSw = KVSP_curCharPointer; KVSP_skipChar; while((KVSP_curCharIsLetterOrNumber) || (KVSP_curCharUnicode == '-'))KVSP_skipChar; - const QChar * pSwEnd = KVSP_curCharPointer; + const TQChar * pSwEnd = KVSP_curCharPointer; skipSpaces(); @@ -2871,21 +2871,21 @@ KviKvsTreeNodeSwitchList * KviKvsParser::parseCommandSwitchList() return 0; } else { // assume empty string - p = new KviKvsTreeNodeConstantData(KVSP_curCharPointer,new KviKvsVariant(QString(""))); + p = new KviKvsTreeNodeConstantData(KVSP_curCharPointer,new KviKvsVariant(TQString(""))); } } skipSpaces(); if(bLong) - sw->addLong(QString(pSw,pSwEnd - pSw),p); + sw->addLong(TQString(pSw,pSwEnd - pSw),p); else - sw->addShort(pSw->lower().unicode(),p); + sw->addShort(pSw->lower().tqunicode(),p); } else { if(bLong) - sw->addLong(QString(pSw,pSwEnd - pSw),new KviKvsTreeNodeConstantData(KVSP_curCharPointer,new KviKvsVariant(true))); // empty param + sw->addLong(TQString(pSw,pSwEnd - pSw),new KviKvsTreeNodeConstantData(KVSP_curCharPointer,new KviKvsVariant(true))); // empty param else - sw->addShort(pSw->lower().unicode(),new KviKvsTreeNodeConstantData(KVSP_curCharPointer,new KviKvsVariant(true))); // empty param + sw->addShort(pSw->lower().tqunicode(),new KviKvsTreeNodeConstantData(KVSP_curCharPointer,new KviKvsVariant(true))); // empty param } } @@ -2932,9 +2932,9 @@ KviKvsTreeNodeDataList * KviKvsParser::parseCommandParameterList() } -KviPointerList * KviKvsParser::parseCommaSeparatedParameterListNoTree() +KviPointerList * KviKvsParser::parseCommaSeparatedParameterListNoTree() { - KviPointerList * l = new KviPointerList; + KviPointerList * l = new KviPointerList; l->setAutoDelete(true); KVSP_skipChar; @@ -2967,7 +2967,7 @@ KviPointerList * KviKvsParser::parseCommaSeparatedParameterListNoTree() default: { // anything else is a parameter - const QChar *pBegin = KVSP_curCharPointer; + const TQChar *pBegin = KVSP_curCharPointer; KviKvsTreeNodeData * p = parseCommaSeparatedParameter(); if(!p) { @@ -2976,7 +2976,7 @@ KviPointerList * KviKvsParser::parseCommaSeparatedParameterListNoTree() return 0; } delete p; - QString * s = new QString(pBegin,KVSP_curCharPointer - pBegin); + TQString * s = new TQString(pBegin,KVSP_curCharPointer - pBegin); s->stripWhiteSpace(); l->append(s); @@ -3066,10 +3066,10 @@ KviKvsTreeNodeDataList * KviKvsParser::parseCommaSeparatedParameterList() #define LITERAL_PARAM_PARSING_FUNCTION_BEGIN(__funcname) \ KviKvsTreeNodeConstantData * KviKvsParser::__funcname() \ { \ - QString szValue; \ + TQString szValue; \ \ - const QChar * pStart = KVSP_curCharPointer; \ - const QChar * pBegin = KVSP_curCharPointer; \ + const TQChar * pStart = KVSP_curCharPointer; \ + const TQChar * pBegin = KVSP_curCharPointer; \ int iLen = 0; \ int iNestedTerminators = 0; \ \ @@ -3095,7 +3095,7 @@ KviKvsTreeNodeConstantData * KviKvsParser::__funcname() \ iNestedTerminators--; \ iLen++; \ } else { \ - if(iLen > 0)szValue.append(QString(pBegin,iLen)); \ + if(iLen > 0)szValue.append(TQString(pBegin,iLen)); \ { \ bool bOk; \ kvs_int_t iVal = szValue.toLong(&bOk); \ @@ -3108,11 +3108,11 @@ KviKvsTreeNodeConstantData * KviKvsParser::__funcname() \ break; #define LITERAL_PARAM_PARSING_FUNCTION_GENERIC_END \ - if(iLen > 0) szValue.append(QString(pBegin,iLen)); \ + if(iLen > 0) szValue.append(TQString(pBegin,iLen)); \ return new KviKvsTreeNodeConstantData(pBegin,new KviKvsVariant(szValue)); \ break; \ case '\\': \ - if(iLen > 0)szValue.append(QString(pBegin,iLen)); \ + if(iLen > 0)szValue.append(TQString(pBegin,iLen)); \ KVSP_skipChar; \ switch(KVSP_curCharUnicode) \ { \ @@ -3129,19 +3129,19 @@ KviKvsTreeNodeConstantData * KviKvsParser::__funcname() \ case 'r': \ KVSP_skipChar; \ pBegin = KVSP_curCharPointer; \ - szValue.append(QChar('\r')); \ + szValue.append(TQChar('\r')); \ iLen = 0; \ break; \ case 'n': \ KVSP_skipChar; \ pBegin = KVSP_curCharPointer; \ - szValue.append(QChar('\n')); \ + szValue.append(TQChar('\n')); \ iLen = 0; \ break; \ case 't': \ KVSP_skipChar; \ pBegin = KVSP_curCharPointer; \ - szValue.append(QChar('\t')); \ + szValue.append(TQChar('\t')); \ iLen = 0; \ break; \ default: \ @@ -3264,7 +3264,7 @@ KviKvsTreeNodeData * KviKvsParser::parseArrayIndex() KviPointerList * l = new KviPointerList(); l->setAutoDelete(true); - const QChar * pBegin = KVSP_curCharPointer; + const TQChar * pBegin = KVSP_curCharPointer; //KVSP_skipChar; @@ -3300,7 +3300,7 @@ KviKvsTreeNodeData * KviKvsParser::parseArrayIndex() error(KVSP_curCharPointer,__tr2qs("Unexpected end of line in array index (missing ']' character or unescaped newline)")); break; default: - error(KVSP_curCharPointer,__tr2qs("Unexpected character '%q' (unicode %x) in array index: it should be already terminated"),KVSP_curCharPointer,KVSP_curCharUnicode); + error(KVSP_curCharPointer,__tr2qs("Unexpected character '%q' (tqunicode %x) in array index: it should be already terminated"),KVSP_curCharPointer,KVSP_curCharUnicode); break; } return 0; @@ -3373,7 +3373,7 @@ KviKvsTreeNodeData * KviKvsParser::parseHashKey() KviPointerList * l = new KviPointerList(); l->setAutoDelete(true); - const QChar * pBegin = KVSP_curCharPointer; + const TQChar * pBegin = KVSP_curCharPointer; //KVSP_skipChar; @@ -3400,7 +3400,7 @@ KviKvsTreeNodeData * KviKvsParser::parseHashKey() if(KVSP_curCharUnicode != '}') { // separate by single spaces - l->append(new KviKvsTreeNodeConstantData(KVSP_curCharPointer,new KviKvsVariant(QString(" ")))); + l->append(new KviKvsTreeNodeConstantData(KVSP_curCharPointer,new KviKvsVariant(TQString(" ")))); } else { goto end_of_the_hash_key; } @@ -3481,7 +3481,7 @@ KviKvsTreeNodeData * KviKvsParser::parseCommaSeparatedParameter() KviPointerList * l = new KviPointerList; l->setAutoDelete(true); - const QChar * pBegin = KVSP_curCharPointer; + const TQChar * pBegin = KVSP_curCharPointer; for(;;) { @@ -3516,7 +3516,7 @@ KviKvsTreeNodeData * KviKvsParser::parseCommaSeparatedParameter() if((KVSP_curCharUnicode != ')') && (KVSP_curCharUnicode != ',')) { // separate by single spaces - l->append(new KviKvsTreeNodeConstantData(KVSP_curCharPointer,new KviKvsVariant(QString(" ")))); + l->append(new KviKvsTreeNodeConstantData(KVSP_curCharPointer,new KviKvsVariant(TQString(" ")))); } else { goto end_of_function_parameter; } @@ -3568,7 +3568,7 @@ KviKvsTreeNodeData * KviKvsParser::parseSingleParameterInParenthesis() KviPointerList * l = new KviPointerList; l->setAutoDelete(true); - const QChar * pBegin = KVSP_curCharPointer; + const TQChar * pBegin = KVSP_curCharPointer; for(;;) { @@ -3606,7 +3606,7 @@ KviKvsTreeNodeData * KviKvsParser::parseSingleParameterInParenthesis() if((KVSP_curCharUnicode != ')') && (KVSP_curCharUnicode != ',')) { // separate by single spaces - l->append(new KviKvsTreeNodeConstantData(KVSP_curCharPointer,new KviKvsVariant(QString(" ")))); + l->append(new KviKvsTreeNodeConstantData(KVSP_curCharPointer,new KviKvsVariant(TQString(" ")))); } else { goto end_of_function_parameter; } @@ -3659,7 +3659,7 @@ KviKvsTreeNodeData * KviKvsParser::parseStringParameter() KviPointerList * l = new KviPointerList(); l->setAutoDelete(true); - const QChar * pBegin = KVSP_curCharPointer; + const TQChar * pBegin = KVSP_curCharPointer; KVSP_skipChar; @@ -3728,7 +3728,7 @@ end_of_the_string: } else { // no parameters at all.. return straight empty string (no need to cast) delete l; - return new KviKvsTreeNodeConstantData(pBegin,new KviKvsVariant(new QString())); + return new KviKvsTreeNodeConstantData(pBegin,new KviKvsVariant(new TQString())); } } // never reached @@ -3742,7 +3742,7 @@ KviKvsTreeNodeData * KviKvsParser::parseCommandParameter(bool bPreferNumeric) bool bGotLiteral = false; - const QChar * pBegin = KVSP_curCharPointer; + const TQChar * pBegin = KVSP_curCharPointer; for(;;) { diff --git a/src/kvirc/kvs/kvi_kvs_parser.h b/src/kvirc/kvs/kvi_kvs_parser.h index be98e960..70e353a0 100644 --- a/src/kvirc/kvs/kvi_kvs_parser.h +++ b/src/kvirc/kvs/kvi_kvs_parser.h @@ -61,14 +61,14 @@ public: KviKvsParser(KviKvsScript * pScript,KviWindow * pOutputWindow); ~KviKvsParser(); private: - const QChar * m_pBuffer; // the local pointer to the beginning of the buffer - const QChar * m_ptr; // the parsing pointer + const TQChar * m_pBuffer; // the local pointer to the beginning of the buffer + const TQChar * m_ptr; // the parsing pointer // parsing state - KviPointerHashTable * m_pGlobals; // the dict of the vars declared with global in this script + KviPointerHashTable * m_pGlobals; // the dict of the vars declared with global in this script int m_iFlags; // the current parsing flags bool m_bError; // error(..) was called ? // this stuff is used only for reporting errors and warnings - KviKvsScript * m_pScript; // parent script + KviKvsScript * m_pScript; // tqparent script KviWindow * m_pWindow; // output window public: // public interface enum Flags { AssumeLocals = 1, Pedantic = 2 }; @@ -77,9 +77,9 @@ public: // public interface // parses the buffer pointed by pBuffer and returns // a syntax tree or 0 in case of failure // if the parsing fails, the error code can be retrieved by calling error() - KviKvsTreeNodeInstruction * parse(const QChar * pBuffer,int iFlags = 0); - KviKvsTreeNodeInstruction * parseAsExpression(const QChar * pBuffer,int iFlags = 0); - KviKvsTreeNodeInstruction * parseAsParameter(const QChar * pBuffer,int iFlags = 0); + KviKvsTreeNodeInstruction * parse(const TQChar * pBuffer,int iFlags = 0); + KviKvsTreeNodeInstruction * parseAsExpression(const TQChar * pBuffer,int iFlags = 0); + KviKvsTreeNodeInstruction * parseAsParameter(const TQChar * pBuffer,int iFlags = 0); private: // parsing helpers // generic void skipSpaces(); // skips only spaces and tabs (eventually with \) @@ -90,9 +90,9 @@ private: // parsing helpers // dedicated to parseSpecialCommandFor() : in kvi_kvs_parser_specialcommands.cpp bool skipToEndOfForControlBlock(); // error handlers - void error(const QChar * pLocation,const QString &szMsgFmt,...); - void warning(const QChar * pLocation,const QString &szMsgFmt,...); - void errorBadChar(const QChar * pLocation,char cExpected,const char * szCommandName); + void error(const TQChar * pLocation,const TQString &szMsgFmt,...); + void warning(const TQChar * pLocation,const TQString &szMsgFmt,...); + void errorBadChar(const TQChar * pLocation,char cExpected,const char * szCommandName); protected: // this is called by KviKvsKernel to register the parsing routines @@ -121,7 +121,7 @@ private: // if started in the middle of the list returns only the remaining // parameters. KviKvsTreeNodeDataList * parseCommaSeparatedParameterList(); - KviPointerList * parseCommaSeparatedParameterListNoTree(); + KviPointerList * parseCommaSeparatedParameterListNoTree(); // returns 0 in case of error or if it starts on a terminating character (null parameter) // check error() to see if there was an error condition (unless you already know that // there was a valid first character) @@ -294,7 +294,7 @@ private: KviKvsTreeNodeExpression * parseExpressionOperandCore(char terminator); bool parseExpressionMightPointToOperator(); - void report(bool bError,const QChar * pLocation,const QString &szMsgFmt,kvi_va_list va); + void report(bool bError,const TQChar * pLocation,const TQString &szMsgFmt,kvi_va_list va); }; #endif //!_KVI_KVS_PARSER_H_ diff --git a/src/kvirc/kvs/kvi_kvs_parser_command.cpp b/src/kvirc/kvs/kvi_kvs_parser_command.cpp index bd50d23f..094fc307 100644 --- a/src/kvirc/kvs/kvi_kvs_parser_command.cpp +++ b/src/kvirc/kvs/kvi_kvs_parser_command.cpp @@ -46,13 +46,13 @@ KviKvsTreeNodeCommand * KviKvsParser::parseCommand() KVSP_ASSERT(KVSP_curCharIsLetter || (KVSP_curCharUnicode == '_')); - const QChar * pIdentifier = KVSP_curCharPointer; + const TQChar * pIdentifier = KVSP_curCharPointer; while(KVSP_curCharIsLetterOrNumber || (KVSP_curCharUnicode == '_'))KVSP_skipChar; int iIdentifierLen = KVSP_curCharPointer - pIdentifier; - const QChar * pSecondPart = 0; + const TQChar * pSecondPart = 0; int iSecondPartLen = 0; bool bHasNamespaceSoMustBeAlias = false; @@ -107,7 +107,7 @@ KviKvsTreeNodeCommand * KviKvsParser::parseCommand() iIdentifierLen = KVSP_curCharPointer - pIdentifier; } - QString szIdentifier(pIdentifier,iIdentifierLen); + TQString szIdentifier(pIdentifier,iIdentifierLen); skipSpaces(); @@ -139,14 +139,14 @@ KviKvsTreeNodeCommand * KviKvsParser::parseCommand() // perl.begin has a *really* half special parsing routine if(iIdentifierLen == 4) { - if(pIdentifier->lower().unicode() == 'p') + if(pIdentifier->lower().tqunicode() == 'p') { - if(KviQString::equalCI(szIdentifier,"perl")) + if(KviTQString::equalCI(szIdentifier,"perl")) { if(pSecondPart) { - QString szSecondPart(pSecondPart,iSecondPartLen); - if(KviQString::equalCI(szSecondPart,"begin")) + TQString szSecondPart(pSecondPart,iSecondPartLen); + if(KviTQString::equalCI(szSecondPart,"begin")) { // yep, that's perl.begin cmd = parseSpecialCommandPerlBegin(); @@ -229,7 +229,7 @@ KviKvsTreeNodeCommand * KviKvsParser::parseCommand() return 0; } - const QChar * pClbkBegin = KVSP_curCharPointer; + const TQChar * pClbkBegin = KVSP_curCharPointer; KviKvsTreeNodeInstruction * ins = parseInstruction(); if(!ins) @@ -260,17 +260,17 @@ KviKvsTreeNodeCommand * KviKvsParser::parseCommand() // of the other context. } - QString szCallbackName = szIdentifier; + TQString szCallbackName = szIdentifier; szCallbackName += " callback"; - QString szBlock(pClbkBegin,KVSP_curCharPointer - pClbkBegin); + TQString szBlock(pClbkBegin,KVSP_curCharPointer - pClbkBegin); KviCommandFormatter::bufferFromBlock(szBlock); KviKvsScript * clbk = new KviKvsScript(szCallbackName,szBlock); if(pSecondPart) { - cmd = new KviKvsTreeNodeModuleCallbackCommand(pIdentifier,szIdentifier,QString(pSecondPart,iSecondPartLen),dl,clbk); + cmd = new KviKvsTreeNodeModuleCallbackCommand(pIdentifier,szIdentifier,TQString(pSecondPart,iSecondPartLen),dl,clbk); } else { KviKvsCoreCallbackCommandExecRoutine * r = KviKvsKernel::instance()->findCoreCallbackCommandExecRoutine(szIdentifier); if(r) @@ -313,7 +313,7 @@ KviKvsTreeNodeCommand * KviKvsParser::parseCommand() } else { if(pSecondPart) { - cmd = new KviKvsTreeNodeModuleSimpleCommand(pIdentifier,szIdentifier,QString(pSecondPart,iSecondPartLen),pl); + cmd = new KviKvsTreeNodeModuleSimpleCommand(pIdentifier,szIdentifier,TQString(pSecondPart,iSecondPartLen),pl); } else { KviKvsCoreSimpleCommandExecRoutine * r = KviKvsKernel::instance()->findCoreSimpleCommandExecRoutine(szIdentifier); if(r) diff --git a/src/kvirc/kvs/kvi_kvs_parser_comment.cpp b/src/kvirc/kvs/kvi_kvs_parser_comment.cpp index e731e2b1..18fbbbef 100644 --- a/src/kvirc/kvs/kvi_kvs_parser_comment.cpp +++ b/src/kvirc/kvs/kvi_kvs_parser_comment.cpp @@ -59,7 +59,7 @@ KviKvsTreeNode * KviKvsParser::parseComment() break; case '*': { - const QChar * pBegin = KVSP_curCharPointer; + const TQChar * pBegin = KVSP_curCharPointer; // c style , multiline KVSP_skipChar; for(;;) @@ -85,7 +85,7 @@ KviKvsTreeNode * KviKvsParser::parseComment() } break; default: - error(KVSP_curCharPointer,__tr2qs("Unexpected character '%q' (unicode %x) after a slash (it is a typo or a malformed comment begin ?)"),KVSP_curCharPointer,KVSP_curCharUnicode); + error(KVSP_curCharPointer,__tr2qs("Unexpected character '%q' (tqunicode %x) after a slash (it is a typo or a malformed comment begin ?)"),KVSP_curCharPointer,KVSP_curCharUnicode); return 0; break; } diff --git a/src/kvirc/kvs/kvi_kvs_parser_dollar.cpp b/src/kvirc/kvs/kvi_kvs_parser_dollar.cpp index 0f304bd7..a1f4c567 100644 --- a/src/kvirc/kvs/kvi_kvs_parser_dollar.cpp +++ b/src/kvirc/kvs/kvi_kvs_parser_dollar.cpp @@ -42,15 +42,15 @@ KviKvsTreeNodeData * KviKvsParser::parseDollar(bool bInObjScope) { KVSP_ASSERT(KVSP_curCharUnicode == '$'); - const QChar * pDollarBegin = KVSP_curCharPointer; - const QChar * pBegin = KVSP_curCharPointer; + const TQChar * pDollarBegin = KVSP_curCharPointer; + const TQChar * pBegin = KVSP_curCharPointer; KVSP_skipChar; if(!KVSP_curCharIsFunctionStart) { if(KVSP_curCharUnicode == 0)warning(KVSP_curCharPointer,__tr2qs("Unexpected end of script after '$' function call prefix")); - else warning(KVSP_curCharPointer,__tr2qs("Unexpected character %q (unicode %x) after '$' function call prefix"),KVSP_curCharPointer,KVSP_curCharUnicode); + else warning(KVSP_curCharPointer,__tr2qs("Unexpected character %q (tqunicode %x) after '$' function call prefix"),KVSP_curCharPointer,KVSP_curCharUnicode); error(KVSP_curCharPointer,__tr2qs("Syntax error after '$' function call prefix. If you want to use a plain '$' in the code you need to escape it")); return 0; } @@ -107,7 +107,7 @@ KviKvsTreeNodeData * KviKvsParser::parseDollar(bool bInObjScope) while(KVSP_curCharIsNumber) KVSP_skipChar; - QString szNum1(pBegin,KVSP_curCharPointer - pBegin); + TQString szNum1(pBegin,KVSP_curCharPointer - pBegin); bool bOk; int iNum1 = szNum1.toInt(&bOk); if(!bOk)debug("Ops... a non-number made by numbers ?"); @@ -138,7 +138,7 @@ KviKvsTreeNodeData * KviKvsParser::parseDollar(bool bInObjScope) while(KVSP_curCharIsNumber) KVSP_skipChar; - QString szNum2(pBegin,KVSP_curCharPointer - pBegin); + TQString szNum2(pBegin,KVSP_curCharPointer - pBegin); int iNum2 = szNum2.toInt(&bOk); if(!bOk)debug("Ops... a non-number made by numbers (2) ?"); @@ -201,9 +201,9 @@ KviKvsTreeNodeData * KviKvsParser::parseDollar(bool bInObjScope) } } - QString szIdentifier1(pBegin,KVSP_curCharPointer - pBegin); + TQString szIdentifier1(pBegin,KVSP_curCharPointer - pBegin); - const QChar * pId2 = 0; + const TQChar * pId2 = 0; int iId2Len = 0; bool bModuleFunctionCall = false; @@ -229,12 +229,12 @@ KviKvsTreeNodeData * KviKvsParser::parseDollar(bool bInObjScope) // object scope, check for "class name" namespace // the class name namespace has the format "::::..:: // so the last :: is the delimiter of the function name - const QChar * pOriginalEndOfId1 = KVSP_curCharPointer; - const QChar * pEndOfId1 = pOriginalEndOfId1; + const TQChar * pOriginalEndOfId1 = KVSP_curCharPointer; + const TQChar * pEndOfId1 = pOriginalEndOfId1; while(KVSP_curCharUnicode == ':') { - const QChar * pEndOfId1 = KVSP_curCharPointer; + const TQChar * pEndOfId1 = KVSP_curCharPointer; // base class function call ? KVSP_skipChar; if(KVSP_curCharUnicode == ':') @@ -297,16 +297,16 @@ KviKvsTreeNodeData * KviKvsParser::parseDollar(bool bInObjScope) } else if(bModuleFunctionCall) { // module function call - return new KviKvsTreeNodeModuleFunctionCall(pDollarBegin,szIdentifier1,QString(pId2,iId2Len),l); + return new KviKvsTreeNodeModuleFunctionCall(pDollarBegin,szIdentifier1,TQString(pId2,iId2Len),l); } else { if(bInObjScope) { - // object function call (our parent will be a scope operator) + // object function call (our tqparent will be a scope operator) if(pId2) { // base class object function call - return new KviKvsTreeNodeBaseObjectFunctionCall(pDollarBegin,szIdentifier1,QString(pId2,iId2Len),l); + return new KviKvsTreeNodeBaseObjectFunctionCall(pDollarBegin,szIdentifier1,TQString(pId2,iId2Len),l); } else { // plain object function call return new KviKvsTreeNodeThisObjectFunctionCall(pDollarBegin,szIdentifier1,l); diff --git a/src/kvirc/kvs/kvi_kvs_parser_expression.cpp b/src/kvirc/kvs/kvi_kvs_parser_expression.cpp index 832a814d..adeef3d8 100644 --- a/src/kvirc/kvs/kvi_kvs_parser_expression.cpp +++ b/src/kvirc/kvs/kvi_kvs_parser_expression.cpp @@ -355,9 +355,9 @@ KviKvsTreeNodeExpression * KviKvsParser::parseExpressionOperandCore(char termina KviPointerList * pDataList = new KviPointerList; pDataList->setAutoDelete(true); - static QString szStaticSingleSpace(" "); + static TQString szStaticSingleSpace(" "); - const QChar * pOperandBegin = KVSP_curCharPointer; + const TQChar * pOperandBegin = KVSP_curCharPointer; bool bHaveVariable = false; @@ -410,9 +410,9 @@ KviKvsTreeNodeExpression * KviKvsParser::parseExpressionOperandCore(char termina // literal ? if(KVSP_curCharIsLetterOrNumber || (KVSP_curCharUnicode == '.') || (KVSP_curCharUnicode == '_')) { - const QChar * pBegin = KVSP_curCharPointer; + const TQChar * pBegin = KVSP_curCharPointer; while(KVSP_curCharIsLetterOrNumber || (KVSP_curCharUnicode == '.') || (KVSP_curCharUnicode == '_'))KVSP_skipChar; - QString tmp(pBegin,KVSP_curCharPointer - pBegin); + TQString tmp(pBegin,KVSP_curCharPointer - pBegin); bool bOk; kvs_int_t iVal = tmp.toLong(&bOk); if(bOk) @@ -420,14 +420,14 @@ KviKvsTreeNodeExpression * KviKvsParser::parseExpressionOperandCore(char termina pDataList->append(new KviKvsTreeNodeConstantData(pBegin,new KviKvsVariant(iVal))); } else { // bOk is false - if(pBegin->unicode() == '0') + if(pBegin->tqunicode() == '0') { if(tmp.length() > 2) { if((tmp[1] == 'x') || (tmp[1] == 'X')) { // hexadecimal constant ? - QString hex = tmp.right(tmp.length() - 2); + TQString hex = tmp.right(tmp.length() - 2); iVal = hex.toLong(&bOk,16); if(bOk) { @@ -448,7 +448,7 @@ KviKvsTreeNodeExpression * KviKvsParser::parseExpressionOperandCore(char termina } } } else { - error(KVSP_curCharPointer,__tr2qs("Unexpected character %q (unicode %h) in expression. If it meant to be a string use the quotes."),KVSP_curCharPointer,KVSP_curCharUnicode); + error(KVSP_curCharPointer,__tr2qs("Unexpected character %q (tqunicode %h) in expression. If it meant to be a string use the quotes."),KVSP_curCharPointer,KVSP_curCharUnicode); delete pDataList; return 0; } @@ -501,7 +501,7 @@ KviKvsTreeNodeExpression * KviKvsParser::parseExpression(char terminator) KviKvsTreeNodeExpression * left = parseExpressionOperand(terminator); if(!left)return 0; - QString sz; + TQString sz; left->contextDescription(sz); skipSpaces(); @@ -577,7 +577,7 @@ KviKvsTreeNodeExpression * KviKvsParser::parseExpression(char terminator) // incomplete has GREATER precedence than aux and thus aux should be done first incompleteOperator->setRight(operand); //right tree complete // go up until we find an operator with lower precedence than auxOperator (>=) - KviKvsTreeNodeExpression * tempOperator = incompleteOperator->parentWithPrecedenceLowerThan(auxOperator->precedence()); + KviKvsTreeNodeExpression * tempOperator = incompleteOperator->tqparentWithPrecedenceLowerThan(auxOperator->precedence()); if(tempOperator == 0) { auxOperator->setLeft(curTopOperator); diff --git a/src/kvirc/kvs/kvi_kvs_parser_lside.cpp b/src/kvirc/kvs/kvi_kvs_parser_lside.cpp index c9869567..d6437c7d 100644 --- a/src/kvirc/kvs/kvi_kvs_parser_lside.cpp +++ b/src/kvirc/kvs/kvi_kvs_parser_lside.cpp @@ -156,14 +156,14 @@ [b] =~ s///[flags][/b][br] where is an extended regular expression to be matched in the and is a special pattern that will replace any occurence found.[br] - may contain parentheses to capture parts of the matched text. + may contain tqparentheses to capture parts of the matched text. can contain the escape sequences \\N where N is a number between 1 and 9 to be replaced by the captured text.[br] (We use \\N because KVIrc will first unquote the string when parsing...)[br] \\0 is a special escape that will be replaced by the entire match (is always valid!).[br] WARNING: the "capture-text" feature is not available if KVIrc has been compiled with qt older than 3.0.0. You can find out if the feature is available by - looking for the string "Qt3" in the array returned by [fnc]$features[/fnc].[br] + looking for the string "TQt3" in the array returned by [fnc]$features[/fnc].[br] [flags] may be a combination of the letters 'g','i' and 'w'.[br] 'g' causes the search to be global and not stop after the first occurence of .[br] 'i' causes the search to be case insensitive.[br] @@ -229,12 +229,12 @@ [example] %var << Pragma [/example] - %var now contains "Ciao ciao Pragma"[br] + %var now tqcontains "Ciao ciao Pragma"[br] Append a '!' character [example] %var <+ ! [/example] - %var now contains "Ciao ciao Pragma!" + %var now tqcontains "Ciao ciao Pragma!" Now reset it. [example] %var = @@ -245,7 +245,7 @@ %var = Pragma,Diabl0,Arter|o %var <, MalboroLi [/example] - %var now contains "Pragma,Diabl0,Arter|o,MalboroLi"[br] + %var now tqcontains "Pragma,Diabl0,Arter|o,MalboroLi"[br] [br] Now a longer example. [example] @@ -274,7 +274,7 @@ KviKvsTreeNodeData * KviKvsParser::parseOperationRightSide(bool bPreferNumeric) KviPointerList * l = new KviPointerList(); l->setAutoDelete(true); - const QChar * pBegin = KVSP_curCharPointer; + const TQChar * pBegin = KVSP_curCharPointer; for(;;) { @@ -298,7 +298,7 @@ KviKvsTreeNodeData * KviKvsParser::parseOperationRightSide(bool bPreferNumeric) } else { // separate by single spaces bPreferNumeric = false; // this can't be a number - l->append(new KviKvsTreeNodeConstantData(KVSP_curCharPointer,new KviKvsVariant(QString(" ")))); + l->append(new KviKvsTreeNodeConstantData(KVSP_curCharPointer,new KviKvsVariant(TQString(" ")))); } break; default: @@ -331,7 +331,7 @@ end_of_the_param: } else { // empty (this should NEVER happen anyway) delete l; - return new KviKvsTreeNodeConstantData(pBegin,new KviKvsVariant(QString(""))); + return new KviKvsTreeNodeConstantData(pBegin,new KviKvsVariant(TQString(""))); } } // never reached @@ -662,7 +662,7 @@ end_of_the_param: [b] =~ s///[flags][/b][br] where is an extended regular expression to be matched in the and is a special pattern that will replace any occurence found.[br] - may contain parentheses to capture parts of the matched text. + may contain tqparentheses to capture parts of the matched text. can contain the escape sequences \\N where N is a number between 1 and 9 to be replaced by the captured text.[br] (We use \\N because KVIrc will first unquote the string when parsing...)[br] @@ -747,7 +747,7 @@ KviKvsTreeNodeData * KviKvsParser::parseBindingOperationParameter() KviPointerList * l = new KviPointerList; l->setAutoDelete(true); - const QChar * pBegin = KVSP_curCharPointer; + const TQChar * pBegin = KVSP_curCharPointer; for(;;) { @@ -805,7 +805,7 @@ end_of_function_parameter: l->setAutoDelete(false); KviKvsTreeNodeData * p = l->first(); delete l; - if(!p)p = new KviKvsTreeNodeConstantData(KVSP_curCharPointer,new KviKvsVariant(QString(""))); + if(!p)p = new KviKvsTreeNodeConstantData(KVSP_curCharPointer,new KviKvsVariant(TQString(""))); return p; } // never reached @@ -818,17 +818,17 @@ KviKvsTreeNodeOperation * KviKvsParser::parseBindingOperation() { // t or tr or y // s - const QChar * pBegin = KVSP_curCharPointer; + const TQChar * pBegin = KVSP_curCharPointer; while(KVSP_curCharIsLetter)KVSP_skipChar; - QString szOp = QString(pBegin,KVSP_curCharPointer - pBegin).lower(); + TQString szOp = TQString(pBegin,KVSP_curCharPointer - pBegin).lower(); skipSpaces(); if(KVSP_curCharUnicode != '/') { - error(KVSP_curCharPointer,__tr2qs("Found character '%q' (unicode %x) where a slash '/' was expected"),KVSP_curCharPointer,KVSP_curCharUnicode); + error(KVSP_curCharPointer,__tr2qs("Found character '%q' (tqunicode %x) where a slash '/' was expected"),KVSP_curCharPointer,KVSP_curCharUnicode); return 0; } @@ -846,7 +846,7 @@ KviKvsTreeNodeOperation * KviKvsParser::parseBindingOperation() if(KVSP_curCharUnicode != '/') { - error(KVSP_curCharPointer,__tr2qs("Found character '%q' (unicode %x) where a slash '/' was expected"),KVSP_curCharPointer,KVSP_curCharUnicode); + error(KVSP_curCharPointer,__tr2qs("Found character '%q' (tqunicode %x) where a slash '/' was expected"),KVSP_curCharPointer,KVSP_curCharUnicode); delete pFirst; return 0; } @@ -869,7 +869,7 @@ KviKvsTreeNodeOperation * KviKvsParser::parseBindingOperation() if(KVSP_curCharUnicode != '/') { - error(KVSP_curCharPointer,__tr2qs("Found character '%q' (unicode %x) where a slash '/' was expected"),KVSP_curCharPointer,KVSP_curCharUnicode); + error(KVSP_curCharPointer,__tr2qs("Found character '%q' (tqunicode %x) where a slash '/' was expected"),KVSP_curCharPointer,KVSP_curCharUnicode); delete pFirst; return 0; } @@ -886,7 +886,7 @@ KviKvsTreeNodeOperation * KviKvsParser::parseBindingOperation() return 0; } - pThird = new KviKvsTreeNodeConstantData(KVSP_curCharPointer,new KviKvsVariant(QString(""))); + pThird = new KviKvsTreeNodeConstantData(KVSP_curCharPointer,new KviKvsVariant(TQString(""))); } while(!KVSP_curCharIsEndOfCommand)KVSP_skipChar; @@ -910,7 +910,7 @@ KviKvsTreeNodeOperation * KviKvsParser::parseBindingOperation() KviKvsTreeNodeOperation * KviKvsParser::parseOperation() { // find the operator - const QChar * pBegin = KVSP_curCharPointer; + const TQChar * pBegin = KVSP_curCharPointer; switch(KVSP_curCharUnicode) { @@ -1135,7 +1135,7 @@ KviKvsTreeNodeInstruction * KviKvsParser::parseVoidFunctionCallOrOperation() { KVSP_ASSERT((KVSP_curCharUnicode == '$') || (KVSP_curCharUnicode == '%') || (KVSP_curCharUnicode == '@')); - const QChar * pBegin = KVSP_curCharPointer; + const TQChar * pBegin = KVSP_curCharPointer; KviKvsTreeNodeData * r = parsePercentOrDollar(); @@ -1173,10 +1173,10 @@ KviKvsTreeNodeInstruction * KviKvsParser::parseVoidFunctionCallOrOperation() // must be followed by the end of a command if(r->isFunctionCall()) { - error(KVSP_curCharPointer,__tr2qs("Unexpected character '%q' (unicode %x) after a void function call: end of instruction expected"),KVSP_curCharPointer,KVSP_curCharUnicode); + error(KVSP_curCharPointer,__tr2qs("Unexpected character '%q' (tqunicode %x) after a void function call: end of instruction expected"),KVSP_curCharPointer,KVSP_curCharUnicode); } else { warning(pBegin,__tr2qs("Unexpected (and senseless) read-only data evaluation")); - warning(pBegin,__tr2qs("Unexpected character '%q' (unicode %x)"),KVSP_curCharPointer,KVSP_curCharUnicode); + warning(pBegin,__tr2qs("Unexpected character '%q' (tqunicode %x)"),KVSP_curCharPointer,KVSP_curCharUnicode); error(KVSP_curCharPointer,__tr2qs("Syntax error: confused by earlier errors: bailing out")); } delete r; diff --git a/src/kvirc/kvs/kvi_kvs_parser_macros.h b/src/kvirc/kvs/kvi_kvs_parser_macros.h index 8de1f479..e727e4a2 100644 --- a/src/kvirc/kvs/kvi_kvs_parser_macros.h +++ b/src/kvirc/kvs/kvi_kvs_parser_macros.h @@ -29,15 +29,15 @@ #define KVSP_backChar m_ptr-- #define KVSP_backNChars(n) m_ptr -= n -#define KVSP_curCharUnicode (m_ptr->unicode()) +#define KVSP_curCharUnicode (m_ptr->tqunicode()) #define KVSP_curCharPointer m_ptr #define KVSP_curCharIsLetter (m_ptr->isLetter()) #define KVSP_curCharIsNumber (m_ptr->isNumber()) #define KVSP_curCharIsLetterOrNumber (m_ptr->isLetterOrNumber()) -#define KVSP_curCharIsFunctionStart (m_ptr->isLetterOrNumber() || (m_ptr->unicode() == '(') || (m_ptr->unicode() == '{') || (m_ptr->unicode() == '$')) -#define KVSP_curCharIsEndOfCommand ((m_ptr->unicode() == ';') || (m_ptr->unicode() == 0) || (m_ptr->unicode() == '\n') || (m_ptr->unicode() == '\r')) -#define KVSP_curCharIsEndOfBuffer (m_ptr->unicode() == 0) +#define KVSP_curCharIsFunctionStart (m_ptr->isLetterOrNumber() || (m_ptr->tqunicode() == '(') || (m_ptr->tqunicode() == '{') || (m_ptr->tqunicode() == '$')) +#define KVSP_curCharIsEndOfCommand ((m_ptr->tqunicode() == ';') || (m_ptr->tqunicode() == 0) || (m_ptr->tqunicode() == '\n') || (m_ptr->tqunicode() == '\r')) +#define KVSP_curCharIsEndOfBuffer (m_ptr->tqunicode() == 0) #define KVSP_setCurCharPointer(_ptr) m_ptr = _ptr diff --git a/src/kvirc/kvs/kvi_kvs_parser_specialcommands.cpp b/src/kvirc/kvs/kvi_kvs_parser_specialcommands.cpp index 0dbc7816..0014743f 100644 --- a/src/kvirc/kvs/kvi_kvs_parser_specialcommands.cpp +++ b/src/kvirc/kvs/kvi_kvs_parser_specialcommands.cpp @@ -52,7 +52,7 @@ KviKvsTreeNodeCommand * KviKvsParser::parseSpecialCommandPerlBegin() // perl.begin(context) perl.end // - const QChar * pBegin = KVSP_curCharPointer; + const TQChar * pBegin = KVSP_curCharPointer; skipSpaces(); KviKvsTreeNodeDataList * dl; @@ -84,11 +84,11 @@ KviKvsTreeNodeCommand * KviKvsParser::parseSpecialCommandPerlBegin() } } - const QChar * pPerlBegin = KVSP_curCharPointer; + const TQChar * pPerlBegin = KVSP_curCharPointer; // now look for perl.end[terminator] - static QString szPerlEnd("perl.end"); - const QChar * pPerlEnd; + static TQString szPerlEnd("perl.end"); + const TQChar * pPerlEnd; for(;;) { while(KVSP_curCharUnicode && (KVSP_curCharUnicode != 'p') && (KVSP_curCharUnicode != 'P')) @@ -100,13 +100,13 @@ KviKvsTreeNodeCommand * KviKvsParser::parseSpecialCommandPerlBegin() return 0; } pPerlEnd = KVSP_curCharPointer; - if(KviQString::equalCIN(szPerlEnd,KVSP_curCharPointer,8)) + if(KviTQString::equalCIN(szPerlEnd,KVSP_curCharPointer,8)) { KVSP_skipNChars(8); if(KVSP_curCharIsEndOfCommand || (KVSP_curCharUnicode == ' ') || (KVSP_curCharUnicode == '\t')) { // yeah! - QString szPerl(pPerlBegin,pPerlEnd - pPerlBegin); + TQString szPerl(pPerlBegin,pPerlEnd - pPerlBegin); dl->prependItem(new KviKvsTreeNodeConstantData(pPerlBegin,new KviKvsVariant(szPerl))); while(!KVSP_curCharIsEndOfCommand)KVSP_skipChar; if(!KVSP_curCharIsEndOfBuffer)KVSP_skipChar; @@ -140,7 +140,7 @@ KviKvsTreeNodeCommand * KviKvsParser::parseSpecialCommandBreak() If called outside an iteration loop , will act just like [cmd]halt[/cmd] has been called but has no additional semantics for events.[br] */ - const QChar * pBegin = KVSP_curCharPointer; // FIXME: this is not accurate at all : it may be even the end of the cmd + const TQChar * pBegin = KVSP_curCharPointer; // FIXME: this is not accurate at all : it may be even the end of the cmd skipSpaces(); if(!KVSP_curCharIsEndOfCommand) { @@ -183,7 +183,7 @@ KviKvsTreeNodeCommand * KviKvsParser::parseSpecialCommandUnset() [/example] */ - const QChar * pCmdBegin = KVSP_curCharPointer; + const TQChar * pCmdBegin = KVSP_curCharPointer; KviPointerList * pVarList = new KviPointerList; pVarList->setAutoDelete(true); @@ -207,7 +207,7 @@ KviKvsTreeNodeCommand * KviKvsParser::parseSpecialCommandUnset() if(!KVSP_curCharIsEndOfCommand) { warning(KVSP_curCharPointer,__tr2qs("The 'unset' command needs a variable list")); - error(KVSP_curCharPointer,__tr2qs("Found character %q (unicode %x) where a variable was expected"),KVSP_curCharPointer,KVSP_curCharUnicode); + error(KVSP_curCharPointer,__tr2qs("Found character %q (tqunicode %x) where a variable was expected"),KVSP_curCharPointer,KVSP_curCharUnicode); return 0; } @@ -251,19 +251,19 @@ KviKvsTreeNodeCommand * KviKvsParser::parseSpecialCommandGlobal() while(KVSP_curCharUnicode == '%') { KVSP_skipChar; - const QChar * pBegin = KVSP_curCharPointer; + const TQChar * pBegin = KVSP_curCharPointer; while((KVSP_curCharIsLetterOrNumber) || (KVSP_curCharUnicode == '_'))KVSP_skipChar; - QString szIdentifier(pBegin,KVSP_curCharPointer - pBegin); + TQString szIdentifier(pBegin,KVSP_curCharPointer - pBegin); if(!m_pGlobals) { - m_pGlobals = new KviPointerHashTable(17,false); + m_pGlobals = new KviPointerHashTable(17,false); m_pGlobals->setAutoDelete(true); } - m_pGlobals->replace(szIdentifier,new QString()); + m_pGlobals->tqreplace(szIdentifier,new TQString()); skipSpaces(); @@ -277,7 +277,7 @@ KviKvsTreeNodeCommand * KviKvsParser::parseSpecialCommandGlobal() if(!KVSP_curCharIsEndOfCommand) { warning(KVSP_curCharPointer,__tr2qs("The 'global' command needs a variable list")); - error(KVSP_curCharPointer,__tr2qs("Found character %q (unicode %x) where a variable was expected"),KVSP_curCharPointer,KVSP_curCharUnicode); + error(KVSP_curCharPointer,__tr2qs("Found character %q (tqunicode %x) where a variable was expected"),KVSP_curCharPointer,KVSP_curCharUnicode); return 0; } @@ -329,10 +329,10 @@ KviKvsTreeNodeCommand * KviKvsParser::parseSpecialCommandClass() that can be used to sign the parameters that the function expects; it acts as a programmer reminder or comment and it has no other meaning in KVIrc scripting. The respects the syntax - of an expression, so it is terminated by a closed parenthesis. + of an expression, so it is terminated by a closed tqparenthesis. It's rather dangerous to use this command inside an object function handler: if the class definition was already - existing and it is a parent of the object's class, you might + existing and it is a tqparent of the object's class, you might end up executing "inexisting" code.[br] As a thumb rule, use this command only outside object function handlers.[br] [br][br] @@ -376,11 +376,11 @@ KviKvsTreeNodeCommand * KviKvsParser::parseSpecialCommandClass() if(KVSP_curCharUnicode != '(') { - error(KVSP_curCharPointer,__tr2qs("Found character %q (unicode %x) where an open parenthesis was expected"),KVSP_curCharPointer,KVSP_curCharUnicode); + error(KVSP_curCharPointer,__tr2qs("Found character %q (tqunicode %x) where an open tqparenthesis was expected"),KVSP_curCharPointer,KVSP_curCharUnicode); return 0; } - const QChar * pBegin = KVSP_curCharPointer; + const TQChar * pBegin = KVSP_curCharPointer; KviKvsTreeNodeDataList * l = parseCommaSeparatedParameterList(); if(!l)return 0; @@ -426,7 +426,7 @@ KviKvsTreeNodeCommand * KviKvsParser::parseSpecialCommandClass() continue; } - const QChar * pLabelBegin = KVSP_curCharPointer; + const TQChar * pLabelBegin = KVSP_curCharPointer; if(KVSP_curCharIsLetter) { @@ -443,12 +443,12 @@ KviKvsTreeNodeCommand * KviKvsParser::parseSpecialCommandClass() if(KVSP_curCharPointer == pLabelBegin) { - error(KVSP_curCharPointer,__tr2qs("Found character %q (unicode %x) where a function name was expected"),KVSP_curCharPointer,KVSP_curCharUnicode); + error(KVSP_curCharPointer,__tr2qs("Found character %q (tqunicode %x) where a function name was expected"),KVSP_curCharPointer,KVSP_curCharUnicode); delete pClass; return 0; } - QString szLabel(pLabelBegin,KVSP_curCharPointer - pLabelBegin); + TQString szLabel(pLabelBegin,KVSP_curCharPointer - pLabelBegin); unsigned int uHandlerFlags = 0; @@ -471,11 +471,11 @@ KviKvsTreeNodeCommand * KviKvsParser::parseSpecialCommandClass() if(KVSP_curCharPointer == pLabelBegin) { - error(KVSP_curCharPointer,__tr2qs("Found character %q (unicode %x) where a function name was expected"),KVSP_curCharPointer,KVSP_curCharUnicode); + error(KVSP_curCharPointer,__tr2qs("Found character %q (tqunicode %x) where a function name was expected"),KVSP_curCharPointer,KVSP_curCharUnicode); delete pClass; return 0; } - szLabel = QString(pLabelBegin,KVSP_curCharPointer - pLabelBegin); + szLabel = TQString(pLabelBegin,KVSP_curCharPointer - pLabelBegin); } } @@ -498,11 +498,11 @@ KviKvsTreeNodeCommand * KviKvsParser::parseSpecialCommandClass() if(KVSP_curCharPointer == pLabelBegin) { - error(KVSP_curCharPointer,__tr2qs("Found character %q (unicode %x) where a function name was expected"),KVSP_curCharPointer,KVSP_curCharUnicode); + error(KVSP_curCharPointer,__tr2qs("Found character %q (tqunicode %x) where a function name was expected"),KVSP_curCharPointer,KVSP_curCharUnicode); delete pClass; return 0; } - szLabel = QString(pLabelBegin,KVSP_curCharPointer - pLabelBegin); + szLabel = TQString(pLabelBegin,KVSP_curCharPointer - pLabelBegin); } } @@ -560,10 +560,10 @@ KviKvsTreeNodeCommand * KviKvsParser::parseSpecialCommandClass() } delete pInstruction; int iLen = KVSP_curCharPointer - pBegin; - QString szInstruction; + TQString szInstruction; if(iLen > 0) { - szInstruction = QString(pBegin,KVSP_curCharPointer - pBegin); + szInstruction = TQString(pBegin,KVSP_curCharPointer - pBegin); KviCommandFormatter::bufferFromBlock(szInstruction); } @@ -627,12 +627,12 @@ KviKvsTreeNodeCommand * KviKvsParser::parseSpecialCommandWhile() if(KVSP_curCharUnicode != '(') { - warning(KVSP_curCharPointer,__tr2qs("The while command needs an expression enclosed in parenthesis")); - error(KVSP_curCharPointer,__tr2qs("Found character %q (unicode %x) where an open parenthesis was expected"),KVSP_curCharPointer,KVSP_curCharUnicode); + warning(KVSP_curCharPointer,__tr2qs("The while command needs an expression enclosed in tqparenthesis")); + error(KVSP_curCharPointer,__tr2qs("Found character %q (tqunicode %x) where an open tqparenthesis was expected"),KVSP_curCharPointer,KVSP_curCharUnicode); return 0; } - const QChar * pBegin = KVSP_curCharPointer; + const TQChar * pBegin = KVSP_curCharPointer; KVSP_skipChar; @@ -714,7 +714,7 @@ KviKvsTreeNodeCommand * KviKvsParser::parseSpecialCommandDo() [cmd]while[/cmd] */ - const QChar * pBegin = KVSP_curCharPointer; + const TQChar * pBegin = KVSP_curCharPointer; KviKvsTreeNodeInstruction * i = parseInstruction(); if(!i) @@ -740,7 +740,7 @@ KviKvsTreeNodeCommand * KviKvsParser::parseSpecialCommandDo() if(KVSP_curCharIsEndOfBuffer) error(KVSP_curCharPointer,__tr2qs("Unexpected end of command after the 'do' command block: expected 'while' keyword")); else - error(KVSP_curCharPointer,__tr2qs("Found character %q (unicode %x) where a 'while' keyword was expected"),KVSP_curCharPointer,KVSP_curCharUnicode); + error(KVSP_curCharPointer,__tr2qs("Found character %q (tqunicode %x) where a 'while' keyword was expected"),KVSP_curCharPointer,KVSP_curCharUnicode); if(i)delete i; return 0; } @@ -756,7 +756,7 @@ KviKvsTreeNodeCommand * KviKvsParser::parseSpecialCommandDo() if(KVSP_curCharUnicode != '(') { - warning(KVSP_curCharPointer,__tr2qs("The 'while' block of the 'do' command needs an expression enclosed in parenthesis")); + warning(KVSP_curCharPointer,__tr2qs("The 'while' block of the 'do' command needs an expression enclosed in tqparenthesis")); errorBadChar(KVSP_curCharPointer,'(',"do"); if(i)delete i; return 0; @@ -822,12 +822,12 @@ KviKvsTreeNodeCommand * KviKvsParser::parseSpecialCommandIf() if(KVSP_curCharUnicode != '(') { - warning(KVSP_curCharPointer,__tr2qs("The 'if' command needs an expression enclosed in parenthesis")); + warning(KVSP_curCharPointer,__tr2qs("The 'if' command needs an expression enclosed in tqparenthesis")); errorBadChar(KVSP_curCharPointer,'(',"if"); return 0; } - const QChar * pBegin = KVSP_curCharPointer; + const TQChar * pBegin = KVSP_curCharPointer; KVSP_skipChar; @@ -867,7 +867,7 @@ KviKvsTreeNodeCommand * KviKvsParser::parseSpecialCommandIf() return 0; } - const QChar * pElse = KVSP_curCharPointer; + const TQChar * pElse = KVSP_curCharPointer; if((KVSP_curCharUnicode != 'e') && (KVSP_curCharUnicode != 'E')) return new KviKvsTreeNodeSpecialCommandIf(pBegin,e,i,0); @@ -967,7 +967,7 @@ bool KviKvsParser::skipToEndOfForControlBlock() return false; break; //case '\n': - // that's ok.. it may have a parenthesis on the next line + // that's ok.. it may have a tqparenthesis on the next line //KVSP_skipChar; //break; default: @@ -1012,12 +1012,12 @@ KviKvsTreeNodeCommand * KviKvsParser::parseSpecialCommandFor() if(KVSP_curCharUnicode != '(') { - warning(KVSP_curCharPointer,__tr2qs("The 'for' command needs an expression enclosed in parenthesis")); + warning(KVSP_curCharPointer,__tr2qs("The 'for' command needs an expression enclosed in tqparenthesis")); errorBadChar(KVSP_curCharPointer,'(',"for"); return 0; } - const QChar * pForBegin = KVSP_curCharPointer; + const TQChar * pForBegin = KVSP_curCharPointer; KVSP_skipChar; @@ -1045,7 +1045,7 @@ KviKvsTreeNodeCommand * KviKvsParser::parseSpecialCommandFor() // skip to the first non matching ')' that is not in a string - const QChar * pBegin = KVSP_curCharPointer; + const TQChar * pBegin = KVSP_curCharPointer; if(!skipToEndOfForControlBlock()) { @@ -1061,10 +1061,10 @@ KviKvsTreeNodeCommand * KviKvsParser::parseSpecialCommandFor() // HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK // KVSP_curCharPointer is const! // we shouldn't be able to modify it - QChar cSave = *(KVSP_curCharPointer); + TQChar cSave = *(KVSP_curCharPointer); - QChar * pHack = (QChar *)KVSP_curCharPointer; - *pHack = QChar('\n'); + TQChar * pHack = (TQChar *)KVSP_curCharPointer; + *pHack = TQChar('\n'); KVSP_curCharPointer = pBegin; @@ -1089,7 +1089,7 @@ KviKvsTreeNodeCommand * KviKvsParser::parseSpecialCommandFor() if(KVSP_curCharUnicode != ')') { - error(KVSP_curCharPointer,__tr2qs("Found char %q (unicode %x) while looking for the terminating ')' in 'for' command"),KVSP_curCharPointer,KVSP_curCharUnicode); + error(KVSP_curCharPointer,__tr2qs("Found char %q (tqunicode %x) while looking for the terminating ')' in 'for' command"),KVSP_curCharPointer,KVSP_curCharUnicode); if(i1)delete i1; if(e)delete e; if(i2)delete i2; @@ -1178,12 +1178,12 @@ KviKvsTreeNodeCommand * KviKvsParser::parseSpecialCommandForeach() if(KVSP_curCharUnicode != '(') { - warning(KVSP_curCharPointer,__tr2qs("The 'foreach' command needs an expression enclosed in parenthesis")); + warning(KVSP_curCharPointer,__tr2qs("The 'foreach' command needs an expression enclosed in tqparenthesis")); errorBadChar(KVSP_curCharPointer,'(',"foreach"); return 0; } - const QChar * pForeachBegin = KVSP_curCharPointer; + const TQChar * pForeachBegin = KVSP_curCharPointer; KVSP_skipChar; @@ -1193,7 +1193,7 @@ KviKvsTreeNodeCommand * KviKvsParser::parseSpecialCommandForeach() if((KVSP_curCharUnicode != '%') && (KVSP_curCharUnicode != '$') && (KVSP_curCharUnicode != '@')) { warning(KVSP_curCharPointer,__tr2qs("The 'foreach' command expects a writeable iteration variable as first parameter")); - error(KVSP_curCharPointer,__tr2qs("Found character '%q' (unicode %x) where '%' or '$' was expected: see /help foreach for the command syntax"),KVSP_curCharPointer,KVSP_curCharUnicode); + error(KVSP_curCharPointer,__tr2qs("Found character '%q' (tqunicode %x) where '%' or '$' was expected: see /help foreach for the command syntax"),KVSP_curCharPointer,KVSP_curCharUnicode); return 0; } @@ -1235,7 +1235,7 @@ KviKvsTreeNodeCommand * KviKvsParser::parseSpecialCommandForeach() return 0; } - const QChar * pLoopBegin = KVSP_curCharPointer; + const TQChar * pLoopBegin = KVSP_curCharPointer; KviKvsTreeNodeInstruction * loop = parseInstruction(); if(!loop) @@ -1362,12 +1362,12 @@ KviKvsTreeNodeCommand * KviKvsParser::parseSpecialCommandSwitch() if(KVSP_curCharUnicode != '(') { - warning(KVSP_curCharPointer,__tr2qs("The 'switch' command needs an expression enclosed in parenthesis")); + warning(KVSP_curCharPointer,__tr2qs("The 'switch' command needs an expression enclosed in tqparenthesis")); errorBadChar(KVSP_curCharPointer,'(',"switch"); return 0; } - const QChar * pBegin = KVSP_curCharPointer; + const TQChar * pBegin = KVSP_curCharPointer; KVSP_skipChar; @@ -1407,7 +1407,7 @@ KviKvsTreeNodeCommand * KviKvsParser::parseSpecialCommandSwitch() { // look for a 'case','match','default' or 'regexpr' label - const QChar * pLabelBegin = KVSP_curCharPointer; + const TQChar * pLabelBegin = KVSP_curCharPointer; while(KVSP_curCharIsLetter)KVSP_skipChar; if(KVSP_curCharIsEndOfBuffer) @@ -1419,13 +1419,13 @@ KviKvsTreeNodeCommand * KviKvsParser::parseSpecialCommandSwitch() if(KVSP_curCharPointer == pLabelBegin) { - error(KVSP_curCharPointer,__tr2qs("Found character %q (unicode %x) where a 'case','match','regexp','default' or 'break' label was expected"),KVSP_curCharPointer,KVSP_curCharUnicode); + error(KVSP_curCharPointer,__tr2qs("Found character %q (tqunicode %x) where a 'case','match','regexp','default' or 'break' label was expected"),KVSP_curCharPointer,KVSP_curCharUnicode); delete pSwitch; return 0; } - QString szLabel(pLabelBegin,KVSP_curCharPointer - pLabelBegin); - QString szLabelLow = szLabel.lower(); + TQString szLabel(pLabelBegin,KVSP_curCharPointer - pLabelBegin); + TQString szLabelLow = szLabel.lower(); bool bNeedParam = true; @@ -1554,7 +1554,7 @@ KviKvsTreeNodeSpecialCommandDefpopupLabelPopup * KviKvsParser::parseSpecialComma while(KVSP_curCharUnicode != '}') { // look for 'label', 'prologue', 'epilogue', 'popup', 'item', 'separator' or 'extpopup' label - const QChar * pLabelBegin = KVSP_curCharPointer; + const TQChar * pLabelBegin = KVSP_curCharPointer; while(KVSP_curCharIsLetter)KVSP_skipChar; if(KVSP_curCharIsEndOfBuffer) @@ -1566,17 +1566,17 @@ KviKvsTreeNodeSpecialCommandDefpopupLabelPopup * KviKvsParser::parseSpecialComma if(KVSP_curCharPointer == pLabelBegin) { - error(KVSP_curCharPointer,__tr2qs("Found character %q (unicode %x) where a 'prologue','separator','label','popup','item','extpopup' or 'epilogue' label was expected"),KVSP_curCharPointer,KVSP_curCharUnicode); + error(KVSP_curCharPointer,__tr2qs("Found character %q (tqunicode %x) where a 'prologue','separator','label','popup','item','extpopup' or 'epilogue' label was expected"),KVSP_curCharPointer,KVSP_curCharUnicode); delete pPopup; return 0; } - QString szLabel(pLabelBegin,KVSP_curCharPointer - pLabelBegin); - QString szLabelLow = szLabel.lower(); + TQString szLabel(pLabelBegin,KVSP_curCharPointer - pLabelBegin); + TQString szLabelLow = szLabel.lower(); - KviPointerList * pParameters = 0; + KviPointerList * pParameters = 0; - QString szCondition; + TQString szCondition; #define EXTRACT_POPUP_LABEL_PARAMETERS \ @@ -1603,7 +1603,7 @@ KviKvsTreeNodeSpecialCommandDefpopupLabelPopup * KviKvsParser::parseSpecialComma } \ if(KVSP_curCharUnicode == '(') \ { \ - const QChar * pBegin = KVSP_curCharPointer; \ + const TQChar * pBegin = KVSP_curCharPointer; \ KVSP_skipChar; \ KviKvsTreeNodeExpression * pExpression = parseExpression(')'); \ if(!pExpression) \ @@ -1648,7 +1648,7 @@ KviKvsTreeNodeSpecialCommandDefpopupLabelPopup * KviKvsParser::parseSpecialComma return 0; } } - const QChar * pBegin = KVSP_curCharPointer; + const TQChar * pBegin = KVSP_curCharPointer; KviKvsTreeNodeInstruction * pInstruction = parseInstruction(); if(pInstruction) { @@ -1672,10 +1672,10 @@ KviKvsTreeNodeSpecialCommandDefpopupLabelPopup * KviKvsParser::parseSpecialComma int iLen = KVSP_curCharPointer - pBegin; if(iLen > 0) { - QString szInstruction(pBegin,KVSP_curCharPointer - pBegin); + TQString szInstruction(pBegin,KVSP_curCharPointer - pBegin); KviCommandFormatter::bufferFromBlock(szInstruction); - QString * pItemName = pParameters ? pParameters->first() : 0; - QString szItemName = pItemName ? *pItemName : QString::null; + TQString * pItemName = pParameters ? pParameters->first() : 0; + TQString szItemName = pItemName ? *pItemName : TQString(); if(bPrologue) pPopup->addLabel(new KviKvsTreeNodeSpecialCommandDefpopupLabelPrologue(pLabelBegin,szInstruction,szItemName)); else @@ -1688,7 +1688,7 @@ KviKvsTreeNodeSpecialCommandDefpopupLabelPopup * KviKvsParser::parseSpecialComma ///////////////////////////////////////////////////////////////////////////////////////////////// EXTRACT_POPUP_LABEL_CONDITION if(KVSP_curCharUnicode == ';')KVSP_skipChar; - QString szItemName = "dummySeparator"; // <------- FIXME! + TQString szItemName = "dummySeparator"; // <------- FIXME! pPopup->addLabel(new KviKvsTreeNodeSpecialCommandDefpopupLabelSeparator(pLabelBegin,szCondition,szItemName)); } else if(szLabelLow == "label") @@ -1697,7 +1697,7 @@ KviKvsTreeNodeSpecialCommandDefpopupLabelPopup * KviKvsParser::parseSpecialComma EXTRACT_POPUP_LABEL_PARAMETERS EXTRACT_POPUP_LABEL_CONDITION - QString * pText = pParameters->first(); + TQString * pText = pParameters->first(); if(!pText) { error(pLabelBegin,__tr2qs("Unexpected empty field in label parameters. See /help defpopup for the syntax")); @@ -1705,10 +1705,10 @@ KviKvsTreeNodeSpecialCommandDefpopupLabelPopup * KviKvsParser::parseSpecialComma delete pPopup; return 0; } - QString * pIcon = pParameters->next(); + TQString * pIcon = pParameters->next(); if(KVSP_curCharUnicode == ';')KVSP_skipChar; - QString * pItemName = pParameters->next(); - pPopup->addLabel(new KviKvsTreeNodeSpecialCommandDefpopupLabelLabel(pLabelBegin,szCondition,*pText,pIcon ? *pIcon : QString::null,pItemName ? *pItemName : QString::null)); + TQString * pItemName = pParameters->next(); + pPopup->addLabel(new KviKvsTreeNodeSpecialCommandDefpopupLabelLabel(pLabelBegin,szCondition,*pText,pIcon ? *pIcon : TQString(),pItemName ? *pItemName : TQString())); delete pParameters; } else if(szLabelLow == "popup") { @@ -1716,7 +1716,7 @@ KviKvsTreeNodeSpecialCommandDefpopupLabelPopup * KviKvsParser::parseSpecialComma EXTRACT_POPUP_LABEL_PARAMETERS EXTRACT_POPUP_LABEL_CONDITION - QString * pText = pParameters->first(); + TQString * pText = pParameters->first(); if(!pText) { error(pLabelBegin,__tr2qs("Unexpected empty field in extpopup parameters. See /help defpopup for the syntax")); @@ -1724,8 +1724,8 @@ KviKvsTreeNodeSpecialCommandDefpopupLabelPopup * KviKvsParser::parseSpecialComma delete pPopup; return 0; } - QString * pIcon = pParameters->next(); - QString * pItemName = pParameters->next(); + TQString * pIcon = pParameters->next(); + TQString * pItemName = pParameters->next(); KviKvsTreeNodeSpecialCommandDefpopupLabelPopup * pSubPopup = parseSpecialCommandDefpopupLabelPopup(); if(!pSubPopup) @@ -1737,7 +1737,7 @@ KviKvsTreeNodeSpecialCommandDefpopupLabelPopup * KviKvsParser::parseSpecialComma pSubPopup->setCondition(szCondition); pSubPopup->setText(*pText); - pSubPopup->setItemName(pItemName ? *pItemName : QString::null); + pSubPopup->setItemName(pItemName ? *pItemName : TQString()); if(pIcon)pSubPopup->setIcon(*pIcon); pPopup->addLabel(pSubPopup); delete pParameters; @@ -1747,7 +1747,7 @@ KviKvsTreeNodeSpecialCommandDefpopupLabelPopup * KviKvsParser::parseSpecialComma EXTRACT_POPUP_LABEL_PARAMETERS EXTRACT_POPUP_LABEL_CONDITION - QString * pText = pParameters->first(); + TQString * pText = pParameters->first(); if(!pText) { error(pLabelBegin,__tr2qs("Unexpected empty field in extpopup parameters. See /help defpopup for the syntax")); @@ -1755,10 +1755,10 @@ KviKvsTreeNodeSpecialCommandDefpopupLabelPopup * KviKvsParser::parseSpecialComma delete pPopup; return 0; } - QString * pIcon = pParameters->next(); - QString * pItemName = pParameters->next(); + TQString * pIcon = pParameters->next(); + TQString * pItemName = pParameters->next(); - const QChar * pBegin = KVSP_curCharPointer; + const TQChar * pBegin = KVSP_curCharPointer; KviKvsTreeNodeInstruction * pInstruction = parseInstruction(); if(pInstruction) { @@ -1779,14 +1779,14 @@ KviKvsTreeNodeSpecialCommandDefpopupLabelPopup * KviKvsParser::parseSpecialComma int iLen = KVSP_curCharPointer - pBegin; if(iLen > 0) { - QString szInstruction(pBegin,KVSP_curCharPointer - pBegin); + TQString szInstruction(pBegin,KVSP_curCharPointer - pBegin); KviCommandFormatter::bufferFromBlock(szInstruction); - pPopup->addLabel(new KviKvsTreeNodeSpecialCommandDefpopupLabelItem(pLabelBegin,szCondition,*pText,pIcon ? *pIcon : QString::null,szInstruction,pItemName ? *pItemName : QString::null)); + pPopup->addLabel(new KviKvsTreeNodeSpecialCommandDefpopupLabelItem(pLabelBegin,szCondition,*pText,pIcon ? *pIcon : TQString(),szInstruction,pItemName ? *pItemName : TQString())); } else { // zero length instruction, but still add the item - QString szInstruction = ""; + TQString szInstruction = ""; KviCommandFormatter::bufferFromBlock(szInstruction); - pPopup->addLabel(new KviKvsTreeNodeSpecialCommandDefpopupLabelItem(pLabelBegin,szCondition,*pText,pIcon ? *pIcon : QString::null,szInstruction,pItemName ? *pItemName : QString::null)); + pPopup->addLabel(new KviKvsTreeNodeSpecialCommandDefpopupLabelItem(pLabelBegin,szCondition,*pText,pIcon ? *pIcon : TQString(),szInstruction,pItemName ? *pItemName : TQString())); } delete pParameters; } else if(szLabelLow == "extpopup") @@ -1795,7 +1795,7 @@ KviKvsTreeNodeSpecialCommandDefpopupLabelPopup * KviKvsParser::parseSpecialComma EXTRACT_POPUP_LABEL_PARAMETERS EXTRACT_POPUP_LABEL_CONDITION - QString * pText = pParameters->first(); + TQString * pText = pParameters->first(); if(!pText) { error(pLabelBegin,__tr2qs("Unexpected empty field in extpopup parameters. See /help defpopup for the syntax")); @@ -1803,7 +1803,7 @@ KviKvsTreeNodeSpecialCommandDefpopupLabelPopup * KviKvsParser::parseSpecialComma delete pPopup; return 0; } - QString * pName = pParameters->next(); + TQString * pName = pParameters->next(); if(!pName) { error(pLabelBegin,__tr2qs("Unexpected empty field in extpopup parameters. See /help defpopup for the syntax")); @@ -1811,10 +1811,10 @@ KviKvsTreeNodeSpecialCommandDefpopupLabelPopup * KviKvsParser::parseSpecialComma delete pPopup; return 0; } - QString * pIcon = pParameters->next(); - QString * pItemName = pParameters->next(); + TQString * pIcon = pParameters->next(); + TQString * pItemName = pParameters->next(); if(KVSP_curCharUnicode == ';')KVSP_skipChar; - pPopup->addLabel(new KviKvsTreeNodeSpecialCommandDefpopupLabelExtpopup(pLabelBegin,szCondition,*pText,pIcon ? *pIcon : QString::null,*pName,pItemName ? *pItemName : QString::null)); + pPopup->addLabel(new KviKvsTreeNodeSpecialCommandDefpopupLabelExtpopup(pLabelBegin,szCondition,*pText,pIcon ? *pIcon : TQString(),*pName,pItemName ? *pItemName : TQString())); delete pParameters; } else { ///////////////////////////////////////////////////////////////////////////////////////////////// @@ -1928,12 +1928,12 @@ KviKvsTreeNodeCommand * KviKvsParser::parseSpecialCommandDefpopup() if(KVSP_curCharUnicode != '(') { - warning(KVSP_curCharPointer,__tr2qs("The 'defpopup' command needs an expression enclosed in parenthesis")); + warning(KVSP_curCharPointer,__tr2qs("The 'defpopup' command needs an expression enclosed in tqparenthesis")); errorBadChar(KVSP_curCharPointer,'(',"defpopup"); return 0; } - const QChar * pBegin = KVSP_curCharPointer; + const TQChar * pBegin = KVSP_curCharPointer; KVSP_skipChar; @@ -1968,15 +1968,15 @@ KviKvsTreeNodeCommand * KviKvsParser::parseSpecialCommandHelp() skipSpaces(); - const QChar * pBegin = KVSP_curCharPointer; + const TQChar * pBegin = KVSP_curCharPointer; while(!KVSP_curCharIsEndOfCommand)KVSP_skipChar; if(!KVSP_curCharIsEndOfBuffer)KVSP_skipChar; - QString tmp(pBegin,KVSP_curCharPointer - pBegin); + TQString tmp(pBegin,KVSP_curCharPointer - pBegin); tmp.stripWhiteSpace(); - const QString szHelpName("help"); + const TQString szHelpName("help"); KviKvsCoreSimpleCommandExecRoutine * r = KviKvsKernel::instance()->findCoreSimpleCommandExecRoutine(szHelpName); if(!r)return 0; // <--- internal error! diff --git a/src/kvirc/kvs/kvi_kvs_popupmanager.cpp b/src/kvirc/kvs/kvi_kvs_popupmanager.cpp index f0d06740..d8c3dffb 100644 --- a/src/kvirc/kvs/kvi_kvs_popupmanager.cpp +++ b/src/kvirc/kvs/kvi_kvs_popupmanager.cpp @@ -33,7 +33,7 @@ KviKvsPopupManager * KviKvsPopupManager::m_pInstance = 0; KviKvsPopupManager::KviKvsPopupManager() { m_pInstance = this; - m_pPopupDict = new KviPointerHashTable(17,false); + m_pPopupDict = new KviPointerHashTable(17,false); m_pPopupDict->setAutoDelete(true); } @@ -62,7 +62,7 @@ void KviKvsPopupManager::done() delete KviKvsPopupManager::instance(); } -KviKvsPopupMenu * KviKvsPopupManager::get(const QString &szPopupName) +KviKvsPopupMenu * KviKvsPopupManager::get(const TQString &szPopupName) { KviKvsPopupMenu * m = lookup(szPopupName); if(!m) @@ -73,23 +73,23 @@ KviKvsPopupMenu * KviKvsPopupManager::get(const QString &szPopupName) return m; } -void KviKvsPopupManager::load(const QString &szFileName) +void KviKvsPopupManager::load(const TQString &szFileName) { m_pPopupDict->clear(); KviConfig cfg(szFileName,KviConfig::Read); KviConfigIterator it(*(cfg.dict())); - KviPointerList l; + KviPointerList l; l.setAutoDelete(true); while(it.current()) { - l.append(new QString(it.currentKey())); + l.append(new TQString(it.currentKey())); ++it; } - for(QString * s = l.first();s;s = l.next()) + for(TQString * s = l.first();s;s = l.next()) { cfg.setGroup(*s); KviKvsPopupMenu * m = new KviKvsPopupMenu(*s); @@ -99,12 +99,12 @@ void KviKvsPopupManager::load(const QString &szFileName) } } -void KviKvsPopupManager::save(const QString &szFileName) +void KviKvsPopupManager::save(const TQString &szFileName) { KviConfig cfg(szFileName,KviConfig::Write); cfg.clear(); - KviPointerHashTableIterator it(*m_pPopupDict); + KviPointerHashTableIterator it(*m_pPopupDict); while(it.current()) { cfg.setGroup(it.current()->popupName()); diff --git a/src/kvirc/kvs/kvi_kvs_popupmanager.h b/src/kvirc/kvs/kvi_kvs_popupmanager.h index c9135b22..2b7a52ec 100644 --- a/src/kvirc/kvs/kvi_kvs_popupmanager.h +++ b/src/kvirc/kvs/kvi_kvs_popupmanager.h @@ -33,7 +33,7 @@ protected: // can only be created by init/done KviKvsPopupManager(); ~KviKvsPopupManager(); protected: - KviPointerHashTable * m_pPopupDict; + KviPointerHashTable * m_pPopupDict; static KviKvsPopupManager * m_pInstance; public: static KviKvsPopupManager * instance(){ return m_pInstance; }; @@ -41,16 +41,16 @@ public: static void done(); int popupCount(){ return m_pPopupDict->count(); }; - KviPointerHashTable * popupDict(){ return m_pPopupDict; }; + KviPointerHashTable * popupDict(){ return m_pPopupDict; }; - KviKvsPopupMenu * lookup(const QString &szPopupName){ return m_pPopupDict->find(szPopupName); }; - KviKvsPopupMenu * get(const QString &szPopupName); - void add(const QString &szPopupName,KviKvsPopupMenu * pPopup){ m_pPopupDict->replace(szPopupName,pPopup); }; - void remove(const QString &szPopupName){ m_pPopupDict->remove(szPopupName); }; + KviKvsPopupMenu * lookup(const TQString &szPopupName){ return m_pPopupDict->tqfind(szPopupName); }; + KviKvsPopupMenu * get(const TQString &szPopupName); + void add(const TQString &szPopupName,KviKvsPopupMenu * pPopup){ m_pPopupDict->tqreplace(szPopupName,pPopup); }; + void remove(const TQString &szPopupName){ m_pPopupDict->remove(szPopupName); }; void clear(){ m_pPopupDict->clear(); }; - void save(const QString & filename); - void load(const QString & filename); + void save(const TQString & filename); + void load(const TQString & filename); }; diff --git a/src/kvirc/kvs/kvi_kvs_popupmenu.cpp b/src/kvirc/kvs/kvi_kvs_popupmenu.cpp index 10a26988..5b592ade 100644 --- a/src/kvirc/kvs/kvi_kvs_popupmenu.cpp +++ b/src/kvirc/kvs/kvi_kvs_popupmenu.cpp @@ -45,7 +45,7 @@ // rootname.labelX : child labels -KviKvsPopupMenuItem::KviKvsPopupMenuItem(Type t,const QString &szItemName,const QString &szCondition) +KviKvsPopupMenuItem::KviKvsPopupMenuItem(Type t,const TQString &szItemName,const TQString &szCondition) { m_szItemName = szItemName; m_eType = t; @@ -54,13 +54,13 @@ KviKvsPopupMenuItem::KviKvsPopupMenuItem(Type t,const QString &szItemName,const // true by default m_pKvsCondition = 0; } else { - QString szName = "condition callback for "; + TQString szName = "condition callback for "; szName += szItemName; m_pKvsCondition = new KviKvsScript(szName,szCondition,KviKvsScript::Expression); } } -KviKvsPopupMenuItem::KviKvsPopupMenuItem(Type t,const QString &szItemName,const KviKvsScript * pCondition) +KviKvsPopupMenuItem::KviKvsPopupMenuItem(Type t,const TQString &szItemName,const KviKvsScript * pCondition) { m_szItemName = szItemName; m_eType = t; @@ -119,12 +119,12 @@ bool KviKvsPopupMenuItem::evaluateCondition(KviKvsPopupMenuTopLevelData * pData) /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -KviKvsPopupMenuItemSeparator::KviKvsPopupMenuItemSeparator(const QString &szItemName,const QString &szCondition) +KviKvsPopupMenuItemSeparator::KviKvsPopupMenuItemSeparator(const TQString &szItemName,const TQString &szCondition) : KviKvsPopupMenuItem(KviKvsPopupMenuItem::Separator,szItemName,szCondition) { } -KviKvsPopupMenuItemSeparator::KviKvsPopupMenuItemSeparator(const QString &szItemName,const KviKvsScript * pCondition) +KviKvsPopupMenuItemSeparator::KviKvsPopupMenuItemSeparator(const TQString &szItemName,const KviKvsScript * pCondition) : KviKvsPopupMenuItem(KviKvsPopupMenuItem::Separator,szItemName,pCondition) { } @@ -148,10 +148,10 @@ KviKvsPopupMenuItem * KviKvsPopupMenuItemSeparator::clone() const ///////////////////////////////////////////////////////////////////////////////////////////////////////// -KviKvsPopupMenuItemWithTextAndIcon::KviKvsPopupMenuItemWithTextAndIcon(KviKvsPopupMenuItem::Type t,const QString &szItemName,const QString &szText,const QString &szIcon,const QString &szCondition) +KviKvsPopupMenuItemWithTextAndIcon::KviKvsPopupMenuItemWithTextAndIcon(KviKvsPopupMenuItem::Type t,const TQString &szItemName,const TQString &szText,const TQString &szIcon,const TQString &szCondition) : KviKvsPopupMenuItem(t,szItemName,szCondition) { - QString szName = "text callback for "; + TQString szName = "text callback for "; szName += szItemName; m_pKvsText = new KviKvsScript(szName,szText,KviKvsScript::Parameter); @@ -165,7 +165,7 @@ KviKvsPopupMenuItemWithTextAndIcon::KviKvsPopupMenuItemWithTextAndIcon(KviKvsPop } } -KviKvsPopupMenuItemWithTextAndIcon::KviKvsPopupMenuItemWithTextAndIcon(KviKvsPopupMenuItem::Type t,const QString &szItemName,const KviKvsScript * pText,const KviKvsScript * pIcon,const KviKvsScript * pCondition) +KviKvsPopupMenuItemWithTextAndIcon::KviKvsPopupMenuItemWithTextAndIcon(KviKvsPopupMenuItem::Type t,const TQString &szItemName,const KviKvsScript * pText,const KviKvsScript * pIcon,const KviKvsScript * pCondition) : KviKvsPopupMenuItem(t,szItemName,pCondition) { if(pText) @@ -173,7 +173,7 @@ KviKvsPopupMenuItemWithTextAndIcon::KviKvsPopupMenuItemWithTextAndIcon(KviKvsPop m_pKvsText = new KviKvsScript(*pText); } else { // hum.. this should never happen anyway - QString szName = "text callback for "; + TQString szName = "text callback for "; szName += szItemName; m_pKvsText = new KviKvsScript(szName,"",KviKvsScript::Parameter); } @@ -204,7 +204,7 @@ KviKvsScript * KviKvsPopupMenuItemWithTextAndIcon::kvsText() return m_pKvsText; } -QPixmap * KviKvsPopupMenuItemWithTextAndIcon::evaluateIcon(KviKvsPopupMenuTopLevelData * pData) +TQPixmap * KviKvsPopupMenuItemWithTextAndIcon::evaluateIcon(KviKvsPopupMenuTopLevelData * pData) { if(KVI_OPTION_BOOL(KviOption_boolDisablePopupIcons))return 0; if(!m_pKvsIcon)return 0; @@ -221,17 +221,17 @@ QPixmap * KviKvsPopupMenuItemWithTextAndIcon::evaluateIcon(KviKvsPopupMenuTopLev return 0; } - QString szRet; + TQString szRet; vRet.asString(szRet); - QPixmap * p = g_pIconManager->getImage(szRet); + TQPixmap * p = g_pIconManager->getImage(szRet); if(!p)pData->window()->output(KVI_OUT_PARSERWARNING,__tr2qs("Can't find the icon \"%Q\": ignoring"),&szRet); return p; } -QString KviKvsPopupMenuItemWithTextAndIcon::evaluateText(KviKvsPopupMenuTopLevelData *pData) +TQString KviKvsPopupMenuItemWithTextAndIcon::evaluateText(KviKvsPopupMenuTopLevelData *pData) { - QString szRet; + TQString szRet; if(!m_pKvsText)return szRet; KviKvsVariant vRet; if(!m_pKvsText->run(pData->window(), @@ -252,7 +252,7 @@ QString KviKvsPopupMenuItemWithTextAndIcon::evaluateText(KviKvsPopupMenuTopLevel KviKvsPopupMenuItemLabelHelper::KviKvsPopupMenuItemLabelHelper(KviKvsPopupMenuItemLabel * pItem) -: QObject() +: TQObject() { m_pItem = pItem; } @@ -266,14 +266,14 @@ void KviKvsPopupMenuItemLabelHelper::labelDestroyed() m_pItem->labelDestroyed(); } -KviKvsPopupMenuItemLabel::KviKvsPopupMenuItemLabel(const QString &szItemName,const QString &szText,const QString &szIcon,const QString &szCondition) +KviKvsPopupMenuItemLabel::KviKvsPopupMenuItemLabel(const TQString &szItemName,const TQString &szText,const TQString &szIcon,const TQString &szCondition) : KviKvsPopupMenuItemWithTextAndIcon(KviKvsPopupMenuItem::Label,szItemName,szText,szIcon,szCondition) { m_pLabel = 0; m_pSignalRelay = new KviKvsPopupMenuItemLabelHelper(this); } -KviKvsPopupMenuItemLabel::KviKvsPopupMenuItemLabel(const QString &szItemName,const KviKvsScript * pText,const KviKvsScript * pIcon,const KviKvsScript * pCondition) +KviKvsPopupMenuItemLabel::KviKvsPopupMenuItemLabel(const TQString &szItemName,const KviKvsScript * pText,const KviKvsScript * pIcon,const KviKvsScript * pCondition) : KviKvsPopupMenuItemWithTextAndIcon(KviKvsPopupMenuItem::Label,szItemName,pText,pIcon,pCondition) { m_pLabel = 0; @@ -285,7 +285,7 @@ KviKvsPopupMenuItemLabel::~KviKvsPopupMenuItemLabel() { if(m_pLabel) { - QObject::disconnect(m_pLabel,SIGNAL(destroyed()),m_pSignalRelay,SLOT(labelDestroyed())); + TQObject::disconnect(m_pLabel,TQT_SIGNAL(destroyed()),m_pSignalRelay,TQT_SLOT(labelDestroyed())); delete m_pLabel; } delete m_pSignalRelay; @@ -306,7 +306,7 @@ void KviKvsPopupMenuItemLabel::clear() { if(m_pLabel) { - QObject::disconnect(m_pLabel,SIGNAL(destroyed()),m_pSignalRelay,SLOT(labelDestroyed())); + TQObject::disconnect(m_pLabel,TQT_SIGNAL(destroyed()),m_pSignalRelay,TQT_SLOT(labelDestroyed())); delete m_pLabel; m_pLabel = 0; } @@ -315,35 +315,35 @@ void KviKvsPopupMenuItemLabel::clear() void KviKvsPopupMenuItemLabel::fill(KviKvsPopupMenu * pMenu,KviKvsPopupMenuTopLevelData * pData,int iIdx) { if(!evaluateCondition(pData))return; - QString szText = evaluateText(pData); - QPixmap * pPix = evaluateIcon(pData); + TQString szText = evaluateText(pData); + TQPixmap * pPix = evaluateIcon(pData); if(m_pLabel) { - QObject::disconnect(m_pLabel,SIGNAL(destroyed()),m_pSignalRelay,SLOT(labelDestroyed())); + TQObject::disconnect(m_pLabel,TQT_SIGNAL(destroyed()),m_pSignalRelay,TQT_SLOT(labelDestroyed())); delete m_pLabel; } - m_pLabel = new QLabel(szText,pMenu); - QObject::connect(m_pLabel,SIGNAL(destroyed()),m_pSignalRelay,SLOT(labelDestroyed())); + m_pLabel = new TQLabel(szText,pMenu); + TQObject::connect(m_pLabel,TQT_SIGNAL(destroyed()),m_pSignalRelay,TQT_SLOT(labelDestroyed())); #ifndef COMPILE_USE_QT4 - // FIXME: QT4 Seems to not allow widgets as QMenu items + // FIXME: QT4 Seems to not allow widgets as TQMenu items pMenu->insertItem(m_pLabel); #endif - m_pLabel->setFrameStyle(QFrame::StyledPanel | QFrame::Raised); + m_pLabel->setFrameStyle(TQFrame::StyledPanel | TQFrame::Raised); if(pPix)m_pLabel->setPixmap(*pPix); } //////////////////////////////////////////////////////////////////////////////////////////////////////////// -KviKvsPopupMenuItemItem::KviKvsPopupMenuItemItem(const QString &szItemName,const QString &szCode,const QString &szText,const QString &szIcon,const QString &szCondition) +KviKvsPopupMenuItemItem::KviKvsPopupMenuItemItem(const TQString &szItemName,const TQString &szCode,const TQString &szText,const TQString &szIcon,const TQString &szCondition) : KviKvsPopupMenuItemWithTextAndIcon(KviKvsPopupMenuItem::Item,szItemName,szText,szIcon,szCondition) { - QString szName = "click callback for "; + TQString szName = "click callback for "; szName += szItemName; m_pKvsCode = new KviKvsScript(szName,szCode); } -KviKvsPopupMenuItemItem::KviKvsPopupMenuItemItem(const QString &szItemName,const KviKvsScript * pCode,const KviKvsScript * pText,const KviKvsScript * pIcon,const KviKvsScript * pCondition) +KviKvsPopupMenuItemItem::KviKvsPopupMenuItemItem(const TQString &szItemName,const KviKvsScript * pCode,const KviKvsScript * pText,const KviKvsScript * pIcon,const KviKvsScript * pCondition) : KviKvsPopupMenuItemWithTextAndIcon(KviKvsPopupMenuItem::Item,szItemName,pText,pIcon,pCondition) { m_pKvsCode = new KviKvsScript(*pCode); @@ -358,8 +358,8 @@ KviKvsPopupMenuItemItem::~KviKvsPopupMenuItemItem() void KviKvsPopupMenuItemItem::fill(KviKvsPopupMenu * pMenu,KviKvsPopupMenuTopLevelData * pData,int iIdx) { if(!evaluateCondition(pData))return; - QString szText = evaluateText(pData); - QPixmap * pPix = evaluateIcon(pData); + TQString szText = evaluateText(pData); + TQPixmap * pPix = evaluateIcon(pData); int id; if(pPix)id = pMenu->insertItem(*pPix,szText); else id = pMenu->insertItem(szText); @@ -379,13 +379,13 @@ KviKvsScript * KviKvsPopupMenuItemItem::kvsCode() ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -KviKvsPopupMenuItemMenu::KviKvsPopupMenuItemMenu(const QString &szItemName,KviKvsPopupMenu * pMenu,const QString &szText,const QString &szIcon,const QString &szCondition) +KviKvsPopupMenuItemMenu::KviKvsPopupMenuItemMenu(const TQString &szItemName,KviKvsPopupMenu * pMenu,const TQString &szText,const TQString &szIcon,const TQString &szCondition) : KviKvsPopupMenuItemWithTextAndIcon(KviKvsPopupMenuItem::Menu,szItemName,szText,szIcon,szCondition) { m_pMenu = pMenu; } -KviKvsPopupMenuItemMenu::KviKvsPopupMenuItemMenu(const QString &szItemName,KviKvsPopupMenu * pMenu,const KviKvsScript * pText,const KviKvsScript * pIcon,const KviKvsScript * pCondition) +KviKvsPopupMenuItemMenu::KviKvsPopupMenuItemMenu(const TQString &szItemName,KviKvsPopupMenu * pMenu,const KviKvsScript * pText,const KviKvsScript * pIcon,const KviKvsScript * pCondition) : KviKvsPopupMenuItemWithTextAndIcon(KviKvsPopupMenuItem::Menu,szItemName,pText,pIcon,pCondition) { m_pMenu = pMenu; @@ -408,8 +408,8 @@ KviKvsPopupMenuItem * KviKvsPopupMenuItemMenu::clone() const void KviKvsPopupMenuItemMenu::fill(KviKvsPopupMenu * pMenu,KviKvsPopupMenuTopLevelData * pData,int iIdx) { if(!evaluateCondition(pData))return; - QString szText = evaluateText(pData); - QPixmap * pPix = evaluateIcon(pData); + TQString szText = evaluateText(pData); + TQPixmap * pPix = evaluateIcon(pData); int id; m_pMenu->setParentPopup(pMenu); if(pPix)id = pMenu->insertItem(*pPix,szText,m_pMenu); @@ -427,7 +427,7 @@ void KviKvsPopupMenuItemMenu::clear() //////////////////////////////////////////////////////////////////////////////////////////////////////////// -KviKvsPopupMenuItemExtMenu::KviKvsPopupMenuItemExtMenu(const QString &szItemName,const QString &szMenuName,const QString &szText,const QString &szIcon,const QString &szCondition) +KviKvsPopupMenuItemExtMenu::KviKvsPopupMenuItemExtMenu(const TQString &szItemName,const TQString &szMenuName,const TQString &szText,const TQString &szIcon,const TQString &szCondition) : KviKvsPopupMenuItemWithTextAndIcon(KviKvsPopupMenuItem::ExtMenu,szItemName,szText,szIcon,szCondition) { m_szMenuName = szMenuName; @@ -439,7 +439,7 @@ KviKvsPopupMenuItemExtMenu::KviKvsPopupMenuItemExtMenu(const QString &szItemName m_pMenu = 0; } -KviKvsPopupMenuItemExtMenu::KviKvsPopupMenuItemExtMenu(const QString &szItemName,const QString &szMenuName,const KviKvsScript * pText,const KviKvsScript * pIcon,const KviKvsScript * pCondition) +KviKvsPopupMenuItemExtMenu::KviKvsPopupMenuItemExtMenu(const TQString &szItemName,const TQString &szMenuName,const KviKvsScript * pText,const KviKvsScript * pIcon,const KviKvsScript * pCondition) : KviKvsPopupMenuItemWithTextAndIcon(KviKvsPopupMenuItem::ExtMenu,szItemName,pText,pIcon,pCondition) { m_szMenuName = szMenuName; @@ -475,8 +475,8 @@ KviKvsPopupMenuItem * KviKvsPopupMenuItemExtMenu::clone() const void KviKvsPopupMenuItemExtMenu::fill(KviKvsPopupMenu * pMenu,KviKvsPopupMenuTopLevelData * pData,int iIdx) { if(!evaluateCondition(pData))return; - QString szText = evaluateText(pData); - QPixmap * pPix = evaluateIcon(pData); + TQString szText = evaluateText(pData); + TQPixmap * pPix = evaluateIcon(pData); KviKvsPopupMenu * source = KviKvsPopupManager::instance()->lookup(m_szMenuName); if(source) @@ -486,8 +486,8 @@ void KviKvsPopupMenuItemExtMenu::fill(KviKvsPopupMenu * pMenu,KviKvsPopupMenuTop pData->window()->output(KVI_OUT_PARSERWARNING,__tr2qs("Recursive definition detected for popup '%Q': ignoring"),&(pMenu->popupName())); return; } - QString tmp; - KviQString::sprintf(tmp,"%Q.%Q",&(pMenu->popupName()),&m_szMenuName); + TQString tmp; + KviTQString::sprintf(tmp,"%Q.%Q",&(pMenu->popupName()),&m_szMenuName); if(m_pMenu)delete m_pMenu; m_pMenu = new KviKvsPopupMenu(tmp); m_pMenu->copyFrom(source); @@ -527,7 +527,7 @@ KviKvsPopupMenuTopLevelData::~KviKvsPopupMenuTopLevelData() -KviKvsPopupMenu::KviKvsPopupMenu(const QString &szName) +KviKvsPopupMenu::KviKvsPopupMenu(const TQString &szName) :KviTalPopupMenu(0,szName) { m_szName = szName; @@ -541,8 +541,8 @@ KviKvsPopupMenu::KviKvsPopupMenu(const QString &szName) m_pTopLevelData = 0; m_pTempTopLevelData = 0; m_bSetupDone = false; - connect(this,SIGNAL(activated(int)),this,SLOT(itemClicked(int))); - connect(this,SIGNAL(aboutToShow()),this,SLOT(setupMenuContents())); + connect(this,TQT_SIGNAL(activated(int)),this,TQT_SLOT(itemClicked(int))); + connect(this,TQT_SIGNAL(aboutToShow()),this,TQT_SLOT(setupMenuContents())); } @@ -578,37 +578,37 @@ void KviKvsPopupMenu::copyFrom(const KviKvsPopupMenu * src) } } -void KviKvsPopupMenu::addPrologue(const QString &szItemName,const QString &szCode) +void KviKvsPopupMenu::addPrologue(const TQString &szItemName,const TQString &szCode) { // FIXME: translate this or not ? - QString szName = szItemName; + TQString szName = szItemName; if(szName.isEmpty()) - KviQString::sprintf(szName,"prologue_%u_for_%Q",m_pPrologues->count(),&m_szName); + KviTQString::sprintf(szName,"prologue_%u_for_%Q",m_pPrologues->count(),&m_szName); m_pPrologues->append(new KviKvsScript(szName,szCode)); } -void KviKvsPopupMenu::addEpilogue(const QString &szItemName,const QString &szCode) +void KviKvsPopupMenu::addEpilogue(const TQString &szItemName,const TQString &szCode) { // FIXME: translate this or not ? - QString szName = szItemName; + TQString szName = szItemName; if(szName.isEmpty()) - KviQString::sprintf(szName,"epilogue_%u_for_%Q",m_pPrologues->count(),&m_szName); + KviTQString::sprintf(szName,"epilogue_%u_for_%Q",m_pPrologues->count(),&m_szName); m_pEpilogues->append(new KviKvsScript(szName,szCode)); } KviKvsPopupMenuTopLevelData * KviKvsPopupMenu::topLevelData() { - if(parentPopup())return parentPopup()->topLevelData(); + if(tqparentPopup())return tqparentPopup()->topLevelData(); return m_pTopLevelData; } -bool KviKvsPopupMenu::removeItemByName(const QString &szItemName,bool bRecursive) +bool KviKvsPopupMenu::removeItemByName(const TQString &szItemName,bool bRecursive) { KviKvsScript * se; for(se = m_pEpilogues->first();se;se = m_pEpilogues->next()) { - if(KviQString::equalCI(szItemName,se->name())) + if(KviTQString::equalCI(szItemName,se->name())) { m_pEpilogues->removeRef(se); return true; @@ -617,7 +617,7 @@ bool KviKvsPopupMenu::removeItemByName(const QString &szItemName,bool bRecursive for(se = m_pPrologues->first();se;se = m_pPrologues->next()) { - if(KviQString::equalCI(szItemName,se->name())) + if(KviTQString::equalCI(szItemName,se->name())) { m_pPrologues->removeRef(se); return true; @@ -626,7 +626,7 @@ bool KviKvsPopupMenu::removeItemByName(const QString &szItemName,bool bRecursive for(KviKvsPopupMenuItem * it = m_pItemList->first();it;it = m_pItemList->next()) { - if(KviQString::equalCI(szItemName,it->name())) + if(KviTQString::equalCI(szItemName,it->name())) { m_pItemList->removeRef(it); // bye :) return true; @@ -661,52 +661,52 @@ bool KviKvsPopupMenu::isLocked() KviKvsPopupMenu * KviKvsPopupMenu::topLevelPopup() { - if(parentPopup())return parentPopup(); + if(tqparentPopup())return tqparentPopup(); return this; } -KviKvsPopupMenu * KviKvsPopupMenu::addPopup(const QString &szItemName,const QString &szText,const QString &szIcon,const QString &szCondition) +KviKvsPopupMenu * KviKvsPopupMenu::addPopup(const TQString &szItemName,const TQString &szText,const TQString &szIcon,const TQString &szCondition) { - QString szName = szItemName; + TQString szName = szItemName; if(szName.isEmpty()) - KviQString::sprintf(szName,"%Q.subpopup%d",&m_szName,m_pItemList->count()); + KviTQString::sprintf(szName,"%Q.subpopup%d",&m_szName,m_pItemList->count()); KviKvsPopupMenu * pNew = new KviKvsPopupMenu(szName); pNew->setParentPopup(this); addItemInternal(new KviKvsPopupMenuItemMenu(szName,pNew,szText,szIcon,szCondition)); return pNew; } -void KviKvsPopupMenu::addSeparator(const QString &szItemName,const QString &szCondition) +void KviKvsPopupMenu::addSeparator(const TQString &szItemName,const TQString &szCondition) { - QString szName = szItemName; + TQString szName = szItemName; if(szName.isEmpty()) - KviQString::sprintf(szName,"%Q.separator%d",&m_szName,m_pItemList->count()); + KviTQString::sprintf(szName,"%Q.separator%d",&m_szName,m_pItemList->count()); addItemInternal(new KviKvsPopupMenuItemSeparator(szName,szCondition)); } -void KviKvsPopupMenu::addLabel(const QString &szItemName,const QString &szText,const QString &szIcon,const QString &szCondition) +void KviKvsPopupMenu::addLabel(const TQString &szItemName,const TQString &szText,const TQString &szIcon,const TQString &szCondition) { - QString szName = szItemName; + TQString szName = szItemName; if(szName.isEmpty()) - KviQString::sprintf(szName,"%Q.label%d",&m_szName,m_pItemList->count()); + KviTQString::sprintf(szName,"%Q.label%d",&m_szName,m_pItemList->count()); addItemInternal(new KviKvsPopupMenuItemLabel(szName,szText,szIcon,szCondition)); } -void KviKvsPopupMenu::addItem(const QString &szItemName,const QString &szCode,const QString &szText,const QString &szIcon,const QString &szCondition) +void KviKvsPopupMenu::addItem(const TQString &szItemName,const TQString &szCode,const TQString &szText,const TQString &szIcon,const TQString &szCondition) { - QString szName = szItemName; + TQString szName = szItemName; if(szName.isEmpty()) - KviQString::sprintf(szName,"%Q.item%d",&m_szName,m_pItemList->count()); + KviTQString::sprintf(szName,"%Q.item%d",&m_szName,m_pItemList->count()); addItemInternal(new KviKvsPopupMenuItemItem(szName,szCode,szText,szIcon,szCondition)); } -void KviKvsPopupMenu::addExtPopup(const QString &szItemName,const QString &szPopupName,const QString szText,const QString &szIcon,const QString &szCondition) +void KviKvsPopupMenu::addExtPopup(const TQString &szItemName,const TQString &szPopupName,const TQString szText,const TQString &szIcon,const TQString &szCondition) { - QString szName = szItemName; + TQString szName = szItemName; if(szName.isEmpty()) - KviQString::sprintf(szName,"%Q.%Q",&m_szName,&szName); + KviTQString::sprintf(szName,"%Q.%Q",&m_szName,&szName); addItemInternal(new KviKvsPopupMenuItemExtMenu(szName,szPopupName,szText,szIcon,szCondition)); } @@ -717,7 +717,7 @@ void KviKvsPopupMenu::addItemInternal(KviKvsPopupMenuItem * it) m_pItemList->append(it); } -void KviKvsPopupMenu::doPopup(const QPoint & pnt,KviWindow * wnd,KviKvsVariantList * pParams,bool bTestMode) +void KviKvsPopupMenu::doPopup(const TQPoint & pnt,KviWindow * wnd,KviKvsVariantList * pParams,bool bTestMode) { // This might be a compat problem later :((((( // it is also an ugly trick @@ -782,7 +782,7 @@ void KviKvsPopupMenu::lock(bool bLock) void KviKvsPopupMenu::setupMenuContents() { // This might be a compat problem later :(((( - if(parentPopup() == 0) + if(tqparentPopup() == 0) { if(m_pTempTopLevelData == 0) { @@ -806,7 +806,7 @@ void KviKvsPopupMenu::setupMenuContents() m_bSetupDone = true; - // HACK...this is to remove the separator inserted by Qt when popup() is called and the popup is empty + // HACK...this is to remove the separator inserted by TQt when popup() is called and the popup is empty clear(); KviKvsPopupMenuTopLevelData * d = topLevelData(); @@ -901,21 +901,21 @@ void KviKvsPopupMenu::itemClicked(int itemId) } else debug("oops....clicked something that is not an item at position %d",param); // FIXME: #warning "Maybe tell that the window has changed" } else debug("oops....no menu item at position %d",param); - // UGLY Qt 3.0.0.... we can't clear menu contents here :( -//#if QT_VERSION < 300 + // UGLY TQt 3.0.0.... we can't clear menu contents here :( +//#if [[[TQT_VERSION IS DEPRECATED]]] < 300 // topLevelPopup()->clearMenuContents(); //#endif } -void KviKvsPopupMenu::load(const QString &prefix,KviConfig * cfg) +void KviKvsPopupMenu::load(const TQString &prefix,KviConfig * cfg) { doClear(); int cnt; int idx; - QString tmp = prefix; + TQString tmp = prefix; tmp.append("_PrologueCount"); cnt = cfg->readIntEntry(tmp,0); @@ -924,114 +924,114 @@ void KviKvsPopupMenu::load(const QString &prefix,KviConfig * cfg) { for(idx = 0;idx < cnt;idx++) { - KviQString::sprintf(tmp,"%Q_Prologue%d",&(prefix),idx); - QString pr = cfg->readQStringEntry(tmp,""); - KviQString::sprintf(tmp,"%Q_PrologueId%d",&(prefix),idx); - QString itemName = cfg->readQStringEntry(tmp,""); + KviTQString::sprintf(tmp,"%TQ_Prologue%d",&(prefix),idx); + TQString pr = cfg->readTQStringEntry(tmp,""); + KviTQString::sprintf(tmp,"%TQ_PrologueId%d",&(prefix),idx); + TQString itemName = cfg->readTQStringEntry(tmp,""); if(!pr.isEmpty())addPrologue(itemName,pr); } } else { // Might be old version! - KviQString::sprintf(tmp,"%Q_Prologue",&(prefix)); - QString pr = cfg->readQStringEntry(tmp,""); - if(!pr.isEmpty())addPrologue(QString::null,pr); + KviTQString::sprintf(tmp,"%TQ_Prologue",&(prefix)); + TQString pr = cfg->readTQStringEntry(tmp,""); + if(!pr.isEmpty())addPrologue(TQString(),pr); } - KviQString::sprintf(tmp,"%Q_EpilogueCount",&prefix); + KviTQString::sprintf(tmp,"%TQ_EpilogueCount",&prefix); cnt = cfg->readIntEntry(tmp,0); if(cnt > 0) { for(idx = 0;idx < cnt;idx++) { - KviQString::sprintf(tmp,"%Q_Epilogue%d",&prefix,idx); - QString ep = cfg->readQStringEntry(tmp,""); - KviQString::sprintf(tmp,"%Q_PrologueId%d",&(prefix),idx); - QString itemName = cfg->readQStringEntry(tmp,""); + KviTQString::sprintf(tmp,"%TQ_Epilogue%d",&prefix,idx); + TQString ep = cfg->readTQStringEntry(tmp,""); + KviTQString::sprintf(tmp,"%TQ_PrologueId%d",&(prefix),idx); + TQString itemName = cfg->readTQStringEntry(tmp,""); if(!ep.isEmpty())addEpilogue(itemName,ep); } } else { // Might be old version! - KviQString::sprintf(tmp,"%Q_Epilogue",&prefix); - QString ep = cfg->readQStringEntry(tmp,""); - if(!ep.isEmpty())addEpilogue(QString::null,ep); + KviTQString::sprintf(tmp,"%TQ_Epilogue",&prefix); + TQString ep = cfg->readTQStringEntry(tmp,""); + if(!ep.isEmpty())addEpilogue(TQString(),ep); } - KviQString::sprintf(tmp,"%Q_Count",&prefix); + KviTQString::sprintf(tmp,"%TQ_Count",&prefix); cnt = cfg->readIntEntry(tmp,0); for(idx = 0;idx < cnt;idx++) { - QString pre; - KviQString::sprintf(pre,"%Q_%d",&prefix,idx); + TQString pre; + KviTQString::sprintf(pre,"%TQ_%d",&prefix,idx); - KviQString::sprintf(tmp,"%Q_Id",&pre); - QString itemName = cfg->readQStringEntry(tmp,QString::null); - KviQString::sprintf(tmp,"%Q_Type",&pre); + KviTQString::sprintf(tmp,"%TQ_Id",&pre); + TQString itemName = cfg->readTQStringEntry(tmp,TQString()); + KviTQString::sprintf(tmp,"%TQ_Type",&pre); int type = cfg->readIntEntry(tmp,3); switch(type) { case 0: // separator { - QString expr; - KviQString::sprintf(tmp,"%Q_Expr",&pre); - expr = cfg->readQStringEntry(tmp,""); + TQString expr; + KviTQString::sprintf(tmp,"%TQ_Expr",&pre); + expr = cfg->readTQStringEntry(tmp,""); addSeparator(itemName,expr); } break; case 1: // item { - QString text,icon,code,expr; - KviQString::sprintf(tmp,"%Q_Text",&pre); - text = cfg->readQStringEntry(tmp,"Unnamed"); - KviQString::sprintf(tmp,"%Q_Icon",&pre); - icon = cfg->readQStringEntry(tmp,""); - KviQString::sprintf(tmp,"%Q_Code",&pre); - code = cfg->readQStringEntry(tmp,""); - KviQString::sprintf(tmp,"%Q_Expr",&pre); - expr = cfg->readQStringEntry(tmp,""); + TQString text,icon,code,expr; + KviTQString::sprintf(tmp,"%TQ_Text",&pre); + text = cfg->readTQStringEntry(tmp,"Unnamed"); + KviTQString::sprintf(tmp,"%TQ_Icon",&pre); + icon = cfg->readTQStringEntry(tmp,""); + KviTQString::sprintf(tmp,"%TQ_Code",&pre); + code = cfg->readTQStringEntry(tmp,""); + KviTQString::sprintf(tmp,"%TQ_Expr",&pre); + expr = cfg->readTQStringEntry(tmp,""); addItem(itemName,code,text,icon,expr); } break; case 2: // menu { - QString text,icon,expr; - KviQString::sprintf(tmp,"%Q_Text",&pre); - text = cfg->readQStringEntry(tmp,"Unnamed"); - KviQString::sprintf(tmp,"%Q_Icon",&pre); - icon = cfg->readQStringEntry(tmp,""); - KviQString::sprintf(tmp,"%Q_Expr",&pre); - expr = cfg->readQStringEntry(tmp,""); + TQString text,icon,expr; + KviTQString::sprintf(tmp,"%TQ_Text",&pre); + text = cfg->readTQStringEntry(tmp,"Unnamed"); + KviTQString::sprintf(tmp,"%TQ_Icon",&pre); + icon = cfg->readTQStringEntry(tmp,""); + KviTQString::sprintf(tmp,"%TQ_Expr",&pre); + expr = cfg->readTQStringEntry(tmp,""); KviKvsPopupMenu * pop = addPopup(itemName,text,icon,expr); pop->load(pre,cfg); } break; case 3: // label { - QString text,icon,expr; - KviQString::sprintf(tmp,"%Q_Text",&pre); - text = cfg->readQStringEntry(tmp,"Unnamed"); - KviQString::sprintf(tmp,"%Q_Icon",&pre); - icon = cfg->readQStringEntry(tmp,""); - KviQString::sprintf(tmp,"%Q_Expr",&pre); - expr = cfg->readQStringEntry(tmp,""); + TQString text,icon,expr; + KviTQString::sprintf(tmp,"%TQ_Text",&pre); + text = cfg->readTQStringEntry(tmp,"Unnamed"); + KviTQString::sprintf(tmp,"%TQ_Icon",&pre); + icon = cfg->readTQStringEntry(tmp,""); + KviTQString::sprintf(tmp,"%TQ_Expr",&pre); + expr = cfg->readTQStringEntry(tmp,""); addLabel(itemName,text,icon,expr); } break; case 4: // extmenu { - QString text,icon,code,expr; - KviQString::sprintf(tmp,"%Q_Text",&pre); - text = cfg->readQStringEntry(tmp,"Unnamed"); - KviQString::sprintf(tmp,"%Q_Icon",&pre); - icon = cfg->readQStringEntry(tmp,""); - KviQString::sprintf(tmp,"%Q_ExtName",&pre); - code = cfg->readQStringEntry(tmp,""); - KviQString::sprintf(tmp,"%Q_Expr",&pre); - expr = cfg->readQStringEntry(tmp,""); + TQString text,icon,code,expr; + KviTQString::sprintf(tmp,"%TQ_Text",&pre); + text = cfg->readTQStringEntry(tmp,"Unnamed"); + KviTQString::sprintf(tmp,"%TQ_Icon",&pre); + icon = cfg->readTQStringEntry(tmp,""); + KviTQString::sprintf(tmp,"%TQ_ExtName",&pre); + code = cfg->readTQStringEntry(tmp,""); + KviTQString::sprintf(tmp,"%TQ_Expr",&pre); + expr = cfg->readTQStringEntry(tmp,""); addExtPopup(itemName,code,text,icon,expr); } break; @@ -1044,49 +1044,49 @@ void KviKvsPopupMenu::load(const QString &prefix,KviConfig * cfg) // FIXME: #warning "NOBODY EDITS THE POPUPS IN THE CONFIG!...A binary config would be faster and work better for sure here" -void KviKvsPopupMenu::save(const QString & prefix,KviConfig * cfg) +void KviKvsPopupMenu::save(const TQString & prefix,KviConfig * cfg) { int idx; KviKvsScript * s; - QString tmp; + TQString tmp; - KviQString::sprintf(tmp,"%Q_PrologueCount",&prefix); + KviTQString::sprintf(tmp,"%TQ_PrologueCount",&prefix); cfg->writeEntry(tmp,m_pPrologues->count()); idx = 0; for(s = m_pPrologues->first();s;s = m_pPrologues->next()) { - KviQString::sprintf(tmp,"%Q_Prologue%d",&prefix,idx); + KviTQString::sprintf(tmp,"%TQ_Prologue%d",&prefix,idx); cfg->writeEntry(tmp,s->code()); - KviQString::sprintf(tmp,"%Q_PrologueId%d",&prefix,idx); + KviTQString::sprintf(tmp,"%TQ_PrologueId%d",&prefix,idx); cfg->writeEntry(tmp,s->name()); idx++; } - KviQString::sprintf(tmp,"%Q_EpilogueCount",&prefix); + KviTQString::sprintf(tmp,"%TQ_EpilogueCount",&prefix); cfg->writeEntry(tmp,m_pEpilogues->count()); idx = 0; for(s = m_pEpilogues->first();s;s = m_pEpilogues->next()) { - KviQString::sprintf(tmp,"%Q_Epilogue%d",&prefix,idx); + KviTQString::sprintf(tmp,"%TQ_Epilogue%d",&prefix,idx); cfg->writeEntry(tmp,s->code()); - KviQString::sprintf(tmp,"%Q_EpilogueId%d",&prefix,idx); + KviTQString::sprintf(tmp,"%TQ_EpilogueId%d",&prefix,idx); cfg->writeEntry(tmp,s->name()); idx++; } - KviQString::sprintf(tmp,"%Q_Count",&prefix); + KviTQString::sprintf(tmp,"%TQ_Count",&prefix); cfg->writeEntry(tmp,m_pItemList->count()); idx = 0; for(KviKvsPopupMenuItem * it = m_pItemList->first();it;it = m_pItemList->next()) { - QString pre; - KviQString::sprintf(pre,"%Q_%d",&prefix,idx); - KviQString::sprintf(tmp,"%Q_Type",&pre); + TQString pre; + KviTQString::sprintf(pre,"%TQ_%d",&prefix,idx); + KviTQString::sprintf(tmp,"%TQ_Type",&pre); int typeCode = 0; switch(it->type()) { @@ -1099,34 +1099,34 @@ void KviKvsPopupMenu::save(const QString & prefix,KviConfig * cfg) cfg->writeEntry(tmp,typeCode); - KviQString::sprintf(tmp,"%Q_Id",&pre); + KviTQString::sprintf(tmp,"%TQ_Id",&pre); cfg->writeEntry(tmp,it->name()); s = it->kvsCondition(); if(s) { - KviQString::sprintf(tmp,"%Q_Expr",&pre); + KviTQString::sprintf(tmp,"%TQ_Expr",&pre); cfg->writeEntry(tmp,s->code()); } s = it->kvsIcon(); if(s) { - KviQString::sprintf(tmp,"%Q_Icon",&pre); + KviTQString::sprintf(tmp,"%TQ_Icon",&pre); cfg->writeEntry(tmp,s->code()); } s = it->kvsText(); if(s) { - KviQString::sprintf(tmp,"%Q_Text",&pre); + KviTQString::sprintf(tmp,"%TQ_Text",&pre); cfg->writeEntry(tmp,s->code()); } s = it->kvsCode(); if(s) { - KviQString::sprintf(tmp,"%Q_Code",&pre); + KviTQString::sprintf(tmp,"%TQ_Code",&pre); cfg->writeEntry(tmp,s->code()); } @@ -1135,7 +1135,7 @@ void KviKvsPopupMenu::save(const QString & prefix,KviConfig * cfg) ((KviKvsPopupMenuItemMenu *)it)->menu()->save(pre,cfg); } else if(it->isExtMenu()) { - KviQString::sprintf(tmp,"%Q_ExtName",&pre); + KviTQString::sprintf(tmp,"%TQ_ExtName",&pre); cfg->writeEntry(tmp,((KviKvsPopupMenuItemExtMenu *)it)->extName()); } @@ -1143,10 +1143,10 @@ void KviKvsPopupMenu::save(const QString & prefix,KviConfig * cfg) } } -void KviKvsPopupMenu::generateDefPopupCore(QString &buffer) +void KviKvsPopupMenu::generateDefPopupCore(TQString &buffer) { - QString tmp; + TQString tmp; buffer = ""; @@ -1167,9 +1167,9 @@ void KviKvsPopupMenu::generateDefPopupCore(QString &buffer) switch(it->type()) { case KviKvsPopupMenuItem::Item: - if(it->kvsIcon())KviQString::appendFormatted(buffer,"item(%Q,%Q)",&(it->kvsText()->code()),&(it->kvsIcon()->code())); - else KviQString::appendFormatted(buffer,"item(%Q)",&(it->kvsText()->code())); - if(it->kvsCondition())KviQString::appendFormatted(buffer," (%Q)",&(it->kvsCondition()->code())); + if(it->kvsIcon())KviTQString::appendFormatted(buffer,"item(%Q,%Q)",&(it->kvsText()->code()),&(it->kvsIcon()->code())); + else KviTQString::appendFormatted(buffer,"item(%Q)",&(it->kvsText()->code())); + if(it->kvsCondition())KviTQString::appendFormatted(buffer," (%Q)",&(it->kvsCondition()->code())); buffer.append("\n"); tmp = it->kvsCode()->code(); KviCommandFormatter::blockFromBuffer(tmp); @@ -1177,9 +1177,9 @@ void KviKvsPopupMenu::generateDefPopupCore(QString &buffer) buffer.append("\n"); break; case KviKvsPopupMenuItem::Menu: - if(it->kvsIcon())KviQString::appendFormatted(buffer,"popup(%Q,%Q)",&(it->kvsText()->code()),&(it->kvsIcon()->code())); - else KviQString::appendFormatted(buffer,"popup(%Q)",&(it->kvsText()->code())); - if(it->kvsCondition())KviQString::appendFormatted(buffer," (%Q)",&(it->kvsCondition()->code())); + if(it->kvsIcon())KviTQString::appendFormatted(buffer,"popup(%Q,%Q)",&(it->kvsText()->code()),&(it->kvsIcon()->code())); + else KviTQString::appendFormatted(buffer,"popup(%Q)",&(it->kvsText()->code())); + if(it->kvsCondition())KviTQString::appendFormatted(buffer," (%Q)",&(it->kvsCondition()->code())); buffer.append("\n"); ((KviKvsPopupMenuItemMenu *)it)->menu()->generateDefPopupCore(tmp); KviCommandFormatter::blockFromBuffer(tmp); @@ -1187,19 +1187,19 @@ void KviKvsPopupMenu::generateDefPopupCore(QString &buffer) buffer.append("\n"); break; case KviKvsPopupMenuItem::Separator: - if(it->kvsCondition())KviQString::appendFormatted(buffer,"separator(%Q)\n\n",&(it->kvsCondition()->code())); + if(it->kvsCondition())KviTQString::appendFormatted(buffer,"separator(%Q)\n\n",&(it->kvsCondition()->code())); else buffer.append("separator\n\n"); break; case KviKvsPopupMenuItem::Label: - if(it->kvsIcon())KviQString::appendFormatted(buffer,"label(%Q,%Q)",&(it->kvsText()->code()),&(it->kvsIcon()->code())); - else KviQString::appendFormatted(buffer,"label(%Q)",&(it->kvsText()->code())); - if(it->kvsCondition())KviQString::appendFormatted(buffer," (%Q)",&(it->kvsCondition()->code())); + if(it->kvsIcon())KviTQString::appendFormatted(buffer,"label(%Q,%Q)",&(it->kvsText()->code()),&(it->kvsIcon()->code())); + else KviTQString::appendFormatted(buffer,"label(%Q)",&(it->kvsText()->code())); + if(it->kvsCondition())KviTQString::appendFormatted(buffer," (%Q)",&(it->kvsCondition()->code())); buffer.append("\n\n"); break; case KviKvsPopupMenuItem::ExtMenu: - if(it->kvsIcon())KviQString::appendFormatted(buffer,"extpopup(%Q,%Q,%Q)",&(it->kvsText()->code()),&(((KviKvsPopupMenuItemExtMenu *)it)->extName()),&(it->kvsIcon()->code())); - else KviQString::appendFormatted(buffer,"extpopup(%Q)",&(it->kvsText()->code())); - if(it->kvsCondition())KviQString::appendFormatted(buffer," (%Q)",&(it->kvsCondition()->code())); + if(it->kvsIcon())KviTQString::appendFormatted(buffer,"extpopup(%Q,%Q,%Q)",&(it->kvsText()->code()),&(((KviKvsPopupMenuItemExtMenu *)it)->extName()),&(it->kvsIcon()->code())); + else KviTQString::appendFormatted(buffer,"extpopup(%Q)",&(it->kvsText()->code())); + if(it->kvsCondition())KviTQString::appendFormatted(buffer," (%Q)",&(it->kvsCondition()->code())); buffer.append("\n\n"); break; } @@ -1217,10 +1217,10 @@ void KviKvsPopupMenu::generateDefPopupCore(QString &buffer) } -void KviKvsPopupMenu::generateDefPopup(QString &buffer) +void KviKvsPopupMenu::generateDefPopup(TQString &buffer) { - KviQString::sprintf(buffer,"defpopup(%s)\n",name()); - QString core; + KviTQString::sprintf(buffer,"defpopup(%s)\n",name()); + TQString core; generateDefPopupCore(core); KviCommandFormatter::blockFromBuffer(core); diff --git a/src/kvirc/kvs/kvi_kvs_popupmenu.h b/src/kvirc/kvs/kvi_kvs_popupmenu.h index e658495a..11ca6481 100644 --- a/src/kvirc/kvs/kvi_kvs_popupmenu.h +++ b/src/kvirc/kvs/kvi_kvs_popupmenu.h @@ -33,8 +33,8 @@ #include "kvi_kvs_runtimecontext.h" #include "kvi_tal_popupmenu.h" -#include -#include +#include +#include class KviKvsPopupMenu; @@ -69,12 +69,12 @@ class KVIRC_API KviKvsPopupMenuItem public: enum Type { Item , Menu , Label , Separator , ExtMenu }; protected: - KviKvsPopupMenuItem(Type t,const QString &szItemName,const QString &szCondition); - KviKvsPopupMenuItem(Type t,const QString &szItemName,const KviKvsScript * pCondition); + KviKvsPopupMenuItem(Type t,const TQString &szItemName,const TQString &szCondition); + KviKvsPopupMenuItem(Type t,const TQString &szItemName,const KviKvsScript * pCondition); public: virtual ~KviKvsPopupMenuItem(); protected: - QString m_szItemName; + TQString m_szItemName; Type m_eType; KviKvsScript * m_pKvsCondition; public: @@ -83,7 +83,7 @@ public: KviKvsPopupMenuItem::Type type(){ return m_eType; }; - const QString & name(){ return m_szItemName; }; + const TQString & name(){ return m_szItemName; }; bool isItem(){ return m_eType == Item; }; bool isSeparator(){ return m_eType == Separator; }; @@ -107,8 +107,8 @@ class KVIRC_API KviKvsPopupMenuItemSeparator : public KviKvsPopupMenuItem { friend class KviKvsPopupMenu; protected: - KviKvsPopupMenuItemSeparator(const QString &szItemName,const QString &szCondition); - KviKvsPopupMenuItemSeparator(const QString &szItemName,const KviKvsScript * pCondition); + KviKvsPopupMenuItemSeparator(const TQString &szItemName,const TQString &szCondition); + KviKvsPopupMenuItemSeparator(const TQString &szItemName,const KviKvsScript * pCondition); public: virtual ~KviKvsPopupMenuItemSeparator(); public: @@ -120,8 +120,8 @@ public: class KVIRC_API KviKvsPopupMenuItemWithTextAndIcon : public KviKvsPopupMenuItem { protected: - KviKvsPopupMenuItemWithTextAndIcon(KviKvsPopupMenuItem::Type t,const QString &szItemName,const QString &szText,const QString &szIcon,const QString &szCondition); - KviKvsPopupMenuItemWithTextAndIcon(KviKvsPopupMenuItem::Type t,const QString &szItemName,const KviKvsScript * pText,const KviKvsScript * pIcon,const KviKvsScript * pCondition); + KviKvsPopupMenuItemWithTextAndIcon(KviKvsPopupMenuItem::Type t,const TQString &szItemName,const TQString &szText,const TQString &szIcon,const TQString &szCondition); + KviKvsPopupMenuItemWithTextAndIcon(KviKvsPopupMenuItem::Type t,const TQString &szItemName,const KviKvsScript * pText,const KviKvsScript * pIcon,const KviKvsScript * pCondition); public: virtual ~KviKvsPopupMenuItemWithTextAndIcon(); protected: @@ -131,17 +131,18 @@ public: virtual KviKvsScript * kvsIcon(); virtual KviKvsScript * kvsText(); // this just returns a string , eventually empty - QString evaluateText(KviKvsPopupMenuTopLevelData * pData); + TQString evaluateText(KviKvsPopupMenuTopLevelData * pData); // this just returns the icon , eventually - QPixmap * evaluateIcon(KviKvsPopupMenuTopLevelData * pData); + TQPixmap * evaluateIcon(KviKvsPopupMenuTopLevelData * pData); }; class KviKvsPopupMenuItemLabel; // this acts as signal relay -class KVIRC_API KviKvsPopupMenuItemLabelHelper : public QObject +class KVIRC_API KviKvsPopupMenuItemLabelHelper : public TQObject { Q_OBJECT + TQ_OBJECT friend class KviKvsPopupMenuItemLabel; protected: KviKvsPopupMenuItemLabelHelper(KviKvsPopupMenuItemLabel * pItem); @@ -157,12 +158,12 @@ class KVIRC_API KviKvsPopupMenuItemLabel : public KviKvsPopupMenuItemWithTextAnd friend class KviKvsPopupMenuItemLabelHelper; friend class KviKvsPopupMenu; protected: - KviKvsPopupMenuItemLabel(const QString &szItemName,const QString &szText,const QString &szIcon,const QString &szCondition); - KviKvsPopupMenuItemLabel(const QString &szItemName,const KviKvsScript * pText,const KviKvsScript * pIcon,const KviKvsScript * pCondition); + KviKvsPopupMenuItemLabel(const TQString &szItemName,const TQString &szText,const TQString &szIcon,const TQString &szCondition); + KviKvsPopupMenuItemLabel(const TQString &szItemName,const KviKvsScript * pText,const KviKvsScript * pIcon,const KviKvsScript * pCondition); public: virtual ~KviKvsPopupMenuItemLabel(); protected: - QLabel * m_pLabel; + TQLabel * m_pLabel; KviKvsPopupMenuItemLabelHelper * m_pSignalRelay; public: virtual void fill(KviKvsPopupMenu * pMenu,KviKvsPopupMenuTopLevelData * pData,int iIdx); @@ -177,8 +178,8 @@ class KVIRC_API KviKvsPopupMenuItemItem : public KviKvsPopupMenuItemWithTextAndI { friend class KviKvsPopupMenu; protected: - KviKvsPopupMenuItemItem(const QString &szItemName,const QString &szCode,const QString &szText,const QString &szIcon,const QString &szCondition); - KviKvsPopupMenuItemItem(const QString &szItemName,const KviKvsScript * pCode,const KviKvsScript * pText,const KviKvsScript * pIcon,const KviKvsScript * pCondition); + KviKvsPopupMenuItemItem(const TQString &szItemName,const TQString &szCode,const TQString &szText,const TQString &szIcon,const TQString &szCondition); + KviKvsPopupMenuItemItem(const TQString &szItemName,const KviKvsScript * pCode,const KviKvsScript * pText,const KviKvsScript * pIcon,const KviKvsScript * pCondition); public: virtual ~KviKvsPopupMenuItemItem(); protected: @@ -194,8 +195,8 @@ class KVIRC_API KviKvsPopupMenuItemMenu : public KviKvsPopupMenuItemWithTextAndI { friend class KviKvsPopupMenu; protected: - KviKvsPopupMenuItemMenu(const QString &szItemName,KviKvsPopupMenu * pMenu,const QString &szText,const QString &szIcon,const QString &szCondition); - KviKvsPopupMenuItemMenu(const QString &szItemName,KviKvsPopupMenu * pMenu,const KviKvsScript * pText,const KviKvsScript * pIcon,const KviKvsScript * pCondition); + KviKvsPopupMenuItemMenu(const TQString &szItemName,KviKvsPopupMenu * pMenu,const TQString &szText,const TQString &szIcon,const TQString &szCondition); + KviKvsPopupMenuItemMenu(const TQString &szItemName,KviKvsPopupMenu * pMenu,const KviKvsScript * pText,const KviKvsScript * pIcon,const KviKvsScript * pCondition); public: virtual ~KviKvsPopupMenuItemMenu(); protected: @@ -211,15 +212,15 @@ class KVIRC_API KviKvsPopupMenuItemExtMenu : public KviKvsPopupMenuItemWithTextA { friend class KviKvsPopupMenu; protected: - KviKvsPopupMenuItemExtMenu(const QString &szItemName,const QString &szMenuName,const QString &szText,const QString &szIcon,const QString &szCondition); - KviKvsPopupMenuItemExtMenu(const QString &szItemName,const QString &szMenuName,const KviKvsScript * pText,const KviKvsScript * pIcon,const KviKvsScript * pCondition); + KviKvsPopupMenuItemExtMenu(const TQString &szItemName,const TQString &szMenuName,const TQString &szText,const TQString &szIcon,const TQString &szCondition); + KviKvsPopupMenuItemExtMenu(const TQString &szItemName,const TQString &szMenuName,const KviKvsScript * pText,const KviKvsScript * pIcon,const KviKvsScript * pCondition); public: virtual ~KviKvsPopupMenuItemExtMenu(); protected: - QString m_szMenuName; + TQString m_szMenuName; KviKvsPopupMenu * m_pMenu; // owned! public: - const QString & extName(){ return m_szMenuName; }; + const TQString & extName(){ return m_szMenuName; }; virtual void fill(KviKvsPopupMenu * pMenu,KviKvsPopupMenuTopLevelData * pData,int iIdx); virtual void clear(); virtual KviKvsPopupMenuItem * clone() const; @@ -241,13 +242,14 @@ class KVIRC_API KviKvsPopupMenu : public KviTalPopupMenu friend class KviKvsPopupManager; friend class KviSinglePopupEditor; Q_OBJECT + TQ_OBJECT public: - KviKvsPopupMenu(const QString &szName); + KviKvsPopupMenu(const TQString &szName); ~KviKvsPopupMenu(); protected: KviPointerList * m_pItemList; private: - QString m_szName; + TQString m_szName; KviKvsPopupMenu * m_pParentPopup; KviPointerList * m_pPrologues; KviPointerList * m_pEpilogues; @@ -256,36 +258,36 @@ private: KviKvsPopupMenuTopLevelData * m_pTempTopLevelData; bool m_bSetupDone; public: - const QString & popupName(){ return m_szName; }; - void setPopupName(const QString &szName){ m_szName = szName; }; + const TQString & popupName(){ return m_szName; }; + void setPopupName(const TQString &szName){ m_szName = szName; }; void copyFrom(const KviKvsPopupMenu * src); KviKvsPopupMenuTopLevelData * topLevelData(); KviKvsPopupMenu * topLevelPopup(); bool isLocked(); void lock(bool bLock); - KviKvsPopupMenu * addPopup(const QString &szItemName,const QString &szText,const QString &szIcon,const QString &szCondition); - void addSeparator(const QString &szItemName,const QString &szCondition); - void addLabel(const QString &szItemName,const QString &szText,const QString &szIcon,const QString &szCondition); - void addItem(const QString &szItemName,const QString &szCode,const QString &szText,const QString &szIcon,const QString &szCondition); - void addExtPopup(const QString &szItemName,const QString &szPopupName,const QString szText,const QString &szIcon,const QString &szCondition); - void doPopup(const QPoint & pnt,KviWindow * wnd,KviKvsVariantList * pParams,bool bTestMode = false); + KviKvsPopupMenu * addPopup(const TQString &szItemName,const TQString &szText,const TQString &szIcon,const TQString &szCondition); + void addSeparator(const TQString &szItemName,const TQString &szCondition); + void addLabel(const TQString &szItemName,const TQString &szText,const TQString &szIcon,const TQString &szCondition); + void addItem(const TQString &szItemName,const TQString &szCode,const TQString &szText,const TQString &szIcon,const TQString &szCondition); + void addExtPopup(const TQString &szItemName,const TQString &szPopupName,const TQString szText,const TQString &szIcon,const TQString &szCondition); + void doPopup(const TQPoint & pnt,KviWindow * wnd,KviKvsVariantList * pParams,bool bTestMode = false); bool isEmpty(){ return m_pItemList->isEmpty() && m_pPrologues->isEmpty() && m_pEpilogues->isEmpty(); }; void doClear(); - void addPrologue(const QString &szItemName,const QString &szCode); - void addEpilogue(const QString &szItemName,const QString &szCode); - bool removeItemByName(const QString &szItemName,bool bRecursive); + void addPrologue(const TQString &szItemName,const TQString &szCode); + void addEpilogue(const TQString &szItemName,const TQString &szCode); + bool removeItemByName(const TQString &szItemName,bool bRecursive); KviPointerList * epilogues(){ return m_pEpilogues; }; KviPointerList * prologues(){ return m_pPrologues; }; - KviKvsPopupMenu * parentPopup(){ return m_pParentPopup; }; - void generateDefPopup(QString &buffer); + KviKvsPopupMenu * tqparentPopup(){ return m_pParentPopup; }; + void generateDefPopup(TQString &buffer); void setParentPopup(KviKvsPopupMenu * par){ m_pParentPopup = par; }; - void generateDefPopupCore(QString &buffer); + void generateDefPopupCore(TQString &buffer); protected: void addItemInternal(KviKvsPopupMenuItem * it); void executePrologues(KviKvsPopupMenuTopLevelData * pData); void executeEpilogues(KviKvsPopupMenuTopLevelData * pData); - void load(const QString &prefix,KviConfig * cfg); - void save(const QString &prefix,KviConfig * cfg); + void load(const TQString &prefix,KviConfig * cfg); + void save(const TQString &prefix,KviConfig * cfg); private slots: void setupMenuContents(); protected: diff --git a/src/kvirc/kvs/kvi_kvs_processmanager.cpp b/src/kvirc/kvs/kvi_kvs_processmanager.cpp index 2c397c55..a7aeacbb 100644 --- a/src/kvirc/kvs/kvi_kvs_processmanager.cpp +++ b/src/kvirc/kvs/kvi_kvs_processmanager.cpp @@ -32,7 +32,7 @@ #include "kvi_app.h" #include "kvi_console.h" #include "kvi_kvs_script.h" -//#include +//#include KviKvsProcessAsyncOperation::KviKvsProcessAsyncOperation(KviKvsProcessDescriptorData * d) : KviKvsAsyncOperation(d->pWnd) @@ -51,7 +51,7 @@ KviKvsProcessAsyncOperation::~KviKvsProcessAsyncOperation() if(m_pRunTimeTimer)delete m_pRunTimeTimer; if(m_pProcess) { - QObject::disconnect(m_pProcess,0,this,0); + TQObject::disconnect(m_pProcess,0,this,0); m_pProcess->kill(); delete m_pProcess; } @@ -63,25 +63,25 @@ KviKvsProcessAsyncOperation::~KviKvsProcessAsyncOperation() bool KviKvsProcessAsyncOperation::start() { - QStringList args; + TQStringList args; if(m_pData->iFlags & KVI_KVS_PROCESSDESCRIPTOR_NOSHELL) { - args = QStringList::split(" ",m_pData->szCommandline); + args = TQStringList::split(" ",m_pData->szCommandline); } else { - QString szShell = m_pData->szShell; + TQString szShell = m_pData->szShell; if(szShell.isEmpty()) { #ifdef COMPILE_ON_WINDOWS - // [01:26:00] btw, what is qt_winunicode ? - // [01:26:12] Qt export specific to win32 + // [01:26:00] btw, what is qt_wintqunicode ? + // [01:26:12] TQt export specific to win32 // [01:26:27] bool which indicates whether system is Unicode (NT) or not // [01:26:58] not sure if that's documented, but it is a public export // - // [02:50:21] if ( QApplication::winVersion() & Qt::WV_NT_based ) + // [02:50:21] if ( TQApplication::winVersion() & TQt::WV_NT_based ) // [02:50:41] I see another implementation using that, maybe it is the official way of detecting that :[ #ifdef COMPILE_USE_QT4 - szShell = !(QSysInfo::WindowsVersion & QSysInfo::WV_DOS_based) ? "cmd.exe /c" : "command.com /c"; + szShell = !(TQSysInfo::WindowsVersion & TQSysInfo::WV_DOS_based) ? "cmd.exe /c" : "command.com /c"; #else szShell = "command.com /c"; #endif @@ -91,7 +91,7 @@ bool KviKvsProcessAsyncOperation::start() szShell = "sh -c"; #endif } - args = QStringList::split(" ",szShell); + args = TQStringList::split(" ",szShell); args.append(m_pData->szCommandline); } @@ -100,19 +100,19 @@ bool KviKvsProcessAsyncOperation::start() if(m_pData->iFlags & KVI_KVS_PROCESSDESCRIPTOR_TRIGGERSTDOUT) { - connect(m_pProcess,SIGNAL(readyReadStdout()),this,SLOT(readStdout())); + connect(m_pProcess,TQT_SIGNAL(readyReadStdout()),this,TQT_SLOT(readStdout())); c |= KviProcess::Stdout; } if(m_pData->iFlags & KVI_KVS_PROCESSDESCRIPTOR_TRIGGERSTDERR) { - connect(m_pProcess,SIGNAL(readyReadStderr()),this,SLOT(readStderr())); + connect(m_pProcess,TQT_SIGNAL(readyReadStderr()),this,TQT_SLOT(readStderr())); c |= KviProcess::Stderr; } m_pProcess->setCommunication(c); - connect(m_pProcess,SIGNAL(processExited()),this,SLOT(processExited())); + connect(m_pProcess,TQT_SIGNAL(processExited()),this,TQT_SLOT(processExited())); if(!m_pProcess->start()) { @@ -121,7 +121,7 @@ bool KviKvsProcessAsyncOperation::start() if(m_pData->iFlags & KVI_KVS_PROCESSDESCRIPTOR_TRIGGERSTARTED) { - QString szPid; + TQString szPid; szPid.setNum((int)(m_pProcess->processIdentifier())); if(trigger(EventStarted,szPid)) { @@ -132,15 +132,15 @@ bool KviKvsProcessAsyncOperation::start() if(m_pData->iMaxRunTime > 0) { - m_pRunTimeTimer = new QTimer(this); - connect(m_pRunTimeTimer,SIGNAL(timeout()),this,SLOT(maxRunTimeExpired())); + m_pRunTimeTimer = new TQTimer(this); + connect(m_pRunTimeTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(maxRunTimeExpired())); m_pRunTimeTimer->start(m_pData->iMaxRunTime); } if(m_pData->iPingTimeout > 0) { - m_pPingTimer = new QTimer(this); - connect(m_pPingTimer,SIGNAL(timeout()),this,SLOT(ping())); + m_pPingTimer = new TQTimer(this); + connect(m_pPingTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(ping())); m_pPingTimer->start(m_pData->iPingTimeout); } @@ -149,7 +149,7 @@ bool KviKvsProcessAsyncOperation::start() void KviKvsProcessAsyncOperation::ping() { - if(trigger(EventPing,QString::null)) + if(trigger(EventPing,TQString())) { triggerSelfDelete(); } @@ -159,7 +159,7 @@ void KviKvsProcessAsyncOperation::triggerSelfDelete() { if(m_bDeletePending)return; m_bDeletePending = true; - QTimer::singleShot(m_pData->iMaxRunTime,this,SLOT(selfDelete())); + TQTimer::singleShot(m_pData->iMaxRunTime,this,TQT_SLOT(selfDelete())); } void KviKvsProcessAsyncOperation::selfDelete() @@ -173,7 +173,7 @@ void KviKvsProcessAsyncOperation::maxRunTimeExpired() triggerSelfDelete(); } -bool KviKvsProcessAsyncOperation::trigger(CallbackEvent e,const QString &szData) +bool KviKvsProcessAsyncOperation::trigger(CallbackEvent e,const TQString &szData) { if(m_bDeletePending)return false; @@ -194,19 +194,19 @@ bool KviKvsProcessAsyncOperation::trigger(CallbackEvent e,const QString &szData) switch(e) { case EventStdout: - params.append(new KviKvsVariant(QString("stdout"))); + params.append(new KviKvsVariant(TQString("stdout"))); break; case EventStderr: - params.append(new KviKvsVariant(QString("stderr"))); + params.append(new KviKvsVariant(TQString("stderr"))); break; case EventTerminated: - params.append(new KviKvsVariant(QString("terminated"))); + params.append(new KviKvsVariant(TQString("terminated"))); break; case EventStarted: - params.append(new KviKvsVariant(QString("started"))); + params.append(new KviKvsVariant(TQString("started"))); break; case EventPing: - params.append(new KviKvsVariant(QString("ping"))); + params.append(new KviKvsVariant(TQString("ping"))); break; default: debug("Ops... unknown trigger() CallbackEvent parameter in KviProcessDescriptor::trigger()"); @@ -228,7 +228,7 @@ bool KviKvsProcessAsyncOperation::trigger(CallbackEvent e,const QString &szData) if(!retVal.isNothing()) { - QString sz; + TQString sz; retVal.asString(sz); m_pProcess->writeToStdin(sz); } @@ -248,11 +248,11 @@ void KviKvsProcessAsyncOperation::readStdout() if(m_bDeletePending)return; if(m_pData->iFlags & KVI_KVS_PROCESSDESCRIPTOR_OUTPUTBYBLOCKS) { - QByteArray a = m_pProcess->readStdout(); + TQByteArray a = m_pProcess->readStdout(); if(a.size() > 0) - m_szStdoutBuffer += QString(a); + m_szStdoutBuffer += TQString(a); } else { - QString l = m_pProcess->readLineStdout(); + TQString l = m_pProcess->readLineStdout(); bool bBreak = false; while((!l.isNull()) && (!bBreak)) { @@ -275,11 +275,11 @@ void KviKvsProcessAsyncOperation::readStderr() if(m_bDeletePending)return; if(m_pData->iFlags & KVI_KVS_PROCESSDESCRIPTOR_OUTPUTBYBLOCKS) { - QByteArray a = m_pProcess->readStderr(); + TQByteArray a = m_pProcess->readStderr(); if(a.size() > 0) - m_szStderrBuffer += QString(a); + m_szStderrBuffer += TQString(a); } else { - QString l = m_pProcess->readLineStderr(); + TQString l = m_pProcess->readLineStderr(); bool bBreak = false; while((!l.isNull()) && (!bBreak)) { @@ -329,8 +329,8 @@ void KviKvsProcessAsyncOperation::processExited() if(m_pData->iFlags & KVI_KVS_PROCESSDESCRIPTOR_TRIGGERTERMINATED) { - QString szRetVal; - szRetVal.setNum(m_pProcess->exitStatus()); + TQString szRetVal; + szRetVal.setNum(m_pProcess->exitqStatus()); trigger(EventTerminated,szRetVal); } @@ -341,7 +341,7 @@ void KviKvsProcessAsyncOperation::processExited() /* KviKvsProcessManager::KviKvsProcessManager() -: QObject() +: TQObject() { } diff --git a/src/kvirc/kvs/kvi_kvs_processmanager.h b/src/kvirc/kvs/kvi_kvs_processmanager.h index 50e52ace..6fa343f3 100644 --- a/src/kvirc/kvs/kvi_kvs_processmanager.h +++ b/src/kvirc/kvs/kvi_kvs_processmanager.h @@ -40,7 +40,7 @@ #include "kvi_process.h" -#include +#include #define KVI_KVS_PROCESSDESCRIPTOR_TRIGGERSTDOUT 1 #define KVI_KVS_PROCESSDESCRIPTOR_TRIGGERSTDERR 2 @@ -57,8 +57,8 @@ class KviKvsVariant; typedef struct _KviKvsProcessDescriptorData { - QString szShell; - QString szCommandline; + TQString szShell; + TQString szCommandline; KviKvsScript * pCallback; KviKvsVariant * pMagic; KviWindow * pWnd; @@ -73,6 +73,7 @@ class KVIRC_API KviKvsProcessAsyncOperation : public KviKvsAsyncOperation { friend class KviKvsProcessManager; Q_OBJECT + TQ_OBJECT public: KviKvsProcessAsyncOperation(KviKvsProcessDescriptorData * d); ~KviKvsProcessAsyncOperation(); @@ -81,11 +82,11 @@ protected: private: KviProcess * m_pProcess; KviKvsExtendedRunTimeData * m_pExtendedRunTimeData; - QString m_szStdoutBuffer; - QString m_szStderrBuffer; + TQString m_szStdoutBuffer; + TQString m_szStderrBuffer; KviKvsProcessDescriptorData * m_pData; - QTimer * m_pPingTimer; - QTimer * m_pRunTimeTimer; + TQTimer * m_pPingTimer; + TQTimer * m_pRunTimeTimer; bool m_bDeletePending; public: bool start(); @@ -97,7 +98,7 @@ private slots: void processExited(); void selfDelete(); private: - bool trigger(CallbackEvent e,const QString &szData); + bool trigger(CallbackEvent e,const TQString &szData); void triggerSelfDelete(); }; diff --git a/src/kvirc/kvs/kvi_kvs_report.cpp b/src/kvirc/kvs/kvi_kvs_report.cpp index ea05ba39..99535918 100644 --- a/src/kvirc/kvs/kvi_kvs_report.cpp +++ b/src/kvirc/kvs/kvi_kvs_report.cpp @@ -33,7 +33,7 @@ #include "kvi_debugwindow.h" #include "kvi_options.h" -KviKvsReport::KviKvsReport(Type t,const QString &szContext,const QString &szMessage,const QString &szLocation,KviWindow * pWindow) +KviKvsReport::KviKvsReport(Type t,const TQString &szContext,const TQString &szMessage,const TQString &szLocation,KviWindow * pWindow) : m_eType(t), m_szContext(szContext), m_szMessage(szMessage), m_szLocation(szLocation), m_pWindow(pWindow) { #ifdef COMPILE_NEW_KVS @@ -50,17 +50,17 @@ KviKvsReport::~KviKvsReport() #endif } -void KviKvsReport::findLineAndCol(const QChar * pBegin,const QChar * pPoint,int &iLine,int &iCol) +void KviKvsReport::findLineAndCol(const TQChar * pBegin,const TQChar * pPoint,int &iLine,int &iCol) { #ifdef COMPILE_NEW_KVS iLine = 1; - const QChar * pBufferBegin = pBegin; + const TQChar * pBufferBegin = pBegin; - const QChar * pPrevLine = 0; - const QChar * pLineBegin = pBegin; + const TQChar * pPrevLine = 0; + const TQChar * pLineBegin = pBegin; - unsigned short us = pBegin->unicode(); + unsigned short us = pBegin->tqunicode(); while(us && (pBegin < pPoint)) { @@ -73,7 +73,7 @@ void KviKvsReport::findLineAndCol(const QChar * pBegin,const QChar * pPoint,int } else { pBegin++; } - us = pBegin->unicode(); + us = pBegin->tqunicode(); } iCol = (pBegin - pLineBegin) + 1; @@ -82,17 +82,17 @@ void KviKvsReport::findLineAndCol(const QChar * pBegin,const QChar * pPoint,int -void KviKvsReport::findLineColAndListing(const QChar * pBegin,const QChar * pPoint,int &iLine,int &iCol,KviPointerList * pListing) +void KviKvsReport::findLineColAndListing(const TQChar * pBegin,const TQChar * pPoint,int &iLine,int &iCol,KviPointerList * pListing) { #ifdef COMPILE_NEW_KVS iLine = 1; - const QChar * pBufferBegin = pBegin; + const TQChar * pBufferBegin = pBegin; - const QChar * pPrevLine = 0; - const QChar * pLineBegin = pBegin; + const TQChar * pPrevLine = 0; + const TQChar * pLineBegin = pBegin; - unsigned short us = pBegin->unicode(); + unsigned short us = pBegin->tqunicode(); while(us && (pBegin < pPoint)) { @@ -105,7 +105,7 @@ void KviKvsReport::findLineColAndListing(const QChar * pBegin,const QChar * pPoi } else { pBegin++; } - us = pBegin->unicode(); + us = pBegin->tqunicode(); } iCol = (pBegin - pLineBegin) + 1; @@ -116,34 +116,34 @@ void KviKvsReport::findLineColAndListing(const QChar * pBegin,const QChar * pPoi // there would be yet another line before if(pPrevLine > pBufferBegin) { - QString * pListingStrZ = new QString(); - KviQString::sprintf(*pListingStrZ,"%d ...",iLine - 2); + TQString * pListingStrZ = new TQString(); + KviTQString::sprintf(*pListingStrZ,"%d ...",iLine - 2); pListing->append(pListingStrZ); } - QString * pListingStr = new QString(); - KviQString::sprintf(*pListingStr,"%d ",iLine - 1); - *pListingStr += QString(pPrevLine,pLineBegin - pPrevLine); - pListingStr->replace("\n",""); + TQString * pListingStr = new TQString(); + KviTQString::sprintf(*pListingStr,"%d ",iLine - 1); + *pListingStr += TQString(pPrevLine,pLineBegin - pPrevLine); + pListingStr->tqreplace("\n",""); pListing->append(pListingStr); } // current line pBegin = pLineBegin; - us = pBegin->unicode(); + us = pBegin->tqunicode(); while(us && (us != '\n')) { pBegin++; - us = pBegin->unicode(); + us = pBegin->tqunicode(); } if(us)pBegin++; { - QString * pListingStr = new QString(); - KviQString::sprintf(*pListingStr,"%c%d ",KVI_TEXT_BOLD,iLine); - *pListingStr += QString(pLineBegin,pBegin - pLineBegin); - pListingStr->replace("\n",""); + TQString * pListingStr = new TQString(); + KviTQString::sprintf(*pListingStr,"%c%d ",KVI_TEXT_BOLD,iLine); + *pListingStr += TQString(pLineBegin,pBegin - pLineBegin); + pListingStr->tqreplace("\n",""); pListing->append(pListingStr); } @@ -152,27 +152,27 @@ void KviKvsReport::findLineColAndListing(const QChar * pBegin,const QChar * pPoi // next line pLineBegin = pBegin; - us = pBegin->unicode(); + us = pBegin->tqunicode(); while(us && (us != '\n')) { pBegin++; - us = pBegin->unicode(); + us = pBegin->tqunicode(); } if(us)pBegin++; { - QString * pListingStr = new QString(); - KviQString::sprintf(*pListingStr,"%d ",iLine + 1); - *pListingStr += QString(pLineBegin,pBegin - pLineBegin); - pListingStr->replace("\n",""); + TQString * pListingStr = new TQString(); + KviTQString::sprintf(*pListingStr,"%d ",iLine + 1); + *pListingStr += TQString(pLineBegin,pBegin - pLineBegin); + pListingStr->tqreplace("\n",""); pListing->append(pListingStr); } // there would be yet another line if(us) { - QString * pListingStr = new QString(); - KviQString::sprintf(*pListingStr,"%d ...",iLine + 2); + TQString * pListingStr = new TQString(); + KviTQString::sprintf(*pListingStr,"%d ...",iLine + 2); pListing->append(pListingStr); } } @@ -227,11 +227,11 @@ void KviKvsReport::report(KviKvsReport * r,KviWindow * pOutput) if(pOutput == KviDebugWindow::instance()) { - KviPointerList * l; + KviPointerList * l; if(l = r->codeListing()) { pOutput->outputNoFmt(out,__tr2qs("[KVS] Code listing:")); - for(QString * s = l->first();s;s = l->next()) + for(TQString * s = l->first();s;s = l->next()) pOutput->output(out,"[KVS] %Q",s); } @@ -244,7 +244,7 @@ void KviKvsReport::report(KviKvsReport * r,KviWindow * pOutput) if(l = r->callStack()) { pOutput->outputNoFmt(out,__tr2qs("[KVS] Call stack:")); - for(QString * s = l->first();s;s = l->next()) + for(TQString * s = l->first();s;s = l->next()) pOutput->output(out,"[KVS] %Q",s); } diff --git a/src/kvirc/kvs/kvi_kvs_report.h b/src/kvirc/kvs/kvi_kvs_report.h index 335733e0..c0581cf1 100644 --- a/src/kvirc/kvs/kvi_kvs_report.h +++ b/src/kvirc/kvs/kvi_kvs_report.h @@ -35,39 +35,39 @@ class KVIRC_API KviKvsReport public: enum Type { RunTimeError, RunTimeWarning, ParserError, ParserWarning }; public: - KviKvsReport(Type t,const QString &szContext,const QString &szMessage,const QString &szLocation,KviWindow * pWindow); + KviKvsReport(Type t,const TQString &szContext,const TQString &szMessage,const TQString &szLocation,KviWindow * pWindow); ~KviKvsReport(); protected: Type m_eType; // mandatory - QString m_szContext; // context name (script name, usually) - QString m_szMessage; // report message, always present - QString m_szLocation; // line and col description (may be some thing like "at end of input") + TQString m_szContext; // context name (script name, usually) + TQString m_szMessage; // report message, always present + TQString m_szLocation; // line and col description (may be some thing like "at end of input") KviWindow * m_pWindow; // the window that the script was attacched to // optional - KviPointerList * m_pCodeListing; // code listing, if present, it is owned - KviPointerList * m_pCallStack; // call stack, if present, it is owned + KviPointerList * m_pCodeListing; // code listing, if present, it is owned + KviPointerList * m_pCallStack; // call stack, if present, it is owned public: Type type() const { return m_eType; }; KviWindow * window(){ return m_pWindow; }; - const QString & context(){ return m_szContext; }; - const QString & message(){ return m_szMessage; }; - const QString & location(){ return m_szLocation; }; - KviPointerList * codeListing(){ return m_pCodeListing; }; - KviPointerList * callStack(){ return m_pCallStack; }; + const TQString & context(){ return m_szContext; }; + const TQString & message(){ return m_szMessage; }; + const TQString & location(){ return m_szLocation; }; + KviPointerList * codeListing(){ return m_pCodeListing; }; + KviPointerList * callStack(){ return m_pCallStack; }; - void setContext(const QString &szContext){ m_szContext = szContext; }; - void setMessage(const QString &szMessage){ m_szMessage = szMessage; }; - void setLocation(const QString &szLocation){ m_szLocation = szLocation; }; - void setCodeListing(KviPointerList * pListing){ m_pCodeListing = pListing; }; - void setCallStack(KviPointerList * pStack){ m_pCallStack = pStack; }; + void setContext(const TQString &szContext){ m_szContext = szContext; }; + void setMessage(const TQString &szMessage){ m_szMessage = szMessage; }; + void setLocation(const TQString &szLocation){ m_szLocation = szLocation; }; + void setCodeListing(KviPointerList * pListing){ m_pCodeListing = pListing; }; + void setCallStack(KviPointerList * pStack){ m_pCallStack = pStack; }; - static void findLineAndCol(const QChar * pBegin,const QChar * pPoint,int &iLine,int &iCol); - static void findLineColAndListing(const QChar * pBegin,const QChar * pPoint,int &iLine,int &iCol,KviPointerList * pListing); + static void findLineAndCol(const TQChar * pBegin,const TQChar * pPoint,int &iLine,int &iCol); + static void findLineColAndListing(const TQChar * pBegin,const TQChar * pPoint,int &iLine,int &iCol,KviPointerList * pListing); static void report(KviKvsReport * r,KviWindow * pOutput); }; diff --git a/src/kvirc/kvs/kvi_kvs_runtimecall.cpp b/src/kvirc/kvs/kvi_kvs_runtimecall.cpp index faae03ad..91cadc42 100644 --- a/src/kvirc/kvs/kvi_kvs_runtimecall.cpp +++ b/src/kvirc/kvs/kvi_kvs_runtimecall.cpp @@ -27,7 +27,7 @@ #include "kvi_kvs_runtimecall.h" -void KviKvsRunTimeCall::warning(const QString &szFmt,...) +void KviKvsRunTimeCall::warning(const TQString &szFmt,...) { kvi_va_list va; kvi_va_start_by_reference(va,szFmt); @@ -35,7 +35,7 @@ void KviKvsRunTimeCall::warning(const QString &szFmt,...) kvi_va_end(va); } -bool KviKvsRunTimeCall::error(const QString &szFmt,...) +bool KviKvsRunTimeCall::error(const TQString &szFmt,...) { kvi_va_list va; kvi_va_start_by_reference(va,szFmt); @@ -44,7 +44,7 @@ bool KviKvsRunTimeCall::error(const QString &szFmt,...) return false; } -bool KviKvsRunTimeCall::getParameterCode(unsigned int /*uParamIdx*/,QString & /*szParamBuffer*/) +bool KviKvsRunTimeCall::getParameterCode(unsigned int /*uParamIdx*/,TQString & /*szParamBuffer*/) { return false; } diff --git a/src/kvirc/kvs/kvi_kvs_runtimecall.h b/src/kvirc/kvs/kvi_kvs_runtimecall.h index 3ead6c3e..674c4e33 100644 --- a/src/kvirc/kvs/kvi_kvs_runtimecall.h +++ b/src/kvirc/kvs/kvi_kvs_runtimecall.h @@ -61,7 +61,7 @@ public: // where a special parsing routine can not be implemented // but parameter code is needed for later evaluation. (see /addon.register for example) // Returns false if the parameter code cannot be extracted and true otherwise. - virtual bool getParameterCode(unsigned int uParamIdx,QString &szParamBuffer); + virtual bool getParameterCode(unsigned int uParamIdx,TQString &szParamBuffer); // forwarders from the context // this MUST be called before any blocking call that might return to the main event loop @@ -75,8 +75,8 @@ public: bool leaveBlockingSection(){ return m_pContext->leaveBlockingSection(); }; // forwarders for context: they ease the porting - void warning(const QString &szFmt,...); - bool error(const QString &szFmt,...); // this ALWAYS returns false + void warning(const TQString &szFmt,...); + bool error(const TQString &szFmt,...); // this ALWAYS returns false }; #endif //!_KVI_KVS_RUNTIMECALL_H_ diff --git a/src/kvirc/kvs/kvi_kvs_runtimecontext.cpp b/src/kvirc/kvs/kvi_kvs_runtimecontext.cpp index 47916f9f..5442aa2a 100644 --- a/src/kvirc/kvs/kvi_kvs_runtimecontext.cpp +++ b/src/kvirc/kvs/kvi_kvs_runtimecontext.cpp @@ -87,58 +87,58 @@ KviKvsVariant * KviKvsRunTimeContext::swapReturnValuePointer(KviKvsVariant * pNe return pAux; } -void KviKvsRunTimeContext::report(bool bError,KviKvsTreeNode * pNode,const QString &szMsgFmt,kvi_va_list va) +void KviKvsRunTimeContext::report(bool bError,KviKvsTreeNode * pNode,const TQString &szMsgFmt,kvi_va_list va) { - QString szMsg; - KviQString::vsprintf(szMsg,szMsgFmt,va); + TQString szMsg; + KviTQString::vsprintf(szMsg,szMsgFmt,va); - KviPointerList * pCodeListing = 0; - KviPointerList * pCallStack = 0; - QString szLocation; + KviPointerList * pCodeListing = 0; + KviPointerList * pCallStack = 0; + TQString szLocation; if(pNode) { if(pNode->location() && m_pScript) { - pCodeListing = new KviPointerList; + pCodeListing = new KviPointerList; pCodeListing->setAutoDelete(true); int iLine,iCol; KviKvsReport::findLineColAndListing(m_pScript->buffer(),pNode->location(),iLine,iCol,pCodeListing); - KviQString::sprintf(szLocation,__tr2qs("line %d, near character %d"),iLine,iCol); + KviTQString::sprintf(szLocation,__tr2qs("line %d, near character %d"),iLine,iCol); } // create the call stack int iFrame = 0; - pCallStack = new KviPointerList; + pCallStack = new KviPointerList; pCallStack->setAutoDelete(true); while(pNode && (iFrame < 12)) { - QString * pString = new QString(); - QString szTmp; + TQString * pString = new TQString(); + TQString szTmp; pNode->contextDescription(szTmp); - KviQString::sprintf(*pString,"#%d %Q",iFrame,&szTmp); + KviTQString::sprintf(*pString,"#%d %Q",iFrame,&szTmp); if(pNode->location()) { int iLine,iCol; KviKvsReport::findLineAndCol(m_pScript->buffer(),pNode->location(),iLine,iCol); - QString tmpi; - KviQString::sprintf(tmpi," [line %d, near character %d]",iLine,iCol); + TQString tmpi; + KviTQString::sprintf(tmpi," [line %d, near character %d]",iLine,iCol); *pString += tmpi; } pCallStack->append(pString); iFrame++; - pNode = pNode->parent(); + pNode = pNode->tqparent(); } if(pNode) - pCallStack->append(new QString("#12 ...")); + pCallStack->append(new TQString("#12 ...")); } - QString szContext = m_pScript ? m_pScript->name() : "kvirc core code"; + TQString szContext = m_pScript ? m_pScript->name() : "kvirc core code"; KviKvsReport rep(bError ? KviKvsReport::RunTimeError : KviKvsReport::RunTimeWarning,szContext,szMsg,szLocation,m_pWindow); if(pCodeListing)rep.setCodeListing(pCodeListing); if(pCallStack)rep.setCallStack(pCallStack); @@ -146,7 +146,7 @@ void KviKvsRunTimeContext::report(bool bError,KviKvsTreeNode * pNode,const QStri KviKvsReport::report(&rep,m_pWindow); } -void KviKvsRunTimeContext::error(KviKvsTreeNode * pNode,const QString &szMsgFmt,...) +void KviKvsRunTimeContext::error(KviKvsTreeNode * pNode,const TQString &szMsgFmt,...) { m_bError = true; @@ -156,7 +156,7 @@ void KviKvsRunTimeContext::error(KviKvsTreeNode * pNode,const QString &szMsgFmt, kvi_va_end(va); } -void KviKvsRunTimeContext::warning(KviKvsTreeNode * pNode,const QString &szMsgFmt,...) +void KviKvsRunTimeContext::warning(KviKvsTreeNode * pNode,const TQString &szMsgFmt,...) { kvi_va_list va; kvi_va_start_by_reference(va,szMsgFmt); @@ -164,7 +164,7 @@ void KviKvsRunTimeContext::warning(KviKvsTreeNode * pNode,const QString &szMsgFm kvi_va_end(va); } -void KviKvsRunTimeContext::error(const QString &szMsgFmt,...) +void KviKvsRunTimeContext::error(const TQString &szMsgFmt,...) { m_bError = true; @@ -174,7 +174,7 @@ void KviKvsRunTimeContext::error(const QString &szMsgFmt,...) kvi_va_end(va); } -void KviKvsRunTimeContext::warning(const QString &szMsgFmt,...) +void KviKvsRunTimeContext::warning(const TQString &szMsgFmt,...) { kvi_va_list va; kvi_va_start_by_reference(va,szMsgFmt); diff --git a/src/kvirc/kvs/kvi_kvs_runtimecontext.h b/src/kvirc/kvs/kvi_kvs_runtimecontext.h index 68fa8ebd..50ee147e 100644 --- a/src/kvirc/kvs/kvi_kvs_runtimecontext.h +++ b/src/kvirc/kvs/kvi_kvs_runtimecontext.h @@ -48,7 +48,7 @@ protected: KviKvsHash * m_pExtendedScopeVariables; // extended scope vars, shallow, may be 0 KviKvsSwitchList * m_pAliasSwitchList; // switches for the aliases, shallow, may be 0 KviKvsObject * m_pThisObject; // the current object for object function calls - QString * m_pScriptFilePath; // the current script file path, shallow, may be 0 + TQString * m_pScriptFilePath; // the current script file path, shallow, may be 0 bool m_bAutoDelete; public: // all shallow data, all may be 0 @@ -80,7 +80,7 @@ public: m_pScriptFilePath(0), m_bAutoDelete(autoDelete) {}; - KviKvsExtendedRunTimeData(QString * pScriptFilePath,bool autoDelete=FALSE) + KviKvsExtendedRunTimeData(TQString * pScriptFilePath,bool autoDelete=FALSE) : m_pExtendedScopeVariables(0), m_pAliasSwitchList(0), m_pThisObject(0), @@ -92,7 +92,7 @@ public: KviKvsHash * extendedScopeVariables(){ return m_pExtendedScopeVariables; }; KviKvsSwitchList * aliasSwitchList(){ return m_pAliasSwitchList; }; KviKvsObject * thisObject(){ return m_pThisObject; }; - QString * scriptFilePath(){ return m_pScriptFilePath; }; + TQString * scriptFilePath(){ return m_pScriptFilePath; }; }; @@ -153,7 +153,7 @@ public: KviKvsVariantList * parameterList() { return m_pParameterList; }; - // parent script, may be 0! + // tqparent script, may be 0! KviKvsScript * script() { return m_pScript; }; @@ -172,7 +172,7 @@ public: { return m_pExtendedData ? m_pExtendedData->aliasSwitchList() : 0; }; KviKvsObject * thisObject() { return m_pExtendedData ? m_pExtendedData->thisObject() : 0; }; - QString * scriptFilePath() + TQString * scriptFilePath() { return m_pExtendedData ? m_pExtendedData->scriptFilePath() : 0; }; // this MUST be called before any blocking call that might return to the main event loop @@ -190,10 +190,10 @@ public: // was error(...) ever called ? bool error() const { return m_bError; }; - void error(KviKvsTreeNode * pNode,const QString &szMsgFmt,...); - void warning(KviKvsTreeNode * pNode,const QString &szMsgFmt,...); - void error(const QString &szMsgFmt,...); - void warning(const QString &szMsgFmt,...); + void error(KviKvsTreeNode * pNode,const TQString &szMsgFmt,...); + void warning(KviKvsTreeNode * pNode,const TQString &szMsgFmt,...); + void error(const TQString &szMsgFmt,...); + void warning(const TQString &szMsgFmt,...); void setDefaultReportLocation(KviKvsTreeNode * pNode); bool errorNoIrcContext(); bool warningNoIrcConnection(); @@ -249,7 +249,7 @@ public: { m_bError = false; }; protected: - void report(bool bError,KviKvsTreeNode * pNode,const QString &szMsgFmt,kvi_va_list va); + void report(bool bError,KviKvsTreeNode * pNode,const TQString &szMsgFmt,kvi_va_list va); }; diff --git a/src/kvirc/kvs/kvi_kvs_rwevaluationresult.cpp b/src/kvirc/kvs/kvi_kvs_rwevaluationresult.cpp index d51588f2..e40e4613 100644 --- a/src/kvirc/kvs/kvi_kvs_rwevaluationresult.cpp +++ b/src/kvirc/kvs/kvi_kvs_rwevaluationresult.cpp @@ -51,7 +51,7 @@ KviKvsArrayElement::~KviKvsArrayElement() if(m_pParent)delete m_pParent; } -KviKvsHashElement::KviKvsHashElement(KviKvsRWEvaluationResult *pParent,KviKvsVariant *pVariant,KviKvsHash *pHash,const QString &szKey) +KviKvsHashElement::KviKvsHashElement(KviKvsRWEvaluationResult *pParent,KviKvsVariant *pVariant,KviKvsHash *pHash,const TQString &szKey) : KviKvsRWEvaluationResult(pParent,pVariant) { m_pHash = pHash; diff --git a/src/kvirc/kvs/kvi_kvs_rwevaluationresult.h b/src/kvirc/kvs/kvi_kvs_rwevaluationresult.h index 9d91a1ba..8eabc15c 100644 --- a/src/kvirc/kvs/kvi_kvs_rwevaluationresult.h +++ b/src/kvirc/kvs/kvi_kvs_rwevaluationresult.h @@ -30,7 +30,7 @@ class KVIRC_API KviKvsRWEvaluationResult { public: - // this result becomes the owner of the parent result!!!! + // this result becomes the owner of the tqparent result!!!! KviKvsRWEvaluationResult(KviKvsRWEvaluationResult *pParent,KviKvsVariant *pVariant); // the destructor must do (in order): // check if variant is empty and if it is then remove it from the container (destroy it) @@ -60,11 +60,11 @@ class KviKvsHash; class KVIRC_API KviKvsHashElement : public KviKvsRWEvaluationResult { public: - KviKvsHashElement(KviKvsRWEvaluationResult *pParent,KviKvsVariant *pVariant,KviKvsHash *pHash,const QString &szKey); + KviKvsHashElement(KviKvsRWEvaluationResult *pParent,KviKvsVariant *pVariant,KviKvsHash *pHash,const TQString &szKey); ~KviKvsHashElement(); protected: KviKvsHash * m_pHash; - QString m_szKey; + TQString m_szKey; }; #endif //!_KVI_KVS_RWEVALUATIONRESULT_H_ diff --git a/src/kvirc/kvs/kvi_kvs_script.cpp b/src/kvirc/kvs/kvi_kvs_script.cpp index e7a2bd60..c9c4f4f4 100644 --- a/src/kvirc/kvs/kvi_kvs_script.cpp +++ b/src/kvirc/kvs/kvi_kvs_script.cpp @@ -44,9 +44,9 @@ class KVIRC_API KviKvsScriptData protected: unsigned int m_uRefs; // Reference count for this structure - QString m_szName; // script context name - QString m_szBuffer; // NEVER TOUCH THIS - const QChar * m_pBuffer; // this points to m_szBuffer: use it to extract string data + TQString m_szName; // script context name + TQString m_szBuffer; // NEVER TOUCH THIS + const TQChar * m_pBuffer; // this points to m_szBuffer: use it to extract string data KviKvsScript::ScriptType m_eType; // the type of the code in m_szBuffer @@ -56,7 +56,7 @@ protected: //#warning "THERE IS SOME MESS WITH m_szBuffer and m_pBuffer : with some script copying we may get errors with negative char indexes!" -KviKvsScript::KviKvsScript(const QString &szName,const QString &szBuffer,ScriptType eType) +KviKvsScript::KviKvsScript(const TQString &szName,const TQString &szBuffer,ScriptType eType) { m_pData = new KviKvsScriptData; m_pData->m_uRefs = 1; @@ -64,13 +64,13 @@ KviKvsScript::KviKvsScript(const QString &szName,const QString &szBuffer,ScriptT m_pData->m_eType = eType; m_pData->m_szBuffer = szBuffer; if(m_pData->m_szBuffer.isNull())m_pData->m_szBuffer = ""; - //KviQString::detach(*(m_pData->m_pszBuffer)); - m_pData->m_pBuffer = KviQString::nullTerminatedArray(m_pData->m_szBuffer); // never 0 + //KviTQString::detach(*(m_pData->m_pszBuffer)); + m_pData->m_pBuffer = KviTQString::nullTerminatedArray(m_pData->m_szBuffer); // never 0 m_pData->m_uLock = 0; m_pData->m_pTree = 0; } -KviKvsScript::KviKvsScript(const QString &szName,const QString &szBuffer,KviKvsTreeNodeInstruction * pPreparsedTree,ScriptType eType) +KviKvsScript::KviKvsScript(const TQString &szName,const TQString &szBuffer,KviKvsTreeNodeInstruction * pPreparsedTree,ScriptType eType) { m_pData = new KviKvsScriptData; m_pData->m_uRefs = 1; @@ -78,8 +78,8 @@ KviKvsScript::KviKvsScript(const QString &szName,const QString &szBuffer,KviKvsT m_pData->m_szBuffer = szBuffer; m_pData->m_eType = eType; if(m_pData->m_szBuffer.isNull())m_pData->m_szBuffer = ""; - //KviQString::detach(*(m_pData->m_pszBuffer)); - m_pData->m_pBuffer = KviQString::nullTerminatedArray(m_pData->m_szBuffer); // never 0 + //KviTQString::detach(*(m_pData->m_pszBuffer)); + m_pData->m_pBuffer = KviTQString::nullTerminatedArray(m_pData->m_szBuffer); // never 0 m_pData->m_uLock = 0; m_pData->m_pTree = pPreparsedTree; } @@ -102,18 +102,18 @@ KviKvsScript::~KviKvsScript() } } -void KviKvsScript::setName(const QString &szName) +void KviKvsScript::setName(const TQString &szName) { if(m_pData->m_uRefs > 1)detach(); m_pData->m_szName = szName; } -const QString & KviKvsScript::name() const +const TQString & KviKvsScript::name() const { return m_pData->m_szName; } -const QString & KviKvsScript::code() const +const TQString & KviKvsScript::code() const { return m_pData->m_szBuffer; } @@ -138,33 +138,33 @@ void KviKvsScript::detach() d->m_eType = m_pData->m_eType; d->m_szBuffer = m_pData->m_szBuffer; if(d->m_szBuffer.isNull())d->m_szBuffer = ""; - KviQString::detach(d->m_szBuffer); - d->m_pBuffer = KviQString::nullTerminatedArray(d->m_szBuffer); // never 0 + KviTQString::detach(d->m_szBuffer); + d->m_pBuffer = KviTQString::nullTerminatedArray(d->m_szBuffer); // never 0 d->m_uLock = 0; d->m_pTree = 0; m_pData = d; } -const QChar * KviKvsScript::buffer() const +const TQChar * KviKvsScript::buffer() const { return m_pData->m_pBuffer; } -int KviKvsScript::run(const QString &szCode,KviWindow * pWindow,KviKvsVariantList * pParams,KviKvsVariant * pRetVal) +int KviKvsScript::run(const TQString &szCode,KviWindow * pWindow,KviKvsVariantList * pParams,KviKvsVariant * pRetVal) { // static helper KviKvsScript s("kvirc::corecall(run)",szCode); return s.run(pWindow,pParams,pRetVal,PreserveParams); } -int KviKvsScript::evaluate(const QString &szCode,KviWindow * pWindow,KviKvsVariantList * pParams,KviKvsVariant * pRetVal) +int KviKvsScript::evaluate(const TQString &szCode,KviWindow * pWindow,KviKvsVariantList * pParams,KviKvsVariant * pRetVal) { // static helper KviKvsScript s("kvirc::corecall(evalutate)",szCode,Parameter); return s.run(pWindow,pParams,pRetVal,PreserveParams); } -int KviKvsScript::evaluateAsString(const QString &szCode,KviWindow * pWindow,KviKvsVariantList * pParams,QString &szRetVal) +int KviKvsScript::evaluateAsString(const TQString &szCode,KviWindow * pWindow,KviKvsVariantList * pParams,TQString &szRetVal) { // static helper KviKvsVariant ret; @@ -174,7 +174,7 @@ int KviKvsScript::evaluateAsString(const QString &szCode,KviWindow * pWindow,Kvi return iRet; } -int KviKvsScript::run(KviWindow * pWnd,KviKvsVariantList * pParams,QString &szRetVal,int iRunFlags,KviKvsExtendedRunTimeData * pExtData) +int KviKvsScript::run(KviWindow * pWnd,KviKvsVariantList * pParams,TQString &szRetVal,int iRunFlags,KviKvsExtendedRunTimeData * pExtData) { KviKvsVariant retVal; int iRet = run(pWnd,pParams,&retVal,iRunFlags,pExtData); @@ -293,22 +293,22 @@ int KviKvsScript::executeInternal(KviKvsRunTimeContext * pContext) // lock this script m_pData->m_uLock++; - int iRunStatus = Success; + int iRuntqStatus = Success; if(!m_pData->m_pTree->execute(pContext)) { - if(pContext->error())iRunStatus = Error; + if(pContext->error())iRuntqStatus = Error; else { // else just a halt, return or sth like that if(pContext->haltCalled()) - iRunStatus |= HaltEncountered; + iRuntqStatus |= HaltEncountered; } } // we can't block any longer: unlock m_pData->m_uLock--; - return iRunStatus; + return iRuntqStatus; } int KviKvsScript::execute(KviWindow * pWnd,KviKvsVariantList * pParams,KviKvsVariant * pRetVal,int iRunFlags,KviKvsExtendedRunTimeData * pExtData) @@ -343,13 +343,13 @@ int KviKvsScript::execute(KviWindow * pWnd,KviKvsVariantList * pParams,KviKvsVar if(iRunFlags & Quiet) ctx.disableReporting(); - int iRunStatus = executeInternal(&ctx); + int iRuntqStatus = executeInternal(&ctx); // don't forget to delete the params if(bDeleteParams)delete pParams; if(bDeleteRetVal)delete pRetVal; pParams = 0; pRetVal = 0; - return iRunStatus; + return iRuntqStatus; } diff --git a/src/kvirc/kvs/kvi_kvs_script.h b/src/kvirc/kvs/kvi_kvs_script.h index b9243878..2bfd6b85 100644 --- a/src/kvirc/kvs/kvi_kvs_script.h +++ b/src/kvirc/kvs/kvi_kvs_script.h @@ -52,7 +52,7 @@ class KVIRC_API KviKvsScript : public KviHeapObject friend class KviKvsParser; friend class KviKvsRunTimeContext; public: - enum RunStatus { + enum RuntqStatus { // the script returned an error Error = 0, // the script ran succesfully @@ -70,21 +70,21 @@ public: }; protected: // the name parameter is the name of the script context! - KviKvsScript(const QString &szName,const QString &szBuffer,KviKvsTreeNodeInstruction * pPreparsedTree,ScriptType eType = InstructionList); + KviKvsScript(const TQString &szName,const TQString &szBuffer,KviKvsTreeNodeInstruction * pPreparsedTree,ScriptType eType = InstructionList); public: // shallow copy of the script data // useful when a script can be destroyed while running (like in timers) KviKvsScript(const KviKvsScript &src); - KviKvsScript(const QString &szName,const QString &szBuffer,ScriptType eType=InstructionList); + KviKvsScript(const TQString &szName,const TQString &szBuffer,ScriptType eType=InstructionList); ~KviKvsScript(); private: KviKvsScriptData * m_pData; public: - const QString & name() const; - const QString & code() const; + const TQString & name() const; + const TQString & code() const; bool locked() const; - void setName(const QString &szName); + void setName(const TQString &szName); enum RunFlags { // do not delete the eventual parameters passed (only execute() and run()) @@ -97,7 +97,7 @@ public: Quiet = 8 }; // returns 0 (KviKvsScript::RunFailure) on error - // returns a nonzero combination of RunStatus flags on success + // returns a nonzero combination of RuntqStatus flags on success int run(KviWindow * pWnd, // window that the command has to be bound to KviKvsVariantList * pParams = 0, // parameter list (0 if you don't pass params) ownership transferred if PreserverParams is not used KviKvsVariant * pRetVal = 0, // return value buffer (0 if you ignore it) @@ -105,29 +105,29 @@ public: KviKvsExtendedRunTimeData * pExtData = 0); // extended data (usually 0) (if you need to pass extended scope variables or alias switch lists...) // returns 0 (KviKvsScript::RunFailure) on error - // returns a nonzero combination of RunStatus flags on success + // returns a nonzero combination of RuntqStatus flags on success // this is probably used only in /eval int run(KviKvsRunTimeContext * pContext,int iRunFlags = 0); - // same as run above, but gets a QString parameter as return buffer + // same as run above, but gets a TQString parameter as return buffer // this is probably useful only for evaluating InstructionList scripts int run(KviWindow * pWnd, KviKvsVariantList * pParams, - QString &szRetVal, + TQString &szRetVal, int iRunFlags = 0, KviKvsExtendedRunTimeData * pExtData = 0); // static helpers for quick running - // returns a combination of RunStatus flags (nonzero on no error) + // returns a combination of RuntqStatus flags (nonzero on no error) // does NOT take params ownership - static int run(const QString &szCode,KviWindow * pWindow,KviKvsVariantList * pParams = 0,KviKvsVariant * pRetVal = 0); + static int run(const TQString &szCode,KviWindow * pWindow,KviKvsVariantList * pParams = 0,KviKvsVariant * pRetVal = 0); // static helper for quick evaluating parameters - // returns a combination of RunStatus flags (nonzero on no error) + // returns a combination of RuntqStatus flags (nonzero on no error) // does NOT take params ownership // pRetVal CAN'T be zero here since we're evaluating stuff here - static int evaluate(const QString &szCode,KviWindow * pWindow,KviKvsVariantList * pParams,KviKvsVariant * pRetVal); - static int evaluateAsString(const QString &szCode,KviWindow * pWindow,KviKvsVariantList * pParams,QString &szRetVal); + static int evaluate(const TQString &szCode,KviWindow * pWindow,KviKvsVariantList * pParams,KviKvsVariant * pRetVal); + static int evaluateAsString(const TQString &szCode,KviWindow * pWindow,KviKvsVariantList * pParams,TQString &szRetVal); public: void dump(const char * prefix); protected: @@ -137,16 +137,16 @@ protected: bool parse(KviWindow * pOutput = 0, int iRunFlags = 0); // returns 0 (KviKvsScript::RunFailure) on error - // returns a nonzero combination of RunStatus flags on success + // returns a nonzero combination of RuntqStatus flags on success int execute(KviWindow * pWnd, KviKvsVariantList * pParams = 0, KviKvsVariant * pRetVal = 0, int iRunFlags = 0, KviKvsExtendedRunTimeData * pExtData = 0); // returns 0 (KviKvsScript::RunFailure) on error - // returns a nonzero combination of RunStatus flags on success + // returns a nonzero combination of RuntqStatus flags on success int executeInternal(KviKvsRunTimeContext * pContext); - const QChar * buffer() const; + const TQChar * buffer() const; // detaches this script from any other shallow copies void detach(); }; diff --git a/src/kvirc/kvs/kvi_kvs_scriptaddonmanager.cpp b/src/kvirc/kvs/kvi_kvs_scriptaddonmanager.cpp index aee138d4..23f6ade3 100644 --- a/src/kvirc/kvs/kvi_kvs_scriptaddonmanager.cpp +++ b/src/kvirc/kvs/kvi_kvs_scriptaddonmanager.cpp @@ -36,12 +36,12 @@ KviKvsScriptAddonManager * KviKvsScriptAddonManager::m_pInstance = 0; KviKvsScriptAddon::KviKvsScriptAddon( - const QString &szName, - const QString &szVersion, - const QString &szVisibleNameCode, - const QString &szDescriptionCode, - const QString &szUninstallCallbackCode, - const QString &szIconId + const TQString &szName, + const TQString &szVersion, + const TQString &szVisibleNameCode, + const TQString &szDescriptionCode, + const TQString &szUninstallCallbackCode, + const TQString &szIconId ) : KviHeapObject(), m_szName(szName), m_szVersion(szVersion), m_szIconId(szIconId) { allocateScripts(szVisibleNameCode,szDescriptionCode,szUninstallCallbackCode); @@ -55,11 +55,11 @@ KviKvsScriptAddon::KviKvsScriptAddon(const KviKvsScriptAddon &a) m_szName = a.m_szName; m_szVersion = a.m_szVersion; m_szIconId = a.m_szIconId; - allocateScripts(a.m_pVisibleNameScript->code(),a.m_pDescriptionScript->code(),a.m_pUninstallCallback ? a.m_pUninstallCallback->code() : QString::null); + allocateScripts(a.m_pVisibleNameScript->code(),a.m_pDescriptionScript->code(),a.m_pUninstallCallback ? a.m_pUninstallCallback->code() : TQString()); m_pConfigureCallback = 0; - setConfigureCallback(a.m_pConfigureCallback ? a.m_pConfigureCallback->code() : QString::null); + setConfigureCallback(a.m_pConfigureCallback ? a.m_pConfigureCallback->code() : TQString()); m_pHelpCallback = 0; - setHelpCallback(a.m_pHelpCallback ? a.m_pHelpCallback->code() : QString::null); + setHelpCallback(a.m_pHelpCallback ? a.m_pHelpCallback->code() : TQString()); } KviKvsScriptAddon::KviKvsScriptAddon() @@ -81,75 +81,75 @@ KviKvsScriptAddon::~KviKvsScriptAddon() if(m_pHelpCallback)delete m_pHelpCallback; } -QPixmap * KviKvsScriptAddon::icon() +TQPixmap * KviKvsScriptAddon::icon() { - return g_pIconManager->getBigIcon(m_szIconId.isEmpty() ? QString(KVI_BIGICON_KVS) : m_szIconId); + return g_pIconManager->getBigIcon(m_szIconId.isEmpty() ? TQString(KVI_BIGICON_KVS) : m_szIconId); } -const QString & KviKvsScriptAddon::visibleName() +const TQString & KviKvsScriptAddon::visibleName() { if(!m_pVisibleNameScript)return m_szVisibleName; if(!m_pVisibleNameScript->run(g_pActiveWindow,0,m_szVisibleName))m_szVisibleName = m_pVisibleNameScript->code(); return m_szVisibleName; } -const QString & KviKvsScriptAddon::description() +const TQString & KviKvsScriptAddon::description() { if(!m_pDescriptionScript)return m_szDescription; if(!m_pDescriptionScript->run(g_pActiveWindow,0,m_szDescription))m_szDescription = m_pDescriptionScript->code(); return m_szDescription; } -const QString & KviKvsScriptAddon::visibleNameCode() +const TQString & KviKvsScriptAddon::visibleNameCode() { return m_pVisibleNameScript->code(); } -const QString & KviKvsScriptAddon::descriptionCode() +const TQString & KviKvsScriptAddon::descriptionCode() { return m_pDescriptionScript->code(); } -const QString & KviKvsScriptAddon::uninstallCallbackCode() +const TQString & KviKvsScriptAddon::uninstallCallbackCode() { return m_pUninstallCallback->code(); } -const QString & KviKvsScriptAddon::configureCallbackCode() +const TQString & KviKvsScriptAddon::configureCallbackCode() { if(m_pConfigureCallback)return m_pConfigureCallback->code(); - return KviQString::empty; + return KviTQString::empty; } -const QString & KviKvsScriptAddon::helpCallbackCode() +const TQString & KviKvsScriptAddon::helpCallbackCode() { if(m_pHelpCallback)return m_pHelpCallback->code(); - return KviQString::empty; + return KviTQString::empty; } -bool KviKvsScriptAddon::load(KviConfig * cfg,const QString &szName) +bool KviKvsScriptAddon::load(KviConfig * cfg,const TQString &szName) { m_szName = szName; cfg->setGroup(m_szName); - m_szVersion = cfg->readQStringEntry("Version"); - m_szIconId = cfg->readQStringEntry("IconId"); + m_szVersion = cfg->readTQStringEntry("Version"); + m_szIconId = cfg->readTQStringEntry("IconId"); if(m_szVersion.isEmpty())return false; - QString tmp1,tmp2,tmp3; - tmp1 = cfg->readQStringEntry("VisibleNameCode"); - tmp2 = cfg->readQStringEntry("DescriptionCode"); - tmp3 = cfg->readQStringEntry("UninstallCallback"); + TQString tmp1,tmp2,tmp3; + tmp1 = cfg->readTQStringEntry("VisibleNameCode"); + tmp2 = cfg->readTQStringEntry("DescriptionCode"); + tmp3 = cfg->readTQStringEntry("UninstallCallback"); if(tmp1.isEmpty())return false; allocateScripts(tmp1,tmp2,tmp3); - tmp1 = cfg->readQStringEntry("ConfigureCallback"); + tmp1 = cfg->readTQStringEntry("ConfigureCallback"); if(!tmp1.isEmpty()) setConfigureCallback(tmp1); - tmp1 = cfg->readQStringEntry("HelpCallback"); + tmp1 = cfg->readTQStringEntry("HelpCallback"); if(!tmp1.isEmpty()) setHelpCallback(tmp1); return true; } -void KviKvsScriptAddon::setConfigureCallback(const QString &szConfigureCallbackCode) +void KviKvsScriptAddon::setConfigureCallback(const TQString &szConfigureCallbackCode) { if(m_pConfigureCallback)delete m_pConfigureCallback; if(szConfigureCallbackCode.isEmpty()) @@ -158,17 +158,17 @@ void KviKvsScriptAddon::setConfigureCallback(const QString &szConfigureCallbackC return; } - QString szKvsName = "addon::"; + TQString szKvsName = "addon::"; szKvsName += m_szName; - QString szTmp; + TQString szTmp; szTmp = szKvsName; szTmp += "::configure"; m_pConfigureCallback = new KviKvsScript(szTmp,szConfigureCallbackCode,KviKvsScript::InstructionList); } -void KviKvsScriptAddon::setHelpCallback(const QString &szHelpCallbackCode) +void KviKvsScriptAddon::setHelpCallback(const TQString &szHelpCallbackCode) { if(m_pHelpCallback)delete m_pHelpCallback; if(szHelpCallbackCode.isEmpty()) @@ -177,22 +177,22 @@ void KviKvsScriptAddon::setHelpCallback(const QString &szHelpCallbackCode) return; } - QString szKvsName = "addon::"; + TQString szKvsName = "addon::"; szKvsName += m_szName; - QString szTmp; + TQString szTmp; szTmp = szKvsName; szTmp += "::help"; m_pHelpCallback = new KviKvsScript(szTmp,szHelpCallbackCode,KviKvsScript::InstructionList); } -void KviKvsScriptAddon::allocateScripts(const QString &szVisibleNameCode,const QString &szDescriptionCode,const QString &szUninstallCallbackCode) +void KviKvsScriptAddon::allocateScripts(const TQString &szVisibleNameCode,const TQString &szDescriptionCode,const TQString &szUninstallCallbackCode) { - QString szKvsName = "addon::"; + TQString szKvsName = "addon::"; szKvsName += m_szName; - QString szTmp; + TQString szTmp; szTmp = szKvsName; szTmp += "::name"; @@ -243,7 +243,7 @@ KviKvsScriptAddonManager::KviKvsScriptAddonManager() { m_pInstance = this; m_bLoaded = false; - m_pAddonDict = new KviPointerHashTable(17,false); + m_pAddonDict = new KviPointerHashTable(17,false); m_pAddonDict->setAutoDelete(true); } @@ -272,7 +272,7 @@ void KviKvsScriptAddonManager::done() delete KviKvsScriptAddonManager::instance(); } -void KviKvsScriptAddonManager::load(const QString &szFileName) +void KviKvsScriptAddonManager::load(const TQString &szFileName) { // in fact we implement delayed loading // so this function only stores the filename @@ -284,7 +284,7 @@ void KviKvsScriptAddonManager::load(const QString &szFileName) m_bLoaded = false; } -void KviKvsScriptAddonManager::save(const QString &szFileName) +void KviKvsScriptAddonManager::save(const TQString &szFileName) { if(!m_bLoaded)return; // nothing to store anyway // we're stored here from now on... @@ -294,7 +294,7 @@ void KviKvsScriptAddonManager::save(const QString &szFileName) cfg.clear(); - KviPointerHashTableIterator it(*m_pAddonDict); + KviPointerHashTableIterator it(*m_pAddonDict); while(KviKvsScriptAddon * a = it.current()) { @@ -315,23 +315,23 @@ void KviKvsScriptAddonManager::delayedLoad() KviConfig cfg(m_szFileName,KviConfig::Read); - KviPointerHashTable * d = cfg.dict(); + KviPointerHashTable * d = cfg.dict(); if(!d)return; - KviPointerHashTableIterator it(*d); + KviPointerHashTableIterator it(*d); while(it.current()) { - QString szName = it.currentKey(); + TQString szName = it.currentKey(); KviKvsScriptAddon * a = new KviKvsScriptAddon(); if(a->load(&cfg,szName)) - m_pAddonDict->replace(szName,a); + m_pAddonDict->tqreplace(szName,a); else delete a; ++it; } } -KviPointerHashTable * KviKvsScriptAddonManager::addonDict() +KviPointerHashTable * KviKvsScriptAddonManager::addonDict() { if(!m_bLoaded)delayedLoad(); return m_pAddonDict; @@ -351,17 +351,17 @@ bool KviKvsScriptAddonManager::registerAddon(KviKvsScriptAddonRegistrationData * d->szDescriptionScript, d->szUninstallCallbackScript, d->szIconId); - m_pAddonDict->replace(d->szName,a); + m_pAddonDict->tqreplace(d->szName,a); return true; } -KviKvsScriptAddon * KviKvsScriptAddonManager::findAddon(const QString &szName) +KviKvsScriptAddon * KviKvsScriptAddonManager::findAddon(const TQString &szName) { if(!m_bLoaded)delayedLoad(); - return m_pAddonDict->find(szName); + return m_pAddonDict->tqfind(szName); } -bool KviKvsScriptAddonManager::unregisterAddon(const QString &szName,KviWindow * pWnd,bool bExecuteUninstallCallback) +bool KviKvsScriptAddonManager::unregisterAddon(const TQString &szName,KviWindow * pWnd,bool bExecuteUninstallCallback) { KviKvsScriptAddon * a = findAddon(szName); if(!a)return false; diff --git a/src/kvirc/kvs/kvi_kvs_scriptaddonmanager.h b/src/kvirc/kvs/kvi_kvs_scriptaddonmanager.h index 428ba58d..b05addea 100644 --- a/src/kvirc/kvs/kvi_kvs_scriptaddonmanager.h +++ b/src/kvirc/kvs/kvi_kvs_scriptaddonmanager.h @@ -33,7 +33,7 @@ class KviConfig; class KviKvsScript; class KviWindow; -class QPixmap; +class TQPixmap; class KVIRC_API KviKvsScriptAddon : public KviHeapObject { @@ -41,61 +41,61 @@ class KVIRC_API KviKvsScriptAddon : public KviHeapObject protected: KviKvsScriptAddon(); KviKvsScriptAddon( - const QString &szName, - const QString &szVersion, - const QString &szVisibleNameCode, - const QString &szDescriptionCode, - const QString &szUninstallCallbackCode, - const QString &szIconId + const TQString &szName, + const TQString &szVersion, + const TQString &szVisibleNameCode, + const TQString &szDescriptionCode, + const TQString &szUninstallCallbackCode, + const TQString &szIconId ); public: KviKvsScriptAddon(const KviKvsScriptAddon &a); public: // KviDict wants that... how to restrict the deletion to KviKvsScriptAddonManager only ? ~KviKvsScriptAddon(); protected: - QString m_szName; // the short name of the addon - QString m_szVersion; // x.y.z + TQString m_szName; // the short name of the addon + TQString m_szVersion; // x.y.z KviKvsScript * m_pVisibleNameScript; // the visible name, possibly translated KviKvsScript * m_pDescriptionScript; // the description, possibly translated KviKvsScript * m_pUninstallCallback; // uninstall callback KviKvsScript * m_pConfigureCallback; // configure callback KviKvsScript * m_pHelpCallback; // help callback - QString m_szDescription; // parsed description - QString m_szVisibleName; // parsed visible name - QString m_szIconId; + TQString m_szDescription; // parsed description + TQString m_szVisibleName; // parsed visible name + TQString m_szIconId; public: - const QString &name() const { return m_szName; }; - const QString &version() const { return m_szVersion; }; - const QString &visibleName(); - const QString &description(); - const QString &visibleNameCode(); - const QString &descriptionCode(); - const QString &uninstallCallbackCode(); - const QString &configureCallbackCode(); - const QString &helpCallbackCode(); - const QString &iconId(){ return m_szIconId; }; - QPixmap * icon(); - void setConfigureCallback(const QString &szConfigureCallbackCode); - void setHelpCallback(const QString &szHelpCallbackCode); + const TQString &name() const { return m_szName; }; + const TQString &version() const { return m_szVersion; }; + const TQString &visibleName(); + const TQString &description(); + const TQString &visibleNameCode(); + const TQString &descriptionCode(); + const TQString &uninstallCallbackCode(); + const TQString &configureCallbackCode(); + const TQString &helpCallbackCode(); + const TQString &iconId(){ return m_szIconId; }; + TQPixmap * icon(); + void setConfigureCallback(const TQString &szConfigureCallbackCode); + void setHelpCallback(const TQString &szHelpCallbackCode); void executeConfigureCallback(KviWindow * pWnd); void executeHelpCallback(KviWindow * pWnd); protected: - bool load(KviConfig * cfg,const QString &szName); + bool load(KviConfig * cfg,const TQString &szName); void save(KviConfig * cfg); void executeUninstallCallback(KviWindow * pWnd); // this assumes that the script pointers are clean (i.e. not needing to be freed!) - void allocateScripts(const QString &sVisibleNameCode,const QString &szDescriptionCode,const QString &szUninstallCallbackCode); + void allocateScripts(const TQString &sVisibleNameCode,const TQString &szDescriptionCode,const TQString &szUninstallCallbackCode); }; class KVIRC_API KviKvsScriptAddonRegistrationData { public: - QString szName; // the addon name - QString szVersion; // the addon version in form x.y.z - QString szVisibleNameScript; // the code that evaluates to the visible name, possibly translated - QString szDescriptionScript; // the code that evaluates to the description, possibly translated - QString szUninstallCallbackScript; // the uninstall callback code, will be executed at uninstallation - QString szIconId; // the icon identifier (scaled to 32x32 atm) + TQString szName; // the addon name + TQString szVersion; // the addon version in form x.y.z + TQString szVisibleNameScript; // the code that evaluates to the visible name, possibly translated + TQString szDescriptionScript; // the code that evaluates to the description, possibly translated + TQString szUninstallCallbackScript; // the uninstall callback code, will be executed at uninstallation + TQString szIconId; // the icon identifier (scaled to 32x32 atm) }; class KVIRC_API KviKvsScriptAddonManager @@ -106,22 +106,22 @@ public: protected: static KviKvsScriptAddonManager * m_pInstance; // this class implements delayed loading - QString m_szFileName; // the file name that we will load from + TQString m_szFileName; // the file name that we will load from bool m_bLoaded; // have we loaded stuff from disk yet ? - KviPointerHashTable * m_pAddonDict; // all the registered addons + KviPointerHashTable * m_pAddonDict; // all the registered addons public: static KviKvsScriptAddonManager * instance(){ return m_pInstance; }; static void init(); // called by KviKvs::init() static void done(); // called by KviKvs::done() bool registerAddon(KviKvsScriptAddonRegistrationData * d); - KviKvsScriptAddon * findAddon(const QString &szName); - bool unregisterAddon(const QString &szName,KviWindow * pWnd,bool bExecuteUninstallCallback = true); - KviPointerHashTable * addonDict(); + KviKvsScriptAddon * findAddon(const TQString &szName); + bool unregisterAddon(const TQString &szName,KviWindow * pWnd,bool bExecuteUninstallCallback = true); + KviPointerHashTable * addonDict(); void clear(); - void load(const QString &szFileName); // called in the KviKvs namespace - void save(const QString &szFileName); // called in the KViKvs namespace + void load(const TQString &szFileName); // called in the KviKvs namespace + void save(const TQString &szFileName); // called in the KViKvs namespace protected: void delayedLoad(); }; diff --git a/src/kvirc/kvs/kvi_kvs_switchlist.cpp b/src/kvirc/kvs/kvi_kvs_switchlist.cpp index aa4ebdbd..7c56c853 100644 --- a/src/kvirc/kvs/kvi_kvs_switchlist.cpp +++ b/src/kvirc/kvs/kvi_kvs_switchlist.cpp @@ -60,16 +60,16 @@ void KviKvsSwitchList::addShort(unsigned short uShortKey,KviKvsVariant * pVarian m_pShortSwitchDict = new KviPointerHashTable(11); m_pShortSwitchDict->setAutoDelete(true); } - m_pShortSwitchDict->replace(uShortKey,pVariant); + m_pShortSwitchDict->tqreplace(uShortKey,pVariant); } -void KviKvsSwitchList::addLong(const QString &szLongKey,KviKvsVariant * pVariant) +void KviKvsSwitchList::addLong(const TQString &szLongKey,KviKvsVariant * pVariant) { if(!m_pLongSwitchDict) { - m_pLongSwitchDict = new KviPointerHashTable(11); + m_pLongSwitchDict = new KviPointerHashTable(11); m_pLongSwitchDict->setAutoDelete(true); } - m_pLongSwitchDict->replace(szLongKey,pVariant); + m_pLongSwitchDict->tqreplace(szLongKey,pVariant); } diff --git a/src/kvirc/kvs/kvi_kvs_switchlist.h b/src/kvirc/kvs/kvi_kvs_switchlist.h index ea496b3e..b660569a 100644 --- a/src/kvirc/kvs/kvi_kvs_switchlist.h +++ b/src/kvirc/kvs/kvi_kvs_switchlist.h @@ -38,43 +38,43 @@ public: ~KviKvsSwitchList(); protected: KviPointerHashTable * m_pShortSwitchDict; - KviPointerHashTable * m_pLongSwitchDict; + KviPointerHashTable * m_pLongSwitchDict; public: void clear(); void addShort(unsigned short uShortKey,KviKvsVariant * pVariant); - void addLong(const QString &szLongKey,KviKvsVariant * pVariant); + void addLong(const TQString &szLongKey,KviKvsVariant * pVariant); bool isEmpty(){ return ((m_pShortSwitchDict == 0) && (m_pLongSwitchDict == 0)); }; - KviKvsVariant * find(const QChar &c) + KviKvsVariant * tqfind(const TQChar &c) { - return m_pShortSwitchDict ? m_pShortSwitchDict->find(c.unicode()) : 0; + return m_pShortSwitchDict ? m_pShortSwitchDict->tqfind(c.tqunicode()) : 0; }; - KviKvsVariant * find(unsigned short uShortKey) + KviKvsVariant * tqfind(unsigned short uShortKey) { - return m_pShortSwitchDict ? m_pShortSwitchDict->find((int)uShortKey) : 0; + return m_pShortSwitchDict ? m_pShortSwitchDict->tqfind((int)uShortKey) : 0; }; - KviKvsVariant * find(const QString &szLongKey) + KviKvsVariant * tqfind(const TQString &szLongKey) { - return m_pLongSwitchDict ? m_pLongSwitchDict->find(szLongKey) : 0; + return m_pLongSwitchDict ? m_pLongSwitchDict->tqfind(szLongKey) : 0; }; - KviKvsVariant * find(unsigned short uShortKey,const QString &szLongKey) + KviKvsVariant * tqfind(unsigned short uShortKey,const TQString &szLongKey) { if(m_pLongSwitchDict) { KviKvsVariant * t; - t = m_pLongSwitchDict->find(szLongKey); + t = m_pLongSwitchDict->tqfind(szLongKey); if(t)return t; } - return m_pShortSwitchDict ? m_pShortSwitchDict->find((int)uShortKey) : 0; + return m_pShortSwitchDict ? m_pShortSwitchDict->tqfind((int)uShortKey) : 0; }; - bool getAsStringIfExisting(unsigned short uShortKey,const QString &szLongKey,QString &szBuffer) + bool getAsStringIfExisting(unsigned short uShortKey,const TQString &szLongKey,TQString &szBuffer) { - KviKvsVariant * v = find(uShortKey,szLongKey); + KviKvsVariant * v = tqfind(uShortKey,szLongKey); if(v) { v->asString(szBuffer); diff --git a/src/kvirc/kvs/kvi_kvs_timermanager.cpp b/src/kvirc/kvs/kvi_kvs_timermanager.cpp index 91af693d..3bd4301e 100644 --- a/src/kvirc/kvs/kvi_kvs_timermanager.cpp +++ b/src/kvirc/kvs/kvi_kvs_timermanager.cpp @@ -38,7 +38,7 @@ #include "kvi_out.h" -KviKvsTimer::KviKvsTimer(const QString &szName,Lifetime l,KviWindow * pWnd,int iDelay,int iId,KviKvsScript * pCallback,KviKvsVariantList * pParams) +KviKvsTimer::KviKvsTimer(const TQString &szName,Lifetime l,KviWindow * pWnd,int iDelay,int iId,KviKvsScript * pCallback,KviKvsVariantList * pParams) { m_szName = szName; m_eLifetime = l; @@ -68,11 +68,11 @@ KviKvsTimerManager * KviKvsTimerManager::m_pInstance = 0; KviKvsTimerManager::KviKvsTimerManager() -: QObject() +: TQObject() { m_pTimerDictById = new KviPointerHashTable(17); m_pTimerDictById->setAutoDelete(false); - m_pTimerDictByName = new KviPointerHashTable(17,false); + m_pTimerDictByName = new KviPointerHashTable(17,false); m_pTimerDictByName->setAutoDelete(false); m_pKilledTimerList = 0; m_iAssassinTimer = 0; @@ -108,7 +108,7 @@ void KviKvsTimerManager::done() KviKvsTimerManager::m_pInstance = 0; } -bool KviKvsTimerManager::addTimer(const QString &szName,KviKvsTimer::Lifetime l,KviWindow * pWnd,int iDelay,KviKvsScript * pCallback,KviKvsVariantList * pParams) +bool KviKvsTimerManager::addTimer(const TQString &szName,KviKvsTimer::Lifetime l,KviWindow * pWnd,int iDelay,KviKvsScript * pCallback,KviKvsVariantList * pParams) { int iId = startTimer(iDelay); @@ -122,16 +122,16 @@ bool KviKvsTimerManager::addTimer(const QString &szName,KviKvsTimer::Lifetime l, } KviKvsTimer * t = new KviKvsTimer(szName,l,pWnd,iDelay,iId,pCallback,pParams); - KviKvsTimer * old = m_pTimerDictByName->find(szName); + KviKvsTimer * old = m_pTimerDictByName->tqfind(szName); if(old)deleteTimer(old->id()); m_pTimerDictByName->insert(szName,t); m_pTimerDictById->insert(t->id(),t); return true; } -bool KviKvsTimerManager::deleteTimer(const QString &szName) +bool KviKvsTimerManager::deleteTimer(const TQString &szName) { - KviKvsTimer * t = m_pTimerDictByName->find(szName); + KviKvsTimer * t = m_pTimerDictByName->tqfind(szName); if(!t)return false; killTimer(t->id()); m_pTimerDictById->remove(t->id()); @@ -142,7 +142,7 @@ bool KviKvsTimerManager::deleteTimer(const QString &szName) bool KviKvsTimerManager::deleteTimer(int iId) { - KviKvsTimer * t = m_pTimerDictById->find(iId); + KviKvsTimer * t = m_pTimerDictById->tqfind(iId); if(!t)return false; killTimer(t->id()); m_pTimerDictById->remove(t->id()); @@ -189,7 +189,7 @@ void KviKvsTimerManager::scheduleKill(KviKvsTimer *t) } -void KviKvsTimerManager::timerEvent(QTimerEvent *e) +void KviKvsTimerManager::timerEvent(TQTimerEvent *e) { int iId = e->timerId(); @@ -206,7 +206,7 @@ void KviKvsTimerManager::timerEvent(QTimerEvent *e) return; } - KviKvsTimer * t = m_pTimerDictById->find(iId); + KviKvsTimer * t = m_pTimerDictById->tqfind(iId); if(!t) { debug("Internal error: got an nonexistant timer event"); diff --git a/src/kvirc/kvs/kvi_kvs_timermanager.h b/src/kvirc/kvs/kvi_kvs_timermanager.h index f8e20f10..e3161183 100644 --- a/src/kvirc/kvs/kvi_kvs_timermanager.h +++ b/src/kvirc/kvs/kvi_kvs_timermanager.h @@ -28,7 +28,7 @@ #include "kvi_settings.h" #include "kvi_qstring.h" -#include +#include #include "kvi_pointerhashtable.h" #include "kvi_pointerhashtable.h" #include "kvi_pointerlist.h" @@ -58,13 +58,13 @@ class KVIRC_API KviKvsTimer public: enum Lifetime { SingleShot, WindowLifetime, Persistent }; protected: - KviKvsTimer(const QString &szName,Lifetime l,KviWindow * pWnd,int iDelay,int iId,KviKvsScript * pCallback,KviKvsVariantList * pParams); + KviKvsTimer(const TQString &szName,Lifetime l,KviWindow * pWnd,int iDelay,int iId,KviKvsScript * pCallback,KviKvsVariantList * pParams); public: ~KviKvsTimer(); protected: Lifetime m_eLifetime; // the type of this timer KviWindow * m_pWnd; // the window that this timer is (currently) bound to - QString m_szName; // this timer name + TQString m_szName; // this timer name KviKvsScript * m_pCallback; // callback to be executed at timer shots int m_iDelay; // the timer delay in msecs int m_iId; // the system id of this timer @@ -72,7 +72,7 @@ protected: KviKvsVariantList * m_pParameterList; // parameter list public: KviWindow * window(){ return m_pWnd; }; - const QString & name(){ return m_szName; }; + const TQString & name(){ return m_szName; }; const KviKvsScript * callback(){ return m_pCallback; }; Lifetime lifetime(){ return m_eLifetime; }; int delay(){ return m_iDelay; }; @@ -85,15 +85,16 @@ protected: }; -class KVIRC_API KviKvsTimerManager : public QObject +class KVIRC_API KviKvsTimerManager : public TQObject { Q_OBJECT + TQ_OBJECT protected: // it only can be created and destroyed by KviKvsTimerManager::init()/done() KviKvsTimerManager(); ~KviKvsTimerManager(); private: KviPointerHashTable * m_pTimerDictById; // stored by id - KviPointerHashTable * m_pTimerDictByName; // stored by name + KviPointerHashTable * m_pTimerDictByName; // stored by name static KviKvsTimerManager * m_pInstance; // the one and only timer manager instance KviPointerList * m_pKilledTimerList; // list of timers for that killing has been scheduled int m_iAssassinTimer; // assassin timer id @@ -103,20 +104,20 @@ public: static void init(); static void done(); // the pCallback and pParams are owned by the timer: they WILL be deleted - bool addTimer(const QString &szName,KviKvsTimer::Lifetime l,KviWindow * pWnd,int iDelay,KviKvsScript * pCallback,KviKvsVariantList * pParams); - bool deleteTimer(const QString &szName); + bool addTimer(const TQString &szName,KviKvsTimer::Lifetime l,KviWindow * pWnd,int iDelay,KviKvsScript * pCallback,KviKvsVariantList * pParams); + bool deleteTimer(const TQString &szName); bool deleteTimer(int iId); // the timer manager does not trigger timers concurrently // this means that if this is called from a timer handler // the current timer will be unique bool deleteCurrentTimer(); void deleteAllTimers(); - bool timerExists(const QString &szName){ return m_pTimerDictByName->find(szName); }; - KviPointerHashTable * timerDict() + bool timerExists(const TQString &szName){ return m_pTimerDictByName->tqfind(szName); }; + KviPointerHashTable * timerDict() { return m_pTimerDictByName; }; protected: void scheduleKill(KviKvsTimer * t); - virtual void timerEvent(QTimerEvent *e); + virtual void timerEvent(TQTimerEvent *e); }; diff --git a/src/kvirc/kvs/kvi_kvs_treenode_aliasfunctioncall.cpp b/src/kvirc/kvs/kvi_kvs_treenode_aliasfunctioncall.cpp index f864cea6..d8a9ca43 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_aliasfunctioncall.cpp +++ b/src/kvirc/kvs/kvi_kvs_treenode_aliasfunctioncall.cpp @@ -30,7 +30,7 @@ #include "kvi_locale.h" #include "kvi_qstring.h" -KviKvsTreeNodeAliasFunctionCall::KviKvsTreeNodeAliasFunctionCall(const QChar * pLocation,const QString &szAliasName,KviKvsTreeNodeDataList * pParams) +KviKvsTreeNodeAliasFunctionCall::KviKvsTreeNodeAliasFunctionCall(const TQChar * pLocation,const TQString &szAliasName,KviKvsTreeNodeDataList * pParams) : KviKvsTreeNodeFunctionCall(pLocation,szAliasName,pParams) { @@ -40,9 +40,9 @@ KviKvsTreeNodeAliasFunctionCall::~KviKvsTreeNodeAliasFunctionCall() { } -void KviKvsTreeNodeAliasFunctionCall::contextDescription(QString &szBuffer) +void KviKvsTreeNodeAliasFunctionCall::contextDescription(TQString &szBuffer) { - KviQString::sprintf(szBuffer,"Alias Function Call \"%Q\"",&m_szFunctionName); + KviTQString::sprintf(szBuffer,"Alias Function Call \"%Q\"",&m_szFunctionName); } @@ -51,7 +51,7 @@ void KviKvsTreeNodeAliasFunctionCall::dump(const char * prefix) { #ifdef COMPILE_NEW_KVS debug("%s AliasFunctionCall(%s)",prefix,m_szFunctionName.utf8().data()); - QString tmp = prefix; + TQString tmp = prefix; tmp.append(" "); m_pParams->dump(tmp.utf8().data()); #endif diff --git a/src/kvirc/kvs/kvi_kvs_treenode_aliasfunctioncall.h b/src/kvirc/kvs/kvi_kvs_treenode_aliasfunctioncall.h index 04ca50a3..af0770fc 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_aliasfunctioncall.h +++ b/src/kvirc/kvs/kvi_kvs_treenode_aliasfunctioncall.h @@ -34,11 +34,11 @@ class KviKvsRunTimeContext; class KVIRC_API KviKvsTreeNodeAliasFunctionCall : public KviKvsTreeNodeFunctionCall { public: - KviKvsTreeNodeAliasFunctionCall(const QChar * pLocation,const QString &szAliasName,KviKvsTreeNodeDataList * pParams); + KviKvsTreeNodeAliasFunctionCall(const TQChar * pLocation,const TQString &szAliasName,KviKvsTreeNodeDataList * pParams); ~KviKvsTreeNodeAliasFunctionCall(); public: virtual void dump(const char * prefix); - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual bool evaluateReadOnly(KviKvsRunTimeContext * c,KviKvsVariant * pBuffer); }; diff --git a/src/kvirc/kvs/kvi_kvs_treenode_aliassimplecommand.cpp b/src/kvirc/kvs/kvi_kvs_treenode_aliassimplecommand.cpp index 974ae941..192d3445 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_aliassimplecommand.cpp +++ b/src/kvirc/kvs/kvi_kvs_treenode_aliassimplecommand.cpp @@ -37,7 +37,7 @@ #include "kvi_out.h" -KviKvsTreeNodeAliasSimpleCommand::KviKvsTreeNodeAliasSimpleCommand(const QChar * pLocation,const QString &szCmdName,KviKvsTreeNodeDataList * params) +KviKvsTreeNodeAliasSimpleCommand::KviKvsTreeNodeAliasSimpleCommand(const TQChar * pLocation,const TQString &szCmdName,KviKvsTreeNodeDataList * params) : KviKvsTreeNodeSimpleCommand(pLocation,szCmdName,params) { } @@ -47,9 +47,9 @@ KviKvsTreeNodeAliasSimpleCommand::~KviKvsTreeNodeAliasSimpleCommand() { } -void KviKvsTreeNodeAliasSimpleCommand::contextDescription(QString &szBuffer) +void KviKvsTreeNodeAliasSimpleCommand::contextDescription(TQString &szBuffer) { - KviQString::sprintf(szBuffer,"Alias Simple Command \"%Q\"",&m_szCmdName); + KviTQString::sprintf(szBuffer,"Alias Simple Command \"%Q\"",&m_szCmdName); } void KviKvsTreeNodeAliasSimpleCommand::dump(const char * prefix) @@ -75,13 +75,13 @@ bool KviKvsTreeNodeAliasSimpleCommand::execute(KviKvsRunTimeContext * c) { if(KVI_OPTION_BOOL(KviOption_boolSendUnknownCommandsAsRaw)) { - QString szAll; + TQString szAll; l.allAsString(szAll); if(!szAll.isEmpty())szAll.prepend(" "); szAll.prepend(m_szCmdName); - KviQCString szData; + KviTQCString szData; if(!c->window()->context()) goto no_way_to_send_as_raw; diff --git a/src/kvirc/kvs/kvi_kvs_treenode_aliassimplecommand.h b/src/kvirc/kvs/kvi_kvs_treenode_aliassimplecommand.h index 0247e9be..34a1a246 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_aliassimplecommand.h +++ b/src/kvirc/kvs/kvi_kvs_treenode_aliassimplecommand.h @@ -34,10 +34,10 @@ class KviKvsRunTimeContext; class KVIRC_API KviKvsTreeNodeAliasSimpleCommand : public KviKvsTreeNodeSimpleCommand { public: - KviKvsTreeNodeAliasSimpleCommand(const QChar * pLocation,const QString &szCmdName,KviKvsTreeNodeDataList * params); + KviKvsTreeNodeAliasSimpleCommand(const TQChar * pLocation,const TQString &szCmdName,KviKvsTreeNodeDataList * params); ~KviKvsTreeNodeAliasSimpleCommand(); public: - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); virtual bool execute(KviKvsRunTimeContext * c); }; diff --git a/src/kvirc/kvs/kvi_kvs_treenode_arraycount.cpp b/src/kvirc/kvs/kvi_kvs_treenode_arraycount.cpp index 1479fefe..7caab062 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_arraycount.cpp +++ b/src/kvirc/kvs/kvi_kvs_treenode_arraycount.cpp @@ -31,7 +31,7 @@ #include "kvi_kvs_object.h" -KviKvsTreeNodeArrayCount::KviKvsTreeNodeArrayCount(const QChar * pLocation,KviKvsTreeNodeData * pSource) +KviKvsTreeNodeArrayCount::KviKvsTreeNodeArrayCount(const TQChar * pLocation,KviKvsTreeNodeData * pSource) : KviKvsTreeNodeIndirectData(pLocation,pSource) { } @@ -40,7 +40,7 @@ KviKvsTreeNodeArrayCount::~KviKvsTreeNodeArrayCount() { } -void KviKvsTreeNodeArrayCount::contextDescription(QString &szBuffer) +void KviKvsTreeNodeArrayCount::contextDescription(TQString &szBuffer) { szBuffer = "Array Count Operator"; } @@ -67,7 +67,7 @@ bool KviKvsTreeNodeArrayCount::evaluateReadOnlyInObjectScope(KviKvsObject *o,Kvi { if(!val.isNothing()) { - QString szType; + TQString szType; val.getTypeName(szType); c->warning(this,__tr2qs("The argument of the array count '#' operator didn't evaluate to an array: automatic conversion from type '%Q' supplied"),&szType); } diff --git a/src/kvirc/kvs/kvi_kvs_treenode_arraycount.h b/src/kvirc/kvs/kvi_kvs_treenode_arraycount.h index deae2588..87ce7217 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_arraycount.h +++ b/src/kvirc/kvs/kvi_kvs_treenode_arraycount.h @@ -35,10 +35,10 @@ class KviKvsObject; class KVIRC_API KviKvsTreeNodeArrayCount : public KviKvsTreeNodeIndirectData { public: - KviKvsTreeNodeArrayCount(const QChar * pLocation,KviKvsTreeNodeData * pSource); + KviKvsTreeNodeArrayCount(const TQChar * pLocation,KviKvsTreeNodeData * pSource); ~KviKvsTreeNodeArrayCount(); public: - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); virtual bool evaluateReadOnly(KviKvsRunTimeContext * c,KviKvsVariant * pBuffer); virtual bool evaluateReadOnlyInObjectScope(KviKvsObject *o,KviKvsRunTimeContext * c,KviKvsVariant * pBuffer); diff --git a/src/kvirc/kvs/kvi_kvs_treenode_arrayelement.cpp b/src/kvirc/kvs/kvi_kvs_treenode_arrayelement.cpp index ada9fd82..e3cd6687 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_arrayelement.cpp +++ b/src/kvirc/kvs/kvi_kvs_treenode_arrayelement.cpp @@ -30,7 +30,7 @@ #include "kvi_kvs_array.h" #include "kvi_kvs_object.h" -KviKvsTreeNodeArrayElement::KviKvsTreeNodeArrayElement(const QChar * pLocation,KviKvsTreeNodeData * pSource,KviKvsTreeNodeExpression * pIndex) +KviKvsTreeNodeArrayElement::KviKvsTreeNodeArrayElement(const TQChar * pLocation,KviKvsTreeNodeData * pSource,KviKvsTreeNodeExpression * pIndex) : KviKvsTreeNodeArrayOrHashElement(pLocation,pSource) { #ifdef COMPILE_NEW_KVS @@ -47,7 +47,7 @@ KviKvsTreeNodeArrayElement::~KviKvsTreeNodeArrayElement() #endif } -void KviKvsTreeNodeArrayElement::contextDescription(QString &szBuffer) +void KviKvsTreeNodeArrayElement::contextDescription(TQString &szBuffer) { szBuffer = "Array Element Evaluation"; } @@ -56,7 +56,7 @@ void KviKvsTreeNodeArrayElement::dump(const char * prefix) { #ifdef COMPILE_NEW_KVS debug("%s ArrayElement",prefix); - QString tmp = prefix; + TQString tmp = prefix; tmp.append(" "); m_pSource->dump(tmp.utf8().data()); m_pIndex->dump(tmp.utf8().data()); @@ -101,7 +101,7 @@ bool KviKvsTreeNodeArrayElement::evaluateReadOnlyInObjectScope(KviKvsObject * o, { if(!val.isNothing()) { - QString szType; + TQString szType; val.getTypeName(szType); c->warning(this,__tr2qs("The argument of the [] subscript didn't evaluate to an array: automatic conversion from %Q supplied"),&szType); } @@ -137,7 +137,7 @@ KviKvsRWEvaluationResult * KviKvsTreeNodeArrayElement::evaluateReadWriteInObject // convert to hash in some way if(!result->result()->isNothing()) { - QString szType; + TQString szType; result->result()->getTypeName(szType); c->warning(this,__tr2qs("The argument of the [] subscript didn't evaluate to an array: automatic conversion from type '%Q' supplied"),&szType); } diff --git a/src/kvirc/kvs/kvi_kvs_treenode_arrayelement.h b/src/kvirc/kvs/kvi_kvs_treenode_arrayelement.h index 9b23926b..1d472032 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_arrayelement.h +++ b/src/kvirc/kvs/kvi_kvs_treenode_arrayelement.h @@ -36,12 +36,12 @@ class KviKvsRunTimeContext; class KVIRC_API KviKvsTreeNodeArrayElement : public KviKvsTreeNodeArrayOrHashElement { public: - KviKvsTreeNodeArrayElement(const QChar * pLocation,KviKvsTreeNodeData * pSource,KviKvsTreeNodeExpression * pIndex); + KviKvsTreeNodeArrayElement(const TQChar * pLocation,KviKvsTreeNodeData * pSource,KviKvsTreeNodeExpression * pIndex); ~KviKvsTreeNodeArrayElement(); protected: KviKvsTreeNodeExpression * m_pIndex; // can't be null public: - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); virtual bool evaluateReadOnly(KviKvsRunTimeContext * c,KviKvsVariant * pBuffer); virtual KviKvsRWEvaluationResult * evaluateReadWrite(KviKvsRunTimeContext * c); diff --git a/src/kvirc/kvs/kvi_kvs_treenode_arrayorhashelement.cpp b/src/kvirc/kvs/kvi_kvs_treenode_arrayorhashelement.cpp index d15d197c..5106ace8 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_arrayorhashelement.cpp +++ b/src/kvirc/kvs/kvi_kvs_treenode_arrayorhashelement.cpp @@ -26,7 +26,7 @@ #include "kvi_kvs_treenode_arrayorhashelement.h" -KviKvsTreeNodeArrayOrHashElement::KviKvsTreeNodeArrayOrHashElement(const QChar * pLocation,KviKvsTreeNodeData * pSource) +KviKvsTreeNodeArrayOrHashElement::KviKvsTreeNodeArrayOrHashElement(const TQChar * pLocation,KviKvsTreeNodeData * pSource) : KviKvsTreeNodeIndirectData(pLocation,pSource) { } diff --git a/src/kvirc/kvs/kvi_kvs_treenode_arrayorhashelement.h b/src/kvirc/kvs/kvi_kvs_treenode_arrayorhashelement.h index 4f5d6793..a790a248 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_arrayorhashelement.h +++ b/src/kvirc/kvs/kvi_kvs_treenode_arrayorhashelement.h @@ -32,7 +32,7 @@ class KVIRC_API KviKvsTreeNodeArrayOrHashElement : public KviKvsTreeNodeIndirectData { public: - KviKvsTreeNodeArrayOrHashElement(const QChar * pLocation,KviKvsTreeNodeData * pSource); + KviKvsTreeNodeArrayOrHashElement(const TQChar * pLocation,KviKvsTreeNodeData * pSource); ~KviKvsTreeNodeArrayOrHashElement(); public: virtual bool isReadOnly(); diff --git a/src/kvirc/kvs/kvi_kvs_treenode_arrayreferenceassert.cpp b/src/kvirc/kvs/kvi_kvs_treenode_arrayreferenceassert.cpp index 698b95c7..0d52c07e 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_arrayreferenceassert.cpp +++ b/src/kvirc/kvs/kvi_kvs_treenode_arrayreferenceassert.cpp @@ -31,7 +31,7 @@ #include "kvi_locale.h" #include "kvi_kvs_object.h" -KviKvsTreeNodeArrayReferenceAssert::KviKvsTreeNodeArrayReferenceAssert(const QChar * pLocation,KviKvsTreeNodeData * pSource) +KviKvsTreeNodeArrayReferenceAssert::KviKvsTreeNodeArrayReferenceAssert(const TQChar * pLocation,KviKvsTreeNodeData * pSource) : KviKvsTreeNodeIndirectData(pLocation,pSource) { } @@ -45,7 +45,7 @@ bool KviKvsTreeNodeArrayReferenceAssert::isReadOnly() return m_pSource->isReadOnly(); } -void KviKvsTreeNodeArrayReferenceAssert::contextDescription(QString &szBuffer) +void KviKvsTreeNodeArrayReferenceAssert::contextDescription(TQString &szBuffer) { szBuffer = "Array Reference Assert"; } @@ -72,7 +72,7 @@ bool KviKvsTreeNodeArrayReferenceAssert::evaluateReadOnlyInObjectScope(KviKvsObj { if(!pBuffer->isNothing()) { - QString szType; + TQString szType; pBuffer->getTypeName(szType); c->error(this,__tr2qs("Array reference assert failed: the variable evaluated to type '%Q'"),&szType); return false; diff --git a/src/kvirc/kvs/kvi_kvs_treenode_arrayreferenceassert.h b/src/kvirc/kvs/kvi_kvs_treenode_arrayreferenceassert.h index 8827cf2f..663068a8 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_arrayreferenceassert.h +++ b/src/kvirc/kvs/kvi_kvs_treenode_arrayreferenceassert.h @@ -36,13 +36,13 @@ class KviKvsObject; class KVIRC_API KviKvsTreeNodeArrayReferenceAssert : public KviKvsTreeNodeIndirectData { public: - KviKvsTreeNodeArrayReferenceAssert(const QChar * pLocation,KviKvsTreeNodeData * pSource); + KviKvsTreeNodeArrayReferenceAssert(const TQChar * pLocation,KviKvsTreeNodeData * pSource); ~KviKvsTreeNodeArrayReferenceAssert(); protected: public: virtual bool isReadOnly(); - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); virtual bool evaluateReadOnly(KviKvsRunTimeContext * c,KviKvsVariant * pBuffer); virtual KviKvsRWEvaluationResult * evaluateReadWrite(KviKvsRunTimeContext * c); diff --git a/src/kvirc/kvs/kvi_kvs_treenode_base.cpp b/src/kvirc/kvs/kvi_kvs_treenode_base.cpp index ee19dd83..64b71c0a 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_base.cpp +++ b/src/kvirc/kvs/kvi_kvs_treenode_base.cpp @@ -26,7 +26,7 @@ #include "kvi_kvs_treenode_base.h" -KviKvsTreeNode::KviKvsTreeNode(const QChar * pLocation) +KviKvsTreeNode::KviKvsTreeNode(const TQChar * pLocation) { #ifdef COMPILE_NEW_KVS m_pParent = 0; diff --git a/src/kvirc/kvs/kvi_kvs_treenode_base.h b/src/kvirc/kvs/kvi_kvs_treenode_base.h index 6f0178f9..2057e38b 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_base.h +++ b/src/kvirc/kvs/kvi_kvs_treenode_base.h @@ -31,21 +31,21 @@ class KVIRC_API KviKvsTreeNode { friend class KviKvsParser; public: - KviKvsTreeNode(const QChar * pLocation); + KviKvsTreeNode(const TQChar * pLocation); virtual ~KviKvsTreeNode(){}; protected: KviKvsTreeNode * m_pParent; - const QChar * m_pLocation; + const TQChar * m_pLocation; public: void setParent(KviKvsTreeNode * p){ m_pParent = p; }; protected: // this is called only by KviKvsParser - void setLocation(const QChar * pLocation){ m_pLocation = pLocation; }; + void setLocation(const TQChar * pLocation){ m_pLocation = pLocation; }; public: - KviKvsTreeNode * parent(){ return m_pParent; }; - const QChar * location(){ return m_pLocation; }; + KviKvsTreeNode * tqparent(){ return m_pParent; }; + const TQChar * location(){ return m_pLocation; }; virtual void dump(const char * prefix) = 0; - virtual void contextDescription(QString &szBuffer) = 0; + virtual void contextDescription(TQString &szBuffer) = 0; }; #endif //!_KVI_KVS_TREENODE_BASE_H_ diff --git a/src/kvirc/kvs/kvi_kvs_treenode_baseobjectfunctioncall.cpp b/src/kvirc/kvs/kvi_kvs_treenode_baseobjectfunctioncall.cpp index 75feafc4..f0045498 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_baseobjectfunctioncall.cpp +++ b/src/kvirc/kvs/kvi_kvs_treenode_baseobjectfunctioncall.cpp @@ -29,7 +29,7 @@ #include "kvi_kvs_object.h" #include "kvi_kvs_variant.h" -KviKvsTreeNodeBaseObjectFunctionCall::KviKvsTreeNodeBaseObjectFunctionCall(const QChar * pLocation,const QString &szBaseClass,const QString &szFncName,KviKvsTreeNodeDataList * pParams) +KviKvsTreeNodeBaseObjectFunctionCall::KviKvsTreeNodeBaseObjectFunctionCall(const TQChar * pLocation,const TQString &szBaseClass,const TQString &szFncName,KviKvsTreeNodeDataList * pParams) : KviKvsTreeNodeObjectFunctionCall(pLocation,szFncName,pParams) { #ifdef COMPILE_NEW_KVS @@ -41,16 +41,16 @@ KviKvsTreeNodeBaseObjectFunctionCall::~KviKvsTreeNodeBaseObjectFunctionCall() { } -void KviKvsTreeNodeBaseObjectFunctionCall::contextDescription(QString &szBuffer) +void KviKvsTreeNodeBaseObjectFunctionCall::contextDescription(TQString &szBuffer) { - KviQString::sprintf(szBuffer,"Base Object Function Call \"%s::%s\"",&m_szBaseClass,&m_szFunctionName); + KviTQString::sprintf(szBuffer,"Base Object Function Call \"%s::%s\"",&m_szBaseClass,&m_szFunctionName); } void KviKvsTreeNodeBaseObjectFunctionCall::dump(const char * prefix) { #ifdef COMPILE_NEW_KVS debug("%s BaseObjectFunctionCall(%s::%s)",prefix,m_szBaseClass.utf8().data(),m_szFunctionName.utf8().data()); - QString tmp = prefix; + TQString tmp = prefix; tmp.append(" "); m_pParams->dump(tmp.utf8().data()); #endif diff --git a/src/kvirc/kvs/kvi_kvs_treenode_baseobjectfunctioncall.h b/src/kvirc/kvs/kvi_kvs_treenode_baseobjectfunctioncall.h index d679c404..1b8df699 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_baseobjectfunctioncall.h +++ b/src/kvirc/kvs/kvi_kvs_treenode_baseobjectfunctioncall.h @@ -36,12 +36,12 @@ class KviKvsRunTimeContext; class KVIRC_API KviKvsTreeNodeBaseObjectFunctionCall : public KviKvsTreeNodeObjectFunctionCall { public: - KviKvsTreeNodeBaseObjectFunctionCall(const QChar * pLocation,const QString &szBaseClass,const QString &szFncName,KviKvsTreeNodeDataList * pParams); + KviKvsTreeNodeBaseObjectFunctionCall(const TQChar * pLocation,const TQString &szBaseClass,const TQString &szFncName,KviKvsTreeNodeDataList * pParams); ~KviKvsTreeNodeBaseObjectFunctionCall(); protected: - QString m_szBaseClass; + TQString m_szBaseClass; public: - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); virtual bool evaluateReadOnlyInObjectScope(KviKvsObject * o,KviKvsRunTimeContext * c,KviKvsVariant * pBuffer); diff --git a/src/kvirc/kvs/kvi_kvs_treenode_callbackcommand.cpp b/src/kvirc/kvs/kvi_kvs_treenode_callbackcommand.cpp index cf4c5494..18f29063 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_callbackcommand.cpp +++ b/src/kvirc/kvs/kvi_kvs_treenode_callbackcommand.cpp @@ -31,7 +31,7 @@ -KviKvsTreeNodeCallbackCommand::KviKvsTreeNodeCallbackCommand(const QChar * pLocation,const QString &szCmdName,KviKvsTreeNodeDataList * params,KviKvsScript * pCallback) +KviKvsTreeNodeCallbackCommand::KviKvsTreeNodeCallbackCommand(const TQChar * pLocation,const TQString &szCmdName,KviKvsTreeNodeDataList * params,KviKvsScript * pCallback) : KviKvsTreeNodeCommandWithParameters(pLocation,szCmdName,params) { #ifdef COMPILE_NEW_KVS @@ -47,9 +47,9 @@ KviKvsTreeNodeCallbackCommand::~KviKvsTreeNodeCallbackCommand() #endif } -void KviKvsTreeNodeCallbackCommand::contextDescription(QString &szBuffer) +void KviKvsTreeNodeCallbackCommand::contextDescription(TQString &szBuffer) { - KviQString::sprintf(szBuffer,"Callback Command \"%s\"",&m_szCmdName); + KviTQString::sprintf(szBuffer,"Callback Command \"%s\"",&m_szCmdName); } void KviKvsTreeNodeCallbackCommand::dump(const char * prefix) @@ -65,7 +65,7 @@ void KviKvsTreeNodeCallbackCommand::dump(const char * prefix) void KviKvsTreeNodeCallbackCommand::dumpCallback(const char * prefix) { #ifdef COMPILE_NEW_KVS - QString tmp = prefix; + TQString tmp = prefix; tmp.append(" "); m_pCallback->dump(tmp.utf8().data()); #endif diff --git a/src/kvirc/kvs/kvi_kvs_treenode_callbackcommand.h b/src/kvirc/kvs/kvi_kvs_treenode_callbackcommand.h index dc061f64..73b125b2 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_callbackcommand.h +++ b/src/kvirc/kvs/kvi_kvs_treenode_callbackcommand.h @@ -34,12 +34,12 @@ class KviKvsScript; class KVIRC_API KviKvsTreeNodeCallbackCommand : public KviKvsTreeNodeCommandWithParameters { public: - KviKvsTreeNodeCallbackCommand(const QChar * pLocation,const QString &szCmdName,KviKvsTreeNodeDataList * params,KviKvsScript * pCallback); + KviKvsTreeNodeCallbackCommand(const TQChar * pLocation,const TQString &szCmdName,KviKvsTreeNodeDataList * params,KviKvsScript * pCallback); ~KviKvsTreeNodeCallbackCommand(); protected: KviKvsScript * m_pCallback; public: - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); void dumpCallback(const char * prefix); }; diff --git a/src/kvirc/kvs/kvi_kvs_treenode_command.cpp b/src/kvirc/kvs/kvi_kvs_treenode_command.cpp index 4da19dfa..2a3c860e 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_command.cpp +++ b/src/kvirc/kvs/kvi_kvs_treenode_command.cpp @@ -27,7 +27,7 @@ #include "kvi_kvs_treenode_command.h" #include "kvi_kvs_treenode_switchlist.h" -KviKvsTreeNodeCommand::KviKvsTreeNodeCommand(const QChar * pLocation,const QString &szCmdName) +KviKvsTreeNodeCommand::KviKvsTreeNodeCommand(const TQChar * pLocation,const TQString &szCmdName) : KviKvsTreeNodeInstruction(pLocation) { #ifdef COMPILE_NEW_KVS @@ -45,10 +45,10 @@ KviKvsTreeNodeCommand::~KviKvsTreeNodeCommand() //#warning "All the dump() functions could be killed (or moved to print on the kvirc windows)" -void KviKvsTreeNodeCommand::contextDescription(QString &szBuffer) +void KviKvsTreeNodeCommand::contextDescription(TQString &szBuffer) { #ifdef COMPILE_NEW_KVS - KviQString::sprintf(szBuffer,"Command \"%s\"",&m_szCmdName); + KviTQString::sprintf(szBuffer,"Command \"%s\"",&m_szCmdName); #endif } @@ -64,7 +64,7 @@ void KviKvsTreeNodeCommand::dumpSwitchList(const char * prefix) { #ifdef COMPILE_NEW_KVS if(!m_pSwitches)return; - QString tmp = prefix; + TQString tmp = prefix; tmp.append(" "); m_pSwitches->dump(tmp.utf8().data()); #endif diff --git a/src/kvirc/kvs/kvi_kvs_treenode_command.h b/src/kvirc/kvs/kvi_kvs_treenode_command.h index cf58774e..aff3f552 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_command.h +++ b/src/kvirc/kvs/kvi_kvs_treenode_command.h @@ -36,16 +36,16 @@ class KVIRC_API KviKvsTreeNodeCommand : public KviKvsTreeNodeInstruction // never instantiated friend class KviKvsParser; public: - KviKvsTreeNodeCommand(const QChar * pLocation,const QString &szCmdName); + KviKvsTreeNodeCommand(const TQChar * pLocation,const TQString &szCmdName); ~KviKvsTreeNodeCommand(); protected: - QString m_szCmdName; // command visible name + TQString m_szCmdName; // command visible name KviKvsTreeNodeSwitchList * m_pSwitches; // MAY BE 0! public: - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); void dumpSwitchList(const char * prefix); - const QString & commandName(){ return m_szCmdName; }; + const TQString & commandName(){ return m_szCmdName; }; protected: void setSwitchList(KviKvsTreeNodeSwitchList * sw); }; diff --git a/src/kvirc/kvs/kvi_kvs_treenode_commandevaluation.cpp b/src/kvirc/kvs/kvi_kvs_treenode_commandevaluation.cpp index 1fc5b80b..e2e71ec4 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_commandevaluation.cpp +++ b/src/kvirc/kvs/kvi_kvs_treenode_commandevaluation.cpp @@ -29,7 +29,7 @@ #include "kvi_kvs_runtimecontext.h" #include "kvi_kvs_variant.h" -KviKvsTreeNodeCommandEvaluation::KviKvsTreeNodeCommandEvaluation(const QChar * pLocation,KviKvsTreeNodeInstruction * pInstruction) +KviKvsTreeNodeCommandEvaluation::KviKvsTreeNodeCommandEvaluation(const TQChar * pLocation,KviKvsTreeNodeInstruction * pInstruction) : KviKvsTreeNodeData(pLocation) { #ifdef COMPILE_NEW_KVS diff --git a/src/kvirc/kvs/kvi_kvs_treenode_commandevaluation.h b/src/kvirc/kvs/kvi_kvs_treenode_commandevaluation.h index 3ff71555..cb8efb3c 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_commandevaluation.h +++ b/src/kvirc/kvs/kvi_kvs_treenode_commandevaluation.h @@ -35,7 +35,7 @@ class KviKvsVariant; class KviKvsTreeNodeCommandEvaluation : public KviKvsTreeNodeData { public: - KviKvsTreeNodeCommandEvaluation(const QChar * pLocation,KviKvsTreeNodeInstruction * pInstruction); + KviKvsTreeNodeCommandEvaluation(const TQChar * pLocation,KviKvsTreeNodeInstruction * pInstruction); ~KviKvsTreeNodeCommandEvaluation(); protected: KviKvsTreeNodeInstruction * m_pInstruction; // owned, never 0 diff --git a/src/kvirc/kvs/kvi_kvs_treenode_commandwithparameters.cpp b/src/kvirc/kvs/kvi_kvs_treenode_commandwithparameters.cpp index dd0544ff..3efef2a4 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_commandwithparameters.cpp +++ b/src/kvirc/kvs/kvi_kvs_treenode_commandwithparameters.cpp @@ -27,7 +27,7 @@ #include "kvi_kvs_treenode_commandwithparameters.h" #include "kvi_kvs_treenode_datalist.h" -KviKvsTreeNodeCommandWithParameters::KviKvsTreeNodeCommandWithParameters(const QChar * pLocation,const QString &szCmdName,KviKvsTreeNodeDataList * params) +KviKvsTreeNodeCommandWithParameters::KviKvsTreeNodeCommandWithParameters(const TQChar * pLocation,const TQString &szCmdName,KviKvsTreeNodeDataList * params) : KviKvsTreeNodeCommand(pLocation,szCmdName) { m_pParams = params; @@ -39,10 +39,10 @@ KviKvsTreeNodeCommandWithParameters::~KviKvsTreeNodeCommandWithParameters() delete m_pParams; } -void KviKvsTreeNodeCommandWithParameters::contextDescription(QString &szBuffer) +void KviKvsTreeNodeCommandWithParameters::contextDescription(TQString &szBuffer) { #ifdef COMPILE_NEW_KVS - KviQString::sprintf(szBuffer,"Command With Parameters \"%s\"",&m_szCmdName); + KviTQString::sprintf(szBuffer,"Command With Parameters \"%s\"",&m_szCmdName); #endif } @@ -59,7 +59,7 @@ void KviKvsTreeNodeCommandWithParameters::dump(const char * prefix) void KviKvsTreeNodeCommandWithParameters::dumpParameterList(const char * prefix) { #ifdef COMPILE_NEW_KVS - QString tmp = prefix; + TQString tmp = prefix; tmp.append(" "); m_pParams->dump(tmp.utf8().data()); #endif diff --git a/src/kvirc/kvs/kvi_kvs_treenode_commandwithparameters.h b/src/kvirc/kvs/kvi_kvs_treenode_commandwithparameters.h index 769e72f7..f8991fee 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_commandwithparameters.h +++ b/src/kvirc/kvs/kvi_kvs_treenode_commandwithparameters.h @@ -35,13 +35,13 @@ class KVIRC_API KviKvsTreeNodeCommandWithParameters : public KviKvsTreeNodeComma // never instantiated public: // params can't be 0! - KviKvsTreeNodeCommandWithParameters(const QChar * pLocation,const QString &szCmdName,KviKvsTreeNodeDataList * params); + KviKvsTreeNodeCommandWithParameters(const TQChar * pLocation,const TQString &szCmdName,KviKvsTreeNodeDataList * params); ~KviKvsTreeNodeCommandWithParameters(); protected: KviKvsTreeNodeDataList * m_pParams; // never 0 public: KviKvsTreeNodeDataList * params(){ return m_pParams; }; - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); void dumpParameterList(const char * prefix); }; diff --git a/src/kvirc/kvs/kvi_kvs_treenode_compositedata.cpp b/src/kvirc/kvs/kvi_kvs_treenode_compositedata.cpp index aae8a9cb..c303cebb 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_compositedata.cpp +++ b/src/kvirc/kvs/kvi_kvs_treenode_compositedata.cpp @@ -30,11 +30,11 @@ #define DEBUGME -KviKvsTreeNodeCompositeData::KviKvsTreeNodeCompositeData(const QChar * pLocation,KviPointerList * pSubData) +KviKvsTreeNodeCompositeData::KviKvsTreeNodeCompositeData(const TQChar * pLocation,KviPointerList * pSubData) : KviKvsTreeNodeData(pLocation) { #ifdef DEBUGME - if(pSubData->count() < 2)debug("KviKvsTreeNodeCompositeData constructor called with less than two children!"); + if(pSubData->count() < 2)debug("KviKvsTreeNodeCompositeData constructor called with less than two tqchildren!"); #endif m_pSubData = pSubData; m_pSubData->setAutoDelete(true); @@ -50,7 +50,7 @@ KviKvsTreeNodeCompositeData::~KviKvsTreeNodeCompositeData() bool KviKvsTreeNodeCompositeData::evaluateReadOnly(KviKvsRunTimeContext * c,KviKvsVariant * pBuffer) { - QString * pS = new QString(); + TQString * pS = new TQString(); pBuffer->setString(pS); @@ -68,7 +68,7 @@ bool KviKvsTreeNodeCompositeData::evaluateReadOnly(KviKvsRunTimeContext * c,KviK return true; } -void KviKvsTreeNodeCompositeData::contextDescription(QString &szBuffer) +void KviKvsTreeNodeCompositeData::contextDescription(TQString &szBuffer) { szBuffer = "Composite Data Evaluation (Implicit String Cast)"; } @@ -76,7 +76,7 @@ void KviKvsTreeNodeCompositeData::contextDescription(QString &szBuffer) void KviKvsTreeNodeCompositeData::dump(const char * prefix) { debug("%s CompositeData",prefix); - QString tmp = prefix; + TQString tmp = prefix; tmp.append(" "); for(KviKvsTreeNodeData * p = m_pSubData->first();p;p = m_pSubData->next()) { diff --git a/src/kvirc/kvs/kvi_kvs_treenode_compositedata.h b/src/kvirc/kvs/kvi_kvs_treenode_compositedata.h index b9b549bd..065a4a7e 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_compositedata.h +++ b/src/kvirc/kvs/kvi_kvs_treenode_compositedata.h @@ -33,13 +33,13 @@ class KVIRC_API KviKvsTreeNodeCompositeData : public KviKvsTreeNodeData { public: - KviKvsTreeNodeCompositeData(const QChar * pLocation,KviPointerList * pSubData); + KviKvsTreeNodeCompositeData(const TQChar * pLocation,KviPointerList * pSubData); ~KviKvsTreeNodeCompositeData(); protected: KviPointerList * m_pSubData; public: virtual bool evaluateReadOnly(KviKvsRunTimeContext * c,KviKvsVariant * pBuffer); - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); }; diff --git a/src/kvirc/kvs/kvi_kvs_treenode_constantdata.cpp b/src/kvirc/kvs/kvi_kvs_treenode_constantdata.cpp index a52930eb..703cb40f 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_constantdata.cpp +++ b/src/kvirc/kvs/kvi_kvs_treenode_constantdata.cpp @@ -27,7 +27,7 @@ #include "kvi_kvs_treenode_constantdata.h" -KviKvsTreeNodeConstantData::KviKvsTreeNodeConstantData(const QChar * pLocation,KviKvsVariant * v) +KviKvsTreeNodeConstantData::KviKvsTreeNodeConstantData(const TQChar * pLocation,KviKvsVariant * v) : KviKvsTreeNodeData(pLocation) { m_pValue = v; @@ -39,7 +39,7 @@ KviKvsTreeNodeConstantData::~KviKvsTreeNodeConstantData() delete m_pValue; } -void KviKvsTreeNodeConstantData::contextDescription(QString &szBuffer) +void KviKvsTreeNodeConstantData::contextDescription(TQString &szBuffer) { szBuffer = "Constant Data Evaluation"; } @@ -68,7 +68,7 @@ bool KviKvsTreeNodeConstantData::convertStringConstantToNumeric() void KviKvsTreeNodeConstantData::dump(const char * prefix) { debug("%s ConstantData",prefix); - QString tmp = prefix; + TQString tmp = prefix; tmp.prepend(" "); m_pValue->dump(tmp.utf8().data()); } diff --git a/src/kvirc/kvs/kvi_kvs_treenode_constantdata.h b/src/kvirc/kvs/kvi_kvs_treenode_constantdata.h index 4cb0f947..489caac5 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_constantdata.h +++ b/src/kvirc/kvs/kvi_kvs_treenode_constantdata.h @@ -33,13 +33,13 @@ class KVIRC_API KviKvsTreeNodeConstantData : public KviKvsTreeNodeData { public: - KviKvsTreeNodeConstantData(const QChar * pLocation,KviKvsVariant * v); + KviKvsTreeNodeConstantData(const TQChar * pLocation,KviKvsVariant * v); ~KviKvsTreeNodeConstantData(); protected: KviKvsVariant * m_pValue; // literal value of the parameter public: virtual bool evaluateReadOnly(KviKvsRunTimeContext * c,KviKvsVariant *pBuffer); - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); diff --git a/src/kvirc/kvs/kvi_kvs_treenode_corecallbackcommand.cpp b/src/kvirc/kvs/kvi_kvs_treenode_corecallbackcommand.cpp index 191a0f6c..d71f9eb2 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_corecallbackcommand.cpp +++ b/src/kvirc/kvs/kvi_kvs_treenode_corecallbackcommand.cpp @@ -31,7 +31,7 @@ #include "kvi_kvs_runtimecontext.h" -KviKvsTreeNodeCoreCallbackCommand::KviKvsTreeNodeCoreCallbackCommand(const QChar * pLocation,const QString &szCmdName,KviKvsTreeNodeDataList * params,KviKvsCoreCallbackCommandExecRoutine * r,KviKvsScript * pCallback) +KviKvsTreeNodeCoreCallbackCommand::KviKvsTreeNodeCoreCallbackCommand(const TQChar * pLocation,const TQString &szCmdName,KviKvsTreeNodeDataList * params,KviKvsCoreCallbackCommandExecRoutine * r,KviKvsScript * pCallback) : KviKvsTreeNodeCallbackCommand(pLocation,szCmdName,params,pCallback) { m_pExecRoutine = r; @@ -41,9 +41,9 @@ KviKvsTreeNodeCoreCallbackCommand::~KviKvsTreeNodeCoreCallbackCommand() { } -void KviKvsTreeNodeCoreCallbackCommand::contextDescription(QString &szBuffer) +void KviKvsTreeNodeCoreCallbackCommand::contextDescription(TQString &szBuffer) { - KviQString::sprintf(szBuffer,"Core Callback Command \"%Q\"",&m_szCmdName); + KviTQString::sprintf(szBuffer,"Core Callback Command \"%Q\"",&m_szCmdName); } void KviKvsTreeNodeCoreCallbackCommand::dump(const char * prefix) diff --git a/src/kvirc/kvs/kvi_kvs_treenode_corecallbackcommand.h b/src/kvirc/kvs/kvi_kvs_treenode_corecallbackcommand.h index fb514150..499db2b3 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_corecallbackcommand.h +++ b/src/kvirc/kvs/kvi_kvs_treenode_corecallbackcommand.h @@ -37,12 +37,12 @@ class KviKvsRunTimeContext; class KVIRC_API KviKvsTreeNodeCoreCallbackCommand : public KviKvsTreeNodeCallbackCommand { public: - KviKvsTreeNodeCoreCallbackCommand(const QChar * pLocation,const QString &szCmdName,KviKvsTreeNodeDataList * params,KviKvsCoreCallbackCommandExecRoutine * r,KviKvsScript * pCallback); + KviKvsTreeNodeCoreCallbackCommand(const TQChar * pLocation,const TQString &szCmdName,KviKvsTreeNodeDataList * params,KviKvsCoreCallbackCommandExecRoutine * r,KviKvsScript * pCallback); ~KviKvsTreeNodeCoreCallbackCommand(); protected: KviKvsCoreCallbackCommandExecRoutine * m_pExecRoutine; public: - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); virtual bool execute(KviKvsRunTimeContext * c); }; diff --git a/src/kvirc/kvs/kvi_kvs_treenode_corefunctioncall.cpp b/src/kvirc/kvs/kvi_kvs_treenode_corefunctioncall.cpp index 713aa393..3c623f71 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_corefunctioncall.cpp +++ b/src/kvirc/kvs/kvi_kvs_treenode_corefunctioncall.cpp @@ -27,7 +27,7 @@ #include "kvi_kvs_treenode_corefunctioncall.h" #include "kvi_kvs_runtimecontext.h" -KviKvsTreeNodeCoreFunctionCall::KviKvsTreeNodeCoreFunctionCall(const QChar * pLocation,const QString &szFncName,KviKvsCoreFunctionExecRoutine * r,KviKvsTreeNodeDataList * pParams) +KviKvsTreeNodeCoreFunctionCall::KviKvsTreeNodeCoreFunctionCall(const TQChar * pLocation,const TQString &szFncName,KviKvsCoreFunctionExecRoutine * r,KviKvsTreeNodeDataList * pParams) : KviKvsTreeNodeFunctionCall(pLocation,szFncName,pParams) { m_pExecRoutine = r; @@ -37,16 +37,16 @@ KviKvsTreeNodeCoreFunctionCall::~KviKvsTreeNodeCoreFunctionCall() { } -void KviKvsTreeNodeCoreFunctionCall::contextDescription(QString &szBuffer) +void KviKvsTreeNodeCoreFunctionCall::contextDescription(TQString &szBuffer) { - KviQString::sprintf(szBuffer,"Core Function Call \"%Q\"",&m_szFunctionName); + KviTQString::sprintf(szBuffer,"Core Function Call \"%Q\"",&m_szFunctionName); } void KviKvsTreeNodeCoreFunctionCall::dump(const char * prefix) { debug("%s CoreFunctionCall(%s)",prefix,m_szFunctionName.utf8().data()); - QString tmp = prefix; + TQString tmp = prefix; tmp.append(" "); m_pParams->dump(tmp.utf8().data()); } diff --git a/src/kvirc/kvs/kvi_kvs_treenode_corefunctioncall.h b/src/kvirc/kvs/kvi_kvs_treenode_corefunctioncall.h index 88d1f0d3..9cbf18db 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_corefunctioncall.h +++ b/src/kvirc/kvs/kvi_kvs_treenode_corefunctioncall.h @@ -35,12 +35,12 @@ class KviKvsRunTimeContext; class KVIRC_API KviKvsTreeNodeCoreFunctionCall : public KviKvsTreeNodeFunctionCall { public: - KviKvsTreeNodeCoreFunctionCall(const QChar * pLocation,const QString &szFncName,KviKvsCoreFunctionExecRoutine * r,KviKvsTreeNodeDataList * pParams); + KviKvsTreeNodeCoreFunctionCall(const TQChar * pLocation,const TQString &szFncName,KviKvsCoreFunctionExecRoutine * r,KviKvsTreeNodeDataList * pParams); ~KviKvsTreeNodeCoreFunctionCall(); protected: KviKvsCoreFunctionExecRoutine * m_pExecRoutine; public: - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); virtual bool evaluateReadOnly(KviKvsRunTimeContext * c,KviKvsVariant * pBuffer); }; diff --git a/src/kvirc/kvs/kvi_kvs_treenode_coresimplecommand.cpp b/src/kvirc/kvs/kvi_kvs_treenode_coresimplecommand.cpp index 55fcfc3b..18973224 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_coresimplecommand.cpp +++ b/src/kvirc/kvs/kvi_kvs_treenode_coresimplecommand.cpp @@ -29,7 +29,7 @@ #include "kvi_kvs_treenode_switchlist.h" #include "kvi_kvs_runtimecontext.h" -KviKvsTreeNodeCoreSimpleCommand::KviKvsTreeNodeCoreSimpleCommand(const QChar * pLocation,const QString &szCmdName,KviKvsTreeNodeDataList * params,KviKvsCoreSimpleCommandExecRoutine * r) +KviKvsTreeNodeCoreSimpleCommand::KviKvsTreeNodeCoreSimpleCommand(const TQChar * pLocation,const TQString &szCmdName,KviKvsTreeNodeDataList * params,KviKvsCoreSimpleCommandExecRoutine * r) : KviKvsTreeNodeSimpleCommand(pLocation,szCmdName,params) { m_pExecRoutine = r; @@ -40,9 +40,9 @@ KviKvsTreeNodeCoreSimpleCommand::~KviKvsTreeNodeCoreSimpleCommand() { } -void KviKvsTreeNodeCoreSimpleCommand::contextDescription(QString &szBuffer) +void KviKvsTreeNodeCoreSimpleCommand::contextDescription(TQString &szBuffer) { - KviQString::sprintf(szBuffer,"Core Simple Command \"%Q\"",&m_szCmdName); + KviTQString::sprintf(szBuffer,"Core Simple Command \"%Q\"",&m_szCmdName); } void KviKvsTreeNodeCoreSimpleCommand::dump(const char * prefix) diff --git a/src/kvirc/kvs/kvi_kvs_treenode_coresimplecommand.h b/src/kvirc/kvs/kvi_kvs_treenode_coresimplecommand.h index 764914e0..290b0cf6 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_coresimplecommand.h +++ b/src/kvirc/kvs/kvi_kvs_treenode_coresimplecommand.h @@ -35,12 +35,12 @@ class KviKvsRunTimeContext; class KVIRC_API KviKvsTreeNodeCoreSimpleCommand : public KviKvsTreeNodeSimpleCommand { public: - KviKvsTreeNodeCoreSimpleCommand(const QChar * pLocation,const QString &szCmdName,KviKvsTreeNodeDataList * params,KviKvsCoreSimpleCommandExecRoutine * r); + KviKvsTreeNodeCoreSimpleCommand(const TQChar * pLocation,const TQString &szCmdName,KviKvsTreeNodeDataList * params,KviKvsCoreSimpleCommandExecRoutine * r); ~KviKvsTreeNodeCoreSimpleCommand(); private: KviKvsCoreSimpleCommandExecRoutine * m_pExecRoutine; // shallow pointer! public: - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); virtual bool execute(KviKvsRunTimeContext * c); }; diff --git a/src/kvirc/kvs/kvi_kvs_treenode_data.cpp b/src/kvirc/kvs/kvi_kvs_treenode_data.cpp index 6d5ad63b..e7b68c5f 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_data.cpp +++ b/src/kvirc/kvs/kvi_kvs_treenode_data.cpp @@ -28,7 +28,7 @@ #include "kvi_locale.h" -KviKvsTreeNodeData::KviKvsTreeNodeData(const QChar * pLocation) +KviKvsTreeNodeData::KviKvsTreeNodeData(const TQChar * pLocation) : KviKvsTreeNode(pLocation), m_pEndingLocation(0) { } @@ -38,7 +38,7 @@ KviKvsTreeNodeData::~KviKvsTreeNodeData() { } -void KviKvsTreeNodeData::contextDescription(QString &szBuffer) +void KviKvsTreeNodeData::contextDescription(TQString &szBuffer) { szBuffer = "Data Evaluation"; } diff --git a/src/kvirc/kvs/kvi_kvs_treenode_data.h b/src/kvirc/kvs/kvi_kvs_treenode_data.h index dd1e3c6a..18d8d7b4 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_data.h +++ b/src/kvirc/kvs/kvi_kvs_treenode_data.h @@ -34,13 +34,13 @@ class KviKvsObject; class KVIRC_API KviKvsTreeNodeData : public KviKvsTreeNode { public: - KviKvsTreeNodeData(const QChar * pLocation); + KviKvsTreeNodeData(const TQChar * pLocation); ~KviKvsTreeNodeData(); protected: - const QChar * m_pEndingLocation; // note that this MIGHT be not set (it's set for sure for anything parsed by parseCommaSeparatedParameter() + const TQChar * m_pEndingLocation; // note that this MIGHT be not set (it's set for sure for anything parsed by parseCommaSeparatedParameter() public: - void setEndingLocation(const QChar * pEndingLocation){ m_pEndingLocation = pEndingLocation; }; - const QChar * endingLocation(){ return m_pEndingLocation; }; + void setEndingLocation(const TQChar * pEndingLocation){ m_pEndingLocation = pEndingLocation; }; + const TQChar * endingLocation(){ return m_pEndingLocation; }; virtual bool evaluateReadOnly(KviKvsRunTimeContext * c,KviKvsVariant * pBuffer); virtual KviKvsRWEvaluationResult * evaluateReadWrite(KviKvsRunTimeContext * c); // error by default @@ -48,7 +48,7 @@ public: virtual bool evaluateReadOnlyInObjectScope(KviKvsObject * o,KviKvsRunTimeContext * c,KviKvsVariant * pBuffer); // error by default virtual KviKvsRWEvaluationResult * evaluateReadWriteInObjectScope(KviKvsObject * o,KviKvsRunTimeContext * c); // error by default - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); virtual bool isReadOnly(); // true by default diff --git a/src/kvirc/kvs/kvi_kvs_treenode_datalist.cpp b/src/kvirc/kvs/kvi_kvs_treenode_datalist.cpp index 18da8280..68a6770d 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_datalist.cpp +++ b/src/kvirc/kvs/kvi_kvs_treenode_datalist.cpp @@ -29,7 +29,7 @@ #include "kvi_qstring.h" -KviKvsTreeNodeDataList::KviKvsTreeNodeDataList(const QChar * pLocation) +KviKvsTreeNodeDataList::KviKvsTreeNodeDataList(const TQChar * pLocation) : KviKvsTreeNode(pLocation) { m_pDataList = new KviPointerList(); @@ -60,7 +60,7 @@ KviKvsTreeNodeData * KviKvsTreeNodeDataList::item(unsigned int uIdx) } -void KviKvsTreeNodeDataList::contextDescription(QString &szBuffer) +void KviKvsTreeNodeDataList::contextDescription(TQString &szBuffer) { szBuffer = "Data List Evaluation"; } @@ -68,7 +68,7 @@ void KviKvsTreeNodeDataList::contextDescription(QString &szBuffer) void KviKvsTreeNodeDataList::dump(const char * prefix) { debug("%s DataList",prefix); - QString tmp = prefix; + TQString tmp = prefix; tmp.append(" "); for(KviKvsTreeNodeData * t = m_pDataList->first();t;t = m_pDataList->next()) { diff --git a/src/kvirc/kvs/kvi_kvs_treenode_datalist.h b/src/kvirc/kvs/kvi_kvs_treenode_datalist.h index 1a370a41..50c2f640 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_datalist.h +++ b/src/kvirc/kvs/kvi_kvs_treenode_datalist.h @@ -38,7 +38,7 @@ class KVIRC_API KviKvsTreeNodeDataList : public KviKvsTreeNode { friend class KviKvsParser; public: - KviKvsTreeNodeDataList(const QChar * pLocation); + KviKvsTreeNodeDataList(const TQChar * pLocation); ~KviKvsTreeNodeDataList(); protected: KviPointerList * m_pDataList; @@ -49,7 +49,7 @@ public: KviKvsTreeNodeData * item(unsigned int uIdx); KviKvsTreeNodeData * releaseFirst(); bool evaluate(KviKvsRunTimeContext * c,KviKvsVariantList * pBuffer); - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); }; diff --git a/src/kvirc/kvs/kvi_kvs_treenode_expression.cpp b/src/kvirc/kvs/kvi_kvs_treenode_expression.cpp index ae3ec45b..837ef84d 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_expression.cpp +++ b/src/kvirc/kvs/kvi_kvs_treenode_expression.cpp @@ -29,7 +29,7 @@ #include -KviKvsTreeNodeExpression::KviKvsTreeNodeExpression(const QChar * pLocation) +KviKvsTreeNodeExpression::KviKvsTreeNodeExpression(const TQChar * pLocation) : KviKvsTreeNodeData(pLocation) { m_pParentExpression = 0; @@ -40,7 +40,7 @@ KviKvsTreeNodeExpression::~KviKvsTreeNodeExpression() } -void KviKvsTreeNodeExpression::contextDescription(QString &szBuffer) +void KviKvsTreeNodeExpression::contextDescription(TQString &szBuffer) { szBuffer = "Expression Evaluation"; } @@ -77,11 +77,11 @@ void KviKvsTreeNodeExpression::setRight(KviKvsTreeNodeExpression *) debug("KviKvsTreeNodeExpression::setRight() : should never end up here!"); } -KviKvsTreeNodeExpression * KviKvsTreeNodeExpression::parentWithPrecedenceLowerThan(int iPrec) +KviKvsTreeNodeExpression * KviKvsTreeNodeExpression::tqparentWithPrecedenceLowerThan(int iPrec) { if(precedence() > iPrec)return this; - if(!parentExpression())return 0; - return parentExpression()->parentWithPrecedenceLowerThan(iPrec); + if(!tqparentExpression())return 0; + return tqparentExpression()->tqparentWithPrecedenceLowerThan(iPrec); } int KviKvsTreeNodeExpression::firstBinaryOperator() @@ -93,7 +93,7 @@ int KviKvsTreeNodeExpression::firstBinaryOperator() /////////////////////////////////////////////////////////////////////////////// -KviKvsTreeNodeExpressionVariableOperand::KviKvsTreeNodeExpressionVariableOperand(const QChar * pLocation,KviKvsTreeNodeData * pData) +KviKvsTreeNodeExpressionVariableOperand::KviKvsTreeNodeExpressionVariableOperand(const TQChar * pLocation,KviKvsTreeNodeData * pData) : KviKvsTreeNodeExpression(pLocation) { m_pData = pData; @@ -105,7 +105,7 @@ KviKvsTreeNodeExpressionVariableOperand::~KviKvsTreeNodeExpressionVariableOperan delete m_pData; } -void KviKvsTreeNodeExpressionVariableOperand::contextDescription(QString &szBuffer) +void KviKvsTreeNodeExpressionVariableOperand::contextDescription(TQString &szBuffer) { szBuffer = "Expression Variable Operand Evaluation"; } @@ -113,7 +113,7 @@ void KviKvsTreeNodeExpressionVariableOperand::contextDescription(QString &szBuff void KviKvsTreeNodeExpressionVariableOperand::dump(const char * prefix) { debug("%s ExpressionVariableOperand",prefix); - QString tmp = prefix; + TQString tmp = prefix; tmp.append(" "); m_pData->dump(tmp.utf8().data()); } @@ -126,7 +126,7 @@ bool KviKvsTreeNodeExpressionVariableOperand::evaluateReadOnly(KviKvsRunTimeCont /////////////////////////////////////////////////////////////////////////////// -KviKvsTreeNodeExpressionConstantOperand::KviKvsTreeNodeExpressionConstantOperand(const QChar * pLocation,KviKvsVariant * pConstant) +KviKvsTreeNodeExpressionConstantOperand::KviKvsTreeNodeExpressionConstantOperand(const TQChar * pLocation,KviKvsVariant * pConstant) : KviKvsTreeNodeExpression(pLocation) { #ifdef COMPILE_NEW_KVS @@ -141,7 +141,7 @@ KviKvsTreeNodeExpressionConstantOperand::~KviKvsTreeNodeExpressionConstantOperan #endif } -void KviKvsTreeNodeExpressionConstantOperand::contextDescription(QString &szBuffer) +void KviKvsTreeNodeExpressionConstantOperand::contextDescription(TQString &szBuffer) { #ifdef COMPILE_NEW_KVS szBuffer = "Expression Constant Operand Evaluation"; @@ -153,7 +153,7 @@ void KviKvsTreeNodeExpressionConstantOperand::dump(const char * prefix) { #ifdef COMPILE_NEW_KVS debug("%s ExpressionConstantOperand",prefix); - QString tmp = prefix; + TQString tmp = prefix; tmp.append(" "); m_pConstant->dump(tmp.utf8().data()); #endif @@ -170,7 +170,7 @@ bool KviKvsTreeNodeExpressionConstantOperand::evaluateReadOnly(KviKvsRunTimeCont /////////////////////////////////////////////////////////////////////////////// -KviKvsTreeNodeExpressionOperator::KviKvsTreeNodeExpressionOperator(const QChar * pLocation) +KviKvsTreeNodeExpressionOperator::KviKvsTreeNodeExpressionOperator(const TQChar * pLocation) : KviKvsTreeNodeExpression(pLocation) { } @@ -179,7 +179,7 @@ KviKvsTreeNodeExpressionOperator::~KviKvsTreeNodeExpressionOperator() { } -void KviKvsTreeNodeExpressionOperator::contextDescription(QString &szBuffer) +void KviKvsTreeNodeExpressionOperator::contextDescription(TQString &szBuffer) { #ifdef COMPILE_NEW_KVS szBuffer = "Expression Operator Evaluation"; @@ -199,7 +199,7 @@ void KviKvsTreeNodeExpressionOperator::dump(const char * prefix) /////////////////////////////////////////////////////////////////////////////// -KviKvsTreeNodeExpressionUnaryOperator::KviKvsTreeNodeExpressionUnaryOperator(const QChar * pLocation,KviKvsTreeNodeExpression * pData) +KviKvsTreeNodeExpressionUnaryOperator::KviKvsTreeNodeExpressionUnaryOperator(const TQChar * pLocation,KviKvsTreeNodeExpression * pData) : KviKvsTreeNodeExpressionOperator(pLocation) { #ifdef COMPILE_NEW_KVS @@ -216,7 +216,7 @@ KviKvsTreeNodeExpressionUnaryOperator::~KviKvsTreeNodeExpressionUnaryOperator() #endif } -void KviKvsTreeNodeExpressionUnaryOperator::contextDescription(QString &szBuffer) +void KviKvsTreeNodeExpressionUnaryOperator::contextDescription(TQString &szBuffer) { #ifdef COMPILE_NEW_KVS szBuffer = "Expression Unary Operator Evaluation"; @@ -230,7 +230,7 @@ void KviKvsTreeNodeExpressionUnaryOperator::dump(const char * prefix) { #ifdef COMPILE_NEW_KVS debug("%s ExpressionUnaryOperator",prefix); - QString tmp = prefix; + TQString tmp = prefix; tmp.append(" "); m_pData->dump(tmp.utf8().data()); #endif @@ -254,7 +254,7 @@ bool KviKvsTreeNodeExpressionUnaryOperator::evaluateOperand(KviKvsRunTimeContext /////////////////////////////////////////////////////////////////////////////// -KviKvsTreeNodeExpressionUnaryOperatorNegate::KviKvsTreeNodeExpressionUnaryOperatorNegate(const QChar * pLocation,KviKvsTreeNodeExpression * pData) +KviKvsTreeNodeExpressionUnaryOperatorNegate::KviKvsTreeNodeExpressionUnaryOperatorNegate(const TQChar * pLocation,KviKvsTreeNodeExpression * pData) : KviKvsTreeNodeExpressionUnaryOperator(pLocation,pData) { } @@ -264,7 +264,7 @@ KviKvsTreeNodeExpressionUnaryOperatorNegate::~KviKvsTreeNodeExpressionUnaryOpera } -void KviKvsTreeNodeExpressionUnaryOperatorNegate::contextDescription(QString &szBuffer) +void KviKvsTreeNodeExpressionUnaryOperatorNegate::contextDescription(TQString &szBuffer) { #ifdef COMPILE_NEW_KVS szBuffer = "Expression Unary Operator Negate"; @@ -276,7 +276,7 @@ void KviKvsTreeNodeExpressionUnaryOperatorNegate::dump(const char * prefix) { #ifdef COMPILE_NEW_KVS debug("%s ExpressionUnaryOperatorNegate",prefix); - QString tmp = prefix; + TQString tmp = prefix; tmp.append(" "); m_pData->dump(tmp.utf8().data()); #endif @@ -301,7 +301,7 @@ bool KviKvsTreeNodeExpressionUnaryOperatorNegate::evaluateReadOnly(KviKvsRunTime /////////////////////////////////////////////////////////////////////////////// -KviKvsTreeNodeExpressionUnaryOperatorBitwiseNot::KviKvsTreeNodeExpressionUnaryOperatorBitwiseNot(const QChar * pLocation,KviKvsTreeNodeExpression * pData) +KviKvsTreeNodeExpressionUnaryOperatorBitwiseNot::KviKvsTreeNodeExpressionUnaryOperatorBitwiseNot(const TQChar * pLocation,KviKvsTreeNodeExpression * pData) : KviKvsTreeNodeExpressionUnaryOperator(pLocation,pData) { } @@ -310,7 +310,7 @@ KviKvsTreeNodeExpressionUnaryOperatorBitwiseNot::~KviKvsTreeNodeExpressionUnaryO { } -void KviKvsTreeNodeExpressionUnaryOperatorBitwiseNot::contextDescription(QString &szBuffer) +void KviKvsTreeNodeExpressionUnaryOperatorBitwiseNot::contextDescription(TQString &szBuffer) { #ifdef COMPILE_NEW_KVS szBuffer = "Expression Unary Operator Bitwise Not"; @@ -321,7 +321,7 @@ void KviKvsTreeNodeExpressionUnaryOperatorBitwiseNot::dump(const char * prefix) { #ifdef COMPILE_NEW_KVS debug("%s ExpressionUnaryOperatorBitwiseNot",prefix); - QString tmp = prefix; + TQString tmp = prefix; tmp.append(" "); m_pData->dump(tmp.utf8().data()); #endif @@ -346,7 +346,7 @@ bool KviKvsTreeNodeExpressionUnaryOperatorBitwiseNot::evaluateReadOnly(KviKvsRun /////////////////////////////////////////////////////////////////////////////// -KviKvsTreeNodeExpressionUnaryOperatorLogicalNot::KviKvsTreeNodeExpressionUnaryOperatorLogicalNot(const QChar * pLocation,KviKvsTreeNodeExpression * pData) +KviKvsTreeNodeExpressionUnaryOperatorLogicalNot::KviKvsTreeNodeExpressionUnaryOperatorLogicalNot(const TQChar * pLocation,KviKvsTreeNodeExpression * pData) : KviKvsTreeNodeExpressionUnaryOperator(pLocation,pData) { } @@ -355,7 +355,7 @@ KviKvsTreeNodeExpressionUnaryOperatorLogicalNot::~KviKvsTreeNodeExpressionUnaryO { } -void KviKvsTreeNodeExpressionUnaryOperatorLogicalNot::contextDescription(QString &szBuffer) +void KviKvsTreeNodeExpressionUnaryOperatorLogicalNot::contextDescription(TQString &szBuffer) { #ifdef COMPILE_NEW_KVS szBuffer = "Expression Unary Operator Logical Not"; @@ -366,7 +366,7 @@ void KviKvsTreeNodeExpressionUnaryOperatorLogicalNot::dump(const char * prefix) { #ifdef COMPILE_NEW_KVS debug("%s ExpressionUnaryOperatorLogicalNot",prefix); - QString tmp = prefix; + TQString tmp = prefix; tmp.append(" "); m_pData->dump(tmp.utf8().data()); #endif @@ -393,7 +393,7 @@ bool KviKvsTreeNodeExpressionUnaryOperatorLogicalNot::evaluateReadOnly(KviKvsRun /////////////////////////////////////////////////////////////////////////////// -KviKvsTreeNodeExpressionBinaryOperator::KviKvsTreeNodeExpressionBinaryOperator(const QChar * pLocation) +KviKvsTreeNodeExpressionBinaryOperator::KviKvsTreeNodeExpressionBinaryOperator(const TQChar * pLocation) : KviKvsTreeNodeExpressionOperator(pLocation) { m_pLeft = 0; @@ -457,13 +457,13 @@ void KviKvsTreeNodeExpressionBinaryOperator::setRight(KviKvsTreeNodeExpression * void KviKvsTreeNodeExpressionBinaryOperator::dumpOperands(const char * prefix) { - QString tmp = prefix; + TQString tmp = prefix; tmp.append(" "); if(m_pLeft)m_pLeft->dump(tmp.utf8().data()); if(m_pRight)m_pRight->dump(tmp.utf8().data()); } -void KviKvsTreeNodeExpressionBinaryOperator::contextDescription(QString &szBuffer) +void KviKvsTreeNodeExpressionBinaryOperator::contextDescription(TQString &szBuffer) { szBuffer = "Expression Binary Operator"; } @@ -478,11 +478,11 @@ void KviKvsTreeNodeExpressionBinaryOperator::dump(const char * prefix) #define PREIMPLEMENT_BINARY_OPERATOR(__name,__stringname,__contextdescription,__precedence) \ - __name::__name(const QChar * pLocation) \ + __name::__name(const TQChar * pLocation) \ : KviKvsTreeNodeExpressionBinaryOperator(pLocation){} \ __name::~__name(){} \ void __name::dump(const char * prefix){ debug("%s " __stringname,prefix); dumpOperands(prefix); } \ - void __name::contextDescription(QString &szBuffer){ szBuffer = __contextdescription; } \ + void __name::contextDescription(TQString &szBuffer){ szBuffer = __contextdescription; } \ int __name::precedence(){ return __precedence; }; PREIMPLEMENT_BINARY_OPERATOR(KviKvsTreeNodeExpressionBinaryOperatorSum,"ExpressionBinaryOperatorSum","Expression Binary Operator \"+\"",PREC_OP_SUM) @@ -726,7 +726,7 @@ bool KviKvsTreeNodeExpressionBinaryOperatorGreaterThan::evaluateReadOnly(KviKvsR return true; } -PREIMPLEMENT_BINARY_OPERATOR(KviKvsTreeNodeExpressionBinaryOperatorLowerOrEqualTo,"ExpressionBinaryOperatorLowerOrEqualTo","Expression Binary Operator \"<=\"",PREC_OP_LOWEROREQUALTO) +PREIMPLEMENT_BINARY_OPERATOR(KviKvsTreeNodeExpressionBinaryOperatorLowerOrEqualTo,"ExpressionBinaryOperatorLowerOrEqualTo","Expression Binary Operator \"<=\"",PREC_OP_LOWERORETQUALTO) bool KviKvsTreeNodeExpressionBinaryOperatorLowerOrEqualTo::evaluateReadOnly(KviKvsRunTimeContext * c,KviKvsVariant * pBuffer) { @@ -738,7 +738,7 @@ bool KviKvsTreeNodeExpressionBinaryOperatorLowerOrEqualTo::evaluateReadOnly(KviK return true; } -PREIMPLEMENT_BINARY_OPERATOR(KviKvsTreeNodeExpressionBinaryOperatorGreaterOrEqualTo,"ExpressionBinaryOperatorGreaterOrEqualTo","Expression Binary Operator \">=\"",PREC_OP_GREATEROREQUALTO) +PREIMPLEMENT_BINARY_OPERATOR(KviKvsTreeNodeExpressionBinaryOperatorGreaterOrEqualTo,"ExpressionBinaryOperatorGreaterOrEqualTo","Expression Binary Operator \">=\"",PREC_OP_GREATERORETQUALTO) bool KviKvsTreeNodeExpressionBinaryOperatorGreaterOrEqualTo::evaluateReadOnly(KviKvsRunTimeContext * c,KviKvsVariant * pBuffer) { @@ -763,7 +763,7 @@ bool KviKvsTreeNodeExpressionBinaryOperatorEqualTo::evaluateReadOnly(KviKvsRunTi } -PREIMPLEMENT_BINARY_OPERATOR(KviKvsTreeNodeExpressionBinaryOperatorNotEqualTo,"ExpressionBinaryOperatorNotEqualTo","Expression Binary Operator \"!=\"",PREC_OP_NOTEQUALTO) +PREIMPLEMENT_BINARY_OPERATOR(KviKvsTreeNodeExpressionBinaryOperatorNotEqualTo,"ExpressionBinaryOperatorNotEqualTo","Expression Binary Operator \"!=\"",PREC_OP_NOTETQUALTO) bool KviKvsTreeNodeExpressionBinaryOperatorNotEqualTo::evaluateReadOnly(KviKvsRunTimeContext * c,KviKvsVariant * pBuffer) { diff --git a/src/kvirc/kvs/kvi_kvs_treenode_expression.h b/src/kvirc/kvs/kvi_kvs_treenode_expression.h index 948066d0..3ab8fd5e 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_expression.h +++ b/src/kvirc/kvs/kvi_kvs_treenode_expression.h @@ -56,10 +56,10 @@ #define PREC_OP_EQUALTO 12 /* == */ /* Case sensitive comparison for strings or normal comp.fr numbers */ -#define PREC_OP_GREATEROREQUALTO 14 /* >= */ /* Case sensitive (normal for numbers) */ -#define PREC_OP_LOWEROREQUALTO 14 /* <= */ /* Case sensitive (normal for numbers) */ +#define PREC_OP_GREATERORETQUALTO 14 /* >= */ /* Case sensitive (normal for numbers) */ +#define PREC_OP_LOWERORETQUALTO 14 /* <= */ /* Case sensitive (normal for numbers) */ -#define PREC_OP_NOTEQUALTO 15 /* != */ /* Case sensitive (normal for numbers) */ +#define PREC_OP_NOTETQUALTO 15 /* != */ /* Case sensitive (normal for numbers) */ #define PREC_OP_AND 16 /* && */ #define PREC_OP_OR 17 /* || */ @@ -71,12 +71,12 @@ class KVIRC_API KviKvsTreeNodeExpression : public KviKvsTreeNodeData { // this class is never instantiated public: - KviKvsTreeNodeExpression(const QChar * pLocation); + KviKvsTreeNodeExpression(const TQChar * pLocation); ~KviKvsTreeNodeExpression(); protected: KviKvsTreeNodeExpression * m_pParentExpression; public: - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); virtual int precedence(); virtual KviKvsTreeNodeExpression * left(); @@ -84,21 +84,21 @@ public: virtual void setLeft(KviKvsTreeNodeExpression * pLeft); virtual void setRight(KviKvsTreeNodeExpression * pRight); virtual int firstBinaryOperator(); - KviKvsTreeNodeExpression * parentExpression(){ return m_pParentExpression; }; + KviKvsTreeNodeExpression * tqparentExpression(){ return m_pParentExpression; }; void setParentExpression(KviKvsTreeNodeExpression * pParent){ m_pParentExpression = pParent; }; - virtual KviKvsTreeNodeExpression * parentWithPrecedenceLowerThan(int iPrec); + virtual KviKvsTreeNodeExpression * tqparentWithPrecedenceLowerThan(int iPrec); }; class KVIRC_API KviKvsTreeNodeExpressionVariableOperand : public KviKvsTreeNodeExpression { public: - KviKvsTreeNodeExpressionVariableOperand(const QChar * pLocation,KviKvsTreeNodeData * pData); + KviKvsTreeNodeExpressionVariableOperand(const TQChar * pLocation,KviKvsTreeNodeData * pData); ~KviKvsTreeNodeExpressionVariableOperand(); protected: KviKvsTreeNodeData * m_pData; // can't be null public: - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); virtual bool evaluateReadOnly(KviKvsRunTimeContext * c,KviKvsVariant * pResult); }; @@ -107,12 +107,12 @@ public: class KVIRC_API KviKvsTreeNodeExpressionConstantOperand : public KviKvsTreeNodeExpression { public: - KviKvsTreeNodeExpressionConstantOperand(const QChar * pLocation,KviKvsVariant * pConstant); + KviKvsTreeNodeExpressionConstantOperand(const TQChar * pLocation,KviKvsVariant * pConstant); ~KviKvsTreeNodeExpressionConstantOperand(); public: KviKvsVariant * m_pConstant; public: - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); virtual bool evaluateReadOnly(KviKvsRunTimeContext * c,KviKvsVariant * pResult); }; @@ -132,23 +132,23 @@ public: class KVIRC_API KviKvsTreeNodeExpressionOperator : public KviKvsTreeNodeExpression { public: - KviKvsTreeNodeExpressionOperator(const QChar * pLocation); + KviKvsTreeNodeExpressionOperator(const TQChar * pLocation); ~KviKvsTreeNodeExpressionOperator(); public: - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); }; class KVIRC_API KviKvsTreeNodeExpressionUnaryOperator : public KviKvsTreeNodeExpressionOperator { public: - KviKvsTreeNodeExpressionUnaryOperator(const QChar * pLocation,KviKvsTreeNodeExpression * pData); + KviKvsTreeNodeExpressionUnaryOperator(const TQChar * pLocation,KviKvsTreeNodeExpression * pData); ~KviKvsTreeNodeExpressionUnaryOperator(); protected: KviKvsTreeNodeExpression * m_pData; // can't be null! KviKvsNumber m_nData; // result of the number evaluation public: - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); bool evaluateOperand(KviKvsRunTimeContext * c); }; @@ -156,11 +156,11 @@ public: class KVIRC_API KviKvsTreeNodeExpressionUnaryOperatorNegate : public KviKvsTreeNodeExpressionUnaryOperator { public: - KviKvsTreeNodeExpressionUnaryOperatorNegate(const QChar * pLocation,KviKvsTreeNodeExpression * pData); + KviKvsTreeNodeExpressionUnaryOperatorNegate(const TQChar * pLocation,KviKvsTreeNodeExpression * pData); ~KviKvsTreeNodeExpressionUnaryOperatorNegate(); public: virtual int precedence(); - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); virtual bool evaluateReadOnly(KviKvsRunTimeContext * c,KviKvsVariant * pResult); }; @@ -168,11 +168,11 @@ public: class KVIRC_API KviKvsTreeNodeExpressionUnaryOperatorBitwiseNot : public KviKvsTreeNodeExpressionUnaryOperator { public: - KviKvsTreeNodeExpressionUnaryOperatorBitwiseNot(const QChar * pLocation,KviKvsTreeNodeExpression * pData); + KviKvsTreeNodeExpressionUnaryOperatorBitwiseNot(const TQChar * pLocation,KviKvsTreeNodeExpression * pData); ~KviKvsTreeNodeExpressionUnaryOperatorBitwiseNot(); public: virtual int precedence(); - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); virtual bool evaluateReadOnly(KviKvsRunTimeContext * c,KviKvsVariant * pResult); }; @@ -180,11 +180,11 @@ public: class KVIRC_API KviKvsTreeNodeExpressionUnaryOperatorLogicalNot : public KviKvsTreeNodeExpressionUnaryOperator { public: - KviKvsTreeNodeExpressionUnaryOperatorLogicalNot(const QChar * pLocation,KviKvsTreeNodeExpression * pData); + KviKvsTreeNodeExpressionUnaryOperatorLogicalNot(const TQChar * pLocation,KviKvsTreeNodeExpression * pData); ~KviKvsTreeNodeExpressionUnaryOperatorLogicalNot(); public: virtual int precedence(); - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); virtual bool evaluateReadOnly(KviKvsRunTimeContext * c,KviKvsVariant * pResult); }; @@ -192,7 +192,7 @@ public: class KVIRC_API KviKvsTreeNodeExpressionBinaryOperator : public KviKvsTreeNodeExpressionOperator { public: - KviKvsTreeNodeExpressionBinaryOperator(const QChar * pLocation); + KviKvsTreeNodeExpressionBinaryOperator(const TQChar * pLocation); ~KviKvsTreeNodeExpressionBinaryOperator(); protected: KviKvsTreeNodeExpression * m_pLeft; // can be zero only during parsing (and thus when deleting) @@ -207,7 +207,7 @@ public: virtual int firstBinaryOperator(); public: void dumpOperands(const char * prefix); - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); protected: bool evaluateOperands(KviKvsRunTimeContext * c); @@ -217,10 +217,10 @@ protected: class KVIRC_API __name : public KviKvsTreeNodeExpressionBinaryOperator \ { \ public: \ - __name(const QChar * pLocation); \ + __name(const TQChar * pLocation); \ ~__name(); \ public: \ - virtual void contextDescription(QString &szBuffer); \ + virtual void contextDescription(TQString &szBuffer); \ virtual void dump(const char * prefix); \ virtual bool evaluateReadOnly(KviKvsRunTimeContext * c,KviKvsVariant * pResult); \ virtual int precedence(); \ diff --git a/src/kvirc/kvs/kvi_kvs_treenode_expressionreturn.cpp b/src/kvirc/kvs/kvi_kvs_treenode_expressionreturn.cpp index 28c41b16..18250932 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_expressionreturn.cpp +++ b/src/kvirc/kvs/kvi_kvs_treenode_expressionreturn.cpp @@ -28,7 +28,7 @@ #include "kvi_kvs_runtimecontext.h" #include "kvi_locale.h" -KviKvsTreeNodeExpressionReturn::KviKvsTreeNodeExpressionReturn(const QChar * pLocation,KviKvsTreeNodeExpression * pExpression) +KviKvsTreeNodeExpressionReturn::KviKvsTreeNodeExpressionReturn(const TQChar * pLocation,KviKvsTreeNodeExpression * pExpression) : KviKvsTreeNodeInstruction(pLocation) { #ifdef COMPILE_NEW_KVS @@ -45,7 +45,7 @@ KviKvsTreeNodeExpressionReturn::~KviKvsTreeNodeExpressionReturn() } -void KviKvsTreeNodeExpressionReturn::contextDescription(QString &szBuffer) +void KviKvsTreeNodeExpressionReturn::contextDescription(TQString &szBuffer) { #ifdef COMPILE_NEW_KVS szBuffer = "Expression Return Evaluation"; @@ -56,7 +56,7 @@ void KviKvsTreeNodeExpressionReturn::dump(const char * prefix) { #ifdef COMPILE_NEW_KVS debug("%s ExpressionReturn",prefix); - QString tmp = prefix; + TQString tmp = prefix; tmp += " "; m_pExpression->dump(tmp.utf8().data()); #endif diff --git a/src/kvirc/kvs/kvi_kvs_treenode_expressionreturn.h b/src/kvirc/kvs/kvi_kvs_treenode_expressionreturn.h index 8622da0e..7654c537 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_expressionreturn.h +++ b/src/kvirc/kvs/kvi_kvs_treenode_expressionreturn.h @@ -32,12 +32,12 @@ class KviKvsTreeNodeExpression; class KVIRC_API KviKvsTreeNodeExpressionReturn : public KviKvsTreeNodeInstruction { public: - KviKvsTreeNodeExpressionReturn(const QChar * pLocation,KviKvsTreeNodeExpression * pExpression); + KviKvsTreeNodeExpressionReturn(const TQChar * pLocation,KviKvsTreeNodeExpression * pExpression); ~KviKvsTreeNodeExpressionReturn(); protected: KviKvsTreeNodeExpression * m_pExpression; public: - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); virtual bool execute(KviKvsRunTimeContext * c); }; diff --git a/src/kvirc/kvs/kvi_kvs_treenode_extendedscopevariable.cpp b/src/kvirc/kvs/kvi_kvs_treenode_extendedscopevariable.cpp index 49906741..74f58298 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_extendedscopevariable.cpp +++ b/src/kvirc/kvs/kvi_kvs_treenode_extendedscopevariable.cpp @@ -28,7 +28,7 @@ #include "kvi_kvs_runtimecontext.h" #include "kvi_locale.h" -KviKvsTreeNodeExtendedScopeVariable::KviKvsTreeNodeExtendedScopeVariable(const QChar * pLocation,const QString &szIdentifier) +KviKvsTreeNodeExtendedScopeVariable::KviKvsTreeNodeExtendedScopeVariable(const TQChar * pLocation,const TQString &szIdentifier) : KviKvsTreeNodeVariable(pLocation,szIdentifier) { } @@ -37,7 +37,7 @@ KviKvsTreeNodeExtendedScopeVariable::~KviKvsTreeNodeExtendedScopeVariable() { } -void KviKvsTreeNodeExtendedScopeVariable::contextDescription(QString &szBuffer) +void KviKvsTreeNodeExtendedScopeVariable::contextDescription(TQString &szBuffer) { szBuffer = "Extended Scope Variable \""; szBuffer += m_szIdentifier; @@ -57,7 +57,7 @@ bool KviKvsTreeNodeExtendedScopeVariable::evaluateReadOnly(KviKvsRunTimeContext return false; } - KviKvsVariant * v = c->extendedScopeVariables()->find(m_szIdentifier); + KviKvsVariant * v = c->extendedScopeVariables()->tqfind(m_szIdentifier); if(v) { pBuffer->copyFrom(v); diff --git a/src/kvirc/kvs/kvi_kvs_treenode_extendedscopevariable.h b/src/kvirc/kvs/kvi_kvs_treenode_extendedscopevariable.h index 06fba6e2..84fadc8b 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_extendedscopevariable.h +++ b/src/kvirc/kvs/kvi_kvs_treenode_extendedscopevariable.h @@ -33,10 +33,10 @@ class KviKvsRunTimeContext; class KVIRC_API KviKvsTreeNodeExtendedScopeVariable : public KviKvsTreeNodeVariable { public: - KviKvsTreeNodeExtendedScopeVariable(const QChar * pLocation,const QString &szIdentifier); + KviKvsTreeNodeExtendedScopeVariable(const TQChar * pLocation,const TQString &szIdentifier); ~KviKvsTreeNodeExtendedScopeVariable(); public: - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); virtual bool evaluateReadOnly(KviKvsRunTimeContext * c,KviKvsVariant * pResult); virtual KviKvsRWEvaluationResult * evaluateReadWrite(KviKvsRunTimeContext * c); diff --git a/src/kvirc/kvs/kvi_kvs_treenode_functioncall.cpp b/src/kvirc/kvs/kvi_kvs_treenode_functioncall.cpp index 1f8403e5..81be2cd1 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_functioncall.cpp +++ b/src/kvirc/kvs/kvi_kvs_treenode_functioncall.cpp @@ -27,7 +27,7 @@ #include "kvi_kvs_treenode_functioncall.h" -KviKvsTreeNodeFunctionCall::KviKvsTreeNodeFunctionCall(const QChar * pLocation,const QString &szFunctionName,KviKvsTreeNodeDataList * pParams) +KviKvsTreeNodeFunctionCall::KviKvsTreeNodeFunctionCall(const TQChar * pLocation,const TQString &szFunctionName,KviKvsTreeNodeDataList * pParams) : KviKvsTreeNodeData(pLocation) { m_szFunctionName = szFunctionName; @@ -40,7 +40,7 @@ KviKvsTreeNodeFunctionCall::~KviKvsTreeNodeFunctionCall() delete m_pParams; } -void KviKvsTreeNodeFunctionCall::contextDescription(QString &szBuffer) +void KviKvsTreeNodeFunctionCall::contextDescription(TQString &szBuffer) { szBuffer = "Function Call"; } diff --git a/src/kvirc/kvs/kvi_kvs_treenode_functioncall.h b/src/kvirc/kvs/kvi_kvs_treenode_functioncall.h index 88d8250b..c4378109 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_functioncall.h +++ b/src/kvirc/kvs/kvi_kvs_treenode_functioncall.h @@ -31,13 +31,13 @@ class KVIRC_API KviKvsTreeNodeFunctionCall : public KviKvsTreeNodeData { public: - KviKvsTreeNodeFunctionCall(const QChar * pLocation,const QString &szFunctionName,KviKvsTreeNodeDataList * pParams); + KviKvsTreeNodeFunctionCall(const TQChar * pLocation,const TQString &szFunctionName,KviKvsTreeNodeDataList * pParams); ~KviKvsTreeNodeFunctionCall(); protected: - QString m_szFunctionName; + TQString m_szFunctionName; KviKvsTreeNodeDataList * m_pParams; // never 0 public: - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); virtual bool canEvaluateToObjectReference(); // yes virtual bool isFunctionCall(); // yes diff --git a/src/kvirc/kvs/kvi_kvs_treenode_globalvariable.cpp b/src/kvirc/kvs/kvi_kvs_treenode_globalvariable.cpp index ea6bd031..a74ebc0d 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_globalvariable.cpp +++ b/src/kvirc/kvs/kvi_kvs_treenode_globalvariable.cpp @@ -27,7 +27,7 @@ #include "kvi_kvs_treenode_globalvariable.h" #include "kvi_kvs_runtimecontext.h" -KviKvsTreeNodeGlobalVariable::KviKvsTreeNodeGlobalVariable(const QChar * pLocation,const QString &szIdentifier) +KviKvsTreeNodeGlobalVariable::KviKvsTreeNodeGlobalVariable(const TQChar * pLocation,const TQString &szIdentifier) : KviKvsTreeNodeVariable(pLocation,szIdentifier) { } @@ -36,7 +36,7 @@ KviKvsTreeNodeGlobalVariable::~KviKvsTreeNodeGlobalVariable() { } -void KviKvsTreeNodeGlobalVariable::contextDescription(QString &szBuffer) +void KviKvsTreeNodeGlobalVariable::contextDescription(TQString &szBuffer) { szBuffer = "Global Variable \""; szBuffer += m_szIdentifier; @@ -51,7 +51,7 @@ void KviKvsTreeNodeGlobalVariable::dump(const char * prefix) bool KviKvsTreeNodeGlobalVariable::evaluateReadOnly(KviKvsRunTimeContext * c,KviKvsVariant * pBuffer) { - KviKvsVariant * v = c->globalVariables()->find(m_szIdentifier); + KviKvsVariant * v = c->globalVariables()->tqfind(m_szIdentifier); if(v)pBuffer->copyFrom(v); else pBuffer->setNothing(); return true; diff --git a/src/kvirc/kvs/kvi_kvs_treenode_globalvariable.h b/src/kvirc/kvs/kvi_kvs_treenode_globalvariable.h index 9f6bcf0a..a30430a4 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_globalvariable.h +++ b/src/kvirc/kvs/kvi_kvs_treenode_globalvariable.h @@ -33,10 +33,10 @@ class KviKvsRunTimeContext; class KVIRC_API KviKvsTreeNodeGlobalVariable : public KviKvsTreeNodeVariable { public: - KviKvsTreeNodeGlobalVariable(const QChar * pLocation,const QString &szIdentifier); + KviKvsTreeNodeGlobalVariable(const TQChar * pLocation,const TQString &szIdentifier); ~KviKvsTreeNodeGlobalVariable(); public: - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); virtual bool evaluateReadOnly(KviKvsRunTimeContext * c,KviKvsVariant * pResult); virtual KviKvsRWEvaluationResult * evaluateReadWrite(KviKvsRunTimeContext * c); diff --git a/src/kvirc/kvs/kvi_kvs_treenode_hashcount.cpp b/src/kvirc/kvs/kvi_kvs_treenode_hashcount.cpp index 3ecfaf52..9e1a3c01 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_hashcount.cpp +++ b/src/kvirc/kvs/kvi_kvs_treenode_hashcount.cpp @@ -31,7 +31,7 @@ #include "kvi_locale.h" -KviKvsTreeNodeHashCount::KviKvsTreeNodeHashCount(const QChar * pLocation,KviKvsTreeNodeData * pSource) +KviKvsTreeNodeHashCount::KviKvsTreeNodeHashCount(const TQChar * pLocation,KviKvsTreeNodeData * pSource) : KviKvsTreeNodeIndirectData(pLocation,pSource) { } @@ -40,7 +40,7 @@ KviKvsTreeNodeHashCount::~KviKvsTreeNodeHashCount() { } -void KviKvsTreeNodeHashCount::contextDescription(QString &szBuffer) +void KviKvsTreeNodeHashCount::contextDescription(TQString &szBuffer) { #ifdef COMPILE_NEW_KVS szBuffer = "Hash Count Operator"; @@ -69,7 +69,7 @@ bool KviKvsTreeNodeHashCount::evaluateReadOnlyInObjectScope(KviKvsObject *o,KviK { if(!val.isNothing()) { - QString szType; + TQString szType; val.getTypeName(szType); c->warning(this,__tr2qs("The argument of the hash count '#' operator didn't evaluate to a hash: automatic conversion from type '%Q' supplied"),&szType); } diff --git a/src/kvirc/kvs/kvi_kvs_treenode_hashcount.h b/src/kvirc/kvs/kvi_kvs_treenode_hashcount.h index b59cf371..9119bdee 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_hashcount.h +++ b/src/kvirc/kvs/kvi_kvs_treenode_hashcount.h @@ -35,10 +35,10 @@ class KviKvsObject; class KVIRC_API KviKvsTreeNodeHashCount : public KviKvsTreeNodeIndirectData { public: - KviKvsTreeNodeHashCount(const QChar * pLocation,KviKvsTreeNodeData * pSource); + KviKvsTreeNodeHashCount(const TQChar * pLocation,KviKvsTreeNodeData * pSource); ~KviKvsTreeNodeHashCount(); public: - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); virtual bool evaluateReadOnly(KviKvsRunTimeContext * c,KviKvsVariant * pBuffer); virtual bool evaluateReadOnlyInObjectScope(KviKvsObject *o,KviKvsRunTimeContext * c,KviKvsVariant * pBuffer); diff --git a/src/kvirc/kvs/kvi_kvs_treenode_hashelement.cpp b/src/kvirc/kvs/kvi_kvs_treenode_hashelement.cpp index 645478f6..196b992b 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_hashelement.cpp +++ b/src/kvirc/kvs/kvi_kvs_treenode_hashelement.cpp @@ -30,7 +30,7 @@ #include "kvi_kvs_hash.h" #include "kvi_kvs_object.h" -KviKvsTreeNodeHashElement::KviKvsTreeNodeHashElement(const QChar * pLocation,KviKvsTreeNodeData * pSource,KviKvsTreeNodeData * pKey) +KviKvsTreeNodeHashElement::KviKvsTreeNodeHashElement(const TQChar * pLocation,KviKvsTreeNodeData * pSource,KviKvsTreeNodeData * pKey) : KviKvsTreeNodeArrayOrHashElement(pLocation,pSource) { #ifdef COMPILE_NEW_KVS @@ -47,7 +47,7 @@ KviKvsTreeNodeHashElement::~KviKvsTreeNodeHashElement() #endif } -void KviKvsTreeNodeHashElement::contextDescription(QString &szBuffer) +void KviKvsTreeNodeHashElement::contextDescription(TQString &szBuffer) { #ifdef COMPILE_NEW_KVS szBuffer = "Hash Element Evaluation"; @@ -58,7 +58,7 @@ void KviKvsTreeNodeHashElement::dump(const char * prefix) { #ifdef COMPILE_NEW_KVS debug("%s HashElement",prefix); - QString tmp = prefix; + TQString tmp = prefix; tmp.append(" "); m_pSource->dump(tmp.utf8().data()); m_pKey->dump(tmp.utf8().data()); @@ -72,7 +72,7 @@ bool KviKvsTreeNodeHashElement::evaluateReadOnlyInObjectScope(KviKvsObject *o,Kv KviKvsVariant key; if(!m_pKey->evaluateReadOnly(c,&key))return false; - QString szKey; + TQString szKey; key.asString(szKey); if(szKey.isEmpty()) @@ -94,7 +94,7 @@ bool KviKvsTreeNodeHashElement::evaluateReadOnlyInObjectScope(KviKvsObject *o,Kv { if(!val.isNothing()) { - QString szType; + TQString szType; val.getTypeName(szType); c->warning(this,__tr2qs("The argument of the {} subscript didn't evaluate to a hash: automatic conversion from type '%Q' supplied"),&szType); } @@ -102,7 +102,7 @@ bool KviKvsTreeNodeHashElement::evaluateReadOnlyInObjectScope(KviKvsObject *o,Kv return true; } - KviKvsVariant * v = val.hash()->find(szKey); + KviKvsVariant * v = val.hash()->tqfind(szKey); if(!v) { pBuffer->setNothing(); @@ -120,7 +120,7 @@ KviKvsRWEvaluationResult * KviKvsTreeNodeHashElement::evaluateReadWriteInObjectS KviKvsVariant key; if(!m_pKey->evaluateReadOnly(c,&key))return 0; - QString szKey; + TQString szKey; key.asString(szKey); if(szKey.isEmpty()) @@ -139,7 +139,7 @@ KviKvsRWEvaluationResult * KviKvsTreeNodeHashElement::evaluateReadWriteInObjectS //#warning "Supply a *real* conversion from other types to array ?" if(!result->result()->isNothing()) { - QString szType; + TQString szType; result->result()->getTypeName(szType); c->warning(this,__tr2qs("The argument of the {} subscript didn't evaluate to a hash automatic conversion from %Q supplied"),&szType); } diff --git a/src/kvirc/kvs/kvi_kvs_treenode_hashelement.h b/src/kvirc/kvs/kvi_kvs_treenode_hashelement.h index 5b46a7ec..ce36d124 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_hashelement.h +++ b/src/kvirc/kvs/kvi_kvs_treenode_hashelement.h @@ -35,12 +35,12 @@ class KviKvsObject; class KVIRC_API KviKvsTreeNodeHashElement : public KviKvsTreeNodeArrayOrHashElement { public: - KviKvsTreeNodeHashElement(const QChar * pLocation,KviKvsTreeNodeData * pSource,KviKvsTreeNodeData * pIndex); + KviKvsTreeNodeHashElement(const TQChar * pLocation,KviKvsTreeNodeData * pSource,KviKvsTreeNodeData * pIndex); ~KviKvsTreeNodeHashElement(); protected: KviKvsTreeNodeData * m_pKey; // can't be null public: - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); virtual bool evaluateReadOnly(KviKvsRunTimeContext * c,KviKvsVariant * pBuffer); virtual KviKvsRWEvaluationResult * evaluateReadWrite(KviKvsRunTimeContext * c); diff --git a/src/kvirc/kvs/kvi_kvs_treenode_hashreferenceassert.cpp b/src/kvirc/kvs/kvi_kvs_treenode_hashreferenceassert.cpp index 799cc1e5..954e2218 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_hashreferenceassert.cpp +++ b/src/kvirc/kvs/kvi_kvs_treenode_hashreferenceassert.cpp @@ -30,7 +30,7 @@ #include "kvi_kvs_variant.h" #include "kvi_locale.h" -KviKvsTreeNodeHashReferenceAssert::KviKvsTreeNodeHashReferenceAssert(const QChar * pLocation,KviKvsTreeNodeData * pSource) +KviKvsTreeNodeHashReferenceAssert::KviKvsTreeNodeHashReferenceAssert(const TQChar * pLocation,KviKvsTreeNodeData * pSource) : KviKvsTreeNodeIndirectData(pLocation,pSource) { } @@ -44,7 +44,7 @@ bool KviKvsTreeNodeHashReferenceAssert::isReadOnly() return m_pSource->isReadOnly(); } -void KviKvsTreeNodeHashReferenceAssert::contextDescription(QString &szBuffer) +void KviKvsTreeNodeHashReferenceAssert::contextDescription(TQString &szBuffer) { #ifdef COMPILE_NEW_KVS szBuffer = "Hash Reference Assert"; @@ -72,7 +72,7 @@ bool KviKvsTreeNodeHashReferenceAssert::evaluateReadOnlyInObjectScope(KviKvsObje { if(!pBuffer->isNothing()) { - QString szType; + TQString szType; pBuffer->getTypeName(szType); c->error(this,__tr2qs("Hash reference assert failed: the variable evaluated to type '%Q'"),&szType); return false; diff --git a/src/kvirc/kvs/kvi_kvs_treenode_hashreferenceassert.h b/src/kvirc/kvs/kvi_kvs_treenode_hashreferenceassert.h index 43cb57c3..e97de6d3 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_hashreferenceassert.h +++ b/src/kvirc/kvs/kvi_kvs_treenode_hashreferenceassert.h @@ -36,13 +36,13 @@ class KviKvsObject; class KVIRC_API KviKvsTreeNodeHashReferenceAssert : public KviKvsTreeNodeIndirectData { public: - KviKvsTreeNodeHashReferenceAssert(const QChar * pLocation,KviKvsTreeNodeData * pSource); + KviKvsTreeNodeHashReferenceAssert(const TQChar * pLocation,KviKvsTreeNodeData * pSource); ~KviKvsTreeNodeHashReferenceAssert(); protected: public: virtual bool isReadOnly(); - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); virtual bool evaluateReadOnly(KviKvsRunTimeContext * c,KviKvsVariant * pBuffer); virtual KviKvsRWEvaluationResult * evaluateReadWrite(KviKvsRunTimeContext * c); diff --git a/src/kvirc/kvs/kvi_kvs_treenode_indirectdata.cpp b/src/kvirc/kvs/kvi_kvs_treenode_indirectdata.cpp index 285c9d91..bd573360 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_indirectdata.cpp +++ b/src/kvirc/kvs/kvi_kvs_treenode_indirectdata.cpp @@ -26,7 +26,7 @@ #include "kvi_kvs_treenode_indirectdata.h" -KviKvsTreeNodeIndirectData::KviKvsTreeNodeIndirectData(const QChar * pLocation,KviKvsTreeNodeData * pSource) +KviKvsTreeNodeIndirectData::KviKvsTreeNodeIndirectData(const TQChar * pLocation,KviKvsTreeNodeData * pSource) : KviKvsTreeNodeData(pLocation) { m_pSource = pSource; diff --git a/src/kvirc/kvs/kvi_kvs_treenode_indirectdata.h b/src/kvirc/kvs/kvi_kvs_treenode_indirectdata.h index 31a9410c..f244bb08 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_indirectdata.h +++ b/src/kvirc/kvs/kvi_kvs_treenode_indirectdata.h @@ -31,7 +31,7 @@ class KVIRC_API KviKvsTreeNodeIndirectData : public KviKvsTreeNodeData { public: - KviKvsTreeNodeIndirectData(const QChar * pLocation,KviKvsTreeNodeData * pSource); + KviKvsTreeNodeIndirectData(const TQChar * pLocation,KviKvsTreeNodeData * pSource); ~KviKvsTreeNodeIndirectData(); protected: KviKvsTreeNodeData * m_pSource; // can't be null! diff --git a/src/kvirc/kvs/kvi_kvs_treenode_instruction.cpp b/src/kvirc/kvs/kvi_kvs_treenode_instruction.cpp index 37cb3d04..8f1b2eb4 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_instruction.cpp +++ b/src/kvirc/kvs/kvi_kvs_treenode_instruction.cpp @@ -26,7 +26,7 @@ #include "kvi_kvs_treenode_instruction.h" -void KviKvsTreeNodeInstruction::contextDescription(QString &szBuffer) +void KviKvsTreeNodeInstruction::contextDescription(TQString &szBuffer) { #ifdef COMPILE_NEW_KVS szBuffer = "Instruction"; diff --git a/src/kvirc/kvs/kvi_kvs_treenode_instruction.h b/src/kvirc/kvs/kvi_kvs_treenode_instruction.h index 1e0c09c3..8326b2e6 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_instruction.h +++ b/src/kvirc/kvs/kvi_kvs_treenode_instruction.h @@ -33,11 +33,11 @@ class KviKvsRunTimeContext; class KVIRC_API KviKvsTreeNodeInstruction : public KviKvsTreeNode { public: - KviKvsTreeNodeInstruction(const QChar * pLocation) + KviKvsTreeNodeInstruction(const TQChar * pLocation) : KviKvsTreeNode(pLocation){}; ~KviKvsTreeNodeInstruction(){}; public: - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); // execute() is the main entry point to the tree visit diff --git a/src/kvirc/kvs/kvi_kvs_treenode_instructionblock.cpp b/src/kvirc/kvs/kvi_kvs_treenode_instructionblock.cpp index 75afd456..1a49ec15 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_instructionblock.cpp +++ b/src/kvirc/kvs/kvi_kvs_treenode_instructionblock.cpp @@ -28,7 +28,7 @@ #include "kvi_kvs_treenode_instructionblock.h" #include "kvi_kvs_runtimecontext.h" -KviKvsTreeNodeInstructionBlock::KviKvsTreeNodeInstructionBlock(const QChar * pLocation) +KviKvsTreeNodeInstructionBlock::KviKvsTreeNodeInstructionBlock(const TQChar * pLocation) : KviKvsTreeNodeInstruction(pLocation) { m_pInstructionList = new KviPointerList; @@ -40,7 +40,7 @@ KviKvsTreeNodeInstructionBlock::~KviKvsTreeNodeInstructionBlock() delete m_pInstructionList; } -void KviKvsTreeNodeInstructionBlock::contextDescription(QString &szBuffer) +void KviKvsTreeNodeInstructionBlock::contextDescription(TQString &szBuffer) { szBuffer = "Instruction Block"; } @@ -48,7 +48,7 @@ void KviKvsTreeNodeInstructionBlock::contextDescription(QString &szBuffer) void KviKvsTreeNodeInstructionBlock::dump(const char * prefix) { debug("%s InstructionBlock",prefix); - QString tmp = prefix; + TQString tmp = prefix; tmp.append(" "); for(KviKvsTreeNodeInstruction * i = m_pInstructionList->first();i;i = m_pInstructionList->next()) { diff --git a/src/kvirc/kvs/kvi_kvs_treenode_instructionblock.h b/src/kvirc/kvs/kvi_kvs_treenode_instructionblock.h index f4aa32f4..659aab5f 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_instructionblock.h +++ b/src/kvirc/kvs/kvi_kvs_treenode_instructionblock.h @@ -36,7 +36,7 @@ class KviKvsRunTimeContext; class KVIRC_API KviKvsTreeNodeInstructionBlock : public KviKvsTreeNodeInstruction { public: - KviKvsTreeNodeInstructionBlock(const QChar * pLocation); + KviKvsTreeNodeInstructionBlock(const TQChar * pLocation); ~KviKvsTreeNodeInstructionBlock(); protected: KviPointerList * m_pInstructionList; @@ -44,7 +44,7 @@ public: unsigned int instructionCount(){ return m_pInstructionList->count(); }; void addInstruction(KviKvsTreeNodeInstruction * i); KviKvsTreeNodeInstruction * releaseFirst(); - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); virtual bool execute(KviKvsRunTimeContext * c); diff --git a/src/kvirc/kvs/kvi_kvs_treenode_localvariable.cpp b/src/kvirc/kvs/kvi_kvs_treenode_localvariable.cpp index 95221ca9..f98dfb4e 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_localvariable.cpp +++ b/src/kvirc/kvs/kvi_kvs_treenode_localvariable.cpp @@ -27,7 +27,7 @@ #include "kvi_kvs_treenode_localvariable.h" #include "kvi_kvs_runtimecontext.h" -KviKvsTreeNodeLocalVariable::KviKvsTreeNodeLocalVariable(const QChar * pLocation,const QString &szIdentifier) +KviKvsTreeNodeLocalVariable::KviKvsTreeNodeLocalVariable(const TQChar * pLocation,const TQString &szIdentifier) : KviKvsTreeNodeVariable(pLocation,szIdentifier) { } @@ -36,7 +36,7 @@ KviKvsTreeNodeLocalVariable::~KviKvsTreeNodeLocalVariable() { } -void KviKvsTreeNodeLocalVariable::contextDescription(QString &szBuffer) +void KviKvsTreeNodeLocalVariable::contextDescription(TQString &szBuffer) { #ifdef COMPILE_NEW_KVS szBuffer = "Local Variable \""; @@ -55,7 +55,7 @@ void KviKvsTreeNodeLocalVariable::dump(const char * prefix) bool KviKvsTreeNodeLocalVariable::evaluateReadOnly(KviKvsRunTimeContext * c,KviKvsVariant * pBuffer) { #ifdef COMPILE_NEW_KVS - KviKvsVariant * v = c->localVariables()->find(m_szIdentifier); + KviKvsVariant * v = c->localVariables()->tqfind(m_szIdentifier); if(v) { pBuffer->copyFrom(v); diff --git a/src/kvirc/kvs/kvi_kvs_treenode_localvariable.h b/src/kvirc/kvs/kvi_kvs_treenode_localvariable.h index 9f6998df..4200fbc0 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_localvariable.h +++ b/src/kvirc/kvs/kvi_kvs_treenode_localvariable.h @@ -33,10 +33,10 @@ class KviKvsRunTimeContext; class KVIRC_API KviKvsTreeNodeLocalVariable : public KviKvsTreeNodeVariable { public: - KviKvsTreeNodeLocalVariable(const QChar * pLocation,const QString &szIdentifier); + KviKvsTreeNodeLocalVariable(const TQChar * pLocation,const TQString &szIdentifier); ~KviKvsTreeNodeLocalVariable(); public: - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); virtual bool evaluateReadOnly(KviKvsRunTimeContext * c,KviKvsVariant * pResult); virtual KviKvsRWEvaluationResult * evaluateReadWrite(KviKvsRunTimeContext * c); diff --git a/src/kvirc/kvs/kvi_kvs_treenode_modulecallbackcommand.cpp b/src/kvirc/kvs/kvi_kvs_treenode_modulecallbackcommand.cpp index bc6b9c5b..0914ccda 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_modulecallbackcommand.cpp +++ b/src/kvirc/kvs/kvi_kvs_treenode_modulecallbackcommand.cpp @@ -33,7 +33,7 @@ #include "kvi_kvs_moduleinterface.h" #include "kvi_kvs_runtimecontext.h" -KviKvsTreeNodeModuleCallbackCommand::KviKvsTreeNodeModuleCallbackCommand(const QChar * pLocation,const QString &szModuleName,const QString &szCmdName,KviKvsTreeNodeDataList * params,KviKvsScript * pCallback) +KviKvsTreeNodeModuleCallbackCommand::KviKvsTreeNodeModuleCallbackCommand(const TQChar * pLocation,const TQString &szModuleName,const TQString &szCmdName,KviKvsTreeNodeDataList * params,KviKvsScript * pCallback) : KviKvsTreeNodeCallbackCommand(pLocation,szCmdName,params,pCallback) { m_szModuleName = szModuleName; @@ -44,7 +44,7 @@ KviKvsTreeNodeModuleCallbackCommand::~KviKvsTreeNodeModuleCallbackCommand() { } -void KviKvsTreeNodeModuleCallbackCommand::contextDescription(QString &szBuffer) +void KviKvsTreeNodeModuleCallbackCommand::contextDescription(TQString &szBuffer) { szBuffer = "Module Callback Command \""; szBuffer += m_szModuleName; @@ -67,7 +67,7 @@ bool KviKvsTreeNodeModuleCallbackCommand::execute(KviKvsRunTimeContext * c) KviModule * m = g_pModuleManager->getModule(m_szModuleName.utf8().data()); if(!m) { - QString szErr = g_pModuleManager->lastError().ptr(); // <-- fixme! + TQString szErr = g_pModuleManager->lastError().ptr(); // <-- fixme! c->error(this,__tr2qs("Module command call failed: can't load the module '%Q': %Q"),&m_szModuleName,&szErr); return false; } diff --git a/src/kvirc/kvs/kvi_kvs_treenode_modulecallbackcommand.h b/src/kvirc/kvs/kvi_kvs_treenode_modulecallbackcommand.h index cc484f96..c24f1c5a 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_modulecallbackcommand.h +++ b/src/kvirc/kvs/kvi_kvs_treenode_modulecallbackcommand.h @@ -36,12 +36,12 @@ class KviKvsRunTimeContext; class KVIRC_API KviKvsTreeNodeModuleCallbackCommand : public KviKvsTreeNodeCallbackCommand { public: - KviKvsTreeNodeModuleCallbackCommand(const QChar * pLocation,const QString &szModuleName,const QString &szCmdName,KviKvsTreeNodeDataList * params,KviKvsScript * pCallback); + KviKvsTreeNodeModuleCallbackCommand(const TQChar * pLocation,const TQString &szModuleName,const TQString &szCmdName,KviKvsTreeNodeDataList * params,KviKvsScript * pCallback); ~KviKvsTreeNodeModuleCallbackCommand(); protected: - QString m_szModuleName; + TQString m_szModuleName; public: - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); bool execute(KviKvsRunTimeContext* c); }; diff --git a/src/kvirc/kvs/kvi_kvs_treenode_modulefunctioncall.cpp b/src/kvirc/kvs/kvi_kvs_treenode_modulefunctioncall.cpp index e7f0a466..54172d67 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_modulefunctioncall.cpp +++ b/src/kvirc/kvs/kvi_kvs_treenode_modulefunctioncall.cpp @@ -33,7 +33,7 @@ #include "kvi_kvs_runtimecontext.h" -KviKvsTreeNodeModuleFunctionCall::KviKvsTreeNodeModuleFunctionCall(const QChar * pLocation,const QString &szModuleName,const QString &szFncName,KviKvsTreeNodeDataList * pParams) +KviKvsTreeNodeModuleFunctionCall::KviKvsTreeNodeModuleFunctionCall(const TQChar * pLocation,const TQString &szModuleName,const TQString &szFncName,KviKvsTreeNodeDataList * pParams) : KviKvsTreeNodeFunctionCall(pLocation,szFncName,pParams) { m_szModuleName = szModuleName; @@ -43,7 +43,7 @@ KviKvsTreeNodeModuleFunctionCall::~KviKvsTreeNodeModuleFunctionCall() { } -void KviKvsTreeNodeModuleFunctionCall::contextDescription(QString &szBuffer) +void KviKvsTreeNodeModuleFunctionCall::contextDescription(TQString &szBuffer) { szBuffer = "Module Function Call \""; szBuffer += m_szModuleName; @@ -55,7 +55,7 @@ void KviKvsTreeNodeModuleFunctionCall::contextDescription(QString &szBuffer) void KviKvsTreeNodeModuleFunctionCall::dump(const char * prefix) { debug("%s ModuleFunctionCall(%s.%s)",prefix,m_szModuleName.utf8().data(),m_szFunctionName.utf8().data()); - QString tmp = prefix; + TQString tmp = prefix; tmp.append(" "); m_pParams->dump(tmp.utf8().data()); } @@ -66,7 +66,7 @@ bool KviKvsTreeNodeModuleFunctionCall::evaluateReadOnly(KviKvsRunTimeContext * c KviModule * m = g_pModuleManager->getModule(m_szModuleName.utf8().data()); if(!m) { - QString szErr = g_pModuleManager->lastError().ptr(); // <-- fixme! + TQString szErr = g_pModuleManager->lastError().ptr(); // <-- fixme! c->error(this,__tr2qs("Module function call failed: can't load the module '%Q': %Q"),&m_szModuleName,&szErr); return false; } diff --git a/src/kvirc/kvs/kvi_kvs_treenode_modulefunctioncall.h b/src/kvirc/kvs/kvi_kvs_treenode_modulefunctioncall.h index 9581d035..86dde629 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_modulefunctioncall.h +++ b/src/kvirc/kvs/kvi_kvs_treenode_modulefunctioncall.h @@ -35,12 +35,12 @@ class KviKvsVariant; class KVIRC_API KviKvsTreeNodeModuleFunctionCall : public KviKvsTreeNodeFunctionCall { public: - KviKvsTreeNodeModuleFunctionCall(const QChar * pLocation,const QString &szModuleName,const QString &szFncName,KviKvsTreeNodeDataList * pParams); + KviKvsTreeNodeModuleFunctionCall(const TQChar * pLocation,const TQString &szModuleName,const TQString &szFncName,KviKvsTreeNodeDataList * pParams); ~KviKvsTreeNodeModuleFunctionCall(); protected: - QString m_szModuleName; + TQString m_szModuleName; public: - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); virtual bool evaluateReadOnly(KviKvsRunTimeContext * c,KviKvsVariant * pBuffer); }; diff --git a/src/kvirc/kvs/kvi_kvs_treenode_modulesimplecommand.cpp b/src/kvirc/kvs/kvi_kvs_treenode_modulesimplecommand.cpp index 78b6f02c..408d7fdc 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_modulesimplecommand.cpp +++ b/src/kvirc/kvs/kvi_kvs_treenode_modulesimplecommand.cpp @@ -33,7 +33,7 @@ #include "kvi_kvs_moduleinterface.h" #include "kvi_kvs_runtimecontext.h" -KviKvsTreeNodeModuleSimpleCommand::KviKvsTreeNodeModuleSimpleCommand(const QChar * pLocation,const QString &szModuleName,const QString &szCmdName,KviKvsTreeNodeDataList * params) +KviKvsTreeNodeModuleSimpleCommand::KviKvsTreeNodeModuleSimpleCommand(const TQChar * pLocation,const TQString &szModuleName,const TQString &szCmdName,KviKvsTreeNodeDataList * params) : KviKvsTreeNodeSimpleCommand(pLocation,szCmdName,params) { m_szModuleName = szModuleName; @@ -44,7 +44,7 @@ KviKvsTreeNodeModuleSimpleCommand::~KviKvsTreeNodeModuleSimpleCommand() { } -void KviKvsTreeNodeModuleSimpleCommand::contextDescription(QString &szBuffer) +void KviKvsTreeNodeModuleSimpleCommand::contextDescription(TQString &szBuffer) { szBuffer = "Module Callback Command \""; szBuffer += m_szModuleName; @@ -66,7 +66,7 @@ bool KviKvsTreeNodeModuleSimpleCommand::execute(KviKvsRunTimeContext * c) KviModule * m = g_pModuleManager->getModule(m_szModuleName.utf8().data()); if(!m) { - QString szErr = g_pModuleManager->lastError().ptr(); // <-- fixme! + TQString szErr = g_pModuleManager->lastError().ptr(); // <-- fixme! c->error(this,__tr2qs("Module command call failed: can't load the module '%Q': %Q"),&m_szModuleName,&szErr); return false; } diff --git a/src/kvirc/kvs/kvi_kvs_treenode_modulesimplecommand.h b/src/kvirc/kvs/kvi_kvs_treenode_modulesimplecommand.h index 2a6ee96d..5396cc55 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_modulesimplecommand.h +++ b/src/kvirc/kvs/kvi_kvs_treenode_modulesimplecommand.h @@ -34,12 +34,12 @@ class KviKvsRunTimeContext; class KVIRC_API KviKvsTreeNodeModuleSimpleCommand : public KviKvsTreeNodeSimpleCommand { public: - KviKvsTreeNodeModuleSimpleCommand(const QChar * pLocation,const QString &szModuleName,const QString &szCmdName,KviKvsTreeNodeDataList * params); + KviKvsTreeNodeModuleSimpleCommand(const TQChar * pLocation,const TQString &szModuleName,const TQString &szCmdName,KviKvsTreeNodeDataList * params); ~KviKvsTreeNodeModuleSimpleCommand(); protected: - QString m_szModuleName; + TQString m_szModuleName; public: - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); virtual bool execute(KviKvsRunTimeContext * c); }; diff --git a/src/kvirc/kvs/kvi_kvs_treenode_multipleparameteridentifier.cpp b/src/kvirc/kvs/kvi_kvs_treenode_multipleparameteridentifier.cpp index 405575d0..4c877ca5 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_multipleparameteridentifier.cpp +++ b/src/kvirc/kvs/kvi_kvs_treenode_multipleparameteridentifier.cpp @@ -29,7 +29,7 @@ #include "kvi_kvs_variant.h" -KviKvsTreeNodeMultipleParameterIdentifier::KviKvsTreeNodeMultipleParameterIdentifier(const QChar * pLocation,int iStart,int iEnd) +KviKvsTreeNodeMultipleParameterIdentifier::KviKvsTreeNodeMultipleParameterIdentifier(const TQChar * pLocation,int iStart,int iEnd) : KviKvsTreeNodeData(pLocation) { m_iStart = iStart; @@ -40,11 +40,11 @@ KviKvsTreeNodeMultipleParameterIdentifier::~KviKvsTreeNodeMultipleParameterIdent { } -void KviKvsTreeNodeMultipleParameterIdentifier::contextDescription(QString &szBuffer) +void KviKvsTreeNodeMultipleParameterIdentifier::contextDescription(TQString &szBuffer) { szBuffer = "Multiple Parameter Identifier \"$"; - if(m_iEnd < m_iStart)KviQString::appendFormatted(szBuffer,"%d-",m_iStart); - else KviQString::appendFormatted(szBuffer,"%d-%d",m_iStart,m_iEnd); + if(m_iEnd < m_iStart)KviTQString::appendFormatted(szBuffer,"%d-",m_iStart); + else KviTQString::appendFormatted(szBuffer,"%d-%d",m_iStart,m_iEnd); szBuffer += "\""; } @@ -63,7 +63,7 @@ bool KviKvsTreeNodeMultipleParameterIdentifier::evaluateReadOnly(KviKvsRunTimeCo return true; } - QString sz; + TQString sz; v->asString(sz); if(m_iEnd >= m_iStart) @@ -72,7 +72,7 @@ bool KviKvsTreeNodeMultipleParameterIdentifier::evaluateReadOnly(KviKvsRunTimeCo int idx = m_iStart; for(v = c->parameterList()->next();v && (idx < m_iEnd);v = c->parameterList()->next()) { - sz += QChar(' '); + sz += TQChar(' '); v->appendAsString(sz); idx++; } @@ -80,7 +80,7 @@ bool KviKvsTreeNodeMultipleParameterIdentifier::evaluateReadOnly(KviKvsRunTimeCo // all up to the end of the list for(v = c->parameterList()->next();v;v = c->parameterList()->next()) { - sz += QChar(' '); + sz += TQChar(' '); v->appendAsString(sz); } } diff --git a/src/kvirc/kvs/kvi_kvs_treenode_multipleparameteridentifier.h b/src/kvirc/kvs/kvi_kvs_treenode_multipleparameteridentifier.h index ad3edbd4..54d86ec1 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_multipleparameteridentifier.h +++ b/src/kvirc/kvs/kvi_kvs_treenode_multipleparameteridentifier.h @@ -34,13 +34,13 @@ class KviKvsVariant; class KVIRC_API KviKvsTreeNodeMultipleParameterIdentifier : public KviKvsTreeNodeData { public: - KviKvsTreeNodeMultipleParameterIdentifier(const QChar * pLocation,int iStart,int iEnd); + KviKvsTreeNodeMultipleParameterIdentifier(const TQChar * pLocation,int iStart,int iEnd); ~KviKvsTreeNodeMultipleParameterIdentifier(); protected: int m_iStart; int m_iEnd; // the index of the last parameter wanted (may be -1: in that case all up to the end) public: - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); virtual bool evaluateReadOnly(KviKvsRunTimeContext * c,KviKvsVariant * pBuffer); }; diff --git a/src/kvirc/kvs/kvi_kvs_treenode_objectfield.cpp b/src/kvirc/kvs/kvi_kvs_treenode_objectfield.cpp index 6ac81b9d..f0e49578 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_objectfield.cpp +++ b/src/kvirc/kvs/kvi_kvs_treenode_objectfield.cpp @@ -29,7 +29,7 @@ #include "kvi_kvs_object.h" #include "kvi_kvs_hash.h" -KviKvsTreeNodeObjectField::KviKvsTreeNodeObjectField(const QChar * pLocation,const QString &szIdentifier) +KviKvsTreeNodeObjectField::KviKvsTreeNodeObjectField(const TQChar * pLocation,const TQString &szIdentifier) : KviKvsTreeNodeVariable(pLocation,szIdentifier) { } @@ -38,7 +38,7 @@ KviKvsTreeNodeObjectField::~KviKvsTreeNodeObjectField() { } -void KviKvsTreeNodeObjectField::contextDescription(QString &szBuffer) +void KviKvsTreeNodeObjectField::contextDescription(TQString &szBuffer) { #ifdef COMPILE_NEW_KVS szBuffer = "Object Field \""; @@ -62,7 +62,7 @@ bool KviKvsTreeNodeObjectField::canEvaluateInObjectScope() bool KviKvsTreeNodeObjectField::evaluateReadOnlyInObjectScope(KviKvsObject * o,KviKvsRunTimeContext * c,KviKvsVariant * pBuffer) { #ifdef COMPILE_NEW_KVS - KviKvsVariant * v = o->dataContainer()->find(m_szIdentifier); + KviKvsVariant * v = o->dataContainer()->tqfind(m_szIdentifier); if(v)pBuffer->copyFrom(v); else pBuffer->setNothing(); #endif diff --git a/src/kvirc/kvs/kvi_kvs_treenode_objectfield.h b/src/kvirc/kvs/kvi_kvs_treenode_objectfield.h index ef56ca10..607a69f0 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_objectfield.h +++ b/src/kvirc/kvs/kvi_kvs_treenode_objectfield.h @@ -34,10 +34,10 @@ class KviKvsObject; class KVIRC_API KviKvsTreeNodeObjectField : public KviKvsTreeNodeVariable { public: - KviKvsTreeNodeObjectField(const QChar * pLocation,const QString &szIdentifier); + KviKvsTreeNodeObjectField(const TQChar * pLocation,const TQString &szIdentifier); ~KviKvsTreeNodeObjectField(); public: - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); virtual bool canEvaluateInObjectScope(); virtual bool evaluateReadOnlyInObjectScope(KviKvsObject * o,KviKvsRunTimeContext * c,KviKvsVariant * pResult); diff --git a/src/kvirc/kvs/kvi_kvs_treenode_objectfunctioncall.cpp b/src/kvirc/kvs/kvi_kvs_treenode_objectfunctioncall.cpp index d9d5f23d..9cf06be1 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_objectfunctioncall.cpp +++ b/src/kvirc/kvs/kvi_kvs_treenode_objectfunctioncall.cpp @@ -26,7 +26,7 @@ #include "kvi_kvs_treenode_objectfunctioncall.h" -KviKvsTreeNodeObjectFunctionCall::KviKvsTreeNodeObjectFunctionCall(const QChar * pLocation,const QString &szFncName,KviKvsTreeNodeDataList * pParams) +KviKvsTreeNodeObjectFunctionCall::KviKvsTreeNodeObjectFunctionCall(const TQChar * pLocation,const TQString &szFncName,KviKvsTreeNodeDataList * pParams) : KviKvsTreeNodeFunctionCall(pLocation,szFncName,pParams) { } @@ -35,7 +35,7 @@ KviKvsTreeNodeObjectFunctionCall::~KviKvsTreeNodeObjectFunctionCall() { } -void KviKvsTreeNodeObjectFunctionCall::contextDescription(QString &szBuffer) +void KviKvsTreeNodeObjectFunctionCall::contextDescription(TQString &szBuffer) { #ifdef COMPILE_NEW_KVS szBuffer = "Object Function Call \""; @@ -48,7 +48,7 @@ void KviKvsTreeNodeObjectFunctionCall::dump(const char * prefix) { #ifdef COMPILE_NEW_KVS debug("%s ObjectFunctionCall(%s)",prefix,m_szFunctionName.utf8().data()); - QString tmp = prefix; + TQString tmp = prefix; tmp.append(" "); m_pParams->dump(tmp.utf8().data()); #endif diff --git a/src/kvirc/kvs/kvi_kvs_treenode_objectfunctioncall.h b/src/kvirc/kvs/kvi_kvs_treenode_objectfunctioncall.h index c1e80631..5588a02b 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_objectfunctioncall.h +++ b/src/kvirc/kvs/kvi_kvs_treenode_objectfunctioncall.h @@ -33,10 +33,10 @@ class KVIRC_API KviKvsTreeNodeObjectFunctionCall : public KviKvsTreeNodeFunctionCall { public: - KviKvsTreeNodeObjectFunctionCall(const QChar * pLocation,const QString &szFncName,KviKvsTreeNodeDataList * pParams); + KviKvsTreeNodeObjectFunctionCall(const TQChar * pLocation,const TQString &szFncName,KviKvsTreeNodeDataList * pParams); ~KviKvsTreeNodeObjectFunctionCall(); public: - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); virtual bool canEvaluateInObjectScope(); }; diff --git a/src/kvirc/kvs/kvi_kvs_treenode_operation.cpp b/src/kvirc/kvs/kvi_kvs_treenode_operation.cpp index 179d50ef..e8c50b97 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_operation.cpp +++ b/src/kvirc/kvs/kvi_kvs_treenode_operation.cpp @@ -29,12 +29,12 @@ #include "kvi_kvs_runtimecontext.h" #include "kvi_locale.h" -#include +#include #include -KviKvsTreeNodeOperation::KviKvsTreeNodeOperation(const QChar * pLocation) +KviKvsTreeNodeOperation::KviKvsTreeNodeOperation(const TQChar * pLocation) : KviKvsTreeNodeInstruction(pLocation) { //m_pTargetData = 0; no need to set it @@ -51,7 +51,7 @@ void KviKvsTreeNodeOperation::setTargetVariableReference(KviKvsTreeNodeData * r) m_pTargetData->setParent(this); } -void KviKvsTreeNodeOperation::contextDescription(QString &szBuffer) +void KviKvsTreeNodeOperation::contextDescription(TQString &szBuffer) { szBuffer = "Operation"; } @@ -59,7 +59,7 @@ void KviKvsTreeNodeOperation::contextDescription(QString &szBuffer) void KviKvsTreeNodeOperation::dump(const char * prefix) { debug("%s Operation",prefix); - QString tmp = prefix; + TQString tmp = prefix; tmp.append(" "); m_pTargetData->dump(tmp.utf8().data()); } @@ -68,7 +68,7 @@ void KviKvsTreeNodeOperation::dump(const char * prefix) -KviKvsTreeNodeOperationAssignment::KviKvsTreeNodeOperationAssignment(const QChar * pLocation,KviKvsTreeNodeData * pRightSide) +KviKvsTreeNodeOperationAssignment::KviKvsTreeNodeOperationAssignment(const TQChar * pLocation,KviKvsTreeNodeData * pRightSide) : KviKvsTreeNodeOperation(pLocation) { m_pRightSide = pRightSide; @@ -80,7 +80,7 @@ KviKvsTreeNodeOperationAssignment::~KviKvsTreeNodeOperationAssignment() delete m_pRightSide; } -void KviKvsTreeNodeOperationAssignment::contextDescription(QString &szBuffer) +void KviKvsTreeNodeOperationAssignment::contextDescription(TQString &szBuffer) { szBuffer = "Assignment"; } @@ -89,7 +89,7 @@ void KviKvsTreeNodeOperationAssignment::contextDescription(QString &szBuffer) void KviKvsTreeNodeOperationAssignment::dump(const char * prefix) { debug("%s OperationAssignment",prefix); - QString tmp = prefix; + TQString tmp = prefix; tmp.append(" "); m_pTargetData->dump(tmp.utf8().data()); m_pRightSide->dump(tmp.utf8().data()); @@ -113,7 +113,7 @@ bool KviKvsTreeNodeOperationAssignment::execute(KviKvsRunTimeContext * c) -KviKvsTreeNodeOperationDecrement::KviKvsTreeNodeOperationDecrement(const QChar * pLocation) +KviKvsTreeNodeOperationDecrement::KviKvsTreeNodeOperationDecrement(const TQChar * pLocation) : KviKvsTreeNodeOperation(pLocation) { } @@ -122,7 +122,7 @@ KviKvsTreeNodeOperationDecrement::~KviKvsTreeNodeOperationDecrement() { } -void KviKvsTreeNodeOperationDecrement::contextDescription(QString &szBuffer) +void KviKvsTreeNodeOperationDecrement::contextDescription(TQString &szBuffer) { #ifdef COMPILE_NEW_KVS szBuffer = "Operator \"--\""; @@ -134,7 +134,7 @@ void KviKvsTreeNodeOperationDecrement::dump(const char * prefix) { #ifdef COMPILE_NEW_KVS debug("%s OperationDecrement",prefix); - QString tmp = prefix; + TQString tmp = prefix; tmp.append(" "); m_pTargetData->dump(tmp.utf8().data()); #endif @@ -176,7 +176,7 @@ bool KviKvsTreeNodeOperationDecrement::execute(KviKvsRunTimeContext * c) -KviKvsTreeNodeOperationIncrement::KviKvsTreeNodeOperationIncrement(const QChar * pLocation) +KviKvsTreeNodeOperationIncrement::KviKvsTreeNodeOperationIncrement(const TQChar * pLocation) : KviKvsTreeNodeOperation(pLocation) { } @@ -185,7 +185,7 @@ KviKvsTreeNodeOperationIncrement::~KviKvsTreeNodeOperationIncrement() { } -void KviKvsTreeNodeOperationIncrement::contextDescription(QString &szBuffer) +void KviKvsTreeNodeOperationIncrement::contextDescription(TQString &szBuffer) { #ifdef COMPILE_NEW_KVS szBuffer = "Operator \"++\""; @@ -197,7 +197,7 @@ void KviKvsTreeNodeOperationIncrement::dump(const char * prefix) { #ifdef COMPILE_NEW_KVS debug("%s OperationIncrement",prefix); - QString tmp = prefix; + TQString tmp = prefix; tmp.append(" "); m_pTargetData->dump(tmp.utf8().data()); #endif @@ -235,7 +235,7 @@ bool KviKvsTreeNodeOperationIncrement::execute(KviKvsRunTimeContext * c) -KviKvsTreeNodeOperationSelfAnd::KviKvsTreeNodeOperationSelfAnd(const QChar * pLocation,KviKvsTreeNodeData * pRightSide) +KviKvsTreeNodeOperationSelfAnd::KviKvsTreeNodeOperationSelfAnd(const TQChar * pLocation,KviKvsTreeNodeData * pRightSide) : KviKvsTreeNodeOperation(pLocation) { #ifdef COMPILE_NEW_KVS @@ -251,7 +251,7 @@ KviKvsTreeNodeOperationSelfAnd::~KviKvsTreeNodeOperationSelfAnd() #endif } -void KviKvsTreeNodeOperationSelfAnd::contextDescription(QString &szBuffer) +void KviKvsTreeNodeOperationSelfAnd::contextDescription(TQString &szBuffer) { #ifdef COMPILE_NEW_KVS szBuffer = "Operator \"&=\""; @@ -263,7 +263,7 @@ void KviKvsTreeNodeOperationSelfAnd::dump(const char * prefix) { #ifdef COMPILE_NEW_KVS debug("%s OperationSelfAnd",prefix); - QString tmp = prefix; + TQString tmp = prefix; tmp.append(" "); m_pTargetData->dump(tmp.utf8().data()); m_pRightSide->dump(tmp.utf8().data()); @@ -305,7 +305,7 @@ bool KviKvsTreeNodeOperationSelfAnd::execute(KviKvsRunTimeContext * c) -KviKvsTreeNodeOperationSelfDivision::KviKvsTreeNodeOperationSelfDivision(const QChar * pLocation,KviKvsTreeNodeData * pRightSide) +KviKvsTreeNodeOperationSelfDivision::KviKvsTreeNodeOperationSelfDivision(const TQChar * pLocation,KviKvsTreeNodeData * pRightSide) : KviKvsTreeNodeOperation(pLocation) { #ifdef COMPILE_NEW_KVS @@ -321,7 +321,7 @@ KviKvsTreeNodeOperationSelfDivision::~KviKvsTreeNodeOperationSelfDivision() #endif } -void KviKvsTreeNodeOperationSelfDivision::contextDescription(QString &szBuffer) +void KviKvsTreeNodeOperationSelfDivision::contextDescription(TQString &szBuffer) { #ifdef COMPILE_NEW_KVS szBuffer = "Operator \"/=\""; @@ -333,7 +333,7 @@ void KviKvsTreeNodeOperationSelfDivision::dump(const char * prefix) { #ifdef COMPILE_NEW_KVS debug("%s OperationSelfDivision",prefix); - QString tmp = prefix; + TQString tmp = prefix; tmp.append(" "); m_pTargetData->dump(tmp.utf8().data()); m_pRightSide->dump(tmp.utf8().data()); @@ -399,7 +399,7 @@ bool KviKvsTreeNodeOperationSelfDivision::execute(KviKvsRunTimeContext * c) return true; } -KviKvsTreeNodeOperationSelfModulus::KviKvsTreeNodeOperationSelfModulus(const QChar * pLocation,KviKvsTreeNodeData * pRightSide) +KviKvsTreeNodeOperationSelfModulus::KviKvsTreeNodeOperationSelfModulus(const TQChar * pLocation,KviKvsTreeNodeData * pRightSide) : KviKvsTreeNodeOperation(pLocation) { #ifdef COMPILE_NEW_KVS @@ -415,7 +415,7 @@ KviKvsTreeNodeOperationSelfModulus::~KviKvsTreeNodeOperationSelfModulus() #endif } -void KviKvsTreeNodeOperationSelfModulus::contextDescription(QString &szBuffer) +void KviKvsTreeNodeOperationSelfModulus::contextDescription(TQString &szBuffer) { #ifdef COMPILE_NEW_KVS szBuffer = "Operator \"Self Modulo\""; @@ -427,7 +427,7 @@ void KviKvsTreeNodeOperationSelfModulus::dump(const char * prefix) { #ifdef COMPILE_NEW_KVS debug("%s OperationSelfModulus",prefix); - QString tmp = prefix; + TQString tmp = prefix; tmp.append(" "); m_pTargetData->dump(tmp.utf8().data()); m_pRightSide->dump(tmp.utf8().data()); @@ -494,7 +494,7 @@ bool KviKvsTreeNodeOperationSelfModulus::execute(KviKvsRunTimeContext * c) -KviKvsTreeNodeOperationSelfMultiplication::KviKvsTreeNodeOperationSelfMultiplication(const QChar * pLocation,KviKvsTreeNodeData * pRightSide) +KviKvsTreeNodeOperationSelfMultiplication::KviKvsTreeNodeOperationSelfMultiplication(const TQChar * pLocation,KviKvsTreeNodeData * pRightSide) : KviKvsTreeNodeOperation(pLocation) { #ifdef COMPILE_NEW_KVS @@ -510,7 +510,7 @@ KviKvsTreeNodeOperationSelfMultiplication::~KviKvsTreeNodeOperationSelfMultiplic #endif } -void KviKvsTreeNodeOperationSelfMultiplication::contextDescription(QString &szBuffer) +void KviKvsTreeNodeOperationSelfMultiplication::contextDescription(TQString &szBuffer) { #ifdef COMPILE_NEW_KVS szBuffer = "Operator \"*=\""; @@ -522,7 +522,7 @@ void KviKvsTreeNodeOperationSelfMultiplication::dump(const char * prefix) { #ifdef COMPILE_NEW_KVS debug("%s OperationSelfMultiplication",prefix); - QString tmp = prefix; + TQString tmp = prefix; tmp.append(" "); m_pTargetData->dump(tmp.utf8().data()); m_pRightSide->dump(tmp.utf8().data()); @@ -573,7 +573,7 @@ bool KviKvsTreeNodeOperationSelfMultiplication::execute(KviKvsRunTimeContext * c -KviKvsTreeNodeOperationSelfOr::KviKvsTreeNodeOperationSelfOr(const QChar * pLocation,KviKvsTreeNodeData * pRightSide) +KviKvsTreeNodeOperationSelfOr::KviKvsTreeNodeOperationSelfOr(const TQChar * pLocation,KviKvsTreeNodeData * pRightSide) : KviKvsTreeNodeOperation(pLocation) { #ifdef COMPILE_NEW_KVS @@ -589,7 +589,7 @@ KviKvsTreeNodeOperationSelfOr::~KviKvsTreeNodeOperationSelfOr() #endif } -void KviKvsTreeNodeOperationSelfOr::contextDescription(QString &szBuffer) +void KviKvsTreeNodeOperationSelfOr::contextDescription(TQString &szBuffer) { #ifdef COMPILE_NEW_KVS szBuffer = "Operator \"|=\""; @@ -601,7 +601,7 @@ void KviKvsTreeNodeOperationSelfOr::dump(const char * prefix) { #ifdef COMPILE_NEW_KVS debug("%s OperationSelfOr",prefix); - QString tmp = prefix; + TQString tmp = prefix; tmp.append(" "); m_pTargetData->dump(tmp.utf8().data()); m_pRightSide->dump(tmp.utf8().data()); @@ -643,7 +643,7 @@ bool KviKvsTreeNodeOperationSelfOr::execute(KviKvsRunTimeContext * c) -KviKvsTreeNodeOperationSelfShl::KviKvsTreeNodeOperationSelfShl(const QChar * pLocation,KviKvsTreeNodeData * pRightSide) +KviKvsTreeNodeOperationSelfShl::KviKvsTreeNodeOperationSelfShl(const TQChar * pLocation,KviKvsTreeNodeData * pRightSide) : KviKvsTreeNodeOperation(pLocation) { #ifdef COMPILE_NEW_KVS @@ -659,7 +659,7 @@ KviKvsTreeNodeOperationSelfShl::~KviKvsTreeNodeOperationSelfShl() #endif } -void KviKvsTreeNodeOperationSelfShl::contextDescription(QString &szBuffer) +void KviKvsTreeNodeOperationSelfShl::contextDescription(TQString &szBuffer) { #ifdef COMPILE_NEW_KVS szBuffer = "Operator \"<<=\""; @@ -671,7 +671,7 @@ void KviKvsTreeNodeOperationSelfShl::dump(const char * prefix) { #ifdef COMPILE_NEW_KVS debug("%s OperationSelfShl",prefix); - QString tmp = prefix; + TQString tmp = prefix; tmp.append(" "); m_pTargetData->dump(tmp.utf8().data()); m_pRightSide->dump(tmp.utf8().data()); @@ -715,7 +715,7 @@ bool KviKvsTreeNodeOperationSelfShl::execute(KviKvsRunTimeContext * c) -KviKvsTreeNodeOperationSelfShr::KviKvsTreeNodeOperationSelfShr(const QChar * pLocation,KviKvsTreeNodeData * pRightSide) +KviKvsTreeNodeOperationSelfShr::KviKvsTreeNodeOperationSelfShr(const TQChar * pLocation,KviKvsTreeNodeData * pRightSide) : KviKvsTreeNodeOperation(pLocation) { #ifdef COMPILE_NEW_KVS @@ -731,7 +731,7 @@ KviKvsTreeNodeOperationSelfShr::~KviKvsTreeNodeOperationSelfShr() #endif } -void KviKvsTreeNodeOperationSelfShr::contextDescription(QString &szBuffer) +void KviKvsTreeNodeOperationSelfShr::contextDescription(TQString &szBuffer) { #ifdef COMPILE_NEW_KVS szBuffer = "Operator \">>=\""; @@ -743,7 +743,7 @@ void KviKvsTreeNodeOperationSelfShr::dump(const char * prefix) { #ifdef COMPILE_NEW_KVS debug("%s OperationSelfShr",prefix); - QString tmp = prefix; + TQString tmp = prefix; tmp.append(" "); m_pTargetData->dump(tmp.utf8().data()); m_pRightSide->dump(tmp.utf8().data()); @@ -793,7 +793,7 @@ bool KviKvsTreeNodeOperationSelfShr::execute(KviKvsRunTimeContext * c) -KviKvsTreeNodeOperationSelfSubtraction::KviKvsTreeNodeOperationSelfSubtraction(const QChar * pLocation,KviKvsTreeNodeData * pRightSide) +KviKvsTreeNodeOperationSelfSubtraction::KviKvsTreeNodeOperationSelfSubtraction(const TQChar * pLocation,KviKvsTreeNodeData * pRightSide) : KviKvsTreeNodeOperation(pLocation) { #ifdef COMPILE_NEW_KVS @@ -809,7 +809,7 @@ KviKvsTreeNodeOperationSelfSubtraction::~KviKvsTreeNodeOperationSelfSubtraction( #endif } -void KviKvsTreeNodeOperationSelfSubtraction::contextDescription(QString &szBuffer) +void KviKvsTreeNodeOperationSelfSubtraction::contextDescription(TQString &szBuffer) { #ifdef COMPILE_NEW_KVS szBuffer = "Operator \"-=\""; @@ -821,7 +821,7 @@ void KviKvsTreeNodeOperationSelfSubtraction::dump(const char * prefix) { #ifdef COMPILE_NEW_KVS debug("%s OperationSelfSubtraction",prefix); - QString tmp = prefix; + TQString tmp = prefix; tmp.append(" "); m_pTargetData->dump(tmp.utf8().data()); m_pRightSide->dump(tmp.utf8().data()); @@ -876,7 +876,7 @@ bool KviKvsTreeNodeOperationSelfSubtraction::execute(KviKvsRunTimeContext * c) -KviKvsTreeNodeOperationSelfSum::KviKvsTreeNodeOperationSelfSum(const QChar * pLocation,KviKvsTreeNodeData * pRightSide) +KviKvsTreeNodeOperationSelfSum::KviKvsTreeNodeOperationSelfSum(const TQChar * pLocation,KviKvsTreeNodeData * pRightSide) : KviKvsTreeNodeOperation(pLocation) { #ifdef COMPILE_NEW_KVS @@ -892,7 +892,7 @@ KviKvsTreeNodeOperationSelfSum::~KviKvsTreeNodeOperationSelfSum() #endif } -void KviKvsTreeNodeOperationSelfSum::contextDescription(QString &szBuffer) +void KviKvsTreeNodeOperationSelfSum::contextDescription(TQString &szBuffer) { #ifdef COMPILE_NEW_KVS szBuffer = "Operator \"+=\""; @@ -904,7 +904,7 @@ void KviKvsTreeNodeOperationSelfSum::dump(const char * prefix) { #ifdef COMPILE_NEW_KVS debug("%s OperationSelfSum",prefix); - QString tmp = prefix; + TQString tmp = prefix; tmp.append(" "); m_pTargetData->dump(tmp.utf8().data()); m_pRightSide->dump(tmp.utf8().data()); @@ -961,7 +961,7 @@ bool KviKvsTreeNodeOperationSelfSum::execute(KviKvsRunTimeContext * c) -KviKvsTreeNodeOperationSelfXor::KviKvsTreeNodeOperationSelfXor(const QChar * pLocation,KviKvsTreeNodeData * pRightSide) +KviKvsTreeNodeOperationSelfXor::KviKvsTreeNodeOperationSelfXor(const TQChar * pLocation,KviKvsTreeNodeData * pRightSide) : KviKvsTreeNodeOperation(pLocation) { #ifdef COMPILE_NEW_KVS @@ -977,7 +977,7 @@ KviKvsTreeNodeOperationSelfXor::~KviKvsTreeNodeOperationSelfXor() #endif } -void KviKvsTreeNodeOperationSelfXor::contextDescription(QString &szBuffer) +void KviKvsTreeNodeOperationSelfXor::contextDescription(TQString &szBuffer) { #ifdef COMPILE_NEW_KVS szBuffer = "Operator \"^=\""; @@ -989,7 +989,7 @@ void KviKvsTreeNodeOperationSelfXor::dump(const char * prefix) { #ifdef COMPILE_NEW_KVS debug("%s OperationSelfXor",prefix); - QString tmp = prefix; + TQString tmp = prefix; tmp.append(" "); m_pTargetData->dump(tmp.utf8().data()); m_pRightSide->dump(tmp.utf8().data()); @@ -1035,7 +1035,7 @@ bool KviKvsTreeNodeOperationSelfXor::execute(KviKvsRunTimeContext * c) -KviKvsTreeNodeOperationStringAppend::KviKvsTreeNodeOperationStringAppend(const QChar * pLocation,KviKvsTreeNodeData * pRightSide) +KviKvsTreeNodeOperationStringAppend::KviKvsTreeNodeOperationStringAppend(const TQChar * pLocation,KviKvsTreeNodeData * pRightSide) : KviKvsTreeNodeOperation(pLocation) { m_pRightSide = pRightSide; @@ -1047,7 +1047,7 @@ KviKvsTreeNodeOperationStringAppend::~KviKvsTreeNodeOperationStringAppend() delete m_pRightSide; } -void KviKvsTreeNodeOperationStringAppend::contextDescription(QString &szBuffer) +void KviKvsTreeNodeOperationStringAppend::contextDescription(TQString &szBuffer) { szBuffer = "Operator \"<<\""; } @@ -1056,7 +1056,7 @@ void KviKvsTreeNodeOperationStringAppend::contextDescription(QString &szBuffer) void KviKvsTreeNodeOperationStringAppend::dump(const char * prefix) { debug("%s OperationStringAppend",prefix); - QString tmp = prefix; + TQString tmp = prefix; tmp.append(" "); m_pTargetData->dump(tmp.utf8().data()); m_pRightSide->dump(tmp.utf8().data()); @@ -1069,7 +1069,7 @@ bool KviKvsTreeNodeOperationStringAppend::execute(KviKvsRunTimeContext * c) KviKvsRWEvaluationResult * target = m_pTargetData->evaluateReadWrite(c); if(!target)return false; - QString sz1; + TQString sz1; target->result()->asString(sz1); v.appendAsString(sz1); target->result()->setString(sz1); @@ -1082,7 +1082,7 @@ bool KviKvsTreeNodeOperationStringAppend::execute(KviKvsRunTimeContext * c) -KviKvsTreeNodeOperationArrayAppend::KviKvsTreeNodeOperationArrayAppend(const QChar * pLocation,KviKvsTreeNodeData * pRightSide) +KviKvsTreeNodeOperationArrayAppend::KviKvsTreeNodeOperationArrayAppend(const TQChar * pLocation,KviKvsTreeNodeData * pRightSide) : KviKvsTreeNodeOperation(pLocation) { m_pRightSide = pRightSide; @@ -1094,7 +1094,7 @@ KviKvsTreeNodeOperationArrayAppend::~KviKvsTreeNodeOperationArrayAppend() delete m_pRightSide; } -void KviKvsTreeNodeOperationArrayAppend::contextDescription(QString &szBuffer) +void KviKvsTreeNodeOperationArrayAppend::contextDescription(TQString &szBuffer) { szBuffer = "Operator \"<+\""; } @@ -1103,7 +1103,7 @@ void KviKvsTreeNodeOperationArrayAppend::contextDescription(QString &szBuffer) void KviKvsTreeNodeOperationArrayAppend::dump(const char * prefix) { debug("%s OperationArrayAppend",prefix); - QString tmp = prefix; + TQString tmp = prefix; tmp.append(" "); m_pTargetData->dump(tmp.utf8().data()); m_pRightSide->dump(tmp.utf8().data()); @@ -1165,7 +1165,7 @@ bool KviKvsTreeNodeOperationArrayAppend::execute(KviKvsRunTimeContext * c) -KviKvsTreeNodeOperationStringAppendWithComma::KviKvsTreeNodeOperationStringAppendWithComma(const QChar * pLocation,KviKvsTreeNodeData * pRightSide) +KviKvsTreeNodeOperationStringAppendWithComma::KviKvsTreeNodeOperationStringAppendWithComma(const TQChar * pLocation,KviKvsTreeNodeData * pRightSide) : KviKvsTreeNodeOperation(pLocation) { #ifdef COMPILE_NEW_KVS @@ -1181,7 +1181,7 @@ KviKvsTreeNodeOperationStringAppendWithComma::~KviKvsTreeNodeOperationStringAppe #endif } -void KviKvsTreeNodeOperationStringAppendWithComma::contextDescription(QString &szBuffer) +void KviKvsTreeNodeOperationStringAppendWithComma::contextDescription(TQString &szBuffer) { #ifdef COMPILE_NEW_KVS szBuffer = "Operator \"<,\""; @@ -1193,7 +1193,7 @@ void KviKvsTreeNodeOperationStringAppendWithComma::dump(const char * prefix) { #ifdef COMPILE_NEW_KVS debug("%s OperationStringAppendWithComma",prefix); - QString tmp = prefix; + TQString tmp = prefix; tmp.append(" "); m_pTargetData->dump(tmp.utf8().data()); m_pRightSide->dump(tmp.utf8().data()); @@ -1208,15 +1208,15 @@ bool KviKvsTreeNodeOperationStringAppendWithComma::execute(KviKvsRunTimeContext KviKvsRWEvaluationResult * target = m_pTargetData->evaluateReadWrite(c); if(!target)return false; - QString sz1; + TQString sz1; target->result()->asString(sz1); if(sz1.isEmpty()) { v.asString(sz1); } else { - QString sz2; + TQString sz2; v.asString(sz2); - sz1 += QChar(','); + sz1 += TQChar(','); sz1 += sz2; } target->result()->setString(sz1); @@ -1230,7 +1230,7 @@ bool KviKvsTreeNodeOperationStringAppendWithComma::execute(KviKvsRunTimeContext -KviKvsTreeNodeOperationStringAppendWithSpace::KviKvsTreeNodeOperationStringAppendWithSpace(const QChar * pLocation,KviKvsTreeNodeData * pRightSide) +KviKvsTreeNodeOperationStringAppendWithSpace::KviKvsTreeNodeOperationStringAppendWithSpace(const TQChar * pLocation,KviKvsTreeNodeData * pRightSide) : KviKvsTreeNodeOperation(pLocation) { #ifdef COMPILE_NEW_KVS @@ -1246,7 +1246,7 @@ KviKvsTreeNodeOperationStringAppendWithSpace::~KviKvsTreeNodeOperationStringAppe #endif } -void KviKvsTreeNodeOperationStringAppendWithSpace::contextDescription(QString &szBuffer) +void KviKvsTreeNodeOperationStringAppendWithSpace::contextDescription(TQString &szBuffer) { #ifdef COMPILE_NEW_KVS szBuffer = "Operator \"<+\""; @@ -1258,7 +1258,7 @@ void KviKvsTreeNodeOperationStringAppendWithSpace::dump(const char * prefix) { #ifdef COMPILE_NEW_KVS debug("%s OperationStringAppendWithSpace",prefix); - QString tmp = prefix; + TQString tmp = prefix; tmp.append(" "); m_pTargetData->dump(tmp.utf8().data()); m_pRightSide->dump(tmp.utf8().data()); @@ -1273,15 +1273,15 @@ bool KviKvsTreeNodeOperationStringAppendWithSpace::execute(KviKvsRunTimeContext KviKvsRWEvaluationResult * target = m_pTargetData->evaluateReadWrite(c); if(!target)return false; - QString sz1; + TQString sz1; target->result()->asString(sz1); if(sz1.isEmpty()) { v.asString(sz1); } else { - QString sz2; + TQString sz2; v.asString(sz2); - sz1 += QChar(' '); + sz1 += TQChar(' '); sz1 += sz2; } target->result()->setString(sz1); @@ -1298,7 +1298,7 @@ bool KviKvsTreeNodeOperationStringAppendWithSpace::execute(KviKvsRunTimeContext -KviKvsTreeNodeOperationStringTransliteration::KviKvsTreeNodeOperationStringTransliteration(const QChar * pLocation,KviKvsTreeNodeData * pLeft,KviKvsTreeNodeData * pRight,KviKvsTreeNodeData * pFlags) +KviKvsTreeNodeOperationStringTransliteration::KviKvsTreeNodeOperationStringTransliteration(const TQChar * pLocation,KviKvsTreeNodeData * pLeft,KviKvsTreeNodeData * pRight,KviKvsTreeNodeData * pFlags) : KviKvsTreeNodeOperation(pLocation) { #ifdef COMPILE_NEW_KVS @@ -1321,7 +1321,7 @@ KviKvsTreeNodeOperationStringTransliteration::~KviKvsTreeNodeOperationStringTran } -void KviKvsTreeNodeOperationStringTransliteration::contextDescription(QString &szBuffer) +void KviKvsTreeNodeOperationStringTransliteration::contextDescription(TQString &szBuffer) { #ifdef COMPILE_NEW_KVS szBuffer = "Binding Operator tr///"; @@ -1333,7 +1333,7 @@ void KviKvsTreeNodeOperationStringTransliteration::dump(const char * prefix) { #ifdef COMPILE_NEW_KVS debug("%s OperationStringTransliteration",prefix); - QString tmp = prefix; + TQString tmp = prefix; tmp.append(" "); m_pLeft->dump(tmp.utf8().data()); m_pRight->dump(tmp.utf8().data()); @@ -1355,15 +1355,15 @@ bool KviKvsTreeNodeOperationStringTransliteration::execute(KviKvsRunTimeContext KviKvsRWEvaluationResult * target = m_pTargetData->evaluateReadWrite(c); if(!target)return false; - QString szL,szR,szF; + TQString szL,szR,szF; vl.asString(szL); vr.asString(szR); //vf.asString(szF); - QString sz1; + TQString sz1; target->result()->asString(sz1); - KviQString::transliterate(sz1,szL,szR); + KviTQString::transliterate(sz1,szL,szR); target->result()->setString(sz1); delete target; #endif @@ -1379,7 +1379,7 @@ bool KviKvsTreeNodeOperationStringTransliteration::execute(KviKvsRunTimeContext -KviKvsTreeNodeOperationStringSubstitution::KviKvsTreeNodeOperationStringSubstitution(const QChar * pLocation,KviKvsTreeNodeData * pLeft,KviKvsTreeNodeData * pRight,KviKvsTreeNodeData * pFlags) +KviKvsTreeNodeOperationStringSubstitution::KviKvsTreeNodeOperationStringSubstitution(const TQChar * pLocation,KviKvsTreeNodeData * pLeft,KviKvsTreeNodeData * pRight,KviKvsTreeNodeData * pFlags) : KviKvsTreeNodeOperation(pLocation) { #ifdef COMPILE_NEW_KVS @@ -1402,7 +1402,7 @@ KviKvsTreeNodeOperationStringSubstitution::~KviKvsTreeNodeOperationStringSubstit } -void KviKvsTreeNodeOperationStringSubstitution::contextDescription(QString &szBuffer) +void KviKvsTreeNodeOperationStringSubstitution::contextDescription(TQString &szBuffer) { #ifdef COMPILE_NEW_KVS szBuffer = "Binding Operator s///"; @@ -1414,7 +1414,7 @@ void KviKvsTreeNodeOperationStringSubstitution::dump(const char * prefix) { #ifdef COMPILE_NEW_KVS debug("%s OperationStringSubstitution",prefix); - QString tmp = prefix; + TQString tmp = prefix; tmp.append(" "); m_pLeft->dump(tmp.utf8().data()); m_pRight->dump(tmp.utf8().data()); @@ -1434,19 +1434,19 @@ bool KviKvsTreeNodeOperationStringSubstitution::execute(KviKvsRunTimeContext * c KviKvsRWEvaluationResult * target = m_pTargetData->evaluateReadWrite(c); if(!target)return false; - QString szL,szR,szF; + TQString szL,szR,szF; vl.asString(szL); vr.asString(szR); vf.asString(szF); - QString str; + TQString str; target->result()->asString(str); - bool bGlobal = szF.find('g',false) != -1; + bool bGlobal = szF.tqfind('g',false) != -1; - QRegExp re(szL,szF.find('i',false) == -1,szF.find('w',false) != -1); - re.setMinimal(szF.find('m',false) != -1); // greedy or minimal ? + TQRegExp re(szL,szF.tqfind('i',false) == -1,szF.tqfind('w',false) != -1); + re.setMinimal(szF.tqfind('m',false) != -1); // greedy or minimal ? int idx = 0; @@ -1464,24 +1464,24 @@ bool KviKvsTreeNodeOperationStringSubstitution::execute(KviKvsRunTimeContext * c } str.remove(idx,len); - QString szReplaced; - const QChar * p2 = KviQString::nullTerminatedArray(szR); - const QChar * begin = p2; - while(p2->unicode()) + TQString szReplaced; + const TQChar * p2 = KviTQString::nullTerminatedArray(szR); + const TQChar * begin = p2; + while(p2->tqunicode()) { - if(p2->unicode() == '\\') + if(p2->tqunicode() == '\\') { p2++; - if(p2->unicode() >= '0' && p2->unicode() <= '9') + if(p2->tqunicode() >= '0' && p2->tqunicode() <= '9') { - szReplaced.append(QString(begin,(p2 - begin) - 1)); - szReplaced.append(re.cap(p2->unicode() - '0')); + szReplaced.append(TQString(begin,(p2 - begin) - 1)); + szReplaced.append(re.cap(p2->tqunicode() - '0')); p2++; begin = p2; - } else if(p2->unicode())p2++; + } else if(p2->tqunicode())p2++; } else p2++; } - if(begin != p2)szReplaced.append(QString(begin,p2 - begin)); + if(begin != p2)szReplaced.append(TQString(begin,p2 - begin)); str.insert(idx,szReplaced); idx += szReplaced.length(); diff --git a/src/kvirc/kvs/kvi_kvs_treenode_operation.h b/src/kvirc/kvs/kvi_kvs_treenode_operation.h index e4a4463d..cc57df04 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_operation.h +++ b/src/kvirc/kvs/kvi_kvs_treenode_operation.h @@ -35,25 +35,25 @@ class KviKvsRunTimeContext; class KVIRC_API KviKvsTreeNodeOperation : public KviKvsTreeNodeInstruction { public: - KviKvsTreeNodeOperation(const QChar * pLocation); + KviKvsTreeNodeOperation(const TQChar * pLocation); ~KviKvsTreeNodeOperation(); protected: KviKvsTreeNodeData * m_pTargetData; // can't be null public: void setTargetVariableReference(KviKvsTreeNodeData * r); - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); }; class KviKvsTreeNodeOperationAssignment : public KviKvsTreeNodeOperation { public: - KviKvsTreeNodeOperationAssignment(const QChar * pLocation,KviKvsTreeNodeData * pRightSide); + KviKvsTreeNodeOperationAssignment(const TQChar * pLocation,KviKvsTreeNodeData * pRightSide); ~KviKvsTreeNodeOperationAssignment(); protected: KviKvsTreeNodeData * m_pRightSide; // can't be 0 public: - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); virtual bool execute(KviKvsRunTimeContext * c); }; @@ -61,10 +61,10 @@ public: class KviKvsTreeNodeOperationDecrement : public KviKvsTreeNodeOperation { public: - KviKvsTreeNodeOperationDecrement(const QChar * pLocation); + KviKvsTreeNodeOperationDecrement(const TQChar * pLocation); ~KviKvsTreeNodeOperationDecrement(); public: - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); virtual bool execute(KviKvsRunTimeContext * c); }; @@ -72,10 +72,10 @@ public: class KviKvsTreeNodeOperationIncrement : public KviKvsTreeNodeOperation { public: - KviKvsTreeNodeOperationIncrement(const QChar * pLocation); + KviKvsTreeNodeOperationIncrement(const TQChar * pLocation); ~KviKvsTreeNodeOperationIncrement(); public: - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); virtual bool execute(KviKvsRunTimeContext * c); }; @@ -83,12 +83,12 @@ public: class KviKvsTreeNodeOperationSelfAnd : public KviKvsTreeNodeOperation { public: - KviKvsTreeNodeOperationSelfAnd(const QChar * pLocation,KviKvsTreeNodeData * pRightSide); + KviKvsTreeNodeOperationSelfAnd(const TQChar * pLocation,KviKvsTreeNodeData * pRightSide); ~KviKvsTreeNodeOperationSelfAnd(); protected: KviKvsTreeNodeData * m_pRightSide; // can't be 0 public: - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); virtual bool execute(KviKvsRunTimeContext * c); }; @@ -96,12 +96,12 @@ public: class KviKvsTreeNodeOperationSelfDivision : public KviKvsTreeNodeOperation { public: - KviKvsTreeNodeOperationSelfDivision(const QChar * pLocation,KviKvsTreeNodeData * pRightSide); + KviKvsTreeNodeOperationSelfDivision(const TQChar * pLocation,KviKvsTreeNodeData * pRightSide); ~KviKvsTreeNodeOperationSelfDivision(); protected: KviKvsTreeNodeData * m_pRightSide; // can't be 0 public: - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); virtual bool execute(KviKvsRunTimeContext * c); }; @@ -109,12 +109,12 @@ public: class KviKvsTreeNodeOperationSelfModulus : public KviKvsTreeNodeOperation { public: - KviKvsTreeNodeOperationSelfModulus(const QChar * pLocation,KviKvsTreeNodeData * pRightSide); + KviKvsTreeNodeOperationSelfModulus(const TQChar * pLocation,KviKvsTreeNodeData * pRightSide); ~KviKvsTreeNodeOperationSelfModulus(); protected: KviKvsTreeNodeData * m_pRightSide; // can't be 0 public: - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); virtual bool execute(KviKvsRunTimeContext * c); }; @@ -122,12 +122,12 @@ public: class KviKvsTreeNodeOperationSelfMultiplication : public KviKvsTreeNodeOperation { public: - KviKvsTreeNodeOperationSelfMultiplication(const QChar * pLocation,KviKvsTreeNodeData * pRightSide); + KviKvsTreeNodeOperationSelfMultiplication(const TQChar * pLocation,KviKvsTreeNodeData * pRightSide); ~KviKvsTreeNodeOperationSelfMultiplication(); protected: KviKvsTreeNodeData * m_pRightSide; // can't be 0 public: - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); virtual bool execute(KviKvsRunTimeContext * c); }; @@ -135,12 +135,12 @@ public: class KviKvsTreeNodeOperationSelfOr : public KviKvsTreeNodeOperation { public: - KviKvsTreeNodeOperationSelfOr(const QChar * pLocation,KviKvsTreeNodeData * pRightSide); + KviKvsTreeNodeOperationSelfOr(const TQChar * pLocation,KviKvsTreeNodeData * pRightSide); ~KviKvsTreeNodeOperationSelfOr(); protected: KviKvsTreeNodeData * m_pRightSide; // can't be 0 public: - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); virtual bool execute(KviKvsRunTimeContext * c); }; @@ -148,12 +148,12 @@ public: class KviKvsTreeNodeOperationSelfShl : public KviKvsTreeNodeOperation { public: - KviKvsTreeNodeOperationSelfShl(const QChar * pLocation,KviKvsTreeNodeData * pRightSide); + KviKvsTreeNodeOperationSelfShl(const TQChar * pLocation,KviKvsTreeNodeData * pRightSide); ~KviKvsTreeNodeOperationSelfShl(); protected: KviKvsTreeNodeData * m_pRightSide; // can't be 0 public: - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); virtual bool execute(KviKvsRunTimeContext * c); }; @@ -161,12 +161,12 @@ public: class KviKvsTreeNodeOperationSelfShr : public KviKvsTreeNodeOperation { public: - KviKvsTreeNodeOperationSelfShr(const QChar * pLocation,KviKvsTreeNodeData * pRightSide); + KviKvsTreeNodeOperationSelfShr(const TQChar * pLocation,KviKvsTreeNodeData * pRightSide); ~KviKvsTreeNodeOperationSelfShr(); protected: KviKvsTreeNodeData * m_pRightSide; // can't be 0 public: - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); virtual bool execute(KviKvsRunTimeContext * c); }; @@ -174,12 +174,12 @@ public: class KviKvsTreeNodeOperationSelfSubtraction : public KviKvsTreeNodeOperation { public: - KviKvsTreeNodeOperationSelfSubtraction(const QChar * pLocation,KviKvsTreeNodeData * pRightSide); + KviKvsTreeNodeOperationSelfSubtraction(const TQChar * pLocation,KviKvsTreeNodeData * pRightSide); ~KviKvsTreeNodeOperationSelfSubtraction(); protected: KviKvsTreeNodeData * m_pRightSide; // can't be 0 public: - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); virtual bool execute(KviKvsRunTimeContext * c); }; @@ -187,12 +187,12 @@ public: class KviKvsTreeNodeOperationSelfSum : public KviKvsTreeNodeOperation { public: - KviKvsTreeNodeOperationSelfSum(const QChar * pLocation,KviKvsTreeNodeData * pRightSide); + KviKvsTreeNodeOperationSelfSum(const TQChar * pLocation,KviKvsTreeNodeData * pRightSide); ~KviKvsTreeNodeOperationSelfSum(); protected: KviKvsTreeNodeData * m_pRightSide; // can't be 0 public: - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); virtual bool execute(KviKvsRunTimeContext * c); }; @@ -200,12 +200,12 @@ public: class KviKvsTreeNodeOperationSelfXor : public KviKvsTreeNodeOperation { public: - KviKvsTreeNodeOperationSelfXor(const QChar * pLocation,KviKvsTreeNodeData * pRightSide); + KviKvsTreeNodeOperationSelfXor(const TQChar * pLocation,KviKvsTreeNodeData * pRightSide); ~KviKvsTreeNodeOperationSelfXor(); protected: KviKvsTreeNodeData * m_pRightSide; // can't be 0 public: - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); virtual bool execute(KviKvsRunTimeContext * c); }; @@ -213,12 +213,12 @@ public: class KviKvsTreeNodeOperationStringAppend : public KviKvsTreeNodeOperation { public: - KviKvsTreeNodeOperationStringAppend(const QChar * pLocation,KviKvsTreeNodeData * pRightSide); + KviKvsTreeNodeOperationStringAppend(const TQChar * pLocation,KviKvsTreeNodeData * pRightSide); ~KviKvsTreeNodeOperationStringAppend(); protected: KviKvsTreeNodeData * m_pRightSide; // can't be 0 public: - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); virtual bool execute(KviKvsRunTimeContext * c); }; @@ -226,12 +226,12 @@ public: class KviKvsTreeNodeOperationArrayAppend : public KviKvsTreeNodeOperation { public: - KviKvsTreeNodeOperationArrayAppend(const QChar * pLocation,KviKvsTreeNodeData * pRightSide); + KviKvsTreeNodeOperationArrayAppend(const TQChar * pLocation,KviKvsTreeNodeData * pRightSide); ~KviKvsTreeNodeOperationArrayAppend(); protected: KviKvsTreeNodeData * m_pRightSide; // can't be 0 public: - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); virtual bool execute(KviKvsRunTimeContext * c); }; @@ -239,12 +239,12 @@ public: class KviKvsTreeNodeOperationStringAppendWithComma : public KviKvsTreeNodeOperation { public: - KviKvsTreeNodeOperationStringAppendWithComma(const QChar * pLocation,KviKvsTreeNodeData * pRightSide); + KviKvsTreeNodeOperationStringAppendWithComma(const TQChar * pLocation,KviKvsTreeNodeData * pRightSide); ~KviKvsTreeNodeOperationStringAppendWithComma(); protected: KviKvsTreeNodeData * m_pRightSide; // can't be 0 public: - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); virtual bool execute(KviKvsRunTimeContext * c); }; @@ -252,12 +252,12 @@ public: class KviKvsTreeNodeOperationStringAppendWithSpace : public KviKvsTreeNodeOperation { public: - KviKvsTreeNodeOperationStringAppendWithSpace(const QChar * pLocation,KviKvsTreeNodeData * pRightSide); + KviKvsTreeNodeOperationStringAppendWithSpace(const TQChar * pLocation,KviKvsTreeNodeData * pRightSide); ~KviKvsTreeNodeOperationStringAppendWithSpace(); protected: KviKvsTreeNodeData * m_pRightSide; // can't be 0 public: - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); virtual bool execute(KviKvsRunTimeContext * c); }; @@ -265,14 +265,14 @@ public: class KviKvsTreeNodeOperationStringTransliteration : public KviKvsTreeNodeOperation { public: - KviKvsTreeNodeOperationStringTransliteration(const QChar * pLocation,KviKvsTreeNodeData * pLeft,KviKvsTreeNodeData * pRight,KviKvsTreeNodeData * pFlags); + KviKvsTreeNodeOperationStringTransliteration(const TQChar * pLocation,KviKvsTreeNodeData * pLeft,KviKvsTreeNodeData * pRight,KviKvsTreeNodeData * pFlags); ~KviKvsTreeNodeOperationStringTransliteration(); protected: KviKvsTreeNodeData * m_pLeft; // can't be 0 KviKvsTreeNodeData * m_pRight; // can't be 0 KviKvsTreeNodeData * m_pFlags; // can't be 0 public: - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); virtual bool execute(KviKvsRunTimeContext * c); }; @@ -280,14 +280,14 @@ public: class KviKvsTreeNodeOperationStringSubstitution : public KviKvsTreeNodeOperation { public: - KviKvsTreeNodeOperationStringSubstitution(const QChar * pLocation,KviKvsTreeNodeData * pLeft,KviKvsTreeNodeData * pRight,KviKvsTreeNodeData * pFlags); + KviKvsTreeNodeOperationStringSubstitution(const TQChar * pLocation,KviKvsTreeNodeData * pLeft,KviKvsTreeNodeData * pRight,KviKvsTreeNodeData * pFlags); ~KviKvsTreeNodeOperationStringSubstitution(); protected: KviKvsTreeNodeData * m_pLeft; // can't be 0 KviKvsTreeNodeData * m_pRight; // can't be 0 KviKvsTreeNodeData * m_pFlags; // can't be 0 public: - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); virtual bool execute(KviKvsRunTimeContext * c); }; diff --git a/src/kvirc/kvs/kvi_kvs_treenode_parameterreturn.cpp b/src/kvirc/kvs/kvi_kvs_treenode_parameterreturn.cpp index e4a1634c..694d7335 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_parameterreturn.cpp +++ b/src/kvirc/kvs/kvi_kvs_treenode_parameterreturn.cpp @@ -29,7 +29,7 @@ #include "kvi_kvs_variantlist.h" #include "kvi_locale.h" -KviKvsTreeNodeParameterReturn::KviKvsTreeNodeParameterReturn(const QChar * pLocation,KviKvsTreeNodeDataList * pDataList) +KviKvsTreeNodeParameterReturn::KviKvsTreeNodeParameterReturn(const TQChar * pLocation,KviKvsTreeNodeDataList * pDataList) : KviKvsTreeNodeInstruction(pLocation) { #ifdef COMPILE_NEW_KVS @@ -45,7 +45,7 @@ KviKvsTreeNodeParameterReturn::~KviKvsTreeNodeParameterReturn() #endif } -void KviKvsTreeNodeParameterReturn::contextDescription(QString &szBuffer) +void KviKvsTreeNodeParameterReturn::contextDescription(TQString &szBuffer) { #ifdef COMPILE_NEW_KVS szBuffer = "Parameter Return Evaluation"; @@ -57,7 +57,7 @@ void KviKvsTreeNodeParameterReturn::dump(const char * prefix) { #ifdef COMPILE_NEW_KVS debug("%s ParameterReturn",prefix); - QString tmp = prefix; + TQString tmp = prefix; tmp += " "; m_pDataList->dump(tmp.utf8().data()); #endif @@ -79,7 +79,7 @@ bool KviKvsTreeNodeParameterReturn::execute(KviKvsRunTimeContext * c) return true; } - QString all; + TQString all; lBuffer.allAsString(all); c->returnValue()->setString(all); #endif diff --git a/src/kvirc/kvs/kvi_kvs_treenode_parameterreturn.h b/src/kvirc/kvs/kvi_kvs_treenode_parameterreturn.h index 4bd31275..da65b6da 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_parameterreturn.h +++ b/src/kvirc/kvs/kvi_kvs_treenode_parameterreturn.h @@ -32,12 +32,12 @@ class KviKvsTreeNodeDataList; class KVIRC_API KviKvsTreeNodeParameterReturn : public KviKvsTreeNodeInstruction { public: - KviKvsTreeNodeParameterReturn(const QChar * pLocation,KviKvsTreeNodeDataList * pDataList); + KviKvsTreeNodeParameterReturn(const TQChar * pLocation,KviKvsTreeNodeDataList * pDataList); ~KviKvsTreeNodeParameterReturn(); protected: KviKvsTreeNodeDataList * m_pDataList; public: - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); virtual bool execute(KviKvsRunTimeContext * c); }; diff --git a/src/kvirc/kvs/kvi_kvs_treenode_rebindingswitch.cpp b/src/kvirc/kvs/kvi_kvs_treenode_rebindingswitch.cpp index 64e77690..0ca02a98 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_rebindingswitch.cpp +++ b/src/kvirc/kvs/kvi_kvs_treenode_rebindingswitch.cpp @@ -31,7 +31,7 @@ #include "kvi_locale.h" #include "kvi_kvs_runtimecontext.h" -KviKvsTreeNodeRebindingSwitch::KviKvsTreeNodeRebindingSwitch(const QChar * pLocation,KviKvsTreeNodeData * pTargetWindow,KviKvsTreeNodeCommand * pChildCommand) +KviKvsTreeNodeRebindingSwitch::KviKvsTreeNodeRebindingSwitch(const TQChar * pLocation,KviKvsTreeNodeData * pTargetWindow,KviKvsTreeNodeCommand * pChildCommand) : KviKvsTreeNodeCommand(pLocation,pChildCommand->commandName()) { m_pTargetWindow = pTargetWindow; @@ -47,7 +47,7 @@ KviKvsTreeNodeRebindingSwitch::~KviKvsTreeNodeRebindingSwitch() } -void KviKvsTreeNodeRebindingSwitch::contextDescription(QString &szBuffer) +void KviKvsTreeNodeRebindingSwitch::contextDescription(TQString &szBuffer) { szBuffer = "Window Rebinding Switch"; } @@ -55,13 +55,13 @@ void KviKvsTreeNodeRebindingSwitch::contextDescription(QString &szBuffer) void KviKvsTreeNodeRebindingSwitch::dump(const char * prefix) { debug("%sRebindingSwitch",prefix); - QString tmp = prefix; + TQString tmp = prefix; tmp += " "; m_pTargetWindow->dump(tmp.utf8().data()); m_pChildCommand->dump(tmp.utf8().data()); } -const QString & KviKvsTreeNodeRebindingSwitch::commandName() +const TQString & KviKvsTreeNodeRebindingSwitch::commandName() { return m_pChildCommand->commandName(); } @@ -73,7 +73,7 @@ bool KviKvsTreeNodeRebindingSwitch::execute(KviKvsRunTimeContext * c) KviWindow * pNewWindow; - QString szWinId; + TQString szWinId; vWindow.asString(szWinId); if(szWinId.isEmpty()) { diff --git a/src/kvirc/kvs/kvi_kvs_treenode_rebindingswitch.h b/src/kvirc/kvs/kvi_kvs_treenode_rebindingswitch.h index c81dcd93..b71945e9 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_rebindingswitch.h +++ b/src/kvirc/kvs/kvi_kvs_treenode_rebindingswitch.h @@ -34,15 +34,15 @@ class KviKvsRunTimeContext; class KVIRC_API KviKvsTreeNodeRebindingSwitch : public KviKvsTreeNodeCommand { public: - KviKvsTreeNodeRebindingSwitch(const QChar * pLocation,KviKvsTreeNodeData * pTargetWindow,KviKvsTreeNodeCommand * pChildCommand); + KviKvsTreeNodeRebindingSwitch(const TQChar * pLocation,KviKvsTreeNodeData * pTargetWindow,KviKvsTreeNodeCommand * pChildCommand); ~KviKvsTreeNodeRebindingSwitch(); protected: KviKvsTreeNodeData * m_pTargetWindow; KviKvsTreeNodeCommand * m_pChildCommand; public: - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); - const QString & commandName(); + const TQString & commandName(); virtual bool execute(KviKvsRunTimeContext * c); }; diff --git a/src/kvirc/kvs/kvi_kvs_treenode_scopeoperator.cpp b/src/kvirc/kvs/kvi_kvs_treenode_scopeoperator.cpp index 0d127611..85b2f29e 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_scopeoperator.cpp +++ b/src/kvirc/kvs/kvi_kvs_treenode_scopeoperator.cpp @@ -36,7 +36,7 @@ #include "kvi_locale.h" -KviKvsTreeNodeScopeOperator::KviKvsTreeNodeScopeOperator(const QChar * pLocation,KviKvsTreeNodeData * pObject,KviKvsTreeNodeData * pData) +KviKvsTreeNodeScopeOperator::KviKvsTreeNodeScopeOperator(const TQChar * pLocation,KviKvsTreeNodeData * pObject,KviKvsTreeNodeData * pData) : KviKvsTreeNodeData(pLocation) { m_pObjectReference = pObject; @@ -51,7 +51,7 @@ KviKvsTreeNodeScopeOperator::~KviKvsTreeNodeScopeOperator() delete m_pRightSide; } -void KviKvsTreeNodeScopeOperator::contextDescription(QString &szBuffer) +void KviKvsTreeNodeScopeOperator::contextDescription(TQString &szBuffer) { szBuffer = "Scope Operator"; } @@ -60,7 +60,7 @@ void KviKvsTreeNodeScopeOperator::contextDescription(QString &szBuffer) void KviKvsTreeNodeScopeOperator::dump(const char * prefix) { debug("%s ScopeOperator",prefix); - QString tmp = prefix; + TQString tmp = prefix; tmp.append(" "); m_pObjectReference->dump(tmp.utf8().data()); m_pRightSide->dump(tmp.utf8().data()); diff --git a/src/kvirc/kvs/kvi_kvs_treenode_scopeoperator.h b/src/kvirc/kvs/kvi_kvs_treenode_scopeoperator.h index 30427266..c132a43d 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_scopeoperator.h +++ b/src/kvirc/kvs/kvi_kvs_treenode_scopeoperator.h @@ -32,13 +32,13 @@ class KviKvsObject; class KVIRC_API KviKvsTreeNodeScopeOperator : public KviKvsTreeNodeData { public: - KviKvsTreeNodeScopeOperator(const QChar * pLocation,KviKvsTreeNodeData * pObject,KviKvsTreeNodeData * pData); + KviKvsTreeNodeScopeOperator(const TQChar * pLocation,KviKvsTreeNodeData * pObject,KviKvsTreeNodeData * pData); ~KviKvsTreeNodeScopeOperator(); public: KviKvsTreeNodeData * m_pObjectReference; // can't be null KviKvsTreeNodeData * m_pRightSide; // can't be null public: - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); virtual bool isReadOnly(); // gets the m_pRightSide read only state virtual bool canEvaluateToObjectReference(); // gets the m_pRightSide result diff --git a/src/kvirc/kvs/kvi_kvs_treenode_simplecommand.cpp b/src/kvirc/kvs/kvi_kvs_treenode_simplecommand.cpp index dd055b9e..e30a0056 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_simplecommand.cpp +++ b/src/kvirc/kvs/kvi_kvs_treenode_simplecommand.cpp @@ -27,7 +27,7 @@ #include "kvi_kvs_treenode_simplecommand.h" #include "kvi_kvs_treenode_datalist.h" -KviKvsTreeNodeSimpleCommand::KviKvsTreeNodeSimpleCommand(const QChar * pLocation,const QString &szCmdName,KviKvsTreeNodeDataList * params) +KviKvsTreeNodeSimpleCommand::KviKvsTreeNodeSimpleCommand(const TQChar * pLocation,const TQString &szCmdName,KviKvsTreeNodeDataList * params) : KviKvsTreeNodeCommandWithParameters(pLocation,szCmdName,params) { } @@ -36,7 +36,7 @@ KviKvsTreeNodeSimpleCommand::~KviKvsTreeNodeSimpleCommand() { } -void KviKvsTreeNodeSimpleCommand::contextDescription(QString &szBuffer) +void KviKvsTreeNodeSimpleCommand::contextDescription(TQString &szBuffer) { #ifdef COMPILE_NEW_KVS szBuffer = "Simple Command \""; diff --git a/src/kvirc/kvs/kvi_kvs_treenode_simplecommand.h b/src/kvirc/kvs/kvi_kvs_treenode_simplecommand.h index d9aec78c..3636c5e7 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_simplecommand.h +++ b/src/kvirc/kvs/kvi_kvs_treenode_simplecommand.h @@ -32,10 +32,10 @@ class KviKvsTreeNodeDataList; class KVIRC_API KviKvsTreeNodeSimpleCommand : public KviKvsTreeNodeCommandWithParameters { public: - KviKvsTreeNodeSimpleCommand(const QChar * pLocation,const QString &szCmdName,KviKvsTreeNodeDataList * params); + KviKvsTreeNodeSimpleCommand(const TQChar * pLocation,const TQString &szCmdName,KviKvsTreeNodeDataList * params); ~KviKvsTreeNodeSimpleCommand(); public: - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); }; diff --git a/src/kvirc/kvs/kvi_kvs_treenode_singleparameteridentifier.cpp b/src/kvirc/kvs/kvi_kvs_treenode_singleparameteridentifier.cpp index d67c82bd..984ad7ac 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_singleparameteridentifier.cpp +++ b/src/kvirc/kvs/kvi_kvs_treenode_singleparameteridentifier.cpp @@ -28,7 +28,7 @@ #include "kvi_kvs_runtimecontext.h" #include "kvi_kvs_variant.h" -KviKvsTreeNodeSingleParameterIdentifier::KviKvsTreeNodeSingleParameterIdentifier(const QChar * pLocation,int iStart) +KviKvsTreeNodeSingleParameterIdentifier::KviKvsTreeNodeSingleParameterIdentifier(const TQChar * pLocation,int iStart) : KviKvsTreeNodeData(pLocation) { #ifdef COMPILE_NEW_KVS @@ -40,11 +40,11 @@ KviKvsTreeNodeSingleParameterIdentifier::~KviKvsTreeNodeSingleParameterIdentifie { } -void KviKvsTreeNodeSingleParameterIdentifier::contextDescription(QString &szBuffer) +void KviKvsTreeNodeSingleParameterIdentifier::contextDescription(TQString &szBuffer) { #ifdef COMPILE_NEW_KVS szBuffer = "Single Parameter Identifier \"$"; - KviQString::appendFormatted(szBuffer,"%d",m_iStart); + KviTQString::appendFormatted(szBuffer,"%d",m_iStart); szBuffer += "\""; #endif } diff --git a/src/kvirc/kvs/kvi_kvs_treenode_singleparameteridentifier.h b/src/kvirc/kvs/kvi_kvs_treenode_singleparameteridentifier.h index fb7590c1..0a9f802c 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_singleparameteridentifier.h +++ b/src/kvirc/kvs/kvi_kvs_treenode_singleparameteridentifier.h @@ -34,12 +34,12 @@ class KviKvsVariant; class KVIRC_API KviKvsTreeNodeSingleParameterIdentifier : public KviKvsTreeNodeData { public: - KviKvsTreeNodeSingleParameterIdentifier(const QChar * pLocation,int iStart); + KviKvsTreeNodeSingleParameterIdentifier(const TQChar * pLocation,int iStart); ~KviKvsTreeNodeSingleParameterIdentifier(); protected: int m_iStart; // the index of the parameter wanted (always >= 0) public: - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); virtual bool canEvaluateToObjectReference(); diff --git a/src/kvirc/kvs/kvi_kvs_treenode_specialcommand.cpp b/src/kvirc/kvs/kvi_kvs_treenode_specialcommand.cpp index bfca30ac..6573b986 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_specialcommand.cpp +++ b/src/kvirc/kvs/kvi_kvs_treenode_specialcommand.cpp @@ -26,7 +26,7 @@ #include "kvi_kvs_treenode_specialcommand.h" -KviKvsTreeNodeSpecialCommand::KviKvsTreeNodeSpecialCommand(const QChar * pLocation,const QString &szCmdName) +KviKvsTreeNodeSpecialCommand::KviKvsTreeNodeSpecialCommand(const TQChar * pLocation,const TQString &szCmdName) : KviKvsTreeNodeCommand(pLocation,szCmdName) { } @@ -35,7 +35,7 @@ KviKvsTreeNodeSpecialCommand::~KviKvsTreeNodeSpecialCommand() { } -void KviKvsTreeNodeSpecialCommand::contextDescription(QString &szBuffer) +void KviKvsTreeNodeSpecialCommand::contextDescription(TQString &szBuffer) { #ifdef COMPILE_NEW_KVS szBuffer = "Special Command \""; diff --git a/src/kvirc/kvs/kvi_kvs_treenode_specialcommand.h b/src/kvirc/kvs/kvi_kvs_treenode_specialcommand.h index 9ac8867b..c7d1153b 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_specialcommand.h +++ b/src/kvirc/kvs/kvi_kvs_treenode_specialcommand.h @@ -31,10 +31,10 @@ class KVIRC_API KviKvsTreeNodeSpecialCommand : public KviKvsTreeNodeCommand { public: - KviKvsTreeNodeSpecialCommand(const QChar * pLocation,const QString &szCmdName); + KviKvsTreeNodeSpecialCommand(const TQChar * pLocation,const TQString &szCmdName); ~KviKvsTreeNodeSpecialCommand(); public: - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); }; diff --git a/src/kvirc/kvs/kvi_kvs_treenode_specialcommandbreak.cpp b/src/kvirc/kvs/kvi_kvs_treenode_specialcommandbreak.cpp index ad750404..851c1112 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_specialcommandbreak.cpp +++ b/src/kvirc/kvs/kvi_kvs_treenode_specialcommandbreak.cpp @@ -28,7 +28,7 @@ #include "kvi_kvs_runtimecontext.h" #include "kvi_locale.h" -KviKvsTreeNodeSpecialCommandBreak::KviKvsTreeNodeSpecialCommandBreak(const QChar * pLocation) +KviKvsTreeNodeSpecialCommandBreak::KviKvsTreeNodeSpecialCommandBreak(const TQChar * pLocation) : KviKvsTreeNodeSpecialCommand(pLocation,"break") { } @@ -37,7 +37,7 @@ KviKvsTreeNodeSpecialCommandBreak::~KviKvsTreeNodeSpecialCommandBreak() { } -void KviKvsTreeNodeSpecialCommandBreak::contextDescription(QString &szBuffer) +void KviKvsTreeNodeSpecialCommandBreak::contextDescription(TQString &szBuffer) { szBuffer = "Special Command \"break\""; } diff --git a/src/kvirc/kvs/kvi_kvs_treenode_specialcommandbreak.h b/src/kvirc/kvs/kvi_kvs_treenode_specialcommandbreak.h index a4b061e1..44cdac66 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_specialcommandbreak.h +++ b/src/kvirc/kvs/kvi_kvs_treenode_specialcommandbreak.h @@ -34,10 +34,10 @@ class KviKvsRunTimeContext; class KVIRC_API KviKvsTreeNodeSpecialCommandBreak : public KviKvsTreeNodeSpecialCommand { public: - KviKvsTreeNodeSpecialCommandBreak(const QChar * pLocation); + KviKvsTreeNodeSpecialCommandBreak(const TQChar * pLocation); ~KviKvsTreeNodeSpecialCommandBreak(); public: - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); virtual bool execute(KviKvsRunTimeContext * c); }; diff --git a/src/kvirc/kvs/kvi_kvs_treenode_specialcommandclass.cpp b/src/kvirc/kvs/kvi_kvs_treenode_specialcommandclass.cpp index 05d35edd..0ec0f275 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_specialcommandclass.cpp +++ b/src/kvirc/kvs/kvi_kvs_treenode_specialcommandclass.cpp @@ -31,7 +31,7 @@ #include "kvi_kvs_object_controller.h" #include "kvi_kvs_object_class.h" -KviKvsTreeNodeSpecialCommandClassFunctionDefinition::KviKvsTreeNodeSpecialCommandClassFunctionDefinition(const QChar * pLocation,const QString &szName,const QString &szBuffer,unsigned int uHandlerFlags) +KviKvsTreeNodeSpecialCommandClassFunctionDefinition::KviKvsTreeNodeSpecialCommandClassFunctionDefinition(const TQChar * pLocation,const TQString &szName,const TQString &szBuffer,unsigned int uHandlerFlags) : KviKvsTreeNode(pLocation) { m_uHandlerFlags = uHandlerFlags; @@ -45,12 +45,12 @@ void KviKvsTreeNodeSpecialCommandClassFunctionDefinition::dump(const char * pref debug("%s (command buffer with %d characters)",prefix,m_szBuffer.length()); } -void KviKvsTreeNodeSpecialCommandClassFunctionDefinition::contextDescription(QString &szBuffer) +void KviKvsTreeNodeSpecialCommandClassFunctionDefinition::contextDescription(TQString &szBuffer) { - KviQString::sprintf(szBuffer,"Object Member Function Definition \"%Q\"",&m_szName); + KviTQString::sprintf(szBuffer,"Object Member Function Definition \"%Q\"",&m_szName); } -KviKvsTreeNodeSpecialCommandClass::KviKvsTreeNodeSpecialCommandClass(const QChar * pLocation,KviKvsTreeNodeDataList * pParams) +KviKvsTreeNodeSpecialCommandClass::KviKvsTreeNodeSpecialCommandClass(const TQChar * pLocation,KviKvsTreeNodeDataList * pParams) : KviKvsTreeNodeSpecialCommand(pLocation,"class") { m_pParams = pParams; @@ -72,7 +72,7 @@ void KviKvsTreeNodeSpecialCommandClass::addFunctionDefinition(KviKvsTreeNodeSpec } -void KviKvsTreeNodeSpecialCommandClass::contextDescription(QString &szBuffer) +void KviKvsTreeNodeSpecialCommandClass::contextDescription(TQString &szBuffer) { szBuffer = "Special Command \"class\""; } @@ -80,7 +80,7 @@ void KviKvsTreeNodeSpecialCommandClass::contextDescription(QString &szBuffer) void KviKvsTreeNodeSpecialCommandClass::dump(const char * prefix) { debug("%s SpecialCommandClass",prefix); - QString tmp = prefix; + TQString tmp = prefix; tmp.append(" "); m_pParams->dump(tmp.utf8().data()); for(KviKvsTreeNodeSpecialCommandClassFunctionDefinition * d = m_pFunctions->first();d;d = m_pFunctions->next()) @@ -100,8 +100,8 @@ bool KviKvsTreeNodeSpecialCommandClass::execute(KviKvsRunTimeContext * c) } KviKvsVariant * pBaseClassName = l.next(); - QString szClassName; - QString szBaseClassName; + TQString szClassName; + TQString szBaseClassName; pClassName->asString(szClassName); if(pBaseClassName) pBaseClassName->asString(szBaseClassName); @@ -115,7 +115,7 @@ bool KviKvsTreeNodeSpecialCommandClass::execute(KviKvsRunTimeContext * c) if(szBaseClassName.isEmpty())szBaseClassName = "object"; // avoid infinite recursion in loading the base class - if(KviQString::equalCI(szBaseClassName,szClassName)) + if(KviTQString::equalCI(szBaseClassName,szClassName)) { c->error(__tr2qs("A class can't be a subclass of itself")); return false; @@ -132,12 +132,12 @@ bool KviKvsTreeNodeSpecialCommandClass::execute(KviKvsRunTimeContext * c) KviKvsObjectClass * pClass = pBaseClass; while(pClass) { - if(KviQString::equalCI(pClass->name(),szClassName)) + if(KviTQString::equalCI(pClass->name(),szClassName)) { c->error(this,__tr2qs("Detected a loop in the inheritance tree of the base class \"%Q\": redefine that class first"),&szBaseClassName); return false; } - pClass = pClass->parentClass(); + pClass = pClass->tqparentClass(); } KviKvsObjectClass * pActualClass = KviKvsKernel::instance()->objectController()->lookupClass(szClassName,true); diff --git a/src/kvirc/kvs/kvi_kvs_treenode_specialcommandclass.h b/src/kvirc/kvs/kvi_kvs_treenode_specialcommandclass.h index 0a8a69b5..592c4544 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_specialcommandclass.h +++ b/src/kvirc/kvs/kvi_kvs_treenode_specialcommandclass.h @@ -35,17 +35,17 @@ class KviKvsRunTimeContext; class KVIRC_API KviKvsTreeNodeSpecialCommandClassFunctionDefinition : public KviKvsTreeNode { public: - KviKvsTreeNodeSpecialCommandClassFunctionDefinition(const QChar * pLocation,const QString &szName,const QString &szBuffer,unsigned int uHandlerFlags); + KviKvsTreeNodeSpecialCommandClassFunctionDefinition(const TQChar * pLocation,const TQString &szName,const TQString &szBuffer,unsigned int uHandlerFlags); virtual ~KviKvsTreeNodeSpecialCommandClassFunctionDefinition(){}; protected: - QString m_szName; - QString m_szBuffer; + TQString m_szName; + TQString m_szBuffer; unsigned int m_uHandlerFlags; public: unsigned int handlerFlags(){ return m_uHandlerFlags; }; - const QString & name(){ return m_szName; }; - const QString & buffer(){ return m_szBuffer; }; - virtual void contextDescription(QString &szBuffer); + const TQString & name(){ return m_szName; }; + const TQString & buffer(){ return m_szBuffer; }; + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); }; @@ -54,14 +54,14 @@ public: class KVIRC_API KviKvsTreeNodeSpecialCommandClass : public KviKvsTreeNodeSpecialCommand { public: - KviKvsTreeNodeSpecialCommandClass(const QChar * pLocation,KviKvsTreeNodeDataList * pParams); + KviKvsTreeNodeSpecialCommandClass(const TQChar * pLocation,KviKvsTreeNodeDataList * pParams); virtual ~KviKvsTreeNodeSpecialCommandClass(); protected: KviKvsTreeNodeDataList * m_pParams; KviPointerList * m_pFunctions; public: void addFunctionDefinition(KviKvsTreeNodeSpecialCommandClassFunctionDefinition * pDef); - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); virtual bool execute(KviKvsRunTimeContext * c); }; diff --git a/src/kvirc/kvs/kvi_kvs_treenode_specialcommanddefpopup.cpp b/src/kvirc/kvs/kvi_kvs_treenode_specialcommanddefpopup.cpp index eea02bda..7462130f 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_specialcommanddefpopup.cpp +++ b/src/kvirc/kvs/kvi_kvs_treenode_specialcommanddefpopup.cpp @@ -33,7 +33,7 @@ #include "kvi_kvs_popupmenu.h" #include "kvi_kvs_script.h" -void KviKvsTreeNodeSpecialCommandDefpopupLabelExtpopup::contextDescription(QString &szBuffer) +void KviKvsTreeNodeSpecialCommandDefpopupLabelExtpopup::contextDescription(TQString &szBuffer) { #ifdef COMPILE_NEW_KVS szBuffer = "Label \"extpopup\" For Special Command \"defpopup\""; @@ -44,9 +44,9 @@ void KviKvsTreeNodeSpecialCommandDefpopupLabelExtpopup::dump(const char * prefix { #ifdef COMPILE_NEW_KVS debug("%s SpecialCommandDefpopupLabelExtpopup",prefix); - QString tmp = prefix; + TQString tmp = prefix; tmp.append(" "); - QString x = tmp; + TQString x = tmp; x += "CONDITION: "; x += m_szCondition; debug("%s",x.utf8().data()); @@ -74,7 +74,7 @@ bool KviKvsTreeNodeSpecialCommandDefpopupLabelExtpopup::execute(KviKvsRunTimeCon } -void KviKvsTreeNodeSpecialCommandDefpopupLabelItem::contextDescription(QString &szBuffer) +void KviKvsTreeNodeSpecialCommandDefpopupLabelItem::contextDescription(TQString &szBuffer) { #ifdef COMPILE_NEW_KVS szBuffer = "Label \"item\" For Special Command \"defpopup\""; @@ -86,9 +86,9 @@ void KviKvsTreeNodeSpecialCommandDefpopupLabelItem::dump(const char * prefix) { #ifdef COMPILE_NEW_KVS debug("%s SpecialCommandDefpopupLabelItem",prefix); - QString tmp = prefix; + TQString tmp = prefix; tmp.append(" "); - QString x = tmp; + TQString x = tmp; x += "CONDITION: "; x += m_szCondition; debug("%s",x.utf8().data()); @@ -115,7 +115,7 @@ bool KviKvsTreeNodeSpecialCommandDefpopupLabelItem::execute(KviKvsRunTimeContext return true; } -void KviKvsTreeNodeSpecialCommandDefpopupLabelLabel::contextDescription(QString &szBuffer) +void KviKvsTreeNodeSpecialCommandDefpopupLabelLabel::contextDescription(TQString &szBuffer) { #ifdef COMPILE_NEW_KVS szBuffer = "Label \"label\" For Special Command \"defpopup\""; @@ -127,9 +127,9 @@ void KviKvsTreeNodeSpecialCommandDefpopupLabelLabel::dump(const char * prefix) { #ifdef COMPILE_NEW_KVS debug("%s SpecialCommandDefpopupLabelLabel",prefix); - QString tmp = prefix; + TQString tmp = prefix; tmp.append(" "); - QString x = tmp; + TQString x = tmp; x += "CONDITION: "; x += m_szCondition; debug("%s",x.utf8().data()); @@ -155,7 +155,7 @@ bool KviKvsTreeNodeSpecialCommandDefpopupLabelLabel::execute(KviKvsRunTimeContex -void KviKvsTreeNodeSpecialCommandDefpopupLabelSeparator::contextDescription(QString &szBuffer) +void KviKvsTreeNodeSpecialCommandDefpopupLabelSeparator::contextDescription(TQString &szBuffer) { #ifdef COMPILE_NEW_KVS szBuffer = "Label \"separator\" For Special Command \"defpopup\""; @@ -167,7 +167,7 @@ void KviKvsTreeNodeSpecialCommandDefpopupLabelSeparator::dump(const char * prefi { #ifdef COMPILE_NEW_KVS debug("%s SpecialCommandDefpopupLabelSeparator",prefix); - QString tmp = prefix; + TQString tmp = prefix; tmp.append(" CONDITION:"); tmp.append(m_szCondition); debug("%s",tmp.utf8().data()); @@ -184,7 +184,7 @@ bool KviKvsTreeNodeSpecialCommandDefpopupLabelSeparator::execute(KviKvsRunTimeCo -void KviKvsTreeNodeSpecialCommandDefpopupLabelEpilogue::contextDescription(QString &szBuffer) +void KviKvsTreeNodeSpecialCommandDefpopupLabelEpilogue::contextDescription(TQString &szBuffer) { #ifdef COMPILE_NEW_KVS szBuffer = "Label \"epilogue\" For Special Command \"defpopup\""; @@ -196,7 +196,7 @@ void KviKvsTreeNodeSpecialCommandDefpopupLabelEpilogue::dump(const char * prefix { #ifdef COMPILE_NEW_KVS debug("%s SpecialCommandDefpopupLabelEpilogue",prefix); - QString tmp = prefix; + TQString tmp = prefix; tmp.append(" INSTRUCTION: "); tmp += m_szInstruction; debug("%s",tmp.utf8().data()); @@ -212,7 +212,7 @@ bool KviKvsTreeNodeSpecialCommandDefpopupLabelEpilogue::execute(KviKvsRunTimeCon } -void KviKvsTreeNodeSpecialCommandDefpopupLabelPrologue::contextDescription(QString &szBuffer) +void KviKvsTreeNodeSpecialCommandDefpopupLabelPrologue::contextDescription(TQString &szBuffer) { #ifdef COMPILE_NEW_KVS szBuffer = "Label \"prologue\" For Special Command \"defpopup\""; @@ -225,7 +225,7 @@ void KviKvsTreeNodeSpecialCommandDefpopupLabelPrologue::dump(const char * prefix { #ifdef COMPILE_NEW_KVS debug("%s SpecialCommandDefpopupLabelPrologue",prefix); - QString tmp = prefix; + TQString tmp = prefix; tmp.append(" INSTRUCTION: "); tmp += m_szInstruction; debug("%s",tmp.utf8().data()); @@ -248,8 +248,8 @@ bool KviKvsTreeNodeSpecialCommandDefpopupLabelPrologue::execute(KviKvsRunTimeCon -KviKvsTreeNodeSpecialCommandDefpopupLabelPopup::KviKvsTreeNodeSpecialCommandDefpopupLabelPopup(const QChar * pLocation) -: KviKvsTreeNodeSpecialCommandDefpopupConditionalLabelWithTextAndIcon(pLocation,QString::null,QString::null,QString::null,QString::null) +KviKvsTreeNodeSpecialCommandDefpopupLabelPopup::KviKvsTreeNodeSpecialCommandDefpopupLabelPopup(const TQChar * pLocation) +: KviKvsTreeNodeSpecialCommandDefpopupConditionalLabelWithTextAndIcon(pLocation,TQString(),TQString(),TQString(),TQString()) { #ifdef COMPILE_NEW_KVS m_pLabels = new KviPointerList; @@ -264,7 +264,7 @@ KviKvsTreeNodeSpecialCommandDefpopupLabelPopup::~KviKvsTreeNodeSpecialCommandDef #endif } -void KviKvsTreeNodeSpecialCommandDefpopupLabelPopup::contextDescription(QString &szBuffer) +void KviKvsTreeNodeSpecialCommandDefpopupLabelPopup::contextDescription(TQString &szBuffer) { #ifdef COMPILE_NEW_KVS szBuffer = "Label \"popup\" For Special Command \"defpopup\""; @@ -276,9 +276,9 @@ void KviKvsTreeNodeSpecialCommandDefpopupLabelPopup::dump(const char * prefix) { #ifdef COMPILE_NEW_KVS debug("%s SpecialCommandDefpopupLabelPopup",prefix); - QString tmp = prefix; + TQString tmp = prefix; tmp.append(" "); - QString x = tmp; + TQString x = tmp; x += "CONDITION: "; x += m_szCondition; debug(x.utf8().data()); @@ -332,7 +332,7 @@ bool KviKvsTreeNodeSpecialCommandDefpopupLabelPopup::fill(KviKvsRunTimeContext* -KviKvsTreeNodeSpecialCommandDefpopup::KviKvsTreeNodeSpecialCommandDefpopup(const QChar * pLocation,KviKvsTreeNodeData * pPopupName,KviKvsTreeNodeSpecialCommandDefpopupLabelPopup * pMainPopup) +KviKvsTreeNodeSpecialCommandDefpopup::KviKvsTreeNodeSpecialCommandDefpopup(const TQChar * pLocation,KviKvsTreeNodeData * pPopupName,KviKvsTreeNodeSpecialCommandDefpopupLabelPopup * pMainPopup) : KviKvsTreeNodeSpecialCommand(pLocation,"defpopup") { #ifdef COMPILE_NEW_KVS @@ -351,7 +351,7 @@ KviKvsTreeNodeSpecialCommandDefpopup::~KviKvsTreeNodeSpecialCommandDefpopup() #endif } -void KviKvsTreeNodeSpecialCommandDefpopup::contextDescription(QString &szBuffer) +void KviKvsTreeNodeSpecialCommandDefpopup::contextDescription(TQString &szBuffer) { #ifdef COMPILE_NEW_KVS szBuffer = "Special Command \"defpopup\""; @@ -363,7 +363,7 @@ void KviKvsTreeNodeSpecialCommandDefpopup::dump(const char * prefix) { #ifdef COMPILE_NEW_KVS debug("%s SpecialCommandDefpopup",prefix); - QString tmp = prefix; + TQString tmp = prefix; tmp.append(" "); m_pPopupName->dump(tmp.utf8().data()); m_pMainPopup->dump(tmp.utf8().data()); @@ -375,7 +375,7 @@ bool KviKvsTreeNodeSpecialCommandDefpopup::execute(KviKvsRunTimeContext * c) #ifdef COMPILE_NEW_KVS KviKvsVariant v; if(!m_pPopupName->evaluateReadOnly(c,&v))return false; - QString szName; + TQString szName; v.asString(szName); KviKvsSwitchList swl; @@ -410,7 +410,7 @@ bool KviKvsTreeNodeSpecialCommandDefpopup::execute(KviKvsRunTimeContext * c) } // we want to (re)create it - if(!swl.find('m',"--merge"))pPopup->doClear(); + if(!swl.tqfind('m',"--merge"))pPopup->doClear(); } diff --git a/src/kvirc/kvs/kvi_kvs_treenode_specialcommanddefpopup.h b/src/kvirc/kvs/kvi_kvs_treenode_specialcommanddefpopup.h index 53a02fbc..b55b1fb1 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_specialcommanddefpopup.h +++ b/src/kvirc/kvs/kvi_kvs_treenode_specialcommanddefpopup.h @@ -39,36 +39,36 @@ class KviKvsPopupMenu; class KVIRC_API KviKvsTreeNodeSpecialCommandDefpopupLabel : public KviKvsTreeNode { public: - QString m_szItemName; + TQString m_szItemName; public: - KviKvsTreeNodeSpecialCommandDefpopupLabel(const QChar * pLocation,const QString &szItemName) + KviKvsTreeNodeSpecialCommandDefpopupLabel(const TQChar * pLocation,const TQString &szItemName) : KviKvsTreeNode(pLocation), m_szItemName(szItemName) {}; ~KviKvsTreeNodeSpecialCommandDefpopupLabel(){}; public: - void setItemName(const QString &szItemName){ m_szItemName = szItemName; }; + void setItemName(const TQString &szItemName){ m_szItemName = szItemName; }; virtual bool execute(KviKvsRunTimeContext * c,KviKvsPopupMenu * p) = 0; }; class KVIRC_API KviKvsTreeNodeSpecialCommandDefpopupConditionalLabel : public KviKvsTreeNodeSpecialCommandDefpopupLabel { protected: - QString m_szCondition; // may be null! + TQString m_szCondition; // may be null! public: - KviKvsTreeNodeSpecialCommandDefpopupConditionalLabel(const QChar * pLocation,const QString &szCondition,const QString &szItemName) + KviKvsTreeNodeSpecialCommandDefpopupConditionalLabel(const TQChar * pLocation,const TQString &szCondition,const TQString &szItemName) : KviKvsTreeNodeSpecialCommandDefpopupLabel(pLocation,szItemName), m_szCondition(szCondition) {}; ~KviKvsTreeNodeSpecialCommandDefpopupConditionalLabel(){}; public: - void setCondition(const QString &szCondition){ m_szCondition = szCondition; }; + void setCondition(const TQString &szCondition){ m_szCondition = szCondition; }; }; class KVIRC_API KviKvsTreeNodeSpecialCommandDefpopupLabelSeparator : public KviKvsTreeNodeSpecialCommandDefpopupConditionalLabel { public: - KviKvsTreeNodeSpecialCommandDefpopupLabelSeparator(const QChar * pLocation,const QString &szCondition,const QString &szItemName) + KviKvsTreeNodeSpecialCommandDefpopupLabelSeparator(const TQChar * pLocation,const TQString &szCondition,const TQString &szItemName) : KviKvsTreeNodeSpecialCommandDefpopupConditionalLabel(pLocation,szCondition,szItemName){}; ~KviKvsTreeNodeSpecialCommandDefpopupLabelSeparator(){}; public: - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); virtual bool execute(KviKvsRunTimeContext * c,KviKvsPopupMenu * p); }; @@ -76,27 +76,27 @@ public: class KVIRC_API KviKvsTreeNodeSpecialCommandDefpopupConditionalLabelWithTextAndIcon : public KviKvsTreeNodeSpecialCommandDefpopupConditionalLabel { protected: - QString m_szText; - QString m_szIcon; + TQString m_szText; + TQString m_szIcon; public: - KviKvsTreeNodeSpecialCommandDefpopupConditionalLabelWithTextAndIcon(const QChar * pLocation,const QString &szCondition,const QString &szText,const QString &szIcon,const QString &szItemName) + KviKvsTreeNodeSpecialCommandDefpopupConditionalLabelWithTextAndIcon(const TQChar * pLocation,const TQString &szCondition,const TQString &szText,const TQString &szIcon,const TQString &szItemName) : KviKvsTreeNodeSpecialCommandDefpopupConditionalLabel(pLocation,szCondition,szItemName), m_szText(szText), m_szIcon(szIcon){}; ~KviKvsTreeNodeSpecialCommandDefpopupConditionalLabelWithTextAndIcon(){}; public: - void setText(const QString &szText){ m_szText = szText; }; - void setIcon(const QString &szIcon){ m_szIcon = szIcon; }; + void setText(const TQString &szText){ m_szText = szText; }; + void setIcon(const TQString &szIcon){ m_szIcon = szIcon; }; }; class KVIRC_API KviKvsTreeNodeSpecialCommandDefpopupLabelExtpopup : public KviKvsTreeNodeSpecialCommandDefpopupConditionalLabelWithTextAndIcon { protected: - QString m_szName; + TQString m_szName; public: - KviKvsTreeNodeSpecialCommandDefpopupLabelExtpopup(const QChar * pLocation,const QString &szCondition,const QString &szText,const QString &szIcon,const QString &szName,const QString &szItemName) + KviKvsTreeNodeSpecialCommandDefpopupLabelExtpopup(const TQChar * pLocation,const TQString &szCondition,const TQString &szText,const TQString &szIcon,const TQString &szName,const TQString &szItemName) : KviKvsTreeNodeSpecialCommandDefpopupConditionalLabelWithTextAndIcon(pLocation,szCondition,szText,szIcon,szItemName), m_szName(szName){}; ~KviKvsTreeNodeSpecialCommandDefpopupLabelExtpopup(){}; public: - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); virtual bool execute(KviKvsRunTimeContext * c,KviKvsPopupMenu * p); }; @@ -104,13 +104,13 @@ public: class KVIRC_API KviKvsTreeNodeSpecialCommandDefpopupLabelItem : public KviKvsTreeNodeSpecialCommandDefpopupConditionalLabelWithTextAndIcon { protected: - QString m_szInstruction; + TQString m_szInstruction; public: - KviKvsTreeNodeSpecialCommandDefpopupLabelItem(const QChar * pLocation,const QString &szCondition,const QString &szText,const QString &szIcon,const QString &szInstruction,const QString &szItemName) + KviKvsTreeNodeSpecialCommandDefpopupLabelItem(const TQChar * pLocation,const TQString &szCondition,const TQString &szText,const TQString &szIcon,const TQString &szInstruction,const TQString &szItemName) : KviKvsTreeNodeSpecialCommandDefpopupConditionalLabelWithTextAndIcon(pLocation,szCondition,szText,szIcon,szItemName), m_szInstruction(szInstruction) {}; ~KviKvsTreeNodeSpecialCommandDefpopupLabelItem(){}; public: - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); virtual bool execute(KviKvsRunTimeContext * c,KviKvsPopupMenu * p); }; @@ -119,11 +119,11 @@ public: class KVIRC_API KviKvsTreeNodeSpecialCommandDefpopupLabelLabel : public KviKvsTreeNodeSpecialCommandDefpopupConditionalLabelWithTextAndIcon { public: - KviKvsTreeNodeSpecialCommandDefpopupLabelLabel(const QChar * pLocation,const QString &szCondition,const QString &szText,const QString &szIcon,const QString &szItemName) + KviKvsTreeNodeSpecialCommandDefpopupLabelLabel(const TQChar * pLocation,const TQString &szCondition,const TQString &szText,const TQString &szIcon,const TQString &szItemName) : KviKvsTreeNodeSpecialCommandDefpopupConditionalLabelWithTextAndIcon(pLocation,szCondition,szText,szIcon,szItemName){}; ~KviKvsTreeNodeSpecialCommandDefpopupLabelLabel(){}; public: - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); virtual bool execute(KviKvsRunTimeContext * c,KviKvsPopupMenu * p); }; @@ -133,13 +133,13 @@ public: class KVIRC_API KviKvsTreeNodeSpecialCommandDefpopupLabelPrologue : public KviKvsTreeNodeSpecialCommandDefpopupLabel { protected: - QString m_szInstruction; + TQString m_szInstruction; public: - KviKvsTreeNodeSpecialCommandDefpopupLabelPrologue(const QChar * pLocation,const QString &szInstruction,const QString &szItemName) + KviKvsTreeNodeSpecialCommandDefpopupLabelPrologue(const TQChar * pLocation,const TQString &szInstruction,const TQString &szItemName) : KviKvsTreeNodeSpecialCommandDefpopupLabel(pLocation,szItemName), m_szInstruction(szInstruction){}; ~KviKvsTreeNodeSpecialCommandDefpopupLabelPrologue(){}; public: - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); virtual bool execute(KviKvsRunTimeContext * c,KviKvsPopupMenu * p); }; @@ -147,13 +147,13 @@ public: class KVIRC_API KviKvsTreeNodeSpecialCommandDefpopupLabelEpilogue : public KviKvsTreeNodeSpecialCommandDefpopupLabel { protected: - QString m_szInstruction; + TQString m_szInstruction; public: - KviKvsTreeNodeSpecialCommandDefpopupLabelEpilogue(const QChar * pLocation,const QString &szInstruction,const QString &szItemName) + KviKvsTreeNodeSpecialCommandDefpopupLabelEpilogue(const TQChar * pLocation,const TQString &szInstruction,const TQString &szItemName) : KviKvsTreeNodeSpecialCommandDefpopupLabel(pLocation,szItemName), m_szInstruction(szInstruction){}; ~KviKvsTreeNodeSpecialCommandDefpopupLabelEpilogue(){}; public: - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); virtual bool execute(KviKvsRunTimeContext * c,KviKvsPopupMenu * p); }; @@ -162,14 +162,14 @@ public: class KVIRC_API KviKvsTreeNodeSpecialCommandDefpopupLabelPopup : public KviKvsTreeNodeSpecialCommandDefpopupConditionalLabelWithTextAndIcon { public: - KviKvsTreeNodeSpecialCommandDefpopupLabelPopup(const QChar * pLocation); + KviKvsTreeNodeSpecialCommandDefpopupLabelPopup(const TQChar * pLocation); ~KviKvsTreeNodeSpecialCommandDefpopupLabelPopup(); protected: KviPointerList * m_pLabels; public: bool isEmpty(){ return m_pLabels->isEmpty(); }; void addLabel(KviKvsTreeNodeSpecialCommandDefpopupLabel * pLabel); - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); virtual bool execute(KviKvsRunTimeContext * c,KviKvsPopupMenu * p); bool fill(KviKvsRunTimeContext * c,KviKvsPopupMenu * p); @@ -179,13 +179,13 @@ public: class KVIRC_API KviKvsTreeNodeSpecialCommandDefpopup : public KviKvsTreeNodeSpecialCommand { public: - KviKvsTreeNodeSpecialCommandDefpopup(const QChar * pLocation,KviKvsTreeNodeData * pPopupName,KviKvsTreeNodeSpecialCommandDefpopupLabelPopup * pMainPopup); + KviKvsTreeNodeSpecialCommandDefpopup(const TQChar * pLocation,KviKvsTreeNodeData * pPopupName,KviKvsTreeNodeSpecialCommandDefpopupLabelPopup * pMainPopup); ~KviKvsTreeNodeSpecialCommandDefpopup(); private: KviKvsTreeNodeData * m_pPopupName; // can't be zero KviKvsTreeNodeSpecialCommandDefpopupLabelPopup * m_pMainPopup; public: - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); virtual bool execute(KviKvsRunTimeContext * c); }; diff --git a/src/kvirc/kvs/kvi_kvs_treenode_specialcommanddo.cpp b/src/kvirc/kvs/kvi_kvs_treenode_specialcommanddo.cpp index 5b083c80..012b0e7e 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_specialcommanddo.cpp +++ b/src/kvirc/kvs/kvi_kvs_treenode_specialcommanddo.cpp @@ -31,7 +31,7 @@ #include "kvi_kvs_runtimecontext.h" #include "kvi_locale.h" -KviKvsTreeNodeSpecialCommandDo::KviKvsTreeNodeSpecialCommandDo(const QChar * pLocation,KviKvsTreeNodeExpression * e,KviKvsTreeNodeInstruction * i) +KviKvsTreeNodeSpecialCommandDo::KviKvsTreeNodeSpecialCommandDo(const TQChar * pLocation,KviKvsTreeNodeExpression * e,KviKvsTreeNodeInstruction * i) : KviKvsTreeNodeSpecialCommand(pLocation,"do") { m_pExpression = e; @@ -46,7 +46,7 @@ KviKvsTreeNodeSpecialCommandDo::~KviKvsTreeNodeSpecialCommandDo() if(m_pInstruction)delete m_pInstruction; } -void KviKvsTreeNodeSpecialCommandDo::contextDescription(QString &szBuffer) +void KviKvsTreeNodeSpecialCommandDo::contextDescription(TQString &szBuffer) { szBuffer = "Special Command \"do\""; } @@ -54,7 +54,7 @@ void KviKvsTreeNodeSpecialCommandDo::contextDescription(QString &szBuffer) void KviKvsTreeNodeSpecialCommandDo::dump(const char * prefix) { debug("%s SpecialCommandDo",prefix); - QString tmp = prefix; + TQString tmp = prefix; tmp.append(" "); m_pExpression->dump(tmp); if(m_pInstruction)m_pInstruction->dump(tmp); diff --git a/src/kvirc/kvs/kvi_kvs_treenode_specialcommanddo.h b/src/kvirc/kvs/kvi_kvs_treenode_specialcommanddo.h index dde8d007..834d0eae 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_specialcommanddo.h +++ b/src/kvirc/kvs/kvi_kvs_treenode_specialcommanddo.h @@ -36,13 +36,13 @@ class KviKvsRunTimeContext; class KVIRC_API KviKvsTreeNodeSpecialCommandDo : public KviKvsTreeNodeSpecialCommand { public: - KviKvsTreeNodeSpecialCommandDo(const QChar * pLocation,KviKvsTreeNodeExpression * e,KviKvsTreeNodeInstruction * i); + KviKvsTreeNodeSpecialCommandDo(const TQChar * pLocation,KviKvsTreeNodeExpression * e,KviKvsTreeNodeInstruction * i); ~KviKvsTreeNodeSpecialCommandDo(); private: KviKvsTreeNodeExpression * m_pExpression; // can't be 0 KviKvsTreeNodeInstruction * m_pInstruction; // may be 0 public: - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); virtual bool execute(KviKvsRunTimeContext * c); }; diff --git a/src/kvirc/kvs/kvi_kvs_treenode_specialcommandfor.cpp b/src/kvirc/kvs/kvi_kvs_treenode_specialcommandfor.cpp index 82526bc6..e608988c 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_specialcommandfor.cpp +++ b/src/kvirc/kvs/kvi_kvs_treenode_specialcommandfor.cpp @@ -30,7 +30,7 @@ #include "kvi_kvs_runtimecontext.h" #include "kvi_locale.h" -KviKvsTreeNodeSpecialCommandFor::KviKvsTreeNodeSpecialCommandFor(const QChar * pLocation,KviKvsTreeNodeInstruction * pInit,KviKvsTreeNodeExpression * pCond,KviKvsTreeNodeInstruction * pUpd,KviKvsTreeNodeInstruction * pLoop) +KviKvsTreeNodeSpecialCommandFor::KviKvsTreeNodeSpecialCommandFor(const TQChar * pLocation,KviKvsTreeNodeInstruction * pInit,KviKvsTreeNodeExpression * pCond,KviKvsTreeNodeInstruction * pUpd,KviKvsTreeNodeInstruction * pLoop) : KviKvsTreeNodeSpecialCommand(pLocation,"for") { m_pInitialization = pInit; @@ -51,7 +51,7 @@ KviKvsTreeNodeSpecialCommandFor::~KviKvsTreeNodeSpecialCommandFor() if(m_pLoop)delete m_pLoop; } -void KviKvsTreeNodeSpecialCommandFor::contextDescription(QString &szBuffer) +void KviKvsTreeNodeSpecialCommandFor::contextDescription(TQString &szBuffer) { szBuffer = "Special Command \"for\""; } @@ -59,7 +59,7 @@ void KviKvsTreeNodeSpecialCommandFor::contextDescription(QString &szBuffer) void KviKvsTreeNodeSpecialCommandFor::dump(const char * prefix) { debug("%s SpecialCommandFor",prefix); - QString tmp = prefix; + TQString tmp = prefix; tmp.append(" "); if(m_pInitialization)m_pInitialization->dump(tmp.utf8().data()); if(m_pCondition)m_pCondition->dump(tmp.utf8().data()); diff --git a/src/kvirc/kvs/kvi_kvs_treenode_specialcommandfor.h b/src/kvirc/kvs/kvi_kvs_treenode_specialcommandfor.h index 4c53f2cf..3800c95e 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_specialcommandfor.h +++ b/src/kvirc/kvs/kvi_kvs_treenode_specialcommandfor.h @@ -36,7 +36,7 @@ class KviKvsRunTimeContext; class KVIRC_API KviKvsTreeNodeSpecialCommandFor : public KviKvsTreeNodeSpecialCommand { public: - KviKvsTreeNodeSpecialCommandFor(const QChar * pLocation,KviKvsTreeNodeInstruction * pInit,KviKvsTreeNodeExpression * pCond,KviKvsTreeNodeInstruction * pUpd,KviKvsTreeNodeInstruction * pLoop); + KviKvsTreeNodeSpecialCommandFor(const TQChar * pLocation,KviKvsTreeNodeInstruction * pInit,KviKvsTreeNodeExpression * pCond,KviKvsTreeNodeInstruction * pUpd,KviKvsTreeNodeInstruction * pLoop); ~KviKvsTreeNodeSpecialCommandFor(); private: KviKvsTreeNodeInstruction * m_pInitialization; // can be 0 @@ -44,7 +44,7 @@ private: KviKvsTreeNodeInstruction * m_pUpdate; // can be 0 KviKvsTreeNodeInstruction * m_pLoop; // can be 0 public: - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); virtual bool execute(KviKvsRunTimeContext * c); }; diff --git a/src/kvirc/kvs/kvi_kvs_treenode_specialcommandforeach.cpp b/src/kvirc/kvs/kvi_kvs_treenode_specialcommandforeach.cpp index db98e39c..90e0d1c7 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_specialcommandforeach.cpp +++ b/src/kvirc/kvs/kvi_kvs_treenode_specialcommandforeach.cpp @@ -32,7 +32,7 @@ #include "kvi_kvs_runtimecontext.h" #include "kvi_locale.h" -KviKvsTreeNodeSpecialCommandForeach::KviKvsTreeNodeSpecialCommandForeach(const QChar * pLocation,KviKvsTreeNodeData * pVar,KviKvsTreeNodeDataList * pArgs,KviKvsTreeNodeInstruction * pLoop) +KviKvsTreeNodeSpecialCommandForeach::KviKvsTreeNodeSpecialCommandForeach(const TQChar * pLocation,KviKvsTreeNodeData * pVar,KviKvsTreeNodeDataList * pArgs,KviKvsTreeNodeInstruction * pLoop) : KviKvsTreeNodeSpecialCommand(pLocation,"foreach") { m_pIterationVariable = pVar; @@ -50,7 +50,7 @@ KviKvsTreeNodeSpecialCommandForeach::~KviKvsTreeNodeSpecialCommandForeach() delete m_pLoop; } -void KviKvsTreeNodeSpecialCommandForeach::contextDescription(QString &szBuffer) +void KviKvsTreeNodeSpecialCommandForeach::contextDescription(TQString &szBuffer) { szBuffer = "Special Command \"foreach\""; } @@ -58,7 +58,7 @@ void KviKvsTreeNodeSpecialCommandForeach::contextDescription(QString &szBuffer) void KviKvsTreeNodeSpecialCommandForeach::dump(const char * prefix) { debug("%s SpecialCommandForeach",prefix); - QString tmp = prefix; + TQString tmp = prefix; tmp.append(" "); m_pIterationVariable->dump(tmp.utf8().data()); m_pIterationData->dump(tmp.utf8().data()); @@ -84,7 +84,7 @@ bool KviKvsTreeNodeSpecialCommandForeach::execute(KviKvsRunTimeContext * c) if(!(m_pSwitches->evaluate(c,&swl)))return false; } - bool bIncludeEmptyScalars = swl.find('a',"all") != 0; + bool bIncludeEmptyScalars = swl.tqfind('a',"all") != 0; for(KviKvsVariant * pArg = l.first();pArg;pArg = l.next()) { diff --git a/src/kvirc/kvs/kvi_kvs_treenode_specialcommandforeach.h b/src/kvirc/kvs/kvi_kvs_treenode_specialcommandforeach.h index 9f2e765b..d3b8ff2d 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_specialcommandforeach.h +++ b/src/kvirc/kvs/kvi_kvs_treenode_specialcommandforeach.h @@ -37,14 +37,14 @@ class KviKvsRunTimeContext; class KVIRC_API KviKvsTreeNodeSpecialCommandForeach : public KviKvsTreeNodeSpecialCommand { public: - KviKvsTreeNodeSpecialCommandForeach(const QChar * pLocation,KviKvsTreeNodeData * pVar,KviKvsTreeNodeDataList * pArgs,KviKvsTreeNodeInstruction * pLoop); + KviKvsTreeNodeSpecialCommandForeach(const TQChar * pLocation,KviKvsTreeNodeData * pVar,KviKvsTreeNodeDataList * pArgs,KviKvsTreeNodeInstruction * pLoop); ~KviKvsTreeNodeSpecialCommandForeach(); private: KviKvsTreeNodeData * m_pIterationVariable; // can't be zero! KviKvsTreeNodeDataList * m_pIterationData; // can't be zero! KviKvsTreeNodeInstruction * m_pLoop; // can't be zero! public: - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); virtual bool execute(KviKvsRunTimeContext * c); }; diff --git a/src/kvirc/kvs/kvi_kvs_treenode_specialcommandif.cpp b/src/kvirc/kvs/kvi_kvs_treenode_specialcommandif.cpp index bc9e31d0..2c170221 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_specialcommandif.cpp +++ b/src/kvirc/kvs/kvi_kvs_treenode_specialcommandif.cpp @@ -30,7 +30,7 @@ #include "kvi_kvs_runtimecontext.h" #include "kvi_locale.h" -KviKvsTreeNodeSpecialCommandIf::KviKvsTreeNodeSpecialCommandIf(const QChar * pLocation,KviKvsTreeNodeExpression * e,KviKvsTreeNodeInstruction * pIf,KviKvsTreeNodeInstruction * pElse) +KviKvsTreeNodeSpecialCommandIf::KviKvsTreeNodeSpecialCommandIf(const TQChar * pLocation,KviKvsTreeNodeExpression * e,KviKvsTreeNodeInstruction * pIf,KviKvsTreeNodeInstruction * pElse) : KviKvsTreeNodeSpecialCommand(pLocation,"if") { #ifdef COMPILE_NEW_KVS @@ -52,7 +52,7 @@ KviKvsTreeNodeSpecialCommandIf::~KviKvsTreeNodeSpecialCommandIf() #endif } -void KviKvsTreeNodeSpecialCommandIf::contextDescription(QString &szBuffer) +void KviKvsTreeNodeSpecialCommandIf::contextDescription(TQString &szBuffer) { #ifdef COMPILE_NEW_KVS szBuffer = "Special Command \"if\""; @@ -63,7 +63,7 @@ void KviKvsTreeNodeSpecialCommandIf::dump(const char * prefix) { #ifdef COMPILE_NEW_KVS debug("%s SpecialCommandIf",prefix); - QString tmp = prefix; + TQString tmp = prefix; tmp.append(" "); m_pExpression->dump(tmp); if(m_pIfInstruction)m_pIfInstruction->dump(tmp); diff --git a/src/kvirc/kvs/kvi_kvs_treenode_specialcommandif.h b/src/kvirc/kvs/kvi_kvs_treenode_specialcommandif.h index bc89af41..856b8951 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_specialcommandif.h +++ b/src/kvirc/kvs/kvi_kvs_treenode_specialcommandif.h @@ -35,14 +35,14 @@ class KviKvsRunTimeContext; class KVIRC_API KviKvsTreeNodeSpecialCommandIf : public KviKvsTreeNodeSpecialCommand { public: - KviKvsTreeNodeSpecialCommandIf(const QChar * pLocation,KviKvsTreeNodeExpression * e,KviKvsTreeNodeInstruction * pIf,KviKvsTreeNodeInstruction * pElse); + KviKvsTreeNodeSpecialCommandIf(const TQChar * pLocation,KviKvsTreeNodeExpression * e,KviKvsTreeNodeInstruction * pIf,KviKvsTreeNodeInstruction * pElse); ~KviKvsTreeNodeSpecialCommandIf(); private: KviKvsTreeNodeExpression * m_pExpression; // can't be 0 KviKvsTreeNodeInstruction * m_pIfInstruction; // may be 0 KviKvsTreeNodeInstruction * m_pElseInstruction; // may be 0 public: - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); virtual bool execute(KviKvsRunTimeContext * c); }; diff --git a/src/kvirc/kvs/kvi_kvs_treenode_specialcommandswitch.cpp b/src/kvirc/kvs/kvi_kvs_treenode_specialcommandswitch.cpp index 28b7b1f5..d24efa03 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_specialcommandswitch.cpp +++ b/src/kvirc/kvs/kvi_kvs_treenode_specialcommandswitch.cpp @@ -30,9 +30,9 @@ #include "kvi_kvs_runtimecontext.h" #include "kvi_locale.h" -#include +#include -KviKvsTreeNodeSpecialCommandSwitchLabel::KviKvsTreeNodeSpecialCommandSwitchLabel(const QChar * pLocation) +KviKvsTreeNodeSpecialCommandSwitchLabel::KviKvsTreeNodeSpecialCommandSwitchLabel(const TQChar * pLocation) : KviKvsTreeNode(pLocation) { m_pParameter = 0; @@ -64,7 +64,7 @@ void KviKvsTreeNodeSpecialCommandSwitchLabel::setInstruction(KviKvsTreeNodeInstr -KviKvsTreeNodeSpecialCommandSwitchLabelCase::KviKvsTreeNodeSpecialCommandSwitchLabelCase(const QChar * pLocation) +KviKvsTreeNodeSpecialCommandSwitchLabelCase::KviKvsTreeNodeSpecialCommandSwitchLabelCase(const TQChar * pLocation) : KviKvsTreeNodeSpecialCommandSwitchLabel(pLocation) { } @@ -73,7 +73,7 @@ KviKvsTreeNodeSpecialCommandSwitchLabelCase::~KviKvsTreeNodeSpecialCommandSwitch { } -void KviKvsTreeNodeSpecialCommandSwitchLabelCase::contextDescription(QString &szBuffer) +void KviKvsTreeNodeSpecialCommandSwitchLabelCase::contextDescription(TQString &szBuffer) { szBuffer = "Label \"case\" For Special Command \"switch\""; } @@ -81,7 +81,7 @@ void KviKvsTreeNodeSpecialCommandSwitchLabelCase::contextDescription(QString &sz void KviKvsTreeNodeSpecialCommandSwitchLabelCase::dump(const char * prefix) { debug("%s SpecialCommandSwitchLabelCase",prefix); - QString tmp = prefix; + TQString tmp = prefix; tmp.append(" "); if(m_pParameter)m_pParameter->dump(tmp.utf8().data()); if(m_pInstruction)m_pInstruction->dump(tmp.utf8().data()); @@ -115,10 +115,10 @@ bool KviKvsTreeNodeSpecialCommandSwitchLabelCase::execute(KviKvsRunTimeContext * } } else { // string comparision, case insensitive - QString reg; + TQString reg; v.asString(reg); - QString val; + TQString val; pRealParameter->asString(val); if(reg.lower() != val.lower())return true; @@ -139,7 +139,7 @@ bool KviKvsTreeNodeSpecialCommandSwitchLabelCase::execute(KviKvsRunTimeContext * -KviKvsTreeNodeSpecialCommandSwitchLabelMatch::KviKvsTreeNodeSpecialCommandSwitchLabelMatch(const QChar * pLocation) +KviKvsTreeNodeSpecialCommandSwitchLabelMatch::KviKvsTreeNodeSpecialCommandSwitchLabelMatch(const TQChar * pLocation) : KviKvsTreeNodeSpecialCommandSwitchLabel(pLocation) { } @@ -148,7 +148,7 @@ KviKvsTreeNodeSpecialCommandSwitchLabelMatch::~KviKvsTreeNodeSpecialCommandSwitc { } -void KviKvsTreeNodeSpecialCommandSwitchLabelMatch::contextDescription(QString &szBuffer) +void KviKvsTreeNodeSpecialCommandSwitchLabelMatch::contextDescription(TQString &szBuffer) { szBuffer = "Label \"match\" For Special Command \"switch\""; } @@ -157,7 +157,7 @@ void KviKvsTreeNodeSpecialCommandSwitchLabelMatch::contextDescription(QString &s void KviKvsTreeNodeSpecialCommandSwitchLabelMatch::dump(const char * prefix) { debug("%s SpecialCommandSwitchLabelMatch",prefix); - QString tmp = prefix; + TQString tmp = prefix; tmp.append(" "); if(m_pParameter)m_pParameter->dump(tmp.utf8().data()); if(m_pInstruction)m_pInstruction->dump(tmp.utf8().data()); @@ -168,12 +168,12 @@ bool KviKvsTreeNodeSpecialCommandSwitchLabelMatch::execute(KviKvsRunTimeContext KviKvsVariant v; if(!m_pParameter->evaluateReadOnly(c,&v))return false; - QString reg; + TQString reg; v.asString(reg); - QRegExp rx(reg,false,true); + TQRegExp rx(reg,false,true); - QString val; + TQString val; pRealParameter->asString(val); if(!rx.exactMatch(val))return true; // no match @@ -193,7 +193,7 @@ bool KviKvsTreeNodeSpecialCommandSwitchLabelMatch::execute(KviKvsRunTimeContext -KviKvsTreeNodeSpecialCommandSwitchLabelRegexp::KviKvsTreeNodeSpecialCommandSwitchLabelRegexp(const QChar * pLocation) +KviKvsTreeNodeSpecialCommandSwitchLabelRegexp::KviKvsTreeNodeSpecialCommandSwitchLabelRegexp(const TQChar * pLocation) : KviKvsTreeNodeSpecialCommandSwitchLabel(pLocation) { } @@ -202,7 +202,7 @@ KviKvsTreeNodeSpecialCommandSwitchLabelRegexp::~KviKvsTreeNodeSpecialCommandSwit { } -void KviKvsTreeNodeSpecialCommandSwitchLabelRegexp::contextDescription(QString &szBuffer) +void KviKvsTreeNodeSpecialCommandSwitchLabelRegexp::contextDescription(TQString &szBuffer) { szBuffer = "Label \"regexp\" For Special Command \"switch\""; } @@ -211,7 +211,7 @@ void KviKvsTreeNodeSpecialCommandSwitchLabelRegexp::contextDescription(QString & void KviKvsTreeNodeSpecialCommandSwitchLabelRegexp::dump(const char * prefix) { debug("%s SpecialCommandSwitchLabelRegexp",prefix); - QString tmp = prefix; + TQString tmp = prefix; tmp.append(" "); if(m_pParameter)m_pParameter->dump(tmp.utf8().data()); if(m_pInstruction)m_pInstruction->dump(tmp.utf8().data()); @@ -222,12 +222,12 @@ bool KviKvsTreeNodeSpecialCommandSwitchLabelRegexp::execute(KviKvsRunTimeContext KviKvsVariant v; if(!m_pParameter->evaluateReadOnly(c,&v))return false; - QString reg; + TQString reg; v.asString(reg); - QRegExp rx(reg,false,false); + TQRegExp rx(reg,false,false); - QString val; + TQString val; pRealParameter->asString(val); if(!rx.exactMatch(val))return true; // no match @@ -249,7 +249,7 @@ bool KviKvsTreeNodeSpecialCommandSwitchLabelRegexp::execute(KviKvsRunTimeContext -KviKvsTreeNodeSpecialCommandSwitchLabelDefault::KviKvsTreeNodeSpecialCommandSwitchLabelDefault(const QChar * pLocation) +KviKvsTreeNodeSpecialCommandSwitchLabelDefault::KviKvsTreeNodeSpecialCommandSwitchLabelDefault(const TQChar * pLocation) : KviKvsTreeNodeSpecialCommandSwitchLabel(pLocation) { } @@ -258,7 +258,7 @@ KviKvsTreeNodeSpecialCommandSwitchLabelDefault::~KviKvsTreeNodeSpecialCommandSwi { } -void KviKvsTreeNodeSpecialCommandSwitchLabelDefault::contextDescription(QString &szBuffer) +void KviKvsTreeNodeSpecialCommandSwitchLabelDefault::contextDescription(TQString &szBuffer) { szBuffer = "Label \"default\" For Special Command \"switch\""; } @@ -267,7 +267,7 @@ void KviKvsTreeNodeSpecialCommandSwitchLabelDefault::contextDescription(QString void KviKvsTreeNodeSpecialCommandSwitchLabelDefault::dump(const char * prefix) { debug("%s SpecialCommandSwitchLabelDefault",prefix); - QString tmp = prefix; + TQString tmp = prefix; tmp.append(" "); if(m_pInstruction)m_pInstruction->dump(tmp.utf8().data()); } @@ -289,7 +289,7 @@ bool KviKvsTreeNodeSpecialCommandSwitchLabelDefault::execute(KviKvsRunTimeContex -KviKvsTreeNodeSpecialCommandSwitch::KviKvsTreeNodeSpecialCommandSwitch(const QChar * pLocation,KviKvsTreeNodeExpression * e) +KviKvsTreeNodeSpecialCommandSwitch::KviKvsTreeNodeSpecialCommandSwitch(const TQChar * pLocation,KviKvsTreeNodeExpression * e) : KviKvsTreeNodeSpecialCommand(pLocation,"switch") { m_pExpression = e; @@ -310,7 +310,7 @@ void KviKvsTreeNodeSpecialCommandSwitch::addLabel(KviKvsTreeNodeSpecialCommandSw l->setParent(this); } -void KviKvsTreeNodeSpecialCommandSwitch::contextDescription(QString &szBuffer) +void KviKvsTreeNodeSpecialCommandSwitch::contextDescription(TQString &szBuffer) { szBuffer = "Special Command \"switch\""; } @@ -319,7 +319,7 @@ void KviKvsTreeNodeSpecialCommandSwitch::contextDescription(QString &szBuffer) void KviKvsTreeNodeSpecialCommandSwitch::dump(const char * prefix) { debug("%s SpecialCommandSwitch",prefix); - QString tmp = prefix; + TQString tmp = prefix; tmp.append(" "); m_pExpression->dump(tmp.utf8().data()); for(KviKvsTreeNodeSpecialCommandSwitchLabel * l = m_pLabels->first();l;l = m_pLabels->next()) diff --git a/src/kvirc/kvs/kvi_kvs_treenode_specialcommandswitch.h b/src/kvirc/kvs/kvi_kvs_treenode_specialcommandswitch.h index ecad6e25..aa5473ba 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_specialcommandswitch.h +++ b/src/kvirc/kvs/kvi_kvs_treenode_specialcommandswitch.h @@ -37,7 +37,7 @@ class KviKvsVariant; class KVIRC_API KviKvsTreeNodeSpecialCommandSwitchLabel : public KviKvsTreeNode { public: - KviKvsTreeNodeSpecialCommandSwitchLabel(const QChar * pLocation); + KviKvsTreeNodeSpecialCommandSwitchLabel(const TQChar * pLocation); ~KviKvsTreeNodeSpecialCommandSwitchLabel(); protected: KviKvsTreeNodeData * m_pParameter; @@ -54,10 +54,10 @@ public: class KVIRC_API KviKvsTreeNodeSpecialCommandSwitchLabelCase : public KviKvsTreeNodeSpecialCommandSwitchLabel { public: - KviKvsTreeNodeSpecialCommandSwitchLabelCase(const QChar * pLocation); + KviKvsTreeNodeSpecialCommandSwitchLabelCase(const TQChar * pLocation); ~KviKvsTreeNodeSpecialCommandSwitchLabelCase(); public: - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); virtual bool execute(KviKvsRunTimeContext * c,KviKvsVariant * pRealParameter); }; @@ -66,10 +66,10 @@ public: class KVIRC_API KviKvsTreeNodeSpecialCommandSwitchLabelMatch : public KviKvsTreeNodeSpecialCommandSwitchLabel { public: - KviKvsTreeNodeSpecialCommandSwitchLabelMatch(const QChar * pLocation); + KviKvsTreeNodeSpecialCommandSwitchLabelMatch(const TQChar * pLocation); ~KviKvsTreeNodeSpecialCommandSwitchLabelMatch(); public: - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); virtual bool execute(KviKvsRunTimeContext * c,KviKvsVariant * pRealParameter); }; @@ -77,10 +77,10 @@ public: class KVIRC_API KviKvsTreeNodeSpecialCommandSwitchLabelRegexp : public KviKvsTreeNodeSpecialCommandSwitchLabel { public: - KviKvsTreeNodeSpecialCommandSwitchLabelRegexp(const QChar * pLocation); + KviKvsTreeNodeSpecialCommandSwitchLabelRegexp(const TQChar * pLocation); ~KviKvsTreeNodeSpecialCommandSwitchLabelRegexp(); public: - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); virtual bool execute(KviKvsRunTimeContext * c,KviKvsVariant * pRealParameter); }; @@ -88,11 +88,11 @@ public: class KVIRC_API KviKvsTreeNodeSpecialCommandSwitchLabelDefault : public KviKvsTreeNodeSpecialCommandSwitchLabel { public: - KviKvsTreeNodeSpecialCommandSwitchLabelDefault(const QChar * pLocation); + KviKvsTreeNodeSpecialCommandSwitchLabelDefault(const TQChar * pLocation); ~KviKvsTreeNodeSpecialCommandSwitchLabelDefault(); public: virtual void dump(const char * prefix); - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual bool execute(KviKvsRunTimeContext * c,KviKvsVariant * pRealParameter); }; @@ -101,7 +101,7 @@ public: class KVIRC_API KviKvsTreeNodeSpecialCommandSwitch : public KviKvsTreeNodeSpecialCommand { public: - KviKvsTreeNodeSpecialCommandSwitch(const QChar * pLocation,KviKvsTreeNodeExpression * e); + KviKvsTreeNodeSpecialCommandSwitch(const TQChar * pLocation,KviKvsTreeNodeExpression * e); ~KviKvsTreeNodeSpecialCommandSwitch(); private: KviKvsTreeNodeExpression * m_pExpression; // can't be 0 @@ -109,7 +109,7 @@ private: public: void addLabel(KviKvsTreeNodeSpecialCommandSwitchLabel * l); bool isEmpty(){ return m_pLabels->isEmpty(); }; - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); virtual bool execute(KviKvsRunTimeContext * c); }; diff --git a/src/kvirc/kvs/kvi_kvs_treenode_specialcommandunset.cpp b/src/kvirc/kvs/kvi_kvs_treenode_specialcommandunset.cpp index be7c5df2..a37cef62 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_specialcommandunset.cpp +++ b/src/kvirc/kvs/kvi_kvs_treenode_specialcommandunset.cpp @@ -29,7 +29,7 @@ #include "kvi_kvs_rwevaluationresult.h" #include "kvi_locale.h" -KviKvsTreeNodeSpecialCommandUnset::KviKvsTreeNodeSpecialCommandUnset(const QChar * pLocation,KviPointerList * pVariableList) +KviKvsTreeNodeSpecialCommandUnset::KviKvsTreeNodeSpecialCommandUnset(const TQChar * pLocation,KviPointerList * pVariableList) : KviKvsTreeNodeSpecialCommand(pLocation,"unset") { m_pVariableList = pVariableList; @@ -44,7 +44,7 @@ KviKvsTreeNodeSpecialCommandUnset::~KviKvsTreeNodeSpecialCommandUnset() delete m_pVariableList; } -void KviKvsTreeNodeSpecialCommandUnset::contextDescription(QString &szBuffer) +void KviKvsTreeNodeSpecialCommandUnset::contextDescription(TQString &szBuffer) { szBuffer = "Special Command \"unset\""; } @@ -52,7 +52,7 @@ void KviKvsTreeNodeSpecialCommandUnset::contextDescription(QString &szBuffer) void KviKvsTreeNodeSpecialCommandUnset::dump(const char * prefix) { debug("%s SpecialCommandUnset",prefix); - QString tmp = prefix; + TQString tmp = prefix; tmp.append(" "); for(KviKvsTreeNodeVariable * pVar = m_pVariableList->first();pVar;pVar = m_pVariableList->next()) { diff --git a/src/kvirc/kvs/kvi_kvs_treenode_specialcommandunset.h b/src/kvirc/kvs/kvi_kvs_treenode_specialcommandunset.h index 3d125065..9d36517a 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_specialcommandunset.h +++ b/src/kvirc/kvs/kvi_kvs_treenode_specialcommandunset.h @@ -34,12 +34,12 @@ class KviKvsRunTimeContext; class KVIRC_API KviKvsTreeNodeSpecialCommandUnset : public KviKvsTreeNodeSpecialCommand { public: - KviKvsTreeNodeSpecialCommandUnset(const QChar * pLocation,KviPointerList * pVarList); + KviKvsTreeNodeSpecialCommandUnset(const TQChar * pLocation,KviPointerList * pVarList); ~KviKvsTreeNodeSpecialCommandUnset(); private: KviPointerList * m_pVariableList; public: - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); virtual bool execute(KviKvsRunTimeContext * c); }; diff --git a/src/kvirc/kvs/kvi_kvs_treenode_specialcommandwhile.cpp b/src/kvirc/kvs/kvi_kvs_treenode_specialcommandwhile.cpp index 377921df..d1378d99 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_specialcommandwhile.cpp +++ b/src/kvirc/kvs/kvi_kvs_treenode_specialcommandwhile.cpp @@ -30,7 +30,7 @@ #include "kvi_kvs_runtimecontext.h" #include "kvi_locale.h" -KviKvsTreeNodeSpecialCommandWhile::KviKvsTreeNodeSpecialCommandWhile(const QChar * pLocation,KviKvsTreeNodeExpression * e,KviKvsTreeNodeInstruction * i) +KviKvsTreeNodeSpecialCommandWhile::KviKvsTreeNodeSpecialCommandWhile(const TQChar * pLocation,KviKvsTreeNodeExpression * e,KviKvsTreeNodeInstruction * i) : KviKvsTreeNodeSpecialCommand(pLocation,"while") { #ifdef COMPILE_NEW_KVS @@ -49,7 +49,7 @@ KviKvsTreeNodeSpecialCommandWhile::~KviKvsTreeNodeSpecialCommandWhile() #endif } -void KviKvsTreeNodeSpecialCommandWhile::contextDescription(QString &szBuffer) +void KviKvsTreeNodeSpecialCommandWhile::contextDescription(TQString &szBuffer) { #ifdef COMPILE_NEW_KVS szBuffer = "Special Command \"while\""; @@ -60,7 +60,7 @@ void KviKvsTreeNodeSpecialCommandWhile::dump(const char * prefix) { #ifdef COMPILE_NEW_KVS debug("%s SpecialCommandWhile",prefix); - QString tmp = prefix; + TQString tmp = prefix; tmp.append(" "); m_pExpression->dump(tmp); if(m_pInstruction)m_pInstruction->dump(tmp); diff --git a/src/kvirc/kvs/kvi_kvs_treenode_specialcommandwhile.h b/src/kvirc/kvs/kvi_kvs_treenode_specialcommandwhile.h index 87b3b902..38c4907e 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_specialcommandwhile.h +++ b/src/kvirc/kvs/kvi_kvs_treenode_specialcommandwhile.h @@ -36,13 +36,13 @@ class KviKvsRunTimeContext; class KVIRC_API KviKvsTreeNodeSpecialCommandWhile : public KviKvsTreeNodeSpecialCommand { public: - KviKvsTreeNodeSpecialCommandWhile(const QChar * pLocation,KviKvsTreeNodeExpression * e,KviKvsTreeNodeInstruction * i); + KviKvsTreeNodeSpecialCommandWhile(const TQChar * pLocation,KviKvsTreeNodeExpression * e,KviKvsTreeNodeInstruction * i); ~KviKvsTreeNodeSpecialCommandWhile(); private: KviKvsTreeNodeExpression * m_pExpression; // can't be 0 KviKvsTreeNodeInstruction * m_pInstruction; // may be 0 public: - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); virtual bool execute(KviKvsRunTimeContext * c); }; diff --git a/src/kvirc/kvs/kvi_kvs_treenode_stringcast.cpp b/src/kvirc/kvs/kvi_kvs_treenode_stringcast.cpp index 8c4f76c9..630d6467 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_stringcast.cpp +++ b/src/kvirc/kvs/kvi_kvs_treenode_stringcast.cpp @@ -27,7 +27,7 @@ #include "kvi_kvs_treenode_stringcast.h" #include "kvi_qstring.h" -KviKvsTreeNodeStringCast::KviKvsTreeNodeStringCast(const QChar * pLocation,KviKvsTreeNodeData * pChildData) +KviKvsTreeNodeStringCast::KviKvsTreeNodeStringCast(const TQChar * pLocation,KviKvsTreeNodeData * pChildData) : KviKvsTreeNodeData(pLocation) { m_pChildData = pChildData; @@ -45,14 +45,14 @@ bool KviKvsTreeNodeStringCast::evaluateReadOnly(KviKvsRunTimeContext * c,KviKvsV if(!m_pChildData->evaluateReadOnly(c,pBuffer))return false; if(!pBuffer->isString()) { - QString tmp; + TQString tmp; pBuffer->asString(tmp); pBuffer->setString(tmp); } return true; } -void KviKvsTreeNodeStringCast::contextDescription(QString &szBuffer) +void KviKvsTreeNodeStringCast::contextDescription(TQString &szBuffer) { szBuffer = "String Cast"; } @@ -60,7 +60,7 @@ void KviKvsTreeNodeStringCast::contextDescription(QString &szBuffer) void KviKvsTreeNodeStringCast::dump(const char * prefix) { debug("%s StringCast",prefix); - QString tmp = prefix; + TQString tmp = prefix; tmp.append(" "); m_pChildData->dump(tmp.utf8().data()); } diff --git a/src/kvirc/kvs/kvi_kvs_treenode_stringcast.h b/src/kvirc/kvs/kvi_kvs_treenode_stringcast.h index af537f9a..3cc3de6c 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_stringcast.h +++ b/src/kvirc/kvs/kvi_kvs_treenode_stringcast.h @@ -30,13 +30,13 @@ class KVIRC_API KviKvsTreeNodeStringCast : public KviKvsTreeNodeData { public: - KviKvsTreeNodeStringCast(const QChar * pLocation,KviKvsTreeNodeData * pChildData); + KviKvsTreeNodeStringCast(const TQChar * pLocation,KviKvsTreeNodeData * pChildData); ~KviKvsTreeNodeStringCast(); protected: KviKvsTreeNodeData * m_pChildData; public: virtual bool evaluateReadOnly(KviKvsRunTimeContext * c,KviKvsVariant * pBuffer); - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); }; diff --git a/src/kvirc/kvs/kvi_kvs_treenode_switchlist.cpp b/src/kvirc/kvs/kvi_kvs_treenode_switchlist.cpp index c821529c..32018c2a 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_switchlist.cpp +++ b/src/kvirc/kvs/kvi_kvs_treenode_switchlist.cpp @@ -27,7 +27,7 @@ #include "kvi_kvs_treenode_switchlist.h" #include "kvi_kvs_runtimecontext.h" -KviKvsTreeNodeSwitchList::KviKvsTreeNodeSwitchList(const QChar * pLocation) +KviKvsTreeNodeSwitchList::KviKvsTreeNodeSwitchList(const TQChar * pLocation) : KviKvsTreeNode(pLocation) { m_pShortSwitchDict = 0; @@ -40,7 +40,7 @@ KviKvsTreeNodeSwitchList::~KviKvsTreeNodeSwitchList() if(m_pLongSwitchDict)delete m_pLongSwitchDict; } -void KviKvsTreeNodeSwitchList::contextDescription(QString &szBuffer) +void KviKvsTreeNodeSwitchList::contextDescription(TQString &szBuffer) { szBuffer = "Switch List Evaluation"; } @@ -54,9 +54,9 @@ void KviKvsTreeNodeSwitchList::dump(const char * prefix) KviPointerHashTableIterator it(*m_pShortSwitchDict); while(it.current()) { - QString tmp = prefix; + TQString tmp = prefix; tmp.append(" Sw("); - QChar c((unsigned short)it.currentKey()); + TQChar c((unsigned short)it.currentKey()); tmp.append(c); tmp.append("): "); it.current()->dump(tmp.utf8().data()); @@ -65,10 +65,10 @@ void KviKvsTreeNodeSwitchList::dump(const char * prefix) } if(m_pLongSwitchDict) { - KviPointerHashTableIterator it(*m_pLongSwitchDict); + KviPointerHashTableIterator it(*m_pLongSwitchDict); while(it.current()) { - QString tmp = prefix; + TQString tmp = prefix; tmp.append(" Sw("); tmp.append(it.currentKey()); tmp.append("): "); @@ -86,19 +86,19 @@ void KviKvsTreeNodeSwitchList::addShort(int iShortKey,KviKvsTreeNodeData * p) m_pShortSwitchDict->setAutoDelete(true); } - m_pShortSwitchDict->replace(iShortKey,p); + m_pShortSwitchDict->tqreplace(iShortKey,p); p->setParent(this); } -void KviKvsTreeNodeSwitchList::addLong(const QString &szLongKey,KviKvsTreeNodeData * p) +void KviKvsTreeNodeSwitchList::addLong(const TQString &szLongKey,KviKvsTreeNodeData * p) { if(!m_pLongSwitchDict) { - m_pLongSwitchDict = new KviPointerHashTable(11); + m_pLongSwitchDict = new KviPointerHashTable(11); m_pLongSwitchDict->setAutoDelete(true); } - m_pLongSwitchDict->replace(szLongKey,p); + m_pLongSwitchDict->tqreplace(szLongKey,p); p->setParent(this); } @@ -124,7 +124,7 @@ bool KviKvsTreeNodeSwitchList::evaluate(KviKvsRunTimeContext * c,KviKvsSwitchLis } if(m_pLongSwitchDict) { - KviPointerHashTableIterator it(*m_pLongSwitchDict); + KviPointerHashTableIterator it(*m_pLongSwitchDict); while(KviKvsTreeNodeData * d = it.current()) { KviKvsVariant * v = new KviKvsVariant(); @@ -145,7 +145,7 @@ KviKvsTreeNodeData * KviKvsTreeNodeSwitchList::getStandardRebindingSwitch() KviKvsTreeNodeData * d; if(m_pShortSwitchDict) { - d = m_pShortSwitchDict->find('r'); + d = m_pShortSwitchDict->tqfind('r'); if(d) { m_pShortSwitchDict->setAutoDelete(false); @@ -156,7 +156,7 @@ KviKvsTreeNodeData * KviKvsTreeNodeSwitchList::getStandardRebindingSwitch() } if(m_pLongSwitchDict) { - d = m_pLongSwitchDict->find("rebind"); + d = m_pLongSwitchDict->tqfind("rebind"); if(d) { m_pLongSwitchDict->setAutoDelete(false); diff --git a/src/kvirc/kvs/kvi_kvs_treenode_switchlist.h b/src/kvirc/kvs/kvi_kvs_treenode_switchlist.h index 9e6510a4..0bc68559 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_switchlist.h +++ b/src/kvirc/kvs/kvi_kvs_treenode_switchlist.h @@ -39,17 +39,17 @@ class KviKvsRunTimeContext; class KVIRC_API KviKvsTreeNodeSwitchList : public KviKvsTreeNode { public: - KviKvsTreeNodeSwitchList(const QChar * pLocation); + KviKvsTreeNodeSwitchList(const TQChar * pLocation); ~KviKvsTreeNodeSwitchList(); public: KviPointerHashTable * m_pShortSwitchDict; - KviPointerHashTable *m_pLongSwitchDict; + KviPointerHashTable *m_pLongSwitchDict; public: void addShort(int iShortKey,KviKvsTreeNodeData * p); - void addLong(const QString &szLongKey,KviKvsTreeNodeData * p); + void addLong(const TQString &szLongKey,KviKvsTreeNodeData * p); bool isEmpty(){ return (m_pShortSwitchDict == 0) && (m_pLongSwitchDict == 0); }; virtual void dump(const char * prefix); - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); KviKvsTreeNodeData * getStandardRebindingSwitch(); diff --git a/src/kvirc/kvs/kvi_kvs_treenode_thisobjectfunctioncall.cpp b/src/kvirc/kvs/kvi_kvs_treenode_thisobjectfunctioncall.cpp index 6f3e7578..128dabad 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_thisobjectfunctioncall.cpp +++ b/src/kvirc/kvs/kvi_kvs_treenode_thisobjectfunctioncall.cpp @@ -28,7 +28,7 @@ #include "kvi_kvs_object.h" -KviKvsTreeNodeThisObjectFunctionCall::KviKvsTreeNodeThisObjectFunctionCall(const QChar * pLocation,const QString &szFncName,KviKvsTreeNodeDataList * pParams) +KviKvsTreeNodeThisObjectFunctionCall::KviKvsTreeNodeThisObjectFunctionCall(const TQChar * pLocation,const TQString &szFncName,KviKvsTreeNodeDataList * pParams) : KviKvsTreeNodeObjectFunctionCall(pLocation,szFncName,pParams) { } @@ -37,7 +37,7 @@ KviKvsTreeNodeThisObjectFunctionCall::~KviKvsTreeNodeThisObjectFunctionCall() { } -void KviKvsTreeNodeThisObjectFunctionCall::contextDescription(QString &szBuffer) +void KviKvsTreeNodeThisObjectFunctionCall::contextDescription(TQString &szBuffer) { #ifdef COMPILE_NEW_KVS szBuffer = "\"This\" Object Function Call \""; @@ -50,7 +50,7 @@ void KviKvsTreeNodeThisObjectFunctionCall::dump(const char * prefix) { #ifdef COMPILE_NEW_KVS debug("%s ThisObjectFunctionCall(%s)",prefix,m_szFunctionName.utf8().data()); - QString tmp = prefix; + TQString tmp = prefix; tmp.append(" "); m_pParams->dump(tmp.utf8().data()); #endif @@ -64,7 +64,7 @@ bool KviKvsTreeNodeThisObjectFunctionCall::evaluateReadOnlyInObjectScope(KviKvsO if(!m_pParams->evaluate(c,&l))return false; pBuffer->setNothing(); c->setDefaultReportLocation(this); - return o->callFunction(c->thisObject(),m_szFunctionName,QString::null,c,pBuffer,&l); + return o->callFunction(c->thisObject(),m_szFunctionName,TQString(),c,pBuffer,&l); #else return false; #endif diff --git a/src/kvirc/kvs/kvi_kvs_treenode_thisobjectfunctioncall.h b/src/kvirc/kvs/kvi_kvs_treenode_thisobjectfunctioncall.h index 2b245f50..b31f9ebf 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_thisobjectfunctioncall.h +++ b/src/kvirc/kvs/kvi_kvs_treenode_thisobjectfunctioncall.h @@ -37,10 +37,10 @@ class KviKvsVariant; class KVIRC_API KviKvsTreeNodeThisObjectFunctionCall : public KviKvsTreeNodeObjectFunctionCall { public: - KviKvsTreeNodeThisObjectFunctionCall(const QChar * pLocation,const QString &szFncName,KviKvsTreeNodeDataList * pParams); + KviKvsTreeNodeThisObjectFunctionCall(const TQChar * pLocation,const TQString &szFncName,KviKvsTreeNodeDataList * pParams); ~KviKvsTreeNodeThisObjectFunctionCall(); public: - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); virtual bool evaluateReadOnlyInObjectScope(KviKvsObject * o,KviKvsRunTimeContext * c,KviKvsVariant * pBuffer); }; diff --git a/src/kvirc/kvs/kvi_kvs_treenode_variable.cpp b/src/kvirc/kvs/kvi_kvs_treenode_variable.cpp index 2d0f56e6..3c6ab783 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_variable.cpp +++ b/src/kvirc/kvs/kvi_kvs_treenode_variable.cpp @@ -26,7 +26,7 @@ #include "kvi_kvs_treenode_variable.h" -KviKvsTreeNodeVariable::KviKvsTreeNodeVariable(const QChar * pLocation,const QString &szIdentifier) +KviKvsTreeNodeVariable::KviKvsTreeNodeVariable(const TQChar * pLocation,const TQString &szIdentifier) : KviKvsTreeNodeData(pLocation) { #ifdef COMPILE_NEW_KVS diff --git a/src/kvirc/kvs/kvi_kvs_treenode_variable.h b/src/kvirc/kvs/kvi_kvs_treenode_variable.h index 7368e680..a4098fc6 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_variable.h +++ b/src/kvirc/kvs/kvi_kvs_treenode_variable.h @@ -34,10 +34,10 @@ class KviKvsRunTimeContext; class KVIRC_API KviKvsTreeNodeVariable : public KviKvsTreeNodeData { public: - KviKvsTreeNodeVariable(const QChar * pLocation,const QString &szIdentifier); + KviKvsTreeNodeVariable(const TQChar * pLocation,const TQString &szIdentifier); ~KviKvsTreeNodeVariable(); protected: - QString m_szIdentifier; + TQString m_szIdentifier; protected: virtual bool isReadOnly(); virtual bool canEvaluateInObjectScope(); diff --git a/src/kvirc/kvs/kvi_kvs_treenode_voidfunctioncall.cpp b/src/kvirc/kvs/kvi_kvs_treenode_voidfunctioncall.cpp index 0a788ef4..c5215cdc 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_voidfunctioncall.cpp +++ b/src/kvirc/kvs/kvi_kvs_treenode_voidfunctioncall.cpp @@ -27,7 +27,7 @@ #include "kvi_kvs_treenode_voidfunctioncall.h" #include "kvi_kvs_runtimecontext.h" -KviKvsTreeNodeVoidFunctionCall::KviKvsTreeNodeVoidFunctionCall(const QChar * pLocation,KviKvsTreeNodeFunctionCall * r) +KviKvsTreeNodeVoidFunctionCall::KviKvsTreeNodeVoidFunctionCall(const TQChar * pLocation,KviKvsTreeNodeFunctionCall * r) : KviKvsTreeNodeInstruction(pLocation) { #ifdef COMPILE_NEW_KVS @@ -42,7 +42,7 @@ KviKvsTreeNodeVoidFunctionCall::~KviKvsTreeNodeVoidFunctionCall() #endif } -void KviKvsTreeNodeVoidFunctionCall::contextDescription(QString &szBuffer) +void KviKvsTreeNodeVoidFunctionCall::contextDescription(TQString &szBuffer) { #ifdef COMPILE_NEW_KVS szBuffer = "Void Function Call"; @@ -53,7 +53,7 @@ void KviKvsTreeNodeVoidFunctionCall::dump(const char * prefix) { #ifdef COMPILE_NEW_KVS debug("%s VoidFunctionCall",prefix); - QString tmp = prefix; + TQString tmp = prefix; tmp.append(" "); m_pFunctionCall->dump(tmp.utf8().data()); #endif diff --git a/src/kvirc/kvs/kvi_kvs_treenode_voidfunctioncall.h b/src/kvirc/kvs/kvi_kvs_treenode_voidfunctioncall.h index 13b08ba4..584034d0 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_voidfunctioncall.h +++ b/src/kvirc/kvs/kvi_kvs_treenode_voidfunctioncall.h @@ -34,12 +34,12 @@ class KviKvsRunTimeContext; class KVIRC_API KviKvsTreeNodeVoidFunctionCall : public KviKvsTreeNodeInstruction { public: - KviKvsTreeNodeVoidFunctionCall(const QChar * pLocation,KviKvsTreeNodeFunctionCall * r); + KviKvsTreeNodeVoidFunctionCall(const TQChar * pLocation,KviKvsTreeNodeFunctionCall * r); ~KviKvsTreeNodeVoidFunctionCall(); protected: KviKvsTreeNodeFunctionCall * m_pFunctionCall; // may be scope operator or direct function call public: - virtual void contextDescription(QString &szBuffer); + virtual void contextDescription(TQString &szBuffer); virtual void dump(const char * prefix); virtual bool execute(KviKvsRunTimeContext * c); }; diff --git a/src/kvirc/kvs/kvi_kvs_useraction.cpp b/src/kvirc/kvs/kvi_kvs_useraction.cpp index 47a342a3..01ad59ec 100644 --- a/src/kvirc/kvs/kvi_kvs_useraction.cpp +++ b/src/kvirc/kvs/kvi_kvs_useraction.cpp @@ -33,24 +33,24 @@ #include "kvi_window.h" #include "kvi_cmdformatter.h" -KviKvsUserAction::KviKvsUserAction(QObject * pParent, - const QString &szName, - const QString &szScriptCode, - const QString &szVisibleNameCode, - const QString &szDescriptionCode, - const QString &szCategory, - const QString &szBigIcon, - const QString &szSmallIcon, +KviKvsUserAction::KviKvsUserAction(TQObject * pParent, + const TQString &szName, + const TQString &szScriptCode, + const TQString &szVisibleNameCode, + const TQString &szDescriptionCode, + const TQString &szCategory, + const TQString &szBigIcon, + const TQString &szSmallIcon, unsigned int uFlags, - const QString &szKeySequence) + const TQString &szKeySequence) : KviKvsAction(pParent,szName,szScriptCode,szVisibleNameCode,szDescriptionCode,0,szBigIcon,0,uFlags,szKeySequence) { m_szSmallIcon = szSmallIcon; - QString szKvsName = "action::"; + TQString szKvsName = "action::"; szKvsName += szName; - QString szTmp = szKvsName; + TQString szTmp = szKvsName; szTmp += "::description"; m_pDescriptionScript = new KviKvsScript(szTmp,szDescriptionCode,KviKvsScript::Parameter); @@ -63,8 +63,8 @@ KviKvsUserAction::KviKvsUserAction(QObject * pParent, } -KviKvsUserAction::KviKvsUserAction(QObject * pParent) - : KviKvsAction(pParent,QString::null,QString::null,QString::null,QString::null) +KviKvsUserAction::KviKvsUserAction(TQObject * pParent) + : KviKvsAction(pParent,TQString(),TQString(),TQString(),TQString()) { // needs loading! m_pDescriptionScript = 0; @@ -77,36 +77,36 @@ KviKvsUserAction::~KviKvsUserAction() if(m_pVisibleNameScript)delete m_pVisibleNameScript; } -KviKvsUserAction * KviKvsUserAction::createInstance(QObject * pParent, - const QString &szName, - const QString &szScriptCode, - const QString &szVisibleNameCode, - const QString &szDescriptionCode, - const QString &szCategory, - const QString &szBigIcon, - const QString &szSmallIcon, +KviKvsUserAction * KviKvsUserAction::createInstance(TQObject * pParent, + const TQString &szName, + const TQString &szScriptCode, + const TQString &szVisibleNameCode, + const TQString &szDescriptionCode, + const TQString &szCategory, + const TQString &szBigIcon, + const TQString &szSmallIcon, unsigned int uFlags, - const QString &szKeySequence) + const TQString &szKeySequence) { return new KviKvsUserAction(pParent,szName,szScriptCode,szVisibleNameCode,szDescriptionCode,szCategory,szBigIcon,szSmallIcon,uFlags,szKeySequence); } -void KviKvsUserAction::exportToKvs(QString &szBuffer) +void KviKvsUserAction::exportToKvs(TQString &szBuffer) { exportToKvs(szBuffer,m_szName,scriptCode(),visibleNameCode(),descriptionCode(),m_szCategory,m_szBigIcon,m_szSmallIcon,m_uFlags,m_szKeySequence); } -void KviKvsUserAction::exportToKvs(QString &szBuffer, - const QString &szName, - const QString &szScriptCode, - const QString &szVisibleName, - const QString &szDescription, - const QString &szCategory, - const QString &szBigIcon, - const QString &szSmallIcon, +void KviKvsUserAction::exportToKvs(TQString &szBuffer, + const TQString &szName, + const TQString &szScriptCode, + const TQString &szVisibleName, + const TQString &szDescription, + const TQString &szCategory, + const TQString &szBigIcon, + const TQString &szSmallIcon, unsigned int uFlags, - const QString &szKeySequence) + const TQString &szKeySequence) { szBuffer += "action.create"; if(uFlags & NeedsContext) @@ -120,7 +120,7 @@ void KviKvsUserAction::exportToKvs(QString &szBuffer, } if(uFlags & InternalWindowMask) { - QString szWins; + TQString szWins; if(uFlags & WindowConsole)szWins += "x"; if(uFlags & WindowChannel)szWins += "c"; if(uFlags & WindowQuery)szWins += "q"; @@ -147,24 +147,24 @@ void KviKvsUserAction::exportToKvs(QString &szBuffer, szBuffer += " (\""; szBuffer += szName; szBuffer += "\","; - QString tmp = szVisibleName; - if(tmp.contains('$')) + TQString tmp = szVisibleName; + if(tmp.tqcontains('$')) { szBuffer += tmp; szBuffer += ","; } else { - tmp.replace("\"","\\\""); + tmp.tqreplace("\"","\\\""); szBuffer += "\""; szBuffer += tmp; szBuffer += "\","; } tmp = szDescription; - if(tmp.contains('$')) + if(tmp.tqcontains('$')) { szBuffer += tmp; szBuffer += ",\""; } else { - tmp.replace("\"","\\\""); + tmp.tqreplace("\"","\\\""); szBuffer += "\""; szBuffer += tmp; szBuffer += "\",\""; @@ -182,33 +182,33 @@ void KviKvsUserAction::exportToKvs(QString &szBuffer, // FIXME: Cache this stuff ?? -const QString & KviKvsUserAction::visibleName() +const TQString & KviKvsUserAction::visibleName() { if(!m_pVisibleNameScript)return m_szVisibleName; if(!m_pVisibleNameScript->run(g_pActiveWindow,0,m_szVisibleName))m_szVisibleName = m_pVisibleNameScript->code(); return m_szVisibleName; } -const QString & KviKvsUserAction::description() +const TQString & KviKvsUserAction::description() { if(!m_pDescriptionScript)return m_szDescription; if(!m_pDescriptionScript->run(g_pActiveWindow,0,m_szDescription))m_szDescription = m_pDescriptionScript->code(); return m_szDescription; } -const QString & KviKvsUserAction::visibleNameCode() +const TQString & KviKvsUserAction::visibleNameCode() { if(!m_pVisibleNameScript)return m_szVisibleName; return m_pVisibleNameScript->code(); } -const QString & KviKvsUserAction::descriptionCode() +const TQString & KviKvsUserAction::descriptionCode() { if(!m_pDescriptionScript)return m_szDescription; return m_pDescriptionScript->code(); } -QPixmap * KviKvsUserAction::smallIcon() +TQPixmap * KviKvsUserAction::smallIcon() { return g_pIconManager->getImage(m_szSmallIcon.utf8().data()); } @@ -222,18 +222,18 @@ bool KviKvsUserAction::load(KviConfig * cfg) { m_szName = cfg->group(); if(m_szName.isEmpty())return false; - m_szVisibleName = cfg->readQStringEntry("VisibleName"); + m_szVisibleName = cfg->readTQStringEntry("VisibleName"); if(m_szVisibleName.isEmpty())return false; - QString szKvsName = "action::"; + TQString szKvsName = "action::"; szKvsName += m_szName; - QString szTmp = szKvsName; + TQString szTmp = szKvsName; szTmp += "::label"; if(m_pVisibleNameScript)delete m_pVisibleNameScript; m_pVisibleNameScript = new KviKvsScript(szTmp,m_szVisibleName,KviKvsScript::Parameter); if(m_szVisibleName.isEmpty())return false; - m_szDescription = cfg->readQStringEntry("Description"); + m_szDescription = cfg->readTQStringEntry("Description"); szTmp = szKvsName; szTmp += "::description"; @@ -241,18 +241,18 @@ bool KviKvsUserAction::load(KviConfig * cfg) m_pDescriptionScript = new KviKvsScript(szTmp,m_szDescription,KviKvsScript::Parameter); - m_szBigIcon = cfg->readQStringEntry("BigIcon"); - m_szSmallIcon = cfg->readQStringEntry("SmallIcon"); - m_szKeySequence = cfg->readQStringEntry("KeySequence"); - m_szCategory = cfg->readQStringEntry("Category"); + m_szBigIcon = cfg->readTQStringEntry("BigIcon"); + m_szSmallIcon = cfg->readTQStringEntry("SmallIcon"); + m_szKeySequence = cfg->readTQStringEntry("KeySequence"); + m_szCategory = cfg->readTQStringEntry("Category"); m_pCategory = KviActionManager::instance()->category(m_szCategory); m_uFlags = cfg->readUIntEntry("Flags",0); - QString szCode = cfg->readQStringEntry("Code"); + TQString szCode = cfg->readTQStringEntry("Code"); if(szCode.isEmpty())return false; if(m_pScript)delete m_pScript; - QString tmp = KVI_KVS_ACTION_SCRIPT_NAME_PREFIX; + TQString tmp = KVI_KVS_ACTION_SCRIPT_NAME_PREFIX; tmp += m_szName; m_pScript = new KviKvsScript(tmp,szCode); diff --git a/src/kvirc/kvs/kvi_kvs_useraction.h b/src/kvirc/kvs/kvi_kvs_useraction.h index 2edd0337..7d1cf59c 100644 --- a/src/kvirc/kvs/kvi_kvs_useraction.h +++ b/src/kvirc/kvs/kvi_kvs_useraction.h @@ -34,38 +34,39 @@ class KVIRC_API KviKvsUserAction : public KviKvsAction { friend class KviActionManager; Q_OBJECT + TQ_OBJECT public: - KviKvsUserAction(QObject * pParent, - const QString &szName, - const QString &szScriptCode, - const QString &szVisibleNameCode, - const QString &szDescriptionCode, - const QString &szCategory, - const QString &szBigIcon, - const QString &szSmallIcon, + KviKvsUserAction(TQObject * pParent, + const TQString &szName, + const TQString &szScriptCode, + const TQString &szVisibleNameCode, + const TQString &szDescriptionCode, + const TQString &szCategory, + const TQString &szBigIcon, + const TQString &szSmallIcon, unsigned int uFlags, - const QString &szKeySequence = QString::null); - KviKvsUserAction(QObject * pParent); + const TQString &szKeySequence = TQString()); + KviKvsUserAction(TQObject * pParent); ~KviKvsUserAction(); // Static allocator function. // This MUST be used by the modules to allocate action structures // instead of the new operator. // See kvi_heapobject.cpp for an explaination. - static KviKvsUserAction * createInstance(QObject * pParent, - const QString &szName, - const QString &szScriptCode, - const QString &szVisibleNameCode, - const QString &szDescriptionCode, - const QString &szCategory, - const QString &szBigIcon, - const QString &szSmallIcon, + static KviKvsUserAction * createInstance(TQObject * pParent, + const TQString &szName, + const TQString &szScriptCode, + const TQString &szVisibleNameCode, + const TQString &szDescriptionCode, + const TQString &szCategory, + const TQString &szBigIcon, + const TQString &szSmallIcon, unsigned int uFlags, - const QString &szKeySequence = QString::null); + const TQString &szKeySequence = TQString()); void suicide() { delete this; }; protected: - QString m_szSmallIcon; - QString m_szCategory; + TQString m_szSmallIcon; + TQString m_szCategory; KviKvsScript * m_pDescriptionScript; KviKvsScript * m_pVisibleNameScript; protected: @@ -73,24 +74,24 @@ protected: bool load(KviConfig * cfg); void save(KviConfig * cfg); public: - virtual const QString & visibleName(); - virtual const QString & description(); - const QString & visibleNameCode(); - const QString & descriptionCode(); - virtual QPixmap * smallIcon(); - const QString & category(){ return m_szCategory; }; - const QString & smallIconString(){ return m_szSmallIcon; }; - static void exportToKvs(QString &szBuffer, - const QString &szName, - const QString &szScriptCode, - const QString &szVisibleName, - const QString &szDescription, - const QString &szCategory, - const QString &szBigIcon, - const QString &szSmallIcon, + virtual const TQString & visibleName(); + virtual const TQString & description(); + const TQString & visibleNameCode(); + const TQString & descriptionCode(); + virtual TQPixmap * smallIcon(); + const TQString & category(){ return m_szCategory; }; + const TQString & smallIconString(){ return m_szSmallIcon; }; + static void exportToKvs(TQString &szBuffer, + const TQString &szName, + const TQString &szScriptCode, + const TQString &szVisibleName, + const TQString &szDescription, + const TQString &szCategory, + const TQString &szBigIcon, + const TQString &szSmallIcon, unsigned int uFlags, - const QString &szKeySequence); - void exportToKvs(QString &szBuffer); + const TQString &szKeySequence); + void exportToKvs(TQString &szBuffer); }; diff --git a/src/kvirc/kvs/kvi_kvs_variant.cpp b/src/kvirc/kvs/kvi_kvs_variant.cpp index b21fd956..492bd262 100644 --- a/src/kvirc/kvs/kvi_kvs_variant.cpp +++ b/src/kvirc/kvs/kvi_kvs_variant.cpp @@ -36,7 +36,7 @@ KviKvsVariant::KviKvsVariant() m_pData = 0; } -KviKvsVariant::KviKvsVariant(QString * pString) +KviKvsVariant::KviKvsVariant(TQString * pString) { m_pData = new KviKvsVariantData; m_pData->m_eType = KviKvsVariantData::String; @@ -44,12 +44,12 @@ KviKvsVariant::KviKvsVariant(QString * pString) m_pData->m_u.pString = pString; } -KviKvsVariant::KviKvsVariant(const QString &szString) +KviKvsVariant::KviKvsVariant(const TQString &szString) { m_pData = new KviKvsVariantData; m_pData->m_eType = KviKvsVariantData::String; m_pData->m_uRefs = 1; - m_pData->m_u.pString = new QString(szString); + m_pData->m_u.pString = new TQString(szString); } KviKvsVariant::KviKvsVariant(const char * szString) @@ -57,7 +57,7 @@ KviKvsVariant::KviKvsVariant(const char * szString) m_pData = new KviKvsVariantData; m_pData->m_eType = KviKvsVariantData::String; m_pData->m_uRefs = 1; - m_pData->m_u.pString = new QString(QString::fromUtf8(szString)); + m_pData->m_u.pString = new TQString(TQString::fromUtf8(szString)); } @@ -167,18 +167,18 @@ KviKvsVariant::~KviKvsVariant() DETACH_CONTENTS } -void KviKvsVariant::setString(QString * pString) +void KviKvsVariant::setString(TQString * pString) { RENEW_VARIANT_DATA m_pData->m_eType = KviKvsVariantData::String; m_pData->m_u.pString = pString; } -void KviKvsVariant::setString(const QString &szString) +void KviKvsVariant::setString(const TQString &szString) { RENEW_VARIANT_DATA m_pData->m_eType = KviKvsVariantData::String; - m_pData->m_u.pString = new QString(szString); + m_pData->m_u.pString = new TQString(szString); } void KviKvsVariant::setReal(kvs_real_t dReal) @@ -272,7 +272,7 @@ bool KviKvsVariant::asBoolean() const if(m_pData->m_u.pString->isEmpty())return false; // check integer or real values bool bOk; - kvs_int_t iVal = (kvs_int_t)KviQString::toI64(*(m_pData->m_u.pString),&bOk); + kvs_int_t iVal = (kvs_int_t)KviTQString::toI64(*(m_pData->m_u.pString),&bOk); if(bOk)return iVal; kvs_real_t dVal = m_pData->m_u.pString->toDouble(&bOk); if(bOk)return (dVal != 0.0); @@ -413,7 +413,7 @@ void KviKvsVariant::castToArray(KviKvsArrayCast *c) const break; case KviKvsVariantData::Hash: { - KviPointerHashTableIterator it(*(m_pData->m_u.pHash->dict())); + KviPointerHashTableIterator it(*(m_pData->m_u.pHash->dict())); KviKvsArray * a = new KviKvsArray(); kvs_int_t idx = 0; while(KviKvsVariant * v = it.current()) @@ -451,7 +451,7 @@ void KviKvsVariant::convertToArray() break; case KviKvsVariantData::Hash: { - KviPointerHashTableIterator it(*(m_pData->m_u.pHash->dict())); + KviPointerHashTableIterator it(*(m_pData->m_u.pHash->dict())); KviKvsArray * a = new KviKvsArray(); kvs_int_t idx = 0; while(KviKvsVariant * v = it.current()) @@ -486,7 +486,7 @@ bool KviKvsVariant::asInteger(kvs_int_t &iVal) const case KviKvsVariantData::String: { bool bOk; - iVal = (kvs_int_t)KviQString::toI64(*(m_pData->m_u.pString),&bOk); + iVal = (kvs_int_t)KviTQString::toI64(*(m_pData->m_u.pString),&bOk); return bOk; } break; @@ -530,7 +530,7 @@ void KviKvsVariant::castToInteger(kvs_int_t &iVal) const case KviKvsVariantData::String: { bool bOk; - iVal = (kvs_int_t)KviQString::toI64(*(m_pData->m_u.pString),&bOk); + iVal = (kvs_int_t)KviTQString::toI64(*(m_pData->m_u.pString),&bOk); if(bOk)return; iVal = m_pData->m_u.pString->length(); } @@ -581,24 +581,24 @@ bool KviKvsVariant::asReal(kvs_real_t & dVal) const return false; } -void KviKvsVariant::asString(QString &szBuffer) const +void KviKvsVariant::asString(TQString &szBuffer) const { if(!m_pData) { - szBuffer = QString::null; + szBuffer = TQString(); return; } switch(m_pData->m_eType) { case KviKvsVariantData::String: szBuffer = *(m_pData->m_u.pString); break; - case KviKvsVariantData::Array: szBuffer = QString::null; m_pData->m_u.pArray->appendAsString(szBuffer); break; - case KviKvsVariantData::Hash: szBuffer = QString::null; m_pData->m_u.pHash->appendAsString(szBuffer); break; + case KviKvsVariantData::Array: szBuffer = TQString(); m_pData->m_u.pArray->appendAsString(szBuffer); break; + case KviKvsVariantData::Hash: szBuffer = TQString(); m_pData->m_u.pHash->appendAsString(szBuffer); break; case KviKvsVariantData::Integer: szBuffer.setNum(m_pData->m_u.iInteger); break; case KviKvsVariantData::Real: szBuffer.setNum(*(m_pData->m_u.pReal)); break; case KviKvsVariantData::Boolean: szBuffer.setNum(m_pData->m_u.bBoolean ? 1 : 0); break; case KviKvsVariantData::HObject: if(m_pData->m_u.hObject) - KviQString::sprintf(szBuffer,"object[%lx]",m_pData->m_u.hObject); + KviTQString::sprintf(szBuffer,"object[%lx]",m_pData->m_u.hObject); else szBuffer = "null-object"; break; @@ -606,7 +606,7 @@ void KviKvsVariant::asString(QString &szBuffer) const } } -void KviKvsVariant::appendAsString(QString &szBuffer) const +void KviKvsVariant::appendAsString(TQString &szBuffer) const { if(!m_pData)return; switch(m_pData->m_eType) @@ -614,9 +614,9 @@ void KviKvsVariant::appendAsString(QString &szBuffer) const case KviKvsVariantData::String: szBuffer.append(*(m_pData->m_u.pString)); break; case KviKvsVariantData::Array: m_pData->m_u.pArray->appendAsString(szBuffer); break; case KviKvsVariantData::Hash: m_pData->m_u.pHash->appendAsString(szBuffer); break; - case KviKvsVariantData::Integer: KviQString::appendNumber(szBuffer,m_pData->m_u.iInteger); break; - case KviKvsVariantData::Real: KviQString::appendNumber(szBuffer,*(m_pData->m_u.pReal)); break; - case KviKvsVariantData::Boolean: KviQString::appendNumber(szBuffer,m_pData->m_u.bBoolean ? 1 : 0); break; + case KviKvsVariantData::Integer: KviTQString::appendNumber(szBuffer,m_pData->m_u.iInteger); break; + case KviKvsVariantData::Real: KviTQString::appendNumber(szBuffer,*(m_pData->m_u.pReal)); break; + case KviKvsVariantData::Boolean: KviTQString::appendNumber(szBuffer,m_pData->m_u.bBoolean ? 1 : 0); break; case KviKvsVariantData::HObject: szBuffer.append(m_pData->m_u.hObject ? "object" : "null-object"); break; default: /* make gcc happy */ break; } @@ -671,7 +671,7 @@ void KviKvsVariant::takeFrom(KviKvsVariant &v) v.m_pData = 0; } -void KviKvsVariant::getTypeName(QString &szBuffer) const +void KviKvsVariant::getTypeName(TQString &szBuffer) const { if(!m_pData) { @@ -752,9 +752,9 @@ public: return CMP_OTHERGREATER; } // compare as strings instead - QString szString; + TQString szString; v1->asString(szString); - return -1 * KviQString::cmpCI(szString,*(v2->m_pData->m_u.pString)); + return -1 * KviTQString::cmpCI(szString,*(v2->m_pData->m_u.pString)); } static inline int compare_integer_real(const KviKvsVariant * v1,const KviKvsVariant * v2) @@ -813,9 +813,9 @@ public: return CMP_OTHERGREATER; } // compare as strings instead - QString szString; + TQString szString; v1->asString(szString); - return -1 * KviQString::cmpCI(szString,*(v2->m_pData->m_u.pString)); + return -1 * KviTQString::cmpCI(szString,*(v2->m_pData->m_u.pString)); } static inline int compare_real_boolean(const KviKvsVariant * v1,const KviKvsVariant * v2) @@ -929,21 +929,21 @@ public: } }; -void KviKvsVariant::serializeString(QString& buffer) +void KviKvsVariant::serializeString(TQString& buffer) { - buffer.replace('\\',"\\\\"); - buffer.replace('\n',"\\n"); - buffer.replace('\r',"\\r"); - buffer.replace('\b',"\\b"); - buffer.replace('\t',"\\t"); - buffer.replace('\f',"\\f"); - buffer.replace('/',"\\/"); - buffer.replace('"',"\\\""); + buffer.tqreplace('\\',"\\\\"); + buffer.tqreplace('\n',"\\n"); + buffer.tqreplace('\r',"\\r"); + buffer.tqreplace('\b',"\\b"); + buffer.tqreplace('\t',"\\t"); + buffer.tqreplace('\f',"\\f"); + buffer.tqreplace('/',"\\/"); + buffer.tqreplace('"',"\\\""); buffer.prepend('"'); buffer.append('"'); } -void KviKvsVariant::serialize(QString& result) +void KviKvsVariant::serialize(TQString& result) { switch(m_pData->m_eType) { @@ -977,9 +977,9 @@ void KviKvsVariant::serialize(QString& result) } } -KviKvsVariant* KviKvsVariant::unserializeTrue(const QChar** aux) +KviKvsVariant* KviKvsVariant::unserializeTrue(const TQChar** aux) { - if(KviQString::equalCIN(QString("true"),*aux,4)) + if(KviTQString::equalCIN(TQString("true"),*aux,4)) { (*aux)+=4; return new KviKvsVariant(true); @@ -987,9 +987,9 @@ KviKvsVariant* KviKvsVariant::unserializeTrue(const QChar** aux) return 0; } -KviKvsVariant* KviKvsVariant::unserializeFalse(const QChar** aux) +KviKvsVariant* KviKvsVariant::unserializeFalse(const TQChar** aux) { - if(KviQString::equalCIN(QString("false"),*aux,5)) + if(KviTQString::equalCIN(TQString("false"),*aux,5)) { (*aux)+=5; return new KviKvsVariant(false); @@ -997,9 +997,9 @@ KviKvsVariant* KviKvsVariant::unserializeFalse(const QChar** aux) return 0; } -KviKvsVariant* KviKvsVariant::unserializeNull(const QChar** aux) +KviKvsVariant* KviKvsVariant::unserializeNull(const TQChar** aux) { - if(KviQString::equalCIN(QString("null"),*aux,4)) + if(KviTQString::equalCIN(TQString("null"),*aux,4)) { (*aux)+=4; return new KviKvsVariant(); @@ -1007,10 +1007,10 @@ KviKvsVariant* KviKvsVariant::unserializeNull(const QChar** aux) return 0; } -KviKvsVariant* KviKvsVariant::unserializeRealOrInteger(const QChar** aux) +KviKvsVariant* KviKvsVariant::unserializeRealOrInteger(const TQChar** aux) { - QString data; - if((*aux)->unicode() == '-') + TQString data; + if((*aux)->tqunicode() == '-') { data.append('-'); (*aux)++; @@ -1024,16 +1024,16 @@ KviKvsVariant* KviKvsVariant::unserializeRealOrInteger(const QChar** aux) data.append(**aux); (*aux)++; } - if((*aux)->unicode()=='.') + if((*aux)->tqunicode()=='.') { return unserializeReal(aux,data); } return unserializeInteger(aux,data); } -KviKvsVariant* KviKvsVariant::unserializeReal(const QChar** aux,QString& data) +KviKvsVariant* KviKvsVariant::unserializeReal(const TQChar** aux,TQString& data) { - QString exponent; + TQString exponent; (*aux)++; //skip . data.append('.'); while((*aux)->isDigit()) @@ -1042,15 +1042,15 @@ KviKvsVariant* KviKvsVariant::unserializeReal(const QChar** aux,QString& data) (*aux)++; } - if((*aux)->unicode() == 'e' || (*aux)->unicode() == 'E') + if((*aux)->tqunicode() == 'e' || (*aux)->tqunicode() == 'E') { (*aux)++; - if((*aux)->unicode() == '-') + if((*aux)->tqunicode() == '-') { exponent.append('-'); (*aux)++; } else { - if((*aux)->unicode() == '+') + if((*aux)->tqunicode() == '+') { exponent.append('+'); (*aux)++; @@ -1074,20 +1074,20 @@ KviKvsVariant* KviKvsVariant::unserializeReal(const QChar** aux,QString& data) return new KviKvsVariant(value); } -KviKvsVariant* KviKvsVariant::unserializeInteger(const QChar** aux,QString& data) +KviKvsVariant* KviKvsVariant::unserializeInteger(const TQChar** aux,TQString& data) { - QString exponent; + TQString exponent; - if((*aux)->unicode() == 'e' || (*aux)->unicode() == 'E') + if((*aux)->tqunicode() == 'e' || (*aux)->tqunicode() == 'E') { (*aux)++; - if((*aux)->unicode() == '-') + if((*aux)->tqunicode() == '-') { exponent.append('-'); (*aux)++; } else { - if((*aux)->unicode() == '+') + if((*aux)->tqunicode() == '+') { exponent.append('+'); (*aux)++; @@ -1109,22 +1109,22 @@ KviKvsVariant* KviKvsVariant::unserializeInteger(const QChar** aux,QString& data return new KviKvsVariant(value); } -KviKvsVariant* KviKvsVariant::unserializeString(const QChar** aux) +KviKvsVariant* KviKvsVariant::unserializeString(const TQChar** aux) { - QString buffer; + TQString buffer; unserializeString(aux,buffer); return new KviKvsVariant(buffer); } -void KviKvsVariant::unserializeString(const QChar** aux,QString& data) +void KviKvsVariant::unserializeString(const TQChar** aux,TQString& data) { data=""; - QString hex; //temp var + TQString hex; //temp var //skip leading " (*aux)++; - while((*aux)->unicode()) + while((*aux)->tqunicode()) { - switch((*aux)->unicode()) + switch((*aux)->tqunicode()) { case '"': //EOF @@ -1134,7 +1134,7 @@ void KviKvsVariant::unserializeString(const QChar** aux,QString& data) case '\\': //Special (*aux)++; - switch((*aux)->unicode()) + switch((*aux)->tqunicode()) { case 't': data.append('\t'); @@ -1159,11 +1159,11 @@ void KviKvsVariant::unserializeString(const QChar** aux,QString& data) //4 hexadecmical digits pending... hex=""; (*aux)++; - for(int k=0;k<4 && (*aux)->unicode(); k++) + for(int k=0;k<4 && (*aux)->tqunicode(); k++) { if((*aux)->isDigit() || - ((*aux)->unicode() >='A' && (*aux)->unicode() <='F')|| //ABCDEF - ((*aux)->unicode() >='a' && (*aux)->unicode() <='f')) //abcdef + ((*aux)->tqunicode() >='A' && (*aux)->tqunicode() <='F')|| //ABCDEF + ((*aux)->tqunicode() >='a' && (*aux)->tqunicode() <='f')) //abcdef { hex.append(**aux); (*aux)++; @@ -1172,7 +1172,7 @@ void KviKvsVariant::unserializeString(const QChar** aux,QString& data) } } (*aux)--; - data.append(QChar(hex.toUInt(0,16))); + data.append(TQChar(hex.toUInt(0,16))); break; default: //Fallback; incorrect escape @@ -1189,10 +1189,10 @@ void KviKvsVariant::unserializeString(const QChar** aux,QString& data) } } -KviKvsVariant* KviKvsVariant::unserializeHash(const QChar** aux) +KviKvsVariant* KviKvsVariant::unserializeHash(const TQChar** aux) { KviKvsHash* pHash = new KviKvsHash(); - QString szKey; + TQString szKey; KviKvsVariant* pElement = 0; //skip leading '{' (*aux)++; @@ -1203,7 +1203,7 @@ KviKvsVariant* KviKvsVariant::unserializeHash(const QChar** aux) while((*aux)->isSpace()) (*aux)++; //waiting for starting of string - if((*aux)->unicode()!='\"') + if((*aux)->tqunicode()!='\"') { //strange characters delete pHash; @@ -1221,7 +1221,7 @@ KviKvsVariant* KviKvsVariant::unserializeHash(const QChar** aux) while((*aux)->isSpace()) (*aux)++; //waiting for name-value delimeter - if((*aux)->unicode()!=':') + if((*aux)->tqunicode()!=':') { //strange characters delete pHash; @@ -1238,7 +1238,7 @@ KviKvsVariant* KviKvsVariant::unserializeHash(const QChar** aux) i++; while((*aux)->isSpace()) (*aux)++; - switch((*aux)->unicode()) + switch((*aux)->tqunicode()) { case ',': //goto next @@ -1263,7 +1263,7 @@ KviKvsVariant* KviKvsVariant::unserializeHash(const QChar** aux) return 0; } -KviKvsVariant* KviKvsVariant::unserializeArray(const QChar** aux) +KviKvsVariant* KviKvsVariant::unserializeArray(const TQChar** aux) { KviKvsArray* pArray = new KviKvsArray(); KviKvsVariant* pElement = 0; @@ -1278,7 +1278,7 @@ KviKvsVariant* KviKvsVariant::unserializeArray(const QChar** aux) i++; while((*aux)->isSpace()) (*aux)++; - switch((*aux)->unicode()) + switch((*aux)->tqunicode()) { case ',': //goto next @@ -1303,14 +1303,14 @@ KviKvsVariant* KviKvsVariant::unserializeArray(const QChar** aux) return 0; } -KviKvsVariant* KviKvsVariant::unserialize(const QChar** aux) +KviKvsVariant* KviKvsVariant::unserialize(const TQChar** aux) { KviKvsVariant* pResult = 0; while((*aux)->isSpace()) (*aux)++; - switch((*aux)->unicode()) + switch((*aux)->tqunicode()) { case 't': //true @@ -1361,19 +1361,19 @@ KviKvsVariant* KviKvsVariant::unserialize(const QChar** aux) return pResult; } -KviKvsVariant* KviKvsVariant::unserialize(const QString& data) +KviKvsVariant* KviKvsVariant::unserialize(const TQString& data) { KviKvsVariant* pResult = 0; #ifdef COMPILE_USE_QT4 - const QChar * aux = (const QChar *)data.constData(); + const TQChar * aux = (const TQChar *)data.constData(); #else - const QChar * aux = (const QChar *)data.ucs2(); + const TQChar * aux = (const TQChar *)data.ucs2(); #endif pResult = unserialize(&aux); - if(aux->unicode()) + if(aux->tqunicode()) { //strange extra characters? if(pResult) delete pResult; @@ -1507,7 +1507,7 @@ int KviKvsVariant::compare(const KviKvsVariant * pOther,bool bPreferNumeric) con } } } - return -1 * KviQString::cmpCI(*(m_pData->m_u.pString),*(pOther->m_pData->m_u.pString)); + return -1 * KviTQString::cmpCI(*(m_pData->m_u.pString),*(pOther->m_pData->m_u.pString)); case KviKvsVariantData::Real: return -1 * KviKvsVariantComparison::compare_real_string(pOther,this); case KviKvsVariantData::Integer: diff --git a/src/kvirc/kvs/kvi_kvs_variant.h b/src/kvirc/kvs/kvi_kvs_variant.h index 99b64718..234bbc75 100644 --- a/src/kvirc/kvs/kvi_kvs_variant.h +++ b/src/kvirc/kvs/kvi_kvs_variant.h @@ -61,7 +61,7 @@ class KviKvsVariantData public: enum Type { Nothing = 0, // m_pData not initialized - String = 1, // QString (scalar) + String = 1, // TQString (scalar) Integer = 2, // long int (scalar) Real = 4, // double (scalar) Array = 8, // KviKvsArray @@ -75,7 +75,7 @@ public: union { kvs_int_t iInteger; kvs_real_t * pReal; - QString * pString; + TQString * pString; KviKvsArray * pArray; KviKvsHash * pHash; bool bBoolean; @@ -95,9 +95,9 @@ public: KviKvsVariant(kvs_real_t dReal); KviKvsVariant(kvs_real_t * pReal); KviKvsVariant(bool bBoolean); - KviKvsVariant(const QString &szString); - KviKvsVariant(const char * szString); // without this gcc chooses the conversion (const char *)->(void *) instead of (const char *)->(QString) and obviously calls the wrong constructor - KviKvsVariant(QString * pString); + KviKvsVariant(const TQString &szString); + KviKvsVariant(const char * szString); // without this gcc chooses the conversion (const char *)->(void *) instead of (const char *)->(TQString) and obviously calls the wrong constructor + KviKvsVariant(TQString * pString); KviKvsVariant(KviKvsArray * pArray); KviKvsVariant(KviKvsHash * pHash); KviKvsVariant(kvs_hobject_t hObject); @@ -111,8 +111,8 @@ public: void setReal(kvs_real_t dReal); void setReal(kvs_real_t * pReal); void setInteger(kvs_int_t iInteger); - void setString(const QString &szString); - void setString(QString * pString); + void setString(const TQString &szString); + void setString(TQString * pString); void setArray(KviKvsArray * pArray); void setHash(KviKvsHash * pHash); void setBoolean(bool bBoolean); @@ -120,7 +120,7 @@ public: void setNothing(); //void unset(){ setNothing(); }; - void getTypeName(QString &szBuffer) const; + void getTypeName(TQString &szBuffer) const; bool isNothing() const { return !m_pData; }; bool isInteger() const { return m_pData ? (m_pData->m_eType == KviKvsVariantData::Integer) : false; }; @@ -149,8 +149,8 @@ public: // evaluates to an object handle bool asHObject(kvs_hobject_t &hObject) const; // evaluates anything to a string - void asString(QString &szBuffer) const; - void appendAsString(QString &szBuffer) const; + void asString(TQString &szBuffer) const; + void appendAsString(TQString &szBuffer) const; // always evaluates to some number... void castToNumber(KviKvsNumber &n) const; @@ -163,7 +163,7 @@ public: kvs_int_t integer() const { return m_pData ? m_pData->m_u.iInteger : 0; }; kvs_real_t real() const { return m_pData ? *(m_pData->m_u.pReal) : 0.0; }; - const QString & string() const { return m_pData ? *(m_pData->m_u.pString) : KviQString::empty; }; + const TQString & string() const { return m_pData ? *(m_pData->m_u.pString) : KviTQString::empty; }; KviKvsArray * array() const { return m_pData ? m_pData->m_u.pArray : 0; }; KviKvsHash * hash() const { return m_pData ? m_pData->m_u.pHash : 0; }; bool boolean() const { return m_pData ? m_pData->m_u.bBoolean : false; }; @@ -184,21 +184,21 @@ public: void operator = (const KviKvsVariant &v){ copyFrom(v); }; //JSON serialization - void serialize(QString& result); - static void serializeString(QString& buffer); - static KviKvsVariant* unserialize(const QString& buffer); + void serialize(TQString& result); + static void serializeString(TQString& buffer); + static KviKvsVariant* unserialize(const TQString& buffer); private: - static KviKvsVariant* unserialize(const QChar** aux); - static KviKvsVariant* unserializeTrue(const QChar** aux); - static KviKvsVariant* unserializeFalse(const QChar** aux); - static KviKvsVariant* unserializeNull(const QChar** aux); - static KviKvsVariant* unserializeArray(const QChar** aux); - static KviKvsVariant* unserializeHash(const QChar** aux); - static void unserializeString(const QChar** aux,QString& buffer); - static KviKvsVariant* unserializeString(const QChar** aux); - static KviKvsVariant* unserializeRealOrInteger(const QChar** aux); - static KviKvsVariant* unserializeReal(const QChar** aux,QString& data); - static KviKvsVariant* unserializeInteger(const QChar** aux,QString& data); + static KviKvsVariant* unserialize(const TQChar** aux); + static KviKvsVariant* unserializeTrue(const TQChar** aux); + static KviKvsVariant* unserializeFalse(const TQChar** aux); + static KviKvsVariant* unserializeNull(const TQChar** aux); + static KviKvsVariant* unserializeArray(const TQChar** aux); + static KviKvsVariant* unserializeHash(const TQChar** aux); + static void unserializeString(const TQChar** aux,TQString& buffer); + static KviKvsVariant* unserializeString(const TQChar** aux); + static KviKvsVariant* unserializeRealOrInteger(const TQChar** aux); + static KviKvsVariant* unserializeReal(const TQChar** aux,TQString& data); + static KviKvsVariant* unserializeInteger(const TQChar** aux,TQString& data); }; #include "kvi_kvs_array.h" diff --git a/src/kvirc/kvs/kvi_kvs_variantlist.cpp b/src/kvirc/kvs/kvi_kvs_variantlist.cpp index 6c10a2a8..2fe00fb4 100644 --- a/src/kvirc/kvs/kvi_kvs_variantlist.cpp +++ b/src/kvirc/kvs/kvi_kvs_variantlist.cpp @@ -102,14 +102,14 @@ KviKvsVariantList::KviKvsVariantList(KviKvsVariant * v1,KviKvsVariant * v2,KviKv m_pList->append(v7); } -KviKvsVariantList::KviKvsVariantList(QString * s1) +KviKvsVariantList::KviKvsVariantList(TQString * s1) { m_pList = new KviPointerList(); m_pList->setAutoDelete(true); m_pList->append(new KviKvsVariant(s1)); } -KviKvsVariantList::KviKvsVariantList(QString * s1,QString * s2) +KviKvsVariantList::KviKvsVariantList(TQString * s1,TQString * s2) { m_pList = new KviPointerList(); m_pList->setAutoDelete(true); @@ -117,7 +117,7 @@ KviKvsVariantList::KviKvsVariantList(QString * s1,QString * s2) m_pList->append(new KviKvsVariant(s2)); } -KviKvsVariantList::KviKvsVariantList(QString * s1,QString * s2,QString * s3) +KviKvsVariantList::KviKvsVariantList(TQString * s1,TQString * s2,TQString * s3) { m_pList = new KviPointerList(); m_pList->setAutoDelete(true); @@ -126,7 +126,7 @@ KviKvsVariantList::KviKvsVariantList(QString * s1,QString * s2,QString * s3) m_pList->append(new KviKvsVariant(s3)); } -KviKvsVariantList::KviKvsVariantList(QString * s1,QString * s2,QString * s3,QString * s4) +KviKvsVariantList::KviKvsVariantList(TQString * s1,TQString * s2,TQString * s3,TQString * s4) { m_pList = new KviPointerList(); m_pList->setAutoDelete(true); @@ -136,7 +136,7 @@ KviKvsVariantList::KviKvsVariantList(QString * s1,QString * s2,QString * s3,QStr m_pList->append(new KviKvsVariant(s4)); } -KviKvsVariantList::KviKvsVariantList(QString * s1,QString * s2,QString * s3,QString * s4,QString * s5) +KviKvsVariantList::KviKvsVariantList(TQString * s1,TQString * s2,TQString * s3,TQString * s4,TQString * s5) { m_pList = new KviPointerList(); m_pList->setAutoDelete(true); @@ -147,7 +147,7 @@ KviKvsVariantList::KviKvsVariantList(QString * s1,QString * s2,QString * s3,QStr m_pList->append(new KviKvsVariant(s5)); } -KviKvsVariantList::KviKvsVariantList(QString * s1,QString * s2,QString * s3,QString * s4,QString * s5,QString * s6) +KviKvsVariantList::KviKvsVariantList(TQString * s1,TQString * s2,TQString * s3,TQString * s4,TQString * s5,TQString * s6) { m_pList = new KviPointerList(); m_pList->setAutoDelete(true); @@ -170,9 +170,9 @@ void KviKvsVariantList::setAutoDelete(bool bAutoDelete) m_pList->setAutoDelete(bAutoDelete); } -void KviKvsVariantList::allAsString(QString &szBuffer) +void KviKvsVariantList::allAsString(TQString &szBuffer) { - szBuffer = QString::null; + szBuffer = TQString(); bool bFirst = true; for(KviKvsVariant * v = first();v;v = next()) { @@ -182,7 +182,7 @@ void KviKvsVariantList::allAsString(QString &szBuffer) } } -bool KviKvsVariantList::firstAsString(QString &szBuffer) +bool KviKvsVariantList::firstAsString(TQString &szBuffer) { KviKvsVariant * v = first(); if(!v)return false; @@ -190,7 +190,7 @@ bool KviKvsVariantList::firstAsString(QString &szBuffer) return true; } -bool KviKvsVariantList::nextAsString(QString &szBuffer) +bool KviKvsVariantList::nextAsString(TQString &szBuffer) { KviKvsVariant * v = next(); if(!v)return false; diff --git a/src/kvirc/kvs/kvi_kvs_variantlist.h b/src/kvirc/kvs/kvi_kvs_variantlist.h index 09a24986..77b7a463 100644 --- a/src/kvirc/kvs/kvi_kvs_variantlist.h +++ b/src/kvirc/kvs/kvi_kvs_variantlist.h @@ -41,12 +41,12 @@ public: KviKvsVariantList(KviKvsVariant * v1,KviKvsVariant * v2,KviKvsVariant * v3,KviKvsVariant * v4,KviKvsVariant * v5); KviKvsVariantList(KviKvsVariant * v1,KviKvsVariant * v2,KviKvsVariant * v3,KviKvsVariant * v4,KviKvsVariant * v5,KviKvsVariant * v6); KviKvsVariantList(KviKvsVariant * v1,KviKvsVariant * v2,KviKvsVariant * v3,KviKvsVariant * v4,KviKvsVariant * v5,KviKvsVariant * v6,KviKvsVariant * v7); - KviKvsVariantList(QString * s1); - KviKvsVariantList(QString * s1,QString * s2); - KviKvsVariantList(QString * s1,QString * s2,QString * s3); - KviKvsVariantList(QString * s1,QString * s2,QString * s3,QString * s4); - KviKvsVariantList(QString * s1,QString * s2,QString * s3,QString * s4,QString * s5); - KviKvsVariantList(QString * s1,QString * s2,QString * s3,QString * s4,QString * s5,QString * s6); + KviKvsVariantList(TQString * s1); + KviKvsVariantList(TQString * s1,TQString * s2); + KviKvsVariantList(TQString * s1,TQString * s2,TQString * s3); + KviKvsVariantList(TQString * s1,TQString * s2,TQString * s3,TQString * s4); + KviKvsVariantList(TQString * s1,TQString * s2,TQString * s3,TQString * s4,TQString * s5); + KviKvsVariantList(TQString * s1,TQString * s2,TQString * s3,TQString * s4,TQString * s5,TQString * s6); ~KviKvsVariantList(); protected: KviPointerList * m_pList; @@ -58,7 +58,7 @@ public: void clear(){ m_pList->clear(); }; - void append(const QString &szParam){ m_pList->append(new KviKvsVariant(szParam)); }; + void append(const TQString &szParam){ m_pList->append(new KviKvsVariant(szParam)); }; void append(kvs_int_t iInteger){ m_pList->append(new KviKvsVariant(iInteger)); }; void append(kvs_real_t dReal){ m_pList->append(new KviKvsVariant(dReal)); }; void append(bool bBoolean){ m_pList->append(new KviKvsVariant(bBoolean)); }; @@ -71,11 +71,11 @@ public: void setAutoDelete(bool bAutoDelete); // this is TRUE by default - void allAsString(QString &szBuffer); + void allAsString(TQString &szBuffer); // returns true if there was a first parameter at all - bool firstAsString(QString &szBuffer); + bool firstAsString(TQString &szBuffer); // returns true if there was a next parameter at all - bool nextAsString(QString &szBuffer); + bool nextAsString(TQString &szBuffer); }; #endif //!_KVI_KVS_VARIANTLIST_H_ diff --git a/src/kvirc/kvs/moc_kvi_kvs_action.cpp b/src/kvirc/kvs/moc_kvi_kvs_action.cpp index 25fafd8c..b5cc8fa2 100644 --- a/src/kvirc/kvs/moc_kvi_kvs_action.cpp +++ b/src/kvirc/kvs/moc_kvi_kvs_action.cpp @@ -2,21 +2,21 @@ ** KviKvsAction meta object code from reading C++ file 'kvi_kvs_action.h' ** ** Created: Mon Feb 25 00:11:56 2008 -** by: The Qt MOC ($Id: qt/moc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) +** by: The TQt TQMOC ($Id: qt/tqmoc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ -#undef QT_NO_COMPAT +#undef TQT_NO_COMPAT #include "kvi_kvs_action.h" -#include -#include +#include +#include -#include -#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26) -#error "This file was generated using the moc from 3.3.8. It" -#error "cannot be used with the include files from this version of Qt." -#error "(The moc has changed too much.)" +#include +#if !defined(TQ_TQMOC_OUTPUT_REVISION) || (TQ_TQMOC_OUTPUT_REVISION != 26) +#error "This file was generated using the tqmoc from 3.3.8. It" +#error "cannot be used with the include files from this version of TQt." +#error "(The tqmoc has changed too much.)" #endif const char *KviKvsAction::className() const @@ -24,69 +24,69 @@ const char *KviKvsAction::className() const return "KviKvsAction"; } -QMetaObject *KviKvsAction::metaObj = 0; -static QMetaObjectCleanUp cleanUp_KviKvsAction( "KviKvsAction", &KviKvsAction::staticMetaObject ); +TQMetaObject *KviKvsAction::metaObj = 0; +static TQMetaObjectCleanUp cleanUp_KviKvsAction( "KviKvsAction", &KviKvsAction::staticMetaObject ); -#ifndef QT_NO_TRANSLATION -QString KviKvsAction::tr( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION +TQString KviKvsAction::tr( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviKvsAction", s, c, QApplication::DefaultCodec ); + if ( tqApp ) + return tqApp->translate( "KviKvsAction", s, c, TQApplication::DefaultCodec ); else - return QString::fromLatin1( s ); + return TQString::tqfromLatin1( s ); } -#ifndef QT_NO_TRANSLATION_UTF8 -QString KviKvsAction::trUtf8( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION_UTF8 +TQString KviKvsAction::trUtf8( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviKvsAction", s, c, QApplication::UnicodeUTF8 ); + if ( tqApp ) + return tqApp->translate( "KviKvsAction", s, c, TQApplication::UnicodeUTF8 ); else - return QString::fromUtf8( s ); + return TQString::fromUtf8( s ); } -#endif // QT_NO_TRANSLATION_UTF8 +#endif // TQT_NO_TRANSLATION_UTF8 -#endif // QT_NO_TRANSLATION +#endif // TQT_NO_TRANSLATION -QMetaObject* KviKvsAction::staticMetaObject() +TQMetaObject* KviKvsAction::staticMetaObject() { if ( metaObj ) return metaObj; - QMetaObject* parentObject = KviAction::staticMetaObject(); - metaObj = QMetaObject::new_metaobject( - "KviKvsAction", parentObject, + TQMetaObject* tqparentObject = KviAction::staticMetaObject(); + metaObj = TQMetaObject::new_metaobject( + "KviKvsAction", tqparentObject, 0, 0, 0, 0, -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES 0, 0, 0, 0, -#endif // QT_NO_PROPERTIES +#endif // TQT_NO_PROPERTIES 0, 0 ); cleanUp_KviKvsAction.setMetaObject( metaObj ); return metaObj; } -void* KviKvsAction::qt_cast( const char* clname ) +void* KviKvsAction::tqqt_cast( const char* clname ) { if ( !qstrcmp( clname, "KviKvsAction" ) ) return this; - return KviAction::qt_cast( clname ); + return KviAction::tqqt_cast( clname ); } -bool KviKvsAction::qt_invoke( int _id, QUObject* _o ) +bool KviKvsAction::qt_invoke( int _id, TQUObject* _o ) { return KviAction::qt_invoke(_id,_o); } -bool KviKvsAction::qt_emit( int _id, QUObject* _o ) +bool KviKvsAction::qt_emit( int _id, TQUObject* _o ) { return KviAction::qt_emit(_id,_o); } -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES -bool KviKvsAction::qt_property( int id, int f, QVariant* v) +bool KviKvsAction::qt_property( int id, int f, TQVariant* v) { return KviAction::qt_property( id, f, v); } -bool KviKvsAction::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; } -#endif // QT_NO_PROPERTIES +bool KviKvsAction::qt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; } +#endif // TQT_NO_PROPERTIES diff --git a/src/kvirc/kvs/moc_kvi_kvs_asyncdnsoperation.cpp b/src/kvirc/kvs/moc_kvi_kvs_asyncdnsoperation.cpp index 0c436dde..ca873971 100644 --- a/src/kvirc/kvs/moc_kvi_kvs_asyncdnsoperation.cpp +++ b/src/kvirc/kvs/moc_kvi_kvs_asyncdnsoperation.cpp @@ -2,21 +2,21 @@ ** KviKvsAsyncDnsOperation meta object code from reading C++ file 'kvi_kvs_asyncdnsoperation.h' ** ** Created: Mon Feb 25 00:11:58 2008 -** by: The Qt MOC ($Id: qt/moc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) +** by: The TQt TQMOC ($Id: qt/tqmoc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ -#undef QT_NO_COMPAT +#undef TQT_NO_COMPAT #include "kvi_kvs_asyncdnsoperation.h" -#include -#include +#include +#include -#include -#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26) -#error "This file was generated using the moc from 3.3.8. It" -#error "cannot be used with the include files from this version of Qt." -#error "(The moc has changed too much.)" +#include +#if !defined(TQ_TQMOC_OUTPUT_REVISION) || (TQ_TQMOC_OUTPUT_REVISION != 26) +#error "This file was generated using the tqmoc from 3.3.8. It" +#error "cannot be used with the include files from this version of TQt." +#error "(The tqmoc has changed too much.)" #endif const char *KviKvsAsyncDnsOperation::className() const @@ -24,67 +24,67 @@ const char *KviKvsAsyncDnsOperation::className() const return "KviKvsAsyncDnsOperation"; } -QMetaObject *KviKvsAsyncDnsOperation::metaObj = 0; -static QMetaObjectCleanUp cleanUp_KviKvsAsyncDnsOperation( "KviKvsAsyncDnsOperation", &KviKvsAsyncDnsOperation::staticMetaObject ); +TQMetaObject *KviKvsAsyncDnsOperation::metaObj = 0; +static TQMetaObjectCleanUp cleanUp_KviKvsAsyncDnsOperation( "KviKvsAsyncDnsOperation", &KviKvsAsyncDnsOperation::staticMetaObject ); -#ifndef QT_NO_TRANSLATION -QString KviKvsAsyncDnsOperation::tr( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION +TQString KviKvsAsyncDnsOperation::tr( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviKvsAsyncDnsOperation", s, c, QApplication::DefaultCodec ); + if ( tqApp ) + return tqApp->translate( "KviKvsAsyncDnsOperation", s, c, TQApplication::DefaultCodec ); else - return QString::fromLatin1( s ); + return TQString::tqfromLatin1( s ); } -#ifndef QT_NO_TRANSLATION_UTF8 -QString KviKvsAsyncDnsOperation::trUtf8( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION_UTF8 +TQString KviKvsAsyncDnsOperation::trUtf8( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviKvsAsyncDnsOperation", s, c, QApplication::UnicodeUTF8 ); + if ( tqApp ) + return tqApp->translate( "KviKvsAsyncDnsOperation", s, c, TQApplication::UnicodeUTF8 ); else - return QString::fromUtf8( s ); + return TQString::fromUtf8( s ); } -#endif // QT_NO_TRANSLATION_UTF8 +#endif // TQT_NO_TRANSLATION_UTF8 -#endif // QT_NO_TRANSLATION +#endif // TQT_NO_TRANSLATION -QMetaObject* KviKvsAsyncDnsOperation::staticMetaObject() +TQMetaObject* KviKvsAsyncDnsOperation::staticMetaObject() { if ( metaObj ) return metaObj; - QMetaObject* parentObject = KviKvsAsyncOperation::staticMetaObject(); - static const QUParameter param_slot_0[] = { - { 0, &static_QUType_ptr, "KviDns", QUParameter::In } + TQMetaObject* tqparentObject = KviKvsAsyncOperation::staticMetaObject(); + static const TQUParameter param_slot_0[] = { + { 0, &static_TQUType_ptr, "KviDns", TQUParameter::In } }; - static const QUMethod slot_0 = {"lookupTerminated", 1, param_slot_0 }; - static const QUMethod slot_1 = {"dnsStartFailed", 0, 0 }; - static const QMetaData slot_tbl[] = { - { "lookupTerminated(KviDns*)", &slot_0, QMetaData::Protected }, - { "dnsStartFailed()", &slot_1, QMetaData::Protected } + static const TQUMethod slot_0 = {"lookupTerminated", 1, param_slot_0 }; + static const TQUMethod slot_1 = {"dnsStartFailed", 0, 0 }; + static const TQMetaData slot_tbl[] = { + { "lookupTerminated(KviDns*)", &slot_0, TQMetaData::Protected }, + { "dnsStartFailed()", &slot_1, TQMetaData::Protected } }; - metaObj = QMetaObject::new_metaobject( - "KviKvsAsyncDnsOperation", parentObject, + metaObj = TQMetaObject::new_metaobject( + "KviKvsAsyncDnsOperation", tqparentObject, slot_tbl, 2, 0, 0, -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES 0, 0, 0, 0, -#endif // QT_NO_PROPERTIES +#endif // TQT_NO_PROPERTIES 0, 0 ); cleanUp_KviKvsAsyncDnsOperation.setMetaObject( metaObj ); return metaObj; } -void* KviKvsAsyncDnsOperation::qt_cast( const char* clname ) +void* KviKvsAsyncDnsOperation::tqqt_cast( const char* clname ) { if ( !qstrcmp( clname, "KviKvsAsyncDnsOperation" ) ) return this; - return KviKvsAsyncOperation::qt_cast( clname ); + return KviKvsAsyncOperation::tqqt_cast( clname ); } -bool KviKvsAsyncDnsOperation::qt_invoke( int _id, QUObject* _o ) +bool KviKvsAsyncDnsOperation::qt_invoke( int _id, TQUObject* _o ) { switch ( _id - staticMetaObject()->slotOffset() ) { - case 0: lookupTerminated((KviDns*)static_QUType_ptr.get(_o+1)); break; + case 0: lookupTerminated((KviDns*)static_TQUType_ptr.get(_o+1)); break; case 1: dnsStartFailed(); break; default: return KviKvsAsyncOperation::qt_invoke( _id, _o ); @@ -92,16 +92,16 @@ bool KviKvsAsyncDnsOperation::qt_invoke( int _id, QUObject* _o ) return TRUE; } -bool KviKvsAsyncDnsOperation::qt_emit( int _id, QUObject* _o ) +bool KviKvsAsyncDnsOperation::qt_emit( int _id, TQUObject* _o ) { return KviKvsAsyncOperation::qt_emit(_id,_o); } -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES -bool KviKvsAsyncDnsOperation::qt_property( int id, int f, QVariant* v) +bool KviKvsAsyncDnsOperation::qt_property( int id, int f, TQVariant* v) { return KviKvsAsyncOperation::qt_property( id, f, v); } -bool KviKvsAsyncDnsOperation::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; } -#endif // QT_NO_PROPERTIES +bool KviKvsAsyncDnsOperation::qt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; } +#endif // TQT_NO_PROPERTIES diff --git a/src/kvirc/kvs/moc_kvi_kvs_asyncoperation.cpp b/src/kvirc/kvs/moc_kvi_kvs_asyncoperation.cpp index 72b75b28..256ec053 100644 --- a/src/kvirc/kvs/moc_kvi_kvs_asyncoperation.cpp +++ b/src/kvirc/kvs/moc_kvi_kvs_asyncoperation.cpp @@ -2,21 +2,21 @@ ** KviKvsAsyncOperation meta object code from reading C++ file 'kvi_kvs_asyncoperation.h' ** ** Created: Mon Feb 25 00:12:00 2008 -** by: The Qt MOC ($Id: qt/moc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) +** by: The TQt TQMOC ($Id: qt/tqmoc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ -#undef QT_NO_COMPAT +#undef TQT_NO_COMPAT #include "kvi_kvs_asyncoperation.h" -#include -#include +#include +#include -#include -#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26) -#error "This file was generated using the moc from 3.3.8. It" -#error "cannot be used with the include files from this version of Qt." -#error "(The moc has changed too much.)" +#include +#if !defined(TQ_TQMOC_OUTPUT_REVISION) || (TQ_TQMOC_OUTPUT_REVISION != 26) +#error "This file was generated using the tqmoc from 3.3.8. It" +#error "cannot be used with the include files from this version of TQt." +#error "(The tqmoc has changed too much.)" #endif const char *KviKvsAsyncOperation::className() const @@ -24,69 +24,69 @@ const char *KviKvsAsyncOperation::className() const return "KviKvsAsyncOperation"; } -QMetaObject *KviKvsAsyncOperation::metaObj = 0; -static QMetaObjectCleanUp cleanUp_KviKvsAsyncOperation( "KviKvsAsyncOperation", &KviKvsAsyncOperation::staticMetaObject ); +TQMetaObject *KviKvsAsyncOperation::metaObj = 0; +static TQMetaObjectCleanUp cleanUp_KviKvsAsyncOperation( "KviKvsAsyncOperation", &KviKvsAsyncOperation::staticMetaObject ); -#ifndef QT_NO_TRANSLATION -QString KviKvsAsyncOperation::tr( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION +TQString KviKvsAsyncOperation::tr( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviKvsAsyncOperation", s, c, QApplication::DefaultCodec ); + if ( tqApp ) + return tqApp->translate( "KviKvsAsyncOperation", s, c, TQApplication::DefaultCodec ); else - return QString::fromLatin1( s ); + return TQString::tqfromLatin1( s ); } -#ifndef QT_NO_TRANSLATION_UTF8 -QString KviKvsAsyncOperation::trUtf8( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION_UTF8 +TQString KviKvsAsyncOperation::trUtf8( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviKvsAsyncOperation", s, c, QApplication::UnicodeUTF8 ); + if ( tqApp ) + return tqApp->translate( "KviKvsAsyncOperation", s, c, TQApplication::UnicodeUTF8 ); else - return QString::fromUtf8( s ); + return TQString::fromUtf8( s ); } -#endif // QT_NO_TRANSLATION_UTF8 +#endif // TQT_NO_TRANSLATION_UTF8 -#endif // QT_NO_TRANSLATION +#endif // TQT_NO_TRANSLATION -QMetaObject* KviKvsAsyncOperation::staticMetaObject() +TQMetaObject* KviKvsAsyncOperation::staticMetaObject() { if ( metaObj ) return metaObj; - QMetaObject* parentObject = QObject::staticMetaObject(); - metaObj = QMetaObject::new_metaobject( - "KviKvsAsyncOperation", parentObject, + TQMetaObject* tqparentObject = TQObject::staticMetaObject(); + metaObj = TQMetaObject::new_metaobject( + "KviKvsAsyncOperation", tqparentObject, 0, 0, 0, 0, -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES 0, 0, 0, 0, -#endif // QT_NO_PROPERTIES +#endif // TQT_NO_PROPERTIES 0, 0 ); cleanUp_KviKvsAsyncOperation.setMetaObject( metaObj ); return metaObj; } -void* KviKvsAsyncOperation::qt_cast( const char* clname ) +void* KviKvsAsyncOperation::tqqt_cast( const char* clname ) { if ( !qstrcmp( clname, "KviKvsAsyncOperation" ) ) return this; - return QObject::qt_cast( clname ); + return TQObject::tqqt_cast( clname ); } -bool KviKvsAsyncOperation::qt_invoke( int _id, QUObject* _o ) +bool KviKvsAsyncOperation::qt_invoke( int _id, TQUObject* _o ) { - return QObject::qt_invoke(_id,_o); + return TQObject::qt_invoke(_id,_o); } -bool KviKvsAsyncOperation::qt_emit( int _id, QUObject* _o ) +bool KviKvsAsyncOperation::qt_emit( int _id, TQUObject* _o ) { - return QObject::qt_emit(_id,_o); + return TQObject::qt_emit(_id,_o); } -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES -bool KviKvsAsyncOperation::qt_property( int id, int f, QVariant* v) +bool KviKvsAsyncOperation::qt_property( int id, int f, TQVariant* v) { - return QObject::qt_property( id, f, v); + return TQObject::qt_property( id, f, v); } -bool KviKvsAsyncOperation::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; } -#endif // QT_NO_PROPERTIES +bool KviKvsAsyncOperation::qt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; } +#endif // TQT_NO_PROPERTIES diff --git a/src/kvirc/kvs/moc_kvi_kvs_dnsmanager.cpp b/src/kvirc/kvs/moc_kvi_kvs_dnsmanager.cpp index 27284122..00b19908 100644 --- a/src/kvirc/kvs/moc_kvi_kvs_dnsmanager.cpp +++ b/src/kvirc/kvs/moc_kvi_kvs_dnsmanager.cpp @@ -2,21 +2,21 @@ ** KviKvsDnsManager meta object code from reading C++ file 'kvi_kvs_dnsmanager.h' ** ** Created: Mon Feb 25 00:12:02 2008 -** by: The Qt MOC ($Id: qt/moc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) +** by: The TQt TQMOC ($Id: qt/tqmoc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ -#undef QT_NO_COMPAT +#undef TQT_NO_COMPAT #include "kvi_kvs_dnsmanager.h" -#include -#include +#include +#include -#include -#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26) -#error "This file was generated using the moc from 3.3.8. It" -#error "cannot be used with the include files from this version of Qt." -#error "(The moc has changed too much.)" +#include +#if !defined(TQ_TQMOC_OUTPUT_REVISION) || (TQ_TQMOC_OUTPUT_REVISION != 26) +#error "This file was generated using the tqmoc from 3.3.8. It" +#error "cannot be used with the include files from this version of TQt." +#error "(The tqmoc has changed too much.)" #endif const char *KviKvsDnsManager::className() const @@ -24,81 +24,81 @@ const char *KviKvsDnsManager::className() const return "KviKvsDnsManager"; } -QMetaObject *KviKvsDnsManager::metaObj = 0; -static QMetaObjectCleanUp cleanUp_KviKvsDnsManager( "KviKvsDnsManager", &KviKvsDnsManager::staticMetaObject ); +TQMetaObject *KviKvsDnsManager::metaObj = 0; +static TQMetaObjectCleanUp cleanUp_KviKvsDnsManager( "KviKvsDnsManager", &KviKvsDnsManager::staticMetaObject ); -#ifndef QT_NO_TRANSLATION -QString KviKvsDnsManager::tr( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION +TQString KviKvsDnsManager::tr( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviKvsDnsManager", s, c, QApplication::DefaultCodec ); + if ( tqApp ) + return tqApp->translate( "KviKvsDnsManager", s, c, TQApplication::DefaultCodec ); else - return QString::fromLatin1( s ); + return TQString::tqfromLatin1( s ); } -#ifndef QT_NO_TRANSLATION_UTF8 -QString KviKvsDnsManager::trUtf8( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION_UTF8 +TQString KviKvsDnsManager::trUtf8( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviKvsDnsManager", s, c, QApplication::UnicodeUTF8 ); + if ( tqApp ) + return tqApp->translate( "KviKvsDnsManager", s, c, TQApplication::UnicodeUTF8 ); else - return QString::fromUtf8( s ); + return TQString::fromUtf8( s ); } -#endif // QT_NO_TRANSLATION_UTF8 +#endif // TQT_NO_TRANSLATION_UTF8 -#endif // QT_NO_TRANSLATION +#endif // TQT_NO_TRANSLATION -QMetaObject* KviKvsDnsManager::staticMetaObject() +TQMetaObject* KviKvsDnsManager::staticMetaObject() { if ( metaObj ) return metaObj; - QMetaObject* parentObject = QObject::staticMetaObject(); - static const QUParameter param_slot_0[] = { - { "pDns", &static_QUType_ptr, "KviDns", QUParameter::In } + TQMetaObject* tqparentObject = TQObject::staticMetaObject(); + static const TQUParameter param_slot_0[] = { + { "pDns", &static_TQUType_ptr, "KviDns", TQUParameter::In } }; - static const QUMethod slot_0 = {"dnsLookupTerminated", 1, param_slot_0 }; - static const QMetaData slot_tbl[] = { - { "dnsLookupTerminated(KviDns*)", &slot_0, QMetaData::Protected } + static const TQUMethod slot_0 = {"dnsLookupTerminated", 1, param_slot_0 }; + static const TQMetaData slot_tbl[] = { + { "dnsLookupTerminated(KviDns*)", &slot_0, TQMetaData::Protected } }; - metaObj = QMetaObject::new_metaobject( - "KviKvsDnsManager", parentObject, + metaObj = TQMetaObject::new_metaobject( + "KviKvsDnsManager", tqparentObject, slot_tbl, 1, 0, 0, -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES 0, 0, 0, 0, -#endif // QT_NO_PROPERTIES +#endif // TQT_NO_PROPERTIES 0, 0 ); cleanUp_KviKvsDnsManager.setMetaObject( metaObj ); return metaObj; } -void* KviKvsDnsManager::qt_cast( const char* clname ) +void* KviKvsDnsManager::tqqt_cast( const char* clname ) { if ( !qstrcmp( clname, "KviKvsDnsManager" ) ) return this; - return QObject::qt_cast( clname ); + return TQObject::tqqt_cast( clname ); } -bool KviKvsDnsManager::qt_invoke( int _id, QUObject* _o ) +bool KviKvsDnsManager::qt_invoke( int _id, TQUObject* _o ) { switch ( _id - staticMetaObject()->slotOffset() ) { - case 0: dnsLookupTerminated((KviDns*)static_QUType_ptr.get(_o+1)); break; + case 0: dnsLookupTerminated((KviDns*)static_TQUType_ptr.get(_o+1)); break; default: - return QObject::qt_invoke( _id, _o ); + return TQObject::qt_invoke( _id, _o ); } return TRUE; } -bool KviKvsDnsManager::qt_emit( int _id, QUObject* _o ) +bool KviKvsDnsManager::qt_emit( int _id, TQUObject* _o ) { - return QObject::qt_emit(_id,_o); + return TQObject::qt_emit(_id,_o); } -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES -bool KviKvsDnsManager::qt_property( int id, int f, QVariant* v) +bool KviKvsDnsManager::qt_property( int id, int f, TQVariant* v) { - return QObject::qt_property( id, f, v); + return TQObject::qt_property( id, f, v); } -bool KviKvsDnsManager::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; } -#endif // QT_NO_PROPERTIES +bool KviKvsDnsManager::qt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; } +#endif // TQT_NO_PROPERTIES diff --git a/src/kvirc/kvs/moc_kvi_kvs_object.cpp b/src/kvirc/kvs/moc_kvi_kvs_object.cpp index a578edcf..e43ea651 100644 --- a/src/kvirc/kvs/moc_kvi_kvs_object.cpp +++ b/src/kvirc/kvs/moc_kvi_kvs_object.cpp @@ -2,21 +2,21 @@ ** KviKvsObject meta object code from reading C++ file 'kvi_kvs_object.h' ** ** Created: Mon Feb 25 00:12:06 2008 -** by: The Qt MOC ($Id: qt/moc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) +** by: The TQt TQMOC ($Id: qt/tqmoc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ -#undef QT_NO_COMPAT +#undef TQT_NO_COMPAT #include "kvi_kvs_object.h" -#include -#include +#include +#include -#include -#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26) -#error "This file was generated using the moc from 3.3.8. It" -#error "cannot be used with the include files from this version of Qt." -#error "(The moc has changed too much.)" +#include +#if !defined(TQ_TQMOC_OUTPUT_REVISION) || (TQ_TQMOC_OUTPUT_REVISION != 26) +#error "This file was generated using the tqmoc from 3.3.8. It" +#error "cannot be used with the include files from this version of TQt." +#error "(The tqmoc has changed too much.)" #endif const char *KviKvsObject::className() const @@ -24,81 +24,81 @@ const char *KviKvsObject::className() const return "KviKvsObject"; } -QMetaObject *KviKvsObject::metaObj = 0; -static QMetaObjectCleanUp cleanUp_KviKvsObject( "KviKvsObject", &KviKvsObject::staticMetaObject ); +TQMetaObject *KviKvsObject::metaObj = 0; +static TQMetaObjectCleanUp cleanUp_KviKvsObject( "KviKvsObject", &KviKvsObject::staticMetaObject ); -#ifndef QT_NO_TRANSLATION -QString KviKvsObject::tr( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION +TQString KviKvsObject::tr( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviKvsObject", s, c, QApplication::DefaultCodec ); + if ( tqApp ) + return tqApp->translate( "KviKvsObject", s, c, TQApplication::DefaultCodec ); else - return QString::fromLatin1( s ); + return TQString::tqfromLatin1( s ); } -#ifndef QT_NO_TRANSLATION_UTF8 -QString KviKvsObject::trUtf8( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION_UTF8 +TQString KviKvsObject::trUtf8( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviKvsObject", s, c, QApplication::UnicodeUTF8 ); + if ( tqApp ) + return tqApp->translate( "KviKvsObject", s, c, TQApplication::UnicodeUTF8 ); else - return QString::fromUtf8( s ); + return TQString::fromUtf8( s ); } -#endif // QT_NO_TRANSLATION_UTF8 +#endif // TQT_NO_TRANSLATION_UTF8 -#endif // QT_NO_TRANSLATION +#endif // TQT_NO_TRANSLATION -QMetaObject* KviKvsObject::staticMetaObject() +TQMetaObject* KviKvsObject::staticMetaObject() { if ( metaObj ) return metaObj; - QMetaObject* parentObject = QObject::staticMetaObject(); - static const QUMethod slot_0 = {"delayedDie", 0, 0 }; - static const QUMethod slot_1 = {"objectDestroyed", 0, 0 }; - static const QMetaData slot_tbl[] = { - { "delayedDie()", &slot_0, QMetaData::Protected }, - { "objectDestroyed()", &slot_1, QMetaData::Protected } + TQMetaObject* tqparentObject = TQObject::staticMetaObject(); + static const TQUMethod slot_0 = {"delayedDie", 0, 0 }; + static const TQUMethod slot_1 = {"objectDestroyed", 0, 0 }; + static const TQMetaData slot_tbl[] = { + { "delayedDie()", &slot_0, TQMetaData::Protected }, + { "objectDestroyed()", &slot_1, TQMetaData::Protected } }; - metaObj = QMetaObject::new_metaobject( - "KviKvsObject", parentObject, + metaObj = TQMetaObject::new_metaobject( + "KviKvsObject", tqparentObject, slot_tbl, 2, 0, 0, -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES 0, 0, 0, 0, -#endif // QT_NO_PROPERTIES +#endif // TQT_NO_PROPERTIES 0, 0 ); cleanUp_KviKvsObject.setMetaObject( metaObj ); return metaObj; } -void* KviKvsObject::qt_cast( const char* clname ) +void* KviKvsObject::tqqt_cast( const char* clname ) { if ( !qstrcmp( clname, "KviKvsObject" ) ) return this; - return QObject::qt_cast( clname ); + return TQObject::tqqt_cast( clname ); } -bool KviKvsObject::qt_invoke( int _id, QUObject* _o ) +bool KviKvsObject::qt_invoke( int _id, TQUObject* _o ) { switch ( _id - staticMetaObject()->slotOffset() ) { case 0: delayedDie(); break; case 1: objectDestroyed(); break; default: - return QObject::qt_invoke( _id, _o ); + return TQObject::qt_invoke( _id, _o ); } return TRUE; } -bool KviKvsObject::qt_emit( int _id, QUObject* _o ) +bool KviKvsObject::qt_emit( int _id, TQUObject* _o ) { - return QObject::qt_emit(_id,_o); + return TQObject::qt_emit(_id,_o); } -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES -bool KviKvsObject::qt_property( int id, int f, QVariant* v) +bool KviKvsObject::qt_property( int id, int f, TQVariant* v) { - return QObject::qt_property( id, f, v); + return TQObject::qt_property( id, f, v); } -bool KviKvsObject::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; } -#endif // QT_NO_PROPERTIES +bool KviKvsObject::qt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; } +#endif // TQT_NO_PROPERTIES diff --git a/src/kvirc/kvs/moc_kvi_kvs_popupmenu.cpp b/src/kvirc/kvs/moc_kvi_kvs_popupmenu.cpp index d69f7227..6fd559b6 100644 --- a/src/kvirc/kvs/moc_kvi_kvs_popupmenu.cpp +++ b/src/kvirc/kvs/moc_kvi_kvs_popupmenu.cpp @@ -2,21 +2,21 @@ ** KviKvsPopupMenuItemLabelHelper meta object code from reading C++ file 'kvi_kvs_popupmenu.h' ** ** Created: Mon Feb 25 00:12:08 2008 -** by: The Qt MOC ($Id: qt/moc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) +** by: The TQt TQMOC ($Id: qt/tqmoc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ -#undef QT_NO_COMPAT +#undef TQT_NO_COMPAT #include "kvi_kvs_popupmenu.h" -#include -#include - -#include -#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26) -#error "This file was generated using the moc from 3.3.8. It" -#error "cannot be used with the include files from this version of Qt." -#error "(The moc has changed too much.)" +#include +#include + +#include +#if !defined(TQ_TQMOC_OUTPUT_REVISION) || (TQ_TQMOC_OUTPUT_REVISION != 26) +#error "This file was generated using the tqmoc from 3.3.8. It" +#error "cannot be used with the include files from this version of TQt." +#error "(The tqmoc has changed too much.)" #endif const char *KviKvsPopupMenuItemLabelHelper::className() const @@ -24,81 +24,81 @@ const char *KviKvsPopupMenuItemLabelHelper::className() const return "KviKvsPopupMenuItemLabelHelper"; } -QMetaObject *KviKvsPopupMenuItemLabelHelper::metaObj = 0; -static QMetaObjectCleanUp cleanUp_KviKvsPopupMenuItemLabelHelper( "KviKvsPopupMenuItemLabelHelper", &KviKvsPopupMenuItemLabelHelper::staticMetaObject ); +TQMetaObject *KviKvsPopupMenuItemLabelHelper::metaObj = 0; +static TQMetaObjectCleanUp cleanUp_KviKvsPopupMenuItemLabelHelper( "KviKvsPopupMenuItemLabelHelper", &KviKvsPopupMenuItemLabelHelper::staticMetaObject ); -#ifndef QT_NO_TRANSLATION -QString KviKvsPopupMenuItemLabelHelper::tr( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION +TQString KviKvsPopupMenuItemLabelHelper::tr( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviKvsPopupMenuItemLabelHelper", s, c, QApplication::DefaultCodec ); + if ( tqApp ) + return tqApp->translate( "KviKvsPopupMenuItemLabelHelper", s, c, TQApplication::DefaultCodec ); else - return QString::fromLatin1( s ); + return TQString::tqfromLatin1( s ); } -#ifndef QT_NO_TRANSLATION_UTF8 -QString KviKvsPopupMenuItemLabelHelper::trUtf8( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION_UTF8 +TQString KviKvsPopupMenuItemLabelHelper::trUtf8( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviKvsPopupMenuItemLabelHelper", s, c, QApplication::UnicodeUTF8 ); + if ( tqApp ) + return tqApp->translate( "KviKvsPopupMenuItemLabelHelper", s, c, TQApplication::UnicodeUTF8 ); else - return QString::fromUtf8( s ); + return TQString::fromUtf8( s ); } -#endif // QT_NO_TRANSLATION_UTF8 +#endif // TQT_NO_TRANSLATION_UTF8 -#endif // QT_NO_TRANSLATION +#endif // TQT_NO_TRANSLATION -QMetaObject* KviKvsPopupMenuItemLabelHelper::staticMetaObject() +TQMetaObject* KviKvsPopupMenuItemLabelHelper::staticMetaObject() { if ( metaObj ) return metaObj; - QMetaObject* parentObject = QObject::staticMetaObject(); - static const QUMethod slot_0 = {"labelDestroyed", 0, 0 }; - static const QMetaData slot_tbl[] = { - { "labelDestroyed()", &slot_0, QMetaData::Protected } + TQMetaObject* tqparentObject = TQObject::staticMetaObject(); + static const TQUMethod slot_0 = {"labelDestroyed", 0, 0 }; + static const TQMetaData slot_tbl[] = { + { "labelDestroyed()", &slot_0, TQMetaData::Protected } }; - metaObj = QMetaObject::new_metaobject( - "KviKvsPopupMenuItemLabelHelper", parentObject, + metaObj = TQMetaObject::new_metaobject( + "KviKvsPopupMenuItemLabelHelper", tqparentObject, slot_tbl, 1, 0, 0, -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES 0, 0, 0, 0, -#endif // QT_NO_PROPERTIES +#endif // TQT_NO_PROPERTIES 0, 0 ); cleanUp_KviKvsPopupMenuItemLabelHelper.setMetaObject( metaObj ); return metaObj; } -void* KviKvsPopupMenuItemLabelHelper::qt_cast( const char* clname ) +void* KviKvsPopupMenuItemLabelHelper::tqqt_cast( const char* clname ) { if ( !qstrcmp( clname, "KviKvsPopupMenuItemLabelHelper" ) ) return this; - return QObject::qt_cast( clname ); + return TQObject::tqqt_cast( clname ); } -bool KviKvsPopupMenuItemLabelHelper::qt_invoke( int _id, QUObject* _o ) +bool KviKvsPopupMenuItemLabelHelper::qt_invoke( int _id, TQUObject* _o ) { switch ( _id - staticMetaObject()->slotOffset() ) { case 0: labelDestroyed(); break; default: - return QObject::qt_invoke( _id, _o ); + return TQObject::qt_invoke( _id, _o ); } return TRUE; } -bool KviKvsPopupMenuItemLabelHelper::qt_emit( int _id, QUObject* _o ) +bool KviKvsPopupMenuItemLabelHelper::qt_emit( int _id, TQUObject* _o ) { - return QObject::qt_emit(_id,_o); + return TQObject::qt_emit(_id,_o); } -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES -bool KviKvsPopupMenuItemLabelHelper::qt_property( int id, int f, QVariant* v) +bool KviKvsPopupMenuItemLabelHelper::qt_property( int id, int f, TQVariant* v) { - return QObject::qt_property( id, f, v); + return TQObject::qt_property( id, f, v); } -bool KviKvsPopupMenuItemLabelHelper::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; } -#endif // QT_NO_PROPERTIES +bool KviKvsPopupMenuItemLabelHelper::qt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; } +#endif // TQT_NO_PROPERTIES const char *KviKvsPopupMenu::className() const @@ -106,112 +106,112 @@ const char *KviKvsPopupMenu::className() const return "KviKvsPopupMenu"; } -QMetaObject *KviKvsPopupMenu::metaObj = 0; -static QMetaObjectCleanUp cleanUp_KviKvsPopupMenu( "KviKvsPopupMenu", &KviKvsPopupMenu::staticMetaObject ); +TQMetaObject *KviKvsPopupMenu::metaObj = 0; +static TQMetaObjectCleanUp cleanUp_KviKvsPopupMenu( "KviKvsPopupMenu", &KviKvsPopupMenu::staticMetaObject ); -#ifndef QT_NO_TRANSLATION -QString KviKvsPopupMenu::tr( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION +TQString KviKvsPopupMenu::tr( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviKvsPopupMenu", s, c, QApplication::DefaultCodec ); + if ( tqApp ) + return tqApp->translate( "KviKvsPopupMenu", s, c, TQApplication::DefaultCodec ); else - return QString::fromLatin1( s ); + return TQString::tqfromLatin1( s ); } -#ifndef QT_NO_TRANSLATION_UTF8 -QString KviKvsPopupMenu::trUtf8( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION_UTF8 +TQString KviKvsPopupMenu::trUtf8( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviKvsPopupMenu", s, c, QApplication::UnicodeUTF8 ); + if ( tqApp ) + return tqApp->translate( "KviKvsPopupMenu", s, c, TQApplication::UnicodeUTF8 ); else - return QString::fromUtf8( s ); + return TQString::fromUtf8( s ); } -#endif // QT_NO_TRANSLATION_UTF8 +#endif // TQT_NO_TRANSLATION_UTF8 -#endif // QT_NO_TRANSLATION +#endif // TQT_NO_TRANSLATION -QMetaObject* KviKvsPopupMenu::staticMetaObject() +TQMetaObject* KviKvsPopupMenu::staticMetaObject() { if ( metaObj ) return metaObj; - QMetaObject* parentObject = KviTalPopupMenu::staticMetaObject(); - static const QUMethod slot_0 = {"setupMenuContents", 0, 0 }; - static const QUParameter param_slot_1[] = { - { "itemId", &static_QUType_int, 0, QUParameter::In } + TQMetaObject* tqparentObject = KviTalPopupMenu::staticMetaObject(); + static const TQUMethod slot_0 = {"setupMenuContents", 0, 0 }; + static const TQUParameter param_slot_1[] = { + { "itemId", &static_TQUType_int, 0, TQUParameter::In } }; - static const QUMethod slot_1 = {"itemClicked", 1, param_slot_1 }; - static const QMetaData slot_tbl[] = { - { "setupMenuContents()", &slot_0, QMetaData::Private }, - { "itemClicked(int)", &slot_1, QMetaData::Protected } + static const TQUMethod slot_1 = {"itemClicked", 1, param_slot_1 }; + static const TQMetaData slot_tbl[] = { + { "setupMenuContents()", &slot_0, TQMetaData::Private }, + { "itemClicked(int)", &slot_1, TQMetaData::Protected } }; - static const QUParameter param_signal_0[] = { - { "it", &static_QUType_ptr, "KviKvsPopupMenuItem", QUParameter::In } + static const TQUParameter param_signal_0[] = { + { "it", &static_TQUType_ptr, "KviKvsPopupMenuItem", TQUParameter::In } }; - static const QUMethod signal_0 = {"testModeItemClicked", 1, param_signal_0 }; - static const QMetaData signal_tbl[] = { - { "testModeItemClicked(KviKvsPopupMenuItem*)", &signal_0, QMetaData::Protected } + static const TQUMethod signal_0 = {"testModeItemClicked", 1, param_signal_0 }; + static const TQMetaData signal_tbl[] = { + { "testModeItemClicked(KviKvsPopupMenuItem*)", &signal_0, TQMetaData::Protected } }; - metaObj = QMetaObject::new_metaobject( - "KviKvsPopupMenu", parentObject, + metaObj = TQMetaObject::new_metaobject( + "KviKvsPopupMenu", tqparentObject, slot_tbl, 2, signal_tbl, 1, -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES 0, 0, 0, 0, -#endif // QT_NO_PROPERTIES +#endif // TQT_NO_PROPERTIES 0, 0 ); cleanUp_KviKvsPopupMenu.setMetaObject( metaObj ); return metaObj; } -void* KviKvsPopupMenu::qt_cast( const char* clname ) +void* KviKvsPopupMenu::tqqt_cast( const char* clname ) { if ( !qstrcmp( clname, "KviKvsPopupMenu" ) ) return this; - return KviTalPopupMenu::qt_cast( clname ); + return KviTalPopupMenu::tqqt_cast( clname ); } -#include -#include +#include +#include -// SIGNAL testModeItemClicked +// TQT_SIGNAL testModeItemClicked void KviKvsPopupMenu::testModeItemClicked( KviKvsPopupMenuItem* t0 ) { if ( signalsBlocked() ) return; - QConnectionList *clist = receivers( staticMetaObject()->signalOffset() + 0 ); + TQConnectionList *clist = tqreceivers( staticMetaObject()->signalOffset() + 0 ); if ( !clist ) return; - QUObject o[2]; - static_QUType_ptr.set(o+1,t0); + TQUObject o[2]; + static_TQUType_ptr.set(o+1,t0); activate_signal( clist, o ); } -bool KviKvsPopupMenu::qt_invoke( int _id, QUObject* _o ) +bool KviKvsPopupMenu::qt_invoke( int _id, TQUObject* _o ) { switch ( _id - staticMetaObject()->slotOffset() ) { case 0: setupMenuContents(); break; - case 1: itemClicked((int)static_QUType_int.get(_o+1)); break; + case 1: itemClicked((int)static_TQUType_int.get(_o+1)); break; default: return KviTalPopupMenu::qt_invoke( _id, _o ); } return TRUE; } -bool KviKvsPopupMenu::qt_emit( int _id, QUObject* _o ) +bool KviKvsPopupMenu::qt_emit( int _id, TQUObject* _o ) { switch ( _id - staticMetaObject()->signalOffset() ) { - case 0: testModeItemClicked((KviKvsPopupMenuItem*)static_QUType_ptr.get(_o+1)); break; + case 0: testModeItemClicked((KviKvsPopupMenuItem*)static_TQUType_ptr.get(_o+1)); break; default: return KviTalPopupMenu::qt_emit(_id,_o); } return TRUE; } -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES -bool KviKvsPopupMenu::qt_property( int id, int f, QVariant* v) +bool KviKvsPopupMenu::qt_property( int id, int f, TQVariant* v) { return KviTalPopupMenu::qt_property( id, f, v); } -bool KviKvsPopupMenu::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; } -#endif // QT_NO_PROPERTIES +bool KviKvsPopupMenu::qt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; } +#endif // TQT_NO_PROPERTIES diff --git a/src/kvirc/kvs/moc_kvi_kvs_processmanager.cpp b/src/kvirc/kvs/moc_kvi_kvs_processmanager.cpp index 6afd6682..38cc5639 100644 --- a/src/kvirc/kvs/moc_kvi_kvs_processmanager.cpp +++ b/src/kvirc/kvs/moc_kvi_kvs_processmanager.cpp @@ -2,21 +2,21 @@ ** KviKvsProcessAsyncOperation meta object code from reading C++ file 'kvi_kvs_processmanager.h' ** ** Created: Mon Feb 25 00:12:10 2008 -** by: The Qt MOC ($Id: qt/moc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) +** by: The TQt TQMOC ($Id: qt/tqmoc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ -#undef QT_NO_COMPAT +#undef TQT_NO_COMPAT #include "kvi_kvs_processmanager.h" -#include -#include +#include +#include -#include -#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26) -#error "This file was generated using the moc from 3.3.8. It" -#error "cannot be used with the include files from this version of Qt." -#error "(The moc has changed too much.)" +#include +#if !defined(TQ_TQMOC_OUTPUT_REVISION) || (TQ_TQMOC_OUTPUT_REVISION != 26) +#error "This file was generated using the tqmoc from 3.3.8. It" +#error "cannot be used with the include files from this version of TQt." +#error "(The tqmoc has changed too much.)" #endif const char *KviKvsProcessAsyncOperation::className() const @@ -24,69 +24,69 @@ const char *KviKvsProcessAsyncOperation::className() const return "KviKvsProcessAsyncOperation"; } -QMetaObject *KviKvsProcessAsyncOperation::metaObj = 0; -static QMetaObjectCleanUp cleanUp_KviKvsProcessAsyncOperation( "KviKvsProcessAsyncOperation", &KviKvsProcessAsyncOperation::staticMetaObject ); +TQMetaObject *KviKvsProcessAsyncOperation::metaObj = 0; +static TQMetaObjectCleanUp cleanUp_KviKvsProcessAsyncOperation( "KviKvsProcessAsyncOperation", &KviKvsProcessAsyncOperation::staticMetaObject ); -#ifndef QT_NO_TRANSLATION -QString KviKvsProcessAsyncOperation::tr( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION +TQString KviKvsProcessAsyncOperation::tr( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviKvsProcessAsyncOperation", s, c, QApplication::DefaultCodec ); + if ( tqApp ) + return tqApp->translate( "KviKvsProcessAsyncOperation", s, c, TQApplication::DefaultCodec ); else - return QString::fromLatin1( s ); + return TQString::tqfromLatin1( s ); } -#ifndef QT_NO_TRANSLATION_UTF8 -QString KviKvsProcessAsyncOperation::trUtf8( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION_UTF8 +TQString KviKvsProcessAsyncOperation::trUtf8( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviKvsProcessAsyncOperation", s, c, QApplication::UnicodeUTF8 ); + if ( tqApp ) + return tqApp->translate( "KviKvsProcessAsyncOperation", s, c, TQApplication::UnicodeUTF8 ); else - return QString::fromUtf8( s ); + return TQString::fromUtf8( s ); } -#endif // QT_NO_TRANSLATION_UTF8 +#endif // TQT_NO_TRANSLATION_UTF8 -#endif // QT_NO_TRANSLATION +#endif // TQT_NO_TRANSLATION -QMetaObject* KviKvsProcessAsyncOperation::staticMetaObject() +TQMetaObject* KviKvsProcessAsyncOperation::staticMetaObject() { if ( metaObj ) return metaObj; - QMetaObject* parentObject = KviKvsAsyncOperation::staticMetaObject(); - static const QUMethod slot_0 = {"maxRunTimeExpired", 0, 0 }; - static const QUMethod slot_1 = {"ping", 0, 0 }; - static const QUMethod slot_2 = {"readStdout", 0, 0 }; - static const QUMethod slot_3 = {"readStderr", 0, 0 }; - static const QUMethod slot_4 = {"processExited", 0, 0 }; - static const QUMethod slot_5 = {"selfDelete", 0, 0 }; - static const QMetaData slot_tbl[] = { - { "maxRunTimeExpired()", &slot_0, QMetaData::Private }, - { "ping()", &slot_1, QMetaData::Private }, - { "readStdout()", &slot_2, QMetaData::Private }, - { "readStderr()", &slot_3, QMetaData::Private }, - { "processExited()", &slot_4, QMetaData::Private }, - { "selfDelete()", &slot_5, QMetaData::Private } + TQMetaObject* tqparentObject = KviKvsAsyncOperation::staticMetaObject(); + static const TQUMethod slot_0 = {"maxRunTimeExpired", 0, 0 }; + static const TQUMethod slot_1 = {"ping", 0, 0 }; + static const TQUMethod slot_2 = {"readStdout", 0, 0 }; + static const TQUMethod slot_3 = {"readStderr", 0, 0 }; + static const TQUMethod slot_4 = {"processExited", 0, 0 }; + static const TQUMethod slot_5 = {"selfDelete", 0, 0 }; + static const TQMetaData slot_tbl[] = { + { "maxRunTimeExpired()", &slot_0, TQMetaData::Private }, + { "ping()", &slot_1, TQMetaData::Private }, + { "readStdout()", &slot_2, TQMetaData::Private }, + { "readStderr()", &slot_3, TQMetaData::Private }, + { "processExited()", &slot_4, TQMetaData::Private }, + { "selfDelete()", &slot_5, TQMetaData::Private } }; - metaObj = QMetaObject::new_metaobject( - "KviKvsProcessAsyncOperation", parentObject, + metaObj = TQMetaObject::new_metaobject( + "KviKvsProcessAsyncOperation", tqparentObject, slot_tbl, 6, 0, 0, -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES 0, 0, 0, 0, -#endif // QT_NO_PROPERTIES +#endif // TQT_NO_PROPERTIES 0, 0 ); cleanUp_KviKvsProcessAsyncOperation.setMetaObject( metaObj ); return metaObj; } -void* KviKvsProcessAsyncOperation::qt_cast( const char* clname ) +void* KviKvsProcessAsyncOperation::tqqt_cast( const char* clname ) { if ( !qstrcmp( clname, "KviKvsProcessAsyncOperation" ) ) return this; - return KviKvsAsyncOperation::qt_cast( clname ); + return KviKvsAsyncOperation::tqqt_cast( clname ); } -bool KviKvsProcessAsyncOperation::qt_invoke( int _id, QUObject* _o ) +bool KviKvsProcessAsyncOperation::qt_invoke( int _id, TQUObject* _o ) { switch ( _id - staticMetaObject()->slotOffset() ) { case 0: maxRunTimeExpired(); break; @@ -101,16 +101,16 @@ bool KviKvsProcessAsyncOperation::qt_invoke( int _id, QUObject* _o ) return TRUE; } -bool KviKvsProcessAsyncOperation::qt_emit( int _id, QUObject* _o ) +bool KviKvsProcessAsyncOperation::qt_emit( int _id, TQUObject* _o ) { return KviKvsAsyncOperation::qt_emit(_id,_o); } -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES -bool KviKvsProcessAsyncOperation::qt_property( int id, int f, QVariant* v) +bool KviKvsProcessAsyncOperation::qt_property( int id, int f, TQVariant* v) { return KviKvsAsyncOperation::qt_property( id, f, v); } -bool KviKvsProcessAsyncOperation::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; } -#endif // QT_NO_PROPERTIES +bool KviKvsProcessAsyncOperation::qt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; } +#endif // TQT_NO_PROPERTIES diff --git a/src/kvirc/kvs/moc_kvi_kvs_timermanager.cpp b/src/kvirc/kvs/moc_kvi_kvs_timermanager.cpp index 05f81bcb..8375d94a 100644 --- a/src/kvirc/kvs/moc_kvi_kvs_timermanager.cpp +++ b/src/kvirc/kvs/moc_kvi_kvs_timermanager.cpp @@ -2,21 +2,21 @@ ** KviKvsTimerManager meta object code from reading C++ file 'kvi_kvs_timermanager.h' ** ** Created: Mon Feb 25 00:12:04 2008 -** by: The Qt MOC ($Id: qt/moc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) +** by: The TQt TQMOC ($Id: qt/tqmoc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ -#undef QT_NO_COMPAT +#undef TQT_NO_COMPAT #include "kvi_kvs_timermanager.h" -#include -#include +#include +#include -#include -#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26) -#error "This file was generated using the moc from 3.3.8. It" -#error "cannot be used with the include files from this version of Qt." -#error "(The moc has changed too much.)" +#include +#if !defined(TQ_TQMOC_OUTPUT_REVISION) || (TQ_TQMOC_OUTPUT_REVISION != 26) +#error "This file was generated using the tqmoc from 3.3.8. It" +#error "cannot be used with the include files from this version of TQt." +#error "(The tqmoc has changed too much.)" #endif const char *KviKvsTimerManager::className() const @@ -24,69 +24,69 @@ const char *KviKvsTimerManager::className() const return "KviKvsTimerManager"; } -QMetaObject *KviKvsTimerManager::metaObj = 0; -static QMetaObjectCleanUp cleanUp_KviKvsTimerManager( "KviKvsTimerManager", &KviKvsTimerManager::staticMetaObject ); +TQMetaObject *KviKvsTimerManager::metaObj = 0; +static TQMetaObjectCleanUp cleanUp_KviKvsTimerManager( "KviKvsTimerManager", &KviKvsTimerManager::staticMetaObject ); -#ifndef QT_NO_TRANSLATION -QString KviKvsTimerManager::tr( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION +TQString KviKvsTimerManager::tr( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviKvsTimerManager", s, c, QApplication::DefaultCodec ); + if ( tqApp ) + return tqApp->translate( "KviKvsTimerManager", s, c, TQApplication::DefaultCodec ); else - return QString::fromLatin1( s ); + return TQString::tqfromLatin1( s ); } -#ifndef QT_NO_TRANSLATION_UTF8 -QString KviKvsTimerManager::trUtf8( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION_UTF8 +TQString KviKvsTimerManager::trUtf8( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviKvsTimerManager", s, c, QApplication::UnicodeUTF8 ); + if ( tqApp ) + return tqApp->translate( "KviKvsTimerManager", s, c, TQApplication::UnicodeUTF8 ); else - return QString::fromUtf8( s ); + return TQString::fromUtf8( s ); } -#endif // QT_NO_TRANSLATION_UTF8 +#endif // TQT_NO_TRANSLATION_UTF8 -#endif // QT_NO_TRANSLATION +#endif // TQT_NO_TRANSLATION -QMetaObject* KviKvsTimerManager::staticMetaObject() +TQMetaObject* KviKvsTimerManager::staticMetaObject() { if ( metaObj ) return metaObj; - QMetaObject* parentObject = QObject::staticMetaObject(); - metaObj = QMetaObject::new_metaobject( - "KviKvsTimerManager", parentObject, + TQMetaObject* tqparentObject = TQObject::staticMetaObject(); + metaObj = TQMetaObject::new_metaobject( + "KviKvsTimerManager", tqparentObject, 0, 0, 0, 0, -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES 0, 0, 0, 0, -#endif // QT_NO_PROPERTIES +#endif // TQT_NO_PROPERTIES 0, 0 ); cleanUp_KviKvsTimerManager.setMetaObject( metaObj ); return metaObj; } -void* KviKvsTimerManager::qt_cast( const char* clname ) +void* KviKvsTimerManager::tqqt_cast( const char* clname ) { if ( !qstrcmp( clname, "KviKvsTimerManager" ) ) return this; - return QObject::qt_cast( clname ); + return TQObject::tqqt_cast( clname ); } -bool KviKvsTimerManager::qt_invoke( int _id, QUObject* _o ) +bool KviKvsTimerManager::qt_invoke( int _id, TQUObject* _o ) { - return QObject::qt_invoke(_id,_o); + return TQObject::qt_invoke(_id,_o); } -bool KviKvsTimerManager::qt_emit( int _id, QUObject* _o ) +bool KviKvsTimerManager::qt_emit( int _id, TQUObject* _o ) { - return QObject::qt_emit(_id,_o); + return TQObject::qt_emit(_id,_o); } -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES -bool KviKvsTimerManager::qt_property( int id, int f, QVariant* v) +bool KviKvsTimerManager::qt_property( int id, int f, TQVariant* v) { - return QObject::qt_property( id, f, v); + return TQObject::qt_property( id, f, v); } -bool KviKvsTimerManager::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; } -#endif // QT_NO_PROPERTIES +bool KviKvsTimerManager::qt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; } +#endif // TQT_NO_PROPERTIES diff --git a/src/kvirc/kvs/moc_kvi_kvs_useraction.cpp b/src/kvirc/kvs/moc_kvi_kvs_useraction.cpp index b2bd5c6e..76c6514a 100644 --- a/src/kvirc/kvs/moc_kvi_kvs_useraction.cpp +++ b/src/kvirc/kvs/moc_kvi_kvs_useraction.cpp @@ -2,21 +2,21 @@ ** KviKvsUserAction meta object code from reading C++ file 'kvi_kvs_useraction.h' ** ** Created: Mon Feb 25 00:12:12 2008 -** by: The Qt MOC ($Id: qt/moc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) +** by: The TQt TQMOC ($Id: qt/tqmoc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ -#undef QT_NO_COMPAT +#undef TQT_NO_COMPAT #include "kvi_kvs_useraction.h" -#include -#include +#include +#include -#include -#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26) -#error "This file was generated using the moc from 3.3.8. It" -#error "cannot be used with the include files from this version of Qt." -#error "(The moc has changed too much.)" +#include +#if !defined(TQ_TQMOC_OUTPUT_REVISION) || (TQ_TQMOC_OUTPUT_REVISION != 26) +#error "This file was generated using the tqmoc from 3.3.8. It" +#error "cannot be used with the include files from this version of TQt." +#error "(The tqmoc has changed too much.)" #endif const char *KviKvsUserAction::className() const @@ -24,69 +24,69 @@ const char *KviKvsUserAction::className() const return "KviKvsUserAction"; } -QMetaObject *KviKvsUserAction::metaObj = 0; -static QMetaObjectCleanUp cleanUp_KviKvsUserAction( "KviKvsUserAction", &KviKvsUserAction::staticMetaObject ); +TQMetaObject *KviKvsUserAction::metaObj = 0; +static TQMetaObjectCleanUp cleanUp_KviKvsUserAction( "KviKvsUserAction", &KviKvsUserAction::staticMetaObject ); -#ifndef QT_NO_TRANSLATION -QString KviKvsUserAction::tr( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION +TQString KviKvsUserAction::tr( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviKvsUserAction", s, c, QApplication::DefaultCodec ); + if ( tqApp ) + return tqApp->translate( "KviKvsUserAction", s, c, TQApplication::DefaultCodec ); else - return QString::fromLatin1( s ); + return TQString::tqfromLatin1( s ); } -#ifndef QT_NO_TRANSLATION_UTF8 -QString KviKvsUserAction::trUtf8( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION_UTF8 +TQString KviKvsUserAction::trUtf8( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviKvsUserAction", s, c, QApplication::UnicodeUTF8 ); + if ( tqApp ) + return tqApp->translate( "KviKvsUserAction", s, c, TQApplication::UnicodeUTF8 ); else - return QString::fromUtf8( s ); + return TQString::fromUtf8( s ); } -#endif // QT_NO_TRANSLATION_UTF8 +#endif // TQT_NO_TRANSLATION_UTF8 -#endif // QT_NO_TRANSLATION +#endif // TQT_NO_TRANSLATION -QMetaObject* KviKvsUserAction::staticMetaObject() +TQMetaObject* KviKvsUserAction::staticMetaObject() { if ( metaObj ) return metaObj; - QMetaObject* parentObject = KviKvsAction::staticMetaObject(); - metaObj = QMetaObject::new_metaobject( - "KviKvsUserAction", parentObject, + TQMetaObject* tqparentObject = KviKvsAction::staticMetaObject(); + metaObj = TQMetaObject::new_metaobject( + "KviKvsUserAction", tqparentObject, 0, 0, 0, 0, -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES 0, 0, 0, 0, -#endif // QT_NO_PROPERTIES +#endif // TQT_NO_PROPERTIES 0, 0 ); cleanUp_KviKvsUserAction.setMetaObject( metaObj ); return metaObj; } -void* KviKvsUserAction::qt_cast( const char* clname ) +void* KviKvsUserAction::tqqt_cast( const char* clname ) { if ( !qstrcmp( clname, "KviKvsUserAction" ) ) return this; - return KviKvsAction::qt_cast( clname ); + return KviKvsAction::tqqt_cast( clname ); } -bool KviKvsUserAction::qt_invoke( int _id, QUObject* _o ) +bool KviKvsUserAction::qt_invoke( int _id, TQUObject* _o ) { return KviKvsAction::qt_invoke(_id,_o); } -bool KviKvsUserAction::qt_emit( int _id, QUObject* _o ) +bool KviKvsUserAction::qt_emit( int _id, TQUObject* _o ) { return KviKvsAction::qt_emit(_id,_o); } -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES -bool KviKvsUserAction::qt_property( int id, int f, QVariant* v) +bool KviKvsUserAction::qt_property( int id, int f, TQVariant* v) { return KviKvsAction::qt_property( id, f, v); } -bool KviKvsUserAction::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; } -#endif // QT_NO_PROPERTIES +bool KviKvsUserAction::qt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; } +#endif // TQT_NO_PROPERTIES diff --git a/src/kvirc/module/kvi_mexlinkfilter.cpp b/src/kvirc/module/kvi_mexlinkfilter.cpp index 58987389..b479d3c0 100644 --- a/src/kvirc/module/kvi_mexlinkfilter.cpp +++ b/src/kvirc/module/kvi_mexlinkfilter.cpp @@ -26,7 +26,7 @@ #include "kvi_mexlinkfilter.h" KviMexLinkFilter::KviMexLinkFilter(KviModuleExtensionDescriptor * d) -: QObject(), KviModuleExtension(d) +: TQObject(), KviModuleExtension(d) { } diff --git a/src/kvirc/module/kvi_mexlinkfilter.h b/src/kvirc/module/kvi_mexlinkfilter.h index aaf2a091..88b704de 100644 --- a/src/kvirc/module/kvi_mexlinkfilter.h +++ b/src/kvirc/module/kvi_mexlinkfilter.h @@ -27,13 +27,14 @@ #include "kvi_settings.h" #include "kvi_moduleextension.h" -#include +#include class KviDataBuffer; -class KVIRC_API KviMexLinkFilter : public QObject, public KviModuleExtension +class KVIRC_API KviMexLinkFilter : public TQObject, public KviModuleExtension { Q_OBJECT + TQ_OBJECT public: KviMexLinkFilter(KviModuleExtensionDescriptor * d); ~KviMexLinkFilter(); diff --git a/src/kvirc/module/kvi_mexserverimport.cpp b/src/kvirc/module/kvi_mexserverimport.cpp index 1dfc61eb..59ac15ec 100644 --- a/src/kvirc/module/kvi_mexserverimport.cpp +++ b/src/kvirc/module/kvi_mexserverimport.cpp @@ -24,7 +24,7 @@ #include "kvi_mexserverimport.h" KviMexServerImport::KviMexServerImport(KviModuleExtensionDescriptor * d) -: QObject() , KviModuleExtension(d) +: TQObject() , KviModuleExtension(d) { } diff --git a/src/kvirc/module/kvi_mexserverimport.h b/src/kvirc/module/kvi_mexserverimport.h index f15ce7ae..7912d717 100644 --- a/src/kvirc/module/kvi_mexserverimport.h +++ b/src/kvirc/module/kvi_mexserverimport.h @@ -27,11 +27,12 @@ #include "kvi_settings.h" #include "kvi_ircserverdb.h" #include "kvi_moduleextension.h" -#include +#include -class KVIRC_API KviMexServerImport : public QObject, public KviModuleExtension +class KVIRC_API KviMexServerImport : public TQObject, public KviModuleExtension { Q_OBJECT + TQ_OBJECT public: KviMexServerImport(KviModuleExtensionDescriptor * d); ~KviMexServerImport(); diff --git a/src/kvirc/module/kvi_mextoolbar.cpp b/src/kvirc/module/kvi_mextoolbar.cpp index 4d868786..ccae2f30 100644 --- a/src/kvirc/module/kvi_mextoolbar.cpp +++ b/src/kvirc/module/kvi_mextoolbar.cpp @@ -25,8 +25,8 @@ #include "kvi_mextoolbar.h" #include "kvi_frame.h" -KviMexToolBar::KviMexToolBar(KviModuleExtensionDescriptor * d,const QString &szName) -: KviToolBar(szName,QT_DOCK_TOP) , KviModuleExtension(d) +KviMexToolBar::KviMexToolBar(KviModuleExtensionDescriptor * d,const TQString &szName) +: KviToolBar(szName,TQT_DOCK_TOP) , KviModuleExtension(d) { g_pFrame->registerModuleExtensionToolBar(this); } diff --git a/src/kvirc/module/kvi_mextoolbar.h b/src/kvirc/module/kvi_mextoolbar.h index d8176e87..8a00925e 100644 --- a/src/kvirc/module/kvi_mextoolbar.h +++ b/src/kvirc/module/kvi_mextoolbar.h @@ -30,8 +30,9 @@ class KviFrame; class KVIRC_API KviMexToolBar : public KviToolBar , public KviModuleExtension { Q_OBJECT + TQ_OBJECT public: - KviMexToolBar(KviModuleExtensionDescriptor * d,const QString &szName); + KviMexToolBar(KviModuleExtensionDescriptor * d,const TQString &szName); ~KviMexToolBar(); }; diff --git a/src/kvirc/module/kvi_module.cpp b/src/kvirc/module/kvi_module.cpp index f0e50d06..8716c164 100644 --- a/src/kvirc/module/kvi_module.cpp +++ b/src/kvirc/module/kvi_module.cpp @@ -33,10 +33,6 @@ #include -#if QT_VERSION < 300 - #include -#endif - #ifdef COMPILE_CRYPT_SUPPORT extern KviCryptEngineManager * g_pCryptEngineManager; #endif @@ -173,13 +169,13 @@ KviModule::~KviModule() */ } -KviModuleExtensionDescriptor * KviModule::registerExtension(const KviStr &szType,const KviStr &szName,const QString &szVisibleName,KviModuleExtensionAllocRoutine r) +KviModuleExtensionDescriptor * KviModule::registerExtension(const KviStr &szType,const KviStr &szName,const TQString &szVisibleName,KviModuleExtensionAllocRoutine r) { - QPixmap pix; // null + TQPixmap pix; // null return g_pModuleExtensionManager->registerExtension(this,szType,szName,szVisibleName,r,pix); } -KviModuleExtensionDescriptor * KviModule::registerExtension(const KviStr &szType,const KviStr &szName,const QString &szVisibleName,KviModuleExtensionAllocRoutine r,const QPixmap &icon) +KviModuleExtensionDescriptor * KviModule::registerExtension(const KviStr &szType,const KviStr &szName,const TQString &szVisibleName,KviModuleExtensionAllocRoutine r,const TQPixmap &icon) { return g_pModuleExtensionManager->registerExtension(this,szType,szName,szVisibleName,r,icon); } @@ -216,32 +212,32 @@ void KviModule::setGenericFunctionParseProc(KviModuleFunctionParseProc proc) } } -void KviModule::completeCommand(const QString &cmd,KviPointerList * matches) +void KviModule::completeCommand(const TQString &cmd,KviPointerList * matches) { KviPointerHashTableIterator it(*m_pCommandDict); while(it.current()) { - if(KviQString::equalCIN(cmd,it.currentKey(),cmd.length())) + if(KviTQString::equalCIN(cmd,it.currentKey(),cmd.length())) { - QString * s = new QString(); - KviQString::sprintf(*s,"%s.%s",name(),it.currentKey()); + TQString * s = new TQString(); + KviTQString::sprintf(*s,"%s.%s",name(),it.currentKey()); matches->append(s); } ++it; } } -void KviModule::completeFunction(const QString &cmd,KviPointerList * matches) +void KviModule::completeFunction(const TQString &cmd,KviPointerList * matches) { KviPointerHashTableIterator it(*m_pFunctionDict); while(it.current()) { - if(KviQString::equalCIN(cmd,it.currentKey(),cmd.length())) + if(KviTQString::equalCIN(cmd,it.currentKey(),cmd.length())) { - QString * s = new QString(); - KviQString::sprintf(*s,"%s.%s",name(),it.currentKey()); + TQString * s = new TQString(); + KviTQString::sprintf(*s,"%s.%s",name(),it.currentKey()); matches->append(s); } ++it; @@ -251,8 +247,8 @@ void KviModule::completeFunction(const QString &cmd,KviPointerList * ma void KviModule::unregisterMetaObject(const char * metaObjName) { -#if QT_VERSION < 300 -// FIXME: #warning "We might need zeroing the d->slotAccess member of QMetaObject!" +#if [[[TQT_VERSION IS DEPRECATED]]] < 300 +// FIXME: #warning "We might need zeroing the d->slotAccess member of TQMetaObject!" if(!objectDict)return; objectDict->remove(metaObjName); #endif @@ -270,7 +266,7 @@ unsigned int KviModule::secondsSinceLastAccess() /* void KviModule::registerCommand(const char * cmd,KviModuleCommandParseProc proc) { - if(m_pCommandDict->find(cmd))m_pCommandDict->remove(cmd); + if(m_pCommandDict->tqfind(cmd))m_pCommandDict->remove(cmd); m_pCommandDict->insert(cmd,new KviModuleCommandParseProc(proc)); } @@ -316,7 +312,7 @@ void KviModule::unregisterAllEventHandlers() void KviModule::registerFunction(const char * fnc,KviModuleFunctionParseProc proc) { - if(m_pFunctionDict->find(fnc))m_pFunctionDict->remove(fnc); + if(m_pFunctionDict->tqfind(fnc))m_pFunctionDict->remove(fnc); m_pFunctionDict->insert(fnc,new KviModuleFunctionParseProc(proc)); } @@ -364,9 +360,9 @@ void KviModule::getDefaultConfigFileName(KviStr &buffer) g_pApp->getLocalKvircDirectory(buffer,KviApp::ConfigPlugins,szName.ptr()); } -void KviModule::getDefaultConfigFileName(QString &szBuffer) +void KviModule::getDefaultConfigFileName(TQString &szBuffer) { - QString tmp = "libkvi"; + TQString tmp = "libkvi"; tmp += m_szName.ptr(); tmp += ".kvc"; g_pApp->getLocalKvircDirectory(szBuffer,KviApp::ConfigPlugins,tmp); diff --git a/src/kvirc/module/kvi_module.h b/src/kvirc/module/kvi_module.h index 7c237643..f07c461c 100644 --- a/src/kvirc/module/kvi_module.h +++ b/src/kvirc/module/kvi_module.h @@ -170,7 +170,7 @@ public: // don't want to be unloaded. // The usage of this method is encouraged // only when you have blocking dialogs inside the module code, like the - // QMessageBox or QFileDialog static methods. + // TQMessageBox or TQFileDialog static methods. // In this case you're entering a modal event loop that you can't control // and if some script will attempt to forcibly unload the module // it will surely lead to a crash when the static method returns (jumping into no mans land). @@ -185,7 +185,7 @@ public: bool ctrl(const char * operation,void * param); void getDefaultConfigFileName(KviStr &buffer); - void getDefaultConfigFileName(QString &szBuffer); + void getDefaultConfigFileName(TQString &szBuffer); static void unregisterMetaObject(const char * metaObjName); @@ -195,8 +195,8 @@ public: void unregisterCryptEngines(); #endif - KviModuleExtensionDescriptor * registerExtension(const KviStr &szType,const KviStr &szName,const QString &szVisibleName,KviModuleExtensionAllocRoutine r); - KviModuleExtensionDescriptor * registerExtension(const KviStr &szType,const KviStr &szName,const QString &szVisibleName,KviModuleExtensionAllocRoutine r,const QPixmap &icon); + KviModuleExtensionDescriptor * registerExtension(const KviStr &szType,const KviStr &szName,const TQString &szVisibleName,KviModuleExtensionAllocRoutine r); + KviModuleExtensionDescriptor * registerExtension(const KviStr &szType,const KviStr &szName,const TQString &szVisibleName,KviModuleExtensionAllocRoutine r,const TQPixmap &icon); KviModuleExtensionDescriptor * findExtensionDescriptor(const KviStr &szType,const KviStr &szName); void unregisterAllExtensions(); }; diff --git a/src/kvirc/module/kvi_moduleextension.cpp b/src/kvirc/module/kvi_moduleextension.cpp index fb6a9ae6..5e82f634 100644 --- a/src/kvirc/module/kvi_moduleextension.cpp +++ b/src/kvirc/module/kvi_moduleextension.cpp @@ -32,7 +32,7 @@ KVIRC_API KviModuleExtensionManager * g_pModuleExtensionManager = 0; -KviModuleExtensionDescriptor::KviModuleExtensionDescriptor(KviModule * m,const KviStr &szType,const KviStr &szName,const QString &szVisibleName,KviModuleExtensionAllocRoutine r,const QPixmap &pix) +KviModuleExtensionDescriptor::KviModuleExtensionDescriptor(KviModule * m,const KviStr &szType,const KviStr &szName,const TQString &szVisibleName,KviModuleExtensionAllocRoutine r,const TQPixmap &pix) { m_iId = KviApp::getGloballyUniqueId(); @@ -44,7 +44,7 @@ KviModuleExtensionDescriptor::KviModuleExtensionDescriptor(KviModule * m,const K m_pObjectList = new KviPointerList; m_pObjectList->setAutoDelete(false); if(pix.isNull())m_pIcon = 0; - else m_pIcon = new QPixmap(pix); + else m_pIcon = new TQPixmap(pix); } KviModuleExtensionDescriptor::~KviModuleExtensionDescriptor() @@ -54,14 +54,14 @@ KviModuleExtensionDescriptor::~KviModuleExtensionDescriptor() if(m_pIcon)delete m_pIcon; } -void KviModuleExtensionDescriptor::setIcon(const QPixmap &pix) +void KviModuleExtensionDescriptor::setIcon(const TQPixmap &pix) { if(m_pIcon)delete m_pIcon; if(pix.isNull())m_pIcon = 0; - else m_pIcon = new QPixmap(pix); + else m_pIcon = new TQPixmap(pix); } -KviModuleExtension * KviModuleExtensionDescriptor::allocate(KviWindow * pWnd,KviPointerHashTable * pParams,void * pSpecial) +KviModuleExtension * KviModuleExtensionDescriptor::allocate(KviWindow * pWnd,KviPointerHashTable * pParams,void * pSpecial) { KviModuleExtensionAllocStruct s; s.pDescriptor = this; @@ -103,13 +103,13 @@ KviModuleExtensionManager::~KviModuleExtensionManager() KviModuleExtensionDescriptorList * KviModuleExtensionManager::getExtensionList(const KviStr &szType) { g_pModuleManager->loadModulesByCaps(szType.ptr()); - return m_pExtensionDict->find(szType.ptr()); + return m_pExtensionDict->tqfind(szType.ptr()); } -KviModuleExtensionDescriptor * KviModuleExtensionManager::registerExtension(KviModule * m,const KviStr &szType,const KviStr &szName,const QString &szVisibleName,KviModuleExtensionAllocRoutine r,const QPixmap &icon) +KviModuleExtensionDescriptor * KviModuleExtensionManager::registerExtension(KviModule * m,const KviStr &szType,const KviStr &szName,const TQString &szVisibleName,KviModuleExtensionAllocRoutine r,const TQPixmap &icon) { KviModuleExtensionDescriptor * d = new KviModuleExtensionDescriptor(m,szType,szName,szVisibleName,r,icon); - KviModuleExtensionDescriptorList * l = m_pExtensionDict->find(szType.ptr()); + KviModuleExtensionDescriptorList * l = m_pExtensionDict->tqfind(szType.ptr()); if(!l) { l = new KviModuleExtensionDescriptorList(); @@ -157,12 +157,12 @@ KviModuleExtensionDescriptorList * KviModuleExtensionManager::allocateExtensionG (void)m; // get rid of the unused warning :D } - KviModuleExtensionDescriptorList * l = m_pExtensionDict->find(szType.ptr()); + KviModuleExtensionDescriptorList * l = m_pExtensionDict->tqfind(szType.ptr()); if(!l) { // retry : it might have been unloaded g_pModuleManager->loadModulesByCaps(szType.ptr()); - l = m_pExtensionDict->find(szType.ptr()); + l = m_pExtensionDict->tqfind(szType.ptr()); } return l; @@ -170,7 +170,7 @@ KviModuleExtensionDescriptorList * KviModuleExtensionManager::allocateExtensionG KviModuleExtensionDescriptor * KviModuleExtensionManager::findExtensionDescriptor(const KviStr &szType,const KviStr &szName) { - KviModuleExtensionDescriptorList * l = m_pExtensionDict->find(szType.ptr()); + KviModuleExtensionDescriptorList * l = m_pExtensionDict->tqfind(szType.ptr()); if(!l)return 0; for(KviModuleExtensionDescriptor * d = l->first();d;d = l->next()) @@ -181,7 +181,7 @@ KviModuleExtensionDescriptor * KviModuleExtensionManager::findExtensionDescripto return 0; } -KviModuleExtension * KviModuleExtensionManager::allocateExtension(const KviStr &szType,const KviStr &szName,KviWindow * pWnd,KviPointerHashTable * pParams,void * pSpecial,const char * preloadModule) +KviModuleExtension * KviModuleExtensionManager::allocateExtension(const KviStr &szType,const KviStr &szName,KviWindow * pWnd,KviPointerHashTable * pParams,void * pSpecial,const char * preloadModule) { KviModuleExtensionDescriptorList * l = allocateExtensionGetDescriptorList(szType,preloadModule); if(!l)return 0; @@ -196,7 +196,7 @@ KviModuleExtension * KviModuleExtensionManager::allocateExtension(const KviStr & // uhm... not there ? g_pModuleManager->loadModulesByCaps(szType.ptr()); // try again after loading the modules - // l = m_pExtensionDict->find(szType.ptr()); <--- this shouldn't change! + // l = m_pExtensionDict->tqfind(szType.ptr()); <--- this shouldn't change! for(d = l->first();d;d = l->next()) { if(d->name().equalsCI(szName))return d->allocate(pWnd,pParams,pSpecial); @@ -208,7 +208,7 @@ KviModuleExtension * KviModuleExtensionManager::allocateExtension(const KviStr & } -KviModuleExtension * KviModuleExtensionManager::allocateExtension(const KviStr &szType,int id,KviWindow * pWnd,KviPointerHashTable * pParams,void * pSpecial,const char * preloadModule) +KviModuleExtension * KviModuleExtensionManager::allocateExtension(const KviStr &szType,int id,KviWindow * pWnd,KviPointerHashTable * pParams,void * pSpecial,const char * preloadModule) { KviModuleExtensionDescriptorList * l = allocateExtensionGetDescriptorList(szType,preloadModule); if(!l)return 0; @@ -222,7 +222,7 @@ KviModuleExtension * KviModuleExtensionManager::allocateExtension(const KviStr & // uhm... not there ? g_pModuleManager->loadModulesByCaps(szType.ptr()); // try again after loading the modules - // l = m_pExtensionDict->find(szType.ptr()); <--- this shouldn't change! + // l = m_pExtensionDict->tqfind(szType.ptr()); <--- this shouldn't change! for(d = l->first();d;d = l->next()) { if(d->id() == id)return d->allocate(pWnd,pParams,pSpecial); diff --git a/src/kvirc/module/kvi_moduleextension.h b/src/kvirc/module/kvi_moduleextension.h index 0d1b2428..7bbc360c 100644 --- a/src/kvirc/module/kvi_moduleextension.h +++ b/src/kvirc/module/kvi_moduleextension.h @@ -28,8 +28,8 @@ #include "kvi_heapobject.h" #include "kvi_pointerhashtable.h" -#include -#include +#include +#include #include "kvi_pointerhashtable.h" class KviWindow; @@ -41,7 +41,7 @@ typedef struct _KviModuleExtensionAllocStructTag { KviModuleExtensionDescriptor * pDescriptor; // module extension that this alloc routine refers to KviWindow * pWindow; // may be 0! - KviPointerHashTable * pParams; // parameter dict (may be 0!) + KviPointerHashTable * pParams; // parameter dict (may be 0!) void * pSpecial; // special parameter passed to the alloc routine, may be 0 } KviModuleExtensionAllocStruct; @@ -52,41 +52,41 @@ class KVIRC_API KviModuleExtensionDescriptor friend class KviModuleExtension; friend class KviModuleExtensionManager; // only the manager allocates and deallocates these structures protected: - KviModuleExtensionDescriptor(KviModule * m,const KviStr &szType,const KviStr &szName,const QString &szVisibleName,KviModuleExtensionAllocRoutine r,const QPixmap &pix); -public: // this has to be public because of QPtrList... but should be protected + KviModuleExtensionDescriptor(KviModule * m,const KviStr &szType,const KviStr &szName,const TQString &szVisibleName,KviModuleExtensionAllocRoutine r,const TQPixmap &pix); +public: // this has to be public because of TQPtrList... but should be protected ~KviModuleExtensionDescriptor(); private: int m_iId; // unique id assigned at creation time KviStr m_szType; // name of the service (toolbar , crypt engine...) KviStr m_szName; // name of the extension - QString m_szVisibleName; // name that is VISIBLE and possibly translated + TQString m_szVisibleName; // name that is VISIBLE and possibly translated KviStr m_szAuthor; // Author (visible) KviStr m_szDescription; // Description (visible!) int m_iFlags; // Flags (0 if not applicable) - QPixmap * m_pIcon; // Icon (may be null!) + TQPixmap * m_pIcon; // Icon (may be null!) KviModuleExtensionAllocRoutine m_allocRoutine; KviPointerList * m_pObjectList; KviModule * m_pModule; // module pointer public: // pParams ownership is NOT taken - KviModuleExtension * allocate(KviWindow * pWnd = 0,KviPointerHashTable * pParams = 0,void * pSpecial = 0); + KviModuleExtension * allocate(KviWindow * pWnd = 0,KviPointerHashTable * pParams = 0,void * pSpecial = 0); int id(){ return m_iId; }; KviModule * module(){ return m_pModule; }; const KviStr &type(){ return m_szType; }; const KviStr &name(){ return m_szName; }; - const QString &visibleName(){ return m_szVisibleName; }; + const TQString &visibleName(){ return m_szVisibleName; }; const KviStr &author(){ return m_szAuthor; }; const KviStr &description(){ return m_szDescription; }; - const QPixmap * icon(){ return m_pIcon; }; + const TQPixmap * icon(){ return m_pIcon; }; int flags(){ return m_iFlags; }; void setAuthor(const KviStr &szAuthor){ m_szAuthor = szAuthor; }; void setDescription(const KviStr &szDescription){ m_szDescription = szDescription; }; void setVisibleName(const KviStr &szVisibleName){ m_szVisibleName = szVisibleName; }; void setFlags(int iFlags){ m_iFlags = iFlags; }; - void setIcon(const QPixmap &pix); + void setIcon(const TQPixmap &pix); protected: void registerObject(KviModuleExtension * e); @@ -110,14 +110,14 @@ protected: KviPointerHashTable * m_pExtensionDict; protected: // Only KviModule can call this - KviModuleExtensionDescriptor * registerExtension(KviModule * m,const KviStr &szType,const KviStr &szName,const QString &szVisibleName,KviModuleExtensionAllocRoutine r,const QPixmap &icon); + KviModuleExtensionDescriptor * registerExtension(KviModule * m,const KviStr &szType,const KviStr &szName,const TQString &szVisibleName,KviModuleExtensionAllocRoutine r,const TQPixmap &icon); void unregisterExtensionsByModule(KviModule * m); public: KviModuleExtensionDescriptor * findExtensionDescriptor(const KviStr &szType,const KviStr &szName); static KviModuleExtensionManager * instance(){ return g_pModuleExtensionManager; }; KviModuleExtensionDescriptorList * getExtensionList(const KviStr &szType); - KviModuleExtension * allocateExtension(const KviStr &szType,const KviStr &szName,KviWindow * pWnd = 0,KviPointerHashTable * pParams = 0,void * pSpecial = 0,const char * preloadModule = 0); - KviModuleExtension * allocateExtension(const KviStr &szType,int id,KviWindow * pWnd = 0,KviPointerHashTable * pParams = 0,void * pSpecial = 0,const char * preloadModule = 0); + KviModuleExtension * allocateExtension(const KviStr &szType,const KviStr &szName,KviWindow * pWnd = 0,KviPointerHashTable * pParams = 0,void * pSpecial = 0,const char * preloadModule = 0); + KviModuleExtension * allocateExtension(const KviStr &szType,int id,KviWindow * pWnd = 0,KviPointerHashTable * pParams = 0,void * pSpecial = 0,const char * preloadModule = 0); private: KviModuleExtensionDescriptorList * allocateExtensionGetDescriptorList(const KviStr &szType,const char * preloadModule); }; diff --git a/src/kvirc/module/kvi_modulemanager.cpp b/src/kvirc/module/kvi_modulemanager.cpp index e13d2fd2..4df7de19 100644 --- a/src/kvirc/module/kvi_modulemanager.cpp +++ b/src/kvirc/module/kvi_modulemanager.cpp @@ -36,7 +36,7 @@ #include "kvi_library.h" -#include +#include KviModuleManager * g_pModuleManager = 0; @@ -46,8 +46,8 @@ KviModuleManager::KviModuleManager() m_pModuleDict = new KviPointerHashTable(17,false); m_pModuleDict->setAutoDelete(false); - m_pCleanupTimer = new QTimer(this); - connect(m_pCleanupTimer,SIGNAL(timeout()),this,SLOT(cleanupUnusedModules())); + m_pCleanupTimer = new TQTimer(this); + connect(m_pCleanupTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(cleanupUnusedModules())); } KviModuleManager::~KviModuleManager() @@ -63,12 +63,12 @@ void KviModuleManager::loadModulesByCaps(const char * caps,const char * dir) KviStr szCapsPath(KviStr::Format,"%s%ccaps%c%s%c",dir,KVI_PATH_SEPARATOR_CHAR, KVI_PATH_SEPARATOR_CHAR,caps,KVI_PATH_SEPARATOR_CHAR); - QDir d(QString(szCapsPath.ptr())); + TQDir d(TQString(szCapsPath.ptr())); // FIXME: maybe check timestamps ? (old modules) - QStringList sl = d.entryList(QDir::Files | QDir::Readable | QDir::NoSymLinks); - for(QStringList::Iterator it = sl.begin();it != sl.end();++it) + TQStringList sl = d.entryList(TQDir::Files | TQDir::Readable | TQDir::NoSymLinks); + for(TQStringList::Iterator it = sl.begin();it != sl.end();++it) { KviStr modname = *it; modname.cutToLast(KVI_PATH_SEPARATOR_CHAR); @@ -85,9 +85,9 @@ void KviModuleManager::loadModulesByCaps(const char * caps) loadModulesByCaps(caps,szDir.ptr()); } -void KviModuleManager::completeModuleNames(const QString &path,const QString &word,KviPointerList * matches) +void KviModuleManager::completeModuleNames(const TQString &path,const TQString &word,KviPointerList * matches) { - QDir d(path); + TQDir d(path); #ifdef COMPILE_ON_WINDOWS d.setNameFilter("kvi*.dll"); #else @@ -95,15 +95,15 @@ void KviModuleManager::completeModuleNames(const QString &path,const QString &wo #endif // FIXME: maybe check timestamps ? (old modules) - QStringList sl = d.entryList(QDir::Files | QDir::Readable | QDir::NoSymLinks); - for(QStringList::Iterator it = sl.begin();it != sl.end();++it) + TQStringList sl = d.entryList(TQDir::Files | TQDir::Readable | TQDir::NoSymLinks); + for(TQStringList::Iterator it = sl.begin();it != sl.end();++it) { - QString * modname = new QString(*it); - KviQString::cutToLast(*modname,KVI_PATH_SEPARATOR_CHAR); - KviQString::cutToFirst(*modname,"kvi"); - if(KviQString::equalCIN(word,*modname,word.length())) + TQString * modname = new TQString(*it); + KviTQString::cutToLast(*modname,KVI_PATH_SEPARATOR_CHAR); + KviTQString::cutToFirst(*modname,"kvi"); + if(KviTQString::equalCIN(word,*modname,word.length())) { - KviQString::cutFromLast(*modname,".so"); + KviTQString::cutFromLast(*modname,".so"); if(!modname->isEmpty()) matches->append(modname); else @@ -112,9 +112,9 @@ void KviModuleManager::completeModuleNames(const QString &path,const QString &wo } } -void KviModuleManager::completeModuleNames(const QString &word,KviPointerList * matches) +void KviModuleManager::completeModuleNames(const TQString &word,KviPointerList * matches) { - QString szDir; + TQString szDir; // FIXME: Should check for duplicate names here! g_pApp->getLocalKvircDirectory(szDir,KviApp::Plugins); completeModuleNames(szDir,word,matches); @@ -124,18 +124,18 @@ void KviModuleManager::completeModuleNames(const QString &word,KviPointerListfind(modName); + KviModule * m = m_pModuleDict->tqfind(modName); if(m)m->updateAccessTime(); return m; } KviModule * KviModuleManager::getModule(const char * modName) { - KviModule * m = m_pModuleDict->find(modName); + KviModule * m = m_pModuleDict->tqfind(modName); if(!m) { if(!loadModule(modName)) return 0; - m = m_pModuleDict->find(modName); + m = m_pModuleDict->tqfind(modName); } if(m)m->updateAccessTime(); return m; @@ -161,12 +161,12 @@ bool KviModuleManager::loadModule(const char * modName) //debug("MODULE %s ALREADY IN CORE MEMORY",modName); return true; } - QString tmp; - QString szName; + TQString tmp; + TQString szName; #ifdef COMPILE_ON_WINDOWS - KviQString::appendFormatted(szName,"kvi%s.dll",modName); + KviTQString::appendFormatted(szName,"kvi%s.dll",modName); #else - KviQString::appendFormatted(szName,"libkvi%s.so",modName); + KviTQString::appendFormatted(szName,"libkvi%s.so",modName); #endif szName=szName.lower(); diff --git a/src/kvirc/module/kvi_modulemanager.h b/src/kvirc/module/kvi_modulemanager.h index bba3544e..dce988fe 100644 --- a/src/kvirc/module/kvi_modulemanager.h +++ b/src/kvirc/module/kvi_modulemanager.h @@ -27,22 +27,23 @@ #include "kvi_settings.h" -#include +#include #include "kvi_pointerhashtable.h" -#include +#include #include "kvi_pointerlist.h" #include "kvi_module.h" -class KVIRC_API KviModuleManager : public QObject +class KVIRC_API KviModuleManager : public TQObject { Q_OBJECT + TQ_OBJECT public: KviModuleManager(); ~KviModuleManager(); private: KviPointerHashTable * m_pModuleDict; - QTimer * m_pCleanupTimer; + TQTimer * m_pCleanupTimer; KviStr m_szLastError; public: KviStr & lastError(){ return m_szLastError; }; @@ -56,9 +57,9 @@ public: void loadModulesByCaps(const char * caps,const char * dir); void loadModulesByCaps(const char * caps); bool hasLockedModules(); - void completeModuleNames(const QString &word,KviPointerList * matches); + void completeModuleNames(const TQString &word,KviPointerList * matches); protected: - void completeModuleNames(const QString &path,const QString &work,KviPointerList * matches); + void completeModuleNames(const TQString &path,const TQString &work,KviPointerList * matches); public slots: void cleanupUnusedModules(); signals: diff --git a/src/kvirc/module/moc_kvi_mexlinkfilter.cpp b/src/kvirc/module/moc_kvi_mexlinkfilter.cpp index 17ee562a..3bfb8fb4 100644 --- a/src/kvirc/module/moc_kvi_mexlinkfilter.cpp +++ b/src/kvirc/module/moc_kvi_mexlinkfilter.cpp @@ -2,21 +2,21 @@ ** KviMexLinkFilter meta object code from reading C++ file 'kvi_mexlinkfilter.h' ** ** Created: Mon Feb 25 00:12:13 2008 -** by: The Qt MOC ($Id: qt/moc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) +** by: The TQt TQMOC ($Id: qt/tqmoc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ -#undef QT_NO_COMPAT +#undef TQT_NO_COMPAT #include "kvi_mexlinkfilter.h" -#include -#include +#include +#include -#include -#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26) -#error "This file was generated using the moc from 3.3.8. It" -#error "cannot be used with the include files from this version of Qt." -#error "(The moc has changed too much.)" +#include +#if !defined(TQ_TQMOC_OUTPUT_REVISION) || (TQ_TQMOC_OUTPUT_REVISION != 26) +#error "This file was generated using the tqmoc from 3.3.8. It" +#error "cannot be used with the include files from this version of TQt." +#error "(The tqmoc has changed too much.)" #endif const char *KviMexLinkFilter::className() const @@ -24,71 +24,71 @@ const char *KviMexLinkFilter::className() const return "KviMexLinkFilter"; } -QMetaObject *KviMexLinkFilter::metaObj = 0; -static QMetaObjectCleanUp cleanUp_KviMexLinkFilter( "KviMexLinkFilter", &KviMexLinkFilter::staticMetaObject ); +TQMetaObject *KviMexLinkFilter::metaObj = 0; +static TQMetaObjectCleanUp cleanUp_KviMexLinkFilter( "KviMexLinkFilter", &KviMexLinkFilter::staticMetaObject ); -#ifndef QT_NO_TRANSLATION -QString KviMexLinkFilter::tr( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION +TQString KviMexLinkFilter::tr( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviMexLinkFilter", s, c, QApplication::DefaultCodec ); + if ( tqApp ) + return tqApp->translate( "KviMexLinkFilter", s, c, TQApplication::DefaultCodec ); else - return QString::fromLatin1( s ); + return TQString::tqfromLatin1( s ); } -#ifndef QT_NO_TRANSLATION_UTF8 -QString KviMexLinkFilter::trUtf8( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION_UTF8 +TQString KviMexLinkFilter::trUtf8( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviMexLinkFilter", s, c, QApplication::UnicodeUTF8 ); + if ( tqApp ) + return tqApp->translate( "KviMexLinkFilter", s, c, TQApplication::UnicodeUTF8 ); else - return QString::fromUtf8( s ); + return TQString::fromUtf8( s ); } -#endif // QT_NO_TRANSLATION_UTF8 +#endif // TQT_NO_TRANSLATION_UTF8 -#endif // QT_NO_TRANSLATION +#endif // TQT_NO_TRANSLATION -QMetaObject* KviMexLinkFilter::staticMetaObject() +TQMetaObject* KviMexLinkFilter::staticMetaObject() { if ( metaObj ) return metaObj; - QMetaObject* parentObject = QObject::staticMetaObject(); - metaObj = QMetaObject::new_metaobject( - "KviMexLinkFilter", parentObject, + TQMetaObject* tqparentObject = TQObject::staticMetaObject(); + metaObj = TQMetaObject::new_metaobject( + "KviMexLinkFilter", tqparentObject, 0, 0, 0, 0, -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES 0, 0, 0, 0, -#endif // QT_NO_PROPERTIES +#endif // TQT_NO_PROPERTIES 0, 0 ); cleanUp_KviMexLinkFilter.setMetaObject( metaObj ); return metaObj; } -void* KviMexLinkFilter::qt_cast( const char* clname ) +void* KviMexLinkFilter::tqqt_cast( const char* clname ) { if ( !qstrcmp( clname, "KviMexLinkFilter" ) ) return this; if ( !qstrcmp( clname, "KviModuleExtension" ) ) return (KviModuleExtension*)this; - return QObject::qt_cast( clname ); + return TQObject::tqqt_cast( clname ); } -bool KviMexLinkFilter::qt_invoke( int _id, QUObject* _o ) +bool KviMexLinkFilter::qt_invoke( int _id, TQUObject* _o ) { - return QObject::qt_invoke(_id,_o); + return TQObject::qt_invoke(_id,_o); } -bool KviMexLinkFilter::qt_emit( int _id, QUObject* _o ) +bool KviMexLinkFilter::qt_emit( int _id, TQUObject* _o ) { - return QObject::qt_emit(_id,_o); + return TQObject::qt_emit(_id,_o); } -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES -bool KviMexLinkFilter::qt_property( int id, int f, QVariant* v) +bool KviMexLinkFilter::qt_property( int id, int f, TQVariant* v) { - return QObject::qt_property( id, f, v); + return TQObject::qt_property( id, f, v); } -bool KviMexLinkFilter::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; } -#endif // QT_NO_PROPERTIES +bool KviMexLinkFilter::qt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; } +#endif // TQT_NO_PROPERTIES diff --git a/src/kvirc/module/moc_kvi_mexserverimport.cpp b/src/kvirc/module/moc_kvi_mexserverimport.cpp index 1ef542ef..de46ea85 100644 --- a/src/kvirc/module/moc_kvi_mexserverimport.cpp +++ b/src/kvirc/module/moc_kvi_mexserverimport.cpp @@ -2,21 +2,21 @@ ** KviMexServerImport meta object code from reading C++ file 'kvi_mexserverimport.h' ** ** Created: Mon Feb 25 00:12:15 2008 -** by: The Qt MOC ($Id: qt/moc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) +** by: The TQt TQMOC ($Id: qt/tqmoc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ -#undef QT_NO_COMPAT +#undef TQT_NO_COMPAT #include "kvi_mexserverimport.h" -#include -#include +#include +#include -#include -#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26) -#error "This file was generated using the moc from 3.3.8. It" -#error "cannot be used with the include files from this version of Qt." -#error "(The moc has changed too much.)" +#include +#if !defined(TQ_TQMOC_OUTPUT_REVISION) || (TQ_TQMOC_OUTPUT_REVISION != 26) +#error "This file was generated using the tqmoc from 3.3.8. It" +#error "cannot be used with the include files from this version of TQt." +#error "(The tqmoc has changed too much.)" #endif const char *KviMexServerImport::className() const @@ -24,101 +24,101 @@ const char *KviMexServerImport::className() const return "KviMexServerImport"; } -QMetaObject *KviMexServerImport::metaObj = 0; -static QMetaObjectCleanUp cleanUp_KviMexServerImport( "KviMexServerImport", &KviMexServerImport::staticMetaObject ); +TQMetaObject *KviMexServerImport::metaObj = 0; +static TQMetaObjectCleanUp cleanUp_KviMexServerImport( "KviMexServerImport", &KviMexServerImport::staticMetaObject ); -#ifndef QT_NO_TRANSLATION -QString KviMexServerImport::tr( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION +TQString KviMexServerImport::tr( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviMexServerImport", s, c, QApplication::DefaultCodec ); + if ( tqApp ) + return tqApp->translate( "KviMexServerImport", s, c, TQApplication::DefaultCodec ); else - return QString::fromLatin1( s ); + return TQString::tqfromLatin1( s ); } -#ifndef QT_NO_TRANSLATION_UTF8 -QString KviMexServerImport::trUtf8( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION_UTF8 +TQString KviMexServerImport::trUtf8( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviMexServerImport", s, c, QApplication::UnicodeUTF8 ); + if ( tqApp ) + return tqApp->translate( "KviMexServerImport", s, c, TQApplication::UnicodeUTF8 ); else - return QString::fromUtf8( s ); + return TQString::fromUtf8( s ); } -#endif // QT_NO_TRANSLATION_UTF8 +#endif // TQT_NO_TRANSLATION_UTF8 -#endif // QT_NO_TRANSLATION +#endif // TQT_NO_TRANSLATION -QMetaObject* KviMexServerImport::staticMetaObject() +TQMetaObject* KviMexServerImport::staticMetaObject() { if ( metaObj ) return metaObj; - QMetaObject* parentObject = QObject::staticMetaObject(); - static const QUParameter param_signal_0[] = { - { "s", &static_QUType_ptr, "KviIrcServer", QUParameter::In }, - { "network", &static_QUType_charstar, 0, QUParameter::In } + TQMetaObject* tqparentObject = TQObject::staticMetaObject(); + static const TQUParameter param_signal_0[] = { + { "s", &static_TQUType_ptr, "KviIrcServer", TQUParameter::In }, + { "network", &static_TQUType_charstar, 0, TQUParameter::In } }; - static const QUMethod signal_0 = {"server", 2, param_signal_0 }; - static const QMetaData signal_tbl[] = { - { "server(const KviIrcServer&,const char*)", &signal_0, QMetaData::Public } + static const TQUMethod signal_0 = {"server", 2, param_signal_0 }; + static const TQMetaData signal_tbl[] = { + { "server(const KviIrcServer&,const char*)", &signal_0, TQMetaData::Public } }; - metaObj = QMetaObject::new_metaobject( - "KviMexServerImport", parentObject, + metaObj = TQMetaObject::new_metaobject( + "KviMexServerImport", tqparentObject, 0, 0, signal_tbl, 1, -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES 0, 0, 0, 0, -#endif // QT_NO_PROPERTIES +#endif // TQT_NO_PROPERTIES 0, 0 ); cleanUp_KviMexServerImport.setMetaObject( metaObj ); return metaObj; } -void* KviMexServerImport::qt_cast( const char* clname ) +void* KviMexServerImport::tqqt_cast( const char* clname ) { if ( !qstrcmp( clname, "KviMexServerImport" ) ) return this; if ( !qstrcmp( clname, "KviModuleExtension" ) ) return (KviModuleExtension*)this; - return QObject::qt_cast( clname ); + return TQObject::tqqt_cast( clname ); } -#include -#include +#include +#include -// SIGNAL server +// TQT_SIGNAL server void KviMexServerImport::server( const KviIrcServer& t0, const char* t1 ) { if ( signalsBlocked() ) return; - QConnectionList *clist = receivers( staticMetaObject()->signalOffset() + 0 ); + TQConnectionList *clist = tqreceivers( staticMetaObject()->signalOffset() + 0 ); if ( !clist ) return; - QUObject o[3]; - static_QUType_ptr.set(o+1,&t0); - static_QUType_charstar.set(o+2,t1); + TQUObject o[3]; + static_TQUType_ptr.set(o+1,&t0); + static_TQUType_charstar.set(o+2,t1); activate_signal( clist, o ); } -bool KviMexServerImport::qt_invoke( int _id, QUObject* _o ) +bool KviMexServerImport::qt_invoke( int _id, TQUObject* _o ) { - return QObject::qt_invoke(_id,_o); + return TQObject::qt_invoke(_id,_o); } -bool KviMexServerImport::qt_emit( int _id, QUObject* _o ) +bool KviMexServerImport::qt_emit( int _id, TQUObject* _o ) { switch ( _id - staticMetaObject()->signalOffset() ) { - case 0: server((const KviIrcServer&)*((const KviIrcServer*)static_QUType_ptr.get(_o+1)),(const char*)static_QUType_charstar.get(_o+2)); break; + case 0: server((const KviIrcServer&)*((const KviIrcServer*)static_TQUType_ptr.get(_o+1)),(const char*)static_TQUType_charstar.get(_o+2)); break; default: - return QObject::qt_emit(_id,_o); + return TQObject::qt_emit(_id,_o); } return TRUE; } -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES -bool KviMexServerImport::qt_property( int id, int f, QVariant* v) +bool KviMexServerImport::qt_property( int id, int f, TQVariant* v) { - return QObject::qt_property( id, f, v); + return TQObject::qt_property( id, f, v); } -bool KviMexServerImport::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; } -#endif // QT_NO_PROPERTIES +bool KviMexServerImport::qt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; } +#endif // TQT_NO_PROPERTIES diff --git a/src/kvirc/module/moc_kvi_mextoolbar.cpp b/src/kvirc/module/moc_kvi_mextoolbar.cpp index a537e3f4..5f2c40f3 100644 --- a/src/kvirc/module/moc_kvi_mextoolbar.cpp +++ b/src/kvirc/module/moc_kvi_mextoolbar.cpp @@ -2,21 +2,21 @@ ** KviMexToolBar meta object code from reading C++ file 'kvi_mextoolbar.h' ** ** Created: Mon Feb 25 00:12:16 2008 -** by: The Qt MOC ($Id: qt/moc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) +** by: The TQt TQMOC ($Id: qt/tqmoc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ -#undef QT_NO_COMPAT +#undef TQT_NO_COMPAT #include "kvi_mextoolbar.h" -#include -#include +#include +#include -#include -#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26) -#error "This file was generated using the moc from 3.3.8. It" -#error "cannot be used with the include files from this version of Qt." -#error "(The moc has changed too much.)" +#include +#if !defined(TQ_TQMOC_OUTPUT_REVISION) || (TQ_TQMOC_OUTPUT_REVISION != 26) +#error "This file was generated using the tqmoc from 3.3.8. It" +#error "cannot be used with the include files from this version of TQt." +#error "(The tqmoc has changed too much.)" #endif const char *KviMexToolBar::className() const @@ -24,71 +24,71 @@ const char *KviMexToolBar::className() const return "KviMexToolBar"; } -QMetaObject *KviMexToolBar::metaObj = 0; -static QMetaObjectCleanUp cleanUp_KviMexToolBar( "KviMexToolBar", &KviMexToolBar::staticMetaObject ); +TQMetaObject *KviMexToolBar::metaObj = 0; +static TQMetaObjectCleanUp cleanUp_KviMexToolBar( "KviMexToolBar", &KviMexToolBar::staticMetaObject ); -#ifndef QT_NO_TRANSLATION -QString KviMexToolBar::tr( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION +TQString KviMexToolBar::tr( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviMexToolBar", s, c, QApplication::DefaultCodec ); + if ( tqApp ) + return tqApp->translate( "KviMexToolBar", s, c, TQApplication::DefaultCodec ); else - return QString::fromLatin1( s ); + return TQString::tqfromLatin1( s ); } -#ifndef QT_NO_TRANSLATION_UTF8 -QString KviMexToolBar::trUtf8( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION_UTF8 +TQString KviMexToolBar::trUtf8( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviMexToolBar", s, c, QApplication::UnicodeUTF8 ); + if ( tqApp ) + return tqApp->translate( "KviMexToolBar", s, c, TQApplication::UnicodeUTF8 ); else - return QString::fromUtf8( s ); + return TQString::fromUtf8( s ); } -#endif // QT_NO_TRANSLATION_UTF8 +#endif // TQT_NO_TRANSLATION_UTF8 -#endif // QT_NO_TRANSLATION +#endif // TQT_NO_TRANSLATION -QMetaObject* KviMexToolBar::staticMetaObject() +TQMetaObject* KviMexToolBar::staticMetaObject() { if ( metaObj ) return metaObj; - QMetaObject* parentObject = KviToolBar::staticMetaObject(); - metaObj = QMetaObject::new_metaobject( - "KviMexToolBar", parentObject, + TQMetaObject* tqparentObject = KviToolBar::staticMetaObject(); + metaObj = TQMetaObject::new_metaobject( + "KviMexToolBar", tqparentObject, 0, 0, 0, 0, -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES 0, 0, 0, 0, -#endif // QT_NO_PROPERTIES +#endif // TQT_NO_PROPERTIES 0, 0 ); cleanUp_KviMexToolBar.setMetaObject( metaObj ); return metaObj; } -void* KviMexToolBar::qt_cast( const char* clname ) +void* KviMexToolBar::tqqt_cast( const char* clname ) { if ( !qstrcmp( clname, "KviMexToolBar" ) ) return this; if ( !qstrcmp( clname, "KviModuleExtension" ) ) return (KviModuleExtension*)this; - return KviToolBar::qt_cast( clname ); + return KviToolBar::tqqt_cast( clname ); } -bool KviMexToolBar::qt_invoke( int _id, QUObject* _o ) +bool KviMexToolBar::qt_invoke( int _id, TQUObject* _o ) { return KviToolBar::qt_invoke(_id,_o); } -bool KviMexToolBar::qt_emit( int _id, QUObject* _o ) +bool KviMexToolBar::qt_emit( int _id, TQUObject* _o ) { return KviToolBar::qt_emit(_id,_o); } -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES -bool KviMexToolBar::qt_property( int id, int f, QVariant* v) +bool KviMexToolBar::qt_property( int id, int f, TQVariant* v) { return KviToolBar::qt_property( id, f, v); } -bool KviMexToolBar::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; } -#endif // QT_NO_PROPERTIES +bool KviMexToolBar::qt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; } +#endif // TQT_NO_PROPERTIES diff --git a/src/kvirc/module/moc_kvi_modulemanager.cpp b/src/kvirc/module/moc_kvi_modulemanager.cpp index e9b815a0..f9b1f44e 100644 --- a/src/kvirc/module/moc_kvi_modulemanager.cpp +++ b/src/kvirc/module/moc_kvi_modulemanager.cpp @@ -2,21 +2,21 @@ ** KviModuleManager meta object code from reading C++ file 'kvi_modulemanager.h' ** ** Created: Mon Feb 25 00:12:18 2008 -** by: The Qt MOC ($Id: qt/moc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) +** by: The TQt TQMOC ($Id: qt/tqmoc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ -#undef QT_NO_COMPAT +#undef TQT_NO_COMPAT #include "kvi_modulemanager.h" -#include -#include +#include +#include -#include -#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26) -#error "This file was generated using the moc from 3.3.8. It" -#error "cannot be used with the include files from this version of Qt." -#error "(The moc has changed too much.)" +#include +#if !defined(TQ_TQMOC_OUTPUT_REVISION) || (TQ_TQMOC_OUTPUT_REVISION != 26) +#error "This file was generated using the tqmoc from 3.3.8. It" +#error "cannot be used with the include files from this version of TQt." +#error "(The tqmoc has changed too much.)" #endif const char *KviModuleManager::className() const @@ -24,106 +24,106 @@ const char *KviModuleManager::className() const return "KviModuleManager"; } -QMetaObject *KviModuleManager::metaObj = 0; -static QMetaObjectCleanUp cleanUp_KviModuleManager( "KviModuleManager", &KviModuleManager::staticMetaObject ); +TQMetaObject *KviModuleManager::metaObj = 0; +static TQMetaObjectCleanUp cleanUp_KviModuleManager( "KviModuleManager", &KviModuleManager::staticMetaObject ); -#ifndef QT_NO_TRANSLATION -QString KviModuleManager::tr( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION +TQString KviModuleManager::tr( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviModuleManager", s, c, QApplication::DefaultCodec ); + if ( tqApp ) + return tqApp->translate( "KviModuleManager", s, c, TQApplication::DefaultCodec ); else - return QString::fromLatin1( s ); + return TQString::tqfromLatin1( s ); } -#ifndef QT_NO_TRANSLATION_UTF8 -QString KviModuleManager::trUtf8( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION_UTF8 +TQString KviModuleManager::trUtf8( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviModuleManager", s, c, QApplication::UnicodeUTF8 ); + if ( tqApp ) + return tqApp->translate( "KviModuleManager", s, c, TQApplication::UnicodeUTF8 ); else - return QString::fromUtf8( s ); + return TQString::fromUtf8( s ); } -#endif // QT_NO_TRANSLATION_UTF8 +#endif // TQT_NO_TRANSLATION_UTF8 -#endif // QT_NO_TRANSLATION +#endif // TQT_NO_TRANSLATION -QMetaObject* KviModuleManager::staticMetaObject() +TQMetaObject* KviModuleManager::staticMetaObject() { if ( metaObj ) return metaObj; - QMetaObject* parentObject = QObject::staticMetaObject(); - static const QUMethod slot_0 = {"cleanupUnusedModules", 0, 0 }; - static const QMetaData slot_tbl[] = { - { "cleanupUnusedModules()", &slot_0, QMetaData::Public } + TQMetaObject* tqparentObject = TQObject::staticMetaObject(); + static const TQUMethod slot_0 = {"cleanupUnusedModules", 0, 0 }; + static const TQMetaData slot_tbl[] = { + { "cleanupUnusedModules()", &slot_0, TQMetaData::Public } }; - static const QUParameter param_signal_0[] = { - { "m", &static_QUType_ptr, "KviModule", QUParameter::In } + static const TQUParameter param_signal_0[] = { + { "m", &static_TQUType_ptr, "KviModule", TQUParameter::In } }; - static const QUMethod signal_0 = {"moduleAboutToUnload", 1, param_signal_0 }; - static const QMetaData signal_tbl[] = { - { "moduleAboutToUnload(KviModule*)", &signal_0, QMetaData::Public } + static const TQUMethod signal_0 = {"moduleAboutToUnload", 1, param_signal_0 }; + static const TQMetaData signal_tbl[] = { + { "moduleAboutToUnload(KviModule*)", &signal_0, TQMetaData::Public } }; - metaObj = QMetaObject::new_metaobject( - "KviModuleManager", parentObject, + metaObj = TQMetaObject::new_metaobject( + "KviModuleManager", tqparentObject, slot_tbl, 1, signal_tbl, 1, -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES 0, 0, 0, 0, -#endif // QT_NO_PROPERTIES +#endif // TQT_NO_PROPERTIES 0, 0 ); cleanUp_KviModuleManager.setMetaObject( metaObj ); return metaObj; } -void* KviModuleManager::qt_cast( const char* clname ) +void* KviModuleManager::tqqt_cast( const char* clname ) { if ( !qstrcmp( clname, "KviModuleManager" ) ) return this; - return QObject::qt_cast( clname ); + return TQObject::tqqt_cast( clname ); } -#include -#include +#include +#include -// SIGNAL moduleAboutToUnload +// TQT_SIGNAL moduleAboutToUnload void KviModuleManager::moduleAboutToUnload( KviModule* t0 ) { if ( signalsBlocked() ) return; - QConnectionList *clist = receivers( staticMetaObject()->signalOffset() + 0 ); + TQConnectionList *clist = tqreceivers( staticMetaObject()->signalOffset() + 0 ); if ( !clist ) return; - QUObject o[2]; - static_QUType_ptr.set(o+1,t0); + TQUObject o[2]; + static_TQUType_ptr.set(o+1,t0); activate_signal( clist, o ); } -bool KviModuleManager::qt_invoke( int _id, QUObject* _o ) +bool KviModuleManager::qt_invoke( int _id, TQUObject* _o ) { switch ( _id - staticMetaObject()->slotOffset() ) { case 0: cleanupUnusedModules(); break; default: - return QObject::qt_invoke( _id, _o ); + return TQObject::qt_invoke( _id, _o ); } return TRUE; } -bool KviModuleManager::qt_emit( int _id, QUObject* _o ) +bool KviModuleManager::qt_emit( int _id, TQUObject* _o ) { switch ( _id - staticMetaObject()->signalOffset() ) { - case 0: moduleAboutToUnload((KviModule*)static_QUType_ptr.get(_o+1)); break; + case 0: moduleAboutToUnload((KviModule*)static_TQUType_ptr.get(_o+1)); break; default: - return QObject::qt_emit(_id,_o); + return TQObject::qt_emit(_id,_o); } return TRUE; } -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES -bool KviModuleManager::qt_property( int id, int f, QVariant* v) +bool KviModuleManager::qt_property( int id, int f, TQVariant* v) { - return QObject::qt_property( id, f, v); + return TQObject::qt_property( id, f, v); } -bool KviModuleManager::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; } -#endif // QT_NO_PROPERTIES +bool KviModuleManager::qt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; } +#endif // TQT_NO_PROPERTIES diff --git a/src/kvirc/sparser/kvi_antispam.cpp b/src/kvirc/sparser/kvi_antispam.cpp index e1eec8af..9aafcfbd 100644 --- a/src/kvirc/sparser/kvi_antispam.cpp +++ b/src/kvirc/sparser/kvi_antispam.cpp @@ -56,7 +56,7 @@ // Ideas: // - A spam message is generally a single PRIVMSG : // so this function should be (and is) called when -// a PRIVMSG is received from a person that has no QUERY +// a PRIVMSG is received from a person that has no TQUERY // window open yet. // - 95% of spam messages contain an URL inside (http,ftp,www) or a channel name. // - The other 5% contain words like auto-msg , msg me or query @@ -103,10 +103,10 @@ bool kvi_mayBeSpam(KviStr * msg,KviStr &spamWord) { - for(QStringList::Iterator it = KVI_OPTION_STRINGLIST(KviOption_stringlistSpamWords).begin(); + for(TQStringList::Iterator it = KVI_OPTION_STRINGLIST(KviOption_stringlistSpamWords).begin(); it != KVI_OPTION_STRINGLIST(KviOption_stringlistSpamWords).end() ; ++it) { - // FIXME : This is SLOOOOOOOOW (QString -> ascii translation!!) + // FIXME : This is SLOOOOOOOOW (TQString -> ascii translation!!) const char * aux = (*it).ascii(); if(aux) diff --git a/src/kvirc/sparser/kvi_ircmessage.cpp b/src/kvirc/sparser/kvi_ircmessage.cpp index 512f03e5..0441794a 100644 --- a/src/kvirc/sparser/kvi_ircmessage.cpp +++ b/src/kvirc/sparser/kvi_ircmessage.cpp @@ -40,7 +40,7 @@ KviIrcMessage::KviIrcMessage(const char * message,KviIrcConnection * pConnection m_pParams = new KviPointerList; m_pParams->setAutoDelete(true); - //m_pcParams = new KviPointerList; + //m_pcParams = new KviPointerList; //m_pcParams->setAutoDelete(true); while(*m_ptr == ' ')++m_ptr; @@ -65,13 +65,13 @@ KviIrcMessage::KviIrcMessage(const char * message,KviIrcConnection * pConnection { ++m_ptr; m_pParams->append(new KviStr(m_ptr)); - //m_pcParams->append(new QCString(m_ptr)); + //m_pcParams->append(new TQCString(m_ptr)); break; // this was the last } else { aux = m_ptr; while(*m_ptr && (*m_ptr != ' '))++m_ptr; m_pParams->append(new KviStr(aux,m_ptr)); - //m_pcParams->append(new QCString(KviStr(aux,m_ptr).ptr())); + //m_pcParams->append(new TQCString(KviStr(aux,m_ptr).ptr())); while(*m_ptr == ' ')++m_ptr; } } @@ -103,7 +103,7 @@ KviIrcMessage::KviIrcMessage(const char * message,KviIrcConnection * pConnection m_iNumericCommand = -1; m_szCommand.toUpper(); } - //m_SafeTrailingString=QCString(m_pParams->last()->ptr()); + //m_SafeTrailingString=TQCString(m_pParams->last()->ptr()); } KviIrcMessage::~KviIrcMessage() @@ -111,9 +111,9 @@ KviIrcMessage::~KviIrcMessage() delete m_pParams; } -void KviIrcMessage::decodeAndSplitMask(char * b,QString &szNick,QString &szUser,QString &szHost) +void KviIrcMessage::decodeAndSplitMask(char * b,TQString &szNick,TQString &szUser,TQString &szHost) { - static QString szWild("*"); + static TQString szWild("*"); char * p = b; while(*p && *p != '!')p++; @@ -158,7 +158,7 @@ void KviIrcMessage::decodeAndSplitMask(char * b,QString &szNick,QString &szUser, } -void KviIrcMessage::decodeAndSplitPrefix(QString &szNick,QString &szUser,QString &szHost) +void KviIrcMessage::decodeAndSplitPrefix(TQString &szNick,TQString &szUser,TQString &szHost) { char * b; if(m_szPrefix.hasData())b = m_szPrefix.ptr(); diff --git a/src/kvirc/sparser/kvi_ircmessage.h b/src/kvirc/sparser/kvi_ircmessage.h index b77946f2..e2bf17d9 100644 --- a/src/kvirc/sparser/kvi_ircmessage.h +++ b/src/kvirc/sparser/kvi_ircmessage.h @@ -99,8 +99,8 @@ public: void setUnrecognized(){ m_iFlags |= KVI_IRCMSG_FLAG_UNRECOGNIZED; }; bool unrecognized(){ return (m_iFlags & KVI_IRCMSG_FLAG_UNRECOGNIZED); }; - void decodeAndSplitPrefix(QString &szNick,QString &szUser,QString &szHost); - void decodeAndSplitMask(char * mask,QString &szNick,QString &szUser,QString &szHost); + void decodeAndSplitPrefix(TQString &szNick,TQString &szUser,TQString &szHost); + void decodeAndSplitMask(char * tqmask,TQString &szNick,TQString &szUser,TQString &szHost); }; #endif //_KVI_IRCMESSAGE_H_ diff --git a/src/kvirc/sparser/kvi_numeric.h b/src/kvirc/sparser/kvi_numeric.h index 2f5adee2..41d246f7 100644 --- a/src/kvirc/sparser/kvi_numeric.h +++ b/src/kvirc/sparser/kvi_numeric.h @@ -61,8 +61,8 @@ #define RPL_MAPEND 7 /* :End of /MAP [U] # */ //[03:45:18] [dune.webchat.org][007] newbie dune.webchat.org 1037760291 :Tue, 19 Nov 2002 18:44:51 -0800 -#define RPL_SNOMASK 8 /* %d :: Server notice mask (%#x) [U] # */ -//[03:45:18] [dune.webchat.org][008] newbie -/NAJgAxq7HQPwnkK^ 124963541 :This is your Session ID and Session Key. +#define RPL_SNOMASK 8 /* %d :: Server notice tqmask (%#x) [U] # */ +//[03:45:18] [dune.webchat.org][008] newbie -/NAJgAxq7HTQPwnkK^ 124963541 :This is your Session ID and Session Key. #define RPL_STATMEMTOT 9 /* %u %u :Bytes Blocks [U] # */ //[03:45:18] [dune.webchat.org][009] newbie ASCII :Current character mapping. @@ -98,13 +98,13 @@ #define RPL_STATSILINE 215 /* [I,E,U,D] "%c %s * %s %d %d"*/ #define RPL_STATSKLINE 216 /* [I,E,U,D] */ #define RPL_STATSPLINE 217 /* [U] */ -#define RPL_STATSQLINE 217 /* [I,E,U,D] */ +#define RPL_STATSTQLINE 217 /* [I,E,U,D] */ #define RPL_STATSYLINE 218 /* [I,E,U,D] */ #define RPL_ENDOFSTATS 219 // [I,E,U,D] */ // #define RPL_???? 220 #define RPL_UMODEIS 221 /* [I,E,U,D] # */ #define RPL_STATSBLINE 222 /* [E] */ -#define RPL_SQLINE_NICK 222 /* [D] */ +#define RPL_STQLINE_NICK 222 /* [D] */ #define RPL_STATSELINE 223 /* [E] */ #define RPL_STATSFLINE 224 /* [E] */ #define RPL_STATSDLINE 225 /* [E] */ @@ -216,9 +216,9 @@ #define RPL_INVITING 341 /* [I,E,U,D] */ #define RPL_SUMMONING 342 /* [I,E,D] */ // RPL_????????? 343-345 -#define RPL_INVITELIST 346 /* " " [I] # */ +#define RPL_INVITELIST 346 /* " " [I] # */ #define RPL_ENDOFINVITELIST 347 /* " :End of Channel Invite List" [I] # */ -#define RPL_EXCEPTLIST 348 /* " " [I] # */ +#define RPL_EXCEPTLIST 348 /* " " [I] # */ #define RPL_ENDOFEXCEPTLIST 349 /* " :End of Channel Exception List" [I] # */ // RPL_?????????? 350 #define RPL_VERSION 351 /* "%s.%s %s :%s" [I,E,U,D] # */ @@ -229,10 +229,10 @@ #define RPL_KILLDONE 361 /* [I,E,U,D] */ #define RPL_CLOSING 362 /* [I,E,U,D] */ #define RPL_CLOSEEND 363 /* [I,E,U,D] */ -#define RPL_LINKS 364 /* " : " [I,E,U,D] # */ +#define RPL_LINKS 364 /* " : " [I,E,U,D] # */ #define RPL_ENDOFLINKS 365 /* %s :End of /LINKS" [I,E,U,D] # */ #define RPL_ENDOFNAMES 366 /* "%s :End of /NAMES list." [I,E,U,D] # */ -#define RPL_BANLIST 367 /* " " [I,E,U,D] # */ +#define RPL_BANLIST 367 /* " " [I,E,U,D] # */ #define RPL_ENDOFBANLIST 368 /* " :End of channel Ban List" [I,E,U,D] # */ #define RPL_ENDOFWHOWAS 369 /* "%s :END of /WHOWAS" [I,E,U,D] # */ #define RPL_INFO 371 /* ":%s" [I,E,U,D] # */ @@ -280,7 +280,7 @@ #define ERR_WILDTOPLEVEL 414 /* "%s :Wildcard in toplevel Domain" [I,E,U,D] */ #define ERR_BADMASK 415 /* ??? [I] */ //#define ERR_TOOMANYTARGETS 416 /* Can not understand this ... but I've found it in some docs [I] */ -#define ERR_QUERYTOOLONG 416 /* " :Too many lines in the output, please restrict your query [U] */ +#define ERR_TQUERYTOOLONG 416 /* " :Too many lines in the output, please restrict your query [U] */ // ERR_?????????? 417-420 #define ERR_UNKNOWNCOMMAND 421 /* "%s :Unknown command" [I,E,U,D] # */ #define ERR_NOMOTD 422 /* ":MOTD File is missing" [I,E,U,D] */ @@ -385,7 +385,7 @@ ///* 342 */ RPL_SUMMONING, "%s :User summoned to irc", ///* 352 */ RPL_WHOREPLY, , ///* 361 */ RPL_KILLDONE, (char *)NULL, -///* 362 */ RPL_CLOSING, "%s :Closed. Status = %d", +///* 362 */ RPL_CLOSING, "%s :Closed. tqStatus = %d", ///* 363 */ RPL_CLOSEEND, "%d: Connections Closed", ///* 364 */ RPL_LINKS, "%s %s :%d %s", ///* 365 */ RPL_ENDOFLINKS, "%s :End of /LINKS list.", @@ -405,7 +405,7 @@ ///* 395 */ RPL_NOUSERS, ":Nobody logged in.", ///* 216 */ RPL_STATSKLINE, "%c %s * %s %s", ///* 216 */ RPL_STATSKLINE, "%c %s %s %s %d %d", -///* 217 */ RPL_STATSQLINE, "%c %s * %s %d %d", +///* 217 */ RPL_STATSTQLINE, "%c %s * %s %d %d", ///* 218 */ RPL_STATSYLINE, "%c %d %d %d %d %ld", ///* 219 */ RPL_ENDOFSTATS, "%c :End of /STATS report", ///* 221 */ RPL_UMODEIS, "%s", diff --git a/src/kvirc/sparser/kvi_sp_ctcp.cpp b/src/kvirc/sparser/kvi_sp_ctcp.cpp index 1e3736aa..fdf9dc17 100644 --- a/src/kvirc/sparser/kvi_sp_ctcp.cpp +++ b/src/kvirc/sparser/kvi_sp_ctcp.cpp @@ -24,7 +24,7 @@ #define __KVIRC__ // FIXME: #warning "CTCP BEEP == WAKEUP == AWAKE" -// FIXME: #warning "CTCP AVATARREQ or QUERYAVATAR" +// FIXME: #warning "CTCP AVATARREQ or TQUERYAVATAR" #include "kvi_mirccntrl.h" #include "kvi_osinfo.h" @@ -58,12 +58,12 @@ #include -#include +#include #ifdef COMPILE_USE_QT4 - #include + #include #else - #include + #include #endif @@ -97,8 +97,8 @@ extern KVIRC_API KviCtcpPageDialog * g_pCtcpPageDialog; use the symbol <0x01> for this delimiter. You may receive a CTCP message from server in one of the following two ways:[br] - [b]: PRIVMSG :<0x01><0x01>[/b][br] - [b]: NOTICE :<0x01><0x01>[/b][br] + [b]: PRIVMSG :<0x01><0x01>[/b][br] + [b]: NOTICE :<0x01><0x01>[/b][br] The PRIVMSG is used for CTCP REQUESTS, the NOTICE for CTCP REPLIES. The NOTICE form should never generate an automatic reply.[br] The two delimiters were used to begin and terminate the @@ -463,13 +463,13 @@ void KviServerParser::encodeCtcpParameter(const char * param,KviStr &buffer,bool if(param != begin)buffer.append(begin,param - begin); } -void KviServerParser::encodeCtcpParameter(const char * parametr,QString &resultBuffer,bool bSpaceBreaks) +void KviServerParser::encodeCtcpParameter(const char * parametr,TQString &resultBuffer,bool bSpaceBreaks) { // // This one encodes a single ctcp parameter with the simplest // subset of rules and places it in the supplied buffer // - KviQCString buffer; + KviTQCString buffer; register const char* param=parametr; if(!param) { @@ -585,7 +585,7 @@ const char * KviServerParser::decodeCtcpEscape(const char * msg_ptr,KviStr &buff } -const char * KviServerParser::decodeCtcpEscape(const char * msg_ptr,KviQCString &buffer) +const char * KviServerParser::decodeCtcpEscape(const char * msg_ptr,KviTQCString &buffer) { // // This one decodes an octal sequence @@ -721,7 +721,7 @@ const char * KviServerParser::extractCtcpParameter(const char * msg_ptr,KviStr & return msg_ptr; } -const char * KviServerParser::extractCtcpParameter(const char * p_msg_ptr,QString &resultBuffer,bool bSpaceBreaks) +const char * KviServerParser::extractCtcpParameter(const char * p_msg_ptr,TQString &resultBuffer,bool bSpaceBreaks) { // // This one extracts the "next" ctcp parameter in p_msg_ptr @@ -734,7 +734,7 @@ const char * KviServerParser::extractCtcpParameter(const char * p_msg_ptr,QStrin // based CTCP message. // - KviQCString buffer; + KviTQCString buffer; register const char* msg_ptr=p_msg_ptr; int bInString = 0; if(!msg_ptr) return 0; @@ -825,9 +825,9 @@ void KviServerParser::parseCtcpRequest(KviCtcpMessage *msg) if (KVI_OPTION_BOOL(KviOption_boolIgnoreCtcpDcc)) { msg->msg->console()->output(KVI_OUT_IGNORE,__tr2qs("Ignoring DCC from \r!nc\r%s\r [%s@\r!h\r%s\r]"), - KviQString::toUtf8(msg->pSource->nick()).data(), - KviQString::toUtf8(msg->pSource->user()).data(), - KviQString::toUtf8(msg->pSource->host()).data() + KviTQString::toUtf8(msg->pSource->nick()).data(), + KviTQString::toUtf8(msg->pSource->user()).data(), + KviTQString::toUtf8(msg->pSource->host()).data() ); return; } @@ -842,9 +842,9 @@ void KviServerParser::parseCtcpRequest(KviCtcpMessage *msg) if (KVI_OPTION_BOOL(KviOption_boolVerboseIgnore)) { msg->msg->console()->output(KVI_OUT_IGNORE,__tr2qs("Ignoring CTCP from \r!nc\r%s\r [%s@\r!h\r%s\r]"), - KviQString::toUtf8(msg->pSource->nick()).data(), - KviQString::toUtf8(msg->pSource->user()).data(), - KviQString::toUtf8(msg->pSource->host()).data() + KviTQString::toUtf8(msg->pSource->nick()).data(), + KviTQString::toUtf8(msg->pSource->user()).data(), + KviTQString::toUtf8(msg->pSource->host()).data() ); } return; @@ -852,15 +852,15 @@ void KviServerParser::parseCtcpRequest(KviCtcpMessage *msg) } } - bool bCtcpVersion = KviQString::equalCI(msg->szTag,"VERSION"); + bool bCtcpVersion = KviTQString::equalCI(msg->szTag,"VERSION"); for(int i=0;m_ctcpRequestParseProcTable[i].msgName;i++) { - if(KviQString::equalCI(msg->szTag,m_ctcpRequestParseProcTable[i].msgName)) + if(KviTQString::equalCI(msg->szTag,m_ctcpRequestParseProcTable[i].msgName)) { if(!(m_ctcpReplyParseProcTable[i].iFlags & KVI_CTCP_MESSAGE_PARSE_TRIGGERNOEVENT)) { - QString szData = msg->msg->connection()->decodeText(msg->pData); + TQString szData = msg->msg->connection()->decodeText(msg->pData); //do not allow to make faked version reply if(!(bCtcpVersion && KVI_OPTION_BOOL(KviOption_boolIgnoreCtcpVersion))) { @@ -879,7 +879,7 @@ void KviServerParser::parseCtcpRequest(KviCtcpMessage *msg) } } - QString szData = msg->msg->connection()->decodeText(msg->pData); + TQString szData = msg->msg->connection()->decodeText(msg->pData); // trigger the event on unrecognized requests too if(KVS_TRIGGER_EVENT_6_HALTED(KviEvent_OnCtcpRequest, \ msg->msg->console(), \ @@ -902,11 +902,11 @@ void KviServerParser::parseCtcpReply(KviCtcpMessage *msg) for(int i=0;m_ctcpReplyParseProcTable[i].msgName;i++) { - if(KviQString::equalCI(msg->szTag,m_ctcpReplyParseProcTable[i].msgName)) + if(KviTQString::equalCI(msg->szTag,m_ctcpReplyParseProcTable[i].msgName)) { if(!(m_ctcpReplyParseProcTable[i].iFlags & KVI_CTCP_MESSAGE_PARSE_TRIGGERNOEVENT)) { - QString szData = msg->msg->connection()->decodeText(msg->pData); + TQString szData = msg->msg->connection()->decodeText(msg->pData); if(KVS_TRIGGER_EVENT_6_HALTED(KviEvent_OnCtcpReply, \ msg->msg->console(),msg->pSource->nick(),msg->pSource->user(), \ msg->pSource->host(),msg->szTarget,msg->szTag,szData))return; @@ -916,7 +916,7 @@ void KviServerParser::parseCtcpReply(KviCtcpMessage *msg) } } - QString szData = msg->msg->connection()->decodeText(msg->pData); + TQString szData = msg->msg->connection()->decodeText(msg->pData); // trigger the event on unrecognized replies too if(KVS_TRIGGER_EVENT_6_HALTED(KviEvent_OnCtcpReply, \ msg->msg->console(),msg->pSource->nick(),msg->pSource->user(), \ @@ -959,7 +959,7 @@ bool KviServerParser::checkCtcpFlood(KviCtcpMessage *msg) void KviServerParser::replyCtcp(KviCtcpMessage *msg,const char * data) { - KviQCString szNick = msg->msg->connection()->encodeText(msg->pSource->nick()); + KviTQCString szNick = msg->msg->connection()->encodeText(msg->pSource->nick()); msg->msg->connection()->sendFmtData("NOTICE %s :%c%s %s%c", szNick.data(),0x01,msg->msg->connection()->encodeText(msg->szTag).data(),msg->msg->connection()->encodeText(data).data(),0x01); } @@ -984,9 +984,9 @@ void KviServerParser::echoCtcpReply(KviCtcpMessage * msg) } else bIsChannel = true; } - QString szData = msg->msg->connection()->decodeText(msg->pData); + TQString szData = msg->msg->connection()->decodeText(msg->pData); - QString szWhat = bIsChannel ? __tr2qs("Channel CTCP") : QString("CTCP"); + TQString szWhat = bIsChannel ? __tr2qs("Channel CTCP") : TQString("CTCP"); pOut->output( msg->bUnknown ? KVI_OUT_CTCPREPLYUNKNOWN : KVI_OUT_CTCPREPLY, @@ -1002,7 +1002,7 @@ void KviServerParser::echoCtcpRequest(KviCtcpMessage *msg) // FIXME: #warning "DEDICATED CTCP WINDOW...MINIMIZED ?" if(!msg->msg->haltOutput()) { - QString req = msg->szTag; + TQString req = msg->szTag; if(*(msg->pData)) { req.append(" "); req.append(msg->pData); @@ -1025,20 +1025,20 @@ void KviServerParser::echoCtcpRequest(KviCtcpMessage *msg) } else bIsChannel = true; } - QString szRequest = pOut->decodeText(req); - QString szTag = pOut->decodeText(msg->szTag); - QString szWhat = bIsChannel ? __tr2qs("Channel CTCP") : QString("CTCP"); + TQString szRequest = pOut->decodeText(req); + TQString szTag = pOut->decodeText(msg->szTag); + TQString szWhat = bIsChannel ? __tr2qs("Channel CTCP") : TQString("CTCP"); if(msg->bIsFlood) { - QString szData = msg->msg->connection()->decodeText(msg->pData); + TQString szData = msg->msg->connection()->decodeText(msg->pData); if(!KVS_TRIGGER_EVENT_6_HALTED(KviEvent_OnCtcpFlood,pOut,msg->pSource->nick(),msg->pSource->username(),msg->pSource->host(),msg->szTarget,msg->szTag,szData)) pOut->output(KVI_OUT_CTCPREQUESTFLOOD, __tr2qs("%Q %Q%c request from \r!n\r%Q\r [%Q@\r!h\r%Q\r] (%Q), ignored (flood limit exceeded)"), &szWhat,&szTag,KVI_TEXT_RESET,&(msg->pSource->nick()), &(msg->pSource->user()),&(msg->pSource->host()),&szRequest); } else { - QString szAction = msg->bUnknown ? __tr2qs("ignored (unrecognized)") : + TQString szAction = msg->bUnknown ? __tr2qs("ignored (unrecognized)") : (msg->bIgnored ? __tr2qs("ignored") : __tr2qs("replied")); pOut->output( msg->bUnknown ? KVI_OUT_CTCPREQUESTUNKNOWN : @@ -1098,7 +1098,7 @@ void KviServerParser::parseCtcpReplyPing(KviCtcpMessage * msg) bool bOk; - if(szTime.contains('.')) + if(szTime.tqcontains('.')) { KviStr szUSecs = szTime; szUSecs.cutToFirst('.'); @@ -1130,7 +1130,7 @@ void KviServerParser::parseCtcpReplyPing(KviCtcpMessage * msg) } unsigned int uDiffMSecs = (tv.tv_usec - uMSecs) / 1000; - QString szWhat = bIsChannel ? __tr2qs("Channel CTCP") : QString("CTCP"); + TQString szWhat = bIsChannel ? __tr2qs("Channel CTCP") : TQString("CTCP"); pOut->output( msg->bUnknown ? KVI_OUT_CTCPREPLYUNKNOWN : KVI_OUT_CTCPREPLY, @@ -1147,7 +1147,7 @@ void KviServerParser::parseCtcpRequestVersion(KviCtcpMessage *msg) { if(!KVI_OPTION_BOOL(KviOption_boolIgnoreCtcpVersion)) { - QString szVersion; + TQString szVersion; #ifdef COMPILE_USE_QT4 #define QT4_TAG " (QT4) " #else @@ -1156,15 +1156,15 @@ void KviServerParser::parseCtcpRequestVersion(KviCtcpMessage *msg) #ifdef COMPILE_ON_WINDOWS szVersion = "KVIrc " KVI_VERSION QT4_TAG " '" KVI_RELEASE_NAME "' " KVI_SOURCES_DATE " - build " KVI_BUILD_DATE; - szVersion.append(QString(" - %1").arg(KviOsInfo::version())); + szVersion.append(TQString(" - %1").tqarg(KviOsInfo::version())); #else szVersion = "KVIrc " KVI_VERSION QT4_TAG " '" KVI_RELEASE_NAME "' " KVI_SOURCES_DATE " - build " KVI_BUILD_DATE " - " KVI_BUILD_FLAGS; - szVersion.append(QString(" - %1 (%2)").arg(KviOsInfo::name()).arg(KviOsInfo::release())); + szVersion.append(TQString(" - %1 (%2)").tqarg(KviOsInfo::name()).tqarg(KviOsInfo::release())); #endif - //szVersion.append(QString(" - QT Version: %1 - %2").arg(qVersion()).arg(__tr2qs("http://www.kvirc.net/"))); + //szVersion.append(TQString(" - QT Version: %1 - %2").tqarg(qVersion()).tqarg(__tr2qs("http://www.kvirc.net/"))); if(!KVI_OPTION_STRING(KviOption_stringCtcpVersionPostfix).isEmpty()) { - QString sz = KVI_OPTION_STRING(KviOption_stringCtcpVersionPostfix); + TQString sz = KVI_OPTION_STRING(KviOption_stringCtcpVersionPostfix); if(!sz.isEmpty()) { szVersion.append(" :"); @@ -1184,7 +1184,7 @@ void KviServerParser::parseCtcpRequestUserinfo(KviCtcpMessage *msg) { if(!KVI_OPTION_BOOL(KviOption_boolIgnoreCtcpUserinfo)) { - QString szReply; + TQString szReply; if(!KVI_OPTION_STRING(KviOption_stringCtcpUserInfoAge).isEmpty()) { szReply = "Age="; @@ -1312,7 +1312,7 @@ void KviServerParser::parseCtcpRequestSource(KviCtcpMessage *msg) { if(!KVI_OPTION_BOOL(KviOption_boolIgnoreCtcpSource)) { - QString version = "KVIrc " KVI_VERSION " '" KVI_RELEASE_NAME "' - http://www.kvirc.net/"; + TQString version = "KVIrc " KVI_VERSION " '" KVI_RELEASE_NAME "' - http://www.kvirc.net/"; if(!KVI_OPTION_STRING(KviOption_stringCtcpSourcePostfix).isEmpty()) { version+=" :"; @@ -1331,7 +1331,7 @@ void KviServerParser::parseCtcpRequestTime(KviCtcpMessage *msg) { if(!KVI_OPTION_BOOL(KviOption_boolIgnoreCtcpTime)) { - replyCtcp(msg,QDateTime::currentDateTime().toString()); + replyCtcp(msg,TQDateTime::tqcurrentDateTime().toString()); } else msg->bIgnored = true; } @@ -1355,7 +1355,7 @@ void KviServerParser::parseCtcpRequestPage(KviCtcpMessage *msg) if(!g_pCtcpPageDialog)g_pCtcpPageDialog = new KviCtcpPageDialog(); KviStr szData8; szData8 = msg->pData; - QString szData; + TQString szData; szData = msg->msg->connection()->decodeText(szData8.ptr()); g_pCtcpPageDialog->addPage(msg->pSource->nick(),msg->pSource->user(),msg->pSource->host(),szData); g_pCtcpPageDialog->popup(); @@ -1376,7 +1376,7 @@ void KviServerParser::parseCtcpRequestAction(KviCtcpMessage *msg) KviWindow * pOut = 0; bool bIsChannel = !IS_ME(msg->msg,msg->szTarget); - QString szData; + TQString szData; if(bIsChannel) { @@ -1444,13 +1444,13 @@ void KviServerParser::parseCtcpRequestAction(KviCtcpMessage *msg) pOut->demandAttention(); if(KVI_OPTION_BOOL(KviOption_boolPopupNotifierOnHighlightedMessages)) { - QString szMsg = ""; + TQString szMsg = ""; szMsg += msg->pSource->nick(); szMsg += " "; #ifdef COMPILE_USE_QT4 - szMsg += Qt::escape(szData); + szMsg += TQt::escape(szData); #else - szMsg += QStyleSheet::escape(szData); + szMsg += TQStyleSheet::escape(szData); #endif //debug("kvi_sp_ctcp.cpp:975 debug: %s",szMsg.data()); g_pApp->notifierMessage(pOut,KVI_OPTION_MSGTYPE(KVI_OUT_ACTION).pixId(),szMsg,90); @@ -1460,7 +1460,7 @@ void KviServerParser::parseCtcpRequestAction(KviCtcpMessage *msg) if(bTargetFound) { - QString szMsg = QString("\r!n\r%1\r ").arg(msg->pSource->nick()); + TQString szMsg = TQString("\r!n\r%1\r ").tqarg(msg->pSource->nick()); szMsg += szData; if(bIsChannel) { @@ -1490,10 +1490,10 @@ void KviServerParser::parseCtcpRequestAvatar(KviCtcpMessage *msg) // AVATAR if(!KVI_OPTION_BOOL(KviOption_boolIgnoreCtcpAvatar)) { - QString szGenderTag=" "; - if(KVI_OPTION_STRING(KviOption_stringCtcpUserInfoGender).startsWith("m",false)){ + TQString szGenderTag=" "; + if(KVI_OPTION_STRING(KviOption_stringCtcpUserInfoGender).tqstartsWith("m",false)){ szGenderTag.append("M"); - } else if(KVI_OPTION_STRING(KviOption_stringCtcpUserInfoGender).startsWith("f",false)){ + } else if(KVI_OPTION_STRING(KviOption_stringCtcpUserInfoGender).tqstartsWith("f",false)){ szGenderTag.append("F"); } else { szGenderTag.append("?"); @@ -1505,13 +1505,13 @@ void KviServerParser::parseCtcpRequestAvatar(KviCtcpMessage *msg) if(!checkCtcpFlood(msg)) { // FIXME: #warning "OPTION FOR SETTING A FIXED BIND ADDRESS FOR OUTGOING DCC OFFERS" - QString szUserMask; - msg->pSource->mask(szUserMask); + TQString szUserMask; + msg->pSource->tqmask(szUserMask); - QString szReply,szFileName; + TQString szReply,szFileName; szFileName=a->name(); if(KVI_OPTION_BOOL(KviOption_boolDCCFileTransferReplaceOutgoingSpacesWithUnderscores)) - szFileName.replace(" ","_"); + szFileName.tqreplace(" ","_"); // escape the spaces with the right octal code encodeCtcpParameter(szFileName,szReply); @@ -1531,7 +1531,7 @@ void KviServerParser::parseCtcpRequestAvatar(KviCtcpMessage *msg) KVI_OPTION_UINT(KviOption_uintAvatarOfferTimeoutInSecs),&(a->name()),&(a->localPath()),&szUserMask); } } - //if(o)szReply.append(QString(" %1").arg(o->fileSize())); + //if(o)szReply.append(TQString(" %1").tqarg(o->fileSize())); } szReply.append(szGenderTag); @@ -1554,9 +1554,9 @@ void KviServerParser::parseCtcpRequestAvatar(KviCtcpMessage *msg) void KviServerParser::parseCtcpReplyAvatar(KviCtcpMessage *msg) { - QString szRemoteFile; - QString szGender; - QString decoded=msg->msg->console()->decodeText(msg->pData); + TQString szRemoteFile; + TQString szGender; + TQString decoded=msg->msg->console()->decodeText(msg->pData); decoded = extractCtcpParameter(decoded.utf8().data(),szRemoteFile,true); decoded = extractCtcpParameter(decoded.utf8().data(),szGender,true); @@ -1564,16 +1564,16 @@ void KviServerParser::parseCtcpReplyAvatar(KviCtcpMessage *msg) bool bPrivate = IS_ME(msg->msg,msg->szTarget); - QString textLine; + TQString textLine; KviAvatar * avatar = 0; bool bResetAvatar = true; - QString nickLink; + TQString nickLink; - KviQString::sprintf(nickLink,"\r!n\r%Q\r",&(msg->pSource->nick())); + KviTQString::sprintf(nickLink,"\r!n\r%Q\r",&(msg->pSource->nick())); - KviIrcUserEntry * e = msg->msg->connection()->userDataBase()->find(msg->pSource->nick()); + KviIrcUserEntry * e = msg->msg->connection()->userDataBase()->tqfind(msg->pSource->nick()); if(e){ if( (szGender=="m") || (szGender=="M") ) { e->setGender(KviIrcUserEntry::Male); @@ -1584,33 +1584,33 @@ void KviServerParser::parseCtcpReplyAvatar(KviCtcpMessage *msg) } } - QString szWhere = bPrivate ? __tr2qs("private") : __tr2qs("channel notification:"); - QString szWhat = bPrivate ? __tr2qs("notification") : msg->szTarget; + TQString szWhere = bPrivate ? __tr2qs("private") : __tr2qs("channel notification:"); + TQString szWhat = bPrivate ? __tr2qs("notification") : msg->szTarget; if(szRemoteFile.isEmpty()) { // avatar unset - KviQString::sprintf(textLine,__tr2qs("%Q unsets avatar"), + KviTQString::sprintf(textLine,__tr2qs("%Q unsets avatar"), &nickLink); if(_OUTPUT_VERBOSE) - KviQString::appendFormatted(textLine," (%Q %Q)",&szWhere,&szWhat); + KviTQString::appendFormatted(textLine," (%Q %Q)",&szWhere,&szWhat); } else { // FIXME: #warning "The avatar should be the one with the requested size!!" - KviQString::sprintf(textLine,__tr2qs("%Q changes avatar to %s"), + KviTQString::sprintf(textLine,__tr2qs("%Q changes avatar to %s"), &nickLink,szRemoteFile.utf8().data(),&szWhere,&szWhat); if(_OUTPUT_VERBOSE) - KviQString::appendFormatted(textLine," (%Q %Q)",&szWhere,&szWhat); + KviTQString::appendFormatted(textLine," (%Q %Q)",&szWhere,&szWhat); - bool bIsUrl = KviQString::equalCIN("http://",szRemoteFile,7) && (szRemoteFile.length() > 7); + bool bIsUrl = KviTQString::equalCIN("http://",szRemoteFile,7) && (szRemoteFile.length() > 7); if(!bIsUrl) { // no hacks - KviQString::cutToLast(szRemoteFile,'/'); - KviQString::cutToLast(szRemoteFile,'\\'); + KviTQString::cutToLast(szRemoteFile,'/'); + KviTQString::cutToLast(szRemoteFile,'\\'); } - avatar = g_pIconManager->getAvatar(QString::null,szRemoteFile); + avatar = g_pIconManager->getAvatar(TQString(),szRemoteFile); if((avatar == 0) && e) { @@ -1628,11 +1628,11 @@ void KviServerParser::parseCtcpReplyAvatar(KviCtcpMessage *msg) g_pIconManager->urlToCachedFileName(szLocalFile); g_pApp->getLocalKvircDirectory(szLocalFilePath,KviApp::Avatars,szLocalFile.ptr()); szLocalFilePath.replaceAll('\\',"\\\\"); // <-- this is especially for windows - QString szCommand = "http.get -w=nm "; + TQString szCommand = "http.get -w=nm "; unsigned int uMaxSize = KVI_OPTION_UINT(KviOption_uintMaximumRequestedAvatarSize); - if(uMaxSize > 0)KviQString::appendFormatted(szCommand,"-m=%u ",uMaxSize); - szRemoteFile = szRemoteFile.replace(";","%3B"); - szRemoteFile = szRemoteFile.replace("\"","%22"); + if(uMaxSize > 0)KviTQString::appendFormatted(szCommand,"-m=%u ",uMaxSize); + szRemoteFile = szRemoteFile.tqreplace(";","%3B"); + szRemoteFile = szRemoteFile.tqreplace("\"","%22"); szCommand += "\""+szRemoteFile+"\""; szCommand += " \""; szCommand += szLocalFilePath.ptr(); @@ -1642,7 +1642,7 @@ void KviServerParser::parseCtcpReplyAvatar(KviCtcpMessage *msg) { if(_OUTPUT_VERBOSE) { - KviQString::appendFormatted(textLine, + KviTQString::appendFormatted(textLine, __tr2qs(": No valid local copy of avatar available, requesting one (HTTP GET %s)"), szRemoteFile.utf8().data()); } @@ -1650,19 +1650,19 @@ void KviServerParser::parseCtcpReplyAvatar(KviCtcpMessage *msg) szRemoteFile,msg->pSource->nick(),msg->pSource->username(),msg->pSource->host()); } else { if(_OUTPUT_VERBOSE) - KviQString::appendFormatted(textLine,__tr2qs(": No valid local copy of avatar available; failed to start an HTTP transfer, ignoring")); + KviTQString::appendFormatted(textLine,__tr2qs(": No valid local copy of avatar available; failed to start an HTTP transfer, ignoring")); } } else { if(!checkCtcpFlood(msg)) { if(_OUTPUT_VERBOSE) { - KviQString::appendFormatted(textLine, + KviTQString::appendFormatted(textLine, __tr2qs(": No valid local copy of avatar available, requesting one (DCC GET %s)"), szRemoteFile.utf8().data()); } - QString szFName; + TQString szFName; encodeCtcpParameter(szRemoteFile.utf8().data(),szFName); msg->msg->connection()->sendFmtData("PRIVMSG %s :%cDCC GET %s%c", msg->msg->connection()->encodeText(msg->pSource->nick()).data(),0x01,msg->msg->connection()->encodeText(szFName.utf8().data()).data(),0x01); @@ -1670,12 +1670,12 @@ void KviServerParser::parseCtcpReplyAvatar(KviCtcpMessage *msg) szRemoteFile,msg->pSource->nick(),msg->pSource->username(),msg->pSource->host()); } else { if(_OUTPUT_VERBOSE) - KviQString::appendFormatted(textLine,__tr2qs(": No valid local copy of avatar available; flood limit exceeded, ignoring")); + KviTQString::appendFormatted(textLine,__tr2qs(": No valid local copy of avatar available; flood limit exceeded, ignoring")); } } } else { if(_OUTPUT_VERBOSE) - KviQString::appendFormatted(textLine,__tr2qs(": No valid local copy of avatar available, ignoring")); + KviTQString::appendFormatted(textLine,__tr2qs(": No valid local copy of avatar available, ignoring")); } } } @@ -1683,7 +1683,7 @@ void KviServerParser::parseCtcpReplyAvatar(KviCtcpMessage *msg) if(!e) { if(_OUTPUT_VERBOSE) - KviQString::appendFormatted(textLine,__tr2qs(": No such nickname in the user database, ignoring the change")); + KviTQString::appendFormatted(textLine,__tr2qs(": No such nickname in the user database, ignoring the change")); msg->msg->console()->outputNoFmt(KVI_OUT_AVATAR,textLine); return; } @@ -1691,7 +1691,7 @@ void KviServerParser::parseCtcpReplyAvatar(KviCtcpMessage *msg) if(bResetAvatar)e->setAvatar(avatar); msg->msg->console()->avatarChanged(avatar,msg->pSource->nick(),msg->pSource->user(),msg->pSource->host(), - msg->msg->haltOutput() ? QString::null : textLine); + msg->msg->haltOutput() ? TQString() : textLine); } @@ -1763,7 +1763,7 @@ void KviServerParser::parseCtcpRequestDcc(KviCtcpMessage *msg) { if(!msg->msg->haltOutput()) { - QString decoded = msg->msg->console()->decodeText(p.szType.ptr()); + TQString decoded = msg->msg->console()->decodeText(p.szType.ptr()); msg->msg->console()->output(KVI_OUT_DCCREQUEST, __tr2qs("Processing DCC %Q request from \r!n\r%Q\r [%Q@\r!h\r%Q\r] (%s %s)"), &decoded,&(msg->pSource->nick()), @@ -1795,20 +1795,20 @@ void KviServerParser::parseCtcpRequestDcc(KviCtcpMessage *msg) void KviServerParser::parseCtcpReplyUserinfo(KviCtcpMessage *msg) { - QString szRemoteFile; - QString szGender; - QString decoded=msg->msg->console()->decodeText(msg->pData); + TQString szRemoteFile; + TQString szGender; + TQString decoded=msg->msg->console()->decodeText(msg->pData); bool bNeedToUpdateUserlist = false; - KviIrcUserEntry * e = msg->msg->connection()->userDataBase()->find(msg->pSource->nick()); + KviIrcUserEntry * e = msg->msg->connection()->userDataBase()->tqfind(msg->pSource->nick()); if(e) { - int pos = decoded.find("Gender=",0,false); + int pos = decoded.tqfind("Gender=",0,false); if(pos>=0) { - QChar c = decoded[pos+7]; - switch(c.unicode()) + TQChar c = decoded[pos+7]; + switch(c.tqunicode()) { case 'F': case 'f': @@ -1826,7 +1826,7 @@ void KviServerParser::parseCtcpReplyUserinfo(KviCtcpMessage *msg) if(bNeedToUpdateUserlist) { - if(KviQString::equalCS(g_pActiveWindow->className(),QString("KviChannel"))) + if(KviTQString::equalCS(g_pActiveWindow->className(),TQString("KviChannel"))) { ((KviChannel*)g_pActiveWindow)->userListView()->updateArea(); } diff --git a/src/kvirc/sparser/kvi_sp_literal.cpp b/src/kvirc/sparser/kvi_sp_literal.cpp index f6a63a5a..c86523f9 100644 --- a/src/kvirc/sparser/kvi_sp_literal.cpp +++ b/src/kvirc/sparser/kvi_sp_literal.cpp @@ -70,12 +70,12 @@ //#include "kvi_regusersdb.h" //#include "kvi_iconmanager.h" -#include +#include #ifdef COMPILE_USE_QT4 - #include + #include #else - #include + #include #endif extern KviNickServRuleSet * g_pNickServRuleSet; @@ -92,8 +92,8 @@ void KviServerParser::parseLiteralPing(KviIrcMessage *msg) // PING : msg->connection()->sendFmtData("PONG %s",msg->console()->connection()->encodeText(msg->allParams()).data()); - QString szPrefix = msg->connection()->decodeText(msg->safePrefix()); - QString szAllParams = msg->connection()->decodeText(msg->allParams()); + TQString szPrefix = msg->connection()->decodeText(msg->safePrefix()); + TQString szAllParams = msg->connection()->decodeText(msg->allParams()); if(KVS_TRIGGER_EVENT_2_HALTED(KviEvent_OnPing,msg->console(),szPrefix,szAllParams)) msg->setHaltOutput(); @@ -113,8 +113,8 @@ void KviServerParser::parseLiteralPing(KviIrcMessage *msg) void KviServerParser::parseLiteralPong(KviIrcMessage *msg) { - QString szPrefix = msg->connection()->decodeText(msg->safePrefix()); - QString szAllParams = msg->connection()->decodeText(msg->allParams()); + TQString szPrefix = msg->connection()->decodeText(msg->safePrefix()); + TQString szAllParams = msg->connection()->decodeText(msg->allParams()); if(KVS_TRIGGER_EVENT_2_HALTED(KviEvent_OnPong,msg->console(),szPrefix,szAllParams)) msg->setHaltOutput(); @@ -145,8 +145,8 @@ void KviServerParser::parseLiteralError(KviIrcMessage *msg) // ERROR : // ERROR :Closing Link: phoenix.pragmaware.net (Ping timeout) - QString szPrefix = msg->connection()->decodeText(msg->safePrefix()); - QString szParams = msg->connection()->decodeText(msg->allParams()); + TQString szPrefix = msg->connection()->decodeText(msg->safePrefix()); + TQString szParams = msg->connection()->decodeText(msg->allParams()); if(KVS_TRIGGER_EVENT_2_HALTED(KviEvent_OnError,msg->console(),szPrefix,szParams)) msg->setHaltOutput(); @@ -167,12 +167,12 @@ void KviServerParser::parseLiteralError(KviIrcMessage *msg) void KviServerParser::parseLiteralJoin(KviIrcMessage *msg) { // JOIN - // : JOIN : - QString szNick,szUser,szHost; + // : JOIN : + TQString szNick,szUser,szHost; msg->decodeAndSplitPrefix(szNick,szUser,szHost); const char * encodedChan = msg->safeTrailing(); - QString channel = msg->connection()->decodeText(encodedChan); + TQString channel = msg->connection()->decodeText(encodedChan); if(channel.isEmpty()) { @@ -184,15 +184,15 @@ void KviServerParser::parseLiteralJoin(KviIrcMessage *msg) // check for extended join syntax. // it is used in splits only (AFAIK) // nick!user@host JOIN :#channel\x07[o|v] - const QChar * pExt = KviQString::nullTerminatedArray(channel); + const TQChar * pExt = KviTQString::nullTerminatedArray(channel); char chExtMode = 0; - while(pExt->unicode() && (pExt->unicode() != 0x07))pExt++; - if(pExt->unicode()) + while(pExt->tqunicode() && (pExt->tqunicode() != 0x07))pExt++; + if(pExt->tqunicode()) { ++pExt; - if(pExt->unicode()) + if(pExt->tqunicode()) { - chExtMode = (char)pExt->unicode(); + chExtMode = (char)pExt->tqunicode(); channel.remove(channel.length() - 2,2); // assuming that we're at the end (we should be) } // else { senseless 0x07 in channel name ? } @@ -229,7 +229,7 @@ void KviServerParser::parseLiteralJoin(KviIrcMessage *msg) if(av) { it->globalData()->setAvatar(av); - console->avatarChanged(av,szNick,szUser,szHost,QString::null); + console->avatarChanged(av,szNick,szUser,szHost,TQString()); } } @@ -262,7 +262,7 @@ void KviServerParser::parseLiteralJoin(KviIrcMessage *msg) } } - // MODE %s b MUST BE THE LAST AUTOMATIC CHANNEL QUERY + // MODE %s b MUST BE THE LAST AUTOMATIC CHANNEL TQUERY // so we get RPL_ENDOFBANLIST as the last reply // and we know that the channel is in sync @@ -319,14 +319,14 @@ void KviServerParser::parseLiteralJoin(KviIrcMessage *msg) } //if(!bisMe) deleted because we can open query with our nick - QString szChans; + TQString szChans; int iChans = msg->connection()->getCommonChannels(szNick,szChans); KviQuery * q = console->connection()->findQuery(szNick); if(q) { if(KVI_OPTION_BOOL(KviOption_boolEnableQueryTracing)) { - q->output(KVI_OUT_QUERYTRACE, + q->output(KVI_OUT_TQUERYTRACE, __tr2qs("\r!n\r%Q\r [%Q@\r!h\r%Q\r] has just joined \r!c\r%Q\r"),&szNick,&szUser, &szHost,&channel); q->notifyCommonChannels(szNick,szUser,szHost,iChans,szChans); @@ -345,11 +345,11 @@ void KviServerParser::parseLiteralJoin(KviIrcMessage *msg) void KviServerParser::parseLiteralPart(KviIrcMessage *msg) { // PART - // : PART : - QString szNick,szUser,szHost; + // : PART : + TQString szNick,szUser,szHost; msg->decodeAndSplitPrefix(szNick,szUser,szHost); - QString szChan = msg->connection()->decodeText(msg->safeParam(0)); + TQString szChan = msg->connection()->decodeText(msg->safeParam(0)); // Now lookup the channel KviConsole * console = msg->console(); @@ -363,7 +363,7 @@ void KviServerParser::parseLiteralPart(KviIrcMessage *msg) } // always decode with the textEncoding of the channel - QString partMsg = msg->paramCount() > 1 ? chan->decodeText(msg->safeTrailing()) : QString::null; + TQString partMsg = msg->paramCount() > 1 ? chan->decodeText(msg->safeTrailing()) : TQString(); if(IS_ME(msg,szNick)) { @@ -416,17 +416,17 @@ void KviServerParser::parseLiteralPart(KviIrcMessage *msg) if(KVI_OPTION_BOOL(KviOption_boolEnableQueryTracing)) { - QString szChans; + TQString szChans; int iChans = console->connection()->getCommonChannels(szNick,szChans); KviQuery * q = console->connection()->findQuery(szNick); if(q) { if(!partMsg.isEmpty()) - q->output(KVI_OUT_QUERYTRACE, + q->output(KVI_OUT_TQUERYTRACE, __tr2qs("\r!nc\r%Q\r [%Q@\r!h\r%Q\r] has just left \r!c\r%Q\r: %Q"), &szNick,&szUser,&szHost,&szChan,&partMsg); else - q->output(KVI_OUT_QUERYTRACE, + q->output(KVI_OUT_TQUERYTRACE, __tr2qs("\r!nc\r%Q\r [%Q@\r!h\r%Q\r] has just left \r!c\r%Q\r"), &szNick,&szUser,&szHost,&szChan); q->notifyCommonChannels(szNick,szUser,szHost,iChans,szChans); @@ -437,15 +437,15 @@ void KviServerParser::parseLiteralPart(KviIrcMessage *msg) /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // -// QUIT +// TQUIT // /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// void KviServerParser::parseLiteralQuit(KviIrcMessage *msg) { - // QUIT - // : QUIT : - QString szNick,szUser,szHost; + // TQUIT + // : TQUIT : + TQString szNick,szUser,szHost; msg->decodeAndSplitPrefix(szNick,szUser,szHost); KviConsole * console = msg->console(); @@ -475,10 +475,10 @@ void KviServerParser::parseLiteralQuit(KviIrcMessage *msg) int diff = ((unsigned int)curTime) - ((unsigned int)ndd->lastNetsplitOnQuitTime()); bool bDuplicate = false; - QString szReason = aux; + TQString szReason = aux; if(diff < 6) { - if(KviQString::equalCI(ndd->lastNetsplitOnQuitReason(),szReason)) + if(KviTQString::equalCI(ndd->lastNetsplitOnQuitReason(),szReason)) { bDuplicate = true; } @@ -492,8 +492,8 @@ void KviServerParser::parseLiteralQuit(KviIrcMessage *msg) KviStr sz1(aux,daSpace - aux); KviStr sz2(daSpace + 1); - QString szD1 = msg->connection()->decodeText(sz1.ptr()); - QString szD2 = msg->connection()->decodeText(sz2.ptr()); + TQString szD1 = msg->connection()->decodeText(sz1.ptr()); + TQString szD2 = msg->connection()->decodeText(sz2.ptr()); if(!KVS_TRIGGER_EVENT_2_HALTED(KviEvent_OnNetsplit,console,szD1,szD2)) { if(!msg->haltOutput()) @@ -508,8 +508,8 @@ void KviServerParser::parseLiteralQuit(KviIrcMessage *msg) if(KviKvsEventManager::instance()->hasAppHandlers(KviEvent_OnQuit)) { // compute the channel list - QString chanlist; - QString szReason = msg->connection()->decodeText(msg->safeTrailing()); + TQString chanlist; + TQString szReason = msg->connection()->decodeText(msg->safeTrailing()); for(KviChannel *daChan=console->channelList()->first();daChan;daChan=console->channelList()->next()) { @@ -541,14 +541,14 @@ void KviServerParser::parseLiteralQuit(KviIrcMessage *msg) { if(!msg->haltOutput()) { - QString quitMsg = c->decodeText(msg->safeTrailing()); + TQString quitMsg = c->decodeText(msg->safeTrailing()); if(bWasSplit) { quitMsg.prepend("NETSPLIT "); } - if(!msg->haltOutput())c->output(KVI_OUT_QUIT, + if(!msg->haltOutput())c->output(KVI_OUT_TQUIT, __tr2qs("\r!n\r%Q\r [%Q@\r!h\r%Q\r] has quit IRC: %Q"), &szNick,&szUser,&szHost,&quitMsg); } @@ -560,12 +560,12 @@ void KviServerParser::parseLiteralQuit(KviIrcMessage *msg) KviQuery * q = msg->connection()->findQuery(szNick); if(q) { - QString quitMsg = q->decodeText(msg->safeTrailing()); + TQString quitMsg = q->decodeText(msg->safeTrailing()); if(bWasSplit) { quitMsg.prepend("NETSPLIT "); } - q->output(KVI_OUT_QUIT,__tr2qs("\r!n\r%Q\r [%Q@\r!h\r%Q\r] has quit IRC: %Q"), + q->output(KVI_OUT_TQUIT,__tr2qs("\r!n\r%Q\r [%Q@\r!h\r%Q\r] has quit IRC: %Q"), &szNick,&szUser,&szHost,&quitMsg); } } @@ -580,12 +580,12 @@ void KviServerParser::parseLiteralQuit(KviIrcMessage *msg) void KviServerParser::parseLiteralKick(KviIrcMessage *msg) { // KICK - // : KICK : - QString szNick,szUser,szHost; + // : KICK : + TQString szNick,szUser,szHost; msg->decodeAndSplitPrefix(szNick,szUser,szHost); - QString szChan = msg->connection()->decodeText(msg->safeParam(0)); - QString victim = msg->connection()->decodeText(msg->safeParam(1)); + TQString szChan = msg->connection()->decodeText(msg->safeParam(0)); + TQString victim = msg->connection()->decodeText(msg->safeParam(1)); KviConsole * console = msg->console(); KviChannel * chan = msg->connection()->findChannel(szChan); @@ -596,7 +596,7 @@ void KviServerParser::parseLiteralKick(KviIrcMessage *msg) return; } - QString szKickMsg = chan->decodeText(msg->safeTrailing()); + TQString szKickMsg = chan->decodeText(msg->safeTrailing()); if(IS_ME(msg,victim)) { @@ -607,7 +607,7 @@ void KviServerParser::parseLiteralKick(KviIrcMessage *msg) msg->setHaltOutput(); if(!KVI_OPTION_STRING(KviOption_stringOnMeKickedSound).isEmpty()) KviKvsScript::run("snd.play $0",0,new KviKvsVariantList(new KviKvsVariant(KVI_OPTION_STRING(KviOption_stringOnMeKickedSound)))); - QString szPass = chan->channelKey(); + TQString szPass = chan->channelKey(); if(KVI_OPTION_BOOL(KviOption_boolKeepChannelOpenOnKick)) { @@ -637,10 +637,10 @@ void KviServerParser::parseLiteralKick(KviIrcMessage *msg) { if(_OUTPUT_VERBOSE) console->output(KVI_OUT_SYSTEMMESSAGE,__tr2qs("Attempting to rejoin \r!c\r%Q\r..."),&szChan); - KviQCString szC = msg->connection()->encodeText(szChan); + KviTQCString szC = msg->connection()->encodeText(szChan); if(!szPass.isEmpty()) { - KviQCString szP = msg->connection()->encodeText(szChan); + KviTQCString szP = msg->connection()->encodeText(szChan); msg->connection()->sendFmtData("JOIN %s %s",szC.data(),szP.data()); } else msg->connection()->sendFmtData("JOIN %s",szC.data()); } @@ -651,10 +651,10 @@ void KviServerParser::parseLiteralKick(KviIrcMessage *msg) szNick,szUser,szHost,victim,szKickMsg)) msg->setHaltOutput(); - KviIrcUserEntry * e = msg->connection()->userDataBase()->find(victim); + KviIrcUserEntry * e = msg->connection()->userDataBase()->tqfind(victim); - QString szVHost; - QString szVUser; + TQString szVHost; + TQString szVUser; if(e) { @@ -682,9 +682,9 @@ void KviServerParser::parseLiteralKick(KviIrcMessage *msg) KviQuery * q = console->connection()->findQuery(victim); if(q) { - QString szChans; + TQString szChans; int iChans = console->connection()->getCommonChannels(victim,szChans); - q->output(KVI_OUT_QUERYTRACE, + q->output(KVI_OUT_TQUERYTRACE, __tr2qs("\r!n\r%Q\r [%Q@\r!h\r%Q\r] has just been kicked from \r!c\r%Q\r by \r!n\r%Q\r [%Q@\r!h\r%Q\r]: %Q"), &victim,&szVUser,&szVHost,&szChan, &szNick,&szUser,&szHost,&szKickMsg); @@ -711,7 +711,7 @@ void KviServerParser::parseLiteralKick(KviIrcMessage *msg) break; \ default: /* also case KviCryptEngine::DecryptError: */ \ { \ - QString szEngineError = cinf->pEngine->lastError(); \ + TQString szEngineError = cinf->pEngine->lastError(); \ _target->output(KVI_OUT_SYSTEMERROR, \ __tr2qs("The following message appears to be encrypted, but the crypto engine failed to decode it: %Q"), \ &szEngineError); \ @@ -732,11 +732,11 @@ void KviServerParser::parseLiteralPrivmsg(KviIrcMessage *msg) { // PRIVMSG // :source PRIVMSG : - QString szNick,szUser,szHost; + TQString szNick,szUser,szHost; msg->decodeAndSplitPrefix(szNick,szUser,szHost); - QString szTarget = msg->connection()->decodeText(msg->safeParam(0)); - QString szMsg = msg->connection()->decodeText(msg->safeTrailing()); + TQString szTarget = msg->connection()->decodeText(msg->safeParam(0)); + TQString szMsg = msg->connection()->decodeText(msg->safeTrailing()); KviConsole * console = msg->console(); KviRegisteredUser * u = msg->connection()->userDataBase()->registeredUser(szNick,szUser,szHost); @@ -844,7 +844,7 @@ void KviServerParser::parseLiteralPrivmsg(KviIrcMessage *msg) // FIXME: OnSpam ? if(!(msg->haltOutput() || KVI_OPTION_BOOL(KviOption_boolSilentAntiSpam))) { - QString szMsg = msg->connection()->decodeText(msg->safeTrailing()); + TQString szMsg = msg->connection()->decodeText(msg->safeTrailing()); console->output(KVI_OUT_SPAM, __tr2qs("Spam privmsg from \r!n\r%Q\r [%Q@\r!h\r%Q\r]: %Q (matching spamword \"%s\")"), &szNick,&szUser,&szHost,&szMsg,spamWord.ptr()); @@ -861,7 +861,7 @@ void KviServerParser::parseLiteralPrivmsg(KviIrcMessage *msg) // it manually or they can set the option to true at KVIrc startup if(KVI_OPTION_BOOL(KviOption_boolCreateQueryOnPrivmsg)) { - QString szMsg = msg->connection()->decodeText(msg->safeTrailing()); + TQString szMsg = msg->connection()->decodeText(msg->safeTrailing()); // We still want to create it // Give the scripter a chance to filter it out again if(KVS_TRIGGER_EVENT_4_HALTED(KviEvent_OnQueryWindowRequest, @@ -886,9 +886,9 @@ void KviServerParser::parseLiteralPrivmsg(KviIrcMessage *msg) query->userAction(szNick,szUser,szHost,KVI_USERACTION_PRIVMSG); // decrypt the message if needed KviStr szBuffer; const char * txtptr; int msgtype; - DECRYPT_IF_NEEDED(query,msg->safeTrailing(),KVI_OUT_QUERYPRIVMSG,KVI_OUT_QUERYPRIVMSGCRYPTED,szBuffer,txtptr,msgtype) + DECRYPT_IF_NEEDED(query,msg->safeTrailing(),KVI_OUT_TQUERYPRIVMSG,KVI_OUT_TQUERYPRIVMSGCRYPTED,szBuffer,txtptr,msgtype) // trigger the script event and eventually kill the output - QString szMsgText = query->decodeText(txtptr); + TQString szMsgText = query->decodeText(txtptr); if(KVS_TRIGGER_EVENT_4_HALTED(KviEvent_OnQueryMessage,query,szNick,szUser,szHost,szMsgText)) msg->setHaltOutput(); @@ -917,12 +917,12 @@ void KviServerParser::parseLiteralPrivmsg(KviIrcMessage *msg) // don't send the message to the notifier twice iFlags |= KviConsole::NoNotifier; #ifdef COMPILE_USE_QT4 - QString szMsg = Qt::escape(szMsgText); + TQString szMsg = TQt::escape(szMsgText); #else - QString szMsg = QStyleSheet::escape(szMsgText); + TQString szMsg = TQStyleSheet::escape(szMsgText); #endif //debug("kvi_sp_literal.cpp:908 debug: %s",szMsg.data()); - g_pApp->notifierMessage(query,KVI_SMALLICON_QUERYPRIVMSG,szMsg,1800); + g_pApp->notifierMessage(query,KVI_SMALLICON_TQUERYPRIVMSG,szMsg,1800); } } console->outputPrivmsg(query,msgtype,szNick,szUser,szHost,szMsgText,iFlags); @@ -930,7 +930,7 @@ void KviServerParser::parseLiteralPrivmsg(KviIrcMessage *msg) } else { // no query creation: no decryption possible // trigger the query message event in the console - QString szMsgText = msg->connection()->decodeText(msg->safeTrailing()); + TQString szMsgText = msg->connection()->decodeText(msg->safeTrailing()); if(KVS_TRIGGER_EVENT_4_HALTED(KviEvent_OnQueryMessage,console,szNick,szUser,szHost,szMsgText)) msg->setHaltOutput(); @@ -963,7 +963,7 @@ void KviServerParser::parseLiteralPrivmsg(KviIrcMessage *msg) } } - pOut->output(KVI_OUT_QUERYPRIVMSG,"[PRIVMSG \r!nc\r%Q\r]: %Q",&szNick,&szMsgText); + pOut->output(KVI_OUT_TQUERYPRIVMSG,"[PRIVMSG \r!nc\r%Q\r]: %Q",&szNick,&szMsgText); } } } else { @@ -971,8 +971,8 @@ void KviServerParser::parseLiteralPrivmsg(KviIrcMessage *msg) KviChannel * chan = msg->connection()->findChannel(szTarget); - QString szOriginalTarget = szTarget; - QString szPrefixes; + TQString szOriginalTarget = szTarget; + TQString szPrefixes; //Ignore it? if(u) @@ -993,7 +993,7 @@ void KviServerParser::parseLiteralPrivmsg(KviIrcMessage *msg) if(!chan) { // check if the channel has some leading mode prefixes - while((szTarget.length() > 0) && console->connection()->serverInfo()->isSupportedModePrefix(szTarget[0].unicode())) + while((szTarget.length() > 0) && console->connection()->serverInfo()->isSupportedModePrefix(szTarget[0].tqunicode())) { szPrefixes += szTarget[0]; szTarget.remove(0,1); @@ -1005,11 +1005,11 @@ void KviServerParser::parseLiteralPrivmsg(KviIrcMessage *msg) { if(!msg->haltOutput()) { - QString szMsgText = msg->connection()->decodeText(msg->safeTrailing()); + TQString szMsgText = msg->connection()->decodeText(msg->safeTrailing()); KviWindow * pOut = KVI_OPTION_BOOL(KviOption_boolOperatorMessagesToActiveWindow) ? console->activeWindow() : (KviWindow *)(console); - QString broad; - KviQString::sprintf(broad,"[>> %Q] %Q",&szOriginalTarget,&szMsgText); + TQString broad; + KviTQString::sprintf(broad,"[>> %Q] %Q",&szOriginalTarget,&szMsgText); console->outputPrivmsg(pOut,KVI_OUT_BROADCASTPRIVMSG,szNick,szUser,szHost,broad,0); } } else { @@ -1018,7 +1018,7 @@ void KviServerParser::parseLiteralPrivmsg(KviIrcMessage *msg) KviStr szBuffer; const char * txtptr; int msgtype; DECRYPT_IF_NEEDED(chan,msg->safeTrailing(),KVI_OUT_CHANPRIVMSG,KVI_OUT_CHANPRIVMSGCRYPTED,szBuffer,txtptr,msgtype) - QString szMsgText = chan->decodeText(txtptr); + TQString szMsgText = chan->decodeText(txtptr); if(KVS_TRIGGER_EVENT_5_HALTED(KviEvent_OnChannelMessage,chan,szNick,szUser,szHost,szMsgText,szPrefixes)) msg->setHaltOutput(); @@ -1027,8 +1027,8 @@ void KviServerParser::parseLiteralPrivmsg(KviIrcMessage *msg) { if(szPrefixes.length() > 0) { - QString szBroad; - KviQString::sprintf(szBroad,"[>> %Q\r!c\r%Q\r] %Q",&szPrefixes,&szTarget,&szMsgText); + TQString szBroad; + KviTQString::sprintf(szBroad,"[>> %Q\r!c\r%Q\r] %Q",&szPrefixes,&szTarget,&szMsgText); console->outputPrivmsg(chan,msgtype,szNick,szUser,szHost,szBroad,0); } else { console->outputPrivmsg(chan,msgtype,szNick,szUser,szHost,szMsgText,0); @@ -1043,7 +1043,7 @@ void KviServerParser::parseLiteralNotice(KviIrcMessage *msg) { // NOTICE // :source NOTICE : - QString szNick,szUser,szHost; + TQString szNick,szUser,szHost; msg->decodeAndSplitPrefix(szNick,szUser,szHost); KviConsole * console = msg->console(); @@ -1052,11 +1052,11 @@ void KviServerParser::parseLiteralNotice(KviIrcMessage *msg) { if(szUser == "*") { - if(szNick.find('.') != -1) + if(szNick.tqfind('.') != -1) { // server notice // FIXME: "Dedicated window for server notices ?" - QString szMsgText = msg->connection()->decodeText(msg->safeTrailing()); + TQString szMsgText = msg->connection()->decodeText(msg->safeTrailing()); if(KVS_TRIGGER_EVENT_2_HALTED(KviEvent_OnServerNotice,console,szNick,szMsgText)) msg->setHaltOutput(); if(!msg->haltOutput()) @@ -1095,7 +1095,7 @@ void KviServerParser::parseLiteralNotice(KviIrcMessage *msg) } } - QString szTarget = msg->connection()->decodeText(msg->safeParam(0)); + TQString szTarget = msg->connection()->decodeText(msg->safeParam(0)); KviRegisteredUser * u = msg->connection()->userDataBase()->registeredUser(szNick,szUser,szHost); //Ignore it? @@ -1105,7 +1105,7 @@ void KviServerParser::parseLiteralNotice(KviIrcMessage *msg) { if(KVI_OPTION_BOOL(KviOption_boolVerboseIgnore)) { - QString szMsg = msg->connection()->decodeText(msg->safeTrailing()); + TQString szMsg = msg->connection()->decodeText(msg->safeTrailing()); console->output(KVI_OUT_IGNORE,__tr2qs("Ignoring Notice from \r!nc\r%Q\r [%Q@\r!h\r%Q\r]: %Q"),&szNick,&szUser,&szHost,&szMsg); } return; @@ -1117,9 +1117,9 @@ void KviServerParser::parseLiteralNotice(KviIrcMessage *msg) { // FIXME: "The NickServ and ChanServ handling should be optional!" - if(KviQString::equalCI(szNick,"NickServ")) + if(KviTQString::equalCI(szNick,"NickServ")) { - QString szMsgText = msg->connection()->decodeText(msg->safeTrailing()); + TQString szMsgText = msg->connection()->decodeText(msg->safeTrailing()); if(KVS_TRIGGER_EVENT_4_HALTED(KviEvent_OnNickServNotice,console,szNick,szUser,szHost,szMsgText)) msg->setHaltOutput(); @@ -1171,9 +1171,9 @@ void KviServerParser::parseLiteralNotice(KviIrcMessage *msg) return; } - if(KviQString::equalCI(szNick,"ChanServ")) + if(KviTQString::equalCI(szNick,"ChanServ")) { - QString szMsgText = msg->connection()->decodeText(msg->safeTrailing()); + TQString szMsgText = msg->connection()->decodeText(msg->safeTrailing()); if(KVS_TRIGGER_EVENT_4_HALTED(KviEvent_OnChanServNotice,console,szNick,szUser,szHost,szMsgText)) msg->setHaltOutput(); if(!msg->haltOutput()) @@ -1211,8 +1211,8 @@ void KviServerParser::parseLiteralNotice(KviIrcMessage *msg) if(!(msg->haltOutput() || KVI_OPTION_BOOL(KviOption_boolSilentAntiSpam))) { - QString szMsgText = msg->connection()->decodeText(msg->safeTrailing()); - QString szSpamWord = spamWord.ptr(); + TQString szMsgText = msg->connection()->decodeText(msg->safeTrailing()); + TQString szSpamWord = spamWord.ptr(); console->output(KVI_OUT_SPAM,__tr2qs("Spam notice from \r!n\r%Q\r [%Q@\r!h\r%Q\r]: %Q (matching spamword \"%Q\")"), &szNick,&szUser,&szHost,&szMsgText,&szSpamWord); } @@ -1228,7 +1228,7 @@ void KviServerParser::parseLiteralNotice(KviIrcMessage *msg) // it manually or they can set the option to true at KVIrc startup if(KVI_OPTION_BOOL(KviOption_boolCreateQueryOnNotice)) { - QString szMsgText = msg->connection()->decodeText(msg->safeTrailing()); + TQString szMsgText = msg->connection()->decodeText(msg->safeTrailing()); // We still want to create it // Give the scripter a chance to filter it out again if(KVS_TRIGGER_EVENT_4_HALTED(KviEvent_OnQueryWindowRequest,console,szNick,szUser,szHost,szMsgText)) @@ -1252,8 +1252,8 @@ void KviServerParser::parseLiteralNotice(KviIrcMessage *msg) query->userAction(szNick,szUser,szHost,KVI_USERACTION_NOTICE); // decrypt it if needed KviStr szBuffer; const char * txtptr; int msgtype; - DECRYPT_IF_NEEDED(query,msg->safeTrailing(),KVI_OUT_QUERYNOTICE,KVI_OUT_QUERYNOTICECRYPTED,szBuffer,txtptr,msgtype) - QString szMsgText = query->decodeText(txtptr); + DECRYPT_IF_NEEDED(query,msg->safeTrailing(),KVI_OUT_TQUERYNOTICE,KVI_OUT_TQUERYNOTICECRYPTED,szBuffer,txtptr,msgtype) + TQString szMsgText = query->decodeText(txtptr); // trigger the script event and eventually kill the output if(KVS_TRIGGER_EVENT_4_HALTED(KviEvent_OnQueryNotice,query,szNick,szUser,szHost,szMsgText)) msg->setHaltOutput(); @@ -1275,19 +1275,19 @@ void KviServerParser::parseLiteralNotice(KviIrcMessage *msg) // don't send the message twice to the notifier iFlags |= KviConsole::NoNotifier; #ifdef COMPILE_USE_QT4 - QString szMsg = Qt::escape(szMsgText); + TQString szMsg = TQt::escape(szMsgText); #else - QString szMsg = QStyleSheet::escape(szMsgText); + TQString szMsg = TQStyleSheet::escape(szMsgText); #endif //debug("kvi_sp_literal.cpp:908 debug: %s",szMsg.data()); - g_pApp->notifierMessage(query,KVI_SMALLICON_QUERYNOTICE,szMsg,1800); + g_pApp->notifierMessage(query,KVI_SMALLICON_TQUERYNOTICE,szMsg,1800); } } console->outputPrivmsg(query,msgtype,szNick,szUser,szHost,szMsgText,iFlags); } } else { - QString szMsgText = msg->connection()->decodeText(msg->safeTrailing()); + TQString szMsgText = msg->connection()->decodeText(msg->safeTrailing()); // no query creation: no decryption possible // trigger the query message event in the console if(KVS_TRIGGER_EVENT_4_HALTED(KviEvent_OnQueryNotice,console,szNick,szUser,szHost,szMsgText)) @@ -1313,7 +1313,7 @@ void KviServerParser::parseLiteralNotice(KviIrcMessage *msg) } } - pOut->output(KVI_OUT_QUERYNOTICE,"*\r!n\r%Q\r* %Q",&szNick,&szMsgText); + pOut->output(KVI_OUT_TQUERYNOTICE,"*\r!n\r%Q\r* %Q",&szNick,&szMsgText); } } return; @@ -1322,13 +1322,13 @@ void KviServerParser::parseLiteralNotice(KviIrcMessage *msg) // Channel NOTICE KviChannel * chan = msg->connection()->findChannel(szTarget); - QString szOriginalTarget = szTarget; - QString szPrefixes; + TQString szOriginalTarget = szTarget; + TQString szPrefixes; if(!chan) { // check if the channel has some leading mode prefixes - while((szTarget.length() > 0) && console->connection()->serverInfo()->isSupportedModePrefix(szTarget[0].unicode())) + while((szTarget.length() > 0) && console->connection()->serverInfo()->isSupportedModePrefix(szTarget[0].tqunicode())) { szPrefixes += szTarget[0]; szTarget.remove(0,1); @@ -1342,9 +1342,9 @@ void KviServerParser::parseLiteralNotice(KviIrcMessage *msg) { KviWindow * pOut = KVI_OPTION_BOOL(KviOption_boolOperatorMessagesToActiveWindow) ? console->activeWindow() : (KviWindow *)(console); - QString szBroad; - QString szMsgText = msg->connection()->decodeText(msg->safeTrailing()); - KviQString::sprintf(szBroad,"[>> %Q] %Q",&szOriginalTarget,&szMsgText); + TQString szBroad; + TQString szMsgText = msg->connection()->decodeText(msg->safeTrailing()); + KviTQString::sprintf(szBroad,"[>> %Q] %Q",&szOriginalTarget,&szMsgText); console->outputPrivmsg(pOut,KVI_OUT_BROADCASTNOTICE,szNick,szUser,szHost,szBroad,0); return; } @@ -1353,7 +1353,7 @@ void KviServerParser::parseLiteralNotice(KviIrcMessage *msg) KviStr szBuffer; const char * txtptr; int msgtype; DECRYPT_IF_NEEDED(chan,msg->safeTrailing(),KVI_OUT_CHANNELNOTICE,KVI_OUT_CHANNELNOTICECRYPTED,szBuffer,txtptr,msgtype) - QString szMsgText = chan->decodeText(txtptr); + TQString szMsgText = chan->decodeText(txtptr); if(KVS_TRIGGER_EVENT_3_HALTED(KviEvent_OnChannelNotice,chan,szNick,szMsgText,szOriginalTarget))msg->setHaltOutput(); @@ -1361,8 +1361,8 @@ void KviServerParser::parseLiteralNotice(KviIrcMessage *msg) { if(szPrefixes.length() > 0) { - QString szBroad; - KviQString::sprintf(szBroad,"[>> %Q\r!c\r%Q\r] %Q",&szPrefixes,&szTarget,&szMsgText); + TQString szBroad; + KviTQString::sprintf(szBroad,"[>> %Q\r!c\r%Q\r] %Q",&szPrefixes,&szTarget,&szMsgText); console->outputPrivmsg(chan,msgtype,szNick,szUser,szHost,szBroad,0); } else { console->outputPrivmsg(chan,msgtype,szNick,szUser,szHost,szMsgText,0); @@ -1381,10 +1381,10 @@ void KviServerParser::parseLiteralNotice(KviIrcMessage *msg) void KviServerParser::parseLiteralTopic(KviIrcMessage *msg) { // TOPIC - // : TOPIC : - QString szNick,szUser,szHost; + // : TOPIC : + TQString szNick,szUser,szHost; msg->decodeAndSplitPrefix(szNick,szUser,szHost); - QString szTarget = msg->connection()->decodeText(msg->safeParam(0)); + TQString szTarget = msg->connection()->decodeText(msg->safeParam(0)); // Now lookup the channel KviChannel * chan = msg->connection()->findChannel(szTarget); @@ -1395,14 +1395,14 @@ void KviServerParser::parseLiteralTopic(KviIrcMessage *msg) return; } - QString szTopic = chan->decodeText(msg->safeTrailing()); + TQString szTopic = chan->decodeText(msg->safeTrailing()); if(KVS_TRIGGER_EVENT_4_HALTED(KviEvent_OnTopic,chan,szNick,szUser,szHost,szTopic)) msg->setHaltOutput(); chan->topicWidget()->setTopic(szTopic); chan->topicWidget()->setTopicSetBy(szNick); - QString tmp = QDateTime::currentDateTime().toString(); + TQString tmp = TQDateTime::tqcurrentDateTime().toString(); chan->topicWidget()->setTopicSetAt(tmp); chan->userAction(szNick,szUser,szHost,KVI_USERACTION_TOPIC); @@ -1419,10 +1419,10 @@ void KviServerParser::parseLiteralNick(KviIrcMessage *msg) { // NICK // :source NICK - QString szNick,szUser,szHost; + TQString szNick,szUser,szHost; msg->decodeAndSplitPrefix(szNick,szUser,szHost); KviConsole * console = msg->console(); - QString szNewNick = msg->connection()->decodeText(msg->safeTrailing()); + TQString szNewNick = msg->connection()->decodeText(msg->safeTrailing()); bool bIsMe = IS_ME(msg,szNick); @@ -1465,21 +1465,21 @@ void KviServerParser::parseLiteralNick(KviIrcMessage *msg) } KviQuery * q = console->connection()->findQuery(szNick); // It CAN happen that szNewNick first queries us without being - // on any channel then he QUITS , he reconnects , he joins + // on any channel then he TQUITS , he reconnects , he joins // a channel with szNick , queries us and changes nick to szNewNick : gotcha! // should merge the queries! KviQuery * old = console->connection()->findQuery(szNewNick); if(old && (old != q)) { - if(KVI_OPTION_BOOL(KviOption_boolEnableQueryTracing) && (!_OUTPUT_QUIET)) + if(KVI_OPTION_BOOL(KviOption_boolEnableQueryTracing) && (!_OUTPUT_TQUIET)) { - old->output(KVI_OUT_QUERYTRACE, + old->output(KVI_OUT_TQUERYTRACE, __tr2qs("The target of this query was lost and has been found when \r!n\r%Q\r [%Q@\r!h\r%Q\r] changed his nickname to \r!n\r%Q\r"), &szNick,&szUser,&szHost,&szNewNick); } if(q) { - bool bQWasActive = (q == g_pActiveWindow); + bool bTQWasActive = (q == g_pActiveWindow); if(!_OUTPUT_MUTE) { old->output(KVI_OUT_SYSTEMWARNING, @@ -1494,11 +1494,11 @@ void KviServerParser::parseLiteralNick(KviIrcMessage *msg) if(!_OUTPUT_MUTE) old->output(KVI_OUT_SYSTEMWARNING,__tr2qs("End of merged output")); old->userAction(szNewNick,szUser,szHost,KVI_USERACTION_NICK); - if(bQWasActive)old->delayedAutoRaise(); + if(bTQWasActive)old->delayedAutoRaise(); } if(KVI_OPTION_BOOL(KviOption_boolEnableQueryTracing)) { - QString szChans; + TQString szChans; int iChans = console->connection()->getCommonChannels(szNewNick,szChans); old->notifyCommonChannels(szNewNick,szUser,szHost,iChans,szChans); } @@ -1522,11 +1522,11 @@ void KviServerParser::parseLiteralInvite(KviIrcMessage *msg) { // INVITE // :source INVITE - QString szNick,szUser,szHost; + TQString szNick,szUser,szHost; msg->decodeAndSplitPrefix(szNick,szUser,szHost); - QString szTarget = msg->connection()->decodeText(msg->safeParam(0)); - QString szChannel = msg->connection()->decodeText(msg->safeParam(1)); + TQString szTarget = msg->connection()->decodeText(msg->safeParam(0)); + TQString szChannel = msg->connection()->decodeText(msg->safeParam(1)); KviConsole * console = msg->console(); KviRegisteredUser * u = msg->connection()->userDataBase()->registeredUser(szNick,szUser,szHost); @@ -1552,7 +1552,7 @@ void KviServerParser::parseLiteralInvite(KviIrcMessage *msg) { KviWindow * pOut = KVI_OPTION_BOOL(KviOption_boolInvitesToActiveWindow) ? msg->console()->activeWindow() : (KviWindow *)(msg->console()); - QString szAction = KVI_OPTION_BOOL(KviOption_boolAutoJoinOnInvite) ? __tr2qs("autojoining") : __tr2qs("double-click the channel name to join"); + TQString szAction = KVI_OPTION_BOOL(KviOption_boolAutoJoinOnInvite) ? __tr2qs("autojoining") : __tr2qs("double-click the channel name to join"); pOut->output(KVI_OUT_INVITE,__tr2qs("\r!n\r%Q\r [%Q@\r!h\r%Q\r] invites you to channel \r!c\r%Q\r (%Q)"), &szNick,&szUser,&szHost,&szChannel,&szAction); } @@ -1569,10 +1569,10 @@ void KviServerParser::parseLiteralWallops(KviIrcMessage *msg) { // WALLOPS // :source WALLOPS :msg - QString szNick,szUser,szHost; + TQString szNick,szUser,szHost; msg->decodeAndSplitPrefix(szNick,szUser,szHost); - QString szMsg = msg->connection()->decodeText(msg->safeTrailing()); + TQString szMsg = msg->connection()->decodeText(msg->safeTrailing()); if(KVS_TRIGGER_EVENT_4_HALTED(KviEvent_OnWallops,msg->console(),szNick,szUser,szHost,szMsg)) msg->setHaltOutput(); @@ -1607,8 +1607,8 @@ void KviServerParser::parseUserMode(KviIrcMessage *msg,const char * modeflptr) // There was a mode change if(KviKvsEventManager::instance()->hasAppHandlers(KviEvent_OnUserMode)) { - QString szModeFlag(bSet ? QChar('+') : QChar('-')); - szModeFlag += QChar(*modeflptr); + TQString szModeFlag(bSet ? TQChar('+') : TQChar('-')); + szModeFlag += TQChar(*modeflptr); KviKvsVariantList vList(new KviKvsVariant(szModeFlag)); if(KviKvsEventManager::instance()->trigger(KviEvent_OnUserMode,msg->console(),&vList)) msg->setHaltOutput(); @@ -1628,17 +1628,17 @@ void KviServerParser::parseLiteralMode(KviIrcMessage *msg) // :source MODE target // :source MODE +|-modeflag // :source MODE +-modeflags [parameters] - QString szNick,szUser,szHost; + TQString szNick,szUser,szHost; msg->decodeAndSplitPrefix(szNick,szUser,szHost); // if(!source.hasHost()) // { // // This is a server or a channel service // KviStr snick = source.nick(); - // if(snick.contains('.'))source.setHost(source.nick()); // this is a server + // if(snick.tqcontains('.'))source.setHost(source.nick()); // this is a server // } - QString szTarget = msg->connection()->decodeText(msg->safeParam(0)); + TQString szTarget = msg->connection()->decodeText(msg->safeParam(0)); KviStr modefl(msg->safeParam(1)); if(IS_ME(msg,szTarget)) @@ -1661,34 +1661,34 @@ void KviServerParser::parseLiteralMode(KviIrcMessage *msg) } } -void KviServerParser::parseChannelMode(const QString &szNick,const QString &szUser,const QString &szHost,KviChannel * chan,KviStr &modefl,KviIrcMessage *msg,int curParam) +void KviServerParser::parseChannelMode(const TQString &szNick,const TQString &szUser,const TQString &szHost,KviChannel * chan,KviStr &modefl,KviIrcMessage *msg,int curParam) { // FIXME: freenode has two ugly incompatible extensions: // mode e: that is NOT viewable (???) // mode q that stands for "quiet-ban" - // mode #chan +q mask - // adds mask to the banlist with the prefix % - // and doesn't allow the users matching the mask to talk to the channel + // mode #chan +q tqmask + // adds tqmask to the banlist with the prefix % + // and doesn't allow the users matching the tqmask to talk to the channel bool bSet = true; const char * aux = modefl.ptr(); - QString aParam; + TQString aParam; - QString nickBuffer; - QString hostBuffer; + TQString nickBuffer; + TQString hostBuffer; if(szHost != "*") { - KviQString::sprintf(nickBuffer,"\r!n\r%Q\r",&szNick); - KviQString::sprintf(hostBuffer,"\r!h\r%Q\r",&szHost); + KviTQString::sprintf(nickBuffer,"\r!n\r%Q\r",&szNick); + KviTQString::sprintf(hostBuffer,"\r!h\r%Q\r",&szHost); } else { - if(nickBuffer.find('.') != -1) + if(nickBuffer.tqfind('.') != -1) { // This looks a lot like a server! - KviQString::sprintf(nickBuffer,"\r!s\r%Q\r",&szNick); + KviTQString::sprintf(nickBuffer,"\r!s\r%Q\r",&szNick); } else { // Probably a service....whois should work - KviQString::sprintf(nickBuffer,"\r!n\r%Q\r",&szNick); + KviTQString::sprintf(nickBuffer,"\r!n\r%Q\r",&szNick); } hostBuffer = szHost; } @@ -1800,7 +1800,7 @@ void KviServerParser::parseChannelMode(const QString &szNick,const QString &szUs #define CHANNEL_MODE(__modefl,__evmeset,__evmeunset,__evset,__evunset,__icomeset,__icomeunset,__icoset,__icounset) \ case __modefl: \ aParam = msg->connection()->decodeText(msg->safeParam(curParam++)); \ - chan->setMask(*aux,aParam,bSet,msg->connection()->decodeText(msg->safePrefix()),QDateTime::currentDateTime().toTime_t()); \ + chan->setMask(*aux,aParam,bSet,msg->connection()->decodeText(msg->safePrefix()),TQDateTime::tqcurrentDateTime().toTime_t()); \ auxMask = new KviIrcMask(aParam); \ bIsMe = auxMask->matchesFixed( \ msg->connection()->userInfo()->nickName(), \ @@ -1840,8 +1840,8 @@ void KviServerParser::parseChannelMode(const QString &szNick,const QString &szUs ++aux; } - QString param; - QString params; + TQString param; + TQString params; param = msg->connection()->decodeText(msg->safeParam(curParamSave++)); while(!param.isEmpty()) { diff --git a/src/kvirc/sparser/kvi_sp_numeric.cpp b/src/kvirc/sparser/kvi_sp_numeric.cpp index a4481e88..4b71c366 100644 --- a/src/kvirc/sparser/kvi_sp_numeric.cpp +++ b/src/kvirc/sparser/kvi_sp_numeric.cpp @@ -51,18 +51,18 @@ #include "kvi_lagmeter.h" #include "kvi_qcstring.h" -#include -#include -#include -#include +#include +#include +#include +#include #include "kvi_kvs_eventtriggers.h" #include "kvi_kvs_script.h" #include "kvi_kvs_variantlist.h" // #define IS_CHANNEL_TYPE_FLAG(_str) ((*(_str) == '#') || (*(_str) == '&') || (*(_str) == '!')) -#define IS_CHANNEL_TYPE_FLAG(_qchar) (msg->connection()->serverInfo()->supportedChannelTypes().find(_qchar) != -1) -#define IS_USER_MODE_PREFIX(_qchar) (msg->connection()->serverInfo()->supportedModePrefixes().find(_qchar) != -1) +#define IS_CHANNEL_TYPE_FLAG(_qchar) (msg->connection()->serverInfo()->supportedChannelTypes().tqfind(_qchar) != -1) +#define IS_USER_MODE_PREFIX(_qchar) (msg->connection()->serverInfo()->supportedModePrefixes().tqfind(_qchar) != -1) // Numeric message handlers @@ -72,13 +72,13 @@ void KviServerParser::parseNumeric001(KviIrcMessage *msg) { // 001: RPL_WELCOME - // :prefix 001 target :Welcome to the Internet Relay Network + // :prefix 001 target :Welcome to the Internet Relay Network // FIXME: #warning "SET THE USERMASK FROM SERVER" - QString szText = msg->connection()->decodeText(msg->safeTrailing()); - QRegExp rx( " ([^ ]+)!([^ ]+)@([^ ]+)$" ); + TQString szText = msg->connection()->decodeText(msg->safeTrailing()); + TQRegExp rx( " ([^ ]+)!([^ ]+)@([^ ]+)$" ); if( rx.search(szText) != -1) { - msg->connection()->userInfo()->setUnmaskedHostName(rx.cap(3)); + msg->connection()->userInfo()->setUntqmaskedHostName(rx.cap(3)); msg->connection()->userInfo()->setNickName(rx.cap(1)); msg->connection()->userInfoReceived(rx.cap(2),rx.cap(3)); } @@ -126,7 +126,7 @@ void KviServerParser::parseNumeric004(KviIrcMessage *msg) do { umodes = msg->safeParam(uModeParam); - } while (((umodes.contains('.')) || (umodes.contains('-'))) && uModeParam++ < uParams); + } while (((umodes.tqcontains('.')) || (umodes.tqcontains('-'))) && uModeParam++ < uParams); KviStr chanmodes = msg->safeParam(uModeParam+1); @@ -139,9 +139,9 @@ void KviServerParser::parseNumeric004(KviIrcMessage *msg) if((umodes.occurences('o') != 1) || (chanmodes.occurences('o') != 1) || (chanmodes.occurences('b') != 1) || (chanmodes.occurences('v') != 1) || (chanmodes.occurences('t') != 1) || (chanmodes.occurences('n') != 1) || - (chanmodes.contains('.')) || (chanmodes.contains('-')) || (chanmodes.contains('('))) + (chanmodes.tqcontains('.')) || (chanmodes.tqcontains('-')) || (chanmodes.tqcontains('('))) { - if(!_OUTPUT_QUIET) + if(!_OUTPUT_TQUIET) { msg->console()->output(KVI_OUT_SYSTEMWARNING,__tr2qs( "One or more standard mode flags are missing in the server available modes.\n" \ @@ -159,15 +159,15 @@ void KviServerParser::parseNumeric004(KviIrcMessage *msg) if(umodes.hasData())msg->console()->outputNoFmt(KVI_OUT_SERVERINFO,__tr2qs("Available user modes:")); const char * aux = umodes.ptr(); - QString tmp; + TQString tmp; while(*aux) { tmp = msg->connection()->serverInfo()->getUserModeDescription(*aux); if(tmp.isEmpty()) { - QString tmp2 = __tr2qs(": Unknown user mode"); - KviQString::sprintf(tmp,"%c: %Q",*aux,&tmp2); + TQString tmp2 = __tr2qs(": Unknown user mode"); + KviTQString::sprintf(tmp,"%c: %Q",*aux,&tmp2); } msg->console()->outputNoFmt(KVI_OUT_SERVERINFO,tmp); @@ -180,13 +180,13 @@ void KviServerParser::parseNumeric004(KviIrcMessage *msg) while(*aux) { - KviQString::sprintf(tmp,"%c: %Q",*aux,&(msg->connection()->serverInfo()->getChannelModeDescription(*aux))); + KviTQString::sprintf(tmp,"%c: %Q",*aux,&(msg->connection()->serverInfo()->getChannelModeDescription(*aux))); msg->console()->outputNoFmt(KVI_OUT_SERVERINFO,tmp); aux++; } } - QString szServer = msg->connection()->decodeText(msg->safeParam(1)); + TQString szServer = msg->connection()->decodeText(msg->safeParam(1)); msg->connection()->serverInfoReceived(szServer,umodes.ptr(),chanmodes.ptr()); @@ -246,7 +246,7 @@ void KviServerParser::parseNumeric005(KviIrcMessage *msg) } else if(kvi_strEqualCIN("TOPICLEN=",p,9)) { p += 9; - QString tmp = p; + TQString tmp = p; if(!tmp.isEmpty()) { bool ok; int len = tmp.toInt( &ok ); @@ -255,7 +255,7 @@ void KviServerParser::parseNumeric005(KviIrcMessage *msg) } else if(kvi_strEqualCIN("NETWORK=",p,8)) { p += 8; - QString tmp = p; + TQString tmp = p; if(!tmp.isEmpty())msg->console()->connection()->target()->setNetworkName(tmp); if((!_OUTPUT_MUTE) && (!msg->haltOutput()) && KVI_OPTION_BOOL(KviOption_boolShowExtendedServerInfo)) { @@ -274,12 +274,12 @@ void KviServerParser::parseNumeric005(KviIrcMessage *msg) } else if(kvi_strEqualCIN("CHANMODES=",p,10)) { p+=10; - QString tmp = p; + TQString tmp = p; msg->connection()->serverInfo()->setSupportedChannelModes(tmp); }else if(kvi_strEqualCIN("MODES=",p,6)) { p+=6; - QString tmp = p; + TQString tmp = p; bool bok; int num=tmp.toUInt(&bok); if(bok) @@ -295,7 +295,7 @@ void KviServerParser::parseNumeric005(KviIrcMessage *msg) }else if(kvi_strEqualCIN("CHARSET=",p,8)) { p+=8; - QString tmp = p; + TQString tmp = p; msg->connection()->serverInfo()->setSupportsCodePages(true); if((!_OUTPUT_MUTE) && (!msg->haltOutput()) && KVI_OPTION_BOOL(KviOption_boolShowExtendedServerInfo)) @@ -303,7 +303,7 @@ void KviServerParser::parseNumeric005(KviIrcMessage *msg) msg->console()->outputNoFmt(KVI_OUT_SERVERINFO,__tr2qs("This server supports the CODEPAGE command, it will be used")); } - /*if( tmp.contains(msg->console()->textCodec()->name(),false) || tmp.contains("*",false) ) + /*if( tmp.tqcontains(msg->console()->textCodec()->name(),false) || tmp.tqcontains("*",false) ) { msg->connection()->sendFmtData("CODEPAGE %s",msg->console()->textCodec()->name()); }*/ @@ -322,7 +322,7 @@ void KviServerParser::parseNumeric005(KviIrcMessage *msg) } } } else { - QString inf = msg->connection()->decodeText(msg->safeTrailing()); + TQString inf = msg->connection()->decodeText(msg->safeTrailing()); if(!msg->haltOutput())msg->console()->outputNoFmt(KVI_OUT_SERVERINFO,inf); } // } else { @@ -356,7 +356,7 @@ void KviServerParser::parseNumericEndOfNames(KviIrcMessage *msg) { // 366: RPL_ENDOFNAMES [I,E,U,D] // :prefix 366 target :End of /NAMES list. - QString szChan = msg->connection()->decodeText(msg->safeParam(1)); + TQString szChan = msg->connection()->decodeText(msg->safeParam(1)); KviChannel * chan = msg->connection()->findChannel(szChan); if(chan) { @@ -380,10 +380,10 @@ void KviServerParser::parseNumeric020(KviIrcMessage *msg) { // 020: RPL_CONNECTING //:irc.dotsrc.org 020 * :Please wait while we process your connection. - QString szServer; + TQString szServer; if(!msg->haltOutput()) { - QString szWText = msg->console()->decodeText(msg->safeTrailing()); + TQString szWText = msg->console()->decodeText(msg->safeTrailing()); msg->console()->output( KVI_OUT_CONNECTION,"%c\r!s\r%s\r%c: %Q",KVI_TEXT_BOLD, msg->safePrefix(),KVI_TEXT_BOLD,&szWText); @@ -398,8 +398,8 @@ void KviServerParser::parseNumericNames(KviIrcMessage *msg) // [=|*|@] is the type of the channel: // = --> public * --> private @ --> secret // ...but we ignore it - //QString szChan = msg->connection()->decodeText(msg->cSafeParam(2)->data()); // <-- KviQCString::data() is implicitly unsafe: it CAN return 0 - QString szChan = msg->connection()->decodeText(msg->safeParam(2)); + //TQString szChan = msg->connection()->decodeText(msg->cSafeParam(2)->data()); // <-- KviTQCString::data() is implicitly unsafe: it CAN return 0 + TQString szChan = msg->connection()->decodeText(msg->safeParam(2)); KviChannel * chan = msg->connection()->findChannel(szChan); // and run to the first nickname char * aux = msg->safeTrailingString().ptr(); @@ -442,11 +442,11 @@ void KviServerParser::parseNumericNames(KviIrcMessage *msg) char save = *aux; *aux = 0; // NAMESX + UHNAMES support - KviIrcMask mask(msg->connection()->decodeText(begin)); + KviIrcMask tqmask(msg->connection()->decodeText(begin)); // and make it join - if(!mask.nick().isEmpty())chan->join(mask.nick(), - mask.hasUser() ? mask.user() : QString::null, - mask.hasHost() ? mask.host() : QString::null, + if(!tqmask.nick().isEmpty())chan->join(tqmask.nick(), + tqmask.hasUser() ? tqmask.user() : TQString(), + tqmask.hasHost() ? tqmask.host() : TQString(), iFlags); *aux = ' '; *aux = save; @@ -468,7 +468,7 @@ void KviServerParser::parseNumericNames(KviIrcMessage *msg) // FIXME: #warning "KVI_OUT_NAMES missing" KviWindow * pOut = chan ? chan : KVI_OPTION_BOOL(KviOption_boolServerRepliesToActiveWindow) ? msg->console()->activeWindow() : (KviWindow *)(msg->console()); - QString szTrailing = trailing ? msg->connection()->decodeText(trailing) : QString(""); + TQString szTrailing = trailing ? msg->connection()->decodeText(trailing) : TQString(""); pOut->output(KVI_OUT_UNHANDLED,__tr2qs("Names for \r!c\r%Q\r: %Q"),&szChan,&szTrailing); } } @@ -477,11 +477,11 @@ void KviServerParser::parseNumericTopic(KviIrcMessage *msg) { // 332: RPL_TOPIC [I,E,U,D] // :prefix 332 target : - QString szChan = msg->connection()->decodeText(msg->safeParam(1)); + TQString szChan = msg->connection()->decodeText(msg->safeParam(1)); KviChannel * chan = msg->connection()->findChannel(szChan); if(chan) { - QString szTopic = chan->decodeText(msg->safeTrailing()); + TQString szTopic = chan->decodeText(msg->safeTrailing()); chan->topicWidget()->setTopic(szTopic); chan->topicWidget()->setTopicSetBy(__tr2qs("(unknown)")); @@ -494,7 +494,7 @@ void KviServerParser::parseNumericTopic(KviIrcMessage *msg) KviWindow * pOut = KVI_OPTION_BOOL(KviOption_boolServerRepliesToActiveWindow) ? msg->console()->activeWindow() : (KviWindow *)(msg->console()); - QString szTopic = msg->connection()->decodeText(msg->safeTrailing()); + TQString szTopic = msg->connection()->decodeText(msg->safeTrailing()); pOut->output(KVI_OUT_TOPIC,__tr2qs("Topic for \r!c\r%Q\r is: %Q"), &szChan,&szTopic); } @@ -505,7 +505,7 @@ void KviServerParser::parseNumericNoTopic(KviIrcMessage *msg) { // 331: RPL_NOTOPIC [I,E,U,D] // :prefix 331 target :No topic is set - QString szChan = msg->connection()->decodeText(msg->safeParam(1)); + TQString szChan = msg->connection()->decodeText(msg->safeParam(1)); KviChannel * chan = msg->connection()->findChannel(szChan); if(chan) { @@ -528,7 +528,7 @@ void KviServerParser::parseNumericTopicWhoTime(KviIrcMessage *msg) // 333: RPL_TOPICWHOTIME [e,U,D] // :prefix 333 target "; - buffer += __tr2qs("and other %1 users").arg(l.count() - 1); + buffer += __tr2qs("and other %1 users").tqarg(l.count() - 1); } buffer += " "; buffer += bPast ? __tr2qs("were talking recently") : __tr2qs("are talking"); } } -void KviChannel::getTaskBarTipText(QString &buffer) +void KviChannel::getTaskBarTipText(TQString &buffer) { - static QString html_bold(""); - static QString html_tab("  "); - static QString html_eofbold(" "); - static QString p5(" ("); + static TQString html_bold(""); + static TQString html_tab("  "); + static TQString html_eofbold(" "); + static TQString p5(" ("); // p6 == p4 - static QString p7(" ("); - static QString p8(": "); - static QString p9(")"); - static QString p10("
"); + static TQString p7(" ("); + static TQString p8(": "); + static TQString p9(")"); + static TQString p10("
"); - static QString end_of_doc = ""; - static QString end_of_fontboldrow = END_TABLE_BOLD_ROW; - static QString start_of_row = ""; - static QString end_of_row = ""; + static TQString end_of_doc = ""; + static TQString end_of_fontboldrow = END_TABLE_BOLD_ROW; + static TQString start_of_row = ""; + static TQString end_of_row = ""; buffer = "" \ "" \ @@ -750,15 +750,15 @@ void KviChannel::getTaskBarTipText(QString &buffer) buffer += start_of_row; - QString op = __tr2qs("operator"); - QString ops = __tr2qs("operators"); + TQString op = __tr2qs("operator"); + TQString ops = __tr2qs("operators"); ////////////////////// buffer += html_tab; buffer += html_bold; - QString num; + TQString num; num.setNum(s.uActive); buffer += num; @@ -940,7 +940,7 @@ void KviChannel::getTaskBarTipText(QString &buffer) if(cas.dActionsPerMinute >= 0.1) { - QString num; + TQString num; num.sprintf(" [%u%% ",cas.uHotActionPercent); buffer += num; buffer += __tr2qs("human"); @@ -955,15 +955,15 @@ void KviChannel::getTaskBarTipText(QString &buffer) void KviChannel::fillCaptionBuffers() { - static QString begin("
"); - static QString endofbold(" "); - static QString end(""); + static TQString begin(""); + static TQString endofbold(" "); + static TQString end(""); if(!connection()) { - QString dead = __tr2qs("[Dead channel]"); + TQString dead = __tr2qs("[Dead channel]"); m_szNameWithUserFlag = m_szName; @@ -998,13 +998,13 @@ void KviChannel::fillCaptionBuffers() if(uFlag) { - m_szNameWithUserFlag = QChar(uFlag); + m_szNameWithUserFlag = TQChar(uFlag); m_szNameWithUserFlag += m_szName; } else { m_szNameWithUserFlag = m_szName; } - QString szChanMode; + TQString szChanMode; getChannelModeString(szChanMode); m_szPlainTextCaption = m_szNameWithUserFlag; @@ -1012,16 +1012,16 @@ void KviChannel::fillCaptionBuffers() { m_szPlainTextCaption += " (+"; m_szPlainTextCaption += szChanMode; - m_szPlainTextCaption += QChar(')'); + m_szPlainTextCaption += TQChar(')'); } - QString szNickOnServer = QChar('['); + TQString szNickOnServer = TQChar('['); szNickOnServer += connection()->currentNickName(); szNickOnServer += __tr2qs(" on "); szNickOnServer += connection()->currentServerName(); - szNickOnServer += QChar(']'); + szNickOnServer += TQChar(']'); - m_szPlainTextCaption += QChar(' '); + m_szPlainTextCaption += TQChar(' '); m_szPlainTextCaption += szNickOnServer; m_szHtmlActiveCaption = begin; @@ -1045,12 +1045,12 @@ void KviChannel::fillCaptionBuffers() m_szHtmlInactiveCaption += end; } -void KviChannel::ownMessage(const QString &buffer) +void KviChannel::ownMessage(const TQString &buffer) { if(!connection())return; - KviQCString szName = connection()->encodeText(windowName()); - KviQCString szData = encodeText(buffer); + KviTQCString szName = connection()->encodeText(windowName()); + KviTQCString szData = encodeText(buffer); const char * d = szData.data(); if(!d)return; @@ -1068,20 +1068,20 @@ void KviChannel::ownMessage(const QString &buffer) case KviCryptEngine::Encrypted: if(!connection()->sendFmtData("PRIVMSG %s :%s",szName.data(),encrypted.ptr()))return; m_pConsole->outputPrivmsg(this,KVI_OUT_OWNPRIVMSGCRYPTED, - QString::null,QString::null,QString::null,buffer,KviConsole::NoNotifications); + TQString(),TQString(),TQString(),buffer,KviConsole::NoNotifications); break; case KviCryptEngine::Encoded: { if(!connection()->sendFmtData("PRIVMSG %s :%s",szName.data(),encrypted.ptr()))return; // ugly ,but we must redecode here - QString szRedecoded = decodeText(encrypted.ptr()); + TQString szRedecoded = decodeText(encrypted.ptr()); m_pConsole->outputPrivmsg(this,KVI_OUT_OWNPRIVMSG, - QString::null,QString::null,QString::null,szRedecoded,KviConsole::NoNotifications); + TQString(),TQString(),TQString(),szRedecoded,KviConsole::NoNotifications); } break; default: // also case KviCryptEngine::EncryptError { - QString szEngineError = cryptSessionInfo()->pEngine->lastError(); + TQString szEngineError = cryptSessionInfo()->pEngine->lastError(); output(KVI_OUT_SYSTEMERROR, __tr2qs("The crypto engine was unable to encrypt the current message (%Q): %Q, no data sent to the server"), &buffer,&szEngineError); @@ -1092,9 +1092,9 @@ void KviChannel::ownMessage(const QString &buffer) return; } else { d++; //eat the escape code - QString tmp = buffer.right(buffer.length() - 1); + TQString tmp = buffer.right(buffer.length() - 1); if(!connection()->sendFmtData("PRIVMSG %s :%s",szName.data(),d))return; - m_pConsole->outputPrivmsg(this,KVI_OUT_OWNPRIVMSG,QString::null,QString::null,QString::null,tmp,KviConsole::NoNotifications); + m_pConsole->outputPrivmsg(this,KVI_OUT_OWNPRIVMSG,TQString(),TQString(),TQString(),tmp,KviConsole::NoNotifications); userAction(connection()->currentNickName(),KVI_USERACTION_PRIVMSG); return; } @@ -1104,21 +1104,21 @@ void KviChannel::ownMessage(const QString &buffer) if(connection()->sendFmtData("PRIVMSG %s :%s",szName.data(),d)) { - m_pConsole->outputPrivmsg(this,KVI_OUT_OWNPRIVMSG,QString::null,QString::null,QString::null,buffer,KviConsole::NoNotifications); + m_pConsole->outputPrivmsg(this,KVI_OUT_OWNPRIVMSG,TQString(),TQString(),TQString(),buffer,KviConsole::NoNotifications); userAction(connection()->currentNickName(),KVI_USERACTION_PRIVMSG); } } -void KviChannel::ownAction(const QString &buffer) +void KviChannel::ownAction(const TQString &buffer) { if(!connection())return; - KviQCString szName = connection()->encodeText(m_szName); - KviQCString szData = encodeText(buffer); + KviTQCString szName = connection()->encodeText(m_szName); + KviTQCString szData = encodeText(buffer); const char * d = szData.data(); if(!d)return; if(!connection()->sendFmtData("PRIVMSG %s :%cACTION %s%c",szName.data(),0x01,d,0x01))return; - if(KVS_TRIGGER_EVENT_1_HALTED(KviEvent_OnMeAction,this,QString(d)))return; - QString szBuffer = "\r!nc\r"; + if(KVS_TRIGGER_EVENT_1_HALTED(KviEvent_OnMeAction,this,TQString(d)))return; + TQString szBuffer = "\r!nc\r"; szBuffer += connection()->currentNickName(); szBuffer += "\r "; szBuffer += buffer; @@ -1126,14 +1126,14 @@ void KviChannel::ownAction(const QString &buffer) userAction(connection()->currentNickName(),KVI_USERACTION_ACTION); } -bool KviChannel::nickChange(const QString &oldNick,const QString &newNick) +bool KviChannel::nickChange(const TQString &oldNick,const TQString &newNick) { bool bWasHere = m_pUserListView->nickChange(oldNick,newNick); if(bWasHere)channelAction(newNick,KVI_USERACTION_NICK,kvi_getUserActionTemperature(KVI_USERACTION_NICK)); return bWasHere; } -bool KviChannel::part(const QString &nick) +bool KviChannel::part(const TQString &nick) { bool bWasHere = m_pUserListView->part(nick); if(bWasHere)channelAction(nick,KVI_USERACTION_PART,kvi_getUserActionTemperature(KVI_USERACTION_PART)); @@ -1170,7 +1170,7 @@ bool KviChannel::activityMeter(unsigned int * puActivityValue,unsigned int * puA if(m_pActionHistory->count() < KVI_CHANNEL_ACTION_HISTORY_MAX_COUNT) { - if(m_joinTime.secsTo(QDateTime::currentDateTime()) < KVI_CHANNEL_ACTION_HISTORY_MAX_TIMESPAN) + if(m_joinTime.secsTo(TQDateTime::tqcurrentDateTime()) < KVI_CHANNEL_ACTION_HISTORY_MAX_TIMESPAN) { // we can't exactly estimate if(dSpan < 60.0)dSpan = 60.0; @@ -1208,7 +1208,7 @@ bool KviChannel::activityMeter(unsigned int * puActivityValue,unsigned int * puA } -void KviChannel::channelAction(const QString &nick,unsigned int uActionType,int iTemperature) +void KviChannel::channelAction(const TQString &nick,unsigned int uActionType,int iTemperature) { KviChannelAction * a = new KviChannelAction; a->tTime = kvi_unixTime(); @@ -1281,7 +1281,7 @@ void KviChannel::getChannelActivityStats(KviChannelActivityStats * s) if(s->uActionCount < KVI_CHANNEL_ACTION_HISTORY_MAX_COUNT) { - if(m_joinTime.secsTo(QDateTime::currentDateTime()) < KVI_CHANNEL_ACTION_HISTORY_MAX_TIMESPAN) + if(m_joinTime.secsTo(TQDateTime::tqcurrentDateTime()) < KVI_CHANNEL_ACTION_HISTORY_MAX_TIMESPAN) { // we can't exactly estimate s->bStatsInaccurate = true; @@ -1301,7 +1301,7 @@ void KviChannel::getChannelActivityStats(KviChannelActivityStats * s) tTwoMinsAgo-= 120; tNow -= 60; - KviPointerHashTable userDict; + KviPointerHashTable userDict; userDict.setAutoDelete(false); int fake; @@ -1319,7 +1319,7 @@ void KviChannel::getChannelActivityStats(KviChannelActivityStats * s) (a->uActionType == KVI_USERACTION_NOTICE) || (a->uActionType == KVI_USERACTION_ACTION)) { - if(!userDict.find(a->szNick)) + if(!userDict.tqfind(a->szNick)) { if(isOn(a->szNick.ascii())) { @@ -1338,14 +1338,14 @@ void KviChannel::getChannelActivityStats(KviChannelActivityStats * s) -void KviChannel::userAction(const QString &nick,const QString &user,const QString &host,unsigned int uActionType) +void KviChannel::userAction(const TQString &nick,const TQString &user,const TQString &host,unsigned int uActionType) { int iTemperature = kvi_getUserActionTemperature(uActionType); channelAction(nick,uActionType,iTemperature); m_pUserListView->userAction(nick,user,host,iTemperature); } -void KviChannel::userAction(const QString &nick,unsigned int uActionType) +void KviChannel::userAction(const TQString &nick,unsigned int uActionType) { int iTemperature = kvi_getUserActionTemperature(uActionType); channelAction(nick,uActionType,iTemperature); @@ -1359,15 +1359,15 @@ void KviChannel::userAction(KviIrcMask * user,unsigned int uActionType) m_pUserListView->userAction(user,iTemperature); } -void KviChannel::topicSelected(const QString & topic) +void KviChannel::topicSelected(const TQString & topic) { if(!connection())return; - KviQCString szEncoded = encodeText(topic); - KviQCString szName = connection()->encodeText(m_szName); + KviTQCString szEncoded = encodeText(topic); + KviTQCString szName = connection()->encodeText(m_szName); connection()->sendFmtData("TOPIC %s :%s",szName.data(),szEncoded.length() ? szEncoded.data() : ""); } -void KviChannel::closeEvent(QCloseEvent *e) +void KviChannel::closeEvent(TQCloseEvent *e) { if((m_iStateFlags & KVI_CHANNEL_STATE_SENTPART) || (m_iStateFlags & KVI_CHANNEL_STATE_DEADCHAN) || !(m_pConsole->isConnected())) { @@ -1378,16 +1378,16 @@ void KviChannel::closeEvent(QCloseEvent *e) // FIXME: #warning "THIS PART SHOULD BECOME A COMMAND /PART $option()..so the identifiers are parsed" if(connection()) { - QString tmp = KVI_OPTION_STRING(KviOption_stringPartMessage); - tmp.replace(";","\\;"); - tmp.replace("\n"," "); + TQString tmp = KVI_OPTION_STRING(KviOption_stringPartMessage); + tmp.tqreplace(";","\\;"); + tmp.tqreplace("\n"," "); KviKvsVariant vRet; if(KviKvsScript::evaluate(tmp,this,0,&vRet))vRet.asString(tmp); - KviQCString dat = encodeText(tmp); + KviTQCString dat = encodeText(tmp); partMessageSent(); - KviQCString szName = connection()->encodeText(m_szName); + KviTQCString szName = connection()->encodeText(m_szName); connection()->sendFmtData("PART %s :%s",szName.data(),dat.data() ? dat.data() : ""); // be sure to not reference ourselves here.. we could be disconnected! } else { @@ -1424,7 +1424,7 @@ int KviChannel::myFlags() } -void KviChannel::setMask(char flag, const QString &mask,bool bAdd,const QString &setBy,unsigned int setAt) +void KviChannel::setMask(char flag, const TQString &tqmask,bool bAdd,const TQString &setBy,unsigned int setAt) { if(!connection())return; KviPointerList * list = m_pBanList; @@ -1446,21 +1446,21 @@ void KviChannel::setMask(char flag, const QString &mask,bool bAdd,const QString break; } - internalMask(mask,bAdd,setBy,setAt,list,&editor); + internalMask(tqmask,bAdd,setBy,setAt,list,&editor); m_pUserListView->setMaskEntries(flag,(int)list->count()); } -void KviChannel::internalMask(const QString &mask,bool bAdd,const QString &setBy,unsigned int setAt,KviPointerList *l,KviMaskEditor **ppEd) +void KviChannel::internalMask(const TQString &tqmask,bool bAdd,const TQString &setBy,unsigned int setAt,KviPointerList *l,KviMaskEditor **ppEd) { KviMaskEntry * e = 0; if(bAdd) { for(e = l->first();e;e = l->next()) { - if(KviQString::equalCI(e->szMask,mask))return; //already there + if(KviTQString::equalCI(e->szMask,tqmask))return; //already there } e = new KviMaskEntry; - e->szMask = mask; + e->szMask = tqmask; e->szSetBy = (!setBy.isEmpty()) ? setBy : __tr2qs("(Unknown)"); e->uSetAt = setAt; l->append(e); @@ -1468,7 +1468,7 @@ void KviChannel::internalMask(const QString &mask,bool bAdd,const QString &setBy } else { for(e = l->first();e;e = l->next()) { - if(KviQString::equalCI(e->szMask,mask))break; + if(KviTQString::equalCI(e->szMask,tqmask))break; } if(e) { @@ -1480,29 +1480,29 @@ void KviChannel::internalMask(const QString &mask,bool bAdd,const QString &setBy void KviChannel::updateModeLabel() { - QString tmp = m_szChannelMode; - QString tip = __tr2qs("Channel mode:"); + TQString tmp = m_szChannelMode; + TQString tip = __tr2qs("Channel mode:"); //const char * aux = m_szChannelMode.utf8().data(); leaks memory and will not work with getChannelModeDescription() (can channel modes be multibyte ?) KviStr mod = m_szChannelMode; const char * aux = mod.ptr(); while(*aux) { - KviQString::appendFormatted(tip,"
%c: %Q",*aux,&(m_pConsole->connection()->serverInfo()->getChannelModeDescription(*aux))); + KviTQString::appendFormatted(tip,"
%c: %Q",*aux,&(m_pConsole->connection()->serverInfo()->getChannelModeDescription(*aux))); ++aux; } if(!m_szChannelKey.isEmpty()) { if(!tmp.isEmpty())tmp.append(' '); - KviQString::appendFormatted(tmp,"k:%s",m_szChannelKey.utf8().data()); - KviQString::appendFormatted(tip,__tr2qs("
Key: %s"),m_szChannelKey.utf8().data()); + KviTQString::appendFormatted(tmp,"k:%s",m_szChannelKey.utf8().data()); + KviTQString::appendFormatted(tip,__tr2qs("
Key: %s"),m_szChannelKey.utf8().data()); } if(m_szChannelLimit.hasData()) { if(!tmp.isEmpty())tmp.append(' '); - KviQString::appendFormatted(tmp,"l:%s",m_szChannelLimit.ptr()); - KviQString::appendFormatted(tip,__tr2qs("
Limit: %s"),m_szChannelLimit.ptr()); + KviTQString::appendFormatted(tmp,"l:%s",m_szChannelLimit.ptr()); + KviTQString::appendFormatted(tip,__tr2qs("
Limit: %s"),m_szChannelLimit.ptr()); } m_pModeWidget->refreshModes(); @@ -1541,11 +1541,11 @@ void KviChannel::outputMessage(int msg_type,const char *format,...) } */ -void KviChannel::outputMessage(int msg_type,const QString &msg) +void KviChannel::outputMessage(int msg_type,const TQString &msg) { - QString szBuf(msg); + TQString szBuf(msg); preprocessMessage(szBuf); - const QChar * pC = KviQString::nullTerminatedArray(szBuf); + const TQChar * pC = KviTQString::nullTerminatedArray(szBuf); if(!pC)return; internalOutput(m_pMessageView ? m_pMessageView : m_pIrcView,msg_type,(const kvi_wchar_t *)pC); } @@ -1580,7 +1580,7 @@ void KviChannel::checkChannelSync() // we already have all the spontaneous server replies // (so probably mode, topic (or no topic is set),names) // we have already received the I and e lists (if requested) - kvs_int_t iSyncTime = m_joinTime.time().msecsTo(QTime::currentTime()); + kvs_int_t iSyncTime = m_joinTime.time().msecsTo(TQTime::currentTime()); if(iSyncTime < 0)iSyncTime += 86400000; bool bStop = KVS_TRIGGER_EVENT_1_HALTED(KviEvent_OnChannelSync,this,iSyncTime); @@ -1591,9 +1591,9 @@ void KviChannel::checkChannelSync() } } -bool KviChannel::eventFilter(QObject * o, QEvent * e) +bool KviChannel::eventFilter(TQObject * o, TQEvent * e) { - if(e->type() == QEvent::FocusOut && o == m_pTopicWidget && \ + if(e->type() == TQEvent::FocusOut && TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(m_pTopicWidget) && \ m_pTopicWidget->isVisible()) m_pTopicWidget->deactivate(); @@ -1601,20 +1601,20 @@ bool KviChannel::eventFilter(QObject * o, QEvent * e) } -void KviChannel::preprocessMessage(QString & szMessage) +void KviChannel::preprocessMessage(TQString & szMessage) { - QStringList strings = QStringList::split(" ",szMessage, TRUE); - for ( QStringList::Iterator it = strings.begin(); it != strings.end(); ++it ) { - if((*it).contains('\r')) continue; - QString tmp = KviMircCntrl::stripControlBytes(*it); - if( findEntry(*it) ) *it=QString("\r!n\r%1\r").arg(*it); + TQStringList strings = TQStringList::split(" ",szMessage, TRUE); + for ( TQStringList::Iterator it = strings.begin(); it != strings.end(); ++it ) { + if((*it).tqcontains('\r')) continue; + TQString tmp = KviMircCntrl::stripControlBytes(*it); + if( findEntry(*it) ) *it=TQString("\r!n\r%1\r").tqarg(*it); if(m_pConsole) if(m_pConsole->connection()) - if(m_pConsole->connection()->serverInfo()->supportedChannelTypes().contains(tmp[0])) + if(m_pConsole->connection()->serverInfo()->supportedChannelTypes().tqcontains(tmp[0])) if((*it)==tmp) - *it=QString("\r!c\r%1\r").arg(*it); + *it=TQString("\r!c\r%1\r").tqarg(*it); else - *it=QString("\r!c%1\r%2\r").arg(tmp).arg(*it); + *it=TQString("\r!c%1\r%2\r").tqarg(tmp).tqarg(*it); } szMessage=strings.join(" "); } diff --git a/src/kvirc/ui/kvi_channel.h b/src/kvirc/ui/kvi_channel.h index 0efdabb0..98f9fc6b 100644 --- a/src/kvirc/ui/kvi_channel.h +++ b/src/kvirc/ui/kvi_channel.h @@ -37,13 +37,13 @@ #include "kvi_modew.h" #include "kvi_valuelist.h" -#include +#include #include "kvi_pointerhashtable.h" -#include +#include class KviConsole; -class QSplitter; -class QToolButton; +class TQSplitter; +class TQToolButton; class KviTopicWidget; class KviIrcMask; class KviThemedLabel; @@ -51,9 +51,9 @@ class KviTalHBox; #ifdef COMPILE_ON_WINDOWS // windows compiler wants this instead of the forward decl - #include "kvi_maskeditor.h" + #include "kvi_tqmaskeditor.h" #else - typedef struct _KviMaskEntry KviMaskEntry; // kvi_maskeditor.h + typedef struct _KviMaskEntry KviMaskEntry; // kvi_tqmaskeditor.h #endif class KviMaskEditor; class KviModeEditor; @@ -79,7 +79,7 @@ class KviModeEditor; typedef struct _KviChannelAction { - QString szNick; // action source nick + TQString szNick; // action source nick unsigned int uActionType; // type of the action kvi_time_t tTime; // time of the action int iTemperature; // temperature of the action @@ -102,19 +102,20 @@ typedef struct _KviChannelActivityStats int iAverageActionTemperature; // the average chan temperature unsigned int uHotActionCount; unsigned int uHotActionPercent; - QStringList lTalkingUsers; // users that seem to be talking NOW - QStringList lWereTalkingUsers; + TQStringList lTalkingUsers; // users that seem to be talking NOW + TQStringList lWereTalkingUsers; } KviChannelActivityStats; class KVIRC_API KviChannel : public KviWindow { Q_OBJECT + TQ_OBJECT public: KviChannel(KviFrame * lpFrm,KviConsole * lpConsole,const char * name); ~KviChannel(); protected: - QSplitter * m_pTopSplitter; - QSplitter * m_pVertSplitter; + TQSplitter * m_pTopSplitter; + TQSplitter * m_pVertSplitter; BUTTON_CLASS * m_pDoubleViewButton; KviWindowToolPageButton * m_pListViewButton; KviWindowToolPageButton * m_pBanEditorButton; @@ -130,50 +131,50 @@ protected: KviUserListView * m_pUserListView; KviModeWidget * m_pModeWidget; int m_iStateFlags; - QString m_szChannelMode; - QString m_szChannelKey; + TQString m_szChannelMode; + TQString m_szChannelKey; KviStr m_szChannelLimit; KviPointerList * m_pBanList; KviPointerList * m_pBanExceptionList; KviPointerList * m_pInviteList; KviPixmap m_privateBackground; - QDateTime m_joinTime; - QString m_szNameWithUserFlag; - KviPointerHashTable * m_pTmpHighLighted; + TQDateTime m_joinTime; + TQString m_szNameWithUserFlag; + KviPointerHashTable * m_pTmpHighLighted; unsigned int m_uActionHistoryHotActionCount; KviPointerList * m_pActionHistory; kvi_time_t m_tLastReceivedWhoReply; KviValueList m_VertSplitterSizesList; KviTalHBox * m_pButtonContainer; protected: - bool eventFilter(QObject *, QEvent *); - virtual QPixmap * myIconPtr(); + bool eventFilter(TQObject *, TQEvent *); + virtual TQPixmap * myIconPtr(); virtual void fillCaptionBuffers(); - virtual void resizeEvent(QResizeEvent *e); - virtual void closeEvent(QCloseEvent *e); + virtual void resizeEvent(TQResizeEvent *e); + virtual void closeEvent(TQCloseEvent *e); // virtual void fillContextPopup(KviTalPopupMenu * p); - virtual void getConfigGroupName(QString &buf); + virtual void getConfigGroupName(TQString &buf); virtual void saveProperties(KviConfig * cfg); virtual void loadProperties(KviConfig * cfg); virtual void applyOptions(); - virtual void getBaseLogFileName(QString &buffer); + virtual void getBaseLogFileName(TQString &buffer); virtual void triggerCreationEvents(); void toggleEditor(KviMaskEditor ** ppEd,KviWindowToolPageButton ** ppBtn,KviPointerList *l,char flag,const char *edName); - void internalMask(const QString &mask,bool bAdd,const QString &setBy,unsigned int setAt,KviPointerList *l,KviMaskEditor **ppEd); + void internalMask(const TQString &tqmask,bool bAdd,const TQString &setBy,unsigned int setAt,KviPointerList *l,KviMaskEditor **ppEd); void checkChannelSync(); void showDoubleView(bool bShow); void fixActionHistory(); - void getTalkingUsersStats(QString &buffer,QStringList &l,bool bPast); + void getTalkingUsersStats(TQString &buffer,TQStringList &l,bool bPast); public: void getChannelActivityStats(KviChannelActivityStats * s); - //void getChannelActivityStatsDescription(QString &buffer); + //void getChannelActivityStatsDescription(TQString &buffer); KviPointerList * banList(){ return m_pBanList; }; KviPointerList * banExceptionList(){ return m_pBanExceptionList; }; KviPointerList * inviteList(){ return m_pInviteList; }; - QString * firstSelectedNickname(){ return m_pUserListView->firstSelectedNickname(); }; - QString * nextSelectedNickname(){ return m_pUserListView->nextSelectedNickname(); }; + TQString * firstSelectedNickname(){ return m_pUserListView->firstSelectedNickname(); }; + TQString * nextSelectedNickname(){ return m_pUserListView->nextSelectedNickname(); }; int selectedCount(){ return m_pUserListView->selectedCount(); }; int opCount(){ return m_pUserListView->opCount(); }; @@ -188,10 +189,10 @@ public: unsigned int banExceptionCount(){ return m_pBanExceptionList->count(); }; unsigned int inviteCount(){ return m_pInviteList->count(); }; - const QString & nameWithUserFlag(){ return m_szNameWithUserFlag; }; - virtual const QString & target(){ return windowName(); }; + const TQString & nameWithUserFlag(){ return m_szNameWithUserFlag; }; + virtual const TQString & target(){ return windowName(); }; // void appendSelectedNicknames(KviStr &buffer); - void setMask(char flag, const QString &mask,bool bAdd,const QString &setBy,unsigned int setAt); + void setMask(char flag, const TQString &tqmask,bool bAdd,const TQString &setBy,unsigned int setAt); kvi_time_t lastReceivedWhoReply(){ return m_tLastReceivedWhoReply; }; void setLastReceivedWhoReply(kvi_time_t tTime){ m_tLastReceivedWhoReply = tTime; }; @@ -229,28 +230,28 @@ public: void setDeadChan(); void setAliveChan(); - void prependUserFlag(const QString &nick,QString &buffer){ m_pUserListView->prependUserFlag(nick,buffer); }; - char getUserFlag(const QString &nick){ return m_pUserListView->getUserFlag(nick); }; + void prependUserFlag(const TQString &nick,TQString &buffer){ m_pUserListView->prependUserFlag(nick,buffer); }; + char getUserFlag(const TQString &nick){ return m_pUserListView->getUserFlag(nick); }; bool isDeadChan(){ return (m_iStateFlags & KVI_CHANNEL_STATE_DEADCHAN); }; - virtual QSize sizeHint() const; + virtual TQSize tqsizeHint() const; void enableUserListUpdates(bool bEnable){ m_pUserListView->enableUpdates(bEnable); }; - KviUserListEntry * join(const QString &nick,const QString &user = QString::null,const QString &host = QString::null,int iFlags = 0) + KviUserListEntry * join(const TQString &nick,const TQString &user = TQString(),const TQString &host = TQString(),int iFlags = 0) { return m_pUserListView->join(nick,user,host,iFlags); }; - bool op(const QString &nick,bool bOp){ return m_pUserListView->op(nick,bOp); }; - bool avatarChanged(const QString &nick){ return m_pUserListView->avatarChanged(nick); }; - bool voice(const QString &nick,bool bVoice){ return m_pUserListView->voice(nick,bVoice); }; - bool halfop(const QString &nick,bool bHalfOp){ return m_pUserListView->halfop(nick,bHalfOp); }; - bool userop(const QString &nick,bool bUserOp){ return m_pUserListView->userop(nick,bUserOp); }; - bool setChanOwner(const QString &nick,bool bChanOwner){ return m_pUserListView->setChanOwner(nick,bChanOwner); }; - bool setChanAdmin(const QString &nick,bool bChanAdmin){ return m_pUserListView->setChanAdmin(nick,bChanAdmin); }; + bool op(const TQString &nick,bool bOp){ return m_pUserListView->op(nick,bOp); }; + bool avatarChanged(const TQString &nick){ return m_pUserListView->avatarChanged(nick); }; + bool voice(const TQString &nick,bool bVoice){ return m_pUserListView->voice(nick,bVoice); }; + bool halfop(const TQString &nick,bool bHalfOp){ return m_pUserListView->halfop(nick,bHalfOp); }; + bool userop(const TQString &nick,bool bUserOp){ return m_pUserListView->userop(nick,bUserOp); }; + bool setChanOwner(const TQString &nick,bool bChanOwner){ return m_pUserListView->setChanOwner(nick,bChanOwner); }; + bool setChanAdmin(const TQString &nick,bool bChanAdmin){ return m_pUserListView->setChanAdmin(nick,bChanAdmin); }; void userAction(KviIrcMask * user,unsigned int uActionType); - void userAction(const QString &nick,unsigned int uActionType); - void userAction(const QString &nick,const QString &user,const QString &host,unsigned int uActionType); - bool nickChange(const QString &oldNick,const QString &newNick); - void channelAction(const QString &nick,unsigned int uActionType,int iTemperature); - bool part(const QString &nick); - bool isOn(const QString &nick){ return (m_pUserListView->findEntry(nick) != 0); }; - KviUserListEntry * findEntry(const QString &nick){ return m_pUserListView->findEntry(nick); }; + void userAction(const TQString &nick,unsigned int uActionType); + void userAction(const TQString &nick,const TQString &user,const TQString &host,unsigned int uActionType); + bool nickChange(const TQString &oldNick,const TQString &newNick); + void channelAction(const TQString &nick,unsigned int uActionType,int iTemperature); + bool part(const TQString &nick); + bool isOn(const TQString &nick){ return (m_pUserListView->findEntry(nick) != 0); }; + KviUserListEntry * findEntry(const TQString &nick){ return m_pUserListView->findEntry(nick); }; KviUserListView * userListView(){ return m_pUserListView; }; bool isMeOp(bool bAtLeast = false); bool isMeChanOwner(bool bAtLeast = false); @@ -258,41 +259,41 @@ public: bool isMeVoice(bool bAtLeast = false); bool isMeHalfOp(bool bAtLeast = false); bool isMeUserOp(bool bAtLeast = false); - bool isOp(const QString &nick,bool bAtLeast = false){ return m_pUserListView->isOp(nick,bAtLeast); }; - bool isVoice(const QString &nick,bool bAtLeast = false){ return m_pUserListView->isVoice(nick,bAtLeast); }; - bool isHalfOp(const QString &nick,bool bAtLeast = false){ return m_pUserListView->isHalfOp(nick,bAtLeast); }; - bool isUserOp(const QString &nick,bool bAtLeast = false){ return m_pUserListView->isUserOp(nick,bAtLeast); }; - bool isChanOwner(const QString &nick,bool bAtLeast = false){ return m_pUserListView->isChanOwner(nick,bAtLeast); }; - bool isChanAdmin(const QString &nick,bool bAtLeast = false){ return m_pUserListView->isChanAdmin(nick,bAtLeast); }; + bool isOp(const TQString &nick,bool bAtLeast = false){ return m_pUserListView->isOp(nick,bAtLeast); }; + bool isVoice(const TQString &nick,bool bAtLeast = false){ return m_pUserListView->isVoice(nick,bAtLeast); }; + bool isHalfOp(const TQString &nick,bool bAtLeast = false){ return m_pUserListView->isHalfOp(nick,bAtLeast); }; + bool isUserOp(const TQString &nick,bool bAtLeast = false){ return m_pUserListView->isUserOp(nick,bAtLeast); }; + bool isChanOwner(const TQString &nick,bool bAtLeast = false){ return m_pUserListView->isChanOwner(nick,bAtLeast); }; + bool isChanAdmin(const TQString &nick,bool bAtLeast = false){ return m_pUserListView->isChanAdmin(nick,bAtLeast); }; int myFlags(); void updateModeLabel(); KviTopicWidget * topicWidget(){ return m_pTopicWidget; }; - virtual void outputMessage(int msg_type,const QString &msg); - void ownMessage(const QString &buffer); - void ownAction(const QString &buffer); + virtual void outputMessage(int msg_type,const TQString &msg); + void ownMessage(const TQString &buffer); + void ownAction(const TQString &buffer); void setChannelMode(char mode,bool bAdd); void setChannelKey(const char * key); void setChannelLimit(const char * limit); - void getChannelModeString(QString &buffer); + void getChannelModeString(TQString &buffer); KviStr & channelLimit(){ return m_szChannelLimit; }; bool hasChannelLimit(){ return m_szChannelLimit.hasData(); }; bool hasChannelKey() { return !m_szChannelKey.isEmpty(); }; - QString & channelKey(){ return m_szChannelKey; }; + TQString & channelKey(){ return m_szChannelKey; }; void addHighlightedUser(const char * nick); void removeHighlightedUser(const char * nick); - bool isHighlightedUser(const char * nick) { return m_pTmpHighLighted->find(nick); }; + bool isHighlightedUser(const char * nick) { return m_pTmpHighLighted->tqfind(nick); }; KviIrcView * messageView() const { return m_pMessageView; }; virtual void lostUserFocus(); - virtual void getTaskBarTipText(QString &buffer); - QString channelMode() { return m_szChannelMode; }; + virtual void getTaskBarTipText(TQString &buffer); + TQString channelMode() { return m_szChannelMode; }; void unhighlight(); - QFrame * buttonContainer() { return (QFrame*)m_pButtonContainer; }; + TQFrame * buttonContainer() { return (TQFrame*)m_pButtonContainer; }; private slots: void toggleDoubleView(); void toggleListView(); @@ -300,14 +301,14 @@ private slots: void toggleBanExceptionEditor(); void toggleInviteEditor(); void toggleModeEditor(); - void topicSelected(const QString & topic); + void topicSelected(const TQString & topic); void setMode(const char * mode); void modeSelectorDone(); void textViewRightClicked(); void removeMasks(KviMaskEditor *ed,KviPointerList *l); void toggleToolButtons(); protected: - virtual void preprocessMessage(QString & szMessage); + virtual void preprocessMessage(TQString & szMessage); }; #endif //_KVI_CHANNEL_H_ diff --git a/src/kvirc/ui/kvi_colorwin.cpp b/src/kvirc/ui/kvi_colorwin.cpp index 9cc1c6e4..39a7051c 100644 --- a/src/kvirc/ui/kvi_colorwin.cpp +++ b/src/kvirc/ui/kvi_colorwin.cpp @@ -29,27 +29,27 @@ #include "kvi_options.h" -#include -#include -#include -#include +#include +#include +#include +#include KviColorWindow::KviColorWindow() -:QWidget(0,"toplevel_color_window",Qt::WType_Popup) +:TQWidget(0,"toplevel_color_window",TQt::WType_Popup) { #ifdef COMPILE_USE_QT4 - setFocusPolicy(Qt::NoFocus); + setFocusPolicy(TTQ_NoFocus); #else - setFocusPolicy(QWidget::NoFocus); + setFocusPolicy(TQ_NoFocus); #endif - setBackgroundMode(Qt::NoBackground); + setBackgroundMode(TQt::NoBackground); setFixedSize(146,38); m_pOwner = 0; - QFont fnt = QFont(); - fnt.setStyleHint(QFont::TypeWriter); + TQFont fnt = TQFont(); + fnt.setStyleHint(TQFont::TypeWriter); fnt.setPointSize(10); - //QFont fnt("fixed",10); + //TQFont fnt("fixed",10); setFont(fnt); m_iTimerId = -1; } @@ -61,28 +61,28 @@ KviColorWindow::~KviColorWindow() // if(m_pOwner)m_pOwner->setFocus(); } -void KviColorWindow::popup(QWidget *owner) +void KviColorWindow::popup(TQWidget *owner) { m_pOwner = owner; show(); } -void KviColorWindow::paintEvent(QPaintEvent *) +void KviColorWindow::paintEvent(TQPaintEvent *) { static int clrIdx[16]={ 1,0,0,0,0,0,0,0,1,1,1,1,0,0,0,1 }; - QPainter p(this); + TQPainter p(this); for(int i=0;i<16;i++) { p.fillRect((i % 8) * 18,(i / 8) * 18,18,18,KVI_OPTION_MIRCCOLOR(i)); p.setPen(KVI_OPTION_MIRCCOLOR(clrIdx[i])); KviStr szI(KviStr::Format,"%d",i); - p.drawText((i % 8) * 18,(i / 8) * 18,18,18,Qt::AlignVCenter | Qt::AlignHCenter,szI.ptr()); + p.drawText((i % 8) * 18,(i / 8) * 18,18,18,TQt::AlignVCenter | TQt::AlignHCenter,szI.ptr()); } } -void KviColorWindow::keyPressEvent(QKeyEvent *e) +void KviColorWindow::keyPressEvent(TQKeyEvent *e) { if(m_iTimerId != -1) killTimer(m_iTimerId); @@ -90,17 +90,17 @@ void KviColorWindow::keyPressEvent(QKeyEvent *e) if(m_pOwner)g_pApp->sendEvent(m_pOwner,e); } -void KviColorWindow::mousePressEvent(QMouseEvent *e) +void KviColorWindow::mousePressEvent(TQMouseEvent *e) { - QString str; + TQString str; int key=e->x()/18; if (e->x()<36 && e->y()>18) key +=8; if (e->x()>36 && e->y()>18) key -=2; int ascii=key+48; str.setNum(key); if (e->x()>36 && e->y()>18) - if(m_pOwner) g_pApp->sendEvent(m_pOwner,new QKeyEvent(QEvent::KeyPress,Qt::Key_1,49,Qt::NoButton,"1")); - if(m_pOwner) g_pApp->sendEvent(m_pOwner,new QKeyEvent(QEvent::KeyPress,key,ascii,Qt::NoButton,str)); + if(m_pOwner) g_pApp->sendEvent(m_pOwner,new TQKeyEvent(TQEvent::KeyPress,TQt::Key_1,49,Qt::NoButton,"1")); + if(m_pOwner) g_pApp->sendEvent(m_pOwner,new TQKeyEvent(TQEvent::KeyPress,key,ascii,Qt::NoButton,str)); if(m_iTimerId != -1) killTimer(m_iTimerId); hide(); @@ -108,10 +108,10 @@ void KviColorWindow::mousePressEvent(QMouseEvent *e) void KviColorWindow::show() { m_iTimerId = startTimer(10000); //10 sec ...seems enough - QWidget::show(); + TQWidget::show(); } -void KviColorWindow::timerEvent(QTimerEvent *) +void KviColorWindow::timerEvent(TQTimerEvent *) { if(m_iTimerId != -1) killTimer(m_iTimerId); diff --git a/src/kvirc/ui/kvi_colorwin.h b/src/kvirc/ui/kvi_colorwin.h index 21cf1ae3..9528cf62 100644 --- a/src/kvirc/ui/kvi_colorwin.h +++ b/src/kvirc/ui/kvi_colorwin.h @@ -23,25 +23,26 @@ // #include "kvi_settings.h" -#include +#include -class KVIRC_API KviColorWindow : public QWidget +class KVIRC_API KviColorWindow : public TQWidget { Q_OBJECT + TQ_OBJECT public: KviColorWindow(); ~KviColorWindow(); private: - QWidget *m_pOwner; + TQWidget *m_pOwner; int m_iTimerId; public: - void popup(QWidget *owner); + void popup(TQWidget *owner); private: virtual void show(); - virtual void paintEvent(QPaintEvent *); - virtual void keyPressEvent(QKeyEvent *e); - virtual void mousePressEvent(QMouseEvent *); - virtual void timerEvent(QTimerEvent *); + virtual void paintEvent(TQPaintEvent *); + virtual void keyPressEvent(TQKeyEvent *e); + virtual void mousePressEvent(TQMouseEvent *); + virtual void timerEvent(TQTimerEvent *); }; #endif //_KVI_COLORWIN_H_ diff --git a/src/kvirc/ui/kvi_console.cpp b/src/kvirc/ui/kvi_console.cpp index df0bd707..a843ae19 100644 --- a/src/kvirc/ui/kvi_console.cpp +++ b/src/kvirc/ui/kvi_console.cpp @@ -81,26 +81,26 @@ #include "kvi_kvs_script.h" #include "kvi_kvs_eventtriggers.h" -#include -#include -#include -#include +#include +#include +#include +#include #include "kvi_tal_hbox.h" #include "kvi_tal_popupmenu.h" -#include -#include +#include +#include #ifdef COMPILE_USE_QT4 - #include + #include #endif #define __KVI_DEBUG__ #include "kvi_debug.h" #ifdef COMPILE_USE_QT4 - #include + #include #else - #include + #include #endif extern KVIRC_API KviIrcServerDataBase * g_pIrcServerDataBase; @@ -128,35 +128,35 @@ KviConsole::KviConsole(KviFrame * lpFrm,int iFlags) m_pButtonBox = new KviTalHBox(this); m_pButtonBox->setSpacing(0); m_pButtonBox->setMargin(0); - new QLabel(__tr2qs("Address:"),m_pButtonBox,"url_label"); - m_pAddressEdit = new QComboBox(m_pButtonBox,"url_editor"); + new TQLabel(__tr2qs("Address:"),m_pButtonBox,"url_label"); + m_pAddressEdit = new TQComboBox(m_pButtonBox,"url_editor"); m_pAddressEdit->setAutoCompletion(true); m_pAddressEdit->setDuplicatesEnabled(false); m_pAddressEdit->setEditable(true); m_pAddressEdit->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_URL))); recentUrlsChanged(); m_pAddressEdit->setCurrentText(""); - m_pAddressEdit->setInsertionPolicy(QComboBox::NoInsertion); + m_pAddressEdit->setInsertionPolicy(TQComboBox::NoInsertion); m_pAddressEdit->setMinimumHeight(24); //icon is 16px, + margins m_pButtonBox->setStretchFactor(m_pAddressEdit,1); #ifdef COMPILE_USE_QT4 - m_pButtonBox->setObjectName( QLatin1String( "kvi_window_button_box" ) ); + m_pButtonBox->setObjectName( TQLatin1String( "kvi_window_button_box" ) ); #endif KviTalToolTip::add(m_pAddressEdit,__tr2qs("Current IRC URI")); - connect(m_pAddressEdit,SIGNAL(activated(const QString & )),this,SLOT(ircUriChanged(const QString & ))); - connect(g_pApp,SIGNAL(recentUrlsChanged()),this,SLOT(recentUrlsChanged())); + connect(m_pAddressEdit,TQT_SIGNAL(activated(const TQString & )),this,TQT_SLOT(ircUriChanged(const TQString & ))); + connect(g_pApp,TQT_SIGNAL(recentUrlsChanged()),this,TQT_SLOT(recentUrlsChanged())); - m_pSplitter = new QSplitter(Qt::Horizontal,this,"splitter"); + m_pSplitter = new TQSplitter(Qt::Horizontal,this,"splitter"); m_pIrcView = new KviIrcView(m_pSplitter,lpFrm,this); - connect(m_pIrcView,SIGNAL(rightClicked()),this,SLOT(textViewRightClicked())); + connect(m_pIrcView,TQT_SIGNAL(rightClicked()),this,TQT_SLOT(textViewRightClicked())); // FIXME: #warning "If notify list is disabled avoid to show this" // FIXME: #warning "Button to show/hide the notifyListView (NOT DELETE RE_CREATE!)" // The userlist on the right //m_pEditorsContainer= new KviToolWindowsContainer(m_pSplitter); m_pNotifyViewButton = new KviWindowToolPageButton(KVI_SMALLICON_HIDELISTVIEW,KVI_SMALLICON_SHOWLISTVIEW,__tr2qs("Notify List"),buttonContainer(),true,"list_view_button"); - connect(m_pNotifyViewButton,SIGNAL(clicked()),this,SLOT(toggleNotifyView())); + connect(m_pNotifyViewButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(toggleNotifyView())); m_pNotifyListView = new KviUserListView(m_pSplitter,m_pNotifyViewButton,0,this,19,__tr2qs("Notify List"),"notify_list_view"); @@ -173,10 +173,10 @@ int KviConsole::selectedCount() } void KviConsole::recentUrlsChanged(){ - QString cur = m_pAddressEdit->currentText(); + TQString cur = m_pAddressEdit->currentText(); m_pAddressEdit->clear(); for ( - QStringList::Iterator it = KVI_OPTION_STRINGLIST(KviOption_stringlistRecentIrcUrls).begin(); + TQStringList::Iterator it = KVI_OPTION_STRINGLIST(KviOption_stringlistRecentIrcUrls).begin(); it != KVI_OPTION_STRINGLIST(KviOption_stringlistRecentIrcUrls).end(); ++it ) { @@ -200,7 +200,7 @@ bool KviConsole::connectionInProgress() KviConsole::~KviConsole() { - // FIXME: #warning "WARNING : THIS SHOULD BECOME A COMMAND /QUIT $option() so the idents are parsed!" + // FIXME: #warning "WARNING : THIS SHOULD BECOME A COMMAND /TQUIT $option() so the idents are parsed!" // Force connection close: it will just return if no connection is present context()->terminateConnectionRequest(true); @@ -229,9 +229,9 @@ unsigned int KviConsole::ircContextId() return m_pContext->id(); } -QString KviConsole::currentNetworkName() +TQString KviConsole::currentNetworkName() { - return (connection() ? connection()->networkName() : QString::null); + return (connection() ? connection()->networkName() : TQString()); } @@ -265,24 +265,24 @@ void KviConsole::fillContextPopup(KviTalPopupMenu * p) cc = channelCount(); qc = queryCount(); p->insertSeparator(); - id = p->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_CHANNEL)),__tr2qs("Part All Channels"),connection(),SLOT(partAllChannels())); + id = p->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_CHANNEL)),__tr2qs("Part All Channels"),connection(),TQT_SLOT(partAllChannels())); if(!cc)p->setItemEnabled(id,false); - id = p->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_QUERY)),__tr2qs("Close All Queries"),connection(),SLOT(closeAllQueries())); + id = p->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_TQUERY)),__tr2qs("Close All Queries"),connection(),TQT_SLOT(closeAllQueries())); if(!qc)p->setItemEnabled(id,false); } p->insertSeparator(); - p->insertItem(__tr2qs("Unhighlight All Windows"),context(),SLOT(unhighlightAllWindows())); + p->insertItem(__tr2qs("Unhighlight All Windows"),context(),TQT_SLOT(unhighlightAllWindows())); if(connection()) { - id = p->insertItem(__tr2qs("Unhighlight All Channels"),connection(),SLOT(unhighlightAllChannels())); + id = p->insertItem(__tr2qs("Unhighlight All Channels"),connection(),TQT_SLOT(unhighlightAllChannels())); if(!cc)p->setItemEnabled(id,false); - id = p->insertItem(__tr2qs("Unhighlight All Queries"),connection(),SLOT(unhighlightAllQueries())); + id = p->insertItem(__tr2qs("Unhighlight All Queries"),connection(),TQT_SLOT(unhighlightAllQueries())); if(!qc)p->setItemEnabled(id,false); } } -void KviConsole::completeChannel(const QString &word,KviPointerList * matches) +void KviConsole::completeChannel(const TQString &word,KviPointerList * matches) { // FIXME: first look in our context ? /* @@ -292,35 +292,35 @@ void KviConsole::completeChannel(const QString &word,KviPointerList * m if(kvi_strEqualCIN(c->windowName(),word.ptr(),word.len()))matches->append(new KviStr((*it) } */ - QStringList *pList = g_pApp->getRecentChannels(currentNetworkName()); + TQStringList *pList = g_pApp->getRecentChannels(currentNetworkName()); if(pList) { - for(QStringList::Iterator it = pList->begin(); it != pList->end(); ++it) + for(TQStringList::Iterator it = pList->begin(); it != pList->end(); ++it) { - if(KviQString::equalCIN((*it),word,word.length()))matches->append(new QString(*it)); + if(KviTQString::equalCIN((*it),word,word.length()))matches->append(new TQString(*it)); } } } -void KviConsole::completeServer(const QString &word, KviPointerList * matches) +void KviConsole::completeServer(const TQString &word, KviPointerList * matches) { - for(QStringList::Iterator it = KVI_OPTION_STRINGLIST(KviOption_stringlistRecentServers).begin(); it != KVI_OPTION_STRINGLIST(KviOption_stringlistRecentServers).end(); ++it) + for(TQStringList::Iterator it = KVI_OPTION_STRINGLIST(KviOption_stringlistRecentServers).begin(); it != KVI_OPTION_STRINGLIST(KviOption_stringlistRecentServers).end(); ++it) { - QString srv((*it)); + TQString srv((*it)); - KviQString::cutToFirst(srv,'/'); + KviTQString::cutToFirst(srv,'/'); while(srv.startsWith("/"))srv.remove(0,1); - KviQString::cutFromLast(srv,':'); + KviTQString::cutFromLast(srv,':'); //We should have a full server name here, without the irc:// and without the port - if(KviQString::equalCIN(srv,word,word.length())) + if(KviTQString::equalCIN(srv,word,word.length())) { - matches->append(new QString(srv)); + matches->append(new TQString(srv)); } } } -void KviConsole::getUserTipText(const QString &nick,KviIrcUserEntry *e,QString &buffer) +void KviConsole::getUserTipText(const TQString &nick,KviIrcUserEntry *e,TQString &buffer) { KviRegisteredMask *u = g_pRegisteredUserDataBase->findMatchingMask(nick,e->user(),e->host()); @@ -330,15 +330,15 @@ void KviConsole::getUserTipText(const QString &nick,KviIrcUserEntry *e,QString & buffer += nick; buffer += "!"; - buffer += e->user().isEmpty() ? QString("*") : e->user(); + buffer += e->user().isEmpty() ? TQString("*") : e->user(); buffer += "@"; - buffer += e->host().isEmpty() ? QString("*") : e->host(); + buffer += e->host().isEmpty() ? TQString("*") : e->host(); buffer += "
"; if(u) { - QString szComment=u->user()->getProperty("comment"); + TQString szComment=u->user()->getProperty("comment"); if(!szComment.isEmpty()) { buffer += "

("; @@ -351,9 +351,9 @@ void KviConsole::getUserTipText(const QString &nick,KviIrcUserEntry *e,QString & #ifdef COMPILE_USE_QT4 Q3MimeSourceFactory::defaultFactory()->setPixmap("ulv_avatar",*(e->avatar()->pixmap())); #else - QMimeSourceFactory::defaultFactory()->setPixmap("ulv_avatar",*(e->avatar()->pixmap())); + TQMimeSourceFactory::defaultFactory()->setPixmap("ulv_avatar",*(e->avatar()->pixmap())); #endif - buffer += QString("
").arg(e->avatar()->pixmap()->width()); + buffer += TQString("
").tqarg(e->avatar()->pixmap()->width()); } if(e->hasRealName()) @@ -374,8 +374,8 @@ void KviConsole::getUserTipText(const QString &nick,KviIrcUserEntry *e,QString & if(u) { - QString mask; - u->mask()->mask(mask); + TQString tqmask; + u->tqmask()->tqmask(tqmask); buffer += ""; buffer += __tr2qs("Registered as"); buffer += " "; @@ -385,13 +385,13 @@ void KviConsole::getUserTipText(const QString &nick,KviIrcUserEntry *e,QString & buffer += ""; buffer += __tr2qs("(Matched by"); buffer += " "; - buffer += mask; + buffer += tqmask; buffer += ")"; } if(connection()) { - QString chans; + TQString chans; if(connection()->getCommonChannels(nick,chans,false)) { buffer += ""; @@ -404,12 +404,12 @@ void KviConsole::getUserTipText(const QString &nick,KviIrcUserEntry *e,QString & if(e->hasServer()) { buffer += ""; - buffer += __tr2qs("Using server %1").arg(e->server()); + buffer += __tr2qs("Using server %1").tqarg(e->server()); if(e->hasHops()) { buffer += " ("; - buffer += __tr2qs("%1 hops").arg(e->hops()); + buffer += __tr2qs("%1 hops").tqarg(e->hops()); buffer += ")"; } else { buffer += ""; @@ -443,9 +443,9 @@ void KviConsole::saveProperties(KviConfig *cfg) } -void KviConsole::getBaseLogFileName(QString &buffer) +void KviConsole::getBaseLogFileName(TQString &buffer) { - buffer=QString("CONSOLE%1").arg(ircContextId()); + buffer=TQString("CONSOLE%1").tqarg(ircContextId()); } void KviConsole::showNotifyList(bool bShow) @@ -492,7 +492,7 @@ KviWindow * KviConsole::activeWindow() return this; } -void KviConsole::ircUriChanged(const QString & text){ +void KviConsole::ircUriChanged(const TQString & text){ if(KviIrcUrl::run(text,KviIrcUrl::CurrentContext,this) & KviIrcUrl::InvalidProtocol) { KviMessageBox::warning(__tr2qs("KVIrc can accept only irc://, irc6://, ircs:// or irc6s:// URL's\n" @@ -502,7 +502,7 @@ void KviConsole::ircUriChanged(const QString & text){ void KviConsole::updateUri() { - QString uri; + TQString uri; if(connection()) { KviIrcServer* server = connection()->target()->server(); @@ -527,7 +527,7 @@ void KviConsole::updateUri() void KviConsole::connectionAttached() { //need to update URI - connect(m_pContext->connection(),SIGNAL(chanListChanged()),this,SLOT(updateUri())); + connect(m_pContext->connection(),TQT_SIGNAL(chanListChanged()),this,TQT_SLOT(updateUri())); updateUri(); m_pNotifyListView->setUserDataBase(connection()->userDataBase()); } @@ -545,7 +545,7 @@ bool KviConsole::isIpV6Connection() return connection()->server()->isIpV6(); } -void KviConsole::closeEvent(QCloseEvent *e) +void KviConsole::closeEvent(TQCloseEvent *e) { if(g_pFrame->consoleCount() > 1) { @@ -554,7 +554,7 @@ void KviConsole::closeEvent(QCloseEvent *e) { if(!KVI_OPTION_BOOL(KviOption_boolAlwaysDisconnectClosingConnectedConsole)) { - switch(QMessageBox::warning(this, + switch(TQMessageBox::warning(this, __tr2qs("Confirmation - KVIrc"), __tr2qs("You have just attempted to close a console window with an active connection inside.\n" \ "Are you sure you wish to terminate the connection?"), @@ -588,7 +588,7 @@ void KviConsole::closeEvent(QCloseEvent *e) // this is the only console... ask if the user really wants to quit KVirc if(!KVI_OPTION_BOOL(KviOption_boolAlwaysQuitKVIrcClosingLastConsole)) { - switch(QMessageBox::warning(this, + switch(TQMessageBox::warning(this, __tr2qs("Confirmation - KVIrc"), __tr2qs("You have just attempted to close the last console window.\nAre you sure you wish to quit KVIrc?"), __tr2qs("&Always"), @@ -612,11 +612,11 @@ void KviConsole::closeEvent(QCloseEvent *e) } // internal helper for applyHighlighting -int KviConsole::triggerOnHighlight(KviWindow *wnd,int type,const QString &nick,const QString &user,const QString &host,const QString &szMsg,const QString &trigger) +int KviConsole::triggerOnHighlight(KviWindow *wnd,int type,const TQString &nick,const TQString &user,const TQString &host,const TQString &szMsg,const TQString &trigger) { if(!KVI_OPTION_STRING(KviOption_stringOnHighlightedMessageSound).isEmpty() && wnd!=g_pActiveWindow) KviKvsScript::run("snd.play $0",0,new KviKvsVariantList(new KviKvsVariant(KVI_OPTION_STRING(KviOption_stringOnHighlightedMessageSound)))); - QString szMessageType; - KviQString::sprintf(szMessageType,"%d",type); + TQString szMessageType; + KviTQString::sprintf(szMessageType,"%d",type); if(KVS_TRIGGER_EVENT_7_HALTED(KviEvent_OnHighlight, wnd,nick,user,host, szMsg,trigger, @@ -626,17 +626,17 @@ int KviConsole::triggerOnHighlight(KviWindow *wnd,int type,const QString &nick,c } // if it returns -1 you should just return and not display the message -int KviConsole::applyHighlighting(KviWindow *wnd,int type,const QString &nick,const QString &user,const QString &host,const QString &szMsg) +int KviConsole::applyHighlighting(KviWindow *wnd,int type,const TQString &nick,const TQString &user,const TQString &host,const TQString &szMsg) { - QString szPattern=KVI_OPTION_STRING(KviOption_stringWordSplitters); - QString szSource; - QString szStripMsg=KviMircCntrl::stripControlBytes(szMsg); - QChar* aux=(QChar*)(szStripMsg.ucs2()); + TQString szPattern=KVI_OPTION_STRING(KviOption_stringWordSplitters); + TQString szSource; + TQString szStripMsg=KviMircCntrl::stripControlBytes(szMsg); + TQChar* aux=(TQChar*)(szStripMsg.ucs2()); if(aux) { - while(aux->unicode()) + while(aux->tqunicode()) { - if( KVI_OPTION_STRING(KviOption_stringWordSplitters).find(*aux) > -1 ) + if( KVI_OPTION_STRING(KviOption_stringWordSplitters).tqfind(*aux) > -1 ) szSource.append(' '); else szSource.append(*aux); @@ -649,19 +649,19 @@ int KviConsole::applyHighlighting(KviWindow *wnd,int type,const QString &nick,co szSource.prepend(' '); if(KVI_OPTION_BOOL(KviOption_boolAlwaysHighlightNick) && connection()) { - if(szSource.find(QString(" %1 ").arg(connection()->userInfo()->nickName()),0,false) > -1) + if(szSource.tqfind(TQString(" %1 ").tqarg(connection()->userInfo()->nickName()),0,false) > -1) return triggerOnHighlight(wnd,type,nick,user,host,szMsg,connection()->userInfo()->nickName()); } if(KVI_OPTION_BOOL(KviOption_boolUseWordHighlighting)) { - for(QStringList::Iterator it = KVI_OPTION_STRINGLIST(KviOption_stringlistHighlightWords).begin(); + for(TQStringList::Iterator it = KVI_OPTION_STRINGLIST(KviOption_stringlistHighlightWords).begin(); it != KVI_OPTION_STRINGLIST(KviOption_stringlistHighlightWords).end() ; ++it) { if((*it).isEmpty()) continue; - // FIXME : This is SLOOOOOOOOW (QString -> ascii translation!!) !!!! - if(szSource.find(QString(" %1 ").arg(*it),0,false) > -1) + // FIXME : This is SLOOOOOOOOW (TQString -> ascii translation!!) !!!! + if(szSource.tqfind(TQString(" %1 ").tqarg(*it),0,false) > -1) { return triggerOnHighlight(wnd,type,nick,user,host,szMsg,*it); } @@ -714,13 +714,13 @@ static const char * g_nickColors[KVI_NUM_NICK_COLORS]= void KviConsole::outputPrivmsg(KviWindow *wnd, int type, - const QString &daNick, - const QString &daUser, - const QString &daHost, - const QString &msg, + const TQString &daNick, + const TQString &daUser, + const TQString &daHost, + const TQString &msg, int iFlags, - const QString &prefix, - const QString &suffix) + const TQString &prefix, + const TQString &suffix) { // FIXME: #warning "THIS IS USED BY WINDOWS THAT ARE NOT BOUND TO THIS IRC CONTEXT" // FIXME: #warning "REMEMBER IT IN ESCAPE COMMANDS" @@ -728,11 +728,11 @@ void KviConsole::outputPrivmsg(KviWindow *wnd, bool bIsChan = (wnd->type() == KVI_WINDOW_TYPE_CHANNEL); bool bIsNotice = ((type == KVI_OUT_CHANNELNOTICE)||(type == KVI_OUT_CHANNELNOTICECRYPTED) \ - ||(type == KVI_OUT_QUERYNOTICE)||(type == KVI_OUT_QUERYNOTICECRYPTED)); + ||(type == KVI_OUT_TQUERYNOTICE)||(type == KVI_OUT_TQUERYNOTICECRYPTED)); - QString nick = daNick; // not that beautiful.. :/ - QString user = daUser; - QString host = daHost; + TQString nick = daNick; // not that beautiful.. :/ + TQString user = daUser; + TQString host = daHost; if(connection()) { @@ -741,7 +741,7 @@ void KviConsole::outputPrivmsg(KviWindow *wnd, if(host.isEmpty())host = connection()->userInfo()->hostName(); } - QString szDecodedMessage = msg; // shallow copy + TQString szDecodedMessage = msg; // shallow copy if(KVI_OPTION_BOOL(KviOption_boolStripMircColorsInUserMessages)) szDecodedMessage = KviMircCntrl::stripControlBytes(szDecodedMessage); @@ -764,13 +764,13 @@ void KviConsole::outputPrivmsg(KviWindow *wnd, if(KVI_OPTION_BOOL(KviOption_boolPopupNotifierOnHighlightedMessages) && (!(iFlags & NoNotifier))) { - QString szMsg = "<"; + TQString szMsg = "<"; szMsg += nick; szMsg += "> "; #ifdef COMPILE_USE_QT4 - szMsg += Qt::escape(szDecodedMessage); + szMsg += TQt::escape(szDecodedMessage); #else - szMsg += QStyleSheet::escape(szDecodedMessage); + szMsg += TQStyleSheet::escape(szDecodedMessage); #endif //debug("kvi_console.cpp:629 debug: %s",szMsg.data()); g_pApp->notifierMessage(wnd,KVI_OPTION_MSGTYPE(iSaveType).pixId(),szMsg,90); @@ -781,11 +781,11 @@ void KviConsole::outputPrivmsg(KviWindow *wnd, // nick[!user@host]This is a test message - QString szNick; - KviQString::sprintf(szNick,"\r!nc\r%Q\r",&nick); + TQString szNick; + KviTQString::sprintf(szNick,"\r!nc\r%Q\r",&nick); if(KVI_OPTION_BOOL(KviOption_boolShowUserAndHostInPrivmsgView)) - KviQString::appendFormatted(szNick,"!%Q@\r!h\r%Q\r",&user,&host); + KviTQString::appendFormatted(szNick,"!%Q@\r!h\r%Q\r",&user,&host); if(bIsChan && KVI_OPTION_BOOL(KviOption_boolShowChannelUserFlagInPrivmsgView)) ((KviChannel *)wnd)->prependUserFlag(nick,szNick); @@ -794,11 +794,11 @@ void KviConsole::outputPrivmsg(KviWindow *wnd, { int sum = 0; int i = nick.length(); - const QChar * aux = nick.unicode(); + const TQChar * aux = nick.tqunicode(); // FIXME: Shouldn't this be case insensitive ? while(i > 0) { - sum += aux->unicode(); + sum += aux->tqunicode(); aux++; i--; } @@ -815,11 +815,11 @@ void KviConsole::outputPrivmsg(KviWindow *wnd, { int sum = 0; int i = nick.length(); - const QChar * aux = nick.unicode(); + const TQChar * aux = nick.tqunicode(); // FIXME: Shouldn't this be case insensitive ? while(i > 0) { - sum += aux->unicode(); + sum += aux->tqunicode(); aux++; i--; } @@ -835,7 +835,7 @@ void KviConsole::outputPrivmsg(KviWindow *wnd, KVI_COLOR_EXT_USER_HALFOP : ((e->flags() & KVI_USERFLAG_VOICE) ? \ KVI_COLOR_EXT_USER_VOICE : KVI_COLOR_EXT_USER_USEROP)))); } - szNick.prepend(QString("%1").arg(color)); + szNick.prepend(TQString("%1").tqarg(color)); szNick.prepend(KVI_TEXT_COLOR); szNick.append(KVI_TEXT_COLOR); } @@ -847,7 +847,7 @@ void KviConsole::outputPrivmsg(KviWindow *wnd, szNick.append(KVI_TEXT_BOLD); } - QString szMessage; + TQString szMessage; if(KVI_OPTION_BOOL(KviOption_boolUseExtendedPrivmsgView)) { @@ -857,14 +857,14 @@ void KviConsole::outputPrivmsg(KviWindow *wnd, } else { if(bIsNotice) { - static QString pre1("*"); - static QString suf1("* "); + static TQString pre1("*"); + static TQString suf1("* "); szMessage = prefix.isEmpty() ? pre1 : prefix; szMessage += szNick; szMessage += suffix.isEmpty() ? suf1 : suffix; } else { - static QString pre2("<"); - static QString suf2("> "); + static TQString pre2("<"); + static TQString suf2("> "); szMessage = prefix.isEmpty() ? pre2 : prefix; szMessage += szNick; szMessage += suffix.isEmpty() ? suf2 : suffix; @@ -877,12 +877,12 @@ void KviConsole::outputPrivmsg(KviWindow *wnd, else wnd->outputNoFmt(type,szMessage); } -void KviConsole::avatarChangedUpdateWindows(const QString &nick,const QString &textLine) +void KviConsole::avatarChangedUpdateWindows(const TQString &nick,const TQString &textLine) { if(!connection())return; //ops... // in quiet mode avoid bugging the user about avatar changes - bool bOut = ((!textLine.isEmpty()) && (!(_OUTPUT_QUIET))); + bool bOut = ((!textLine.isEmpty()) && (!(_OUTPUT_TQUIET))); for(KviChannel * c = connection()->channelList()->first();c;c = connection()->channelList()->next()) { @@ -901,7 +901,7 @@ void KviConsole::avatarChangedUpdateWindows(const QString &nick,const QString &t m_pNotifyListView->avatarChanged(nick); // recalc the item height here too! } -void KviConsole::avatarChanged(KviAvatar * avatar,const QString &nick,const QString &user,const QString &host,const QString &textLine) +void KviConsole::avatarChanged(KviAvatar * avatar,const TQString &nick,const TQString &user,const TQString &host,const TQString &textLine) { if(!connection())return; //ops... @@ -910,13 +910,13 @@ void KviConsole::avatarChanged(KviAvatar * avatar,const QString &nick,const QStr if(KVI_OPTION_BOOL(KviOption_boolSetLastAvatarAsDefaultForRegisteredUsers)) { // Don't even try to do it for myself - if(!KviQString::equalCI(nick,connection()->userInfo()->nickName())) + if(!KviTQString::equalCI(nick,connection()->userInfo()->nickName())) { KviRegisteredUser * u = connection()->userDataBase()->registeredUser(nick,user,host); if(u) { if(avatar)u->setProperty("avatar",avatar->identificationString()); - else u->setProperty("avatar",QString::null); + else u->setProperty("avatar",TQString()); bRegisteredStuff = true; } } @@ -926,7 +926,7 @@ void KviConsole::avatarChanged(KviAvatar * avatar,const QString &nick,const QStr { // cache it if(avatar) - KviAvatarCache::instance()->replace(avatar->identificationString(),KviIrcMask(nick,user,host),currentNetworkName().utf8().data()); + KviAvatarCache::instance()->tqreplace(avatar->identificationString(),KviIrcMask(nick,user,host),currentNetworkName().utf8().data()); else KviAvatarCache::instance()->remove(KviIrcMask(nick,user,host),currentNetworkName().utf8().data()); } @@ -934,19 +934,19 @@ void KviConsole::avatarChanged(KviAvatar * avatar,const QString &nick,const QStr avatarChangedUpdateWindows(nick,textLine); } -void KviConsole::checkDefaultAvatar(KviIrcUserEntry *e,const QString &nick,const QString &user,const QString &host) +void KviConsole::checkDefaultAvatar(KviIrcUserEntry *e,const TQString &nick,const TQString &user,const TQString &host) { // look it up in the cache - QString szAvatar = KviAvatarCache::instance()->lookup(KviIrcMask(nick,user,host),currentNetworkName().utf8().data()); + TQString szAvatar = KviAvatarCache::instance()->lookup(KviIrcMask(nick,user,host),currentNetworkName().utf8().data()); if(!szAvatar.isEmpty()) { // got a cache hit... is it on disk ? - KviAvatar * avatar = g_pIconManager->getAvatar(QString::null,szAvatar); + KviAvatar * avatar = g_pIconManager->getAvatar(TQString(),szAvatar); if(avatar) { // cached image on disk e->setAvatar(avatar); - avatarChangedUpdateWindows(nick,QString::null); + avatarChangedUpdateWindows(nick,TQString()); return; } else { // no cached image on disk.. will need to requery it anyway @@ -960,15 +960,15 @@ void KviConsole::checkDefaultAvatar(KviIrcUserEntry *e,const QString &nick,const if(u) { // the user is registered... - QString szAvatar; + TQString szAvatar; if(u->getProperty("avatar",szAvatar)) { // the user has a default avatar... - KviAvatar * avatar = g_pIconManager->getAvatar(QString::null,szAvatar); + KviAvatar * avatar = g_pIconManager->getAvatar(TQString(),szAvatar); if(avatar) { e->setAvatar(avatar); - avatarChangedUpdateWindows(nick,QString::null); + avatarChangedUpdateWindows(nick,TQString()); return; } } @@ -979,40 +979,40 @@ void KviConsole::resetAvatarForMatchingUsers(KviRegisteredUser * u) { if(!connection())return; - QString szAvatar; + TQString szAvatar; if(!u->getProperty("avatar",szAvatar))return; - KviPointerHashTableIterator it(*(connection()->userDataBase()->dict())); + KviPointerHashTableIterator it(*(connection()->userDataBase()->dict())); while(KviIrcUserEntry * e = it.current()) { if(e->hasHost()) { if(u->matchesFixed(it.currentKey(),e->user(),e->host())) { - KviAvatar * a = g_pIconManager->getAvatar(QString::null,szAvatar); + KviAvatar * a = g_pIconManager->getAvatar(TQString(),szAvatar); e->setAvatar(a); - avatarChangedUpdateWindows(it.currentKey(),QString::null); + avatarChangedUpdateWindows(it.currentKey(),TQString()); } } ++it; } } -KviAvatar * KviConsole::setAvatar(const QString &nick,const QString &user,const QString &host,const QString &szLocalPath,const QString &szName) +KviAvatar * KviConsole::setAvatar(const TQString &nick,const TQString &user,const TQString &host,const TQString &szLocalPath,const TQString &szName) { if(!connection())return 0; - KviIrcUserEntry * e = connection()->userDataBase()->find(nick); + KviIrcUserEntry * e = connection()->userDataBase()->tqfind(nick); if(e) { // User and host must match if((!user.isEmpty()) && e->hasUser()) { - if(!KviQString::equalCI(user,e->user()))return 0; + if(!KviTQString::equalCI(user,e->user()))return 0; } if((!host.isEmpty()) && e->hasHost()) { - if(!KviQString::equalCI(host,e->host()))return 0; + if(!KviTQString::equalCI(host,e->host()))return 0; } // Ok...got it @@ -1021,7 +1021,7 @@ KviAvatar * KviConsole::setAvatar(const QString &nick,const QString &user,const if(avatar) { e->setAvatar(avatar); - avatarChanged(avatar,nick,user,host,QString::null); + avatarChanged(avatar,nick,user,host,TQString()); return avatar; } else { if(_OUTPUT_PARANOIC) @@ -1033,17 +1033,17 @@ KviAvatar * KviConsole::setAvatar(const QString &nick,const QString &user,const KviAvatar * KviConsole::defaultAvatarFromOptions() { - QPixmap * avatar = KVI_OPTION_PIXMAP(KviOption_pixmapMyAvatar).pixmap(); + TQPixmap * avatar = KVI_OPTION_PIXMAP(KviOption_pixmapMyAvatar).pixmap(); if(!avatar)return 0; if(avatar->isNull())return 0; if(KVI_OPTION_STRING(KviOption_stringMyAvatar).isEmpty())return 0; - return new KviAvatar(KVI_OPTION_PIXMAP(KviOption_pixmapMyAvatar).path(),KVI_OPTION_STRING(KviOption_stringMyAvatar),new QPixmap(*avatar)); + return new KviAvatar(KVI_OPTION_PIXMAP(KviOption_pixmapMyAvatar).path(),KVI_OPTION_STRING(KviOption_stringMyAvatar),new TQPixmap(*avatar)); } KviAvatar * KviConsole::currentAvatar() { if(!connection())return 0; - KviIrcUserEntry * e = connection()->userDataBase()->find(connection()->userInfo()->nickName()); + KviIrcUserEntry * e = connection()->userDataBase()->tqfind(connection()->userInfo()->nickName()); if(!e)return 0; KviAvatar * a = e->avatar(); if(!a) @@ -1052,7 +1052,7 @@ KviAvatar * KviConsole::currentAvatar() if(a) { e->setAvatar(a); - avatarChanged(a,connection()->userInfo()->nickName(),QString::null,QString::null,QString::null); + avatarChanged(a,connection()->userInfo()->nickName(),TQString(),TQString(),TQString()); } } return a; @@ -1061,13 +1061,13 @@ KviAvatar * KviConsole::currentAvatar() void KviConsole::setAvatarFromOptions() { if(!connection())return; - KviIrcUserEntry * e = connection()->userDataBase()->find(connection()->userInfo()->nickName()); + KviIrcUserEntry * e = connection()->userDataBase()->tqfind(connection()->userInfo()->nickName()); if(!e)return; KviAvatar * a = defaultAvatarFromOptions(); if(a) { e->setAvatar(a); - avatarChanged(a,connection()->userInfo()->nickName(),QString::null,QString::null,QString::null); + avatarChanged(a,connection()->userInfo()->nickName(),TQString(),TQString(),TQString()); } } @@ -1084,18 +1084,18 @@ void KviConsole::applyOptions() resize(width() + 1,height() + 1); } -void KviConsole::resizeEvent(QResizeEvent *e) +void KviConsole::resizeEvent(TQResizeEvent *e) { int hght = m_pInput->heightHint(); - int hght2 = m_pButtonBox->sizeHint().height(); + int hght2 = m_pButtonBox->tqsizeHint().height(); m_pButtonBox->setGeometry(0,0,width(),hght2); m_pSplitter->setGeometry(0,hght2,width(),height() - (hght + hght2)); m_pInput->setGeometry(0,height() - hght,width(),hght); } -QSize KviConsole::sizeHint() const +TQSize KviConsole::tqsizeHint() const { - QSize ret(m_pIrcView->sizeHint().height(),m_pIrcView->sizeHint().height() + m_pInput->heightHint()); + TQSize ret(m_pIrcView->tqsizeHint().height(),m_pIrcView->tqsizeHint().height() + m_pInput->heightHint()); return ret; } @@ -1115,16 +1115,16 @@ void KviConsole::fillStatusString() if(connection()->userInfo()->isAway()) { - m_szStatusString += QChar(' '); + m_szStatusString += TQChar(' '); m_szStatusString += __tr2qs("away"); } - m_szStatusString += QChar(')'); + m_szStatusString += TQChar(')'); } else { if(connection()->userInfo()->isAway()) { m_szStatusString += " ("; m_szStatusString += __tr2qs("away"); - m_szStatusString += QChar(')'); + m_szStatusString += TQChar(')'); } } @@ -1138,16 +1138,16 @@ void KviConsole::fillCaptionBuffers() { fillStatusString(); - static QString begin(""); - static QString endofbold(" "); - static QString end(""); + static TQString begin(""); + static TQString endofbold(" "); + static TQString end(""); m_szPlainTextCaption = windowName(); m_szPlainTextCaption += " ["; m_szPlainTextCaption += m_szStatusString; - m_szPlainTextCaption += QChar(']'); + m_szPlainTextCaption += TQChar(']'); m_szHtmlActiveCaption = begin; m_szHtmlActiveCaption += KVI_OPTION_COLOR(KviOption_colorCaptionTextActive).name(); @@ -1171,29 +1171,29 @@ void KviConsole::fillCaptionBuffers() } -QPixmap * KviConsole::myIconPtr() +TQPixmap * KviConsole::myIconPtr() { return g_pIconManager->getSmallIcon(isConnected() ? KVI_SMALLICON_LINKS : KVI_SMALLICON_CONSOLE); } -void KviConsole::getTaskBarTipText(QString &buffer) +void KviConsole::getTaskBarTipText(TQString &buffer) { fillStatusString(); - static QString html_bold(""); - static QString html_tab("  "); - static QString html_eofbold(""); - static QString html_hrbr("

"); - static QString html_channel(__tr2qs("channel")); - static QString html_channels(__tr2qs("channels")); - static QString html_query(__tr2qs("query")); - static QString html_queries(__tr2qs("queries")); - static QString html_space(" "); - static QString html_commaspace(", "); - static QString html_br("
"); - static QString html_spaceparopen(" ("); - static QString html_spaceparclosed(")"); + static TQString html_bold(""); + static TQString html_tab("  "); + static TQString html_eofbold(""); + static TQString html_hrbr("

"); + static TQString html_channel(__tr2qs("channel")); + static TQString html_channels(__tr2qs("channels")); + static TQString html_query(__tr2qs("query")); + static TQString html_queries(__tr2qs("queries")); + static TQString html_space(" "); + static TQString html_commaspace(", "); + static TQString html_br("
"); + static TQString html_spaceparopen(" ("); + static TQString html_spaceparclosed(")"); buffer = "" \ START_TABLE_BOLD_ROW; @@ -1201,7 +1201,7 @@ void KviConsole::getTaskBarTipText(QString &buffer) buffer += END_TABLE_BOLD_ROW; if((context()->state() == KviIrcContext::Connected) && connection()) { - QString num; + TQString num; unsigned int uD; unsigned int uH; @@ -1239,7 +1239,7 @@ void KviConsole::getTaskBarTipText(QString &buffer) buffer += ""; } - QDateTime dt; + TQDateTime dt; dt.setTime_t(connection()->statistics()->connectionStartTime()); buffer += START_TABLE_NORMAL_ROW; @@ -1255,7 +1255,7 @@ void KviConsole::getTaskBarTipText(QString &buffer) //buffer += html_spaceparopen; - QString tspan = KviTimeUtils::formatTimeInterval((unsigned int)(kvi_secondsSince(connection()->statistics()->connectionStartTime())), + TQString tspan = KviTimeUtils::formatTimeInterval((unsigned int)(kvi_secondsSince(connection()->statistics()->connectionStartTime())), KviTimeUtils::NoLeadingEmptyIntervals | KviTimeUtils::NoLeadingZeroes); buffer += __tr2qs("Online for"); diff --git a/src/kvirc/ui/kvi_console.h b/src/kvirc/ui/kvi_console.h index b9f494c3..18c02ee5 100644 --- a/src/kvirc/ui/kvi_console.h +++ b/src/kvirc/ui/kvi_console.h @@ -34,11 +34,11 @@ #include "kvi_pointerlist.h" #include -#include +#include -class QToolBar; -class QToolButton; +class TQToolBar; +class TQToolButton; class KviAvatar; class KviDns; @@ -51,7 +51,7 @@ class KviProxy; class KviChannel; class KviQuery; #else - // windoze wants it to compile QList and QList + // windoze wants it to compile TQList and TQList #include "kvi_channel.h" #include "kvi_query.h" #endif @@ -80,6 +80,7 @@ class KVIRC_API KviConsole : public KviWindow friend class KviQuery; friend class KviIrcContext; Q_OBJECT + TQ_OBJECT protected: KviConsole(KviFrame * lpFrm,int iFlags); public: @@ -89,18 +90,18 @@ protected: // UI KviUserListView * m_pNotifyListView; KviWindowToolPageButton * m_pNotifyViewButton; - QComboBox * m_pAddressEdit; - QString m_szStatusString; // nick (flags) on server | not connected + TQComboBox * m_pAddressEdit; + TQString m_szStatusString; // nick (flags) on server | not connected protected: // UI - virtual QPixmap * myIconPtr(); + virtual TQPixmap * myIconPtr(); virtual void fillCaptionBuffers(); - virtual void resizeEvent(QResizeEvent *e); - virtual void closeEvent(QCloseEvent *e); - virtual void getBaseLogFileName(QString &buffer); - virtual void getTaskBarTipText(QString &buffer); + virtual void resizeEvent(TQResizeEvent *e); + virtual void closeEvent(TQCloseEvent *e); + virtual void getBaseLogFileName(TQString &buffer); + virtual void getTaskBarTipText(TQString &buffer); virtual void fillContextPopup(KviTalPopupMenu * p); - virtual QSize sizeHint() const; + virtual TQSize tqsizeHint() const; virtual void applyOptions(); virtual void triggerCreationEvents(); void fillStatusString(); @@ -113,7 +114,7 @@ protected: void destroyConnection(); // internal helper for applyHighlighting - int triggerOnHighlight(KviWindow *wnd,int type,const QString &nick,const QString &user,const QString &host,const QString &szMsg,const QString &trigger); + int triggerOnHighlight(KviWindow *wnd,int type,const TQString &nick,const TQString &user,const TQString &host,const TQString &szMsg,const TQString &trigger); void showNotifyList(bool bShow); @@ -142,33 +143,33 @@ public: // // This connection info // - QString currentNetworkName(); + TQString currentNetworkName(); KviAvatar * currentAvatar(); // // IRC Context wide helpers (connection related) // - void getUserTipText(const QString &nick,KviIrcUserEntry *e,QString &buffer); + void getUserTipText(const TQString &nick,KviIrcUserEntry *e,TQString &buffer); enum OutputPrivmsgFlags { NoWindowFlashing = 1, // has meaning only if NoHighlighting is NOT given, otherwise it is implied NoNotifier = 2, // has meaning only if NoHighlighitng is NOT given, otherwise it is implied NoHighlighting = 4, NoNotifications = 7 // this is 1|2|4 implies NoWindowFlashing and NoNotifier }; - void outputPrivmsg(KviWindow *wnd,int type,const QString &nick, - const QString &user,const QString &host,const QString &msg,int iFlags = 0,const QString &prefix = QString::null,const QString &suffix = QString::null); + void outputPrivmsg(KviWindow *wnd,int type,const TQString &nick, + const TQString &user,const TQString &host,const TQString &msg,int iFlags = 0,const TQString &prefix = TQString(),const TQString &suffix = TQString()); // this applies highlighting to the specified message // and triggers the OnHighlight event. // it returns KVI_OUT_HIGHLIGHT if highlighting was applied // and -1 if OnHighlight called halt // otherwise it returns - int applyHighlighting(KviWindow *wnd,int type,const QString &nick,const QString &user,const QString &host,const QString &szMsg); + int applyHighlighting(KviWindow *wnd,int type,const TQString &nick,const TQString &user,const TQString &host,const TQString &szMsg); // Avatar helpers (conneciton related) void resetAvatarForMatchingUsers(KviRegisteredUser * u); // this should be protected at least - void avatarChangedUpdateWindows(const QString &nick,const QString &textLine); - void avatarChanged(KviAvatar * avatar,const QString &nick,const QString &user,const QString &host,const QString &textLine); - KviAvatar * setAvatar(const QString &nick,const QString &user,const QString &host,const QString &szLocalPath,const QString &szName); - void checkDefaultAvatar(KviIrcUserEntry *e,const QString &nick,const QString &user,const QString &host); + void avatarChangedUpdateWindows(const TQString &nick,const TQString &textLine); + void avatarChanged(KviAvatar * avatar,const TQString &nick,const TQString &user,const TQString &host,const TQString &textLine); + KviAvatar * setAvatar(const TQString &nick,const TQString &user,const TQString &host,const TQString &szLocalPath,const TQString &szName); + void checkDefaultAvatar(KviIrcUserEntry *e,const TQString &nick,const TQString &user,const TQString &host); void setAvatarFromOptions(); // This returns the default avatar for the current KVIrc user @@ -180,8 +181,8 @@ public: void terminateConnectionRequest(bool bForce = false,const char * quitMsg = 0); - // Status string (usermode + nick) (connection related too) - const QString & statusString(){ return m_szStatusString; }; + // tqStatus string (usermode + nick) (connection related too) + const TQString & statusString(){ return m_szStatusString; }; // forwarders from KviIrcConnection KVI_DEPRECATED KviPointerList * channelList(){ return connection() ? connection()->channelList() : 0; }; @@ -195,8 +196,8 @@ public: KviWindow * activeWindow(); // User db, connection related - void completeChannel(const QString &word,KviPointerList * matches); - void completeServer(const QString &word,KviPointerList * matches); + void completeChannel(const TQString &word,KviPointerList * matches); + void completeServer(const TQString &word,KviPointerList * matches); void connectionAttached(); void connectionDetached(); public slots: @@ -204,7 +205,7 @@ public slots: void executeInternalCommand(int index); void recentUrlsChanged(); protected slots: - void ircUriChanged(const QString & ); + void ircUriChanged(const TQString & ); void toggleNotifyView(); void textViewRightClicked(); }; diff --git a/src/kvirc/ui/kvi_cryptcontroller.cpp b/src/kvirc/ui/kvi_cryptcontroller.cpp index 6cbdd5bc..f9a7a134 100644 --- a/src/kvirc/ui/kvi_cryptcontroller.cpp +++ b/src/kvirc/ui/kvi_cryptcontroller.cpp @@ -40,7 +40,7 @@ #include "kvi_memmove.h" #include "kvi_toolwindows_container.h" - #include + #include #include "kvi_pointerhashtable.h" // kvi_app.cpp @@ -65,7 +65,7 @@ - KviCryptController::KviCryptController(QWidget * par,KviWindowToolPageButton* button,const char * name,KviWindow * wnd,KviCryptSessionInfo * cur) + KviCryptController::KviCryptController(TQWidget * par,KviWindowToolPageButton* button,const char * name,KviWindow * wnd,KviCryptSessionInfo * cur) : KviWindowToolWidget(par,button) { // FIXME: #warning "Load the available modules here" @@ -79,51 +79,51 @@ m_pWindow = wnd; #ifdef COMPILE_USE_QT4 - setFocusPolicy(Qt::ClickFocus); + setFocusPolicy(TTQ_ClickFocus); #else - setFocusPolicy(QWidget::ClickFocus); + setFocusPolicy(TQ_ClickFocus); #endif - QGridLayout *g = new QGridLayout(this,10,4,2,2); + TQGridLayout *g = new TQGridLayout(this,10,4,2,2); - QLabel *l = new QLabel(this); + TQLabel *l = new TQLabel(this); l->setPixmap(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_LOCKED))); g->addWidget(l,0,0); - l = new QLabel(__tr2qs("Cryptography/text transformation"),this); + l = new TQLabel(__tr2qs("Cryptography/text transformation"),this); g->addMultiCellWidget(l,0,0,1,3); - QFrame * frm = new QFrame(this); - frm->setFrameStyle(QFrame::HLine | QFrame::Sunken); + TQFrame * frm = new TQFrame(this); + frm->setFrameStyle(TQFrame::HLine | TQFrame::Sunken); g->addMultiCellWidget(frm,1,1,0,3); m_pEnableCheck = new KviStyledCheckBox(__tr2qs("Use the crypt engine"),this); g->addMultiCellWidget(m_pEnableCheck,2,2,0,3); - connect(m_pEnableCheck,SIGNAL(toggled(bool)),this,SLOT(enableCheckToggled(bool))); + connect(m_pEnableCheck,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(enableCheckToggled(bool))); m_pListBox = new KviTalListBox(this); - connect(m_pListBox,SIGNAL(highlighted(KviTalListBoxItem *)),this,SLOT(engineHighlighted(KviTalListBoxItem *))); + connect(m_pListBox,TQT_SIGNAL(highlighted(KviTalListBoxItem *)),this,TQT_SLOT(engineHighlighted(KviTalListBoxItem *))); g->addMultiCellWidget(m_pListBox,3,8,0,0); - m_pDescriptionLabel = new QLabel(this); - m_pDescriptionLabel->setFrameStyle(QFrame::Sunken | QFrame::StyledPanel); + m_pDescriptionLabel = new TQLabel(this); + m_pDescriptionLabel->setFrameStyle(TQFrame::Sunken | TQFrame::StyledPanel); #ifdef COMPILE_USE_QT4 - m_pDescriptionLabel->setAlignment(Qt::AlignTop | Qt::AlignLeft); + m_pDescriptionLabel->tqsetAlignment(TQt::AlignTop | TQt::AlignLeft); #else - m_pDescriptionLabel->setAlignment(Qt::AlignTop | Qt::AlignLeft); + m_pDescriptionLabel->tqsetAlignment(TQt::AlignTop | TQt::AlignLeft); #endif g->addMultiCellWidget(m_pDescriptionLabel,3,3,1,3); - m_pAuthorLabel = new QLabel(this); - m_pAuthorLabel->setFrameStyle(QFrame::Sunken | QFrame::StyledPanel); + m_pAuthorLabel = new TQLabel(this); + m_pAuthorLabel->setFrameStyle(TQFrame::Sunken | TQFrame::StyledPanel); g->addMultiCellWidget(m_pAuthorLabel,4,4,1,3); m_pEnableEncrypt = new KviStyledCheckBox(__tr2qs("Enable encryption"),this); g->addMultiCellWidget(m_pEnableEncrypt,5,5,1,3); - m_pEncryptKeyLabel = new QLabel(__tr2qs("Encrypt key:"),this); + m_pEncryptKeyLabel = new TQLabel(__tr2qs("Encrypt key:"),this); g->addWidget(m_pEncryptKeyLabel,6,1); - m_pEncryptKeyEdit = new QLineEdit(this); + m_pEncryptKeyEdit = new TQLineEdit(this); g->addWidget(m_pEncryptKeyEdit,6,2); m_pEncryptHexKeyCheck = new KviStyledCheckBox(__tr2qs("Hex"),this); @@ -132,18 +132,18 @@ m_pEnableDecrypt = new KviStyledCheckBox(__tr2qs("Enable decryption"),this); g->addMultiCellWidget(m_pEnableDecrypt,7,7,1,3); - m_pDecryptKeyLabel = new QLabel(__tr2qs("Decrypt key:"),this); + m_pDecryptKeyLabel = new TQLabel(__tr2qs("Decrypt key:"),this); g->addWidget(m_pDecryptKeyLabel,8,1); - m_pDecryptKeyEdit = new QLineEdit(this); + m_pDecryptKeyEdit = new TQLineEdit(this); g->addWidget(m_pDecryptKeyEdit,8,2); m_pDecryptHexKeyCheck = new KviStyledCheckBox(__tr2qs("Hex"),this); g->addWidget(m_pDecryptHexKeyCheck,8,3); - m_pOkButton = new QPushButton(__tr2qs("OK"),this); + m_pOkButton = new TQPushButton(__tr2qs("OK"),this); g->addMultiCellWidget(m_pOkButton,9,9,0,3); - connect(m_pOkButton,SIGNAL(clicked()),this,SLOT(okClicked())); + connect(m_pOkButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(okClicked())); g->setRowStretch(3,1); g->setColStretch(2,1); @@ -155,7 +155,7 @@ if(cur) { - KviTalListBoxItem * it = (KviTalListBoxItem *)m_pListBox->findItem(cur->szEngineName.ptr()); + KviTalListBoxItem * it = (KviTalListBoxItem *)m_pListBox->tqfindItem(cur->szEngineName.ptr()); if(it) { m_pEnableCheck->setChecked(true); @@ -184,10 +184,10 @@ void KviCryptController::fillEngineList() { - const KviPointerHashTable * a = g_pCryptEngineManager->engineDict(); + const KviPointerHashTable * a = g_pCryptEngineManager->engineDict(); if(a) { - KviPointerHashTableIterator it(*a); + KviPointerHashTableIterator it(*a); while(it.current()) { KviStr modName = it.current()->providerHandle ? ((KviModule *)(it.current()->providerHandle))->name() : ""; @@ -205,7 +205,7 @@ { KviEngineListBoxItem * eit = (KviEngineListBoxItem *)it; m_pAuthorLabel->setText(eit->m_szAuthor.ptr()); - QString des = "

"; + TQString des = "

"; des += eit->m_szDescription.ptr(); des += "

"; des += __tr2qs("If you dont want to encrypt a particular text line then just start it with the CTRL+P prefix"); diff --git a/src/kvirc/ui/kvi_cryptcontroller.h b/src/kvirc/ui/kvi_cryptcontroller.h index 1d6afcb6..17e26a46 100644 --- a/src/kvirc/ui/kvi_cryptcontroller.h +++ b/src/kvirc/ui/kvi_cryptcontroller.h @@ -26,17 +26,19 @@ #include "kvi_settings.h" +#ifdef Q_MOC_RUN +#define COMPILE_CRYPT_SUPPORT +#endif // Q_MOC_RUN +// TQt4 tqmoc bails out on this ?????? -// Qt4 moc bails out on this ?????? - -#if defined(COMPILE_CRYPT_SUPPORT) || defined(Q_MOC_RUN) - #include +#if defined(COMPILE_CRYPT_SUPPORT) || defined(TQ_TQMOC_RUN) + #include #include "kvi_tal_listbox.h" - #include - #include - #include - #include + #include + #include + #include + #include #include "kvi_styled_controls.h" #include "kvi_crypt.h" @@ -72,23 +74,24 @@ class KVIRC_API KviCryptController : public KviWindowToolWidget { Q_OBJECT + TQ_OBJECT public: - KviCryptController(QWidget * parent,KviWindowToolPageButton* button,const char * name,KviWindow * wnd,KviCryptSessionInfo * cur); + KviCryptController(TQWidget * tqparent,KviWindowToolPageButton* button,const char * name,KviWindow * wnd,KviCryptSessionInfo * cur); ~KviCryptController(); protected: KviWindow * m_pWindow; KviTalListBox * m_pListBox; - QPushButton * m_pOkButton; + TQPushButton * m_pOkButton; KviStyledCheckBox * m_pEnableCheck; - QLabel * m_pDescriptionLabel; - QLabel * m_pAuthorLabel; + TQLabel * m_pDescriptionLabel; + TQLabel * m_pAuthorLabel; KviStyledCheckBox * m_pEnableEncrypt; - QLabel * m_pEncryptKeyLabel; - QLineEdit * m_pEncryptKeyEdit; + TQLabel * m_pEncryptKeyLabel; + TQLineEdit * m_pEncryptKeyEdit; KviStyledCheckBox * m_pEncryptHexKeyCheck; KviStyledCheckBox * m_pEnableDecrypt; - QLabel * m_pDecryptKeyLabel; - QLineEdit * m_pDecryptKeyEdit; + TQLabel * m_pDecryptKeyLabel; + TQLineEdit * m_pDecryptKeyEdit; KviStyledCheckBox * m_pDecryptHexKeyCheck; KviEngineListBoxItem * m_pLastItem; KviCryptSessionInfo * m_pSessionInfo; diff --git a/src/kvirc/ui/kvi_ctcppagedialog.cpp b/src/kvirc/ui/kvi_ctcppagedialog.cpp index e6f392d6..da821469 100644 --- a/src/kvirc/ui/kvi_ctcppagedialog.cpp +++ b/src/kvirc/ui/kvi_ctcppagedialog.cpp @@ -29,40 +29,40 @@ #include "kvi_iconmanager.h" -#include -#include -#include -#include +#include +#include +#include +#include #ifdef COMPILE_USE_QT4 - #include + #include #endif // kvi_app.cpp extern KVIRC_API KviCtcpPageDialog * g_pCtcpPageDialog; KviCtcpPageDialog::KviCtcpPageDialog() -: QWidget(0,"kvirc_ctcppage_dialog", +: TQWidget(0,"kvirc_ctcppage_dialog", #ifdef COMPILE_USE_QT4 - Qt::WindowStaysOnTopHint | Qt::Tool | Qt::Dialog | Qt::Window) + TQt::WindowStaysOnTopHint | TQt::Tool | TQt::Dialog | TQt::Window) #else WStyle_StaysOnTop | WStyle_Tool | WType_Dialog | WType_TopLevel) #endif { - QGridLayout * g = new QGridLayout(this,4,1,6,0); + TQGridLayout * g = new TQGridLayout(this,4,1,6,0); m_pWidgetStack = new KviTalWidgetStack(this); g->addWidget(m_pWidgetStack,0,0); - m_pTabBar = new QTabBar(this); - m_pTabBar->setShape(QTabBar::TriangularBelow); - connect(m_pTabBar,SIGNAL(selected(int)),this,SLOT(tabSelected(int))); + m_pTabBar = new TQTabBar(this); + m_pTabBar->setShape(TQTabBar::TriangularBelow); + connect(m_pTabBar,TQT_SIGNAL(selected(int)),this,TQT_SLOT(tabSelected(int))); g->addWidget(m_pTabBar,1,0); g->setRowStretch(0,1); g->addRowSpacing(2,15); - m_pCloseButton = new QPushButton(__tr2qs("Close"),this); - connect(m_pCloseButton,SIGNAL(clicked()),this,SLOT(die())); + m_pCloseButton = new TQPushButton(__tr2qs("Close"),this); + connect(m_pCloseButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(die())); g->addWidget(m_pCloseButton,3,0); setMinimumSize(300,200); @@ -93,19 +93,19 @@ void KviCtcpPageDialog::tabSelected(int id) m_pWidgetStack->raiseWidget(id); } -void KviCtcpPageDialog::addPage(const QString &szNick,const QString &szUser,const QString &szHost,const QString &szMsg) +void KviCtcpPageDialog::addPage(const TQString &szNick,const TQString &szUser,const TQString &szHost,const TQString &szMsg) { #ifdef COMPILE_USE_QT4 int id = m_pTabBar->addTab(szNick); #else - int id = m_pTabBar->addTab(new QTab(szNick)); + int id = m_pTabBar->addTab(new TQTab(szNick)); #endif - QLabel * l = new QLabel(this); - l->setFrameStyle(QFrame::Raised | QFrame::StyledPanel); + TQLabel * l = new TQLabel(this); + l->setFrameStyle(TQFrame::Raised | TQFrame::StyledPanel); //l->setMaximumWidth(600); - QString date = QDateTime::currentDateTime().toString(); + TQString date = TQDateTime::tqcurrentDateTime().toString(); - QString tmp = "

"; + TQString tmp = "
"; tmp += __tr2qs("You have been paged by"); tmp += "
"; tmp += szNick; @@ -125,7 +125,7 @@ void KviCtcpPageDialog::addPage(const QString &szNick,const QString &szUser,cons m_pTabBar->setCurrentTab(id); } -void KviCtcpPageDialog::closeEvent(QCloseEvent *) +void KviCtcpPageDialog::closeEvent(TQCloseEvent *) { delete this; } @@ -138,9 +138,9 @@ void KviCtcpPageDialog::popup() m_pCloseButton->setFocus(); } -void KviCtcpPageDialog::showEvent(QShowEvent *e) +void KviCtcpPageDialog::showEvent(TQShowEvent *e) { - QWidget::showEvent(e); + TQWidget::showEvent(e); center(); } diff --git a/src/kvirc/ui/kvi_ctcppagedialog.h b/src/kvirc/ui/kvi_ctcppagedialog.h index ea615257..d1e4ba7e 100644 --- a/src/kvirc/ui/kvi_ctcppagedialog.h +++ b/src/kvirc/ui/kvi_ctcppagedialog.h @@ -27,30 +27,31 @@ #include "kvi_string.h" #include "kvi_tal_widgetstack.h" -#include -#include -#include +#include +#include +#include -class KVIRC_API KviCtcpPageDialog : public QWidget +class KVIRC_API KviCtcpPageDialog : public TQWidget { Q_OBJECT + TQ_OBJECT public: KviCtcpPageDialog(); ~KviCtcpPageDialog(); protected: KviTalWidgetStack * m_pWidgetStack; - QTabBar * m_pTabBar; - QPushButton * m_pCloseButton; + TQTabBar * m_pTabBar; + TQPushButton * m_pCloseButton; public: void popup(); - void addPage(const QString &szNick,const QString &szUser,const QString &szHost,const QString &szMsg); + void addPage(const TQString &szNick,const TQString &szUser,const TQString &szHost,const TQString &szMsg); protected slots: void tabSelected(int id); void die(); protected: void center(); - virtual void showEvent(QShowEvent *e); - virtual void closeEvent(QCloseEvent *); + virtual void showEvent(TQShowEvent *e); + virtual void closeEvent(TQCloseEvent *); }; #endif //_KVI_CTCPPAGEDIALOG_H_ diff --git a/src/kvirc/ui/kvi_customtoolbar.cpp b/src/kvirc/ui/kvi_customtoolbar.cpp index 7aa6f1cc..b4e06306 100644 --- a/src/kvirc/ui/kvi_customtoolbar.cpp +++ b/src/kvirc/ui/kvi_customtoolbar.cpp @@ -31,69 +31,69 @@ #include "kvi_actionmanager.h" #include "kvi_customtoolbardescriptor.h" -#include +#include #include "kvi_tal_popupmenu.h" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #ifdef COMPILE_USE_QT4 - #include - #include + #include + #include - #define QDragObject Q3DragObject - #define QTextDrag Q3TextDrag - #define QIconDrag Q3IconDrag + #define TQDragObject Q3DragObject + #define TQTextDrag Q3TextDrag + #define TQIconDrag Q3IconDrag - #include + #include #else - #include - #include + #include + #include #endif KviCustomToolBarSeparator::KviCustomToolBarSeparator(KviCustomToolBar *pParent,const char * name) -: QWidget(pParent,name) +: TQWidget(pParent,name) { m_pToolBar = pParent; setBackgroundMode(pParent->backgroundMode()); setBackgroundOrigin(ParentOrigin); - setSizePolicy(QSizePolicy(QSizePolicy::Minimum,QSizePolicy::Minimum)); + tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Minimum,TQSizePolicy::Minimum)); } -QSize KviCustomToolBarSeparator::sizeHint() const +TQSize KviCustomToolBarSeparator::tqsizeHint() const { #ifdef COMPILE_USE_QT4 - QStyleOption opt; + TQStyleOption opt; opt.initFrom(this); - int extent = style()->pixelMetric(QStyle::PM_ToolBarSeparatorExtent,&opt,this); + int extent = tqstyle()->tqpixelMetric(TQStyle::PM_ToolBarSeparatorExtent,&opt,this); #else - int extent = style().pixelMetric(QStyle::PM_DockWindowSeparatorExtent,this); + int extent = tqstyle().tqpixelMetric(TQStyle::PM_DockWindowSeparatorExtent,this); #endif - if(m_pToolBar->orientation() == Qt::Horizontal)return QSize(extent,0); - else return QSize(0,extent); + if(m_pToolBar->orientation() == Qt::Horizontal)return TQSize(extent,0); + else return TQSize(0,extent); } -void KviCustomToolBarSeparator::paintEvent(QPaintEvent *) +void KviCustomToolBarSeparator::paintEvent(TQPaintEvent *) { - QPainter p(this); + TQPainter p(this); #ifdef COMPILE_USE_QT4 - QStyleOption opt; + TQStyleOption opt; opt.initFrom(this); - style()->drawPrimitive(QStyle::PE_Q3DockWindowSeparator,&opt,&p,this); + tqstyle()->drawPrimitive(TQStyle::PE_Q3DockWindowSeparator,&opt,&p,this); #else - QStyle::SFlags flags = QStyle::Style_Default; - if(m_pToolBar->orientation() == Qt::Horizontal)flags |= QStyle::Style_Horizontal; - style().drawPrimitive(QStyle::PE_DockWindowSeparator,&p,rect(),colorGroup(),flags); + TQStyle::SFlags flags = TQStyle::Style_Default; + if(m_pToolBar->orientation() == Qt::Horizontal)flags |= TQStyle::Style_Horizontal; + tqstyle().tqdrawPrimitive(TQStyle::PE_DockWindowSeparator,&p,rect(),tqcolorGroup(),flags); #endif } -KviCustomToolBar::KviCustomToolBar(KviCustomToolBarDescriptor * d,const QString &label,QT_TOOLBARDOCK_TYPE dock,bool bNewLine,const char * nam) +KviCustomToolBar::KviCustomToolBar(KviCustomToolBarDescriptor * d,const TQString &label,TQT_TOOLBARDOCK_TYPE dock,bool bNewLine,const char * nam) : KviToolBar(label,dock,bNewLine,nam) { m_pDescriptor = d; @@ -101,8 +101,8 @@ KviCustomToolBar::KviCustomToolBar(KviCustomToolBarDescriptor * d,const QString m_pDraggedChild = 0; m_pFilteredChildren = 0; setAcceptDrops(true); - connect(KviActionManager::instance(),SIGNAL(beginCustomizeToolBars()),this,SLOT(beginCustomize())); - connect(KviActionManager::instance(),SIGNAL(endCustomizeToolBars()),this,SLOT(endCustomize())); + connect(KviActionManager::instance(),TQT_SIGNAL(beginCustomizeToolBars()),this,TQT_SLOT(beginCustomize())); + connect(KviActionManager::instance(),TQT_SIGNAL(endCustomizeToolBars()),this,TQT_SLOT(endCustomize())); setMinimumSize(20,20); d->registerToolBar(this); if(KviActionManager::customizingToolBars()) @@ -122,13 +122,13 @@ KviCustomToolBar::~KviCustomToolBar() if(m_pFilteredChildren)delete m_pFilteredChildren; } -void KviCustomToolBar::paintEvent(QPaintEvent * e) +void KviCustomToolBar::paintEvent(TQPaintEvent * e) { KviToolBar::paintEvent(e); if(KviActionManager::customizingToolBars() && (KviActionManager::currentToolBar() == this)) { - QPainter p(this); - p.setPen(Qt::red); + TQPainter p(this); + p.setPen(TQt::red); p.drawRect(0,0,width(),height()); } } @@ -136,30 +136,30 @@ void KviCustomToolBar::paintEvent(QPaintEvent * e) void KviCustomToolBar::filteredChildDestroyed() { if(!m_pFilteredChildren)return; - const QObject * o = sender(); + const TQObject * o = TQT_TQOBJECT(const_cast(sender())); m_pFilteredChildren->remove((void *)o); } -void KviCustomToolBar::filterChild(QObject * o) +void KviCustomToolBar::filterChild(TQObject * o) { - bool * b = new bool(((QWidget *)o)->isEnabled()); + bool * b = new bool(((TQWidget *)o)->isEnabled()); if(m_pFilteredChildren) m_pFilteredChildren->insert(o,b); - if(!*b)((QWidget *)o)->setEnabled(true); + if(!*b)((TQWidget *)o)->setEnabled(true); o->installEventFilter(this); - connect(o,SIGNAL(destroyed()),this,SLOT(filteredChildDestroyed())); + connect(o,TQT_SIGNAL(destroyed()),this,TQT_SLOT(filteredChildDestroyed())); } -void KviCustomToolBar::unfilterChild(QObject * o) +void KviCustomToolBar::unfilterChild(TQObject * o) { if(m_pFilteredChildren) { - bool * b = m_pFilteredChildren->find(o); + bool * b = m_pFilteredChildren->tqfind(o); if(b) { - if(!*b)((QWidget *)o)->setEnabled(false); + if(!*b)((TQWidget *)o)->setEnabled(false); o->removeEventFilter(this); - disconnect(o,SIGNAL(destroyed()),this,SLOT(filteredChildDestroyed())); + disconnect(o,TQT_SIGNAL(destroyed()),this,TQT_SLOT(filteredChildDestroyed())); } } } @@ -169,18 +169,18 @@ void KviCustomToolBar::beginCustomize() if(m_pFilteredChildren)delete m_pFilteredChildren; m_pFilteredChildren = new KviPointerHashTable; m_pFilteredChildren->setAutoDelete(true); - // filter the events for all the children + // filter the events for all the tqchildren #ifdef COMPILE_USE_QT4 - QList l = children(); - for(QList::Iterator it = l.begin();it != l.end();++it) + TQList l = tqchildren(); + for(TQList::Iterator it = l.begin();it != l.end();++it) { if((*it)->isWidgetType()) filterChild(*it); } #else - const QObjectList * l = children(); - QObjectListIterator it(*l); - while(QObject * o = it.current()) + const TQObjectList l = childrenListObject(); + TQObjectListIterator it(l); + while(TQObject * o = it.current()) { if(o->isWidgetType()) filterChild(o); @@ -193,23 +193,23 @@ void KviCustomToolBar::endCustomize() { // stop filtering events #ifdef COMPILE_USE_QT4 - QList l = children(); - for(QList::Iterator it = l.begin();it != l.end();++it) + TQList l = tqchildren(); + for(TQList::Iterator it = l.begin();it != l.end();++it) { if((*it)->isWidgetType()) unfilterChild(*it); } #else - const QObjectList * l = children(); - QObjectListIterator it(*l); - while(QObject * o = it.current()) + const TQObjectList l = childrenListObject(); + TQObjectListIterator it(l); + while(TQObject * o = it.current()) { if(o->isWidgetType()) unfilterChild(o); ++it; } #endif - // FIXME: We SHOULD MAKE SURE that the children are re-enabled... + // FIXME: We SHOULD MAKE SURE that the tqchildren are re-enabled... // this could be done by calling setEnabled(isEnabled()) on each action ? if(m_pFilteredChildren) { @@ -222,34 +222,34 @@ void KviCustomToolBar::endCustomize() void KviCustomToolBar::syncDescriptor() { // store the item order in the descriptor - QBoxLayout * lay = boxLayout(); - QLayoutIterator iter = lay->iterator(); - QLayoutItem * i; + TQBoxLayout * lay = boxLayout(); + TQLayoutIterator iter = lay->iterator(); + TQLayoutItem * i; m_pDescriptor->actions()->clear(); while((i = iter.current())) { - if(QWidget * w = i->widget()) - m_pDescriptor->actions()->append(new QString(w->name())); + if(TQWidget * w = i->widget()) + m_pDescriptor->actions()->append(new TQString(w->name())); ++iter; } } -void KviCustomToolBar::childEvent(QChildEvent *e) +void KviCustomToolBar::childEvent(TQChildEvent *e) { if(KviActionManager::customizingToolBars()) { - // this is useful for droppped and dragged-out children - if(e->type() == QEvent::ChildInserted) + // this is useful for droppped and dragged-out tqchildren + if(e->type() == TQEvent::ChildInserted) { if(e->child()->isWidgetType()) - filterChild(e->child()); + filterChild(TQT_TQOBJECT(e->child())); goto done; } - if(e->type() == QEvent::ChildRemoved) + if(e->type() == TQEvent::ChildRemoved) { if(e->child()->isWidgetType()) - unfilterChild(e->child()); + unfilterChild(TQT_TQOBJECT(e->child())); goto done; } } @@ -257,12 +257,12 @@ done: KviToolBar::childEvent(e); } -void KviCustomToolBar::dragEnterEvent(QDragEnterEvent *e) +void KviCustomToolBar::dragEnterEvent(TQDragEnterEvent *e) { if(!KviActionManager::customizingToolBars())return; KviActionManager::instance()->setCurrentToolBar(this); - QString text; - if(QTextDrag::decode(e,text)) + TQString text; + if(TQTextDrag::decode(e,text)) { if(!text.isEmpty()) { @@ -270,12 +270,12 @@ void KviCustomToolBar::dragEnterEvent(QDragEnterEvent *e) if(a) { e->accept(true); - int idx = dropIndexAt(mapFromGlobal(QCursor::pos()),0,0); + int idx = dropIndexAt(mapFromGlobal(TQCursor::pos()),0,0); m_pDraggedChild = a->addToCustomToolBar(this); #ifdef COMPILE_USE_QT4 - QWidget * pWidgetToMove = widgetAt(idx); + TQWidget * pWidgetToMove = widgetAt(idx); bool bDone = false; - QAction * a; + TQAction * a; if(pWidgetToMove) { a = actionForWidget(pWidgetToMove); @@ -293,23 +293,23 @@ void KviCustomToolBar::dragEnterEvent(QDragEnterEvent *e) boxLayout()->insertWidget(idx,m_pDraggedChild); #ifdef COMPILE_KDE_SUPPORT // bleah :///// - insertWidget(-1,m_pDraggedChild->sizeHint().width(),m_pDraggedChild,idx); + insertWidget(-1,m_pDraggedChild->tqsizeHint().width(),m_pDraggedChild,idx); #endif #endif - QEvent ev(QEvent::LayoutHint); - QApplication::sendEvent(this,&ev); + TQEvent ev(TQEvent::LayoutHint); + TQApplication::sendEvent(this,&ev); } else e->accept(false); } else e->accept(false); } else e->accept(false); } -void KviCustomToolBar::dragMoveEvent(QDragMoveEvent *e) +void KviCustomToolBar::dragMoveEvent(TQDragMoveEvent *e) { if(!m_pDraggedChild)return; - drag(m_pDraggedChild,mapFromGlobal(QCursor::pos())); + drag(m_pDraggedChild,mapFromGlobal(TQCursor::pos())); } -void KviCustomToolBar::dragLeaveEvent(QDragLeaveEvent *e) +void KviCustomToolBar::dragLeaveEvent(TQDragLeaveEvent *e) { if(m_pDraggedChild) { @@ -320,7 +320,7 @@ void KviCustomToolBar::dragLeaveEvent(QDragLeaveEvent *e) } } -void KviCustomToolBar::dropEvent(QDropEvent *e) +void KviCustomToolBar::dropEvent(TQDropEvent *e) { if(!m_pDraggedChild)return; m_pDraggedChild = 0; @@ -328,30 +328,30 @@ void KviCustomToolBar::dropEvent(QDropEvent *e) // nuthin :) } -int KviCustomToolBar::dropIndexAt(const QPoint &pnt,QWidget * exclude,int * excludeIdx) +int KviCustomToolBar::dropIndexAt(const TQPoint &pnt,TQWidget * exclude,int * excludeIdx) { // find the widget at the current poisition // treating exclude as if it was going to be removed // find also the exclude index if needed #ifdef COMPILE_USE_QT4 - QLayout * l = layout(); + TQLayout * l = tqlayout(); #else - QBoxLayout * l = boxLayout(); + TQBoxLayout * l = boxLayout(); #endif - QLayoutItem * i = 0; + TQLayoutItem * i = 0; if(excludeIdx)*excludeIdx = -1; int idx = 0; if(!l)return 0; - QLayoutIterator it = l->iterator(); + TQLayoutIterator it = l->iterator(); - // find the children with minimum distance + // find the tqchildren with minimum distance int iMinDistIdx = -1; - QWidget * pMinDistW = 0; + TQWidget * pMinDistW = 0; unsigned int uMinDist = 0xffffffff; int iExcludeIdx = -1; - QPoint pntExclude; - QWidget * w = 0; + TQPoint pntExclude; + TQWidget * w = 0; while((i = it.current())) { @@ -451,25 +451,25 @@ int KviCustomToolBar::dropIndexAt(const QPoint &pnt,QWidget * exclude,int * excl } #ifdef COMPILE_USE_QT4 -QWidget * KviCustomToolBar::widgetAt(int index) +TQWidget * KviCustomToolBar::widgetAt(int index) { - QLayout * l = layout(); + TQLayout * l = tqlayout(); if(!l) return NULL; - QLayoutItem * it = l->itemAt(index); + TQLayoutItem * it = l->itemAt(index); if(!it) return NULL; return it->widget(); } -QAction * KviCustomToolBar::actionForWidget(QWidget * pWidget) +TQAction * KviCustomToolBar::actionForWidget(TQWidget * pWidget) { return actionAt(pWidget->x() + 1,pWidget->y() + 1); } #endif -void KviCustomToolBar::drag(QWidget * child,const QPoint &pnt) +void KviCustomToolBar::drag(TQWidget * child,const TQPoint &pnt) { int me = -1; int idx = dropIndexAt(pnt,child,&me); @@ -477,15 +477,15 @@ void KviCustomToolBar::drag(QWidget * child,const QPoint &pnt) if(idx == me) return; // would move over itself #ifdef COMPILE_USE_QT4 - QWidget * pWidgetToMove = widgetAt(idx > me ? idx-1 : idx); + TQWidget * pWidgetToMove = widgetAt(idx > me ? idx-1 : idx); debug("SEARCHING FOR WIDGET TO MOVE AT %d AND FOUND %x (ME=%x)",idx > me ? idx-1 : idx,pWidgetToMove,child); if(pWidgetToMove == child) return; // hmmm bool bDone = false; - QAction * pMyOwnAction = actionForWidget(child); + TQAction * pMyOwnAction = actionForWidget(child); if(!pMyOwnAction) return; - QAction * a; + TQAction * a; removeAction(pMyOwnAction); if(pWidgetToMove) { @@ -511,46 +511,46 @@ void KviCustomToolBar::drag(QWidget * child,const QPoint &pnt) insertWidget(-1,child->width(),child,idx); #endif #endif - QEvent ev(QEvent::LayoutHint); - QApplication::sendEvent(this,&ev); + TQEvent ev(TQEvent::LayoutHint); + TQApplication::sendEvent(this,&ev); } -void KviCustomToolBar::mousePressEvent(QMouseEvent * e) +void KviCustomToolBar::mousePressEvent(TQMouseEvent * e) { if(KviActionManager::customizingToolBars()) KviActionManager::instance()->setCurrentToolBar(this); KviToolBar::mousePressEvent(e); } -bool KviCustomToolBar::eventFilter(QObject *o,QEvent *e) +bool KviCustomToolBar::eventFilter(TQObject *o,TQEvent *e) { if(!KviActionManager::customizingToolBars())goto unhandled; // anything here is done when customizing only - if(e->type() == QEvent::Enter) + if(e->type() == TQEvent::Enter) { - if(m_pMovedChild)return true; // kill it while moving other children + if(m_pMovedChild)return true; // kill it while moving other tqchildren } - if(e->type() == QEvent::Leave) + if(e->type() == TQEvent::Leave) { - if(m_pMovedChild)return true; // kill it while moving other children + if(m_pMovedChild)return true; // kill it while moving other tqchildren } - if(e->type() == QEvent::MouseButtonPress) + if(e->type() == TQEvent::MouseButtonPress) { KviActionManager::instance()->setCurrentToolBar(this); - QMouseEvent * ev = (QMouseEvent *)e; + TQMouseEvent * ev = (TQMouseEvent *)e; if(ev->button() & Qt::LeftButton) { if(o->isWidgetType()) { if(!( o->inherits("KviTalPopupMenu") || - o->inherits("QToolBarHandle") || - o->inherits("QDockWindowHandle") || - o->inherits("QDockWindowResizeHandle") || - o->inherits("QToolBarExtensionWidget") + o->inherits("TQToolBarHandle") || + o->inherits(TQDOCKWINDOWHANDLE_OBJECT_NAME_STRING) || + o->inherits("TQDockWindowResizeHandle") || + o->inherits("TQToolBarExtensionWidget") )) { - m_pMovedChild = (QWidget *)o; - // allow resizing of children + m_pMovedChild = (TQWidget *)o; + // allow resizing of tqchildren // FIXME: do it only if the child is really resizable if(m_pMovedChild->width() > 20) // might be an applet { @@ -560,14 +560,14 @@ bool KviCustomToolBar::eventFilter(QObject *o,QEvent *e) goto unhandled; // let the applet handle the event it } } - g_pApp->setOverrideCursor(Qt::sizeAllCursor); + g_pApp->setOverrideCursor(TQt::sizeAllCursor); return true; } } } goto unhandled; } - if(e->type() == QEvent::MouseButtonRelease) + if(e->type() == TQEvent::MouseButtonRelease) { if(m_pMovedChild) { @@ -577,56 +577,56 @@ bool KviCustomToolBar::eventFilter(QObject *o,QEvent *e) } goto unhandled; } - if(e->type() == QEvent::MouseMove) + if(e->type() == TQEvent::MouseMove) { if(m_pMovedChild) { - QMouseEvent * ev = (QMouseEvent *)e; + TQMouseEvent * ev = (TQMouseEvent *)e; - QPoint pnt = mapFromGlobal(m_pMovedChild->mapToGlobal(ev->pos())); + TQPoint pnt = mapFromGlobal(m_pMovedChild->mapToGlobal(ev->pos())); if((pnt.y() < 0) || (pnt.y() > height()) || (pnt.x() < 0) || (pnt.x() > width())) { // drag out! -// FIXME: This is screwed up in Qt4.... :/ +// FIXME: This is screwed up in TQt4.... :/ #ifdef COMPILE_USE_QT4 - QDrag * d = new QDrag(this); - QMimeData * m = new QMimeData(); + TQDrag * d = new TQDrag(this); + TQMimeData * m = new TQMimeData(); m->setText(m_pMovedChild->name()); d->setMimeData(m); #else - QDragObject * d = new QTextDrag(m_pMovedChild->name(),this); + TQDragObject * d = new TQTextDrag(m_pMovedChild->name(),this); #endif KviAction * act = KviActionManager::instance()->getAction(m_pMovedChild->name()); if(act) { - QPixmap * pixie = act->bigIcon(); + TQPixmap * pixie = act->bigIcon(); #ifdef COMPILE_USE_QT4 if(pixie) { d->setPixmap(*pixie); - d->setHotSpot(QPoint(3,3)); + d->setHotSpot(TQPoint(3,3)); } #else - if(pixie)d->setPixmap(*pixie,QPoint(3,3)); + if(pixie)d->setPixmap(*pixie,TQPoint(3,3)); #endif } - //d->setPixmap(QPixmap::grabWidget(m_pMovedChild),QPoint(m_pMovedChild->width() / 2,m_pMovedChild->height() / 2)); + //d->setPixmap(TQPixmap::grabWidget(m_pMovedChild),TQPoint(m_pMovedChild->width() / 2,m_pMovedChild->height() / 2)); // throw it somewhere else for now if(m_pFilteredChildren) - unfilterChild(m_pMovedChild); + unfilterChild(TQT_TQOBJECT(m_pMovedChild)); #ifdef COMPILE_USE_QT4 - QAction * pActionForMovedChild = actionForWidget(m_pMovedChild); + TQAction * pActionForMovedChild = actionForWidget(m_pMovedChild); if(pActionForMovedChild) pActionForMovedChild->setVisible(false); m_pMovedChild->hide(); #else m_pMovedChild->hide(); - m_pMovedChild->reparent(g_pFrame,QPoint(-1000,-1000),false); + m_pMovedChild->reparent(g_pFrame,TQPoint(-1000,-1000),false); #endif - QEvent ev(QEvent::LayoutHint); - QApplication::sendEvent(this,&ev); + TQEvent ev(TQEvent::LayoutHint); + TQApplication::sendEvent(this,&ev); #ifdef COMPILE_USE_QT4 - if(!d->exec(Qt::MoveAction) != Qt::MoveAction) + if(!d->exec(TQt::MoveAction) != TQt::MoveAction) #else if(!d->dragMove()) #endif @@ -636,10 +636,10 @@ bool KviCustomToolBar::eventFilter(QObject *o,QEvent *e) KviActionManager::instance()->emitRemoveActionsHintRequest(); // will filter it as ChildInserted #ifndef COMPILE_USE_QT4 - m_pMovedChild->reparent(this,QPoint(0,0),false); + m_pMovedChild->reparent(this,TQPoint(0,0),false); #endif #ifdef COMPILE_USE_QT4 - QAction * pActionForMovedChild = actionForWidget(m_pMovedChild); + TQAction * pActionForMovedChild = actionForWidget(m_pMovedChild); if(pActionForMovedChild) pActionForMovedChild->setVisible(false); #else @@ -650,10 +650,10 @@ bool KviCustomToolBar::eventFilter(QObject *o,QEvent *e) insertWidget(-1,m_pMovedChild->width(),m_pMovedChild,0); #endif #endif - QEvent ev(QEvent::LayoutHint); - QApplication::sendEvent(this,&ev); + TQEvent ev(TQEvent::LayoutHint); + TQApplication::sendEvent(this,&ev); } else { - QApplication::sendPostedEvents(m_pMovedChild,0); + TQApplication::sendPostedEvents(m_pMovedChild,0); m_pMovedChild->deleteLater(); m_pMovedChild = 0; } diff --git a/src/kvirc/ui/kvi_customtoolbar.h b/src/kvirc/ui/kvi_customtoolbar.h index 64e9526e..ec6483b4 100644 --- a/src/kvirc/ui/kvi_customtoolbar.h +++ b/src/kvirc/ui/kvi_customtoolbar.h @@ -35,50 +35,52 @@ #endif class KviCustomToolBar; -class KviCustomToolBarSeparator : public QWidget +class KviCustomToolBarSeparator : public TQWidget { Q_OBJECT + TQ_OBJECT public: KviCustomToolBarSeparator(KviCustomToolBar *pParent,const char * name); - QSize sizeHint() const; + TQSize tqsizeHint() const; protected: KviCustomToolBar * m_pToolBar; protected: - void paintEvent(QPaintEvent *e); + void paintEvent(TQPaintEvent *e); }; class KVIRC_API KviCustomToolBar : public KviToolBar { friend class KviCustomToolBarDescriptor; Q_OBJECT + TQ_OBJECT protected: - KviCustomToolBar(KviCustomToolBarDescriptor * d,const QString &label,QT_TOOLBARDOCK_TYPE dock = QT_DOCK_TOP,bool bNewLine = false,const char * nam = 0); + KviCustomToolBar(KviCustomToolBarDescriptor * d,const TQString &label,TQT_TOOLBARDOCK_TYPE dock = TQT_DOCK_TOP,bool bNewLine = false,const char * nam = 0); public: ~KviCustomToolBar(); protected: KviCustomToolBarDescriptor * m_pDescriptor; - QWidget * m_pMovedChild; - QWidget * m_pDraggedChild; + TQWidget * m_pMovedChild; + TQWidget * m_pDraggedChild; KviPointerHashTable * m_pFilteredChildren; public: KviCustomToolBarDescriptor * descriptor(){ return m_pDescriptor; }; protected: - virtual void mousePressEvent(QMouseEvent * e); - virtual void dragEnterEvent(QDragEnterEvent *e); - virtual void dragMoveEvent(QDragMoveEvent *e); - virtual void dragLeaveEvent(QDragLeaveEvent *e); - virtual void dropEvent(QDropEvent *e); - virtual void childEvent(QChildEvent *e); - virtual bool eventFilter(QObject *o,QEvent *e); - int dropIndexAt(const QPoint &pnt,QWidget * exclude,int * excludeIdx); + virtual void mousePressEvent(TQMouseEvent * e); + virtual void dragEnterEvent(TQDragEnterEvent *e); + virtual void dragMoveEvent(TQDragMoveEvent *e); + virtual void dragLeaveEvent(TQDragLeaveEvent *e); + virtual void dropEvent(TQDropEvent *e); + virtual void childEvent(TQChildEvent *e); + virtual bool eventFilter(TQObject *o,TQEvent *e); + int dropIndexAt(const TQPoint &pnt,TQWidget * exclude,int * excludeIdx); #ifdef COMPILE_USE_QT4 - QWidget * widgetAt(int index); - QAction * actionForWidget(QWidget * pWidget); + TQWidget * widgetAt(int index); + TQAction * actionForWidget(TQWidget * pWidget); #endif - void drag(QWidget * child,const QPoint &pnt); - void filterChild(QObject * o); - void unfilterChild(QObject * o); - virtual void paintEvent(QPaintEvent * e); + void drag(TQWidget * child,const TQPoint &pnt); + void filterChild(TQObject * o); + void unfilterChild(TQObject * o); + virtual void paintEvent(TQPaintEvent * e); void syncDescriptor(); protected slots: void beginCustomize(); diff --git a/src/kvirc/ui/kvi_debugwindow.cpp b/src/kvirc/ui/kvi_debugwindow.cpp index 81067c04..8110967c 100644 --- a/src/kvirc/ui/kvi_debugwindow.cpp +++ b/src/kvirc/ui/kvi_debugwindow.cpp @@ -36,9 +36,9 @@ #include "kvi_frame.h" #include "kvi_valuelist.h" -#include -#include -#include +#include +#include +#include KviDebugWindow * KviDebugWindow::m_pInstance = 0; @@ -47,7 +47,7 @@ KviDebugWindow::KviDebugWindow() : KviWindow(KVI_WINDOW_TYPE_DEBUG,g_pFrame,__tr2qs("Debug Messages"),0) { m_pInstance = this; - m_pSplitter = new QSplitter(Qt::Horizontal,this,"main_splitter"); + m_pSplitter = new TQSplitter(Qt::Horizontal,this,"main_splitter"); m_pIrcView = new KviIrcView(m_pSplitter,g_pFrame,this); m_pInput = new KviInput(this,0); updateCaption(); @@ -70,7 +70,7 @@ KviDebugWindow * KviDebugWindow::getInstance() -void KviDebugWindow::getBaseLogFileName(QString &buffer) +void KviDebugWindow::getBaseLogFileName(TQString &buffer) { buffer = "debug"; } @@ -93,9 +93,9 @@ void KviDebugWindow::loadProperties(KviConfig *cfg) void KviDebugWindow::fillCaptionBuffers() { - static QString begin(""); - static QString end(""); + static TQString begin(""); + static TQString end(""); m_szPlainTextCaption = windowName(); @@ -112,21 +112,21 @@ void KviDebugWindow::fillCaptionBuffers() m_szHtmlInactiveCaption += end; } -QPixmap * KviDebugWindow::myIconPtr() +TQPixmap * KviDebugWindow::myIconPtr() { return g_pIconManager->getSmallIcon(KVI_SMALLICON_BUG); } -void KviDebugWindow::resizeEvent(QResizeEvent *e) +void KviDebugWindow::resizeEvent(TQResizeEvent *e) { int hght = m_pInput->heightHint(); m_pSplitter->setGeometry(0,0,width(),height() - hght); m_pInput->setGeometry(0,height() - hght,width(),hght); } -QSize KviDebugWindow::sizeHint() const +TQSize KviDebugWindow::tqsizeHint() const { - QSize ret(m_pSplitter->sizeHint().width(),m_pIrcView->sizeHint().height() + m_pInput->heightHint()); + TQSize ret(m_pSplitter->tqsizeHint().width(),m_pIrcView->tqsizeHint().height() + m_pInput->heightHint()); return ret; } diff --git a/src/kvirc/ui/kvi_debugwindow.h b/src/kvirc/ui/kvi_debugwindow.h index b9646e24..616752a6 100644 --- a/src/kvirc/ui/kvi_debugwindow.h +++ b/src/kvirc/ui/kvi_debugwindow.h @@ -28,11 +28,12 @@ #include "kvi_window.h" #include "kvi_string.h" -class QSplitter; +class TQSplitter; class KVIRC_API KviDebugWindow : public KviWindow { Q_OBJECT + TQ_OBJECT public: KviDebugWindow(); ~KviDebugWindow(); @@ -42,13 +43,13 @@ public: static KviDebugWindow * instance(){ return m_pInstance; }; static KviDebugWindow * getInstance(); protected: - virtual QPixmap * myIconPtr(); + virtual TQPixmap * myIconPtr(); virtual void fillCaptionBuffers(); - virtual void resizeEvent(QResizeEvent *e); + virtual void resizeEvent(TQResizeEvent *e); virtual void loadProperties(KviConfig * cfg); virtual void saveProperties(KviConfig * cfg); - virtual void getBaseLogFileName(QString &buffer); - virtual QSize sizeHint() const; + virtual void getBaseLogFileName(TQString &buffer); + virtual TQSize tqsizeHint() const; }; #endif //_KVI_DEBUGWINDOW_H_ diff --git a/src/kvirc/ui/kvi_dynamictooltip.cpp b/src/kvirc/ui/kvi_dynamictooltip.cpp index 3e6f22ce..fe676197 100644 --- a/src/kvirc/ui/kvi_dynamictooltip.cpp +++ b/src/kvirc/ui/kvi_dynamictooltip.cpp @@ -22,8 +22,8 @@ #define __KVIRC__ #include "kvi_dynamictooltip.h" -KviDynamicToolTipHelper::KviDynamicToolTipHelper(QWidget * parent,KviDynamicToolTip * parToolTip) -: KviTalToolTip(parent) +KviDynamicToolTipHelper::KviDynamicToolTipHelper(TQWidget * tqparent,KviDynamicToolTip * parToolTip) +: KviTalToolTip(tqparent) { m_pParentToolTip = parToolTip; } @@ -32,15 +32,15 @@ KviDynamicToolTipHelper::~KviDynamicToolTipHelper() { } -void KviDynamicToolTipHelper::maybeTip(const QPoint & pnt) +void KviDynamicToolTipHelper::maybeTip(const TQPoint & pnt) { m_pParentToolTip->maybeTip(pnt); } -KviDynamicToolTip::KviDynamicToolTip(QWidget * parent,const char * name) -: QObject(parent,name) +KviDynamicToolTip::KviDynamicToolTip(TQWidget * tqparent,const char * name) +: TQObject(tqparent,name) { - m_pHelper = new KviDynamicToolTipHelper(parent,this); + m_pHelper = new KviDynamicToolTipHelper(tqparent,this); } KviDynamicToolTip::~KviDynamicToolTip() @@ -48,12 +48,12 @@ KviDynamicToolTip::~KviDynamicToolTip() delete m_pHelper; } -void KviDynamicToolTip::maybeTip(const QPoint &pnt) +void KviDynamicToolTip::maybeTip(const TQPoint &pnt) { emit tipRequest(this,pnt); } -void KviDynamicToolTip::tip(const QRect &rct,const QString & text) +void KviDynamicToolTip::tip(const TQRect &rct,const TQString & text) { m_pHelper->tip(rct,text); } diff --git a/src/kvirc/ui/kvi_dynamictooltip.h b/src/kvirc/ui/kvi_dynamictooltip.h index 119c224c..d6a6adfb 100644 --- a/src/kvirc/ui/kvi_dynamictooltip.h +++ b/src/kvirc/ui/kvi_dynamictooltip.h @@ -25,7 +25,7 @@ #include "kvi_settings.h" #include "kvi_tal_tooltip.h" -#include +#include class KviDynamicToolTip; @@ -33,29 +33,30 @@ class KVIRC_API KviDynamicToolTipHelper : public KviTalToolTip { friend class KviDynamicToolTip; protected: - KviDynamicToolTipHelper(QWidget * parent,KviDynamicToolTip * parToolTip); + KviDynamicToolTipHelper(TQWidget * tqparent,KviDynamicToolTip * parToolTip); virtual ~KviDynamicToolTipHelper(); protected: KviDynamicToolTip * m_pParentToolTip; protected: - virtual void maybeTip(const QPoint &pnt); + virtual void maybeTip(const TQPoint &pnt); }; -class KVIRC_API KviDynamicToolTip : public QObject +class KVIRC_API KviDynamicToolTip : public TQObject { friend class KviDynamicToolTipHelper; Q_OBJECT + TQ_OBJECT public: - KviDynamicToolTip(QWidget * parent,const char * name = 0); + KviDynamicToolTip(TQWidget * tqparent,const char * name = 0); virtual ~KviDynamicToolTip(); protected: KviDynamicToolTipHelper * m_pHelper; public: - void tip(const QRect &rct,const QString & text); + void tip(const TQRect &rct,const TQString & text); protected: - void maybeTip(const QPoint &pnt); + void maybeTip(const TQPoint &pnt); signals: - void tipRequest(KviDynamicToolTip *tip,const QPoint &pnt); + void tipRequest(KviDynamicToolTip *tip,const TQPoint &pnt); }; #endif //!_KVI_DYNAMICTOOLTIP_H_ diff --git a/src/kvirc/ui/kvi_filedialog.cpp b/src/kvirc/ui/kvi_filedialog.cpp index 99f9c169..2dfba50c 100644 --- a/src/kvirc/ui/kvi_filedialog.cpp +++ b/src/kvirc/ui/kvi_filedialog.cpp @@ -29,16 +29,16 @@ #include "kvi_frame.h" #include "kvi_qstring.h" -#include +#include #include "kvi_tal_tooltip.h" -#include +#include extern KviMediaManager * g_pMediaManager; -KviFileDialog::KviFileDialog(const QString &dirName, const QString &filter, - QWidget *parent, const char *name, bool modal) -: KviTalFileDialog(dirName,filter,parent,name,modal) +KviFileDialog::KviFileDialog(const TQString &dirName, const TQString &filter, + TQWidget *tqparent, const char *name, bool modal) +: KviTalFileDialog(dirName,filter,tqparent,name,modal) { setIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_FOLDER))); @@ -56,35 +56,35 @@ void KviFileDialog::goKvirc() KviStr tmp; g_pApp->getLocalKvircDirectory(tmp,KviApp::None); - setDir(QDir(tmp.ptr())); + setDir(TQDir(tmp.ptr())); } void KviFileDialog::goHome() { - setDir(QDir::home()); + setDir(TQDir::home()); } */ -bool KviFileDialog::askForOpenFileName(QString &buffer,const QString &caption,const QString &initial,const QString &filter,bool showHidden, bool showNative,QWidget* parent) +bool KviFileDialog::askForOpenFileName(TQString &buffer,const TQString &caption,const TQString &initial,const TQString &filter,bool showHidden, bool showNative,TQWidget* tqparent) { #ifdef COMPILE_ON_WINDOWS if(showNative) { - buffer=QFileDialog::getOpenFileName(initial,filter,parent,"open_file_name_dialog",caption); + buffer=TQFileDialog::getOpenFileName(initial,filter,tqparent,"open_file_name_dialog",caption); KviFileUtils::adjustFilePath(buffer); return !buffer.isEmpty(); } #endif - KviFileDialog * d = new KviFileDialog(initial,filter,parent,"open_file_name_dialog",true); + KviFileDialog * d = new KviFileDialog(initial,filter,tqparent,"open_file_name_dialog",true); d->setCaption(caption); - d->setMode(QFileDialog::ExistingFile); + d->setMode(TQFileDialog::ExistingFile); //d->setShowHiddenFiles(showHidden); - if(d->exec() == QDialog::Accepted) + if(d->exec() == TQDialog::Accepted) { buffer = d->selectedFile(); KviFileUtils::adjustFilePath(buffer); @@ -96,26 +96,26 @@ bool KviFileDialog::askForOpenFileName(QString &buffer,const QString &caption,co } -bool KviFileDialog::askForSaveFileName(QString &buffer,const QString & caption,const QString &initial,const QString &filter,bool showHidden,bool bConfirmOverwrite,bool showNative,QWidget* parent) +bool KviFileDialog::askForSaveFileName(TQString &buffer,const TQString & caption,const TQString &initial,const TQString &filter,bool showHidden,bool bConfirmOverwrite,bool showNative,TQWidget* tqparent) { #ifdef COMPILE_ON_WINDOWS if (showNative) { while (1) { - buffer=QFileDialog::getSaveFileName(initial,filter,parent,"save_file_name_dialog",caption); + buffer=TQFileDialog::getSaveFileName(initial,filter,tqparent,"save_file_name_dialog",caption); KviFileUtils::adjustFilePath(buffer); //return !buffer.isEmpty(); if(buffer.isEmpty()) return false; if(!bConfirmOverwrite) return true; // Check for the file existence if(!KviFileUtils::fileExists(buffer)) return true; - QString tmp; - KviQString::sprintf(tmp,__tr2qs("The file %s already exists.
Do you wish to overwrite it?"),buffer.utf8().data()); - switch(QMessageBox::information(parent,__tr2qs("File Exists - KVIrc"),tmp,QMessageBox::Yes,QMessageBox::No | QMessageBox::Default,QMessageBox::Cancel | QMessageBox::Escape)) + TQString tmp; + KviTQString::sprintf(tmp,__tr2qs("The file %s already exists.
Do you wish to overwrite it?"),buffer.utf8().data()); + switch(TQMessageBox::information(tqparent,__tr2qs("File Exists - KVIrc"),tmp,TQMessageBox::Yes,TQMessageBox::No | TQMessageBox::Default,TQMessageBox::Cancel | TQMessageBox::Escape)) { - case QMessageBox::Cancel: return false; break; - case QMessageBox::Yes: return true; break; + case TQMessageBox::Cancel: return false; break; + case TQMessageBox::Yes: return true; break; } } @@ -125,12 +125,12 @@ bool KviFileDialog::askForSaveFileName(QString &buffer,const QString & caption,c #endif - KviFileDialog * d = new KviFileDialog(initial,filter,parent,"save_file_name_dialog",true); + KviFileDialog * d = new KviFileDialog(initial,filter,tqparent,"save_file_name_dialog",true); d->setCaption(caption); - d->setMode(QFileDialog::AnyFile); + d->setMode(TQFileDialog::AnyFile); //d->setShowHiddenFiles(showHidden); - while(d->exec() == QDialog::Accepted) + while(d->exec() == TQDialog::Accepted) { buffer = d->selectedFile(); KviFileUtils::adjustFilePath(buffer); @@ -145,12 +145,12 @@ bool KviFileDialog::askForSaveFileName(QString &buffer,const QString & caption,c // Check for the file existence if(KviFileUtils::fileExists(buffer)) { - QString tmp; - KviQString::sprintf(tmp,__tr2qs("The file %s already exists.
Do you wish to overwrite it?"),buffer.utf8().data()); - switch(QMessageBox::information(d,__tr2qs("File Exists - KVIrc"),tmp,QMessageBox::Yes,QMessageBox::No | QMessageBox::Default,QMessageBox::Cancel | QMessageBox::Escape)) + TQString tmp; + KviTQString::sprintf(tmp,__tr2qs("The file %s already exists.
Do you wish to overwrite it?"),buffer.utf8().data()); + switch(TQMessageBox::information(d,__tr2qs("File Exists - KVIrc"),tmp,TQMessageBox::Yes,TQMessageBox::No | TQMessageBox::Default,TQMessageBox::Cancel | TQMessageBox::Escape)) { - case QMessageBox::Cancel: delete d; return false; break; - case QMessageBox::Yes: delete d; return true; break; + case TQMessageBox::Cancel: delete d; return false; break; + case TQMessageBox::Yes: delete d; return true; break; } } else { delete d; @@ -167,28 +167,28 @@ bool KviFileDialog::askForSaveFileName(QString &buffer,const QString & caption,c } -bool KviFileDialog::askForDirectoryName(QString &buffer,const QString & caption,const QString & initial,const char * filter,bool showHidden,bool showNative,QWidget* parent) +bool KviFileDialog::askForDirectoryName(TQString &buffer,const TQString & caption,const TQString & initial,const char * filter,bool showHidden,bool showNative,TQWidget* tqparent) { #ifdef COMPILE_ON_WINDOWS if(showNative) { - buffer = QFileDialog::getExistingDirectory(initial,parent,"open_file_name_dialog",caption); + buffer = TQFileDialog::getExistingDirectory(initial,tqparent,"open_file_name_dialog",caption); return !buffer.isEmpty(); } #else #ifdef COMPILE_KDE_SUPPORT // the KDE based dir selection dialog is now quite nice - buffer = KFileDialog::getExistingDirectory(initial,parent,caption); + buffer = KFileDialog::getExistingDirectory(initial,tqparent,caption); return !buffer.isEmpty(); #endif #endif KviFileDialog * d = new KviFileDialog(initial, - filter,parent,"directory_name_dialog",true); + filter,tqparent,"directory_name_dialog",true); d->setCaption(caption); - d->setMode(QFileDialog::Directory); + d->setMode(TQFileDialog::Directory); //d->setShowHiddenFiles(showHidden); - if(d->exec() == QDialog::Accepted) + if(d->exec() == TQDialog::Accepted) { buffer = d->selectedFile(); KviFileUtils::adjustFilePath(buffer); @@ -201,21 +201,21 @@ bool KviFileDialog::askForDirectoryName(QString &buffer,const QString & caption, } -bool KviFileDialog::askForOpenFileNames(QStringList &buffer,const QString & caption,const QString & initial,const char * filter,bool showHidden,bool showNative,QWidget* parent) +bool KviFileDialog::askForOpenFileNames(TQStringList &buffer,const TQString & caption,const TQString & initial,const char * filter,bool showHidden,bool showNative,TQWidget* tqparent) { #ifdef COMPILE_ON_WINDOWS if (showNative) { - buffer=QFileDialog::getOpenFileNames(filter,initial,parent,"open_file_name_dialog",caption); + buffer=TQFileDialog::getOpenFileNames(filter,initial,tqparent,"open_file_name_dialog",caption); return (buffer.count()>0); } #endif - KviFileDialog * d = new KviFileDialog(initial,filter ? QString(filter) : QString::null,parent,"open_file_names_dialog",true); + KviFileDialog * d = new KviFileDialog(initial,filter ? TQString(filter) : TQString(),tqparent,"open_file_names_dialog",true); d->setCaption(caption); - d->setMode(QFileDialog::ExistingFiles); + d->setMode(TQFileDialog::ExistingFiles); //d->setShowHiddenFiles(showHidden); - if(d->exec() == QDialog::Accepted) + if(d->exec() == TQDialog::Accepted) { buffer = d->selectedFiles(); delete d; diff --git a/src/kvirc/ui/kvi_filedialog.h b/src/kvirc/ui/kvi_filedialog.h index 985898d6..0bb03f6f 100644 --- a/src/kvirc/ui/kvi_filedialog.h +++ b/src/kvirc/ui/kvi_filedialog.h @@ -32,22 +32,23 @@ #include "kvi_tal_filedialog.h" -#include +#include class KVIRC_API KviFileDialog : public KviTalFileDialog { Q_OBJECT + TQ_OBJECT public: - KviFileDialog(const QString &dirName, const QString &filter=QString::null, - QWidget *parent=0, const char *name=0, bool modal=false); + KviFileDialog(const TQString &dirName, const TQString &filter=TQString(), + TQWidget *tqparent=0, const char *name=0, bool modal=false); ~KviFileDialog(); public: - static bool askForOpenFileName(QString &buffer,const QString & caption,const QString &initial = QString::null,const QString &filter = QString::null,bool showHidden = false,bool showNative = true,QWidget* parent=0); - static bool askForSaveFileName(QString &buffer,const QString & caption,const QString &initial = QString::null,const QString &filter = QString::null,bool showHidden = false,bool bConfirmOverwrite = false,bool showNative = true,QWidget* parent=0); + static bool askForOpenFileName(TQString &buffer,const TQString & caption,const TQString &initial = TQString(),const TQString &filter = TQString(),bool showHidden = false,bool showNative = true,TQWidget* tqparent=0); + static bool askForSaveFileName(TQString &buffer,const TQString & caption,const TQString &initial = TQString(),const TQString &filter = TQString(),bool showHidden = false,bool bConfirmOverwrite = false,bool showNative = true,TQWidget* tqparent=0); - static bool askForDirectoryName(QString &buffer,const QString & caption,const QString & initial,const char * filter = 0,bool showHidden = false,bool showNative=true,QWidget* parent=0); - static bool askForOpenFileNames(QStringList &buffer,const QString & caption,const QString & initial,const char * filter = 0,bool showHidden = false,bool showNative=true,QWidget* parent=0); + static bool askForDirectoryName(TQString &buffer,const TQString & caption,const TQString & initial,const char * filter = 0,bool showHidden = false,bool showNative=true,TQWidget* tqparent=0); + static bool askForOpenFileNames(TQStringList &buffer,const TQString & caption,const TQString & initial,const char * filter = 0,bool showHidden = false,bool showNative=true,TQWidget* tqparent=0); }; diff --git a/src/kvirc/ui/kvi_frame.cpp b/src/kvirc/ui/kvi_frame.cpp index e7b7c0b8..6b6db20c 100644 --- a/src/kvirc/ui/kvi_frame.cpp +++ b/src/kvirc/ui/kvi_frame.cpp @@ -60,42 +60,40 @@ #include "kvi_kvs_script.h" #include "kvi_kvs_eventtriggers.h" -#include -#include -#include -#include -#include - -#include -#include - -#if QT_VERSION >= 300 - #include - #include - #ifdef COMPILE_USE_QT4 - #include - #define QDockArea Q3DockArea - #else - #include - #endif +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#ifdef COMPILE_USE_QT4 + #include + #define TQDockArea Q3DockArea +#else + #include #endif #ifdef COMPILE_USE_QT4 - #include - #include - #include + #include + #include + #include #else - #include + #include #endif #include #ifdef COMPILE_PSEUDO_TRANSPARENCY - #include + #include // kvi_app.h - extern QPixmap * g_pShadedParentGlobalDesktopBackground; - extern QPixmap * g_pShadedChildGlobalDesktopBackground; + extern TQPixmap * g_pShadedParentGlobalDesktopBackground; + extern TQPixmap * g_pShadedChildGlobalDesktopBackground; // FIXME: #warning "When a toolbar is moved , MdiManager is resized but does not update the MdiChild backgrounds" #endif @@ -120,16 +118,16 @@ KviFrame::KviFrame() m_pDockExtension = 0; - m_pSplitter = new QSplitter(Qt::Horizontal,this,"main_splitter"); -// m_pSplitter->setFrameShape(QFrame::NoFrame); + m_pSplitter = new TQSplitter(Qt::Horizontal,this,"main_splitter"); +// m_pSplitter->setFrameShape(TQFrame::NoFrame); setCentralWidget(m_pSplitter); setUsesBigPixmaps(KVI_OPTION_BOOL(KviOption_boolUseBigIcons)); m_pMdi = new KviMdiManager(m_pSplitter,this,"mdi_manager"); - connect(m_pMdi,SIGNAL(enteredSdiMode()),this,SLOT(enteredSdiMode())); - connect(m_pMdi,SIGNAL(leftSdiMode()),this,SLOT(leftSdiMode())); + connect(m_pMdi,TQT_SIGNAL(enteredSdiMode()),this,TQT_SLOT(enteredSdiMode())); + connect(m_pMdi,TQT_SIGNAL(leftSdiMode()),this,TQT_SLOT(leftSdiMode())); // This theoretically had to exists before KviMdiManager (that uses enterSdiMode) m_pMenuBar = new KviMenuBar(this,"main_menu_bar"); @@ -160,7 +158,7 @@ KviFrame::KviFrame() if((KVI_OPTION_RECT(KviOption_rectFrameGeometry).width() < 100) || (KVI_OPTION_RECT(KviOption_rectFrameGeometry).height() < 100)) { // Try to find some reasonable defaults - KVI_OPTION_RECT(KviOption_rectFrameGeometry) = QRect(10,10,g_pApp->desktop()->width() - 200,g_pApp->desktop()->height() - 150); + KVI_OPTION_RECT(KviOption_rectFrameGeometry) = TQRect(10,10,g_pApp->desktop()->width() - 200,g_pApp->desktop()->height() - 150); } resize(KVI_OPTION_RECT(KviOption_rectFrameGeometry).width(), @@ -175,12 +173,12 @@ KviFrame::KviFrame() installAccelerators(this); - layout()->setResizeMode(QLayout::FreeResize); + tqlayout()->setResizeMode(TQLayout::FreeResize); } KviFrame::~KviFrame() { - KVI_OPTION_RECT(KviOption_rectFrameGeometry) = QRect(pos().x(),pos().y(), + KVI_OPTION_RECT(KviOption_rectFrameGeometry) = TQRect(pos().x(),pos().y(), size().width(),size().height()); KVI_OPTION_BOOL(KviOption_boolUseBigIcons) = usesBigPixmaps(); @@ -222,7 +220,7 @@ KviFrame::~KviFrame() g_pFrame = 0; } -int KviFrame::registerAccelerator(const QString &szKeySequence,QObject * recv,const char * slot) +int KviFrame::registerAccelerator(const TQString &szKeySequence,TQObject * recv,const char * slot) { int id = m_pAccel->insertItem(szKeySequence); m_pAccel->connectItem(id,recv,slot); @@ -246,13 +244,13 @@ void KviFrame::unregisterModuleExtensionToolBar(KviMexToolBar * t) void KviFrame::restoreModuleExtensionToolBars() { - for(QStringList::Iterator it = KVI_OPTION_STRINGLIST(KviOption_stringlistModuleExtensionToolbars).begin();it != KVI_OPTION_STRINGLIST(KviOption_stringlistModuleExtensionToolbars).end();++it) + for(TQStringList::Iterator it = KVI_OPTION_STRINGLIST(KviOption_stringlistModuleExtensionToolbars).begin();it != KVI_OPTION_STRINGLIST(KviOption_stringlistModuleExtensionToolbars).end();++it) { - QString szEntry = *it; - int idx = szEntry.find(':'); + TQString szEntry = *it; + int idx = szEntry.tqfind(':'); if(idx != -1) { - QString szMod = szEntry.left(idx); + TQString szMod = szEntry.left(idx); szEntry.remove(0,idx + 1); g_pModuleExtensionManager->allocateExtension("toolbar",KviStr(szEntry),firstConsole(),0,0,szMod); } @@ -265,7 +263,7 @@ void KviFrame::saveModuleExtensionToolBars() for(KviMexToolBar * t = m_pModuleExtensionToolBarList->first();t;t = m_pModuleExtensionToolBarList->next()) { - QString s = t->descriptor()->module()->name(); + TQString s = t->descriptor()->module()->name(); s += ":"; s += t->descriptor()->name().ptr(); @@ -311,7 +309,7 @@ KviMexToolBar * KviFrame::moduleExtensionToolBar(int extensionId) [b]Tab after a leading /[/b]: Completes commands[br] [b]Tab after a / in the middle of input[/b]: Completes directories[br] [b]Tab after a $[/b]: Completes function names[br] - [b]Shift+Tab after the first word of input[/b]: completes masks in the current channel or query[br] + [b]Shift+Tab after the first word of input[/b]: completes tqmasks in the current channel or query[br] [b]Ctrl+B[/b]: Inserts the 'bold' mIRC text control character[br] [b]Ctrl+K[/b]: Inserts the 'color' mIRC text control character[br] [b]Ctrl+R[/b]: Inserts the 'reverse' mIRC text control character[br] @@ -345,63 +343,63 @@ KviMexToolBar * KviFrame::moduleExtensionToolBar(int extensionId) */ -KviAccel * KviFrame::installAccelerators(QWidget * wnd) +KviAccel * KviFrame::installAccelerators(TQWidget * wnd) { - QWidget * pParent = wnd ? (QWidget *)wnd : (QWidget *)this; + TQWidget * pParent = wnd ? (TQWidget *)wnd : (TQWidget *)this; #ifdef COMPILE_USE_QT4 - new QShortcut(QKeySequence(Qt::Key_Left + Qt::ALT),pParent,SLOT(switchToPrevWindow())); - new QShortcut(QKeySequence(Qt::Key_Right + Qt::ALT),pParent,SLOT(switchToNextWindow())); - new QShortcut(QKeySequence(Qt::Key_Up + Qt::CTRL),pParent,SLOT(maximizeWindow())); - new QShortcut(QKeySequence(Qt::Key_Down + Qt::CTRL),pParent,SLOT(minimizeWindow())); - new QShortcut(QKeySequence(Qt::Key_Escape +Qt::CTRL),pParent,SLOT(minimizeWindow())); - new QShortcut(QKeySequence(Qt::Key_Left + Qt::ALT + Qt::SHIFT),pParent,SLOT(switchToPrevWindowInContext())); - new QShortcut(QKeySequence(Qt::Key_Right + Qt::ALT + Qt::SHIFT),pParent,SLOT(switchToNextWindowInContext())); + new TQShortcut(TQKeySequence(TQt::Key_Left + TQt::ALT),pParent,TQT_SLOT(switchToPrevWindow())); + new TQShortcut(TQKeySequence(TQt::Key_Right + TQt::ALT),pParent,TQT_SLOT(switchToNextWindow())); + new TQShortcut(TQKeySequence(TQt::Key_Up + TQt::CTRL),pParent,TQT_SLOT(maximizeWindow())); + new TQShortcut(TQKeySequence(TQt::Key_Down + TQt::CTRL),pParent,TQT_SLOT(minimizeWindow())); + new TQShortcut(TQKeySequence(TQt::Key_Escape +TQt::CTRL),pParent,TQT_SLOT(minimizeWindow())); + new TQShortcut(TQKeySequence(TQt::Key_Left + TQt::ALT + TQt::SHIFT),pParent,TQT_SLOT(switchToPrevWindowInContext())); + new TQShortcut(TQKeySequence(TQt::Key_Right + TQt::ALT + TQt::SHIFT),pParent,TQT_SLOT(switchToNextWindowInContext())); #endif KviAccel *ac = new KviAccel(pParent); static int accel_table[] = { - Qt::Key_Left + Qt::ALT , // prev window - Qt::Key_Right + Qt::ALT , // next window - Qt::Key_Up + Qt::CTRL , // maximize window - Qt::Key_Down + Qt::CTRL , // minimize window - Qt::Key_Escape +Qt::CTRL, // minimize window - Qt::Key_Left + Qt::ALT + Qt::SHIFT , // prev window in context - Qt::Key_Right + Qt::ALT + Qt::SHIFT, // next window in context - Qt::Key_F4 + Qt::CTRL , // close current window - Qt::Key_1 + Qt::CTRL , // script accels... - Qt::Key_2 + Qt::CTRL , - Qt::Key_3 + Qt::CTRL , - Qt::Key_4 + Qt::CTRL , - Qt::Key_5 + Qt::CTRL , - Qt::Key_6 + Qt::CTRL , - Qt::Key_7 + Qt::CTRL , - Qt::Key_8 + Qt::CTRL , - Qt::Key_9 + Qt::CTRL , - Qt::Key_0 + Qt::CTRL , - Qt::Key_F1 , // reserved for context sensitive help - Qt::Key_F2 , - Qt::Key_F3 , - Qt::Key_F4 , - Qt::Key_F5 , - Qt::Key_F6 , - Qt::Key_F7 , - Qt::Key_F8 , - Qt::Key_F9 , - Qt::Key_F10 , - Qt::Key_F11 , - Qt::Key_F12 , -/* Qt::Key_F1 + Qt::SHIFT , // window select... - Qt::Key_F2 + Qt::SHIFT , - Qt::Key_F3 + Qt::SHIFT , - Qt::Key_F4 + Qt::SHIFT , - Qt::Key_F5 + Qt::SHIFT , - Qt::Key_F6 + Qt::SHIFT , - Qt::Key_F7 + Qt::SHIFT , - Qt::Key_F8 + Qt::SHIFT , - Qt::Key_F9 + Qt::SHIFT , - Qt::Key_F10 + Qt::SHIFT , - Qt::Key_F11 + Qt::SHIFT , - Qt::Key_F12 + Qt::SHIFT ,*/ + TQt::Key_Left + TQt::ALT , // prev window + TQt::Key_Right + TQt::ALT , // next window + TQt::Key_Up + TQt::CTRL , // maximize window + TQt::Key_Down + TQt::CTRL , // minimize window + TQt::Key_Escape +TQt::CTRL, // minimize window + TQt::Key_Left + TQt::ALT + TQt::SHIFT , // prev window in context + TQt::Key_Right + TQt::ALT + TQt::SHIFT, // next window in context + TQt::Key_F4 + TQt::CTRL , // close current window + TQt::Key_1 + TQt::CTRL , // script accels... + TQt::Key_2 + TQt::CTRL , + TQt::Key_3 + TQt::CTRL , + TQt::Key_4 + TQt::CTRL , + TQt::Key_5 + TQt::CTRL , + TQt::Key_6 + TQt::CTRL , + TQt::Key_7 + TQt::CTRL , + TQt::Key_8 + TQt::CTRL , + TQt::Key_9 + TQt::CTRL , + TQt::Key_0 + TQt::CTRL , + TQt::Key_F1 , // reserved for context sensitive help + TQt::Key_F2 , + TQt::Key_F3 , + TQt::Key_F4 , + TQt::Key_F5 , + TQt::Key_F6 , + TQt::Key_F7 , + TQt::Key_F8 , + TQt::Key_F9 , + TQt::Key_F10 , + TQt::Key_F11 , + TQt::Key_F12 , +/* TQt::Key_F1 + TQt::SHIFT , // window select... + TQt::Key_F2 + TQt::SHIFT , + TQt::Key_F3 + TQt::SHIFT , + TQt::Key_F4 + TQt::SHIFT , + TQt::Key_F5 + TQt::SHIFT , + TQt::Key_F6 + TQt::SHIFT , + TQt::Key_F7 + TQt::SHIFT , + TQt::Key_F8 + TQt::SHIFT , + TQt::Key_F9 + TQt::SHIFT , + TQt::Key_F10 + TQt::SHIFT , + TQt::Key_F11 + TQt::SHIFT , + TQt::Key_F12 + TQt::SHIFT ,*/ 0 }; @@ -413,79 +411,79 @@ KviAccel * KviFrame::installAccelerators(QWidget * wnd) i++; } - connect(ac,SIGNAL(activated(int)),this,SLOT(accelActivated(int))); + connect(ac,TQT_SIGNAL(activated(int)),this,TQT_SLOT(accelActivated(int))); return ac; } void KviFrame::accelActivated(int id) { - KviAccel * acc = (KviAccel *)sender(); + KviAccel * acc = (KviAccel *)TQT_TQOBJECT(const_cast(sender())); int keys = (int)(acc->key(id)); KviTaskBarItem *item = 0; debug("accel"); switch(keys) { - case (Qt::Key_Left+Qt::ALT): switchToPrevWindow(); break; - case (Qt::Key_Right+Qt::ALT): switchToNextWindow(); break; - case (Qt::Key_Up+Qt::CTRL): maximizeWindow(); break; - case (Qt::Key_Escape+Qt::CTRL): - case (Qt::Key_Down+Qt::CTRL): minimizeWindow(); break; - case (Qt::Key_Left+Qt::ALT+Qt::SHIFT): switchToPrevWindowInContext(); break; - case (Qt::Key_Right+Qt::ALT+Qt::SHIFT): switchToNextWindowInContext(); break; - case (Qt::Key_F4+Qt::CTRL): if(g_pActiveWindow)g_pActiveWindow->close(); break; - case (Qt::Key_F1): g_pApp->contextSensitiveHelp(); break; -/* case(Qt::Key_F1 + SHIFT): + case (TQt::Key_Left+TQt::ALT): switchToPrevWindow(); break; + case (TQt::Key_Right+TQt::ALT): switchToNextWindow(); break; + case (TQt::Key_Up+TQt::CTRL): maximizeWindow(); break; + case (TQt::Key_Escape+TQt::CTRL): + case (TQt::Key_Down+TQt::CTRL): minimizeWindow(); break; + case (TQt::Key_Left+TQt::ALT+TQt::SHIFT): switchToPrevWindowInContext(); break; + case (TQt::Key_Right+TQt::ALT+TQt::SHIFT): switchToNextWindowInContext(); break; + case (TQt::Key_F4+TQt::CTRL): if(g_pActiveWindow)g_pActiveWindow->close(); break; + case (TQt::Key_F1): g_pApp->contextSensitiveHelp(); break; +/* case(TQt::Key_F1 + SHIFT): item = m_pTaskBar->item(0); if(item) setActiveWindow(item->window()); break; - case(Qt::Key_F2 + SHIFT): + case(TQt::Key_F2 + SHIFT): item = m_pTaskBar->item(1); if(item) setActiveWindow(item->window()); break; - case(Qt::Key_F3 + SHIFT): + case(TQt::Key_F3 + SHIFT): item = m_pTaskBar->item(2); if(item) setActiveWindow(item->window()); break; - case(Qt::Key_F4 + SHIFT): + case(TQt::Key_F4 + SHIFT): item = m_pTaskBar->item(3); if(item) setActiveWindow(item->window()); break; - case(Qt::Key_F5 + SHIFT): + case(TQt::Key_F5 + SHIFT): item = m_pTaskBar->item(4); if(item) setActiveWindow(item->window()); break; - case(Qt::Key_F6 + SHIFT): + case(TQt::Key_F6 + SHIFT): item = m_pTaskBar->item(5); if(item) setActiveWindow(item->window()); break; - case(Qt::Key_F7 + SHIFT): + case(TQt::Key_F7 + SHIFT): item = m_pTaskBar->item(6); if(item) setActiveWindow(item->window()); break; - case(Qt::Key_F8 + SHIFT): + case(TQt::Key_F8 + SHIFT): item = m_pTaskBar->item(7); if(item) setActiveWindow(item->window()); break; - case(Qt::Key_F9 + SHIFT): + case(TQt::Key_F9 + SHIFT): item = m_pTaskBar->item(8); if(item) setActiveWindow(item->window()); break; - case(Qt::Key_F10 + SHIFT): + case(TQt::Key_F10 + SHIFT): item = m_pTaskBar->item(9); if(item) setActiveWindow(item->window()); break; - case(Qt::Key_F11 + SHIFT): + case(TQt::Key_F11 + SHIFT): item = m_pTaskBar->item(10); if(item) setActiveWindow(item->window()); break; - case(Qt::Key_F12 + SHIFT): + case(TQt::Key_F12 + SHIFT): item = m_pTaskBar->item(11); if(item) setActiveWindow(item->window()); break;*/ default: { - KVS_TRIGGER_EVENT_1(KviEvent_OnAccelKeyPressed,g_pActiveWindow,(QString)(acc->key(id))); + KVS_TRIGGER_EVENT_1(KviEvent_OnAccelKeyPressed,g_pActiveWindow,(TQString)(acc->key(id))); } break; }; @@ -511,7 +509,7 @@ void KviFrame::saveWindowProperties(KviWindow * wnd,const char * szSection) unsigned int minVal = time(0); while(it.current() && minVal) { - QString * pVal = it.current()->find("EntryTimestamp"); + TQString * pVal = it.current()->tqfind("EntryTimestamp"); if(pVal) { bool bOk; @@ -560,7 +558,7 @@ void KviFrame::closeWindow(KviWindow *wnd) // save it's properties if(KVI_OPTION_BOOL(KviOption_boolWindowsRememberProperties)) // && (wnd->type() == KVI_WINDOW_TYPE_CHANNEL)) { - QString group; + TQString group; wnd->getConfigGroupName(group); // not uses default settings : store it always saveWindowProperties(wnd,group); @@ -617,7 +615,7 @@ void KviFrame::addWindow(KviWindow *wnd,bool bShow) m_pWinList->append(wnd); wnd->createTaskBarItem(); // create the window taskbar item AFTER it has been constructed - QString group; + TQString group; wnd->getConfigGroupName(group); bool bGroupSettings = false; @@ -652,7 +650,7 @@ void KviFrame::addWindow(KviWindow *wnd,bool bShow) //KVI_OPTION_BOOL(KviOption_boolMdiManagerInSdiMode) = false; } else bMaximized = false; - QRect rect = g_pWinPropertiesConfig->readRectEntry("WinRect",QRect(10,10,500,380)); + TQRect rect = g_pWinPropertiesConfig->readRectEntry("WinRect",TQRect(10,10,500,380)); if(bDocked) { @@ -713,7 +711,7 @@ docking_done: } } -KviMdiChild * KviFrame::dockWindow(KviWindow *wnd,bool bShow,bool bCascade,QRect *setGeom) +KviMdiChild * KviFrame::dockWindow(KviWindow *wnd,bool bShow,bool bCascade,TQRect *setGeom) { if(wnd->mdiParent())return wnd->mdiParent(); KviMdiChild * lpC = new KviMdiChild(m_pMdi,""); @@ -807,7 +805,7 @@ void KviFrame::unhighlightWindowsOfContext(KviIrcContext * c) void KviFrame::setActiveWindow(KviWindow *wnd) { - // ASSERT(m_pWinList->findRef(wnd)) + // ASSERT(m_pWinList->tqfindRef(wnd)) if(wnd->isMinimized())wnd->restore(); if(wnd->mdiParent())wnd->setFocus(); else wnd->delayedAutoRaise(); @@ -869,7 +867,7 @@ void KviFrame::childConnectionUserModeChange(KviIrcConnection * c) void KviFrame::childWindowActivated(KviWindow *wnd) { - // ASSERT(m_pWinList->findRef(wnd)) + // ASSERT(m_pWinList->tqfindRef(wnd)) if(g_pActiveWindow == wnd)return; if(g_pActiveWindow)g_pActiveWindow->lostUserFocus(); // YES: it's HERE! @@ -881,7 +879,7 @@ void KviFrame::childWindowActivated(KviWindow *wnd) if(wnd->isMaximized() && wnd->mdiParent())updateCaption(); m_pTaskBar->setActiveItem(wnd->taskBarItem()); - //wnd->gainedActiveWindowStatus(); // <-- atm unused + //wnd->gainedActiveWindowtqStatus(); // <-- atm unused if(g_pActiveWindow->view()) g_pActiveWindow->view()->clearUnreaded(); @@ -934,8 +932,8 @@ void KviFrame::updateCaption() { if(g_pActiveWindow->isMaximized() && g_pActiveWindow->mdiParent()) { - QString tmp = g_pActiveWindow->plainTextCaption(); - tmp += QChar(' '); + TQString tmp = g_pActiveWindow->plainTextCaption(); + tmp += TQChar(' '); tmp += KVI_DEFAULT_FRAME_CAPTION; setCaption(tmp); return; @@ -945,7 +943,7 @@ void KviFrame::updateCaption() } -void KviFrame::closeEvent(QCloseEvent *e) +void KviFrame::closeEvent(TQCloseEvent *e) { if(KVI_OPTION_BOOL(KviOption_boolCloseInTray)) @@ -960,7 +958,7 @@ void KviFrame::closeEvent(QCloseEvent *e) { dockExtension()->setPrevWindowState(windowState()); - QTimer::singleShot( 0, this, SLOT(hide()) ); + TQTimer::singleShot( 0, this, TQT_SLOT(hide()) ); } return; } @@ -984,12 +982,12 @@ void KviFrame::closeEvent(QCloseEvent *e) if(bGotRunningConnection) { - QString txt = "

"; + TQString txt = "

"; txt += __tr2qs("There are active connections, are you sure you wish to "); txt += __tr2qs("quit KVIrc?"); txt += "

"; - switch(QMessageBox::warning(this,__tr2qs("Confirmation - KVIrc"),txt,__tr2qs("&Yes"),__tr2qs("&Always"),__tr2qs("&No"),2,2)) + switch(TQMessageBox::warning(this,__tr2qs("Confirmation - KVIrc"),txt,__tr2qs("&Yes"),__tr2qs("&Always"),__tr2qs("&No"),2,2)) { case 0: // ok to close @@ -1012,9 +1010,9 @@ void KviFrame::closeEvent(QCloseEvent *e) g_pApp->destroyFrame(); } -void KviFrame::resizeEvent(QResizeEvent *e) +void KviFrame::resizeEvent(TQResizeEvent *e) { - KVI_OPTION_RECT(KviOption_rectFrameGeometry) = QRect(pos().x(),pos().y(), + KVI_OPTION_RECT(KviOption_rectFrameGeometry) = TQRect(pos().x(),pos().y(), size().width(),size().height()); KviTalMainWindow::resizeEvent(e); } @@ -1032,9 +1030,9 @@ void KviFrame::updatePseudoTransparency() #endif } -void KviFrame::moveEvent(QMoveEvent *e) +void KviFrame::moveEvent(TQMoveEvent *e) { - KVI_OPTION_RECT(KviOption_rectFrameGeometry) = QRect(pos().x(),pos().y(), + KVI_OPTION_RECT(KviOption_rectFrameGeometry) = TQRect(pos().x(),pos().y(), size().width(),size().height()); #ifdef COMPILE_PSEUDO_TRANSPARENCY updatePseudoTransparency(); @@ -1076,8 +1074,8 @@ void KviFrame::fillToolBarsPopup(KviTalPopupMenu * p) { p->clear(); - disconnect(p,SIGNAL(activated(int)),this,SLOT(toolbarsPopupSelected(int))); // just to be sure - connect(p,SIGNAL(activated(int)),this,SLOT(toolbarsPopupSelected(int))); + disconnect(p,TQT_SIGNAL(activated(int)),this,TQT_SLOT(toolbarsPopupSelected(int))); // just to be sure + connect(p,TQT_SIGNAL(activated(int)),this,TQT_SLOT(toolbarsPopupSelected(int))); int id; int cnt = 0; @@ -1087,7 +1085,7 @@ void KviFrame::fillToolBarsPopup(KviTalPopupMenu * p) { for(KviModuleExtensionDescriptor * d = l->first();d;d = l->next()) { - QString label = __tr2qs("Show %1").arg(d->visibleName()); + TQString label = __tr2qs("Show %1").tqarg(d->visibleName()); if(d->icon())id = p->insertItem(*(d->icon()),label); else id = p->insertItem(label); p->setItemChecked(id,moduleExtensionToolBar(d->id())); @@ -1097,14 +1095,14 @@ void KviFrame::fillToolBarsPopup(KviTalPopupMenu * p) } // FIXME: Should this display "Hide %1" when the toolbar is already visible ? - KviPointerHashTableIterator it2(*(KviCustomToolBarManager::instance()->descriptors())); + KviPointerHashTableIterator it2(*(KviCustomToolBarManager::instance()->descriptors())); if(it2.current()) { if(cnt > 0)p->insertSeparator(); while(KviCustomToolBarDescriptor * d = it2.current()) { - QString label = __tr2qs("Show %1").arg(d->label()); - QString ico = d->iconId(); + TQString label = __tr2qs("Show %1").tqarg(d->label()); + TQString ico = d->iconId(); // use the icon only if there is no check if(d->toolBar()) { @@ -1113,7 +1111,7 @@ void KviFrame::fillToolBarsPopup(KviTalPopupMenu * p) } else { if(!ico.isEmpty()) { - QPixmap * pix = g_pIconManager->getImage(d->iconId()); + TQPixmap * pix = g_pIconManager->getImage(d->iconId()); if(pix) { id = p->insertItem(*pix,label); @@ -1131,7 +1129,7 @@ void KviFrame::fillToolBarsPopup(KviTalPopupMenu * p) } if(cnt > 0)p->insertSeparator(); - p->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_TOOLBAR)),__tr2qs("Customize..."),this,SLOT(customizeToolBars())); + p->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_TOOLBAR)),__tr2qs("Customize..."),this,TQT_SLOT(customizeToolBars())); } void KviFrame::customizeToolBars() @@ -1141,7 +1139,7 @@ void KviFrame::customizeToolBars() void KviFrame::toolbarsPopupSelected(int id) { - const QObject * o = sender(); + const TQObject * o = TQT_TQOBJECT(const_cast(sender())); if(!o)return; if(!o->inherits("KviTalPopupMenu"))return; const KviTalPopupMenu * p = (const KviTalPopupMenu *)o; @@ -1167,20 +1165,20 @@ void KviFrame::toolbarsPopupSelected(int id) bool KviFrame::focusNextPrevChild(bool next) { //debug("FOCUS NEXT PREV CHILD"); - QWidget * w = focusWidget(); + TQWidget * w = tqfocusWidget(); if(w) { #ifdef COMPILE_USE_QT4 - if(w->focusPolicy() == Qt::StrongFocus)return false; + if(w->focusPolicy() == TTQ_StrongFocus)return false; #else - if(w->focusPolicy() == QWidget::StrongFocus)return false; + if(w->focusPolicy() == TQ_StrongFocus)return false; #endif - //QVariant v = w->property("KviProperty_FocusOwner"); + //TQVariant v = w->property("KviProperty_FocusOwner"); //if(v.isValid())return false; // Do NOT change the focus widget! - if(w->parent()) + if(w->tqparent()) { - QVariant v = w->parent()->property("KviProperty_ChildFocusOwner"); + TQVariant v = w->tqparent()->property("KviProperty_ChildFocusOwner"); if(v.isValid())return false; // Do NOT change the focus widget! } } @@ -1200,16 +1198,16 @@ bool KviFrame::focusNextPrevChild(bool next) void KviFrame::saveToolBarPositions() { - QString szTemp; + TQString szTemp; g_pApp->getLocalKvircDirectory(szTemp,KviApp::Config,KVI_CONFIGFILE_TOOLBARS); - QFile f(szTemp); + TQFile f(szTemp); if(f.open(IO_WriteOnly | IO_Truncate)) { #ifdef COMPILE_USE_QT4 f.write(saveState(1)); #else //!COMPILE_USE_QT4 - QTextStream ts(&f); + TQTextStream ts(&f); ts << *this; f.close(); #endif //!COMPILE_USE_QT4 @@ -1218,10 +1216,10 @@ void KviFrame::saveToolBarPositions() void KviFrame::restoreToolBarPositions() { - QString szTemp; + TQString szTemp; g_pApp->getLocalKvircDirectory(szTemp,KviApp::Config,KVI_CONFIGFILE_TOOLBARS); - QFile f(szTemp); + TQFile f(szTemp); bool bNeedDefaults = false; @@ -1231,7 +1229,7 @@ void KviFrame::restoreToolBarPositions() if(!restoreState(f.readAll(),1)) debug("Error while restoring toolbars position"); #else //!COMPILE_USE_QT4 - QTextStream ts(&f); + TQTextStream ts(&f); ts >> *this; f.close(); #endif //!COMPILE_USE_QT4 @@ -1247,7 +1245,7 @@ void KviFrame::restoreToolBarPositions() if(m_pTaskBar->width() > 600) m_pTaskBar->setFixedWidth(250); #else //!COMPILE_USE_QT4 - QDockArea * a = m_pTaskBar->area(); + TQDockArea * a = m_pTaskBar->area(); if((a == topDock()) || (a == bottomDock())) { // nope.... need to move it @@ -1256,7 +1254,7 @@ void KviFrame::restoreToolBarPositions() //int iMaxWidth = m_pTaskBar->maximumWidth(); leftDock()->moveDockWindow(m_pTaskBar); //m_pTaskBar->setMaximumWidth(iMaxWidth); - //m_pTaskBar->setOrientation(Vertical); + //m_pTaskBar->setOrientationQt::Vertical); } // ensure that it is not too wide if(m_pTaskBar->width() > 600) @@ -1264,7 +1262,7 @@ void KviFrame::restoreToolBarPositions() #endif //!COMPILE_USE_QT4 } /*else if(m_pTaskBar->inherits("KviClassicTaskBar")) { - QDockArea * a = m_pTaskBar->area(); + TQDockArea * a = m_pTaskBar->area(); if((a == leftDock()) || (a == rightDock())) { // nope.... need to move it @@ -1287,31 +1285,31 @@ void KviFrame::createTaskBar() { m_pTaskBar = new KviTreeTaskBar(); #ifdef COMPILE_USE_QT4 - m_pTaskBar->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea); - addDockWidget(Qt::LeftDockWidgetArea,m_pTaskBar); + m_pTaskBar->setAllowedAreas(TQt::LeftDockWidgetArea | TQt::RightDockWidgetArea); + addDockWidget(TQt::LeftDockWidgetArea,m_pTaskBar); #else //!COMPILE_USE_QT4 - setDockEnabled(m_pTaskBar,Qt::DockTop,false); - setDockEnabled(m_pTaskBar,Qt::DockBottom,false); + setDockEnabled(m_pTaskBar,TQt::DockTop,false); + setDockEnabled(m_pTaskBar,TQt::DockBottom,false); #endif //!COMPILE_USE_QT4 } else { m_pTaskBar = new KviClassicTaskBar(); #ifdef COMPILE_USE_QT4 - m_pTaskBar->setAllowedAreas(Qt::AllDockWidgetAreas); - addDockWidget(Qt::BottomDockWidgetArea,m_pTaskBar); + m_pTaskBar->setAllowedAreas(TQt::AllDockWidgetAreas); + addDockWidget(TQt::BottomDockWidgetArea,m_pTaskBar); #else //!COMPILE_USE_QT4 - setDockEnabled(m_pTaskBar,Qt::DockTop,true); - setDockEnabled(m_pTaskBar,Qt::DockBottom,true); + setDockEnabled(m_pTaskBar,TQt::DockTop,true); + setDockEnabled(m_pTaskBar,TQt::DockBottom,true); #endif //!COMPILE_USE_QT4 } #ifndef COMPILE_USE_QT4 - setDockEnabled(m_pTaskBar,Qt::DockLeft,true); - setDockEnabled(m_pTaskBar,Qt::DockRight,true); + setDockEnabled(m_pTaskBar,TQt::DockLeft,true); + setDockEnabled(m_pTaskBar,TQt::DockRight,true); #endif //!COMPILE_USE_QT4 } void KviFrame::recreateTaskBar() { - QString szOldClass = m_pTaskBar->className(); + TQString szOldClass = m_pTaskBar->className(); saveToolBarPositions(); KviWindow * w; @@ -1332,14 +1330,14 @@ void KviFrame::recreateTaskBar() /* - QString szNewClass = m_pTaskBar->className(); + TQString szNewClass = m_pTaskBar->className(); if(szOldClass != szNewClass) { // the class changed... // make sure that the tree task bar is in the left or right dock // and the classic one is in the top or bottom on - Qt::Dock dock; + TQt::Dock dock; int index; bool nl; int eo; @@ -1347,11 +1345,11 @@ void KviFrame::recreateTaskBar() if(KVI_OPTION_BOOL(KviOption_boolUseTreeWindowListTaskBar)) { - if((dock == Qt::Bottom) || (dock == Qt::Top)) - moveDockWindow(m_pTaskBar,Qt::Left); + if((dock == TQt::Bottom) || (dock == TQt::Top)) + moveDockWindow(m_pTaskBar,TQt::Left); } else { - if((dock == Qt::Left) || (dock == Qt::Right)) - moveDockWindow(m_pTaskBar,Qt::Bottom); + if((dock == TQt::Left) || (dock == TQt::Right)) + moveDockWindow(m_pTaskBar,TQt::Bottom); } } */ @@ -1359,41 +1357,6 @@ void KviFrame::recreateTaskBar() if(g_pActiveWindow)m_pTaskBar->setActiveItem(g_pActiveWindow->taskBarItem()); } - -#if QT_VERSION == 0x030201 -unsigned int KviFrame::windowState() -{ - /* enum GNWindowState { WindowNoState = 0x00000000, WindowMinimized = 0x00000001, - WindowMaximized = 0x00000002, WindowFullScreen = 0x00000004, WindowActive = 0x00000008 }; - GNWindowState GNWState; - if(isMinimized()) GNWState=WindowMinimized; - else if(isMaximized()) GNWState=WindowMaximized; - else if(isActiveWindow()) GNWState=WindowActive; - else if(isFullScreen()) GNWState=WindowFullScreen; - else GNWState=WindowNoState; */ - -/* WindowNoState = 0x00000000 WindowMinimized = 0x00000001 - WindowMaximized = 0x00000002 WindowFullScreen = 0x00000004 WindowActive = 0x00000008*/ - if(isMinimized()) return 0x00000001; - else if(isMaximized()) return 0x00000002; - else if(isActiveWindow()) return 0x00000008; - else if(isFullScreen()) return 0x00000004; - else return 0x00000000; -} -void KviFrame::setWindowState(unsigned int GNWState) -{ - switch(GNWState) - { - case 0x00000001: - showMinimized(); - break; - case 0x00000002: - showMaximized(); - break; - } // switch -} -#endif - //////////////////////////////////////////////////////////////////////////////////////////////////// // Some accelerators //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -1430,7 +1393,7 @@ void KviFrame::switchToNextWindowInContext(void) m_pTaskBar->switchWindow(true,true); } -void KviFrame::hideEvent ( QHideEvent * e) +void KviFrame::hideEvent ( TQHideEvent * e) { if(KVI_OPTION_BOOL(KviOption_boolMinimizeInTray)) { @@ -1441,7 +1404,7 @@ void KviFrame::hideEvent ( QHideEvent * e) { executeInternalCommand(KVI_INTERNALCOMMAND_DOCKWIDGET_SHOW); } - QTimer::singleShot( 0, this, SLOT(hide()) ); + TQTimer::singleShot( 0, this, TQT_SLOT(hide()) ); } } diff --git a/src/kvirc/ui/kvi_frame.h b/src/kvirc/ui/kvi_frame.h index d735a7c6..ebc7e67c 100644 --- a/src/kvirc/ui/kvi_frame.h +++ b/src/kvirc/ui/kvi_frame.h @@ -43,7 +43,7 @@ class KviMdiChild; class KviWindow; class KviConsole; class KviTaskBarBase; -class QSplitter; +class TQSplitter; class KviConfig; class KviMexToolBar; class KviIrcContext; @@ -91,12 +91,13 @@ class KVIRC_API KviFrame : public KviTalMainWindow // , public KviIrcContextMana friend class KviUserListView; friend class KviUserListViewArea; Q_OBJECT + TQ_OBJECT public: KviFrame(); ~KviFrame(); protected: // subwindows - QSplitter * m_pSplitter; // the frame is splitted vertically and thus can host widgets + TQSplitter * m_pSplitter; // the frame is splitted vertically and thus can host widgets KviMenuBar * m_pMenuBar; // the main menu bar KviMdiManager * m_pMdi; // the mdi manager widget (child of the splitter) KviPointerList * m_pModuleExtensionToolBarList; // the module extension toolbars @@ -109,10 +110,10 @@ protected: KviDockExtension * m_pDockExtension; // the frame's dock extension: this should be prolly moved ? KviAccel * m_pAccel; // the global accelelrator public: - // the mdi manager: handles mdi children + // the mdi manager: handles mdi tqchildren KviMdiManager * mdiManager(){ return m_pMdi; }; // the splitter is the central widget for this frame - QSplitter * splitter(){ return m_pSplitter; }; + TQSplitter * splitter(){ return m_pSplitter; }; // KviTaskBarBase is the base class for KviTreeTaskBar and the KviClassicTaskBar KviTaskBarBase * taskBar(){ return m_pTaskBar; }; // well.. the menu bar :D @@ -137,7 +138,7 @@ public: // window list. This is useful for asynchronous functions // that keep a window pointer and need to ensure that it is still // valid after an uncontrolled delay. (Think of a /timer implementation) - bool windowExists(KviWindow * wnd){ return (m_pWinList->findRef(wnd) != -1); }; + bool windowExists(KviWindow * wnd){ return (m_pWinList->tqfindRef(wnd) != -1); }; // The number of consoles in this frame unsigned int consoleCount(); // Creates a new console window. DON'T use the KviConsole constructor directly. @@ -167,16 +168,9 @@ public: // Helper to fill the toolbars popup // it is used by KviToolBar and KviMenuBar void fillToolBarsPopup(KviTalPopupMenu * p); - int registerAccelerator(const QString &szKeySequence,QObject * recv,const char * slot); + int registerAccelerator(const TQString &szKeySequence,TQObject * recv,const char * slot); void unregisterAccelerator(int id); -#if QT_VERSION == 0x030201 - - unsigned int windowState(); - void setWindowState(unsigned int GNWState); - -#endif - public slots: void newConsole(); void executeInternalCommand(int index); @@ -193,7 +187,7 @@ protected: void createTaskBar(); void recreateTaskBar(); - KviMdiChild * dockWindow(KviWindow *wnd,bool bShow = true,bool bCascade = true,QRect * setGeom = 0); + KviMdiChild * dockWindow(KviWindow *wnd,bool bShow = true,bool bCascade = true,TQRect * setGeom = 0); void undockWindow(KviWindow *wnd); void closeWindow(KviWindow *wnd); @@ -210,17 +204,17 @@ protected: void childConnectionServerInfoChange(KviIrcConnection * c); void childWindowSelectionStateChange(KviWindow * pWnd,bool bGotSelectionNow); - virtual void closeEvent(QCloseEvent *e); - virtual void resizeEvent(QResizeEvent *e); - virtual void moveEvent(QMoveEvent *e); + virtual void closeEvent(TQCloseEvent *e); + virtual void resizeEvent(TQResizeEvent *e); + virtual void moveEvent(TQMoveEvent *e); virtual bool focusNextPrevChild(bool next); virtual void windowActivationChange(bool bOldActive); void updatePseudoTransparency(); - KviAccel * installAccelerators(QWidget * wnd); + KviAccel * installAccelerators(TQWidget * wnd); - virtual void hideEvent ( QHideEvent * e); + virtual void hideEvent ( TQHideEvent * e); protected slots: void switchToNextWindow(); void switchToPrevWindow(); diff --git a/src/kvirc/ui/kvi_historywin.cpp b/src/kvirc/ui/kvi_historywin.cpp index ba9ca315..6e8219fb 100644 --- a/src/kvirc/ui/kvi_historywin.cpp +++ b/src/kvirc/ui/kvi_historywin.cpp @@ -31,10 +31,10 @@ #include "kvi_input.h" #include "kvi_mirccntrl.h" -#include +#include #ifdef COMPILE_USE_QT4 - #include + #include #endif #include @@ -43,18 +43,18 @@ extern KviInputHistory * g_pInputHistory; KviHistoryWindow::KviHistoryWindow() #ifdef COMPILE_USE_QT4 -: KviTalListBox(0,Qt::Popup) +: KviTalListBox(0,TQt::Popup) #else -: KviTalListBox(0,Qt::WType_Popup) +: KviTalListBox(0,TQt::WType_Popup) #endif { m_pOwner = 0; #ifdef COMPILE_USE_QT4 setHScrollBarMode(Q3ScrollView::AlwaysOff); #else - setHScrollBarMode(QScrollView::AlwaysOff); + setHScrollBarMode(TQScrollView::AlwaysOff); #endif - connect(this,SIGNAL(selected(const QString &)),this,SLOT(itemSelected(const QString &))); + connect(this,TQT_SIGNAL(selected(const TQString &)),this,TQT_SLOT(itemSelected(const TQString &))); m_iTimerId = -1; } @@ -71,7 +71,7 @@ KviHistoryWindow::~KviHistoryWindow() void KviHistoryWindow::fill() { clear(); - for(QString * s = g_pInputHistory->list()->last();s;s = g_pInputHistory->list()->prev()) + for(TQString * s = g_pInputHistory->list()->last();s;s = g_pInputHistory->list()->prev()) { insertItem(*s); } @@ -80,14 +80,14 @@ void KviHistoryWindow::fill() void KviHistoryWindow::popup(KviInput *owner) { - if(m_pOwner)disconnect(m_pOwner,SIGNAL(destroyed()),this,SLOT(ownerDead())); + if(m_pOwner)disconnect(m_pOwner,TQT_SIGNAL(destroyed()),this,TQT_SLOT(ownerDead())); m_pOwner = owner; - connect(m_pOwner,SIGNAL(destroyed()),this,SLOT(ownerDead())); + connect(m_pOwner,TQT_SIGNAL(destroyed()),this,TQT_SLOT(ownerDead())); fill(); show(); } -void KviHistoryWindow::mousePressEvent(QMouseEvent *e) +void KviHistoryWindow::mousePressEvent(TQMouseEvent *e) { if(e->pos().x() < 0)goto hideme; if(e->pos().x() > width())goto hideme; @@ -136,24 +136,24 @@ got_mit: } */ -void KviHistoryWindow::keyPressEvent(QKeyEvent *e) +void KviHistoryWindow::keyPressEvent(TQKeyEvent *e) { switch(e->key()) { - case Qt::Key_Up: - case Qt::Key_Down: - case Qt::Key_PageUp: - case Qt::Key_PageDown: - case Qt::Key_Return: + case TQt::Key_Up: + case TQt::Key_Down: + case TQt::Key_PageUp: + case TQt::Key_PageDown: + case TQt::Key_Return: KviTalListBox::keyPressEvent(e); return; break; - case Qt::Key_Escape: + case TQt::Key_Escape: doHide(); return; break; /* - case Qt::Key_Backspace: + case TQt::Key_Backspace: if(m_szTypedSeq.hasData()) { m_szTypedSeq.cutRight(1); @@ -166,7 +166,7 @@ void KviHistoryWindow::keyPressEvent(QKeyEvent *e) break; */ /* - case Qt::Key_Space: + case TQt::Key_Space: doHide(); if(findTypedSeq()) { @@ -180,7 +180,7 @@ void KviHistoryWindow::keyPressEvent(QKeyEvent *e) break; */ /* - case Qt::Key_Tab: + case TQt::Key_Tab: doHide(); findTypedSeq(); KviStr szItem = m_szCurFullSeq; @@ -214,10 +214,10 @@ void KviHistoryWindow::ownerDead() void KviHistoryWindow::show() { m_iTimerId = startTimer(100000); //100 sec ...seems enough - QWidget::show(); + TQWidget::show(); } -void KviHistoryWindow::timerEvent(QTimerEvent *) +void KviHistoryWindow::timerEvent(TQTimerEvent *) { m_pOwner = 0; // do not setFocus() to the owner after the timeout doHide(); @@ -235,14 +235,14 @@ void KviHistoryWindow::doHide() m_pOwner->setFocus(); } -void KviHistoryWindow::itemSelected(const QString &str) +void KviHistoryWindow::itemSelected(const TQString &str) { doHide(); if(m_pOwner)m_pOwner->setText(str); } -void KviHistoryWindow::hideEvent(QHideEvent *) +void KviHistoryWindow::hideEvent(TQHideEvent *) { if(m_iTimerId != -1) { diff --git a/src/kvirc/ui/kvi_historywin.h b/src/kvirc/ui/kvi_historywin.h index 9a17eecd..17cba603 100644 --- a/src/kvirc/ui/kvi_historywin.h +++ b/src/kvirc/ui/kvi_historywin.h @@ -35,6 +35,7 @@ class KviInput; class KVIRC_API KviHistoryWindow : public KviTalListBox { Q_OBJECT + TQ_OBJECT public: KviHistoryWindow(); ~KviHistoryWindow(); @@ -48,14 +49,14 @@ public: private: virtual void show(); // bool findTypedSeq(); // returns true if it is a complete word - virtual void keyPressEvent(QKeyEvent *e); - virtual void mousePressEvent(QMouseEvent *e); - virtual void timerEvent(QTimerEvent *); - virtual void hideEvent ( QHideEvent * ); + virtual void keyPressEvent(TQKeyEvent *e); + virtual void mousePressEvent(TQMouseEvent *e); + virtual void timerEvent(TQTimerEvent *); + virtual void hideEvent ( TQHideEvent * ); void fill(); public slots: void ownerDead(); - void itemSelected(const QString &str); + void itemSelected(const TQString &str); }; #endif //_KVI_HISTORYWIN_H_ diff --git a/src/kvirc/ui/kvi_htmldialog.cpp b/src/kvirc/ui/kvi_htmldialog.cpp index 6a8b4378..7c16fe5f 100644 --- a/src/kvirc/ui/kvi_htmldialog.cpp +++ b/src/kvirc/ui/kvi_htmldialog.cpp @@ -27,13 +27,13 @@ #include "kvi_locale.h" #include "kvi_tal_textedit.h" -#include -#include -#include -#include +#include +#include +#include +#include -KviHtmlDialog::KviHtmlDialog(QWidget * pParent,KviHtmlDialogData * pData) -: QDialog(pParent) +KviHtmlDialog::KviHtmlDialog(TQWidget * pParent,KviHtmlDialogData * pData) +: TQDialog(pParent) { m_pData = pData; @@ -45,18 +45,18 @@ KviHtmlDialog::KviHtmlDialog(QWidget * pParent,KviHtmlDialogData * pData) if(!pData->pixIcon.isNull()) setIcon(pData->pixIcon); - QGridLayout * g = new QGridLayout(this,4,3,7,7); + TQGridLayout * g = new TQGridLayout(this,4,3,7,7); - QLabel * l; - QTextBrowser * te; - QPushButton * pb; + TQLabel * l; + TQTextBrowser * te; + TQPushButton * pb; int iUp = 0; int iDown = 2; if(!pData->szUpperLabelText.isEmpty()) { - l = new QLabel(this); + l = new TQLabel(this); l->setText(pData->szUpperLabelText); g->addMultiCellWidget(l,0,0,0,2); iUp = 1; @@ -64,13 +64,13 @@ KviHtmlDialog::KviHtmlDialog(QWidget * pParent,KviHtmlDialogData * pData) if(!pData->szLowerLabelText.isEmpty()) { - l = new QLabel(this); + l = new TQLabel(this); l->setText(pData->szLowerLabelText); g->addMultiCellWidget(l,2,2,0,2); iDown = 1; } - te = new QTextBrowser(this); + te = new TQTextBrowser(this); te->setText(pData->szHtmlText); //te->setReadOnly(true); @@ -84,29 +84,29 @@ KviHtmlDialog::KviHtmlDialog(QWidget * pParent,KviHtmlDialogData * pData) if(pData->iCancelButton > iButtons)pData->iCancelButton = iButtons; if(pData->iDefaultButton > iButtons)pData->iDefaultButton = iButtons; - pb = new QPushButton(this); + pb = new TQPushButton(this); pb->setText(pData->szButton1Text.isEmpty() ? __tr2qs("OK") : pData->szButton1Text); pb->setDefault(pData->iDefaultButton == 1); int iCoord = iButtons == 1 ? 1 : 0; g->addWidget(pb,3,iCoord); - connect(pb,SIGNAL(clicked()),this,SLOT(button1Pressed())); + connect(pb,TQT_SIGNAL(clicked()),this,TQT_SLOT(button1Pressed())); if(!pData->szButton2Text.isEmpty()) { - pb = new QPushButton(this); + pb = new TQPushButton(this); pb->setText(pData->szButton2Text); pb->setDefault(pData->iDefaultButton == 2); iCoord = iButtons == 2 ? 2 : 1; g->addWidget(pb,3,iCoord); - connect(pb,SIGNAL(clicked()),this,SLOT(button2Pressed())); + connect(pb,TQT_SIGNAL(clicked()),this,TQT_SLOT(button2Pressed())); if(!pData->szButton3Text.isEmpty()) { - pb = new QPushButton(this); + pb = new TQPushButton(this); pb->setText(pData->szButton3Text); pb->setDefault(pData->iDefaultButton == 3); g->addWidget(pb,3,2); - connect(pb,SIGNAL(clicked()),this,SLOT(button3Pressed())); + connect(pb,TQT_SIGNAL(clicked()),this,TQT_SLOT(button3Pressed())); } } @@ -141,10 +141,10 @@ void KviHtmlDialog::button3Pressed() void KviHtmlDialog::reject() { m_pData->iSelectedButton = m_pData->iCancelButton; - QDialog::reject(); + TQDialog::reject(); } -int KviHtmlDialog::display(QWidget * pParent,KviHtmlDialogData * pData) +int KviHtmlDialog::display(TQWidget * pParent,KviHtmlDialogData * pData) { KviHtmlDialog * pDialog = new KviHtmlDialog(pParent,pData); pDialog->exec(); diff --git a/src/kvirc/ui/kvi_htmldialog.h b/src/kvirc/ui/kvi_htmldialog.h index 3f9a6d2a..aa845eaf 100644 --- a/src/kvirc/ui/kvi_htmldialog.h +++ b/src/kvirc/ui/kvi_htmldialog.h @@ -28,8 +28,8 @@ #include "kvi_settings.h" -#include -#include +#include +#include class KviHtmlDialogData { @@ -41,39 +41,40 @@ public: int iFlags; // da flags :) int iDefaultButton; // the button to use when Enter is pressed (1,2 or 3) int iCancelButton; // the button to use when Esc is pressed (1,2 or 3) - QString szHtmlText; // Shouldn't be empty :D + TQString szHtmlText; // Shouldn't be empty :D // optional fields - QString szCaption; // KVIrc is used when this is empty - QString szUpperLabelText; // no label is shown if this is empty - QString szLowerLabelText; // no label is shown if this is empty - QString szButton1Text; // OK is used if this is empty - QString szButton2Text; // no button is shown if this is empty - QString szButton3Text; // no button is shown if this is empty + TQString szCaption; // KVIrc is used when this is empty + TQString szUpperLabelText; // no label is shown if this is empty + TQString szLowerLabelText; // no label is shown if this is empty + TQString szButton1Text; // OK is used if this is empty + TQString szButton2Text; // no button is shown if this is empty + TQString szButton3Text; // no button is shown if this is empty int iMinimumWidth; int iMinimumHeight; - QPixmap pixIcon; // may be null + TQPixmap pixIcon; // may be null // output int iSelectedButton; // returns 1,2 or 3 }; -class KVIRC_API KviHtmlDialog : public QDialog +class KVIRC_API KviHtmlDialog : public TQDialog { Q_OBJECT + TQ_OBJECT public: // the dialog does NOT delete this structure and assumes that // it remains alive until the dialog closes (i.e. it may access // the structure in the destructor - KviHtmlDialog(QWidget * pParent,KviHtmlDialogData * pData); + KviHtmlDialog(TQWidget * pParent,KviHtmlDialogData * pData); ~KviHtmlDialog(); protected: KviHtmlDialogData * m_pData; public: // displays the dialog as modal and returns 1,2 or 3 - static int display(QWidget * pParent,KviHtmlDialogData * pData); + static int display(TQWidget * pParent,KviHtmlDialogData * pData); protected slots: void button1Pressed(); void button2Pressed(); diff --git a/src/kvirc/ui/kvi_imagedialog.cpp b/src/kvirc/ui/kvi_imagedialog.cpp index adb33a16..8ddb9b18 100644 --- a/src/kvirc/ui/kvi_imagedialog.cpp +++ b/src/kvirc/ui/kvi_imagedialog.cpp @@ -25,14 +25,14 @@ #include "kvi_locale.h" -#include -#include +#include +#include -#include -#include -#include +#include +#include +#include -#include +#include #include "kvi_fileutils.h" @@ -53,30 +53,30 @@ int KviImageDialogItem::width(const KviTalListBox *lb) const w = lb->fontMetrics().width(text()) + 4; if(w > 100)w = 100; if(w < 24)w = 24; - return QMAX(pixmap()->width() + 10,w); + return TQMAX(pixmap()->width() + 10,w); } -void KviImageDialogItem::paint(QPainter * p) +void KviImageDialogItem::paint(TQPainter * p) { - const QPixmap *pm = pixmap(); + const TQPixmap *pm = pixmap(); if(pm && !pm->isNull())p->drawPixmap(5,5, *pm); if(!m_bIsFolder) { - p->setPen(Qt::gray); + p->setPen(TQt::gray); p->drawRect(3,3,pm->width() + 4,pm->height() + 4); } - QRect daRect(listBox()->itemRect(this)); + TQRect daRect(listBox()->tqitemRect(this)); - p->setPen(Qt::black); + p->setPen(TQt::black); p->drawRect(1,1,daRect.width() - 2,daRect.height() - 2); if(text().isEmpty())return; - QString t = text(); + TQString t = text(); - QFontMetrics fm(p->fontMetrics()); + TQFontMetrics fm(p->fontMetrics()); int wdth = fm.width(t); @@ -90,17 +90,17 @@ void KviImageDialogItem::paint(QPainter * p) idx--; } - p->drawText(3,pm->height() + 8,daRect.width() - 6,daRect.height() - (pm->height() + 6),Qt::AlignLeft | Qt::AlignTop,t); + p->drawText(3,pm->height() + 8,daRect.width() - 6,daRect.height() - (pm->height() + 6),TQt::AlignLeft | TQt::AlignTop,t); } -KviImageDialog::KviImageDialog(QWidget * par, - const QString &szCaption, +KviImageDialog::KviImageDialog(TQWidget * par, + const TQString &szCaption, int types, int initialType, - const QString &szInitialDir, + const TQString &szInitialDir, int maxPreviewFileSize,bool modal) -: QDialog(par) +: TQDialog(par) { m_szInitialPath = szInitialDir; setModal(modal); @@ -108,20 +108,20 @@ KviImageDialog::KviImageDialog(QWidget * par, setCaption(szCaption.isEmpty() ? __tr2qs("Choose image ...") : szCaption); - m_pTimer = new QTimer(this); - connect(m_pTimer,SIGNAL(timeout()),this,SLOT(heartbeat())); + m_pTimer = new TQTimer(this); + connect(m_pTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(heartbeat())); - QGridLayout * g = new QGridLayout(this,4,3,5,3); + TQGridLayout * g = new TQGridLayout(this,4,3,5,3); - m_pTypeComboBox = new QComboBox(this); + m_pTypeComboBox = new TQComboBox(this); g->addMultiCellWidget(m_pTypeComboBox,0,0,0,2); m_pTypeList = new KviValueList; - QString bi = __tr2qs("Builtin images"); + TQString bi = __tr2qs("Builtin images"); - QString tmp = bi; + TQString tmp = bi; if((types & KID_TYPE_ALL) == 0)types = KID_TYPE_FULL_PATH; @@ -139,10 +139,10 @@ KviImageDialog::KviImageDialog(QWidget * par, m_pTypeList->append(KID_TYPE_FULL_PATH); } - int idx = m_pTypeList->findIndex(initialType); + int idx = m_pTypeList->tqfindIndex(initialType); if(idx < 0)idx = 0; - QWidget * l = new QWidget(this); + TQWidget * l = new TQWidget(this); g->addMultiCellWidget(l,1,1,0,2); @@ -154,20 +154,20 @@ KviImageDialog::KviImageDialog(QWidget * par, g->addMultiCellWidget(m_pListBox,2,2,0,2); - QPushButton * b = new QPushButton(__tr2qs("Cancel"),this); - connect(b,SIGNAL(clicked()),this,SLOT(cancelClicked())); + TQPushButton * b = new TQPushButton(__tr2qs("Cancel"),this); + connect(b,TQT_SIGNAL(clicked()),this,TQT_SLOT(cancelClicked())); g->addWidget(b,3,1); - b = new QPushButton(__tr2qs("Ok"),this); - connect(b,SIGNAL(clicked()),this,SLOT(okClicked())); + b = new TQPushButton(__tr2qs("Ok"),this); + connect(b,TQT_SIGNAL(clicked()),this,TQT_SLOT(okClicked())); g->addWidget(b,3,2); g->setRowStretch(2,1); g->setColStretch(0,1); - connect(m_pTypeComboBox,SIGNAL(activated(int)),this,SLOT(jobTypeSelected(int))); - connect(m_pListBox,SIGNAL(doubleClicked(KviTalListBoxItem *)),this,SLOT(itemDoubleClicked(KviTalListBoxItem *))); - connect(m_pTip,SIGNAL(tipRequest(KviDynamicToolTip *,const QPoint &)),this,SLOT(tipRequest(KviDynamicToolTip *,const QPoint &))); + connect(m_pTypeComboBox,TQT_SIGNAL(activated(int)),this,TQT_SLOT(jobTypeSelected(int))); + connect(m_pListBox,TQT_SIGNAL(doubleClicked(KviTalListBoxItem *)),this,TQT_SLOT(itemDoubleClicked(KviTalListBoxItem *))); + connect(m_pTip,TQT_SIGNAL(tipRequest(KviDynamicToolTip *,const TQPoint &)),this,TQT_SLOT(tipRequest(KviDynamicToolTip *,const TQPoint &))); m_pTypeComboBox->setCurrentItem(idx); jobTypeSelected(idx); @@ -193,7 +193,7 @@ void KviImageDialog::jobTypeSelected(int index) } } -void KviImageDialog::startJob(int type,const QString &szInitialPath) +void KviImageDialog::startJob(int type,const TQString &szInitialPath) { m_pTimer->stop(); m_iJobType = type; @@ -201,12 +201,12 @@ void KviImageDialog::startJob(int type,const QString &szInitialPath) m_iJobIndexHelper = 0; if(m_iJobType == KID_TYPE_FULL_PATH) { - QDir d(szInitialPath); - if(!d.exists())d = QDir::homeDirPath(); - if(!d.exists())d = QDir::rootDirPath(); + TQDir d(szInitialPath); + if(!d.exists())d = TQDir::homeDirPath(); + if(!d.exists())d = TQDir::rootDirPath(); m_szJobPath = d.absPath(); KVI_OPTION_STRING(KviOption_stringLastImageDialogPath) = m_szJobPath; - m_lJobFileList = d.entryList(QDir::Hidden | QDir::All,QDir::DirsFirst | QDir::Name | QDir::IgnoreCase); + m_lJobFileList = d.entryList(TQDir::Hidden | TQDir::All,TQDir::DirsFirst | TQDir::Name | TQDir::IgnoreCase); } m_pTimer->start(100); @@ -235,11 +235,11 @@ void KviImageDialog::heartbeat() if(max > KVI_NUM_SMALL_ICONS)max = KVI_NUM_SMALL_ICONS; while(m_iJobIndexHelper < max) { - QString id = g_pIconManager->getSmallIconName(m_iJobIndexHelper); + TQString id = g_pIconManager->getSmallIconName(m_iJobIndexHelper); KviImageDialogItem * it; - QString tip; - KviQString::sprintf(tip,__tr2qs("Builtin $icon(%Q) [index %d]"),&id,m_iJobIndexHelper); - QString image_id = "$icon("; + TQString tip; + KviTQString::sprintf(tip,__tr2qs("Builtin $icon(%Q) [index %d]"),&id,m_iJobIndexHelper); + TQString image_id = "$icon("; image_id += id; image_id += ")"; it = new KviImageDialogItem(m_pListBox,*(g_pIconManager->getSmallIcon(m_iJobIndexHelper)),id,image_id,tip); @@ -258,18 +258,18 @@ void KviImageDialog::heartbeat() int idx = 0; while((idx < 20) && (!m_lJobFileList.isEmpty())) { - QString szFile = m_lJobFileList.first(); + TQString szFile = m_lJobFileList.first(); m_lJobFileList.remove(szFile); - QString szPath = m_szJobPath; + TQString szPath = m_szJobPath; szPath += KVI_PATH_SEPARATOR; szPath += szFile; - QFileInfo fi(szPath); + TQFileInfo fi(szPath); idx += fi.size() / 128000; // we do less entries when have big files to read if(fi.isDir()) { if(szFile != ".") { - QString tip = szFile; + TQString tip = szFile; tip += "

"; tip += __tr2qs("directory"); KviImageDialogItem * it; @@ -278,19 +278,19 @@ void KviImageDialog::heartbeat() } else { if(((int)fi.size()) < m_iMaxPreviewFileSize) { - QImage i(szPath); + TQImage i(szPath); if(i.isNull())continue; - QPixmap pix; + TQPixmap pix; #ifdef COMPILE_USE_QT4 - if((i.width() > 80) || (i.height() > 80))pix = i.scaled(80,80,Qt::KeepAspectRatio); + if((i.width() > 80) || (i.height() > 80))pix = i.scaled(80,80,TQt::KeepAspectRatio); #else - if((i.width() > 80) || (i.height() > 80))pix = i.scale(80,80,QImage::ScaleMin); + if((i.width() > 80) || (i.height() > 80))pix = i.scale(80,80,TQ_ScaleMin); #endif else pix = i; - QString tip = szFile; + TQString tip = szFile; tip += "

"; - QString sz; + TQString sz; sz.setNum(i.width()); tip += sz; tip += " x "; @@ -327,14 +327,14 @@ void KviImageDialog::okClicked() void KviImageDialog::cancelClicked() { - m_szSelectedImage = QString::null; + m_szSelectedImage = TQString(); reject(); } -void KviImageDialog::closeEvent(QCloseEvent * e) +void KviImageDialog::closeEvent(TQCloseEvent * e) { - m_szSelectedImage = QString::null; - QDialog::closeEvent(e); + m_szSelectedImage = TQString(); + TQDialog::closeEvent(e); } void KviImageDialog::itemDoubleClicked(KviTalListBoxItem * it) @@ -345,10 +345,10 @@ void KviImageDialog::itemDoubleClicked(KviTalListBoxItem * it) { startJob(KID_TYPE_FULL_PATH,i->imageId()); } else { - QString szImageId = i->imageId(); + TQString szImageId = i->imageId(); if(szImageId.length() > 0) { - if(szImageId.at(0) == QChar('$')) + if(szImageId.at(0) == TQChar('$')) m_szSelectedImage = szImageId; // it's $icon(something) else g_pApp->mapImageFile(m_szSelectedImage,i->imageId()); // it's a file and we need to map it to our filesystem view @@ -357,11 +357,11 @@ void KviImageDialog::itemDoubleClicked(KviTalListBoxItem * it) } } -void KviImageDialog::tipRequest(KviDynamicToolTip *,const QPoint &pnt) +void KviImageDialog::tipRequest(KviDynamicToolTip *,const TQPoint &pnt) { KviTalListBoxItem * it = (KviTalListBoxItem *)m_pListBox->itemAt(pnt); if(!it)return; - QRect r = m_pListBox->itemRect(it); + TQRect r = m_pListBox->tqitemRect(it); KviImageDialogItem * i = (KviImageDialogItem *)it; m_pTip->tip(r,i->tipText()); } diff --git a/src/kvirc/ui/kvi_imagedialog.h b/src/kvirc/ui/kvi_imagedialog.h index 7e1da54d..c0fd71e2 100644 --- a/src/kvirc/ui/kvi_imagedialog.h +++ b/src/kvirc/ui/kvi_imagedialog.h @@ -27,12 +27,12 @@ -#include -#include +#include +#include #include "kvi_tal_listbox.h" #include "kvi_valuelist.h" -#include -#include +#include +#include #include "kvi_dynamictooltip.h" @@ -40,19 +40,19 @@ class KviImageDialogItem : public KviTalListBoxPixmap { public: bool m_bIsFolder; - QString m_szImageId; - QString m_szTipText; + TQString m_szImageId; + TQString m_szTipText; public: - KviImageDialogItem(KviTalListBox * b,const QPixmap &thumb,const QString &szFile,const QString &image_id,const QString &szTipText = QString::null,bool bIsFolder = false) + KviImageDialogItem(KviTalListBox * b,const TQPixmap &thumb,const TQString &szFile,const TQString &image_id,const TQString &szTipText = TQString(),bool bIsFolder = false) : KviTalListBoxPixmap(b,thumb,szFile) , m_bIsFolder(bIsFolder) , m_szImageId(image_id) , m_szTipText(szTipText) {}; ~KviImageDialogItem(){}; public: bool isFolder(){ return m_bIsFolder; }; - const QString & imageId(){ return m_szImageId; }; - const QString & tipText(){ return m_szTipText; }; + const TQString & imageId(){ return m_szImageId; }; + const TQString & tipText(){ return m_szTipText; }; virtual int height(const KviTalListBox *) const; virtual int width(const KviTalListBox *) const; - virtual void paint(QPainter * p); + virtual void paint(TQPainter * p); }; @@ -61,49 +61,50 @@ public: #define KID_TYPE_ALL 3 -class KVIRC_API KviImageDialog : public QDialog +class KVIRC_API KviImageDialog : public TQDialog { Q_OBJECT + TQ_OBJECT public: - KviImageDialog(QWidget * par, - const QString &szCaption = QString::null, + KviImageDialog(TQWidget * par, + const TQString &szCaption = TQString(), int types = KID_TYPE_ALL, int initialType = 0, - const QString &szInitialDir = QString::null, + const TQString &szInitialDir = TQString(), int maxPreviewFileSize = 256000, bool modal=false); virtual ~KviImageDialog(); protected: - QComboBox * m_pTypeComboBox; + TQComboBox * m_pTypeComboBox; KviValueList * m_pTypeList; KviTalListBox * m_pListBox; - QTimer * m_pTimer; + TQTimer * m_pTimer; int m_iJobType; int m_iMaxPreviewFileSize; - QString m_szJobPath; - QStringList m_lJobFileList; + TQString m_szJobPath; + TQStringList m_lJobFileList; int m_iJobIndexHelper; - QString m_szSelectedImage; + TQString m_szSelectedImage; - QString m_szInitialPath; + TQString m_szInitialPath; KviDynamicToolTip * m_pTip; public: - const QString & selectedImage(){ return m_szSelectedImage; }; + const TQString & selectedImage(){ return m_szSelectedImage; }; protected: - void startJob(int type,const QString &szInitialPath = QString::null); + void startJob(int type,const TQString &szInitialPath = TQString()); void jobTerminated(); - virtual void closeEvent(QCloseEvent *e); + virtual void closeEvent(TQCloseEvent *e); protected slots: void okClicked(); void cancelClicked(); void heartbeat(); void jobTypeSelected(int index); void itemDoubleClicked(KviTalListBoxItem * it); - void tipRequest(KviDynamicToolTip *,const QPoint &pnt); + void tipRequest(KviDynamicToolTip *,const TQPoint &pnt); }; #endif //_KVI_IMAGEDIALOG_H_ diff --git a/src/kvirc/ui/kvi_input.cpp b/src/kvirc/ui/kvi_input.cpp index c0fbbd9e..28ac74f2 100644 --- a/src/kvirc/ui/kvi_input.cpp +++ b/src/kvirc/ui/kvi_input.cpp @@ -55,39 +55,35 @@ #include "kvi_texticonmanager.h" #include "kvi_draganddrop.h" -#include +#include #include #include -#include +#include #include "kvi_tal_popupmenu.h" -#include -#include -#include +#include +#include +#include #include "kvi_pointerlist.h" -#include -#include -#include +#include +#include +#include #include "kvi_tal_hbox.h" -#include -#include -#include +#include +#include +#include #ifndef ACCEL_KEY -#define ACCEL_KEY(k) "\t" + QString(QKeySequence( Qt::CTRL | Qt::Key_ ## k )) +#define ACCEL_KEY(k) "\t" + TQString(TQKeySequence( TQt::CTRL | TQt::Key_ ## k )) #endif // FIXME: #warning "This hack is temporary...later remove it" -#if QT_VERSION >= 300 - #ifndef QT_CLEAN_NAMESPACE - #define QT_CLEAN_NAMESPACE - #include - #undef QT_CLEAN_NAMESPACE - #else - #include - #endif +#ifndef TQT_CLEAN_NAMESPACE + #define TQT_CLEAN_NAMESPACE + #include + #undef TQT_CLEAN_NAMESPACE #else - #include + #include #endif @@ -98,11 +94,11 @@ extern KviTextIconWindow * g_pTextIconWindow; extern KviHistoryWindow * g_pHistoryWindow; extern KviTalPopupMenu * g_pInputPopup; -static QFontMetrics * g_pLastFontMetrics = 0; +static TQFontMetrics * g_pLastFontMetrics = 0; #ifdef COMPILE_PSEUDO_TRANSPARENCY - extern QPixmap * g_pShadedChildGlobalDesktopBackground; + extern TQPixmap * g_pShadedChildGlobalDesktopBackground; #endif @@ -115,7 +111,7 @@ extern KviInputHistory * g_pInputHistory; KviInputHistory::KviInputHistory() { - m_pStringList = new KviPointerList; + m_pStringList = new KviPointerList; m_pStringList->setAutoDelete(true); } @@ -124,7 +120,7 @@ KviInputHistory::~KviInputHistory() delete m_pStringList; } -void KviInputHistory::add(QString * s) +void KviInputHistory::add(TQString * s) { m_pStringList->insert(0,s); if(m_pStringList->count() > KVI_INPUT_MAX_GLOBAL_HISTORY_ENTRIES)m_pStringList->removeLast(); @@ -143,8 +139,8 @@ void KviInputHistory::load(const char * filename) for(int i=0;ifirst();s;s = m_pStringList->next()) + for(TQString * s = m_pStringList->first();s;s = m_pStringList->next()) { if(!s->isEmpty()) { @@ -175,8 +171,8 @@ static int g_iInputFontCharWidth[256]; static bool g_bInputFontMetricsDirty = true; -KviInputEditor::KviInputEditor(QWidget * par,KviWindow *wnd,KviUserListView * view) -:QFrame(par,"input") +KviInputEditor::KviInputEditor(TQWidget * par,KviWindow *wnd,KviUserListView * view) +:TQFrame(par,"input") { m_pIconMenu = 0; m_pInputParent = par; @@ -201,7 +197,7 @@ KviInputEditor::KviInputEditor(QWidget * par,KviWindow *wnd,KviUserListView * vi m_bUpdatesEnabled = true; m_pKviWindow = wnd; m_pUserListView = view; - m_pHistory = new KviPointerList; + m_pHistory = new KviPointerList; m_pHistory->setAutoDelete(true); m_bReadOnly = FALSE; @@ -209,20 +205,20 @@ KviInputEditor::KviInputEditor(QWidget * par,KviWindow *wnd,KviUserListView * vi #ifdef COMPILE_USE_QT4 setAutoFillBackground(false); - setFocusPolicy(Qt::StrongFocus); + setFocusPolicy(TTQ_StrongFocus); #else - setBackgroundMode(Qt::NoBackground); - setFocusPolicy(QWidget::StrongFocus); + setBackgroundMode(TQt::NoBackground); + setFocusPolicy(TQ_StrongFocus); #endif setAcceptDrops(true); setFrameStyle( LineEditPanel ); setFrameShadow( Plain ); m_pIconMenu = new KviTalPopupMenu(); - connect(m_pIconMenu,SIGNAL(activated(int)),this,SLOT(iconPopupActivated(int))); + connect(m_pIconMenu,TQT_SIGNAL(activated(int)),this,TQT_SLOT(iconPopupActivated(int))); #ifdef COMPILE_USE_QT4 - setCursor(Qt::IBeamCursor); + setCursor(TQt::IBeamCursor); #else setCursor(IbeamCursor); #endif @@ -238,19 +234,19 @@ KviInputEditor::~KviInputEditor() killDragTimer(); } -void KviInputEditor::recalcFontMetrics(QFontMetrics * pFm) +void KviInputEditor::recalcFontMetrics(TQFontMetrics * pFm) { - QFontMetrics fm(KVI_OPTION_FONT(KviOption_fontInput)); + TQFontMetrics fm(KVI_OPTION_FONT(KviOption_fontInput)); unsigned short i; for(i=1;i<32;i++) { - QChar c = getSubstituteChar(i); + TQChar c = getSubstituteChar(i); g_iInputFontCharWidth[i] = fm.width(c); - if(c != QChar(i))g_iInputFontCharWidth[i] += 4; + if(c != TQChar(i))g_iInputFontCharWidth[i] += 4; } for(i=32;i<256;i++) { - g_iInputFontCharWidth[i] = fm.width(QChar(i)); + g_iInputFontCharWidth[i] = fm.width(TQChar(i)); } g_bInputFontMetricsDirty = false; } @@ -261,7 +257,7 @@ void KviInputEditor::applyOptions() update(); } -void KviInputEditor::dragEnterEvent(QDragEnterEvent *e) +void KviInputEditor::dragEnterEvent(TQDragEnterEvent *e) { if(KviUriDrag::canDecode(e)) { @@ -273,23 +269,23 @@ void KviInputEditor::dragEnterEvent(QDragEnterEvent *e) } else e->accept(false); } -void KviInputEditor::dropEvent(QDropEvent *e) +void KviInputEditor::dropEvent(TQDropEvent *e) { - QStringList list; + TQStringList list; if(KviUriDrag::decodeLocalFiles(e,list)) { //debug("Local files decoded"); if(!list.isEmpty()) { //debug("List not empty"); - QStringList::ConstIterator it = list.begin(); //kewl ! :) + TQStringList::ConstIterator it = list.begin(); //kewl ! :) for( ; it != list.end(); ++it ) { - QString tmp = *it; //wow :) + TQString tmp = *it; //wow :) #ifndef COMPILE_ON_WINDOWS if(tmp.length() > 0) { - if(tmp[0] != QChar('/'))tmp.prepend("/"); //HACK HACK HACK for Qt bug (?!?) + if(tmp[0] != TQChar('/'))tmp.prepend("/"); //HACK HACK HACK for TQt bug (?!?) } #endif tmp.prepend("/PARSE \""); @@ -303,27 +299,27 @@ void KviInputEditor::dropEvent(QDropEvent *e) int KviInputEditor::heightHint() const { - return sizeHint().height(); + return tqsizeHint().height(); } -QSize KviInputEditor::sizeHint() const +TQSize KviInputEditor::tqsizeHint() const { //grabbed from qlineedit.cpp constPolish(); - QFontMetrics fm(KVI_OPTION_FONT(KviOption_fontInput)); - int h = QMAX(fm.lineSpacing(), 14) + 2*2; /* innerMargin */ + TQFontMetrics fm(KVI_OPTION_FONT(KviOption_fontInput)); + int h = TQMAX(fm.lineSpacing(), 14) + 2*2; /* innerMargin */ int w = fm.width( 'x' ) * 17; // "some" int m = frameWidth() * 2; #ifdef COMPILE_USE_QT4 - QStyleOption opt; + TQStyleOption opt; opt.initFrom(this); - return (style()->sizeFromContents(QStyle::CT_LineEdit,&opt, - QSize( w + m, h + m ). - expandedTo(QApplication::globalStrut()),this)); + return (style()->sizeFromContents(TQStyle::CT_LineEdit,&opt, + TQSize( w + m, h + m ). + expandedTo(TQApplication::globalStrut()),this)); #else - return (style().sizeFromContents(QStyle::CT_LineEdit, this, - QSize( w + m, h + m ). - expandedTo(QApplication::globalStrut()))); + return (tqstyle().tqsizeFromContents(TQStyle::CT_LineEdit, this, + TQSize( w + m, h + m ). + expandedTo(TQApplication::globalStrut()))); #endif } @@ -331,35 +327,35 @@ QSize KviInputEditor::sizeHint() const #define KVI_INPUT_DEF_FORE 101 #ifdef COMPILE_USE_QT4 -void KviInputEditor::paintEvent(QPaintEvent *e) +void KviInputEditor::paintEvent(TQPaintEvent *e) { - QPainter p(this); + TQPainter p(this); SET_ANTI_ALIASING(p); drawFrame(&p); drawContents(&p); } #endif -void KviInputEditor::drawContents(QPainter *p) +void KviInputEditor::drawContents(TQPainter *p) { if(!isVisible())return; - QRect rect = contentsRect(); + TQRect rect = contentsRect(); int widgetWidth = rect.width(); int widgetHeight = rect.height(); KviDoubleBuffer doublebuffer(widgetWidth,widgetHeight); - QPixmap * pDoubleBufferPixmap = doublebuffer.pixmap(); + TQPixmap * pDoubleBufferPixmap = doublebuffer.pixmap(); - QPainter pa(pDoubleBufferPixmap); + TQPainter pa(pDoubleBufferPixmap); SET_ANTI_ALIASING(pa); pa.setFont(KVI_OPTION_FONT(KviOption_fontInput)); - QFontMetrics fm(pa.fontMetrics()); + TQFontMetrics fm(pa.fontMetrics()); if(!g_pLastFontMetrics) - g_pLastFontMetrics = new QFontMetrics(pa.fontMetrics()); + g_pLastFontMetrics = new TQFontMetrics(pa.fontMetrics()); if(g_bInputFontMetricsDirty) recalcFontMetrics(&fm); @@ -368,11 +364,11 @@ void KviInputEditor::drawContents(QPainter *p) #ifdef COMPILE_PSEUDO_TRANSPARENCY if(g_pShadedChildGlobalDesktopBackground) { - QPoint pnt = mapToGlobal(rect.topLeft()); + TQPoint pnt = mapToGlobal(rect.topLeft()); pa.drawTiledPixmap(0,0,widgetWidth,widgetHeight,*g_pShadedChildGlobalDesktopBackground,pnt.x(),pnt.y()); } else { #endif - QPixmap *pix=KVI_OPTION_PIXMAP(KviOption_pixmapInputBackground).pixmap(); + TQPixmap *pix=KVI_OPTION_PIXMAP(KviOption_pixmapInputBackground).pixmap(); pa.fillRect(0,0,widgetWidth,widgetHeight,KVI_OPTION_COLOR(KviOption_colorInputBackground)); if(pix) @@ -415,9 +411,9 @@ void KviInputEditor::drawContents(QPainter *p) int xLeft = xPositionFromCharIndex(fm,iSelStart,TRUE); int xRight = xPositionFromCharIndex(fm,m_iSelectionEnd + 1,TRUE); -// pa.setRasterOp(Qt::NotROP); +// pa.setRasterOp(TQt::NotROP); pa.fillRect(xLeft,frameWidth(),xRight - xLeft,widgetWidth,KVI_OPTION_COLOR(KviOption_colorInputSelectionBackground)); -// pa.setRasterOp(Qt::CopyROP); +// pa.setRasterOp(TQt::CopyROP); } // When m_bIMComposing is true, the text between m_iIMStart and m_iIMStart+m_iIMLength should be highlighted to show that this is the active @@ -433,9 +429,9 @@ void KviInputEditor::drawContents(QPainter *p) if(iIMSelectionStart < m_iFirstVisibleChar) iIMSelectionStart = m_iFirstVisibleChar; int xIMSelectionLeft = xPositionFromCharIndex(fm,iIMSelectionStart,TRUE); int xIMSelectionRight = xPositionFromCharIndex(fm,iIMSelectionStart + m_iIMSelectionLength,TRUE); -// pa.setRasterOp(Qt::NotROP); +// pa.setRasterOp(TQt::NotROP); pa.fillRect(xIMSelectionLeft,0,xIMSelectionRight - xIMSelectionLeft, widgetWidth,KVI_OPTION_COLOR(KviOption_colorInputSelectionBackground)); -// pa.setRasterOp(Qt::CopyROP); +// pa.setRasterOp(TQt::CopyROP); // highlight the IM selection int iIMStart = m_iIMStart; @@ -458,7 +454,7 @@ void KviInputEditor::drawContents(QPainter *p) { pa.setPen(KVI_OPTION_COLOR(KviOption_colorInputControl)); - QString s = getSubstituteChar(m_szTextBuffer[charIdx].unicode()); + TQString s = getSubstituteChar(m_szTextBuffer[charIdx].tqunicode()); // the block width is 4 pixels more than the actual character @@ -525,11 +521,11 @@ void KviInputEditor::drawContents(QPainter *p) while(m_iBlockLen < m_iCursorPosition) { - QChar c = m_szTextBuffer.at(m_iBlockLen); + TQChar c = m_szTextBuffer.at(m_iBlockLen); #ifdef COMPILE_USE_QT4 - m_iLastCursorXPosition+= c.unicode() < 32 ? fm.width(getSubstituteChar(c.unicode())) + 3 : fm.width(c); + m_iLastCursorXPosition+= c.tqunicode() < 32 ? fm.width(getSubstituteChar(c.tqunicode())) + 3 : fm.width(c); #else - m_iLastCursorXPosition+= (c.unicode() < 256) ? g_iInputFontCharWidth[c.unicode()] : fm.width(c); + m_iLastCursorXPosition+= (c.tqunicode() < 256) ? g_iInputFontCharWidth[c.tqunicode()] : fm.width(c); #endif m_iBlockLen++; } @@ -552,12 +548,12 @@ void KviInputEditor::drawContents(QPainter *p) #endif } -void KviInputEditor::drawTextBlock(QPainter * pa,QFontMetrics & fm,int curXPos,int textBaseline,int charIdx,int len,bool bSelected) +void KviInputEditor::drawTextBlock(TQPainter * pa,TQFontMetrics & fm,int curXPos,int textBaseline,int charIdx,int len,bool bSelected) { - QString tmp = m_szTextBuffer.mid(charIdx,len); + TQString tmp = m_szTextBuffer.mid(charIdx,len); m_iBlockWidth = fm.width(tmp); - QRect rect = contentsRect(); + TQRect rect = contentsRect(); int widgetHeight = rect.height(); if(m_iCurFore == KVI_INPUT_DEF_FORE) @@ -592,66 +588,66 @@ void KviInputEditor::drawTextBlock(QPainter * pa,QFontMetrics & fm,int curXPos,i } -QChar KviInputEditor::getSubstituteChar(unsigned short control_code) +TQChar KviInputEditor::getSubstituteChar(unsigned short control_code) { switch(control_code) { case KVI_TEXT_COLOR: - return QChar('K'); + return TQChar('K'); break; case KVI_TEXT_BOLD: - return QChar('B'); + return TQChar('B'); break; case KVI_TEXT_RESET: - return QChar('O'); + return TQChar('O'); break; case KVI_TEXT_REVERSE: - return QChar('R'); + return TQChar('R'); break; case KVI_TEXT_UNDERLINE: - return QChar('U'); + return TQChar('U'); break; case KVI_TEXT_CRYPTESCAPE: - return QChar('P'); + return TQChar('P'); break; case KVI_TEXT_ICON: - return QChar('I'); + return TQChar('I'); break; default: - return QChar(control_code); + return TQChar(control_code); break; } } -void KviInputEditor::extractNextBlock(int idx,QFontMetrics & fm,int curXPos,int maxXPos) +void KviInputEditor::extractNextBlock(int idx,TQFontMetrics & fm,int curXPos,int maxXPos) { m_iBlockLen = 0; m_iBlockWidth = 0; - QChar c = m_szTextBuffer[idx]; + TQChar c = m_szTextBuffer[idx]; - if((c.unicode() > 32) || - ((c != QChar(KVI_TEXT_COLOR)) && - (c != QChar(KVI_TEXT_BOLD)) && (c != QChar(KVI_TEXT_UNDERLINE)) && - (c != QChar(KVI_TEXT_RESET)) && (c != QChar(KVI_TEXT_REVERSE)) && - (c != QChar(KVI_TEXT_CRYPTESCAPE)) && (c != QChar(KVI_TEXT_ICON)))) + if((c.tqunicode() > 32) || + ((c != TQChar(KVI_TEXT_COLOR)) && + (c != TQChar(KVI_TEXT_BOLD)) && (c != TQChar(KVI_TEXT_UNDERLINE)) && + (c != TQChar(KVI_TEXT_RESET)) && (c != TQChar(KVI_TEXT_REVERSE)) && + (c != TQChar(KVI_TEXT_CRYPTESCAPE)) && (c != TQChar(KVI_TEXT_ICON)))) { m_bControlBlock = false; //Not a control code...run.. while((idx < ((int)(m_szTextBuffer.length()))) && (curXPos < maxXPos)) { c = m_szTextBuffer[idx]; - if((c.unicode() > 32) || - ((c != QChar(KVI_TEXT_COLOR)) && (c != QChar(KVI_TEXT_BOLD)) && - (c != QChar(KVI_TEXT_UNDERLINE)) && (c != QChar(KVI_TEXT_RESET)) && - (c != QChar(KVI_TEXT_REVERSE)) && (c != QChar(KVI_TEXT_CRYPTESCAPE)) && - (c != QChar(KVI_TEXT_ICON)))) + if((c.tqunicode() > 32) || + ((c != TQChar(KVI_TEXT_COLOR)) && (c != TQChar(KVI_TEXT_BOLD)) && + (c != TQChar(KVI_TEXT_UNDERLINE)) && (c != TQChar(KVI_TEXT_RESET)) && + (c != TQChar(KVI_TEXT_REVERSE)) && (c != TQChar(KVI_TEXT_CRYPTESCAPE)) && + (c != TQChar(KVI_TEXT_ICON)))) { m_iBlockLen++; #ifdef COMPILE_USE_QT4 - int xxx = c.unicode() < 32 ? fm.width(getSubstituteChar(c.unicode())) + 3 : fm.width(c);; + int xxx = c.tqunicode() < 32 ? fm.width(getSubstituteChar(c.tqunicode())) + 3 : fm.width(c);; #else - int xxx = (c.unicode() < 256 ? g_iInputFontCharWidth[c.unicode()] : fm.width(c)); + int xxx = (c.tqunicode() < 256 ? g_iInputFontCharWidth[c.tqunicode()] : fm.width(c)); #endif m_iBlockWidth +=xxx; curXPos +=xxx; @@ -662,9 +658,9 @@ void KviInputEditor::extractNextBlock(int idx,QFontMetrics & fm,int curXPos,int } else { m_bControlBlock = true; m_iBlockLen = 1; - m_iBlockWidth = g_iInputFontCharWidth[c.unicode()]; + m_iBlockWidth = g_iInputFontCharWidth[c.tqunicode()]; //Control code - switch(c.unicode()) + switch(c.tqunicode()) { case KVI_TEXT_BOLD: m_bCurBold = ! m_bCurBold; @@ -720,7 +716,7 @@ void KviInputEditor::runUpToTheFirstVisibleChar() register int idx = 0; while(idx < m_iFirstVisibleChar) { - unsigned short c = m_szTextBuffer[idx].unicode(); + unsigned short c = m_szTextBuffer[idx].tqunicode(); if(c < 32) { switch(c) @@ -769,7 +765,7 @@ void KviInputEditor::runUpToTheFirstVisibleChar() } -void KviInputEditor::mousePressEvent(QMouseEvent *e) +void KviInputEditor::mousePressEvent(TQMouseEvent *e) { if(e->button() & Qt::LeftButton) { @@ -779,8 +775,8 @@ void KviInputEditor::mousePressEvent(QMouseEvent *e) if(anchorX > (width()-frameWidth()))m_iFirstVisibleChar++; m_iSelectionAnchorChar = m_iCursorPosition; selectOneChar(-1); - //grabMouse(QCursor(crossCursor)); - repaintWithCursorOn(); + //grabMouse(TQCursor(crossCursor)); + tqrepaintWithCursorOn(); killDragTimer(); m_iDragTimer = startTimer(KVI_INPUT_DRAG_TIMEOUT); @@ -791,17 +787,17 @@ void KviInputEditor::mousePressEvent(QMouseEvent *e) //Popup menu g_pInputPopup->clear(); - QString szClip; + TQString szClip; - QClipboard * c = QApplication::clipboard(); + TQClipboard * c = TQApplication::tqclipboard(); if(c) { - szClip = c->text(QClipboard::Clipboard); + szClip = c->text(TQClipboard::Clipboard); #ifdef COMPILE_USE_QT4 - int occ = szClip.count(QChar('\n')); + int occ = szClip.count(TQChar('\n')); #else - int occ = szClip.contains(QChar('\n')); + int occ = szClip.tqcontains(TQChar('\n')); #endif if(!szClip.isEmpty()) @@ -811,29 +807,29 @@ void KviInputEditor::mousePressEvent(QMouseEvent *e) szClip.truncate(60); szClip.append("..."); } - szClip.replace(QChar('&'),"&"); - szClip.replace(QChar('<'),"<"); - szClip.replace(QChar('>'),">"); - szClip.replace(QChar('\n'),"
"); + szClip.tqreplace(TQChar('&'),"&"); + szClip.tqreplace(TQChar('<'),"<"); + szClip.tqreplace(TQChar('>'),">"); + szClip.tqreplace(TQChar('\n'),"
"); - QString label = "
"; + TQString label = "
"; label += __tr2qs("Clipboard"); label += ":
"; label += szClip; label += "
"; - QString num; + TQString num; num.setNum(occ); label += num; - label += QChar(' '); + label += TQChar(' '); label += (occ == 1) ? __tr2qs("line break") : __tr2qs("line breaks"); label += "
"; - QLabel * l = new QLabel(label,g_pInputPopup); - l->setFrameStyle(QFrame::Raised | QFrame::StyledPanel); + TQLabel * l = new TQLabel(label,g_pInputPopup); + l->setFrameStyle(TQFrame::Raised | TQFrame::StyledPanel); l->setMargin(5); - // FIXME: This does NOT work under Qt 4.x (they seem to consider it as bad UI design) + // FIXME: This does NOT work under TQt 4.x (they seem to consider it as bad UI design) #ifndef COMPILE_USE_QT4 g_pInputPopup->insertItem(l); #else @@ -842,39 +838,39 @@ void KviInputEditor::mousePressEvent(QMouseEvent *e) } } - int id = g_pInputPopup->insertItem(__tr2qs("Cu&t") + ACCEL_KEY(X),this,SLOT(cut())); + int id = g_pInputPopup->insertItem(__tr2qs("Cu&t") + ACCEL_KEY(X),this,TQT_SLOT(cut())); g_pInputPopup->setItemEnabled(id,hasSelection()); - id = g_pInputPopup->insertItem(__tr2qs("&Copy") + ACCEL_KEY(C),this,SLOT(copyToClipboard())); + id = g_pInputPopup->insertItem(__tr2qs("&Copy") + ACCEL_KEY(C),this,TQT_SLOT(copyToClipboard())); g_pInputPopup->setItemEnabled(id,hasSelection()); - id = g_pInputPopup->insertItem(__tr2qs("&Paste") + ACCEL_KEY(V),this,SLOT(pasteClipboardWithConfirmation())); + id = g_pInputPopup->insertItem(__tr2qs("&Paste") + ACCEL_KEY(V),this,TQT_SLOT(pasteClipboardWithConfirmation())); g_pInputPopup->setItemEnabled(id,!szClip.isEmpty() && !m_bReadOnly); - id = g_pInputPopup->insertItem(__tr2qs("Paste (Slowly)"),this,SLOT(pasteSlow())); - if ((type == KVI_WINDOW_TYPE_CHANNEL) || (type == KVI_WINDOW_TYPE_QUERY) || (type == KVI_WINDOW_TYPE_DCCCHAT)) + id = g_pInputPopup->insertItem(__tr2qs("Paste (Slowly)"),this,TQT_SLOT(pasteSlow())); + if ((type == KVI_WINDOW_TYPE_CHANNEL) || (type == KVI_WINDOW_TYPE_TQUERY) || (type == KVI_WINDOW_TYPE_DCCCHAT)) g_pInputPopup->setItemEnabled(id,!szClip.isEmpty() && !m_bReadOnly); else g_pInputPopup->setItemEnabled(id,false); - id = g_pInputPopup->insertItem(__tr2qs("Paste &File") + ACCEL_KEY(F),this,SLOT(pasteFile())); - if ((type != KVI_WINDOW_TYPE_CHANNEL) && (type != KVI_WINDOW_TYPE_QUERY) && (type != KVI_WINDOW_TYPE_DCCCHAT)) + id = g_pInputPopup->insertItem(__tr2qs("Paste &File") + ACCEL_KEY(F),this,TQT_SLOT(pasteFile())); + if ((type != KVI_WINDOW_TYPE_CHANNEL) && (type != KVI_WINDOW_TYPE_TQUERY) && (type != KVI_WINDOW_TYPE_DCCCHAT)) g_pInputPopup->setItemEnabled(id,false); else g_pInputPopup->setItemEnabled(id,!m_bReadOnly); if(m_bSpSlowFlag ==true) { - id = g_pInputPopup->insertItem(__tr2qs("Stop Paste"),this,SLOT(stopPasteSlow())); /*G&N 2005*/ + id = g_pInputPopup->insertItem(__tr2qs("Stop Paste"),this,TQT_SLOT(stopPasteSlow())); /*G&N 2005*/ } - id = g_pInputPopup->insertItem(__tr2qs("Clear"),this,SLOT(clear())); + id = g_pInputPopup->insertItem(__tr2qs("Clear"),this,TQT_SLOT(clear())); g_pInputPopup->setItemEnabled(id,!m_szTextBuffer.isEmpty() && !m_bReadOnly); g_pInputPopup->insertSeparator(); - id = g_pInputPopup->insertItem(__tr2qs("Select All"),this,SLOT(selectAll())); + id = g_pInputPopup->insertItem(__tr2qs("Select All"),this,TQT_SLOT(selectAll())); g_pInputPopup->setItemEnabled(id,(!m_szTextBuffer.isEmpty())); g_pInputPopup->insertSeparator(); m_pIconMenu->clear(); - KviPointerHashTable * d = g_pTextIconManager->textIconDict(); - KviPointerHashTableIterator it(*d); - QStringList strList; + KviPointerHashTable * d = g_pTextIconManager->textIconDict(); + KviPointerHashTableIterator it(*d); + TQStringList strList; while(KviTextIcon * i = it.current()) { strList.append(it.currentKey()); @@ -882,9 +878,9 @@ void KviInputEditor::mousePressEvent(QMouseEvent *e) } strList.sort(); KviTextIcon * icon; - QPixmap *pix; + TQPixmap *pix; - for(QStringList::Iterator iter = strList.begin(); iter != strList.end(); ++iter) + for(TQStringList::Iterator iter = strList.begin(); iter != strList.end(); ++iter) { icon=g_pTextIconManager->lookupTextIcon(*iter); if(icon) @@ -904,7 +900,7 @@ void KviInputEditor::iconPopupActivated(int id) { if(!m_bReadOnly) { - QString text = m_pIconMenu->text(id); + TQString text = m_pIconMenu->text(id); if(!text.isEmpty()) { text.prepend(KVI_TEXT_ICON); @@ -922,24 +918,24 @@ bool KviInputEditor::hasSelection() void KviInputEditor::copyToClipboard() { if(!hasSelection())return; - QClipboard * c = QApplication::clipboard(); + TQClipboard * c = TQApplication::tqclipboard(); if(!c)return; - QString szTxt = m_szTextBuffer.mid(m_iSelectionBegin,(m_iSelectionEnd-m_iSelectionBegin)+1); - c->setText(szTxt,QClipboard::Clipboard); - repaintWithCursorOn(); + TQString szTxt = m_szTextBuffer.mid(m_iSelectionBegin,(m_iSelectionEnd-m_iSelectionBegin)+1); + c->setText(szTxt,TQClipboard::Clipboard); + tqrepaintWithCursorOn(); } void KviInputEditor::copyToSelection(bool bDonNotCopyToClipboard) { if(!hasSelection())return; - QClipboard * c = QApplication::clipboard(); + TQClipboard * c = TQApplication::tqclipboard(); if(!c)return; - QString szTxt = m_szTextBuffer.mid(m_iSelectionBegin,(m_iSelectionEnd-m_iSelectionBegin)+1); + TQString szTxt = m_szTextBuffer.mid(m_iSelectionBegin,(m_iSelectionEnd-m_iSelectionBegin)+1); if(c->supportsSelection()) - c->setText(szTxt,QClipboard::Selection); + c->setText(szTxt,TQClipboard::Selection); else if(!bDonNotCopyToClipboard) - c->setText(szTxt,QClipboard::Clipboard); - repaintWithCursorOn(); + c->setText(szTxt,TQClipboard::Clipboard); + tqrepaintWithCursorOn(); } @@ -958,7 +954,7 @@ void KviInputEditor::moveCursorTo(int idx,bool bRepaint) m_iCursorPosition = idx; if(m_iFirstVisibleChar > m_iCursorPosition)m_iFirstVisibleChar = m_iCursorPosition; } - if(bRepaint)repaintWithCursorOn(); + if(bRepaint)tqrepaintWithCursorOn(); } void KviInputEditor::removeSelected() @@ -967,49 +963,49 @@ void KviInputEditor::removeSelected() m_szTextBuffer.remove(m_iSelectionBegin,(m_iSelectionEnd-m_iSelectionBegin)+1); moveCursorTo(m_iSelectionBegin,false); selectOneChar(-1); - repaintWithCursorOn(); + tqrepaintWithCursorOn(); } void KviInputEditor::cut() { if(!hasSelection())return; - QClipboard * c = QApplication::clipboard(); + TQClipboard * c = TQApplication::tqclipboard(); if(!c)return; - c->setText(m_szTextBuffer.mid(m_iSelectionBegin,(m_iSelectionEnd-m_iSelectionBegin)+1),QClipboard::Clipboard); + c->setText(m_szTextBuffer.mid(m_iSelectionBegin,(m_iSelectionEnd-m_iSelectionBegin)+1),TQClipboard::Clipboard); m_szTextBuffer.remove(m_iSelectionBegin,(m_iSelectionEnd-m_iSelectionBegin)+1); moveCursorTo(m_iSelectionBegin,false); selectOneChar(-1); - repaintWithCursorOn(); + tqrepaintWithCursorOn(); } -void KviInputEditor::insertText(const QString &text) +void KviInputEditor::insertText(const TQString &text) { - QString szText = text; // crop away constness + TQString szText = text; // crop away constness if(szText.isEmpty())return; //szText.replaceAll('\t'," "); //Do not paste tabs - //szText.replace(QRegExp("\t")," "); // do not paste tabs + //szText.tqreplace(TQRegExp("\t")," "); // do not paste tabs m_bUpdatesEnabled = false; removeSelected(); m_bUpdatesEnabled = true; - if(szText.find('\n') == -1) + if(szText.tqfind('\n') == -1) { m_szTextBuffer.insert(m_iCursorPosition,szText); m_szTextBuffer.truncate(m_iMaxBufferSize); moveCursorTo(m_iCursorPosition + szText.length()); } else { //Multiline paste...do not execute commands here - QString szBlock; + TQString szBlock; while(!szText.isEmpty()) { - int idx = szText.find('\n'); + int idx = szText.tqfind('\n'); if(idx != -1) { szBlock = szText.left(idx); - //else szBlock = QChar(KVI_TEXT_RESET); + //else szBlock = TQChar(KVI_TEXT_RESET); szText.remove(0,idx+1); } else { szBlock = szText; @@ -1021,7 +1017,7 @@ void KviInputEditor::insertText(const QString &text) int pos = 0; while((pos < ((int)(m_szTextBuffer.length()))) && (m_szTextBuffer[pos] < 33))pos++; - if((pos < ((int)(m_szTextBuffer.length()))) && (m_szTextBuffer[pos] == QChar('/')))m_szTextBuffer.insert(pos,"\\"); + if((pos < ((int)(m_szTextBuffer.length()))) && (m_szTextBuffer[pos] == TQChar('/')))m_szTextBuffer.insert(pos,"\\"); returnPressed(idx != -1); } @@ -1031,12 +1027,12 @@ void KviInputEditor::insertText(const QString &text) // Replace (length) characters in the buffer from (start) with (text), returns // the length of the text inserted (different from text.length() only if the // buffer was truncated. -int KviInputEditor::replaceSegment(int start, int length, const QString &text) +int KviInputEditor::replaceSegment(int start, int length, const TQString &text) { m_szTextBuffer.remove(start, length); m_szTextBuffer.insert(start, text); m_szTextBuffer.truncate(m_iMaxBufferSize); - repaintWithCursorOn(); + tqrepaintWithCursorOn(); int iInsertedLength = text.length(); int iMaxInsertedLength = m_iMaxBufferSize - start; @@ -1046,11 +1042,11 @@ int KviInputEditor::replaceSegment(int start, int length, const QString &text) void KviInputEditor::pasteClipboardWithConfirmation() { - QClipboard * c = QApplication::clipboard(); + TQClipboard * c = TQApplication::tqclipboard(); if(!c)return; - QString szText = c->text(QClipboard::Clipboard); + TQString szText = c->text(TQClipboard::Clipboard); - if(szText.contains(QChar('\n')) > 0) + if(szText.tqcontains(TQChar('\n')) > 0) { if(m_pInputParent->inherits("KviInput")) ((KviInput*)(m_pInputParent))->multiLinePaste(szText); @@ -1061,11 +1057,11 @@ void KviInputEditor::pasteClipboardWithConfirmation() void KviInputEditor::pasteSelectionWithConfirmation() { - QClipboard * c = QApplication::clipboard(); + TQClipboard * c = TQApplication::tqclipboard(); if(!c)return; - QString szText = c->text(c->supportsSelection() ? QClipboard::Selection : QClipboard::Clipboard); + TQString szText = c->text(c->supportsSelection() ? TQClipboard::Selection : TQClipboard::Clipboard); - if(szText.contains(QChar('\n')) > 0) + if(szText.tqcontains(TQChar('\n')) > 0) { if(m_pInputParent->inherits("KviInput")) ((KviInput*)(m_pInputParent))->multiLinePaste(szText); @@ -1088,10 +1084,10 @@ void KviInputEditor::stopPasteSlow() void KviInputEditor::pasteFile() { - QString stmp = QFileDialog::getOpenFileName("","",this,"Paste File", "Choose a file" ); + TQString stmp = TQFileDialog::getOpenFileName("","",this,"Paste File", "Choose a file" ); if(stmp!="") { - QString stmp1 = "spaste.file " + stmp ; + TQString stmp1 = "spaste.file " + stmp ; KviKvsScript::run(stmp1,g_pActiveWindow); m_bSpSlowFlag = true; } @@ -1114,7 +1110,7 @@ void KviInputEditor::clear() home(); } -void KviInputEditor::setText(const QString text) +void KviInputEditor::setText(const TQString text) { m_szTextBuffer = text; m_szTextBuffer.truncate(m_iMaxBufferSize); @@ -1122,7 +1118,7 @@ void KviInputEditor::setText(const QString text) end(); } -void KviInputEditor::mouseReleaseEvent(QMouseEvent *) +void KviInputEditor::mouseReleaseEvent(TQMouseEvent *) { if(m_iDragTimer) { @@ -1143,7 +1139,7 @@ void KviInputEditor::killDragTimer() } } -void KviInputEditor::timerEvent(QTimerEvent *e) +void KviInputEditor::timerEvent(TQTimerEvent *e) { if(e->timerId() == m_iCursorTimer) { @@ -1164,7 +1160,7 @@ void KviInputEditor::handleDragSelection() { if(m_iSelectionAnchorChar == -1)return; - QPoint pnt = mapFromGlobal(QCursor::pos()); + TQPoint pnt = mapFromGlobal(TQCursor::pos()); if(pnt.x() <= 0) @@ -1195,7 +1191,7 @@ void KviInputEditor::handleDragSelection() m_iSelectionEnd = m_iSelectionAnchorChar-1; } } - repaintWithCursorOn(); + tqrepaintWithCursorOn(); } void KviInputEditor::returnPressed(bool bRepaint) @@ -1203,9 +1199,9 @@ void KviInputEditor::returnPressed(bool bRepaint) if (!m_szTextBuffer.isEmpty() /* && (!m_pHistory->current() || m_szTextBuffer.compare(*(m_pHistory->current())))*/) { if(m_pInputParent->inherits("KviInput")) - g_pInputHistory->add(new QString(m_szTextBuffer)); + g_pInputHistory->add(new TQString(m_szTextBuffer)); - m_pHistory->insert(0,new QString(m_szTextBuffer)); + m_pHistory->insert(0,new TQString(m_szTextBuffer)); } __range_valid(KVI_INPUT_MAX_LOCAL_HISTORY_ENTRIES > 1); //ABSOLUTELY NEEDED, if not, pHist will be destroyed... @@ -1213,16 +1209,16 @@ void KviInputEditor::returnPressed(bool bRepaint) m_iCurHistoryIdx = -1; - // FIXME: ALL THIS STUFF SHOULD BE CONVERTED TO QString + // FIXME: ALL THIS STUFF SHOULD BE CONVERTED TO TQString /* if(m_pInputParent->inherits("KviInput")) { - QString szBuffer(m_szTextBuffer); + TQString szBuffer(m_szTextBuffer); m_szTextBuffer=""; selectOneChar(-1); m_iCursorPosition = 0; m_iFirstVisibleChar = 0; - if(bRepaint)repaintWithCursorOn(); + if(bRepaint)tqrepaintWithCursorOn(); KviUserInput::parse(szBuffer,m_pKviWindow); } else { */ @@ -1233,7 +1229,7 @@ void KviInputEditor::returnPressed(bool bRepaint) */ } -void KviInputEditor::focusInEvent(QFocusEvent *) +void KviInputEditor::focusInEvent(TQFocusEvent *) { if(m_iCursorTimer==0) { @@ -1243,12 +1239,12 @@ void KviInputEditor::focusInEvent(QFocusEvent *) } // XIM handling... #ifndef COMPILE_USE_QT4 - // THIS SEEMS TO BE GONE IN Qt4.x ? (even if the documentation states that it *should* be there) + // THIS SEEMS TO BE GONE IN TQt4.x ? (even if the documentation states that it *should* be there) setMicroFocusHint(1,1,width() - 2,height() - 2,true,0); #endif } -void KviInputEditor::focusOutEvent(QFocusEvent *) +void KviInputEditor::focusOutEvent(TQFocusEvent *) { if(m_iCursorTimer)killTimer(m_iCursorTimer); m_iCursorTimer = 0; @@ -1295,7 +1291,7 @@ void KviInputEditor::internalCursorLeft(bool bShift) // remember the text before and after the cursor at this point, and put them // before and after the text inserted by IM in imEndEvent. // hagabaka -void KviInputEditor::imStartEvent(QIMEvent *e) +void KviInputEditor::imStartEvent(TQIMEvent *e) { removeSelected(); m_iIMStart = m_iIMSelectionBegin = m_iCursorPosition; @@ -1306,12 +1302,12 @@ void KviInputEditor::imStartEvent(QIMEvent *e) // Whenever the IM's preedit changes, update the visuals and internal data. refer to */ // hagabaka -void KviInputEditor::imComposeEvent(QIMEvent *e) +void KviInputEditor::imComposeEvent(TQIMEvent *e) { // replace the old pre-edit string with e->text() m_bUpdatesEnabled = false; #ifdef COMPILE_USE_QT4 - // Qt 4.x ?????????? + // TQt 4.x ?????????? m_iIMLength = replaceSegment(m_iIMStart, m_iIMLength, e->commitString()); // update selection inside the pre-edit @@ -1329,20 +1325,20 @@ void KviInputEditor::imComposeEvent(QIMEvent *e) #endif - // repaint + // tqrepaint m_bUpdatesEnabled = true; - repaintWithCursorOn(); + tqrepaintWithCursorOn(); e->accept(); } // Input method is done; put its resulting text to where the preedit area was // hagabaka -void KviInputEditor::imEndEvent(QIMEvent *e) +void KviInputEditor::imEndEvent(TQIMEvent *e) { // replace the preedit area with the IM result text m_bUpdatesEnabled = false; #ifdef COMPILE_USE_QT4 - // Qt 4.x ?????????? + // TQt 4.x ?????????? m_iIMLength = replaceSegment(m_iIMStart, m_iIMLength, e->commitString()); #else m_iIMLength = replaceSegment(m_iIMStart, m_iIMLength, e->text()); @@ -1351,9 +1347,9 @@ void KviInputEditor::imEndEvent(QIMEvent *e) // move cursor to after the IM result text moveCursorTo(m_iIMStart + m_iIMLength); - // repaint + // tqrepaint m_bUpdatesEnabled = true; - repaintWithCursorOn(); + tqrepaintWithCursorOn(); // reset data m_bIMComposing = false; @@ -1363,7 +1359,7 @@ void KviInputEditor::imEndEvent(QIMEvent *e) // FIXME According to , if the XIM // style used is OverTheTop, code needs to be added in keyPressEvent handler */ // hagabaka -void KviInputEditor::keyPressEvent(QKeyEvent *e) +void KviInputEditor::keyPressEvent(TQKeyEvent *e) { // disable the keyPress handling when IM is in composition. if(m_bIMComposing) @@ -1375,9 +1371,9 @@ void KviInputEditor::keyPressEvent(QKeyEvent *e) if(!m_bReadOnly) { - if((e->key() == Qt::Key_Tab) || (e->key() == Qt::Key_BackTab)) + if((e->key() == TQt::Key_Tab) || (e->key() == TQt::Key_BackTab)) { - completion(e->state() & Qt::ShiftButton); + completion(e->state() & TQt::ShiftButton); return; } else { m_bLastCompletionFinished=1; @@ -1385,17 +1381,17 @@ void KviInputEditor::keyPressEvent(QKeyEvent *e) } - if(e->key() == Qt::Key_Escape) + if(e->key() == TQt::Key_Escape) { emit escapePressed(); return; } - if((e->state() & Qt::AltButton) || (e->state() & Qt::ControlButton)) + if((e->state() & TQt::AltButton) || (e->state() & TQt::ControlButton)) { switch(e->key()) { - case Qt::Key_Backspace: + case TQt::Key_Backspace: if(m_pInputParent->inherits("KviInput")) { ((KviInput*)(m_pInputParent))->multiLinePaste(m_szTextBuffer); @@ -1409,50 +1405,50 @@ void KviInputEditor::keyPressEvent(QKeyEvent *e) //Make CtrlKey and CommandKey ("Apple") behave equally on MacOSX. //This way typical X11 and Apple shortcuts can be used simultanously within the input line. #ifndef Q_OS_MACX - if(e->state() & Qt::ControlButton) + if(e->state() & TQt::ControlButton) #else - if((e->state() & Qt::ControlButton) || (e->state() & Qt::MetaButton)) + if((e->state() & TQt::ControlButton) || (e->state() & TQt::MetaButton)) #endif { switch(e->key()) { - case Qt::Key_Right: + case TQt::Key_Right: if(m_iCursorPosition < ((int)(m_szTextBuffer.length()))) { // skip whitespace while(m_iCursorPosition < ((int)(m_szTextBuffer.length()))) { if(!m_szTextBuffer.at(m_iCursorPosition).isSpace())break; - internalCursorRight(e->state() & Qt::ShiftButton); + internalCursorRight(e->state() & TQt::ShiftButton); } // skip nonwhitespace while(m_iCursorPosition < ((int)(m_szTextBuffer.length()))) { if(m_szTextBuffer.at(m_iCursorPosition).isSpace())break; - internalCursorRight(e->state() & Qt::ShiftButton); + internalCursorRight(e->state() & TQt::ShiftButton); } - repaintWithCursorOn(); + tqrepaintWithCursorOn(); } break; - case Qt::Key_Left: + case TQt::Key_Left: if(m_iCursorPosition > 0) { // skip whitespace while(m_iCursorPosition > 0) { if(!m_szTextBuffer.at(m_iCursorPosition - 1).isSpace())break; - internalCursorLeft(e->state() & Qt::ShiftButton); + internalCursorLeft(e->state() & TQt::ShiftButton); } // skip nonwhitespace while(m_iCursorPosition > 0) { if(m_szTextBuffer.at(m_iCursorPosition - 1).isSpace())break; - internalCursorLeft(e->state() & Qt::ShiftButton); + internalCursorLeft(e->state() & TQt::ShiftButton); } - repaintWithCursorOn(); + tqrepaintWithCursorOn(); } break; - case Qt::Key_K: + case TQt::Key_K: { if(!m_bReadOnly) { @@ -1461,27 +1457,27 @@ void KviInputEditor::keyPressEvent(QKeyEvent *e) if(xPos > 24)xPos-=24; if(!g_pColorWindow)g_pColorWindow = new KviColorWindow(); if(xPos+g_pColorWindow->width() > width())xPos = width()-(g_pColorWindow->width()+2); - g_pColorWindow->move(mapToGlobal(QPoint(xPos,-35))); + g_pColorWindow->move(mapToGlobal(TQPoint(xPos,-35))); g_pColorWindow->popup(this); } } break; - case Qt::Key_B: + case TQt::Key_B: if(!m_bReadOnly) insertChar(KVI_TEXT_BOLD); break; - case Qt::Key_O: + case TQt::Key_O: if(!m_bReadOnly) insertChar(KVI_TEXT_RESET); break; - case Qt::Key_U: + case TQt::Key_U: if(!m_bReadOnly) insertChar(KVI_TEXT_UNDERLINE); break; - case Qt::Key_R: + case TQt::Key_R: if(!m_bReadOnly) insertChar(KVI_TEXT_REVERSE); break; - case Qt::Key_P: + case TQt::Key_P: if(!m_bReadOnly) insertChar(KVI_TEXT_CRYPTESCAPE); // DO NOT CRYPT THIS STUFF break; - case Qt::Key_I: + case TQt::Key_I: { if(!m_bReadOnly) { @@ -1490,22 +1486,22 @@ void KviInputEditor::keyPressEvent(QKeyEvent *e) if(xPos > 24)xPos-=24; if(!g_pTextIconWindow)g_pTextIconWindow = new KviTextIconWindow(); if(xPos+g_pTextIconWindow->width() > width())xPos = width()-(g_pTextIconWindow->width()+2); - g_pTextIconWindow->move(mapToGlobal(QPoint(xPos,-KVI_TEXTICON_WIN_HEIGHT))); + g_pTextIconWindow->move(mapToGlobal(TQPoint(xPos,-KVI_TEXTICON_WIN_HEIGHT))); g_pTextIconWindow->popup(this); } } break; - case Qt::Key_C: + case TQt::Key_C: copyToClipboard(); break; - case Qt::Key_X: + case TQt::Key_X: if(!m_bReadOnly) cut(); break; - case Qt::Key_V: + case TQt::Key_V: if(!m_bReadOnly) pasteClipboardWithConfirmation(); break; - //case Qt::Key_Backspace: - case Qt::Key_W: + //case TQt::Key_Backspace: + case TQt::Key_W: if(m_iCursorPosition > 0 && !m_bReadOnly && !hasSelection()) { // skip whitespace @@ -1524,39 +1520,39 @@ void KviInputEditor::keyPressEvent(QKeyEvent *e) m_iCursorPosition--; if(m_iFirstVisibleChar > m_iCursorPosition)m_iFirstVisibleChar--; } - repaintWithCursorOn(); + tqrepaintWithCursorOn(); } break; - case Qt::Key_PageUp: + case TQt::Key_PageUp: if(KVI_OPTION_BOOL(KviOption_boolDisableInputHistory)) break; if(m_pInputParent->inherits("KviInput")) ((KviInput*)(m_pInputParent))->historyButtonClicked(); break; - case Qt::Key_F: + case TQt::Key_F: if(m_pKviWindow) if(m_pKviWindow->view())m_pKviWindow->view()->toggleToolWidget(); break; - case Qt::Key_A: + case TQt::Key_A: m_iSelectionBegin=0; m_iSelectionEnd=m_szTextBuffer.length()-1; m_iCursorPosition=m_szTextBuffer.length(); - repaintWithCursorOn(); + tqrepaintWithCursorOn(); break; - case Qt::Key_Return: - case Qt::Key_Enter: + case TQt::Key_Return: + case TQt::Key_Enter: if(m_pInputParent->inherits("KviInput")) { - QString szBuffer(m_szTextBuffer); + TQString szBuffer(m_szTextBuffer); m_szTextBuffer=""; selectOneChar(-1); m_iCursorPosition = 0; m_iFirstVisibleChar = 0; - repaintWithCursorOn(); + tqrepaintWithCursorOn(); KviUserInput::parseNonCommand(szBuffer,m_pKviWindow); if (!szBuffer.isEmpty()) { - g_pInputHistory->add(new QString(szBuffer)); - m_pHistory->insert(0,new QString(szBuffer)); + g_pInputHistory->add(new TQString(szBuffer)); + m_pHistory->insert(0,new TQString(szBuffer)); } __range_valid(KVI_INPUT_MAX_LOCAL_HISTORY_ENTRIES > 1); //ABSOLUTELY NEEDED, if not, pHist will be destroyed... @@ -1572,10 +1568,10 @@ void KviInputEditor::keyPressEvent(QKeyEvent *e) return; } - if((e->state() & Qt::AltButton) && (e->state() & Qt::Keypad)) + if((e->state() & TQt::AltButton) && (e->state() & TQt::Keypad)) { - // Qt::Key_Meta seems to substitute Qt::Key_Alt on some keyboards - if((e->key() == Qt::Key_Alt) || (e->key() == Qt::Key_Meta)) + // TQt::Key_Meta seems to substitute TQt::Key_Alt on some keyboards + if((e->key() == TQt::Key_Alt) || (e->key() == TQt::Key_Meta)) { m_szAltKeyCode = ""; return; @@ -1592,20 +1588,20 @@ void KviInputEditor::keyPressEvent(QKeyEvent *e) return; } - if(e->state() & Qt::ShiftButton) + if(e->state() & TQt::ShiftButton) { switch(e->key()) { - case Qt::Key_Insert: + case TQt::Key_Insert: if(!m_bReadOnly) pasteClipboardWithConfirmation(); return; break; - case Qt::Key_PageUp: + case TQt::Key_PageUp: if(m_pKviWindow) if(m_pKviWindow->view())m_pKviWindow->view()->prevLine(); return; break; - case Qt::Key_PageDown: + case TQt::Key_PageDown: if(m_pKviWindow) if(m_pKviWindow->view())m_pKviWindow->view()->nextLine(); return; @@ -1615,21 +1611,21 @@ void KviInputEditor::keyPressEvent(QKeyEvent *e) switch(e->key()) { - case Qt::Key_Right: + case TQt::Key_Right: if(m_iCursorPosition < ((int)(m_szTextBuffer.length()))) { - internalCursorRight(e->state() & Qt::ShiftButton); - repaintWithCursorOn(); + internalCursorRight(e->state() & TQt::ShiftButton); + tqrepaintWithCursorOn(); } break; - case Qt::Key_Left: + case TQt::Key_Left: if(m_iCursorPosition > 0) { - internalCursorLeft(e->state() & Qt::ShiftButton); - repaintWithCursorOn(); + internalCursorLeft(e->state() & TQt::ShiftButton); + tqrepaintWithCursorOn(); } break; - case Qt::Key_Backspace: + case TQt::Key_Backspace: if(!m_bReadOnly) { if(hasSelection() && (m_iSelectionEnd >= m_iCursorPosition-1) && (m_iSelectionBegin <= m_iCursorPosition)) @@ -1644,10 +1640,10 @@ void KviInputEditor::keyPressEvent(QKeyEvent *e) if(m_iFirstVisibleChar > m_iCursorPosition)m_iFirstVisibleChar--; } selectOneChar(-1); - repaintWithCursorOn(); + tqrepaintWithCursorOn(); } break; - case Qt::Key_Delete: + case TQt::Key_Delete: if(!m_bReadOnly) { if(hasSelection()) removeSelected(); @@ -1655,14 +1651,14 @@ void KviInputEditor::keyPressEvent(QKeyEvent *e) { m_szTextBuffer.remove(m_iCursorPosition,1); selectOneChar(-1); - repaintWithCursorOn(); + tqrepaintWithCursorOn(); } } break; - case Qt::Key_Home: + case TQt::Key_Home: if(m_iCursorPosition > 0) { - if(e->state() & Qt::ShiftButton) + if(e->state() & TQt::ShiftButton) { if((m_iSelectionBegin == -1)&&(m_iSelectionEnd == -1))m_iSelectionEnd = m_iCursorPosition - 1; m_iSelectionBegin = 0; @@ -1672,8 +1668,8 @@ void KviInputEditor::keyPressEvent(QKeyEvent *e) home(); } break; - case Qt::Key_End://we should call it even the cursor is at the end for deselecting - if(e->state() & Qt::ShiftButton) + case TQt::Key_End://we should call it even the cursor is at the end for deselecting + if(e->state() & TQt::ShiftButton) { if((m_iSelectionBegin == -1)&&(m_iSelectionEnd == -1))m_iSelectionBegin = m_iCursorPosition; m_iSelectionEnd = m_szTextBuffer.length()-1; @@ -1682,7 +1678,7 @@ void KviInputEditor::keyPressEvent(QKeyEvent *e) } end(); break; - case Qt::Key_Up: + case TQt::Key_Up: if(!m_bReadOnly) { if(m_pHistory->count() > 0) @@ -1706,7 +1702,7 @@ void KviInputEditor::keyPressEvent(QKeyEvent *e) } } break; - case Qt::Key_Down: + case TQt::Key_Down: if(!m_bReadOnly) { if(m_pHistory->count() > 0) @@ -1730,20 +1726,20 @@ void KviInputEditor::keyPressEvent(QKeyEvent *e) } } break; - case Qt::Key_PageUp: + case TQt::Key_PageUp: if(m_pKviWindow) if(m_pKviWindow->view())m_pKviWindow->view()->prevPage(); break; - case Qt::Key_PageDown: + case TQt::Key_PageDown: if(m_pKviWindow) if(m_pKviWindow->view())m_pKviWindow->view()->nextPage(); break; - case Qt::Key_Return: - case Qt::Key_Enter: + case TQt::Key_Return: + case TQt::Key_Enter: returnPressed(); break; - case Qt::Key_Alt: - case Qt::Key_Meta: + case TQt::Key_Alt: + case TQt::Key_Meta: m_szAltKeyCode = ""; break; default: @@ -1753,9 +1749,9 @@ void KviInputEditor::keyPressEvent(QKeyEvent *e) } } -void KviInputEditor::keyReleaseEvent(QKeyEvent *e) +void KviInputEditor::keyReleaseEvent(TQKeyEvent *e) { - if((e->key() == Qt::Key_Alt) || (e->key() == Qt::Key_Meta)) + if((e->key() == TQt::Key_Alt) || (e->key() == TQt::Key_Meta)) { if(m_szAltKeyCode.hasData()) { @@ -1764,7 +1760,7 @@ void KviInputEditor::keyReleaseEvent(QKeyEvent *e) if(bOk && ch != 0) { //debug("INSERTING CHAR %d",ch); - insertChar(QChar(ch)); + insertChar(TQChar(ch)); e->accept(); } } @@ -1773,7 +1769,7 @@ void KviInputEditor::keyReleaseEvent(QKeyEvent *e) e->ignore(); } -void KviInputEditor::getWordBeforeCursor(QString &buffer,bool * bIsFirstWordInLine) +void KviInputEditor::getWordBeforeCursor(TQString &buffer,bool * bIsFirstWordInLine) { if(m_szTextBuffer.isEmpty() || m_iCursorPosition <= 0) { @@ -1783,10 +1779,10 @@ void KviInputEditor::getWordBeforeCursor(QString &buffer,bool * bIsFirstWordInLi buffer = m_szTextBuffer.left(m_iCursorPosition); - int idx = buffer.findRev(' '); - int idx2 = buffer.findRev(','); // This is for comma separated lists... - int idx3 = buffer.findRev('('); - int idx4 = buffer.findRev('"'); + int idx = buffer.tqfindRev(' '); + int idx2 = buffer.tqfindRev(','); // This is for comma separated lists... + int idx3 = buffer.tqfindRev('('); + int idx4 = buffer.tqfindRev('"'); if(idx2 > idx)idx = idx2; if(idx3 > idx)idx = idx3; if(idx4 > idx)idx = idx4; @@ -1801,8 +1797,8 @@ void KviInputEditor::completion(bool bShift) // On windows the KVI_PATH_SEPARATOR_CHARacters are breaking everything... // Well.... :D - QString word; - QString match; + TQString word; + TQString match; bool bFirstWordInLine; getWordBeforeCursor(word,&bFirstWordInLine); @@ -1812,18 +1808,18 @@ void KviInputEditor::completion(bool bShift) else { // this is standard nick completion continued standardNickCompletion(bShift,word,bFirstWordInLine); - repaintWithCursorOn(); + tqrepaintWithCursorOn(); return; } } - KviPointerList tmp; + KviPointerList tmp; tmp.setAutoDelete(true); bool bIsCommand = false; bool bIsDir = false; bool bIsNick = false; - unsigned short uc = word[0].unicode(); + unsigned short uc = word[0].tqunicode(); if(uc == '/') { @@ -1849,12 +1845,12 @@ void KviInputEditor::completion(bool bShift) { if(m_pKviWindow) { - if( (word.length()==1) && (m_pKviWindow->windowName()[0].unicode()==uc)) + if( (word.length()==1) && (m_pKviWindow->windowName()[0].tqunicode()==uc)) { match=m_pKviWindow->windowName(); match.append(" "); replaceWordBeforeCursor(word,match,false); - repaintWithCursorOn(); + tqrepaintWithCursorOn(); return; } else { if(m_pKviWindow->console()) @@ -1863,7 +1859,7 @@ void KviInputEditor::completion(bool bShift) } //FIXME: Complete also on irc:// starting strings, not only irc.? - } else if(KviQString::equalCIN(word,"irc.",4)) + } else if(KviTQString::equalCIN(word,"irc.",4)) { // irc server name if(m_pKviWindow) @@ -1879,7 +1875,7 @@ void KviInputEditor::completion(bool bShift) bIsNick = true; } else { standardNickCompletion(bShift,word,bFirstWordInLine); - repaintWithCursorOn(); + tqrepaintWithCursorOn(); return; } } @@ -1902,8 +1898,8 @@ void KviInputEditor::completion(bool bShift) } } } else { - QString all; - QString * s = tmp.first(); + TQString all; + TQString * s = tmp.first(); match = *s; int wLen = word.length(); for(;s;s = tmp.next()) @@ -1911,12 +1907,12 @@ void KviInputEditor::completion(bool bShift) if(s->length() < match.length()) match.remove(s->length(),match.length() - s->length()); // All the matches here have length >= word.len()!!! - const QChar * b1 = KviQString::nullTerminatedArray(*s) + wLen; - const QChar * b2 = KviQString::nullTerminatedArray(match) + wLen; - const QChar * c1 = b1; - const QChar * c2 = b2; - if(bIsDir)while(c1->unicode() && (c1->unicode() == c2->unicode()))c1++,c2++; - else while(c1->unicode() && (c1->lower().unicode() == c2->lower().unicode()))c1++,c2++; + const TQChar * b1 = KviTQString::nullTerminatedArray(*s) + wLen; + const TQChar * b2 = KviTQString::nullTerminatedArray(match) + wLen; + const TQChar * c1 = b1; + const TQChar * c2 = b2; + if(bIsDir)while(c1->tqunicode() && (c1->tqunicode() == c2->tqunicode()))c1++,c2++; + else while(c1->tqunicode() && (c1->lower().tqunicode() == c2->lower().tqunicode()))c1++,c2++; int len = wLen + (c1 - b1); if(len < ((int)(match.length())))match.remove(len,match.length() - len); if(!all.isEmpty())all.append(", "); @@ -1937,10 +1933,10 @@ void KviInputEditor::completion(bool bShift) replaceWordBeforeCursor(word,match,false); } - repaintWithCursorOn(); + tqrepaintWithCursorOn(); } -void KviInputEditor::replaceWordBeforeCursor(const QString &word,const QString &replacement,bool bRepaint) +void KviInputEditor::replaceWordBeforeCursor(const TQString &word,const TQString &replacement,bool bRepaint) { selectOneChar(-1); m_iCursorPosition -= word.length(); @@ -1948,16 +1944,16 @@ void KviInputEditor::replaceWordBeforeCursor(const QString &word,const QString & m_szTextBuffer.insert(m_iCursorPosition,replacement); m_szTextBuffer.truncate(m_iMaxBufferSize); moveCursorTo(m_iCursorPosition + replacement.length()); - if(bRepaint)repaintWithCursorOn(); + if(bRepaint)tqrepaintWithCursorOn(); } -void KviInputEditor::standardNickCompletion(bool bAddMask,QString &word,bool bFirstWordInLine) +void KviInputEditor::standardNickCompletion(bool bAddMask,TQString &word,bool bFirstWordInLine) { // FIXME: this could be really simplified... if(!m_pUserListView)return; selectOneChar(-1); - QString buffer; + TQString buffer; if(m_szLastCompletedNick.isEmpty()) { // New completion session: we NEED sth to complete @@ -2049,17 +2045,17 @@ void KviInputEditor::end() moveRightFirstVisibleCharToShowCursor(); m_iCursorPosition++; } - repaintWithCursorOn(); + tqrepaintWithCursorOn(); } void KviInputEditor::home() { m_iFirstVisibleChar = 0; m_iCursorPosition = 0; - repaintWithCursorOn(); + tqrepaintWithCursorOn(); } -void KviInputEditor::insertChar(QChar c) +void KviInputEditor::insertChar(TQChar c) { if(m_szTextBuffer.length() >= m_iMaxBufferSize)return; @@ -2077,34 +2073,34 @@ void KviInputEditor::insertChar(QChar c) m_szTextBuffer.insert(m_iCursorPosition,c); moveRightFirstVisibleCharToShowCursor(); m_iCursorPosition++; - repaintWithCursorOn(); + tqrepaintWithCursorOn(); } void KviInputEditor::moveRightFirstVisibleCharToShowCursor() { // :) - QFontMetrics fm(KVI_OPTION_FONT(KviOption_fontInput)); + TQFontMetrics fm(KVI_OPTION_FONT(KviOption_fontInput)); - QChar c = m_szTextBuffer.at(m_iCursorPosition); + TQChar c = m_szTextBuffer.at(m_iCursorPosition); #ifdef COMPILE_USE_QT4 - m_iLastCursorXPosition += c.unicode() < 32 ? fm.width(getSubstituteChar(c.unicode())) + 3 : fm.width(c);; + m_iLastCursorXPosition += c.tqunicode() < 32 ? fm.width(getSubstituteChar(c.tqunicode())) + 3 : fm.width(c);; #else - m_iLastCursorXPosition += (c.unicode() < 256) ? g_iInputFontCharWidth[c.unicode()] : fm.width(c); + m_iLastCursorXPosition += (c.tqunicode() < 256) ? g_iInputFontCharWidth[c.tqunicode()] : fm.width(c); #endif while(m_iLastCursorXPosition >= contentsRect().width()-2*KVI_INPUT_MARGIN) { c = m_szTextBuffer.at(m_iFirstVisibleChar); #ifdef COMPILE_USE_QT4 - m_iLastCursorXPosition -= c.unicode() < 32 ? fm.width(getSubstituteChar(c.unicode())) + 3 : fm.width(c);; + m_iLastCursorXPosition -= c.tqunicode() < 32 ? fm.width(getSubstituteChar(c.tqunicode())) + 3 : fm.width(c);; #else - m_iLastCursorXPosition -= (c.unicode() < 256) ? g_iInputFontCharWidth[c.unicode()] : fm.width(c); + m_iLastCursorXPosition -= (c.tqunicode() < 256) ? g_iInputFontCharWidth[c.tqunicode()] : fm.width(c); #endif m_iFirstVisibleChar++; } } -void KviInputEditor::repaintWithCursorOn() +void KviInputEditor::tqrepaintWithCursorOn() { // :) if(m_bUpdatesEnabled) @@ -2126,14 +2122,14 @@ int KviInputEditor::charIndexFromXPosition(int xPos) int curChar = m_iFirstVisibleChar; int bufLen = m_szTextBuffer.length(); - QFontMetrics fm(KVI_OPTION_FONT(KviOption_fontInput)); + TQFontMetrics fm(KVI_OPTION_FONT(KviOption_fontInput)); while(curChar < bufLen) { - QChar c = m_szTextBuffer.at(curChar); + TQChar c = m_szTextBuffer.at(curChar); #ifdef COMPILE_USE_QT4 - int widthCh = c.unicode() < 32 ? fm.width(getSubstituteChar(c.unicode())) + 3 : fm.width(c);; + int widthCh = c.tqunicode() < 32 ? fm.width(getSubstituteChar(c.tqunicode())) + 3 : fm.width(c);; #else - int widthCh = (c.unicode() < 256) ? g_iInputFontCharWidth[c.unicode()] : fm.width(c); + int widthCh = (c.tqunicode() < 256) ? g_iInputFontCharWidth[c.tqunicode()] : fm.width(c); #endif if(xPos < (curXPos+(widthCh/2)))return curChar; else if(xPos < (curXPos+widthCh))return (curChar+1); @@ -2145,18 +2141,18 @@ int KviInputEditor::charIndexFromXPosition(int xPos) return curChar; } -int KviInputEditor::xPositionFromCharIndex(QFontMetrics& fm,int chIdx,bool bContentsCoords) +int KviInputEditor::xPositionFromCharIndex(TQFontMetrics& fm,int chIdx,bool bContentsCoords) { // FIXME: this could use fm.width(m_szTextBuffer,chIdx) int curXPos = bContentsCoords ? KVI_INPUT_MARGIN : frameWidth()+KVI_INPUT_MARGIN; int curChar = m_iFirstVisibleChar; while(curChar < chIdx) { - QChar c = m_szTextBuffer.at(curChar); + TQChar c = m_szTextBuffer.at(curChar); #ifdef COMPILE_USE_QT4 - curXPos += c.unicode() < 32 ? fm.width(getSubstituteChar(c.unicode())) + 3 : fm.width(c);; + curXPos += c.tqunicode() < 32 ? fm.width(getSubstituteChar(c.tqunicode())) + 3 : fm.width(c);; #else - curXPos += (c.unicode() < 256) ? g_iInputFontCharWidth[c.unicode()] : fm.width(c); + curXPos += (c.tqunicode() < 256) ? g_iInputFontCharWidth[c.tqunicode()] : fm.width(c); #endif curChar++; } @@ -2169,14 +2165,14 @@ int KviInputEditor::xPositionFromCharIndex(int chIdx,bool bContentsCoords) int curXPos = bContentsCoords ? KVI_INPUT_MARGIN : frameWidth()+KVI_INPUT_MARGIN; int curChar = m_iFirstVisibleChar; //debug("%i",g_pLastFontMetrics); - if(!g_pLastFontMetrics) g_pLastFontMetrics = new QFontMetrics(KVI_OPTION_FONT(KviOption_fontInput)); + if(!g_pLastFontMetrics) g_pLastFontMetrics = new TQFontMetrics(KVI_OPTION_FONT(KviOption_fontInput)); while(curChar < chIdx) { - QChar c = m_szTextBuffer.at(curChar); + TQChar c = m_szTextBuffer.at(curChar); #ifdef COMPILE_USE_QT4 - curXPos += c.unicode() < 32 ? g_pLastFontMetrics->width(getSubstituteChar(c.unicode())) + 3 : g_pLastFontMetrics->width(c); + curXPos += c.tqunicode() < 32 ? g_pLastFontMetrics->width(getSubstituteChar(c.tqunicode())) + 3 : g_pLastFontMetrics->width(c); #else - curXPos += (c.unicode() < 256) ? g_iInputFontCharWidth[c.unicode()] : g_pLastFontMetrics->width(c); + curXPos += (c.tqunicode() < 256) ? g_iInputFontCharWidth[c.tqunicode()] : g_pLastFontMetrics->width(c); #endif curChar++; } @@ -2278,7 +2274,7 @@ int KviInputEditor::xPositionFromCharIndex(int chIdx,bool bContentsCoords) Ctrl+Shift+CursorLeft: Moves the selection one word left
Ctrl+Shift+CursorRight: Moves the selection one word right
Tab: Nickname, function/command, or filename completion (see below)
- Shift+Tab: Hostmask or function/command completion (see below)
+ Shift+Tab: Hosttqmask or function/command completion (see below)
Alt+<numeric_sequence>: Inserts the character by ASCII/Unicode code
Alt+32: Inserts ASCII/Unicode character 32: ' ' (a space) @@ -2313,11 +2309,11 @@ int KviInputEditor::xPositionFromCharIndex(int chIdx,bool bContentsCoords) KviInput::KviInput(KviWindow *par,KviUserListView * view) -: QWidget(par,"input") +: TQWidget(par,"input") { - QBoxLayout* pLayout=new QHBoxLayout(this); + TQBoxLayout* pLayout=new TQHBoxLayout(this); pLayout->setAutoAdd(true); - pLayout->setDirection(QBoxLayout::RightToLeft); + pLayout->setDirection(TQBoxLayout::RightToLeft); pLayout->setMargin(0); pLayout->setSpacing(0); @@ -2333,51 +2329,51 @@ KviInput::KviInput(KviWindow *par,KviUserListView * view) if(g_pIconManager->getBigIcon("kvi_horizontal_left.png")) m_pHideToolsButton->setPixmap(*(g_pIconManager->getBigIcon("kvi_horizontal_left.png"))); - connect(m_pHideToolsButton,SIGNAL(clicked()),this,SLOT(toggleToolButtons())); + connect(m_pHideToolsButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(toggleToolButtons())); m_pButtonContainer=new KviTalHBox(this); m_pButtonContainer->setSpacing(0); #ifdef COMPILE_USE_QT4 - m_pButtonContainer->setSizePolicy(QSizePolicy(QSizePolicy::Minimum,QSizePolicy::Preferred)); -// if(m_pButtonContainer->layout()) -// m_pButtonContainer->layout()->setSizeConstraint(QLayout::SetMinimumSize); + m_pButtonContainer->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Minimum,TQSizePolicy::Preferred)); +// if(m_pButtonContainer->tqlayout()) +// m_pButtonContainer->tqlayout()->setSizeConstraint(TQLayout::SetMinimumSize); #endif m_pHistoryButton = new KviStyledToolButton(m_pButtonContainer,"historybutton"); m_pHistoryButton->setUsesBigPixmap(false); //m_pHistoryButton->setUpdatesEnabled(TRUE); ??? - QIconSet is1; + TQIconSet is1; if(!KVI_OPTION_BOOL(KviOption_boolDisableInputHistory))//G&N mar 2005 { - is1.setPixmap(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_TIME)),QIconSet::Small); + is1.setPixmap(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_TIME)),TQIconSet::Small); m_pHistoryButton->setIconSet(is1); KviTalToolTip::add(m_pHistoryButton,__tr2qs("Show History
<Ctrl+PageUp>")); - connect(m_pHistoryButton,SIGNAL(clicked()),this,SLOT(historyButtonClicked())); + connect(m_pHistoryButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(historyButtonClicked())); } else { - is1.setPixmap(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_QUITSPLIT)),QIconSet::Small); + is1.setPixmap(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_TQUITSPLIT)),TQIconSet::Small); m_pHistoryButton->setIconSet(is1); KviTalToolTip::add(m_pHistoryButton,__tr2qs("Input History Disabled")); } m_pIconButton = new KviStyledToolButton(m_pButtonContainer,"iconbutton"); m_pIconButton->setUsesBigPixmap(false); - QIconSet is3; - is3.setPixmap(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_BIGGRIN)),QIconSet::Small); + TQIconSet is3; + is3.setPixmap(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_BIGGRIN)),TQIconSet::Small); m_pIconButton->setIconSet(is3); KviTalToolTip::add(m_pIconButton,__tr2qs("Show Icons Popup
<Ctrl+I>
See also /help texticons")); - connect(m_pIconButton,SIGNAL(clicked()),this,SLOT(iconButtonClicked())); + connect(m_pIconButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(iconButtonClicked())); m_pCommandlineModeButton = new KviStyledToolButton(m_pButtonContainer,"commandlinemodebutton"); m_pCommandlineModeButton->setUsesBigPixmap(false); m_pCommandlineModeButton->setToggleButton(true); - QIconSet is0; - is0.setPixmap(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_SAYSMILE)),QIconSet::Small,QIconSet::Normal,QIconSet::On); - is0.setPixmap(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_SAYKVS)),QIconSet::Small,QIconSet::Normal,QIconSet::Off); + TQIconSet is0; + is0.setPixmap(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_SAYSMILE)),TQIconSet::Small,TQIconSet::Normal,TQIconSet::On); + is0.setPixmap(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_SAYKVS)),TQIconSet::Small,TQIconSet::Normal,TQIconSet::Off); m_pCommandlineModeButton->setIconSet(is0); KviTalToolTip::add(m_pCommandlineModeButton,__tr2qs("User friendly commandline mode
See also /help commandline")); if(KVI_OPTION_BOOL(KviOption_boolCommandlineInUserFriendlyModeByDefault)) @@ -2387,22 +2383,22 @@ KviInput::KviInput(KviWindow *par,KviUserListView * view) m_pMultiEditorButton = new KviStyledToolButton(m_pButtonContainer,"multieditorbutton"); m_pMultiEditorButton->setToggleButton(true); m_pMultiEditorButton->setUsesBigPixmap(false); - QIconSet is2; - is2.setPixmap(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_TERMINAL)),QIconSet::Small,QIconSet::Normal,QIconSet::On); - is2.setPixmap(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_TERMINAL)),QIconSet::Small,QIconSet::Normal,QIconSet::Off); + TQIconSet is2; + is2.setPixmap(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_TERMINAL)),TQIconSet::Small,TQIconSet::Normal,TQIconSet::On); + is2.setPixmap(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_TERMINAL)),TQIconSet::Small,TQIconSet::Normal,TQIconSet::Off); m_pMultiEditorButton->setIconSet(is2); - QString szTip = __tr2qs("Multi-line Editor
<Alt+Backspace>"); + TQString szTip = __tr2qs("Multi-line Editor
<Alt+Backspace>"); szTip += " - <Ctrl+Backspace>"; KviTalToolTip::add(m_pMultiEditorButton,szTip); - connect(m_pMultiEditorButton,SIGNAL(toggled(bool)),this,SLOT(multilineEditorButtonToggled(bool))); + connect(m_pMultiEditorButton,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(multilineEditorButtonToggled(bool))); m_pInputEditor = new KviInputEditor(this,par,view); - connect(m_pInputEditor,SIGNAL(enterPressed()),this,SLOT(inputEditorEnterPressed())); + connect(m_pInputEditor,TQT_SIGNAL(enterPressed()),this,TQT_SLOT(inputEditorEnterPressed())); #ifdef COMPILE_USE_QT4 - m_pInputEditor->setSizePolicy(QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Ignored)); + m_pInputEditor->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Expanding,TQSizePolicy::Ignored)); #else - m_pInputEditor->setSizePolicy(QSizePolicy(QSizePolicy::Ignored,QSizePolicy::Ignored)); + m_pInputEditor->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Ignored,TQSizePolicy::Ignored)); #endif @@ -2434,7 +2430,7 @@ void KviInput::setButtonsHidden(bool bHidden) if(!m_pHideToolsButton || !m_pButtonContainer) return; if(bHidden==m_pButtonContainer->isHidden()) return; m_pButtonContainer->setHidden(bHidden); - QPixmap* pix= bHidden ? + TQPixmap* pix= bHidden ? g_pIconManager->getBigIcon("kvi_horizontal_right.png") : g_pIconManager->getBigIcon("kvi_horizontal_left.png"); if(pix) @@ -2448,36 +2444,36 @@ void KviInput::toggleToolButtons() void KviInput::inputEditorEnterPressed() { - QString szText = m_pInputEditor->text(); - KviUserInput::parse(szText,m_pWindow,QString::null,m_pCommandlineModeButton->isOn()); + TQString szText = m_pInputEditor->text(); + KviUserInput::parse(szText,m_pWindow,TQString(),m_pCommandlineModeButton->isOn()); m_pInputEditor->setText(""); } -void KviInput::keyPressEvent(QKeyEvent *e) +void KviInput::keyPressEvent(TQKeyEvent *e) { //debug("KviInput::keyPressEvent(key:%d,state:%d,text:%s)",e->key(),e->state(),e->text().isEmpty() ? "empty" : e->text().utf8().data()); - if((e->state() & Qt::ControlButton) || (e->state() & Qt::AltButton) || (e->state() & Qt::MetaButton)) + if((e->state() & TQt::ControlButton) || (e->state() & TQt::AltButton) || (e->state() & TQt::MetaButton)) { switch(e->key()) { - case Qt::Key_Backspace: + case TQt::Key_Backspace: //if(m_pMultiLineEditor) multilineEditorButtonToggled(!m_pMultiLineEditor); break; } } - if(e->state() & Qt::ControlButton) + if(e->state() & TQt::ControlButton) { switch(e->key()) { - case Qt::Key_Enter: - case Qt::Key_Return: + case TQt::Key_Enter: + case TQt::Key_Return: { if(m_pMultiLineEditor) { - QString szText; + TQString szText; m_pMultiLineEditor->getText(szText); if(szText.isEmpty())return; if(KVI_OPTION_BOOL(KviOption_boolWarnAboutPastingMultipleLines)) @@ -2489,11 +2485,11 @@ void KviInput::keyPressEvent(QKeyEvent *e) #ifdef COMPILE_USE_QT4 int nLines = szText.count('\n') + 1; #else - int nLines = szText.contains('\n') + 1; + int nLines = szText.tqcontains('\n') + 1; #endif if(nLines > 15) { - int nRet = QMessageBox::question( + int nRet = TQMessageBox::question( this, __tr2qs("Confirm Multiline Message"), __tr2qs("You're about to send a message with %1 lines of text.

" \ @@ -2501,7 +2497,7 @@ void KviInput::keyPressEvent(QKeyEvent *e) "here to prevent you from accidentally sending
" \ "a really large message just because you didn't edit it
" \ "properly after pasting text from the clipboard.

" \ - "Do you want the message to be sent?").arg(nLines), + "Do you want the message to be sent?").tqarg(nLines), __tr2qs("Yes, always"), __tr2qs("Yes"), __tr2qs("No"), @@ -2521,19 +2517,19 @@ void KviInput::keyPressEvent(QKeyEvent *e) } } } - KviUserInput::parse(szText,m_pWindow,QString::null,m_pCommandlineModeButton->isOn()); + KviUserInput::parse(szText,m_pWindow,TQString(),m_pCommandlineModeButton->isOn()); m_pMultiLineEditor->setText(""); } } break; - case Qt::Key_PageUp: + case TQt::Key_PageUp: historyButtonClicked(); break; } } } -void KviInput::multiLinePaste(const QString &text) +void KviInput::multiLinePaste(const TQString &text) { if(!m_pMultiLineEditor)multilineEditorButtonToggled(true); m_pMultiLineEditor->setText(text); @@ -2547,20 +2543,20 @@ void KviInput::multilineEditorButtonToggled(bool bOn) KviScriptEditor::destroyInstance(m_pMultiLineEditor); m_pMultiLineEditor = 0; m_pInputEditor->show(); - m_pWindow->childrenTreeChanged(0); + m_pWindow->tqchildrenTreeChanged(0); m_pInputEditor->setFocus(); m_pMultiEditorButton->setOn(false); } else { if(!bOn)return; m_pMultiLineEditor = KviScriptEditor::createInstance(this); - QString szText = __tr2qs("; submits, ; hides this editor"); + TQString szText = __tr2qs("; submits, ; hides this editor"); // compatibility entry to avoid breaking translation just before a release... :) - szText.replace("Alt+Backspace","Ctrl+Backspace"); + szText.tqreplace("Alt+Backspace","Ctrl+Backspace"); m_pMultiLineEditor->setFindText(szText); m_pMultiLineEditor->setFindLineeditReadOnly(true); m_pInputEditor->hide(); m_pMultiLineEditor->show(); - m_pWindow->childrenTreeChanged(m_pMultiLineEditor); + m_pWindow->tqchildrenTreeChanged(m_pMultiLineEditor); m_pMultiLineEditor->setFocus(); m_pMultiEditorButton->setOn(true); } @@ -2569,7 +2565,7 @@ void KviInput::multilineEditorButtonToggled(bool bOn) void KviInput::iconButtonClicked() { if(!g_pTextIconWindow)g_pTextIconWindow = new KviTextIconWindow(); - QPoint pnt = m_pIconButton->mapToGlobal(QPoint(m_pIconButton->width(),0)); + TQPoint pnt = m_pIconButton->mapToGlobal(TQPoint(m_pIconButton->width(),0)); g_pTextIconWindow->move(pnt.x()-g_pTextIconWindow->width(),pnt.y() - g_pTextIconWindow->height()); g_pTextIconWindow->popup(this,true); } @@ -2578,7 +2574,7 @@ void KviInput::historyButtonClicked() { if(!g_pHistoryWindow)g_pHistoryWindow = new KviHistoryWindow(); - QPoint pnt = mapToGlobal(QPoint(0,0)); + TQPoint pnt = mapToGlobal(TQPoint(0,0)); g_pHistoryWindow->setGeometry(pnt.x(),pnt.y() - KVI_HISTORY_WIN_HEIGHT,width(),KVI_HISTORY_WIN_HEIGHT); g_pHistoryWindow->popup(this); @@ -2586,7 +2582,7 @@ void KviInput::historyButtonClicked() #define BUTTON_WIDTH 20 -/*void KviInput::resizeEvent(QResizeEvent *e) +/*void KviInput::resizeEvent(TQResizeEvent *e) { //m_pButtonContainer m_pInputEditor->setGeometry(0,0,m_pButtonContainer->isVisible() ? width() - (BUTTON_WIDTH * 4)-10 : width() - 10,height()); @@ -2595,19 +2591,19 @@ void KviInput::historyButtonClicked() m_pHideToolsButton->setGeometry(width() - 10,0,10,height()); - QWidget::resizeEvent(e); + TQWidget::resizeEvent(e); }*/ void KviInput::setFocus() { - // redirect setFocus() to the right children + // redirect setFocus() to the right tqchildren if(m_pMultiLineEditor)m_pMultiLineEditor->setFocus(); else m_pInputEditor->setFocus(); } -void KviInput::focusInEvent(QFocusEvent * e) +void KviInput::focusInEvent(TQFocusEvent * e) { - // if we get a focus in event , redirect the focus to the children + // if we get a focus in event , redirect the focus to the tqchildren if(m_pMultiLineEditor)m_pMultiLineEditor->setFocus(); else m_pInputEditor->setFocus(); } @@ -2618,9 +2614,9 @@ int KviInput::heightHint() const return m_pMultiLineEditor ? 120 : m_pInputEditor->heightHint(); } -void KviInput::setText(const QString &text) +void KviInput::setText(const TQString &text) { - // FIXME: Latin1 -> QString ? + // FIXME: Latin1 -> TQString ? if(m_pMultiLineEditor)m_pMultiLineEditor->setText(text); else m_pInputEditor->setText(text); } @@ -2630,7 +2626,7 @@ void KviInput::insertChar(char c) m_pInputEditor->insertChar(c); } -void KviInput::insertText(const QString& text) +void KviInput::insertText(const TQString& text) { m_pInputEditor->insertText(text); } @@ -2642,34 +2638,34 @@ void KviInput::applyOptions() if(KVI_OPTION_BOOL(KviOption_boolDisableInputHistory))//G&N mar 2005 { - QIconSet is1; - is1.setPixmap(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_QUITSPLIT)),QIconSet::Small); + TQIconSet is1; + is1.setPixmap(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_TQUITSPLIT)),TQIconSet::Small); m_pHistoryButton->setIconSet(is1); KviTalToolTip::add(m_pHistoryButton,__tr2qs("Input History Disabled")); - m_pHistoryButton->disconnect(SIGNAL(clicked())); + m_pHistoryButton->disconnect(TQT_SIGNAL(clicked())); } if(!KVI_OPTION_BOOL(KviOption_boolDisableInputHistory)) { - QIconSet is1; - is1.setPixmap(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_TIME)),QIconSet::Small); + TQIconSet is1; + is1.setPixmap(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_TIME)),TQIconSet::Small); m_pHistoryButton->setIconSet(is1); KviTalToolTip::add(m_pHistoryButton,__tr2qs("Show History
<Ctrl+PageUp>")); - connect(m_pHistoryButton,SIGNAL(clicked()),this,SLOT(historyButtonClicked())); + connect(m_pHistoryButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(historyButtonClicked())); } m_pInputEditor->applyOptions(); } -void KviInput::setFocusProxy(QWidget *) +void KviInput::setFocusProxy(TQWidget *) { /* do nothing */ } -//const QString & KviInput::text() -QString KviInput::text() +//const TQString & KviInput::text() +TQString KviInput::text() { - QString szText; + TQString szText; if(m_pMultiLineEditor) m_pMultiLineEditor->getText(szText); else diff --git a/src/kvirc/ui/kvi_input.h b/src/kvirc/ui/kvi_input.h index 56ec5070..cc6e3e6b 100644 --- a/src/kvirc/ui/kvi_input.h +++ b/src/kvirc/ui/kvi_input.h @@ -28,21 +28,21 @@ #include "kvi_settings.h" -#include +#include #include "kvi_tal_hbox.h" -#include +#include #include "kvi_pointerlist.h" #include "kvi_string.h" -//#include -#include +//#include +#include class KviUserListView; class KviWindow; class KviInput; class KviTalHBox; -class QFontMetrics; +class TQFontMetrics; // Default maximum buffer size. #define KVI_INPUT_MAX_BUFFER_SIZE 400 @@ -63,31 +63,32 @@ public: KviInputHistory(); ~KviInputHistory(); protected: - KviPointerList * m_pStringList; + KviPointerList * m_pStringList; public: - void add(QString * s); - KviPointerList * list(){ return m_pStringList; }; + void add(TQString * s); + KviPointerList * list(){ return m_pStringList; }; void save(const char * filename); void load(const char * filename); }; #ifdef COMPILE_USE_QT4 - #define QIMEvent QInputMethodEvent + #define TQIMEvent TQInputMethodEvent #endif -class KVIRC_API KviInputEditor : public QFrame +class KVIRC_API KviInputEditor : public TQFrame { // friend class KviUserParser; - //Q_PROPERTY( int KviProperty_FocusOwner READ heightHint ) - Q_PROPERTY( int TransparencyCapable READ heightHint ) + //TQ_PROPERTY( int KviProperty_FocusOwner READ heightHint ) + TQ_PROPERTY( int TransparencyCapable READ heightHint ) Q_OBJECT + TQ_OBJECT public: - KviInputEditor(QWidget * par,KviWindow *wnd,KviUserListView * view = 0); + KviInputEditor(TQWidget * par,KviWindow *wnd,KviUserListView * view = 0); ~KviInputEditor(); protected: - QString m_szTextBuffer; + TQString m_szTextBuffer; int m_iCursorPosition; int m_iFirstVisibleChar; int m_iSelectionBegin; @@ -96,7 +97,7 @@ protected: bool m_bSpSlowFlag; // <-- what is this ? // members for supporting input methods - QString m_szIMText; + TQString m_szIMText; int m_iIMStart; int m_iIMLength; int m_iIMSelectionBegin; @@ -121,15 +122,15 @@ protected: int m_iSelectionAnchorChar; // History stuff - KviPointerList * m_pHistory; + KviPointerList * m_pHistory; int m_iCurHistoryIdx; KviStr m_szSaveTextBuffer; // Nick completion KviUserListView * m_pUserListView; - QString m_szLastCompletedNick; - QString m_szLastCompletionBuffer; + TQString m_szLastCompletedNick; + TQString m_szLastCompletionBuffer; int m_iLastCompletionCursorPosition; int m_iLastCompletionCursorXPosition; int m_iLastCompletionFirstVisibleChar; @@ -138,33 +139,33 @@ protected: bool m_bUpdatesEnabled; KviStr m_szAltKeyCode; KviWindow * m_pKviWindow; - QWidget * m_pInputParent; + TQWidget * m_pInputParent; KviTalPopupMenu * m_pIconMenu; bool m_bReadOnly; public: int heightHint() const; - virtual QSize sizeHint() const; - void setText(const QString text); - QString text() { return m_szTextBuffer; }; - void insertChar(QChar c); - void insertText(const QString &text); + virtual TQSize tqsizeHint() const; + void setText(const TQString text); + TQString text() { return m_szTextBuffer; }; + void insertChar(TQChar c); + void insertText(const TQString &text); void applyOptions(); void setMaxBufferSize(int size) { m_iMaxBufferSize = size; }; void setReadOnly(bool bReadOnly) {m_bReadOnly=bReadOnly; }; bool readOnly() {return m_bReadOnly; }; private: - void replaceWordBeforeCursor(const QString &word,const QString &replacement,bool bRepaint = true); - int replaceSegment(int start, int length, const QString &string); - void getWordBeforeCursor(QString &buffer,bool * bIsFirstWordInLine); + void replaceWordBeforeCursor(const TQString &word,const TQString &replacement,bool bRepaint = true); + int replaceSegment(int start, int length, const TQString &string); + void getWordBeforeCursor(TQString &buffer,bool * bIsFirstWordInLine); void runUpToTheFirstVisibleChar(); - void extractNextBlock(int idx,QFontMetrics & fm,int curXPos,int maxXPos); - void drawTextBlock(QPainter *pa,QFontMetrics & fm,int curXPos,int textBaseline,int idx,int len,bool bSelected=FALSE); - QChar getSubstituteChar(unsigned short control_code); + void extractNextBlock(int idx,TQFontMetrics & fm,int curXPos,int maxXPos); + void drawTextBlock(TQPainter *pa,TQFontMetrics & fm,int curXPos,int textBaseline,int idx,int len,bool bSelected=FALSE); + TQChar getSubstituteChar(unsigned short control_code); void moveRightFirstVisibleCharToShowCursor(); - void repaintWithCursorOn(); + void tqrepaintWithCursorOn(); void selectOneChar(int pos); int charIndexFromXPosition(int xPos); - int xPositionFromCharIndex(QFontMetrics& fm,int chIdx,bool bContentsCoords=FALSE); + int xPositionFromCharIndex(TQFontMetrics& fm,int chIdx,bool bContentsCoords=FALSE); int xPositionFromCharIndex(int chIdx,bool bContentsCoords=FALSE); void killDragTimer(); void handleDragSelection(); @@ -174,8 +175,8 @@ private: void moveCursorTo(int idx,bool bRepaint = true); void returnPressed(bool bRepaint = true); void completion(bool bShift); - void standardNickCompletion(bool bAddMask,QString &word,bool bFirstWordInLine); - void recalcFontMetrics(QFontMetrics * pFm); + void standardNickCompletion(bool bAddMask,TQString &word,bool bFirstWordInLine); + void recalcFontMetrics(TQFontMetrics * pFm); void internalCursorRight(bool bShift); void internalCursorLeft(bool bShift); public slots: @@ -195,30 +196,31 @@ signals: void escapePressed(); void enterPressed(); protected: - virtual void drawContents(QPainter *); - //virtual void resizeEvent(QResizeEvent *); - virtual void timerEvent(QTimerEvent *e); - virtual void focusInEvent(QFocusEvent *); - virtual void focusOutEvent(QFocusEvent *); - virtual void keyPressEvent(QKeyEvent *e); - virtual void keyReleaseEvent(QKeyEvent *e); - virtual void mousePressEvent(QMouseEvent *e); - virtual void mouseReleaseEvent(QMouseEvent *); - virtual void dragEnterEvent(QDragEnterEvent *e); - virtual void dropEvent(QDropEvent *e); - virtual void imStartEvent(QIMEvent *e); - virtual void imComposeEvent(QIMEvent *e); - virtual void imEndEvent(QIMEvent *e); + virtual void drawContents(TQPainter *); + //virtual void resizeEvent(TQResizeEvent *); + virtual void timerEvent(TQTimerEvent *e); + virtual void focusInEvent(TQFocusEvent *); + virtual void focusOutEvent(TQFocusEvent *); + virtual void keyPressEvent(TQKeyEvent *e); + virtual void keyReleaseEvent(TQKeyEvent *e); + virtual void mousePressEvent(TQMouseEvent *e); + virtual void mouseReleaseEvent(TQMouseEvent *); + virtual void dragEnterEvent(TQDragEnterEvent *e); + virtual void dropEvent(TQDropEvent *e); + virtual void imStartEvent(TQIMEvent *e); + virtual void imComposeEvent(TQIMEvent *e); + virtual void imEndEvent(TQIMEvent *e); #ifdef COMPILE_USE_QT4 - virtual void paintEvent(QPaintEvent *e); + virtual void paintEvent(TQPaintEvent *e); #endif }; class KviScriptEditor; -class KVIRC_API KviInput : public QWidget +class KVIRC_API KviInput : public TQWidget { Q_OBJECT + TQ_OBJECT public: KviInput(KviWindow *par,KviUserListView * view = 0); ~KviInput(); @@ -227,16 +229,16 @@ public: KviInputEditor * m_pInputEditor; KviScriptEditor * m_pMultiLineEditor; KviTalHBox * m_pButtonContainer; - QToolButton * m_pMultiEditorButton; - QToolButton * m_pHistoryButton; - QToolButton * m_pIconButton; - QToolButton * m_pCommandlineModeButton; - QToolButton * m_pHideToolsButton; + TQToolButton * m_pMultiEditorButton; + TQToolButton * m_pHistoryButton; + TQToolButton * m_pIconButton; + TQToolButton * m_pCommandlineModeButton; + TQToolButton * m_pHideToolsButton; protected: -// virtual void resizeEvent(QResizeEvent * e); - virtual void focusInEvent(QFocusEvent * e); - virtual void setFocusProxy(QWidget * w); - virtual void keyPressEvent(QKeyEvent * e); +// virtual void resizeEvent(TQResizeEvent * e); + virtual void focusInEvent(TQFocusEvent * e); + virtual void setFocusProxy(TQWidget * w); + virtual void keyPressEvent(TQKeyEvent * e); public slots: void multilineEditorButtonToggled(bool bOn); void historyButtonClicked(); @@ -245,18 +247,18 @@ public slots: void toggleToolButtons(); public: virtual void setFocus(); - void multiLinePaste(const QString &text); + void multiLinePaste(const TQString &text); bool isUserFriendly() { return m_pCommandlineModeButton->isOn(); }; void setUserFriendly(bool bSet) { m_pCommandlineModeButton->setOn(bSet); }; int heightHint() const; - void setText(const QString &text); + void setText(const TQString &text); void insertChar(char c); - void insertText(const QString & text); + void insertText(const TQString & text); void applyOptions(); bool isButtonsHidden(); void setButtonsHidden(bool bHidden); - //const QString & text(); - QString text(); + //const TQString & text(); + TQString text(); }; #endif //_KVI_INPUT_H_ diff --git a/src/kvirc/ui/kvi_ipeditor.cpp b/src/kvirc/ui/kvi_ipeditor.cpp index 13291c24..9d1b363e 100644 --- a/src/kvirc/ui/kvi_ipeditor.cpp +++ b/src/kvirc/ui/kvi_ipeditor.cpp @@ -23,18 +23,18 @@ #include "kvi_ipeditor.h" #include "kvi_qcstring.h" -#include -#include -#include -#include +#include +#include +#include +#include #include -#include +#include // FIXME: #warning "THIS COULD GO INTO libkvioptions ?" -KviIpEditor::KviIpEditor(QWidget * parent,AddressType addrType,const QString &ipAddr,const char *name) -:QFrame(parent,name) +KviIpEditor::KviIpEditor(TQWidget * tqparent,AddressType addrType,const TQString &ipAddr,const char *name) +:TQFrame(tqparent,name) { for(int i=0;i<7;i++) @@ -43,12 +43,12 @@ KviIpEditor::KviIpEditor(QWidget * parent,AddressType addrType,const QString &ip m_pLabel[i] = 0; } m_pEdit[7] = 0; - setFrameStyle(QFrame::Sunken|QFrame::StyledPanel); + setFrameStyle(TQFrame::Sunken|TQFrame::StyledPanel); #ifdef COMPILE_USE_QT4 - setBackgroundRole(QPalette::Base); + setBackgroundRole(TQPalette::Base); #else - setBackgroundMode(QWidget::PaletteBase); + setBackgroundMode(TQWidget::PaletteBase); #endif setAddressType(addrType); @@ -63,7 +63,7 @@ KviIpEditor::~KviIpEditor() void KviIpEditor::setEnabled(bool bEnabled) { - QFrame::setEnabled(bEnabled); + TQFrame::setEnabled(bEnabled); for(int i=0;i<8;i++) { if(m_pEdit[i])m_pEdit[i]->setEnabled(bEnabled); @@ -71,17 +71,17 @@ void KviIpEditor::setEnabled(bool bEnabled) { // Is this the right way ? #ifdef COMPILE_USE_QT4 - m_pLabel[i]->setBackgroundRole(isEnabled() ? QPalette::Base : QPalette::Background); + m_pLabel[i]->setBackgroundRole(isEnabled() ? TQPalette::Base : TQPalette::Background); #else - m_pLabel[i]->setBackgroundMode(isEnabled() ? QWidget::PaletteBase : QWidget::PaletteBackground); + m_pLabel[i]->setBackgroundMode(isEnabled() ? TQWidget::PaletteBase : TQWidget::PaletteBackground); #endif m_pLabel[i]->setEnabled(bEnabled); } } #ifdef COMPILE_USE_QT4 - setBackgroundRole(isEnabled() ? QPalette::Base : QPalette::Background); + setBackgroundRole(isEnabled() ? TQPalette::Base : TQPalette::Background); #else - setBackgroundMode(isEnabled() ? QWidget::PaletteBase : QWidget::PaletteBackground); + setBackgroundMode(isEnabled() ? TQWidget::PaletteBase : TQWidget::PaletteBackground); #endif } @@ -120,13 +120,13 @@ void KviIpEditor::clear() } } -bool KviIpEditor::setAddress(const QString &ipAddr) +bool KviIpEditor::setAddress(const TQString &ipAddr) { // FIXME We could check if the addres // is valid before effectively setting the fields clear(); - KviQCString ip = ipAddr.ascii(); // ip addresses are digits & latin letters abcdef (IpV6) + KviTQCString ip = ipAddr.ascii(); // ip addresses are digits & latin letters abcdef (IpV6) ip = ip.stripWhiteSpace(); const char * c = ip.data(); @@ -140,7 +140,7 @@ bool KviIpEditor::setAddress(const QString &ipAddr) const char *anchor = c; while(isdigit(*c))c++; if(c == anchor)return false; // Invalid empty field - KviQCString str(anchor,(c - anchor) + 1); + KviTQCString str(anchor,(c - anchor) + 1); bool bOk; int num = str.toInt(&bOk); if(!bOk)return false; // should never happen , but just to be sure @@ -156,7 +156,7 @@ bool KviIpEditor::setAddress(const QString &ipAddr) { const char *anchor = c; while(isdigit(*c) || ((tolower(*c) >= 'a') && (tolower(*c) <= 'f')) || ((tolower(*c) >= 'A') && (tolower(*c) <= 'F')))c++; - KviQCString str(anchor,(c - anchor) + 1); + KviTQCString str(anchor,(c - anchor) + 1); if(str.length() > 4)return false; // Too long m_pEdit[i]->setText(str.data()); if(i < 7){ @@ -169,9 +169,9 @@ bool KviIpEditor::setAddress(const QString &ipAddr) return true; } -QString KviIpEditor::address() const +TQString KviIpEditor::address() const { - QString ret; + TQString ret; if(m_addrType == IpV6) { @@ -183,7 +183,7 @@ QString KviIpEditor::address() const } else { for(int i=0;i<4;i++) { - QString tmp = m_pEdit[i]->text(); + TQString tmp = m_pEdit[i]->text(); bool bOk; int num = tmp.toInt(&bOk); if(!bOk)num = 0; @@ -200,29 +200,29 @@ void KviIpEditor::recreateChildren() // A bit slow , but compact bool bIpV4 = (m_addrType == IpV4); int max = bIpV4 ? 4 : 8; - QFontMetrics fm(font()); + TQFontMetrics fm(font()); //int minWidth = fm.width(bIpV4 ? "000" : "AAAA") + 4; for(int i=0;iinstallEventFilter(this); m_pEdit[i]->setFrame(false); - m_pEdit[i]->setAlignment(Qt::AlignCenter); + m_pEdit[i]->tqsetAlignment(TQt::AlignCenter); } //m_pEdit[i]->setMinimumWidth(minWidth); m_pEdit[i]->setMaxLength(bIpV4 ? 3 : 4); m_pEdit[i]->show(); if(i < (max - 1)) { - if(!m_pLabel[i])m_pLabel[i] = new QLabel(this); + if(!m_pLabel[i])m_pLabel[i] = new TQLabel(this); m_pLabel[i]->setText(bIpV4 ? "." : ":"); m_pLabel[i]->show(); // Is this the right way ? setBackgroundMode seems to not work well #ifdef COMPILE_USE_QT4 - m_pLabel[i]->setBackgroundRole(isEnabled() ? QPalette::Base : QPalette::Background); + m_pLabel[i]->setBackgroundRole(isEnabled() ? TQPalette::Base : TQPalette::Background); #else - m_pLabel[i]->setBackgroundMode(isEnabled() ? QWidget::PaletteBase : QWidget::PaletteBackground); + m_pLabel[i]->setBackgroundMode(isEnabled() ? TQWidget::PaletteBase : TQWidget::PaletteBackground); #endif } } @@ -243,35 +243,35 @@ void KviIpEditor::recreateChildren() } } } - //setMinimumWidth(4 + (max * minWidth) + ((max - 1) * m_pLabel[0]->sizeHint().width())); - setMinimumHeight(m_pLabel[0]->sizeHint().height() + 4); + //setMinimumWidth(4 + (max * minWidth) + ((max - 1) * m_pLabel[0]->tqsizeHint().width())); + setMinimumHeight(m_pLabel[0]->tqsizeHint().height() + 4); resizeEvent(0); } -bool KviIpEditor::eventFilter(QObject * o,QEvent *e) +bool KviIpEditor::eventFilter(TQObject * o,TQEvent *e) { - if(o->inherits("QLineEdit")) + if(o->inherits(TQLINEEDIT_OBJECT_NAME_STRING)) { - if(e->type() == QEvent::KeyPress) + if(e->type() == TQEvent::KeyPress) { - QString s; + TQString s; // find the editor int edIdx = -1; for(int i=0;i<8;i++) { - if(m_pEdit[i] == o) + if(TQT_BASE_OBJECT(m_pEdit[i]) == TQT_BASE_OBJECT(o)) { edIdx = i; break; } } - if(edIdx == -1)return QFrame::eventFilter(o,e); // user added QLineEdit child ? + if(edIdx == -1)return TQFrame::eventFilter(o,e); // user added TQLineEdit child ? int edMax = (m_addrType == IpV4) ? 3 : 7; - int cursorPos = ((QLineEdit *)o)->cursorPosition(); - switch(((QKeyEvent *)e)->key()) + int cursorPos = ((TQLineEdit *)o)->cursorPosition(); + switch(((TQKeyEvent *)e)->key()) { - case Qt::Key_Right: - s = ((QLineEdit *)o)->text(); + case TQt::Key_Right: + s = ((TQLineEdit *)o)->text(); if(((unsigned int)cursorPos) == s.length()) { if(edIdx < edMax) @@ -282,8 +282,8 @@ bool KviIpEditor::eventFilter(QObject * o,QEvent *e) } } break; - case Qt::Key_Left: - case Qt::Key_Backspace: + case TQt::Key_Left: + case TQt::Key_Backspace: if(cursorPos == 0) { if(edIdx > 0) @@ -294,26 +294,22 @@ bool KviIpEditor::eventFilter(QObject * o,QEvent *e) return true; } } - return QFrame::eventFilter(o,e); + return TQFrame::eventFilter(o,e); break; - case Qt::Key_End: - case Qt::Key_Home: - case Qt::Key_Delete: - case Qt::Key_Tab: - return QFrame::eventFilter(o,e); + case TQt::Key_End: + case TQt::Key_Home: + case TQt::Key_Delete: + case TQt::Key_Tab: + return TQFrame::eventFilter(o,e); break; default: - // a normal key (this part substitutes a QValidator) - const char c = tolower(((QKeyEvent *)e)->ascii()); + // a normal key (this part substitutes a TQValidator) + const char c = tolower(((TQKeyEvent *)e)->ascii()); if(m_addrType == IpV4) { if((c >= '0') && (c <= '9')) { -#if QT_VERSION >= 300 if(m_pEdit[edIdx]->hasSelectedText())m_pEdit[edIdx]->cut(); -#else - if(m_pEdit[edIdx]->hasMarkedText())m_pEdit[edIdx]->cut(); -#endif cursorPos = m_pEdit[edIdx]->cursorPosition(); s = m_pEdit[edIdx]->text(); s.insert(cursorPos,c); @@ -333,19 +329,11 @@ bool KviIpEditor::eventFilter(QObject * o,QEvent *e) return true; } } -#if QT_VERSION >= 300 m_pEdit[edIdx]->cursorForward(false); -#else - m_pEdit[edIdx]->cursorRight(false); -#endif } else { if((c == '.') && (edIdx < edMax)) { -#if QT_VERSION >= 300 if(!m_pEdit[edIdx]->hasSelectedText()) -#else - if(!m_pEdit[edIdx]->hasMarkedText()) -#endif { m_pEdit[++edIdx]->setFocus(); m_pEdit[edIdx]->selectAll(); @@ -355,11 +343,7 @@ bool KviIpEditor::eventFilter(QObject * o,QEvent *e) } else { if( ((c >= '0') && (c <= '9')) || ((c >= 'a') && (c <= 'f')) ) { -#if QT_VERSION >= 300 if(m_pEdit[edIdx]->hasSelectedText())m_pEdit[edIdx]->cut(); -#else - if(m_pEdit[edIdx]->hasMarkedText())m_pEdit[edIdx]->cut(); -#endif cursorPos = m_pEdit[edIdx]->cursorPosition(); s = m_pEdit[edIdx]->text(); @@ -384,21 +368,13 @@ bool KviIpEditor::eventFilter(QObject * o,QEvent *e) m_pEdit[edIdx]->selectAll(); //m_pEdit[edIdx]->setCursorPosition(0); } else { -#if QT_VERSION >= 300 m_pEdit[edIdx]->cursorForward(false); -#else - m_pEdit[edIdx]->cursorRight(false); -#endif } } } else { if((c == ':') && (edIdx < edMax)) { -#if QT_VERSION >= 300 if(!m_pEdit[edIdx]->hasSelectedText()) -#else - if(!m_pEdit[edIdx]->hasMarkedText()) -#endif { m_pEdit[++edIdx]->setFocus(); m_pEdit[edIdx]->selectAll(); @@ -411,15 +387,15 @@ bool KviIpEditor::eventFilter(QObject * o,QEvent *e) } } } - return QFrame::eventFilter(o,e); + return TQFrame::eventFilter(o,e); } -void KviIpEditor::resizeEvent(QResizeEvent *e) +void KviIpEditor::resizeEvent(TQResizeEvent *e) { if(m_pEdit[0]) { int maxW = (m_addrType == IpV4) ? 4 : 8; - int labHint = m_pLabel[0]->sizeHint().width(); + int labHint = m_pLabel[0]->tqsizeHint().width(); int hghHint = height() - 4; int ediWdth = ((width() - 4) - ((maxW - 1) * labHint)) / maxW; int curX = 2; @@ -434,19 +410,19 @@ void KviIpEditor::resizeEvent(QResizeEvent *e) curX += ediWdth; } } - if(e)QFrame::resizeEvent(e); + if(e)TQFrame::resizeEvent(e); } -QSize KviIpEditor::sizeHint() +TQSize KviIpEditor::tqsizeHint() { if(m_pEdit[0]) { - int labHint = m_pLabel[0]->sizeHint().width(); - int hghHint = m_pEdit[0]->sizeHint().height(); - int ediHint = m_pEdit[0]->sizeHint().width(); - if(m_addrType == IpV4)return QSize((labHint * 3) + (ediHint * 4) + 4,hghHint + 4); - else return QSize((labHint * 7) + (ediHint * 8) + 4,hghHint + 4); - } else return QFrame::sizeHint(); + int labHint = m_pLabel[0]->tqsizeHint().width(); + int hghHint = m_pEdit[0]->tqsizeHint().height(); + int ediHint = m_pEdit[0]->tqsizeHint().width(); + if(m_addrType == IpV4)return TQSize((labHint * 3) + (ediHint * 4) + 4,hghHint + 4); + else return TQSize((labHint * 7) + (ediHint * 8) + 4,hghHint + 4); + } else return TQFrame::tqsizeHint(); } diff --git a/src/kvirc/ui/kvi_ipeditor.h b/src/kvirc/ui/kvi_ipeditor.h index 04574e61..3a398412 100644 --- a/src/kvirc/ui/kvi_ipeditor.h +++ b/src/kvirc/ui/kvi_ipeditor.h @@ -25,36 +25,37 @@ #include "kvi_settings.h" -#include -#include -#include +#include +#include +#include -class QLineEdit; -class QLabel; +class TQLineEdit; +class TQLabel; -class KVIRC_API KviIpEditor : public QFrame +class KVIRC_API KviIpEditor : public TQFrame { Q_OBJECT + TQ_OBJECT public: enum AddressType { IpV4 , IpV6 }; - KviIpEditor(QWidget * parent,AddressType = IpV4,const QString &ipAddr = QString::null,const char *name = 0); + KviIpEditor(TQWidget * tqparent,AddressType = IpV4,const TQString &ipAddr = TQString(),const char *name = 0); ~KviIpEditor(); private: - QLabel * m_pLabel[7]; - QLineEdit * m_pEdit[8]; + TQLabel * m_pLabel[7]; + TQLineEdit * m_pEdit[8]; AddressType m_addrType; public: - bool setAddress(const QString &ipAddr); - QString address() const; + bool setAddress(const TQString &ipAddr); + TQString address() const; void setAddressType(AddressType addrType); AddressType addressType() const; bool hasEmptyFields() const; void clear(); virtual void setEnabled(bool bEnabled); protected: - virtual bool eventFilter(QObject * o,QEvent *e); - virtual void resizeEvent(QResizeEvent *e); - virtual QSize sizeHint(); + virtual bool eventFilter(TQObject * o,TQEvent *e); + virtual void resizeEvent(TQResizeEvent *e); + virtual TQSize tqsizeHint(); private: void recreateChildren(); }; diff --git a/src/kvirc/ui/kvi_irctoolbar.cpp b/src/kvirc/ui/kvi_irctoolbar.cpp index a7e45f3f..b2af2cb3 100644 --- a/src/kvirc/ui/kvi_irctoolbar.cpp +++ b/src/kvirc/ui/kvi_irctoolbar.cpp @@ -41,43 +41,43 @@ #include "kvi_irccontext.h" #include "kvi_lagmeter.h" -#include -#include +#include +#include #include "kvi_tal_popupmenu.h" -#include +#include #ifdef COMPILE_USE_QT4 - #include + #include #endif #ifdef COMPILE_PSEUDO_TRANSPARENCY - extern QPixmap * g_pShadedChildGlobalDesktopBackground; + extern TQPixmap * g_pShadedChildGlobalDesktopBackground; #endif -static QPixmap * g_pIccMemBuffer = 0; +static TQPixmap * g_pIccMemBuffer = 0; static KviPointerList * g_pToolBarGraphicalAppletList = 0; -KviToolBarGraphicalApplet::KviToolBarGraphicalApplet(QWidget * par,const char * name) -: QToolButton(par,name) +KviToolBarGraphicalApplet::KviToolBarGraphicalApplet(TQWidget * par,const char * name) +: TQToolButton(par,name) { if(!g_pToolBarGraphicalAppletList) { g_pToolBarGraphicalAppletList = new KviPointerList(); g_pToolBarGraphicalAppletList->setAutoDelete(false); - g_pIccMemBuffer = new QPixmap(1,1); + g_pIccMemBuffer = new TQPixmap(1,1); } g_pToolBarGraphicalAppletList->append(this); #ifdef COMPILE_USE_QT4 setAutoFillBackground(false); #else - setBackgroundMode(QWidget::NoBackground); + setBackgroundMode(TQWidget::NoBackground); #endif setMouseTracking(true); m_bResizeMode = false; - m_sizeHint = QSize(180,32); + m_tqsizeHint = TQSize(180,32); m_bSizeLoaded = false; } @@ -95,16 +95,16 @@ void KviToolBarGraphicalApplet::saveAppletWidth(unsigned int uWidth) void KviToolBarGraphicalApplet::setupSizeHint() { - m_sizeHint = QSize(loadAppletWidth(),22); + m_tqsizeHint = TQSize(loadAppletWidth(),22); m_bSizeLoaded = true; } -QSize KviToolBarGraphicalApplet::sizeHint() const +TQSize KviToolBarGraphicalApplet::tqsizeHint() const { // forget constness :( KviToolBarGraphicalApplet * that = (KviToolBarGraphicalApplet *)this; if(!m_bSizeLoaded)that->setupSizeHint(); - return m_sizeHint; + return m_tqsizeHint; } /* @@ -118,7 +118,7 @@ toolbar.define(default) */ -void KviToolBarGraphicalApplet::mouseMoveEvent(QMouseEvent * e) +void KviToolBarGraphicalApplet::mouseMoveEvent(TQMouseEvent * e) { if(e->state() & Qt::LeftButton) { @@ -127,19 +127,19 @@ void KviToolBarGraphicalApplet::mouseMoveEvent(QMouseEvent * e) int w = e->pos().x(); if(w < 32)w = 32; if(w > 480)w = 480; - m_sizeHint = QSize(w,22); + m_tqsizeHint = TQSize(w,22); resize(w,height()); - g_pApp->postEvent(parentWidget(),new QEvent(QEvent::LayoutHint)); + g_pApp->postEvent(tqparentWidget(),new TQEvent(TQEvent::LayoutHint)); } } else { if(e->pos().x() > width() - 4) - setCursor(Qt::sizeHorCursor); + setCursor(TQt::sizeHorCursor); else - setCursor(Qt::arrowCursor); + setCursor(TQt::arrowCursor); } } -void KviToolBarGraphicalApplet::mousePressEvent(QMouseEvent * e) +void KviToolBarGraphicalApplet::mousePressEvent(TQMouseEvent * e) { if(e->button() & Qt::LeftButton) { @@ -147,7 +147,7 @@ void KviToolBarGraphicalApplet::mousePressEvent(QMouseEvent * e) } } -void KviToolBarGraphicalApplet::mouseReleaseEvent(QMouseEvent * e) +void KviToolBarGraphicalApplet::mouseReleaseEvent(TQMouseEvent * e) { m_bResizeMode = false; } @@ -155,7 +155,7 @@ void KviToolBarGraphicalApplet::mouseReleaseEvent(QMouseEvent * e) KviToolBarGraphicalApplet::~KviToolBarGraphicalApplet() { - saveAppletWidth(m_sizeHint.width()); + saveAppletWidth(m_tqsizeHint.width()); g_pToolBarGraphicalAppletList->removeRef(this); if(g_pToolBarGraphicalAppletList->isEmpty()) { @@ -181,22 +181,22 @@ void KviToolBarGraphicalApplet::resizeMemBuffer() g_pIccMemBuffer->resize(uMaxW,uMaxH); } -void KviToolBarGraphicalApplet::paintEvent(QPaintEvent *e) +void KviToolBarGraphicalApplet::paintEvent(TQPaintEvent *e) { if(!isVisible())return; - QPainter pa(g_pIccMemBuffer); + TQPainter pa(g_pIccMemBuffer); #ifdef COMPILE_PSEUDO_TRANSPARENCY if(g_pShadedChildGlobalDesktopBackground) { - QPoint pnt = mapToGlobal(QPoint(0,0)); + TQPoint pnt = mapToGlobal(TQPoint(0,0)); pa.drawTiledPixmap(e->rect().left(),e->rect().top(),e->rect().width(),e->rect().height(),*g_pShadedChildGlobalDesktopBackground,pnt.x(),pnt.y()); } else { #endif if(KVI_OPTION_PIXMAP(KviOption_pixmapIrcToolBarAppletBackground).pixmap()) { - QPoint pnt = mapToGlobal(QPoint(0,0)); + TQPoint pnt = mapToGlobal(TQPoint(0,0)); pa.drawTiledPixmap(e->rect().left(),e->rect().top(),e->rect().width(),e->rect().height(),*(KVI_OPTION_PIXMAP(KviOption_pixmapIrcToolBarAppletBackground).pixmap()),pnt.x(),pnt.y()); } else { pa.fillRect(e->rect().left(),e->rect().top(),e->rect().width(),e->rect().height(),KVI_OPTION_COLOR(KviOption_colorIrcToolBarAppletBackground)); @@ -208,27 +208,27 @@ void KviToolBarGraphicalApplet::paintEvent(QPaintEvent *e) drawContents(&pa); //Need to draw the sunken rect around the view now... - pa.setPen(colorGroup().dark()); + pa.setPen(tqcolorGroup().dark()); pa.drawLine(0,0,width(),0); pa.drawLine(0,0,0,width()); - pa.setPen(colorGroup().light()); + pa.setPen(tqcolorGroup().light()); pa.drawLine(1,height() - 1,width() - 1,height() - 1); pa.drawLine(width() - 1,1,width() - 1,height()); #ifdef COMPILE_USE_QT4 - QPainter qt4SucksBecauseItNeedsAnAdditionalQPainter(this); - qt4SucksBecauseItNeedsAnAdditionalQPainter.drawPixmap(e->rect().left(),e->rect().top(),e->rect().width(),e->rect().height(),*g_pIccMemBuffer,e->rect().left(),e->rect().top(),e->rect().width(),e->rect().height()); + TQPainter qt4SucksBecauseItNeedsAnAdditionalTQPainter(this); + qt4SucksBecauseItNeedsAnAdditionalTQPainter.drawPixmap(e->rect().left(),e->rect().top(),e->rect().width(),e->rect().height(),*g_pIccMemBuffer,e->rect().left(),e->rect().top(),e->rect().width(),e->rect().height()); #else - bitBlt(this,e->rect().left(),e->rect().top(),g_pIccMemBuffer,e->rect().left(),e->rect().top(),e->rect().width(),e->rect().height(),Qt::CopyROP); + bitBlt(this,e->rect().left(),e->rect().top(),g_pIccMemBuffer,e->rect().left(),e->rect().top(),e->rect().width(),e->rect().height(),TQt::CopyROP); #endif } -void KviToolBarGraphicalApplet::drawContents(QPainter *) +void KviToolBarGraphicalApplet::drawContents(TQPainter *) { // nothing here } -void KviToolBarGraphicalApplet::resizeEvent(QResizeEvent *e) +void KviToolBarGraphicalApplet::resizeEvent(TQResizeEvent *e) { unsigned int uBufferW = g_pIccMemBuffer->width(); unsigned int uBufferH = g_pIccMemBuffer->height(); @@ -253,11 +253,11 @@ void KviToolBarGraphicalApplet::resizeEvent(QResizeEvent *e) // ////////////////////////////////////////////////////////////////////////////// -KviIrcContextDisplay::KviIrcContextDisplay(QWidget * par,const char * name) +KviIrcContextDisplay::KviIrcContextDisplay(TQWidget * par,const char * name) : KviToolBarGraphicalApplet(par,name) { KviDynamicToolTip * tip = new KviDynamicToolTip(this); - connect(tip,SIGNAL(tipRequest(KviDynamicToolTip *,const QPoint &)),this,SLOT(tipRequest(KviDynamicToolTip *,const QPoint &))); + connect(tip,TQT_SIGNAL(tipRequest(KviDynamicToolTip *,const TQPoint &)),this,TQT_SLOT(tipRequest(KviDynamicToolTip *,const TQPoint &))); } @@ -265,15 +265,15 @@ KviIrcContextDisplay::~KviIrcContextDisplay() { } -void KviIrcContextDisplay::tipRequest(KviDynamicToolTip * tip,const QPoint &) +void KviIrcContextDisplay::tipRequest(KviDynamicToolTip * tip,const TQPoint &) { - QString txt; + TQString txt; KviConsole * c = g_pActiveWindow->console(); - static QString b = ""; - static QString nb = ""; - static QString br = "
"; + static TQString b = ""; + static TQString nb = ""; + static TQString br = "
"; if(c) { @@ -297,14 +297,14 @@ void KviIrcContextDisplay::tipRequest(KviDynamicToolTip * tip,const QPoint &) txt += br; } - QString szNum; + TQString szNum; szNum.setNum(c->ircContextId()); - QString szIrcContext = QChar('('); + TQString szIrcContext = TQChar('('); szIrcContext += __tr2qs("IRC Context"); - szIrcContext += QChar(' '); + szIrcContext += TQChar(' '); szIrcContext += szNum; - szIrcContext += QChar(')'); + szIrcContext += TQChar(')'); txt += szIrcContext; if(ic && ic->lagMeter() && (KVI_OPTION_BOOL(KviOption_boolShowLagOnContextDisplay))) @@ -316,7 +316,7 @@ void KviIrcContextDisplay::tipRequest(KviDynamicToolTip * tip,const QPoint &) int llls = lll / 1000; int llld = (lll % 1000) / 100; int lllc = (lll % 100) / 10; - KviQString::appendFormatted(txt,__tr2qs("Lag: %d.%d%d"),llls,llld,lllc); + KviTQString::appendFormatted(txt,__tr2qs("Lag: %d.%d%d"),llls,llld,lllc); } else { txt += __tr2qs("Lag: ?.??"); } @@ -332,15 +332,15 @@ void KviIrcContextDisplay::tipRequest(KviDynamicToolTip * tip,const QPoint &) /* -QSize KviIrcContextDisplay::sizeHint() const +TQSize KviIrcContextDisplay::tqsizeHint() const { - return QSize(160,22); + return TQSize(160,22); } */ #define KVI_APPLETIRCCONTEXTINDICATORWIDTH 12 -void KviIrcContextDisplay::drawContents(QPainter * p) +void KviIrcContextDisplay::drawContents(TQPainter * p) { // The context indicator KviWindow * wnd = g_pActiveWindow; @@ -348,8 +348,8 @@ void KviIrcContextDisplay::drawContents(QPainter * p) if(c) { - QString serv,nick; - QString tmp; + TQString serv,nick; + TQString tmp; if(!c->connection()) { serv = __tr2qs("Not connected"); @@ -360,22 +360,22 @@ void KviIrcContextDisplay::drawContents(QPainter * p) nick = ic->currentNickName(); if(!ic->userInfo()->userMode().isEmpty()) { - static QString spp(" (+"); + static TQString spp(" (+"); nick += spp; nick += ic->userInfo()->userMode(); if(ic->userInfo()->isAway()) { - nick += QChar(' '); + nick += TQChar(' '); nick += __tr2qs("away"); } - nick += QChar(')'); + nick += TQChar(')'); } else { if(ic->userInfo()->isAway()) { - static QString ugly(" ("); + static TQString ugly(" ("); nick += ugly; nick += __tr2qs("away"); - nick += QChar(')'); + nick += TQChar(')'); } } serv = ic->currentServerName(); @@ -388,7 +388,7 @@ void KviIrcContextDisplay::drawContents(QPainter * p) int llls = lll / 1000; int llld = (lll % 1000) / 100; int lllc = (lll % 100) / 10; - KviQString::appendFormatted(nick,__tr2qs("Lag: %d.%d%d"),llls,llld,lllc); + KviTQString::appendFormatted(nick,__tr2qs("Lag: %d.%d%d"),llls,llld,lllc); } else { nick += __tr2qs("Lag: ?.??"); } @@ -404,10 +404,10 @@ void KviIrcContextDisplay::drawContents(QPainter * p) if(height() < 30) { - static QString xxx(" ["); + static TQString xxx(" ["); serv += xxx; serv += nick; - serv += QChar(']'); + serv += TQChar(']'); p->drawText(KVI_APPLETIRCCONTEXTINDICATORWIDTH + 4,16,serv,serv.length()); } else { p->drawText(KVI_APPLETIRCCONTEXTINDICATORWIDTH + 4,16,serv,serv.length()); @@ -416,8 +416,8 @@ void KviIrcContextDisplay::drawContents(QPainter * p) p->setClipping(false); - QColor base = colorGroup().background(); - QColor cntx = KVI_OPTION_ICCOLOR(c->ircContextId() % KVI_NUM_ICCOLOR_OPTIONS); + TQColor base = tqcolorGroup().background(); + TQColor cntx = KVI_OPTION_ICCOLOR(c->ircContextId() % KVI_NUM_ICCOLOR_OPTIONS); base.setRgb((base.red() + cntx.red()) >> 1,(base.green() + cntx.green()) >> 1, (base.blue() + cntx.blue()) >> 1); diff --git a/src/kvirc/ui/kvi_irctoolbar.h b/src/kvirc/ui/kvi_irctoolbar.h index a9030650..dd6c93e2 100644 --- a/src/kvirc/ui/kvi_irctoolbar.h +++ b/src/kvirc/ui/kvi_irctoolbar.h @@ -30,10 +30,10 @@ #include "kvi_console.h" #include "kvi_pointerlist.h" -#include -#include +#include +#include #include "kvi_tal_widgetstack.h" -#include +#include class KviTalPopupMenu; @@ -45,16 +45,17 @@ class KviTalPopupMenu; // Can be a child of any AppletContainer // -class KVIRC_API KviToolBarGraphicalApplet : public QToolButton +class KVIRC_API KviToolBarGraphicalApplet : public TQToolButton { Q_OBJECT + TQ_OBJECT public: - KviToolBarGraphicalApplet(QWidget * par,const char * name = 0); + KviToolBarGraphicalApplet(TQWidget * par,const char * name = 0); ~KviToolBarGraphicalApplet(); private: bool m_bResizeMode; bool m_bSizeLoaded; - QSize m_sizeHint; + TQSize m_tqsizeHint; private: void resizeMemBuffer(); protected: @@ -62,14 +63,14 @@ protected: virtual unsigned int loadAppletWidth(); virtual void saveAppletWidth(unsigned int uWidth); - virtual QSize sizeHint() const; - virtual void mouseMoveEvent(QMouseEvent *e); - virtual void mousePressEvent(QMouseEvent *e); - virtual void mouseReleaseEvent(QMouseEvent *e); - - virtual void paintEvent(QPaintEvent *e); - virtual void drawContents(QPainter * p); - virtual void resizeEvent(QResizeEvent *e); + virtual TQSize tqsizeHint() const; + virtual void mouseMoveEvent(TQMouseEvent *e); + virtual void mousePressEvent(TQMouseEvent *e); + virtual void mouseReleaseEvent(TQMouseEvent *e); + + virtual void paintEvent(TQPaintEvent *e); + virtual void drawContents(TQPainter * p); + virtual void resizeEvent(TQResizeEvent *e); }; @@ -78,13 +79,14 @@ class KviDynamicToolTip; class KVIRC_API KviIrcContextDisplay : public KviToolBarGraphicalApplet { Q_OBJECT + TQ_OBJECT public: - KviIrcContextDisplay(QWidget * par,const char * name = 0); + KviIrcContextDisplay(TQWidget * par,const char * name = 0); ~KviIrcContextDisplay(); protected: - virtual void drawContents(QPainter * p); + virtual void drawContents(TQPainter * p); protected slots: - void tipRequest(KviDynamicToolTip * tip,const QPoint &); + void tipRequest(KviDynamicToolTip * tip,const TQPoint &); }; diff --git a/src/kvirc/ui/kvi_ircview.cpp b/src/kvirc/ui/kvi_ircview.cpp index e09edee1..330ae099 100644 --- a/src/kvirc/ui/kvi_ircview.cpp +++ b/src/kvirc/ui/kvi_ircview.cpp @@ -61,7 +61,7 @@ // 25 Sep 2001 // This stuff is going to be ported to Windoze -// A conditionally compiled code will use only Qt calls...let's see :) +// A conditionally compiled code will use only TQt calls...let's see :) // @@ -108,47 +108,43 @@ #include "kvi_qcstring.h" // FIXME: #warning "There should be an option to preserve control codes in copied text (clipboard) (mIrc = CTRL+Copy->with colors)" -#include -#include -#include -#include -#include -#include // needed -#include +#include +#include +#include +#include +#include +#include // needed +#include #include "kvi_tal_popupmenu.h" -#include -#include -#include -#include +#include +#include +#include +#include -//#include // needed +//#include // needed // FIXME: #warning "There are problems with the selection and wrapped lines: you can select something on the first line and get the second highlighted" // FIXME: #warning "This hack is temporary...later remove it" -#if QT_VERSION >= 300 - #ifndef QT_CLEAN_NAMESPACE - #define QT_CLEAN_NAMESPACE - #include - #undef QT_CLEAN_NAMESPACE - #else - #include - #endif +#ifndef TQT_CLEAN_NAMESPACE + #define TQT_CLEAN_NAMESPACE + #include + #undef TQT_CLEAN_NAMESPACE #else - #include + #include #endif -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #ifdef COMPILE_USE_QT4 - #include - #define QMimeSourceFactory Q3MimeSourceFactory + #include + #define TQMimeSourceFactory Q3MimeSourceFactory #endif @@ -169,7 +165,7 @@ #define KVI_DEF_BACK 200 -// FIXME: #warning "The scrollbar should NOT have a fixed size : the KDE styles can configure the size (sizeHint() ?)" +// FIXME: #warning "The scrollbar should NOT have a fixed size : the KDE styles can configure the size (tqsizeHint() ?)" // // FIXME: PgUp and PgDn scrolls a fixed number of lines! @@ -189,7 +185,7 @@ #ifdef COMPILE_PSEUDO_TRANSPARENCY - extern QPixmap * g_pShadedChildGlobalDesktopBackground; + extern TQPixmap * g_pShadedChildGlobalDesktopBackground; #endif @@ -207,7 +203,7 @@ #define KVI_IRCVIEW_HORIZONTAL_BORDER 4 #define KVI_IRCVIEW_VERTICAL_BORDER 4 // A little bit more than the scroll-bar... -// Qt+X have strange interactions that I can not understand when I try to move the splitter +// TQt+X have strange interactions that I can not understand when I try to move the splitter // to the maximum on the left , Maybe the cache pixmap size becomes negative ? (I don't think so) // Anyway , when the scroll bar position becomes negative (or the IrcView has smaller width than // the scroll bar) X aborts with a funny @@ -238,25 +234,25 @@ #define KVI_IRCVIEW_ESCAPE_TAG_GENERICESCAPE '[' // FIXME: Get rid of this!!!!!!!!! -#define WSTRINGCONFIG_SAFE_TO_MEMCPY_QCHAR +#define WSTRINGCONFIG_SAFE_TO_MEMCPY_TQCHAR #define _WSTRING_WMEMCPY(_dst,_src,_len) kvi_fastmoveodd((void *)(_dst),(const void *)(_src),sizeof(kvi_wchar_t) * (_len)) -void kvi_appendWCharToQStringWithLength(QString * qstrptr,const kvi_wchar_t * ptr,kvi_wslen_t len) +void kvi_appendWCharToTQStringWithLength(TQString * qstrptr,const kvi_wchar_t * ptr,kvi_wslen_t len) { kvi_wslen_t oldLen = qstrptr->length(); qstrptr->setLength(oldLen + len); - #ifdef WSTRINGCONFIG_SAFE_TO_MEMCPY_QCHAR - _WSTRING_WMEMCPY(qstrptr->unicode() + oldLen,ptr,len); - #else // !WSTRINGCONFIG_SAFE_TO_MEMCPY_QCHAR - QChar * c = (qstrptr->unicode() + oldLen); + #ifdef WSTRINGCONFIG_SAFE_TO_MEMCPY_TQCHAR + _WSTRING_WMEMCPY(qstrptr->tqunicode() + oldLen,ptr,len); + #else // !WSTRINGCONFIG_SAFE_TO_MEMCPY_TQCHAR + TQChar * c = (qstrptr->tqunicode() + oldLen); while(*ptr) { - c->unicode() = *ptr; + c->tqunicode() = *ptr; ptr++; c++; } - #endif // !WSTRINGCONFIG_SAFE_TO_MEMCPY_QCHAR + #endif // !WSTRINGCONFIG_SAFE_TO_MEMCPY_TQCHAR } @@ -285,16 +281,16 @@ void kvi_appendWCharToQStringWithLength(QString * qstrptr,const kvi_wchar_t * pt // /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -KviIrcView::KviIrcView(QWidget *parent,KviFrame *pFrm,KviWindow *pWnd) -: QWidget(parent,"irc_view") +KviIrcView::KviIrcView(TQWidget *tqparent,KviFrame *pFrm,KviWindow *pWnd) +: TQWidget(tqparent,"irc_view") { // Ok...here we go // initialize the initializable #ifdef COMPILE_USE_QT4 - setAttribute(Qt::WA_NoSystemBackground); // This disables automatic qt double buffering - setAttribute(Qt::WA_OpaquePaintEvent); - //setAttribute(Qt::WA_PaintOnScreen); // disable qt backing store (that would force us to trigger repaint() instead of the 10 times faster paintEvent(0)) + setAttribute(TQt::WA_NoSystemBackground); // This disables automatic qt double buffering + setAttribute(TQt::WA_OpaquePaintEvent); + //setAttribute(TQt::WA_PaintOnScreen); // disable qt backing store (that would force us to trigger tqrepaint() instead of the 10 times faster paintEvent(0)) #endif m_iFlushTimer = 0; @@ -350,7 +346,7 @@ KviIrcView::KviIrcView(QWidget *parent,KviFrame *pFrm,KviWindow *pWnd) m_pMessagesStoppedWhileSelecting = new KviPointerList; m_pMessagesStoppedWhileSelecting->setAutoDelete(false); - // say qt to avoid erasing on repaint + // say qt to avoid erasing on tqrepaint #ifdef COMPILE_USE_QT4 setAutoFillBackground(false); #else @@ -363,9 +359,9 @@ KviIrcView::KviIrcView(QWidget *parent,KviFrame *pFrm,KviWindow *pWnd) // Create the scroll bar #ifdef COMPILE_USE_QT4 - m_pScrollBar = new QScrollBar(0,0,1,10,0,Qt::Vertical,this,"irc_view_scrollbar"); + m_pScrollBar = new TQScrollBar(0,0,1,10,0,Qt::Vertical,this,"irc_view_scrollbar"); #else - m_pScrollBar = new QScrollBar(0,0,1,10,0,QScrollBar::Vertical,this,"irc_view_scrollbar"); + m_pScrollBar = new TQScrollBar(0,0,1,10,0,Qt::Vertical,this,"irc_view_scrollbar"); #endif m_pScrollBar->setTracking(true); m_pScrollBar->show(); @@ -375,20 +371,20 @@ KviIrcView::KviIrcView(QWidget *parent,KviFrame *pFrm,KviWindow *pWnd) m_pToolsButton = new KviStyledToolButton(this,"btntools"); #ifdef COMPILE_USE_QT4 - QIcon is1(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_POPUPMENU))); + TQIcon is1(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_POPUPMENU))); m_pToolsButton->setAutoRaise(true); #else - QIconSet is1(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_POPUPMENU)),QIconSet::Small); + TQIconSet is1(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_POPUPMENU)),TQIconSet::Small); #endif m_pToolsButton->setIconSet(is1); KviTalToolTip::add(m_pToolsButton,__tr2qs("Search tools")); m_pToolsButton->setFocusProxy(this); - connect(m_pToolsButton,SIGNAL(clicked()),this,SLOT(showToolsPopup())); + connect(m_pToolsButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(showToolsPopup())); m_pToolsButton->show(); - connect(m_pScrollBar,SIGNAL(valueChanged(int)),this,SLOT(scrollBarPositionChanged(int))); + connect(m_pScrollBar,TQT_SIGNAL(valueChanged(int)),this,TQT_SLOT(scrollBarPositionChanged(int))); m_iLastScrollBarValue = 0; // set the minimum width @@ -454,7 +450,7 @@ KviIrcView::~KviIrcView() // /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -void KviIrcView::setFont(const QFont &f) +void KviIrcView::setFont(const TQFont &f) { if(m_pFm) { @@ -468,7 +464,7 @@ void KviIrcView::setFont(const QFont &f) l->iMaxLineWidth = -1; l = l->pNext; } - QWidget::setFont(f); + TQWidget::setFont(f); update(); } @@ -496,27 +492,27 @@ void KviIrcView::enableDnd(bool bEnable) m_bAcceptDrops = bEnable; } -void KviIrcView::dragEnterEvent(QDragEnterEvent *e) +void KviIrcView::dragEnterEvent(TQDragEnterEvent *e) { if(!m_bAcceptDrops)return; e->accept(KviUriDrag::canDecode(e)); emit dndEntered(); } -void KviIrcView::dropEvent(QDropEvent *e) +void KviIrcView::dropEvent(TQDropEvent *e) { if(!m_bAcceptDrops)return; - QStringList list; + TQStringList list; if(KviUriDrag::decodeLocalFiles(e,list)) { if(!list.isEmpty()) { - QStringList::ConstIterator it = list.begin(); //kewl ! :) + TQStringList::ConstIterator it = list.begin(); //kewl ! :) for( ; it != list.end(); ++it ) { - QString tmp = *it; //wow :) + TQString tmp = *it; //wow :) #ifndef COMPILE_ON_WINDOWS - if(tmp[0] != '/')tmp.prepend("/"); //HACK HACK HACK for Qt bug (?!?) + if(tmp[0] != '/')tmp.prepend("/"); //HACK HACK HACK for TQt bug (?!?) #endif emit fileDropped(tmp); } @@ -535,8 +531,8 @@ void KviIrcView::stopLogging() { if(m_pLogFile) { - QString szLogEnd; - szLogEnd.sprintf(__tr2qs("### Log session terminated at %s ###"),QDateTime::currentDateTime().toString().utf8().data()); + TQString szLogEnd; + szLogEnd.sprintf(__tr2qs("### Log session terminated at %s ###"),TQDateTime::tqcurrentDateTime().toString().utf8().data()); add2Log(szLogEnd); m_pLogFile->close(); @@ -545,12 +541,12 @@ void KviIrcView::stopLogging() { if(m_pLogFile->open(IO_ReadOnly)) { - QByteArray bytes; + TQByteArray bytes; bytes=m_pLogFile->readAll(); m_pLogFile->close(); - QFileInfo fi(*m_pLogFile); - QString szFname=fi.dirPath(true)+QString("/")+fi.baseName(true); - gzFile file=gzopen(QTextCodec::codecForLocale()->fromUnicode(szFname).data(),"ab9"); + TQFileInfo fi(*m_pLogFile); + TQString szFname=fi.dirPath(true)+TQString("/")+fi.baseName(true); + gzFile file=gzopen(TQTextCodec::codecForLocale()->fromUnicode(szFname).data(),"ab9"); if(file) { gzwrite(file,bytes.data(),bytes.size()); @@ -572,12 +568,12 @@ void KviIrcView::getLogFileName(KviStr &buffer) if(m_pLogFile)buffer.append(m_pLogFile->name()); } -void KviIrcView::getLogFileName(QString &buffer) +void KviIrcView::getLogFileName(TQString &buffer) { if(m_pLogFile) buffer=m_pLogFile->name(); } -void KviIrcView::getTextBuffer(QString &buffer) +void KviIrcView::getTextBuffer(TQString &buffer) { // FIXME: #warning "This does not merge the KviChannel::m_pMessageView buffer!" buffer = ""; @@ -598,12 +594,12 @@ void KviIrcView::flushLog() m_pLogFile->close(); if(m_pLogFile->open(IO_ReadOnly)) { - QByteArray bytes; + TQByteArray bytes; bytes=m_pLogFile->readAll(); m_pLogFile->close(); - QFileInfo fi(*m_pLogFile); - QString szFname=fi.dirPath(true)+QString("/")+fi.baseName(true); - gzFile file=gzopen(QTextCodec::codecForLocale()->fromUnicode(szFname).data(),"ab9"); + TQFileInfo fi(*m_pLogFile); + TQString szFname=fi.dirPath(true)+TQString("/")+fi.baseName(true); + gzFile file=gzopen(TQTextCodec::codecForLocale()->fromUnicode(szFname).data(),"ab9"); if(file) { gzwrite(file,bytes.data(),bytes.size()); @@ -621,7 +617,7 @@ void KviIrcView::flushLog() else if(m_pMasterView)m_pMasterView->flushLog(); } -const QString & KviIrcView::lastMessageText() +const TQString & KviIrcView::lastMessageText() { KviIrcViewLine * pCur=m_pLastLine; while(pCur) @@ -640,12 +636,12 @@ const QString & KviIrcView::lastMessageText() } pCur=pCur->pPrev; } - return KviQString::empty; + return KviTQString::empty; } -const QString & KviIrcView::lastLineOfText() +const TQString & KviIrcView::lastLineOfText() { - if(!m_pLastLine)return KviQString::empty; + if(!m_pLastLine)return KviTQString::empty; return m_pLastLine->szText; } @@ -664,9 +660,9 @@ const QString & KviIrcView::lastLineOfText() void KviIrcView::setMasterView(KviIrcView * v) { - if(m_pMasterView)disconnect(this,SLOT(masterDead())); + if(m_pMasterView)disconnect(this,TQT_SLOT(masterDead())); m_pMasterView = v; - if(m_pMasterView)connect(m_pMasterView,SIGNAL(destroyed()),this,SLOT(masterDead())); + if(m_pMasterView)connect(m_pMasterView,TQT_SIGNAL(destroyed()),this,TQT_SLOT(masterDead())); } void KviIrcView::masterDead() @@ -674,10 +670,10 @@ void KviIrcView::masterDead() m_pMasterView = 0; } -bool KviIrcView::startLogging(const QString& fname,bool bPrependCurBuffer) +bool KviIrcView::startLogging(const TQString& fname,bool bPrependCurBuffer) { stopLogging(); - QString szFname(fname); + TQString szFname(fname); if(fname.isEmpty()) { @@ -690,7 +686,7 @@ bool KviIrcView::startLogging(const QString& fname,bool bPrependCurBuffer) szFname+=".tmp"; #endif - m_pLogFile = new QFile(szFname); + m_pLogFile = new TQFile(szFname); if(m_pLogFile->exists()) { @@ -709,13 +705,13 @@ bool KviIrcView::startLogging(const QString& fname,bool bPrependCurBuffer) } } - QString szLogStart; - szLogStart.sprintf(__tr2qs("### Log session started at %s ###"),QDateTime::currentDateTime().toString().utf8().data()); + TQString szLogStart; + szLogStart.sprintf(__tr2qs("### Log session started at %s ###"),TQDateTime::tqcurrentDateTime().toString().utf8().data()); add2Log(szLogStart); if(bPrependCurBuffer) { add2Log(__tr2qs("### Existing data buffer:")); - QString buffer; + TQString buffer; getTextBuffer(buffer); add2Log(buffer); add2Log(__tr2qs("### End of existing data buffer.")); @@ -725,10 +721,10 @@ bool KviIrcView::startLogging(const QString& fname,bool bPrependCurBuffer) return true; } -void KviIrcView::add2Log(const QString &szBuffer,int iMsgType) +void KviIrcView::add2Log(const TQString &szBuffer,int iMsgType) { - QString szToWrite=QString("%1 %2\n").arg(iMsgType).arg(szBuffer); - KviQCString szTmp = KviQString::toUtf8(szToWrite); + TQString szToWrite=TQString("%1 %2\n").tqarg(iMsgType).tqarg(szBuffer); + KviTQCString szTmp = KviTQString::toUtf8(szToWrite); if(m_pLogFile->writeBlock(szTmp.data(),szTmp.length())==-1) debug("WARNING : Can not write to the log file."); } @@ -762,11 +758,11 @@ void KviIrcView::clearBuffer() bool KviIrcView::saveBuffer(const char *filename) { - QFile f(QString::fromUtf8(filename)); + TQFile f(TQString::fromUtf8(filename)); if(!f.open(IO_WriteOnly|IO_Truncate))return false; - QString tmp; + TQString tmp; getTextBuffer(tmp); - KviQCString tmpx = KviQString::toUtf8(tmp); + KviTQCString tmpx = KviTQString::toUtf8(tmp); f.writeBlock(tmpx.data(),tmpx.length()); f.close(); return true; @@ -777,14 +773,14 @@ void KviIrcView::nextLine(){ m_pScrollBar->addLine(); } void KviIrcView::prevPage(){ m_pScrollBar->subtractPage(); } void KviIrcView::nextPage(){ m_pScrollBar->addPage(); } -void KviIrcView::setPrivateBackgroundPixmap(const QPixmap &pixmap,bool bRepaint) +void KviIrcView::setPrivateBackgroundPixmap(const TQPixmap &pixmap,bool bRepaint) { if(m_pPrivateBackgroundPixmap) { delete m_pPrivateBackgroundPixmap; m_pPrivateBackgroundPixmap=0; } - if(!pixmap.isNull())m_pPrivateBackgroundPixmap = new QPixmap(pixmap); + if(!pixmap.isNull())m_pPrivateBackgroundPixmap = new TQPixmap(pixmap); if(bRepaint) update(); @@ -807,7 +803,7 @@ void KviIrcView::clearLineMark(bool bRepaint) void KviIrcView::checkLogDate() { - QDate::currentDate(); + TQDate::tqcurrentDate(); } void KviIrcView::clearUnreaded() @@ -904,31 +900,31 @@ void KviIrcView::scrollBarPositionChanged(int newValue) } } if(!m_bSkipScrollBarRepaint) - repaint(); + tqrepaint(); //update(); // if(!m_bSkipScrollBarRepaint)postUpdateEvent(); } -bool KviIrcView::event(QEvent *e) +bool KviIrcView::event(TQEvent *e) { - if(e->type() == QEvent::User) + if(e->type() == TQEvent::User) { __range_valid(m_bPostedPaintEventPending); if(m_iUnprocessedPaintEventRequests) - repaint(); + tqrepaint(); // else we just had a pointEvent that did the job m_bPostedPaintEventPending = false; return true; } - return QWidget::event(e); + return TQWidget::event(e); } -void KviIrcView::wheelEvent(QWheelEvent *e) +void KviIrcView::wheelEvent(TQWheelEvent *e) { #ifdef COMPILE_USE_QT4 static bool bHere = false; if(bHere)return; - bHere = true; // Qt4 tends to jump into infinite recursion here + bHere = true; // TQt4 tends to jump into infinite recursion here #endif g_pApp->sendEvent(m_pScrollBar,e); #ifdef COMPILE_USE_QT4 @@ -939,12 +935,12 @@ void KviIrcView::wheelEvent(QWheelEvent *e) void KviIrcView::postUpdateEvent() { - // This will post a QEvent with a full repaint request + // This will post a TQEvent with a full tqrepaint request if(!m_bPostedPaintEventPending) { m_bPostedPaintEventPending = true; - QEvent *e = new QEvent(QEvent::User); - g_pApp->postEvent(this,e); // queue a repaint + TQEvent *e = new TQEvent(TQEvent::User); + g_pApp->postEvent(this,e); // queue a tqrepaint } m_iUnprocessedPaintEventRequests++; // paintEvent() will set it to 0 @@ -960,7 +956,7 @@ void KviIrcView::postUpdateEvent() fastScroll(3); #endif else - repaint(); + tqrepaint(); } } @@ -1097,7 +1093,7 @@ void KviIrcView::removeHeadLine(bool bRepaint) m_pLastLine = 0; } if(bRepaint) - repaint(); + tqrepaint(); } void KviIrcView::splitMessagesTo(KviIrcView *v) @@ -1154,12 +1150,12 @@ void KviIrcView::splitMessagesTo(KviIrcView *v) m_pScrollBar->setRange(0,m_iNumLines); m_pScrollBar->setValue(m_iNumLines); - repaint(); + tqrepaint(); v->m_iLastScrollBarValue = v->m_iNumLines; v->m_pScrollBar->setRange(0,v->m_iNumLines); v->m_pScrollBar->setValue(v->m_iNumLines); - v->repaint(); + v->tqrepaint(); } @@ -1187,7 +1183,7 @@ void KviIrcView::appendMessagesFrom(KviIrcView *v) m_pScrollBar->setRange(0,m_iNumLines); m_pScrollBar->setValue(m_iNumLines); - repaint(); + tqrepaint(); } void KviIrcView::joinMessagesFrom(KviIrcView *v) @@ -1247,7 +1243,7 @@ void KviIrcView::joinMessagesFrom(KviIrcView *v) m_pScrollBar->setRange(0,m_iNumLines); m_pScrollBar->setValue(m_iNumLines); - repaint(); + tqrepaint(); } void KviIrcView::appendText(int iMsgType,const kvi_wchar_t *data_ptr,int iFlags) @@ -1266,9 +1262,9 @@ void KviIrcView::appendText(int iMsgType,const kvi_wchar_t *data_ptr,int iFlags) if(!KVI_OPTION_BOOL(KviOption_boolStripControlCodesInLogs)) { - QString szBuffer; - kvi_appendWCharToQStringWithLength(&szBuffer,data_ptr,kvi_wstrlen(data_ptr)); - szBuffer.prepend(QDateTime::currentDateTime().toString("[h:mm:ss] ")); + TQString szBuffer; + kvi_appendWCharToTQStringWithLength(&szBuffer,data_ptr,kvi_wstrlen(data_ptr)); + szBuffer.prepend(TQDateTime::tqcurrentDateTime().toString("[h:mm:ss] ")); if(m_pLogFile && KVI_OPTION_MSGTYPE(iMsgType).logEnabled()) { add2Log(szBuffer,iMsgType); @@ -1303,15 +1299,15 @@ void KviIrcView::appendText(int iMsgType,const kvi_wchar_t *data_ptr,int iFlags) } -void KviIrcView::getLinkEscapeCommand(QString &buffer,const QString &szPayload,const QString &escape_label) +void KviIrcView::getLinkEscapeCommand(TQString &buffer,const TQString &szPayload,const TQString &escape_label) { if(szPayload.isEmpty())return; - int idx = szPayload.find(escape_label); + int idx = szPayload.tqfind(escape_label); if(idx == -1)return; idx += escape_label.length(); - int idx2 = szPayload.find("[!",idx); + int idx2 = szPayload.tqfind("[!",idx); int len = idx2 == -1 ? szPayload.length() - idx : idx2 - idx; buffer = szPayload.mid(idx,len); @@ -1922,12 +1918,12 @@ const kvi_wchar_t * KviIrcView::getTextLine(int iMsgType, line_ptr->pChunks[0].iTextStart = 0; line_ptr->pChunks[0].colors.back = KVI_OPTION_MSGTYPE(iMsgType).back(); line_ptr->pChunks[0].colors.fore = KVI_OPTION_MSGTYPE(iMsgType).fore(); - line_ptr->pChunks[0].customFore=QColor(); + line_ptr->pChunks[0].customFore=TQColor(); if(bEnableTimeStamp && KVI_OPTION_BOOL(KviOption_boolIrcViewTimestamp)) { - QString szTimestamp; - szTimestamp=QDateTime::currentDateTime ( + TQString szTimestamp; + szTimestamp=TQDateTime::tqcurrentDateTime ( KVI_OPTION_BOOL(KviOption_boolIrcViewTimestampUTC) ? Qt::UTC : Qt::LocalTime ).toString( KVI_OPTION_STRING(KviOption_stringIrcViewTimestampFormat) ); szTimestamp.append(' '); @@ -1954,7 +1950,7 @@ const kvi_wchar_t * KviIrcView::getTextLine(int iMsgType, line_ptr->pChunks[2].iTextLen = 1; line_ptr->pChunks[2].colors.back = KVI_OPTION_MSGTYPE(iMsgType).back(); line_ptr->pChunks[2].colors.fore = KVI_OPTION_MSGTYPE(iMsgType).fore(); - line_ptr->pChunks[2].customFore=QColor(); + line_ptr->pChunks[2].customFore=TQColor(); iCurChunk+=2; } else { // only one chunk @@ -1968,8 +1964,8 @@ const kvi_wchar_t * KviIrcView::getTextLine(int iMsgType, iTextIdx = iTimeStampLength; // the rest of the string will begin 11 chars later // throw away const: we WANT to set the chars :D - register QChar * data_ptr_aux = (QChar *)line_ptr->szText.unicode(); - register QChar * stamp_ptr_aux = (QChar *)szTimestamp.unicode(); + register TQChar * data_ptr_aux = (TQChar *)line_ptr->szText.tqunicode(); + register TQChar * stamp_ptr_aux = (TQChar *)szTimestamp.tqunicode(); for(int i=0;ipChunks[iCurChunk].iTextLen += blockLen; \ - kvi_appendWCharToQStringWithLength(&(line_ptr->szText),__data_ptr,__data_len); \ + kvi_appendWCharToTQStringWithLength(&(line_ptr->szText),__data_ptr,__data_len); \ iTextIdx+=blockLen; #define APPEND_LAST_TEXT_BLOCK_HIDDEN_FROM_NOW(__data_ptr,__data_len) \ blockLen = (__data_len); \ - kvi_appendWCharToQStringWithLength(&(line_ptr->szText),__data_ptr,__data_len); \ + kvi_appendWCharToTQStringWithLength(&(line_ptr->szText),__data_ptr,__data_len); \ iTextIdx+=blockLen; @@ -2007,7 +2003,7 @@ const kvi_wchar_t * KviIrcView::getTextLine(int iMsgType, line_ptr->pChunks[iCurChunk].type = _chunk_type; \ line_ptr->pChunks[iCurChunk].iTextStart = iTextIdx; \ line_ptr->pChunks[iCurChunk].iTextLen = 0; \ - line_ptr->pChunks[iCurChunk].customFore=iCurChunk ? line_ptr->pChunks[iCurChunk-1].customFore : QColor(); + line_ptr->pChunks[iCurChunk].customFore=iCurChunk ? line_ptr->pChunks[iCurChunk-1].customFore : TQColor(); // EOF Macros @@ -2132,7 +2128,7 @@ highlighting_check_loop: // yet more optimized if(*((unsigned short *)p) < 0xff) if(void * jmp_address = char_to_check_jump_table[*((unsigned short *)p)])goto *jmp_address; - // goto *(char_to_check_jump_table[*((unsigned char *)p)]); <--- replace 0 with ¬hing_found + // goto *(char_to_check_jump_table[*((unsigned char *)p)]); <--- tqreplace 0 with ¬hing_found //nothing_found: p++; goto highlighting_check_loop; @@ -2281,7 +2277,7 @@ found_command_escape: { if(line_ptr->pChunks[iCurChunk].szPayload[1]=='c' && ((KviChannel*)m_pKviWindow)->userListView()) { - KviUserListEntry *e = ((KviChannel*)m_pKviWindow)->userListView()->findEntry(QString((QChar*)next_cr,term_cr-next_cr)); + KviUserListEntry *e = ((KviChannel*)m_pKviWindow)->userListView()->findEntry(TQString((TQChar*)next_cr,term_cr-next_cr)); if(e) { line_ptr->pChunks[iCurChunk].colors.fore = KVI_COLOR_CUSTOM; e->color(line_ptr->pChunks[iCurChunk].customFore); @@ -2289,9 +2285,9 @@ found_command_escape: } } } - else if(m_pKviWindow->type()==KVI_WINDOW_TYPE_QUERY && m_pKviWindow && line_ptr->pChunks[iCurChunk].szPayload[1]=='c') + else if(m_pKviWindow->type()==KVI_WINDOW_TYPE_TQUERY && m_pKviWindow && line_ptr->pChunks[iCurChunk].szPayload[1]=='c') { - QString m_szNick = QString((QChar*)next_cr,term_cr-next_cr); + TQString m_szNick = TQString((TQChar*)next_cr,term_cr-next_cr); if(m_szNick==m_pKviWindow->connection()->currentNickName()) { line_ptr->pChunks[iCurChunk].colors.fore = KVI_COLOR_OWN; bColorSetted=true; @@ -2340,7 +2336,7 @@ found_icon_escape: // throw away constness! *((kvi_wchar_t *)p) = 0; // FIXME: this has to be changed! : lookupTextIcon must use wide characters! - QString tmpQ; + TQString tmpQ; tmpQ.setUnicodeCodes(icon_name,datalen); KviTextIcon * icon = g_pTextIconManager->lookupTextIcon(tmpQ); // throw away constness! @@ -2560,7 +2556,7 @@ got_url: if(m_pKviWindow) { - QString tmp; + TQString tmp; tmp.setUnicodeCodes(data_ptr,p-data_ptr); KVS_TRIGGER_EVENT_1(KviEvent_OnUrl,m_pKviWindow,tmp); } @@ -2590,10 +2586,10 @@ check_emoticon_char: case KVI_OUT_CHANPRIVMSG: case KVI_OUT_ACTION: case KVI_OUT_OWNPRIVMSG: - case KVI_OUT_QUERYPRIVMSG: - case KVI_OUT_QUERYPRIVMSGCRYPTED: - case KVI_OUT_QUERYNOTICE: - case KVI_OUT_QUERYNOTICECRYPTED: + case KVI_OUT_TQUERYPRIVMSG: + case KVI_OUT_TQUERYPRIVMSGCRYPTED: + case KVI_OUT_TQUERYNOTICE: + case KVI_OUT_TQUERYNOTICECRYPTED: case KVI_OUT_CHANPRIVMSGCRYPTED: case KVI_OUT_CHANNELNOTICE: case KVI_OUT_CHANNELNOTICECRYPTED: @@ -2602,7 +2598,7 @@ check_emoticon_char: case KVI_OUT_DCCCHATMSG: { // Pragma: 31.05.2002 : I had to kill the 8 prefix - // It happens really too often to have an 8 followed by a parenthesis + // It happens really too often to have an 8 followed by a tqparenthesis // that is not an emoticon // *begin can be one of ':' , ';' , '=' @@ -2641,7 +2637,7 @@ check_emoticon_char: // We lookup simplified versions of the emoticons... // FIXME: this sould become UNICODE!!! - QString lookupstring; + TQString lookupstring; kvi_wchar_t ng[3]; ng[0] = *begin; ng[1] = *item; @@ -2717,13 +2713,13 @@ void KviIrcView::fastScroll(int lines) if(!m_pFm) { // We must get the metrics from a real paint event :/ - // must do a full repaint to get them... - repaint(); + // must do a full tqrepaint to get them... + tqrepaint(); return; } // Ok...the current line is the last one here - // It is the only one that needs to be repainted + // It is the only one that needs to be tqrepainted int widgetWidth = width()-m_pScrollBar->width(); if(widgetWidth < KVI_IRCVIEW_PIXMAP_SEPARATOR_AND_DOUBLEBORDER_WIDTH+10)return; //can't show stuff here int widgetHeight = height(); @@ -2751,14 +2747,14 @@ void KviIrcView::fastScroll(int lines) } #ifdef COMPILE_USE_QT4 - scroll(0,-(heightToPaint-1),QRect(1,1,widgetWidth-2,widgetHeight-2)); + scroll(0,-(heightToPaint-1),TQRect(1,1,widgetWidth-2,widgetHeight-2)); #else bitBlt(this,1,1,this,1,heightToPaint,widgetWidth -2,widgetHeight - (heightToPaint + KVI_IRCVIEW_VERTICAL_BORDER)); - QRect r(0,widgetHeight - (heightToPaint + KVI_IRCVIEW_VERTICAL_BORDER), + TQRect r(0,widgetHeight - (heightToPaint + KVI_IRCVIEW_VERTICAL_BORDER), widgetWidth,heightToPaint + KVI_IRCVIEW_VERTICAL_BORDER); - QPaintEvent * e = new QPaintEvent(r); + TQPaintEvent * e = new TQPaintEvent(r); paintEvent(e); delete e; #endif @@ -2782,7 +2778,7 @@ void KviIrcView::fastScroll(int lines) // /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -void KviIrcView::paintEvent(QPaintEvent *p) +void KviIrcView::paintEvent(TQPaintEvent *p) { // // THIS FUNCTION IS A MONSTER @@ -2792,7 +2788,7 @@ void KviIrcView::paintEvent(QPaintEvent *p) int widgetWidth = width() - scrollbarWidth; if(!isVisible() || (widgetWidth < 20)) { - m_iUnprocessedPaintEventRequests = 0; // assume a full repaint when this widget is shown... + m_iUnprocessedPaintEventRequests = 0; // assume a full tqrepaint when this widget is shown... return; //can't show stuff here } @@ -2804,22 +2800,22 @@ void KviIrcView::paintEvent(QPaintEvent *p) (m_pKviWindow->mdiParent() != g_pFrame->mdiManager()->topChild()) && (m_pKviWindow->mdiParent())) { - m_iUnprocessedPaintEventRequests = 0; // assume a full repaint when this widget is shown... + m_iUnprocessedPaintEventRequests = 0; // assume a full tqrepaint when this widget is shown... return; // totally hidden behind other windows } int widgetHeight = height(); - static QRect r; // static: avoid calling constructor and destructor every time... + static TQRect r; // static: avoid calling constructor and destructor every time... if(p) { r=p->rect(); // app triggered , or self triggered from fastScroll (in that case m_iUnprocessedPaintEventRequests is set to 0 there) if(r == rect()) - m_iUnprocessedPaintEventRequests = 0; // only full repaints reset + m_iUnprocessedPaintEventRequests = 0; // only full tqrepaints reset } else { // A self triggered event - m_iUnprocessedPaintEventRequests = 0; // only full repaints reset + m_iUnprocessedPaintEventRequests = 0; // only full tqrepaints reset r = rect(); } @@ -2831,32 +2827,32 @@ void KviIrcView::paintEvent(QPaintEvent *p) if(rectWidth > widgetWidth)rectWidth = widgetWidth; #ifdef COMPILE_USE_QT4 - QPainter pa(this); // we use qt4 double buffering + TQPainter pa(this); // we use qt4 double buffering #else KviDoubleBuffer doublebuffer(width(),height()); - QPixmap * pDoubleBufferPixmap = doublebuffer.pixmap(); + TQPixmap * pDoubleBufferPixmap = doublebuffer.pixmap(); - QPainter pa(pDoubleBufferPixmap); + TQPainter pa(pDoubleBufferPixmap); #endif SET_ANTI_ALIASING(pa); pa.setFont(font()); if(!m_pFm) { - // note that QFontMetrics(pa.font()) may be not the same as QFontMetrics(font()) - // because the painter might effectively use an approximation of the QFont specified + // note that TQFontMetrics(pa.font()) may be not the same as TQFontMetrics(font()) + // because the painter might effectively use an approximation of the TQFont specified // by font(). - recalcFontVariables(QFontMetrics(pa.font()),pa.fontInfo()); + recalcFontVariables(TQFontMetrics(pa.font()),pa.fontInfo()); } #ifdef COMPILE_PSEUDO_TRANSPARENCY if(g_pShadedChildGlobalDesktopBackground) { - QPoint pnt = mapToGlobal(QPoint(rectLeft,rectTop)); + TQPoint pnt = mapToGlobal(TQPoint(rectLeft,rectTop)); pa.drawTiledPixmap(rectLeft,rectTop,rectWidth,rectHeight,*g_pShadedChildGlobalDesktopBackground,pnt.x(),pnt.y()); } else { #endif - QPixmap * pix = m_pPrivateBackgroundPixmap; + TQPixmap * pix = m_pPrivateBackgroundPixmap; if(!pix) pix = KVI_OPTION_PIXMAP(KviOption_pixmapIrcViewBackground).pixmap(); @@ -2924,7 +2920,7 @@ void KviIrcView::paintEvent(QPaintEvent *p) //Calculate the position of the image //imageYPos = curBottomCoord - (pixmapHeight(16) + ((m_iFontLineSpacing - 16)/2) ); int imageYPos = curBottomCoord - m_iRelativePixmapY; - //Set the mask if needed + //Set the tqmask if needed int iPixId = KVI_OPTION_MSGTYPE(pCurTextLine->iMsgType).pixId(); if(iPixId > 0) pa.drawPixmap(KVI_IRCVIEW_HORIZONTAL_BORDER,imageYPos,*(g_pIconManager->getSmallIcon(iPixId))); @@ -3124,7 +3120,7 @@ void KviIrcView::paintEvent(QPaintEvent *p) } #define DRAW_SELECTED_TEXT(_text_str,_text_idx,_text_len,_text_width) \ - SET_PEN(KVI_OPTION_MSGTYPE(KVI_OUT_SELECT).fore(),block->pChunk ? block->pChunk->customFore : QColor()); \ + SET_PEN(KVI_OPTION_MSGTYPE(KVI_OUT_SELECT).fore(),block->pChunk ? block->pChunk->customFore : TQColor()); \ { \ int theWdth = _text_width; \ if(theWdth < 0) \ @@ -3136,7 +3132,7 @@ void KviIrcView::paintEvent(QPaintEvent *p) curLeftCoord += _text_width; #define DRAW_NORMAL_TEXT(_text_str,_text_idx,_text_len,_text_width) \ - SET_PEN(curFore,block->pChunk ? block->pChunk->customFore : QColor()); \ + SET_PEN(curFore,block->pChunk ? block->pChunk->customFore : TQColor()); \ if(curBack != KVI_TRANSPARENT){ \ int theWdth = _text_width; \ if(theWdth < 0) \ @@ -3176,20 +3172,20 @@ void KviIrcView::paintEvent(QPaintEvent *p) case KVI_TEXT_UNDERLINE: case KVI_TEXT_REVERSE: case KVI_TEXT_RESET: - m_szLastSelectionLine.append(QChar(block->pChunk->type)); + m_szLastSelectionLine.append(TQChar(block->pChunk->type)); break; case KVI_TEXT_COLOR: - m_szLastSelectionLine.append(QChar(block->pChunk->type)); + m_szLastSelectionLine.append(TQChar(block->pChunk->type)); if((block->pChunk->colors.fore != KVI_NOCHANGE) && (block->pChunk->colors.fore != KVI_TRANSPARENT)) { - if(curFore > 9)m_szLastSelectionLine.append(QChar('1')); - m_szLastSelectionLine.append(QChar((curFore%10)+'0')); + if(curFore > 9)m_szLastSelectionLine.append(TQChar('1')); + m_szLastSelectionLine.append(TQChar((curFore%10)+'0')); } if((block->pChunk->colors.back != KVI_NOCHANGE) && (block->pChunk->colors.back != KVI_TRANSPARENT) ) { - m_szLastSelectionLine.append(QChar(',')); - if(curBack > 9)m_szLastSelectionLine.append(QChar('1')); - m_szLastSelectionLine.append(QChar((curBack%10)+'0')); + m_szLastSelectionLine.append(TQChar(',')); + if(curBack > 9)m_szLastSelectionLine.append(TQChar('1')); + m_szLastSelectionLine.append(TQChar((curBack%10)+'0')); } break; } @@ -3234,8 +3230,8 @@ void KviIrcView::paintEvent(QPaintEvent *p) if(theWdth < 0)theWdth=width()-(curLeftCoord+KVI_IRCVIEW_HORIZONTAL_BORDER+scrollbarWidth); pa.fillRect(curLeftCoord,curBottomCoord - m_iFontLineSpacing + m_iFontDescent,theWdth,m_iFontLineSpacing,KVI_OPTION_MIRCCOLOR(KVI_OPTION_MSGTYPE(KVI_OUT_SELECT).back())); kvi_wslen_t the_len = kvi_wstrlen(block->pChunk->szPayload); - m_szLastSelectionLine.append(QChar(block->pChunk->type)); - QString tmp; + m_szLastSelectionLine.append(TQChar(block->pChunk->type)); + TQString tmp; tmp.setUnicodeCodes(block->pChunk->szPayload,the_len); m_szLastSelectionLine.append(tmp); goto no_selection_paint; @@ -3267,14 +3263,14 @@ no_selection_paint: int wdth = block->block_width; if(wdth < 0)wdth = widgetWidth - (curLeftCoord + KVI_IRCVIEW_HORIZONTAL_BORDER); int imageYPos = curBottomCoord - m_iRelativePixmapY; - //Set the mask if needed + //Set the tqmask if needed if(curBack != KVI_TRANSPARENT && curBack < 16) { pa.fillRect(curLeftCoord,curBottomCoord - m_iFontLineSpacing + m_iFontDescent,wdth,m_iFontLineSpacing,KVI_OPTION_MIRCCOLOR((unsigned char)curBack)); } - QString tmpQ; + TQString tmpQ; tmpQ.setUnicodeCodes(block->pChunk->szSmileId,kvi_wstrlen(block->pChunk->szSmileId)); - QPixmap * daIcon =0; + TQPixmap * daIcon =0; KviTextIcon* pIcon = g_pTextIconManager->lookupTextIcon(tmpQ); if(pIcon) { @@ -3301,7 +3297,7 @@ no_selection_paint: // FIXME: We could avoid this XSetForeground if the curFore was not changed.... - SET_PEN(curFore,block->pChunk ? block->pChunk->customFore : QColor()); + SET_PEN(curFore,block->pChunk ? block->pChunk->customFore : TQColor()); if(curBack != KVI_TRANSPARENT && curBack < 16 ) { @@ -3310,7 +3306,7 @@ no_selection_paint: if(curLink) { - SET_PEN(KVI_OPTION_MSGTYPE(KVI_OUT_LINK).fore(),block->pChunk ? block->pChunk->customFore : QColor()); + SET_PEN(KVI_OPTION_MSGTYPE(KVI_OUT_LINK).fore(),block->pChunk ? block->pChunk->customFore : TQColor()); pa.drawText(curLeftCoord,curBottomCoord,pCurTextLine->szText,block->block_start,block->block_len); pa.drawText(curLeftCoord+1,curBottomCoord,pCurTextLine->szText,block->block_start,block->block_len); pa.drawLine(curLeftCoord,curBottomCoord+2,curLeftCoord+wdth,curBottomCoord+2); @@ -3337,13 +3333,13 @@ no_selection_paint: // paint the cursor line int iH = lineWrapsHeight + m_iFontLineSpacing; #ifdef COMPILE_USE_QT4 - pa.setCompositionMode(QPainter::CompositionMode_SourceOut); + pa.setCompositionMode(TQPainter::CompositionMode_SourceOut); #else pa.setRasterOp(NotROP); #endif - pa.fillRect(0,curBottomCoord - iH,widgetWidth,iH + (m_iFontDescent << 1),Qt::black); + pa.fillRect(0,curBottomCoord - iH,widgetWidth,iH + (m_iFontDescent << 1),TQt::black); #ifdef COMPILE_USE_QT4 - pa.setCompositionMode(QPainter::CompositionMode_SourceOver); + pa.setCompositionMode(TQPainter::CompositionMode_SourceOver); #else pa.setRasterOp(CopyROP); #endif @@ -3369,9 +3365,9 @@ no_selection_paint: bLineMarkPainted = true; //pa.setRasterOp(NotROP); #ifdef COMPILE_USE_QT4 - pa.setPen(QPen(KVI_OPTION_COLOR(KviOption_colorIrcViewMarkLine),1,Qt::DotLine)); + pa.setPen(TQPen(KVI_OPTION_COLOR(KviOption_colorIrcViewMarkLine),1,TQt::DotLine)); #else - pa.setPen(QPen(KVI_OPTION_COLOR(KviOption_colorIrcViewMarkLine),1,QPen::DotLine)); + pa.setPen(TQPen(KVI_OPTION_COLOR(KviOption_colorIrcViewMarkLine),1,TQPen::DotLine)); #endif pa.drawLine(0,curBottomCoord,widgetWidth,curBottomCoord); //pa.setRasterOp(CopyROP); @@ -3413,11 +3409,11 @@ no_selection_paint: { // need to mark it! //pa.setRasterOp(NotROP); - //pa.setPen(Qt::black); + //pa.setPen(TQt::black); #ifdef COMPILE_USE_QT4 - pa.setPen(QPen(KVI_OPTION_COLOR(KviOption_colorIrcViewMarkLine),1,Qt::DotLine)); + pa.setPen(TQPen(KVI_OPTION_COLOR(KviOption_colorIrcViewMarkLine),1,TQt::DotLine)); #else - pa.setPen(QPen(KVI_OPTION_COLOR(KviOption_colorIrcViewMarkLine),1,QPen::DotLine)); + pa.setPen(TQPen(KVI_OPTION_COLOR(KviOption_colorIrcViewMarkLine),1,TQPen::DotLine)); #endif int x = widgetWidth - 8; int y = KVI_IRCVIEW_VERTICAL_BORDER; @@ -3432,19 +3428,19 @@ no_selection_paint: } //Need to draw the sunken rect around the view now... - pa.setPen(colorGroup().dark()); + pa.setPen(tqcolorGroup().dark()); pa.drawLine(0,0,widgetWidth,0); pa.drawLine(0,0,0,widgetHeight); - pa.setPen(colorGroup().light()); + pa.setPen(tqcolorGroup().light()); widgetWidth--; pa.drawLine(1,widgetHeight-1,widgetWidth,widgetHeight-1); pa.drawLine(widgetWidth,1,widgetWidth,widgetHeight); // COPY TO THE DISPLAY #ifndef COMPILE_USE_QT4 - bitBlt(this,rectLeft,rectTop,pDoubleBufferPixmap,rectLeft,rectTop,rectWidth,rectHeight,Qt::CopyROP); + bitBlt(this,rectLeft,rectTop,pDoubleBufferPixmap,rectLeft,rectTop,rectWidth,rectHeight,TQt::CopyROP); #endif -// else we use the Qt4 native double buffering +// else we use the TQt4 native double buffering } /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -3453,7 +3449,7 @@ no_selection_paint: // /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#define IRCVIEW_WCHARWIDTH(__c) (((__c).unicode() < 0xff) ? m_iFontCharacterWidth[(__c).unicode()] : m_pFm->width(__c)) +#define IRCVIEW_WCHARWIDTH(__c) (((__c).tqunicode() < 0xff) ? m_iFontCharacterWidth[(__c).tqunicode()] : m_pFm->width(__c)) void KviIrcView::calculateLineWraps(KviIrcViewLine *ptr,int maxWidth) { @@ -3480,12 +3476,12 @@ void KviIrcView::calculateLineWraps(KviIrcViewLine *ptr,int maxWidth) int maxBlockLen = ptr->pChunks->iTextLen; // ptr->pChunks[0].iTextLen - const QChar * unicode = ptr->szText.unicode(); + const TQChar * tqunicode = ptr->szText.tqunicode(); for(;;) { //Calculate the block_width - register const QChar * p = unicode + ptr->pBlocks[ptr->iBlockCount].block_start; + register const TQChar * p = tqunicode + ptr->pBlocks[ptr->iBlockCount].block_start; int curBlockLen = 0; int curBlockWidth = 0; @@ -3550,7 +3546,7 @@ void KviIrcView::calculateLineWraps(KviIrcViewLine *ptr,int maxWidth) ptr->pBlocks[ptr->iBlockCount].block_width = 0; ptr->iBlockCount++; ptr->pBlocks = (KviIrcViewWrappedBlock *)kvi_realloc(ptr->pBlocks,(ptr->iBlockCount + 1) * sizeof(KviIrcViewWrappedBlock)); - ptr->pBlocks[ptr->iBlockCount].block_start = p - unicode; + ptr->pBlocks[ptr->iBlockCount].block_start = p - tqunicode; ptr->pBlocks[ptr->iBlockCount].block_len = 0; ptr->pBlocks[ptr->iBlockCount].block_width = 0; ptr->pBlocks[ptr->iBlockCount].pChunk = &(ptr->pChunks[curAttrBlock]); @@ -3583,7 +3579,7 @@ void KviIrcView::calculateLineWraps(KviIrcViewLine *ptr,int maxWidth) maxBlockLen-=curBlockLen; ptr->iBlockCount++; ptr->pBlocks = (KviIrcViewWrappedBlock *)kvi_realloc(ptr->pBlocks,(ptr->iBlockCount + 1) * sizeof(KviIrcViewWrappedBlock)); - ptr->pBlocks[ptr->iBlockCount].block_start = p - unicode; + ptr->pBlocks[ptr->iBlockCount].block_start = p - tqunicode; ptr->pBlocks[ptr->iBlockCount].block_len = 0; ptr->pBlocks[ptr->iBlockCount].block_width = 0; ptr->pBlocks[ptr->iBlockCount].pChunk = 0; @@ -3636,8 +3632,8 @@ bool KviIrcView::checkSelectionBlock(KviIrcViewLine * line,int left,int bottom,i // // Yahoo!!!! // - const QChar * unicode = line->szText.unicode(); - register const QChar * p = unicode + line->pBlocks[bufIndex].block_start; + const TQChar * tqunicode = line->szText.tqunicode(); + register const TQChar * p = tqunicode + line->pBlocks[bufIndex].block_start; int top = bottom-m_iFontLineSpacing; int right = ((line->pBlocks[bufIndex].block_width >= 0) ? \ @@ -3824,11 +3820,11 @@ bool KviIrcView::checkSelectionBlock(KviIrcViewLine * line,int left,int bottom,i //============ recalcFontVariables ==============// -void KviIrcView::recalcFontVariables(const QFontMetrics &fm,const QFontInfo &fi) +void KviIrcView::recalcFontVariables(const TQFontMetrics &fm,const TQFontInfo &fi) { // FIXME: #warning "OPTIMIZE THIS: GLOBAL VARIABLES" if(m_pFm)delete m_pFm; - m_pFm = new QFontMetrics(fm); + m_pFm = new TQFontMetrics(fm); m_iFontLineSpacing = m_pFm->lineSpacing(); if(m_iFontLineSpacing < KVI_IRCVIEW_PIXMAP_SIZE && KVI_OPTION_BOOL(KviOption_boolIrcViewShowImages)) { @@ -3839,7 +3835,7 @@ void KviIrcView::recalcFontVariables(const QFontMetrics &fm,const QFontInfo &fi) // cache the first 256 characters for(unsigned short i=0;i<256;i++) { - m_iFontCharacterWidth[i]=m_pFm->width(QChar(i)); + m_iFontCharacterWidth[i]=m_pFm->width(TQChar(i)); } if(m_iFontLineWidth==0)m_iFontLineWidth=1; m_iWrapMargin = m_pFm->width("wwww"); @@ -3860,9 +3856,9 @@ void KviIrcView::recalcFontVariables(const QFontMetrics &fm,const QFontInfo &fi) //================ resizeEvent ===============// -void KviIrcView::resizeEvent(QResizeEvent *) +void KviIrcView::resizeEvent(TQResizeEvent *) { - int iScr = m_pScrollBar->sizeHint().width(); + int iScr = m_pScrollBar->tqsizeHint().width(); int iLeft = width()-iScr; m_pToolsButton->setGeometry(iLeft,0,iScr,iScr); m_pScrollBar->setGeometry(iLeft,iScr,iScr,height() - iScr); @@ -3877,9 +3873,9 @@ void KviIrcView::resizeEvent(QResizeEvent *) } } -QSize KviIrcView::sizeHint() const +TQSize KviIrcView::tqsizeHint() const { - QSize ret(KVI_IRCVIEW_SIZEHINT_WIDTH,KVI_IRCVIEW_SIZEHINT_HEIGHT); + TQSize ret(KVI_IRCVIEW_SIZEHINT_WIDTH,KVI_IRCVIEW_SIZEHINT_HEIGHT); return ret; } @@ -3891,34 +3887,34 @@ void KviIrcView::showToolsPopup() m_pToolsPopup->clear(); if(m_pToolWidget) - m_pToolsPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_SEARCH)),__tr2qs("Hide Find Window"),this,SLOT(toggleToolWidget())); + m_pToolsPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_SEARCH)),__tr2qs("Hide Find Window"),this,TQT_SLOT(toggleToolWidget())); else - m_pToolsPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_SEARCH)),__tr2qs("Show Find Window"),this,SLOT(toggleToolWidget())); + m_pToolsPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_SEARCH)),__tr2qs("Show Find Window"),this,TQT_SLOT(toggleToolWidget())); m_pToolsPopup->insertSeparator(); - m_pToolsPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_PLUS)),__tr2qs("Zoom In"),this,SLOT(increaseFontSize())); - m_pToolsPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_MINUS)),__tr2qs("Zoom Out"),this,SLOT(decreaseFontSize())); - m_pToolsPopup->insertItem(__tr2qs("Choose Temporary Font..."),this,SLOT(chooseFont())); - m_pToolsPopup->insertItem(__tr2qs("Choose Temporary Background..."),this,SLOT(chooseBackground())); - int id = m_pToolsPopup->insertItem(__tr2qs("Reset Temporary Background"),this,SLOT(resetBackground())); + m_pToolsPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_PLUS)),__tr2qs("Zoom In"),this,TQT_SLOT(increaseFontSize())); + m_pToolsPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_MINUS)),__tr2qs("Zoom Out"),this,TQT_SLOT(decreaseFontSize())); + m_pToolsPopup->insertItem(__tr2qs("Choose Temporary Font..."),this,TQT_SLOT(chooseFont())); + m_pToolsPopup->insertItem(__tr2qs("Choose Temporary Background..."),this,TQT_SLOT(chooseBackground())); + int id = m_pToolsPopup->insertItem(__tr2qs("Reset Temporary Background"),this,TQT_SLOT(resetBackground())); m_pToolsPopup->setItemEnabled(id,m_pPrivateBackgroundPixmap != 0); m_pToolsPopup->insertSeparator(); - m_pToolsPopup->insertItem(__tr2qs("Clear Buffer"),this,SLOT(clearBuffer())); + m_pToolsPopup->insertItem(__tr2qs("Clear Buffer"),this,TQT_SLOT(clearBuffer())); - QSize s = m_pToolsPopup->sizeHint(); + TQSize s = m_pToolsPopup->tqsizeHint(); - m_pToolsPopup->popup(m_pToolsButton->mapToGlobal(QPoint(m_pToolsButton->width() - s.width(),m_pToolsButton->height()))); + m_pToolsPopup->popup(m_pToolsButton->mapToGlobal(TQPoint(m_pToolsButton->width() - s.width(),m_pToolsButton->height()))); } void KviIrcView::increaseFontSize() { - QFont f = font(); + TQFont f = font(); f.setPointSize(f.pointSize() + 1); setFont(f); } void KviIrcView::decreaseFontSize() { - QFont f = font(); + TQFont f = font(); int p = f.pointSize(); if(p > 2)p--; f.setPointSize(p); @@ -3928,20 +3924,20 @@ void KviIrcView::decreaseFontSize() void KviIrcView::chooseFont() { bool bOk; - QFont f = QFontDialog::getFont(&bOk,font(),this); + TQFont f = TQFontDialog::getFont(&bOk,font(),this); if(!bOk)return; setFont(f); } void KviIrcView::chooseBackground() { - QString f; + TQString f; if(!KviFileDialog::askForOpenFileName(f,__tr2qs("Choose the background image...")))return; if(f.isEmpty())return; - QPixmap p(f); + TQPixmap p(f); if(p.isNull()) { - QMessageBox::information(this,__tr2qs("Invalid image"),__tr2qs("Failed to load the selected image"),__tr2qs("Ok")); + TQMessageBox::information(this,__tr2qs("Invalid image"),__tr2qs("Failed to load the selected image"),__tr2qs("Ok")); return; } setPrivateBackgroundPixmap(p); @@ -3959,11 +3955,11 @@ void KviIrcView::toggleToolWidget() delete m_pToolWidget; m_pToolWidget = 0; m_pCursorLine = 0; - repaint(); + tqrepaint(); } else { m_pToolWidget = new KviIrcViewToolWidget(this); - int w = m_pToolWidget->sizeHint().width(); + int w = m_pToolWidget->tqsizeHint().width(); m_pToolWidget->move(width() - (w + 40),10); m_pToolWidget->show(); } @@ -3972,7 +3968,7 @@ void KviIrcView::toggleToolWidget() /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // -// The IrcView : find +// The IrcView : tqfind // /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -3983,7 +3979,7 @@ void KviIrcView::setCursorLine(KviIrcViewLine * l) if(m_pCursorLine == m_pCurLine) { - repaint(); + tqrepaint(); return; } @@ -4004,7 +4000,7 @@ void KviIrcView::setCursorLine(KviIrcViewLine * l) m_iLastScrollBarValue = sc; m_pScrollBar->setValue(sc); } else { - repaint(); + tqrepaint(); } } else { // The cursor line is over the current line @@ -4038,12 +4034,12 @@ void KviIrcView::setCursorLine(KviIrcViewLine * l) m_iLastScrollBarValue = sc; m_pScrollBar->setValue(sc); } else { - repaint(); + tqrepaint(); } } } -void KviIrcView::findNext(const QString& szText,bool bCaseS,bool bRegExp,bool bExtended) +void KviIrcView::findNext(const TQString& szText,bool bCaseS,bool bRegExp,bool bExtended) { KviIrcViewLine * l = m_pCursorLine; if(!l)l = m_pCurLine; @@ -4063,15 +4059,11 @@ void KviIrcView::findNext(const QString& szText,bool bCaseS,bool bRegExp,bool bE if(bRegExp) { - QRegExp re(szText,bCaseS,!bExtended); -#if QT_VERSION >= 300 + TQRegExp re(szText,bCaseS,!bExtended); idx = re.search(l->szText,0); -#else - idx = re.find(l->szText,0); -#endif } else { - QString tmp = l->szText; - idx = tmp.find(szText,0,bCaseS); + TQString tmp = l->szText; + idx = tmp.tqfind(szText,0,bCaseS); } if(idx != -1) @@ -4079,8 +4071,8 @@ void KviIrcView::findNext(const QString& szText,bool bCaseS,bool bRegExp,bool bE setCursorLine(l); if(m_pToolWidget) { - QString tmp; - KviQString::sprintf(tmp,__tr2qs("Pos %d"),idx); + TQString tmp; + KviTQString::sprintf(tmp,__tr2qs("Pos %d"),idx); m_pToolWidget->setFindResult(tmp); } return; @@ -4094,12 +4086,12 @@ do_pNext: } while(l != start); } m_pCursorLine = 0; - repaint(); + tqrepaint(); if(m_pToolWidget)m_pToolWidget->setFindResult(__tr2qs("Not found")); } -void KviIrcView::findPrev(const QString& szText,bool bCaseS,bool bRegExp,bool bExtended) +void KviIrcView::findPrev(const TQString& szText,bool bCaseS,bool bRegExp,bool bExtended) { KviIrcViewLine * l = m_pCursorLine; if(!l)l = m_pCurLine; @@ -4120,15 +4112,11 @@ void KviIrcView::findPrev(const QString& szText,bool bCaseS,bool bRegExp,bool bE if(bRegExp) { - QRegExp re(szText,bCaseS,!bExtended); -#if QT_VERSION >= 300 + TQRegExp re(szText,bCaseS,!bExtended); idx = re.search(l->szText,0); -#else - idx = re.find(l->szText,0); -#endif } else { - QString tmp = l->szText; - idx = tmp.find(szText,0,bCaseS);; + TQString tmp = l->szText; + idx = tmp.tqfind(szText,0,bCaseS);; } if(idx != -1) @@ -4136,8 +4124,8 @@ void KviIrcView::findPrev(const QString& szText,bool bCaseS,bool bRegExp,bool bE setCursorLine(l); if(m_pToolWidget) { - QString tmp; - KviQString::sprintf(tmp,__tr2qs("Pos %d"),idx); + TQString tmp; + KviTQString::sprintf(tmp,__tr2qs("Pos %d"),idx); m_pToolWidget->setFindResult(tmp); } return; @@ -4152,7 +4140,7 @@ do_pPrev: } m_pCursorLine = 0; - repaint(); + tqrepaint(); if(m_pToolWidget)m_pToolWidget->setFindResult(__tr2qs("Not found")); } @@ -4181,7 +4169,7 @@ KviIrcViewLine * KviIrcView::getVisibleLineAt(int xPos,int yPos) return 0; } -KviIrcViewWrappedBlock * KviIrcView::getLinkUnderMouse(int xPos,int yPos,QRect * pRect,QString * linkCmd,QString * linkText) +KviIrcViewWrappedBlock * KviIrcView::getLinkUnderMouse(int xPos,int yPos,TQRect * pRect,TQString * linkCmd,TQString * linkText) { KviIrcViewLine * l = m_pCurLine; int iTop = height() + m_iFontDescent - KVI_IRCVIEW_VERTICAL_BORDER; @@ -4282,7 +4270,7 @@ KviIrcViewWrappedBlock * KviIrcView::getLinkUnderMouse(int xPos,int yPos,QRect * } if(pRect) { - *pRect = QRect(iLeftBorder, + *pRect = TQRect(iLeftBorder, bHadWordWraps ? iLastEscapeBlockTop : iTop, iRightBorder, ((uLineWraps + 1) * m_iFontLineSpacing) + m_iFontDescent); @@ -4295,7 +4283,7 @@ KviIrcViewWrappedBlock * KviIrcView::getLinkUnderMouse(int xPos,int yPos,QRect * } if(linkText) { - QString szLink; + TQString szLink; int iEndOfLInk = iLastEscapeBlock; while(1) { @@ -4308,18 +4296,18 @@ KviIrcViewWrappedBlock * KviIrcView::getLinkUnderMouse(int xPos,int yPos,QRect * case KVI_TEXT_UNDERLINE: case KVI_TEXT_REVERSE: case KVI_TEXT_RESET: - szLink.append(QChar(l->pBlocks[iEndOfLInk].pChunk->type)); + szLink.append(TQChar(l->pBlocks[iEndOfLInk].pChunk->type)); break; case KVI_TEXT_COLOR: - szLink.append(QChar(KVI_TEXT_COLOR)); + szLink.append(TQChar(KVI_TEXT_COLOR)); if(l->pBlocks[iEndOfLInk].pChunk->colors.fore != KVI_NOCHANGE) { - szLink.append(QString("%1").arg((int)(l->pBlocks[iEndOfLInk].pChunk->colors.fore))); + szLink.append(TQString("%1").tqarg((int)(l->pBlocks[iEndOfLInk].pChunk->colors.fore))); } if(l->pBlocks[iEndOfLInk].pChunk->colors.back != KVI_NOCHANGE) { - szLink.append(QChar(',')); - szLink.append(QString("%1").arg((int)(l->pBlocks[iEndOfLInk].pChunk->colors.back))); + szLink.append(TQChar(',')); + szLink.append(TQString("%1").tqarg((int)(l->pBlocks[iEndOfLInk].pChunk->colors.back))); } break; } @@ -4346,7 +4334,7 @@ KviIrcViewWrappedBlock * KviIrcView::getLinkUnderMouse(int xPos,int yPos,QRect * { if(pRect) { - *pRect = QRect(iLastLeft, + *pRect = TQRect(iLastLeft, bHadWordWraps ? firstRowTop : iTop, iBlockWidth, ((l->uLineWraps + 1) * m_iFontLineSpacing) + m_iFontDescent); @@ -4354,7 +4342,7 @@ KviIrcViewWrappedBlock * KviIrcView::getLinkUnderMouse(int xPos,int yPos,QRect * if(linkCmd) { *linkCmd = "[!txt]"; - QString tmp; + TQString tmp; tmp.setUnicodeCodes(l->pBlocks[i].pChunk->szPayload,kvi_wstrlen(l->pBlocks[i].pChunk->szPayload)); linkCmd->append(tmp); linkCmd->stripWhiteSpace(); @@ -4441,7 +4429,7 @@ KviIrcViewWrappedBlock * KviIrcView::getLinkUnderMouse(int xPos,int yPos,QRect * These links are used internally in KVIrc , but you can use them too.[br] The is a single letter this time: it defines the type of the link.[br] Currently KVIrc uses six types of builtin links : 'n' for nickname links, 'u' for url links, - 'c' for channel links, 'h' for hostname links, 'm' for mask links and 's' for server links.[br] + 'c' for channel links, 'h' for hostname links, 'm' for tqmask links and 's' for server links.[br] Theoretically you can also use your own link types: just use any other letter or digit (you can't use ']' and ), but probably you will prefer a completely user defined link in that case anyway.[br] Once the user interacts with the link , kvirc executes the predefined events:[br] @@ -4459,11 +4447,11 @@ KviIrcViewWrappedBlock * KviIrcView::getLinkUnderMouse(int xPos,int yPos,QRect * // FIXME: #warning "Finish the doc above!! Maybe some examples ?!" -void KviIrcView::mouseDoubleClickEvent(QMouseEvent *e) +void KviIrcView::mouseDoubleClickEvent(TQMouseEvent *e) { - QString cmd; - QString linkCmd; - QString linkText; + TQString cmd; + TQString linkCmd; + TQString linkText; if(m_iMouseTimer) { @@ -4481,7 +4469,7 @@ void KviIrcView::mouseDoubleClickEvent(QMouseEvent *e) return; } - QString szCmd(linkCmd); + TQString szCmd(linkCmd); szCmd.remove(0,1); KviKvsVariantList * pParams = new KviKvsVariantList(); @@ -4491,7 +4479,7 @@ void KviIrcView::mouseDoubleClickEvent(QMouseEvent *e) pParams->append(szCmd); - switch(linkCmd[0].unicode()) + switch(linkCmd[0].tqunicode()) { case 'n': { @@ -4504,8 +4492,8 @@ void KviIrcView::mouseDoubleClickEvent(QMouseEvent *e) KVS_TRIGGER_EVENT(KviEvent_OnChannelNickDefaultActionRequest,m_pKviWindow,pParams); } else bTrigger = true; break; - case KVI_WINDOW_TYPE_QUERY: - if(KviQString::equalCI(((KviQuery *)m_pKviWindow)->windowName(),linkText)) + case KVI_WINDOW_TYPE_TQUERY: + if(KviTQString::equalCI(((KviQuery *)m_pKviWindow)->windowName(),linkText)) { KVS_TRIGGER_EVENT(KviEvent_OnQueryNickDefaultActionRequest,m_pKviWindow,pParams); } else bTrigger = true; @@ -4528,17 +4516,17 @@ void KviIrcView::mouseDoubleClickEvent(QMouseEvent *e) { if(((KviChannel *)m_pKviWindow)->isMeOp()) { - QChar plmn = linkCmd[1]; - if((plmn.unicode() == '+') || (plmn.unicode() == '-')) + TQChar plmn = linkCmd[1]; + if((plmn.tqunicode() == '+') || (plmn.tqunicode() == '-')) { - QString target(m_pKviWindow->windowName()); - target.replace("\\","\\\\"); - target.replace("\"","\\\""); - target.replace(";","\\;"); - target.replace("$","\\$"); - target.replace("%","\\%"); - QChar flag = linkCmd[2]; - switch(flag.unicode()) + TQString target(m_pKviWindow->windowName()); + target.tqreplace("\\","\\\\"); + target.tqreplace("\"","\\\""); + target.tqreplace(";","\\;"); + target.tqreplace("$","\\$"); + target.tqreplace("%","\\%"); + TQChar flag = linkCmd[2]; + switch(flag.tqunicode()) { case 'o': case 'v': @@ -4549,10 +4537,10 @@ void KviIrcView::mouseDoubleClickEvent(QMouseEvent *e) case 'I': case 'e': case 'k': - KviQString::sprintf(cmd,"mode %Q %c%c $0",&target,plmn.latin1(),flag.latin1()); + KviTQString::sprintf(cmd,"mode %Q %c%c $0",&target,plmn.latin1(),flag.latin1()); break; default: - KviQString::sprintf(cmd,"mode %Q %c%c",&target,plmn.latin1(),flag.latin1()); + KviTQString::sprintf(cmd,"mode %Q %c%c",&target,plmn.latin1(),flag.latin1()); break; } } @@ -4565,14 +4553,14 @@ void KviIrcView::mouseDoubleClickEvent(QMouseEvent *e) break; case 'u': { - QString urlText; + TQString urlText; if(!szCmd.isEmpty()) urlText=szCmd; else urlText=linkText; if( - !KviQString::cmpCIN(urlText,"irc://",6) || - !KviQString::cmpCIN(urlText,"irc6://",7) || - !KviQString::cmpCIN(urlText,"ircs://",7) || - !KviQString::cmpCIN(urlText,"ircs6://",8) + !KviTQString::cmpCIN(urlText,"irc://",6) || + !KviTQString::cmpCIN(urlText,"irc6://",7) || + !KviTQString::cmpCIN(urlText,"ircs://",7) || + !KviTQString::cmpCIN(urlText,"ircs6://",8) ) { KviIrcUrl::run(urlText,KviIrcUrl::TryCurrentContext | KviIrcUrl::DoNotPartChans, console()); @@ -4585,7 +4573,7 @@ void KviIrcView::mouseDoubleClickEvent(QMouseEvent *e) { if(console() && console()->connection()) { - QString szChan=linkText; + TQString szChan=linkText; if(szCmd.length()>0) szChan=szCmd; if(KviChannel * c = console()->connection()->findChannel(szChan)) { @@ -4593,7 +4581,7 @@ void KviIrcView::mouseDoubleClickEvent(QMouseEvent *e) c->raise(); c->setFocus(); } else { - cmd = QString("join %1").arg(szChan); + cmd = TQString("join %1").tqarg(szChan); } } } @@ -4618,7 +4606,7 @@ void KviIrcView::mouseDoubleClickEvent(QMouseEvent *e) delete pParams; } -void KviIrcView::mousePressEvent(QMouseEvent *e) +void KviIrcView::mousePressEvent(TQMouseEvent *e) { if(m_pKviWindow->input()) m_pKviWindow->input()->setFocus(); @@ -4631,7 +4619,7 @@ void KviIrcView::mousePressEvent(QMouseEvent *e) if(m_pToolWidget) { m_pCursorLine = getVisibleLineAt(e->pos().x(),e->pos().y()); - repaint(); + tqrepaint(); } m_mousePressPos = e->pos(); @@ -4639,7 +4627,7 @@ void KviIrcView::mousePressEvent(QMouseEvent *e) m_bMouseIsDown = true; - m_bShiftPressed = (e->state() & Qt::ShiftButton); + m_bShiftPressed = (e->state() & TQt::ShiftButton); calculateSelectionBounds(); } @@ -4653,21 +4641,21 @@ void KviIrcView::mousePressEvent(QMouseEvent *e) delete m_pLastEvent; m_pLastEvent = 0; } else { - m_iMouseTimer = startTimer(QApplication::doubleClickInterval()); - m_pLastEvent = new QMouseEvent(*e); + m_iMouseTimer = startTimer(TQApplication::doubleClickInterval()); + m_pLastEvent = new TQMouseEvent(*e); } } else { mouseRealPressEvent(e); } } -void KviIrcView::mouseRealPressEvent(QMouseEvent *e) +void KviIrcView::mouseRealPressEvent(TQMouseEvent *e) { - QString linkCmd; - QString linkText; + TQString linkCmd; + TQString linkText; getLinkUnderMouse(e->pos().x(),e->pos().y(),0,&linkCmd,&linkText); - QString szCmd(linkCmd); + TQString szCmd(linkCmd); szCmd.remove(0,1); KviKvsVariantList * pParams = new KviKvsVariantList(); @@ -4677,11 +4665,11 @@ void KviIrcView::mouseRealPressEvent(QMouseEvent *e) pParams->append(szCmd); - if(!(e->state() & Qt::ControlButton))//(e->button() & Qt::RightButton) && ( + if(!(e->state() & TQt::ControlButton))//(e->button() & Qt::RightButton) && ( { if(!linkCmd.isEmpty()) { - switch(linkCmd[0].unicode()) + switch(linkCmd[0].tqunicode()) { case 'n': { @@ -4699,7 +4687,7 @@ void KviIrcView::mouseRealPressEvent(QMouseEvent *e) { if(m_pKviWindow->inherits("KviChannel")) { KviChannel *c = (KviChannel*)m_pKviWindow; - QString nick; + TQString nick; if(pParams->firstAsString(nick)) c->userListView()->select(nick); } @@ -4707,8 +4695,8 @@ void KviIrcView::mouseRealPressEvent(QMouseEvent *e) } } else bTrigger = true; break; - case KVI_WINDOW_TYPE_QUERY: - if(KviQString::equalCI(((KviQuery *)m_pKviWindow)->windowName(),linkText)) + case KVI_WINDOW_TYPE_TQUERY: + if(KviTQString::equalCI(((KviQuery *)m_pKviWindow)->windowName(),linkText)) { if(e->button() & Qt::RightButton) KVS_TRIGGER_EVENT(KviEvent_OnQueryNickPopupRequest,m_pKviWindow,pParams); @@ -4760,7 +4748,7 @@ void KviIrcView::mouseRealPressEvent(QMouseEvent *e) { if(e->button() & Qt::RightButton) { - QString tmp; + TQString tmp; getLinkEscapeCommand(tmp,linkCmd,"[!rbt]"); if(!tmp.isEmpty()) { @@ -4772,10 +4760,10 @@ void KviIrcView::mouseRealPressEvent(QMouseEvent *e) } } else if(e->button() & Qt::RightButton) emit rightClicked(); - } else if((e->button() & Qt::MidButton) || ((e->button() & Qt::RightButton) && (e->state() & Qt::ControlButton))) + } else if((e->button() & Qt::MidButton) || ((e->button() & Qt::RightButton) && (e->state() & TQt::ControlButton))) { - QString tmp; - getLinkEscapeCommand(tmp,linkCmd,QString("[!mbt]")); + TQString tmp; + getLinkEscapeCommand(tmp,linkCmd,TQString("[!mbt]")); if(!tmp.isEmpty()) { KviKvsScript::run(tmp,m_pKviWindow,pParams); @@ -4788,19 +4776,19 @@ void KviIrcView::mouseRealPressEvent(QMouseEvent *e) //================ mouseReleaseEvent ===============// -void KviIrcView::mouseReleaseEvent(QMouseEvent *) +void KviIrcView::mouseReleaseEvent(TQMouseEvent *) { if(m_iSelectTimer) { killTimer(m_iSelectTimer); m_iSelectTimer = 0; - QClipboard * c = QApplication::clipboard(); + TQClipboard * c = TQApplication::tqclipboard(); if(c) { // copy to both! - c->setText(m_szLastSelection,QClipboard::Clipboard); + c->setText(m_szLastSelection,TQClipboard::Clipboard); if(c->supportsSelection()) - c->setText(m_szLastSelection,QClipboard::Selection); + c->setText(m_szLastSelection,TQClipboard::Selection); } } @@ -4814,13 +4802,13 @@ void KviIrcView::mouseReleaseEvent(QMouseEvent *) m_pMessagesStoppedWhileSelecting->removeFirst(); appendLine(l,false); } - repaint(); + tqrepaint(); } } // FIXME: #warning "The tooltip timeout should be small, because the view scrolls!" -void KviIrcView::mouseMoveEvent(QMouseEvent *e) +void KviIrcView::mouseMoveEvent(TQMouseEvent *e) { // debug("Pos : %d,%d",e->pos().x(),e->pos().y()); if(m_bMouseIsDown && (e->state() & Qt::LeftButton)) // m_bMouseIsDown MUST BE true...(otherwise the mouse entered the window with the button pressed ?) @@ -4846,7 +4834,7 @@ void KviIrcView::mouseMoveEvent(QMouseEvent *e) int yPos = e->pos().y(); int rectTop; int rectHeight; - QRect rctLink; + TQRect rctLink; KviIrcViewWrappedBlock * newLinkUnderMouse = getLinkUnderMouse(e->pos().x(),yPos,&rctLink); rectTop = rctLink.y(); @@ -4859,7 +4847,7 @@ void KviIrcView::mouseMoveEvent(QMouseEvent *e) m_pLastLinkUnderMouse = newLinkUnderMouse; if(m_pLastLinkUnderMouse) { - setCursor(Qt::PointingHandCursor); + setCursor(TQt::PointingHandCursor); if(rectTop < 0)rectTop = 0; if((rectTop + rectHeight) > height())rectHeight = height() - rectTop; @@ -4869,22 +4857,22 @@ void KviIrcView::mouseMoveEvent(QMouseEvent *e) int top = (rectTop < m_iLastLinkRectTop) ? rectTop : m_iLastLinkRectTop; int lastBottom = m_iLastLinkRectTop + m_iLastLinkRectHeight; int thisBottom = rectTop + rectHeight; - QRect r(0,top,width(),((lastBottom > thisBottom) ? lastBottom : thisBottom) - top); - repaint(r); + TQRect r(0,top,width(),((lastBottom > thisBottom) ? lastBottom : thisBottom) - top); + tqrepaint(r); } else { // no prev link - QRect r(0,rectTop,width(),rectHeight); - repaint(r); + TQRect r(0,rectTop,width(),rectHeight); + tqrepaint(r); } m_iLastLinkRectTop = rectTop; m_iLastLinkRectHeight = rectHeight; } else { - setCursor(Qt::ArrowCursor); + setCursor(TQt::ArrowCursor); if(m_iLastLinkRectHeight > -1) { // There was a previous bottom rect - QRect r(0,m_iLastLinkRectTop,width(),m_iLastLinkRectHeight); - repaint(r); + TQRect r(0,m_iLastLinkRectTop,width(),m_iLastLinkRectHeight); + tqrepaint(r); m_iLastLinkRectTop = -1; m_iLastLinkRectHeight = -1; } @@ -4899,16 +4887,16 @@ KviConsole * KviIrcView::console() return m_pKviWindow->console(); } -void KviIrcView::doLinkToolTip(const QRect &rct,QString &linkCmd,QString &linkText) +void KviIrcView::doLinkToolTip(const TQRect &rct,TQString &linkCmd,TQString &linkText) { if(linkCmd.isEmpty())return; - QString szCmd(linkCmd); + TQString szCmd(linkCmd); szCmd.remove(0,1); - QString tip; + TQString tip; - switch(linkCmd[0].unicode()) + switch(linkCmd[0].tqunicode()) { case 'u': // url link { @@ -4922,7 +4910,7 @@ void KviIrcView::doLinkToolTip(const QRect &rct,QString &linkCmd,QString &linkTe tip += linkText; } tip+="
"; - QMimeSourceFactory::defaultFactory()->setPixmap("url_icon",*(g_pIconManager->getSmallIcon(KVI_SMALLICON_URL))); + TQMimeSourceFactory::defaultFactory()->setPixmap("url_icon",*(g_pIconManager->getSmallIcon(KVI_SMALLICON_URL))); tip += __tr2qs("Double-click to open this link"); tip += "
"; } @@ -4939,11 +4927,11 @@ void KviIrcView::doLinkToolTip(const QRect &rct,QString &linkCmd,QString &linkTe tip += linkText; } tip+="
"; - QMimeSourceFactory::defaultFactory()->setPixmap("host_icon",*(g_pIconManager->getSmallIcon(KVI_SMALLICON_SERVER))); + TQMimeSourceFactory::defaultFactory()->setPixmap("host_icon",*(g_pIconManager->getSmallIcon(KVI_SMALLICON_SERVER))); - if(linkText.find('*') != -1) + if(linkText.tqfind('*') != -1) { - if(linkText.length() > 1)tip += __tr2qs("Unable to look it up hostname: Hostname appears to be masked"); + if(linkText.length() > 1)tip += __tr2qs("Unable to look it up hostname: Hostname appears to be tqmasked"); else tip += __tr2qs("Unable to look it up hostname: Unknown host"); } else { tip += __tr2qs("Double-click to look up this hostname
Right-click to view other options"); @@ -4957,7 +4945,7 @@ void KviIrcView::doLinkToolTip(const QRect &rct,QString &linkCmd,QString &linkTe tip = "" \ ""; } if(e->isAway()) { txt+=""; } txt+=""; @@ -216,15 +216,15 @@ QString KviQuery::getInfoLabelTipText() return txt; } -QString KviQuery::getInfoLabelText() +TQString KviQuery::getInfoLabelText() { - QString tmp; + TQString tmp; if(KVI_OPTION_BOOL(KviOption_boolShowExtendedInfoInQueryLabel)) { - KviIrcUserEntry * e = connection()->userDataBase()->find(m_szName); + KviIrcUserEntry * e = connection()->userDataBase()->tqfind(m_szName); if(e) { - QString szMask; + TQString szMask; if(console()->connection()) { if(e->hasUser()) @@ -237,19 +237,19 @@ QString KviQuery::getInfoLabelText() else szMask+="*"; if(e->hasRealName()) - tmp=__tr2qs("Query with %1!%2 (%3)").arg(m_szName).arg(szMask).arg(KviMircCntrl::stripControlBytes(e->realName())); + tmp=__tr2qs("Query with %1!%2 (%3)").tqarg(m_szName).tqarg(szMask).tqarg(KviMircCntrl::stripControlBytes(e->realName())); else - tmp=__tr2qs("Query with %1!%2").arg(m_szName).arg(szMask); + tmp=__tr2qs("Query with %1!%2").tqarg(m_szName).tqarg(szMask); if(e->hasServer()) - tmp+=__tr2qs(", using server %1").arg(e->server()); + tmp+=__tr2qs(", using server %1").tqarg(e->server()); if(e->hasHops()) - tmp+=__tr2qs(" (%1 hops)").arg(e->hops()); + tmp+=__tr2qs(" (%1 hops)").tqarg(e->hops()); if(e->isAway()) tmp+=__tr2qs(", probably away"); tmp+="\n"; - QString szChans; + TQString szChans; connection()->getCommonChannels(m_szName,szChans,0); - tmp+=__tr2qs("Common channels: %2").arg(szChans); + tmp+=__tr2qs("Common channels: %2").tqarg(szChans); } else { tmp=__tr2qs("[Dead Query]"); } @@ -259,7 +259,7 @@ QString KviQuery::getInfoLabelText() } void KviQuery::slotDndEvents(const char *file) { - KVS_TRIGGER_EVENT_1(KviEvent_OnQueryFileDropped,this,QString(file)); + KVS_TRIGGER_EVENT_1(KviEvent_OnQueryFileDropped,this,TQString(file)); } void KviQuery::triggerCreationEvents() @@ -268,7 +268,7 @@ void KviQuery::triggerCreationEvents() KVS_TRIGGER_EVENT_0(KviEvent_OnQueryWindowCreated,this); } -void KviQuery::getBaseLogFileName(QString &buffer) +void KviQuery::getBaseLogFileName(TQString &buffer) { if(console()->connection()) { @@ -311,24 +311,24 @@ void KviQuery::loadProperties(KviConfig *cfg) showListView(cfg->readBoolEntry("UserListViewVisible",false)); } -void KviQuery::notifyTargetChange(const QString &oldNick,const QString &oldUser,const QString &oldHost,const QString &nick,const QString &user,const QString &host) +void KviQuery::notifyTargetChange(const TQString &oldNick,const TQString &oldUser,const TQString &oldHost,const TQString &nick,const TQString &user,const TQString &host) { - QString oldN = oldNick.isEmpty() ? QString("*") : oldNick; - QString oldU = oldUser.isEmpty() ? QString("*") : oldUser; - QString oldH = oldHost.isEmpty() ? QString("*") : oldHost; - output(KVI_OUT_QUERYTRACE, + TQString oldN = oldNick.isEmpty() ? TQString("*") : oldNick; + TQString oldU = oldUser.isEmpty() ? TQString("*") : oldUser; + TQString oldH = oldHost.isEmpty() ? TQString("*") : oldHost; + output(KVI_OUT_TQUERYTRACE, __tr2qs("The target of this query has changed from \r!n\r%Q\r [%Q@\r!h\r%Q\r] to \r!n\r%Q\r [%Q@\r!h\r%Q\r]"), &oldN,&oldU,&oldH,&nick,&user,&host); updateLabelText(); } -void KviQuery::userAction(const QString &nick,const QString &user,const QString &host,unsigned int uActionType) +void KviQuery::userAction(const TQString &nick,const TQString &user,const TQString &host,unsigned int uActionType) { int iTemperature = kvi_getUserActionTemperature(uActionType); if(KVI_OPTION_BOOL(KviOption_boolEnableQueryTracing)) { - QString oldUser,oldHost; + TQString oldUser,oldHost; if(!m_pUserListView->userActionVerifyMask(nick,user,host,iTemperature,oldUser,oldHost)) notifyTargetChange(nick,oldUser,oldHost,nick,user,host); } else { @@ -338,7 +338,7 @@ void KviQuery::userAction(const QString &nick,const QString &user,const QString } -void KviQuery::userAction(const QString &nick,unsigned int uActionType) +void KviQuery::userAction(const TQString &nick,unsigned int uActionType) { int iTemperature = kvi_getUserActionTemperature(uActionType); m_pUserListView->userAction(nick,iTemperature); @@ -350,7 +350,7 @@ void KviQuery::userAction(KviIrcMask *user,unsigned int uActionType) int iTemperature = kvi_getUserActionTemperature(uActionType); if(KVI_OPTION_BOOL(KviOption_boolEnableQueryTracing)) { - QString oldUser,oldHost; + TQString oldUser,oldHost; if(!m_pUserListView->userActionVerifyMask(user->nick(),user->user(),user->host(),iTemperature,oldUser,oldHost)) notifyTargetChange(user->nick(),oldUser,oldHost,user->nick(),user->user(),user->host()); } else { @@ -360,7 +360,7 @@ void KviQuery::userAction(KviIrcMask *user,unsigned int uActionType) } -KviUserListEntry * KviQuery::setTarget(const QString &nick,const QString &user,const QString &host) +KviUserListEntry * KviQuery::setTarget(const TQString &nick,const TQString &user,const TQString &host) { KviUserListEntry * e = m_pUserListView->join(nick,user,host); if((!e->globalData()->avatar()) && (!user.isEmpty()) && (user != "*")) @@ -371,7 +371,7 @@ KviUserListEntry * KviQuery::setTarget(const QString &nick,const QString &user,c if(KVI_OPTION_BOOL(KviOption_boolEnableQueryTracing)) { - QString szChans; + TQString szChans; int iChans = m_pConsole->connection()->getCommonChannels(nick,szChans); notifyCommonChannels(nick,user,host,iChans,szChans); } @@ -381,15 +381,15 @@ KviUserListEntry * KviQuery::setTarget(const QString &nick,const QString &user,c return e; } -void KviQuery::notifyCommonChannels(const QString &nick,const QString &user,const QString &host,int iChans,const QString &szChans) +void KviQuery::notifyCommonChannels(const TQString &nick,const TQString &user,const TQString &host,int iChans,const TQString &szChans) { - static QString star("*"); + static TQString star("*"); if(iChans > 0) { - output(KVI_OUT_QUERYTRACE,__tr2qs("Common channels for \r!n\r%Q\r [%Q@\r!h\r%Q\r]: %Q"), + output(KVI_OUT_TQUERYTRACE,__tr2qs("Common channels for \r!n\r%Q\r [%Q@\r!h\r%Q\r]: %Q"), &nick,user.isEmpty() ? &star : &user,host.isEmpty() ? &star : &host,&szChans); } else { - output(KVI_OUT_QUERYTRACE,__tr2qs("No common channels for \r!n\r%Q\r [%Q@\r!h\r%Q\r]"), + output(KVI_OUT_TQUERYTRACE,__tr2qs("No common channels for \r!n\r%Q\r [%Q@\r!h\r%Q\r]"), &nick,user.isEmpty() ? &star : &user,host.isEmpty() ? &star : &host); } updateLabelText(); @@ -400,11 +400,11 @@ void KviQuery::notifyCommonChannels(const QString &nick,const QString &user,cons /*void KviQuery::updateTargets() { - QString szName; + TQString szName; if(targetCount() > 0) { - KviPointerHashTableIterator it(*(m_pUserListView->entryDict())); + KviPointerHashTableIterator it(*(m_pUserListView->entryDict())); if(it.current())szName = it.currentKey(); } @@ -417,15 +417,15 @@ void KviQuery::notifyCommonChannels(const QString &nick,const QString &user,cons void KviQuery::fillCaptionBuffers() { - static QString begin(""); - static QString endofbold(" "); - static QString end(""); + static TQString begin(""); + static TQString endofbold(" "); + static TQString end(""); if(!console()->connection()) { - QString dead = __tr2qs("[Dead query]"); + TQString dead = __tr2qs("[Dead query]"); m_szPlainTextCaption = windowName(); m_szPlainTextCaption += " : "; @@ -454,14 +454,14 @@ void KviQuery::fillCaptionBuffers() return; } - QString szNickOnServer = QChar('['); + TQString szNickOnServer = TQChar('['); szNickOnServer += connection()->currentNickName(); szNickOnServer += __tr2qs(" on "); szNickOnServer += connection()->currentServerName(); - szNickOnServer += QChar(']'); + szNickOnServer += TQChar(']'); m_szPlainTextCaption = windowName(); - m_szPlainTextCaption += QChar(' '); + m_szPlainTextCaption += TQChar(' '); m_szPlainTextCaption += szNickOnServer; m_szHtmlActiveCaption = begin; @@ -485,7 +485,7 @@ void KviQuery::fillCaptionBuffers() m_szHtmlInactiveCaption += end; } -bool KviQuery::nickChange(const QString &oldNick,const QString &newNick) +bool KviQuery::nickChange(const TQString &oldNick,const TQString &newNick) { bool bRet = m_pUserListView->nickChange(oldNick,newNick); if(!bRet)return false; // ugh!! ? @@ -514,7 +514,7 @@ void KviQuery::toggleListView() void KviQuery::setDeadQuery() { - m_iFlags |= KVI_QUERY_FLAG_DEAD; + m_iFlags |= KVI_TQUERY_FLAG_DEAD; m_pUserListView->enableUpdates(false); m_pUserListView->partAll(); @@ -522,7 +522,7 @@ void KviQuery::setDeadQuery() m_pUserListView->setUserDataBase(0); connection()->unregisterQuery(this); context()->registerDeadQuery(this); - setType(KVI_WINDOW_TYPE_DEADQUERY); + setType(KVI_WINDOW_TYPE_DEADTQUERY); updateIcon(); updateCaption(); @@ -531,9 +531,9 @@ void KviQuery::setDeadQuery() void KviQuery::setAliveQuery() { - m_iFlags &= ~KVI_QUERY_FLAG_DEAD; + m_iFlags &= ~KVI_TQUERY_FLAG_DEAD; m_pUserListView->setUserDataBase(connection()->userDataBase()); - setType(KVI_WINDOW_TYPE_QUERY); + setType(KVI_WINDOW_TYPE_TQUERY); context()->unregisterDeadQuery(this); connection()->registerQuery(this); // Update log file name @@ -547,31 +547,31 @@ void KviQuery::applyOptions() { m_pUserListView->applyOptions(); updateLabelText(); - // this applies options for IrcView and Input and forces the window to relayout + // this applies options for IrcView and Input and forces the window to retqlayout KviWindow::applyOptions(); } -QPixmap * KviQuery::myIconPtr() +TQPixmap * KviQuery::myIconPtr() { - return g_pIconManager->getSmallIcon(isDeadQuery() ? KVI_SMALLICON_DEADQUERY : KVI_SMALLICON_QUERY); + return g_pIconManager->getSmallIcon(isDeadQuery() ? KVI_SMALLICON_DEADTQUERY : KVI_SMALLICON_TQUERY); } -void KviQuery::resizeEvent(QResizeEvent *e) +void KviQuery::resizeEvent(TQResizeEvent *e) { int hght = m_pInput->heightHint(); - int hght2 = m_pButtonBox->sizeHint().height(); + int hght2 = m_pButtonBox->tqsizeHint().height(); m_pButtonBox->setGeometry(0,0,width(),hght2); m_pSplitter->setGeometry(0,hght2,width(),height() - (hght + hght2)); m_pInput->setGeometry(0,height() - hght,width(),hght); } -QSize KviQuery::sizeHint() const +TQSize KviQuery::tqsizeHint() const { - QSize ret(m_pSplitter->sizeHint().width(),m_pIrcView->sizeHint().height() + m_pInput->heightHint()); + TQSize ret(m_pSplitter->tqsizeHint().width(),m_pIrcView->tqsizeHint().height() + m_pInput->heightHint()); return ret; } -void KviQuery::ownMessage(const QString &buffer) +void KviQuery::ownMessage(const TQString &buffer) { if(!connection()) { @@ -579,8 +579,8 @@ void KviQuery::ownMessage(const QString &buffer) return; } - KviQCString szName = connection()->encodeText(windowName()); - KviQCString szData = encodeText(buffer); + KviTQCString szName = connection()->encodeText(windowName()); + KviTQCString szData = encodeText(buffer); const char * d = szData.data(); if(!d)return; @@ -599,20 +599,20 @@ void KviQuery::ownMessage(const QString &buffer) case KviCryptEngine::Encrypted: if(!connection()->sendFmtData("PRIVMSG %s :%s",szName.data(),encrypted.ptr()))return; m_pConsole->outputPrivmsg(this,KVI_OUT_OWNPRIVMSGCRYPTED, - QString::null,QString::null,QString::null,buffer,KviConsole::NoNotifications); + TQString(),TQString(),TQString(),buffer,KviConsole::NoNotifications); break; case KviCryptEngine::Encoded: { if(!connection()->sendFmtData("PRIVMSG %s :%s",szName.data(),encrypted.ptr()))return; // ugly ,but we must redecode here - QString szRedecoded = decodeText(encrypted.ptr()); + TQString szRedecoded = decodeText(encrypted.ptr()); m_pConsole->outputPrivmsg(this,KVI_OUT_OWNPRIVMSG, - QString::null,QString::null,QString::null,szRedecoded,KviConsole::NoNotifications); + TQString(),TQString(),TQString(),szRedecoded,KviConsole::NoNotifications); } break; default: // also case KviCryptEngine::EncryptError { - QString szEngineError = cryptSessionInfo()->pEngine->lastError(); + TQString szEngineError = cryptSessionInfo()->pEngine->lastError(); output(KVI_OUT_SYSTEMERROR, __tr2qs("The crypto engine was unable to encrypt the current message (%Q): %s, no data sent to the server"), &buffer,&szEngineError); @@ -623,9 +623,9 @@ void KviQuery::ownMessage(const QString &buffer) return; } else { d++; //eat the escape code - QString tmp = buffer.right(buffer.length() - 1); + TQString tmp = buffer.right(buffer.length() - 1); if(!connection()->sendFmtData("PRIVMSG %s :%s",szName.data(),d))return; - m_pConsole->outputPrivmsg(this,KVI_OUT_OWNPRIVMSG,QString::null,QString::null,QString::null,tmp,KviConsole::NoNotifications); + m_pConsole->outputPrivmsg(this,KVI_OUT_OWNPRIVMSG,TQString(),TQString(),TQString(),tmp,KviConsole::NoNotifications); userAction(connection()->currentNickName(),KVI_USERACTION_PRIVMSG); return; } @@ -634,23 +634,23 @@ void KviQuery::ownMessage(const QString &buffer) #endif if(!connection()->sendFmtData("PRIVMSG %s :%s",szName.data(),d))return; - m_pConsole->outputPrivmsg(this,KVI_OUT_OWNPRIVMSG,QString::null,QString::null,QString::null,buffer,KviConsole::NoNotifications); + m_pConsole->outputPrivmsg(this,KVI_OUT_OWNPRIVMSG,TQString(),TQString(),TQString(),buffer,KviConsole::NoNotifications); userAction(connection()->currentNickName(),KVI_USERACTION_PRIVMSG); } -void KviQuery::ownAction(const QString &buffer) +void KviQuery::ownAction(const TQString &buffer) { if(!connection()) { outputNoFmt(KVI_OUT_SYSTEMWARNING,__tr2qs("This query has no active targets, no message sent")); } else { - KviQCString szBuffer = encodeText(buffer); + KviTQCString szBuffer = encodeText(buffer); if(!szBuffer.data())return; - KviQCString sz = connection()->encodeText(windowName()); + KviTQCString sz = connection()->encodeText(windowName()); if(sz.isEmpty())return; if(!connection()->sendFmtData("PRIVMSG %s :%cACTION %s%c", sz.data(),0x01,szBuffer.data(),0x01))return; - if(KVS_TRIGGER_EVENT_1_HALTED(KviEvent_OnMeAction,this,QString(szBuffer.data())))return; + if(KVS_TRIGGER_EVENT_1_HALTED(KviEvent_OnMeAction,this,TQString(szBuffer.data())))return; output(KVI_OUT_ACTION,"\r!nc\r%Q\r %Q",&(connection()->currentNickName()),&buffer); m_pUserListView->userAction(connection()->currentNickName(),KVI_USERACTION_ACTION); } diff --git a/src/kvirc/ui/kvi_query.h b/src/kvirc/ui/kvi_query.h index ba087acb..3b1a81bc 100644 --- a/src/kvirc/ui/kvi_query.h +++ b/src/kvirc/ui/kvi_query.h @@ -1,5 +1,5 @@ -#ifndef _KVI_QUERY_H_ -#define _KVI_QUERY_H_ +#ifndef _KVI_TQUERY_H_ +#define _KVI_TQUERY_H_ //============================================================================= // // File : kvi_query.h @@ -36,56 +36,57 @@ class KviConsole; class KviConfig; -class QSplitter; +class TQSplitter; class KviWindowToolPageButton; -#define KVI_QUERY_FLAG_DEAD 1 +#define KVI_TQUERY_FLAG_DEAD 1 class KVIRC_API KviQuery : public KviWindow { Q_OBJECT + TQ_OBJECT public: - KviQuery(KviFrame * lpFrm,KviConsole * lpConsole,const QString &nick); + KviQuery(KviFrame * lpFrm,KviConsole * lpConsole,const TQString &nick); ~KviQuery(); protected: KviUserListView * m_pUserListView; KviWindowToolPageButton * m_pListViewButton; int m_iFlags; KviThemedLabel * m_pLabel; - QFrame * m_pButtonGrid; + TQFrame * m_pButtonGrid; protected: - virtual QPixmap * myIconPtr(); + virtual TQPixmap * myIconPtr(); virtual void fillCaptionBuffers(); - virtual void resizeEvent(QResizeEvent *e); + virtual void resizeEvent(TQResizeEvent *e); virtual void loadProperties(KviConfig * cfg); virtual void saveProperties(KviConfig * cfg); - virtual void getBaseLogFileName(QString &buffer); + virtual void getBaseLogFileName(TQString &buffer); virtual void triggerCreationEvents(); public: void setDeadQuery(); void setAliveQuery(); - bool isDeadQuery(){ return m_iFlags & KVI_QUERY_FLAG_DEAD; }; - virtual QSize sizeHint() const; - virtual const QString & target(){ return windowName(); }; + bool isDeadQuery(){ return m_iFlags & KVI_TQUERY_FLAG_DEAD; }; + virtual TQSize tqsizeHint() const; + virtual const TQString & target(){ return windowName(); }; virtual void applyOptions(); - KviUserListEntry * setTarget(const QString &nick,const QString &user,const QString &host); + KviUserListEntry * setTarget(const TQString &nick,const TQString &user,const TQString &host); void userAction(KviIrcMask *user,unsigned int uActionType); - void userAction(const QString &nick,unsigned int uActionType); - void userAction(const QString &nick,const QString &user,const QString &host,unsigned int uActionType); - bool nickChange(const QString &oldNick,const QString &newNick); - void ownMessage(const QString &buffer); - void ownAction(const QString &buffer); + void userAction(const TQString &nick,unsigned int uActionType); + void userAction(const TQString &nick,const TQString &user,const TQString &host,unsigned int uActionType); + bool nickChange(const TQString &oldNick,const TQString &newNick); + void ownMessage(const TQString &buffer); + void ownAction(const TQString &buffer); int selectedCount(){ return m_pUserListView->selectedCount(); }; - bool avatarChanged(const QString &nick){ return m_pUserListView->avatarChanged(nick); }; - void notifyCommonChannels(const QString &nick,const QString &user,const QString &host,int iChans,const QString &szChans); + bool avatarChanged(const TQString &nick){ return m_pUserListView->avatarChanged(nick); }; + void notifyCommonChannels(const TQString &nick,const TQString &user,const TQString &host,int iChans,const TQString &szChans); void showListView(bool bShow); void mergeQuery(KviQuery * q); void updateLabelText(); - QFrame * buttonContainer() { return (QFrame*)m_pButtonGrid; }; + TQFrame * buttonContainer() { return (TQFrame*)m_pButtonGrid; }; protected: - void notifyTargetChange(const QString &oldNick,const QString &oldUser,const QString &oldHost,const QString &nick,const QString &user,const QString &host); - QString getInfoLabelText(); - QString getInfoLabelTipText(); + void notifyTargetChange(const TQString &oldNick,const TQString &oldUser,const TQString &oldHost,const TQString &nick,const TQString &user,const TQString &host); + TQString getInfoLabelText(); + TQString getInfoLabelTipText(); protected slots: void textViewRightClicked(); void toggleListView(); diff --git a/src/kvirc/ui/kvi_scriptbutton.cpp b/src/kvirc/ui/kvi_scriptbutton.cpp index 7b4a8e71..d26c7237 100644 --- a/src/kvirc/ui/kvi_scriptbutton.cpp +++ b/src/kvirc/ui/kvi_scriptbutton.cpp @@ -30,12 +30,12 @@ #include "kvi_kvs_script.h" -KviScriptUserButton::KviScriptUserButton(QWidget * par,const char * name) +KviScriptUserButton::KviScriptUserButton(TQWidget * par,const char * name) : KviStyledToolButton(par,name) { m_pScript = 0; // setAutoRaise(true); - connect(this,SIGNAL(clicked()),this,SLOT(btnClicked())); + connect(this,TQT_SIGNAL(clicked()),this,TQT_SLOT(btnClicked())); setAutoRaise(true); } @@ -60,7 +60,7 @@ void KviScriptUserButton::btnClicked() { KviWindow * pWnd = window(); if(!pWnd)return; // ops... - QPoint pos = mapToGlobal(QPoint(0,height())); + TQPoint pos = mapToGlobal(TQPoint(0,height())); KviKvsVariantList vList; vList.append((kvs_int_t)pos.x()); @@ -69,7 +69,7 @@ void KviScriptUserButton::btnClicked() } /* -KviIrcToolBarScriptButton::KviIrcToolBarScriptButton(QToolBar * p,const char * name) +KviIrcToolBarScriptButton::KviIrcToolBarScriptButton(TQToolBar * p,const char * name) : KviScriptUserButton(p,name) { setAutoRaise(true); @@ -85,7 +85,7 @@ KviWindow * KviIrcToolBarScriptButton::window() } */ -KviWindowScriptButton::KviWindowScriptButton(QWidget * p,KviWindow * wnd,const char * name) +KviWindowScriptButton::KviWindowScriptButton(TQWidget * p,KviWindow * wnd,const char * name) : KviScriptUserButton(p,name) { m_pWnd = wnd; diff --git a/src/kvirc/ui/kvi_scriptbutton.h b/src/kvirc/ui/kvi_scriptbutton.h index 79740c86..a973416a 100644 --- a/src/kvirc/ui/kvi_scriptbutton.h +++ b/src/kvirc/ui/kvi_scriptbutton.h @@ -26,8 +26,8 @@ #include "kvi_string.h" #include "kvi_styled_controls.h" -#include -#include +#include +#include class KviKvsScript; class KviWindow; @@ -35,14 +35,15 @@ class KviWindow; class KVIRC_API KviScriptUserButton : public KviStyledToolButton { Q_OBJECT + TQ_OBJECT public: - KviScriptUserButton(QWidget * par,const char * name); + KviScriptUserButton(TQWidget * par,const char * name); ~KviScriptUserButton(); protected: KviKvsScript * m_pScript; public: void setButtonCode(KviKvsScript * pScript); - virtual void setButtonPixmap(const QPixmap & pix){ setIconSet(pix); }; + virtual void setButtonPixmap(const TQPixmap & pix){ setIconSet(pix); }; void setButtonText(const char * text){ setTextLabel(text); }; virtual KviWindow * window(); protected slots: @@ -53,8 +54,9 @@ protected slots: class KVIRC_API KviIrcToolBarScriptButton : public KviScriptUserButton { Q_OBJECT + TQ_OBJECT public: - KviIrcToolBarScriptButton(QToolBar * p,const char * name); + KviIrcToolBarScriptButton(TQToolBar * p,const char * name); ~KviIrcToolBarScriptButton(); protected: KviStr m_szCode; @@ -66,13 +68,14 @@ public: class KVIRC_API KviWindowScriptButton : public KviScriptUserButton { Q_OBJECT + TQ_OBJECT public: - KviWindowScriptButton(QWidget * p,KviWindow * wnd,const char * name); + KviWindowScriptButton(TQWidget * p,KviWindow * wnd,const char * name); ~KviWindowScriptButton(); protected: KviWindow * m_pWnd; public: - virtual void setButtonPixmap(const QPixmap & pix){ setIconSet(pix); setUsesBigPixmap(false); }; + virtual void setButtonPixmap(const TQPixmap & pix){ setIconSet(pix); setUsesBigPixmap(false); }; virtual KviWindow * window(){ return m_pWnd; }; }; diff --git a/src/kvirc/ui/kvi_scripteditor.cpp b/src/kvirc/ui/kvi_scripteditor.cpp index f94000da..7f557934 100644 --- a/src/kvirc/ui/kvi_scripteditor.cpp +++ b/src/kvirc/ui/kvi_scripteditor.cpp @@ -31,8 +31,8 @@ #include "kvi_modulemanager.h" -KviScriptEditor::KviScriptEditor(QWidget * par) -: QWidget(par) +KviScriptEditor::KviScriptEditor(TQWidget * par) +: TQWidget(par) { } @@ -43,22 +43,22 @@ KviScriptEditor::~KviScriptEditor() void KviScriptEditor::setText(const char * txt) { - setText(KviQCString(txt)); + setText(KviTQCString(txt)); } -void KviScriptEditor::setText(const KviQCString &txt) +void KviScriptEditor::setText(const KviTQCString &txt) { } -void KviScriptEditor::setText(const QString &txt) +void KviScriptEditor::setText(const TQString &txt) { - setText(KviQCString(txt.utf8())); + setText(KviTQCString(txt.utf8())); } -void KviScriptEditor::setFindText(const QString &text) +void KviScriptEditor::setFindText(const TQString &text) { } -void KviScriptEditor::setInfoText(const QString &text) +void KviScriptEditor::setInfoText(const TQString &text) { } @@ -66,11 +66,11 @@ void KviScriptEditor::setFindLineeditReadOnly(bool b) { } -void KviScriptEditor::getText(KviQCString &txt) +void KviScriptEditor::getText(KviTQCString &txt) { } -void KviScriptEditor::setCursorPosition(QPoint) +void KviScriptEditor::setCursorPosition(TQPoint) { } @@ -79,28 +79,28 @@ bool KviScriptEditor::isModified() return false; } -QPoint KviScriptEditor::getCursor() +TQPoint KviScriptEditor::getCursor() { - return QPoint(0,0); + return TQPoint(0,0); } -void KviScriptEditor::getText(QString &txt) +void KviScriptEditor::getText(TQString &txt) { - KviQCString tmp; + KviTQCString tmp; getText(tmp); - txt = QString::fromUtf8(tmp.data()); + txt = TQString::fromUtf8(tmp.data()); } -KviScriptEditor * KviScriptEditor::getDummyEditor(QWidget * par) +KviScriptEditor * KviScriptEditor::getDummyEditor(TQWidget * par) { return new KviScriptEditor(par); } -static KviScriptEditor * (*editorModuleCreateScriptEditor)(QWidget *); +static KviScriptEditor * (*editorModuleCreateScriptEditor)(TQWidget *); static void (*editorModuleDestroyScriptEditor)(KviScriptEditor *); -KviScriptEditor * KviScriptEditor::createInstance(QWidget * par) +KviScriptEditor * KviScriptEditor::createInstance(TQWidget * par) { KviModule * m = g_pModuleManager->getModule("editor"); // If the module can't be loaded...return a dummy widget @@ -108,7 +108,7 @@ KviScriptEditor * KviScriptEditor::createInstance(QWidget * par) if(!m)return KviScriptEditor::getDummyEditor(par); // dummy implementation - editorModuleCreateScriptEditor = (KviScriptEditor * (*)(QWidget *)) m->getSymbol("editor_module_createScriptEditor"); + editorModuleCreateScriptEditor = (KviScriptEditor * (*)(TQWidget *)) m->getSymbol("editor_module_createScriptEditor"); if(!editorModuleCreateScriptEditor)return KviScriptEditor::getDummyEditor(par); diff --git a/src/kvirc/ui/kvi_scripteditor.h b/src/kvirc/ui/kvi_scripteditor.h index e9f04c26..0039d24b 100644 --- a/src/kvirc/ui/kvi_scripteditor.h +++ b/src/kvirc/ui/kvi_scripteditor.h @@ -24,8 +24,8 @@ // #include "kvi_settings.h" -#include -#include +#include +#include #include "kvi_qcstring.h" // @@ -39,29 +39,30 @@ // -class KVIRC_API KviScriptEditor : public QWidget +class KVIRC_API KviScriptEditor : public TQWidget { Q_OBJECT + TQ_OBJECT protected: - KviScriptEditor(QWidget * par); + KviScriptEditor(TQWidget * par); ~KviScriptEditor(); protected: - QLineEdit * m_pFindLineedit; + TQLineEdit * m_pFindLineedit; public: virtual void setText(const char * txt); - virtual void setText(const KviQCString &txt); - virtual void setText(const QString &txt); - virtual void getText(KviQCString &txt); - virtual void getText(QString &txt); - virtual void setInfoText(const QString &text); - virtual void setFindText(const QString &text); - virtual void setCursorPosition(QPoint); - virtual QPoint getCursor(); + virtual void setText(const KviTQCString &txt); + virtual void setText(const TQString &txt); + virtual void getText(KviTQCString &txt); + virtual void getText(TQString &txt); + virtual void setInfoText(const TQString &text); + virtual void setFindText(const TQString &text); + virtual void setCursorPosition(TQPoint); + virtual TQPoint getCursor(); virtual void setFindLineeditReadOnly(bool b); virtual bool isModified(); - static KviScriptEditor * getDummyEditor(QWidget * par); - static KviScriptEditor * createInstance(QWidget * par); + static KviScriptEditor * getDummyEditor(TQWidget * par); + static KviScriptEditor * createInstance(TQWidget * par); static void destroyInstance(KviScriptEditor * e); }; diff --git a/src/kvirc/ui/kvi_selectors.cpp b/src/kvirc/ui/kvi_selectors.cpp index f8c9af9f..17a9ddf8 100644 --- a/src/kvirc/ui/kvi_selectors.cpp +++ b/src/kvirc/ui/kvi_selectors.cpp @@ -33,15 +33,15 @@ #include "kvi_filedialog.h" #include "kvi_kvs_script.h" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include "kvi_tal_popupmenu.h" -KviBoolSelector::KviBoolSelector(QWidget * par,const QString & txt,bool *pOption,bool bEnabled) +KviBoolSelector::KviBoolSelector(TQWidget * par,const TQString & txt,bool *pOption,bool bEnabled) : KviStyledCheckBox(txt,par), KviSelectorInterface() { setEnabled(bEnabled); @@ -59,14 +59,14 @@ void KviBoolSelector::commit() *m_pOption = isChecked(); } -KviUIntSelector::KviUIntSelector(QWidget * par,const QString & txt,unsigned int *pOption, +KviUIntSelector::KviUIntSelector(TQWidget * par,const TQString & txt,unsigned int *pOption, unsigned int uLowBound,unsigned int uHighBound,unsigned int uDefault,bool bEnabled,bool bShortInt) : KviTalHBox(par) , KviSelectorInterface() { - m_pLabel = new QLabel(txt,this); - //m_pLineEdit = new QLineEdit(this); + m_pLabel = new TQLabel(txt,this); + //m_pLineEdit = new TQLineEdit(this); //m_pLineEdit->setMaximumWidth(150); - m_pSpinBox = new QSpinBox(this); + m_pSpinBox = new TQSpinBox(this); m_bIsShortInt = bShortInt; @@ -89,12 +89,12 @@ KviUIntSelector::KviUIntSelector(QWidget * par,const QString & txt,unsigned int setStretchFactor(m_pLabel,1); } -void KviUIntSelector::setPrefix(const QString & txt) +void KviUIntSelector::setPrefix(const TQString & txt) { m_pSpinBox->setPrefix(txt); } -void KviUIntSelector::setSuffix(const QString & txt) +void KviUIntSelector::setSuffix(const TQString & txt) { m_pSpinBox->setSuffix(txt); } @@ -125,13 +125,13 @@ void KviUIntSelector::setEnabled(bool bEnabled) -KviStringSelector::KviStringSelector(QWidget * par,const QString & txt,QString * pOption,bool bEnabled) +KviStringSelector::KviStringSelector(TQWidget * par,const TQString & txt,TQString * pOption,bool bEnabled) : KviTalHBox(par) , KviSelectorInterface() { - m_pLabel = new QLabel(txt,this); - m_pLineEdit = new QLineEdit(this); + m_pLabel = new TQLabel(txt,this); + m_pLineEdit = new TQLineEdit(this); //m_pLineEdit->setMinimumWidth(200); - QString tmp = *pOption; + TQString tmp = *pOption; m_pLineEdit->setText(tmp); setSpacing(4); @@ -148,7 +148,7 @@ KviStringSelector::~KviStringSelector() void KviStringSelector::commit() { - QString tmp = m_pLineEdit->text(); + TQString tmp = m_pLineEdit->text(); *m_pOption = tmp; } @@ -159,20 +159,20 @@ void KviStringSelector::setEnabled(bool bEnabled) m_pLabel->setEnabled(bEnabled); } -void KviStringSelector::setText(const QString& text){ +void KviStringSelector::setText(const TQString& text){ m_pLineEdit->setText(text); } -KviPasswordSelector::KviPasswordSelector(QWidget * par,const QString & txt,QString *pOption,bool bEnabled) +KviPasswordSelector::KviPasswordSelector(TQWidget * par,const TQString & txt,TQString *pOption,bool bEnabled) : KviStringSelector(par,txt,pOption,bEnabled) { - m_pLineEdit->setEchoMode(QLineEdit::Password); + m_pLineEdit->setEchoMode(TQLineEdit::Password); } -KviPixmapPreview::KviPixmapPreview(QWidget * par) +KviPixmapPreview::KviPixmapPreview(TQWidget * par) : KviTalScrollView(par) { m_pPixmap = 0; @@ -200,7 +200,7 @@ void KviPixmapPreview::setPixmap(KviPixmap * pix) update(); } -void KviPixmapPreview::drawContents(QPainter * p, int clipx, int clipy, int clipw, int cliph) +void KviPixmapPreview::drawContents(TQPainter * p, int clipx, int clipy, int clipw, int cliph) { if(m_pPixmap) { @@ -212,31 +212,31 @@ void KviPixmapPreview::drawContents(QPainter * p, int clipx, int clipy, int clip } -KviPixmapSelector::KviPixmapSelector(QWidget * par,const QString & txt,KviPixmap * pOption,bool bEnabled) -: QWidget(par), KviSelectorInterface() +KviPixmapSelector::KviPixmapSelector(TQWidget * par,const TQString & txt,KviPixmap * pOption,bool bEnabled) +: TQWidget(par), KviSelectorInterface() { - QGridLayout * g = new QGridLayout(this,3,2,4,8); + TQGridLayout * g = new TQGridLayout(this,3,2,4,8); m_pOption = pOption; m_localPixmap = *pOption; m_pCheckBox = new KviStyledCheckBox(txt,this); m_pCheckBox->setChecked(m_localPixmap.pixmap()); - connect(m_pCheckBox,SIGNAL(toggled(bool)),this,SLOT(checkBoxToggled(bool))); + connect(m_pCheckBox,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(checkBoxToggled(bool))); g->addMultiCellWidget(m_pCheckBox,0,0,0,1); m_pPreview = new KviPixmapPreview(this); m_pPreview->setPixmap(&m_localPixmap); g->addMultiCellWidget(m_pPreview,1,1,0,1); - m_pFileNameLabel = new QLabel(this); - m_pFileNameLabel->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken); + m_pFileNameLabel = new TQLabel(this); + m_pFileNameLabel->setFrameStyle(TQFrame::StyledPanel | TQFrame::Sunken); if(m_localPixmap.pixmap())m_pFileNameLabel->setText(m_localPixmap.path()); g->addWidget(m_pFileNameLabel,2,0); - m_pChooseButton = new QPushButton("...",this); + m_pChooseButton = new TQPushButton("...",this); g->addWidget(m_pChooseButton,2,1); - connect(m_pChooseButton,SIGNAL(clicked()),this,SLOT(choosePixmap())); + connect(m_pChooseButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(choosePixmap())); g->setRowStretch(1,1); g->setColStretch(0,1); @@ -267,7 +267,7 @@ void KviPixmapSelector::commit() void KviPixmapSelector::choosePixmap() { // KviStr tmp; - QString tmp; + TQString tmp; if(KviFileDialog::askForOpenFileName(tmp,__tr("Choose an Image File - KVIrc"))) { setImagePath(tmp); @@ -294,7 +294,7 @@ void KviPixmapSelector::setImagePath(const char * path) void KviPixmapSelector::setEnabled(bool bEnabled) { - QWidget::setEnabled(bEnabled); + TQWidget::setEnabled(bEnabled); m_pCheckBox->setEnabled(bEnabled); m_pPreview->setEnabled(bEnabled && m_pCheckBox->isChecked()); m_pFileNameLabel->setEnabled(bEnabled && m_pCheckBox->isChecked()); @@ -304,17 +304,17 @@ void KviPixmapSelector::setEnabled(bool bEnabled) // FIXME: #warning "Option for DIR_MUST_EXISTS...(this widget could be turned into a file selector too)" -KviFileSelector::KviFileSelector(QWidget * par,const QString & txt,QString * pOption,bool bEnabled,unsigned int uFlags,const QString &szFilter) +KviFileSelector::KviFileSelector(TQWidget * par,const TQString & txt,TQString * pOption,bool bEnabled,unsigned int uFlags,const TQString &szFilter) : KviTalHBox(par), KviSelectorInterface() { m_uFlags = uFlags; m_szFilter = szFilter; - m_pLabel = new QLabel(txt,this); - m_pLineEdit = new QLineEdit(this); + m_pLabel = new TQLabel(txt,this); + m_pLineEdit = new TQLineEdit(this); //m_pLineEdit->setMinimumWidth(200); m_pLineEdit->setText(*pOption); - m_pButton = new QPushButton(__tr2qs("&Browse..."),this); - connect(m_pButton,SIGNAL(clicked()),this,SLOT(browseClicked())); + m_pButton = new TQPushButton(__tr2qs("&Browse..."),this); + connect(m_pButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(browseClicked())); setSpacing(4); setStretchFactor(m_pLineEdit,1); @@ -343,7 +343,7 @@ void KviFileSelector::browseClicked() select(); } -void KviFileSelector::setSelection(const QString &szSelection) +void KviFileSelector::setSelection(const TQString &szSelection) { m_pLineEdit->setText(szSelection); } @@ -352,7 +352,7 @@ void KviFileSelector::setSelection(const QString &szSelection) void KviFileSelector::select() { //KviStr tmp; - QString tmp = *m_pOption; + TQString tmp = *m_pOption; if(m_uFlags & ChooseSaveFileName) { if(KviFileDialog::askForSaveFileName(tmp,__tr2qs("Choose a File - KVIrc"),tmp,m_szFilter,true,!(m_uFlags & DontConfirmOverwrite))) @@ -371,14 +371,14 @@ void KviFileSelector::select() } -KviDirectorySelector::KviDirectorySelector(QWidget * par,const QString & txt,QString * pOption,bool bEnabled) +KviDirectorySelector::KviDirectorySelector(TQWidget * par,const TQString & txt,TQString * pOption,bool bEnabled) : KviFileSelector(par,txt,pOption,bEnabled) { } void KviDirectorySelector::select() { - QString tmp; + TQString tmp; if(KviFileDialog::askForDirectoryName(tmp,__tr2qs("Choose a Directory - KVIrc"),"")) { m_pLineEdit->setText(tmp); @@ -393,23 +393,23 @@ void KviDirectorySelector::select() -KviStringListSelector::KviStringListSelector(QWidget * par,const QString & txt,QStringList * pOption,bool bEnabled) +KviStringListSelector::KviStringListSelector(TQWidget * par,const TQString & txt,TQStringList * pOption,bool bEnabled) : KviTalVBox(par), KviSelectorInterface() { - m_pLabel = new QLabel(txt,this); + m_pLabel = new TQLabel(txt,this); m_pListBox = new KviTalListBox(this); - m_pLineEdit = new QLineEdit(this); - connect(m_pLineEdit,SIGNAL(textChanged(const QString &)),this,SLOT(textChanged(const QString &))); - connect(m_pLineEdit,SIGNAL(returnPressed()),this,SLOT(addClicked())); + m_pLineEdit = new TQLineEdit(this); + connect(m_pLineEdit,TQT_SIGNAL(textChanged(const TQString &)),this,TQT_SLOT(textChanged(const TQString &))); + connect(m_pLineEdit,TQT_SIGNAL(returnPressed()),this,TQT_SLOT(addClicked())); KviTalHBox * hBox = new KviTalHBox(this); - m_pAddButton = new QPushButton(__tr2qs("A&dd"),hBox); - connect(m_pAddButton,SIGNAL(clicked()),this,SLOT(addClicked())); - m_pRemoveButton = new QPushButton(__tr2qs("Re&move"),hBox); - connect(m_pRemoveButton,SIGNAL(clicked()),this,SLOT(removeClicked())); + m_pAddButton = new TQPushButton(__tr2qs("A&dd"),hBox); + connect(m_pAddButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(addClicked())); + m_pRemoveButton = new TQPushButton(__tr2qs("Re&move"),hBox); + connect(m_pRemoveButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(removeClicked())); m_pOption = pOption; m_pListBox->insertStringList(*pOption); m_pListBox->setSelectionMode(KviTalListBox::Extended); - connect(m_pListBox,SIGNAL(selectionChanged()),this,SLOT(selectionChanged())); + connect(m_pListBox,TQT_SIGNAL(selectionChanged()),this,TQT_SLOT(selectionChanged())); setSpacing(4); setStretchFactor(m_pListBox,1); setEnabled(bEnabled); @@ -434,7 +434,7 @@ void KviStringListSelector::selectionChanged() m_pRemoveButton->setEnabled(isEnabled() && bSomeSelected); } -void KviStringListSelector::textChanged(const QString &str) +void KviStringListSelector::textChanged(const TQString &str) { str.stripWhiteSpace(); m_pAddButton->setEnabled((str.length() > 0) && isEnabled()); @@ -445,7 +445,7 @@ void KviStringListSelector::setEnabled(bool bEnabled) KviTalVBox::setEnabled(bEnabled); m_pLineEdit->setEnabled(bEnabled); m_pLabel->setEnabled(bEnabled); - QString txt = m_pLineEdit->text(); + TQString txt = m_pLineEdit->text(); txt.stripWhiteSpace(); m_pAddButton->setEnabled(bEnabled && (txt.length() > 0)); unsigned int uCount = m_pListBox->count(); @@ -468,7 +468,7 @@ void KviStringListSelector::commit() m_pOption->clear(); for(unsigned int u=0;utext(u); + TQString str = m_pListBox->text(u); str.stripWhiteSpace(); if(str.length() > 0)m_pOption->append(str); } @@ -476,7 +476,7 @@ void KviStringListSelector::commit() void KviStringListSelector::addClicked() { - QString str = m_pLineEdit->text(); + TQString str = m_pLineEdit->text(); str.stripWhiteSpace(); if(str.length() > 0)m_pListBox->insertItem(str); m_pLineEdit->setText(""); @@ -492,14 +492,14 @@ void KviStringListSelector::removeClicked() } -KviColorSelector::KviColorSelector(QWidget * par,const QString & txt,QColor * pOption,bool bEnabled) +KviColorSelector::KviColorSelector(TQWidget * par,const TQString & txt,TQColor * pOption,bool bEnabled) : KviTalHBox(par), KviSelectorInterface() { - m_pLabel = new QLabel(txt,this); + m_pLabel = new TQLabel(txt,this); - m_pButton = new QPushButton(" ",this); + m_pButton = new TQPushButton(" ",this); // m_pButton->setMinimumWidth(150); - connect(m_pButton,SIGNAL(clicked()),this,SLOT(changeClicked())); + connect(m_pButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(changeClicked())); setSpacing(4); setStretchFactor(m_pLabel,1); @@ -511,25 +511,25 @@ KviColorSelector::KviColorSelector(QWidget * par,const QString & txt,QColor * pO setEnabled(bEnabled); } -void KviColorSelector::setButtonPalette(QColor * pOption) +void KviColorSelector::setButtonPalette(TQColor * pOption) { - QPalette pal(*pOption,colorGroup().background()); + TQPalette pal(*pOption,tqcolorGroup().background()); m_memColor = *pOption; m_pButton->setPalette(pal); - QPixmap pix(16,16); + TQPixmap pix(16,16); pix.fill(*pOption); m_pButton->setIconSet(pix); } -void KviColorSelector::forceColor(QColor clr) +void KviColorSelector::forceColor(TQColor clr) { setButtonPalette(&clr); } void KviColorSelector::changeClicked() { - QColor tmp = QColorDialog::getColor(m_memColor); + TQColor tmp = TQColorDialog::getColor(m_memColor); if(tmp.isValid())setButtonPalette(&tmp); } @@ -546,14 +546,14 @@ void KviColorSelector::setEnabled(bool bEnabled) } -KviFontSelector::KviFontSelector(QWidget * par,const QString & txt,QFont * pOption,bool bEnabled) +KviFontSelector::KviFontSelector(TQWidget * par,const TQString & txt,TQFont * pOption,bool bEnabled) : KviTalHBox(par), KviSelectorInterface() { - m_pLabel = new QLabel(txt,this); + m_pLabel = new TQLabel(txt,this); - m_pButton = new QPushButton("",this); + m_pButton = new TQPushButton("",this); // m_pButton->setMinimumWidth(150); - connect(m_pButton,SIGNAL(clicked()),this,SLOT(changeClicked())); + connect(m_pButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(changeClicked())); setSpacing(4); setStretchFactor(m_pLabel,1); @@ -565,7 +565,7 @@ KviFontSelector::KviFontSelector(QWidget * par,const QString & txt,QFont * pOpti setEnabled(bEnabled); } -void KviFontSelector::setButtonFont(QFont * pOption) +void KviFontSelector::setButtonFont(TQFont * pOption) { m_pButton->setText(pOption->family()); m_pButton->setFont(*pOption); @@ -574,7 +574,7 @@ void KviFontSelector::setButtonFont(QFont * pOption) void KviFontSelector::changeClicked() { bool bOk; - QFont tmp = QFontDialog::getFont(&bOk,m_pButton->font()); + TQFont tmp = TQFontDialog::getFont(&bOk,m_pButton->font()); if(bOk)setButtonFont(&tmp); } @@ -594,14 +594,14 @@ void KviFontSelector::setEnabled(bool bEnabled) -KviMircTextColorSelector::KviMircTextColorSelector(QWidget * par,const QString &txt,unsigned int * uFore,unsigned int * uBack,bool bEnabled) +KviMircTextColorSelector::KviMircTextColorSelector(TQWidget * par,const TQString &txt,unsigned int * uFore,unsigned int * uBack,bool bEnabled) : KviTalHBox(par), KviSelectorInterface() { - m_pLabel = new QLabel(txt,this); + m_pLabel = new TQLabel(txt,this); - m_pButton = new QPushButton(__tr2qs("Sample Text"),this); + m_pButton = new TQPushButton(__tr2qs("Sample Text"),this); // m_pButton->setMinimumWidth(150); - connect(m_pButton,SIGNAL(clicked()),this,SLOT(buttonClicked())); + connect(m_pButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(buttonClicked())); setSpacing(4); setStretchFactor(m_pLabel,1); @@ -619,14 +619,14 @@ KviMircTextColorSelector::KviMircTextColorSelector(QWidget * par,const QString & m_pContextPopup = new KviTalPopupMenu(this); m_pForePopup = new KviTalPopupMenu(this); - connect(m_pForePopup,SIGNAL(activated(int)),this,SLOT(foreSelected(int))); + connect(m_pForePopup,TQT_SIGNAL(activated(int)),this,TQT_SLOT(foreSelected(int))); int i; for(i=0;iinsertItem(tmp,QString("x")); + int id = m_pForePopup->insertItem(tmp,TQString("x")); #else int id = m_pForePopup->insertItem(tmp); #endif @@ -635,15 +635,15 @@ KviMircTextColorSelector::KviMircTextColorSelector(QWidget * par,const QString & m_pContextPopup->insertItem(__tr2qs("Foreground"),m_pForePopup); m_pBackPopup = new KviTalPopupMenu(this); - connect(m_pBackPopup,SIGNAL(activated(int)),this,SLOT(backSelected(int))); + connect(m_pBackPopup,TQT_SIGNAL(activated(int)),this,TQT_SLOT(backSelected(int))); i = m_pBackPopup->insertItem(__tr2qs("Transparent")); m_pBackPopup->setItemParameter(i,KVI_TRANSPARENT); for(i=0;iinsertItem(tmp,QString("x")); + int id = m_pForePopup->insertItem(tmp,TQString("x")); #else int id = m_pBackPopup->insertItem(tmp); #endif @@ -671,27 +671,27 @@ void KviMircTextColorSelector::setEnabled(bool bEnabled) void KviMircTextColorSelector::setButtonPalette() { - QPalette pal; + TQPalette pal; if(m_uBack > KVI_MIRCCOLOR_MAX_BACKGROUND) { if(m_uBack != KVI_TRANSPARENT)m_uBack = KVI_TRANSPARENT; pal = palette(); } else { - pal = QPalette(KVI_OPTION_MIRCCOLOR(m_uBack)); + pal = TQPalette(KVI_OPTION_MIRCCOLOR(m_uBack)); } if(m_uFore > KVI_MIRCCOLOR_MAX_FOREGROUND)m_uFore = KVI_MIRCCOLOR_MAX_FOREGROUND; - pal.setColor(QColorGroup::ButtonText,KVI_OPTION_MIRCCOLOR(m_uFore)); - pal.setColor(QColorGroup::Text,KVI_OPTION_MIRCCOLOR(m_uFore)); + pal.setColor(TQColorGroup::ButtonText,KVI_OPTION_MIRCCOLOR(m_uFore)); + pal.setColor(TQColorGroup::Text,KVI_OPTION_MIRCCOLOR(m_uFore)); m_pButton->setPalette(pal); } void KviMircTextColorSelector::buttonClicked() { - QPoint p = m_pButton->mapToGlobal(QPoint(0,m_pButton->height())); + TQPoint p = m_pButton->mapToGlobal(TQPoint(0,m_pButton->height())); m_pContextPopup->popup(p); } @@ -709,11 +709,11 @@ void KviMircTextColorSelector::backSelected(int id) setButtonPalette(); } -KviSoundSelector::KviSoundSelector(QWidget * par,const QString & txt,QString * pOption,bool bEnabled) +KviSoundSelector::KviSoundSelector(TQWidget * par,const TQString & txt,TQString * pOption,bool bEnabled) :KviFileSelector(par,txt,pOption,bEnabled) { - m_pPlayButton = new QPushButton(__tr2qs("Play"),this); - connect(m_pPlayButton,SIGNAL(clicked()),this,SLOT(playSound())); + m_pPlayButton = new TQPushButton(__tr2qs("Play"),this); + connect(m_pPlayButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(playSound())); } KviSoundSelector::~KviSoundSelector() @@ -731,49 +731,49 @@ void KviSoundSelector::setEnabled(bool bEnabled) m_pPlayButton->setEnabled(bEnabled); } -KviChanListViewItem::KviChanListViewItem(KviTalListView* pList,QString szChan,QString szPass) +KviChanListViewItem::KviChanListViewItem(KviTalListView* pList,TQString szChan,TQString szPass) :KviTalListViewItem(pList,szChan) { m_szPass=szPass; - QString mask; - mask.fill('*',szPass.length()); - setText(1,mask); + TQString tqmask; + tqmask.fill('*',szPass.length()); + setText(1,tqmask); } -KviCahnnelListSelector::KviCahnnelListSelector(QWidget * par,const QString & txt,QStringList * pOption,bool bEnabled) +KviCahnnelListSelector::KviCahnnelListSelector(TQWidget * par,const TQString & txt,TQStringList * pOption,bool bEnabled) : KviTalVBox(par), KviSelectorInterface() { - m_pLabel = new QLabel(txt,this); + m_pLabel = new TQLabel(txt,this); m_pListView = new KviTalListView(this); m_pListView->addColumn(__tr2qs("Channel name")); m_pListView->addColumn(__tr2qs("Channel password")); KviTalHBox* pEditsHBox = new KviTalHBox(this); - m_pChanLineEdit = new QLineEdit(pEditsHBox); - connect(m_pChanLineEdit,SIGNAL(textChanged(const QString &)),this,SLOT(textChanged(const QString &))); - connect(m_pChanLineEdit,SIGNAL(returnPressed()),this,SLOT(addClicked())); + m_pChanLineEdit = new TQLineEdit(pEditsHBox); + connect(m_pChanLineEdit,TQT_SIGNAL(textChanged(const TQString &)),this,TQT_SLOT(textChanged(const TQString &))); + connect(m_pChanLineEdit,TQT_SIGNAL(returnPressed()),this,TQT_SLOT(addClicked())); - m_pPassLineEdit = new QLineEdit(pEditsHBox); - m_pPassLineEdit->setEchoMode(QLineEdit::Password); - connect(m_pPassLineEdit,SIGNAL(textChanged(const QString &)),this,SLOT(textChanged(const QString &))); - connect(m_pPassLineEdit,SIGNAL(returnPressed()),this,SLOT(addClicked())); + m_pPassLineEdit = new TQLineEdit(pEditsHBox); + m_pPassLineEdit->setEchoMode(TQLineEdit::Password); + connect(m_pPassLineEdit,TQT_SIGNAL(textChanged(const TQString &)),this,TQT_SLOT(textChanged(const TQString &))); + connect(m_pPassLineEdit,TQT_SIGNAL(returnPressed()),this,TQT_SLOT(addClicked())); KviTalHBox * hBox = new KviTalHBox(this); - m_pAddButton = new QPushButton(__tr2qs("A&dd"),hBox); - connect(m_pAddButton,SIGNAL(clicked()),this,SLOT(addClicked())); - m_pRemoveButton = new QPushButton(__tr2qs("Re&move"),hBox); - connect(m_pRemoveButton,SIGNAL(clicked()),this,SLOT(removeClicked())); + m_pAddButton = new TQPushButton(__tr2qs("A&dd"),hBox); + connect(m_pAddButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(addClicked())); + m_pRemoveButton = new TQPushButton(__tr2qs("Re&move"),hBox); + connect(m_pRemoveButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(removeClicked())); m_pOption = pOption; - for ( QStringList::Iterator it = pOption->begin(); it != pOption->end(); ++it ) { + for ( TQStringList::Iterator it = pOption->begin(); it != pOption->end(); ++it ) { new KviChanListViewItem(m_pListView,(*it).section(':',0,0),(*it).section(':',1)); } m_pListView->setSelectionMode(KviTalListView::Extended); m_pListView->setAllColumnsShowFocus(TRUE); - connect(m_pListView,SIGNAL(selectionChanged()),this,SLOT(selectionChanged())); + connect(m_pListView,TQT_SIGNAL(selectionChanged()),this,TQT_SLOT(selectionChanged())); setSpacing(4); setStretchFactor(m_pListView,1); setEnabled(bEnabled); @@ -805,7 +805,7 @@ void KviCahnnelListSelector::setEnabled(bool bEnabled) m_pRemoveButton->setEnabled(bEnabled); } -void KviCahnnelListSelector::textChanged(const QString &str) +void KviCahnnelListSelector::textChanged(const TQString &str) { m_pAddButton->setEnabled(!m_pChanLineEdit->text().isEmpty()); } diff --git a/src/kvirc/ui/kvi_selectors.h b/src/kvirc/ui/kvi_selectors.h index 3e620127..ad37ed53 100644 --- a/src/kvirc/ui/kvi_selectors.h +++ b/src/kvirc/ui/kvi_selectors.h @@ -28,27 +28,27 @@ #include "kvi_settings.h" -#include +#include #include "kvi_tal_hbox.h" #include "kvi_tal_vbox.h" -#include -#include +#include +#include #include "kvi_tal_scrollview.h" -#include -#include -#include +#include +#include +#include #include "kvi_tal_listbox.h" #include "kvi_tal_listview.h" -#include -#include -#include +#include +#include +#include #include "kvi_string.h" #include "kvi_pixmap.h" #include "kvi_styled_controls.h" //#ifndef _KVI_SELECTORS_CPP_ -// extern void commitAllSelectors(QWidget * par,const char * classname); +// extern void commitAllSelectors(TQWidget * par,const char * classname); //#endif @@ -57,7 +57,7 @@ // // Note: I'm always learning // Today I have discovered that: -// QObject * o = new KviBoolSelector(...) +// TQObject * o = new KviBoolSelector(...) // ((KviSelectorInterface *)o)->commit() // Does not work (SIGSEGV when jumping into commit(): bad vtable entry) // But the following works fine: @@ -80,8 +80,9 @@ public: class KVIRC_API KviBoolSelector : public KviStyledCheckBox, public KviSelectorInterface { Q_OBJECT + TQ_OBJECT public: - KviBoolSelector(QWidget * par,const QString & txt,bool *pOption,bool bEnabled); + KviBoolSelector(TQWidget * par,const TQString & txt,bool *pOption,bool bEnabled); ~KviBoolSelector(){}; private: bool * m_pOption; @@ -94,56 +95,60 @@ public slots: class KVIRC_API KviStringSelector : public KviTalHBox, public KviSelectorInterface { Q_OBJECT + TQ_OBJECT public: - KviStringSelector(QWidget * par,const QString & txt,QString * pOption,bool bEnabled); + KviStringSelector(TQWidget * par,const TQString & txt,TQString * pOption,bool bEnabled); ~KviStringSelector(); protected: - QLabel * m_pLabel; - QLineEdit * m_pLineEdit; - QString * m_pOption; + TQLabel * m_pLabel; + TQLineEdit * m_pLineEdit; + TQString * m_pOption; public: - void setValidator(QValidator * v){ m_pLineEdit->setValidator(v); }; + void setValidator(TQValidator * v){ m_pLineEdit->setValidator(v); }; void setMinimumLabelWidth(unsigned int uWidth){ m_pLabel->setMinimumWidth(uWidth); }; virtual void commit(); virtual void setEnabled(bool bEnabled); - void setText(const QString& text); + void setText(const TQString& text); }; class KVIRC_API KviPasswordSelector : public KviStringSelector { Q_OBJECT + TQ_OBJECT public: - KviPasswordSelector(QWidget * par,const QString & txt,QString * pOption,bool bEnabled); + KviPasswordSelector(TQWidget * par,const TQString & txt,TQString * pOption,bool bEnabled); ~KviPasswordSelector(){}; }; class KVIRC_API KviPixmapPreview : public KviTalScrollView { Q_OBJECT + TQ_OBJECT public: - KviPixmapPreview(QWidget * par); + KviPixmapPreview(TQWidget * par); ~KviPixmapPreview(); protected: KviPixmap * m_pPixmap; public: void setPixmap(KviPixmap * pix); protected: - virtual void drawContents(QPainter * p, int clipx, int clipy, int clipw, int cliph); + virtual void drawContents(TQPainter * p, int clipx, int clipy, int clipw, int cliph); }; -class KVIRC_API KviPixmapSelector : public QWidget, public KviSelectorInterface +class KVIRC_API KviPixmapSelector : public TQWidget, public KviSelectorInterface { Q_OBJECT + TQ_OBJECT public: - KviPixmapSelector(QWidget * par,const QString & txt,KviPixmap * pOption,bool bEnabled); + KviPixmapSelector(TQWidget * par,const TQString & txt,KviPixmap * pOption,bool bEnabled); ~KviPixmapSelector(); private: KviStyledCheckBox * m_pCheckBox; - QLabel * m_pFileNameLabel; + TQLabel * m_pFileNameLabel; KviPixmapPreview * m_pPreview; - QPushButton * m_pChooseButton; + TQPushButton * m_pChooseButton; KviPixmap * m_pOption; KviPixmap m_localPixmap; public: @@ -158,21 +163,22 @@ protected slots: class KVIRC_API KviUIntSelector : public KviTalHBox, public KviSelectorInterface { Q_OBJECT + TQ_OBJECT public: - KviUIntSelector(QWidget * par,const QString & txt,unsigned int *pOption, + KviUIntSelector(TQWidget * par,const TQString & txt,unsigned int *pOption, unsigned int uLowBound,unsigned int uHighBound,unsigned int uDefault,bool bEnabled,bool bShortInt = false); ~KviUIntSelector(){}; private: - QLabel * m_pLabel; - QSpinBox * m_pSpinBox; + TQLabel * m_pLabel; + TQSpinBox * m_pSpinBox; unsigned int * m_pOption; unsigned int m_uLowBound; unsigned int m_uHighBound; unsigned int m_uDefault; bool m_bIsShortInt; public: - virtual void setPrefix(const QString & txt); - virtual void setSuffix(const QString & txt); + virtual void setPrefix(const TQString & txt); + virtual void setSuffix(const TQString & txt); virtual void commit(); virtual void setEnabled(bool bEnabled); }; @@ -181,8 +187,9 @@ public: class KVIRC_API KviFileSelector : public KviTalHBox, public KviSelectorInterface { Q_OBJECT + TQ_OBJECT public: - KviFileSelector(QWidget * par,const QString & txt,QString * pOption,bool bEnabled,unsigned int uFlags = 0,const QString &szFilter = QString::null); + KviFileSelector(TQWidget * par,const TQString & txt,TQString * pOption,bool bEnabled,unsigned int uFlags = 0,const TQString &szFilter = TQString()); ~KviFileSelector(){}; public: enum Flags { @@ -190,18 +197,18 @@ public: DontConfirmOverwrite = 2 }; protected: - QLabel * m_pLabel; - QLineEdit * m_pLineEdit; - QPushButton * m_pButton; - QString * m_pOption; + TQLabel * m_pLabel; + TQLineEdit * m_pLineEdit; + TQPushButton * m_pButton; + TQString * m_pOption; unsigned int m_uFlags; - QString m_szFilter; + TQString m_szFilter; public: virtual void commit(); virtual void setEnabled(bool bEnabled); - void setSelection(const QString &szSelection); + void setSelection(const TQString &szSelection); signals: - void selectionChanged(const QString &szNewValue); + void selectionChanged(const TQString &szNewValue); private slots: void browseClicked(); protected: @@ -211,8 +218,9 @@ protected: class KVIRC_API KviDirectorySelector : public KviFileSelector { Q_OBJECT + TQ_OBJECT public: - KviDirectorySelector(QWidget * par,const QString & txt,QString * pOption,bool bEnabled); + KviDirectorySelector(TQWidget * par,const TQString & txt,TQString * pOption,bool bEnabled); ~KviDirectorySelector(){}; protected: virtual void select(); @@ -222,21 +230,22 @@ protected: class KVIRC_API KviColorSelector : public KviTalHBox, public KviSelectorInterface { Q_OBJECT + TQ_OBJECT public: - KviColorSelector(QWidget * par,const QString & txt,QColor * pOption,bool bEnabled); + KviColorSelector(TQWidget * par,const TQString & txt,TQColor * pOption,bool bEnabled); ~KviColorSelector(){}; private: - QLabel * m_pLabel; - QColor * m_pOption; - QColor m_memColor; - QPushButton * m_pButton; + TQLabel * m_pLabel; + TQColor * m_pOption; + TQColor m_memColor; + TQPushButton * m_pButton; public: virtual void commit(); virtual void setEnabled(bool bEnabled); - QColor getColor(){ return m_memColor; }; - void forceColor(QColor clr); + TQColor getColor(){ return m_memColor; }; + void forceColor(TQColor clr); private: - void setButtonPalette(QColor * pOption); + void setButtonPalette(TQColor * pOption); private slots: void changeClicked(); }; @@ -244,18 +253,19 @@ private slots: class KVIRC_API KviFontSelector : public KviTalHBox, public KviSelectorInterface { Q_OBJECT + TQ_OBJECT public: - KviFontSelector(QWidget * par,const QString & txt,QFont * pOption,bool bEnabled); + KviFontSelector(TQWidget * par,const TQString & txt,TQFont * pOption,bool bEnabled); ~KviFontSelector(){}; private: - QLabel * m_pLabel; - QFont * m_pOption; - QPushButton * m_pButton; + TQLabel * m_pLabel; + TQFont * m_pOption; + TQPushButton * m_pButton; public: virtual void commit(); virtual void setEnabled(bool bEnabled); private: - void setButtonFont(QFont * pOption); + void setButtonFont(TQFont * pOption); private slots: void changeClicked(); }; @@ -263,21 +273,22 @@ private slots: class KVIRC_API KviStringListSelector : public KviTalVBox, public KviSelectorInterface { Q_OBJECT + TQ_OBJECT public: - KviStringListSelector(QWidget * par,const QString & txt,QStringList * pOption,bool bEnabled); + KviStringListSelector(TQWidget * par,const TQString & txt,TQStringList * pOption,bool bEnabled); ~KviStringListSelector(); private: - QLabel * m_pLabel; + TQLabel * m_pLabel; KviTalListBox * m_pListBox; - QLineEdit * m_pLineEdit; - QPushButton * m_pAddButton; - QPushButton * m_pRemoveButton; - QStringList * m_pOption; + TQLineEdit * m_pLineEdit; + TQPushButton * m_pAddButton; + TQPushButton * m_pRemoveButton; + TQStringList * m_pOption; public: virtual void commit(); virtual void setEnabled(bool bEnabled); private slots: - void textChanged(const QString &str); + void textChanged(const TQString &str); void selectionChanged(); void addClicked(); void removeClicked(); @@ -288,12 +299,13 @@ class KviTalPopupMenu; class KVIRC_API KviMircTextColorSelector : public KviTalHBox, public KviSelectorInterface { Q_OBJECT + TQ_OBJECT public: - KviMircTextColorSelector(QWidget * par,const QString &txt,unsigned int * uFore,unsigned int * uBack,bool bEnabled); + KviMircTextColorSelector(TQWidget * par,const TQString &txt,unsigned int * uFore,unsigned int * uBack,bool bEnabled); ~KviMircTextColorSelector(); private: - QLabel *m_pLabel; - QPushButton * m_pButton; + TQLabel *m_pLabel; + TQPushButton * m_pButton; unsigned int * m_pUFore; unsigned int * m_pUBack; unsigned int m_uFore; @@ -316,11 +328,12 @@ protected: class KVIRC_API KviSoundSelector : public KviFileSelector { Q_OBJECT + TQ_OBJECT public: - KviSoundSelector(QWidget * par,const QString & txt,QString * pOption,bool bEnabled); + KviSoundSelector(TQWidget * par,const TQString & txt,TQString * pOption,bool bEnabled); ~KviSoundSelector(); protected: - QPushButton *m_pPlayButton; + TQPushButton *m_pPlayButton; private slots: void playSound(); public: @@ -330,33 +343,34 @@ public: class KVIRC_API KviChanListViewItem : public KviTalListViewItem { private: - QString m_szPass; + TQString m_szPass; public: - KviChanListViewItem(KviTalListView* pList,QString szChan,QString szPass); + KviChanListViewItem(KviTalListView* pList,TQString szChan,TQString szPass); ~KviChanListViewItem() {}; - const QString& pass() { return m_szPass; } + const TQString& pass() { return m_szPass; } }; class KVIRC_API KviCahnnelListSelector : public KviTalVBox, public KviSelectorInterface { Q_OBJECT + TQ_OBJECT public: - KviCahnnelListSelector(QWidget * par,const QString & txt,QStringList * pOption,bool bEnabled); + KviCahnnelListSelector(TQWidget * par,const TQString & txt,TQStringList * pOption,bool bEnabled); ~KviCahnnelListSelector(); private: - QLabel * m_pLabel; + TQLabel * m_pLabel; KviTalListView * m_pListView; - QLineEdit * m_pChanLineEdit; - QLineEdit * m_pPassLineEdit; - QPushButton * m_pAddButton; - QPushButton * m_pRemoveButton; - QStringList * m_pOption; + TQLineEdit * m_pChanLineEdit; + TQLineEdit * m_pPassLineEdit; + TQPushButton * m_pAddButton; + TQPushButton * m_pRemoveButton; + TQStringList * m_pOption; public: virtual void commit(); virtual void setEnabled(bool bEnabled); private slots: - void textChanged(const QString &str); + void textChanged(const TQString &str); void selectionChanged(); void addClicked(); void removeClicked(); diff --git a/src/kvirc/ui/kvi_splash.cpp b/src/kvirc/ui/kvi_splash.cpp index 7b6b7177..d91be01e 100644 --- a/src/kvirc/ui/kvi_splash.cpp +++ b/src/kvirc/ui/kvi_splash.cpp @@ -29,38 +29,38 @@ #include "kvi_splash.h" #include "kvi_locale.h" #include "kvi_fileutils.h" -#include +#include #ifdef COMPILE_USE_QT4 - #include + #include #endif -#include -#include -#include +#include +#include +#include #include KviSplashScreen::KviSplashScreen() -: QSplashScreen(QPixmap(1,1),Qt::WStyle_NoBorder | Qt::WType_TopLevel | Qt::WStyle_Customize | Qt::WStyle_StaysOnTop | Qt::WStyle_Splash) +: TQSplashScreen(TQPixmap(1,1),TQt::WStyle_NoBorder | TQt::WType_TopLevel | TQt::WStyle_Customize | TQt::WStyle_StaysOnTop | TQt::WStyle_Splash) { - QString szPix; - QPixmap * pix = 0; + TQString szPix; + TQPixmap * pix = 0; // check for the current theme splash screen pointer - QString szPointerFile; + TQString szPointerFile; g_pApp->getLocalKvircDirectory(szPointerFile,KviApp::Themes,"current-splash"); if(KviFileUtils::fileExists(szPointerFile)) { - QString szBuf; + TQString szBuf; KviFileUtils::readFile(szPointerFile,szBuf); if(!szBuf.isEmpty()) { g_pApp->getLocalKvircDirectory(szPix,KviApp::Themes,szBuf); - KviQString::ensureLastCharIs(szPix,KVI_PATH_SEPARATOR_CHAR); + KviTQString::ensureLastCharIs(szPix,KVI_PATH_SEPARATOR_CHAR); szPix.append("kvi_splash.png"); - pix = new QPixmap(szPix); + pix = new TQPixmap(szPix); if(pix->isNull()) { // no way.. @@ -69,9 +69,9 @@ KviSplashScreen::KviSplashScreen() } else { // else we might have a themed splash screen // g_pApp->getLocalKvircDirectory(szPix,KviApp::Themes,szBuf); - KviQString::ensureLastCharIs(szPix,KVI_PATH_SEPARATOR_CHAR); + KviTQString::ensureLastCharIs(szPix,KVI_PATH_SEPARATOR_CHAR); szPix.append("kvi_splash_overlay.png"); - m_pOverlay = new QPixmap(szPix); + m_pOverlay = new TQPixmap(szPix); if(m_pOverlay->isNull()) { // no way.. @@ -88,39 +88,39 @@ KviSplashScreen::KviSplashScreen() { if(g_pApp->findImage(szPix,"kvi_splash.png")) { - pix = new QPixmap(szPix); + pix = new TQPixmap(szPix); } else { // dummy image - pix = new QPixmap(300,200); + pix = new TQPixmap(300,200); } if(g_pApp->findImage(szPix,"kvi_splash_overlay.png")) { - m_pOverlay = new QPixmap(szPix); + m_pOverlay = new TQPixmap(szPix); } else { - m_pOverlay = new QPixmap(300,20); + m_pOverlay = new TQPixmap(300,20); } } setPixmap(*pix); - m_pTimer = new QTimer(this); - connect(m_pTimer,SIGNAL(timeout()),this,SLOT(suicide())); + m_pTimer = new TQTimer(this); + connect(m_pTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(suicide())); delete pix; #ifdef COMPILE_USE_QT4 setWindowOpacity(0); m_bIncreasing=true; m_rTransparency=0; - m_pFadeTimer= new QTimer(this); - connect(m_pFadeTimer,SIGNAL(timeout()),this,SLOT(fadeTimerShot())); + m_pFadeTimer= new TQTimer(this); + connect(m_pFadeTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(fadeTimerShot())); m_pFadeTimer->start(6); #endif } // We don't need messages on the splash: they just add work to the translators and nobody can read them anyway :D -//void KviSplashScreen::message(QString szMessage) +//void KviSplashScreen::message(TQString szMessage) //{ - //QSplashScreen::message(szMessage, Qt::AlignRight | Qt::AlignBottom, Qt::white); + //TQSplashScreen::message(szMessage, TQt::AlignRight | TQt::AlignBottom, TQt::white); //} KviSplashScreen::~KviSplashScreen() @@ -131,14 +131,14 @@ KviSplashScreen::~KviSplashScreen() } -void KviSplashScreen::showEvent(QShowEvent *e) +void KviSplashScreen::showEvent(TQShowEvent *e) { move((g_pApp->desktop()->width() - width())/2, (g_pApp->desktop()->height() - height())/2); - m_creationTime = QTime::currentTime(); + m_creationTime = TQTime::currentTime(); } -void KviSplashScreen::hideEvent(QHideEvent *e) +void KviSplashScreen::hideEvent(TQHideEvent *e) { suicide(); } @@ -146,21 +146,21 @@ void KviSplashScreen::hideEvent(QHideEvent *e) void KviSplashScreen::setProgress(int progress) { #ifdef COMPILE_USE_QT4 - QPixmap slowQt4Copy = pixmap(); - QPainter painter(&slowQt4Copy); - QSize size = slowQt4Copy.size(); + TQPixmap slowTQt4Copy = pixmap(); + TQPainter painter(&slowTQt4Copy); + TQSize size = slowTQt4Copy.size(); int w = (m_pOverlay->width() * progress) / 100; painter.drawPixmap(0,size.height() - m_pOverlay->height(),w,m_pOverlay->height(),*m_pOverlay,0,0,w,m_pOverlay->height()); painter.end(); - setPixmap(slowQt4Copy); + setPixmap(slowTQt4Copy); #else - QPainter painter(pixmap()); - QSize size = pixmap()->size(); + TQPainter painter(pixmap()); + TQSize size = pixmap()->size(); painter.drawPixmap(0,size.height() - m_pOverlay->height(),*m_pOverlay,0,0,(m_pOverlay->width() * progress) / 100,m_pOverlay->height()); painter.end(); #endif //raise(); - repaint(); + tqrepaint(); g_pApp->processEvents(); //damn... } @@ -172,7 +172,7 @@ void KviSplashScreen::die() m_bIncreasing = false; m_pFadeTimer->start(6); #else - QTime now = QTime::currentTime(); + TQTime now = TQTime::currentTime(); int mSecs = m_creationTime.msecsTo(now); int mRemaining = KVI_SPLASH_SCREEN_MINIMUM_TIMEOUT_IN_MSECS - mSecs; if(mRemaining < 0)mRemaining = 0; diff --git a/src/kvirc/ui/kvi_splash.h b/src/kvirc/ui/kvi_splash.h index 83cfb734..a89e8e9e 100644 --- a/src/kvirc/ui/kvi_splash.h +++ b/src/kvirc/ui/kvi_splash.h @@ -27,37 +27,38 @@ #include "kvi_settings.h" -#include +#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include -class KVIRC_API KviSplashScreen : public QSplashScreen +class KVIRC_API KviSplashScreen : public TQSplashScreen { Q_OBJECT + TQ_OBJECT public: KviSplashScreen(); virtual ~KviSplashScreen(); private: - QTimer * m_pTimer; - QTime m_creationTime; - QPixmap * m_pOverlay; + TQTimer * m_pTimer; + TQTime m_creationTime; + TQPixmap * m_pOverlay; #ifdef COMPILE_USE_QT4 bool m_bIncreasing; qreal m_rTransparency; - QTimer * m_pFadeTimer; + TQTimer * m_pFadeTimer; #endif protected: - virtual void showEvent(QShowEvent * e); - virtual void hideEvent(QHideEvent * e); + virtual void showEvent(TQShowEvent * e); + virtual void hideEvent(TQHideEvent * e); public: void setProgress(int progress); void die(); - //void message(QString); + //void message(TQString); protected slots: void suicide(); void fadeTimerShot(); diff --git a/src/kvirc/ui/kvi_statusbar.cpp b/src/kvirc/ui/kvi_statusbar.cpp index df20a225..6aad95bb 100644 --- a/src/kvirc/ui/kvi_statusbar.cpp +++ b/src/kvirc/ui/kvi_statusbar.cpp @@ -27,7 +27,7 @@ #include "kvi_statusbar.h" #include "kvi_frame.h" -#include +#include #include "kvi_iconmanager.h" #include "kvi_window.h" @@ -41,16 +41,16 @@ #include "kvi_statusbarapplet.h" #include "kvi_dynamictooltip.h" -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "kvi_tal_popupmenu.h" -#include +#include #ifdef COMPILE_USE_QT4 - #include + #include #endif // This class COULD be derived also from KStatusBar but in fact @@ -61,7 +61,7 @@ #include "kvi_time.h" #include "kvi_qstring.h" -#include +#include /* IDEAS: @@ -73,7 +73,7 @@ KviStatusBar::KviStatusBar(KviFrame * pFrame) -: QStatusBar(pFrame) +: TQStatusBar(pFrame) { setProperty("name","statusbar"); @@ -86,7 +86,7 @@ KviStatusBar::KviStatusBar(KviFrame * pFrame) m_pClickedApplet = 0; - m_pAppletDescriptors = new KviPointerHashTable; + m_pAppletDescriptors = new KviPointerHashTable; m_pAppletDescriptors->setAutoDelete(true); KviStatusBarClock::selfRegister(this); @@ -103,28 +103,28 @@ KviStatusBar::KviStatusBar(KviFrame * pFrame) m_pMessageTimer = 0; - m_pMessageLabel = new QLabel("[x] x",this,"msgstatuslabel"); + m_pMessageLabel = new TQLabel("[x] x",this,"msgstatuslabel"); m_pMessageLabel->setMargin(1); #ifdef COMPILE_USE_QT4 - m_pMessageLabel->setAlignment(Qt::AlignVCenter | Qt::AlignLeft); + m_pMessageLabel->tqsetAlignment(TQt::AlignVCenter | TQt::AlignLeft); #else - m_pMessageLabel->setAlignment(SingleLine | Qt::AlignVCenter | Qt::AlignLeft); + m_pMessageLabel->tqsetAlignment(SingleLine | TQt::AlignVCenter | TQt::AlignLeft); #endif m_pMessageLabel->setMinimumWidth(350); m_iLastMinimumHeight = 0; m_bStopLayoutOnAddRemove = true; - connect(m_pFrame,SIGNAL(activeContextChanged()),this,SLOT(setPermanentMessage())); - connect(m_pFrame,SIGNAL(activeContextStateChanged()),this,SLOT(setPermanentMessage())); - connect(m_pFrame,SIGNAL(activeConnectionUserModeChanged()),this,SLOT(setPermanentMessage())); - connect(m_pFrame,SIGNAL(activeConnectionNickNameChanged()),this,SLOT(setPermanentMessage())); + connect(m_pFrame,TQT_SIGNAL(activeContextChanged()),this,TQT_SLOT(setPermanentMessage())); + connect(m_pFrame,TQT_SIGNAL(activeContextStateChanged()),this,TQT_SLOT(setPermanentMessage())); + connect(m_pFrame,TQT_SIGNAL(activeConnectionUserModeChanged()),this,TQT_SLOT(setPermanentMessage())); + connect(m_pFrame,TQT_SIGNAL(activeConnectionNickNameChanged()),this,TQT_SLOT(setPermanentMessage())); setPermanentMessage(); m_bStopLayoutOnAddRemove = false; m_pToolTip = new KviDynamicToolTip(this); - connect(m_pToolTip,SIGNAL(tipRequest(KviDynamicToolTip *,const QPoint &)),this,SLOT(tipRequest(KviDynamicToolTip *,const QPoint &))); + connect(m_pToolTip,TQT_SIGNAL(tipRequest(KviDynamicToolTip *,const TQPoint &)),this,TQT_SLOT(tipRequest(KviDynamicToolTip *,const TQPoint &))); updateLayout(); } @@ -154,11 +154,11 @@ void KviStatusBar::load() { KviStr prefix(KviStr::Format,"Applet%d",i); KviStr tmp(KviStr::Format,"%s_InternalName",prefix.ptr()); - QString szInternalName = cfg.readEntry(tmp.ptr(),""); + TQString szInternalName = cfg.readEntry(tmp.ptr(),""); if(!szInternalName.isEmpty()) { tmp.sprintf("%s_PreloadModule",prefix.ptr()); - QString szPreloadModule = cfg.readEntry(tmp.ptr(),""); + TQString szPreloadModule = cfg.readEntry(tmp.ptr(),""); if(!szPreloadModule.isEmpty()) g_pModuleManager->getModule(szPreloadModule.utf8().data()); @@ -204,13 +204,13 @@ void KviStatusBar::save() #define SPACING 3 #define RICHTEXTLABELTRICK 2 -void KviStatusBar::layoutChildren() +void KviStatusBar::tqlayoutChildren() { int x = width() - HMARGIN; int h = height() - (VMARGIN * 2); for(KviStatusBarApplet * a = m_pAppletList->last();a;a = m_pAppletList->prev()) { - int w = a->sizeHint().width(); + int w = a->tqsizeHint().width(); x -= w; a->setGeometry(x,VMARGIN,w,h); x -= SPACING; @@ -219,29 +219,29 @@ void KviStatusBar::layoutChildren() m_pMessageLabel->setGeometry(HMARGIN,VMARGIN,x - HMARGIN,h - RICHTEXTLABELTRICK); } -void KviStatusBar::resizeEvent(QResizeEvent * e) +void KviStatusBar::resizeEvent(TQResizeEvent * e) { - layoutChildren(); + tqlayoutChildren(); } -bool KviStatusBar::event(QEvent * e) +bool KviStatusBar::event(TQEvent * e) { - if(e->type() == QEvent::LayoutHint) + if(e->type() == TQEvent::LayoutHint) { updateLayout(); - return false; // send to parents too! + return false; // send to tqparents too! } - return QStatusBar::event(e); + return TQStatusBar::event(e); } void KviStatusBar::recalcMinimumHeight() { int s = 18; - int h = m_pMessageLabel->sizeHint().height(); + int h = m_pMessageLabel->tqsizeHint().height(); if(h > s)s = h; for(KviStatusBarApplet * a = m_pAppletList->last();a;a = m_pAppletList->prev()) { - h = a->sizeHint().height(); + h = a->tqsizeHint().height(); if(h > s)s = h; } s += (VMARGIN * 2) + RICHTEXTLABELTRICK; @@ -249,22 +249,22 @@ void KviStatusBar::recalcMinimumHeight() { m_iLastMinimumHeight = s; setMinimumHeight(s); - QLayout * l = layout(); + TQLayout * l = tqlayout(); if(l) - if(l->inherits("QBoxLayout")) - ((QBoxLayout *)l)->addStrut(s); - // FIXME: do QMainWindow need setUpLayout() here ? + if(l->inherits(TQBOXLAYOUT_OBJECT_NAME_STRING)) + ((TQBoxLayout *)l)->addStrut(s); + // FIXME: do TQMainWindow need setUpLayout() here ? } } bool KviStatusBar::appletExists(KviStatusBarApplet * pApplet) { - return (m_pAppletList->findRef(pApplet) != -1); + return (m_pAppletList->tqfindRef(pApplet) != -1); } -KviStatusBarApplet * KviStatusBar::appletAt(const QPoint &pnt,bool bBestMatch) +KviStatusBarApplet * KviStatusBar::appletAt(const TQPoint &pnt,bool bBestMatch) { - QPoint local = mapFromGlobal(pnt); + TQPoint local = mapFromGlobal(pnt); if(bBestMatch) { for(KviStatusBarApplet * a = m_pAppletList->first();a;a = m_pAppletList->next()) @@ -287,16 +287,16 @@ KviStatusBarApplet * KviStatusBar::appletAt(const QPoint &pnt,bool bBestMatch) return 0; } -void KviStatusBar::tipRequest(KviDynamicToolTip *pTip,const QPoint &pnt) +void KviStatusBar::tipRequest(KviDynamicToolTip *pTip,const TQPoint &pnt) { KviStatusBarApplet * a = appletAt(mapToGlobal(pnt)); - QString szTip; - QRect r; + TQString szTip; + TQRect r; if(a) { szTip = "
"; - QMimeSourceFactory::defaultFactory()->setPixmap("server_icon",*(g_pIconManager->getSmallIcon(KVI_SMALLICON_IRC))); + TQMimeSourceFactory::defaultFactory()->setPixmap("server_icon",*(g_pIconManager->getSmallIcon(KVI_SMALLICON_IRC))); if(linkText.length() > 50) { tip += linkText.left(47); @@ -4967,7 +4955,7 @@ void KviIrcView::doLinkToolTip(const QRect &rct,QString &linkCmd,QString &linkTe } tip+="
"; - if(linkText.find('*') != -1) + if(linkText.tqfind('*') != -1) { if(linkText.length() > 1)tip += __tr2qs("Server appears to be a network hub
"); else tip += __tr2qs("Unknown server
"); // might happen... @@ -4983,12 +4971,12 @@ void KviIrcView::doLinkToolTip(const QRect &rct,QString &linkCmd,QString &linkTe { if(((KviChannel *)m_pKviWindow)->isMeOp()) { - QChar plmn = linkCmd[1]; - if((plmn.unicode() == '+') || (plmn.unicode() == '-')) + TQChar plmn = linkCmd[1]; + if((plmn.tqunicode() == '+') || (plmn.tqunicode() == '-')) { tip = __tr2qs("Double-click to set
"); - QChar flag = linkCmd[2]; - switch(flag.unicode()) + TQChar flag = linkCmd[2]; + switch(flag.tqunicode()) { case 'o': case 'v': @@ -4999,10 +4987,10 @@ void KviIrcView::doLinkToolTip(const QRect &rct,QString &linkCmd,QString &linkTe case 'I': case 'e': case 'k': - KviQString::appendFormatted(tip,QString("mode %Q %c%c %Q"),&(m_pKviWindow->windowName()),plmn.latin1(),flag.latin1(),&linkText); + KviTQString::appendFormatted(tip,TQString("mode %Q %c%c %Q"),&(m_pKviWindow->windowName()),plmn.latin1(),flag.latin1(),&linkText); break; default: - KviQString::appendFormatted(tip,QString("mode %Q %c%c"),&(m_pKviWindow->windowName()),plmn.latin1(),flag.latin1()); + KviTQString::appendFormatted(tip,TQString("mode %Q %c%c"),&(m_pKviWindow->windowName()),plmn.latin1(),flag.latin1()); break; } } @@ -5019,14 +5007,14 @@ void KviIrcView::doLinkToolTip(const QRect &rct,QString &linkCmd,QString &linkTe { if(console()->connection()) { - KviIrcUserEntry * e = console()->connection()->userDataBase()->find(linkText); + KviIrcUserEntry * e = console()->connection()->userDataBase()->tqfind(linkText); if(e) { - QString buffer; + TQString buffer; console()->getUserTipText(linkText,e,buffer); tip = buffer; - } else KviQString::sprintf(tip,__tr2qs("Nothing known about %Q"),&linkText); - } else KviQString::sprintf(tip,__tr2qs("Nothing known about %Q (no connection)"),&linkText); + } else KviTQString::sprintf(tip,__tr2qs("Nothing known about %Q"),&linkText); + } else KviTQString::sprintf(tip,__tr2qs("Nothing known about %Q (no connection)"),&linkText); } } break; @@ -5034,30 +5022,30 @@ void KviIrcView::doLinkToolTip(const QRect &rct,QString &linkCmd,QString &linkTe { if(console() && console()->connection()) { - QString szChan = linkText; - QString buf; + TQString szChan = linkText; + TQString buf; tip = " "; - QMimeSourceFactory::defaultFactory()->setPixmap("chan_icon",*(g_pIconManager->getSmallIcon(KVI_SMALLICON_CHANNEL))); + TQMimeSourceFactory::defaultFactory()->setPixmap("chan_icon",*(g_pIconManager->getSmallIcon(KVI_SMALLICON_CHANNEL))); if(szCmd.length()>0) szChan=szCmd; KviChannel * c = console()->connection()->findChannel(szChan); - QString szUrl; + TQString szUrl; if(c) { - QString chanMode; + TQString chanMode; c->getChannelModeString(chanMode); - QString topic = KviMircCntrl::stripControlBytes(c->topicWidget()->topic()); - topic.replace("<","<"); - topic.replace(">",">"); + TQString topic = KviMircCntrl::stripControlBytes(c->topicWidget()->topic()); + topic.tqreplace("<","<"); + topic.tqreplace(">",">"); KviIrcUrl::join(szUrl,console()->connection()->target()->server()); szUrl.append(szChan); - KviQString::sprintf(buf,__tr2qs("%Q (" + KviTQString::sprintf(buf,__tr2qs("%Q (" "%Q):
+%Q (%u users)
%Q
"),&szChan,&szUrl,&chanMode, c->count(),&topic); } else { KviIrcUrl::join(szUrl,console()->connection()->target()->server()); szUrl.append(szChan); - KviQString::sprintf(buf,__tr2qs("%Q (" + KviTQString::sprintf(buf,__tr2qs("%Q (" "%Q)
Double-click to join %Q
Right click to view other options"),&szChan,&szUrl,&szChan); } @@ -5067,7 +5055,7 @@ void KviIrcView::doLinkToolTip(const QRect &rct,QString &linkCmd,QString &linkTe break; default: { - QString dbl,rbt,txt,mbt; + TQString dbl,rbt,txt,mbt; getLinkEscapeCommand(dbl,linkCmd,"[!dbl]"); getLinkEscapeCommand(rbt,linkCmd,"[!rbt]"); getLinkEscapeCommand(txt,linkCmd,"[!txt]"); @@ -5077,17 +5065,17 @@ void KviIrcView::doLinkToolTip(const QRect &rct,QString &linkCmd,QString &linkTe if(tip.isEmpty() && (!dbl.isEmpty())) { if(!tip.isEmpty())tip.append("
"); - KviQString::appendFormatted(tip,__tr2qs("Double-click:
%Q"),&dbl); + KviTQString::appendFormatted(tip,__tr2qs("Double-click:
%Q"),&dbl); } if(tip.isEmpty() && (!mbt.isEmpty())) { if(!tip.isEmpty())tip.append("
"); - KviQString::appendFormatted(tip,__tr2qs("Middle-click:
%Q"),&mbt); + KviTQString::appendFormatted(tip,__tr2qs("Middle-click:
%Q"),&mbt); } if(tip.isEmpty() && (!rbt.isEmpty())) { if(!tip.isEmpty())tip.append("
"); - KviQString::appendFormatted(tip,__tr2qs("Right-click:
%Q"),&rbt); + KviTQString::appendFormatted(tip,__tr2qs("Right-click:
%Q"),&rbt); } } break; @@ -5097,7 +5085,7 @@ void KviIrcView::doLinkToolTip(const QRect &rct,QString &linkCmd,QString &linkTe m_pToolTip->doTip(rct,tip); } -void KviIrcView::leaveEvent ( QEvent * ) +void KviIrcView::leaveEvent ( TQEvent * ) { if(m_pLastLinkUnderMouse) { @@ -5105,14 +5093,14 @@ void KviIrcView::leaveEvent ( QEvent * ) update(); } } -void KviIrcView::timerEvent(QTimerEvent *e) +void KviIrcView::timerEvent(TQTimerEvent *e) { - m_mouseCurrentPos = mapFromGlobal(QCursor::pos()); + m_mouseCurrentPos = mapFromGlobal(TQCursor::pos()); if(e->timerId() == m_iSelectTimer) { calculateSelectionBounds(); - repaint(); + tqrepaint(); } if(e->timerId() == m_iMouseTimer) { @@ -5128,15 +5116,15 @@ void KviIrcView::timerEvent(QTimerEvent *e) } } -void KviIrcView::keyPressEvent(QKeyEvent *e) +void KviIrcView::keyPressEvent(TQKeyEvent *e) { switch(e->key()) { - case Qt::Key_PageUp: + case TQt::Key_PageUp: prevPage(); e->accept(); break; - case Qt::Key_PageDown: + case TQt::Key_PageDown: nextPage(); e->accept(); break; @@ -5145,12 +5133,12 @@ void KviIrcView::keyPressEvent(QKeyEvent *e) } } -void KviIrcView::maybeTip(const QPoint &pnt) +void KviIrcView::maybeTip(const TQPoint &pnt) { - QString linkCmd; - QString linkText; + TQString linkCmd; + TQString linkText; - QRect rctLink; + TQRect rctLink; KviIrcViewWrappedBlock * linkUnderMouse = getLinkUnderMouse(pnt.x(),pnt.y(),&rctLink,&linkCmd,&linkText); diff --git a/src/kvirc/ui/kvi_ircview.h b/src/kvirc/ui/kvi_ircview.h index 62ee3e75..e462a736 100644 --- a/src/kvirc/ui/kvi_ircview.h +++ b/src/kvirc/ui/kvi_ircview.h @@ -28,14 +28,14 @@ #include "kvi_string.h" #include "kvi_pointerlist.h" -#include -#include // needed - -class QScrollBar; -class QLineEdit; -class QFile; -class QToolButton; -class QFontMetrics; +#include +#include // needed + +class TQScrollBar; +class TQLineEdit; +class TQFile; +class TQToolButton; +class TQFontMetrics; class KviTalPopupMenu; class KviWindow; @@ -51,30 +51,31 @@ typedef struct _KviIrcViewWrappedBlockSelectionInfoTag KviIrcViewWrappedBlockSel #define KVI_IRCVIEW_INVALID_LINE_MARK_INDEX 0xffffffff -class KVIRC_API KviIrcView : public QWidget +class KVIRC_API KviIrcView : public TQWidget { Q_OBJECT - Q_PROPERTY(int TransparencyCapable READ dummyRead) - // we cannot #ifdef due to a bug in moc - Q_PROPERTY(bool usePaintOnScreen READ getPaintOnScreen WRITE setPaintOnScreen) + TQ_OBJECT + TQ_PROPERTY(int TransparencyCapable READ dummyRead) + // we cannot #ifdef due to a bug in tqmoc + TQ_PROPERTY(bool usePaintOnScreen READ getPaintOnScreen WRITE setPaintOnScreen) public: friend class KviIrcViewToolTip; friend class KviIrcViewToolWidget; public: - KviIrcView(QWidget *parent,KviFrame *pFrm,KviWindow *pWnd); + KviIrcView(TQWidget *tqparent,KviFrame *pFrm,KviWindow *pWnd); ~KviIrcView(); public: int dummyRead() const { return 0; }; #ifdef COMPILE_USE_QT4 - bool getPaintOnScreen() const { return testAttribute(Qt::WA_PaintOnScreen);}; - void setPaintOnScreen(bool bFlag){setAttribute(Qt::WA_PaintOnScreen,bFlag);} ; + bool getPaintOnScreen() const { return testAttribute(TQt::WA_PaintOnScreen);}; + void setPaintOnScreen(bool bFlag){setAttribute(TQt::WA_PaintOnScreen,bFlag);} ; #else - // hack to fix moc bug on win qt4 + // hack to fix tqmoc bug on win qt4 bool getPaintOnScreen() const { return 0;}; void setPaintOnScreen(bool bFlag){} ; #endif private: -// QDate m_lastLogDay; +// TQDate m_lastLogDay; int m_iFlushTimer; KviIrcViewLine * m_pFirstLine; KviIrcViewLine * m_pCurLine; // Bottom line in the view @@ -92,9 +93,9 @@ private: unsigned int m_uNextLineIndex; - QPixmap * m_pPrivateBackgroundPixmap; - QScrollBar * m_pScrollBar; - QToolButton * m_pToolsButton; + TQPixmap * m_pPrivateBackgroundPixmap; + TQScrollBar * m_pScrollBar; + TQToolButton * m_pToolsButton; KviTalPopupMenu * m_pToolsPopup; KviIrcViewToolWidget * m_pToolWidget; @@ -113,8 +114,8 @@ private: int m_iIconWidth; int m_iIconSideSpacing; - QPoint m_mousePressPos; - QPoint m_mouseCurrentPos; + TQPoint m_mousePressPos; + TQPoint m_mouseCurrentPos; // Selection int m_iSelectionBegin; @@ -131,20 +132,20 @@ private: int m_iSelectTimer; int m_iMouseTimer; //int m_iTipTimer; - QString m_szLastSelection; - QString m_szLastSelectionLine; + TQString m_szLastSelection; + TQString m_szLastSelectionLine; KviWindow * m_pKviWindow; KviIrcViewWrappedBlockSelectionInfo * m_pWrappedBlockSelectionInfo; - QFile * m_pLogFile; + TQFile * m_pLogFile; KviFrame * m_pFrm; bool m_bAcceptDrops; int m_iUnprocessedPaintEventRequests; bool m_bPostedPaintEventPending; KviPointerList * m_pMessagesStoppedWhileSelecting; KviIrcView * m_pMasterView; - QFontMetrics * m_pFm; // assume this valid only inside a paint event (may be 0 in other circumstances) + TQFontMetrics * m_pFm; // assume this valid only inside a paint event (may be 0 in other circumstances) - QMouseEvent * m_pLastEvent; + TQMouseEvent * m_pLastEvent; KviIrcViewToolTip * m_pToolTip; bool m_bHaveUnreadedHighlightedMessages; @@ -162,28 +163,28 @@ public: bool hasLineMark(){ return m_uLineMarkLineIndex != KVI_IRCVIEW_INVALID_LINE_MARK_INDEX; }; void removeHeadLine(bool bRepaint=false); void emptyBuffer(bool bRepaint=true); - void getTextBuffer(QString &buffer); + void getTextBuffer(TQString &buffer); void setMaxBufferSize(int maxBufSize,bool bRepaint=true); int maxBufferSize(){ return m_iMaxLines; }; //Never used ? bool saveBuffer(const char *filename); - void findNext(const QString& szText,bool bCaseS = false,bool bRegExp = false,bool bExtended = false); - void findPrev(const QString& szText,bool bCaseS = false,bool bRegExp = false,bool bExtended = false); - KviWindow * parentKviWindow(){ return m_pKviWindow; }; + void findNext(const TQString& szText,bool bCaseS = false,bool bRegExp = false,bool bExtended = false); + void findPrev(const TQString& szText,bool bCaseS = false,bool bRegExp = false,bool bExtended = false); + KviWindow * tqparentKviWindow(){ return m_pKviWindow; }; KviConsole * console(); // A null pixmap passed here unsets the private backgrdound. - void setPrivateBackgroundPixmap(const QPixmap &pixmap,bool bRepaint=true); + void setPrivateBackgroundPixmap(const TQPixmap &pixmap,bool bRepaint=true); bool hasPrivateBackgroundPixmap(){ return (m_pPrivateBackgroundPixmap != 0); }; //============================================================================================== // Logging // Stops previous logging session too... - bool startLogging(const QString& fname = QString::null,bool bPrependCurBuffer = false); + bool startLogging(const TQString& fname = TQString(),bool bPrependCurBuffer = false); void stopLogging(); bool isLogging(){ return (m_pLogFile != 0); }; void getLogFileName(KviStr &buffer); - void getLogFileName(QString &buffer); + void getLogFileName(TQString &buffer); //void add2Log(const char *buffer,int buf_len=-1); - void add2Log(const QString &szBuffer,int iMsgType=0); + void add2Log(const TQString &szBuffer,int iMsgType=0); //============================================================================================== // Channel view splitting @@ -196,10 +197,10 @@ public: void nextLine(); void nextPage(); void prevPage(); - virtual QSize sizeHint() const; - const QString & lastLineOfText(); - const QString & lastMessageText(); - virtual void setFont(const QFont &f); + virtual TQSize tqsizeHint() const; + const TQString & lastLineOfText(); + const TQString & lastMessageText(); + virtual void setFont(const TQFont &f); public slots: void flushLog(); void showToolsPopup(); @@ -217,33 +218,33 @@ signals: private: void setCursorLine(KviIrcViewLine * l); KviIrcViewLine * getVisibleLineAt(int xPos,int yPos); - void getLinkEscapeCommand(QString &buffer,const QString &escape_cmd,const QString &escape_label); + void getLinkEscapeCommand(TQString &buffer,const TQString &escape_cmd,const TQString &escape_label); void appendLine(KviIrcViewLine *ptr,bool bRepaint); void postUpdateEvent(); void fastScroll(int lines = 1); const kvi_wchar_t * getTextLine(int msg_type,const kvi_wchar_t * data_ptr,KviIrcViewLine *line_ptr,bool bEnableTimeStamp = true); void calculateLineWraps(KviIrcViewLine *ptr,int maxWidth); - void recalcFontVariables(const QFontMetrics &fm,const QFontInfo &fi); + void recalcFontVariables(const TQFontMetrics &fm,const TQFontInfo &fi); bool checkSelectionBlock(KviIrcViewLine * line,int left,int bottom,int bufIndex); void calculateSelectionBounds(); - KviIrcViewWrappedBlock * getLinkUnderMouse(int xPos,int yPos,QRect * pRect = 0,QString * linkCmd = 0,QString * linkText = 0); - void doLinkToolTip(const QRect &rct,QString &linkCmd,QString &linkText); + KviIrcViewWrappedBlock * getLinkUnderMouse(int xPos,int yPos,TQRect * pRect = 0,TQString * linkCmd = 0,TQString * linkText = 0); + void doLinkToolTip(const TQRect &rct,TQString &linkCmd,TQString &linkText); protected: - virtual void paintEvent(QPaintEvent *); - virtual void resizeEvent(QResizeEvent *); - virtual void mousePressEvent(QMouseEvent *e); - virtual void mouseRealPressEvent(QMouseEvent *e); - virtual void mouseReleaseEvent(QMouseEvent *); - virtual void mouseDoubleClickEvent(QMouseEvent *e); - virtual void mouseMoveEvent(QMouseEvent *e); - virtual void timerEvent(QTimerEvent *e); - virtual void dragEnterEvent(QDragEnterEvent *e); - virtual void dropEvent(QDropEvent *e); - virtual bool event(QEvent *e); - virtual void wheelEvent(QWheelEvent *e); - virtual void keyPressEvent(QKeyEvent *e); - void maybeTip(const QPoint &pnt); - virtual void leaveEvent ( QEvent * ); + virtual void paintEvent(TQPaintEvent *); + virtual void resizeEvent(TQResizeEvent *); + virtual void mousePressEvent(TQMouseEvent *e); + virtual void mouseRealPressEvent(TQMouseEvent *e); + virtual void mouseReleaseEvent(TQMouseEvent *); + virtual void mouseDoubleClickEvent(TQMouseEvent *e); + virtual void mouseMoveEvent(TQMouseEvent *e); + virtual void timerEvent(TQTimerEvent *e); + virtual void dragEnterEvent(TQDragEnterEvent *e); + virtual void dropEvent(TQDropEvent *e); + virtual bool event(TQEvent *e); + virtual void wheelEvent(TQWheelEvent *e); + virtual void keyPressEvent(TQKeyEvent *e); + void maybeTip(const TQPoint &pnt); + virtual void leaveEvent ( TQEvent * ); protected slots: virtual void scrollBarPositionChanged(int newValue); void masterDead(); diff --git a/src/kvirc/ui/kvi_ircviewprivate.h b/src/kvirc/ui/kvi_ircviewprivate.h index 0a2dea20..790976bd 100644 --- a/src/kvirc/ui/kvi_ircviewprivate.h +++ b/src/kvirc/ui/kvi_ircviewprivate.h @@ -25,7 +25,7 @@ //========================================================================================================= #include "kvi_settings.h" -#include +#include //========================================================================================================= // Internal data structures @@ -83,8 +83,8 @@ typedef struct _KviIrcViewLineChunk unsigned char back; // optional background color for KVI_TEXT_COLOR attribute unsigned char fore; // optional foreground color for KVI_TEXT_COLOR attribute (used also for KVI_TEXT_ESCAPE!!!) } _KVI_PACKED colors; // anonymous -// QColor customBack; - QColor customFore; +// TQColor customBack; + TQColor customFore; } /*_KVI_PACKED*/ KviIrcViewLineChunk; // @@ -104,7 +104,7 @@ typedef struct _KviIrcViewLine { // this is a text line in the IrcView's memory unsigned int uIndex; // index of the text line (needed for find and splitting) - QString szText; // data string without color codes nor escapes... + TQString szText; // data string without color codes nor escapes... int iMsgType; // type of the line (defines icon and colors) // At line instert time the szData text is splitted in parts which @@ -148,7 +148,7 @@ typedef struct _KviIrcViewWrappedBlockSelectionInfoTag #endif //!COMPILE_ON_WINDOWS //========================================================================================================= -// Screen layout +// Screen tqlayout //========================================================================================================= //FIRST LINE (prev_line = 0) <---m_pFirstLine diff --git a/src/kvirc/ui/kvi_ircviewtools.cpp b/src/kvirc/ui/kvi_ircviewtools.cpp index ea473107..c6f41381 100644 --- a/src/kvirc/ui/kvi_ircviewtools.cpp +++ b/src/kvirc/ui/kvi_ircviewtools.cpp @@ -36,21 +36,21 @@ #include "kvi_app.h" #include "kvi_memmove.h" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #ifdef COMPILE_USE_QT4 - #include + #include #else - #include + #include #endif -#include -#include +#include +#include #include "kvi_accel.h" -#include +#include /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // @@ -60,7 +60,7 @@ KviIrcMessageCheckListItem::KviIrcMessageCheckListItem(KviTalListView * par,KviIrcViewToolWidget * w,int id) -: KviTalCheckListItem(par,QString::null,KviTalCheckListItem::CheckBox) +: KviTalCheckListItem(par,TQString(),KviTalCheckListItem::CheckBox) { m_iId = id; m_pToolWidget = 0; @@ -83,37 +83,37 @@ void KviIrcMessageCheckListItem::stateChange(bool bOn) KviIrcViewToolWidget::KviIrcViewToolWidget(KviIrcView * par) -: QFrame(par) +: TQFrame(par) { m_pIrcView = par; - setFrameStyle(QFrame::StyledPanel | QFrame::Raised); + setFrameStyle(TQFrame::StyledPanel | TQFrame::Raised); - QGridLayout * gl = new QGridLayout(this,2,2,4,2); + TQGridLayout * gl = new TQGridLayout(this,2,2,4,2); - QLabel * l = new QLabel(__tr2qs("Find Text"),this); + TQLabel * l = new TQLabel(__tr2qs("Find Text"),this); l->setMaximumHeight(14); - l->setBackgroundColor(Qt::black); + l->setBackgroundColor(TQt::black); gl->addWidget(l,0,0); - QToolButton *tb = new QToolButton(Qt::DownArrow,this,"down_arrow"); + TQToolButton *tb = new TQToolButton(TQt::DownArrow,this,"down_arrow"); tb->setFixedSize(14,14); tb->setAutoRepeat(false); - connect(tb,SIGNAL(clicked()),m_pIrcView,SLOT(toggleToolWidget())); + connect(tb,TQT_SIGNAL(clicked()),m_pIrcView,TQT_SLOT(toggleToolWidget())); gl->addWidget(tb,0,1); - QTabWidget * tw = new QTabWidget(this); + TQTabWidget * tw = new TQTabWidget(this); // Find tab - QWidget * w = new QWidget(tw); + TQWidget * w = new TQWidget(tw); - QGridLayout * g = new QGridLayout(w,6,2,2,1); + TQGridLayout * g = new TQGridLayout(w,6,2,2,1); - m_pStringToFind = new QLineEdit(w); + m_pStringToFind = new TQLineEdit(w); g->addMultiCellWidget(m_pStringToFind,0,0,0,2); - connect(m_pStringToFind,SIGNAL(returnPressed()),this,SLOT(findNext())); + connect(m_pStringToFind,TQT_SIGNAL(returnPressed()),this,TQT_SLOT(findNext())); m_pRegExp = new KviStyledCheckBox(__tr2qs("&Regular expression"),w); g->addMultiCellWidget(m_pRegExp,1,1,0,2); @@ -121,37 +121,37 @@ KviIrcViewToolWidget::KviIrcViewToolWidget(KviIrcView * par) m_pExtendedRegExp = new KviStyledCheckBox(__tr2qs("E&xtended regexp."),w); g->addMultiCellWidget(m_pExtendedRegExp,2,2,0,2); m_pExtendedRegExp->setEnabled(false); - connect(m_pRegExp,SIGNAL(toggled(bool)),m_pExtendedRegExp,SLOT(setEnabled(bool))); + connect(m_pRegExp,TQT_SIGNAL(toggled(bool)),m_pExtendedRegExp,TQT_SLOT(setEnabled(bool))); m_pCaseSensitive = new KviStyledCheckBox(__tr2qs("C&ase sensitive"),w); g->addMultiCellWidget(m_pCaseSensitive,3,3,0,2); - QPushButton * pb = new QPushButton(__tr2qs("Find &Prev."),w); - connect(pb,SIGNAL(clicked()),this,SLOT(findPrev())); + TQPushButton * pb = new TQPushButton(__tr2qs("Find &Prev."),w); + connect(pb,TQT_SIGNAL(clicked()),this,TQT_SLOT(findPrev())); g->addWidget(pb,4,0); - pb = new QPushButton(__tr2qs("&Find Next"),w); + pb = new TQPushButton(__tr2qs("&Find Next"),w); pb->setDefault(true); - connect(pb,SIGNAL(clicked()),this,SLOT(findNext())); + connect(pb,TQT_SIGNAL(clicked()),this,TQT_SLOT(findNext())); g->addMultiCellWidget(pb,4,4,1,2); - m_pFindResult = new QLabel(w); - m_pFindResult->setFrameStyle(QFrame::Sunken | QFrame::StyledPanel); + m_pFindResult = new TQLabel(w); + m_pFindResult->setFrameStyle(TQFrame::Sunken | TQFrame::StyledPanel); g->addMultiCellWidget(m_pFindResult,5,5,0,2); - //g->setResizeMode(QGridLayout::Fixed); + //g->setResizeMode(TQGridLayout::Fixed); tw->addTab(w,__tr2qs("Find")); // Filter tab - QWidget * w1 = new QWidget(tw); + TQWidget * w1 = new TQWidget(tw); - g = new QGridLayout(w1,5,2,2,1); + g = new TQGridLayout(w1,5,2,2,1); m_pFilterView = new KviTalListView(w1); m_pFilterView->addColumn(__tr2qs("Type")); m_pFilterView->header()->hide(); - m_pFilterView->setMinimumSize(QSize(10,10)); + m_pFilterView->setMinimumSize(TQSize(10,10)); g->addMultiCellWidget(m_pFilterView,0,4,0,0); @@ -163,31 +163,31 @@ KviIrcViewToolWidget::KviIrcViewToolWidget(KviIrcView * par) m_pFilterItems[i] = new KviIrcMessageCheckListItem(m_pFilterView,this,i); } - pb = new QPushButton(__tr2qs("Set &All"),w1); - connect(pb,SIGNAL(clicked()),this,SLOT(filterEnableAll())); + pb = new TQPushButton(__tr2qs("Set &All"),w1); + connect(pb,TQT_SIGNAL(clicked()),this,TQT_SLOT(filterEnableAll())); g->addWidget(pb,0,1); - pb = new QPushButton(__tr2qs("Set &None"),w1); - connect(pb,SIGNAL(clicked()),this,SLOT(filterEnableNone())); + pb = new TQPushButton(__tr2qs("Set &None"),w1); + connect(pb,TQT_SIGNAL(clicked()),this,TQT_SLOT(filterEnableNone())); g->addWidget(pb,1,1); - pb = new QPushButton(__tr2qs("&Load From..."),w1); - connect(pb,SIGNAL(clicked()),this,SLOT(filterLoad())); + pb = new TQPushButton(__tr2qs("&Load From..."),w1); + connect(pb,TQT_SIGNAL(clicked()),this,TQT_SLOT(filterLoad())); g->addWidget(pb,2,1); - pb = new QPushButton(__tr2qs("&Save As..."),w1); - connect(pb,SIGNAL(clicked()),this,SLOT(filterSave())); + pb = new TQPushButton(__tr2qs("&Save As..."),w1); + connect(pb,TQT_SIGNAL(clicked()),this,TQT_SLOT(filterSave())); g->addWidget(pb,3,1); tw->addTab(w1,__tr2qs("Filter")); gl->addMultiCellWidget(tw,1,1,0,1); - gl->setResizeMode(QGridLayout::Fixed); + gl->setResizeMode(TQGridLayout::Fixed); m_pStringToFind->setFocus(); tw->showPage(w); KviAccel *a = new KviAccel( this ); - a->connectItem( a->insertItem(Qt::Key_Escape), this,SLOT(close()) ); + a->connectItem( a->insertItem(TQt::Key_Escape), this,TQT_SLOT(close()) ); } KviIrcViewToolWidget::~KviIrcViewToolWidget() @@ -217,23 +217,23 @@ void KviIrcViewToolWidget::filterEnableNone() forceRepaint(); } -void KviIrcViewToolWidget::hideEvent ( QHideEvent * ){ +void KviIrcViewToolWidget::hideEvent ( TQHideEvent * ){ m_pIrcView->toggleToolWidget(); } -void KviIrcViewToolWidget::closeEvent ( QCloseEvent * e ){ +void KviIrcViewToolWidget::closeEvent ( TQCloseEvent * e ){ m_pIrcView->toggleToolWidget(); } void KviIrcViewToolWidget::filterLoad() { - QString szFile; - QString szInit; + TQString szFile; + TQString szInit; g_pApp->getLocalKvircDirectory(szInit,KviApp::Filters); if(KviFileDialog::askForOpenFileName(szFile,__tr2qs("Select a Filter File"),szInit)) { - QFile f(szFile); + TQFile f(szFile); if(f.open(IO_ReadOnly)) { char buffer[KVI_NUM_MSGTYPE_OPTIONS]; @@ -255,12 +255,12 @@ void KviIrcViewToolWidget::filterLoad() void KviIrcViewToolWidget::filterSave() { - QString szFile; - QString szInit; + TQString szFile; + TQString szInit; g_pApp->getLocalKvircDirectory(szInit,KviApp::Filters,"filter.kvf"); if(KviFileDialog::askForSaveFileName(szFile,__tr2qs("Select a Name for the Filter File"),szInit,0,false,true)) { - QFile f(szFile); + TQFile f(szFile); if(f.open(IO_WriteOnly)) { char buffer[KVI_NUM_MSGTYPE_OPTIONS]; @@ -278,14 +278,14 @@ void KviIrcViewToolWidget::filterSave() void KviIrcViewToolWidget::forceRepaint() { #if defined(COMPILE_USE_QT4) && defined(COMPILE_ON_WINDOWS) - m_pIrcView->repaint(); + m_pIrcView->tqrepaint(); #else m_pIrcView->paintEvent(0); #endif } -void KviIrcViewToolWidget::setFindResult(const QString & text) +void KviIrcViewToolWidget::setFindResult(const TQString & text) { m_pFindResult->setText(text); } @@ -303,14 +303,14 @@ void KviIrcViewToolWidget::findNext() } -void KviIrcViewToolWidget::mousePressEvent(QMouseEvent *e) +void KviIrcViewToolWidget::mousePressEvent(TQMouseEvent *e) { m_pressPoint = e->pos(); } -void KviIrcViewToolWidget::mouseMoveEvent(QMouseEvent *) +void KviIrcViewToolWidget::mouseMoveEvent(TQMouseEvent *) { - QPoint p=m_pIrcView->mapFromGlobal(QCursor::pos()); + TQPoint p=m_pIrcView->mapFromGlobal(TQCursor::pos()); p-=m_pressPoint; if(p.x() < 1)p.setX(1); else { @@ -341,7 +341,7 @@ KviIrcViewToolTip::~KviIrcViewToolTip() { } -void KviIrcViewToolTip::maybeTip(const QPoint &pnt) +void KviIrcViewToolTip::maybeTip(const TQPoint &pnt) { m_pView->maybeTip(pnt); } diff --git a/src/kvirc/ui/kvi_ircviewtools.h b/src/kvirc/ui/kvi_ircviewtools.h index 248c180d..8cf5781c 100644 --- a/src/kvirc/ui/kvi_ircviewtools.h +++ b/src/kvirc/ui/kvi_ircviewtools.h @@ -27,14 +27,14 @@ #include "kvi_settings.h" #include "kvi_tal_tooltip.h" -#include +#include #include "kvi_tal_listview.h" -#include +#include -class QLabel; +class TQLabel; //class KviStyledCheckBox; #include "kvi_styled_controls.h" -class QLineEdit; +class TQLineEdit; class KviIrcView; @@ -46,9 +46,9 @@ public: protected: KviIrcView * m_pView; protected: - virtual void maybeTip(const QPoint &pnt); + virtual void maybeTip(const TQPoint &pnt); public: - void doTip(const QRect &rct,const QString &str){ tip(rct,str); }; + void doTip(const TQRect &rct,const TQString &str){ tip(rct,str); }; }; //========================================================================================================= @@ -76,30 +76,31 @@ public: class KviIrcView; -class KviIrcViewToolWidget : public QFrame +class KviIrcViewToolWidget : public TQFrame { friend class KviIrcView; Q_OBJECT + TQ_OBJECT protected: KviIrcViewToolWidget(KviIrcView * par); ~KviIrcViewToolWidget(); protected: KviIrcView * m_pIrcView; - QLineEdit * m_pStringToFind; - QPoint m_pressPoint; + TQLineEdit * m_pStringToFind; + TQPoint m_pressPoint; KviStyledCheckBox * m_pCaseSensitive; KviStyledCheckBox * m_pRegExp; KviStyledCheckBox * m_pExtendedRegExp; - QLabel * m_pFindResult; + TQLabel * m_pFindResult; KviTalListView * m_pFilterView; KviIrcMessageCheckListItem ** m_pFilterItems; public: - void setFindResult(const QString & text); + void setFindResult(const TQString & text); inline bool messageEnabled(int msg_type){ return m_pFilterItems[msg_type]->isOn(); } void forceRepaint(); protected slots: @@ -110,10 +111,10 @@ protected slots: void filterSave(); void filterLoad(); protected: - virtual void hideEvent( QHideEvent * ); - virtual void closeEvent( QCloseEvent * e ); - virtual void mouseMoveEvent(QMouseEvent *); - virtual void mousePressEvent(QMouseEvent *); + virtual void hideEvent( TQHideEvent * ); + virtual void closeEvent( TQCloseEvent * e ); + virtual void mouseMoveEvent(TQMouseEvent *); + virtual void mousePressEvent(TQMouseEvent *); }; #endif //!_KVI_IRCVIEWTOOLS_H_ diff --git a/src/kvirc/ui/kvi_listview.cpp b/src/kvirc/ui/kvi_listview.cpp index e9c4b233..7665287e 100644 --- a/src/kvirc/ui/kvi_listview.cpp +++ b/src/kvirc/ui/kvi_listview.cpp @@ -27,16 +27,16 @@ #include "kvi_listview.h" -#include -#include +#include +#include #include "kvi_doublebuffer.h" -KviListView::KviListView( QWidget * parent, const char * name) -:KviTalListView(parent) +KviListView::KviListView( TQWidget * tqparent, const char * name) +:KviTalListView(tqparent) { m_pBackgroundOverlayPixmap=0; - m_iBackgroundOverlayAlignment=Qt::AlignAuto; + m_iBackgroundOverlayAlignment=TQt::AlignAuto; } KviListView::~KviListView() @@ -45,22 +45,22 @@ KviListView::~KviListView() delete m_pBackgroundOverlayPixmap; } -void KviListView::setBackgroundOverlayPixmap(QPixmap * pix,int iAlignmentFlags) +void KviListView::setBackgroundOverlayPixmap(TQPixmap * pix,int iAlignmentFlags) { setStaticBackground(TRUE); #ifdef COMPILE_USE_QT4 viewport()->setAutoFillBackground(false); #else - viewport()->setBackgroundMode(QWidget::NoBackground); + viewport()->setBackgroundMode(TQWidget::NoBackground); #endif - m_pBackgroundOverlayPixmap=new QPixmap(*pix); - m_iBackgroundOverlayAlignment= Qt::AlignRight | Qt::AlignBottom; - repaintContents(); + m_pBackgroundOverlayPixmap=new TQPixmap(*pix); + m_iBackgroundOverlayAlignment= TQt::AlignRight | TQt::AlignBottom; + tqrepaintContents(); } -void KviListView::drawContentsOffset(QPainter * p,int ox,int oy,int cx,int cy,int cw,int ch) +void KviListView::drawContentsOffset(TQPainter * p,int ox,int oy,int cx,int cy,int cw,int ch) { if(!m_pBackgroundOverlayPixmap) { @@ -73,36 +73,36 @@ void KviListView::drawContentsOffset(QPainter * p,int ox,int oy,int cx,int cy,in KviDoubleBuffer pix(viewport()->width(),viewport()->height()); - QPixmap * pMemPixmap = pix.pixmap(); + TQPixmap * pMemPixmap = pix.pixmap(); - QPainter pa(pMemPixmap); + TQPainter pa(pMemPixmap); int xx = cx - ox; int yy = cy - oy; - pa.fillRect(QRect(xx,yy,cw,ch),viewport()->backgroundColor()); + pa.fillRect(TQRect(xx,yy,cw,ch),viewport()->backgroundColor()); //KviTalListView::paintEmptyArea(&pa,); // compute the pixmap position int x,y; - if(m_iBackgroundOverlayAlignment == Qt::AlignAuto) + if(m_iBackgroundOverlayAlignment == TQt::AlignAuto) x=y=0; else { - if(m_iBackgroundOverlayAlignment & Qt::AlignLeft) + if(m_iBackgroundOverlayAlignment & TQt::AlignLeft) x=0; - else if ( m_iBackgroundOverlayAlignment & Qt::AlignRight ) + else if ( m_iBackgroundOverlayAlignment & TQt::AlignRight ) x=viewport()->width() - m_pBackgroundOverlayPixmap->width(); - else if( m_iBackgroundOverlayAlignment & Qt::AlignHCenter ) + else if( m_iBackgroundOverlayAlignment & TQt::AlignHCenter ) x=(viewport()->width() - m_pBackgroundOverlayPixmap->width())/2; else x=0; - if( m_iBackgroundOverlayAlignment & Qt::AlignTop ) + if( m_iBackgroundOverlayAlignment & TQt::AlignTop ) y=0; - else if ( m_iBackgroundOverlayAlignment & Qt::AlignBottom ) + else if ( m_iBackgroundOverlayAlignment & TQt::AlignBottom ) y=viewport()->height() - m_pBackgroundOverlayPixmap->height(); - else if ( m_iBackgroundOverlayAlignment & Qt::AlignVCenter ) + else if ( m_iBackgroundOverlayAlignment & TQt::AlignVCenter ) y=(viewport()->height() - m_pBackgroundOverlayPixmap->height())/2; else y=0; @@ -110,16 +110,16 @@ void KviListView::drawContentsOffset(QPainter * p,int ox,int oy,int cx,int cy,in pa.drawPixmap(xx,yy,*m_pBackgroundOverlayPixmap,xx-x,yy-y,cw,ch); - // Qt's auto double buffering is buggy and can't be disabled... too bad :/ + // TQt's auto double buffering is buggy and can't be disabled... too bad :/ // - // The Qt source for the listview painting is also totally unreadable - // (maybe that's why they have thrown this cool widget away in Qt4: unmantainable) + // The TQt source for the listview painting is also totally unreadable + // (maybe that's why they have thrown this cool widget away in TQt4: unmantainable) // // Anyway, I've noticed that when double buffering is choosen (and - // Qt seems to have a really complex logic to choose when to enable it + // TQt seems to have a really complex logic to choose when to enable it // and when not) then the painter passed to paintCell() of the // list view items is NOT this painter. It's the internal painter - // of the QSharedDoubleBuffer private Qt class. It's screwed + // of the TQSharedDoubleBuffer private TQt class. It's screwed // because of the multiple coordinate translations. With this // widget we screw it even more just because our paintEmptyArea() // does nothing and we do double buffering ourselves. @@ -133,7 +133,7 @@ void KviListView::drawContentsOffset(QPainter * p,int ox,int oy,int cx,int cy,in } -void KviListView::paintEmptyArea(QPainter * p,const QRect & rect) +void KviListView::paintEmptyArea(TQPainter * p,const TQRect & rect) { if(!m_pBackgroundOverlayPixmap) { @@ -146,35 +146,35 @@ void KviListView::paintEmptyArea(QPainter * p,const QRect & rect) /* KviDoubleBuffer pix(rect.right()+1,rect.bottom()+1); - QPixmap * pMemPixmap = pix.pixmap(); + TQPixmap * pMemPixmap = pix.pixmap(); - QPainter pa(pMemPixmap); + TQPainter pa(pMemPixmap); pa.fillRect(rect,viewport()->backgroundColor()); KviTalListView::paintEmptyArea(&pa,rect); - QPoint realTopLeft = p->xForm(rect.topLeft()); + TQPoint realTopLeft = p->xForm(rect.topLeft()); // compute the pixmap position int x,y; - if(m_iBackgroundOverlayAlignment == Qt::AlignAuto) + if(m_iBackgroundOverlayAlignment == TQt::AlignAuto) x=y=0; else { - if(m_iBackgroundOverlayAlignment & Qt::AlignLeft) + if(m_iBackgroundOverlayAlignment & TQt::AlignLeft) x=0; - else if ( m_iBackgroundOverlayAlignment & Qt::AlignRight ) + else if ( m_iBackgroundOverlayAlignment & TQt::AlignRight ) x=viewport()->width() - m_pBackgroundOverlayPixmap->width(); - else if( m_iBackgroundOverlayAlignment & Qt::AlignHCenter ) + else if( m_iBackgroundOverlayAlignment & TQt::AlignHCenter ) x=(viewport()->width() - m_pBackgroundOverlayPixmap->width())/2; else x=0; - if( m_iBackgroundOverlayAlignment & Qt::AlignTop ) + if( m_iBackgroundOverlayAlignment & TQt::AlignTop ) y=0; - else if ( m_iBackgroundOverlayAlignment & Qt::AlignBottom ) + else if ( m_iBackgroundOverlayAlignment & TQt::AlignBottom ) y=viewport()->height() - m_pBackgroundOverlayPixmap->height(); - else if ( m_iBackgroundOverlayAlignment & Qt::AlignVCenter ) + else if ( m_iBackgroundOverlayAlignment & TQt::AlignVCenter ) y=(viewport()->height() - m_pBackgroundOverlayPixmap->height())/2; else y=0; @@ -186,27 +186,27 @@ void KviListView::paintEmptyArea(QPainter * p,const QRect & rect) */ } -void KviListView::resizeEvent(QResizeEvent * e) +void KviListView::resizeEvent(TQResizeEvent * e) { KviTalListView::resizeEvent(e); if(m_pBackgroundOverlayPixmap) - repaintContents(); // force a full repaint (otherwise qt does not honor static background here) + tqrepaintContents(); // force a full tqrepaint (otherwise qt does not honor static background here) } #ifdef COMPILE_ON_WINDOWS -void KviListView::focusInEvent(QFocusEvent * e) +void KviListView::focusInEvent(TQFocusEvent * e) { KviTalListView::focusInEvent(e); if(m_pBackgroundOverlayPixmap) - repaintContents(); + tqrepaintContents(); } -void KviListView::focusOutEvent(QFocusEvent * e) +void KviListView::focusOutEvent(TQFocusEvent * e) { KviTalListView::focusOutEvent(e); if(m_pBackgroundOverlayPixmap) - repaintContents(); + tqrepaintContents(); } #endif diff --git a/src/kvirc/ui/kvi_listview.h b/src/kvirc/ui/kvi_listview.h index 8d39529b..6f86d80e 100644 --- a/src/kvirc/ui/kvi_listview.h +++ b/src/kvirc/ui/kvi_listview.h @@ -30,28 +30,29 @@ #include "kvi_tal_listview.h" -class QPainter; +class TQPainter; class KVIRC_API KviListView : public KviTalListView { Q_OBJECT + TQ_OBJECT public: - KviListView( QWidget * parent = 0, const char * name = 0); + KviListView( TQWidget * tqparent = 0, const char * name = 0); ~KviListView(); protected: - QPixmap * m_pBackgroundOverlayPixmap; + TQPixmap * m_pBackgroundOverlayPixmap; int m_iBackgroundOverlayAlignment; public: - virtual void setBackgroundOverlayPixmap(QPixmap* pix,int iAlignmentFlags = Qt::AlignAuto); + virtual void setBackgroundOverlayPixmap(TQPixmap* pix,int iAlignmentFlags = TQt::AlignAuto); public: void publicUpdateContents(){ updateContents(); }; // <-- unscrewContents(); :D protected: - virtual void paintEmptyArea(QPainter * p, const QRect & rect ); - virtual void drawContentsOffset(QPainter * p,int ox,int oy,int cx,int cy,int cw,int ch); - virtual void resizeEvent(QResizeEvent * e); + virtual void paintEmptyArea(TQPainter * p, const TQRect & rect ); + virtual void drawContentsOffset(TQPainter * p,int ox,int oy,int cx,int cy,int cw,int ch); + virtual void resizeEvent(TQResizeEvent * e); #ifdef COMPILE_ON_WINDOWS - virtual void focusInEvent(QFocusEvent * e); - virtual void focusOutEvent(QFocusEvent * e); + virtual void focusInEvent(TQFocusEvent * e); + virtual void focusOutEvent(TQFocusEvent * e); #endif }; diff --git a/src/kvirc/ui/kvi_maskeditor.cpp b/src/kvirc/ui/kvi_maskeditor.cpp index 744df1ca..6a78a70e 100644 --- a/src/kvirc/ui/kvi_maskeditor.cpp +++ b/src/kvirc/ui/kvi_maskeditor.cpp @@ -1,6 +1,6 @@ //============================================================================= // -// File : kvi_maskeditor.cpp +// File : kvi_tqmaskeditor.cpp // Creation date : Tue Aug 30 2000 12:24:59 by Szymon Stefanek // // This file is part of the KVirc irc client distribution @@ -32,17 +32,17 @@ #include "kvi_toolwindows_container.h" #include "kvi_channel.h" -#include -#include -#include +#include +#include +#include -KviMaskItem::KviMaskItem(KviTalListView* parent,KviMaskEntry* entry) -:KviTalListViewItem(parent), m_Mask(*entry) +KviMaskItem::KviMaskItem(KviTalListView* tqparent,KviMaskEntry* entry) +:KviTalListViewItem(tqparent), m_Mask(*entry) { - QDateTime date; - date.setTime_t(mask()->uSetAt); - setText(0,mask()->szMask); - setText(1,mask()->szSetBy); + TQDateTime date; + date.setTime_t(tqmask()->uSetAt); + setText(0,tqmask()->szMask); + setText(1,tqmask()->szSetBy); setText(2,date.toString()); } @@ -52,20 +52,20 @@ KviMaskItem::~KviMaskItem() #ifdef COMPILE_USE_QT4 int KviMaskItem::compare ( KviTalListViewItem * i, int col, bool ascending ) const #else -int KviMaskItem::compare ( QListViewItem * i, int col, bool ascending ) const +int KviMaskItem::compare ( TQListViewItem * i, int col, bool ascending ) const #endif { if(col==2) { - if( ((KviMaskItem*)i)->mask()->uSetAt > m_Mask.uSetAt ) return -1; - if( ((KviMaskItem*)i)->mask()->uSetAt == m_Mask.uSetAt ) return 0; - if( ((KviMaskItem*)i)->mask()->uSetAt < m_Mask.uSetAt ) return 1; + if( ((KviMaskItem*)i)->tqmask()->uSetAt > m_Mask.uSetAt ) return -1; + if( ((KviMaskItem*)i)->tqmask()->uSetAt == m_Mask.uSetAt ) return 0; + if( ((KviMaskItem*)i)->tqmask()->uSetAt < m_Mask.uSetAt ) return 1; } return KviTalListViewItem::compare(i,col,ascending); } -KviMaskInputDialog::KviMaskInputDialog(const QString &szMask,KviMaskEditor* pEditor,KviChannel * pChannel) -:QDialog(pEditor) +KviMaskInputDialog::KviMaskInputDialog(const TQString &szMask,KviMaskEditor* pEditor,KviChannel * pChannel) +:TQDialog(pEditor) { m_pChannel=pChannel; m_pEditor=pEditor; @@ -74,26 +74,26 @@ KviMaskInputDialog::KviMaskInputDialog(const QString &szMask,KviMaskEditor* pEdi setCaption(__tr2qs("Mask editor - KVirc")); - QGridLayout * g = new QGridLayout(this,2,3,5,5); + TQGridLayout * g = new TQGridLayout(this,2,3,5,5); - QLabel * tl = new QLabel(__tr2qs("New mask must match an *!*@* expression"),this); + TQLabel * tl = new TQLabel(__tr2qs("New tqmask must match an *!*@* expression"),this); g->addMultiCellWidget(tl,0,0,0,3); - m_pEdit=new QLineEdit(szMask,this); + m_pEdit=new TQLineEdit(szMask,this); g->addMultiCellWidget(m_pEdit,1,1,0,3); - m_pOkButton= new QPushButton(__tr2qs("Ok"),this); - connect(m_pOkButton,SIGNAL(clicked()), this, SLOT(accept())); + m_pOkButton= new TQPushButton(__tr2qs("Ok"),this); + connect(m_pOkButton,TQT_SIGNAL(clicked()), this, TQT_SLOT(accept())); g->addWidget(m_pOkButton,2,1); m_pOkButton->setIconSet(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_ACCEPT))); - m_pChancelButton= new QPushButton(__tr2qs("Cancel"),this); - connect(m_pChancelButton,SIGNAL(clicked()), this, SLOT(reject())); + m_pChancelButton= new TQPushButton(__tr2qs("Cancel"),this); + connect(m_pChancelButton,TQT_SIGNAL(clicked()), this, TQT_SLOT(reject())); g->addWidget(m_pChancelButton,2,2); m_pChancelButton->setIconSet(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_DISCARD))); - QRegExp rx( "*!*@*", false,true ); - QValidator* validator = new QRegExpValidator( rx, this ); + TQRegExp rx( "*!*@*", false,true ); + TQValidator* validator = new TQRegExpValidator( rx, TQT_TQOBJECT(this) ); m_pEdit->setValidator( validator ); } @@ -120,15 +120,15 @@ void KviMaskInputDialog::accept() m_pChannel->connection()->encodeText(m_pEdit->text()).data() ); } - QDialog::accept(); + TQDialog::accept(); } -KviMaskEditor::KviMaskEditor(QWidget * par,KviWindowToolPageButton* button,KviPointerList * maskList,char flag,const char * nam) +KviMaskEditor::KviMaskEditor(TQWidget * par,KviWindowToolPageButton* button,KviPointerList * tqmaskList,char flag,const char * nam) : KviWindowToolWidget(par,button) { bool isEnabled=1; - QObject * w = parent(); + TQObject * w = tqparent(); while(w) { if(w->inherits("KviChannel")) @@ -137,20 +137,20 @@ KviMaskEditor::KviMaskEditor(QWidget * par,KviWindowToolPageButton* button,KviPo if(!( chan->isMeHalfOp() || chan->isMeOp() || chan->isMeChanOwner() || chan->isMeChanAdmin() || chan->connection()->userInfo()->hasUserMode('o') || chan->connection()->userInfo()->hasUserMode('O') ) ) isEnabled=0; break; } - w = w->parent(); + w = w->tqparent(); } #ifdef COMPILE_USE_QT4 - setFocusPolicy(Qt::ClickFocus); + setFocusPolicy(TTQ_ClickFocus); #else - setFocusPolicy(QWidget::ClickFocus); + setFocusPolicy(TQ_ClickFocus); #endif - QGridLayout *g = new QGridLayout(this,4,2,2,2); + TQGridLayout *g = new TQGridLayout(this,4,2,2,2); m_cFlag = flag; - QString txt; + TQString txt; switch(flag) { case 'b': @@ -171,32 +171,32 @@ KviMaskEditor::KviMaskEditor(QWidget * par,KviWindowToolPageButton* button,KviPo break; } - QLabel * l = new QLabel("",this); + TQLabel * l = new TQLabel("",this); l->setPixmap(*(g_pIconManager->getSmallIcon(m_iIconId))); g->addWidget(l,0,0); - l = new QLabel(txt,this); + l = new TQLabel(txt,this); g->addWidget(l,0,1); KviTalHBox * hb = new KviTalHBox(this); g->addMultiCellWidget(hb,1,1,0,1); - new QLabel(__tr2qs("Filter:"),hb); - m_pSearch = new QLineEdit(hb); - connect(m_pSearch,SIGNAL(textChanged ( const QString & ) ),this,SLOT(searchTextChanged ( const QString & ))); + new TQLabel(__tr2qs("Filter:"),hb); + m_pSearch = new TQLineEdit(hb); + connect(m_pSearch,TQT_SIGNAL(textChanged ( const TQString & ) ),this,TQT_SLOT(searchTextChanged ( const TQString & ))); - l = new QLabel(__tr2qs("Use doubleclick to edit item"),this); + l = new TQLabel(__tr2qs("Use doubleclick to edit item"),this); g->addWidget(l,1,1); g->addMultiCellWidget(l,2,2,0,1); m_pMaskBox = new KviTalListView(this); #ifdef COMPILE_USE_QT4 - m_pMaskBox->setFocusPolicy(Qt::ClickFocus); + m_pMaskBox->setFocusPolicy(TTQ_ClickFocus); #else - m_pMaskBox->setFocusPolicy(QWidget::ClickFocus); + m_pMaskBox->setFocusPolicy(TQ_ClickFocus); #endif m_pMaskBox->setFocusProxy(this); - m_pMaskBox->setFrameStyle(QFrame::StyledPanel|QFrame::Sunken); + m_pMaskBox->setFrameStyle(TQFrame::StyledPanel|TQFrame::Sunken); m_pMaskBox->addColumn(__tr2qs("Mask")); m_pMaskBox->addColumn(__tr2qs("Set by")); m_pMaskBox->addColumn(__tr2qs("Set at")); @@ -204,36 +204,36 @@ KviMaskEditor::KviMaskEditor(QWidget * par,KviWindowToolPageButton* button,KviPo m_pMaskBox->setAllColumnsShowFocus(true); m_pMaskBox->setShowSortIndicator(true); m_pMaskBox->setSorting(2,false); - connect(m_pMaskBox,SIGNAL(doubleClicked ( KviTalListViewItem * )),this,SLOT(listViewDoubleClicked( KviTalListViewItem * ))); + connect(m_pMaskBox,TQT_SIGNAL(doubleClicked ( KviTalListViewItem * )),this,TQT_SLOT(listViewDoubleClicked( KviTalListViewItem * ))); g->addMultiCellWidget(m_pMaskBox,3,3,0,1); - m_pRemoveMask = new QPushButton(__tr2qs("Re&move"),this); + m_pRemoveMask = new TQPushButton(__tr2qs("Re&move"),this); m_pRemoveMask->setEnabled(isEnabled); #ifdef COMPILE_USE_QT4 - m_pRemoveMask->setFocusPolicy(Qt::ClickFocus); + m_pRemoveMask->setFocusPolicy(TTQ_ClickFocus); #else - m_pRemoveMask->setFocusPolicy(QWidget::ClickFocus); + m_pRemoveMask->setFocusPolicy(TQ_ClickFocus); #endif m_pRemoveMask->setFocusProxy(this); g->addWidget(m_pRemoveMask,4,1); - connect(m_pRemoveMask,SIGNAL(clicked()),this,SLOT(removeClicked())); + connect(m_pRemoveMask,TQT_SIGNAL(clicked()),this,TQT_SLOT(removeClicked())); m_pRemoveMask->setIconSet(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_DELETEITEM))); - m_pAddButton = new QPushButton(__tr2qs("Add"),this); + m_pAddButton = new TQPushButton(__tr2qs("Add"),this); m_pAddButton->setEnabled(isEnabled); #ifdef COMPILE_USE_QT4 - m_pAddButton->setFocusPolicy(Qt::ClickFocus); + m_pAddButton->setFocusPolicy(TTQ_ClickFocus); #else - m_pAddButton->setFocusPolicy(QWidget::ClickFocus); + m_pAddButton->setFocusPolicy(TQ_ClickFocus); #endif m_pAddButton->setFocusProxy(this); g->addWidget(m_pAddButton,4,0); - connect(m_pAddButton,SIGNAL(clicked()),this,SLOT(addClicked())); + connect(m_pAddButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(addClicked())); m_pAddButton->setIconSet(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_NEWITEM))); g->setColStretch(3,1); - for(KviMaskEntry * e = maskList->first();e;e = maskList->next()) addMask(e); + for(KviMaskEntry * e = tqmaskList->first();e;e = tqmaskList->next()) addMask(e); registerSelf(); } @@ -242,7 +242,7 @@ KviMaskEditor::~KviMaskEditor() } -void KviMaskEditor::searchTextChanged ( const QString & text) +void KviMaskEditor::searchTextChanged ( const TQString & text) { KviTalListViewItem *pItem=m_pMaskBox->firstChild(); KviMaskItem *pMaskItem; @@ -254,7 +254,7 @@ void KviMaskEditor::searchTextChanged ( const QString & text) { pMaskItem->setVisible(true); } else { - if(pMaskItem->mask()->szMask.contains(text)) + if(pMaskItem->tqmask()->szMask.tqcontains(text)) pMaskItem->setVisible(true); else pMaskItem->setVisible(false); @@ -273,9 +273,9 @@ void KviMaskEditor::removeClicked() if(it->isSelected()) { KviMaskEntry * e = new KviMaskEntry; - e->szMask = it->mask()->szMask; - e->szSetBy = it->mask()->szSetBy; - e->uSetAt = it->mask()->uSetAt; + e->szMask = it->tqmask()->szMask; + e->szSetBy = it->tqmask()->szSetBy; + e->uSetAt = it->tqmask()->uSetAt; l->append(e); } it = (KviMaskItem *)(it->nextSibling()); @@ -286,7 +286,7 @@ void KviMaskEditor::removeClicked() void KviMaskEditor::addClicked() { - QObject * w = parent(); + TQObject * w = tqparent(); while(w) { if(w->inherits("KviChannel")) @@ -299,7 +299,7 @@ void KviMaskEditor::addClicked() } break; } - w = w->parent(); + w = w->tqparent(); } } @@ -316,7 +316,7 @@ void KviMaskEditor::removeMask(KviMaskEntry *e) KviMaskItem * it =(KviMaskItem *)(m_pMaskBox->firstChild()); while(it) { - if(KviQString::equalCI(it->mask()->szMask,e->szMask)) + if(KviTQString::equalCI(it->tqmask()->szMask,e->szMask)) { delete it; return; @@ -329,7 +329,7 @@ void KviMaskEditor::listViewDoubleClicked( KviTalListViewItem * pItem) { if(pItem) { - QObject * w = parent(); + TQObject * w = tqparent(); while(w) { if(w->inherits("KviChannel")) @@ -342,7 +342,7 @@ void KviMaskEditor::listViewDoubleClicked( KviTalListViewItem * pItem) } break; } - w = w->parent(); + w = w->tqparent(); } } } diff --git a/src/kvirc/ui/kvi_maskeditor.h b/src/kvirc/ui/kvi_maskeditor.h index de281377..9c6c77be 100644 --- a/src/kvirc/ui/kvi_maskeditor.h +++ b/src/kvirc/ui/kvi_maskeditor.h @@ -2,7 +2,7 @@ #define _KVI_MASKEDITOR_H_ // -// File : kvi_maskeditor.h +// File : kvi_tqmaskeditor.h // Creation date : Tue Aug 30 2000 12:20:10 by Szymon Stefanek // // This file is part of the KVirc irc client distribution @@ -24,11 +24,11 @@ // #include "kvi_settings.h" -#include -#include -#include +#include +#include +#include #include "kvi_tal_listview.h" -#include +#include #include "kvi_pointerlist.h" #include "kvi_string.h" @@ -39,39 +39,40 @@ class KviChannel; typedef struct _KviMaskEntry { - QString szMask; - QString szSetBy; + TQString szMask; + TQString szSetBy; unsigned int uSetAt; } KviMaskEntry; class KviMaskItem: public KviTalListViewItem { public: - KviMaskItem(KviTalListView* parent,KviMaskEntry* entry); + KviMaskItem(KviTalListView* tqparent,KviMaskEntry* entry); ~KviMaskItem(); - KviMaskEntry* mask() { return &m_Mask; }; + KviMaskEntry* tqmask() { return &m_Mask; }; #ifdef COMPILE_USE_QT4 virtual int compare ( KviTalListViewItem * i, int col, bool ascending ) const; #else - virtual int compare ( QListViewItem * i, int col, bool ascending ) const; + virtual int compare ( TQListViewItem * i, int col, bool ascending ) const; #endif protected: KviMaskEntry m_Mask; }; -class KviMaskInputDialog : public QDialog +class KviMaskInputDialog : public TQDialog { Q_OBJECT + TQ_OBJECT public: - KviMaskInputDialog(const QString &szMask,KviMaskEditor* pEditor,KviChannel * pChannel); + KviMaskInputDialog(const TQString &szMask,KviMaskEditor* pEditor,KviChannel * pChannel); ~KviMaskInputDialog(); protected: - QLineEdit * m_pEdit; - QPushButton * m_pOkButton; - QPushButton * m_pChancelButton; - QString m_szOldMask; + TQLineEdit * m_pEdit; + TQPushButton * m_pOkButton; + TQPushButton * m_pChancelButton; + TQString m_szOldMask; KviChannel * m_pChannel; KviMaskEditor * m_pEditor; protected slots: @@ -81,15 +82,16 @@ protected slots: class KVIRC_API KviMaskEditor : public KviWindowToolWidget { Q_OBJECT + TQ_OBJECT public: - KviMaskEditor(QWidget * par,KviWindowToolPageButton* button,KviPointerList * maskList, + KviMaskEditor(TQWidget * par,KviWindowToolPageButton* button,KviPointerList * tqmaskList, char flag,const char * nam); ~KviMaskEditor(); protected: KviTalListView * m_pMaskBox; - QPushButton * m_pRemoveMask; - QPushButton * m_pAddButton; - QLineEdit * m_pSearch; + TQPushButton * m_pRemoveMask; + TQPushButton * m_pAddButton; + TQLineEdit * m_pSearch; char m_cFlag; int m_iIconId; public: @@ -100,7 +102,7 @@ protected slots: void removeClicked(); void addClicked(); void listViewDoubleClicked( KviTalListViewItem * ); - void searchTextChanged ( const QString & ); + void searchTextChanged ( const TQString & ); signals: void removeMasks(KviMaskEditor *,KviPointerList *); }; diff --git a/src/kvirc/ui/kvi_mdicaption.cpp b/src/kvirc/ui/kvi_mdicaption.cpp index ba4aea40..08f3af2a 100644 --- a/src/kvirc/ui/kvi_mdicaption.cpp +++ b/src/kvirc/ui/kvi_mdicaption.cpp @@ -36,27 +36,27 @@ #include "kvi_window.h" #include "kvi_mdicaption.h" -#include -#include -#include -#include +#include +#include +#include +#include #include "kvi_pointerlist.h" -#include -#include -#include +#include +#include +#include #include "kvi_tal_popupmenu.h" #ifdef COMPILE_USE_QT4 - #include - #define QSimpleRichText Q3SimpleRichText - #include + #include + #define TQSimpleRichText Q3SimpleRichText + #include #else - #include + #include #endif -#include -#include +#include +#include -KviMdiCaptionButton::KviMdiCaptionButton(const QPixmap &pix,QWidget * parent,const char * name) -: QToolButton(parent,name) +KviMdiCaptionButton::KviMdiCaptionButton(const TQPixmap &pix,TQWidget * tqparent,const char * name) +: TQToolButton(tqparent,name) { setPixmap(pix); //setAutoRaise(true); @@ -69,23 +69,23 @@ KviMdiCaptionButton::~KviMdiCaptionButton() #ifdef COMPILE_USE_QT4 -void KviMdiCaptionButton::paintEvent(QPaintEvent *e) +void KviMdiCaptionButton::paintEvent(TQPaintEvent *e) { - QPainter painter(this); + TQPainter painter(this); drawButton(&painter); } #endif -void KviMdiCaptionButton::drawButton(QPainter *p) +void KviMdiCaptionButton::drawButton(TQPainter *p) { #ifdef COMPILE_USE_QT4 - QBrush b(parentWidget()->palette().window()); + TQBrush b(tqparentWidget()->palette().window()); #else - QBrush b(parentWidget()->colorGroup().background()); + TQBrush b(tqparentWidget()->tqcolorGroup().background()); #endif if(isDown()) - qDrawShadePanel(p,0,0,width(),height(),colorGroup(),true,1,&b); + qDrawShadePanel(p,0,0,width(),height(),tqcolorGroup(),true,1,&b); else p->fillRect(0,0,width(),height(),b); @@ -104,19 +104,19 @@ void KviMdiCaptionButton::drawButton(QPainter *p) -KviMdiCaption::KviMdiCaption(KviMdiChild * parent,const char * name) -: QWidget(parent,name) +KviMdiCaption::KviMdiCaption(KviMdiChild * tqparent,const char * name) +: TQWidget(tqparent,name) { m_pMaximizeButton = new KviMdiCaptionButton(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_MAXIMIZE)),this,"maximize_button"); - connect(m_pMaximizeButton,SIGNAL(clicked()),parent,SLOT(maximize())); + connect(m_pMaximizeButton,TQT_SIGNAL(clicked()),tqparent,TQT_SLOT(maximize())); m_pMinimizeButton = new KviMdiCaptionButton(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_MINIMIZE)),this,"minimize_button"); - connect(m_pMinimizeButton,SIGNAL(clicked()),parent,SLOT(minimize())); + connect(m_pMinimizeButton,TQT_SIGNAL(clicked()),tqparent,TQT_SLOT(minimize())); m_pCloseButton = new KviMdiCaptionButton(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_CLOSE)),this,"close_button"); - connect(m_pCloseButton,SIGNAL(clicked()),parent,SLOT(closeRequest())); + connect(m_pCloseButton,TQT_SIGNAL(clicked()),tqparent,TQT_SLOT(closeRequest())); m_pSystemButton = new KviMdiCaptionButton(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_DEFAULTICON)),this,"icon_button"); - connect(m_pSystemButton,SIGNAL(clicked()),parent,SLOT(systemPopupSlot())); + connect(m_pSystemButton,TQT_SIGNAL(clicked()),tqparent,TQT_SLOT(systemPopupSlot())); - m_lastMousePos = QPoint(-1,-1); + m_lastMousePos = TQPoint(-1,-1); m_bMouseGrabbed = true; m_bActive = false; calcLineSpacing(); @@ -138,7 +138,7 @@ void KviMdiCaption::reloadImages() void KviMdiCaption::calcLineSpacing() { - QFontMetrics fm(font()); + TQFontMetrics fm(font()); m_iLineSpacing = fm.lineSpacing() + 3; if(m_iLineSpacing < 20)m_iLineSpacing = 20; } @@ -152,7 +152,7 @@ void KviMdiCaption::setActive(bool bActive) { m_bActive = bActive; - QPalette pal(Qt::white,m_bActive ? KVI_OPTION_COLOR(KviOption_colorMdiCaptionActive) : KVI_OPTION_COLOR(KviOption_colorMdiCaptionInactive)); + TQPalette pal(TQt::white,m_bActive ? KVI_OPTION_COLOR(KviOption_colorMdiCaptionActive) : KVI_OPTION_COLOR(KviOption_colorMdiCaptionInactive)); setPalette(pal); //update(); m_pSystemButton->update(); @@ -161,33 +161,33 @@ void KviMdiCaption::setActive(bool bActive) m_pMaximizeButton->update(); } -void KviMdiCaption::fontChange(const QFont &old) +void KviMdiCaption::fontChange(const TQFont &old) { calcLineSpacing(); - QWidget::fontChange(old); - ((KviMdiChild *)parent())->resizeEvent(0); + TQWidget::fontChange(old); + ((KviMdiChild *)tqparent())->resizeEvent(0); } -void KviMdiCaption::mousePressEvent(QMouseEvent *e) +void KviMdiCaption::mousePressEvent(TQMouseEvent *e) { m_bMouseGrabbed = true; - m_lastMousePos = QCursor::pos(); + m_lastMousePos = TQCursor::pos(); #ifdef COMPILE_USE_QT4 - setCursor(Qt::SizeAllCursor); + setCursor(TQt::SizeAllCursor); #else - setCursor(QCursor::sizeAllCursor); + setCursor(TQCursor::sizeAllCursor); #endif - ((KviMdiChild *)parent())->activate(true); + ((KviMdiChild *)tqparent())->activate(true); } -void KviMdiCaption::mouseMoveEvent(QMouseEvent *) +void KviMdiCaption::mouseMoveEvent(TQMouseEvent *) { if(m_bMouseGrabbed) { - QPoint p = QCursor::pos(); + TQPoint p = TQCursor::pos(); int dx = m_lastMousePos.x() - p.x(); int dy = m_lastMousePos.y() - p.y(); - KviMdiChild * c = (KviMdiChild *)parent(); + KviMdiChild * c = (KviMdiChild *)tqparent(); int nx = c->manager()->childX(c) - dx; int ny = c->manager()->childY(c) - dy; @@ -207,8 +207,8 @@ void KviMdiCaption::mouseMoveEvent(QMouseEvent *) ny = 0; } - QCursor::setPos(cx,cy); - m_lastMousePos = QPoint(cx,cy); + TQCursor::setPos(cx,cy); + m_lastMousePos = TQPoint(cx,cy); } else { m_lastMousePos = p; } @@ -218,41 +218,41 @@ void KviMdiCaption::mouseMoveEvent(QMouseEvent *) } } -void KviMdiCaption::mouseDoubleClickEvent(QMouseEvent *e) +void KviMdiCaption::mouseDoubleClickEvent(TQMouseEvent *e) { - ((KviMdiChild *)parent())->maximize(); + ((KviMdiChild *)tqparent())->maximize(); } -void KviMdiCaption::paintEvent(QPaintEvent * e) +void KviMdiCaption::paintEvent(TQPaintEvent * e) { - QRect r = e->rect(); - QPainter p(this); + TQRect r = e->rect(); + TQPainter p(this); p.fillRect(r,m_bActive ? KVI_OPTION_COLOR(KviOption_colorMdiCaptionActive) : KVI_OPTION_COLOR(KviOption_colorMdiCaptionInactive)); - QSimpleRichText rt(m_bActive ? ((KviMdiChild *)parent())->xmlActiveCaption() : ((KviMdiChild *)parent())->xmlInactiveCaption(),font()); - rt.draw(&p,height() + 2,-1,rect(),colorGroup()); + TQSimpleRichText rt(m_bActive ? ((KviMdiChild *)tqparent())->xmlActiveCaption() : ((KviMdiChild *)tqparent())->xmlInactiveCaption(),font()); + rt.draw(&p,height() + 2,-1,rect(),tqcolorGroup()); } -void KviMdiCaption::mouseReleaseEvent(QMouseEvent *) +void KviMdiCaption::mouseReleaseEvent(TQMouseEvent *) { m_bMouseGrabbed = false; #ifdef COMPILE_USE_QT4 - setCursor(Qt::arrowCursor); + setCursor(TQt::arrowCursor); #else - setCursor(QCursor::arrowCursor); + setCursor(TQCursor::arrowCursor); #endif // releaseMouse(); } -void KviMdiCaption::setFocusProxy(QWidget * w) +void KviMdiCaption::setFocusProxy(TQWidget * w) { - QWidget::setFocusProxy(w); + TQWidget::setFocusProxy(w); m_pSystemButton->setFocusProxy(w); m_pMinimizeButton->setFocusProxy(w); m_pMaximizeButton->setFocusProxy(w); m_pCloseButton->setFocusProxy(w); } -void KviMdiCaption::resizeEvent(QResizeEvent * e) +void KviMdiCaption::resizeEvent(TQResizeEvent * e) { int s = height() - 2; m_pSystemButton->setGeometry(1,1,s,s); @@ -266,7 +266,7 @@ void KviMdiCaption::resizeEvent(QResizeEvent * e) -KviMenuBarToolButton::KviMenuBarToolButton(QWidget * par,const QPixmap &img, const char * name) +KviMenuBarToolButton::KviMenuBarToolButton(TQWidget * par,const TQPixmap &img, const char * name) : KviStyledToolButton(par) { setProperty("name","name"); @@ -278,8 +278,8 @@ KviMenuBarToolButton::~KviMenuBarToolButton() { } -QSize KviMenuBarToolButton::sizeHint() const +TQSize KviMenuBarToolButton::tqsizeHint() const { - return QSize(20,20); + return TQSize(20,20); } diff --git a/src/kvirc/ui/kvi_mdicaption.h b/src/kvirc/ui/kvi_mdicaption.h index 6bec4051..d070e194 100644 --- a/src/kvirc/ui/kvi_mdicaption.h +++ b/src/kvirc/ui/kvi_mdicaption.h @@ -26,24 +26,25 @@ #include "kvi_settings.h" -#include -#include +#include +#include #include "kvi_styled_controls.h" class KviMdiManager; class KviMdiChild; -class KVIRC_API KviMdiCaptionButton : public QToolButton +class KVIRC_API KviMdiCaptionButton : public TQToolButton { Q_OBJECT + TQ_OBJECT public: - KviMdiCaptionButton(const QPixmap &pix,QWidget * parent,const char * name); + KviMdiCaptionButton(const TQPixmap &pix,TQWidget * tqparent,const char * name); ~KviMdiCaptionButton(); protected: - virtual void drawButton(QPainter * p); + virtual void drawButton(TQPainter * p); #ifdef COMPILE_USE_QT4 - virtual void paintEvent(QPaintEvent *e); + virtual void paintEvent(TQPaintEvent *e); #endif }; @@ -51,23 +52,25 @@ protected: class KviMenuBarToolButton : public KviStyledToolButton { Q_OBJECT + TQ_OBJECT public: - KviMenuBarToolButton(QWidget * par,const QPixmap &img, const char * name); + KviMenuBarToolButton(TQWidget * par,const TQPixmap &img, const char * name); ~KviMenuBarToolButton(); public: - virtual QSize sizeHint() const; + virtual TQSize tqsizeHint() const; }; -class KVIRC_API KviMdiCaption : public QWidget +class KVIRC_API KviMdiCaption : public TQWidget { friend class KviMdiChild; Q_OBJECT + TQ_OBJECT public: - KviMdiCaption(KviMdiChild * parent,const char * name); + KviMdiCaption(KviMdiChild * tqparent,const char * name); ~KviMdiCaption(); protected: - QPoint m_lastMousePos; + TQPoint m_lastMousePos; bool m_bMouseGrabbed; int m_iLineSpacing; bool m_bActive; @@ -75,25 +78,25 @@ protected: KviMdiCaptionButton * m_pMinimizeButton; KviMdiCaptionButton * m_pMaximizeButton; KviMdiCaptionButton * m_pCloseButton; - QPixmap m_pixSystemIcon; + TQPixmap m_pixSystemIcon; public: int heightHint(); void setActive(bool bActive); bool active(){ return m_bActive; }; - void setSystemIcon(const QPixmap &pix){ m_pSystemButton->setPixmap(pix); m_pixSystemIcon = pix; }; - const QPixmap * systemIcon(){ return &m_pixSystemIcon; }; + void setSystemIcon(const TQPixmap &pix){ m_pSystemButton->setPixmap(pix); m_pixSystemIcon = pix; }; + const TQPixmap * systemIcon(){ return &m_pixSystemIcon; }; void enableClose(bool bEnable){ m_pCloseButton->setEnabled(bEnable); }; bool closeEnabled(){ return m_pCloseButton->isEnabled(); }; - virtual void setFocusProxy(QWidget * w); + virtual void setFocusProxy(TQWidget * w); protected: void calcLineSpacing(); - virtual void fontChange(const QFont &old); - virtual void mousePressEvent(QMouseEvent *e); - virtual void mouseDoubleClickEvent(QMouseEvent *e); - virtual void mouseMoveEvent(QMouseEvent *e); - virtual void mouseReleaseEvent(QMouseEvent *e); - virtual void paintEvent(QPaintEvent * e); - virtual void resizeEvent(QResizeEvent * e); + virtual void fontChange(const TQFont &old); + virtual void mousePressEvent(TQMouseEvent *e); + virtual void mouseDoubleClickEvent(TQMouseEvent *e); + virtual void mouseMoveEvent(TQMouseEvent *e); + virtual void mouseReleaseEvent(TQMouseEvent *e); + virtual void paintEvent(TQPaintEvent * e); + virtual void resizeEvent(TQResizeEvent * e); void reloadImages(); }; diff --git a/src/kvirc/ui/kvi_mdichild.cpp b/src/kvirc/ui/kvi_mdichild.cpp index 9b92c563..b559be87 100644 --- a/src/kvirc/ui/kvi_mdichild.cpp +++ b/src/kvirc/ui/kvi_mdichild.cpp @@ -35,29 +35,29 @@ #include "kvi_window.h" #include "kvi_mdicaption.h" -#include -#include -#include -#include +#include +#include +#include +#include #include "kvi_pointerlist.h" -#include -#include -#include +#include +#include +#include #include "kvi_tal_popupmenu.h" #ifndef COMPILE_USE_QT4 - #include + #include #endif -#include +#include #ifdef Q_OS_MACX #include "kvi_app.h" //Needed for g_pApp #ifdef COMPILE_USE_QT4 - #include + #include #endif #endif #ifdef COMPILE_PSEUDO_TRANSPARENCY - extern QPixmap * g_pShadedChildGlobalDesktopBackground; + extern TQPixmap * g_pShadedChildGlobalDesktopBackground; #endif @@ -73,9 +73,9 @@ KviMdiChild::KviMdiChild(KviMdiManager * par,const char * name) -: QFrame(par->viewport(),name ? name : "mdi_child") +: TQFrame(par->viewport(),name ? name : "mdi_child") { - setFrameStyle(QFrame::StyledPanel | QFrame::Raised); + setFrameStyle(TQFrame::StyledPanel | TQFrame::Raised); setFrameShape(NoFrame); m_pManager = par; @@ -87,7 +87,7 @@ KviMdiChild::KviMdiChild(KviMdiManager * par,const char * name) m_pClient = 0; m_state = Normal; - m_restoredGeometry = QRect(10,10,100,100); + m_restoredGeometry = TQRect(10,10,100,100); setMouseTracking(true); setMinimumSize(KVI_MDICHILD_MIN_WIDTH,KVI_MDICHILD_MIN_HEIGHT); @@ -108,29 +108,29 @@ void KviMdiChild::reloadImages() m_pCaption->reloadImages(); } -QRect KviMdiChild::restoredGeometry() +TQRect KviMdiChild::restoredGeometry() { if(m_state == Maximized)return m_restoredGeometry; - else return QRect(x(),y(),width(),height()); -// else return geometry(); + else return TQRect(x(),y(),width(),height()); +// else return tqgeometry(); } #ifdef COMPILE_USE_QT4 -void KviMdiChild::setBackgroundRole(QPalette::ColorRole) +void KviMdiChild::setBackgroundRole(TQPalette::ColorRole) { // hack - QFrame::setBackgroundRole(QPalette::Window); + TQFrame::setBackgroundRole(TQPalette::Window); } #else -void KviMdiChild::setBackgroundMode(QWidget::BackgroundMode) +void KviMdiChild::setBackgroundMode(TQWidget::BackgroundMode) { // hack - QFrame::setBackgroundMode(QWidget::PaletteBackground); + TQFrame::setBackgroundMode(TQWidget::PaletteBackground); } #endif -void KviMdiChild::setIcon(const QPixmap &pix) +void KviMdiChild::setIcon(const TQPixmap &pix) { m_pCaption->setSystemIcon(pix); @@ -140,7 +140,7 @@ void KviMdiChild::setIcon(const QPixmap &pix) } } -const QPixmap * KviMdiChild::icon() +const TQPixmap * KviMdiChild::icon() { return m_pCaption->systemIcon(); } @@ -160,7 +160,7 @@ bool KviMdiChild::closeEnabled() return m_pCaption->closeEnabled(); } -void KviMdiChild::setCaption(const QString & plain,const QString & xmlActive,const QString & xmlInactive) +void KviMdiChild::setCaption(const TQString & plain,const TQString & xmlActive,const TQString & xmlInactive) { m_szPlainCaption = plain; m_szXmlActiveCaption = xmlActive; @@ -172,7 +172,7 @@ void KviMdiChild::setCaption(const QString & plain,const QString & xmlActive,con void KviMdiChild::maximize() { if(m_state == Minimized)restore(); // restore first - if(m_state == Normal)m_restoredGeometry = geometry(); + if(m_state == Normal)m_restoredGeometry = tqgeometry(); m_state = Maximized; manager()->maximizeChild(this); } @@ -225,7 +225,7 @@ void KviMdiChild::minimize() m_pManager->childMinimized(this,true); break; case Normal: - m_restoredGeometry = geometry(); + m_restoredGeometry = tqgeometry(); hide(); m_state = Minimized; m_pManager->childMinimized(this,false); @@ -246,17 +246,17 @@ void KviMdiChild::closeRequest() void KviMdiChild::systemPopupAboutToShow() { m_pSystemPopup->clear(); - if(m_state != Maximized)m_pSystemPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_MAXIMIZE)),__tr("&Maximize"),this,SLOT(maximize())); - if(m_state != Minimized)m_pSystemPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_MINIMIZE)),__tr("M&inimize"),this,SLOT(minimize())); - if(m_state != Normal)m_pSystemPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_RESTORE)),__tr("&Restore"),this,SLOT(restore())); + if(m_state != Maximized)m_pSystemPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_MAXIMIZE)),__tr("&Maximize"),this,TQT_SLOT(maximize())); + if(m_state != Minimized)m_pSystemPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_MINIMIZE)),__tr("M&inimize"),this,TQT_SLOT(minimize())); + if(m_state != Normal)m_pSystemPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_RESTORE)),__tr("&Restore"),this,TQT_SLOT(restore())); if(closeEnabled()) { m_pSystemPopup->insertSeparator(); - m_pSystemPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_CLOSE)),__tr("&Close"),this,SLOT(closeRequest())); + m_pSystemPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_CLOSE)),__tr("&Close"),this,TQT_SLOT(closeRequest())); } } */ -void KviMdiChild::moveEvent(QMoveEvent *e) +void KviMdiChild::moveEvent(TQMoveEvent *e) { #ifdef COMPILE_PSEUDO_TRANSPARENCY if(m_pClient && g_pShadedChildGlobalDesktopBackground) @@ -267,20 +267,20 @@ void KviMdiChild::moveEvent(QMoveEvent *e) } } #endif - QFrame::moveEvent(e); + TQFrame::moveEvent(e); } void KviMdiChild::systemPopupSlot() { - if(sender()->inherits("QToolButton")) + if(sender()->inherits(TQTOOLBUTTON_OBJECT_NAME_STRING)) { - emit systemPopupRequest(((QToolButton *)sender())->mapToGlobal(QPoint(0,((QToolButton *)sender())->height()))); + emit systemPopupRequest(((TQToolButton *)sender())->mapToGlobal(TQPoint(0,((TQToolButton *)sender())->height()))); } else { - emit systemPopupRequest(m_pCaption->mapToGlobal(QPoint(5,5))); + emit systemPopupRequest(m_pCaption->mapToGlobal(TQPoint(5,5))); } } -void KviMdiChild::resizeEvent(QResizeEvent *e) +void KviMdiChild::resizeEvent(TQResizeEvent *e) { int s = m_pCaption->heightHint(); m_pCaption->setGeometry(KVI_MDICHILD_BORDER,KVI_MDICHILD_BORDER, @@ -292,10 +292,10 @@ void KviMdiChild::resizeEvent(QResizeEvent *e) m_pClient->setGeometry(KVI_MDICHILD_BORDER,yPos, width() - (KVI_MDICHILD_BORDER << 1),height() - (yPos + KVI_MDICHILD_BORDER)); } - QFrame::resizeEvent(e); + TQFrame::resizeEvent(e); } -void KviMdiChild::mousePressEvent(QMouseEvent *e) +void KviMdiChild::mousePressEvent(TQMouseEvent *e) { if(m_state == Maximized)return; m_iResizeCorner=getResizeCorner(e->pos().x(),e->pos().y()); @@ -306,7 +306,7 @@ void KviMdiChild::mousePressEvent(QMouseEvent *e) } } -void KviMdiChild::mouseReleaseEvent(QMouseEvent *) +void KviMdiChild::mouseReleaseEvent(TQMouseEvent *) { m_iResizeCorner=KVI_MDI_NORESIZE; m_iLastCursorCorner=KVI_MDI_NORESIZE; @@ -317,36 +317,36 @@ void KviMdiChild::mouseReleaseEvent(QMouseEvent *) releaseMouse(); } - //if(QApplication::overrideCursor())QApplication::restoreOverrideCursor(); + //if(TQApplication::overrideCursor())TQApplication::restoreOverrideCursor(); } -QCursor KviMdiChild::getResizeCursor(int resizeCorner) +TQCursor KviMdiChild::getResizeCursor(int resizeCorner) { switch (resizeCorner) { case KVI_MDI_RESIZE_LEFT: case KVI_MDI_RESIZE_RIGHT: - return Qt::sizeHorCursor; + return TQt::sizeHorCursor; break; case KVI_MDI_RESIZE_TOP: case KVI_MDI_RESIZE_BOTTOM: - return Qt::sizeVerCursor; + return TQt::sizeVerCursor; break; case KVI_MDI_RESIZE_TOPLEFT: case KVI_MDI_RESIZE_BOTTOMRIGHT: - return Qt::sizeFDiagCursor; + return TQt::sizeFDiagCursor; break; case KVI_MDI_RESIZE_BOTTOMLEFT: case KVI_MDI_RESIZE_TOPRIGHT: - return Qt::sizeBDiagCursor; + return TQt::sizeBDiagCursor; break; default: - return Qt::arrowCursor; + return TQt::arrowCursor; break; } } -void KviMdiChild::mouseMoveEvent(QMouseEvent *e) +void KviMdiChild::mouseMoveEvent(TQMouseEvent *e) { if(e->state() & Qt::LeftButton) { @@ -364,29 +364,29 @@ void KviMdiChild::setResizeCursor(int resizeCorner) if(resizeCorner == KVI_MDI_NORESIZE) { setCursor(getResizeCursor(resizeCorner)); - //if(QApplication::overrideCursor())QApplication::restoreOverrideCursor(); + //if(TQApplication::overrideCursor())TQApplication::restoreOverrideCursor(); } else { if(m_state != Maximized) { setCursor(getResizeCursor(resizeCorner)); - //QApplication::setOverrideCursor(getResizeCursor(resizeCorner),true); + //TQApplication::setOverrideCursor(getResizeCursor(resizeCorner),true); } } } -void KviMdiChild::leaveEvent(QEvent *) +void KviMdiChild::leaveEvent(TQEvent *) { if(!m_bResizeMode) { m_iResizeCorner=KVI_MDI_NORESIZE; m_iLastCursorCorner=KVI_MDI_NORESIZE; - //if(QApplication::overrideCursor())QApplication::restoreOverrideCursor(); + //if(TQApplication::overrideCursor())TQApplication::restoreOverrideCursor(); } else { if(m_iResizeCorner != KVI_MDI_NORESIZE)resizeWindowOpaque(m_iResizeCorner); } } -void KviMdiChild::calculateResizeRect(int resizeCorner,QPoint mousePos,QRect &resizeRect,int minWidth,int minHeight) +void KviMdiChild::calculateResizeRect(int resizeCorner,TQPoint mousePos,TQRect &resizeRect,int minWidth,int minHeight) { switch(resizeCorner) { @@ -442,8 +442,8 @@ void KviMdiChild::calculateResizeRect(int resizeCorner,QPoint mousePos,QRect &re void KviMdiChild::calculateMinimumSize(int &minWidth,int &minHeight) { if(m_pClient){ - minWidth = m_pClient->minimumSize().width() + (KVI_MDICHILD_BORDER << 1); - minHeight = m_pClient->minimumSize().height()+ (KVI_MDICHILD_BORDER << 1)+ + minWidth = m_pClient->tqminimumSize().width() + (KVI_MDICHILD_BORDER << 1); + minHeight = m_pClient->tqminimumSize().height()+ (KVI_MDICHILD_BORDER << 1)+ m_pCaption->heightHint() + KVI_MDICHILD_SPACING; } if(minWidthchildX(this),m_pManager->childY(this),width(),height()); + TQRect resizeRect(m_pManager->childX(this),m_pManager->childY(this),width(),height()); calculateMinimumSize(minWidth,minHeight); - QPoint mousePos = m_pManager->viewportToContents(m_pManager->viewport()->mapFromGlobal(QCursor::pos())); + TQPoint mousePos = m_pManager->viewportToContents(m_pManager->viewport()->mapFromGlobal(TQCursor::pos())); calculateResizeRect(resizeCorner,mousePos,resizeRect,minWidth,minHeight); m_pManager->moveChild(this,resizeRect.x(),resizeRect.y()); resize(resizeRect.width(),resizeRect.height()); @@ -480,7 +480,7 @@ int KviMdiChild::getResizeCorner(int ax,int ay) return ret; } -void KviMdiChild::setClient(QWidget *w) +void KviMdiChild::setClient(TQWidget *w) { __range_valid(m_pClient==0); __range_valid(w!=0); @@ -490,10 +490,10 @@ void KviMdiChild::setClient(QWidget *w) int clientYPos=m_pCaption->heightHint()+KVI_MDICHILD_SPACING+KVI_MDICHILD_BORDER; resize(w->width()+(KVI_MDICHILD_BORDER << 1),w->height()+KVI_MDICHILD_BORDER+clientYPos); - //Reparent if needed - if(w->parent()!=this){ + //Retqparent if needed + if(TQT_BASE_OBJECT(w->tqparent())!=TQT_BASE_OBJECT(this)){ //reparent to this widget , no flags , point , show it - QPoint pnt2(KVI_MDICHILD_BORDER,clientYPos); + TQPoint pnt2(KVI_MDICHILD_BORDER,clientYPos); w->reparent(this,pnt2,true); } else w->move(KVI_MDICHILD_BORDER,clientYPos); @@ -508,10 +508,10 @@ void KviMdiChild::setClient(QWidget *w) */ //linkChildren(w); - if(m_pClient->minimumSize().width() > KVI_MDICHILD_MIN_WIDTH && - m_pClient->minimumSize().height() > KVI_MDICHILD_MIN_HEIGHT){ - setMinimumWidth(m_pClient->minimumSize().width() + (KVI_MDICHILD_BORDER << 1)); - setMinimumHeight(m_pClient->minimumSize().height()+ (KVI_MDICHILD_BORDER << 1) + + if(m_pClient->tqminimumSize().width() > KVI_MDICHILD_MIN_WIDTH && + m_pClient->tqminimumSize().height() > KVI_MDICHILD_MIN_HEIGHT){ + setMinimumWidth(m_pClient->tqminimumSize().width() + (KVI_MDICHILD_BORDER << 1)); + setMinimumHeight(m_pClient->tqminimumSize().height()+ (KVI_MDICHILD_BORDER << 1) + m_pCaption->heightHint() + KVI_MDICHILD_SPACING); } @@ -529,9 +529,9 @@ void KviMdiChild::unsetClient() //Kewl...the reparent function has a small prob now.. //the new toplelvel widgets gets not reenabled for dnd #ifndef Q_OS_MACX - m_pClient->reparent(0,m_pClient->mapToGlobal(QPoint(0,0)),true); + m_pClient->reparent(0,m_pClient->mapToGlobal(TQPoint(0,0)),true); #else - QRect r = g_pApp->desktop()->availableGeometry(m_pClient); + TQRect r = g_pApp->desktop()->availableGeometry(m_pClient); r.moveBy(0, 22); m_pClient->reparent(0,r.topLeft(),true); #endif @@ -549,28 +549,28 @@ void KviMdiChild::activate(bool bSetFocus) else if(bSetFocus)setFocus(); } -void KviMdiChild::focusInEvent(QFocusEvent *) +void KviMdiChild::focusInEvent(TQFocusEvent *) { // We gained focus by click , tab or from the caption label // Bring this child to top m_pCaption->setActive(true); m_pManager->setTopChild(this,false); //Do not focus by now... - /*The client is our focusProxy ! it should be focused by Qt !*/ + /*The client is our focusProxy ! it should be focused by TQt !*/ #ifdef _KVI_DEBUG_CLASS_NAME_ __range_valid(focusProxy() == m_pClient); #endif } -QSize KviMdiChild::sizeHint() +TQSize KviMdiChild::tqsizeHint() { if(m_pClient) { - QSize s = m_pClient->sizeHint(); - QSize ret(s.width() + (KVI_MDICHILD_BORDER << 1), + TQSize s = m_pClient->tqsizeHint(); + TQSize ret(s.width() + (KVI_MDICHILD_BORDER << 1), s.height() + (KVI_MDICHILD_BORDER << 1) + KVI_MDICHILD_SPACING + m_pCaption->heightHint()); return ret; } - return QFrame::sizeHint(); + return TQFrame::tqsizeHint(); } diff --git a/src/kvirc/ui/kvi_mdichild.h b/src/kvirc/ui/kvi_mdichild.h index 7915a3bb..feac48bb 100644 --- a/src/kvirc/ui/kvi_mdichild.h +++ b/src/kvirc/ui/kvi_mdichild.h @@ -27,24 +27,25 @@ #include "kvi_settings.h" #include "kvi_string.h" -#include -#include -#include +#include +#include +#include class KviMdiManager; class KviMdiChild; class KviMdiCaption; -class QCursor; +class TQCursor; -class KVIRC_API KviMdiChild : public QFrame +class KVIRC_API KviMdiChild : public TQFrame { friend class KviMdiManager; friend class KviMdiCaption; Q_OBJECT + TQ_OBJECT public: KviMdiChild(KviMdiManager* par,const char * name = 0); ~KviMdiChild(); @@ -57,28 +58,28 @@ private: int m_iResizeCorner; int m_iLastCursorCorner; bool m_bResizeMode; - QWidget * m_pClient; + TQWidget * m_pClient; MdiChildState m_state; - QRect m_restoredGeometry; + TQRect m_restoredGeometry; - QString m_szXmlActiveCaption; - QString m_szXmlInactiveCaption; - QString m_szPlainCaption; + TQString m_szXmlActiveCaption; + TQString m_szXmlInactiveCaption; + TQString m_szPlainCaption; public: - QRect restoredGeometry(); - void setRestoredGeometry(const QRect &r){ m_restoredGeometry = r; }; - void setClient(QWidget * w); - QWidget * client(){ return m_pClient; }; + TQRect restoredGeometry(); + void setRestoredGeometry(const TQRect &r){ m_restoredGeometry = r; }; + void setClient(TQWidget * w); + TQWidget * client(){ return m_pClient; }; void unsetClient(); KviMdiCaption * captionLabel(){ return m_pCaption; }; MdiChildState state(){ return m_state; }; - const QString & plainCaption(){ return m_szPlainCaption; }; - const QString & xmlActiveCaption(){ return m_szXmlActiveCaption; }; - const QString & xmlInactiveCaption(){ return m_szXmlInactiveCaption; }; - void setCaption(const QString & plain,const QString & xmlActive,const QString & xmlInactive); - virtual QSize sizeHint(); - void setIcon(const QPixmap &pix); - const QPixmap * icon(); + const TQString & plainCaption(){ return m_szPlainCaption; }; + const TQString & xmlActiveCaption(){ return m_szXmlActiveCaption; }; + const TQString & xmlInactiveCaption(){ return m_szXmlInactiveCaption; }; + void setCaption(const TQString & plain,const TQString & xmlActive,const TQString & xmlInactive); + virtual TQSize tqsizeHint(); + void setIcon(const TQPixmap &pix); + const TQPixmap * icon(); void enableClose(bool bEnable); bool closeEnabled(); KviMdiManager * manager(){ return m_pManager; }; @@ -91,31 +92,31 @@ public slots: void systemPopupSlot(); void closeRequest(); signals: - void systemPopupRequest(const QPoint & pnt); + void systemPopupRequest(const TQPoint & pnt); protected: #ifdef COMPILE_USE_QT4 - virtual void setBackgroundRole(QPalette::ColorRole); + virtual void setBackgroundRole(TQPalette::ColorRole); #else - virtual void setBackgroundMode(QWidget::BackgroundMode bgmd); + virtual void setBackgroundMode(TQWidget::BackgroundMode bgmd); #endif - virtual void resizeEvent(QResizeEvent *e); - virtual void mousePressEvent(QMouseEvent *e); - virtual void mouseMoveEvent(QMouseEvent *e); - virtual void mouseReleaseEvent(QMouseEvent *e); - virtual void leaveEvent(QEvent *e); - virtual void focusInEvent(QFocusEvent *); - virtual void moveEvent(QMoveEvent *e); -// bool eventFilter(QObject *o,QEvent *e); - void emitSystemPopupRequest(const QPoint & pnt){ emit systemPopupRequest(pnt); }; + virtual void resizeEvent(TQResizeEvent *e); + virtual void mousePressEvent(TQMouseEvent *e); + virtual void mouseMoveEvent(TQMouseEvent *e); + virtual void mouseReleaseEvent(TQMouseEvent *e); + virtual void leaveEvent(TQEvent *e); + virtual void focusInEvent(TQFocusEvent *); + virtual void moveEvent(TQMoveEvent *e); +// bool eventFilter(TQObject *o,TQEvent *e); + void emitSystemPopupRequest(const TQPoint & pnt){ emit systemPopupRequest(pnt); }; private: -// void linkChildren(QWidget *w); -// void unlinkChildren(QWidget *w); - QCursor getResizeCursor(int resizeCorner); +// void linkChildren(TQWidget *w); +// void unlinkChildren(TQWidget *w); + TQCursor getResizeCursor(int resizeCorner); void resizeWindowOpaque(int resizeCorner); int getResizeCorner(int ax,int ay); void calculateMinimumSize(int &minWidth,int &minHeight); void setResizeCursor(int resizeCorner); - void calculateResizeRect(int resizeCorner,QPoint mousePos,QRect &resizeRect,int minWidth,int minHeight); + void calculateResizeRect(int resizeCorner,TQPoint mousePos,TQRect &resizeRect,int minWidth,int minHeight); }; diff --git a/src/kvirc/ui/kvi_mdimanager.cpp b/src/kvirc/ui/kvi_mdimanager.cpp index feddca11..9dcafaf6 100644 --- a/src/kvirc/ui/kvi_mdimanager.cpp +++ b/src/kvirc/ui/kvi_mdimanager.cpp @@ -37,28 +37,28 @@ #include "kvi_app.h" #include "kvi_tal_popupmenu.h" -#include -#include -#include +#include +#include +#include #include -#include -#include -#include +#include +#include +#include #ifdef COMPILE_USE_QT4 #include "kvi_tal_hbox.h" #endif #ifdef COMPILE_PSEUDO_TRANSPARENCY - #include - extern QPixmap * g_pShadedParentGlobalDesktopBackground; + #include + extern TQPixmap * g_pShadedParentGlobalDesktopBackground; #endif -KviMdiManager::KviMdiManager(QWidget * parent,KviFrame * pFrm,const char * name) -: KviTalScrollView(parent) +KviMdiManager::KviMdiManager(TQWidget * tqparent,KviFrame * pFrm,const char * name) +: KviTalScrollView(tqparent) { setFrameShape(NoFrame); m_pZ = new KviPointerList; @@ -79,28 +79,28 @@ KviMdiManager::KviMdiManager(QWidget * parent,KviFrame * pFrm,const char * name) #endif m_pWindowPopup = new KviTalPopupMenu(this); - connect(m_pWindowPopup,SIGNAL(activated(int)),this,SLOT(menuActivated(int))); - connect(m_pWindowPopup,SIGNAL(aboutToShow()),this,SLOT(fillWindowPopup())); + connect(m_pWindowPopup,TQT_SIGNAL(activated(int)),this,TQT_SLOT(menuActivated(int))); + connect(m_pWindowPopup,TQT_SIGNAL(aboutToShow()),this,TQT_SLOT(fillWindowPopup())); m_pTileMethodPopup = new KviTalPopupMenu(this); - connect(m_pTileMethodPopup,SIGNAL(activated(int)),this,SLOT(tileMethodMenuActivated(int))); + connect(m_pTileMethodPopup,TQT_SIGNAL(activated(int)),this,TQT_SLOT(tileMethodMenuActivated(int))); #ifdef COMPILE_USE_QT4 viewport()->setAutoFillBackground(false); #else - viewport()->setBackgroundMode(QWidget::NoBackground); + viewport()->setBackgroundMode(TQWidget::NoBackground); #endif setStaticBackground(true); resizeContents(width(),height()); #ifdef COMPILE_USE_QT4 - setFocusPolicy(Qt::NoFocus); - viewport()->setFocusPolicy(Qt::NoFocus); + setFocusPolicy(TTQ_NoFocus); + viewport()->setFocusPolicy(TTQ_NoFocus); #else - setFocusPolicy(QWidget::NoFocus); - viewport()->setFocusPolicy(QWidget::NoFocus); + setFocusPolicy(TQ_NoFocus); + viewport()->setFocusPolicy(TQ_NoFocus); #endif - connect(g_pApp,SIGNAL(reloadImages()),this,SLOT(reloadImages())); + connect(g_pApp,TQT_SIGNAL(reloadImages()),this,TQT_SLOT(reloadImages())); } KviMdiManager::~KviMdiManager() @@ -119,20 +119,20 @@ void KviMdiManager::reloadImages() bool KviMdiManager::focusNextPrevChild(bool bNext) { //bug("FFFFFF"); - // this is a QScrollView bug... it doesn't pass this + // this is a TQScrollView bug... it doesn't pass this // event to the toplevel window return m_pFrm->focusNextPrevChild(bNext); } -void KviMdiManager::drawContents(QPainter *p,int x,int y,int w,int h) +void KviMdiManager::drawContents(TQPainter *p,int x,int y,int w,int h) { //debug("MY DRAW CONTENTS (%d,%d,%d,%d)",x,y,w,h); - QRect r(x,y,w,h); + TQRect r(x,y,w,h); #ifdef COMPILE_PSEUDO_TRANSPARENCY if(g_pShadedParentGlobalDesktopBackground) { - QPoint pnt = viewport()->mapToGlobal(contentsToViewport(r.topLeft())); + TQPoint pnt = viewport()->mapToGlobal(contentsToViewport(r.topLeft())); p->drawTiledPixmap(r,*(g_pShadedParentGlobalDesktopBackground),pnt); return; } @@ -146,7 +146,7 @@ void KviMdiManager::drawContents(QPainter *p,int x,int y,int w,int h) } } -void KviMdiManager::manageChild(KviMdiChild * lpC,bool bCascade,QRect *setGeom) +void KviMdiManager::manageChild(KviMdiChild * lpC,bool bCascade,TQRect *setGeom) { __range_valid(lpC); @@ -154,11 +154,11 @@ void KviMdiManager::manageChild(KviMdiChild * lpC,bool bCascade,QRect *setGeom) if(bCascade) { - QPoint p = getCascadePoint(m_pZ->count()-1); + TQPoint p = getCascadePoint(m_pZ->count()-1); addChild(lpC,p.x(),p.y()); } else { // FIXME: is this right ? - QPoint p = lpC->pos(); + TQPoint p = lpC->pos(); if(p.x() < 0)p.setX(0); if(p.y() < 0)p.setY(0); addChild(lpC,p.x(),p.y()); @@ -199,7 +199,7 @@ void KviMdiManager::setTopChild(KviMdiChild *lpC,bool bSetFocus) return; // no such child ? } - // disable the labels of all the other children + // disable the labels of all the other tqchildren //for(KviMdiChild *pC=m_pZ->first();pC;pC=m_pZ->next()) //{ // pC->captionLabel()->setActive(false); @@ -225,7 +225,7 @@ void KviMdiManager::setTopChild(KviMdiChild *lpC,bool bSetFocus) { lpC->setFocus(); /* - if(topLevelWidget()->isActiveWindow()) + if(tqtopLevelWidget()->isActiveWindow()) { } @@ -234,7 +234,7 @@ void KviMdiManager::setTopChild(KviMdiChild *lpC,bool bSetFocus) } } -void KviMdiManager::focusInEvent(QFocusEvent *) +void KviMdiManager::focusInEvent(TQFocusEvent *) { focusTopChild(); } @@ -278,14 +278,14 @@ KviMdiChild * KviMdiManager::highestChildExcluding(KviMdiChild * pChild) return c; } -QPoint KviMdiManager::getCascadePoint(int indexOfWindow) +TQPoint KviMdiManager::getCascadePoint(int indexOfWindow) { - QPoint pnt(0,0); + TQPoint pnt(0,0); if(indexOfWindow==0)return pnt; KviMdiChild *lpC=m_pZ->first(); int step=(lpC ? (lpC->captionLabel()->heightHint()+KVI_MDICHILD_BORDER) : 20); - int availableHeight=viewport()->height()-(lpC ? lpC->minimumSize().height() : KVI_MDICHILD_MIN_HEIGHT); - int availableWidth=viewport()->width()-(lpC ? lpC->minimumSize().width() : KVI_MDICHILD_MIN_WIDTH); + int availableHeight=viewport()->height()-(lpC ? lpC->tqminimumSize().height() : KVI_MDICHILD_MIN_HEIGHT); + int availableWidth=viewport()->width()-(lpC ? lpC->tqminimumSize().width() : KVI_MDICHILD_MIN_WIDTH); int ax=0; int ay=0; for(int i=0;ibutton() & Qt::RightButton)m_pWindowPopup->popup(mapToGlobal(e->pos())); @@ -313,8 +313,8 @@ void KviMdiManager::childMoved(KviMdiChild *) void KviMdiManager::maximizeChild(KviMdiChild * lpC) { - // the children must be moved once by the means of QScrollView::moveChild() - // so the QScrollView internal structures get updated with the negative + // the tqchildren must be moved once by the means of TQScrollView::moveChild() + // so the TQScrollView internal structures get updated with the negative // position of the widget, otherwise, when restoring with moveChild() // it will refuse to move it back to the original position resizeContents(visibleWidth(),visibleHeight()); @@ -338,14 +338,14 @@ void KviMdiManager::maximizeChild(KviMdiChild * lpC) lpC->setFocus(); } - // fixme: we could hide all the other children now! + // fixme: we could hide all the other tqchildren now! } -void KviMdiManager::resizeEvent(QResizeEvent *e) +void KviMdiManager::resizeEvent(TQResizeEvent *e) { - //If we have a maximized children at the top , adjust its size + //If we have a maximized tqchildren at the top , adjust its size KviTalScrollView::resizeEvent(e); KviMdiChild *lpC=m_pZ->last(); if(lpC) @@ -378,7 +378,7 @@ void KviMdiManager::childMaximized(KviMdiChild * lpC) void KviMdiManager::childMinimized(KviMdiChild * lpC,bool bWasMaximized) { __range_valid(lpC); - if(m_pZ->findRef(lpC) == -1)return; + if(m_pZ->tqfindRef(lpC) == -1)return; if(m_pZ->count() > 1) { m_pZ->setAutoDelete(false); @@ -431,7 +431,7 @@ void KviMdiManager::focusTopChild() if(!lpC->isVisible())return; // if(lpC->state()==KviMdiChild::Minimized)return; // debug("Focusing top child %s",lpC->name()); - //disable the labels of all the other children + //disable the labels of all the other tqchildren for(KviMdiChild *pC=m_pZ->first();pC;pC=m_pZ->next()) { if(pC != lpC) @@ -506,23 +506,23 @@ void KviMdiManager::updateSDIMode() #ifndef Q_OS_MACX KviMenuBar * b = m_pFrm->mainMenuBar(); - const QPixmap * pix = lpC ? lpC->icon() : 0; + const TQPixmap * pix = lpC ? lpC->icon() : 0; if(!pix)pix = g_pIconManager->getSmallIcon(KVI_SMALLICON_NONE); else if(pix->isNull())pix = g_pIconManager->getSmallIcon(KVI_SMALLICON_NONE); if(!m_pSdiIconButton) { m_pSdiIconButton = new KviMenuBarToolButton(b,*pix,"nonne"); - connect(m_pSdiIconButton,SIGNAL(clicked()),this,SLOT(activeChildSystemPopup())); + connect(m_pSdiIconButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(activeChildSystemPopup())); #ifdef COMPILE_USE_QT4 - // This is an obscure, undocumented and internal function in QT4 QMenuBar + // This is an obscure, undocumented and internal function in QT4 TQMenuBar // I won't be surprised if this disappears.... - b->setCornerWidget(m_pSdiIconButton,Qt::TopLeftCorner); + b->setCornerWidget(m_pSdiIconButton,TQt::TopLeftCorner); m_pSdiIconButton->show(); #else m_iSdiIconItemId = b->insertItem(m_pSdiIconButton,-1,0); #endif - connect(m_pSdiIconButton,SIGNAL(destroyed()),this,SLOT(sdiIconButtonDestroyed())); + connect(m_pSdiIconButton,TQT_SIGNAL(destroyed()),this,TQT_SLOT(sdiIconButtonDestroyed())); } else { m_pSdiIconButton->setPixmap(*pix); } @@ -533,12 +533,12 @@ void KviMdiManager::activeChildSystemPopup() { KviMdiChild * lpC = m_pZ->last(); if(!lpC)return; - QPoint pnt; + TQPoint pnt; if(m_pSdiIconButton) { - pnt = m_pSdiIconButton->mapToGlobal(QPoint(0,m_pSdiIconButton->height())); + pnt = m_pSdiIconButton->mapToGlobal(TQPoint(0,m_pSdiIconButton->height())); } else { - pnt = QCursor::pos(); + pnt = TQCursor::pos(); } lpC->emitSystemPopupRequest(pnt); } @@ -555,7 +555,7 @@ void KviMdiManager::enterSDIMode(KviMdiChild *lpC) { KviMenuBar * b = m_pFrm->mainMenuBar(); - QWidget * pButtonParent; + TQWidget * pButtonParent; #ifdef COMPILE_USE_QT4 m_pSdiControls = new KviTalHBox(b); @@ -567,31 +567,31 @@ void KviMdiManager::enterSDIMode(KviMdiChild *lpC) pButtonParent = b; #endif m_pSdiMinimizeButton = new KviMenuBarToolButton(pButtonParent,*(g_pIconManager->getSmallIcon(KVI_SMALLICON_MINIMIZE)),"btnminimize"); - connect(m_pSdiMinimizeButton,SIGNAL(clicked()),this,SLOT(minimizeActiveChild())); + connect(m_pSdiMinimizeButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(minimizeActiveChild())); #ifndef COMPILE_USE_QT4 m_iSdiMinimizeItemId = b->insertItem(m_pSdiMinimizeButton,-1,b->count()); #endif - connect(m_pSdiMinimizeButton,SIGNAL(destroyed()),this,SLOT(sdiMinimizeButtonDestroyed())); + connect(m_pSdiMinimizeButton,TQT_SIGNAL(destroyed()),this,TQT_SLOT(sdiMinimizeButtonDestroyed())); m_pSdiRestoreButton = new KviMenuBarToolButton(pButtonParent,*(g_pIconManager->getSmallIcon(KVI_SMALLICON_RESTORE)),"btnrestore"); - connect(m_pSdiRestoreButton,SIGNAL(clicked()),this,SLOT(restoreActiveChild())); + connect(m_pSdiRestoreButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(restoreActiveChild())); #ifndef COMPILE_USE_QT4 m_iSdiRestoreItemId = b->insertItem(m_pSdiRestoreButton,-1,b->count()); #endif - connect(m_pSdiRestoreButton,SIGNAL(destroyed()),this,SLOT(sdiRestoreButtonDestroyed())); + connect(m_pSdiRestoreButton,TQT_SIGNAL(destroyed()),this,TQT_SLOT(sdiRestoreButtonDestroyed())); m_pSdiCloseButton = new KviMenuBarToolButton(pButtonParent,*(g_pIconManager->getSmallIcon(KVI_SMALLICON_CLOSE)),"btnclose"); - connect(m_pSdiCloseButton,SIGNAL(clicked()),this,SLOT(closeActiveChild())); + connect(m_pSdiCloseButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(closeActiveChild())); #ifndef COMPILE_USE_QT4 m_iSdiCloseItemId = b->insertItem(m_pSdiCloseButton,-1,b->count()); #endif - connect(m_pSdiCloseButton,SIGNAL(destroyed()),this,SLOT(sdiCloseButtonDestroyed())); + connect(m_pSdiCloseButton,TQT_SIGNAL(destroyed()),this,TQT_SLOT(sdiCloseButtonDestroyed())); #ifdef COMPILE_USE_QT4 - // This is an obscure, undocumented and internal function in QT4 QMenuBar + // This is an obscure, undocumented and internal function in QT4 TQMenuBar // I won't be surprised if this disappears.... - b->setCornerWidget(m_pSdiControls,Qt::TopRightCorner); - // The show below SHOULD force a re-layout of the menubar.. + b->setCornerWidget(m_pSdiControls,TQt::TopRightCorner); + // The show below SHOULD force a re-tqlayout of the menubar.. // but it doesn't work when the KviFrame is still hidden (at startup) // We handle this BUG in showEvent() m_pSdiControls->show(); @@ -608,15 +608,15 @@ void KviMdiManager::enterSDIMode(KviMdiChild *lpC) updateSDIMode(); } -void KviMdiManager::relayoutMenuButtons() +void KviMdiManager::retqlayoutMenuButtons() { #ifdef COMPILE_USE_QT4 - // force a re-layout of the menubar in Qt4 (see the note in enterSDIMode()) + // force a re-tqlayout of the menubar in TQt4 (see the note in enterSDIMode()) // by resetting the corner widget if(m_pSdiControls) { - m_pFrm->mainMenuBar()->setCornerWidget(0,Qt::TopRightCorner); - m_pFrm->mainMenuBar()->setCornerWidget(m_pSdiControls,Qt::TopRightCorner); + m_pFrm->mainMenuBar()->setCornerWidget(0,TQt::TopRightCorner); + m_pFrm->mainMenuBar()->setCornerWidget(m_pSdiControls,TQt::TopRightCorner); } // also force an activation of the top MdiChild since it probably didn't get it yet KviMdiChild * c = topChild(); @@ -662,7 +662,7 @@ void KviMdiManager::leaveSDIMode() } if(m_pSdiIconButton) { - m_pSdiIconButton->hide(); // this will force a QMenuBar relayout + m_pSdiIconButton->hide(); // this will force a TQMenuBar retqlayout delete m_pSdiIconButton; m_pSdiIconButton = 0; } @@ -693,31 +693,31 @@ void KviMdiManager::fillWindowPopup() { m_pWindowPopup->clear(); - m_pWindowPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_CASCADEWINDOWS)),(__tr2qs("&Cascade Windows")),this,SLOT(cascadeWindows())); - m_pWindowPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_CASCADEWINDOWS)),(__tr2qs("Cascade &Maximized")),this,SLOT(cascadeMaximized())); + m_pWindowPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_CASCADEWINDOWS)),(__tr2qs("&Cascade Windows")),this,TQT_SLOT(cascadeWindows())); + m_pWindowPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_CASCADEWINDOWS)),(__tr2qs("Cascade &Maximized")),this,TQT_SLOT(cascadeMaximized())); m_pWindowPopup->insertSeparator(); - m_pWindowPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_TILEWINDOWS)),(__tr2qs("&Tile Windows")),this,SLOT(tile())); + m_pWindowPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_TILEWINDOWS)),(__tr2qs("&Tile Windows")),this,TQT_SLOT(tile())); m_pTileMethodPopup->clear(); - int id = m_pTileMethodPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_AUTOTILEWINDOWS)),(__tr2qs("&Auto Tile")),this,SLOT(toggleAutoTile())); + int id = m_pTileMethodPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_AUTOTILEWINDOWS)),(__tr2qs("&Auto Tile")),this,TQT_SLOT(toggleAutoTile())); m_pTileMethodPopup->setItemChecked(id,KVI_OPTION_BOOL(KviOption_boolAutoTileWindows)); m_pTileMethodPopup->setItemParameter(id,-1); m_pTileMethodPopup->insertSeparator(); int ids[KVI_NUM_TILE_METHODS]; ids[KVI_TILE_METHOD_ANODINE] = m_pTileMethodPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_TILEWINDOWS)),(__tr2qs("Anodine's Full Grid"))); m_pTileMethodPopup->setItemParameter(ids[KVI_TILE_METHOD_ANODINE],KVI_TILE_METHOD_ANODINE); - ids[KVI_TILE_METHOD_PRAGMA4HOR] = m_pTileMethodPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_TILEWINDOWS)),(__tr2qs("Pragma's Horizontal 4-Grid"))); + ids[KVI_TILE_METHOD_PRAGMA4HOR] = m_pTileMethodPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_TILEWINDOWS)),(__tr2qs("Pragma'sQt::Horizontal 4-Grid"))); m_pTileMethodPopup->setItemParameter(ids[KVI_TILE_METHOD_PRAGMA4HOR],KVI_TILE_METHOD_PRAGMA4HOR); - ids[KVI_TILE_METHOD_PRAGMA4VER] = m_pTileMethodPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_TILEWINDOWS)),(__tr2qs("Pragma's Vertical 4-Grid"))); + ids[KVI_TILE_METHOD_PRAGMA4VER] = m_pTileMethodPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_TILEWINDOWS)),(__tr2qs("Pragma'sQt::Vertical 4-Grid"))); m_pTileMethodPopup->setItemParameter(ids[KVI_TILE_METHOD_PRAGMA4VER],KVI_TILE_METHOD_PRAGMA4VER); - ids[KVI_TILE_METHOD_PRAGMA6HOR] = m_pTileMethodPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_TILEWINDOWS)),(__tr2qs("Pragma's Horizontal 6-Grid"))); + ids[KVI_TILE_METHOD_PRAGMA6HOR] = m_pTileMethodPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_TILEWINDOWS)),(__tr2qs("Pragma'sQt::Horizontal 6-Grid"))); m_pTileMethodPopup->setItemParameter(ids[KVI_TILE_METHOD_PRAGMA6HOR],KVI_TILE_METHOD_PRAGMA6HOR); - ids[KVI_TILE_METHOD_PRAGMA6VER] = m_pTileMethodPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_TILEWINDOWS)),(__tr2qs("Pragma's Vertical 6-Grid"))); + ids[KVI_TILE_METHOD_PRAGMA6VER] = m_pTileMethodPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_TILEWINDOWS)),(__tr2qs("Pragma'sQt::Vertical 6-Grid"))); m_pTileMethodPopup->setItemParameter(ids[KVI_TILE_METHOD_PRAGMA6VER],KVI_TILE_METHOD_PRAGMA6VER); - ids[KVI_TILE_METHOD_PRAGMA9HOR] = m_pTileMethodPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_TILEWINDOWS)),(__tr2qs("Pragma's Horizontal 9-Grid"))); + ids[KVI_TILE_METHOD_PRAGMA9HOR] = m_pTileMethodPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_TILEWINDOWS)),(__tr2qs("Pragma'sQt::Horizontal 9-Grid"))); m_pTileMethodPopup->setItemParameter(ids[KVI_TILE_METHOD_PRAGMA9HOR],KVI_TILE_METHOD_PRAGMA9HOR); - ids[KVI_TILE_METHOD_PRAGMA9VER] = m_pTileMethodPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_TILEWINDOWS)),(__tr2qs("Pragma's Vertical 9-Grid"))); + ids[KVI_TILE_METHOD_PRAGMA9VER] = m_pTileMethodPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_TILEWINDOWS)),(__tr2qs("Pragma'sQt::Vertical 9-Grid"))); m_pTileMethodPopup->setItemParameter(ids[KVI_TILE_METHOD_PRAGMA9VER],KVI_TILE_METHOD_PRAGMA9VER); if(KVI_OPTION_UINT(KviOption_uintTileMethod) >= KVI_NUM_TILE_METHODS)KVI_OPTION_UINT(KviOption_uintTileMethod) = KVI_TILE_METHOD_PRAGMA9HOR; @@ -726,17 +726,17 @@ void KviMdiManager::fillWindowPopup() m_pWindowPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_TILEWINDOWS)),(__tr2qs("Tile Met&hod")),m_pTileMethodPopup); m_pWindowPopup->insertSeparator(); - m_pWindowPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_MAXVERTICAL)),(__tr2qs("Expand &Vertically")),this,SLOT(expandVertical())); - m_pWindowPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_MAXHORIZONTAL)),(__tr2qs("Expand &Horizontally")),this,SLOT(expandHorizontal())); + m_pWindowPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_MAXVERTICAL)),(__tr2qs("Expand &Vertically")),this,TQT_SLOT(expandVertical())); + m_pWindowPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_MAXHORIZONTAL)),(__tr2qs("Expand &Horizontally")),this,TQT_SLOT(expandHorizontal())); m_pWindowPopup->insertSeparator(); - m_pWindowPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_MINIMIZE)),(__tr2qs("Mi&nimize All")),this,SLOT(minimizeAll())); -// m_pWindowPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_RESTORE)),(__tr2qs("&Restore all")),this,SLOT(restoreAll())); + m_pWindowPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_MINIMIZE)),(__tr2qs("Mi&nimize All")),this,TQT_SLOT(minimizeAll())); +// m_pWindowPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_RESTORE)),(__tr2qs("&Restore all")),this,TQT_SLOT(restoreAll())); // m_pWindowPopup->insertSeparator(); int i=100; - QString szItem; - QString szCaption; + TQString szItem; + TQString szCaption; for(KviMdiChild *lpC=m_pZ->first();lpC;lpC=m_pZ->next()) { szItem.setNum(((uint)i)-99); @@ -745,7 +745,7 @@ void KviMdiManager::fillWindowPopup() szCaption = lpC->plainCaption(); if(szCaption.length() > 30) { - QString trail = szCaption.right(12); + TQString trail = szCaption.right(12); szCaption.truncate(12); szCaption+="..."; szCaption+=trail; @@ -757,7 +757,7 @@ void KviMdiManager::fillWindowPopup() szItem+=szCaption; szItem+=")"; } else szItem+=szCaption; - const QPixmap * pix = lpC->icon(); + const TQPixmap * pix = lpC->icon(); if(pix && !(pix->isNull()))m_pWindowPopup->insertItem(*pix,szItem,i); else m_pWindowPopup->insertItem(szItem,i); m_pWindowPopup->setItemChecked(i,((uint)i)==(m_pZ->count()+99)); @@ -812,9 +812,9 @@ void KviMdiManager::cascadeWindows() KviMdiChild *lpC=list.first(); if(lpC->state() != KviMdiChild::Minimized) { - QPoint p = getCascadePoint(idx); + TQPoint p = getCascadePoint(idx); moveChild(lpC,p.x(),p.y()); - lpC->resize(lpC->sizeHint()); + lpC->resize(lpC->tqsizeHint()); idx++; } list.removeFirst(); @@ -841,11 +841,11 @@ void KviMdiManager::cascadeMaximized() KviMdiChild *lpC=list.first(); if(lpC->state() != KviMdiChild::Minimized) { - QPoint pnt(getCascadePoint(idx)); + TQPoint pnt(getCascadePoint(idx)); moveChild(lpC,pnt.x(),pnt.y()); - QSize curSize(viewport()->width() - pnt.x(),viewport()->height() - pnt.y()); - if((lpC->minimumSize().width() > curSize.width()) || - (lpC->minimumSize().height() > curSize.height()))lpC->resize(lpC->minimumSize()); + TQSize curSize(viewport()->width() - pnt.x(),viewport()->height() - pnt.y()); + if((lpC->tqminimumSize().width() > curSize.width()) || + (lpC->tqminimumSize().height() > curSize.height()))lpC->resize(lpC->tqminimumSize()); else lpC->resize(curSize); idx++; } @@ -930,7 +930,7 @@ void KviMdiManager::restoreAll() while(!list.isEmpty()) { KviMdiChild *lpC=list.first(); - if(lpC->state() != KviMdiChild::Normal && (!(lpC->plainCaption()).contains("CONSOLE") )) + if(lpC->state() != KviMdiChild::Normal && (!(lpC->plainCaption()).tqcontains("CONSOLE") )) lpC->restore(); list.removeFirst(); } @@ -1007,13 +1007,13 @@ void KviMdiManager::tileAllInternal(int maxWnds,bool bHorizontal) int numToHandle=((numVisible > maxWnds) ? maxWnds : numVisible); int xQuantum=viewport()->width()/pColstable[numToHandle-1]; - if(xQuantum < ((lpTop->minimumSize().width() > KVI_MDICHILD_MIN_WIDTH) ? lpTop->minimumSize().width() : KVI_MDICHILD_MIN_WIDTH)){ + if(xQuantum < ((lpTop->tqminimumSize().width() > KVI_MDICHILD_MIN_WIDTH) ? lpTop->tqminimumSize().width() : KVI_MDICHILD_MIN_WIDTH)){ if(pColrecall[numToHandle-1]==0)debug("Tile : Not enouh space"); else tileAllInternal(pColrecall[numToHandle-1],bHorizontal); return; } int yQuantum=viewport()->height()/pRowstable[numToHandle-1]; - if(yQuantum < ((lpTop->minimumSize().height() > KVI_MDICHILD_MIN_HEIGHT) ? lpTop->minimumSize().height() : KVI_MDICHILD_MIN_HEIGHT)){ + if(yQuantum < ((lpTop->tqminimumSize().height() > KVI_MDICHILD_MIN_HEIGHT) ? lpTop->tqminimumSize().height() : KVI_MDICHILD_MIN_HEIGHT)){ if(pRowrecall[numToHandle-1]==0)debug("Tile : Not enough space"); else tileAllInternal(pRowrecall[numToHandle-1],bHorizontal); return; @@ -1073,7 +1073,7 @@ void KviMdiManager::tileAnodine() int numVisible=getVisibleChildCount(); // count visible windows if(numVisible<1)return; int numCols=int(sqrt((double)numVisible)); // set columns to square root of visible count - // create an array to form grid layout + // create an array to form grid tqlayout int *numRows=new int[numCols]; int numCurCol=0; while(numCurCol -#include -#include -#include +#include +#include +#include +#include #include "kvi_tal_scrollview.h" @@ -59,13 +59,14 @@ class KVIRC_API KviMdiManager : public KviTalScrollView friend class KviMdiChild; friend class KviMdiCaption; Q_OBJECT + TQ_OBJECT public: - KviMdiManager(QWidget * parent,KviFrame * pFrm,const char * name); + KviMdiManager(TQWidget * tqparent,KviFrame * pFrm,const char * name); ~KviMdiManager(); public: KviMdiChild * topChild(){ return m_pZ->last(); }; KviMdiChild * highestChildExcluding(KviMdiChild * pChild); - void manageChild(KviMdiChild * lpC,bool bCascade = true,QRect * setGeom = 0); + void manageChild(KviMdiChild * lpC,bool bCascade = true,TQRect * setGeom = 0); void setTopChild(KviMdiChild *lpC,bool bSetFocus); void showAndActivate(KviMdiChild * lpC); KviTalPopupMenu * windowPopup(){ return m_pWindowPopup; }; @@ -99,13 +100,13 @@ protected: void childRestored(KviMdiChild *lpC,bool bWasMaximized); void childMoved(KviMdiChild * lpC); void maximizeChild(KviMdiChild * lpC); - virtual void focusInEvent(QFocusEvent *e); - virtual void mousePressEvent(QMouseEvent *e); - virtual void resizeEvent(QResizeEvent *e); - virtual void drawContents(QPainter * p,int x,int y,int w,int h); + virtual void focusInEvent(TQFocusEvent *e); + virtual void mousePressEvent(TQMouseEvent *e); + virtual void resizeEvent(TQResizeEvent *e); + virtual void drawContents(TQPainter * p,int x,int y,int w,int h); virtual bool focusNextPrevChild(bool pNext); public slots: - void relayoutMenuButtons(); + void retqlayoutMenuButtons(); void cascadeWindows(); void cascadeMaximized(); void expandVertical(); @@ -132,7 +133,7 @@ protected slots: private: void ensureNoMaximized(); void tileAllInternal(int maxWnds,bool bHorizontal); - QPoint getCascadePoint(int indexOfWindow); + TQPoint getCascadePoint(int indexOfWindow); void enterSDIMode(KviMdiChild *lpC); void leaveSDIMode(); void updateSDIMode(); diff --git a/src/kvirc/ui/kvi_menubar.cpp b/src/kvirc/ui/kvi_menubar.cpp index a382f738..6401ed85 100644 --- a/src/kvirc/ui/kvi_menubar.cpp +++ b/src/kvirc/ui/kvi_menubar.cpp @@ -51,39 +51,39 @@ KviMenuBar::KviMenuBar(KviFrame * par,const char * name) m_pDefaultItemId = 0; KviTalPopupMenu * pop = new KviTalPopupMenu(this,"KVIrc"); - connect(pop,SIGNAL(aboutToShow()),this,SLOT(setupMainPopup())); + connect(pop,TQT_SIGNAL(aboutToShow()),this,TQT_SLOT(setupMainPopup())); #ifndef Q_OS_MACX addDefaultItem("&KVIrc",pop); #else - // Qt/Mac creates already a "KVirc" menu item on its own, and we don't like double entries ;-) + // TQt/Mac creates already a "KVirc" menu item on its own, and we don't like double entries ;-) addDefaultItem("&IRC",pop); #endif //Q_OS_MACX m_pRecentServersPopup = new KviTalPopupMenu(this,"recentservers"); - connect(m_pRecentServersPopup,SIGNAL(aboutToShow()),this,SLOT(setupRecentServersPopup())); - connect(m_pRecentServersPopup,SIGNAL(activated(int)),this,SLOT(newConnectionToServer(int))); + connect(m_pRecentServersPopup,TQT_SIGNAL(aboutToShow()),this,TQT_SLOT(setupRecentServersPopup())); + connect(m_pRecentServersPopup,TQT_SIGNAL(activated(int)),this,TQT_SLOT(newConnectionToServer(int))); m_pScriptItemList = 0; pop = new KviTalPopupMenu(this,"scripting"); - connect(pop,SIGNAL(aboutToShow()),this,SLOT(setupScriptingPopup())); + connect(pop,TQT_SIGNAL(aboutToShow()),this,TQT_SLOT(setupScriptingPopup())); addDefaultItem(__tr2qs("Scri&pting"),pop); pop = new KviTalPopupMenu(this,"tools"); - connect(pop,SIGNAL(aboutToShow()),this,SLOT(setupToolsPopup())); - connect(pop,SIGNAL(activated(int)),this,SLOT(toolsPopupSelected(int))); + connect(pop,TQT_SIGNAL(aboutToShow()),this,TQT_SLOT(setupToolsPopup())); + connect(pop,TQT_SIGNAL(activated(int)),this,TQT_SLOT(toolsPopupSelected(int))); addDefaultItem(__tr2qs("&Tools"),pop); m_pToolbarsPopup = new KviTalPopupMenu(this,"toolbars"); - connect(m_pToolbarsPopup,SIGNAL(aboutToShow()),this,SLOT(setupToolbarsPopup())); + connect(m_pToolbarsPopup,TQT_SIGNAL(aboutToShow()),this,TQT_SLOT(setupToolbarsPopup())); pop = new KviTalPopupMenu(this,"settings"); - connect(pop,SIGNAL(aboutToShow()),this,SLOT(setupSettingsPopup())); + connect(pop,TQT_SIGNAL(aboutToShow()),this,TQT_SLOT(setupSettingsPopup())); addDefaultItem(__tr2qs("&Settings"),pop); addDefaultItem(__tr2qs("&Window"),par->mdiManager()->windowPopup()); pop = new KviTalPopupMenu(this,"help"); - connect(pop,SIGNAL(aboutToShow()),this,SLOT(setupHelpPopup())); + connect(pop,TQT_SIGNAL(aboutToShow()),this,TQT_SLOT(setupHelpPopup())); addDefaultItem(__tr2qs("&Help"),pop); } @@ -93,17 +93,17 @@ KviMenuBar::~KviMenuBar() if(m_pDefaultItemId)kvi_free(m_pDefaultItemId); } -void KviMenuBar::showEvent(QShowEvent *e) +void KviMenuBar::showEvent(TQShowEvent *e) { #ifdef COMPILE_USE_QT4 debug("menubar show"); - // force a re-layout of the menubar in Qt4 (see the note in enterSDIMode()) + // force a re-tqlayout of the menubar in TQt4 (see the note in enterSDIMode()) // by resetting the corner widget - m_pFrm->mdiManager()->relayoutMenuButtons(); + m_pFrm->mdiManager()->retqlayoutMenuButtons(); #endif } -void KviMenuBar::addDefaultItem(const QString &text,KviTalPopupMenu * pop) +void KviMenuBar::addDefaultItem(const TQString &text,KviTalPopupMenu * pop) { m_iNumDefaultItems++; m_pDefaultItemId = (int *)kvi_realloc((void *)m_pDefaultItemId,sizeof(int) * m_iNumDefaultItems); @@ -116,52 +116,52 @@ void KviMenuBar::setupHelpPopup() help->clear(); // FIXME: Convert these to actions! - int id = help->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_HELP)),__tr2qs("&Help Browser (Panel)"),m_pFrm,SLOT(executeInternalCommand(int))); + int id = help->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_HELP)),__tr2qs("&Help Browser (Panel)"),m_pFrm,TQT_SLOT(executeInternalCommand(int))); help->setItemParameter(id,KVI_INTERNALCOMMAND_HELP_NEWSTATICWINDOW); - id = help->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_MDIHELP)),__tr2qs("Help Browser (&Window)"),m_pFrm,SLOT(executeInternalCommand(int))); + id = help->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_MDIHELP)),__tr2qs("Help Browser (&Window)"),m_pFrm,TQT_SLOT(executeInternalCommand(int))); help->setItemParameter(id,KVI_INTERNALCOMMAND_HELP_NEWMDIWINDOW); help->insertSeparator(); - id = help->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_IDEA)),__tr2qs("&Tip of the Day"),m_pFrm,SLOT(executeInternalCommand(int))); + id = help->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_IDEA)),__tr2qs("&Tip of the Day"),m_pFrm,TQT_SLOT(executeInternalCommand(int))); help->setItemParameter(id,KVI_INTERNALCOMMAND_TIP_OPEN); help->insertSeparator(); - id = help->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_KVIRC)),__tr2qs("About &KVIrc"),m_pFrm,SLOT(executeInternalCommand(int))); + id = help->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_KVIRC)),__tr2qs("About &KVIrc"),m_pFrm,TQT_SLOT(executeInternalCommand(int))); help->setItemParameter(id,KVI_INTERNALCOMMAND_ABOUT_ABOUTKVIRC); help->insertSeparator(); - id = help->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_HOMEPAGE)),__tr2qs("KVIrc Home&page"),m_pFrm,SLOT(executeInternalCommand(int))); + id = help->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_HOMEPAGE)),__tr2qs("KVIrc Home&page"),m_pFrm,TQT_SLOT(executeInternalCommand(int))); help->setItemParameter(id,KVI_INTERNALCOMMAND_KVIRC_HOMEPAGE); if(kvi_strEqualCIN(KviLocale::localeName(),"ru",2)) { - id = help->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_HOMEPAGE)),__tr2qs("KVIrc Russian Home&page"),m_pFrm,SLOT(executeInternalCommand(int))); + id = help->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_HOMEPAGE)),__tr2qs("KVIrc Russian Home&page"),m_pFrm,TQT_SLOT(executeInternalCommand(int))); help->setItemParameter(id,KVI_INTERNALCOMMAND_KVIRC_HOMEPAGE_RU); } if(kvi_strEqualCIN(KviLocale::localeName(),"fr",2)) { - id = help->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_HOMEPAGE)),__tr2qs("KVIrc French Home&page"),m_pFrm,SLOT(executeInternalCommand(int))); + id = help->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_HOMEPAGE)),__tr2qs("KVIrc French Home&page"),m_pFrm,TQT_SLOT(executeInternalCommand(int))); help->setItemParameter(id,KVI_INTERNALCOMMAND_KVIRC_HOMEPAGE_FR); } help->insertSeparator(); - id = help->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_MESSAGE)),__tr2qs("Subscribe to the Mailing List"),m_pFrm,SLOT(executeInternalCommand(int))); + id = help->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_MESSAGE)),__tr2qs("Subscribe to the Mailing List"),m_pFrm,TQT_SLOT(executeInternalCommand(int))); help->setItemParameter(id,KVI_INTERNALCOMMAND_OPENURL_KVIRC_MAILINGLIST); - id = help->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_BOMB)),__tr2qs("Report a Bug / Propose Improvements"),m_pFrm,SLOT(executeInternalCommand(int))); + id = help->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_BOMB)),__tr2qs("Report a Bug / Propose Improvements"),m_pFrm,TQT_SLOT(executeInternalCommand(int))); help->setItemParameter(id,KVI_INTERNALCOMMAND_OPENURL_KVIRC_BUGTRACK); help->insertSeparator(); - id = help->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_CHANNEL)),__tr2qs("Join KVIrc International Channel on Freenode"),m_pFrm,SLOT(executeInternalCommand(int))); + id = help->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_CHANNEL)),__tr2qs("Join KVIrc International Channel on Freenode"),m_pFrm,TQT_SLOT(executeInternalCommand(int))); help->setItemParameter(id,KVI_INTERNALCOMMAND_OPENURL_KVIRC_ON_FREENODE); - id = help->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_CHANNEL)),__tr2qs("Join KVIrc International Channel on IRCNet"),m_pFrm,SLOT(executeInternalCommand(int))); + id = help->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_CHANNEL)),__tr2qs("Join KVIrc International Channel on IRCNet"),m_pFrm,TQT_SLOT(executeInternalCommand(int))); help->setItemParameter(id,KVI_INTERNALCOMMAND_OPENURL_KVIRC_ON_IRCNET); if(kvi_strEqualCIN(KviLocale::localeName(),"it",2)) { // join #kvirc.net on azzurra - id = help->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_CHANNEL)),__tr2qs("Join KVIrc Italian Channel on AzzurraNet"),m_pFrm,SLOT(executeInternalCommand(int))); + id = help->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_CHANNEL)),__tr2qs("Join KVIrc Italian Channel on AzzurraNet"),m_pFrm,TQT_SLOT(executeInternalCommand(int))); help->setItemParameter(id,KVI_INTERNALCOMMAND_OPENURL_KVIRC_IT_ON_AZZURRA); } if(kvi_strEqualCIN(KviLocale::localeName(),"fr",2)) { // join #kvirc-fr on freenode - id = help->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_CHANNEL)),__tr2qs("Join KVIrc French Channel on Freenode"),m_pFrm,SLOT(executeInternalCommand(int))); + id = help->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_CHANNEL)),__tr2qs("Join KVIrc French Channel on Freenode"),m_pFrm,TQT_SLOT(executeInternalCommand(int))); help->setItemParameter(id,KVI_INTERNALCOMMAND_OPENURL_KVIRC_FR_ON_FREENODE); // join #kvirc on europnet - id = help->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_CHANNEL)),__tr2qs("Join KVIrc French Channel on EuropNet"),m_pFrm,SLOT(executeInternalCommand(int))); + id = help->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_CHANNEL)),__tr2qs("Join KVIrc French Channel on EuropNet"),m_pFrm,TQT_SLOT(executeInternalCommand(int))); help->setItemParameter(id,KVI_INTERNALCOMMAND_OPENURL_KVIRC_FR_ON_EUROPNET); } // add your localized #kvirc channels here... @@ -176,7 +176,7 @@ void KviMenuBar::setupSettingsPopup() opt->insertItem(__tr2qs("Toolbars"),m_pToolbarsPopup); - int id = opt->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_STATUSBAR)),__tr2qs("Show StatusBar"),m_pFrm,SLOT(toggleStatusBar())); + int id = opt->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_STATUSBAR)),__tr2qs("Show StatusBar"),m_pFrm,TQT_SLOT(toggleStatusBar())); opt->setItemChecked(id,m_pFrm->mainStatusBar()); @@ -191,7 +191,7 @@ void KviMenuBar::setupSettingsPopup() ACTION_POPUP_ITEM(KVI_COREACTION_EDITREGUSERS,opt) opt->insertSeparator(); - opt->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_FLOPPY)),__tr2qs("&Save Configuration"),g_pApp,SLOT(saveConfiguration())); + opt->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_FLOPPY)),__tr2qs("&Save Configuration"),g_pApp,TQT_SLOT(saveConfiguration())); } void KviMenuBar::setupScriptingPopup() @@ -210,7 +210,7 @@ void KviMenuBar::setupScriptingPopup() ACTION_POPUP_ITEM(KVI_COREACTION_EXECUTEKVS,script) script->insertSeparator(); - script->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_TEXTEXCLAMATIVE)),__tr2qs("Restore &Default Script"),g_pApp,SLOT(restoreDefaultScript())); + script->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_TEXTEXCLAMATIVE)),__tr2qs("Restore &Default Script"),g_pApp,TQT_SLOT(restoreDefaultScript())); } void KviMenuBar::setupMainPopup() @@ -222,8 +222,8 @@ void KviMenuBar::setupMainPopup() if(m_pFrm->activeContext()) if(m_pFrm->activeContext()->state()==KviIrcContext::Connected) { - int id = main->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_QUIT)),__tr2qs("Disconnect"),m_pFrm,SLOT(executeInternalCommand(int))); - main->setItemParameter(id,KVI_INTERNALCOMMAND_QUIT); + int id = main->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_TQUIT)),__tr2qs("Disconnect"),m_pFrm,TQT_SLOT(executeInternalCommand(int))); + main->setItemParameter(id,KVI_INTERNALCOMMAND_TQUIT); } main->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_WORLD)),__tr2qs("New &Connection To"),m_pRecentServersPopup); @@ -231,18 +231,18 @@ void KviMenuBar::setupMainPopup() if(m_pFrm->dockExtension()) { - int id = main->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_DOCKWIDGET)),__tr2qs("Hide &Dock Icon"),m_pFrm,SLOT(executeInternalCommand(int))); + int id = main->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_DOCKWIDGET)),__tr2qs("Hide &Dock Icon"),m_pFrm,TQT_SLOT(executeInternalCommand(int))); main->setItemParameter(id,KVI_INTERNALCOMMAND_DOCKWIDGET_HIDE); } else { - int id = main->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_DOCKWIDGET)),__tr2qs("Show &Dock Icon"),m_pFrm,SLOT(executeInternalCommand(int))); + int id = main->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_DOCKWIDGET)),__tr2qs("Show &Dock Icon"),m_pFrm,TQT_SLOT(executeInternalCommand(int))); main->setItemParameter(id,KVI_INTERNALCOMMAND_DOCKWIDGET_SHOW); } -// Qt/Mac creates a Quit item on its own +// TQt/Mac creates a Quit item on its own #ifndef Q_OS_MACX main->insertSeparator(); - main->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_QUITAPP)),__tr2qs("&Quit"),g_pApp,SLOT(quit())); + main->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_TQUITAPP)),__tr2qs("&Quit"),g_pApp,TQT_SLOT(quit())); #endif //Q_OS_MACX } @@ -257,7 +257,7 @@ void KviMenuBar::setupRecentServersPopup() void KviMenuBar::newConnectionToServer(int id) { - QString text = m_pRecentServersPopup->text(id); + TQString text = m_pRecentServersPopup->text(id); if(!text.isEmpty()) { // the gentoo qt 3.3.4-r2 is broken @@ -266,7 +266,7 @@ void KviMenuBar::newConnectionToServer(int id) { KviKvsScript::run("options.edit KviServerOptionsWidget",m_pFrm->firstConsole()); } else { - text.replace(QString("&"),QString("")); + text.tqreplace(TQString("&"),TQString("")); KviStr szCommand; if(KviIrcUrl::parse(text.utf8().data(),szCommand,KVI_IRCURL_CONTEXT_NEW)) KviKvsScript::run(szCommand.ptr(),m_pFrm->firstConsole()); @@ -302,10 +302,10 @@ void KviMenuBar::setupToolsPopup() ACTION_POPUP_ITEM(KVI_COREACTION_SCREENSHOT,m) // moved the old tools here - m->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_ICONMANAGER)),__tr2qs("Show &Icon Table"),g_pIconManager,SLOT(showIconWidget())); + m->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_ICONMANAGER)),__tr2qs("Show &Icon Table"),g_pIconManager,TQT_SLOT(showIconWidget())); #ifdef COMPILE_KDE_SUPPORT int id; - id = m->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_TERMINAL)),__tr2qs("Open &Terminal"),m_pFrm,SLOT(executeInternalCommand(int))); + id = m->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_TERMINAL)),__tr2qs("Open &Terminal"),m_pFrm,TQT_SLOT(executeInternalCommand(int))); m->setItemParameter(id,KVI_INTERNALCOMMAND_TERM_OPEN); #endif @@ -351,12 +351,12 @@ int KviMenuBar::getDefaultItemRealIndex(int iDefaultIndex) return indexOf(m_pDefaultItemId[iDefaultIndex]); } -KviScriptMenuBarItem * KviMenuBar::findMenu(const QString &text) +KviScriptMenuBarItem * KviMenuBar::findMenu(const TQString &text) { if(!m_pScriptItemList)return 0; for(KviScriptMenuBarItem * i = m_pScriptItemList->first();i;i = m_pScriptItemList->next()) { - if(KviQString::equalCI(i->szText,text))return i; + if(KviTQString::equalCI(i->szText,text))return i; } return 0; } @@ -371,12 +371,12 @@ KviScriptMenuBarItem * KviMenuBar::findMenu(KviKvsPopupMenu * p) return 0; } -bool KviMenuBar::removeMenu(const QString &text) +bool KviMenuBar::removeMenu(const TQString &text) { KviScriptMenuBarItem * i = findMenu(text); if(i) { - disconnect(i->pPopup,SIGNAL(destroyed()),this,SLOT(menuDestroyed())); + disconnect(i->pPopup,TQT_SIGNAL(destroyed()),this,TQT_SLOT(menuDestroyed())); removeItem(i->id); m_pScriptItemList->removeRef(i); return true; @@ -394,7 +394,7 @@ void KviMenuBar::menuDestroyed() } } -void KviMenuBar::addMenu(const QString &text,KviKvsPopupMenu * p,int index) +void KviMenuBar::addMenu(const TQString &text,KviKvsPopupMenu * p,int index) { if(!m_pScriptItemList) { @@ -408,7 +408,7 @@ void KviMenuBar::addMenu(const QString &text,KviKvsPopupMenu * p,int index) it->szPopupName = p->name(); it->pPopup = p; it->id = insertItem(text,p,-1,index); - connect(p,SIGNAL(destroyed()),this,SLOT(menuDestroyed())); + connect(p,TQT_SIGNAL(destroyed()),this,TQT_SLOT(menuDestroyed())); m_pScriptItemList->append(it); } diff --git a/src/kvirc/ui/kvi_menubar.h b/src/kvirc/ui/kvi_menubar.h index 3095913b..ba723ea1 100644 --- a/src/kvirc/ui/kvi_menubar.h +++ b/src/kvirc/ui/kvi_menubar.h @@ -48,6 +48,7 @@ typedef struct _KviScriptMenuBarItem class KVIRC_API KviMenuBar : public KviTalMenuBar { Q_OBJECT + TQ_OBJECT public: KviMenuBar(KviFrame * par,const char * name); ~KviMenuBar(); @@ -59,14 +60,14 @@ protected: int m_iNumDefaultItems; int * m_pDefaultItemId; protected: - KviScriptMenuBarItem * findMenu(const QString &text); + KviScriptMenuBarItem * findMenu(const TQString &text); KviScriptMenuBarItem * findMenu(KviKvsPopupMenu * p); - void addDefaultItem(const QString &text,KviTalPopupMenu * pop); - virtual void showEvent(QShowEvent *e); + void addDefaultItem(const TQString &text,KviTalPopupMenu * pop); + virtual void showEvent(TQShowEvent *e); public: int getDefaultItemRealIndex(int iDefaultIndex); - void addMenu(const QString &text,KviKvsPopupMenu * p,int index); - bool removeMenu(const QString &text); + void addMenu(const TQString &text,KviKvsPopupMenu * p,int index); + bool removeMenu(const TQString &text); protected slots: void menuDestroyed(); void setupMainPopup(); diff --git a/src/kvirc/ui/kvi_modeeditor.cpp b/src/kvirc/ui/kvi_modeeditor.cpp index f72d0a22..11f781b4 100644 --- a/src/kvirc/ui/kvi_modeeditor.cpp +++ b/src/kvirc/ui/kvi_modeeditor.cpp @@ -33,8 +33,8 @@ #include "kvi_toolwindows_container.h" #include "kvi_tal_scrollview.h" -#include -#include +#include +#include ////////////////////////////////////////////////////////////////////// @@ -46,7 +46,7 @@ // FIXME: This widget should use a KviTalScrollView! -KviModeEditor::KviModeEditor(QWidget * par,KviWindowToolPageButton* button,const char * nam,KviConsole * c,const char * mode,const char * key,const char * limit) +KviModeEditor::KviModeEditor(TQWidget * par,KviWindowToolPageButton* button,const char * nam,KviConsole * c,const char * mode,const char * key,const char * limit) : KviWindowToolWidget(par,button) { m_szMode = mode; @@ -54,7 +54,7 @@ KviModeEditor::KviModeEditor(QWidget * par,KviWindowToolPageButton* button,const m_szLimit = limit; bool isEnabled=1; - QObject * w = parent(); + TQObject * w = tqparent(); while(w) { if(w->inherits("KviChannel")) @@ -63,80 +63,80 @@ KviModeEditor::KviModeEditor(QWidget * par,KviWindowToolPageButton* button,const if(!( chan->isMeHalfOp() || chan->isMeOp() || chan->isMeChanOwner() || chan->isMeChanAdmin() || chan->connection()->userInfo()->hasUserMode('o') || chan->connection()->userInfo()->hasUserMode('O') ) ) isEnabled=0; break; } - w = w->parent(); + w = w->tqparent(); } - QGridLayout *pMasterLayout = new QGridLayout(this,2,1,2,2); + TQGridLayout *pMasterLayout = new TQGridLayout(this,2,1,2,2); #ifdef COMPILE_USE_QT4 - setFocusPolicy(Qt::ClickFocus); + setFocusPolicy(TTQ_ClickFocus); #else - setFocusPolicy(QWidget::ClickFocus); + setFocusPolicy(TQ_ClickFocus); #endif KviTalScrollView *pScrollView = new KviTalScrollView(this); #ifdef COMPILE_USE_QT4 - pScrollView->viewport()->setBackgroundRole(QPalette::Background); + pScrollView->viewport()->setBackgroundRole(TQPalette::Background); #else - pScrollView->viewport()->setBackgroundMode(QWidget::PaletteBackground); + pScrollView->viewport()->setBackgroundMode(TQWidget::PaletteBackground); #endif pMasterLayout->addWidget(pScrollView,0,0); pMasterLayout->setRowStretch(1,1); - QPushButton * b; - if(isEnabled) b = new QPushButton(__tr2qs("&Apply"),this); - else b = new QPushButton(__tr2qs("Close"),this); + TQPushButton * b; + if(isEnabled) b = new TQPushButton(__tr2qs("&Apply"),this); + else b = new TQPushButton(__tr2qs("Close"),this); pMasterLayout->addWidget(b,1,0); - connect(b,SIGNAL(clicked()),this,SLOT(commit())); + connect(b,TQT_SIGNAL(clicked()),this,TQT_SLOT(commit())); - QWidget * pBackground = new QWidget(pScrollView->viewport()); + TQWidget * pBackground = new TQWidget(pScrollView->viewport()); - QGridLayout *g = new QGridLayout(pBackground,20,3,2,2); + TQGridLayout *g = new TQGridLayout(pBackground,20,3,2,2); - QLabel * l = new QLabel("",pBackground); + TQLabel * l = new TQLabel("",pBackground); l->setPixmap(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_MODE))); g->addWidget(l,0,0); - l = new QLabel(__tr2qs("Channel Modes"),pBackground); + l = new TQLabel(__tr2qs("Channel Modes"),pBackground); g->addMultiCellWidget(l,0,0,1,2); - QFrame * f = new QFrame(pBackground); - f->setFrameStyle(QFrame::HLine | QFrame::Sunken); + TQFrame * f = new TQFrame(pBackground); + f->setFrameStyle(TQFrame::HLine | TQFrame::Sunken); g->addMultiCellWidget(f,1,1,0,2); int i = 1; - QString tmp; + TQString tmp; m_pCheckBoxes = new KviPointerList; m_pCheckBoxes->setAutoDelete(false); // first che basic checkable modes pstnmi - QString szModes = "pstnmi"; + TQString szModes = "pstnmi"; while(!szModes.isEmpty()) { - QChar ccc = szModes[0]; + TQChar ccc = szModes[0]; szModes.remove(0,1); - KviQString::sprintf(tmp,"%c: %Q",ccc.unicode(),&(c->connection()->serverInfo()->getChannelModeDescription(ccc))); + KviTQString::sprintf(tmp,"%c: %Q",ccc.tqunicode(),&(c->connection()->serverInfo()->getChannelModeDescription(ccc))); KviStyledCheckBox * cb = new KviStyledCheckBox(tmp,pBackground); cb->setEnabled(isEnabled); m_pCheckBoxes->append(cb); - cb->setChecked(m_szMode.contains((char)ccc.unicode())); + cb->setChecked(m_szMode.tqcontains((char)ccc.tqunicode())); i++; g->addMultiCellWidget(cb,i,i,0,2); } - KviQString::sprintf(tmp,"l: %Q",&(c->connection()->serverInfo()->getChannelModeDescription('l'))); + KviTQString::sprintf(tmp,"l: %Q",&(c->connection()->serverInfo()->getChannelModeDescription('l'))); m_pLimitBox = new KviStyledCheckBox(tmp,pBackground); m_pLimitBox->setEnabled(isEnabled); i++; g->addMultiCellWidget(m_pLimitBox,i,i,0,2); - connect(m_pLimitBox,SIGNAL(toggled(bool)),this,SLOT(limitBoxToggled(bool))); - m_pLimitEdit = new QLineEdit(pBackground); + connect(m_pLimitBox,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(limitBoxToggled(bool))); + m_pLimitEdit = new TQLineEdit(pBackground); m_pLimitEdit->setEnabled(isEnabled); i++; g->addMultiCellWidget(m_pLimitEdit,i,i,1,2); @@ -149,13 +149,13 @@ KviModeEditor::KviModeEditor(QWidget * par,KviWindowToolPageButton* button,const m_pLimitEdit->setEnabled(false); } - KviQString::sprintf(tmp,"k: %Q",&(c->connection()->serverInfo()->getChannelModeDescription('k'))); + KviTQString::sprintf(tmp,"k: %Q",&(c->connection()->serverInfo()->getChannelModeDescription('k'))); m_pKeyBox = new KviStyledCheckBox(tmp,pBackground); m_pKeyBox->setEnabled(isEnabled); i++; g->addMultiCellWidget(m_pKeyBox,i,i,0,2); - connect(m_pKeyBox,SIGNAL(toggled(bool)),this,SLOT(keyBoxToggled(bool))); - m_pKeyEdit = new QLineEdit(pBackground); + connect(m_pKeyBox,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(keyBoxToggled(bool))); + m_pKeyEdit = new TQLineEdit(pBackground); m_pKeyEdit->setEnabled(isEnabled); i++; g->addMultiCellWidget(m_pKeyEdit,i,i,1,2); @@ -174,30 +174,30 @@ KviModeEditor::KviModeEditor(QWidget * par,KviWindowToolPageButton* button,const szModes = c->connection()->serverInfo()->supportedChannelModes(); } - int idx = szModes.findRev(','); + int idx = szModes.tqfindRev(','); if(idx != -1)szModes.remove(0,idx+1); - szModes.replace("p",""); - szModes.replace("s",""); - szModes.replace("t",""); - szModes.replace("n",""); - szModes.replace("m",""); - szModes.replace("i",""); - szModes.replace(",",""); - szModes.replace("b",""); - szModes.replace("k",""); - szModes.replace("l",""); + szModes.tqreplace("p",""); + szModes.tqreplace("s",""); + szModes.tqreplace("t",""); + szModes.tqreplace("n",""); + szModes.tqreplace("m",""); + szModes.tqreplace("i",""); + szModes.tqreplace(",",""); + szModes.tqreplace("b",""); + szModes.tqreplace("k",""); + szModes.tqreplace("l",""); while(!szModes.isEmpty()) { - QChar ccc = szModes[0]; + TQChar ccc = szModes[0]; szModes.remove(0,1); - KviQString::sprintf(tmp,"%c: %Q",(char)ccc.unicode(),&(c->connection()->serverInfo()->getChannelModeDescription(ccc))); + KviTQString::sprintf(tmp,"%c: %Q",(char)ccc.tqunicode(),&(c->connection()->serverInfo()->getChannelModeDescription(ccc))); KviStyledCheckBox * cb = new KviStyledCheckBox(tmp,pBackground); cb->setEnabled(isEnabled); m_pCheckBoxes->append(cb); - cb->setChecked(m_szMode.contains((char)ccc.unicode())); + cb->setChecked(m_szMode.tqcontains((char)ccc.tqunicode())); i++; g->addMultiCellWidget(cb,i,i,0,2); } @@ -310,16 +310,16 @@ void KviModeEditor::commit() for(KviStyledCheckBox * cb = m_pCheckBoxes->first();cb;cb = m_pCheckBoxes->next()) { - QString sz = cb->text(); - sz.replace("&",""); + TQString sz = cb->text(); + sz.tqreplace("&",""); if(sz.length() > 0) { - QChar ccc = sz[0]; + TQChar ccc = sz[0]; if(cb->isChecked()) { - if(!m_szMode.contains((char)ccc.unicode()))szPlusModes.append((char)ccc.unicode()); + if(!m_szMode.tqcontains((char)ccc.tqunicode()))szPlusModes.append((char)ccc.tqunicode()); } else { - if(m_szMode.contains((char)ccc.unicode()))szMinusModes.append((char)ccc.unicode()); + if(m_szMode.tqcontains((char)ccc.tqunicode()))szMinusModes.append((char)ccc.tqunicode()); } } } diff --git a/src/kvirc/ui/kvi_modeeditor.h b/src/kvirc/ui/kvi_modeeditor.h index 06512d9b..72057070 100644 --- a/src/kvirc/ui/kvi_modeeditor.h +++ b/src/kvirc/ui/kvi_modeeditor.h @@ -25,11 +25,11 @@ #include "kvi_settings.h" -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "kvi_string.h" #include "kvi_pointerlist.h" @@ -46,8 +46,9 @@ class KviConsole; class KVIRC_API KviModeEditor : public KviWindowToolWidget { Q_OBJECT + TQ_OBJECT public: - KviModeEditor(QWidget * par,KviWindowToolPageButton* button,const char * nam,KviConsole * c,const char * mode,const char * key,const char * limit); + KviModeEditor(TQWidget * par,KviWindowToolPageButton* button,const char * nam,KviConsole * c,const char * mode,const char * key,const char * limit); ~KviModeEditor(); protected: // fields KviStr m_szMode; @@ -55,9 +56,9 @@ protected: // fields KviStr m_szLimit; KviPointerList * m_pCheckBoxes; KviStyledCheckBox * m_pLimitBox; - QLineEdit * m_pLimitEdit; + TQLineEdit * m_pLimitEdit; KviStyledCheckBox * m_pKeyBox; - QLineEdit * m_pKeyEdit; + TQLineEdit * m_pKeyEdit; signals: void setMode(const char *); void done(); diff --git a/src/kvirc/ui/kvi_modew.cpp b/src/kvirc/ui/kvi_modew.cpp index a0cf85e4..8725933a 100755 --- a/src/kvirc/ui/kvi_modew.cpp +++ b/src/kvirc/ui/kvi_modew.cpp @@ -29,13 +29,13 @@ #include "kvi_ircconnectionuserinfo.h" #include "kvi_qcstring.h" -#include -#include +#include +#include #include "kvi_tal_hbox.h" -#include +#include -KviModeWidget::KviModeWidget(QWidget * par,KviChannel* chan,const char * name) -:QFrame(par,name) +KviModeWidget::KviModeWidget(TQWidget * par,KviChannel* chan,const char * name) +:TQFrame(par,name) { m_pChannel=chan; m_pLabel=0; @@ -43,7 +43,7 @@ KviModeWidget::KviModeWidget(QWidget * par,KviChannel* chan,const char * name) #ifdef COMPILE_USE_QT4 setAutoFillBackground(false); #else - setBackgroundMode(QWidget::NoBackground); + setBackgroundMode(TQWidget::NoBackground); #endif reset(); } @@ -63,8 +63,8 @@ void KviModeWidget::reset() m_pLabel=new KviThemedLabel(this,0); refreshModes(); m_pLabel->show(); - connect(m_pLabel,SIGNAL(doubleClicked()),this,SLOT(labelDoubleClick())); - QResizeEvent* ev=new QResizeEvent(size(),size()); + connect(m_pLabel,TQT_SIGNAL(doubleClicked()),this,TQT_SLOT(labelDoubleClick())); + TQResizeEvent* ev=new TQResizeEvent(size(),size()); resizeEvent(ev); delete ev; if(m_pChannel->input()) @@ -73,11 +73,11 @@ void KviModeWidget::reset() void KviModeWidget::refreshModes() { - QString szMode=m_pChannel->channelMode(); + TQString szMode=m_pChannel->channelMode(); if(!m_pChannel->channelKey().isEmpty()) - szMode+=QString(" k:%1").arg(m_pChannel->channelKey()); + szMode+=TQString(" k:%1").tqarg(m_pChannel->channelKey()); if(!m_pChannel->channelLimit().isEmpty()) - szMode+=QString(" l:%1").arg(m_pChannel->channelLimit().ptr()); + szMode+=TQString(" l:%1").tqarg(m_pChannel->channelLimit().ptr()); if(m_pLabel) m_pLabel->setText(szMode); } @@ -88,9 +88,9 @@ void KviModeWidget::applyOptions() m_pLabel->applyOptions(); } -void KviModeWidget::resizeEvent(QResizeEvent *e) +void KviModeWidget::resizeEvent(TQResizeEvent *e) { - if(e)QFrame::resizeEvent(e); + if(e)TQFrame::resizeEvent(e); if(m_pLabel) { m_pLabel->setGeometry(0,0,width(),height()); @@ -107,66 +107,66 @@ void KviModeWidget::labelDoubleClick() { delete m_pLabel; m_pLabel=0; - m_pLineEdit = new QLineEdit(this,0); + m_pLineEdit = new TQLineEdit(this,0); m_pLineEdit->setText(m_pChannel->channelMode()); m_pLineEdit->show(); m_pLineEdit->setFocus(); - resizeEvent(new QResizeEvent(size(),size())); + resizeEvent(new TQResizeEvent(size(),size())); m_pLineEdit->installEventFilter( this ); - connect(m_pLineEdit,SIGNAL(textChanged ( const QString & ) ),this,SLOT(editorTextChanged( const QString & ))); + connect(m_pLineEdit,TQT_SIGNAL(textChanged ( const TQString & ) ),this,TQT_SLOT(editorTextChanged( const TQString & ))); } } -bool KviModeWidget::eventFilter( QObject *obj, QEvent *ev ) +bool KviModeWidget::eventFilter( TQObject *obj, TQEvent *ev ) { - if( (obj==m_pLineEdit) && ( ev->type() == QEvent::KeyPress ) ) + if( (TQT_BASE_OBJECT(obj)==TQT_BASE_OBJECT(m_pLineEdit)) && ( ev->type() == TQEvent::KeyPress ) ) { - QKeyEvent *keyEvent = (QKeyEvent*)ev; + TQKeyEvent *keyEvent = (TQKeyEvent*)ev; switch(keyEvent->key()) { - case Qt::Key_Return: - case Qt::Key_Enter: + case TQt::Key_Return: + case TQt::Key_Enter: editorReturnPressed(); return TRUE; - case Qt::Key_Escape: + case TQt::Key_Escape: reset(); return TRUE; } } - return QFrame::eventFilter( obj, ev ); + return TQFrame::eventFilter( obj, ev ); } void KviModeWidget::editorReturnPressed() { - QString szCurModes=m_pChannel->channelMode(); - QString szNewModes=m_pLineEdit->text(); - QString szMinusModes; + TQString szCurModes=m_pChannel->channelMode(); + TQString szNewModes=m_pLineEdit->text(); + TQString szMinusModes; for(int i=0; iconnection()->encodeText(m_pChannel->name()); + KviTQCString chan = m_pChannel->connection()->encodeText(m_pChannel->name()); m_pChannel->connection()->sendFmtData("MODE %s %s",chan.data(),mode.utf8().data()); } reset(); } -void KviModeWidget::editorTextChanged( const QString & text) +void KviModeWidget::editorTextChanged( const TQString & text) { int i = 0; - QString szText=text; + TQString szText=text; for(i=0;iconnection()->serverInfo()->supportedPlainModes().contains(szText[i]) || - szText.find(szText[i])connection()->serverInfo()->supportedPlainModes().tqcontains(szText[i]) || + szText.tqfind(szText[i])setText(szText); diff --git a/src/kvirc/ui/kvi_modew.h b/src/kvirc/ui/kvi_modew.h index 7efbc961..5799535a 100755 --- a/src/kvirc/ui/kvi_modew.h +++ b/src/kvirc/ui/kvi_modew.h @@ -27,16 +27,17 @@ #include "kvi_themedlabel.h" #include "kvi_channel.h" -#include -#include +#include +#include #include "kvi_tal_hbox.h" -class KVIRC_API KviModeWidget : public QFrame +class KVIRC_API KviModeWidget : public TQFrame { Q_OBJECT + TQ_OBJECT public: - KviModeWidget(QWidget * par,KviChannel* chan,const char * name=0); + KviModeWidget(TQWidget * par,KviChannel* chan,const char * name=0); ~KviModeWidget(); void reset(); void refreshModes(); @@ -44,14 +45,14 @@ public: private: KviChannel * m_pChannel; KviThemedLabel * m_pLabel; - QLineEdit * m_pLineEdit; + TQLineEdit * m_pLineEdit; protected: - void resizeEvent(QResizeEvent *e); - bool eventFilter( QObject *obj, QEvent *ev ); + void resizeEvent(TQResizeEvent *e); + bool eventFilter( TQObject *obj, TQEvent *ev ); public slots: void labelDoubleClick(); void editorReturnPressed(); - void editorTextChanged( const QString & ); + void editorTextChanged( const TQString & ); }; #endif //_KVI_MODEW_H_ diff --git a/src/kvirc/ui/kvi_msgbox.cpp b/src/kvirc/ui/kvi_msgbox.cpp index 81cea104..5d02fab7 100644 --- a/src/kvirc/ui/kvi_msgbox.cpp +++ b/src/kvirc/ui/kvi_msgbox.cpp @@ -27,7 +27,7 @@ #ifdef COMPILE_KDE_SUPPORT #include #else - #include + #include #endif //!COMPILE_WITH_KDE #include "kvi_malloc.h" @@ -38,48 +38,48 @@ namespace KviMessageBox { - void warning(const QString &fmt,...) + void warning(const TQString &fmt,...) { kvi_va_list list; kvi_va_start_by_reference(list,fmt); - QString s; - KviQString::vsprintf(s,fmt,list); + TQString s; + KviTQString::vsprintf(s,fmt,list); kvi_va_end(list); #ifdef COMPILE_KDE_SUPPORT KMessageBox::error(0,s,"KVIrc"); #else - QMessageBox::warning(0,"KVIrc",s); + TQMessageBox::warning(0,"KVIrc",s); #endif } - void information(const QString &fmt,...) + void information(const TQString &fmt,...) { kvi_va_list list; kvi_va_start_by_reference(list,fmt); - QString s; - KviQString::vsprintf(s,fmt,list); + TQString s; + KviTQString::vsprintf(s,fmt,list); kvi_va_end(list); #ifdef COMPILE_KDE_SUPPORT KMessageBox::information(0,s,"KVIrc"); #else - QMessageBox::information(0,"KVIrc",s); + TQMessageBox::information(0,"KVIrc",s); #endif } - bool yesNo(const QString &caption,const QString &fmt,...) + bool yesNo(const TQString &caption,const TQString &fmt,...) { kvi_va_list list; kvi_va_start_by_reference(list,fmt); - QString s; - KviQString::vsprintf(s,fmt,list); + TQString s; + KviTQString::vsprintf(s,fmt,list); kvi_va_end(list); bool bRet; #ifdef COMPILE_KDE_SUPPORT bRet = (KMessageBox::questionYesNo(0,s,caption) == KMessageBox::Yes); #else - bRet = (QMessageBox::information(0,caption,s, - QMessageBox::Yes | QMessageBox::Default, - QMessageBox::No | QMessageBox::Escape) == QMessageBox::Yes); + bRet = (TQMessageBox::information(0,caption,s, + TQMessageBox::Yes | TQMessageBox::Default, + TQMessageBox::No | TQMessageBox::Escape) == TQMessageBox::Yes); #endif return bRet; } diff --git a/src/kvirc/ui/kvi_msgbox.h b/src/kvirc/ui/kvi_msgbox.h index 71b22a26..ddc338a7 100644 --- a/src/kvirc/ui/kvi_msgbox.h +++ b/src/kvirc/ui/kvi_msgbox.h @@ -45,9 +45,9 @@ class KviMessageBox : public KviTalMessageBox namespace KviMessageBox { - KVIRC_API void warning(const QString &fmt,...); - KVIRC_API void information(const QString &fmt,...); - KVIRC_API bool yesNo(const QString &caption,const QString &fmt,...); + KVIRC_API void warning(const TQString &fmt,...); + KVIRC_API void information(const TQString &fmt,...); + KVIRC_API bool yesNo(const TQString &caption,const TQString &fmt,...); }; #endif //!_KVI_MSGBOX_H_ diff --git a/src/kvirc/ui/kvi_optionswidget.cpp b/src/kvirc/ui/kvi_optionswidget.cpp index 546d4b1e..28d986f4 100644 --- a/src/kvirc/ui/kvi_optionswidget.cpp +++ b/src/kvirc/ui/kvi_optionswidget.cpp @@ -38,11 +38,11 @@ #define KVI_OPTIONSWIDGET_GRIDLAYOUT_BORDER 4 #define KVI_OPTIONSWIDGET_GRIDLAYOUT_SPACE 6 -QString KviOptionsWidget::m_szBasicTipStart; // empty decl -QString KviOptionsWidget::m_szBasicTipEnd; +TQString KviOptionsWidget::m_szBasicTipStart; // empty decl +TQString KviOptionsWidget::m_szBasicTipEnd; -KviOptionsWidget::KviOptionsWidget(QWidget * parent,const char * name,bool bSunken) -: QFrame(parent,name), KviSelectorInterface() +KviOptionsWidget::KviOptionsWidget(TQWidget * tqparent,const char * name,bool bSunken) +: TQFrame(tqparent,name), KviSelectorInterface() { if(m_szBasicTipStart.isEmpty()) { @@ -53,8 +53,8 @@ KviOptionsWidget::KviOptionsWidget(QWidget * parent,const char * name,bool bSunk } // FIXME: The bSunken value is ignored! - //if(bSunken)setFrameStyle(QFrame::StyledPanel | QFrame::Sunken); - //setFrameStyle(QFrame::StyledPanel | QFrame::Plain); + //if(bSunken)setFrameStyle(TQFrame::StyledPanel | TQFrame::Sunken); + //setFrameStyle(TQFrame::StyledPanel | TQFrame::Plain); m_pLayout = 0; m_pTabWidget = 0; m_iResetFlags = 0; @@ -68,19 +68,19 @@ KviOptionsWidget::~KviOptionsWidget() delete m_pSelectorInterfaceList; } -void KviOptionsWidget::mergeTip(QWidget * w,const QString &tip) +void KviOptionsWidget::mergeTip(TQWidget * w,const TQString &tip) { - static QString begin = "
"; - static QString mid = "
"; - static QString end = "
"; + static TQString begin = "
"; + static TQString mid = "
"; + static TQString end = "
"; #ifdef COMPILE_USE_QT4 - QString s = w->toolTip(); + TQString s = w->toolTip(); #else - QString s = KviTalToolTip::textFor(w); + TQString s = KviTalToolTip::textFor(w); #endif if(s.isEmpty())KviTalToolTip::add(w,tip); else { - QString tmp = begin; + TQString tmp = begin; tmp += tip; tmp += mid; tmp += s; @@ -92,36 +92,36 @@ void KviOptionsWidget::mergeTip(QWidget * w,const QString &tip) void KviOptionsWidget::createLayout(int rows,int cols) { if(m_pLayout)delete m_pLayout; - m_pLayout = new QGridLayout(this,rows,cols,KVI_OPTIONSWIDGET_GRIDLAYOUT_BORDER,KVI_OPTIONSWIDGET_GRIDLAYOUT_SPACE); + m_pLayout = new TQGridLayout(this,rows,cols,KVI_OPTIONSWIDGET_GRIDLAYOUT_BORDER,KVI_OPTIONSWIDGET_GRIDLAYOUT_SPACE); } void KviOptionsWidget::createTabbedPage() { createLayout(1,1); - layout()->setMargin(0); - layout()->setSpacing(0); - m_pTabWidget = new QTabWidget(this); + tqlayout()->setMargin(0); + tqlayout()->setSpacing(0); + m_pTabWidget = new TQTabWidget(this); addWidgetToLayout(m_pTabWidget,0,0,0,0); } -void KviOptionsWidget::addOptionsWidget(const QString &szText,const QIconSet &iconSet,KviOptionsWidget * pWidget) +void KviOptionsWidget::addOptionsWidget(const TQString &szText,const TQIconSet &iconSet,KviOptionsWidget * pWidget) { - if(pWidget->layout()) - pWidget->layout()->setMargin(10); + if(pWidget->tqlayout()) + pWidget->tqlayout()->setMargin(10); m_pTabWidget->addTab(pWidget,iconSet,szText); m_pSelectorInterfaceList->append(pWidget); } -void KviOptionsWidget::addWidgetToLayout(QWidget * w,int x1,int y1,int x2,int y2) +void KviOptionsWidget::addWidgetToLayout(TQWidget * w,int x1,int y1,int x2,int y2) { - if((x1 == x2) && (y1 == y2))layout()->addWidget(w,y1,x1); - else layout()->addMultiCellWidget(w,y1,y2,x1,x2); + if((x1 == x2) && (y1 == y2))tqlayout()->addWidget(w,y1,x1); + else tqlayout()->addMultiCellWidget(w,y1,y2,x1,x2); } /////////////////////////////////////////////////////////////////////////////////////////////////// -KviDirectorySelector * KviOptionsWidget::addDirectorySelector(int x1,int y1,int x2,int y2,const QString & txt,QString *pOption,bool bEnabled) +KviDirectorySelector * KviOptionsWidget::addDirectorySelector(int x1,int y1,int x2,int y2,const TQString & txt,TQString *pOption,bool bEnabled) { KviDirectorySelector * d = new KviDirectorySelector(this,txt,pOption,bEnabled); addWidgetToLayout(d,x1,y1,x2,y2); @@ -129,7 +129,7 @@ KviDirectorySelector * KviOptionsWidget::addDirectorySelector(int x1,int y1,int return d; } -KviDirectorySelector * KviOptionsWidget::addDirectorySelector(QWidget * pParent,const QString & txt,QString *pOption,bool bEnabled) +KviDirectorySelector * KviOptionsWidget::addDirectorySelector(TQWidget * pParent,const TQString & txt,TQString *pOption,bool bEnabled) { KviDirectorySelector * d = new KviDirectorySelector(pParent,txt,pOption,bEnabled); //addWidgetToLayout(d,x1,y1,x2,y2); @@ -137,12 +137,12 @@ KviDirectorySelector * KviOptionsWidget::addDirectorySelector(QWidget * pParent, return d; } -KviDirectorySelector * KviOptionsWidget::addDirectorySelector(int x1,int y1,int x2,int y2,const QString & txt,int optId,bool bEnabled) +KviDirectorySelector * KviOptionsWidget::addDirectorySelector(int x1,int y1,int x2,int y2,const TQString & txt,int optId,bool bEnabled) { m_iResetFlags |= (g_stringOptionsTable[optId].flags & KviOption_resetMask); KviDirectorySelector * d = addDirectorySelector(x1,y1,x2,y2,txt,&(KVI_OPTION_STRING(optId)),bEnabled); - QString tmp = m_szBasicTipStart; + TQString tmp = m_szBasicTipStart; tmp += g_stringOptionsTable[optId].name; tmp += m_szBasicTipEnd; KviTalToolTip::add(d,tmp); @@ -150,12 +150,12 @@ KviDirectorySelector * KviOptionsWidget::addDirectorySelector(int x1,int y1,int return d; } -KviDirectorySelector * KviOptionsWidget::addDirectorySelector(QWidget * pParent,const QString & txt,int optId,bool bEnabled) +KviDirectorySelector * KviOptionsWidget::addDirectorySelector(TQWidget * pParent,const TQString & txt,int optId,bool bEnabled) { m_iResetFlags |= (g_stringOptionsTable[optId].flags & KviOption_resetMask); KviDirectorySelector * d = addDirectorySelector(pParent,txt,&(KVI_OPTION_STRING(optId)),bEnabled); - QString tmp = m_szBasicTipStart; + TQString tmp = m_szBasicTipStart; tmp += g_stringOptionsTable[optId].name; tmp += m_szBasicTipEnd; KviTalToolTip::add(d,tmp); @@ -167,7 +167,7 @@ KviDirectorySelector * KviOptionsWidget::addDirectorySelector(QWidget * pParent, /////////////////////////////////////////////////////////////////////////////////////////////////// -KviFileSelector * KviOptionsWidget::addFileSelector(int x1,int y1,int x2,int y2,const QString & txt,QString *pOption,bool bEnabled) +KviFileSelector * KviOptionsWidget::addFileSelector(int x1,int y1,int x2,int y2,const TQString & txt,TQString *pOption,bool bEnabled) { KviFileSelector * d = new KviFileSelector(this,txt,pOption,bEnabled); addWidgetToLayout(d,x1,y1,x2,y2); @@ -175,19 +175,19 @@ KviFileSelector * KviOptionsWidget::addFileSelector(int x1,int y1,int x2,int y2, return d; } -KviFileSelector * KviOptionsWidget::addFileSelector(QWidget * pParent,const QString & txt,QString *pOption,bool bEnabled) +KviFileSelector * KviOptionsWidget::addFileSelector(TQWidget * pParent,const TQString & txt,TQString *pOption,bool bEnabled) { KviFileSelector * d = new KviFileSelector(pParent,txt,pOption,bEnabled); m_pSelectorInterfaceList->append(d); return d; } -KviFileSelector * KviOptionsWidget::addFileSelector(int x1,int y1,int x2,int y2,const QString & txt,int optId,bool bEnabled) +KviFileSelector * KviOptionsWidget::addFileSelector(int x1,int y1,int x2,int y2,const TQString & txt,int optId,bool bEnabled) { m_iResetFlags |= (g_stringOptionsTable[optId].flags & KviOption_resetMask); KviFileSelector * d = addFileSelector(x1,y1,x2,y2,txt,&(KVI_OPTION_STRING(optId)),bEnabled); - QString tmp = m_szBasicTipStart; + TQString tmp = m_szBasicTipStart; tmp += g_stringOptionsTable[optId].name; tmp += m_szBasicTipEnd; KviTalToolTip::add(d,tmp); @@ -195,12 +195,12 @@ KviFileSelector * KviOptionsWidget::addFileSelector(int x1,int y1,int x2,int y2, return d; } -KviFileSelector * KviOptionsWidget::addFileSelector(QWidget * pParent,const QString & txt,int optId,bool bEnabled) +KviFileSelector * KviOptionsWidget::addFileSelector(TQWidget * pParent,const TQString & txt,int optId,bool bEnabled) { m_iResetFlags |= (g_stringOptionsTable[optId].flags & KviOption_resetMask); KviFileSelector * d = addFileSelector(pParent,txt,&(KVI_OPTION_STRING(optId)),bEnabled); - QString tmp = m_szBasicTipStart; + TQString tmp = m_szBasicTipStart; tmp += g_stringOptionsTable[optId].name; tmp += m_szBasicTipEnd; KviTalToolTip::add(d,tmp); @@ -211,7 +211,7 @@ KviFileSelector * KviOptionsWidget::addFileSelector(QWidget * pParent,const QStr /////////////////////////////////////////////////////////////////////////////////////////////////// -KviSoundSelector * KviOptionsWidget::addSoundSelector(int x1,int y1,int x2,int y2,const QString & txt,QString *pOption,bool bEnabled) +KviSoundSelector * KviOptionsWidget::addSoundSelector(int x1,int y1,int x2,int y2,const TQString & txt,TQString *pOption,bool bEnabled) { KviSoundSelector * d = new KviSoundSelector(this,txt,pOption,bEnabled); addWidgetToLayout(d,x1,y1,x2,y2); @@ -219,19 +219,19 @@ KviSoundSelector * KviOptionsWidget::addSoundSelector(int x1,int y1,int x2,int y return d; } -KviSoundSelector * KviOptionsWidget::addSoundSelector(QWidget * pParent,const QString & txt,QString *pOption,bool bEnabled) +KviSoundSelector * KviOptionsWidget::addSoundSelector(TQWidget * pParent,const TQString & txt,TQString *pOption,bool bEnabled) { KviSoundSelector * d = new KviSoundSelector(pParent,txt,pOption,bEnabled); m_pSelectorInterfaceList->append(d); return d; } -KviSoundSelector * KviOptionsWidget::addSoundSelector(int x1,int y1,int x2,int y2,const QString & txt,int optId,bool bEnabled) +KviSoundSelector * KviOptionsWidget::addSoundSelector(int x1,int y1,int x2,int y2,const TQString & txt,int optId,bool bEnabled) { m_iResetFlags |= (g_stringOptionsTable[optId].flags & KviOption_resetMask); KviSoundSelector * d = addSoundSelector(x1,y1,x2,y2,txt,&(KVI_OPTION_STRING(optId)),bEnabled); - QString tmp = m_szBasicTipStart; + TQString tmp = m_szBasicTipStart; tmp += g_stringOptionsTable[optId].name; tmp += m_szBasicTipEnd; KviTalToolTip::add(d,tmp); @@ -239,12 +239,12 @@ KviSoundSelector * KviOptionsWidget::addSoundSelector(int x1,int y1,int x2,int y return d; } -KviSoundSelector * KviOptionsWidget::addSoundSelector(QWidget * pParent,const QString & txt,int optId,bool bEnabled) +KviSoundSelector * KviOptionsWidget::addSoundSelector(TQWidget * pParent,const TQString & txt,int optId,bool bEnabled) { m_iResetFlags |= (g_stringOptionsTable[optId].flags & KviOption_resetMask); KviSoundSelector * d = addSoundSelector(pParent,txt,&(KVI_OPTION_STRING(optId)),bEnabled); - QString tmp = m_szBasicTipStart; + TQString tmp = m_szBasicTipStart; tmp += g_stringOptionsTable[optId].name; tmp += m_szBasicTipEnd; KviTalToolTip::add(d,tmp); @@ -255,7 +255,7 @@ KviSoundSelector * KviOptionsWidget::addSoundSelector(QWidget * pParent,const QS /////////////////////////////////////////////////////////////////////////////////////////////////// -KviBoolSelector * KviOptionsWidget::addBoolSelector(int x1,int y1,int x2,int y2,const QString & txt,bool *pOption,bool bEnabled) +KviBoolSelector * KviOptionsWidget::addBoolSelector(int x1,int y1,int x2,int y2,const TQString & txt,bool *pOption,bool bEnabled) { KviBoolSelector * b = new KviBoolSelector(this,txt,pOption,bEnabled); addWidgetToLayout(b,x1,y1,x2,y2); @@ -263,29 +263,29 @@ KviBoolSelector * KviOptionsWidget::addBoolSelector(int x1,int y1,int x2,int y2, return b; } -KviBoolSelector * KviOptionsWidget::addBoolSelector(QWidget * pParent,const QString & txt,bool *pOption,bool bEnabled) +KviBoolSelector * KviOptionsWidget::addBoolSelector(TQWidget * pParent,const TQString & txt,bool *pOption,bool bEnabled) { KviBoolSelector * b = new KviBoolSelector(pParent,txt,pOption,bEnabled); m_pSelectorInterfaceList->append(b); return b; } -KviBoolSelector * KviOptionsWidget::addBoolSelector(int x1,int y1,int x2,int y2,const QString & txt,int optId,bool bEnabled) +KviBoolSelector * KviOptionsWidget::addBoolSelector(int x1,int y1,int x2,int y2,const TQString & txt,int optId,bool bEnabled) { m_iResetFlags |= (g_boolOptionsTable[optId].flags & KviOption_resetMask); KviBoolSelector * d = addBoolSelector(x1,y1,x2,y2,txt,&(KVI_OPTION_BOOL(optId)),bEnabled); - QString tmp = m_szBasicTipStart; + TQString tmp = m_szBasicTipStart; tmp += g_boolOptionsTable[optId].name; tmp += m_szBasicTipEnd; KviTalToolTip::add(d,tmp); return d; } -KviBoolSelector * KviOptionsWidget::addBoolSelector(QWidget * pParent,const QString & txt,int optId,bool bEnabled) +KviBoolSelector * KviOptionsWidget::addBoolSelector(TQWidget * pParent,const TQString & txt,int optId,bool bEnabled) { m_iResetFlags |= (g_boolOptionsTable[optId].flags & KviOption_resetMask); KviBoolSelector * d = addBoolSelector(pParent,txt,&(KVI_OPTION_BOOL(optId)),bEnabled); - QString tmp = m_szBasicTipStart; + TQString tmp = m_szBasicTipStart; tmp += g_boolOptionsTable[optId].name; tmp += m_szBasicTipEnd; KviTalToolTip::add(d,tmp); @@ -295,7 +295,7 @@ KviBoolSelector * KviOptionsWidget::addBoolSelector(QWidget * pParent,const QStr /////////////////////////////////////////////////////////////////////////////////////////////////// -KviPixmapSelector * KviOptionsWidget::addPixmapSelector(int x1,int y1,int x2,int y2,const QString & txt,KviPixmap *pOption,bool bEnabled) +KviPixmapSelector * KviOptionsWidget::addPixmapSelector(int x1,int y1,int x2,int y2,const TQString & txt,KviPixmap *pOption,bool bEnabled) { KviPixmapSelector * b = new KviPixmapSelector(this,txt,pOption,bEnabled); addWidgetToLayout(b,x1,y1,x2,y2); @@ -303,11 +303,11 @@ KviPixmapSelector * KviOptionsWidget::addPixmapSelector(int x1,int y1,int x2,int return b; } -KviPixmapSelector * KviOptionsWidget::addPixmapSelector(int x1,int y1,int x2,int y2,const QString & txt,int optId,bool bEnabled) +KviPixmapSelector * KviOptionsWidget::addPixmapSelector(int x1,int y1,int x2,int y2,const TQString & txt,int optId,bool bEnabled) { m_iResetFlags |= (g_pixmapOptionsTable[optId].flags & KviOption_resetMask); KviPixmapSelector * d = addPixmapSelector(x1,y1,x2,y2,txt,&(KVI_OPTION_PIXMAP(optId)),bEnabled); - QString tmp = m_szBasicTipStart; + TQString tmp = m_szBasicTipStart; tmp += g_pixmapOptionsTable[optId].name; tmp += m_szBasicTipEnd; KviTalToolTip::add(d,tmp); @@ -317,7 +317,7 @@ KviPixmapSelector * KviOptionsWidget::addPixmapSelector(int x1,int y1,int x2,int /////////////////////////////////////////////////////////////////////////////////////////////////// -KviUIntSelector * KviOptionsWidget::addUIntSelector(int x1,int y1,int x2,int y2,const QString & txt, +KviUIntSelector * KviOptionsWidget::addUIntSelector(int x1,int y1,int x2,int y2,const TQString & txt, unsigned int * pOption,unsigned int uLowBound, unsigned int uHighBound,unsigned int uDefault,bool bEnabled) { @@ -327,7 +327,7 @@ KviUIntSelector * KviOptionsWidget::addUIntSelector(int x1,int y1,int x2,int y2, return u; } -KviUIntSelector * KviOptionsWidget::addUIntSelector(QWidget * pParent,const QString & txt, +KviUIntSelector * KviOptionsWidget::addUIntSelector(TQWidget * pParent,const TQString & txt, unsigned int * pOption,unsigned int uLowBound, unsigned int uHighBound,unsigned int uDefault,bool bEnabled) { @@ -336,26 +336,26 @@ KviUIntSelector * KviOptionsWidget::addUIntSelector(QWidget * pParent,const QStr return u; } -KviUIntSelector * KviOptionsWidget::addUIntSelector(int x1,int y1,int x2,int y2,const QString & txt, +KviUIntSelector * KviOptionsWidget::addUIntSelector(int x1,int y1,int x2,int y2,const TQString & txt, int optId,unsigned int uLowBound, unsigned int uHighBound,unsigned int uDefault,bool bEnabled) { m_iResetFlags |= (g_uintOptionsTable[optId].flags & KviOption_resetMask); KviUIntSelector * d = addUIntSelector(x1,y1,x2,y2,txt,&(KVI_OPTION_UINT(optId)),uLowBound,uHighBound,uDefault,bEnabled); - QString tmp = m_szBasicTipStart; + TQString tmp = m_szBasicTipStart; tmp += g_uintOptionsTable[optId].name; tmp += m_szBasicTipEnd; KviTalToolTip::add(d,tmp); return d; } -KviUIntSelector * KviOptionsWidget::addUIntSelector(QWidget * pParent,const QString & txt, +KviUIntSelector * KviOptionsWidget::addUIntSelector(TQWidget * pParent,const TQString & txt, int optId,unsigned int uLowBound, unsigned int uHighBound,unsigned int uDefault,bool bEnabled) { m_iResetFlags |= (g_uintOptionsTable[optId].flags & KviOption_resetMask); KviUIntSelector * d = addUIntSelector(pParent,txt,&(KVI_OPTION_UINT(optId)),uLowBound,uHighBound,uDefault,bEnabled); - QString tmp = m_szBasicTipStart; + TQString tmp = m_szBasicTipStart; tmp += g_uintOptionsTable[optId].name; tmp += m_szBasicTipEnd; KviTalToolTip::add(d,tmp); @@ -364,7 +364,7 @@ KviUIntSelector * KviOptionsWidget::addUIntSelector(QWidget * pParent,const QStr //////////////////////////////////////////////////////////////////////////////////////////////// -KviUIntSelector * KviOptionsWidget::addUShortIntSelector(int x1,int y1,int x2,int y2,const QString & txt, +KviUIntSelector * KviOptionsWidget::addUShortIntSelector(int x1,int y1,int x2,int y2,const TQString & txt, unsigned short int * pOption,unsigned int uLowBound, unsigned int uHighBound,unsigned int uDefault,bool bEnabled) { @@ -377,7 +377,7 @@ KviUIntSelector * KviOptionsWidget::addUShortIntSelector(int x1,int y1,int x2,in //////////////////////////////////////////////////////////////////////////////////////////////// -KviStringSelector * KviOptionsWidget::addStringSelector(int x1,int y1,int x2,int y2,const QString & txt,QString *pOption,bool bEnabled) +KviStringSelector * KviOptionsWidget::addStringSelector(int x1,int y1,int x2,int y2,const TQString & txt,TQString *pOption,bool bEnabled) { KviStringSelector * d = new KviStringSelector(this,txt,pOption,bEnabled); addWidgetToLayout(d,x1,y1,x2,y2); @@ -385,29 +385,29 @@ KviStringSelector * KviOptionsWidget::addStringSelector(int x1,int y1,int x2,int return d; } -KviStringSelector * KviOptionsWidget::addStringSelector(QWidget * pParent,const QString & txt,QString *pOption,bool bEnabled) +KviStringSelector * KviOptionsWidget::addStringSelector(TQWidget * pParent,const TQString & txt,TQString *pOption,bool bEnabled) { KviStringSelector * d = new KviStringSelector(pParent,txt,pOption,bEnabled); m_pSelectorInterfaceList->append(d); return d; } -KviStringSelector * KviOptionsWidget::addStringSelector(int x1,int y1,int x2,int y2,const QString & txt,int optId,bool bEnabled) +KviStringSelector * KviOptionsWidget::addStringSelector(int x1,int y1,int x2,int y2,const TQString & txt,int optId,bool bEnabled) { m_iResetFlags |= (g_stringOptionsTable[optId].flags & KviOption_resetMask); KviStringSelector * d = addStringSelector(x1,y1,x2,y2,txt,&(KVI_OPTION_STRING(optId)),bEnabled); - QString tmp = m_szBasicTipStart; + TQString tmp = m_szBasicTipStart; tmp += g_stringOptionsTable[optId].name; tmp += m_szBasicTipEnd; KviTalToolTip::add(d,tmp); return d; } -KviStringSelector * KviOptionsWidget::addStringSelector(QWidget * pParent,const QString & txt,int optId,bool bEnabled) +KviStringSelector * KviOptionsWidget::addStringSelector(TQWidget * pParent,const TQString & txt,int optId,bool bEnabled) { m_iResetFlags |= (g_stringOptionsTable[optId].flags & KviOption_resetMask); KviStringSelector * d = addStringSelector(pParent,txt,&(KVI_OPTION_STRING(optId)),bEnabled); - QString tmp = m_szBasicTipStart; + TQString tmp = m_szBasicTipStart; tmp += g_stringOptionsTable[optId].name; tmp += m_szBasicTipEnd; KviTalToolTip::add(d,tmp); @@ -417,7 +417,7 @@ KviStringSelector * KviOptionsWidget::addStringSelector(QWidget * pParent,const //////////////////////////////////////////////////////////////////////////////////////////////// -KviPasswordSelector * KviOptionsWidget::addPasswordSelector(int x1,int y1,int x2,int y2,const QString & txt,QString *pOption,bool bEnabled) +KviPasswordSelector * KviOptionsWidget::addPasswordSelector(int x1,int y1,int x2,int y2,const TQString & txt,TQString *pOption,bool bEnabled) { KviPasswordSelector * d = new KviPasswordSelector(this,txt,pOption,bEnabled); addWidgetToLayout(d,x1,y1,x2,y2); @@ -425,29 +425,29 @@ KviPasswordSelector * KviOptionsWidget::addPasswordSelector(int x1,int y1,int x2 return d; } -KviPasswordSelector * KviOptionsWidget::addPasswordSelector(QWidget * pParent,const QString & txt,QString *pOption,bool bEnabled) +KviPasswordSelector * KviOptionsWidget::addPasswordSelector(TQWidget * pParent,const TQString & txt,TQString *pOption,bool bEnabled) { KviPasswordSelector * d = new KviPasswordSelector(pParent,txt,pOption,bEnabled); m_pSelectorInterfaceList->append(d); return d; } -KviPasswordSelector * KviOptionsWidget::addPasswordSelector(int x1,int y1,int x2,int y2,const QString & txt,int optId,bool bEnabled) +KviPasswordSelector * KviOptionsWidget::addPasswordSelector(int x1,int y1,int x2,int y2,const TQString & txt,int optId,bool bEnabled) { m_iResetFlags |= (g_stringOptionsTable[optId].flags & KviOption_resetMask); KviPasswordSelector * d = addPasswordSelector(x1,y1,x2,y2,txt,&(KVI_OPTION_STRING(optId)),bEnabled); - QString tmp = m_szBasicTipStart; + TQString tmp = m_szBasicTipStart; tmp += g_stringOptionsTable[optId].name; tmp += m_szBasicTipEnd; KviTalToolTip::add(d,tmp); return d; } -KviPasswordSelector * KviOptionsWidget::addPasswordSelector(QWidget * pParent,const QString & txt,int optId,bool bEnabled) +KviPasswordSelector * KviOptionsWidget::addPasswordSelector(TQWidget * pParent,const TQString & txt,int optId,bool bEnabled) { m_iResetFlags |= (g_stringOptionsTable[optId].flags & KviOption_resetMask); KviPasswordSelector * d = addPasswordSelector(pParent,txt,&(KVI_OPTION_STRING(optId)),bEnabled); - QString tmp = m_szBasicTipStart; + TQString tmp = m_szBasicTipStart; tmp += g_stringOptionsTable[optId].name; tmp += m_szBasicTipEnd; KviTalToolTip::add(d,tmp); @@ -457,7 +457,7 @@ KviPasswordSelector * KviOptionsWidget::addPasswordSelector(QWidget * pParent,co //////////////////////////////////////////////////////////////////////////////////////////////// -KviStringListSelector * KviOptionsWidget::addStringListSelector(int x1,int y1,int x2,int y2,const QString & txt,QStringList * pOption,bool bEnabled) +KviStringListSelector * KviOptionsWidget::addStringListSelector(int x1,int y1,int x2,int y2,const TQString & txt,TQStringList * pOption,bool bEnabled) { KviStringListSelector * d = new KviStringListSelector(this,txt,pOption,bEnabled); addWidgetToLayout(d,x1,y1,x2,y2); @@ -465,11 +465,11 @@ KviStringListSelector * KviOptionsWidget::addStringListSelector(int x1,int y1,in return d; } -KviStringListSelector * KviOptionsWidget::addStringListSelector(int x1,int y1,int x2,int y2,const QString & txt,int optId,bool bEnabled) +KviStringListSelector * KviOptionsWidget::addStringListSelector(int x1,int y1,int x2,int y2,const TQString & txt,int optId,bool bEnabled) { m_iResetFlags |= (g_stringlistOptionsTable[optId].flags & KviOption_resetMask); KviStringListSelector * d = addStringListSelector(x1,y1,x2,y2,txt,&(KVI_OPTION_STRINGLIST(optId)),bEnabled); - QString tmp = m_szBasicTipStart; + TQString tmp = m_szBasicTipStart; tmp += g_stringlistOptionsTable[optId].name; tmp += m_szBasicTipEnd; KviTalToolTip::add(d,tmp); @@ -479,7 +479,7 @@ KviStringListSelector * KviOptionsWidget::addStringListSelector(int x1,int y1,in //////////////////////////////////////////////////////////////////////////////////////////////// -KviColorSelector * KviOptionsWidget::addColorSelector(int x1,int y1,int x2,int y2,const QString & txt,QColor * pOption,bool bEnabled) +KviColorSelector * KviOptionsWidget::addColorSelector(int x1,int y1,int x2,int y2,const TQString & txt,TQColor * pOption,bool bEnabled) { KviColorSelector * s = new KviColorSelector(this,txt,pOption,bEnabled); addWidgetToLayout(s,x1,y1,x2,y2); @@ -487,29 +487,29 @@ KviColorSelector * KviOptionsWidget::addColorSelector(int x1,int y1,int x2,int y return s; } -KviColorSelector * KviOptionsWidget::addColorSelector(QWidget * pParent,const QString & txt,QColor * pOption,bool bEnabled) +KviColorSelector * KviOptionsWidget::addColorSelector(TQWidget * pParent,const TQString & txt,TQColor * pOption,bool bEnabled) { KviColorSelector * s = new KviColorSelector(pParent,txt,pOption,bEnabled); m_pSelectorInterfaceList->append(s); return s; } -KviColorSelector * KviOptionsWidget::addColorSelector(int x1,int y1,int x2,int y2,const QString & txt,int optId,bool bEnabled) +KviColorSelector * KviOptionsWidget::addColorSelector(int x1,int y1,int x2,int y2,const TQString & txt,int optId,bool bEnabled) { m_iResetFlags |= (g_colorOptionsTable[optId].flags & KviOption_resetMask); KviColorSelector * d = addColorSelector(x1,y1,x2,y2,txt,&(KVI_OPTION_COLOR(optId)),bEnabled); - QString tmp = m_szBasicTipStart; + TQString tmp = m_szBasicTipStart; tmp += g_colorOptionsTable[optId].name; tmp += m_szBasicTipEnd; KviTalToolTip::add(d,tmp); return d; } -KviColorSelector * KviOptionsWidget::addColorSelector(QWidget * pParent,const QString & txt,int optId,bool bEnabled) +KviColorSelector * KviOptionsWidget::addColorSelector(TQWidget * pParent,const TQString & txt,int optId,bool bEnabled) { m_iResetFlags |= (g_colorOptionsTable[optId].flags & KviOption_resetMask); KviColorSelector * d = addColorSelector(pParent,txt,&(KVI_OPTION_COLOR(optId)),bEnabled); - QString tmp = m_szBasicTipStart; + TQString tmp = m_szBasicTipStart; tmp += g_colorOptionsTable[optId].name; tmp += m_szBasicTipEnd; KviTalToolTip::add(d,tmp); @@ -519,7 +519,7 @@ KviColorSelector * KviOptionsWidget::addColorSelector(QWidget * pParent,const QS ///////////////////////////////////////////////////////////////////////////////////////////////// -KviMircTextColorSelector * KviOptionsWidget::addMircTextColorSelector(int x1,int y1,int x2,int y2,const QString & txt,unsigned int *uFore,unsigned int *uBack,bool bEnabled) +KviMircTextColorSelector * KviOptionsWidget::addMircTextColorSelector(int x1,int y1,int x2,int y2,const TQString & txt,unsigned int *uFore,unsigned int *uBack,bool bEnabled) { KviMircTextColorSelector * s = new KviMircTextColorSelector(this,txt,uFore,uBack,bEnabled); addWidgetToLayout(s,x1,y1,x2,y2); @@ -527,31 +527,31 @@ KviMircTextColorSelector * KviOptionsWidget::addMircTextColorSelector(int x1,int return s; } -KviMircTextColorSelector * KviOptionsWidget::addMircTextColorSelector(QWidget * pParent,const QString & txt,unsigned int *uFore,unsigned int *uBack,bool bEnabled) +KviMircTextColorSelector * KviOptionsWidget::addMircTextColorSelector(TQWidget * pParent,const TQString & txt,unsigned int *uFore,unsigned int *uBack,bool bEnabled) { KviMircTextColorSelector * s = new KviMircTextColorSelector(pParent,txt,uFore,uBack,bEnabled); m_pSelectorInterfaceList->append(s); return s; } -KviMircTextColorSelector * KviOptionsWidget::addMircTextColorSelector(int x1,int y1,int x2,int y2,const QString & txt,int optForeId,int optBackId,bool bEnabled) +KviMircTextColorSelector * KviOptionsWidget::addMircTextColorSelector(int x1,int y1,int x2,int y2,const TQString & txt,int optForeId,int optBackId,bool bEnabled) { m_iResetFlags |= (g_uintOptionsTable[optForeId].flags & KviOption_resetMask); m_iResetFlags |= (g_uintOptionsTable[optBackId].flags & KviOption_resetMask); KviMircTextColorSelector * d = addMircTextColorSelector(x1,y1,x2,y2,txt,&(KVI_OPTION_UINT(optForeId)),&(KVI_OPTION_UINT(optBackId)),bEnabled); - QString tmp = m_szBasicTipStart; + TQString tmp = m_szBasicTipStart; tmp += g_uintOptionsTable[optForeId].name; tmp += m_szBasicTipEnd; KviTalToolTip::add(d,tmp); return d; } -KviMircTextColorSelector * KviOptionsWidget::addMircTextColorSelector(QWidget * pParent,const QString & txt,int optForeId,int optBackId,bool bEnabled) +KviMircTextColorSelector * KviOptionsWidget::addMircTextColorSelector(TQWidget * pParent,const TQString & txt,int optForeId,int optBackId,bool bEnabled) { m_iResetFlags |= (g_uintOptionsTable[optForeId].flags & KviOption_resetMask); m_iResetFlags |= (g_uintOptionsTable[optBackId].flags & KviOption_resetMask); KviMircTextColorSelector * d = addMircTextColorSelector(pParent,txt,&(KVI_OPTION_UINT(optForeId)),&(KVI_OPTION_UINT(optBackId)),bEnabled); - QString tmp = m_szBasicTipStart; + TQString tmp = m_szBasicTipStart; tmp += g_uintOptionsTable[optForeId].name; tmp += m_szBasicTipEnd; KviTalToolTip::add(d,tmp); @@ -562,7 +562,7 @@ KviMircTextColorSelector * KviOptionsWidget::addMircTextColorSelector(QWidget * //////////////////////////////////////////////////////////////////////////////////////////////// -KviFontSelector * KviOptionsWidget::addFontSelector(int x1,int y1,int x2,int y2,const QString & txt,QFont * pOption,bool bEnabled) +KviFontSelector * KviOptionsWidget::addFontSelector(int x1,int y1,int x2,int y2,const TQString & txt,TQFont * pOption,bool bEnabled) { KviFontSelector * f = new KviFontSelector(this,txt,pOption,bEnabled); addWidgetToLayout(f,x1,y1,x2,y2); @@ -570,29 +570,29 @@ KviFontSelector * KviOptionsWidget::addFontSelector(int x1,int y1,int x2,int y2, return f; } -KviFontSelector * KviOptionsWidget::addFontSelector(QWidget * pParent,const QString & txt,QFont * pOption,bool bEnabled) +KviFontSelector * KviOptionsWidget::addFontSelector(TQWidget * pParent,const TQString & txt,TQFont * pOption,bool bEnabled) { KviFontSelector * f = new KviFontSelector(pParent,txt,pOption,bEnabled); m_pSelectorInterfaceList->append(f); return f; } -KviFontSelector * KviOptionsWidget::addFontSelector(int x1,int y1,int x2,int y2,const QString & txt,int optId,bool bEnabled) +KviFontSelector * KviOptionsWidget::addFontSelector(int x1,int y1,int x2,int y2,const TQString & txt,int optId,bool bEnabled) { m_iResetFlags |= (g_fontOptionsTable[optId].flags & KviOption_resetMask); KviFontSelector * d = addFontSelector(x1,y1,x2,y2,txt,&(KVI_OPTION_FONT(optId)),bEnabled); - QString tmp = m_szBasicTipStart; + TQString tmp = m_szBasicTipStart; tmp += g_fontOptionsTable[optId].name; tmp += m_szBasicTipEnd; KviTalToolTip::add(d,tmp); return d; } -KviFontSelector * KviOptionsWidget::addFontSelector(QWidget * pParent,const QString & txt,int optId,bool bEnabled) +KviFontSelector * KviOptionsWidget::addFontSelector(TQWidget * pParent,const TQString & txt,int optId,bool bEnabled) { m_iResetFlags |= (g_fontOptionsTable[optId].flags & KviOption_resetMask); KviFontSelector * d = addFontSelector(pParent,txt,&(KVI_OPTION_FONT(optId)),bEnabled); - QString tmp = m_szBasicTipStart; + TQString tmp = m_szBasicTipStart; tmp += g_fontOptionsTable[optId].name; tmp += m_szBasicTipEnd; KviTalToolTip::add(d,tmp); @@ -602,9 +602,9 @@ KviFontSelector * KviOptionsWidget::addFontSelector(QWidget * pParent,const QStr //#define DECLARE_COMMIT_FUNCTION(__fnc,__class,__classString) // void KviOptionsWidget::__fnc() // { -// QObjectList * l = queryList(__classString); +// TQObjectList * l = queryList(__classString); // if(!l)return; -// QObjectListIt it(*l); +// TQObjectListIt it(*l); // while(it.current()) // { // ((__class *)it.current())->commit(); @@ -620,14 +620,14 @@ KviFontSelector * KviOptionsWidget::addFontSelector(QWidget * pParent,const QStr void KviOptionsWidget::addRowSpacer(int x1,int y1,int x2,int y2) { - QWidget * w = new QWidget(this); + TQWidget * w = new TQWidget(this); addWidgetToLayout(w,x1,y1,x2,y2); - layout()->setRowStretch(y1,1); + tqlayout()->setRowStretch(y1,1); } -QLabel * KviOptionsWidget::addLabel(int x1,int y1,int x2,int y2,const QString & text,bool bEnabled) +TQLabel * KviOptionsWidget::addLabel(int x1,int y1,int x2,int y2,const TQString & text,bool bEnabled) { - QLabel * l = new QLabel(text,this); + TQLabel * l = new TQLabel(text,this); #ifdef COMPILE_USE_QT4 l->setWordWrap(true); #endif @@ -636,9 +636,9 @@ QLabel * KviOptionsWidget::addLabel(int x1,int y1,int x2,int y2,const QString & return l; } -QLabel * KviOptionsWidget::addLabel(QWidget * pParent,const QString & text,bool bEnabled) +TQLabel * KviOptionsWidget::addLabel(TQWidget * pParent,const TQString & text,bool bEnabled) { - QLabel * l = new QLabel(text,pParent); + TQLabel * l = new TQLabel(text,pParent); #ifdef COMPILE_USE_QT4 l->setWordWrap(true); #endif @@ -646,26 +646,26 @@ QLabel * KviOptionsWidget::addLabel(QWidget * pParent,const QString & text,bool return l; } -QLineEdit * KviOptionsWidget::addLineEdit(int x1,int y1,int x2,int y2,bool bEnabled) +TQLineEdit * KviOptionsWidget::addLineEdit(int x1,int y1,int x2,int y2,bool bEnabled) { - QLineEdit * l = new QLineEdit(this); + TQLineEdit * l = new TQLineEdit(this); l->setEnabled(bEnabled); addWidgetToLayout(l,x1,y1,x2,y2); return l; } -QFrame * KviOptionsWidget::addSeparator(int x1,int y1,int x2,int y2) +TQFrame * KviOptionsWidget::addSeparator(int x1,int y1,int x2,int y2) { - QFrame * f = new QFrame(this); - f->setFrameStyle(QFrame::HLine | QFrame::Sunken); + TQFrame * f = new TQFrame(this); + f->setFrameStyle(TQFrame::HLine | TQFrame::Sunken); addWidgetToLayout(f,x1,y1,x2,y2); return f; } #ifdef COMPILE_USE_QT4 -KviTalGroupBox * KviOptionsWidget::addGroupBox(int x1,int y1,int x2,int y2,int nStrips,Qt::Orientation o,const QString &txt,bool bEnabled) +KviTalGroupBox * KviOptionsWidget::addGroupBox(int x1,int y1,int x2,int y2,int nStrips,Qt::Orientation o,const TQString &txt,bool bEnabled) #else -KviTalGroupBox * KviOptionsWidget::addGroupBox(int x1,int y1,int x2,int y2,int nStrips,KviTalGroupBox::Orientation o,const QString &txt,bool bEnabled) +KviTalGroupBox * KviOptionsWidget::addGroupBox(int x1,int y1,int x2,int y2,int nStrips,KviTalGroupBox::Orientation o,const TQString &txt,bool bEnabled) #endif { KviTalGroupBox * g = new KviTalGroupBox(nStrips,o,txt,this); @@ -676,12 +676,12 @@ KviTalGroupBox * KviOptionsWidget::addGroupBox(int x1,int y1,int x2,int y2,int n void KviOptionsWidget::addAdvancedButton(int x1,int y1,int x2,int y2) { - QWidget * w = topLevelWidget(); + TQWidget * w = tqtopLevelWidget(); if(!w)return; if(!w->inherits("KviGeneralOptionsDialog"))return; - QPushButton * b = new QPushButton(__tr2qs("Advanced..."),this); - connect(b,SIGNAL(clicked()),this,SLOT(switchToAdvancedPage())); + TQPushButton * b = new TQPushButton(__tr2qs("Advanced..."),this); + connect(b,TQT_SIGNAL(clicked()),this,TQT_SLOT(switchToAdvancedPage())); addWidgetToLayout(b,x1,y1,x2,y2); } diff --git a/src/kvirc/ui/kvi_optionswidget.h b/src/kvirc/ui/kvi_optionswidget.h index 84660939..463cc828 100644 --- a/src/kvirc/ui/kvi_optionswidget.h +++ b/src/kvirc/ui/kvi_optionswidget.h @@ -27,122 +27,123 @@ #include "kvi_settings.h" -#include -#include +#include +#include #include "kvi_pointerlist.h" -#include +#include #include -#include +#include #include "kvi_tal_groupbox.h" #include "kvi_selectors.h" -class KVIRC_API KviOptionsWidget : public QFrame, public KviSelectorInterface +class KVIRC_API KviOptionsWidget : public TQFrame, public KviSelectorInterface { Q_OBJECT + TQ_OBJECT public: - KviOptionsWidget(QWidget * parent,const char * name = 0,bool bSunken = true); + KviOptionsWidget(TQWidget * tqparent,const char * name = 0,bool bSunken = true); ~KviOptionsWidget(); private: - QGridLayout * m_pLayout; - QTabWidget * m_pTabWidget; + TQGridLayout * m_pLayout; + TQTabWidget * m_pTabWidget; int m_iResetFlags; int m_iSelectors; KviPointerList * m_pSelectorInterfaceList; - static QString m_szBasicTipStart; - static QString m_szBasicTipEnd; + static TQString m_szBasicTipStart; + static TQString m_szBasicTipEnd; public: void mergeResetFlag(int flag){ m_iResetFlags |= flag; }; void createLayout(int rows,int columns); - QGridLayout * layout(){ return m_pLayout; }; + TQGridLayout * tqlayout(){ return m_pLayout; }; protected: void commitSelectors(); void commitOptionsReset(); public: - void mergeTip(QWidget * w,const QString &tip); + void mergeTip(TQWidget * w,const TQString &tip); // tabbed page paradigm void createTabbedPage(); - void addOptionsWidget(const QString &szText,const QIconSet &iconSet,KviOptionsWidget * pWidget); - QTabWidget * tabWidget(){ return m_pTabWidget; }; + void addOptionsWidget(const TQString &szText,const TQIconSet &iconSet,KviOptionsWidget * pWidget); + TQTabWidget * tabWidget(){ return m_pTabWidget; }; // non tabbed page paradigm - KviBoolSelector * addBoolSelector(int x1,int y1,int x2,int y2,const QString & txt,bool * pOption,bool bEnabled = true); - KviBoolSelector * addBoolSelector(QWidget * pParent,const QString & txt,bool * pOption,bool bEnabled = true); - KviBoolSelector * addBoolSelector(int x1,int y1,int x2,int y2,const QString & txt,int optId,bool bEnabled = true); - KviBoolSelector * addBoolSelector(QWidget * pParnt,const QString & txt,int optId,bool bEnabled = true); - - KviColorSelector * addColorSelector(int x1,int y1,int x2,int y2,const QString & txt,QColor * pOption,bool bEnabled = true); - KviColorSelector * addColorSelector(QWidget * pParent,const QString & txt,QColor * pOption,bool bEnabled = true); - KviColorSelector * addColorSelector(int x1,int y1,int x2,int y2,const QString & txt,int optId,bool bEnabled = true); - KviColorSelector * addColorSelector(QWidget * pParent,const QString & txt,int optId,bool bEnabled = true); - - KviMircTextColorSelector * addMircTextColorSelector(int x1,int y1,int x2,int y2,const QString & txt,unsigned int *uFore,unsigned int *uBack,bool bEnabled = true); - KviMircTextColorSelector * addMircTextColorSelector(QWidget * pParent,const QString & txt,unsigned int *uFore,unsigned int *uBack,bool bEnabled = true); - KviMircTextColorSelector * addMircTextColorSelector(int x1,int y1,int x2,int y2,const QString & txt,int optForeId,int optBackId,bool bEnabled = true); - KviMircTextColorSelector * addMircTextColorSelector(QWidget * pParent,const QString & txt,int optForeId,int optBackId,bool bEnabled = true); - - KviDirectorySelector * addDirectorySelector(int x1,int y1,int x2,int y2,const QString & txt,QString * pOption,bool bEnabled = true); - KviDirectorySelector * addDirectorySelector(QWidget * pParent,const QString & txt,QString * pOption,bool bEnabled = true); - KviDirectorySelector * addDirectorySelector(int x1,int y1,int x2,int y2,const QString & txt,int optId,bool bEnabled = true); - KviDirectorySelector * addDirectorySelector(QWidget * pParent,const QString & txt,int optId,bool bEnabled = true); - - KviFileSelector * addFileSelector(int x1,int y1,int x2,int y2,const QString & txt,QString * pOption,bool bEnabled = true); - KviFileSelector * addFileSelector(QWidget * pParent,const QString & txt,QString * pOption,bool bEnabled = true); - KviFileSelector * addFileSelector(int x1,int y1,int x2,int y2,const QString & txt,int optId,bool bEnabled = true); - KviFileSelector * addFileSelector(QWidget * pParent,const QString & txt,int optId,bool bEnabled = true); - - KviSoundSelector * addSoundSelector(int x1,int y1,int x2,int y2,const QString & txt,QString * pOption,bool bEnabled = true); - KviSoundSelector * addSoundSelector(QWidget * pParent,const QString & txt,QString * pOption,bool bEnabled = true); - KviSoundSelector * addSoundSelector(int x1,int y1,int x2,int y2,const QString & txt,int optId,bool bEnabled = true); - KviSoundSelector * addSoundSelector(QWidget * pParent,const QString & txt,int optId,bool bEnabled = true); - - - KviFontSelector * addFontSelector(int x1,int y1,int x2,int y2,const QString & txt,QFont * pOption,bool bEnabled = true); - KviFontSelector * addFontSelector(QWidget * pParent,const QString & txt,QFont * pOption,bool bEnabled = true); - KviFontSelector * addFontSelector(int x1,int y1,int x2,int y2,const QString & txt,int optId,bool bEnabled = true); - KviFontSelector * addFontSelector(QWidget * pParent,const QString & txt,int optId,bool bEnabled = true); - - KviPasswordSelector * addPasswordSelector(int x1,int y1,int x2,int y2,const QString & txt,QString * pOption,bool bEnabled = true); - KviPasswordSelector * addPasswordSelector(QWidget * pParent,const QString & txt,QString * pOption,bool bEnabled = true); - KviPasswordSelector * addPasswordSelector(int x1,int y1,int x2,int y2,const QString & txt,int optId,bool bEnabled = true); - KviPasswordSelector * addPasswordSelector(QWidget * pParent,const QString & txt,int optId,bool bEnabled = true); + KviBoolSelector * addBoolSelector(int x1,int y1,int x2,int y2,const TQString & txt,bool * pOption,bool bEnabled = true); + KviBoolSelector * addBoolSelector(TQWidget * pParent,const TQString & txt,bool * pOption,bool bEnabled = true); + KviBoolSelector * addBoolSelector(int x1,int y1,int x2,int y2,const TQString & txt,int optId,bool bEnabled = true); + KviBoolSelector * addBoolSelector(TQWidget * pParnt,const TQString & txt,int optId,bool bEnabled = true); + + KviColorSelector * addColorSelector(int x1,int y1,int x2,int y2,const TQString & txt,TQColor * pOption,bool bEnabled = true); + KviColorSelector * addColorSelector(TQWidget * pParent,const TQString & txt,TQColor * pOption,bool bEnabled = true); + KviColorSelector * addColorSelector(int x1,int y1,int x2,int y2,const TQString & txt,int optId,bool bEnabled = true); + KviColorSelector * addColorSelector(TQWidget * pParent,const TQString & txt,int optId,bool bEnabled = true); + + KviMircTextColorSelector * addMircTextColorSelector(int x1,int y1,int x2,int y2,const TQString & txt,unsigned int *uFore,unsigned int *uBack,bool bEnabled = true); + KviMircTextColorSelector * addMircTextColorSelector(TQWidget * pParent,const TQString & txt,unsigned int *uFore,unsigned int *uBack,bool bEnabled = true); + KviMircTextColorSelector * addMircTextColorSelector(int x1,int y1,int x2,int y2,const TQString & txt,int optForeId,int optBackId,bool bEnabled = true); + KviMircTextColorSelector * addMircTextColorSelector(TQWidget * pParent,const TQString & txt,int optForeId,int optBackId,bool bEnabled = true); + + KviDirectorySelector * addDirectorySelector(int x1,int y1,int x2,int y2,const TQString & txt,TQString * pOption,bool bEnabled = true); + KviDirectorySelector * addDirectorySelector(TQWidget * pParent,const TQString & txt,TQString * pOption,bool bEnabled = true); + KviDirectorySelector * addDirectorySelector(int x1,int y1,int x2,int y2,const TQString & txt,int optId,bool bEnabled = true); + KviDirectorySelector * addDirectorySelector(TQWidget * pParent,const TQString & txt,int optId,bool bEnabled = true); + + KviFileSelector * addFileSelector(int x1,int y1,int x2,int y2,const TQString & txt,TQString * pOption,bool bEnabled = true); + KviFileSelector * addFileSelector(TQWidget * pParent,const TQString & txt,TQString * pOption,bool bEnabled = true); + KviFileSelector * addFileSelector(int x1,int y1,int x2,int y2,const TQString & txt,int optId,bool bEnabled = true); + KviFileSelector * addFileSelector(TQWidget * pParent,const TQString & txt,int optId,bool bEnabled = true); + + KviSoundSelector * addSoundSelector(int x1,int y1,int x2,int y2,const TQString & txt,TQString * pOption,bool bEnabled = true); + KviSoundSelector * addSoundSelector(TQWidget * pParent,const TQString & txt,TQString * pOption,bool bEnabled = true); + KviSoundSelector * addSoundSelector(int x1,int y1,int x2,int y2,const TQString & txt,int optId,bool bEnabled = true); + KviSoundSelector * addSoundSelector(TQWidget * pParent,const TQString & txt,int optId,bool bEnabled = true); + + + KviFontSelector * addFontSelector(int x1,int y1,int x2,int y2,const TQString & txt,TQFont * pOption,bool bEnabled = true); + KviFontSelector * addFontSelector(TQWidget * pParent,const TQString & txt,TQFont * pOption,bool bEnabled = true); + KviFontSelector * addFontSelector(int x1,int y1,int x2,int y2,const TQString & txt,int optId,bool bEnabled = true); + KviFontSelector * addFontSelector(TQWidget * pParent,const TQString & txt,int optId,bool bEnabled = true); + + KviPasswordSelector * addPasswordSelector(int x1,int y1,int x2,int y2,const TQString & txt,TQString * pOption,bool bEnabled = true); + KviPasswordSelector * addPasswordSelector(TQWidget * pParent,const TQString & txt,TQString * pOption,bool bEnabled = true); + KviPasswordSelector * addPasswordSelector(int x1,int y1,int x2,int y2,const TQString & txt,int optId,bool bEnabled = true); + KviPasswordSelector * addPasswordSelector(TQWidget * pParent,const TQString & txt,int optId,bool bEnabled = true); - KviPixmapSelector * addPixmapSelector(int x1,int y1,int x2,int y2,const QString & txt,int optId,bool bEnabled = true); - KviPixmapSelector * addPixmapSelector(int x1,int y1,int x2,int y2,const QString & txt,KviPixmap * pOption,bool bEnabled = true); + KviPixmapSelector * addPixmapSelector(int x1,int y1,int x2,int y2,const TQString & txt,int optId,bool bEnabled = true); + KviPixmapSelector * addPixmapSelector(int x1,int y1,int x2,int y2,const TQString & txt,KviPixmap * pOption,bool bEnabled = true); - KviStringListSelector * addStringListSelector(int x1,int y1,int x2,int y2,const QString & txt,QStringList * pOption,bool bEnabled = true); - KviStringListSelector * addStringListSelector(int x1,int y1,int x2,int y2,const QString & txt,int optId,bool bEnabled = true); + KviStringListSelector * addStringListSelector(int x1,int y1,int x2,int y2,const TQString & txt,TQStringList * pOption,bool bEnabled = true); + KviStringListSelector * addStringListSelector(int x1,int y1,int x2,int y2,const TQString & txt,int optId,bool bEnabled = true); - KviStringSelector * addStringSelector(int x1,int y1,int x2,int y2,const QString & txt,QString * pOption,bool bEnabled = true); - KviStringSelector * addStringSelector(QWidget * pParent,const QString & txt,QString * pOption,bool bEnabled = true); - KviStringSelector * addStringSelector(int x1,int y1,int x2,int y2,const QString & txt,int optId,bool bEnabled = true); - KviStringSelector * addStringSelector(QWidget * pParent,const QString & txt,int optId,bool bEnabled = true); + KviStringSelector * addStringSelector(int x1,int y1,int x2,int y2,const TQString & txt,TQString * pOption,bool bEnabled = true); + KviStringSelector * addStringSelector(TQWidget * pParent,const TQString & txt,TQString * pOption,bool bEnabled = true); + KviStringSelector * addStringSelector(int x1,int y1,int x2,int y2,const TQString & txt,int optId,bool bEnabled = true); + KviStringSelector * addStringSelector(TQWidget * pParent,const TQString & txt,int optId,bool bEnabled = true); - KviUIntSelector * addUIntSelector(int x1,int y1,int x2,int y2,const QString & txt,unsigned int * pOption, + KviUIntSelector * addUIntSelector(int x1,int y1,int x2,int y2,const TQString & txt,unsigned int * pOption, unsigned int uLowBound,unsigned int uHighBound,unsigned int uDefault,bool bEnabled = true); - KviUIntSelector * addUIntSelector(QWidget * pParent,const QString & txt,unsigned int * pOption, + KviUIntSelector * addUIntSelector(TQWidget * pParent,const TQString & txt,unsigned int * pOption, unsigned int uLowBound,unsigned int uHighBound,unsigned int uDefault,bool bEnabled = true); - KviUIntSelector * addUIntSelector(int x1,int y1,int x2,int y2,const QString & txt,int optId, + KviUIntSelector * addUIntSelector(int x1,int y1,int x2,int y2,const TQString & txt,int optId, unsigned int uLowBound,unsigned int uHighBound,unsigned int uDefault,bool bEnabled = true); - KviUIntSelector * addUIntSelector(QWidget * pParent,const QString & txt,int optId, + KviUIntSelector * addUIntSelector(TQWidget * pParent,const TQString & txt,int optId, unsigned int uLowBound,unsigned int uHighBound,unsigned int uDefault,bool bEnabled = true); - KviUIntSelector * addUShortIntSelector(int x1,int y1,int x2,int y2,const QString & txt,unsigned short int * pOption, + KviUIntSelector * addUShortIntSelector(int x1,int y1,int x2,int y2,const TQString & txt,unsigned short int * pOption, unsigned int uLowBound,unsigned int uHighBound,unsigned int uDefault,bool bEnabled = true); - QLabel * addLabel(int x1,int y1,int x2,int y2,const QString & text,bool bEnabled = true); - QLabel * addLabel(QWidget * pParent,const QString & text,bool bEnabled = true); - QLineEdit * addLineEdit(int x1,int y1,int x2,int y2,bool bEnabled = true); + TQLabel * addLabel(int x1,int y1,int x2,int y2,const TQString & text,bool bEnabled = true); + TQLabel * addLabel(TQWidget * pParent,const TQString & text,bool bEnabled = true); + TQLineEdit * addLineEdit(int x1,int y1,int x2,int y2,bool bEnabled = true); #ifdef COMPILE_USE_QT4 - KviTalGroupBox * addGroupBox(int x1,int y1,int x2,int y2,int nStrips,Qt::Orientation o,const QString &txt,bool bEnabled = true); + KviTalGroupBox * addGroupBox(int x1,int y1,int x2,int y2,int nStrips,Qt::Orientation o,const TQString &txt,bool bEnabled = true); #else - KviTalGroupBox * addGroupBox(int x1,int y1,int x2,int y2,int nStrips,KviTalGroupBox::Orientation o,const QString &txt,bool bEnabled = true); + KviTalGroupBox * addGroupBox(int x1,int y1,int x2,int y2,int nStrips,KviTalGroupBox::Orientation o,const TQString &txt,bool bEnabled = true); #endif - QFrame * addSeparator(int x1,int y1,int x2,int y2); + TQFrame * addSeparator(int x1,int y1,int x2,int y2); void addRowSpacer(int x1,int y1,int x2,int y2); - void addWidgetToLayout(QWidget * w,int x1,int y1,int x2,int y2); + void addWidgetToLayout(TQWidget * w,int x1,int y1,int x2,int y2); // this does NOT add the advanced button if this page is not inside a KviGeneralOptionsDialog // this is because nobody listens to the "switchToAdvancedPage" requests.... diff --git a/src/kvirc/ui/kvi_query.cpp b/src/kvirc/ui/kvi_query.cpp index c32c33f8..ed1801f2 100644 --- a/src/kvirc/ui/kvi_query.cpp +++ b/src/kvirc/ui/kvi_query.cpp @@ -55,21 +55,21 @@ #include "kvi_kvs_eventtriggers.h" -#include -#include +#include +#include #include "kvi_tal_hbox.h" -#include +#include #include "kvi_draganddrop.h" #include "kvi_valuelist.h" -KviQuery::KviQuery(KviFrame * lpFrm,KviConsole * lpConsole,const QString &nick) -: KviWindow(KVI_WINDOW_TYPE_QUERY,lpFrm,nick,lpConsole) +KviQuery::KviQuery(KviFrame * lpFrm,KviConsole * lpConsole,const TQString &nick) +: KviWindow(KVI_WINDOW_TYPE_TQUERY,lpFrm,nick,lpConsole) { m_iFlags = 0; connection()->registerQuery(this); - //m_pTopSplitter = new QSplitter(QSplitter::Horizontal,this,"top_splitter"); + //m_pTopSplitter = new TQSplitter(TQSplitter::Horizontal,this,"top_splitter"); m_pButtonBox = new KviTalHBox(this); m_pLabel = new KviThemedLabel(m_pButtonBox,"query_label"); m_pLabel->setAutoHeight(1); @@ -79,24 +79,24 @@ KviQuery::KviQuery(KviFrame * lpFrm,KviConsole * lpConsole,const QString &nick) // The button box on the right //KviTalHBox * box = new KviTalHBox(m_pTopSplitter,"button_box"); if(KVI_OPTION_BOOL(KviOption_boolShowExtendedInfoInQueryLabel)) - m_pButtonGrid= (QFrame*) new KviTalGrid(2,Qt::Horizontal,m_pButtonBox); + m_pButtonGrid= (TQFrame*) new KviTalGrid(2,Qt::Horizontal,m_pButtonBox); else - m_pButtonGrid= (QFrame*) new KviTalGrid(4,Qt::Horizontal,m_pButtonBox); + m_pButtonGrid= (TQFrame*) new KviTalGrid(4,Qt::Horizontal,m_pButtonBox); createTextEncodingButton(m_pButtonGrid); #ifdef COMPILE_USE_QT4 - m_pSplitter = new QSplitter(Qt::Horizontal,this,"main_splitter"); + m_pSplitter = new TQSplitter(Qt::Horizontal,this,"main_splitter"); #else - m_pSplitter = new QSplitter(QSplitter::Horizontal,this,"main_splitter"); + m_pSplitter = new TQSplitter(Qt::Horizontal,this,"main_splitter"); #endif m_pIrcView = new KviIrcView(m_pSplitter,lpFrm,this); - connect(m_pIrcView,SIGNAL(rightClicked()),this,SLOT(textViewRightClicked())); + connect(m_pIrcView,TQT_SIGNAL(rightClicked()),this,TQT_SLOT(textViewRightClicked())); //m_pEditorsContainer= new KviToolWindowsContainer(m_pSplitter); m_pListViewButton = new KviWindowToolPageButton(KVI_SMALLICON_HIDELISTVIEW,KVI_SMALLICON_SHOWLISTVIEW,__tr2qs("Show User List"),buttonContainer(),true,"list_view_button"); - connect(m_pListViewButton,SIGNAL(clicked()),this,SLOT(toggleListView())); + connect(m_pListViewButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(toggleListView())); #ifdef COMPILE_CRYPT_SUPPORT createCryptControllerButton(m_pButtonGrid); @@ -110,7 +110,7 @@ KviQuery::KviQuery(KviFrame * lpFrm,KviConsole * lpConsole,const QString &nick) // FIXME: #warning "Maybe tell the user all that we know about the remote end(s)....channels..." m_pIrcView->enableDnd(TRUE); - connect(m_pIrcView,SIGNAL(fileDropped(const char *)),this,SLOT(slotDndEvents(const char *))); + connect(m_pIrcView,TQT_SIGNAL(fileDropped(const char *)),this,TQT_SLOT(slotDndEvents(const char *))); updateCaption(); } @@ -118,7 +118,7 @@ KviQuery::KviQuery(KviFrame * lpFrm,KviConsole * lpConsole,const QString &nick) KviQuery::~KviQuery() { m_pUserListView->partAll(); - if(type() == KVI_WINDOW_TYPE_DEADQUERY) + if(type() == KVI_WINDOW_TYPE_DEADTQUERY) context()->unregisterDeadQuery(this); else connection()->unregisterQuery(this); @@ -126,7 +126,7 @@ KviQuery::~KviQuery() void KviQuery::updateLabelText() { - QString szText=getInfoLabelText(); + TQString szText=getInfoLabelText(); if(szText!=m_pLabel->text()) { m_pLabel->setText(szText); @@ -134,14 +134,14 @@ void KviQuery::updateLabelText() } } -QString KviQuery::getInfoLabelTipText() +TQString KviQuery::getInfoLabelTipText() { - QString txt; - KviIrcUserEntry * e = connection()->userDataBase()->find(m_szName); + TQString txt; + KviIrcUserEntry * e = connection()->userDataBase()->tqfind(m_szName); if(e) { - QString tmp; - QString szMask; + TQString tmp; + TQString szMask; if(e->hasUser()) szMask+=e->user(); else @@ -152,7 +152,7 @@ QString KviQuery::getInfoLabelTipText() else szMask+="*"; tmp+="\n"; - QString szChans; + TQString szChans; connection()->getCommonChannels(m_szName,szChans,0); if(console()->connection()) { @@ -167,13 +167,13 @@ QString KviQuery::getInfoLabelTipText() txt += "
"; if(e->hasRealName()) - tmp=__tr2qs("%1 is %2 (%3)").arg(m_szName).arg(szMask).arg(KviMircCntrl::stripControlBytes(e->realName())); + tmp=__tr2qs("%1 is %2 (%3)").tqarg(m_szName).tqarg(szMask).tqarg(KviMircCntrl::stripControlBytes(e->realName())); else - tmp=__tr2qs("%1 is %2").arg(m_szName).arg(szMask); + tmp=__tr2qs("%1 is %2").tqarg(m_szName).tqarg(szMask); - tmp.replace('&',"&"); - tmp.replace('<',"<"); - tmp.replace('>',">"); + tmp.tqreplace('&',"&"); + tmp.tqreplace('<',"<"); + tmp.tqreplace('>',">"); txt += tmp; @@ -183,25 +183,25 @@ QString KviQuery::getInfoLabelTipText() { txt+="
"; if(e->hasHops()) - txt+=__tr2qs("%1 is using irc server: %2 (%3 hops)").arg(m_szName).arg(e->server()).arg(e->hops()); + txt+=__tr2qs("%1 is using irc server: %2 (%3 hops)").tqarg(m_szName).tqarg(e->server()).tqarg(e->hops()); else - txt+=__tr2qs("%1 is using irc server: %2").arg(m_szName).arg(e->server()); + txt+=__tr2qs("%1 is using irc server: %2").tqarg(m_szName).tqarg(e->server()); txt+="
"; - txt+=__tr2qs("%1 is probably away").arg(m_szName); + txt+=__tr2qs("%1 is probably away").tqarg(m_szName); txt+="
"; - tmp=__tr2qs("Common channels with %1: %2").arg(m_szName).arg(szChans); + tmp=__tr2qs("Common channels with %1: %2").tqarg(m_szName).tqarg(szChans); - tmp.replace('&',"&"); - tmp.replace('<',"<"); - tmp.replace('>',">"); + tmp.tqreplace('&',"&"); + tmp.tqreplace('<',"<"); + tmp.tqreplace('>',">"); txt+=tmp; txt +="
"; - QString szTipx = a->tipText(a->mapFromGlobal(mapToGlobal(pnt))); + TQString szTipx = a->tipText(a->mapFromGlobal(mapToGlobal(pnt))); if(!szTipx.isEmpty()) { szTip += "
" + a->descriptor()->visibleName() + "
"; @@ -307,12 +307,12 @@ void KviStatusBar::tipRequest(KviDynamicToolTip *pTip,const QPoint &pnt) szTip += "
"; szTip += __tr2qs("Shift+Drag or Ctrl+Drag to move the applet around
Right click to see the other options"); szTip += "
"; - r = QRect(a->x(),a->y(),a->width(),a->height()); + r = TQRect(a->x(),a->y(),a->width(),a->height()); } else { szTip = "
"; szTip += __tr2qs("Right click to add/remove applets"); szTip += "
"; - r = QRect(m_pMessageLabel->x(),m_pMessageLabel->y(),m_pMessageLabel->width(),m_pMessageLabel->height()); + r = TQRect(m_pMessageLabel->x(),m_pMessageLabel->y(),m_pMessageLabel->width(),m_pMessageLabel->height()); } pTip->tip(r,szTip); } @@ -322,9 +322,9 @@ KviTalPopupMenu * KviStatusBar::contextPopup() if(!m_pContextPopup) { m_pContextPopup = new KviTalPopupMenu(this); - connect(m_pContextPopup,SIGNAL(aboutToShow()),this,SLOT(contextPopupAboutToShow())); + connect(m_pContextPopup,TQT_SIGNAL(aboutToShow()),this,TQT_SLOT(contextPopupAboutToShow())); } - m_pClickedApplet = appletAt(QCursor::pos()); + m_pClickedApplet = appletAt(TQCursor::pos()); return m_pContextPopup; } @@ -336,30 +336,30 @@ void KviStatusBar::contextPopupAboutToShow() if(appletExists(m_pClickedApplet)) { - QString app = m_pClickedApplet->descriptor()->visibleName(); + TQString app = m_pClickedApplet->descriptor()->visibleName(); - QString tmp; - KviQString::sprintf(tmp,"
%Q
",&app); + TQString tmp; + KviTQString::sprintf(tmp,"
%Q
",&app); #ifndef COMPILE_USE_QT4 - // FIXME: This is not supported under Qt4.. :( - QLabel * l = new QLabel(tmp,m_pContextPopup); - l->setFrameStyle(QFrame::Raised | QFrame::StyledPanel); + // FIXME: This is not supported under TQt4.. :( + TQLabel * l = new TQLabel(tmp,m_pContextPopup); + l->setFrameStyle(TQFrame::Raised | TQFrame::StyledPanel); m_pContextPopup->insertItem(l); #endif m_pClickedApplet->fillContextPopup(m_pContextPopup); - KviQString::sprintf(tmp,__tr2qs("Remove %Q"),&app); + KviTQString::sprintf(tmp,__tr2qs("Remove %Q"),&app); m_pContextPopup->insertSeparator(); - m_pContextPopup->insertItem(tmp,this,SLOT(removeClickedApplet())); + m_pContextPopup->insertItem(tmp,this,TQT_SLOT(removeClickedApplet())); } if(!m_pAppletsPopup) { m_pAppletsPopup = new KviTalPopupMenu(this); - connect(m_pAppletsPopup,SIGNAL(aboutToShow()),this,SLOT(appletsPopupAboutToShow())); - connect(m_pAppletsPopup,SIGNAL(activated(int)),this,SLOT(appletsPopupActivated(int))); + connect(m_pAppletsPopup,TQT_SIGNAL(aboutToShow()),this,TQT_SLOT(appletsPopupAboutToShow())); + connect(m_pAppletsPopup,TQT_SIGNAL(activated(int)),this,TQT_SLOT(appletsPopupActivated(int))); } m_pContextPopup->insertItem(__tr2qs("Add Applet"),m_pAppletsPopup); @@ -380,11 +380,11 @@ void KviStatusBar::appletsPopupAboutToShow() // FIXME: could we cache the module results in some way ? g_pModuleManager->loadModulesByCaps("statusbarapplet"); - KviPointerHashTableIterator it(*m_pAppletDescriptors); + KviPointerHashTableIterator it(*m_pAppletDescriptors); while(KviStatusBarAppletDescriptor * d = it.current()) { int id; - QPixmap * pix = d->icon(); + TQPixmap * pix = d->icon(); if(pix)id = m_pAppletsPopup->insertItem(*pix,d->visibleName()); else id = m_pAppletsPopup->insertItem(d->visibleName()); m_pAppletsPopup->setItemParameter(id,d->id()); @@ -392,9 +392,9 @@ void KviStatusBar::appletsPopupAboutToShow() } } -KviStatusBarApplet * KviStatusBar::createApplet(const QString &szInternalName) +KviStatusBarApplet * KviStatusBar::createApplet(const TQString &szInternalName) { - KviStatusBarAppletDescriptor * d = m_pAppletDescriptors->find(szInternalName); + KviStatusBarAppletDescriptor * d = m_pAppletDescriptors->tqfind(szInternalName); if(!d)return 0; return d->create(this); } @@ -412,14 +412,14 @@ void KviStatusBar::appletsPopupActivated(int id) if(!m_pAppletsPopup)return; int par = m_pAppletsPopup->itemParameter(id); - KviPointerHashTableIterator it(*m_pAppletDescriptors); + KviPointerHashTableIterator it(*m_pAppletDescriptors); while(KviStatusBarAppletDescriptor * d = it.current()) { if(par == d->id()) { if(m_pClickedApplet) { - int idx = m_pAppletList->findRef(m_pClickedApplet); + int idx = m_pAppletList->tqfindRef(m_pClickedApplet); if(idx != -1) { // try to put the new applet just after the clicked one @@ -444,7 +444,7 @@ void KviStatusBar::appletsPopupActivated(int id) void KviStatusBar::registerAppletDescriptor(KviStatusBarAppletDescriptor * d) { - m_pAppletDescriptors->replace(d->internalName(),d); + m_pAppletDescriptors->tqreplace(d->internalName(),d); } void KviStatusBar::registerApplet(KviStatusBarApplet * a) @@ -463,42 +463,42 @@ void KviStatusBar::unregisterApplet(KviStatusBarApplet * a) } -void KviStatusBar::paintEvent(QPaintEvent * e) +void KviStatusBar::paintEvent(TQPaintEvent * e) { - // avoid the ugly rectangle around the widgets painted by QStatusBar -// QPainter p(this); -// style().drawPrimitive(QStyle::PE_Panel,&p,rect(),colorGroup(),QStyle::Style_Raised,QStyleOption(1,1)); - //QStatusBar::paintEvent(e); - //qDrawWinPanel(&p,0,0,width(),height(),colorGroup(),false,0); + // avoid the ugly rectangle around the widgets painted by TQStatusBar +// TQPainter p(this); +// style().drawPrimitive(TQStyle::PE_Panel,&p,rect(),tqcolorGroup(),TQStyle::Style_Raised,TQStyleOption(1,1)); + //TQStatusBar::paintEvent(e); + //qDrawWinPanel(&p,0,0,width(),height(),tqcolorGroup(),false,0); } -void KviStatusBar::mousePressEvent(QMouseEvent * e) +void KviStatusBar::mousePressEvent(TQMouseEvent * e) { m_pClickedApplet = 0; if(e->button() & Qt::RightButton) { - contextPopup()->popup(QCursor::pos()); + contextPopup()->popup(TQCursor::pos()); return; } - if((e->button() & Qt::LeftButton) && (e->state() & (Qt::ShiftButton | Qt::ControlButton))) + if((e->button() & Qt::LeftButton) && (e->state() & (TQt::ShiftButton | TQt::ControlButton))) { // move! m_pClickedApplet = appletAt(mapToGlobal(e->pos())); if(!m_pClickedApplet)return; m_pClickedApplet->select(); #ifdef COMPILE_USE_QT4 - g_pApp->setOverrideCursor(Qt::SizeAllCursor); + g_pApp->setOverrideCursor(TQt::SizeAllCursor); #else g_pApp->setOverrideCursor(sizeAllCursor); #endif } } -void KviStatusBar::mouseMoveEvent(QMouseEvent * e) +void KviStatusBar::mouseMoveEvent(TQMouseEvent * e) { if(!m_pClickedApplet)return; if(!appletExists(m_pClickedApplet))return; - QPoint g = mapToGlobal(e->pos()); + TQPoint g = mapToGlobal(e->pos()); KviStatusBarApplet * a = appletAt(g,true); if(a == m_pClickedApplet)return; // move! @@ -518,17 +518,17 @@ void KviStatusBar::mouseMoveEvent(QMouseEvent * e) } m_pAppletList->removeRef(m_pClickedApplet); - int idx = m_pAppletList->findRef(a); + int idx = m_pAppletList->tqfindRef(a); if(idx == -1)m_pAppletList->append(m_pClickedApplet); // uhg ? else { - QPoint p = a->mapFromGlobal(g); + TQPoint p = a->mapFromGlobal(g); if(p.x() > (a->width() / 2))idx++; // just after m_pAppletList->insert(idx,m_pClickedApplet); } - layoutChildren(); + tqlayoutChildren(); } -void KviStatusBar::mouseReleaseEvent(QMouseEvent * e) +void KviStatusBar::mouseReleaseEvent(TQMouseEvent * e) { if(e->button() & Qt::LeftButton) { @@ -585,8 +585,8 @@ void KviStatusBar::showFirstMessageInQueue() if(!m_pMessageTimer) { - m_pMessageTimer = new QTimer(this); - QObject::connect(m_pMessageTimer,SIGNAL(timeout()),this,SLOT(messageTimerFired())); + m_pMessageTimer = new TQTimer(this); + TQObject::connect(m_pMessageTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(messageTimerFired())); } else { m_pMessageTimer->stop(); } @@ -602,7 +602,7 @@ void KviStatusBar::setPermanentMessage() KviIrcContext * c = m_pFrame->activeContext(); - QString txt = ""; + TQString txt = ""; if(c) { diff --git a/src/kvirc/ui/kvi_statusbar.h b/src/kvirc/ui/kvi_statusbar.h index 119c93d8..0030ea5c 100644 --- a/src/kvirc/ui/kvi_statusbar.h +++ b/src/kvirc/ui/kvi_statusbar.h @@ -28,29 +28,29 @@ #include "kvi_pointerlist.h" #include "kvi_heapobject.h" -#include +#include #include "kvi_pointerhashtable.h" -#include +#include class KviFrame; -class QTimer; -class QLabel; +class TQTimer; +class TQLabel; class KviTalPopupMenu; class KVIRC_API KviStatusBarMessage : public KviHeapObject { friend class KviStatusBar; protected: - QString m_szText; + TQString m_szText; unsigned int m_uTimeout; unsigned int m_uPriority; public: - KviStatusBarMessage(const QString &szText,unsigned int uTimeout = 8000,unsigned int uPriority = 0) + KviStatusBarMessage(const TQString &szText,unsigned int uTimeout = 8000,unsigned int uPriority = 0) : KviHeapObject(), m_szText(szText), m_uTimeout(uTimeout), m_uPriority(uPriority) {}; ~KviStatusBarMessage(){}; public: - const QString & text(){ return m_szText; }; + const TQString & text(){ return m_szText; }; unsigned int timeout(){ return m_uTimeout; }; unsigned int priority(){ return m_uPriority; }; }; @@ -61,21 +61,22 @@ class KviStatusBarAppletDescriptor; class KviIrcContext; class KviDynamicToolTip; -class KVIRC_API KviStatusBar : public QStatusBar +class KVIRC_API KviStatusBar : public TQStatusBar { friend class KviStatusBarApplet; friend class KviFrame; Q_OBJECT + TQ_OBJECT public: KviStatusBar(KviFrame * pFrame); ~KviStatusBar(); protected: KviFrame * m_pFrame; KviPointerList * m_pMessageQueue; - QTimer * m_pMessageTimer; - QLabel * m_pMessageLabel; + TQTimer * m_pMessageTimer; + TQLabel * m_pMessageLabel; KviPointerList * m_pAppletList; - KviPointerHashTable * m_pAppletDescriptors; + KviPointerHashTable * m_pAppletDescriptors; KviTalPopupMenu * m_pContextPopup; KviTalPopupMenu * m_pAppletsPopup; KviStatusBarApplet * m_pClickedApplet; @@ -88,25 +89,25 @@ protected slots: void messageTimerFired(); protected: void showFirstMessageInQueue(); - virtual void paintEvent(QPaintEvent * e); - virtual void mousePressEvent(QMouseEvent * e); - virtual void mouseMoveEvent(QMouseEvent * e); - virtual void mouseReleaseEvent(QMouseEvent * e); - virtual void resizeEvent(QResizeEvent * e); - virtual bool event(QEvent * e); + virtual void paintEvent(TQPaintEvent * e); + virtual void mousePressEvent(TQMouseEvent * e); + virtual void mouseMoveEvent(TQMouseEvent * e); + virtual void mouseReleaseEvent(TQMouseEvent * e); + virtual void resizeEvent(TQResizeEvent * e); + virtual bool event(TQEvent * e); void registerApplet(KviStatusBarApplet * a); void unregisterApplet(KviStatusBarApplet * a); void recalcMinimumHeight(); - void layoutChildren(); - void updateLayout(){ recalcMinimumHeight(); layoutChildren(); }; + void tqlayoutChildren(); + void updateLayout(){ recalcMinimumHeight(); tqlayoutChildren(); }; void save(); void load(); - KviStatusBarApplet * createApplet(const QString &szInternalName); + KviStatusBarApplet * createApplet(const TQString &szInternalName); void showLayoutHelp(); public: bool appletExists(KviStatusBarApplet * pApplet); // pnt is global! - KviStatusBarApplet * appletAt(const QPoint &pnt,bool bBestMatch = false); + KviStatusBarApplet * appletAt(const TQPoint &pnt,bool bBestMatch = false); KviTalPopupMenu * contextPopup(); // takes the ownership of pMsg @@ -124,7 +125,7 @@ protected slots: void appletsPopupActivated(int id); void removeClickedApplet(); void setPermanentMessage(); - void tipRequest(KviDynamicToolTip *pTip,const QPoint &pnt); + void tipRequest(KviDynamicToolTip *pTip,const TQPoint &pnt); }; #endif //!_KVI_STATUSBAR_H_ diff --git a/src/kvirc/ui/kvi_statusbarapplet.cpp b/src/kvirc/ui/kvi_statusbarapplet.cpp index 8e4ec89a..bc8fa023 100644 --- a/src/kvirc/ui/kvi_statusbarapplet.cpp +++ b/src/kvirc/ui/kvi_statusbarapplet.cpp @@ -40,15 +40,15 @@ #include "kvi_options.h" #include "kvi_kvs_script.h" -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "kvi_tal_popupmenu.h" -#include +#include #ifdef COMPILE_USE_QT4 - #include + #include #endif // This class COULD be derived also from KStatusBar but in fact @@ -61,7 +61,7 @@ #include "kvi_time.h" #include "kvi_qstring.h" -#include +#include /* IDEAS: @@ -69,7 +69,7 @@ - Countdown timer */ -KviStatusBarAppletDescriptor::KviStatusBarAppletDescriptor(const QString &szVisibleName,const QString &szInternalName,CreateAppletCallback pProc,const QString &szPreloadModule,const QPixmap &pixIcon) +KviStatusBarAppletDescriptor::KviStatusBarAppletDescriptor(const TQString &szVisibleName,const TQString &szInternalName,CreateAppletCallback pProc,const TQString &szPreloadModule,const TQPixmap &pixIcon) : KviHeapObject() { static int s_iAppletDescriptorUniqueId = 0; @@ -81,7 +81,7 @@ KviStatusBarAppletDescriptor::KviStatusBarAppletDescriptor(const QString &szVisi m_pProc = pProc; m_pAppletList = new KviPointerList; m_pAppletList->setAutoDelete(false); - if(!pixIcon.isNull())m_pIcon = new QPixmap(pixIcon); + if(!pixIcon.isNull())m_pIcon = new TQPixmap(pixIcon); else m_pIcon = 0; } @@ -113,7 +113,7 @@ void KviStatusBarAppletDescriptor::unregisterApplet(KviStatusBarApplet * a) KviStatusBarApplet::KviStatusBarApplet(KviStatusBar * pParent,KviStatusBarAppletDescriptor *pDescriptor) -: QLabel(pParent), m_pStatusBar(pParent), m_pDescriptor(pDescriptor) +: TQLabel(pParent), m_pStatusBar(pParent), m_pDescriptor(pDescriptor) { m_pDescriptor->registerApplet(this); m_pStatusBar->registerApplet(this); @@ -126,26 +126,26 @@ KviStatusBarApplet::~KviStatusBarApplet() m_pStatusBar->unregisterApplet(this); } -QString KviStatusBarApplet::tipText(const QPoint &) +TQString KviStatusBarApplet::tipText(const TQPoint &) { - return QString::null; + return TQString(); } -void KviStatusBarApplet::paintEvent(QPaintEvent * e) +void KviStatusBarApplet::paintEvent(TQPaintEvent * e) { - QLabel::paintEvent(e); + TQLabel::paintEvent(e); setFont(KVI_OPTION_FONT(KviOption_fontIrcToolBarApplet)); if(m_bSelected) { - QPainter p(this); + TQPainter p(this); #ifdef COMPILE_USE_QT4 - p.setCompositionMode(QPainter::CompositionMode_SourceOut); - p.fillRect(rect(),Qt::black); - p.setCompositionMode(QPainter::CompositionMode_SourceOver); + p.setCompositionMode(TQPainter::CompositionMode_SourceOut); + p.fillRect(rect(),TQt::black); + p.setCompositionMode(TQPainter::CompositionMode_SourceOver); #else - p.setRasterOp(Qt::NotROP); - p.fillRect(rect(),Qt::black); - p.setRasterOp(Qt::CopyROP); + p.setRasterOp(TQt::NotROP); + p.fillRect(rect(),TQt::black); + p.setRasterOp(TQt::CopyROP); #endif } } @@ -164,9 +164,9 @@ KviStatusBarAwayIndicator::KviStatusBarAwayIndicator(KviStatusBar * pParent,KviS : KviStatusBarApplet(pParent,pDescriptor) { m_bAwayOnAllContexts = false; - connect(pParent->frame(),SIGNAL(activeContextChanged()),this,SLOT(updateDisplay())); - connect(pParent->frame(),SIGNAL(activeContextStateChanged()),this,SLOT(updateDisplay())); - connect(pParent->frame(),SIGNAL(activeConnectionAwayStateChanged()),this,SLOT(updateDisplay())); + connect(pParent->frame(),TQT_SIGNAL(activeContextChanged()),this,TQT_SLOT(updateDisplay())); + connect(pParent->frame(),TQT_SIGNAL(activeContextStateChanged()),this,TQT_SLOT(updateDisplay())); + connect(pParent->frame(),TQT_SIGNAL(activeConnectionAwayStateChanged()),this,TQT_SLOT(updateDisplay())); updateDisplay(); @@ -200,7 +200,7 @@ void KviStatusBarAwayIndicator::toggleContext() void KviStatusBarAwayIndicator::fillContextPopup(KviTalPopupMenu *p) { - int id = p->insertItem(__tr2qs("Apply to all IRC Contexts"),this,SLOT(toggleContext())); + int id = p->insertItem(__tr2qs("Apply to all IRC Contexts"),this,TQT_SLOT(toggleContext())); p->setItemChecked(id,m_bAwayOnAllContexts); } @@ -229,13 +229,13 @@ void KviStatusBarAwayIndicator::selfRegister(KviStatusBar * pBar) } // FIXME: Away on all context should know where user is not away/back before toggling status -void KviStatusBarAwayIndicator::mouseDoubleClickEvent(QMouseEvent * e) +void KviStatusBarAwayIndicator::mouseDoubleClickEvent(TQMouseEvent * e) { if(!(e->button() & Qt::LeftButton))return; KviIrcConnection * c = statusBar()->frame()->activeConnection(); if(!c)return; if(c->state() != KviIrcConnection::Connected)return; - QString command; + TQString command; if(m_bAwayOnAllContexts) command = "if($away)back -a; else away -a"; else @@ -243,15 +243,15 @@ void KviStatusBarAwayIndicator::mouseDoubleClickEvent(QMouseEvent * e) KviKvsScript::run(command,c->console()); } -QString KviStatusBarAwayIndicator::tipText(const QPoint &) +TQString KviStatusBarAwayIndicator::tipText(const TQPoint &) { KviIrcConnection * c = statusBar()->frame()->activeConnection(); - QString ret = "
"; + TQString ret = "
"; if(!c)goto not_connected; if(c->state() != KviIrcConnection::Connected)goto not_connected; if(c->userInfo()->isAway()) { - QString tmp = KviTimeUtils::formatTimeInterval(kvi_unixTime() - c->userInfo()->awayTime(),KviTimeUtils::NoLeadingEmptyIntervals); + TQString tmp = KviTimeUtils::formatTimeInterval(kvi_unixTime() - c->userInfo()->awayTime(),KviTimeUtils::NoLeadingEmptyIntervals); ret += __tr2qs("Away since"); ret += ' '; ret += tmp; @@ -275,13 +275,13 @@ not_connected: KviStatusBarLagIndicator::KviStatusBarLagIndicator(KviStatusBar * pParent,KviStatusBarAppletDescriptor *pDescriptor) : KviStatusBarApplet(pParent,pDescriptor) { - connect(pParent->frame(),SIGNAL(activeContextChanged()),this,SLOT(updateDisplay())); - connect(pParent->frame(),SIGNAL(activeContextStateChanged()),this,SLOT(updateDisplay())); - connect(pParent->frame(),SIGNAL(activeConnectionLagChanged()),this,SLOT(updateDisplay())); + connect(pParent->frame(),TQT_SIGNAL(activeContextChanged()),this,TQT_SLOT(updateDisplay())); + connect(pParent->frame(),TQT_SIGNAL(activeContextStateChanged()),this,TQT_SLOT(updateDisplay())); + connect(pParent->frame(),TQT_SIGNAL(activeConnectionLagChanged()),this,TQT_SLOT(updateDisplay())); updateDisplay(); - QFont f = font(); + TQFont f = font(); f.setFixedPitch(true); f.setFamily("fixed"); setFont(f); @@ -293,7 +293,7 @@ KviStatusBarLagIndicator::~KviStatusBarLagIndicator() { } -void KviStatusBarLagIndicator::mouseDoubleClickEvent(QMouseEvent *e) +void KviStatusBarLagIndicator::mouseDoubleClickEvent(TQMouseEvent *e) { if(!(e->button() & Qt::LeftButton))return; @@ -308,10 +308,10 @@ void KviStatusBarLagIndicator::mouseDoubleClickEvent(QMouseEvent *e) } -QString KviStatusBarLagIndicator::tipText(const QPoint &) +TQString KviStatusBarLagIndicator::tipText(const TQPoint &) { KviIrcConnection * c = statusBar()->frame()->activeConnection(); - QString ret = "
"; + TQString ret = "
"; if(!c)goto not_connected; if(c->state() != KviIrcConnection::Connected)goto not_connected; if(c->lagMeter()) @@ -322,12 +322,12 @@ QString KviStatusBarLagIndicator::tipText(const QPoint &) int llls = lll / 1000; int llld = (lll % 1000) / 100; int lllc = (lll % 100) / 10; - KviQString::appendFormatted(ret,__tr2qs("Lag: %d.%d%d"),llls,llld,lllc); + KviTQString::appendFormatted(ret,__tr2qs("Lag: %d.%d%d"),llls,llld,lllc); ret += "
"; int vss = c->lagMeter()->secondsSinceLastCompleted(); int vmm = vss / 60; vss = vss % 60; - KviQString::appendFormatted(ret,__tr2qs("Last checked %d mins %d secs ago"),vmm,vss); + KviTQString::appendFormatted(ret,__tr2qs("Last checked %d mins %d secs ago"),vmm,vss); } else { ret += __tr2qs("Lag measure not available yet"); ret += "
"; @@ -361,8 +361,8 @@ void KviStatusBarLagIndicator::updateDisplay() int llls = lll / 1000; int llld = (lll % 1000) / 100; int lllc = (lll % 100) / 10; - QString tmp; - KviQString::sprintf(tmp,__tr2qs("Lag: %d.%d%d"),llls,llld,lllc); + TQString tmp; + KviTQString::sprintf(tmp,__tr2qs("Lag: %d.%d%d"),llls,llld,lllc); if(lll > 60000) { // one minute lag! @@ -401,7 +401,7 @@ KviStatusBarClock::KviStatusBarClock(KviStatusBar * pParent,KviStatusBarAppletDe startTimer(1000); - QFont f = font(); + TQFont f = font(); f.setFixedPitch(true); f.setFamily("fixed"); setFont(f); @@ -411,12 +411,12 @@ KviStatusBarClock::~KviStatusBarClock() { } -void KviStatusBarClock::timerEvent(QTimerEvent *) +void KviStatusBarClock::timerEvent(TQTimerEvent *) { kvi_time_t tt = kvi_unixTime(); struct tm * t = m_bUtc ? gmtime(&tt) : localtime(&tt); - QString tmp; - KviQString::sprintf(tmp,"%d%d:%d%d:%d%d", + TQString tmp; + KviTQString::sprintf(tmp,"%d%d:%d%d:%d%d", t->tm_hour / 10, t->tm_hour % 10, t->tm_min / 10, @@ -428,7 +428,7 @@ void KviStatusBarClock::timerEvent(QTimerEvent *) void KviStatusBarClock::fillContextPopup(KviTalPopupMenu * p) { - int id = p->insertItem("UTC",this,SLOT(toggleUtc())); + int id = p->insertItem("UTC",this,TQT_SLOT(toggleUtc())); p->setItemChecked(id,m_bUtc); } @@ -474,7 +474,7 @@ KviStatusBarConnectionTimer::~KviStatusBarConnectionTimer() { } //g_pApp->topmostConnectedConsole() -void KviStatusBarConnectionTimer::timerEvent(QTimerEvent * e) +void KviStatusBarConnectionTimer::timerEvent(TQTimerEvent * e) { if(m_bTotal) { @@ -509,7 +509,7 @@ void KviStatusBarConnectionTimer::toggleTotal() void KviStatusBarConnectionTimer::fillContextPopup(KviTalPopupMenu *p) { - int id = p->insertItem(__tr2qs("Show total connection time"),this,SLOT(toggleTotal())); + int id = p->insertItem(__tr2qs("Show total connection time"),this,TQT_SLOT(toggleTotal())); p->setItemChecked(id,m_bTotal); } @@ -542,7 +542,7 @@ void KviStatusBarConnectionTimer::selfRegister(KviStatusBar * pBar) KviStatusBarSeparator::KviStatusBarSeparator(KviStatusBar * pParent,KviStatusBarAppletDescriptor *pDescriptor) : KviStatusBarApplet(pParent,pDescriptor) { - setFrameStyle(QFrame::VLine | QFrame::Sunken); + setFrameStyle(TQFrame::VLine | TQFrame::Sunken); } KviStatusBarSeparator::~KviStatusBarSeparator() diff --git a/src/kvirc/ui/kvi_statusbarapplet.h b/src/kvirc/ui/kvi_statusbarapplet.h index 6302be59..f324657e 100644 --- a/src/kvirc/ui/kvi_statusbarapplet.h +++ b/src/kvirc/ui/kvi_statusbarapplet.h @@ -29,14 +29,14 @@ #include "kvi_heapobject.h" #include "kvi_statusbar.h" -#include +#include #include "kvi_pointerhashtable.h" -#include -#include -#include +#include +#include +#include -class QTimer; -class QLabel; +class TQTimer; +class TQLabel; class KviTalPopupMenu; class KviConfig; @@ -53,26 +53,26 @@ class KVIRC_API KviStatusBarAppletDescriptor : public KviHeapObject friend class KviStatusBar; friend class KviStatusBarApplet; protected: - QString m_szVisibleName; // visible name of the applet - QString m_szInternalName; // UNIQUE name of the applet - QString m_szPreloadModule; // name of the module that must be preloaded for this applet + TQString m_szVisibleName; // visible name of the applet + TQString m_szInternalName; // UNITQUE name of the applet + TQString m_szPreloadModule; // name of the module that must be preloaded for this applet CreateAppletCallback m_pProc; // creation callback - QPixmap * m_pIcon; + TQPixmap * m_pIcon; int m_iId; KviPointerList * m_pAppletList; public: - KviStatusBarAppletDescriptor(const QString &szVisibleName, - const QString &szInternalName, + KviStatusBarAppletDescriptor(const TQString &szVisibleName, + const TQString &szInternalName, CreateAppletCallback pProc, - const QString &szPreloadModule = QString::null, - const QPixmap &pixIcon = QPixmap()); + const TQString &szPreloadModule = TQString(), + const TQPixmap &pixIcon = TQPixmap()); virtual ~KviStatusBarAppletDescriptor(); public: - const QString &visibleName(){ return m_szVisibleName; }; - const QString &internalName(){ return m_szInternalName; }; - const QString &preloadModule(){ return m_szPreloadModule; }; + const TQString &visibleName(){ return m_szVisibleName; }; + const TQString &internalName(){ return m_szInternalName; }; + const TQString &preloadModule(){ return m_szPreloadModule; }; int id(){ return m_iId; }; - QPixmap * icon(){ return m_pIcon; }; + TQPixmap * icon(){ return m_pIcon; }; protected: KviStatusBarApplet * create(KviStatusBar * pBar); void registerApplet(KviStatusBarApplet * a); @@ -80,10 +80,11 @@ protected: }; -class KVIRC_API KviStatusBarApplet : public QLabel +class KVIRC_API KviStatusBarApplet : public TQLabel { friend class KviStatusBar; Q_OBJECT + TQ_OBJECT protected: KviStatusBar * m_pStatusBar; KviStatusBarAppletDescriptor * m_pDescriptor; @@ -98,11 +99,11 @@ public: void select(bool bSelect = true); bool isSelected(){ return m_bSelected; }; protected: - virtual void paintEvent(QPaintEvent *e); + virtual void paintEvent(TQPaintEvent *e); virtual void fillContextPopup(KviTalPopupMenu *p){}; virtual void loadState(const char * prefix,KviConfig *cfg){}; virtual void saveState(const char * prefix,KviConfig *cfg){}; - virtual QString tipText(const QPoint &); + virtual TQString tipText(const TQPoint &); }; @@ -110,6 +111,7 @@ protected: class KviStatusBarClock : public KviStatusBarApplet { Q_OBJECT + TQ_OBJECT public: KviStatusBarClock(KviStatusBar * pParent,KviStatusBarAppletDescriptor *pDescriptor); virtual ~KviStatusBarClock(); @@ -119,7 +121,7 @@ public: static void selfRegister(KviStatusBar * pBar); protected: virtual void fillContextPopup(KviTalPopupMenu * p); - virtual void timerEvent(QTimerEvent * e); + virtual void timerEvent(TQTimerEvent * e); virtual void loadState(const char * prefix,KviConfig *cfg); virtual void saveState(const char * prefix,KviConfig *cfg); protected slots: @@ -129,13 +131,14 @@ protected slots: class KviStatusBarConnectionTimer : public KviStatusBarApplet { Q_OBJECT + TQ_OBJECT public: KviStatusBarConnectionTimer(KviStatusBar * pParent,KviStatusBarAppletDescriptor *pDescriptor); virtual ~KviStatusBarConnectionTimer(); protected: bool m_bTotal; protected: - virtual void timerEvent(QTimerEvent * e); + virtual void timerEvent(TQTimerEvent * e); virtual void fillContextPopup(KviTalPopupMenu *p); virtual void loadState(const char * prefix,KviConfig *cfg); virtual void saveState(const char * prefix,KviConfig *cfg); @@ -148,6 +151,7 @@ protected slots: class KviStatusBarSeparator : public KviStatusBarApplet { Q_OBJECT + TQ_OBJECT public: KviStatusBarSeparator(KviStatusBar * pParent,KviStatusBarAppletDescriptor *pDescriptor); virtual ~KviStatusBarSeparator(); @@ -158,6 +162,7 @@ public: class KviStatusBarAwayIndicator : public KviStatusBarApplet { Q_OBJECT + TQ_OBJECT public: KviStatusBarAwayIndicator(KviStatusBar * pParent,KviStatusBarAppletDescriptor *pDescriptor); virtual ~KviStatusBarAwayIndicator(); @@ -166,8 +171,8 @@ public: protected: bool m_bAwayOnAllContexts; protected: - virtual void mouseDoubleClickEvent(QMouseEvent *e); - virtual QString tipText(const QPoint &); + virtual void mouseDoubleClickEvent(TQMouseEvent *e); + virtual TQString tipText(const TQPoint &); virtual void fillContextPopup(KviTalPopupMenu *p); virtual void loadState(const char * prefix,KviConfig *cfg); virtual void saveState(const char * prefix,KviConfig *cfg); @@ -179,14 +184,15 @@ protected slots: class KviStatusBarLagIndicator : public KviStatusBarApplet { Q_OBJECT + TQ_OBJECT public: KviStatusBarLagIndicator(KviStatusBar * pParent,KviStatusBarAppletDescriptor *pDescriptor); virtual ~KviStatusBarLagIndicator(); public: static void selfRegister(KviStatusBar * pBar); protected: - virtual void mouseDoubleClickEvent(QMouseEvent *e); - virtual QString tipText(const QPoint &); + virtual void mouseDoubleClickEvent(TQMouseEvent *e); + virtual TQString tipText(const TQPoint &); protected slots: void updateDisplay(); }; diff --git a/src/kvirc/ui/kvi_styled_controls.cpp b/src/kvirc/ui/kvi_styled_controls.cpp index 8656b69b..e81376ea 100644 --- a/src/kvirc/ui/kvi_styled_controls.cpp +++ b/src/kvirc/ui/kvi_styled_controls.cpp @@ -35,15 +35,15 @@ #include "kvi_doublebuffer.h" #include "kvi_tal_toolbar.h" -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include KviStyledControlInternal::KviStyledControlInternal( KviStyledControl* control) -:QObject(0,0) +:TQObject(0,0) { m_pControl=control; } @@ -53,12 +53,12 @@ KviStyledControlInternal::~KviStyledControlInternal() } -bool KviStyledControlInternal::eventFilter( QObject *obj, QEvent *ev ) +bool KviStyledControlInternal::eventFilter( TQObject *obj, TQEvent *ev ) { - if(ev->type()==QEvent::Enter) + if(ev->type()==TQEvent::Enter) { m_pControl->enterEvent(ev); - } else if(ev->type()==QEvent::Leave) { + } else if(ev->type()==TQEvent::Leave) { m_pControl->leaveEvent(ev); } return FALSE; @@ -84,16 +84,16 @@ void KviStyledControlInternal::paintTimerShot () m_pControl->m_pTimer->stop(); } } - m_pControl->m_pWidget->repaint( false ); + m_pControl->m_pWidget->tqrepaint( false ); } -KviStyledControl::KviStyledControl(QWidget* w) +KviStyledControl::KviStyledControl(TQWidget* w) { m_pWidget=w; m_iStepNumber=0; m_bMouseEnter=0; m_pInternal=new KviStyledControlInternal(this); - m_pTimer = new QTimer(m_pInternal); + m_pTimer = new TQTimer(m_pInternal); m_pWidget->installEventFilter(m_pInternal); } @@ -103,7 +103,7 @@ KviStyledControl::~KviStyledControl() delete m_pInternal; } -void KviStyledControl::enterEvent ( QEvent * ) +void KviStyledControl::enterEvent ( TQEvent * ) { // debug("%s %s %i",__FILE__,__FUNCTION__,__LINE__); if(m_pWidget->isEnabled() && KVI_OPTION_BOOL(KviOption_boolEnableVisualEffects)) @@ -112,17 +112,17 @@ void KviStyledControl::enterEvent ( QEvent * ) { if(!m_pTimer->isActive()) { - m_pTimer->connect( m_pTimer, SIGNAL(timeout()), m_pInternal, SLOT(paintTimerShot()) ); + m_pTimer->connect( m_pTimer, TQT_SIGNAL(timeout()), m_pInternal, TQT_SLOT(paintTimerShot()) ); m_pTimer->start(KVI_STYLE_TIMER_STEP); } } m_bMouseEnter=1; m_iStepNumber++; - m_pWidget->repaint( false ); + m_pWidget->tqrepaint( false ); } } -void KviStyledControl::leaveEvent ( QEvent * ) +void KviStyledControl::leaveEvent ( TQEvent * ) { // debug("%s %s %i",__FILE__,__FUNCTION__,__LINE__); if(m_pWidget->isEnabled() && KVI_OPTION_BOOL(KviOption_boolEnableVisualEffects)) @@ -131,26 +131,26 @@ void KviStyledControl::leaveEvent ( QEvent * ) { if(!m_pTimer->isActive()) { - m_pTimer->connect( m_pTimer, SIGNAL(timeout()), m_pInternal, SLOT(paintTimerShot()) ); + m_pTimer->connect( m_pTimer, TQT_SIGNAL(timeout()), m_pInternal, TQT_SLOT(paintTimerShot()) ); m_pTimer->start(KVI_STYLE_TIMER_STEP); } } m_bMouseEnter=0; m_iStepNumber--; - m_pWidget->repaint( false ); + m_pWidget->tqrepaint( false ); } } -KviStyledCheckBox::KviStyledCheckBox ( QWidget * parent, const char * name ) -: QCheckBox(parent,name), KviStyledControl(this) +KviStyledCheckBox::KviStyledCheckBox ( TQWidget * tqparent, const char * name ) +: TQCheckBox(tqparent,name), KviStyledControl(this) { setWFlags(WNoAutoErase); } -KviStyledCheckBox::KviStyledCheckBox ( const QString & text, QWidget * parent, const char * name ) -: QCheckBox(text,parent,name), KviStyledControl(this) +KviStyledCheckBox::KviStyledCheckBox ( const TQString & text, TQWidget * tqparent, const char * name ) +: TQCheckBox(text,tqparent,name), KviStyledControl(this) { setWFlags(WNoAutoErase); } @@ -161,21 +161,21 @@ KviStyledCheckBox::~KviStyledCheckBox() } -void KviStyledCheckBox::paintEvent ( QPaintEvent * event) +void KviStyledCheckBox::paintEvent ( TQPaintEvent * event) { //debug("%s %s %i %i %i",__FILE__,__FUNCTION__,__LINE__,m_bMouseEnter,m_iStepNumber); if(KVI_OPTION_BOOL(KviOption_boolEnableVisualEffects)) { KviDoubleBuffer doublebuffer(event->rect().width(),event->rect().height()); - QPixmap * pDoubleBufferPixmap = doublebuffer.pixmap(); + TQPixmap * pDoubleBufferPixmap = doublebuffer.pixmap(); - QRect rect=event->rect(); + TQRect rect=event->rect(); pDoubleBufferPixmap->fill(this, rect.topLeft()); - QPainter p(pDoubleBufferPixmap, this); + TQPainter p(pDoubleBufferPixmap, this); p.translate(-rect.x(), -rect.y()); - QPixmap* pStoredPix = 0; + TQPixmap* pStoredPix = 0; if(isChecked()) pStoredPix=g_pIconManager->getBigIcon("kvi_checkbox_selected.png"); @@ -185,35 +185,35 @@ void KviStyledCheckBox::paintEvent ( QPaintEvent * event) if(pStoredPix) { //debug("%s %s %i %i %i",__FILE__,__FUNCTION__,__LINE__,m_bMouseEnter,m_iStepNumber); - QPixmap pix=*pStoredPix; + TQPixmap pix=*pStoredPix; if(m_iStepNumber && isEnabled()) { - QImage image = pix.convertToImage(); + TQImage image = pix.convertToImage(); for(int x=0; xrect().width(),event->rect().height()); - QPixmap * pDoubleBufferPixmap = doublebuffer.pixmap(); + TQPixmap * pDoubleBufferPixmap = doublebuffer.pixmap(); - QRect rect=event->rect(); + TQRect rect=event->rect(); pDoubleBufferPixmap->fill( - bActive ? QColor(206,215,223) : - colorGroup().background() + bActive ? TQColor(206,215,223) : + tqcolorGroup().background() ); - QPainter p(pDoubleBufferPixmap, this); + TQPainter p(pDoubleBufferPixmap, this); p.translate(-rect.x(), -rect.y()); if(bActive) { - p.setPen(QColor(185,190,195)); + p.setPen(TQColor(185,190,195)); p.drawRect(0,0,iWidth,height()); } - QPixmap pix=iconSet().pixmap( - usesBigPixmap() ? QIconSet::Large : QIconSet::Small, - isEnabled() ? QIconSet::Normal : - QIconSet::Disabled, - isOn() ? QIconSet::On : - QIconSet::Off); - QPoint pos((iWidth-iPixWidth-pix.width())/2,(height()-pix.height())/2); + TQPixmap pix=iconSet().pixmap( + usesBigPixmap() ? TQIconSet::Large : TQIconSet::Small, + isEnabled() ? TQIconSet::Normal : + TQIconSet::Disabled, + isOn() ? TQIconSet::On : + TQIconSet::Off); + TQPoint pos((iWidth-iPixWidth-pix.width())/2,(height()-pix.height())/2); if(!pix.isNull()) { if(m_iStepNumber && isEnabled()) { - QImage image = pix.convertToImage(); + TQImage image = pix.convertToImage(); for(int x=0; xgetBigIcon("kvi_toolbutton_menuindicator.png")) { - QPixmap pix=iconSet().pixmap( - usesBigPixmap() ? QIconSet::Large : QIconSet::Small, - isEnabled() ? QIconSet::Normal : - QIconSet::Disabled, - isOn() ? QIconSet::On : - QIconSet::Off); + TQPixmap pix=iconSet().pixmap( + usesBigPixmap() ? TQIconSet::Large : TQIconSet::Small, + isEnabled() ? TQIconSet::Normal : + TQIconSet::Disabled, + isOn() ? TQIconSet::On : + TQIconSet::Off); setMinimumWidth(bShowSubmenuIndicator ? pix.width()+8+pStoredPix->width() : pix.width()); } diff --git a/src/kvirc/ui/kvi_styled_controls.h b/src/kvirc/ui/kvi_styled_controls.h index 8d096fa8..f7e66416 100644 --- a/src/kvirc/ui/kvi_styled_controls.h +++ b/src/kvirc/ui/kvi_styled_controls.h @@ -28,18 +28,18 @@ #include "kvi_settings.h" #ifdef COMPILE_USE_QT4 - // we use internal Qt4 styles for now - #include - #include + // we use internal TQt4 styles for now + #include + #include - #define KviStyledCheckBox QCheckBox - #define KviStyledToolButton QToolButton + #define KviStyledCheckBox TQCheckBox + #define KviStyledToolButton TQToolButton #else -#include -#include -#include -#include +#include +#include +#include +#include #include "kvi_heapobject.h" class KviTalToolBar; @@ -50,16 +50,17 @@ class KviTalToolBar; class KviStyledControl; -class KVIRC_API KviStyledControlInternal : public QObject +class KVIRC_API KviStyledControlInternal : public TQObject { Q_OBJECT + TQ_OBJECT public: KviStyledControlInternal( KviStyledControl* control ); ~KviStyledControlInternal(); public slots: virtual void paintTimerShot(); protected: - bool eventFilter( QObject *obj, QEvent *ev ); + bool eventFilter( TQObject *obj, TQEvent *ev ); protected: KviStyledControl* m_pControl; }; @@ -68,44 +69,46 @@ class KVIRC_API KviStyledControl { friend class KviStyledControlInternal; public: - KviStyledControl(QWidget*); + KviStyledControl(TQWidget*); ~KviStyledControl(); protected: - virtual void enterEvent ( QEvent * ); - virtual void leaveEvent ( QEvent * ); + virtual void enterEvent ( TQEvent * ); + virtual void leaveEvent ( TQEvent * ); int m_bMouseEnter; int m_iStepNumber; - QTimer* m_pTimer; + TQTimer* m_pTimer; KviStyledControlInternal* m_pInternal; - QWidget *m_pWidget; + TQWidget *m_pWidget; }; -class KVIRC_API KviStyledCheckBox : public QCheckBox, public KviStyledControl +class KVIRC_API KviStyledCheckBox : public TQCheckBox, public KviStyledControl { Q_OBJECT + TQ_OBJECT public: - KviStyledCheckBox ( QWidget * parent, const char * name = 0 ); - KviStyledCheckBox ( const QString & text, QWidget * parent, const char * name = 0 ); + KviStyledCheckBox ( TQWidget * tqparent, const char * name = 0 ); + KviStyledCheckBox ( const TQString & text, TQWidget * tqparent, const char * name = 0 ); ~KviStyledCheckBox(); protected: - virtual void paintEvent ( QPaintEvent * ); + virtual void paintEvent ( TQPaintEvent * ); }; -class KVIRC_API KviStyledToolButton : public QToolButton, public KviStyledControl +class KVIRC_API KviStyledToolButton : public TQToolButton, public KviStyledControl { Q_OBJECT + TQ_OBJECT private: bool bShowSubmenuIndicator; public: - KviStyledToolButton ( QWidget * parent, const char * name = 0 ); - KviStyledToolButton ( const QIconSet & iconSet, const QString & textLabel, const QString & grouptext, QObject * receiver, const char * slot, KviTalToolBar * parent, const char * name = 0 ); + KviStyledToolButton ( TQWidget * tqparent, const char * name = 0 ); + KviStyledToolButton ( const TQIconSet & iconSet, const TQString & textLabel, const TQString & grouptext, TQObject * receiver, const char * slot, KviTalToolBar * tqparent, const char * name = 0 ); ~KviStyledToolButton(); void setShowSubmenuIndicator(bool bShow); protected: - virtual void paintEvent ( QPaintEvent * ); - virtual void resizeEvent ( QResizeEvent * ) ; + virtual void paintEvent ( TQPaintEvent * ); + virtual void resizeEvent ( TQResizeEvent * ) ; }; #endif diff --git a/src/kvirc/ui/kvi_taskbar.cpp b/src/kvirc/ui/kvi_taskbar.cpp index 8e75bfde..9a0c0b9c 100644 --- a/src/kvirc/ui/kvi_taskbar.cpp +++ b/src/kvirc/ui/kvi_taskbar.cpp @@ -47,31 +47,31 @@ #include "kvi_doublebuffer.h" // FIXME: #warning "The tree taskbar min width should be configurable" -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "kvi_tal_popupmenu.h" -#include +#include #ifdef COMPILE_USE_QT4 - #include + #include #else - #include + #include #endif -#include +#include #ifdef COMPILE_USE_QT4 - #include + #include #endif #ifdef COMPILE_PSEUDO_TRANSPARENCY - extern QPixmap * g_pShadedChildGlobalDesktopBackground; + extern TQPixmap * g_pShadedChildGlobalDesktopBackground; #endif -extern QPixmap * g_pActivityMeterPixmap; +extern TQPixmap * g_pActivityMeterPixmap; // FIXME: This should be renamed to "Window List" @@ -81,18 +81,18 @@ extern QPixmap * g_pActivityMeterPixmap; KviTaskBarBase::KviTaskBarBase() #ifdef COMPILE_USE_QT4 -: QDockWidget(__tr2qs("Taskbar"),g_pFrame) +: TQDockWidget(__tr2qs("Taskbar"),g_pFrame) #else -: KviToolBar(__tr2qs("Taskbar"),QT_DOCK_BOTTOM,false,"taskbar") +: KviToolBar(__tr2qs("Taskbar"),TQT_DOCK_BOTTOM,false,"taskbar") #endif { // FIXME: this timer should be started only if KVI_OPTION_BOOL(KviOption_boolUseTaskBarActivityMeter) #ifdef COMPILE_USE_QT4 setObjectName(__tr2qs("taskbar")); - setFeatures(QDockWidget::DockWidgetMovable); + setFeatures(TQDockWidget::DockWidgetMovable); #endif //COMPILE_USE_QT4 - m_pActivityMeterTimer = new QTimer(); - connect(m_pActivityMeterTimer,SIGNAL(timeout()),this,SLOT(updateActivityMeter())); + m_pActivityMeterTimer = new TQTimer(); + connect(m_pActivityMeterTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(updateActivityMeter())); m_pActivityMeterTimer->start(5000); } @@ -105,7 +105,7 @@ void KviTaskBarBase::updateActivityMeter() { } -void KviTaskBarBase::getTextForConsole(QString &szText,KviConsole * pConsole) +void KviTaskBarBase::getTextForConsole(TQString &szText,KviConsole * pConsole) { if(pConsole->isConnected()) { @@ -194,13 +194,13 @@ KviTaskBarItem::~KviTaskBarItem() // -KviTaskBarButton::KviTaskBarButton(QWidget * par,KviWindow * wnd,const char * name) -: QPushButton(par,name) , KviTaskBarItem(wnd) +KviTaskBarButton::KviTaskBarButton(TQWidget * par,KviWindow * wnd,const char * name) +: TQPushButton(par,name) , KviTaskBarItem(wnd) { m_bActive = false; m_pTip = new KviDynamicToolTip(this); - connect(m_pTip,SIGNAL(tipRequest(KviDynamicToolTip *,const QPoint &)),this,SLOT(tipRequest(KviDynamicToolTip *,const QPoint &))); -// setBackgroundMode(QWidget::NoBackground); + connect(m_pTip,TQT_SIGNAL(tipRequest(KviDynamicToolTip *,const TQPoint &)),this,TQT_SLOT(tipRequest(KviDynamicToolTip *,const TQPoint &))); +// setBackgroundMode(TQWidget::NoBackground); setToggleButton (true); setFlat ( KVI_OPTION_BOOL(KviOption_boolUseFlatClassicTaskbarButtons) ); } @@ -210,21 +210,21 @@ KviTaskBarButton::~KviTaskBarButton() delete m_pTip; //not necessary ? } -void KviTaskBarButton::tipRequest(KviDynamicToolTip *,const QPoint &pnt) +void KviTaskBarButton::tipRequest(KviDynamicToolTip *,const TQPoint &pnt) { if(KVI_OPTION_BOOL(KviOption_boolShowTaskBarToolTips)) { - QString szText; + TQString szText; m_pWindow->getTaskBarTipText(szText); m_pTip->tip(rect(),szText); } } -void KviTaskBarButton::mousePressEvent(QMouseEvent *e) +void KviTaskBarButton::mousePressEvent(TQMouseEvent *e) { if(e->button() & Qt::LeftButton) { - if(e->state() & Qt::ShiftButton) + if(e->state() & TQt::ShiftButton) { m_pWindow->delayedClose(); } else { @@ -234,13 +234,11 @@ void KviTaskBarButton::mousePressEvent(QMouseEvent *e) } else m_pWindow->contextPopup(); } -#if QT_VERSION >= 300 -void KviTaskBarButton::contextMenuEvent(QContextMenuEvent *e) +void KviTaskBarButton::contextMenuEvent(TQContextMenuEvent *e) { m_pWindow->contextPopup(); e->accept(); } -#endif void KviTaskBarButton::setActive(bool bActive) { @@ -261,46 +259,46 @@ void KviTaskBarButton::setActive(bool bActive) } #ifdef COMPILE_USE_QT4 -void KviTaskBarButton::paintEvent(QPaintEvent * e) +void KviTaskBarButton::paintEvent(TQPaintEvent * e) { - QPainter p(this); - QStyleOption opt; + TQPainter p(this); + TQStyleOption opt; opt.initFrom(this); if(isOn()) - opt.state = QStyle::State_On | QStyle::State_Active; - style()->drawPrimitive(QStyle::PE_PanelButtonTool,&opt,&p,this); + opt.state = TQStyle::State_On | TQStyle::State_Active; + style()->drawPrimitive(TQStyle::PE_PanelButtonTool,&opt,&p,this); drawButtonLabel(&p); } #endif -void KviTaskBarButton::drawButtonLabel(QPainter * painter) +void KviTaskBarButton::drawButtonLabel(TQPainter * painter) { - QRect distRect = painter->window(); + TQRect distRect = painter->window(); int iHeight = distRect.height(); int iWidth = distRect.width(); - QPainter * pPainter; + TQPainter * pPainter; #ifdef COMPILE_USE_QT4 pPainter = painter; #else //!COMPILE_USE_QT4 KviDoubleBuffer db(iWidth,iHeight); - QPixmap * pMemBuffer = db.pixmap(); - QPainter p(pMemBuffer); + TQPixmap * pMemBuffer = db.pixmap(); + TQPainter p(pMemBuffer); bitBlt(pMemBuffer,0,0,painter->device(),distRect.x(),distRect.y(),iWidth,iHeight); pPainter = &p; #endif //!COMPILE_USE_QT4 if(KVI_OPTION_BOOL(KviOption_boolUseTaskBarIrcContextIndicator)) { iHeight -= KVI_TASKBARBUTTON_CONTEXTINDICATORHEIGHT; - QColor base = colorGroup().background(); + TQColor base = tqcolorGroup().background(); if(m_pWindow->console()) { - QColor cntx = KVI_OPTION_ICCOLOR(m_pWindow->console()->ircContextId() % KVI_NUM_ICCOLOR_OPTIONS); + TQColor cntx = KVI_OPTION_ICCOLOR(m_pWindow->console()->ircContextId() % KVI_NUM_ICCOLOR_OPTIONS); base.setRgb((base.red() + cntx.red()) >> 1,(base.green() + cntx.green()) >> 1, (base.blue() + cntx.blue()) >> 1); pPainter->fillRect(2,iHeight,iWidth - 4,KVI_TASKBARBUTTON_CONTEXTINDICATORHEIGHT - 2,base); } else { - pPainter->fillRect(2,iHeight,iWidth - 4,KVI_TASKBARBUTTON_CONTEXTINDICATORHEIGHT - 2,colorGroup().brush(QColorGroup::Background)); + pPainter->fillRect(2,iHeight,iWidth - 4,KVI_TASKBARBUTTON_CONTEXTINDICATORHEIGHT - 2,tqcolorGroup().brush(TQColorGroup::Background)); } } @@ -323,7 +321,7 @@ void KviTaskBarButton::drawButtonLabel(QPainter * painter) } } - QRect cRect(daX,3,iWidth - (20 + daX),iHeight - 6); + TQRect cRect(daX,3,iWidth - (20 + daX),iHeight - 6); if(m_iProgress >= 0) { @@ -334,8 +332,8 @@ void KviTaskBarButton::drawButtonLabel(QPainter * painter) pPainter->fillRect(daX,3,wdth,cRect.height(),KVI_OPTION_COLOR(KviOption_colorTaskBarProgressBar)); } - QRect bRect; - QString szText; + TQRect bRect; + TQString szText; bool bMinimized = m_pWindow->isMinimized(); @@ -363,7 +361,7 @@ void KviTaskBarButton::drawButtonLabel(QPainter * painter) { case KVI_WINDOW_TYPE_CONSOLE: { - QFont f = QFont(KVI_OPTION_FONT(KviOption_fontTaskbar)); + TQFont f = TQFont(KVI_OPTION_FONT(KviOption_fontTaskbar)); f.setBold(true); pPainter->setFont(f); KviTaskBarBase::getTextForConsole(szText,(KviConsole *)m_pWindow); @@ -373,8 +371,8 @@ void KviTaskBarButton::drawButtonLabel(QPainter * painter) case KVI_WINDOW_TYPE_DEADCHANNEL: szText = ((KviChannel *)m_pWindow)->nameWithUserFlag(); break; - case KVI_WINDOW_TYPE_QUERY: - case KVI_WINDOW_TYPE_DEADQUERY: + case KVI_WINDOW_TYPE_TQUERY: + case KVI_WINDOW_TYPE_DEADTQUERY: szText = m_pWindow->windowName(); break; default: @@ -384,28 +382,28 @@ void KviTaskBarButton::drawButtonLabel(QPainter * painter) if(bMinimized) { - QString tmp = QChar('('); + TQString tmp = TQChar('('); tmp += szText; - tmp += QChar(')'); - pPainter->drawText(cRect,Qt::AlignLeft | Qt::AlignTop,tmp,-1,&bRect); + tmp += TQChar(')'); + pPainter->drawText(cRect,TQt::AlignLeft | TQt::AlignTop,tmp,-1,&bRect); } else { - pPainter->drawText(cRect,Qt::AlignLeft | Qt::AlignTop,szText,-1,&bRect); + pPainter->drawText(cRect,TQt::AlignLeft | TQt::AlignTop,szText,-1,&bRect); } if(bRect.width() > cRect.width()) { pPainter->setClipRect(cRect.right(),cRect.y(),10,cRect.height()); - QColor base = pPainter->pen().color(); - QColor bg = colorGroup().color(QColorGroup::Background); + TQColor base = pPainter->pen().color(); + TQColor bg = tqcolorGroup().color(TQColorGroup::Background); base.setRgb((base.red() + bg.red()) / 2,(base.green() + bg.green()) / 2,(base.blue() + bg.blue()) / 2); pPainter->setPen(base); cRect.setWidth(cRect.width() + 10); - pPainter->drawText(cRect,Qt::AlignLeft | Qt::AlignTop,szText,-1); + pPainter->drawText(cRect,TQt::AlignLeft | TQt::AlignTop,szText,-1); pPainter->setClipRect(cRect.right(),cRect.y(),5,cRect.height()); base.setRgb((base.red() + bg.red()) / 2,(base.green() + bg.green()) / 2,(base.blue() + bg.blue()) / 2); pPainter->setPen(base); cRect.setWidth(cRect.width() + 10); - pPainter->drawText(cRect,Qt::AlignLeft | Qt::AlignTop,szText,-1); + pPainter->drawText(cRect,TQt::AlignLeft | TQt::AlignTop,szText,-1); } #ifndef COMPILE_USE_QT4 pPainter->setClipping(FALSE); @@ -423,7 +421,7 @@ void KviTaskBarButton::setProgress(int progress) { if(progress == m_iProgress)return; m_iProgress = progress; - update(); // repaint(false) ? + update(); // tqrepaint(false) ? } void KviTaskBarButton::unhighlight() @@ -441,7 +439,7 @@ void KviTaskBarButton::highlight(int iLevel) m_iHighlightLevel = iLevel; if(g_pFrame->dockExtension())g_pFrame->dockExtension()->refresh(); if(m_bActive)return; - update(); // repaint(false) ? + update(); // tqrepaint(false) ? } @@ -460,7 +458,7 @@ KviTaskBarToolTip::~KviTaskBarToolTip() { } -void KviTaskBarToolTip::maybeTip(const QPoint &pnt) +void KviTaskBarToolTip::maybeTip(const TQPoint &pnt) { tip(m_pTaskBarButton->rect(),m_pTaskBarButton->m_pWindow->plainTextCaption()); } @@ -479,7 +477,7 @@ KviClassicTaskBar::KviClassicTaskBar() calcButtonHeight(); - m_pBase = new QWidget(this); + m_pBase = new TQWidget(this); // m_pBase->setBackgroundMode(NoBackground); #ifdef COMPILE_USE_QT4 setWidget(m_pBase); @@ -500,7 +498,7 @@ KviClassicTaskBar::KviClassicTaskBar() #ifndef COMPILE_USE_QT4 setResizeEnabled( true ); - connect(this,SIGNAL(orientationChanged(Orientation)),this,SLOT(orientationChangedSlot(Orientation))); + connect(this,TQT_SIGNAL(orientationChanged(Qt::Orientation)),this,TQT_SLOT(orientationChangedSlot(Qt::Orientation))); #endif } @@ -519,11 +517,11 @@ void KviClassicTaskBar::orientationChangedSlot(Qt::Orientation o) } /* -void KviClassicTaskBar::fontChange(const QFont &old) +void KviClassicTaskBar::fontChange(const TQFont &old) { calcButtonHeight(); doLayout(); - QToolBar::fontChange(old); + TQToolBar::fontChange(old); } */ @@ -538,7 +536,7 @@ void KviClassicTaskBar::updateActivityMeter() void KviClassicTaskBar::calcButtonHeight() { - QFontMetrics fm(KVI_OPTION_FONT(KviOption_fontTaskbar)); + TQFontMetrics fm(KVI_OPTION_FONT(KviOption_fontTaskbar)); m_iButtonHeight = fm.lineSpacing() + 6; if(m_iButtonHeight < 22)m_iButtonHeight = 22; if(KVI_OPTION_BOOL(KviOption_boolUseTaskBarIrcContextIndicator)) @@ -569,7 +567,7 @@ void KviClassicTaskBar::insertButton(KviTaskBarButton * b) { // same type! // sort by name - if(!KVI_OPTION_BOOL(KviOption_boolSortTaskBarItemsByName) || (KviQString::cmpCI(btn->kviWindow()->windowName(),b->kviWindow()->windowName()) > 0)) + if(!KVI_OPTION_BOOL(KviOption_boolSortTaskBarItemsByName) || (KviTQString::cmpCI(btn->kviWindow()->windowName(),b->kviWindow()->windowName()) > 0)) { // got a "higher one" m_pButtonList->insert(idx,b); @@ -658,19 +656,19 @@ void KviClassicTaskBar::doLayout() } #ifdef COMPILE_USE_QT4 - if(isFloating() || ((g_pFrame->dockWidgetArea(this) != Qt::BottomDockWidgetArea) && (g_pFrame->dockWidgetArea(this) != Qt::TopDockWidgetArea))) + if(isFloating() || ((g_pFrame->dockWidgetArea(this) != TQt::BottomDockWidgetArea) && (g_pFrame->dockWidgetArea(this) != TQt::TopDockWidgetArea))) { - QDockWidget::DockWidgetFeatures f = features(); - if(f & QDockWidget::DockWidgetVerticalTitleBar) + TQDockWidget::DockWidgetFeatures f = features(); + if(f & TQDockWidget::DockWidgetVerticalTitleBar) { - f &= ~QDockWidget::DockWidgetVerticalTitleBar; + f &= ~TQDockWidget::DockWidgetVerticalTitleBar; setFeatures(f); } } else { - QDockWidget::DockWidgetFeatures f = features(); - if(!(f & QDockWidget::DockWidgetVerticalTitleBar)) + TQDockWidget::DockWidgetFeatures f = features(); + if(!(f & TQDockWidget::DockWidgetVerticalTitleBar)) { - f |= QDockWidget::DockWidgetVerticalTitleBar; + f |= TQDockWidget::DockWidgetVerticalTitleBar; setFeatures(f); } } @@ -740,7 +738,7 @@ void KviClassicTaskBar::applyOptions() doLayout(); } -void KviClassicTaskBar::resizeEvent(QResizeEvent *e) +void KviClassicTaskBar::resizeEvent(TQResizeEvent *e) { /* #ifdef COMPILE_USE_QT4 @@ -779,7 +777,7 @@ inline KviTaskBarItem * KviClassicTaskBar::prevItem(void) inline bool KviClassicTaskBar::setIterationPointer(KviTaskBarItem * it) { - return (m_pButtonList->findRef((const KviTaskBarButton *)it) != -1); + return (m_pButtonList->tqfindRef((const KviTaskBarButton *)it) != -1); } @@ -794,8 +792,8 @@ KviTreeTaskBarItem::KviTreeTaskBarItem(KviTalListView * par,KviWindow * wnd) m_iStepNumber=0; m_bIncreasing=0; m_pInternal=new KviTreeTaskBarItemInternal(this); - m_pAnimTimer=new QTimer(); - QObject::connect( m_pAnimTimer, SIGNAL(timeout()), m_pInternal, SLOT(timerShot())); + m_pAnimTimer=new TQTimer(); + TQObject::connect( m_pAnimTimer, TQT_SIGNAL(timeout()), m_pInternal, TQT_SLOT(timerShot())); applyOptions(); } @@ -805,8 +803,8 @@ KviTreeTaskBarItem::KviTreeTaskBarItem(KviTreeTaskBarItem * par,KviWindow * wnd) m_iStepNumber=0; m_bIncreasing=0; m_pInternal=new KviTreeTaskBarItemInternal(this); - m_pAnimTimer=new QTimer(); - QObject::connect( m_pAnimTimer, SIGNAL(timeout()), m_pInternal, SLOT(timerShot())); + m_pAnimTimer=new TQTimer(); + TQObject::connect( m_pAnimTimer, TQT_SIGNAL(timeout()), m_pInternal, TQT_SLOT(timerShot())); applyOptions(); } @@ -835,7 +833,7 @@ void KviTreeTaskBarItem::applyOptions() void KviTreeTaskBarItem::captionChanged() { // FIXME: can we do better ? - repaint(); + tqrepaint(); } void KviTreeTaskBarItem::unhighlight() @@ -843,7 +841,7 @@ void KviTreeTaskBarItem::unhighlight() if(m_iHighlightLevel < 1)return; m_iHighlightLevel = 0; if(g_pFrame->dockExtension())g_pFrame->dockExtension()->refresh(); - repaint(); + tqrepaint(); } void KviTreeTaskBarItem::highlight(int iLevel) @@ -853,14 +851,14 @@ void KviTreeTaskBarItem::highlight(int iLevel) m_iHighlightLevel = iLevel; if(g_pFrame->dockExtension())g_pFrame->dockExtension()->refresh(); if(isSelected())return; - repaint(); // repaint(false) ? + tqrepaint(); // tqrepaint(false) ? } void KviTreeTaskBarItem::setProgress(int progress) { if(progress == m_iProgress)return; m_iProgress = progress; - repaint(); // repaint(false) ? + tqrepaint(); // tqrepaint(false) ? } void KviTreeTaskBarItem::setActive(bool bActive) @@ -870,7 +868,7 @@ void KviTreeTaskBarItem::setActive(bool bActive) // m_bHighlighted = false; // m_bAltColor = false; m_iHighlightLevel = 0; - // was not selected: the listView will repaint it + // was not selected: the listView will tqrepaint it } else { if(isSelected()) { @@ -878,26 +876,26 @@ void KviTreeTaskBarItem::setActive(bool bActive) // m_bHighlighted = false; // m_bAltColor = false; m_iHighlightLevel = 0; - // was selected: the list view will repaint it + // was selected: the list view will tqrepaint it } } } #ifdef COMPILE_USE_QT4 -void KviTreeTaskBarItem::paintBranches(QPainter *p,const QColorGroup &,int w,int y,int h) +void KviTreeTaskBarItem::paintBranches(TQPainter *p,const TQColorGroup &,int w,int y,int h) #else -void KviTreeTaskBarItem::paintBranches(QPainter *p,const QColorGroup &,int w,int y,int h,GUIStyle s) +void KviTreeTaskBarItem::paintBranches(TQPainter *p,const TQColorGroup &,int w,int y,int h,GUIStyle s) #endif { SET_ANTI_ALIASING(*p); - ((KviTreeTaskBarListView *)listView())->paintEmptyArea(p,QRect(0,y,w,totalHeight() - height())); + ((KviTreeTaskBarListView *)listView())->paintEmptyArea(p,TQRect(0,y,w,totalHeight() - height())); } -void KviTreeTaskBarItem::paintCell(QPainter *painter,const QColorGroup &cg,int column,int width,int) +void KviTreeTaskBarItem::paintCell(TQPainter *painter,const TQColorGroup &cg,int column,int width,int) { KviDoubleBuffer db(width,height()); - QPixmap * pMemBuffer = db.pixmap(); - QPainter p(pMemBuffer); + TQPixmap * pMemBuffer = db.pixmap(); + TQPainter p(pMemBuffer); SET_ANTI_ALIASING(p); if(isSelected()) @@ -909,7 +907,7 @@ void KviTreeTaskBarItem::paintCell(QPainter *painter,const QColorGroup &cg,int c #ifdef COMPILE_PSEUDO_TRANSPARENCY if(g_pShadedChildGlobalDesktopBackground) { - QPoint pnt = listView()->viewport()->mapToGlobal(QPoint(int(painter->worldMatrix().dx()),int(painter->worldMatrix().dy()))); + TQPoint pnt = listView()->viewport()->mapToGlobal(TQPoint(int(painter->tqworldMatrix().dx()),int(painter->tqworldMatrix().dy()))); p.drawTiledPixmap(0,0,width,height(),*g_pShadedChildGlobalDesktopBackground,pnt.x(),pnt.y()); } else { #endif @@ -917,19 +915,19 @@ void KviTreeTaskBarItem::paintCell(QPainter *painter,const QColorGroup &cg,int c #ifdef COMPILE_PSEUDO_TRANSPARENCY } #endif - QPixmap * pix = KVI_OPTION_PIXMAP(KviOption_pixmapTreeTaskBarBackground).pixmap(); + TQPixmap * pix = KVI_OPTION_PIXMAP(KviOption_pixmapTreeTaskBarBackground).pixmap(); if(pix) { - QPoint pnt = listView()->viewportToContents(QPoint(int(painter->worldMatrix().dx()),int(painter->worldMatrix().dy()))); + TQPoint pnt = listView()->viewportToContents(TQPoint(int(painter->tqworldMatrix().dx()),int(painter->tqworldMatrix().dy()))); //p.drawTiledPixmap(0,0,width,height(),*pix,pnt.x(),pnt.y()); // debug("%i %i",pnt.x(),pnt.y()); p.translate(-pnt.x(),-pnt.y()); - KviPixmapUtils::drawPixmapWithPainter(&p,pix,KVI_OPTION_UINT(KviOption_uintTreeTaskBarPixmapAlign),QRect(pnt.x(),pnt.y(),width,height()),listView()->width(),listView()->height()); + KviPixmapUtils::drawPixmapWithPainter(&p,pix,KVI_OPTION_UINT(KviOption_uintTreeTaskBarPixmapAlign),TQRect(pnt.x(),pnt.y(),width,height()),listView()->width(),listView()->height()); p.translate(pnt.x(),pnt.y()); } } else { p.fillRect(0,0,width,height(), - QColor(KVI_OPTION_COLOR(KviOption_colorTreeTaskBarBackground).red()+m_iRedDiff*m_iStepNumber, + TQColor(KVI_OPTION_COLOR(KviOption_colorTreeTaskBarBackground).red()+m_iRedDiff*m_iStepNumber, KVI_OPTION_COLOR(KviOption_colorTreeTaskBarBackground).green()+m_iGreenDiff*m_iStepNumber, KVI_OPTION_COLOR(KviOption_colorTreeTaskBarBackground).blue()+m_iBlueDiff*m_iStepNumber ) @@ -942,9 +940,9 @@ void KviTreeTaskBarItem::paintCell(QPainter *painter,const QColorGroup &cg,int c int im = listView()->itemMargin(); int yPixmap = (h - 16) >> 1; - QString szText; + TQString szText; - QRect cRect(im + 3,0,width - (im << 1),height()); + TQRect cRect(im + 3,0,width - (im << 1),height()); switch(m_pWindow->type()) { @@ -952,8 +950,8 @@ void KviTreeTaskBarItem::paintCell(QPainter *painter,const QColorGroup &cg,int c { if(KVI_OPTION_BOOL(KviOption_boolUseTaskBarIrcContextIndicator)) { - QColor base = cg.background(); - QColor cntx = KVI_OPTION_ICCOLOR(m_pWindow->console()->ircContextId() % KVI_NUM_ICCOLOR_OPTIONS); + TQColor base = cg.background(); + TQColor cntx = KVI_OPTION_ICCOLOR(m_pWindow->console()->ircContextId() % KVI_NUM_ICCOLOR_OPTIONS); base.setRgb((base.red() + cntx.red()) >> 1,(base.green() + cntx.green()) >> 1, (base.blue() + cntx.blue()) >> 1); p.fillRect(im + 2,yPixmap + 1,14,15,base); @@ -972,7 +970,7 @@ void KviTreeTaskBarItem::paintCell(QPainter *painter,const QColorGroup &cg,int c cRect.setLeft(cRect.left() + 17); } } - QFont f = QFont(); + TQFont f = TQFont(); f.setBold(true); p.setFont(f); KviTaskBarBase::getTextForConsole(szText,(KviConsole *)m_pWindow); @@ -987,8 +985,8 @@ void KviTreeTaskBarItem::paintCell(QPainter *painter,const QColorGroup &cg,int c cRect.setLeft(cRect.left() + 17); } break; - case KVI_WINDOW_TYPE_QUERY: - case KVI_WINDOW_TYPE_DEADQUERY: + case KVI_WINDOW_TYPE_TQUERY: + case KVI_WINDOW_TYPE_DEADTQUERY: szText = m_pWindow->windowName(); if(KVI_OPTION_BOOL(KviOption_boolUseTaskBarIcons)) { @@ -1039,7 +1037,7 @@ void KviTreeTaskBarItem::paintCell(QPainter *painter,const QColorGroup &cg,int c default: iLevel = KviOption_colorTreeTaskBarHighlight5Foreground; break; } p.setPen( - QColor( + TQColor( calculateColor(KVI_OPTION_COLOR(iLevel).red(),KVI_OPTION_COLOR(KviOption_colorTreeTaskBarActiveForeground).red()), calculateColor(KVI_OPTION_COLOR(iLevel).green(),KVI_OPTION_COLOR(KviOption_colorTreeTaskBarActiveForeground).green()), calculateColor(KVI_OPTION_COLOR(iLevel).blue(),KVI_OPTION_COLOR(KviOption_colorTreeTaskBarActiveForeground).blue()) @@ -1049,21 +1047,21 @@ void KviTreeTaskBarItem::paintCell(QPainter *painter,const QColorGroup &cg,int c if(m_pWindow->isMinimized()) { - QString tmp = QChar('('); + TQString tmp = TQChar('('); tmp += szText; - tmp += QChar(')'); - p.drawText(cRect,Qt::AlignLeft | Qt::AlignVCenter,tmp,-1,0); + tmp += TQChar(')'); + p.drawText(cRect,TQt::AlignLeft | TQt::AlignVCenter,tmp,-1,0); } else { - p.drawText(cRect,Qt::AlignLeft | Qt::AlignVCenter,szText,-1,0); + p.drawText(cRect,TQt::AlignLeft | TQt::AlignVCenter,szText,-1,0); } painter->drawPixmap(0,0,*pMemBuffer,0,0,width,height()); - //bitBlt(painter->pixmap(),0,0,pMemBuffer,0,0,width,height(),Qt::CopyROP,false); + //bitBlt(painter->pixmap(),0,0,pMemBuffer,0,0,width,height(),TQt::CopyROP,false); } -QString KviTreeTaskBarItem::key(int,bool) const +TQString KviTreeTaskBarItem::key(int,bool) const { - QString ret = m_pWindow->typeString(); + TQString ret = m_pWindow->typeString(); ret.append(m_pWindow->windowName()); return ret; } @@ -1083,7 +1081,7 @@ void KviTreeTaskBarItem::timerShot() m_pAnimTimer->stop(); m_iStepNumber=0; //make shure, that we cannot get out of range } - repaint(); + tqrepaint(); } void KviTreeTaskBarItem::mouseEnter() @@ -1110,7 +1108,7 @@ void KviTreeTaskBarItem::mouseLeave() // -KviTreeTaskBarListView::KviTreeTaskBarListView(QWidget * par) +KviTreeTaskBarListView::KviTreeTaskBarListView(TQWidget * par) : KviTalListView(par) { //setSorting(0); @@ -1126,7 +1124,7 @@ KviTreeTaskBarListView::~KviTreeTaskBarListView() { } -void KviTreeTaskBarListView::contentsMouseMoveEvent ( QMouseEvent * e ) +void KviTreeTaskBarListView::contentsMouseMoveEvent ( TQMouseEvent * e ) { if(!e) return; KviTreeTaskBarItem* pCur=(KviTreeTaskBarItem*)(itemAt(contentsToViewport(e->pos()))); @@ -1134,21 +1132,21 @@ void KviTreeTaskBarListView::contentsMouseMoveEvent ( QMouseEvent * e ) { if(m_pPrevItem)m_pPrevItem->mouseLeave(); if(pCur) pCur->mouseEnter(); - setCursor(Qt::PointingHandCursor); + setCursor(TQt::PointingHandCursor); m_pPrevItem=pCur; } else if(!pCur) { - setCursor(Qt::ArrowCursor); + setCursor(TQt::ArrowCursor); } } -void KviTreeTaskBarListView::leaveEvent(QEvent *) +void KviTreeTaskBarListView::leaveEvent(TQEvent *) { if(m_pPrevItem) m_pPrevItem->mouseLeave(); m_pPrevItem=0; - setCursor(Qt::ArrowCursor); + setCursor(TQt::ArrowCursor); } -void KviTreeTaskBarListView::contentsMousePressEvent(QMouseEvent *e) +void KviTreeTaskBarListView::contentsMousePressEvent(TQMouseEvent *e) { KviTalListViewItem * it = (KviTalListViewItem *)itemAt(contentsToViewport(e->pos())); if(it) @@ -1159,9 +1157,9 @@ void KviTreeTaskBarListView::contentsMousePressEvent(QMouseEvent *e) if(e->button() & Qt::RightButton) { KviTalPopupMenu* pPopup=new KviTalPopupMenu(); - pPopup->insertItem(__tr2qs("Sort"),this,SLOT(sort())); - pPopup->insertItem(__tr2qs("Reverse Sort"),this,SLOT(reverseSort())); - pPopup->popup(QCursor::pos()); + pPopup->insertItem(__tr2qs("Sort"),this,TQT_SLOT(sort())); + pPopup->insertItem(__tr2qs("Reverse Sort"),this,TQT_SLOT(reverseSort())); + pPopup->popup(TQCursor::pos()); } } } @@ -1176,25 +1174,25 @@ void KviTreeTaskBarListView::reverseSort() setSorting(0,FALSE); } -void KviTreeTaskBarListView::resizeEvent(QResizeEvent *e) +void KviTreeTaskBarListView::resizeEvent(TQResizeEvent *e) { KviTalListView::resizeEvent(e); setColumnWidth(0,viewport()->width()); resizeContents(viewport()->width(),contentsHeight()); } -//void KviTreeTaskBarListView::paintEmptyAreaInternal(QPainter * p,const QRect &viewportRect,const QRect &painterRect) +//void KviTreeTaskBarListView::paintEmptyAreaInternal(TQPainter * p,const TQRect &viewportRect,const TQRect &painterRect) //{ // //} -void KviTreeTaskBarListView::paintEmptyArea(QPainter * p,const QRect &rct) +void KviTreeTaskBarListView::paintEmptyArea(TQPainter * p,const TQRect &rct) { SET_ANTI_ALIASING(*p); #ifdef COMPILE_PSEUDO_TRANSPARENCY if(g_pShadedChildGlobalDesktopBackground) { - QPoint pnt = viewport()->mapToGlobal(QPoint(rct.x() + int(p->worldMatrix().dx()),rct.y() + int(p->worldMatrix().dy()))); + TQPoint pnt = viewport()->mapToGlobal(TQPoint(rct.x() + int(p->tqworldMatrix().dx()),rct.y() + int(p->tqworldMatrix().dy()))); p->drawTiledPixmap(rct.x(),rct.y(),rct.width(),rct.height(),*g_pShadedChildGlobalDesktopBackground,pnt.x(),pnt.y()); } else { #endif @@ -1203,10 +1201,10 @@ void KviTreeTaskBarListView::paintEmptyArea(QPainter * p,const QRect &rct) } #endif - QPixmap * pix = KVI_OPTION_PIXMAP(KviOption_pixmapTreeTaskBarBackground).pixmap(); + TQPixmap * pix = KVI_OPTION_PIXMAP(KviOption_pixmapTreeTaskBarBackground).pixmap(); if(pix) { - QPoint pnt = viewportToContents(QPoint(rct.x() + int(p->worldMatrix().dx()),rct.y() + int(p->worldMatrix().dy()))); + TQPoint pnt = viewportToContents(TQPoint(rct.x() + int(p->tqworldMatrix().dx()),rct.y() + int(p->tqworldMatrix().dy()))); //p->drawTiledPixmap(rct.x(),rct.y(),rct.width(),rct.height(),*pix,pnt.x(),pnt.y()); KviPixmapUtils::drawPixmapWithPainter(p,pix,KVI_OPTION_UINT(KviOption_uintTreeTaskBarPixmapAlign),rct,viewport()->width(),viewport()->height(),pnt.x(),pnt.y()); } @@ -1237,7 +1235,7 @@ KviTreeTaskBar::KviTreeTaskBar() // FIXME: this code is useless ? if(KVI_OPTION_UINT(KviOption_uintTreeTaskBarMinimumWidth) < 48) KVI_OPTION_UINT(KviOption_uintTreeTaskBarMinimumWidth) = 48; - int iMin = m_pListView->minimumSize().width() + 4; + int iMin = m_pListView->tqminimumSize().width() + 4; if(((unsigned int)iMin) < KVI_OPTION_UINT(KviOption_uintTreeTaskBarMinimumWidth)) iMin = KVI_OPTION_UINT(KviOption_uintTreeTaskBarMinimumWidth); setMinimumWidth(iMin); @@ -1249,15 +1247,15 @@ KviTreeTaskBar::KviTreeTaskBar() //m_pListView->setMinimumWidth(KVI_OPTION_UINT(KviOption_uintTreeTaskBarMinimumWidth)); //m_pListView->setMaximumWidth(KVI_OPTION_UINT(KviOption_uintTreeTaskBarMaximumWidth)); #ifdef COMPILE_USE_QT4 - m_pListView->setFocusPolicy(Qt::NoFocus); + m_pListView->setFocusPolicy(TTQ_NoFocus); #else - m_pListView->setFocusPolicy(QWidget::NoFocus); + m_pListView->setFocusPolicy(TQ_NoFocus); #endif m_pListView->setStaticBackground(true); #ifdef COMPILE_USE_QT4 m_pListView->viewport()->setAutoFillBackground(false); #else - m_pListView->viewport()->setBackgroundMode(QWidget::NoBackground); + m_pListView->viewport()->setBackgroundMode(TQWidget::NoBackground); #endif if(!KVI_OPTION_BOOL(KviOption_boolShowTreeTaskbarHeader)) { @@ -1272,14 +1270,12 @@ KviTreeTaskBar::KviTreeTaskBar() m_pListView->viewport()->installEventFilter(this); -#if QT_VERSION >= 300 #ifndef COMPILE_USE_QT4 setResizeEnabled(true); -#endif #endif m_pToolTip = new KviDynamicToolTip(m_pListView->viewport(),"tree_taskbar_tooltip"); - connect(m_pToolTip,SIGNAL(tipRequest(KviDynamicToolTip *,const QPoint &)),this,SLOT(tipRequest(KviDynamicToolTip *,const QPoint &))); + connect(m_pToolTip,TQT_SIGNAL(tipRequest(KviDynamicToolTip *,const TQPoint &)),this,TQT_SLOT(tipRequest(KviDynamicToolTip *,const TQPoint &))); } KviTreeTaskBar::~KviTreeTaskBar() @@ -1293,34 +1289,34 @@ void KviTreeTaskBar::updatePseudoTransparency() #endif } -void KviTreeTaskBar::moveEvent(QMoveEvent *) +void KviTreeTaskBar::moveEvent(TQMoveEvent *) { #ifdef COMPILE_PSEUDO_TRANSPARENCY updatePseudoTransparency(); #endif } -void KviTreeTaskBar::tipRequest(KviDynamicToolTip *,const QPoint &pnt) +void KviTreeTaskBar::tipRequest(KviDynamicToolTip *,const TQPoint &pnt) { if(KVI_OPTION_BOOL(KviOption_boolShowTaskBarToolTips)) { KviTalListViewItem * it = (KviTalListViewItem *)m_pListView->itemAt(pnt); if(it) { - QString szText; + TQString szText; ((KviTreeTaskBarItem *)it)->m_pWindow->getTaskBarTipText(szText); - m_pToolTip->tip(m_pListView->itemRect(it),szText); + m_pToolTip->tip(m_pListView->tqitemRect(it),szText); } } } -bool KviTreeTaskBar::eventFilter(QObject * o,QEvent *e) +bool KviTreeTaskBar::eventFilter(TQObject * o,TQEvent *e) { - if(o == m_pListView->viewport()) + if(TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(m_pListView->viewport())) { - if(e->type() == QEvent::MouseButtonPress) + if(e->type() == TQEvent::MouseButtonPress) { - QMouseEvent * ev = (QMouseEvent *)e; + TQMouseEvent * ev = (TQMouseEvent *)e; KviTreeTaskBarItem * it = (KviTreeTaskBarItem *)m_pListView->itemAt(ev->pos()); if(!it)return false; KviWindow * wnd = it->kviWindow(); @@ -1328,7 +1324,7 @@ bool KviTreeTaskBar::eventFilter(QObject * o,QEvent *e) { if(ev->button() & Qt::LeftButton) { - if(ev->state() & Qt::ShiftButton) + if(ev->state() & TQt::ShiftButton) { wnd->delayedClose(); } else { @@ -1377,9 +1373,9 @@ void KviTreeTaskBar::setActiveItem(KviTaskBarItem * it) { cur->setActive(false); } - if(((KviTreeTaskBarItem *)it)->parent()) + if(((KviTreeTaskBarItem *)it)->tqparent()) { - if(!((KviTreeTaskBarItem *)it)->parent()->isOpen())((KviTreeTaskBarItem *)it)->parent()->setOpen(true); + if(!((KviTreeTaskBarItem *)it)->tqparent()->isOpen())((KviTreeTaskBarItem *)it)->tqparent()->setOpen(true); } ((KviTreeTaskBarItem *)it)->setActive(true); m_pListView->setSelected(((KviTreeTaskBarItem *)it),true); // this MUST go after it->setActive() @@ -1409,15 +1405,15 @@ KviTaskBarItem * KviTreeTaskBar::nextItem() { m_pCurrentItem = (KviTreeTaskBarItem *)m_pCurrentItem->firstChild(); } else { - // this item has no children: try the next sibling + // this item has no tqchildren: try the next sibling if(m_pCurrentItem->nextSibling()) { m_pCurrentItem = (KviTreeTaskBarItem *)m_pCurrentItem->nextSibling(); } else { - if(m_pCurrentItem->parent()) + if(m_pCurrentItem->tqparent()) { - // child with not siblings : try the sibling of the parent - m_pCurrentItem = (KviTreeTaskBarItem *)m_pCurrentItem->parent()->nextSibling(); + // child with not siblings : try the sibling of the tqparent + m_pCurrentItem = (KviTreeTaskBarItem *)m_pCurrentItem->tqparent()->nextSibling(); } else { m_pCurrentItem = 0; // toplevel with no siblings } @@ -1432,10 +1428,10 @@ KviTaskBarItem * KviTreeTaskBar::prevItem() if(!m_pCurrentItem)return 0; - if(m_pCurrentItem->parent()) + if(m_pCurrentItem->tqparent()) { // a child item - it = (KviTreeTaskBarItem *)m_pCurrentItem->parent()->firstChild(); + it = (KviTreeTaskBarItem *)m_pCurrentItem->tqparent()->firstChild(); while(it) { @@ -1444,7 +1440,7 @@ KviTaskBarItem * KviTreeTaskBar::prevItem() } if(!it) { - it = (KviTreeTaskBarItem *)m_pCurrentItem->parent(); + it = (KviTreeTaskBarItem *)m_pCurrentItem->tqparent(); } } else { diff --git a/src/kvirc/ui/kvi_taskbar.h b/src/kvirc/ui/kvi_taskbar.h index 300e0f68..9e9ebe29 100644 --- a/src/kvirc/ui/kvi_taskbar.h +++ b/src/kvirc/ui/kvi_taskbar.h @@ -27,16 +27,16 @@ #include "kvi_settings.h" #include "kvi_pointerlist.h" -#include +#include #include "kvi_tal_tooltip.h" #include "kvi_tal_listview.h" -#include +#include class KviWindow; class KviFrame; -class QPixmap; +class TQPixmap; class KviDynamicToolTip; class KviConsole; @@ -74,28 +74,29 @@ public: // This is the basic interface that all the external classes should see // -// Please note that Qt3 moc skips the *_SKIP_BEGIN -> *_SKIP_END blocks -// while the Qt4 moc skips the Q_MOC_RUN ifdef block.. so... +// Please note that TQt3 tqmoc skips the *_SKIP_BEGIN -> *_SKIP_END blocks +// while the TQt4 tqmoc skips the TQ_TQMOC_RUN ifdef block.. so... -// Qt4 version +// TQt4 version // If you get failures (undefined references) in some non-autotools based -// build system that uses Qt4 then you must add the -DCOMPILE_USE_QT4 -// commandline parameter to moc (at leat) when parsing this file. +// build system that uses TQt4 then you must add the -DCOMPILE_USE_QT4 +// commandline parameter to tqmoc (at leat) when parsing this file. -// MOC_SKIP_BEGIN +// TQMOC_SKIP_BEGIN #ifdef COMPILE_USE_QT4 -#include +#include -class KVIRC_API KviTaskBarBase : public QDockWidget +class KVIRC_API KviTaskBarBase : public TQDockWidget { Q_OBJECT + TQ_OBJECT #endif //COMPILE_USE_QT4 -// MOC_SKIP_END +// TQMOC_SKIP_END -// Qt3 version -#ifndef Q_MOC_RUN +// TQt3 version +#ifndef TQ_TQMOC_RUN #ifndef COMPILE_USE_QT4 #include "kvi_toolbar.h" @@ -103,6 +104,7 @@ class KVIRC_API KviTaskBarBase : public QDockWidget class KVIRC_API KviTaskBarBase : public KviToolBar { Q_OBJECT + TQ_OBJECT #endif #endif @@ -111,7 +113,7 @@ public: virtual ~KviTaskBarBase(); protected: KviFrame * m_pFrm; - QTimer * m_pActivityMeterTimer; + TQTimer * m_pActivityMeterTimer; public: virtual KviTaskBarItem * addItem(KviWindow *){ return 0; }; virtual bool removeItem(KviTaskBarItem *){ return false; }; @@ -125,7 +127,7 @@ public: virtual void switchWindow(bool bNext,bool bInContextOnly); virtual void updatePseudoTransparency(){}; virtual void applyOptions(){}; - static void getTextForConsole(QString &szText,KviConsole * pConsole); + static void getTextForConsole(TQString &szText,KviConsole * pConsole); protected slots: virtual void updateActivityMeter(); }; @@ -138,24 +140,23 @@ protected slots: class KviClassicTaskBar; -class KVIRC_API KviTaskBarButton : public QPushButton , KviTaskBarItem +class KVIRC_API KviTaskBarButton : public TQPushButton , KviTaskBarItem { friend class KviClassicTaskBar; Q_OBJECT + TQ_OBJECT public: - KviTaskBarButton(QWidget * par,KviWindow * wnd,const char * name); + KviTaskBarButton(TQWidget * par,KviWindow * wnd,const char * name); ~KviTaskBarButton(); protected: bool m_bActive; KviDynamicToolTip * m_pTip; protected: - virtual void mousePressEvent(QMouseEvent *e); -#if QT_VERSION >= 300 - virtual void contextMenuEvent(QContextMenuEvent *e); -#endif - virtual void drawButtonLabel(QPainter *p); + virtual void mousePressEvent(TQMouseEvent *e); + virtual void contextMenuEvent(TQContextMenuEvent *e); + virtual void drawButtonLabel(TQPainter *p); #ifdef COMPILE_USE_QT4 - virtual void paintEvent(QPaintEvent * e); + virtual void paintEvent(TQPaintEvent * e); #endif public: virtual bool active(){ return m_bActive; }; @@ -166,27 +167,28 @@ public: protected: void setActive(bool bActive); protected slots: - void tipRequest(KviDynamicToolTip *tip,const QPoint &pnt); + void tipRequest(KviDynamicToolTip *tip,const TQPoint &pnt); }; class KVIRC_API KviClassicTaskBar : public KviTaskBarBase { Q_OBJECT + TQ_OBJECT public: KviClassicTaskBar(); ~KviClassicTaskBar(); protected: KviPointerList * m_pButtonList; int m_iButtonHeight; - QWidget * m_pBase; + TQWidget * m_pBase; protected: void calcButtonHeight(); void doLayout(); // called by KviFrame to adjust a bug on WIndows void insertButton(KviTaskBarButton * b); public: -// virtual void fontChange(const QFont & old); - virtual void resizeEvent(QResizeEvent *e); +// virtual void fontChange(const TQFont & old); + virtual void resizeEvent(TQResizeEvent *e); public: virtual KviTaskBarItem * addItem(KviWindow *); virtual bool removeItem(KviTaskBarItem *); @@ -217,18 +219,18 @@ public: protected: int m_iStepNumber; bool m_bIncreasing; - QTimer* m_pAnimTimer; + TQTimer* m_pAnimTimer; KviTreeTaskBarItemInternal *m_pInternal; int m_iRedDiff; int m_iGreenDiff; int m_iBlueDiff; public: - virtual QString key(int column,bool) const; - virtual void paintCell(QPainter *p,const QColorGroup &cg,int column,int width,int alignment); + virtual TQString key(int column,bool) const; + virtual void paintCell(TQPainter *p,const TQColorGroup &cg,int column,int width,int tqalignment); #ifdef COMPILE_USE_QT4 - virtual void paintBranches(QPainter *p,const QColorGroup &cg,int w,int y,int h); + virtual void paintBranches(TQPainter *p,const TQColorGroup &cg,int w,int y,int h); #else - virtual void paintBranches(QPainter *p,const QColorGroup &cg,int w,int y,int h,GUIStyle s); + virtual void paintBranches(TQPainter *p,const TQColorGroup &cg,int w,int y,int h,GUIStyle s); #endif virtual void captionChanged(); virtual void highlight(int iLevel = 1); @@ -244,9 +246,10 @@ protected: int calculateColor(int col1,int col2); }; -class KviTreeTaskBarItemInternal : public QObject +class KviTreeTaskBarItemInternal : public TQObject { Q_OBJECT + TQ_OBJECT public: KviTreeTaskBarItemInternal(KviTreeTaskBarItem* pItem):m_pItem(pItem) {}; ~KviTreeTaskBarItemInternal() {}; @@ -260,16 +263,17 @@ class KVIRC_API KviTreeTaskBarListView : public KviTalListView { friend class KviTreeTaskBarItem; Q_OBJECT + TQ_OBJECT KviTreeTaskBarItem* m_pPrevItem; public: - KviTreeTaskBarListView(QWidget * par); + KviTreeTaskBarListView(TQWidget * par); ~KviTreeTaskBarListView(); protected: - virtual void contentsMousePressEvent(QMouseEvent *e); - virtual void paintEmptyArea(QPainter * p,const QRect &rct); - virtual void resizeEvent(QResizeEvent *e); - virtual void contentsMouseMoveEvent ( QMouseEvent * e ); - virtual void leaveEvent(QEvent *); + virtual void contentsMousePressEvent(TQMouseEvent *e); + virtual void paintEmptyArea(TQPainter * p,const TQRect &rct); + virtual void resizeEvent(TQResizeEvent *e); + virtual void contentsMouseMoveEvent ( TQMouseEvent * e ); + virtual void leaveEvent(TQEvent *); signals: void leftMousePress(KviTalListViewItem * it); void rightMousePress(KviTalListViewItem * it); @@ -282,6 +286,7 @@ public slots: class KVIRC_API KviTreeTaskBar : public KviTaskBarBase { Q_OBJECT + TQ_OBJECT public: KviTreeTaskBar(); ~KviTreeTaskBar(); @@ -299,13 +304,13 @@ public: virtual KviTaskBarItem * prevItem(void); virtual bool setIterationPointer(KviTaskBarItem * it); virtual void updatePseudoTransparency(); - virtual bool eventFilter(QObject * o,QEvent *e); + virtual bool eventFilter(TQObject * o,TQEvent *e); virtual void updateActivityMeter(); virtual void applyOptions(); protected: - virtual void moveEvent(QMoveEvent *); + virtual void moveEvent(TQMoveEvent *); protected slots: - void tipRequest(KviDynamicToolTip *tip,const QPoint &pnt); + void tipRequest(KviDynamicToolTip *tip,const TQPoint &pnt); }; diff --git a/src/kvirc/ui/kvi_texticonwin.cpp b/src/kvirc/ui/kvi_texticonwin.cpp index bd480785..fed0535c 100644 --- a/src/kvirc/ui/kvi_texticonwin.cpp +++ b/src/kvirc/ui/kvi_texticonwin.cpp @@ -33,18 +33,18 @@ #include "kvi_mirccntrl.h" #include "kvi_iconmanager.h" -#include -#include +#include +#include #include #ifdef COMPILE_USE_QT4 - #include + #include #endif KviTextIconWindow::KviTextIconWindow() #ifdef COMPILE_USE_QT4 -: KviTalIconView(0,Qt::Popup) +: KviTalIconView(0,TQt::Popup) #else -: KviTalIconView(0,Qt::WType_Popup) +: KviTalIconView(0,TQt::WType_Popup) #endif { m_iTimerId = -1; @@ -52,9 +52,9 @@ KviTextIconWindow::KviTextIconWindow() setFixedSize(KVI_TEXTICON_WIN_WIDTH,KVI_TEXTICON_WIN_HEIGHT); m_pOwner = 0; fill(); - connect(g_pTextIconManager,SIGNAL(changed()),this,SLOT(fill())); - connect(this,SIGNAL(doubleClicked( KviTalIconViewItem * )),this,SLOT(itemSelected(KviTalIconViewItem *))); - connect(this,SIGNAL(returnPressed ( KviTalIconViewItem * ) ),this,SLOT(itemSelected(KviTalIconViewItem *))); + connect(g_pTextIconManager,TQT_SIGNAL(changed()),this,TQT_SLOT(fill())); + connect(this,TQT_SIGNAL(doubleClicked( KviTalIconViewItem * )),this,TQT_SLOT(itemSelected(KviTalIconViewItem *))); + connect(this,TQT_SIGNAL(returnPressed ( KviTalIconViewItem * ) ),this,TQT_SLOT(itemSelected(KviTalIconViewItem *))); m_bAltMode = false; setWordWrapIconText(true); } @@ -73,11 +73,11 @@ KviTextIconWindow::~KviTextIconWindow() void KviTextIconWindow::fill() { clear(); - KviPointerHashTable * d = g_pTextIconManager->textIconDict(); - KviPointerHashTableIterator it(*d); + KviPointerHashTable * d = g_pTextIconManager->textIconDict(); + KviPointerHashTableIterator it(*d); while(KviTextIcon * i = it.current()) { - QPixmap *pix = i->pixmap(); + TQPixmap *pix = i->pixmap(); if(pix)insertItem(new KviTalIconViewItem(this,it.currentKey(),*pix)); ++it; } @@ -85,13 +85,13 @@ void KviTextIconWindow::fill() setCurrentItem(0); } -void KviTextIconWindow::popup(QWidget *owner,bool bAltMode) +void KviTextIconWindow::popup(TQWidget *owner,bool bAltMode) { - if(m_pOwner)disconnect(m_pOwner,SIGNAL(destroyed()),this,SLOT(ownerDead())); + if(m_pOwner)disconnect(m_pOwner,TQT_SIGNAL(destroyed()),this,TQT_SLOT(ownerDead())); m_pOwner = owner; m_szTypedSeq = ""; m_bAltMode = bAltMode; - connect(m_pOwner,SIGNAL(destroyed()),this,SLOT(ownerDead())); + connect(m_pOwner,TQT_SIGNAL(destroyed()),this,TQT_SLOT(ownerDead())); show(); } @@ -104,7 +104,7 @@ bool KviTextIconWindow::findTypedSeq() KviTalIconViewItem *item; for ( item = (KviTalIconViewItem *)firstItem(); item; item = (KviTalIconViewItem *)item->nextItem() ) { - QString szIt = item->text(); + TQString szIt = item->text(); int j; for(j=0;j<((int)(szIt.length()));j++) { @@ -128,25 +128,25 @@ got_mit: return bFullMax; } -void KviTextIconWindow::keyPressEvent(QKeyEvent *e) +void KviTextIconWindow::keyPressEvent(TQKeyEvent *e) { switch(e->key()) { - case Qt::Key_Up: - case Qt::Key_Down: - case Qt::Key_Left: - case Qt::Key_Right: - case Qt::Key_PageUp: - case Qt::Key_PageDown: - case Qt::Key_Return: + case TQt::Key_Up: + case TQt::Key_Down: + case TQt::Key_Left: + case TQt::Key_Right: + case TQt::Key_PageUp: + case TQt::Key_PageDown: + case TQt::Key_Return: KviTalIconView::keyPressEvent(e); return; break; - case Qt::Key_Escape: + case TQt::Key_Escape: doHide(); return; break; - case Qt::Key_Backspace: + case TQt::Key_Backspace: if(!m_szTypedSeq.isEmpty()) { m_szTypedSeq.remove(m_szTypedSeq.length() - 1,1); @@ -157,11 +157,11 @@ void KviTextIconWindow::keyPressEvent(QKeyEvent *e) } return; break; - case Qt::Key_Space: + case TQt::Key_Space: doHide(); if(findTypedSeq()) { - QString szItem = m_szTypedSeq; + TQString szItem = m_szTypedSeq; szItem.append(' '); if(m_pOwner) { @@ -169,12 +169,12 @@ void KviTextIconWindow::keyPressEvent(QKeyEvent *e) ((KviInputEditor *)m_pOwner)->insertText(szItem); else if(m_pOwner->inherits("KviInput")) ((KviInput *)m_pOwner)->insertText(szItem); - else if(m_pOwner->inherits("QLineEdit")) + else if(m_pOwner->inherits(TQLINEEDIT_OBJECT_NAME_STRING)) { - QString tmp = ((QLineEdit *)m_pOwner)->text(); - tmp.insert(((QLineEdit *)m_pOwner)->cursorPosition(),szItem); - ((QLineEdit *)m_pOwner)->setText(tmp); - ((QLineEdit *)m_pOwner)->setCursorPosition(((QLineEdit *)m_pOwner)->cursorPosition() + szItem.length()); + TQString tmp = ((TQLineEdit *)m_pOwner)->text(); + tmp.insert(((TQLineEdit *)m_pOwner)->cursorPosition(),szItem); + ((TQLineEdit *)m_pOwner)->setText(tmp); + ((TQLineEdit *)m_pOwner)->setCursorPosition(((TQLineEdit *)m_pOwner)->cursorPosition() + szItem.length()); } } } else { @@ -182,22 +182,22 @@ void KviTextIconWindow::keyPressEvent(QKeyEvent *e) } return; break; - case Qt::Key_Tab: + case TQt::Key_Tab: doHide(); findTypedSeq(); - QString szItem = m_szCurFullSeq; + TQString szItem = m_szCurFullSeq; szItem.append(' '); if(m_bAltMode)szItem.prepend(KVI_TEXT_ICON); if(m_pOwner->inherits("KviInputEditor")) ((KviInputEditor *)m_pOwner)->insertText(szItem); else if(m_pOwner->inherits("KviInput")) ((KviInput *)m_pOwner)->insertText(szItem); - else if(m_pOwner->inherits("QLineEdit")) + else if(m_pOwner->inherits(TQLINEEDIT_OBJECT_NAME_STRING)) { - QString tmp = ((QLineEdit *)m_pOwner)->text(); - tmp.insert(((QLineEdit *)m_pOwner)->cursorPosition(),szItem); - ((QLineEdit *)m_pOwner)->setText(tmp); - ((QLineEdit *)m_pOwner)->setCursorPosition(((QLineEdit *)m_pOwner)->cursorPosition() + szItem.length()); + TQString tmp = ((TQLineEdit *)m_pOwner)->text(); + tmp.insert(((TQLineEdit *)m_pOwner)->cursorPosition(),szItem); + ((TQLineEdit *)m_pOwner)->setText(tmp); + ((TQLineEdit *)m_pOwner)->setCursorPosition(((TQLineEdit *)m_pOwner)->cursorPosition() + szItem.length()); } return; break; @@ -223,10 +223,10 @@ void KviTextIconWindow::ownerDead() void KviTextIconWindow::show() { m_iTimerId = startTimer(50000); //50 sec ...seems enough - QWidget::show(); + TQWidget::show(); } -void KviTextIconWindow::timerEvent(QTimerEvent *) +void KviTextIconWindow::timerEvent(TQTimerEvent *) { doHide(); } @@ -246,26 +246,26 @@ void KviTextIconWindow::itemSelected(KviTalIconViewItem * item) { if(item) { -// debug("%i %i %i %s",m_pOwner->inherits("KviInputEditor"),m_pOwner->inherits("KviInput"),m_pOwner->inherits("QLineEdit"),m_pOwner->className()); +// debug("%i %i %i %s",m_pOwner->inherits("KviInputEditor"),m_pOwner->inherits("KviInput"),m_pOwner->inherits(TQLINEEDIT_OBJECT_NAME_STRING),m_pOwner->className()); doHide(); - QString szItem = item->text(); + TQString szItem = item->text(); szItem.append(' '); if(m_bAltMode)szItem.prepend(KVI_TEXT_ICON); if(m_pOwner->inherits("KviInputEditor")) ((KviInputEditor *)m_pOwner)->insertText(szItem); else if(m_pOwner->inherits("KviInput")) ((KviInput *)m_pOwner)->insertText(szItem); - else if(m_pOwner->inherits("QLineEdit")) + else if(m_pOwner->inherits(TQLINEEDIT_OBJECT_NAME_STRING)) { - QString tmp = ((QLineEdit *)m_pOwner)->text(); - tmp.insert(((QLineEdit *)m_pOwner)->cursorPosition(),szItem); - ((QLineEdit *)m_pOwner)->setText(tmp); - ((QLineEdit *)m_pOwner)->setCursorPosition(((QLineEdit *)m_pOwner)->cursorPosition() + szItem.length()); + TQString tmp = ((TQLineEdit *)m_pOwner)->text(); + tmp.insert(((TQLineEdit *)m_pOwner)->cursorPosition(),szItem); + ((TQLineEdit *)m_pOwner)->setText(tmp); + ((TQLineEdit *)m_pOwner)->setCursorPosition(((TQLineEdit *)m_pOwner)->cursorPosition() + szItem.length()); } } } -void KviTextIconWindow::mousePressEvent(QMouseEvent *e) +void KviTextIconWindow::mousePressEvent(TQMouseEvent *e) { if(e->pos().x() < 0)goto hideme; if(e->pos().x() > width())goto hideme; diff --git a/src/kvirc/ui/kvi_texticonwin.h b/src/kvirc/ui/kvi_texticonwin.h index 76a4a60e..83c9c3d6 100644 --- a/src/kvirc/ui/kvi_texticonwin.h +++ b/src/kvirc/ui/kvi_texticonwin.h @@ -36,25 +36,26 @@ class KVIRC_API KviTextIconWindow : public KviTalIconView { Q_OBJECT + TQ_OBJECT public: KviTextIconWindow(); ~KviTextIconWindow(); private: - QWidget * m_pOwner; - QString m_szTypedSeq; - QString m_szCurFullSeq; - bool m_bAltMode; // in alt mode the itemSelected() string contains + TQWidget * m_pOwner; + TQString m_szTypedSeq; + TQString m_szCurFullSeq; + bool m_bAltMode; // in alt mode the itemSelected() string tqcontains // also the CTRL+I escape code int m_iTimerId; public: - void popup(QWidget *owner,bool bAltMode = false); + void popup(TQWidget *owner,bool bAltMode = false); private: void doHide(); virtual void show(); bool findTypedSeq(); // returns true if it is a complete word - virtual void keyPressEvent(QKeyEvent *e); - virtual void mousePressEvent(QMouseEvent *); - virtual void timerEvent(QTimerEvent *); + virtual void keyPressEvent(TQKeyEvent *e); + virtual void mousePressEvent(TQMouseEvent *); + virtual void timerEvent(TQTimerEvent *); public slots: void fill(); void ownerDead(); diff --git a/src/kvirc/ui/kvi_themedlabel.cpp b/src/kvirc/ui/kvi_themedlabel.cpp index f9cf8e33..4d4243cc 100644 --- a/src/kvirc/ui/kvi_themedlabel.cpp +++ b/src/kvirc/ui/kvi_themedlabel.cpp @@ -26,16 +26,16 @@ #include "kvi_settings.h" #include "kvi_app.h" #include "kvi_window.h" -#include +#include #ifdef COMPILE_PSEUDO_TRANSPARENCY - extern QPixmap * g_pShadedChildGlobalDesktopBackground; + extern TQPixmap * g_pShadedChildGlobalDesktopBackground; #endif -KviThemedLabel::KviThemedLabel(QWidget * par,const char * name) -: QFrame(par,name) +KviThemedLabel::KviThemedLabel(TQWidget * par,const char * name) +: TQFrame(par,name) { - setFrameStyle(QFrame::Sunken | QFrame::StyledPanel); + setFrameStyle(TQFrame::Sunken | TQFrame::StyledPanel); applyOptions(); m_bAutoHeight=0; } @@ -44,34 +44,34 @@ KviThemedLabel::~KviThemedLabel() { } -/*QSize KviThemedLabel::sizeHint() +/*TQSize KviThemedLabel::tqsizeHint() { - QSize size=QFrame::sizeHint(); - int iHeight=fontMetrics().height()*QStringList::split('\n',m_szText).count()+4; + TQSize size=TQFrame::tqsizeHint(); + int iHeight=fontMetrics().height()*TQStringList::split('\n',m_szText).count()+4; size.setHeight(iHeight); return size; }*/ void KviThemedLabel::setText(const char * text) { - m_szText = QString(text); + m_szText = TQString(text); if(m_bAutoHeight) { - int iHeight=fontMetrics().height()*QStringList::split('\n',m_szText).count()+4; + int iHeight=fontMetrics().height()*TQStringList::split('\n',m_szText).count()+4; setMinimumHeight(iHeight); - //g_pApp->postEvent(parent(),new QEvent(QEvent::Resize)); + //g_pApp->postEvent(tqparent(),new TQEvent(TQEvent::Resize)); } update(); } -void KviThemedLabel::setText(const QString& text) +void KviThemedLabel::setText(const TQString& text) { m_szText = text; if(m_bAutoHeight) { - int iHeight=fontMetrics().height()*QStringList::split('\n',m_szText).count()+4; + int iHeight=fontMetrics().height()*TQStringList::split('\n',m_szText).count()+4; setMinimumHeight(iHeight); - //g_pApp->postEvent(parent(),new QEvent(QEvent::Resize)); + //g_pApp->postEvent(tqparent(),new TQEvent(TQEvent::Resize)); } update(); } @@ -83,15 +83,15 @@ void KviThemedLabel::applyOptions() } #ifdef COMPILE_USE_QT4 -void KviThemedLabel::paintEvent ( QPaintEvent * event ) +void KviThemedLabel::paintEvent ( TQPaintEvent * event ) { - QFrame::paintEvent(event); - QPainter p(this); + TQFrame::paintEvent(event); + TQPainter p(this); SET_ANTI_ALIASING(p); #ifdef COMPILE_PSEUDO_TRANSPARENCY if(g_pShadedChildGlobalDesktopBackground) { - QPoint pnt = mapToGlobal(contentsRect().topLeft()); + TQPoint pnt = mapToGlobal(contentsRect().topLeft()); p.drawTiledPixmap(contentsRect(),*g_pShadedChildGlobalDesktopBackground,pnt); } else { #endif @@ -107,20 +107,20 @@ void KviThemedLabel::paintEvent ( QPaintEvent * event ) } #endif - QRect r = contentsRect(); + TQRect r = contentsRect(); r.setLeft(r.left() + 2); // some margin p.setPen(KVI_OPTION_COLOR(KviOption_colorLabelForeground)); - p.drawText(r,Qt::AlignLeft | Qt::AlignVCenter,m_szText); + p.drawText(r,TQt::AlignLeft | TQt::AlignVCenter,m_szText); } #else -void KviThemedLabel::drawContents(QPainter *p) +void KviThemedLabel::drawContents(TQPainter *p) { #ifdef COMPILE_PSEUDO_TRANSPARENCY if(g_pShadedChildGlobalDesktopBackground) { - QPoint pnt = mapToGlobal(contentsRect().topLeft()); + TQPoint pnt = mapToGlobal(contentsRect().topLeft()); p->drawTiledPixmap(contentsRect(),*g_pShadedChildGlobalDesktopBackground,pnt); } else { #endif @@ -136,16 +136,16 @@ void KviThemedLabel::drawContents(QPainter *p) } #endif - QRect r = contentsRect(); + TQRect r = contentsRect(); r.setLeft(r.left() + 2); // some margin p->setPen(KVI_OPTION_COLOR(KviOption_colorLabelForeground)); - p->drawText(r,Qt::AlignLeft | Qt::AlignVCenter,m_szText); + p->drawText(r,TQt::AlignLeft | TQt::AlignVCenter,m_szText); } #endif -void KviThemedLabel::mouseDoubleClickEvent(QMouseEvent *) +void KviThemedLabel::mouseDoubleClickEvent(TQMouseEvent *) { emit doubleClicked(); } diff --git a/src/kvirc/ui/kvi_themedlabel.h b/src/kvirc/ui/kvi_themedlabel.h index b63e2386..a307149c 100644 --- a/src/kvirc/ui/kvi_themedlabel.h +++ b/src/kvirc/ui/kvi_themedlabel.h @@ -25,36 +25,37 @@ #include "kvi_settings.h" -#include +#include #include "kvi_string.h" -class KVIRC_API KviThemedLabel : public QFrame +class KVIRC_API KviThemedLabel : public TQFrame { Q_OBJECT - Q_PROPERTY(int TransparencyCapable READ dummyRead) + TQ_OBJECT + TQ_PROPERTY(int TransparencyCapable READ dummyRead) public: - KviThemedLabel(QWidget * par,const char * name); + KviThemedLabel(TQWidget * par,const char * name); ~KviThemedLabel(); private: - QString m_szText; + TQString m_szText; bool m_bAutoHeight; protected: #ifdef COMPILE_USE_QT4 - virtual void paintEvent ( QPaintEvent * event ); + virtual void paintEvent ( TQPaintEvent * event ); #else - virtual void drawContents(QPainter *p); + virtual void drawContents(TQPainter *p); #endif - virtual void mouseDoubleClickEvent(QMouseEvent *e); + virtual void mouseDoubleClickEvent(TQMouseEvent *e); public: int dummyRead() const { return 0; }; void setText(const char * text); - void setText(const QString& text); - QString text() { return m_szText; }; + void setText(const TQString& text); + TQString text() { return m_szText; }; void setAutoHeight(bool value) { m_bAutoHeight=value; }; void applyOptions(); -// QSize sizeHint(); +// TQSize tqsizeHint(); signals: void doubleClicked(); }; diff --git a/src/kvirc/ui/kvi_toolbar.cpp b/src/kvirc/ui/kvi_toolbar.cpp index 792f9fc0..7e62bf68 100644 --- a/src/kvirc/ui/kvi_toolbar.cpp +++ b/src/kvirc/ui/kvi_toolbar.cpp @@ -29,11 +29,11 @@ #include "kvi_locale.h" #include "kvi_app.h" -#include +#include #include "kvi_tal_popupmenu.h" #ifdef COMPILE_USE_QT4 - #include + #include #endif static KviTalPopupMenu * g_pToolBarContextPopup = 0; @@ -42,7 +42,7 @@ static KviTalPopupMenu * g_pToolBarIconSizesPopup = 0; static KviTalPopupMenu * g_pToolBarPositionsPopup = 0; -KviToolBar::KviToolBar(const QString &label,QT_TOOLBARDOCK_TYPE dock,bool bNewLine,const char * nam) +KviToolBar::KviToolBar(const TQString &label,TQT_TOOLBARDOCK_TYPE dock,bool bNewLine,const char * nam) : KviTalToolBar(label,g_pFrame,dock,bNewLine,nam) { } @@ -60,7 +60,7 @@ KviToolBar::~KviToolBar() g_pToolBarWindowsPopup = 0; } -void KviToolBar::mousePressEvent(QMouseEvent *e) +void KviToolBar::mousePressEvent(TQMouseEvent *e) { if(!(e->button() & Qt::RightButton)) { @@ -81,67 +81,63 @@ void KviToolBar::mousePressEvent(QMouseEvent *e) g_pFrame->fillToolBarsPopup(g_pToolBarWindowsPopup); g_pToolBarContextPopup->insertItem(__tr2qs("Toolbars"),g_pToolBarWindowsPopup); - g_pToolBarContextPopup->insertItem(__tr2qs("Orientation"),g_pToolBarPositionsPopup); + g_pToolBarContextPopup->insertItem(__tr2qs("Qt::Orientation"),g_pToolBarPositionsPopup); - g_pToolBarPositionsPopup->insertItem(__tr2qs("Top"),this,SLOT(moveToTop())); - g_pToolBarPositionsPopup->insertItem(__tr2qs("Left"),this,SLOT(moveToLeft())); - g_pToolBarPositionsPopup->insertItem(__tr2qs("Right"),this,SLOT(moveToRight())); - g_pToolBarPositionsPopup->insertItem(__tr2qs("Bottom"),this,SLOT(moveToBottom())); + g_pToolBarPositionsPopup->insertItem(__tr2qs("Top"),this,TQT_SLOT(moveToTop())); + g_pToolBarPositionsPopup->insertItem(__tr2qs("Left"),this,TQT_SLOT(moveToLeft())); + g_pToolBarPositionsPopup->insertItem(__tr2qs("Right"),this,TQT_SLOT(moveToRight())); + g_pToolBarPositionsPopup->insertItem(__tr2qs("Bottom"),this,TQT_SLOT(moveToBottom())); g_pToolBarPositionsPopup->insertSeparator(); - g_pToolBarPositionsPopup->insertItem(__tr2qs("Detached"),this,SLOT(moveToTornOff())); - g_pToolBarPositionsPopup->insertItem(__tr2qs("Flat"),this,SLOT(moveToMinimized())); + g_pToolBarPositionsPopup->insertItem(__tr2qs("Detached"),this,TQT_SLOT(moveToTornOff())); + g_pToolBarPositionsPopup->insertItem(__tr2qs("Flat"),this,TQT_SLOT(moveToMinimized())); g_pToolBarContextPopup->insertItem(__tr2qs("Icon Size"),g_pToolBarIconSizesPopup); - g_pToolBarIconSizesPopup->insertItem(__tr2qs("Small (22x22)"),this,SLOT(setSmallIcons())); - g_pToolBarIconSizesPopup->insertItem(__tr2qs("Large (32x32)"),this,SLOT(setBigIcons())); + g_pToolBarIconSizesPopup->insertItem(__tr2qs("Small (22x22)"),this,TQT_SLOT(setSmallIcons())); + g_pToolBarIconSizesPopup->insertItem(__tr2qs("Large (32x32)"),this,TQT_SLOT(setBigIcons())); - g_pToolBarContextPopup->popup(QCursor::pos()); + g_pToolBarContextPopup->popup(TQCursor::pos()); } -void KviToolBar::moveTo(QT_TOOLBARDOCK_TYPE dock) +void KviToolBar::moveTo(TQT_TOOLBARDOCK_TYPE dock) { // FIXME: this should be hidden in Tal #ifdef COMPILE_USE_QT4 g_pFrame->removeToolBar(this); g_pFrame->addToolBar(dock,this); #else //!COMPILE_USE_QT4 -#if QT_VERSION >= 300 g_pFrame->moveDockWindow(this,dock); -#else - g_pFrame->moveToolBar(this,dock); -#endif #endif //!COMPILE_USE_QT4 } void KviToolBar::moveToTop() { - moveTo(QT_DOCK_TOP); + moveTo(TQT_DOCK_TOP); } void KviToolBar::moveToLeft() { - moveTo(QT_DOCK_LEFT); + moveTo(TQT_DOCK_LEFT); } void KviToolBar::moveToRight() { - moveTo(QT_DOCK_RIGHT); + moveTo(TQT_DOCK_RIGHT); } void KviToolBar::moveToBottom() { - moveTo(QT_DOCK_BOTTOM); + moveTo(TQT_DOCK_BOTTOM); } void KviToolBar::moveToMinimized() { - moveTo(QT_DOCK_MINIMIZED); + moveTo(TQT_DOCK_MINIMIZED); } void KviToolBar::moveToTornOff() { - moveTo(QT_DOCK_TORNOFF); + moveTo(TQT_DOCK_TORNOFF); } void KviToolBar::setBigIcons() diff --git a/src/kvirc/ui/kvi_toolbar.h b/src/kvirc/ui/kvi_toolbar.h index a0e05119..bc5a7815 100644 --- a/src/kvirc/ui/kvi_toolbar.h +++ b/src/kvirc/ui/kvi_toolbar.h @@ -31,12 +31,13 @@ class KviFrame; class KVIRC_API KviToolBar : public KviTalToolBar { Q_OBJECT + TQ_OBJECT public: - KviToolBar(const QString &label,QT_TOOLBARDOCK_TYPE dock = QT_DOCK_TOP,bool bNewLine = false,const char * nam = 0); + KviToolBar(const TQString &label,TQT_TOOLBARDOCK_TYPE dock = TQT_DOCK_TOP,bool bNewLine = false,const char * nam = 0); ~KviToolBar(); protected: - virtual void mousePressEvent(QMouseEvent *e); - void moveTo(QT_TOOLBARDOCK_TYPE dock); + virtual void mousePressEvent(TQMouseEvent *e); + void moveTo(TQT_TOOLBARDOCK_TYPE dock); public slots: void moveToTop(); void moveToLeft(); diff --git a/src/kvirc/ui/kvi_toolwindows_container.cpp b/src/kvirc/ui/kvi_toolwindows_container.cpp index 270a7063..bd424fee 100644 --- a/src/kvirc/ui/kvi_toolwindows_container.cpp +++ b/src/kvirc/ui/kvi_toolwindows_container.cpp @@ -1,22 +1,22 @@ #define __KVIRC__ -#include -#include -#include -#include +#include +#include +#include +#include #include "kvi_tal_vbox.h" -#include -#include +#include +#include #include "kvi_toolwindows_container.h" #include "kvi_iconmanager.h" -KviWindowToolWidget::KviWindowToolWidget(QWidget * parent, KviWindowToolPageButton* button/*, const char * name, WFlags f*/ ) -:QWidget(parent/*,name,f*/) +KviWindowToolWidget::KviWindowToolWidget(TQWidget * tqparent, KviWindowToolPageButton* button/*, const char * name, WFlags f*/ ) +:TQWidget(tqparent/*,name,f*/) { -// m_pContainer=parent; +// m_pContainer=tqparent; m_pButton=button; m_bAutoDelete=1; m_bHidden=0; @@ -64,7 +64,7 @@ void KviWindowToolWidget::unregisterSelf() unregisterSelf(); m_bHidden=1; } - QWidget::hide(); + TQWidget::hide(); }*/ /*void KviWindowToolWidget::show() @@ -73,28 +73,28 @@ void KviWindowToolWidget::unregisterSelf() { registerSelf(); } - QWidget::show(); + TQWidget::show(); m_bHidden=0; }*/ -KviWindowToolPageButton::KviWindowToolPageButton ( int pixon,int pixoff, const QString & text, QWidget * parent,bool bOn, const char * name ) -:TOOL_PAGE_PARENT(parent) +KviWindowToolPageButton::KviWindowToolPageButton ( int pixon,int pixoff, const TQString & text, TQWidget * tqparent,bool bOn, const char * name ) +:TOOL_PAGE_PARENT(tqparent) { #ifdef COMPILE_USE_QT4 setFlat(true); setObjectName("kvi_window_tool_button"); - setIcon(QIcon(*(g_pIconManager->getSmallIcon(pixon)))); + setIcon(TQIcon(*(g_pIconManager->getSmallIcon(pixon)))); #else - QIconSet is1; - is1.setPixmap(*(g_pIconManager->getSmallIcon(pixon)),QIconSet::Small,QIconSet::Normal,QIconSet::On); - is1.setPixmap(*(g_pIconManager->getSmallIcon(pixoff)),QIconSet::Small,QIconSet::Normal,QIconSet::Off); + TQIconSet is1; + is1.setPixmap(*(g_pIconManager->getSmallIcon(pixon)),TQIconSet::Small,TQIconSet::Normal,TQIconSet::On); + is1.setPixmap(*(g_pIconManager->getSmallIcon(pixoff)),TQIconSet::Small,TQIconSet::Normal,TQIconSet::Off); setIconSet(is1); setUsesBigPixmap(false); #endif setToggleButton(true); setOn(bOn); -// setSizePolicy(QSizePolicy(QSizePolicy::Fixed,QSizePolicy::Ignored)); +// tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Fixed,TQSizePolicy::Ignored)); } KviWindowToolPageButton::~KviWindowToolPageButton() @@ -102,34 +102,34 @@ KviWindowToolPageButton::~KviWindowToolPageButton() } -/*void KviWindowToolPageButton::drawButton ( QPainter * p) +/*void KviWindowToolPageButton::drawButton ( TQPainter * p) { - QPixmap pixmap( height(), width() ); + TQPixmap pixmap( height(), width() ); if(isOn()) - pixmap.fill(colorGroup().mid()); + pixmap.fill(tqcolorGroup().mid()); else - pixmap.fill(colorGroup().button()); - QPainter painter( &pixmap ); + pixmap.fill(tqcolorGroup().button()); + TQPainter painter( &pixmap ); - QPixmap icon; + TQPixmap icon; if(isOn()) - icon=iconSet()->pixmap(QIconSet::Small,QIconSet::Normal,QIconSet::On); + icon=iconSet()->pixmap(TQIconSet::Small,TQIconSet::Normal,TQIconSet::On); else - icon=iconSet()->pixmap(QIconSet::Small,QIconSet::Normal,QIconSet::Off); + icon=iconSet()->pixmap(TQIconSet::Small,TQIconSet::Normal,TQIconSet::Off); // Draw the frame - //painter.setPen( colorGroup().mid() ); + //painter.setPen( tqcolorGroup().mid() ); //if ( m_id != NUM_TABS - 1 ) painter.drawLine( 0, 0, 0, pixmap.height() - 1 ); //painter.drawLine( 0, pixmap.height() - 1, pixmap.width() - 1, pixmap.height() - 1 ); // Draw the text - QFont font; - QString str = text(); + TQFont font; + TQString str = text(); str.remove("&"); - const int textX = pixmap.width() / 2 - QFontMetrics( font ).width( str ) / 2; - painter.setPen( colorGroup().buttonText() ); - const QRect rect( textX + icon.width() / 2 + 2, 0, pixmap.width(), pixmap.height() ); - painter.drawText( rect, Qt::AlignLeft | Qt::AlignVCenter, str ); + const int textX = pixmap.width() / 2 - TQFontMetrics( font ).width( str ) / 2; + painter.setPen( tqcolorGroup().buttonText() ); + const TQRect rect( textX + icon.width() / 2 + 2, 0, pixmap.width(), pixmap.height() ); + painter.drawText( rect, TQt::AlignLeft | TQt::AlignVCenter, str ); // Draw the icon painter.drawPixmap( textX - icon.width() / 2 - 2, pixmap.height() / 2 - icon.height() / 2, icon ); diff --git a/src/kvirc/ui/kvi_toolwindows_container.h b/src/kvirc/ui/kvi_toolwindows_container.h index ec131d9b..7b43af33 100644 --- a/src/kvirc/ui/kvi_toolwindows_container.h +++ b/src/kvirc/ui/kvi_toolwindows_container.h @@ -4,9 +4,9 @@ #include "kvi_tal_widgetstack.h" #include "kvi_tal_vbox.h" -#include -#include -#include +#include +#include +#include #include "kvi_heapobject.h" #include "kvi_styled_controls.h" @@ -21,11 +21,12 @@ class KviWindowToolPageButton; -class KVIRC_API KviWindowToolWidget : public QWidget +class KVIRC_API KviWindowToolWidget : public TQWidget { Q_OBJECT + TQ_OBJECT public: - KviWindowToolWidget( QWidget * parent,KviWindowToolPageButton* button/*, const char * name = 0, WFlags f = 0 */); + KviWindowToolWidget( TQWidget * tqparent,KviWindowToolPageButton* button/*, const char * name = 0, WFlags f = 0 */); ~KviWindowToolWidget(); void setAutoDelete(bool b) { m_bAutoDelete=b; }; @@ -41,12 +42,12 @@ protected: KviWindowToolPageButton *m_pButton; bool m_bAutoDelete; bool m_bHidden; -// QObjectCleanupHandler m_ObjectHandler; +// TQObjectCleanupHandler m_ObjectHandler; }; #ifdef COMPILE_USE_QT4 - #define TOOL_PAGE_PARENT QPushButton + #define TOOL_PAGE_PARENT TQPushButton #else #define TOOL_PAGE_PARENT KviStyledToolButton #endif @@ -55,11 +56,12 @@ protected: class KVIRC_API KviWindowToolPageButton : public TOOL_PAGE_PARENT { Q_OBJECT + TQ_OBJECT public: - KviWindowToolPageButton ( int pixon,int pixoff, const QString & text, QWidget * parent,bool bOn=0,const char * name = 0 ); + KviWindowToolPageButton ( int pixon,int pixoff, const TQString & text, TQWidget * tqparent,bool bOn=0,const char * name = 0 ); ~KviWindowToolPageButton(); /*protected: - virtual void drawButton ( QPainter * painter);*/ + virtual void drawButton ( TQPainter * painter);*/ }; #endif //_KVI_TOOLWINDOWS_CONTAINER_H_ diff --git a/src/kvirc/ui/kvi_topicw.cpp b/src/kvirc/ui/kvi_topicw.cpp index bbcf0c5c..8ae19621 100644 --- a/src/kvirc/ui/kvi_topicw.cpp +++ b/src/kvirc/ui/kvi_topicw.cpp @@ -46,42 +46,42 @@ extern KviTextIconWindow * g_pTextIconWindow; extern KviColorWindow * g_pColorWindow; static int g_iInputFontCharWidth[256]; -#include -#include +#include +#include #include "kvi_tal_tooltip.h" -#include +#include #include "kvi_tal_listbox.h" -#include -#include +#include +#include #include "kvi_tal_popupmenu.h" -#include +#include // FIXME: #warning "The combo should disappear when it looses focus!...(how to do it ?)" #ifdef COMPILE_PSEUDO_TRANSPARENCY - extern QPixmap * g_pShadedChildGlobalDesktopBackground; + extern TQPixmap * g_pShadedChildGlobalDesktopBackground; #endif -extern QStringList * g_pRecentTopicList; +extern TQStringList * g_pRecentTopicList; int KviListBoxTopicItem::width ( const KviTalListBox * lb ) const { - QFontMetrics fm(lb->font()); + TQFontMetrics fm(lb->font()); return fm.width(KviMircCntrl::stripControlBytes(text())); } -void KviListBoxTopicItem::paint ( QPainter * p ) +void KviListBoxTopicItem::paint ( TQPainter * p ) { - KviTopicWidget::paintColoredText(p,text(),listBox()->colorGroup(),height(listBox())); + KviTopicWidget::paintColoredText(p,text(),listBox()->tqcolorGroup(),height(listBox())); } -KviTopicWidget::KviTopicWidget(QWidget * par,const char * name) -: QFrame(par,name) +KviTopicWidget::KviTopicWidget(TQWidget * par,const char * name) +: TQFrame(par,name) { - setFrameStyle(QFrame::Sunken | QFrame::StyledPanel); + setFrameStyle(TQFrame::Sunken | TQFrame::StyledPanel); setFont(KVI_OPTION_FONT(KviOption_fontLabel)); m_pHistory = 0; m_pAccept = 0; @@ -92,21 +92,21 @@ KviTopicWidget::KviTopicWidget(QWidget * par,const char * name) #ifdef COMPILE_USE_QT4 setAutoFillBackground(false); #else - setBackgroundMode(QWidget::NoBackground); + setBackgroundMode(TQWidget::NoBackground); #endif reset(); #ifdef COMPILE_USE_QT4 - m_pCompletionBox=new KviTalListBox(this,Qt::Popup); + m_pCompletionBox=new KviTalListBox(this,TQt::Popup); #else - m_pCompletionBox=new KviTalListBox(this,Qt::WType_Popup); + m_pCompletionBox=new KviTalListBox(this,TQt::WType_Popup); #endif m_pCompletionBox->setFont( font() ); m_pCompletionBox->setPalette( palette() ); // m_pCompletionBox->setVScrollBarMode( KviTalListBox::AlwaysOff ); // m_pCompletionBox->setHScrollBarMode( KviTalListBox::AlwaysOff ); - m_pCompletionBox->setFrameStyle( QFrame::Box | QFrame::Plain ); + m_pCompletionBox->setFrameStyle( TQFrame::Box | TQFrame::Plain ); m_pCompletionBox->setLineWidth( 1 ); - connect(m_pCompletionBox,SIGNAL(selected(int)),this,SLOT(complete(int))); + connect(m_pCompletionBox,TQT_SIGNAL(selected(int)),this,TQT_SLOT(complete(int))); m_pCompletionBox->hide(); } @@ -141,9 +141,9 @@ void KviTopicWidget::applyOptions() #define KVI_LABEL_DEF_BACK 100 #define KVI_LABEL_DEF_FORE 101 -QString convertToHtml(const QString &text) +TQString convertToHtml(const TQString &text) { - QString result; + TQString result; bool curBold = false; bool curUnderline = false; unsigned char curFore = KVI_LABEL_DEF_FORE; //default fore @@ -153,7 +153,7 @@ QString convertToHtml(const QString &text) while(idx < text.length()) { - unsigned short c = text[(int)idx].unicode(); + unsigned short c = text[(int)idx].tqunicode(); unsigned int start = idx; @@ -168,7 +168,7 @@ QString convertToHtml(const QString &text) { idx++; if(idx >= text.length())break; - else c = text[(int)idx].unicode(); + else c = text[(int)idx].tqunicode(); } int len = idx - start; @@ -176,7 +176,7 @@ QString convertToHtml(const QString &text) if(len > 0) { bool bOpened = FALSE; - QString szText = text.mid(start,len); + TQString szText = text.mid(start,len); if(curBold) result.append(""); if(curUnderline) result.append(""); @@ -251,7 +251,7 @@ QString convertToHtml(const QString &text) ++idx; unsigned int icoStart = idx; - while((idx < text.length()) && (text[(int)idx].unicode() > 32))idx++; + while((idx < text.length()) && (text[(int)idx].tqunicode() > 32))idx++; KviStr lookupString = text.mid(icoStart,idx - icoStart); @@ -259,7 +259,7 @@ QString convertToHtml(const QString &text) if(icon) { //TODO: icons -/* QPixmap * pigzmap = icon->pixmap(); +/* TQPixmap * pigzmap = icon->pixmap(); p->drawPixmap(curX,(baseline + 2) - pigzmap->height(),*(pigzmap)); curX += pigzmap->width();*/ } else { @@ -272,9 +272,9 @@ QString convertToHtml(const QString &text) return result; } -void KviTopicWidget::paintColoredText(QPainter *p, QString text,const QColorGroup& cg,int height, int width) +void KviTopicWidget::paintColoredText(TQPainter *p, TQString text,const TQColorGroup& cg,int height, int width) { - QFontMetrics fm(p->font()); + TQFontMetrics fm(p->font()); if(height<0) height=p->window().height(); if(width<0) width=p->window().width(); @@ -291,7 +291,7 @@ void KviTopicWidget::paintColoredText(QPainter *p, QString text,const QColorGrou while((idx < text.length()) && (curX < width)) { - unsigned short c = text[(int)idx].unicode(); + unsigned short c = text[(int)idx].tqunicode(); unsigned int start = idx; @@ -305,7 +305,7 @@ void KviTopicWidget::paintColoredText(QPainter *p, QString text,const QColorGrou ) { idx++; - c = text[(int)idx].unicode(); + c = text[(int)idx].tqunicode(); } int len = idx - start; @@ -313,7 +313,7 @@ void KviTopicWidget::paintColoredText(QPainter *p, QString text,const QColorGrou if(len > 0) { - QString szText = text.mid(start,len); + TQString szText = text.mid(start,len); wdth = fm.width(szText); @@ -392,14 +392,14 @@ void KviTopicWidget::paintColoredText(QPainter *p, QString text,const QColorGrou ++idx; unsigned int icoStart = idx; - while((idx < text.length()) && (text[(int)idx].unicode() > 32))idx++; + while((idx < text.length()) && (text[(int)idx].tqunicode() > 32))idx++; KviStr lookupString = text.mid(icoStart,idx - icoStart); KviTextIcon * icon = g_pTextIconManager->lookupTextIcon(lookupString.ptr()); if(icon) { - QPixmap * pigzmap = icon->pixmap(); + TQPixmap * pigzmap = icon->pixmap(); p->drawPixmap(curX,(baseline + 2) - pigzmap->height(),*(pigzmap)); curX += pigzmap->width(); } else { @@ -412,20 +412,20 @@ void KviTopicWidget::paintColoredText(QPainter *p, QString text,const QColorGrou } #ifdef COMPILE_USE_QT4 -void KviTopicWidget::paintEvent(QPaintEvent * e) +void KviTopicWidget::paintEvent(TQPaintEvent * e) { - QPainter pa(this); + TQPainter pa(this); drawFrame(&pa); drawContents(&pa); } #endif -void KviTopicWidget::drawContents(QPainter *p) +void KviTopicWidget::drawContents(TQPainter *p) { #ifdef COMPILE_PSEUDO_TRANSPARENCY if(g_pShadedChildGlobalDesktopBackground) { - QPoint pnt = mapToGlobal(contentsRect().topLeft()); + TQPoint pnt = mapToGlobal(contentsRect().topLeft()); p->drawTiledPixmap(contentsRect(),*g_pShadedChildGlobalDesktopBackground,pnt); } else { #endif @@ -438,18 +438,18 @@ void KviTopicWidget::drawContents(QPainter *p) #ifdef COMPILE_PSEUDO_TRANSPARENCY } #endif - QColorGroup colorGroup; - //colorGroup() - colorGroup.setColor(QColorGroup::Text,KVI_OPTION_COLOR(KviOption_colorLabelForeground)); - colorGroup.setColor(QColorGroup::Background,KVI_OPTION_COLOR(KviOption_colorLabelBackground)); - paintColoredText(p,m_szTopic,colorGroup); + TQColorGroup tqcolorGroup; + //tqcolorGroup() + tqcolorGroup.setColor(TQColorGroup::Text,KVI_OPTION_COLOR(KviOption_colorLabelForeground)); + tqcolorGroup.setColor(TQColorGroup::Background,KVI_OPTION_COLOR(KviOption_colorLabelBackground)); + paintColoredText(p,m_szTopic,tqcolorGroup); } -void KviTopicWidget::setTopic(const QString & topic) +void KviTopicWidget::setTopic(const TQString & topic) { m_szTopic = topic; bool bFound = false; - for(QStringList::Iterator it=g_pRecentTopicList->begin();it != g_pRecentTopicList->end(); ++it) + for(TQStringList::Iterator it=g_pRecentTopicList->begin();it != g_pRecentTopicList->end(); ++it) { if(*it == m_szTopic) { @@ -469,13 +469,13 @@ void KviTopicWidget::setTopic(const QString & topic) update(); } -void KviTopicWidget::setTopicSetBy(const QString & setBy) +void KviTopicWidget::setTopicSetBy(const TQString & setBy) { m_szSetBy = setBy; updateToolTip(); } -void KviTopicWidget::setTopicSetAt(const QString & setAt) +void KviTopicWidget::setTopicSetAt(const TQString & setAt) { m_szSetAt = setAt; updateToolTip(); @@ -485,7 +485,7 @@ void KviTopicWidget::updateToolTip() { KviTalToolTip::remove(this); - QString txt = "" \ + TQString txt = "" \ "" \ ""; @@ -497,11 +497,11 @@ void KviTopicWidget::updateToolTip() txt += "
"; - QString tmp = m_szTopic; + TQString tmp = m_szTopic; - tmp.replace('&',"&"); - tmp.replace('<',"<"); - tmp.replace('>',">"); + tmp.tqreplace('&',"&"); + tmp.tqreplace('<',"<"); + tmp.tqreplace('>',">"); tmp = convertToHtml(tmp); txt += tmp; @@ -541,20 +541,20 @@ void KviTopicWidget::updateToolTip() KviTalToolTip::add(this,txt); } -QSize KviTopicWidget::sizeHint() const +TQSize KviTopicWidget::tqsizeHint() const { - QFontMetrics fm(font()); + TQFontMetrics fm(font()); int hght = fm.lineSpacing() + (frameWidth() << 1) + 4; int baseline = ((hght + fm.ascent() - fm.descent() + 1) >> 1); if(baseline < 16)hght += (16 - baseline); - return QSize(width(),hght); + return TQSize(width(),hght); } -void KviTopicWidget::mouseDoubleClickEvent(QMouseEvent *) +void KviTopicWidget::mouseDoubleClickEvent(TQMouseEvent *) { int maxlen=-1; - QObject * w = parent(); - QString szModes; + TQObject * w = tqparent(); + TQString szModes; bool bCanEdit = TRUE; while(w) { @@ -563,12 +563,12 @@ void KviTopicWidget::mouseDoubleClickEvent(QMouseEvent *) KviChannel *chan = ((KviChannel *)w); maxlen=chan->connection()->serverInfo()->maxTopicLen(); chan->getChannelModeString(szModes); - if(szModes.contains('t') && !( chan->isMeHalfOp() || chan->isMeOp() || chan->isMeChanOwner() || chan->isMeChanAdmin() || chan->connection()->userInfo()->hasUserMode('o') || chan->connection()->userInfo()->hasUserMode('O')) ) { + if(szModes.tqcontains('t') && !( chan->isMeHalfOp() || chan->isMeOp() || chan->isMeChanOwner() || chan->isMeChanAdmin() || chan->connection()->userInfo()->hasUserMode('o') || chan->connection()->userInfo()->hasUserMode('O')) ) { bCanEdit=false; } break; } - w = w->parent(); + w = w->tqparent(); } if(m_pInput == 0) { @@ -577,45 +577,45 @@ void KviTopicWidget::mouseDoubleClickEvent(QMouseEvent *) m_pInput->setMaxBufferSize(maxlen); m_pInput->setGeometry(0,0,width() - (height() << 2)+height(),height()); m_pInput->setText(m_szTopic); - connect(m_pInput,SIGNAL(enterPressed()),this,SLOT(acceptClicked())); - connect(m_pInput,SIGNAL(escapePressed()),this,SLOT(discardClicked())); + connect(m_pInput,TQT_SIGNAL(enterPressed()),this,TQT_SLOT(acceptClicked())); + connect(m_pInput,TQT_SIGNAL(escapePressed()),this,TQT_SLOT(discardClicked())); m_pInput->installEventFilter(this); - m_pHistory = new QPushButton(this); + m_pHistory = new TQPushButton(this); m_pHistory->setPixmap(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_TIME))); m_pHistory->setGeometry(width() - (height() << 2)+height(),0,height(),height()); KviTalToolTip::add(m_pHistory,__tr2qs("History")); m_pHistory->show(); - connect(m_pHistory,SIGNAL(clicked()),this,SLOT(historyClicked())); + connect(m_pHistory,TQT_SIGNAL(clicked()),this,TQT_SLOT(historyClicked())); - m_pAccept = new QPushButton(this); + m_pAccept = new TQPushButton(this); m_pAccept->setPixmap(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_ACCEPT))); m_pAccept->setGeometry(width() - (height() << 1),0,height(),height()); m_pAccept->setEnabled(bCanEdit); m_pAccept->show(); KviTalToolTip::add(m_pAccept,__tr2qs("Commit Changes")); - connect(m_pAccept,SIGNAL(clicked()),this,SLOT(acceptClicked())); + connect(m_pAccept,TQT_SIGNAL(clicked()),this,TQT_SLOT(acceptClicked())); - m_pDiscard = new QPushButton(this); + m_pDiscard = new TQPushButton(this); m_pDiscard->setPixmap(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_DISCARD))); m_pDiscard->setGeometry(width() - height(),0,height(),height()); KviTalToolTip::add(m_pDiscard,__tr2qs("Discard Changes")); m_pDiscard->show(); - connect(m_pDiscard,SIGNAL(clicked()),this,SLOT(discardClicked())); + connect(m_pDiscard,TQT_SIGNAL(clicked()),this,TQT_SLOT(discardClicked())); m_pInput->show(); m_pInput->setFocus(); } } -void KviTopicWidget::mousePressEvent(QMouseEvent * e) +void KviTopicWidget::mousePressEvent(TQMouseEvent * e) { if(!(e->button() & Qt::RightButton))return; if(!m_pContextPopup) { m_pContextPopup = new KviTalPopupMenu(this); - connect(m_pContextPopup,SIGNAL(aboutToShow()),this,SLOT(contextPopupAboutToShow())); + connect(m_pContextPopup,TQT_SIGNAL(aboutToShow()),this,TQT_SLOT(contextPopupAboutToShow())); } m_pContextPopup->popup(mapToGlobal(e->pos())); } @@ -624,50 +624,50 @@ void KviTopicWidget::contextPopupAboutToShow() { if(!m_pContextPopup)return; // hm ? m_pContextPopup->clear(); - m_pContextPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_COPY)),__tr2qs("Copy to clipboard"),this,SLOT(copy())); + m_pContextPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_COPY)),__tr2qs("Copy to clipboard"),this,TQT_SLOT(copy())); } void KviTopicWidget::copy() { - QClipboard * c = QApplication::clipboard(); + TQClipboard * c = TQApplication::tqclipboard(); if(!c)return; - if(c->supportsSelection())c->setText(m_szTopic,QClipboard::Selection); - c->setText(m_szTopic,QClipboard::Clipboard); + if(c->supportsSelection())c->setText(m_szTopic,TQClipboard::Selection); + c->setText(m_szTopic,TQClipboard::Clipboard); } -bool KviTopicWidget::eventFilter(QObject *object,QEvent *e) +bool KviTopicWidget::eventFilter(TQObject *object,TQEvent *e) { if ( !e ) return TRUE; - if(object==m_pCompletionBox) + if(TQT_BASE_OBJECT(object)==TQT_BASE_OBJECT(m_pCompletionBox)) { switch( e->type() ) { - case QEvent::MouseButtonPress: - if ( m_pCompletionBox->rect().contains( ((QMouseEvent*)e)->pos() ) ) { - complete(m_pCompletionBox->index(m_pCompletionBox->itemAt(((QMouseEvent*)e)->pos()))); + case TQEvent::MouseButtonPress: + if ( TQT_TQRECT_OBJECT(m_pCompletionBox->rect()).tqcontains( ((TQMouseEvent*)e)->pos() ) ) { + complete(m_pCompletionBox->index(m_pCompletionBox->itemAt(((TQMouseEvent*)e)->pos()))); return TRUE; } break; - case QEvent::MouseButtonRelease: - if ( m_pCompletionBox->rect().contains( ((QMouseEvent*)e)->pos() ) ) { - QMouseEvent tmp( QEvent::MouseButtonDblClick, - ((QMouseEvent*)e)->pos(), ((QMouseEvent*)e)->button(), ((QMouseEvent*)e)->state() ) ; + case TQEvent::MouseButtonRelease: + if ( TQT_TQRECT_OBJECT(m_pCompletionBox->rect()).tqcontains( ((TQMouseEvent*)e)->pos() ) ) { + TQMouseEvent tmp( TQEvent::MouseButtonDblClick, + ((TQMouseEvent*)e)->pos(), ((TQMouseEvent*)e)->button(), ((TQMouseEvent*)e)->state() ) ; // will hide popup - QApplication::sendEvent( object, &tmp ); + TQApplication::sendEvent( object, &tmp ); return TRUE; } else { if ( m_pCompletionBox->isVisible() ) popDownListBox(); } break; - case QEvent::KeyPress: - switch( ((QKeyEvent *)e)->key() ) { - case Qt::Key_Up: - case Qt::Key_Down: - if ( !(((QKeyEvent *)e)->state() & Qt::AltButton) ) + case TQEvent::KeyPress: + switch( ((TQKeyEvent *)e)->key() ) { + case TQt::Key_Up: + case TQt::Key_Down: + if ( !(((TQKeyEvent *)e)->state() & TQt::AltButton) ) break; - case Qt::Key_F4: - case Qt::Key_Escape: + case TQt::Key_F4: + case TQt::Key_Escape: if ( m_pCompletionBox->isVisible() ) { popDownListBox(); return TRUE; @@ -677,22 +677,22 @@ bool KviTopicWidget::eventFilter(QObject *object,QEvent *e) break; } break; - case QEvent::Hide: + case TQEvent::Hide: popDownListBox(); break; default: break; } } - return QFrame::eventFilter(object,e); + return TQFrame::eventFilter(object,e); } -bool KviTopicWidget::handleKeyPressEvent(QKeyEvent * e) +bool KviTopicWidget::handleKeyPressEvent(TQKeyEvent * e) { return 1; } -void KviTopicWidget::keyPressEvent(QKeyEvent * e) +void KviTopicWidget::keyPressEvent(TQKeyEvent * e) { if(handleKeyPressEvent(e)) { @@ -701,9 +701,9 @@ void KviTopicWidget::keyPressEvent(QKeyEvent * e) } } -void KviTopicWidget::resizeEvent(QResizeEvent *e) +void KviTopicWidget::resizeEvent(TQResizeEvent *e) { - if(e)QFrame::resizeEvent(e); + if(e)TQFrame::resizeEvent(e); if(m_pInput) { m_pInput->setGeometry(0,0,width() - (height() << 2)+height(),height()); @@ -728,9 +728,9 @@ void KviTopicWidget::deactivate() m_pDiscard = 0; } - // try to find a KviWindow parent and give it the focus + // try to find a KviWindow tqparent and give it the focus - QObject * w = parent(); + TQObject * w = tqparent(); while(w) { if(w->inherits("KviWindow")) @@ -738,15 +738,15 @@ void KviTopicWidget::deactivate() ((KviWindow *)w)->setFocus(); return; } - w = w->parent(); + w = w->tqparent(); } // no KviWindow on the path - w = parent(); + w = tqparent(); if(w) { - if(w->inherits("QWidget")) - ((QWidget *)w)->setFocus(); + if(w->inherits(TQWIDGET_OBJECT_NAME_STRING)) + ((TQWidget *)w)->setFocus(); } } @@ -761,12 +761,12 @@ void KviTopicWidget::historyClicked() { m_pCompletionBox->installEventFilter( this ); m_pCompletionBox->clear(); - for ( QStringList::Iterator it = g_pRecentTopicList->begin(); it != g_pRecentTopicList->end(); ++it ) { + for ( TQStringList::Iterator it = g_pRecentTopicList->begin(); it != g_pRecentTopicList->end(); ++it ) { KviListBoxTopicItem* item=new KviListBoxTopicItem(m_pCompletionBox,*it); } m_pCompletionBox->resize(m_pInput->width(),6*m_pCompletionBox->fontMetrics().height()+20); - QPoint point=m_pInput->mapToGlobal(QPoint(0,0)); - point+=QPoint(0,m_pInput->height()); + TQPoint point=m_pInput->mapToGlobal(TQPoint(0,0)); + point+=TQPoint(0,m_pInput->height()); m_pCompletionBox->move(point); m_pCompletionBox->show(); } @@ -776,18 +776,18 @@ void KviTopicWidget::acceptClicked() { if(!m_pInput->readOnly()) { - QString tmp = m_pInput->text(); + TQString tmp = m_pInput->text(); if(tmp != m_szTopic)emit topicSelected(tmp); } deactivate(); } -void KviTopicWidget::insertChar(QChar c) +void KviTopicWidget::insertChar(TQChar c) { - insertText(QString(c)); + insertText(TQString(c)); } -void KviTopicWidget::insertText(const QString &c) +void KviTopicWidget::insertText(const TQString &c) { if(m_pInput) m_pInput->insertText(c); @@ -803,30 +803,30 @@ void KviTopicWidget::complete(int pos) popDownListBox(); } -QChar KviTopicWidget::getSubstituteChar(unsigned short control_code) +TQChar KviTopicWidget::getSubstituteChar(unsigned short control_code) { switch(control_code) { case KVI_TEXT_COLOR: - return QChar('K'); + return TQChar('K'); break; case KVI_TEXT_BOLD: - return QChar('B'); + return TQChar('B'); break; case KVI_TEXT_RESET: - return QChar('O'); + return TQChar('O'); break; case KVI_TEXT_REVERSE: - return QChar('R'); + return TQChar('R'); break; case KVI_TEXT_UNDERLINE: - return QChar('U'); + return TQChar('U'); break; case KVI_TEXT_ICON: - return QChar('I'); + return TQChar('I'); break; default: - return QChar(control_code); + return TQChar(control_code); break; } } diff --git a/src/kvirc/ui/kvi_topicw.h b/src/kvirc/ui/kvi_topicw.h index b13088d7..5a59ced1 100644 --- a/src/kvirc/ui/kvi_topicw.h +++ b/src/kvirc/ui/kvi_topicw.h @@ -27,15 +27,15 @@ #include "kvi_settings.h" -#include -#include +#include +#include #include "kvi_tal_listbox.h" #include "kvi_string.h" #include "kvi_app.h" #include "kvi_input.h" -class QComboBox; +class TQComboBox; class KviChannel; class KviTalPopupMenu; class KviIrcConnection; @@ -44,67 +44,68 @@ class KviTalListBox; class KVIRC_API KviListBoxTopicItem : public KviTalListBoxText { public: - KviListBoxTopicItem( KviTalListBox * listbox = 0 , const QString & text = QString::null):KviTalListBoxText(listbox,text) { ; }; + KviListBoxTopicItem( KviTalListBox * listbox = 0 , const TQString & text = TQString()):KviTalListBoxText(listbox,text) { ; }; virtual int width ( const KviTalListBox * lb ) const; protected: - virtual void paint ( QPainter * p ); + virtual void paint ( TQPainter * p ); }; -class KVIRC_API KviTopicWidget : public QFrame +class KVIRC_API KviTopicWidget : public TQFrame { Q_OBJECT - Q_PROPERTY(int TransparencyCapable READ dummyRead) + TQ_OBJECT + TQ_PROPERTY(int TransparencyCapable READ dummyRead) friend class KviChannel; public: - KviTopicWidget(QWidget * par,const char * name); + KviTopicWidget(TQWidget * par,const char * name); ~KviTopicWidget(); private: - QString m_szTopic; - QString m_szSetBy; - QString m_szSetAt; - QPushButton * m_pAccept; - QPushButton * m_pDiscard; - QPushButton * m_pHistory; + TQString m_szTopic; + TQString m_szSetBy; + TQString m_szSetAt; + TQPushButton * m_pAccept; + TQPushButton * m_pDiscard; + TQPushButton * m_pHistory; KviTalPopupMenu * m_pContextPopup; - QChar getSubstituteChar(unsigned short control_code); + TQChar getSubstituteChar(unsigned short control_code); int xCursorPostionCalculation(int xInd); KviInputEditor* m_pInput; KviTalListBox* m_pCompletionBox; protected: int m_iCursorPosition; - virtual void drawContents(QPainter *p); - virtual void mouseDoubleClickEvent(QMouseEvent *e); - virtual void mousePressEvent(QMouseEvent *e); - virtual void keyPressEvent(QKeyEvent *e); - virtual void resizeEvent(QResizeEvent *e); + virtual void drawContents(TQPainter *p); + virtual void mouseDoubleClickEvent(TQMouseEvent *e); + virtual void mousePressEvent(TQMouseEvent *e); + virtual void keyPressEvent(TQKeyEvent *e); + virtual void resizeEvent(TQResizeEvent *e); #ifdef COMPILE_USE_QT4 - virtual void paintEvent(QPaintEvent * e); + virtual void paintEvent(TQPaintEvent * e); #endif void updateToolTip(); void deactivate(); void iconButtonClicked(); - virtual bool eventFilter(QObject *o,QEvent *e); - bool handleKeyPressEvent(QKeyEvent * e); + virtual bool eventFilter(TQObject *o,TQEvent *e); + bool handleKeyPressEvent(TQKeyEvent * e); public: - void insertChar(QChar c); - void insertText(const QString &s); + void insertChar(TQChar c); + void insertText(const TQString &s); int dummyRead() const { return 0; }; void reset(); - void setTopic(const QString & szTopic); - void setTopicSetBy(const QString & setBy); - void setTopicSetAt(const QString & setAt); + void setTopic(const TQString & szTopic); + void setTopicSetBy(const TQString & setBy); + void setTopicSetAt(const TQString & setAt); - const QString & topic(){ return m_szTopic; }; - const QString & topicSetBy(){ return m_szSetBy; }; - const QString & topicSetAt(){ return m_szSetAt; }; - virtual QSize sizeHint() const; + const TQString & topic(){ return m_szTopic; }; + const TQString & topicSetBy(){ return m_szSetBy; }; + const TQString & topicSetAt(){ return m_szSetAt; }; + virtual TQSize tqsizeHint() const; void applyOptions(); - static void paintColoredText(QPainter *p, QString text,const QColorGroup& cg, int h=-1, int w=-1); + static void paintColoredText(TQPainter *p, TQString text,const TQColorGroup& cg, int h=-1, int w=-1); protected slots: void acceptClicked(); void discardClicked(); @@ -114,7 +115,7 @@ protected slots: void complete(int); void popDownListBox(); signals: - void topicSelected(const QString &szTopic); + void topicSelected(const TQString &szTopic); }; #endif //_KVI_TOPICW_H_ diff --git a/src/kvirc/ui/kvi_userlistview.cpp b/src/kvirc/ui/kvi_userlistview.cpp index 20f75f06..d96aa532 100644 --- a/src/kvirc/ui/kvi_userlistview.cpp +++ b/src/kvirc/ui/kvi_userlistview.cpp @@ -48,23 +48,23 @@ #include "kvi_ircconnection.h" #include "kvi_ircconnectionserverinfo.h" -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include "kvi_styled_controls.h" -#include +#include #ifdef COMPILE_PSEUDO_TRANSPARENCY - extern QPixmap * g_pShadedChildGlobalDesktopBackground; + extern TQPixmap * g_pShadedChildGlobalDesktopBackground; #endif // kvi_app.cpp (loaded and destroyed by KviIconManager) -extern QPixmap * g_pUserChanStatePixmap; +extern TQPixmap * g_pUserChanStatePixmap; // Yet another really complex widget :) @@ -83,7 +83,7 @@ KviUserListToolTip::~KviUserListToolTip() { } -void KviUserListToolTip::maybeTip(const QPoint &pnt) +void KviUserListToolTip::maybeTip(const TQPoint &pnt) { m_pListView->maybeTip(this,pnt); } @@ -91,10 +91,10 @@ void KviUserListToolTip::maybeTip(const QPoint &pnt) -KviUserListEntry::KviUserListEntry(KviUserListView * parent,const QString &nick, +KviUserListEntry::KviUserListEntry(KviUserListView * tqparent,const TQString &nick, KviIrcUserEntry * e,short int iFlags,bool bJoinTimeUnknown) { - m_pListView = parent; + m_pListView = tqparent; m_szNick = nick; m_pGlobalData = e; m_iFlags = iFlags; @@ -111,7 +111,7 @@ KviUserListEntry::~KviUserListEntry() { } -bool KviUserListEntry::color(QColor& color) +bool KviUserListEntry::color(TQColor& color) { // // FIXME: Unused ? @@ -167,7 +167,7 @@ void KviUserListEntry::recalcSize() ) ) { - QPixmap * pix = av->scaledPixmap(KVI_OPTION_UINT(KviOption_uintAvatarScaleWidth), KVI_OPTION_UINT(KviOption_uintAvatarScaleHeight)); + TQPixmap * pix = av->scaledPixmap(KVI_OPTION_UINT(KviOption_uintAvatarScaleWidth), KVI_OPTION_UINT(KviOption_uintAvatarScaleHeight)); m_iHeight += pix->height(); } @@ -184,15 +184,15 @@ void KviUserListEntry::recalcSize() -KviUserListView::KviUserListView(QWidget * parent,KviWindowToolPageButton* button,KviIrcUserDataBase * db,KviWindow * pWnd,int dictSize,const QString & label_text,const char * name) -: KviWindowToolWidget(parent,button) +KviUserListView::KviUserListView(TQWidget * tqparent,KviWindowToolPageButton* button,KviIrcUserDataBase * db,KviWindow * pWnd,int dictSize,const TQString & label_text,const char * name) +: KviWindowToolWidget(tqparent,button) { setAutoDelete(0); m_pKviWindow = pWnd; - m_pEntryDict = new KviPointerHashTable(dictSize,false); + m_pEntryDict = new KviPointerHashTable(dictSize,false); m_pEntryDict->setAutoDelete(true); - m_pUsersLabel = new QLabel(this,"userslabel"); + m_pUsersLabel = new TQLabel(this,"userslabel"); KviTalToolTip::add(m_pUsersLabel,label_text); m_pViewArea = new KviUserListViewArea(this); @@ -212,7 +212,7 @@ KviUserListView::KviUserListView(QWidget * parent,KviWindowToolPageButton* butto m_ieEntries = 0; m_iIEntries = 0; m_iSelectedCount = 0; -// setBackgroundMode(QWidget::NoBackground); +// setBackgroundMode(TQWidget::NoBackground); applyOptions(); registerSelf(); } @@ -230,7 +230,7 @@ void KviUserListView::emitRightClick() switch(m_pKviWindow->type()) { case KVI_WINDOW_TYPE_CHANNEL: ev = KviEvent_OnChannelNickPopupRequest; break; - case KVI_WINDOW_TYPE_QUERY: ev = KviEvent_OnQueryNickPopupRequest; break; + case KVI_WINDOW_TYPE_TQUERY: ev = KviEvent_OnQueryNickPopupRequest; break; case KVI_WINDOW_TYPE_CONSOLE: ev = KviEvent_OnNotifyListPopupRequest; break; default: ev = KviEvent_OnNickLinkPopupRequest; break; // this should actually never happen } @@ -238,7 +238,7 @@ void KviUserListView::emitRightClick() { if(KviKvsEventManager::instance()->hasAppHandlers(ev)) { - QString nicks; + TQString nicks; appendSelectedNicknames(nicks); KviKvsVariantList vList; vList.append(nicks); @@ -255,7 +255,7 @@ void KviUserListView::emitDoubleClick() switch(m_pKviWindow->type()) { case KVI_WINDOW_TYPE_CHANNEL: ev = KviEvent_OnChannelNickDefaultActionRequest; break; - case KVI_WINDOW_TYPE_QUERY: ev = KviEvent_OnQueryNickDefaultActionRequest; break; + case KVI_WINDOW_TYPE_TQUERY: ev = KviEvent_OnQueryNickDefaultActionRequest; break; case KVI_WINDOW_TYPE_CONSOLE: ev = KviEvent_OnNotifyListDefaultActionRequest; break; default: ev = KviEvent_OnNickLinkDefaultActionRequest; break; // this should actually never happen } @@ -263,7 +263,7 @@ void KviUserListView::emitDoubleClick() { if(KviKvsEventManager::instance()->hasAppHandlers(ev)) { - QString nicks; + TQString nicks; appendSelectedNicknames(nicks); KviKvsVariantList vList; vList.append(nicks); @@ -291,7 +291,7 @@ void KviUserListView::applyOptions() updateUsersLabel(); }*/ setFont(KVI_OPTION_FONT(KviOption_fontUserListView)); - QFontMetrics fm(KVI_OPTION_FONT(KviOption_fontUserListView)); + TQFontMetrics fm(KVI_OPTION_FONT(KviOption_fontUserListView)); m_iFontHeight = fm.lineSpacing(); KviUserListEntry * e = m_pHeadItem; m_iTotalHeight = 0; @@ -305,7 +305,7 @@ void KviUserListView::applyOptions() m_pUsersLabel->setFont(KVI_OPTION_FONT(KviOption_fontUserListView)); setMinimumWidth(100); resizeEvent(0); // this will call update() too - repaint(); + tqrepaint(); } void KviUserListView::updateArea() { @@ -338,27 +338,27 @@ void KviUserListView::setMaskEntries(char type, int num) updateUsersLabel(); } -void KviUserListView::completeNickBashLike(const QString &begin,KviPointerList *l,bool bAppendMask) +void KviUserListView::completeNickBashLike(const TQString &begin,KviPointerList *l,bool bAppendMask) { KviUserListEntry * entry = m_pHeadItem; while(entry) { - if(KviQString::equalCIN(begin,entry->m_szNick,begin.length())) + if(KviTQString::equalCIN(begin,entry->m_szNick,begin.length())) { if(bAppendMask) { - QString * s = new QString(); - KviQString::sprintf(*s,"%Q!%Q@%Q",&(entry->m_szNick),&(entry->m_pGlobalData->user()),&(entry->m_pGlobalData->host())); + TQString * s = new TQString(); + KviTQString::sprintf(*s,"%Q!%Q@%Q",&(entry->m_szNick),&(entry->m_pGlobalData->user()),&(entry->m_pGlobalData->host())); l->append(s); } else - l->append(new QString(entry->m_szNick)); + l->append(new TQString(entry->m_szNick)); } entry = entry->m_pNext; } } -bool KviUserListView::completeNickStandard(const QString &begin,const QString &skipAfter,QString &buffer,bool bAppendMask) +bool KviUserListView::completeNickStandard(const TQString &begin,const TQString &skipAfter,TQString &buffer,bool bAppendMask) { KviUserListEntry * entry = m_pHeadItem; @@ -366,7 +366,7 @@ bool KviUserListView::completeNickStandard(const QString &begin,const QString &s { while(entry) { - if(KviQString::equalCI(skipAfter,entry->m_szNick)) + if(KviTQString::equalCI(skipAfter,entry->m_szNick)) { entry = entry->m_pNext; break; @@ -387,7 +387,7 @@ bool KviUserListView::completeNickStandard(const QString &begin,const QString &s { if(entry->m_szNick.length() >= begin.length()) { - int result = KviQString::cmpCIN(begin,entry->m_szNick,begin.length()); + int result = KviTQString::cmpCIN(begin,entry->m_szNick,begin.length()); if(result == 0) { // This is ok. @@ -421,7 +421,7 @@ bool KviUserListView::completeNickStandard(const QString &begin,const QString &s } -void KviUserListView::insertUserEntry(const QString &nick,KviUserListEntry * e) +void KviUserListView::insertUserEntry(const TQString &nick,KviUserListEntry * e) { // Complex insertion task :) @@ -538,7 +538,7 @@ void KviUserListView::insertUserEntry(const QString &nick,KviUserListEntry * e) } // else it is chan owner, so nothing to skip: the chan owners are first in the list // now strcmp within the current user-flag group... - while(entry && (KviQString::cmpCI(entry->m_szNick,e->m_szNick) < 0) && + while(entry && (KviTQString::cmpCI(entry->m_szNick,e->m_szNick) < 0) && ((entry->m_iFlags & flag) || (flag == 0))) { if(entry == m_pTopItem)bGotTopItem = true; @@ -601,17 +601,17 @@ void KviUserListView::insertUserEntry(const QString &nick,KviUserListEntry * e) } } -KviUserListEntry * KviUserListView::join(const QString &nick,const QString &user, - const QString &host,int iFlags) +KviUserListEntry * KviUserListView::join(const TQString &nick,const TQString &user, + const TQString &host,int iFlags) { // Ok..an user joins the channel - KviUserListEntry * it = m_pEntryDict->find(nick); + KviUserListEntry * it = m_pEntryDict->tqfind(nick); if(it == 0) { // add an entry to the global dict KviIrcUserEntry * pGlobalData = m_pIrcUserDataBase->insertUser(nick,user,host); // calculate the flags and update the counters - it = new KviUserListEntry(this,nick,pGlobalData,iFlags,(user == QString::null)); + it = new KviUserListEntry(this,nick,pGlobalData,iFlags,(user == TQString())); insertUserEntry(nick,it); } else { // if(!host.isEmpty()) - it can be UHNAMES with host or NAMEX(X) w/o it @@ -646,9 +646,9 @@ void KviUserListView::triggerUpdate() } } -bool KviUserListView::avatarChanged(const QString &nick) +bool KviUserListView::avatarChanged(const TQString &nick) { - KviUserListEntry * it = m_pEntryDict->find(nick); + KviUserListEntry * it = m_pEntryDict->tqfind(nick); if(it) { int oldH = it->m_iHeight; @@ -694,7 +694,7 @@ bool KviUserListView::avatarChanged(const QString &nick) } -bool KviUserListView::userActionVerifyMask(const QString &nick,const QString &user,const QString &host,int actionTemperature,QString &oldUser,QString &oldHost) +bool KviUserListView::userActionVerifyMask(const TQString &nick,const TQString &user,const TQString &host,int actionTemperature,TQString &oldUser,TQString &oldHost) { // This is called when an user "acts" in some visible way // on the channel, so we can keep track of his channeel @@ -704,16 +704,16 @@ bool KviUserListView::userActionVerifyMask(const QString &nick,const QString &us // change (unless they were not known at all) // This will also update the username and hostname // if needed. - KviUserListEntry * it = m_pEntryDict->find(QString(nick)); + KviUserListEntry * it = m_pEntryDict->tqfind(TQString(nick)); if(it) { it->m_lastActionTime = kvi_unixTime(); bool bChanged = false; - if(!(host.isEmpty() || (KviQString::equalCS(host,"*")))) + if(!(host.isEmpty() || (KviTQString::equalCS(host,"*")))) { - if(!KviQString::equalCI(it->m_pGlobalData->host(),host)) + if(!KviTQString::equalCI(it->m_pGlobalData->host(),host)) { - if(!(it->m_pGlobalData->host().isEmpty() || KviQString::equalCS(it->m_pGlobalData->host(),"*"))) + if(!(it->m_pGlobalData->host().isEmpty() || KviTQString::equalCS(it->m_pGlobalData->host(),"*"))) { oldHost = it->m_pGlobalData->host(); bChanged = true; @@ -721,11 +721,11 @@ bool KviUserListView::userActionVerifyMask(const QString &nick,const QString &us it->m_pGlobalData->setHost(host); } } - if(!(user.isEmpty() || (KviQString::equalCS(user,"*")))) + if(!(user.isEmpty() || (KviTQString::equalCS(user,"*")))) { - if(!KviQString::equalCI(it->m_pGlobalData->user(),user)) + if(!KviTQString::equalCI(it->m_pGlobalData->user(),user)) { - if(!(it->m_pGlobalData->user().isEmpty() || KviQString::equalCS(it->m_pGlobalData->user(),"*"))) + if(!(it->m_pGlobalData->user().isEmpty() || KviTQString::equalCS(it->m_pGlobalData->user(),"*"))) { oldUser = it->m_pGlobalData->user(); bChanged = true; @@ -744,19 +744,19 @@ bool KviUserListView::userActionVerifyMask(const QString &nick,const QString &us } -void KviUserListView::userAction(const QString &nick,const QString &user,const QString &host,int actionTemperature) +void KviUserListView::userAction(const TQString &nick,const TQString &user,const TQString &host,int actionTemperature) { // This is called when an user "acts" in some visible way // on the channel, so we can keep track of his channeel // idle time. This will also update the username and hostname // if needed. - KviUserListEntry * it = m_pEntryDict->find(QString(nick)); + KviUserListEntry * it = m_pEntryDict->tqfind(TQString(nick)); if(it) { it->m_lastActionTime = kvi_unixTime(); - if(!(host.isEmpty() || (KviQString::equalCS(host,"*")))) + if(!(host.isEmpty() || (KviTQString::equalCS(host,"*")))) it->m_pGlobalData->setHost(host); - if(!(user.isEmpty() || (KviQString::equalCS(user,"*")))) + if(!(user.isEmpty() || (KviTQString::equalCS(user,"*")))) it->m_pGlobalData->setUser(user); it->m_iTemperature += actionTemperature; // Don't allow it to grow too much @@ -773,7 +773,7 @@ void KviUserListView::userAction(KviIrcMask *user,int actionTemperature) // on the channel, so we can keep track of his channeel // idle time. This will also update the username and hostname // if needed. - KviUserListEntry * it = m_pEntryDict->find(QString(user->nick())); + KviUserListEntry * it = m_pEntryDict->tqfind(TQString(user->nick())); if(it) { it->m_lastActionTime = kvi_unixTime(); @@ -787,13 +787,13 @@ void KviUserListView::userAction(KviIrcMask *user,int actionTemperature) } } -void KviUserListView::userAction(const QString &nick,int actionTemperature) +void KviUserListView::userAction(const TQString &nick,int actionTemperature) { // This is called when an user "acts" in some visible way // on the channel, so we can keep track of his channeel // idle time. This will also update the username and hostname // if needed. - KviUserListEntry * it = m_pEntryDict->find(nick); + KviUserListEntry * it = m_pEntryDict->tqfind(nick); if(it) { it->m_lastActionTime = kvi_unixTime(); @@ -804,24 +804,24 @@ void KviUserListView::userAction(const QString &nick,int actionTemperature) } } -kvi_time_t KviUserListView::getUserJoinTime(const QString &szNick) +kvi_time_t KviUserListView::getUserJoinTime(const TQString &szNick) { - KviUserListEntry * e = m_pEntryDict->find(szNick); + KviUserListEntry * e = m_pEntryDict->tqfind(szNick); if(!e)return (kvi_time_t)0; return e->m_joinTime; } -kvi_time_t KviUserListView::getUserLastActionTime(const QString &szNick) +kvi_time_t KviUserListView::getUserLastActionTime(const TQString &szNick) { - KviUserListEntry * e = m_pEntryDict->find(szNick); + KviUserListEntry * e = m_pEntryDict->tqfind(szNick); if(!e)return (kvi_time_t)0; return e->m_lastActionTime; } -int KviUserListView::getUserModeLevel(const QString &szNick) +int KviUserListView::getUserModeLevel(const TQString &szNick) { - KviUserListEntry * e = m_pEntryDict->find(szNick); + KviUserListEntry * e = m_pEntryDict->tqfind(szNick); if(!e)return 0; if(e->m_iFlags & KVI_USERFLAG_MODEMASK) { @@ -838,25 +838,25 @@ int KviUserListView::getUserModeLevel(const QString &szNick) char KviUserListView::getUserFlag(KviUserListEntry * e) { if(!e)return 0; - return (char)m_pKviWindow->connection()->serverInfo()->modePrefixChar(e->m_iFlags).unicode(); + return (char)m_pKviWindow->connection()->serverInfo()->modePrefixChar(e->m_iFlags).tqunicode(); } -void KviUserListView::prependUserFlag(const QString &nick,QString &buffer) +void KviUserListView::prependUserFlag(const TQString &nick,TQString &buffer) { char uFlag = getUserFlag(nick); if(uFlag)buffer.prepend(uFlag); } -int KviUserListView::flags(const QString &nick) +int KviUserListView::flags(const TQString &nick) { - KviUserListEntry * it = m_pEntryDict->find(nick); + KviUserListEntry * it = m_pEntryDict->tqfind(nick); return it ? it->m_iFlags : 0; } #define SET_FLAG_FUNC(__funcname,__flag) \ - bool KviUserListView::__funcname(const QString &nick,bool bYes) \ + bool KviUserListView::__funcname(const TQString &nick,bool bYes) \ { \ - KviUserListEntry * it = m_pEntryDict->find(nick); \ + KviUserListEntry * it = m_pEntryDict->tqfind(nick); \ if(!it)return false; \ m_pEntryDict->setAutoDelete(false); \ partInternal(nick,false); \ @@ -881,9 +881,9 @@ SET_FLAG_FUNC(userop,KVI_USERFLAG_USEROP) SET_FLAG_FUNC(voice,KVI_USERFLAG_VOICE) #define GET_FLAG_FUNC(__funcname,__flag) \ - bool KviUserListView::__funcname(const QString &nick,bool bAtLeast) \ + bool KviUserListView::__funcname(const TQString &nick,bool bAtLeast) \ { \ - KviUserListEntry * it = m_pEntryDict->find(nick); \ + KviUserListEntry * it = m_pEntryDict->tqfind(nick); \ return it ? (bAtLeast ? (it->m_iFlags >= __flag) : (it->m_iFlags & __flag)) : false; \ } @@ -895,14 +895,14 @@ GET_FLAG_FUNC(isHalfOp,KVI_USERFLAG_HALFOP) GET_FLAG_FUNC(isUserOp,KVI_USERFLAG_USEROP) -QString * KviUserListView::firstSelectedNickname() +TQString * KviUserListView::firstSelectedNickname() { m_pIterator = m_pHeadItem; while(m_pIterator) { if(m_pIterator->m_bSelected) { - QString * s = &(m_pIterator->m_szNick); + TQString * s = &(m_pIterator->m_szNick); m_pIterator = m_pIterator->m_pNext; return s; } @@ -911,13 +911,13 @@ QString * KviUserListView::firstSelectedNickname() return 0; } -QString * KviUserListView::nextSelectedNickname() +TQString * KviUserListView::nextSelectedNickname() { while(m_pIterator) { if(m_pIterator->m_bSelected) { - QString * s = &(m_pIterator->m_szNick); + TQString * s = &(m_pIterator->m_szNick); m_pIterator = m_pIterator->m_pNext; return s; } @@ -926,7 +926,7 @@ QString * KviUserListView::nextSelectedNickname() return 0; } -void KviUserListView::appendSelectedNicknames(QString &buffer) +void KviUserListView::appendSelectedNicknames(TQString &buffer) { KviUserListEntry * aux = m_pHeadItem; bool bFirst = true; @@ -942,15 +942,15 @@ void KviUserListView::appendSelectedNicknames(QString &buffer) } } -void KviUserListView::select(const QString& nick){ - KviPointerHashTableIterator it(*m_pEntryDict); +void KviUserListView::select(const TQString& nick){ + KviPointerHashTableIterator it(*m_pEntryDict); while(it.current()) { ((KviUserListEntry *)it.current())->m_bSelected = false; ++it; } - KviUserListEntry * entry = m_pEntryDict->find(nick); + KviUserListEntry * entry = m_pEntryDict->tqfind(nick); if(entry) { entry->m_bSelected = true; @@ -962,9 +962,9 @@ void KviUserListView::select(const QString& nick){ m_pViewArea->update(); } -bool KviUserListView::partInternal(const QString &nick,bool bRemove) +bool KviUserListView::partInternal(const TQString &nick,bool bRemove) { - KviUserListEntry * it = m_pEntryDict->find(nick); + KviUserListEntry * it = m_pEntryDict->tqfind(nick); if(it) { // so, first of all..check if this item is over, or below the top item @@ -1028,13 +1028,13 @@ bool KviUserListView::partInternal(const QString &nick,bool bRemove) return false; } -bool KviUserListView::nickChange(const QString &oldNick,const QString &newNick) +bool KviUserListView::nickChange(const TQString &oldNick,const TQString &newNick) { - KviUserListEntry * it = m_pEntryDict->find(oldNick); + KviUserListEntry * it = m_pEntryDict->tqfind(oldNick); if(it) { - QString user = it->m_pGlobalData->user(); - QString host = it->m_pGlobalData->host(); + TQString user = it->m_pGlobalData->user(); + TQString host = it->m_pGlobalData->host(); int iFlags = it->m_iFlags; kvi_time_t joint = it->m_joinTime; bool bSelect = it->m_bSelected; @@ -1042,7 +1042,7 @@ bool KviUserListView::nickChange(const QString &oldNick,const QString &newNick) KviIrcUserEntry::Gender gender = it->m_pGlobalData->gender(); bool bBot = it->m_pGlobalData->isBot(); part(oldNick); - __range_invalid(m_pEntryDict->find(oldNick)); + __range_invalid(m_pEntryDict->tqfind(oldNick)); it = join(newNick,user,host,iFlags); it->m_pGlobalData->setGender(gender); it->m_pGlobalData->setBot(bBot); @@ -1082,17 +1082,17 @@ void KviUserListView::updateUsersLabel() } // FIXME: this could be done really better -void KviUserListView::partAllButOne(const QString &whoNot) +void KviUserListView::partAllButOne(const TQString &whoNot) { - QStringList ll; - KviPointerHashTableIterator it(*m_pEntryDict); + TQStringList ll; + KviPointerHashTableIterator it(*m_pEntryDict); while(it.current()) { - if(!KviQString::equalCI(whoNot,it.currentKey())) + if(!KviTQString::equalCI(whoNot,it.currentKey())) ll.append(it.currentKey()); ++it; } - for(QStringList::Iterator it2 = ll.begin();it2 != ll.end();it2++) + for(TQStringList::Iterator it2 = ll.begin();it2 != ll.end();it2++) { part(*it2); } @@ -1100,7 +1100,7 @@ void KviUserListView::partAllButOne(const QString &whoNot) void KviUserListView::removeAllEntries() { - KviPointerHashTableIterator it(*m_pEntryDict); + KviPointerHashTableIterator it(*m_pEntryDict); while(it.current()) { m_pIrcUserDataBase->removeUser(it.currentKey(), @@ -1136,12 +1136,12 @@ void KviUserListView::partAll() triggerUpdate(); } -void KviUserListView::resizeEvent(QResizeEvent *) +void KviUserListView::resizeEvent(TQResizeEvent *) { int hght; if(!KVI_OPTION_BOOL(KviOption_boolDisableUserListLabel))//G&N 2005 { - hght = m_pUsersLabel->sizeHint().height(); + hght = m_pUsersLabel->tqsizeHint().height(); if(hght < 16)hght = 16; // at least m_pUsersLabel->setGeometry(0,0,width(),hght); } @@ -1169,7 +1169,7 @@ bool KviUserListView::itemVisible(KviUserListEntry * e) return false; } -KviUserListEntry * KviUserListView::itemAt(const QPoint &pnt,QRect * rct) +KviUserListEntry * KviUserListView::itemAt(const TQPoint &pnt,TQRect * rct) { if(!m_pTopItem)return 0; if(pnt.y() < 0)return 0; @@ -1262,26 +1262,26 @@ void KviUserListView::userStats(KviUserListViewUserStats * s) } -void KviUserListView::maybeTip(KviUserListToolTip * tip,const QPoint &pnt) +void KviUserListView::maybeTip(KviUserListToolTip * tip,const TQPoint &pnt) { if(!KVI_OPTION_BOOL(KviOption_boolShowUserListViewToolTips))return; - QRect itRect; + TQRect itRect; KviUserListEntry * it = (KviUserListEntry *)itemAt(pnt,&itRect); if(it) { if(m_pKviWindow->console()) { - QString buffer; + TQString buffer; m_pKviWindow->console()->getUserTipText(it->m_szNick,it->m_pGlobalData,buffer); buffer += ""; if(it->m_joinTime != 0) { - QDateTime dt; + TQDateTime dt; dt.setTime_t(it->m_joinTime); buffer += ""; } @@ -1293,7 +1293,7 @@ void KviUserListView::maybeTip(KviUserListToolTip * tip,const QPoint &pnt) int hors = mins / 60; mins = mins % 60; buffer += ""; } buffer += "
"; - buffer += __tr2qs("Joined on %1").arg(dt.toString()); + buffer += __tr2qs("Joined on %1").tqarg(dt.toString()); buffer += "
"; - buffer += __tr2qs("Quiet for %1h %2m %3s").arg(hors).arg(mins).arg(secs); + buffer += __tr2qs("Quiet for %1h %2m %3s").tqarg(hors).tqarg(mins).tqarg(secs); buffer += "
"; @@ -1306,22 +1306,22 @@ void KviUserListView::maybeTip(KviUserListToolTip * tip,const QPoint &pnt) /////////////////////////////////////////////////////////////// KviUserListViewArea::KviUserListViewArea(KviUserListView * par) -: QWidget(par) +: TQWidget(par) { m_pListView = par; #ifdef COMPILE_USE_QT4 setAutoFillBackground(false); #else - setBackgroundMode(QWidget::NoBackground); + setBackgroundMode(TQWidget::NoBackground); #endif #ifdef COMPILE_USE_QT4 - m_pScrollBar = new QScrollBar(Qt::Vertical,this,"scrollbar"); + m_pScrollBar = new TQScrollBar(Qt::Vertical,this,"scrollbar"); #else - m_pScrollBar = new QScrollBar(QScrollBar::Vertical,this,"scrollbar"); + m_pScrollBar = new TQScrollBar(Qt::Vertical,this,"scrollbar"); #endif m_pScrollBar->setRange(0,0); m_pScrollBar->setValue(0); - connect(m_pScrollBar,SIGNAL(valueChanged(int)),this,SLOT(scrollBarMoved(int))); + connect(m_pScrollBar,TQT_SIGNAL(valueChanged(int)),this,TQT_SLOT(scrollBarMoved(int))); m_pScrollBar->setPageStep(height()); m_pScrollBar->setLineStep(m_pListView->m_iFontHeight); m_iLastScrollBarVal = 0; @@ -1390,7 +1390,7 @@ void KviUserListViewArea::scrollBarMoved(int newVal) } -void KviUserListViewArea::paintEvent(QPaintEvent *ev) +void KviUserListViewArea::paintEvent(TQPaintEvent *ev) { // update the scroll bar @@ -1409,30 +1409,30 @@ void KviUserListViewArea::paintEvent(QPaintEvent *ev) int wdth = width() - m_pScrollBar->width(); - QRect r = ev->rect(); + TQRect r = ev->rect(); if(r.right() > wdth)r.setRight(wdth); //debug("PAINT EVENT %d,%d,%d,%d",r.left(),r.top(),r.width(),r.height()); KviDoubleBuffer db(width(),height()); - QPixmap * pMemBuffer = db.pixmap(); + TQPixmap * pMemBuffer = db.pixmap(); - QPainter p(pMemBuffer); + TQPainter p(pMemBuffer); SET_ANTI_ALIASING(p); p.setFont(KVI_OPTION_FONT(KviOption_fontUserListView)); #ifdef COMPILE_USE_QT4 - QFontMetrics fm(p.fontMetrics()); + TQFontMetrics fm(p.fontMetrics()); #endif #ifdef COMPILE_PSEUDO_TRANSPARENCY if(g_pShadedChildGlobalDesktopBackground) { - QPoint pnt = mapToGlobal(QPoint(r.left(),r.top())); + TQPoint pnt = mapToGlobal(TQPoint(r.left(),r.top())); p.drawTiledPixmap(r.left(),r.top(),r.width(),r.height(),*g_pShadedChildGlobalDesktopBackground,pnt.x(),pnt.y()); } else { #endif - QPixmap *pix = KVI_OPTION_PIXMAP(KviOption_pixmapUserListViewBackground).pixmap(); + TQPixmap *pix = KVI_OPTION_PIXMAP(KviOption_pixmapUserListViewBackground).pixmap(); p.fillRect(r.left(),r.top(),r.width(),r.height(),KVI_OPTION_COLOR(KviOption_colorUserListViewBackground)); if(pix) KviPixmapUtils::drawPixmapWithPainter(&p,pix,KVI_OPTION_UINT(KviOption_uintUserListPixmapAlign),r,width(),height()); @@ -1460,7 +1460,7 @@ void KviUserListViewArea::paintEvent(QPaintEvent *ev) if(bottom >= r.top()) { - QColor * pClrFore = 0; + TQColor * pClrFore = 0; bool bColorAllocated=0; // FIXME: bool is true or false if(e->m_bSelected) { @@ -1476,7 +1476,7 @@ void KviUserListViewArea::paintEvent(QPaintEvent *ev) // FIXME: // // this is slow... VERY slow when one has a lot of registered users. - // (this is NOT a simple lookup in the user db... it is a mask match) + // (this is NOT a simple lookup in the user db... it is a tqmask match) // if we REALLY need to use custom colors for regged users then // they should be updated ONCE and stored (cached) in the KviUserListEntry structure // @@ -1515,11 +1515,11 @@ void KviUserListViewArea::paintEvent(QPaintEvent *ev) { case KVI_USERLISTVIEW_GRIDTYPE_PLAINGRID: case KVI_USERLISTVIEW_GRIDTYPE_DOTGRID: - p.setPen(QPen(KVI_OPTION_COLOR(KviOption_colorUserListViewGrid),0, + p.setPen(TQPen(KVI_OPTION_COLOR(KviOption_colorUserListViewGrid),0, #ifdef COMPILE_USE_QT4 - (KVI_OPTION_UINT(KviOption_uintUserListViewGridType) == KVI_USERLISTVIEW_GRIDTYPE_DOTGRID) ? Qt::DotLine : Qt::SolidLine)); + (KVI_OPTION_UINT(KviOption_uintUserListViewGridType) == KVI_USERLISTVIEW_GRIDTYPE_DOTGRID) ? TQt::DotLine : TQt::SolidLine)); #else - (KVI_OPTION_UINT(KviOption_uintUserListViewGridType) == KVI_USERLISTVIEW_GRIDTYPE_DOTGRID) ? QPen::DotLine : QPen::SolidLine)); + (KVI_OPTION_UINT(KviOption_uintUserListViewGridType) == KVI_USERLISTVIEW_GRIDTYPE_DOTGRID) ? TQPen::DotLine : TQPen::SolidLine)); #endif p.drawLine(0,bottom - 1,wdth,bottom - 1); if(bShowState || bShowIcons) @@ -1528,12 +1528,12 @@ void KviUserListViewArea::paintEvent(QPaintEvent *ev) default: // KVI_USERLISTVIEW_GRIDTYPE_3DGRID and KVI_USERLISTVIEW_GRIDTYPE_3DBUTTONS if(!e->m_bSelected) { - p.setPen(QPen(KVI_OPTION_COLOR(KviOption_colorUserListViewGrid),0 /*,QPen::DotLine*/)); + p.setPen(TQPen(KVI_OPTION_COLOR(KviOption_colorUserListViewGrid),0 /*,TQPen::DotLine*/)); if((bShowState || bShowIcons) && (KVI_OPTION_UINT(KviOption_uintUserListViewGridType) == KVI_USERLISTVIEW_GRIDTYPE_3DGRID)) p.drawLine(iAvatarAndTextX,bottom - 1,iAvatarAndTextX,theY); - p.setPen(colorGroup().shadow()); + p.setPen(tqcolorGroup().shadow()); p.drawLine(0,bottom - 1,wdth,bottom - 1); - p.setPen(colorGroup().light()); + p.setPen(tqcolorGroup().light()); p.drawLine(0,theY,wdth,theY); theY--; } @@ -1547,9 +1547,9 @@ void KviUserListViewArea::paintEvent(QPaintEvent *ev) if(e->globalData()->isAway()) { - QRgb rgb2 = pClrFore->rgb(); - QRgb rgb1 = KVI_OPTION_COLOR(KviOption_colorUserListViewAwayForeground).rgb(); - p.setPen(QColor(((qRed(rgb1)*2) + qRed(rgb2)) / 3,((qGreen(rgb1)*2) + qGreen(rgb2)) / 3,((qBlue(rgb1)*2) + qBlue(rgb2)) / 3)); + TQRgb rgb2 = pClrFore->rgb(); + TQRgb rgb1 = KVI_OPTION_COLOR(KviOption_colorUserListViewAwayForeground).rgb(); + p.setPen(TQColor(((tqRed(rgb1)*2) + tqRed(rgb2)) / 3,((tqGreen(rgb1)*2) + tqGreen(rgb2)) / 3,((tqBlue(rgb1)*2) + tqBlue(rgb2)) / 3)); } else { p.setPen(*pClrFore); } @@ -1560,7 +1560,7 @@ void KviUserListViewArea::paintEvent(QPaintEvent *ev) KviAvatar * av = e->m_pGlobalData->avatar(); if(av && KVI_OPTION_UINT(KviOption_uintAvatarScaleWidth) && KVI_OPTION_UINT(KviOption_uintAvatarScaleHeight)) { - QPixmap * pix; + TQPixmap * pix; if( KVI_OPTION_BOOL(KviOption_boolScaleAvatars) && ( !KVI_OPTION_BOOL(KviOption_boolDoNotStretchAvatars) || @@ -1580,12 +1580,12 @@ void KviUserListViewArea::paintEvent(QPaintEvent *ev) { if(e->globalData()->gender()!=KviIrcUserEntry::Unknown) { - QPixmap * ico = g_pIconManager->getBigIcon((e->globalData()->gender()==KviIrcUserEntry::Male) ? "kvi_icon_male.png" : "kvi_icon_female.png"); + TQPixmap * ico = g_pIconManager->getBigIcon((e->globalData()->gender()==KviIrcUserEntry::Male) ? "kvi_icon_male.png" : "kvi_icon_female.png"); p.drawPixmap(theX,theY+(m_pListView->m_iFontHeight-11)/2,*ico); } if(e->globalData()->isBot()) { - QPixmap * ico = g_pIconManager->getBigIcon("kvi_icon_bot.png"); + TQPixmap * ico = g_pIconManager->getBigIcon("kvi_icon_bot.png"); p.drawPixmap(theX,theY+(m_pListView->m_iFontHeight-11)/2,*ico); } theX +=11; @@ -1663,7 +1663,7 @@ void KviUserListViewArea::paintEvent(QPaintEvent *ev) //p.drawRect(theX,theY + 2,18,e->m_iHeight - 4); if(e->m_iFlags != 0) { - QPixmap * ico = g_pIconManager->getSmallIcon( \ + TQPixmap * ico = g_pIconManager->getSmallIcon( \ e->globalData()->isAway() ? \ ( \ (e->m_iFlags & KVI_USERFLAG_CHANOWNER) ? \ @@ -1691,27 +1691,27 @@ void KviUserListViewArea::paintEvent(QPaintEvent *ev) } theX +=18; #ifdef COMPILE_USE_QT4 - p.drawText(iAvatarAndTextX,theY,wdth - theX,fm.lineSpacing(),Qt::AlignLeft|Qt::AlignVCenter,e->m_szNick); + p.drawText(iAvatarAndTextX,theY,wdth - theX,fm.lineSpacing(),TQt::AlignLeft|TQt::AlignVCenter,e->m_szNick); #else - p.drawText(iAvatarAndTextX,theY,wdth - theX,m_pListView->m_iFontHeight,Qt::AlignLeft|Qt::AlignVCenter,e->m_szNick); + p.drawText(iAvatarAndTextX,theY,wdth - theX,m_pListView->m_iFontHeight,TQt::AlignLeft|TQt::AlignVCenter,e->m_szNick); #endif } else { char flag = m_pListView->getUserFlag(e); if(flag) { - QString ttt = QChar(flag); + TQString ttt = TQChar(flag); ttt += e->m_szNick; #ifdef COMPILE_USE_QT4 - p.drawText(iAvatarAndTextX,theY,wdth - theX,fm.lineSpacing(),Qt::AlignLeft|Qt::AlignVCenter,ttt); + p.drawText(iAvatarAndTextX,theY,wdth - theX,fm.lineSpacing(),TQt::AlignLeft|TQt::AlignVCenter,ttt); #else - p.drawText(iAvatarAndTextX,theY,wdth - theX,m_pListView->m_iFontHeight,Qt::AlignLeft|Qt::AlignVCenter,ttt); + p.drawText(iAvatarAndTextX,theY,wdth - theX,m_pListView->m_iFontHeight,TQt::AlignLeft|TQt::AlignVCenter,ttt); #endif } else { #ifdef COMPILE_USE_QT4 - p.drawText(iAvatarAndTextX,theY,wdth - theX,fm.lineSpacing(),Qt::AlignLeft|Qt::AlignVCenter,e->m_szNick); + p.drawText(iAvatarAndTextX,theY,wdth - theX,fm.lineSpacing(),TQt::AlignLeft|TQt::AlignVCenter,e->m_szNick); #else - p.drawText(iAvatarAndTextX,theY,wdth - theX,m_pListView->m_iFontHeight,Qt::AlignLeft|Qt::AlignVCenter,e->m_szNick); + p.drawText(iAvatarAndTextX,theY,wdth - theX,m_pListView->m_iFontHeight,TQt::AlignLeft|TQt::AlignVCenter,e->m_szNick); #endif } } @@ -1725,30 +1725,30 @@ void KviUserListViewArea::paintEvent(QPaintEvent *ev) //we really do not need any self-draw borders. //if we will need it, we will draw a better one with system style - //p.setPen(colorGroup().dark()); + //p.setPen(tqcolorGroup().dark()); //p.drawLine(0,0,wdth,0); //p.drawLine(0,0,0,height()); - //p.setPen(colorGroup().light()); + //p.setPen(tqcolorGroup().light()); //p.drawLine(1,height()-1,wdth,height()-1); //p.drawLine(wdth - 1,1,wdth - 1,height()); #ifdef COMPILE_USE_QT4 - QPainter qt4SuxBecauseOfThisAdditionalPainter(this); + TQPainter qt4SuxBecauseOfThisAdditionalPainter(this); qt4SuxBecauseOfThisAdditionalPainter.drawPixmap(r.left(),r.top(),r.width(),r.height(),*pMemBuffer,r.left(),r.top(),r.width(),r.height()); #else - bitBlt(this,r.left(),r.top(),pMemBuffer,r.left(),r.top(),r.width(),r.height(),Qt::CopyROP,false); + bitBlt(TQT_TQPAINTDEVICE(this),r.left(),r.top(),TQT_TQPAINTDEVICE(pMemBuffer),r.left(),r.top(),r.width(),r.height(),TQt::CopyROP,false); #endif } -void KviUserListViewArea::resizeEvent(QResizeEvent *) +void KviUserListViewArea::resizeEvent(TQResizeEvent *) { - int iScr = m_pScrollBar->sizeHint().width(); + int iScr = m_pScrollBar->tqsizeHint().width(); m_pScrollBar->setGeometry(width() - iScr,0,iScr,height()); m_pScrollBar->setPageStep(height()); m_pScrollBar->setLineStep(m_pListView->m_iFontHeight - 1); } -void KviUserListViewArea::mousePressEvent(QMouseEvent *e) +void KviUserListViewArea::mousePressEvent(TQMouseEvent *e) { setFocus(); if(e->button() & Qt::LeftButton) @@ -1756,14 +1756,14 @@ void KviUserListViewArea::mousePressEvent(QMouseEvent *e) KviUserListEntry * entry = m_pListView->itemAt(e->pos()); if(entry) { - if(e->state() & Qt::ShiftButton) + if(e->state() & TQt::ShiftButton) { // Multiselect mode if(!entry->m_bSelected)m_pListView->m_iSelectedCount++; entry->m_bSelected = true; if(m_pListView->m_iSelectedCount == 1)g_pFrame->childWindowSelectionStateChange(m_pListView->m_pKviWindow,true); update(); - } else if(e->state() & Qt::ControlButton) + } else if(e->state() & TQt::ControlButton) { // Invert mode if(!entry->m_bSelected)m_pListView->m_iSelectedCount++; @@ -1800,7 +1800,7 @@ void KviUserListViewArea::mousePressEvent(QMouseEvent *e) if(!entry->m_bSelected){ entry->m_bSelected = true; m_pListView->m_iSelectedCount=1; - KviPointerHashTableIterator it(*(m_pListView->m_pEntryDict)); + KviPointerHashTableIterator it(*(m_pListView->m_pEntryDict)); while(it.current()) { if(it.current()!=entry) @@ -1815,22 +1815,22 @@ void KviUserListViewArea::mousePressEvent(QMouseEvent *e) m_pListView->emitRightClick(); } } -void KviUserListViewArea::keyPressEvent( QKeyEvent * e ) +void KviUserListViewArea::keyPressEvent( TQKeyEvent * e ) { - if(e->key()==Qt::Key_Escape) + if(e->key()==TQt::Key_Escape) { if(m_pListView->m_pKviWindow->input()) - ((QWidget*)(m_pListView->m_pKviWindow->input()))->setFocus(); + ((TQWidget*)(m_pListView->m_pKviWindow->input()))->setFocus(); } else { - QString szKey=e->text(); + TQString szKey=e->text(); if(!szKey.isEmpty()) { KviUserListEntry * nick=0; KviUserListEntry * aux = m_pListView->m_pHeadItem; while(aux) { - //debug("%s %s %i %s %i",__FILE__,__FUNCTION__,__LINE__,aux->nick().utf8().data(),aux->nick().find(szKey,0,0)); - if(aux->nick().find(szKey,0,0)==0) + //debug("%s %s %i %s %i",__FILE__,__FUNCTION__,__LINE__,aux->nick().utf8().data(),aux->nick().tqfind(szKey,0,0)); + if(aux->nick().tqfind(szKey,0,0)==0) { nick=aux; break; @@ -1859,19 +1859,19 @@ void KviUserListViewArea::keyPressEvent( QKeyEvent * e ) } } -void KviUserListViewArea::mouseDoubleClickEvent(QMouseEvent *e) +void KviUserListViewArea::mouseDoubleClickEvent(TQMouseEvent *e) { m_pListView->emitDoubleClick(); } -void KviUserListViewArea::mouseMoveEvent(QMouseEvent *e) +void KviUserListViewArea::mouseMoveEvent(TQMouseEvent *e) { if(e->state() & Qt::LeftButton) { KviUserListEntry * entry = m_pListView->itemAt(e->pos()); if(entry && (entry != m_pLastEntryUnderMouse)) { - if(e->state() & Qt::ControlButton) + if(e->state() & TQt::ControlButton) { if(entry->m_bSelected)m_pListView->m_iSelectedCount--; else m_pListView->m_iSelectedCount++; @@ -1896,7 +1896,7 @@ void KviUserListViewArea::mouseMoveEvent(QMouseEvent *e) m_pScrollBar->setValue(m_pScrollBar->value() - top->m_iHeight); if(m_pListView->m_pTopItem != top) { - if(e->state() & Qt::ControlButton) + if(e->state() & TQt::ControlButton) { if(m_pListView->m_pTopItem->m_bSelected)m_pListView->m_iSelectedCount--; else m_pListView->m_iSelectedCount++; @@ -1929,7 +1929,7 @@ void KviUserListViewArea::mouseMoveEvent(QMouseEvent *e) m_pScrollBar->setValue(m_pScrollBar->value() + bottom->m_iHeight); if(bottom != m_pLastEntryUnderMouse) { - if(e->state() & Qt::ControlButton) + if(e->state() & TQt::ControlButton) { if(bottom->m_bSelected)m_pListView->m_iSelectedCount--; else m_pListView->m_iSelectedCount++; @@ -1951,15 +1951,15 @@ void KviUserListViewArea::mouseMoveEvent(QMouseEvent *e) } } -void KviUserListViewArea::mouseReleaseEvent(QMouseEvent *) +void KviUserListViewArea::mouseReleaseEvent(TQMouseEvent *) { m_pLastEntryUnderMouse = 0; } -void KviUserListViewArea::wheelEvent(QWheelEvent *e) +void KviUserListViewArea::wheelEvent(TQWheelEvent *e) { #ifdef COMPILE_USE_QT4 - static bool bHere = false; // Qt4(<= 4.2.2) has a nasty bug that makes the re-sent wheelEvent to cause infinite recursion + static bool bHere = false; // TQt4(<= 4.2.2) has a nasty bug that makes the re-sent wheelEvent to cause infinite recursion if(bHere)return; bHere = true; #endif diff --git a/src/kvirc/ui/kvi_userlistview.h b/src/kvirc/ui/kvi_userlistview.h index f5405937..2098a942 100644 --- a/src/kvirc/ui/kvi_userlistview.h +++ b/src/kvirc/ui/kvi_userlistview.h @@ -34,13 +34,13 @@ #include #include "kvi_tal_tooltip.h" -#include +#include #include "kvi_pointerlist.h" #include "kvi_pointerhashtable.h" #include "kvi_toolwindows_container.h" -class QLabel; -class QScrollBar; +class TQLabel; +class TQScrollBar; class KviUserListView; class KviUserListViewArea; @@ -63,8 +63,8 @@ public: private: KviUserListView * m_pListView; public: - virtual void maybeTip(const QPoint &pnt); - void doTip(const QRect &rct,const QString &str){ tip(rct,str); }; + virtual void maybeTip(const TQPoint &pnt); + void doTip(const TQRect &rct,const TQString &str){ tip(rct,str); }; }; @@ -74,11 +74,11 @@ class KVIRC_API KviUserListEntry friend class KviUserListView; friend class KviUserListViewArea; public: - KviUserListEntry(KviUserListView * parent,const QString &nick,KviIrcUserEntry * e,short int iFlags,bool bJoinTimeUnknown = true); + KviUserListEntry(KviUserListView * tqparent,const TQString &nick,KviIrcUserEntry * e,short int iFlags,bool bJoinTimeUnknown = true); ~KviUserListEntry(); protected: KviUserListView * m_pListView; - QString m_szNick; + TQString m_szNick; KviIrcUserEntry * m_pGlobalData; short int m_iFlags; short int m_iTemperature; // user temperature : 0 = neutral @@ -92,9 +92,9 @@ protected: public: short int flags() const { return m_iFlags; }; KviIrcUserEntry * globalData(){ return m_pGlobalData; }; - const QString &nick() const { return m_szNick; }; + const TQString &nick() const { return m_szNick; }; KviUserListEntry * next(){ return m_pNext; }; - bool color(QColor& color); + bool color(TQColor& color); protected: void recalcSize(); }; @@ -126,16 +126,17 @@ class KVIRC_API KviUserListView : public KviWindowToolWidget friend class KviChannel; friend class KviQuery; Q_OBJECT + TQ_OBJECT public: - KviUserListView(QWidget * parent,KviWindowToolPageButton* button,KviIrcUserDataBase * db,KviWindow * pWnd,int dictSize = 5,const QString &label_text = QString::null,const char * name = 0); + KviUserListView(TQWidget * tqparent,KviWindowToolPageButton* button,KviIrcUserDataBase * db,KviWindow * pWnd,int dictSize = 5,const TQString &label_text = TQString(),const char * name = 0); ~KviUserListView(); protected: - KviPointerHashTable * m_pEntryDict; + KviPointerHashTable * m_pEntryDict; KviUserListEntry * m_pTopItem; KviUserListEntry * m_pHeadItem; KviUserListEntry * m_pTailItem; KviUserListEntry * m_pIterator; - QLabel * m_pUsersLabel; + TQLabel * m_pUsersLabel; KviUserListViewArea * m_pViewArea; KviIrcUserDataBase * m_pIrcUserDataBase; int m_iSelectedCount; @@ -153,22 +154,22 @@ protected: int m_iIEntries; KviWindow * m_pKviWindow; protected: - void maybeTip(KviUserListToolTip * tip,const QPoint &pnt); + void maybeTip(KviUserListToolTip * tip,const TQPoint &pnt); void triggerUpdate(); void updateUsersLabel(); - void insertUserEntry(const QString &nick,KviUserListEntry * e); + void insertUserEntry(const TQString &nick,KviUserListEntry * e); void removeAllEntries(); - virtual void resizeEvent(QResizeEvent *); - bool partInternal(const QString &nick,bool bRemove = true); + virtual void resizeEvent(TQResizeEvent *); + bool partInternal(const TQString &nick,bool bRemove = true); void setUserDataBase(KviIrcUserDataBase * db){ m_pIrcUserDataBase = db; }; void updateScrollBarRange(); public: void updateArea(); - void select(const QString&); + void select(const TQString&); void applyOptions(); - KviPointerHashTable * entryDict(){ return m_pEntryDict; }; + KviPointerHashTable * entryDict(){ return m_pEntryDict; }; KviUserListEntry * firstItem(){ return m_pHeadItem; }; - KviUserListEntry * itemAt(const QPoint &pnt,QRect * rct = 0); + KviUserListEntry * itemAt(const TQPoint &pnt,TQRect * rct = 0); bool itemVisible(KviUserListEntry * e); KviWindow * window(){ return m_pKviWindow; }; @@ -181,55 +182,56 @@ public: int halfOpCount(){ return m_iHalfOpCount; }; int userOpCount(){ return m_iUserOpCount; }; - KviUserListEntry * findEntry(const QString &nick){ return nick.isEmpty() ? 0 : m_pEntryDict->find(nick); }; - void appendSelectedNicknames(QString &buffer); - QString * firstSelectedNickname(); - QString * nextSelectedNickname(); + KviUserListEntry * findEntry(const TQString &nick){ return nick.isEmpty() ? 0 : m_pEntryDict->tqfind(nick); }; + void appendSelectedNicknames(TQString &buffer); + TQString * firstSelectedNickname(); + TQString * nextSelectedNickname(); void partAll(); - void partAllButOne(const QString &whoNot); + void partAllButOne(const TQString &whoNot); void userStats(KviUserListViewUserStats * s); - int getUserModeLevel(const QString &nick); - kvi_time_t getUserJoinTime(const QString &nick); - kvi_time_t getUserLastActionTime(const QString &nick); + int getUserModeLevel(const TQString &nick); + kvi_time_t getUserJoinTime(const TQString &nick); + kvi_time_t getUserLastActionTime(const TQString &nick); char getUserFlag(KviUserListEntry * e); - char getUserFlag(const QString &nick){ return getUserFlag(m_pEntryDict->find(nick)); }; - bool part(const QString &nick){ return partInternal(nick,true); }; - bool op(const QString &nick,bool bOp); - void prependUserFlag(const QString &nick,QString &buffer); - int flags(const QString &nick); - bool isOp(const QString &nick,bool bAtLeast = false); - bool isVoice(const QString &nick,bool bAtLeast = false); - bool isHalfOp(const QString &nick,bool bAtLeast = false); - bool isChanAdmin(const QString &nick,bool bAtLeast = false); - bool isChanOwner(const QString &nick,bool bAtLeast = false); - bool isUserOp(const QString &nick,bool bAtLeast = false); - bool voice(const QString &nick,bool bVoice); - bool setChanAdmin(const QString &nick,bool bChanAdmin); - bool setChanOwner(const QString &nick,bool bChanOwner); - bool halfop(const QString &nick,bool bHalfOp); - bool userop(const QString &nick,bool bUserOp); + char getUserFlag(const TQString &nick){ return getUserFlag(m_pEntryDict->tqfind(nick)); }; + bool part(const TQString &nick){ return partInternal(nick,true); }; + bool op(const TQString &nick,bool bOp); + void prependUserFlag(const TQString &nick,TQString &buffer); + int flags(const TQString &nick); + bool isOp(const TQString &nick,bool bAtLeast = false); + bool isVoice(const TQString &nick,bool bAtLeast = false); + bool isHalfOp(const TQString &nick,bool bAtLeast = false); + bool isChanAdmin(const TQString &nick,bool bAtLeast = false); + bool isChanOwner(const TQString &nick,bool bAtLeast = false); + bool isUserOp(const TQString &nick,bool bAtLeast = false); + bool voice(const TQString &nick,bool bVoice); + bool setChanAdmin(const TQString &nick,bool bChanAdmin); + bool setChanOwner(const TQString &nick,bool bChanOwner); + bool halfop(const TQString &nick,bool bHalfOp); + bool userop(const TQString &nick,bool bUserOp); void userAction(KviIrcMask *user,int actionTemperature); - bool userActionVerifyMask(const QString &nick,const QString &user,const QString &host,int actionTemperature,QString &oldUser,QString &oldHost); - void userAction(const QString &nick,const QString &user,const QString &host,int actionTemperature); - void userAction(const QString &nick,int actionTemperature); - bool nickChange(const QString &oldNick,const QString &newNick); + bool userActionVerifyMask(const TQString &nick,const TQString &user,const TQString &host,int actionTemperature,TQString &oldUser,TQString &oldHost); + void userAction(const TQString &nick,const TQString &user,const TQString &host,int actionTemperature); + void userAction(const TQString &nick,int actionTemperature); + bool nickChange(const TQString &oldNick,const TQString &newNick); //KviUserListEntry * join(const char *nick,const char * user,const char * host,bool bOp,bool bVoice,bool bHalfOp); - KviUserListEntry * join(const QString &nick,const QString &user = QString::null,const QString &host = QString::null,int iFlags = 0); - bool avatarChanged(const QString &nick); + KviUserListEntry * join(const TQString &nick,const TQString &user = TQString(),const TQString &host = TQString(),int iFlags = 0); + bool avatarChanged(const TQString &nick); void enableUpdates(bool bEnable); void setMaskEntries(char type, int num); void emitRightClick(); void emitDoubleClick(); - bool completeNickStandard(const QString &begin,const QString &skipAfter,QString &buffer,bool bAppendMask); - void completeNickBashLike(const QString &begin,KviPointerList * l,bool bAppendMask); + bool completeNickStandard(const TQString &begin,const TQString &skipAfter,TQString &buffer,bool bAppendMask); + void completeNickBashLike(const TQString &begin,KviPointerList * l,bool bAppendMask); }; -class KVIRC_API KviUserListViewArea : public QWidget +class KVIRC_API KviUserListViewArea : public TQWidget { friend class KviUserListView; Q_OBJECT - Q_PROPERTY(int TransparencyCapable READ dummyRead) + TQ_OBJECT + TQ_PROPERTY(int TransparencyCapable READ dummyRead) public: KviUserListViewArea(KviUserListView * par); ~KviUserListViewArea(); @@ -238,19 +240,19 @@ public: protected: KviUserListView * m_pListView; KviUserListEntry * m_pLastEntryUnderMouse; - QScrollBar * m_pScrollBar; + TQScrollBar * m_pScrollBar; int m_iLastScrollBarVal; int m_iTopItemOffset; bool m_bIgnoreScrollBar; protected: - virtual void paintEvent(QPaintEvent *); - virtual void resizeEvent(QResizeEvent *); - virtual void mousePressEvent(QMouseEvent *e); - virtual void mouseMoveEvent(QMouseEvent *e); - virtual void mouseReleaseEvent(QMouseEvent *); - virtual void mouseDoubleClickEvent(QMouseEvent *e); - virtual void wheelEvent(QWheelEvent *e); - virtual void keyPressEvent( QKeyEvent * e ); + virtual void paintEvent(TQPaintEvent *); + virtual void resizeEvent(TQResizeEvent *); + virtual void mousePressEvent(TQMouseEvent *e); + virtual void mouseMoveEvent(TQMouseEvent *e); + virtual void mouseReleaseEvent(TQMouseEvent *); + virtual void mouseDoubleClickEvent(TQMouseEvent *e); + virtual void wheelEvent(TQWheelEvent *e); + virtual void keyPressEvent( TQKeyEvent * e ); protected slots: void scrollBarMoved(int newVal); }; diff --git a/src/kvirc/ui/kvi_window.cpp b/src/kvirc/ui/kvi_window.cpp index 2cf64085..763df175 100644 --- a/src/kvirc/ui/kvi_window.cpp +++ b/src/kvirc/ui/kvi_window.cpp @@ -53,29 +53,29 @@ #include "kvi_styled_controls.h" #include "kvi_kvs_script.h" -#include +#include #include "kvi_tal_popupmenu.h" -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include // it looks they can't decide :D #ifdef COMPILE_USE_QT4 - #include - #include + #include + #include #else - #include + #include #endif -#include -#include +#include +#include #include "kvi_tal_tooltip.h" -#include +#include #ifdef COMPILE_CRYPT_SUPPORT #include "kvi_crypt.h" @@ -102,8 +102,8 @@ static KviTalPopupMenu * g_pMdiWindowSystemTextEncodingPopupSmartUtf8 = 0; unsigned long int g_uUniqueWindowId = 1; // FIXME: #warning "Mouse wheel support" -KviWindow::KviWindow(int type,KviFrame * lpFrm,const QString &name,KviConsole * lpConsole) - : QWidget(0) +KviWindow::KviWindow(int type,KviFrame * lpFrm,const TQString &name,KviConsole * lpConsole) + : TQWidget(0) { m_uId = g_uUniqueWindowId; g_uUniqueWindowId++; @@ -146,13 +146,13 @@ KviWindow::KviWindow(int type,KviFrame * lpFrm,const QString &name,KviConsole * setMinimumSize(KVI_WINDOW_MIN_WIDTH,KVI_WINDOW_MIN_HEIGHT); #ifdef COMPILE_USE_QT4 //setAutoFillBackground(false); - setFocusPolicy(Qt::StrongFocus); + setFocusPolicy(TTQ_StrongFocus); #else setBackgroundMode(NoBackground); - setFocusPolicy(StrongFocus); + setFocusPolicy(TQ_StrongFocus); #endif - connect(g_pApp,SIGNAL(reloadImages()),this,SLOT(reloadImages())); + connect(g_pApp,TQT_SIGNAL(reloadImages()),this,TQT_SLOT(reloadImages())); } KviWindow::~KviWindow() @@ -180,7 +180,7 @@ KviWindow::~KviWindow() #endif } -void KviWindow::setWindowName(const QString &szName) +void KviWindow::setWindowName(const TQString &szName) { m_szName = szName; emit windowNameChanged(); @@ -188,7 +188,7 @@ void KviWindow::setWindowName(const QString &szName) void KviWindow::toggleButtonContainer() { - QFrame *pContainer=buttonContainer(); + TQFrame *pContainer=buttonContainer(); if(pContainer) { pContainer->setHidden(!pContainer->isHidden()); @@ -198,7 +198,7 @@ void KviWindow::toggleButtonContainer() void KviWindow::setName(const char * name) { m_szName = name; - QWidget::setName(name); + TQWidget::setName(name); } KviIrcConnection * KviWindow::connection() @@ -213,22 +213,22 @@ void KviWindow::reloadImages() bool KviWindow::hasAttention() { - if(((QApplication *)g_pApp)->activeWindow() == 0)return false; // no application window has the focus atm + if(((TQApplication *)g_pApp)->activeWindow() == 0)return false; // no application window has the focus atm if(mdiParent()) { if(frame()->isActiveWindow())return true; // This frame is not the active window but the // active window still belongs to KVIrc. - // When the active window is derived from QDialog + // When the active window is derived from TQDialog // then it is probably a KVIrc's option dialog // or something similar. // In this case we assume that the user has the // KVIrc window just below and can see it. // Handle the special case of the dialogs then - QWidget * w = ((QApplication *)g_pApp)->activeWindow(); - if(w->inherits("QDialog")) + TQWidget * w = TQT_TQWIDGET(((TQApplication *)g_pApp)->activeWindow()); + if(w->inherits(TQDIALOG_OBJECT_NAME_STRING)) { // but make sure that the frame is visible at all! if(!frame()->isVisible())return false; @@ -285,43 +285,43 @@ void KviWindow::demandAttention() bool KviWindow::focusNextPrevChild(bool next) { - QWidget * w = focusWidget(); + TQWidget * w = tqfocusWidget(); if(w) { #ifdef COMPILE_USE_QT4 - if(w->focusPolicy() == Qt::StrongFocus)return false; + if(w->focusPolicy() == TTQ_StrongFocus)return false; #else - if(w->focusPolicy() == QWidget::StrongFocus)return false; + if(w->focusPolicy() == TQ_StrongFocus)return false; #endif - //QVariant v = w->property("KviProperty_FocusOwner"); + //TQVariant v = w->property("KviProperty_FocusOwner"); //if(v.isValid())return false; // Do NOT change the focus widget! - if(w->parent()) + if(w->tqparent()) { #ifdef COMPILE_USE_QT4 - if(w->parent()->metaObject()->indexOfProperty("KviProperty_ChildFocusOwner") == -1) + if(w->tqparent()->tqmetaObject()->indexOfProperty("KviProperty_ChildFocusOwner") == -1) #else - if(w->parent()->metaObject()->findProperty("KviProperty_ChildFocusOwner") == -1) + if(w->tqparent()->tqmetaObject()->tqfindProperty("KviProperty_ChildFocusOwner") == -1) #endif return false; // Do NOT change the focus widget! } } - return QWidget::focusNextPrevChild(next); + return TQWidget::focusNextPrevChild(next); } -void KviWindow::forceTextCodec(QTextCodec * c) +void KviWindow::forceTextCodec(TQTextCodec * c) { if(!c)return; m_pTextCodec = c; - QTextCodec * dc = defaultTextCodec(); + TQTextCodec * dc = defaultTextCodec(); if(dc != c) m_szTextEncoding = c->name(); else m_szTextEncoding = ""; // this is the default anyway } -bool KviWindow::setTextEncoding(const QString &szTextEncoding) +bool KviWindow::setTextEncoding(const TQString &szTextEncoding) { if(!szTextEncoding.isEmpty()) { @@ -340,24 +340,24 @@ bool KviWindow::setTextEncoding(const QString &szTextEncoding) return false; } -QTextCodec * KviWindow::defaultTextCodec() +TQTextCodec * KviWindow::defaultTextCodec() { // if we have a connection try to inherit from there... if(connection()) { - QTextCodec * c = connection()->textCodec(); + TQTextCodec * c = connection()->textCodec(); if(c)return c; } return KviApp::defaultTextCodec(); } -KviQCString KviWindow::encodeText(const QString &szText) +KviTQCString KviWindow::encodeText(const TQString &szText) { if(!m_pTextCodec)return defaultTextCodec()->fromUnicode(szText); return m_pTextCodec->fromUnicode(szText); } -QString KviWindow::decodeText(const char * szText) +TQString KviWindow::decodeText(const char * szText) { if(!m_pTextCodec)return defaultTextCodec()->toUnicode(szText); return m_pTextCodec->toUnicode(szText); @@ -427,20 +427,20 @@ void KviWindow::destroyTaskBarItem() // m_pTaskBarItem = 0; // actually the taskBarItem destructor sets it } -BUTTON_CLASS * KviWindow::createToolButton(QWidget * par,const char * nam,int pixon,int pixoff,const QString & tooltip,bool bOn) +BUTTON_CLASS * KviWindow::createToolButton(TQWidget * par,const char * nam,int pixon,int pixoff,const TQString & tooltip,bool bOn) { #ifdef COMPILE_USE_QT4 BUTTON_CLASS * b = new BUTTON_CLASS(par); b->setObjectName(nam); b->setFlat(true); - b->setIcon(QIcon(*(g_pIconManager->getSmallIcon(pixon)))); + b->setIcon(TQIcon(*(g_pIconManager->getSmallIcon(pixon)))); #else BUTTON_CLASS * b = new BUTTON_CLASS(par,nam); b->setToggleButton(true); b->setUsesBigPixmap(false); - QIconSet is1; - is1.setPixmap(*(g_pIconManager->getSmallIcon(pixon)),QIconSet::Small,QIconSet::Normal,QIconSet::On); - is1.setPixmap(*(g_pIconManager->getSmallIcon(pixoff)),QIconSet::Small,QIconSet::Normal,QIconSet::Off); + TQIconSet is1; + is1.setPixmap(*(g_pIconManager->getSmallIcon(pixon)),TQIconSet::Small,TQIconSet::Normal,TQIconSet::On); + is1.setPixmap(*(g_pIconManager->getSmallIcon(pixoff)),TQIconSet::Small,TQIconSet::Normal,TQIconSet::Off); b->setIconSet(is1); #endif @@ -452,43 +452,43 @@ BUTTON_CLASS * KviWindow::createToolButton(QWidget * par,const char * nam,int pi } // This is always defined... -void KviWindow::createCryptControllerButton(QWidget * par) +void KviWindow::createCryptControllerButton(TQWidget * par) { #ifdef COMPILE_CRYPT_SUPPORT m_pCryptControllerButton = new KviWindowToolPageButton(KVI_SMALLICON_UNLOCKEDOFF,KVI_SMALLICON_UNLOCKED,__tr2qs("Crypting"),buttonContainer(),false,"crypt_controller_button"); - connect(m_pCryptControllerButton,SIGNAL(clicked()),this,SLOT(toggleCryptController())); + connect(m_pCryptControllerButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(toggleCryptController())); #endif // COMPILE_CRYPT_SUPPORT } -void KviWindow::createTextEncodingButton(QWidget * par) +void KviWindow::createTextEncodingButton(TQWidget * par) { if(m_pTextEncodingButton)delete m_pTextEncodingButton; m_pTextEncodingButton = createToolButton(par,"text_encoding_button",KVI_SMALLICON_TEXTENCODING,KVI_SMALLICON_TEXTENCODING,__tr2qs("Private Text Encoding"),false); - connect(m_pTextEncodingButton,SIGNAL(clicked()),this,SLOT(textEncodingButtonClicked())); + connect(m_pTextEncodingButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(textEncodingButtonClicked())); } void KviWindow::textEncodingButtonClicked() { createSystemTextEncodingPopup(); - g_pMdiWindowSystemTextEncodingPopup->popup(m_pTextEncodingButton->mapToGlobal(QPoint(0,m_pTextEncodingButton->height()))); + g_pMdiWindowSystemTextEncodingPopup->popup(m_pTextEncodingButton->mapToGlobal(TQPoint(0,m_pTextEncodingButton->height()))); m_pTextEncodingButton->setOn(false); } -const QString & KviWindow::lastLineOfText() +const TQString & KviWindow::lastLineOfText() { if(m_pIrcView) return m_pIrcView->lastLineOfText(); - return KviQString::empty; + return KviTQString::empty; } -const QString & KviWindow::lastMessageText() +const TQString & KviWindow::lastMessageText() { if(m_pIrcView) return m_pIrcView->lastMessageText(); - return KviQString::empty; + return KviTQString::empty; } -// The following three have to be here even if the crypt support is disabled...moc does not support conditional compilations +// The following three have to be here even if the crypt support is disabled...tqmoc does not support conditional compilations void KviWindow::toggleCryptController() { #ifdef COMPILE_CRYPT_SUPPORT @@ -507,8 +507,8 @@ void KviWindow::toggleCryptController() if(m_pSplitter && m_pInput) { m_pCryptController = new KviCryptController(m_pSplitter,m_pCryptControllerButton,"crypt_controller",this,m_pCryptSessionInfo); - connect(m_pCryptController,SIGNAL(done()),this,SLOT(cryptControllerFinished())); - //setFocusHandlerNoClass(m_pInput,m_pCryptController,"QLineEdit"); //link it! + connect(m_pCryptController,TQT_SIGNAL(done()),this,TQT_SLOT(cryptControllerFinished())); + //setFocusHandlerNoClass(m_pInput,m_pCryptController,TQLINEEDIT_OBJECT_NAME_STRING); //link it! m_pCryptController->show(); if(!m_pCryptControllerButton) return; @@ -527,22 +527,14 @@ void KviWindow::setCryptSessionInfo(KviCryptSessionInfo * inf) m_pCryptSessionInfo = inf; if(m_pCryptSessionInfo) { - connect(m_pCryptSessionInfo->pEngine,SIGNAL(destroyed()),this,SLOT(cryptSessionInfoDestroyed())); + connect(m_pCryptSessionInfo->pEngine,TQT_SIGNAL(destroyed()),this,TQT_SLOT(cryptSessionInfoDestroyed())); } if(m_pCryptControllerButton) { -#if QT_VERSION >= 300 - QIconSet is; - is.setPixmap(*(g_pIconManager->getSmallIcon(m_pCryptSessionInfo ? KVI_SMALLICON_LOCKEDOFF : KVI_SMALLICON_UNLOCKEDOFF)),QIconSet::Small,QIconSet::Normal,QIconSet::Off); - is.setPixmap(*(g_pIconManager->getSmallIcon(m_pCryptSessionInfo ? KVI_SMALLICON_LOCKED : KVI_SMALLICON_UNLOCKED)),QIconSet::Small,QIconSet::Normal,QIconSet::On); + TQIconSet is; + is.setPixmap(*(g_pIconManager->getSmallIcon(m_pCryptSessionInfo ? KVI_SMALLICON_LOCKEDOFF : KVI_SMALLICON_UNLOCKEDOFF)),TQIconSet::Small,TQIconSet::Normal,TQIconSet::Off); + is.setPixmap(*(g_pIconManager->getSmallIcon(m_pCryptSessionInfo ? KVI_SMALLICON_LOCKED : KVI_SMALLICON_UNLOCKED)),TQIconSet::Small,TQIconSet::Normal,TQIconSet::On); m_pCryptControllerButton->setIconSet(is); -#else - - m_pCryptControllerButton->setOnIconSet( - *(g_pIconManager->getSmallIcon(m_pCryptSessionInfo ? KVI_SMALLICON_LOCKEDOFF : KVI_SMALLICON_UNLOCKEDOFF))); - m_pCryptControllerButton->setOffIconSet( - *(g_pIconManager->getSmallIcon(m_pCryptSessionInfo ? KVI_SMALLICON_LOCKED : KVI_SMALLICON_UNLOCKED))); -#endif if(m_pCryptControllerButton->isOn()) m_pCryptControllerButton->setOn(false); @@ -584,28 +576,28 @@ void KviWindow::listWindowTypes() outputNoFmt(KVI_OUT_SYSTEMMESSAGE,m_typeTable[i]); } -void KviWindow::getConfigGroupName(QString &buf) +void KviWindow::getConfigGroupName(TQString &buf) { buf = typeString(); } -void KviWindow::getDefaultLogFileName(QString &buffer) +void KviWindow::getDefaultLogFileName(TQString &buffer) { // FIXME: #warning "Make it configurable ?" - QString date; - QDate dt(QDate::currentDate()); + TQString date; + TQDate dt(TQDate::tqcurrentDate()); date=dt.toString("yyyy.MM.dd"); - QString base; + TQString base; getBaseLogFileName(base); kvi_encodeFileName(base); - base.replace("%%2e","%2e"); + base.tqreplace("%%2e","%2e"); base=base.lower(); - QString tmp; + TQString tmp; if(KVI_OPTION_BOOL(KviOption_boolGzipLogs)) - KviQString::sprintf(tmp,"%s_%s_%s.log.gz",typeString(),base.utf8().data(),date.utf8().data()); + KviTQString::sprintf(tmp,"%s_%s_%s.log.gz",typeString(),base.utf8().data(),date.utf8().data()); else - KviQString::sprintf(tmp,"%s_%s_%s.log",typeString(),base.utf8().data(),date.utf8().data()); + KviTQString::sprintf(tmp,"%s_%s_%s.log",typeString(),base.utf8().data(),date.utf8().data()); g_pApp->getLocalKvircDirectory(buffer,KviApp::Log,tmp); } @@ -614,7 +606,7 @@ void KviWindow::getDefaultLogFileName(QString &buffer) buffer = m_szName; }*/ -void KviWindow::getBaseLogFileName(QString &buffer) +void KviWindow::getBaseLogFileName(TQString &buffer) { buffer = m_szName; } @@ -623,17 +615,17 @@ void KviWindow::getBaseLogFileName(QString &buffer) void KviWindow::saveProperties(KviConfig *cfg) { // store only the non-default text encoding. - QString szCodec = m_szTextEncoding; - QTextCodec * c = defaultTextCodec(); + TQString szCodec = m_szTextEncoding; + TQTextCodec * c = defaultTextCodec(); if(c && m_pTextCodec) { #ifdef COMPILE_USE_QT4 - if(KviQString::equalCI(szCodec,c->name().data()))szCodec = KviQString::empty; // store "default" + if(KviTQString::equalCI(szCodec,c->name().data()))szCodec = KviTQString::empty; // store "default" #else - if(KviQString::equalCI(szCodec,c->name()))szCodec = KviQString::empty; // store "default" + if(KviTQString::equalCI(szCodec,c->name()))szCodec = KviTQString::empty; // store "default" #endif } - QString szKey = "TextEncoding_"; + TQString szKey = "TextEncoding_"; szKey += m_szName; cfg->writeEntry(szKey,szCodec); if(m_pInput) { @@ -650,9 +642,9 @@ void KviWindow::saveProperties(KviConfig *cfg) void KviWindow::loadProperties(KviConfig *cfg) { - QString szKey = "TextEncoding_"; + TQString szKey = "TextEncoding_"; szKey += m_szName; - setTextEncoding(cfg->readQStringEntry(szKey,KviQString::empty).utf8().data()); + setTextEncoding(cfg->readTQStringEntry(szKey,KviTQString::empty).utf8().data()); if(m_pInput) { m_pInput->setButtonsHidden(cfg->readBoolEntry("inputToolButtonsHidden",KVI_OPTION_BOOL(KviOption_boolHideInputToolButtons))); m_pInput->setUserFriendly(cfg->readBoolEntry("commandLineIsUserFriendly",KVI_OPTION_BOOL(KviOption_boolCommandlineInUserFriendlyModeByDefault))); @@ -662,42 +654,42 @@ void KviWindow::loadProperties(KviConfig *cfg) bool bEnableLogs=cfg->readBoolEntry("LoggingEnabled",0); if(!m_pIrcView->isLogging() && bEnableLogs) { - QString szTmp; + TQString szTmp; getBaseLogFileName(szTmp); m_pIrcView->startLogging(); } }*/ } -QPixmap * KviWindow::myIconPtr() +TQPixmap * KviWindow::myIconPtr() { return g_pIconManager->getSmallIcon(KVI_SMALLICON_DEFAULTICON); } -void KviWindow::getTaskBarTipText(QString &buffer) +void KviWindow::getTaskBarTipText(TQString &buffer) { buffer = m_szPlainTextCaption; } -void KviWindow::setFixedCaption(const QString &szCaption) +void KviWindow::setFixedCaption(const TQString &szCaption) { m_szPlainTextCaption = szCaption; } void KviWindow::fillCaptionBuffers() { - QString szCaption = m_szPlainTextCaption; + TQString szCaption = m_szPlainTextCaption; if(szCaption.isEmpty()) szCaption = m_szName; fillSingleColorCaptionBuffers(szCaption); } -void KviWindow::fillSingleColorCaptionBuffers(const QString &szName) +void KviWindow::fillSingleColorCaptionBuffers(const TQString &szName) { - static QString p1(""); - static QString p3(""); + static TQString p1(""); + static TQString p3(""); m_szPlainTextCaption = szName; @@ -740,7 +732,7 @@ void KviWindow::createSystemTextEncodingPopup() else { g_pMdiWindowSystemTextEncodingPopupStandard->clear(); - disconnect(g_pMdiWindowSystemTextEncodingPopupStandard,SIGNAL(activated(int)),0,0); + disconnect(g_pMdiWindowSystemTextEncodingPopupStandard,TQT_SIGNAL(activated(int)),0,0); } if(!g_pMdiWindowSystemTextEncodingPopupSmart) @@ -748,7 +740,7 @@ void KviWindow::createSystemTextEncodingPopup() else { g_pMdiWindowSystemTextEncodingPopupSmart->clear(); - disconnect(g_pMdiWindowSystemTextEncodingPopupSmart,SIGNAL(activated(int)),0,0); + disconnect(g_pMdiWindowSystemTextEncodingPopupSmart,TQT_SIGNAL(activated(int)),0,0); } if(!g_pMdiWindowSystemTextEncodingPopupSmartUtf8) @@ -756,11 +748,11 @@ void KviWindow::createSystemTextEncodingPopup() else { g_pMdiWindowSystemTextEncodingPopupSmartUtf8->clear(); - disconnect(g_pMdiWindowSystemTextEncodingPopupSmartUtf8,SIGNAL(activated(int)),0,0); + disconnect(g_pMdiWindowSystemTextEncodingPopupSmartUtf8,TQT_SIGNAL(activated(int)),0,0); } - QTextCodec * c = defaultTextCodec(); - QString tmp = __tr2qs("Use Default Encoding"); + TQTextCodec * c = defaultTextCodec(); + TQString tmp = __tr2qs("Use Default Encoding"); if(c) { tmp += " ("; @@ -768,7 +760,7 @@ void KviWindow::createSystemTextEncodingPopup() tmp += ")"; } - int id = g_pMdiWindowSystemTextEncodingPopup->insertItem(tmp,this,SLOT(systemTextEncodingPopupDefault())); + int id = g_pMdiWindowSystemTextEncodingPopup->insertItem(tmp,this,TQT_SLOT(systemTextEncodingPopupDefault())); if(m_szTextEncoding.isEmpty())g_pMdiWindowSystemTextEncodingPopup->setItemChecked(id,true); g_pMdiWindowSystemTextEncodingPopup->insertSeparator(); @@ -780,22 +772,22 @@ void KviWindow::createSystemTextEncodingPopup() KviLocale::EncodingDescription * d = KviLocale::encodingDescription(i); while(d->szName) { - KviQString::sprintf(tmp,"%s (%s)",d->szName,d->szDescription); + KviTQString::sprintf(tmp,"%s (%s)",d->szName,d->szDescription); KviTalPopupMenu * ppp = d->bSmart ? (d->bSendUtf8 ? g_pMdiWindowSystemTextEncodingPopupSmartUtf8 : g_pMdiWindowSystemTextEncodingPopupSmart) : g_pMdiWindowSystemTextEncodingPopupStandard; id = ppp->insertItem(tmp); - if(KviQString::equalCI(m_szTextEncoding,d->szName)) + if(KviTQString::equalCI(m_szTextEncoding,d->szName)) ppp->setItemChecked(id,true); i = i + 1; d = KviLocale::encodingDescription(i); } - connect(g_pMdiWindowSystemTextEncodingPopupSmart,SIGNAL(activated(int)),this,SLOT(systemTextEncodingPopupSmartActivated(int))); - connect(g_pMdiWindowSystemTextEncodingPopupSmartUtf8,SIGNAL(activated(int)),this,SLOT(systemTextEncodingPopupSmartUtf8Activated(int))); - connect(g_pMdiWindowSystemTextEncodingPopupStandard,SIGNAL(activated(int)),this,SLOT(systemTextEncodingPopupStandardActivated(int))); + connect(g_pMdiWindowSystemTextEncodingPopupSmart,TQT_SIGNAL(activated(int)),this,TQT_SLOT(systemTextEncodingPopupSmartActivated(int))); + connect(g_pMdiWindowSystemTextEncodingPopupSmartUtf8,TQT_SIGNAL(activated(int)),this,TQT_SLOT(systemTextEncodingPopupSmartUtf8Activated(int))); + connect(g_pMdiWindowSystemTextEncodingPopupStandard,TQT_SIGNAL(activated(int)),this,TQT_SLOT(systemTextEncodingPopupStandardActivated(int))); } -void KviWindow::systemPopupRequest(const QPoint &pnt) +void KviWindow::systemPopupRequest(const TQPoint &pnt) { if(!g_pMdiWindowSystemMainPopup) g_pMdiWindowSystemMainPopup = new KviTalPopupMenu(); @@ -807,27 +799,27 @@ void KviWindow::systemPopupRequest(const QPoint &pnt) if(mdiParent()) g_pMdiWindowSystemMainPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_UNDOCK)), - __tr2qs("&Undock"),this,SLOT(undock())); + __tr2qs("&Undock"),this,TQT_SLOT(undock())); else g_pMdiWindowSystemMainPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_DOCK)), - __tr2qs("&Dock"),this,SLOT(dock())); + __tr2qs("&Dock"),this,TQT_SLOT(dock())); g_pMdiWindowSystemMainPopup->insertSeparator(); int id = g_pMdiWindowSystemMainPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_MINIMIZE)), - __tr2qs("Mi&nimize"),this,SLOT(minimize())); + __tr2qs("Mi&nimize"),this,TQT_SLOT(minimize())); g_pMdiWindowSystemMainPopup->setItemEnabled(id,!isMinimized()); id = g_pMdiWindowSystemMainPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_MAXIMIZE)), - __tr2qs("Ma&ximize"),this,SLOT(maximize())); + __tr2qs("Ma&ximize"),this,TQT_SLOT(maximize())); g_pMdiWindowSystemMainPopup->setItemEnabled(id,!isMaximized()); id = g_pMdiWindowSystemMainPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_RESTORE)), - __tr2qs("&Restore"),this,SLOT(restore())); + __tr2qs("&Restore"),this,TQT_SLOT(restore())); g_pMdiWindowSystemMainPopup->setItemEnabled(id,isMinimized()||isMaximized()); g_pMdiWindowSystemMainPopup->insertSeparator(); g_pMdiWindowSystemMainPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_CLOSE)), - __tr2qs("Close"),this,SLOT(close())); + __tr2qs("Close"),this,TQT_SLOT(close())); g_pMdiWindowSystemMainPopup->insertSeparator(); @@ -839,7 +831,7 @@ void KviWindow::systemPopupRequest(const QPoint &pnt) g_pMdiWindowSystemMainPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_XY)), - __tr2qs("Sa&ve Window Properties"),this,SLOT(savePropertiesAsDefault())); + __tr2qs("Sa&ve Window Properties"),this,TQT_SLOT(savePropertiesAsDefault())); fillContextPopup(g_pMdiWindowSystemMainPopup); @@ -856,8 +848,8 @@ void KviWindow::systemTextEncodingPopupSmartActivated(int id) { if(!g_pMdiWindowSystemTextEncodingPopupSmart) return; - QString tmp = g_pMdiWindowSystemTextEncodingPopupSmart->text(id); - KviQString::cutFromFirst(tmp," ("); + TQString tmp = g_pMdiWindowSystemTextEncodingPopupSmart->text(id); + KviTQString::cutFromFirst(tmp," ("); setTextEncoding(tmp); } @@ -865,8 +857,8 @@ void KviWindow::systemTextEncodingPopupSmartUtf8Activated(int id) { if(!g_pMdiWindowSystemTextEncodingPopupSmartUtf8) return; - QString tmp = g_pMdiWindowSystemTextEncodingPopupSmartUtf8->text(id); - KviQString::cutFromFirst(tmp," ("); + TQString tmp = g_pMdiWindowSystemTextEncodingPopupSmartUtf8->text(id); + KviTQString::cutFromFirst(tmp," ("); setTextEncoding(tmp); } @@ -874,14 +866,14 @@ void KviWindow::systemTextEncodingPopupStandardActivated(int id) { if(!g_pMdiWindowSystemTextEncodingPopupStandard) return; - QString tmp = g_pMdiWindowSystemTextEncodingPopupStandard->text(id); - KviQString::cutFromFirst(tmp," ("); + TQString tmp = g_pMdiWindowSystemTextEncodingPopupStandard->text(id); + KviTQString::cutFromFirst(tmp," ("); setTextEncoding(tmp); } void KviWindow::savePropertiesAsDefault() { - QString group; + TQString group; getConfigGroupName(group); if(!kvi_strEqualCI(group,typeString())) @@ -895,7 +887,7 @@ void KviWindow::savePropertiesAsDefault() void KviWindow::contextPopup() { - systemPopupRequest(QCursor::pos()); + systemPopupRequest(TQCursor::pos()); } void KviWindow::fillContextPopup(KviTalPopupMenu *) @@ -915,7 +907,7 @@ void KviWindow::dock() void KviWindow::delayedAutoRaise() { - QTimer::singleShot(0,this,SLOT(autoRaise())); + TQTimer::singleShot(0,this,TQT_SLOT(autoRaise())); } void KviWindow::autoRaise() @@ -933,10 +925,10 @@ void KviWindow::autoRaise() void KviWindow::delayedClose() { - QTimer::singleShot(0,this,SLOT(close())); + TQTimer::singleShot(0,this,TQT_SLOT(close())); } -void KviWindow::closeEvent(QCloseEvent *e) +void KviWindow::closeEvent(TQCloseEvent *e) { e->ignore(); g_pFrame->childWindowCloseRequest(this); @@ -944,9 +936,9 @@ void KviWindow::closeEvent(QCloseEvent *e) void KviWindow::updateIcon() { - if(parent()) + if(tqparent()) { - ((KviMdiChild *)parent())->setIcon(*myIconPtr()); + ((KviMdiChild *)tqparent())->setIcon(*myIconPtr()); } else { setIcon(*myIconPtr()); } @@ -959,9 +951,9 @@ void KviWindow::youAreDocked() delete m_pAccel; m_pAccel = 0; } - ((KviMdiChild *)parent())->setIcon(*myIconPtr()); + ((KviMdiChild *)tqparent())->setIcon(*myIconPtr()); updateCaption(); - connect(((KviMdiChild *)parent()),SIGNAL(systemPopupRequest(const QPoint &)),this,SLOT(systemPopupRequest(const QPoint &))); + connect(((KviMdiChild *)tqparent()),TQT_SIGNAL(systemPopupRequest(const TQPoint &)),this,TQT_SLOT(systemPopupRequest(const TQPoint &))); } void KviWindow::youAreUndocked() @@ -988,13 +980,13 @@ void KviWindow::activateSelf() void KviWindow::setFocus() { - // don't trigger the whole Qt focus mechanism.. + // don't trigger the whole TQt focus mechanism.. // just trigger directly our focusInEvent // so we'll redirect the focus to the m_pFocusHandler focusInEvent(0); } -void KviWindow::focusInEvent(QFocusEvent *) +void KviWindow::focusInEvent(TQFocusEvent *) { if(m_pLastFocusedChild) { @@ -1014,25 +1006,25 @@ void KviWindow::focusInEvent(QFocusEvent *) if(m_pIrcView)m_pFocusHandler = m_pIrcView; else { #ifdef COMPILE_USE_QT4 - QList list = children(); - for(QList::Iterator it = list.begin();it != list.end();++it) + TQList list = tqchildren(); + for(TQList::Iterator it = list.begin();it != list.end();++it) { - QObject * c = *it; + TQObject * c = *it; if(c->isWidgetType()) { - m_pFocusHandler = (QWidget *)c; + m_pFocusHandler = (TQWidget *)c; break; } } #else - QObjectList *list = (QObjectList *)(children()); - if(list) + TQObjectList list = childrenListObject(); + if(!list.isEmpty()) { - for(QObject * c = list->first();c;c = list->next()) + for(TQObject * c = list.first();c;c = list.next()) { if(c->isWidgetType()) { - m_pFocusHandler = (QWidget *)c; + m_pFocusHandler = (TQWidget *)c; break; } } @@ -1050,7 +1042,7 @@ void KviWindow::focusInEvent(QFocusEvent *) } // Setting the focus to the focus handler usually - // triggers our filter for the children's focusInEvent. + // triggers our filter for the tqchildren's focusInEvent. // This should call activateSelf() and thus // we should be already the active window at this point. // If we're not, then run activateSelf() to fix this. @@ -1059,26 +1051,26 @@ void KviWindow::focusInEvent(QFocusEvent *) updateCaption(); } -bool KviWindow::eventFilter(QObject *o,QEvent *e) +bool KviWindow::eventFilter(TQObject *o,TQEvent *e) { switch(e->type()) { - case QEvent::FocusIn: - m_pLastFocusedChild = (QWidget *)o; + case TQEvent::FocusIn: + m_pLastFocusedChild = (TQWidget *)o; if(g_pActiveWindow != this)activateSelf(); break; - case QEvent::Enter: + case TQEvent::Enter: // this is a handler moved here from KviMdiChild::eventFilter - if(QApplication::overrideCursor()) - QApplication::restoreOverrideCursor(); + if(TQApplication::overrideCursor()) + TQApplication::restoreOverrideCursor(); break; - case QEvent::MouseButtonPress: + case TQEvent::MouseButtonPress: #ifdef COMPILE_USE_QT4 - if( (((QWidget *)o)->focusPolicy() == Qt::NoFocus) || - (((QWidget *)o)->focusPolicy() == Qt::TabFocus)) + if( (((TQWidget *)o)->focusPolicy() == TTQ_NoFocus) || + (((TQWidget *)o)->focusPolicy() == TTQ_TabFocus)) #else - if( (((QWidget *)o)->focusPolicy() == QWidget::NoFocus) || - (((QWidget *)o)->focusPolicy() == QWidget::TabFocus)) + if( (((TQWidget *)o)->focusPolicy() == TQ_NoFocus) || + (((TQWidget *)o)->focusPolicy() == TQ_TabFocus)) #endif { // this will not focus our window @@ -1097,13 +1089,13 @@ bool KviWindow::eventFilter(QObject *o,QEvent *e) } } break; - case QEvent::ChildInserted: - if(((QChildEvent *)e)->child()->isWidgetType()) - childInserted((QWidget *)((QChildEvent *)e)->child()); + case TQEvent::ChildInserted: + if(((TQChildEvent *)e)->child()->isWidgetType()) + childInserted((TQWidget *)((TQChildEvent *)e)->child()); break; - case QEvent::ChildRemoved: - if(((QChildEvent *)e)->child()->isWidgetType()) - childRemoved((QWidget *)((QChildEvent *)e)->child()); + case TQEvent::ChildRemoved: + if(((TQChildEvent *)e)->child()->isWidgetType()) + childRemoved((TQWidget *)((TQChildEvent *)e)->child()); break; default: /* make gcc happy */ break; } @@ -1111,20 +1103,20 @@ bool KviWindow::eventFilter(QObject *o,QEvent *e) } -void KviWindow::childInserted(QWidget * o) +void KviWindow::childInserted(TQWidget * o) { o->removeEventFilter(this); // ensure that we don't filter twice o->installEventFilter(this); // we filter its events - connect(o,SIGNAL(destroyed()),this,SLOT(childDestroyed())); + connect(o,TQT_SIGNAL(destroyed()),this,TQT_SLOT(childDestroyed())); if(o->inherits("KviInput")) m_pFocusHandler = o; else { #ifdef COMPILE_USE_QT4 - if(!m_pFocusHandler && (o->focusPolicy() == Qt::StrongFocus)) + if(!m_pFocusHandler && (o->focusPolicy() == TTQ_StrongFocus)) #else - if(!m_pFocusHandler && (o->focusPolicy() == QWidget::StrongFocus)) + if(!m_pFocusHandler && (o->focusPolicy() == TQ_StrongFocus)) #endif { m_pFocusHandler = o; @@ -1132,23 +1124,23 @@ void KviWindow::childInserted(QWidget * o) } #ifdef COMPILE_USE_QT4 - QList list = o->children(); - for(QList::Iterator it = list.begin();it != list.end();++it) + TQList list = o->tqchildren(); + for(TQList::Iterator it = list.begin();it != list.end();++it) { - QObject * c = *it; + TQObject * c = *it; if(c->isWidgetType()) { - childInserted((QWidget *)c); + childInserted((TQWidget *)c); } } #else - QObjectList *list = (QObjectList *)(o->children()); - if(list) + TQObjectList list = o->childrenListObject(); + if(!list.isEmpty()) { - for(QObject * c = list->first();c;c = list->next()) + for(TQObject * c = list.first();c;c = list.next()) { if(c->isWidgetType()) - childInserted((QWidget *)c); + childInserted((TQWidget *)c); } } #endif @@ -1156,11 +1148,11 @@ void KviWindow::childInserted(QWidget * o) void KviWindow::childDestroyed() { - QWidget * s = (QWidget *)sender(); + TQWidget * s = (TQWidget *)sender(); childRemoved(s); } -void KviWindow::childRemoved(QWidget * o) +void KviWindow::childRemoved(TQWidget * o) { //debug("CHILD REMOVED %d",o); o->removeEventFilter(this); @@ -1170,92 +1162,85 @@ void KviWindow::childRemoved(QWidget * o) m_pLastFocusedChild = 0; #ifdef COMPILE_USE_QT4 - QList list = o->children(); - for(QList::Iterator it = list.begin();it != list.end();++it) + TQList list = o->tqchildren(); + for(TQList::Iterator it = list.begin();it != list.end();++it) { - QObject * c = *it; + TQObject * c = *it; if(c->isWidgetType()) { - childRemoved((QWidget *)c); + childRemoved((TQWidget *)c); } } #else - QObjectList *list = (QObjectList *)(o->children()); - if(list) + TQObjectList list = o->childrenListObject(); + if(!list.isEmpty()) { - for(QObject * c = list->first();c;c = list->next()) + for(TQObject * c = list.first();c;c = list.next()) { if(c->isWidgetType()) - childRemoved((QWidget *)c); + childRemoved((TQWidget *)c); } - } //else debug("The removed object has no children"); + } //else debug("The removed object has no tqchildren"); #endif } -void KviWindow::childEvent(QChildEvent *e) +void KviWindow::childEvent(TQChildEvent *e) { if(e->child()->isWidgetType()) { if(e->removed()) - childRemoved((QWidget *)(e->child())); + childRemoved((TQWidget *)(e->child())); else - childInserted((QWidget *)(e->child())); + childInserted((TQWidget *)(e->child())); } - QWidget::childEvent(e); + TQWidget::childEvent(e); } -void KviWindow::wheelEvent(QWheelEvent *e) +void KviWindow::wheelEvent(TQWheelEvent *e) { /* NOTHING HERE FOR NOW (FIXME) */ } -void KviWindow::childrenTreeChanged(QWidget * widgetAdded) +void KviWindow::tqchildrenTreeChanged(TQWidget * widgetAdded) { // if(widgetAdded && m_pFocusHandler)setFocusHandler(m_pFocusHandler,widgetAdded); // FIXME: This might be useless - QResizeEvent * e = new QResizeEvent(size(),size()); + TQResizeEvent * e = new TQResizeEvent(size(),size()); resizeEvent(e); delete e; } -void KviWindow::updateBackgrounds(QObject * obj) +void KviWindow::updateBackgrounds(TQObject * obj) { if(!obj) - obj = this; + obj = TQT_TQOBJECT(this); #ifdef COMPILE_USE_QT4 - QList list = obj->children(); + TQList list = obj->tqchildren(); if (list.count()) { - for(QList::Iterator it = list.begin();it != list.end();++it) + for(TQList::Iterator it = list.begin();it != list.end();++it) { - QObject * child = *it; - if(child->metaObject()->indexOfProperty("TransparencyCapable") != -1){ + TQObject * child = *it; + if(child->tqmetaObject()->indexOfProperty("TransparencyCapable") != -1){ // if (child->isWidgetType()) - ((QWidget *)child)->update(); + ((TQWidget *)child)->update(); } updateBackgrounds(child); } } #else - QObjectList * list = (QObjectList *)(obj->children()); - if(list) + TQObjectList list = obj->childrenListObject(); + if(!list.isEmpty()) { - for(unsigned int i=0;icount();i++) + for(unsigned int i=0;iat(i); -#if QT_VERSION >= 300 + TQObject * child = list.at(i); // FIXME: check if this code can work with qt < 3.0.0 too - if(child->metaObject()->findProperty("TransparencyCapable",true) != -1) - ((QWidget *)child)->update(); -#else - - QVariant v = list->at(i)->property("TransparencyCapable"); - if(v.isValid()) - ((QWidget *)child)->update(); -#endif + if(child->tqmetaObject()->tqfindProperty("TransparencyCapable",true) != -1) + ((TQWidget *)child)->update(); updateBackgrounds(child); } @@ -1263,13 +1248,13 @@ void KviWindow::updateBackgrounds(QObject * obj) #endif } -void KviWindow::moveEvent(QMoveEvent *e) +void KviWindow::moveEvent(TQMoveEvent *e) { #ifdef COMPILE_PSEUDO_TRANSPARENCY updateBackgrounds(); #endif - QWidget::moveEvent(e); + TQWidget::moveEvent(e); } void KviWindow::minimize() @@ -1300,7 +1285,7 @@ bool KviWindow::isMinimized() if(mdiParent()) return (mdiParent()->state() == KviMdiChild::Minimized); else - return QWidget::isMinimized(); + return TQWidget::isMinimized(); } bool KviWindow::isMaximized() @@ -1327,12 +1312,12 @@ void KviWindow::restore() autoRaise(); } -QRect KviWindow::externalGeometry() +TQRect KviWindow::externalGeometry() { #ifndef Q_OS_MACX return mdiParent() ? mdiParent()->restoredGeometry() : frameGeometry(); #else - return mdiParent() ? mdiParent()->restoredGeometry() : geometry(); + return mdiParent() ? mdiParent()->restoredGeometry() : tqgeometry(); #endif } @@ -1342,7 +1327,7 @@ void KviWindow::applyOptions() if(m_pIrcView)m_pIrcView->applyOptions(); if(m_pInput)m_pInput->applyOptions(); - // trick: relayout + // trick: retqlayout resize(width() - 1,height() - 1); resize(width() + 1,height() + 1); } @@ -1392,8 +1377,8 @@ void KviWindow::internalOutput(KviIrcView * pView,int msg_type,const kvi_wchar_t ( KVI_OPTION_BOOL(KviOption_boolHighlightOnlyNormalMsgQueryToo) && ( - (msg_type == KVI_OUT_QUERYPRIVMSG) || (msg_type == KVI_OUT_QUERYTRACE) || - (msg_type == KVI_OUT_QUERYPRIVMSGCRYPTED) || (msg_type == KVI_OUT_QUERYNOTICE) || (msg_type == KVI_OUT_QUERYNOTICECRYPTED) + (msg_type == KVI_OUT_TQUERYPRIVMSG) || (msg_type == KVI_OUT_TQUERYTRACE) || + (msg_type == KVI_OUT_TQUERYPRIVMSGCRYPTED) || (msg_type == KVI_OUT_TQUERYNOTICE) || (msg_type == KVI_OUT_TQUERYNOTICECRYPTED) ) ) || @@ -1417,59 +1402,59 @@ void KviWindow::internalOutput(KviIrcView * pView,int msg_type,const kvi_wchar_t void KviWindow::output(int msg_type,const char *format,...) { - QString szFmt(format); + TQString szFmt(format); kvi_va_list l; kvi_va_start(l,format); - QString szBuf; - KviQString::vsprintf(szBuf,szFmt,l); + TQString szBuf; + KviTQString::vsprintf(szBuf,szFmt,l); kvi_va_end(l); preprocessMessage(szBuf); - const QChar * pC = KviQString::nullTerminatedArray(szBuf); + const TQChar * pC = KviTQString::nullTerminatedArray(szBuf); if(!pC)return; internalOutput(m_pIrcView,msg_type,(kvi_wchar_t *)pC); } -void KviWindow::output(int msg_type,const QString &szFmt,...) +void KviWindow::output(int msg_type,const TQString &szFmt,...) { kvi_va_list l; kvi_va_start_by_reference(l,szFmt); - QString szBuf; - KviQString::vsprintf(szBuf,szFmt,l); + TQString szBuf; + KviTQString::vsprintf(szBuf,szFmt,l); kvi_va_end(l); preprocessMessage(szBuf); - const QChar * pC = KviQString::nullTerminatedArray(szBuf); + const TQChar * pC = KviTQString::nullTerminatedArray(szBuf); if(!pC)return; internalOutput(m_pIrcView,msg_type,(kvi_wchar_t *)pC); } void KviWindow::output(int msg_type,const kvi_wchar_t *format,...) { - QString szFmt=QString::fromUtf8(KviStr(format).ptr()); + TQString szFmt=TQString::fromUtf8(KviStr(format).ptr()); kvi_va_list l; kvi_va_start(l,format); - QString szBuf; - KviQString::vsprintf(szBuf,szFmt,l); + TQString szBuf; + KviTQString::vsprintf(szBuf,szFmt,l); kvi_va_end(l); preprocessMessage(szBuf); - const QChar * pC = KviQString::nullTerminatedArray(szBuf); + const TQChar * pC = KviTQString::nullTerminatedArray(szBuf); if(!pC)return; internalOutput(m_pIrcView,msg_type,(kvi_wchar_t *)pC); } void KviWindow::outputNoFmt(int msg_type,const char * text,int iFlags) { - QString szText(text); + TQString szText(text); preprocessMessage(szText); - const QChar * pC = KviQString::nullTerminatedArray(szText); + const TQChar * pC = KviTQString::nullTerminatedArray(szText); if(!pC)return; internalOutput(m_pIrcView,msg_type,(kvi_wchar_t *)pC,iFlags); } -void KviWindow::outputNoFmt(int msg_type,const QString &szText,int iFlags) +void KviWindow::outputNoFmt(int msg_type,const TQString &szText,int iFlags) { - QString szBuf(szText); + TQString szBuf(szText); preprocessMessage(szBuf); - const QChar * pC = KviQString::nullTerminatedArray(szBuf); + const TQChar * pC = KviTQString::nullTerminatedArray(szBuf); if(!pC)return; internalOutput(m_pIrcView,msg_type,(kvi_wchar_t *)pC,iFlags); } @@ -1488,27 +1473,27 @@ void KviWindow::unhighlight() Fixed */ -void KviWindow::preprocessMessage(QString & szMessage) +void KviWindow::preprocessMessage(TQString & szMessage) { // slow #ifdef COMPILE_USE_QT4 - QStringList strings = szMessage.split(" "); + TQStringList strings = szMessage.split(" "); #else - QStringList strings = QStringList::split(" ",szMessage, TRUE); + TQStringList strings = TQStringList::split(" ",szMessage, TRUE); #endif - for ( QStringList::Iterator it = strings.begin(); it != strings.end(); ++it ) { - QString tmp(*it); - if(tmp.contains('\r')) continue; + for ( TQStringList::Iterator it = strings.begin(); it != strings.end(); ++it ) { + TQString tmp(*it); + if(tmp.tqcontains('\r')) continue; tmp = KviMircCntrl::stripControlBytes(tmp); tmp.stripWhiteSpace(); if(m_pConsole) if(m_pConsole->connection()) - if(m_pConsole->connection()->serverInfo()->supportedChannelTypes().contains(tmp[0])) + if(m_pConsole->connection()->serverInfo()->supportedChannelTypes().tqcontains(tmp[0])) if((*it)==tmp) - *it=QString("\r!c\r%1\r").arg(*it); + *it=TQString("\r!c\r%1\r").tqarg(*it); else { - *it=QString("\r!c%1\r%2\r").arg(tmp).arg(*it); + *it=TQString("\r!c%1\r%2\r").tqarg(tmp).tqarg(*it); } } szMessage=strings.join(" "); diff --git a/src/kvirc/ui/kvi_window.h b/src/kvirc/ui/kvi_window.h index 419096fc..f86b6c2d 100644 --- a/src/kvirc/ui/kvi_window.h +++ b/src/kvirc/ui/kvi_window.h @@ -30,13 +30,13 @@ #include "kvi_settings.h" #ifdef COMPILE_ON_WINDOWS - // The brain-damaged MSVC compiler can't instantiate QList templates without a destructor definition + // The brain-damaged MSVC compiler can't instantiate TQList templates without a destructor definition #include "kvi_mdichild.h" #else class KviMdiChild; #endif -#include +#include class KviFrame; class KviTaskBarItem; @@ -49,11 +49,11 @@ class KviIrcConnection; class KviWindowToolPageButton; class KviTalPopupMenu; -class QPixmap; -class QSplitter; +class TQPixmap; +class TQSplitter; class KviTalHBox; -class QToolButton; -class QTextCodec; +class TQToolButton; +class TQTextCodec; class KviTalWidgetStack; #include "kvi_tal_hbox.h" @@ -65,7 +65,7 @@ class KviTalWidgetStack; class KviCryptSessionInfo; #endif -#include +#include // // Window types @@ -77,7 +77,7 @@ class KviTalWidgetStack; #define KVI_WINDOW_TYPE_CONSOLE 0 #define KVI_WINDOW_TYPE_CHANNEL 1 -#define KVI_WINDOW_TYPE_QUERY 2 +#define KVI_WINDOW_TYPE_TQUERY 2 #define KVI_WINDOW_TYPE_HELP 3 #define KVI_WINDOW_TYPE_TERM 4 #define KVI_WINDOW_TYPE_EDITOR 5 @@ -94,7 +94,7 @@ class KviTalWidgetStack; #define KVI_WINDOW_TYPE_OFFER 16 #define KVI_WINDOW_TYPE_LOGVIEW 17 #define KVI_WINDOW_TYPE_DEADCHANNEL 18 -#define KVI_WINDOW_TYPE_DEADQUERY 19 +#define KVI_WINDOW_TYPE_DEADTQUERY 19 #define KVI_WINDOW_TYPE_SCRIPTEDITOR 20 #define KVI_WINDOW_TYPE_SCRIPTOBJECT 21 #define KVI_WINDOW_TYPE_USERWINDOW 22 @@ -125,14 +125,14 @@ class KviTalWidgetStack; #define KVI_ACTIVITY_FIRE 6 #ifdef COMPILE_USE_QT4 - class QPushButton; - #define BUTTON_CLASS QPushButton + class TQPushButton; + #define BUTTON_CLASS TQPushButton #else - #define BUTTON_CLASS QToolButton + #define BUTTON_CLASS TQToolButton #endif -class KVIRC_API KviWindow : public QWidget +class KVIRC_API KviWindow : public TQWidget { friend class KviInput; friend class KviFrame; @@ -140,13 +140,14 @@ class KVIRC_API KviWindow : public QWidget friend class KviTaskBarButton; friend class KviTreeTaskBarItem; friend class KviTreeTaskBar; - Q_PROPERTY(int KviProperty_ChildFocusOwner READ type) + TQ_PROPERTY(int KviProperty_ChildFocusOwner READ type) Q_OBJECT + TQ_OBJECT public: - KviWindow(int type,KviFrame * lpFrm,const QString &name,KviConsole * pConsole = 0); + KviWindow(int type,KviFrame * lpFrm,const TQString &name,KviConsole * pConsole = 0); virtual ~KviWindow(); protected: // almost private: don't touch :D - QString m_szName; // the current window name (usually also the target) + TQString m_szName; // the current window name (usually also the target) KviFrame * m_pFrm; KviConsole * m_pConsole; KviIrcContext * m_pContext; @@ -154,38 +155,38 @@ protected: // almost private: don't touch :D int m_iType; KviTaskBarItem * m_pTaskBarItem; - QWidget * m_pFocusHandler; - QString m_szPlainTextCaption; - QString m_szHtmlActiveCaption; - QString m_szHtmlInactiveCaption; + TQWidget * m_pFocusHandler; + TQString m_szPlainTextCaption; + TQString m_szHtmlActiveCaption; + TQString m_szHtmlInactiveCaption; KviIrcView * m_pIrcView; KviInput * m_pInput; - QSplitter * m_pSplitter; + TQSplitter * m_pSplitter; KviTalHBox * m_pButtonBox; unsigned long int m_uId; - QString m_szTextEncoding; + TQString m_szTextEncoding; #ifdef COMPILE_CRYPT_SUPPORT KviWindowToolPageButton * m_pCryptControllerButton; KviCryptController * m_pCryptController; KviCryptSessionInfo * m_pCryptSessionInfo; #endif BUTTON_CLASS * m_pTextEncodingButton; - QToolButton * m_pHideToolsButton; - QWidget * m_pLastFocusedChild; + TQToolButton * m_pHideToolsButton; + TQWidget * m_pLastFocusedChild; KviAccel * m_pAccel; static const char * m_typeTable[KVI_WINDOW_NUM_TYPES + 1]; // text encoding and decoding //unsigned int m_uTextEncoding; - QTextCodec * m_pTextCodec; + TQTextCodec * m_pTextCodec; // KviToolWindowsContainer * m_pEditorsContainer; public: // The global ID of this window: unique in the application - QString id(){ return QString("%1").arg(m_uId); }; + TQString id(){ return TQString("%1").tqarg(m_uId); }; unsigned long int numericId(){ return m_uId; }; public: // THIS is the function that should be used - const QString & windowName(){ return m_szName; }; - void setWindowName(const QString &szName); + const TQString & windowName(){ return m_szName; }; + void setWindowName(const TQString &szName); // force QT to set our UNICODE name too... FIXME: this should be removed later... virtual void setName(const char * szName); @@ -196,8 +197,8 @@ public: // by THIS implementation is "unknown" virtual const char * typeString(); - QTextCodec * textCodec(){ return m_pTextCodec ? m_pTextCodec : defaultTextCodec(); }; - void forceTextCodec(QTextCodec * c); + TQTextCodec * textCodec(){ return m_pTextCodec ? m_pTextCodec : defaultTextCodec(); }; + void forceTextCodec(TQTextCodec * c); // The frame that this window belongs to // It is always non-null and never changes @@ -205,7 +206,7 @@ public: // The KviIrcView of this window: may be NULL if the window has no KviIrcView (and thus supports no direct output) KviIrcView * view() const { return m_pIrcView; }; // The mdiParent widget: may be nulll if the window is undocked - KviMdiChild * mdiParent(){ return (KviMdiChild *)parent(); }; + KviMdiChild * mdiParent(){ return (KviMdiChild *)tqparent(); }; // The console that this window belongs to: may be null for windows that aren't bound to irc contexts KviConsole * console(){ return m_pConsole; }; // same as above @@ -213,11 +214,11 @@ public: // the current IRC connection (if any) KviIrcConnection * connection(); // The splitter of this window: it *shouldn't* be null... but ... well.. who knows ? :D ...better check it - QSplitter * splitter(){ return m_pSplitter; }; + TQSplitter * splitter(){ return m_pSplitter; }; // The window has ALWAYS a taskbar item KviTaskBarItem * taskBarItem(){ return m_pTaskBarItem; }; // The window *might* have a button container - virtual QFrame * buttonContainer(){ return (QFrame*)m_pButtonBox; }; + virtual TQFrame * buttonContainer(){ return (TQFrame*)m_pButtonBox; }; virtual void toggleButtonContainer(); // The window *might* have an output proxy: if it has no view() for example virtual KviWindow * outputProxy(); @@ -225,9 +226,9 @@ public: KviInput * input(){ return m_pInput; }; // The target of this window: empty when it makes no sense :D - virtual const QString & target(){ return KviQString::empty; }; + virtual const TQString & target(){ return KviTQString::empty; }; // The local nickname bound to this window: might be empty when a local nickname makes no sense - virtual const QString & localNick(){ return KviQString::empty; }; + virtual const TQString & localNick(){ return KviTQString::empty; }; #ifdef COMPILE_CRYPT_SUPPORT KviCryptSessionInfo * cryptSessionInfo(){ return m_pCryptSessionInfo; }; @@ -238,20 +239,20 @@ public: void unhighlight(); - virtual void getTaskBarTipText(QString &buffer); + virtual void getTaskBarTipText(TQString &buffer); // This is meaningful only if view() is non NULL - const QString & lastLineOfText(); - const QString & lastMessageText(); + const TQString & lastLineOfText(); + const TQString & lastMessageText(); - const QString &textEncoding(){ return m_szTextEncoding; }; + const TQString &textEncoding(){ return m_szTextEncoding; }; // returns true if the encoding could be succesfully set - bool setTextEncoding(const QString &szTextEncoding); + bool setTextEncoding(const TQString &szTextEncoding); // this must return a default text codec suitable for this window - virtual QTextCodec * defaultTextCodec(); + virtual TQTextCodec * defaultTextCodec(); // encode the text from szSource by using m_uTextEncoding - KviQCString encodeText(const QString &szText); - QString decodeText(const char * szText); + KviTQCString encodeText(const TQString &szText); + TQString decodeText(const char * szText); void contextPopup(); // Raises the window (after a light delay to prevent focus pingpongs) @@ -260,25 +261,25 @@ public: bool isMinimized(); bool isMaximized(); // Retrieves the default log file name: this is pre-build - void getDefaultLogFileName(QString &buffer); - // Well...the external geometry :) - QRect externalGeometry(); + void getDefaultLogFileName(TQString &buffer); + // Well...the external tqgeometry :) + TQRect externalGeometry(); void delayedClose(); // close that jumps out of the current event loop // Interesting overridables: virtual void fillContextPopup(KviTalPopupMenu * p); - virtual void getConfigGroupName(QString &buf); + virtual void getConfigGroupName(TQString &buf); // virtual void getBaseLogFileName(KviStr &buffer); - virtual void getBaseLogFileName(QString &buffer); + virtual void getBaseLogFileName(TQString &buffer); virtual void updateCaption(); virtual void applyOptions(); virtual void updateIcon(); - virtual void ownMessage(const QString &text){}; - virtual void ownAction(const QString &text){}; - virtual const QString & plainTextCaption(){ return m_szPlainTextCaption; }; - virtual const QString & htmlActiveCaption(){ return m_szHtmlActiveCaption; }; - virtual const QString & htmlInactiveCaption(){ return m_szHtmlInactiveCaption; }; + virtual void ownMessage(const TQString &text){}; + virtual void ownAction(const TQString &text){}; + virtual const TQString & plainTextCaption(){ return m_szPlainTextCaption; }; + virtual const TQString & htmlActiveCaption(){ return m_szHtmlActiveCaption; }; + virtual const TQString & htmlInactiveCaption(){ return m_szHtmlInactiveCaption; }; virtual void setFocus(); void internalOutput(KviIrcView * pView,int msg_type,const kvi_wchar_t * text,int iFlags=0); @@ -287,10 +288,10 @@ public: virtual void outputNoFmt(int msg_type,const char * text,int iFlags=0); virtual void output(int msg_type,const kvi_wchar_t * format,...); virtual void outputNoFmt(int msg_type,const kvi_wchar_t * text,int iFlags=0){ internalOutput(m_pIrcView,msg_type,text,iFlags); }; - virtual void output(int msg_type,const QString &szFmt,...); - virtual void outputNoFmt(int msg_type,const QString &szText,int iFlags=0); // <-- these are KviIrcView::AppendTextFlags + virtual void output(int msg_type,const TQString &szFmt,...); + virtual void outputNoFmt(int msg_type,const TQString &szText,int iFlags=0); // <-- these are KviIrcView::AppendTextFlags // Just helpers.. FIXME: might be redesigned in some other way - void updateBackgrounds(QObject * obj = 0); + void updateBackgrounds(TQObject * obj = 0); void demandAttention(); bool hasAttention(); @@ -308,11 +309,11 @@ public slots: void reloadImages(); protected slots: void savePropertiesAsDefault(); - void toggleCryptController(); // This has to be here even if the crypt support is enabled...moc does not support conditionals + void toggleCryptController(); // This has to be here even if the crypt support is enabled...tqmoc does not support conditionals void cryptControllerFinished(); // same as above void cryptSessionInfoDestroyed(); // same as above void textEncodingButtonClicked(); - void systemPopupRequest(const QPoint &pnt); + void systemPopupRequest(const TQPoint &pnt); void systemTextEncodingPopupSmartActivated(int id); void systemTextEncodingPopupSmartUtf8Activated(int id); void systemTextEncodingPopupStandardActivated(int id); @@ -339,45 +340,45 @@ protected: // call this in the constructor if your caption is fixed: // it will set m_szPlainTextCaption to szCaption and it will // automatically use it without the need of overriding fillCaptionBuffers - void setFixedCaption(const QString &szCaption); + void setFixedCaption(const TQString &szCaption); // this by default calls fillSingleColorCaptionBuffer(plainTextCaption()); virtual void fillCaptionBuffers(); // protected helper - void fillSingleColorCaptionBuffers(const QString &szName); + void fillSingleColorCaptionBuffers(const TQString &szName); // Virtual events that signal dock state change virtual void youAreDocked(); virtual void youAreUndocked(); // Reimplement to show a special icon in the taskbar items and captions - virtual QPixmap * myIconPtr(); + virtual TQPixmap * myIconPtr(); // Sets the type of this window: be careful with this void setType(int iType); - bool eventFilter(QObject *o,QEvent *e); + bool eventFilter(TQObject *o,TQEvent *e); - // Virtuals overridden to manage the internal layouts... - virtual void moveEvent(QMoveEvent *e); - virtual void closeEvent(QCloseEvent *e); - virtual void wheelEvent(QWheelEvent *e); - virtual void childEvent(QChildEvent *e); - virtual void focusInEvent(QFocusEvent *e); + // Virtuals overridden to manage the internal tqlayouts... + virtual void moveEvent(TQMoveEvent *e); + virtual void closeEvent(TQCloseEvent *e); + virtual void wheelEvent(TQWheelEvent *e); + virtual void childEvent(TQChildEvent *e); + virtual void focusInEvent(TQFocusEvent *e); - void childInserted(QWidget * o); - void childRemoved(QWidget * o); + void childInserted(TQWidget * o); + void childRemoved(TQWidget * o); void activateSelf(); // Internal helpers - void createCryptControllerButton(QWidget * par); - void createTextEncodingButton(QWidget * par); + void createCryptControllerButton(TQWidget * par); + void createTextEncodingButton(TQWidget * par); void createSystemTextEncodingPopup(); - BUTTON_CLASS * createToolButton(QWidget * par,const char * nam,int pixon,int pixoff,const QString & tooltip,bool bOn); + BUTTON_CLASS * createToolButton(TQWidget * par,const char * nam,int pixon,int pixoff,const TQString & tooltip,bool bOn); // This is called by KviInput: actually it links the widgetAdded - virtual void childrenTreeChanged(QWidget * widgetAdded); + virtual void tqchildrenTreeChanged(TQWidget * widgetAdded); virtual bool focusNextPrevChild(bool bNext); - virtual void preprocessMessage(QString & szMessage); + virtual void preprocessMessage(TQString & szMessage); }; #ifndef _KVI_WINDOW_CPP_ diff --git a/src/kvirc/ui/moc_kvi_actiondrawer.cpp b/src/kvirc/ui/moc_kvi_actiondrawer.cpp index 833bc391..7b3bad70 100644 --- a/src/kvirc/ui/moc_kvi_actiondrawer.cpp +++ b/src/kvirc/ui/moc_kvi_actiondrawer.cpp @@ -2,21 +2,21 @@ ** KviActionDrawerPageListView meta object code from reading C++ file 'kvi_actiondrawer.h' ** ** Created: Mon Feb 25 00:12:20 2008 -** by: The Qt MOC ($Id: qt/moc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) +** by: The TQt TQMOC ($Id: qt/tqmoc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ -#undef QT_NO_COMPAT +#undef TQT_NO_COMPAT #include "kvi_actiondrawer.h" -#include -#include - -#include -#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26) -#error "This file was generated using the moc from 3.3.8. It" -#error "cannot be used with the include files from this version of Qt." -#error "(The moc has changed too much.)" +#include +#include + +#include +#if !defined(TQ_TQMOC_OUTPUT_REVISION) || (TQ_TQMOC_OUTPUT_REVISION != 26) +#error "This file was generated using the tqmoc from 3.3.8. It" +#error "cannot be used with the include files from this version of TQt." +#error "(The tqmoc has changed too much.)" #endif const char *KviActionDrawerPageListView::className() const @@ -24,72 +24,72 @@ const char *KviActionDrawerPageListView::className() const return "KviActionDrawerPageListView"; } -QMetaObject *KviActionDrawerPageListView::metaObj = 0; -static QMetaObjectCleanUp cleanUp_KviActionDrawerPageListView( "KviActionDrawerPageListView", &KviActionDrawerPageListView::staticMetaObject ); +TQMetaObject *KviActionDrawerPageListView::metaObj = 0; +static TQMetaObjectCleanUp cleanUp_KviActionDrawerPageListView( "KviActionDrawerPageListView", &KviActionDrawerPageListView::staticMetaObject ); -#ifndef QT_NO_TRANSLATION -QString KviActionDrawerPageListView::tr( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION +TQString KviActionDrawerPageListView::tr( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviActionDrawerPageListView", s, c, QApplication::DefaultCodec ); + if ( tqApp ) + return tqApp->translate( "KviActionDrawerPageListView", s, c, TQApplication::DefaultCodec ); else - return QString::fromLatin1( s ); + return TQString::tqfromLatin1( s ); } -#ifndef QT_NO_TRANSLATION_UTF8 -QString KviActionDrawerPageListView::trUtf8( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION_UTF8 +TQString KviActionDrawerPageListView::trUtf8( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviActionDrawerPageListView", s, c, QApplication::UnicodeUTF8 ); + if ( tqApp ) + return tqApp->translate( "KviActionDrawerPageListView", s, c, TQApplication::UnicodeUTF8 ); else - return QString::fromUtf8( s ); + return TQString::fromUtf8( s ); } -#endif // QT_NO_TRANSLATION_UTF8 +#endif // TQT_NO_TRANSLATION_UTF8 -#endif // QT_NO_TRANSLATION +#endif // TQT_NO_TRANSLATION -QMetaObject* KviActionDrawerPageListView::staticMetaObject() +TQMetaObject* KviActionDrawerPageListView::staticMetaObject() { if ( metaObj ) return metaObj; - QMetaObject* parentObject = KviListView::staticMetaObject(); - metaObj = QMetaObject::new_metaobject( - "KviActionDrawerPageListView", parentObject, + TQMetaObject* tqparentObject = KviListView::staticMetaObject(); + metaObj = TQMetaObject::new_metaobject( + "KviActionDrawerPageListView", tqparentObject, 0, 0, 0, 0, -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES 0, 0, 0, 0, -#endif // QT_NO_PROPERTIES +#endif // TQT_NO_PROPERTIES 0, 0 ); cleanUp_KviActionDrawerPageListView.setMetaObject( metaObj ); return metaObj; } -void* KviActionDrawerPageListView::qt_cast( const char* clname ) +void* KviActionDrawerPageListView::tqqt_cast( const char* clname ) { if ( !qstrcmp( clname, "KviActionDrawerPageListView" ) ) return this; - return KviListView::qt_cast( clname ); + return KviListView::tqqt_cast( clname ); } -bool KviActionDrawerPageListView::qt_invoke( int _id, QUObject* _o ) +bool KviActionDrawerPageListView::qt_invoke( int _id, TQUObject* _o ) { return KviListView::qt_invoke(_id,_o); } -bool KviActionDrawerPageListView::qt_emit( int _id, QUObject* _o ) +bool KviActionDrawerPageListView::qt_emit( int _id, TQUObject* _o ) { return KviListView::qt_emit(_id,_o); } -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES -bool KviActionDrawerPageListView::qt_property( int id, int f, QVariant* v) +bool KviActionDrawerPageListView::qt_property( int id, int f, TQVariant* v) { return KviListView::qt_property( id, f, v); } -bool KviActionDrawerPageListView::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; } -#endif // QT_NO_PROPERTIES +bool KviActionDrawerPageListView::qt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; } +#endif // TQT_NO_PROPERTIES const char *KviActionDrawerPage::className() const @@ -97,72 +97,72 @@ const char *KviActionDrawerPage::className() const return "KviActionDrawerPage"; } -QMetaObject *KviActionDrawerPage::metaObj = 0; -static QMetaObjectCleanUp cleanUp_KviActionDrawerPage( "KviActionDrawerPage", &KviActionDrawerPage::staticMetaObject ); +TQMetaObject *KviActionDrawerPage::metaObj = 0; +static TQMetaObjectCleanUp cleanUp_KviActionDrawerPage( "KviActionDrawerPage", &KviActionDrawerPage::staticMetaObject ); -#ifndef QT_NO_TRANSLATION -QString KviActionDrawerPage::tr( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION +TQString KviActionDrawerPage::tr( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviActionDrawerPage", s, c, QApplication::DefaultCodec ); + if ( tqApp ) + return tqApp->translate( "KviActionDrawerPage", s, c, TQApplication::DefaultCodec ); else - return QString::fromLatin1( s ); + return TQString::tqfromLatin1( s ); } -#ifndef QT_NO_TRANSLATION_UTF8 -QString KviActionDrawerPage::trUtf8( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION_UTF8 +TQString KviActionDrawerPage::trUtf8( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviActionDrawerPage", s, c, QApplication::UnicodeUTF8 ); + if ( tqApp ) + return tqApp->translate( "KviActionDrawerPage", s, c, TQApplication::UnicodeUTF8 ); else - return QString::fromUtf8( s ); + return TQString::fromUtf8( s ); } -#endif // QT_NO_TRANSLATION_UTF8 +#endif // TQT_NO_TRANSLATION_UTF8 -#endif // QT_NO_TRANSLATION +#endif // TQT_NO_TRANSLATION -QMetaObject* KviActionDrawerPage::staticMetaObject() +TQMetaObject* KviActionDrawerPage::staticMetaObject() { if ( metaObj ) return metaObj; - QMetaObject* parentObject = QWidget::staticMetaObject(); - metaObj = QMetaObject::new_metaobject( - "KviActionDrawerPage", parentObject, + TQMetaObject* tqparentObject = TQWidget::staticMetaObject(); + metaObj = TQMetaObject::new_metaobject( + "KviActionDrawerPage", tqparentObject, 0, 0, 0, 0, -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES 0, 0, 0, 0, -#endif // QT_NO_PROPERTIES +#endif // TQT_NO_PROPERTIES 0, 0 ); cleanUp_KviActionDrawerPage.setMetaObject( metaObj ); return metaObj; } -void* KviActionDrawerPage::qt_cast( const char* clname ) +void* KviActionDrawerPage::tqqt_cast( const char* clname ) { if ( !qstrcmp( clname, "KviActionDrawerPage" ) ) return this; - return QWidget::qt_cast( clname ); + return TQWidget::tqqt_cast( clname ); } -bool KviActionDrawerPage::qt_invoke( int _id, QUObject* _o ) +bool KviActionDrawerPage::qt_invoke( int _id, TQUObject* _o ) { - return QWidget::qt_invoke(_id,_o); + return TQWidget::qt_invoke(_id,_o); } -bool KviActionDrawerPage::qt_emit( int _id, QUObject* _o ) +bool KviActionDrawerPage::qt_emit( int _id, TQUObject* _o ) { - return QWidget::qt_emit(_id,_o); + return TQWidget::qt_emit(_id,_o); } -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES -bool KviActionDrawerPage::qt_property( int id, int f, QVariant* v) +bool KviActionDrawerPage::qt_property( int id, int f, TQVariant* v) { - return QWidget::qt_property( id, f, v); + return TQWidget::qt_property( id, f, v); } -bool KviActionDrawerPage::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; } -#endif // QT_NO_PROPERTIES +bool KviActionDrawerPage::qt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; } +#endif // TQT_NO_PROPERTIES const char *KviActionDrawer::className() const @@ -170,69 +170,69 @@ const char *KviActionDrawer::className() const return "KviActionDrawer"; } -QMetaObject *KviActionDrawer::metaObj = 0; -static QMetaObjectCleanUp cleanUp_KviActionDrawer( "KviActionDrawer", &KviActionDrawer::staticMetaObject ); +TQMetaObject *KviActionDrawer::metaObj = 0; +static TQMetaObjectCleanUp cleanUp_KviActionDrawer( "KviActionDrawer", &KviActionDrawer::staticMetaObject ); -#ifndef QT_NO_TRANSLATION -QString KviActionDrawer::tr( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION +TQString KviActionDrawer::tr( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviActionDrawer", s, c, QApplication::DefaultCodec ); + if ( tqApp ) + return tqApp->translate( "KviActionDrawer", s, c, TQApplication::DefaultCodec ); else - return QString::fromLatin1( s ); + return TQString::tqfromLatin1( s ); } -#ifndef QT_NO_TRANSLATION_UTF8 -QString KviActionDrawer::trUtf8( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION_UTF8 +TQString KviActionDrawer::trUtf8( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviActionDrawer", s, c, QApplication::UnicodeUTF8 ); + if ( tqApp ) + return tqApp->translate( "KviActionDrawer", s, c, TQApplication::UnicodeUTF8 ); else - return QString::fromUtf8( s ); + return TQString::fromUtf8( s ); } -#endif // QT_NO_TRANSLATION_UTF8 +#endif // TQT_NO_TRANSLATION_UTF8 -#endif // QT_NO_TRANSLATION +#endif // TQT_NO_TRANSLATION -QMetaObject* KviActionDrawer::staticMetaObject() +TQMetaObject* KviActionDrawer::staticMetaObject() { if ( metaObj ) return metaObj; - QMetaObject* parentObject = QTabWidget::staticMetaObject(); - metaObj = QMetaObject::new_metaobject( - "KviActionDrawer", parentObject, + TQMetaObject* tqparentObject = TQTabWidget::staticMetaObject(); + metaObj = TQMetaObject::new_metaobject( + "KviActionDrawer", tqparentObject, 0, 0, 0, 0, -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES 0, 0, 0, 0, -#endif // QT_NO_PROPERTIES +#endif // TQT_NO_PROPERTIES 0, 0 ); cleanUp_KviActionDrawer.setMetaObject( metaObj ); return metaObj; } -void* KviActionDrawer::qt_cast( const char* clname ) +void* KviActionDrawer::tqqt_cast( const char* clname ) { if ( !qstrcmp( clname, "KviActionDrawer" ) ) return this; - return QTabWidget::qt_cast( clname ); + return TQTabWidget::tqqt_cast( clname ); } -bool KviActionDrawer::qt_invoke( int _id, QUObject* _o ) +bool KviActionDrawer::qt_invoke( int _id, TQUObject* _o ) { - return QTabWidget::qt_invoke(_id,_o); + return TQTabWidget::qt_invoke(_id,_o); } -bool KviActionDrawer::qt_emit( int _id, QUObject* _o ) +bool KviActionDrawer::qt_emit( int _id, TQUObject* _o ) { - return QTabWidget::qt_emit(_id,_o); + return TQTabWidget::qt_emit(_id,_o); } -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES -bool KviActionDrawer::qt_property( int id, int f, QVariant* v) +bool KviActionDrawer::qt_property( int id, int f, TQVariant* v) { - return QTabWidget::qt_property( id, f, v); + return TQTabWidget::qt_property( id, f, v); } -bool KviActionDrawer::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; } -#endif // QT_NO_PROPERTIES +bool KviActionDrawer::qt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; } +#endif // TQT_NO_PROPERTIES diff --git a/src/kvirc/ui/moc_kvi_customtoolbar.cpp b/src/kvirc/ui/moc_kvi_customtoolbar.cpp index 4a89b121..46989ea6 100644 --- a/src/kvirc/ui/moc_kvi_customtoolbar.cpp +++ b/src/kvirc/ui/moc_kvi_customtoolbar.cpp @@ -2,21 +2,21 @@ ** KviCustomToolBarSeparator meta object code from reading C++ file 'kvi_customtoolbar.h' ** ** Created: Mon Feb 25 00:12:23 2008 -** by: The Qt MOC ($Id: qt/moc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) +** by: The TQt TQMOC ($Id: qt/tqmoc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ -#undef QT_NO_COMPAT +#undef TQT_NO_COMPAT #include "kvi_customtoolbar.h" -#include -#include - -#include -#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26) -#error "This file was generated using the moc from 3.3.8. It" -#error "cannot be used with the include files from this version of Qt." -#error "(The moc has changed too much.)" +#include +#include + +#include +#if !defined(TQ_TQMOC_OUTPUT_REVISION) || (TQ_TQMOC_OUTPUT_REVISION != 26) +#error "This file was generated using the tqmoc from 3.3.8. It" +#error "cannot be used with the include files from this version of TQt." +#error "(The tqmoc has changed too much.)" #endif const char *KviCustomToolBarSeparator::className() const @@ -24,72 +24,72 @@ const char *KviCustomToolBarSeparator::className() const return "KviCustomToolBarSeparator"; } -QMetaObject *KviCustomToolBarSeparator::metaObj = 0; -static QMetaObjectCleanUp cleanUp_KviCustomToolBarSeparator( "KviCustomToolBarSeparator", &KviCustomToolBarSeparator::staticMetaObject ); +TQMetaObject *KviCustomToolBarSeparator::metaObj = 0; +static TQMetaObjectCleanUp cleanUp_KviCustomToolBarSeparator( "KviCustomToolBarSeparator", &KviCustomToolBarSeparator::staticMetaObject ); -#ifndef QT_NO_TRANSLATION -QString KviCustomToolBarSeparator::tr( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION +TQString KviCustomToolBarSeparator::tr( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviCustomToolBarSeparator", s, c, QApplication::DefaultCodec ); + if ( tqApp ) + return tqApp->translate( "KviCustomToolBarSeparator", s, c, TQApplication::DefaultCodec ); else - return QString::fromLatin1( s ); + return TQString::tqfromLatin1( s ); } -#ifndef QT_NO_TRANSLATION_UTF8 -QString KviCustomToolBarSeparator::trUtf8( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION_UTF8 +TQString KviCustomToolBarSeparator::trUtf8( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviCustomToolBarSeparator", s, c, QApplication::UnicodeUTF8 ); + if ( tqApp ) + return tqApp->translate( "KviCustomToolBarSeparator", s, c, TQApplication::UnicodeUTF8 ); else - return QString::fromUtf8( s ); + return TQString::fromUtf8( s ); } -#endif // QT_NO_TRANSLATION_UTF8 +#endif // TQT_NO_TRANSLATION_UTF8 -#endif // QT_NO_TRANSLATION +#endif // TQT_NO_TRANSLATION -QMetaObject* KviCustomToolBarSeparator::staticMetaObject() +TQMetaObject* KviCustomToolBarSeparator::staticMetaObject() { if ( metaObj ) return metaObj; - QMetaObject* parentObject = QWidget::staticMetaObject(); - metaObj = QMetaObject::new_metaobject( - "KviCustomToolBarSeparator", parentObject, + TQMetaObject* tqparentObject = TQWidget::staticMetaObject(); + metaObj = TQMetaObject::new_metaobject( + "KviCustomToolBarSeparator", tqparentObject, 0, 0, 0, 0, -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES 0, 0, 0, 0, -#endif // QT_NO_PROPERTIES +#endif // TQT_NO_PROPERTIES 0, 0 ); cleanUp_KviCustomToolBarSeparator.setMetaObject( metaObj ); return metaObj; } -void* KviCustomToolBarSeparator::qt_cast( const char* clname ) +void* KviCustomToolBarSeparator::tqqt_cast( const char* clname ) { if ( !qstrcmp( clname, "KviCustomToolBarSeparator" ) ) return this; - return QWidget::qt_cast( clname ); + return TQWidget::tqqt_cast( clname ); } -bool KviCustomToolBarSeparator::qt_invoke( int _id, QUObject* _o ) +bool KviCustomToolBarSeparator::qt_invoke( int _id, TQUObject* _o ) { - return QWidget::qt_invoke(_id,_o); + return TQWidget::qt_invoke(_id,_o); } -bool KviCustomToolBarSeparator::qt_emit( int _id, QUObject* _o ) +bool KviCustomToolBarSeparator::qt_emit( int _id, TQUObject* _o ) { - return QWidget::qt_emit(_id,_o); + return TQWidget::qt_emit(_id,_o); } -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES -bool KviCustomToolBarSeparator::qt_property( int id, int f, QVariant* v) +bool KviCustomToolBarSeparator::qt_property( int id, int f, TQVariant* v) { - return QWidget::qt_property( id, f, v); + return TQWidget::qt_property( id, f, v); } -bool KviCustomToolBarSeparator::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; } -#endif // QT_NO_PROPERTIES +bool KviCustomToolBarSeparator::qt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; } +#endif // TQT_NO_PROPERTIES const char *KviCustomToolBar::className() const @@ -97,63 +97,63 @@ const char *KviCustomToolBar::className() const return "KviCustomToolBar"; } -QMetaObject *KviCustomToolBar::metaObj = 0; -static QMetaObjectCleanUp cleanUp_KviCustomToolBar( "KviCustomToolBar", &KviCustomToolBar::staticMetaObject ); +TQMetaObject *KviCustomToolBar::metaObj = 0; +static TQMetaObjectCleanUp cleanUp_KviCustomToolBar( "KviCustomToolBar", &KviCustomToolBar::staticMetaObject ); -#ifndef QT_NO_TRANSLATION -QString KviCustomToolBar::tr( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION +TQString KviCustomToolBar::tr( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviCustomToolBar", s, c, QApplication::DefaultCodec ); + if ( tqApp ) + return tqApp->translate( "KviCustomToolBar", s, c, TQApplication::DefaultCodec ); else - return QString::fromLatin1( s ); + return TQString::tqfromLatin1( s ); } -#ifndef QT_NO_TRANSLATION_UTF8 -QString KviCustomToolBar::trUtf8( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION_UTF8 +TQString KviCustomToolBar::trUtf8( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviCustomToolBar", s, c, QApplication::UnicodeUTF8 ); + if ( tqApp ) + return tqApp->translate( "KviCustomToolBar", s, c, TQApplication::UnicodeUTF8 ); else - return QString::fromUtf8( s ); + return TQString::fromUtf8( s ); } -#endif // QT_NO_TRANSLATION_UTF8 +#endif // TQT_NO_TRANSLATION_UTF8 -#endif // QT_NO_TRANSLATION +#endif // TQT_NO_TRANSLATION -QMetaObject* KviCustomToolBar::staticMetaObject() +TQMetaObject* KviCustomToolBar::staticMetaObject() { if ( metaObj ) return metaObj; - QMetaObject* parentObject = KviToolBar::staticMetaObject(); - static const QUMethod slot_0 = {"beginCustomize", 0, 0 }; - static const QUMethod slot_1 = {"endCustomize", 0, 0 }; - static const QUMethod slot_2 = {"filteredChildDestroyed", 0, 0 }; - static const QMetaData slot_tbl[] = { - { "beginCustomize()", &slot_0, QMetaData::Protected }, - { "endCustomize()", &slot_1, QMetaData::Protected }, - { "filteredChildDestroyed()", &slot_2, QMetaData::Protected } + TQMetaObject* tqparentObject = KviToolBar::staticMetaObject(); + static const TQUMethod slot_0 = {"beginCustomize", 0, 0 }; + static const TQUMethod slot_1 = {"endCustomize", 0, 0 }; + static const TQUMethod slot_2 = {"filteredChildDestroyed", 0, 0 }; + static const TQMetaData slot_tbl[] = { + { "beginCustomize()", &slot_0, TQMetaData::Protected }, + { "endCustomize()", &slot_1, TQMetaData::Protected }, + { "filteredChildDestroyed()", &slot_2, TQMetaData::Protected } }; - metaObj = QMetaObject::new_metaobject( - "KviCustomToolBar", parentObject, + metaObj = TQMetaObject::new_metaobject( + "KviCustomToolBar", tqparentObject, slot_tbl, 3, 0, 0, -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES 0, 0, 0, 0, -#endif // QT_NO_PROPERTIES +#endif // TQT_NO_PROPERTIES 0, 0 ); cleanUp_KviCustomToolBar.setMetaObject( metaObj ); return metaObj; } -void* KviCustomToolBar::qt_cast( const char* clname ) +void* KviCustomToolBar::tqqt_cast( const char* clname ) { if ( !qstrcmp( clname, "KviCustomToolBar" ) ) return this; - return KviToolBar::qt_cast( clname ); + return KviToolBar::tqqt_cast( clname ); } -bool KviCustomToolBar::qt_invoke( int _id, QUObject* _o ) +bool KviCustomToolBar::qt_invoke( int _id, TQUObject* _o ) { switch ( _id - staticMetaObject()->slotOffset() ) { case 0: beginCustomize(); break; @@ -165,16 +165,16 @@ bool KviCustomToolBar::qt_invoke( int _id, QUObject* _o ) return TRUE; } -bool KviCustomToolBar::qt_emit( int _id, QUObject* _o ) +bool KviCustomToolBar::qt_emit( int _id, TQUObject* _o ) { return KviToolBar::qt_emit(_id,_o); } -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES -bool KviCustomToolBar::qt_property( int id, int f, QVariant* v) +bool KviCustomToolBar::qt_property( int id, int f, TQVariant* v) { return KviToolBar::qt_property( id, f, v); } -bool KviCustomToolBar::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; } -#endif // QT_NO_PROPERTIES +bool KviCustomToolBar::qt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; } +#endif // TQT_NO_PROPERTIES diff --git a/src/kvirc/ui/moc_kvi_debugwindow.cpp b/src/kvirc/ui/moc_kvi_debugwindow.cpp index 5e3da82c..5e096e25 100644 --- a/src/kvirc/ui/moc_kvi_debugwindow.cpp +++ b/src/kvirc/ui/moc_kvi_debugwindow.cpp @@ -2,21 +2,21 @@ ** KviDebugWindow meta object code from reading C++ file 'kvi_debugwindow.h' ** ** Created: Mon Feb 25 00:12:25 2008 -** by: The Qt MOC ($Id: qt/moc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) +** by: The TQt TQMOC ($Id: qt/tqmoc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ -#undef QT_NO_COMPAT +#undef TQT_NO_COMPAT #include "kvi_debugwindow.h" -#include -#include +#include +#include -#include -#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26) -#error "This file was generated using the moc from 3.3.8. It" -#error "cannot be used with the include files from this version of Qt." -#error "(The moc has changed too much.)" +#include +#if !defined(TQ_TQMOC_OUTPUT_REVISION) || (TQ_TQMOC_OUTPUT_REVISION != 26) +#error "This file was generated using the tqmoc from 3.3.8. It" +#error "cannot be used with the include files from this version of TQt." +#error "(The tqmoc has changed too much.)" #endif const char *KviDebugWindow::className() const @@ -24,69 +24,69 @@ const char *KviDebugWindow::className() const return "KviDebugWindow"; } -QMetaObject *KviDebugWindow::metaObj = 0; -static QMetaObjectCleanUp cleanUp_KviDebugWindow( "KviDebugWindow", &KviDebugWindow::staticMetaObject ); +TQMetaObject *KviDebugWindow::metaObj = 0; +static TQMetaObjectCleanUp cleanUp_KviDebugWindow( "KviDebugWindow", &KviDebugWindow::staticMetaObject ); -#ifndef QT_NO_TRANSLATION -QString KviDebugWindow::tr( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION +TQString KviDebugWindow::tr( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviDebugWindow", s, c, QApplication::DefaultCodec ); + if ( tqApp ) + return tqApp->translate( "KviDebugWindow", s, c, TQApplication::DefaultCodec ); else - return QString::fromLatin1( s ); + return TQString::tqfromLatin1( s ); } -#ifndef QT_NO_TRANSLATION_UTF8 -QString KviDebugWindow::trUtf8( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION_UTF8 +TQString KviDebugWindow::trUtf8( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviDebugWindow", s, c, QApplication::UnicodeUTF8 ); + if ( tqApp ) + return tqApp->translate( "KviDebugWindow", s, c, TQApplication::UnicodeUTF8 ); else - return QString::fromUtf8( s ); + return TQString::fromUtf8( s ); } -#endif // QT_NO_TRANSLATION_UTF8 +#endif // TQT_NO_TRANSLATION_UTF8 -#endif // QT_NO_TRANSLATION +#endif // TQT_NO_TRANSLATION -QMetaObject* KviDebugWindow::staticMetaObject() +TQMetaObject* KviDebugWindow::staticMetaObject() { if ( metaObj ) return metaObj; - QMetaObject* parentObject = KviWindow::staticMetaObject(); - metaObj = QMetaObject::new_metaobject( - "KviDebugWindow", parentObject, + TQMetaObject* tqparentObject = KviWindow::staticMetaObject(); + metaObj = TQMetaObject::new_metaobject( + "KviDebugWindow", tqparentObject, 0, 0, 0, 0, -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES 0, 0, 0, 0, -#endif // QT_NO_PROPERTIES +#endif // TQT_NO_PROPERTIES 0, 0 ); cleanUp_KviDebugWindow.setMetaObject( metaObj ); return metaObj; } -void* KviDebugWindow::qt_cast( const char* clname ) +void* KviDebugWindow::tqqt_cast( const char* clname ) { if ( !qstrcmp( clname, "KviDebugWindow" ) ) return this; - return KviWindow::qt_cast( clname ); + return KviWindow::tqqt_cast( clname ); } -bool KviDebugWindow::qt_invoke( int _id, QUObject* _o ) +bool KviDebugWindow::qt_invoke( int _id, TQUObject* _o ) { return KviWindow::qt_invoke(_id,_o); } -bool KviDebugWindow::qt_emit( int _id, QUObject* _o ) +bool KviDebugWindow::qt_emit( int _id, TQUObject* _o ) { return KviWindow::qt_emit(_id,_o); } -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES -bool KviDebugWindow::qt_property( int id, int f, QVariant* v) +bool KviDebugWindow::qt_property( int id, int f, TQVariant* v) { return KviWindow::qt_property( id, f, v); } -bool KviDebugWindow::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; } -#endif // QT_NO_PROPERTIES +bool KviDebugWindow::qt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; } +#endif // TQT_NO_PROPERTIES diff --git a/src/kvirc/ui/moc_kvi_htmldialog.cpp b/src/kvirc/ui/moc_kvi_htmldialog.cpp index 62d76814..d98ff98a 100644 --- a/src/kvirc/ui/moc_kvi_htmldialog.cpp +++ b/src/kvirc/ui/moc_kvi_htmldialog.cpp @@ -2,21 +2,21 @@ ** KviHtmlDialog meta object code from reading C++ file 'kvi_htmldialog.h' ** ** Created: Mon Feb 25 00:12:27 2008 -** by: The Qt MOC ($Id: qt/moc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) +** by: The TQt TQMOC ($Id: qt/tqmoc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ -#undef QT_NO_COMPAT +#undef TQT_NO_COMPAT #include "kvi_htmldialog.h" -#include -#include +#include +#include -#include -#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26) -#error "This file was generated using the moc from 3.3.8. It" -#error "cannot be used with the include files from this version of Qt." -#error "(The moc has changed too much.)" +#include +#if !defined(TQ_TQMOC_OUTPUT_REVISION) || (TQ_TQMOC_OUTPUT_REVISION != 26) +#error "This file was generated using the tqmoc from 3.3.8. It" +#error "cannot be used with the include files from this version of TQt." +#error "(The tqmoc has changed too much.)" #endif const char *KviHtmlDialog::className() const @@ -24,84 +24,84 @@ const char *KviHtmlDialog::className() const return "KviHtmlDialog"; } -QMetaObject *KviHtmlDialog::metaObj = 0; -static QMetaObjectCleanUp cleanUp_KviHtmlDialog( "KviHtmlDialog", &KviHtmlDialog::staticMetaObject ); +TQMetaObject *KviHtmlDialog::metaObj = 0; +static TQMetaObjectCleanUp cleanUp_KviHtmlDialog( "KviHtmlDialog", &KviHtmlDialog::staticMetaObject ); -#ifndef QT_NO_TRANSLATION -QString KviHtmlDialog::tr( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION +TQString KviHtmlDialog::tr( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviHtmlDialog", s, c, QApplication::DefaultCodec ); + if ( tqApp ) + return tqApp->translate( "KviHtmlDialog", s, c, TQApplication::DefaultCodec ); else - return QString::fromLatin1( s ); + return TQString::tqfromLatin1( s ); } -#ifndef QT_NO_TRANSLATION_UTF8 -QString KviHtmlDialog::trUtf8( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION_UTF8 +TQString KviHtmlDialog::trUtf8( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviHtmlDialog", s, c, QApplication::UnicodeUTF8 ); + if ( tqApp ) + return tqApp->translate( "KviHtmlDialog", s, c, TQApplication::UnicodeUTF8 ); else - return QString::fromUtf8( s ); + return TQString::fromUtf8( s ); } -#endif // QT_NO_TRANSLATION_UTF8 +#endif // TQT_NO_TRANSLATION_UTF8 -#endif // QT_NO_TRANSLATION +#endif // TQT_NO_TRANSLATION -QMetaObject* KviHtmlDialog::staticMetaObject() +TQMetaObject* KviHtmlDialog::staticMetaObject() { if ( metaObj ) return metaObj; - QMetaObject* parentObject = QDialog::staticMetaObject(); - static const QUMethod slot_0 = {"button1Pressed", 0, 0 }; - static const QUMethod slot_1 = {"button2Pressed", 0, 0 }; - static const QUMethod slot_2 = {"button3Pressed", 0, 0 }; - static const QMetaData slot_tbl[] = { - { "button1Pressed()", &slot_0, QMetaData::Protected }, - { "button2Pressed()", &slot_1, QMetaData::Protected }, - { "button3Pressed()", &slot_2, QMetaData::Protected } + TQMetaObject* tqparentObject = TQDialog::staticMetaObject(); + static const TQUMethod slot_0 = {"button1Pressed", 0, 0 }; + static const TQUMethod slot_1 = {"button2Pressed", 0, 0 }; + static const TQUMethod slot_2 = {"button3Pressed", 0, 0 }; + static const TQMetaData slot_tbl[] = { + { "button1Pressed()", &slot_0, TQMetaData::Protected }, + { "button2Pressed()", &slot_1, TQMetaData::Protected }, + { "button3Pressed()", &slot_2, TQMetaData::Protected } }; - metaObj = QMetaObject::new_metaobject( - "KviHtmlDialog", parentObject, + metaObj = TQMetaObject::new_metaobject( + "KviHtmlDialog", tqparentObject, slot_tbl, 3, 0, 0, -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES 0, 0, 0, 0, -#endif // QT_NO_PROPERTIES +#endif // TQT_NO_PROPERTIES 0, 0 ); cleanUp_KviHtmlDialog.setMetaObject( metaObj ); return metaObj; } -void* KviHtmlDialog::qt_cast( const char* clname ) +void* KviHtmlDialog::tqqt_cast( const char* clname ) { if ( !qstrcmp( clname, "KviHtmlDialog" ) ) return this; - return QDialog::qt_cast( clname ); + return TQDialog::tqqt_cast( clname ); } -bool KviHtmlDialog::qt_invoke( int _id, QUObject* _o ) +bool KviHtmlDialog::qt_invoke( int _id, TQUObject* _o ) { switch ( _id - staticMetaObject()->slotOffset() ) { case 0: button1Pressed(); break; case 1: button2Pressed(); break; case 2: button3Pressed(); break; default: - return QDialog::qt_invoke( _id, _o ); + return TQDialog::qt_invoke( _id, _o ); } return TRUE; } -bool KviHtmlDialog::qt_emit( int _id, QUObject* _o ) +bool KviHtmlDialog::qt_emit( int _id, TQUObject* _o ) { - return QDialog::qt_emit(_id,_o); + return TQDialog::qt_emit(_id,_o); } -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES -bool KviHtmlDialog::qt_property( int id, int f, QVariant* v) +bool KviHtmlDialog::qt_property( int id, int f, TQVariant* v) { - return QDialog::qt_property( id, f, v); + return TQDialog::qt_property( id, f, v); } -bool KviHtmlDialog::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; } -#endif // QT_NO_PROPERTIES +bool KviHtmlDialog::qt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; } +#endif // TQT_NO_PROPERTIES diff --git a/src/kvirc/ui/moc_kvi_imagedialog.cpp b/src/kvirc/ui/moc_kvi_imagedialog.cpp index be88643c..22a1e621 100644 --- a/src/kvirc/ui/moc_kvi_imagedialog.cpp +++ b/src/kvirc/ui/moc_kvi_imagedialog.cpp @@ -2,21 +2,21 @@ ** KviImageDialog meta object code from reading C++ file 'kvi_imagedialog.h' ** ** Created: Mon Feb 25 00:12:28 2008 -** by: The Qt MOC ($Id: qt/moc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) +** by: The TQt TQMOC ($Id: qt/tqmoc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ -#undef QT_NO_COMPAT +#undef TQT_NO_COMPAT #include "kvi_imagedialog.h" -#include -#include +#include +#include -#include -#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26) -#error "This file was generated using the moc from 3.3.8. It" -#error "cannot be used with the include files from this version of Qt." -#error "(The moc has changed too much.)" +#include +#if !defined(TQ_TQMOC_OUTPUT_REVISION) || (TQ_TQMOC_OUTPUT_REVISION != 26) +#error "This file was generated using the tqmoc from 3.3.8. It" +#error "cannot be used with the include files from this version of TQt." +#error "(The tqmoc has changed too much.)" #endif const char *KviImageDialog::className() const @@ -24,103 +24,103 @@ const char *KviImageDialog::className() const return "KviImageDialog"; } -QMetaObject *KviImageDialog::metaObj = 0; -static QMetaObjectCleanUp cleanUp_KviImageDialog( "KviImageDialog", &KviImageDialog::staticMetaObject ); +TQMetaObject *KviImageDialog::metaObj = 0; +static TQMetaObjectCleanUp cleanUp_KviImageDialog( "KviImageDialog", &KviImageDialog::staticMetaObject ); -#ifndef QT_NO_TRANSLATION -QString KviImageDialog::tr( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION +TQString KviImageDialog::tr( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviImageDialog", s, c, QApplication::DefaultCodec ); + if ( tqApp ) + return tqApp->translate( "KviImageDialog", s, c, TQApplication::DefaultCodec ); else - return QString::fromLatin1( s ); + return TQString::tqfromLatin1( s ); } -#ifndef QT_NO_TRANSLATION_UTF8 -QString KviImageDialog::trUtf8( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION_UTF8 +TQString KviImageDialog::trUtf8( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviImageDialog", s, c, QApplication::UnicodeUTF8 ); + if ( tqApp ) + return tqApp->translate( "KviImageDialog", s, c, TQApplication::UnicodeUTF8 ); else - return QString::fromUtf8( s ); + return TQString::fromUtf8( s ); } -#endif // QT_NO_TRANSLATION_UTF8 +#endif // TQT_NO_TRANSLATION_UTF8 -#endif // QT_NO_TRANSLATION +#endif // TQT_NO_TRANSLATION -QMetaObject* KviImageDialog::staticMetaObject() +TQMetaObject* KviImageDialog::staticMetaObject() { if ( metaObj ) return metaObj; - QMetaObject* parentObject = QDialog::staticMetaObject(); - static const QUMethod slot_0 = {"okClicked", 0, 0 }; - static const QUMethod slot_1 = {"cancelClicked", 0, 0 }; - static const QUMethod slot_2 = {"heartbeat", 0, 0 }; - static const QUParameter param_slot_3[] = { - { "index", &static_QUType_int, 0, QUParameter::In } + TQMetaObject* tqparentObject = TQDialog::staticMetaObject(); + static const TQUMethod slot_0 = {"okClicked", 0, 0 }; + static const TQUMethod slot_1 = {"cancelClicked", 0, 0 }; + static const TQUMethod slot_2 = {"heartbeat", 0, 0 }; + static const TQUParameter param_slot_3[] = { + { "index", &static_TQUType_int, 0, TQUParameter::In } }; - static const QUMethod slot_3 = {"jobTypeSelected", 1, param_slot_3 }; - static const QUParameter param_slot_4[] = { - { "it", &static_QUType_ptr, "KviTalListBoxItem", QUParameter::In } + static const TQUMethod slot_3 = {"jobTypeSelected", 1, param_slot_3 }; + static const TQUParameter param_slot_4[] = { + { "it", &static_TQUType_ptr, "KviTalListBoxItem", TQUParameter::In } }; - static const QUMethod slot_4 = {"itemDoubleClicked", 1, param_slot_4 }; - static const QUParameter param_slot_5[] = { - { 0, &static_QUType_ptr, "KviDynamicToolTip", QUParameter::In }, - { "pnt", &static_QUType_varptr, "\x0e", QUParameter::In } + static const TQUMethod slot_4 = {"itemDoubleClicked", 1, param_slot_4 }; + static const TQUParameter param_slot_5[] = { + { 0, &static_TQUType_ptr, "KviDynamicToolTip", TQUParameter::In }, + { "pnt", &static_TQUType_varptr, "\x0e", TQUParameter::In } }; - static const QUMethod slot_5 = {"tipRequest", 2, param_slot_5 }; - static const QMetaData slot_tbl[] = { - { "okClicked()", &slot_0, QMetaData::Protected }, - { "cancelClicked()", &slot_1, QMetaData::Protected }, - { "heartbeat()", &slot_2, QMetaData::Protected }, - { "jobTypeSelected(int)", &slot_3, QMetaData::Protected }, - { "itemDoubleClicked(KviTalListBoxItem*)", &slot_4, QMetaData::Protected }, - { "tipRequest(KviDynamicToolTip*,const QPoint&)", &slot_5, QMetaData::Protected } + static const TQUMethod slot_5 = {"tipRequest", 2, param_slot_5 }; + static const TQMetaData slot_tbl[] = { + { "okClicked()", &slot_0, TQMetaData::Protected }, + { "cancelClicked()", &slot_1, TQMetaData::Protected }, + { "heartbeat()", &slot_2, TQMetaData::Protected }, + { "jobTypeSelected(int)", &slot_3, TQMetaData::Protected }, + { "itemDoubleClicked(KviTalListBoxItem*)", &slot_4, TQMetaData::Protected }, + { "tipRequest(KviDynamicToolTip*,const TQPoint&)", &slot_5, TQMetaData::Protected } }; - metaObj = QMetaObject::new_metaobject( - "KviImageDialog", parentObject, + metaObj = TQMetaObject::new_metaobject( + "KviImageDialog", tqparentObject, slot_tbl, 6, 0, 0, -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES 0, 0, 0, 0, -#endif // QT_NO_PROPERTIES +#endif // TQT_NO_PROPERTIES 0, 0 ); cleanUp_KviImageDialog.setMetaObject( metaObj ); return metaObj; } -void* KviImageDialog::qt_cast( const char* clname ) +void* KviImageDialog::tqqt_cast( const char* clname ) { if ( !qstrcmp( clname, "KviImageDialog" ) ) return this; - return QDialog::qt_cast( clname ); + return TQDialog::tqqt_cast( clname ); } -bool KviImageDialog::qt_invoke( int _id, QUObject* _o ) +bool KviImageDialog::qt_invoke( int _id, TQUObject* _o ) { switch ( _id - staticMetaObject()->slotOffset() ) { case 0: okClicked(); break; case 1: cancelClicked(); break; case 2: heartbeat(); break; - case 3: jobTypeSelected((int)static_QUType_int.get(_o+1)); break; - case 4: itemDoubleClicked((KviTalListBoxItem*)static_QUType_ptr.get(_o+1)); break; - case 5: tipRequest((KviDynamicToolTip*)static_QUType_ptr.get(_o+1),(const QPoint&)*((const QPoint*)static_QUType_ptr.get(_o+2))); break; + case 3: jobTypeSelected((int)static_TQUType_int.get(_o+1)); break; + case 4: itemDoubleClicked((KviTalListBoxItem*)static_TQUType_ptr.get(_o+1)); break; + case 5: tipRequest((KviDynamicToolTip*)static_TQUType_ptr.get(_o+1),(const TQPoint&)*((const TQPoint*)static_TQUType_ptr.get(_o+2))); break; default: - return QDialog::qt_invoke( _id, _o ); + return TQDialog::qt_invoke( _id, _o ); } return TRUE; } -bool KviImageDialog::qt_emit( int _id, QUObject* _o ) +bool KviImageDialog::qt_emit( int _id, TQUObject* _o ) { - return QDialog::qt_emit(_id,_o); + return TQDialog::qt_emit(_id,_o); } -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES -bool KviImageDialog::qt_property( int id, int f, QVariant* v) +bool KviImageDialog::qt_property( int id, int f, TQVariant* v) { - return QDialog::qt_property( id, f, v); + return TQDialog::qt_property( id, f, v); } -bool KviImageDialog::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; } -#endif // QT_NO_PROPERTIES +bool KviImageDialog::qt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; } +#endif // TQT_NO_PROPERTIES diff --git a/src/kvirc/ui/moc_kvi_ircviewtools.cpp b/src/kvirc/ui/moc_kvi_ircviewtools.cpp index e44adb66..37f7c77a 100644 --- a/src/kvirc/ui/moc_kvi_ircviewtools.cpp +++ b/src/kvirc/ui/moc_kvi_ircviewtools.cpp @@ -2,21 +2,21 @@ ** KviIrcViewToolWidget meta object code from reading C++ file 'kvi_ircviewtools.h' ** ** Created: Mon Feb 25 00:12:30 2008 -** by: The Qt MOC ($Id: qt/moc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) +** by: The TQt TQMOC ($Id: qt/tqmoc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ -#undef QT_NO_COMPAT +#undef TQT_NO_COMPAT #include "kvi_ircviewtools.h" -#include -#include +#include +#include -#include -#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26) -#error "This file was generated using the moc from 3.3.8. It" -#error "cannot be used with the include files from this version of Qt." -#error "(The moc has changed too much.)" +#include +#if !defined(TQ_TQMOC_OUTPUT_REVISION) || (TQ_TQMOC_OUTPUT_REVISION != 26) +#error "This file was generated using the tqmoc from 3.3.8. It" +#error "cannot be used with the include files from this version of TQt." +#error "(The tqmoc has changed too much.)" #endif const char *KviIrcViewToolWidget::className() const @@ -24,69 +24,69 @@ const char *KviIrcViewToolWidget::className() const return "KviIrcViewToolWidget"; } -QMetaObject *KviIrcViewToolWidget::metaObj = 0; -static QMetaObjectCleanUp cleanUp_KviIrcViewToolWidget( "KviIrcViewToolWidget", &KviIrcViewToolWidget::staticMetaObject ); +TQMetaObject *KviIrcViewToolWidget::metaObj = 0; +static TQMetaObjectCleanUp cleanUp_KviIrcViewToolWidget( "KviIrcViewToolWidget", &KviIrcViewToolWidget::staticMetaObject ); -#ifndef QT_NO_TRANSLATION -QString KviIrcViewToolWidget::tr( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION +TQString KviIrcViewToolWidget::tr( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviIrcViewToolWidget", s, c, QApplication::DefaultCodec ); + if ( tqApp ) + return tqApp->translate( "KviIrcViewToolWidget", s, c, TQApplication::DefaultCodec ); else - return QString::fromLatin1( s ); + return TQString::tqfromLatin1( s ); } -#ifndef QT_NO_TRANSLATION_UTF8 -QString KviIrcViewToolWidget::trUtf8( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION_UTF8 +TQString KviIrcViewToolWidget::trUtf8( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviIrcViewToolWidget", s, c, QApplication::UnicodeUTF8 ); + if ( tqApp ) + return tqApp->translate( "KviIrcViewToolWidget", s, c, TQApplication::UnicodeUTF8 ); else - return QString::fromUtf8( s ); + return TQString::fromUtf8( s ); } -#endif // QT_NO_TRANSLATION_UTF8 +#endif // TQT_NO_TRANSLATION_UTF8 -#endif // QT_NO_TRANSLATION +#endif // TQT_NO_TRANSLATION -QMetaObject* KviIrcViewToolWidget::staticMetaObject() +TQMetaObject* KviIrcViewToolWidget::staticMetaObject() { if ( metaObj ) return metaObj; - QMetaObject* parentObject = QFrame::staticMetaObject(); - static const QUMethod slot_0 = {"findPrev", 0, 0 }; - static const QUMethod slot_1 = {"findNext", 0, 0 }; - static const QUMethod slot_2 = {"filterEnableAll", 0, 0 }; - static const QUMethod slot_3 = {"filterEnableNone", 0, 0 }; - static const QUMethod slot_4 = {"filterSave", 0, 0 }; - static const QUMethod slot_5 = {"filterLoad", 0, 0 }; - static const QMetaData slot_tbl[] = { - { "findPrev()", &slot_0, QMetaData::Protected }, - { "findNext()", &slot_1, QMetaData::Protected }, - { "filterEnableAll()", &slot_2, QMetaData::Protected }, - { "filterEnableNone()", &slot_3, QMetaData::Protected }, - { "filterSave()", &slot_4, QMetaData::Protected }, - { "filterLoad()", &slot_5, QMetaData::Protected } + TQMetaObject* tqparentObject = TQFrame::staticMetaObject(); + static const TQUMethod slot_0 = {"findPrev", 0, 0 }; + static const TQUMethod slot_1 = {"findNext", 0, 0 }; + static const TQUMethod slot_2 = {"filterEnableAll", 0, 0 }; + static const TQUMethod slot_3 = {"filterEnableNone", 0, 0 }; + static const TQUMethod slot_4 = {"filterSave", 0, 0 }; + static const TQUMethod slot_5 = {"filterLoad", 0, 0 }; + static const TQMetaData slot_tbl[] = { + { "findPrev()", &slot_0, TQMetaData::Protected }, + { "findNext()", &slot_1, TQMetaData::Protected }, + { "filterEnableAll()", &slot_2, TQMetaData::Protected }, + { "filterEnableNone()", &slot_3, TQMetaData::Protected }, + { "filterSave()", &slot_4, TQMetaData::Protected }, + { "filterLoad()", &slot_5, TQMetaData::Protected } }; - metaObj = QMetaObject::new_metaobject( - "KviIrcViewToolWidget", parentObject, + metaObj = TQMetaObject::new_metaobject( + "KviIrcViewToolWidget", tqparentObject, slot_tbl, 6, 0, 0, -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES 0, 0, 0, 0, -#endif // QT_NO_PROPERTIES +#endif // TQT_NO_PROPERTIES 0, 0 ); cleanUp_KviIrcViewToolWidget.setMetaObject( metaObj ); return metaObj; } -void* KviIrcViewToolWidget::qt_cast( const char* clname ) +void* KviIrcViewToolWidget::tqqt_cast( const char* clname ) { if ( !qstrcmp( clname, "KviIrcViewToolWidget" ) ) return this; - return QFrame::qt_cast( clname ); + return TQFrame::tqqt_cast( clname ); } -bool KviIrcViewToolWidget::qt_invoke( int _id, QUObject* _o ) +bool KviIrcViewToolWidget::qt_invoke( int _id, TQUObject* _o ) { switch ( _id - staticMetaObject()->slotOffset() ) { case 0: findPrev(); break; @@ -96,21 +96,21 @@ bool KviIrcViewToolWidget::qt_invoke( int _id, QUObject* _o ) case 4: filterSave(); break; case 5: filterLoad(); break; default: - return QFrame::qt_invoke( _id, _o ); + return TQFrame::qt_invoke( _id, _o ); } return TRUE; } -bool KviIrcViewToolWidget::qt_emit( int _id, QUObject* _o ) +bool KviIrcViewToolWidget::qt_emit( int _id, TQUObject* _o ) { - return QFrame::qt_emit(_id,_o); + return TQFrame::qt_emit(_id,_o); } -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES -bool KviIrcViewToolWidget::qt_property( int id, int f, QVariant* v) +bool KviIrcViewToolWidget::qt_property( int id, int f, TQVariant* v) { - return QFrame::qt_property( id, f, v); + return TQFrame::qt_property( id, f, v); } -bool KviIrcViewToolWidget::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; } -#endif // QT_NO_PROPERTIES +bool KviIrcViewToolWidget::qt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; } +#endif // TQT_NO_PROPERTIES diff --git a/src/kvirc/ui/moc_kvi_listview.cpp b/src/kvirc/ui/moc_kvi_listview.cpp index f9f61186..30ebd519 100644 --- a/src/kvirc/ui/moc_kvi_listview.cpp +++ b/src/kvirc/ui/moc_kvi_listview.cpp @@ -2,21 +2,21 @@ ** KviListView meta object code from reading C++ file 'kvi_listview.h' ** ** Created: Mon Feb 25 00:12:44 2008 -** by: The Qt MOC ($Id: qt/moc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) +** by: The TQt TQMOC ($Id: qt/tqmoc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ -#undef QT_NO_COMPAT +#undef TQT_NO_COMPAT #include "kvi_listview.h" -#include -#include +#include +#include -#include -#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26) -#error "This file was generated using the moc from 3.3.8. It" -#error "cannot be used with the include files from this version of Qt." -#error "(The moc has changed too much.)" +#include +#if !defined(TQ_TQMOC_OUTPUT_REVISION) || (TQ_TQMOC_OUTPUT_REVISION != 26) +#error "This file was generated using the tqmoc from 3.3.8. It" +#error "cannot be used with the include files from this version of TQt." +#error "(The tqmoc has changed too much.)" #endif const char *KviListView::className() const @@ -24,69 +24,69 @@ const char *KviListView::className() const return "KviListView"; } -QMetaObject *KviListView::metaObj = 0; -static QMetaObjectCleanUp cleanUp_KviListView( "KviListView", &KviListView::staticMetaObject ); +TQMetaObject *KviListView::metaObj = 0; +static TQMetaObjectCleanUp cleanUp_KviListView( "KviListView", &KviListView::staticMetaObject ); -#ifndef QT_NO_TRANSLATION -QString KviListView::tr( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION +TQString KviListView::tr( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviListView", s, c, QApplication::DefaultCodec ); + if ( tqApp ) + return tqApp->translate( "KviListView", s, c, TQApplication::DefaultCodec ); else - return QString::fromLatin1( s ); + return TQString::tqfromLatin1( s ); } -#ifndef QT_NO_TRANSLATION_UTF8 -QString KviListView::trUtf8( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION_UTF8 +TQString KviListView::trUtf8( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviListView", s, c, QApplication::UnicodeUTF8 ); + if ( tqApp ) + return tqApp->translate( "KviListView", s, c, TQApplication::UnicodeUTF8 ); else - return QString::fromUtf8( s ); + return TQString::fromUtf8( s ); } -#endif // QT_NO_TRANSLATION_UTF8 +#endif // TQT_NO_TRANSLATION_UTF8 -#endif // QT_NO_TRANSLATION +#endif // TQT_NO_TRANSLATION -QMetaObject* KviListView::staticMetaObject() +TQMetaObject* KviListView::staticMetaObject() { if ( metaObj ) return metaObj; - QMetaObject* parentObject = KviTalListView::staticMetaObject(); - metaObj = QMetaObject::new_metaobject( - "KviListView", parentObject, + TQMetaObject* tqparentObject = KviTalListView::staticMetaObject(); + metaObj = TQMetaObject::new_metaobject( + "KviListView", tqparentObject, 0, 0, 0, 0, -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES 0, 0, 0, 0, -#endif // QT_NO_PROPERTIES +#endif // TQT_NO_PROPERTIES 0, 0 ); cleanUp_KviListView.setMetaObject( metaObj ); return metaObj; } -void* KviListView::qt_cast( const char* clname ) +void* KviListView::tqqt_cast( const char* clname ) { if ( !qstrcmp( clname, "KviListView" ) ) return this; - return KviTalListView::qt_cast( clname ); + return KviTalListView::tqqt_cast( clname ); } -bool KviListView::qt_invoke( int _id, QUObject* _o ) +bool KviListView::qt_invoke( int _id, TQUObject* _o ) { return KviTalListView::qt_invoke(_id,_o); } -bool KviListView::qt_emit( int _id, QUObject* _o ) +bool KviListView::qt_emit( int _id, TQUObject* _o ) { return KviTalListView::qt_emit(_id,_o); } -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES -bool KviListView::qt_property( int id, int f, QVariant* v) +bool KviListView::qt_property( int id, int f, TQVariant* v) { return KviTalListView::qt_property( id, f, v); } -bool KviListView::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; } -#endif // QT_NO_PROPERTIES +bool KviListView::qt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; } +#endif // TQT_NO_PROPERTIES diff --git a/src/kvirc/ui/moc_kvi_mdicaption.cpp b/src/kvirc/ui/moc_kvi_mdicaption.cpp index 3e027b92..3966c6e8 100644 --- a/src/kvirc/ui/moc_kvi_mdicaption.cpp +++ b/src/kvirc/ui/moc_kvi_mdicaption.cpp @@ -2,21 +2,21 @@ ** KviMdiCaptionButton meta object code from reading C++ file 'kvi_mdicaption.h' ** ** Created: Mon Feb 25 00:12:32 2008 -** by: The Qt MOC ($Id: qt/moc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) +** by: The TQt TQMOC ($Id: qt/tqmoc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ -#undef QT_NO_COMPAT +#undef TQT_NO_COMPAT #include "kvi_mdicaption.h" -#include -#include - -#include -#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26) -#error "This file was generated using the moc from 3.3.8. It" -#error "cannot be used with the include files from this version of Qt." -#error "(The moc has changed too much.)" +#include +#include + +#include +#if !defined(TQ_TQMOC_OUTPUT_REVISION) || (TQ_TQMOC_OUTPUT_REVISION != 26) +#error "This file was generated using the tqmoc from 3.3.8. It" +#error "cannot be used with the include files from this version of TQt." +#error "(The tqmoc has changed too much.)" #endif const char *KviMdiCaptionButton::className() const @@ -24,72 +24,72 @@ const char *KviMdiCaptionButton::className() const return "KviMdiCaptionButton"; } -QMetaObject *KviMdiCaptionButton::metaObj = 0; -static QMetaObjectCleanUp cleanUp_KviMdiCaptionButton( "KviMdiCaptionButton", &KviMdiCaptionButton::staticMetaObject ); +TQMetaObject *KviMdiCaptionButton::metaObj = 0; +static TQMetaObjectCleanUp cleanUp_KviMdiCaptionButton( "KviMdiCaptionButton", &KviMdiCaptionButton::staticMetaObject ); -#ifndef QT_NO_TRANSLATION -QString KviMdiCaptionButton::tr( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION +TQString KviMdiCaptionButton::tr( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviMdiCaptionButton", s, c, QApplication::DefaultCodec ); + if ( tqApp ) + return tqApp->translate( "KviMdiCaptionButton", s, c, TQApplication::DefaultCodec ); else - return QString::fromLatin1( s ); + return TQString::tqfromLatin1( s ); } -#ifndef QT_NO_TRANSLATION_UTF8 -QString KviMdiCaptionButton::trUtf8( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION_UTF8 +TQString KviMdiCaptionButton::trUtf8( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviMdiCaptionButton", s, c, QApplication::UnicodeUTF8 ); + if ( tqApp ) + return tqApp->translate( "KviMdiCaptionButton", s, c, TQApplication::UnicodeUTF8 ); else - return QString::fromUtf8( s ); + return TQString::fromUtf8( s ); } -#endif // QT_NO_TRANSLATION_UTF8 +#endif // TQT_NO_TRANSLATION_UTF8 -#endif // QT_NO_TRANSLATION +#endif // TQT_NO_TRANSLATION -QMetaObject* KviMdiCaptionButton::staticMetaObject() +TQMetaObject* KviMdiCaptionButton::staticMetaObject() { if ( metaObj ) return metaObj; - QMetaObject* parentObject = QToolButton::staticMetaObject(); - metaObj = QMetaObject::new_metaobject( - "KviMdiCaptionButton", parentObject, + TQMetaObject* tqparentObject = TQToolButton::staticMetaObject(); + metaObj = TQMetaObject::new_metaobject( + "KviMdiCaptionButton", tqparentObject, 0, 0, 0, 0, -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES 0, 0, 0, 0, -#endif // QT_NO_PROPERTIES +#endif // TQT_NO_PROPERTIES 0, 0 ); cleanUp_KviMdiCaptionButton.setMetaObject( metaObj ); return metaObj; } -void* KviMdiCaptionButton::qt_cast( const char* clname ) +void* KviMdiCaptionButton::tqqt_cast( const char* clname ) { if ( !qstrcmp( clname, "KviMdiCaptionButton" ) ) return this; - return QToolButton::qt_cast( clname ); + return TQToolButton::tqqt_cast( clname ); } -bool KviMdiCaptionButton::qt_invoke( int _id, QUObject* _o ) +bool KviMdiCaptionButton::qt_invoke( int _id, TQUObject* _o ) { - return QToolButton::qt_invoke(_id,_o); + return TQToolButton::qt_invoke(_id,_o); } -bool KviMdiCaptionButton::qt_emit( int _id, QUObject* _o ) +bool KviMdiCaptionButton::qt_emit( int _id, TQUObject* _o ) { - return QToolButton::qt_emit(_id,_o); + return TQToolButton::qt_emit(_id,_o); } -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES -bool KviMdiCaptionButton::qt_property( int id, int f, QVariant* v) +bool KviMdiCaptionButton::qt_property( int id, int f, TQVariant* v) { - return QToolButton::qt_property( id, f, v); + return TQToolButton::qt_property( id, f, v); } -bool KviMdiCaptionButton::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; } -#endif // QT_NO_PROPERTIES +bool KviMdiCaptionButton::qt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; } +#endif // TQT_NO_PROPERTIES const char *KviMenuBarToolButton::className() const @@ -97,72 +97,72 @@ const char *KviMenuBarToolButton::className() const return "KviMenuBarToolButton"; } -QMetaObject *KviMenuBarToolButton::metaObj = 0; -static QMetaObjectCleanUp cleanUp_KviMenuBarToolButton( "KviMenuBarToolButton", &KviMenuBarToolButton::staticMetaObject ); +TQMetaObject *KviMenuBarToolButton::metaObj = 0; +static TQMetaObjectCleanUp cleanUp_KviMenuBarToolButton( "KviMenuBarToolButton", &KviMenuBarToolButton::staticMetaObject ); -#ifndef QT_NO_TRANSLATION -QString KviMenuBarToolButton::tr( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION +TQString KviMenuBarToolButton::tr( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviMenuBarToolButton", s, c, QApplication::DefaultCodec ); + if ( tqApp ) + return tqApp->translate( "KviMenuBarToolButton", s, c, TQApplication::DefaultCodec ); else - return QString::fromLatin1( s ); + return TQString::tqfromLatin1( s ); } -#ifndef QT_NO_TRANSLATION_UTF8 -QString KviMenuBarToolButton::trUtf8( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION_UTF8 +TQString KviMenuBarToolButton::trUtf8( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviMenuBarToolButton", s, c, QApplication::UnicodeUTF8 ); + if ( tqApp ) + return tqApp->translate( "KviMenuBarToolButton", s, c, TQApplication::UnicodeUTF8 ); else - return QString::fromUtf8( s ); + return TQString::fromUtf8( s ); } -#endif // QT_NO_TRANSLATION_UTF8 +#endif // TQT_NO_TRANSLATION_UTF8 -#endif // QT_NO_TRANSLATION +#endif // TQT_NO_TRANSLATION -QMetaObject* KviMenuBarToolButton::staticMetaObject() +TQMetaObject* KviMenuBarToolButton::staticMetaObject() { if ( metaObj ) return metaObj; - QMetaObject* parentObject = KviStyledToolButton::staticMetaObject(); - metaObj = QMetaObject::new_metaobject( - "KviMenuBarToolButton", parentObject, + TQMetaObject* tqparentObject = KviStyledToolButton::staticMetaObject(); + metaObj = TQMetaObject::new_metaobject( + "KviMenuBarToolButton", tqparentObject, 0, 0, 0, 0, -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES 0, 0, 0, 0, -#endif // QT_NO_PROPERTIES +#endif // TQT_NO_PROPERTIES 0, 0 ); cleanUp_KviMenuBarToolButton.setMetaObject( metaObj ); return metaObj; } -void* KviMenuBarToolButton::qt_cast( const char* clname ) +void* KviMenuBarToolButton::tqqt_cast( const char* clname ) { if ( !qstrcmp( clname, "KviMenuBarToolButton" ) ) return this; - return KviStyledToolButton::qt_cast( clname ); + return KviStyledToolButton::tqqt_cast( clname ); } -bool KviMenuBarToolButton::qt_invoke( int _id, QUObject* _o ) +bool KviMenuBarToolButton::qt_invoke( int _id, TQUObject* _o ) { return KviStyledToolButton::qt_invoke(_id,_o); } -bool KviMenuBarToolButton::qt_emit( int _id, QUObject* _o ) +bool KviMenuBarToolButton::qt_emit( int _id, TQUObject* _o ) { return KviStyledToolButton::qt_emit(_id,_o); } -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES -bool KviMenuBarToolButton::qt_property( int id, int f, QVariant* v) +bool KviMenuBarToolButton::qt_property( int id, int f, TQVariant* v) { return KviStyledToolButton::qt_property( id, f, v); } -bool KviMenuBarToolButton::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; } -#endif // QT_NO_PROPERTIES +bool KviMenuBarToolButton::qt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; } +#endif // TQT_NO_PROPERTIES const char *KviMdiCaption::className() const @@ -170,69 +170,69 @@ const char *KviMdiCaption::className() const return "KviMdiCaption"; } -QMetaObject *KviMdiCaption::metaObj = 0; -static QMetaObjectCleanUp cleanUp_KviMdiCaption( "KviMdiCaption", &KviMdiCaption::staticMetaObject ); +TQMetaObject *KviMdiCaption::metaObj = 0; +static TQMetaObjectCleanUp cleanUp_KviMdiCaption( "KviMdiCaption", &KviMdiCaption::staticMetaObject ); -#ifndef QT_NO_TRANSLATION -QString KviMdiCaption::tr( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION +TQString KviMdiCaption::tr( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviMdiCaption", s, c, QApplication::DefaultCodec ); + if ( tqApp ) + return tqApp->translate( "KviMdiCaption", s, c, TQApplication::DefaultCodec ); else - return QString::fromLatin1( s ); + return TQString::tqfromLatin1( s ); } -#ifndef QT_NO_TRANSLATION_UTF8 -QString KviMdiCaption::trUtf8( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION_UTF8 +TQString KviMdiCaption::trUtf8( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviMdiCaption", s, c, QApplication::UnicodeUTF8 ); + if ( tqApp ) + return tqApp->translate( "KviMdiCaption", s, c, TQApplication::UnicodeUTF8 ); else - return QString::fromUtf8( s ); + return TQString::fromUtf8( s ); } -#endif // QT_NO_TRANSLATION_UTF8 +#endif // TQT_NO_TRANSLATION_UTF8 -#endif // QT_NO_TRANSLATION +#endif // TQT_NO_TRANSLATION -QMetaObject* KviMdiCaption::staticMetaObject() +TQMetaObject* KviMdiCaption::staticMetaObject() { if ( metaObj ) return metaObj; - QMetaObject* parentObject = QWidget::staticMetaObject(); - metaObj = QMetaObject::new_metaobject( - "KviMdiCaption", parentObject, + TQMetaObject* tqparentObject = TQWidget::staticMetaObject(); + metaObj = TQMetaObject::new_metaobject( + "KviMdiCaption", tqparentObject, 0, 0, 0, 0, -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES 0, 0, 0, 0, -#endif // QT_NO_PROPERTIES +#endif // TQT_NO_PROPERTIES 0, 0 ); cleanUp_KviMdiCaption.setMetaObject( metaObj ); return metaObj; } -void* KviMdiCaption::qt_cast( const char* clname ) +void* KviMdiCaption::tqqt_cast( const char* clname ) { if ( !qstrcmp( clname, "KviMdiCaption" ) ) return this; - return QWidget::qt_cast( clname ); + return TQWidget::tqqt_cast( clname ); } -bool KviMdiCaption::qt_invoke( int _id, QUObject* _o ) +bool KviMdiCaption::qt_invoke( int _id, TQUObject* _o ) { - return QWidget::qt_invoke(_id,_o); + return TQWidget::qt_invoke(_id,_o); } -bool KviMdiCaption::qt_emit( int _id, QUObject* _o ) +bool KviMdiCaption::qt_emit( int _id, TQUObject* _o ) { - return QWidget::qt_emit(_id,_o); + return TQWidget::qt_emit(_id,_o); } -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES -bool KviMdiCaption::qt_property( int id, int f, QVariant* v) +bool KviMdiCaption::qt_property( int id, int f, TQVariant* v) { - return QWidget::qt_property( id, f, v); + return TQWidget::qt_property( id, f, v); } -bool KviMdiCaption::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; } -#endif // QT_NO_PROPERTIES +bool KviMdiCaption::qt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; } +#endif // TQT_NO_PROPERTIES diff --git a/src/kvirc/ui/moc_kvi_mdichild.cpp b/src/kvirc/ui/moc_kvi_mdichild.cpp index 3fcefcda..ae461eba 100644 --- a/src/kvirc/ui/moc_kvi_mdichild.cpp +++ b/src/kvirc/ui/moc_kvi_mdichild.cpp @@ -2,21 +2,21 @@ ** KviMdiChild meta object code from reading C++ file 'kvi_mdichild.h' ** ** Created: Mon Feb 25 00:12:34 2008 -** by: The Qt MOC ($Id: qt/moc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) +** by: The TQt TQMOC ($Id: qt/tqmoc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ -#undef QT_NO_COMPAT +#undef TQT_NO_COMPAT #include "kvi_mdichild.h" -#include -#include +#include +#include -#include -#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26) -#error "This file was generated using the moc from 3.3.8. It" -#error "cannot be used with the include files from this version of Qt." -#error "(The moc has changed too much.)" +#include +#if !defined(TQ_TQMOC_OUTPUT_REVISION) || (TQ_TQMOC_OUTPUT_REVISION != 26) +#error "This file was generated using the tqmoc from 3.3.8. It" +#error "cannot be used with the include files from this version of TQt." +#error "(The tqmoc has changed too much.)" #endif const char *KviMdiChild::className() const @@ -24,90 +24,90 @@ const char *KviMdiChild::className() const return "KviMdiChild"; } -QMetaObject *KviMdiChild::metaObj = 0; -static QMetaObjectCleanUp cleanUp_KviMdiChild( "KviMdiChild", &KviMdiChild::staticMetaObject ); +TQMetaObject *KviMdiChild::metaObj = 0; +static TQMetaObjectCleanUp cleanUp_KviMdiChild( "KviMdiChild", &KviMdiChild::staticMetaObject ); -#ifndef QT_NO_TRANSLATION -QString KviMdiChild::tr( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION +TQString KviMdiChild::tr( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviMdiChild", s, c, QApplication::DefaultCodec ); + if ( tqApp ) + return tqApp->translate( "KviMdiChild", s, c, TQApplication::DefaultCodec ); else - return QString::fromLatin1( s ); + return TQString::tqfromLatin1( s ); } -#ifndef QT_NO_TRANSLATION_UTF8 -QString KviMdiChild::trUtf8( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION_UTF8 +TQString KviMdiChild::trUtf8( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviMdiChild", s, c, QApplication::UnicodeUTF8 ); + if ( tqApp ) + return tqApp->translate( "KviMdiChild", s, c, TQApplication::UnicodeUTF8 ); else - return QString::fromUtf8( s ); + return TQString::fromUtf8( s ); } -#endif // QT_NO_TRANSLATION_UTF8 +#endif // TQT_NO_TRANSLATION_UTF8 -#endif // QT_NO_TRANSLATION +#endif // TQT_NO_TRANSLATION -QMetaObject* KviMdiChild::staticMetaObject() +TQMetaObject* KviMdiChild::staticMetaObject() { if ( metaObj ) return metaObj; - QMetaObject* parentObject = QFrame::staticMetaObject(); - static const QUMethod slot_0 = {"maximize", 0, 0 }; - static const QUMethod slot_1 = {"minimize", 0, 0 }; - static const QUMethod slot_2 = {"restore", 0, 0 }; - static const QUMethod slot_3 = {"systemPopupSlot", 0, 0 }; - static const QUMethod slot_4 = {"closeRequest", 0, 0 }; - static const QMetaData slot_tbl[] = { - { "maximize()", &slot_0, QMetaData::Public }, - { "minimize()", &slot_1, QMetaData::Public }, - { "restore()", &slot_2, QMetaData::Public }, - { "systemPopupSlot()", &slot_3, QMetaData::Public }, - { "closeRequest()", &slot_4, QMetaData::Public } + TQMetaObject* tqparentObject = TQFrame::staticMetaObject(); + static const TQUMethod slot_0 = {"maximize", 0, 0 }; + static const TQUMethod slot_1 = {"minimize", 0, 0 }; + static const TQUMethod slot_2 = {"restore", 0, 0 }; + static const TQUMethod slot_3 = {"systemPopupSlot", 0, 0 }; + static const TQUMethod slot_4 = {"closeRequest", 0, 0 }; + static const TQMetaData slot_tbl[] = { + { "maximize()", &slot_0, TQMetaData::Public }, + { "minimize()", &slot_1, TQMetaData::Public }, + { "restore()", &slot_2, TQMetaData::Public }, + { "systemPopupSlot()", &slot_3, TQMetaData::Public }, + { "closeRequest()", &slot_4, TQMetaData::Public } }; - static const QUParameter param_signal_0[] = { - { "pnt", &static_QUType_varptr, "\x0e", QUParameter::In } + static const TQUParameter param_signal_0[] = { + { "pnt", &static_TQUType_varptr, "\x0e", TQUParameter::In } }; - static const QUMethod signal_0 = {"systemPopupRequest", 1, param_signal_0 }; - static const QMetaData signal_tbl[] = { - { "systemPopupRequest(const QPoint&)", &signal_0, QMetaData::Public } + static const TQUMethod signal_0 = {"systemPopupRequest", 1, param_signal_0 }; + static const TQMetaData signal_tbl[] = { + { "systemPopupRequest(const TQPoint&)", &signal_0, TQMetaData::Public } }; - metaObj = QMetaObject::new_metaobject( - "KviMdiChild", parentObject, + metaObj = TQMetaObject::new_metaobject( + "KviMdiChild", tqparentObject, slot_tbl, 5, signal_tbl, 1, -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES 0, 0, 0, 0, -#endif // QT_NO_PROPERTIES +#endif // TQT_NO_PROPERTIES 0, 0 ); cleanUp_KviMdiChild.setMetaObject( metaObj ); return metaObj; } -void* KviMdiChild::qt_cast( const char* clname ) +void* KviMdiChild::tqqt_cast( const char* clname ) { if ( !qstrcmp( clname, "KviMdiChild" ) ) return this; - return QFrame::qt_cast( clname ); + return TQFrame::tqqt_cast( clname ); } -#include -#include +#include +#include -// SIGNAL systemPopupRequest -void KviMdiChild::systemPopupRequest( const QPoint& t0 ) +// TQT_SIGNAL systemPopupRequest +void KviMdiChild::systemPopupRequest( const TQPoint& t0 ) { if ( signalsBlocked() ) return; - QConnectionList *clist = receivers( staticMetaObject()->signalOffset() + 0 ); + TQConnectionList *clist = tqreceivers( staticMetaObject()->signalOffset() + 0 ); if ( !clist ) return; - QUObject o[2]; - static_QUType_varptr.set(o+1,&t0); + TQUObject o[2]; + static_TQUType_varptr.set(o+1,&t0); activate_signal( clist, o ); } -bool KviMdiChild::qt_invoke( int _id, QUObject* _o ) +bool KviMdiChild::qt_invoke( int _id, TQUObject* _o ) { switch ( _id - staticMetaObject()->slotOffset() ) { case 0: maximize(); break; @@ -116,26 +116,26 @@ bool KviMdiChild::qt_invoke( int _id, QUObject* _o ) case 3: systemPopupSlot(); break; case 4: closeRequest(); break; default: - return QFrame::qt_invoke( _id, _o ); + return TQFrame::qt_invoke( _id, _o ); } return TRUE; } -bool KviMdiChild::qt_emit( int _id, QUObject* _o ) +bool KviMdiChild::qt_emit( int _id, TQUObject* _o ) { switch ( _id - staticMetaObject()->signalOffset() ) { - case 0: systemPopupRequest((const QPoint&)*((const QPoint*)static_QUType_ptr.get(_o+1))); break; + case 0: systemPopupRequest((const TQPoint&)*((const TQPoint*)static_TQUType_ptr.get(_o+1))); break; default: - return QFrame::qt_emit(_id,_o); + return TQFrame::qt_emit(_id,_o); } return TRUE; } -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES -bool KviMdiChild::qt_property( int id, int f, QVariant* v) +bool KviMdiChild::qt_property( int id, int f, TQVariant* v) { - return QFrame::qt_property( id, f, v); + return TQFrame::qt_property( id, f, v); } -bool KviMdiChild::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; } -#endif // QT_NO_PROPERTIES +bool KviMdiChild::qt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; } +#endif // TQT_NO_PROPERTIES diff --git a/src/kvirc/ui/moc_kvi_mdimanager.cpp b/src/kvirc/ui/moc_kvi_mdimanager.cpp index fed719be..0ddbf668 100644 --- a/src/kvirc/ui/moc_kvi_mdimanager.cpp +++ b/src/kvirc/ui/moc_kvi_mdimanager.cpp @@ -2,21 +2,21 @@ ** KviMdiManager meta object code from reading C++ file 'kvi_mdimanager.h' ** ** Created: Mon Feb 25 00:12:36 2008 -** by: The Qt MOC ($Id: qt/moc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) +** by: The TQt TQMOC ($Id: qt/tqmoc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ -#undef QT_NO_COMPAT +#undef TQT_NO_COMPAT #include "kvi_mdimanager.h" -#include -#include +#include +#include -#include -#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26) -#error "This file was generated using the moc from 3.3.8. It" -#error "cannot be used with the include files from this version of Qt." -#error "(The moc has changed too much.)" +#include +#if !defined(TQ_TQMOC_OUTPUT_REVISION) || (TQ_TQMOC_OUTPUT_REVISION != 26) +#error "This file was generated using the tqmoc from 3.3.8. It" +#error "cannot be used with the include files from this version of TQt." +#error "(The tqmoc has changed too much.)" #endif const char *KviMdiManager::className() const @@ -24,126 +24,126 @@ const char *KviMdiManager::className() const return "KviMdiManager"; } -QMetaObject *KviMdiManager::metaObj = 0; -static QMetaObjectCleanUp cleanUp_KviMdiManager( "KviMdiManager", &KviMdiManager::staticMetaObject ); +TQMetaObject *KviMdiManager::metaObj = 0; +static TQMetaObjectCleanUp cleanUp_KviMdiManager( "KviMdiManager", &KviMdiManager::staticMetaObject ); -#ifndef QT_NO_TRANSLATION -QString KviMdiManager::tr( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION +TQString KviMdiManager::tr( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviMdiManager", s, c, QApplication::DefaultCodec ); + if ( tqApp ) + return tqApp->translate( "KviMdiManager", s, c, TQApplication::DefaultCodec ); else - return QString::fromLatin1( s ); + return TQString::tqfromLatin1( s ); } -#ifndef QT_NO_TRANSLATION_UTF8 -QString KviMdiManager::trUtf8( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION_UTF8 +TQString KviMdiManager::trUtf8( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviMdiManager", s, c, QApplication::UnicodeUTF8 ); + if ( tqApp ) + return tqApp->translate( "KviMdiManager", s, c, TQApplication::UnicodeUTF8 ); else - return QString::fromUtf8( s ); + return TQString::fromUtf8( s ); } -#endif // QT_NO_TRANSLATION_UTF8 +#endif // TQT_NO_TRANSLATION_UTF8 -#endif // QT_NO_TRANSLATION +#endif // TQT_NO_TRANSLATION -QMetaObject* KviMdiManager::staticMetaObject() +TQMetaObject* KviMdiManager::staticMetaObject() { if ( metaObj ) return metaObj; - QMetaObject* parentObject = KviTalScrollView::staticMetaObject(); - static const QUMethod slot_0 = {"relayoutMenuButtons", 0, 0 }; - static const QUMethod slot_1 = {"cascadeWindows", 0, 0 }; - static const QUMethod slot_2 = {"cascadeMaximized", 0, 0 }; - static const QUMethod slot_3 = {"expandVertical", 0, 0 }; - static const QUMethod slot_4 = {"expandHorizontal", 0, 0 }; - static const QUMethod slot_5 = {"minimizeAll", 0, 0 }; - static const QUMethod slot_6 = {"tile", 0, 0 }; - static const QUMethod slot_7 = {"toggleAutoTile", 0, 0 }; - static const QUMethod slot_8 = {"tileAnodine", 0, 0 }; - static const QUMethod slot_9 = {"reloadImages", 0, 0 }; - static const QUMethod slot_10 = {"minimizeActiveChild", 0, 0 }; - static const QUMethod slot_11 = {"restoreActiveChild", 0, 0 }; - static const QUMethod slot_12 = {"closeActiveChild", 0, 0 }; - static const QUMethod slot_13 = {"activeChildSystemPopup", 0, 0 }; - static const QUParameter param_slot_14[] = { - { "id", &static_QUType_int, 0, QUParameter::In } + TQMetaObject* tqparentObject = KviTalScrollView::staticMetaObject(); + static const TQUMethod slot_0 = {"retqlayoutMenuButtons", 0, 0 }; + static const TQUMethod slot_1 = {"cascadeWindows", 0, 0 }; + static const TQUMethod slot_2 = {"cascadeMaximized", 0, 0 }; + static const TQUMethod slot_3 = {"expandVertical", 0, 0 }; + static const TQUMethod slot_4 = {"expandHorizontal", 0, 0 }; + static const TQUMethod slot_5 = {"minimizeAll", 0, 0 }; + static const TQUMethod slot_6 = {"tile", 0, 0 }; + static const TQUMethod slot_7 = {"toggleAutoTile", 0, 0 }; + static const TQUMethod slot_8 = {"tileAnodine", 0, 0 }; + static const TQUMethod slot_9 = {"reloadImages", 0, 0 }; + static const TQUMethod slot_10 = {"minimizeActiveChild", 0, 0 }; + static const TQUMethod slot_11 = {"restoreActiveChild", 0, 0 }; + static const TQUMethod slot_12 = {"closeActiveChild", 0, 0 }; + static const TQUMethod slot_13 = {"activeChildSystemPopup", 0, 0 }; + static const TQUParameter param_slot_14[] = { + { "id", &static_TQUType_int, 0, TQUParameter::In } }; - static const QUMethod slot_14 = {"menuActivated", 1, param_slot_14 }; - static const QUParameter param_slot_15[] = { - { "id", &static_QUType_int, 0, QUParameter::In } + static const TQUMethod slot_14 = {"menuActivated", 1, param_slot_14 }; + static const TQUParameter param_slot_15[] = { + { "id", &static_TQUType_int, 0, TQUParameter::In } }; - static const QUMethod slot_15 = {"tileMethodMenuActivated", 1, param_slot_15 }; - static const QUMethod slot_16 = {"fillWindowPopup", 0, 0 }; - static const QUMethod slot_17 = {"sdiMinimizeButtonDestroyed", 0, 0 }; - static const QUMethod slot_18 = {"sdiRestoreButtonDestroyed", 0, 0 }; - static const QUMethod slot_19 = {"sdiCloseButtonDestroyed", 0, 0 }; - static const QUMethod slot_20 = {"sdiIconButtonDestroyed", 0, 0 }; - static const QMetaData slot_tbl[] = { - { "relayoutMenuButtons()", &slot_0, QMetaData::Public }, - { "cascadeWindows()", &slot_1, QMetaData::Public }, - { "cascadeMaximized()", &slot_2, QMetaData::Public }, - { "expandVertical()", &slot_3, QMetaData::Public }, - { "expandHorizontal()", &slot_4, QMetaData::Public }, - { "minimizeAll()", &slot_5, QMetaData::Public }, - { "tile()", &slot_6, QMetaData::Public }, - { "toggleAutoTile()", &slot_7, QMetaData::Public }, - { "tileAnodine()", &slot_8, QMetaData::Public }, - { "reloadImages()", &slot_9, QMetaData::Public }, - { "minimizeActiveChild()", &slot_10, QMetaData::Protected }, - { "restoreActiveChild()", &slot_11, QMetaData::Protected }, - { "closeActiveChild()", &slot_12, QMetaData::Protected }, - { "activeChildSystemPopup()", &slot_13, QMetaData::Protected }, - { "menuActivated(int)", &slot_14, QMetaData::Protected }, - { "tileMethodMenuActivated(int)", &slot_15, QMetaData::Protected }, - { "fillWindowPopup()", &slot_16, QMetaData::Protected }, - { "sdiMinimizeButtonDestroyed()", &slot_17, QMetaData::Protected }, - { "sdiRestoreButtonDestroyed()", &slot_18, QMetaData::Protected }, - { "sdiCloseButtonDestroyed()", &slot_19, QMetaData::Protected }, - { "sdiIconButtonDestroyed()", &slot_20, QMetaData::Protected } + static const TQUMethod slot_15 = {"tileMethodMenuActivated", 1, param_slot_15 }; + static const TQUMethod slot_16 = {"fillWindowPopup", 0, 0 }; + static const TQUMethod slot_17 = {"sdiMinimizeButtonDestroyed", 0, 0 }; + static const TQUMethod slot_18 = {"sdiRestoreButtonDestroyed", 0, 0 }; + static const TQUMethod slot_19 = {"sdiCloseButtonDestroyed", 0, 0 }; + static const TQUMethod slot_20 = {"sdiIconButtonDestroyed", 0, 0 }; + static const TQMetaData slot_tbl[] = { + { "retqlayoutMenuButtons()", &slot_0, TQMetaData::Public }, + { "cascadeWindows()", &slot_1, TQMetaData::Public }, + { "cascadeMaximized()", &slot_2, TQMetaData::Public }, + { "expandVertical()", &slot_3, TQMetaData::Public }, + { "expandHorizontal()", &slot_4, TQMetaData::Public }, + { "minimizeAll()", &slot_5, TQMetaData::Public }, + { "tile()", &slot_6, TQMetaData::Public }, + { "toggleAutoTile()", &slot_7, TQMetaData::Public }, + { "tileAnodine()", &slot_8, TQMetaData::Public }, + { "reloadImages()", &slot_9, TQMetaData::Public }, + { "minimizeActiveChild()", &slot_10, TQMetaData::Protected }, + { "restoreActiveChild()", &slot_11, TQMetaData::Protected }, + { "closeActiveChild()", &slot_12, TQMetaData::Protected }, + { "activeChildSystemPopup()", &slot_13, TQMetaData::Protected }, + { "menuActivated(int)", &slot_14, TQMetaData::Protected }, + { "tileMethodMenuActivated(int)", &slot_15, TQMetaData::Protected }, + { "fillWindowPopup()", &slot_16, TQMetaData::Protected }, + { "sdiMinimizeButtonDestroyed()", &slot_17, TQMetaData::Protected }, + { "sdiRestoreButtonDestroyed()", &slot_18, TQMetaData::Protected }, + { "sdiCloseButtonDestroyed()", &slot_19, TQMetaData::Protected }, + { "sdiIconButtonDestroyed()", &slot_20, TQMetaData::Protected } }; - static const QUMethod signal_0 = {"enteredSdiMode", 0, 0 }; - static const QUMethod signal_1 = {"leftSdiMode", 0, 0 }; - static const QMetaData signal_tbl[] = { - { "enteredSdiMode()", &signal_0, QMetaData::Private }, - { "leftSdiMode()", &signal_1, QMetaData::Private } + static const TQUMethod signal_0 = {"enteredSdiMode", 0, 0 }; + static const TQUMethod signal_1 = {"leftSdiMode", 0, 0 }; + static const TQMetaData signal_tbl[] = { + { "enteredSdiMode()", &signal_0, TQMetaData::Private }, + { "leftSdiMode()", &signal_1, TQMetaData::Private } }; - metaObj = QMetaObject::new_metaobject( - "KviMdiManager", parentObject, + metaObj = TQMetaObject::new_metaobject( + "KviMdiManager", tqparentObject, slot_tbl, 21, signal_tbl, 2, -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES 0, 0, 0, 0, -#endif // QT_NO_PROPERTIES +#endif // TQT_NO_PROPERTIES 0, 0 ); cleanUp_KviMdiManager.setMetaObject( metaObj ); return metaObj; } -void* KviMdiManager::qt_cast( const char* clname ) +void* KviMdiManager::tqqt_cast( const char* clname ) { if ( !qstrcmp( clname, "KviMdiManager" ) ) return this; - return KviTalScrollView::qt_cast( clname ); + return KviTalScrollView::tqqt_cast( clname ); } -// SIGNAL enteredSdiMode +// TQT_SIGNAL enteredSdiMode void KviMdiManager::enteredSdiMode() { activate_signal( staticMetaObject()->signalOffset() + 0 ); } -// SIGNAL leftSdiMode +// TQT_SIGNAL leftSdiMode void KviMdiManager::leftSdiMode() { activate_signal( staticMetaObject()->signalOffset() + 1 ); } -bool KviMdiManager::qt_invoke( int _id, QUObject* _o ) +bool KviMdiManager::qt_invoke( int _id, TQUObject* _o ) { switch ( _id - staticMetaObject()->slotOffset() ) { - case 0: relayoutMenuButtons(); break; + case 0: retqlayoutMenuButtons(); break; case 1: cascadeWindows(); break; case 2: cascadeMaximized(); break; case 3: expandVertical(); break; @@ -157,8 +157,8 @@ bool KviMdiManager::qt_invoke( int _id, QUObject* _o ) case 11: restoreActiveChild(); break; case 12: closeActiveChild(); break; case 13: activeChildSystemPopup(); break; - case 14: menuActivated((int)static_QUType_int.get(_o+1)); break; - case 15: tileMethodMenuActivated((int)static_QUType_int.get(_o+1)); break; + case 14: menuActivated((int)static_TQUType_int.get(_o+1)); break; + case 15: tileMethodMenuActivated((int)static_TQUType_int.get(_o+1)); break; case 16: fillWindowPopup(); break; case 17: sdiMinimizeButtonDestroyed(); break; case 18: sdiRestoreButtonDestroyed(); break; @@ -170,7 +170,7 @@ bool KviMdiManager::qt_invoke( int _id, QUObject* _o ) return TRUE; } -bool KviMdiManager::qt_emit( int _id, QUObject* _o ) +bool KviMdiManager::qt_emit( int _id, TQUObject* _o ) { switch ( _id - staticMetaObject()->signalOffset() ) { case 0: enteredSdiMode(); break; @@ -180,12 +180,12 @@ bool KviMdiManager::qt_emit( int _id, QUObject* _o ) } return TRUE; } -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES -bool KviMdiManager::qt_property( int id, int f, QVariant* v) +bool KviMdiManager::qt_property( int id, int f, TQVariant* v) { return KviTalScrollView::qt_property( id, f, v); } -bool KviMdiManager::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; } -#endif // QT_NO_PROPERTIES +bool KviMdiManager::qt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; } +#endif // TQT_NO_PROPERTIES diff --git a/src/kvirc/ui/moc_kvi_statusbar.cpp b/src/kvirc/ui/moc_kvi_statusbar.cpp index d3cbf9c4..2c0fbfa9 100644 --- a/src/kvirc/ui/moc_kvi_statusbar.cpp +++ b/src/kvirc/ui/moc_kvi_statusbar.cpp @@ -2,21 +2,21 @@ ** KviStatusBar meta object code from reading C++ file 'kvi_statusbar.h' ** ** Created: Mon Feb 25 00:12:38 2008 -** by: The Qt MOC ($Id: qt/moc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) +** by: The TQt TQMOC ($Id: qt/tqmoc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ -#undef QT_NO_COMPAT +#undef TQT_NO_COMPAT #include "kvi_statusbar.h" -#include -#include +#include +#include -#include -#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26) -#error "This file was generated using the moc from 3.3.8. It" -#error "cannot be used with the include files from this version of Qt." -#error "(The moc has changed too much.)" +#include +#if !defined(TQ_TQMOC_OUTPUT_REVISION) || (TQ_TQMOC_OUTPUT_REVISION != 26) +#error "This file was generated using the tqmoc from 3.3.8. It" +#error "cannot be used with the include files from this version of TQt." +#error "(The tqmoc has changed too much.)" #endif const char *KviStatusBar::className() const @@ -24,103 +24,103 @@ const char *KviStatusBar::className() const return "KviStatusBar"; } -QMetaObject *KviStatusBar::metaObj = 0; -static QMetaObjectCleanUp cleanUp_KviStatusBar( "KviStatusBar", &KviStatusBar::staticMetaObject ); +TQMetaObject *KviStatusBar::metaObj = 0; +static TQMetaObjectCleanUp cleanUp_KviStatusBar( "KviStatusBar", &KviStatusBar::staticMetaObject ); -#ifndef QT_NO_TRANSLATION -QString KviStatusBar::tr( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION +TQString KviStatusBar::tr( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviStatusBar", s, c, QApplication::DefaultCodec ); + if ( tqApp ) + return tqApp->translate( "KviStatusBar", s, c, TQApplication::DefaultCodec ); else - return QString::fromLatin1( s ); + return TQString::tqfromLatin1( s ); } -#ifndef QT_NO_TRANSLATION_UTF8 -QString KviStatusBar::trUtf8( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION_UTF8 +TQString KviStatusBar::trUtf8( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviStatusBar", s, c, QApplication::UnicodeUTF8 ); + if ( tqApp ) + return tqApp->translate( "KviStatusBar", s, c, TQApplication::UnicodeUTF8 ); else - return QString::fromUtf8( s ); + return TQString::fromUtf8( s ); } -#endif // QT_NO_TRANSLATION_UTF8 +#endif // TQT_NO_TRANSLATION_UTF8 -#endif // QT_NO_TRANSLATION +#endif // TQT_NO_TRANSLATION -QMetaObject* KviStatusBar::staticMetaObject() +TQMetaObject* KviStatusBar::staticMetaObject() { if ( metaObj ) return metaObj; - QMetaObject* parentObject = QStatusBar::staticMetaObject(); - static const QUMethod slot_0 = {"messageTimerFired", 0, 0 }; - static const QUMethod slot_1 = {"contextPopupAboutToShow", 0, 0 }; - static const QUMethod slot_2 = {"appletsPopupAboutToShow", 0, 0 }; - static const QUParameter param_slot_3[] = { - { "id", &static_QUType_int, 0, QUParameter::In } + TQMetaObject* tqparentObject = TQStatusBar::staticMetaObject(); + static const TQUMethod slot_0 = {"messageTimerFired", 0, 0 }; + static const TQUMethod slot_1 = {"contextPopupAboutToShow", 0, 0 }; + static const TQUMethod slot_2 = {"appletsPopupAboutToShow", 0, 0 }; + static const TQUParameter param_slot_3[] = { + { "id", &static_TQUType_int, 0, TQUParameter::In } }; - static const QUMethod slot_3 = {"appletsPopupActivated", 1, param_slot_3 }; - static const QUMethod slot_4 = {"removeClickedApplet", 0, 0 }; - static const QUMethod slot_5 = {"setPermanentMessage", 0, 0 }; - static const QUParameter param_slot_6[] = { - { "pTip", &static_QUType_ptr, "KviDynamicToolTip", QUParameter::In }, - { "pnt", &static_QUType_varptr, "\x0e", QUParameter::In } + static const TQUMethod slot_3 = {"appletsPopupActivated", 1, param_slot_3 }; + static const TQUMethod slot_4 = {"removeClickedApplet", 0, 0 }; + static const TQUMethod slot_5 = {"setPermanentMessage", 0, 0 }; + static const TQUParameter param_slot_6[] = { + { "pTip", &static_TQUType_ptr, "KviDynamicToolTip", TQUParameter::In }, + { "pnt", &static_TQUType_varptr, "\x0e", TQUParameter::In } }; - static const QUMethod slot_6 = {"tipRequest", 2, param_slot_6 }; - static const QMetaData slot_tbl[] = { - { "messageTimerFired()", &slot_0, QMetaData::Protected }, - { "contextPopupAboutToShow()", &slot_1, QMetaData::Protected }, - { "appletsPopupAboutToShow()", &slot_2, QMetaData::Protected }, - { "appletsPopupActivated(int)", &slot_3, QMetaData::Protected }, - { "removeClickedApplet()", &slot_4, QMetaData::Protected }, - { "setPermanentMessage()", &slot_5, QMetaData::Protected }, - { "tipRequest(KviDynamicToolTip*,const QPoint&)", &slot_6, QMetaData::Protected } + static const TQUMethod slot_6 = {"tipRequest", 2, param_slot_6 }; + static const TQMetaData slot_tbl[] = { + { "messageTimerFired()", &slot_0, TQMetaData::Protected }, + { "contextPopupAboutToShow()", &slot_1, TQMetaData::Protected }, + { "appletsPopupAboutToShow()", &slot_2, TQMetaData::Protected }, + { "appletsPopupActivated(int)", &slot_3, TQMetaData::Protected }, + { "removeClickedApplet()", &slot_4, TQMetaData::Protected }, + { "setPermanentMessage()", &slot_5, TQMetaData::Protected }, + { "tipRequest(KviDynamicToolTip*,const TQPoint&)", &slot_6, TQMetaData::Protected } }; - metaObj = QMetaObject::new_metaobject( - "KviStatusBar", parentObject, + metaObj = TQMetaObject::new_metaobject( + "KviStatusBar", tqparentObject, slot_tbl, 7, 0, 0, -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES 0, 0, 0, 0, -#endif // QT_NO_PROPERTIES +#endif // TQT_NO_PROPERTIES 0, 0 ); cleanUp_KviStatusBar.setMetaObject( metaObj ); return metaObj; } -void* KviStatusBar::qt_cast( const char* clname ) +void* KviStatusBar::tqqt_cast( const char* clname ) { if ( !qstrcmp( clname, "KviStatusBar" ) ) return this; - return QStatusBar::qt_cast( clname ); + return TQStatusBar::tqqt_cast( clname ); } -bool KviStatusBar::qt_invoke( int _id, QUObject* _o ) +bool KviStatusBar::qt_invoke( int _id, TQUObject* _o ) { switch ( _id - staticMetaObject()->slotOffset() ) { case 0: messageTimerFired(); break; case 1: contextPopupAboutToShow(); break; case 2: appletsPopupAboutToShow(); break; - case 3: appletsPopupActivated((int)static_QUType_int.get(_o+1)); break; + case 3: appletsPopupActivated((int)static_TQUType_int.get(_o+1)); break; case 4: removeClickedApplet(); break; case 5: setPermanentMessage(); break; - case 6: tipRequest((KviDynamicToolTip*)static_QUType_ptr.get(_o+1),(const QPoint&)*((const QPoint*)static_QUType_ptr.get(_o+2))); break; + case 6: tipRequest((KviDynamicToolTip*)static_TQUType_ptr.get(_o+1),(const TQPoint&)*((const TQPoint*)static_TQUType_ptr.get(_o+2))); break; default: - return QStatusBar::qt_invoke( _id, _o ); + return TQStatusBar::qt_invoke( _id, _o ); } return TRUE; } -bool KviStatusBar::qt_emit( int _id, QUObject* _o ) +bool KviStatusBar::qt_emit( int _id, TQUObject* _o ) { - return QStatusBar::qt_emit(_id,_o); + return TQStatusBar::qt_emit(_id,_o); } -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES -bool KviStatusBar::qt_property( int id, int f, QVariant* v) +bool KviStatusBar::qt_property( int id, int f, TQVariant* v) { - return QStatusBar::qt_property( id, f, v); + return TQStatusBar::qt_property( id, f, v); } -bool KviStatusBar::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; } -#endif // QT_NO_PROPERTIES +bool KviStatusBar::qt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; } +#endif // TQT_NO_PROPERTIES diff --git a/src/kvirc/ui/moc_kvi_statusbarapplet.cpp b/src/kvirc/ui/moc_kvi_statusbarapplet.cpp index 85eb55e8..d244ce07 100644 --- a/src/kvirc/ui/moc_kvi_statusbarapplet.cpp +++ b/src/kvirc/ui/moc_kvi_statusbarapplet.cpp @@ -2,21 +2,21 @@ ** KviStatusBarApplet meta object code from reading C++ file 'kvi_statusbarapplet.h' ** ** Created: Mon Feb 25 00:12:39 2008 -** by: The Qt MOC ($Id: qt/moc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) +** by: The TQt TQMOC ($Id: qt/tqmoc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ -#undef QT_NO_COMPAT +#undef TQT_NO_COMPAT #include "kvi_statusbarapplet.h" -#include -#include - -#include -#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26) -#error "This file was generated using the moc from 3.3.8. It" -#error "cannot be used with the include files from this version of Qt." -#error "(The moc has changed too much.)" +#include +#include + +#include +#if !defined(TQ_TQMOC_OUTPUT_REVISION) || (TQ_TQMOC_OUTPUT_REVISION != 26) +#error "This file was generated using the tqmoc from 3.3.8. It" +#error "cannot be used with the include files from this version of TQt." +#error "(The tqmoc has changed too much.)" #endif const char *KviStatusBarApplet::className() const @@ -24,72 +24,72 @@ const char *KviStatusBarApplet::className() const return "KviStatusBarApplet"; } -QMetaObject *KviStatusBarApplet::metaObj = 0; -static QMetaObjectCleanUp cleanUp_KviStatusBarApplet( "KviStatusBarApplet", &KviStatusBarApplet::staticMetaObject ); +TQMetaObject *KviStatusBarApplet::metaObj = 0; +static TQMetaObjectCleanUp cleanUp_KviStatusBarApplet( "KviStatusBarApplet", &KviStatusBarApplet::staticMetaObject ); -#ifndef QT_NO_TRANSLATION -QString KviStatusBarApplet::tr( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION +TQString KviStatusBarApplet::tr( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviStatusBarApplet", s, c, QApplication::DefaultCodec ); + if ( tqApp ) + return tqApp->translate( "KviStatusBarApplet", s, c, TQApplication::DefaultCodec ); else - return QString::fromLatin1( s ); + return TQString::tqfromLatin1( s ); } -#ifndef QT_NO_TRANSLATION_UTF8 -QString KviStatusBarApplet::trUtf8( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION_UTF8 +TQString KviStatusBarApplet::trUtf8( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviStatusBarApplet", s, c, QApplication::UnicodeUTF8 ); + if ( tqApp ) + return tqApp->translate( "KviStatusBarApplet", s, c, TQApplication::UnicodeUTF8 ); else - return QString::fromUtf8( s ); + return TQString::fromUtf8( s ); } -#endif // QT_NO_TRANSLATION_UTF8 +#endif // TQT_NO_TRANSLATION_UTF8 -#endif // QT_NO_TRANSLATION +#endif // TQT_NO_TRANSLATION -QMetaObject* KviStatusBarApplet::staticMetaObject() +TQMetaObject* KviStatusBarApplet::staticMetaObject() { if ( metaObj ) return metaObj; - QMetaObject* parentObject = QLabel::staticMetaObject(); - metaObj = QMetaObject::new_metaobject( - "KviStatusBarApplet", parentObject, + TQMetaObject* tqparentObject = TQLabel::staticMetaObject(); + metaObj = TQMetaObject::new_metaobject( + "KviStatusBarApplet", tqparentObject, 0, 0, 0, 0, -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES 0, 0, 0, 0, -#endif // QT_NO_PROPERTIES +#endif // TQT_NO_PROPERTIES 0, 0 ); cleanUp_KviStatusBarApplet.setMetaObject( metaObj ); return metaObj; } -void* KviStatusBarApplet::qt_cast( const char* clname ) +void* KviStatusBarApplet::tqqt_cast( const char* clname ) { if ( !qstrcmp( clname, "KviStatusBarApplet" ) ) return this; - return QLabel::qt_cast( clname ); + return TQLabel::tqqt_cast( clname ); } -bool KviStatusBarApplet::qt_invoke( int _id, QUObject* _o ) +bool KviStatusBarApplet::qt_invoke( int _id, TQUObject* _o ) { - return QLabel::qt_invoke(_id,_o); + return TQLabel::qt_invoke(_id,_o); } -bool KviStatusBarApplet::qt_emit( int _id, QUObject* _o ) +bool KviStatusBarApplet::qt_emit( int _id, TQUObject* _o ) { - return QLabel::qt_emit(_id,_o); + return TQLabel::qt_emit(_id,_o); } -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES -bool KviStatusBarApplet::qt_property( int id, int f, QVariant* v) +bool KviStatusBarApplet::qt_property( int id, int f, TQVariant* v) { - return QLabel::qt_property( id, f, v); + return TQLabel::qt_property( id, f, v); } -bool KviStatusBarApplet::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; } -#endif // QT_NO_PROPERTIES +bool KviStatusBarApplet::qt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; } +#endif // TQT_NO_PROPERTIES const char *KviStatusBarClock::className() const @@ -97,59 +97,59 @@ const char *KviStatusBarClock::className() const return "KviStatusBarClock"; } -QMetaObject *KviStatusBarClock::metaObj = 0; -static QMetaObjectCleanUp cleanUp_KviStatusBarClock( "KviStatusBarClock", &KviStatusBarClock::staticMetaObject ); +TQMetaObject *KviStatusBarClock::metaObj = 0; +static TQMetaObjectCleanUp cleanUp_KviStatusBarClock( "KviStatusBarClock", &KviStatusBarClock::staticMetaObject ); -#ifndef QT_NO_TRANSLATION -QString KviStatusBarClock::tr( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION +TQString KviStatusBarClock::tr( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviStatusBarClock", s, c, QApplication::DefaultCodec ); + if ( tqApp ) + return tqApp->translate( "KviStatusBarClock", s, c, TQApplication::DefaultCodec ); else - return QString::fromLatin1( s ); + return TQString::tqfromLatin1( s ); } -#ifndef QT_NO_TRANSLATION_UTF8 -QString KviStatusBarClock::trUtf8( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION_UTF8 +TQString KviStatusBarClock::trUtf8( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviStatusBarClock", s, c, QApplication::UnicodeUTF8 ); + if ( tqApp ) + return tqApp->translate( "KviStatusBarClock", s, c, TQApplication::UnicodeUTF8 ); else - return QString::fromUtf8( s ); + return TQString::fromUtf8( s ); } -#endif // QT_NO_TRANSLATION_UTF8 +#endif // TQT_NO_TRANSLATION_UTF8 -#endif // QT_NO_TRANSLATION +#endif // TQT_NO_TRANSLATION -QMetaObject* KviStatusBarClock::staticMetaObject() +TQMetaObject* KviStatusBarClock::staticMetaObject() { if ( metaObj ) return metaObj; - QMetaObject* parentObject = KviStatusBarApplet::staticMetaObject(); - static const QUMethod slot_0 = {"toggleUtc", 0, 0 }; - static const QMetaData slot_tbl[] = { - { "toggleUtc()", &slot_0, QMetaData::Protected } + TQMetaObject* tqparentObject = KviStatusBarApplet::staticMetaObject(); + static const TQUMethod slot_0 = {"toggleUtc", 0, 0 }; + static const TQMetaData slot_tbl[] = { + { "toggleUtc()", &slot_0, TQMetaData::Protected } }; - metaObj = QMetaObject::new_metaobject( - "KviStatusBarClock", parentObject, + metaObj = TQMetaObject::new_metaobject( + "KviStatusBarClock", tqparentObject, slot_tbl, 1, 0, 0, -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES 0, 0, 0, 0, -#endif // QT_NO_PROPERTIES +#endif // TQT_NO_PROPERTIES 0, 0 ); cleanUp_KviStatusBarClock.setMetaObject( metaObj ); return metaObj; } -void* KviStatusBarClock::qt_cast( const char* clname ) +void* KviStatusBarClock::tqqt_cast( const char* clname ) { if ( !qstrcmp( clname, "KviStatusBarClock" ) ) return this; - return KviStatusBarApplet::qt_cast( clname ); + return KviStatusBarApplet::tqqt_cast( clname ); } -bool KviStatusBarClock::qt_invoke( int _id, QUObject* _o ) +bool KviStatusBarClock::qt_invoke( int _id, TQUObject* _o ) { switch ( _id - staticMetaObject()->slotOffset() ) { case 0: toggleUtc(); break; @@ -159,19 +159,19 @@ bool KviStatusBarClock::qt_invoke( int _id, QUObject* _o ) return TRUE; } -bool KviStatusBarClock::qt_emit( int _id, QUObject* _o ) +bool KviStatusBarClock::qt_emit( int _id, TQUObject* _o ) { return KviStatusBarApplet::qt_emit(_id,_o); } -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES -bool KviStatusBarClock::qt_property( int id, int f, QVariant* v) +bool KviStatusBarClock::qt_property( int id, int f, TQVariant* v) { return KviStatusBarApplet::qt_property( id, f, v); } -bool KviStatusBarClock::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; } -#endif // QT_NO_PROPERTIES +bool KviStatusBarClock::qt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; } +#endif // TQT_NO_PROPERTIES const char *KviStatusBarConnectionTimer::className() const @@ -179,59 +179,59 @@ const char *KviStatusBarConnectionTimer::className() const return "KviStatusBarConnectionTimer"; } -QMetaObject *KviStatusBarConnectionTimer::metaObj = 0; -static QMetaObjectCleanUp cleanUp_KviStatusBarConnectionTimer( "KviStatusBarConnectionTimer", &KviStatusBarConnectionTimer::staticMetaObject ); +TQMetaObject *KviStatusBarConnectionTimer::metaObj = 0; +static TQMetaObjectCleanUp cleanUp_KviStatusBarConnectionTimer( "KviStatusBarConnectionTimer", &KviStatusBarConnectionTimer::staticMetaObject ); -#ifndef QT_NO_TRANSLATION -QString KviStatusBarConnectionTimer::tr( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION +TQString KviStatusBarConnectionTimer::tr( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviStatusBarConnectionTimer", s, c, QApplication::DefaultCodec ); + if ( tqApp ) + return tqApp->translate( "KviStatusBarConnectionTimer", s, c, TQApplication::DefaultCodec ); else - return QString::fromLatin1( s ); + return TQString::tqfromLatin1( s ); } -#ifndef QT_NO_TRANSLATION_UTF8 -QString KviStatusBarConnectionTimer::trUtf8( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION_UTF8 +TQString KviStatusBarConnectionTimer::trUtf8( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviStatusBarConnectionTimer", s, c, QApplication::UnicodeUTF8 ); + if ( tqApp ) + return tqApp->translate( "KviStatusBarConnectionTimer", s, c, TQApplication::UnicodeUTF8 ); else - return QString::fromUtf8( s ); + return TQString::fromUtf8( s ); } -#endif // QT_NO_TRANSLATION_UTF8 +#endif // TQT_NO_TRANSLATION_UTF8 -#endif // QT_NO_TRANSLATION +#endif // TQT_NO_TRANSLATION -QMetaObject* KviStatusBarConnectionTimer::staticMetaObject() +TQMetaObject* KviStatusBarConnectionTimer::staticMetaObject() { if ( metaObj ) return metaObj; - QMetaObject* parentObject = KviStatusBarApplet::staticMetaObject(); - static const QUMethod slot_0 = {"toggleTotal", 0, 0 }; - static const QMetaData slot_tbl[] = { - { "toggleTotal()", &slot_0, QMetaData::Protected } + TQMetaObject* tqparentObject = KviStatusBarApplet::staticMetaObject(); + static const TQUMethod slot_0 = {"toggleTotal", 0, 0 }; + static const TQMetaData slot_tbl[] = { + { "toggleTotal()", &slot_0, TQMetaData::Protected } }; - metaObj = QMetaObject::new_metaobject( - "KviStatusBarConnectionTimer", parentObject, + metaObj = TQMetaObject::new_metaobject( + "KviStatusBarConnectionTimer", tqparentObject, slot_tbl, 1, 0, 0, -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES 0, 0, 0, 0, -#endif // QT_NO_PROPERTIES +#endif // TQT_NO_PROPERTIES 0, 0 ); cleanUp_KviStatusBarConnectionTimer.setMetaObject( metaObj ); return metaObj; } -void* KviStatusBarConnectionTimer::qt_cast( const char* clname ) +void* KviStatusBarConnectionTimer::tqqt_cast( const char* clname ) { if ( !qstrcmp( clname, "KviStatusBarConnectionTimer" ) ) return this; - return KviStatusBarApplet::qt_cast( clname ); + return KviStatusBarApplet::tqqt_cast( clname ); } -bool KviStatusBarConnectionTimer::qt_invoke( int _id, QUObject* _o ) +bool KviStatusBarConnectionTimer::qt_invoke( int _id, TQUObject* _o ) { switch ( _id - staticMetaObject()->slotOffset() ) { case 0: toggleTotal(); break; @@ -241,19 +241,19 @@ bool KviStatusBarConnectionTimer::qt_invoke( int _id, QUObject* _o ) return TRUE; } -bool KviStatusBarConnectionTimer::qt_emit( int _id, QUObject* _o ) +bool KviStatusBarConnectionTimer::qt_emit( int _id, TQUObject* _o ) { return KviStatusBarApplet::qt_emit(_id,_o); } -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES -bool KviStatusBarConnectionTimer::qt_property( int id, int f, QVariant* v) +bool KviStatusBarConnectionTimer::qt_property( int id, int f, TQVariant* v) { return KviStatusBarApplet::qt_property( id, f, v); } -bool KviStatusBarConnectionTimer::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; } -#endif // QT_NO_PROPERTIES +bool KviStatusBarConnectionTimer::qt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; } +#endif // TQT_NO_PROPERTIES const char *KviStatusBarSeparator::className() const @@ -261,72 +261,72 @@ const char *KviStatusBarSeparator::className() const return "KviStatusBarSeparator"; } -QMetaObject *KviStatusBarSeparator::metaObj = 0; -static QMetaObjectCleanUp cleanUp_KviStatusBarSeparator( "KviStatusBarSeparator", &KviStatusBarSeparator::staticMetaObject ); +TQMetaObject *KviStatusBarSeparator::metaObj = 0; +static TQMetaObjectCleanUp cleanUp_KviStatusBarSeparator( "KviStatusBarSeparator", &KviStatusBarSeparator::staticMetaObject ); -#ifndef QT_NO_TRANSLATION -QString KviStatusBarSeparator::tr( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION +TQString KviStatusBarSeparator::tr( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviStatusBarSeparator", s, c, QApplication::DefaultCodec ); + if ( tqApp ) + return tqApp->translate( "KviStatusBarSeparator", s, c, TQApplication::DefaultCodec ); else - return QString::fromLatin1( s ); + return TQString::tqfromLatin1( s ); } -#ifndef QT_NO_TRANSLATION_UTF8 -QString KviStatusBarSeparator::trUtf8( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION_UTF8 +TQString KviStatusBarSeparator::trUtf8( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviStatusBarSeparator", s, c, QApplication::UnicodeUTF8 ); + if ( tqApp ) + return tqApp->translate( "KviStatusBarSeparator", s, c, TQApplication::UnicodeUTF8 ); else - return QString::fromUtf8( s ); + return TQString::fromUtf8( s ); } -#endif // QT_NO_TRANSLATION_UTF8 +#endif // TQT_NO_TRANSLATION_UTF8 -#endif // QT_NO_TRANSLATION +#endif // TQT_NO_TRANSLATION -QMetaObject* KviStatusBarSeparator::staticMetaObject() +TQMetaObject* KviStatusBarSeparator::staticMetaObject() { if ( metaObj ) return metaObj; - QMetaObject* parentObject = KviStatusBarApplet::staticMetaObject(); - metaObj = QMetaObject::new_metaobject( - "KviStatusBarSeparator", parentObject, + TQMetaObject* tqparentObject = KviStatusBarApplet::staticMetaObject(); + metaObj = TQMetaObject::new_metaobject( + "KviStatusBarSeparator", tqparentObject, 0, 0, 0, 0, -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES 0, 0, 0, 0, -#endif // QT_NO_PROPERTIES +#endif // TQT_NO_PROPERTIES 0, 0 ); cleanUp_KviStatusBarSeparator.setMetaObject( metaObj ); return metaObj; } -void* KviStatusBarSeparator::qt_cast( const char* clname ) +void* KviStatusBarSeparator::tqqt_cast( const char* clname ) { if ( !qstrcmp( clname, "KviStatusBarSeparator" ) ) return this; - return KviStatusBarApplet::qt_cast( clname ); + return KviStatusBarApplet::tqqt_cast( clname ); } -bool KviStatusBarSeparator::qt_invoke( int _id, QUObject* _o ) +bool KviStatusBarSeparator::qt_invoke( int _id, TQUObject* _o ) { return KviStatusBarApplet::qt_invoke(_id,_o); } -bool KviStatusBarSeparator::qt_emit( int _id, QUObject* _o ) +bool KviStatusBarSeparator::qt_emit( int _id, TQUObject* _o ) { return KviStatusBarApplet::qt_emit(_id,_o); } -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES -bool KviStatusBarSeparator::qt_property( int id, int f, QVariant* v) +bool KviStatusBarSeparator::qt_property( int id, int f, TQVariant* v) { return KviStatusBarApplet::qt_property( id, f, v); } -bool KviStatusBarSeparator::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; } -#endif // QT_NO_PROPERTIES +bool KviStatusBarSeparator::qt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; } +#endif // TQT_NO_PROPERTIES const char *KviStatusBarAwayIndicator::className() const @@ -334,61 +334,61 @@ const char *KviStatusBarAwayIndicator::className() const return "KviStatusBarAwayIndicator"; } -QMetaObject *KviStatusBarAwayIndicator::metaObj = 0; -static QMetaObjectCleanUp cleanUp_KviStatusBarAwayIndicator( "KviStatusBarAwayIndicator", &KviStatusBarAwayIndicator::staticMetaObject ); +TQMetaObject *KviStatusBarAwayIndicator::metaObj = 0; +static TQMetaObjectCleanUp cleanUp_KviStatusBarAwayIndicator( "KviStatusBarAwayIndicator", &KviStatusBarAwayIndicator::staticMetaObject ); -#ifndef QT_NO_TRANSLATION -QString KviStatusBarAwayIndicator::tr( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION +TQString KviStatusBarAwayIndicator::tr( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviStatusBarAwayIndicator", s, c, QApplication::DefaultCodec ); + if ( tqApp ) + return tqApp->translate( "KviStatusBarAwayIndicator", s, c, TQApplication::DefaultCodec ); else - return QString::fromLatin1( s ); + return TQString::tqfromLatin1( s ); } -#ifndef QT_NO_TRANSLATION_UTF8 -QString KviStatusBarAwayIndicator::trUtf8( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION_UTF8 +TQString KviStatusBarAwayIndicator::trUtf8( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviStatusBarAwayIndicator", s, c, QApplication::UnicodeUTF8 ); + if ( tqApp ) + return tqApp->translate( "KviStatusBarAwayIndicator", s, c, TQApplication::UnicodeUTF8 ); else - return QString::fromUtf8( s ); + return TQString::fromUtf8( s ); } -#endif // QT_NO_TRANSLATION_UTF8 +#endif // TQT_NO_TRANSLATION_UTF8 -#endif // QT_NO_TRANSLATION +#endif // TQT_NO_TRANSLATION -QMetaObject* KviStatusBarAwayIndicator::staticMetaObject() +TQMetaObject* KviStatusBarAwayIndicator::staticMetaObject() { if ( metaObj ) return metaObj; - QMetaObject* parentObject = KviStatusBarApplet::staticMetaObject(); - static const QUMethod slot_0 = {"updateDisplay", 0, 0 }; - static const QUMethod slot_1 = {"toggleContext", 0, 0 }; - static const QMetaData slot_tbl[] = { - { "updateDisplay()", &slot_0, QMetaData::Protected }, - { "toggleContext()", &slot_1, QMetaData::Protected } + TQMetaObject* tqparentObject = KviStatusBarApplet::staticMetaObject(); + static const TQUMethod slot_0 = {"updateDisplay", 0, 0 }; + static const TQUMethod slot_1 = {"toggleContext", 0, 0 }; + static const TQMetaData slot_tbl[] = { + { "updateDisplay()", &slot_0, TQMetaData::Protected }, + { "toggleContext()", &slot_1, TQMetaData::Protected } }; - metaObj = QMetaObject::new_metaobject( - "KviStatusBarAwayIndicator", parentObject, + metaObj = TQMetaObject::new_metaobject( + "KviStatusBarAwayIndicator", tqparentObject, slot_tbl, 2, 0, 0, -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES 0, 0, 0, 0, -#endif // QT_NO_PROPERTIES +#endif // TQT_NO_PROPERTIES 0, 0 ); cleanUp_KviStatusBarAwayIndicator.setMetaObject( metaObj ); return metaObj; } -void* KviStatusBarAwayIndicator::qt_cast( const char* clname ) +void* KviStatusBarAwayIndicator::tqqt_cast( const char* clname ) { if ( !qstrcmp( clname, "KviStatusBarAwayIndicator" ) ) return this; - return KviStatusBarApplet::qt_cast( clname ); + return KviStatusBarApplet::tqqt_cast( clname ); } -bool KviStatusBarAwayIndicator::qt_invoke( int _id, QUObject* _o ) +bool KviStatusBarAwayIndicator::qt_invoke( int _id, TQUObject* _o ) { switch ( _id - staticMetaObject()->slotOffset() ) { case 0: updateDisplay(); break; @@ -399,19 +399,19 @@ bool KviStatusBarAwayIndicator::qt_invoke( int _id, QUObject* _o ) return TRUE; } -bool KviStatusBarAwayIndicator::qt_emit( int _id, QUObject* _o ) +bool KviStatusBarAwayIndicator::qt_emit( int _id, TQUObject* _o ) { return KviStatusBarApplet::qt_emit(_id,_o); } -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES -bool KviStatusBarAwayIndicator::qt_property( int id, int f, QVariant* v) +bool KviStatusBarAwayIndicator::qt_property( int id, int f, TQVariant* v) { return KviStatusBarApplet::qt_property( id, f, v); } -bool KviStatusBarAwayIndicator::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; } -#endif // QT_NO_PROPERTIES +bool KviStatusBarAwayIndicator::qt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; } +#endif // TQT_NO_PROPERTIES const char *KviStatusBarLagIndicator::className() const @@ -419,59 +419,59 @@ const char *KviStatusBarLagIndicator::className() const return "KviStatusBarLagIndicator"; } -QMetaObject *KviStatusBarLagIndicator::metaObj = 0; -static QMetaObjectCleanUp cleanUp_KviStatusBarLagIndicator( "KviStatusBarLagIndicator", &KviStatusBarLagIndicator::staticMetaObject ); +TQMetaObject *KviStatusBarLagIndicator::metaObj = 0; +static TQMetaObjectCleanUp cleanUp_KviStatusBarLagIndicator( "KviStatusBarLagIndicator", &KviStatusBarLagIndicator::staticMetaObject ); -#ifndef QT_NO_TRANSLATION -QString KviStatusBarLagIndicator::tr( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION +TQString KviStatusBarLagIndicator::tr( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviStatusBarLagIndicator", s, c, QApplication::DefaultCodec ); + if ( tqApp ) + return tqApp->translate( "KviStatusBarLagIndicator", s, c, TQApplication::DefaultCodec ); else - return QString::fromLatin1( s ); + return TQString::tqfromLatin1( s ); } -#ifndef QT_NO_TRANSLATION_UTF8 -QString KviStatusBarLagIndicator::trUtf8( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION_UTF8 +TQString KviStatusBarLagIndicator::trUtf8( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviStatusBarLagIndicator", s, c, QApplication::UnicodeUTF8 ); + if ( tqApp ) + return tqApp->translate( "KviStatusBarLagIndicator", s, c, TQApplication::UnicodeUTF8 ); else - return QString::fromUtf8( s ); + return TQString::fromUtf8( s ); } -#endif // QT_NO_TRANSLATION_UTF8 +#endif // TQT_NO_TRANSLATION_UTF8 -#endif // QT_NO_TRANSLATION +#endif // TQT_NO_TRANSLATION -QMetaObject* KviStatusBarLagIndicator::staticMetaObject() +TQMetaObject* KviStatusBarLagIndicator::staticMetaObject() { if ( metaObj ) return metaObj; - QMetaObject* parentObject = KviStatusBarApplet::staticMetaObject(); - static const QUMethod slot_0 = {"updateDisplay", 0, 0 }; - static const QMetaData slot_tbl[] = { - { "updateDisplay()", &slot_0, QMetaData::Protected } + TQMetaObject* tqparentObject = KviStatusBarApplet::staticMetaObject(); + static const TQUMethod slot_0 = {"updateDisplay", 0, 0 }; + static const TQMetaData slot_tbl[] = { + { "updateDisplay()", &slot_0, TQMetaData::Protected } }; - metaObj = QMetaObject::new_metaobject( - "KviStatusBarLagIndicator", parentObject, + metaObj = TQMetaObject::new_metaobject( + "KviStatusBarLagIndicator", tqparentObject, slot_tbl, 1, 0, 0, -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES 0, 0, 0, 0, -#endif // QT_NO_PROPERTIES +#endif // TQT_NO_PROPERTIES 0, 0 ); cleanUp_KviStatusBarLagIndicator.setMetaObject( metaObj ); return metaObj; } -void* KviStatusBarLagIndicator::qt_cast( const char* clname ) +void* KviStatusBarLagIndicator::tqqt_cast( const char* clname ) { if ( !qstrcmp( clname, "KviStatusBarLagIndicator" ) ) return this; - return KviStatusBarApplet::qt_cast( clname ); + return KviStatusBarApplet::tqqt_cast( clname ); } -bool KviStatusBarLagIndicator::qt_invoke( int _id, QUObject* _o ) +bool KviStatusBarLagIndicator::qt_invoke( int _id, TQUObject* _o ) { switch ( _id - staticMetaObject()->slotOffset() ) { case 0: updateDisplay(); break; @@ -481,16 +481,16 @@ bool KviStatusBarLagIndicator::qt_invoke( int _id, QUObject* _o ) return TRUE; } -bool KviStatusBarLagIndicator::qt_emit( int _id, QUObject* _o ) +bool KviStatusBarLagIndicator::qt_emit( int _id, TQUObject* _o ) { return KviStatusBarApplet::qt_emit(_id,_o); } -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES -bool KviStatusBarLagIndicator::qt_property( int id, int f, QVariant* v) +bool KviStatusBarLagIndicator::qt_property( int id, int f, TQVariant* v) { return KviStatusBarApplet::qt_property( id, f, v); } -bool KviStatusBarLagIndicator::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; } -#endif // QT_NO_PROPERTIES +bool KviStatusBarLagIndicator::qt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; } +#endif // TQT_NO_PROPERTIES diff --git a/src/kvirc/ui/moc_kvi_toolwindows_container.cpp b/src/kvirc/ui/moc_kvi_toolwindows_container.cpp index dc5a24f9..977626a7 100644 --- a/src/kvirc/ui/moc_kvi_toolwindows_container.cpp +++ b/src/kvirc/ui/moc_kvi_toolwindows_container.cpp @@ -2,21 +2,21 @@ ** KviWindowToolWidget meta object code from reading C++ file 'kvi_toolwindows_container.h' ** ** Created: Mon Feb 25 00:12:41 2008 -** by: The Qt MOC ($Id: qt/moc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) +** by: The TQt TQMOC ($Id: qt/tqmoc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ -#undef QT_NO_COMPAT +#undef TQT_NO_COMPAT #include "kvi_toolwindows_container.h" -#include -#include - -#include -#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26) -#error "This file was generated using the moc from 3.3.8. It" -#error "cannot be used with the include files from this version of Qt." -#error "(The moc has changed too much.)" +#include +#include + +#include +#if !defined(TQ_TQMOC_OUTPUT_REVISION) || (TQ_TQMOC_OUTPUT_REVISION != 26) +#error "This file was generated using the tqmoc from 3.3.8. It" +#error "cannot be used with the include files from this version of TQt." +#error "(The tqmoc has changed too much.)" #endif const char *KviWindowToolWidget::className() const @@ -24,72 +24,72 @@ const char *KviWindowToolWidget::className() const return "KviWindowToolWidget"; } -QMetaObject *KviWindowToolWidget::metaObj = 0; -static QMetaObjectCleanUp cleanUp_KviWindowToolWidget( "KviWindowToolWidget", &KviWindowToolWidget::staticMetaObject ); +TQMetaObject *KviWindowToolWidget::metaObj = 0; +static TQMetaObjectCleanUp cleanUp_KviWindowToolWidget( "KviWindowToolWidget", &KviWindowToolWidget::staticMetaObject ); -#ifndef QT_NO_TRANSLATION -QString KviWindowToolWidget::tr( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION +TQString KviWindowToolWidget::tr( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviWindowToolWidget", s, c, QApplication::DefaultCodec ); + if ( tqApp ) + return tqApp->translate( "KviWindowToolWidget", s, c, TQApplication::DefaultCodec ); else - return QString::fromLatin1( s ); + return TQString::tqfromLatin1( s ); } -#ifndef QT_NO_TRANSLATION_UTF8 -QString KviWindowToolWidget::trUtf8( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION_UTF8 +TQString KviWindowToolWidget::trUtf8( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviWindowToolWidget", s, c, QApplication::UnicodeUTF8 ); + if ( tqApp ) + return tqApp->translate( "KviWindowToolWidget", s, c, TQApplication::UnicodeUTF8 ); else - return QString::fromUtf8( s ); + return TQString::fromUtf8( s ); } -#endif // QT_NO_TRANSLATION_UTF8 +#endif // TQT_NO_TRANSLATION_UTF8 -#endif // QT_NO_TRANSLATION +#endif // TQT_NO_TRANSLATION -QMetaObject* KviWindowToolWidget::staticMetaObject() +TQMetaObject* KviWindowToolWidget::staticMetaObject() { if ( metaObj ) return metaObj; - QMetaObject* parentObject = QWidget::staticMetaObject(); - metaObj = QMetaObject::new_metaobject( - "KviWindowToolWidget", parentObject, + TQMetaObject* tqparentObject = TQWidget::staticMetaObject(); + metaObj = TQMetaObject::new_metaobject( + "KviWindowToolWidget", tqparentObject, 0, 0, 0, 0, -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES 0, 0, 0, 0, -#endif // QT_NO_PROPERTIES +#endif // TQT_NO_PROPERTIES 0, 0 ); cleanUp_KviWindowToolWidget.setMetaObject( metaObj ); return metaObj; } -void* KviWindowToolWidget::qt_cast( const char* clname ) +void* KviWindowToolWidget::tqqt_cast( const char* clname ) { if ( !qstrcmp( clname, "KviWindowToolWidget" ) ) return this; - return QWidget::qt_cast( clname ); + return TQWidget::tqqt_cast( clname ); } -bool KviWindowToolWidget::qt_invoke( int _id, QUObject* _o ) +bool KviWindowToolWidget::qt_invoke( int _id, TQUObject* _o ) { - return QWidget::qt_invoke(_id,_o); + return TQWidget::qt_invoke(_id,_o); } -bool KviWindowToolWidget::qt_emit( int _id, QUObject* _o ) +bool KviWindowToolWidget::qt_emit( int _id, TQUObject* _o ) { - return QWidget::qt_emit(_id,_o); + return TQWidget::qt_emit(_id,_o); } -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES -bool KviWindowToolWidget::qt_property( int id, int f, QVariant* v) +bool KviWindowToolWidget::qt_property( int id, int f, TQVariant* v) { - return QWidget::qt_property( id, f, v); + return TQWidget::qt_property( id, f, v); } -bool KviWindowToolWidget::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; } -#endif // QT_NO_PROPERTIES +bool KviWindowToolWidget::qt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; } +#endif // TQT_NO_PROPERTIES const char *KviWindowToolPageButton::className() const @@ -97,69 +97,69 @@ const char *KviWindowToolPageButton::className() const return "KviWindowToolPageButton"; } -QMetaObject *KviWindowToolPageButton::metaObj = 0; -static QMetaObjectCleanUp cleanUp_KviWindowToolPageButton( "KviWindowToolPageButton", &KviWindowToolPageButton::staticMetaObject ); +TQMetaObject *KviWindowToolPageButton::metaObj = 0; +static TQMetaObjectCleanUp cleanUp_KviWindowToolPageButton( "KviWindowToolPageButton", &KviWindowToolPageButton::staticMetaObject ); -#ifndef QT_NO_TRANSLATION -QString KviWindowToolPageButton::tr( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION +TQString KviWindowToolPageButton::tr( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviWindowToolPageButton", s, c, QApplication::DefaultCodec ); + if ( tqApp ) + return tqApp->translate( "KviWindowToolPageButton", s, c, TQApplication::DefaultCodec ); else - return QString::fromLatin1( s ); + return TQString::tqfromLatin1( s ); } -#ifndef QT_NO_TRANSLATION_UTF8 -QString KviWindowToolPageButton::trUtf8( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION_UTF8 +TQString KviWindowToolPageButton::trUtf8( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviWindowToolPageButton", s, c, QApplication::UnicodeUTF8 ); + if ( tqApp ) + return tqApp->translate( "KviWindowToolPageButton", s, c, TQApplication::UnicodeUTF8 ); else - return QString::fromUtf8( s ); + return TQString::fromUtf8( s ); } -#endif // QT_NO_TRANSLATION_UTF8 +#endif // TQT_NO_TRANSLATION_UTF8 -#endif // QT_NO_TRANSLATION +#endif // TQT_NO_TRANSLATION -QMetaObject* KviWindowToolPageButton::staticMetaObject() +TQMetaObject* KviWindowToolPageButton::staticMetaObject() { if ( metaObj ) return metaObj; - QMetaObject* parentObject = TOOL_PAGE_PARENT::staticMetaObject(); - metaObj = QMetaObject::new_metaobject( - "KviWindowToolPageButton", parentObject, + TQMetaObject* tqparentObject = TOOL_PAGE_PARENT::staticMetaObject(); + metaObj = TQMetaObject::new_metaobject( + "KviWindowToolPageButton", tqparentObject, 0, 0, 0, 0, -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES 0, 0, 0, 0, -#endif // QT_NO_PROPERTIES +#endif // TQT_NO_PROPERTIES 0, 0 ); cleanUp_KviWindowToolPageButton.setMetaObject( metaObj ); return metaObj; } -void* KviWindowToolPageButton::qt_cast( const char* clname ) +void* KviWindowToolPageButton::tqqt_cast( const char* clname ) { if ( !qstrcmp( clname, "KviWindowToolPageButton" ) ) return this; - return TOOL_PAGE_PARENT::qt_cast( clname ); + return TOOL_PAGE_PARENT::tqqt_cast( clname ); } -bool KviWindowToolPageButton::qt_invoke( int _id, QUObject* _o ) +bool KviWindowToolPageButton::qt_invoke( int _id, TQUObject* _o ) { return TOOL_PAGE_PARENT::qt_invoke(_id,_o); } -bool KviWindowToolPageButton::qt_emit( int _id, QUObject* _o ) +bool KviWindowToolPageButton::qt_emit( int _id, TQUObject* _o ) { return TOOL_PAGE_PARENT::qt_emit(_id,_o); } -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES -bool KviWindowToolPageButton::qt_property( int id, int f, QVariant* v) +bool KviWindowToolPageButton::qt_property( int id, int f, TQVariant* v) { return TOOL_PAGE_PARENT::qt_property( id, f, v); } -bool KviWindowToolPageButton::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; } -#endif // QT_NO_PROPERTIES +bool KviWindowToolPageButton::qt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; } +#endif // TQT_NO_PROPERTIES diff --git a/src/modules/about/aboutdialog.cpp b/src/modules/about/aboutdialog.cpp index 4d13d98f..47f18adb 100644 --- a/src/modules/about/aboutdialog.cpp +++ b/src/modules/about/aboutdialog.cpp @@ -31,12 +31,12 @@ #include "kvi_fileutils.h" #include "kvi_sourcesdate.h" -#include -#include +#include +#include #include -#include -#include -#include +#include +#include +#include extern KviAboutDialog * g_pAboutDialog; /* @@ -78,36 +78,36 @@ KviAboutDialog::KviAboutDialog() KviStr buffer; g_pApp->findImage(buffer,"kvi_splash.png"); - QPixmap pix(buffer.ptr()); + TQPixmap pix(TQString(buffer.ptr())); - QWidget * w = new QWidget(this); - QGridLayout * g = new QGridLayout(w,2,1,4,8); + TQWidget * w = new TQWidget(this); + TQGridLayout * g = new TQGridLayout(w,2,1,4,8); - QLabel * l = new QLabel(w); - l->setFrameStyle(QFrame::WinPanel | QFrame::Sunken); - l->setBackgroundColor(Qt::black); - l->setAlignment(Qt::AlignCenter); + TQLabel * l = new TQLabel(w); + l->setFrameStyle(TQFrame::WinPanel | TQFrame::Sunken); + l->setBackgroundColor(TQt::black); + l->tqsetAlignment(TQt::AlignCenter); l->setPixmap(pix); g->addWidget(l,0,0); - QString aboutString= "KVIrc " KVI_VERSION " '" KVI_RELEASE_NAME "'
"; + TQString aboutString= "KVIrc " KVI_VERSION " '" KVI_RELEASE_NAME "'
"; aboutString += __tr2qs_ctx("Forged by the KVIrc Development Team","about"); aboutString += "
"; aboutString += __tr2qs_ctx("Sources date","about"); aboutString += ": "; aboutString += KVI_SOURCES_DATE; - l = new QLabel(aboutString,w); - l->setAlignment(Qt::AlignCenter); + l = new TQLabel(aboutString,w); + l->tqsetAlignment(TQt::AlignCenter); g->addWidget(l,1,0); addTab(w,__tr2qs_ctx("About","about")); - w = new QWidget(this); - g = new QGridLayout(w,1,1,4,8); + w = new TQWidget(this); + g = new TQGridLayout(w,1,1,4,8); KviTalTextEdit * v = new KviTalTextEdit(w); v->setReadOnly(true); @@ -119,17 +119,17 @@ KviAboutDialog::KviAboutDialog() - w = new QWidget(this); - g = new QGridLayout(w,1,1,4,8); + w = new TQWidget(this); + g = new TQGridLayout(w,1,1,4,8); v = new KviTalTextEdit(w); v->setReadOnly(true); v->setWordWrap(KviTalTextEdit::NoWrap); g->addWidget(v,0,0); - QString szLicense; + TQString szLicense; - QString szLicensePath; + TQString szLicensePath; g_pApp->getGlobalKvircDirectory(szLicensePath,KviApp::License,"EULA"); if(!KviFileUtils::loadFile(szLicensePath,szLicense)) @@ -144,7 +144,7 @@ KviAboutDialog::KviAboutDialog() addTab(w,__tr2qs_ctx("License","about")); - connect(this,SIGNAL(applyButtonPressed()),this,SLOT(closeButtonPressed())); + connect(this,TQT_SIGNAL(applyButtonPressed()),this,TQT_SLOT(closeButtonPressed())); } KviAboutDialog::~KviAboutDialog() @@ -152,7 +152,7 @@ KviAboutDialog::~KviAboutDialog() g_pAboutDialog = 0; } -void KviAboutDialog::closeEvent(QCloseEvent *e) +void KviAboutDialog::closeEvent(TQCloseEvent *e) { e->ignore(); delete this; diff --git a/src/modules/about/aboutdialog.h b/src/modules/about/aboutdialog.h index da543a19..4b748458 100644 --- a/src/modules/about/aboutdialog.h +++ b/src/modules/about/aboutdialog.h @@ -27,11 +27,12 @@ class KviAboutDialog : public KviTalTabDialog { Q_OBJECT + TQ_OBJECT public: KviAboutDialog(); ~KviAboutDialog(); protected: - virtual void closeEvent(QCloseEvent *e); + virtual void closeEvent(TQCloseEvent *e); protected slots: void closeButtonPressed(); }; diff --git a/src/modules/action/libkviaction.cpp b/src/modules/action/libkviaction.cpp index daf84699..34344906 100644 --- a/src/modules/action/libkviaction.cpp +++ b/src/modules/action/libkviaction.cpp @@ -55,7 +55,7 @@ static bool action_kvs_cmd_list(KviKvsModuleCommandCall * c) { KviWindow * pOut = c->window(); - KviPointerHashTableIterator it(*(KviActionManager::instance()->actions())); + KviPointerHashTableIterator it(*(KviActionManager::instance()->actions())); while(KviAction * a = it.current()) { if(a->isKviUserActionNeverOverrideThis()) @@ -96,7 +96,7 @@ static bool action_kvs_cmd_list(KviKvsModuleCommandCall * c) static bool action_kvs_cmd_trigger(KviKvsModuleCommandCall * c) { - QString szName; + TQString szName; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("name",KVS_PT_NONEMPTYSTRING,0,szName) KVSM_PARAMETERS_END(c) @@ -108,11 +108,11 @@ static bool action_kvs_cmd_trigger(KviKvsModuleCommandCall * c) { a->activate(); } else { - if(!c->switches()->find('q',"quiet")) - c->warning(__tr2qs("The action \"%1\" is disabled").arg(szName)); + if(!c->switches()->tqfind('q',"quiet")) + c->warning(__tr2qs("The action \"%1\" is disabled").tqarg(szName)); } } else { - c->warning(__tr2qs("The action \"%1\" does not exist").arg(szName)); + c->warning(__tr2qs("The action \"%1\" does not exist").tqarg(szName)); } return true; @@ -147,7 +147,7 @@ static bool action_kvs_cmd_trigger(KviKvsModuleCommandCall * c) static bool action_kvs_cmd_enable(KviKvsModuleCommandCall * c) { - QString szName; + TQString szName; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("name",KVS_PT_NONEMPTYSTRING,0,szName) KVSM_PARAMETERS_END(c) @@ -157,8 +157,8 @@ static bool action_kvs_cmd_enable(KviKvsModuleCommandCall * c) { if(!a->isEnabled())a->setEnabled(true); } else { - if(!c->switches()->find('q',"quiet")) - c->warning(__tr2qs("The action \"%1\" does not exist").arg(szName)); + if(!c->switches()->tqfind('q',"quiet")) + c->warning(__tr2qs("The action \"%1\" does not exist").tqarg(szName)); } return true; @@ -195,7 +195,7 @@ static bool action_kvs_cmd_enable(KviKvsModuleCommandCall * c) static bool action_kvs_cmd_disable(KviKvsModuleCommandCall * c) { - QString szName; + TQString szName; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("name",KVS_PT_NONEMPTYSTRING,0,szName) KVSM_PARAMETERS_END(c) @@ -205,8 +205,8 @@ static bool action_kvs_cmd_disable(KviKvsModuleCommandCall * c) { if(a->isEnabled())a->setEnabled(false); } else { - if(!c->switches()->find('q',"quiet")) - c->warning(__tr2qs("The action \"%1\" does not exist").arg(szName)); + if(!c->switches()->tqfind('q',"quiet")) + c->warning(__tr2qs("The action \"%1\" does not exist").tqarg(szName)); } return true; @@ -239,7 +239,7 @@ static bool action_kvs_cmd_disable(KviKvsModuleCommandCall * c) static bool action_kvs_cmd_destroy(KviKvsModuleCommandCall * c) { - QString szName; + TQString szName; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("name",KVS_PT_NONEMPTYSTRING,0,szName) KVSM_PARAMETERS_END(c) @@ -251,12 +251,12 @@ static bool action_kvs_cmd_destroy(KviKvsModuleCommandCall * c) { a->suicide(); } else { - if(!c->switches()->find('q',"quiet")) - c->warning(__tr2qs("The action \"%1\" is a core action and cannot be destroyed").arg(szName)); + if(!c->switches()->tqfind('q',"quiet")) + c->warning(__tr2qs("The action \"%1\" is a core action and cannot be destroyed").tqarg(szName)); } } else { - if(!c->switches()->find('q',"quiet")) - c->warning(__tr2qs("The action \"%1\" does not exist").arg(szName)); + if(!c->switches()->tqfind('q',"quiet")) + c->warning(__tr2qs("The action \"%1\" does not exist").tqarg(szName)); } return true; @@ -362,7 +362,7 @@ static bool action_kvs_cmd_destroy(KviKvsModuleCommandCall * c) static bool action_kvs_cmd_create(KviKvsModuleCallbackCommandCall * c) { - QString szName,szVisibleText,szDescription,szBigIconId,szSmallIconId; + TQString szName,szVisibleText,szDescription,szBigIconId,szSmallIconId; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("name",KVS_PT_NONEMPTYSTRING,0,szName) @@ -378,13 +378,13 @@ static bool action_kvs_cmd_create(KviKvsModuleCallbackCommandCall * c) return false; } - QString szCategory,szWindows,szKeySequence; + TQString szCategory,szWindows,szKeySequence; int iFlags = 0; - if(c->switches()->find('i',"bind-to-context"))iFlags |= KviAction::NeedsContext; - if(c->switches()->find('c',"bind-to-connection"))iFlags |= KviAction::NeedsConnection | KviAction::NeedsContext; - if(c->switches()->find('l',"enable-at-login")) + if(c->switches()->tqfind('i',"bind-to-context"))iFlags |= KviAction::NeedsContext; + if(c->switches()->tqfind('c',"bind-to-connection"))iFlags |= KviAction::NeedsConnection | KviAction::NeedsContext; + if(c->switches()->tqfind('l',"enable-at-login")) { if(iFlags & KviAction::NeedsConnection) iFlags |= KviAction::EnableAtLogin; @@ -396,12 +396,12 @@ static bool action_kvs_cmd_create(KviKvsModuleCallbackCommandCall * c) c->switches()->getAsStringIfExisting('w',"window-types",szWindows); if(!szWindows.isEmpty()) { - if(szWindows.find('c') != -1)iFlags |= KviAction::WindowChannel; - if(szWindows.find('x') != -1)iFlags |= KviAction::WindowConsole; - if(szWindows.find('d') != -1)iFlags |= KviAction::WindowDccChat; - if(szWindows.find('q') != -1)iFlags |= KviAction::WindowQuery; + if(szWindows.tqfind('c') != -1)iFlags |= KviAction::WindowChannel; + if(szWindows.tqfind('x') != -1)iFlags |= KviAction::WindowConsole; + if(szWindows.tqfind('d') != -1)iFlags |= KviAction::WindowDccChat; + if(szWindows.tqfind('q') != -1)iFlags |= KviAction::WindowQuery; } - if(c->switches()->find('s',"enable-on-selected")) + if(c->switches()->tqfind('s',"enable-on-selected")) { if(iFlags & (KviAction::WindowChannel | KviAction::WindowConsole | KviAction::WindowQuery)) iFlags |= KviAction::WindowOnlyIfUsersSelected; @@ -417,12 +417,12 @@ static bool action_kvs_cmd_create(KviKvsModuleCallbackCommandCall * c) if(old->isKviUserActionNeverOverrideThis()) old->suicide(); else { - c->warning(__tr2qs("The action \"%1\" is already defined as core action and cannot be overridden").arg(szName)); + c->warning(__tr2qs("The action \"%1\" is already defined as core action and cannot be overridden").tqarg(szName)); return false; } } - QString szCmd = c->callback()->code(); + TQString szCmd = c->callback()->code(); if(szCmd.isEmpty()) { @@ -462,7 +462,7 @@ static bool action_kvs_cmd_create(KviKvsModuleCallbackCommandCall * c) static bool action_kvs_fnc_exists(KviKvsModuleFunctionCall * c) { - QString szName; + TQString szName; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("action_name",KVS_PT_NONEMPTYSTRING,0,szName) KVSM_PARAMETERS_END(c) @@ -487,7 +487,7 @@ static bool action_kvs_fnc_exists(KviKvsModuleFunctionCall * c) static bool action_kvs_fnc_isEnabled(KviKvsModuleFunctionCall * c) { - QString szName; + TQString szName; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("action_name",KVS_PT_NONEMPTYSTRING,0,szName) KVSM_PARAMETERS_END(c) diff --git a/src/modules/actioneditor/actioneditor.cpp b/src/modules/actioneditor/actioneditor.cpp index cfc12932..d4206564 100644 --- a/src/modules/actioneditor/actioneditor.cpp +++ b/src/modules/actioneditor/actioneditor.cpp @@ -41,32 +41,32 @@ #include "kvi_kvs_useraction.h" #include "kvi_customtoolbarmanager.h" -#include -#include +#include +#include #include "kvi_tal_vbox.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #ifdef COMPILE_USE_QT4 - #include + #include #else - #include + #include #endif -#include +#include #include #include "kvi_valuelist.h" -#include +#include extern KviActionEditorWindow * g_pActionEditorWindow; -static QString g_szLastEditedAction; +static TQString g_szLastEditedAction; #define LVI_ICON_SIZE 32 #define LVI_BORDER 4 @@ -91,22 +91,22 @@ KviActionEditorListViewItem::~KviActionEditorListViewItem() void KviActionEditorListViewItem::setupForActionData() { - QString t = "" + m_pActionData->m_szName + ""; + TQString t = "" + m_pActionData->m_szName + ""; t += "
" + m_pActionData->m_szVisibleName + ""; m_szKey = m_pActionData->m_szName.upper(); - m_pText = new QSimpleRichText(t,m_pListView->font()); + m_pText = new TQSimpleRichText(t,m_pListView->font()); if(m_pIcon)delete m_pIcon; - QPixmap * p = g_pIconManager->getBigIcon(m_pActionData->m_szBigIcon); - if(p)m_pIcon = new QPixmap(*p); + TQPixmap * p = g_pIconManager->getBigIcon(m_pActionData->m_szBigIcon); + if(p)m_pIcon = new TQPixmap(*p); else { p = g_pIconManager->getImage("kvi_bigicon_unknown.png"); - if(p)m_pIcon = new QPixmap(*p); - else m_pIcon = new QPixmap(LVI_ICON_SIZE,LVI_ICON_SIZE); + if(p)m_pIcon = new TQPixmap(*p); + else m_pIcon = new TQPixmap(LVI_ICON_SIZE,LVI_ICON_SIZE); } setup(); } -QString KviActionEditorListViewItem::key(int,bool) const +TQString KviActionEditorListViewItem::key(int,bool) const { return m_szKey; } @@ -123,105 +123,105 @@ void KviActionEditorListViewItem::setup() setHeight(iHeight); } -void KviActionEditorListViewItem::paintCell(QPainter * p,const QColorGroup & cg,int column,int width,int align) +void KviActionEditorListViewItem::paintCell(TQPainter * p,const TQColorGroup & cg,int column,int width,int align) { - p->fillRect(QRect(0,0,width,height()),isSelected() ? cg.highlight() : cg.base()); + p->fillRect(TQRect(0,0,width,height()),isSelected() ? cg.highlight() : cg.base()); p->drawPixmap(LVI_BORDER,LVI_BORDER,*m_pIcon); int afterIcon = LVI_BORDER + LVI_ICON_SIZE + LVI_SPACING; int www = m_pListView->visibleWidth() - (afterIcon + LVI_BORDER); m_pText->setWidth(www); - m_pText->draw(p,afterIcon,LVI_BORDER,QRect(afterIcon,LVI_BORDER,www,height() - (LVI_BORDER * 2)),cg); + m_pText->draw(p,afterIcon,LVI_BORDER,TQRect(afterIcon,LVI_BORDER,www,height() - (LVI_BORDER * 2)),cg); } -KviSingleActionEditor::KviSingleActionEditor(QWidget * par,KviActionEditor * ed) -: QWidget(par) +KviSingleActionEditor::KviSingleActionEditor(TQWidget * par,KviActionEditor * ed) +: TQWidget(par) { m_pActionEditor = ed; m_pActionData = 0; - QGridLayout * g = new QGridLayout(this,3,2,0,4); + TQGridLayout * g = new TQGridLayout(this,3,2,0,4); - QLabel * l = new QLabel(__tr2qs("Name:"),this); + TQLabel * l = new TQLabel(__tr2qs("Name:"),this); g->addWidget(l,0,0); - m_pNameEdit = new QLineEdit(this); + m_pNameEdit = new TQLineEdit(this); g->addWidget(m_pNameEdit,0,1); - QToolTip::add(m_pNameEdit,__tr2qs("Internal unique name for the action")); + TQToolTip::add(m_pNameEdit,__tr2qs("Internal unique name for the action")); - l = new QLabel(__tr2qs("Label:"),this); + l = new TQLabel(__tr2qs("Label:"),this); g->addWidget(l,1,0); - m_pVisibleNameEdit = new QLineEdit(this); + m_pVisibleNameEdit = new TQLineEdit(this); g->addWidget(m_pVisibleNameEdit,1,1); - QToolTip::add(m_pVisibleNameEdit,__tr2qs("Visible name for this action.
This string will be displayed to the user so it is a good idea to use $tr() here")); + TQToolTip::add(m_pVisibleNameEdit,__tr2qs("Visible name for this action.
This string will be displayed to the user so it is a good idea to use $tr() here")); - QTabWidget * tw = new QTabWidget(this); + TQTabWidget * tw = new TQTabWidget(this); g->addMultiCellWidget(tw,2,2,0,1); // code tab - QWidget * tab = new QWidget(tw); - QGridLayout * gl = new QGridLayout(tab,1,1,8,4); + TQWidget * tab = new TQWidget(tw); + TQGridLayout * gl = new TQGridLayout(tab,1,1,8,4); m_pScriptEditor = KviScriptEditor::createInstance(tab); gl->addWidget(m_pScriptEditor,0,0); - QToolTip::add(m_pScriptEditor,__tr2qs("Action code")); + TQToolTip::add(m_pScriptEditor,__tr2qs("Action code")); tw->addTab(tab,__tr2qs("Code")); // properties tab - tab = new QWidget(tw); - gl = new QGridLayout(tab,7,4,8,4); + tab = new TQWidget(tw); + gl = new TQGridLayout(tab,7,4,8,4); - l = new QLabel(__tr2qs("Category:"),tab); + l = new TQLabel(__tr2qs("Category:"),tab); gl->addWidget(l,0,0); - m_pCategoryCombo = new QComboBox(false,tab); + m_pCategoryCombo = new TQComboBox(false,tab); gl->addMultiCellWidget(m_pCategoryCombo,0,0,1,3); - QToolTip::add(m_pCategoryCombo,__tr2qs("Choose the category that best fits for this action")); + TQToolTip::add(m_pCategoryCombo,__tr2qs("Choose the category that best fits for this action")); - l = new QLabel(__tr2qs("Description:"),tab); + l = new TQLabel(__tr2qs("Description:"),tab); gl->addWidget(l,1,0); - m_pDescriptionEdit = new QLineEdit(tab); + m_pDescriptionEdit = new TQLineEdit(tab); gl->addMultiCellWidget(m_pDescriptionEdit,1,1,1,3); - QToolTip::add(m_pDescriptionEdit,__tr2qs("Visible short description for this action.
This string will be displayed to the user so it is a good idea to use $tr() here")); + TQToolTip::add(m_pDescriptionEdit,__tr2qs("Visible short description for this action.
This string will be displayed to the user so it is a good idea to use $tr() here")); - l = new QLabel(__tr2qs("Small Icon:"),tab); + l = new TQLabel(__tr2qs("Small Icon:"),tab); gl->addWidget(l,2,0); - m_pSmallIconEdit = new QLineEdit(tab); + m_pSmallIconEdit = new TQLineEdit(tab); gl->addWidget(m_pSmallIconEdit,2,1); - m_pSmallIconButton = new QToolButton(tab); - m_pSmallIconButton->setMinimumSize(QSize(20,20)); - connect(m_pSmallIconButton,SIGNAL(clicked()),this,SLOT(chooseSmallIcon())); + m_pSmallIconButton = new TQToolButton(tab); + m_pSmallIconButton->setMinimumSize(TQSize(20,20)); + connect(m_pSmallIconButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(chooseSmallIcon())); gl->addWidget(m_pSmallIconButton,2,2); - QString s= __tr2qs("The small icon associated to this action.
" \ + TQString s= __tr2qs("The small icon associated to this action.
" \ "It will appear at least in the popup menus when this action is inserted.
" \ "It should be 16x16 pixels."); - QToolTip::add(m_pSmallIconEdit,s); - QToolTip::add(m_pSmallIconButton,s); + TQToolTip::add(m_pSmallIconEdit,s); + TQToolTip::add(m_pSmallIconButton,s); - l = new QLabel(__tr2qs("Big Icon:"),tab); + l = new TQLabel(__tr2qs("Big Icon:"),tab); gl->addWidget(l,3,0); - m_pBigIconEdit = new QLineEdit(tab); + m_pBigIconEdit = new TQLineEdit(tab); gl->addWidget(m_pBigIconEdit,3,1); - m_pBigIconButton = new QToolButton(tab); - m_pBigIconButton->setMinimumSize(QSize(48,48)); + m_pBigIconButton = new TQToolButton(tab); + m_pBigIconButton->setMinimumSize(TQSize(48,48)); m_pBigIconButton->setUsesBigPixmap(true); - connect(m_pBigIconButton,SIGNAL(clicked()),this,SLOT(chooseBigIcon())); + connect(m_pBigIconButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(chooseBigIcon())); gl->addMultiCellWidget(m_pBigIconButton,3,4,2,3); s = __tr2qs("The big icon associated to this action.
" \ "It will appear at least in the toolbar buttons when this action is inserted.
" \ "It should be 32x32 pixels."); - QToolTip::add(m_pBigIconEdit,s); - QToolTip::add(m_pBigIconButton,s); + TQToolTip::add(m_pBigIconEdit,s); + TQToolTip::add(m_pBigIconButton,s); - l = new QLabel(__tr2qs("Key Sequence:"),tab); + l = new TQLabel(__tr2qs("Key Sequence:"),tab); gl->addMultiCellWidget(l,4,5,0,0); - m_pKeySequenceEdit = new QLineEdit(tab); + m_pKeySequenceEdit = new TQLineEdit(tab); gl->addMultiCellWidget(m_pKeySequenceEdit,4,5,1,1); - QToolTip::add(m_pKeySequenceEdit,__tr2qs("Optional keyboard sequence that will activate this action.
" \ + TQToolTip::add(m_pKeySequenceEdit,__tr2qs("Optional keyboard sequence that will activate this action.
" \ "The sequence should be expressed as a string of up to four key codes separated by commas " \ "eventually combined with the modifiers \"Ctrl\",\"Shift\",\"Alt\" and \"Meta\".
" \ "Examples of such sequences are \"Ctrl+X\", \"Ctrl+Alt+Z\", \"Ctrl+X,Ctrl+C\" ...")); - l = new QLabel(tab); + l = new TQLabel(tab); gl->addMultiCellWidget(l,6,6,0,3); gl->setColStretch(1,1); @@ -233,82 +233,82 @@ KviSingleActionEditor::KviSingleActionEditor(QWidget * par,KviActionEditor * ed) // flags tab - tab = new QWidget(tw); - gl = new QGridLayout(tab,12,4,8,4); + tab = new TQWidget(tw); + gl = new TQGridLayout(tab,12,4,8,4); m_pNeedsContextCheck = new KviStyledCheckBox(__tr2qs("Needs IRC Context"),tab); - connect(m_pNeedsContextCheck,SIGNAL(toggled(bool)),this,SLOT(needsContextCheckToggled(bool))); - QToolTip::add(m_pNeedsContextCheck,__tr2qs("Check this option if this action should be enabled only when " \ + connect(m_pNeedsContextCheck,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(needsContextCheckToggled(bool))); + TQToolTip::add(m_pNeedsContextCheck,__tr2qs("Check this option if this action should be enabled only when " \ "the active window belongs to an irc context")); gl->addMultiCellWidget(m_pNeedsContextCheck,0,0,0,3); - l = new QLabel(tab); + l = new TQLabel(tab); l->setMinimumWidth(40); gl->addWidget(l,1,0); m_pNeedsConnectionCheck = new KviStyledCheckBox(__tr2qs("Needs IRC Connection"),tab); - connect(m_pNeedsConnectionCheck,SIGNAL(toggled(bool)),this,SLOT(needsConnectionCheckToggled(bool))); - QToolTip::add(m_pNeedsConnectionCheck,__tr2qs("Check this option if this action should be enabled only when " \ + connect(m_pNeedsConnectionCheck,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(needsConnectionCheckToggled(bool))); + TQToolTip::add(m_pNeedsConnectionCheck,__tr2qs("Check this option if this action should be enabled only when " \ "the active window has an active IRC connection")); gl->addMultiCellWidget(m_pNeedsConnectionCheck,1,1,1,3); - l = new QLabel(tab); + l = new TQLabel(tab); l->setMinimumWidth(40); gl->addWidget(l,2,1); m_pEnableAtLoginCheck = new KviStyledCheckBox(__tr2qs("Enable at Login"),tab); - QToolTip::add(m_pEnableAtLoginCheck,__tr2qs("Check this option if this action should be enabled also during " \ + TQToolTip::add(m_pEnableAtLoginCheck,__tr2qs("Check this option if this action should be enabled also during " \ "the login operations (so when the logical IRC connection hasn't been estabilished yet)")); gl->addMultiCellWidget(m_pEnableAtLoginCheck,2,2,2,3); m_pSpecificWindowsCheck = new KviStyledCheckBox(__tr2qs("Enable Only in Specified Windows"),tab); - connect(m_pSpecificWindowsCheck,SIGNAL(toggled(bool)),this,SLOT(specificWindowsCheckToggled(bool))); - QToolTip::add(m_pSpecificWindowsCheck,__tr2qs("Check this option if this action should be enabled only when " \ + connect(m_pSpecificWindowsCheck,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(specificWindowsCheckToggled(bool))); + TQToolTip::add(m_pSpecificWindowsCheck,__tr2qs("Check this option if this action should be enabled only when " \ "the active window is of a specified type")); gl->addMultiCellWidget(m_pSpecificWindowsCheck,3,3,0,3); m_pWindowConsoleCheck = new KviStyledCheckBox(__tr2qs("Enable in Console Windows"),tab); - QToolTip::add(m_pWindowConsoleCheck,__tr2qs("Check this option if this action should be enabled only when " \ + TQToolTip::add(m_pWindowConsoleCheck,__tr2qs("Check this option if this action should be enabled only when " \ "the active window is a console")); - connect(m_pWindowConsoleCheck,SIGNAL(toggled(bool)),this,SLOT(channelQueryOrConsoleWindowCheckToggled(bool))); + connect(m_pWindowConsoleCheck,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(channelQueryOrConsoleWindowCheckToggled(bool))); gl->addMultiCellWidget(m_pWindowConsoleCheck,4,4,1,3); m_pConsoleOnlyIfUsersSelectedCheck = new KviStyledCheckBox(__tr2qs("Only If There Are Selected Users"),tab); - QToolTip::add(m_pConsoleOnlyIfUsersSelectedCheck,__tr2qs("This will enable the action only if there are " \ + TQToolTip::add(m_pConsoleOnlyIfUsersSelectedCheck,__tr2qs("This will enable the action only if there are " \ "selected users in the active window")); gl->addMultiCellWidget(m_pConsoleOnlyIfUsersSelectedCheck,5,5,2,3); m_pWindowChannelCheck = new KviStyledCheckBox(__tr2qs("Enable in Channel Windows"),tab); - QToolTip::add(m_pWindowChannelCheck,__tr2qs("Check this option if this action should be enabled only when " \ + TQToolTip::add(m_pWindowChannelCheck,__tr2qs("Check this option if this action should be enabled only when " \ "the active window is a channel")); - connect(m_pWindowChannelCheck,SIGNAL(toggled(bool)),this,SLOT(channelQueryOrConsoleWindowCheckToggled(bool))); + connect(m_pWindowChannelCheck,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(channelQueryOrConsoleWindowCheckToggled(bool))); gl->addMultiCellWidget(m_pWindowChannelCheck,6,6,1,3); m_pChannelOnlyIfUsersSelectedCheck = new KviStyledCheckBox(__tr2qs("Only If There Are Selected Users"),tab); - QToolTip::add(m_pChannelOnlyIfUsersSelectedCheck,__tr2qs("This will enable the action only if there are " \ + TQToolTip::add(m_pChannelOnlyIfUsersSelectedCheck,__tr2qs("This will enable the action only if there are " \ "selected users in the active window")); gl->addMultiCellWidget(m_pChannelOnlyIfUsersSelectedCheck,7,7,2,3); m_pWindowQueryCheck = new KviStyledCheckBox(__tr2qs("Enable in Query Windows"),tab); - QToolTip::add(m_pWindowQueryCheck,__tr2qs("Check this option if this action should be enabled only when " \ + TQToolTip::add(m_pWindowQueryCheck,__tr2qs("Check this option if this action should be enabled only when " \ "the active window is a query")); - connect(m_pWindowQueryCheck,SIGNAL(toggled(bool)),this,SLOT(channelQueryOrConsoleWindowCheckToggled(bool))); + connect(m_pWindowQueryCheck,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(channelQueryOrConsoleWindowCheckToggled(bool))); gl->addMultiCellWidget(m_pWindowQueryCheck,8,8,1,3); m_pQueryOnlyIfUsersSelectedCheck = new KviStyledCheckBox(__tr2qs("Only If There Are Selected Users"),tab); - QToolTip::add(m_pQueryOnlyIfUsersSelectedCheck,__tr2qs("This will enable the action only if there are " \ + TQToolTip::add(m_pQueryOnlyIfUsersSelectedCheck,__tr2qs("This will enable the action only if there are " \ "selected users in the active window")); gl->addMultiCellWidget(m_pQueryOnlyIfUsersSelectedCheck,9,9,2,3); m_pWindowDccChatCheck = new KviStyledCheckBox(__tr2qs("Enable in DCC Chat Windows"),tab); - QToolTip::add(m_pWindowDccChatCheck,__tr2qs("Check this option if this action should be enabled only when " \ + TQToolTip::add(m_pWindowDccChatCheck,__tr2qs("Check this option if this action should be enabled only when " \ "the active window is a dcc chat")); gl->addMultiCellWidget(m_pWindowDccChatCheck,10,10,1,3); - l = new QLabel(tab); + l = new TQLabel(tab); gl->addMultiCellWidget(l,11,11,0,3); gl->setColStretch(3,1); @@ -324,7 +324,7 @@ KviSingleActionEditor::KviSingleActionEditor(QWidget * par,KviActionEditor * ed) g->setColStretch(1,1); - KviPointerHashTableIterator it(*(KviActionManager::instance()->categories())); + KviPointerHashTableIterator it(*(KviActionManager::instance()->categories())); while(KviActionCategory * ac = it.current()) { m_pCategoryCombo->insertItem(ac->visibleName() + " (" + ac->name() + ")"); @@ -384,10 +384,10 @@ void KviSingleActionEditor::chooseSmallIcon() if(!m_pActionData)return; KviImageDialog * d = new KviImageDialog(this); int ret = d->exec(); - QString s = d->selectedImage(); + TQString s = d->selectedImage(); delete d; - if(ret != QDialog::Accepted)return; - QPixmap * p = g_pIconManager->getImage(s.utf8().data()); + if(ret != TQDialog::Accepted)return; + TQPixmap * p = g_pIconManager->getImage(s.utf8().data()); if(!p)return; m_pSmallIconEdit->setText(s); m_pSmallIconButton->setPixmap(*p); @@ -396,12 +396,12 @@ void KviSingleActionEditor::chooseSmallIcon() void KviSingleActionEditor::chooseBigIcon() { if(!m_pActionData)return; - KviImageDialog * d = new KviImageDialog(this,QString::null,KID_TYPE_ALL,KID_TYPE_FULL_PATH); + KviImageDialog * d = new KviImageDialog(this,TQString(),KID_TYPE_ALL,KID_TYPE_FULL_PATH); int ret = d->exec(); - QString s = d->selectedImage(); + TQString s = d->selectedImage(); delete d; - if(ret != QDialog::Accepted)return; - QPixmap * p = g_pIconManager->getBigIcon(s); + if(ret != TQDialog::Accepted)return; + TQPixmap * p = g_pIconManager->getBigIcon(s); if(!p)return; m_pBigIconEdit->setText(s); m_pBigIconButton->setPixmap(*p); @@ -426,10 +426,10 @@ void KviSingleActionEditor::setActionData(KviActionData * d) int i; for(i=0;icount();i++) { - QString t = m_pCategoryCombo->text(i); - int idx = t.findRev('('); - QString r = t.right(t.length() - (idx + 1)); - QString r2 = r.left(r.length() - 1); + TQString t = m_pCategoryCombo->text(i); + int idx = t.tqfindRev('('); + TQString r = t.right(t.length() - (idx + 1)); + TQString r2 = r.left(r.length() - 1); r2.stripWhiteSpace(); if(r2 == d->m_szCategory) { @@ -449,14 +449,14 @@ void KviSingleActionEditor::setActionData(KviActionData * d) m_pDescriptionEdit->setEnabled(true); m_pSmallIconEdit->setEnabled(true); m_pBigIconEdit->setEnabled(true); - QPixmap * p = g_pIconManager->getImage(d->m_szSmallIcon); + TQPixmap * p = g_pIconManager->getImage(d->m_szSmallIcon); if(p) { m_pSmallIconEdit->setText(d->m_szSmallIcon); m_pSmallIconButton->setPixmap(*p); } else { m_pSmallIconEdit->setText(""); - m_pSmallIconButton->setPixmap(QPixmap()); + m_pSmallIconButton->setPixmap(TQPixmap()); } p = g_pIconManager->getImage(d->m_szBigIcon); if(p) @@ -465,7 +465,7 @@ void KviSingleActionEditor::setActionData(KviActionData * d) m_pBigIconButton->setPixmap(*p); } else { m_pBigIconEdit->setText(""); - m_pBigIconButton->setPixmap(QPixmap()); + m_pBigIconButton->setPixmap(TQPixmap()); } m_pSmallIconButton->setEnabled(true); m_pBigIconButton->setEnabled(true); @@ -517,9 +517,9 @@ void KviSingleActionEditor::setActionData(KviActionData * d) m_pSmallIconEdit->setEnabled(false); m_pBigIconEdit->setText(""); m_pBigIconEdit->setEnabled(false); - m_pSmallIconButton->setPixmap(QPixmap()); + m_pSmallIconButton->setPixmap(TQPixmap()); m_pSmallIconButton->setEnabled(false); - m_pBigIconButton->setPixmap(QPixmap()); + m_pBigIconButton->setPixmap(TQPixmap()); m_pBigIconButton->setEnabled(false); m_pNeedsContextCheck->setChecked(false); m_pNeedsContextCheck->setEnabled(false); @@ -550,13 +550,13 @@ void KviSingleActionEditor::commit() { if(!m_pActionData)return; - QString tmp = m_pNameEdit->text(); + TQString tmp = m_pNameEdit->text(); if(tmp != m_pActionData->m_szName) { int idx = 1; while(KviActionManager::instance()->coreActionExists(tmp) || m_pActionEditor->actionExists(tmp)) { - QString tmp2; + TQString tmp2; tmp2.setNum(idx); tmp = m_pNameEdit->text(); tmp.append(tmp2); @@ -571,11 +571,11 @@ void KviSingleActionEditor::commit() m_pActionData->m_szBigIcon = m_pBigIconEdit->text(); m_pActionData->m_szSmallIcon = m_pSmallIconEdit->text(); m_pActionData->m_szKeySequence = m_pKeySequenceEdit->text(); - QString szCat = m_pCategoryCombo->currentText(); - int idx = szCat.findRev(')'); + TQString szCat = m_pCategoryCombo->currentText(); + int idx = szCat.tqfindRev(')'); if(idx != -1)m_pActionData->m_szCategory = szCat.left(idx); else m_pActionData->m_szCategory = szCat; - idx = m_pActionData->m_szCategory.findRev('('); + idx = m_pActionData->m_szCategory.tqfindRev('('); if(idx != -1)m_pActionData->m_szCategory.remove(0,idx+1); m_pActionData->m_uFlags = 0; if(m_pNeedsContextCheck->isChecked()) @@ -618,7 +618,7 @@ void KviSingleActionEditor::commit() -KviActionEditorListView::KviActionEditorListView(QWidget * pParent) +KviActionEditorListView::KviActionEditorListView(TQWidget * pParent) : KviTalListView(pParent) { setSelectionMode(Extended); @@ -633,7 +633,7 @@ KviActionEditorListView::~KviActionEditorListView() } -void KviActionEditorListView::resizeEvent(QResizeEvent * e) +void KviActionEditorListView::resizeEvent(TQResizeEvent * e) { KviTalListView::resizeEvent(e); int iWidth = visibleWidth(); @@ -648,18 +648,18 @@ void KviActionEditorListView::resizeEvent(QResizeEvent * e) -KviActionEditor::KviActionEditor(QWidget * par) -: QWidget(par) +KviActionEditor::KviActionEditor(TQWidget * par) +: TQWidget(par) { - QGridLayout * l = new QGridLayout(this,1,1,2,2); + TQGridLayout * l = new TQGridLayout(this,1,1,2,2); #ifdef COMPILE_USE_QT4 - m_pSplitter = new QSplitter(Qt::Horizontal,this); + m_pSplitter = new TQSplitter(Qt::Horizontal,this); m_pSplitter->setOpaqueResize(false); #else - m_pSplitter = new QSplitter(QSplitter::Horizontal,this); + m_pSplitter = new TQSplitter(Qt::Horizontal,this); #endif l->addWidget(m_pSplitter,0,0); @@ -670,21 +670,21 @@ KviActionEditor::KviActionEditor(QWidget * par) //m_pListView->setMultiSelection(false); m_pListView->setShowSortIndicator(true); #ifdef COMPILE_USE_QT4 - m_pListView->setFocusPolicy(Qt::StrongFocus); + m_pListView->setFocusPolicy(TTQ_StrongFocus); #else - m_pListView->setFocusPolicy(QWidget::StrongFocus); + m_pListView->setFocusPolicy(TQ_StrongFocus); #endif - connect(m_pListView,SIGNAL(currentChanged(KviTalListViewItem *)),this,SLOT(currentChanged(KviTalListViewItem *))); + connect(m_pListView,TQT_SIGNAL(currentChanged(KviTalListViewItem *)),this,TQT_SLOT(currentChanged(KviTalListViewItem *))); - m_pNewActionButton = new QPushButton(__tr2qs("New Action"),box); - connect(m_pNewActionButton,SIGNAL(clicked()),this,SLOT(newAction())); + m_pNewActionButton = new TQPushButton(__tr2qs("New Action"),box); + connect(m_pNewActionButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(newAction())); - m_pDeleteActionsButton = new QPushButton(__tr2qs("Delete Actions"),box); - connect(m_pDeleteActionsButton,SIGNAL(clicked()),this,SLOT(deleteActions())); + m_pDeleteActionsButton = new TQPushButton(__tr2qs("Delete Actions"),box); + connect(m_pDeleteActionsButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(deleteActions())); - m_pExportActionsButton = new QPushButton(__tr2qs("Export Actions..."),box); - connect(m_pExportActionsButton,SIGNAL(clicked()),this,SLOT(exportActions())); + m_pExportActionsButton = new TQPushButton(__tr2qs("Export Actions..."),box); + connect(m_pExportActionsButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(exportActions())); box->setSpacing(1); @@ -693,7 +693,7 @@ KviActionEditor::KviActionEditor(QWidget * par) KviActionEditorListViewItem * last = 0; KviActionEditorListViewItem * first = 0; - KviPointerHashTableIterator it(*(KviActionManager::instance()->actions())); + KviPointerHashTableIterator it(*(KviActionManager::instance()->actions())); while(KviAction * a = it.current()) { if(a->isKviUserActionNeverOverrideThis()) @@ -736,15 +736,15 @@ KviActionEditor::~KviActionEditor() void KviActionEditor::exportActions() { - QString szName = QDir::homeDirPath(); - if(!szName.endsWith(QString(KVI_PATH_SEPARATOR)))szName += KVI_PATH_SEPARATOR; + TQString szName = TQDir::homeDirPath(); + if(!szName.endsWith(TQString(KVI_PATH_SEPARATOR)))szName += KVI_PATH_SEPARATOR; szName += "myactions.kvs"; - QString szFile; + TQString szFile; - if(!KviFileDialog::askForSaveFileName(szFile,__tr2qs("Choose a Filename - KVIrc"),szName,QString::null,true,true,true))return; + if(!KviFileDialog::askForSaveFileName(szFile,__tr2qs("Choose a Filename - KVIrc"),szName,TQString(),true,true,true))return; - QString szCode; + TQString szCode; KviActionEditorListViewItem * it = (KviActionEditorListViewItem *)m_pListView->firstChild(); while(it) @@ -770,7 +770,7 @@ void KviActionEditor::exportActions() if(!KviFileUtils::writeFile(szFile,szCode)) { - QMessageBox::warning(this,__tr2qs("Write Failed - KVIrc"),__tr2qs("Unable to write to the actions file."),__tr2qs("OK")); + TQMessageBox::warning(this,__tr2qs("Write Failed - KVIrc"),__tr2qs("Unable to write to the actions file."),__tr2qs("OK")); } } @@ -790,7 +790,7 @@ void KviActionEditor::deleteActions() if(l.isEmpty())return; - //if(QMessageBox::question(this,__tr2qsf("Confirm Deletion"),__tr2qsf("Do you really want to delete the selected actions ?"),__tr2qsf("Yes"),__tr2qsf("No")) != 0) + //if(TQMessageBox::question(this,__tr2qsf("Confirm Deletion"),__tr2qsf("Do you really want to delete the selected actions ?"),__tr2qsf("Yes"),__tr2qsf("No")) != 0) // return; for(KviActionEditorListViewItem * i = l.first();i;i = l.next()) @@ -802,16 +802,16 @@ void KviActionEditor::deleteActions() } -QString KviActionEditor::nameForAutomaticAction(const QString &szTemplate) +TQString KviActionEditor::nameForAutomaticAction(const TQString &szTemplate) { - QString ret; - QString szT = szTemplate; - szT.replace(" ",""); - szT.replace(".","_"); + TQString ret; + TQString szT = szTemplate; + szT.tqreplace(" ",""); + szT.tqreplace(".","_"); int i = 1; do { - KviQString::sprintf(ret,"%Q%d",&szT,i); + KviTQString::sprintf(ret,"%Q%d",&szT,i); i++; } while(actionExists(ret)); @@ -820,9 +820,9 @@ QString KviActionEditor::nameForAutomaticAction(const QString &szTemplate) void KviActionEditor::newAction() { - QString szName = nameForAutomaticAction(__tr2qs("My Action")); - QString szVis = __tr2qs("My Action"); - QString szDes = __tr2qs("Put here a short description of your action"); + TQString szName = nameForAutomaticAction(__tr2qs("My Action")); + TQString szVis = __tr2qs("My Action"); + TQString szDes = __tr2qs("Put here a short description of your action"); szVis.prepend("$tr(\""); szVis.append("\")"); @@ -830,14 +830,14 @@ void KviActionEditor::newAction() szDes.append("\")"); KviActionData * ad = new KviActionData(szName, - QString::null, + TQString(), szVis, szDes, KviActionManager::categoryGeneric()->name(), - QString::null, - QString::null, + TQString(), + TQString(), 0, - QString::null, + TQString(), 0); KviActionEditorListViewItem * lvi = new KviActionEditorListViewItem(m_pListView,ad); @@ -846,7 +846,7 @@ void KviActionEditor::newAction() currentChanged(lvi); } -bool KviActionEditor::actionExists(const QString &szName) +bool KviActionEditor::actionExists(const TQString &szName) { KviActionEditorListViewItem * it = (KviActionEditorListViewItem *)m_pListView->firstChild(); while(it) @@ -926,24 +926,24 @@ KviActionEditorWindow::KviActionEditorWindow(KviFrame * lpFrm) m_pEditor = new KviActionEditor(this); - m_pBase = new QWidget(this); - QGridLayout * g = new QGridLayout(m_pBase,1,4,4,4); + m_pBase = new TQWidget(this); + TQGridLayout * g = new TQGridLayout(m_pBase,1,4,4,4); - QPushButton * btn = new QPushButton(__tr2qs("OK"),m_pBase); + TQPushButton * btn = new TQPushButton(__tr2qs("OK"),m_pBase); btn->setMinimumWidth(80); - connect(btn,SIGNAL(clicked()),this,SLOT(okClicked())); + connect(btn,TQT_SIGNAL(clicked()),this,TQT_SLOT(okClicked())); btn->setIconSet(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_ACCEPT))); g->addWidget(btn,0,1); - btn = new QPushButton(__tr2qs("Apply"),m_pBase); + btn = new TQPushButton(__tr2qs("Apply"),m_pBase); btn->setMinimumWidth(80); - connect(btn,SIGNAL(clicked()),this,SLOT(applyClicked())); + connect(btn,TQT_SIGNAL(clicked()),this,TQT_SLOT(applyClicked())); btn->setIconSet(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_ACCEPT))); g->addWidget(btn,0,2); - btn = new QPushButton(__tr2qs("Cancel"),m_pBase); + btn = new TQPushButton(__tr2qs("Cancel"),m_pBase); btn->setMinimumWidth(80); - connect(btn,SIGNAL(clicked()),this,SLOT(cancelClicked())); + connect(btn,TQT_SIGNAL(clicked()),this,TQT_SLOT(cancelClicked())); btn->setIconSet(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_DISCARD))); g->addWidget(btn,0,3); @@ -973,14 +973,14 @@ void KviActionEditorWindow::cancelClicked() } -QPixmap * KviActionEditorWindow::myIconPtr() +TQPixmap * KviActionEditorWindow::myIconPtr() { return g_pIconManager->getSmallIcon(KVI_SMALLICON_SCRIPTACTION); } -void KviActionEditorWindow::resizeEvent(QResizeEvent *e) +void KviActionEditorWindow::resizeEvent(TQResizeEvent *e) { - int hght = m_pBase->sizeHint().height(); + int hght = m_pBase->tqsizeHint().height(); m_pEditor->setGeometry(0,0,width(),height()- hght); m_pBase->setGeometry(0,height() - hght,width(),hght); } diff --git a/src/modules/actioneditor/actioneditor.h b/src/modules/actioneditor/actioneditor.h index fc112614..7c2b2736 100644 --- a/src/modules/actioneditor/actioneditor.h +++ b/src/modules/actioneditor/actioneditor.h @@ -26,7 +26,7 @@ #include "kvi_window.h" -#include +#include #include "kvi_tal_listview.h" #include "kvi_styled_controls.h" @@ -35,26 +35,26 @@ class KviActionEditorListViewItem; class KviActionData { public: - QString m_szName; - QString m_szScriptCode; - QString m_szVisibleName; - QString m_szDescription; - QString m_szCategory; - QString m_szBigIcon; - QString m_szSmallIcon; - QString m_szKeySequence; + TQString m_szName; + TQString m_szScriptCode; + TQString m_szVisibleName; + TQString m_szDescription; + TQString m_szCategory; + TQString m_szBigIcon; + TQString m_szSmallIcon; + TQString m_szKeySequence; unsigned int m_uFlags; KviActionEditorListViewItem * m_pItem; // ummigarba tanto... public: - KviActionData(const QString &szName, - const QString &szScriptCode, - const QString &szVisibleName, - const QString &szDescription, - const QString &szCategory, - const QString &szBigIcon, - const QString &szSmallIcon, + KviActionData(const TQString &szName, + const TQString &szScriptCode, + const TQString &szVisibleName, + const TQString &szDescription, + const TQString &szCategory, + const TQString &szBigIcon, + const TQString &szSmallIcon, unsigned int uFlags, - const QString &szKeySequence, + const TQString &szKeySequence, KviActionEditorListViewItem * pItem) : m_szName(szName), m_szScriptCode(szScriptCode), m_szVisibleName(szVisibleName), m_szDescription(szDescription), m_szCategory(szCategory), m_szBigIcon(szBigIcon), @@ -64,18 +64,18 @@ public: }; -class QLineEdit; -class QComboBox; +class TQLineEdit; +class TQComboBox; class KviScriptEditor; -class QToolButton; -class QSimpleRichText; -class QPushButton; +class TQToolButton; +class TQSimpleRichText; +class TQPushButton; #ifdef COMPILE_USE_QT4 - #include - #define QSimpleRichText Q3SimpleRichText + #include + #define TQSimpleRichText Q3SimpleRichText #else - #include + #include #endif @@ -87,51 +87,53 @@ public: ~KviActionEditorListViewItem(); protected: KviActionData * m_pActionData; - QSimpleRichText * m_pText; - QPixmap * m_pIcon; + TQSimpleRichText * m_pText; + TQPixmap * m_pIcon; KviTalListView * m_pListView; - QString m_szKey; + TQString m_szKey; public: KviActionData * actionData(){ return m_pActionData; }; void setupForActionData(); public: - virtual void paintCell(QPainter * p,const QColorGroup & cg,int column,int width,int align); + virtual void paintCell(TQPainter * p,const TQColorGroup & cg,int column,int width,int align); virtual void setup(); - virtual QString key(int,bool) const; + virtual TQString key(int,bool) const; }; class KviActionEditorListView : public KviTalListView { Q_OBJECT + TQ_OBJECT public: - KviActionEditorListView(QWidget * pParent); + KviActionEditorListView(TQWidget * pParent); ~KviActionEditorListView(); protected: - virtual void resizeEvent(QResizeEvent * e); + virtual void resizeEvent(TQResizeEvent * e); }; class KviActionEditor; -class KviSingleActionEditor : public QWidget +class KviSingleActionEditor : public TQWidget { Q_OBJECT + TQ_OBJECT public: - KviSingleActionEditor(QWidget * par,KviActionEditor * ed); + KviSingleActionEditor(TQWidget * par,KviActionEditor * ed); ~KviSingleActionEditor(); protected: KviActionEditor * m_pActionEditor; KviActionData * m_pActionData; - QLineEdit * m_pNameEdit; - QLineEdit * m_pVisibleNameEdit; - QComboBox * m_pCategoryCombo; + TQLineEdit * m_pNameEdit; + TQLineEdit * m_pVisibleNameEdit; + TQComboBox * m_pCategoryCombo; KviScriptEditor * m_pScriptEditor; - QLineEdit * m_pKeySequenceEdit; - QLineEdit * m_pDescriptionEdit; - QLineEdit * m_pSmallIconEdit; - QLineEdit * m_pBigIconEdit; - QToolButton * m_pSmallIconButton; - QToolButton * m_pBigIconButton; + TQLineEdit * m_pKeySequenceEdit; + TQLineEdit * m_pDescriptionEdit; + TQLineEdit * m_pSmallIconEdit; + TQLineEdit * m_pBigIconEdit; + TQToolButton * m_pSmallIconButton; + TQToolButton * m_pBigIconButton; KviStyledCheckBox * m_pNeedsContextCheck; KviStyledCheckBox * m_pNeedsConnectionCheck; KviStyledCheckBox * m_pEnableAtLoginCheck; @@ -156,28 +158,29 @@ protected slots: void channelQueryOrConsoleWindowCheckToggled(bool); }; -class QSplitter; +class TQSplitter; -class KviActionEditor : public QWidget +class KviActionEditor : public TQWidget { friend class KviActionEditorWindow; Q_OBJECT + TQ_OBJECT public: - KviActionEditor(QWidget * par); + KviActionEditor(TQWidget * par); ~KviActionEditor(); protected: KviActionEditorListView * m_pListView; KviSingleActionEditor * m_pSingleActionEditor; - QSplitter * m_pSplitter; - QPushButton * m_pNewActionButton; - QPushButton * m_pDeleteActionsButton; - QPushButton * m_pExportActionsButton; + TQSplitter * m_pSplitter; + TQPushButton * m_pNewActionButton; + TQPushButton * m_pDeleteActionsButton; + TQPushButton * m_pExportActionsButton; public: void commit(); - bool actionExists(const QString &szName); + bool actionExists(const TQString &szName); protected: int selectedCount(); - QString nameForAutomaticAction(const QString &szTemplate); + TQString nameForAutomaticAction(const TQString &szTemplate); protected slots: void currentChanged(KviTalListViewItem * it); void newAction(); @@ -189,15 +192,16 @@ protected slots: class KviActionEditorWindow : public KviWindow { Q_OBJECT + TQ_OBJECT public: KviActionEditorWindow(KviFrame * lpFrm); ~KviActionEditorWindow(); protected: KviActionEditor * m_pEditor; - QWidget * m_pBase; + TQWidget * m_pBase; protected: - virtual QPixmap * myIconPtr(); - virtual void resizeEvent(QResizeEvent *e); + virtual TQPixmap * myIconPtr(); + virtual void resizeEvent(TQResizeEvent *e); virtual void getConfigGroupName(KviStr &szName); virtual void saveProperties(KviConfig *); virtual void loadProperties(KviConfig *); diff --git a/src/modules/addon/libkviaddon.cpp b/src/modules/addon/libkviaddon.cpp index a7cd4b88..6e984779 100644 --- a/src/modules/addon/libkviaddon.cpp +++ b/src/modules/addon/libkviaddon.cpp @@ -41,7 +41,7 @@ -QRect g_rectManagementDialogGeometry(0,0,0,0); +TQRect g_rectManagementDialogGeometry(0,0,0,0); /* @doc: addon.exists @@ -62,8 +62,8 @@ QRect g_rectManagementDialogGeometry(0,0,0,0); static bool addon_kvs_fnc_exists(KviKvsModuleFunctionCall * c) { - QString szId; - QString szVersion; + TQString szId; + TQString szVersion; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("id",KVS_PT_NONEMPTYSTRING,0,szId) KVSM_PARAMETER("version",KVS_PT_STRING,KVS_PF_OPTIONAL,szVersion) @@ -102,7 +102,7 @@ static bool addon_kvs_fnc_exists(KviKvsModuleFunctionCall * c) static bool addon_kvs_fnc_version(KviKvsModuleFunctionCall * c) { - QString szId; + TQString szId; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("id",KVS_PT_NONEMPTYSTRING,0,szId) KVSM_PARAMETERS_END(c) @@ -135,10 +135,10 @@ static bool addon_kvs_fnc_version(KviKvsModuleFunctionCall * c) static bool addon_kvs_cmd_list(KviKvsModuleCommandCall * c) { - KviPointerHashTable * da = KviKvsScriptAddonManager::instance()->addonDict(); + KviPointerHashTable * da = KviKvsScriptAddonManager::instance()->addonDict(); int cnt = 0; - KviPointerHashTableIterator it(*da); + KviPointerHashTableIterator it(*da); while(KviKvsScriptAddon * a = it.current()) { c->window()->output(KVI_OUT_SYSTEMMESSAGE,__tr2qs("%cAddon id %Q, version %Q%c"),KVI_TEXT_BOLD,&(a->name()),&(a->version()),KVI_TEXT_BOLD); @@ -180,7 +180,7 @@ static bool addon_kvs_cmd_list(KviKvsModuleCommandCall * c) static bool addon_kvs_cmd_uninstall(KviKvsModuleCommandCall * c) { - QString szName; + TQString szName; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("name",KVS_PT_NONEMPTYSTRING,0,szName) KVSM_PARAMETERS_END(c) @@ -188,14 +188,14 @@ static bool addon_kvs_cmd_uninstall(KviKvsModuleCommandCall * c) KviKvsScriptAddon * a = KviKvsScriptAddonManager::instance()->findAddon(szName); if(a) { - if(!c->switches()->find('q',"quiet")) + if(!c->switches()->tqfind('q',"quiet")) c->window()->output(KVI_OUT_SYSTEMMESSAGE,__tr2qs("Uninstalling existing addon version %Q"),&(a->version())); // uninstall the existing version - KviKvsScriptAddonManager::instance()->unregisterAddon(szName,c->window(),!c->switches()->find('n',"no-callback")); + KviKvsScriptAddonManager::instance()->unregisterAddon(szName,c->window(),!c->switches()->tqfind('n',"no-callback")); } else { - if(!c->switches()->find('q',"quiet")) - c->warning(__tr2qs("The addon \"%1\" does not exist").arg(szName)); + if(!c->switches()->tqfind('q',"quiet")) + c->warning(__tr2qs("The addon \"%1\" does not exist").tqarg(szName)); } return true; @@ -223,7 +223,7 @@ static bool addon_kvs_cmd_uninstall(KviKvsModuleCommandCall * c) static bool addon_kvs_cmd_configure(KviKvsModuleCommandCall * c) { - QString szName; + TQString szName; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("name",KVS_PT_NONEMPTYSTRING,0,szName) KVSM_PARAMETERS_END(c) @@ -231,17 +231,17 @@ static bool addon_kvs_cmd_configure(KviKvsModuleCommandCall * c) KviKvsScriptAddon * a = KviKvsScriptAddonManager::instance()->findAddon(szName); if(a) { - QString ss = a->configureCallbackCode(); + TQString ss = a->configureCallbackCode(); if(ss.isEmpty()) { - if(!c->switches()->find('q',"quiet")) - c->warning(__tr2qs("The addon \"%1\" has no configure callback set").arg(szName)); + if(!c->switches()->tqfind('q',"quiet")) + c->warning(__tr2qs("The addon \"%1\" has no configure callback set").tqarg(szName)); } else { a->executeConfigureCallback(c->window()); } } else { - if(!c->switches()->find('q',"quiet")) - c->warning(__tr2qs("The addon \"%1\" does not exist").arg(szName)); + if(!c->switches()->tqfind('q',"quiet")) + c->warning(__tr2qs("The addon \"%1\" does not exist").tqarg(szName)); } return true; @@ -270,7 +270,7 @@ static bool addon_kvs_cmd_configure(KviKvsModuleCommandCall * c) static bool addon_kvs_cmd_help(KviKvsModuleCommandCall * c) { - QString szName; + TQString szName; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("name",KVS_PT_NONEMPTYSTRING,0,szName) KVSM_PARAMETERS_END(c) @@ -278,17 +278,17 @@ static bool addon_kvs_cmd_help(KviKvsModuleCommandCall * c) KviKvsScriptAddon * a = KviKvsScriptAddonManager::instance()->findAddon(szName); if(a) { - QString ss = a->helpCallbackCode(); + TQString ss = a->helpCallbackCode(); if(ss.isEmpty()) { - if(!c->switches()->find('q',"quiet")) - c->warning(__tr2qs("The addon \"%1\" has no help callback set").arg(szName)); + if(!c->switches()->tqfind('q',"quiet")) + c->warning(__tr2qs("The addon \"%1\" has no help callback set").tqarg(szName)); } else { a->executeHelpCallback(c->window()); } } else { - if(!c->switches()->find('q',"quiet")) - c->warning(__tr2qs("The addon \"%1\" does not exist").arg(szName)); + if(!c->switches()->tqfind('q',"quiet")) + c->warning(__tr2qs("The addon \"%1\" does not exist").tqarg(szName)); } return true; @@ -322,7 +322,7 @@ static bool addon_kvs_cmd_help(KviKvsModuleCommandCall * c) static bool addon_kvs_cmd_setconfigurecallback(KviKvsModuleCallbackCommandCall * c) { - QString szName; + TQString szName; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("name",KVS_PT_NONEMPTYSTRING,0,szName) @@ -333,8 +333,8 @@ static bool addon_kvs_cmd_setconfigurecallback(KviKvsModuleCallbackCommandCall * { a->setConfigureCallback(c->callback()->code()); } else { - if(!c->switches()->find('q',"quiet")) - c->warning(__tr2qs("The addon \"%1\" does not exist").arg(szName)); + if(!c->switches()->tqfind('q',"quiet")) + c->warning(__tr2qs("The addon \"%1\" does not exist").tqarg(szName)); } return true; @@ -369,7 +369,7 @@ static bool addon_kvs_cmd_setconfigurecallback(KviKvsModuleCallbackCommandCall * static bool addon_kvs_cmd_sethelpcallback(KviKvsModuleCallbackCommandCall * c) { - QString szName; + TQString szName; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("name",KVS_PT_NONEMPTYSTRING,0,szName) @@ -380,8 +380,8 @@ static bool addon_kvs_cmd_sethelpcallback(KviKvsModuleCallbackCommandCall * c) { a->setHelpCallback(c->callback()->code()); } else { - if(!c->switches()->find('q',"quiet")) - c->warning(__tr2qs("The addon \"%1\" does not exist").arg(szName)); + if(!c->switches()->tqfind('q',"quiet")) + c->warning(__tr2qs("The addon \"%1\" does not exist").tqarg(szName)); } return true; @@ -429,7 +429,7 @@ static bool addon_kvs_cmd_sethelpcallback(KviKvsModuleCallbackCommandCall * c) we will adhere to that naming in certain parts of the documentation too. [/p] [p] - Each script-based addon (a set of scripts) is identified by an UNIQUE + Each script-based addon (a set of scripts) is identified by an UNITQUE . Two addons with the same can't co-exist in the same KVIrc installation (so be sure to choose a token characteristic enough to avoid collisions with others). The itself is used only for @@ -510,7 +510,7 @@ static bool addon_kvs_cmd_sethelpcallback(KviKvsModuleCallbackCommandCall * c) static bool addon_kvs_cmd_register(KviKvsModuleCallbackCommandCall * c) { KviKvsScriptAddonRegistrationData rd; - QString szMinKVIrcVersion; + TQString szMinKVIrcVersion; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("name",KVS_PT_NONEMPTYSTRING,0,(rd.szName)) @@ -549,7 +549,7 @@ static bool addon_kvs_cmd_register(KviKvsModuleCallbackCommandCall * c) return false; } - if(!c->switches()->find('q',"quiet")) + if(!c->switches()->tqfind('q',"quiet")) c->window()->output(KVI_OUT_SYSTEMMESSAGE,__tr2qs("Attempting to register addon \"%Q\" with version %Q"),&(rd.szName),&(rd.szVersion)); KviKvsScriptAddon * a = KviKvsScriptAddonManager::instance()->findAddon(rd.szName); @@ -560,18 +560,18 @@ static bool addon_kvs_cmd_register(KviKvsModuleCallbackCommandCall * c) { // and it has a higher version... // complain unless -f is used - if(!c->switches()->find('f',"force")) + if(!c->switches()->tqfind('f',"force")) { c->error(__tr2qs("The script addon \"%Q\" already exists with version %Q which is higher than %Q"),&(rd.szName),&(a->version()),&(rd.szVersion)); return false; } } - if(!c->switches()->find('q',"quiet")) + if(!c->switches()->tqfind('q',"quiet")) c->window()->output(KVI_OUT_SYSTEMMESSAGE,__tr2qs("Uninstalling existing addon version %Q"),&(a->version())); // uninstall the existing version - KviKvsScriptAddonManager::instance()->unregisterAddon(rd.szName,c->window(),!c->switches()->find('n',"no-uninstall")); + KviKvsScriptAddonManager::instance()->unregisterAddon(rd.szName,c->window(),!c->switches()->tqfind('n',"no-uninstall")); } if(!KviKvsScriptAddonManager::instance()->registerAddon(&rd)) @@ -580,7 +580,7 @@ static bool addon_kvs_cmd_register(KviKvsModuleCallbackCommandCall * c) return false; } - if(!c->switches()->find('q',"quiet")) + if(!c->switches()->tqfind('q',"quiet")) c->window()->output(KVI_OUT_SYSTEMMESSAGE,__tr2qs("Script succesfully registered")); return true; @@ -621,10 +621,10 @@ static bool addon_module_init(KviModule *m) KVSM_REGISTER_CALLBACK_COMMAND(m,"sethelpcallback",addon_kvs_cmd_sethelpcallback); KVSM_REGISTER_CALLBACK_COMMAND(m,"register",addon_kvs_cmd_register); - QString szBuf; + TQString szBuf; m->getDefaultConfigFileName(szBuf); KviConfig cfg(szBuf,KviConfig::Read); - g_rectManagementDialogGeometry = cfg.readRectEntry("EditorGeometry",QRect(10,10,390,440)); + g_rectManagementDialogGeometry = cfg.readRectEntry("EditorGeometry",TQRect(10,10,390,440)); return true; } @@ -633,7 +633,7 @@ static bool addon_module_cleanup(KviModule *m) { KviScriptManagementDialog::cleanup(); - QString szBuf; + TQString szBuf; m->getDefaultConfigFileName(szBuf); KviConfig cfg(szBuf,KviConfig::Write); cfg.writeEntry("EditorGeometry",g_rectManagementDialogGeometry); diff --git a/src/modules/addon/managementdialog.cpp b/src/modules/addon/managementdialog.cpp index a6765587..adbbae71 100644 --- a/src/modules/addon/managementdialog.cpp +++ b/src/modules/addon/managementdialog.cpp @@ -36,29 +36,29 @@ #include "kvi_kvs_script.h" #include "kvi_sourcesdate.h" -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include "kvi_tal_scrollview.h" #ifdef COMPILE_USE_QT4 - #include + #include #else - #include + #include #endif #include "kvi_draganddrop.h" -#include -#include -#include -#include +#include +#include +#include +#include KviScriptManagementDialog * KviScriptManagementDialog::m_pInstance = 0; -extern QRect g_rectManagementDialogGeometry; +extern TQRect g_rectManagementDialogGeometry; #define LVI_ICON_SIZE 32 @@ -72,7 +72,7 @@ KviScriptAddonListViewItem::KviScriptAddonListViewItem(KviTalListView * v,KviKvs { m_pAddon = new KviKvsScriptAddon(*a); m_pListView = v; - QString t = ""; + TQString t = ""; t += a->visibleName(); t += " ["; t += a->version(); @@ -85,15 +85,15 @@ KviScriptAddonListViewItem::KviScriptAddonListViewItem(KviTalListView * v,KviKvs t += ""; m_szKey = a->visibleName().upper(); #ifdef COMPILE_USE_QT4 - m_pText = new QTextDocument(); + m_pText = new TQTextDocument(); m_pText->setHtml(t); m_pText->setDefaultFont(v->font()); #else - m_pText = new QSimpleRichText(t,v->font()); + m_pText = new TQSimpleRichText(t,v->font()); #endif - QPixmap * p = a->icon(); - m_pIcon = p ? new QPixmap(*p) : new QPixmap(LVI_ICON_SIZE,LVI_ICON_SIZE); + TQPixmap * p = a->icon(); + m_pIcon = p ? new TQPixmap(*p) : new TQPixmap(LVI_ICON_SIZE,LVI_ICON_SIZE); } KviScriptAddonListViewItem::~KviScriptAddonListViewItem() @@ -103,7 +103,7 @@ KviScriptAddonListViewItem::~KviScriptAddonListViewItem() delete m_pAddon; } -QString KviScriptAddonListViewItem::key(int,bool) const +TQString KviScriptAddonListViewItem::key(int,bool) const { return m_szKey; } @@ -125,12 +125,12 @@ void KviScriptAddonListViewItem::setup() setHeight(iHeight+2); } -void KviScriptAddonListViewItem::paintCell(QPainter * p,const QColorGroup & cg,int column,int width,int align) +void KviScriptAddonListViewItem::paintCell(TQPainter * p,const TQColorGroup & cg,int column,int width,int align) { #ifdef COMPILE_USE_QT4 if (isSelected()) { - QColor col(m_pListView->palette().highlight()); + TQColor col(m_pListView->palette().highlight()); col.setAlpha(127); p->setBrush(col); p->drawRect(0, 0, m_pListView->visibleWidth(), height()); @@ -139,7 +139,7 @@ void KviScriptAddonListViewItem::paintCell(QPainter * p,const QColorGroup & cg,i int afterIcon = LVI_BORDER + LVI_ICON_SIZE + LVI_SPACING; int www = m_pListView->visibleWidth() - (afterIcon + LVI_BORDER); p->translate(afterIcon,LVI_BORDER); - m_pText->setPageSize(QSizeF(www,height() - (LVI_BORDER * 2))); + m_pText->setPageSize(TQSizeF(www,height() - (LVI_BORDER * 2))); m_pText->drawContents(p); #else p->drawPixmap(LVI_BORDER,LVI_BORDER,*m_pIcon); @@ -148,12 +148,12 @@ void KviScriptAddonListViewItem::paintCell(QPainter * p,const QColorGroup & cg,i m_pText->setWidth(www); if(isSelected()) { - QColorGroup cg2(cg); - cg2.setColor(QColorGroup::HighlightedText,cg.text()); + TQColorGroup cg2(cg); + cg2.setColor(TQColorGroup::HighlightedText,cg.text()); - m_pText->draw(p,afterIcon,LVI_BORDER,QRect(afterIcon,LVI_BORDER,www,height() - (LVI_BORDER * 2)),cg2); + m_pText->draw(p,afterIcon,LVI_BORDER,TQRect(afterIcon,LVI_BORDER,www,height() - (LVI_BORDER * 2)),cg2); } else { - m_pText->draw(p,afterIcon,LVI_BORDER,QRect(afterIcon,LVI_BORDER,www,height() - (LVI_BORDER * 2)),cg); + m_pText->draw(p,afterIcon,LVI_BORDER,TQRect(afterIcon,LVI_BORDER,www,height() - (LVI_BORDER * 2)),cg); } #endif } @@ -164,11 +164,11 @@ void KviScriptAddonListViewItem::paintCell(QPainter * p,const QColorGroup & cg,i -KviScriptAddonListView::KviScriptAddonListView(QWidget * pParent) +KviScriptAddonListView::KviScriptAddonListView(TQWidget * pParent) : KviListView(pParent) { - QPixmap * p = g_pIconManager->getImage("kvi_dialog_addons.png"); - if(p)setBackgroundOverlayPixmap(p,Qt::AlignRight | Qt::AlignBottom); + TQPixmap * p = g_pIconManager->getImage("kvi_dialog_addons.png"); + if(p)setBackgroundOverlayPixmap(p,TQt::AlignRight | TQt::AlignBottom); setSelectionMode(Single); header()->hide(); @@ -182,7 +182,7 @@ KviScriptAddonListView::~KviScriptAddonListView() { } -void KviScriptAddonListView::resizeEvent(QResizeEvent * e) +void KviScriptAddonListView::resizeEvent(TQResizeEvent * e) { KviListView::resizeEvent(e); int iWidth = visibleWidth(); @@ -191,8 +191,8 @@ void KviScriptAddonListView::resizeEvent(QResizeEvent * e) } -KviScriptManagementDialog::KviScriptManagementDialog(QWidget * p) -: QDialog(p,"" /*,WType_TopLevel | WStyle_Customize | WStyle_Title | WStyle_StaysOnTop | WStyle_DialogBorder*/) +KviScriptManagementDialog::KviScriptManagementDialog(TQWidget * p) +: TQDialog(p,"" /*,WType_TopLevel | WStyle_Customize | WStyle_Title | WStyle_StaysOnTop | WStyle_DialogBorder*/) { setCaption(__tr2qs("Manage Script-Based Addons")); setIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_ADDONS))); @@ -200,56 +200,56 @@ KviScriptManagementDialog::KviScriptManagementDialog(QWidget * p) m_pInstance = this; - QGridLayout * g = new QGridLayout(this,11,3,4,5); + TQGridLayout * g = new TQGridLayout(this,11,3,4,5); - /*QLabel * lb = new QLabel(this); - lb->setFrameStyle(QFrame::WinPanel | QFrame::Sunken); + /*TQLabel * lb = new TQLabel(this); + lb->setFrameStyle(TQFrame::WinPanel | TQFrame::Sunken); g->addMultiCellWidget(lb,0,10,0,0); - QPixmap * pix = g_pIconManager->getImage("kvi_dialog_addons.png"); + TQPixmap * pix = g_pIconManager->getImage("kvi_dialog_addons.png"); if(pix) { lb->setPixmap(*pix); lb->setFixedWidth(pix->width()); } - lb->setBackgroundColor(Qt::black); - lb->setAlignment(Qt::AlignBottom | Qt::AlignRight); + lb->setBackgroundColor(TQt::black); + lb->tqsetAlignment(TQt::AlignBottom | TQt::AlignRight); */ m_pListView = new KviScriptAddonListView(this); g->addMultiCellWidget(m_pListView,0,10,1,1); - m_pConfigureButton = new QPushButton(__tr2qs("Configure"),this); - connect(m_pConfigureButton,SIGNAL(clicked()),this,SLOT(configureScript())); + m_pConfigureButton = new TQPushButton(__tr2qs("Configure"),this); + connect(m_pConfigureButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(configureScript())); g->addWidget(m_pConfigureButton,0,2); - m_pHelpButton = new QPushButton(__tr2qs("Show Help"),this); - connect(m_pHelpButton,SIGNAL(clicked()),this,SLOT(showScriptHelp())); + m_pHelpButton = new TQPushButton(__tr2qs("Show Help"),this); + connect(m_pHelpButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(showScriptHelp())); g->addWidget(m_pHelpButton,1,2); g->addRowSpacing(2,40); - m_pUninstallButton = new QPushButton(__tr2qs("Uninstall"),this); - connect(m_pUninstallButton,SIGNAL(clicked()),this,SLOT(uninstallScript())); + m_pUninstallButton = new TQPushButton(__tr2qs("Uninstall"),this); + connect(m_pUninstallButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(uninstallScript())); g->addWidget(m_pUninstallButton,3,2); g->addRowSpacing(4,15); - QFrame *f = new QFrame(this); - f->setFrameStyle(QFrame::HLine | QFrame::Sunken); + TQFrame *f = new TQFrame(this); + f->setFrameStyle(TQFrame::HLine | TQFrame::Sunken); g->addWidget(f,5,2); g->addRowSpacing(6,15); - m_pInstallButton = new QPushButton(__tr2qs("Install Addon..."),this); - connect(m_pInstallButton,SIGNAL(clicked()),this,SLOT(installScript())); + m_pInstallButton = new TQPushButton(__tr2qs("Install Addon..."),this); + connect(m_pInstallButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(installScript())); g->addWidget(m_pInstallButton,7,2); - m_pGetScriptsButton = new QPushButton(__tr2qs("More Addons..."),this); - connect(m_pGetScriptsButton,SIGNAL(clicked()),this,SLOT(getMoreScripts())); + m_pGetScriptsButton = new TQPushButton(__tr2qs("More Addons..."),this); + connect(m_pGetScriptsButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(getMoreScripts())); g->addWidget(m_pGetScriptsButton,8,2); - QPushButton * b = new QPushButton(__tr2qs("Close"),this); - connect(b,SIGNAL(clicked()),this,SLOT(closeClicked())); + TQPushButton * b = new TQPushButton(__tr2qs("Close"),this); + connect(b,TQT_SIGNAL(clicked()),this,TQT_SLOT(closeClicked())); g->addWidget(b,10,2); g->setRowStretch(9,1); @@ -258,7 +258,7 @@ KviScriptManagementDialog::KviScriptManagementDialog(QWidget * p) fillListView(); currentChanged(0); - connect(m_pListView,SIGNAL(currentChanged(KviTalListViewItem *)),this,SLOT(currentChanged(KviTalListViewItem *))); + connect(m_pListView,TQT_SIGNAL(currentChanged(KviTalListViewItem *)),this,TQT_SLOT(currentChanged(KviTalListViewItem *))); //currentToolBarChanged(); if(g_rectManagementDialogGeometry.y() < 5) @@ -273,7 +273,7 @@ KviScriptManagementDialog::KviScriptManagementDialog(QWidget * p) KviScriptManagementDialog::~KviScriptManagementDialog() { - g_rectManagementDialogGeometry = QRect(pos().x(),pos().y(),size().width(),size().height()); + g_rectManagementDialogGeometry = TQRect(pos().x(),pos().y(),size().width(),size().height()); //KviActionManager::instance()->customizeToolBarsDialogDestroyed(); m_pInstance = 0; @@ -282,9 +282,9 @@ KviScriptManagementDialog::~KviScriptManagementDialog() void KviScriptManagementDialog::fillListView() { m_pListView->clear(); - KviPointerHashTable * d = KviKvsScriptAddonManager::instance()->addonDict(); + KviPointerHashTable * d = KviKvsScriptAddonManager::instance()->addonDict(); if(!d)return; - KviPointerHashTableIterator it(*d); + KviPointerHashTableIterator it(*d); KviScriptAddonListViewItem * item; while(KviKvsScriptAddon * a = it.current()) { @@ -329,11 +329,11 @@ void KviScriptManagementDialog::uninstallScript() KviScriptAddonListViewItem * it = (KviScriptAddonListViewItem *)m_pListView->currentItem(); if(!it)return; - QString txt = "

"; - txt += __tr2qs("Do you really want to uninstall the addon \"%1\" ?").arg(it->addon()->visibleName()); + TQString txt = "

"; + txt += __tr2qs("Do you really want to uninstall the addon \"%1\" ?").tqarg(it->addon()->visibleName()); txt += "

"; - if(QMessageBox::question(this, + if(TQMessageBox::question(this, __tr2qs("Confirm addon uninstallation"),txt,__tr2qs("&Yes"),__tr2qs("&No"),0,1) != 0)return; KviKvsScriptAddonManager::instance()->unregisterAddon(it->addon()->name(),g_pActiveWindow); @@ -349,13 +349,13 @@ void KviScriptManagementDialog::getMoreScripts() void KviScriptManagementDialog::installScript() { - QString buffer; + TQString buffer; - if(!KviFileDialog::askForOpenFileName(buffer,__tr2qs("Please select the addon installation file"),QString::null,"install.kvs",false,true))return; + if(!KviFileDialog::askForOpenFileName(buffer,__tr2qs("Please select the addon installation file"),TQString(),"install.kvs",false,true))return; - buffer.replace("\\","\\\\"); + buffer.tqreplace("\\","\\\\"); - QString szCmd = "parse \""; + TQString szCmd = "parse \""; szCmd += buffer; szCmd += "\""; @@ -368,9 +368,9 @@ void KviScriptManagementDialog::installScript() //m_pListView->triggerUpdate(); } -void KviScriptManagementDialog::showEvent(QShowEvent * e) +void KviScriptManagementDialog::showEvent(TQShowEvent * e) { -// QRect r = parentWidget() ? parentWidget()->rect() : QApplication::desktop()->rect(); +// TQRect r = tqparentWidget() ? tqparentWidget()->rect() : TQApplication::desktop()->rect(); // int x = (r.width() - width()) / 2; // int y = (r.height() - height()) / 2; // move(x,y); @@ -395,7 +395,7 @@ void KviScriptManagementDialog::display() m_pInstance->show(); } -void KviScriptManagementDialog::closeEvent(QCloseEvent * e) +void KviScriptManagementDialog::closeEvent(TQCloseEvent * e) { e->ignore(); delete this; diff --git a/src/modules/addon/managementdialog.h b/src/modules/addon/managementdialog.h index 0abbb4f9..a0ed1ad4 100644 --- a/src/modules/addon/managementdialog.h +++ b/src/modules/addon/managementdialog.h @@ -24,24 +24,24 @@ // //============================================================================= -#include +#include #include "kvi_listview.h" #include "kvi_settings.h" -#include -#include -#include -#include +#include +#include +#include +#include #include "kvi_tal_listview.h" -class QPushButton; -class QPixmap; +class TQPushButton; +class TQPixmap; class KviKvsScriptAddon; #ifdef COMPILE_USE_QT4 - #include + #include #else - #include + #include #endif class KviScriptAddonListViewItem : public KviTalListViewItem @@ -52,54 +52,56 @@ public: protected: KviKvsScriptAddon * m_pAddon; #ifdef COMPILE_USE_QT4 - QTextDocument * m_pText; + TQTextDocument * m_pText; #else - QSimpleRichText * m_pText; + TQSimpleRichText * m_pText; #endif - QPixmap * m_pIcon; + TQPixmap * m_pIcon; KviTalListView * m_pListView; - QString m_szKey; + TQString m_szKey; public: KviKvsScriptAddon * addon(){ return m_pAddon; }; protected: - virtual QString key(int,bool) const; - virtual void paintCell(QPainter * p,const QColorGroup & cg,int column,int width,int align); + virtual TQString key(int,bool) const; + virtual void paintCell(TQPainter * p,const TQColorGroup & cg,int column,int width,int align); virtual void setup(); }; class KviScriptAddonListView : public KviListView { Q_OBJECT + TQ_OBJECT public: - KviScriptAddonListView(QWidget * pParent); + KviScriptAddonListView(TQWidget * pParent); ~KviScriptAddonListView(); protected: - virtual void resizeEvent(QResizeEvent * e); + virtual void resizeEvent(TQResizeEvent * e); }; -class KviScriptManagementDialog : public QDialog +class KviScriptManagementDialog : public TQDialog { Q_OBJECT + TQ_OBJECT protected: - KviScriptManagementDialog(QWidget * p); + KviScriptManagementDialog(TQWidget * p); public: ~KviScriptManagementDialog(); protected: KviScriptAddonListView * m_pListView; static KviScriptManagementDialog * m_pInstance; - QPushButton * m_pUninstallButton; - QPushButton * m_pConfigureButton; - QPushButton * m_pHelpButton; - QPushButton * m_pInstallButton; - QPushButton * m_pGetScriptsButton; + TQPushButton * m_pUninstallButton; + TQPushButton * m_pConfigureButton; + TQPushButton * m_pHelpButton; + TQPushButton * m_pInstallButton; + TQPushButton * m_pGetScriptsButton; public: static KviScriptManagementDialog * instance(){ return m_pInstance; }; static void display(); static void cleanup(); protected: void fillListView(); - virtual void showEvent(QShowEvent * e); - virtual void closeEvent(QCloseEvent *e); + virtual void showEvent(TQShowEvent * e); + virtual void closeEvent(TQCloseEvent *e); protected slots: void currentChanged(KviTalListViewItem *i); void closeClicked(); diff --git a/src/modules/aliaseditor/aliaseditor.cpp b/src/modules/aliaseditor/aliaseditor.cpp index 3317fd3f..74d37529 100644 --- a/src/modules/aliaseditor/aliaseditor.cpp +++ b/src/modules/aliaseditor/aliaseditor.cpp @@ -41,34 +41,34 @@ #include "kvi_module.h" #include "kvi_valuelist.h" -#include -#include +#include +#include #include "kvi_tal_vbox.h" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include extern KviAliasEditorWindow * g_pAliasEditorWindow; extern KviModule * g_pAliasEditorModule; -KviAliasEditorListViewItem::KviAliasEditorListViewItem(KviTalListView * pListView,Type eType,const QString &szName) +KviAliasEditorListViewItem::KviAliasEditorListViewItem(KviTalListView * pListView,Type eType,const TQString &szName) : KviTalListViewItem(pListView), m_eType(eType), m_pParentNamespaceItem(0) { setName(szName); } -KviAliasEditorListViewItem::KviAliasEditorListViewItem(KviAliasNamespaceListViewItem * pParentNamespaceItem,Type eType,const QString &szName) +KviAliasEditorListViewItem::KviAliasEditorListViewItem(KviAliasNamespaceListViewItem * pParentNamespaceItem,Type eType,const TQString &szName) : KviTalListViewItem(pParentNamespaceItem), m_eType(eType), m_pParentNamespaceItem(pParentNamespaceItem) { setName(szName); } -QString KviAliasEditorListViewItem::key(int column,bool bAsc) const +TQString KviAliasEditorListViewItem::key(int column,bool bAsc) const { - QString ret; + TQString ret; if(m_eType == Namespace)ret = "1"; else ret = "2"; ret += m_szName; @@ -76,55 +76,55 @@ QString KviAliasEditorListViewItem::key(int column,bool bAsc) const } -void KviAliasEditorListViewItem::setName(const QString &szName) +void KviAliasEditorListViewItem::setName(const TQString &szName) { m_szName = szName; setText(0,m_szName); } -KviAliasListViewItem::KviAliasListViewItem(KviAliasNamespaceListViewItem * pParentNamespaceItem,const QString &szName) +KviAliasListViewItem::KviAliasListViewItem(KviAliasNamespaceListViewItem * pParentNamespaceItem,const TQString &szName) : KviAliasEditorListViewItem(pParentNamespaceItem,KviAliasEditorListViewItem::Alias,szName) { setPixmap(0,*(g_pIconManager->getSmallIcon(KVI_SMALLICON_ALIAS))); - m_cPos=QPoint(0,0); + m_cPos=TQPoint(0,0); } -KviAliasListViewItem::KviAliasListViewItem(KviTalListView * pListView,const QString &szName) +KviAliasListViewItem::KviAliasListViewItem(KviTalListView * pListView,const TQString &szName) : KviAliasEditorListViewItem(pListView,KviAliasEditorListViewItem::Alias,szName) { setPixmap(0,*(g_pIconManager->getSmallIcon(KVI_SMALLICON_ALIAS))); - m_cPos=QPoint(0,0); + m_cPos=TQPoint(0,0); } -KviAliasNamespaceListViewItem::KviAliasNamespaceListViewItem(KviTalListView * pListView,const QString &szName) +KviAliasNamespaceListViewItem::KviAliasNamespaceListViewItem(KviTalListView * pListView,const TQString &szName) : KviAliasEditorListViewItem(pListView,KviAliasEditorListViewItem::Namespace,szName) { setPixmap(0,*(g_pIconManager->getSmallIcon(KVI_SMALLICON_NAMESPACE))); } -KviAliasNamespaceListViewItem::KviAliasNamespaceListViewItem(KviAliasNamespaceListViewItem * pParentNamespaceItem,const QString &szName) +KviAliasNamespaceListViewItem::KviAliasNamespaceListViewItem(KviAliasNamespaceListViewItem * pParentNamespaceItem,const TQString &szName) : KviAliasEditorListViewItem(pParentNamespaceItem,KviAliasEditorListViewItem::Namespace,szName) { setPixmap(0,*(g_pIconManager->getSmallIcon(KVI_SMALLICON_NAMESPACE))); } -KviAliasNamespaceListViewItem * KviAliasNamespaceListViewItem::findNamespaceItem(const QString &szName) +KviAliasNamespaceListViewItem * KviAliasNamespaceListViewItem::findNamespaceItem(const TQString &szName) { KviAliasEditorListViewItem * it = (KviAliasEditorListViewItem *)firstChild(); while(it) { if(it->isNamespace()) { - if(KviQString::equalCI(szName,it->name()))return (KviAliasNamespaceListViewItem *)it; + if(KviTQString::equalCI(szName,it->name()))return (KviAliasNamespaceListViewItem *)it; } it = (KviAliasEditorListViewItem *)it->nextSibling(); } return 0; } -KviAliasNamespaceListViewItem * KviAliasNamespaceListViewItem::getNamespaceItem(const QString &szName) +KviAliasNamespaceListViewItem * KviAliasNamespaceListViewItem::getNamespaceItem(const TQString &szName) { KviAliasNamespaceListViewItem * it = findNamespaceItem(szName); if(it)return it; @@ -132,21 +132,21 @@ KviAliasNamespaceListViewItem * KviAliasNamespaceListViewItem::getNamespaceItem( return it; } -KviAliasListViewItem * KviAliasNamespaceListViewItem::findAliasItem(const QString &szName) +KviAliasListViewItem * KviAliasNamespaceListViewItem::findAliasItem(const TQString &szName) { KviAliasEditorListViewItem * it = (KviAliasEditorListViewItem *)firstChild(); while(it) { if(it->isAlias()) { - if(KviQString::equalCI(szName,it->name()))return (KviAliasListViewItem *)it; + if(KviTQString::equalCI(szName,it->name()))return (KviAliasListViewItem *)it; } it = (KviAliasEditorListViewItem *)it->nextSibling(); } return 0; } -KviAliasListViewItem * KviAliasNamespaceListViewItem::getAliasItem(const QString &szName) +KviAliasListViewItem * KviAliasNamespaceListViewItem::getAliasItem(const TQString &szName) { KviAliasListViewItem * it = findAliasItem(szName); if(it)return it; @@ -155,16 +155,16 @@ KviAliasListViewItem * KviAliasNamespaceListViewItem::getAliasItem(const QString } -KviAliasListViewItem * KviAliasNamespaceListViewItem::createFullAliasItem(const QString &szFullName) +KviAliasListViewItem * KviAliasNamespaceListViewItem::createFullAliasItem(const TQString &szFullName) { - QStringList lNamespaces; - QString szName; + TQStringList lNamespaces; + TQString szName; KviAliasEditor::splitFullAliasOrNamespaceName(szFullName,lNamespaces,szName); if(lNamespaces.isEmpty()) return getAliasItem(szName); - QStringList::Iterator it = lNamespaces.begin(); + TQStringList::Iterator it = lNamespaces.begin(); KviAliasNamespaceListViewItem * nit = getNamespaceItem(*it); ++it; @@ -177,16 +177,16 @@ KviAliasListViewItem * KviAliasNamespaceListViewItem::createFullAliasItem(const return nit->getAliasItem(szName); } -KviAliasNamespaceListViewItem * KviAliasNamespaceListViewItem::createFullNamespaceItem(const QString &szFullName) +KviAliasNamespaceListViewItem * KviAliasNamespaceListViewItem::createFullNamespaceItem(const TQString &szFullName) { - QStringList lNamespaces; - QString szName; + TQStringList lNamespaces; + TQString szName; KviAliasEditor::splitFullAliasOrNamespaceName(szFullName,lNamespaces,szName); if(lNamespaces.isEmpty()) return getNamespaceItem(szName); - QStringList::Iterator it = lNamespaces.begin(); + TQStringList::Iterator it = lNamespaces.begin(); KviAliasNamespaceListViewItem * nit = getNamespaceItem(*it); ++it; @@ -200,21 +200,21 @@ KviAliasNamespaceListViewItem * KviAliasNamespaceListViewItem::createFullNamespa } -KviAliasEditor::KviAliasEditor(QWidget * par) -: QWidget(par) +KviAliasEditor::KviAliasEditor(TQWidget * par) +: TQWidget(par) { m_pLastEditedItem = 0; m_pLastClickedItem = 0; - m_szDir = QDir::homeDirPath(); + m_szDir = TQDir::homeDirPath(); - QGridLayout * l = new QGridLayout(this,1,1,2,2); + TQGridLayout * l = new TQGridLayout(this,1,1,2,2); #ifdef COMPILE_USE_QT4 - m_pSplitter = new QSplitter(Qt::Horizontal,this); + m_pSplitter = new TQSplitter(Qt::Horizontal,this); m_pSplitter->setOpaqueResize(false); #else - m_pSplitter = new QSplitter(QSplitter::Horizontal,this); + m_pSplitter = new TQSplitter(Qt::Horizontal,this); #endif l->addWidget(m_pSplitter,0,0); @@ -228,16 +228,16 @@ KviAliasEditor::KviAliasEditor(QWidget * par) box = new KviTalVBox(m_pSplitter); KviTalHBox * hbox = new KviTalHBox(box); - m_pNameLabel = new QLabel(__tr2qs("No item selected"),hbox); - m_pRenameButton = new QPushButton(__tr2qs("Rename"),hbox); + m_pNameLabel = new TQLabel(__tr2qs("No item selected"),hbox); + m_pRenameButton = new TQPushButton(__tr2qs("Rename"),hbox); m_pRenameButton->setEnabled(false); - connect(m_pRenameButton,SIGNAL(clicked()),this,SLOT(renameItem())); + connect(m_pRenameButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(renameItem())); hbox->setStretchFactor(m_pNameLabel,2); - QToolTip::add(m_pRenameButton,__tr2qs("Edit the alias or namespace name")); + TQToolTip::add(m_pRenameButton,__tr2qs("Edit the alias or namespace name")); m_pEditor = KviScriptEditor::createInstance(box); m_pEditor->setFocus(); - connect(m_pEditor,SIGNAL(find(const QString &)),this,SLOT(slotFindWord(const QString &))); - connect(m_pEditor,SIGNAL(replaceAll(const QString &,const QString &)),this,SLOT(slotReplaceAll(const QString &,const QString &))); + connect(m_pEditor,TQT_SIGNAL(tqfind(const TQString &)),this,TQT_SLOT(slotFindWord(const TQString &))); + connect(m_pEditor,TQT_SIGNAL(replaceAll(const TQString &,const TQString &)),this,TQT_SLOT(slotReplaceAll(const TQString &,const TQString &))); m_pContextPopup = new KviTalPopupMenu(this); @@ -251,18 +251,18 @@ KviAliasEditor::~KviAliasEditor() KviScriptEditor::destroyInstance(m_pEditor); } -KviAliasNamespaceListViewItem * KviAliasEditor::findNamespaceItem(const QString &szName) +KviAliasNamespaceListViewItem * KviAliasEditor::findNamespaceItem(const TQString &szName) { KviAliasNamespaceListViewItem * it = (KviAliasNamespaceListViewItem *)m_pListView->firstChild(); while(it) { - if(KviQString::equalCI(szName,it->name()))return it; + if(KviTQString::equalCI(szName,it->name()))return it; it = (KviAliasNamespaceListViewItem *)it->nextSibling(); } return 0; } -KviAliasNamespaceListViewItem * KviAliasEditor::getNamespaceItem(const QString &szName) +KviAliasNamespaceListViewItem * KviAliasEditor::getNamespaceItem(const TQString &szName) { KviAliasNamespaceListViewItem * it = findNamespaceItem(szName); if(it)return it; @@ -270,21 +270,21 @@ KviAliasNamespaceListViewItem * KviAliasEditor::getNamespaceItem(const QString & return it; } -KviAliasListViewItem * KviAliasEditor::findAliasItem(const QString &szName) +KviAliasListViewItem * KviAliasEditor::findAliasItem(const TQString &szName) { KviAliasEditorListViewItem * it = (KviAliasEditorListViewItem *)m_pListView->firstChild(); while(it) { if(it->isAlias()) { - if(KviQString::equalCI(szName,it->name()))return (KviAliasListViewItem *)it; + if(KviTQString::equalCI(szName,it->name()))return (KviAliasListViewItem *)it; } it = (KviAliasEditorListViewItem *)it->nextSibling(); } return 0; } -KviAliasListViewItem * KviAliasEditor::getAliasItem(const QString &szName) +KviAliasListViewItem * KviAliasEditor::getAliasItem(const TQString &szName) { KviAliasListViewItem * it = findAliasItem(szName); if(it)return it; @@ -293,48 +293,48 @@ KviAliasListViewItem * KviAliasEditor::getAliasItem(const QString &szName) } -void KviAliasEditor::splitFullAliasOrNamespaceName(const QString &szFullName,QStringList &lNamespaces,QString &szName) +void KviAliasEditor::splitFullAliasOrNamespaceName(const TQString &szFullName,TQStringList &lNamespaces,TQString &szName) { - lNamespaces = QStringList::split("::",szFullName); + lNamespaces = TQStringList::split("::",szFullName); if(lNamespaces.count() < 1) { szName = "unnamed"; - lNamespaces.append(QString("")); + lNamespaces.append(TQString("")); return; } szName = *(lNamespaces.fromLast()); lNamespaces.remove(lNamespaces.fromLast()); } -QString KviAliasEditor::buildFullItemName(KviAliasEditorListViewItem * it) +TQString KviAliasEditor::buildFullItemName(KviAliasEditorListViewItem * it) { - if(!it) return QString::null; - QString szName = it->name(); - KviAliasNamespaceListViewItem * nit = it->parentNamespaceItem(); + if(!it) return TQString(); + TQString szName = it->name(); + KviAliasNamespaceListViewItem * nit = it->tqparentNamespaceItem(); while(nit) { - QString tmp = nit->name(); + TQString tmp = nit->name(); if(!tmp.isEmpty()) { szName.prepend("::"); szName.prepend(tmp); } - nit = nit->parentNamespaceItem(); + nit = nit->tqparentNamespaceItem(); } return szName; } -KviAliasListViewItem * KviAliasEditor::createFullAliasItem(const QString &szFullName) +KviAliasListViewItem * KviAliasEditor::createFullAliasItem(const TQString &szFullName) { - QStringList lNamespaces; - QString szName; + TQStringList lNamespaces; + TQString szName; splitFullAliasOrNamespaceName(szFullName,lNamespaces,szName); if(lNamespaces.isEmpty()) return getAliasItem(szName); - QStringList::Iterator it = lNamespaces.begin(); + TQStringList::Iterator it = lNamespaces.begin(); KviAliasNamespaceListViewItem * nit = getNamespaceItem(*it); ++it; @@ -347,16 +347,16 @@ KviAliasListViewItem * KviAliasEditor::createFullAliasItem(const QString &szFull return nit->getAliasItem(szName); } -KviAliasNamespaceListViewItem * KviAliasEditor::createFullNamespaceItem(const QString &szFullName) +KviAliasNamespaceListViewItem * KviAliasEditor::createFullNamespaceItem(const TQString &szFullName) { - QStringList lNamespaces; - QString szName; + TQStringList lNamespaces; + TQString szName; splitFullAliasOrNamespaceName(szFullName,lNamespaces,szName); if(lNamespaces.isEmpty()) return getNamespaceItem(szName); - QStringList::Iterator it = lNamespaces.begin(); + TQStringList::Iterator it = lNamespaces.begin(); KviAliasNamespaceListViewItem * nit = getNamespaceItem(*it); ++it; @@ -371,10 +371,10 @@ KviAliasNamespaceListViewItem * KviAliasEditor::createFullNamespaceItem(const QS void KviAliasEditor::oneTimeSetup() { - KviPointerHashTable * a = KviKvsAliasManager::instance()->aliasDict(); + KviPointerHashTable * a = KviKvsAliasManager::instance()->aliasDict(); if(!a)return; - KviPointerHashTableIterator it(*a); + KviPointerHashTableIterator it(*a); KviAliasListViewItem * item; while(it.current()) @@ -385,9 +385,9 @@ void KviAliasEditor::oneTimeSetup() ++it; } - connect(m_pListView,SIGNAL(currentChanged(KviTalListViewItem *)),this,SLOT(currentItemChanged(KviTalListViewItem *))); - connect(m_pListView,SIGNAL(rightButtonPressed(KviTalListViewItem *,const QPoint &,int)), - this,SLOT(itemPressed(KviTalListViewItem *,const QPoint &,int))); + connect(m_pListView,TQT_SIGNAL(currentChanged(KviTalListViewItem *)),this,TQT_SLOT(currentItemChanged(KviTalListViewItem *))); + connect(m_pListView,TQT_SIGNAL(rightButtonPressed(KviTalListViewItem *,const TQPoint &,int)), + this,TQT_SLOT(itemPressed(KviTalListViewItem *,const TQPoint &,int))); } bool KviAliasEditor::hasSelectedItems(KviTalListViewItem * it) @@ -411,7 +411,7 @@ bool KviAliasEditor::itemExists(KviTalListViewItem *pSearchFor,KviTalListViewIte } -void KviAliasEditor::itemPressed(KviTalListViewItem *it,const QPoint &pnt,int col) +void KviAliasEditor::itemPressed(KviTalListViewItem *it,const TQPoint &pnt,int col) { m_pContextPopup->clear(); @@ -422,12 +422,12 @@ void KviAliasEditor::itemPressed(KviTalListViewItem *it,const QPoint &pnt,int co m_pContextPopup->insertItem( *(g_pIconManager->getSmallIcon(KVI_SMALLICON_ALIAS)), __tr2qs("Add Alias"), - this,SLOT(newAlias())); + this,TQT_SLOT(newAlias())); m_pContextPopup->insertItem( *(g_pIconManager->getSmallIcon(KVI_SMALLICON_ALIAS)), __tr2qs("Add Namespace"), - this,SLOT(newNamespace())); + this,TQT_SLOT(newNamespace())); bool bHasItems = m_pListView->firstChild() != 0; @@ -436,9 +436,9 @@ void KviAliasEditor::itemPressed(KviTalListViewItem *it,const QPoint &pnt,int co m_pContextPopup->insertSeparator(); id = m_pContextPopup->insertItem( - *(g_pIconManager->getSmallIcon(KVI_SMALLICON_QUIT)), + *(g_pIconManager->getSmallIcon(KVI_SMALLICON_TQUIT)), __tr2qs("Remove Selected"), - this,SLOT(removeSelectedItems())); + this,TQT_SLOT(removeSelectedItems())); m_pContextPopup->setItemEnabled(id,bHasSelected); @@ -447,20 +447,20 @@ void KviAliasEditor::itemPressed(KviTalListViewItem *it,const QPoint &pnt,int co m_pContextPopup->insertItem( *(g_pIconManager->getSmallIcon(KVI_SMALLICON_FOLDER)), __tr2qs("Export Selected..."), - this,SLOT(exportSelected())); + this,TQT_SLOT(exportSelected())); m_pContextPopup->setItemEnabled(id,bHasSelected); m_pContextPopup->insertItem( *(g_pIconManager->getSmallIcon(KVI_SMALLICON_FOLDER)), __tr2qs("Export Selected in singles files..."), - this,SLOT(exportSelectedSepFiles())); + this,TQT_SLOT(exportSelectedSepFiles())); m_pContextPopup->setItemEnabled(id,bHasSelected); m_pContextPopup->insertItem( *(g_pIconManager->getSmallIcon(KVI_SMALLICON_FOLDER)), __tr2qs("Export All..."), - this,SLOT(exportAll())); + this,TQT_SLOT(exportAll())); m_pContextPopup->setItemEnabled(id,bHasItems); m_pContextPopup->insertSeparator(); @@ -468,13 +468,13 @@ void KviAliasEditor::itemPressed(KviTalListViewItem *it,const QPoint &pnt,int co m_pContextPopup->insertItem( *(g_pIconManager->getSmallIcon(KVI_SMALLICON_SEARCH)), __tr2qs("Find In Aliases..."), - this,SLOT(slotFind())); + this,TQT_SLOT(slotFind())); m_pContextPopup->setItemEnabled(id,bHasItems); m_pContextPopup->insertItem( *(g_pIconManager->getSmallIcon(KVI_SMALLICON_NAMESPACE)), __tr2qs("Collapse All Namespaces"), - this,SLOT(slotCollapseNamespaces())); + this,TQT_SLOT(slotCollapseNamespaces())); m_pContextPopup->setItemEnabled(id,bHasItems); @@ -482,15 +482,15 @@ void KviAliasEditor::itemPressed(KviTalListViewItem *it,const QPoint &pnt,int co m_pContextPopup->popup(pnt); } -void KviAliasEditor::recursiveSearchReplace(const QString &szSearch,KviAliasEditorListViewItem * it,bool bReplace,const QString &szReplace) +void KviAliasEditor::recursiveSearchReplace(const TQString &szSearch,KviAliasEditorListViewItem * it,bool bReplace,const TQString &szReplace) { if(!it)return; if(it->isAlias()) { - if(((KviAliasListViewItem *)it)->buffer().find(szSearch,0,false) != -1) + if(((KviAliasListViewItem *)it)->buffer().tqfind(szSearch,0,false) != -1) { it->setPixmap(0,*(g_pIconManager->getSmallIcon(KVI_SMALLICON_ALIASHIGHLIGHTED))); - if (bReplace) ((QString &)((KviAliasListViewItem *)it)->buffer()).replace(szSearch,szReplace,false); + if (bReplace) ((TQString &)((KviAliasListViewItem *)it)->buffer()).tqreplace(szSearch,szReplace,false); openParentItems(it); } else it->setPixmap(0,*(g_pIconManager->getSmallIcon(KVI_SMALLICON_ALIAS))); @@ -504,10 +504,10 @@ void KviAliasEditor::slotFind() { g_pAliasEditorModule->lock(); bool bOk; - QString szSearch = QInputDialog::getText( + TQString szSearch = TQInputDialog::getText( __tr2qs("Find In Aliases"), __tr2qs("Please enter the text to be searched for. The matching aliases will be highlighted."), - QLineEdit::Normal, + TQLineEdit::Normal, "", &bOk, this); @@ -518,7 +518,7 @@ void KviAliasEditor::slotFind() recursiveSearchReplace(szSearch,(KviAliasEditorListViewItem *)m_pListView->firstChild()); } -void KviAliasEditor::slotFindWord(const QString &szSearch) +void KviAliasEditor::slotFindWord(const TQString &szSearch) { m_pEditor->setFindText(szSearch); @@ -542,18 +542,18 @@ void KviAliasEditor::slotCollapseNamespaces() } -void KviAliasEditor::slotReplaceAll(const QString &before,const QString &after) +void KviAliasEditor::slotReplaceAll(const TQString &before,const TQString &after) { recursiveSearchReplace(before,(KviAliasEditorListViewItem *)m_pListView->firstChild(),true,after); } -void KviAliasEditor::getExportAliasBuffer(QString &buffer,KviAliasListViewItem * it) +void KviAliasEditor::getExportAliasBuffer(TQString &buffer,KviAliasListViewItem * it) { - QString szBuf = it->buffer(); + TQString szBuf = it->buffer(); KviCommandFormatter::blockFromBuffer(szBuf); - QString szNam = buildFullItemName(it); + TQString szNam = buildFullItemName(it); buffer = "alias("; buffer += szNam; @@ -579,12 +579,12 @@ void KviAliasEditor::exportSelected() void KviAliasEditor::exportSelectionInSinglesFiles(KviPointerList *l) { - if(!m_szDir.endsWith(QString(KVI_PATH_SEPARATOR)))m_szDir += KVI_PATH_SEPARATOR; + if(!m_szDir.endsWith(TQString(KVI_PATH_SEPARATOR)))m_szDir += KVI_PATH_SEPARATOR; debug ("dir %s",m_szDir.latin1()); if (!l->first()) { g_pAliasEditorModule->lock(); - QMessageBox::warning(this,__tr2qs("Alias Export"),__tr2qs("There is not selection!"),__tr2qs("Ok")); + TQMessageBox::warning(this,__tr2qs("Alias Export"),__tr2qs("There is not selection!"),__tr2qs("Ok")); g_pAliasEditorModule->unlock(); return; } @@ -595,25 +595,25 @@ void KviAliasEditor::exportSelectionInSinglesFiles(KviPointerListfirst();it;it = l->next()) { - QString tmp; + TQString tmp; getExportAliasBuffer(tmp,it); - QString szFileName=buildFullItemName(it); + TQString szFileName=buildFullItemName(it); szFileName += ".kvs"; - szFileName.replace("::","_"); - QString szCompletePath=m_szDir+szFileName; + szFileName.tqreplace("::","_"); + TQString szCompletePath=m_szDir+szFileName; if (KviFileUtils::fileExists(szCompletePath) && !bReplaceAll) { - QString szMsg; - KviQString::sprintf(szMsg,__tr2qs("The file \"%Q\" exists. Do you want to replace it ?"),&szFileName); - int ret = QMessageBox::question(this,__tr2qs("Replace file"),szMsg,__tr2qs("Yes"),__tr2qs("Yes to All"),__tr2qs("No")); + TQString szMsg; + KviTQString::sprintf(szMsg,__tr2qs("The file \"%Q\" exists. Do you want to replace it ?"),&szFileName); + int ret = TQMessageBox::question(this,__tr2qs("Replace file"),szMsg,__tr2qs("Yes"),__tr2qs("Yes to All"),__tr2qs("No")); if (ret!=2){ KviFileUtils::writeFile(szCompletePath,tmp); if (ret==1) bReplaceAll=true; @@ -634,7 +634,7 @@ void KviAliasEditor::exportAliases(bool bSelectedOnly,bool bSingleFiles) KviPointerList l; l.setAutoDelete(false); - QString out; + TQString out; appendAliasItems(&l,(KviAliasEditorListViewItem *)(m_pListView->firstChild()),bSelectedOnly); if (bSingleFiles) @@ -649,30 +649,30 @@ void KviAliasEditor::exportAliases(bool bSelectedOnly,bool bSingleFiles) { tempitem=it; count ++; - QString tmp; + TQString tmp; getExportAliasBuffer(tmp,it); out += tmp; out += "\n"; } - QString szNameFile; + TQString szNameFile; if(out.isEmpty()) { g_pAliasEditorModule->lock(); - QMessageBox::warning(this,__tr2qs("Alias Export"),__tr2qs("There exported file would be empty: cowardly refusing to write it"),__tr2qs("Ok")); + TQMessageBox::warning(this,__tr2qs("Alias Export"),__tr2qs("There exported file would be empty: cowardly refusing to write it"),__tr2qs("Ok")); g_pAliasEditorModule->unlock(); return; } - QString szName = m_szDir; + TQString szName = m_szDir; - if(!szName.endsWith(QString(KVI_PATH_SEPARATOR)))szName += KVI_PATH_SEPARATOR; - QString szFile; + if(!szName.endsWith(TQString(KVI_PATH_SEPARATOR)))szName += KVI_PATH_SEPARATOR; + TQString szFile; g_pAliasEditorModule->lock(); if (count==1) { - QString tmp=buildFullItemName(tempitem); - szNameFile = tmp.replace("::","_"); + TQString tmp=buildFullItemName(tempitem); + szNameFile = tmp.tqreplace("::","_"); } else szNameFile="aliases"; szName += szNameFile; @@ -682,13 +682,13 @@ void KviAliasEditor::exportAliases(bool bSelectedOnly,bool bSingleFiles) g_pAliasEditorModule->unlock(); return; } - m_szDir=QFileInfo(szFile).dirPath(TRUE); + m_szDir=TQFileInfo(szFile).dirPath(TRUE); g_pAliasEditorModule->unlock(); if(!KviFileUtils::writeFile(szFile,out)) { g_pAliasEditorModule->lock(); - QMessageBox::warning(this,__tr2qs("Write Failed - KVIrc"),__tr2qs("Unable to write to the alias file."),__tr2qs("Ok")); + TQMessageBox::warning(this,__tr2qs("Write Failed - KVIrc"),__tr2qs("Unable to write to the alias file."),__tr2qs("Ok")); g_pAliasEditorModule->unlock(); } } @@ -696,7 +696,7 @@ void KviAliasEditor::exportAliases(bool bSelectedOnly,bool bSingleFiles) void KviAliasEditor::saveProperties(KviConfig *cfg) { cfg->writeEntry("Sizes",m_pSplitter->sizes()); - QString szName; + TQString szName; if(m_pLastEditedItem) szName = buildFullItemName(m_pLastEditedItem); cfg->writeEntry("LastAlias",szName); @@ -708,7 +708,7 @@ void KviAliasEditor::loadProperties(KviConfig *cfg) def.append(20); def.append(80); m_pSplitter->setSizes(cfg->readIntListEntry("Sizes",def)); - QString tmp = cfg->readEntry("LastAlias",QString::null); + TQString tmp = cfg->readEntry("LastAlias",TQString()); KviAliasEditorListViewItem * it = findAliasItem(tmp); if(!it)it = findNamespaceItem(tmp); @@ -784,21 +784,21 @@ void KviAliasEditor::appendSelectedItems(KviPointerListname(); + TQString szMsg; + TQString szName = it->name(); if(!*pbYesToAll) { if(it->isAlias()) - KviQString::sprintf(szMsg,__tr2qs("Do you really want to remove the alias \"%Q\" ?"),&szName); + KviTQString::sprintf(szMsg,__tr2qs("Do you really want to remove the alias \"%Q\" ?"),&szName); else { - KviQString::sprintf(szMsg,__tr2qs("Do you really want to remove the namespace \"%Q\" ?"),&szName); + KviTQString::sprintf(szMsg,__tr2qs("Do you really want to remove the namespace \"%Q\" ?"),&szName); szMsg += "
"; - szMsg += __tr2qs("Please note that all the children items will be deleted too."); + szMsg += __tr2qs("Please note that all the tqchildren items will be deleted too."); } g_pAliasEditorModule->lock(); - int ret = QMessageBox::question(this,__tr2qs("Remove item"),szMsg,__tr2qs("Yes"),__tr2qs("Yes to All"),__tr2qs("No")); + int ret = TQMessageBox::question(this,__tr2qs("Remove item"),szMsg,__tr2qs("Yes"),__tr2qs("Yes to All"),__tr2qs("No")); g_pAliasEditorModule->unlock(); switch(ret) { @@ -822,7 +822,7 @@ bool KviAliasEditor::removeItem(KviAliasEditorListViewItem *it,bool * pbYesToAll { while(it) { - KviAliasEditorListViewItem * par = (KviAliasEditorListViewItem *)(it->parent()); + KviAliasEditorListViewItem * par = (KviAliasEditorListViewItem *)(it->tqparent()); delete it; if(par) { @@ -852,26 +852,26 @@ void KviAliasEditor::removeSelectedItems() } } -QString KviAliasEditor::askForAliasName(const QString &szAction,const QString &szText,const QString &szInitialText) +TQString KviAliasEditor::askForAliasName(const TQString &szAction,const TQString &szText,const TQString &szInitialText) { bool bOk = false; - QString szNewName; + TQString szNewName; while(szNewName.isEmpty()) { g_pAliasEditorModule->lock(); - szNewName = QInputDialog::getText( + szNewName = TQInputDialog::getText( szAction, szText, - QLineEdit::Normal, + TQLineEdit::Normal, szInitialText, &bOk, this); g_pAliasEditorModule->unlock(); - if(!bOk)return QString::null; + if(!bOk)return TQString(); if(szNewName.isEmpty()) { g_pAliasEditorModule->lock(); - QMessageBox::warning(this, + TQMessageBox::warning(this, __tr2qs("Missing Alias Name"), __tr2qs("You must specify a valid name for the alias"), __tr2qs("Ok, Let me try again...")); @@ -880,11 +880,11 @@ QString KviAliasEditor::askForAliasName(const QString &szAction,const QString &s } // we allow only [\w:]+ - QRegExp re("[\\w:]+"); + TQRegExp re("[\\w:]+"); if(!re.exactMatch(szNewName)) { g_pAliasEditorModule->lock(); - QMessageBox::information(this, + TQMessageBox::information(this, __tr2qs("Bad Alias Name"), __tr2qs("Alias names can contain only letters, digits, underscores and '::' namespace separators"), __tr2qs("Ok, Let me try again...")); @@ -893,12 +893,12 @@ QString KviAliasEditor::askForAliasName(const QString &szAction,const QString &s continue; } // make sure that we have only doubled "::" and not ":" or ":::..." - QString tmp = szNewName; - tmp.replace("::","@"); // @ is not allowed by the rule above - if(tmp.find(":") != -1) + TQString tmp = szNewName; + tmp.tqreplace("::","@"); // @ is not allowed by the rule above + if(tmp.tqfind(":") != -1) { g_pAliasEditorModule->lock(); - QMessageBox::information(this, + TQMessageBox::information(this, __tr2qs("Bad Alias Name"), __tr2qs("Stray ':' character in alias name: did you mean ...:: ?"), __tr2qs("Ok, Let me try again...")); @@ -906,10 +906,10 @@ QString KviAliasEditor::askForAliasName(const QString &szAction,const QString &s szNewName = ""; continue; } - if(tmp.find("@@") != -1) + if(tmp.tqfind("@@") != -1) { g_pAliasEditorModule->lock(); - QMessageBox::information(this, + TQMessageBox::information(this, __tr2qs("Bad Alias Name"), __tr2qs("Found an empty namespace in alias name"), __tr2qs("Ok, Let me try again...")); @@ -921,26 +921,26 @@ QString KviAliasEditor::askForAliasName(const QString &szAction,const QString &s return szNewName; } -QString KviAliasEditor::askForNamespaceName(const QString &szAction,const QString &szText,const QString &szInitialText) +TQString KviAliasEditor::askForNamespaceName(const TQString &szAction,const TQString &szText,const TQString &szInitialText) { bool bOk = false; - QString szNewName; + TQString szNewName; while(szNewName.isEmpty()) { g_pAliasEditorModule->lock(); - szNewName = QInputDialog::getText( + szNewName = TQInputDialog::getText( szAction, szText, - QLineEdit::Normal, + TQLineEdit::Normal, szInitialText, &bOk, this); g_pAliasEditorModule->unlock(); - if(!bOk)return QString::null; + if(!bOk)return TQString(); if(szNewName.isEmpty()) { g_pAliasEditorModule->lock(); - QMessageBox::warning(this, + TQMessageBox::warning(this, __tr2qs("Missing Namespace Name"), __tr2qs("You must specify a valid name for the namespace"), __tr2qs("Ok, Let me try again...")); @@ -949,11 +949,11 @@ QString KviAliasEditor::askForNamespaceName(const QString &szAction,const QStrin } // we allow only [\w:]+ - QRegExp re("[\\w:]+"); + TQRegExp re("[\\w:]+"); if(!re.exactMatch(szNewName)) { g_pAliasEditorModule->lock(); - QMessageBox::information(this, + TQMessageBox::information(this, __tr2qs("Bad Namespace Name"), __tr2qs("Namespace names can contain only letters, digits, underscores and '::' namespace separators"), __tr2qs("Ok, Let me try again...")); @@ -962,12 +962,12 @@ QString KviAliasEditor::askForNamespaceName(const QString &szAction,const QStrin continue; } // make sure that we have only doubled "::" and not ":" or ":::..." - QString tmp = szNewName; - tmp.replace("::","@"); // @ is not allowed by the rule above - if(tmp.find(":") != -1) + TQString tmp = szNewName; + tmp.tqreplace("::","@"); // @ is not allowed by the rule above + if(tmp.tqfind(":") != -1) { g_pAliasEditorModule->lock(); - QMessageBox::information(this, + TQMessageBox::information(this, __tr2qs("Bad Namespace Name"), __tr2qs("Stray ':' character in namespace name: did you mean ...:: ?"), __tr2qs("Ok, Let me try again...")); @@ -975,10 +975,10 @@ QString KviAliasEditor::askForNamespaceName(const QString &szAction,const QStrin szNewName = ""; continue; } - if(tmp.find("@@") != -1) + if(tmp.tqfind("@@") != -1) { g_pAliasEditorModule->lock(); - QMessageBox::information(this, + TQMessageBox::information(this, __tr2qs("Bad Namespace Name"), __tr2qs("Found an empty namespace in namespace name"), __tr2qs("Ok, Let me try again...")); @@ -992,10 +992,10 @@ QString KviAliasEditor::askForNamespaceName(const QString &szAction,const QStrin void KviAliasEditor::openParentItems(KviTalListViewItem * it) { - if(it->parent()) + if(it->tqparent()) { - it->parent()->setOpen(true); - openParentItems(it->parent()); + it->tqparent()->setOpen(true); + openParentItems(it->tqparent()); } } @@ -1024,10 +1024,10 @@ void KviAliasEditor::newAlias() { if(!itemExists(m_pLastClickedItem,m_pListView->firstChild()))return; // dead ? if(m_pLastClickedItem->isAlias()) - m_pLastClickedItem = m_pLastClickedItem->parentNamespaceItem(); + m_pLastClickedItem = m_pLastClickedItem->tqparentNamespaceItem(); } - QString szNewName = askForAliasName(__tr2qs("Add Alias"),__tr2qs("Please enter the name for the new alias"),"myfunction"); + TQString szNewName = askForAliasName(__tr2qs("Add Alias"),__tr2qs("Please enter the name for the new alias"),"myfunction"); if(szNewName.isEmpty())return; getUniqueItemName(m_pLastClickedItem,szNewName,KviAliasEditorListViewItem::Alias); @@ -1048,11 +1048,11 @@ void KviAliasEditor::newNamespace() { if(!itemExists(m_pLastClickedItem,m_pListView->firstChild()))return; // dead ? if(m_pLastClickedItem->isAlias()) - m_pLastClickedItem = m_pLastClickedItem->parentNamespaceItem(); + m_pLastClickedItem = m_pLastClickedItem->tqparentNamespaceItem(); } - QString szNewName = askForNamespaceName(__tr2qs("Add Namespace"),__tr2qs("Please enter the name for the new namespace"),"mynamespace"); + TQString szNewName = askForNamespaceName(__tr2qs("Add Namespace"),__tr2qs("Please enter the name for the new namespace"),"mynamespace"); if(szNewName.isEmpty())return; getUniqueItemName(m_pLastClickedItem,szNewName,KviAliasEditorListViewItem::Namespace); @@ -1067,7 +1067,7 @@ void KviAliasEditor::newNamespace() activateItem(it); } -bool KviAliasEditor::aliasExists(QString &szFullItemName) +bool KviAliasEditor::aliasExists(TQString &szFullItemName) { KviPointerList l; l.setAutoDelete(false); @@ -1075,7 +1075,7 @@ bool KviAliasEditor::aliasExists(QString &szFullItemName) appendAliasItems(&l,(KviAliasEditorListViewItem *)(m_pListView->firstChild()),false); for(KviAliasListViewItem * it = l.first();it;it = l.next()) { - if (KviQString::equalCI(buildFullItemName(it),szFullItemName)) + if (KviTQString::equalCI(buildFullItemName(it),szFullItemName)) { return true; } @@ -1083,7 +1083,7 @@ bool KviAliasEditor::aliasExists(QString &szFullItemName) return false; } -bool KviAliasEditor::namespaceExists(QString &szFullItemName) +bool KviAliasEditor::namespaceExists(TQString &szFullItemName) { KviPointerList l; l.setAutoDelete(false); @@ -1091,7 +1091,7 @@ bool KviAliasEditor::namespaceExists(QString &szFullItemName) appendNamespaceItems(&l,(KviAliasEditorListViewItem *)(m_pListView->firstChild()),false); for(KviAliasListViewItem * it = l.first();it;it = l.next()) { - if (KviQString::equalCI(buildFullItemName(it),szFullItemName)) + if (KviTQString::equalCI(buildFullItemName(it),szFullItemName)) { return true; } @@ -1103,8 +1103,8 @@ void KviAliasEditor::renameItem() if(!m_pLastEditedItem)return; if(!itemExists(m_pLastEditedItem,m_pListView->firstChild()))return; // dead ? - QString szName = buildFullItemName(m_pLastEditedItem); - QString szNewName; + TQString szName = buildFullItemName(m_pLastEditedItem); + TQString szNewName; bool bAlias = m_pLastEditedItem->isAlias(); @@ -1122,7 +1122,7 @@ void KviAliasEditor::renameItem() if (aliasExists(szNewName)) { g_pAliasEditorModule->lock(); - QMessageBox::information(this, + TQMessageBox::information(this, __tr2qs("Alias already exists"), __tr2qs("This name is already in use. Please choose another one."), __tr2qs("Ok, Let me try again...")); @@ -1134,7 +1134,7 @@ void KviAliasEditor::renameItem() if (namespaceExists(szNewName)) { g_pAliasEditorModule->lock(); - QMessageBox::information(this, + TQMessageBox::information(this, __tr2qs("Namespace already exists"), __tr2qs("This name is already in use. Please choose another one."), __tr2qs("Ok, let me try again...")); @@ -1143,8 +1143,8 @@ void KviAliasEditor::renameItem() } } - QString szCode; - QPoint pntCursor; + TQString szCode; + TQPoint pntCursor; if(bAlias) { m_pEditor->getText(szCode); @@ -1200,7 +1200,7 @@ void KviAliasEditor::saveLastEditedItem() if(m_pLastEditedItem->isNamespace())return; - QString newCode; + TQString newCode; m_pEditor->getText(newCode); ((KviAliasListViewItem *)m_pLastEditedItem)->setBuffer(newCode); ((KviAliasListViewItem *)m_pLastEditedItem)->setCursorPosition(m_pEditor->getCursor()); @@ -1221,10 +1221,10 @@ void KviAliasEditor::currentItemChanged(KviTalListViewItem *it) return; } - QString szNam = buildFullItemName(m_pLastEditedItem); + TQString szNam = buildFullItemName(m_pLastEditedItem); if(m_pLastEditedItem->isNamespace()) { - QString szLabelText = __tr2qs("Namespace"); + TQString szLabelText = __tr2qs("Namespace"); szLabelText += ": "; szLabelText += szNam; szLabelText += ""; @@ -1235,7 +1235,7 @@ void KviAliasEditor::currentItemChanged(KviTalListViewItem *it) return; } - QString szLabelText = __tr2qs("Alias"); + TQString szLabelText = __tr2qs("Alias"); szLabelText += ": "; szLabelText += szNam; szLabelText += ""; @@ -1251,7 +1251,7 @@ void KviAliasEditor::recursiveCommit(KviAliasEditorListViewItem * it) if(!it)return; if(it->isAlias()) { - QString szName = buildFullItemName(it); + TQString szName = buildFullItemName(it); //debug("ADDING %s",szName.latin1()); // WARNING: On MSVC operator new here is valid ONLY because // KviKvsScript has a non virtual detructor! @@ -1275,9 +1275,9 @@ void KviAliasEditor::commit() } -void KviAliasEditor::getUniqueItemName(KviAliasEditorListViewItem *item,QString &buffer,KviAliasEditorListViewItem::Type eType) +void KviAliasEditor::getUniqueItemName(KviAliasEditorListViewItem *item,TQString &buffer,KviAliasEditorListViewItem::Type eType) { - QString ret; + TQString ret; int idx = 0; KviAliasEditorListViewItem * found; @@ -1287,7 +1287,7 @@ void KviAliasEditor::getUniqueItemName(KviAliasEditorListViewItem *item,QString ret = buffer; if(idx > 0) { - QString tmp; + TQString tmp; tmp.setNum(idx); ret.append(tmp); } @@ -1333,21 +1333,21 @@ KviAliasEditorWindow::KviAliasEditorWindow(KviFrame * lpFrm) m_pEditor = new KviAliasEditor(this); - m_pBase = new QWidget(this); - QGridLayout * g = new QGridLayout(m_pBase,1,4,4,4); + m_pBase = new TQWidget(this); + TQGridLayout * g = new TQGridLayout(m_pBase,1,4,4,4); - QPushButton * btn = new QPushButton(__tr2qs("&OK"),m_pBase); - connect(btn,SIGNAL(clicked()),this,SLOT(okClicked())); + TQPushButton * btn = new TQPushButton(__tr2qs("&OK"),m_pBase); + connect(btn,TQT_SIGNAL(clicked()),this,TQT_SLOT(okClicked())); btn->setIconSet(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_ACCEPT))); g->addWidget(btn,0,1); - btn = new QPushButton(__tr2qs("&Apply"),m_pBase); - connect(btn,SIGNAL(clicked()),this,SLOT(applyClicked())); + btn = new TQPushButton(__tr2qs("&Apply"),m_pBase); + connect(btn,TQT_SIGNAL(clicked()),this,TQT_SLOT(applyClicked())); btn->setIconSet(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_ACCEPT))); g->addWidget(btn,0,2); - btn = new QPushButton(__tr2qs("Cancel"),m_pBase); - connect(btn,SIGNAL(clicked()),this,SLOT(cancelClicked())); + btn = new TQPushButton(__tr2qs("Cancel"),m_pBase); + connect(btn,TQT_SIGNAL(clicked()),this,TQT_SLOT(cancelClicked())); btn->setIconSet(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_DISCARD))); g->addWidget(btn,0,3); @@ -1376,14 +1376,14 @@ void KviAliasEditorWindow::cancelClicked() } -QPixmap * KviAliasEditorWindow::myIconPtr() +TQPixmap * KviAliasEditorWindow::myIconPtr() { return g_pIconManager->getSmallIcon(KVI_SMALLICON_ALIAS); } -void KviAliasEditorWindow::resizeEvent(QResizeEvent *e) +void KviAliasEditorWindow::resizeEvent(TQResizeEvent *e) { - int hght = m_pBase->sizeHint().height(); + int hght = m_pBase->tqsizeHint().height(); m_pEditor->setGeometry(0,0,width(),height()- hght); m_pBase->setGeometry(0,height() - hght,width(),hght); } diff --git a/src/modules/aliaseditor/aliaseditor.h b/src/modules/aliaseditor/aliaseditor.h index fa49fc96..570fe943 100644 --- a/src/modules/aliaseditor/aliaseditor.h +++ b/src/modules/aliaseditor/aliaseditor.h @@ -29,13 +29,13 @@ #include "kvi_pointerlist.h" -#include +#include #include "kvi_tal_listview.h" -#include +#include #include "kvi_tal_popupmenu.h" -#include -#include -#include +#include +#include +#include class KviScriptEditor; class KviAliasNamespaceListViewItem; @@ -46,22 +46,22 @@ class KviAliasEditorListViewItem : public KviTalListViewItem public: enum Type { Alias, Namespace }; public: - KviAliasEditorListViewItem(KviTalListView * pListView,Type eType,const QString &szName); - KviAliasEditorListViewItem(KviAliasNamespaceListViewItem * pParentNamespaceItem,Type eType,const QString &szName); + KviAliasEditorListViewItem(KviTalListView * pListView,Type eType,const TQString &szName); + KviAliasEditorListViewItem(KviAliasNamespaceListViewItem * pParentNamespaceItem,Type eType,const TQString &szName); ~KviAliasEditorListViewItem(){}; protected: Type m_eType; KviAliasNamespaceListViewItem * m_pParentNamespaceItem; - QString m_szName; + TQString m_szName; public: - const QString & name(){ return m_szName; }; - void setName(const QString &szName); + const TQString & name(){ return m_szName; }; + void setName(const TQString &szName); Type type(){ return m_eType; }; bool isAlias(){ return m_eType == Alias; }; bool isNamespace(){ return m_eType == Namespace; }; void setParentNamespaceItem(KviAliasNamespaceListViewItem* it){ m_pParentNamespaceItem=it; }; - KviAliasNamespaceListViewItem * parentNamespaceItem(){ return m_pParentNamespaceItem; }; - virtual QString key(int column,bool bAsc) const; + KviAliasNamespaceListViewItem * tqparentNamespaceItem(){ return m_pParentNamespaceItem; }; + virtual TQString key(int column,bool bAsc) const; }; class KviAliasListViewItem; @@ -69,54 +69,55 @@ class KviAliasListViewItem; class KviAliasNamespaceListViewItem : public KviAliasEditorListViewItem { public: - KviAliasNamespaceListViewItem(KviTalListView * pListView,const QString &szName); - KviAliasNamespaceListViewItem(KviAliasNamespaceListViewItem * pParentNamespace,const QString &szName); + KviAliasNamespaceListViewItem(KviTalListView * pListView,const TQString &szName); + KviAliasNamespaceListViewItem(KviAliasNamespaceListViewItem * pParentNamespace,const TQString &szName); ~KviAliasNamespaceListViewItem(){}; public: - KviAliasNamespaceListViewItem * findNamespaceItem(const QString &szName); - KviAliasNamespaceListViewItem * getNamespaceItem(const QString &szName); - KviAliasListViewItem * findAliasItem(const QString &szName); - KviAliasListViewItem * getAliasItem(const QString &szName); - KviAliasListViewItem * createFullAliasItem(const QString &szFullName); - KviAliasNamespaceListViewItem * createFullNamespaceItem(const QString &szFullName); + KviAliasNamespaceListViewItem * findNamespaceItem(const TQString &szName); + KviAliasNamespaceListViewItem * getNamespaceItem(const TQString &szName); + KviAliasListViewItem * findAliasItem(const TQString &szName); + KviAliasListViewItem * getAliasItem(const TQString &szName); + KviAliasListViewItem * createFullAliasItem(const TQString &szFullName); + KviAliasNamespaceListViewItem * createFullNamespaceItem(const TQString &szFullName); }; class KviAliasListViewItem : public KviAliasEditorListViewItem { public: - KviAliasListViewItem(KviAliasNamespaceListViewItem * pParentNamespace,const QString &szName); - KviAliasListViewItem(KviTalListView *pListView,const QString &szName); + KviAliasListViewItem(KviAliasNamespaceListViewItem * pParentNamespace,const TQString &szName); + KviAliasListViewItem(KviTalListView *pListView,const TQString &szName); ~KviAliasListViewItem(){}; public: - QString m_szBuffer; - QPoint m_cPos; + TQString m_szBuffer; + TQPoint m_cPos; public: - const QString & buffer(){ return m_szBuffer; }; - const QPoint & cursorPosition(){ return m_cPos; }; - void setBuffer(const QString &szBuffer){ m_szBuffer = szBuffer; }; - void setCursorPosition(const QPoint &cPos){ m_cPos = cPos; }; + const TQString & buffer(){ return m_szBuffer; }; + const TQPoint & cursorPosition(){ return m_cPos; }; + void setBuffer(const TQString &szBuffer){ m_szBuffer = szBuffer; }; + void setCursorPosition(const TQPoint &cPos){ m_cPos = cPos; }; }; -class QSplitter; +class TQSplitter; -class KviAliasEditor : public QWidget +class KviAliasEditor : public TQWidget { Q_OBJECT + TQ_OBJECT public: - KviAliasEditor(QWidget * par); + KviAliasEditor(TQWidget * par); ~KviAliasEditor(); public: KviScriptEditor * m_pEditor; KviTalListView * m_pListView; - QLabel * m_pNameLabel; - QPushButton * m_pRenameButton; + TQLabel * m_pNameLabel; + TQPushButton * m_pRenameButton; KviAliasEditorListViewItem * m_pLastEditedItem; KviAliasEditorListViewItem * m_pLastClickedItem; //KviAliasListViewItem * m_pLastEditedItem; KviTalPopupMenu * m_pContextPopup; - QSplitter * m_pSplitter; - QString m_szDir; + TQSplitter * m_pSplitter; + TQString m_szDir; public: //bool modified(){ return m_bModified; }; void commit(); @@ -125,7 +126,7 @@ public: void saveProperties(KviConfig *); void loadProperties(KviConfig *); - static void splitFullAliasOrNamespaceName(const QString &szFullName,QStringList &lNamespaces,QString &szName); + static void splitFullAliasOrNamespaceName(const TQString &szFullName,TQStringList &lNamespaces,TQString &szName); protected slots: void currentItemChanged(KviTalListViewItem *it); void newAlias(); @@ -134,57 +135,58 @@ protected slots: void exportSelectedSepFiles(); void exportSelected(); void removeSelectedItems(); - void itemPressed(KviTalListViewItem *it,const QPoint &pnt,int col); + void itemPressed(KviTalListViewItem *it,const TQPoint &pnt,int col); void renameItem(); void slotFind(); void slotCollapseNamespaces(); - void slotFindWord(const QString &); - void slotReplaceAll(const QString &before,const QString &after); + void slotFindWord(const TQString &); + void slotReplaceAll(const TQString &before,const TQString &after); protected: -// QString const & findWord(const QString &txt,bool); +// TQString const & findWord(const TQString &txt,bool); void recursiveCollapseNamespaces(KviAliasEditorListViewItem * it); - void recursiveSearchReplace(const QString &szSearch,KviAliasEditorListViewItem * it,bool bReplace=false,const QString &szReplace="n"); + void recursiveSearchReplace(const TQString &szSearch,KviAliasEditorListViewItem * it,bool bReplace=false,const TQString &szReplace="n"); void recursiveCommit(KviAliasEditorListViewItem * it); - void getExportAliasBuffer(QString &buffer,KviAliasListViewItem * it); + void getExportAliasBuffer(TQString &buffer,KviAliasListViewItem * it); void oneTimeSetup(); void selectOneItem(KviTalListViewItem * it,KviTalListViewItem *pStartFrom); void saveLastEditedItem(); - void getUniqueItemName(KviAliasEditorListViewItem *item,QString &buffer,KviAliasEditorListViewItem::Type eType); + void getUniqueItemName(KviAliasEditorListViewItem *item,TQString &buffer,KviAliasEditorListViewItem::Type eType); void appendSelectedItems(KviPointerList * l,KviAliasEditorListViewItem * pStartFrom,bool bIncludeChildrenOfSelected = false); void appendAliasItems(KviPointerList * l,KviAliasEditorListViewItem * pStartFrom,bool bSelectedOnly); void appendNamespaceItems(KviPointerList * l,KviAliasEditorListViewItem * pStartFrom,bool bSelectedOnly); bool removeItem(KviAliasEditorListViewItem *it,bool * pbYesToAll,bool bDeleteEmptyTree); void openParentItems(KviTalListViewItem * it); void activateItem(KviTalListViewItem * it); - QString askForAliasName(const QString &szAction,const QString &szText,const QString &szInitialText); - QString askForNamespaceName(const QString &szAction,const QString &szText,const QString &szInitialText); + TQString askForAliasName(const TQString &szAction,const TQString &szText,const TQString &szInitialText); + TQString askForNamespaceName(const TQString &szAction,const TQString &szText,const TQString &szInitialText); bool itemExists(KviTalListViewItem *pSearchFor,KviTalListViewItem * pSearchAt); - bool namespaceExists(QString &szFullItemName); - bool aliasExists(QString &szFullItemName); + bool namespaceExists(TQString &szFullItemName); + bool aliasExists(TQString &szFullItemName); bool hasSelectedItems(KviTalListViewItem * it); - KviAliasNamespaceListViewItem * findNamespaceItem(const QString &szName); - KviAliasNamespaceListViewItem * getNamespaceItem(const QString &szName); - KviAliasListViewItem * findAliasItem(const QString &szName); - KviAliasListViewItem * getAliasItem(const QString &szName); - KviAliasListViewItem * createFullAliasItem(const QString &szFullName); - KviAliasNamespaceListViewItem * createFullNamespaceItem(const QString &szFullName); - QString buildFullItemName(KviAliasEditorListViewItem * it); + KviAliasNamespaceListViewItem * findNamespaceItem(const TQString &szName); + KviAliasNamespaceListViewItem * getNamespaceItem(const TQString &szName); + KviAliasListViewItem * findAliasItem(const TQString &szName); + KviAliasListViewItem * getAliasItem(const TQString &szName); + KviAliasListViewItem * createFullAliasItem(const TQString &szFullName); + KviAliasNamespaceListViewItem * createFullNamespaceItem(const TQString &szFullName); + TQString buildFullItemName(KviAliasEditorListViewItem * it); }; class KviAliasEditorWindow : public KviWindow { Q_OBJECT + TQ_OBJECT public: KviAliasEditorWindow(KviFrame * lpFrm); ~KviAliasEditorWindow(); protected: KviAliasEditor * m_pEditor; - QWidget * m_pBase; + TQWidget * m_pBase; protected: - virtual QPixmap * myIconPtr(); - virtual void resizeEvent(QResizeEvent *e); + virtual TQPixmap * myIconPtr(); + virtual void resizeEvent(TQResizeEvent *e); virtual void getConfigGroupName(KviStr &szName); virtual void saveProperties(KviConfig *); virtual void loadProperties(KviConfig *); diff --git a/src/modules/avatar/libkviavatar.cpp b/src/modules/avatar/libkviavatar.cpp index e97b1f67..a7098eb4 100644 --- a/src/modules/avatar/libkviavatar.cpp +++ b/src/modules/avatar/libkviavatar.cpp @@ -46,19 +46,19 @@ #include "kvi_ircmask.h" #include "kvi_qcstring.h" -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "kvi_tal_hbox.h" -#include +#include static KviPointerList * g_pAvatarSelectionDialogList = 0; extern KVIRC_API KviSharedFilesManager * g_pSharedFilesManager; -KviAsyncAvatarSelectionDialog::KviAsyncAvatarSelectionDialog(QWidget * par,const QString &szInitialPath,KviIrcConnection * c) -: QDialog(par,0,false,Qt::WType_Dialog | Qt::WStyle_DialogBorder | Qt::WStyle_StaysOnTop) +KviAsyncAvatarSelectionDialog::KviAsyncAvatarSelectionDialog(TQWidget * par,const TQString &szInitialPath,KviIrcConnection * c) +: TQDialog(par,0,false,TQt::WType_Dialog | TQt::WStyle_DialogBorder | TQt::WStyle_StaysOnTop) { g_pAvatarSelectionDialogList->append(this); @@ -66,9 +66,9 @@ KviAsyncAvatarSelectionDialog::KviAsyncAvatarSelectionDialog(QWidget * par,const setCaption(__tr2qs("Choose Avatar - KVIrc")); - QGridLayout * g = new QGridLayout(this,3,3,4,8); + TQGridLayout * g = new TQGridLayout(this,3,3,4,8); - QString msg = "
"; + TQString msg = "
"; msg += __tr2qs("Please select an avatar image. " \ "The full path to a local file or an image on the Web can be used.
" \ "If you wish to use a local image file, click the \"Browse\"" \ @@ -76,29 +76,29 @@ KviAsyncAvatarSelectionDialog::KviAsyncAvatarSelectionDialog(QWidget * par,const "The full URL for an image (including http://) can be entered manually."); msg += "

"; - QLabel * l = new QLabel(msg,this); + TQLabel * l = new TQLabel(msg,this); l->setMinimumWidth(250); g->addMultiCellWidget(l,0,0,0,2); - m_pLineEdit = new QLineEdit(this); + m_pLineEdit = new TQLineEdit(this); m_pLineEdit->setText(szInitialPath); m_pLineEdit->setMinimumWidth(180); g->addMultiCellWidget(m_pLineEdit,1,1,0,1); - QPushButton * b = new QPushButton(__tr2qs("&Browse..."),this); - connect(b,SIGNAL(clicked()),this,SLOT(chooseFileClicked())); + TQPushButton * b = new TQPushButton(__tr2qs("&Browse..."),this); + connect(b,TQT_SIGNAL(clicked()),this,TQT_SLOT(chooseFileClicked())); g->addWidget(b,1,2); KviTalHBox * h = new KviTalHBox(this);h->setSpacing(8);g->addMultiCellWidget(h,2,2,1,2); - b = new QPushButton(__tr2qs("&OK"),h); + b = new TQPushButton(__tr2qs("&OK"),h); b->setMinimumWidth(80); b->setDefault(true); - connect(b,SIGNAL(clicked()),this,SLOT(okClicked())); + connect(b,TQT_SIGNAL(clicked()),this,TQT_SLOT(okClicked())); - b = new QPushButton(__tr2qs("Cancel"),h); + b = new TQPushButton(__tr2qs("Cancel"),h); b->setMinimumWidth(80); - connect(b,SIGNAL(clicked()),this,SLOT(cancelClicked())); + connect(b,TQT_SIGNAL(clicked()),this,TQT_SLOT(cancelClicked())); g->setRowStretch(0,1); g->setColStretch(0,1); @@ -117,9 +117,9 @@ void KviAsyncAvatarSelectionDialog::okClicked() if(!m_szAvatarName.isEmpty()) { - QString tmp = m_szAvatarName; - tmp.replace("\\","\\\\"); - QString szBuffer=QString("avatar.set \"%1\"").arg(tmp); + TQString tmp = m_szAvatarName; + tmp.tqreplace("\\","\\\\"); + TQString szBuffer=TQString("avatar.set \"%1\"").tqarg(tmp); KviKvsScript::run(szBuffer,m_pConnection->console()); } @@ -135,14 +135,14 @@ void KviAsyncAvatarSelectionDialog::cancelClicked() void KviAsyncAvatarSelectionDialog::chooseFileClicked() { - QString tmp; + TQString tmp; if(KviFileDialog::askForOpenFileName(tmp,__tr2qs("Choose an Image File - KVIrc"))) { m_pLineEdit->setText(tmp); } } -void KviAsyncAvatarSelectionDialog::closeEvent(QCloseEvent * e) +void KviAsyncAvatarSelectionDialog::closeEvent(TQCloseEvent * e) { e->ignore(); reject(); @@ -181,32 +181,32 @@ void KviAsyncAvatarSelectionDialog::closeEvent(QCloseEvent * e) static bool avatar_kvs_cmd_set(KviKvsModuleCommandCall * c) { - QString szAvatar; + TQString szAvatar; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("avatar",KVS_PT_NONEMPTYSTRING,KVS_PF_OPTIONAL,szAvatar) KVSM_PARAMETERS_END(c) - KVSM_REQUIRE_CONNECTION(c) + KVSM_RETQUIRE_CONNECTION(c) - QString absPath; + TQString absPath; if(szAvatar.isEmpty()) { - KviAsyncAvatarSelectionDialog * d = new KviAsyncAvatarSelectionDialog(g_pFrame,QString::null,c->window()->connection()); + KviAsyncAvatarSelectionDialog * d = new KviAsyncAvatarSelectionDialog(g_pFrame,TQString(),c->window()->connection()); d->show(); return true; } // new avatar specified...try to load it - KviIrcUserEntry * e = c->window()->connection()->userDataBase()->find(c->window()->connection()->currentNickName()); + KviIrcUserEntry * e = c->window()->connection()->userDataBase()->tqfind(c->window()->connection()->currentNickName()); if(!e) { c->warning(__tr2qs("Internal error: I'm not in the user database ?")); return true; } - KviAvatar * av = g_pIconManager->getAvatar(QString::null,szAvatar); + KviAvatar * av = g_pIconManager->getAvatar(TQString(),szAvatar); if(av) { // Ok...got it... @@ -215,21 +215,21 @@ static bool avatar_kvs_cmd_set(KviKvsModuleCommandCall * c) c->window()->connection()->userInfo()->nickName(), c->window()->connection()->userInfo()->userName(), c->window()->connection()->userInfo()->hostName(), - QString::null); + TQString()); } else { - bool bIsUrl = KviQString::equalCIN(szAvatar,"http://",7) && (szAvatar.length() > 7); + bool bIsUrl = KviTQString::equalCIN(szAvatar,"http://",7) && (szAvatar.length() > 7); if(bIsUrl) { // This is an url, and we don't have a cached copy for now - QString szLocalFilePath; - QString szLocalFile = szAvatar; + TQString szLocalFilePath; + TQString szLocalFile = szAvatar; g_pIconManager->urlToCachedFileName(szLocalFile); g_pApp->getLocalKvircDirectory(szLocalFilePath,KviApp::Avatars,szLocalFile); - szLocalFilePath.replace("\\","\\\\"); + szLocalFilePath.tqreplace("\\","\\\\"); - QString szCommand = "http.get -w=nm "; + TQString szCommand = "http.get -w=nm "; szCommand += szAvatar; szCommand += " "; szCommand += szLocalFilePath; @@ -275,9 +275,9 @@ static bool avatar_kvs_cmd_set(KviKvsModuleCommandCall * c) static bool avatar_kvs_cmd_unset(KviKvsModuleCommandCall * c) { - KVSM_REQUIRE_CONNECTION(c) + KVSM_RETQUIRE_CONNECTION(c) - KviIrcUserEntry * e = c->window()->connection()->userDataBase()->find(c->window()->connection()->currentNickName()); + KviIrcUserEntry * e = c->window()->connection()->userDataBase()->tqfind(c->window()->connection()->currentNickName()); if(!e) { c->warning(__tr2qs("Internal error: I'm not in the user database ?")); @@ -289,7 +289,7 @@ static bool avatar_kvs_cmd_unset(KviKvsModuleCommandCall * c) c->window()->connection()->userInfo()->nickName(), c->window()->connection()->userInfo()->userName(), c->window()->connection()->userInfo()->hostName(), - QString::null); + TQString()); return true; } @@ -335,31 +335,31 @@ static bool avatar_kvs_cmd_unset(KviKvsModuleCommandCall * c) static bool avatar_kvs_cmd_notify(KviKvsModuleCommandCall * c) { - QString szTarget; + TQString szTarget; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("target",KVS_PT_NONEMPTYSTRING,0,szTarget) KVSM_PARAMETERS_END(c) - KVSM_REQUIRE_CONNECTION(c) + KVSM_RETQUIRE_CONNECTION(c) kvs_int_t iTimeout = (kvs_int_t)KVI_OPTION_UINT(KviOption_uintAvatarOfferTimeoutInSecs); - if(KviKvsVariant * pTimeout = c->switches()->find('t',"timeout")) + if(KviKvsVariant * pTimeout = c->switches()->tqfind('t',"timeout")) { if(!pTimeout->asInteger(iTimeout)) { - if(!c->switches()->find('q',"quiet")) + if(!c->switches()->tqfind('q',"quiet")) c->warning(__tr2qs("Invalid timeout specified, using default")); } } - KviIrcUserEntry * e = c->window()->connection()->userDataBase()->find(c->window()->connection()->currentNickName()); + KviIrcUserEntry * e = c->window()->connection()->userDataBase()->tqfind(c->window()->connection()->currentNickName()); if(!e) { c->warning(__tr2qs("Internal error: I'm not in the user database ?")); return true; } - QString absPath,avatar; + TQString absPath,avatar; if(e->avatar()) { @@ -370,7 +370,7 @@ static bool avatar_kvs_cmd_notify(KviKvsModuleCommandCall * c) KviSharedFile * o = 0; if((!absPath.isEmpty()) && (!avatar.isEmpty())) { - bool bTargetIsChan = (szTarget.contains('#') || szTarget.contains('&') || szTarget.contains('!')); + bool bTargetIsChan = (szTarget.tqcontains('#') || szTarget.tqcontains('&') || szTarget.tqcontains('!')); if(bTargetIsChan)o = g_pSharedFilesManager->lookupSharedFile(avatar,0); else { KviIrcMask u(szTarget); @@ -379,34 +379,34 @@ static bool avatar_kvs_cmd_notify(KviKvsModuleCommandCall * c) if(!o) { // FIXME: #warning "OPTION FOR PERMANENT OR TIMEDOUT OFFER...TIMEDOUT WOULD ALSO NEED TO EXTEND EXISTING OFFERS LIFETIME" - QString szUserMask = bTargetIsChan ? QString("*") : szTarget; + TQString szUserMask = bTargetIsChan ? TQString("*") : szTarget; szUserMask += "!*@*"; o = g_pSharedFilesManager->addSharedFile(avatar,absPath,szUserMask,iTimeout); if(!o) { // Don't delete o...it has been already deleted by g_pFileTrader - if(!c->switches()->find('q',"quiet")) + if(!c->switches()->tqfind('q',"quiet")) c->warning(__tr2qs("Can't add a file offer for file %Q (huh ? file not readable ?)"),&absPath); return true; } if(_OUTPUT_VERBOSE) { - if(!c->switches()->find('q',"quiet")) + if(!c->switches()->tqfind('q',"quiet")) c->window()->output(KVI_OUT_SYSTEMMESSAGE,__tr2qs("Added %d secs file offer for file %Q (%Q) and receiver %Q"), iTimeout,&(o->absFilePath()),&avatar,&(o->userMask())); } } } - if(!c->switches()->find('q',"quiet")) + if(!c->switches()->tqfind('q',"quiet")) c->window()->output(KVI_OUT_AVATAR,__tr2qs("Notifying avatar '%Q' to %Q"),&avatar,&szTarget); - KviQCString encodedTarget = c->window()->connection()->encodeText(szTarget); + KviTQCString encodedTarget = c->window()->connection()->encodeText(szTarget); if(!avatar.isEmpty()) { - KviQCString encodedAvatar = c->window()->connection()->encodeText(avatar); + KviTQCString encodedAvatar = c->window()->connection()->encodeText(avatar); if(o) { @@ -445,16 +445,16 @@ static bool avatar_kvs_cmd_notify(KviKvsModuleCommandCall * c) static bool avatar_kvs_fnc_name(KviKvsModuleFunctionCall * c) { - QString szNick; + TQString szNick; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("nick",KVS_PT_STRING,KVS_PF_OPTIONAL,szNick) KVSM_PARAMETERS_END(c) - KVSM_REQUIRE_CONNECTION(c) + KVSM_RETQUIRE_CONNECTION(c) if(szNick.isEmpty())szNick = c->window()->connection()->currentNickName(); - KviIrcUserEntry * e = c->window()->connection()->userDataBase()->find(szNick); + KviIrcUserEntry * e = c->window()->connection()->userDataBase()->tqfind(szNick); if(e) { if(e->avatar()) @@ -489,16 +489,16 @@ static bool avatar_kvs_fnc_name(KviKvsModuleFunctionCall * c) static bool avatar_kvs_fnc_path(KviKvsModuleFunctionCall * c) { - QString szNick; + TQString szNick; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("path",KVS_PT_STRING,KVS_PF_OPTIONAL,szNick) KVSM_PARAMETERS_END(c) - KVSM_REQUIRE_CONNECTION(c) + KVSM_RETQUIRE_CONNECTION(c) if(szNick.isEmpty())szNick = c->window()->connection()->currentNickName(); - KviIrcUserEntry * e = c->window()->connection()->userDataBase()->find(szNick); + KviIrcUserEntry * e = c->window()->connection()->userDataBase()->tqfind(szNick); if(e) { if(e->avatar()) @@ -531,14 +531,14 @@ static bool avatar_kvs_fnc_path(KviKvsModuleFunctionCall * c) static bool avatar_kvs_cmd_query(KviKvsModuleCommandCall * c) { - QString szName; + TQString szName; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("target",KVS_PT_NONEMPTYSTRING,0,szName) KVSM_PARAMETERS_END(c) - KVSM_REQUIRE_CONNECTION(c) + KVSM_RETQUIRE_CONNECTION(c) - KviQCString target = c->window()->connection()->encodeText(szName); + KviTQCString target = c->window()->connection()->encodeText(szName); c->window()->connection()->sendFmtData("PRIVMSG %s :%cAVATAR%c",target.data(),0x01,0x01); return true; diff --git a/src/modules/avatar/libkviavatar.h b/src/modules/avatar/libkviavatar.h index d30b4233..df3b30b1 100644 --- a/src/modules/avatar/libkviavatar.h +++ b/src/modules/avatar/libkviavatar.h @@ -26,24 +26,25 @@ #include "kvi_settings.h" #include "kvi_qstring.h" -#include +#include -class QLineEdit; +class TQLineEdit; class KviIrcConnection; -class KviAsyncAvatarSelectionDialog : public QDialog +class KviAsyncAvatarSelectionDialog : public TQDialog { Q_OBJECT + TQ_OBJECT public: - KviAsyncAvatarSelectionDialog(QWidget * par,const QString &szInitialPath,KviIrcConnection * c); + KviAsyncAvatarSelectionDialog(TQWidget * par,const TQString &szInitialPath,KviIrcConnection * c); ~KviAsyncAvatarSelectionDialog(); protected: - QLineEdit * m_pLineEdit; - QString m_szAvatarName; + TQLineEdit * m_pLineEdit; + TQString m_szAvatarName; KviIrcConnection * m_pConnection; protected: - virtual void closeEvent(QCloseEvent * e); - const QString &avatarName(){ return m_szAvatarName; }; + virtual void closeEvent(TQCloseEvent * e); + const TQString &avatarName(){ return m_szAvatarName; }; protected slots: void okClicked(); void cancelClicked(); diff --git a/src/modules/chan/libkvichan.cpp b/src/modules/chan/libkvichan.cpp index 99f8e38e..a2ff3bb3 100644 --- a/src/modules/chan/libkvichan.cpp +++ b/src/modules/chan/libkvichan.cpp @@ -35,7 +35,7 @@ #include "kvi_ircconnectiontarget.h" #include "kvi_ircconnection.h" -static KviChannel * chan_kvs_find_channel(KviKvsModuleFunctionCall * c,QString &szChan,bool noWarnings=false) +static KviChannel * chan_kvs_find_channel(KviKvsModuleFunctionCall * c,TQString &szChan,bool noWarnings=false) { if(szChan.isEmpty()) { @@ -76,7 +76,7 @@ static KviChannel * chan_kvs_find_channel(KviKvsModuleFunctionCall * c,QString & static bool chan_kvs_fnc_name(KviKvsModuleFunctionCall * c) { - QString szId; + TQString szId; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("window id",KVS_PT_STRING,KVS_PF_OPTIONAL,szId) KVSM_PARAMETERS_END(c) @@ -105,7 +105,7 @@ static bool chan_kvs_fnc_name(KviKvsModuleFunctionCall * c) static bool chan_kvs_fnc_getUrl(KviKvsModuleFunctionCall * c) { - QString szId,url; + TQString szId,url; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("channel id",KVS_PT_STRING,KVS_PF_OPTIONAL,szId) KVSM_PARAMETERS_END(c) @@ -148,7 +148,7 @@ static bool chan_kvs_fnc_getUrl(KviKvsModuleFunctionCall * c) static bool chan_kvs_fnc_isdead(KviKvsModuleFunctionCall * c) { - QString szId; + TQString szId; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("window id",KVS_PT_STRING,KVS_PF_OPTIONAL,szId) KVSM_PARAMETERS_END(c) @@ -182,7 +182,7 @@ static bool chan_kvs_fnc_isdead(KviKvsModuleFunctionCall * c) static bool chan_kvs_fnc_topic(KviKvsModuleFunctionCall * c) { - QString szId; + TQString szId; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("window id",KVS_PT_STRING,KVS_PF_OPTIONAL,szId) KVSM_PARAMETERS_END(c) @@ -216,7 +216,7 @@ static bool chan_kvs_fnc_topic(KviKvsModuleFunctionCall * c) static bool chan_kvs_fnc_topicsetby(KviKvsModuleFunctionCall * c) { - QString szId; + TQString szId; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("window id",KVS_PT_STRING,KVS_PF_OPTIONAL,szId) KVSM_PARAMETERS_END(c) @@ -250,7 +250,7 @@ static bool chan_kvs_fnc_topicsetby(KviKvsModuleFunctionCall * c) static bool chan_kvs_fnc_topicsetat(KviKvsModuleFunctionCall * c) { - QString szId; + TQString szId; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("window id",KVS_PT_STRING,KVS_PF_OPTIONAL,szId) KVSM_PARAMETERS_END(c) @@ -281,7 +281,7 @@ static bool chan_kvs_fnc_topicsetat(KviKvsModuleFunctionCall * c) static bool chan_kvs_fnc_usercount(KviKvsModuleFunctionCall * c) { - QString szId; + TQString szId; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("window id",KVS_PT_STRING,KVS_PF_OPTIONAL,szId) KVSM_PARAMETERS_END(c) @@ -313,7 +313,7 @@ static bool chan_kvs_fnc_usercount(KviKvsModuleFunctionCall * c) static bool chan_kvs_fnc_ownercount(KviKvsModuleFunctionCall * c) { - QString szId; + TQString szId; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("window id",KVS_PT_STRING,KVS_PF_OPTIONAL,szId) KVSM_PARAMETERS_END(c) @@ -345,7 +345,7 @@ static bool chan_kvs_fnc_ownercount(KviKvsModuleFunctionCall * c) static bool chan_kvs_fnc_admincount(KviKvsModuleFunctionCall * c) { - QString szId; + TQString szId; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("window id",KVS_PT_STRING,KVS_PF_OPTIONAL,szId) KVSM_PARAMETERS_END(c) @@ -378,7 +378,7 @@ static bool chan_kvs_fnc_admincount(KviKvsModuleFunctionCall * c) static bool chan_kvs_fnc_opcount(KviKvsModuleFunctionCall * c) { - QString szId; + TQString szId; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("window id",KVS_PT_STRING,KVS_PF_OPTIONAL,szId) KVSM_PARAMETERS_END(c) @@ -410,7 +410,7 @@ static bool chan_kvs_fnc_opcount(KviKvsModuleFunctionCall * c) static bool chan_kvs_fnc_voicecount(KviKvsModuleFunctionCall * c) { - QString szId; + TQString szId; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("window id",KVS_PT_STRING,KVS_PF_OPTIONAL,szId) KVSM_PARAMETERS_END(c) @@ -442,7 +442,7 @@ static bool chan_kvs_fnc_voicecount(KviKvsModuleFunctionCall * c) static bool chan_kvs_fnc_halfopcount(KviKvsModuleFunctionCall * c) { - QString szId; + TQString szId; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("window id",KVS_PT_STRING,KVS_PF_OPTIONAL,szId) KVSM_PARAMETERS_END(c) @@ -474,7 +474,7 @@ static bool chan_kvs_fnc_halfopcount(KviKvsModuleFunctionCall * c) static bool chan_kvs_fnc_useropcount(KviKvsModuleFunctionCall * c) { - QString szId; + TQString szId; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("window id",KVS_PT_STRING,KVS_PF_OPTIONAL,szId) KVSM_PARAMETERS_END(c) @@ -506,7 +506,7 @@ static bool chan_kvs_fnc_useropcount(KviKvsModuleFunctionCall * c) static bool chan_kvs_fnc_bancount(KviKvsModuleFunctionCall * c) { - QString szId; + TQString szId; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("window id",KVS_PT_STRING,KVS_PF_OPTIONAL,szId) KVSM_PARAMETERS_END(c) @@ -538,7 +538,7 @@ static bool chan_kvs_fnc_bancount(KviKvsModuleFunctionCall * c) static bool chan_kvs_fnc_banexceptioncount(KviKvsModuleFunctionCall * c) { - QString szId; + TQString szId; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("window id",KVS_PT_STRING,KVS_PF_OPTIONAL,szId) KVSM_PARAMETERS_END(c) @@ -570,7 +570,7 @@ static bool chan_kvs_fnc_banexceptioncount(KviKvsModuleFunctionCall * c) static bool chan_kvs_fnc_invitecount(KviKvsModuleFunctionCall * c) { - QString szId; + TQString szId; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("window id",KVS_PT_STRING,KVS_PF_OPTIONAL,szId) KVSM_PARAMETERS_END(c) @@ -597,7 +597,7 @@ static bool chan_kvs_fnc_invitecount(KviKvsModuleFunctionCall * c) static bool chan_kvs_fnc_ison(KviKvsModuleFunctionCall * c) { - QString szId,szNick; + TQString szId,szNick; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("nickname",KVS_PT_NONEMPTYSTRING,0,szNick) KVSM_PARAMETER("window id",KVS_PT_STRING,KVS_PF_OPTIONAL,szId) @@ -634,7 +634,7 @@ static bool chan_kvs_fnc_ison(KviKvsModuleFunctionCall * c) static bool chan_kvs_fnc_getflag(KviKvsModuleFunctionCall * c) { - QString szId,szNick; + TQString szId,szNick; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("nickname",KVS_PT_NONEMPTYSTRING,0,szNick) KVSM_PARAMETER("window id",KVS_PT_STRING,KVS_PF_OPTIONAL,szId) @@ -642,10 +642,10 @@ static bool chan_kvs_fnc_getflag(KviKvsModuleFunctionCall * c) KviChannel * ch = chan_kvs_find_channel(c,szId); if(ch) { - QChar cFlag = ch->userListView()->getUserFlag(szNick); - if(cFlag != QChar(0)) + TQChar cFlag = ch->userListView()->getUserFlag(szNick); + if(cFlag != TQChar(0)) { - QString szFlag = cFlag; + TQString szFlag = cFlag; c->returnValue()->setString(szFlag); } else { c->returnValue()->setNothing(); @@ -657,7 +657,7 @@ static bool chan_kvs_fnc_getflag(KviKvsModuleFunctionCall * c) #define IS_KVS_FUNC(__clbkname,__chanfunc) \ static bool __clbkname(KviKvsModuleFunctionCall * c) \ { \ - QString szId,szNick;\ + TQString szId,szNick;\ KVSM_PARAMETERS_BEGIN(c)\ KVSM_PARAMETER("nickname",KVS_PT_NONEMPTYSTRING,0,szNick)\ KVSM_PARAMETER("window id",KVS_PT_STRING,KVS_PF_OPTIONAL,szId)\ @@ -803,7 +803,7 @@ IS_KVS_FUNC(chan_kvs_fnc_isuserop,isUserOp) #define IS_ME_KVS_FUNC(__clbkname,__chanfunc) \ static bool __clbkname(KviKvsModuleFunctionCall * c) \ { \ - QString szId;\ + TQString szId;\ KVSM_PARAMETERS_BEGIN(c)\ KVSM_PARAMETER("window id",KVS_PT_STRING,KVS_PF_OPTIONAL,szId)\ KVSM_PARAMETERS_END(c)\ @@ -934,14 +934,14 @@ IS_ME_KVS_FUNC(chan_kvs_fnc_ismeuserop,isMeUserOp) static bool chan_kvs_fnc_mode(KviKvsModuleFunctionCall * c) { - QString szId; + TQString szId; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("window id",KVS_PT_STRING,KVS_PF_OPTIONAL,szId) KVSM_PARAMETERS_END(c) KviChannel * ch = chan_kvs_find_channel(c,szId); if(ch) { - QString chMode; + TQString chMode; ch->getChannelModeString(chMode); c->returnValue()->setString(chMode); } @@ -970,7 +970,7 @@ static bool chan_kvs_fnc_mode(KviKvsModuleFunctionCall * c) static bool chan_kvs_fnc_key(KviKvsModuleFunctionCall * c) { - QString szId; + TQString szId; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("window id",KVS_PT_STRING,KVS_PF_OPTIONAL,szId) KVSM_PARAMETERS_END(c) @@ -1000,13 +1000,13 @@ static bool chan_kvs_fnc_key(KviKvsModuleFunctionCall * c) static bool chan_kvs_fnc_limit(KviKvsModuleFunctionCall * c) { - QString szId; + TQString szId; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("window id",KVS_PT_STRING,KVS_PF_OPTIONAL,szId) KVSM_PARAMETERS_END(c) KviChannel * ch = chan_kvs_find_channel(c,szId); kvs_int_t limit=0; - QString lim; + TQString lim; if (ch) { if(ch->hasChannelLimit()) @@ -1029,21 +1029,21 @@ static bool chan_kvs_fnc_limit(KviKvsModuleFunctionCall * c) @short: Returns an array of channel user nicknames @syntax: - $chan.users([window_id:string],[mask:string],[flags:string]) + $chan.users([window_id:string],[tqmask:string],[flags:string]) @description: Returns an array of nicknames on the channel specified by [window_id].[br] If [window_id] is empty, the current window is used.[br] If the window designated by [window_id] is not a channel a warning is printed and an empty array is returned.[br] - If [mask] is given, each user is added to the array only - if it matches the [mask].[br] + If [tqmask] is given, each user is added to the array only + if it matches the [tqmask].[br] [flags] may contain a subset of the letters "aovhnmi":[br] "ovhn" are mode flags: the users are added to the array only if they are channel administrators ('a'), operators ('o'), voiced users ('v'), half-operators ('h'), user-operators ('u') or unflagged ('n') users. (Unflagged means not operators, not voiced and not half-operators). If none of the "ovhun" flags are used, KVIrc behaves like all five were passed.[br] - The flag 'm' causes the entire user masks to be added to the + The flag 'm' causes the entire user tqmasks to be added to the array entries, as known by KVIrc at the moment of this function call.[br] - The flag 'i' causes KVIrc to invert the match and add only the users that do NOT match [mask].[br] - Please note that on really large channels this function may be time consuming (especially if [mask] is used): + The flag 'i' causes KVIrc to invert the match and add only the users that do NOT match [tqmask].[br] + Please note that on really large channels this function may be time consuming (especially if [tqmask] is used): use with care.[br] @example: [example] @@ -1069,7 +1069,7 @@ static bool chan_kvs_fnc_limit(KviKvsModuleFunctionCall * c) %test[] = $chan.users(,,o) echo %test[] [comment]# Find all the voiced users that do NOT come from *.edu[/comment] - [comment]# See also their whole mask[/comment] + [comment]# See also their whole tqmask[/comment] %test[] = $chan.users(,*!*@*.edu,vim) echo %test[] [/example] @@ -1078,10 +1078,10 @@ static bool chan_kvs_fnc_limit(KviKvsModuleFunctionCall * c) static bool chan_kvs_fnc_users(KviKvsModuleFunctionCall * c) { - QString szWinId,szMask,szFlags; + TQString szWinId,szMask,szFlags; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("window id",KVS_PT_STRING,KVS_PF_OPTIONAL,szWinId) - KVSM_PARAMETER("mask",KVS_PT_STRING,KVS_PF_OPTIONAL,szMask) + KVSM_PARAMETER("tqmask",KVS_PT_STRING,KVS_PF_OPTIONAL,szMask) KVSM_PARAMETER("flags",KVS_PT_STRING,KVS_PF_OPTIONAL,szFlags) KVSM_PARAMETERS_END(c) @@ -1094,21 +1094,21 @@ static bool chan_kvs_fnc_users(KviKvsModuleFunctionCall * c) KviUserListEntry * e = ch->userListView()->firstItem(); // Thnx Julien :) bool bCheckMask = !szMask.isEmpty(); - bool bOp = szFlags.find('o',false) != -1; - bool bVoice = szFlags.find('v',false) != -1; - bool bHalfOp = szFlags.find('h',false) != -1; - bool bChanAdmins = szFlags.find('a',false) != -1; - bool bUserOp = szFlags.find('u',false) != -1; - bool bNone = szFlags.find('n',false) != -1; + bool bOp = szFlags.tqfind('o',false) != -1; + bool bVoice = szFlags.tqfind('v',false) != -1; + bool bHalfOp = szFlags.tqfind('h',false) != -1; + bool bChanAdmins = szFlags.tqfind('a',false) != -1; + bool bUserOp = szFlags.tqfind('u',false) != -1; + bool bNone = szFlags.tqfind('n',false) != -1; bool bCheckFlags = bOp || bVoice || bHalfOp || bNone || bChanAdmins || bUserOp; - bool bAddMask = szFlags.find('m',false) != -1; + bool bAddMask = szFlags.tqfind('m',false) != -1; int idx = 0; if(bAddMask || bCheckFlags || bCheckMask) { - bool bMaskMustMatch = szFlags.find('i',false) == -1; - KviIrcMask mask(szMask); + bool bMaskMustMatch = szFlags.tqfind('i',false) == -1; + KviIrcMask tqmask(szMask); while(e) { @@ -1116,40 +1116,40 @@ static bool chan_kvs_fnc_users(KviKvsModuleFunctionCall * c) { if(bChanAdmins) { - if(e->flags() & KVI_USERFLAG_CHANADMIN)goto check_mask; + if(e->flags() & KVI_USERFLAG_CHANADMIN)goto check_tqmask; } if(bOp) { - if(e->flags() & KVI_USERFLAG_OP)goto check_mask; + if(e->flags() & KVI_USERFLAG_OP)goto check_tqmask; } if(bVoice) { - if(e->flags() & KVI_USERFLAG_VOICE)goto check_mask; + if(e->flags() & KVI_USERFLAG_VOICE)goto check_tqmask; } if(bHalfOp) { - if(e->flags() & KVI_USERFLAG_HALFOP)goto check_mask; + if(e->flags() & KVI_USERFLAG_HALFOP)goto check_tqmask; } if(bUserOp) { - if(e->flags() & KVI_USERFLAG_USEROP)goto check_mask; + if(e->flags() & KVI_USERFLAG_USEROP)goto check_tqmask; } if(bNone) { - if(!(e->flags() & KVI_USERFLAG_MASK))goto check_mask; + if(!(e->flags() & KVI_USERFLAG_MASK))goto check_tqmask; } goto next_item; } -check_mask: +check_tqmask: if(bCheckMask) { - if(mask.matchesFixed(e->nick(),e->globalData()->user(),e->globalData()->host()) == bMaskMustMatch)goto add_item; + if(tqmask.matchesFixed(e->nick(),e->globalData()->user(),e->globalData()->host()) == bMaskMustMatch)goto add_item; goto next_item; } add_item: if(bAddMask) { - QString x(e->nick()); + TQString x(e->nick()); x.append('!'); x.append(e->globalData()->user()); x.append('@'); @@ -1182,18 +1182,18 @@ next_item: @title: $chan.banlist @short: - Returns an array of channel ban masks + Returns an array of channel ban tqmasks @syntax: $chan.banlist([window_id]) @description: - Returns an array of ban masks set ont the channel identified by [window_id].[br] + Returns an array of ban tqmasks set ont the channel identified by [window_id].[br] If [window_id] is empty, the current window is used.[br] If the window designated by [window_id] is not a channel a warning is printed and an empty array is returned.[br] */ static bool chan_kvs_fnc_banlist(KviKvsModuleFunctionCall * c) { - QString szWinId,szMask,szFlags; + TQString szWinId,szMask,szFlags; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("window id",KVS_PT_STRING,KVS_PF_OPTIONAL,szWinId) KVSM_PARAMETERS_END(c) @@ -1225,18 +1225,18 @@ static bool chan_kvs_fnc_banlist(KviKvsModuleFunctionCall * c) @title: $chan.banexceptionlist @short: - Returns an array of channel ban exception masks + Returns an array of channel ban exception tqmasks @syntax: $chan.banexceptionlist([window_id]) @description: - Returns an array of ban exception masks set ont the channel identified by [window_id].[br] + Returns an array of ban exception tqmasks set ont the channel identified by [window_id].[br] If [window_id] is empty, the current window is used.[br] If the window designated by [window_id] is not a channel a warning is printed and an empty array is returned.[br] */ static bool chan_kvs_fnc_banexceptionlist(KviKvsModuleFunctionCall * c) { - QString szWinId,szMask,szFlags; + TQString szWinId,szMask,szFlags; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("window id",KVS_PT_STRING,KVS_PF_OPTIONAL,szWinId) KVSM_PARAMETERS_END(c) @@ -1268,18 +1268,18 @@ static bool chan_kvs_fnc_banexceptionlist(KviKvsModuleFunctionCall * c) @title: $chan.invitelist @short: - Returns an array of channel invite masks + Returns an array of channel invite tqmasks @syntax: $chan.banexceptionlist([window_id]) @description: - Returns an array of invite masks set ont the channel identified by [window_id].[br] + Returns an array of invite tqmasks set ont the channel identified by [window_id].[br] If [window_id] is empty, the current window is used.[br] If the window designated by [window_id] is not a channel a warning is printed and an empty array is returned.[br] */ static bool chan_kvs_fnc_invitelist(KviKvsModuleFunctionCall * c) { - QString szWinId,szMask,szFlags; + TQString szWinId,szMask,szFlags; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("window id",KVS_PT_STRING,KVS_PF_OPTIONAL,szWinId) KVSM_PARAMETERS_END(c) @@ -1311,12 +1311,12 @@ static bool chan_kvs_fnc_invitelist(KviKvsModuleFunctionCall * c) @title: $chan.matchban @short: - Matches a mask agains the channel ban list + Matches a tqmask agains the channel ban list @syntax: - $chan.matchban([window_id],) + $chan.matchban([window_id],) @description: - Returns the ban mask that matches on channel identified by [window_id].[br] - If no ban mask matches an empty string is returned.[br] + Returns the ban tqmask that matches on channel identified by [window_id].[br] + If no ban tqmask matches an empty string is returned.[br] If [window_id] is empty, the current window is used.[br] If the window designated by [window_id] is not a channel a warning is printed and an empty string is returned.[br] This function is useful to determine if a ban set on the channel matches an user.[br] @@ -1324,10 +1324,10 @@ static bool chan_kvs_fnc_invitelist(KviKvsModuleFunctionCall * c) static bool chan_kvs_fnc_matchban(KviKvsModuleFunctionCall * c) { - QString szWinId,szMask; + TQString szWinId,szMask; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("window id",KVS_PT_STRING,0,szWinId) - KVSM_PARAMETER("mask",KVS_PT_STRING,0,szMask) + KVSM_PARAMETER("tqmask",KVS_PT_STRING,0,szMask) KVSM_PARAMETERS_END(c) KviChannel * ch = chan_kvs_find_channel(c,szWinId); @@ -1342,7 +1342,7 @@ static bool chan_kvs_fnc_matchban(KviKvsModuleFunctionCall * c) for(KviMaskEntry * e = l->first();e;e = l->next()) { - if(KviQString::matchStringCI(e->szMask,szMask)) + if(KviTQString::matchStringCI(e->szMask,szMask)) { c->returnValue()->setString(e->szMask); return true; @@ -1360,12 +1360,12 @@ static bool chan_kvs_fnc_matchban(KviKvsModuleFunctionCall * c) @title: $chan.matchbanexception @short: - Matches a mask agains the channel ban exception list + Matches a tqmask agains the channel ban exception list @syntax: - $chan.matchbanexception([window_id],) + $chan.matchbanexception([window_id],) @description: - Returns the ban exception mask that matches on channel identified by [window_id].[br] - If no ban exception mask matches an empty string is returned.[br] + Returns the ban exception tqmask that matches on channel identified by [window_id].[br] + If no ban exception tqmask matches an empty string is returned.[br] If [window_id] is empty, the current window is used.[br] If the window designated by [window_id] is not a channel a warning is printed and an empty string is returned.[br] This function is useful to determine if a ban exception set on the channel matches an user.[br] @@ -1373,10 +1373,10 @@ static bool chan_kvs_fnc_matchban(KviKvsModuleFunctionCall * c) static bool chan_kvs_fnc_matchbanexception(KviKvsModuleFunctionCall * c) { - QString szWinId,szMask; + TQString szWinId,szMask; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("window id",KVS_PT_STRING,0,szWinId) - KVSM_PARAMETER("mask",KVS_PT_STRING,0,szMask) + KVSM_PARAMETER("tqmask",KVS_PT_STRING,0,szMask) KVSM_PARAMETERS_END(c) KviChannel * ch = chan_kvs_find_channel(c,szWinId); @@ -1391,7 +1391,7 @@ static bool chan_kvs_fnc_matchbanexception(KviKvsModuleFunctionCall * c) for(KviMaskEntry * e = l->first();e;e = l->next()) { - if(KviQString::matchStringCI(e->szMask,szMask)) + if(KviTQString::matchStringCI(e->szMask,szMask)) { c->returnValue()->setString(e->szMask); return true; @@ -1409,12 +1409,12 @@ static bool chan_kvs_fnc_matchbanexception(KviKvsModuleFunctionCall * c) @title: $chan.matchinvite @short: - Matches a mask agains the channel invite list + Matches a tqmask agains the channel invite list @syntax: - $chan.matchinvite([window_id:string],) + $chan.matchinvite([window_id:string],) @description: - Returns the invite mask that matches on channel identified by [window_id].[br] - If no invite mask matches an empty string is returned.[br] + Returns the invite tqmask that matches on channel identified by [window_id].[br] + If no invite tqmask matches an empty string is returned.[br] If [window_id] is empty, the current window is used.[br] If the window designated by [window_id] is not a channel a warning is printed and an empty string is returned.[br] This function is useful to determine if a invite set on the channel matches an user.[br] @@ -1422,10 +1422,10 @@ static bool chan_kvs_fnc_matchbanexception(KviKvsModuleFunctionCall * c) static bool chan_kvs_fnc_matchinvite(KviKvsModuleFunctionCall * c) { - QString szWinId,szMask; + TQString szWinId,szMask; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("window id",KVS_PT_STRING,0,szWinId) - KVSM_PARAMETER("mask",KVS_PT_STRING,0,szMask) + KVSM_PARAMETER("tqmask",KVS_PT_STRING,0,szMask) KVSM_PARAMETERS_END(c) KviChannel * ch = chan_kvs_find_channel(c,szWinId); @@ -1440,7 +1440,7 @@ static bool chan_kvs_fnc_matchinvite(KviKvsModuleFunctionCall * c) for(KviMaskEntry * e = l->first();e;e = l->next()) { - if(KviQString::matchStringCI(e->szMask,szMask)) + if(KviTQString::matchStringCI(e->szMask,szMask)) { c->returnValue()->setString(e->szMask); return true; @@ -1479,7 +1479,7 @@ static bool chan_kvs_fnc_matchinvite(KviKvsModuleFunctionCall * c) static bool chan_kvs_fnc_usermodelevel(KviKvsModuleFunctionCall * c) { - QString szNick,szWinId; + TQString szNick,szWinId; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("nickname",KVS_PT_STRING,0,szNick) KVSM_PARAMETER("window id",KVS_PT_STRING,KVS_PF_OPTIONAL,szWinId) @@ -1515,7 +1515,7 @@ static bool chan_kvs_fnc_usermodelevel(KviKvsModuleFunctionCall * c) static bool chan_kvs_fnc_userjointime(KviKvsModuleFunctionCall * c) { - QString szNick,szWinId; + TQString szNick,szWinId; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("nickname",KVS_PT_STRING,0,szNick) KVSM_PARAMETER("window id",KVS_PT_STRING,KVS_PF_OPTIONAL,szWinId) @@ -1552,7 +1552,7 @@ static bool chan_kvs_fnc_userjointime(KviKvsModuleFunctionCall * c) static bool chan_kvs_fnc_userlastactiontime(KviKvsModuleFunctionCall * c) { - QString szNick,szWinId; + TQString szNick,szWinId; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("nickname",KVS_PT_STRING,0,szNick) KVSM_PARAMETER("window id",KVS_PT_STRING,KVS_PF_OPTIONAL,szWinId) diff --git a/src/modules/channelsjoin/channelsjoinwindow.cpp b/src/modules/channelsjoin/channelsjoinwindow.cpp index 5f73b55e..b05bb5a7 100644 --- a/src/modules/channelsjoin/channelsjoinwindow.cpp +++ b/src/modules/channelsjoin/channelsjoinwindow.cpp @@ -35,71 +35,71 @@ #include "kvi_regchan.h" #include "kvi_kvs_script.h" -#include -#include +#include +#include #include "kvi_tal_listview.h" #include -#include -#include -#include +#include +#include +#include #ifdef COMPILE_USE_QT4 - #include + #include #else - #include + #include #endif -#include +#include extern KviChannelsJoinWindow * g_pChannelsWindow; -extern QRect g_rectChannelsJoinGeometry; +extern TQRect g_rectChannelsJoinGeometry; // kvi_app.cpp extern KVIRC_API KviRegisteredChannelDataBase * g_pRegisteredChannelDataBase; -KviChannelsJoinWindow::KviChannelsJoinWindow(QWidget * par, const char * name) -: QDialog(par,name) +KviChannelsJoinWindow::KviChannelsJoinWindow(TQWidget * par, const char * name) +: TQDialog(par,name) { m_pConsole=0; setCaption(__tr2qs("Join Channels")); setIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_CHANNEL))); - QGridLayout * g = new QGridLayout(this,4,2,4,8); + TQGridLayout * g = new TQGridLayout(this,4,2,4,8); m_pListView = new KviTalListView(this); m_pListView->addColumn(__tr2qs("Channel")); m_pListView->setRootIsDecorated(true); m_pListView->setSelectionMode(KviTalListView::Single); g->addMultiCellWidget(m_pListView,0,0,0,1); - connect(m_pListView,SIGNAL(clicked(KviTalListViewItem *)),this,SLOT(itemClicked(KviTalListViewItem *))); - connect(m_pListView,SIGNAL(doubleClicked(KviTalListViewItem *)),this,SLOT(itemDoubleClicked(KviTalListViewItem *))); + connect(m_pListView,TQT_SIGNAL(clicked(KviTalListViewItem *)),this,TQT_SLOT(itemClicked(KviTalListViewItem *))); + connect(m_pListView,TQT_SIGNAL(doubleClicked(KviTalListViewItem *)),this,TQT_SLOT(itemDoubleClicked(KviTalListViewItem *))); m_pGroupBox = new KviTalGroupBox(2,Qt::Horizontal,__tr2qs("Channel" ),this); - QString szMsg = __tr2qs("Name"); + TQString szMsg = __tr2qs("Name"); szMsg.append(":"); - QLabel * l = new QLabel(szMsg,m_pGroupBox); + TQLabel * l = new TQLabel(szMsg,m_pGroupBox); - m_pChannelEdit = new QLineEdit(m_pGroupBox); - connect(m_pChannelEdit,SIGNAL(returnPressed()), this, SLOT(editReturnPressed())); - connect(m_pChannelEdit,SIGNAL(textChanged(const QString &)),this,SLOT(editTextChanged(const QString &))); + m_pChannelEdit = new TQLineEdit(m_pGroupBox); + connect(m_pChannelEdit,TQT_SIGNAL(returnPressed()), this, TQT_SLOT(editReturnPressed())); + connect(m_pChannelEdit,TQT_SIGNAL(textChanged(const TQString &)),this,TQT_SLOT(editTextChanged(const TQString &))); szMsg = __tr2qs("Password"); szMsg.append(":"); - l = new QLabel(szMsg,m_pGroupBox); + l = new TQLabel(szMsg,m_pGroupBox); - m_pPass = new QLineEdit(m_pGroupBox); - m_pPass->setEchoMode(QLineEdit::Password); + m_pPass = new TQLineEdit(m_pGroupBox); + m_pPass->setEchoMode(TQLineEdit::Password); g->addMultiCellWidget(m_pGroupBox,1,1,0,1); - m_pJoinButton = new QPushButton(__tr2qs("&Join"),this); + m_pJoinButton = new TQPushButton(__tr2qs("&Join"),this); // Join on return pressed m_pJoinButton->setDefault(true); - connect(m_pJoinButton,SIGNAL(clicked()),this,SLOT(joinClicked())); + connect(m_pJoinButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(joinClicked())); #ifdef COMPILE_USE_QT4 - g->addMultiCellWidget(m_pJoinButton,2,2,0,1,Qt::AlignHCenter); + g->addMultiCellWidget(m_pJoinButton,2,2,0,1,TQt::AlignHCenter); #else g->addMultiCellWidget(m_pJoinButton,2,2,0,1,AlignHCenter); #endif @@ -110,8 +110,8 @@ KviChannelsJoinWindow::KviChannelsJoinWindow(QWidget * par, const char * name) g->addWidget(m_pShowAtStartupCheck,3,0); - QPushButton * cancelButton = new QPushButton(__tr2qs("Close"),this); - connect(cancelButton,SIGNAL(clicked()),this,SLOT(cancelClicked())); + TQPushButton * cancelButton = new TQPushButton(__tr2qs("Close"),this); + connect(cancelButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(cancelClicked())); g->addWidget(cancelButton,3,1); @@ -119,10 +119,10 @@ KviChannelsJoinWindow::KviChannelsJoinWindow(QWidget * par, const char * name) KviTalHBox * hb = new KviTalHBox(this); hb->setSpacing(4); - QPushButton * namesButton = new QPushButton("/names", hb); - connect(namesButton,SIGNAL(clicked()),this,SLOT(namesClicked())); - QPushButton * whoButton = new QPushButton("/who", hb); - connect(whoButton,SIGNAL(clicked()),this,SLOT(whoClicked())); + TQPushButton * namesButton = new TQPushButton("/names", hb); + connect(namesButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(namesClicked())); + TQPushButton * whoButton = new TQPushButton("/who", hb); + connect(whoButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(whoClicked())); g->addWidget(hb,2,0); */ @@ -144,7 +144,7 @@ KviChannelsJoinWindow::~KviChannelsJoinWindow() { KVI_OPTION_BOOL(KviOption_boolShowChannelsJoinOnIrc) = m_pShowAtStartupCheck->isChecked(); - g_rectChannelsJoinGeometry = QRect(pos().x(),pos().y(),size().width(),size().height()); + g_rectChannelsJoinGeometry = TQRect(pos().x(),pos().y(),size().width(),size().height()); g_pChannelsWindow = 0; } @@ -167,10 +167,10 @@ void KviChannelsJoinWindow::fillListView() if(m_pConsole) { - QStringList* pList=g_pApp->getRecentChannels(m_pConsole->currentNetworkName()); + TQStringList* pList=g_pApp->getRecentChannels(m_pConsole->currentNetworkName()); if(pList) { - for(QStringList::Iterator it = pList->begin(); it != pList->end(); ++it) + for(TQStringList::Iterator it = pList->begin(); it != pList->end(); ++it) { chld = new KviTalListViewItem(par,*it); chld->setPixmap(0,*(g_pIconManager->getSmallIcon(KVI_SMALLICON_CHANNEL))); @@ -200,7 +200,7 @@ void KviChannelsJoinWindow::fillListView() void KviChannelsJoinWindow::itemClicked(KviTalListViewItem * it) { if(!it)return; - if(!it->parent())return; + if(!it->tqparent())return; KviStr tmp = it->text(0); m_pChannelEdit->setText(tmp.ptr()); enableJoin(); @@ -209,7 +209,7 @@ void KviChannelsJoinWindow::itemClicked(KviTalListViewItem * it) void KviChannelsJoinWindow::itemDoubleClicked(KviTalListViewItem * it) { if(!it)return; - if(!it->parent())return; + if(!it->tqparent())return; KviStr tmp = it->text(0); m_pChannelEdit->setText(tmp.ptr()); enableJoin(); @@ -217,7 +217,7 @@ void KviChannelsJoinWindow::itemDoubleClicked(KviTalListViewItem * it) } -void KviChannelsJoinWindow::editTextChanged(const QString &) +void KviChannelsJoinWindow::editTextChanged(const TQString &) { enableJoin(); } @@ -292,7 +292,7 @@ void KviChannelsJoinWindow::editReturnPressed() joinClicked(); } -void KviChannelsJoinWindow::closeEvent(QCloseEvent *e) +void KviChannelsJoinWindow::closeEvent(TQCloseEvent *e) { e->ignore(); delete this; diff --git a/src/modules/channelsjoin/channelsjoinwindow.h b/src/modules/channelsjoin/channelsjoinwindow.h index d0ce62a9..7e6abf5b 100644 --- a/src/modules/channelsjoin/channelsjoinwindow.h +++ b/src/modules/channelsjoin/channelsjoinwindow.h @@ -26,38 +26,39 @@ #include "kvi_window.h" #include "kvi_string.h" -#include +#include class KviConsole; class KviTalGroupBox; -class QPushButton; -class QLineEdit; +class TQPushButton; +class TQLineEdit; #include "kvi_styled_controls.h" #include "kvi_tal_listview.h" -class KviChannelsJoinWindow : public QDialog +class KviChannelsJoinWindow : public TQDialog { Q_OBJECT + TQ_OBJECT public: - KviChannelsJoinWindow(QWidget * par, const char * name); + KviChannelsJoinWindow(TQWidget * par, const char * name); ~KviChannelsJoinWindow(); protected: - QLineEdit * m_pChannelEdit; + TQLineEdit * m_pChannelEdit; KviTalListView * m_pListView; KviTalGroupBox * m_pGroupBox; - QLineEdit * m_pPass; + TQLineEdit * m_pPass; KviStyledCheckBox * m_pShowAtStartupCheck; KviStyledCheckBox * m_pCloseAfterJoinCheck; - QPushButton * m_pJoinButton; + TQPushButton * m_pJoinButton; KviConsole * m_pConsole; public: - virtual void closeEvent(QCloseEvent *e); + virtual void closeEvent(TQCloseEvent *e); void fillListView(); void enableJoin(); void setConsole(KviConsole * pConsole); protected slots: - void editTextChanged(const QString &); + void editTextChanged(const TQString &); void itemClicked(KviTalListViewItem *it); void itemDoubleClicked(KviTalListViewItem *it); void editReturnPressed(); diff --git a/src/modules/channelsjoin/libkvichannelsjoin.cpp b/src/modules/channelsjoin/libkvichannelsjoin.cpp index a2936e8e..2cb992da 100644 --- a/src/modules/channelsjoin/libkvichannelsjoin.cpp +++ b/src/modules/channelsjoin/libkvichannelsjoin.cpp @@ -30,10 +30,10 @@ #include "kvi_locale.h" #include "kvi_config.h" -#include +#include KviChannelsJoinWindow * g_pChannelsWindow = 0; -QRect g_rectChannelsJoinGeometry; +TQRect g_rectChannelsJoinGeometry; /* @doc: channelsjoin.open @@ -68,11 +68,11 @@ static bool channelsjoin_kvs_cmd_open(KviKvsModuleCommandCall * c) static bool channelsjoin_module_init(KviModule * m) { - QString fName; + TQString fName; m->getDefaultConfigFileName(fName); KviConfig cfg(fName,KviConfig::Read); - g_rectChannelsJoinGeometry = cfg.readRectEntry("geometry",QRect(30,30,320,410)); + g_rectChannelsJoinGeometry = cfg.readRectEntry("geometry",TQRect(30,30,320,410)); KVSM_REGISTER_SIMPLE_COMMAND(m,"open",channelsjoin_kvs_cmd_open); return true; @@ -80,7 +80,7 @@ static bool channelsjoin_module_init(KviModule * m) static bool channelsjoin_module_cleanup(KviModule *m) { - QString fName; + TQString fName; m->getDefaultConfigFileName(fName); KviConfig cfg(fName,KviConfig::Write); diff --git a/src/modules/clock/libkviclock.cpp b/src/modules/clock/libkviclock.cpp index 03757b0d..1b731219 100644 --- a/src/modules/clock/libkviclock.cpp +++ b/src/modules/clock/libkviclock.cpp @@ -29,9 +29,9 @@ #include "kvi_locale.h" #include "kvi_pointerlist.h" -#include -#include -#include +#include +#include +#include @@ -42,7 +42,7 @@ #if 0 -#warning "Change this XPM to bitmap bits! (And thus use the QBitmap(w,h,bits) constructor)" +#warning "Change this XPM to bitmap bits! (And thus use the TQBitmap(w,h,bits) constructor)" #warning "Support GMT , LOCAL , DATE , ALARM..." /* XPM */ @@ -81,13 +81,13 @@ static const char * kvi_clock_digits_xpm[] = { // kvi_app.cpp //extern Display * g_display; //extern GC g_iccGC; -extern QPixmap * g_pIccMemBuffer; +extern TQPixmap * g_pIccMemBuffer; //extern HANDLE g_hIccMemBuffer; static KviPointerList * g_pClockWidgetList; -static QBitmap * g_pClockBitmap = 0; +static TQBitmap * g_pClockBitmap = 0; KviClockDisplay::KviClockDisplay(KviIrcToolBarAppletContainer * pContainer) @@ -108,7 +108,7 @@ KviClockDisplay::~KviClockDisplay() g_pClockWidgetList->removeRef(this); } -void KviClockDisplay::timerEvent(QTimerEvent *e) +void KviClockDisplay::timerEvent(TQTimerEvent *e) { time_t t = time(0); struct tm * pTm = gmtime(&t); @@ -125,7 +125,7 @@ void KviClockDisplay::timerEvent(QTimerEvent *e) -void KviClockDisplay::drawContents(QPainter *p) +void KviClockDisplay::drawContents(TQPainter *p) { //XSetLineAttributes(g_display,g_iccGC,1,LineSolid,CapButt,JoinMiter); //need this for line size @@ -144,7 +144,7 @@ void KviClockDisplay::drawContents(QPainter *p) p->setBrushOrigin(- 180 + _x,LOW_ROW_Y); \ p->fillRect(_x,LOW_ROW_Y,9,18,_br); - QBrush br1(KVI_OPTION_COLOR(KviOption_colorIrcToolBarAppletForegroundLowContrast),*g_pClockBitmap); + TQBrush br1(KVI_OPTION_COLOR(KviOption_colorIrcToolBarAppletForegroundLowContrast),*g_pClockBitmap); p->setBrushOrigin(- 216,LOW_ROW_Y); p->fillRect(0,LOW_ROW_Y,18,18,br1); @@ -152,7 +152,7 @@ void KviClockDisplay::drawContents(QPainter *p) p->setBrushOrigin(22,LOW_ROW_Y + 2 /*-18 + LOW_ROW_Y + 20 */); p->fillRect(22,LOW_ROW_Y + 20,18 * 5,7,br1); - QBrush br2(KVI_OPTION_COLOR(KviOption_colorIrcToolBarAppletForegroundHighContrastActive1),*g_pClockBitmap); + TQBrush br2(KVI_OPTION_COLOR(KviOption_colorIrcToolBarAppletForegroundHighContrastActive1),*g_pClockBitmap); DRAW_DIGIT(22,0,br2) DRAW_DIGIT(40,1,br2) @@ -169,9 +169,9 @@ void KviClockDisplay::drawContents(QPainter *p) } -QSize KviClockDisplay::sizeHint() const +TQSize KviClockDisplay::tqsizeHint() const { - return QSize(KVI_IRCTOOLBARAPPLET_MAXIMUM_WIDTH,KVI_IRCTOOLBARAPPLET_MAXIMUM_HEIGHT); + return TQSize(KVI_IRCTOOLBARAPPLET_MAXIMUM_WIDTH,KVI_IRCTOOLBARAPPLET_MAXIMUM_HEIGHT); } @@ -209,8 +209,8 @@ static bool clock_module_cmd_add(KviModule *m,KviCommand *c) static bool clock_module_init(KviModule *m) { #if 0 - g_pClockBitmap = new QBitmap(); - QPixmap pix(kvi_clock_digits_xpm); + g_pClockBitmap = new TQBitmap(); + TQPixmap pix(kvi_clock_digits_xpm); *g_pClockBitmap = pix; g_pClockWidgetList = new KviPointerList; g_pClockWidgetList->setAutoDelete(false); diff --git a/src/modules/clock/libkviclock.h b/src/modules/clock/libkviclock.h index bf4881a6..7c960df7 100644 --- a/src/modules/clock/libkviclock.h +++ b/src/modules/clock/libkviclock.h @@ -30,15 +30,16 @@ class KviClockDisplay : public KviIrcToolBarGraphicalApplet { Q_OBJECT + TQ_OBJECT public: KviClockDisplay(KviIrcToolBarAppletContainer * pContainer); ~KviClockDisplay(); protected: unsigned char m_uDigit[6]; protected: - virtual void drawContents(QPainter * p); - virtual QSize sizeHint() const; - virtual void timerEvent(QTimerEvent *e); + virtual void drawContents(TQPainter * p); + virtual TQSize tqsizeHint() const; + virtual void timerEvent(TQTimerEvent *e); }; #endif diff --git a/src/modules/codetester/codetester.cpp b/src/modules/codetester/codetester.cpp index 69a46abc..a4728959 100644 --- a/src/modules/codetester/codetester.cpp +++ b/src/modules/codetester/codetester.cpp @@ -35,10 +35,10 @@ #include "kvi_kvs_script.h" #include "kvi_kvs_variantlist.h" -#include -#include -#include -#include +#include +#include +#include +#include #include "kvi_tal_popupmenu.h" extern KviPointerList * g_pCodeTesterWindowList; @@ -46,19 +46,19 @@ extern KviPointerList * g_pCodeTesterWindowList; -KviCodeTester::KviCodeTester(QWidget * par) -: QWidget(par,"code_tester") +KviCodeTester::KviCodeTester(TQWidget * par) +: TQWidget(par,"code_tester") { - QGridLayout * g = new QGridLayout(this,2,4,2,2); + TQGridLayout * g = new TQGridLayout(this,2,4,2,2); m_pEditor = KviScriptEditor::createInstance(this); g->addMultiCellWidget(m_pEditor,0,0,0,3); - m_pExecuteButton = new QPushButton(__tr2qs("&Execute"),this); + m_pExecuteButton = new TQPushButton(__tr2qs("&Execute"),this); g->addWidget(m_pExecuteButton,1,3); - connect(m_pExecuteButton,SIGNAL(clicked()),this,SLOT(execute())); + connect(m_pExecuteButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(execute())); - m_pModeLabel = new QLabel(__tr("Params:"),this); + m_pModeLabel = new TQLabel(__tr("Params:"),this); g->addWidget(m_pModeLabel,1,1); - m_pParams = new QLineEdit(this); + m_pParams = new TQLineEdit(this); g->addWidget(m_pParams,1,2); } @@ -71,12 +71,12 @@ KviCodeTester::~KviCodeTester() void KviCodeTester::execute() { - QString parms = m_pParams->text(); - QString buffer; + TQString parms = m_pParams->text(); + TQString buffer; m_pEditor->getText(buffer); KviConsole * con = g_pApp->activeConsole(); //KviParameterList * l = new KviParameterList(parms.ptr()); - KviKvsScript::run(buffer,con,new KviKvsVariantList(new QString(parms))); + KviKvsScript::run(buffer,con,new KviKvsVariantList(new TQString(parms))); } KviCodeTesterWindow::KviCodeTesterWindow(KviFrame * lpFrm) @@ -92,12 +92,12 @@ KviCodeTesterWindow::~KviCodeTesterWindow() g_pCodeTesterWindowList->removeRef(this); } -QPixmap * KviCodeTesterWindow::myIconPtr() +TQPixmap * KviCodeTesterWindow::myIconPtr() { return g_pIconManager->getSmallIcon(KVI_SMALLICON_BOMB); } -void KviCodeTesterWindow::resizeEvent(QResizeEvent *e) +void KviCodeTesterWindow::resizeEvent(TQResizeEvent *e) { m_pTester->setGeometry(0,0,width(),height()); } @@ -106,9 +106,9 @@ void KviCodeTesterWindow::fillCaptionBuffers() { m_szPlainTextCaption = __tr2qs("Script Tester"); - static QString p1(""); - static QString p3(""); + static TQString p1(""); + static TQString p3(""); m_szHtmlActiveCaption = p1; m_szHtmlActiveCaption += KVI_OPTION_COLOR(KviOption_colorCaptionTextActive).name(); @@ -145,7 +145,7 @@ void KviCodeTesterWindow::loadProperties(KviConfig *cfg) { /* #ifdef COMPILE_SCRIPTTOOLBAR - QValueList def; + TQValueList def; def.append(20); def.append(80); m_pEditor->setSizes(cfg->readIntListEntry("Sizes",def)); diff --git a/src/modules/codetester/codetester.h b/src/modules/codetester/codetester.h index ce24ca5d..3b9556f1 100644 --- a/src/modules/codetester/codetester.h +++ b/src/modules/codetester/codetester.h @@ -25,24 +25,25 @@ #include "kvi_window.h" #include "kvi_string.h" -#include +#include -class QPushButton; -class QLabel; +class TQPushButton; +class TQLabel; class KviScriptEditor; -class KviCodeTester : public QWidget +class KviCodeTester : public TQWidget { Q_OBJECT + TQ_OBJECT public: - KviCodeTester(QWidget * par); + KviCodeTester(TQWidget * par); ~KviCodeTester(); private: KviScriptEditor * m_pEditor; - QLineEdit * m_pParams; - QPushButton * m_pExecuteButton; - QLabel * m_pModeLabel; + TQLineEdit * m_pParams; + TQPushButton * m_pExecuteButton; + TQLabel * m_pModeLabel; private slots: void execute(); }; @@ -50,15 +51,16 @@ private slots: class KviCodeTesterWindow : public KviWindow { Q_OBJECT + TQ_OBJECT public: KviCodeTesterWindow(KviFrame * lpFrm); ~KviCodeTesterWindow(); protected: KviCodeTester * m_pTester; protected: - virtual QPixmap * myIconPtr(); + virtual TQPixmap * myIconPtr(); virtual void fillCaptionBuffers(); - virtual void resizeEvent(QResizeEvent *e); + virtual void resizeEvent(TQResizeEvent *e); virtual void getConfigGroupName(KviStr &szName); virtual void saveProperties(KviConfig *); virtual void loadProperties(KviConfig *); diff --git a/src/modules/config/libkviconfig.cpp b/src/modules/config/libkviconfig.cpp index 854c321b..348dbe8f 100644 --- a/src/modules/config/libkviconfig.cpp +++ b/src/modules/config/libkviconfig.cpp @@ -31,7 +31,7 @@ #include "kvi_pointerhashtable.h" -static KviPointerHashTable * g_pConfigDict = 0; +static KviPointerHashTable * g_pConfigDict = 0; static int g_iNextConfigId = 0; /* @@ -82,8 +82,8 @@ static int g_iNextConfigId = 0; static bool config_kvs_fnc_open(KviKvsModuleFunctionCall * c) { - QString szFile; - QString szMode; + TQString szFile; + TQString szMode; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("filename",KVS_PT_STRING,0,szFile) @@ -92,25 +92,25 @@ static bool config_kvs_fnc_open(KviKvsModuleFunctionCall * c) KviConfig::FileMode fileMode; - if(szMode.contains('r')) + if(szMode.tqcontains('r')) { - if(szMode.contains('w'))fileMode = KviConfig::ReadWrite; + if(szMode.tqcontains('w'))fileMode = KviConfig::ReadWrite; else fileMode = KviConfig::Read; } else { - if(szMode.contains('w'))fileMode = KviConfig::Write; + if(szMode.tqcontains('w'))fileMode = KviConfig::Write; else fileMode = KviConfig::ReadWrite; } KviFileUtils::adjustFilePath(szFile); - QString szAbsFile; + TQString szAbsFile; if(KviFileUtils::isAbsolutePath(szFile))szAbsFile = szFile; else g_pApp->getLocalKvircDirectory(szAbsFile,KviApp::ConfigScripts,szFile,true); - KviPointerHashTableIterator it(*g_pConfigDict); + KviPointerHashTableIterator it(*g_pConfigDict); while(it.current()) { - if(KviQString::equalCI(it.current()->fileName(),szAbsFile)) + if(KviTQString::equalCI(it.current()->fileName(),szAbsFile)) { c->returnValue()->setString(it.currentKey()); if(it.current()->readOnly() && (fileMode & KviConfig::Write)) @@ -124,7 +124,7 @@ static bool config_kvs_fnc_open(KviKvsModuleFunctionCall * c) KviConfig * cfg = new KviConfig(szAbsFile,fileMode); g_iNextConfigId++; - QString tmp = QString("%1").arg(g_iNextConfigId); + TQString tmp = TQString("%1").tqarg(g_iNextConfigId); g_pConfigDict->insert(tmp,cfg); c->returnValue()->setString(tmp); return true; @@ -150,7 +150,7 @@ static bool config_kvs_fnc_open(KviKvsModuleFunctionCall * c) static bool config_kvs_fnc_id(KviKvsModuleFunctionCall * c) { - QString szFile; + TQString szFile; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("file",KVS_PT_STRING,0,szFile) @@ -158,15 +158,15 @@ static bool config_kvs_fnc_id(KviKvsModuleFunctionCall * c) KviFileUtils::adjustFilePath(szFile); - QString szAbsFile; + TQString szAbsFile; if(KviFileUtils::isAbsolutePath(szFile))szAbsFile = szFile; else g_pApp->getLocalKvircDirectory(szAbsFile,KviApp::ConfigScripts,szFile,true); - KviPointerHashTableIterator it(*g_pConfigDict); + KviPointerHashTableIterator it(*g_pConfigDict); while(it.current()) { - if(KviQString::equalCI(it.current()->fileName(),szAbsFile)) + if(KviTQString::equalCI(it.current()->fileName(),szAbsFile)) { c->returnValue()->setString(it.currentKey()); return true; @@ -201,9 +201,9 @@ static bool config_kvs_fnc_id(KviKvsModuleFunctionCall * c) static bool config_kvs_fnc_read(KviKvsModuleFunctionCall * c) { - QString szId; - QString szKey; - QString szDefault; + TQString szId; + TQString szKey; + TQString szDefault; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("id",KVS_PT_STRING,0,szId) @@ -211,7 +211,7 @@ static bool config_kvs_fnc_read(KviKvsModuleFunctionCall * c) KVSM_PARAMETER("default",KVS_PT_STRING,KVS_PF_OPTIONAL,szDefault) KVSM_PARAMETERS_END(c) - KviConfig * cfg = g_pConfigDict->find(szId); + KviConfig * cfg = g_pConfigDict->tqfind(szId); if(cfg) { @@ -241,13 +241,13 @@ static bool config_kvs_fnc_read(KviKvsModuleFunctionCall * c) static bool config_kvs_fnc_section(KviKvsModuleFunctionCall * c) { - QString szId; + TQString szId; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("id",KVS_PT_STRING,0,szId) KVSM_PARAMETERS_END(c) - KviConfig * cfg = g_pConfigDict->find(szId); + KviConfig * cfg = g_pConfigDict->tqfind(szId); if(cfg) { @@ -279,13 +279,13 @@ static bool config_kvs_fnc_section(KviKvsModuleFunctionCall * c) static bool config_kvs_fnc_readonly(KviKvsModuleFunctionCall * c) { - QString szId; + TQString szId; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("id",KVS_PT_STRING,0,szId) KVSM_PARAMETERS_END(c) - KviConfig * cfg = g_pConfigDict->find(szId); + KviConfig * cfg = g_pConfigDict->tqfind(szId); if(cfg) { @@ -317,13 +317,13 @@ static bool config_kvs_fnc_readonly(KviKvsModuleFunctionCall * c) static bool config_kvs_fnc_filename(KviKvsModuleFunctionCall * c) { - QString szId; + TQString szId; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("id",KVS_PT_STRING,0,szId) KVSM_PARAMETERS_END(c) - KviConfig * cfg = g_pConfigDict->find(szId); + KviConfig * cfg = g_pConfigDict->tqfind(szId); if(cfg) { @@ -352,15 +352,15 @@ static bool config_kvs_fnc_filename(KviKvsModuleFunctionCall * c) static bool config_kvs_fnc_hassection(KviKvsModuleFunctionCall * c) { - QString szId; - QString szSect; + TQString szId; + TQString szSect; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("id",KVS_PT_STRING,0,szId) KVSM_PARAMETER("id",KVS_PT_STRING,0,szSect) KVSM_PARAMETERS_END(c) - KviConfig * cfg = g_pConfigDict->find(szId); + KviConfig * cfg = g_pConfigDict->tqfind(szId); if(cfg) { @@ -390,13 +390,13 @@ static bool config_kvs_fnc_hassection(KviKvsModuleFunctionCall * c) static bool config_kvs_fnc_sectionlist(KviKvsModuleFunctionCall * c) { - QString szId; + TQString szId; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("id",KVS_PT_STRING,0,szId) KVSM_PARAMETERS_END(c) - KviConfig * cfg = g_pConfigDict->find(szId); + KviConfig * cfg = g_pConfigDict->tqfind(szId); if(cfg) { @@ -434,17 +434,17 @@ static bool config_kvs_fnc_sectionlist(KviKvsModuleFunctionCall * c) static bool config_kvs_fnc_keylist(KviKvsModuleFunctionCall * c) { - QString szId; + TQString szId; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("id",KVS_PT_STRING,0,szId) KVSM_PARAMETERS_END(c) - KviConfig * cfg = g_pConfigDict->find(szId); + KviConfig * cfg = g_pConfigDict->tqfind(szId); if(cfg) { - KviConfigGroup * d = cfg->dict()->find(cfg->group()); + KviConfigGroup * d = cfg->dict()->tqfind(cfg->group()); if(!d)return true; KviConfigGroupIterator it(*d); @@ -488,7 +488,7 @@ static bool config_kvs_fnc_filelist(KviKvsModuleFunctionCall * c) KviKvsArray* pArray = new KviKvsArray(); int id=0; - KviPointerHashTableIterator it(*g_pConfigDict); + KviPointerHashTableIterator it(*g_pConfigDict); while(it.current()) { pArray->set(id++, new KviKvsVariant(it.currentKey())); @@ -523,12 +523,12 @@ static bool config_kvs_fnc_filelist(KviKvsModuleFunctionCall * c) static bool config_kvs_cmd_close(KviKvsModuleCommandCall * c) { - QString szId; + TQString szId; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("id",KVS_PT_STRING,0,szId) KVSM_PARAMETERS_END(c) - KviConfig * cfg = g_pConfigDict->find(szId); + KviConfig * cfg = g_pConfigDict->tqfind(szId); if(cfg) { @@ -570,12 +570,12 @@ static bool config_kvs_cmd_close(KviKvsModuleCommandCall * c) static bool config_kvs_cmd_flush(KviKvsModuleCommandCall * c) { - QString szId; + TQString szId; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("id",KVS_PT_STRING,0,szId) KVSM_PARAMETERS_END(c) - KviConfig * cfg = g_pConfigDict->find(szId); + KviConfig * cfg = g_pConfigDict->tqfind(szId); if(cfg) { @@ -614,12 +614,12 @@ static bool config_kvs_cmd_flush(KviKvsModuleCommandCall * c) static bool config_kvs_cmd_clear(KviKvsModuleCommandCall * c) { - QString szId; + TQString szId; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("id",KVS_PT_STRING,0,szId) KVSM_PARAMETERS_END(c) - KviConfig * cfg = g_pConfigDict->find(szId); + KviConfig * cfg = g_pConfigDict->tqfind(szId); if(cfg) { @@ -656,14 +656,14 @@ static bool config_kvs_cmd_clear(KviKvsModuleCommandCall * c) static bool config_kvs_cmd_clearsection(KviKvsModuleCommandCall * c) { - QString szId; - QString szSect; + TQString szId; + TQString szSect; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("id",KVS_PT_STRING,0,szId) KVSM_PARAMETER("section",KVS_PT_STRING,0,szSect) KVSM_PARAMETERS_END(c) - KviConfig * cfg = g_pConfigDict->find(szId); + KviConfig * cfg = g_pConfigDict->tqfind(szId); if(cfg) { @@ -703,9 +703,9 @@ static bool config_kvs_cmd_clearsection(KviKvsModuleCommandCall * c) static bool config_kvs_cmd_write(KviKvsModuleCommandCall * c) { - QString szId; - QString szKey; - QString szVal; + TQString szId; + TQString szKey; + TQString szVal; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("id",KVS_PT_STRING,0,szId) @@ -713,7 +713,7 @@ static bool config_kvs_cmd_write(KviKvsModuleCommandCall * c) KVSM_PARAMETER("value",KVS_PT_STRING,0,szVal) KVSM_PARAMETERS_END(c) - KviConfig * cfg = g_pConfigDict->find(szId); + KviConfig * cfg = g_pConfigDict->tqfind(szId); if(cfg) { @@ -748,15 +748,15 @@ static bool config_kvs_cmd_write(KviKvsModuleCommandCall * c) static bool config_kvs_cmd_setsection(KviKvsModuleCommandCall * c) { - QString szId; - QString szSect; + TQString szId; + TQString szSect; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("id",KVS_PT_STRING,0,szId) KVSM_PARAMETER("section",KVS_PT_STRING,0,szSect) KVSM_PARAMETERS_END(c) - KviConfig * cfg = g_pConfigDict->find(szId); + KviConfig * cfg = g_pConfigDict->tqfind(szId); if(cfg) { @@ -829,7 +829,7 @@ static bool config_kvs_cmd_setsection(KviKvsModuleCommandCall * c) static bool config_module_init(KviModule * m) { - g_pConfigDict = new KviPointerHashTable; + g_pConfigDict = new KviPointerHashTable; g_pConfigDict->setAutoDelete(true); KVSM_REGISTER_FUNCTION(m,"open",config_kvs_fnc_open); diff --git a/src/modules/context/libkvicontext.cpp b/src/modules/context/libkvicontext.cpp index a6a3bb97..3321350b 100644 --- a/src/modules/context/libkvicontext.cpp +++ b/src/modules/context/libkvicontext.cpp @@ -306,19 +306,19 @@ static bool context_kvs_fnc_state(KviKvsModuleFunctionCall * c) switch(pConsole->ircContext()->state()) { case KviIrcContext::Idle: - c->returnValue()->setString(QString("idle")); + c->returnValue()->setString(TQString("idle")); break; case KviIrcContext::Connecting: - c->returnValue()->setString(QString("connecting")); + c->returnValue()->setString(TQString("connecting")); break; case KviIrcContext::LoggingIn: - c->returnValue()->setString(QString("loggingin")); + c->returnValue()->setString(TQString("loggingin")); break; case KviIrcContext::Connected: - c->returnValue()->setString(QString("connected")); + c->returnValue()->setString(TQString("connected")); break; default: - c->returnValue()->setString(QString("unknown")); + c->returnValue()->setString(TQString("unknown")); break; } return true; diff --git a/src/modules/dcc/adpcmcodec.h b/src/modules/dcc/adpcmcodec.h index 63343df0..49913518 100644 --- a/src/modules/dcc/adpcmcodec.h +++ b/src/modules/dcc/adpcmcodec.h @@ -30,7 +30,7 @@ // 16384 32768 | 8192 | ~110 250 290 // -#include // fix for qtextstream.h +#include // fix for qtextstream.h #include "codec.h" typedef struct adpcm_state diff --git a/src/modules/dcc/broker.cpp b/src/modules/dcc/broker.cpp index b6548e0c..d183ebbf 100644 --- a/src/modules/dcc/broker.cpp +++ b/src/modules/dcc/broker.cpp @@ -44,13 +44,13 @@ extern KVIRC_API KviMediaManager * g_pMediaManager; extern KVIRC_API KviSharedFilesManager * g_pSharedFilesManager; -#include -#include +#include +#include //#warning "The broker might lookup the remote host name" KviDccBroker::KviDccBroker() -: QObject(0,"dcc_broker") +: TQObject(0,"dcc_broker") { KviDccFileTransfer::init(); @@ -60,7 +60,7 @@ KviDccBroker::KviDccBroker() m_pDccWindowList = new KviPointerList; m_pDccWindowList->setAutoDelete(false); - m_pZeroPortTags = new KviPointerHashTable(17); + m_pZeroPortTags = new KviPointerHashTable(17); m_pZeroPortTags->setAutoDelete(true); } @@ -81,7 +81,7 @@ KviDccZeroPortTag * KviDccBroker::addZeroPortTag() static unsigned int g_uNextZeroPortTag = 0; g_uNextZeroPortTag++; KviDccZeroPortTag * t = new KviDccZeroPortTag; - t->m_tTimestamp = QDateTime::currentDateTime(); + t->m_tTimestamp = TQDateTime::tqcurrentDateTime(); t->m_szTag.setNum(g_uNextZeroPortTag); //t->m_szTag.prepend("mIrc-zero-port-"); t->m_uResumePosition = 0; @@ -90,11 +90,11 @@ KviDccZeroPortTag * KviDccBroker::addZeroPortTag() return t; } -KviDccZeroPortTag * KviDccBroker::findZeroPortTag(const QString &szTag) +KviDccZeroPortTag * KviDccBroker::findZeroPortTag(const TQString &szTag) { - KviDccZeroPortTag * t = m_pZeroPortTags->find(szTag); + KviDccZeroPortTag * t = m_pZeroPortTags->tqfind(szTag); if(!t)return 0; - if(t->m_tTimestamp.secsTo(QDateTime::currentDateTime()) > 180) + if(t->m_tTimestamp.secsTo(TQDateTime::tqcurrentDateTime()) > 180) { // too late man... m_pZeroPortTags->remove(szTag); @@ -103,7 +103,7 @@ KviDccZeroPortTag * KviDccBroker::findZeroPortTag(const QString &szTag) return t; } -void KviDccBroker::removeZeroPortTag(const QString &szTag) +void KviDccBroker::removeZeroPortTag(const TQString &szTag) { m_pZeroPortTags->remove(szTag); } @@ -145,14 +145,14 @@ void KviDccBroker::cancelDcc(KviDccBox *box,KviDccDescriptor * dcc) void KviDccBroker::rsendManage(KviDccDescriptor * dcc) { // We need the filename... - QFileInfo fi(dcc->szLocalFileName); + TQFileInfo fi(dcc->szLocalFileName); if(fi.exists())rsendExecute(0,dcc); else rsendAskForFileName(dcc); } void KviDccBroker::rsendAskForFileName(KviDccDescriptor * dcc) { - QStringList filenames; + TQStringList filenames; if( KviFileDialog::askForOpenFileNames(filenames, __tr2qs_ctx("Choose Files to Send - KVIrc","dcc"),"") @@ -161,7 +161,7 @@ void KviDccBroker::rsendAskForFileName(KviDccDescriptor * dcc) { KviDccDescriptor * d; KviDccDescriptor * templ = dcc; - QStringList::Iterator it=filenames.begin(); + TQStringList::Iterator it=filenames.begin(); while(it != filenames.end()) { d = new KviDccDescriptor(*dcc); @@ -193,7 +193,7 @@ void KviDccBroker::rsendExecute(KviDccDescriptor * dcc) } // Ok...we need the file to exist - QFileInfo fi(dcc->szLocalFileName); + TQFileInfo fi(dcc->szLocalFileName); if(!(fi.exists() && fi.isReadable() && (fi.isFile()) && (fi.size() > 0))) { dcc->console()->output(KVI_OUT_DCCERROR,__tr2qs_ctx("Can't open file %Q for reading","dcc"), @@ -203,12 +203,12 @@ void KviDccBroker::rsendExecute(KviDccDescriptor * dcc) } dcc->szFileName = dcc->szLocalFileName; - dcc->szFileName = QFileInfo(dcc->szFileName).fileName(); + dcc->szFileName = TQFileInfo(dcc->szFileName).fileName(); - QString fName = dcc->szFileName; - fName.replace(' ',"\\040"); // be cool :) + TQString fName = dcc->szFileName; + fName.tqreplace(' ',"\\040"); // be cool :) - QString szTag; + TQString szTag; if(dcc->isZeroPortRequest()) { // actually we tagged it as "nonempty" in /dcc.rsend --zero-port @@ -239,7 +239,7 @@ void KviDccBroker::rsendExecute(KviDccDescriptor * dcc) // now add a file offer , so he we will accept it automatically // 120 secs is a reasonable timeout - QString szMask = dcc->szNick; + TQString szMask = dcc->szNick; szMask += "!*@*"; g_pSharedFilesManager->addSharedFile(szTag,dcc->szLocalFileName,szMask,120); @@ -265,10 +265,10 @@ void KviDccBroker::handleChatRequest(KviDccDescriptor * dcc) { // FIXME: better message ? Secure Direct Client Connection...eventually // need confirmation - QString tmp = __tr2qs_ctx( \ + TQString tmp = __tr2qs_ctx( \ "%1 [%2@%3] requests a " \ "Direct Client Connection in %4 mode.
", \ - "dcc").arg(dcc->szNick).arg(dcc->szUser).arg(dcc->szHost).arg(dcc->szType); + "dcc").tqarg(dcc->szNick).tqarg(dcc->szUser).tqarg(dcc->szHost).tqarg(dcc->szType); #ifdef COMPILE_SSL_SUPPORT if(dcc->bIsSSL)tmp += __tr2qs_ctx("The connection will be secured using SSL.
","dcc"); @@ -282,19 +282,19 @@ void KviDccBroker::handleChatRequest(KviDccDescriptor * dcc) } else { tmp += __tr2qs_ctx( \ "The connection target will be host %1 on port %2
" \ - ,"dcc").arg(dcc->szIp).arg(dcc->szPort); + ,"dcc").tqarg(dcc->szIp).tqarg(dcc->szPort); } - QString caption = __tr2qs_ctx("DCC %1 Request - KVIrc","dcc").arg(dcc->szType); + TQString caption = __tr2qs_ctx("DCC %1 Request - KVIrc","dcc").tqarg(dcc->szType); KviDccAcceptBox * box = new KviDccAcceptBox(this,dcc,tmp,caption); m_pBoxList->append(box); - connect(box,SIGNAL(accepted(KviDccBox *,KviDccDescriptor *)), - this,SLOT(executeChat(KviDccBox *,KviDccDescriptor *))); - connect(box,SIGNAL(rejected(KviDccBox *,KviDccDescriptor *)), - this,SLOT(cancelDcc(KviDccBox *,KviDccDescriptor *))); + connect(box,TQT_SIGNAL(accepted(KviDccBox *,KviDccDescriptor *)), + this,TQT_SLOT(executeChat(KviDccBox *,KviDccDescriptor *))); + connect(box,TQT_SIGNAL(rejected(KviDccBox *,KviDccDescriptor *)), + this,TQT_SLOT(cancelDcc(KviDccBox *,KviDccDescriptor *))); box->show(); } else { // auto accept @@ -315,7 +315,7 @@ void KviDccBroker::executeChat(KviDccBox *box,KviDccDescriptor * dcc) KviStr szSubProto = dcc->szType; szSubProto.toLower(); - QString tmp = QString("dcc: %1 %2@%3:%4").arg(szSubProto.ptr()).arg(dcc->szNick).arg(dcc->szIp).arg(dcc->szPort); + TQString tmp = TQString("dcc: %1 %2@%3:%4").tqarg(szSubProto.ptr()).tqarg(dcc->szNick).tqarg(dcc->szIp).tqarg(dcc->szPort); KviDccChat * chat = new KviDccChat(dcc->console()->frame(),dcc,tmp.utf8().data()); bool bMinimized = dcc->bOverrideMinimize ? dcc->bShowMinimized : \ @@ -336,19 +336,19 @@ void KviDccBroker::activeVoiceManage(KviDccDescriptor * dcc) if(!dcc->bAutoAccept) { // need confirmation - QString tmp = __tr2qs_ctx( + TQString tmp = __tr2qs_ctx( "%1 [%2@%3] requests a
" \ "Direct Client Connection in VOICE mode.
" \ "The connection target will be host %4 on port %5
" \ ,"dcc" \ - ).arg(dcc->szNick).arg(dcc->szUser).arg(dcc->szHost).arg(dcc->szIp).arg(dcc->szPort); + ).tqarg(dcc->szNick).tqarg(dcc->szUser).tqarg(dcc->szHost).tqarg(dcc->szIp).tqarg(dcc->szPort); KviDccAcceptBox * box = new KviDccAcceptBox(this,dcc,tmp,__tr2qs_ctx("DCC VOICE request","dcc")); m_pBoxList->append(box); - connect(box,SIGNAL(accepted(KviDccBox *,KviDccDescriptor *)), - this,SLOT(activeVoiceExecute(KviDccBox *,KviDccDescriptor *))); - connect(box,SIGNAL(rejected(KviDccBox *,KviDccDescriptor *)), - this,SLOT(cancelDcc(KviDccBox *,KviDccDescriptor *))); + connect(box,TQT_SIGNAL(accepted(KviDccBox *,KviDccDescriptor *)), + this,TQT_SLOT(activeVoiceExecute(KviDccBox *,KviDccDescriptor *))); + connect(box,TQT_SIGNAL(rejected(KviDccBox *,KviDccDescriptor *)), + this,TQT_SLOT(cancelDcc(KviDccBox *,KviDccDescriptor *))); box->show(); } else { // auto accept @@ -407,19 +407,19 @@ void KviDccBroker::activeCanvasManage(KviDccDescriptor * dcc) if(!dcc->bAutoAccept) { // need confirmation - QString tmp = __tr2qs_ctx( \ + TQString tmp = __tr2qs_ctx( \ "%1 [%2@%3] requests a
" \ "Direct Client Connection in CANVAS mode.
" \ "The connection target will be host %4 on port %5
" \ ,"dcc" \ - ).arg(dcc->szNick).arg(dcc->szUser).arg(dcc->szHost).arg(dcc->szIp).arg(dcc->szPort); + ).tqarg(dcc->szNick).tqarg(dcc->szUser).tqarg(dcc->szHost).tqarg(dcc->szIp).tqarg(dcc->szPort); KviDccAcceptBox * box = new KviDccAcceptBox(this,dcc,tmp,__tr2qs_ctx("DCC CANVAS request","dcc")); m_pBoxList->append(box); - connect(box,SIGNAL(accepted(KviDccBox *,KviDccDescriptor *)), - this,SLOT(activeCanvasExecute(KviDccBox *,KviDccDescriptor *))); - connect(box,SIGNAL(rejected(KviDccBox *,KviDccDescriptor *)), - this,SLOT(cancelDcc(KviDccBox *,KviDccDescriptor *))); + connect(box,TQT_SIGNAL(accepted(KviDccBox *,KviDccDescriptor *)), + this,TQT_SLOT(activeCanvasExecute(KviDccBox *,KviDccDescriptor *))); + connect(box,TQT_SIGNAL(rejected(KviDccBox *,KviDccDescriptor *)), + this,TQT_SLOT(cancelDcc(KviDccBox *,KviDccDescriptor *))); box->show(); } else { // auto accept @@ -493,7 +493,7 @@ void KviDccBroker::recvFileManage(KviDccDescriptor * dcc) if(!dcc->bAutoAccept) { // need confirmation - QString tmp; + TQString tmp; if(dcc->bActive) { @@ -505,9 +505,9 @@ void KviDccBroker::recvFileManage(KviDccDescriptor * dcc) "%5 large.
" \ "The connection target will be host %6 on port %7
" \ ,"dcc" \ - ).arg(dcc->szNick).arg(dcc->szUser).arg(dcc->szHost).arg( - dcc->szFileName).arg(KviQString::makeSizeReadable(dcc->szFileSize.toInt())).arg( - dcc->szIp).arg(dcc->szPort); + ).tqarg(dcc->szNick).tqarg(dcc->szUser).tqarg(dcc->szHost).tqarg( + dcc->szFileName).tqarg(KviTQString::makeSizeReadable(dcc->szFileSize.toInt())).tqarg( + dcc->szIp).tqarg(dcc->szPort); } else { // passive: we will be listening! @@ -518,8 +518,8 @@ void KviDccBroker::recvFileManage(KviDccDescriptor * dcc) "%5 large.
" \ "You will be the passive side of the connection.
" \ ,"dcc" \ - ).arg(dcc->szNick).arg(dcc->szUser).arg(dcc->szHost).arg( - dcc->szFileName).arg(KviQString::makeSizeReadable(dcc->szFileSize.toInt())); + ).tqarg(dcc->szNick).tqarg(dcc->szUser).tqarg(dcc->szHost).tqarg( + dcc->szFileName).tqarg(KviTQString::makeSizeReadable(dcc->szFileSize.toInt())); } if(dcc->bIsIncomingAvatar) @@ -540,14 +540,14 @@ void KviDccBroker::recvFileManage(KviDccDescriptor * dcc) //#warning "Maybe remove the pending avatar if rejected ?" - QString title = __tr2qs_ctx("DCC %1 Request - KVIrc","dcc").arg(dcc->szType); + TQString title = __tr2qs_ctx("DCC %1 Request - KVIrc","dcc").tqarg(dcc->szType); KviDccAcceptBox * box = new KviDccAcceptBox(this,dcc,tmp,title); m_pBoxList->append(box); - connect(box,SIGNAL(accepted(KviDccBox *,KviDccDescriptor *)), - this,SLOT(chooseSaveFileName(KviDccBox *,KviDccDescriptor *))); - connect(box,SIGNAL(rejected(KviDccBox *,KviDccDescriptor *)), - this,SLOT(cancelDcc(KviDccBox *,KviDccDescriptor *))); + connect(box,TQT_SIGNAL(accepted(KviDccBox *,KviDccDescriptor *)), + this,TQT_SLOT(chooseSaveFileName(KviDccBox *,KviDccDescriptor *))); + connect(box,TQT_SIGNAL(rejected(KviDccBox *,KviDccDescriptor *)), + this,TQT_SLOT(cancelDcc(KviDccBox *,KviDccDescriptor *))); box->show(); } else { // auto accept @@ -586,7 +586,7 @@ void KviDccBroker::chooseSaveFileName(KviDccBox *box,KviDccDescriptor *dcc) } if(KVI_OPTION_BOOL(KviOption_boolSortReceivedByDccFilesByNicks)) { - KviQString::ensureLastCharIs(dcc->szLocalFileName,KVI_PATH_SEPARATOR_CHAR); + KviTQString::ensureLastCharIs(dcc->szLocalFileName,KVI_PATH_SEPARATOR_CHAR); dcc->szLocalFileName.append(dcc->szNick); KviFileUtils::adjustFilePath(dcc->szLocalFileName); } @@ -601,7 +601,7 @@ void KviDccBroker::chooseSaveFileName(KviDccBox *box,KviDccDescriptor *dcc) g_pApp->getLocalKvircDirectory(dcc->szLocalFileName,KviApp::Incoming); if(KVI_OPTION_BOOL(KviOption_boolSortReceivedByDccFilesByNicks)) { - KviQString::ensureLastCharIs(dcc->szLocalFileName,KVI_PATH_SEPARATOR_CHAR); + KviTQString::ensureLastCharIs(dcc->szLocalFileName,KVI_PATH_SEPARATOR_CHAR); dcc->szLocalFileName.append(dcc->szNick); KviFileUtils::adjustFilePath(dcc->szLocalFileName); KviFileUtils::makeDir(dcc->szLocalFileName); @@ -609,7 +609,7 @@ void KviDccBroker::chooseSaveFileName(KviDccBox *box,KviDccDescriptor *dcc) } } KviFileUtils::adjustFilePath(dcc->szLocalFileName); - KviQString::ensureLastCharIs(dcc->szLocalFileName,KVI_PATH_SEPARATOR_CHAR); + KviTQString::ensureLastCharIs(dcc->szLocalFileName,KVI_PATH_SEPARATOR_CHAR); if(!(dcc->bAutoAccept)) { @@ -641,7 +641,7 @@ void KviDccBroker::renameOverwriteResume(KviDccBox *box,KviDccDescriptor * dcc) if(box)box->forgetDescriptor(); // Check if file exists - QFileInfo fi(dcc->szLocalFileName); + TQFileInfo fi(dcc->szLocalFileName); if(fi.exists() && (fi.size() > 0)) // 0 byte files are senseless for us { dcc->szLocalFileSize.setNum(fi.size()); @@ -655,7 +655,7 @@ void KviDccBroker::renameOverwriteResume(KviDccBox *box,KviDccDescriptor * dcc) if(!dcc->bAutoAccept) { - QString tmp; + TQString tmp; bool bDisableResume = false; if((iRemoteSize > -1) || // remote size is unknown @@ -669,7 +669,7 @@ void KviDccBroker::renameOverwriteResume(KviDccBox *box,KviDccDescriptor * dcc) "auto-rename the new file, or
" \ "resume an incomplete download?" \ ,"dcc" \ - ).arg(dcc->szLocalFileName).arg(KviQString::makeSizeReadable(fi.size())); + ).tqarg(dcc->szLocalFileName).tqarg(KviTQString::makeSizeReadable(fi.size())); } else { bDisableResume = true; // the file on disk is larger or equal to the remote one @@ -680,17 +680,17 @@ void KviDccBroker::renameOverwriteResume(KviDccBox *box,KviDccDescriptor * dcc) "overwrite the existing file, or
" \ "auto-rename the new file ?" \ ,"dcc" \ - ).arg(dcc->szLocalFileName); + ).tqarg(dcc->szLocalFileName); } KviDccRenameBox * box = new KviDccRenameBox(this,dcc,tmp,bDisableResume); m_pBoxList->append(box); - connect(box,SIGNAL(renameSelected(KviDccBox *,KviDccDescriptor *)), - this,SLOT(renameDccSendFile(KviDccBox *,KviDccDescriptor *))); - connect(box,SIGNAL(overwriteSelected(KviDccBox *,KviDccDescriptor *)), - this,SLOT(recvFileExecute(KviDccBox *,KviDccDescriptor *))); - connect(box,SIGNAL(cancelSelected(KviDccBox *,KviDccDescriptor *)), - this,SLOT(cancelDcc(KviDccBox *,KviDccDescriptor *))); + connect(box,TQT_SIGNAL(renameSelected(KviDccBox *,KviDccDescriptor *)), + this,TQT_SLOT(renameDccSendFile(KviDccBox *,KviDccDescriptor *))); + connect(box,TQT_SIGNAL(overwriteSelected(KviDccBox *,KviDccDescriptor *)), + this,TQT_SLOT(recvFileExecute(KviDccBox *,KviDccDescriptor *))); + connect(box,TQT_SIGNAL(cancelSelected(KviDccBox *,KviDccDescriptor *)), + this,TQT_SLOT(cancelDcc(KviDccBox *,KviDccDescriptor *))); box->show(); return; } else { @@ -720,7 +720,7 @@ void KviDccBroker::renameDccSendFile(KviDccBox *box,KviDccDescriptor * dcc) if(box)box->forgetDescriptor(); - if(QFileInfo(dcc->szLocalFileName).exists()) + if(TQFileInfo(dcc->szLocalFileName).exists()) { KviStr szOrig = dcc->szLocalFileName; int i = 1; @@ -740,7 +740,7 @@ void KviDccBroker::renameDccSendFile(KviDccBox *box,KviDccDescriptor * dcc) dcc->szLocalFileName += szNum; } i++; - } while(QFileInfo(dcc->szLocalFileName).exists()); + } while(TQFileInfo(dcc->szLocalFileName).exists()); if(_OUTPUT_VERBOSE) { @@ -777,7 +777,7 @@ void KviDccBroker::recvFileExecute(KviDccBox *box,KviDccDescriptor * dcc) void KviDccBroker::sendFileManage(KviDccDescriptor * dcc) { - QStringList filenames; + TQStringList filenames; if( KviFileDialog::askForOpenFileNames(filenames, __tr2qs_ctx("Choose Files to Send - KVIrc","dcc"),"") @@ -786,7 +786,7 @@ void KviDccBroker::sendFileManage(KviDccDescriptor * dcc) { KviDccDescriptor * d; KviDccDescriptor * templ = dcc; - QStringList::Iterator it=filenames.begin(); + TQStringList::Iterator it=filenames.begin(); while(it != filenames.end()) { d = new KviDccDescriptor(*dcc); @@ -815,7 +815,7 @@ void KviDccBroker::sendFileExecute(KviDccBox * box,KviDccDescriptor *dcc) dcc->setConsole(g_pApp->activeConsole()); } - QFileInfo fi(dcc->szLocalFileName); + TQFileInfo fi(dcc->szLocalFileName); if(!(fi.exists() && fi.isReadable() && (fi.isFile()) && (fi.size() > 0))) { dcc->console()->output(KVI_OUT_DCCERROR,__tr2qs_ctx("Can't open file %Q for reading","dcc"), @@ -825,7 +825,7 @@ void KviDccBroker::sendFileExecute(KviDccBox * box,KviDccDescriptor *dcc) } dcc->szFileName = dcc->szLocalFileName; - dcc->szFileName = QFileInfo(dcc->szFileName).fileName(); + dcc->szFileName = TQFileInfo(dcc->szFileName).fileName(); dcc->szLocalFileSize.setNum(fi.size()); @@ -859,7 +859,7 @@ bool KviDccBroker::handleResumeRequest(KviDccRequest * dcc,const char * filename if(kvi_strEqualCI("0",port) && szZeroPortTag) { // zero port resume request (we have sent out a DCC SEND 0 - KviDccZeroPortTag * t = findZeroPortTag(QString(szZeroPortTag)); + KviDccZeroPortTag * t = findZeroPortTag(TQString(szZeroPortTag)); if(t) { //debug("FOUND"); diff --git a/src/modules/dcc/broker.h b/src/modules/dcc/broker.h index 80fa9768..837699e5 100644 --- a/src/modules/dcc/broker.h +++ b/src/modules/dcc/broker.h @@ -37,8 +37,8 @@ #include "kvi_sparser.h" #include "kvi_pointerhashtable.h" -#include -#include +#include +#include class KviConsole; class KviDccBroker; @@ -50,26 +50,27 @@ class KviDccBox; class KviDccZeroPortTag { public: - QDateTime m_tTimestamp; - QString m_szTag; + TQDateTime m_tTimestamp; + TQString m_szTag; unsigned int m_uFileSize; // outgoing file size, valid only for file transfers obviously unsigned int m_uResumePosition; // if 0 = no resume, valid only for file transfers obviously }; -class KviDccBroker : public QObject +class KviDccBroker : public TQObject { Q_OBJECT + TQ_OBJECT public: KviDccBroker(); ~KviDccBroker(); protected: KviPointerList * m_pBoxList; KviPointerList * m_pDccWindowList; - KviPointerHashTable * m_pZeroPortTags; + KviPointerHashTable * m_pZeroPortTags; public: KviDccZeroPortTag * addZeroPortTag(); - KviDccZeroPortTag * findZeroPortTag(const QString &szTag); - void removeZeroPortTag(const QString &szTag); + KviDccZeroPortTag * findZeroPortTag(const TQString &szTag); + void removeZeroPortTag(const TQString &szTag); unsigned int dccWindowsCount(){ return m_pDccWindowList->count(); }; unsigned int dccBoxCount(); diff --git a/src/modules/dcc/canvas.cpp b/src/modules/dcc/canvas.cpp index e80272ae..6b5f6872 100644 --- a/src/modules/dcc/canvas.cpp +++ b/src/modules/dcc/canvas.cpp @@ -20,7 +20,7 @@ // Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // -#define QT_MODULE_CANVAS +#define TQT_MODULE_CANVAS #include "canvas.h" @@ -50,7 +50,7 @@ #include "kvi_themedlabel.h" #include "kvi_ircconnection.h" -#include +#include extern KviDccBroker * g_pDccBroker; @@ -58,7 +58,7 @@ extern KviDccBroker * g_pDccBroker; KviDccCanvas::KviDccCanvas(KviFrame *pFrm,KviDccDescriptor * dcc,const char * name) : KviDccWindow(KVI_WINDOW_TYPE_DCCCANVAS,pFrm,name,dcc) { - m_pSplitter = new QSplitter(QSplitter::Vertical,this,"splitter"); + m_pSplitter = new TQSplitter(Qt::Vertical,this,"splitter"); m_pCanvas = new KviCanvasWidget(m_pSplitter); @@ -68,8 +68,8 @@ KviDccCanvas::KviDccCanvas(KviFrame *pFrm,KviDccDescriptor * dcc,const char * na // setFocusHandler(m_pInput,this); m_pMarshal = new KviDccMarshal(this); - connect(m_pMarshal,SIGNAL(error(int)),this,SLOT(handleMarshalError(int))); - connect(m_pMarshal,SIGNAL(connected()),this,SLOT(connected())); + connect(m_pMarshal,TQT_SIGNAL(error(int)),this,TQT_SLOT(handleMarshalError(int))); + connect(m_pMarshal,TQT_SIGNAL(connected()),this,TQT_SLOT(connected())); if(!(m_pDescriptor->bActive)) @@ -85,8 +85,8 @@ KviDccCanvas::KviDccCanvas(KviFrame *pFrm,KviDccDescriptor * dcc,const char * na if(dcc->bSendRequest) { - QString ip = !dcc->szFakeIp.isEmpty() ? dcc->szFakeIp : dcc->szListenIp; - QString port = !dcc->szFakePort.isEmpty() ? dcc->szFakePort.utf8().data() : m_pMarshal->localPort(); + TQString ip = !dcc->szFakeIp.isEmpty() ? dcc->szFakeIp : dcc->szListenIp; + TQString port = !dcc->szFakePort.isEmpty() ? dcc->szFakePort.utf8().data() : m_pMarshal->localPort(); //#warning "OPTION FOR SENDING 127.0.0.1 and so on (not an unsigned number)" struct in_addr a; if(kvi_stringIpToBinaryIp(ip.utf8().data(),&a))ip.setNum(htonl(a.s_addr)); @@ -119,12 +119,12 @@ KviDccCanvas::~KviDccCanvas() // delete m_pSlaveThread; // m_pSlaveThread = 0; // } - KviThreadManager::killPendingEvents(this); + KviThreadManager::killPendingEvents(TQT_TQOBJECT(this)); // delete m_pDescriptor; // delete m_pMarshal; } -const QString & KviDccCanvas::target() +const TQString & KviDccCanvas::target() { // This may change on the fly... m_szTarget.sprintf("%s@%s:%s", @@ -140,12 +140,12 @@ void KviDccCanvas::fillCaptionBuffers() m_szPlainTextCaption = tmp; m_szHtmlActiveCaption.sprintf("%s", - KVI_OPTION_COLOR(KviOption_colorCaptionTextActive).name().ascii(),tmp.ptr()); + TQString(KVI_OPTION_COLOR(KviOption_colorCaptionTextActive).name()).ascii(),tmp.ptr()); m_szHtmlInactiveCaption.sprintf("%s", - KVI_OPTION_COLOR(KviOption_colorCaptionTextInactive).name().ascii(),tmp.ptr()); + TQString(KVI_OPTION_COLOR(KviOption_colorCaptionTextInactive).name()).ascii(),tmp.ptr()); } -QPixmap * KviDccCanvas::myIconPtr() +TQPixmap * KviDccCanvas::myIconPtr() { return g_pIconManager->getSmallIcon(KVI_SMALLICON_CANVAS); } @@ -172,7 +172,7 @@ void KviDccCanvas::ownAction(const char * text) output(KVI_OUT_ACTION,"%Q %s",&(m_pDescriptor->szLocalNick),text); } -bool KviDccCanvas::event(QEvent *e) +bool KviDccCanvas::event(TQEvent *e) { // if(e->type() == KVI_THREAD_EVENT) // { @@ -255,25 +255,25 @@ bool KviDccCanvas::event(QEvent *e) return KviWindow::event(e); } -void KviDccCanvas::resizeEvent(QResizeEvent *e) +void KviDccCanvas::resizeEvent(TQResizeEvent *e) { int hght = m_pInput->heightHint(); -// int hght2 = m_pTopSplitter->sizeHint().height(); +// int hght2 = m_pTopSplitter->tqsizeHint().height(); // m_pTopSplitter->setGeometry(0,0,width(),hght2); m_pSplitter->setGeometry(0,0,width(),height() - hght); m_pInput->setGeometry(0,height() - hght,width(),hght); } -QSize KviDccCanvas::sizeHint() const +TQSize KviDccCanvas::tqsizeHint() const { - QSize ret(m_pIrcView->sizeHint().width(), - m_pIrcView->sizeHint().height() + m_pInput->heightHint()); + TQSize ret(m_pIrcView->tqsizeHint().width(), + m_pIrcView->tqsizeHint().height() + m_pInput->heightHint()); return ret; } void KviDccCanvas::handleMarshalError(int err) { - QString sss = KviError::getDescription(err); + TQString sss = KviError::getDescription(err); output(KVI_OUT_DCCERROR,__tr2qs_ctx("DCC Failed: %Q","dcc"),&sss); } diff --git a/src/modules/dcc/canvas.h b/src/modules/dcc/canvas.h index 8e6b1fb3..38349cae 100644 --- a/src/modules/dcc/canvas.h +++ b/src/modules/dcc/canvas.h @@ -40,28 +40,29 @@ class KviDccMarshal; class KviCanvasWidget; -class QSplitter; +class TQSplitter; class KviDccCanvas : public KviDccWindow { Q_OBJECT + TQ_OBJECT public: KviDccCanvas(KviFrame *pFrm,KviDccDescriptor * dcc,const char * name); ~KviDccCanvas(); protected: // KviDccCanvasThread * m_pSlaveThread; KviCanvasWidget * m_pCanvas; -// QSplitter * m_pTopSplitter; - QString m_szTarget; +// TQSplitter * m_pTopSplitter; + TQString m_szTarget; protected: - virtual const QString &target(); + virtual const TQString &target(); virtual void fillCaptionBuffers(); virtual void getBaseLogFileName(KviStr &buffer); - virtual QPixmap * myIconPtr(); - virtual void resizeEvent(QResizeEvent *e); - virtual QSize sizeHint() const; - virtual bool event(QEvent *e); + virtual TQPixmap * myIconPtr(); + virtual void resizeEvent(TQResizeEvent *e); + virtual TQSize tqsizeHint() const; + virtual bool event(TQEvent *e); virtual void ownMessage(const char *text); virtual void ownAction(const char *text); protected slots: diff --git a/src/modules/dcc/canvaswidget.cpp b/src/modules/dcc/canvaswidget.cpp index 203e0b36..65c37175 100644 --- a/src/modules/dcc/canvaswidget.cpp +++ b/src/modules/dcc/canvaswidget.cpp @@ -25,12 +25,12 @@ #ifdef COMPILE_DCC_CANVAS -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include "kvi_string.h" @@ -45,8 +45,8 @@ // KviCanvasRectangleItem // -KviCanvasRectangleItem::KviCanvasRectangleItem(QCanvas * c,int x,int y,int w,int h) -: QCanvasRectangle(x,y,w,h,c) +KviCanvasRectangleItem::KviCanvasRectangleItem(TQCanvas * c,int x,int y,int w,int h) +: TQCanvasRectangle(x,y,w,h,c) { } @@ -54,21 +54,21 @@ KviCanvasRectangleItem::~KviCanvasRectangleItem() { } -void KviCanvasRectangleItem::drawSelection(QPainter &p) +void KviCanvasRectangleItem::drawSelection(TQPainter &p) { p.setRasterOp(NotROP); - p.fillRect((int)x() + 1,(int)y() + 1,width() - 2,height() - 2,QBrush(Dense6Pattern)); - p.setPen(QPen(DotLine)); + p.fillRect((int)x() + 1,(int)y() + 1,width() - 2,height() - 2,TQBrush(Dense6Pattern)); + p.setPen(TQPen(DotLine)); p.drawRect((int)x(),(int)y(),width(),height()); p.setRasterOp(CopyROP); } -void KviCanvasRectangleItem::setProperty(const QString &property,const QVariant &val) +void KviCanvasRectangleItem::setProperty(const TQString &property,const TQVariant &val) { if(m_properties[property].isValid()) { - m_properties.replace(property,val); + m_properties.tqreplace(property,val); hide(); show(); } @@ -83,14 +83,14 @@ void KviCanvasRectangleItem::setProperty(const QString &property,const QVariant // -KviCanvasPolygon::KviCanvasPolygon(QCanvas * c,int x,int y,QPointArray &pnts,double dScaleFactor) -: QCanvasPolygon(c) +KviCanvasPolygon::KviCanvasPolygon(TQCanvas * c,int x,int y,TQPointArray &pnts,double dScaleFactor) +: TQCanvasPolygon(c) { - m_properties.insert("clrForeground",QVariant(QColor(0,0,0))); - m_properties.insert("uLineWidth",QVariant((unsigned int)0)); + m_properties.insert("clrForeground",TQVariant(TQColor(0,0,0))); + m_properties.insert("uLineWidth",TQVariant((unsigned int)0)); - m_properties.insert("clrBackground",QVariant(QColor(0,0,0))); - m_properties.insert("bHasBackground",QVariant(false,1)); + m_properties.insert("clrBackground",TQVariant(TQColor(0,0,0))); + m_properties.insert("bHasBackground",TQVariant(false,1)); m_dScaleFactor = dScaleFactor; m_points = pnts; @@ -110,7 +110,7 @@ void KviCanvasPolygon::setScaleFactor(double dScaleFactor) resetPoints(); } -void KviCanvasPolygon::setInternalPoints(const QPointArray &pnts) +void KviCanvasPolygon::setInternalPoints(const TQPointArray &pnts) { m_points = pnts; resetPoints(); @@ -119,7 +119,7 @@ void KviCanvasPolygon::setInternalPoints(const QPointArray &pnts) void KviCanvasPolygon::resetPoints() { - QPointArray scaled(m_points.size()); + TQPointArray scaled(m_points.size()); for(unsigned int i=0;i= 300 if(isEnabled()) -#else - if(enabled()) -#endif { p.setBrush(brush()); p.setPen(pen()); p.drawPolygon(areaPoints()); } -#if QT_VERSION >=300 if(isSelected()) -#else - if(selected()) -#endif { p.setRasterOp(NotROP); - p.setPen(QPen(DotLine)); + p.setPen(TQPen(DotLine)); p.drawPolygon(areaPoints()); - p.setBrush(QBrush()); + p.setBrush(TQBrush()); double dVal = 10; p.drawEllipse((int)(x() - dVal),(int)(y() - dVal),(int)(dVal * 2),(int)(dVal * 2)); p.drawLine((int)(x() - (dVal * 2)),(int)y(),(int)(x() + (dVal * 2)),(int)y()); p.drawLine((int)x(),(int)(y() - (dVal * 2)),(int)x(),(int)(y() + (dVal * 2))); p.setRasterOp(CopyROP); - canvas()->setChanged(QRect((int)(x() - dVal),(int)(y() - dVal),(int)(dVal * 4),(int)(dVal * 4))); + canvas()->setChanged(TQRect((int)(x() - dVal),(int)(y() - dVal),(int)(dVal * 4),(int)(dVal * 4))); } } @@ -194,59 +186,51 @@ void KviCanvasPolygon::draw(QPainter &p) // KviCanvasEllipticItem // -KviCanvasEllipticItem::KviCanvasEllipticItem(QCanvas * c,int x,int y,int w,int h) +KviCanvasEllipticItem::KviCanvasEllipticItem(TQCanvas * c,int x,int y,int w,int h) : KviCanvasRectangleItem(c,x,y,w,h) { - m_properties.insert("clrForeground",QVariant(QColor(0,0,0))); - m_properties.insert("uLineWidth",QVariant((unsigned int)0)); + m_properties.insert("clrForeground",TQVariant(TQColor(0,0,0))); + m_properties.insert("uLineWidth",TQVariant((unsigned int)0)); - m_properties.insert("clrBackground",QVariant(QColor(0,0,0))); - m_properties.insert("bHasBackground",QVariant(false,1)); + m_properties.insert("clrBackground",TQVariant(TQColor(0,0,0))); + m_properties.insert("bHasBackground",TQVariant(false,1)); -// m_properties.insert("iStartAngle",QVariant(0)); -// m_properties.insert("iEndAngle",QVariant(360)); +// m_properties.insert("iStartAngle",TQVariant(0)); +// m_properties.insert("iEndAngle",TQVariant(360)); } KviCanvasEllipticItem::~KviCanvasEllipticItem() { } -void KviCanvasEllipticItem::draw(QPainter &p) +void KviCanvasEllipticItem::draw(TQPainter &p) { -#if QT_VERSION >= 300 if(isEnabled()) -#else - if(enabled()) -#endif { - QBrush b = p.brush(); + TQBrush b = p.brush(); if(m_properties["bHasBackground"].asBool())p.setBrush(m_properties["clrBackground"].asColor()); - else p.setBrush(QBrush()); + else p.setBrush(TQBrush()); p.setPen(pen()); drawContent(p); p.setBrush(b); } -#if QT_VERSION >= 300 if(isSelected())drawSelection(p); -#else - if(selected())drawSelection(p); -#endif } -void KviCanvasEllipticItem::drawContent(QPainter &p) +void KviCanvasEllipticItem::drawContent(TQPainter &p) { } -void KviCanvasEllipticItem::setProperty(const QString & property,const QVariant &val) +void KviCanvasEllipticItem::setProperty(const TQString & property,const TQVariant &val) { if(m_properties[property].isValid()) { - m_properties.replace(property,val); + m_properties.tqreplace(property,val); if((property == "clrForeground") || (property == "uLineWidth")) { - setPen(QPen(m_properties["clrForeground"].asColor(),m_properties["uLineWidth"].toInt())); + setPen(TQPen(m_properties["clrForeground"].asColor(),m_properties["uLineWidth"].toInt())); } else { hide(); show(); } @@ -265,7 +249,7 @@ int KviCanvasEllipticItem::rtti() const // -KviCanvasEllipse::KviCanvasEllipse(QCanvas * c,int x,int y,int w,int h) +KviCanvasEllipse::KviCanvasEllipse(TQCanvas * c,int x,int y,int w,int h) : KviCanvasEllipticItem(c,x,y,w,h) { } @@ -279,7 +263,7 @@ int KviCanvasEllipse::rtti() const return KVI_CANVAS_RTTI_ELLIPSE; } -void KviCanvasEllipse::drawContent(QPainter &p) +void KviCanvasEllipse::drawContent(TQPainter &p) { p.drawEllipse((int)x(),(int)y(),width(),height()); } @@ -290,11 +274,11 @@ void KviCanvasEllipse::drawContent(QPainter &p) // -KviCanvasPie::KviCanvasPie(QCanvas * c,int x,int y,int w,int h) +KviCanvasPie::KviCanvasPie(TQCanvas * c,int x,int y,int w,int h) : KviCanvasEllipticItem(c,x,y,w,h) { - m_properties.insert("iStartAngle",QVariant((int)0)); - m_properties.insert("iExtensionAngle",QVariant((int)360)); + m_properties.insert("iStartAngle",TQVariant((int)0)); + m_properties.insert("iExtensionAngle",TQVariant((int)360)); } KviCanvasPie::~KviCanvasPie() @@ -306,7 +290,7 @@ int KviCanvasPie::rtti() const return KVI_CANVAS_RTTI_PIE; } -void KviCanvasPie::drawContent(QPainter &p) +void KviCanvasPie::drawContent(TQPainter &p) { int iStartAngle = m_properties["iStartAngle"].asInt() * 16; int iEndAngle = m_properties["iExtensionAngle"].asInt() * 16; @@ -320,11 +304,11 @@ void KviCanvasPie::drawContent(QPainter &p) // -KviCanvasChord::KviCanvasChord(QCanvas * c,int x,int y,int w,int h) +KviCanvasChord::KviCanvasChord(TQCanvas * c,int x,int y,int w,int h) : KviCanvasEllipticItem(c,x,y,w,h) { - m_properties.insert("iStartAngle",QVariant((int)0)); - m_properties.insert("iExtensionAngle",QVariant((int)360)); + m_properties.insert("iStartAngle",TQVariant((int)0)); + m_properties.insert("iExtensionAngle",TQVariant((int)360)); } KviCanvasChord::~KviCanvasChord() @@ -336,7 +320,7 @@ int KviCanvasChord::rtti() const return KVI_CANVAS_RTTI_CHORD; } -void KviCanvasChord::drawContent(QPainter &p) +void KviCanvasChord::drawContent(TQPainter &p) { int iStartAngle = m_properties["iStartAngle"].asInt() * 16; int iEndAngle = m_properties["iExtensionAngle"].asInt() * 16; @@ -348,14 +332,14 @@ void KviCanvasChord::drawContent(QPainter &p) // KviCanvasRectangle // -KviCanvasRectangle::KviCanvasRectangle(QCanvas * c,int x,int y,int w,int h) +KviCanvasRectangle::KviCanvasRectangle(TQCanvas * c,int x,int y,int w,int h) : KviCanvasRectangleItem(c,x,y,w,h) { - m_properties.insert("clrForeground",QVariant(QColor(0,0,0))); - m_properties.insert("uLineWidth",QVariant((unsigned int)0)); + m_properties.insert("clrForeground",TQVariant(TQColor(0,0,0))); + m_properties.insert("uLineWidth",TQVariant((unsigned int)0)); - m_properties.insert("clrBackground",QVariant(QColor(0,0,0))); - m_properties.insert("bHasBackground",QVariant(false,1)); + m_properties.insert("clrBackground",TQVariant(TQColor(0,0,0))); + m_properties.insert("bHasBackground",TQVariant(false,1)); } KviCanvasRectangle::~KviCanvasRectangle() @@ -368,27 +352,23 @@ int KviCanvasRectangle::rtti() const } -void KviCanvasRectangle::setProperty(const QString &property,const QVariant &val) +void KviCanvasRectangle::setProperty(const TQString &property,const TQVariant &val) { if(m_properties[property].isValid()) { - m_properties.replace(property,val); + m_properties.tqreplace(property,val); if((property == "clrForeground") || (property == "uLineWidth")) { - setPen(QPen(m_properties["clrForeground"].asColor(),m_properties["uLineWidth"].toInt())); + setPen(TQPen(m_properties["clrForeground"].asColor(),m_properties["uLineWidth"].toInt())); } else { hide(); show(); } } } -void KviCanvasRectangle::draw(QPainter & p) +void KviCanvasRectangle::draw(TQPainter & p) { -#if QT_VERSION >= 300 if(isEnabled()) -#else - if(enabled()) -#endif { if(m_properties["bHasBackground"].asBool()) { @@ -397,11 +377,7 @@ void KviCanvasRectangle::draw(QPainter & p) p.setPen(pen()); p.drawRect((int)x(),(int)y(),width(),height()); } -#if QT_VERSION >= 300 if(isSelected())drawSelection(p); -#else - if(selected())drawSelection(p); -#endif } ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -409,14 +385,14 @@ void KviCanvasRectangle::draw(QPainter & p) // KviCanvasRichText // -KviCanvasRichText::KviCanvasRichText(QCanvas * c,int x,int y,int w,int h) +KviCanvasRichText::KviCanvasRichText(TQCanvas * c,int x,int y,int w,int h) : KviCanvasRectangleItem(c,x,y,w,h) { - QFont f = QFont(); - f.setStyleHint(QFont::SansSerif); + TQFont f = TQFont(); + f.setStyleHint(TQFont::SansSerif); f.setPointSize(12); - m_properties.insert("szText",QVariant(QString("
Insert here your RICH TEXT
"))); - m_properties.insert("fntDefault",QVariant(f)); + m_properties.insert("szText",TQVariant(TQString("
Insert here your RICH TEXT
"))); + m_properties.insert("fntDefault",TQVariant(f)); } KviCanvasRichText::~KviCanvasRichText() @@ -428,28 +404,16 @@ int KviCanvasRichText::rtti() const return KVI_CANVAS_RTTI_RICHTEXT; } -void KviCanvasRichText::draw(QPainter & p) +void KviCanvasRichText::draw(TQPainter & p) { -#if QT_VERSION >= 300 if(isEnabled()) -#else - if(enabled()) -#endif { - QString szText = m_properties["szText"].asString(); - QSimpleRichText text(szText,m_properties["fntDefault"].asFont()); + TQString szText = m_properties["szText"].asString(); + TQSimpleRichText text(szText,m_properties["fntDefault"].asFont()); text.setWidth(width()); -#if QT_VERSION >= 300 - text.draw(&p,(int)x() + 1,(int)y() + 1,QRegion(QRect((int)x() + 1,(int)y() + 1,width(),height())),QColorGroup()); -#else - text.draw(&p,(int)x() + 1,(int)y() + 1,QRegion(QRect((int)x() + 1,(int)y() + 1,width(),height())),QPalette()); -#endif + text.draw(&p,(int)x() + 1,(int)y() + 1,TQRegion(TQRect((int)x() + 1,(int)y() + 1,width(),height())),TQColorGroup()); } -#if QT_VERSION >= 300 if(isSelected())drawSelection(p); -#else - if(selected())drawSelection(p); -#endif } @@ -461,24 +425,24 @@ void KviCanvasRichText::draw(QPainter & p) // -KviCanvasLine::KviCanvasLine(QCanvas * c,int x1,int y1,int x2,int y2) -: QCanvasLine(c) +KviCanvasLine::KviCanvasLine(TQCanvas * c,int x1,int y1,int x2,int y2) +: TQCanvasLine(c) { setPoints(x1,y1,x2,y2); - m_properties.insert("uLineWidth",QVariant((unsigned int)0)); - m_properties.insert("clrForeground",QVariant(QColor())); + m_properties.insert("uLineWidth",TQVariant((unsigned int)0)); + m_properties.insert("clrForeground",TQVariant(TQColor())); } KviCanvasLine::~KviCanvasLine() { } -void KviCanvasLine::setProperty(const QString &property,const QVariant &val) +void KviCanvasLine::setProperty(const TQString &property,const TQVariant &val) { - m_properties.replace(property,val); + m_properties.tqreplace(property,val); if((property == "uLineWidth") || (property == "clrForeground")) { - setPen(QPen(m_properties["clrForeground"].asColor(),m_properties["uLineWidth"].toInt())); + setPen(TQPen(m_properties["clrForeground"].asColor(),m_properties["uLineWidth"].toInt())); } } @@ -487,26 +451,18 @@ int KviCanvasLine::rtti() const return KVI_CANVAS_RTTI_LINE; } -void KviCanvasLine::draw(QPainter &p) +void KviCanvasLine::draw(TQPainter &p) { -#if QT_VERSION >= 300 if(isEnabled()) -#else - if(enabled()) -#endif { p.setPen(pen()); p.drawLine(startPoint(),endPoint()); } -#if QT_VERSION >= 300 if(isSelected()) -#else - if(selected()) -#endif { p.setRasterOp(NotROP); - p.setPen(QPen(DotLine)); + p.setPen(TQPen(DotLine)); p.drawLine(startPoint(),endPoint()); p.setRasterOp(CopyROP); } @@ -517,8 +473,8 @@ void KviCanvasLine::draw(QPainter &p) // KviCanvasView // -KviCanvasView::KviCanvasView(QCanvas * c,KviCanvasWidget * cw,QWidget * par) -: QCanvasView(c,par) +KviCanvasView::KviCanvasView(TQCanvas * c,KviCanvasWidget * cw,TQWidget * par) +: TQCanvasView(c,par) { m_pCanvasWidget = cw; m_state = Idle; @@ -610,7 +566,7 @@ void KviCanvasView::insertPolygonHexagon() #define M_PI 3.14159265358979323846 #endif -static void calcPolygonPoints(QPointArray &pnts,unsigned int nVertices) +static void calcPolygonPoints(TQPointArray &pnts,unsigned int nVertices) { double dDelta = (2 * M_PI) / nVertices; for(unsigned int i=0;iupdate(); } -void KviCanvasView::setItemSelected(QCanvasItem * it) +void KviCanvasView::setItemSelected(TQCanvasItem * it) { clearSelection(); it->setSelected(true); @@ -723,9 +679,9 @@ void KviCanvasView::clearSelection() -void KviCanvasView::beginDragLine(KviCanvasLine * it,const QPoint &p,bool bInitial) +void KviCanvasView::beginDragLine(KviCanvasLine * it,const TQPoint &p,bool bInitial) { - QPoint sp = it->startPoint(); + TQPoint sp = it->startPoint(); m_dragBegin = p - sp; @@ -755,26 +711,26 @@ void KviCanvasView::beginDragLine(KviCanvasLine * it,const QPoint &p,bool bIniti setCursor(pointingHandCursor); } -void KviCanvasView::dragLine(KviCanvasLine * it,const QPoint &p) +void KviCanvasView::dragLine(KviCanvasLine * it,const TQPoint &p) { switch(m_dragMode) { case Bottom: { - QPoint sp = it->startPoint(); + TQPoint sp = it->startPoint(); it->setPoints(sp.x(),sp.y(),p.x(),p.y()); } break; case Top: { - QPoint ep = it->endPoint(); + TQPoint ep = it->endPoint(); it->setPoints(p.x(),p.y(),ep.x(),ep.y()); } break; case All: { - QPoint sp = p - m_dragBegin; - QPoint ep = sp + (it->endPoint() - it->startPoint()); + TQPoint sp = p - m_dragBegin; + TQPoint ep = sp + (it->endPoint() - it->startPoint()); it->setPoints(sp.x(),sp.y(),ep.x(),ep.y()); } break; @@ -833,15 +789,15 @@ static double ssm_hypot(double a,double b) return sqrt((a * a) + (b * b)); } -void KviCanvasView::beginDragPolygon(KviCanvasPolygon * it,const QPoint &p,bool bShift,bool bCtrl) +void KviCanvasView::beginDragPolygon(KviCanvasPolygon * it,const TQPoint &p,bool bShift,bool bCtrl) { - m_dragBegin = QPoint((int)(p.x() - it->x()),(int)(p.y() - it->y())); + m_dragBegin = TQPoint((int)(p.x() - it->x()),(int)(p.y() - it->y())); - QPointArray pa = it->areaPoints(); + TQPointArray pa = it->areaPoints(); for(unsigned int i=0;iinternalPoints(); + TQPointArray pnt = it->internalPoints(); pnt.setPoint(m_dragPointIndex,(int)((p.x() - it->x()) / it->scaleFactor()),(int)((p.y() - it->y()) / it->scaleFactor())); it->setInternalPoints(pnt); } @@ -901,13 +857,13 @@ void KviCanvasView::dragPolygon(KviCanvasPolygon * it,const QPoint &p) break; case Rotate: { - QPoint act((int)(p.x() - it->x()),(int)(p.y() - it->y())); + TQPoint act((int)(p.x() - it->x()),(int)(p.y() - it->y())); double dAngle = ssm_2d_rotationAngle(m_dragBegin.x(),m_dragBegin.y(),act.x(),act.y()); // debug("%d,%d %d,%d %f",m_dragBegin.x(),m_dragBegin.y(),act.x(),act.y(),dAngle); - QPointArray thePoints = m_dragPointArray.copy(); + TQPointArray thePoints = m_dragPointArray.copy(); for(unsigned int i=0;iupdate(); } -void KviCanvasView::beginDragRectangle(KviCanvasRectangleItem * it,const QPoint & p,bool bInitial) +void KviCanvasView::beginDragRectangle(KviCanvasRectangleItem * it,const TQPoint & p,bool bInitial) { - m_dragBegin = QPoint((int)(p.x() - it->x()),(int)(p.y() - it->y())); + m_dragBegin = TQPoint((int)(p.x() - it->x()),(int)(p.y() - it->y())); if(bInitial) { @@ -998,7 +954,7 @@ void KviCanvasView::beginDragRectangle(KviCanvasRectangleItem * it,const QPoint setCursor(pointingHandCursor); } -void KviCanvasView::dragRectangle(KviCanvasRectangleItem * it,const QPoint & p) +void KviCanvasView::dragRectangle(KviCanvasRectangleItem * it,const TQPoint & p) { int aux1,aux2,aux3,aux4; @@ -1098,19 +1054,15 @@ void KviCanvasView::dragRectangle(KviCanvasRectangleItem * it,const QPoint & p) canvas()->update(); } -void KviCanvasView::contentsMouseMoveEvent(QMouseEvent *e) +void KviCanvasView::contentsMouseMoveEvent(TQMouseEvent *e) { -// QPoint p = inverseWorldMatrix().map(e->pos()); - QPoint p = e->pos(); +// TQPoint p = inverseWorldMatrix().map(e->pos()); + TQPoint p = e->pos(); if(e->state() & Qt::LeftButton) { if((m_dragMode != None) && (m_pSelectedItem)) { -#if QT_VERSION >= 300 if(m_pSelectedItem->isEnabled())m_pSelectedItem->setEnabled(false); -#else - if(m_pSelectedItem->enabled())m_pSelectedItem->setEnabled(false); -#endif switch(KVI_CANVAS_RTTI_CONTROL_TYPE(m_pSelectedItem)) { case KVI_CANVAS_RTTI_CONTROL_TYPE_RECTANGLE: @@ -1128,13 +1080,13 @@ void KviCanvasView::contentsMouseMoveEvent(QMouseEvent *e) // Without buttons if(m_state == Idle) { - QCanvasItemList l = canvas()->collisions(p); - QCanvasItemList::Iterator it = l.begin(); + TQCanvasItemList l = canvas()->collisions(p); + TQCanvasItemList::Iterator it = l.begin(); if(it != l.end()) { // Got an item - QCanvasItem * hit = (QCanvasItem *)*it; + TQCanvasItem * hit = (TQCanvasItem *)*it; // Now find the point on that we have clicked it if(hit == m_pSelectedItem) { @@ -1159,7 +1111,7 @@ void KviCanvasView::contentsMouseMoveEvent(QMouseEvent *e) } } -void KviCanvasView::contentsMouseReleaseEvent(QMouseEvent *e) +void KviCanvasView::contentsMouseReleaseEvent(TQMouseEvent *e) { if(m_dragMode != None) { @@ -1174,12 +1126,12 @@ void KviCanvasView::contentsMouseReleaseEvent(QMouseEvent *e) } } -void KviCanvasView::contentsMousePressEvent(QMouseEvent *e) +void KviCanvasView::contentsMousePressEvent(TQMouseEvent *e) { if(e->button() & Qt::LeftButton) { -// QPoint p = inverseWorldMatrix().map(e->pos()); - QPoint p = e->pos(); +// TQPoint p = inverseWorldMatrix().map(e->pos()); + TQPoint p = e->pos(); switch(m_state) { @@ -1193,13 +1145,13 @@ void KviCanvasView::contentsMousePressEvent(QMouseEvent *e) case Idle: { - QCanvasItemList l = canvas()->collisions(p); - QCanvasItemList::Iterator it = l.begin(); + TQCanvasItemList l = canvas()->collisions(p); + TQCanvasItemList::Iterator it = l.begin(); if(it != l.end()) { // Got an item - QCanvasItem * hit = *it; + TQCanvasItem * hit = *it; if(hit != m_pSelectedItem) { // Was not selected yet @@ -1216,7 +1168,7 @@ void KviCanvasView::contentsMousePressEvent(QMouseEvent *e) beginDragLine(((KviCanvasLine *)hit),p); break; case KVI_CANVAS_RTTI_CONTROL_TYPE_POLYGON: - beginDragPolygon(((KviCanvasPolygon *)hit),p,e->state() & Qt::ShiftButton,e->state() & Qt::ControlButton); + beginDragPolygon(((KviCanvasPolygon *)hit),p,e->state() & TQt::ShiftButton,e->state() & TQt::ControlButton); break; } } else { @@ -1231,7 +1183,7 @@ void KviCanvasView::contentsMousePressEvent(QMouseEvent *e) } -void KviCanvasView::propertyChanged(const QString &s,const QVariant &v) +void KviCanvasView::propertyChanged(const TQString &s,const TQVariant &v) { if(!m_pSelectedItem)return; @@ -1260,8 +1212,8 @@ void KviCanvasView::propertyChanged(const QString &s,const QVariant &v) -KviVariantTableItem::KviVariantTableItem(QTable * t,const QVariant & property) -: QTableItem(t,QTableItem::WhenCurrent,QString::null) +KviVariantTableItem::KviVariantTableItem(TQTable * t,const TQVariant & property) +: TQTableItem(t,TQTableItem::WhenCurrent,TQString()) { m_property = property; } @@ -1271,65 +1223,65 @@ KviVariantTableItem::~KviVariantTableItem() } -QWidget * KviVariantTableItem::createEditor() const +TQWidget * KviVariantTableItem::createEditor() const { switch(m_property.type()) { - case QVariant::String: + case TQVariant::String: { - QLineEdit * e = new QLineEdit(table()->viewport()); + TQLineEdit * e = new TQLineEdit(table()->viewport()); e->setText(m_property.toString()); return e; } break; - case QVariant::Int: + case TQVariant::Int: { - QLineEdit * e = new QLineEdit(table()->viewport()); - QString sz; + TQLineEdit * e = new TQLineEdit(table()->viewport()); + TQString sz; sz.setNum(m_property.toInt()); e->setText(sz); - e->setValidator(new QIntValidator(e)); + e->setValidator(new TQIntValidator(TQT_TQOBJECT(e))); return e; } break; - case QVariant::UInt: + case TQVariant::UInt: { - QLineEdit * e = new QLineEdit(table()->viewport()); - QString sz; + TQLineEdit * e = new TQLineEdit(table()->viewport()); + TQString sz; sz.setNum(m_property.toInt()); e->setText(sz); - QIntValidator * i = new QIntValidator(e); + TQIntValidator * i = new TQIntValidator(TQT_TQOBJECT(e)); i->setBottom(0); e->setValidator(i); return e; } break; - case QVariant::Bool: + case TQVariant::Bool: { - QComboBox * b = new QComboBox(false,table()->viewport()); + TQComboBox * b = new TQComboBox(false,table()->viewport()); b->insertItem("FALSE"); b->insertItem("TRUE"); b->setCurrentItem(m_property.toBool() ? 1 : 0); return b; } break; - case QVariant::Color: + case TQVariant::Color: { - QLineEdit * e = new QLineEdit(table()->viewport()); + TQLineEdit * e = new TQLineEdit(table()->viewport()); e->setText(m_property.toColor().name()); return e; } break; - case QVariant::Font: + case TQVariant::Font: { - QComboBox * b = new QComboBox(true,table()->viewport()); + TQComboBox * b = new TQComboBox(true,table()->viewport()); - QString tmp; - QString tmpDefault; - QFont f = QFont(); - f.setStyleHint(QFont::SansSerif); + TQString tmp; + TQString tmpDefault; + TQFont f = TQFont(); + f.setStyleHint(TQFont::SansSerif); tmpDefault = f.family(); - f.setStyleHint(QFont::TypeWriter); + f.setStyleHint(TQFont::TypeWriter); tmp.setNum(m_property.toFont().pointSize()); tmp.prepend(", "); tmp.prepend(m_property.toFont().family()); @@ -1346,7 +1298,7 @@ QWidget * KviVariantTableItem::createEditor() const b->insertItem(tmpDefault + ", 32"); b->insertItem(tmpDefault + ", 40"); b->insertItem(tmpDefault + ", 48"); - b->insertItem(f.family() + ", 12"); + b->insertItem(TQString(f.family()) + ", 12"); b->setCurrentItem(0); b->setCurrentItem(m_property.toBool() ? 1 : 0); @@ -1359,28 +1311,28 @@ QWidget * KviVariantTableItem::createEditor() const return 0; } -void KviVariantTableItem::setContentFromEditor(QWidget * w) +void KviVariantTableItem::setContentFromEditor(TQWidget * w) { switch(m_property.type()) { - case QVariant::String: - m_property = QVariant(((QLineEdit *)w)->text()); + case TQVariant::String: + m_property = TQVariant(((TQLineEdit *)w)->text()); break; - case QVariant::Int: - m_property = QVariant(((QLineEdit *)w)->text().toInt()); + case TQVariant::Int: + m_property = TQVariant(((TQLineEdit *)w)->text().toInt()); break; - case QVariant::UInt: - m_property = QVariant(((QLineEdit *)w)->text().toUInt()); + case TQVariant::UInt: + m_property = TQVariant(((TQLineEdit *)w)->text().toUInt()); break; - case QVariant::Bool: - m_property = QVariant(((QComboBox *)w)->currentItem(),1); + case TQVariant::Bool: + m_property = TQVariant(((TQComboBox *)w)->currentItem(),1); break; - case QVariant::Color: - m_property.asColor().setNamedColor(((QLineEdit *)w)->text()); + case TQVariant::Color: + m_property.asColor().setNamedColor(((TQLineEdit *)w)->text()); break; - case QVariant::Font: + case TQVariant::Font: { - KviStr txt = ((QComboBox *)w)->currentText(); + KviStr txt = ((TQComboBox *)w)->currentText(); if(txt.hasData()) { KviStr fam = txt; @@ -1392,7 +1344,7 @@ void KviVariantTableItem::setContentFromEditor(QWidget * w) bool bOk; unsigned int uSize = psz.toUInt(&bOk); if(!bOk)uSize = 12; - m_property = QVariant(QFont(fam.ptr(),uSize)); + m_property = TQVariant(TQFont(fam.ptr(),uSize)); } } @@ -1403,39 +1355,39 @@ void KviVariantTableItem::setContentFromEditor(QWidget * w) } -void KviVariantTableItem::paint(QPainter *p,const QColorGroup &cg,const QRect &cr,bool) +void KviVariantTableItem::paint(TQPainter *p,const TQColorGroup &cg,const TQRect &cr,bool) { p->fillRect(0,0,cr.width(),cr.height(),cg.base()); - if(m_property.type() == QVariant::Color) + if(m_property.type() == TQVariant::Color) { p->fillRect(3,3,cr.width() - 6,cr.height() - 6,m_property.asColor()); } else { - QString sz; + TQString sz; switch(m_property.type()) { - case QVariant::String: + case TQVariant::String: sz = m_property.toString(); break; - case QVariant::Bool: + case TQVariant::Bool: sz = m_property.toBool() ? "TRUE" : "FALSE"; break; - case QVariant::Font: + case TQVariant::Font: sz.setNum(m_property.toFont().pointSize()); sz.prepend(", "); sz.prepend(m_property.toFont().family()); break; - case QVariant::Int: + case TQVariant::Int: sz.setNum(m_property.toInt()); break; - case QVariant::UInt: + case TQVariant::UInt: sz.setNum(m_property.toUInt()); break; default: break; } p->setPen(cg.text()); - p->drawText(0,0,cr.width(),cr.height(),Qt::AlignLeft | Qt::AlignTop,sz); + p->drawText(0,0,cr.width(),cr.height(),TQt::AlignLeft | TQt::AlignTop,sz); } } @@ -1446,10 +1398,10 @@ void KviVariantTableItem::paint(QPainter *p,const QColorGroup &cg,const QRect &c // -KviCanvasItemPropertiesWidget::KviCanvasItemPropertiesWidget(QWidget * par) -: QTable(par) +KviCanvasItemPropertiesWidget::KviCanvasItemPropertiesWidget(TQWidget * par) +: TQTable(par) { - setSelectionMode(QTable::NoSelection); + setSelectionMode(TQTable::NoSelection); setColumnMovingEnabled(false); setRowMovingEnabled(false); setShowGrid(true); @@ -1457,7 +1409,7 @@ KviCanvasItemPropertiesWidget::KviCanvasItemPropertiesWidget(QWidget * par) setSorting(false); setLeftMargin(0); verticalHeader()->hide(); - connect(this,SIGNAL(valueChanged(int,int)),this,SLOT(cellEdited(int,int))); + connect(this,TQT_SIGNAL(valueChanged(int,int)),this,TQT_SLOT(cellEdited(int,int))); } KviCanvasItemPropertiesWidget::~KviCanvasItemPropertiesWidget() @@ -1466,15 +1418,15 @@ KviCanvasItemPropertiesWidget::~KviCanvasItemPropertiesWidget() void KviCanvasItemPropertiesWidget::cellEdited(int row,int) { - QTableItem * it = item(row,0); + TQTableItem * it = item(row,0); if(!it)return; - QString szName = it->text(); + TQString szName = it->text(); it = item(row,1); if(!it)return; emit propertyChanged(szName,((KviVariantTableItem *)it)->property()); } -void KviCanvasItemPropertiesWidget::editItem(QCanvasItem * it) +void KviCanvasItemPropertiesWidget::editItem(TQCanvasItem * it) { if(!it) { @@ -1488,7 +1440,7 @@ void KviCanvasItemPropertiesWidget::editItem(QCanvasItem * it) return; } - QMap * m = 0; + TQMap * m = 0; switch(KVI_CANVAS_RTTI_CONTROL_TYPE(it)) { @@ -1518,13 +1470,13 @@ void KviCanvasItemPropertiesWidget::editItem(QCanvasItem * it) setNumRows(m->count()); - QTableItem * item; + TQTableItem * item; int idx = 0; - for(QMap::ConstIterator iter = m->begin();iter != m->end();++iter) + for(TQMap::ConstIterator iter = m->begin();iter != m->end();++iter) { - item = new QTableItem(this,QTableItem::Never,iter.key().utf8().data()); + item = new TQTableItem(this,TQTableItem::Never,iter.key().utf8().data()); setItem(idx,0,item); item = new KviVariantTableItem(this,iter.data()); setItem(idx,1,item); @@ -1538,42 +1490,42 @@ void KviCanvasItemPropertiesWidget::editItem(QCanvasItem * it) // KviCanvasWidget // -KviCanvasWidget::KviCanvasWidget(QWidget * par) -: QWidget(par,"canvas_widget") +KviCanvasWidget::KviCanvasWidget(TQWidget * par) +: TQWidget(par,"canvas_widget") { - m_pCanvas = new QCanvas(this); + m_pCanvas = new TQCanvas(TQT_TQOBJECT(this)); //#warning "Make this size as parameter of Dcc ?" m_pCanvas->resize(648,480); - m_pMenuBar = new QMenuBar(this); - m_pSplitter = new QSplitter(QSplitter::Horizontal,this); + m_pMenuBar = new TQMenuBar(this); + m_pSplitter = new TQSplitter(Qt::Horizontal,this); m_pCanvasView = new KviCanvasView(m_pCanvas,this,m_pSplitter); - m_pStatusLabel = new QLabel(this); + m_pStatusLabel = new TQLabel(this); m_pPropertiesWidget = new KviCanvasItemPropertiesWidget(m_pSplitter); - QValueList l; + TQValueList l; l.append(80); l.append(20); m_pSplitter->setSizes(l); - connect(m_pPropertiesWidget,SIGNAL(propertyChanged(const QString &,const QVariant &)),m_pCanvasView,SLOT(propertyChanged(const QString &,const QVariant &))); + connect(m_pPropertiesWidget,TQT_SIGNAL(propertyChanged(const TQString &,const TQVariant &)),m_pCanvasView,TQT_SLOT(propertyChanged(const TQString &,const TQVariant &))); KviTalPopupMenu * add = new KviTalPopupMenu(m_pMenuBar); - KviTalPopupMenu * shapes = new KviTalPopupMenu(add); + KviTalPopupMenu * tqshapes = new KviTalPopupMenu(add); KviTalPopupMenu * polygons = new KviTalPopupMenu(add); KviTalPopupMenu * items = new KviTalPopupMenu(add); - shapes->insertItem(__tr2qs_ctx("&Line","dcc"),m_pCanvasView,SLOT(insertLine())); - shapes->insertItem(__tr2qs_ctx("&Rectangle","dcc"),m_pCanvasView,SLOT(insertRectangle())); - shapes->insertItem(__tr2qs_ctx("&Ellipse","dcc"),m_pCanvasView,SLOT(insertEllipse())); - shapes->insertItem(__tr2qs_ctx("&Pie","dcc"),m_pCanvasView,SLOT(insertPie())); - shapes->insertItem(__tr2qs_ctx("&Chord","dcc"),m_pCanvasView,SLOT(insertChord())); + tqshapes->insertItem(__tr2qs_ctx("&Line","dcc"),m_pCanvasView,TQT_SLOT(insertLine())); + tqshapes->insertItem(__tr2qs_ctx("&Rectangle","dcc"),m_pCanvasView,TQT_SLOT(insertRectangle())); + tqshapes->insertItem(__tr2qs_ctx("&Ellipse","dcc"),m_pCanvasView,TQT_SLOT(insertEllipse())); + tqshapes->insertItem(__tr2qs_ctx("&Pie","dcc"),m_pCanvasView,TQT_SLOT(insertPie())); + tqshapes->insertItem(__tr2qs_ctx("&Chord","dcc"),m_pCanvasView,TQT_SLOT(insertChord())); - items->insertItem(__tr2qs_ctx("&Rich text (html)","dcc"),m_pCanvasView,SLOT(insertRichText())); + items->insertItem(__tr2qs_ctx("&Rich text (html)","dcc"),m_pCanvasView,TQT_SLOT(insertRichText())); - polygons->insertItem(__tr2qs_ctx("&Triangle","dcc"),m_pCanvasView,SLOT(insertPolygonTriangle())); - polygons->insertItem(__tr2qs_ctx("&Rectangle","dcc"),m_pCanvasView,SLOT(insertPolygonRectangle())); - polygons->insertItem(__tr2qs_ctx("&Pentagon","dcc"),m_pCanvasView,SLOT(insertPolygonPentagon())); - polygons->insertItem(__tr2qs_ctx("&Hexagon","dcc"),m_pCanvasView,SLOT(insertPolygonHexagon())); + polygons->insertItem(__tr2qs_ctx("&Triangle","dcc"),m_pCanvasView,TQT_SLOT(insertPolygonTriangle())); + polygons->insertItem(__tr2qs_ctx("&Rectangle","dcc"),m_pCanvasView,TQT_SLOT(insertPolygonRectangle())); + polygons->insertItem(__tr2qs_ctx("&Pentagon","dcc"),m_pCanvasView,TQT_SLOT(insertPolygonPentagon())); + polygons->insertItem(__tr2qs_ctx("&Hexagon","dcc"),m_pCanvasView,TQT_SLOT(insertPolygonHexagon())); - add->insertItem(__tr2qs_ctx("&Shape","dcc"),shapes); + add->insertItem(__tr2qs_ctx("&Shape","dcc"),tqshapes); add->insertItem(__tr2qs_ctx("&Item","dcc"),items); add->insertItem(__tr2qs_ctx("&Polygons","dcc"),polygons); @@ -1586,11 +1538,11 @@ KviCanvasWidget::~KviCanvasWidget() -void KviCanvasWidget::resizeEvent(QResizeEvent *) +void KviCanvasWidget::resizeEvent(TQResizeEvent *) { - int h = m_pMenuBar->sizeHint().height(); + int h = m_pMenuBar->tqsizeHint().height(); m_pMenuBar->setGeometry(0,0,width(),h); - int h2 = m_pStatusLabel->sizeHint().height(); + int h2 = m_pStatusLabel->tqsizeHint().height(); m_pStatusLabel->setGeometry(0,height() - h2,width(),h2); m_pSplitter->setGeometry(0,h,width(),height() - (h + h2)); } diff --git a/src/modules/dcc/canvaswidget.h b/src/modules/dcc/canvaswidget.h index 41d451e4..04867502 100644 --- a/src/modules/dcc/canvaswidget.h +++ b/src/modules/dcc/canvaswidget.h @@ -27,20 +27,20 @@ #ifdef COMPILE_DCC_CANVAS -#include +#include -//#ifdef QT_NO_CANVAS +//#ifdef TQT_NO_CANVAS // #warning "HEre is not" //#endif -#include -#include +#include +#include -#include -#include -#include -#include +#include +#include +#include +#include @@ -66,49 +66,49 @@ class KviCanvasWidget; -class KviCanvasPolygon : public QCanvasPolygon +class KviCanvasPolygon : public TQCanvasPolygon { public: - KviCanvasPolygon(QCanvas * c,int x,int y,QPointArray &pnts,double dScaleFactor); + KviCanvasPolygon(TQCanvas * c,int x,int y,TQPointArray &pnts,double dScaleFactor); virtual ~KviCanvasPolygon(); protected: - QMap m_properties; + TQMap m_properties; double m_dScaleFactor; - QPointArray m_points; + TQPointArray m_points; public: - virtual void draw(QPainter & p); + virtual void draw(TQPainter & p); double scaleFactor(){ return m_dScaleFactor; }; void setScaleFactor(double dScaleFactor); void resetPoints(); - const QPointArray & internalPoints(){ return m_points; }; - void setInternalPoints(const QPointArray &pnts); - QMap * properties(){ return &m_properties; }; - virtual void setProperty(const QString &property,const QVariant &val); + const TQPointArray & internalPoints(){ return m_points; }; + void setInternalPoints(const TQPointArray &pnts); + TQMap * properties(){ return &m_properties; }; + virtual void setProperty(const TQString &property,const TQVariant &val); virtual int rtti() const; }; -class KviCanvasRectangleItem : public QCanvasRectangle +class KviCanvasRectangleItem : public TQCanvasRectangle { friend class KviCanvasRectangle; friend class KviCanvasRichText; friend class KviCanvasEllipticItem; protected: - KviCanvasRectangleItem(QCanvas * c,int x,int y,int w,int h); + KviCanvasRectangleItem(TQCanvas * c,int x,int y,int w,int h); public: virtual ~KviCanvasRectangleItem(); protected: - QMap m_properties; + TQMap m_properties; public: int right(){ return ((int)x()) + width(); }; int bottom(){ return ((int)y()) + height(); }; - QMap * properties(){ return &m_properties; }; - virtual void setProperty(const QString &property,const QVariant &val); -// QVariant property(const QString &name){ return m_properties[name]; }; + TQMap * properties(){ return &m_properties; }; + virtual void setProperty(const TQString &property,const TQVariant &val); +// TQVariant property(const TQString &name){ return m_properties[name]; }; protected: - void drawSelection(QPainter &p); + void drawSelection(TQPainter &p); }; @@ -118,12 +118,12 @@ class KviCanvasEllipticItem : public KviCanvasRectangleItem friend class KviCanvasChord; friend class KviCanvasPie; protected: - KviCanvasEllipticItem(QCanvas * c,int x,int y,int w,int h); + KviCanvasEllipticItem(TQCanvas * c,int x,int y,int w,int h); ~KviCanvasEllipticItem(); public: - virtual void setProperty(const QString & property,const QVariant &val); - virtual void draw(QPainter & p); - virtual void drawContent(QPainter & p); + virtual void setProperty(const TQString & property,const TQVariant &val); + virtual void draw(TQPainter & p); + virtual void drawContent(TQPainter & p); virtual int rtti() const; }; @@ -131,10 +131,10 @@ public: class KviCanvasEllipse : public KviCanvasEllipticItem { public: - KviCanvasEllipse(QCanvas * c,int x,int y,int w,int h); + KviCanvasEllipse(TQCanvas * c,int x,int y,int w,int h); ~KviCanvasEllipse(); public: - virtual void drawContent(QPainter & p); + virtual void drawContent(TQPainter & p); virtual int rtti() const; }; @@ -142,10 +142,10 @@ public: class KviCanvasPie : public KviCanvasEllipticItem { public: - KviCanvasPie(QCanvas * c,int x,int y,int w,int h); + KviCanvasPie(TQCanvas * c,int x,int y,int w,int h); ~KviCanvasPie(); public: - virtual void drawContent(QPainter & p); + virtual void drawContent(TQPainter & p); virtual int rtti() const; }; @@ -153,26 +153,26 @@ public: class KviCanvasChord : public KviCanvasEllipticItem { public: - KviCanvasChord(QCanvas * c,int x,int y,int w,int h); + KviCanvasChord(TQCanvas * c,int x,int y,int w,int h); ~KviCanvasChord(); public: - virtual void drawContent(QPainter & p); + virtual void drawContent(TQPainter & p); virtual int rtti() const; }; -class KviCanvasLine : public QCanvasLine +class KviCanvasLine : public TQCanvasLine { public: - KviCanvasLine(QCanvas * c,int x1,int y1,int x2,int y2); + KviCanvasLine(TQCanvas * c,int x1,int y1,int x2,int y2); virtual ~KviCanvasLine(); protected: - QMap m_properties; + TQMap m_properties; public: - QMap * properties(){ return &m_properties; }; - virtual void setProperty(const QString &property,const QVariant &val); -// QVariant property(const QString &name){ return m_properties[name]; }; - virtual void draw(QPainter & p); + TQMap * properties(){ return &m_properties; }; + virtual void setProperty(const TQString &property,const TQVariant &val); +// TQVariant property(const TQString &name){ return m_properties[name]; }; + virtual void draw(TQPainter & p); virtual int rtti() const; }; @@ -181,11 +181,11 @@ public: class KviCanvasRectangle : public KviCanvasRectangleItem { public: - KviCanvasRectangle(QCanvas * c,int x,int y,int w,int h); + KviCanvasRectangle(TQCanvas * c,int x,int y,int w,int h); ~KviCanvasRectangle(); public: - virtual void draw(QPainter & p); - virtual void setProperty(const QString &property,const QVariant &val); + virtual void draw(TQPainter & p); + virtual void setProperty(const TQString &property,const TQVariant &val); virtual int rtti() const; }; @@ -193,19 +193,20 @@ public: class KviCanvasRichText : public KviCanvasRectangleItem { public: - KviCanvasRichText(QCanvas * c,int x,int y,int w,int h); + KviCanvasRichText(TQCanvas * c,int x,int y,int w,int h); ~KviCanvasRichText(); public: - virtual void draw(QPainter & p); + virtual void draw(TQPainter & p); virtual int rtti() const; }; -class KviCanvasView : public QCanvasView +class KviCanvasView : public TQCanvasView { Q_OBJECT + TQ_OBJECT public: - KviCanvasView(QCanvas * c,KviCanvasWidget * cw,QWidget * par); + KviCanvasView(TQCanvas * c,KviCanvasWidget * cw,TQWidget * par); ~KviCanvasView(); public: enum State { Idle , SelectOrigin }; @@ -226,30 +227,30 @@ protected: ObjectType m_objectToInsert; // Selected item - QCanvasItem * m_pSelectedItem; + TQCanvasItem * m_pSelectedItem; DragMode m_dragMode; - QPoint m_dragBegin; + TQPoint m_dragBegin; double m_dragScaleFactor; unsigned int m_dragPointIndex; - QPointArray m_dragPointArray; + TQPointArray m_dragPointArray; protected: - void beginDragRectangle(KviCanvasRectangleItem * it,const QPoint &p,bool bInitial = false); - void dragRectangle(KviCanvasRectangleItem * it,const QPoint & p); + void beginDragRectangle(KviCanvasRectangleItem * it,const TQPoint &p,bool bInitial = false); + void dragRectangle(KviCanvasRectangleItem * it,const TQPoint & p); - void beginDragLine(KviCanvasLine * it,const QPoint &p,bool bInitial = false); - void dragLine(KviCanvasLine * it,const QPoint &p); + void beginDragLine(KviCanvasLine * it,const TQPoint &p,bool bInitial = false); + void dragLine(KviCanvasLine * it,const TQPoint &p); - void beginDragPolygon(KviCanvasPolygon * it,const QPoint &p,bool bShift = false,bool bCtrl = false); - void dragPolygon(KviCanvasPolygon * it,const QPoint &p); + void beginDragPolygon(KviCanvasPolygon * it,const TQPoint &p,bool bShift = false,bool bCtrl = false); + void dragPolygon(KviCanvasPolygon * it,const TQPoint &p); - void setItemSelected(QCanvasItem * it); + void setItemSelected(TQCanvasItem * it); void clearSelection(); - void insertObjectAt(const QPoint & pnt,ObjectType o); - virtual void contentsMousePressEvent(QMouseEvent *e); - virtual void contentsMouseMoveEvent(QMouseEvent *e); - virtual void contentsMouseReleaseEvent(QMouseEvent *e); + void insertObjectAt(const TQPoint & pnt,ObjectType o); + virtual void contentsMousePressEvent(TQMouseEvent *e); + virtual void contentsMouseMoveEvent(TQMouseEvent *e); + virtual void contentsMouseReleaseEvent(TQMouseEvent *e); public slots: void insertRectangle(); void insertRichText(); @@ -261,59 +262,61 @@ public slots: void insertPolygonRectangle(); void insertPolygonPentagon(); void insertPolygonHexagon(); - void propertyChanged(const QString &s,const QVariant &v); + void propertyChanged(const TQString &s,const TQVariant &v); }; -// For Qt3.0 this might need to be changed +// For TQt3.0 this might need to be changed -class KviVariantTableItem : public QTableItem +class KviVariantTableItem : public TQTableItem { public: - KviVariantTableItem(QTable * t,const QVariant & property); + KviVariantTableItem(TQTable * t,const TQVariant & property); ~KviVariantTableItem(); private: - QVariant m_property; + TQVariant m_property; public: - virtual QWidget * createEditor() const; - virtual void setContentFromEditor(QWidget *w); - QVariant & property(){ return m_property; }; - virtual void paint(QPainter *p,const QColorGroup &cg,const QRect &cr,bool selected); + virtual TQWidget * createEditor() const; + virtual void setContentFromEditor(TQWidget *w); + TQVariant & property(){ return m_property; }; + virtual void paint(TQPainter *p,const TQColorGroup &cg,const TQRect &cr,bool selected); }; -class KviCanvasItemPropertiesWidget : public QTable +class KviCanvasItemPropertiesWidget : public TQTable { Q_OBJECT + TQ_OBJECT public: - KviCanvasItemPropertiesWidget(QWidget * par); + KviCanvasItemPropertiesWidget(TQWidget * par); ~KviCanvasItemPropertiesWidget(); public: - void editItem(QCanvasItem * it); + void editItem(TQCanvasItem * it); protected slots: void cellEdited(int row,int col); signals: - void propertyChanged(const QString &s,const QVariant &v); + void propertyChanged(const TQString &s,const TQVariant &v); }; -class KviCanvasWidget : public QWidget +class KviCanvasWidget : public TQWidget { friend class KviCanvasView; Q_OBJECT + TQ_OBJECT public: - KviCanvasWidget(QWidget * par); + KviCanvasWidget(TQWidget * par); ~KviCanvasWidget(); protected: - QSplitter * m_pSplitter; - QCanvas * m_pCanvas; - QMenuBar * m_pMenuBar; + TQSplitter * m_pSplitter; + TQCanvas * m_pCanvas; + TQMenuBar * m_pMenuBar; KviCanvasView * m_pCanvasView; - QLabel * m_pStatusLabel; + TQLabel * m_pStatusLabel; KviCanvasItemPropertiesWidget * m_pPropertiesWidget; protected: - virtual void resizeEvent(QResizeEvent *); + virtual void resizeEvent(TQResizeEvent *); }; diff --git a/src/modules/dcc/chat.cpp b/src/modules/dcc/chat.cpp index 715d17b9..09778d76 100644 --- a/src/modules/dcc/chat.cpp +++ b/src/modules/dcc/chat.cpp @@ -63,8 +63,8 @@ #include "kvi_mirccntrl.h" #endif -#include -#include +#include +#include #include "kvi_tal_vbox.h" @@ -89,7 +89,7 @@ extern KviDccBroker * g_pDccBroker; KviDccChat::KviDccChat(KviFrame *pFrm,KviDccDescriptor * dcc,const char * name) : KviDccWindow(KVI_WINDOW_TYPE_DCCCHAT,pFrm,name,dcc) { - m_pTopSplitter = new QSplitter(Qt::Horizontal,this,"top_splitter"); + m_pTopSplitter = new TQSplitter(Qt::Horizontal,this,"top_splitter"); KviThemedLabel * dummy; dummy = new KviThemedLabel(m_pTopSplitter,"dummy_label"); KviTalVBox * box = new KviTalVBox(m_pTopSplitter); @@ -98,9 +98,9 @@ KviDccChat::KviDccChat(KviFrame *pFrm,KviDccDescriptor * dcc,const char * name) createCryptControllerButton(box); #endif - m_pSplitter = new QSplitter(Qt::Horizontal,this,"splitter"); + m_pSplitter = new TQSplitter(Qt::Horizontal,this,"splitter"); m_pIrcView = new KviIrcView(m_pSplitter,pFrm,this); - connect(m_pIrcView,SIGNAL(rightClicked()),this,SLOT(textViewRightClicked())); + connect(m_pIrcView,TQT_SIGNAL(rightClicked()),this,TQT_SLOT(textViewRightClicked())); m_pInput = new KviInput(this); //setFocusHandler(m_pInput,this); @@ -110,12 +110,12 @@ KviDccChat::KviDccChat(KviFrame *pFrm,KviDccDescriptor * dcc,const char * name) if(KVI_OPTION_BOOL(KviOption_boolAutoLogDccChat))m_pIrcView->startLogging(); m_pMarshal = new KviDccMarshal(this); - connect(m_pMarshal,SIGNAL(error(int)),this,SLOT(handleMarshalError(int))); - connect(m_pMarshal,SIGNAL(connected()),this,SLOT(connected())); - connect(m_pMarshal,SIGNAL(inProgress()),this,SLOT(connectionInProgress())); + connect(m_pMarshal,TQT_SIGNAL(error(int)),this,TQT_SLOT(handleMarshalError(int))); + connect(m_pMarshal,TQT_SIGNAL(connected()),this,TQT_SLOT(connected())); + connect(m_pMarshal,TQT_SIGNAL(inProgress()),this,TQT_SLOT(connectionInProgress())); #ifdef COMPILE_SSL_SUPPORT - connect(m_pMarshal,SIGNAL(startingSSLHandshake()),this,SLOT(startingSSLHandshake())); - connect(m_pMarshal,SIGNAL(sslError(const char *)),this,SLOT(sslError(const char *))); + connect(m_pMarshal,TQT_SIGNAL(startingSSLHandshake()),this,TQT_SLOT(startingSSLHandshake())); + connect(m_pMarshal,TQT_SIGNAL(sslError(const char *)),this,TQT_SLOT(sslError(const char *))); #endif m_pSlaveThread = 0; @@ -132,7 +132,7 @@ KviDccChat::~KviDccChat() delete m_pSlaveThread; m_pSlaveThread = 0; } - KviThreadManager::killPendingEvents(this); + KviThreadManager::killPendingEvents(TQT_TQOBJECT(this)); } void KviDccChat::textViewRightClicked() @@ -215,13 +215,13 @@ void KviDccChat::connectionInProgress() } } - QString port = !m_pDescriptor->szFakePort.isEmpty() ? m_pDescriptor->szFakePort : QString(m_pMarshal->localPort()); + TQString port = !m_pDescriptor->szFakePort.isEmpty() ? m_pDescriptor->szFakePort : TQString(m_pMarshal->localPort()); //FIXME: #warning "OPTION FOR SENDING 127.0.0.1 and so on (not an unsigned number)" struct in_addr a; if(kvi_stringIpToBinaryIp(ip.ptr(),&a))ip.setNum(htonl(a.s_addr)); - QString szReq = QString("PRIVMSG %1 :%2DCC %3 chat %4 %5").arg(m_pDescriptor->szNick).arg((char)0x01).arg(m_pDescriptor->szType).arg(ip.ptr()).arg(port); + TQString szReq = TQString("PRIVMSG %1 :%2DCC %3 chat %4 %5").tqarg(m_pDescriptor->szNick).tqarg((char)0x01).tqarg(m_pDescriptor->szType).tqarg(ip.ptr()).tqarg(port); if(m_pDescriptor->isZeroPortRequest()) { @@ -250,12 +250,12 @@ void KviDccChat::startingSSLHandshake() void KviDccChat::sslError(const char * msg) { #ifdef COMPILE_SSL_SUPPORT - if(!KVS_TRIGGER_EVENT_2_HALTED(KviEvent_OnDCCChatError,this,QString(msg),m_pDescriptor->idString())) + if(!KVS_TRIGGER_EVENT_2_HALTED(KviEvent_OnDCCChatError,this,TQString(msg),m_pDescriptor->idString())) output(KVI_OUT_DCCERROR,__tr2qs_ctx("[SSL ERROR]: %s","dcc"),msg); #endif } -const QString & KviDccChat::target() +const TQString & KviDccChat::target() { // This may change on the fly... m_szTarget = m_pDescriptor->szNick; @@ -268,23 +268,23 @@ const QString & KviDccChat::target() void KviDccChat::fillCaptionBuffers() { - QString tmp = QString("DCC %1 %2@%3:%4").arg( + TQString tmp = TQString("DCC %1 %2@%3:%4").tqarg( #ifdef COMPILE_SSL_SUPPORT - m_pDescriptor->bIsSSL ? "SChat" : "Chat").arg( + m_pDescriptor->bIsSSL ? "SChat" : "Chat").tqarg( #else - "Chat").arg( + "Chat").tqarg( #endif - m_pDescriptor->szNick).arg(m_pDescriptor->szIp).arg(m_pDescriptor->szPort); + m_pDescriptor->szNick).tqarg(m_pDescriptor->szIp).tqarg(m_pDescriptor->szPort); m_szPlainTextCaption = tmp; m_szHtmlActiveCaption.sprintf("%s", - KVI_OPTION_COLOR(KviOption_colorCaptionTextActive).name().ascii(),tmp.utf8().data()); + TQString(KVI_OPTION_COLOR(KviOption_colorCaptionTextActive).name()).ascii(),tmp.utf8().data()); m_szHtmlInactiveCaption.sprintf("%s", - KVI_OPTION_COLOR(KviOption_colorCaptionTextInactive).name().ascii(),tmp.utf8().data()); + TQString(KVI_OPTION_COLOR(KviOption_colorCaptionTextInactive).name()).ascii(),tmp.utf8().data()); } -QPixmap * KviDccChat::myIconPtr() +TQPixmap * KviDccChat::myIconPtr() { return g_pIconManager->getSmallIcon(KVI_SMALLICON_DCCMSG); } @@ -295,7 +295,7 @@ void KviDccChat::getBaseLogFileName(KviStr &buffer) buffer.sprintf("%s_%s_%s",m_pDescriptor->szNick.utf8().data(),m_pDescriptor->szIp.utf8().data(),m_pDescriptor->szPort.utf8().data()); } -void KviDccChat::ownMessage(const QString &text) +void KviDccChat::ownMessage(const TQString &text) { if(!m_pSlaveThread) { @@ -303,7 +303,7 @@ void KviDccChat::ownMessage(const QString &text) return; } - KviQCString szData = encodeText(text); + KviTQCString szData = encodeText(text); const char * d = szData.data(); if(!d)return; @@ -331,7 +331,7 @@ void KviDccChat::ownMessage(const QString &text) { KviStr buf(KviStr::Format,"%s\r\n",encrypted.ptr()); m_pSlaveThread->sendRawData(buf.ptr(),buf.len()); - QString encr = decodeText(encrypted.ptr()); + TQString encr = decodeText(encrypted.ptr()); m_pFrm->firstConsole()->outputPrivmsg(this,KVI_OUT_OWNPRIVMSG, m_pDescriptor->szLocalNick.utf8().data(),m_pDescriptor->szLocalUser.utf8().data(), m_pDescriptor->szLocalHost.utf8().data(),encr,KviConsole::NoNotifications); @@ -339,7 +339,7 @@ void KviDccChat::ownMessage(const QString &text) break; default: // also case KviCryptEngine::EncryptError { - QString szErr = cryptSessionInfo()->pEngine->lastError(); + TQString szErr = cryptSessionInfo()->pEngine->lastError(); output(KVI_OUT_SYSTEMERROR, __tr2qs_ctx("The crypto engine was not able to encrypt the current message (%Q): %Q, no data was sent to the remote end","dcc"), &text,&szErr); @@ -350,7 +350,7 @@ void KviDccChat::ownMessage(const QString &text) } else { d++; //eat the escape code KviStr buf(KviStr::Format,"%s\r\n",d); - QString tmp = text.right(text.length() - 1); + TQString tmp = text.right(text.length() - 1); m_pSlaveThread->sendRawData(buf.ptr(),buf.len()); m_pFrm->firstConsole()->outputPrivmsg(this,KVI_OUT_OWNPRIVMSG, m_pDescriptor->szLocalNick.utf8().data(),m_pDescriptor->szLocalUser.utf8().data(), @@ -367,18 +367,18 @@ void KviDccChat::ownMessage(const QString &text) m_pDescriptor->szLocalHost.utf8().data(),text,KviConsole::NoNotifications); } -const QString & KviDccChat::localNick() +const TQString & KviDccChat::localNick() { // FIXME: This is just a complete HACK m_szLocalNick = m_pDescriptor->szLocalNick; return m_szLocalNick; } -void KviDccChat::ownAction(const QString &text) +void KviDccChat::ownAction(const TQString &text) { if(m_pSlaveThread) { - KviQCString szData = encodeText(text); + KviTQCString szData = encodeText(text); const char * d = szData.data(); if(!d)return; KviStr buf(KviStr::Format,"%cACTION %s%c\r\n",0x01,d,0x01); @@ -389,7 +389,7 @@ void KviDccChat::ownAction(const QString &text) } } -bool KviDccChat::event(QEvent *e) +bool KviDccChat::event(TQEvent *e) { if(e->type() == KVI_THREAD_EVENT) { @@ -398,7 +398,7 @@ bool KviDccChat::event(QEvent *e) case KVI_DCC_THREAD_EVENT_ERROR: { int * err = ((KviThreadDataEvent *)e)->getData(); - QString szErr = KviError::getDescription(*err); + TQString szErr = KviError::getDescription(*err); if(!KVS_TRIGGER_EVENT_2_HALTED(KviEvent_OnDCCChatError,this,szErr,m_pDescriptor->idString())) output(KVI_OUT_DCCERROR,__tr2qs_ctx("ERROR: %Q","dcc"),&szErr); KVS_TRIGGER_EVENT_1(KviEvent_OnDCCChatDisconnected,this,m_pDescriptor->idString()); @@ -430,7 +430,7 @@ bool KviDccChat::event(QEvent *e) case KviCryptEngine::DecryptOkWasEncrypted: case KviCryptEngine::DecryptOkWasEncoded: case KviCryptEngine::DecryptOkWasPlainText: - if(!KVS_TRIGGER_EVENT_2_HALTED(KviEvent_OnDCCChatMessage,this,QString(decryptedStuff.ptr()),m_pDescriptor->idString())) + if(!KVS_TRIGGER_EVENT_2_HALTED(KviEvent_OnDCCChatMessage,this,TQString(decryptedStuff.ptr()),m_pDescriptor->idString())) { m_pFrm->firstConsole()->outputPrivmsg(this,KVI_OUT_DCCCHATMSG, m_pDescriptor->szNick.utf8().data(),m_pDescriptor->szUser.utf8().data(), @@ -442,7 +442,7 @@ bool KviDccChat::event(QEvent *e) default: // also case KviCryptEngine::DecryptError { - QString szErr = cinf->pEngine->lastError(); + TQString szErr = cinf->pEngine->lastError(); output(KVI_OUT_SYSTEMERROR, __tr2qs_ctx("The following message appears to be encrypted, but the crypto engine failed to decode it: %Q","dcc"), &szErr); @@ -453,7 +453,7 @@ bool KviDccChat::event(QEvent *e) } else { #endif // FIXME! - if(!KVS_TRIGGER_EVENT_2_HALTED(KviEvent_OnDCCChatMessage,this,QString(d.ptr()),m_pDescriptor->idString())) + if(!KVS_TRIGGER_EVENT_2_HALTED(KviEvent_OnDCCChatMessage,this,TQString(d.ptr()),m_pDescriptor->idString())) m_pFrm->firstConsole()->outputPrivmsg(this,KVI_OUT_DCCCHATMSG, m_pDescriptor->szNick.utf8().data(),m_pDescriptor->szUser.utf8().data(), m_pDescriptor->szHost.utf8().data(),d.ptr()); @@ -470,25 +470,25 @@ bool KviDccChat::event(QEvent *e) return KviWindow::event(e); } -void KviDccChat::resizeEvent(QResizeEvent *e) +void KviDccChat::resizeEvent(TQResizeEvent *e) { int hght = m_pInput->heightHint(); - int hght2 = m_pTopSplitter->sizeHint().height(); + int hght2 = m_pTopSplitter->tqsizeHint().height(); m_pTopSplitter->setGeometry(0,0,width(),hght2); m_pSplitter->setGeometry(0,hght2,width(),height() - (hght + hght2)); m_pInput->setGeometry(0,height() - hght,width(),hght); } -QSize KviDccChat::sizeHint() const +TQSize KviDccChat::tqsizeHint() const { - QSize ret(m_pIrcView->sizeHint().width(), - m_pIrcView->sizeHint().height() + m_pInput->heightHint()); + TQSize ret(m_pIrcView->tqsizeHint().width(), + m_pIrcView->tqsizeHint().height() + m_pInput->heightHint()); return ret; } void KviDccChat::handleMarshalError(int err) { - QString szErr = KviError::getDescription(err); + TQString szErr = KviError::getDescription(err); if(!KVS_TRIGGER_EVENT_2_HALTED(KviEvent_OnDCCChatError,this,szErr,m_pDescriptor->idString())) output(KVI_OUT_DCCERROR,__tr2qs_ctx("DCC %Q failed: %Q","dcc"),&(m_pDescriptor->szType),&szErr); } @@ -537,7 +537,7 @@ void KviDccChat::connected() KviDccChatThread::KviDccChatThread(KviWindow *wnd,kvi_socket_t fd) -: KviDccThread(wnd,fd) +: KviDccThread(TQT_TQOBJECT(wnd),fd) { m_pOutBuffers = new KviPointerList; m_pOutBuffers->setAutoDelete(true); @@ -714,7 +714,7 @@ bool KviDccChatThread::handleIncomingData(KviDccThreadIncomingData * data,bool b kvi_free(data->buffer); data->buffer = end = aux = 0; } - postEvent(parent(),e); + postEvent(tqparent(),e); } else aux++; // debug("PASSING CHAR %c",*aux); } @@ -732,7 +732,7 @@ bool KviDccChatThread::handleIncomingData(KviDccThreadIncomingData * data,bool b data->iLen = 0; kvi_free(data->buffer); data->buffer = 0; - postEvent(parent(),e); + postEvent(tqparent(),e); } } return true; diff --git a/src/modules/dcc/chat.h b/src/modules/dcc/chat.h index ae1d51b9..c2785915 100644 --- a/src/modules/dcc/chat.h +++ b/src/modules/dcc/chat.h @@ -61,30 +61,31 @@ public: }; class KviDccMarshal; -class QSplitter; +class TQSplitter; class KviDccChat : public KviDccWindow { Q_OBJECT + TQ_OBJECT public: KviDccChat(KviFrame *pFrm,KviDccDescriptor * dcc,const char * name); ~KviDccChat(); protected: KviDccChatThread * m_pSlaveThread; - QSplitter * m_pTopSplitter; - QString m_szTarget; - QString m_szLocalNick; + TQSplitter * m_pTopSplitter; + TQString m_szTarget; + TQString m_szLocalNick; protected: - virtual const QString & target(); + virtual const TQString & target(); virtual void fillCaptionBuffers(); virtual void getBaseLogFileName(KviStr &buffer); - virtual QPixmap * myIconPtr(); - virtual void resizeEvent(QResizeEvent *e); - virtual QSize sizeHint() const; - virtual const QString & localNick(); - virtual bool event(QEvent *e); - virtual void ownMessage(const QString &text); - virtual void ownAction(const QString &text); + virtual TQPixmap * myIconPtr(); + virtual void resizeEvent(TQResizeEvent *e); + virtual TQSize tqsizeHint() const; + virtual const TQString & localNick(); + virtual bool event(TQEvent *e); + virtual void ownMessage(const TQString &text); + virtual void ownAction(const TQString &text); virtual void triggerCreationEvents(); virtual void triggerDestructionEvents(); void startConnection(); diff --git a/src/modules/dcc/descriptor.cpp b/src/modules/dcc/descriptor.cpp index b21b0561..71108210 100644 --- a/src/modules/dcc/descriptor.cpp +++ b/src/modules/dcc/descriptor.cpp @@ -65,7 +65,7 @@ KviDccDescriptor::KviDccDescriptor(KviConsole * pConsole) g_pDescriptorDict = new KviPointerHashTable; g_pDescriptorDict->setAutoDelete(false); } - g_pDescriptorDict->replace((long)m_uId,this); + g_pDescriptorDict->tqreplace((long)m_uId,this); szNick = __tr_ctx("unknown","dcc"); szUser = szNick; @@ -148,10 +148,10 @@ void KviDccDescriptor::triggerCreationEvent() } -KviDccDescriptor * KviDccDescriptor::find(unsigned int uId) +KviDccDescriptor * KviDccDescriptor::tqfind(unsigned int uId) { if(!g_pDescriptorDict)return 0; - return g_pDescriptorDict->find((long)uId); + return g_pDescriptorDict->tqfind((long)uId); } /* diff --git a/src/modules/dcc/descriptor.h b/src/modules/dcc/descriptor.h index f3f6c3f3..49a705ce 100644 --- a/src/modules/dcc/descriptor.h +++ b/src/modules/dcc/descriptor.h @@ -46,7 +46,7 @@ protected: KviStr m_szZeroPortRequestTag; unsigned int m_uId; // this dcc session ID - QString m_szId; + TQString m_szId; KviDccWindow * m_pDccWindow; // 0 if it has no window KviDccFileTransfer * m_pDccTransfer; // 0 if it is not a transfer @@ -69,8 +69,8 @@ public: void setZeroPortRequestTag(const KviStr &szTag){ m_szZeroPortRequestTag = szTag; }; unsigned int id() const { return m_uId; }; - const QString & idString() const { return m_szId; }; - static KviDccDescriptor * find(unsigned int uId); + const TQString & idString() const { return m_szId; }; + static KviDccDescriptor * tqfind(unsigned int uId); static KviPointerHashTable * descriptorDict(); void triggerCreationEvent(); // this MUST be called by the creator of the descriptor! @@ -78,28 +78,28 @@ public: // void copyFrom(const KviDccDescriptor &src); public: // Generic parameters - QString szType; // DCC protocol : CHAT , SCHAT , SEND , TSSEND.... + TQString szType; // DCC protocol : CHAT , SCHAT , SEND , TSSEND.... bool bActive; // active or passive connection ? - QString szNick; // remote user nickname - QString szUser; // remote user name (unknown for passive dcc) - QString szHost; // remote user host (unknown for passive dcc) + TQString szNick; // remote user nickname + TQString szUser; // remote user name (unknown for passive dcc) + TQString szHost; // remote user host (unknown for passive dcc) - QString szLocalNick; // local user nickname (always from irc) - QString szLocalUser; // local user username (always from irc) - QString szLocalHost; // local user hostname (always from irc) + TQString szLocalNick; // local user nickname (always from irc) + TQString szLocalUser; // local user username (always from irc) + TQString szLocalHost; // local user hostname (always from irc) - QString szIp; // remote user ip (active dcc only) - QString szPort; // remote user port (active dcc only) + TQString szIp; // remote user ip (active dcc only) + TQString szPort; // remote user port (active dcc only) - QString szListenIp; // passive only : ip to listen on - QString szListenPort; // passive only : port to listen on + TQString szListenIp; // passive only : ip to listen on + TQString szListenPort; // passive only : port to listen on bool bSendRequest; // passive only : true if we have to send the CTCP request - QString szFakeIp; // passive only : fake ip to send in the CTCP - QString szFakePort; // passive only : fake port to send in the CTCP + TQString szFakeIp; // passive only : fake ip to send in the CTCP + TQString szFakePort; // passive only : fake port to send in the CTCP bool bDoTimeout; // the marshall has to setup a timeout ? @@ -116,11 +116,11 @@ public: // DCC SEND/RECV - QString szFileName; // RECVFILE: incoming file name, SENDFILE: filename sent to the remote end - QString szFileSize; // RECVFILE: incoming file size, SENDFILE: remote resume size + TQString szFileName; // RECVFILE: incoming file name, SENDFILE: filename sent to the remote end + TQString szFileSize; // RECVFILE: incoming file size, SENDFILE: remote resume size - QString szLocalFileName; // RECVFILE: save file name selected, SENDFILE: file to send - QString szLocalFileSize; // RECVFILE: local file size (to resume), SENDFILE: file to send size + TQString szLocalFileName; // RECVFILE: save file name selected, SENDFILE: file to send + TQString szLocalFileSize; // RECVFILE: local file size (to resume), SENDFILE: file to send size bool bRecvFile; // do we have to RECEIVE the file or SEND it ? @@ -134,23 +134,23 @@ public: KviStr szCodec; // codec name int iSampleRate; // Sample rate public: - // new interface... but should be converted to QString... - QString protocol(){ return szType; }; + // new interface... but should be converted to TQString... + TQString protocol(){ return szType; }; bool isActive(){ return bActive; }; - QString remoteNick(){ return szNick; }; - QString remoteUser(){ return szUser; }; - QString remoteHost(){ return szHost; }; - QString remoteIp(){ return szIp; }; - QString remotePort(){ return szPort; }; - QString remoteFileName(){ return szFileName; }; - QString remoteFileSize(){ return szFileSize; }; - QString localNick(){ return szLocalNick; }; - QString localUser(){ return szLocalUser; }; - QString localHost(){ return szLocalHost; }; - QString localIp(){ return szIp; }; - QString localPort(){ return szPort; }; - QString localFileName(){ return szLocalFileName; }; - QString localFileSize(){ return szLocalFileSize; }; + TQString remoteNick(){ return szNick; }; + TQString remoteUser(){ return szUser; }; + TQString remoteHost(){ return szHost; }; + TQString remoteIp(){ return szIp; }; + TQString remotePort(){ return szPort; }; + TQString remoteFileName(){ return szFileName; }; + TQString remoteFileSize(){ return szFileSize; }; + TQString localNick(){ return szLocalNick; }; + TQString localUser(){ return szLocalUser; }; + TQString localHost(){ return szLocalHost; }; + TQString localIp(){ return szIp; }; + TQString localPort(){ return szPort; }; + TQString localFileName(){ return szLocalFileName; }; + TQString localFileSize(){ return szLocalFileSize; }; bool isFileUpload(); bool isFileDownload(); bool isDccChat(); diff --git a/src/modules/dcc/dialogs.cpp b/src/modules/dcc/dialogs.cpp index 0ec0afba..89435202 100644 --- a/src/modules/dcc/dialogs.cpp +++ b/src/modules/dcc/dialogs.cpp @@ -25,12 +25,12 @@ #include "kvi_iconmanager.h" #include "kvi_app.h" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include KviDccBox::KviDccBox(KviDccBroker * br,KviDccDescriptor * dcc) { @@ -50,24 +50,24 @@ void KviDccBox::forgetDescriptor() m_pDescriptor = 0; } -KviDccAcceptBox::KviDccAcceptBox(KviDccBroker * br,KviDccDescriptor * dcc,const QString &text,const QString &capt) -: QWidget(0,"dcc_accept_box") , KviDccBox(br,dcc) +KviDccAcceptBox::KviDccAcceptBox(KviDccBroker * br,KviDccDescriptor * dcc,const TQString &text,const TQString &capt) +: TQWidget(0,"dcc_accept_box") , KviDccBox(br,dcc) { - QVBoxLayout * vb = new QVBoxLayout(this,4,4); - QLabel * l = new QLabel(text,this); + TQVBoxLayout * vb = new TQVBoxLayout(this,4,4); + TQLabel * l = new TQLabel(text,this); #ifdef COMPILE_USE_QT4 l->setWordWrap(true); #endif vb->addWidget(l); - QHBoxLayout *hb = new QHBoxLayout(4); - vb->addLayout(hb,Qt::AlignCenter); - QPushButton * btn = new QPushButton(__tr2qs_ctx("&Accept","dcc"),this); + TQHBoxLayout *hb = new TQHBoxLayout(4); + vb->addLayout(hb,TQt::AlignCenter); + TQPushButton * btn = new TQPushButton(__tr2qs_ctx("&Accept","dcc"),this); btn->setDefault(true); //btn->setFocus(); hb->addWidget(btn); - connect(btn,SIGNAL(clicked()),this,SLOT(acceptClicked())); - btn = new QPushButton(__tr2qs_ctx("&Reject","dcc"),this); - connect(btn,SIGNAL(clicked()),this,SLOT(rejectClicked())); + connect(btn,TQT_SIGNAL(clicked()),this,TQT_SLOT(acceptClicked())); + btn = new TQPushButton(__tr2qs_ctx("&Reject","dcc"),this); + connect(btn,TQT_SIGNAL(clicked()),this,TQT_SLOT(rejectClicked())); hb->addWidget(btn); setIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_DCCMSG))); @@ -85,63 +85,63 @@ void KviDccAcceptBox::acceptClicked() { hide(); emit accepted(this,m_pDescriptor); - g_pApp->collectGarbage(this); + g_pApp->collectGarbage(TQT_TQOBJECT(this)); } void KviDccAcceptBox::rejectClicked() { hide(); emit rejected(this,m_pDescriptor); - g_pApp->collectGarbage(this); + g_pApp->collectGarbage(TQT_TQOBJECT(this)); } -void KviDccAcceptBox::closeEvent(QCloseEvent *e) +void KviDccAcceptBox::closeEvent(TQCloseEvent *e) { hide(); e->ignore(); emit rejected(this,m_pDescriptor); - g_pApp->collectGarbage(this); + g_pApp->collectGarbage(TQT_TQOBJECT(this)); } -void KviDccAcceptBox::showEvent(QShowEvent *e) +void KviDccAcceptBox::showEvent(TQShowEvent *e) { move((g_pApp->desktop()->width() - width()) >> 1, (g_pApp->desktop()->height() - height()) >> 1); - QWidget::showEvent(e); + TQWidget::showEvent(e); } -KviDccRenameBox::KviDccRenameBox(KviDccBroker * br,KviDccDescriptor * dcc,const QString &text,bool bDisableResume) -: QWidget(0,"dcc_rename_box") , KviDccBox(br,dcc) +KviDccRenameBox::KviDccRenameBox(KviDccBroker * br,KviDccDescriptor * dcc,const TQString &text,bool bDisableResume) +: TQWidget(0,"dcc_rename_box") , KviDccBox(br,dcc) { - QVBoxLayout * vb = new QVBoxLayout(this,4,4); - QLabel * l = new QLabel(text,this); + TQVBoxLayout * vb = new TQVBoxLayout(this,4,4); + TQLabel * l = new TQLabel(text,this); #ifdef COMPILE_USE_QT4 l->setWordWrap(true); #endif vb->addWidget(l); - QHBoxLayout *hb = new QHBoxLayout(4); - vb->addLayout(hb,Qt::AlignCenter); + TQHBoxLayout *hb = new TQHBoxLayout(4); + vb->addLayout(hb,TQt::AlignCenter); - QPushButton * btn = new QPushButton(__tr2qs_ctx("&Rename","dcc"),this); + TQPushButton * btn = new TQPushButton(__tr2qs_ctx("&Rename","dcc"),this); hb->addWidget(btn); - connect(btn,SIGNAL(clicked()),this,SLOT(renameClicked())); + connect(btn,TQT_SIGNAL(clicked()),this,TQT_SLOT(renameClicked())); - btn = new QPushButton(__tr2qs_ctx("Over&write","dcc"),this); + btn = new TQPushButton(__tr2qs_ctx("Over&write","dcc"),this); hb->addWidget(btn); - connect(btn,SIGNAL(clicked()),this,SLOT(overwriteClicked())); + connect(btn,TQT_SIGNAL(clicked()),this,TQT_SLOT(overwriteClicked())); - btn = new QPushButton(__tr2qs_ctx("Re&sume","dcc"),this); + btn = new TQPushButton(__tr2qs_ctx("Re&sume","dcc"),this); hb->addWidget(btn); - connect(btn,SIGNAL(clicked()),this,SLOT(resumeClicked())); + connect(btn,TQT_SIGNAL(clicked()),this,TQT_SLOT(resumeClicked())); if(bDisableResume)btn->setEnabled(false); - btn = new QPushButton(__tr2qs_ctx("Cancel","dcc"),this); + btn = new TQPushButton(__tr2qs_ctx("Cancel","dcc"),this); hb->addWidget(btn); - connect(btn,SIGNAL(clicked()),this,SLOT(cancelClicked())); + connect(btn,TQT_SIGNAL(clicked()),this,TQT_SLOT(cancelClicked())); btn->setDefault(true); //btn->setFocus(); @@ -153,36 +153,36 @@ KviDccRenameBox::~KviDccRenameBox() { } -void KviDccRenameBox::closeEvent(QCloseEvent *e) +void KviDccRenameBox::closeEvent(TQCloseEvent *e) { hide(); e->ignore(); if(m_pDescriptor) { emit cancelSelected(this,m_pDescriptor); - g_pApp->collectGarbage(this); + g_pApp->collectGarbage(TQT_TQOBJECT(this)); } } -void KviDccRenameBox::showEvent(QShowEvent *e) +void KviDccRenameBox::showEvent(TQShowEvent *e) { move((g_pApp->desktop()->width() - width()) >> 1, (g_pApp->desktop()->height() - height()) >> 1); - QWidget::showEvent(e); + TQWidget::showEvent(e); } void KviDccRenameBox::renameClicked() { hide(); emit renameSelected(this,m_pDescriptor); - g_pApp->collectGarbage(this); + g_pApp->collectGarbage(TQT_TQOBJECT(this)); } void KviDccRenameBox::overwriteClicked() { hide(); emit overwriteSelected(this,m_pDescriptor); - g_pApp->collectGarbage(this); + g_pApp->collectGarbage(TQT_TQOBJECT(this)); } void KviDccRenameBox::resumeClicked() @@ -190,14 +190,14 @@ void KviDccRenameBox::resumeClicked() hide(); m_pDescriptor->bResume = true; emit overwriteSelected(this,m_pDescriptor); - g_pApp->collectGarbage(this); + g_pApp->collectGarbage(TQT_TQOBJECT(this)); } void KviDccRenameBox::cancelClicked() { hide(); emit cancelSelected(this,m_pDescriptor); - g_pApp->collectGarbage(this); + g_pApp->collectGarbage(TQT_TQOBJECT(this)); } diff --git a/src/modules/dcc/dialogs.h b/src/modules/dcc/dialogs.h index 805c0147..c241b109 100644 --- a/src/modules/dcc/dialogs.h +++ b/src/modules/dcc/dialogs.h @@ -23,7 +23,7 @@ // -#include +#include #include "kvi_filedialog.h" #include "broker.h" @@ -42,15 +42,16 @@ public: -class KviDccAcceptBox : public QWidget , public KviDccBox +class KviDccAcceptBox : public TQWidget , public KviDccBox { Q_OBJECT + TQ_OBJECT public: - KviDccAcceptBox(KviDccBroker * br,KviDccDescriptor * dcc,const QString &text,const QString &capt); + KviDccAcceptBox(KviDccBroker * br,KviDccDescriptor * dcc,const TQString &text,const TQString &capt); ~KviDccAcceptBox(); protected: - virtual void closeEvent(QCloseEvent *e); - virtual void showEvent(QShowEvent *e); + virtual void closeEvent(TQCloseEvent *e); + virtual void showEvent(TQShowEvent *e); private slots: void acceptClicked(); void rejectClicked(); @@ -59,15 +60,16 @@ signals: void rejected(KviDccBox *,KviDccDescriptor *); }; -class KviDccRenameBox : public QWidget , public KviDccBox +class KviDccRenameBox : public TQWidget , public KviDccBox { Q_OBJECT + TQ_OBJECT public: - KviDccRenameBox(KviDccBroker * br,KviDccDescriptor * dcc,const QString &text,bool bDisableResume); + KviDccRenameBox(KviDccBroker * br,KviDccDescriptor * dcc,const TQString &text,bool bDisableResume); ~KviDccRenameBox(); protected: - virtual void closeEvent(QCloseEvent *e); - virtual void showEvent(QShowEvent *e); + virtual void closeEvent(TQCloseEvent *e); + virtual void showEvent(TQShowEvent *e); private slots: void renameClicked(); void overwriteClicked(); diff --git a/src/modules/dcc/libkvidcc.cpp b/src/modules/dcc/libkvidcc.cpp index 717f568d..50717e77 100644 --- a/src/modules/dcc/libkvidcc.cpp +++ b/src/modules/dcc/libkvidcc.cpp @@ -48,7 +48,7 @@ #include "send.h" #include "window.h" -#include +#include #ifdef COMPILE_ON_WINDOWS // Ugly Windoze compiler... @@ -73,9 +73,9 @@ static void dcc_module_set_dcc_type(KviDccDescriptor * d,const char * szBaseType static bool dcc_kvs_parse_default_parameters(KviDccDescriptor * d,KviKvsModuleCommandCall *c) { - d->bIsTdcc = c->switches()->find('t',"tdcc"); + d->bIsTdcc = c->switches()->tqfind('t',"tdcc"); - KviKvsVariant * pSw = c->switches()->find('m',"minimize"); + KviKvsVariant * pSw = c->switches()->tqfind('m',"minimize"); if(pSw != 0) d->bOverrideMinimize = pSw->asBoolean(); @@ -85,7 +85,7 @@ static bool dcc_kvs_parse_default_parameters(KviDccDescriptor * d,KviKvsModuleCo if(!d->console()) { // We don't need a console with -c and -n , otherwise we need it - if(!(c->switches()->find('c',"connect") || c->switches()->find('n',"no-ctcp"))) + if(!(c->switches()->tqfind('c',"connect") || c->switches()->tqfind('n',"no-ctcp"))) { delete d; c->error(__tr2qs_ctx("This window has no associated IRC context (an IRC context is required unless -c or -n are passed)","dcc")); @@ -98,7 +98,7 @@ static bool dcc_kvs_parse_default_parameters(KviDccDescriptor * d,KviKvsModuleCo if(!d->console()->isConnected()) { // We don't need a connection with -c and -n , otherwise we need it - if(!(c->switches()->find('c',"connect") || c->switches()->find('n',"no-ctcp"))) + if(!(c->switches()->tqfind('c',"connect") || c->switches()->tqfind('n',"no-ctcp"))) { delete d; c->error(__tr2qs_ctx("You're not connected to a server (an active connection is required unless -c or -n are passed)","dcc")); @@ -118,10 +118,10 @@ static bool dcc_kvs_parse_default_parameters(KviDccDescriptor * d,KviKvsModuleCo d->szLocalHost = d->console()->connection()->userInfo()->hostName(); } - if(pSw = c->switches()->find('i',"ip")) + if(pSw = c->switches()->tqfind('i',"ip")) { pSw->asString(d->szListenIp); - if(!(d->szListenIp.contains('.') || d->szListenIp.contains(':'))) + if(!(d->szListenIp.tqcontains('.') || d->szListenIp.tqcontains(':'))) { // This will magically work with the same buffer as source and dst! if(!KviNetUtils::getInterfaceAddress(d->szListenIp,d->szListenIp)) @@ -132,7 +132,7 @@ static bool dcc_kvs_parse_default_parameters(KviDccDescriptor * d,KviKvsModuleCo } } } else { - QString tmp; + TQString tmp; if(!dcc_kvs_get_listen_ip_address(c,d->console(),tmp)) { delete d; @@ -142,13 +142,13 @@ static bool dcc_kvs_parse_default_parameters(KviDccDescriptor * d,KviKvsModuleCo d->szListenIp=tmp; } - if(pSw = c->switches()->find('p',"port")) + if(pSw = c->switches()->tqfind('p',"port")) { pSw->asString(d->szListenPort); // fixme! } else d->szListenPort = "0"; // any port is ok - if(pSw = c->switches()->find('a',"fake-address")) + if(pSw = c->switches()->tqfind('a',"fake-address")) { pSw->asString(d->szFakeIp); } @@ -160,16 +160,16 @@ static bool dcc_kvs_parse_default_parameters(KviDccDescriptor * d,KviKvsModuleCo } } - if(pSw = c->switches()->find('f',"fake-port")) + if(pSw = c->switches()->tqfind('f',"fake-port")) { pSw->asString(d->szFakePort); } - d->bDoTimeout = (!c->switches()->find('u',"unlimited")); + d->bDoTimeout = (!c->switches()->tqfind('u',"unlimited")); #ifdef COMPILE_SSL_SUPPORT - d->bIsSSL = c->switches()->find('s',"ssl"); + d->bIsSSL = c->switches()->tqfind('s',"ssl"); #else - if(c->switches()->find('s',"ssl"))c->warning(__tr2qs_ctx("This executable was built without SSL support, -s switch ignored","dcc")); + if(c->switches()->tqfind('s',"ssl"))c->warning(__tr2qs_ctx("This executable was built without SSL support, -s switch ignored","dcc")); #endif return true; @@ -397,7 +397,7 @@ static bool dcc_kvs_parse_default_parameters(KviDccDescriptor * d,KviKvsModuleCo static bool dcc_kvs_cmd_chat(KviKvsModuleCommandCall * c) { - QString szTarget; + TQString szTarget; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("target",KVS_PT_NONEMPTYSTRING,0,szTarget) KVSM_PARAMETERS_END(c) @@ -411,7 +411,7 @@ static bool dcc_kvs_cmd_chat(KviKvsModuleCommandCall * c) if(!dcc_kvs_parse_default_parameters(d,c))return false; dcc_module_set_dcc_type(d,"CHAT"); - if(c->switches()->find('z',"zero-port")) + if(c->switches()->tqfind('z',"zero-port")) { // we want to have it reversed... add a tag and send out the request KviDccZeroPortTag * t = g_pDccBroker->addZeroPortTag(); @@ -426,9 +426,9 @@ static bool dcc_kvs_cmd_chat(KviKvsModuleCommandCall * c) return true; } - if(c->switches()->find('c',"connect")) + if(c->switches()->tqfind('c',"connect")) { - if(!(c->switches()->find('i',"ip") && c->switches()->find('p',"port"))) + if(!(c->switches()->tqfind('i',"ip") && c->switches()->tqfind('p',"port"))) { delete d; c->error(__tr2qs_ctx("-c requires -i and -p","dcc")); @@ -443,7 +443,7 @@ static bool dcc_kvs_cmd_chat(KviKvsModuleCommandCall * c) d->szIp = __tr2qs_ctx("unknown","dcc"); d->szPort = d->szIp; d->bActive = false; - d->bSendRequest = !c->switches()->find('n',"no-ctcp"); + d->bSendRequest = !c->switches()->tqfind('n',"no-ctcp"); } //c->window()->output(0,"%Q %Q %Q",&(d->szIp),&(d->szPort),&(d->szListenIp)); @@ -605,7 +605,7 @@ static bool dcc_kvs_cmd_chat(KviKvsModuleCommandCall * c) static bool dcc_kvs_cmd_send(KviKvsModuleCommandCall * c) { - QString szTarget,szFileName; + TQString szTarget,szFileName; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("target",KVS_PT_NONEMPTYSTRING,0,szTarget) KVSM_PARAMETER("file name",KVS_PT_NONEMPTYSTRING,KVS_PF_OPTIONAL,szFileName) @@ -615,12 +615,12 @@ static bool dcc_kvs_cmd_send(KviKvsModuleCommandCall * c) d->szNick = szTarget; // we always specify the nickname - QString szTmp; + TQString szTmp; KviKvsVariant * pSw = 0; - if(pSw = c->switches()->find('g',"get")) + if(pSw = c->switches()->tqfind('g',"get")) { - d->szFileName = QFileInfo(szFileName).fileName(); + d->szFileName = TQFileInfo(szFileName).fileName(); if(!pSw->isBoolean()) { @@ -642,16 +642,16 @@ static bool dcc_kvs_cmd_send(KviKvsModuleCommandCall * c) d->szUser = __tr2qs_ctx("unknown","dcc"); // username is always unknown d->szHost = d->szUser; // host is always unknown d->bRecvFile = pSw != 0; - d->bNoAcks = c->switches()->find('b',"blind") || c->switches()->find('t',"tdcc"); + d->bNoAcks = c->switches()->tqfind('b',"blind") || c->switches()->tqfind('t',"tdcc"); d->bResume = false; d->bAutoAccept = pSw != 0; d->bIsIncomingAvatar = false; if(!dcc_kvs_parse_default_parameters(d,c))return false; - if(c->switches()->find('c',"connect")) + if(c->switches()->tqfind('c',"connect")) { - if(!(c->switches()->find('i',"ip") && c->switches()->find('p',"port"))) + if(!(c->switches()->tqfind('i',"ip") && c->switches()->tqfind('p',"port"))) { delete d; c->error(__tr2qs_ctx("-c requires -i and -p","dcc")); @@ -666,10 +666,10 @@ static bool dcc_kvs_cmd_send(KviKvsModuleCommandCall * c) d->szIp = __tr2qs_ctx("unknown","dcc"); d->szPort = d->szIp; d->bActive = false; - d->bSendRequest = !c->switches()->find('n',"no-ctcp"); + d->bSendRequest = !c->switches()->tqfind('n',"no-ctcp"); } - if(c->switches()->find('g',"get")) + if(c->switches()->tqfind('g',"get")) { dcc_module_set_dcc_type(d,"RECV"); d->triggerCreationEvent(); @@ -790,7 +790,7 @@ static bool dcc_kvs_cmd_send(KviKvsModuleCommandCall * c) static bool dcc_kvs_cmd_recv(KviKvsModuleCommandCall * c) { - QString szTarget,szFileName; + TQString szTarget,szFileName; kvs_uint_t uSize; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("target",KVS_PT_NONEMPTYSTRING,0,szTarget) @@ -815,8 +815,8 @@ static bool dcc_kvs_cmd_recv(KviKvsModuleCommandCall * c) d->bActive = false; // we have to listen! d->bResume = false; d->bRecvFile = true; // we have to receive the file! - d->bSendRequest = !c->switches()->find('n',"no-ctcp"); - d->bNoAcks = d->bIsTdcc || c->switches()->find('b',"blind"); + d->bSendRequest = !c->switches()->tqfind('n',"no-ctcp"); + d->bNoAcks = d->bIsTdcc || c->switches()->tqfind('b',"blind"); d->bAutoAccept = KVI_OPTION_BOOL(KviOption_boolAutoAcceptDccSend); d->bIsIncomingAvatar = g_pApp->findPendingAvatarChange(d->console(),d->szNick,d->szFileName); @@ -862,7 +862,7 @@ static bool dcc_kvs_cmd_recv(KviKvsModuleCommandCall * c) The remote end may acknowledge the request by sending a DCC RECV request. This command effects are similar to [cmd]dcc.send[/cmd], but will work also on machines that can't accept incoming connections (firewalling or masquerading problems).[br] - A 120 seconds file offer is added for the specified file and mask "!*@*". + A 120 seconds file offer is added for the specified file and tqmask "!*@*". @examples: */ @@ -872,25 +872,25 @@ static bool dcc_kvs_cmd_recv(KviKvsModuleCommandCall * c) static bool dcc_kvs_cmd_rsend(KviKvsModuleCommandCall * c) { - QString szTarget,szFileName; + TQString szTarget,szFileName; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("target",KVS_PT_NONEMPTYSTRING,0,szTarget) KVSM_PARAMETER("filename",KVS_PT_NONEMPTYSTRING,KVS_PF_OPTIONAL,szFileName) KVSM_PARAMETERS_END(c) - KVSM_REQUIRE_CONNECTION(c) + KVSM_RETQUIRE_CONNECTION(c) KviDccDescriptor * d = new KviDccDescriptor(c->window()->console()); d->szNick = szTarget; d->szLocalFileName = szFileName; - d->bIsTdcc = c->switches()->find('t',"tdcc"); + d->bIsTdcc = c->switches()->tqfind('t',"tdcc"); #ifdef COMPILE_SSL_SUPPORT - d->bIsSSL = c->switches()->find('s',"ssl"); + d->bIsSSL = c->switches()->tqfind('s',"ssl"); #else - if(c->switches()->find('s',"ssl"))c->warning(__tr2qs_ctx("This executable has been built without SSL support, -s switch ignored","dcc")); + if(c->switches()->tqfind('s',"ssl"))c->warning(__tr2qs_ctx("This executable has been built without SSL support, -s switch ignored","dcc")); #endif //!COMPILE_SSL_SUPPORT - if(c->switches()->find('z',"zero-port")) + if(c->switches()->tqfind('z',"zero-port")) { dcc_module_set_dcc_type(d,"SEND"); d->setZeroPortRequestTag("nonempty"); // just to tag it @@ -935,7 +935,7 @@ static bool dcc_kvs_cmd_rsend(KviKvsModuleCommandCall * c) static bool dcc_kvs_cmd_get(KviKvsModuleCommandCall * c) { - QString szTarget,szFileName; + TQString szTarget,szFileName; kvs_uint_t uSize; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("target",KVS_PT_NONEMPTYSTRING,0,szTarget) @@ -943,11 +943,11 @@ static bool dcc_kvs_cmd_get(KviKvsModuleCommandCall * c) KVSM_PARAMETER("size",KVS_PT_UINT,KVS_PF_OPTIONAL,uSize) KVSM_PARAMETERS_END(c) - KVSM_REQUIRE_CONNECTION(c) + KVSM_RETQUIRE_CONNECTION(c) - KviQString::cutToLast(szFileName,'/'); + KviTQString::cutToLast(szFileName,'/'); - if(szFileName.contains(' ')) + if(szFileName.tqcontains(' ')) { szFileName.prepend('"'); szFileName.append('"'); @@ -955,11 +955,11 @@ static bool dcc_kvs_cmd_get(KviKvsModuleCommandCall * c) KviStr szDCC("GET"); #ifdef COMPILE_SSL_SUPPORT - if(c->switches()->find('s',"ssl"))szDCC.prepend('S'); + if(c->switches()->tqfind('s',"ssl"))szDCC.prepend('S'); #else - if(c->switches()->find('s',"ssl"))c->warning(__tr2qs_ctx("This executable has no SSL support, -s switch ignored","dcc")); + if(c->switches()->tqfind('s',"ssl"))c->warning(__tr2qs_ctx("This executable has no SSL support, -s switch ignored","dcc")); #endif - if(c->switches()->find('t',"tdcc"))szDCC.prepend('T'); + if(c->switches()->tqfind('t',"tdcc"))szDCC.prepend('T'); if(uSize == 0) { @@ -1105,7 +1105,7 @@ static bool dcc_kvs_cmd_get(KviKvsModuleCommandCall * c) static bool dcc_kvs_cmd_voice(KviKvsModuleCommandCall * c) { - QString szTarget; + TQString szTarget; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("target",KVS_PT_NONEMPTYSTRING,0,szTarget) KVSM_PARAMETERS_END(c) @@ -1124,7 +1124,7 @@ static bool dcc_kvs_cmd_voice(KviKvsModuleCommandCall * c) if(!dcc_kvs_parse_default_parameters(d,c))return false; - if(KviKvsVariant * pSR = c->switches()->find('h',"sample-rate")) + if(KviKvsVariant * pSR = c->switches()->tqfind('h',"sample-rate")) { kvs_int_t iSR; if(!pSR->asInteger(iSR)) @@ -1138,9 +1138,9 @@ static bool dcc_kvs_cmd_voice(KviKvsModuleCommandCall * c) d->szCodec = "adpcm"; - if(KviKvsVariant * pCodec = c->switches()->find('g',"codec")) + if(KviKvsVariant * pCodec = c->switches()->tqfind('g',"codec")) { - QString szCodec; + TQString szCodec; pCodec->asString(szCodec); if(!kvi_dcc_voice_is_valid_codec(szCodec)) @@ -1151,9 +1151,9 @@ static bool dcc_kvs_cmd_voice(KviKvsModuleCommandCall * c) } dcc_module_set_dcc_type(d,"VOICE"); - if(c->switches()->find('c',"connect")) + if(c->switches()->tqfind('c',"connect")) { - if(!(c->switches()->find('i',"ip") && c->switches()->find('p',"port"))) + if(!(c->switches()->tqfind('i',"ip") && c->switches()->tqfind('p',"port"))) { delete d; c->error(__tr2qs_ctx("-c requires -i and -p","dcc")); @@ -1171,7 +1171,7 @@ static bool dcc_kvs_cmd_voice(KviKvsModuleCommandCall * c) d->szIp = __tr2qs_ctx("unknown","dcc"); d->szPort = d->szIp; d->bActive = false; - d->bSendRequest = !(c->switches()->find('n',"no-ctcp")); + d->bSendRequest = !(c->switches()->tqfind('n',"no-ctcp")); d->triggerCreationEvent(); g_pDccBroker->passiveVoiceExecute(d); @@ -1244,7 +1244,7 @@ static bool dcc_module_cmd_canvas(KviModule *m,KviCommand *c) if(c->hasSwitch('i')) { c->getSwitchValue('i',d->szListenIp); - if(!(d->szListenIp.contains('.') || d->szListenIp.contains(':'))) + if(!(d->szListenIp.tqcontains('.') || d->szListenIp.tqcontains(':'))) { // This will magically work with the same buffer as source and dst! if(!kvi_getInterfaceAddress(d->szListenIp.ptr(),d->szListenIp)) @@ -1543,8 +1543,8 @@ static bool dcc_module_cmd_canvas(KviModule *m,KviCommand *c) [br] [big]DCC File Transfer[/big][br] DCC Send: Send a file, sender is passive, receiver is active (not good for firewalled senders)[br] - DCC Recv: Receive a file, sender is active, receiver is passive (not good for firewalled receivers)[br] - DCC RSend: Send a file, sender is active, receiver is passive (not good for firewalled receivers)[br] + DCC Recv: Receive a file, sender is active, receiver is passive (not good for firewalled tqreceivers)[br] + DCC RSend: Send a file, sender is active, receiver is passive (not good for firewalled tqreceivers)[br] DCC Get: Receive a file, sender is passive if not firewalled, receiver active if sender not firewalled (will fail only if both are firewalled)[br] The "turbo" extension disables the stream of acknowledges and is activated by prepending the 'T' character to the DCC subprotocol name[br] The "SSL" extension causes a Secure Socket Layer to be used and is activated by prepending the 'S' character to the DCC subprotocol name[br] @@ -1577,7 +1577,7 @@ static KviDccDescriptor * dcc_kvs_find_dcc_descriptor(const kvs_uint_t &uId,KviK c->warning(__tr2qs_ctx("The current window has no associated DCC session","dcc")); return dcc; } - dcc = KviDccDescriptor::find(uId); + dcc = KviDccDescriptor::tqfind(uId); if((!dcc) && bWarn) c->warning(__tr2qs_ctx("The specified parameter is not a valid DCC identifier","dcc")); return dcc; @@ -1615,7 +1615,7 @@ static bool dcc_kvs_cmd_abort(KviKvsModuleCommandCall * c) KVSM_PARAMETER("dcc_id",KVS_PT_UINT,KVS_PF_OPTIONAL,uDccId) KVSM_PARAMETERS_END(c) - KviDccDescriptor * dcc = dcc_kvs_find_dcc_descriptor(uDccId,c,!c->switches()->find('q',"quiet")); + KviDccDescriptor * dcc = dcc_kvs_find_dcc_descriptor(uDccId,c,!c->switches()->tqfind('q',"quiet")); if(dcc) { @@ -1655,11 +1655,11 @@ static bool dcc_kvs_cmd_setBandwidthLimit(KviKvsModuleCommandCall * c) KVSM_PARAMETER("dcc_id",KVS_PT_UINT,KVS_PF_OPTIONAL,uDccId) KVSM_PARAMETERS_END(c) - KviDccDescriptor * dcc = dcc_kvs_find_dcc_descriptor(uDccId,c,!c->switches()->find('q',"quiet")); + KviDccDescriptor * dcc = dcc_kvs_find_dcc_descriptor(uDccId,c,!c->switches()->tqfind('q',"quiet")); if(dcc) { if (dcc->transfer())dcc->transfer()->setBandwidthLimit(uVal); - else if (!c->switches()->find('q',"quiet"))c->warning(__tr2qs_ctx("This DCC session is not a DCC transfer session","dcc")); + else if (!c->switches()->tqfind('q',"quiet"))c->warning(__tr2qs_ctx("This DCC session is not a DCC transfer session","dcc")); } return true; } @@ -2082,7 +2082,7 @@ static bool dcc_kvs_fnc_localFileSize(KviKvsModuleFunctionCall * c) KviDccDescriptor * dcc = dcc_kvs_find_dcc_descriptor(uDccId,c); - if(dcc)c->returnValue()->setString(dcc->localFileSize().isEmpty() ? QString("0") : dcc->localFileSize()); + if(dcc)c->returnValue()->setString(dcc->localFileSize().isEmpty() ? TQString("0") : dcc->localFileSize()); return true; } @@ -2324,7 +2324,7 @@ static bool dcc_kvs_fnc_remoteFileSize(KviKvsModuleFunctionCall * c) KviDccDescriptor * dcc = dcc_kvs_find_dcc_descriptor(uDccId,c); - if(dcc)c->returnValue()->setString(dcc->remoteFileSize().isEmpty() ? QString("0") : dcc->remoteFileSize()); + if(dcc)c->returnValue()->setString(dcc->remoteFileSize().isEmpty() ? TQString("0") : dcc->remoteFileSize()); return true; } @@ -2369,16 +2369,16 @@ static bool dcc_kvs_fnc_ircContext(KviKvsModuleFunctionCall * c) /* - @doc: dcc.transferStatus + @doc: dcc.transfertqStatus @type: function @title: - $dcc.transferStatus + $dcc.transfertqStatus @short: Returns the current status of a dcc file transfer @syntax: - $dcc.transferStatus - $dcc.transferStatus() + $dcc.transfertqStatus + $dcc.transfertqStatus() @description: Returns the status in the specified DCC session.[br] The status is one of the strings "connecting", "transferring", "success" and "failure". @@ -2393,7 +2393,7 @@ static bool dcc_kvs_fnc_ircContext(KviKvsModuleFunctionCall * c) See the [module:dcc]dcc module[/module] documentation for more informations.[br] */ -static bool dcc_kvs_fnc_transferStatus(KviKvsModuleFunctionCall * c) +static bool dcc_kvs_fnc_transfertqStatus(KviKvsModuleFunctionCall * c) { kvs_uint_t uDccId; KVSM_PARAMETERS_BEGIN(c) @@ -2406,7 +2406,7 @@ static bool dcc_kvs_fnc_transferStatus(KviKvsModuleFunctionCall * c) { if(dcc->transfer()) { - QString tmp; + TQString tmp; dcc->transfer()->fillStatusString(tmp); c->returnValue()->setString(tmp); } @@ -2527,7 +2527,7 @@ static bool dcc_kvs_fnc_averageSpeed(KviKvsModuleFunctionCall * c) static bool dcc_kvs_fnc_session(KviKvsModuleFunctionCall * c) { - QString szWinId; + TQString szWinId; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("window_id",KVS_PT_STRING,KVS_PF_OPTIONAL,szWinId) KVSM_PARAMETERS_END(c) @@ -2590,7 +2590,7 @@ static bool dcc_kvs_fnc_session(KviKvsModuleFunctionCall * c) static bool dcc_kvs_fnc_sessionList(KviKvsModuleFunctionCall * c) { - QString szFlags; + TQString szFlags; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("filter",KVS_PT_STRING,KVS_PF_OPTIONAL,szFlags) KVSM_PARAMETERS_END(c) @@ -2614,9 +2614,9 @@ static bool dcc_kvs_fnc_sessionList(KviKvsModuleFunctionCall * c) ++it; } } else { - bool bWantFileUploads = szFlags.find('u',false) != -1; - bool bWantFileDownloads = szFlags.contains('d',false) != -1; - bool bWantChats = szFlags.contains('c',false) != -1; + bool bWantFileUploads = szFlags.tqfind('u',false) != -1; + bool bWantFileDownloads = szFlags.tqcontains('d',false) != -1; + bool bWantChats = szFlags.tqcontains('c',false) != -1; while(KviDccDescriptor * dcc = it.current()) { @@ -2669,7 +2669,7 @@ static bool dcc_kvs_fnc_sessionList(KviKvsModuleFunctionCall * c) [fnc]$dcc.sessionList[/fnc][br] [fnc]$dcc.protocol[/fnc][br] [fnc]$dcc.connectionType[/fnc][br] - [fnc]$dcc.transferStatus[/fnc][br] + [fnc]$dcc.transfertqStatus[/fnc][br] [fnc]$dcc.isFileTransfer[/fnc][br] [fnc]$dcc.isFileUpload[/fnc][br] [fnc]$dcc.isFileDownload[/fnc][br] @@ -2708,7 +2708,7 @@ static bool dcc_module_init(KviModule * m) // FIXME: file upload / download state ? - KVSM_REGISTER_FUNCTION(m,"transferStatus",dcc_kvs_fnc_transferStatus); + KVSM_REGISTER_FUNCTION(m,"transfertqStatus",dcc_kvs_fnc_transfertqStatus); KVSM_REGISTER_FUNCTION(m,"protocol",dcc_kvs_fnc_protocol); KVSM_REGISTER_FUNCTION(m,"connectionType",dcc_kvs_fnc_connectionType); KVSM_REGISTER_FUNCTION(m,"isFileTransfer",dcc_kvs_fnc_isFileTransfer); diff --git a/src/modules/dcc/marshal.cpp b/src/modules/dcc/marshal.cpp index 9aedec41..6d69dccf 100644 --- a/src/modules/dcc/marshal.cpp +++ b/src/modules/dcc/marshal.cpp @@ -38,7 +38,7 @@ KviDccMarshal::KviDccMarshal(KviDccMarshalOutputContext * ctx) -: QObject(0,"dcc_marshal") +: TQObject(0,"dcc_marshal") { m_pSn = 0; m_fd = KVI_INVALID_SOCKET; @@ -104,7 +104,7 @@ void KviDccMarshal::reset() m_bIpV6 = false; } -int KviDccMarshal::dccListen(const QString &ip,const QString &port,bool bUseTimeout,bool bUseSSL) +int KviDccMarshal::dccListen(const TQString &ip,const TQString &port,bool bUseTimeout,bool bUseSSL) { if(m_fd != KVI_INVALID_SOCKET)return KviError_anotherConnectionInProgress; @@ -122,8 +122,8 @@ int KviDccMarshal::dccListen(const QString &ip,const QString &port,bool bUseTime #endif if(m_pTimeoutTimer)delete m_pTimeoutTimer; - m_pTimeoutTimer = new QTimer(); - connect(m_pTimeoutTimer,SIGNAL(timeout()),this,SLOT(doListen())); + m_pTimeoutTimer = new TQTimer(); + connect(m_pTimeoutTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(doListen())); m_pTimeoutTimer->start(100,true); return KviError_success; @@ -276,8 +276,8 @@ void KviDccMarshal::doListen() } // and setup the READ notifier... - m_pSn = new QSocketNotifier(m_fd,QSocketNotifier::Read); - QObject::connect(m_pSn,SIGNAL(activated(int)),this,SLOT(snActivated(int))); + m_pSn = new TQSocketNotifier(m_fd,TQSocketNotifier::Read); + TQObject::connect(m_pSn,TQT_SIGNAL(activated(int)),this,TQT_SLOT(snActivated(int))); m_pSn->setEnabled(true); // set the timer @@ -286,8 +286,8 @@ void KviDccMarshal::doListen() if(m_bUseTimeout) { - m_pTimeoutTimer = new QTimer(); - connect(m_pTimeoutTimer,SIGNAL(timeout()),this,SLOT(connectionTimedOut())); + m_pTimeoutTimer = new TQTimer(); + connect(m_pTimeoutTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(connectionTimedOut())); m_pTimeoutTimer->start(KVI_OPTION_UINT(KviOption_uintDccSocketTimeout) * 1000,true); } // and wait for connect @@ -311,8 +311,8 @@ int KviDccMarshal::dccConnect(const char * ip,const char * port,bool bUseTimeout #endif if(m_pTimeoutTimer)delete m_pTimeoutTimer; - m_pTimeoutTimer = new QTimer(); - connect(m_pTimeoutTimer,SIGNAL(timeout()),this,SLOT(doConnect())); + m_pTimeoutTimer = new TQTimer(); + connect(m_pTimeoutTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(doConnect())); m_pTimeoutTimer->start(100,true); return KviError_success; @@ -414,8 +414,8 @@ void KviDccMarshal::doConnect() // and setup the WRITE notifier... - m_pSn = new QSocketNotifier(m_fd,QSocketNotifier::Write); - QObject::connect(m_pSn,SIGNAL(activated(int)),this,SLOT(snActivated(int))); + m_pSn = new TQSocketNotifier(m_fd,TQSocketNotifier::Write); + TQObject::connect(m_pSn,TQT_SIGNAL(activated(int)),this,TQT_SLOT(snActivated(int))); m_pSn->setEnabled(true); // set the timer @@ -424,8 +424,8 @@ void KviDccMarshal::doConnect() if(m_bUseTimeout) { - m_pTimeoutTimer = new QTimer(); - connect(m_pTimeoutTimer,SIGNAL(timeout()),this,SLOT(connectionTimedOut())); + m_pTimeoutTimer = new TQTimer(); + connect(m_pTimeoutTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(connectionTimedOut())); m_pTimeoutTimer->start(KVI_OPTION_UINT(KviOption_uintDccSocketTimeout) * 1000,true); } @@ -586,13 +586,13 @@ void KviDccMarshal::doSSLHandshake(int) // debug("CONNECTED EMITTED"); break; case KviSSL::WantRead: - m_pSn = new QSocketNotifier((int)m_fd,QSocketNotifier::Read); - QObject::connect(m_pSn,SIGNAL(activated(int)),this,SLOT(doSSLHandshake(int))); + m_pSn = new TQSocketNotifier((int)m_fd,TQSocketNotifier::Read); + TQObject::connect(m_pSn,TQT_SIGNAL(activated(int)),this,TQT_SLOT(doSSLHandshake(int))); m_pSn->setEnabled(true); break; case KviSSL::WantWrite: - m_pSn = new QSocketNotifier((int)m_fd,QSocketNotifier::Write); - QObject::connect(m_pSn,SIGNAL(activated(int)),this,SLOT(doSSLHandshake(int))); + m_pSn = new TQSocketNotifier((int)m_fd,TQSocketNotifier::Write); + TQObject::connect(m_pSn,TQT_SIGNAL(activated(int)),this,TQT_SLOT(doSSLHandshake(int))); m_pSn->setEnabled(true); break; case KviSSL::RemoteEndClosedConnection: @@ -606,8 +606,8 @@ void KviDccMarshal::doSSLHandshake(int) if(kvi_socket_recoverableError(err)) { // can recover ? (EAGAIN , EINTR ?) - m_pSn = new QSocketNotifier((int)m_fd,QSocketNotifier::Write); - QObject::connect(m_pSn,SIGNAL(activated(int)),this,SLOT(doSSLHandshake(int))); + m_pSn = new TQSocketNotifier((int)m_fd,TQSocketNotifier::Write); + TQObject::connect(m_pSn,TQT_SIGNAL(activated(int)),this,TQT_SLOT(doSSLHandshake(int))); m_pSn->setEnabled(true); return; } else { diff --git a/src/modules/dcc/marshal.h b/src/modules/dcc/marshal.h index 9665e09a..7b915dea 100644 --- a/src/modules/dcc/marshal.h +++ b/src/modules/dcc/marshal.h @@ -24,9 +24,9 @@ #include "kvi_string.h" #include "kvi_sockettype.h" -#include -#include -#include +#include +#include +#include #include "kvi_inttypes.h" class KviWindow; @@ -48,26 +48,27 @@ protected: virtual const char * dccMarshalOutputContextString() = 0; }; -class KviDccMarshal : public QObject +class KviDccMarshal : public TQObject { Q_OBJECT + TQ_OBJECT public: KviDccMarshal(KviDccMarshalOutputContext * ctx); ~KviDccMarshal(); protected: // DCC DESCRIPTOR - QString m_szIp; // Dcc initiator ip address (the one that listens) - QString m_szPort; // Dcc initiator port (the one that listens) + TQString m_szIp; // Dcc initiator ip address (the one that listens) + TQString m_szPort; // Dcc initiator port (the one that listens) // other info bool m_bIpV6; // Dcc mode kvi_u32_t m_uPort; // Dcc initiator port bool m_bOutgoing; // true if WE have connected to the remote host (so m_szIp is the remote host ip) - QString m_szSecondaryIp; // Ip of the client that has connected to the remote host - QString m_szSecondaryPort; // Port of the client that has connected to the remote host + TQString m_szSecondaryIp; // Ip of the client that has connected to the remote host + TQString m_szSecondaryPort; // Port of the client that has connected to the remote host // internals kvi_socket_t m_fd; // socket - QSocketNotifier * m_pSn; - QTimer * m_pTimeoutTimer; + TQSocketNotifier * m_pSn; + TQTimer * m_pTimeoutTimer; bool m_bUseTimeout; #ifdef COMPILE_SSL_SUPPORT KviSSL * m_pSSL; @@ -75,13 +76,13 @@ protected: #endif KviDccMarshalOutputContext * m_pOutputContext; public: - const QString & dccIp() const { return m_szIp; }; - const QString & dccPort() const { return m_szPort; }; - const QString & localIp() const { return m_bOutgoing ? m_szSecondaryIp : m_szIp; }; - const QString & localPort() const { return m_bOutgoing ? m_szSecondaryPort : m_szPort; }; - const QString & remoteIp() const { return m_bOutgoing ? m_szIp : m_szSecondaryIp; }; - const QString & remotePort() const { return m_bOutgoing ? m_szPort : m_szSecondaryPort; }; - int dccListen(const QString &ip,const QString &port,bool bUseTimeout,bool bUseSSL = false); + const TQString & dccIp() const { return m_szIp; }; + const TQString & dccPort() const { return m_szPort; }; + const TQString & localIp() const { return m_bOutgoing ? m_szSecondaryIp : m_szIp; }; + const TQString & localPort() const { return m_bOutgoing ? m_szSecondaryPort : m_szPort; }; + const TQString & remoteIp() const { return m_bOutgoing ? m_szIp : m_szSecondaryIp; }; + const TQString & remotePort() const { return m_bOutgoing ? m_szPort : m_szSecondaryPort; }; + int dccListen(const TQString &ip,const TQString &port,bool bUseTimeout,bool bUseSSL = false); int dccConnect(const char * ip,const char * port,bool bUseTimeout,bool bUseSSL = false); kvi_socket_t releaseSocket(); #ifdef COMPILE_SSL_SUPPORT diff --git a/src/modules/dcc/requests.cpp b/src/modules/dcc/requests.cpp index e1e18143..29e6b424 100644 --- a/src/modules/dcc/requests.cpp +++ b/src/modules/dcc/requests.cpp @@ -50,7 +50,7 @@ #include "utils.h" #include "send.h" -#include +#include #ifdef COMPILE_ON_WINDOWS // Ugly Windoze compiler... @@ -62,7 +62,7 @@ extern KVIRC_API KviSharedFilesManager * g_pSharedFilesManager; extern KviDccBroker * g_pDccBroker; -static void dcc_module_reply_errmsg(KviDccRequest * dcc,const QString& errText) +static void dcc_module_reply_errmsg(KviDccRequest * dcc,const TQString& errText) { dcc->ctcpMsg->msg->console()->connection()->sendFmtData( "NOTICE %s :%cERRMSG %s%c", @@ -71,7 +71,7 @@ static void dcc_module_reply_errmsg(KviDccRequest * dcc,const QString& errText) ,0x01); } -static void dcc_module_request_error(KviDccRequest * dcc,const QString& errText) +static void dcc_module_request_error(KviDccRequest * dcc,const TQString& errText) { dcc->ctcpMsg->msg->console()->output(KVI_OUT_DCCERROR, __tr2qs_ctx("Unable to process the above request: %Q, %Q","dcc"), @@ -80,7 +80,7 @@ static void dcc_module_request_error(KviDccRequest * dcc,const QString& errText) if(KVI_OPTION_BOOL(KviOption_boolNotifyFailedDccHandshakes)) { - QString szError = QString("Sorry, your DCC %1 request can't be satisfied: %2").arg(dcc->szType.ptr()).arg(errText); + TQString szError = TQString("Sorry, your DCC %1 request can't be satisfied: %2").tqarg(dcc->szType.ptr()).tqarg(errText); dcc_module_reply_errmsg(dcc,szError); } } @@ -164,7 +164,7 @@ static bool dcc_module_normalize_target_data(KviDccRequest * dcc,KviStr &ipaddr, if(ipaddr.isUnsignedNum()) { addr.s_addr = htonl((unsigned long)ipaddr.toULong()); - QString tmp; + TQString tmp; if(!kvi_binaryIpToStringIp(addr,tmp)) { if(!dcc->ctcpMsg->msg->haltOutput()) @@ -263,9 +263,9 @@ static void dccModuleParseDccChat(KviDccRequest *dcc) szExtensions.cutRight(4); // cut off CHAT #ifdef COMPILE_SSL_SUPPORT - bool bSSLExtension = szExtensions.contains('S',false); + bool bSSLExtension = szExtensions.tqcontains('S',false); #else //!COMPILE_SSL_SUPPORT - if(szExtensions.contains('S',false)) + if(szExtensions.tqcontains('S',false)) { dcc_module_request_error(dcc,__tr2qs_ctx("This executable has been compiled without SSL support, the SSL extension to DCC CHAT is not available","dcc")); return; @@ -296,7 +296,7 @@ static void dccModuleParseDccChat(KviDccRequest *dcc) if(d->szFakeIp.isEmpty())KVI_OPTION_BOOL(KviOption_boolDccSendFakeAddressByDefault) = false; } d->setZeroPortRequestTag(dcc->szParam4.ptr()); - QString tmp; + TQString tmp; if(!dcc_kvs_get_listen_ip_address(0,d->console(),tmp))d->szListenIp = "0.0.0.0"; else d->szListenIp=tmp; d->szListenPort = "0"; // any port is OK @@ -305,7 +305,7 @@ static void dccModuleParseDccChat(KviDccRequest *dcc) } else { // zero port acknowledge // check if this is a tag that we have sent out - QString szTag = QString(dcc->szParam4.ptr()); + TQString szTag = TQString(dcc->szParam4.ptr()); KviDccZeroPortTag * t = g_pDccBroker->findZeroPortTag(szTag); if(!t) { @@ -444,7 +444,7 @@ static void dccModuleParseDccSend(KviDccRequest *dcc) dcc->szParam4 = __tr2qs_ctx("","dcc"); } - if(dcc->szParam1.contains('/')) + if(dcc->szParam1.tqcontains('/')) { if(!dcc->ctcpMsg->msg->haltOutput()) { @@ -457,11 +457,11 @@ static void dccModuleParseDccSend(KviDccRequest *dcc) KviStr szExtensions = dcc->szType; szExtensions.cutRight(4); // cut off SEND - bool bTurboExtension = szExtensions.contains('T',false); + bool bTurboExtension = szExtensions.tqcontains('T',false); #ifdef COMPILE_SSL_SUPPORT - bool bSSLExtension = szExtensions.contains('S',false); + bool bSSLExtension = szExtensions.tqcontains('S',false); #else //!COMPILE_SSL_SUPPORT - if(szExtensions.contains('S',false)) + if(szExtensions.tqcontains('S',false)) { dcc_module_request_error(dcc,__tr2qs_ctx("This executable has been compiled without SSL support, the SSL extension to DCC SEND is not available","dcc")); return; @@ -487,9 +487,9 @@ static void dccModuleParseDccSend(KviDccRequest *dcc) if(d->szFakeIp.isEmpty())KVI_OPTION_BOOL(KviOption_boolDccSendFakeAddressByDefault) = false; } d->setZeroPortRequestTag(dcc->szParam5.ptr()); - QString tmp; + TQString tmp; if(!dcc_kvs_get_listen_ip_address(0,d->console(),tmp))d->szListenIp = "0.0.0.0"; - else d->szListenIp=QString(tmp); + else d->szListenIp=TQString(tmp); d->szListenPort = "0"; // any port is OK d->bSendRequest = true; d->szLocalFileSize = d->szFileSize; @@ -592,7 +592,7 @@ static void dccModuleParseDccRecv(KviDccRequest * dcc) dcc->szParam4 = "0"; } - if(dcc->szParam1.contains('/')) + if(dcc->szParam1.tqcontains('/')) { if(!dcc->ctcpMsg->msg->haltOutput()) { @@ -605,11 +605,11 @@ static void dccModuleParseDccRecv(KviDccRequest * dcc) KviStr szExtensions = dcc->szType; szExtensions.cutRight(4); // cut off RECV - bool bTurboExtension = szExtensions.contains('T',false); + bool bTurboExtension = szExtensions.tqcontains('T',false); #ifdef COMPILE_SSL_SUPPORT - bool bSSLExtension = szExtensions.contains('S',false); + bool bSSLExtension = szExtensions.tqcontains('S',false); #else //!COMPILE_SSL_SUPPORT - if(szExtensions.contains('S',false)) + if(szExtensions.tqcontains('S',false)) { dcc_module_request_error(dcc,__tr2qs_ctx("This executable has been compiled without SSL support, the SSL extension to DCC RECV is not available","dcc")); return; @@ -730,7 +730,7 @@ static void dccModuleParseDccRSend(KviDccRequest *dcc) dcc->szParam2 = __tr_ctx("","dcc"); } - if(dcc->szParam1.contains('/')) + if(dcc->szParam1.tqcontains('/')) { if(!dcc->ctcpMsg->msg->haltOutput()) { @@ -743,11 +743,11 @@ static void dccModuleParseDccRSend(KviDccRequest *dcc) KviStr szExtensions = dcc->szType; szExtensions.cutRight(4); // cut off SEND - bool bTurboExtension = szExtensions.contains('T',false); + bool bTurboExtension = szExtensions.tqcontains('T',false); #ifdef COMPILE_SSL_SUPPORT - bool bSSLExtension = szExtensions.contains('S',false); + bool bSSLExtension = szExtensions.tqcontains('S',false); #else //!COMPILE_SSL_SUPPORT - if(szExtensions.contains('S',false)) + if(szExtensions.tqcontains('S',false)) { dcc_module_request_error(dcc,__tr2qs_ctx("This executable has been compiled without SSL support, the SSL extension to DCC RSEND is not available","dcc")); return; @@ -762,14 +762,14 @@ static void dccModuleParseDccRSend(KviDccRequest *dcc) d->szHost = dcc->ctcpMsg->pSource->host(); d->szIp = __tr2qs_ctx("(unknown)","dcc"); d->szPort = d->szIp; - QString tmp; + TQString tmp; if(!dcc_kvs_get_listen_ip_address(0,d->console(),tmp)) { d->console()->output(KVI_OUT_DCCMSG, __tr2qs_ctx("No suitable interface to listen on, trying to continue anyway...","dcc")); d->szListenIp = "0.0.0.0"; } else - d->szListenIp=QString(tmp); + d->szListenIp=TQString(tmp); d->szListenPort = "0"; dcc_fill_local_nick_user_host(d,dcc); @@ -826,11 +826,11 @@ static void dccModuleParseDccGet(KviDccRequest *dcc) KviStr szExtensions = dcc->szType; szExtensions.cutRight(3); // cut off GET - bool bTurboExtension = szExtensions.contains('T',false); + bool bTurboExtension = szExtensions.tqcontains('T',false); #ifdef COMPILE_SSL_SUPPORT - bool bSSLExtension = szExtensions.contains('S',false); + bool bSSLExtension = szExtensions.tqcontains('S',false); #else //!COMPILE_SSL_SUPPORT - if(szExtensions.contains('S',false)) + if(szExtensions.tqcontains('S',false)) { dcc_module_request_error(dcc,__tr2qs_ctx("This executable has been compiled without SSL support, the SSL extension to DCC GET is not available","dcc")); return; @@ -866,7 +866,7 @@ static void dccModuleParseDccGet(KviDccRequest *dcc) szSubproto.prepend(szExtensions); - QString szFileName = QFileInfo(o->absFilePath()).fileName(); + TQString szFileName = TQFileInfo(o->absFilePath()).fileName(); if(o->name() != szFileName) { // BUG @@ -877,8 +877,8 @@ static void dccModuleParseDccGet(KviDccRequest *dcc) // now add a file offer , so he we will accept it automatically // 120 secs is a reasonable timeout - QString szMask; - dcc->ctcpMsg->pSource->mask(szMask,KviIrcMask::NickUserHost); + TQString szMask; + dcc->ctcpMsg->pSource->tqmask(szMask,KviIrcMask::NickUserHost); KviSharedFile * pOld = o; o = g_pSharedFilesManager->addSharedFile(szFileName,o->absFilePath(),szMask,120); @@ -911,14 +911,14 @@ static void dccModuleParseDccGet(KviDccRequest *dcc) d->bRecvFile = false; dcc_fill_local_nick_user_host(d,dcc); - QString tmp; + TQString tmp; if(!dcc_kvs_get_listen_ip_address(0,d->console(),tmp)) { d->console()->output(KVI_OUT_DCCMSG, __tr2qs_ctx("No suitable interface to listen on, trying to continue anyway...","dcc")); d->szListenIp = "0.0.0.0"; } else - d->szListenIp=QString(tmp); + d->szListenIp=TQString(tmp); //#warning "DO STH WITH THIS PORT (HOW TO SPECIFY IT ?)" d->szListenPort = "0"; // any port is ok @@ -1081,7 +1081,7 @@ static void dccModuleParseDccCanvas(KviDccRequest *dcc) static void dccModuleParseDccList(KviDccRequest *dcc) { - // DCC LIST + // DCC LIST // FIXME! } diff --git a/src/modules/dcc/send.cpp b/src/modules/dcc/send.cpp index c6cc1182..c42793aa 100644 --- a/src/modules/dcc/send.cpp +++ b/src/modules/dcc/send.cpp @@ -60,15 +60,15 @@ #include "kvi_sparser.h" #include "kvi_kvs_script.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #define INSTANT_BANDWIDTH_CHECK_INTERVAL_IN_MSECS 3000 #define INSTANT_BANDWIDTH_CHECK_INTERVAL_IN_SECS 3 @@ -88,12 +88,12 @@ extern KVIRC_API KviMediaManager * g_pMediaManager; // kvi_app.cpp static KviPointerList * g_pDccFileTransfers = 0; -static QPixmap * g_pDccFileTransferIcon = 0; +static TQPixmap * g_pDccFileTransferIcon = 0; //#warning "The events that have a KviStr data pointer should become real classes, that take care of deleting the data pointer!" //#warning "Otherwise, when left undispatched we will be leaking memory (event class destroyed but not the data ptr)" -KviDccRecvThread::KviDccRecvThread(QObject * par,kvi_socket_t fd,KviDccRecvThreadOptions * opt) +KviDccRecvThread::KviDccRecvThread(TQObject * par,kvi_socket_t fd,KviDccRecvThreadOptions * opt) : KviDccThread(par,fd) { m_pOpt = opt; @@ -158,7 +158,7 @@ void KviDccRecvThread::postMessageEvent(const char * m) { KviThreadDataEvent * e = new KviThreadDataEvent(KVI_DCC_THREAD_EVENT_MESSAGE); e->setData(new KviStr(m)); - postEvent(parent(),e); + postEvent(tqparent(),e); } // FIXME: This stuff should be somewhat related to the 1448 bytes TCP basic packet size @@ -191,7 +191,7 @@ void KviDccRecvThread::run() int iProbableTerminationTime = 0; - m_pFile = new QFile(QString::fromUtf8(m_pOpt->szFileName.ptr())); + m_pFile = new TQFile(TQString::fromUtf8(m_pOpt->szFileName.ptr())); if(m_pOpt->bResume) { @@ -292,7 +292,7 @@ void KviDccRecvThread::run() { // Received the whole file...die KviThreadEvent * e = new KviThreadEvent(KVI_DCC_THREAD_EVENT_SUCCESS); - postEvent(parent(),e); + postEvent(tqparent(),e); break; } } @@ -327,7 +327,7 @@ void KviDccRecvThread::run() { // success if we got the whole file or if we don't know the file size (we trust the peer) KviThreadEvent * e = new KviThreadEvent(KVI_DCC_THREAD_EVENT_SUCCESS); - postEvent(parent(),e); + postEvent(tqparent(),e); break; } } @@ -368,7 +368,7 @@ void KviDccRecvThread::run() // success if we got the whole file or if we don't know the file size (we trust the peer) postMessageEvent(__tr2qs_ctx("Data transfer was terminated 30 seconds ago, closing the connection","dcc")); KviThreadEvent * e = new KviThreadEvent(KVI_DCC_THREAD_EVENT_SUCCESS); - postEvent(parent(),e); + postEvent(tqparent(),e); break; } } @@ -410,7 +410,7 @@ void KviDccRecvThread::doneGetInfo() m_pMutex->unlock(); } -KviDccSendThread::KviDccSendThread(QObject * par,kvi_socket_t fd,KviDccSendThreadOptions * opt) +KviDccSendThread::KviDccSendThread(TQObject * par,kvi_socket_t fd,KviDccSendThreadOptions * opt) : KviDccThread(par,fd) { m_pOpt = opt; @@ -486,12 +486,12 @@ void KviDccSendThread::run() int iFailedSelects = 0; char ackbuffer[4]; int iBytesInAckBuffer = 0; - Q_UINT32 iLastAck = 0; + TQ_UINT32 iLastAck = 0; if(m_pOpt->iPacketSize < 32)m_pOpt->iPacketSize = 32; char * buffer = (char *)kvi_malloc(m_pOpt->iPacketSize * sizeof(char)); - QFile * pFile = new QFile(QString::fromUtf8(m_pOpt->szFileName.ptr())); + TQFile * pFile = new TQFile(TQString::fromUtf8(m_pOpt->szFileName.ptr())); if(!pFile->open(IO_ReadOnly)) { @@ -550,7 +550,7 @@ void KviDccSendThread::run() iBytesInAckBuffer += readLen; if(iBytesInAckBuffer == 4) { - Q_UINT32 iNewAck = ntohl(*((Q_UINT32 *)ackbuffer)); + TQ_UINT32 iNewAck = ntohl(*((TQ_UINT32 *)ackbuffer)); if((iNewAck > pFile->at()) || (iNewAck < iLastAck)) { // the peer is drunk or is trying to fool us @@ -572,7 +572,7 @@ void KviDccSendThread::run() if(iLastAck >= pFile->size()) { KviThreadEvent * e = new KviThreadEvent(KVI_DCC_THREAD_EVENT_SUCCESS); - postEvent(parent(),e); + postEvent(tqparent(),e); break; } } else { @@ -589,7 +589,7 @@ void KviDccSendThread::run() // done...success updateStats(); KviThreadEvent * e = new KviThreadEvent(KVI_DCC_THREAD_EVENT_SUCCESS); - postEvent(parent(),e); + postEvent(tqparent(),e); break; } else { if(readLen < 0) @@ -598,7 +598,7 @@ void KviDccSendThread::run() } else { KviThreadDataEvent * e = new KviThreadDataEvent(KVI_DCC_THREAD_EVENT_MESSAGE); e->setData(new KviStr(__tr2qs_ctx("WARNING: Received data in a DCC TSEND, there should be no acknowledges","dcc"))); - postEvent(parent(),e); + postEvent(tqparent(),e); } } } @@ -672,7 +672,7 @@ void KviDccSendThread::run() // not in a tdcc: we can close the file... updateStats(); KviThreadEvent * e = new KviThreadEvent(KVI_DCC_THREAD_EVENT_SUCCESS); - postEvent(parent(),e); + postEvent(tqparent(),e); break; } else { // upload finished but we're waiting for the last ack @@ -729,19 +729,19 @@ KviDccFileTransfer::KviDccFileTransfer(KviDccDescriptor * dcc) m_pResumeTimer = 0; m_pBandwidthDialog = 0; - KviQString::sprintf(m_szTransferIdString,__tr2qs_ctx("TRANSFER %d","dcc"),id()); + KviTQString::sprintf(m_szTransferIdString,__tr2qs_ctx("TRANSFER %d","dcc"),id()); m_pDescriptor = dcc; m_pDescriptor->setTransfer(this); m_pMarshal = new KviDccMarshal(this); - connect(m_pMarshal,SIGNAL(error(int)),this,SLOT(handleMarshalError(int))); - connect(m_pMarshal,SIGNAL(connected()),this,SLOT(connected())); - connect(m_pMarshal,SIGNAL(inProgress()),this,SLOT(connectionInProgress())); + connect(m_pMarshal,TQT_SIGNAL(error(int)),this,TQT_SLOT(handleMarshalError(int))); + connect(m_pMarshal,TQT_SIGNAL(connected()),this,TQT_SLOT(connected())); + connect(m_pMarshal,TQT_SIGNAL(inProgress()),this,TQT_SLOT(connectionInProgress())); #ifdef COMPILE_SSL_SUPPORT - connect(m_pMarshal,SIGNAL(startingSSLHandshake()),this,SLOT(startingSSLHandshake())); - connect(m_pMarshal,SIGNAL(sslError(const char *)),this,SLOT(sslError(const char *))); + connect(m_pMarshal,TQT_SIGNAL(startingSSLHandshake()),this,TQT_SLOT(startingSSLHandshake())); + connect(m_pMarshal,TQT_SIGNAL(sslError(const char *)),this,TQT_SLOT(sslError(const char *))); #endif m_szDccType = dcc->bIsTdcc ? (dcc->bRecvFile ? "TRECV" : "TSEND") : (dcc->bRecvFile ? "RECV" : "SEND"); @@ -753,7 +753,7 @@ KviDccFileTransfer::KviDccFileTransfer(KviDccDescriptor * dcc) m_tTransferEndTime = 0; m_szStatusString = __tr2qs_ctx("Setting up the connection","dcc"); - m_eGeneralStatus = Connecting; + m_eGeneraltqStatus = Connecting; bool bOk; m_uTotalFileSize = dcc->bRecvFile ? dcc->szFileSize.toUInt(&bOk) : dcc->szLocalFileSize.toUInt(&bOk); @@ -811,18 +811,18 @@ void KviDccFileTransfer::startConnection() if(!(m_pDescriptor->bActive)) { // PASSIVE CONNECTION - m_szStatusString = __tr2qs_ctx("Attempting a passive DCC %1 connection","dcc").arg(m_szDccType.ptr()); + m_szStatusString = __tr2qs_ctx("Attempting a passive DCC %1 connection","dcc").tqarg(m_szDccType.ptr()); outputAndLog(m_szStatusString); } else { // ACTIVE CONNECTION - m_szStatusString = __tr2qs_ctx("Attempting an active DCC %1 connection","dcc").arg(m_szDccType.ptr()); + m_szStatusString = __tr2qs_ctx("Attempting an active DCC %1 connection","dcc").tqarg(m_szDccType.ptr()); outputAndLog(m_szStatusString); } if(m_pDescriptor->bResume && m_pDescriptor->bRecvFile) { - QString fName; + TQString fName; KviServerParser::encodeCtcpParameter(m_pDescriptor->szFileName.utf8().data(),fName); if(m_pDescriptor->isZeroPortRequest()) { @@ -841,7 +841,7 @@ void KviDccFileTransfer::startConnection() m_pDescriptor->szPort.utf8().data(), m_pDescriptor->szLocalFileSize.utf8().data(),0x01); } - m_szStatusString = __tr2qs_ctx("Sent DCC RESUME request to %1, waiting for ACCEPT","dcc").arg(m_pDescriptor->szNick); + m_szStatusString = __tr2qs_ctx("Sent DCC RESUME request to %1, waiting for ACCEPT","dcc").tqarg(m_pDescriptor->szNick); outputAndLog(m_szStatusString); // setup the resume timer: we don't want to wait forever @@ -850,8 +850,8 @@ void KviDccFileTransfer::startConnection() KVI_OPTION_UINT(KviOption_uintDccSocketTimeout) = 5; if(m_pResumeTimer)delete m_pResumeTimer; - m_pResumeTimer = new QTimer(this); - connect(m_pResumeTimer,SIGNAL(timeout()),this,SLOT(resumeTimedOut())); + m_pResumeTimer = new TQTimer(this); + connect(m_pResumeTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(resumeTimedOut())); m_pResumeTimer->start(KVI_OPTION_UINT(KviOption_uintDccSocketTimeout) * 1000,true); } else { listenOrConnect(); @@ -899,7 +899,7 @@ void KviDccFileTransfer::die() delete this; } -QString KviDccFileTransfer::localFileName() +TQString KviDccFileTransfer::localFileName() { return m_pDescriptor->szLocalFileName; } @@ -919,12 +919,12 @@ void KviDccFileTransfer::abort() else if(m_pSlaveSendThread)tmp.setNum(m_pSlaveSendThread->sentBytes()); else tmp = '0'; - m_eGeneralStatus = Failure; + m_eGeneraltqStatus = Failure; m_tTransferEndTime = kvi_unixTime(); m_szStatusString = __tr2qs_ctx("Transfer failed: ","dcc"); m_szStatusString += __tr2qs_ctx("Aborted","dcc"); - KVS_TRIGGER_EVENT_3(KviEvent_OnDCCFileTransferFailed,eventWindow(),QString("Aborted by user"),QString(tmp.ptr()),m_pDescriptor->idString()); + KVS_TRIGGER_EVENT_3(KviEvent_OnDCCFileTransferFailed,eventWindow(),TQString("Aborted by user"),TQString(tmp.ptr()),m_pDescriptor->idString()); outputAndLog(KVI_OUT_DCCERROR,m_szStatusString); displayUpdate(); @@ -933,15 +933,15 @@ void KviDccFileTransfer::abort() void KviDccFileTransfer::fillContextPopup(KviTalPopupMenu * m,int column) { - m->insertItem(__tr2qs_ctx("Configure Bandwidth...","dcc"),this,SLOT(configureBandwidth())); + m->insertItem(__tr2qs_ctx("Configure Bandwidth...","dcc"),this,TQT_SLOT(configureBandwidth())); m->insertSeparator(); - m->insertItem(__tr2qs_ctx("Resend DCC","dcc"),this,SLOT(retryDCC())); - m->insertItem(__tr2qs_ctx("Resend TDCC","dcc"),this,SLOT(retryTDCC())); - m->insertItem(__tr2qs_ctx("Resend RevDCC","dcc"),this,SLOT(retryRevDCC())); + m->insertItem(__tr2qs_ctx("Resend DCC","dcc"),this,TQT_SLOT(retryDCC())); + m->insertItem(__tr2qs_ctx("Resend TDCC","dcc"),this,TQT_SLOT(retryTDCC())); + m->insertItem(__tr2qs_ctx("Resend RevDCC","dcc"),this,TQT_SLOT(retryRevDCC())); /* FIX ME credo che il problema sia che se riavvio un trasferimento, a sua volta gia' avviato, questo non ha irc contex, perche' la finestra "in cui e' nato"e' sta quella della dcc. Conservarsi l'id della finestra? */ - int id = m->insertItem(__tr2qs_ctx("Abort","dcc"),this,SLOT(abort())); + int id = m->insertItem(__tr2qs_ctx("Abort","dcc"),this,TQT_SLOT(abort())); if(!active())m->setItemEnabled(id,false); } @@ -949,7 +949,7 @@ void KviDccFileTransfer::configureBandwidth() { if(m_pBandwidthDialog)return; m_pBandwidthDialog = new KviDccFileTransferBandwidthDialog(g_pFrame,this); - connect(m_pBandwidthDialog,SIGNAL(destroyed()),this,SLOT(bandwidthDialogDestroyed())); + connect(m_pBandwidthDialog,TQT_SIGNAL(destroyed()),this,TQT_SLOT(bandwidthDialogDestroyed())); m_pBandwidthDialog->setModal(true); m_pBandwidthDialog->show(); } @@ -957,38 +957,38 @@ void KviDccFileTransfer::configureBandwidth() void KviDccFileTransfer::retryDCC() { abort(); - QString szRemoteNick = m_pDescriptor->remoteNick(); - QString szFileName = m_pDescriptor->localFileName(); - QString szId; + TQString szRemoteNick = m_pDescriptor->remoteNick(); + TQString szFileName = m_pDescriptor->localFileName(); + TQString szId; szId.setNum(m_pDescriptor->id()); - QString szCommand = "dcc.send -r=$console($dcc.irccontext(" + szId + ")) " + szRemoteNick + " " + "\"" + szFileName + "\""; + TQString szCommand = "dcc.send -r=$console($dcc.irccontext(" + szId + ")) " + szRemoteNick + " " + "\"" + szFileName + "\""; KviKvsScript::run(szCommand,g_pActiveWindow); } void KviDccFileTransfer::retryTDCC() { abort(); - QString szRemoteNick = m_pDescriptor->remoteNick(); - QString szFileName = m_pDescriptor->localFileName(); - QString szId; + TQString szRemoteNick = m_pDescriptor->remoteNick(); + TQString szFileName = m_pDescriptor->localFileName(); + TQString szId; szId.setNum(m_pDescriptor->id()); - QString szCommand = "dcc.send -r=$console($dcc.irccontext(" + szId + ")) -t " + szRemoteNick + " " + "\"" + szFileName + "\""; + TQString szCommand = "dcc.send -r=$console($dcc.irccontext(" + szId + ")) -t " + szRemoteNick + " " + "\"" + szFileName + "\""; KviKvsScript::run(szCommand,g_pActiveWindow); } void KviDccFileTransfer::retryRevDCC() { abort(); - QString szRemoteNick = m_pDescriptor->remoteNick(); - QString szFileName = m_pDescriptor->localFileName(); - QString szId; + TQString szRemoteNick = m_pDescriptor->remoteNick(); + TQString szFileName = m_pDescriptor->localFileName(); + TQString szId; szId.setNum(m_pDescriptor->id()); - QString szCommand = "dcc.rsend -z -r=$console($dcc.irccontext(" + szId + ")) " + szRemoteNick + " " + "\"" + szFileName + "\""; + TQString szCommand = "dcc.rsend -z -r=$console($dcc.irccontext(" + szId + ")) " + szRemoteNick + " " + "\"" + szFileName + "\""; KviKvsScript::run(szCommand,g_pActiveWindow); } -void KviDccFileTransfer::fillStatusString(QString &szBuffer) +void KviDccFileTransfer::fillStatusString(TQString &szBuffer) { - switch(m_eGeneralStatus) + switch(m_eGeneraltqStatus) { case Connecting: szBuffer = "connecting"; @@ -1010,7 +1010,7 @@ void KviDccFileTransfer::fillStatusString(QString &szBuffer) bool KviDccFileTransfer::active() { - return ((m_eGeneralStatus == Connecting) || (m_eGeneralStatus == Transferring)); + return ((m_eGeneraltqStatus == Connecting) || (m_eGeneraltqStatus == Transferring)); } int KviDccFileTransfer::bandwidthLimit() @@ -1104,11 +1104,11 @@ unsigned int KviDccFileTransfer::transferredBytes() return uTransferred; } -void KviDccFileTransfer::displayPaint(QPainter * p,int column,int width,int height) +void KviDccFileTransfer::displayPaint(TQPainter * p,int column,int width,int height) { - QString txt; - bool bIsTerminated = ((m_eGeneralStatus == Success) || (m_eGeneralStatus == Failure)); + TQString txt; + bool bIsTerminated = ((m_eGeneraltqStatus == Success) || (m_eGeneraltqStatus == Failure)); switch(column) { @@ -1117,7 +1117,7 @@ void KviDccFileTransfer::displayPaint(QPainter * p,int column,int width,int heig int xoffset = 0; int yoffset = 0; if(m_pDescriptor->bRecvFile)yoffset = 64; - switch(m_eGeneralStatus) + switch(m_eGeneraltqStatus) { case Connecting: xoffset = 0; break; case Transferring: xoffset = 48; break; @@ -1130,10 +1130,10 @@ void KviDccFileTransfer::displayPaint(QPainter * p,int column,int width,int heig case COLUMN_FILEINFO: { - QFontMetrics fm(p->font()); + TQFontMetrics fm(p->font()); - QString szFrom = __tr2qs_ctx("From: ","dcc"); - QString szTo = __tr2qs_ctx("To: ","dcc"); + TQString szFrom = __tr2qs_ctx("From: ","dcc"); + TQString szTo = __tr2qs_ctx("To: ","dcc"); int daW1 = fm.width(szFrom); int daW2 = fm.width(szTo); @@ -1142,43 +1142,43 @@ void KviDccFileTransfer::displayPaint(QPainter * p,int column,int width,int heig int iY = 4; - p->setPen(Qt::black); + p->setPen(TQt::black); KviStr szRemote(KviStr::Format,"dcc://%s@%s:%s/%s",m_pDescriptor->szNick.utf8().data(),m_pDescriptor->szIp.utf8().data(),m_pDescriptor->szPort.utf8().data(), m_pDescriptor->szFileName.utf8().data()); - p->drawText(4 + daW1,iY,width - (8 + daW1),height - 8,Qt::AlignTop | Qt::AlignLeft, + p->drawText(4 + daW1,iY,width - (8 + daW1),height - 8,TQt::AlignTop | TQt::AlignLeft, m_pDescriptor->bRecvFile ? szRemote.ptr() : m_pDescriptor->szLocalFileName.utf8().data()); iY += iLineSpacing; - p->drawText(4 + daW1,iY,width - (8 + daW1),height - 8,Qt::AlignTop | Qt::AlignLeft, + p->drawText(4 + daW1,iY,width - (8 + daW1),height - 8,TQt::AlignTop | TQt::AlignLeft, m_pDescriptor->bRecvFile ? m_pDescriptor->szLocalFileName.utf8().data() : szRemote.ptr()); iY += iLineSpacing; - p->setPen(Qt::darkGray); + p->setPen(TQt::darkGray); - p->drawText(4,4,width - 8,height - 8,Qt::AlignTop | Qt::AlignLeft,szFrom); - p->drawText(4,4 + iLineSpacing,width - 8,height - 8,Qt::AlignTop | Qt::AlignLeft,szTo); + p->drawText(4,4,width - 8,height - 8,TQt::AlignTop | TQt::AlignLeft,szFrom); + p->drawText(4,4 + iLineSpacing,width - 8,height - 8,TQt::AlignTop | TQt::AlignLeft,szTo); - p->setPen(QColor(180,180,200)); + p->setPen(TQColor(180,180,200)); iLineSpacing += 2; p->drawRect(4,height - (iLineSpacing + 4),width - 8,iLineSpacing); - p->fillRect(5,height - (iLineSpacing + 3),width - 10,iLineSpacing - 2,bIsTerminated ? QColor(210,210,210) : QColor(190,190,240)); + p->fillRect(5,height - (iLineSpacing + 3),width - 10,iLineSpacing - 2,bIsTerminated ? TQColor(210,210,210) : TQColor(190,190,240)); - p->setPen(Qt::black); + p->setPen(TQt::black); - p->drawText(7,height - (iLineSpacing + 4),width - 14,iLineSpacing,Qt::AlignVCenter | Qt::AlignLeft,m_szStatusString); + p->drawText(7,height - (iLineSpacing + 4),width - 14,iLineSpacing,TQt::AlignVCenter | TQt::AlignLeft,m_szStatusString); } break; case COLUMN_PROGRESS: { - QFontMetrics fm(p->font()); + TQFontMetrics fm(p->font()); int iW = width - 8; int iAvgBandwidth = -1; @@ -1211,7 +1211,7 @@ void KviDccFileTransfer::displayPaint(QPainter * p,int column,int width,int heig } } - p->setPen(bIsTerminated ? Qt::lightGray : QColor(210,210,240)); + p->setPen(bIsTerminated ? TQt::lightGray : TQColor(210,210,240)); p->drawRect(4,4,iW,12); iW -= 2; @@ -1233,26 +1233,26 @@ void KviDccFileTransfer::displayPaint(QPainter * p,int column,int width,int heig double dPerc2 = (double)(((double)iAckedBytes) * 100.0) / (double)m_uTotalFileSize; int iL2 = (int) ((((double)iW) * dPerc2) / 100.0); int iW2 = iL1 - iL2; - if(iW2 > 0)p->fillRect(5 + iL2,5,iW2,10,bIsTerminated ? QColor(150,130,110) : QColor(220,170,100)); - p->fillRect(5,5,iL2,10,bIsTerminated ? QColor(140,110,110) : QColor(200,100,100)); + if(iW2 > 0)p->fillRect(5 + iL2,5,iW2,10,bIsTerminated ? TQColor(150,130,110) : TQColor(220,170,100)); + p->fillRect(5,5,iL2,10,bIsTerminated ? TQColor(140,110,110) : TQColor(200,100,100)); - txt = QString(__tr2qs_ctx("%1 of %2 (%3%)","dcc")).arg(KviQString::makeSizeReadable(iAckedBytes)).arg(KviQString::makeSizeReadable(m_uTotalFileSize)).arg(dPerc2,0,'f',2); + txt = TQString(__tr2qs_ctx("%1 of %2 (%3%)","dcc")).tqarg(KviTQString::makeSizeReadable(iAckedBytes)).tqarg(KviTQString::makeSizeReadable(m_uTotalFileSize)).tqarg(dPerc2,0,'f',2); } else { // we are receiving a file or not sending acks double dPerc = (double)(((double)uTransferred) * 100.0) / (double)m_uTotalFileSize; int iL = (int) ((((double)iW) * dPerc) / 100.0); - p->fillRect(5,5,iL,10,bIsTerminated ? QColor(140,110,110) : QColor(200,100,100)); + p->fillRect(5,5,iL,10,bIsTerminated ? TQColor(140,110,110) : TQColor(200,100,100)); - txt = QString(__tr2qs_ctx("%1 of %2 (%3%)","dcc")).arg(KviQString::makeSizeReadable(uTransferred)).arg(KviQString::makeSizeReadable(m_uTotalFileSize)).arg(dPerc,0,'f',2); + txt = TQString(__tr2qs_ctx("%1 of %2 (%3%)","dcc")).tqarg(KviTQString::makeSizeReadable(uTransferred)).tqarg(KviTQString::makeSizeReadable(m_uTotalFileSize)).tqarg(dPerc,0,'f',2); } } else { - txt = QString(__tr2qs_ctx("%1","dcc")).arg(KviQString::makeSizeReadable(uTransferred)); + txt = TQString(__tr2qs_ctx("%1","dcc")).tqarg(KviTQString::makeSizeReadable(uTransferred)); } - p->setPen(Qt::black); + p->setPen(TQt::black); - p->drawText(4,19,width - 8,height - 8,Qt::AlignTop | Qt::AlignLeft,txt); + p->drawText(4,19,width - 8,height - 8,TQt::AlignTop | TQt::AlignLeft,txt); int iLeftHalf = (iW - 2) / 2; int iRightHalf = iW - (iLeftHalf + 1); @@ -1264,7 +1264,7 @@ void KviDccFileTransfer::displayPaint(QPainter * p,int column,int width,int heig txt += " "; if(iInstantSpeed >= 0) { - QString tmpisp; + TQString tmpisp; KviNetUtils::formatNetworkBandwidthString(tmpisp,iInstantSpeed); txt += tmpisp; } else { @@ -1279,7 +1279,7 @@ void KviDccFileTransfer::displayPaint(QPainter * p,int column,int width,int heig txt += " "; if(iAvgBandwidth >= 0) { - QString tmpspd; + TQString tmpspd; KviNetUtils::formatNetworkBandwidthString(tmpspd,iAvgBandwidth); txt += tmpspd; } else { @@ -1293,17 +1293,17 @@ void KviDccFileTransfer::displayPaint(QPainter * p,int column,int width,int heig int iDaH = height - (iLineSpacing + 4); - p->setPen(QColor(180,180,200)); + p->setPen(TQColor(180,180,200)); p->drawRect(4,iDaH,iLeftHalf,iLineSpacing); - p->fillRect(5,iDaH + 1,iLeftHalf - 2,iLineSpacing - 2,bIsTerminated ? QColor(210,210,210) : QColor(190,190,240)); - p->setPen(bIsTerminated ? Qt::darkGray : Qt::black); - p->drawText(6,iDaH,iLeftHalf - 4,iLineSpacing,Qt::AlignLeft | Qt::AlignVCenter,txt); + p->fillRect(5,iDaH + 1,iLeftHalf - 2,iLineSpacing - 2,bIsTerminated ? TQColor(210,210,210) : TQColor(190,190,240)); + p->setPen(bIsTerminated ? TQt::darkGray : TQt::black); + p->drawText(6,iDaH,iLeftHalf - 4,iLineSpacing,TQt::AlignLeft | TQt::AlignVCenter,txt); if(bIsTerminated) { if((m_tTransferStartTime != 0) && (m_tTransferEndTime != 0)) { - QString tot = KviTimeUtils::formatTimeInterval(kvi_timeSpan(m_tTransferEndTime,m_tTransferStartTime),KviTimeUtils::NoLeadingEmptyIntervals | KviTimeUtils::NoLeadingZeroes); + TQString tot = KviTimeUtils::formatTimeInterval(kvi_timeSpan(m_tTransferEndTime,m_tTransferStartTime),KviTimeUtils::NoLeadingEmptyIntervals | KviTimeUtils::NoLeadingZeroes); txt = "TOT: "; txt += tot; } else { @@ -1312,7 +1312,7 @@ void KviDccFileTransfer::displayPaint(QPainter * p,int column,int width,int heig } else { if(iEta >= 0) { - QString eta = KviTimeUtils::formatTimeInterval(iEta,KviTimeUtils::NoLeadingEmptyIntervals | KviTimeUtils::NoLeadingZeroes); + TQString eta = KviTimeUtils::formatTimeInterval(iEta,KviTimeUtils::NoLeadingEmptyIntervals | KviTimeUtils::NoLeadingZeroes); txt = "ETA: "; txt += eta; } else { @@ -1320,11 +1320,11 @@ void KviDccFileTransfer::displayPaint(QPainter * p,int column,int width,int heig } } - p->setPen(QColor(180,180,200)); + p->setPen(TQColor(180,180,200)); p->drawRect(width - (4 + iRightHalf),iDaH,iRightHalf,iLineSpacing); - p->fillRect(width - (3 + iRightHalf),iDaH + 1,iRightHalf - 2,iLineSpacing - 2,bIsTerminated ? QColor(210,210,210) : QColor(190,190,240)); - p->setPen(bIsTerminated ? Qt::darkGray : Qt::black); - p->drawText(width - (2 + iRightHalf),iDaH,iRightHalf - 4,iLineSpacing,Qt::AlignLeft | Qt::AlignVCenter,txt); + p->fillRect(width - (3 + iRightHalf),iDaH + 1,iRightHalf - 2,iLineSpacing - 2,bIsTerminated ? TQColor(210,210,210) : TQColor(190,190,240)); + p->setPen(bIsTerminated ? TQt::darkGray : TQt::black); + p->drawText(width - (2 + iRightHalf),iDaH,iRightHalf - 4,iLineSpacing,TQt::AlignLeft | TQt::AlignVCenter,txt); } break; @@ -1338,12 +1338,12 @@ int KviDccFileTransfer::displayHeight(int iLineSpacing) return iH >= 70 ? iH : 70; } -QString KviDccFileTransfer::tipText() +TQString KviDccFileTransfer::tipText() { - QString s; + TQString s; - s = QString("").arg(m_szDccType.ptr()).arg(id()); + s = TQString("
DCC %1 (ID %2)
").tqarg(m_szDccType.ptr()).tqarg(id()); s += "
DCC %1 (ID %2)
"; s += __tr2qs_ctx("Transfer Log","dcc"); @@ -1362,9 +1362,9 @@ void KviDccFileTransfer::init() g_pDccFileTransfers = new KviPointerList; g_pDccFileTransfers->setAutoDelete(false); - QPixmap * pix = g_pIconManager->getImage("kvi_dccfiletransfericons.png"); - if(pix)g_pDccFileTransferIcon = new QPixmap(*pix); - else g_pDccFileTransferIcon = new QPixmap(192,128); + TQPixmap * pix = g_pIconManager->getImage("kvi_dccfiletransfericons.png"); + if(pix)g_pDccFileTransferIcon = new TQPixmap(*pix); + else g_pDccFileTransferIcon = new TQPixmap(192,128); } void KviDccFileTransfer::done() @@ -1384,7 +1384,7 @@ unsigned int KviDccFileTransfer::transferCount() return g_pDccFileTransfers->count(); } -KviDccFileTransfer * KviDccFileTransfer::nonFailedTransferWithLocalFileName(const QString &szLocalFileName) +KviDccFileTransfer * KviDccFileTransfer::nonFailedTransferWithLocalFileName(const TQString &szLocalFileName) { if(!g_pDccFileTransfers)return 0; for(KviDccFileTransfer * t = g_pDccFileTransfers->first();t;t = g_pDccFileTransfers->next()) @@ -1396,7 +1396,7 @@ KviDccFileTransfer * KviDccFileTransfer::nonFailedTransferWithLocalFileName(cons if(t->localFileName() == szLocalFileName) #endif { - if(t->m_eGeneralStatus != Failure) + if(t->m_eGeneraltqStatus != Failure) return t; } } @@ -1439,14 +1439,14 @@ bool KviDccFileTransfer::handleResumeRequest(const char * filename,const char * return false; } -void KviDccFileTransfer::outputAndLog(const QString &s) +void KviDccFileTransfer::outputAndLog(const TQString &s) { KviWindow * out = transferWindow(); addToTransferLog(s); if(out)out->output(KVI_OUT_DCCMSG,"[%Q]: %Q",&m_szTransferIdString,&s); } -void KviDccFileTransfer::outputAndLog(int msgtype,const QString &s) +void KviDccFileTransfer::outputAndLog(int msgtype,const TQString &s) { KviWindow * out = transferWindow(); addToTransferLog(s); @@ -1454,10 +1454,10 @@ void KviDccFileTransfer::outputAndLog(int msgtype,const QString &s) } -void KviDccFileTransfer::addToTransferLog(const QString &s) +void KviDccFileTransfer::addToTransferLog(const TQString &s) { - QDateTime dt = QDateTime::currentDateTime(); - QString ts; + TQDateTime dt = TQDateTime::tqcurrentDateTime(); + TQString ts; ts.sprintf("[%4d.%2d.%2d %2d:%2d:%2d] ",dt.date().year(),dt.date().month(),dt.date().day(),dt.time().hour(),dt.time().minute(),dt.time().second()); m_szTransferLog += ts+s; m_szTransferLog += "
"; @@ -1477,19 +1477,19 @@ void KviDccFileTransfer::connectionInProgress() // if(TRIGGER_EVENT_5PARAM_RETVALUE(KviEvent_OnDCCSendConnected,this,m_pDescriptor->szPort.ptr(),m_pDescriptor->szFileName.ptr(),m_pDescriptor->szNick.ptr(),m_pDescriptor->szUser.ptr(),m_pDescriptor->szHost.ptr())); // } // - m_szStatusString = __tr2qs_ctx("Contacting host %1 on port %2","dcc").arg(m_pDescriptor->szIp).arg(m_pDescriptor->szPort); + m_szStatusString = __tr2qs_ctx("Contacting host %1 on port %2","dcc").tqarg(m_pDescriptor->szIp).tqarg(m_pDescriptor->szPort); outputAndLog(m_szStatusString); displayUpdate(); return; } // PASSIVE CONNECTION - m_szStatusString = __tr2qs_ctx("Listening on interface %1 port %2","dcc").arg(m_pMarshal->localIp()).arg(m_pMarshal->localPort()); + m_szStatusString = __tr2qs_ctx("Listening on interface %1 port %2","dcc").tqarg(m_pMarshal->localIp()).tqarg(m_pMarshal->localPort()); outputAndLog(m_szStatusString); if(m_pDescriptor->bSendRequest) { - QString ip; + TQString ip; if(!m_pDescriptor->szFakeIp.isEmpty()) { ip = m_pDescriptor->szFakeIp; @@ -1503,11 +1503,11 @@ void KviDccFileTransfer::connectionInProgress() // try to get the IP that the IRC server can see if(m_pDescriptor->console()) { - QString tmp = m_pDescriptor->console()->connection() ? m_pDescriptor->console()->connection()->userInfo()->hostIp() : ""; + TQString tmp = m_pDescriptor->console()->connection() ? m_pDescriptor->console()->connection()->userInfo()->hostIp() : ""; if(!tmp.isEmpty()) { ip = tmp; - outputAndLog(__tr2qs_ctx("The local IP address is private, determining from IRC server: %1","dcc").arg(ip)); + outputAndLog(__tr2qs_ctx("The local IP address is private, determining from IRC server: %1","dcc").tqarg(ip)); } else { outputAndLog(__tr2qs_ctx("The local IP address is private, but unable to determine it from the IRC server","dcc")); } @@ -1523,16 +1523,16 @@ void KviDccFileTransfer::connectionInProgress() struct in_addr a; if(KviNetUtils::stringIpToBinaryIp(ip,&a))ip.setNum(htonl(a.s_addr)); - QString tmp = m_pDescriptor->szFileName; + TQString tmp = m_pDescriptor->szFileName; // just to be sure - KviQString::cutToLast(tmp,'/'); - KviQString::cutToLast(tmp,'\\'); + KviTQString::cutToLast(tmp,'/'); + KviTQString::cutToLast(tmp,'\\'); - QString fName; + TQString fName; // BUG-TO-BUG mIrc compatibility if(KVI_OPTION_BOOL(KviOption_boolDCCFileTransferReplaceOutgoingSpacesWithUnderscores)) - tmp.replace(" ","_"); + tmp.tqreplace(" ","_"); KviServerParser::encodeCtcpParameter(tmp.utf8().data(),fName); // Zero port requests want DCC SEND as back-request @@ -1558,9 +1558,9 @@ void KviDccFileTransfer::connectionInProgress() ip.utf8().data(),port.ptr(), &(m_pDescriptor->szLocalFileSize),0x01); } - outputAndLog(__tr2qs_ctx("Sent DCC %1 request to %2, waiting for remote client to connect...","dcc").arg(szReq.ptr()).arg(m_pDescriptor->szNick)); + outputAndLog(__tr2qs_ctx("Sent DCC %1 request to %2, waiting for remote client to connect...","dcc").tqarg(szReq.ptr()).tqarg(m_pDescriptor->szNick)); } else { - outputAndLog(__tr2qs_ctx("DCC %1 request not sent, awaiting manual connection","dcc").arg(m_szDccType.ptr())); + outputAndLog(__tr2qs_ctx("DCC %1 request not sent, awaiting manual connection","dcc").tqarg(m_szDccType.ptr())); } KVS_TRIGGER_EVENT_1(KviEvent_OnDCCFileTransferConnectionInProgress,eventWindow(),m_pDescriptor->idString()); @@ -1579,14 +1579,14 @@ void KviDccFileTransfer::startingSSLHandshake() void KviDccFileTransfer::sslError(const char * msg) { #ifdef COMPILE_SSL_SUPPORT - outputAndLog(KVI_OUT_DCCERROR,__tr2qs_ctx("[SSL ERROR]: %1","dcc").arg(msg)); + outputAndLog(KVI_OUT_DCCERROR,__tr2qs_ctx("[SSL ERROR]: %1","dcc").tqarg(msg)); #endif } -bool KviDccFileTransfer::event(QEvent *e) +bool KviDccFileTransfer::event(TQEvent *e) { if(e->type() == KVI_THREAD_EVENT) { @@ -1595,14 +1595,14 @@ bool KviDccFileTransfer::event(QEvent *e) case KVI_DCC_THREAD_EVENT_ERROR: { int * err = ((KviThreadDataEvent *)e)->getData(); - QString szErrorString = KviError::getDescription(*err); + TQString szErrorString = KviError::getDescription(*err); delete err; if(m_pDescriptor->bRecvFile) g_pApp->fileDownloadTerminated(false,m_pDescriptor->szFileName.utf8().data(),m_pDescriptor->szLocalFileName.utf8().data(),m_pDescriptor->szNick.utf8().data(),szErrorString.utf8().data()); m_szStatusString = __tr2qs_ctx("Transfer failed: ","dcc"); m_szStatusString += szErrorString; - m_eGeneralStatus = Failure; + m_eGeneraltqStatus = Failure; m_tTransferEndTime = kvi_unixTime(); KVS_TRIGGER_EVENT_3(KviEvent_OnDCCFileTransferFailed, @@ -1634,15 +1634,15 @@ bool KviDccFileTransfer::event(QEvent *e) // Also add an optional message to the notifier, unless it is an AVATAR download! if(KVI_OPTION_BOOL(KviOption_boolNotifiDccDownloadSuccessInNotifier)) { - QString szMsg; - KviQString::sprintf(szMsg,__tr2qs_ctx("")); + TQString szMsg; + KviTQString::sprintf(szMsg,__tr2qs_ctx("")); g_pApp->notifierMessage(0,KVI_SMALLICON_DCCMSG,szMsg,30); } */ if(m_pDescriptor->bRecvFile)g_pApp->fileDownloadTerminated(true,m_pDescriptor->szFileName.utf8().data(),m_pDescriptor->szLocalFileName.utf8().data(),m_pDescriptor->szNick.utf8().data()); m_szStatusString = __tr2qs_ctx("Transfer completed","dcc"); outputAndLog(m_szStatusString); - m_eGeneralStatus = Success; + m_eGeneraltqStatus = Success; m_tTransferEndTime = kvi_unixTime(); KVS_TRIGGER_EVENT_2(KviEvent_OnDCCFileTransferSuccess, @@ -1659,7 +1659,7 @@ bool KviDccFileTransfer::event(QEvent *e) case KVI_DCC_THREAD_EVENT_MESSAGE: { KviStr * str = ((KviThreadDataEvent *)e)->getData(); - outputAndLog(QString(__tr_no_xgettext_ctx(str->ptr(),"dcc"))); + outputAndLog(TQString(__tr_no_xgettext_ctx(str->ptr(),"dcc"))); delete str; return true; } @@ -1670,14 +1670,14 @@ bool KviDccFileTransfer::event(QEvent *e) } } //#warning "Remove this!" -// if(e->type() == QEvent::Close)debug("Close event received"); +// if(e->type() == TQEvent::Close)debug("Close event received"); return KviFileTransfer::event(e); } void KviDccFileTransfer::handleMarshalError(int err) { - QString szErr = KviError::getDescription(err); - m_eGeneralStatus = Failure; + TQString szErr = KviError::getDescription(err); + m_eGeneraltqStatus = Failure; m_szStatusString = __tr2qs_ctx("Transfer failed: ","dcc"); m_szStatusString += szErr; outputAndLog(m_szStatusString); @@ -1687,8 +1687,8 @@ void KviDccFileTransfer::handleMarshalError(int err) void KviDccFileTransfer::connected() { - outputAndLog(__tr2qs_ctx("Connected to %1:%2","dcc").arg(m_pMarshal->remoteIp()).arg(m_pMarshal->remotePort())); - outputAndLog(__tr2qs_ctx("Local end is %1:%2","dcc").arg(m_pMarshal->localIp()).arg(m_pMarshal->localPort())); + outputAndLog(__tr2qs_ctx("Connected to %1:%2","dcc").tqarg(m_pMarshal->remoteIp()).tqarg(m_pMarshal->remotePort())); + outputAndLog(__tr2qs_ctx("Local end is %1:%2","dcc").tqarg(m_pMarshal->localIp()).tqarg(m_pMarshal->localPort())); m_tTransferStartTime = kvi_unixTime(); @@ -1731,7 +1731,7 @@ void KviDccFileTransfer::connected() m_pSlaveSendThread->start(); } - m_eGeneralStatus = Transferring; + m_eGeneraltqStatus = Transferring; m_szStatusString = __tr2qs_ctx("Transferring data","dcc"); KVS_TRIGGER_EVENT_1(KviEvent_OnDCCFileTransferBegin,eventWindow(),m_pDescriptor->idString()); @@ -1758,7 +1758,7 @@ bool KviDccFileTransfer::resumeAccepted(const char *filename,const char *port,co delete m_pResumeTimer; m_pResumeTimer = 0; - outputAndLog(__tr2qs_ctx("RESUME accepted, transfer will begin at position %1","dcc").arg(m_pDescriptor->szLocalFileSize)); + outputAndLog(__tr2qs_ctx("RESUME accepted, transfer will begin at position %1","dcc").tqarg(m_pDescriptor->szLocalFileSize)); listenOrConnect(); @@ -1768,7 +1768,7 @@ bool KviDccFileTransfer::resumeAccepted(const char *filename,const char *port,co if(ret != KviError_success)handleMarshalError(ret); else { - m_szStatusString = __tr2qs_ctx("Contacting host %1 on port %2","dcc").arg(m_pDescriptor->szIp).arg(m_pDescriptor->szPort); + m_szStatusString = __tr2qs_ctx("Contacting host %1 on port %2","dcc").tqarg(m_pDescriptor->szIp).tqarg(m_pDescriptor->szPort); outputAndLog(m_szStatusString); displayUpdate(); } @@ -1779,10 +1779,10 @@ bool KviDccFileTransfer::resumeAccepted(const char *filename,const char *port,co bool KviDccFileTransfer::doResume(const char * filename,const char * port,unsigned int filePos) { - if(KviQString::equalCI(port,m_pMarshal->dccPort()) && + if(KviTQString::equalCI(port,m_pMarshal->dccPort()) && (!m_pSlaveRecvThread) && (!m_pDescriptor->bRecvFile)) { - if(KviQString::equalCI(filename,m_pDescriptor->szFileName) || KVI_OPTION_BOOL(KviOption_boolAcceptBrokenFileNameDccResumeRequests)) + if(KviTQString::equalCI(filename,m_pDescriptor->szFileName) || KVI_OPTION_BOOL(KviOption_boolAcceptBrokenFileNameDccResumeRequests)) { bool bOk; unsigned int iLocalFileSize = m_pDescriptor->szLocalFileSize.toUInt(&bOk); @@ -1794,11 +1794,11 @@ bool KviDccFileTransfer::doResume(const char * filename,const char * port,unsign } if(iLocalFileSize <= filePos) { - outputAndLog(KVI_OUT_DCCERROR,__tr2qs_ctx("Invalid RESUME request: Position %1 is larger than file size","dcc").arg(filePos)); + outputAndLog(KVI_OUT_DCCERROR,__tr2qs_ctx("Invalid RESUME request: Position %1 is larger than file size","dcc").tqarg(filePos)); return false; } - outputAndLog(KVI_OUT_DCCERROR,__tr2qs_ctx("Accepting RESUME request, transfer will begin at position %1","dcc").arg(filePos)); + outputAndLog(KVI_OUT_DCCERROR,__tr2qs_ctx("Accepting RESUME request, transfer will begin at position %1","dcc").tqarg(filePos)); m_pDescriptor->szFileSize.setNum(filePos); @@ -1822,15 +1822,15 @@ bool KviDccFileTransfer::doResume(const char * filename,const char * port,unsign -KviDccFileTransferBandwidthDialog::KviDccFileTransferBandwidthDialog(QWidget * pParent,KviDccFileTransfer * t) -: QDialog(pParent) +KviDccFileTransferBandwidthDialog::KviDccFileTransferBandwidthDialog(TQWidget * pParent,KviDccFileTransfer * t) +: TQDialog(pParent) { - QGridLayout * g = new QGridLayout(this,3,3,4,4); + TQGridLayout * g = new TQGridLayout(this,3,3,4,4); m_pTransfer = t; int iVal = m_pTransfer->bandwidthLimit(); - QString szText = __tr2qs_ctx("Configure bandwidth for DCC transfer %1","dcc").arg(t->id()); + TQString szText = __tr2qs_ctx("Configure bandwidth for DCC transfer %1","dcc").tqarg(t->id()); setCaption(szText); szText = t->isFileUpload() ? __tr2qs_ctx("Limit upload bandwidth to","dcc") : __tr2qs_ctx("Limit download bandwidth to","dcc"); @@ -1840,9 +1840,9 @@ KviDccFileTransferBandwidthDialog::KviDccFileTransferBandwidthDialog(QWidget * p m_pEnableLimitCheck->setChecked((iVal >= 0) && (iVal < MAX_DCC_BANDWIDTH_LIMIT)); - m_pLimitBox = new QSpinBox(0,MAX_DCC_BANDWIDTH_LIMIT-1,1,this); + m_pLimitBox = new TQSpinBox(0,MAX_DCC_BANDWIDTH_LIMIT-1,1,this); m_pLimitBox->setEnabled((iVal >= 0) && (iVal < MAX_DCC_BANDWIDTH_LIMIT)); - connect(m_pEnableLimitCheck,SIGNAL(toggled(bool)),m_pLimitBox,SLOT(setEnabled(bool))); + connect(m_pEnableLimitCheck,TQT_SIGNAL(toggled(bool)),m_pLimitBox,TQT_SLOT(setEnabled(bool))); g->addMultiCellWidget(m_pLimitBox,0,0,1,2); szText = " "; @@ -1850,13 +1850,13 @@ KviDccFileTransferBandwidthDialog::KviDccFileTransferBandwidthDialog(QWidget * p m_pLimitBox->setSuffix(szText); m_pLimitBox->setValue(iVal < MAX_DCC_BANDWIDTH_LIMIT ? iVal : 0); - QPushButton * pb = new QPushButton(__tr2qs_ctx("OK","dcc"),this); - connect(pb,SIGNAL(clicked()),this,SLOT(okClicked())); + TQPushButton * pb = new TQPushButton(__tr2qs_ctx("OK","dcc"),this); + connect(pb,TQT_SIGNAL(clicked()),this,TQT_SLOT(okClicked())); pb->setMinimumWidth(80); g->addWidget(pb,2,2); - pb = new QPushButton(__tr2qs_ctx("Cancel","dcc"),this); - connect(pb,SIGNAL(clicked()),this,SLOT(cancelClicked())); + pb = new TQPushButton(__tr2qs_ctx("Cancel","dcc"),this); + connect(pb,TQT_SIGNAL(clicked()),this,TQT_SLOT(cancelClicked())); pb->setMinimumWidth(80); g->addWidget(pb,2,1); @@ -1886,7 +1886,7 @@ void KviDccFileTransferBandwidthDialog::cancelClicked() delete this; } -void KviDccFileTransferBandwidthDialog::closeEvent(QCloseEvent * e) +void KviDccFileTransferBandwidthDialog::closeEvent(TQCloseEvent * e) { e->ignore(); delete this; diff --git a/src/modules/dcc/send.h b/src/modules/dcc/send.h index 636f2b3b..a5e80be9 100644 --- a/src/modules/dcc/send.h +++ b/src/modules/dcc/send.h @@ -34,13 +34,13 @@ #include "kvi_sockettype.h" #include "kvi_pointerlist.h" -#include -#include +#include +#include #include "kvi_tal_popupmenu.h" #include "kvi_tal_hbox.h" #include "kvi_tal_vbox.h" -#include -#include +#include +#include #include "kvi_filetransfer.h" #include "kvi_time.h" @@ -62,7 +62,7 @@ typedef struct _KviDccSendThreadOptions class KviDccSendThread : public KviDccThread { public: - KviDccSendThread(QObject * par,kvi_socket_t fd,KviDccSendThreadOptions * opt); + KviDccSendThread(TQObject * par,kvi_socket_t fd,KviDccSendThreadOptions * opt); ~KviDccSendThread(); private: // stats: SHARED!!! @@ -108,7 +108,7 @@ typedef struct _KviDccRecvThreadOptions class KviDccRecvThread : public KviDccThread { public: - KviDccRecvThread(QObject * par,kvi_socket_t fd,KviDccRecvThreadOptions * opt); + KviDccRecvThread(TQObject * par,kvi_socket_t fd,KviDccRecvThreadOptions * opt); ~KviDccRecvThread(); protected: KviDccRecvThreadOptions * m_pOpt; @@ -124,7 +124,7 @@ protected: KviMSecTimeInterval * m_pTimeInterval; // used for computing the instant bandwidth int m_iInstantReceivedBytes; unsigned long m_uInstantSpeedInterval; - QFile * m_pFile; + TQFile * m_pFile; public: void initGetInfo(); int averageSpeed(){ return m_iAverageSpeed; }; @@ -143,23 +143,24 @@ protected: }; class KviDccFileTransfer; -class QSpinBox; -class QTimer; +class TQSpinBox; +class TQTimer; #include "kvi_styled_controls.h" -class KviDccFileTransferBandwidthDialog : public QDialog +class KviDccFileTransferBandwidthDialog : public TQDialog { Q_OBJECT + TQ_OBJECT public: - KviDccFileTransferBandwidthDialog(QWidget * pParent,KviDccFileTransfer * t); + KviDccFileTransferBandwidthDialog(TQWidget * pParent,KviDccFileTransfer * t); ~KviDccFileTransferBandwidthDialog(); protected: KviDccFileTransfer * m_pTransfer; KviStyledCheckBox * m_pEnableLimitCheck; - QSpinBox * m_pLimitBox; + TQSpinBox * m_pLimitBox; protected: - virtual void closeEvent(QCloseEvent *e); + virtual void closeEvent(TQCloseEvent *e); protected slots: void okClicked(); void cancelClicked(); @@ -167,13 +168,14 @@ protected slots: class KviDccMarshal; -class QPainter; +class TQPainter; class KviTalPopupMenu; class KviDccFileTransfer : public KviFileTransfer, public KviDccMarshalOutputContext { - enum GeneralStatus { Connecting , Transferring , Success , Failure }; + enum GeneraltqStatus { Connecting , Transferring , Success , Failure }; Q_OBJECT + TQ_OBJECT public: KviDccFileTransfer(KviDccDescriptor * dcc); ~KviDccFileTransfer(); @@ -185,12 +187,12 @@ private: KviStr m_szTarget; KviStr m_szDccType; - QString m_szTransferIdString; + TQString m_szTransferIdString; - QString m_szStatusString; - GeneralStatus m_eGeneralStatus; + TQString m_szStatusString; + GeneraltqStatus m_eGeneraltqStatus; - QString m_szTransferLog; // html + TQString m_szTransferLog; // html kvi_time_t m_tTransferStartTime; kvi_time_t m_tTransferEndTime; @@ -200,7 +202,7 @@ private: unsigned int m_uMaxBandwidth; KviDccFileTransferBandwidthDialog * m_pBandwidthDialog; - QTimer * m_pResumeTimer; // used to signal resume timeout + TQTimer * m_pResumeTimer; // used to signal resume timeout public: bool resumeAccepted(const char * filename,const char * port,const char *szZeroPortTag); bool doResume(const char * filename,const char * port,unsigned int filePos); @@ -208,24 +210,24 @@ public: static void init(); static void done(); static unsigned int runningTransfersCount(); - static KviDccFileTransfer * nonFailedTransferWithLocalFileName(const QString &szLocalFileName); + static KviDccFileTransfer * nonFailedTransferWithLocalFileName(const TQString &szLocalFileName); static unsigned int transferCount(); static bool handleResumeAccepted(const char * filename,const char * port,const char * szZeroPortTag); static bool handleResumeRequest(const char * filename,const char * port,unsigned int filePos); - virtual bool event(QEvent *e); + virtual bool event(TQEvent *e); virtual KviWindow * dccMarshalOutputWindow(); virtual const char * dccMarshalOutputContextString(); - virtual void displayPaint(QPainter * p,int column,int width,int height); + virtual void displayPaint(TQPainter * p,int column,int width,int height); virtual int displayHeight(int iLineSpacing); virtual void fillContextPopup(KviTalPopupMenu * m,int column); - virtual void fillStatusString(QString &szBuffer); + virtual void fillStatusString(TQString &szBuffer); virtual bool active(); virtual void die(); - virtual QString tipText(); - virtual QString localFileName(); + virtual TQString tipText(); + virtual TQString localFileName(); bool isFileUpload(){ return m_pDescriptor->isFileUpload(); }; @@ -237,9 +239,9 @@ public: protected: void startConnection(); void listenOrConnect(); - void addToTransferLog(const QString &s); - void outputAndLog(const QString &s); - void outputAndLog(int msgtype,const QString &s); + void addToTransferLog(const TQString &s); + void outputAndLog(const TQString &s); + void outputAndLog(int msgtype,const TQString &s); KviWindow * eventWindow(); protected slots: void connectionInProgress(); diff --git a/src/modules/dcc/thread.cpp b/src/modules/dcc/thread.cpp index 7ae38bbe..d985f473 100644 --- a/src/modules/dcc/thread.cpp +++ b/src/modules/dcc/thread.cpp @@ -33,7 +33,7 @@ #include "kvi_sslmaster.h" #endif -KviDccThread::KviDccThread(QObject * par,kvi_socket_t fd) +KviDccThread::KviDccThread(TQObject * par,kvi_socket_t fd) : KviSensitiveThread() { m_pParent = par; diff --git a/src/modules/dcc/thread.h b/src/modules/dcc/thread.h index 3d56661d..b91e2a20 100644 --- a/src/modules/dcc/thread.h +++ b/src/modules/dcc/thread.h @@ -28,7 +28,7 @@ #include "kvi_pointerlist.h" -#include +#include #ifdef COMPILE_SSL_SUPPORT #include "kvi_ssl.h" @@ -54,19 +54,19 @@ typedef struct _KviDccThreadIncomingData class KviDccThread : public KviSensitiveThread { public: - KviDccThread(QObject * par,kvi_socket_t fd); + KviDccThread(TQObject * par,kvi_socket_t fd); ~KviDccThread(); protected: KviMutex * m_pMutex; // OWNED! PROTECTS m_pOutBuffers kvi_socket_t m_fd; - QObject * m_pParent; // READ ONLY! + TQObject * m_pParent; // READ ONLY! #ifdef COMPILE_SSL_SUPPORT KviSSL * m_pSSL; #endif protected: bool handleInvalidSocketRead(int readLen); public: - QObject * parent(){ return m_pParent; }; + TQObject * tqparent(){ return m_pParent; }; void postErrorEvent(int err); // Warning!..newer call __tr() here!...use __tr_no_lookup() void postMessageEvent(const char * message); diff --git a/src/modules/dcc/utils.cpp b/src/modules/dcc/utils.cpp index 8d3229e7..d8882ce4 100644 --- a/src/modules/dcc/utils.cpp +++ b/src/modules/dcc/utils.cpp @@ -31,7 +31,7 @@ #include "kvi_qstring.h" /* -bool dcc_module_get_listen_ip_address(KviCommand *c,KviConsole * pConsole,QString &szListenIp) +bool dcc_module_get_listen_ip_address(KviCommand *c,KviConsole * pConsole,TQString &szListenIp) { // // Find an interface suitable for listening.... @@ -45,7 +45,7 @@ bool dcc_module_get_listen_ip_address(KviCommand *c,KviConsole * pConsole,QStrin { if(kvi_isValidStringIp(KVI_OPTION_STRING(KviOption_stringDccListenDefaultInterface).utf8().data())) { - if(KviQString::equalCI(KVI_OPTION_STRING(KviOption_stringDccListenDefaultInterface),"0.0.0.0")) + if(KviTQString::equalCI(KVI_OPTION_STRING(KviOption_stringDccListenDefaultInterface),"0.0.0.0")) { // Try to find the first available IpV4 interface if(!kvi_getLocalHostAddress(szListenIp)) @@ -100,7 +100,7 @@ bool dcc_module_get_listen_ip_address(KviCommand *c,KviConsole * pConsole,QStrin */ -bool dcc_kvs_get_listen_ip_address(KviKvsModuleCommandCall *c,KviConsole * pConsole,QString &szListenIp) +bool dcc_kvs_get_listen_ip_address(KviKvsModuleCommandCall *c,KviConsole * pConsole,TQString &szListenIp) { // // Find an interface suitable for listening.... @@ -114,7 +114,7 @@ bool dcc_kvs_get_listen_ip_address(KviKvsModuleCommandCall *c,KviConsole * pCons { if(kvi_isValidStringIp(KVI_OPTION_STRING(KviOption_stringDccListenDefaultInterface).utf8().data())) { - if(KviQString::equalCI(KVI_OPTION_STRING(KviOption_stringDccListenDefaultInterface),"0.0.0.0")) + if(KviTQString::equalCI(KVI_OPTION_STRING(KviOption_stringDccListenDefaultInterface),"0.0.0.0")) { // Try to find the first available IpV4 interface if(!kvi_getLocalHostAddress(szListenIp)) diff --git a/src/modules/dcc/utils.h b/src/modules/dcc/utils.h index 992814f2..8e4478e8 100644 --- a/src/modules/dcc/utils.h +++ b/src/modules/dcc/utils.h @@ -28,7 +28,7 @@ #include "kvi_kvs_moduleinterface.h" #ifndef _UTILS_CPP_ - extern bool dcc_kvs_get_listen_ip_address(KviKvsModuleCommandCall *c,KviConsole * pConsole,QString &szListenIp); + extern bool dcc_kvs_get_listen_ip_address(KviKvsModuleCommandCall *c,KviConsole * pConsole,TQString &szListenIp); #endif #endif //_UTILS_H_ diff --git a/src/modules/dcc/voice.cpp b/src/modules/dcc/voice.cpp index 2e34df2f..4bf9ad9d 100644 --- a/src/modules/dcc/voice.cpp +++ b/src/modules/dcc/voice.cpp @@ -40,11 +40,11 @@ #include "adpcmcodec.h" #include "gsmcodec.h" -#include -#include +#include +#include #include "kvi_tal_vbox.h" -#include -#include +#include +#include #ifndef COMPILE_ON_WINDOWS #include @@ -119,7 +119,7 @@ static KviDccVoiceCodec * kvi_dcc_voice_get_codec(const char * codecName) KviDccVoiceThread::KviDccVoiceThread(KviWindow * wnd,kvi_socket_t fd,KviDccVoiceThreadOptions * opt) -: KviDccThread(wnd,fd) +: KviDccThread(TQT_TQOBJECT(wnd),fd) { #ifndef COMPILE_DISABLE_DCC_VOICE m_pOpt = opt; @@ -533,7 +533,7 @@ void KviDccVoiceThread::startRecording() // debug("Posting event"); KviThreadDataEvent * e = new KviThreadDataEvent(KVI_DCC_THREAD_EVENT_ACTION); e->setData(new int(KVI_DCC_VOICE_THREAD_ACTION_START_RECORDING)); - postEvent(parent(),e); + postEvent(tqparent(),e); m_bRecording = true; m_bRecordingRequestPending = false; @@ -552,7 +552,7 @@ void KviDccVoiceThread::stopRecording() KviThreadDataEvent * e = new KviThreadDataEvent(KVI_DCC_THREAD_EVENT_ACTION); e->setData(new int(KVI_DCC_VOICE_THREAD_ACTION_STOP_RECORDING)); - postEvent(parent(),e); + postEvent(tqparent(),e); m_bRecording = false; if(!m_bPlaying)closeSoundcard(); @@ -569,7 +569,7 @@ void KviDccVoiceThread::startPlaying() { KviThreadDataEvent * e = new KviThreadDataEvent(KVI_DCC_THREAD_EVENT_ACTION); e->setData(new int(KVI_DCC_VOICE_THREAD_ACTION_START_PLAYING)); - postEvent(parent(),e); + postEvent(tqparent(),e); m_bPlaying = true; } #endif @@ -583,7 +583,7 @@ void KviDccVoiceThread::stopPlaying() KviThreadDataEvent * e = new KviThreadDataEvent(KVI_DCC_THREAD_EVENT_ACTION); e->setData(new int(KVI_DCC_VOICE_THREAD_ACTION_STOP_PLAYING)); - postEvent(parent(),e); + postEvent(tqparent(),e); m_bPlaying = false; if(!m_bRecording)closeSoundcard(); @@ -652,57 +652,52 @@ KviDccVoice::KviDccVoice(KviFrame *pFrm,KviDccDescriptor * dcc,const char * name m_pDescriptor = dcc; m_pSlaveThread = 0; - m_pSplitter = new QSplitter(Qt::Horizontal,this,"splitter"); + m_pSplitter = new TQSplitter(Qt::Horizontal,this,"splitter"); m_pIrcView = new KviIrcView(m_pSplitter,pFrm,this); m_pHBox = new KviTalHBox(this); KviTalVBox * vbox = new KviTalVBox(m_pHBox); - m_pInputLabel = new QLabel(__tr2qs_ctx("Input buffer","dcc"),vbox); - m_pInputLabel->setFrameStyle(QFrame::Sunken | QFrame::Panel); - m_pOutputLabel = new QLabel(__tr2qs_ctx("Output buffer","dcc"),vbox); - m_pOutputLabel->setFrameStyle(QFrame::Sunken | QFrame::Panel); + m_pInputLabel = new TQLabel(__tr2qs_ctx("Input buffer","dcc"),vbox); + m_pInputLabel->setFrameStyle(TQFrame::Sunken | TQFrame::Panel); + m_pOutputLabel = new TQLabel(__tr2qs_ctx("Output buffer","dcc"),vbox); + m_pOutputLabel->setFrameStyle(TQFrame::Sunken | TQFrame::Panel); vbox->setSpacing(1); KviTalVBox * vbox2 = new KviTalVBox(m_pHBox); - m_pRecordingLabel = new QLabel(vbox2); + m_pRecordingLabel = new TQLabel(vbox2); m_pRecordingLabel->setPixmap(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_RECORD))); m_pRecordingLabel->setEnabled(false); - m_pRecordingLabel->setFrameStyle(QFrame::Raised | QFrame::Panel); + m_pRecordingLabel->setFrameStyle(TQFrame::Raised | TQFrame::Panel); - m_pPlayingLabel = new QLabel(vbox2); + m_pPlayingLabel = new TQLabel(vbox2); m_pPlayingLabel->setPixmap(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_PLAY))); m_pPlayingLabel->setEnabled(false); - m_pPlayingLabel->setFrameStyle(QFrame::Raised | QFrame::Panel); + m_pPlayingLabel->setFrameStyle(TQFrame::Raised | TQFrame::Panel); vbox2->setSpacing(1); //#warning "The volume slider should be enabled only when receiving data" - m_pVolumeSlider = new QSlider(-100, 0, 10, 0, Qt::Vertical, m_pHBox, "dcc_voice_volume_slider"); + m_pVolumeSlider = new TQSlider(-100, 0, 10, 0, Qt::Vertical, m_pHBox, "dcc_voice_volume_slider"); m_pVolumeSlider->setValue(getMixerVolume()); /* Update the tooltip */ setMixerVolume(m_pVolumeSlider->value()); m_pVolumeSlider->setMaximumWidth(16); m_pVolumeSlider->setMaximumHeight(2*m_pPlayingLabel->height()); - connect(m_pVolumeSlider, SIGNAL(valueChanged(int)), this, SLOT(setMixerVolume(int))); + connect(m_pVolumeSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(setMixerVolume(int))); - m_pTalkButton = new QToolButton(m_pHBox); + m_pTalkButton = new TQToolButton(m_pHBox); m_pTalkButton->setEnabled(false); m_pTalkButton->setToggleButton(true); -#if QT_VERSION >= 300 - QIconSet iset; - iset.setPixmap(*(g_pIconManager->getBigIcon(KVI_BIGICON_DISCONNECTED)),QIconSet::Large,QIconSet::Normal,QIconSet::Off); - iset.setPixmap(*(g_pIconManager->getBigIcon(KVI_BIGICON_CONNECTED)),QIconSet::Large,QIconSet::Normal,QIconSet::On); + TQIconSet iset; + iset.setPixmap(*(g_pIconManager->getBigIcon(KVI_BIGICON_DISCONNECTED)),TQIconSet::Large,TQIconSet::Normal,TQIconSet::Off); + iset.setPixmap(*(g_pIconManager->getBigIcon(KVI_BIGICON_CONNECTED)),TQIconSet::Large,TQIconSet::Normal,TQIconSet::On); m_pTalkButton->setIconSet(iset); -#else - m_pTalkButton->setOffIconSet(*(g_pIconManager->getBigIcon(KVI_BIGICON_DISCONNECTED))); - m_pTalkButton->setOnIconSet(*(g_pIconManager->getBigIcon(KVI_BIGICON_CONNECTED))); -#endif m_pTalkButton->setUsesBigPixmap(true); - connect(m_pTalkButton,SIGNAL(toggled(bool)),this,SLOT(startOrStopTalking(bool))); + connect(m_pTalkButton,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(startOrStopTalking(bool))); m_pHBox->setStretchFactor(vbox,1); m_pHBox->setMargin(2); @@ -711,11 +706,11 @@ KviDccVoice::KviDccVoice(KviFrame *pFrm,KviDccDescriptor * dcc,const char * name //setFocusHandler(m_pIrcView,this); m_pMarshal = new KviDccMarshal(this); - connect(m_pMarshal,SIGNAL(error(int)),this,SLOT(handleMarshalError(int))); - connect(m_pMarshal,SIGNAL(connected()),this,SLOT(connected())); - connect(m_pMarshal,SIGNAL(inProgress()),this,SLOT(connectionInProgress())); + connect(m_pMarshal,TQT_SIGNAL(error(int)),this,TQT_SLOT(handleMarshalError(int))); + connect(m_pMarshal,TQT_SIGNAL(connected()),this,TQT_SLOT(connected())); + connect(m_pMarshal,TQT_SIGNAL(inProgress()),this,TQT_SLOT(connectionInProgress())); - m_pUpdateTimer = new QTimer(); + m_pUpdateTimer = new TQTimer(); startConnection(); } @@ -730,7 +725,7 @@ KviDccVoice::~KviDccVoice() m_pSlaveThread = 0; } - KviThreadManager::killPendingEvents(this); + KviThreadManager::killPendingEvents(TQT_TQOBJECT(this)); delete m_pUpdateTimer; // delete m_pDescriptor; @@ -782,7 +777,7 @@ void KviDccVoice::connectionInProgress() } } -const QString & KviDccVoice::target() +const TQString & KviDccVoice::target() { // This may change on the fly... m_szTarget.sprintf("%s@%s:%s", @@ -804,17 +799,17 @@ void KviDccVoice::fillCaptionBuffers() m_szPlainTextCaption = tmp; m_szHtmlActiveCaption.sprintf("%s", - KVI_OPTION_COLOR(KviOption_colorCaptionTextActive).name().ascii(),tmp.ptr()); + TQString(KVI_OPTION_COLOR(KviOption_colorCaptionTextActive).name()).ascii(),tmp.ptr()); m_szHtmlInactiveCaption.sprintf("%s", - KVI_OPTION_COLOR(KviOption_colorCaptionTextInactive).name().ascii(),tmp.ptr()); + TQString(KVI_OPTION_COLOR(KviOption_colorCaptionTextInactive).name()).ascii(),tmp.ptr()); } -QPixmap * KviDccVoice::myIconPtr() +TQPixmap * KviDccVoice::myIconPtr() { return g_pIconManager->getSmallIcon(KVI_SMALLICON_DCCVOICE); } -bool KviDccVoice::event(QEvent *e) +bool KviDccVoice::event(TQEvent *e) { if(e->type() == KVI_THREAD_EVENT) { @@ -823,7 +818,7 @@ bool KviDccVoice::event(QEvent *e) case KVI_DCC_THREAD_EVENT_ERROR: { int * err = ((KviThreadDataEvent *)e)->getData(); - QString ssss = KviError::getDescription(*err); + TQString ssss = KviError::getDescription(*err); output(KVI_OUT_DCCERROR,__tr2qs_ctx("ERROR: %Q","dcc"),&(ssss)); delete err; m_pUpdateTimer->stop(); @@ -889,24 +884,24 @@ void KviDccVoice::updateInfo() } } -void KviDccVoice::resizeEvent(QResizeEvent *e) +void KviDccVoice::resizeEvent(TQResizeEvent *e) { - int hght2 = m_pHBox->sizeHint().height(); + int hght2 = m_pHBox->tqsizeHint().height(); m_pHBox->setGeometry(0,0,width(),hght2); m_pSplitter->setGeometry(0,hght2,width(),height() - hght2); } -QSize KviDccVoice::sizeHint() const +TQSize KviDccVoice::tqsizeHint() const { - int w = m_pIrcView->sizeHint().width(); - int w2 = m_pHBox->sizeHint().width(); - QSize ret(w > w2 ? w : w2, m_pIrcView->sizeHint().height() + m_pHBox->sizeHint().height()); + int w = m_pIrcView->tqsizeHint().width(); + int w2 = m_pHBox->tqsizeHint().width(); + TQSize ret(w > w2 ? w : w2, m_pIrcView->tqsizeHint().height() + m_pHBox->tqsizeHint().height()); return ret; } void KviDccVoice::handleMarshalError(int err) { - QString ssss = KviError::getDescription(err); + TQString ssss = KviError::getDescription(err); output(KVI_OUT_DCCERROR,__tr2qs_ctx("DCC Failed: %Q","dcc"),&ssss); m_pTalkButton->setEnabled(false); m_pTalkButton->setOn(false); @@ -928,7 +923,7 @@ void KviDccVoice::connected() } updateCaption(); - connect(m_pUpdateTimer,SIGNAL(timeout()),this,SLOT(updateInfo())); + connect(m_pUpdateTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(updateInfo())); m_pUpdateTimer->start(1000); KviDccVoiceThreadOptions * opt = new KviDccVoiceThreadOptions; @@ -945,7 +940,7 @@ void KviDccVoice::connected() opt->iSampleRate = m_pDescriptor->iSampleRate; m_pSlaveThread = new KviDccVoiceThread(this,m_pMarshal->releaseSocket(),opt); - connect(m_pUpdateTimer,SIGNAL(timeout()),this,SLOT(updateInfo())); + connect(m_pUpdateTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(updateInfo())); m_pSlaveThread->start(); m_pTalkButton->setEnabled(true); @@ -1019,9 +1014,9 @@ void KviDccVoice::setMixerVolume(int vol) ::ioctl(fd, req, &val); ::close(fd); - QString s; + TQString s; s.sprintf(__tr_ctx("Volume: %i","dcc"), -vol); - QToolTip::add(m_pVolumeSlider, s); + TQToolTip::add(m_pVolumeSlider, s); #endif } @@ -1029,7 +1024,7 @@ void KviDccVoice::setMixerVolume(int vol) /* The code below doesn't work. Guess I have to catch some other widget's focusInEvent. Which one ? */ /* The point is to move the volume slider to correct position if for example user switched to * another KVirc window, fired up xmms, changed the volume, and returned to our dcc voice window */ -void KviDccVoice::focusInEvent(QFocusEvent *e) +void KviDccVoice::focusInEvent(TQFocusEvent *e) { // debug("focusInEvent()"); m_pVolumeSlider->setValue(getMixerVolume()); diff --git a/src/modules/dcc/voice.h b/src/modules/dcc/voice.h index c74c677c..c241f4a1 100644 --- a/src/modules/dcc/voice.h +++ b/src/modules/dcc/voice.h @@ -33,9 +33,9 @@ #include "window.h" #include "kvi_tal_hbox.h" -#include -#include -#include +#include +#include +#include #ifndef _DCC_VOICE_CPP_ extern bool kvi_dcc_voice_is_valid_codec(const char * codecName); @@ -98,33 +98,34 @@ protected: }; class KviDccMarshal; -class QSlider; +class TQSlider; class KviDccVoice : public KviDccWindow { Q_OBJECT + TQ_OBJECT public: KviDccVoice(KviFrame *pFrm,KviDccDescriptor * dcc,const char * name); ~KviDccVoice(); protected: KviTalHBox * m_pHBox; - QSlider * m_pVolumeSlider; - QLabel * m_pInputLabel; - QLabel * m_pOutputLabel; - QLabel * m_pRecordingLabel; - QLabel * m_pPlayingLabel; - QToolButton * m_pTalkButton; - QTimer * m_pUpdateTimer; - QString m_szTarget; + TQSlider * m_pVolumeSlider; + TQLabel * m_pInputLabel; + TQLabel * m_pOutputLabel; + TQLabel * m_pRecordingLabel; + TQLabel * m_pPlayingLabel; + TQToolButton * m_pTalkButton; + TQTimer * m_pUpdateTimer; + TQString m_szTarget; KviDccVoiceThread * m_pSlaveThread; protected: - virtual void focusInEvent(QFocusEvent *); - virtual const QString & target(); + virtual void focusInEvent(TQFocusEvent *); + virtual const TQString & target(); virtual void fillCaptionBuffers(); - virtual QPixmap * myIconPtr(); - virtual void resizeEvent(QResizeEvent *e); - virtual QSize sizeHint() const; - virtual bool event(QEvent *e); + virtual TQPixmap * myIconPtr(); + virtual void resizeEvent(TQResizeEvent *e); + virtual TQSize tqsizeHint() const; + virtual bool event(TQEvent *e); virtual void getBaseLogFileName(KviStr &buffer); void startTalking(); void stopTalking(); @@ -168,22 +169,22 @@ CODEC DEFINITION class KviVoiceParty { public: - KviVoiceParty(const QString &szNick,const QString &szIp,unsigned short uPort); + KviVoiceParty(const TQString &szNick,const TQString &szIp,unsigned short uPort); ~KviVoiceParty(); protected: - QString m_szIp; + TQString m_szIp; unsigned short m_uPort; - QString m_szNick; + TQString m_szNick; KviPointerList * m_pChildrenTree; public: - const QString & ip(){ return m_szIp; }; + const TQString & ip(){ return m_szIp; }; unsigned short port(){ return m_uPort; }; - const QString & nick(){ return m_szNick; }; + const TQString & nick(){ return m_szNick; }; void addChild(KviVoiceParty * pChild); }; -KviVoiceParty::KviVoiceParty(const QString &szNick,const QString &szIp,unsigned short uPort) +KviVoiceParty::KviVoiceParty(const TQString &szNick,const TQString &szIp,unsigned short uPort) : m_szIp(szIp), m_uPort(uPort), m_szNick(szNick) { m_pChildrenTree = 0; @@ -230,18 +231,18 @@ public: KviVoiceLink(KviVoiceParty * pRemoteParty); ~KviVoiceLink(); protected: - QString m_szId; + TQString m_szId; KviVoiceParty * m_pRemoteParty; KviVoiceAudioEncoder * m_pAudioEncoder; KviVoiceAudioDecoder * m_pAudioDecoder; public: - const QStirng & id(){ return m_szId; }; + const TQStirng & id(){ return m_szId; }; KviVoiceParty * remoteParty(){ return m_pRemoteParty; }; }; KviVoiceLink::KviVoiceLink(KviVoiceParty * pRemoteParty) { - KviQString::sprintf("%Q:%u",&(pRemoteParty->nick()),pRemoteParty->port()); + KviTQString::sprintf("%Q:%u",&(pRemoteParty->nick()),pRemoteParty->port()); m_pRemoteParty = pRemoteParty; m_pAudioEncoder = 0; m_pAudioDecoder = 0; @@ -315,9 +316,9 @@ public: ~KviVoiceConference(); public: KviPointerList * m_pLinks; - KviPointerHashTable * + KviPointerHashTable * SOCKET m_hUdpSocket; - QString m_szLastError; + TQString m_szLastError; unsigned int m_uLocalAudioSampleRate; // samples/sec unsigned int m_uLocalAudioSampleSize; // bits diff --git a/src/modules/dcc/window.h b/src/modules/dcc/window.h index b4bfa43d..1c3d22ee 100644 --- a/src/modules/dcc/window.h +++ b/src/modules/dcc/window.h @@ -30,6 +30,7 @@ class KviDccWindow : public KviWindow , public KviDccMarshalOutputContext { Q_OBJECT + TQ_OBJECT public: KviDccWindow(int type,KviFrame * lpFrm,const char * name,KviDccDescriptor * d); ~KviDccWindow(); diff --git a/src/modules/dialog/libkvidialog.cpp b/src/modules/dialog/libkvidialog.cpp index dd7cf391..a40b9b8f 100644 --- a/src/modules/dialog/libkvidialog.cpp +++ b/src/modules/dialog/libkvidialog.cpp @@ -25,20 +25,20 @@ #include "libkvidialog.h" -#include -#include +#include +#include #include "kvi_tal_hbox.h" -#include +#include #ifdef COMPILE_USE_QT4 - #include - #define QMultiLineEdit Q3MultiLineEdit - #include + #include + #define TQMultiLineEdit Q3MultiLineEdit + #include #else - #include + #include #endif -#include -#include -#include +#include +#include +#include #include "kvi_locale.h" #include "kvi_module.h" @@ -51,25 +51,25 @@ #include "kvi_kvs_script.h" #include "kvi_msgbox.h" -static KviPointerList * g_pDialogModuleDialogList; +static KviPointerList * g_pDialogModuleDialogList; KviKvsCallbackMessageBox::KviKvsCallbackMessageBox( - const QString &szCaption, - const QString &szText, - const QString &szIcon, - const QString &szButton0, - const QString &szButton1, - const QString &szButton2, - const QString &szCode, + const TQString &szCaption, + const TQString &szText, + const TQString &szIcon, + const TQString &szButton0, + const TQString &szButton1, + const TQString &szButton2, + const TQString &szCode, KviKvsVariantList * pMagicParams, KviWindow * pWindow,bool modal) -: QMessageBox( +: TQMessageBox( szCaption, szText, - QMessageBox::NoIcon, - szButton0.isEmpty() ? QMessageBox::NoButton : QMessageBox::Ok | QMessageBox::Default, - szButton1.isEmpty() ? QMessageBox::NoButton : (szButton2.isEmpty() ? QMessageBox::No | QMessageBox::Escape : QMessageBox::No), - szButton2.isEmpty() ? QMessageBox::NoButton : QMessageBox::Cancel | QMessageBox::Escape, + TQMessageBox::NoIcon, + szButton0.isEmpty() ? TQMessageBox::NoButton : TQMessageBox::Ok | TQMessageBox::Default, + szButton1.isEmpty() ? TQMessageBox::NoButton : (szButton2.isEmpty() ? TQMessageBox::No | TQMessageBox::Escape : TQMessageBox::No), + szButton2.isEmpty() ? TQMessageBox::NoButton : TQMessageBox::Cancel | TQMessageBox::Escape, 0,0,modal) , KviKvsCallbackObject("dialog.message",pWindow,szCode,pMagicParams,0) { @@ -78,17 +78,17 @@ KviKvsCallbackMessageBox::KviKvsCallbackMessageBox( setIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_KVIRC))); #endif - QPixmap * pix = g_pIconManager->getImage(szIcon); + TQPixmap * pix = g_pIconManager->getImage(szIcon); if(pix)setIconPixmap(*pix); else { - if(KviQString::equalCI(szIcon,"information"))setIcon(QMessageBox::Information); - else if(KviQString::equalCI(szIcon,"warning"))setIcon(QMessageBox::Warning); - else if(KviQString::equalCI(szIcon,"critical"))setIcon(QMessageBox::Critical); + if(KviTQString::equalCI(szIcon,"information"))setIcon(TQMessageBox::Information); + else if(KviTQString::equalCI(szIcon,"warning"))setIcon(TQMessageBox::Warning); + else if(KviTQString::equalCI(szIcon,"critical"))setIcon(TQMessageBox::Critical); } - if(!szButton0.isEmpty())setButtonText(QMessageBox::Ok,szButton0); - if(!szButton1.isEmpty())setButtonText(QMessageBox::No,szButton1); - if(!szButton2.isEmpty())setButtonText(QMessageBox::Cancel,szButton2); + if(!szButton0.isEmpty())setButtonText(TQMessageBox::Ok,szButton0); + if(!szButton1.isEmpty())setButtonText(TQMessageBox::No,szButton1); + if(!szButton2.isEmpty())setButtonText(TQMessageBox::Cancel,szButton2); } KviKvsCallbackMessageBox::~KviKvsCallbackMessageBox() @@ -98,14 +98,14 @@ KviKvsCallbackMessageBox::~KviKvsCallbackMessageBox() void KviKvsCallbackMessageBox::done(int code) { - QMessageBox::done(code); + TQMessageBox::done(code); kvs_int_t iVal = 0; switch(code) { - case QMessageBox::No: iVal = 1; break; - case QMessageBox::Cancel: iVal = 2; break; + case TQMessageBox::No: iVal = 1; break; + case TQMessageBox::Cancel: iVal = 2; break; } KviKvsVariantList params; @@ -147,7 +147,7 @@ void KviKvsCallbackMessageBox::done(int code) ,... are the magic parameters: evaluated at dialog.message call time and passed to the as positional parameters.[br] If the -b or -modal switch is specified the dialog will have non-blocking modal behaviour: - it will appear above its parent widget and block its input until it's closed.[br] + it will appear above its tqparent widget and block its input until it's closed.[br] Once the dialog has been shown , the user will click one of the buttons. At this point the dialog is hidden and the is executed passing the number of the button clicked as $0 and the magic parameters as positional parameters $1 , $2 , $3....[br] @@ -169,7 +169,7 @@ void KviKvsCallbackMessageBox::done(int code) static bool dialog_kvs_cmd_message(KviKvsModuleCallbackCommandCall * c) { - QString szCaption,szMessage,szIcon,szButton0,szButton1,szButton2; + TQString szCaption,szMessage,szIcon,szButton0,szButton1,szButton2; KviKvsVariantList params; KVSM_PARAMETERS_BEGIN(c) @@ -184,7 +184,7 @@ static bool dialog_kvs_cmd_message(KviKvsModuleCallbackCommandCall * c) bool modal; if(c->hasSwitch('b',"modal")) modal=true; else modal=false; - QString szCmd = c->callback()->code(); + TQString szCmd = c->callback()->code(); KviKvsCallbackMessageBox * box = new KviKvsCallbackMessageBox( szCaption,szMessage,szIcon,szButton0,szButton1,szButton2,szCmd,¶ms,c->window(),modal); @@ -196,38 +196,38 @@ static bool dialog_kvs_cmd_message(KviKvsModuleCallbackCommandCall * c) KviKvsCallbackTextInput::KviKvsCallbackTextInput( - const QString &szCaption, - const QString &szLabel, - const QString &szDefaultText, - const QString &szIcon, + const TQString &szCaption, + const TQString &szLabel, + const TQString &szDefaultText, + const TQString &szIcon, bool bMultiLine, - const QString &szButton0, - const QString &szButton1, - const QString &szButton2, - const QString &szCode, + const TQString &szButton0, + const TQString &szButton1, + const TQString &szButton2, + const TQString &szCode, KviKvsVariantList * pMagicParams, KviWindow * pWindow,bool modal) - : QDialog(), KviKvsCallbackObject("dialog.textinput",pWindow,szCode,pMagicParams,0) + : TQDialog(), KviKvsCallbackObject("dialog.textinput",pWindow,szCode,pMagicParams,0) { g_pDialogModuleDialogList->append(this); setIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_KVIRC))); setModal(modal); setCaption(szCaption); - QGridLayout * g = new QGridLayout(this,2,3,5,5); + TQGridLayout * g = new TQGridLayout(this,2,3,5,5); - QPixmap * pix = g_pIconManager->getImage(szIcon); + TQPixmap * pix = g_pIconManager->getImage(szIcon); if(pix) { - QLabel * il = new QLabel(this); + TQLabel * il = new TQLabel(this); il->setPixmap(*pix); - il->setAlignment(Qt::AlignCenter); + il->tqsetAlignment(TQt::AlignCenter); g->addWidget(il,0,0); - QLabel * tl = new QLabel(szLabel,this); + TQLabel * tl = new TQLabel(szLabel,this); g->addWidget(tl,0,1); } else { - QLabel * tl = new QLabel(szLabel,this); + TQLabel * tl = new TQLabel(szLabel,this); g->addMultiCellWidget(tl,0,0,0,1); } @@ -237,11 +237,11 @@ KviKvsCallbackTextInput::KviKvsCallbackTextInput( if(m_bMultiLine) { - m_pEdit = new QMultiLineEdit(this); - ((QMultiLineEdit *)m_pEdit)->setText(szDefaultText); + m_pEdit = new TQMultiLineEdit(this); + ((TQMultiLineEdit *)m_pEdit)->setText(szDefaultText); } else { - m_pEdit = new QLineEdit(this); - ((QLineEdit *)m_pEdit)->setText(szDefaultText); + m_pEdit = new TQLineEdit(this); + ((TQLineEdit *)m_pEdit)->setText(szDefaultText); } g->addMultiCellWidget(m_pEdit,1,1,0,1); @@ -254,59 +254,59 @@ KviKvsCallbackTextInput::KviKvsCallbackTextInput( if(!szButton0.isEmpty()) { - QString szB = szButton0; + TQString szB = szButton0; bool bDef = false; - if(KviQString::equalCIN(szB,"default=",8)) + if(KviTQString::equalCIN(szB,"default=",8)) { bDef = true; szB.remove(0,8); m_iDefaultButton = 0; - } else if(KviQString::equalCIN(szB,"escape=",7)) + } else if(KviTQString::equalCIN(szB,"escape=",7)) { szB.remove(0,7); m_iEscapeButton = 0; } - QPushButton * pb1 = new QPushButton(szB,box); + TQPushButton * pb1 = new TQPushButton(szB,box); if(bDef)pb1->setDefault(true); - connect(pb1,SIGNAL(clicked()),this,SLOT(b0Clicked())); + connect(pb1,TQT_SIGNAL(clicked()),this,TQT_SLOT(b0Clicked())); } if(!szButton1.isEmpty()) { - QString szB = szButton1; + TQString szB = szButton1; bool bDef = false; - if(KviQString::equalCIN(szB,"default=",8)) + if(KviTQString::equalCIN(szB,"default=",8)) { bDef = true; szB.remove(0,8); m_iDefaultButton = 1; - } else if(KviQString::equalCIN(szB,"escape=",7)) + } else if(KviTQString::equalCIN(szB,"escape=",7)) { szB.remove(0,7); m_iEscapeButton = 1; } - QPushButton * pb2 = new QPushButton(szB,box); + TQPushButton * pb2 = new TQPushButton(szB,box); if(bDef)pb2->setDefault(true); - connect(pb2,SIGNAL(clicked()),this,SLOT(b1Clicked())); + connect(pb2,TQT_SIGNAL(clicked()),this,TQT_SLOT(b1Clicked())); } if(!szButton2.isEmpty()) { - QString szB = szButton2; + TQString szB = szButton2; bool bDef = false; - if(KviQString::equalCIN(szB,"default=",8)) + if(KviTQString::equalCIN(szB,"default=",8)) { bDef = true; szB.remove(0,8); m_iDefaultButton = 2; - } else if(KviQString::equalCIN(szB,"escape=",7)) + } else if(KviTQString::equalCIN(szB,"escape=",7)) { szB.remove(0,7); m_iEscapeButton = 2; } - QPushButton * pb3 = new QPushButton(szB,box); + TQPushButton * pb3 = new TQPushButton(szB,box); if(bDef)pb3->setDefault(true); - connect(pb3,SIGNAL(clicked()),this,SLOT(b2Clicked())); + connect(pb3,TQT_SIGNAL(clicked()),this,TQT_SLOT(b2Clicked())); } } @@ -331,7 +331,7 @@ void KviKvsCallbackTextInput::b2Clicked() done(2+10); } -void KviKvsCallbackTextInput::closeEvent(QCloseEvent *e) +void KviKvsCallbackTextInput::closeEvent(TQCloseEvent *e) { e->ignore(); done(m_iEscapeButton+10); @@ -345,7 +345,7 @@ void KviKvsCallbackTextInput::done(int code) } else { switch(code) { - case QDialog::Accepted: + case TQDialog::Accepted: code = m_iDefaultButton; break; default: @@ -354,13 +354,13 @@ void KviKvsCallbackTextInput::done(int code) } } - QString txt; + TQString txt; if(m_bMultiLine) { - txt = ((QMultiLineEdit *)m_pEdit)->text(); + txt = ((TQMultiLineEdit *)m_pEdit)->text(); } else { - txt = ((QLineEdit *)m_pEdit)->text(); + txt = ((TQLineEdit *)m_pEdit)->text(); } KviKvsVariantList params; @@ -369,15 +369,15 @@ void KviKvsCallbackTextInput::done(int code) execute(¶ms); - //QDialog::done(code); + //TQDialog::done(code); delete this; } -void KviKvsCallbackTextInput::showEvent(QShowEvent *e) +void KviKvsCallbackTextInput::showEvent(TQShowEvent *e) { move((g_pApp->desktop()->width() - width())/2,(g_pApp->desktop()->height() - height()) / 2); - QDialog::showEvent(e); + TQDialog::showEvent(e); } @@ -417,7 +417,7 @@ void KviKvsCallbackTextInput::showEvent(QShowEvent *e) If the -d switch is used , the initial text input value is set to .[br] If the -i switch is used , the dialog displays also the icon , just on the left ot the [br] If the -b or -modal switch is specified the dialog will have non-blocking modal behaviour: - it will appear above its parent widget and block its input until it's closed.[br] + it will appear above its tqparent widget and block its input until it's closed.[br] In that case is an [doc:image_id]image identifier[/doc] (can be a relative or absolute path to an image file or a signed number (in that case it defines an internal KVIrc image).[br] ,... are the magic parameters: evaluated at dialog.textinput call time and passed @@ -447,7 +447,7 @@ void KviKvsCallbackTextInput::showEvent(QShowEvent *e) static bool dialog_kvs_cmd_textinput(KviKvsModuleCallbackCommandCall * c) { - QString szCaption,szInfoText,szIcon,szDefaultText,szButton0,szButton1,szButton2; + TQString szCaption,szInfoText,szIcon,szDefaultText,szButton0,szButton1,szButton2; KviKvsVariantList params; KVSM_PARAMETERS_BEGIN(c) @@ -459,7 +459,7 @@ static bool dialog_kvs_cmd_textinput(KviKvsModuleCallbackCommandCall * c) KVSM_PARAMETER("magic",KVS_PT_VARIANTLIST,KVS_PF_OPTIONAL,params) KVSM_PARAMETERS_END(c) - QString szCmd = c->callback()->code(); + TQString szCmd = c->callback()->code(); c->switches()->getAsStringIfExisting('i',"icon",szIcon); c->switches()->getAsStringIfExisting('d',"default",szDefaultText); @@ -467,7 +467,7 @@ static bool dialog_kvs_cmd_textinput(KviKvsModuleCallbackCommandCall * c) if(c->hasSwitch('b',"modal")) modal=true; else modal=false; KviKvsCallbackTextInput * box = new KviKvsCallbackTextInput( - szCaption,szInfoText,szDefaultText,szIcon,c->switches()->find('m',"multiline"), + szCaption,szInfoText,szDefaultText,szIcon,c->switches()->tqfind('m',"multiline"), szButton0,szButton1,szButton2,szCmd,¶ms,c->window(),modal); box->show(); @@ -481,10 +481,10 @@ static bool dialog_kvs_cmd_textinput(KviKvsModuleCallbackCommandCall * c) // New KVS KviKvsCallbackFileDialog::KviKvsCallbackFileDialog( - const QString &szCaption, - const QString &szInitialSelection, - const QString &szFilter, - const QString &szCode, + const TQString &szCaption, + const TQString &szInitialSelection, + const TQString &szFilter, + const TQString &szCode, KviKvsVariantList * pMagicParams, KviWindow * pWindow,bool modal) : KviFileDialog(szInitialSelection,szFilter,0,0,modal), KviKvsCallbackObject("dialog.file",pWindow,szCode,pMagicParams,0) @@ -503,18 +503,18 @@ void KviKvsCallbackFileDialog::done(int code) KviFileDialog::done(code); KviKvsVariantList params; - if(code == QDialog::Accepted) + if(code == TQDialog::Accepted) { #ifdef COMPILE_KDE_SUPPORT if(mode() == KFile::ExistingOnly) #else - if(mode() == QFileDialog::ExistingFiles) + if(mode() == TQFileDialog::ExistingFiles) #endif { KviKvsArray * a = new KviKvsArray(); - QStringList sl = selectedFiles(); + TQStringList sl = selectedFiles(); int idx = 0; - for(QStringList::Iterator it = sl.begin();it != sl.end();++it) + for(TQStringList::Iterator it = sl.begin();it != sl.end();++it) { a->set(idx,new KviKvsVariant(*it)); idx++; @@ -524,17 +524,17 @@ void KviKvsCallbackFileDialog::done(int code) params.append(new KviKvsVariant(selectedFile())); } } else { - params.append(new KviKvsVariant(QString(""))); + params.append(new KviKvsVariant(TQString(""))); } hide(); // ensure we're hidden - // ugly workaround for the Qt filedialog "destructive accept() before this reference" bug + // ugly workaround for the TQt filedialog "destructive accept() before this reference" bug // we can't delete ourselves in this moment.... :((( // ...so skip out of this call stack and ask KviApp to destroy us just // when the control returns to the main loop. // If the module is unloaded then , KviApp will notice it and will NOT delete the dialog - g_pApp->collectGarbage(this); + g_pApp->collectGarbage(TQT_TQOBJECT(this)); // calling dialog.unload here WILL lead to a sigsegv (this is SURE // with a lot of qt versions that have the ugly file dialog "accept before this reference" bug) @@ -573,7 +573,7 @@ void KviKvsCallbackFileDialog::done(int code) ,... are the magic parameters: evaluated at dialog.message call time and passed to the as positional parameters.[br] If the -b or -modal switch is specified the dialog will have non-blocking modal behaviour: - it will appear above its parent widget and block its input until it's closed.[br] + it will appear above its tqparent widget and block its input until it's closed.[br] Once the dialog has been shown , the user will select an EXISTING file and click either Ok or Cancel. At this point the dialog is hidden and the is executed passing the selected file(s) as $0 and the magic parameters as positional parameters $1 , $2 , $3....[br] @@ -592,7 +592,7 @@ void KviKvsCallbackFileDialog::done(int code) static bool dialog_kvs_cmd_file(KviKvsModuleCallbackCommandCall * c) { - QString szMode,szCaption,szInitialSelection,szFilter; + TQString szMode,szCaption,szInitialSelection,szFilter; KviKvsVariantList params; KVSM_PARAMETERS_BEGIN(c) @@ -605,15 +605,15 @@ static bool dialog_kvs_cmd_file(KviKvsModuleCallbackCommandCall * c) bool modal; if(c->hasSwitch('b',"modal")) modal=true; else modal=false; - QString szCmd = c->callback()->code(); + TQString szCmd = c->callback()->code(); KviKvsCallbackFileDialog * box = new KviKvsCallbackFileDialog(szCaption,szInitialSelection,szFilter,szCmd,¶ms,c->window(),modal); KviFileDialog::FileMode md = KviFileDialog::ExistingFile; - if(KviQString::equalCI(szMode,"openm"))md = KviFileDialog::ExistingFiles; - else if(KviQString::equalCI(szMode,"save"))md = KviFileDialog::AnyFile; - else if(KviQString::equalCI(szMode,"dir"))md = KviFileDialog::DirectoryOnly; + if(KviTQString::equalCI(szMode,"openm"))md = KviFileDialog::ExistingFiles; + else if(KviTQString::equalCI(szMode,"save"))md = KviFileDialog::AnyFile; + else if(KviTQString::equalCI(szMode,"dir"))md = KviFileDialog::DirectoryOnly; box->setFileMode(md); @@ -629,11 +629,11 @@ static bool dialog_kvs_cmd_file(KviKvsModuleCallbackCommandCall * c) // New KVS KviKvsCallbackImageDialog::KviKvsCallbackImageDialog( - const QString &szCaption, - const QString &szInitialSelection, + const TQString &szCaption, + const TQString &szInitialSelection, int iType, int iMaxSize, - const QString &szCode, + const TQString &szCode, KviKvsVariantList * pMagicParams, KviWindow * pWindow,bool modal) : KviImageDialog(0,szCaption,iType,0,szInitialSelection,iMaxSize,modal), KviKvsCallbackObject("dialog.image",pWindow,szCode,pMagicParams,0) @@ -651,21 +651,21 @@ void KviKvsCallbackImageDialog::done(int code) KviImageDialog::done(code); KviKvsVariantList params; - if(code == QDialog::Accepted) + if(code == TQDialog::Accepted) { params.append(new KviKvsVariant(selectedImage())); } else { - params.append(new KviKvsVariant(QString(""))); + params.append(new KviKvsVariant(TQString(""))); } hide(); // ensure we're hidden - // ugly workaround for the Qt filedialog "destructive accept() before this reference" bug + // ugly workaround for the TQt filedialog "destructive accept() before this reference" bug // we can't delete ourselves in this moment.... :((( // ...so skip out of this call stack and ask KviApp to destroy us just // when the control returns to the main loop. // If the module is unloaded then , KviApp will notice it and will NOT delete the dialog - g_pApp->collectGarbage(this); + g_pApp->collectGarbage(TQT_TQOBJECT(this)); // calling dialog.unload here WILL lead to a sigsegv (this is SURE // with a lot of qt versions that have the ugly file dialog "accept before this reference" bug) @@ -704,7 +704,7 @@ void KviKvsCallbackImageDialog::done(int code) ,... are the magic parameters: evaluated at dialog.image call time and passed to the as positional parameters.[br] If the -b or -modal switch is specified the dialog will have non-blocking modal behaviour: - it will appear above its parent widget and block its input until it's closed.[br] + it will appear above its tqparent widget and block its input until it's closed.[br] Once the dialog has been shown , the user will select an EXISTING file and click either Ok or Cancel. At this point the dialog is hidden and the is executed passing the selected file(s) as $0 and the magic parameters as positional parameters $1 , $2 , $3....[br] @@ -723,7 +723,7 @@ void KviKvsCallbackImageDialog::done(int code) static bool dialog_kvs_cmd_image(KviKvsModuleCallbackCommandCall * c) { - QString szType,szCaption,szInitialSelection; + TQString szType,szCaption,szInitialSelection; kvs_uint_t iMaxSize; KviKvsVariantList params; @@ -737,12 +737,12 @@ static bool dialog_kvs_cmd_image(KviKvsModuleCallbackCommandCall * c) bool modal; if(c->hasSwitch('b',"modal")) modal=true; else modal=false; - QString szCmd = c->callback()->code(); + TQString szCmd = c->callback()->code(); int iType = 0; - if(szType.contains('s'))iType |= KID_TYPE_BUILTIN_IMAGES_SMALL; - if(szType.contains('f'))iType |= KID_TYPE_FULL_PATH; + if(szType.tqcontains('s'))iType |= KID_TYPE_BUILTIN_IMAGES_SMALL; + if(szType.tqcontains('f'))iType |= KID_TYPE_FULL_PATH; if(szType.isEmpty())iType = KID_TYPE_ALL; if(iMaxSize < 1)iMaxSize = 256000; @@ -774,8 +774,8 @@ static bool dialog_kvs_cmd_image(KviKvsModuleCallbackCommandCall * c) static bool dialog_kvs_fnc_yesno(KviKvsModuleFunctionCall * c) { - QString szCaption; - QString szText; + TQString szCaption; + TQString szText; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("caption",KVS_PT_STRING,0,szCaption) KVSM_PARAMETER("text",KVS_PT_STRING,0,szText) @@ -823,7 +823,7 @@ static bool dialog_module_fnc_textline(KviModule *m,KviCommand *c,KviParameterLi KviStr initial = parms->safeNextParam(); dialog_module_entering_local_loop(m); - QMessageBox::information(0,caption.ptr(),info.ptr(),QMessageBox::Ok); + TQMessageBox::information(0,caption.ptr(),info.ptr(),TQMessageBox::Ok); dialog_module_exiting_local_loop(m); // It might be that the current window is no longer available!!! @@ -878,7 +878,7 @@ static bool dialog_module_fnc_textline(KviModule *m,KviCommand *c,KviParameterLi static bool dialog_module_init(KviModule * m) { - g_pDialogModuleDialogList = new KviPointerList; + g_pDialogModuleDialogList = new KviPointerList; g_pDialogModuleDialogList->setAutoDelete(false); KVSM_REGISTER_CALLBACK_COMMAND(m,"message",dialog_kvs_cmd_message); diff --git a/src/modules/dialog/libkvidialog.h b/src/modules/dialog/libkvidialog.h index 43b1510f..6763646a 100644 --- a/src/modules/dialog/libkvidialog.h +++ b/src/modules/dialog/libkvidialog.h @@ -31,24 +31,25 @@ #include "kvi_kvs_callbackobject.h" -#include -#include +#include +#include // New KVS -class KviKvsCallbackMessageBox : public QMessageBox, public KviKvsCallbackObject +class KviKvsCallbackMessageBox : public TQMessageBox, public KviKvsCallbackObject { Q_OBJECT + TQ_OBJECT public: KviKvsCallbackMessageBox( - const QString &szCaption, - const QString &szText, - const QString &szIcon, - const QString &szButton0, - const QString &szButton1, - const QString &szButton2, - const QString &szCode, + const TQString &szCaption, + const TQString &szText, + const TQString &szIcon, + const TQString &szButton0, + const TQString &szButton1, + const TQString &szButton2, + const TQString &szCode, KviKvsVariantList * pMagicParams, KviWindow * pWindow, bool modal=false); ~KviKvsCallbackMessageBox(); @@ -60,31 +61,32 @@ protected slots: // New KVS -class KviKvsCallbackTextInput : public QDialog, public KviKvsCallbackObject +class KviKvsCallbackTextInput : public TQDialog, public KviKvsCallbackObject { Q_OBJECT + TQ_OBJECT public: KviKvsCallbackTextInput( - const QString &szCaption, - const QString &szLabel, - const QString &szDefaultText, - const QString &szIcon, + const TQString &szCaption, + const TQString &szLabel, + const TQString &szDefaultText, + const TQString &szIcon, bool bMultiLine, - const QString &szButton0, - const QString &szButton1, - const QString &szButton2, - const QString &szCode, + const TQString &szButton0, + const TQString &szButton1, + const TQString &szButton2, + const TQString &szCode, KviKvsVariantList * pMagicParams, KviWindow * pWindow, bool modal=false); ~KviKvsCallbackTextInput(); protected: bool m_bMultiLine; - QWidget * m_pEdit; + TQWidget * m_pEdit; int m_iEscapeButton; int m_iDefaultButton; protected: - virtual void closeEvent(QCloseEvent *e); - virtual void showEvent(QShowEvent *e); + virtual void closeEvent(TQCloseEvent *e); + virtual void showEvent(TQShowEvent *e); protected slots: void b0Clicked(); void b1Clicked(); @@ -98,12 +100,13 @@ protected slots: class KviKvsCallbackFileDialog : public KviFileDialog, public KviKvsCallbackObject { Q_OBJECT + TQ_OBJECT public: KviKvsCallbackFileDialog( - const QString &szCaption, - const QString &szInitialSelection, - const QString &szFilter, - const QString &szCode, + const TQString &szCaption, + const TQString &szInitialSelection, + const TQString &szFilter, + const TQString &szCode, KviKvsVariantList * pMagicParams, KviWindow * pWindow, bool modal=false); ~KviKvsCallbackFileDialog(); @@ -116,13 +119,14 @@ protected: class KviKvsCallbackImageDialog : public KviImageDialog, public KviKvsCallbackObject { Q_OBJECT + TQ_OBJECT public: KviKvsCallbackImageDialog( - const QString &szCaption, - const QString &szInitialSelection, + const TQString &szCaption, + const TQString &szInitialSelection, int iType, int iMaxSize, - const QString &szCode, + const TQString &szCode, KviKvsVariantList * pMagicParams, KviWindow * pWindow,bool modal=false); ~KviKvsCallbackImageDialog(); diff --git a/src/modules/dockwidget/libkvidockwidget_qt3.cpp b/src/modules/dockwidget/libkvidockwidget_qt3.cpp index 60003853..afee8824 100644 --- a/src/modules/dockwidget/libkvidockwidget_qt3.cpp +++ b/src/modules/dockwidget/libkvidockwidget_qt3.cpp @@ -46,17 +46,17 @@ #include #include #else - #include + #include #endif #include "kvi_tal_popupmenu.h" -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -64,8 +64,8 @@ #ifdef COMPILE_ON_WINDOWS #include - #include - #include + #include + #include #define ID_DOCKWIDGET_TASKBAR_ICON 0xdeadbeef #define WM_KVIRC_NOTIFY_ICON_MESSAGE (WM_USER + 0xbeef) @@ -92,26 +92,26 @@ extern KVIRC_API KviPointerHashTable * g_pGlobalWindowDict; static KviPointerList * g_pDockWidgetList = 0; -static QPixmap * g_pDock1 = 0; -static QPixmap * g_pDock2 = 0; -static QPixmap * g_pDock3 = 0; +static TQPixmap * g_pDock1 = 0; +static TQPixmap * g_pDock2 = 0; +static TQPixmap * g_pDock3 = 0; #ifdef COMPILE_ON_WINDOWS static HICON g_pCurrentIcon = 0; - static QPixmap * g_pCurrentPixmap = 0; + static TQPixmap * g_pCurrentPixmap = 0; #endif KviDockWidget::KviDockWidget(KviFrame * frm,const char * name) -: QWidget(0,name) +: TQWidget(0,name) { m_iConsoles = 0; m_iChannels = 0; m_iQueries = 0; m_iOther = 0; - m_pFlashingTimer = new QTimer(this,"flashing_timer"); - connect( m_pFlashingTimer, SIGNAL(timeout()), this, SLOT(flashingTimerShot()) ); + m_pFlashingTimer = new TQTimer(this,"flashing_timer"); + connect( m_pFlashingTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(flashingTimerShot()) ); m_bFlashed=0; g_pDockWidgetList->append(this); m_pFrm = frm; @@ -132,11 +132,11 @@ KviDockWidget::KviDockWidget(KviFrame * frm,const char * name) #endif //!COMPILE_ON_WINDOWS #ifdef COMPILE_USE_QT4 - m_pSysTrayIcon = new QSystemTrayIcon(m_pFrm); + m_pSysTrayIcon = new TQSystemTrayIcon(m_pFrm); #endif m_pTip = new KviDynamicToolTip(this,"dock_tooltip"); - connect(m_pTip,SIGNAL(tipRequest(KviDynamicToolTip *,const QPoint &)),this,SLOT(tipRequest(KviDynamicToolTip *,const QPoint &))); + connect(m_pTip,TQT_SIGNAL(tipRequest(KviDynamicToolTip *,const TQPoint &)),this,TQT_SLOT(tipRequest(KviDynamicToolTip *,const TQPoint &))); m_pAwayPopup = new KviTalPopupMenu(this); @@ -146,8 +146,8 @@ KviDockWidget::KviDockWidget(KviFrame * frm,const char * name) #else m_pContextPopup = new KviTalPopupMenu(this); #ifndef COMPILE_USE_QT4 - QLabel * l = new QLabel(__tr2qs("KVIrc"),m_pContextPopup); - l->setFrameStyle(QFrame::Raised | QFrame::StyledPanel); + TQLabel * l = new TQLabel(__tr2qs("KVIrc"),m_pContextPopup); + l->setFrameStyle(TQFrame::Raised | TQFrame::StyledPanel); m_pContextPopup->insertItem(l); #endif #endif @@ -155,18 +155,18 @@ KviDockWidget::KviDockWidget(KviFrame * frm,const char * name) m_iAwayMenuId = m_pContextPopup->insertItem ( __tr2qs("Away"), m_pAwayPopup); m_pContextPopup->changeItem(m_iAwayMenuId,*(g_pIconManager->getSmallIcon(KVI_SMALLICON_AWAY)),__tr2qs("Away")); - int id = m_pContextPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_OPTIONS)),__tr2qs("&Configure KVIrc..."),m_pFrm,SLOT(executeInternalCommand(int))); + int id = m_pContextPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_OPTIONS)),__tr2qs("&Configure KVIrc..."),m_pFrm,TQT_SLOT(executeInternalCommand(int))); m_pContextPopup->setItemParameter(id,KVI_INTERNALCOMMAND_OPTIONS_DIALOG); - id = m_pContextPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_KVIRC)),__tr2qs("&About KVIrc"),m_pFrm,SLOT(executeInternalCommand(int))); + id = m_pContextPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_KVIRC)),__tr2qs("&About KVIrc"),m_pFrm,TQT_SLOT(executeInternalCommand(int))); m_pContextPopup->setItemParameter(id,KVI_INTERNALCOMMAND_ABOUT_ABOUTKVIRC); m_pContextPopup->insertSeparator(); - m_iToggleFrame = m_pContextPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_RAW)),QString(""),this,SLOT(toggleParentFrame())); + m_iToggleFrame = m_pContextPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_RAW)),TQString(""),this,TQT_SLOT(toggleParentFrame())); m_pContextPopup->insertSeparator(); - id = m_pContextPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_DOCKWIDGET)),__tr2qs("Un&dock"),m_pFrm,SLOT(executeInternalCommand(int))); + id = m_pContextPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_DOCKWIDGET)),__tr2qs("Un&dock"),m_pFrm,TQT_SLOT(executeInternalCommand(int))); m_pContextPopup->setItemParameter(id,KVI_INTERNALCOMMAND_DOCKWIDGET_HIDE); - id = m_pContextPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_QUITAPP)),__tr2qs("&Quit"),g_pApp,SLOT(quit())); + id = m_pContextPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_TQUITAPP)),__tr2qs("&Quit"),g_pApp,TQT_SLOT(quit())); m_pContextPopup->setAccel(__tr2qs("Ctrl+Q"),id); - connect(m_pContextPopup,SIGNAL(aboutToShow()),this,SLOT(fillContextPopup())); + connect(m_pContextPopup,TQT_SIGNAL(aboutToShow()),this,TQT_SLOT(fillContextPopup())); } @@ -197,10 +197,10 @@ void KviDockWidget::flashingTimerShot() void KviDockWidget::createTaskbarIcon() { ICONINFO inf; - g_pCurrentPixmap=new QPixmap(*g_pDock1); + g_pCurrentPixmap=new TQPixmap(*g_pDock1); inf.hbmColor = g_pCurrentPixmap->hbm(); - if(!g_pCurrentPixmap->mask())g_pCurrentPixmap->setMask(g_pCurrentPixmap->createHeuristicMask()); - inf.hbmMask = g_pCurrentPixmap->mask()->hbm(); + if(!g_pCurrentPixmap->tqmask())g_pCurrentPixmap->setMask(g_pCurrentPixmap->createHeuristicMask()); + inf.hbmMask = g_pCurrentPixmap->tqmask()->hbm(); g_pCurrentIcon=CreateIconIndirect(&inf); NOTIFYICONDATA nid; @@ -227,10 +227,10 @@ void KviDockWidget::destroyTaskbarIcon() void KviDockWidget::updateTaskbarIcon() { ICONINFO inf; - QPixmap* pix = m_bFlashed ? g_pIconManager->getSmallIcon(KVI_SMALLICON_MESSAGE) : g_pCurrentPixmap; + TQPixmap* pix = m_bFlashed ? g_pIconManager->getSmallIcon(KVI_SMALLICON_MESSAGE) : g_pCurrentPixmap; inf.hbmColor = pix->hbm(); - if(!pix->mask())pix->setMask(pix->createHeuristicMask()); - inf.hbmMask = pix->mask()->hbm(); + if(!pix->tqmask())pix->setMask(pix->createHeuristicMask()); + inf.hbmMask = pix->tqmask()->hbm(); HICON hIcon=CreateIconIndirect(&inf); NOTIFYICONDATA nid; @@ -253,13 +253,13 @@ bool KviDockWidget::winEvent(MSG * m) switch(m->lParam) { case WM_MOUSEMOVE: - tipRequest(m_pTip,QCursor::pos()); + tipRequest(m_pTip,TQCursor::pos()); break; case WM_LBUTTONDOWN: toggleParentFrame(); break; case WM_RBUTTONDOWN: - m_pContextPopup->popup(QCursor::pos()); + m_pContextPopup->popup(TQCursor::pos()); break; } return true; @@ -305,10 +305,10 @@ static const char * idlemsgs[NIDLEMSGS]= extern Time qt_x_time; #endif -void KviDockWidget::enterEvent( QEvent* ) +void KviDockWidget::enterEvent( TQEvent* ) { #ifdef COMPILE_KDE_SUPPORT - if(!g_pApp->focusWidget()) + if(!g_pApp->tqfocusWidget()) { XEvent ev; kvi_memset(&ev, 0, sizeof(ev)); @@ -325,13 +325,13 @@ void KviDockWidget::enterEvent( QEvent* ) #endif } -void KviDockWidget::tipRequest(KviDynamicToolTip *tip,const QPoint &pnt) +void KviDockWidget::tipRequest(KviDynamicToolTip *tip,const TQPoint &pnt) { - QString tmp; + TQString tmp; KviTaskBarBase * t = m_pFrm->taskBar(); - QString line; + TQString line; for(KviTaskBarItem * b = t->firstItem();b;b = t->nextItem()) { @@ -343,9 +343,9 @@ void KviDockWidget::tipRequest(KviDynamicToolTip *tip,const QPoint &pnt) line = b->kviWindow()->lastMessageText(); if(!line.isEmpty()) { - line.replace(QChar('&'),"&"); - line.replace(QChar('<'),"<"); - line.replace(QChar('>'),">"); + line.tqreplace(TQChar('&'),"&"); + line.tqreplace(TQChar('<'),"<"); + line.tqreplace(TQChar('>'),">"); tmp += ""; tmp += b->kviWindow()->plainTextCaption(); tmp += "
"; @@ -377,7 +377,7 @@ void KviDockWidget::tipRequest(KviDynamicToolTip *tip,const QPoint &pnt) // return 0; //} -void KviDockWidget::mousePressEvent(QMouseEvent *e) +void KviDockWidget::mousePressEvent(TQMouseEvent *e) { if(e->button() & Qt::LeftButton)toggleParentFrame(); else if(e->button() & Qt::RightButton) @@ -425,10 +425,10 @@ void KviDockWidget::fillContextPopup() m_pContextPopup->setItemVisible(m_iAwayMenuId,true); m_pAwayPopup->clear(); - int iAllAway=m_pAwayPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_CONSOLE)),__tr2qs("Away on all"),this,SLOT(doAway(int))); + int iAllAway=m_pAwayPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_CONSOLE)),__tr2qs("Away on all"),this,TQT_SLOT(doAway(int))); m_pAwayPopup->setItemParameter(iAllAway,-1); - int iAllUnaway=m_pAwayPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_CONSOLE)),__tr2qs("Back on all"),this,SLOT(doAway(int))); + int iAllUnaway=m_pAwayPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_CONSOLE)),__tr2qs("Back on all"),this,TQT_SLOT(doAway(int))); m_pAwayPopup->setItemParameter(iAllUnaway,-2); int iSeparator=m_pAwayPopup->insertSeparator(); @@ -447,10 +447,10 @@ void KviDockWidget::fillContextPopup() int id; if(pConsole->connection()->userInfo()->isAway()) { - id=m_pAwayPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_CONSOLE)),__tr2qs("Back on %1").arg(pConsole->currentNetworkName()),this,SLOT(doAway(int))); + id=m_pAwayPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_CONSOLE)),__tr2qs("Back on %1").tqarg(pConsole->currentNetworkName()),this,TQT_SLOT(doAway(int))); bAllUnaway=0; } else { - id=m_pAwayPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_CONSOLE)),__tr2qs("Away on %1").arg(pConsole->currentNetworkName()),this,SLOT(doAway(int))); + id=m_pAwayPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_CONSOLE)),__tr2qs("Away on %1").tqarg(pConsole->currentNetworkName()),this,TQT_SLOT(doAway(int))); bAllAway=0; } m_pAwayPopup->setItemParameter(id,pConsole->ircContextId()); @@ -475,7 +475,7 @@ void KviDockWidget::fillContextPopup() void KviDockWidget::toggleParentFrame() { - QWidget *top_widget = m_pFrm->topLevelWidget(); + TQWidget *top_widget = m_pFrm->tqtopLevelWidget(); if(m_pFrm->isVisible()) { m_pFrm->hide(); @@ -498,11 +498,11 @@ void KviDockWidget::refresh() #ifdef COMPILE_ON_WINDOWS // how to copy transparency???? delete g_pCurrentPixmap; - g_pCurrentPixmap=new QPixmap(16,16); - bitBlt(g_pCurrentPixmap,0,0,m_iOther ? ((m_iOther == 2) ? g_pDock3 : g_pDock2) : g_pDock1,0,0,8,8,Qt::ClearROP); - bitBlt(g_pCurrentPixmap,0,8,m_iConsoles ? ((m_iConsoles == 2) ? g_pDock3 : g_pDock2) : g_pDock1,0,8,8,8,Qt::ClearROP); - bitBlt(g_pCurrentPixmap,8,0,m_iQueries ? ((m_iQueries == 2) ? g_pDock3 : g_pDock2) : g_pDock1,8,0,8,8,Qt::ClearROP); - bitBlt(g_pCurrentPixmap,8,8,m_iChannels ? ((m_iChannels == 2) ? g_pDock3 : g_pDock2) : g_pDock1,8,8,8,8,Qt::ClearROP); + g_pCurrentPixmap=new TQPixmap(16,16); + bitBlt(g_pCurrentPixmap,0,0,m_iOther ? ((m_iOther == 2) ? g_pDock3 : g_pDock2) : g_pDock1,0,0,8,8,TQt::ClearROP); + bitBlt(g_pCurrentPixmap,0,8,m_iConsoles ? ((m_iConsoles == 2) ? g_pDock3 : g_pDock2) : g_pDock1,0,8,8,8,TQt::ClearROP); + bitBlt(g_pCurrentPixmap,8,0,m_iQueries ? ((m_iQueries == 2) ? g_pDock3 : g_pDock2) : g_pDock1,8,0,8,8,TQt::ClearROP); + bitBlt(g_pCurrentPixmap,8,8,m_iChannels ? ((m_iChannels == 2) ? g_pDock3 : g_pDock2) : g_pDock1,8,8,8,8,TQt::ClearROP); #endif if( (m_iChannels == 2) || (m_iQueries == 2) ) @@ -554,7 +554,7 @@ void KviDockWidget::grabActivityInfo() case KVI_WINDOW_TYPE_CHANNEL: if(m_iChannels < iLevel) m_iChannels = iLevel; break; - case KVI_WINDOW_TYPE_QUERY: + case KVI_WINDOW_TYPE_TQUERY: if(m_iQueries < iLevel) m_iQueries = iLevel; break; default: @@ -581,7 +581,7 @@ void KviDockWidget::grabActivityInfo() case KVI_WINDOW_TYPE_CHANNEL: if(m_iChannels < iLevel) m_iChannels = iLevel; break; - case KVI_WINDOW_TYPE_QUERY: + case KVI_WINDOW_TYPE_TQUERY: if(m_iQueries < iLevel) m_iQueries = iLevel; break; default: @@ -612,19 +612,19 @@ void KviDockWidget::grabActivityInfo() } } -void KviDockWidget::paintEvent(QPaintEvent * event) +void KviDockWidget::paintEvent(TQPaintEvent * event) { #ifdef COMPILE_USE_QT4 - QPainter thisRestrictionOfQt4IsNotNice(this); + TQPainter thisRestrictionOfTQt4IsNotNice(this); if(m_bFlashed) { erase(); - thisRestrictionOfQt4IsNotNice.drawPixmap(4,4,16,16,*(g_pIconManager->getSmallIcon(KVI_SMALLICON_MESSAGE)),0,0,16,16); + thisRestrictionOfTQt4IsNotNice.drawPixmap(4,4,16,16,*(g_pIconManager->getSmallIcon(KVI_SMALLICON_MESSAGE)),0,0,16,16); } else { - thisRestrictionOfQt4IsNotNice.drawPixmap(0,0,12,12,m_iOther ? ((m_iOther == 2) ? *g_pDock3 : *g_pDock2) : *g_pDock1,0,0,12,12); - thisRestrictionOfQt4IsNotNice.drawPixmap(0,12,12,12,m_iConsoles ? ((m_iConsoles == 2) ? *g_pDock3 : *g_pDock2) : *g_pDock1,0,12,12,12); - thisRestrictionOfQt4IsNotNice.drawPixmap(12,0,12,12,m_iQueries ? ((m_iQueries == 2) ? *g_pDock3 : *g_pDock2) : *g_pDock1,12,0,12,12); - thisRestrictionOfQt4IsNotNice.drawPixmap(12,12,12,12,m_iChannels ? ((m_iChannels == 2) ? *g_pDock3 : *g_pDock2) : *g_pDock1,12,12,12,12); + thisRestrictionOfTQt4IsNotNice.drawPixmap(0,0,12,12,m_iOther ? ((m_iOther == 2) ? *g_pDock3 : *g_pDock2) : *g_pDock1,0,0,12,12); + thisRestrictionOfTQt4IsNotNice.drawPixmap(0,12,12,12,m_iConsoles ? ((m_iConsoles == 2) ? *g_pDock3 : *g_pDock2) : *g_pDock1,0,12,12,12); + thisRestrictionOfTQt4IsNotNice.drawPixmap(12,0,12,12,m_iQueries ? ((m_iQueries == 2) ? *g_pDock3 : *g_pDock2) : *g_pDock1,12,0,12,12); + thisRestrictionOfTQt4IsNotNice.drawPixmap(12,12,12,12,m_iChannels ? ((m_iChannels == 2) ? *g_pDock3 : *g_pDock2) : *g_pDock1,12,12,12,12); } #else if(m_bFlashed) @@ -632,16 +632,16 @@ void KviDockWidget::paintEvent(QPaintEvent * event) erase(); bitBlt(this,4,4,g_pIconManager->getSmallIcon(KVI_SMALLICON_MESSAGE),0,0,16,16); } else { - bitBlt(this,0,0,m_iOther ? ((m_iOther == 2) ? g_pDock3 : g_pDock2) : g_pDock1,0,0,12,12,Qt::CopyROP,false); - bitBlt(this,0,12,m_iConsoles ? ((m_iConsoles == 2) ? g_pDock3 : g_pDock2) : g_pDock1,0,12,12,12,Qt::CopyROP,false); - bitBlt(this,12,0,m_iQueries ? ((m_iQueries == 2) ? g_pDock3 : g_pDock2) : g_pDock1,12,0,12,12,Qt::CopyROP,false); - bitBlt(this,12,12,m_iChannels ? ((m_iChannels == 2) ? g_pDock3 : g_pDock2) : g_pDock1,12,12,12,12,Qt::CopyROP,false); + bitBlt(TQT_TQPAINTDEVICE(this),0,0,TQT_TQPAINTDEVICE(m_iOther ? ((m_iOther == 2) ? g_pDock3 : g_pDock2) : g_pDock1),0,0,12,12,TQt::CopyROP,false); + bitBlt(TQT_TQPAINTDEVICE(this),0,12,TQT_TQPAINTDEVICE(m_iConsoles ? ((m_iConsoles == 2) ? g_pDock3 : g_pDock2) : g_pDock1),0,12,12,12,TQt::CopyROP,false); + bitBlt(TQT_TQPAINTDEVICE(this),12,0,TQT_TQPAINTDEVICE(m_iQueries ? ((m_iQueries == 2) ? g_pDock3 : g_pDock2) : g_pDock1),12,0,12,12,TQt::CopyROP,false); + bitBlt(TQT_TQPAINTDEVICE(this),12,12,TQT_TQPAINTDEVICE(m_iChannels ? ((m_iChannels == 2) ? g_pDock3 : g_pDock2) : g_pDock1),12,12,12,12,TQt::CopyROP,false); } #endif } -static KviDockWidget * dockwidget_find(KviFrame *f) +static KviDockWidget * dockwidget_tqfind(KviFrame *f) { if(!g_pDockWidgetList)return 0; for(KviDockWidget * w = g_pDockWidgetList->first();w;w = g_pDockWidgetList->next()) @@ -687,7 +687,7 @@ static KviDockWidget * dockwidget_find(KviFrame *f) static bool dockwidget_kvs_cmd_show(KviKvsModuleCommandCall * c) { - if(!(dockwidget_find(c->window()->frame()))) + if(!(dockwidget_tqfind(c->window()->frame()))) { KviDockWidget * w = new KviDockWidget(c->window()->frame(),"dock_widget"); #ifndef COMPILE_ON_WINDOWS @@ -717,9 +717,9 @@ static bool dockwidget_kvs_cmd_show(KviKvsModuleCommandCall * c) static bool dockwidget_kvs_cmd_hide(KviKvsModuleCommandCall * c) { - KviDockWidget * w= dockwidget_find(c->window()->frame()); + KviDockWidget * w= dockwidget_tqfind(c->window()->frame()); if(w)delete w; - // show the parent frame.. otherwise there will be no way to get it back + // show the tqparent frame.. otherwise there will be no way to get it back if(!c->window()->frame()->isVisible()) { c->window()->frame()->show(); @@ -745,12 +745,10 @@ static bool dockwidget_kvs_cmd_hide(KviKvsModuleCommandCall * c) static bool dockwidget_kvs_cmd_hidewindow(KviKvsModuleCommandCall * c) { - KviDockWidget * w= dockwidget_find(c->window()->frame()); + KviDockWidget * w= dockwidget_tqfind(c->window()->frame()); if(w) { -#if QT_VERSION > 0x030201 w->setPrevWindowState(c->window()->frame()->windowState()); -#endif c->window()->frame()->hide(); } return true; @@ -774,7 +772,7 @@ static bool dockwidget_kvs_cmd_hidewindow(KviKvsModuleCommandCall * c) static bool dockwidget_kvs_fnc_isvisible(KviKvsModuleFunctionCall * c) { - c->returnValue()->setBoolean(dockwidget_find(c->window()->frame())); + c->returnValue()->setBoolean(dockwidget_tqfind(c->window()->frame())); return true; } @@ -793,9 +791,9 @@ static bool dockwidget_module_init(KviModule * m) g_pApp->findImage(buffer,"kvi_dock.png"); KviImageLibrary l1(buffer.ptr(),22,22); #endif - g_pDock1 = new QPixmap(l1.getImage(0)); - g_pDock2 = new QPixmap(l1.getImage(1)); - g_pDock3 = new QPixmap(l1.getImage(2)); + g_pDock1 = new TQPixmap(l1.getImage(0)); + g_pDock2 = new TQPixmap(l1.getImage(1)); + g_pDock3 = new TQPixmap(l1.getImage(2)); #ifdef COMPILE_ON_WINDOWS diff --git a/src/modules/dockwidget/libkvidockwidget_qt3.h b/src/modules/dockwidget/libkvidockwidget_qt3.h index 1721c28b..74f83486 100644 --- a/src/modules/dockwidget/libkvidockwidget_qt3.h +++ b/src/modules/dockwidget/libkvidockwidget_qt3.h @@ -32,15 +32,16 @@ -class QPixmap; -class QTimer; +class TQPixmap; +class TQTimer; //class KviFrame; class KviDynamicToolTip; -class KviDockWidget : public QWidget , public KviDockExtension +class KviDockWidget : public TQWidget , public KviDockExtension { Q_OBJECT + TQ_OBJECT public: KviDockWidget(KviFrame * win,const char * name); ~KviDockWidget(); @@ -58,7 +59,7 @@ protected: bool m_bFlashed; - QTimer* m_pFlashingTimer; + TQTimer* m_pFlashingTimer; int m_iConsoles; int m_iChannels; int m_iQueries; @@ -67,12 +68,12 @@ public: KviFrame * frame(){ return m_pFrm; }; public: // virtual int message(int msgtype,void * data); - virtual void enterEvent(QEvent *); + virtual void enterEvent(TQEvent *); virtual void refresh(); virtual void die(); protected: - virtual void paintEvent(QPaintEvent *e); - virtual void mousePressEvent(QMouseEvent *e); + virtual void paintEvent(TQPaintEvent *e); + virtual void mousePressEvent(TQMouseEvent *e); void grabActivityInfo(); #ifdef COMPILE_ON_WINDOWS @@ -87,7 +88,7 @@ protected: protected slots: void fillContextPopup(); void toggleParentFrame(); - void tipRequest(KviDynamicToolTip *tip,const QPoint &pnt); + void tipRequest(KviDynamicToolTip *tip,const TQPoint &pnt); void doAway(int); void flashingTimerShot(); }; diff --git a/src/modules/dockwidget/libkvidockwidget_qt4.cpp b/src/modules/dockwidget/libkvidockwidget_qt4.cpp index 73a21998..c8ad4092 100644 --- a/src/modules/dockwidget/libkvidockwidget_qt4.cpp +++ b/src/modules/dockwidget/libkvidockwidget_qt4.cpp @@ -49,16 +49,16 @@ #include "libkvidockwidget.h" #include "kvi_doublebuffer.h" -#include +#include #include "kvi_tal_popupmenu.h" -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -67,12 +67,12 @@ extern KVIRC_API KviPointerHashTable * g_pGlobalWindowDict; static KviPointerList * g_pDockWidgetList = 0; -static QPixmap * g_pDock1 = 0; -static QPixmap * g_pDock2 = 0; -static QPixmap * g_pDock3 = 0; +static TQPixmap * g_pDock1 = 0; +static TQPixmap * g_pDock2 = 0; +static TQPixmap * g_pDock3 = 0; KviDockWidget::KviDockWidget(KviFrame * frm) -: QSystemTrayIcon(frm), m_CurrentPixmap(ICON_SIZE,ICON_SIZE) +: TQSystemTrayIcon(frm), m_CurrentPixmap(ICON_SIZE,ICON_SIZE) { m_pContextPopup = new KviTalPopupMenu(0); setContextMenu(m_pContextPopup); @@ -82,8 +82,8 @@ KviDockWidget::KviDockWidget(KviFrame * frm) m_iQueries = 0; m_iOther = 0; - m_pFlashingTimer = new QTimer(this,"flashing_timer"); - connect( m_pFlashingTimer, SIGNAL(timeout()), this, SLOT(flashingTimerShot()) ); + m_pFlashingTimer = new TQTimer(this,"flashing_timer"); + connect( m_pFlashingTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(flashingTimerShot()) ); m_bFlashed=0; g_pDockWidgetList->append(this); m_pFrm = frm; @@ -92,30 +92,30 @@ KviDockWidget::KviDockWidget(KviFrame * frm) m_pTip = new KviDynamicToolTip(frm,"dock_tooltip"); m_pAwayPopup = new KviTalPopupMenu(0); - QLabel * l = new QLabel(__tr2qs("KVIrc"),m_pContextPopup); - l->setFrameStyle(QFrame::Raised | QFrame::StyledPanel); + TQLabel * l = new TQLabel(__tr2qs("KVIrc"),m_pContextPopup); + l->setFrameStyle(TQFrame::Raised | TQFrame::StyledPanel); m_pContextPopup->insertItem(l); m_pContextPopup->setCaption(__tr2qs("Context")); m_iAwayMenuId = m_pContextPopup->insertItem ( __tr2qs("Away"), m_pAwayPopup); m_pContextPopup->changeItem(m_iAwayMenuId,*(g_pIconManager->getSmallIcon(KVI_SMALLICON_AWAY)),__tr2qs("Away")); - int id = m_pContextPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_OPTIONS)),__tr2qs("&Configure KVIrc..."),m_pFrm,SLOT(executeInternalCommand(int))); + int id = m_pContextPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_OPTIONS)),__tr2qs("&Configure KVIrc..."),m_pFrm,TQT_SLOT(executeInternalCommand(int))); m_pContextPopup->setItemParameter(id,KVI_INTERNALCOMMAND_OPTIONS_DIALOG); - id = m_pContextPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_KVIRC)),__tr2qs("&About KVIrc"),m_pFrm,SLOT(executeInternalCommand(int))); + id = m_pContextPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_KVIRC)),__tr2qs("&About KVIrc"),m_pFrm,TQT_SLOT(executeInternalCommand(int))); m_pContextPopup->setItemParameter(id,KVI_INTERNALCOMMAND_ABOUT_ABOUTKVIRC); m_pContextPopup->insertSeparator(); - m_iToggleFrame = m_pContextPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_RAW)),QString(""),this,SLOT(toggleParentFrame())); + m_iToggleFrame = m_pContextPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_RAW)),TQString(""),this,TQT_SLOT(toggleParentFrame())); m_pContextPopup->insertSeparator(); - id = m_pContextPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_DOCKWIDGET)),__tr2qs("Un&dock"),m_pFrm,SLOT(executeInternalCommand(int))); + id = m_pContextPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_DOCKWIDGET)),__tr2qs("Un&dock"),m_pFrm,TQT_SLOT(executeInternalCommand(int))); m_pContextPopup->setItemParameter(id,KVI_INTERNALCOMMAND_DOCKWIDGET_HIDE); - id = m_pContextPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_QUITAPP)),__tr2qs("&Quit"),g_pApp,SLOT(quit())); + id = m_pContextPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_TQUITAPP)),__tr2qs("&Quit"),g_pApp,TQT_SLOT(quit())); m_pContextPopup->setAccel(__tr2qs("Ctrl+Q"),id); - connect(m_pContextPopup,SIGNAL(aboutToShow()),this,SLOT(fillContextPopup())); + connect(m_pContextPopup,TQT_SIGNAL(aboutToShow()),this,TQT_SLOT(fillContextPopup())); - QIcon icon(*g_pDock1); + TQIcon icon(*g_pDock1); setIcon(icon); - connect(this,SIGNAL(activated ( QSystemTrayIcon::ActivationReason )),this,SLOT(activatedSlot ( QSystemTrayIcon::ActivationReason ))); + connect(this,TQT_SIGNAL(activated ( TQSystemTrayIcon::ActivationReason )),this,TQT_SLOT(activatedSlot ( TQSystemTrayIcon::ActivationReason ))); } @@ -160,13 +160,13 @@ static const char * idlemsgs[NIDLEMSGS]= __tr("idle idle idle idle!") }; -void KviDockWidget::tipRequest(KviDynamicToolTip *tip,const QPoint &pnt) +void KviDockWidget::tipRequest(KviDynamicToolTip *tip,const TQPoint &pnt) { - QString tmp; + TQString tmp; KviTaskBarBase * t = m_pFrm->taskBar(); - QString line; + TQString line; for(KviTaskBarItem * b = t->firstItem();b;b = t->nextItem()) { @@ -178,9 +178,9 @@ void KviDockWidget::tipRequest(KviDynamicToolTip *tip,const QPoint &pnt) line = b->kviWindow()->lastMessageText(); if(!line.isEmpty()) { - line.replace(QChar('&'),"&"); - line.replace(QChar('<'),"<"); - line.replace(QChar('>'),">"); + line.tqreplace(TQChar('&'),"&"); + line.tqreplace(TQChar('<'),"<"); + line.tqreplace(TQChar('>'),">"); tmp += ""; tmp += b->kviWindow()->plainTextCaption(); tmp += "
"; @@ -208,8 +208,8 @@ void KviDockWidget::tipRequest(KviDynamicToolTip *tip,const QPoint &pnt) // return 0; //} -//FIXME: Qt4 port -/*void KviDockWidget::mousePressEvent(QMouseEvent *e) +//FIXME: TQt4 port +/*void KviDockWidget::mousePressEvent(TQMouseEvent *e) { if(e->button() & Qt::LeftButton)toggleParentFrame(); else if(e->button() & Qt::RightButton) @@ -257,10 +257,10 @@ void KviDockWidget::fillContextPopup() m_pContextPopup->setItemVisible(m_iAwayMenuId,true); m_pAwayPopup->clear(); - int iAllAway=m_pAwayPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_CONSOLE)),__tr2qs("Away on all"),this,SLOT(doAway(int))); + int iAllAway=m_pAwayPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_CONSOLE)),__tr2qs("Away on all"),this,TQT_SLOT(doAway(int))); m_pAwayPopup->setItemParameter(iAllAway,-1); - int iAllUnaway=m_pAwayPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_CONSOLE)),__tr2qs("Back on all"),this,SLOT(doAway(int))); + int iAllUnaway=m_pAwayPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_CONSOLE)),__tr2qs("Back on all"),this,TQT_SLOT(doAway(int))); m_pAwayPopup->setItemParameter(iAllUnaway,-2); int iSeparator=m_pAwayPopup->insertSeparator(); @@ -279,10 +279,10 @@ void KviDockWidget::fillContextPopup() int id; if(pConsole->connection()->userInfo()->isAway()) { - id=m_pAwayPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_CONSOLE)),__tr2qs("Back on %1").arg(pConsole->currentNetworkName()),this,SLOT(doAway(int))); + id=m_pAwayPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_CONSOLE)),__tr2qs("Back on %1").tqarg(pConsole->currentNetworkName()),this,TQT_SLOT(doAway(int))); bAllUnaway=0; } else { - id=m_pAwayPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_CONSOLE)),__tr2qs("Away on %1").arg(pConsole->currentNetworkName()),this,SLOT(doAway(int))); + id=m_pAwayPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_CONSOLE)),__tr2qs("Away on %1").tqarg(pConsole->currentNetworkName()),this,TQT_SLOT(doAway(int))); bAllAway=0; } m_pAwayPopup->setItemParameter(id,pConsole->ircContextId()); @@ -307,7 +307,7 @@ void KviDockWidget::fillContextPopup() void KviDockWidget::toggleParentFrame() { - QWidget *top_widget = m_pFrm->topLevelWidget(); + TQWidget *top_widget = m_pFrm->tqtopLevelWidget(); if(m_pFrm->isVisible()) { m_pFrm->hide(); @@ -336,31 +336,31 @@ void KviDockWidget::refresh() m_bFlashed=false; } - m_CurrentPixmap.fill(Qt::transparent); - QPainter thisRestrictionOfQt4IsNotNice(&m_CurrentPixmap); - //thisRestrictionOfQt4IsNotNice.drawPixmap(0,0,22,22,*g_pDock1,0,0,22,22); + m_CurrentPixmap.fill(TQt::transparent); + TQPainter thisRestrictionOfTQt4IsNotNice(&m_CurrentPixmap); + //thisRestrictionOfTQt4IsNotNice.drawPixmap(0,0,22,22,*g_pDock1,0,0,22,22); if(m_bFlashed) { - thisRestrictionOfQt4IsNotNice.drawPixmap((ICON_SIZE-16)/2,(ICON_SIZE-16)/2,16,16,*(g_pIconManager->getSmallIcon(KVI_SMALLICON_MESSAGE)),0,0,16,16); + thisRestrictionOfTQt4IsNotNice.drawPixmap((ICON_SIZE-16)/2,(ICON_SIZE-16)/2,16,16,*(g_pIconManager->getSmallIcon(KVI_SMALLICON_MESSAGE)),0,0,16,16); } else { - thisRestrictionOfQt4IsNotNice.drawPixmap(0,0,ICON_SIZE/2,ICON_SIZE/2, + thisRestrictionOfTQt4IsNotNice.drawPixmap(0,0,ICON_SIZE/2,ICON_SIZE/2, m_iOther ? ((m_iOther == 2) ? *g_pDock3 : *g_pDock2) : *g_pDock1,0,0,ICON_SIZE/2,ICON_SIZE/2); - thisRestrictionOfQt4IsNotNice.drawPixmap(0,ICON_SIZE/2,ICON_SIZE/2,ICON_SIZE/2, + thisRestrictionOfTQt4IsNotNice.drawPixmap(0,ICON_SIZE/2,ICON_SIZE/2,ICON_SIZE/2, m_iConsoles ? ((m_iConsoles == 2) ? *g_pDock3 : *g_pDock2) : *g_pDock1,0,ICON_SIZE/2,ICON_SIZE/2,ICON_SIZE/2); - thisRestrictionOfQt4IsNotNice.drawPixmap(ICON_SIZE/2,0,ICON_SIZE/2,ICON_SIZE/2, + thisRestrictionOfTQt4IsNotNice.drawPixmap(ICON_SIZE/2,0,ICON_SIZE/2,ICON_SIZE/2, m_iQueries ? ((m_iQueries == 2) ? *g_pDock3 : *g_pDock2) : *g_pDock1,ICON_SIZE/2,0,ICON_SIZE/2,ICON_SIZE/2); - thisRestrictionOfQt4IsNotNice.drawPixmap(ICON_SIZE/2,ICON_SIZE/2,ICON_SIZE/2,ICON_SIZE/2, + thisRestrictionOfTQt4IsNotNice.drawPixmap(ICON_SIZE/2,ICON_SIZE/2,ICON_SIZE/2,ICON_SIZE/2, m_iChannels ? ((m_iChannels == 2) ? *g_pDock3 : *g_pDock2) : *g_pDock1 @@ -370,9 +370,9 @@ void KviDockWidget::refresh() updateIcon(); } -void KviDockWidget::activatedSlot( QSystemTrayIcon::ActivationReason reason ) +void KviDockWidget::activatedSlot( TQSystemTrayIcon::ActivationReason reason ) { - if(reason==QSystemTrayIcon::Trigger) + if(reason==TQSystemTrayIcon::Trigger) { toggleParentFrame(); } @@ -412,7 +412,7 @@ void KviDockWidget::grabActivityInfo() case KVI_WINDOW_TYPE_CHANNEL: if(m_iChannels < iLevel) m_iChannels = iLevel; break; - case KVI_WINDOW_TYPE_QUERY: + case KVI_WINDOW_TYPE_TQUERY: if(m_iQueries < iLevel) m_iQueries = iLevel; break; default: @@ -439,7 +439,7 @@ void KviDockWidget::grabActivityInfo() case KVI_WINDOW_TYPE_CHANNEL: if(m_iChannels < iLevel) m_iChannels = iLevel; break; - case KVI_WINDOW_TYPE_QUERY: + case KVI_WINDOW_TYPE_TQUERY: if(m_iQueries < iLevel) m_iQueries = iLevel; break; default: @@ -472,11 +472,11 @@ void KviDockWidget::grabActivityInfo() void KviDockWidget::updateIcon() { - setIcon(QIcon(m_CurrentPixmap)); + setIcon(TQIcon(m_CurrentPixmap)); } -static KviDockWidget * dockwidget_find(KviFrame *f) +static KviDockWidget * dockwidget_tqfind(KviFrame *f) { if(!g_pDockWidgetList)return 0; for(KviDockWidget * w = g_pDockWidgetList->first();w;w = g_pDockWidgetList->next()) @@ -522,7 +522,7 @@ static KviDockWidget * dockwidget_find(KviFrame *f) static bool dockwidget_kvs_cmd_show(KviKvsModuleCommandCall * c) { - if(!(dockwidget_find(c->window()->frame()))) + if(!(dockwidget_tqfind(c->window()->frame()))) { KviDockWidget * w = new KviDockWidget(c->window()->frame()); w->show(); @@ -548,9 +548,9 @@ static bool dockwidget_kvs_cmd_show(KviKvsModuleCommandCall * c) static bool dockwidget_kvs_cmd_hide(KviKvsModuleCommandCall * c) { - KviDockWidget * w= dockwidget_find(c->window()->frame()); + KviDockWidget * w= dockwidget_tqfind(c->window()->frame()); if(w)delete w; - // show the parent frame.. otherwise there will be no way to get it back + // show the tqparent frame.. otherwise there will be no way to get it back if(!c->window()->frame()->isVisible()) { c->window()->frame()->show(); @@ -576,7 +576,7 @@ static bool dockwidget_kvs_cmd_hide(KviKvsModuleCommandCall * c) static bool dockwidget_kvs_cmd_hidewindow(KviKvsModuleCommandCall * c) { - KviDockWidget * w= dockwidget_find(c->window()->frame()); + KviDockWidget * w= dockwidget_tqfind(c->window()->frame()); if(w) { c->window()->frame()->hide(); @@ -602,7 +602,7 @@ static bool dockwidget_kvs_cmd_hidewindow(KviKvsModuleCommandCall * c) static bool dockwidget_kvs_fnc_isvisible(KviKvsModuleFunctionCall * c) { - c->returnValue()->setBoolean(dockwidget_find(c->window()->frame())); + c->returnValue()->setBoolean(dockwidget_tqfind(c->window()->frame())); return true; } @@ -613,20 +613,20 @@ static bool dockwidget_kvs_fnc_isvisible(KviKvsModuleFunctionCall * c) // ======================================= static bool dockwidget_module_init(KviModule * m) { - QString buffer; + TQString buffer; #ifdef COMPILE_ON_WINDOWS g_pApp->findImage(buffer,"kvi_dock_win32-0.png"); #else g_pApp->findImage(buffer,"kvi_dock_part-0.png"); #endif - g_pDock1 = new QPixmap(buffer); + g_pDock1 = new TQPixmap(buffer); #ifdef COMPILE_ON_WINDOWS g_pApp->findImage(buffer,"kvi_dock_win32-1.png"); #else g_pApp->findImage(buffer,"kvi_dock_part-1.png"); #endif - g_pDock2 = new QPixmap(buffer); + g_pDock2 = new TQPixmap(buffer); #ifdef COMPILE_ON_WINDOWS g_pApp->findImage(buffer,"kvi_dock_win32-2.png"); @@ -634,7 +634,7 @@ static bool dockwidget_module_init(KviModule * m) g_pApp->findImage(buffer,"kvi_dock_part-2.png"); #endif - g_pDock3 = new QPixmap(buffer); + g_pDock3 = new TQPixmap(buffer); g_pDockWidgetList = new KviPointerList; diff --git a/src/modules/dockwidget/libkvidockwidget_qt4.h b/src/modules/dockwidget/libkvidockwidget_qt4.h index 9d9e87bc..bf67148e 100644 --- a/src/modules/dockwidget/libkvidockwidget_qt4.h +++ b/src/modules/dockwidget/libkvidockwidget_qt4.h @@ -26,17 +26,18 @@ #include "kvi_frame.h" class KviTalPopupMenu; -#include +#include -class QPixmap; -class QTimer; +class TQPixmap; +class TQTimer; //class KviFrame; class KviDynamicToolTip; -class KviDockWidget : public QSystemTrayIcon, public KviDockExtension +class KviDockWidget : public TQSystemTrayIcon, public KviDockExtension { Q_OBJECT + TQ_OBJECT public: KviDockWidget(KviFrame * win); ~KviDockWidget(); @@ -51,8 +52,8 @@ protected: bool m_bFlashed; - QPixmap m_CurrentPixmap; - QTimer* m_pFlashingTimer; + TQPixmap m_CurrentPixmap; + TQTimer* m_pFlashingTimer; int m_iConsoles; int m_iChannels; int m_iQueries; @@ -69,11 +70,11 @@ protected: protected slots: void fillContextPopup(); void toggleParentFrame(); - void tipRequest(KviDynamicToolTip *tip,const QPoint &pnt); + void tipRequest(KviDynamicToolTip *tip,const TQPoint &pnt); void doAway(int); void flashingTimerShot(); - void activatedSlot( QSystemTrayIcon::ActivationReason reason ); + void activatedSlot( TQSystemTrayIcon::ActivationReason reason ); }; //#endif diff --git a/src/modules/editor/libkvieditor.cpp b/src/modules/editor/libkvieditor.cpp index 14ad53b3..1ef36b5d 100644 --- a/src/modules/editor/libkvieditor.cpp +++ b/src/modules/editor/libkvieditor.cpp @@ -43,7 +43,7 @@ static bool editor_module_cleanup(KviModule *m) { while(g_pScriptEditorWindowList->first()) { - QObject * w = g_pScriptEditorWindowList->first()->parent();; + TQObject * w = g_pScriptEditorWindowList->first()->tqparent();; while(w) { //debug("%s %s %i %s",__FILE__,__FUNCTION__,__LINE__,w->className()); @@ -54,7 +54,7 @@ static bool editor_module_cleanup(KviModule *m) // debug("%s %s %i",__FILE__,__FUNCTION__,__LINE__); break; } - w = w->parent(); + w = w->tqparent(); } delete g_pScriptEditorWindowList->first(); } @@ -83,7 +83,7 @@ KVIRC_MODULE( // We want C linkage on this one: we want to be able to dlsym() it with a simple name // FIXME: Is this portable enough ? Or is better to have a table entry ? -KVIMODULEEXPORTFUNC KviScriptEditor * editor_module_createScriptEditor(QWidget * par) +KVIMODULEEXPORTFUNC KviScriptEditor * editor_module_createScriptEditor(TQWidget * par) { return new KviScriptEditorImplementation(par); } diff --git a/src/modules/editor/scripteditor.cpp b/src/modules/editor/scripteditor.cpp index 06023a7c..cc9ca7c2 100644 --- a/src/modules/editor/scripteditor.cpp +++ b/src/modules/editor/scripteditor.cpp @@ -25,21 +25,21 @@ #include "scripteditor.h" -#include -#include +#include +#include #include #include "kvi_tal_popupmenu.h" #include "kvi_tal_scrollview.h" -#include -#include +#include +#include #ifdef COMPILE_USE_QT4 - //#define QSyntaxHighlighter Q3SyntaxHighlighter + //#define TQSyntaxHighlighter Q3SyntaxHighlighter #else - #include + #include #endif -#include -#include -#include +#include +#include +#include #include "kvi_fileutils.h" #include "kvi_locale.h" @@ -55,36 +55,36 @@ #include "kvi_iconmanager.h" #include "kvi_kvs_kernel.h" -#include +#include extern KviPointerList * g_pScriptEditorWindowList; extern KviModule * g_pEditorModulePointer; -static QColor g_clrBackground(255,255,255); -static QColor g_clrNormalText(0,0,0); -static QColor g_clrBracket(255,0,0); -static QColor g_clrComment(0,120,0); -static QColor g_clrFunction(0,17,255); -static QColor g_clrKeyword(85,85,255); -static QColor g_clrVariable(255,0,0); -static QColor g_clrPunctuation(180,180,0); -static QColor g_clrFind(0,0,0); +static TQColor g_clrBackground(255,255,255); +static TQColor g_clrNormalText(0,0,0); +static TQColor g_clrBracket(255,0,0); +static TQColor g_clrComment(0,120,0); +static TQColor g_clrFunction(0,17,255); +static TQColor g_clrKeyword(85,85,255); +static TQColor g_clrVariable(255,0,0); +static TQColor g_clrPunctuation(180,180,0); +static TQColor g_clrFind(0,0,0); -static QFont g_fntNormal("Courier New",8); +static TQFont g_fntNormal("Courier New",8); -KviCompletionBox::KviCompletionBox(QWidget * parent = 0) -: KviTalListBox(parent) +KviCompletionBox::KviCompletionBox(TQWidget * tqparent = 0) +: KviTalListBox(tqparent) { - setPaletteForegroundColor(QColor(0,0,0)); - setPaletteBackgroundColor(QColor(255,255,255)); + setPaletteForegroundColor(TQColor(0,0,0)); + setPaletteBackgroundColor(TQColor(255,255,255)); #ifdef COMPILE_USE_QT4 setHScrollBarMode(KviTalListBox::AlwaysOff); #else - setHScrollBarMode(QScrollView::AlwaysOff); + setHScrollBarMode(TQScrollView::AlwaysOff); #endif - QFont listfont=font(); + TQFont listfont=font(); listfont.setPointSize(8); setFont(listfont); setVariableWidth(false); @@ -93,25 +93,25 @@ KviCompletionBox::KviCompletionBox(QWidget * parent = 0) hide(); } -void KviCompletionBox::updateContents(QString buffer) +void KviCompletionBox::updateContents(TQString buffer) { buffer=buffer.stripWhiteSpace(); - KviPointerList list; + KviPointerList list; clear(); - QString szModule; - QChar* pCur = (QChar *)buffer.ucs2(); + TQString szModule; + TQChar* pCur = (TQChar *)buffer.ucs2(); - int pos=buffer.find('.'); + int pos=buffer.tqfind('.'); if(pos>0) { szModule=buffer.left(pos); - if(szModule[0].unicode()=='$') + if(szModule[0].tqunicode()=='$') szModule.remove(0,1); } - if(pCur->unicode() == '$') + if(pCur->tqunicode() == '$') { buffer.remove(0,1); if(!buffer.isEmpty()) @@ -120,7 +120,7 @@ void KviCompletionBox::updateContents(QString buffer) KviKvsKernel::instance()->completeFunction(buffer,&list); else debug("we need a module completion!"); - for ( QString* szCurrent = list.first(); szCurrent; szCurrent = list.next() ) + for ( TQString* szCurrent = list.first(); szCurrent; szCurrent = list.next() ) { szCurrent->prepend('$'); //szCurrent->append('('); @@ -134,7 +134,7 @@ void KviCompletionBox::updateContents(QString buffer) KviKvsKernel::instance()->completeCommand(buffer,&list); else debug("we need a module completion!"); - for ( QString* szCurrent = list.first(); szCurrent; szCurrent = list.next() ) + for ( TQString* szCurrent = list.first(); szCurrent; szCurrent = list.next() ) { szCurrent->append(' '); insertItem(*szCurrent); @@ -143,16 +143,16 @@ void KviCompletionBox::updateContents(QString buffer) // debug("%s %s %i %i",__FILE__,__FUNCTION__,__LINE__,count()); } -void KviCompletionBox::keyPressEvent(QKeyEvent * e) +void KviCompletionBox::keyPressEvent(TQKeyEvent * e) { // debug("%s %s %i %x",__FILE__,__FUNCTION__,__LINE__,e->key()); switch(e->key()) { - case Qt::Key_Escape: + case TQt::Key_Escape: hide(); setFocus(); break; - case Qt::Key_Return: + case TQt::Key_Return: break; default: if(!e->text().isEmpty()) @@ -164,13 +164,13 @@ void KviCompletionBox::keyPressEvent(QKeyEvent * e) KviTalListBox::keyPressEvent(e); } -KviScriptEditorWidgetColorOptions::KviScriptEditorWidgetColorOptions(QWidget * pParent) -: QDialog(pParent) +KviScriptEditorWidgetColorOptions::KviScriptEditorWidgetColorOptions(TQWidget * pParent) +: TQDialog(pParent) { m_pSelectorInterfaceList = new KviPointerList; m_pSelectorInterfaceList->setAutoDelete(false); setCaption(__tr2qs_ctx("Preferences","editor")); - QGridLayout * g = new QGridLayout(this,3,3,4,4); + TQGridLayout * g = new TQGridLayout(this,3,3,4,4); KviFontSelector * f = new KviFontSelector(this,__tr2qs_ctx("Font:","editor"),&g_fntNormal,true); g->addMultiCellWidget(f,0,0,0,2); @@ -187,13 +187,13 @@ KviScriptEditorWidgetColorOptions::KviScriptEditorWidgetColorOptions(QWidget * p s = addColorSelector(gbox,__tr2qs_ctx("Punctuation:","editor"),&g_clrPunctuation,true); s = addColorSelector(gbox,__tr2qs_ctx("Find:","editor"),&g_clrFind,true); - QPushButton * b = new QPushButton(__tr2qs_ctx("&OK","editor"),this); + TQPushButton * b = new TQPushButton(__tr2qs_ctx("&OK","editor"),this); b->setDefault(true); - connect(b,SIGNAL(clicked()),this,SLOT(okClicked())); + connect(b,TQT_SIGNAL(clicked()),this,TQT_SLOT(okClicked())); g->addWidget(b,2,1); - b = new QPushButton(__tr2qs_ctx("Cancel","editor"),this); - connect(b,SIGNAL(clicked()),this,SLOT(reject())); + b = new TQPushButton(__tr2qs_ctx("Cancel","editor"),this); + connect(b,TQT_SIGNAL(clicked()),this,TQT_SLOT(reject())); g->addWidget(b,2,2); @@ -206,7 +206,7 @@ KviScriptEditorWidgetColorOptions::~KviScriptEditorWidgetColorOptions() delete m_pSelectorInterfaceList; } -KviColorSelector * KviScriptEditorWidgetColorOptions::addColorSelector(QWidget * pParent,const QString & txt,QColor * pOption,bool bEnabled) +KviColorSelector * KviScriptEditorWidgetColorOptions::addColorSelector(TQWidget * pParent,const TQString & txt,TQColor * pOption,bool bEnabled) { KviColorSelector * s = new KviColorSelector(pParent,txt,pOption,bEnabled); m_pSelectorInterfaceList->append(s); @@ -224,7 +224,7 @@ void KviScriptEditorWidgetColorOptions::okClicked() } -KviScriptEditorWidget::KviScriptEditorWidget(QWidget * pParent) +KviScriptEditorWidget::KviScriptEditorWidget(TQWidget * pParent) : KviTalTextEdit(pParent) { setWordWrap(KviTalTextEdit::NoWrap); @@ -233,7 +233,7 @@ KviScriptEditorWidget::KviScriptEditorWidget(QWidget * pParent) updateOptions(); m_szFind=""; completelistbox=new KviCompletionBox(this); - connect (completelistbox,SIGNAL(selected(const QString &)),this,SLOT(slotComplete(const QString &))); + connect (completelistbox,TQT_SIGNAL(selected(const TQString &)),this,TQT_SLOT(slotComplete(const TQString &))); } KviScriptEditorWidget::~KviScriptEditorWidget() @@ -242,18 +242,18 @@ KviScriptEditorWidget::~KviScriptEditorWidget() } #ifdef COMPILE_USE_QT4 -Q3PopupMenu * KviScriptEditorWidget::createPopupMenu( const QPoint& pos ) +Q3PopupMenu * KviScriptEditorWidget::createPopupMenu( const TQPoint& pos ) #else -QPopupMenu * KviScriptEditorWidget::createPopupMenu( const QPoint& pos ) +TQPopupMenu * KviScriptEditorWidget::createPopupMenu( const TQPoint& pos ) #endif { #ifdef COMPILE_USE_QT4 Q3PopupMenu *pop=KviTalTextEdit::createPopupMenu(pos); #else - QPopupMenu *pop=KviTalTextEdit::createPopupMenu(pos); + TQPopupMenu *pop=KviTalTextEdit::createPopupMenu(pos); #endif - pop->insertItem(__tr2qs("Context sensitive help"),this,SLOT(slotHelp()),Qt::CTRL+Qt::Key_H); - pop->insertItem(__tr2qs("&Replace"),this,SLOT(slotReplace()),Qt::CTRL+Qt::Key_R); + pop->insertItem(__tr2qs("Context sensitive help"),this,TQT_SLOT(slotHelp()),TQt::CTRL+TQt::Key_H); + pop->insertItem(__tr2qs("&Replace"),this,TQT_SLOT(slotReplace()),TQt::CTRL+TQt::Key_R); return pop; } @@ -265,10 +265,10 @@ void KviScriptEditorWidget::slotFind() void KviScriptEditorWidget::slotReplace() { - KviScriptEditorReplaceDialog *dialog=new KviScriptEditorReplaceDialog(this,tr("Find & Repalce")); - connect (dialog,SIGNAL(replaceAll(const QString &,const QString &)),m_pParent,SLOT(slotReplaceAll(const QString &,const QString &))); - connect (dialog,SIGNAL(initFind()),m_pParent,SLOT(slotInitFind())); - connect (dialog,SIGNAL(nextFind(const QString &)),m_pParent,SLOT(slotNextFind(const QString &))); + KviScriptEditorReplaceDialog *dialog=new KviScriptEditorReplaceDialog(this,tqtr("Find & Repalce")); + connect (dialog,TQT_SIGNAL(replaceAll(const TQString &,const TQString &)),m_pParent,TQT_SLOT(slotReplaceAll(const TQString &,const TQString &))); + connect (dialog,TQT_SIGNAL(initFind()),m_pParent,TQT_SLOT(slotInitFind())); + connect (dialog,TQT_SIGNAL(nextFind(const TQString &)),m_pParent,TQT_SLOT(slotNextFind(const TQString &))); if(dialog->exec()){}; } @@ -280,16 +280,16 @@ void KviScriptEditorWidget::slotHelp() void KviScriptEditorWidget::updateOptions() { - setPaper(QBrush(g_clrBackground)); + setPaper(TQBrush(g_clrBackground)); setFont(g_fntNormal); setColor(g_clrNormalText); - QPalette p = palette(); - p.setColor(QColorGroup::Text,g_clrNormalText); + TQPalette p = palette(); + p.setColor(TQColorGroup::Text,g_clrNormalText); setPalette(p); #ifdef COMPILE_USE_QT4 - setTextFormat(Qt::PlainText); + setTextFormat(TQt::PlainText); #else setTextFormat(KviTalTextEdit::PlainText); #endif @@ -301,37 +301,37 @@ void KviScriptEditorWidget::updateOptions() ((KviScriptEditorImplementation*)m_pParent)->getFindlineedit()->setPaletteForegroundColor(g_clrFind); } -void KviScriptEditorWidget::keyPressEvent(QKeyEvent * e) +void KviScriptEditorWidget::keyPressEvent(TQKeyEvent * e) { - if(e->state() == Qt::ControlButton) + if(e->state() == TQt::ControlButton) { switch(e->key()) { - case Qt::Key_B: + case TQt::Key_B: insert("$b"); return; - case Qt::Key_K: + case TQt::Key_K: insert("$k"); return; - case Qt::Key_O: + case TQt::Key_O: insert("$o"); return; - case Qt::Key_U: + case TQt::Key_U: insert("$u"); return; - case Qt::Key_Enter: - case Qt::Key_Return: - case Qt::Key_Backspace: - case Qt::Key_PageUp: - e->ignore(); // allow the parent to process it + case TQt::Key_Enter: + case TQt::Key_Return: + case TQt::Key_Backspace: + case TQt::Key_PageUp: + e->ignore(); // allow the tqparent to process it return; break; } } - if(e->state() == Qt::ShiftButton) + if(e->state() == TQt::ShiftButton) { - if (e->key() == Qt::Key_Insert) + if (e->key() == TQt::Key_Insert) { completition(); return; @@ -339,20 +339,20 @@ void KviScriptEditorWidget::keyPressEvent(QKeyEvent * e) } switch(e->key()) { - case Qt::Key_Period: - case Qt::Key_Left: - case Qt::Key_Right: + case TQt::Key_Period: + case TQt::Key_Left: + case TQt::Key_Right: if(!completelistbox->isVisible()) completition(0); break; - case Qt::Key_Up: - case Qt::Key_Escape: - case Qt::Key_PageUp: - case Qt::Key_PageDown: - case Qt::Key_End: - case Qt::Key_Home: + case TQt::Key_Up: + case TQt::Key_Escape: + case TQt::Key_PageUp: + case TQt::Key_PageDown: + case TQt::Key_End: + case TQt::Key_Home: if(completelistbox->isVisible()) completelistbox->hide(); break; - case Qt::Key_Down: + case TQt::Key_Down: if(completelistbox->isVisible()) { completelistbox->setFocus(); @@ -360,22 +360,22 @@ void KviScriptEditorWidget::keyPressEvent(QKeyEvent * e) return; } break; - case Qt::Key_Return: + case TQt::Key_Return: KviTalTextEdit::keyPressEvent(e); int para,pos; getCursorPosition(¶,&pos); if(para > 0) { - QString szPrev=text(para-1); + TQString szPrev=text(para-1); if(!szPrev.isEmpty()) { - if(szPrev.at(szPrev.length() - 1).unicode() == ' ') + if(szPrev.tqat(szPrev.length() - 1).tqunicode() == ' ') szPrev.remove(szPrev.length() - 1,1); - QString szCur; - const QChar * pCur = (const QChar *)szPrev.ucs2(); + TQString szCur; + const TQChar * pCur = (const TQChar *)szPrev.ucs2(); if(pCur) { - while(pCur->unicode() && pCur->isSpace()) + while(pCur->tqunicode() && pCur->isSpace()) { szCur.append(*pCur); pCur++; @@ -397,19 +397,19 @@ void KviScriptEditorWidget::keyPressEvent(QKeyEvent * e) completition(0); } -void KviScriptEditorWidget::contentsMousePressEvent(QMouseEvent *e) +void KviScriptEditorWidget::contentsMousePressEvent(TQMouseEvent *e) { completelistbox->hide(); if (e->button() == Qt::RightButton) { // bool bIsFirstWordInLine; - QString buffer; + TQString buffer; int para = paragraphAt(e->pos()); int index=charAt(e->pos(),¶); buffer=this->text(para); getWordOnCursor(buffer,index); - QString tmp=buffer; - KviPointerList l; + TQString tmp=buffer; + KviPointerList l; if (tmp.left(1) == "$") { tmp.remove(0,1); @@ -432,7 +432,7 @@ void KviScriptEditorWidget::contentsMousePressEvent(QMouseEvent *e) bool KviScriptEditorWidget::contextSensitiveHelp() const { - QString buffer; + TQString buffer; int para,index; getCursorPosition(¶,&index); buffer=text(para); @@ -440,8 +440,8 @@ bool KviScriptEditorWidget::contextSensitiveHelp() const getWordOnCursor(buffer,index); /* - QString tmp=buffer; - KviPointerList * l; + TQString tmp=buffer; + KviPointerList * l; if(tmp.left(1) == "$") { tmp.remove(0,1); @@ -453,9 +453,9 @@ bool KviScriptEditorWidget::contextSensitiveHelp() const bool bOk = false; if(l) { - for(QString * s = l->first();s;s = l->next()) + for(TQString * s = l->first();s;s = l->next()) { - if(KviQString::equalCI(*s,buffer)) + if(KviTQString::equalCI(*s,buffer)) { l->last(); bOk = true; @@ -466,8 +466,8 @@ bool KviScriptEditorWidget::contextSensitiveHelp() const if(!bOk)return false; */ - QString parse; - KviQString::sprintf(parse,"timer -s (help,0){ help -s %Q; }",&buffer); + TQString parse; + KviTQString::sprintf(parse,"timer -s (help,0){ help -s %Q; }",&buffer); debug ("parsing %s",parse.latin1()); KviKvsScript::run(parse,(KviWindow*)g_pApp->activeConsole()); @@ -475,14 +475,14 @@ bool KviScriptEditorWidget::contextSensitiveHelp() const } -void KviScriptEditorWidget::getWordOnCursor(QString &buffer,int index) const +void KviScriptEditorWidget::getWordOnCursor(TQString &buffer,int index) const { - QRegExp re("[ \t=,\\(\\)\"}{\\[\\]\r\n+-*><;@!]"); + TQRegExp re("[ \t=,\\(\\)\"}{\\[\\]\r\n+-*><;@!]"); //debug("BUFFER IS %s",buffer.utf8().data()); - int start = buffer.findRev(re,index); - int end = buffer.find(re,index); + int start = buffer.tqfindRev(re,index); + int end = buffer.tqfind(re,index); - QString tmp; + TQString tmp; if(start!=end) { if(start<0)start=0; @@ -497,8 +497,8 @@ void KviScriptEditorWidget::getWordOnCursor(QString &buffer,int index) const void KviScriptEditorWidget::completition(bool bCanComplete) { int line,index; - QString buffer; - QString word; + TQString buffer; + TQString word; getCursorPosition(&line,&index); buffer=this->text(line); bool bIsFirstWordInLine; @@ -524,15 +524,15 @@ void KviScriptEditorWidget::completition(bool bCanComplete) } } -void KviScriptEditorWidget::getWordBeforeCursor(QString &buffer,int index,bool *bIsFirstWordInLine) +void KviScriptEditorWidget::getWordBeforeCursor(TQString &buffer,int index,bool *bIsFirstWordInLine) { - QString tmp = buffer.left(index); + TQString tmp = buffer.left(index); buffer=tmp; - int idx = buffer.findRev(' '); - int idx1 = buffer.findRev("="); - int idx2 = buffer.findRev(','); - int idx3 = buffer.findRev('('); - int idx4 = buffer.findRev('"'); + int idx = buffer.tqfindRev(' '); + int idx1 = buffer.tqfindRev("="); + int idx2 = buffer.tqfindRev(','); + int idx3 = buffer.tqfindRev('('); + int idx4 = buffer.tqfindRev('"'); if(idx1 > idx) idx= idx1; if(idx2 > idx)idx = idx2; if(idx3 > idx)idx = idx3; @@ -547,19 +547,19 @@ void KviScriptEditorWidget::getWordBeforeCursor(QString &buffer,int index,bool * } -void KviScriptEditorWidget::slotComplete(const QString &str) +void KviScriptEditorWidget::slotComplete(const TQString &str) { - QString complete=str; + TQString complete=str; int line,index; getCursorPosition(&line,&index); - QString buffer; + TQString buffer; buffer=this->text(line); bool bIsFirstWordInLine; getWordBeforeCursor(buffer,index,&bIsFirstWordInLine); int len=buffer.length(); -// if (buffer[1].unicode() == '$') len --; +// if (buffer[1].tqunicode() == '$') len --; complete.remove(0,len-1); - if (buffer[1].unicode() == '$') complete.append("("); + if (buffer[1].tqunicode() == '$') complete.append("("); else complete.append(" "); insert (complete); completelistbox->hide(); @@ -567,7 +567,7 @@ void KviScriptEditorWidget::slotComplete(const QString &str) } KviScriptSyntaxHighlighter::KviScriptSyntaxHighlighter(KviScriptEditorWidget * pWidget) -: QSyntaxHighlighter(pWidget) +: TQSyntaxHighlighter(pWidget) { } @@ -579,11 +579,11 @@ KviScriptSyntaxHighlighter::~KviScriptSyntaxHighlighter() #define IN_LINE 2 #define IN_STRING 4 -int KviScriptSyntaxHighlighter::highlightParagraph(const QString &text,int endStateOfLastPara) +int KviScriptSyntaxHighlighter::highlightParagraph(const TQString &text,int endStateOfLastPara) { - const QChar * pBuf = (const QChar *)text.ucs2(); - const QChar * c = pBuf; + const TQChar * pBuf = (const TQChar *)text.ucs2(); + const TQChar * c = pBuf; if(!c)return endStateOfLastPara; if(endStateOfLastPara < 0)endStateOfLastPara = 0; @@ -592,22 +592,22 @@ int KviScriptSyntaxHighlighter::highlightParagraph(const QString &text,int endSt bool bInComment = endStateOfLastPara & IN_COMMENT; bool bInString = endStateOfLastPara & IN_STRING; - const QChar * pBegin; + const TQChar * pBegin; - while(c->unicode()) + while(c->tqunicode()) { if(bInComment) { pBegin = c; - while(c->unicode() && (c->unicode() != '*'))c++; - if(!c->unicode()) + while(c->tqunicode() && (c->tqunicode() != '*'))c++; + if(!c->tqunicode()) { setFormat(pBegin - pBuf,c - pBegin,g_fntNormal,g_clrComment); return IN_COMMENT; } c++; - if(c->unicode() == '/') + if(c->tqunicode() == '/') { // end of the comment! c++; @@ -620,14 +620,14 @@ int KviScriptSyntaxHighlighter::highlightParagraph(const QString &text,int endSt if(c->isSpace()) { - while(c->unicode() && c->isSpace())c++; - if(!c->unicode())continue; + while(c->tqunicode() && c->isSpace())c++; + if(!c->tqunicode())continue; } pBegin = c; // this does not break the bNewCommand flag - if((c->unicode() == '{') || (c->unicode() == '}')) + if((c->tqunicode() == '{') || (c->tqunicode() == '}')) { c++; setFormat(pBegin - pBuf,1,g_fntNormal,g_clrBracket); @@ -639,12 +639,12 @@ int KviScriptSyntaxHighlighter::highlightParagraph(const QString &text,int endSt { bNewCommand = false; - if(c->unicode() == '#') + if(c->tqunicode() == '#') { if(c > pBuf) { - const QChar * prev = c - 1; - if((prev->unicode() == ']') || (prev->unicode() == '}')) + const TQChar * prev = c - 1; + if((prev->tqunicode() == ']') || (prev->tqunicode() == '}')) { // array or hash count c++; @@ -653,19 +653,19 @@ int KviScriptSyntaxHighlighter::highlightParagraph(const QString &text,int endSt } } // comment until the end of the line - while(c->unicode())c++; + while(c->tqunicode())c++; setFormat(pBegin - pBuf,c - pBegin,g_fntNormal,g_clrComment); continue; } - if(c->unicode() == '/') + if(c->tqunicode() == '/') { c++; - if(c->unicode() == '/') + if(c->tqunicode() == '/') { - while(c->unicode())c++; + while(c->tqunicode())c++; setFormat(pBegin - pBuf,c - pBegin,g_fntNormal,g_clrComment); continue; - } else if(c->unicode() == '*') + } else if(c->tqunicode() == '*') { c++; setFormat(pBegin - pBuf,c - pBegin,g_fntNormal,g_clrComment); @@ -674,40 +674,40 @@ int KviScriptSyntaxHighlighter::highlightParagraph(const QString &text,int endSt } c--; } - if(c->unicode() && (c->isLetterOrNumber() || (c->unicode() == '_'))) + if(c->tqunicode() && (c->isLetterOrNumber() || (c->tqunicode() == '_'))) { c++; - while(c->unicode() && (c->isLetterOrNumber() || (c->unicode() == '.') || (c->unicode() == '_') || (c->unicode() == ':')))c++; + while(c->tqunicode() && (c->isLetterOrNumber() || (c->tqunicode() == '.') || (c->tqunicode() == '_') || (c->tqunicode() == ':')))c++; setFormat(pBegin - pBuf,c - pBegin,g_fntNormal,g_clrKeyword); // special processing for callbacks and magic commands - if(pBegin->unicode() == 'e') + if(pBegin->tqunicode() == 'e') { if(c - pBegin == 4) { // might be "else" - QString tmp(pBegin,4); + TQString tmp(pBegin,4); if(tmp.lower() == "else")bNewCommand = true; continue; } } else - if(pBegin->unicode() == 'f') + if(pBegin->tqunicode() == 'f') { if(c - pBegin == 8) { // might be "function" - QString tmp(pBegin,8); + TQString tmp(pBegin,8); if(tmp.lower() == "function")bNewCommand = true; continue; } } - if(pBegin->unicode() == 'i') + if(pBegin->tqunicode() == 'i') { if(c - pBegin == 8) { // might be "internal" - QString tmp(pBegin,8); + TQString tmp(pBegin,8); if(tmp.lower() == "internal")bNewCommand = true; continue; } @@ -717,28 +717,28 @@ int KviScriptSyntaxHighlighter::highlightParagraph(const QString &text,int endSt continue; } } - if(c->unicode() == '$') + if(c->tqunicode() == '$') { c++; - if(c->unicode() == '$') + if(c->tqunicode() == '$') { c++; setFormat(pBegin - pBuf,c - pBegin,g_fntNormal,g_clrKeyword); } else { - while(c->unicode() && (c->isLetterOrNumber() || (c->unicode() == '.') || (c->unicode() == '_') || (c->unicode() == ':')))c++; + while(c->tqunicode() && (c->isLetterOrNumber() || (c->tqunicode() == '.') || (c->tqunicode() == '_') || (c->tqunicode() == ':')))c++; setFormat(pBegin - pBuf,c - pBegin,g_fntNormal,g_clrFunction); } continue; } - if(c->unicode() == '-') + if(c->tqunicode() == '-') { - QChar * pTmp =(QChar *) c; + TQChar * pTmp =(TQChar *) c; c++; - if(c->unicode() == '-') c++; + if(c->tqunicode() == '-') c++; if(c->isLetter()) { - while(c->unicode() && (c->isLetterOrNumber() || (c->unicode() == '_')))c++; + while(c->tqunicode() && (c->isLetterOrNumber() || (c->tqunicode() == '_')))c++; setFormat(pBegin - pBuf,c - pBegin,g_fntNormal,g_clrKeyword); continue; } else { @@ -746,52 +746,52 @@ int KviScriptSyntaxHighlighter::highlightParagraph(const QString &text,int endSt } } - if(c->unicode() == '%') + if(c->tqunicode() == '%') { c++; - if(c->unicode() && (c->isLetterOrNumber() || (c->unicode() == ':') || (c->unicode() == '_'))) + if(c->tqunicode() && (c->isLetterOrNumber() || (c->tqunicode() == ':') || (c->tqunicode() == '_'))) { - while(c->unicode() && (c->isLetterOrNumber() || (c->unicode() == ':') || (c->unicode() == '_')))c++; + while(c->tqunicode() && (c->isLetterOrNumber() || (c->tqunicode() == ':') || (c->tqunicode() == '_')))c++; setFormat(pBegin - pBuf,c - pBegin,g_fntNormal,g_clrVariable); continue; } c--; } - if(!c->unicode())continue; + if(!c->tqunicode())continue; - if(c->isLetterOrNumber() || c->unicode() == '_') + if(c->isLetterOrNumber() || c->tqunicode() == '_') { c++; - while(c->unicode() && c->isLetterOrNumber() || (c->unicode() == '_'))c++; + while(c->tqunicode() && c->isLetterOrNumber() || (c->tqunicode() == '_'))c++; setFormat(pBegin - pBuf,c - pBegin,g_fntNormal,g_clrNormalText); continue; } - if(c->unicode() == '\\') + if(c->tqunicode() == '\\') { c++; setFormat(pBegin - pBuf,c - pBegin,g_fntNormal,g_clrPunctuation); // the next char is to be interpreted as normal text pBegin = c; - if(c->unicode() && (c->unicode() != '\n')) + if(c->tqunicode() && (c->tqunicode() != '\n')) { c++; setFormat(pBegin - pBuf,c - pBegin,g_fntNormal,g_clrNormalText); continue; } - // this is never returned since Qt sux in string processing + // this is never returned since TQt sux in string processing // it sets the newlines to spaces and we have no secure way to undestand that this was the end of a line return IN_LINE; } - if(c->unicode() == '"') + if(c->tqunicode() == '"') { bInString = !bInString; c++; setFormat(pBegin - pBuf,c - pBegin,g_fntNormal,g_clrPunctuation); continue; - } else if(c->unicode() == ';') + } else if(c->tqunicode() == ';') { if(!bInString) bNewCommand = true; // the next will be a new command } @@ -806,13 +806,13 @@ int KviScriptSyntaxHighlighter::highlightParagraph(const QString &text,int endSt } bool i=TRUE; - QString szFind=((KviScriptEditorWidget *)textEdit())->m_szFind; + TQString szFind=((KviScriptEditorWidget *)textEdit())->m_szFind; if (!szFind.isEmpty()) { int index=0; while (i) { - index=text.find(szFind,index,false); + index=text.tqfind(szFind,index,false); if (index != -1) { setFormat(index,szFind.length(),g_clrFind); @@ -838,17 +838,17 @@ int KviScriptSyntaxHighlighter::highlightParagraph(const QString &text,int endSt //==30299== or possible Valgrind bug. This message is only shown 3 times. -KviScriptEditorImplementation::KviScriptEditorImplementation(QWidget * par) +KviScriptEditorImplementation::KviScriptEditorImplementation(TQWidget * par) :KviScriptEditor(par) { if(g_pScriptEditorWindowList->isEmpty())loadOptions(); g_pScriptEditorWindowList->append(this); - m_lastCursorPos=QPoint(0,0); - QGridLayout * g = new QGridLayout(this,2,3,0,0); + m_lastCursorPos=TQPoint(0,0); + TQGridLayout * g = new TQGridLayout(this,2,3,0,0); - m_pFindLineedit = new QLineEdit(" ",this); + m_pFindLineedit = new TQLineEdit(" ",this); #ifndef COMPILE_USE_QT4 - m_pFindLineedit->setFrameStyle(QFrame::Sunken | QFrame::Panel); + m_pFindLineedit->setFrameStyle(TQFrame::Sunken | TQFrame::Panel); #endif m_pFindLineedit->setText(""); m_pFindLineedit->setPaletteForegroundColor(g_clrFind); @@ -858,39 +858,39 @@ KviScriptEditorImplementation::KviScriptEditorImplementation(QWidget * par) g->setRowStretch(0,1); #ifdef COMPILE_USE_QT4 - QToolButton * b = new QToolButton(Qt::DownArrow,this,"dsa2"); + TQToolButton * b = new TQToolButton(TQt::DownArrow,this,"dsa2"); #else - QToolButton * b = new QToolButton(DownArrow,this); + TQToolButton * b = new TQToolButton(DownArrow,this); #endif b->setMinimumWidth(24); g->addWidget(b,1,0); KviTalPopupMenu * pop = new KviTalPopupMenu(b); - pop->insertItem(__tr2qs_ctx("&Open...","editor"),this,SLOT(loadFromFile())); - pop->insertItem(__tr2qs_ctx("&Save As...","editor"),this,SLOT(saveToFile())); + pop->insertItem(__tr2qs_ctx("&Open...","editor"),this,TQT_SLOT(loadFromFile())); + pop->insertItem(__tr2qs_ctx("&Save As...","editor"),this,TQT_SLOT(saveToFile())); pop->insertSeparator(); - pop->insertItem(__tr2qs_ctx("&Configure Editor...","editor"),this,SLOT(configureColors())); + pop->insertItem(__tr2qs_ctx("&Configure Editor...","editor"),this,TQT_SLOT(configureColors())); b->setPopup(pop); b->setPopupDelay(1); g->setColStretch(1,1); g->setColStretch(2,10); g->addWidget(m_pFindLineedit,1,2); - QLabel *lab= new QLabel("find",this); + TQLabel *lab= new TQLabel("tqfind",this); lab->setText(tr("Find")); g->addWidget(lab,1,1); - m_pRowColLabel = new QLabel("0",this); - m_pRowColLabel->setFrameStyle(QFrame::Sunken | QFrame::Panel); + m_pRowColLabel = new TQLabel("0",this); + m_pRowColLabel->setFrameStyle(TQFrame::Sunken | TQFrame::Panel); m_pRowColLabel->setMinimumWidth(80); g->addWidget(m_pRowColLabel,1,3); - connect(m_pFindLineedit,SIGNAL(returnPressed()),m_pEditor,SLOT(slotFind())); - connect(m_pFindLineedit,SIGNAL(returnPressed()),this,SLOT(slotFind())); - connect(m_pEditor,SIGNAL(keyPressed()),this,SLOT(updateRowColLabel())); - connect(m_pEditor,SIGNAL(textChanged()),this,SLOT(updateRowColLabel())); - connect(m_pEditor,SIGNAL(selectionChanged()),this,SLOT(updateRowColLabel())); - m_lastCursorPos = QPoint(-1,-1); + connect(m_pFindLineedit,TQT_SIGNAL(returnPressed()),m_pEditor,TQT_SLOT(slotFind())); + connect(m_pFindLineedit,TQT_SIGNAL(returnPressed()),this,TQT_SLOT(slotFind())); + connect(m_pEditor,TQT_SIGNAL(keyPressed()),this,TQT_SLOT(updateRowColLabel())); + connect(m_pEditor,TQT_SIGNAL(textChanged()),this,TQT_SLOT(updateRowColLabel())); + connect(m_pEditor,TQT_SIGNAL(selectionChanged()),this,TQT_SLOT(updateRowColLabel())); + m_lastCursorPos = TQPoint(-1,-1); } KviScriptEditorImplementation::~KviScriptEditorImplementation() @@ -901,22 +901,22 @@ KviScriptEditorImplementation::~KviScriptEditorImplementation() void KviScriptEditorImplementation::loadOptions() { - QString tmp; + TQString tmp; g_pEditorModulePointer->getDefaultConfigFileName(tmp); KviConfig cfg(tmp,KviConfig::Read); - g_clrBackground = cfg.readColorEntry("Background",QColor(0,0,0));; - g_clrNormalText = cfg.readColorEntry("NormalText",QColor(100,255,0)); - g_clrBracket = cfg.readColorEntry("Bracket",QColor(255,0,0)); - g_clrComment = cfg.readColorEntry("Comment",QColor(0,120,0)); - g_clrFunction = cfg.readColorEntry("Function",QColor(255,255,0)); - g_clrKeyword = cfg.readColorEntry("Keyword",QColor(120,120,150)); - g_clrVariable = cfg.readColorEntry("Variable",QColor(200,200,200)); - g_clrPunctuation = cfg.readColorEntry("Punctuation",QColor(180,180,0)); - g_clrFind = cfg.readColorEntry("Find",QColor(255,0,0)); - - g_fntNormal = cfg.readFontEntry("Font",QFont("Fixed",12)); + g_clrBackground = cfg.readColorEntry("Background",TQColor(0,0,0));; + g_clrNormalText = cfg.readColorEntry("NormalText",TQColor(100,255,0)); + g_clrBracket = cfg.readColorEntry("Bracket",TQColor(255,0,0)); + g_clrComment = cfg.readColorEntry("Comment",TQColor(0,120,0)); + g_clrFunction = cfg.readColorEntry("Function",TQColor(255,255,0)); + g_clrKeyword = cfg.readColorEntry("Keyword",TQColor(120,120,150)); + g_clrVariable = cfg.readColorEntry("Variable",TQColor(200,200,200)); + g_clrPunctuation = cfg.readColorEntry("Punctuation",TQColor(180,180,0)); + g_clrFind = cfg.readColorEntry("Find",TQColor(255,0,0)); + + g_fntNormal = cfg.readFontEntry("Font",TQFont("Fixed",12)); } bool KviScriptEditorImplementation::isModified() @@ -926,25 +926,25 @@ bool KviScriptEditorImplementation::isModified() void KviScriptEditorImplementation::slotFind() { - emit find(m_pFindLineedit->text()); + emit tqfind(m_pFindLineedit->text()); } -void KviScriptEditorImplementation::slotNextFind(const QString &text) +void KviScriptEditorImplementation::slotNextFind(const TQString &text) { -// emit nextFind(const QString &text); +// emit nextFind(const TQString &text); }void KviScriptEditorImplementation::slotInitFind() { emit initFind(); } -void KviScriptEditorImplementation::slotReplaceAll(const QString &txt,const QString &txt1) +void KviScriptEditorImplementation::slotReplaceAll(const TQString &txt,const TQString &txt1) { emit replaceAll(txt,txt1); } void KviScriptEditorImplementation::saveOptions() { - QString tmp; + TQString tmp; g_pEditorModulePointer->getDefaultConfigFileName(tmp); KviConfig cfg(tmp,KviConfig::Write); @@ -968,7 +968,7 @@ void KviScriptEditorImplementation::setFocus() -void KviScriptEditorImplementation::focusInEvent(QFocusEvent *) +void KviScriptEditorImplementation::focusInEvent(TQFocusEvent *) { m_pEditor->setFocus(); } @@ -976,38 +976,38 @@ void KviScriptEditorImplementation::focusInEvent(QFocusEvent *) void KviScriptEditorImplementation::setEnabled(bool bEnabled) { - QWidget::setEnabled(bEnabled); + TQWidget::setEnabled(bEnabled); m_pEditor->setEnabled(bEnabled); m_pRowColLabel->setEnabled(bEnabled); } void KviScriptEditorImplementation::saveToFile() { - QString fName; + TQString fName; if(KviFileDialog::askForSaveFileName(fName, __tr2qs_ctx("Choose a Filename - KVIrc","editor"), - QString::null, - QString::null,false,true,true)) + TQString(), + TQString(),false,true,true)) { - QString buffer = m_pEditor->text(); + TQString buffer = m_pEditor->text(); //if(tmp.isEmpty())tmp = ""; //KviStr buffer = tmp.utf8().data(); if(!KviFileUtils::writeFile(fName,buffer)) { - QString tmp; - QMessageBox::warning(this, + TQString tmp; + TQMessageBox::warning(this, __tr2qs_ctx("Save Failed - KVIrc","editor"), - KviQString::sprintf(tmp,__tr2qs_ctx("Can't open the file %s for writing.","editor"),&fName)); + KviTQString::sprintf(tmp,__tr2qs_ctx("Can't open the file %s for writing.","editor"),&fName)); } } } -void KviScriptEditorImplementation::setText(const KviQCString &txt) +void KviScriptEditorImplementation::setText(const KviTQCString &txt) { m_pEditor->setText(txt.data()); #ifdef COMPILE_USE_QT4 - m_pEditor->setTextFormat(Qt::PlainText); + m_pEditor->setTextFormat(TQt::PlainText); #else m_pEditor->setTextFormat(KviTalTextEdit::PlainText); #endif @@ -1016,19 +1016,19 @@ void KviScriptEditorImplementation::setText(const KviQCString &txt) updateRowColLabel(); } -void KviScriptEditorImplementation::getText(KviQCString &txt) +void KviScriptEditorImplementation::getText(KviTQCString &txt) { txt = m_pEditor->text(); } -QLineEdit * KviScriptEditorImplementation::getFindlineedit() +TQLineEdit * KviScriptEditorImplementation::getFindlineedit() { return m_pFindLineedit; } -void KviScriptEditorImplementation::setText(const QString &txt) +void KviScriptEditorImplementation::setText(const TQString &txt) { m_pEditor->setText(txt); #ifdef COMPILE_USE_QT4 - m_pEditor->setTextFormat(Qt::PlainText); + m_pEditor->setTextFormat(TQt::PlainText); #else m_pEditor->setTextFormat(KviTalTextEdit::PlainText); #endif @@ -1037,11 +1037,11 @@ void KviScriptEditorImplementation::setText(const QString &txt) updateRowColLabel(); } -void KviScriptEditorImplementation::getText(QString &txt) +void KviScriptEditorImplementation::getText(TQString &txt) { txt = m_pEditor->text(); } -void KviScriptEditorImplementation::setFindText(const QString &txt) +void KviScriptEditorImplementation::setFindText(const TQString &txt) { m_pFindLineedit->setText(txt); m_pEditor->slotFind(); @@ -1061,24 +1061,24 @@ void KviScriptEditorImplementation::updateRowColLabel() m_pEditor->getCursorPosition(&iRow,&iCol); if(iRow != m_lastCursorPos.x() || iCol != m_lastCursorPos.y()) { - m_lastCursorPos = QPoint(iRow,iCol); - QString tmp; - KviQString::sprintf(tmp,__tr2qs_ctx("Row: %d Col: %d","editor"),iRow,iCol); + m_lastCursorPos = TQPoint(iRow,iCol); + TQString tmp; + KviTQString::sprintf(tmp,__tr2qs_ctx("Row: %d Col: %d","editor"),iRow,iCol); m_pRowColLabel->setText(tmp); } } -QPoint KviScriptEditorImplementation::getCursor() +TQPoint KviScriptEditorImplementation::getCursor() { return m_lastCursorPos; } -void KviScriptEditorImplementation::setCursorPosition(QPoint pos) +void KviScriptEditorImplementation::setCursorPosition(TQPoint pos) { m_pEditor->setCursorPosition(pos.x(),pos.y()); m_pEditor->setFocus(); m_pEditor->ensureCursorVisible(); - QString tmp; - KviQString::sprintf(tmp,__tr2qs_ctx("Row: %d Col: %d","editor"),pos.x(),pos.y()); + TQString tmp; + KviTQString::sprintf(tmp,__tr2qs_ctx("Row: %d Col: %d","editor"),pos.x(),pos.y()); m_pRowColLabel->setText(tmp); m_lastCursorPos=pos; @@ -1086,23 +1086,23 @@ void KviScriptEditorImplementation::setCursorPosition(QPoint pos) void KviScriptEditorImplementation::loadFromFile() { - QString fName; + TQString fName; if(KviFileDialog::askForOpenFileName(fName, __tr2qs_ctx("Load Script File - KVIrc","editor"), - QString::null, - QString::null,false,true)) + TQString(), + TQString(),false,true)) { - QString buffer; + TQString buffer; if(KviFileUtils::loadFile(fName,buffer)) { m_pEditor->setText(buffer); m_pEditor->moveCursor(KviTalTextEdit::MoveEnd,false); updateRowColLabel(); } else { - QString tmp; - QMessageBox::warning(this, + TQString tmp; + TQMessageBox::warning(this, __tr2qs_ctx("Open Failed - KVIrc","editor"), - KviQString::sprintf(tmp,__tr2qs_ctx("Can't open the file %s for reading.","editor"),&fName)); + KviTQString::sprintf(tmp,__tr2qs_ctx("Can't open the file %s for reading.","editor"),&fName)); } } } @@ -1110,87 +1110,87 @@ void KviScriptEditorImplementation::loadFromFile() void KviScriptEditorImplementation::configureColors() { KviScriptEditorWidgetColorOptions dlg(this); - if(dlg.exec() == QDialog::Accepted) + if(dlg.exec() == TQDialog::Accepted) { m_pEditor->updateOptions(); saveOptions(); } } -KviScriptEditorReplaceDialog::KviScriptEditorReplaceDialog( QWidget* parent, const char* name) - : QDialog( parent) +KviScriptEditorReplaceDialog::KviScriptEditorReplaceDialog( TQWidget* tqparent, const char* name) + : TQDialog( tqparent) { - m_pParent=parent; + m_pParent=tqparent; emit initFind(); - setPaletteForegroundColor( QColor( 0, 0, 0 ) ); - setPaletteBackgroundColor( QColor( 236, 233, 216 ) ); - QGridLayout *layout = new QGridLayout( this, 1, 1, 11, 6, "replace layout"); + setPaletteForegroundColor( TQColor( 0, 0, 0 ) ); + setPaletteBackgroundColor( TQColor( 236, 233, 216 ) ); + TQGridLayout *tqlayout = new TQGridLayout( this, 1, 1, 11, 6, "replace tqlayout"); - m_pFindlineedit = new QLineEdit( this, "findlineedit" ); + m_pFindlineedit = new TQLineEdit( this, "findlineedit" ); #ifndef COMPILE_USE_QT4 - m_pFindlineedit->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, m_pFindlineedit->sizePolicy().hasHeightForWidth() ) ); - m_pFindlineedit->setFrameShape( QLineEdit::LineEditPanel ); - m_pFindlineedit->setFrameShadow( QLineEdit::Sunken ); + m_pFindlineedit->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)0, 0, 0, m_pFindlineedit->sizePolicy().hasHeightForWidth() ) ); + m_pFindlineedit->setFrameShape( TQLineEdit::LineEditPanel ); + m_pFindlineedit->setFrameShadow( TQLineEdit::Sunken ); #endif - layout->addMultiCellWidget( m_pFindlineedit, 2, 2, 1, 2 ); + tqlayout->addMultiCellWidget( m_pFindlineedit, 2, 2, 1, 2 ); - m_pReplacelineedit = new QLineEdit( this, "replacelineedit" ); + m_pReplacelineedit = new TQLineEdit( this, "replacelineedit" ); #ifndef COMPILE_USE_QT4 - m_pReplacelineedit->setFrameShape( QLineEdit::LineEditPanel ); - m_pReplacelineedit->setFrameShadow( QLineEdit::Sunken ); + m_pReplacelineedit->setFrameShape( TQLineEdit::LineEditPanel ); + m_pReplacelineedit->setFrameShadow( TQLineEdit::Sunken ); #endif - layout->addMultiCellWidget( m_pReplacelineedit, 3, 3, 1, 2 ); + tqlayout->addMultiCellWidget( m_pReplacelineedit, 3, 3, 1, 2 ); m_pFindlineedit->setFocus(); - QLabel *findlabel = new QLabel( this, "findlabel" ); + TQLabel *findlabel = new TQLabel( this, "findlabel" ); findlabel->setText(tr("Word to Find")); #ifndef COMPILE_USE_QT4 findlabel->setAutoResize(true); #endif - layout->addWidget( findlabel, 2, 0 ); + tqlayout->addWidget( findlabel, 2, 0 ); - QLabel *replacelabel = new QLabel( this, "replacelabel" ); + TQLabel *replacelabel = new TQLabel( this, "replacelabel" ); replacelabel->setText(tr("Replace with")); #ifndef COMPILE_USE_QT4 replacelabel->setAutoResize(true); #endif - layout->addWidget( replacelabel, 3, 0 ); + tqlayout->addWidget( replacelabel, 3, 0 ); - QPushButton *cancelbutton = new QPushButton( this, "cancelButton" ); + TQPushButton *cancelbutton = new TQPushButton( this, "cancelButton" ); cancelbutton->setText(tr("&Cancel")); - layout->addWidget( cancelbutton, 5, 2 ); + tqlayout->addWidget( cancelbutton, 5, 2 ); - replacebutton = new QPushButton( this, "replacebutton" ); + replacebutton = new TQPushButton( this, "replacebutton" ); replacebutton->setText(tr("&Replace")); replacebutton->setEnabled( FALSE ); - layout->addWidget( replacebutton, 5, 0 ); + tqlayout->addWidget( replacebutton, 5, 0 ); checkReplaceAll = new KviStyledCheckBox( this, "replaceAll" ); checkReplaceAll->setText(tr("&Replace in all Aliases")); - layout->addWidget( checkReplaceAll, 4, 0 ); + tqlayout->addWidget( checkReplaceAll, 4, 0 ); - findNext = new QPushButton(this, "findNext(WIP)" ); + findNext = new TQPushButton(this, "findNext(WIP)" ); findNext->setText(tr("&Findnext")); - layout->addWidget( findNext, 2, 3 ); + tqlayout->addWidget( findNext, 2, 3 ); findNext->setEnabled(false); - replace = new QPushButton(this, "replace" ); - replace->setText(tr("&Replace(WIP)")); - layout->addWidget( replace, 3, 3 ); - replace->setEnabled(false); + tqreplace = new TQPushButton(this, "tqreplace" ); + tqreplace->setText(tr("&Replace(WIP)")); + tqlayout->addWidget( tqreplace, 3, 3 ); + tqreplace->setEnabled(false); #ifndef COMPILE_USE_QT4 clearWState( WState_Polished ); setTabOrder(m_pFindlineedit,m_pReplacelineedit); #endif // signals and slots connections - connect( replacebutton, SIGNAL( clicked() ), this, SLOT( slotReplace() ) ); - connect( findNext, SIGNAL( clicked() ),this,SLOT( slotNextFind())); - connect( cancelbutton, SIGNAL( clicked() ), this, SLOT( reject() ) ); - connect( m_pFindlineedit, SIGNAL( textChanged(const QString &)), this, SLOT( textChanged(const QString &))); + connect( replacebutton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotReplace() ) ); + connect( findNext, TQT_SIGNAL( clicked() ),this,TQT_SLOT( slotNextFind())); + connect( cancelbutton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( reject() ) ); + connect( m_pFindlineedit, TQT_SIGNAL( textChanged(const TQString &)), this, TQT_SLOT( textChanged(const TQString &))); } @@ -1199,7 +1199,7 @@ KviScriptEditorReplaceDialog::~KviScriptEditorReplaceDialog() { } -void KviScriptEditorReplaceDialog::textChanged(const QString &txt) +void KviScriptEditorReplaceDialog::textChanged(const TQString &txt) { if (!txt.isEmpty()) replacebutton->setEnabled(TRUE); else replacebutton->setEnabled(FALSE); @@ -1207,9 +1207,9 @@ void KviScriptEditorReplaceDialog::textChanged(const QString &txt) } void KviScriptEditorReplaceDialog::slotReplace() { - QString txt=((KviScriptEditorWidget *)m_pParent)->text(); + TQString txt=((KviScriptEditorWidget *)m_pParent)->text(); if (checkReplaceAll->isChecked()) emit replaceAll(m_pFindlineedit->text(),m_pReplacelineedit->text()); - txt.replace(m_pFindlineedit->text(),m_pReplacelineedit->text(),false); + txt.tqreplace(m_pFindlineedit->text(),m_pReplacelineedit->text(),false); ((KviScriptEditorWidget *)m_pParent)->setText(txt); ((KviScriptEditorWidget *)m_pParent)->setModified(true); m_pFindlineedit->setText(""); diff --git a/src/modules/editor/scripteditor.h b/src/modules/editor/scripteditor.h index d7bc435f..f37c7ab2 100644 --- a/src/modules/editor/scripteditor.h +++ b/src/modules/editor/scripteditor.h @@ -27,13 +27,13 @@ #include "kvi_scripteditor.h" -#include +#include #include -#include -#include -#include +#include +#include +#include #include "kvi_tal_listbox.h" -#include +#include #include "kvi_qcstring.h" #include "kvi_tal_popupmenu.h" @@ -45,110 +45,114 @@ typedef KviPointerList ColumnList; class KviCompletionBox: public KviTalListBox { Q_OBJECT + TQ_OBJECT public: - KviCompletionBox(QWidget * parent); + KviCompletionBox(TQWidget * tqparent); ~KviCompletionBox(){}; - void updateContents(QString word); + void updateContents(TQString word); protected: - virtual void keyPressEvent(QKeyEvent * e); + virtual void keyPressEvent(TQKeyEvent * e); }; class KviScriptEditorWidget : public KviTalTextEdit { Q_OBJECT - Q_PROPERTY(bool contextSensitiveHelp READ contextSensitiveHelp) + TQ_OBJECT + TQ_PROPERTY(bool contextSensitiveHelp READ contextSensitiveHelp) public: - KviScriptEditorWidget(QWidget * pParent); + KviScriptEditorWidget(TQWidget * pParent); virtual ~KviScriptEditorWidget(); public: void updateOptions(); - void find1(); - QString m_szFind; + void tqfind1(); + TQString m_szFind; KviCompletionBox *completelistbox; void completition(bool bCanComplete = 1); - void getWordBeforeCursor(QString &buffer,int index,bool *); - void getWordOnCursor(QString &buffer,int index) const; + void getWordBeforeCursor(TQString &buffer,int index,bool *); + void getWordOnCursor(TQString &buffer,int index) const; bool contextSensitiveHelp() const; public slots: void slotFind(); void slotHelp(); void slotReplace(); - void slotComplete(const QString &str); + void slotComplete(const TQString &str); signals: void keyPressed(); protected: - virtual void keyPressEvent(QKeyEvent * e); - void contentsMousePressEvent(QMouseEvent *); + virtual void keyPressEvent(TQKeyEvent * e); + void contentsMousePressEvent(TQMouseEvent *); #ifdef COMPILE_USE_QT4 - Q3PopupMenu *createPopupMenu( const QPoint& pos ); + Q3PopupMenu *createPopupMenu( const TQPoint& pos ); #else - QPopupMenu *createPopupMenu( const QPoint& pos ); + TQPopupMenu *createPopupMenu( const TQPoint& pos ); #endif - QWidget *m_pParent; - QString m_szHelp; + TQWidget *m_pParent; + TQString m_szHelp; }; #ifdef COMPILE_USE_QT4 - #include - #define QSyntaxHighlighter Q3SyntaxHighlighter + #include + #define TQSyntaxHighlighter Q3SyntaxHighlighter #else - #include + #include #endif -class KviScriptSyntaxHighlighter : public QSyntaxHighlighter +class KviScriptSyntaxHighlighter : public TQSyntaxHighlighter { public: KviScriptSyntaxHighlighter(KviScriptEditorWidget * pWidget); virtual ~KviScriptSyntaxHighlighter(); public: - virtual int highlightParagraph(const QString & text,int endStateOfLastPara); + virtual int highlightParagraph(const TQString & text,int endStateOfLastPara); }; -class KviScriptEditorWidgetColorOptions : public QDialog +class KviScriptEditorWidgetColorOptions : public TQDialog { Q_OBJECT + TQ_OBJECT public: - KviScriptEditorWidgetColorOptions(QWidget * pParent); + KviScriptEditorWidgetColorOptions(TQWidget * pParent); ~KviScriptEditorWidgetColorOptions(); private: KviPointerList * m_pSelectorInterfaceList; protected: - KviColorSelector * addColorSelector(QWidget * pParent,const QString & txt,QColor * pOption,bool bEnabled); + KviColorSelector * addColorSelector(TQWidget * pParent,const TQString & txt,TQColor * pOption,bool bEnabled); protected slots: void okClicked(); }; -class QTimer; +class TQTimer; class KviScriptEditorImplementation : public KviScriptEditor { Q_OBJECT + TQ_OBJECT public: - KviScriptEditorImplementation(QWidget * par); + KviScriptEditorImplementation(TQWidget * par); virtual ~KviScriptEditorImplementation(); protected: KviScriptEditorWidget * m_pEditor; - QLabel * m_pRowColLabel; - QPoint m_lastCursorPos; + TQLabel * m_pRowColLabel; + TQPoint m_lastCursorPos; public: - virtual void setText(const QString &txt); - virtual void getText(QString &txt); - virtual void setText(const KviQCString &txt); - virtual void getText(KviQCString &txt); - virtual void setFindText(const QString & text); + virtual void setText(const TQString &txt); + virtual void getText(TQString &txt); + virtual void setText(const KviTQCString &txt); + virtual void getText(KviTQCString &txt); + virtual void setFindText(const TQString & text); virtual void setEnabled(bool bEnabled); virtual void setFocus(); virtual bool isModified(); void setFindLineeditReadOnly(bool b); - void setCursorPosition(QPoint); - QPoint getCursor(); - QLineEdit *m_pFindlineedit; - QLineEdit * getFindlineedit(); + void setCursorPosition(TQPoint); + TQPoint getCursor(); + TQLineEdit *m_pFindlineedit; + TQLineEdit * getFindlineedit(); protected: - virtual void focusInEvent(QFocusEvent *e); + virtual void focusInEvent(TQFocusEvent *e); void loadOptions(); void saveOptions(); protected slots: @@ -157,42 +161,43 @@ protected slots: void configureColors(); void updateRowColLabel(); void slotFind(); - void slotReplaceAll(const QString &,const QString &); + void slotReplaceAll(const TQString &,const TQString &); void slotInitFind(); - void slotNextFind(const QString &); + void slotNextFind(const TQString &); signals: - void find( const QString &); - void replaceAll( const QString &, const QString &); + void tqfind( const TQString &); + void replaceAll( const TQString &, const TQString &); void initFind(); - void nextFind(const QString &); + void nextFind(const TQString &); }; -class KviScriptEditorReplaceDialog: public QDialog +class KviScriptEditorReplaceDialog: public TQDialog { Q_OBJECT + TQ_OBJECT public: - KviScriptEditorReplaceDialog( QWidget* parent = 0, const char* name = 0); + KviScriptEditorReplaceDialog( TQWidget* tqparent = 0, const char* name = 0); ~KviScriptEditorReplaceDialog(); - QLineEdit *m_pFindlineedit; - QLineEdit *m_pReplacelineedit; + TQLineEdit *m_pFindlineedit; + TQLineEdit *m_pReplacelineedit; protected: - QLabel *findlabel; - QLabel *replacelabel; - QPushButton *replacebutton; - QPushButton *replace; - QPushButton *findNext; + TQLabel *findlabel; + TQLabel *replacelabel; + TQPushButton *replacebutton; + TQPushButton *tqreplace; + TQPushButton *findNext; -// QPushButton *cancelbutton; +// TQPushButton *cancelbutton; KviStyledCheckBox *checkReplaceAll; - QWidget *m_pParent; + TQWidget *m_pParent; protected slots: - void textChanged(const QString &); + void textChanged(const TQString &); void slotReplace(); void slotNextFind(); signals: - void replaceAll( const QString &,const QString &); + void replaceAll( const TQString &,const TQString &); void initFind(); - void nextFind(const QString &); + void nextFind(const TQString &); }; diff --git a/src/modules/eventeditor/eventeditor.cpp b/src/modules/eventeditor/eventeditor.cpp index bedeca5f..b425319e 100644 --- a/src/modules/eventeditor/eventeditor.cpp +++ b/src/modules/eventeditor/eventeditor.cpp @@ -39,38 +39,38 @@ #include "kvi_kvs_eventmanager.h" -#include +#include -#include -#include +#include +#include #include "kvi_tal_vbox.h" #include "kvi_tal_popupmenu.h" -#include -#include -#include +#include +#include +#include extern KviEventEditorWindow * g_pEventEditorWindow; -const QPixmap * KviEventListViewItem::pixmap(int col) const +const TQPixmap * KviEventListViewItem::pixmap(int col) const { return g_pIconManager->getSmallIcon(firstChild() ? KVI_SMALLICON_EVENT : KVI_SMALLICON_EVENTNOHANDLERS); } -const QPixmap * KviEventHandlerListViewItem::pixmap(int col) const +const TQPixmap * KviEventHandlerListViewItem::pixmap(int col) const { return g_pIconManager->getSmallIcon(m_bEnabled ? KVI_SMALLICON_HANDLER : KVI_SMALLICON_HANDLERDISABLED); } -KviEventEditor::KviEventEditor(QWidget * par) -: QWidget(par,"event_editor") +KviEventEditor::KviEventEditor(TQWidget * par) +: TQWidget(par,"event_editor") { - QGridLayout * l = new QGridLayout(this,1,1,2,2); + TQGridLayout * l = new TQGridLayout(this,1,1,2,2); - QSplitter * spl = new QSplitter(Qt::Horizontal,this); + TQSplitter * spl = new TQSplitter(Qt::Horizontal,this); spl->setOpaqueResize(false); l->addWidget(spl,0,0); @@ -82,12 +82,12 @@ KviEventEditor::KviEventEditor(QWidget * par) m_pListView->setShowSortIndicator(true); m_pListView->setRootIsDecorated(true); - QPushButton * pb = new QPushButton(__tr2qs("&Export All To..."),boxi); - connect(pb,SIGNAL(clicked()),this,SLOT(exportAllEvents())); + TQPushButton * pb = new TQPushButton(__tr2qs("&Export All To..."),boxi); + connect(pb,TQT_SIGNAL(clicked()),this,TQT_SLOT(exportAllEvents())); KviTalVBox * box = new KviTalVBox(spl); - m_pNameEditor = new QLineEdit(box); - QToolTip::add(m_pNameEditor,__tr2qs("Edit the event handler name.")); + m_pNameEditor = new TQLineEdit(box); + TQToolTip::add(m_pNameEditor,__tr2qs("Edit the event handler name.")); m_pEditor = KviScriptEditor::createInstance(box); m_pEditor->setFocus(); @@ -129,56 +129,56 @@ void KviEventEditor::oneTimeSetup() m_pContextPopup = new KviTalPopupMenu(this); - connect(m_pListView,SIGNAL(selectionChanged(KviTalListViewItem *)),this,SLOT(selectionChanged(KviTalListViewItem *))); - connect(m_pListView,SIGNAL(rightButtonPressed(KviTalListViewItem *,const QPoint &,int)), - this,SLOT(itemPressed(KviTalListViewItem *,const QPoint &,int))); + connect(m_pListView,TQT_SIGNAL(selectionChanged(KviTalListViewItem *)),this,TQT_SLOT(selectionChanged(KviTalListViewItem *))); + connect(m_pListView,TQT_SIGNAL(rightButtonPressed(KviTalListViewItem *,const TQPoint &,int)), + this,TQT_SLOT(itemPressed(KviTalListViewItem *,const TQPoint &,int))); } -void KviEventEditor::itemPressed(KviTalListViewItem *it,const QPoint &pnt,int col) +void KviEventEditor::itemPressed(KviTalListViewItem *it,const TQPoint &pnt,int col) { __range_valid(m_bOneTimeSetupDone); if(it) { m_pContextPopup->clear(); - if(it->parent()) + if(it->tqparent()) { - QString tmp; + TQString tmp; if(!(((KviEventHandlerListViewItem *)it)->m_bEnabled)) m_pContextPopup->insertItem( *(g_pIconManager->getSmallIcon(KVI_SMALLICON_HANDLER)), - __tr2qs("&Enable Handler"),this,SLOT(toggleCurrentHandlerEnabled())); + __tr2qs("&Enable Handler"),this,TQT_SLOT(toggleCurrentHandlerEnabled())); else m_pContextPopup->insertItem( *(g_pIconManager->getSmallIcon(KVI_SMALLICON_HANDLERDISABLED)), - __tr2qs("&Disable Handler"),this,SLOT(toggleCurrentHandlerEnabled())); + __tr2qs("&Disable Handler"),this,TQT_SLOT(toggleCurrentHandlerEnabled())); //m_pContextPopup->setItemChecked(id,((KviEventHandlerListViewItem *)it)->m_bEnabled); m_pContextPopup->insertItem( - *(g_pIconManager->getSmallIcon(KVI_SMALLICON_QUIT)), + *(g_pIconManager->getSmallIcon(KVI_SMALLICON_TQUIT)), __tr2qs("Re&move Handler"), - this,SLOT(removeCurrentHandler())); + this,TQT_SLOT(removeCurrentHandler())); m_pContextPopup->insertItem( *(g_pIconManager->getSmallIcon(KVI_SMALLICON_FOLDER)), __tr2qs("&Export Handler To..."), - this,SLOT(exportCurrentHandler())); + this,TQT_SLOT(exportCurrentHandler())); } else { m_pContextPopup->insertItem( *(g_pIconManager->getSmallIcon(KVI_SMALLICON_HANDLER)), __tr2qs("&New Handler"), - this,SLOT(addHandlerForCurrentEvent())); + this,TQT_SLOT(addHandlerForCurrentEvent())); } m_pContextPopup->popup(pnt); } } -void KviEventEditor::getUniqueHandlerName(KviEventListViewItem *it,QString &buffer) +void KviEventEditor::getUniqueHandlerName(KviEventListViewItem *it,TQString &buffer) { __range_valid(m_bOneTimeSetupDone); - QString newName = buffer; + TQString newName = buffer; if(newName.isEmpty())newName = __tr2qs("unnamed"); bool bFound = true; @@ -190,10 +190,10 @@ void KviEventEditor::getUniqueHandlerName(KviEventListViewItem *it,QString &buff for(KviEventHandlerListViewItem * ch = (KviEventHandlerListViewItem *)(it->firstChild());ch;ch = (KviEventHandlerListViewItem *)ch->nextSibling()) { - if(KviQString::equalCI(newName,ch->m_szName)) + if(KviTQString::equalCI(newName,ch->m_szName)) { bFound = true; - KviQString::sprintf(newName,"%Q_%d",&buffer,idx); + KviTQString::sprintf(newName,"%TQ_%d",&buffer,idx); idx++; break; } @@ -210,9 +210,9 @@ void KviEventEditor::addHandlerForCurrentEvent() KviTalListViewItem * it = m_pListView->selectedItem(); if(it) { - if(it->parent() == 0) + if(it->tqparent() == 0) { - QString buffer = __tr2qs("default"); + TQString buffer = __tr2qs("default"); getUniqueHandlerName((KviEventListViewItem *)it,buffer); KviTalListViewItem * ch = new KviEventHandlerListViewItem(it,buffer,"",true); it->setOpen(true); @@ -240,7 +240,7 @@ void KviEventEditor::toggleCurrentHandlerEnabled() if(m_pLastEditedItem) { m_pLastEditedItem->m_bEnabled = !(m_pLastEditedItem->m_bEnabled); - m_pListView->repaintItem(m_pLastEditedItem); + m_pListView->tqrepaintItem(m_pLastEditedItem); selectionChanged(m_pLastEditedItem); } } @@ -255,11 +255,11 @@ void KviEventEditor::commit() { if(it->firstChild()) { - QString szContext; + TQString szContext; for(KviTalListViewItem * ch = it->firstChild();ch;ch = ch->nextSibling()) { - KviQString::sprintf(szContext,"%Q::%Q",&(((KviEventListViewItem *)it)->m_szName),&(((KviEventHandlerListViewItem *)ch)->m_szName)); + KviTQString::sprintf(szContext,"%Q::%Q",&(((KviEventListViewItem *)it)->m_szName),&(((KviEventHandlerListViewItem *)ch)->m_szName)); KviKvsScriptEventHandler * s = KviKvsScriptEventHandler::createInstance( // msvc workaround ((KviEventHandlerListViewItem *)ch)->m_szName, @@ -281,14 +281,14 @@ void KviEventEditor::saveLastEditedItem() __range_valid(m_bOneTimeSetupDone); if(!m_pLastEditedItem)return; - QString buffer = m_pNameEditor->text(); - if(!KviQString::equalCI(buffer,m_pLastEditedItem->m_szName)) + TQString buffer = m_pNameEditor->text(); + if(!KviTQString::equalCI(buffer,m_pLastEditedItem->m_szName)) { - getUniqueHandlerName((KviEventListViewItem *)(m_pLastEditedItem->parent()),buffer); + getUniqueHandlerName((KviEventListViewItem *)(m_pLastEditedItem->tqparent()),buffer); } m_pLastEditedItem->m_szName = buffer; - QString tmp; + TQString tmp; m_pEditor->getText(tmp); m_pLastEditedItem->m_szBuffer = tmp; @@ -298,7 +298,7 @@ void KviEventEditor::selectionChanged(KviTalListViewItem * it) { __range_valid(m_bOneTimeSetupDone); saveLastEditedItem(); - if(it->parent()) + if(it->tqparent()) { m_pLastEditedItem = (KviEventHandlerListViewItem *)it; m_pNameEditor->setEnabled(true); @@ -310,34 +310,34 @@ void KviEventEditor::selectionChanged(KviTalListViewItem * it) m_pNameEditor->setEnabled(false); m_pNameEditor->setText(""); m_pEditor->setEnabled(false); - QString parms = ((KviEventListViewItem *)it)->m_szParams; + TQString parms = ((KviEventListViewItem *)it)->m_szParams; if(parms.isEmpty())parms = __tr2qs("none"); KviCommandFormatter::indent(parms); KviCommandFormatter::indent(parms); - QString tmp; - KviQString::sprintf(tmp,__tr2qs("\n\n Event:\n %s\n\n Parameters:\n%s"), + TQString tmp; + KviTQString::sprintf(tmp,__tr2qs("\n\n Event:\n %s\n\n Parameters:\n%s"), ((KviEventListViewItem *)it)->m_szName.utf8().data(),parms.utf8().data()); m_pEditor->setText(tmp); } } -void KviEventEditor::showEvent(QShowEvent *e) +void KviEventEditor::showEvent(TQShowEvent *e) { oneTimeSetup(); - QWidget::showEvent(e); + TQWidget::showEvent(e); } -void KviEventEditor::getExportEventBuffer(QString &buffer,KviEventHandlerListViewItem * it) +void KviEventEditor::getExportEventBuffer(TQString &buffer,KviEventHandlerListViewItem * it) { - if(!it->parent())return; + if(!it->tqparent())return; - QString szBuf = it->m_szBuffer; + TQString szBuf = it->m_szBuffer; KviCommandFormatter::blockFromBuffer(szBuf); buffer = "event("; - buffer += ((KviEventListViewItem *)(it->parent()))->m_szName; + buffer += ((KviEventListViewItem *)(it->tqparent()))->m_szName; buffer += ","; buffer += it->m_szName; buffer += ")\n"; @@ -348,7 +348,7 @@ void KviEventEditor::getExportEventBuffer(QString &buffer,KviEventHandlerListVie { buffer += "\n"; buffer += "eventctl -d "; - buffer += ((KviEventListViewItem *)(it->parent()))->m_szName; + buffer += ((KviEventListViewItem *)(it->tqparent()))->m_szName; buffer += " "; buffer += it->m_szName; } @@ -360,23 +360,23 @@ void KviEventEditor::exportCurrentHandler() saveLastEditedItem(); if(!m_pLastEditedItem)return; - QString szName = QDir::homeDirPath(); - if(!szName.endsWith(QString(KVI_PATH_SEPARATOR)))szName += KVI_PATH_SEPARATOR; - szName += ((KviEventListViewItem *)(m_pLastEditedItem->parent()))->m_szName; + TQString szName = TQDir::homeDirPath(); + if(!szName.endsWith(TQString(KVI_PATH_SEPARATOR)))szName += KVI_PATH_SEPARATOR; + szName += ((KviEventListViewItem *)(m_pLastEditedItem->tqparent()))->m_szName; szName += "."; szName += m_pLastEditedItem->m_szName; szName += ".kvs"; - QString szFile; + TQString szFile; if(!KviFileDialog::askForSaveFileName(szFile,__tr2qs("Choose a Filename - KVIrc"),szName,"*.kvs",true,true,true))return; - QString szOut; + TQString szOut; getExportEventBuffer(szOut,m_pLastEditedItem); if(!KviFileUtils::writeFile(szFile,szOut)) { - QMessageBox::warning(this,__tr2qs("Write Failed - KVIrc"),__tr2qs("Unable to write to the event file."),__tr2qs("&OK")); + TQMessageBox::warning(this,__tr2qs("Write Failed - KVIrc"),__tr2qs("Unable to write to the event file."),__tr2qs("&OK")); } } @@ -386,14 +386,14 @@ void KviEventEditor::exportAllEvents() KviEventListViewItem * it = (KviEventListViewItem *)m_pListView->firstChild(); - QString out; + TQString out; while(it) { KviEventHandlerListViewItem * item = (KviEventHandlerListViewItem *)it->firstChild(); while(item) { - QString tmp; + TQString tmp; getExportEventBuffer(tmp,item); out += tmp; out += "\n"; @@ -402,17 +402,17 @@ void KviEventEditor::exportAllEvents() it = (KviEventListViewItem *)it->nextSibling(); } - QString szName = QDir::homeDirPath(); - if(!szName.endsWith(QString(KVI_PATH_SEPARATOR)))szName += KVI_PATH_SEPARATOR; + TQString szName = TQDir::homeDirPath(); + if(!szName.endsWith(TQString(KVI_PATH_SEPARATOR)))szName += KVI_PATH_SEPARATOR; szName += "events.kvs"; - QString szFile; + TQString szFile; - if(!KviFileDialog::askForSaveFileName(szFile,__tr2qs("Choose a Filename - KVIrc"),szName,QString::null,true,true))return; + if(!KviFileDialog::askForSaveFileName(szFile,__tr2qs("Choose a Filename - KVIrc"),szName,TQString(),true,true))return; if(!KviFileUtils::writeFile(szFile,out)) { - QMessageBox::warning(this,__tr2qs("Write Failed - KVIrc"),__tr2qs("Unable to write to the events file."),__tr2qs("Ok")); + TQMessageBox::warning(this,__tr2qs("Write Failed - KVIrc"),__tr2qs("Unable to write to the events file."),__tr2qs("Ok")); } } @@ -426,21 +426,21 @@ KviEventEditorWindow::KviEventEditorWindow(KviFrame * lpFrm) m_pEditor = new KviEventEditor(this); - m_pBase = new QWidget(this); - QGridLayout * g = new QGridLayout(m_pBase,1,4,4,4); + m_pBase = new TQWidget(this); + TQGridLayout * g = new TQGridLayout(m_pBase,1,4,4,4); - QPushButton * btn = new QPushButton(__tr2qs("&OK"),m_pBase); - connect(btn,SIGNAL(clicked()),this,SLOT(okClicked())); + TQPushButton * btn = new TQPushButton(__tr2qs("&OK"),m_pBase); + connect(btn,TQT_SIGNAL(clicked()),this,TQT_SLOT(okClicked())); btn->setIconSet(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_ACCEPT))); g->addWidget(btn,0,1); - btn = new QPushButton(__tr2qs("&Apply"),m_pBase); - connect(btn,SIGNAL(clicked()),this,SLOT(applyClicked())); + btn = new TQPushButton(__tr2qs("&Apply"),m_pBase); + connect(btn,TQT_SIGNAL(clicked()),this,TQT_SLOT(applyClicked())); btn->setIconSet(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_ACCEPT))); g->addWidget(btn,0,2); - btn = new QPushButton(__tr2qs("Cancel"),m_pBase); - connect(btn,SIGNAL(clicked()),this,SLOT(cancelClicked())); + btn = new TQPushButton(__tr2qs("Cancel"),m_pBase); + connect(btn,TQT_SIGNAL(clicked()),this,TQT_SLOT(cancelClicked())); btn->setIconSet(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_DISCARD))); g->addWidget(btn,0,3); @@ -469,14 +469,14 @@ void KviEventEditorWindow::cancelClicked() } -QPixmap * KviEventEditorWindow::myIconPtr() +TQPixmap * KviEventEditorWindow::myIconPtr() { return g_pIconManager->getSmallIcon(KVI_SMALLICON_EVENT); } -void KviEventEditorWindow::resizeEvent(QResizeEvent *e) +void KviEventEditorWindow::resizeEvent(TQResizeEvent *e) { - int hght = m_pBase->sizeHint().height(); + int hght = m_pBase->tqsizeHint().height(); m_pEditor->setGeometry(0,0,width(),height()- hght); m_pBase->setGeometry(0,height() - hght,width(),hght); } @@ -485,9 +485,9 @@ void KviEventEditorWindow::fillCaptionBuffers() { m_szPlainTextCaption = __tr2qs("Event Editor"); - static QString p1(""); - static QString p3(""); + static TQString p1(""); + static TQString p3(""); m_szHtmlActiveCaption = p1; m_szHtmlActiveCaption += KVI_OPTION_COLOR(KviOption_colorCaptionTextActive).name(); @@ -524,7 +524,7 @@ void KviEventEditorWindow::loadProperties(KviConfig *cfg) { /* #ifdef COMPILE_SCRIPTTOOLBAR - QValueList def; + TQValueList def; def.append(20); def.append(80); m_pEditor->setSizes(cfg->readIntListEntry("Sizes",def)); diff --git a/src/modules/eventeditor/eventeditor.h b/src/modules/eventeditor/eventeditor.h index d94a07cc..367c14d9 100644 --- a/src/modules/eventeditor/eventeditor.h +++ b/src/modules/eventeditor/eventeditor.h @@ -25,9 +25,9 @@ #include "kvi_window.h" #include "kvi_string.h" -#include +#include #include "kvi_tal_listview.h" -#include +#include class KviScriptEditor; @@ -35,62 +35,63 @@ class KviEventListViewItem : public KviTalListViewItem { public: unsigned int m_uEventIdx; - QString m_szName; - QString m_szParams; + TQString m_szName; + TQString m_szParams; public: - KviEventListViewItem(KviTalListView * par,unsigned int uEvIdx,const QString &name,const QString ¶ms) + KviEventListViewItem(KviTalListView * par,unsigned int uEvIdx,const TQString &name,const TQString ¶ms) : KviTalListViewItem(par), m_uEventIdx(uEvIdx), m_szName(name), m_szParams(params) {}; ~KviEventListViewItem() {}; public: - virtual QString text(int col) const { return m_szName; }; - virtual const QPixmap * pixmap(int col) const; + virtual TQString text(int col) const { return m_szName; }; + virtual const TQPixmap * pixmap(int col) const; }; class KviEventHandlerListViewItem : public KviTalListViewItem { public: - QString m_szName; - QString m_szBuffer; + TQString m_szName; + TQString m_szBuffer; bool m_bEnabled; public: - KviEventHandlerListViewItem(KviTalListViewItem * par,const QString &name,const QString &buffer,bool bEnabled) + KviEventHandlerListViewItem(KviTalListViewItem * par,const TQString &name,const TQString &buffer,bool bEnabled) : KviTalListViewItem(par), m_szName(name) , m_szBuffer(buffer) , m_bEnabled(bEnabled) {}; ~KviEventHandlerListViewItem() {}; public: - virtual QString text(int col) const { return m_szName; }; - virtual const QPixmap * pixmap(int col) const; + virtual TQString text(int col) const { return m_szName; }; + virtual const TQPixmap * pixmap(int col) const; }; class KviTalPopupMenu; -class KviEventEditor : public QWidget +class KviEventEditor : public TQWidget { Q_OBJECT + TQ_OBJECT public: - KviEventEditor(QWidget * par); + KviEventEditor(TQWidget * par); ~KviEventEditor(); public: KviScriptEditor * m_pEditor; KviTalListView * m_pListView; - QLineEdit * m_pNameEditor; + TQLineEdit * m_pNameEditor; KviTalPopupMenu * m_pContextPopup; KviEventHandlerListViewItem * m_pLastEditedItem; bool m_bOneTimeSetupDone; public: void commit(); void saveLastEditedItem(); - void getUniqueHandlerName(KviEventListViewItem *it,QString &buffer); - void getExportEventBuffer(QString &szBuffer,KviEventHandlerListViewItem * it); + void getUniqueHandlerName(KviEventListViewItem *it,TQString &buffer); + void getExportEventBuffer(TQString &szBuffer,KviEventHandlerListViewItem * it); protected slots: void selectionChanged(KviTalListViewItem *it); - void itemPressed(KviTalListViewItem *it,const QPoint &pnt,int col); + void itemPressed(KviTalListViewItem *it,const TQPoint &pnt,int col); void toggleCurrentHandlerEnabled(); void removeCurrentHandler(); void addHandlerForCurrentEvent(); void exportAllEvents(); void exportCurrentHandler(); protected: - void showEvent(QShowEvent *e); + void showEvent(TQShowEvent *e); private: void oneTimeSetup(); }; @@ -98,16 +99,17 @@ private: class KviEventEditorWindow : public KviWindow { Q_OBJECT + TQ_OBJECT public: KviEventEditorWindow(KviFrame * lpFrm); ~KviEventEditorWindow(); protected: KviEventEditor * m_pEditor; - QWidget * m_pBase; + TQWidget * m_pBase; protected: - virtual QPixmap * myIconPtr(); + virtual TQPixmap * myIconPtr(); virtual void fillCaptionBuffers(); - virtual void resizeEvent(QResizeEvent *e); + virtual void resizeEvent(TQResizeEvent *e); virtual void getConfigGroupName(KviStr &szName); virtual void saveProperties(KviConfig *); virtual void loadProperties(KviConfig *); diff --git a/src/modules/file/libkvifile.cpp b/src/modules/file/libkvifile.cpp index 8b8dd9ec..264423ff 100644 --- a/src/modules/file/libkvifile.cpp +++ b/src/modules/file/libkvifile.cpp @@ -32,10 +32,10 @@ #include "kvi_kvs_arraycast.h" -#include +#include #include "kvi_file.h" -#include -#include +#include +#include /* @doc: file.copy @@ -66,14 +66,14 @@ static bool file_kvs_cmd_copy(KviKvsModuleCommandCall * c) { - QString szSrc,szDst; + TQString szSrc,szDst; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("source",KVS_PT_NONEMPTYSTRING,0,szSrc) KVSM_PARAMETER("destination",KVS_PT_NONEMPTYSTRING,0,szDst) KVSM_PARAMETERS_END(c) KviFileUtils::adjustFilePath(szSrc); KviFileUtils::adjustFilePath(szDst); - if(KviFileUtils::fileExists(szDst) && !c->switches()->find('o',"overwrite")) + if(KviFileUtils::fileExists(szDst) && !c->switches()->tqfind('o',"overwrite")) { c->warning(__tr2qs("Destinaion file exists: no copy made")); return true; @@ -107,13 +107,13 @@ static bool file_kvs_cmd_copy(KviKvsModuleCommandCall * c) static bool file_kvs_cmd_addimagepath(KviKvsModuleCommandCall * c) { - QString szDst; + TQString szDst; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("path",KVS_PT_NONEMPTYSTRING,0,szDst) KVSM_PARAMETERS_END(c) KviFileUtils::adjustFilePath(szDst); - QStringList::Iterator it = KVI_OPTION_STRINGLIST(KviOption_stringlistImageSearchPaths).find(szDst); + TQStringList::Iterator it = KVI_OPTION_STRINGLIST(KviOption_stringlistImageSearchPaths).tqfind(szDst); if(it == KVI_OPTION_STRINGLIST(KviOption_stringlistImageSearchPaths).end()) KVI_OPTION_STRINGLIST(KviOption_stringlistImageSearchPaths).append(szDst); return true; @@ -140,13 +140,13 @@ static bool file_kvs_cmd_addimagepath(KviKvsModuleCommandCall * c) static bool file_kvs_cmd_delimagepath(KviKvsModuleCommandCall * c) { - QString szDst; + TQString szDst; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("path",KVS_PT_NONEMPTYSTRING,0,szDst) KVSM_PARAMETERS_END(c) KviFileUtils::adjustFilePath(szDst); - QStringList::Iterator it = KVI_OPTION_STRINGLIST(KviOption_stringlistImageSearchPaths).find(szDst); + TQStringList::Iterator it = KVI_OPTION_STRINGLIST(KviOption_stringlistImageSearchPaths).tqfind(szDst); if(it == KVI_OPTION_STRINGLIST(KviOption_stringlistImageSearchPaths).end()) KVI_OPTION_STRINGLIST(KviOption_stringlistImageSearchPaths).remove(szDst); return true; @@ -186,7 +186,7 @@ static bool file_kvs_cmd_delimagepath(KviKvsModuleCommandCall * c) static bool file_kvs_cmd_write(KviKvsModuleCommandCall * c) { - QString szFileName,szData; + TQString szFileName,szData; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("filename",KVS_PT_NONEMPTYSTRING,0,szFileName) KVSM_PARAMETER("data",KVS_PT_NONEMPTYSTRING,0,szData) @@ -194,10 +194,10 @@ static bool file_kvs_cmd_write(KviKvsModuleCommandCall * c) KviFileUtils::adjustFilePath(szFileName); bool bRet; - if(c->switches()->find('l',"local-8-bit")) - bRet = KviFileUtils::writeFileLocal8Bit(szFileName,szData,c->switches()->find('a',"append")); + if(c->switches()->tqfind('l',"local-8-bit")) + bRet = KviFileUtils::writeFileLocal8Bit(szFileName,szData,c->switches()->tqfind('a',"append")); else - bRet = KviFileUtils::writeFile(szFileName,szData,c->switches()->find('a',"append")); + bRet = KviFileUtils::writeFile(szFileName,szData,c->switches()->tqfind('a',"append")); if(!bRet) c->warning(__tr2qs("Failed to write to file %Q: the destination couldn't be opened"),&szFileName); @@ -231,7 +231,7 @@ static bool file_kvs_cmd_write(KviKvsModuleCommandCall * c) static bool file_kvs_cmd_rename(KviKvsModuleCommandCall * c) { - QString szOld,szNew; + TQString szOld,szNew; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("oldname",KVS_PT_NONEMPTYSTRING,0,szOld) KVSM_PARAMETER("newname",KVS_PT_NONEMPTYSTRING,0,szNew) @@ -272,7 +272,7 @@ static bool file_kvs_cmd_rename(KviKvsModuleCommandCall * c) static bool file_kvs_cmd_mkdir(KviKvsModuleCommandCall * c) { - QString szDir; + TQString szDir; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("directory",KVS_PT_NONEMPTYSTRING,0,szDir) KVSM_PARAMETERS_END(c) @@ -311,14 +311,14 @@ static bool file_kvs_cmd_mkdir(KviKvsModuleCommandCall * c) static bool file_kvs_cmd_remove(KviKvsModuleCommandCall * c) { - QString szName; + TQString szName; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("name",KVS_PT_NONEMPTYSTRING,0,szName) KVSM_PARAMETERS_END(c) KviFileUtils::adjustFilePath(szName); if(!KviFileUtils::removeFile(szName)) { - if(!c->switches()->find('q',"quiet")) + if(!c->switches()->tqfind('q',"quiet")) c->warning(__tr2qs("Failed to remove the file %Q"),&szName); } return true; @@ -354,14 +354,14 @@ static bool file_kvs_cmd_remove(KviKvsModuleCommandCall * c) static bool file_kvs_cmd_rmdir(KviKvsModuleCommandCall * c) { - QString szName; + TQString szName; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("name",KVS_PT_NONEMPTYSTRING,0,szName) KVSM_PARAMETERS_END(c) KviFileUtils::adjustFilePath(szName); if(!KviFileUtils::removeDir(szName)) { - if(!c->switches()->find('q',"quiet")) + if(!c->switches()->tqfind('q',"quiet")) c->warning(__tr2qs("Failed to remove the directory %Q"),&szName); } return true; @@ -385,12 +385,12 @@ static bool file_kvs_cmd_rmdir(KviKvsModuleCommandCall * c) static bool file_kvs_fnc_exists(KviKvsModuleFunctionCall * c) { - QString szName; + TQString szName; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("filename",KVS_PT_STRING,0,szName) KVSM_PARAMETERS_END(c) KviFileUtils::adjustFilePath(szName); - QFileInfo f(szName); + TQFileInfo f(szName); c->returnValue()->setBoolean(f.exists()); return true; } @@ -414,12 +414,12 @@ static bool file_kvs_fnc_exists(KviKvsModuleFunctionCall * c) static bool file_kvs_fnc_type(KviKvsModuleFunctionCall * c) { - QString szName; + TQString szName; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("filename",KVS_PT_NONEMPTYSTRING,0,szName) KVSM_PARAMETERS_END(c) KviFileUtils::adjustFilePath(szName); - QFileInfo f(szName); + TQFileInfo f(szName); if(f.isFile())c->returnValue()->setString("f"); else if(f.isDir())c->returnValue()->setString("d"); else if(f.isSymLink())c->returnValue()->setString("l"); @@ -445,12 +445,12 @@ static bool file_kvs_fnc_type(KviKvsModuleFunctionCall * c) static bool file_kvs_fnc_size(KviKvsModuleFunctionCall * c) { - QString szName; + TQString szName; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("filename",KVS_PT_NONEMPTYSTRING,0,szName) KVSM_PARAMETERS_END(c) KviFileUtils::adjustFilePath(szName); - QFileInfo f(szName); + TQFileInfo f(szName); c->returnValue()->setInteger(f.size()); return true; } @@ -470,31 +470,31 @@ static bool file_kvs_fnc_size(KviKvsModuleFunctionCall * c) static bool file_kvs_fnc_allSizes(KviKvsModuleFunctionCall * c) { - QString szDir; + TQString szDir; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("directory",KVS_PT_NONEMPTYSTRING,0,szDir) KVSM_PARAMETERS_END(c) KviFileUtils::adjustFilePath(szDir); - QDir d(szDir); + TQDir d(szDir); if(!d.exists()) { c->warning(__tr2qs("The specified directory does not exist '%Q'"),&szDir); return true; } - QStringList sl; - sl = d.entryList(QDir::Files); + TQStringList sl; + sl = d.entryList(TQDir::Files); KviKvsArray * a = new KviKvsArray(); - QString szFile; + TQString szFile; if(!sl.isEmpty()) { int idx = 0; - for(QStringList::Iterator it = sl.begin();it != sl.end();++it) + for(TQStringList::Iterator it = sl.begin();it != sl.end();++it) { szFile=szDir+(*it); - QFileInfo f(szFile); + TQFileInfo f(szFile); a->set(idx,new KviKvsVariant((kvs_int_t)f.size())); idx++; } @@ -534,7 +534,7 @@ static bool file_kvs_fnc_allSizes(KviKvsModuleFunctionCall * c) static bool file_kvs_fnc_fixpath(KviKvsModuleFunctionCall * c) { - QString szName; + TQString szName; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("filename",KVS_PT_STRING,0,szName) KVSM_PARAMETERS_END(c) @@ -563,7 +563,7 @@ static bool file_kvs_fnc_fixpath(KviKvsModuleFunctionCall * c) static bool file_kvs_fnc_ps(KviKvsModuleFunctionCall * c) { - c->returnValue()->setString(QString(QChar(KVI_PATH_SEPARATOR_CHAR))); + c->returnValue()->setString(TQString(TQChar(KVI_PATH_SEPARATOR_CHAR))); return true; } @@ -613,7 +613,7 @@ static bool file_kvs_fnc_ps(KviKvsModuleFunctionCall * c) static bool file_kvs_fnc_ls(KviKvsModuleFunctionCall * c) { - QString szDir,szFlags,szFilter; + TQString szDir,szFlags,szFilter; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("directory",KVS_PT_NONEMPTYSTRING,0,szDir) KVSM_PARAMETER("flags",KVS_PT_STRING,KVS_PF_OPTIONAL,szFlags) @@ -622,7 +622,7 @@ static bool file_kvs_fnc_ls(KviKvsModuleFunctionCall * c) KviFileUtils::adjustFilePath(szDir); - QDir d(szDir); + TQDir d(szDir); if(!d.exists()) { c->warning(__tr2qs("The specified directory does not exist '%Q'"),&szDir); @@ -630,37 +630,37 @@ static bool file_kvs_fnc_ls(KviKvsModuleFunctionCall * c) } #ifdef COMPILE_USE_QT4 - QFlags iFlags = 0; + TQFlags iFlags = 0; #else int iFlags = 0; #endif - if(szFlags.isEmpty())iFlags = QDir::Dirs | QDir::Files | QDir::NoSymLinks | QDir::Readable | QDir::Writable | QDir::Executable | QDir::Hidden | QDir::System; + if(szFlags.isEmpty())iFlags = TQDir::Dirs | TQDir::Files | TQDir::NoSymLinks | TQDir::Readable | TQDir::Writable | TQDir::Executable | TQDir::Hidden | TQDir::System; else { - if(szFlags.find('d',false) != -1)iFlags |= QDir::Dirs; - if(szFlags.find('f',false) != -1)iFlags |= QDir::Files; - if(szFlags.find('l',false) == -1)iFlags |= QDir::NoSymLinks; - if(szFlags.find('r',false) != -1)iFlags |= QDir::Readable; - if(szFlags.find('w',false) != -1)iFlags |= QDir::Writable; - if(szFlags.find('x',false) != -1)iFlags |= QDir::Executable; - if(szFlags.find('h',false) != -1)iFlags |= QDir::Hidden; - if(szFlags.find('s',false) != -1)iFlags |= QDir::System; + if(szFlags.tqfind('d',false) != -1)iFlags |= TQDir::Dirs; + if(szFlags.tqfind('f',false) != -1)iFlags |= TQDir::Files; + if(szFlags.tqfind('l',false) == -1)iFlags |= TQDir::NoSymLinks; + if(szFlags.tqfind('r',false) != -1)iFlags |= TQDir::Readable; + if(szFlags.tqfind('w',false) != -1)iFlags |= TQDir::Writable; + if(szFlags.tqfind('x',false) != -1)iFlags |= TQDir::Executable; + if(szFlags.tqfind('h',false) != -1)iFlags |= TQDir::Hidden; + if(szFlags.tqfind('s',false) != -1)iFlags |= TQDir::System; } #ifdef COMPILE_USE_QT4 - QFlags iSort = 0; + TQFlags iSort = 0; #else int iSort = 0; #endif - if(szFlags.isEmpty())iSort = QDir::Unsorted; + if(szFlags.isEmpty())iSort = TQDir::Unsorted; else { - if(szFlags.find('n',false) != -1)iSort |= QDir::Name; - if(szFlags.find('t',false) != -1)iSort |= QDir::Time; - if(szFlags.find('b',false) != -1)iSort |= QDir::Size; - if(szFlags.find('z',false) != -1)iSort |= QDir::DirsFirst; - if(szFlags.find('k',false) != -1)iSort |= QDir::Reversed; - if(szFlags.find('i',false) != -1)iSort |= QDir::IgnoreCase; + if(szFlags.tqfind('n',false) != -1)iSort |= TQDir::Name; + if(szFlags.tqfind('t',false) != -1)iSort |= TQDir::Time; + if(szFlags.tqfind('b',false) != -1)iSort |= TQDir::Size; + if(szFlags.tqfind('z',false) != -1)iSort |= TQDir::DirsFirst; + if(szFlags.tqfind('k',false) != -1)iSort |= TQDir::Reversed; + if(szFlags.tqfind('i',false) != -1)iSort |= TQDir::IgnoreCase; } - QStringList sl; + TQStringList sl; if(!szFilter.isEmpty())sl = d.entryList(szFilter,iFlags,iSort); else sl = d.entryList(iFlags,iSort); @@ -668,7 +668,7 @@ static bool file_kvs_fnc_ls(KviKvsModuleFunctionCall * c) if(!sl.isEmpty()) { int idx = 0; - for(QStringList::Iterator it = sl.begin();it != sl.end();++it) + for(TQStringList::Iterator it = sl.begin();it != sl.end();++it) { a->set(idx,new KviKvsVariant(*it)); idx++; @@ -714,9 +714,9 @@ static bool file_kvs_fnc_ls(KviKvsModuleFunctionCall * c) static bool file_kvs_fnc_read(KviKvsModuleFunctionCall * c) { - QString szNameZ; + TQString szNameZ; kvs_uint_t uSize; - QString szFlags; + TQString szFlags; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("filename",KVS_PT_NONEMPTYSTRING,0,szNameZ) KVSM_PARAMETER("size",KVS_PT_UINT,KVS_PF_OPTIONAL,uSize) @@ -724,7 +724,7 @@ static bool file_kvs_fnc_read(KviKvsModuleFunctionCall * c) KVSM_PARAMETERS_END(c) KviFileUtils::adjustFilePath(szNameZ); - QFile f(szNameZ); + TQFile f(szNameZ); if(!f.open(IO_ReadOnly)) { c->warning(__tr2qs("Can't open the file \"%Q\" for reading"),&szNameZ); @@ -759,10 +759,10 @@ static bool file_kvs_fnc_read(KviKvsModuleFunctionCall * c) buf[uReaded] = '\0'; - if(szFlags.find('l',false) == -1) - c->returnValue()->setString(QString::fromUtf8(buf)); + if(szFlags.tqfind('l',false) == -1) + c->returnValue()->setString(TQString::fromUtf8(buf)); else - c->returnValue()->setString(QString::fromLocal8Bit(buf)); + c->returnValue()->setString(TQString::fromLocal8Bit(buf)); kvi_free(buf); @@ -806,8 +806,8 @@ static bool file_kvs_fnc_read(KviKvsModuleFunctionCall * c) static bool file_kvs_fnc_readLines(KviKvsModuleFunctionCall * c) { - QString szName; - QString szFlags; + TQString szName; + TQString szFlags; kvs_int_t iStartLine; kvs_int_t iCount; KVSM_PARAMETERS_BEGIN(c) @@ -818,7 +818,7 @@ static bool file_kvs_fnc_readLines(KviKvsModuleFunctionCall * c) KVSM_PARAMETERS_END(c) KviFileUtils::adjustFilePath(szName); - QFile f(szName); + TQFile f(szName); if(!f.open(IO_ReadOnly)) { c->warning(__tr2qs("Can't open the file \"%Q\" for reading"),&szName); @@ -828,15 +828,15 @@ static bool file_kvs_fnc_readLines(KviKvsModuleFunctionCall * c) if(c->params()->count() < 2)iStartLine = 0; if(c->params()->count() < 3)iCount = -1; - bool bLocal8Bit = szFlags.find('l',0,false) != -1; + bool bLocal8Bit = szFlags.tqfind('l',0,false) != -1; KviKvsArray * a = new KviKvsArray(); int iIndex=0; - QTextStream stream( &f ); + TQTextStream stream( &f ); - stream.setEncoding(bLocal8Bit ? QTextStream::Locale : QTextStream::UnicodeUTF8); + stream.setEncoding(bLocal8Bit ? TQTextStream::Locale : TQTextStream::UnicodeUTF8); for(int i=0;iswitches()->find('a',"append"))) + if(!f.openForWriting(c->switches()->tqfind('a',"append"))) { - if(!c->switches()->find('q',"quiet")) + if(!c->switches()->tqfind('q',"quiet")) c->warning(__tr2qs("Can't open the file \"%Q\" for writing"),&szFile); return true; } - bool bLocal8Bit = c->switches()->find('l',"local-8-bit"); - bool bNoSeparator = c->switches()->find('n',"no-separator"); - bool bAddCR = c->switches()->find('c',"crlf"); + bool bLocal8Bit = c->switches()->tqfind('l',"local-8-bit"); + bool bNoSeparator = c->switches()->tqfind('n',"no-separator"); + bool bAddCR = c->switches()->tqfind('c',"crlf"); unsigned int u = 0; while(u < a.array()->size()) { KviKvsVariant * v = a.array()->at(u); - KviQCString dat; + KviTQCString dat; if(v) { - QString szDat; + TQString szDat; v->asString(szDat); - KviQCString dat = bLocal8Bit ? szDat.local8Bit() : szDat.utf8(); + KviTQCString dat = bLocal8Bit ? szDat.local8Bit() : szDat.utf8(); } if(!bNoSeparator) { @@ -963,7 +963,7 @@ static bool file_kvs_cmd_writeLines(KviKvsModuleCommandCall * c) $file.localdir([relative_path:string]) @description: Returns the path to the KVIrc local data directory.[br] - The KVIrc local data directory is always writeable and contains + The KVIrc local data directory is always writeable and tqcontains the various subdirectories that KVIrc uses internally: audio , avatars , config , help , incoming , log , modules , msgcolors and pics.[br] If is passed , then it is appended at the end of the directory @@ -980,12 +980,12 @@ static bool file_kvs_cmd_writeLines(KviKvsModuleCommandCall * c) static bool file_kvs_fnc_localdir(KviKvsModuleFunctionCall * c) { - QString szName; + TQString szName; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("relative_path",KVS_PT_STRING,KVS_PF_OPTIONAL,szName) KVSM_PARAMETERS_END(c) if(szName.isEmpty())szName.append(KVI_PATH_SEPARATOR_CHAR); - QString szPath; + TQString szPath; g_pApp->getLocalKvircDirectory(szPath,KviApp::None,szName); KviFileUtils::adjustFilePath(szPath); c->returnValue()->setString(szPath); @@ -1015,13 +1015,13 @@ static bool file_kvs_fnc_localdir(KviKvsModuleFunctionCall * c) static bool file_kvs_fnc_homedir(KviKvsModuleFunctionCall * c) { - QString szName; + TQString szName; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("relative_path",KVS_PT_STRING,KVS_PF_OPTIONAL,szName) KVSM_PARAMETERS_END(c) if(szName.isEmpty())szName.append(KVI_PATH_SEPARATOR_CHAR); - QString szPath = QDir::homeDirPath(); - KviQString::ensureLastCharIs(szPath,KVI_PATH_SEPARATOR_CHAR); + TQString szPath = TQDir::homeDirPath(); + KviTQString::ensureLastCharIs(szPath,KVI_PATH_SEPARATOR_CHAR); szPath.append(szName); KviFileUtils::adjustFilePath(szPath); c->returnValue()->setString(szPath); @@ -1052,13 +1052,13 @@ static bool file_kvs_fnc_homedir(KviKvsModuleFunctionCall * c) static bool file_kvs_fnc_rootdir(KviKvsModuleFunctionCall * c) { - QString szName; + TQString szName; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("relative_path",KVS_PT_STRING,KVS_PF_OPTIONAL,szName) KVSM_PARAMETERS_END(c) if(szName.isEmpty())szName.append(KVI_PATH_SEPARATOR_CHAR); - QString szPath = QDir::rootDirPath(); - KviQString::ensureLastCharIs(szPath,KVI_PATH_SEPARATOR_CHAR); + TQString szPath = TQDir::rootDirPath(); + KviTQString::ensureLastCharIs(szPath,KVI_PATH_SEPARATOR_CHAR); szPath.append(szName); KviFileUtils::adjustFilePath(szPath); c->returnValue()->setString(szPath); @@ -1087,13 +1087,13 @@ static bool file_kvs_fnc_rootdir(KviKvsModuleFunctionCall * c) static bool file_kvs_fnc_cwd(KviKvsModuleFunctionCall * c) { - QString szName; + TQString szName; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("relative_path",KVS_PT_STRING,KVS_PF_OPTIONAL,szName) KVSM_PARAMETERS_END(c) if(szName.isEmpty())szName.append(KVI_PATH_SEPARATOR_CHAR); - QString szPath = QDir::currentDirPath(); - KviQString::ensureLastCharIs(szPath,KVI_PATH_SEPARATOR_CHAR); + TQString szPath = TQDir::currentDirPath(); + KviTQString::ensureLastCharIs(szPath,KVI_PATH_SEPARATOR_CHAR); szPath.append(szName); KviFileUtils::adjustFilePath(szPath); c->returnValue()->setString(szPath); @@ -1114,7 +1114,7 @@ static bool file_kvs_fnc_cwd(KviKvsModuleFunctionCall * c) $file.globaldir @description: Returns the path to the KVIrc global data directory.[br] - The KVIrc local data directory is always readable but usually not writeable and contains + The KVIrc local data directory is always readable but usually not writeable and tqcontains the various subdirectories that KVIrc uses internally: audio , avatars , config , help , incoming , log , modules , msgcolors and pics.[br] If is passed , then it is appended at the end of the directory @@ -1131,12 +1131,12 @@ static bool file_kvs_fnc_cwd(KviKvsModuleFunctionCall * c) static bool file_kvs_fnc_globaldir(KviKvsModuleFunctionCall * c) { - QString szName; + TQString szName; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("relative_path",KVS_PT_STRING,KVS_PF_OPTIONAL,szName) KVSM_PARAMETERS_END(c) if(szName.isEmpty())szName.append(KVI_PATH_SEPARATOR_CHAR); - QString szPath; + TQString szPath; g_pApp->getGlobalKvircDirectory(szPath,KviApp::None,szName); KviFileUtils::adjustFilePath(szPath); c->returnValue()->setString(szPath); @@ -1165,11 +1165,11 @@ static bool file_kvs_fnc_globaldir(KviKvsModuleFunctionCall * c) static bool file_kvs_fnc_extractpath(KviKvsModuleFunctionCall * c) { - QString szName; + TQString szName; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("filepath",KVS_PT_NONEMPTYSTRING,0,szName) KVSM_PARAMETERS_END(c) - c->returnValue()->setString(QFileInfo(szName).dirPath(TRUE)); + c->returnValue()->setString(TQFileInfo(szName).dirPath(TRUE)); return true; } @@ -1195,12 +1195,12 @@ static bool file_kvs_fnc_extractpath(KviKvsModuleFunctionCall * c) static bool file_kvs_fnc_extractfilename(KviKvsModuleFunctionCall * c) { - QString szName; + TQString szName; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("filepath",KVS_PT_NONEMPTYSTRING,0,szName) KVSM_PARAMETERS_END(c) KviFileUtils::extractFileName(szName); - KviQString::cutToLast(szName,KVI_PATH_SEPARATOR_CHAR); + KviTQString::cutToLast(szName,KVI_PATH_SEPARATOR_CHAR); c->returnValue()->setString(szName); return true; } diff --git a/src/modules/filetransferwindow/filetransferwindow.cpp b/src/modules/filetransferwindow/filetransferwindow.cpp index a3951a7c..e26cc600 100644 --- a/src/modules/filetransferwindow/filetransferwindow.cpp +++ b/src/modules/filetransferwindow/filetransferwindow.cpp @@ -36,22 +36,22 @@ #include "kvi_input.h" #include "kvi_qstring.h" -#include -#include +#include +#include #include "kvi_tal_hbox.h" #ifdef COMPILE_USE_QT4 - #include + #include #else - #include + #include #endif -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #ifdef COMPILE_KDE_SUPPORT #include @@ -75,9 +75,9 @@ KviFileTransferItem::~KviFileTransferItem() m_pTransfer->setDisplayItem(0); } -QString KviFileTransferItem::key(int column,bool bAcending) const +TQString KviFileTransferItem::key(int column,bool bAcending) const { - QString ret; + TQString ret; ret.setNum(m_pTransfer->id()); if(ret.length() == 1)ret.prepend("0000000"); else if(ret.length() == 2)ret.prepend("000000"); @@ -89,10 +89,10 @@ QString KviFileTransferItem::key(int column,bool bAcending) const return ret; } -void KviFileTransferItem::paintCell(QPainter * p,const QColorGroup &cg,int column,int width,int align) +void KviFileTransferItem::paintCell(TQPainter * p,const TQColorGroup &cg,int column,int width,int align) { - QPainter * newP; - QPixmap * pix = 0; + TQPainter * newP; + TQPixmap * pix = 0; if(p->device() == listView()->viewport()) { // ops.. there is no double buffering active ? @@ -111,7 +111,7 @@ void KviFileTransferItem::paintCell(QPainter * p,const QColorGroup &cg,int colum } } } - newP = new QPainter(pix); + newP = new TQPainter(pix); } else { newP = p; } @@ -120,9 +120,9 @@ void KviFileTransferItem::paintCell(QPainter * p,const QColorGroup &cg,int colum newP->setPen(isSelected() ? cg.highlight() : cg.base()); newP->drawRect(0,0,width,height()); - newP->setPen(m_pTransfer->active() ? QColor(180,180,180) : QColor(200,200,200)); + newP->setPen(m_pTransfer->active() ? TQColor(180,180,180) : TQColor(200,200,200)); newP->drawRect(1,1,width - 2,height() - 2); - newP->fillRect(2,2,width - 4,height() - 4,m_pTransfer->active() ? QColor(240,240,240) : QColor(225,225,225)); + newP->fillRect(2,2,width - 4,height() - 4,m_pTransfer->active() ? TQColor(240,240,240) : TQColor(225,225,225)); m_pTransfer->displayPaint(newP,column,width,height()); @@ -148,15 +148,15 @@ KviFileTransferWindow::KviFileTransferWindow(KviModuleExtensionDescriptor * d,Kv m_pLocalFilePopup = 0; m_pOpenFilePopup = 0; - m_pMemPixmap = new QPixmap(1,1); + m_pMemPixmap = new TQPixmap(1,1); - m_pTimer = new QTimer(this); - connect(m_pTimer,SIGNAL(timeout()),this,SLOT(heartbeat())); + m_pTimer = new TQTimer(this); + connect(m_pTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(heartbeat())); m_pInput = new KviInput(this,0); - m_pSplitter = new QSplitter(Qt::Horizontal,this,"splitter"); - m_pVertSplitter = new QSplitter(Qt::Vertical,m_pSplitter,"vsplitter"); + m_pSplitter = new TQSplitter(Qt::Horizontal,this,"splitter"); + m_pVertSplitter = new TQSplitter(Qt::Vertical,m_pSplitter,"vsplitter"); m_pListView = new KviTalListView(m_pVertSplitter); //m_pListView->header()->hide(); @@ -166,26 +166,26 @@ KviFileTransferWindow::KviFileTransferWindow(KviModuleExtensionDescriptor * d,Kv m_pListView->addColumn(__tr2qs_ctx("Progress","filetransferwindow"),350); KviDynamicToolTip * tp = new KviDynamicToolTip(m_pListView->viewport()); - connect(tp,SIGNAL(tipRequest(KviDynamicToolTip *,const QPoint &)),this,SLOT(tipRequest(KviDynamicToolTip *,const QPoint &))); + connect(tp,TQT_SIGNAL(tipRequest(KviDynamicToolTip *,const TQPoint &)),this,TQT_SLOT(tipRequest(KviDynamicToolTip *,const TQPoint &))); //m_pListView->setFocusPolicy(NoFocus); //m_pListView->viewport()->setFocusPolicy(NoFocus); - //connect(m_pListView,SIGNAL(rightButtonPressed(KviTalListViewItem *,const QPoint &,int)), - // this,SLOT(showHostPopup(KviTalListViewItem *,const QPoint &,int))); + //connect(m_pListView,TQT_SIGNAL(rightButtonPressed(KviTalListViewItem *,const TQPoint &,int)), + // this,TQT_SLOT(showHostPopup(KviTalListViewItem *,const TQPoint &,int))); - QFontMetrics fm(font()); + TQFontMetrics fm(font()); m_iLineSpacing = fm.lineSpacing(); m_pIrcView = new KviIrcView(m_pVertSplitter,lpFrm,this); m_pListView->installEventFilter(this); - connect(m_pListView,SIGNAL(rightButtonPressed(KviTalListViewItem *,const QPoint &,int)),this,SLOT(rightButtonPressed(KviTalListViewItem *,const QPoint &,int))); - connect(m_pListView,SIGNAL(doubleClicked(KviTalListViewItem *,const QPoint &,int)),this,SLOT(doubleClicked(KviTalListViewItem *,const QPoint &,int))); + connect(m_pListView,TQT_SIGNAL(rightButtonPressed(KviTalListViewItem *,const TQPoint &,int)),this,TQT_SLOT(rightButtonPressed(KviTalListViewItem *,const TQPoint &,int))); + connect(m_pListView,TQT_SIGNAL(doubleClicked(KviTalListViewItem *,const TQPoint &,int)),this,TQT_SLOT(doubleClicked(KviTalListViewItem *,const TQPoint &,int))); fillTransferView(); - connect(KviFileTransferManager::instance(),SIGNAL(transferRegistered(KviFileTransfer *)),this,SLOT(transferRegistered(KviFileTransfer *))); - connect(KviFileTransferManager::instance(),SIGNAL(transferUnregistering(KviFileTransfer *)),this,SLOT(transferUnregistering(KviFileTransfer *))); + connect(KviFileTransferManager::instance(),TQT_SIGNAL(transferRegistered(KviFileTransfer *)),this,TQT_SLOT(transferRegistered(KviFileTransfer *))); + connect(KviFileTransferManager::instance(),TQT_SIGNAL(transferUnregistering(KviFileTransfer *)),this,TQT_SLOT(transferUnregistering(KviFileTransfer *))); KviFileTransferManager::instance()->setTransferWindow(this); @@ -201,14 +201,14 @@ KviFileTransferWindow::~KviFileTransferWindow() delete m_pMemPixmap; } -bool KviFileTransferWindow::eventFilter( QObject *obj, QEvent *ev ) +bool KviFileTransferWindow::eventFilter( TQObject *obj, TQEvent *ev ) { - if( (obj==m_pListView) && ( ev->type() == QEvent::KeyPress ) ) + if( (TQT_BASE_OBJECT(obj)==TQT_BASE_OBJECT(m_pListView)) && ( ev->type() == TQEvent::KeyPress ) ) { - QKeyEvent *keyEvent = (QKeyEvent*)ev; + TQKeyEvent *keyEvent = (TQKeyEvent*)ev; switch(keyEvent->key()) { - case Qt::Key_Delete: + case TQt::Key_Delete: if(m_pListView->currentItem()) { delete m_pListView->currentItem(); @@ -220,20 +220,20 @@ bool KviFileTransferWindow::eventFilter( QObject *obj, QEvent *ev ) return KviWindow::eventFilter( obj, ev ); } -void KviFileTransferWindow::fontChange(const QFont &oldFont) +void KviFileTransferWindow::fontChange(const TQFont &oldFont) { - QFontMetrics fm(font()); + TQFontMetrics fm(font()); m_iLineSpacing = fm.lineSpacing(); KviWindow::fontChange(oldFont); } -void KviFileTransferWindow::tipRequest(KviDynamicToolTip * tip,const QPoint &pnt) +void KviFileTransferWindow::tipRequest(KviDynamicToolTip * tip,const TQPoint &pnt) { KviFileTransferItem * it = (KviFileTransferItem *)m_pListView->itemAt(pnt); if(!it)return; - QString txt = it->transfer()->tipText(); - tip->tip(m_pListView->itemRect(it),txt); + TQString txt = it->transfer()->tipText(); + tip->tip(m_pListView->tqitemRect(it),txt); } void KviFileTransferWindow::fillTransferView() @@ -273,20 +273,20 @@ void KviFileTransferWindow::transferUnregistering(KviFileTransfer * t) it = 0; } -void KviFileTransferWindow::doubleClicked(KviTalListViewItem *it,const QPoint &pnt,int col) +void KviFileTransferWindow::doubleClicked(KviTalListViewItem *it,const TQPoint &pnt,int col) { if(it) openLocalFile(); } -void KviFileTransferWindow::rightButtonPressed(KviTalListViewItem *it,const QPoint &pnt,int col) +void KviFileTransferWindow::rightButtonPressed(KviTalListViewItem *it,const TQPoint &pnt,int col) { if(!m_pContextPopup)m_pContextPopup = new KviTalPopupMenu(this); if(!m_pLocalFilePopup)m_pLocalFilePopup = new KviTalPopupMenu(this); if(!m_pOpenFilePopup) { m_pOpenFilePopup= new KviTalPopupMenu(this); - connect(m_pOpenFilePopup,SIGNAL(activated(int)),this,SLOT(openFilePopupActivated(int))); + connect(m_pOpenFilePopup,TQT_SIGNAL(activated(int)),this,TQT_SLOT(openFilePopupActivated(int))); } m_pContextPopup->clear(); @@ -300,20 +300,20 @@ void KviFileTransferWindow::rightButtonPressed(KviTalListViewItem *it,const QPoi if(i->transfer()) { - QString szFile = i->transfer()->localFileName(); + TQString szFile = i->transfer()->localFileName(); if(!szFile.isEmpty()) { m_pLocalFilePopup->clear(); - QString tmp = "file:/"; + TQString tmp = "file:/"; tmp += szFile; tmp += "
"; - QFileInfo fi(szFile); + TQFileInfo fi(szFile); if(fi.exists()) { tmp += ""; - tmp += __tr2qs_ctx("Size: %1","filetransferwindow").arg(KviQString::makeSizeReadable(fi.size())); + tmp += __tr2qs_ctx("Size: %1","filetransferwindow").tqarg(KviTQString::makeSizeReadable(fi.size())); tmp += "
"; } @@ -323,15 +323,15 @@ void KviFileTransferWindow::rightButtonPressed(KviTalListViewItem *it,const QPoi tmp += ""; #endif //COMPILE_KDE_SUPPORT - QLabel * l = new QLabel(tmp,m_pLocalFilePopup); - l->setFrameStyle(QFrame::Raised | QFrame::Panel); + TQLabel * l = new TQLabel(tmp,m_pLocalFilePopup); + l->setFrameStyle(TQFrame::Raised | TQFrame::Panel); m_pLocalFilePopup->insertItem(l); #ifdef COMPILE_KDE_SUPPORT - QString mimetype = KMimeType::findByPath(szFile)->name(); + TQString mimetype = KMimeType::findByPath(szFile)->name(); KServiceTypeProfile::OfferList offers = KServiceTypeProfile::offers(mimetype,"Application"); - id = m_pLocalFilePopup->insertItem(__tr2qs_ctx("&Open","filetransferwindow"),this,SLOT(openLocalFile())); + id = m_pLocalFilePopup->insertItem(__tr2qs_ctx("&Open","filetransferwindow"),this,TQT_SLOT(openLocalFile())); m_pLocalFilePopup->setItemParameter(id,-1); m_pOpenFilePopup->clear(); @@ -349,32 +349,32 @@ void KviFileTransferWindow::rightButtonPressed(KviTalListViewItem *it,const QPoi m_pOpenFilePopup->insertSeparator(); - id = m_pOpenFilePopup->insertItem(__tr2qs_ctx("&Other...","filetransferwindow"),this,SLOT(openLocalFileWith())); + id = m_pOpenFilePopup->insertItem(__tr2qs_ctx("&Other...","filetransferwindow"),this,TQT_SLOT(openLocalFileWith())); m_pOpenFilePopup->setItemParameter(id,-1); m_pLocalFilePopup->insertItem(__tr2qs_ctx("Open &With","filetransferwindow"),m_pOpenFilePopup); m_pLocalFilePopup->insertSeparator(); - m_pLocalFilePopup->insertItem(__tr2qs_ctx("Open &Location","filetransferwindow"),this,SLOT(openLocalFileFolder())); - m_pLocalFilePopup->insertItem(__tr2qs_ctx("Terminal at Location","filetransferwindow"),this,SLOT(openLocalFileTerminal())); + m_pLocalFilePopup->insertItem(__tr2qs_ctx("Open &Location","filetransferwindow"),this,TQT_SLOT(openLocalFileFolder())); + m_pLocalFilePopup->insertItem(__tr2qs_ctx("Terminal at Location","filetransferwindow"),this,TQT_SLOT(openLocalFileTerminal())); m_pLocalFilePopup->insertSeparator(); #endif //COMPILE_KDE_SUPPORT //-| Grifisx & Noldor |- #ifdef COMPILE_ON_WINDOWS - id = m_pLocalFilePopup->insertItem(__tr2qs_ctx("&Open","filetransferwindow"),this,SLOT(openLocalFile())); + id = m_pLocalFilePopup->insertItem(__tr2qs_ctx("&Open","filetransferwindow"),this,TQT_SLOT(openLocalFile())); m_pLocalFilePopup->setItemParameter(id,-1); m_pOpenFilePopup->insertSeparator(); - m_pLocalFilePopup->insertItem(__tr2qs_ctx("Open &With","filetransferwindow"),this,SLOT(openLocalFileWith())); + m_pLocalFilePopup->insertItem(__tr2qs_ctx("Open &With","filetransferwindow"),this,TQT_SLOT(openLocalFileWith())); m_pLocalFilePopup->insertSeparator(); - m_pLocalFilePopup->insertItem(__tr2qs_ctx("Open &Location","filetransferwindow"),this,SLOT(openLocalFileFolder())); - m_pLocalFilePopup->insertItem(__tr2qs_ctx("MS-DOS Prompt at Location","filetransferwindow"),this,SLOT(openLocalFileTerminal())); + m_pLocalFilePopup->insertItem(__tr2qs_ctx("Open &Location","filetransferwindow"),this,TQT_SLOT(openLocalFileFolder())); + m_pLocalFilePopup->insertItem(__tr2qs_ctx("MS-DOS Prompt at Location","filetransferwindow"),this,TQT_SLOT(openLocalFileTerminal())); m_pLocalFilePopup->insertSeparator(); #endif //COMPILE_ON_WINDOWS // G&N end - m_pLocalFilePopup->insertItem(__tr2qs_ctx("&Copy Path to Clipboard","filetransferwindow"),this,SLOT(copyLocalFileToClipboard())); + m_pLocalFilePopup->insertItem(__tr2qs_ctx("&Copy Path to Clipboard","filetransferwindow"),this,TQT_SLOT(copyLocalFileToClipboard())); - id = m_pLocalFilePopup->insertItem(__tr2qs_ctx("&Delete file","filetransferwindow"),this,SLOT(deleteLocalFile())); + id = m_pLocalFilePopup->insertItem(__tr2qs_ctx("&Delete file","filetransferwindow"),this,TQT_SLOT(deleteLocalFile())); m_pLocalFilePopup->setItemEnabled(id,i->transfer()->terminated()); m_pContextPopup->insertItem(__tr2qs_ctx("Local &File","filetransferwindow"),m_pLocalFilePopup); @@ -399,14 +399,14 @@ void KviFileTransferWindow::rightButtonPressed(KviTalListViewItem *it,const QPoi item = (KviFileTransferItem *)item->nextSibling(); } - id = m_pContextPopup->insertItem(__tr2qs_ctx("&Clear Terminated","filetransferwindow"),this,SLOT(clearTerminated())); + id = m_pContextPopup->insertItem(__tr2qs_ctx("&Clear Terminated","filetransferwindow"),this,TQT_SLOT(clearTerminated())); m_pContextPopup->setItemEnabled(id,bHaveTerminated); bool bAreTransfersActive = false; if(m_pListView->childCount() >= 1) bAreTransfersActive = true; - id = m_pContextPopup->insertItem(__tr2qs_ctx("Clear &All","filetransferwindow"),this,SLOT(clearAll())); + id = m_pContextPopup->insertItem(__tr2qs_ctx("Clear &All","filetransferwindow"),this,TQT_SLOT(clearAll())); m_pContextPopup->setItemEnabled(id,bAreTransfersActive); m_pContextPopup->popup(pnt); @@ -426,14 +426,14 @@ void KviFileTransferWindow::openFilePopupActivated(int id) #ifdef COMPILE_KDE_SUPPORT int ip = m_pOpenFilePopup->itemParameter(id); if(ip < 0)return; - QString txt = m_pOpenFilePopup->text(id); + TQString txt = m_pOpenFilePopup->text(id); KviFileTransfer * t = selectedTransfer(); if(!t)return; - QString tmp = t->localFileName(); + TQString tmp = t->localFileName(); if(tmp.isEmpty())return; - QString mimetype = KMimeType::findByPath(tmp)->name(); + TQString mimetype = KMimeType::findByPath(tmp)->name(); KServiceTypeProfile::OfferList offers = KServiceTypeProfile::offers(mimetype,"Application"); for(KServiceTypeProfile::OfferList::Iterator itOffers = offers.begin(); @@ -458,9 +458,9 @@ void KviFileTransferWindow::openLocalFileTerminal() #ifdef COMPILE_ON_WINDOWS KviFileTransfer * t = selectedTransfer(); if(!t)return; - QString tmp = t->localFileName(); + TQString tmp = t->localFileName(); if(tmp.isEmpty())return; - int idx = tmp.findRev("/"); + int idx = tmp.tqfindRev("/"); if(idx == -1)return; tmp = tmp.left(idx); tmp.append("\""); @@ -473,10 +473,10 @@ void KviFileTransferWindow::openLocalFileTerminal() #ifdef COMPILE_KDE_SUPPORT KviFileTransfer * t = selectedTransfer(); if(!t)return; - QString tmp = t->localFileName(); + TQString tmp = t->localFileName(); if(tmp.isEmpty())return; - int idx = tmp.findRev("/"); + int idx = tmp.tqfindRev("/"); if(idx == -1)return; tmp = tmp.left(idx); @@ -493,17 +493,17 @@ void KviFileTransferWindow::deleteLocalFile() KviFileTransfer * t = selectedTransfer(); if(!t)return; - QString fName = t->localFileName(); - QString tmp; + TQString fName = t->localFileName(); + TQString tmp; - KviQString::sprintf(tmp,__tr2qs_ctx("Do you really want to delete the file %Q?","filetransferwindow"),&fName); + KviTQString::sprintf(tmp,__tr2qs_ctx("Do you really want to delete the file %Q?","filetransferwindow"),&fName); - if(QMessageBox::warning(this,__tr2qs_ctx("Confirm delete","filetransferwindow"), + if(TQMessageBox::warning(this,__tr2qs_ctx("Confirm delete","filetransferwindow"), tmp,__tr2qs_ctx("Yes","filetransferwindow"),__tr2qs_ctx("No","filetransferwindow")) != 0) return; - if(!QFile::remove(fName)) - QMessageBox::warning(this,__tr2qs_ctx("Delete failed","filetransferwindow"), + if(!TQFile::remove(fName)) + TQMessageBox::warning(this,__tr2qs_ctx("Delete failed","filetransferwindow"), __tr2qs_ctx("Failed to remove the file","filetransferwindow"), __tr2qs_ctx("OK","filetransferwindow")); } @@ -516,19 +516,19 @@ void KviFileTransferWindow::openLocalFile() KviFileTransfer * t = selectedTransfer(); if(!t)return; - QString tmp = t->localFileName(); + TQString tmp = t->localFileName(); if(tmp.isEmpty())return; - tmp.replace("/","\\"); + tmp.tqreplace("/","\\"); ShellExecute(0,"open",tmp.local8Bit().data(),NULL,NULL,SW_SHOWNORMAL); //You have to link the shell32.lib #else //!COMPILE_ON_WINDOWS // G&N end #ifdef COMPILE_KDE_SUPPORT KviFileTransfer * t = selectedTransfer(); if(!t)return; - QString tmp = t->localFileName(); + TQString tmp = t->localFileName(); if(tmp.isEmpty())return; - QString mimetype = KMimeType::findByPath(tmp)->name(); //KMimeType + TQString mimetype = KMimeType::findByPath(tmp)->name(); //KMimeType KService::Ptr offer = KServiceTypeProfile::preferredService(mimetype,"Application"); if(!offer) { @@ -551,9 +551,9 @@ void KviFileTransferWindow::openLocalFileWith() #ifdef COMPILE_ON_WINDOWS KviFileTransfer * t = selectedTransfer(); if(!t)return; - QString tmp = t->localFileName(); + TQString tmp = t->localFileName(); if(tmp.isEmpty())return; - tmp.replace("/","\\"); + tmp.tqreplace("/","\\"); tmp.prepend("rundll32.exe shell32.dll,OpenAs_RunDLL "); // this if to show the 'open with...' window WinExec(tmp.local8Bit().data(),SW_SHOWNORMAL); #else //!COMPILE_ON_WINDOWS @@ -561,7 +561,7 @@ void KviFileTransferWindow::openLocalFileWith() #ifdef COMPILE_KDE_SUPPORT KviFileTransfer * t = selectedTransfer(); if(!t)return; - QString tmp = t->localFileName(); + TQString tmp = t->localFileName(); if(tmp.isEmpty())return; KURL::List lst; @@ -577,15 +577,15 @@ void KviFileTransferWindow::copyLocalFileToClipboard() { KviFileTransfer * t = selectedTransfer(); if(!t)return; - QString tmp = t->localFileName(); + TQString tmp = t->localFileName(); if(tmp.isEmpty())return; #ifdef COMPILE_USE_QT4 - QApplication::clipboard()->setText(tmp); + TQApplication::tqclipboard()->setText(tmp); #else - QApplication::clipboard()->setSelectionMode(false); - QApplication::clipboard()->setText(tmp); - QApplication::clipboard()->setSelectionMode(true); - QApplication::clipboard()->setText(tmp); + TQApplication::tqclipboard()->setSelectionMode(false); + TQApplication::tqclipboard()->setText(tmp); + TQApplication::tqclipboard()->setSelectionMode(true); + TQApplication::tqclipboard()->setText(tmp); #endif } @@ -595,10 +595,10 @@ void KviFileTransferWindow::openLocalFileFolder() #ifdef COMPILE_ON_WINDOWS KviFileTransfer * t = selectedTransfer(); if(!t)return; - QString tmp = t->localFileName(); + TQString tmp = t->localFileName(); if(tmp.isEmpty())return; - tmp=QFileInfo(tmp).dirPath(TRUE); - tmp.replace('/','\\'); + tmp=TQFileInfo(tmp).dirPath(TRUE); + tmp.tqreplace('/','\\'); tmp.prepend("explorer.exe "); WinExec(tmp.local8Bit().data(), SW_MAXIMIZE); #else //!COMPILE_ON_WINDOWS @@ -606,14 +606,14 @@ void KviFileTransferWindow::openLocalFileFolder() #ifdef COMPILE_KDE_SUPPORT KviFileTransfer * t = selectedTransfer(); if(!t)return; - QString tmp = t->localFileName(); + TQString tmp = t->localFileName(); if(tmp.isEmpty())return; - int idx = tmp.findRev("/"); + int idx = tmp.tqfindRev("/"); if(idx == -1)return; tmp = tmp.left(idx); - QString mimetype = KMimeType::findByPath(tmp)->name(); // inode/directory + TQString mimetype = KMimeType::findByPath(tmp)->name(); // inode/directory KService::Ptr offer = KServiceTypeProfile::preferredService(mimetype,"Application"); if(!offer)return; @@ -634,20 +634,20 @@ void KviFileTransferWindow::heartbeat() KviTalListViewItem * i1; KviTalListViewItem * i2; - i1 = m_pListView->itemAt(QPoint(1,1)); + i1 = m_pListView->itemAt(TQPoint(1,1)); if(!i1) { m_pListView->viewport()->update(); return; } - i2 = m_pListView->itemAt(QPoint(1,m_pListView->viewport()->height() - 2)); + i2 = m_pListView->itemAt(TQPoint(1,m_pListView->viewport()->height() - 2)); if(i2)i2 = i2->nextSibling(); while(i1 && (i1 != i2)) { if(((KviFileTransferItem *)i1)->transfer()->active()) { - m_pListView->repaintItem(i1); + m_pListView->tqrepaintItem(i1); } i1 = i1->nextSibling(); } @@ -655,7 +655,7 @@ void KviFileTransferWindow::heartbeat() void KviFileTransferWindow::clearAll() { - QString tmp; + TQString tmp; bool bHaveAllTerminated = true; KviFileTransferItem * item = (KviFileTransferItem *)m_pListView->firstChild(); @@ -669,11 +669,11 @@ void KviFileTransferWindow::clearAll() item = (KviFileTransferItem *)item->nextSibling(); } - KviQString::sprintf(tmp,__tr2qs_ctx("Clear all transfers, including any in progress?","filetransferwindow")); + KviTQString::sprintf(tmp,__tr2qs_ctx("Clear all transfers, including any in progress?","filetransferwindow")); // If any transfer is active asks for confirm if(!bHaveAllTerminated) - if(QMessageBox::warning(this,__tr2qs_ctx("Clear All Transfers? - KVIrc","filetransferwindow"), tmp,__tr2qs_ctx("Yes","filetransferwindow"),__tr2qs_ctx("No","filetransferwindow")) != 0) + if(TQMessageBox::warning(this,__tr2qs_ctx("Clear All Transfers? - KVIrc","filetransferwindow"), tmp,__tr2qs_ctx("Yes","filetransferwindow"),__tr2qs_ctx("No","filetransferwindow")) != 0) return; KviFileTransferManager::instance()->killAllTransfers(); @@ -689,21 +689,21 @@ void KviFileTransferWindow::getBaseLogFileName(KviStr &buffer) buffer.sprintf("FILETRANSFER"); } -QPixmap * KviFileTransferWindow::myIconPtr() +TQPixmap * KviFileTransferWindow::myIconPtr() { return g_pIconManager->getSmallIcon(KVI_SMALLICON_FILETRANSFER); } -void KviFileTransferWindow::resizeEvent(QResizeEvent *e) +void KviFileTransferWindow::resizeEvent(TQResizeEvent *e) { int h = m_pInput->heightHint(); m_pSplitter->setGeometry(0,0,width(),height() - h); m_pInput->setGeometry(0,height() - h,width(),h); } -QSize KviFileTransferWindow::sizeHint() const +TQSize KviFileTransferWindow::tqsizeHint() const { - return m_pSplitter->sizeHint(); + return m_pSplitter->tqsizeHint(); } void KviFileTransferWindow::fillCaptionBuffers() @@ -737,7 +737,7 @@ void KviFileTransferWindow::die() // KviWindowProperty p; // p.rect = externalGeometry(); // p.isDocked = isAttacched(); -// QValueList l(m_pSplitter->sizes()); +// TQValueList l(m_pSplitter->sizes()); // if(l.count() >= 1)p.splitWidth1 = *(l.at(0)); // if(l.count() >= 2)p.splitWidth2 = *(l.at(1)); // p.timestamp = m_pView->timestamp(); @@ -751,7 +751,7 @@ void KviFileTransferWindow::die() // //void KviFileTransferWindow::setProperties(KviWindowProperty *p) //{ -// QValueList l; +// TQValueList l; // l.append(p->splitWidth1); // l.append(p->splitWidth2); // m_pVertSplitter->setSizes(l); diff --git a/src/modules/filetransferwindow/filetransferwindow.h b/src/modules/filetransferwindow/filetransferwindow.h index 423dc3a1..963c12e0 100644 --- a/src/modules/filetransferwindow/filetransferwindow.h +++ b/src/modules/filetransferwindow/filetransferwindow.h @@ -35,9 +35,9 @@ #include "kvi_tal_listview.h" #include "kvi_tal_popupmenu.h" -#include -#include -#include +#include +#include +#include @@ -50,9 +50,9 @@ protected: KviFileTransfer * m_pTransfer; public: KviFileTransfer * transfer(){ return m_pTransfer; }; - virtual void paintCell(QPainter * p,const QColorGroup &cg,int column,int width,int align); + virtual void paintCell(TQPainter * p,const TQColorGroup &cg,int column,int width,int align); virtual void setHeight(int h); - virtual QString key(int column,bool bAcending) const; + virtual TQString key(int column,bool bAcending) const; }; @@ -60,44 +60,45 @@ class KviFileTransferWindow : public KviWindow , public KviModuleExtension { friend class KviFileTransferItem; Q_OBJECT + TQ_OBJECT public: KviFileTransferWindow(KviModuleExtensionDescriptor * d,KviFrame * lpFrm); ~KviFileTransferWindow(); protected: - QSplitter * m_pVertSplitter; + TQSplitter * m_pVertSplitter; KviTalListView * m_pListView; KviTalPopupMenu * m_pContextPopup; KviTalPopupMenu * m_pLocalFilePopup; KviTalPopupMenu * m_pOpenFilePopup; - QTimer * m_pTimer; - QPixmap * m_pMemPixmap; + TQTimer * m_pTimer; + TQPixmap * m_pMemPixmap; int m_iLineSpacing; // cached fm value public: // Methods virtual void die(); protected: - QPixmap * memPixmap(){ return m_pMemPixmap; }; - virtual QPixmap * myIconPtr(); + TQPixmap * memPixmap(){ return m_pMemPixmap; }; + virtual TQPixmap * myIconPtr(); virtual void fillCaptionBuffers(); virtual void applyOptions(); - virtual void resizeEvent(QResizeEvent *e); + virtual void resizeEvent(TQResizeEvent *e); virtual void getBaseLogFileName(KviStr &buffer); KviFileTransferItem * findItem(KviFileTransfer * t); void fillTransferView(); KviFileTransfer * selectedTransfer(); - virtual void fontChange(const QFont &oldFont); - bool eventFilter( QObject *obj, QEvent *ev ); + virtual void fontChange(const TQFont &oldFont); + bool eventFilter( TQObject *obj, TQEvent *ev ); public: - virtual QSize sizeHint() const; + virtual TQSize tqsizeHint() const; int lineSpacing(){ return m_iLineSpacing; }; protected slots: void transferRegistered(KviFileTransfer *t); void transferUnregistering(KviFileTransfer *t); - void rightButtonPressed(KviTalListViewItem *it,const QPoint &pnt,int col); - void doubleClicked(KviTalListViewItem *it,const QPoint &pnt,int col); + void rightButtonPressed(KviTalListViewItem *it,const TQPoint &pnt,int col); + void doubleClicked(KviTalListViewItem *it,const TQPoint &pnt,int col); void heartbeat(); void clearTerminated(); void clearAll(); - void tipRequest(KviDynamicToolTip * tip,const QPoint &pnt); + void tipRequest(KviDynamicToolTip * tip,const TQPoint &pnt); void openLocalFile(); void openLocalFileWith(); diff --git a/src/modules/filetransferwindow/libkvifiletransferwindow.cpp b/src/modules/filetransferwindow/libkvifiletransferwindow.cpp index 6427e5eb..1fe2217e 100644 --- a/src/modules/filetransferwindow/libkvifiletransferwindow.cpp +++ b/src/modules/filetransferwindow/libkvifiletransferwindow.cpp @@ -32,7 +32,7 @@ #include "kvi_locale.h" #include "kvi_iconmanager.h" -#include +#include KviFileTransferWindow * g_pFileTransferWindow = 0; @@ -45,11 +45,11 @@ static KviModuleExtension * filetransferwindow_extension_alloc(KviModuleExtensio { if(s->pParams) { - if(QVariant * v = s->pParams->find("bCreateMinimized")) + if(TQVariant * v = s->pParams->tqfind("bCreateMinimized")) { if(v->isValid()) { - if(v->type() == QVariant::Bool) + if(v->type() == TQVariant::Bool) { bCreateMinimized = v->toBool(); } @@ -65,11 +65,11 @@ static KviModuleExtension * filetransferwindow_extension_alloc(KviModuleExtensio if(s->pParams) { - if(QVariant * v = s->pParams->find("bNoRaise")) + if(TQVariant * v = s->pParams->tqfind("bNoRaise")) { if(v) { - if(v->isValid() && v->type() == QVariant::Bool) + if(v->isValid() && v->type() == TQVariant::Bool) bNoRaise = v->toBool(); } } @@ -105,11 +105,11 @@ static bool filetransferwindow_kvs_cmd_open(KviKvsModuleCommandCall * c) if(d) { - KviPointerHashTable dict(17,true); + KviPointerHashTable dict(17,true); dict.setAutoDelete(true); - QString dummy; - dict.replace("bCreateMinimized",new QVariant(c->hasSwitch('m',dummy))); - dict.replace("bNoRaise",new QVariant(c->hasSwitch('n',dummy))); + TQString dummy; + dict.tqreplace("bCreateMinimized",new TQVariant(c->hasSwitch('m',dummy))); + dict.tqreplace("bNoRaise",new TQVariant(c->hasSwitch('n',dummy))); d->allocate(c->window(),&dict,0); } else { diff --git a/src/modules/help/helpwidget.cpp b/src/modules/help/helpwidget.cpp index 4036a0dd..67ee30b0 100644 --- a/src/modules/help/helpwidget.cpp +++ b/src/modules/help/helpwidget.cpp @@ -32,61 +32,61 @@ #include "helpwindow.h" #include "kvi_fileutils.h" -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include extern Index * g_pDocIndex; extern KviPointerList * g_pHelpWindowList; extern KviPointerList * g_pHelpWidgetList; -KviHelpWidget::KviHelpWidget(QWidget * par,KviFrame * lpFrm,bool bIsStandalone) -: QWidget(par,"help_widget") +KviHelpWidget::KviHelpWidget(TQWidget * par,KviFrame * lpFrm,bool bIsStandalone) +: TQWidget(par,"help_widget") { if(bIsStandalone)g_pHelpWidgetList->append(this); m_bIsStandalone = bIsStandalone; -//#warning "Re enable this when using Qt 3.0 : QProcess " - m_pTextBrowser = new QTextBrowser(this,"text_browser"); - m_pTextBrowser->setFrameStyle(QFrame::StyledPanel|QFrame::Sunken); +//#warning "Re enable this when using TQt 3.0 : TQProcess " + m_pTextBrowser = new TQTextBrowser(this,"text_browser"); + m_pTextBrowser->setFrameStyle(TQFrame::StyledPanel|TQFrame::Sunken); #ifndef COMPILE_USE_QT4 - m_pTextBrowser->setFocusPolicy(QWidget::NoFocus); + m_pTextBrowser->setFocusPolicy(TQ_NoFocus); #endif m_pToolBar = new KviTalHBox(this); m_pBtnIndex = new KviStyledToolButton(m_pToolBar); m_pBtnIndex->setIconSet(*g_pIconManager->getBigIcon(KVI_BIGICON_HELPINDEX)); - connect(m_pBtnIndex,SIGNAL(clicked()),this,SLOT(showIndex())); + connect(m_pBtnIndex,TQT_SIGNAL(clicked()),this,TQT_SLOT(showIndex())); //m_pBtnIndex->setUsesBigPixmap(true); m_pBtnBackward = new KviStyledToolButton(m_pToolBar); m_pBtnBackward->setIconSet(*g_pIconManager->getBigIcon(KVI_BIGICON_HELPBACK)); - connect(m_pBtnBackward,SIGNAL(clicked()),m_pTextBrowser,SLOT(backward())); + connect(m_pBtnBackward,TQT_SIGNAL(clicked()),m_pTextBrowser,TQT_SLOT(backward())); m_pBtnBackward->setEnabled(false); //m_pBtnBackward->setUsesBigPixmap(true); m_pBtnForward = new KviStyledToolButton(m_pToolBar); m_pBtnForward->setIconSet(*g_pIconManager->getBigIcon(KVI_BIGICON_HELPFORWARD)); - connect(m_pBtnForward,SIGNAL(clicked()),m_pTextBrowser,SLOT(forward())); + connect(m_pBtnForward,TQT_SIGNAL(clicked()),m_pTextBrowser,TQT_SLOT(forward())); m_pBtnForward->setEnabled(false); //m_pBtnForward->setUsesBigPixmap(true); - QWidget* pSpacer=new QWidget(m_pToolBar); + TQWidget* pSpacer=new TQWidget(m_pToolBar); if(bIsStandalone) { - QToolButton * b = new KviStyledToolButton(m_pToolBar); + TQToolButton * b = new KviStyledToolButton(m_pToolBar); b->setIconSet(*g_pIconManager->getBigIcon(KVI_BIGICON_HELPCLOSE)); - connect(b,SIGNAL(clicked()),this,SLOT(doClose())); + connect(b,TQT_SIGNAL(clicked()),this,TQT_SLOT(doClose())); //b->setUsesBigPixmap(true); } m_pToolBar->setStretchFactor(pSpacer,1); - connect(m_pTextBrowser,SIGNAL(backwardAvailable(bool)),m_pBtnBackward,SLOT(setEnabled(bool))); - connect(m_pTextBrowser,SIGNAL(forwardAvailable(bool)),m_pBtnForward,SLOT(setEnabled(bool))); + connect(m_pTextBrowser,TQT_SIGNAL(backwardAvailable(bool)),m_pBtnBackward,TQT_SLOT(setEnabled(bool))); + connect(m_pTextBrowser,TQT_SIGNAL(forwardAvailable(bool)),m_pBtnForward,TQT_SLOT(setEnabled(bool))); m_pTextBrowser->viewport()->installEventFilter(this); @@ -100,15 +100,15 @@ KviHelpWidget::~KviHelpWidget() void KviHelpWidget::showIndex() { #ifdef COMPILE_USE_QT4 - m_pTextBrowser->setSource(QUrl("index.html")); + m_pTextBrowser->setSource(TQUrl("index.html")); #else m_pTextBrowser->setSource("index.html"); #endif } -void KviHelpWidget::resizeEvent(QResizeEvent *e) +void KviHelpWidget::resizeEvent(TQResizeEvent *e) { - int hght = m_pToolBar->sizeHint().height(); + int hght = m_pToolBar->tqsizeHint().height(); if(hght < 40)hght = 40; m_pToolBar->setGeometry(0,0,width(),hght); m_pTextBrowser->setGeometry(0,hght,width(),height() - hght); @@ -116,10 +116,10 @@ void KviHelpWidget::resizeEvent(QResizeEvent *e) void KviHelpWidget::doClose() { - // hack needed to workaround "QToolBar::emulateButtonClicked()" + // hack needed to workaround "TQToolBar::emulateButtonClicked()" // that refers to the "this" pointer after this slot has been // called (from the "too-small-toolbar-for-all-items-popup") - QTimer::singleShot(0,this,SLOT(suicide())); + TQTimer::singleShot(0,this,TQT_SLOT(suicide())); } void KviHelpWidget::suicide() @@ -128,25 +128,25 @@ void KviHelpWidget::suicide() delete this; } -QSize KviHelpWidget::sizeHint() const +TQSize KviHelpWidget::tqsizeHint() const { - int wdth = m_pTextBrowser->sizeHint().width(); - if(m_pToolBar->sizeHint().width() > wdth)wdth = m_pToolBar->sizeHint().width(); - QSize s(wdth,m_pTextBrowser->sizeHint().height() + m_pToolBar->sizeHint().height()); + int wdth = m_pTextBrowser->tqsizeHint().width(); + if(m_pToolBar->tqsizeHint().width() > wdth)wdth = m_pToolBar->tqsizeHint().width(); + TQSize s(wdth,m_pTextBrowser->tqsizeHint().height() + m_pToolBar->tqsizeHint().height()); return s; } -bool KviHelpWidget::eventFilter(QObject * o, QEvent *e) +bool KviHelpWidget::eventFilter(TQObject * o, TQEvent *e) { - QClipboard *cb = QApplication::clipboard(); + TQClipboard *cb = TQApplication::tqclipboard(); - if(e->type() == QEvent::MouseButtonRelease) { + if(e->type() == TQEvent::MouseButtonRelease) { if(m_pTextBrowser->hasSelectedText()) { cb->setText(m_pTextBrowser->selectedText()); } } - return QWidget::eventFilter(o,e); + return TQWidget::eventFilter(o,e); } diff --git a/src/modules/help/helpwidget.h b/src/modules/help/helpwidget.h index e00f8bcf..9e2c1c49 100644 --- a/src/modules/help/helpwidget.h +++ b/src/modules/help/helpwidget.h @@ -23,38 +23,39 @@ // #include "kvi_tal_hbox.h" -#include +#include #include "index.h" -#include +#include class KviFrame; -class QToolButton; -class QLineEdit; +class TQToolButton; +class TQLineEdit; //class KviProcess; -class KviHelpWidget : public QWidget +class KviHelpWidget : public TQWidget { Q_OBJECT + TQ_OBJECT public: - KviHelpWidget(QWidget *par,KviFrame * lpFrm,bool bIsStandalone = false); + KviHelpWidget(TQWidget *par,KviFrame * lpFrm,bool bIsStandalone = false); ~KviHelpWidget(); private: - QToolButton * m_pBtnIndex; - QToolButton * m_pBtnBackward; - QToolButton * m_pBtnForward; + TQToolButton * m_pBtnIndex; + TQToolButton * m_pBtnBackward; + TQToolButton * m_pBtnForward; KviTalHBox * m_pToolBar; - QTextBrowser * m_pTextBrowser; + TQTextBrowser * m_pTextBrowser; bool m_bIsStandalone; protected: - virtual void resizeEvent(QResizeEvent *e); - bool eventFilter(QObject *, QEvent *); + virtual void resizeEvent(TQResizeEvent *e); + bool eventFilter(TQObject *, TQEvent *); protected slots: void doClose(); void showIndex(); void suicide(); public: - virtual QSize sizeHint() const; - QTextBrowser * textBrowser() { return m_pTextBrowser; } + virtual TQSize tqsizeHint() const; + TQTextBrowser * textBrowser() { return m_pTextBrowser; } }; diff --git a/src/modules/help/helpwindow.cpp b/src/modules/help/helpwindow.cpp index 9fc11427..73216c9e 100644 --- a/src/modules/help/helpwindow.cpp +++ b/src/modules/help/helpwindow.cpp @@ -32,12 +32,12 @@ #include "kvi_config.h" #include "kvi_styled_controls.h" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include "kvi_valuelist.h" #include "kvi_sourcesdate.h" @@ -53,20 +53,20 @@ KviHelpWindow::KviHelpWindow(KviFrame * lpFrm,const char * name) if(!g_bIndexingDone) { - QString szDoclist,szDict; + TQString szDoclist,szDict; g_pApp->getLocalKvircDirectory(szDoclist,KviApp::Help,"help.doclist." KVI_SOURCES_DATE); g_pApp->getLocalKvircDirectory(szDict,KviApp::Help,"help.dict." KVI_SOURCES_DATE); - if ( QFileInfo( szDoclist ).exists() && QFileInfo( szDict ).exists() ) { + if ( TQFileInfo( szDoclist ).exists() && TQFileInfo( szDict ).exists() ) { g_pDocIndex->readDict(); } else { #ifdef COMPILE_USE_QT4 - QProgressDialog* pProgressDialog = new QProgressDialog( __tr2qs("Indexing help files"), __tr2qs("Cancel"), 0,100 ); + TQProgressDialog* pProgressDialog = new TQProgressDialog( __tr2qs("Indexing help files"), __tr2qs("Cancel"), 0,100 ); #else - QProgressDialog* pProgressDialog = new QProgressDialog( __tr2qs("Indexing help files"), __tr2qs("Cancel"), 100 ); + TQProgressDialog* pProgressDialog = new TQProgressDialog( __tr2qs("Indexing help files"), __tr2qs("Cancel"), 100 ); #endif - connect(g_pDocIndex,SIGNAL(indexingProgress(int)), pProgressDialog, SLOT(setProgress(int)) ); + connect(g_pDocIndex,TQT_SIGNAL(indexingProgress(int)), pProgressDialog, TQT_SLOT(setProgress(int)) ); g_pDocIndex->makeIndex(); g_pDocIndex->writeDict(); g_pDocIndex->writeDocumentList(); @@ -76,45 +76,45 @@ KviHelpWindow::KviHelpWindow(KviFrame * lpFrm,const char * name) } g_pHelpWindowList->append(this); - m_pSplitter = new QSplitter(Qt::Horizontal,this,"main_splitter"); + m_pSplitter = new TQSplitter(Qt::Horizontal,this,"main_splitter"); m_pHelpWidget = new KviHelpWidget(m_pSplitter,lpFrm); m_pToolBar=new KviTalVBox(m_pSplitter); - m_pTabWidget = new QTabWidget(m_pToolBar); + m_pTabWidget = new TQTabWidget(m_pToolBar); m_pIndexTab = new KviTalVBox(m_pTabWidget); m_pTabWidget->insertTab(m_pIndexTab,__tr2qs("Index")); KviTalHBox* pSearchBox = new KviTalHBox(m_pIndexTab); - m_pIndexSearch = new QLineEdit(pSearchBox); - connect( m_pIndexSearch, SIGNAL( textChanged(const QString&) ), - this, SLOT( searchInIndex(const QString&) ) ); - connect( m_pIndexSearch, SIGNAL( returnPressed() ), - this, SLOT( showIndexTopic() ) ); + m_pIndexSearch = new TQLineEdit(pSearchBox); + connect( m_pIndexSearch, TQT_SIGNAL( textChanged(const TQString&) ), + this, TQT_SLOT( searchInIndex(const TQString&) ) ); + connect( m_pIndexSearch, TQT_SIGNAL( returnPressed() ), + this, TQT_SLOT( showIndexTopic() ) ); KviStyledToolButton* pBtnRefreshIndex = new KviStyledToolButton(pSearchBox); pBtnRefreshIndex->setIconSet(*g_pIconManager->getBigIcon(KVI_REFRESH_IMAGE_NAME)); - connect(pBtnRefreshIndex,SIGNAL(clicked()),this,SLOT(refreshIndex())); - QToolTip::add( pBtnRefreshIndex, __tr2qs("Refresh index") ); + connect(pBtnRefreshIndex,TQT_SIGNAL(clicked()),this,TQT_SLOT(refreshIndex())); + TQToolTip::add( pBtnRefreshIndex, __tr2qs("Refresh index") ); m_pIndexListBox = new KviTalListBox(m_pIndexTab); - QStringList docList=g_pDocIndex->titlesList(); + TQStringList docList=g_pDocIndex->titlesList(); m_pIndexListBox->insertStringList(docList); - connect(m_pIndexListBox,SIGNAL(selected(int)),this,SLOT(indexSelected ( int ))); + connect(m_pIndexListBox,TQT_SIGNAL(selected(int)),this,TQT_SLOT(indexSelected ( int ))); m_pIndexListBox->sort(); m_pSearchTab = new KviTalVBox(m_pTabWidget); m_pTabWidget->insertTab(m_pSearchTab,__tr2qs("Search")); - m_pTermsEdit = new QLineEdit(m_pSearchTab); -/* connect( m_pTermsEdit, SIGNAL( textChanged(const QString&) ), - this, SLOT( searchInIndex(const QString&) ) );*/ - connect( m_pTermsEdit, SIGNAL( returnPressed() ), - this, SLOT( startSearch() ) ); + m_pTermsEdit = new TQLineEdit(m_pSearchTab); +/* connect( m_pTermsEdit, TQT_SIGNAL( textChanged(const TQString&) ), + this, TQT_SLOT( searchInIndex(const TQString&) ) );*/ + connect( m_pTermsEdit, TQT_SIGNAL( returnPressed() ), + this, TQT_SLOT( startSearch() ) ); m_pResultBox = new KviTalListBox(m_pSearchTab); - connect(m_pResultBox,SIGNAL(selected(int)),this,SLOT(searchSelected ( int ))); + connect(m_pResultBox,TQT_SIGNAL(selected(int)),this,TQT_SLOT(searchSelected ( int ))); KviValueList li; li.append(width()-80); @@ -149,17 +149,17 @@ void KviHelpWindow::refreshIndex() { m_pIndexListBox->clear(); #ifdef COMPILE_USE_QT4 - QProgressDialog* pProgressDialog = new QProgressDialog( __tr2qs("Indexing help files"), __tr2qs("Cancel"), 0,100 ); + TQProgressDialog* pProgressDialog = new TQProgressDialog( __tr2qs("Indexing help files"), __tr2qs("Cancel"), 0,100 ); #else - QProgressDialog* pProgressDialog = new QProgressDialog( __tr2qs("Indexing help files"), __tr2qs("Cancel"), 100 ); + TQProgressDialog* pProgressDialog = new TQProgressDialog( __tr2qs("Indexing help files"), __tr2qs("Cancel"), 100 ); #endif - connect(g_pDocIndex,SIGNAL(indexingProgress(int)), pProgressDialog, SLOT(setProgress(int)) ); + connect(g_pDocIndex,TQT_SIGNAL(indexingProgress(int)), pProgressDialog, TQT_SLOT(setProgress(int)) ); g_pDocIndex->makeIndex(); g_pDocIndex->writeDict(); g_pDocIndex->writeDocumentList(); delete pProgressDialog; g_bIndexingDone=TRUE; - QStringList docList=g_pDocIndex->titlesList(); + TQStringList docList=g_pDocIndex->titlesList(); m_pIndexListBox->insertStringList(docList); m_pIndexListBox->sort(); } @@ -167,54 +167,54 @@ void KviHelpWindow::refreshIndex() void KviHelpWindow::startSearch() { - QString str = m_pTermsEdit->text(); - str = str.replace( "\'", "\"" ); - str = str.replace( "`", "\"" ); - QString buf = str; - str = str.replace( "-", " " ); - str = str.replace( QRegExp( "\\s[\\S]?\\s" ), " " ); - m_terms = QStringList::split( " ", str ); - QStringList termSeq; - QStringList seqWords; - QStringList::iterator it = m_terms.begin(); + TQString str = m_pTermsEdit->text(); + str = str.tqreplace( "\'", "\"" ); + str = str.tqreplace( "`", "\"" ); + TQString buf = str; + str = str.tqreplace( "-", " " ); + str = str.tqreplace( TQRegExp( "\\s[\\S]?\\s" ), " " ); + m_terms = TQStringList::split( " ", str ); + TQStringList termSeq; + TQStringList seqWords; + TQStringList::iterator it = m_terms.begin(); for ( ; it != m_terms.end(); ++it ) { (*it) = (*it).simplifyWhiteSpace(); (*it) = (*it).lower(); - (*it) = (*it).replace( "\"", "" ); + (*it) = (*it).tqreplace( "\"", "" ); } - if ( str.contains( '\"' ) ) { + if ( str.tqcontains( '\"' ) ) { #ifdef COMPILE_USE_QT4 if ( (str.count( '\"' ))%2 == 0 ) { #else - if ( (str.contains( '\"' ))%2 == 0 ) { + if ( (str.tqcontains( '\"' ))%2 == 0 ) { #endif int beg = 0; int end = 0; - QString s; - beg = str.find( '\"', beg ); + TQString s; + beg = str.tqfind( '\"', beg ); while ( beg != -1 ) { beg++; - end = str.find( '\"', beg ); + end = str.tqfind( '\"', beg ); s = str.mid( beg, end - beg ); s = s.lower(); s = s.simplifyWhiteSpace(); - if ( s.contains( '*' ) ) { - QMessageBox::warning( this, tr( "Full Text Search" ), + if ( s.tqcontains( '*' ) ) { + TQMessageBox::warning( this, tr( "Full Text Search" ), tr( "Using a wildcard within phrases is not allowed." ) ); return; } - seqWords += QStringList::split( ' ', s ); + seqWords += TQStringList::split( ' ', s ); termSeq << s; - beg = str.find( '\"', end + 1); + beg = str.tqfind( '\"', end + 1); } } else { - QMessageBox::warning( this, tr( "Full Text Search" ), + TQMessageBox::warning( this, tr( "Full Text Search" ), tr( "The closing quotation mark is missing." ) ); return; } } #ifdef COMPILE_USE_QT4 - setCursor( Qt::WaitCursor ); + setCursor( TQt::WaitCursor ); #else setCursor( waitCursor ); #endif @@ -227,7 +227,7 @@ void KviHelpWindow::startSearch() m_terms.clear(); bool isPhrase = FALSE; - QString s = ""; + TQString s = ""; for ( int i = 0; i < (int)buf.length(); ++i ) { if ( buf[i] == '\"' ) { isPhrase = !isPhrase; @@ -247,13 +247,13 @@ void KviHelpWindow::startSearch() m_terms << s; #ifdef COMPILE_USE_QT4 - setCursor( Qt::ArrowCursor ); + setCursor( TQt::ArrowCursor ); #else setCursor( arrowCursor ); #endif } -QTextBrowser * KviHelpWindow::textBrowser() +TQTextBrowser * KviHelpWindow::textBrowser() { return m_pHelpWidget->textBrowser(); } @@ -261,16 +261,16 @@ QTextBrowser * KviHelpWindow::textBrowser() void KviHelpWindow::showIndexTopic() { if (m_pIndexSearch->text().isEmpty()|| !m_pIndexListBox->selectedItem()) return; - int i=g_pDocIndex->titlesList().findIndex(m_pIndexListBox->selectedItem()->text()); + int i=g_pDocIndex->titlesList().tqfindIndex(m_pIndexListBox->selectedItem()->text()); textBrowser()->setSource(g_pDocIndex->documentList()[ i ]); } -void KviHelpWindow::searchInIndex( const QString &s ) +void KviHelpWindow::searchInIndex( const TQString &s ) { KviTalListBoxItem *i = m_pIndexListBox->firstItem(); - QString sl = s.lower(); + TQString sl = s.lower(); while ( i ) { - QString t = i->text(); + TQString t = i->text(); if ( t.length() >= sl.length() && i->text().left(s.length()).lower() == sl ) { m_pIndexListBox->setCurrentItem( i ); @@ -283,29 +283,29 @@ void KviHelpWindow::searchInIndex( const QString &s ) void KviHelpWindow::indexSelected ( int index ) { - int i=g_pDocIndex->titlesList().findIndex(m_pIndexListBox->text(index)); + int i=g_pDocIndex->titlesList().tqfindIndex(m_pIndexListBox->text(index)); textBrowser()->setSource(g_pDocIndex->documentList()[ i ]); } void KviHelpWindow::searchSelected ( int index ) { - int i=g_pDocIndex->titlesList().findIndex(m_pResultBox->text(index)); + int i=g_pDocIndex->titlesList().tqfindIndex(m_pResultBox->text(index)); textBrowser()->setSource(g_pDocIndex->documentList()[ i ]); } -QPixmap * KviHelpWindow::myIconPtr() +TQPixmap * KviHelpWindow::myIconPtr() { return g_pIconManager->getSmallIcon(KVI_SMALLICON_MDIHELP); } -void KviHelpWindow::resizeEvent(QResizeEvent *e) +void KviHelpWindow::resizeEvent(TQResizeEvent *e) { m_pSplitter->setGeometry(0,0,width(),height()); } -QSize KviHelpWindow::sizeHint() const +TQSize KviHelpWindow::tqsizeHint() const { - return m_pHelpWidget->sizeHint(); + return m_pHelpWidget->tqsizeHint(); } void KviHelpWindow::fillCaptionBuffers() { diff --git a/src/modules/help/helpwindow.h b/src/modules/help/helpwindow.h index 70f27af6..300116f8 100644 --- a/src/modules/help/helpwindow.h +++ b/src/modules/help/helpwindow.h @@ -25,47 +25,48 @@ #include "kvi_window.h" #include "kvi_string.h" #include "kvi_tal_vbox.h" -#include +#include #include "kvi_tal_listbox.h" -#include -#include +#include +#include class KviHelpWidget; -class QTextBrowser; +class TQTextBrowser; class KviHelpWindow : public KviWindow { Q_OBJECT + TQ_OBJECT public: KviHelpWindow(KviFrame * lpFrm,const char * name); ~KviHelpWindow(); protected: KviHelpWidget * m_pHelpWidget; KviTalVBox * m_pToolBar; - QTabWidget * m_pTabWidget; + TQTabWidget * m_pTabWidget; KviTalVBox * m_pIndexTab; KviTalVBox * m_pSearchTab; KviTalListBox * m_pIndexListBox; - QLineEdit * m_pIndexSearch; - QStringList m_foundDocs; - QStringList m_terms; + TQLineEdit * m_pIndexSearch; + TQStringList m_foundDocs; + TQStringList m_terms; KviTalListBox * m_pResultBox; - QLineEdit * m_pTermsEdit; + TQLineEdit * m_pTermsEdit; public: KviHelpWidget * helpWidget(){ return m_pHelpWidget; }; protected: - virtual QPixmap * myIconPtr(); + virtual TQPixmap * myIconPtr(); virtual void fillCaptionBuffers(); - virtual void resizeEvent(QResizeEvent *e); + virtual void resizeEvent(TQResizeEvent *e); virtual void saveProperties(KviConfig * cfg); virtual void loadProperties(KviConfig * cfg); public: - virtual QSize sizeHint() const; - QTextBrowser * textBrowser(); + virtual TQSize tqsizeHint() const; + TQTextBrowser * textBrowser(); public slots: void indexSelected ( int ); - void searchInIndex( const QString &s ); + void searchInIndex( const TQString &s ); void showIndexTopic(); void startSearch(); void searchSelected ( int index ); diff --git a/src/modules/help/index.cpp b/src/modules/help/index.cpp index 659ff44c..ba5e72f3 100755 --- a/src/modules/help/index.cpp +++ b/src/modules/help/index.cpp @@ -1,11 +1,11 @@ #include "index.h" #include "kvi_file.h" -#include -#include +#include +#include #include "kvi_pointerhashtable.h" -#include -#include +#include +#include #include @@ -18,43 +18,43 @@ int kvi_compare(const Term * p1,const Term * p2) return 1; } -QDataStream &operator>>( QDataStream &s, Document &l ) +TQDataStream &operator>>( TQDataStream &s, Document &l ) { s >> l.docNumber; s >> l.frequency; return s; } -QDataStream &operator<<( QDataStream &s, const Document &l ) +TQDataStream &operator<<( TQDataStream &s, const Document &l ) { - s << (Q_INT16)l.docNumber; - s << (Q_INT16)l.frequency; + s << (TQ_INT16)l.docNumber; + s << (TQ_INT16)l.frequency; return s; } -Index::Index( const QString &dp, const QString &hp ) +Index::Index( const TQString &dp, const TQString &hp ) - : QObject( 0, 0 ), dict( 8999 ), docPath( dp ) + : TQObject( 0, 0 ), dict( 8999 ), docPath( dp ) { alreadyHaveDocList = FALSE; lastWindowClosed = FALSE; - connect( qApp, SIGNAL( lastWindowClosed() ), - this, SLOT( setLastWinClosed() ) ); + connect( tqApp, TQT_SIGNAL( lastWindowClosed() ), + this, TQT_SLOT( setLastWinClosed() ) ); } -Index::Index( const QStringList &dl, const QString &hp ) +Index::Index( const TQStringList &dl, const TQString &hp ) - : QObject( 0, 0 ), dict( 8999 ) + : TQObject( 0, 0 ), dict( 8999 ) { docList = dl; alreadyHaveDocList = TRUE; lastWindowClosed = FALSE; - connect( qApp, SIGNAL( lastWindowClosed() ), - this, SLOT( setLastWinClosed() ) ); + connect( tqApp, TQT_SIGNAL( lastWindowClosed() ), + this, TQT_SLOT( setLastWinClosed() ) ); } @@ -69,7 +69,7 @@ void Index::setLastWinClosed() -void Index::setDictionaryFile( const QString &f ) +void Index::setDictionaryFile( const TQString &f ) { @@ -79,7 +79,7 @@ void Index::setDictionaryFile( const QString &f ) -void Index::setDocListFile( const QString &f ) +void Index::setDocListFile( const TQString &f ) { docListFile = f; } @@ -93,7 +93,7 @@ int Index::makeIndex() if ( docList.isEmpty() ) return 1; dict.clear(); - QStringList::Iterator it = docList.begin(); + TQStringList::Iterator it = docList.begin(); int steps = docList.count() / 100; if ( !steps ) steps++; @@ -118,10 +118,10 @@ void Index::setupDocumentList() { docList.clear(); titleList.clear(); - QDir d( docPath ); - QString szCur; - QStringList lst = d.entryList( "*.html" ); - QStringList::ConstIterator it = lst.begin(); + TQDir d( docPath ); + TQString szCur; + TQStringList lst = d.entryList( "*.html" ); + TQStringList::ConstIterator it = lst.begin(); for ( ; it != lst.end(); ++it ) { szCur=docPath + "/" + *it; @@ -132,7 +132,7 @@ void Index::setupDocumentList() -void Index::insertInDict( const QString &str, int docNum ) +void Index::insertInDict( const TQString &str, int docNum ) { if ( strcmp( str, "amp" ) == 0 || strcmp( str, "nbsp" ) == 0 ) return; @@ -152,28 +152,28 @@ void Index::insertInDict( const QString &str, int docNum ) -void Index::parseDocument( const QString &filename, int docNum ) +void Index::parseDocument( const TQString &filename, int docNum ) { KviFile file( filename ); if ( !file.openForReading() ) { qWarning( "can not open file " + filename ); return; } - QTextStream s( &file ); - QString text = s.read(); + TQTextStream s( &file ); + TQString text = s.read(); if (text.isNull()) return; bool valid = TRUE; - const QChar *buf = text.unicode(); - QChar str[64]; - QChar c = buf[0]; + const TQChar *buf = text.tqunicode(); + TQChar str[64]; + TQChar c = buf[0]; int j = 0; int i = 0; while ( (uint)j < text.length() ) { if ( c == '<' || c == '&' ) { valid = FALSE; if ( i > 1 ) - insertInDict( QString(str,i), docNum ); + insertInDict( TQString(str,i), docNum ); i = 0; c = buf[++j]; continue; @@ -202,7 +202,7 @@ void Index::parseDocument( const QString &filename, int docNum ) if ( i > 1 ) - insertInDict( QString(str,i), docNum ); + insertInDict( TQString(str,i), docNum ); i = 0; @@ -214,7 +214,7 @@ void Index::parseDocument( const QString &filename, int docNum ) if ( i > 1 ) - insertInDict( QString(str,i), docNum ); + insertInDict( TQString(str,i), docNum ); file.close(); @@ -226,7 +226,7 @@ void Index::writeDict() { - KviPointerHashTableIterator it( dict ); + KviPointerHashTableIterator it( dict ); KviFile f( dictFile ); @@ -234,7 +234,7 @@ void Index::writeDict() return; - QDataStream s( &f ); + TQDataStream s( &f ); for( ; it.current(); ++it ) { @@ -260,14 +260,14 @@ void Index::writeDocumentList() KviFile f( docListFile ); if ( !f.openForWriting() ) return; - QTextStream s( &f ); - QString docs = docList.join("[#item#]"); + TQTextStream s( &f ); + TQString docs = docList.join("[#item#]"); s << docs; KviFile f1( docListFile+".titles" ); if ( !f1.openForWriting() ) return; - QTextStream s1( &f1 ); + TQTextStream s1( &f1 ); docs = titleList.join("[#item#]"); s1 << docs; } @@ -281,8 +281,8 @@ void Index::readDict() if ( !f.openForReading() ) return; dict.clear(); - QDataStream s( &f ); - QString key; + TQDataStream s( &f ); + TQString key; KviValueList docs; while ( !s.atEnd() ) { s >> key; @@ -301,21 +301,21 @@ void Index::readDocumentList() KviFile f( docListFile ); if ( !f.openForReading() ) return; - QTextStream s( &f ); - docList = QStringList::split("[#item#]",s.read()); + TQTextStream s( &f ); + docList = TQStringList::split("[#item#]",s.read()); //reading titles KviFile f1( docListFile+".titles" ); if ( !f1.openForReading() ) return; - QTextStream s1( &f1 ); - titleList = QStringList::split("[#item#]",s1.read()); + TQTextStream s1( &f1 ); + titleList = TQStringList::split("[#item#]",s1.read()); // debug(titleList); } -QStringList Index::query( const QStringList &terms, const QStringList &termSeq, const QStringList &seqWords ) +TQStringList Index::query( const TQStringList &terms, const TQStringList &termSeq, const TQStringList &seqWords ) { @@ -323,13 +323,13 @@ QStringList Index::query( const QStringList &terms, const QStringList &termSeq, - QStringList::ConstIterator it = terms.begin(); + TQStringList::ConstIterator it = terms.begin(); for ( it = terms.begin(); it != terms.end(); ++it ) { Entry *e = 0; - if ( (*it).contains( '*' ) ) { + if ( (*it).tqcontains( '*' ) ) { KviValueList wcts = setupDummyTerm( getWildcardTerms( *it ) ); @@ -343,7 +343,7 @@ QStringList Index::query( const QStringList &terms, const QStringList &termSeq, } else { - return QStringList(); + return TQStringList(); } @@ -357,7 +357,7 @@ QStringList Index::query( const QStringList &terms, const QStringList &termSeq, if ( !termList.count() ) - return QStringList(); + return TQStringList(); termList.removeFirst(); @@ -409,7 +409,7 @@ QStringList Index::query( const QStringList &terms, const QStringList &termSeq, - QStringList results; + TQStringList results; #ifndef COMPILE_USE_QT4 qHeapSort( minDocs ); @@ -426,7 +426,7 @@ QStringList Index::query( const QStringList &terms, const QStringList &termSeq, - QString fileName; + TQString fileName; for ( C = minDocs.begin(); C != minDocs.end(); ++C ) { @@ -444,7 +444,7 @@ QStringList Index::query( const QStringList &terms, const QStringList &termSeq, -QString Index::getDocumentTitle( const QString &fileName ) +TQString Index::getDocumentTitle( const TQString &fileName ) { @@ -458,19 +458,19 @@ QString Index::getDocumentTitle( const QString &fileName ) } - QTextStream s( &file ); + TQTextStream s( &file ); - QString text = s.read(); + TQString text = s.read(); - int start = text.find( "", 0, FALSE ) + 7; + int start = text.tqfind( "<title>", 0, FALSE ) + 7; - int end = text.find( "", 0, FALSE ); + int end = text.tqfind( "", 0, FALSE ); - QString title = ( end - start <= 0 ? tr("Untitled") : text.mid( start, end - start ) ); + TQString title = ( end - start <= 0 ? tr("Untitled") : text.mid( start, end - start ) ); return title; @@ -478,22 +478,22 @@ QString Index::getDocumentTitle( const QString &fileName ) -QStringList Index::getWildcardTerms( const QString &term ) +TQStringList Index::getWildcardTerms( const TQString &term ) { - QStringList lst; + TQStringList lst; - QStringList terms = split( term ); + TQStringList terms = split( term ); #ifdef COMPILE_USE_QT4 - QStringList::Iterator iter; + TQStringList::Iterator iter; #else - KviValueList::iterator iter; + KviValueList::iterator iter; #endif - KviPointerHashTableIterator it( dict ); + KviPointerHashTableIterator it( dict ); for( ; it.current(); ++it ) { @@ -501,7 +501,7 @@ QStringList Index::getWildcardTerms( const QString &term ) bool found = FALSE; - QString text( it.currentKey() ); + TQString text( it.currentKey() ); for ( iter = terms.begin(); iter != terms.end(); ++iter ) { @@ -521,11 +521,11 @@ QStringList Index::getWildcardTerms( const QString &term ) } - index = text.find( *iter, index ); + index = text.tqfind( *iter, index ); if ( *iter == terms.last() && index != (int)text.length()-1 ) { - index = text.findRev( *iter ); + index = text.tqfindRev( *iter ); if ( index != (int)text.length() - (int)(*iter).length() ) { @@ -569,15 +569,15 @@ QStringList Index::getWildcardTerms( const QString &term ) -QStringList Index::split( const QString &str ) +TQStringList Index::split( const TQString &str ) { - QStringList lst; + TQStringList lst; int j = 0; - int i = str.find( '*', j ); + int i = str.tqfind( '*', j ); @@ -593,7 +593,7 @@ QStringList Index::split( const QString &str ) j = i + 1; - i = str.find( '*', j ); + i = str.tqfind( '*', j ); } @@ -613,13 +613,13 @@ QStringList Index::split( const QString &str ) -KviValueList Index::setupDummyTerm( const QStringList &terms ) +KviValueList Index::setupDummyTerm( const TQStringList &terms ) { TermList termList; - QStringList::ConstIterator it = terms.begin(); + TQStringList::ConstIterator it = terms.begin(); for ( ; it != terms.end(); ++it ) { @@ -663,7 +663,7 @@ KviValueList Index::setupDummyTerm( const QStringList &terms ) for ( docIt = docs.begin(); docIt != docs.end(); ++docIt ) { - if ( maxList.findIndex( *docIt ) == -1 ) + if ( maxList.tqfindIndex( *docIt ) == -1 ) maxList.append( *docIt ); @@ -679,7 +679,7 @@ KviValueList Index::setupDummyTerm( const QStringList &terms ) -void Index::buildMiniDict( const QString &str ) +void Index::buildMiniDict( const TQString &str ) { @@ -693,7 +693,7 @@ void Index::buildMiniDict( const QString &str ) -bool Index::searchForPattern( const QStringList &patterns, const QStringList &words, const QString &fileName ) +bool Index::searchForPattern( const TQStringList &patterns, const TQStringList &words, const TQString &fileName ) { @@ -713,7 +713,7 @@ bool Index::searchForPattern( const QStringList &patterns, const QStringList &wo miniDict.clear(); - QStringList::ConstIterator cIt = words.begin(); + TQStringList::ConstIterator cIt = words.begin(); for ( ; cIt != words.end(); ++cIt ) @@ -721,17 +721,17 @@ bool Index::searchForPattern( const QStringList &patterns, const QStringList &wo - QTextStream s( &file ); + TQTextStream s( &file ); - QString text = s.read(); + TQString text = s.read(); bool valid = TRUE; - const QChar *buf = text.unicode(); + const TQChar *buf = text.tqunicode(); - QChar str[64]; + TQChar str[64]; - QChar c = buf[0]; + TQChar c = buf[0]; int j = 0; @@ -745,7 +745,7 @@ bool Index::searchForPattern( const QStringList &patterns, const QStringList &wo if ( i > 1 ) - buildMiniDict( QString(str,i) ); + buildMiniDict( TQString(str,i) ); i = 0; @@ -783,7 +783,7 @@ bool Index::searchForPattern( const QStringList &patterns, const QStringList &wo if ( i > 1 ) - buildMiniDict( QString(str,i) ); + buildMiniDict( TQString(str,i) ); i = 0; @@ -795,15 +795,15 @@ bool Index::searchForPattern( const QStringList &patterns, const QStringList &wo if ( i > 1 ) - buildMiniDict( QString(str,i) ); + buildMiniDict( TQString(str,i) ); file.close(); - QStringList::ConstIterator patIt = patterns.begin(); + TQStringList::ConstIterator patIt = patterns.begin(); - QStringList wordLst; + TQStringList wordLst; KviValueList a, b; @@ -811,7 +811,7 @@ bool Index::searchForPattern( const QStringList &patterns, const QStringList &wo for ( ; patIt != patterns.end(); ++patIt ) { - wordLst = QStringList::split( ' ', *patIt ); + wordLst = TQStringList::split( ' ', *patIt ); a = miniDict[ wordLst[0] ]->positions; @@ -823,7 +823,7 @@ bool Index::searchForPattern( const QStringList &patterns, const QStringList &wo while ( aIt != a.end() ) { - if ( b.find( *aIt + 1 ) != b.end() ) { + if ( b.tqfind( *aIt + 1 ) != b.end() ) { (*aIt)++; diff --git a/src/modules/help/index.h b/src/modules/help/index.h index 9debcb3e..fe41eea3 100755 --- a/src/modules/help/index.h +++ b/src/modules/help/index.h @@ -1,15 +1,15 @@ /********************************************************************** ** Copyright (C) 2000-2003 Trolltech AS. All rights reserved. ** -** This file is part of the Qt Assistant. +** This file is part of the TQt Assistant. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** -** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition -** licenses may use this file in accordance with the Qt Commercial License +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License ** Agreement provided with the Software. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE @@ -17,7 +17,7 @@ ** ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about Qt Commercial License Agreements. +** information about TQt Commercial License Agreements. ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. @@ -29,12 +29,12 @@ #ifndef INDEX_H #define INDEX_H -#include +#include #include "kvi_pointerhashtable.h" #include "kvi_pointerlist.h" #include "kvi_valuelist.h" -#include -#include +#include +#include struct Document { Document( int d, int f ) : docNumber( d ), frequency( f ) {} @@ -51,16 +51,17 @@ struct Document { bool operator>( const Document &doc ) const { return frequency < doc.frequency; } - Q_INT16 docNumber; - Q_INT16 frequency; + TQ_INT16 docNumber; + TQ_INT16 frequency; }; -QDataStream &operator>>( QDataStream &s, Document &l ); -QDataStream &operator<<( QDataStream &s, const Document &l ); +TQDataStream &operator>>( TQDataStream &s, Document &l ); +TQDataStream &operator<<( TQDataStream &s, const Document &l ); -class Index : public QObject +class Index : public TQObject { Q_OBJECT + TQ_OBJECT public: struct Entry { Entry( int d ) { documents.append( Document( d, 1 ) ); } @@ -71,47 +72,47 @@ public: PosEntry( int p ) { positions.append( p ); } KviValueList positions; }; - Index( const QString &dp, const QString &hp ); - Index( const QStringList &dl, const QString &hp ); + Index( const TQString &dp, const TQString &hp ); + Index( const TQStringList &dl, const TQString &hp ); void writeDict(); void readDict(); int makeIndex(); - QStringList query( const QStringList&, const QStringList&, const QStringList& ); - QString getDocumentTitle( const QString& ); - void setDictionaryFile( const QString& ); - void setDocListFile( const QString& ); + TQStringList query( const TQStringList&, const TQStringList&, const TQStringList& ); + TQString getDocumentTitle( const TQString& ); + void setDictionaryFile( const TQString& ); + void setDocListFile( const TQString& ); void writeDocumentList(); void readDocumentList(); void setupDocumentList(); - const QStringList& documentList() { return docList; }; - const QStringList& titlesList() { return titleList; }; + const TQStringList& documentList() { return docList; }; + const TQStringList& titlesList() { return titleList; }; signals: void indexingProgress( int ); private slots: void setLastWinClosed(); private: - void parseDocument( const QString&, int ); - void insertInDict( const QString&, int ); - QStringList getWildcardTerms( const QString& ); - QStringList split( const QString& ); - KviValueList setupDummyTerm( const QStringList& ); - bool searchForPattern( const QStringList&, const QStringList&, const QString& ); - void buildMiniDict( const QString& ); - QStringList docList; - QStringList titleList; - KviPointerHashTable dict; - KviPointerHashTable miniDict; + void parseDocument( const TQString&, int ); + void insertInDict( const TQString&, int ); + TQStringList getWildcardTerms( const TQString& ); + TQStringList split( const TQString& ); + KviValueList setupDummyTerm( const TQStringList& ); + bool searchForPattern( const TQStringList&, const TQStringList&, const TQString& ); + void buildMiniDict( const TQString& ); + TQStringList docList; + TQStringList titleList; + KviPointerHashTable dict; + KviPointerHashTable miniDict; uint wordNum; - QString docPath; - QString dictFile, docListFile; + TQString docPath; + TQString dictFile, docListFile; bool alreadyHaveDocList; bool lastWindowClosed; }; struct Term { - Term( const QString &t, int f, KviValueList l ) + Term( const TQString &t, int f, KviValueList l ) : term( t ), frequency( f ), documents( l ) {} - QString term; + TQString term; int frequency; KviValueListdocuments; }; diff --git a/src/modules/help/libkvihelp.cpp b/src/modules/help/libkvihelp.cpp index c8da3c33..af594088 100644 --- a/src/modules/help/libkvihelp.cpp +++ b/src/modules/help/libkvihelp.cpp @@ -34,11 +34,11 @@ #include "kvi_frame.h" #ifdef COMPILE_USE_QT4 - #include + #include #endif -#include +#include Index * g_pDocIndex = 0; KviPointerList * g_pHelpWidgetList = 0; KviPointerList * g_pHelpWindowList = 0; @@ -141,7 +141,7 @@ static bool help_kvs_cmd_search(KviKvsModuleCommandCall * c) static bool help_kvs_cmd_open(KviKvsModuleCommandCall * c) { - QString doc; + TQString doc; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("document",KVS_PT_STRING,KVS_PF_OPTIONAL,doc) KVSM_PARAMETERS_END(c) @@ -149,7 +149,7 @@ static bool help_kvs_cmd_open(KviKvsModuleCommandCall * c) #ifdef COMPILE_USE_QT4 Q3MimeSourceFactory * f = Q3MimeSourceFactory::defaultFactory(); #else - QMimeSourceFactory * f = QMimeSourceFactory::defaultFactory(); + TQMimeSourceFactory * f = TQMimeSourceFactory::defaultFactory(); #endif if(f) { @@ -157,7 +157,7 @@ static bool help_kvs_cmd_open(KviKvsModuleCommandCall * c) doc = "nohelpavailable.html"; } - if(!c->switches()->find('n',"new")) + if(!c->switches()->tqfind('n',"new")) { KviHelpWidget * w = (KviHelpWidget *)c->window()->frame()->child("help_widget","KviHelpWidget"); if(w) @@ -166,7 +166,7 @@ static bool help_kvs_cmd_open(KviKvsModuleCommandCall * c) return true; } } - if(c->switches()->find('m',"mdi")) + if(c->switches()->tqfind('m',"mdi")) { KviHelpWindow *w = new KviHelpWindow(c->window()->frame(),"Help browser"); w->textBrowser()->setSource(doc); @@ -185,7 +185,7 @@ static bool help_kvs_cmd_open(KviKvsModuleCommandCall * c) static bool help_module_init(KviModule * m) { - QString szHelpDir,szDocList; + TQString szHelpDir,szDocList; g_pApp->getLocalKvircDirectory(szDocList,KviApp::Help,"help.doclist." KVI_SOURCES_DATE); g_pApp->getGlobalKvircDirectory(szHelpDir,KviApp::Help); diff --git a/src/modules/http/httpfiletransfer.cpp b/src/modules/http/httpfiletransfer.cpp index 09c3b1f9..789b7a1b 100644 --- a/src/modules/http/httpfiletransfer.cpp +++ b/src/modules/http/httpfiletransfer.cpp @@ -35,10 +35,10 @@ #include "kvi_kvs_script.h" #include "kvi_tal_popupmenu.h" -#include +#include static KviPointerList * g_pHttpFileTransfers = 0; -static QPixmap * g_pHttpIcon = 0; +static TQPixmap * g_pHttpIcon = 0; KviHttpFileTransfer::KviHttpFileTransfer() @@ -58,16 +58,16 @@ KviHttpFileTransfer::KviHttpFileTransfer() m_pHttpRequest = new KviHttpRequest(); - connect(m_pHttpRequest,SIGNAL(status(const QString &)),this,SLOT(statusMessage(const QString &))); - connect(m_pHttpRequest,SIGNAL(terminated(bool)),this,SLOT(transferTerminated(bool))); - connect(m_pHttpRequest,SIGNAL(header(KviPointerHashTable *)),this,SLOT(headersReceived(KviPointerHashTable *))); - connect(m_pHttpRequest,SIGNAL(resolvingHost(const QString &)),this,SLOT(resolvingHost(const QString &))); - connect(m_pHttpRequest,SIGNAL(requestSent(const QStringList &)),this,SLOT(requestSent(const QStringList &))); - connect(m_pHttpRequest,SIGNAL(contactingHost(const QString &)),this,SLOT(contactingHost(const QString &))); - connect(m_pHttpRequest,SIGNAL(receivedResponse(const QString &)),this,SLOT(receivedResponse(const QString &))); - connect(m_pHttpRequest,SIGNAL(connectionEstabilished()),this,SLOT(connectionEstabilished())); + connect(m_pHttpRequest,TQT_SIGNAL(status(const TQString &)),this,TQT_SLOT(statusMessage(const TQString &))); + connect(m_pHttpRequest,TQT_SIGNAL(terminated(bool)),this,TQT_SLOT(transferTerminated(bool))); + connect(m_pHttpRequest,TQT_SIGNAL(header(KviPointerHashTable *)),this,TQT_SLOT(headersReceived(KviPointerHashTable *))); + connect(m_pHttpRequest,TQT_SIGNAL(resolvingHost(const TQString &)),this,TQT_SLOT(resolvingHost(const TQString &))); + connect(m_pHttpRequest,TQT_SIGNAL(requestSent(const TQStringList &)),this,TQT_SLOT(requestSent(const TQStringList &))); + connect(m_pHttpRequest,TQT_SIGNAL(contactingHost(const TQString &)),this,TQT_SLOT(contactingHost(const TQString &))); + connect(m_pHttpRequest,TQT_SIGNAL(receivedResponse(const TQString &)),this,TQT_SLOT(receivedResponse(const TQString &))); + connect(m_pHttpRequest,TQT_SIGNAL(connectionEstabilished()),this,TQT_SLOT(connectionEstabilished())); - m_eGeneralStatus = Initializing; + m_eGeneraltqStatus = Initializing; m_szStatusString = __tr2qs_ctx("Initializing","http"); } @@ -92,7 +92,7 @@ void KviHttpFileTransfer::die() delete this; } -QString KviHttpFileTransfer::localFileName() +TQString KviHttpFileTransfer::localFileName() { return m_pHttpRequest->fileName(); } @@ -104,26 +104,26 @@ void KviHttpFileTransfer::abort() void KviHttpFileTransfer::fillContextPopup(KviTalPopupMenu * m,int column) { - int id = m->insertItem(__tr2qs_ctx("Abort","http"),this,SLOT(abort())); + int id = m->insertItem(__tr2qs_ctx("Abort","http"),this,TQT_SLOT(abort())); if(!active())m->setItemEnabled(id,false); } bool KviHttpFileTransfer::active() { - return ((m_eGeneralStatus == Connecting) || (m_eGeneralStatus == Downloading)); + return ((m_eGeneraltqStatus == Connecting) || (m_eGeneraltqStatus == Downloading)); } -void KviHttpFileTransfer::displayPaint(QPainter * p,int column,int width,int height) +void KviHttpFileTransfer::displayPaint(TQPainter * p,int column,int width,int height) { - QString txt; - bool bIsTerminated = ((m_eGeneralStatus == Success) || (m_eGeneralStatus == Failure)); + TQString txt; + bool bIsTerminated = ((m_eGeneraltqStatus == Success) || (m_eGeneraltqStatus == Failure)); switch(column) { case COLUMN_TRANSFERTYPE: { int offset = 0; - switch(m_eGeneralStatus) + switch(m_eGeneraltqStatus) { case Initializing: offset = 0; break; case Connecting: offset = 0; break; @@ -136,53 +136,53 @@ void KviHttpFileTransfer::displayPaint(QPainter * p,int column,int width,int hei break; case COLUMN_FILEINFO: { - QFontMetrics fm(p->font()); + TQFontMetrics fm(p->font()); - QString szFrom = __tr2qs_ctx("From: ","http"); - QString szTo = __tr2qs_ctx("To: ","http"); + TQString szFrom = __tr2qs_ctx("From: ","http"); + TQString szTo = __tr2qs_ctx("To: ","http"); int daW1 = fm.width(szFrom); int daW2 = fm.width(szTo); if(daW1 < daW2)daW1 = daW2; int iLineSpacing = fm.lineSpacing(); - p->setPen(Qt::black); + p->setPen(TQt::black); int iY = 4; - p->drawText(4 + daW1,iY,width - (8 + daW1),height - 8,Qt::AlignTop | Qt::AlignLeft,m_pHttpRequest->url().url().ptr()); + p->drawText(4 + daW1,iY,width - (8 + daW1),height - 8,TQt::AlignTop | TQt::AlignLeft,m_pHttpRequest->url().url().ptr()); iY += iLineSpacing; if(!(m_pHttpRequest->fileName().isEmpty())) { - p->drawText(4 + daW1,iY,width - (8 + daW1),height - 8,Qt::AlignTop | Qt::AlignLeft,m_pHttpRequest->fileName()); + p->drawText(4 + daW1,iY,width - (8 + daW1),height - 8,TQt::AlignTop | TQt::AlignLeft,m_pHttpRequest->fileName()); } iY += iLineSpacing; - p->setPen(Qt::darkGray); + p->setPen(TQt::darkGray); - p->drawText(4,4,width - 8,height - 8,Qt::AlignTop | Qt::AlignLeft,szFrom); - p->drawText(4,4 + iLineSpacing,width - 8,height - 8,Qt::AlignTop | Qt::AlignLeft,szTo); + p->drawText(4,4,width - 8,height - 8,TQt::AlignTop | TQt::AlignLeft,szFrom); + p->drawText(4,4 + iLineSpacing,width - 8,height - 8,TQt::AlignTop | TQt::AlignLeft,szTo); - p->setPen(QColor(180,180,200)); + p->setPen(TQColor(180,180,200)); iLineSpacing += 2; p->drawRect(4,height - (iLineSpacing + 4),width - 8,iLineSpacing); - p->fillRect(5,height - (iLineSpacing + 3),width - 10,iLineSpacing - 2,bIsTerminated ? QColor(210,210,210) : QColor(190,190,240)); - p->setPen(Qt::black); - p->drawText(7,height - (iLineSpacing + 4),width - 14,iLineSpacing,Qt::AlignVCenter | Qt::AlignLeft,m_szStatusString); + p->fillRect(5,height - (iLineSpacing + 3),width - 10,iLineSpacing - 2,bIsTerminated ? TQColor(210,210,210) : TQColor(190,190,240)); + p->setPen(TQt::black); + p->drawText(7,height - (iLineSpacing + 4),width - 14,iLineSpacing,TQt::AlignVCenter | TQt::AlignLeft,m_szStatusString); } break; case COLUMN_PROGRESS: { - QFontMetrics fm(p->font()); + TQFontMetrics fm(p->font()); unsigned int uTotal = m_pHttpRequest->totalSize(); unsigned int uRecvd = m_pHttpRequest->receivedSize(); int iW = width - 8; - p->setPen(bIsTerminated ? Qt::lightGray : QColor(210,210,240)); + p->setPen(bIsTerminated ? TQt::lightGray : TQColor(210,210,240)); p->drawRect(4,4,iW,12); int iAvgSpeed = -1; @@ -209,17 +209,17 @@ void KviHttpFileTransfer::displayPaint(QPainter * p,int column,int width,int hei iW -= 2; int iL = (int) ((((double)iW) * dPerc) / 100.0); //iR = iW - iL; - p->fillRect(5,5,iL,10,bIsTerminated ? QColor(140,110,110) : QColor(200,100,100)); + p->fillRect(5,5,iL,10,bIsTerminated ? TQColor(140,110,110) : TQColor(200,100,100)); - txt = QString(__tr2qs_ctx("%1 of %2 (%3 %)","http")).arg(KviQString::makeSizeReadable(uRecvd)) - .arg(KviQString::makeSizeReadable(uTotal)).arg(dPerc,0,'f',2); + txt = TQString(__tr2qs_ctx("%1 of %2 (%3 %)","http")).tqarg(KviTQString::makeSizeReadable(uRecvd)) + .tqarg(KviTQString::makeSizeReadable(uTotal)).tqarg(dPerc,0,'f',2); } else { - txt = KviQString::makeSizeReadable(m_pHttpRequest->receivedSize()); + txt = KviTQString::makeSizeReadable(m_pHttpRequest->receivedSize()); } - p->setPen(Qt::black); + p->setPen(TQt::black); - p->drawText(4,19,width - 8,height - 8,Qt::AlignTop | Qt::AlignLeft,txt); + p->drawText(4,19,width - 8,height - 8,TQt::AlignTop | TQt::AlignLeft,txt); int iLeftHalf = (iW - 2) / 2; int iRightHalf = iW - (iLeftHalf + 1); @@ -230,7 +230,7 @@ void KviHttpFileTransfer::displayPaint(QPainter * p,int column,int width,int hei txt += " "; if(iInstantSpeed >= 0) { - QString tmpisp; + TQString tmpisp; KviNetUtils::formatNetworkBandwidthString(tmpisp,iAvgSpeed); txt += tmpisp; } else { @@ -242,7 +242,7 @@ void KviHttpFileTransfer::displayPaint(QPainter * p,int column,int width,int hei txt += " "; if(iAvgSpeed >= 0) { - QString tmpspd; + TQString tmpspd; KviNetUtils::formatNetworkBandwidthString(tmpspd,iAvgSpeed); txt += tmpspd; } else { @@ -253,11 +253,11 @@ void KviHttpFileTransfer::displayPaint(QPainter * p,int column,int width,int hei int iDaH = height - (iLineSpacing + 4); - p->setPen(QColor(180,180,200)); + p->setPen(TQColor(180,180,200)); p->drawRect(4,iDaH,iLeftHalf,iLineSpacing); - p->fillRect(5,iDaH + 1,iLeftHalf - 2,iLineSpacing - 2,bIsTerminated ? QColor(210,210,210) : QColor(190,190,240)); - p->setPen(bIsTerminated ? Qt::darkGray : Qt::black); - p->drawText(6,iDaH,iLeftHalf - 4,iLineSpacing,Qt::AlignLeft | Qt::AlignVCenter,txt); + p->fillRect(5,iDaH + 1,iLeftHalf - 2,iLineSpacing - 2,bIsTerminated ? TQColor(210,210,210) : TQColor(190,190,240)); + p->setPen(bIsTerminated ? TQt::darkGray : TQt::black); + p->drawText(6,iDaH,iLeftHalf - 4,iLineSpacing,TQt::AlignLeft | TQt::AlignVCenter,txt); unsigned int uD,uH,uM,uS; @@ -265,27 +265,27 @@ void KviHttpFileTransfer::displayPaint(QPainter * p,int column,int width,int hei { KviTimeUtils::secondsToDaysHoursMinsSecs(kvi_timeSpan(m_tTransferEndTime,m_tTransferStartTime),&uD,&uH,&uM,&uS); txt = "TOT: "; - if(uD > 0)txt += QString(__tr2qs_ctx("%1d %2h %3m %4s","http")).arg(uD).arg(uH).arg(uM).arg(uS); - else if(uH > 0)txt += QString(__tr2qs_ctx("%2h %3m %4s","http")).arg(uH).arg(uM).arg(uS); - else txt += QString(__tr2qs_ctx("%3m %4s","http")).arg(uM).arg(uS); + if(uD > 0)txt += TQString(__tr2qs_ctx("%1d %2h %3m %4s","http")).tqarg(uD).tqarg(uH).tqarg(uM).tqarg(uS); + else if(uH > 0)txt += TQString(__tr2qs_ctx("%2h %3m %4s","http")).tqarg(uH).tqarg(uM).tqarg(uS); + else txt += TQString(__tr2qs_ctx("%3m %4s","http")).tqarg(uM).tqarg(uS); } else { if(iEta >= 0) { KviTimeUtils::secondsToDaysHoursMinsSecs(iEta,&uD,&uH,&uM,&uS); txt = "ETA: "; - if(uD > 0)txt += QString(__tr2qs_ctx("%1d %2h %3m %4s","http")).arg(uD).arg(uH).arg(uM).arg(uS); - else if(uH > 0)txt += QString(__tr2qs_ctx("%2h %3m %4s","http")).arg(uH).arg(uM).arg(uS); - else txt += QString(__tr2qs_ctx("%3m %4s","http")).arg(uM).arg(uS); + if(uD > 0)txt += TQString(__tr2qs_ctx("%1d %2h %3m %4s","http")).tqarg(uD).tqarg(uH).tqarg(uM).tqarg(uS); + else if(uH > 0)txt += TQString(__tr2qs_ctx("%2h %3m %4s","http")).tqarg(uH).tqarg(uM).tqarg(uS); + else txt += TQString(__tr2qs_ctx("%3m %4s","http")).tqarg(uM).tqarg(uS); } else { txt = "ETA: Unknown"; } } - p->setPen(QColor(180,180,200)); + p->setPen(TQColor(180,180,200)); p->drawRect(width - (4 + iRightHalf),iDaH,iRightHalf,iLineSpacing); - p->fillRect(width - (3 + iRightHalf),iDaH + 1,iRightHalf - 2,iLineSpacing - 2,bIsTerminated ? QColor(210,210,210) : QColor(190,190,240)); - p->setPen(bIsTerminated ? Qt::darkGray : Qt::black); - p->drawText(width - (2 + iRightHalf),iDaH,iRightHalf - 4,iLineSpacing,Qt::AlignLeft | Qt::AlignVCenter,txt); + p->fillRect(width - (3 + iRightHalf),iDaH + 1,iRightHalf - 2,iLineSpacing - 2,bIsTerminated ? TQColor(210,210,210) : TQColor(190,190,240)); + p->setPen(bIsTerminated ? TQt::darkGray : TQt::black); + p->drawText(width - (2 + iRightHalf),iDaH,iRightHalf - 4,iLineSpacing,TQt::AlignLeft | TQt::AlignVCenter,txt); } break; @@ -298,16 +298,16 @@ int KviHttpFileTransfer::displayHeight(int iLineSpacing) return iH >= 70 ? iH : 70; } -QString KviHttpFileTransfer::tipText() +TQString KviHttpFileTransfer::tipText() { - QString s; - s = QString("").arg(id()); + TQString s; + s = TQString("
HTTP Transfer (ID %1)
").tqarg(id()); if(m_lRequest.count() > 0) { s += ""; s += ""; s += "
HTTP Transfer (ID %1)
Request Headers
"; - for(QStringList::ConstIterator it = m_lRequest.begin();it != m_lRequest.end();++it) + for(TQStringList::ConstIterator it = m_lRequest.begin();it != m_lRequest.end();++it) { s += "   "; s += *it; @@ -320,7 +320,7 @@ QString KviHttpFileTransfer::tipText() { s += "
Response Headers
"; - for(QStringList::ConstIterator it = m_lHeaders.begin();it != m_lHeaders.end();++it) + for(TQStringList::ConstIterator it = m_lHeaders.begin();it != m_lHeaders.end();++it) { s += "   "; s += *it; @@ -340,9 +340,9 @@ void KviHttpFileTransfer::init() g_pHttpFileTransfers = new KviPointerList; g_pHttpFileTransfers->setAutoDelete(false); - QPixmap * pix = g_pIconManager->getImage("kvi_httpicons.png"); - if(pix)g_pHttpIcon = new QPixmap(*pix); - else g_pHttpIcon = new QPixmap(192,48); + TQPixmap * pix = g_pIconManager->getImage("kvi_httpicons.png"); + if(pix)g_pHttpIcon = new TQPixmap(*pix); + else g_pHttpIcon = new TQPixmap(192,48); } void KviHttpFileTransfer::done() @@ -362,7 +362,7 @@ unsigned int KviHttpFileTransfer::runningTransfers() return g_pHttpFileTransfers->count(); } -void KviHttpFileTransfer::requestSent(const QStringList &requestHeaders) +void KviHttpFileTransfer::requestSent(const TQStringList &requestHeaders) { m_szStatusString = __tr2qs_ctx("Request sent, waiting for reply...","http"); displayUpdate(); @@ -373,7 +373,7 @@ void KviHttpFileTransfer::requestSent(const QStringList &requestHeaders) if(!m_bNoOutput) out->output(KVI_OUT_GENERICSTATUS,__tr2qs_ctx("[HTTP %d]: Request data sent:","http"),id()); - for(QStringList::ConstIterator it = requestHeaders.begin();it != requestHeaders.end();++it) + for(TQStringList::ConstIterator it = requestHeaders.begin();it != requestHeaders.end();++it) { if(!m_bNoOutput) out->output(KVI_OUT_GENERICSTATUS,"[HTTP %d]: %s",id(),(*it).utf8().data()); @@ -388,29 +388,29 @@ void KviHttpFileTransfer::connectionEstabilished() displayUpdate(); } -void KviHttpFileTransfer::resolvingHost(const QString &hostname) +void KviHttpFileTransfer::resolvingHost(const TQString &hostname) { - m_szStatusString = __tr2qs_ctx("Resolving host %1","http").arg(hostname); + m_szStatusString = __tr2qs_ctx("Resolving host %1","http").tqarg(hostname); displayUpdate(); } -void KviHttpFileTransfer::contactingHost(const QString &ipandport) +void KviHttpFileTransfer::contactingHost(const TQString &ipandport) { - m_szStatusString = __tr2qs_ctx("Contacting host %1","http").arg(ipandport); + m_szStatusString = __tr2qs_ctx("Contacting host %1","http").tqarg(ipandport); displayUpdate(); } -void KviHttpFileTransfer::receivedResponse(const QString &response) +void KviHttpFileTransfer::receivedResponse(const TQString &response) { m_lHeaders.clear(); m_lHeaders.append(response); - m_szStatusString = __tr2qs_ctx("Transferring data (%1)","http").arg(response); + m_szStatusString = __tr2qs_ctx("Transferring data (%1)","http").tqarg(response); m_tTransferStartTime = kvi_unixTime(); - m_eGeneralStatus = Downloading; + m_eGeneraltqStatus = Downloading; displayUpdate(); } -void KviHttpFileTransfer::statusMessage(const QString &txt) +void KviHttpFileTransfer::statusMessage(const TQString &txt) { KviWindow * out = transferWindow(); if(out && (!m_bNoOutput)) @@ -439,25 +439,25 @@ void KviHttpFileTransfer::transferTerminated(bool bSuccess) if(bSuccess) { m_szStatusString = __tr2qs_ctx("Transfer completed","http"); - m_eGeneralStatus = Success; + m_eGeneraltqStatus = Success; displayUpdate(); if(out && (!m_bNoOutput))out->output(KVI_OUT_GENERICSUCCESS,__tr2qs_ctx("[HTTP %d]: Transfer completed","http"),id()); - g_pApp->fileDownloadTerminated(true,m_pHttpRequest->url().url().ptr(),m_pHttpRequest->fileName(),QString::null,QString::null,!m_bNotifyCompletion); + g_pApp->fileDownloadTerminated(true,m_pHttpRequest->url().url().ptr(),m_pHttpRequest->fileName(),TQString(),TQString(),!m_bNotifyCompletion); } else { m_szStatusString = __tr2qs_ctx("Transfer failed","http"); m_szStatusString += ": "; m_szStatusString += m_pHttpRequest->lastError(); - m_eGeneralStatus = Failure; + m_eGeneraltqStatus = Failure; displayUpdate(); if(out && (!m_bNoOutput))out->output(KVI_OUT_GENERICERROR,__tr2qs_ctx("[HTTP %d]: Transfer failed: %Q","http"),id(),&(m_pHttpRequest->lastError())); - g_pApp->fileDownloadTerminated(false,m_pHttpRequest->url().url().ptr(),m_pHttpRequest->fileName(),QString::null,m_pHttpRequest->lastError(),!m_bNotifyCompletion); + g_pApp->fileDownloadTerminated(false,m_pHttpRequest->url().url().ptr(),m_pHttpRequest->fileName(),TQString(),m_pHttpRequest->lastError(),!m_bNotifyCompletion); } if(m_bAutoClean) { if(m_pAutoCleanTimer)delete m_pAutoCleanTimer; - m_pAutoCleanTimer = new QTimer(); - connect(m_pAutoCleanTimer,SIGNAL(timeout()),this,SLOT(autoClean())); + m_pAutoCleanTimer = new TQTimer(); + connect(m_pAutoCleanTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(autoClean())); m_pAutoCleanTimer->start(100,true); } } @@ -471,7 +471,7 @@ void KviHttpFileTransfer::headersReceived(KviPointerHashTable it(*h); while(KviStr * s = it.current()) { - QString szHeader = it.currentKey(); + TQString szHeader = it.currentKey(); szHeader += ": "; szHeader += s->ptr(); m_lHeaders.append(szHeader); @@ -482,7 +482,7 @@ void KviHttpFileTransfer::headersReceived(KviPointerHashTablestart(); } diff --git a/src/modules/http/httpfiletransfer.h b/src/modules/http/httpfiletransfer.h index e6c5006e..792205b1 100644 --- a/src/modules/http/httpfiletransfer.h +++ b/src/modules/http/httpfiletransfer.h @@ -30,26 +30,27 @@ #include "kvi_kvs_variant.h" -#include -#include +#include +#include -class QPainter; +class TQPainter; class KviTalPopupMenu; class KviHttpFileTransfer : public KviFileTransfer { - enum GeneralStatus { Initializing, Connecting, Downloading, Success, Failure }; + enum GeneraltqStatus { Initializing, Connecting, Downloading, Success, Failure }; Q_OBJECT + TQ_OBJECT public: KviHttpFileTransfer(); ~KviHttpFileTransfer(); private: KviHttpRequest * m_pHttpRequest; - GeneralStatus m_eGeneralStatus; - QString m_szStatusString; + GeneraltqStatus m_eGeneraltqStatus; + TQString m_szStatusString; - QStringList m_lHeaders; - QStringList m_lRequest; + TQStringList m_lHeaders; + TQStringList m_lRequest; kvi_time_t m_tStartTime; kvi_time_t m_tTransferStartTime; @@ -60,9 +61,9 @@ private: bool m_bAutoClean; bool m_bNoOutput; - QTimer * m_pAutoCleanTimer; + TQTimer * m_pAutoCleanTimer; - QString m_szCompletionCallback; + TQString m_szCompletionCallback; public: KviHttpRequest * request(){ return m_pHttpRequest; }; static unsigned int runningTransfers(); @@ -71,28 +72,28 @@ public: virtual bool startDownload(); - void setCompletionCallback(const QString &szCallback){ m_szCompletionCallback = szCallback; }; + void setCompletionCallback(const TQString &szCallback){ m_szCompletionCallback = szCallback; }; void setMagicIdentifier(const KviKvsVariant &vIdentifier){ m_vMagicIdentifier = vIdentifier; }; void setNotifyCompletion(bool bNotify){ m_bNotifyCompletion = bNotify; }; void setAutoClean(bool bAutoClean){ m_bAutoClean = bAutoClean; }; void setNoOutput(bool bNoOutput){ m_bNoOutput = bNoOutput; }; - virtual void displayPaint(QPainter * p,int column,int width,int height); + virtual void displayPaint(TQPainter * p,int column,int width,int height); virtual int displayHeight(int iLineSpacing); virtual void fillContextPopup(KviTalPopupMenu * m,int column); virtual bool active(); virtual void die(); - virtual QString tipText(); - virtual QString localFileName(); + virtual TQString tipText(); + virtual TQString localFileName(); protected slots: - void statusMessage(const QString &txt); + void statusMessage(const TQString &txt); void transferTerminated(bool bSuccess); void headersReceived(KviPointerHashTable *h); - void requestSent(const QStringList &sl); + void requestSent(const TQStringList &sl); - void resolvingHost(const QString &hostname); - void contactingHost(const QString &ipandport); - void receivedResponse(const QString &response); + void resolvingHost(const TQString &hostname); + void contactingHost(const TQString &ipandport); + void receivedResponse(const TQString &response); void connectionEstabilished(); void abort(); diff --git a/src/modules/http/libkvihttp.cpp b/src/modules/http/libkvihttp.cpp index eb6f28fb..8b98b218 100644 --- a/src/modules/http/libkvihttp.cpp +++ b/src/modules/http/libkvihttp.cpp @@ -36,7 +36,7 @@ #include "httpfiletransfer.h" -static bool http_kvs_complete_get(KviKvsModuleCommandCall * c,QString &szUrl,QString &szFileName,const QString &szCallback) +static bool http_kvs_complete_get(KviKvsModuleCommandCall * c,TQString &szUrl,TQString &szFileName,const TQString &szCallback) { if(szUrl.isEmpty()) { @@ -46,17 +46,17 @@ static bool http_kvs_complete_get(KviKvsModuleCommandCall * c,QString &szUrl,QSt KviUrl url(szUrl); - QString tmp; + TQString tmp; if(szFileName.isEmpty()) { - if(c->switches()->find('a',"auto-file-name")) + if(c->switches()->tqfind('a',"auto-file-name")) { tmp = szUrl; - tmp.replace('/',"_"); - tmp.replace(':',"_"); - tmp.replace('@',"_"); - tmp.replace('?',"_"); + tmp.tqreplace('/',"_"); + tmp.tqreplace(':',"_"); + tmp.tqreplace('@',"_"); + tmp.tqreplace('?',"_"); // http____path_path2_path3_filename.ext g_pApp->getLocalKvircDirectory(szFileName,KviApp::Incoming,tmp); } else { @@ -68,7 +68,7 @@ static bool http_kvs_complete_get(KviKvsModuleCommandCall * c,QString &szUrl,QSt KviHttpFileTransfer * hft = new KviHttpFileTransfer(); - bool bHead = c->switches()->find('h',"head"); + bool bHead = c->switches()->tqfind('h',"head"); if(c->switches()->getAsStringIfExisting('p',"post-data",tmp)) { @@ -86,13 +86,13 @@ static bool http_kvs_complete_get(KviKvsModuleCommandCall * c,QString &szUrl,QSt if(c->switches()->getAsStringIfExisting('e',"existing-file-action",tmp)) { - if(KviQString::equalCI(tmp,"e")) + if(KviTQString::equalCI(tmp,"e")) hft->request()->setExistingFileAction(KviHttpRequest::RenameExisting); - else if(KviQString::equalCI(tmp,"i")) + else if(KviTQString::equalCI(tmp,"i")) hft->request()->setExistingFileAction(KviHttpRequest::RenameIncoming); - else if(KviQString::equalCI(tmp,"o")) + else if(KviTQString::equalCI(tmp,"o")) hft->request()->setExistingFileAction(KviHttpRequest::Overwrite); - else if(KviQString::equalCI(tmp,"r")) + else if(KviTQString::equalCI(tmp,"r")) hft->request()->setExistingFileAction(KviHttpRequest::Resume); } @@ -114,25 +114,25 @@ static bool http_kvs_complete_get(KviKvsModuleCommandCall * c,QString &szUrl,QSt if(c->switches()->getAsStringIfExisting('w',"winctrl",tmp)) { - if(!tmp.contains('h'))hft->invokeTransferWindow(c->window(),tmp.contains('m'),tmp.contains('n')); + if(!tmp.tqcontains('h'))hft->invokeTransferWindow(c->window(),tmp.tqcontains('m'),tmp.tqcontains('n')); } else { hft->invokeTransferWindow(c->window(),false,false); } - KviKvsVariant * v = c->switches()->find('i',"identifier"); + KviKvsVariant * v = c->switches()->tqfind('i',"identifier"); if(v) hft->setMagicIdentifier(*v); - if(c->switches()->find('q',"quiet")) + if(c->switches()->tqfind('q',"quiet")) hft->setNotifyCompletion(false); - if(c->switches()->find('y',"no-output")) + if(c->switches()->tqfind('y',"no-output")) hft->setNoOutput(true); if(!szCallback.isEmpty()) hft->setCompletionCallback(szCallback); - if(c->switches()->find('c',"clear")) + if(c->switches()->tqfind('c',"clear")) hft->setAutoClean(true); if(!hft->startDownload()) @@ -242,13 +242,13 @@ static bool http_kvs_complete_get(KviKvsModuleCommandCall * c,QString &szUrl,QSt static bool http_kvs_cmd_get(KviKvsModuleCommandCall * c) { - QString szUrl,szFileName; + TQString szUrl,szFileName; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("url",KVS_PT_NONEMPTYSTRING,0,szUrl) KVSM_PARAMETER("filename",KVS_PT_STRING,KVS_PF_OPTIONAL,szFileName) KVSM_PARAMETERS_END(c) - return http_kvs_complete_get(c,szUrl,szFileName,QString::null); + return http_kvs_complete_get(c,szUrl,szFileName,TQString()); } /* @doc: http.asyncGet @@ -281,7 +281,7 @@ static bool http_kvs_cmd_get(KviKvsModuleCommandCall * c) static bool http_kvs_cmd_asyncGet(KviKvsModuleCallbackCommandCall * c) { - QString szUrl,szFileName; + TQString szUrl,szFileName; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("url",KVS_PT_NONEMPTYSTRING,0,szUrl) KVSM_PARAMETER("filename",KVS_PT_STRING,KVS_PF_OPTIONAL,szFileName) diff --git a/src/modules/ident/libkviident.cpp b/src/modules/ident/libkviident.cpp index c8f4f194..3c260678 100644 --- a/src/modules/ident/libkviident.cpp +++ b/src/modules/ident/libkviident.cpp @@ -70,7 +70,7 @@ void stopIdentService() } KviIdentSentinel::KviIdentSentinel() -: QObject(0) +: TQObject(0) { } @@ -79,10 +79,10 @@ KviIdentSentinel::~KviIdentSentinel() KviThreadManager::killPendingEvents(this); } -bool KviIdentSentinel::event(QEvent *e) +bool KviIdentSentinel::event(TQEvent *e) { if(KVI_OPTION_UINT(KviOption_uintIdentdOutputMode)==KviIdentdOutputMode::Quiet || !g_pActiveWindow) - return QObject::event(e); + return TQObject::event(e); KviWindow * pTarget = KVI_OPTION_UINT(KviOption_uintIdentdOutputMode)==KviIdentdOutputMode::ToActiveWindow ? (KviWindow *)g_pActiveWindow : (KviWindow *)g_pApp->activeConsole(); @@ -127,7 +127,7 @@ bool KviIdentSentinel::event(QEvent *e) return true; } - return QObject::event(e); + return TQObject::event(e); } @@ -385,7 +385,7 @@ ipv6_failure: kvi_socket_t t = kvi_socket_accept(m_sock,satmp.socketAddress(),&salen); if(t != KVI_INVALID_SOCKET) { - QString szHost; + TQString szHost; if(!satmp.getStringAddress(szHost))szHost = "unknown"; KviIdentRequest * r = new KviIdentRequest(t,szHost.utf8().data(),satmp.port()); m_pRequestList->append(r); @@ -405,7 +405,7 @@ ipv6_failure: kvi_socket_t t = kvi_socket_accept(m_sock6,satmp.socketAddress(),&salen); if(t != KVI_INVALID_SOCKET) { - QString szHost; + TQString szHost; if(!satmp.getStringAddress(szHost))szHost = "unknown"; KviIdentRequest * r = new KviIdentRequest(t,szHost.utf8().data(),satmp.port()); m_pRequestList->append(r); diff --git a/src/modules/ident/libkviident.h b/src/modules/ident/libkviident.h index c6d3d390..6733e928 100644 --- a/src/modules/ident/libkviident.h +++ b/src/modules/ident/libkviident.h @@ -29,7 +29,7 @@ #include "kvi_settings.h" #include "kvi_pointerlist.h" -#include +#include class KviIdentRequest { @@ -52,14 +52,15 @@ typedef struct _KviIdentMessageData unsigned int uPort; } KviIdentMessageData; -class KviIdentSentinel : public QObject +class KviIdentSentinel : public TQObject { Q_OBJECT + TQ_OBJECT public: KviIdentSentinel(); ~KviIdentSentinel(); protected: - virtual bool event(QEvent * e); + virtual bool event(TQEvent * e); }; diff --git a/src/modules/iograph/libkviiograph.cpp b/src/modules/iograph/libkviiograph.cpp index ab9aa4f1..f6398f03 100644 --- a/src/modules/iograph/libkviiograph.cpp +++ b/src/modules/iograph/libkviiograph.cpp @@ -34,12 +34,12 @@ #include "kvi_locale.h" #include "kvi_pointerlist.h" -#include -#include -#include +#include +#include +#include -extern QPixmap * g_pIccMemBuffer; +extern TQPixmap * g_pIccMemBuffer; static KviPointerList * g_pIOGraphWidgetList; @@ -67,7 +67,7 @@ KviIOGraphDisplay::KviIOGraphDisplay(KviIrcContextController * pController,bool tip.append(__tr("Incoming traffic")); } - QToolTip::add(this,tip.ptr()); + TQToolTip::add(this,tip.ptr()); startTimer(1000); } @@ -77,7 +77,7 @@ KviIOGraphDisplay::~KviIOGraphDisplay() g_pIOGraphWidgetList->removeRef(this); } -void KviIOGraphDisplay::timerEvent(QTimerEvent *e) +void KviIOGraphDisplay::timerEvent(TQTimerEvent *e) { unsigned int sB = console()->socket()->sentBytes(); unsigned int rB = console()->socket()->readBytes(); @@ -97,7 +97,7 @@ void KviIOGraphDisplay::timerEvent(QTimerEvent *e) update(); } -static QCOORD horizSegments[6 * 4]= +static TQCOORD horizSegments[6 * 4]= { 5 , 3 , KVI_IRCTOOLBARAPPLET_MAXIMUM_WIDTH - 4 , 3 , 5 , 8 , KVI_IRCTOOLBARAPPLET_MAXIMUM_WIDTH - 4 , 8 , @@ -107,7 +107,7 @@ static QCOORD horizSegments[6 * 4]= 5 , 28 , KVI_IRCTOOLBARAPPLET_MAXIMUM_WIDTH - 4 , 28 }; -static QCOORD vertSegments[29 * 4]= +static TQCOORD vertSegments[29 * 4]= { 9 , 4 , 9 , KVI_IRCTOOLBARAPPLET_MAXIMUM_HEIGHT - 5 , 14 , 4 , 14 , KVI_IRCTOOLBARAPPLET_MAXIMUM_HEIGHT - 5 , @@ -140,10 +140,10 @@ static QCOORD vertSegments[29 * 4]= 149 , 4 , 149 , KVI_IRCTOOLBARAPPLET_MAXIMUM_HEIGHT - 5 }; -void KviIOGraphDisplay::drawContents(QPainter * p) +void KviIOGraphDisplay::drawContents(TQPainter * p) { - static QPointArray hp(6 * 4,horizSegments); - static QPointArray vp(29 * 4,vertSegments); + static TQPointArray hp(6 * 4,horizSegments); + static TQPointArray vp(29 * 4,vertSegments); p->setPen(KVI_OPTION_COLOR(KviOption_colorIrcToolBarAppletForegroundLowContrast)); p->drawLineSegments(hp,0,6); @@ -199,9 +199,9 @@ void KviIOGraphDisplay::drawContents(QPainter * p) } } -QSize KviIOGraphDisplay::sizeHint() const +TQSize KviIOGraphDisplay::tqsizeHint() const { - return QSize(KVI_IRCTOOLBARAPPLET_MAXIMUM_WIDTH,KVI_IRCTOOLBARAPPLET_MAXIMUM_HEIGHT); + return TQSize(KVI_IRCTOOLBARAPPLET_MAXIMUM_WIDTH,KVI_IRCTOOLBARAPPLET_MAXIMUM_HEIGHT); } diff --git a/src/modules/iograph/libkviiograph.h b/src/modules/iograph/libkviiograph.h index 9b134615..3c3d8f1a 100644 --- a/src/modules/iograph/libkviiograph.h +++ b/src/modules/iograph/libkviiograph.h @@ -33,6 +33,7 @@ class KviIOGraphDisplay : public KviIrcContextGraphicalApplet { Q_OBJECT + TQ_OBJECT public: KviIOGraphDisplay(KviIrcContextController * pController,bool sentGraph,bool recvGraph); ~KviIOGraphDisplay(); @@ -45,9 +46,9 @@ protected: bool m_bShowSentGraph; bool m_bShowRecvGraph; protected: - virtual void drawContents(QPainter *p); - virtual QSize sizeHint() const; - virtual void timerEvent(QTimerEvent *e); + virtual void drawContents(TQPainter *p); + virtual TQSize tqsizeHint() const; + virtual void timerEvent(TQTimerEvent *e); }; #endif diff --git a/src/modules/lamerizer/libkvilamerizer.h b/src/modules/lamerizer/libkvilamerizer.h index e0b78bd7..cb0047aa 100644 --- a/src/modules/lamerizer/libkvilamerizer.h +++ b/src/modules/lamerizer/libkvilamerizer.h @@ -31,6 +31,7 @@ class KviLamerizerEngine : public KviCryptEngine { Q_OBJECT + TQ_OBJECT public: KviLamerizerEngine(bool bLight); ~KviLamerizerEngine(); diff --git a/src/modules/links/libkvilinks.cpp b/src/modules/links/libkvilinks.cpp index 6486b985..4ca0649b 100644 --- a/src/modules/links/libkvilinks.cpp +++ b/src/modules/links/libkvilinks.cpp @@ -29,7 +29,7 @@ #include "kvi_window.h" #include "kvi_locale.h" -#include +#include KviPointerList * g_pLinksWindowList = 0; diff --git a/src/modules/links/linkswindow.cpp b/src/modules/links/linkswindow.cpp index 1dd567f5..73fda996 100644 --- a/src/modules/links/linkswindow.cpp +++ b/src/modules/links/linkswindow.cpp @@ -33,10 +33,10 @@ #include "kvi_irccontext.h" #include "kvi_ircconnection.h" -#include -#include +#include +#include #include "kvi_tal_hbox.h" -#include +#include extern KviPointerList * g_pLinksWindowList; @@ -45,26 +45,26 @@ KviLinksWindow::KviLinksWindow(KviFrame * lpFrm,KviConsole * lpConsole) { g_pLinksWindowList->append(this); - m_pTopSplitter = new QSplitter(Qt::Horizontal,this,"top_splitter"); + m_pTopSplitter = new TQSplitter(Qt::Horizontal,this,"top_splitter"); // The button box on the left KviTalHBox * box = new KviTalHBox(m_pTopSplitter); - m_pRequestButton = new QToolButton(box,"request_button"); + m_pRequestButton = new TQToolButton(box,"request_button"); m_pRequestButton->setUsesBigPixmap(false); m_pRequestButton->setPixmap(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_LINKS))); - connect(m_pRequestButton,SIGNAL(clicked()),this,SLOT(requestLinks())); - QToolTip::add(m_pRequestButton,__tr2qs("Request Links")); + connect(m_pRequestButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(requestLinks())); + TQToolTip::add(m_pRequestButton,__tr2qs("Request Links")); - QLabel * l = new QLabel(box,""); + TQLabel * l = new TQLabel(box,""); box->setStretchFactor(l,1); m_pInfoLabel = new KviThemedLabel(m_pTopSplitter,"info_label"); - connect(lpConsole->context(),SIGNAL(stateChanged()), - this,SLOT(connectionStateChange())); + connect(lpConsole->context(),TQT_SIGNAL(stateChanged()), + this,TQT_SLOT(connectionStateChange())); - m_pSplitter = new QSplitter(Qt::Horizontal,this,"splitter"); - m_pVertSplitter = new QSplitter(Qt::Vertical,m_pSplitter,"vsplitter"); + m_pSplitter = new TQSplitter(Qt::Horizontal,this,"splitter"); + m_pVertSplitter = new TQSplitter(Qt::Vertical,m_pSplitter,"vsplitter"); m_pListView = new KviTalListView(m_pVertSplitter); m_pListView->addColumn(__tr2qs("Link")); @@ -72,8 +72,8 @@ KviLinksWindow::KviLinksWindow(KviFrame * lpFrm,KviConsole * lpConsole) m_pListView->addColumn(__tr2qs("Description")); m_pListView->setRootIsDecorated(true); m_pListView->setAllColumnsShowFocus(true); - connect(m_pListView,SIGNAL(rightButtonPressed(KviTalListViewItem *,const QPoint &,int)), - this,SLOT(showHostPopup(KviTalListViewItem *,const QPoint &,int))); + connect(m_pListView,TQT_SIGNAL(rightButtonPressed(KviTalListViewItem *,const TQPoint &,int)), + this,TQT_SLOT(showHostPopup(KviTalListViewItem *,const TQPoint &,int))); m_pIrcView = new KviIrcView(m_pVertSplitter,lpFrm,this); @@ -81,7 +81,7 @@ KviLinksWindow::KviLinksWindow(KviFrame * lpFrm,KviConsole * lpConsole) m_pLinkList->setAutoDelete(true); m_pHostPopup = new KviTalPopupMenu(); - connect(m_pHostPopup,SIGNAL(activated(int)),this,SLOT(hostPopupClicked(int))); + connect(m_pHostPopup,TQT_SIGNAL(activated(int)),this,TQT_SLOT(hostPopupClicked(int))); connectionStateChange(); @@ -129,43 +129,43 @@ void KviLinksWindow::connectionStateChange() } } -QPixmap * KviLinksWindow::myIconPtr() +TQPixmap * KviLinksWindow::myIconPtr() { return g_pIconManager->getSmallIcon(KVI_SMALLICON_LINKS); } -void KviLinksWindow::resizeEvent(QResizeEvent *e) +void KviLinksWindow::resizeEvent(TQResizeEvent *e) { - int hght2 = m_pTopSplitter->sizeHint().height(); + int hght2 = m_pTopSplitter->tqsizeHint().height(); m_pTopSplitter->setGeometry(0,0,width(),hght2); m_pSplitter->setGeometry(0,hght2,width(),height() - hght2); } -QSize KviLinksWindow::sizeHint() const +TQSize KviLinksWindow::tqsizeHint() const { - QSize ret(m_pSplitter->sizeHint().width(), - m_pSplitter->sizeHint().height() + m_pTopSplitter->sizeHint().height()); + TQSize ret(m_pSplitter->tqsizeHint().width(), + m_pSplitter->tqsizeHint().height() + m_pTopSplitter->tqsizeHint().height()); return ret; } void KviLinksWindow::fillCaptionBuffers() { - KviQString::sprintf(m_szPlainTextCaption,__tr2qs("Links for %Q [IRC Context %u]"),&m_szRootServer,m_pConsole->ircContextId()); + KviTQString::sprintf(m_szPlainTextCaption,__tr2qs("Links for %Q [IRC Context %u]"),&m_szRootServer,m_pConsole->ircContextId()); - KviQString::sprintf(m_szHtmlActiveCaption, + KviTQString::sprintf(m_szHtmlActiveCaption, __tr2qs("Links for %Q " \ "[IRC Context %u]"), - KVI_OPTION_COLOR(KviOption_colorCaptionTextActive).name().ascii(), + TQString(KVI_OPTION_COLOR(KviOption_colorCaptionTextActive).name()).ascii(), &m_szRootServer, - KVI_OPTION_COLOR(KviOption_colorCaptionTextActive2).name().ascii(), + TQString(KVI_OPTION_COLOR(KviOption_colorCaptionTextActive2).name()).ascii(), m_pConsole->ircContextId()); - KviQString::sprintf(m_szHtmlInactiveCaption, + KviTQString::sprintf(m_szHtmlInactiveCaption, __tr2qs("Links for %Q " \ "[IRC Context %u]"), - KVI_OPTION_COLOR(KviOption_colorCaptionTextInactive).name().ascii(), + TQString(KVI_OPTION_COLOR(KviOption_colorCaptionTextInactive).name()).ascii(), &m_szRootServer, - KVI_OPTION_COLOR(KviOption_colorCaptionTextInactive2).name().ascii(), + TQString(KVI_OPTION_COLOR(KviOption_colorCaptionTextInactive2).name()).ascii(), m_pConsole->ircContextId()); } @@ -213,7 +213,7 @@ void KviLinksWindow::endOfLinks() m_pListView->setUpdatesEnabled(false); for(KviLink *l=m_pLinkList->first();l;l=m_pLinkList->next()){ totalHosts++; - if(l->hops == 0)root = new KviTalListViewItem(m_pListView,QString(l->host.ptr()),"0",QString(l->description.ptr())); + if(l->hops == 0)root = new KviTalListViewItem(m_pListView,TQString(l->host.ptr()),"0",TQString(l->description.ptr())); else { totalHops += l->hops; if(l->hops < 4){ @@ -229,21 +229,21 @@ void KviLinksWindow::endOfLinks() maxHops = l->hops; szMaxHop = l->host; } - if(l->host.contains('*'))wildServers++; + if(l->host.tqcontains('*'))wildServers++; it = insertLink(l); if(!it){ - output(KVI_OUT_SYSTEMERROR,__tr2qs("Broken link: Missing parent (%s) for %s (%d hops): %s (used /LINKS ?)"), - l->parent.ptr(),l->host.ptr(),l->hops,l->description.ptr()); + output(KVI_OUT_SYSTEMERROR,__tr2qs("Broken link: Missing tqparent (%s) for %s (%d hops): %s (used /LINKS ?)"), + l->tqparent.ptr(),l->host.ptr(),l->hops,l->description.ptr()); brokenLinks++; - KviStr tmp(KviStr::Format,__tr2qs("%s: Parent link %s"),l->description.ptr(),l->parent.ptr()); + KviStr tmp(KviStr::Format,__tr2qs("%s: Parent link %s"),l->description.ptr(),l->tqparent.ptr()); KviStr tmp2(KviStr::Format,"%d",l->hops); - if(root)it = new KviTalListViewItem(m_pListView,root,QString(l->host.ptr()),QString(tmp2.ptr()),QString(tmp.ptr())); + if(root)it = new KviTalListViewItem(m_pListView,root,TQString(l->host.ptr()),TQString(tmp2.ptr()),TQString(tmp.ptr())); else { outputNoFmt(KVI_OUT_SYSTEMERROR,__tr2qs("Warning: No root link was sent by the server, the stats may be invalid.")); - it = new KviTalListViewItem(m_pListView,QString(l->host.ptr()),QString(tmp2.ptr()),QString(tmp.ptr())); + it = new KviTalListViewItem(m_pListView,TQString(l->host.ptr()),TQString(tmp2.ptr()),TQString(tmp.ptr())); } } else { - it = it->parent(); + it = it->tqparent(); if(it) { int links = it->childCount() + 1; @@ -277,7 +277,7 @@ void KviLinksWindow::endOfLinks() m_szRootServer = root->text(0); output(KVI_OUT_LINKS,__tr2qs("%c%cLinks for %Q"),KVI_TEXT_BOLD,KVI_TEXT_UNDERLINE,&m_szRootServer); outputNoFmt(KVI_OUT_LINKS,"======================"); - QString tmpo = wildServers ? __tr2qs("Total hosts listed") : __tr2qs("Total hosts in the network"); + TQString tmpo = wildServers ? __tr2qs("Total hosts listed") : __tr2qs("Total hosts in the network"); output(KVI_OUT_LINKS,"%Q: %d",&tmpo,totalHosts); if(wildServers)output(KVI_OUT_LINKS,__tr2qs("Wildcard servers (hubs?): %d"),wildServers); output(KVI_OUT_LINKS,__tr2qs("Direct links: %d (~%d.%d %)"),directLinks,directProcent / 100, directProcent % 100); @@ -301,18 +301,18 @@ void KviLinksWindow::endOfLinks() while(!m_pLinkList->isEmpty())m_pLinkList->removeFirst(); m_pListView->setUpdatesEnabled(true); - m_pListView->repaint(); + m_pListView->tqrepaint(); } KviTalListViewItem * KviLinksWindow::insertLink(KviLink *l) { __range_valid(l->hops > 0); - KviTalListViewItem * i = getItemByHost(l->parent.ptr(),0); + KviTalListViewItem * i = getItemByHost(l->tqparent.ptr(),0); KviTalListViewItem * it = 0; if(!i)return 0; else { KviStr hops(KviStr::Format,"%d",l->hops); - it = new KviTalListViewItem(i,QString(l->host.ptr()),QString(hops.ptr()),QString(l->description.ptr())); + it = new KviTalListViewItem(i,TQString(l->host.ptr()),TQString(hops.ptr()),TQString(l->description.ptr())); i->setOpen(true); } return it; @@ -332,7 +332,7 @@ KviTalListViewItem * KviLinksWindow::getItemByHost(const char *host,KviTalListVi return 0; } -void KviLinksWindow::showHostPopup(KviTalListViewItem *i,const QPoint &p,int) +void KviLinksWindow::showHostPopup(KviTalListViewItem *i,const TQPoint &p,int) { if(!i)return; KviStr host=i->text(0); @@ -405,7 +405,7 @@ void KviLinksWindow::processData(KviIrcMessage *msg) KviLink * l = new KviLink; l->host = msg->safeParam(1); - l->parent = msg->safeParam(2); + l->tqparent = msg->safeParam(2); const char * tr = msg->safeTrailing(); @@ -441,7 +441,7 @@ void KviLinksWindow::processData(KviIrcMessage *msg) // KviWindowProperty p; // p.rect = externalGeometry(); // p.isDocked = isAttacched(); -// QValueList l(m_pSplitter->sizes()); +// TQValueList l(m_pSplitter->sizes()); // if(l.count() >= 1)p.splitWidth1 = *(l.at(0)); // if(l.count() >= 2)p.splitWidth2 = *(l.at(1)); // p.timestamp = m_pView->timestamp(); @@ -455,7 +455,7 @@ void KviLinksWindow::processData(KviIrcMessage *msg) // //void KviLinksWindow::setProperties(KviWindowProperty *p) //{ -// QValueList l; +// TQValueList l; // l.append(p->splitWidth1); // l.append(p->splitWidth2); // m_pVertSplitter->setSizes(l); diff --git a/src/modules/links/linkswindow.h b/src/modules/links/linkswindow.h index b9cba76e..d21a6045 100644 --- a/src/modules/links/linkswindow.h +++ b/src/modules/links/linkswindow.h @@ -31,7 +31,7 @@ #include "kvi_tal_listview.h" #include "kvi_tal_popupmenu.h" -#include +#include class KviThemedLabel; @@ -39,7 +39,7 @@ class KviThemedLabel; typedef struct _KviLink { KviStr host; - KviStr parent; + KviStr tqparent; int hops; KviStr description; } KviLink; @@ -48,37 +48,38 @@ typedef struct _KviLink class KviLinksWindow : public KviWindow, public KviExternalServerDataParser { Q_OBJECT + TQ_OBJECT public: KviLinksWindow(KviFrame * lpFrm,KviConsole * lpConsole); ~KviLinksWindow(); protected: - QSplitter * m_pVertSplitter; - QSplitter * m_pTopSplitter; + TQSplitter * m_pVertSplitter; + TQSplitter * m_pTopSplitter; KviTalListView * m_pListView; KviPointerList * m_pLinkList; KviTalPopupMenu * m_pHostPopup; - QString m_szRootServer; - QToolButton * m_pRequestButton; + TQString m_szRootServer; + TQToolButton * m_pRequestButton; KviThemedLabel * m_pInfoLabel; public: // Methods virtual void control(int msg); virtual void processData(KviIrcMessage * msg); virtual void die(); protected: - virtual QPixmap * myIconPtr(); + virtual TQPixmap * myIconPtr(); virtual void fillCaptionBuffers(); virtual void applyOptions(); - virtual void resizeEvent(QResizeEvent *e); + virtual void resizeEvent(TQResizeEvent *e); virtual void getBaseLogFileName(KviStr &buffer); // virtual void setProperties(KviWindowProperty *p); // virtual void saveProperties(); protected slots: - void showHostPopup(KviTalListViewItem *i,const QPoint &p,int c); + void showHostPopup(KviTalListViewItem *i,const TQPoint &p,int c); void hostPopupClicked(int id); void requestLinks(); void connectionStateChange(); public: - virtual QSize sizeHint() const; + virtual TQSize tqsizeHint() const; private: void reset(); void endOfLinks(); diff --git a/src/modules/list/libkvilist.cpp b/src/modules/list/libkvilist.cpp index 7920934d..744d079b 100644 --- a/src/modules/list/libkvilist.cpp +++ b/src/modules/list/libkvilist.cpp @@ -29,7 +29,7 @@ #include "kvi_window.h" #include "kvi_locale.h" -#include +#include KviPointerList * g_pListWindowList = 0; diff --git a/src/modules/list/listwindow.cpp b/src/modules/list/listwindow.cpp index 2e1c5401..57fb170f 100644 --- a/src/modules/list/listwindow.cpp +++ b/src/modules/list/listwindow.cpp @@ -44,12 +44,12 @@ #include "kvi_filedialog.h" #include "kvi_styled_controls.h" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include "kvi_tal_hbox.h" #include "kvi_msgbox.h" @@ -59,7 +59,7 @@ extern KviPointerList * g_pListWindowList; //extern KVIRC_API const char * getColorBytes(const char *data_ptr,unsigned char *byte_1,unsigned char *byte_2); -KviChannelListViewItemData::KviChannelListViewItemData(const QString &szChan,const QString &szUsers,const QString &szTopic) +KviChannelListViewItemData::KviChannelListViewItemData(const TQString &szChan,const TQString &szUsers,const TQString &szTopic) { m_szChan = szChan; m_szUsers = szUsers; @@ -87,13 +87,13 @@ KviChannelListViewItem::~KviChannelListViewItem() delete m_pData; } #ifdef COMPILE_USE_QT4 -int KviChannelListViewItem::width ( const QFontMetrics & fm, const KviTalListView * lv, int column ) const +int KviChannelListViewItem::width ( const TQFontMetrics & fm, const KviTalListView * lv, int column ) const #else -int KviChannelListViewItem::width ( const QFontMetrics & fm, const QListView * lv, int column ) const +int KviChannelListViewItem::width ( const TQFontMetrics & fm, const TQListView * lv, int column ) const #endif { debug("width request"); - QString szText; + TQString szText; switch(column) { @@ -108,9 +108,9 @@ int KviChannelListViewItem::width ( const QFontMetrics & fm, const QListView * l #define KVI_LABEL_DEF_BACK 100 #define KVI_LABEL_DEF_FORE 101 -void KviChannelListViewItem::paintCell(QPainter * p,const QColorGroup &cg,int column,int width,int align) +void KviChannelListViewItem::paintCell(TQPainter * p,const TQColorGroup &cg,int column,int width,int align) { - QString szText; + TQString szText; switch(column) { @@ -127,7 +127,7 @@ void KviChannelListViewItem::paintCell(QPainter * p,const QColorGroup &cg,int co p->fillRect( 0, 0, width, height(), cg.brush(lv->viewport()->backgroundRole()) ); #else - const QColorGroup::ColorRole crole = QPalette::backgroundRoleFromMode(lv->viewport()->backgroundMode()); + const TQColorGroup::ColorRole crole = TQPalette::backgroundRoleFromMode(lv->viewport()->backgroundMode()); p->fillRect( 0, 0, width, height(), cg.brush( crole ) ); #endif @@ -135,23 +135,23 @@ void KviChannelListViewItem::paintCell(QPainter * p,const QColorGroup &cg,int co if ( isSelected() && (column == 0 || lv->allColumnsShowFocus()) ) { p->fillRect( r - marg, 0, width - r + marg, height(), - cg.brush( QColorGroup::Highlight ) ); + cg.brush( TQColorGroup::Highlight ) ); if ( isEnabled() || !lv ) p->setPen( cg.highlightedText() ); else if ( !isEnabled() && lv) - p->setPen( lv->palette().disabled().highlightedText() ); + p->setPen( lv->tqpalette().disabled().highlightedText() ); } else { if ( isEnabled() || !lv ) p->setPen( cg.text() ); else if ( !isEnabled() && lv) - p->setPen( lv->palette().disabled().text() ); + p->setPen( lv->tqpalette().disabled().text() ); } KviTopicWidget::paintColoredText(p,szText,cg,height(),width); } -QString KviChannelListViewItem::key(int col,bool) const +TQString KviChannelListViewItem::key(int col,bool) const { switch(col) { @@ -165,7 +165,7 @@ QString KviChannelListViewItem::key(int col,bool) const return m_pData->m_szTopic; break; } - QString ret; + TQString ret; return ret; } @@ -181,36 +181,36 @@ KviListWindow::KviListWindow(KviFrame * lpFrm,KviConsole * lpConsole) m_pItemList = new KviPointerList; m_pItemList->setAutoDelete(false); - m_pSplitter = new QSplitter(Qt::Horizontal,this,"splitter"); - m_pTopSplitter = new QSplitter(Qt::Horizontal,this,"top_splitter"); - m_pVertSplitter = new QSplitter(Qt::Vertical,m_pSplitter,"vsplitter"); + m_pSplitter = new TQSplitter(Qt::Horizontal,this,"splitter"); + m_pTopSplitter = new TQSplitter(Qt::Horizontal,this,"top_splitter"); + m_pVertSplitter = new TQSplitter(Qt::Vertical,m_pSplitter,"vsplitter"); KviTalHBox * box = new KviTalHBox(m_pTopSplitter); m_pOpenButton = new KviStyledToolButton(box); m_pOpenButton->setPixmap(*(g_pIconManager->getBigIcon(KVI_BIGICON_OPEN))); - connect(m_pOpenButton,SIGNAL(clicked()),this,SLOT(importList())); + connect(m_pOpenButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(importList())); m_pSaveButton = new KviStyledToolButton(box); m_pSaveButton->setPixmap(*(g_pIconManager->getBigIcon(KVI_BIGICON_SAVE))); - connect(m_pSaveButton,SIGNAL(clicked()),this,SLOT(exportList())); + connect(m_pSaveButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(exportList())); m_pRequestButton = new KviStyledToolButton(box,"request_button"); m_pRequestButton->setUsesBigPixmap(false); m_pRequestButton->setPixmap(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_LIST))); - connect(m_pRequestButton,SIGNAL(clicked()),this,SLOT(requestList())); - QToolTip::add(m_pRequestButton,__tr2qs("Request List")); + connect(m_pRequestButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(requestList())); + TQToolTip::add(m_pRequestButton,__tr2qs("Request List")); m_pStopListDownloadButton = new KviStyledToolButton(box,"stoplistdownload_button"); m_pStopListDownloadButton->setUsesBigPixmap(false); m_pStopListDownloadButton->setPixmap(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_NICKNAMEPROBLEM))); - connect(m_pStopListDownloadButton,SIGNAL(clicked()),this,SLOT(stoplistdownload())); - QToolTip::add(m_pStopListDownloadButton,__tr2qs("Stop list download")); + connect(m_pStopListDownloadButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(stoplistdownload())); + TQToolTip::add(m_pStopListDownloadButton,__tr2qs("Stop list download")); - m_pParamsEdit = new QLineEdit(box); + m_pParamsEdit = new TQLineEdit(box); box->setStretchFactor(m_pParamsEdit,1); - QToolTip::add(m_pParamsEdit,__tr2qs("
/LIST command parameters:
Many servers accept special parameters that " \ + TQToolTip::add(m_pParamsEdit,__tr2qs("
/LIST command parameters:
Many servers accept special parameters that " \ "allow you to filter the returned entries.
" \ - "Commonly, masked channel names (*kvirc*) are accepted as parameters, as well as strings " \ + "Commonly, tqmasked channel names (*kvirc*) are accepted as parameters, as well as strings " \ "like c<n or c>n where n is the minimum or maximum of users on the channel.
")); m_pInfoLabel = new KviThemedLabel(m_pTopSplitter,"info_label"); @@ -224,14 +224,14 @@ KviListWindow::KviListWindow(KviFrame * lpFrm,KviConsole * lpConsole) m_pListView->setColumnWidthMode(3,KviTalListView::Maximum); m_pListView->setSorting(100); - connect(m_pListView,SIGNAL(doubleClicked(KviTalListViewItem *)),this,SLOT(itemDoubleClicked(KviTalListViewItem *))); + connect(m_pListView,TQT_SIGNAL(doubleClicked(KviTalListViewItem *)),this,TQT_SLOT(itemDoubleClicked(KviTalListViewItem *))); m_pIrcView = new KviIrcView(m_pVertSplitter,lpFrm,this); m_pConsole->ircContext()->setListWindowPointer(this); - connect(m_pConsole->context(),SIGNAL(stateChanged()), - this,SLOT(connectionStateChange())); + connect(m_pConsole->context(),TQT_SIGNAL(stateChanged()), + this,TQT_SLOT(connectionStateChange())); connectionStateChange(); @@ -283,8 +283,8 @@ void KviListWindow::connectionStateChange() m_pRequestButton->setEnabled(st == KviIrcContext::Connected); if(st == KviIrcContext::Connected) { - QString tmp; - KviQString::sprintf(tmp, + TQString tmp; + KviTQString::sprintf(tmp, __tr2qs("Connected to %s (%s)"), m_pConsole->connection()->currentServerName().utf8().data(), m_pConsole->currentNetworkName().utf8().data()); @@ -294,39 +294,39 @@ void KviListWindow::connectionStateChange() } } -QPixmap * KviListWindow::myIconPtr() +TQPixmap * KviListWindow::myIconPtr() { return g_pIconManager->getSmallIcon(KVI_SMALLICON_LIST); } -void KviListWindow::resizeEvent(QResizeEvent *e) +void KviListWindow::resizeEvent(TQResizeEvent *e) { - int hght = m_pTopSplitter->sizeHint().height(); + int hght = m_pTopSplitter->tqsizeHint().height(); m_pTopSplitter->setGeometry(0,0,width(),hght); m_pSplitter->setGeometry(0,hght,width(),height() - hght); } -QSize KviListWindow::sizeHint() const +TQSize KviListWindow::tqsizeHint() const { - return m_pSplitter->sizeHint(); + return m_pSplitter->tqsizeHint(); } void KviListWindow::fillCaptionBuffers() { - KviQString::sprintf(m_szPlainTextCaption,__tr2qs("Channel List [IRC Context %u]"),m_pConsole->ircContextId()); + KviTQString::sprintf(m_szPlainTextCaption,__tr2qs("Channel List [IRC Context %u]"),m_pConsole->ircContextId()); - KviQString::sprintf(m_szHtmlActiveCaption, + KviTQString::sprintf(m_szHtmlActiveCaption, __tr2qs("Channel List " \ "[IRC Context %u]"), - KVI_OPTION_COLOR(KviOption_colorCaptionTextActive).name().ascii(), - KVI_OPTION_COLOR(KviOption_colorCaptionTextActive2).name().ascii(), + TQString(KVI_OPTION_COLOR(KviOption_colorCaptionTextActive).name()).ascii(), + TQString(KVI_OPTION_COLOR(KviOption_colorCaptionTextActive2).name()).ascii(), m_pConsole->ircContextId()); - KviQString::sprintf(m_szHtmlInactiveCaption, + KviTQString::sprintf(m_szHtmlInactiveCaption, __tr2qs("Channel list " \ "[IRC Context %u]"), - KVI_OPTION_COLOR(KviOption_colorCaptionTextInactive).name().ascii(), - KVI_OPTION_COLOR(KviOption_colorCaptionTextInactive2).name().ascii(), + TQString(KVI_OPTION_COLOR(KviOption_colorCaptionTextInactive).name()).ascii(), + TQString(KVI_OPTION_COLOR(KviOption_colorCaptionTextInactive2).name()).ascii(), m_pConsole->ircContextId()); } @@ -343,11 +343,11 @@ void KviListWindow::exportList() return; } - QString szFile; + TQString szFile; if(connection()) { - QString szDate = QDateTime::currentDateTime().toString("d MMM yyyy hh-mm"); - KviQString::sprintf(szFile,__tr2qs("Channel list for %Q - %Q"), + TQString szDate = TQDateTime::tqcurrentDateTime().toString("d MMM yyyy hh-mm"); + KviTQString::sprintf(szFile,__tr2qs("Channel list for %Q - %Q"), &(connection()->networkName()),&(szDate)); } else { szFile = __tr2qs("Channel list"); @@ -356,7 +356,7 @@ void KviListWindow::exportList() __tr2qs("Configuration files (*.kvc)"),false, false,true,this)) { - if(QFileInfo(szFile).extension()!="kvc") + if(TQFileInfo(szFile).extension()!="kvc") szFile.append(".kvc"); KviConfig cfg(szFile,KviConfig::Write); cfg.clear(); @@ -378,8 +378,8 @@ void KviListWindow::exportList() void KviListWindow::importList() { - QString szFile; - if(KviFileDialog::askForOpenFileName(szFile,__tr2qs("Choose filename"),QString::null, + TQString szFile; + if(KviFileDialog::askForOpenFileName(szFile,__tr2qs("Choose filename"),TQString(), __tr2qs("Configuration files (*.kvc)"),false, false,this)) { @@ -399,8 +399,8 @@ void KviListWindow::importList() m_pItemList->append( new KviChannelListViewItemData( it.currentKey(), - cfg.readQStringEntry("users","0"), - cfg.readQStringEntry("topic","") + cfg.readTQStringEntry("users","0"), + cfg.readTQStringEntry("topic","") ) ); ++it; @@ -451,13 +451,13 @@ void KviListWindow::processData(KviIrcMessage *msg) { if(!m_pFlushTimer) { - m_pFlushTimer = new QTimer(this); - connect(m_pFlushTimer,SIGNAL(timeout()),this,SLOT(flush())); + m_pFlushTimer = new TQTimer(this); + connect(m_pFlushTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(flush())); m_pFlushTimer->start(1000); m_pRequestButton->setEnabled(false); } - QString sz2 = msg->connection()->decodeText(msg->safeParam(2)); + TQString sz2 = msg->connection()->decodeText(msg->safeParam(2)); m_pItemList->append( new KviChannelListViewItemData( @@ -468,7 +468,7 @@ void KviListWindow::processData(KviIrcMessage *msg) if(_OUTPUT_VERBOSE) { - QString zzz = msg->connection()->decodeText(msg->allParams()); + TQString zzz = msg->connection()->decodeText(msg->allParams()); output(KVI_OUT_LIST,__tr2qs("Processing list: %Q"),&zzz); } } @@ -487,10 +487,10 @@ void KviListWindow::flush() void KviListWindow::itemDoubleClicked(KviTalListViewItem *it) { - QString sz = ((KviChannelListViewItem *)it)->channel(); + TQString sz = ((KviChannelListViewItem *)it)->channel(); if(sz.isEmpty())return; if(!connection())return; - KviQCString dat = connection()->encodeText(sz); + KviTQCString dat = connection()->encodeText(sz); if(!dat.data())return; m_pConsole->connection()->sendFmtData("join %s",dat.data()); } @@ -504,7 +504,7 @@ void KviListWindow::itemDoubleClicked(KviTalListViewItem *it) // KviWindowProperty p; // p.rect = externalGeometry(); // p.isDocked = isAttacched(); -// QValueList l(m_pSplitter->sizes()); +// TQValueList l(m_pSplitter->sizes()); // if(l.count() >= 1)p.splitWidth1 = *(l.at(0)); // if(l.count() >= 2)p.splitWidth2 = *(l.at(1)); // p.timestamp = m_pView->timestamp(); @@ -518,7 +518,7 @@ void KviListWindow::itemDoubleClicked(KviTalListViewItem *it) // //void KviListWindow::setProperties(KviWindowProperty *p) //{ -// QValueList l; +// TQValueList l; // l.append(p->splitWidth1); // l.append(p->splitWidth2); // m_pVertSplitter->setSizes(l); diff --git a/src/modules/list/listwindow.h b/src/modules/list/listwindow.h index 8e7d510e..c0103519 100644 --- a/src/modules/list/listwindow.h +++ b/src/modules/list/listwindow.h @@ -34,8 +34,8 @@ #include "kvi_tal_listview.h" #include "kvi_tal_popupmenu.h" -#include -#include +#include +#include class KviThemedLabel; @@ -44,13 +44,13 @@ class KviChannelListViewItemData friend class KviChannelListViewItem; friend class KviListWindow; public: - KviChannelListViewItemData(const QString &szChan,const QString &szUsers,const QString &szTopic); + KviChannelListViewItemData(const TQString &szChan,const TQString &szUsers,const TQString &szTopic); ~KviChannelListViewItemData(); protected: - QString m_szChan; - QString m_szUsers; - QString m_szTopic; - QString m_szUsersKey; + TQString m_szChan; + TQString m_szUsers; + TQString m_szTopic; + TQString m_szUsersKey; }; class KviChannelListViewItem : public KviTalListViewItem @@ -62,15 +62,15 @@ public: protected: KviChannelListViewItemData * m_pData; public: - const QString & channel(){ return m_pData->m_szChan; }; + const TQString & channel(){ return m_pData->m_szChan; }; #ifdef COMPILE_USE_QT4 - int width ( const QFontMetrics & fm, const KviTalListView * lv, int column ) const; + int width ( const TQFontMetrics & fm, const KviTalListView * lv, int column ) const; #else - int width ( const QFontMetrics & fm, const QListView * lv, int column ) const; + int width ( const TQFontMetrics & fm, const TQListView * lv, int column ) const; #endif protected: - virtual void paintCell(QPainter * p,const QColorGroup &cg,int col,int wdth,int align); - virtual QString key(int col,bool) const; + virtual void paintCell(TQPainter * p,const TQColorGroup &cg,int col,int wdth,int align); + virtual TQString key(int col,bool) const; }; @@ -78,30 +78,31 @@ protected: class KviListWindow : public KviWindow, public KviExternalServerDataParser { Q_OBJECT + TQ_OBJECT public: KviListWindow(KviFrame * lpFrm,KviConsole * lpConsole); ~KviListWindow(); protected: - QSplitter * m_pVertSplitter; - QSplitter * m_pTopSplitter; + TQSplitter * m_pVertSplitter; + TQSplitter * m_pTopSplitter; KviTalListView * m_pListView; - QLineEdit * m_pParamsEdit; - QToolButton * m_pRequestButton; - QToolButton * m_pStopListDownloadButton; - QToolButton * m_pOpenButton; - QToolButton * m_pSaveButton; + TQLineEdit * m_pParamsEdit; + TQToolButton * m_pRequestButton; + TQToolButton * m_pStopListDownloadButton; + TQToolButton * m_pOpenButton; + TQToolButton * m_pSaveButton; KviThemedLabel * m_pInfoLabel; - QTimer * m_pFlushTimer; + TQTimer * m_pFlushTimer; KviPointerList * m_pItemList; public: // Methods virtual void control(int msg); virtual void processData(KviIrcMessage * msg); virtual void die(); protected: - virtual QPixmap * myIconPtr(); + virtual TQPixmap * myIconPtr(); virtual void fillCaptionBuffers(); virtual void applyOptions(); - virtual void resizeEvent(QResizeEvent *e); + virtual void resizeEvent(TQResizeEvent *e); virtual void getBaseLogFileName(KviStr &buffer); protected slots: void flush(); @@ -112,7 +113,7 @@ protected slots: void exportList(); void importList(); public: - virtual QSize sizeHint() const; + virtual TQSize tqsizeHint() const; private: void reset(); void endOfList(); diff --git a/src/modules/log/libkvilog.cpp b/src/modules/log/libkvilog.cpp index 5e29e30d..d01bae6e 100644 --- a/src/modules/log/libkvilog.cpp +++ b/src/modules/log/libkvilog.cpp @@ -86,7 +86,7 @@ static bool log_kvs_cmd_start(KviKvsModuleCommandCall * c) { - QString szFile; + TQString szFile; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("filename",KVS_PT_STRING,KVS_PF_OPTIONAL,szFile) KVSM_PARAMETERS_END(c) @@ -94,7 +94,7 @@ static bool log_kvs_cmd_start(KviKvsModuleCommandCall * c) KviWindow * pWnd = c->window(); if(c->hasSwitch('w',"window")) { - QString szWindow; + TQString szWindow; if(c->switches()->getAsStringIfExisting('w',"window",szWindow)) { pWnd = g_pApp->findWindow(szWindow); @@ -153,7 +153,7 @@ static bool log_kvs_cmd_stop(KviKvsModuleCommandCall * c) KviWindow * pWnd = c->window(); if(c->hasSwitch('w',"window")) { - QString szWindow; + TQString szWindow; if(c->switches()->getAsStringIfExisting('w',"window",szWindow)) { pWnd = g_pApp->findWindow(szWindow); @@ -206,7 +206,7 @@ static bool log_kvs_cmd_flush(KviKvsModuleCommandCall * c) KviWindow * pWnd = c->window(); if(c->hasSwitch('w',"window")) { - QString szWindow; + TQString szWindow; if(c->switches()->getAsStringIfExisting('w',"window",szWindow)) { pWnd = g_pApp->findWindow(szWindow); @@ -259,8 +259,8 @@ static bool log_kvs_cmd_flush(KviKvsModuleCommandCall * c) static bool log_kvs_fnc_file(KviKvsModuleFunctionCall * c) { - QString szWindow; - QString buffer; + TQString szWindow; + TQString buffer; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("window id",KVS_PT_STRING,KVS_PF_OPTIONAL,szWindow) KVSM_PARAMETERS_END(c) diff --git a/src/modules/logview/libkvilogview.cpp b/src/modules/logview/libkvilogview.cpp index 2aa56a66..cf5c7a95 100644 --- a/src/modules/logview/libkvilogview.cpp +++ b/src/modules/logview/libkvilogview.cpp @@ -32,7 +32,7 @@ #include "kvi_locale.h" #include "kvi_app.h" -static QRect g_rectLogViewGeometry; +static TQRect g_rectLogViewGeometry; KviLogViewMDIWindow * g_pLogViewWindow = 0; #define LOGVIEW_MODULE_EXTENSION_NAME "Log viewer extension" @@ -66,11 +66,11 @@ static bool logview_kvs_cmd_open(KviKvsModuleCommandCall * c) KviModuleExtensionDescriptor * d = c->module()->findExtensionDescriptor("tool",LOGVIEW_MODULE_EXTENSION_NAME); if(d) { - KviPointerHashTable dict(17,true); + KviPointerHashTable dict(17,true); dict.setAutoDelete(true); - QString dummy; - dict.replace("bCreateMinimized",new QVariant(c->hasSwitch('m',dummy))); - dict.replace("bNoRaise",new QVariant(c->hasSwitch('n',dummy))); + TQString dummy; + dict.tqreplace("bCreateMinimized",new TQVariant(c->hasSwitch('m',dummy))); + dict.tqreplace("bNoRaise",new TQVariant(c->hasSwitch('n',dummy))); d->allocate(c->window(),&dict,0); } else { @@ -88,11 +88,11 @@ static KviModuleExtension * logview_extension_alloc(KviModuleExtensionAllocStruc { if(s->pParams) { - if(QVariant * v = s->pParams->find("bCreateMinimized")) + if(TQVariant * v = s->pParams->tqfind("bCreateMinimized")) { if(v->isValid()) { - if(v->type() == QVariant::Bool) + if(v->type() == TQVariant::Bool) { bCreateMinimized = v->toBool(); } @@ -108,11 +108,11 @@ static KviModuleExtension * logview_extension_alloc(KviModuleExtensionAllocStruc if(s->pParams) { - if(QVariant * v = s->pParams->find("bNoRaise")) + if(TQVariant * v = s->pParams->tqfind("bNoRaise")) { if(v) { - if(v->isValid() && v->type() == QVariant::Bool) + if(v->isValid() && v->type() == TQVariant::Bool) bNoRaise = v->toBool(); } } diff --git a/src/modules/logview/logviewmdiwindow.cpp b/src/modules/logview/logviewmdiwindow.cpp index 20a2a232..bdc40838 100644 --- a/src/modules/logview/logviewmdiwindow.cpp +++ b/src/modules/logview/logviewmdiwindow.cpp @@ -33,33 +33,33 @@ #include "kvi_app.h" #include "kvi_fileutils.h" #ifdef COMPILE_USE_QT4 - #include + #include #else - #include + #include #endif #include "kvi_valuelist.h" #include "kvi_accel.h" -#include -#include -#include +#include +#include +#include #include "kvi_tal_listview.h" -#include -#include +#include +#include #include "kvi_tal_popupmenu.h" -#include -#include -#include +#include +#include +#include #ifdef COMPILE_ZLIB_SUPPORT #include #endif -#include +#include #include "kvi_styled_controls.h" -#include -#include -#include +#include +#include +#include extern KviLogViewMDIWindow * g_pLogViewWindow; @@ -69,11 +69,11 @@ KviLogViewMDIWindow::KviLogViewMDIWindow(KviModuleExtensionDescriptor * d,KviFra g_pLogViewWindow = this; // m_pLogViewWidget = new KviLogViewWidget(this); #ifdef COMPILE_USE_QT4 - m_pSplitter = new QSplitter(Qt::Horizontal,this,"main_splitter"); + m_pSplitter = new TQSplitter(Qt::Horizontal,this,"main_splitter"); #else - m_pSplitter = new QSplitter(QSplitter::Horizontal,this,"main_splitter"); + m_pSplitter = new TQSplitter(Qt::Horizontal,this,"main_splitter"); #endif - m_pTabWidget = new QTabWidget(m_pSplitter); + m_pTabWidget = new TQTabWidget(m_pSplitter); m_pIndexTab = new KviTalVBox(m_pTabWidget); m_pTabWidget->insertTab(m_pIndexTab,__tr2qs_ctx("Index","logview")); @@ -84,79 +84,79 @@ KviLogViewMDIWindow::KviLogViewMDIWindow(KviModuleExtensionDescriptor * d,KviFra m_pListView->setMultiSelection(false); m_pListView->setShowSortIndicator(true); m_pListView->setRootIsDecorated(true); - connect(m_pListView,SIGNAL(selectionChanged(KviTalListViewItem *)),this,SLOT(itemSelected(KviTalListViewItem *))); - connect(m_pListView,SIGNAL(rightButtonClicked ( KviTalListViewItem * , const QPoint &, int )),this,SLOT(rightButtonClicked ( KviTalListViewItem * , const QPoint &, int ))); + connect(m_pListView,TQT_SIGNAL(selectionChanged(KviTalListViewItem *)),this,TQT_SLOT(itemSelected(KviTalListViewItem *))); + connect(m_pListView,TQT_SIGNAL(rightButtonClicked ( KviTalListViewItem * , const TQPoint &, int )),this,TQT_SLOT(rightButtonClicked ( KviTalListViewItem * , const TQPoint &, int ))); - m_pSearchTab = new QWidget(m_pTabWidget); + m_pSearchTab = new TQWidget(m_pTabWidget); m_pTabWidget->insertTab(m_pSearchTab,__tr2qs_ctx("Filter","logview")); - QGridLayout *layout = new QGridLayout(m_pSearchTab,10,2,3,5); + TQGridLayout *tqlayout = new TQGridLayout(m_pSearchTab,10,2,3,5); m_pShowChannelsCheck = new KviStyledCheckBox(__tr2qs_ctx("Show channel logs","logview"),m_pSearchTab); m_pShowChannelsCheck->setChecked(true); - layout->addMultiCellWidget(m_pShowChannelsCheck,0,0,0,1); + tqlayout->addMultiCellWidget(m_pShowChannelsCheck,0,0,0,1); m_pShowQueryesCheck = new KviStyledCheckBox(__tr2qs_ctx("Show query logs","logview"),m_pSearchTab); m_pShowQueryesCheck->setChecked(true); - layout->addMultiCellWidget(m_pShowQueryesCheck,1,1,0,1); + tqlayout->addMultiCellWidget(m_pShowQueryesCheck,1,1,0,1); m_pShowConsolesCheck = new KviStyledCheckBox(__tr2qs_ctx("Show console logs","logview"),m_pSearchTab); m_pShowConsolesCheck->setChecked(true); - layout->addMultiCellWidget(m_pShowConsolesCheck,2,2,0,1); + tqlayout->addMultiCellWidget(m_pShowConsolesCheck,2,2,0,1); m_pShowDccChatCheck = new KviStyledCheckBox(__tr2qs_ctx("Show DCC chat logs","logview"),m_pSearchTab); m_pShowDccChatCheck->setChecked(true); - layout->addMultiCellWidget(m_pShowDccChatCheck,3,3,0,1); + tqlayout->addMultiCellWidget(m_pShowDccChatCheck,3,3,0,1); m_pShowOtherCheck = new KviStyledCheckBox(__tr2qs_ctx("Show other logs","logview"),m_pSearchTab); m_pShowOtherCheck->setChecked(true); - layout->addMultiCellWidget(m_pShowOtherCheck,4,4,0,1); + tqlayout->addMultiCellWidget(m_pShowOtherCheck,4,4,0,1); - QLabel *l; - l = new QLabel(__tr2qs_ctx("Contents filter","logview"),m_pSearchTab); - layout->addMultiCellWidget(l,5,5,0,1); - - l = new QLabel(__tr2qs_ctx("Log name mask:","logview"),m_pSearchTab); - m_pFileNameMask = new QLineEdit(m_pSearchTab); - connect(m_pFileNameMask,SIGNAL(returnPressed()),this,SLOT(applyFilter())); - layout->addWidget(l,6,0); - layout->addWidget(m_pFileNameMask,6,1); - - l = new QLabel(__tr2qs_ctx("Log contents mask:","logview"),m_pSearchTab); - m_pContentsMask = new QLineEdit(m_pSearchTab); - connect(m_pContentsMask,SIGNAL(returnPressed()),this,SLOT(applyFilter())); - layout->addWidget(l,7,0); - layout->addWidget(m_pContentsMask,7,1); + TQLabel *l; + l = new TQLabel(__tr2qs_ctx("Contents filter","logview"),m_pSearchTab); + tqlayout->addMultiCellWidget(l,5,5,0,1); + + l = new TQLabel(__tr2qs_ctx("Log name tqmask:","logview"),m_pSearchTab); + m_pFileNameMask = new TQLineEdit(m_pSearchTab); + connect(m_pFileNameMask,TQT_SIGNAL(returnPressed()),this,TQT_SLOT(applyFilter())); + tqlayout->addWidget(l,6,0); + tqlayout->addWidget(m_pFileNameMask,6,1); + + l = new TQLabel(__tr2qs_ctx("Log contents tqmask:","logview"),m_pSearchTab); + m_pContentsMask = new TQLineEdit(m_pSearchTab); + connect(m_pContentsMask,TQT_SIGNAL(returnPressed()),this,TQT_SLOT(applyFilter())); + tqlayout->addWidget(l,7,0); + tqlayout->addWidget(m_pContentsMask,7,1); m_pEnableFromFilter = new KviStyledCheckBox(__tr2qs_ctx("Only older than","logview"),m_pSearchTab); - m_pFromDateEdit = new QDateEdit(m_pSearchTab); - m_pFromDateEdit->setDate(QDate::currentDate()); - layout->addWidget(m_pEnableFromFilter,8,0); - layout->addWidget(m_pFromDateEdit,8,1); - connect(m_pEnableFromFilter,SIGNAL(toggled(bool)),m_pFromDateEdit,SLOT(setEnabled(bool))); + m_pFromDateEdit = new TQDateEdit(m_pSearchTab); + m_pFromDateEdit->setDate(TQDate::tqcurrentDate()); + tqlayout->addWidget(m_pEnableFromFilter,8,0); + tqlayout->addWidget(m_pFromDateEdit,8,1); + connect(m_pEnableFromFilter,TQT_SIGNAL(toggled(bool)),m_pFromDateEdit,TQT_SLOT(setEnabled(bool))); m_pFromDateEdit->setEnabled(false); m_pEnableToFilter = new KviStyledCheckBox(__tr2qs_ctx("Only newier than","logview"),m_pSearchTab); - m_pToDateEdit = new QDateEdit(m_pSearchTab); - m_pToDateEdit->setDate(QDate::currentDate()); - layout->addWidget(m_pEnableToFilter,9,0); - layout->addWidget(m_pToDateEdit,9,1); - connect(m_pEnableToFilter,SIGNAL(toggled(bool)),m_pToDateEdit,SLOT(setEnabled(bool))); + m_pToDateEdit = new TQDateEdit(m_pSearchTab); + m_pToDateEdit->setDate(TQDate::tqcurrentDate()); + tqlayout->addWidget(m_pEnableToFilter,9,0); + tqlayout->addWidget(m_pToDateEdit,9,1); + connect(m_pEnableToFilter,TQT_SIGNAL(toggled(bool)),m_pToDateEdit,TQT_SLOT(setEnabled(bool))); m_pToDateEdit->setEnabled(false); - QPushButton *pb = new QPushButton(__tr2qs_ctx("Apply filter","logview"),m_pSearchTab); - connect(pb,SIGNAL(clicked()),this,SLOT(applyFilter())); - layout->addWidget(pb,10,1); + TQPushButton *pb = new TQPushButton(__tr2qs_ctx("Apply filter","logview"),m_pSearchTab); + connect(pb,TQT_SIGNAL(clicked()),this,TQT_SLOT(applyFilter())); + tqlayout->addWidget(pb,10,1); - QWidget *w = new QWidget(m_pSearchTab); - w->setSizePolicy(QSizePolicy::Ignored,QSizePolicy::Ignored); - layout->addWidget(w,11,1); + TQWidget *w = new TQWidget(m_pSearchTab); + w->tqsetSizePolicy(TQSizePolicy::Ignored,TQSizePolicy::Ignored); + tqlayout->addWidget(w,11,1); m_pIrcView = new KviIrcView(m_pSplitter,g_pFrame,this); #ifdef COMPILE_USE_QT4 - m_pIrcView->setFocusPolicy(Qt::ClickFocus); + m_pIrcView->setFocusPolicy(TTQ_ClickFocus); #else - m_pIrcView->setFocusPolicy(QWidget::ClickFocus); + m_pIrcView->setFocusPolicy(TQ_ClickFocus); #endif KviValueList li; li.append(110); @@ -164,14 +164,14 @@ KviLogViewMDIWindow::KviLogViewMDIWindow(KviModuleExtensionDescriptor * d,KviFra m_pSplitter->setSizes(li); g_pApp->getLocalKvircDirectory(m_szLogDirectory,KviApp::Log); - KviQString::ensureLastCharIs(m_szLogDirectory,'/'); // Does this work on Windows? + KviTQString::ensureLastCharIs(m_szLogDirectory,'/'); // Does this work on Windows? cacheFileList(); setupItemList(); KviAccel *a = new KviAccel( this ); - a->connectItem( a->insertItem(Qt::Key_F+Qt::CTRL), + a->connectItem( a->insertItem(TQt::Key_F+TQt::CTRL), m_pIrcView, - SLOT(toggleToolWidget()) ); + TQT_SLOT(toggleToolWidget()) ); } @@ -187,13 +187,13 @@ void KviLogViewMDIWindow::applyFilter() } -QPixmap * KviLogViewMDIWindow::myIconPtr() +TQPixmap * KviLogViewMDIWindow::myIconPtr() { return g_pIconManager->getSmallIcon(KVI_SMALLICON_LOG); } -void KviLogViewMDIWindow::resizeEvent(QResizeEvent *e) +void KviLogViewMDIWindow::resizeEvent(TQResizeEvent *e) { m_pSplitter->setGeometry(0,0,width(),height()); } @@ -202,11 +202,11 @@ void KviLogViewMDIWindow::fillCaptionBuffers() { m_szPlainTextCaption = __tr2qs_ctx("Log Viewer","logview"); - m_szHtmlActiveCaption = QString("").arg(KVI_OPTION_COLOR(KviOption_colorCaptionTextActive).name().ascii()); + m_szHtmlActiveCaption = TQString("").tqarg(TQString(KVI_OPTION_COLOR(KviOption_colorCaptionTextActive).name()).ascii()); m_szHtmlActiveCaption.append(m_szPlainTextCaption); m_szHtmlActiveCaption.append(""); - m_szHtmlInactiveCaption = QString("").arg(KVI_OPTION_COLOR(KviOption_colorCaptionTextInactive).name().ascii()); + m_szHtmlInactiveCaption = TQString("").tqarg(TQString(KVI_OPTION_COLOR(KviOption_colorCaptionTextInactive).name()).ascii()); m_szHtmlInactiveCaption.append(m_szPlainTextCaption); m_szHtmlInactiveCaption.append(""); } @@ -216,9 +216,9 @@ void KviLogViewMDIWindow::die() close(); } -QSize KviLogViewMDIWindow::sizeHint() const +TQSize KviLogViewMDIWindow::tqsizeHint() const { - QSize ret(m_pSplitter->sizeHint().width(),m_pIrcView->sizeHint().height()); + TQSize ret(m_pSplitter->tqsizeHint().width(),m_pIrcView->tqsizeHint().height()); return ret; } @@ -229,8 +229,8 @@ void KviLogViewMDIWindow::setupItemList() //m_logList.begin(); KviLogListViewItem *pLastCategory=0; KviLogListViewItemFolder *pLastGroupItem; - QString szLastGroup; - QString szCurGroup; + TQString szLastGroup; + TQString szCurGroup; const bool bShowChannel=m_pShowChannelsCheck->isChecked(); const bool bShowQuery=m_pShowQueryesCheck->isChecked(); const bool bShowConsole=m_pShowConsolesCheck->isChecked(); @@ -240,22 +240,22 @@ void KviLogViewMDIWindow::setupItemList() const bool filterFromDate=m_pEnableFromFilter->isChecked(); const bool filterToDate=m_pEnableToFilter->isChecked(); - const QString nameFilterText = m_pFileNameMask->text(); + const TQString nameFilterText = m_pFileNameMask->text(); const bool enableNameFilter = !nameFilterText.isEmpty(); - const QString contentFilterText = m_pContentsMask->text(); + const TQString contentFilterText = m_pContentsMask->text(); const bool enableContentFilter = !contentFilterText.isEmpty(); - QDate fromDate = m_pFromDateEdit->date(); - QDate toDate = m_pToDateEdit->date(); + TQDate fromDate = m_pFromDateEdit->date(); + TQDate toDate = m_pToDateEdit->date(); - QString textBuffer; + TQString textBuffer; #ifdef COMPILE_USE_QT4 Q3ProgressDialog progress( __tr2qs_ctx("Filtering files...","logview"), __tr2qs_ctx("Abort filtering","logview"), m_logList.count(), this, "progress", TRUE ); #else - QProgressDialog progress( __tr2qs_ctx("Filtering files...","logview"), + TQProgressDialog progress( __tr2qs_ctx("Filtering files...","logview"), __tr2qs_ctx("Abort filtering","logview"), m_logList.count(), this, "progress", TRUE ); #endif @@ -291,13 +291,13 @@ void KviLogViewMDIWindow::setupItemList() continue; if(enableNameFilter) - if(!KviQString::matchStringCI(nameFilterText,pFile->name())) + if(!KviTQString::matchStringCI(nameFilterText,pFile->name())) continue; if(enableContentFilter) { pFile->getText(textBuffer,m_szLogDirectory); - if(!KviQString::matchStringCI(contentFilterText,textBuffer)) + if(!KviTQString::matchStringCI(contentFilterText,textBuffer)) continue; } @@ -309,7 +309,7 @@ void KviLogViewMDIWindow::setupItemList() pLastCategory = new KviLogListViewItemType(m_pListView,pFile->type()); } - KviQString::sprintf(szCurGroup,__tr2qs_ctx("%Q on %Q","logview"),&(pFile->name()), + KviTQString::sprintf(szCurGroup,__tr2qs_ctx("%Q on %Q","logview"),&(pFile->name()), &(pFile->network()) ); @@ -324,14 +324,14 @@ void KviLogViewMDIWindow::setupItemList() void KviLogViewMDIWindow::cacheFileList() { - QStringList m_pFileNames = getFileNames(); + TQStringList m_pFileNames = getFileNames(); m_pFileNames.sort(); - QString szFname; + TQString szFname; - for(QStringList::Iterator it = m_pFileNames.begin(); it != m_pFileNames.end(); ++it) + for(TQStringList::Iterator it = m_pFileNames.begin(); it != m_pFileNames.end(); ++it) { szFname=(*it); - QFileInfo fi(szFname); + TQFileInfo fi(szFname); if(fi.extension(false)=="gz" || fi.extension(false)=="log") m_logList.append(new KviLogFile(szFname)); } @@ -340,46 +340,46 @@ void KviLogViewMDIWindow::cacheFileList() void KviLogViewMDIWindow::itemSelected(KviTalListViewItem * it) { bool bCompressed=0; - //A parent node + //A tqparent node m_pIrcView->clearBuffer(); - if(!it || !it->parent() || !(((KviLogListViewItem *)it)->m_pFileData) ) + if(!it || !it->tqparent() || !(((KviLogListViewItem *)it)->m_pFileData) ) { return; } - QString text; + TQString text; ((KviLogListViewItem *)it)->m_pFileData->getText(text,m_szLogDirectory); - QStringList lines=QStringList::split('\n',text); + TQStringList lines=TQStringList::split('\n',text); bool bOk; int iMsgType; - for ( QStringList::Iterator it = lines.begin(); it != lines.end(); ++it ) { - QString num=(*it).section(' ',0,0); + for ( TQStringList::Iterator it = lines.begin(); it != lines.end(); ++it ) { + TQString num=(*it).section(' ',0,0); iMsgType=num.toInt(&bOk); if(bOk) outputNoFmt(iMsgType,(*it).section(' ',1),KviIrcView::NoRepaint | KviIrcView::NoTimestamp); else outputNoFmt(0,*it,KviIrcView::NoRepaint | KviIrcView::NoTimestamp); } - m_pIrcView->repaint(false); + m_pIrcView->tqrepaint(false); } -QStringList KviLogViewMDIWindow::getFileNames() +TQStringList KviLogViewMDIWindow::getFileNames() { - QString logPath; + TQString logPath; g_pApp->getLocalKvircDirectory(logPath,KviApp::Log); - QString qPath(logPath); - QDir logDir(qPath); + TQString qPath(logPath); + TQDir logDir(qPath); return logDir.entryList(); } -void KviLogViewMDIWindow::rightButtonClicked ( KviTalListViewItem * it, const QPoint &, int ) +void KviLogViewMDIWindow::rightButtonClicked ( KviTalListViewItem * it, const TQPoint &, int ) { if(!it) return; if(((KviLogListViewItem *)it)->fileName(0).isEmpty()) return; KviTalPopupMenu* popup = new KviTalPopupMenu(this); - popup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_QUIT)),__tr2qs_ctx("Remove file","logview"),this,SLOT(deleteCurrent())); - popup->exec( QCursor::pos() ); + popup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_TQUIT)),__tr2qs_ctx("Remove file","logview"),this,TQT_SLOT(deleteCurrent())); + popup->exec( TQCursor::pos() ); } void KviLogViewMDIWindow::deleteCurrent() @@ -389,7 +389,7 @@ void KviLogViewMDIWindow::deleteCurrent() { if(!pItem->fileName(0).isNull()) { - QString szFname; + TQString szFname; g_pApp->getLocalKvircDirectory(szFname,KviApp::Log,pItem->m_pFileData->fileName()); KviFileUtils::removeFile(szFname); delete pItem; @@ -398,20 +398,20 @@ void KviLogViewMDIWindow::deleteCurrent() } } -KviLogFile::KviLogFile(const QString& name) +KviLogFile::KviLogFile(const TQString& name) { m_szFilename=name; - QFileInfo fi(m_szFilename); + TQFileInfo fi(m_szFilename); m_bCompressed=(fi.extension(false)=="gz"); - QString typeToken = m_szFilename.section('_',0,0); + TQString typeToken = m_szFilename.section('_',0,0); // Ignore non-logs files, this includes '.' and '..' - if( KviQString::equalCI(typeToken,"channel") ) + if( KviTQString::equalCI(typeToken,"channel") ) m_type = Channel; - else if( KviQString::equalCI(typeToken,"console") ) + else if( KviTQString::equalCI(typeToken,"console") ) m_type = Console; - else if( KviQString::equalCI(typeToken,"dccchat") ) + else if( KviTQString::equalCI(typeToken,"dccchat") ) m_type = DccChat; - else if( KviQString::equalCI(typeToken,"query") ) + else if( KviTQString::equalCI(typeToken,"query") ) m_type = Query; else m_type = Other; @@ -423,7 +423,7 @@ KviLogFile::KviLogFile(const QString& name) undecoded = m_szFilename.section('.',1,1).section('_',0,0); m_szNetwork = undecoded.hexDecode(undecoded.ptr()).ptr(); - QString szDate = m_szFilename.section('.',1,3).section('_',1,1); + TQString szDate = m_szFilename.section('.',1,3).section('_',1,1); int iYear = szDate.section('.',0,0).toInt(); int iMonth = szDate.section('.',1,1).toInt(); int iDay = szDate.section('.',2,2).toInt(); @@ -432,9 +432,9 @@ KviLogFile::KviLogFile(const QString& name) //debug("type=%i, name=%s, net=%s, date=%i %i %i",m_type,m_szName.ascii(),m_szNetwork.ascii(),iYear,iMonth,iDay); } -void KviLogFile::getText(QString & text,const QString& logDir){ - QString logName = logDir; - QFile logFile; +void KviLogFile::getText(TQString & text,const TQString& logDir){ + TQString logName = logDir; + TQFile logFile; logName.append(fileName()); #ifdef COMPILE_ZLIB_SUPPORT if(m_bCompressed) @@ -444,8 +444,8 @@ void KviLogFile::getText(QString & text,const QString& logDir){ { char buff[1025]; int len; - KviQCString data; - //QCString data; + KviTQCString data; + //TQCString data; len=gzread(file,buff,1024); while(len>0) { @@ -454,7 +454,7 @@ void KviLogFile::getText(QString & text,const QString& logDir){ len=gzread(file,buff,1024); } gzclose(file); - text = QString::fromUtf8(data); + text = TQString::fromUtf8(data); } else { debug("Cannot open compressed file %s",logName.local8Bit().data()); } @@ -465,9 +465,9 @@ void KviLogFile::getText(QString & text,const QString& logDir){ if(!logFile.open(IO_ReadOnly)) return; - QByteArray bytes; + TQByteArray bytes; bytes=logFile.readAll(); - text = QString::fromUtf8(bytes.data(), bytes.size()); + text = TQString::fromUtf8(bytes.data(), bytes.size()); logFile.close(); #ifdef COMPILE_ZLIB_SUPPORT } diff --git a/src/modules/logview/logviewmdiwindow.h b/src/modules/logview/logviewmdiwindow.h index df4bb245..8a2a503f 100644 --- a/src/modules/logview/logviewmdiwindow.h +++ b/src/modules/logview/logviewmdiwindow.h @@ -29,15 +29,15 @@ #include "kvi_tal_vbox.h" #include "kvi_tal_listview.h" #include "kvi_pointerlist.h" -#include -#include +#include +#include class KviTalListView; -class QStringList; +class TQStringList; class KviLogViewWidget; -class QCheckBox; -class QLineEdit; -class QDateEdit; +class TQCheckBox; +class TQLineEdit; +class TQDateEdit; class KviLogFile { @@ -51,28 +51,29 @@ public: Other }; - KviLogFile(const QString& name); + KviLogFile(const TQString& name); - const QString & fileName() { return m_szFilename; }; - const QString & name() { return m_szName; }; - const QString & network() { return m_szNetwork; }; - const QDate & date() { return m_date; }; + const TQString & fileName() { return m_szFilename; }; + const TQString & name() { return m_szName; }; + const TQString & network() { return m_szNetwork; }; + const TQDate & date() { return m_date; }; - void getText(QString & text,const QString& logDir); + void getText(TQString & text,const TQString& logDir); KviLogTypes type() { return m_type; }; private: KviLogTypes m_type; - QString m_szFilename; + TQString m_szFilename; bool m_bCompressed; - QString m_szName; - QString m_szNetwork; - QDate m_date; + TQString m_szName; + TQString m_szNetwork; + TQDate m_date; }; class KviLogViewMDIWindow : public KviWindow , public KviModuleExtension { Q_OBJECT + TQ_OBJECT public: KviLogViewMDIWindow(KviModuleExtensionDescriptor * d,KviFrame * lpFrm); ~KviLogViewMDIWindow(); @@ -82,40 +83,40 @@ protected: KviTalListView * m_pListView; // Type filter - QCheckBox * m_pShowChannelsCheck; - QCheckBox * m_pShowQueryesCheck; - QCheckBox * m_pShowConsolesCheck; - QCheckBox * m_pShowOtherCheck; - QCheckBox * m_pShowDccChatCheck; + TQCheckBox * m_pShowChannelsCheck; + TQCheckBox * m_pShowQueryesCheck; + TQCheckBox * m_pShowConsolesCheck; + TQCheckBox * m_pShowOtherCheck; + TQCheckBox * m_pShowDccChatCheck; // Content filter - QLineEdit * m_pFileNameMask; - QLineEdit * m_pContentsMask; - - // Date/time mask - QCheckBox * m_pEnableFromFilter; - QCheckBox * m_pEnableToFilter; - QDateEdit * m_pFromDateEdit; - QDateEdit * m_pToDateEdit; - - QStringList * m_pFileNames; - QString m_szLogDirectory; - QTabWidget * m_pTabWidget; + TQLineEdit * m_pFileNameMask; + TQLineEdit * m_pContentsMask; + + // Date/time tqmask + TQCheckBox * m_pEnableFromFilter; + TQCheckBox * m_pEnableToFilter; + TQDateEdit * m_pFromDateEdit; + TQDateEdit * m_pToDateEdit; + + TQStringList * m_pFileNames; + TQString m_szLogDirectory; + TQTabWidget * m_pTabWidget; KviTalVBox * m_pIndexTab; - QWidget * m_pSearchTab; + TQWidget * m_pSearchTab; protected: - QStringList getFileNames(); + TQStringList getFileNames(); void setupItemList(); void cacheFileList(); - virtual QPixmap * myIconPtr(); - virtual void resizeEvent(QResizeEvent *e); + virtual TQPixmap * myIconPtr(); + virtual void resizeEvent(TQResizeEvent *e); virtual void fillCaptionBuffers(); virtual void die(); - virtual QSize sizeHint() const; + virtual TQSize tqsizeHint() const; protected slots: - void rightButtonClicked ( KviTalListViewItem *, const QPoint &, int ); + void rightButtonClicked ( KviTalListViewItem *, const TQPoint &, int ); void itemSelected(KviTalListViewItem * it); void deleteCurrent(); void applyFilter(); diff --git a/src/modules/logview/logviewwidget.cpp b/src/modules/logview/logviewwidget.cpp index fc5c8abc..31da5033 100644 --- a/src/modules/logview/logviewwidget.cpp +++ b/src/modules/logview/logviewwidget.cpp @@ -22,9 +22,9 @@ #include "logviewwidget.h" -#include -#include -#include +#include +#include +#include //#include "kvi_debug.h" #include "kvi_locale.h" @@ -35,9 +35,9 @@ #ifdef COMPILE_ZLIB_SUPPORT #include #endif -#include +#include -const QPixmap * KviLogListViewItemType::pixmap(int col) const +const TQPixmap * KviLogListViewItemType::pixmap(int col) const { switch(m_type) @@ -45,7 +45,7 @@ const QPixmap * KviLogListViewItemType::pixmap(int col) const case KviLogFile::Channel: return g_pIconManager->getSmallIcon(KVI_SMALLICON_CHANNEL); case KviLogFile::Query: - return g_pIconManager->getSmallIcon(KVI_SMALLICON_QUERY); + return g_pIconManager->getSmallIcon(KVI_SMALLICON_TQUERY); case KviLogFile::DccChat: return g_pIconManager->getSmallIcon(KVI_SMALLICON_DCCMSG); case KviLogFile::Console: @@ -55,7 +55,7 @@ const QPixmap * KviLogListViewItemType::pixmap(int col) const } } -QString KviLogListViewItemType::text(int col) const +TQString KviLogListViewItemType::text(int col) const { switch(m_type) { diff --git a/src/modules/logview/logviewwidget.h b/src/modules/logview/logviewwidget.h index 1b5eff97..c925e502 100644 --- a/src/modules/logview/logviewwidget.h +++ b/src/modules/logview/logviewwidget.h @@ -44,19 +44,19 @@ public: KviLogFile::KviLogTypes m_type; KviLogFile* m_pFileData; - virtual QString fileName(int col) const { return m_pFileData ? m_pFileData->name() : QString::null; }; - virtual QString text(int col) const { return m_pFileData ? m_pFileData->name() : QString::null; }; + virtual TQString fileName(int col) const { return m_pFileData ? m_pFileData->name() : TQString(); }; + virtual TQString text(int col) const { return m_pFileData ? m_pFileData->name() : TQString(); }; }; class KviLogListViewItemFolder : public KviLogListViewItem { public: - KviLogListViewItemFolder(KviTalListViewItem * par, const QString& label) + KviLogListViewItemFolder(KviTalListViewItem * par, const TQString& label) : KviLogListViewItem(par,KviLogFile::Other,0),m_szLabel(label) {}; ~KviLogListViewItemFolder() {}; public: - QString m_szLabel; - virtual QString text(int col) const { return m_szLabel; }; + TQString m_szLabel; + virtual TQString text(int col) const { return m_szLabel; }; }; class KviLogListViewItemType : public KviLogListViewItem @@ -66,8 +66,8 @@ public: : KviLogListViewItem(par,type,0) {}; ~KviLogListViewItemType() {}; public: - virtual const QPixmap * pixmap(int col) const; - virtual QString text(int col) const; + virtual const TQPixmap * pixmap(int col) const; + virtual TQString text(int col) const; }; @@ -77,8 +77,8 @@ public: KviLogListViewLog(KviTalListViewItem * par, KviLogFile::KviLogTypes type, KviLogFile * fileData) : KviLogListViewItem(par,type,fileData){}; ~KviLogListViewLog() {}; - virtual QString key ( int column, bool ascending ) const { return m_pFileData->date().toString("yyyy.MM.dd"); }; - virtual QString text(int col) const { return m_pFileData->date().toString("dd.MM.yyyy"); }; + virtual TQString key ( int column, bool ascending ) const { return m_pFileData->date().toString("yyyy.MM.dd"); }; + virtual TQString text(int col) const { return m_pFileData->date().toString("dd.MM.yyyy"); }; }; diff --git a/src/modules/mask/libkvimask.cpp b/src/modules/mask/libkvimask.cpp index 3f8be4b2..0e810c34 100644 --- a/src/modules/mask/libkvimask.cpp +++ b/src/modules/mask/libkvimask.cpp @@ -28,140 +28,140 @@ #include "kvi_ircmask.h" /* - @doc: mask.match + @doc: tqmask.match @type: function @title: - $mask.match + $tqmask.match @short: - Matches a mask agains a wildcarded one + Matches a tqmask agains a wildcarded one @syntax: - $mask.match(,) + $tqmask.match(,) @description: - Returns 1 if the matches and 0 otherwise. - can obviously contain wildcards ('*' and '?'). + Returns 1 if the matches and 0 otherwise. + can obviously contain wildcards ('*' and '?'). @example: [example] - [cmd]if[/cmd]($mask.match(*!*@*.linux.it,$0)) - [cmd]op[/cmd] [fnc]$mask.nick[/fnc]($0) + [cmd]if[/cmd]($tqmask.match(*!*@*.linux.it,$0)) + [cmd]op[/cmd] [fnc]$tqmask.nick[/fnc]($0) [/example] */ -static bool mask_kvs_fnc_match(KviKvsModuleFunctionCall * c) +static bool tqmask_kvs_fnc_match(KviKvsModuleFunctionCall * c) { - QString wildmask,fixedmask; + TQString wildtqmask,fixedtqmask; KVSM_PARAMETERS_BEGIN(c) - KVSM_PARAMETER("wildcard mask",KVS_PT_STRING,0,wildmask) - KVSM_PARAMETER("fixed mask",KVS_PT_STRING,0,fixedmask) + KVSM_PARAMETER("wildcard tqmask",KVS_PT_STRING,0,wildtqmask) + KVSM_PARAMETER("fixed tqmask",KVS_PT_STRING,0,fixedtqmask) KVSM_PARAMETERS_END(c) - KviIrcMask mk1(wildmask); - KviIrcMask mk2(fixedmask); + KviIrcMask mk1(wildtqmask); + KviIrcMask mk2(fixedtqmask); c->returnValue()->setBoolean(mk1.matchesFixed(mk2.nick(),mk2.user(),mk2.host())); return true; } /* - @doc: mask.nick + @doc: tqmask.nick @type: function @title: - $mask.nick + $tqmask.nick @short: - Returns the nick part of an IRC mask + Returns the nick part of an IRC tqmask @syntax: - $mask.nick() + $tqmask.nick() @description: - Returns the nickname part of an IRC mask. + Returns the nickname part of an IRC tqmask. */ -static bool mask_kvs_fnc_nick(KviKvsModuleFunctionCall * c) +static bool tqmask_kvs_fnc_nick(KviKvsModuleFunctionCall * c) { - QString mask; + TQString tqmask; KVSM_PARAMETERS_BEGIN(c) - KVSM_PARAMETER("mask",KVS_PT_STRING,0,mask) + KVSM_PARAMETER("tqmask",KVS_PT_STRING,0,tqmask) KVSM_PARAMETERS_END(c) - KviIrcMask mk(mask); + KviIrcMask mk(tqmask); c->returnValue()->setString(mk.nick()); return true; } /* - @doc: mask.user + @doc: tqmask.user @type: function @title: - $mask.user + $tqmask.user @short: - Returns the username part of an IRC mask + Returns the username part of an IRC tqmask @syntax: - $mask.user() + $tqmask.user() @description: - Returns the username part of an IRC mask. + Returns the username part of an IRC tqmask. */ -static bool mask_kvs_fnc_user(KviKvsModuleFunctionCall * c) +static bool tqmask_kvs_fnc_user(KviKvsModuleFunctionCall * c) { - QString mask; + TQString tqmask; KVSM_PARAMETERS_BEGIN(c) - KVSM_PARAMETER("mask",KVS_PT_STRING,0,mask) + KVSM_PARAMETER("tqmask",KVS_PT_STRING,0,tqmask) KVSM_PARAMETERS_END(c) - KviIrcMask mk(mask); + KviIrcMask mk(tqmask); c->returnValue()->setString(mk.user()); return true; } /* - @doc: mask.host + @doc: tqmask.host @type: function @title: - $mask.host + $tqmask.host @short: - Returns the hostname part of an IRC mask + Returns the hostname part of an IRC tqmask @syntax: - $mask.host() + $tqmask.host() @description: - Returns the hostname part of an IRC mask. + Returns the hostname part of an IRC tqmask. */ -static bool mask_kvs_fnc_host(KviKvsModuleFunctionCall * c) +static bool tqmask_kvs_fnc_host(KviKvsModuleFunctionCall * c) { - QString mask; + TQString tqmask; KVSM_PARAMETERS_BEGIN(c) - KVSM_PARAMETER("mask",KVS_PT_STRING,0,mask) + KVSM_PARAMETER("tqmask",KVS_PT_STRING,0,tqmask) KVSM_PARAMETERS_END(c) - KviIrcMask mk(mask); + KviIrcMask mk(tqmask); c->returnValue()->setString(mk.host()); return true; } /* - @doc: mask.hasnumerichost + @doc: tqmask.hasnumerichost @type: function @title: - $mask.hasNumericHost + $tqmask.hasNumericHost @short: - Checks if a host part of a mask is numeric + Checks if a host part of a tqmask is numeric @syntax: - $mask.hasNumericHost() + $tqmask.hasNumericHost() @description: - Returns 1 if the hostname part of the mask is numeric (e.g : unresolved IPV4 or IPV6 address) + Returns 1 if the hostname part of the tqmask is numeric (e.g : unresolved IPV4 or IPV6 address) */ -static bool mask_kvs_fnc_hasnumerichost(KviKvsModuleFunctionCall * c) +static bool tqmask_kvs_fnc_hasnumerichost(KviKvsModuleFunctionCall * c) { - QString mask; + TQString tqmask; KVSM_PARAMETERS_BEGIN(c) - KVSM_PARAMETER("mask",KVS_PT_STRING,0,mask) + KVSM_PARAMETER("tqmask",KVS_PT_STRING,0,tqmask) KVSM_PARAMETERS_END(c) - KviIrcMask mk(mask); + KviIrcMask mk(tqmask); c->returnValue()->setBoolean(mk.hasNumericHost()); return true; } @@ -173,18 +173,18 @@ static bool mask_kvs_fnc_hasnumerichost(KviKvsModuleFunctionCall * c) -static bool mask_module_init(KviModule * m) +static bool tqmask_module_init(KviModule * m) { - KVSM_REGISTER_FUNCTION(m,"match",mask_kvs_fnc_match); - KVSM_REGISTER_FUNCTION(m,"nick",mask_kvs_fnc_nick); - KVSM_REGISTER_FUNCTION(m,"user",mask_kvs_fnc_user); - KVSM_REGISTER_FUNCTION(m,"host",mask_kvs_fnc_host); - KVSM_REGISTER_FUNCTION(m,"hasnumerichost",mask_kvs_fnc_hasnumerichost); + KVSM_REGISTER_FUNCTION(m,"match",tqmask_kvs_fnc_match); + KVSM_REGISTER_FUNCTION(m,"nick",tqmask_kvs_fnc_nick); + KVSM_REGISTER_FUNCTION(m,"user",tqmask_kvs_fnc_user); + KVSM_REGISTER_FUNCTION(m,"host",tqmask_kvs_fnc_host); + KVSM_REGISTER_FUNCTION(m,"hasnumerichost",tqmask_kvs_fnc_hasnumerichost); return true; } -static bool mask_module_cleanup(KviModule *m) +static bool tqmask_module_cleanup(KviModule *m) { return true; } @@ -194,8 +194,8 @@ KVIRC_MODULE( "1.0.0", // module version "Copyright (C) 2002 Szymon Stefanek (pragma at kvirc dot net)", "Mask manipulation functions", - mask_module_init, + tqmask_module_init, 0, 0, - mask_module_cleanup + tqmask_module_cleanup ) diff --git a/src/modules/mediaplayer/libkvimediaplayer.cpp b/src/modules/mediaplayer/libkvimediaplayer.cpp index bd8a144f..8b99165e 100644 --- a/src/modules/mediaplayer/libkvimediaplayer.cpp +++ b/src/modules/mediaplayer/libkvimediaplayer.cpp @@ -61,9 +61,9 @@ static KviMediaPlayerInterface * auto_detect_player(KviWindow * pOut = 0) } if(pOut) { - QString szOut; - QString szNam = d->name(); - KviQString::sprintf(szOut,__tr2qs_ctx("Trying media player interface \"%Q\": score %d","mediaplayer"),&(szNam),iScore); + TQString szOut; + TQString szNam = d->name(); + KviTQString::sprintf(szOut,__tr2qs_ctx("Trying media player interface \"%Q\": score %d","mediaplayer"),&(szNam),iScore); pOut->output(KVI_OUT_MULTIMEDIA,szOut); } } @@ -87,9 +87,9 @@ static KviMediaPlayerInterface * auto_detect_player(KviWindow * pOut = 0) } if(pOut) { - QString szOut; - QString szNam = d->name(); - KviQString::sprintf(szOut,__tr2qs_ctx("Trying media player interface \"%Q\": score %d","mediaplayer"),&(szNam),iScore); + TQString szOut; + TQString szNam = d->name(); + KviTQString::sprintf(szOut,__tr2qs_ctx("Trying media player interface \"%Q\": score %d","mediaplayer"),&(szNam),iScore); pOut->output(KVI_OUT_MULTIMEDIA,szOut); } } @@ -132,7 +132,7 @@ static KviMediaPlayerInterface * auto_detect_player(KviWindow * pOut = 0) if(!c->hasSwitch('q',"quiet")) \ { \ c->warning(__tr2qs_ctx("The selected media player interface failed to execute the requested function","mediaplayer")); \ - QString tmp = __tr2qs_ctx("Last interface error: ","mediaplayer"); \ + TQString tmp = __tr2qs_ctx("Last interface error: ","mediaplayer"); \ tmp += g_pMPInterface->lastError(); \ c->warning(tmp); \ } \ @@ -144,7 +144,7 @@ static KviMediaPlayerInterface * auto_detect_player(KviWindow * pOut = 0) MP_KVS_FUNCTION(__name) \ { \ MP_KVS_FAIL_ON_NO_INTERFACE \ - QString szRet = g_pMPInterface->__ifacecommand(); \ + TQString szRet = g_pMPInterface->__ifacecommand(); \ c->returnValue()->setString(szRet); \ return true; \ } @@ -455,7 +455,7 @@ MP_KVS_COMMAND(detect) MP_KVS_COMMAND(setPlayer) { - QString szPlayer; + TQString szPlayer; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("player",KVS_PT_STRING,0,szPlayer) @@ -557,7 +557,7 @@ MP_KVS_FUNCTION(playerList) MP_KVS_COMMAND(playMrl) { - QString szMrl; + TQString szMrl; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("player",KVS_PT_STRING,0,szMrl) @@ -569,7 +569,7 @@ MP_KVS_COMMAND(playMrl) if(!c->hasSwitch('q',"quiet")) { c->warning(__tr2qs_ctx("The selected media player interface failed to execute the requested function","mediaplayer")); - QString tmp = __tr2qs_ctx("Last interface error: ","mediaplayer"); + TQString tmp = __tr2qs_ctx("Last interface error: ","mediaplayer"); tmp += g_pMPInterface->lastError(); c->warning(tmp); } @@ -580,7 +580,7 @@ MP_KVS_COMMAND(playMrl) MP_KVS_COMMAND(amipExec) { - QString szMrl; + TQString szMrl; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("player",KVS_PT_STRING,0,szMrl) @@ -592,7 +592,7 @@ MP_KVS_COMMAND(amipExec) if(!c->hasSwitch('q',"quiet")) { c->warning(__tr2qs_ctx("The selected media player interface failed to execute the requested function","mediaplayer")); - QString tmp = __tr2qs_ctx("Last interface error: ","mediaplayer"); + TQString tmp = __tr2qs_ctx("Last interface error: ","mediaplayer"); tmp += g_pMPInterface->lastError(); c->warning(tmp); } @@ -634,7 +634,7 @@ MP_KVS_COMMAND(jumpTo) if(!c->hasSwitch('q',"quiet")) { c->warning(__tr2qs_ctx("The selected media player interface failed to execute the requested function","mediaplayer")); - QString tmp = __tr2qs_ctx("Last interface error: ","mediaplayer"); + TQString tmp = __tr2qs_ctx("Last interface error: ","mediaplayer"); tmp += g_pMPInterface->lastError(); c->warning(tmp); } @@ -673,7 +673,7 @@ MP_KVS_COMMAND(setVol) if(!c->hasSwitch('q',"quiet")) { c->warning(__tr2qs_ctx("The selected media player interface failed to execute the requested function","mediaplayer")); - QString tmp = __tr2qs_ctx("Last interface error: ","mediaplayer"); + TQString tmp = __tr2qs_ctx("Last interface error: ","mediaplayer"); tmp += g_pMPInterface->lastError(); c->warning(tmp); } @@ -1181,7 +1181,7 @@ MP_KVS_COMMAND(setPlayListPos) if(!c->hasSwitch('q',"quiet")) { c->warning(__tr2qs_ctx("The selected media player interface failed to execute the requested function","mediaplayer")); - QString tmp = __tr2qs_ctx("Last interface error: ","mediaplayer"); + TQString tmp = __tr2qs_ctx("Last interface error: ","mediaplayer"); tmp += g_pMPInterface->lastError(); c->warning(tmp); } @@ -1301,7 +1301,7 @@ MP_KVS_SIMPLE_BOOL_FUNCTION(getShuffle,getShuffle) MP_KVS_FUNCTION(getEqData) { int iValue; - QString szOptions; + TQString szOptions; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("item",KVS_PT_INT,0,iValue) @@ -1310,14 +1310,14 @@ MP_KVS_FUNCTION(getEqData) MP_KVS_FAIL_ON_NO_INTERFACE - bool bQuiet = szOptions.find('q',false) != -1; + bool bQuiet = szOptions.tqfind('q',false) != -1; int ret = g_pMPInterface->getEqData(iValue); if(!ret && !bQuiet) { c->warning(__tr2qs_ctx("The selected media player interface failed to execute the requested function","mediaplayer")); - QString tmp = __tr2qs_ctx("Last interface error: ","mediaplayer"); + TQString tmp = __tr2qs_ctx("Last interface error: ","mediaplayer"); tmp += g_pMPInterface->lastError(); c->warning(tmp); } @@ -1361,7 +1361,7 @@ MP_KVS_COMMAND(setEqData) if(!c->hasSwitch('q',"quiet")) { c->warning(__tr2qs_ctx("The selected media player interface failed to execute the requested function","mediaplayer")); - QString tmp = __tr2qs_ctx("Last interface error: ","mediaplayer"); + TQString tmp = __tr2qs_ctx("Last interface error: ","mediaplayer"); tmp += g_pMPInterface->lastError(); c->warning(tmp); } @@ -1399,9 +1399,9 @@ MP_KVS_FUNCTION(localFile) KVSM_PARAMETERS_END(c) MP_KVS_FAIL_ON_NO_INTERFACE - QString szRet = g_pMPInterface->mrl(); + TQString szRet = g_pMPInterface->mrl(); if(szRet.isEmpty())return true; - if(szRet.startsWith("file://",false)) + if(szRet.tqstartsWith("file://",false)) { szRet.remove(0,7); c->returnValue()->setString(szRet); @@ -1411,14 +1411,14 @@ MP_KVS_FUNCTION(localFile) MP_KVS_FUNCTION(amipEval) { - QString szMrl; + TQString szMrl; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("player",KVS_PT_STRING,0,szMrl) KVSM_PARAMETERS_END(c) MP_KVS_FAIL_ON_NO_INTERFACE - QString szRet = g_pMPInterface->amipEval(szMrl); + TQString szRet = g_pMPInterface->amipEval(szMrl); if(szRet.isEmpty())return true; c->returnValue()->setString(szRet); @@ -1453,7 +1453,7 @@ MP_KVS_FUNCTION(status) KVSM_PARAMETERS_END(c) MP_KVS_FAIL_ON_NO_INTERFACE - KviMediaPlayerInterface::PlayerStatus eStat = g_pMPInterface->status(); + KviMediaPlayerInterface::PlayertqStatus eStat = g_pMPInterface->status(); switch(eStat) { case KviMediaPlayerInterface::Stopped: @@ -1549,7 +1549,7 @@ MP_KVS_COMMAND(setRepeat) if(!c->hasSwitch('q',"quiet")) { c->warning(__tr2qs_ctx("The selected media player interface failed to execute the requested function","mediaplayer")); - QString tmp = __tr2qs_ctx("Last interface error: ","mediaplayer"); + TQString tmp = __tr2qs_ctx("Last interface error: ","mediaplayer"); tmp += g_pMPInterface->lastError(); c->warning(tmp); } @@ -1592,7 +1592,7 @@ MP_KVS_COMMAND(setShuffle) if(!c->hasSwitch('q',"quiet")) { c->warning(__tr2qs_ctx("The selected media player interface failed to execute the requested function","mediaplayer")); - QString tmp = __tr2qs_ctx("Last interface error: ","mediaplayer"); + TQString tmp = __tr2qs_ctx("Last interface error: ","mediaplayer"); tmp += g_pMPInterface->lastError(); c->warning(tmp); } @@ -1716,8 +1716,8 @@ static bool mediaplayer_module_ctrl(KviModule * m,const char * operation,void * { if(kvi_strEqualCI(operation,"getAvailableMediaPlayers")) { - // we expect param to be a pointer to QStringList - QStringList * l = (QStringList *)param; + // we expect param to be a pointer to TQStringList + TQStringList * l = (TQStringList *)param; for(KviMediaPlayerInterfaceDescriptor * d = g_pDescriptorList->first();d;d = g_pDescriptorList->next()) { l->append(d->name()); diff --git a/src/modules/mediaplayer/mp_amarokinterface.cpp b/src/modules/mediaplayer/mp_amarokinterface.cpp index 5c941d4f..6cb20e2c 100644 --- a/src/modules/mediaplayer/mp_amarokinterface.cpp +++ b/src/modules/mediaplayer/mp_amarokinterface.cpp @@ -31,8 +31,8 @@ #include "dcopclient.h" #include "kurl.h" -#include -#include +#include +#include #include "kvi_locale.h" @@ -76,9 +76,9 @@ bool KviAmarokInterface::setVol(kvs_int_t &iVol) } #define MP_DCOP_STRING_CALL(_fncname,_iface,_fnc) \ -QString KviAmarokInterface::_fncname() \ +TQString KviAmarokInterface::_fncname() \ { \ - QString ret; \ + TQString ret; \ if(!stringRetVoidDCOPCall(_iface,_fnc,ret))return false; \ return ret; \ } @@ -122,14 +122,14 @@ int KviAmarokInterface::position() bool KviAmarokInterface::getRepeat() { bool ret; - if(!boolRetVoidDCOPCall("player","repeatTrackStatus()",ret))return false; + if(!boolRetVoidDCOPCall("player","repeatTracktqStatus()",ret))return false; return ret; } bool KviAmarokInterface::getShuffle() { bool ret; - if(!boolRetVoidDCOPCall("player","randomModeStatus()",ret))return false; + if(!boolRetVoidDCOPCall("player","randomModetqStatus()",ret))return false; return ret; } @@ -143,7 +143,7 @@ bool KviAmarokInterface::setShuffle(bool &bVal) return voidRetBoolDCOPCall("player","enableRandomMode(bool)",bVal); } -KviMediaPlayerInterface::PlayerStatus KviAmarokInterface::status() +KviMediaPlayerInterface::PlayertqStatus KviAmarokInterface::status() { int ret; if(!intRetVoidDCOPCall("player","status()",ret))return KviMediaPlayerInterface::Unknown; @@ -165,20 +165,20 @@ KviMediaPlayerInterface::PlayerStatus KviAmarokInterface::status() return KviMediaPlayerInterface::Unknown; } -QString KviAmarokInterface::mrl() +TQString KviAmarokInterface::mrl() { - QString ret; + TQString ret; if(!stringRetVoidDCOPCall("player","encodedURL()",ret))return false; KURL url(ret); return url.prettyURL(); } -bool KviAmarokInterface::playMrl(const QString &mrl) +bool KviAmarokInterface::playMrl(const TQString &mrl) { - QString title; - QByteArray data, replyData; - KviQCString replyType; - QDataStream arg(data,IO_WriteOnly); + TQString title; + TQByteArray data, replyData; + KviTQCString replyType; + TQDataStream arg(data,IO_WriteOnly); arg << KURL(mrl); if(!g_pApp->dcopClient()->call(m_szAppId,"playlist","playMedia(KURL)",data,replyType,replyData)) return false; diff --git a/src/modules/mediaplayer/mp_amarokinterface.h b/src/modules/mediaplayer/mp_amarokinterface.h index ac856219..f0169bb0 100644 --- a/src/modules/mediaplayer/mp_amarokinterface.h +++ b/src/modules/mediaplayer/mp_amarokinterface.h @@ -49,20 +49,20 @@ virtual bool mute(); virtual int getVol(); virtual bool quit(); - virtual QString nowPlaying(); - virtual QString mrl(); - virtual QString title(); - virtual QString artist(); - virtual QString genre(); - virtual QString comment(); - virtual QString year(); - virtual QString album(); + virtual TQString nowPlaying(); + virtual TQString mrl(); + virtual TQString title(); + virtual TQString artist(); + virtual TQString genre(); + virtual TQString comment(); + virtual TQString year(); + virtual TQString album(); virtual int position(); virtual int length(); //virtual int bitRate(); unsupported virtual int sampleRate(); - virtual bool playMrl(const QString &mrl); - virtual KviMediaPlayerInterface::PlayerStatus status(); + virtual bool playMrl(const TQString &mrl); + virtual KviMediaPlayerInterface::PlayertqStatus status(); virtual bool getRepeat(); virtual bool getShuffle(); virtual bool setRepeat(bool &bVal); diff --git a/src/modules/mediaplayer/mp_amipinterface.cpp b/src/modules/mediaplayer/mp_amipinterface.cpp index 3a7094bc..3a363ed5 100644 --- a/src/modules/mediaplayer/mp_amipinterface.cpp +++ b/src/modules/mediaplayer/mp_amipinterface.cpp @@ -3,7 +3,7 @@ #ifdef COMPILE_ON_WINDOWS -#include +#include #include "kvi_locale.h" #include "kvi_module.h" @@ -69,10 +69,10 @@ static bool loadAmipDll() return true; }; -static QTextCodec * mediaplayer_get_codec() +static TQTextCodec * mediaplayer_get_codec() { - QTextCodec * c= QTextCodec::codecForName(KVI_OPTION_STRING(KviOption_stringWinampTextEncoding)); - if(!c)c = QTextCodec::codecForLocale(); + TQTextCodec * c= TQTextCodec::codecForName(KVI_OPTION_STRING(KviOption_stringWinampTextEncoding)); + if(!c)c = TQTextCodec::codecForLocale(); return c; } @@ -147,9 +147,9 @@ int eval_int(const char *var) return res; } -QString eval_str(const char *var) +TQString eval_str(const char *var) { - QString res; + TQString res; if(!amip_dll) return res; char buff[AC_BUFFER_SIZE]; if (AC_ERR_NOERROR == ac_eval(var, buff)) { @@ -189,7 +189,7 @@ int KviAmipInterface::channels() return ret; } -KviMediaPlayerInterface::PlayerStatus KviAmipInterface::status() +KviMediaPlayerInterface::PlayertqStatus KviAmipInterface::status() { int ret = eval_int("var_stat"); switch(ret) @@ -210,11 +210,11 @@ KviMediaPlayerInterface::PlayerStatus KviAmipInterface::status() return KviMediaPlayerInterface::Unknown; } -QString KviAmipInterface::mrl() +TQString KviAmipInterface::mrl() { - QString ret; - QString fn = eval_str("var_fn"); - QTextCodec *c=mediaplayer_get_codec(); + TQString ret; + TQString fn = eval_str("var_fn"); + TQTextCodec *c=mediaplayer_get_codec(); if (c) ret = c->toUnicode(fn); else ret=fn; if(!ret.startsWith("http://",false)) @@ -223,46 +223,46 @@ QString KviAmipInterface::mrl() return ret; } -QString getAmipString(const char * var) { - QString ret; - QString s = eval_str(var); - QTextCodec *c=mediaplayer_get_codec(); +TQString getAmipString(const char * var) { + TQString ret; + TQString s = eval_str(var); + TQTextCodec *c=mediaplayer_get_codec(); if (c) ret = c->toUnicode(s); else ret=s; return ret; } -QString KviAmipInterface::nowPlaying() +TQString KviAmipInterface::nowPlaying() { return getAmipString("var_s"); } -QString KviAmipInterface::artist() +TQString KviAmipInterface::artist() { return getAmipString("var_1"); } -QString KviAmipInterface::title() +TQString KviAmipInterface::title() { return getAmipString("var_2"); } -QString KviAmipInterface::album() +TQString KviAmipInterface::album() { return getAmipString("var_4"); } -QString KviAmipInterface::year() +TQString KviAmipInterface::year() { return getAmipString("var_5"); } -QString KviAmipInterface::comment() +TQString KviAmipInterface::comment() { return getAmipString("var_6"); } -QString KviAmipInterface::genre() +TQString KviAmipInterface::genre() { return getAmipString("var_7"); } @@ -373,24 +373,24 @@ bool KviAmipInterface::setRepeat(bool &bVal) return res; } -bool KviAmipInterface::amipExec(const QString &cmd) +bool KviAmipInterface::amipExec(const TQString &cmd) { if(!amip_dll) return false; - QTextCodec *c=mediaplayer_get_codec(); + TQTextCodec *c=mediaplayer_get_codec(); KviStr szCmd = c ? c->fromUnicode(cmd) : cmd.utf8(); return (ac_exec(szCmd) == AC_ERR_NOERROR); } -QString KviAmipInterface::amipEval(const QString &cmd) +TQString KviAmipInterface::amipEval(const TQString &cmd) { - QString ret; + TQString ret; if(!amip_dll) return ret; - QTextCodec *c=mediaplayer_get_codec(); + TQTextCodec *c=mediaplayer_get_codec(); KviStr szCmd = c ? c->fromUnicode(cmd) : cmd.utf8(); char buff[AC_BUFFER_SIZE]; if((ac_eval(szCmd, buff) == AC_ERR_NOERROR)) { - QString s = buff; - QTextCodec *c=mediaplayer_get_codec(); + TQString s = buff; + TQTextCodec *c=mediaplayer_get_codec(); if (c) ret = c->toUnicode(s); else ret=s; } diff --git a/src/modules/mediaplayer/mp_amipinterface.h b/src/modules/mediaplayer/mp_amipinterface.h index 22bbf9d5..392d854f 100644 --- a/src/modules/mediaplayer/mp_amipinterface.h +++ b/src/modules/mediaplayer/mp_amipinterface.h @@ -20,14 +20,14 @@ virtual bool stop(); virtual bool pause(); virtual bool quit(); - virtual QString nowPlaying(); - virtual QString artist(); - virtual QString title(); - virtual QString genre(); - virtual QString comment(); - virtual QString album(); - virtual QString year(); - virtual QString mrl(); + virtual TQString nowPlaying(); + virtual TQString artist(); + virtual TQString title(); + virtual TQString genre(); + virtual TQString comment(); + virtual TQString album(); + virtual TQString year(); + virtual TQString mrl(); virtual int position(); virtual int length(); virtual bool setVol(kvs_int_t &iVol); @@ -46,9 +46,9 @@ virtual bool getShuffle(); virtual bool setRepeat(bool &bVal); virtual bool setShuffle(bool &bVal); - virtual bool amipExec(const QString &cmd); - virtual QString amipEval(const QString &cmd); - virtual KviMediaPlayerInterface::PlayerStatus status(); + virtual bool amipExec(const TQString &cmd); + virtual TQString amipEval(const TQString &cmd); + virtual KviMediaPlayerInterface::PlayertqStatus status(); }; MP_DECLARE_DESCRIPTOR(KviAmipInterface) diff --git a/src/modules/mediaplayer/mp_dcopinterface.cpp b/src/modules/mediaplayer/mp_dcopinterface.cpp index 7c86e420..1f18b3af 100644 --- a/src/modules/mediaplayer/mp_dcopinterface.cpp +++ b/src/modules/mediaplayer/mp_dcopinterface.cpp @@ -28,13 +28,13 @@ #include "dcopclient.h" -#include -#include +#include +#include #include "kvi_app.h" #include "kvi_thread.h" -KviMediaPlayerDCOPInterface::KviMediaPlayerDCOPInterface(const KviQCString &szAppId) +KviMediaPlayerDCOPInterface::KviMediaPlayerDCOPInterface(const KviTQCString &szAppId) : KviMediaPlayerInterface() { m_szAppId = szAppId; @@ -44,66 +44,66 @@ KviMediaPlayerDCOPInterface::~KviMediaPlayerDCOPInterface() { } -bool KviMediaPlayerDCOPInterface::ensureAppRunning(const QString &szApp) +bool KviMediaPlayerDCOPInterface::ensureAppRunning(const TQString &szApp) { if(findRunningApp(m_szAppId))return true; return startApp(m_szAppId,400); } -bool KviMediaPlayerDCOPInterface::simpleDCOPCall(const KviQCString &szObj,const KviQCString &szFunc) +bool KviMediaPlayerDCOPInterface::simpleDCOPCall(const KviTQCString &szObj,const KviTQCString &szFunc) { if(!ensureAppRunning(m_szAppId))return false; - QByteArray data; + TQByteArray data; return g_pApp->dcopClient()->send(m_szAppId,szObj,szFunc,data); } -bool KviMediaPlayerDCOPInterface::boolDCOPCall(const KviQCString &szObj,const KviQCString &szFunc,bool bVal) +bool KviMediaPlayerDCOPInterface::boolDCOPCall(const KviTQCString &szObj,const KviTQCString &szFunc,bool bVal) { if(!ensureAppRunning(m_szAppId))return false; - QByteArray data; - QDataStream arg(data, IO_WriteOnly); + TQByteArray data; + TQDataStream arg(data, IO_WriteOnly); arg << bVal; return g_pApp->dcopClient()->send(m_szAppId,szObj,szFunc,data); } -bool KviMediaPlayerDCOPInterface::intDCOPCall(const KviQCString &szObj,const KviQCString &szFunc,int iVal) +bool KviMediaPlayerDCOPInterface::intDCOPCall(const KviTQCString &szObj,const KviTQCString &szFunc,int iVal) { if(!ensureAppRunning(m_szAppId))return false; - QByteArray data; - QDataStream arg(data, IO_WriteOnly); + TQByteArray data; + TQDataStream arg(data, IO_WriteOnly); arg << iVal; return g_pApp->dcopClient()->send(m_szAppId,szObj,szFunc,data); } -bool KviMediaPlayerDCOPInterface::floatDCOPCall(const KviQCString &szObj,const KviQCString &szFunc,float fVal) +bool KviMediaPlayerDCOPInterface::floatDCOPCall(const KviTQCString &szObj,const KviTQCString &szFunc,float fVal) { if(!ensureAppRunning(m_szAppId))return false; - QByteArray data; - QDataStream arg(data, IO_WriteOnly); + TQByteArray data; + TQDataStream arg(data, IO_WriteOnly); arg << fVal; return g_pApp->dcopClient()->send(m_szAppId,szObj,szFunc,data); } -bool KviMediaPlayerDCOPInterface::stringDCOPCall(const KviQCString &szObj,const KviQCString &szFunc,QString szVal) +bool KviMediaPlayerDCOPInterface::stringDCOPCall(const KviTQCString &szObj,const KviTQCString &szFunc,TQString szVal) { if(!ensureAppRunning(m_szAppId))return false; - QByteArray data; - QDataStream arg(data, IO_WriteOnly); + TQByteArray data; + TQDataStream arg(data, IO_WriteOnly); arg << szVal; return g_pApp->dcopClient()->send(m_szAppId,szObj,szFunc,data); } -bool KviMediaPlayerDCOPInterface::stringRetDCOPCall(const KviQCString &szObj,const KviQCString &szFunc,QString &ret) +bool KviMediaPlayerDCOPInterface::stringRetDCOPCall(const KviTQCString &szObj,const KviTQCString &szFunc,TQString &ret) { if(!ensureAppRunning(m_szAppId))return false; - QString title; - QByteArray data, replyData; - KviQCString replyType; + TQString title; + TQByteArray data, replyData; + KviTQCString replyType; if(!g_pApp->dcopClient()->call(m_szAppId,szObj,szFunc,data,replyType,replyData)) return false; - QDataStream reply( replyData, IO_ReadOnly ); - if(replyType == "QString") + TQDataStream reply( replyData, IO_ReadOnly ); + if(replyType == TQSTRING_OBJECT_NAME_STRING) { reply >> ret; return true; @@ -111,15 +111,15 @@ bool KviMediaPlayerDCOPInterface::stringRetDCOPCall(const KviQCString &szObj,con return false; } -bool KviMediaPlayerDCOPInterface::intRetDCOPCall(const KviQCString &szObj,const KviQCString &szFunc,int &ret) +bool KviMediaPlayerDCOPInterface::intRetDCOPCall(const KviTQCString &szObj,const KviTQCString &szFunc,int &ret) { if(!ensureAppRunning(m_szAppId))return false; - QString title; - QByteArray data, replyData; - KviQCString replyType; + TQString title; + TQByteArray data, replyData; + KviTQCString replyType; if(!g_pApp->dcopClient()->call(m_szAppId,szObj,szFunc,data,replyType,replyData)) return false; - QDataStream reply( replyData, IO_ReadOnly ); + TQDataStream reply( replyData, IO_ReadOnly ); if(replyType == "int") { reply >> ret; @@ -128,15 +128,15 @@ bool KviMediaPlayerDCOPInterface::intRetDCOPCall(const KviQCString &szObj,const return false; } -bool KviMediaPlayerDCOPInterface::boolRetDCOPCall(const KviQCString &szObj,const KviQCString &szFunc,bool &ret) +bool KviMediaPlayerDCOPInterface::boolRetDCOPCall(const KviTQCString &szObj,const KviTQCString &szFunc,bool &ret) { if(!ensureAppRunning(m_szAppId))return false; - QString title; - QByteArray data, replyData; - KviQCString replyType; + TQString title; + TQByteArray data, replyData; + KviTQCString replyType; if(!g_pApp->dcopClient()->call(m_szAppId,szObj,szFunc,data,replyType,replyData)) return false; - QDataStream reply( replyData, IO_ReadOnly ); + TQDataStream reply( replyData, IO_ReadOnly ); if(replyType == "bool") { reply >> ret; @@ -146,11 +146,11 @@ bool KviMediaPlayerDCOPInterface::boolRetDCOPCall(const KviQCString &szObj,const } -bool KviMediaPlayerDCOPInterface::findRunningApp(const QString &szApp) +bool KviMediaPlayerDCOPInterface::findRunningApp(const TQString &szApp) { - QValueList allApps = g_pApp->dcopClient() ->registeredApplications(); - QValueList::iterator iterator; - KviQCString sz = szApp.local8Bit(); + TQValueList allApps = g_pApp->dcopClient() ->registeredApplications(); + TQValueList::iterator iterator; + KviTQCString sz = szApp.local8Bit(); for(iterator = allApps.begin();iterator != allApps.end();iterator++) { if(*iterator == sz)return true; @@ -158,7 +158,7 @@ bool KviMediaPlayerDCOPInterface::findRunningApp(const QString &szApp) return false; } -int KviMediaPlayerDCOPInterface::detectApp(const QString &szApp,bool bStart,int iScoreWhenFound,int iScoreWhenStarted) +int KviMediaPlayerDCOPInterface::detectApp(const TQString &szApp,bool bStart,int iScoreWhenFound,int iScoreWhenStarted) { // lookup the amarok interface if(!g_pApp->dcopClient())return 0; @@ -176,30 +176,30 @@ int KviMediaPlayerDCOPInterface::detectApp(const QString &szApp,bool bStart,int } -bool KviMediaPlayerDCOPInterface::startApp(const QString &szApp,int iWaitMSecs) +bool KviMediaPlayerDCOPInterface::startApp(const TQString &szApp,int iWaitMSecs) { // we could use KApplication::startServiceByDesktopName here // but we want to be able to wait a defined amount of time - QStringList tmp; - QByteArray data, replyData; - KviQCString replyType; - QDataStream arg(data, IO_WriteOnly); + TQStringList tmp; + TQByteArray data, replyData; + KviTQCString replyType; + TQDataStream arg(data, IO_WriteOnly); arg << szApp << tmp; if(!g_pApp->dcopClient()->call( "klauncher", "klauncher", - "start_service_by_desktop_name(QString,QStringList)", + "start_service_by_desktop_name(TQString,TQStringList)", data, replyType, replyData)) { return false; } else { - QDataStream reply(replyData, IO_ReadOnly); + TQDataStream reply(replyData, IO_ReadOnly); if(replyType != "serviceResult")return false; int result; - KviQCString dcopName; - QString error; + KviTQCString dcopName; + TQString error; reply >> result >> dcopName >> error; if(result != 0)return false; } diff --git a/src/modules/mediaplayer/mp_dcopinterface.h b/src/modules/mediaplayer/mp_dcopinterface.h index 6ce8594d..449f385c 100644 --- a/src/modules/mediaplayer/mp_dcopinterface.h +++ b/src/modules/mediaplayer/mp_dcopinterface.h @@ -33,23 +33,23 @@ class KviMediaPlayerDCOPInterface : public KviMediaPlayerInterface { public: - KviMediaPlayerDCOPInterface(const KviQCString &szAppId); + KviMediaPlayerDCOPInterface(const KviTQCString &szAppId); ~KviMediaPlayerDCOPInterface(); protected: - KviQCString m_szAppId; + KviTQCString m_szAppId; protected: - bool ensureAppRunning(const QString &szApp); - bool findRunningApp(const QString &szApp); - bool startApp(const QString &szApp,int iWaitMSecs = 0); - int detectApp(const QString &szApp,bool bStart,int iScoreWhenFound,int iScoreWhenStarted); - bool simpleDCOPCall(const KviQCString &szObj,const KviQCString &szFunc); - bool intDCOPCall(const KviQCString &szObj,const KviQCString &szFunc,int iVal); - bool boolDCOPCall(const KviQCString &szObj,const KviQCString &szFunc,bool bVal); - bool stringDCOPCall(const KviQCString &szObj,const KviQCString &szFunc,QString szVal); - bool floatDCOPCall(const KviQCString &szObj,const KviQCString &szFunc,float fVal); - bool stringRetDCOPCall(const KviQCString &szObj,const KviQCString &szFunc,QString &ret); - bool intRetDCOPCall(const KviQCString &szObj,const KviQCString &szFunc,int &ret); - bool boolRetDCOPCall(const KviQCString &szObj,const KviQCString &szFunc,bool &ret); + bool ensureAppRunning(const TQString &szApp); + bool findRunningApp(const TQString &szApp); + bool startApp(const TQString &szApp,int iWaitMSecs = 0); + int detectApp(const TQString &szApp,bool bStart,int iScoreWhenFound,int iScoreWhenStarted); + bool simpleDCOPCall(const KviTQCString &szObj,const KviTQCString &szFunc); + bool intDCOPCall(const KviTQCString &szObj,const KviTQCString &szFunc,int iVal); + bool boolDCOPCall(const KviTQCString &szObj,const KviTQCString &szFunc,bool bVal); + bool stringDCOPCall(const KviTQCString &szObj,const KviTQCString &szFunc,TQString szVal); + bool floatDCOPCall(const KviTQCString &szObj,const KviTQCString &szFunc,float fVal); + bool stringRetDCOPCall(const KviTQCString &szObj,const KviTQCString &szFunc,TQString &ret); + bool intRetDCOPCall(const KviTQCString &szObj,const KviTQCString &szFunc,int &ret); + bool boolRetDCOPCall(const KviTQCString &szObj,const KviTQCString &szFunc,bool &ret); }; #endif //COMPILE_KDE_SUPPORT diff --git a/src/modules/mediaplayer/mp_interface.cpp b/src/modules/mediaplayer/mp_interface.cpp index 0894de05..0c0a97a0 100644 --- a/src/modules/mediaplayer/mp_interface.cpp +++ b/src/modules/mediaplayer/mp_interface.cpp @@ -26,12 +26,12 @@ #include "mp_mp3.h" #include "kvi_options.h" #include "kvi_locale.h" -#include +#include -static QTextCodec * mediaplayer_get_codec() +static TQTextCodec * mediaplayer_get_codec() { - QTextCodec * c= QTextCodec::codecForName(KVI_OPTION_STRING(KviOption_stringWinampTextEncoding)); - if(!c)c = QTextCodec::codecForLocale(); + TQTextCodec * c= TQTextCodec::codecForName(KVI_OPTION_STRING(KviOption_stringWinampTextEncoding)); + if(!c)c = TQTextCodec::codecForLocale(); return c; } @@ -78,82 +78,82 @@ bool KviMediaPlayerInterface::minimize() return false; } -QString KviMediaPlayerInterface::getLocalFile() +TQString KviMediaPlayerInterface::getLocalFile() { - QString ret = mrl(); + TQString ret = mrl(); if(ret.isEmpty())return ret; - if(ret.startsWith("file://",false)) + if(ret.tqstartsWith("file://",false)) { ret.remove(0,7); return ret; } - return QString::null; + return TQString(); } -QString KviMediaPlayerInterface::amipEval(const QString &cmd) +TQString KviMediaPlayerInterface::amipEval(const TQString &cmd) { - return QString::null; + return TQString(); } #define SCAN_MP3_FILE \ - QString f = getLocalFile(); \ - if(f.isEmpty())return QString::null; \ + TQString f = getLocalFile(); \ + if(f.isEmpty())return TQString(); \ mp3info mp3; \ - if(!scan_mp3_file(f,&mp3))return QString::null; \ - QTextCodec *pCodec; \ + if(!scan_mp3_file(f,&mp3))return TQString(); \ + TQTextCodec *pCodec; \ pCodec=mediaplayer_get_codec(); #define SCAN_MP3_FILE_RET_INT \ - QString f = getLocalFile(); \ + TQString f = getLocalFile(); \ if(f.isEmpty())return -1; \ mp3info mp3; \ if(!scan_mp3_file(f,&mp3))return -1; -QString KviMediaPlayerInterface::artist() +TQString KviMediaPlayerInterface::artist() { SCAN_MP3_FILE - return pCodec->toUnicode(KviQCString(mp3.id3.artist)); + return pCodec->toUnicode(KviTQCString(mp3.id3.artist)); } -QString KviMediaPlayerInterface::title() +TQString KviMediaPlayerInterface::title() { SCAN_MP3_FILE - return pCodec->toUnicode(KviQCString(mp3.id3.title)); + return pCodec->toUnicode(KviTQCString(mp3.id3.title)); } -QString KviMediaPlayerInterface::genre() +TQString KviMediaPlayerInterface::genre() { SCAN_MP3_FILE - return pCodec->toUnicode(KviQCString(get_typegenre(mp3.id3.genre[0]))); + return pCodec->toUnicode(KviTQCString(get_typegenre(mp3.id3.genre[0]))); } -QString KviMediaPlayerInterface::comment() +TQString KviMediaPlayerInterface::comment() { SCAN_MP3_FILE - return pCodec->toUnicode(KviQCString(mp3.id3.comment)); + return pCodec->toUnicode(KviTQCString(mp3.id3.comment)); } -QString KviMediaPlayerInterface::year() +TQString KviMediaPlayerInterface::year() { SCAN_MP3_FILE - return QString(mp3.id3.year); + return TQString(mp3.id3.year); } -QString KviMediaPlayerInterface::album() +TQString KviMediaPlayerInterface::album() { SCAN_MP3_FILE - return pCodec->toUnicode(KviQCString(mp3.id3.album)); + return pCodec->toUnicode(KviTQCString(mp3.id3.album)); } -bool KviMediaPlayerInterface::playMrl(const QString &mrl) +bool KviMediaPlayerInterface::playMrl(const TQString &mrl) { notImplemented(); return false; } -bool KviMediaPlayerInterface::amipExec(const QString &cmd) +bool KviMediaPlayerInterface::amipExec(const TQString &cmd) { notImplemented(); return false; @@ -183,7 +183,7 @@ bool KviMediaPlayerInterface::jumpTo(int &iPos) return false; } -KviMediaPlayerInterface::PlayerStatus KviMediaPlayerInterface::status() +KviMediaPlayerInterface::PlayertqStatus KviMediaPlayerInterface::status() { notImplemented(); return KviMediaPlayerInterface::Unknown; @@ -262,16 +262,16 @@ bool KviMediaPlayerInterface::setShuffle(bool &bVal) return false; } -QString KviMediaPlayerInterface::mediaType() +TQString KviMediaPlayerInterface::mediaType() { - QString ret = mrl(); - if(ret.endsWith(".mp3",false))ret = "MPEG Layer 3"; - else if(ret.endsWith(".ogg",false))ret = "OGG Vorbis"; - else if(ret.endsWith(".avi",false))ret = "Audio Video Interleave"; - else if(ret.endsWith(".mpeg",false))ret = "MPEG Video"; - else if(ret.endsWith(".mpg",false))ret = "MPEG Video"; - else if(ret.startsWith("http://",false))ret = "HTTP Audio Stream"; - else ret = QString::null; + TQString ret = mrl(); + if(ret.tqendsWith(".mp3",false))ret = "MPEG Layer 3"; + else if(ret.tqendsWith(".ogg",false))ret = "OGG Vorbis"; + else if(ret.tqendsWith(".avi",false))ret = "Audio Video Interleave"; + else if(ret.tqendsWith(".mpeg",false))ret = "MPEG Video"; + else if(ret.tqendsWith(".mpg",false))ret = "MPEG Video"; + else if(ret.tqstartsWith("http://",false))ret = "HTTP Audio Stream"; + else ret = TQString(); return ret; } diff --git a/src/modules/mediaplayer/mp_interface.h b/src/modules/mediaplayer/mp_interface.h index 44667309..593a2490 100644 --- a/src/modules/mediaplayer/mp_interface.h +++ b/src/modules/mediaplayer/mp_interface.h @@ -36,9 +36,9 @@ public: KviMediaPlayerInterface(){}; virtual ~KviMediaPlayerInterface(){}; protected: - QString m_szLastError; + TQString m_szLastError; public: - const QString & lastError(){ return m_szLastError; }; + const TQString & lastError(){ return m_szLastError; }; // // mandatory interface @@ -76,13 +76,13 @@ public: // this string MUST be non-empty when the player is playing something. // If it is empty then either the player is not playing or there are // communication errors. - virtual QString nowPlaying() = 0; + virtual TQString nowPlaying() = 0; // currently played media resource locator // file:// for local files, dvb:// for dvb media , dvd:// for dvd's // http:// for audio streams etc... // empty if player is not playing (or in the tragic case that the player // can't determine the url). - virtual QString mrl() = 0; + virtual TQString mrl() = 0; // optional interface @@ -90,10 +90,10 @@ public: // the mrl may be (or may be not) added to the player's playlist // the function should return false if the player doesn't support // this function or there is a communication error - virtual bool playMrl(const QString &mrl); + virtual bool playMrl(const TQString &mrl); // what is this ? :D - virtual bool amipExec(const QString &cmd); - virtual QString amipEval(const QString &cmd); + virtual bool amipExec(const TQString &cmd); + virtual TQString amipEval(const TQString &cmd); // this is functions to hide,show and minimize the player interface virtual bool hide(); virtual bool show(); @@ -108,8 +108,8 @@ public: // return false only on communication failure virtual bool quit(); // return the current player status - enum PlayerStatus { Unknown, Stopped, Playing, Paused }; - virtual KviMediaPlayerInterface::PlayerStatus status(); + enum PlayertqStatus { Unknown, Stopped, Playing, Paused }; + virtual KviMediaPlayerInterface::PlayertqStatus status(); // current position in the media (msecs) // 0 if the player isn't playing anything and -1 if unknown virtual int position(); @@ -125,25 +125,25 @@ public: // is to be derived from the media file name or from the informations // stored inside the file like the ID3 tag...) // If the player is not playing, the returned string should be empty - virtual QString title(); + virtual TQString title(); // currently played media artist's name // If the player is not playing, the returned string should be empty // If the player can't guess the artist it should return the string "unknown" - virtual QString artist(); + virtual TQString artist(); // currently plaued media genre // If the player is not playing, the returned string should be empty // If the player can't guess the genre it should return the string "unknown" - virtual QString genre(); + virtual TQString genre(); // currently played media comment. // Empty string if the player isn't playing anything or there is no comment - virtual QString comment(); + virtual TQString comment(); // currently played media year // Empty string if the player isn't playing anything or the year is unknown - virtual QString year(); + virtual TQString year(); // currently played media album // Empty string if the player isn't playing anything // If the player can't guess the album/collection then this string should be "unknown" - virtual QString album(); + virtual TQString album(); // bit rate in bits/sec, 0 if unknown virtual int bitRate(); // sample rate in samples/sec (Hz), 0 if unknown @@ -152,7 +152,7 @@ public: virtual int channels(); // frequency // the type of the media (MPEG Layer 3, MPEG Layer 4, OGG Vorbis, AVI Stream etc..) - virtual QString mediaType(); + virtual TQString mediaType(); // get the position in the playlist virtual int getPlayListPos(); // set the position in the playlist @@ -171,10 +171,10 @@ public: virtual bool setRepeat(bool &bVal); // set the shuffle bool value virtual bool setShuffle(bool &bVal); - void setLastError(const QString &szLastError){ m_szLastError = szLastError; }; + void setLastError(const TQString &szLastError){ m_szLastError = szLastError; }; protected: void notImplemented(); - QString getLocalFile(); + TQString getLocalFile(); }; @@ -184,8 +184,8 @@ public: KviMediaPlayerInterfaceDescriptor(){}; virtual ~KviMediaPlayerInterfaceDescriptor(){}; public: - virtual const QString & name() = 0; - virtual const QString & description() = 0; + virtual const TQString & name() = 0; + virtual const TQString & description() = 0; virtual KviMediaPlayerInterface * instance() = 0; }; @@ -198,11 +198,11 @@ public: virtual ~_interfaceclass ## Descriptor(); \ protected: \ _interfaceclass * m_pInstance; \ - QString m_szName; \ - QString m_szDescription; \ + TQString m_szName; \ + TQString m_szDescription; \ public: \ - virtual const QString & name(); \ - virtual const QString & description(); \ + virtual const TQString & name(); \ + virtual const TQString & description(); \ virtual KviMediaPlayerInterface * instance(); \ }; @@ -218,11 +218,11 @@ public: { \ if(m_pInstance)delete m_pInstance; \ } \ - const QString & _interfaceclass ## Descriptor::name() \ + const TQString & _interfaceclass ## Descriptor::name() \ { \ return m_szName; \ } \ - const QString & _interfaceclass ## Descriptor::description() \ + const TQString & _interfaceclass ## Descriptor::description() \ { \ return m_szDescription; \ } \ diff --git a/src/modules/mediaplayer/mp_jukinterface.cpp b/src/modules/mediaplayer/mp_jukinterface.cpp index d5a69a77..5b50a046 100644 --- a/src/modules/mediaplayer/mp_jukinterface.cpp +++ b/src/modules/mediaplayer/mp_jukinterface.cpp @@ -31,8 +31,8 @@ #include "dcopclient.h" #include "kurl.h" -#include -#include +#include +#include #include "kvi_locale.h" @@ -79,29 +79,29 @@ bool KviJukInterface::jumpTo(kvs_int_t &iPos) bool KviJukInterface::getShuffle() { - QString szMode; + TQString szMode; if(!stringRetVoidDCOPCall("player","randomPlayMode()",szMode))return false; return (szMode != "NoRandom"); } bool KviJukInterface::setShuffle(bool &bVal) { - QString szMode; + TQString szMode; if(bVal) { szMode = "Random"; } else { szMode = "NoRandom"; } - if(!voidRetStringDCOPCall("player","setRandomPlayMode(QString)",szMode))return false; + if(!voidRetStringDCOPCall("player","setRandomPlayMode(TQString)",szMode))return false; return true; } #define MP_DCOP_STRING_CALL(_fncname,_iface,_fnc) \ -QString KviJukInterface::_fncname() \ +TQString KviJukInterface::_fncname() \ { \ - QString ret; \ + TQString ret; \ if(!stringRetVoidDCOPCall(_iface,_fnc,ret))return false; \ return ret; \ } @@ -140,7 +140,7 @@ int KviJukInterface::position() return ret * 1000; } -KviMediaPlayerInterface::PlayerStatus KviJukInterface::status() +KviMediaPlayerInterface::PlayertqStatus KviJukInterface::status() { int ret; if(!intRetVoidDCOPCall("player","status()",ret))return KviMediaPlayerInterface::Unknown; @@ -162,21 +162,21 @@ KviMediaPlayerInterface::PlayerStatus KviJukInterface::status() return KviMediaPlayerInterface::Unknown; } -QString KviJukInterface::mrl() +TQString KviJukInterface::mrl() { // ugh :/ - QString ret; + TQString ret; return ret; } -bool KviJukInterface::playMrl(const QString &mrl) +bool KviJukInterface::playMrl(const TQString &mrl) { - QString title; - QByteArray data, replyData; - KviQCString replyType; - QDataStream arg(data,IO_WriteOnly); + TQString title; + TQByteArray data, replyData; + KviTQCString replyType; + TQDataStream arg(data,IO_WriteOnly); arg << mrl; - if(!g_pApp->dcopClient()->call(m_szAppId,"playlist","play(QString)",data,replyType,replyData)) + if(!g_pApp->dcopClient()->call(m_szAppId,"playlist","play(TQString)",data,replyType,replyData)) return false; return true; } diff --git a/src/modules/mediaplayer/mp_jukinterface.h b/src/modules/mediaplayer/mp_jukinterface.h index 478a3c16..c2b7fd16 100644 --- a/src/modules/mediaplayer/mp_jukinterface.h +++ b/src/modules/mediaplayer/mp_jukinterface.h @@ -47,15 +47,15 @@ virtual bool quit(); virtual bool jumpTo(kvs_int_t &iPos); virtual bool setVol(kvs_int_t &iVol); - virtual QString nowPlaying(); - virtual QString mrl(); + virtual TQString nowPlaying(); + virtual TQString mrl(); /* - virtual QString title(); - virtual QString artist(); - virtual QString genre(); - virtual QString comment(); - virtual QString year(); - virtual QString album(); + virtual TQString title(); + virtual TQString artist(); + virtual TQString genre(); + virtual TQString comment(); + virtual TQString year(); + virtual TQString album(); */ virtual int position(); virtual int length(); @@ -66,8 +66,8 @@ virtual bool getShuffle(); virtual bool setShuffle(bool &bVal); - virtual bool playMrl(const QString &mrl); - virtual KviMediaPlayerInterface::PlayerStatus status(); + virtual bool playMrl(const TQString &mrl); + virtual KviMediaPlayerInterface::PlayertqStatus status(); }; MP_DECLARE_DESCRIPTOR(KviJukInterface) diff --git a/src/modules/mediaplayer/mp_mp3.cpp b/src/modules/mediaplayer/mp_mp3.cpp index 6e27fa5f..4942ee50 100644 --- a/src/modules/mediaplayer/mp_mp3.cpp +++ b/src/modules/mediaplayer/mp_mp3.cpp @@ -40,8 +40,8 @@ #include "mp_mp3.h" #include "kvi_options.h" -#include -#include +#include +#include #define MAXGENRE 147 #define GENREROWS 50 @@ -207,7 +207,7 @@ int get_mp3_info(mp3info *mp3) int sample_pos,data_start=0; - QFile fi(mp3->filename); + TQFile fi(mp3->filename); mp3->datasize=fi.size();//filestat.st_size; get_id3(mp3); @@ -449,14 +449,14 @@ char *unpad(char *string) return string; } -bool scan_mp3_file(QString& szFileName,mp3info * i) +bool scan_mp3_file(TQString& szFileName,mp3info * i) { //memset(i,0,sizeof(mp3info)); resetmp3infoStruct(i); i->filename = "text"; - i->file = fopen(QTextCodec::codecForLocale()->fromUnicode(i->filename).data(),"rb"); + i->file = fopen(TQTextCodec::codecForLocale()->fromUnicode(i->filename).data(),"rb"); if(!i->file)return false; get_mp3_info(i); diff --git a/src/modules/mediaplayer/mp_mp3.h b/src/modules/mediaplayer/mp_mp3.h index d42c5ef7..51e544f4 100644 --- a/src/modules/mediaplayer/mp_mp3.h +++ b/src/modules/mediaplayer/mp_mp3.h @@ -51,7 +51,7 @@ #include #include -#include +#include #ifdef COMPILE_ON_WINDOWS #include @@ -92,7 +92,7 @@ typedef struct { } id3tag; typedef struct { - QString filename; + TQString filename; FILE *file; unsigned int datasize; int header_isvalid; @@ -112,7 +112,7 @@ typedef struct { // 10 - Dual channel (2 mono channels) // 11 - Single channel (Mono) -bool scan_mp3_file(QString& szFileName,mp3info * i); +bool scan_mp3_file(TQString& szFileName,mp3info * i); void resetmp3infoStruct(mp3info *i); diff --git a/src/modules/mediaplayer/mp_winampinterface.cpp b/src/modules/mediaplayer/mp_winampinterface.cpp index ae157782..6bc3e24b 100644 --- a/src/modules/mediaplayer/mp_winampinterface.cpp +++ b/src/modules/mediaplayer/mp_winampinterface.cpp @@ -27,7 +27,7 @@ #ifdef COMPILE_ON_WINDOWS -#include +#include #include "kvi_locale.h" #include "kvi_module.h" @@ -62,9 +62,9 @@ // ** IPC_GETLISTLENGTH returns the length of the current playlist, in // ** tracks. -#define IPC_GETEQDATA 127 -// ** int data=SendMessage(hwnd_winamp,WM_WA_IPC,pos,IPC_GETEQDATA); -// ** IPC_GETEQDATA queries the status of the EQ. +#define IPC_GETETQDATA 127 +// ** int data=SendMessage(hwnd_winamp,WM_WA_IPC,pos,IPC_GETETQDATA); +// ** IPC_GETETQDATA queries the status of the EQ. // ** The value returned depends on what 'pos' is set to: // ** Value Meaning // ** ------------------ @@ -73,11 +73,11 @@ // ** 11 Enabled. zero if disabled, nonzero if enabled. // ** 12 Autoload. zero if disabled, nonzero if enabled. -#define IPC_SETEQDATA 128 -// ** SendMessage(hwnd_winamp,WM_WA_IPC,pos,IPC_GETEQDATA); -// ** SendMessage(hwnd_winamp,WM_WA_IPC,value,IPC_SETEQDATA); -// ** IPC_SETEQDATA sets the value of the last position retrieved -// ** by IPC_GETEQDATA. This is pretty lame, and we should provide +#define IPC_SETETQDATA 128 +// ** SendMessage(hwnd_winamp,WM_WA_IPC,pos,IPC_GETETQDATA); +// ** SendMessage(hwnd_winamp,WM_WA_IPC,value,IPC_SETETQDATA); +// ** IPC_SETETQDATA sets the value of the last position retrieved +// ** by IPC_GETETQDATA. This is pretty lame, and we should provide // ** an extended version that lets you do a MAKELPARAM(pos,value). // ** someday... @@ -156,7 +156,7 @@ #define WINAMP_CMD_STOP WINAMP_BUTTON4 #define WINAMP_CMD_NEXT WINAMP_BUTTON5 -#define WINAMP_CMD_QUIT 40001 +#define WINAMP_CMD_TQUIT 40001 #define KVIRC_WM_USER 63112 @@ -167,10 +167,10 @@ #define KVIRC_WM_USER_TRANSFER 15000 -static QTextCodec * mediaplayer_get_codec() +static TQTextCodec * mediaplayer_get_codec() { - QTextCodec * c= QTextCodec::codecForName(KVI_OPTION_STRING(KviOption_stringWinampTextEncoding)); - if(!c)c = QTextCodec::codecForLocale(); + TQTextCodec * c= TQTextCodec::codecForName(KVI_OPTION_STRING(KviOption_stringWinampTextEncoding)); + if(!c)c = TQTextCodec::codecForLocale(); return c; } @@ -237,7 +237,7 @@ MP_WINAMP_WM_COMMAND(stop,WINAMP_CMD_STOP) MP_WINAMP_WM_COMMAND(next,WINAMP_CMD_NEXT) MP_WINAMP_WM_COMMAND(prev,WINAMP_CMD_PREV) MP_WINAMP_WM_COMMAND(pause,WINAMP_CMD_PAUSE) -MP_WINAMP_WM_COMMAND(quit,WINAMP_CMD_QUIT) +MP_WINAMP_WM_COMMAND(quit,WINAMP_CMD_TQUIT) int KviWinampInterface::length() @@ -280,7 +280,7 @@ int KviWinampInterface::channels() return ret; } -KviMediaPlayerInterface::PlayerStatus KviWinampInterface::status() +KviMediaPlayerInterface::PlayertqStatus KviWinampInterface::status() { HWND hWinamp = find_winamp(this); int ret = 1000; @@ -303,9 +303,9 @@ KviMediaPlayerInterface::PlayerStatus KviWinampInterface::status() return KviMediaPlayerInterface::Unknown; } -QString KviWinampInterface::mrl() +TQString KviWinampInterface::mrl() { - QString ret; + TQString ret; HWND hWinamp = find_winamp(this); if(hWinamp) { @@ -328,7 +328,7 @@ QString KviWinampInterface::mrl() szBuffer[i] = SendMessage(hWinamp,WM_USER,KVIRC_WM_USER,KVIRC_WM_USER_TRANSFER + i); } szBuffer[len] = '\0'; - QTextCodec *c=mediaplayer_get_codec(); + TQTextCodec *c=mediaplayer_get_codec(); if (c) ret = c->toUnicode(szBuffer); else ret=szBuffer; if(!ret.startsWith("http://",false)) @@ -338,9 +338,9 @@ QString KviWinampInterface::mrl() return ret; } -QString KviWinampInterface::nowPlaying() +TQString KviWinampInterface::nowPlaying() { - QString ret; + TQString ret; HWND hWinamp = find_winamp(this); if(hWinamp) { @@ -363,7 +363,7 @@ QString KviWinampInterface::nowPlaying() } szBuffer[ len ] = '\0'; - QTextCodec *c=mediaplayer_get_codec(); + TQTextCodec *c=mediaplayer_get_codec(); if (c) ret = c->toUnicode(szBuffer); else ret=szBuffer; } @@ -371,12 +371,12 @@ QString KviWinampInterface::nowPlaying() return ret; } -bool KviWinampInterface::playMrl(const QString &mrl) +bool KviWinampInterface::playMrl(const TQString &mrl) { HWND hWinamp = find_winamp(this); if(hWinamp) { - QTextCodec *c=mediaplayer_get_codec(); + TQTextCodec *c=mediaplayer_get_codec(); KviStr szMrl = c ? c->fromUnicode(mrl) : mrl.utf8(); COPYDATASTRUCT cds; cds.dwData = IPC_PLAYFILE; @@ -501,8 +501,8 @@ bool KviWinampInterface::setEqData(int &iPos, int &iVal) HWND hWinamp = find_winamp(this); if(hWinamp) { - SendMessage(hWinamp,WM_USER,iPos,IPC_GETEQDATA); - SendMessage(hWinamp,WM_USER,iVal,IPC_SETEQDATA); + SendMessage(hWinamp,WM_USER,iPos,IPC_GETETQDATA); + SendMessage(hWinamp,WM_USER,iVal,IPC_SETETQDATA); return true; } return false; @@ -514,7 +514,7 @@ int KviWinampInterface::getEqData(int &ival) int ret = -1; if(hWinamp) { - ret = SendMessage(hWinamp,WM_USER,ival,IPC_GETEQDATA); + ret = SendMessage(hWinamp,WM_USER,ival,IPC_GETETQDATA); return ret; } return ret; diff --git a/src/modules/mediaplayer/mp_winampinterface.h b/src/modules/mediaplayer/mp_winampinterface.h index ed2068db..3f2a62c2 100644 --- a/src/modules/mediaplayer/mp_winampinterface.h +++ b/src/modules/mediaplayer/mp_winampinterface.h @@ -43,11 +43,11 @@ virtual bool stop(); virtual bool pause(); virtual bool quit(); - virtual QString nowPlaying(); - virtual QString mrl(); + virtual TQString nowPlaying(); + virtual TQString mrl(); virtual int position(); virtual int length(); - virtual bool playMrl(const QString &mrl); + virtual bool playMrl(const TQString &mrl); virtual bool setVol(kvs_int_t &iVol); virtual int getVol(); virtual bool jumpTo(kvs_int_t &iPos); @@ -66,7 +66,7 @@ virtual bool getShuffle(); virtual bool setRepeat(bool &bVal); virtual bool setShuffle(bool &bVal); - virtual KviMediaPlayerInterface::PlayerStatus status(); + virtual KviMediaPlayerInterface::PlayertqStatus status(); }; MP_DECLARE_DESCRIPTOR(KviWinampInterface) diff --git a/src/modules/mediaplayer/mp_xmmsinterface.cpp b/src/modules/mediaplayer/mp_xmmsinterface.cpp index 532327af..730b4fe6 100644 --- a/src/modules/mediaplayer/mp_xmmsinterface.cpp +++ b/src/modules/mediaplayer/mp_xmmsinterface.cpp @@ -129,8 +129,8 @@ void * KviXmmsInterface::lookupSymbol(const char * szSymbolName) { if(!loadPlayerLibrary()) { - QString tmp; - KviQString::sprintf(tmp,__tr2qs_ctx("Can't load the player library (%Q)","mediaplayer"),&m_szPlayerLibraryName); + TQString tmp; + KviTQString::sprintf(tmp,__tr2qs_ctx("Can't load the player library (%Q)","mediaplayer"),&m_szPlayerLibraryName); setLastError(tmp); return 0; } @@ -138,8 +138,8 @@ void * KviXmmsInterface::lookupSymbol(const char * szSymbolName) void * symptr = kvi_library_symbol(m_hPlayerLibrary,szSymbolName); if(!symptr) { - QString tmp; - KviQString::sprintf(tmp,__tr2qs_ctx("Can't find symbol %s in %Q","mediaplayer"),szSymbolName,&m_szPlayerLibraryName); + TQString tmp; + KviTQString::sprintf(tmp,__tr2qs_ctx("Can't find symbol %s in %Q","mediaplayer"),szSymbolName,&m_szPlayerLibraryName); setLastError(tmp); } return symptr; @@ -256,7 +256,7 @@ bool KviXmmsInterface::setShuffle(bool &bVal) return true; } -KviMediaPlayerInterface::PlayerStatus KviXmmsInterface::status() +KviMediaPlayerInterface::PlayertqStatus KviXmmsInterface::status() { bool (*sym1)(int) = (bool (*)(int))lookupSymbol("xmms_remote_is_paused"); if(sym1) @@ -273,10 +273,10 @@ KviMediaPlayerInterface::PlayerStatus KviXmmsInterface::status() return KviMediaPlayerInterface::Unknown; } -bool KviXmmsInterface::playMrl(const QString &mrl) +bool KviXmmsInterface::playMrl(const TQString &mrl) { void (*sym)(int,char *) = (void (*)(int,char *))lookupSymbol("xmms_remote_playlist_add_url_string"); - KviQCString tmp = mrl.local8Bit(); + KviTQCString tmp = mrl.local8Bit(); if(!tmp.isEmpty()) { if(sym) @@ -300,24 +300,24 @@ bool KviXmmsInterface::playMrl(const QString &mrl) return true; } -QString KviXmmsInterface::nowPlaying() +TQString KviXmmsInterface::nowPlaying() { int (*sym)(int) = (int (*)(int))lookupSymbol("xmms_remote_get_playlist_pos"); - if(!sym)return QString::null; + if(!sym)return TQString(); int pos = sym(0); char * (*sym2)(int,int) = (char * (*)(int,int))lookupSymbol("xmms_remote_get_playlist_title"); - if(!sym2)return QString::null; - return QString::fromLocal8Bit(sym2(0,pos)); + if(!sym2)return TQString(); + return TQString::fromLocal8Bit(sym2(0,pos)); } -QString KviXmmsInterface::mrl() +TQString KviXmmsInterface::mrl() { int (*sym)(int) = (int (*)(int))lookupSymbol("xmms_remote_get_playlist_pos"); - if(!sym)return QString::null; + if(!sym)return TQString(); int pos = sym(0); char * (*sym2)(int,int) = (char * (*)(int,int))lookupSymbol("xmms_remote_get_playlist_file"); - if(!sym2)return QString::null; - QString ret = QString::fromLocal8Bit(sym2(0,pos)); + if(!sym2)return TQString(); + TQString ret = TQString::fromLocal8Bit(sym2(0,pos)); if(ret.length() > 1) if(ret[0] == '/')ret.prepend("file://"); return ret; diff --git a/src/modules/mediaplayer/mp_xmmsinterface.h b/src/modules/mediaplayer/mp_xmmsinterface.h index 15f81811..e2b2c38f 100644 --- a/src/modules/mediaplayer/mp_xmmsinterface.h +++ b/src/modules/mediaplayer/mp_xmmsinterface.h @@ -39,7 +39,7 @@ virtual ~KviXmmsInterface(); protected: kvi_library_t m_hPlayerLibrary; - QString m_szPlayerLibraryName; + TQString m_szPlayerLibraryName; const char ** m_pLibraryPaths; public: virtual int detect(bool bStart); @@ -52,10 +52,10 @@ virtual bool jumpTo(kvs_int_t &iPos); virtual bool setVol(kvs_int_t &iVol); virtual int getVol(); - virtual KviMediaPlayerInterface::PlayerStatus status(); - virtual QString nowPlaying(); - virtual bool playMrl(const QString &mrl); - virtual QString mrl(); + virtual KviMediaPlayerInterface::PlayertqStatus status(); + virtual TQString nowPlaying(); + virtual bool playMrl(const TQString &mrl); + virtual TQString mrl(); virtual int getPlayListPos(); virtual int position(); virtual int length(); diff --git a/src/modules/mircimport/libkvimircimport.cpp b/src/modules/mircimport/libkvimircimport.cpp index 4f3ac568..394dedf5 100644 --- a/src/modules/mircimport/libkvimircimport.cpp +++ b/src/modules/mircimport/libkvimircimport.cpp @@ -31,9 +31,9 @@ #include "kvi_qstring.h" -#include -#include -#include +#include +#include +#include #include "kvi_tal_vbox.h" KviMircServersIniImport * g_pMircServersIniImport = 0; @@ -50,7 +50,7 @@ KviMircServersIniImport::~KviMircServersIniImport() g_pMircServersIniImport = 0; } -int KviMircServersIniImport::doImport(const QString& filename) +int KviMircServersIniImport::doImport(const TQString& filename) { KviConfig cfg(filename,KviConfig::Read,true); int iCount = 0; @@ -58,30 +58,30 @@ int KviMircServersIniImport::doImport(const QString& filename) { cfg.setGroup("servers"); int i = 0; - QString key; - QString entry; + TQString key; + TQString entry; do { - KviQString::sprintf(key,"n%d",i); + KviTQString::sprintf(key,"n%d",i); entry = cfg.readEntry(key,""); if(!entry.isEmpty()) { - QString description; - QString serv; - QString port; + TQString description; + TQString serv; + TQString port; kvi_u32_t uPort = 0; // SERVER:GROUP: - int idx = KviQString::find(entry,"SERVER:"); + int idx = KviTQString::tqfind(entry,"SERVER:"); if(idx != -1) { description = entry.left(idx); entry.remove(0,idx + 7); - idx = KviQString::find(entry,"GROUP:"); + idx = KviTQString::tqfind(entry,"GROUP:"); if(idx != -1) { port = entry.left(idx); entry.remove(0,idx + 6); } - idx = KviQString::find(port,':'); + idx = KviTQString::tqfind(port,':'); if(idx != -1) { serv = port.left(idx); @@ -108,9 +108,9 @@ int KviMircServersIniImport::doImport(const QString& filename) } } while(!entry.isEmpty()); } else { - QString tmp; - KviQString::sprintf(tmp,__tr2qs("%Q doesn't look like a servers.ini file.\nImport failed."),&filename); - QMessageBox::warning(0,__tr2qs("Warning - KVIrc"),tmp); + TQString tmp; + KviTQString::sprintf(tmp,__tr2qs("%Q doesn't look like a servers.ini file.\nImport failed."),&filename); + TQMessageBox::warning(0,__tr2qs("Warning - KVIrc"),tmp); } return iCount; } @@ -118,7 +118,7 @@ int KviMircServersIniImport::doImport(const QString& filename) void KviMircServersIniImport::start() { //KviStr buffer; - QString buffer; + TQString buffer; if(!KviFileDialog::askForOpenFileName(buffer,__tr("Choose a servers.ini file"),0,"*.ini",false,true))return; doImport(buffer); @@ -143,26 +143,26 @@ void KviMircServersIniImport::die() KviRemoteMircServerImportWizard::KviRemoteMircServerImportWizard(KviRemoteMircServersIniImport * f) : KviTalWizard(0) { - QString capt = __tr2qs("Remote mIRC servers.ini Import Wizard"); + TQString capt = __tr2qs("Remote mIRC servers.ini Import Wizard"); setCaption(capt); m_pRequest = 0; m_pFilter = f; - QLabel * l = new QLabel(this); + TQLabel * l = new TQLabel(this); l->setText(__tr2qs("
Welcome!

This wizard will guide you in the process of " \ "downloading a list of IRC servers. Please click \"Next\" to begin the operation.
")); addPage(l,capt); KviTalVBox * vb = new KviTalVBox(this); - l = new QLabel(vb); + l = new TQLabel(vb); l->setText(__tr2qs("
Here you can modify the URL that the list will be downloaded from. In most cases the default URL is acceptable.
")); vb->setStretchFactor(l,1); - m_pUrlEdit = new QLineEdit(vb); + m_pUrlEdit = new TQLineEdit(vb); m_pUrlEdit->setText(KVI_WWWMIRCCOUK_SERVERSINI); @@ -170,11 +170,11 @@ KviRemoteMircServerImportWizard::KviRemoteMircServerImportWizard(KviRemoteMircSe vb = new KviTalVBox(this); - l = new QLabel(__tr2qs("Please wait while the list is being downloaded"),vb); + l = new TQLabel(__tr2qs("Please wait while the list is being downloaded"),vb); vb->setStretchFactor(l,1); - m_pOutput = new QLabel(vb); - m_pOutput->setFrameStyle(QFrame::WinPanel | QFrame::Sunken); + m_pOutput = new TQLabel(vb); + m_pOutput->setFrameStyle(TQFrame::WinPanel | TQFrame::Sunken); addPage(vb,__tr2qs("List Download")); @@ -182,7 +182,7 @@ KviRemoteMircServerImportWizard::KviRemoteMircServerImportWizard(KviRemoteMircSe setNextEnabled(vb,false); setFinishEnabled(vb,true); - connect(this,SIGNAL(selected(const QString &)),this,SLOT(pageSelected(const QString &))); + connect(this,TQT_SIGNAL(selected(const TQString &)),this,TQT_SLOT(pageSelected(const TQString &))); } KviRemoteMircServerImportWizard::~KviRemoteMircServerImportWizard() @@ -190,7 +190,7 @@ KviRemoteMircServerImportWizard::~KviRemoteMircServerImportWizard() if(m_pRequest)delete m_pRequest; } -void KviRemoteMircServerImportWizard::pageSelected(const QString &title) +void KviRemoteMircServerImportWizard::pageSelected(const TQString &title) { if(title == __tr2qs("List Download")) { @@ -198,7 +198,7 @@ void KviRemoteMircServerImportWizard::pageSelected(const QString &title) } } -void KviRemoteMircServerImportWizard::closeEvent(QCloseEvent *) +void KviRemoteMircServerImportWizard::closeEvent(TQCloseEvent *) { m_pFilter->die(); } @@ -211,15 +211,15 @@ void KviRemoteMircServerImportWizard::done(int r) void KviRemoteMircServerImportWizard::start() { - QString url = m_pUrlEdit->text(); + TQString url = m_pUrlEdit->text(); if(url.isEmpty())url = KVI_WWWMIRCCOUK_SERVERSINI; finishButton()->setEnabled(false); if(m_pRequest)delete m_pRequest; m_pRequest = new KviHttpRequest(); - connect(m_pRequest,SIGNAL(terminated(bool)),this,SLOT(getListTerminated(bool))); - connect(m_pRequest,SIGNAL(status(const QString &)),this,SLOT(getListMessage(const QString &))); + connect(m_pRequest,TQT_SIGNAL(terminated(bool)),this,TQT_SLOT(getListTerminated(bool))); + connect(m_pRequest,TQT_SIGNAL(status(const TQString &)),this,TQT_SLOT(getListMessage(const TQString &))); g_pApp->getTmpFileName(m_szTmpFileName,"servers.ini"); if(!m_pRequest->get(KviUrl(url),KviHttpRequest::StoreToFile,m_szTmpFileName)) @@ -231,7 +231,7 @@ void KviRemoteMircServerImportWizard::start() } } -void KviRemoteMircServerImportWizard::getListMessage(const QString &message) +void KviRemoteMircServerImportWizard::getListMessage(const TQString &message) { if(!message.isEmpty())m_pOutput->setText(message); } @@ -243,21 +243,21 @@ void KviRemoteMircServerImportWizard::getListTerminated(bool bSuccess) if(bSuccess) { m_pOutput->setText(__tr2qs("File downloaded: processing ...")); - m_pOutput->repaint(); + m_pOutput->tqrepaint(); #ifndef COMPILE_ON_WINDOWS g_pApp->syncX(); #endif //!COMPILE_ON_WINDOWS int iCount = m_pFilter->doImport(m_szTmpFileName); - QString tmp; + TQString tmp; if(iCount > 0) - tmp = __tr2qs("%1 servers imported succesfully").arg(iCount); + tmp = __tr2qs("%1 servers imported succesfully").tqarg(iCount); else tmp = __tr2qs("No servers imported"); m_pOutput->setText(tmp); - QDir d; + TQDir d; d.remove(m_szTmpFileName); } else m_pOutput->setText(m_pRequest->lastError()); @@ -309,11 +309,11 @@ static KviModuleExtension * mircimport_remote_filter_alloc(KviModuleExtensionAll static bool mircimport_module_init(KviModule * m) { - QString szPath; - QPixmap * pix = 0; + TQString szPath; + TQPixmap * pix = 0; if(g_pApp->findImage(szPath,"kvi_mircimport.png")) { - pix = new QPixmap(szPath); + pix = new TQPixmap(szPath); if(pix->isNull()) { delete pix; diff --git a/src/modules/mircimport/libkvimircimport.h b/src/modules/mircimport/libkvimircimport.h index 360e8346..1883da10 100644 --- a/src/modules/mircimport/libkvimircimport.h +++ b/src/modules/mircimport/libkvimircimport.h @@ -27,17 +27,18 @@ #include "kvi_http.h" #include -#include -#include +#include +#include class KviMircServersIniImport : public KviMexServerImport { Q_OBJECT + TQ_OBJECT public: KviMircServersIniImport(KviModuleExtensionDescriptor * d); ~KviMircServersIniImport(); public: - int doImport(const QString& filename); + int doImport(const TQString& filename); virtual void start(); virtual void die(); }; @@ -47,6 +48,7 @@ class KviRemoteMircServerImportWizard; class KviRemoteMircServersIniImport : public KviMircServersIniImport { Q_OBJECT + TQ_OBJECT public: KviRemoteMircServersIniImport(KviModuleExtensionDescriptor * d); ~KviRemoteMircServersIniImport(); @@ -60,23 +62,24 @@ public: class KviRemoteMircServerImportWizard : public KviTalWizard { Q_OBJECT + TQ_OBJECT public: KviRemoteMircServerImportWizard(KviRemoteMircServersIniImport * f); ~KviRemoteMircServerImportWizard(); protected: - QLineEdit * m_pUrlEdit; - QLabel * m_pOutput; + TQLineEdit * m_pUrlEdit; + TQLabel * m_pOutput; KviRemoteMircServersIniImport * m_pFilter; KviHttpRequest * m_pRequest; - QString m_szTmpFileName; + TQString m_szTmpFileName; protected: - virtual void closeEvent(QCloseEvent *e); + virtual void closeEvent(TQCloseEvent *e); virtual void done(int r); void start(); protected slots: - void getListMessage(const QString &message); + void getListMessage(const TQString &message); void getListTerminated(bool bSuccess); - void pageSelected(const QString &title); + void pageSelected(const TQString &title); }; #endif //_LIBKVIMIRCIMPORT_H_ diff --git a/src/modules/my/idle.cpp b/src/modules/my/idle.cpp index 56720c77..daa5c209 100644 --- a/src/modules/my/idle.cpp +++ b/src/modules/my/idle.cpp @@ -20,9 +20,9 @@ #include"idle.h" -#include -#include -#include +#include +#include +#include static IdlePlatform *platform = 0; static int platform_ref = 0; @@ -45,7 +45,7 @@ Idle::Idle() if(platform) ++platform_ref; - connect(&d->checkTimer, SIGNAL(timeout()), SLOT(doCheck())); + connect(&d->checkTimer, TQT_SIGNAL(timeout()), TQT_SLOT(doCheck())); } Idle::~Idle() @@ -72,12 +72,12 @@ bool Idle::usingPlatform() const void Idle::start() { - d->startTime = QDateTime::currentDateTime(); + d->startTime = TQDateTime::tqcurrentDateTime(); if(!platform) { // generic idle - d->lastMousePos = QCursor::pos(); - d->idleSince = QDateTime::currentDateTime(); + d->lastMousePos = TQCursor::pos(); + d->idleSince = TQDateTime::tqcurrentDateTime(); } // poll every second (use a lower value if you need more accuracy) @@ -95,8 +95,8 @@ int Idle::secondsIdle() if(platform) i = platform->secondsIdle(); else { - QPoint curMousePos = QCursor::pos(); - QDateTime curDateTime = QDateTime::currentDateTime(); + TQPoint curMousePos = TQCursor::pos(); + TQDateTime curDateTime = TQDateTime::tqcurrentDateTime(); if(d->lastMousePos != curMousePos) { d->lastMousePos = curMousePos; d->idleSince = curDateTime; @@ -105,7 +105,7 @@ int Idle::secondsIdle() } // set 'beginIdle' to the beginning of the idle time (by backtracking 'i' seconds from now) - QDateTime beginIdle = QDateTime::currentDateTime().addSecs(-i); + TQDateTime beginIdle = TQDateTime::tqcurrentDateTime().addSecs(-i); // set 't' to hold the number of seconds between 'beginIdle' and 'startTime' int t = beginIdle.secsTo(d->startTime); @@ -121,7 +121,7 @@ int Idle::secondsIdle() } // how long have we been idle? - int idleTime = d->startTime.secsTo(QDateTime::currentDateTime()); + int idleTime = d->startTime.secsTo(TQDateTime::tqcurrentDateTime()); return idleTime; } diff --git a/src/modules/my/idle.h b/src/modules/my/idle.h index 647b2691..449d36fa 100644 --- a/src/modules/my/idle.h +++ b/src/modules/my/idle.h @@ -22,16 +22,17 @@ #define IDLE_H #include "kvi_settings.h" -#include -#include -#include -#include +#include +#include +#include +#include class IdlePlatform; -class Idle : public QObject +class Idle : public TQObject { Q_OBJECT + TQ_OBJECT public: Idle(); ~Idle(); @@ -72,13 +73,13 @@ class Idle::Private public: Private() {} - QPoint lastMousePos; - QDateTime idleSince; + TQPoint lastMousePos; + TQDateTime idleSince; bool active; int idleTime; - QDateTime startTime; - QTimer checkTimer; + TQDateTime startTime; + TQTimer checkTimer; }; #endif diff --git a/src/modules/my/idle_mac.cpp b/src/modules/my/idle_mac.cpp index 92de564d..4e116fa9 100644 --- a/src/modules/my/idle_mac.cpp +++ b/src/modules/my/idle_mac.cpp @@ -24,8 +24,8 @@ #include // Why does Apple have to make this so complicated? -static OSStatus LoadFrameworkBundle(CFStringRef framework, CFBundleRef *bundlePtr) { - OSStatus err; +static OStqStatus LoadFrameworkBundle(CFStringRef framework, CFBundleRef *bundlePtr) { + OStqStatus err; FSRef frameworksFolderRef; CFURLRef baseURL; CFURLRef bundleURL; @@ -117,7 +117,7 @@ IdlePlatform::~IdlePlatform() { // Typedef for the function we're getting back from CFBundleGetFunctionPointerForName. -typedef OSStatus (*InstallEventLoopIdleTimerPtr)(EventLoopRef inEventLoop, +typedef OStqStatus (*InstallEventLoopIdleTimerPtr)(EventLoopRef inEventLoop, EventTimerInterval inFireDelay, EventTimerInterval inInterval, EventLoopIdleTimerUPP inTimerProc, diff --git a/src/modules/my/idle_x11.cpp b/src/modules/my/idle_x11.cpp index fa2f1f15..af29801e 100644 --- a/src/modules/my/idle_x11.cpp +++ b/src/modules/my/idle_x11.cpp @@ -31,14 +31,14 @@ int IdlePlatform::secondsIdle() { return 0; } #else -#include +#include #include #include #include #ifdef COMPILE_USE_QT4 - #include + #include #endif static XErrorHandler old_handler = 0; @@ -83,7 +83,7 @@ bool IdlePlatform::init() old_handler = XSetErrorHandler(xerrhandler); int event_base, error_base; - if(XScreenSaverQueryExtension(QApplication::desktop()->screen()->x11Display(), &event_base, &error_base)) { + if(XScreenSaverQueryExtension(TQT_TQPAINTDEVICE(TQApplication::desktop()->screen())->x11Display(), &event_base, &error_base)) { d->ss_info = XScreenSaverAllocInfo(); return true; } @@ -91,7 +91,7 @@ bool IdlePlatform::init() } #ifdef COMPILE_USE_QT4 - #include + #include #endif int IdlePlatform::secondsIdle() @@ -99,9 +99,9 @@ int IdlePlatform::secondsIdle() if(!d->ss_info) return 0; #ifdef COMPILE_USE_QT4 - if(!XScreenSaverQueryInfo(QApplication::desktop()->screen()->x11Display(), QX11Info::appRootWindow(), d->ss_info)) + if(!XScreenSaverQueryInfo(TQT_TQPAINTDEVICE(TQApplication::desktop()->screen())->x11Display(), QX11Info::appRootWindow(), d->ss_info)) #else - if(!XScreenSaverQueryInfo(QApplication::desktop()->screen()->x11Display(), qt_xrootwin(), d->ss_info)) + if(!XScreenSaverQueryInfo(TQT_TQPAINTDEVICE(TQApplication::desktop()->screen())->x11Display(), qt_xrootwin(), d->ss_info)) #endif return 0; return d->ss_info->idle / 1000; diff --git a/src/modules/my/libkvimy.cpp b/src/modules/my/libkvimy.cpp index d98d44af..07a93760 100644 --- a/src/modules/my/libkvimy.cpp +++ b/src/modules/my/libkvimy.cpp @@ -247,7 +247,7 @@ static bool my_kvs_fnc_host(KviKvsModuleFunctionCall * c) @description: Returns the ip address of the current irc context as known by the IRC server.[br] The ip address is resolved as soon as the hostname is received from the server. - If the hostname is masked or there is an error in the DNS lookup then + If the hostname is tqmasked or there is an error in the DNS lookup then you may get the real local host ip address as determined at connection startup.[br] If the irc context is not connected then an empty string is returned.[br] If is specified this function returns acts as it was called diff --git a/src/modules/notifier/libkvinotifier.cpp b/src/modules/notifier/libkvinotifier.cpp index edc27f0f..deaf6a34 100644 --- a/src/modules/notifier/libkvinotifier.cpp +++ b/src/modules/notifier/libkvinotifier.cpp @@ -36,7 +36,7 @@ #include "kvi_time.h" #include "kvi_options.h" -#include +#include KviNotifierWindow * g_pNotifierWindow = 0; kvi_time_t g_tNotifierDisabledUntil = 0; @@ -114,7 +114,7 @@ kvi_time_t g_tNotifierDisabledUntil = 0; static bool notifier_kvs_cmd_message(KviKvsModuleCommandCall * c) { - QString szMessage; + TQString szMessage; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("message",KVS_PT_STRING,0,szMessage) KVSM_PARAMETERS_END(c) @@ -122,8 +122,8 @@ static bool notifier_kvs_cmd_message(KviKvsModuleCommandCall * c) if(!g_pNotifierWindow) g_pNotifierWindow = new KviNotifierWindow(); - QString szIco=""; - QString szWnd=""; + TQString szIco=""; + TQString szWnd=""; KviWindow * pWnd = c->window(); @@ -287,8 +287,8 @@ static bool notifier_module_can_unload(KviModule *m) typedef struct _NotifierMessageSupaDupaParameterStruct { KviWindow * pWindow; - QString szIcon; - QString szMessage; + TQString szIcon; + TQString szMessage; unsigned int uMessageLifetime; // 0 means no hide } NotifierMessageSupaDupaParameterStruct; diff --git a/src/modules/notifier/notifiermessage.cpp b/src/modules/notifier/notifiermessage.cpp index 1e91b5de..d57d2019 100644 --- a/src/modules/notifier/notifiermessage.cpp +++ b/src/modules/notifier/notifiermessage.cpp @@ -45,24 +45,24 @@ #endif */ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #ifdef COMPILE_USE_QT4 - #define QPopupMenu Q3PopupMenu - #include + #define TQPopupMenu Q3PopupMenu + #include #else - #include + #include #endif extern kvi_time_t g_tNotifierDisabledUntil; -KviNotifierMessage::KviNotifierMessage(KviNotifierWindow * pNotifierWindow, QPixmap * pImage, const QString &szText) +KviNotifierMessage::KviNotifierMessage(KviNotifierWindow * pNotifierWindow, TQPixmap * pImage, const TQString &szText) { - m_pText = new QSimpleRichText(KviMircCntrl::stripControlBytes(szText),pNotifierWindow->defaultFont()); + m_pText = new TQSimpleRichText(KviMircCntrl::stripControlBytes(szText),pNotifierWindow->defaultFont()); m_pText->setWidth(pNotifierWindow->textWidth()); m_pImage = pImage; m_bHistoric = false; @@ -74,20 +74,20 @@ KviNotifierMessage::~KviNotifierMessage() if(m_pImage)delete m_pImage; } -static void increase_transparency(QImage &buffer,QImage &srcimg,int iDivisor) +static void increase_transparency(TQImage &buffer,TQImage &srcimg,int iDivisor) { buffer.create(srcimg.width(),srcimg.height(),32); buffer.setAlphaBuffer(true); for(int y = 0;y < buffer.height();y++) { - QRgb * dst = (QRgb *)buffer.scanLine(y); - QRgb * end = dst + buffer.width(); - QRgb * src = (QRgb *)srcimg.scanLine(y); + TQRgb * dst = (TQRgb *)buffer.scanLine(y); + TQRgb * end = dst + buffer.width(); + TQRgb * src = (TQRgb *)srcimg.scanLine(y); while(dst < end) { - *dst = qRgba(qRed(*src),qGreen(*src),qBlue(*src),qAlpha(*src) / iDivisor); + *dst = tqRgba(tqRed(*src),tqGreen(*src),tqBlue(*src),tqAlpha(*src) / iDivisor); dst++; src++; } @@ -99,8 +99,8 @@ void KviNotifierMessage::setHistoric() m_bHistoric = true; if(!m_pImage)return; if(!m_pImage->hasAlphaChannel())return; - QImage tmp; - QImage out = m_pImage->convertToImage(); + TQImage tmp; + TQImage out = m_pImage->convertToImage(); increase_transparency(tmp,out,2); m_pImage->convertFromImage(tmp); } diff --git a/src/modules/notifier/notifiermessage.h b/src/modules/notifier/notifiermessage.h index da4a6df2..19af4966 100644 --- a/src/modules/notifier/notifiermessage.h +++ b/src/modules/notifier/notifiermessage.h @@ -28,38 +28,38 @@ #include "kvi_settings.h" -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include "kvi_qstring.h" #include "kvi_pointerlist.h" #include "kvi_time.h" #ifdef COMPILE_USE_QT4 - #define QSimpleRichText Q3SimpleRichText - #define QPopupMenu Q3PopupMenu - #include - #include + #define TQSimpleRichText Q3SimpleRichText + #define TQPopupMenu Q3PopupMenu + #include + #include #else - #include + #include #endif class KviWindow; class KviNotifierWindow; -class QPopupMenu; +class TQPopupMenu; class KviNotifierMessage { friend class KviNotifierWindow; public: - KviNotifierMessage(KviNotifierWindow * pNotifierWindow, QPixmap * pImage, const QString &szText); + KviNotifierMessage(KviNotifierWindow * pNotifierWindow, TQPixmap * pImage, const TQString &szText); ~KviNotifierMessage(); // ================================ @@ -71,8 +71,8 @@ public: protected: KviWindow * m_pWindow; - QPixmap * m_pImage; - QSimpleRichText * m_pText; + TQPixmap * m_pImage; + TQSimpleRichText * m_pText; bool m_bHistoric; // ================================ @@ -84,8 +84,8 @@ public: bool historic(){ return m_bHistoric; }; void setHistoric(); void setWindow(KviWindow * pWnd){ m_pWindow = pWnd; }; - QPixmap * image(){ return m_pImage; }; - QSimpleRichText * text(){ return m_pText; }; + TQPixmap * image(){ return m_pImage; }; + TQSimpleRichText * text(){ return m_pText; }; protected: diff --git a/src/modules/notifier/notifiersettings.h b/src/modules/notifier/notifiersettings.h index b694dc59..dea98523 100644 --- a/src/modules/notifier/notifiersettings.h +++ b/src/modules/notifier/notifiersettings.h @@ -58,7 +58,7 @@ #define WDG_SX 7 #define WDG_DX 8 -#define m_mac_bkgColor QColor(236,233,216) // Light-brown color of notifier background widget +#define m_mac_bkgColor TQColor(236,233,216) // Light-brown color of notifier background widget enum State { Hidden, Showing, Visible, Hiding , FocusingOff, FocusingOn }; enum TabState { Normal, Highlighted, Changed }; diff --git a/src/modules/notifier/notifierwindow.cpp b/src/modules/notifier/notifierwindow.cpp index d275be23..91583241 100644 --- a/src/modules/notifier/notifierwindow.cpp +++ b/src/modules/notifier/notifierwindow.cpp @@ -24,17 +24,17 @@ #include "kvi_settings.h" #ifdef COMPILE_USE_QT4 - #define QPopupMenu Q3PopupMenu - #define QSimpleRichText Q3SimpleRichText + #define TQPopupMenu Q3PopupMenu + #define TQSimpleRichText Q3SimpleRichText - #include - #include + #include + #include #else - #include - #include + #include + #include #endif - #include + #include #include "notifiermessage.h" #include "notifierwindow.h" @@ -50,14 +50,14 @@ #include "kvi_options.h" #include "kvi_userinput.h" -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include "notifierwindowbody.h" #include "notifierwindowborder.h" @@ -67,20 +67,20 @@ extern KviNotifierWindow * g_pNotifierWindow; KviNotifierWindow::KviNotifierWindow() -: QWidget(0,"kvirc_notifier_window", +: TQWidget(0,"kvirc_notifier_window", #ifdef COMPILE_ON_WINDOWS - Qt::WStyle_Customize | - Qt::WStyle_NoBorder | - Qt::WStyle_Tool | - Qt::WStyle_StaysOnTop) + TQt::WStyle_Customize | + TQt::WStyle_NoBorder | + TQt::WStyle_Tool | + TQt::WStyle_StaysOnTop) #else - Qt::WStyle_Customize | - Qt::WStyle_NoBorder | + TQt::WStyle_Customize | + TQt::WStyle_NoBorder | #ifndef Q_OS_MACX - Qt::WStyle_Tool | - Qt::WX11BypassWM | + TQt::WStyle_Tool | + TQt::WX11BypassWM | #endif - Qt::WStyle_StaysOnTop) + TQt::WStyle_StaysOnTop) #endif { @@ -106,19 +106,19 @@ KviNotifierWindow::KviNotifierWindow() cfg.setGroup("NotifierSkin"); - QString szFamily = cfg.readEntry("TextFontFamily","Arial"); - m_pDefaultFont = new QFont(szFamily,cfg.readIntEntry("TextFontSize",9)); + TQString szFamily = cfg.readEntry("TextFontFamily","Arial"); + m_pDefaultFont = new TQFont(szFamily,cfg.readIntEntry("TextFontSize",9)); szFamily = cfg.readEntry("TitleFontFamily","Arial"); - m_pTitleFont = new QFont(szFamily,cfg.readIntEntry("TitleFontSize",9)); + m_pTitleFont = new TQFont(szFamily,cfg.readIntEntry("TitleFontSize",9)); - m_clrCurText = cfg.readColorEntry("CurTextColor",QColor(40,0,0)); - m_clrHistoricText = cfg.readColorEntry("HistoricTextColor",QColor(125,125,125)); - m_clrTitle = QColor(255,255,255); //cfg.readColorEntry("TitleColor",QColor(0,0,0)); + m_clrCurText = cfg.readColorEntry("CurTextColor",TQColor(40,0,0)); + m_clrHistoricText = cfg.readColorEntry("HistoricTextColor",TQColor(125,125,125)); + m_clrTitle = TQColor(255,255,255); //cfg.readColorEntry("TitleColor",TQColor(0,0,0)); for(int i=0;isetGeometry(0,0,0,0); m_pLineEdit->hide(); m_pLineEdit->installEventFilter(this); - connect(m_pLineEdit,SIGNAL(returnPressed()),this,SLOT(returnPressed())); + connect(m_pLineEdit,TQT_SIGNAL(returnPressed()),this,TQT_SLOT(returnPressed())); szFamily = cfg.readEntry("InputFontFamily","Arial"); - m_pLineEdit->setFont(QFont(szFamily,cfg.readIntEntry("InputFontSize",9))); + m_pLineEdit->setFont(TQFont(szFamily,cfg.readIntEntry("InputFontSize",9))); m_bBlinkOn = false; @@ -168,8 +168,8 @@ KviNotifierWindow::KviNotifierWindow() // Positioning the notifier bottom-right int iWidth = m_pixBackground.width(); int iHeight = m_pixBackground.height(); - QDesktopWidget * w = QApplication::desktop(); - QRect r = w->availableGeometry(w->primaryScreen()); //w->screenGeometry(w->primaryScreen()); + TQDesktopWidget * w = TQApplication::desktop(); + TQRect r = w->availableGeometry(w->primaryScreen()); //w->screenGeometry(w->primaryScreen()); /*debug("r.x(),r.y(): %d,%d",r.x(),r.y()); debug("r.width(),r.height(): %d,%d",r.width(),r.height());*/ @@ -183,10 +183,10 @@ KviNotifierWindow::KviNotifierWindow() m_pProgressBar = new KviNotifierWindowProgressBar(m_pWndBorder->progressRect()); // FIXME: Ugly global-font initialization.. - QFontMetrics titleFontMetrics(*m_pTitleFont); + TQFontMetrics titleFontMetrics(*m_pTitleFont); m_pWndBorder->centerTitle(titleFontMetrics.height()); - connect(g_pApp,SIGNAL(reloadImages()),this,SLOT(reloadImages())); + connect(g_pApp,TQT_SIGNAL(reloadImages()),this,TQT_SLOT(reloadImages())); } KviNotifierWindow::~KviNotifierWindow() @@ -216,15 +216,15 @@ void KviNotifierWindow::reloadImages() } -void KviNotifierWindow::addMessage(KviWindow * pWnd,const QString &szImageId,const QString &szText,unsigned int uMessageTime) +void KviNotifierWindow::addMessage(KviWindow * pWnd,const TQString &szImageId,const TQString &szText,unsigned int uMessageTime) { - QPixmap * pIcon; - QString szMessage=szText; - szMessage.replace( QRegExp("\r([^\r])*\r([^\r])+\r"), "\\2" ); + TQPixmap * pIcon; + TQString szMessage=szText; + szMessage.tqreplace( TQRegExp("\r([^\r])*\r([^\r])+\r"), "\\2" ); if(szImageId.isEmpty())pIcon = 0; else pIcon = g_pIconManager->getImage(szImageId); - KviNotifierMessage * m = new KviNotifierMessage(this,pIcon ? new QPixmap(*pIcon) : 0,szMessage); + KviNotifierMessage * m = new KviNotifierMessage(this,pIcon ? new TQPixmap(*pIcon) : 0,szMessage); m_pWndTabs->addMessage(pWnd, m); // Adds a tab about the sender pWnd @@ -289,7 +289,7 @@ void KviNotifierWindow::computeRect() { int iWidth = m_pixBackground.width(); int iHeight = m_pixBackground.height(); - m_pWndBorder->setGeometry(QPoint(x(),y()), QSize(iWidth,iHeight)); + m_pWndBorder->setGeometry(TQPoint(x(),y()), TQSize(iWidth,iHeight)); update(); } @@ -326,21 +326,21 @@ void KviNotifierWindow::doShow(bool bDoAnimate) m_bWriteDown = false; m_bBlinkOn = false; #if (!defined COMPILE_USE_QT4) || !(defined(COMPILE_USE_QT4) && (defined(COMPILE_ON_WINDOWS) || defined(Q_OS_MACX))) - m_imgDesktop = QPixmap::grabWindow( - QApplication::desktop()->winId(), + m_imgDesktop = TQPixmap(TQPixmap::grabWindow( + TQApplication::desktop()->winId(), m_wndRect.x(), m_wndRect.y(), m_wndRect.width(), - m_wndRect.height()).convertToImage(); + m_wndRect.height())).convertToImage(); #endif - // QPixmap tmp = QPixmap::grabWindow( QApplication::desktop()->winId(),m_wndRect.x(), m_wndRect.y(), m_wndRect.width(), m_wndRect.height()); + // TQPixmap tmp = TQPixmap::grabWindow( TQApplication::desktop()->winId(),m_wndRect.x(), m_wndRect.y(), m_wndRect.width(), m_wndRect.height()); // tmp.save("/root/pix.png","PNG"); m_pixForeground.resize(m_pixBackground.size()); m_imgBuffer.create(m_pixBackground.width(),m_pixBackground.height(),32); if(bDoAnimate) { - m_pShowHideTimer = new QTimer(); - connect(m_pShowHideTimer,SIGNAL(timeout()),this,SLOT(heartbeat())); + m_pShowHideTimer = new TQTimer(); + connect(m_pShowHideTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(heartbeat())); m_dOpacity = OPACITY_STEP; m_eState = Showing; m_bCrashShowWorkAround=true; @@ -526,8 +526,8 @@ void KviNotifierWindow::doHide(bool bDoAnimate) hideNow(); } else { //debug ("starting hide animation notifier x() %d and notifier y() % - WBorderx() %d and WBordery() %d and bDoanimate %d",x(),y(),m_pWndBorder->x(),m_pWndBorder->y(),bDoAnimate); - m_pShowHideTimer = new QTimer(); - connect(m_pShowHideTimer,SIGNAL(timeout()),this,SLOT(heartbeat())); + m_pShowHideTimer = new TQTimer(); + connect(m_pShowHideTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(heartbeat())); m_dOpacity = 1.0 - OPACITY_STEP; m_eState = Hiding; #if defined(COMPILE_USE_QT4) && (defined(COMPILE_ON_WINDOWS) || defined(Q_OS_MACX)) @@ -545,14 +545,14 @@ void KviNotifierWindow::doHide(bool bDoAnimate) } } -void KviNotifierWindow::showEvent(QShowEvent *e) +void KviNotifierWindow::showEvent(TQShowEvent *e) { computeRect(); setGeometry(m_wndRect); // w_win = w_wndRect } -void KviNotifierWindow::hideEvent(QHideEvent * e) +void KviNotifierWindow::hideEvent(TQHideEvent * e) { if (m_bCrashShowWorkAround) return; stopBlinkTimer(); @@ -572,8 +572,8 @@ void KviNotifierWindow::startBlinking() if(!KVI_OPTION_BOOL(KviOption_boolDisableNotifierFlashing)) { - m_pBlinkTimer = new QTimer(); - connect(m_pBlinkTimer,SIGNAL(timeout()),this,SLOT(blink())); + m_pBlinkTimer = new TQTimer(); + connect(m_pBlinkTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(blink())); m_iBlinkCount = 0; m_pBlinkTimer->start(m_iBlinkTimeout); } @@ -588,12 +588,12 @@ void KviNotifierWindow::startAutoHideTimer() int nSecs = m_tAutoHideAt - m_tStartedAt; if(nSecs < 5)nSecs = 5; - m_pAutoHideTimer = new QTimer(); - connect(m_pAutoHideTimer,SIGNAL(timeout()),this,SLOT(autoHide())); + m_pAutoHideTimer = new TQTimer(); + connect(m_pAutoHideTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(autoHide())); m_pAutoHideTimer->start(nSecs * 1000); - m_pProgressTimer= new QTimer(); - connect(m_pProgressTimer,SIGNAL(timeout()),this,SLOT(progressUpdate())); + m_pProgressTimer= new TQTimer(); + connect(m_pProgressTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(progressUpdate())); m_pProgressTimer->start(60); } @@ -633,23 +633,23 @@ void KviNotifierWindow::markAllMessagesAsHistoric() } -static void blend_images(QImage &buffer,QImage &background,QImage &foreground,double dValue) +static void blend_images(TQImage &buffer,TQImage &background,TQImage &foreground,double dValue) { for(int y = 0;y < buffer.height();y++) { - QRgb * dst = (QRgb *)buffer.scanLine(y); - QRgb * end = dst + buffer.width(); - QRgb * bkg = (QRgb *)background.scanLine(y); - QRgb * fgn = (QRgb *)foreground.scanLine(y); + TQRgb * dst = (TQRgb *)buffer.scanLine(y); + TQRgb * end = dst + buffer.width(); + TQRgb * bkg = (TQRgb *)background.scanLine(y); + TQRgb * fgn = (TQRgb *)foreground.scanLine(y); double dRemaining = 1.0 - dValue; while(dst < end) { - *dst = qRgb( - (int)((qRed(*bkg) * dRemaining) + (qRed(*fgn) * dValue)), - (int)((qGreen(*bkg) * dRemaining) + (qGreen(*fgn) * dValue)), - (int)((qBlue(*bkg) * dRemaining) + (qBlue(*fgn) * dValue)) + *dst = tqRgb( + (int)((tqRed(*bkg) * dRemaining) + (tqRed(*fgn) * dValue)), + (int)((tqGreen(*bkg) * dRemaining) + (tqGreen(*fgn) * dValue)), + (int)((tqBlue(*bkg) * dRemaining) + (tqBlue(*fgn) * dValue)) ); dst++; bkg++; @@ -659,44 +659,44 @@ static void blend_images(QImage &buffer,QImage &background,QImage &foreground,do } } -void KviNotifierWindow::paintEvent(QPaintEvent * e) +void KviNotifierWindow::paintEvent(TQPaintEvent * e) { /* if(m_bBlinkOn) - bitBlt(&m_pixForeground,QPoint(0,0),&m_pixBackgroundHighlighted); + bitBlt(&m_pixForeground,TQPoint(0,0),&m_pixBackgroundHighlighted); else - bitBlt(&m_pixForeground,QPoint(0,0),&m_pixBackground); + bitBlt(&m_pixForeground,TQPoint(0,0),&m_pixBackground); - QPainter p(&m_pixForeground); + TQPainter p(&m_pixForeground); */ redrawWindow(); redrawText(); if(m_dOpacity < 1.0) { - QPainter px(this); + TQPainter px(this); #if defined(COMPILE_USE_QT4) && (defined(COMPILE_ON_WINDOWS) || defined(Q_OS_MACX)) px.drawPixmap(0,0,m_pixForeground); #else - QImage temp_image = m_pixForeground.convertToImage(); + TQImage temp_image = m_pixForeground.convertToImage(); blend_images(m_imgBuffer,m_imgDesktop,temp_image,m_dOpacity); px.drawImage(0,0,m_imgBuffer); #endif px.end(); } else { #ifdef COMPILE_USE_QT4 - QPainter px(this); + TQPainter px(this); px.drawPixmap(0,0,m_pixForeground); #else - bitBlt(this,QPoint(0,0),&m_pixForeground); + bitBlt(this,TQPoint(0,0),&m_pixForeground); #endif } } void KviNotifierWindow::redrawText() { - QPainter p(&m_pixForeground); + TQPainter p(&m_pixForeground); // the current tab KviNotifierWindowTab * tab = m_pWndTabs->currentTab(); @@ -715,19 +715,19 @@ void KviNotifierWindow::redrawText() KviNotifierMessage * last = l->last(); // make sure that we can loop - int iIdx = l->findRef(cur); + int iIdx = l->tqfindRef(cur); if(iIdx == -1) { tab->setCurrentMessage(last); cur = last; - iIdx = l->findRef(cur); + iIdx = l->tqfindRef(cur); } int y = m_pWndBody->textRect().y() + m_pWndBody->textRect().height(); if(m_pLineEdit->isVisible())y -= (m_pLineEdit->height() + 4); - QColorGroup grp = colorGroup(); + TQColorGroup grp = tqcolorGroup(); int idx = iIdx; KviNotifierMessage * m = cur; @@ -738,19 +738,19 @@ void KviNotifierWindow::redrawText() y -= iHeight; if(m->historic()) { - grp.setColor(QColorGroup::Text,m_clrHistoricText); + grp.setColor(TQColorGroup::Text,m_clrHistoricText); } else { if(m == last) - grp.setColor(QColorGroup::Text,m_clrCurText); + grp.setColor(TQColorGroup::Text,m_clrCurText); else { int iClrIdx = l->count() - (idx + 2); if(iClrIdx < 0)iClrIdx = 0; else if(iClrIdx >= NUM_OLD_COLORS)iClrIdx = (NUM_OLD_COLORS - 1); - grp.setColor(QColorGroup::Text,m_clrOldText[iClrIdx]); + grp.setColor(TQColorGroup::Text,m_clrOldText[iClrIdx]); } } int iMaxY = y > m_pWndBody->textRect().y() ? y : m_pWndBody->textRect().y(); - QRect clip(m_pWndBody->textRect().x() + 20,iMaxY,m_pWndBody->textRect().width() - 20,iHeight); + TQRect clip(m_pWndBody->textRect().x() + 20,iMaxY,m_pWndBody->textRect().width() - 20,iHeight); m->text()->draw(&p,m_pWndBody->textRect().x() + 20,y,clip,grp); // if(y > m_pWndBody->textRect().y()) @@ -762,21 +762,21 @@ void KviNotifierWindow::redrawText() idx--; } - p.setPen(QPen(m_clrTitle)); + p.setPen(TQPen(m_clrTitle)); p.setFont(*m_pTitleFont); - QString title; - KviQString::sprintf(title,"[%d/%d]",iIdx + 1,l->count()); + TQString title; + KviTQString::sprintf(title,"[%d/%d]",iIdx + 1,l->count()); if(tab->window()) { title += " "; title += tab->window()->plainTextCaption(); } - p.drawText(m_pWndBorder->titleRect(),Qt::AlignLeft | Qt::SingleLine,title); + p.drawText(m_pWndBorder->titleRect(),TQt::AlignLeft | TQt::SingleLine,title); p.end(); } -void KviNotifierWindow::mouseMoveEvent(QMouseEvent * e) +void KviNotifierWindow::mouseMoveEvent(TQMouseEvent * e) { //debug ("move on x,y: %d,%d", e->pos().x(), e->pos().y()); @@ -786,8 +786,8 @@ void KviNotifierWindow::mouseMoveEvent(QMouseEvent * e) if(checkResizing(e->pos())) goto sartelo; /* ### MOUSE-MOVE-EVENT -> m_pWndBorder ### */ - if (m_pWndBorder->captionRect().contains(e->pos())) { - if (m_pWndBorder->closeRect().contains(e->pos())) { + if (m_pWndBorder->captionRect().tqcontains(e->pos())) { + if (m_pWndBorder->closeRect().tqcontains(e->pos())) { m_pWndBorder->setCloseIcon(WDG_ICON_OVER); } else { m_pWndBorder->setCloseIcon(WDG_ICON_OUT); @@ -798,14 +798,14 @@ void KviNotifierWindow::mouseMoveEvent(QMouseEvent * e) if(m_pWndTabs->currentTab()) { /* ### MOUSE-MOVE-EVENT -> m_pWndTabs ### */ - if (m_pWndTabs->rect().contains(e->pos())) { + if (m_pWndTabs->rect().tqcontains(e->pos())) { m_pWndTabs->mouseMoveEvent(e); goto sartelo; } /* ### MOUSE-MOVE-EVENT -> m_pWndBody ### */ - if (m_pWndBody->rect().contains(e->pos())) { - if (m_pWndBody->rctWriteIcon().contains(e->pos())) { + if (m_pWndBody->rect().tqcontains(e->pos())) { + if (m_pWndBody->rctWriteIcon().tqcontains(e->pos())) { m_pWndBody->setWriteIcon(WDG_ICON_ON); } else { m_pWndBody->setWriteIcon(WDG_ICON_OFF); @@ -822,7 +822,7 @@ sartelo: } if(m_bDragging) { - setCursor(Qt::SizeAllCursor); + setCursor(TQt::SizeAllCursor); int w = m_wndRect.width(); int h = m_wndRect.height(); @@ -842,7 +842,7 @@ sartelo: } -void KviNotifierWindow::mousePressEvent(QMouseEvent * e) +void KviNotifierWindow::mousePressEvent(TQMouseEvent * e) { // stop blinking first of all :) @@ -867,15 +867,15 @@ void KviNotifierWindow::mousePressEvent(QMouseEvent * e) if(checkResizing(m_pntClick)) goto sartelo; - if(m_pWndTabs->rect().contains(e->pos())) + if(m_pWndTabs->rect().tqcontains(e->pos())) { m_pWndTabs->mousePressEvent(e); goto sartelo; } - if(m_pWndBorder->captionRect().contains(e->pos())) { + if(m_pWndBorder->captionRect().tqcontains(e->pos())) { //debug ("Clicked on m_pWndBorder->rect()"); - if(m_pWndBorder->closeRect().contains(e->pos())) { + if(m_pWndBorder->closeRect().tqcontains(e->pos())) { //debug ("\tClicked on m_pWndBorder->closeRect()"); m_bCloseDown = true; m_pWndBorder->setCloseIcon(WDG_ICON_CLICKED); @@ -892,24 +892,24 @@ void KviNotifierWindow::mousePressEvent(QMouseEvent * e) //debug ("x,y: %d,%d - width,height: %d,%d", m_pWndBorder->rect().x(),m_pWndBorder->rect().y(),m_pWndBorder->rect().width(),m_pWndBorder->rect().height()); - if (m_pWndBorder->rect().contains(e->pos())) { + if (m_pWndBorder->rect().tqcontains(e->pos())) { if(m_pWndTabs->currentTab()) { //debug ("Clicked on m_pWndBody->textRect()"); - if(m_pWndBody->rctWriteIcon().contains(e->pos())) + if(m_pWndBody->rctWriteIcon().tqcontains(e->pos())) { m_pWndBody->setWriteIcon(WDG_ICON_CLICKED); showLineEdit(!(m_pLineEdit->isVisible())); } - if(m_pWndBody->rctPrevIcon().contains(e->pos()) && m_pWndBody->prevIconState()!=WDG_ICON_OFF) + if(m_pWndBody->rctPrevIcon().tqcontains(e->pos()) && m_pWndBody->prevIconState()!=WDG_ICON_OFF) { m_bPrevDown = true; m_pWndBody->setPrevIcon(WDG_ICON_CLICKED); prevButtonClicked(); } - if(m_pWndBody->rctNextIcon().contains(e->pos()) && m_pWndBody->nextIconState()!=WDG_ICON_OFF) + if(m_pWndBody->rctNextIcon().tqcontains(e->pos()) && m_pWndBody->nextIconState()!=WDG_ICON_OFF) { m_bNextDown = true; m_pWndBody->setNextIcon(WDG_ICON_CLICKED); @@ -926,7 +926,7 @@ sartelo: } -void KviNotifierWindow::mouseReleaseEvent(QMouseEvent * e) +void KviNotifierWindow::mouseReleaseEvent(TQMouseEvent * e) { m_bWriteDown = false; m_bNextDown = false; @@ -943,13 +943,13 @@ void KviNotifierWindow::mouseReleaseEvent(QMouseEvent * e) if(m_bDragging) { m_bDragging = false; - if(QApplication::overrideCursor()) QApplication::restoreOverrideCursor(); + if(TQApplication::overrideCursor()) TQApplication::restoreOverrideCursor(); return; } - if(m_pWndBorder->captionRect().contains(e->pos())) { + if(m_pWndBorder->captionRect().tqcontains(e->pos())) { - if(m_pWndBorder->closeRect().contains(e->pos())) { + if(m_pWndBorder->closeRect().tqcontains(e->pos())) { //debug ("hide now from release event"); hideNow(); } else { @@ -958,7 +958,7 @@ void KviNotifierWindow::mouseReleaseEvent(QMouseEvent * e) } - if(m_pWndTabs->rect().contains(e->pos())) + if(m_pWndTabs->rect().tqcontains(e->pos())) { m_pWndTabs->mouseReleaseEvent(e); } @@ -967,11 +967,11 @@ void KviNotifierWindow::mouseReleaseEvent(QMouseEvent * e) } -void KviNotifierWindow::mouseDoubleClickEvent(QMouseEvent * e) +void KviNotifierWindow::mouseDoubleClickEvent(TQMouseEvent * e) { - if(!m_pWndBody->textRect().contains(e->pos())) + if(!m_pWndBody->textRect().tqcontains(e->pos())) { - QWidget::mouseDoubleClickEvent(e); + TQWidget::mouseDoubleClickEvent(e); return; } @@ -984,31 +984,31 @@ void KviNotifierWindow::mouseDoubleClickEvent(QMouseEvent * e) delayedRaise(tab->window()); } -void KviNotifierWindow::keyPressEvent(QKeyEvent * e) +void KviNotifierWindow::keyPressEvent(TQKeyEvent * e) { - if (e->key()==Qt::Key_Shift) { + if (e->key()==TQt::Key_Shift) { m_bKeyShiftPressed = true; return; } - if (e->key()==Qt::Key_Left && m_bKeyShiftPressed) { + if (e->key()==TQt::Key_Left && m_bKeyShiftPressed) { m_pWndTabs->prev(); return; } - if (e->key()==Qt::Key_Right && m_bKeyShiftPressed) { + if (e->key()==TQt::Key_Right && m_bKeyShiftPressed) { m_pWndTabs->next(); return; } - if (e->key()==Qt::Key_Escape) { + if (e->key()==TQt::Key_Escape) { hideNow(); return; } } -void KviNotifierWindow::keyReleaseEvent(QKeyEvent * e) +void KviNotifierWindow::keyReleaseEvent(TQKeyEvent * e) { - if (e->key()==Qt::Key_Shift) { + if (e->key()==TQt::Key_Shift) { m_bKeyShiftPressed = false; } } @@ -1016,7 +1016,7 @@ void KviNotifierWindow::keyReleaseEvent(QKeyEvent * e) void KviNotifierWindow::delayedRaise(KviWindow * pWnd) { m_pWindowToRaise = pWnd; - QTimer::singleShot(0,this,SLOT(delayedRaiseSlot())); + TQTimer::singleShot(0,this,TQT_SLOT(delayedRaiseSlot())); } void KviNotifierWindow::delayedRaiseSlot() @@ -1030,33 +1030,33 @@ void KviNotifierWindow::delayedRaiseSlot() m_pWindowToRaise->frame()->show(); m_pWindowToRaise->frame()->raise(); - //((QWidget *)(m_pWindowToRaise->frame()))->setActiveWindow(); + //((TQWidget *)(m_pWindowToRaise->frame()))->setActiveWindow(); m_pWindowToRaise->frame()->setFocus(); } m_pWindowToRaise->delayedAutoRaise(); } -bool KviNotifierWindow::checkResizing(QPoint e) +bool KviNotifierWindow::checkResizing(TQPoint e) { if (e.y() (size().width()-WDG_BORDER_THICKNESS)) { //// UP RIGHT CORNER //// - setCursor(Qt::SizeBDiagCursor); + setCursor(TQt::SizeBDiagCursor); if (m_bLeftButtonIsPressed) { m_bResizing = true; m_whereResizing = WDG_UPDX; } } else { //// UP SIDE //// - setCursor(Qt::SizeVerCursor); + setCursor(TQt::SizeVerCursor); if (m_bLeftButtonIsPressed) { m_bResizing = true; m_whereResizing = WDG_UP; @@ -1064,21 +1064,21 @@ bool KviNotifierWindow::checkResizing(QPoint e) } else if (e.y() > (size().height()-WDG_BORDER_THICKNESS)) { if (e.x() (size().width()-WDG_BORDER_THICKNESS)) { //// DOWN RIGHT CORNER //// - setCursor(Qt::SizeFDiagCursor); + setCursor(TQt::SizeFDiagCursor); if (m_bLeftButtonIsPressed) { m_bResizing = true; m_whereResizing = WDG_DWNDX; } } else { //// DOWN SIDE //// - setCursor(Qt::SizeVerCursor); + setCursor(TQt::SizeVerCursor); if (m_bLeftButtonIsPressed) { m_bResizing = true; m_whereResizing = WDG_DWN; @@ -1087,14 +1087,14 @@ bool KviNotifierWindow::checkResizing(QPoint e) } else { if (e.x() (size().width()-WDG_BORDER_THICKNESS)) { //// RIGHT SIZE //// - setCursor(Qt::SizeHorCursor); + setCursor(TQt::SizeHorCursor); if (m_bLeftButtonIsPressed) { m_bResizing = true; m_whereResizing = WDG_DX; @@ -1111,9 +1111,9 @@ bool KviNotifierWindow::checkResizing(QPoint e) -void KviNotifierWindow::resize(QPoint p, bool up) +void KviNotifierWindow::resize(TQPoint p, bool up) { - //QPoint aux = mapToGlobal(p); + //TQPoint aux = mapToGlobal(p); if (m_whereResizing==WDG_UPSX || m_whereResizing==WDG_SX || m_whereResizing==WDG_DWNSX) { if ((x() + width() - cursor().pos().x()) < WDG_MIN_WIDTH) @@ -1162,7 +1162,7 @@ void KviNotifierWindow::redrawWindow() m_pProgressBar->setHeight(m_pWndBorder->bodyRect().height() + m_pWndBorder->tabsRect().height()); } - QPainter paint; + TQPainter paint; if(m_bBlinkOn) { m_pWndBorder->touch(); @@ -1191,27 +1191,27 @@ void KviNotifierWindow::redrawWindow() } inline void KviNotifierWindow::setCursor(int cur) { - if (m_cursor.shape() != cur) { - if(QApplication::overrideCursor()) QApplication::restoreOverrideCursor(); + if (m_cursor.tqshape() != cur) { + if(TQApplication::overrideCursor()) TQApplication::restoreOverrideCursor(); m_cursor.setShape((Qt::CursorShape)cur); - QApplication::setOverrideCursor(m_cursor); + TQApplication::setOverrideCursor(m_cursor); } else if (cur==-1) - if(QApplication::overrideCursor()) QApplication::restoreOverrideCursor(); + if(TQApplication::overrideCursor()) TQApplication::restoreOverrideCursor(); } -void KviNotifierWindow::enterEvent(QEvent * e) +void KviNotifierWindow::enterEvent(TQEvent * e) { #ifdef COMPILE_USE_QT4 if(!m_pShowHideTimer) { - m_pShowHideTimer = new QTimer(); - connect(m_pShowHideTimer,SIGNAL(timeout()),this,SLOT(heartbeat())); + m_pShowHideTimer = new TQTimer(); + connect(m_pShowHideTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(heartbeat())); } m_eState = FocusingOn; m_pShowHideTimer->start(40); #endif } -void KviNotifierWindow::leaveEvent(QEvent * e) +void KviNotifierWindow::leaveEvent(TQEvent * e) { // Leaving the widget area, restore default cursor m_pWndBorder->resetIcons(); @@ -1220,21 +1220,21 @@ void KviNotifierWindow::leaveEvent(QEvent * e) setCursor(-1); #ifdef COMPILE_USE_QT4 if(!m_pShowHideTimer) { - m_pShowHideTimer = new QTimer(); - connect(m_pShowHideTimer,SIGNAL(timeout()),this,SLOT(heartbeat())); + m_pShowHideTimer = new TQTimer(); + connect(m_pShowHideTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(heartbeat())); } m_eState = FocusingOff; m_pShowHideTimer->start(40); #endif } -void KviNotifierWindow::contextPopup(const QPoint &pos) +void KviNotifierWindow::contextPopup(const TQPoint &pos) { if(!m_pContextPopup) { - m_pContextPopup = new QPopupMenu(this); - connect(m_pContextPopup,SIGNAL(aboutToShow()),this,SLOT(fillContextPopup())); - m_pDisablePopup = new QPopupMenu(this); + m_pContextPopup = new TQPopupMenu(this); + connect(m_pContextPopup,TQT_SIGNAL(aboutToShow()),this,TQT_SLOT(fillContextPopup())); + m_pDisablePopup = new TQPopupMenu(this); } m_pContextPopup->popup(pos); @@ -1244,19 +1244,19 @@ void KviNotifierWindow::fillContextPopup() { m_pContextPopup->clear(); - m_pContextPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_CLOSE)),__tr2qs_ctx("Hide","notifier"),this,SLOT(hideNow())); + m_pContextPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_CLOSE)),__tr2qs_ctx("Hide","notifier"),this,TQT_SLOT(hideNow())); m_pContextPopup->insertSeparator(); m_pDisablePopup->clear(); - m_pDisablePopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_TIME)),__tr2qs_ctx("1 Minute","notifier"),this,SLOT(disableFor1Minute())); - m_pDisablePopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_TIME)),__tr2qs_ctx("5 Minutes","notifier"),this,SLOT(disableFor5Minutes())); - m_pDisablePopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_TIME)),__tr2qs_ctx("15 Minutes","notifier"),this,SLOT(disableFor15Minutes())); - m_pDisablePopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_TIME)),__tr2qs_ctx("30 Minutes","notifier"),this,SLOT(disableFor30Minutes())); - m_pDisablePopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_TIME)),__tr2qs_ctx("1 Hour","notifier"),this,SLOT(disableFor60Minutes())); + m_pDisablePopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_TIME)),__tr2qs_ctx("1 Minute","notifier"),this,TQT_SLOT(disableFor1Minute())); + m_pDisablePopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_TIME)),__tr2qs_ctx("5 Minutes","notifier"),this,TQT_SLOT(disableFor5Minutes())); + m_pDisablePopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_TIME)),__tr2qs_ctx("15 Minutes","notifier"),this,TQT_SLOT(disableFor15Minutes())); + m_pDisablePopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_TIME)),__tr2qs_ctx("30 Minutes","notifier"),this,TQT_SLOT(disableFor30Minutes())); + m_pDisablePopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_TIME)),__tr2qs_ctx("1 Hour","notifier"),this,TQT_SLOT(disableFor60Minutes())); m_pDisablePopup->insertSeparator(); - m_pDisablePopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_QUIT)),__tr2qs_ctx("Until KVIrc is Restarted","notifier"),this,SLOT(disableUntilKVIrcRestarted())); - m_pDisablePopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_QUIT)),__tr2qs_ctx("Permanently (Until Explicitly Enabled)","notifier"),this,SLOT(disablePermanently())); + m_pDisablePopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_TQUIT)),__tr2qs_ctx("Until KVIrc is Restarted","notifier"),this,TQT_SLOT(disableUntilKVIrcRestarted())); + m_pDisablePopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_TQUIT)),__tr2qs_ctx("Permanently (Until Explicitly Enabled)","notifier"),this,TQT_SLOT(disablePermanently())); - m_pContextPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_QUIT)),__tr2qs_ctx("Disable","notifier"),m_pDisablePopup); + m_pContextPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_TQUIT)),__tr2qs_ctx("Disable","notifier"),m_pDisablePopup); } void KviNotifierWindow::disableFor15Minutes() @@ -1316,7 +1316,7 @@ void KviNotifierWindow::disablePermanently() hideNow(); } -void KviNotifierWindow::wheelEvent(QWheelEvent * e) +void KviNotifierWindow::wheelEvent(TQWheelEvent * e) { if(e->delta() > 0)prevButtonClicked(); else nextButtonClicked(); @@ -1346,12 +1346,12 @@ void KviNotifierWindow::showLineEdit(bool bShow) //if(m_pLineEdit->isVisible())return; if(!m_pWndTabs->currentMessage())return; if(!m_pWndTabs->currentTab()->window())return; - QToolTip::remove(m_pLineEdit); - QString tip = __tr2qs_ctx("Write text or commands to window","notifier"); + TQToolTip::remove(m_pLineEdit); + TQString tip = __tr2qs_ctx("Write text or commands to window","notifier"); tip += " \""; tip += m_pWndTabs->currentTab()->window()->plainTextCaption(); tip += "\""; - QToolTip::add(m_pLineEdit,tip); + TQToolTip::add(m_pLineEdit,tip); m_pLineEdit->setGeometry(m_pWndBody->textRect().x(),m_pWndBody->textRect().y() + m_pWndBody->textRect().height() - m_iInputHeight,m_pWndBody->textRect().width(),m_iInputHeight); m_pLineEdit->show(); m_pLineEdit->setFocus(); @@ -1367,11 +1367,11 @@ void KviNotifierWindow::showLineEdit(bool bShow) } } -bool KviNotifierWindow::eventFilter(QObject * pEdit,QEvent * e) +bool KviNotifierWindow::eventFilter(TQObject * pEdit,TQEvent * e) { - if(pEdit != (QObject *)m_pLineEdit)return false; // huh ? + if(pEdit != (TQObject *)m_pLineEdit)return false; // huh ? if(!m_pLineEdit->isVisible())return false; - if(e->type() == QEvent::MouseButtonPress) + if(e->type() == TQEvent::MouseButtonPress) { bool bWasBlinkOn = m_bBlinkOn; m_bBlinkOn = false; @@ -1383,9 +1383,9 @@ bool KviNotifierWindow::eventFilter(QObject * pEdit,QEvent * e) if(bWasBlinkOn)update(); return true; } - if(e->type() == QEvent::KeyPress) + if(e->type() == TQEvent::KeyPress) { - if(((QKeyEvent *)e)->key() == Qt::Key_Escape) + if(((TQKeyEvent *)e)->key() == TQt::Key_Escape) { hideNow(); return true; @@ -1403,16 +1403,16 @@ void KviNotifierWindow::returnPressed() if(!tab->currentMessage())return; if(!tab->window())return; - QString txt = m_pLineEdit->text(); + TQString txt = m_pLineEdit->text(); if(txt.isEmpty())return; - QString html = txt; - html.replace("<","<"); - html.replace(">",">"); + TQString html = txt; + html.tqreplace("<","<"); + html.tqreplace(">",">"); KviStr tmp(KviStr::Format,"%d",KVI_SMALLICON_OWNPRIVMSG); addMessage(tab->window(),tmp.ptr(),html,0); //m_pCurrentFocusedWindowTab on place of m_pCurrentMessage->window() m_pLineEdit->setText(""); - KviUserInput::parse(txt,tab->window(),QString::null,1); + KviUserInput::parse(txt,tab->window(),TQString(),1); } void KviNotifierWindow::progressUpdate() @@ -1420,7 +1420,7 @@ void KviNotifierWindow::progressUpdate() double dProgress = m_qtStartedAt.elapsed()/(m_tAutoHideAt - m_tStartedAt); dProgress/=1000; m_pProgressBar->setProgress(dProgress); - QPainter p(this); + TQPainter p(this); m_pProgressBar->draw(&p); } #include "m_notifierwindow.moc" diff --git a/src/modules/notifier/notifierwindow.h b/src/modules/notifier/notifierwindow.h index be5e3b6e..dfc9d6de 100644 --- a/src/modules/notifier/notifierwindow.h +++ b/src/modules/notifier/notifierwindow.h @@ -26,17 +26,17 @@ #include "kvi_settings.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include "kvi_qstring.h" #include "kvi_pointerlist.h" @@ -52,34 +52,35 @@ class KviNotifierWindowBorder; class KviNotifierWindowProgressBar; class KviNotifierWindowTabs; -class QPainter; -class QPopupMenu; +class TQPainter; +class TQPopupMenu; extern kvi_time_t g_tNotifierDisabledUntil; -class KviNotifierWindow : public QWidget +class KviNotifierWindow : public TQWidget { Q_OBJECT + TQ_OBJECT public: KviNotifierWindow(); ~KviNotifierWindow(); protected: - QTimer * m_pShowHideTimer; - QTimer * m_pProgressTimer; - QTimer * m_pBlinkTimer; - QTimer * m_pAutoHideTimer; + TQTimer * m_pShowHideTimer; + TQTimer * m_pProgressTimer; + TQTimer * m_pBlinkTimer; + TQTimer * m_pAutoHideTimer; State m_eState; bool m_bBlinkOn; double m_dOpacity; - QImage m_imgDesktop; // the desktop screenshot - QPixmap m_pixBackground; // our background image - QPixmap m_pixBackgroundHighlighted; - QPixmap m_pixForeground; // we paint the stuff HERE + TQImage m_imgDesktop; // the desktop screenshot + TQPixmap m_pixBackground; // our background image + TQPixmap m_pixBackgroundHighlighted; + TQPixmap m_pixForeground; // we paint the stuff HERE - // Notifier graphic layout - QPixmap m_pixBckgrnd; + // Notifier graphic tqlayout + TQPixmap m_pixBckgrnd; - QImage m_imgBuffer; // here we merge the two images + TQImage m_imgBuffer; // here we merge the two images bool m_bCloseDown; bool m_bPrevDown; @@ -89,18 +90,18 @@ protected: bool m_bKeyShiftPressed; - QFont * m_pDefaultFont; - QFont * m_pTitleFont; + TQFont * m_pDefaultFont; + TQFont * m_pTitleFont; - QRect m_wndRect; + TQRect m_wndRect; - QColor m_clrCurText; - QColor m_clrOldText[NUM_OLD_COLORS]; - QColor m_clrHistoricText; - QColor m_clrTitle; + TQColor m_clrCurText; + TQColor m_clrOldText[NUM_OLD_COLORS]; + TQColor m_clrHistoricText; + TQColor m_clrTitle; KviNotifierMessage * m_pCurrentMessage; - QLineEdit * m_pLineEdit; + TQLineEdit * m_pLineEdit; bool m_bDragging; bool m_bLeftButtonIsPressed; @@ -109,22 +110,22 @@ protected: int m_whereResizing; - QPoint m_pntDrag; - QPoint m_pntPos; - QPoint m_pntClick; + TQPoint m_pntDrag; + TQPoint m_pntPos; + TQPoint m_pntClick; int m_iInputHeight; int m_iBlinkTimeout; int m_iBlinkCount; - QPopupMenu * m_pContextPopup; - QPopupMenu * m_pDisablePopup; + TQPopupMenu * m_pContextPopup; + TQPopupMenu * m_pDisablePopup; KviWindow * m_pWindowToRaise; kvi_time_t m_tAutoHideAt; kvi_time_t m_tStartedAt; - QTime m_qtStartedAt; + TQTime m_qtStartedAt; bool m_bDisableHideOnMainWindowGotAttention; //bool m_bForceShowing; - QCursor m_cursor; + TQCursor m_cursor; KviNotifierWindowTabs * m_pWndTabs; KviNotifierWindowProgressBar * m_pProgressBar; @@ -133,27 +134,27 @@ protected: public: void doShow(bool bDoAnimate); void doHide(bool bDoAnimate); - const QFont & defaultFont(){ return *m_pDefaultFont; }; + const TQFont & defaultFont(){ return *m_pDefaultFont; }; int textWidth(); - void addMessage(KviWindow * pWnd,const QString &szImageId,const QString &szText,unsigned int uMessageTime); + void addMessage(KviWindow * pWnd,const TQString &szImageId,const TQString &szText,unsigned int uMessageTime); State state() { return m_eState; }; void setDisableHideOnMainWindowGotAttention(bool b){ m_bDisableHideOnMainWindowGotAttention = b; }; int countTabs(); void showLineEdit(bool bShow); protected: - virtual void showEvent(QShowEvent *e); - virtual void hideEvent(QHideEvent * e); - virtual void paintEvent(QPaintEvent * e); - virtual void mousePressEvent(QMouseEvent * e); - virtual void mouseReleaseEvent(QMouseEvent * e); - virtual void mouseMoveEvent(QMouseEvent * e); - virtual void leaveEvent(QEvent * e); - virtual void enterEvent(QEvent * e); - virtual void mouseDoubleClickEvent(QMouseEvent * e); - virtual void wheelEvent(QWheelEvent * e); - virtual bool eventFilter(QObject * pEdit,QEvent * e); - virtual void keyPressEvent ( QKeyEvent * e ); - virtual void keyReleaseEvent ( QKeyEvent * e ); + virtual void showEvent(TQShowEvent *e); + virtual void hideEvent(TQHideEvent * e); + virtual void paintEvent(TQPaintEvent * e); + virtual void mousePressEvent(TQMouseEvent * e); + virtual void mouseReleaseEvent(TQMouseEvent * e); + virtual void mouseMoveEvent(TQMouseEvent * e); + virtual void leaveEvent(TQEvent * e); + virtual void enterEvent(TQEvent * e); + virtual void mouseDoubleClickEvent(TQMouseEvent * e); + virtual void wheelEvent(TQWheelEvent * e); + virtual bool eventFilter(TQObject * pEdit,TQEvent * e); + virtual void keyPressEvent ( TQKeyEvent * e ); + virtual void keyReleaseEvent ( TQKeyEvent * e ); protected slots: void blink(); void heartbeat(); @@ -172,7 +173,7 @@ protected slots: void autoHide(); void progressUpdate(); private: - void contextPopup(const QPoint &pos); + void contextPopup(const TQPoint &pos); void startBlinking(); void markAllMessagesAsHistoric(); void computeRect(); @@ -185,10 +186,10 @@ private: void nextButtonClicked(); bool shouldHideIfMainWindowGotAttention(); void setCursor(int); - void resize(QPoint p, bool = true); + void resize(TQPoint p, bool = true); void redrawWindow(); void redrawText(); - bool checkResizing(QPoint); + bool checkResizing(TQPoint); }; #endif //_NOTIFIERWINDOW_H_ diff --git a/src/modules/notifier/notifierwindowbody.cpp b/src/modules/notifier/notifierwindowbody.cpp index 7449aa9e..397068cd 100644 --- a/src/modules/notifier/notifierwindowbody.cpp +++ b/src/modules/notifier/notifierwindowbody.cpp @@ -26,19 +26,19 @@ #include "kvi_iconmanager.h" -#include -#include -#include +#include +#include +#include /* #ifdef QT3_SUPPORT #include #else - #include + #include #endif */ -KviNotifierWindowBody::KviNotifierWindowBody(QRect r) +KviNotifierWindowBody::KviNotifierWindowBody(TQRect r) { loadImages(); setHeight(r.height()); @@ -55,7 +55,7 @@ KviNotifierWindowBody::~KviNotifierWindowBody() void KviNotifierWindowBody::loadImages() { - QPixmap * p; + TQPixmap * p; if((p = g_pIconManager->getPixmap("notifier_pix_body_dx.png"))) m_pixDX = *p; if((p = g_pIconManager->getPixmap("notifier_pix_body_sx.png"))) @@ -189,11 +189,11 @@ void KviNotifierWindowBody::setWriteIcon(int state) { } }; -void KviNotifierWindowBody::draw(QPainter * p) { +void KviNotifierWindowBody::draw(TQPainter * p) { if (m_bNeedToRedraw) { - p->fillRect(QRect(m_pnt,m_rct.size()),m_mac_bkgColor); + p->fillRect(TQRect(m_pnt,m_rct.size()),m_mac_bkgColor); // Autotiled borders p->drawTiledPixmap(m_pnt.x(), m_pnt.y(), m_pixSX.width(), m_rct.height() - m_pixDWNSX.height() - m_pixKVIrcSX.height(), m_pixSX); @@ -219,14 +219,14 @@ void KviNotifierWindowBody::draw(QPainter * p) { } } -void KviNotifierWindowBody::mouseMoveEvent(QMouseEvent * e) { +void KviNotifierWindowBody::mouseMoveEvent(TQMouseEvent * e) { } -void KviNotifierWindowBody::mousePressEvent(QMouseEvent * e) { +void KviNotifierWindowBody::mousePressEvent(TQMouseEvent * e) { } -void KviNotifierWindowBody::mouseReleaseEvent(QMouseEvent * e) { +void KviNotifierWindowBody::mouseReleaseEvent(TQMouseEvent * e) { } diff --git a/src/modules/notifier/notifierwindowbody.h b/src/modules/notifier/notifierwindowbody.h index e59df9f9..dafde1d0 100644 --- a/src/modules/notifier/notifierwindowbody.h +++ b/src/modules/notifier/notifierwindowbody.h @@ -24,65 +24,65 @@ // //============================================================================= -#include -#include -#include -#include +#include +#include +#include +#include #include "notifiersettings.h" /* #ifdef QT3_SUPPORT - #define QPainter Q3Painter + #define TQPainter Q3Painter #endif */ -class QPainter; +class TQPainter; class KviNotifierWindowBody { public: - KviNotifierWindowBody(QRect r); + KviNotifierWindowBody(TQRect r); ~KviNotifierWindowBody(); // ================================ // Put members declaration below... // ================================ private: - QRect m_rct; - QPoint m_pnt; + TQRect m_rct; + TQPoint m_pnt; - QRect m_textRect; + TQRect m_textRect; - QRect m_rctWriteIcon; - QRect m_rctPrevIcon; - QRect m_rctNextIcon; - QRect m_rctCloseTabIcon; + TQRect m_rctWriteIcon; + TQRect m_rctPrevIcon; + TQRect m_rctNextIcon; + TQRect m_rctCloseTabIcon; // Pictures - QPixmap m_pixDX; - QPixmap m_pixSX; - QPixmap m_pixDWNSX; - QPixmap m_pixDWNDX; - QPixmap m_pixDWN; - QPixmap m_pixKVIrcSX; - QPixmap m_pixKVIrcDWN; - QPixmap m_pixKVIrc; + TQPixmap m_pixDX; + TQPixmap m_pixSX; + TQPixmap m_pixDWNSX; + TQPixmap m_pixDWNDX; + TQPixmap m_pixDWN; + TQPixmap m_pixKVIrcSX; + TQPixmap m_pixKVIrcDWN; + TQPixmap m_pixKVIrc; - QPixmap m_pixIconPrev; - QPixmap m_pixIconPrev_off; - QPixmap m_pixIconPrev_on; - QPixmap m_pixIconPrev_clicked; + TQPixmap m_pixIconPrev; + TQPixmap m_pixIconPrev_off; + TQPixmap m_pixIconPrev_on; + TQPixmap m_pixIconPrev_clicked; - QPixmap m_pixIconNext; - QPixmap m_pixIconNext_off; - QPixmap m_pixIconNext_on; - QPixmap m_pixIconNext_clicked; + TQPixmap m_pixIconNext; + TQPixmap m_pixIconNext_off; + TQPixmap m_pixIconNext_on; + TQPixmap m_pixIconNext_clicked; - QPixmap m_pixIconWrite; - QPixmap m_pixIconWrite_off; - QPixmap m_pixIconWrite_on; - QPixmap m_pixIconWrite_clicked; + TQPixmap m_pixIconWrite; + TQPixmap m_pixIconWrite_off; + TQPixmap m_pixIconWrite_on; + TQPixmap m_pixIconWrite_clicked; bool m_bNeedToRedraw; @@ -105,7 +105,7 @@ public: void setWidth(int w); void setHeight(int h); void resize(int w, int h) { setWidth(w); setHeight(h); }; - void resize(QRect r) { setWidth(r.width()); setHeight(r.height()); }; + void resize(TQRect r) { setWidth(r.width()); setHeight(r.height()); }; void setPoint(int x, int y) { m_pnt.setX(x); m_pnt.setY(y); }; void setPrevIcon(int state); @@ -122,21 +122,21 @@ public: int height() { return m_rct.height(); }; int baseLine() { return (y()+height()); }; - QRect rect() { return m_rct; }; - QRect textRect() { return m_textRect; }; - QRect rctPrevIcon() { return m_rctPrevIcon; }; - QRect rctNextIcon() { return m_rctNextIcon; }; - QRect rctWriteIcon() { return m_rctWriteIcon; }; + TQRect rect() { return m_rct; }; + TQRect textRect() { return m_textRect; }; + TQRect rctPrevIcon() { return m_rctPrevIcon; }; + TQRect rctNextIcon() { return m_rctNextIcon; }; + TQRect rctWriteIcon() { return m_rctWriteIcon; }; void needToRedraw() { m_bNeedToRedraw = true; }; void recalculatePositions(); void touch() { m_bNeedToRedraw = true; }; - void draw(QPainter *); + void draw(TQPainter *); - void mouseMoveEvent(QMouseEvent * e); - void mousePressEvent(QMouseEvent * e); - void mouseReleaseEvent(QMouseEvent * e); + void mouseMoveEvent(TQMouseEvent * e); + void mousePressEvent(TQMouseEvent * e); + void mouseReleaseEvent(TQMouseEvent * e); diff --git a/src/modules/notifier/notifierwindowborder.cpp b/src/modules/notifier/notifierwindowborder.cpp index efd9ec0d..9ff4c29e 100644 --- a/src/modules/notifier/notifierwindowborder.cpp +++ b/src/modules/notifier/notifierwindowborder.cpp @@ -26,9 +26,9 @@ #include "notifierwindowtabs.h" #include "kvi_iconmanager.h" -#include +#include -KviNotifierWindowBorder::KviNotifierWindowBorder(QSize s) +KviNotifierWindowBorder::KviNotifierWindowBorder(TQSize s) { loadImages(); resize(s); @@ -42,7 +42,7 @@ void KviNotifierWindowBorder::loadImages() { // Normal Border - QPixmap * p; + TQPixmap * p; if((p = g_pIconManager->getPixmap("notifier_pix_wnd_sx.png"))) m_pixSX_N = *p; @@ -153,7 +153,7 @@ void KviNotifierWindowBorder::recalculatePositions() { m_rct.setHeight(m_iRctHeight); m_rct.setWidth(m_iRctWidth); - m_rct.setTopLeft(QPoint(0,0)); + m_rct.setTopLeft(TQPoint(0,0)); m_closeIconRect.setX(m_rct.width()-m_pixCaptionDX->width()-m_pixIconClose->width()); m_closeIconRect.setY(2); @@ -161,19 +161,19 @@ void KviNotifierWindowBorder::recalculatePositions() m_closeIconRect.setHeight(m_pixIconClose->height()); m_captionRect.setTopLeft( m_rct.topLeft() ); - m_captionRect.setSize( QSize(m_rct.width(),m_pixCaptionDX->height()) ); + m_captionRect.setSize( TQSize(m_rct.width(),m_pixCaptionDX->height()) ); - m_tabsRect.setTopLeft( QPoint(m_pixCaptionDX->width()+7,m_captionRect.height()) ); - m_tabsRect.setSize( QSize(m_captionRect.width()-(2*m_pixCaptionDX->width())-7,m_iTabsHeight) ); + m_tabsRect.setTopLeft( TQPoint(m_pixCaptionDX->width()+7,m_captionRect.height()) ); + m_tabsRect.setSize( TQSize(m_captionRect.width()-(2*m_pixCaptionDX->width())-7,m_iTabsHeight) ); - m_bodyRect.setTopLeft( QPoint(m_pixCaptionDX->width()+7,m_captionRect.height()+m_tabsRect.height()) ); - m_bodyRect.setSize( QSize(m_captionRect.width()-(2*m_pixCaptionDX->width())-7,m_rct.height()-m_captionRect.height()-m_pixDWN->height()-m_tabsRect.height()) ); + m_bodyRect.setTopLeft( TQPoint(m_pixCaptionDX->width()+7,m_captionRect.height()+m_tabsRect.height()) ); + m_bodyRect.setSize( TQSize(m_captionRect.width()-(2*m_pixCaptionDX->width())-7,m_rct.height()-m_captionRect.height()-m_pixDWN->height()-m_tabsRect.height()) ); - m_titleRect.setTopLeft( QPoint(m_pixCaptionSX->width(), (m_captionRect.height()-m_iTitleFontHeight)/2 ) ); - m_titleRect.setSize( QSize(m_rct.width()-m_pixCaptionSX->width()-m_pixCaptionDX->width(),m_iTitleFontHeight) ); + m_titleRect.setTopLeft( TQPoint(m_pixCaptionSX->width(), (m_captionRect.height()-m_iTitleFontHeight)/2 ) ); + m_titleRect.setSize( TQSize(m_rct.width()-m_pixCaptionSX->width()-m_pixCaptionDX->width(),m_iTitleFontHeight) ); - m_progressRect.setTopLeft( QPoint(m_pixCaptionDX->width(),m_pixCaptionDX->height())); - m_progressRect.setSize( QSize(6,m_iRctHeight-m_pixCaptionDX->height()-m_pixDWN->height())); + m_progressRect.setTopLeft( TQPoint(m_pixCaptionDX->width(),m_pixCaptionDX->height())); + m_progressRect.setSize( TQSize(6,m_iRctHeight-m_pixCaptionDX->height()-m_pixDWN->height())); m_bNeedToRedraw = true; } @@ -191,7 +191,7 @@ void KviNotifierWindowBorder::resetIcons() { setCloseIcon(WDG_ICON_OUT); } -void KviNotifierWindowBorder::draw(QPainter * p, bool b) { +void KviNotifierWindowBorder::draw(TQPainter * p, bool b) { if (m_bNeedToRedraw) { setPics(b); diff --git a/src/modules/notifier/notifierwindowborder.h b/src/modules/notifier/notifierwindowborder.h index 5c36827b..9bbd68fd 100644 --- a/src/modules/notifier/notifierwindowborder.h +++ b/src/modules/notifier/notifierwindowborder.h @@ -26,71 +26,71 @@ #include "notifiersettings.h" -#include -#include -#include +#include +#include +#include -class QPainter; +class TQPainter; class KviNotifierWindowBorder { public: - KviNotifierWindowBorder(QSize = QSize(WDG_MIN_WIDTH,WDG_MIN_HEIGHT)); + KviNotifierWindowBorder(TQSize = TQSize(WDG_MIN_WIDTH,WDG_MIN_HEIGHT)); ~KviNotifierWindowBorder(); // ================================ // Put members declaration below... // ================================ private: - QRect m_rct; - QPoint m_pnt; + TQRect m_rct; + TQPoint m_pnt; - QRect m_closeIconRect; + TQRect m_closeIconRect; - QRect m_captionRect; - QRect m_bodyRect; - QRect m_tabsRect; - QRect m_titleRect; + TQRect m_captionRect; + TQRect m_bodyRect; + TQRect m_tabsRect; + TQRect m_titleRect; - QRect m_progressRect; + TQRect m_progressRect; // Pictures - QPixmap * m_pixSX; - QPixmap * m_pixDX; - QPixmap * m_pixDWN; - QPixmap * m_pixDWNSX; - QPixmap * m_pixDWNDX; - QPixmap * m_pixCaptionSX; - QPixmap * m_pixCaptionDX; - QPixmap * m_pixCaptionBKG; - QPixmap * m_pixIconClose_out; - QPixmap * m_pixIconClose_over; - QPixmap * m_pixIconClose_clicked; - QPixmap * m_pixIconClose; + TQPixmap * m_pixSX; + TQPixmap * m_pixDX; + TQPixmap * m_pixDWN; + TQPixmap * m_pixDWNSX; + TQPixmap * m_pixDWNDX; + TQPixmap * m_pixCaptionSX; + TQPixmap * m_pixCaptionDX; + TQPixmap * m_pixCaptionBKG; + TQPixmap * m_pixIconClose_out; + TQPixmap * m_pixIconClose_over; + TQPixmap * m_pixIconClose_clicked; + TQPixmap * m_pixIconClose; - QPixmap m_pixSX_N; - QPixmap m_pixDX_N; - QPixmap m_pixDWN_N; - QPixmap m_pixDWNSX_N; - QPixmap m_pixDWNDX_N; - QPixmap m_pixCaptionSX_N; - QPixmap m_pixCaptionDX_N; - QPixmap m_pixCaptionBKG_N; - QPixmap m_pixIconClose_out_N; - QPixmap m_pixIconClose_over_N; - QPixmap m_pixIconClose_clicked_N; + TQPixmap m_pixSX_N; + TQPixmap m_pixDX_N; + TQPixmap m_pixDWN_N; + TQPixmap m_pixDWNSX_N; + TQPixmap m_pixDWNDX_N; + TQPixmap m_pixCaptionSX_N; + TQPixmap m_pixCaptionDX_N; + TQPixmap m_pixCaptionBKG_N; + TQPixmap m_pixIconClose_out_N; + TQPixmap m_pixIconClose_over_N; + TQPixmap m_pixIconClose_clicked_N; - QPixmap m_pixSX_HL; - QPixmap m_pixDX_HL; - QPixmap m_pixDWN_HL; - QPixmap m_pixDWNSX_HL; - QPixmap m_pixDWNDX_HL; - QPixmap m_pixCaptionSX_HL; - QPixmap m_pixCaptionDX_HL; - QPixmap m_pixCaptionBKG_HL; - QPixmap m_pixIconClose_out_HL; - QPixmap m_pixIconClose_over_HL; - QPixmap m_pixIconClose_clicked_HL; + TQPixmap m_pixSX_HL; + TQPixmap m_pixDX_HL; + TQPixmap m_pixDWN_HL; + TQPixmap m_pixDWNSX_HL; + TQPixmap m_pixDWNDX_HL; + TQPixmap m_pixCaptionSX_HL; + TQPixmap m_pixCaptionDX_HL; + TQPixmap m_pixCaptionBKG_HL; + TQPixmap m_pixIconClose_out_HL; + TQPixmap m_pixIconClose_over_HL; + TQPixmap m_pixIconClose_clicked_HL; int m_iTabsHeight; int m_iTitleFontHeight; @@ -116,9 +116,9 @@ public: void setWidth(int w); void setHeight(int h); void resize(int w, int h) { setWidth(w); setHeight(h); }; - void resize(QSize r) { setWidth(r.width()); setHeight(r.height()); }; - void setGeometry(QRect r) { r.topLeft(); r.size(); /*debug("x,y: %d,%d", r.x(), r.y()); debug("w,h: %d,%d", r.width(), r.height());*/ }; - void setGeometry(QPoint p, QSize s) { setPoint (p.x(), p.y()); setWidth (s.width()); setHeight (s.height()); }; + void resize(TQSize r) { setWidth(r.width()); setHeight(r.height()); }; + void setGeometry(TQRect r) { r.topLeft(); r.size(); /*debug("x,y: %d,%d", r.x(), r.y()); debug("w,h: %d,%d", r.width(), r.height());*/ }; + void setGeometry(TQPoint p, TQSize s) { setPoint (p.x(), p.y()); setWidth (s.width()); setHeight (s.height()); }; void setPoint(int x, int y) { m_pnt.setX(x); m_pnt.setY(y); m_rct.setX(x); m_rct.setY(y); }; @@ -132,19 +132,19 @@ public: int height() { return m_rct.height(); }; int baseLine() { return (y()+height()); }; - QRect bodyRect() { return m_bodyRect; }; - QRect tabsRect() { return m_tabsRect; }; - QRect captionRect() { return m_captionRect; }; - QRect rect() { return m_rct; }; - QRect closeRect() { return m_closeIconRect; }; - QRect titleRect() { return m_titleRect; }; - QRect progressRect() { return m_progressRect; }; + TQRect bodyRect() { return m_bodyRect; }; + TQRect tabsRect() { return m_tabsRect; }; + TQRect captionRect() { return m_captionRect; }; + TQRect rect() { return m_rct; }; + TQRect closeRect() { return m_closeIconRect; }; + TQRect titleRect() { return m_titleRect; }; + TQRect progressRect() { return m_progressRect; }; void centerTitle(int h) { m_iTitleFontHeight = h; }; void touch() { m_bNeedToRedraw = true; }; - void draw(QPainter *, bool b = false); + void draw(TQPainter *, bool b = false); void setPics(bool b = false); protected: diff --git a/src/modules/notifier/notifierwindowprogressbar.cpp b/src/modules/notifier/notifierwindowprogressbar.cpp index 72bbdecf..f4f77b01 100644 --- a/src/modules/notifier/notifierwindowprogressbar.cpp +++ b/src/modules/notifier/notifierwindowprogressbar.cpp @@ -24,7 +24,7 @@ #include "notifierwindowprogressbar.h" -KviNotifierWindowProgressBar::KviNotifierWindowProgressBar(QRect r) +KviNotifierWindowProgressBar::KviNotifierWindowProgressBar(TQRect r) : m_rect(r) { @@ -35,17 +35,17 @@ KviNotifierWindowProgressBar::~KviNotifierWindowProgressBar() m_dProgress = 0; } -void KviNotifierWindowProgressBar::draw(QPainter *p) +void KviNotifierWindowProgressBar::draw(TQPainter *p) { - p->fillRect(m_rect, QColor(236, 233, 216)); + p->fillRect(m_rect, TQColor(236, 233, 216)); p->fillRect( - QRect( + TQRect( m_rect.x()+1, m_rect.y()+1 + m_rect.height() * (1 - m_dProgress), m_rect.width() - 2, (m_rect.height() - 2) * m_dProgress ), - QColor(175, 28, 95) + TQColor(175, 28, 95) ); p->drawRect(m_rect); } diff --git a/src/modules/notifier/notifierwindowprogressbar.h b/src/modules/notifier/notifierwindowprogressbar.h index ec527d2e..cba33e59 100644 --- a/src/modules/notifier/notifierwindowprogressbar.h +++ b/src/modules/notifier/notifierwindowprogressbar.h @@ -24,13 +24,13 @@ // //============================================================================= -#include -#include +#include +#include class KviNotifierWindowProgressBar { public: - KviNotifierWindowProgressBar(QRect r); + KviNotifierWindowProgressBar(TQRect r); ~KviNotifierWindowProgressBar(); // ================================ @@ -41,7 +41,7 @@ private: public: protected: - QRect m_rect; + TQRect m_rect; double m_dProgress; // ================================ @@ -57,7 +57,7 @@ public: void setHeight(int p_iHeight) { m_rect.setHeight(p_iHeight); }; void setProgress(double progress) { m_dProgress=progress; }; - void draw(QPainter *); + void draw(TQPainter *); protected: diff --git a/src/modules/notifier/notifierwindowtabs.cpp b/src/modules/notifier/notifierwindowtabs.cpp index 9eaa2f12..7455049f 100644 --- a/src/modules/notifier/notifierwindowtabs.cpp +++ b/src/modules/notifier/notifierwindowtabs.cpp @@ -30,11 +30,11 @@ #include "kvi_options.h" #include "kvi_window.h" -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "notifiermessage.h" #include "notifierwindowtabs.h" @@ -45,7 +45,7 @@ KviNotifierWindowTabs * g_pTabs; // --- tab object definition class -KviNotifierWindowTab::KviNotifierWindowTab(KviWindow * pWnd, QString label) +KviNotifierWindowTab::KviNotifierWindowTab(KviWindow * pWnd, TQString label) { m_pWnd = pWnd; m_label = label; @@ -58,14 +58,14 @@ KviNotifierWindowTab::KviNotifierWindowTab(KviWindow * pWnd, QString label) g_pApp->getReadOnlyConfigPath(buffer,"libkvinotifier.kvc",KviApp::ConfigPlugins,true); KviConfig cfg(buffer.ptr(),KviConfig::Read); cfg.setGroup("NotifierSkin"); - m_clrHighlightedLabel = cfg.readColorEntry("HighlightedTabLablerColor",QColor(200,0,0)); - m_clrNormalLabel = cfg.readColorEntry("NormalTabLablerColor",QColor(0,0,0)); - m_clrChangedLabel = cfg.readColorEntry("ChangedTabLablerColor",QColor(0,0,100)); + m_clrHighlightedLabel = cfg.readColorEntry("HighlightedTabLablerColor",TQColor(200,0,0)); + m_clrNormalLabel = cfg.readColorEntry("NormalTabLablerColor",TQColor(0,0,0)); + m_clrChangedLabel = cfg.readColorEntry("ChangedTabLablerColor",TQColor(0,0,100)); if(pWnd) { - connect(pWnd,SIGNAL(windowNameChanged()),this,SLOT(labelChanged())); - connect(pWnd,SIGNAL(destroyed()),this,SLOT(closeMe())); + connect(pWnd,TQT_SIGNAL(windowNameChanged()),this,TQT_SLOT(labelChanged())); + connect(pWnd,TQT_SIGNAL(destroyed()),this,TQT_SLOT(closeMe())); } } @@ -77,7 +77,7 @@ KviNotifierWindowTab::~KviNotifierWindowTab() void KviNotifierWindowTab::setNextMessageAsCurrent() { if(!m_pCurrentMessage)return; - if(m_pMessageList->findRef(m_pCurrentMessage) == -1)return; + if(m_pMessageList->tqfindRef(m_pCurrentMessage) == -1)return; m_pCurrentMessage = m_pMessageList->next(); if(!m_pCurrentMessage)m_pCurrentMessage = m_pMessageList->last(); } @@ -85,7 +85,7 @@ void KviNotifierWindowTab::setNextMessageAsCurrent() void KviNotifierWindowTab::setPrevMessageAsCurrent() { if(!m_pCurrentMessage)return; - if(!m_pMessageList->findRef(m_pCurrentMessage) == -1)return; + if(!m_pMessageList->tqfindRef(m_pCurrentMessage) == -1)return; m_pCurrentMessage = m_pMessageList->prev(); if(!m_pCurrentMessage)m_pCurrentMessage = m_pMessageList->first(); } @@ -149,10 +149,10 @@ void KviNotifierWindowTab::setState(TabState state) int KviNotifierWindowTab::width(bool b) { int width = 0; - QFont * font; + TQFont * font; - QPixmap * sx; - QPixmap * dx; + TQPixmap * sx; + TQPixmap * dx; if (focused()) { font = g_pTabs->fontFocused(); @@ -164,7 +164,7 @@ int KviNotifierWindowTab::width(bool b) { font = g_pTabs->fontUnfocused(); } - QFontMetrics fm(*font); + TQFontMetrics fm(*font); width = fm.width(label())+2; if (!b) width += sx->width() + dx->width(); @@ -176,11 +176,11 @@ int KviNotifierWindowTab::width(bool b) { // ##################################################################################à -KviNotifierWindowTabs::KviNotifierWindowTabs(QRect r) +KviNotifierWindowTabs::KviNotifierWindowTabs(TQRect r) { g_pTabs = this; - m_pPixmap = new QPixmap(); - m_pPainter = new QPainter(); + m_pPixmap = new TQPixmap(); + m_pPainter = new TQPainter(); m_pTabFocused = 0; m_pWndTabFocused = 0; m_iTabToStartFrom = 0; @@ -195,7 +195,7 @@ KviNotifierWindowTabs::KviNotifierWindowTabs(QRect r) KviNotifierWindowTabs::~KviNotifierWindowTabs() { - QMap::Iterator tab; + TQMap::Iterator tab; for(tab = m_tabMap.begin(); tab != m_tabMap.end(); tab++ ) delete tab.data(); m_tabMap.clear(); @@ -214,16 +214,16 @@ void KviNotifierWindowTabs::initConfig() cfg.setGroup("NotifierSkin"); - QString szFamily = cfg.readEntry("TextFontFocusedTab","Arial"); - m_pFocusedFont = new QFont(szFamily,cfg.readIntEntry("TextFocusedFontSize",10)); + TQString szFamily = cfg.readEntry("TextFontFocusedTab","Arial"); + m_pFocusedFont = new TQFont(szFamily,cfg.readIntEntry("TextFocusedFontSize",10)); m_pFocusedFont->setBold(true); szFamily = cfg.readEntry("TextFontUnfocusedTab","Arial"); - m_pUnfocusedFont = new QFont(szFamily,cfg.readIntEntry("TextUnfocusedFontSize",9)); + m_pUnfocusedFont = new TQFont(szFamily,cfg.readIntEntry("TextUnfocusedFontSize",9)); } void KviNotifierWindowTabs::loadImages() { - QPixmap * p; + TQPixmap * p; if((p = g_pIconManager->getPixmap("notifier_pix_tab_dx.png"))) m_pixDX = *p; if((p = g_pIconManager->getPixmap("notifier_pix_tab_sx.png"))) @@ -278,14 +278,14 @@ void KviNotifierWindowTabs::loadImages() void KviNotifierWindowTabs::addMessage(KviWindow * pWnd, KviNotifierMessage * message) { - QString sender = pWnd ? pWnd->windowName() : "----"; + TQString sender = pWnd ? pWnd->windowName() : "----"; // Qui servirebbe anche una lista... perche' quando si inserisce // un tab lui lo piazza dove gli pare nell'ordine // e quindi iterando i tab nuovi possono trovarsi PRIMA dei tab vecchi // il che' confonde un po KviNotifierWindowTab * tab; - if (!m_tabMap.contains(pWnd)) { + if (!m_tabMap.tqcontains(pWnd)) { m_tabMap.insert(pWnd, tab = new KviNotifierWindowTab(pWnd, sender)); m_tabPtrList.append(tab); } else { @@ -302,7 +302,7 @@ void KviNotifierWindowTabs::addMessage(KviWindow * pWnd, KviNotifierMessage * me } } -void KviNotifierWindowTabs::resize(QRect r) +void KviNotifierWindowTabs::resize(TQRect r) { m_rct.setX(r.x()); m_rct.setY(r.y()); @@ -411,37 +411,37 @@ void KviNotifierWindowTabs::next() } -void KviNotifierWindowTabs::mousePressEvent(QMouseEvent * e) { +void KviNotifierWindowTabs::mousePressEvent(TQMouseEvent * e) { - if (m_bIsOverRightBound && m_rctNextIcon.contains(e->pos())) { + if (m_bIsOverRightBound && m_rctNextIcon.tqcontains(e->pos())) { return; } - if (m_bIsOverLeftBound && m_rctPrevIcon.contains(e->pos())) { + if (m_bIsOverLeftBound && m_rctPrevIcon.tqcontains(e->pos())) { return; } - if(m_rctTabs.contains(e->pos())) + if(m_rctTabs.tqcontains(e->pos())) { - QMap::Iterator tab; + TQMap::Iterator tab; for (tab = m_tabMap.begin(); tab != m_tabMap.end(); tab++ ) { - if (tab.data()->rect().contains(e->pos())) { + if (tab.data()->rect().tqcontains(e->pos())) { setFocusOn(tab.data()); return; } } } - if (m_rctCloseTabIconHotArea.contains(e->pos())) { + if (m_rctCloseTabIconHotArea.tqcontains(e->pos())) { setCloseTabIcon(WDG_ICON_CLICKED); return; } } -void KviNotifierWindowTabs::mouseMoveEvent(QMouseEvent * e) +void KviNotifierWindowTabs::mouseMoveEvent(TQMouseEvent * e) { - if (m_rctCloseTabIconHotArea.contains(e->pos())) + if (m_rctCloseTabIconHotArea.tqcontains(e->pos())) { setCloseTabIcon(WDG_ICON_ON); } else { @@ -450,22 +450,22 @@ void KviNotifierWindowTabs::mouseMoveEvent(QMouseEvent * e) } } -void KviNotifierWindowTabs::mouseReleaseEvent(QMouseEvent * e) +void KviNotifierWindowTabs::mouseReleaseEvent(TQMouseEvent * e) { - if (m_bIsOverRightBound && m_rctNextIcon.contains(e->pos())) { + if (m_bIsOverRightBound && m_rctNextIcon.tqcontains(e->pos())) { scrollTabsLeft(); return; } - if (m_bIsOverLeftBound && m_rctPrevIcon.contains(e->pos())) { + if (m_bIsOverLeftBound && m_rctPrevIcon.tqcontains(e->pos())) { scrollTabsRight(); return; } if(currentTab()) { - if (rctCloseTabIconHotArea().contains(e->pos())) + if (rctCloseTabIconHotArea().tqcontains(e->pos())) { closeCurrentTab(); g_pNotifierWindow->update(); @@ -524,7 +524,7 @@ void KviNotifierWindowTabs::setFocusOn(KviNotifierWindowTab * tab) g_pNotifierWindow->update(); } -void KviNotifierWindowTabs::draw(QPainter * p) +void KviNotifierWindowTabs::draw(TQPainter * p) { if(!m_bNeedToRedraw)return; @@ -532,12 +532,12 @@ void KviNotifierWindowTabs::draw(QPainter * p) m_pPainter->begin(m_pPixmap); - QFont tmpFont; + TQFont tmpFont; tmpFont = p->font(); m_pPainter->setFont(tmpFont); - QString str; + TQString str; bool isBigger = false; @@ -555,9 +555,9 @@ void KviNotifierWindowTabs::draw(QPainter * p) KviPointerListIterator tabIterator (m_tabPtrList); - //m_tabPtrList.findRef(m_tabMap[m_pTabFocused->wnd()]); + //m_tabPtrList.tqfindRef(m_tabMap[m_pTabFocused->wnd()]); -// QMap::Iterator tab; +// TQMap::Iterator tab; KviNotifierWindowTab * tab; //for (tab = m_tabMap.begin(); tab != m_tabMap.end() && !isBigger; tab++ ) tabIterator.moveFirst(); @@ -581,7 +581,7 @@ void KviNotifierWindowTabs::draw(QPainter * p) m_pPainter->drawPixmap(offset,0,m_pixSXFocused); m_pPainter->drawTiledPixmap(offset+m_pixSXFocused.width(),0,tab->width(true),m_rctTabs.height(),m_pixBKGFocused); m_pPainter->drawPixmap(offset+m_pixSXFocused.width()+tab->width(true),0,m_pixDXFocused); - QPen tmpP = m_pPainter->pen(); m_pPainter->setPen(tab->labelColor()); + TQPen tmpP = m_pPainter->pen(); m_pPainter->setPen(tab->labelColor()); m_pPainter->drawText(offset+m_pixSXFocused.width()+1,m_rctTabs.height()-NTF_TABS_FONT_BASELINE,tab->label()); m_pPainter->setPen(tmpP); @@ -596,7 +596,7 @@ void KviNotifierWindowTabs::draw(QPainter * p) m_pPainter->drawPixmap(offset, 0, m_pixSXUnfocused); m_pPainter->drawTiledPixmap(offset+m_pixSXUnfocused.width(), 0, tab->width(true), m_rctTabs.height(), m_pixBKGUnfocused); m_pPainter->drawPixmap(offset+m_pixSXUnfocused.width()+tab->width(true), 0, m_pixDXUnfocused); - QPen tmpP = m_pPainter->pen(); m_pPainter->setPen(tab->labelColor()); + TQPen tmpP = m_pPainter->pen(); m_pPainter->setPen(tab->labelColor()); m_pPainter->drawText(offset+m_pixSXUnfocused.width()+1,m_rctTabs.height()-NTF_TABS_FONT_BASELINE+1,tab->label()); m_pPainter->setPen(tmpP); offset += tab->width(); @@ -634,7 +634,7 @@ void KviNotifierWindowTabs::draw(QPainter * p) void KviNotifierWindowTabs::markAllMessagesAsHistoric() { /* - QMap::Iterator tab; + TQMap::Iterator tab; // Iterating every tab for (tab = m_tabMap.begin(); tab != m_tabMap.end(); ++tab) { @@ -654,7 +654,7 @@ void KviNotifierWindowTabs::markAllMessagesAsHistoric() void KviNotifierWindowTabs::closeTab(KviWindow * pWnd) { - KviNotifierWindowTab * pTab = m_tabMap.find(pWnd).data(); + KviNotifierWindowTab * pTab = m_tabMap.tqfind(pWnd).data(); closeTab(pWnd, pTab); } @@ -671,7 +671,7 @@ void KviNotifierWindowTabs::closeCurrentTab() KviNotifierWindowTab * pTab = m_pTabFocused; if (m_tabMap.isEmpty()) return; // Empty??? The World is ending... KviWindow * pWnd = pTab->wnd(); - if (!m_tabMap.contains(pWnd)) return; // The current tab is not on the map??? Call 911!! + if (!m_tabMap.tqcontains(pWnd)) return; // The current tab is not on the map??? Call 911!! // End paranoic stuff, go back to sanity... closeTab(pWnd, pTab); diff --git a/src/modules/notifier/notifierwindowtabs.h b/src/modules/notifier/notifierwindowtabs.h index 555906b8..42501dab 100644 --- a/src/modules/notifier/notifierwindowtabs.h +++ b/src/modules/notifier/notifierwindowtabs.h @@ -24,12 +24,12 @@ // //============================================================================= -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include "kvi_settings.h" #include "kvi_pointerlist.h" #include "notifiersettings.h" @@ -38,7 +38,7 @@ #include "notifiermessage.h" -class QPainter; +class TQPainter; class KviWindow; class KviNotifierWindowTab; @@ -47,11 +47,12 @@ typedef struct wndTabPair_s { KviWindow * pWnd; } wndTabPair; -class KviNotifierWindowTab : public QObject // this class defines an object for every single tab about the tabs area +class KviNotifierWindowTab : public TQObject // this class defines an object for every single tab about the tabs area { Q_OBJECT + TQ_OBJECT public: - KviNotifierWindowTab(KviWindow *, QString); + KviNotifierWindowTab(KviWindow *, TQString); ~KviNotifierWindowTab(); // ================================ @@ -60,14 +61,14 @@ public: private: bool m_bFocused; - QColor m_cLabel; - QColor m_clrHighlightedLabel; - QColor m_clrNormalLabel; - QColor m_clrChangedLabel; + TQColor m_cLabel; + TQColor m_clrHighlightedLabel; + TQColor m_clrNormalLabel; + TQColor m_clrChangedLabel; - QRect m_rect; + TQRect m_rect; - QString m_label; + TQString m_label; KviPointerList * m_pMessageList; KviWindow * m_pWnd; @@ -104,9 +105,9 @@ public: void setState(TabState state); void setRect(int x, int y, int w, int h) { m_rect.setX(x); m_rect.setY(y); m_rect.setWidth(w); m_rect.setHeight(h); }; - QColor labelColor() {return m_cLabel; } - QRect rect() { return m_rect; }; - QString label() { return m_label; }; + TQColor labelColor() {return m_cLabel; } + TQRect rect() { return m_rect; }; + TQString label() { return m_label; }; KviNotifierMessage * currentMessage() { return m_pCurrentMessage; }; KviPointerList * messageList() { return m_pMessageList; }; @@ -130,59 +131,59 @@ protected: class KviNotifierWindowTabs // this class defines the tabs area { public: - KviNotifierWindowTabs(QRect r); + KviNotifierWindowTabs(TQRect r); ~KviNotifierWindowTabs(); // ================================ // Put members declaration below... // ================================ private: - QRect m_rct; - QPoint m_pnt; + TQRect m_rct; + TQPoint m_pnt; - QMap m_tabMap; + TQMap m_tabMap; KviPointerList m_tabPtrList; KviPointerList m_lastVisitedTabPtrList; - QFont * m_pFocusedFont; - QFont * m_pUnfocusedFont; + TQFont * m_pFocusedFont; + TQFont * m_pUnfocusedFont; KviNotifierWindowTab * m_pTabFocused; KviWindow * m_pWndTabFocused; - QRect m_rctNextIcon; - QRect m_rctPrevIcon; - QRect m_rctCloseTabIcon; - QRect m_rctCloseTabIconHotArea; - QRect m_rctTabs; + TQRect m_rctNextIcon; + TQRect m_rctPrevIcon; + TQRect m_rctCloseTabIcon; + TQRect m_rctCloseTabIconHotArea; + TQRect m_rctTabs; - QPainter * m_pPainter; - QPixmap * m_pPixmap; + TQPainter * m_pPainter; + TQPixmap * m_pPixmap; - QPixmap m_pixDX; - QPixmap m_pixSX; - QPixmap m_pixBKG; - QPixmap m_pixSXFocused; - QPixmap m_pixDXFocused; - QPixmap m_pixBKGFocused; - QPixmap m_pixSXUnfocused; - QPixmap m_pixDXUnfocused; - QPixmap m_pixBKGUnfocused; - - QPixmap m_pixIconTabPrev; - QPixmap m_pixIconTabPrev_out; - QPixmap m_pixIconTabPrev_over; - QPixmap m_pixIconTabPrev_clicked; + TQPixmap m_pixDX; + TQPixmap m_pixSX; + TQPixmap m_pixBKG; + TQPixmap m_pixSXFocused; + TQPixmap m_pixDXFocused; + TQPixmap m_pixBKGFocused; + TQPixmap m_pixSXUnfocused; + TQPixmap m_pixDXUnfocused; + TQPixmap m_pixBKGUnfocused; + + TQPixmap m_pixIconTabPrev; + TQPixmap m_pixIconTabPrev_out; + TQPixmap m_pixIconTabPrev_over; + TQPixmap m_pixIconTabPrev_clicked; - QPixmap m_pixIconTabNext; - QPixmap m_pixIconTabNext_out; - QPixmap m_pixIconTabNext_over; - QPixmap m_pixIconTabNext_clicked; + TQPixmap m_pixIconTabNext; + TQPixmap m_pixIconTabNext_out; + TQPixmap m_pixIconTabNext_over; + TQPixmap m_pixIconTabNext_clicked; - QPixmap m_pixIconCloseTab; - QPixmap m_pixIconCloseTab_off; - QPixmap m_pixIconCloseTab_on; - QPixmap m_pixIconCloseTab_clicked; + TQPixmap m_pixIconCloseTab; + TQPixmap m_pixIconCloseTab_off; + TQPixmap m_pixIconCloseTab_on; + TQPixmap m_pixIconCloseTab_clicked; int m_closeTabIconState; int m_iTabToStartFrom; @@ -209,17 +210,17 @@ public: void closeTab(KviWindow * pWnd); // referes to void closeTab(KviWindow * pWnd, KviNotifierWindowTab * pTab); void closeTab(KviNotifierWindowTab * pTab); // referes to void closeTab(KviWindow * pWnd, KviNotifierWindowTab * pTab); void closeTab(KviWindow * pWnd, KviNotifierWindowTab * pTab); - void draw(QPainter *); + void draw(TQPainter *); void needToRedraw() { m_bNeedToRedraw = true; }; void markAllMessagesAsHistoric(); - void mouseMoveEvent(QMouseEvent * e); - void mousePressEvent(QMouseEvent * e); - void mouseReleaseEvent(QMouseEvent * e); + void mouseMoveEvent(TQMouseEvent * e); + void mousePressEvent(TQMouseEvent * e); + void mouseReleaseEvent(TQMouseEvent * e); void next(); void prev(); void recalculatePositions(); void resetIcons(); - void resize(QRect); + void resize(TQRect); void scrollTabsLeft(); void scrollTabsRight(); void setCloseTabIcon(int state); @@ -237,16 +238,16 @@ public: int x() { return m_pnt.x(); }; int y() { return m_pnt.y(); }; - QFont * fontFocused() { return m_pFocusedFont; }; - QFont * fontUnfocused() { return m_pUnfocusedFont; }; + TQFont * fontFocused() { return m_pFocusedFont; }; + TQFont * fontUnfocused() { return m_pUnfocusedFont; }; - QPixmap * tabFocusedPixSx() {return &m_pixSXFocused; }; - QPixmap * tabFocusedPixDx() {return &m_pixDXFocused; }; - QPixmap * tabUnfocusedPixSx() {return &m_pixSXUnfocused; }; - QPixmap * tabUnfocusedPixDx() {return &m_pixDXUnfocused; }; + TQPixmap * tabFocusedPixSx() {return &m_pixSXFocused; }; + TQPixmap * tabFocusedPixDx() {return &m_pixDXFocused; }; + TQPixmap * tabUnfocusedPixSx() {return &m_pixSXUnfocused; }; + TQPixmap * tabUnfocusedPixDx() {return &m_pixDXUnfocused; }; - QRect rect() {return m_rct;}; - QRect rctCloseTabIconHotArea() {return m_rctCloseTabIconHotArea; }; + TQRect rect() {return m_rct;}; + TQRect rctCloseTabIconHotArea() {return m_rctCloseTabIconHotArea; }; KviNotifierWindowTab * currentTab() { return m_pTabFocused; }; diff --git a/src/modules/objects/class_button.cpp b/src/modules/objects/class_button.cpp index 54d1525a..c3710cc1 100644 --- a/src/modules/objects/class_button.cpp +++ b/src/modules/objects/class_button.cpp @@ -24,7 +24,7 @@ #include "kvi_error.h" -#include +#include #include "kvi_iconmanager.h" #include "class_button.h" @@ -57,25 +57,25 @@ KVSO_END_CONSTRUCTOR(KviKvsObject_button) bool KviKvsObject_button::init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams) { - setObject(new QPushButton(parentScriptWidget(),name()),true); - connect(widget(),SIGNAL(clicked()),this,SLOT(slotClicked())); + setObject(TQT_TQOBJECT(new TQPushButton(tqparentScriptWidget(),name())),true); + connect(widget(),TQT_SIGNAL(clicked()),this,TQT_SLOT(slotClicked())); return true; } bool KviKvsObject_button::functionText(KviKvsObjectFunctionCall *c) { - if(widget()) c->returnValue()->setString(((QPushButton *)widget())->text()); + if(widget()) c->returnValue()->setString(((TQPushButton *)widget())->text()); return true; } bool KviKvsObject_button::functionSetText(KviKvsObjectFunctionCall *c) { - QString szText; + TQString szText; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("text",KVS_PT_STRING,0,szText) KVSO_PARAMETERS_END(c) if (widget()) - ((QPushButton *)widget())->setText(szText); + ((TQPushButton *)widget())->setText(szText); return true; } bool KviKvsObject_button::functionSetAutoDefault(KviKvsObjectFunctionCall *c) @@ -85,7 +85,7 @@ bool KviKvsObject_button::functionSetAutoDefault(KviKvsObjectFunctionCall *c) KVSO_PARAMETER("bEnabled",KVS_PT_BOOL,0,bEnabled) KVSO_PARAMETERS_END(c) if(widget()) - ((QPushButton *)widget())->setAutoDefault(bEnabled); + ((TQPushButton *)widget())->setAutoDefault(bEnabled); return true; } bool KviKvsObject_button::functionSetToggleButton(KviKvsObjectFunctionCall *c) @@ -95,7 +95,7 @@ bool KviKvsObject_button::functionSetToggleButton(KviKvsObjectFunctionCall *c) KVSO_PARAMETER("bEnabled",KVS_PT_BOOL,0,bEnabled) KVSO_PARAMETERS_END(c) if(widget()) - ((QPushButton *)widget())->setToggleButton(bEnabled); + ((TQPushButton *)widget())->setToggleButton(bEnabled); return true; } bool KviKvsObject_button::functionSetOn(KviKvsObjectFunctionCall *c) @@ -105,7 +105,7 @@ bool KviKvsObject_button::functionSetOn(KviKvsObjectFunctionCall *c) KVSO_PARAMETER("bEnabled",KVS_PT_BOOL,0,bEnabled) KVSO_PARAMETERS_END(c) if(widget()) - ((QPushButton *)widget())->setOn(bEnabled); + ((TQPushButton *)widget())->setOn(bEnabled); return true; } // FIX ME @@ -116,48 +116,48 @@ bool KviKvsObject_button::functionSetIsMenuButton(KviKvsObjectFunctionCall *c) KVSO_PARAMETER("bEnabled",KVS_PT_BOOL,0,bEnabled) KVSO_PARAMETERS_END(c) /*if(widget()) - ((QPushButton *)widget())->setIsMenuButton(bEnabled); + ((TQPushButton *)widget())->setIsMenuButton(bEnabled); */ return true; } bool KviKvsObject_button::functionIsMenuButton(KviKvsObjectFunctionCall *c) { - if (widget()) c->returnValue()->setBoolean(((QPushButton *)widget())->isMenuButton()); + if (widget()) c->returnValue()->setBoolean(((TQPushButton *)widget())->isMenuButton()); return true; } // bool KviKvsObject_button::functionIsOn(KviKvsObjectFunctionCall *c) { - if (widget()) c->returnValue()->setBoolean(((QPushButton *)widget())->isOn()); + if (widget()) c->returnValue()->setBoolean(((TQPushButton *)widget())->isOn()); return true; } bool KviKvsObject_button::functionToggle(KviKvsObjectFunctionCall *c) { - if(widget()) ((QPushButton *)widget())->toggle(); + if(widget()) ((TQPushButton *)widget())->toggle(); return true; } // FIX ME bool KviKvsObject_button::functionSetImage(KviKvsObjectFunctionCall *c) { - QString icon; + TQString icon; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("icon",KVS_PT_STRING,0,icon) KVSO_PARAMETERS_END(c) if (!widget()) return true; - QPixmap * pix = g_pIconManager->getImage(icon); + TQPixmap * pix = g_pIconManager->getImage(icon); if(pix){ #ifdef COMPILE_USE_QT4 - ((QPushButton *)widget())->setIconSet(*pix); + ((TQPushButton *)widget())->setIconSet(*pix); #else - ((QPushButton *)widget())->setIconSet(QIconSet(*pix,QIconSet::Small)); + ((TQPushButton *)widget())->setIconSet(TQIconSet(*pix,TQIconSet::Small)); #endif } else{ #ifdef COMPILE_USE_QT4 - ((QPushButton *)widget())->setIcon(QIconSet()); + ((TQPushButton *)widget())->setIcon(TQIconSet()); #else - ((QPushButton *)widget())->setIconSet(QIconSet()); + ((TQPushButton *)widget())->setIconSet(TQIconSet()); #endif } return true; diff --git a/src/modules/objects/class_button.h b/src/modules/objects/class_button.h index 5c752e48..f2077624 100644 --- a/src/modules/objects/class_button.h +++ b/src/modules/objects/class_button.h @@ -24,17 +24,18 @@ -#include +#include #include "class_widget.h" #include "object_macros.h" class KviKvsObject_button : public KviKvsObject_widget { Q_OBJECT + TQ_OBJECT public: KVSO_DECLARE_OBJECT(KviKvsObject_button) public: - QWidget * widget() { return (QWidget *)object(); }; + TQWidget * widget() { return (TQWidget *)object(); }; protected: virtual bool init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams); diff --git a/src/modules/objects/class_buttongroup.cpp b/src/modules/objects/class_buttongroup.cpp index 5f9f1756..611341ae 100644 --- a/src/modules/objects/class_buttongroup.cpp +++ b/src/modules/objects/class_buttongroup.cpp @@ -21,9 +21,9 @@ // Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // -#include +#include #include "class_buttongroup.h" -#include +#include #include "kvi_error.h" #include "kvi_debug.h" @@ -47,9 +47,9 @@ [class]widget[/class] @description: This widget organizes buttons in a group. - It will be usually a parent for other child controls. - You can either use a child layout to manage the children geometries - or use $setColumnLayout function to manage the layout automatically. + It will be usually a tqparent for other child controls. + You can either use a child tqlayout to manage the tqchildren geometries + or use $setColumnLayout function to manage the tqlayout automatically. The class ineriths groupbox. @functions: @@ -73,11 +73,11 @@ KVSO_END_CONSTRUCTOR(KviKvsObject_buttongroup) bool KviKvsObject_buttongroup::init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams) { #ifdef COMPILE_USE_QT4 - QButtonGroup *group=new QButtonGroup(parentScriptWidget()); + TQButtonGroup *group=new TQButtonGroup(tqparentScriptWidget()); group->setObjectName(name()); setObject(group,true); #else - setObject(new QButtonGroup(name(),parentScriptWidget()), true); + setObject(TQT_TQOBJECT(new TQButtonGroup(name(),tqparentScriptWidget())), true); #endif diff --git a/src/modules/objects/class_buttongroup.h b/src/modules/objects/class_buttongroup.h index 472051ec..440b1e95 100644 --- a/src/modules/objects/class_buttongroup.h +++ b/src/modules/objects/class_buttongroup.h @@ -25,7 +25,7 @@ -#include +#include #include "class_groupbox.h" #include "object_macros.h" @@ -34,7 +34,7 @@ class KviKvsObject_buttongroup : public KviKvsObject_groupbox public: KVSO_DECLARE_OBJECT(KviKvsObject_buttongroup) public: - QWidget * widget() { return (QWidget *)object(); }; + TQWidget * widget() { return (TQWidget *)object(); }; protected: virtual bool init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams); diff --git a/src/modules/objects/class_checkbox.cpp b/src/modules/objects/class_checkbox.cpp index a651adb8..27a0fc1d 100644 --- a/src/modules/objects/class_checkbox.cpp +++ b/src/modules/objects/class_checkbox.cpp @@ -79,10 +79,10 @@ KVSO_END_CONSTRUCTOR(KviKvsObject_checkbox) bool KviKvsObject_checkbox::init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams) { - KviStyledCheckBox * cb = new KviStyledCheckBox(parentScriptWidget(), name()); - setObject(cb, true); - connect(cb,SIGNAL(toggled(bool)),this,SLOT(toggled(bool))); - connect(widget(),SIGNAL(clicked()),this,SLOT(slotClicked())); + KviStyledCheckBox * cb = new KviStyledCheckBox(tqparentScriptWidget(), name()); + setObject(TQT_TQOBJECT(cb), true); + connect(cb,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(toggled(bool))); + connect(widget(),TQT_SIGNAL(clicked()),this,TQT_SLOT(slotClicked())); return true; } @@ -104,7 +104,7 @@ bool KviKvsObject_checkbox::function_setChecked(KviKvsObjectFunctionCall *c) bool KviKvsObject_checkbox::function_setText(KviKvsObjectFunctionCall *c) { - QString szText; + TQString szText; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("text",KVS_PT_STRING,0,szText) KVSO_PARAMETERS_END(c) diff --git a/src/modules/objects/class_checkbox.h b/src/modules/objects/class_checkbox.h index 1d19a432..150cac04 100644 --- a/src/modules/objects/class_checkbox.h +++ b/src/modules/objects/class_checkbox.h @@ -25,17 +25,18 @@ -#include +#include #include "class_button.h" #include "object_macros.h" class KviKvsObject_checkbox : public KviKvsObject_button { Q_OBJECT + TQ_OBJECT public: KVSO_DECLARE_OBJECT(KviKvsObject_checkbox) public: - QWidget * widget() { return (QWidget *)object(); }; + TQWidget * widget() { return (TQWidget *)object(); }; protected: virtual bool init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams); bool function_setChecked(KviKvsObjectFunctionCall *c); diff --git a/src/modules/objects/class_combobox.cpp b/src/modules/objects/class_combobox.cpp index 9c8ffadf..38f4472a 100644 --- a/src/modules/objects/class_combobox.cpp +++ b/src/modules/objects/class_combobox.cpp @@ -28,8 +28,8 @@ #include "class_list.h" #include "class_combobox.h" -#include -#include +#include +#include /* @doc: combobox @@ -132,50 +132,50 @@ KVSO_END_CONSTRUCTOR(KviKvsObject_combobox) bool KviKvsObject_combobox::init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams) { - setObject(new QComboBox(parentScriptWidget(), name()), true); - connect (((QComboBox *)widget()),SIGNAL(activated( int )),this,SLOT(slotActivated( int ))); + setObject(TQT_TQOBJECT(new TQComboBox(tqparentScriptWidget(), name())), true); + connect (((TQComboBox *)widget()),TQT_SIGNAL(activated( int )),this,TQT_SLOT(slotActivated( int ))); return true; } bool KviKvsObject_combobox::functioninsertItem(KviKvsObjectFunctionCall *c) { kvs_int_t iIndex; - QString szItem; + TQString szItem; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("item",KVS_PT_STRING,0,szItem) KVSO_PARAMETER("index",KVS_PT_INT,KVS_PF_OPTIONAL,iIndex) KVSO_PARAMETERS_END(c) if(widget()) if(c->paramCount()==1) - ((QComboBox *)widget())->insertItem(szItem); + ((TQComboBox *)widget())->insertItem(szItem); else - ((QComboBox *)widget())->insertItem(szItem, iIndex); + ((TQComboBox *)widget())->insertItem(szItem, iIndex); return true; } bool KviKvsObject_combobox::functionclear(KviKvsObjectFunctionCall *c) { - if (widget()) ((QComboBox *)widget())->clear(); + if (widget()) ((TQComboBox *)widget())->clear(); return true; } bool KviKvsObject_combobox::functionchangeItem(KviKvsObjectFunctionCall *c) { kvs_uint_t uIndex,cnt; - QString szText; + TQString szText; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("text",KVS_PT_STRING,0,szText) KVSO_PARAMETER("index",KVS_PT_UNSIGNEDINTEGER,0,uIndex) KVSO_PARAMETERS_END(c) if(!widget()) return true; if (szText.isEmpty()) c->warning(__tr2qs("No string parameter given - using empty string")); - if(uIndex >= (cnt = ((QComboBox *)widget())->count())) + if(uIndex >= (cnt = ((TQComboBox *)widget())->count())) { c->warning(__tr2qs("Item index [%d] is too big - defaulting to " \ "$count() - 1 [%d]"), uIndex, cnt); uIndex = cnt - 1; } - ((QComboBox *)widget())->changeItem(szText, uIndex); + ((TQComboBox *)widget())->changeItem(szText, uIndex); return true; @@ -188,14 +188,14 @@ bool KviKvsObject_combobox::functionremoveItem(KviKvsObjectFunctionCall *c) KVSO_PARAMETER("index",KVS_PT_UNSIGNEDINTEGER,0,uIndex) KVSO_PARAMETERS_END(c) if(!widget()) return true; - if(uIndex >= (cnt = ((QComboBox *)widget())->count())) + if(uIndex >= (cnt = ((TQComboBox *)widget())->count())) { c->warning(__tr2qs("Item index [%d] is too big - defaulting to " \ "$count() - 1 [%d]"), uIndex, cnt); uIndex = cnt - 1; } - ((QComboBox *)widget())->removeItem(uIndex); + ((TQComboBox *)widget())->removeItem(uIndex); return true; @@ -204,37 +204,37 @@ bool KviKvsObject_combobox::functionsetMaxCount(KviKvsObjectFunctionCall *c) { kvs_uint_t iMax; - QString szText; + TQString szText; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("count",KVS_PT_UNSIGNEDINTEGER,0,iMax) KVSO_PARAMETERS_END(c) if(widget()) - ((QComboBox *)widget())->setMaxCount(iMax); + ((TQComboBox *)widget())->setMaxCount(iMax); return true; } bool KviKvsObject_combobox::functionmaxCount(KviKvsObjectFunctionCall *c) { - if (widget()) c->returnValue()->setInteger(((QComboBox *)widget())->maxCount()); + if (widget()) c->returnValue()->setInteger(((TQComboBox *)widget())->maxCount()); return true; } bool KviKvsObject_combobox::functioncount(KviKvsObjectFunctionCall *c) { - if (widget()) c->returnValue()->setInteger(((QComboBox *)widget())->count()); + if (widget()) c->returnValue()->setInteger(((TQComboBox *)widget())->count()); return true; } bool KviKvsObject_combobox::functioncurrent(KviKvsObjectFunctionCall *c) { - if (widget()) c->returnValue()->setString(((QComboBox *)widget())->currentText().local8Bit().data()); + if (widget()) c->returnValue()->setString(((TQComboBox *)widget())->currentText().local8Bit().data()); return true; } bool KviKvsObject_combobox::functioncurrentItem(KviKvsObjectFunctionCall *c) { - if (widget()) c->returnValue()->setInteger(((QComboBox *)widget())->currentItem()); + if (widget()) c->returnValue()->setInteger(((TQComboBox *)widget())->currentItem()); return true; } bool KviKvsObject_combobox::functiontextLineEdit(KviKvsObjectFunctionCall *c) { - if (widget()) c->returnValue()->setString(((QComboBox *)widget())->lineEdit()->text()); + if (widget()) c->returnValue()->setString(((TQComboBox *)widget())->lineEdit()->text()); return true; } @@ -246,34 +246,34 @@ bool KviKvsObject_combobox::functionsetEditable(KviKvsObjectFunctionCall *c) KVSO_PARAMETERS_END(c) if(widget()) { - ((QComboBox *)widget())->setEditable(bFlag); - if (bFlag) connect (((QComboBox *)widget())->lineEdit(),SIGNAL(textChanged(const QString & )),this,SLOT(slottextChanged(const QString & ))); + ((TQComboBox *)widget())->setEditable(bFlag); + if (bFlag) connect (((TQComboBox *)widget())->lineEdit(),TQT_SIGNAL(textChanged(const TQString & )),this,TQT_SLOT(slottextChanged(const TQString & ))); else - disconnect (((QComboBox *)widget())->lineEdit(),SIGNAL(textChanged(const QString & )),this,SLOT(slottextChanged(const QString & ))); + disconnect (((TQComboBox *)widget())->lineEdit(),TQT_SIGNAL(textChanged(const TQString & )),this,TQT_SLOT(slottextChanged(const TQString & ))); } return true; } bool KviKvsObject_combobox::functionsetTextLineEdit(KviKvsObjectFunctionCall *c) { - QString szText; + TQString szText; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("text",KVS_PT_STRING,0,szText) KVSO_PARAMETERS_END(c) if(widget()) - ((QComboBox *)widget())->lineEdit()->setText(szText); + ((TQComboBox *)widget())->lineEdit()->setText(szText); return true; } bool KviKvsObject_combobox::functioneditable(KviKvsObjectFunctionCall *c) { if(widget()) - c->returnValue()->setBoolean(((QComboBox *)widget())->editable()); + c->returnValue()->setBoolean(((TQComboBox *)widget())->editable()); return true; } bool KviKvsObject_combobox::functionsetEditText(KviKvsObjectFunctionCall *c) { - QString szText; + TQString szText; bool bQuiet=false; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("text",KVS_PT_STRING,0,szText) @@ -281,7 +281,7 @@ bool KviKvsObject_combobox::functionsetEditText(KviKvsObjectFunctionCall *c) KVSO_PARAMETERS_END(c) if(!widget()) return true; if (szText.isEmpty() && !bQuiet) c->warning("No string parameter given - using empty string"); - ((QComboBox *)widget())->setEditText(szText); + ((TQComboBox *)widget())->setEditText(szText); return true; } bool KviKvsObject_combobox::functiontextAt(KviKvsObjectFunctionCall *c) @@ -292,7 +292,7 @@ bool KviKvsObject_combobox::functiontextAt(KviKvsObjectFunctionCall *c) KVSO_PARAMETER("index",KVS_PT_UNSIGNEDINTEGER,0,uIndex) KVSO_PARAMETERS_END(c) if(widget()) - c->returnValue()->setString(((QComboBox *)widget())->text(uIndex)); + c->returnValue()->setString(((TQComboBox *)widget())->text(uIndex)); return true; } bool KviKvsObject_combobox::functionsetCurrentItem(KviKvsObjectFunctionCall *c) @@ -302,34 +302,34 @@ bool KviKvsObject_combobox::functionsetCurrentItem(KviKvsObjectFunctionCall *c) KVSO_PARAMETER("index",KVS_PT_UNSIGNEDINTEGER,0,uIndex) KVSO_PARAMETERS_END(c) if(widget()) - ((QComboBox *)widget())->setCurrentItem(uIndex); + ((TQComboBox *)widget())->setCurrentItem(uIndex); return true; } bool KviKvsObject_combobox::functionpopup(KviKvsObjectFunctionCall *c) { if(widget()) - ((QComboBox *)widget())->popup(); + ((TQComboBox *)widget())->popup(); return true; } bool KviKvsObject_combobox::functionsetInsertionPolicy(KviKvsObjectFunctionCall *c) { - QString szPolicy; + TQString szPolicy; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("policy",KVS_PT_STRING,0,szPolicy) KVSO_PARAMETERS_END(c) if(!widget()) return true; - if(KviQString::equalCI(szPolicy,"NoInsertion")) - ((QComboBox *)widget())->setInsertionPolicy(QComboBox::NoInsertion); - else if(KviQString::equalCI(szPolicy,"AtTop")) - ((QComboBox *)widget())->setInsertionPolicy(QComboBox::AtTop); - else if(KviQString::equalCI(szPolicy,"AtBotton")) - ((QComboBox *)widget())->setInsertionPolicy(QComboBox::AtBottom); - else if(KviQString::equalCI(szPolicy,"AtCurrent")) - ((QComboBox *)widget())->setInsertionPolicy(QComboBox::AtCurrent); - else if(KviQString::equalCI(szPolicy,"AfterCurrent")) - ((QComboBox *)widget())->setInsertionPolicy(QComboBox::AfterCurrent); - else if(KviQString::equalCI(szPolicy,"BeforeCurrent")) - ((QComboBox *)widget())->setInsertionPolicy(QComboBox::BeforeCurrent); + if(KviTQString::equalCI(szPolicy,"NoInsertion")) + ((TQComboBox *)widget())->setInsertionPolicy(TQComboBox::NoInsertion); + else if(KviTQString::equalCI(szPolicy,"AtTop")) + ((TQComboBox *)widget())->setInsertionPolicy(TQComboBox::AtTop); + else if(KviTQString::equalCI(szPolicy,"AtBotton")) + ((TQComboBox *)widget())->setInsertionPolicy(TQComboBox::AtBottom); + else if(KviTQString::equalCI(szPolicy,"AtCurrent")) + ((TQComboBox *)widget())->setInsertionPolicy(TQComboBox::AtCurrent); + else if(KviTQString::equalCI(szPolicy,"AfterCurrent")) + ((TQComboBox *)widget())->setInsertionPolicy(TQComboBox::AfterCurrent); + else if(KviTQString::equalCI(szPolicy,"BeforeCurrent")) + ((TQComboBox *)widget())->setInsertionPolicy(TQComboBox::BeforeCurrent); else c->warning(__tr2qs("Invalid insertion Policy %Q"),&szPolicy); return true; } @@ -344,7 +344,7 @@ bool KviKvsObject_combobox::functiontextChangedEvent(KviKvsObjectFunctionCall *c } -void KviKvsObject_combobox::slottextChanged(const QString &text) +void KviKvsObject_combobox::slottextChanged(const TQString &text) { KviKvsVariantList params(new KviKvsVariant(text)); callFunction(this,"textChangedEvent",¶ms); diff --git a/src/modules/objects/class_combobox.h b/src/modules/objects/class_combobox.h index d4da7c6b..906dee75 100644 --- a/src/modules/objects/class_combobox.h +++ b/src/modules/objects/class_combobox.h @@ -24,17 +24,18 @@ // -#include +#include #include "class_widget.h" #include "object_macros.h" class KviKvsObject_combobox : public KviKvsObject_widget { Q_OBJECT + TQ_OBJECT public: KVSO_DECLARE_OBJECT(KviKvsObject_combobox) public: - QWidget * widget() { return (QWidget *)object(); }; + TQWidget * widget() { return (TQWidget *)object(); }; protected: virtual bool init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams); @@ -64,7 +65,7 @@ protected: bool functiontextChangedEvent(KviKvsObjectFunctionCall *c); bool functionactivatedEvent(KviKvsObjectFunctionCall *c); protected slots: - void slottextChanged(const QString &); + void slottextChanged(const TQString &); void slotActivated(int); }; diff --git a/src/modules/objects/class_dialog.cpp b/src/modules/objects/class_dialog.cpp index f062f004..b5515a7c 100644 --- a/src/modules/objects/class_dialog.cpp +++ b/src/modules/objects/class_dialog.cpp @@ -29,7 +29,7 @@ #include "kvi_frame.h" #include "kvi_app.h" -#include +#include /* @@ -46,10 +46,10 @@ @description: Rappresents a dialog object. The class is really similar to the widget class, it has only a couple of minor differences. - A dialog is always a top-level widget, but if it has a parent, its default - location is centered on top of the parent. It will also share the parent's taskbar entry. + A dialog is always a top-level widget, but if it has a tqparent, its default + location is centered on top of the tqparent. It will also share the tqparent's taskbar entry. If you call $setModal(1) then the dialog will have non-blocking modal behaviour: - it will appear above its parent widget and block its input until it's closed. + it will appear above its tqparent widget and block its input until it's closed. @functions: */ @@ -68,11 +68,11 @@ KVSO_END_CONSTRUCTOR(KviKvsObject_dialog) bool KviKvsObject_dialog::init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams) { - QWidget * w = g_pApp->activeModalWidget(); + TQWidget * w = TQT_TQWIDGET(g_pApp->activeModalWidget()); if(!w)w = g_pFrame; - QDialog * d = new QDialog(parentScriptWidget() ? parentScriptWidget() : w,name()); + TQDialog * d = new TQDialog(tqparentScriptWidget() ? tqparentScriptWidget() : w,name()); //d->setModal(true); - setObject(d); + setObject(TQT_TQOBJECT(d)); return true; } bool KviKvsObject_dialog::functionSetModal(KviKvsObjectFunctionCall *c) @@ -82,7 +82,7 @@ bool KviKvsObject_dialog::functionSetModal(KviKvsObjectFunctionCall *c) KVSO_PARAMETER("bEnabled",KVS_PT_BOOL,0,bEnabled) KVSO_PARAMETERS_END(c) if(widget()) - ((QDialog *)widget())->setModal(bEnabled); + ((TQDialog *)widget())->setModal(bEnabled); return true; } diff --git a/src/modules/objects/class_dialog.h b/src/modules/objects/class_dialog.h index b284baf3..53a2bc77 100644 --- a/src/modules/objects/class_dialog.h +++ b/src/modules/objects/class_dialog.h @@ -24,7 +24,7 @@ #include "class_widget.h" -class QDialog; +class TQDialog; #include "object_macros.h" @@ -34,7 +34,7 @@ class KviKvsObject_dialog : public KviKvsObject_widget public: KVSO_DECLARE_OBJECT(KviKvsObject_dialog) public: - QWidget * widget() { return (QWidget *)object(); }; + TQWidget * widget() { return (TQWidget *)object(); }; protected: virtual bool init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams); bool functionSetModal(KviKvsObjectFunctionCall *c); diff --git a/src/modules/objects/class_dockwindow.cpp b/src/modules/objects/class_dockwindow.cpp index fc439b23..35d9c070 100644 --- a/src/modules/objects/class_dockwindow.cpp +++ b/src/modules/objects/class_dockwindow.cpp @@ -28,13 +28,13 @@ #include "kvi_locale.h" #include "kvi_qstring.h" #ifdef COMPILE_USE_QT4 - #include - #define QT_DOCK_WINDOW QDockWidget + #include + #define TQT_DOCK_WINDOW TQDockWidget #else - #include - #define QT_DOCK_WINDOW QDockWindow + #include + #define TQT_DOCK_WINDOW TQDockWindow #endif -#include +#include /* @doc: dockwindow @@ -49,11 +49,11 @@ [class]widget[/class] @description: A window dockable to the KVIrc main frame borders (like a toolbar). - The window has an implicit layout that will automatically manage - the children depending on the dock window's orientation. + The window has an implicit tqlayout that will automatically manage + the tqchildren depending on the dock window's orientation. @functions: !fn: $addWidget() - Adds to the internal layout of this dock window.[br] + Adds to the internal tqlayout of this dock window.[br] The widget must be a child of this dock window (otherwise strange things may happen). !fn: $orientation() Returns the string "vertical" or "horizontal" depending on the orientation of this dock window. @@ -92,16 +92,16 @@ KVSO_END_CONSTRUCTOR(KviKvsObject_dockwindow) KVSO_BEGIN_DESTRUCTOR(KviKvsObject_dockwindow) KVSO_END_DESTRUCTOR(KviKvsObject_dockwindow) -#define _pDockWindow ((QT_DOCK_WINDOW *)widget()) +#define _pDockWindow ((TQT_DOCK_WINDOW *)widget()) bool KviKvsObject_dockwindow::init(KviKvsRunTimeContext * pContext,KviKvsVariantList * pParams) { #ifdef COMPILE_USE_QT4 - QDockWidget * pWidget = new QDockWidget(g_pFrame); + TQDockWidget * pWidget = new TQDockWidget(g_pFrame); pWidget->setObjectName(getName()); setObject(pWidget); #else //!COMPILE_USE_QT4 - setObject(new QT_DOCK_WINDOW(g_pFrame,getName()),true); + setObject(TQT_TQOBJECT(new TQT_DOCK_WINDOW(g_pFrame,getName())),true); #endif //!COMPILE_USE_QT4 return true; } @@ -141,16 +141,16 @@ bool KviKvsObject_dockwindow::function_addWidget(KviKvsObjectFunctionCall *c) return true; } - if(((QWidget *)(pWidget->object()))->parent() != (QObject *)_pDockWindow) + if(((TQWidget *)(pWidget->object()))->tqparent() != (TQObject *)_pDockWindow) { c->warning(__tr2qs("The added widget is not a child of this dock window")); } #ifdef COMPILE_USE_QT4 - _pDockWindow->setWidget((QWidget *)(pWidget->object())); + _pDockWindow->setWidget((TQWidget *)(pWidget->object())); #else //!COMPILE_USE_QT4 - _pDockWindow->boxLayout()->addWidget((QWidget *)(pWidget->object())); - ((QWidget *)(pWidget->object()))->show(); + _pDockWindow->boxLayout()->addWidget((TQWidget *)(pWidget->object())); + ((TQWidget *)(pWidget->object()))->show(); #endif //!COMPILE_USE_QT4 return true; } @@ -159,23 +159,23 @@ bool KviKvsObject_dockwindow::function_orientation(KviKvsObjectFunctionCall * c) { if(!widget())return true; // hum ? dead ? #ifdef COMPILE_USE_QT4 - c->returnValue()->setString(QString("horizontal")); + c->returnValue()->setString(TQString("horizontal")); #else //!COMPILE_USE_QT4 - c->returnValue()->setString(_pDockWindow->orientation() == Qt::Horizontal ? QString("horizontal") : QString("vertical")); + c->returnValue()->setString(_pDockWindow->orientation() == Qt::Horizontal ? TQString("horizontal") : TQString("vertical")); #endif //!COMPILE_USE_QT4 return true; } bool KviKvsObject_dockwindow::function_setOrientation(KviKvsObjectFunctionCall * c) { - QString szOrientation; + TQString szOrientation; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("orientation",KVS_PT_NONEMPTYSTRING,0,szOrientation) KVSO_PARAMETERS_END(c) if(!widget())return true; // hum ? dead ? #ifndef COMPILE_USE_QT4 - _pDockWindow->setOrientation(KviQString::equalCI(szOrientation,"vertical") ? Qt::Vertical : Qt::Horizontal); + _pDockWindow->setOrientation(KviTQString::equalCI(szOrientation,"vertical") ? Qt::Vertical : Qt::Horizontal); #endif //!COMPILE_USE_QT4 return true; } @@ -208,7 +208,7 @@ bool KviKvsObject_dockwindow::function_setResizeEnabled(KviKvsObjectFunctionCall bool KviKvsObject_dockwindow::function_setAllowedDockAreas(KviKvsObjectFunctionCall * c) { - QString szFlags; + TQString szFlags; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("docks",KVS_PT_STRING,0,szFlags) KVSO_PARAMETERS_END(c) @@ -216,26 +216,26 @@ bool KviKvsObject_dockwindow::function_setAllowedDockAreas(KviKvsObjectFunctionC if(!widget())return true; // hum ? dead ? #ifdef COMPILE_USE_QT4 - Qt::DockWidgetAreas fAreas = Qt::NoDockWidgetArea; - if(szFlags.find('t',false))fAreas |= Qt::TopDockWidgetArea; - if(szFlags.find('l',false))fAreas |= Qt::LeftDockWidgetArea; - if(szFlags.find('r',false))fAreas |= Qt::RightDockWidgetArea; - if(szFlags.find('b',false))fAreas |= Qt::BottomDockWidgetArea; + TQt::DockWidgetAreas fAreas = TQt::NoDockWidgetArea; + if(szFlags.tqfind('t',false))fAreas |= TQt::TopDockWidgetArea; + if(szFlags.tqfind('l',false))fAreas |= TQt::LeftDockWidgetArea; + if(szFlags.tqfind('r',false))fAreas |= TQt::RightDockWidgetArea; + if(szFlags.tqfind('b',false))fAreas |= TQt::BottomDockWidgetArea; _pDockWindow->setAllowedAreas(fAreas); - QDockWidget::DockWidgetFeatures fFeatures = _pDockWindow->features(); - if(szFlags.find('f',false)) - fFeatures |= QDockWidget::DockWidgetFloatable; + TQDockWidget::DockWidgetFeatures fFeatures = _pDockWindow->features(); + if(szFlags.tqfind('f',false)) + fFeatures |= TQDockWidget::DockWidgetFloatable; else - fFeatures &= ~QDockWidget::DockWidgetFloatable; + fFeatures &= ~TQDockWidget::DockWidgetFloatable; // no support for minimized dock widgets _pDockWindow->setFeatures(fFeatures); #else //!COMPILE_USE_QT4 - g_pFrame->setDockEnabled(_pDockWindow,Qt::DockTop,szFlags.find('t',false) != -1); - g_pFrame->setDockEnabled(_pDockWindow,Qt::DockLeft,szFlags.find('l',false) != -1); - g_pFrame->setDockEnabled(_pDockWindow,Qt::DockRight,szFlags.find('r',false) != -1); - g_pFrame->setDockEnabled(_pDockWindow,Qt::DockBottom,szFlags.find('b',false) != -1); - g_pFrame->setDockEnabled(_pDockWindow,Qt::DockTornOff,szFlags.find('f',false) != -1); - g_pFrame->setDockEnabled(_pDockWindow,Qt::DockMinimized,szFlags.find('m',false) != -1); + g_pFrame->setDockEnabled(_pDockWindow,TQt::DockTop,szFlags.tqfind('t',false) != -1); + g_pFrame->setDockEnabled(_pDockWindow,TQt::DockLeft,szFlags.tqfind('l',false) != -1); + g_pFrame->setDockEnabled(_pDockWindow,TQt::DockRight,szFlags.tqfind('r',false) != -1); + g_pFrame->setDockEnabled(_pDockWindow,TQt::DockBottom,szFlags.tqfind('b',false) != -1); + g_pFrame->setDockEnabled(_pDockWindow,TQt::DockTornOff,szFlags.tqfind('f',false) != -1); + g_pFrame->setDockEnabled(_pDockWindow,TQt::DockMinimized,szFlags.tqfind('m',false) != -1); #endif //!COMPILE_USE_QT4 return true; @@ -244,7 +244,7 @@ bool KviKvsObject_dockwindow::function_setAllowedDockAreas(KviKvsObjectFunctionC bool KviKvsObject_dockwindow::function_dock(KviKvsObjectFunctionCall * c) { - QString szDock; + TQString szDock; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("dock",KVS_PT_STRING,0,szDock) KVSO_PARAMETERS_END(c) @@ -252,22 +252,22 @@ bool KviKvsObject_dockwindow::function_dock(KviKvsObjectFunctionCall * c) if(!widget())return true; // hum ? dead ? #ifdef COMPILE_USE_QT4 g_pFrame->removeDockWidget(_pDockWindow); - if(szDock.find('m',false) == -1)_pDockWindow->setFloating(false); - if(szDock.find('t',false) != -1)g_pFrame->addDockWidget(Qt::TopDockWidgetArea,_pDockWindow); - else if(szDock.find('l',false) != -1)g_pFrame->addDockWidget(Qt::LeftDockWidgetArea,_pDockWindow); - else if(szDock.find('r',false) != -1)g_pFrame->addDockWidget(Qt::RightDockWidgetArea,_pDockWindow); - else if(szDock.find('b',false) != -1)g_pFrame->addDockWidget(Qt::BottomDockWidgetArea,_pDockWindow); - else if(szDock.find('f',false) != -1)_pDockWindow->setFloating(true); - else if(szDock.find('m',false) != -1)qDebug("Sorry: no support for minimized dock widgets in Qt4"); + if(szDock.tqfind('m',false) == -1)_pDockWindow->setFloating(false); + if(szDock.tqfind('t',false) != -1)g_pFrame->addDockWidget(TQt::TopDockWidgetArea,_pDockWindow); + else if(szDock.tqfind('l',false) != -1)g_pFrame->addDockWidget(TQt::LeftDockWidgetArea,_pDockWindow); + else if(szDock.tqfind('r',false) != -1)g_pFrame->addDockWidget(TQt::RightDockWidgetArea,_pDockWindow); + else if(szDock.tqfind('b',false) != -1)g_pFrame->addDockWidget(TQt::BottomDockWidgetArea,_pDockWindow); + else if(szDock.tqfind('f',false) != -1)_pDockWindow->setFloating(true); + else if(szDock.tqfind('m',false) != -1)qDebug("Sorry: no support for minimized dock widgets in TQt4"); else c->warning(__tr2qs("Invalid dock area specified")); #else //!COMPILE_USE_QT4 - if(szDock.find('t',false) != -1)g_pFrame->moveDockWindow(_pDockWindow,Qt::DockTop,false,100); - else if(szDock.find('l',false) != -1)g_pFrame->moveDockWindow(_pDockWindow,Qt::DockLeft,false,100); - else if(szDock.find('r',false) != -1)g_pFrame->moveDockWindow(_pDockWindow,Qt::DockRight,false,100); - else if(szDock.find('b',false) != -1)g_pFrame->moveDockWindow(_pDockWindow,Qt::DockBottom,false,100); - else if(szDock.find('f',false) != -1)g_pFrame->moveDockWindow(_pDockWindow,Qt::DockTornOff,false,100); - else if(szDock.find('m',false) != -1)g_pFrame->moveDockWindow(_pDockWindow,Qt::DockMinimized,false,100); + if(szDock.tqfind('t',false) != -1)g_pFrame->moveDockWindow(_pDockWindow,TQt::DockTop,false,100); + else if(szDock.tqfind('l',false) != -1)g_pFrame->moveDockWindow(_pDockWindow,TQt::DockLeft,false,100); + else if(szDock.tqfind('r',false) != -1)g_pFrame->moveDockWindow(_pDockWindow,TQt::DockRight,false,100); + else if(szDock.tqfind('b',false) != -1)g_pFrame->moveDockWindow(_pDockWindow,TQt::DockBottom,false,100); + else if(szDock.tqfind('f',false) != -1)g_pFrame->moveDockWindow(_pDockWindow,TQt::DockTornOff,false,100); + else if(szDock.tqfind('m',false) != -1)g_pFrame->moveDockWindow(_pDockWindow,TQt::DockMinimized,false,100); else c->warning(__tr2qs("Invalid dock area specified")); #endif //!COMPILE_USE_QT4 return true; diff --git a/src/modules/objects/class_dockwindow.h b/src/modules/objects/class_dockwindow.h index 4576a43d..9ed8f60c 100644 --- a/src/modules/objects/class_dockwindow.h +++ b/src/modules/objects/class_dockwindow.h @@ -32,6 +32,7 @@ class KviKvsObject_dockwindow : public KviKvsObject_widget { Q_OBJECT + TQ_OBJECT public: KVSO_DECLARE_OBJECT(KviKvsObject_dockwindow) protected: diff --git a/src/modules/objects/class_file.cpp b/src/modules/objects/class_file.cpp index 3429278e..9e966a6e 100644 --- a/src/modules/objects/class_file.cpp +++ b/src/modules/objects/class_file.cpp @@ -20,7 +20,7 @@ // Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // -//#warning "Add QFILEINFO to this stuff ?" +//#warning "Add TQFILEINFO to this stuff ?" #include "class_file.h" #include "kvi_debug.h" @@ -28,7 +28,7 @@ #include "kvi_locale.h" #include "kvi_error.h" #include "kvi_fileutils.h" -#include +#include // needed for $open() @@ -41,13 +41,13 @@ const char * const mod_tbl[] = { "Truncate" }; #ifdef COMPILE_USE_QT4 -#define IO_RAW QIODevice::Unbuffered -#define IO_READONLY QIODevice::ReadOnly -#define IO_WRITEONLY QIODevice::WriteOnly -#define IO_READWRITE QIODevice::ReadWrite -#define IO_APPEND QIODevice::Append -#define IO_TRUNCATE QIODevice::Truncate -//#define IO_TRANSLATE QIODevice::Text +#define IO_RAW TQIODevice::Unbuffered +#define IO_READONLY TQIODevice::ReadOnly +#define IO_WRITEONLY TQIODevice::WriteOnly +#define IO_READWRITE TQIODevice::ReadWrite +#define IO_APPEND TQIODevice::Append +#define IO_TRUNCATE TQIODevice::Truncate +//#define IO_TRANSLATE TQIODevice::Text #else #define IO_RAW IO_Raw #define IO_READONLY IO_ReadOnly @@ -57,7 +57,7 @@ const char * const mod_tbl[] = { #define IO_TRUNCATE IO_Truncate #endif #ifdef COMPILE_USE_QT4 -const QIODevice::OpenMode mod_cod[] = { +const TQIODevice::OpenMode mod_cod[] = { #else const int mod_cod[] = { #endif @@ -189,7 +189,7 @@ KVSO_BEGIN_REGISTERCLASS(KviKvsObject_file,"file","object") KVSO_END_REGISTERCLASS(KviKvsObject_file) KVSO_BEGIN_CONSTRUCTOR(KviKvsObject_file,KviKvsObject) - m_pFile = new QFile(); + m_pFile = new TQFile(); KVSO_END_CONSTRUCTOR(KviKvsObject_file) KVSO_BEGIN_DESTRUCTOR(KviKvsObject_file) @@ -201,7 +201,7 @@ KVSO_END_CONSTRUCTOR(KviKvsObject_file) bool KviKvsObject_file::functionsetName(KviKvsObjectFunctionCall *c) { - QString szName; + TQString szName; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("file_name",KVS_PT_STRING,0,szName) KVSO_PARAMETERS_END(c) @@ -216,7 +216,7 @@ bool KviKvsObject_file::functionname(KviKvsObjectFunctionCall *c) bool KviKvsObject_file::functionopen(KviKvsObjectFunctionCall *c) { - QStringList modes; + TQStringList modes; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("file_mode",KVS_PT_STRINGLIST,KVS_PF_OPTIONAL,modes) KVSO_PARAMETERS_END(c) @@ -227,7 +227,7 @@ bool KviKvsObject_file::functionopen(KviKvsObjectFunctionCall *c) return true; } #ifdef COMPILE_USE_QT4 - QIODevice::OpenMode mod,sum; + TQIODevice::OpenMode mod,sum; if (modes.empty()) sum = IO_READONLY; // if no parameters given, default to ReadWrite | Append else { @@ -236,7 +236,7 @@ bool KviKvsObject_file::functionopen(KviKvsObjectFunctionCall *c) mod = IO_ReadOnly; for(unsigned int j = 0; j < mod_num; j++) { - if(KviQString::equalCI(modes.at(idx), mod_tbl[j])) + if(KviTQString::equalCI(modes.at(idx), mod_tbl[j])) { mod=mod_cod[j]; break; @@ -253,13 +253,13 @@ bool KviKvsObject_file::functionopen(KviKvsObjectFunctionCall *c) if (!modes.first()) sum = IO_READONLY; // if no parameters given, default to ReadWrite | Append else { - for ( QStringList::Iterator it = modes.begin(); it != modes.end(); ++it ) + for ( TQStringList::Iterator it = modes.begin(); it != modes.end(); ++it ) { mod = 0; for(unsigned int j = 0; j < mod_num; j++) { - if(KviQString::equalCI((*it), mod_tbl[j])) + if(KviTQString::equalCI((*it), mod_tbl[j])) { mod=mod_cod[j]; break; @@ -328,7 +328,7 @@ bool KviKvsObject_file::functionseek(KviKvsObjectFunctionCall *c) bool KviKvsObject_file::functionputch(KviKvsObjectFunctionCall *c) { - QString szChar; + TQString szChar; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("char",KVS_PT_STRING,KVS_PF_OPTIONAL,szChar) KVSO_PARAMETERS_END(c) @@ -350,14 +350,14 @@ bool KviKvsObject_file::functiongetch(KviKvsObjectFunctionCall *c) { int chInt=m_pFile->getch(); if (chInt<0) c->warning(__tr("Read error occured !")); // c->error ? - QString szChar = QChar(chInt); + TQString szChar = TQChar(chInt); c->returnValue()->setString(szChar); } return true; } bool KviKvsObject_file::functionunGetch(KviKvsObjectFunctionCall *c) { - QString szChar; + TQString szChar; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("char",KVS_PT_STRING,0,szChar) KVSO_PARAMETERS_END(c) @@ -384,10 +384,10 @@ bool KviKvsObject_file::functionreadBlock(KviKvsObjectFunctionCall *c) else { char * buff = new char[uLen + 1]; - m_pFile->flush(); // advice from QFile man page (to avoid trash) + m_pFile->flush(); // advice from TQFile man page (to avoid trash) int rlen = m_pFile->readBlock(buff, uLen); buff[rlen] = '\0'; - QString szBlock(buff); + TQString szBlock(buff); c->returnValue()->setString(szBlock); } return true; @@ -395,7 +395,7 @@ bool KviKvsObject_file::functionreadBlock(KviKvsObjectFunctionCall *c) bool KviKvsObject_file::functionwriteBlock(KviKvsObjectFunctionCall *c) { - QString szBlock; + TQString szBlock; kvs_uint_t uLen; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("lenght",KVS_PT_UNSIGNEDINTEGER,0,uLen) @@ -417,7 +417,7 @@ bool KviKvsObject_file::functionreadLine(KviKvsObjectFunctionCall *c) c->warning(__tr("File is not open !")); else { - QString buffer; + TQString buffer; KviFileUtils::readLine(m_pFile,buffer); c->returnValue()->setString(buffer); } @@ -425,7 +425,7 @@ bool KviKvsObject_file::functionreadLine(KviKvsObjectFunctionCall *c) } bool KviKvsObject_file::functionwriteLine(KviKvsObjectFunctionCall *c) { - QString szLine; + TQString szLine; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("text_line",KVS_PT_STRING,0,szLine) KVSO_PARAMETERS_END(c) @@ -434,7 +434,7 @@ bool KviKvsObject_file::functionwriteLine(KviKvsObjectFunctionCall *c) c->warning(__tr("File is not open !")); else { - QTextStream ts(m_pFile); + TQTextStream ts(m_pFile); ts << szLine; } return true; diff --git a/src/modules/objects/class_file.h b/src/modules/objects/class_file.h index 01a54d19..aa99bb69 100644 --- a/src/modules/objects/class_file.h +++ b/src/modules/objects/class_file.h @@ -24,8 +24,8 @@ -#include -#include +#include +#include #include "kvi_string.h" @@ -36,6 +36,7 @@ class KviParameterList; class KviScriptFileObject : public KviScriptObject { Q_OBJECT + TQ_OBJECT public: KviScriptFileObject(KviScriptObjectClass *, KviScriptObject *, const char *); virtual ~KviScriptFileObject(); @@ -53,9 +54,9 @@ protected: bool functionSize(KviCommand *, KviParameterList *, KviStr &); bool functionAtEnd(KviCommand *, KviParameterList *, KviStr &); - // int QFile at() const + // int TQFile at() const bool functionWhere(KviCommand *, KviParameterList *, KviStr &); - // void QFile at(int) + // void TQFile at(int) bool functionSeek(KviCommand *, KviParameterList *, KviStr &); bool functionPutch(KviCommand *, KviParameterList *, KviStr &); bool functionGetch(KviCommand *, KviParameterList *, KviStr &); @@ -70,7 +71,7 @@ protected: bool functionHexRead(KviCommand *, KviParameterList *, KviStr &); protected: - QFile * m_pFile; + TQFile * m_pFile; }; */ @@ -91,9 +92,9 @@ protected: bool functionsize(KviKvsObjectFunctionCall *c); bool functionatEnd(KviKvsObjectFunctionCall *c); - // int QFile at() const + // int TQFile at() const bool functionwhere(KviKvsObjectFunctionCall *c); - // void QFile at(int) + // void TQFile at(int) bool functionseek(KviKvsObjectFunctionCall *c); bool functionputch(KviKvsObjectFunctionCall *c); bool functiongetch(KviKvsObjectFunctionCall *c); @@ -108,6 +109,6 @@ protected: bool functionHexRead(KviKvsObjectFunctionCall *c); */ protected: - QFile * m_pFile; + TQFile * m_pFile; }; #endif // !_CLASS_FILE_H_ diff --git a/src/modules/objects/class_groupbox.cpp b/src/modules/objects/class_groupbox.cpp index 14e640d1..023d1e25 100644 --- a/src/modules/objects/class_groupbox.cpp +++ b/src/modules/objects/class_groupbox.cpp @@ -29,7 +29,7 @@ #include "kvi_locale.h" #include "kvi_iconmanager.h" -// Tables used in $setAlignment , $alignment and in $setOrientation & $orientation +// Tables used in $tqsetAlignment , $tqalignment and in $setOrientation & $orientation const char * const align_tbl[] = { "Left", @@ -37,9 +37,9 @@ const char * const align_tbl[] = { "HCenter" }; const int align_cod[] = { - Qt::AlignLeft, - Qt::AlignRight, - Qt::AlignHCenter + TQt::AlignLeft, + TQt::AlignRight, + TQt::AlignHCenter }; #define align_num (sizeof(align_tbl) / sizeof(align_tbl[0])) @@ -59,9 +59,9 @@ const int align_cod[] = { [class]widget[/class] @description: This widget can be used to display a groupbox. - It will be usually a parent for other child controls. - You can either use a child layout to manage the children geometries - or use $setColumnLayout to manage the layout automatically. + It will be usually a tqparent for other child controls. + You can either use a child tqlayout to manage the tqchildren geometries + or use $setColumnLayout to manage the tqlayout automatically. @functions: !fn: $setTitle() Sets the group box title to . @@ -89,15 +89,15 @@ const int align_cod[] = { Returns the number of columns or rows in the groupbox. !fn: $addSpace() Adds an empty cell at the next free position. - !fn: $alignment() - Returns the alignment of the group box title. - !fn: $setAlignment() - Set the alignment of the groupbox; Valid values are Left,Right,HCenter. + !fn: $tqalignment() + Returns the tqalignment of the group box title. + !fn: $tqsetAlignment() + Set the tqalignment of the groupbox; Valid values are Left,Right,HCenter. !fn: $setOrientation - Sets the group box's orientation. Valid values are: Horizontal, Vertical. + Sets the group box's orientation. Valid values are:Qt::Horizontal,Qt::Vertical. !fn: $setColumnLayout(,) - Enables the automatic layout management. The children are arranged in n columns with the specified orientation.[br] - Valid values for are: Horizontal, Vertical. + Enables the automatic tqlayout management. The tqchildren are arranged in n columns with the specified orientation.[br] + Valid values for are:Qt::Horizontal,Qt::Vertical. @examples: [example] |-Start:[br] @@ -108,7 +108,7 @@ const int align_cod[] = { #then the groupbox [br] %gb=$new(groupbox,%widget)[br] %gb->$setTitle(Login)[br] - %gb->$setAlignment("Left")[br] + %gb->$tqsetAlignment("Left")[br] [br] #now we create the labels and lineedits.[br] %labeluser=$new(label,%gb)[br] @@ -119,31 +119,31 @@ const int align_cod[] = { %inputpass=$new(lineedit,%gb)[br] %inputpass->$setechomode("password")[br] [br] - #now lets' layouting the groupbox's element's.[br] - %layoutgb=$new(layout,%gb)[br] - %layoutgb->$setmargin(20)[br] - %layoutgb->$addwidget(%labeluser,0,0)[br] - %layoutgb->$addwidget(%labelpass,1,0)[br] - %layoutgb->$addwidget(%inputuser,0,1)[br] - %layoutgb->$addwidget(%inputpass,1,1)[br] + #now lets' tqlayouting the groupbox's element's.[br] + %tqlayoutgb=$new(tqlayout,%gb)[br] + %tqlayoutgb->$setmargin(20)[br] + %tqlayoutgb->$addwidget(%labeluser,0,0)[br] + %tqlayoutgb->$addwidget(%labelpass,1,0)[br] + %tqlayoutgb->$addwidget(%inputuser,0,1)[br] + %tqlayoutgb->$addwidget(%inputpass,1,1)[br] [br] - # now we create a fake widget and managing the two buttons layout.[br] + # now we create a fake widget and managing the two buttons tqlayout.[br] %fakewidget=$new(widget,%widget)[br] - %layoutbtn=$new(layout,%fakewidget)[br] + %tqlayoutbtn=$new(tqlayout,%fakewidget)[br] %btnok=$new(button,%fakewidget)[br] %btnok->$settext("OK")[br] %btncancel=$new(button,%fakewidget)[br] %btncancel->$settext("Cancel")[br] - %layoutbtn->$addwidget(%btnok,0,0)[br] - %layoutbtn->$addwidget(%btncancel,0,1)[br] + %tqlayoutbtn->$addwidget(%btnok,0,0)[br] + %tqlayoutbtn->$addwidget(%btncancel,0,1)[br] [br] - #And finally we create a main layout with the groupbox (and its "children")[br] - #and fakewiget (with its buttons children). - %mainlayout=$new(layout,%widget)[br] - %mainlayout->$setspacing(10)[br] - %mainlayout->$setmargin(10)[br] - %mainlayout->$addwidget(%gb,0,0)[br] - %mainlayout->$addwidget(%fakewidget,1,0)[br] + #And finally we create a main tqlayout with the groupbox (and its "tqchildren")[br] + #and fakewiget (with its buttons tqchildren). + %maintqlayout=$new(tqlayout,%widget)[br] + %maintqlayout->$setspacing(10)[br] + %maintqlayout->$setmargin(10)[br] + %maintqlayout->$addwidget(%gb,0,0)[br] + %maintqlayout->$addwidget(%fakewidget,1,0)[br] [br] #Let's show our nice login request =D ! [br] %widget->$show()[br] @@ -165,8 +165,8 @@ KVSO_BEGIN_REGISTERCLASS(KviKvsObject_groupbox,"groupbox","widget") KVSO_REGISTER_HANDLER(KviKvsObject_groupbox,"setColumns", functionSetColumns) KVSO_REGISTER_HANDLER(KviKvsObject_groupbox,"columns", functionColumns) KVSO_REGISTER_HANDLER(KviKvsObject_groupbox,"addSpace", functionAddSpace) - KVSO_REGISTER_HANDLER(KviKvsObject_groupbox,"alignment", functionAlignment) - KVSO_REGISTER_HANDLER(KviKvsObject_groupbox,"setAlignment", functionSetAlignment) + KVSO_REGISTER_HANDLER(KviKvsObject_groupbox,"tqalignment", functionAlignment) + KVSO_REGISTER_HANDLER(KviKvsObject_groupbox,"tqsetAlignment", functionSetAlignment) KVSO_REGISTER_HANDLER(KviKvsObject_groupbox,"setOrientation", functionSetOrientation) KVSO_REGISTER_HANDLER(KviKvsObject_groupbox,"isChecked", functionIsChecked) KVSO_REGISTER_HANDLER(KviKvsObject_groupbox,"setChecked", functionSetChecked) @@ -185,18 +185,18 @@ KVSO_END_CONSTRUCTOR(KviKvsObject_groupbox) bool KviKvsObject_groupbox::init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams) { #ifdef COMPILE_USE_QT4 - KviTalGroupBox *groupbox=new KviTalGroupBox(name(),parentScriptWidget()); + KviTalGroupBox *groupbox=new KviTalGroupBox(name(),tqparentScriptWidget()); groupbox->setObjectName(name()); setObject(groupbox,true); #else - setObject(new KviTalGroupBox(name(),parentScriptWidget()), true); + setObject(TQT_TQOBJECT(new KviTalGroupBox(name(),tqparentScriptWidget())), true); #endif return true; } bool KviKvsObject_groupbox::functionSetTitle(KviKvsObjectFunctionCall *c) { - QString szTitle; + TQString szTitle; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("title",KVS_PT_STRING,0,szTitle) KVSO_PARAMETERS_END(c) @@ -308,26 +308,26 @@ bool KviKvsObject_groupbox::functionAddSpace(KviKvsObjectFunctionCall *c) bool KviKvsObject_groupbox::functionSetAlignment(KviKvsObjectFunctionCall *c) { - QString szAlign; + TQString szAlign; KVSO_PARAMETERS_BEGIN(c) - KVSO_PARAMETER("alignment",KVS_PT_STRING,0,szAlign) + KVSO_PARAMETER("tqalignment",KVS_PT_STRING,0,szAlign) KVSO_PARAMETERS_END(c) if (!widget()) return true; for(unsigned int i = 0; i < align_num; i++) { - if(KviQString::equalCI(szAlign, align_tbl[i])) + if(KviTQString::equalCI(szAlign, align_tbl[i])) { - ((KviTalGroupBox *)widget())->setAlignment(align_cod[i]); + ((KviTalGroupBox *)widget())->tqsetAlignment(align_cod[i]); return true; } } - c->warning(__tr2qs("Unknown alignment")); + c->warning(__tr2qs("Unknown tqalignment")); return true; } bool KviKvsObject_groupbox::functionAlignment(KviKvsObjectFunctionCall *c) { - int mode = ((KviTalGroupBox *)widget())->alignment(); - QString szAlignment=""; + int mode = ((KviTalGroupBox *)widget())->tqalignment(); + TQString szAlignment=""; for(unsigned int i = 0; i < align_num; i++) { if(mode == align_cod[i]) @@ -342,15 +342,15 @@ bool KviKvsObject_groupbox::functionAlignment(KviKvsObjectFunctionCall *c) bool KviKvsObject_groupbox::functionSetOrientation(KviKvsObjectFunctionCall *c) { - QString szMode; + TQString szMode; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("orientation",KVS_PT_STRING,0,szMode) KVSO_PARAMETERS_END(c) if(!widget())return true; - if(KviQString::equalCI(szMode, "Horizontal")) + if(KviTQString::equalCI(szMode, "Horizontal")) ((KviTalGroupBox *)widget())->setOrientation(Qt::Horizontal); else - if(KviQString::equalCI(szMode, "Vertical")) + if(KviTQString::equalCI(szMode, "Vertical")) ((KviTalGroupBox *)widget())->setOrientation(Qt::Vertical); else c->warning( __tr2qs("Unknown orientation: ")); return true; @@ -358,7 +358,7 @@ bool KviKvsObject_groupbox::functionSetOrientation(KviKvsObjectFunctionCall *c) bool KviKvsObject_groupbox::functionSetColumnLayout(KviKvsObjectFunctionCall *c) { - QString szMode; + TQString szMode; kvs_uint_t uCol; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("columns",KVS_PT_UNSIGNEDINTEGER,0,uCol) diff --git a/src/modules/objects/class_groupbox.h b/src/modules/objects/class_groupbox.h index c63bb46b..25ff2d90 100644 --- a/src/modules/objects/class_groupbox.h +++ b/src/modules/objects/class_groupbox.h @@ -34,7 +34,7 @@ class KviKvsObject_groupbox : public KviKvsObject_widget public: KVSO_DECLARE_OBJECT(KviKvsObject_groupbox) public: - QWidget * widget() { return (QWidget *)object(); }; + TQWidget * widget() { return (TQWidget *)object(); }; protected: virtual bool init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams); diff --git a/src/modules/objects/class_hbox.cpp b/src/modules/objects/class_hbox.cpp index 48174312..cf855640 100644 --- a/src/modules/objects/class_hbox.cpp +++ b/src/modules/objects/class_hbox.cpp @@ -35,16 +35,16 @@ @type: class @short: - Manages child widget horizontal geometry + Manages child widget horizontal tqgeometry @inherits: [class]object[/class] @description: - The hbox class widget provides horizontal geometry management for its child widgets. + The hbox class widget provides horizontal tqgeometry management for its child widgets. @functions: !fn: $setSpacing() Sets the default spacing of the widgets in pixels !fn: $setMargin() - Sets the dimension of the layout margin : the distance from the border to the outermost child widget edges. + Sets the dimension of the tqlayout margin : the distance from the border to the outermost child widget edges. !fn: $setStretchFactor(,) Sets the stretch factor of widget to stretch. */ @@ -68,7 +68,7 @@ KVSO_END_CONSTRUCTOR(KviKvsObject_hbox) bool KviKvsObject_hbox::init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams) { - setObject(new KviTalHBox(parentScriptWidget()), true); + setObject(TQT_TQOBJECT(new KviTalHBox(tqparentScriptWidget())), true); return true; } bool KviKvsObject_hbox::functionsetMargin(KviKvsObjectFunctionCall *c) @@ -116,12 +116,12 @@ bool KviKvsObject_hbox::functionsetStretchFactor(KviKvsObjectFunctionCall *c) c->warning(__tr2qs("Can't add a non-widget object")); return true; } - if(((KviKvsObject_widget *)pObject)->widget()->parentWidget() != widget()) + if(((KviKvsObject_widget *)pObject)->widget()->tqparentWidget() != widget()) { c->warning(__tr2qs("The widget must be a child of this hbox")); return true; } - ((KviTalHBox *)widget())->setStretchFactor(((QWidget *)(pObject->object())),uStretch); + ((KviTalHBox *)widget())->setStretchFactor(((TQWidget *)(pObject->object())),uStretch); return true; } diff --git a/src/modules/objects/class_hbox.h b/src/modules/objects/class_hbox.h index c0489f28..194ed355 100644 --- a/src/modules/objects/class_hbox.h +++ b/src/modules/objects/class_hbox.h @@ -32,7 +32,7 @@ class KviKvsObject_hbox : public KviKvsObject_widget public: KVSO_DECLARE_OBJECT(KviKvsObject_hbox) public: - QWidget * widget() { return (QWidget *)object(); }; + TQWidget * widget() { return (TQWidget *)object(); }; protected: virtual bool init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams); diff --git a/src/modules/objects/class_label.cpp b/src/modules/objects/class_label.cpp index 9c629818..fcde9a18 100644 --- a/src/modules/objects/class_label.cpp +++ b/src/modules/objects/class_label.cpp @@ -21,9 +21,9 @@ // Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // -#include -#include -#include +#include +#include +#include #include "class_label.h" //#include "kvi_fileutils.h" #include "kvi_error.h" @@ -34,7 +34,7 @@ -// Tables used in $setAlignment & $alignment +// Tables used in $tqsetAlignment & $tqalignment const char * const align_tbl[] = { "Left", "Right", @@ -46,34 +46,34 @@ const char * const align_tbl[] = { "WordBreak" }; #ifdef COMPILE_USE_QT4 - #define QT_LABEL_ALIGNLEFT Qt::AlignLeft - #define QT_LABEL_ALIGNRIGHT Qt::AlignRight - #define QT_LABEL_ALIGNHCENTER Qt::AlignHCenter - #define QT_LABEL_ALIGNVCENTER Qt::AlignVCenter - #define QT_LABEL_ALIGNCENTER Qt::AlignCenter - #define QT_LABEL_ALIGNTOP Qt::AlignTop - #define QT_LABEL_ALIGNBOTTOM Qt::AlignBottom - #define QT_LABEL_JUSTIFY Qt::AlignJustify + #define TQT_LABEL_ALIGNLEFT TQt::AlignLeft + #define TQT_LABEL_ALIGNRIGHT TQt::AlignRight + #define TQT_LABEL_ALIGNHCENTER TQt::AlignHCenter + #define TQT_LABEL_ALIGNVCENTER TQt::AlignVCenter + #define TQT_LABEL_ALIGNCENTER TQt::AlignCenter + #define TQT_LABEL_ALIGNTOP TQt::AlignTop + #define TQT_LABEL_ALIGNBOTTOM TQt::AlignBottom + #define TQT_LABEL_JUSTIFY TQt::AlignJustify #else - #define QT_LABEL_ALIGNLEFT QLabel::AlignLeft - #define QT_LABEL_ALIGNRIGHT QLabel::AlignRight - #define QT_LABEL_ALIGNHCENTER QLabel::AlignHCenter - #define QT_LABEL_ALIGNVCENTER QLabel::AlignVCenter - #define QT_LABEL_ALIGNCENTER QLabel::AlignCenter - #define QT_LABEL_ALIGNTOP QLabel::AlignTop - #define QT_LABEL_ALIGNBOTTOM QLabel::AlignBottom - #define QT_LABEL_JUSTIFY QLabel::WordBreak + #define TQT_LABEL_ALIGNLEFT TQLabel::AlignLeft + #define TQT_LABEL_ALIGNRIGHT TQLabel::AlignRight + #define TQT_LABEL_ALIGNHCENTER TQLabel::AlignHCenter + #define TQT_LABEL_ALIGNVCENTER TQLabel::AlignVCenter + #define TQT_LABEL_ALIGNCENTER TQLabel::AlignCenter + #define TQT_LABEL_ALIGNTOP TQLabel::AlignTop + #define TQT_LABEL_ALIGNBOTTOM TQLabel::AlignBottom + #define TQT_LABEL_JUSTIFY TQLabel::WordBreak #endif const int align_cod[] = { - QT_LABEL_ALIGNLEFT, - QT_LABEL_ALIGNRIGHT, - QT_LABEL_ALIGNHCENTER, - QT_LABEL_ALIGNVCENTER, - QT_LABEL_ALIGNCENTER, - QT_LABEL_ALIGNTOP, - QT_LABEL_ALIGNBOTTOM, - QT_LABEL_JUSTIFY, + TQT_LABEL_ALIGNLEFT, + TQT_LABEL_ALIGNRIGHT, + TQT_LABEL_ALIGNHCENTER, + TQT_LABEL_ALIGNVCENTER, + TQT_LABEL_ALIGNCENTER, + TQT_LABEL_ALIGNTOP, + TQT_LABEL_ALIGNBOTTOM, + TQT_LABEL_JUSTIFY, }; #define align_num (sizeof(align_tbl) / sizeof(align_tbl[0])) @@ -92,14 +92,14 @@ const char * const frame_tbl[] = { }; const int frame_cod[] = { - QFrame::NoFrame, - QFrame::Box, - QFrame::Panel, - QFrame::WinPanel, - QFrame::HLine, - QFrame::Plain, - QFrame::Raised, - QFrame::Sunken + TQFrame::NoFrame, + TQFrame::Box, + TQFrame::Panel, + TQFrame::WinPanel, + TQFrame::HLine, + TQFrame::Plain, + TQFrame::Raised, + TQFrame::Sunken }; #define frame_num (sizeof(frame_tbl) / sizeof(frame_tbl[0])) @@ -120,7 +120,7 @@ const int frame_cod[] = { [class]widget[/class] @description: This widget can be used to display a text or an image. It can - have different frame styles and text/image alignment. + have different frame styles and text/image tqalignment. @functions: !fn: $setText() Sets the text to be displayed by the label. @@ -142,17 +142,17 @@ const int frame_cod[] = { Sets auto-resize ability to enabled (if is 1) or disabled (if is 0). If auto-resize is enabled, the label will automagically resize itself accordingly to the 'size' of the - text it contains. + text it tqcontains. See also [classfnc]$autoResize[/classfnc](). - !fn: $alignment() - Returns a string containing alignment flags that are set for + !fn: $tqalignment() + Returns a string containing tqalignment flags that are set for this label. The flags are separated by commas. An example output could look like this:[br] [pre]Bottom, Right[/pre][br] - See [classfnc]$setAlignment[/classfnc]() for explanation of all - alignment flags. - !fn: $setAlignment(, , ...) - This function sets alignment flags, given as parameters, for + See [classfnc]$tqsetAlignment[/classfnc]() for explanation of all + tqalignment flags. + !fn: $tqsetAlignment(, , ...) + This function sets tqalignment flags, given as parameters, for this label. Valid flags are: [pre] Right - Text is aligned to right border[br] @@ -179,8 +179,8 @@ const int frame_cod[] = { frame-style flags and their explenation. !fn: $setFrameStyle(, , ...) Sets the frame-style flags to the ones passed as arguments. - The flags can either decide of the shape or shadow of the - label's frame. Valid shape flags are:[br] + The flags can either decide of the tqshape or shadow of the + label's frame. Valid tqshape flags are:[br] [pre] NoFrame - draw no frame. You shouldn't specify a shadow when using this.[br] @@ -196,9 +196,9 @@ const int frame_cod[] = { [pre] Plain - no 3D effect (draws using foreground color)[br] Raised - makes the label look like it was raised above the - parent widget[br] + tqparent widget[br] Sunken - makes the label look like it was "pushed" inside - the parent widget[br] + the tqparent widget[br] [/pre] !fn: $setImage() Sets the image to be displayed on this label. @@ -216,8 +216,8 @@ KVSO_BEGIN_REGISTERCLASS(KviKvsObject_label,"label","widget") KVSO_REGISTER_HANDLER(KviKvsObject_label,"setMargin", functionSetMargin) KVSO_REGISTER_HANDLER(KviKvsObject_label,"autoResize", functionAutoResize) KVSO_REGISTER_HANDLER(KviKvsObject_label,"setAutoResize", functionSetAutoResize) - KVSO_REGISTER_HANDLER(KviKvsObject_label,"alignment", functionAlignment) - KVSO_REGISTER_HANDLER(KviKvsObject_label,"setAlignment", functionSetAlignment) + KVSO_REGISTER_HANDLER(KviKvsObject_label,"tqalignment", functionAlignment) + KVSO_REGISTER_HANDLER(KviKvsObject_label,"tqsetAlignment", functionSetAlignment) KVSO_REGISTER_HANDLER(KviKvsObject_label,"clear", functionClear) KVSO_REGISTER_HANDLER(KviKvsObject_label,"frameStyle", functionFrameStyle) KVSO_REGISTER_HANDLER(KviKvsObject_label,"setFrameStyle", functionSetFrameStyle) @@ -235,23 +235,23 @@ KVSO_END_CONSTRUCTOR(KviKvsObject_label) bool KviKvsObject_label::init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams) { - setObject(new QLabel(parentScriptWidget(), name()), true); + setObject(TQT_TQOBJECT(new TQLabel(tqparentScriptWidget(), name())), true); return true; } bool KviKvsObject_label::functionSetText(KviKvsObjectFunctionCall *c) { - QString szText; + TQString szText; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("text",KVS_PT_STRING,0,szText) KVSO_PARAMETERS_END(c) if (widget()) - ((QLabel *)widget())->setText(szText); + ((TQLabel *)widget())->setText(szText); return true; } bool KviKvsObject_label::functionText(KviKvsObjectFunctionCall *c) { - if (widget()) c->returnValue()->setString(((QLabel *)widget())->text()); + if (widget()) c->returnValue()->setString(((TQLabel *)widget())->text()); return true; } @@ -261,12 +261,12 @@ bool KviKvsObject_label::functionSetMargin(KviKvsObjectFunctionCall *c) KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("margin",KVS_PT_UNSIGNEDINTEGER,0,iMargin) KVSO_PARAMETERS_END(c) - if (widget()) ((QLabel *)widget())->setMargin(iMargin); + if (widget()) ((TQLabel *)widget())->setMargin(iMargin); return true; } bool KviKvsObject_label::functionMargin(KviKvsObjectFunctionCall *c) { - if (widget()) c->returnValue()->setInteger(((QLabel *)widget())->margin()); + if (widget()) c->returnValue()->setInteger(((TQLabel *)widget())->margin()); return true; } @@ -281,7 +281,7 @@ bool KviKvsObject_label::functionSetAutoResize(KviKvsObjectFunctionCall *c) return true; #else if(widget()) - ((QLabel *)widget())->setAutoResize(bEnabled); + ((TQLabel *)widget())->setAutoResize(bEnabled); return true; #endif } @@ -290,26 +290,26 @@ bool KviKvsObject_label::functionAutoResize(KviKvsObjectFunctionCall *c) #ifdef COMPILE_USE_QT4 if (widget()) c->returnValue()->setBoolean(true); #else - if (widget()) c->returnValue()->setBoolean(((QLabel *)widget())->autoResize()); + if (widget()) c->returnValue()->setBoolean(((TQLabel *)widget())->autoResize()); #endif return true; } // bool KviKvsObject_label::functionSetAlignment(KviKvsObjectFunctionCall *c) { - QStringList alignment; + TQStringList tqalignment; KVSO_PARAMETERS_BEGIN(c) - KVSO_PARAMETER("alignment",KVS_PT_STRINGLIST,KVS_PF_OPTIONAL,alignment) + KVSO_PARAMETER("tqalignment",KVS_PT_STRINGLIST,KVS_PF_OPTIONAL,tqalignment) KVSO_PARAMETERS_END(c) if (!widget()) return true; int align,sum=0; - for ( QStringList::Iterator it = alignment.begin(); it != alignment.end(); ++it ) + for ( TQStringList::Iterator it = tqalignment.begin(); it != tqalignment.end(); ++it ) { align = 0; for(unsigned int j = 0; j < align_num; j++) { - if(KviQString::equalCI((*it), align_tbl[j])) + if(KviTQString::equalCI((*it), align_tbl[j])) { align=align_cod[j]; break; @@ -318,16 +318,16 @@ bool KviKvsObject_label::functionSetAlignment(KviKvsObjectFunctionCall *c) if(align) sum = sum | align; else - c->warning(__tr2qs("Unknown alignment: '%Q'"),&(*it)); + c->warning(__tr2qs("Unknown tqalignment: '%Q'"),&(*it)); } - ((QLabel *)widget())->setAlignment(sum); + ((TQLabel *)widget())->tqsetAlignment(sum); return true; } bool KviKvsObject_label::functionAlignment(KviKvsObjectFunctionCall *c) { - int mode = ((QLabel *)widget())->alignment(); - QString szAlignment=""; + int mode = ((TQLabel *)widget())->tqalignment(); + TQString szAlignment=""; for(unsigned int i = 0; i < align_num; i++) { if(mode == align_cod[i]) @@ -342,7 +342,7 @@ bool KviKvsObject_label::functionAlignment(KviKvsObjectFunctionCall *c) bool KviKvsObject_label::functionClear(KviKvsObjectFunctionCall *c) { if(widget()) - ((QLabel *)widget())->clear(); + ((TQLabel *)widget())->clear(); return true; } @@ -350,18 +350,18 @@ bool KviKvsObject_label::functionClear(KviKvsObjectFunctionCall *c) bool KviKvsObject_label::functionSetFrameStyle(KviKvsObjectFunctionCall *c) { - QStringList style; + TQStringList style; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("style",KVS_PT_STRINGLIST,KVS_PF_OPTIONAL,style) KVSO_PARAMETERS_END(c) if (!widget()) return true; int framestyle,sum=0; - for ( QStringList::Iterator it = style.begin(); it != style.end(); ++it ) + for ( TQStringList::Iterator it = style.begin(); it != style.end(); ++it ) { framestyle = 0; for(unsigned int j = 0; j < align_num; j++) { - if(KviQString::equalCI((*it), frame_tbl[j])) + if(KviTQString::equalCI((*it), frame_tbl[j])) { framestyle=frame_cod[j]; break; @@ -373,7 +373,7 @@ bool KviKvsObject_label::functionSetFrameStyle(KviKvsObjectFunctionCall *c) c->warning(__tr2qs("Unknown style: '%Q'"),&(*it)); } - ((QLabel *)widget())->setFrameStyle(sum); + ((TQLabel *)widget())->setFrameStyle(sum); return true; @@ -382,8 +382,8 @@ bool KviKvsObject_label::functionSetFrameStyle(KviKvsObjectFunctionCall *c) } bool KviKvsObject_label::functionFrameStyle(KviKvsObjectFunctionCall *c) { - int mode = ((QLabel *)widget())->frameStyle(); - QString szStyle=""; + int mode = ((TQLabel *)widget())->frameStyle(); + TQString szStyle=""; for(unsigned int i = 0; i < frame_num; i++) { if(mode == frame_cod[i]) @@ -398,12 +398,12 @@ bool KviKvsObject_label::functionFrameStyle(KviKvsObjectFunctionCall *c) bool KviKvsObject_label::functionSetImage(KviKvsObjectFunctionCall *c) { - QString icon; + TQString icon; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("icon",KVS_PT_STRING,0,icon) KVSO_PARAMETERS_END(c) if(!widget())return true; - QPixmap * pix = g_pIconManager->getImage(icon); - if(pix) ((QLabel *)widget())->setPixmap(*pix); + TQPixmap * pix = g_pIconManager->getImage(icon); + if(pix) ((TQLabel *)widget())->setPixmap(*pix); return true; } diff --git a/src/modules/objects/class_label.h b/src/modules/objects/class_label.h index 38fa58a3..70db28b2 100644 --- a/src/modules/objects/class_label.h +++ b/src/modules/objects/class_label.h @@ -24,7 +24,7 @@ -#include +#include #include "class_widget.h" #include "object_macros.h" @@ -33,7 +33,7 @@ class KviKvsObject_label : public KviKvsObject_widget public: KVSO_DECLARE_OBJECT(KviKvsObject_label) public: - QWidget * widget() { return (QWidget *)object(); }; + TQWidget * widget() { return (TQWidget *)object(); }; protected: virtual bool init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams); diff --git a/src/modules/objects/class_layout.cpp b/src/modules/objects/class_layout.cpp index 900b9856..cac963b1 100644 --- a/src/modules/objects/class_layout.cpp +++ b/src/modules/objects/class_layout.cpp @@ -27,50 +27,50 @@ #include "class_layout.h" #ifdef COMPILE_USE_QT4 -#define QLAYOUT_AUTO_CONSTRAINT QLayout::SetDefaultConstraint -#define QLAYOUT_FIXED QLayout::SetFixedSize -#define QLAYOUT_FREE_RESIZE QLayout::SetNoConstraint -#define QLAYOUT_MINIMUM QLayout::SetMinimumSize +#define TQLAYOUT_AUTO_CONSTRAINT TQLayout::SetDefaultConstraint +#define TQLAYOUT_FIXED TQLayout::SetFixedSize +#define TQLAYOUT_FREE_RESIZE TQLayout::SetNoConstraint +#define TQLAYOUT_MINIMUM TQLayout::SetMinimumSize #else -#define QLAYOUT_AUTO_CONSTRAINT QLayout::Auto -#define QLAYOUT_FIXED QLayout::Fixed -#define QLAYOUT_FREE_RESIZE QLayout::FreeResize -#define QLAYOUT_MINIMUM QLayout::Minimum +#define TQLAYOUT_AUTO_CONSTRAINT TQLayout::Auto +#define TQLAYOUT_FIXED TQLayout::Fixed +#define TQLAYOUT_FREE_RESIZE TQLayout::FreeResize +#define TQLAYOUT_MINIMUM TQLayout::Minimum #endif /* - @doc: layout + @doc: tqlayout @keyterms: - layout object class, child widgets + tqlayout object class, child widgets @title: - layout class + tqlayout class @type: class @short: - Manages child widget geometry + Manages child widget tqgeometry @inherits: [class]object[/class] @description: - The layout is a geometry management tool for child widgets. - You create a layout , give it some widgets to manage and it will layout them + The tqlayout is a tqgeometry management tool for child widgets. + You create a tqlayout , give it some widgets to manage and it will tqlayout them automatically.[br] - The parent of the layout must be the widget for which child widget geometries have to be managed. - A layout is a grid of NxM cells in which you insert child widgets with [classfnc:layout]$addWidget[/classfnc]().[br] - Widgets that must span multiple cells can be added to the layout with [classfnc:layout]$addMultiCellWidget[/classfnc]().[br] + The tqparent of the tqlayout must be the widget for which child widget geometries have to be managed. + A tqlayout is a grid of NxM cells in which you insert child widgets with [classfnc:tqlayout]$addWidget[/classfnc]().[br] + Widgets that must span multiple cells can be added to the tqlayout with [classfnc:tqlayout]$addMultiCellWidget[/classfnc]().[br] @functions: !fn: $addWidget(,,) - Adds a widget to this layout placing it at position , in the grid + Adds a widget to this tqlayout placing it at position , in the grid !fn: $addMultiCellWidget(,,,,) - Adds a widget to this layout spanning multiple grid cells + Adds a widget to this tqlayout spanning multiple grid cells !fn: $setRowStretch(,) - Sets the stretch value for a particular row of this layout. The + Sets the stretch value for a particular row of this tqlayout. The must be a positive integer. The rows with bigger stretch values will take more space - in the layout. + in the tqlayout. !fn: $setColStretch(,) - Sets the stretch value for a particular column in this layout. The + Sets the stretch value for a particular column in this tqlayout. The must be a positive integer. The rows with bigger stretch values will take more space - in the layout. + in the tqlayout. !fn: $addRowSpacing(,) Sets the minimum height of the specified to which must be a positive integer !fn: $addColSpacing(,) @@ -78,18 +78,18 @@ !fn: $setSpacing() Sets the default spacing of the widgets in pixels !fn: $setMargin() - Sets the dimension of the layout margin : the distance from the border to the outermost child widget edges. + Sets the dimension of the tqlayout margin : the distance from the border to the outermost child widget edges. !fn: $setResizeMode() - Sets the resize mode of the parent widget in relation to this layout. + Sets the resize mode of the tqparent widget in relation to this tqlayout. can be one of:[br] -Auto: this is the default[br] - -Fixed: the parent widget of this layout is resized to the "sizeHint" value and it cannot be resized by the user.[br] - -Minimum: the minimum size of the parent widget of this layout is set to minimumSize() and it cannot be smaller[br] - -FreeResize: the parent widget of this layout is not constrained at all[br] + -Fixed: the tqparent widget of this tqlayout is resized to the "tqsizeHint" value and it cannot be resized by the user.[br] + -Minimum: the minimum size of the tqparent widget of this tqlayout is set to tqminimumSize() and it cannot be smaller[br] + -FreeResize: the tqparent widget of this tqlayout is not constrained at all[br] */ -KVSO_BEGIN_REGISTERCLASS(KviKvsObject_layout,"layout","object") +KVSO_BEGIN_REGISTERCLASS(KviKvsObject_layout,"tqlayout","object") KVSO_REGISTER_HANDLER(KviKvsObject_layout,"addWidget", functionAddWidget) KVSO_REGISTER_HANDLER(KviKvsObject_layout,"addMultiCellWidget", functionAddMultiCellWidget) KVSO_REGISTER_HANDLER(KviKvsObject_layout,"setRowStretch", functionSetRowStretch) @@ -112,14 +112,14 @@ KVSO_END_CONSTRUCTOR(KviKvsObject_layout) bool KviKvsObject_layout::init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams) { - QWidget * w = parentScriptWidget(); + TQWidget * w = tqparentScriptWidget(); if(!w) { - pContext->warning(__tr2qs("The parent of a layout must be a widget!")); + pContext->warning(__tr2qs("The tqparent of a tqlayout must be a widget!")); return false; } - setObject(new QGridLayout(w)); + setObject(TQT_TQOBJECT(new TQGridLayout(w))); return true; } @@ -150,7 +150,7 @@ bool KviKvsObject_layout::functionAddWidget(KviKvsObjectFunctionCall *c) c->warning(__tr2qs("Can't add a non-widget object")); return true; } - ((QGridLayout *)object())->addWidget(((QWidget *)(pObject->object())),uRow,uCol); + ((TQGridLayout *)object())->addWidget(((TQWidget *)(pObject->object())),uRow,uCol); return true; } bool KviKvsObject_layout::functionAddMultiCellWidget(KviKvsObjectFunctionCall *c) @@ -182,7 +182,7 @@ bool KviKvsObject_layout::functionAddMultiCellWidget(KviKvsObjectFunctionCall *c c->warning(__tr2qs("Can't add a non-widget object")); return true; } - ((QGridLayout *)object())->addMultiCellWidget(((QWidget *)(pObject->object())),uStartRow,uEndRow,uStartCol,uEndCol); + ((TQGridLayout *)object())->addMultiCellWidget(((TQWidget *)(pObject->object())),uStartRow,uEndRow,uStartCol,uEndCol); return true; } bool KviKvsObject_layout::functionSetRowStretch(KviKvsObjectFunctionCall *c) @@ -193,7 +193,7 @@ bool KviKvsObject_layout::functionSetRowStretch(KviKvsObjectFunctionCall *c) KVSO_PARAMETER("stretch",KVS_PT_UNSIGNEDINTEGER,0,uStretch) KVSO_PARAMETERS_END(c) if(!widget())return true; - ((QGridLayout *)object())->setRowStretch(uRow,uStretch); + ((TQGridLayout *)object())->setRowStretch(uRow,uStretch); return true; } bool KviKvsObject_layout::functionSetColStretch(KviKvsObjectFunctionCall *c) @@ -204,7 +204,7 @@ bool KviKvsObject_layout::functionSetColStretch(KviKvsObjectFunctionCall *c) KVSO_PARAMETER("stretch",KVS_PT_UNSIGNEDINTEGER,0,uStretch) KVSO_PARAMETERS_END(c) if(!widget())return true; - ((QGridLayout *)object())->setColStretch(uCol,uStretch); + ((TQGridLayout *)object())->setColStretch(uCol,uStretch); return true; } @@ -214,7 +214,7 @@ bool KviKvsObject_layout::functionSetMargin(KviKvsObjectFunctionCall *c) KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("margin",KVS_PT_UNSIGNEDINTEGER,0,uMargin) KVSO_PARAMETERS_END(c) - if (widget()) ((QGridLayout *)object())->setMargin(uMargin); + if (widget()) ((TQGridLayout *)object())->setMargin(uMargin); return true; } @@ -224,7 +224,7 @@ bool KviKvsObject_layout::functionSetSpacing(KviKvsObjectFunctionCall *c) KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("spacing",KVS_PT_UNSIGNEDINTEGER,0,uSpacing) KVSO_PARAMETERS_END(c) - if (widget()) ((QGridLayout *)object())->setSpacing(uSpacing); + if (widget()) ((TQGridLayout *)object())->setSpacing(uSpacing); return true; } @@ -236,7 +236,7 @@ bool KviKvsObject_layout::functionAddRowSpacing(KviKvsObjectFunctionCall *c) KVSO_PARAMETER("row",KVS_PT_UNSIGNEDINTEGER,0,uRow) KVSO_PARAMETER("spacing",KVS_PT_UNSIGNEDINTEGER,0,uSpacing) KVSO_PARAMETERS_END(c) - if (widget()) ((QGridLayout *)object())->addRowSpacing(uRow,uSpacing); + if (widget()) ((TQGridLayout *)object())->addRowSpacing(uRow,uSpacing); return true; } @@ -247,27 +247,27 @@ bool KviKvsObject_layout::functionAddColSpacing(KviKvsObjectFunctionCall *c) KVSO_PARAMETER("column",KVS_PT_UNSIGNEDINTEGER,0,uCol) KVSO_PARAMETER("spacing",KVS_PT_UNSIGNEDINTEGER,0,uSpacing) KVSO_PARAMETERS_END(c) - if (widget()) ((QGridLayout *)object())->addColSpacing(uCol,uSpacing); + if (widget()) ((TQGridLayout *)object())->addColSpacing(uCol,uSpacing); return true; } bool KviKvsObject_layout::functionSetResizeMode(KviKvsObjectFunctionCall *c) { - QString szMode; + TQString szMode; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("resize_mode",KVS_PT_STRING,0,szMode) KVSO_PARAMETERS_END(c) if(!widget())return true; #ifdef COMPILE_USE_QT4 - QLayout::SizeConstraint r = QLAYOUT_AUTO_CONSTRAINT; + TQLayout::SizeConstraint r = TQLAYOUT_AUTO_CONSTRAINT; #else - QLayout::ResizeMode r = QLAYOUT_AUTO_CONSTRAINT; + TQLayout::ResizeMode r = TQLAYOUT_AUTO_CONSTRAINT; #endif - if(KviQString::equalCI(szMode,"FreeResize")) r = QLAYOUT_FREE_RESIZE; - else if(KviQString::equalCI(szMode,"Minimum")) r = QLAYOUT_MINIMUM; - else if(KviQString::equalCI(szMode,"Fixed"))r = QLAYOUT_FIXED; + if(KviTQString::equalCI(szMode,"FreeResize")) r = TQLAYOUT_FREE_RESIZE; + else if(KviTQString::equalCI(szMode,"Minimum")) r = TQLAYOUT_MINIMUM; + else if(KviTQString::equalCI(szMode,"Fixed"))r = TQLAYOUT_FIXED; else c->warning(__tr2qs("Invalid resize mode defaulting to Auto")); - ((QGridLayout *)object())->setResizeMode(r); + ((TQGridLayout *)object())->setResizeMode(r); return true; } diff --git a/src/modules/objects/class_layout.h b/src/modules/objects/class_layout.h index e821316a..596c7ae8 100644 --- a/src/modules/objects/class_layout.h +++ b/src/modules/objects/class_layout.h @@ -23,7 +23,7 @@ // #include "kvi_string.h" -#include +#include #include "object_macros.h" class KviKvsObject_layout : public KviKvsObject @@ -31,7 +31,7 @@ class KviKvsObject_layout : public KviKvsObject public: KVSO_DECLARE_OBJECT(KviKvsObject_layout) public: - QWidget * widget() { return (QWidget *)object(); }; + TQWidget * widget() { return (TQWidget *)object(); }; protected: virtual bool init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams); diff --git a/src/modules/objects/class_lcd.cpp b/src/modules/objects/class_lcd.cpp index 0f0ba49a..539457be 100644 --- a/src/modules/objects/class_lcd.cpp +++ b/src/modules/objects/class_lcd.cpp @@ -89,7 +89,7 @@ KVSO_END_CONSTRUCTOR(KviKvsObject_lcd) bool KviKvsObject_lcd::init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams) { - setObject(new QLCDNumber(parentScriptWidget(), name()), true); + setObject(TQT_TQOBJECT(new TQLCDNumber(tqparentScriptWidget(), name())), true); return true; } @@ -99,17 +99,17 @@ bool KviKvsObject_lcd::functiondisplayInt(KviKvsObjectFunctionCall *c) KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("number",KVS_PT_INT,0,iDigit) KVSO_PARAMETERS_END(c) - if(widget())((QLCDNumber *)widget())->display((int)iDigit); + if(widget())((TQLCDNumber *)widget())->display((int)iDigit); return true; } bool KviKvsObject_lcd::functiondisplayStr(KviKvsObjectFunctionCall *c) { - QString szText; + TQString szText; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("number",KVS_PT_STRING,0,szText) KVSO_PARAMETERS_END(c) - if(widget()) ((QLCDNumber *)widget())->display(szText); + if(widget()) ((TQLCDNumber *)widget())->display(szText); return true; } @@ -119,33 +119,33 @@ bool KviKvsObject_lcd::functiondisplayDouble(KviKvsObjectFunctionCall *c) KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("number",KVS_PT_DOUBLE,0,dDigit) KVSO_PARAMETERS_END(c) - if(widget()) ((QLCDNumber *)widget())->display(dDigit); + if(widget()) ((TQLCDNumber *)widget())->display(dDigit); return true; } bool KviKvsObject_lcd::functionsetMode(KviKvsObjectFunctionCall *c) { - QString szMode; + TQString szMode; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("mode",KVS_PT_STRING,0,szMode) KVSO_PARAMETERS_END(c) if(!widget())return true; - if(KviQString::equalCI(szMode, "HEX")) ((QLCDNumber *)widget())->setHexMode(); - else if(KviQString::equalCI(szMode, "DEC")) ((QLCDNumber *)widget())->setDecMode(); - else if(KviQString::equalCI(szMode, "BIN")) ((QLCDNumber *)widget())->setBinMode(); - else if(KviQString::equalCI(szMode, "OCT")) ((QLCDNumber *)widget())->setOctMode(); + if(KviTQString::equalCI(szMode, "HEX")) ((TQLCDNumber *)widget())->setHexMode(); + else if(KviTQString::equalCI(szMode, "DEC")) ((TQLCDNumber *)widget())->setDecMode(); + else if(KviTQString::equalCI(szMode, "BIN")) ((TQLCDNumber *)widget())->setBinMode(); + else if(KviTQString::equalCI(szMode, "OCT")) ((TQLCDNumber *)widget())->setOctMode(); else c->warning( __tr2qs("Unknown mode ")); return true; } bool KviKvsObject_lcd::functionsetSegmentStyle(KviKvsObjectFunctionCall *c) { - QString szStyle; + TQString szStyle; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("style",KVS_PT_STRING,0,szStyle) KVSO_PARAMETERS_END(c) if(!widget())return true; - if(KviQString::equalCI(szStyle, "Outline")) ((QLCDNumber *)widget())->setSegmentStyle(QLCDNumber::Outline); - else if(KviQString::equalCI(szStyle, "Filled")) ((QLCDNumber *)widget())->setSegmentStyle(QLCDNumber::Filled); - else if(KviQString::equalCI(szStyle, "Flat")) ((QLCDNumber *)widget())->setSegmentStyle(QLCDNumber::Flat); + if(KviTQString::equalCI(szStyle, "Outline")) ((TQLCDNumber *)widget())->setSegmentStyle(TQLCDNumber::Outline); + else if(KviTQString::equalCI(szStyle, "Filled")) ((TQLCDNumber *)widget())->setSegmentStyle(TQLCDNumber::Filled); + else if(KviTQString::equalCI(szStyle, "Flat")) ((TQLCDNumber *)widget())->setSegmentStyle(TQLCDNumber::Flat); else c->warning( __tr2qs("Unknown segment style ")); return true; } @@ -155,7 +155,7 @@ bool KviKvsObject_lcd::functionsetNumDigits(KviKvsObjectFunctionCall *c) KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("digit",KVS_PT_DOUBLE,0,digit) KVSO_PARAMETERS_END(c) - if(widget()) ((QLCDNumber *)widget())->setNumDigits(digit); + if(widget()) ((TQLCDNumber *)widget())->setNumDigits(digit); return true; } bool KviKvsObject_lcd::functionsetSmallDecimalPoint(KviKvsObjectFunctionCall *c) @@ -164,7 +164,7 @@ bool KviKvsObject_lcd::functionsetSmallDecimalPoint(KviKvsObjectFunctionCall *c) KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("bflag",KVS_PT_BOOLEAN,0,bFlag) KVSO_PARAMETERS_END(c) - if(widget()) ((QLCDNumber *)widget())->setSmallDecimalPoint(bFlag); + if(widget()) ((TQLCDNumber *)widget())->setSmallDecimalPoint(bFlag); return true; } bool KviKvsObject_lcd::functioncheckOverflow(KviKvsObjectFunctionCall *c) @@ -173,7 +173,7 @@ bool KviKvsObject_lcd::functioncheckOverflow(KviKvsObjectFunctionCall *c) KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("digit",KVS_PT_DOUBLE,0,iDigit) KVSO_PARAMETERS_END(c) - if(widget())c->returnValue()->setBoolean(((QLCDNumber *)widget())->checkOverflow(iDigit)); + if(widget())c->returnValue()->setBoolean(((TQLCDNumber *)widget())->checkOverflow(iDigit)); return true; } diff --git a/src/modules/objects/class_lcd.h b/src/modules/objects/class_lcd.h index 4976850a..6b1094fa 100644 --- a/src/modules/objects/class_lcd.h +++ b/src/modules/objects/class_lcd.h @@ -25,7 +25,7 @@ -#include +#include #include "class_widget.h" @@ -34,7 +34,7 @@ class KviKvsObject_lcd : public KviKvsObject_widget public: KVSO_DECLARE_OBJECT(KviKvsObject_lcd) public: - QWidget * widget() { return (QWidget *)object(); }; + TQWidget * widget() { return (TQWidget *)object(); }; protected: virtual bool init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams); diff --git a/src/modules/objects/class_lineedit.cpp b/src/modules/objects/class_lineedit.cpp index c8ba58ff..e429adfa 100644 --- a/src/modules/objects/class_lineedit.cpp +++ b/src/modules/objects/class_lineedit.cpp @@ -35,9 +35,9 @@ static const char * mode_tbl[] = { }; static const int mode_cod[] = { - QLineEdit::Normal, - QLineEdit::NoEcho, - QLineEdit::Password + TQLineEdit::Normal, + TQLineEdit::NoEcho, + TQLineEdit::Password }; #define mode_num (sizeof(mode_tbl) / sizeof(mode_tbl[0])) @@ -128,8 +128,8 @@ static const int mode_cod[] = { With this property user can drag text in the lineedit. !fn: $setReadOnly() Sets the lineedit to read only mode. - !fn: $setInputMask() - Sets the validation input mask to inputMask.[br] + !fn: $setInputMask() + Sets the validation input tqmask to inputMask.[br] Example:[br] [br] %esempio->$setInputMask( "+99 99 99 99 99;_" );[br] @@ -137,7 +137,7 @@ static const int mode_cod[] = { %esempio->Ip Number Mask.[br] %esempio->setInputMask( ">AAAAA-AAAAA-AAAAA-AAAAA-AAAAA;#" );[br] [br] - The mask format understands these mask characters:[br] + The tqmask format understands these tqmask characters:[br] Character Meaning[br] A ASCII alphabetic character required. A-Z, a-z.[br] a ASCII alphabetic character permitted but not required.[br] @@ -155,7 +155,7 @@ static const int mode_cod[] = { ! Switch off case conversion.[br] \ Use \ to escape the special characters listed above to use them as separators.[br] [br] - The mask consists of a string of mask characters and separators, optionally[br] + The tqmask consists of a string of tqmask characters and separators, optionally[br] followed by a semi-colon and the character used for blanks: the blank characters [br] are always removed from the text after editing. The default blank character is space. [br] !fn: $returnPressedEvent() @@ -218,35 +218,35 @@ KVSO_END_CONSTRUCTOR(KviKvsObject_lineedit) bool KviKvsObject_lineedit::init(KviKvsRunTimeContext * pContext,KviKvsVariantList * pParams) { - setObject(new QLineEdit(parentScriptWidget(),getName()),true); - connect(widget(),SIGNAL(returnPressed()),this,SLOT(slotreturnPressed())); - connect(widget(),SIGNAL(lostFocus()),this,SLOT(slotlostFocus())); - connect(widget(),SIGNAL(textChanged(const QString & )),this,SLOT(slottextChanged(const QString & ))); + setObject(TQT_TQOBJECT(new TQLineEdit(tqparentScriptWidget(),getName())),true); + connect(widget(),TQT_SIGNAL(returnPressed()),this,TQT_SLOT(slotreturnPressed())); + connect(widget(),TQT_SIGNAL(lostFocus()),this,TQT_SLOT(slotlostFocus())); + connect(widget(),TQT_SIGNAL(textChanged(const TQString & )),this,TQT_SLOT(slottextChanged(const TQString & ))); return true; } bool KviKvsObject_lineedit::functionText(KviKvsObjectFunctionCall *c) { if(widget()) - c->returnValue()->setString(((QLineEdit *)widget())->text()); + c->returnValue()->setString(((TQLineEdit *)widget())->text()); return true; } bool KviKvsObject_lineedit::functionSetText(KviKvsObjectFunctionCall *c) { - QString szText; + TQString szText; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("text",KVS_PT_STRING,0,szText) KVSO_PARAMETERS_END(c) if (widget()) - ((QLineEdit *)widget())->setText(szText); + ((TQLineEdit *)widget())->setText(szText); return true; } bool KviKvsObject_lineedit::functionMaxLength(KviKvsObjectFunctionCall *c) { if(widget()) - c->returnValue()->setInteger(((QLineEdit *)widget())->maxLength()); + c->returnValue()->setInteger(((TQLineEdit *)widget())->maxLength()); return true; } @@ -257,14 +257,14 @@ bool KviKvsObject_lineedit::functionSetMaxLength(KviKvsObjectFunctionCall *c) KVSO_PARAMETER("maxlen",KVS_PT_UNSIGNEDINTEGER,0,iMaxlen) KVSO_PARAMETERS_END(c) if (widget()) - ((QLineEdit *)widget())->setMaxLength(iMaxlen); + ((TQLineEdit *)widget())->setMaxLength(iMaxlen); return true; } bool KviKvsObject_lineedit::functionFrame(KviKvsObjectFunctionCall *c) { if(widget()) - c->returnValue()->setBoolean(((QLineEdit *)widget())->frame()); + c->returnValue()->setBoolean(((TQLineEdit *)widget())->frame()); return true; } @@ -275,14 +275,14 @@ bool KviKvsObject_lineedit::functionSetFrame(KviKvsObjectFunctionCall *c) KVSO_PARAMETER("bframe",KVS_PT_BOOL,0,bFrame) KVSO_PARAMETERS_END(c) if(widget()) - ((QLineEdit *)widget())->setFrame(bFrame); + ((TQLineEdit *)widget())->setFrame(bFrame); return true; } bool KviKvsObject_lineedit::functionCursorPosition(KviKvsObjectFunctionCall *c) { if(widget()) - c->returnValue()->setInteger(((QLineEdit *)widget())->cursorPosition()); + c->returnValue()->setInteger(((TQLineEdit *)widget())->cursorPosition()); return true; } @@ -293,14 +293,14 @@ bool KviKvsObject_lineedit::functionSetCursorPosition(KviKvsObjectFunctionCall * KVSO_PARAMETER("position",KVS_PT_UNSIGNEDINTEGER,0,iPos) KVSO_PARAMETERS_END(c) if (widget()) - ((QLineEdit *)widget())->setCursorPosition(iPos); + ((TQLineEdit *)widget())->setCursorPosition(iPos); return true; } bool KviKvsObject_lineedit::functionSelectAll(KviKvsObjectFunctionCall *c) { if(widget()) - ((QLineEdit *)widget())->selectAll(); + ((TQLineEdit *)widget())->selectAll(); return true; } @@ -312,35 +312,35 @@ bool KviKvsObject_lineedit::functionSetSelection(KviKvsObjectFunctionCall *c) KVSO_PARAMETER("len",KVS_PT_UNSIGNEDINTEGER,0,uLen) KVSO_PARAMETERS_END(c) if (widget()) - ((QLineEdit *)widget())->setSelection(uStart, uLen); + ((TQLineEdit *)widget())->setSelection(uStart, uLen); return true; } bool KviKvsObject_lineedit::functionCopy(KviKvsObjectFunctionCall *c) { if(widget()) - ((QLineEdit *)widget())->copy(); + ((TQLineEdit *)widget())->copy(); return true; } bool KviKvsObject_lineedit::functionCut(KviKvsObjectFunctionCall *c) { if(widget()) - ((QLineEdit *)widget())->cut(); + ((TQLineEdit *)widget())->cut(); return true; } bool KviKvsObject_lineedit::functionPaste(KviKvsObjectFunctionCall *c) { if(widget()) - ((QLineEdit *)widget())->paste(); + ((TQLineEdit *)widget())->paste(); return true; } bool KviKvsObject_lineedit::functionEchoMode(KviKvsObjectFunctionCall *c) { - int mode = ((QLineEdit *)widget())->echoMode(); - QString szEchomode=""; + int mode = ((TQLineEdit *)widget())->echoMode(); + TQString szEchomode=""; for(unsigned int i = 0; i < mode_num; i++) { if(mode == mode_cod[i]) @@ -355,17 +355,17 @@ bool KviKvsObject_lineedit::functionEchoMode(KviKvsObjectFunctionCall *c) bool KviKvsObject_lineedit::functionSetEchoMode(KviKvsObjectFunctionCall *c) { - QString szMode; + TQString szMode; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("mode",KVS_PT_STRING,0,szMode) KVSO_PARAMETERS_END(c) if (!widget()) return true; for(unsigned int i = 0; i < mode_num; i++) { - if(KviQString::equalCI(szMode, mode_tbl[i])) + if(KviTQString::equalCI(szMode, mode_tbl[i])) { - ((QLineEdit *)widget())->setEchoMode( \ - ((QLineEdit::EchoMode)mode_cod[i])); + ((TQLineEdit *)widget())->setEchoMode( \ + ((TQLineEdit::EchoMode)mode_cod[i])); return true; } } @@ -376,7 +376,7 @@ bool KviKvsObject_lineedit::functionSetEchoMode(KviKvsObjectFunctionCall *c) bool KviKvsObject_lineedit::functionClear(KviKvsObjectFunctionCall *c) { if(widget()) - ((QLineEdit *)widget())->clear(); + ((TQLineEdit *)widget())->clear(); return true; } @@ -388,7 +388,7 @@ bool KviKvsObject_lineedit::functionDragAndDrop(KviKvsObjectFunctionCall *c) KVSO_PARAMETER("bEnabled",KVS_PT_BOOL,0,bEnabled) KVSO_PARAMETERS_END(c) if(widget()) - ((QLineEdit *)widget())->setDragEnabled(bEnabled); + ((TQLineEdit *)widget())->setDragEnabled(bEnabled); return true; } @@ -399,18 +399,18 @@ bool KviKvsObject_lineedit::functionSetReadOnly(KviKvsObjectFunctionCall *c) KVSO_PARAMETER("bReadonly",KVS_PT_BOOL,0,bEnabled) KVSO_PARAMETERS_END(c) if(widget()) - ((QLineEdit *)widget())->setReadOnly(bEnabled); + ((TQLineEdit *)widget())->setReadOnly(bEnabled); return true; } bool KviKvsObject_lineedit::functionSetInputMask(KviKvsObjectFunctionCall *c) { - QString szMask; + TQString szMask; KVSO_PARAMETERS_BEGIN(c) - KVSO_PARAMETER("mask",KVS_PT_STRING,0,szMask) + KVSO_PARAMETER("tqmask",KVS_PT_STRING,0,szMask) KVSO_PARAMETERS_END(c) if (widget()) - ((QLineEdit *)widget())->setInputMask(szMask); + ((TQLineEdit *)widget())->setInputMask(szMask); return true; } @@ -451,7 +451,7 @@ bool KviKvsObject_lineedit::functiontextChangedEvent(KviKvsObjectFunctionCall *c } -void KviKvsObject_lineedit::slottextChanged(const QString &text) +void KviKvsObject_lineedit::slottextChanged(const TQString &text) { KviKvsVariantList params(new KviKvsVariant(text)); callFunction(this,"textChangedEvent",¶ms); diff --git a/src/modules/objects/class_lineedit.h b/src/modules/objects/class_lineedit.h index d7036824..079eefc3 100644 --- a/src/modules/objects/class_lineedit.h +++ b/src/modules/objects/class_lineedit.h @@ -24,7 +24,7 @@ -#include +#include #include "class_widget.h" //#warning "Signals !" @@ -34,10 +34,11 @@ class KviKvsObject_lineedit : public KviKvsObject_widget { Q_OBJECT + TQ_OBJECT public: KVSO_DECLARE_OBJECT(KviKvsObject_lineedit) public: - QWidget * widget() { return (QWidget *)object(); }; + TQWidget * widget() { return (TQWidget *)object(); }; protected: virtual bool init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams); @@ -73,7 +74,7 @@ protected: protected slots: void slotreturnPressed(); void slotlostFocus(); - void slottextChanged(const QString &); + void slottextChanged(const TQString &); }; diff --git a/src/modules/objects/class_listbox.cpp b/src/modules/objects/class_listbox.cpp index 111f7952..db3920f1 100644 --- a/src/modules/objects/class_listbox.cpp +++ b/src/modules/objects/class_listbox.cpp @@ -100,7 +100,7 @@ This function is called by KVIrc when the current item changes. !fn: $onItemEvent() This function is called by KVIrc when the current item pointed by the mouse changes and gives in $0 the item index. - !fn: $itemRect() + !fn: $tqitemRect() Returns the rectangle on the screen that item occupies, or an invalid rectangle if item is 0 or is not currently visible. @signals: @@ -122,7 +122,7 @@ KVSO_BEGIN_REGISTERCLASS(KviKvsObject_listbox,"listbox","widget") KVSO_REGISTER_HANDLER(KviKvsObject_listbox,"currentItem", functioncurrentItem) KVSO_REGISTER_HANDLER(KviKvsObject_listbox,"textAt", functiontextAt); KVSO_REGISTER_HANDLER(KviKvsObject_listbox,"itemAt", functionitemAt); - KVSO_REGISTER_HANDLER(KviKvsObject_listbox,"itemRect", functionitemRect); + KVSO_REGISTER_HANDLER(KviKvsObject_listbox,"tqitemRect", functiontqitemRect); KVSO_REGISTER_HANDLER(KviKvsObject_listbox,"setCurrentItem", functionsetCurrentItem); @@ -150,21 +150,21 @@ KVSO_END_CONSTRUCTOR(KviKvsObject_listbox) bool KviKvsObject_listbox::init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams) { - KviTalListBox * b = new KviTalListBox(parentScriptWidget()); + KviTalListBox * b = new KviTalListBox(tqparentScriptWidget()); b->setSelectionMode(KviTalListBox::Single); - connect(b,SIGNAL(selectionChanged()),this,SLOT(selectionChanged())); - connect(b,SIGNAL(currentChanged(KviTalListBoxItem *)),this,SLOT(currentItemChanged(KviTalListBoxItem *))); + connect(b,TQT_SIGNAL(selectionChanged()),this,TQT_SLOT(selectionChanged())); + connect(b,TQT_SIGNAL(currentChanged(KviTalListBoxItem *)),this,TQT_SLOT(currentItemChanged(KviTalListBoxItem *))); - connect(b,SIGNAL(onItem(KviTalListBoxItem *)),this,SLOT(onItem(KviTalListBoxItem *))); + connect(b,TQT_SIGNAL(onItem(KviTalListBoxItem *)),this,TQT_SLOT(onItem(KviTalListBoxItem *))); - setObject(b,true);; + setObject(TQT_TQOBJECT(b),true);; return true; } bool KviKvsObject_listbox::functioninsertItem(KviKvsObjectFunctionCall *c) { kvs_int_t iIndex; - QString szItem; + TQString szItem; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("text",KVS_PT_STRING,0,szItem) KVSO_PARAMETER("index",KVS_PT_INT,KVS_PF_OPTIONAL,iIndex) @@ -182,7 +182,7 @@ bool KviKvsObject_listbox::functionchangeItem(KviKvsObjectFunctionCall *c) { kvs_uint_t uIndex,cnt; - QString szText; + TQString szText; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("text",KVS_PT_STRING,0,szText) KVSO_PARAMETER("index",KVS_PT_UNSIGNEDINTEGER,0,uIndex) @@ -261,20 +261,20 @@ bool KviKvsObject_listbox::functionsetCurrentItem(KviKvsObjectFunctionCall *c) } bool KviKvsObject_listbox::functionsetSelectionMode(KviKvsObjectFunctionCall *c) { - QString szMode; + TQString szMode; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("selection_mode",KVS_PT_STRING,0,szMode) KVSO_PARAMETERS_END(c) if(!widget()) return true; KviTalListBox::SelectionMode iMode = KviTalListBox::Single; - if(KviQString::equalCI(szMode,"single")) iMode = KviTalListBox::Single; + if(KviTQString::equalCI(szMode,"single")) iMode = KviTalListBox::Single; - else if(KviQString::equalCI(szMode,"multi")) iMode = KviTalListBox::Multi; + else if(KviTQString::equalCI(szMode,"multi")) iMode = KviTalListBox::Multi; - else if(KviQString::equalCI(szMode,"extended")) iMode = KviTalListBox::Extended; + else if(KviTQString::equalCI(szMode,"extended")) iMode = KviTalListBox::Extended; - else if(KviQString::equalCI(szMode,"none")) iMode = KviTalListBox::NoSelection; + else if(KviTQString::equalCI(szMode,"none")) iMode = KviTalListBox::NoSelection; else c->warning(__tr2qs("Invalid selection mode '%Q' assuming single"),&szMode); ((KviTalListBox *)widget())->setSelectionMode(iMode); @@ -325,7 +325,7 @@ bool KviKvsObject_listbox::functionitemAt(KviKvsObjectFunctionCall *c) KVSO_PARAMETER("uY",KVS_PT_UNSIGNEDINTEGER,0,uY) KVSO_PARAMETERS_END(c) if(widget()) - c->returnValue()->setInteger(((KviTalListBox *)widget())->index(((KviTalListBox *)widget())->itemAt(QPoint(uX,uY)))); + c->returnValue()->setInteger(((KviTalListBox *)widget())->index(((KviTalListBox *)widget())->itemAt(TQPoint(uX,uY)))); return true; } @@ -367,7 +367,7 @@ void KviKvsObject_listbox::onItem(KviTalListBoxItem *item) } -bool KviKvsObject_listbox::functionitemRect(KviKvsObjectFunctionCall *c) +bool KviKvsObject_listbox::functiontqitemRect(KviKvsObjectFunctionCall *c) { kvs_uint_t uIndex; KVSO_PARAMETERS_BEGIN(c) @@ -375,7 +375,7 @@ kvs_uint_t uIndex; KVSO_PARAMETERS_END(c) if(widget()) { - QRect rect=((KviTalListBox *)widget())->itemRect(((KviTalListBox *)widget())->item(uIndex)); + TQRect rect=((KviTalListBox *)widget())->tqitemRect(((KviTalListBox *)widget())->item(uIndex)); KviKvsArray * a = new KviKvsArray(); a->set(0,new KviKvsVariant((kvs_int_t)rect.left())); a->set(1,new KviKvsVariant((kvs_int_t)rect.top())); diff --git a/src/modules/objects/class_listbox.h b/src/modules/objects/class_listbox.h index 471337fd..b7d00cb4 100644 --- a/src/modules/objects/class_listbox.h +++ b/src/modules/objects/class_listbox.h @@ -34,10 +34,11 @@ class KviTalListBoxItem; class KviKvsObject_listbox: public KviKvsObject_widget { Q_OBJECT + TQ_OBJECT public: KVSO_DECLARE_OBJECT(KviKvsObject_listbox) public: - QWidget * widget() { return (QWidget *)object(); }; + TQWidget * widget() { return (TQWidget *)object(); }; protected: virtual bool init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams); @@ -59,7 +60,7 @@ protected: bool functiononItemEvent(KviKvsObjectFunctionCall *c); bool functionitemAt(KviKvsObjectFunctionCall *c); - bool functionitemRect(KviKvsObjectFunctionCall *c); + bool functiontqitemRect(KviKvsObjectFunctionCall *c); protected slots: void selectionChanged(); void currentItemChanged(KviTalListBoxItem *); diff --git a/src/modules/objects/class_listview.cpp b/src/modules/objects/class_listview.cpp index f571788c..036e758e 100644 --- a/src/modules/objects/class_listview.cpp +++ b/src/modules/objects/class_listview.cpp @@ -27,10 +27,10 @@ #include "kvi_tal_listview.h" #ifdef COMPILE_USE_QT4 -#include -#include +#include +#include #else -#include +#include #endif #include "class_listview.h" #include "kvi_error.h" @@ -55,11 +55,11 @@ [class]widget[/class] @description: It can display and control a hierarchy of multi-column items, and provides the ability to add new items at any time. - The items are added by creating children [class]listviewitem[/class] objects: simply allocating them with $new + The items are added by creating tqchildren [class]listviewitem[/class] objects: simply allocating them with $new will add the items to the listview and simply deleting them will remove them. Allocating a [class]listviewitem[/class] item2 as a child of item1 will insert it to the same listview creating a subtree of items spannig from item1. The subtree can be opened or closed by a simple click either - on the parent item or on the little plus sign on the side of it (when [classfnc:listview]$setRootIsDecorated[/classfnc] + on the tqparent item or on the little plus sign on the side of it (when [classfnc:listview]$setRootIsDecorated[/classfnc] is set to $true. The listview can be in Single, Multi, Extended or NoSelection selection mode. In single selection mode there can be only one selected item at a time and the selected item is also the current item (this mode is the default). In Multi and Extended selection mode there can be multiple selected items @@ -132,11 +132,11 @@ The default implementation emits the [classfnc]$onItem[/classfnc]() signal. !fn: $itemExpandedEvent() - This event is called when an item has been expanded, i.e. when the children of item are shown. + This event is called when an item has been expanded, i.e. when the tqchildren of item are shown. The default implementation emits the [classfnc]$expanded[/classfnc]() signal. !fn: $itemCollapsedEvent() - This event is called when an item has been collapsed, i.e. when the children of item are hidden. + This event is called when an item has been collapsed, i.e. when the tqchildren of item are hidden. The default implementation emits the [classfnc]$collapsed[/classfnc]() signal. !fn: $itemRenamedEvent(,,) @@ -217,24 +217,24 @@ KVSO_END_CONSTRUCTOR(KviKvsObject_listview) bool KviKvsObject_listview::init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams) { - setObject(new KviKvsMdmListView(parentScriptWidget(),name(),this),true); - connect(widget(),SIGNAL(clicked(KviTalListViewItem *)),this,SLOT(slotClicked(KviTalListViewItem *))); - connect(widget(),SIGNAL(selectionChanged(KviTalListViewItem *)),this,SLOT(slotSelectionChanged(KviTalListViewItem *))); - connect(widget(),SIGNAL(selectionChanged()),this,SLOT(slotMultipleSelectionChanged())); - connect(widget(),SIGNAL(currentChanged(KviTalListViewItem *)),this,SLOT(slotCurrentChanged(KviTalListViewItem *))); - connect(widget(),SIGNAL(returnPressed(KviTalListViewItem *)),this,SLOT(slotReturnPressed(KviTalListViewItem *))); - connect(widget(),SIGNAL(spacePressed(KviTalListViewItem *)),this,SLOT(slotSpacePressed(KviTalListViewItem *))); - connect(widget(),SIGNAL(onItem(KviTalListViewItem *)),this,SLOT(slotOnItem(KviTalListViewItem *))); - connect(widget(),SIGNAL(expanded(KviTalListViewItem *)),this,SLOT(slotItemExpanded(KviTalListViewItem *))); - connect(widget(),SIGNAL(collapsed(KviTalListViewItem *)),this,SLOT(slotItemCollapsed(KviTalListViewItem *))); - connect(widget(),SIGNAL(rightButtonClicked(KviTalListViewItem *,const QPoint &,int)),this,SLOT(slotRightButtonClicked(KviTalListViewItem *,const QPoint &,int))); - connect(widget(),SIGNAL(itemRenamed(KviTalListViewItem *,int,const QString &)),this,SLOT(slotItemRenamed(KviTalListViewItem *,int,const QString &))); + setObject(TQT_TQOBJECT(new KviKvsMdmListView(tqparentScriptWidget(),name(),this)),true); + connect(widget(),TQT_SIGNAL(clicked(KviTalListViewItem *)),this,TQT_SLOT(slotClicked(KviTalListViewItem *))); + connect(widget(),TQT_SIGNAL(selectionChanged(KviTalListViewItem *)),this,TQT_SLOT(slotSelectionChanged(KviTalListViewItem *))); + connect(widget(),TQT_SIGNAL(selectionChanged()),this,TQT_SLOT(slotMultipleSelectionChanged())); + connect(widget(),TQT_SIGNAL(currentChanged(KviTalListViewItem *)),this,TQT_SLOT(slotCurrentChanged(KviTalListViewItem *))); + connect(widget(),TQT_SIGNAL(returnPressed(KviTalListViewItem *)),this,TQT_SLOT(slotReturnPressed(KviTalListViewItem *))); + connect(widget(),TQT_SIGNAL(spacePressed(KviTalListViewItem *)),this,TQT_SLOT(slotSpacePressed(KviTalListViewItem *))); + connect(widget(),TQT_SIGNAL(onItem(KviTalListViewItem *)),this,TQT_SLOT(slotOnItem(KviTalListViewItem *))); + connect(widget(),TQT_SIGNAL(expanded(KviTalListViewItem *)),this,TQT_SLOT(slotItemExpanded(KviTalListViewItem *))); + connect(widget(),TQT_SIGNAL(collapsed(KviTalListViewItem *)),this,TQT_SLOT(slotItemCollapsed(KviTalListViewItem *))); + connect(widget(),TQT_SIGNAL(rightButtonClicked(KviTalListViewItem *,const TQPoint &,int)),this,TQT_SLOT(slotRightButtonClicked(KviTalListViewItem *,const TQPoint &,int))); + connect(widget(),TQT_SIGNAL(itemRenamed(KviTalListViewItem *,int,const TQString &)),this,TQT_SLOT(slotItemRenamed(KviTalListViewItem *,int,const TQString &))); return true; } bool KviKvsObject_listview::function_addColumn(KviKvsObjectFunctionCall *c) { - QString szLabel; + TQString szLabel; kvs_int_t iW; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("label",KVS_PT_STRING,0,szLabel) @@ -293,7 +293,7 @@ bool KviKvsObject_listview::function_currentItem(KviKvsObjectFunctionCall *c) bool KviKvsObject_listview::function_setColumnText(KviKvsObjectFunctionCall *c) { kvs_int_t uCol; - QString szText; + TQString szText; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("column",KVS_PT_UNSIGNEDINTEGER,0,uCol) KVSO_PARAMETER("text",KVS_PT_STRING,0,szText) @@ -304,18 +304,18 @@ bool KviKvsObject_listview::function_setColumnText(KviKvsObjectFunctionCall *c) bool KviKvsObject_listview::function_setSelectionMode(KviKvsObjectFunctionCall *c) { - QString szMode; + TQString szMode; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("mode",KVS_PT_NONEMPTYSTRING,0,szMode) KVSO_PARAMETERS_END(c) if(!widget())return true; - if(KviQString::equalCI(szMode,"NoSelection")) + if(KviTQString::equalCI(szMode,"NoSelection")) ((KviTalListView *)widget())->setSelectionMode(KviTalListView::NoSelection); - else if(KviQString::equalCI(szMode,"Multi")) + else if(KviTQString::equalCI(szMode,"Multi")) ((KviTalListView *)widget())->setSelectionMode(KviTalListView::Multi); - else if(KviQString::equalCI(szMode,"Extended")) + else if(KviTQString::equalCI(szMode,"Extended")) ((KviTalListView *)widget())->setSelectionMode(KviTalListView::Extended); - else if(KviQString::equalCI(szMode,"Single")) + else if(KviTQString::equalCI(szMode,"Single")) ((KviTalListView *)widget())->setSelectionMode(KviTalListView::Single); else c->warning(__tr2qs("Invalid selection mode '%Q'"),&szMode); return true; @@ -481,7 +481,7 @@ bool KviKvsObject_listview::function_rightButtonClickedEvent(KviKvsObjectFunctio return true; } -void KviKvsObject_listview::slotRightButtonClicked(KviTalListViewItem * i,const QPoint &coor, int col) +void KviKvsObject_listview::slotRightButtonClicked(KviTalListViewItem * i,const TQPoint &coor, int col) { KviKvsVariant *xpos=new KviKvsVariant((kvs_int_t)coor.x()); KviKvsVariant *ypos=new KviKvsVariant((kvs_int_t)coor.y()); @@ -496,24 +496,24 @@ bool KviKvsObject_listview::function_itemRenamedEvent(KviKvsObjectFunctionCall * return true; } -void KviKvsObject_listview::slotItemRenamed(KviTalListViewItem *item,int col,const QString & szText) +void KviKvsObject_listview::slotItemRenamed(KviTalListViewItem *item,int col,const TQString & szText) { KviKvsVariant *column=new KviKvsVariant((kvs_int_t)col); KviKvsVariant *txt=new KviKvsVariant(szText); KviKvsVariantList params(new KviKvsVariant(KviKvsObject_listviewitem::itemToHandle(item)),column,txt); callFunction(this,"itemRenamedEvent",0,¶ms); } -void KviKvsObject_listview::fileDropped(QString &szFile,KviTalListViewItem *item) +void KviKvsObject_listview::fileDropped(TQString &szFile,KviTalListViewItem *item) { KviKvsVariant *file=new KviKvsVariant(szFile); KviKvsVariantList params(new KviKvsVariant(KviKvsObject_listviewitem::itemToHandle(item)),file); callFunction(this,"fileDroppedEvent",0,¶ms); } -KviKvsMdmListView::KviKvsMdmListView(QWidget * par,const char * name,KviKvsObject_listview *parent) +KviKvsMdmListView::KviKvsMdmListView(TQWidget * par,const char * name,KviKvsObject_listview *tqparent) :KviTalListView(par) { - m_pParentScript=parent; + m_pParentScript=tqparent; setAcceptDrops(true); viewport()->setAcceptDrops( TRUE ); @@ -522,7 +522,7 @@ KviKvsMdmListView::~KviKvsMdmListView() { } -void KviKvsMdmListView::contentsDragEnterEvent( QDragEnterEvent *e ) +void KviKvsMdmListView::contentsDragEnterEvent( TQDragEnterEvent *e ) { if ( !KviUriDrag::canDecode(e)) { @@ -533,19 +533,19 @@ void KviKvsMdmListView::contentsDragEnterEvent( QDragEnterEvent *e ) } -void KviKvsMdmListView::contentsDropEvent(QDropEvent *e) +void KviKvsMdmListView::contentsDropEvent(TQDropEvent *e) { - QStringList list; + TQStringList list; if(KviUriDrag::decodeLocalFiles(e,list)) { if(!list.isEmpty()) { - QStringList::ConstIterator it = list.begin(); //kewl ! :) + TQStringList::ConstIterator it = list.begin(); //kewl ! :) for( ; it != list.end(); ++it ) { - QString tmp = *it; //wow :) + TQString tmp = *it; //wow :) #ifndef COMPILE_ON_WINDOWS - if(tmp[0] != '/')tmp.prepend("/"); //HACK HACK HACK for Qt bug (?!?) + if(tmp[0] != '/')tmp.prepend("/"); //HACK HACK HACK for TQt bug (?!?) #endif KviTalListViewItem *i = itemAt( contentsToViewport(e->pos()) ); m_pParentScript->fileDropped(tmp,i); diff --git a/src/modules/objects/class_listview.h b/src/modules/objects/class_listview.h index 7849f36c..2d419fe0 100644 --- a/src/modules/objects/class_listview.h +++ b/src/modules/objects/class_listview.h @@ -36,12 +36,13 @@ class KviKvsObject_listview : public KviKvsObject_widget { Q_OBJECT + TQ_OBJECT public: KVSO_DECLARE_OBJECT(KviKvsObject_listview) public: - QWidget * widget() { return (QWidget *)object(); }; - void fileDropped(QString &,KviTalListViewItem *); + TQWidget * widget() { return (TQWidget *)object(); }; + void fileDropped(TQString &,KviTalListViewItem *); protected: virtual bool init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams); @@ -82,21 +83,22 @@ protected slots: void slotOnItem(KviTalListViewItem *); void slotItemExpanded(KviTalListViewItem *); void slotItemCollapsed(KviTalListViewItem *); - void slotItemRenamed(KviTalListViewItem *,int,const QString &); - void slotRightButtonClicked(KviTalListViewItem * i,const QPoint &coor, int col); + void slotItemRenamed(KviTalListViewItem *,int,const TQString &); + void slotRightButtonClicked(KviTalListViewItem * i,const TQPoint &coor, int col); }; class KviKvsMdmListView : public KviTalListView { Q_OBJECT + TQ_OBJECT public: - KviKvsMdmListView(QWidget * par,const char * name,KviKvsObject_listview *); + KviKvsMdmListView(TQWidget * par,const char * name,KviKvsObject_listview *); virtual ~KviKvsMdmListView(); protected: KviKvsObject_listview *m_pParentScript; - void contentsDropEvent(QDropEvent *e); - void contentsDragEnterEvent( QDragEnterEvent *e ); + void contentsDropEvent(TQDropEvent *e); + void contentsDragEnterEvent( TQDragEnterEvent *e ); }; #endif //!_CLASS_LISTVIEW_H_ diff --git a/src/modules/objects/class_listviewitem.cpp b/src/modules/objects/class_listviewitem.cpp index 31df9020..0834796c 100644 --- a/src/modules/objects/class_listviewitem.cpp +++ b/src/modules/objects/class_listviewitem.cpp @@ -46,7 +46,7 @@ The listviewitem class implements a list view item. A list view item is a multi-column object capable of displaying itself in a [class]listview[/class]. To use this class you must instantiate it with another listviewitem or a [class]listview[/class] - as parent. The item will be automatically displayed. + as tqparent. The item will be automatically displayed. You can set the text and a pixmap in each column and you can make it checkable with [classfnc:listviewitem]$setCheckable[/classfnc](). A checkable listviewitem will display a small check mark in the first column. @@ -71,7 +71,7 @@ Returns $true if this item is enabled and $false otherwise !fn: $setOpen() - Opens or closes the item to show its children items + Opens or closes the item to show its tqchildren items !fn: $isOpen() Returns the open state of this item @@ -80,7 +80,7 @@ Makes this item checkable or not. This function should be called immediately after the item creation: changing this property later at runtime may have strange results (like the item being moved inside the list, text disappearing, - hidden children etc... don't do it :D ). + hidden tqchildren etc... don't do it :D ). !fn: $isCheckable() Returns $true if this item is checkable and $false otherwise @@ -94,7 +94,7 @@ have been previously called. !fn: $firstChild() - Returns the first child item of this listviewitem or $null if this item has no children. + Returns the first child item of this listviewitem or $null if this item has no tqchildren. !fn: $nextSibling() Returns the next sibling item of this listviewitem or $null if there are no sibling items. @@ -137,19 +137,19 @@ KVSO_END_CONSTRUCTOR(KviKvsObject_listviewitem) bool KviKvsObject_listviewitem::init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams) { - if (!parentObject()) + if (!tqparentObject()) { - pContext->error(__tr2qs("The listviewitem cannot be parentless")); + pContext->error(__tr2qs("The listviewitem cannot be tqparentless")); return false; } - if(parentObject()->inherits("KviKvsObject_listviewitem")) + if(tqparentObject()->inherits("KviKvsObject_listviewitem")) { - m_pListViewItem = new KviKvsMdmStandardListViewItem(this,((KviKvsObject_listviewitem *)parentObject())->m_pListViewItem); + m_pListViewItem = new KviKvsMdmStandardListViewItem(this,((KviKvsObject_listviewitem *)tqparentObject())->m_pListViewItem); } else { - if(parentObject()->inherits("KviKvsObject_listview")) - m_pListViewItem = new KviKvsMdmStandardListViewItem(this,((KviTalListView *)parentScriptWidget())); + if(tqparentObject()->inherits("KviKvsObject_listview")) + m_pListViewItem = new KviKvsMdmStandardListViewItem(this,((KviTalListView *)tqparentScriptWidget())); else { - pContext->error(__tr2qs("The parent of the listviewitem must be either another listviewitem or a listview")); + pContext->error(__tr2qs("The tqparent of the listviewitem must be either another listviewitem or a listview")); return false; } } @@ -181,12 +181,12 @@ KviKvsMdmStandardListViewItem::~KviKvsMdmStandardListViewItem() KviKvsMdmCheckListViewItem::KviKvsMdmCheckListViewItem(KviKvsObject_listviewitem * ob,KviTalListView * par) -:KviTalCheckListItem(par,QString::null,KviTalCheckListItem::CheckBox), m_pMasterObject(ob) +:KviTalCheckListItem(par,TQString(),KviTalCheckListItem::CheckBox), m_pMasterObject(ob) { } KviKvsMdmCheckListViewItem::KviKvsMdmCheckListViewItem(KviKvsObject_listviewitem * ob,KviTalListViewItem * par) -:KviTalCheckListItem(par,QString::null,KviTalCheckListItem::CheckBox), m_pMasterObject(ob) +:KviTalCheckListItem(par,TQString(),KviTalCheckListItem::CheckBox), m_pMasterObject(ob) { } @@ -210,7 +210,7 @@ kvs_hobject_t KviKvsObject_listviewitem::itemToHandle(KviTalListViewItem * it) bool KviKvsObject_listviewitem::function_setText(KviKvsObjectFunctionCall *c) { kvs_uint_t uCol; - QString szText; + TQString szText; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("column",KVS_PT_UNSIGNEDINTEGER,0,uCol) KVSO_PARAMETER("text",KVS_PT_STRING,0,szText) @@ -304,7 +304,7 @@ bool KviKvsObject_listviewitem::function_setChecked(KviKvsObjectFunctionCall *c) KVSO_PARAMETER("bChecked",KVS_PT_BOOL,0,bChecked) KVSO_PARAMETERS_END(c) if(!m_pListViewItem)return true; - if(m_pListViewItem->rtti() != 1)return true; // not a QCheckListItem + if(m_pListViewItem->rtti() != 1)return true; // not a TQCheckListItem ((KviKvsMdmCheckListViewItem *)m_pListViewItem)->setOn(bChecked); return true; } @@ -334,8 +334,8 @@ bool KviKvsObject_listviewitem::function_setCheckable(KviKvsObjectFunctionCall * if(!m_pListViewItem)return true; if(bCheckable) { - if(m_pListViewItem->rtti() == 1)return true; // a QCheckListItem already - KviTalListViewItem * pParent = m_pListViewItem->parent(); + if(m_pListViewItem->rtti() == 1)return true; // a TQCheckListItem already + KviTalListViewItem * pParent = m_pListViewItem->tqparent(); KviTalListView * pLV = (KviTalListView *)m_pListViewItem->listView(); // swap the items, so we don't die now KviTalListViewItem * pThis = m_pListViewItem; @@ -346,8 +346,8 @@ bool KviKvsObject_listviewitem::function_setCheckable(KviKvsObjectFunctionCall * else m_pListViewItem = new KviKvsMdmCheckListViewItem(this,pLV); } else { - if(m_pListViewItem->rtti() != 1)return true; // not a QCheckListItem yet - KviTalListViewItem * pParent = m_pListViewItem->parent(); + if(m_pListViewItem->rtti() != 1)return true; // not a TQCheckListItem yet + KviTalListViewItem * pParent = m_pListViewItem->tqparent(); KviTalListView * pLV = (KviTalListView *)m_pListViewItem->listView(); // swap the items, so we don't die now KviTalListViewItem * pThis = m_pListViewItem; @@ -393,7 +393,7 @@ bool KviKvsObject_listviewitem::function_setPixmap(KviKvsObjectFunctionCall *c) KVSO_PARAMETER("column",KVS_PT_UNSIGNEDINTEGER,0,uCol) KVSO_PARAMETER("pixmap",KVS_PT_VARIANT,0,vPixmap) KVSO_PARAMETERS_END(c) - QPixmap *pix = 0; + TQPixmap *pix = 0; if(vPixmap->isHObject()) { vPixmap->asHObject(obHpixmap); @@ -405,7 +405,7 @@ bool KviKvsObject_listviewitem::function_setPixmap(KviKvsObjectFunctionCall *c) } pix=((KviKvsObject_pixmap *)obPixmap)->getPixmap(); } else { - QString szPix; + TQString szPix; vPixmap->asString(szPix); pix=g_pIconManager->getImage(szPix); if(!pix) diff --git a/src/modules/objects/class_listviewitem.h b/src/modules/objects/class_listviewitem.h index eb806324..f2cacc3f 100644 --- a/src/modules/objects/class_listviewitem.h +++ b/src/modules/objects/class_listviewitem.h @@ -32,6 +32,7 @@ class KviKvsObject_listviewitem : public KviKvsObject { Q_OBJECT + TQ_OBJECT public: KVSO_DECLARE_OBJECT(KviKvsObject_listviewitem) void childDestroyed(); diff --git a/src/modules/objects/class_mainwindow.cpp b/src/modules/objects/class_mainwindow.cpp index e30f480b..8b04053e 100644 --- a/src/modules/objects/class_mainwindow.cpp +++ b/src/modules/objects/class_mainwindow.cpp @@ -68,7 +68,7 @@ KVSO_END_CONSTRUCTOR(KviKvsObject_mainwindow) bool KviKvsObject_mainwindow::init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams) { - setObject(new KviTalMainWindow(parentScriptWidget(), name()), true); + setObject(TQT_TQOBJECT(new KviTalMainWindow(tqparentScriptWidget(), name())), true); return true; } @@ -95,12 +95,12 @@ bool KviKvsObject_mainwindow::functionsetCentralWidget(KviKvsObjectFunctionCall c->warning(__tr2qs("Widget object required")); return TRUE; } - if(widget()) ((KviTalMainWindow *)widget())->setCentralWidget(((QWidget *)(pObject->object()))); + if(widget()) ((KviTalMainWindow *)widget())->setCentralWidget(((TQWidget *)(pObject->object()))); return true; } bool KviKvsObject_mainwindow::functionsetDockEnabled(KviKvsObjectFunctionCall *c) { - QString szDockarea; + TQString szDockarea; bool bFlag; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("dock area",KVS_PT_STRING,0,szDockarea) @@ -109,20 +109,20 @@ bool KviKvsObject_mainwindow::functionsetDockEnabled(KviKvsObjectFunctionCall *c if(widget()) { #ifndef COMPILE_USE_QT4 - if(KviQString::equalCI(szDockarea,"Top")) - ((KviTalMainWindow *)widget())->setDockEnabled(Qt::DockTop,bFlag); - else if(KviQString::equalCI(szDockarea,"Left")) - ((KviTalMainWindow *)widget())->setDockEnabled(Qt::DockLeft,bFlag); - else if(KviQString::equalCI(szDockarea,"Right")) - ((KviTalMainWindow *)widget())->setDockEnabled(Qt::DockRight,bFlag); - else if(KviQString::equalCI(szDockarea,"Bottom")) - ((KviTalMainWindow *)widget())->setDockEnabled(Qt::DockBottom,bFlag); - else if(KviQString::equalCI(szDockarea,"Minimized")) - ((KviTalMainWindow *)widget())->setDockEnabled(Qt::DockMinimized,bFlag); - else if(KviQString::equalCI(szDockarea,"TornOff")) - ((KviTalMainWindow *)widget())->setDockEnabled(Qt::DockTornOff,bFlag); - else if(KviQString::equalCI(szDockarea,"Unmanaged")) - ((KviTalMainWindow *)widget())->setDockEnabled(Qt::DockUnmanaged,bFlag); + if(KviTQString::equalCI(szDockarea,"Top")) + ((KviTalMainWindow *)widget())->setDockEnabled(TQt::DockTop,bFlag); + else if(KviTQString::equalCI(szDockarea,"Left")) + ((KviTalMainWindow *)widget())->setDockEnabled(TQt::DockLeft,bFlag); + else if(KviTQString::equalCI(szDockarea,"Right")) + ((KviTalMainWindow *)widget())->setDockEnabled(TQt::DockRight,bFlag); + else if(KviTQString::equalCI(szDockarea,"Bottom")) + ((KviTalMainWindow *)widget())->setDockEnabled(TQt::DockBottom,bFlag); + else if(KviTQString::equalCI(szDockarea,"Minimized")) + ((KviTalMainWindow *)widget())->setDockEnabled(TQt::DockMinimized,bFlag); + else if(KviTQString::equalCI(szDockarea,"TornOff")) + ((KviTalMainWindow *)widget())->setDockEnabled(TQt::DockTornOff,bFlag); + else if(KviTQString::equalCI(szDockarea,"Unmanaged")) + ((KviTalMainWindow *)widget())->setDockEnabled(TQt::DockUnmanaged,bFlag); else c->warning(__tr2qs("Unknown dock area '%Q'"),&szDockarea); #endif } @@ -132,20 +132,20 @@ bool KviKvsObject_mainwindow::functionsetDockEnabled(KviKvsObjectFunctionCall *c bool KviKvsObject_mainwindow::functionisDockEnabled(KviKvsObjectFunctionCall *c) { - QString szDockarea; + TQString szDockarea; bool bFlag = false; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("dock_area",KVS_PT_STRING,0,szDockarea) KVSO_PARAMETERS_END(c) if(!widget()) return true; #ifndef COMPILE_USE_QT4 - if(KviQString::equalCI(szDockarea,"Top")) bFlag=((KviTalMainWindow *)widget())->isDockEnabled(Qt::DockTop); - else if(KviQString::equalCI(szDockarea,"Left")) bFlag=((KviTalMainWindow *)widget())->isDockEnabled(Qt::DockLeft); - else if(KviQString::equalCI(szDockarea,"Right")) bFlag=((KviTalMainWindow *)widget())->isDockEnabled(Qt::DockRight); - else if(KviQString::equalCI(szDockarea,"Bottom"))bFlag=((KviTalMainWindow *)widget())->isDockEnabled(Qt::DockBottom); - else if(KviQString::equalCI(szDockarea,"Minimized")) bFlag=((KviTalMainWindow *)widget())->isDockEnabled(Qt::DockMinimized); - else if(KviQString::equalCI(szDockarea,"TornOff")) bFlag=((KviTalMainWindow *)widget())->isDockEnabled(Qt::DockTornOff); - else if(KviQString::equalCI(szDockarea,"Unmanaged")) bFlag=((KviTalMainWindow *)widget())->isDockEnabled(Qt::DockUnmanaged); + if(KviTQString::equalCI(szDockarea,"Top")) bFlag=((KviTalMainWindow *)widget())->isDockEnabled(TQt::DockTop); + else if(KviTQString::equalCI(szDockarea,"Left")) bFlag=((KviTalMainWindow *)widget())->isDockEnabled(TQt::DockLeft); + else if(KviTQString::equalCI(szDockarea,"Right")) bFlag=((KviTalMainWindow *)widget())->isDockEnabled(TQt::DockRight); + else if(KviTQString::equalCI(szDockarea,"Bottom"))bFlag=((KviTalMainWindow *)widget())->isDockEnabled(TQt::DockBottom); + else if(KviTQString::equalCI(szDockarea,"Minimized")) bFlag=((KviTalMainWindow *)widget())->isDockEnabled(TQt::DockMinimized); + else if(KviTQString::equalCI(szDockarea,"TornOff")) bFlag=((KviTalMainWindow *)widget())->isDockEnabled(TQt::DockTornOff); + else if(KviTQString::equalCI(szDockarea,"Unmanaged")) bFlag=((KviTalMainWindow *)widget())->isDockEnabled(TQt::DockUnmanaged); else { c->warning(__tr2qs("Unknown dock area '%Q'"),&szDockarea); diff --git a/src/modules/objects/class_mainwindow.h b/src/modules/objects/class_mainwindow.h index 7afddf8c..40abd769 100644 --- a/src/modules/objects/class_mainwindow.h +++ b/src/modules/objects/class_mainwindow.h @@ -23,7 +23,7 @@ // Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // -//#include +//#include #include "class_widget.h" #include "object_macros.h" @@ -32,7 +32,7 @@ class KviKvsObject_mainwindow : public KviKvsObject_widget public: KVSO_DECLARE_OBJECT(KviKvsObject_mainwindow) public: - QWidget * widget() { return (QWidget *)object(); }; + TQWidget * widget() { return (TQWidget *)object(); }; protected: virtual bool init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams); diff --git a/src/modules/objects/class_menubar.cpp b/src/modules/objects/class_menubar.cpp index 90ad0e7d..860ffafc 100644 --- a/src/modules/objects/class_menubar.cpp +++ b/src/modules/objects/class_menubar.cpp @@ -61,16 +61,16 @@ KVSO_END_CONSTRUCTOR(KviKvsObject_menubar) bool KviKvsObject_menubar::init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams) { - setObject(new QMenuBar(parentScriptWidget(), name())); + setObject(TQT_TQOBJECT(new TQMenuBar(tqparentScriptWidget(), name()))); return true; } bool KviKvsObject_menubar::functionInsertItem(KviKvsObjectFunctionCall *c) { - QString szItem; + TQString szItem; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("item",KVS_PT_STRING,0,szItem) KVSO_PARAMETERS_END(c) - if (widget()) ((QMenuBar *)widget())->insertItem(szItem); + if (widget()) ((TQMenuBar *)widget())->insertItem(szItem); return true; } diff --git a/src/modules/objects/class_menubar.h b/src/modules/objects/class_menubar.h index c959d272..21346c4c 100644 --- a/src/modules/objects/class_menubar.h +++ b/src/modules/objects/class_menubar.h @@ -22,7 +22,7 @@ // Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // -#include +#include #include "class_widget.h" #include "object_macros.h" @@ -31,7 +31,7 @@ class KviKvsObject_menubar : public KviKvsObject_widget public: KVSO_DECLARE_OBJECT(KviKvsObject_menubar) public: - QWidget * widget() { return (QWidget *)object(); }; + TQWidget * widget() { return (TQWidget *)object(); }; protected: virtual bool init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams); diff --git a/src/modules/objects/class_multilineedit.cpp b/src/modules/objects/class_multilineedit.cpp index 6b2f8af9..fa9181e5 100644 --- a/src/modules/objects/class_multilineedit.cpp +++ b/src/modules/objects/class_multilineedit.cpp @@ -28,25 +28,25 @@ #include "kvi_debug.h" #include "kvi_locale.h" #include "kvi_malloc.h" -#include +#include #ifdef COMPILE_USE_QT4 - #include -#include + #include +#include -#include +#include #define KviTalMultiLineEdit Q3MultiLineEdit -#define QTEXTEDIT_AUTO_ALL Q3TextEdit::AutoAll -#define QTEXTEDIT_AUTO_NONE Q3TextEdit::AutoNone -#define QTEXTEDIT_AUTO_BULLET_LIST Q3TextEdit::AutoBulletList +#define TQTEXTEDIT_AUTO_ALL Q3TextEdit::AutoAll +#define TQTEXTEDIT_AUTO_NONE Q3TextEdit::AutoNone +#define TQTEXTEDIT_AUTO_BULLET_LIST Q3TextEdit::AutoBulletList #else - #include + #include - #include - #define KviTalMultiLineEdit QMultiLineEdit - #define QTEXTEDIT_AUTO_ALL QTextEdit::AutoAll - #define QTEXTEDIT_AUTO_NONE QTextEdit::AutoNone - #define QTEXTEDIT_AUTO_BULLET_LIST QTextEdit::AutoBulletList + #include + #define KviTalMultiLineEdit TQMultiLineEdit + #define TQTEXTEDIT_AUTO_ALL TQTextEdit::AutoAll + #define TQTEXTEDIT_AUTO_NONE TQTextEdit::AutoNone + #define TQTEXTEDIT_AUTO_BULLET_LIST TQTextEdit::AutoBulletList #endif @@ -63,10 +63,10 @@ static char * const mod_tbl[] = { }; static int mod_cod[] = { - Qt::PlainText, - Qt::RichText, - Qt::AutoText, - Qt::LogText + TQt::PlainText, + TQt::RichText, + TQt::AutoText, + TQt::LogText }; #define mod_num (sizeof(mod_tbl) / sizeof(mod_tbl[0])) @@ -226,15 +226,15 @@ static int mod_cod[] = { Returns 1(TRUE) if undo is available; otherwise returns 0(FALSE). !fn: $isRedoAvailable () Returns 1(TRUE) if redo is available; otherwise returns 0(FALSE). - !fn: $setAlignment() - Sets the alignment of the current paragraph to . Valid values are:[br] + !fn: $tqsetAlignment() + Sets the tqalignment of the current paragraph to . Valid values are:[br] - AlignAuto - Aligns according to the language.[br] - - Qt::AlignLeft - Aligns with the left edge.[br] - - Qt::AlignRight - Aligns with the right edge.[br] - - Qt::AlignCenter - Centers in both dimensions. - !fn: $setVerticalAlignment() - Sets the vertical alignment of the current format to . Valid Values are:[br] - - AlignNormal - Normal alignment.[br] + - TQt::AlignLeft - Aligns with the left edge.[br] + - TQt::AlignRight - Aligns with the right edge.[br] + - TQt::AlignCenter - Centers in both dimensions. + !fn: $setVerticalAlignment() + Sets the vertical tqalignment of the current format to . Valid Values are:[br] + - AlignNormal - Normal tqalignment.[br] - AlignSuperScript - Superscript.[br] - AlignSubScript - Subscript. !fn: $setAutoFormatting() @@ -323,7 +323,7 @@ KVSO_BEGIN_REGISTERCLASS(KviKvsObject_mledit,"multilineedit","widget") KVSO_REGISTER_HANDLER(KviKvsObject_mledit,"setParagraphBackgroundColor", functionsetParagraphBackgroundColor) KVSO_REGISTER_HANDLER(KviKvsObject_mledit,"clearParagraphBackgroundColor", functionsetParagraphBackgroundColor) KVSO_REGISTER_HANDLER(KviKvsObject_mledit,"loadFile" , functionloadFile); // let's fantasy - KVSO_REGISTER_HANDLER(KviKvsObject_mledit,"setAlignment" , functionsetAlignment) + KVSO_REGISTER_HANDLER(KviKvsObject_mledit,"tqsetAlignment" , functiontqsetAlignment) KVSO_REGISTER_HANDLER(KviKvsObject_mledit,"setAutoFormatting" , functionsetAutoFormatting) KVSO_REGISTER_HANDLER(KviKvsObject_mledit,"setVerticalAlignment" , functionsetVerticalAlignment) KVSO_REGISTER_HANDLER(KviKvsObject_mledit,"setWrapPolicy" , functionsetWrapPolicy) @@ -353,7 +353,7 @@ KVSO_END_CONSTRUCTOR(KviKvsObject_mledit) bool KviKvsObject_mledit::init(KviKvsRunTimeContext * pContext,KviKvsVariantList * pParams) { - setObject(new KviTalMultiLineEdit(parentScriptWidget(),getName()),true); + setObject(TQT_TQOBJECT(new KviTalMultiLineEdit(tqparentScriptWidget(),getName())),true); return true; } @@ -389,7 +389,7 @@ bool KviKvsObject_mledit::functionInsertLine(KviKvsObjectFunctionCall *c) { kvs_int_t iLine; - QString szInsert; + TQString szInsert; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("text",KVS_PT_STRING,0,szInsert) KVSO_PARAMETER("line",KVS_PT_INT,KVS_PF_OPTIONAL,iLine) @@ -416,7 +416,7 @@ bool KviKvsObject_mledit::functionInsertAt(KviKvsObjectFunctionCall *c) { kvs_uint_t iLine,iCol; - QString szInsert; + TQString szInsert; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("text",KVS_PT_STRING,0,szInsert) KVSO_PARAMETER("line",KVS_PT_UNSIGNEDINTEGER,0,iLine) @@ -456,11 +456,7 @@ bool KviKvsObject_mledit::functionCursorPosition(KviKvsObjectFunctionCall *c) { if(!widget()) return true; int line, col; - #if QT_VERSION >= 300 - ((KviTalMultiLineEdit *)widget())->getCursorPosition(&line, &col); - #else - ((KviTalMultiLineEdit *)widget())->cursorPosition(&line, &col); - #endif + ((KviTalMultiLineEdit *)widget())->getCursorPosition(&line, &col); KviKvsArray * a = new KviKvsArray(); a->set(0,new KviKvsVariant((kvs_int_t)line)); a->set(1,new KviKvsVariant((kvs_int_t)col)); @@ -485,17 +481,17 @@ bool KviKvsObject_mledit::functionAtEnd(KviKvsObjectFunctionCall *c) bool KviKvsObject_mledit::functionSetWordWrap(KviKvsObjectFunctionCall *c) { if(!widget())return true; - QString szWrap; + TQString szWrap; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("word_wrap",KVS_PT_STRING,0,szWrap) KVSO_PARAMETERS_END(c) - if(KviQString::equalCI(szWrap,"NoWrap")) + if(KviTQString::equalCI(szWrap,"NoWrap")) ((KviTalMultiLineEdit *)widget())->setWordWrap(KviTalMultiLineEdit::NoWrap); - else if(KviQString::equalCI(szWrap,"WidgetWidth")) + else if(KviTQString::equalCI(szWrap,"WidgetWidth")) ((KviTalMultiLineEdit *)widget())->setWordWrap(KviTalMultiLineEdit::WidgetWidth); - else if(KviQString::equalCI(szWrap,"FixedPixelWidth")) + else if(KviTQString::equalCI(szWrap,"FixedPixelWidth")) ((KviTalMultiLineEdit *)widget())->setWordWrap(KviTalMultiLineEdit::FixedPixelWidth); - else if(KviQString::equalCI(szWrap,"FixedColumnWidth")) + else if(KviTQString::equalCI(szWrap,"FixedColumnWidth")) ((KviTalMultiLineEdit *)widget())->setWordWrap(KviTalMultiLineEdit::FixedColumnWidth); else c->warning(__tr2qs("Unknown word wrap '%Q'"),&szWrap); return true; @@ -504,17 +500,17 @@ bool KviKvsObject_mledit::functionSetWordWrap(KviKvsObjectFunctionCall *c) bool KviKvsObject_mledit::functionsetWrapPolicy(KviKvsObjectFunctionCall *c) { if(!widget())return true; - QString szPolicy; + TQString szPolicy; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("wrap_policy",KVS_PT_STRING,0,szPolicy) KVSO_PARAMETERS_END(c) - if(KviQString::equalCI(szPolicy,"AtWhiteSpace)")) + if(KviTQString::equalCI(szPolicy,"AtWhiteSpace)")) ((KviTalMultiLineEdit *)widget())->setWrapPolicy(KviTalMultiLineEdit::AtWhiteSpace); - else if(KviQString::equalCI(szPolicy,"Anywhere")) + else if(KviTQString::equalCI(szPolicy,"Anywhere")) ((KviTalMultiLineEdit *)widget())->setWrapPolicy(KviTalMultiLineEdit::Anywhere); - else if(KviQString::equalCI(szPolicy,"AtWordBoundary")) + else if(KviTQString::equalCI(szPolicy,"AtWordBoundary")) ((KviTalMultiLineEdit *)widget())->setWrapPolicy(KviTalMultiLineEdit::AtWordBoundary); - else if(KviQString::equalCI(szPolicy,"AtWordOrDocumentBoundary")) + else if(KviTQString::equalCI(szPolicy,"AtWordOrDocumentBoundary")) ((KviTalMultiLineEdit *)widget())->setWrapPolicy(KviTalMultiLineEdit::AtWordOrDocumentBoundary); else c->warning(__tr2qs("Unknown wrap policy'%Q'"),&szPolicy); return true; @@ -564,7 +560,7 @@ bool KviKvsObject_mledit::functionMaxLines(KviKvsObjectFunctionCall *c) bool KviKvsObject_mledit::functionInsert(KviKvsObjectFunctionCall *c) { - QString szInsert; + TQString szInsert; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("text",KVS_PT_STRING,0,szInsert) KVSO_PARAMETERS_END(c) @@ -576,7 +572,7 @@ bool KviKvsObject_mledit::functionInsert(KviKvsObjectFunctionCall *c) bool KviKvsObject_mledit::functionAppend(KviKvsObjectFunctionCall *c) { - QString szAppend; + TQString szAppend; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("text",KVS_PT_STRING,0,szAppend) KVSO_PARAMETERS_END(c) @@ -780,7 +776,7 @@ bool KviKvsObject_mledit::functionundoDepth(KviKvsObjectFunctionCall *c) // Findme bool KviKvsObject_mledit::functionsetText(KviKvsObjectFunctionCall *c) { - QString szText; + TQString szText; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("text",KVS_PT_STRING,0,szText) KVSO_PARAMETERS_END(c) @@ -823,7 +819,7 @@ bool KviKvsObject_mledit::functionsetColor(KviKvsObjectFunctionCall *c) if (c->params()->count()==1) { bool bOk,bOk1,bOk2; - QString value; + TQString value; pColArray->asString(value); int i=0; if (value.length()!=6) @@ -831,7 +827,7 @@ bool KviKvsObject_mledit::functionsetColor(KviKvsObjectFunctionCall *c) c->warning(__tr2qs("A string of 6 digits hex is required")); return true; } - QString buffer(value.mid(0,2)); + TQString buffer(value.mid(0,2)); iColR=buffer.toInt(&bOk,16); buffer=value.mid(2,2); iColG=buffer.toInt(&bOk1,16); @@ -842,7 +838,7 @@ bool KviKvsObject_mledit::functionsetColor(KviKvsObjectFunctionCall *c) c->warning(__tr2qs("Not an hex digits")); return true; } - if (widget()) ((KviTalMultiLineEdit *)widget())->setColor(QColor(iColR,iColG,iColB)); + if (widget()) ((KviTalMultiLineEdit *)widget())->setColor(TQColor(iColR,iColG,iColB)); return true; } if(c->params()->count() < 3) @@ -856,7 +852,7 @@ bool KviKvsObject_mledit::functionsetColor(KviKvsObjectFunctionCall *c) return false; } } - if (widget()) ((KviTalMultiLineEdit *)widget())->setColor(QColor(iColR,iColG,iColB)); + if (widget()) ((KviTalMultiLineEdit *)widget())->setColor(TQColor(iColR,iColG,iColB)); return true; } @@ -884,7 +880,7 @@ bool KviKvsObject_mledit::functionsetLinkUnderline(KviKvsObjectFunctionCall *c) bool KviKvsObject_mledit::functionsetFamily(KviKvsObjectFunctionCall *c) { - QString szFamily; + TQString szFamily; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("family",KVS_PT_STRING,0,szFamily) KVSO_PARAMETERS_END(c) @@ -907,7 +903,7 @@ bool KviKvsObject_mledit::functionsetModified(KviKvsObjectFunctionCall *c) bool KviKvsObject_mledit::functioninsertParagraph(KviKvsObjectFunctionCall *c) { kvs_int_t iParagraph; - QString szText; + TQString szText; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("text",KVS_PT_STRING,0,szText) KVSO_PARAMETER("paragraph",KVS_PT_INT,0,iParagraph) @@ -944,7 +940,7 @@ bool KviKvsObject_mledit::functiontextFormat(KviKvsObjectFunctionCall *c) { if(!widget())return true; int fstyle = ((KviTalMultiLineEdit *)widget())->textFormat(); - QString format=""; + TQString format=""; for(unsigned int i = 0; i < mod_num; i++) { if(fstyle & mod_cod[i]) @@ -959,19 +955,19 @@ bool KviKvsObject_mledit::functiontextFormat(KviKvsObjectFunctionCall *c) bool KviKvsObject_mledit::functionsetTextFormat(KviKvsObjectFunctionCall *c) { - QString szFormat; + TQString szFormat; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("textformat",KVS_PT_STRING,0,szFormat) KVSO_PARAMETERS_END(c) if(!widget()) return true; - if(KviQString::equalCI(szFormat,"PlainText")) - ((KviTalMultiLineEdit *)widget())->setTextFormat(Qt::PlainText); - else if(KviQString::equalCI(szFormat,"RichText")) - ((KviTalMultiLineEdit *)widget())->setTextFormat(Qt::RichText); - else if(KviQString::equalCI(szFormat,"LogText")) - ((KviTalMultiLineEdit *)widget())->setTextFormat(Qt::LogText); - else if(KviQString::equalCI(szFormat,"AutoText")) - ((KviTalMultiLineEdit *)widget())->setTextFormat(Qt::AutoText); + if(KviTQString::equalCI(szFormat,"PlainText")) + ((KviTalMultiLineEdit *)widget())->setTextFormat(TQt::PlainText); + else if(KviTQString::equalCI(szFormat,"RichText")) + ((KviTalMultiLineEdit *)widget())->setTextFormat(TQt::RichText); + else if(KviTQString::equalCI(szFormat,"LogText")) + ((KviTalMultiLineEdit *)widget())->setTextFormat(TQt::LogText); + else if(KviTQString::equalCI(szFormat,"AutoText")) + ((KviTalMultiLineEdit *)widget())->setTextFormat(TQt::AutoText); else c->warning(__tr2qs("Unknown text format '%Q'"),&szFormat); return true; } @@ -1012,7 +1008,7 @@ bool KviKvsObject_mledit::functionsetParagraphBackgroundColor(KviKvsObjectFuncti if (c->params()->count()==1) { bool bOk,bOk1,bOk2; - QString value; + TQString value; pColArray->asString(value); int i=0; if (value.length()!=6) @@ -1020,7 +1016,7 @@ bool KviKvsObject_mledit::functionsetParagraphBackgroundColor(KviKvsObjectFuncti c->warning(__tr2qs("A string of 6 digits hex is required")); return true; } - QString buffer(value.mid(0,2)); + TQString buffer(value.mid(0,2)); iColR=buffer.toInt(&bOk,16); buffer=value.mid(2,2); iColG=buffer.toInt(&bOk1,16); @@ -1031,7 +1027,7 @@ bool KviKvsObject_mledit::functionsetParagraphBackgroundColor(KviKvsObjectFuncti c->warning(__tr2qs("Not an hex digits")); return true; } - if (widget()) ((KviTalMultiLineEdit *)widget())->setParagraphBackgroundColor(iParagraph,QColor(iColR,iColG,iColB)); + if (widget()) ((KviTalMultiLineEdit *)widget())->setParagraphBackgroundColor(iParagraph,TQColor(iColR,iColG,iColB)); return true; } if(c->params()->count() < 3) @@ -1045,7 +1041,7 @@ bool KviKvsObject_mledit::functionsetParagraphBackgroundColor(KviKvsObjectFuncti return false; } } - if (widget()) ((KviTalMultiLineEdit *)widget())->setParagraphBackgroundColor(iParagraph,QColor(iColR,iColG,iColB)); + if (widget()) ((KviTalMultiLineEdit *)widget())->setParagraphBackgroundColor(iParagraph,TQColor(iColR,iColG,iColB)); return true; } @@ -1062,31 +1058,31 @@ bool KviKvsObject_mledit::functionclearParagraphBackground(KviKvsObjectFunctionC bool KviKvsObject_mledit::functionloadFile(KviKvsObjectFunctionCall *c) { - QString szFile; + TQString szFile; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("file_name",KVS_PT_STRING,0,szFile) KVSO_PARAMETERS_END(c) - if ( !QFile::exists(szFile)) + if ( !TQFile::exists(szFile)) { c->warning(__tr2qs(" I can't find the specified file '%Q'."),&szFile); return true; } - QFile file( szFile ); + TQFile file( szFile ); if ( !file.open( IO_ReadOnly ) ) { c->warning(__tr2qs(" I cannot read the file %Q'."),&szFile); return true; } - QTextStream ts( &file ); - QString txt = ts.read(); + TQTextStream ts( &file ); + TQString txt = ts.read(); #ifdef COMPILE_USE_QT4 if ( !Q3StyleSheet::mightBeRichText( txt ) ) txt = Q3StyleSheet::convertFromPlainText( txt, Q3StyleSheetItem::WhiteSpacePre ); #else - if ( !QStyleSheet::mightBeRichText( txt ) ) - txt = QStyleSheet::convertFromPlainText( txt, QStyleSheetItem::WhiteSpacePre ); + if ( !TQStyleSheet::mightBeRichText( txt ) ) + txt = TQStyleSheet::convertFromPlainText( txt, TQStyleSheetItem::WhiteSpacePre ); #endif ((KviTalMultiLineEdit *)widget())->setText( txt ); @@ -1094,40 +1090,40 @@ bool KviKvsObject_mledit::functionloadFile(KviKvsObjectFunctionCall *c) return true; } -bool KviKvsObject_mledit::functionsetAlignment(KviKvsObjectFunctionCall *c) +bool KviKvsObject_mledit::functiontqsetAlignment(KviKvsObjectFunctionCall *c) { - QString szAlignment; + TQString szAlignment; KVSO_PARAMETERS_BEGIN(c) - KVSO_PARAMETER("alignment",KVS_PT_STRING,0,szAlignment) + KVSO_PARAMETER("tqalignment",KVS_PT_STRING,0,szAlignment) KVSO_PARAMETERS_END(c) if(!widget()) return true; - if(KviQString::equalCI(szAlignment,"Left")) - ((KviTalMultiLineEdit *)widget())->setAlignment(Qt::AlignLeft); - else if(KviQString::equalCI(szAlignment,"Right")) - ((KviTalMultiLineEdit *)widget())->setAlignment(Qt::AlignRight); - else if(KviQString::equalCI(szAlignment,"Center")) - ((KviTalMultiLineEdit *)widget())->setAlignment(Qt::AlignCenter); - else if(KviQString::equalCI(szAlignment,"Justify")) - ((KviTalMultiLineEdit *)widget())->setAlignment(Qt::AlignJustify); - else c->warning(__tr2qs("Unknown alignment '%Q'"),&szAlignment); + if(KviTQString::equalCI(szAlignment,"Left")) + ((KviTalMultiLineEdit *)widget())->tqsetAlignment(TQt::AlignLeft); + else if(KviTQString::equalCI(szAlignment,"Right")) + ((KviTalMultiLineEdit *)widget())->tqsetAlignment(TQt::AlignRight); + else if(KviTQString::equalCI(szAlignment,"Center")) + ((KviTalMultiLineEdit *)widget())->tqsetAlignment(TQt::AlignCenter); + else if(KviTQString::equalCI(szAlignment,"Justify")) + ((KviTalMultiLineEdit *)widget())->tqsetAlignment(TQt::AlignJustify); + else c->warning(__tr2qs("Unknown tqalignment '%Q'"),&szAlignment); return true; } bool KviKvsObject_mledit::functionsetAutoFormatting(KviKvsObjectFunctionCall *c) { - QString szAutoformatting; + TQString szAutoformatting; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("autoformatting",KVS_PT_STRING,0,szAutoformatting) KVSO_PARAMETERS_END(c) if(!widget()) return true; - if(KviQString::equalCI(szAutoformatting,"AutoNone")) - ((KviTalMultiLineEdit *)widget())->setAutoFormatting(QTEXTEDIT_AUTO_NONE); - else if(KviQString::equalCI(szAutoformatting,"BulletList")) - ((KviTalMultiLineEdit *)widget())->setAutoFormatting(QTEXTEDIT_AUTO_BULLET_LIST); - else if(KviQString::equalCI(szAutoformatting,"AutoAll")) - ((KviTalMultiLineEdit *)widget())->setAutoFormatting(QTEXTEDIT_AUTO_ALL); + if(KviTQString::equalCI(szAutoformatting,"AutoNone")) + ((KviTalMultiLineEdit *)widget())->setAutoFormatting(TQTEXTEDIT_AUTO_NONE); + else if(KviTQString::equalCI(szAutoformatting,"BulletList")) + ((KviTalMultiLineEdit *)widget())->setAutoFormatting(TQTEXTEDIT_AUTO_BULLET_LIST); + else if(KviTQString::equalCI(szAutoformatting,"AutoAll")) + ((KviTalMultiLineEdit *)widget())->setAutoFormatting(TQTEXTEDIT_AUTO_ALL); else c->warning(__tr2qs("Unknown auto formatting mode '%Q'"),&szAutoformatting); return true; } @@ -1135,18 +1131,18 @@ bool KviKvsObject_mledit::functionsetAutoFormatting(KviKvsObjectFunctionCall *c) bool KviKvsObject_mledit::functionsetVerticalAlignment(KviKvsObjectFunctionCall *c) { - QString szValignment; + TQString szVtqalignment; KVSO_PARAMETERS_BEGIN(c) - KVSO_PARAMETER("alignment",KVS_PT_STRING,0,szValignment) + KVSO_PARAMETER("tqalignment",KVS_PT_STRING,0,szVtqalignment) KVSO_PARAMETERS_END(c) if(!widget()) return true; - if(KviQString::equalCI(szValignment,"Normal")) + if(KviTQString::equalCI(szVtqalignment,"Normal")) ((KviTalMultiLineEdit *)widget())->setVerticalAlignment(KviTalMultiLineEdit::AlignNormal); - else if(KviQString::equalCI(szValignment,"SuperScript")) + else if(KviTQString::equalCI(szVtqalignment,"SuperScript")) ((KviTalMultiLineEdit *)widget())->setVerticalAlignment(KviTalMultiLineEdit::AlignSuperScript); - else if(KviQString::equalCI(szValignment,"SubScript")) + else if(KviTQString::equalCI(szVtqalignment,"SubScript")) ((KviTalMultiLineEdit *)widget())->setVerticalAlignment(KviTalMultiLineEdit::AlignSubScript); - else c->warning(__tr2qs("Unknown vertical alignment '%Q'"),&szValignment); + else c->warning(__tr2qs("Unknown vertical tqalignment '%Q'"),&szVtqalignment); return true; } diff --git a/src/modules/objects/class_multilineedit.h b/src/modules/objects/class_multilineedit.h index 8639266e..5f531ed8 100644 --- a/src/modules/objects/class_multilineedit.h +++ b/src/modules/objects/class_multilineedit.h @@ -32,10 +32,11 @@ class KviKvsObject_mledit : public KviKvsObject_widget { Q_OBJECT + TQ_OBJECT public: KVSO_DECLARE_OBJECT(KviKvsObject_mledit) public: - QWidget * widget() { return (QWidget *)object(); }; + TQWidget * widget() { return (TQWidget *)object(); }; protected: virtual bool init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams); bool functionTextLine(KviKvsObjectFunctionCall *c); @@ -94,7 +95,7 @@ protected: bool functionsetParagraphBackgroundColor(KviKvsObjectFunctionCall *c); bool functionclearParagraphBackground(KviKvsObjectFunctionCall *c); bool functionloadFile(KviKvsObjectFunctionCall *c); - bool functionsetAlignment(KviKvsObjectFunctionCall *c); + bool functiontqsetAlignment(KviKvsObjectFunctionCall *c); bool functionsetAutoFormatting(KviKvsObjectFunctionCall *c); bool functionsetVerticalAlignment(KviKvsObjectFunctionCall *c); bool functionsetWrapPolicy(KviKvsObjectFunctionCall *c); diff --git a/src/modules/objects/class_painter.cpp b/src/modules/objects/class_painter.cpp index b27a24a3..a9adda33 100644 --- a/src/modules/objects/class_painter.cpp +++ b/src/modules/objects/class_painter.cpp @@ -41,12 +41,12 @@ @type: class @short: - This class provide a painter to paint line and shapes. + This class provide a painter to paint line and tqshapes. @inherits: [class]object[/class] [class]widget[/class] @description: - With this class you can draw many graphics objects from simple lines to complex shapes like pies and chords.[br] + With this class you can draw many graphics objects from simple lines to complex tqshapes like pies and chords.[br] It can also draw aligned text and pixmaps. Normally, it draws in a "natural" coordinate system, but it can also do view and world transformation.[br] The class need to be implemented into a [classfnc]$paintEvent[/classfnc](); @functions: @@ -196,8 +196,8 @@ timerevent()[br] {[br] $$->%b = $(($$->%b + 1) & 15);[br] - if ($$->%nextanim == 1) $$->$repaint(1);[br] - $$->$repaint(0);[br] + if ($$->%nextanim == 1) $$->$tqrepaint(1);[br] + $$->$tqrepaint(0);[br] }[br] drawAnim()[br] {[br] @@ -311,19 +311,19 @@ [br] privateimpl(%Btn,mousepressevent)[br] {[br] - if ($$->$parent->%nextanim==0) [br] + if ($$->$tqparent->%nextanim==0) [br] {[br] - $$->$parent->%nextanim=1[br] + $$->$tqparent->%nextanim=1[br] $$->$settext(Prev)[br] } [br] else[br] {[br] - $$->$parent->%nextanim=0[br] + $$->$tqparent->%nextanim=0[br] $$->$settext(Next)[br] }[br] }[br] [br] - %lay=$new(layout,%Hello)[br] + %lay=$new(tqlayout,%Hello)[br] %lay->$addwidget(%Btn,4,0)[br] %Hello->$setBackgroundColor("000000");[br] %Hello->$setmaximumwidth(800)[br] @@ -387,7 +387,7 @@ KVSO_END_REGISTERCLASS(KviKvsObject_painter) KVSO_BEGIN_CONSTRUCTOR(KviKvsObject_painter,KviKvsObject) - m_pPainter = new QPainter(); + m_pPainter = new TQPainter(); m_pDeviceObject=0; @@ -414,18 +414,18 @@ if(__pXOrArray->isArray())\ KviKvsVariant * pH = __pXOrArray->array()->at(3);\ if(!(pX && pY && pW && pH))\ {\ - c->error(__tr2qs("One of the geometry array parameters is empty"));\ + c->error(__tr2qs("One of the tqgeometry array parameters is empty"));\ return false;\ }\ if(!(pX->asInteger(iX) && pY->asInteger(__iY) && pW->asInteger(__iW) && pH->asInteger(__iH)))\ {\ - c->error(__tr2qs("One of the geometry array parameters didn't evaluate to an integer"));\ + c->error(__tr2qs("One of the tqgeometry array parameters didn't evaluate to an integer"));\ return false;\ }\ } else {\ if(c->params()->count() < 4)\ {\ - QString error=function+" requires either an array as first parameter or four integers";\ + TQString error=function+" requires either an array as first parameter or four integers";\ c->error(__tr2qs(error));\ return false;\ }\ @@ -459,7 +459,7 @@ if(__pXOrArray->isArray())\ } else {\ if(c->params()->count() < 2)\ {\ - QString error=function+" requires either an array as first parameter or two integers";\ + TQString error=function+" requires either an array as first parameter or two integers";\ c->error(__tr2qs(error));\ return false;\ }\ @@ -494,7 +494,7 @@ if(__pCol1OrArray->isArray())\ } else {\ if(c->params()->count() < 3)\ {\ - QString error=function+" requires either an array as first parameter or 3 integers";\ + TQString error=function+" requires either an array as first parameter or 3 integers";\ c->error(__tr2qs(error));\ return false;\ }\ @@ -507,7 +507,7 @@ if(__pCol1OrArray->isArray())\ bool KviKvsObject_painter::functionSetFont(KviKvsObjectFunctionCall *c) { - QString szFamily,szStyle; + TQString szFamily,szStyle; kvs_int_t uSize; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("size",KVS_PT_UNSIGNEDINTEGER,0,uSize) @@ -515,15 +515,15 @@ bool KviKvsObject_painter::functionSetFont(KviKvsObjectFunctionCall *c) KVSO_PARAMETER("style",KVS_PT_STRING,0,szStyle) KVSO_PARAMETERS_END(c) if(!m_pPainter)return true; - QFont font=m_pPainter->font(); + TQFont font=m_pPainter->font(); font.setFamily(szFamily); font.setPointSize(uSize); - if(KviQString::equalCI(szStyle,"italic")) font.setItalic(TRUE); - if(KviQString::equalCI(szStyle,"bold")) font.setBold(TRUE); - if(KviQString::equalCI(szStyle,"underline"))font.setUnderline(TRUE); - if(KviQString::equalCI(szStyle,"overline")) font.setOverline(TRUE); - if(KviQString::equalCI(szStyle,"strikeout"))font.setStrikeOut(TRUE); - if(KviQString::equalCI(szStyle,"fixedpitch")) font.setFixedPitch(TRUE); + if(KviTQString::equalCI(szStyle,"italic")) font.setItalic(TRUE); + if(KviTQString::equalCI(szStyle,"bold")) font.setBold(TRUE); + if(KviTQString::equalCI(szStyle,"underline"))font.setUnderline(TRUE); + if(KviTQString::equalCI(szStyle,"overline")) font.setOverline(TRUE); + if(KviTQString::equalCI(szStyle,"strikeout"))font.setStrikeOut(TRUE); + if(KviTQString::equalCI(szStyle,"fixedpitch")) font.setFixedPitch(TRUE); m_pPainter->setFont(font); return true; } @@ -534,20 +534,20 @@ bool KviKvsObject_painter::functionSetFontSize(KviKvsObjectFunctionCall *c) KVSO_PARAMETER("size",KVS_PT_UNSIGNEDINTEGER,0,uSize) KVSO_PARAMETERS_END(c) if(!m_pPainter)return true; - QFont font=m_pPainter->font(); + TQFont font=m_pPainter->font(); font.setPointSize(uSize); m_pPainter->setFont(font); return true; } bool KviKvsObject_painter::functionsetBackGroundMode(KviKvsObjectFunctionCall *c) { - QString szMode; + TQString szMode; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("background mode",KVS_PT_STRING,0,szMode) KVSO_PARAMETERS_END(c) if(!m_pPainter)return true; - if(KviQString::equalCI(szMode,"Transparent")) m_pPainter->setBackgroundMode(Qt::TransparentMode); - else if(KviQString::equalCI(szMode,"Opaque")) m_pPainter->setBackgroundMode(Qt::OpaqueMode); + if(KviTQString::equalCI(szMode,"Transparent")) m_pPainter->setBackgroundMode(Qt::TransparentMode); + else if(KviTQString::equalCI(szMode,"Opaque")) m_pPainter->setBackgroundMode(Qt::OpaqueMode); else c->warning( __tr2qs("Unknown orientation")); return true; @@ -563,7 +563,7 @@ bool KviKvsObject_painter::functiondrawLine(KviKvsObjectFunctionCall *c) KVSO_PARAMETER("w",KVS_PT_INT,KVS_PF_OPTIONAL,iW) KVSO_PARAMETER("h",KVS_PT_INT,KVS_PF_OPTIONAL,iH) KVSO_PARAMETERS_END(c) - QString function="$drawLine"; + TQString function="$drawLine"; KVSO_PARAMETERS_PAINTER(pXOrArray,iY,iW,iH) if(m_pPainter) m_pPainter->drawLine(iX,iY,iW,iH); return true; @@ -578,7 +578,7 @@ bool KviKvsObject_painter::functiondrawRect(KviKvsObjectFunctionCall *c) KVSO_PARAMETER("w",KVS_PT_INT,KVS_PF_OPTIONAL,iW) KVSO_PARAMETER("h",KVS_PT_INT,KVS_PF_OPTIONAL,iH) KVSO_PARAMETERS_END(c) - QString function="$drawRect"; + TQString function="$drawRect"; KVSO_PARAMETERS_PAINTER(pXOrArray,iY,iW,iH) if(m_pPainter) m_pPainter->drawRect(iX,iY,iW,iH); return true; @@ -594,7 +594,7 @@ bool KviKvsObject_painter::functiondrawWinFocusRect(KviKvsObjectFunctionCall *c) KVSO_PARAMETER("w",KVS_PT_INT,KVS_PF_OPTIONAL,iW) KVSO_PARAMETER("h",KVS_PT_INT,KVS_PF_OPTIONAL,iH) KVSO_PARAMETERS_END(c) - QString function="$drawWinFocusRect"; + TQString function="$drawWinFocusRect"; KVSO_PARAMETERS_PAINTER(pXOrArray,iY,iW,iH) #ifndef COMPILE_USE_QT4 if(m_pPainter) m_pPainter->drawWinFocusRect(iX,iY,iW,iH); @@ -611,7 +611,7 @@ bool KviKvsObject_painter::functiondrawEllipse(KviKvsObjectFunctionCall *c) KVSO_PARAMETER("w",KVS_PT_INT,KVS_PF_OPTIONAL,iW) KVSO_PARAMETER("h",KVS_PT_INT,KVS_PF_OPTIONAL,iH) KVSO_PARAMETERS_END(c) - QString function="$drawEllipse"; + TQString function="$drawEllipse"; KVSO_PARAMETERS_PAINTER(pXOrArray,iY,iW,iH) if(m_pPainter) m_pPainter->drawEllipse(iX,iY,iW,iH); return true; @@ -628,7 +628,7 @@ bool KviKvsObject_painter::functiondrawRoundRect(KviKvsObjectFunctionCall *c) KVSO_PARAMETER("w",KVS_PT_INT,KVS_PF_OPTIONAL,iW) KVSO_PARAMETER("h",KVS_PT_INT,KVS_PF_OPTIONAL,iH) KVSO_PARAMETERS_END(c) - QString function="$drawRoundRect"; + TQString function="$drawRoundRect"; KVSO_PARAMETERS_PAINTER(pXOrArray,iY,iW,iH) if(m_pPainter) m_pPainter->drawRoundRect(iX,iY,iW,iH,iXrnd,iYrnd); @@ -646,7 +646,7 @@ bool KviKvsObject_painter::functiondrawArc(KviKvsObjectFunctionCall *c) KVSO_PARAMETER("w",KVS_PT_INT,KVS_PF_OPTIONAL,iW) KVSO_PARAMETER("h",KVS_PT_INT,KVS_PF_OPTIONAL,iH) KVSO_PARAMETERS_END(c) - QString function="$drawArc"; + TQString function="$drawArc"; KVSO_PARAMETERS_PAINTER(pXOrArray,iY,iW,iH) if(m_pPainter) m_pPainter->drawArc(iX,iY,iW,iH,iSangle,iLena); @@ -664,7 +664,7 @@ bool KviKvsObject_painter::functiondrawChord(KviKvsObjectFunctionCall *c) KVSO_PARAMETER("w",KVS_PT_INT,KVS_PF_OPTIONAL,iW) KVSO_PARAMETER("h",KVS_PT_INT,KVS_PF_OPTIONAL,iH) KVSO_PARAMETERS_END(c) - QString function="$drawChord"; + TQString function="$drawChord"; KVSO_PARAMETERS_PAINTER(pXOrArray,iY,iW,iH) if(m_pPainter) m_pPainter->drawChord(iX,iY,iW,iH,iSangle,iLena); @@ -674,40 +674,40 @@ bool KviKvsObject_painter::functionsetBrush(KviKvsObjectFunctionCall *c) { KviKvsVariant * pCol1OrArray; kvs_int_t iCol1,iCol2,iCol3; - QString szColorMode; + TQString szColorMode; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("Col1_or_array",KVS_PT_VARIANT,0,pCol1OrArray) KVSO_PARAMETER("Color_2",KVS_PT_INT,KVS_PF_OPTIONAL,iCol2) KVSO_PARAMETER("Colo3_3",KVS_PT_INT,KVS_PF_OPTIONAL,iCol3) KVSO_PARAMETER("color_mode",KVS_PT_STRING,KVS_PF_OPTIONAL,szColorMode) KVSO_PARAMETERS_END(c) - QString function="$drawChord"; + TQString function="$drawChord"; KVSO_3ARRAYPARAMETERS(pCol1OrArray,iCol2,iCol3) if(!m_pPainter) return true; - if(KviQString::equalCI(szColorMode, "HSV")) - m_pPainter->setBrush(QColor(iCol1,iCol2,iCol3,QColor::Hsv)); + if(KviTQString::equalCI(szColorMode, "HSV")) + m_pPainter->setBrush(TQColor(iCol1,iCol2,iCol3,TQColor::Hsv)); else - m_pPainter->setBrush(QColor(iCol1,iCol2,iCol3,QColor::Rgb)); + m_pPainter->setBrush(TQColor(iCol1,iCol2,iCol3,TQColor::Rgb)); return true; } bool KviKvsObject_painter::functionsetPen(KviKvsObjectFunctionCall *c) { KviKvsVariant * pCol1OrArray; kvs_int_t iCol1,iCol2,iCol3; - QString szColorMode; + TQString szColorMode; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("Col1_or_array",KVS_PT_VARIANT,0,pCol1OrArray) KVSO_PARAMETER("Color_2",KVS_PT_INT,KVS_PF_OPTIONAL,iCol2) KVSO_PARAMETER("Colo3_3",KVS_PT_INT,KVS_PF_OPTIONAL,iCol3) KVSO_PARAMETER("color_mode",KVS_PT_STRING,KVS_PF_OPTIONAL,szColorMode) KVSO_PARAMETERS_END(c) - QString function="$setPen"; + TQString function="$setPen"; KVSO_3ARRAYPARAMETERS(pCol1OrArray,iCol2,iCol3) if(!m_pPainter) return true; - if(KviQString::equalCI(szColorMode, "HSV")) - m_pPainter->setPen(QColor(iCol1,iCol2,iCol3,QColor::Hsv)); + if(KviTQString::equalCI(szColorMode, "HSV")) + m_pPainter->setPen(TQColor(iCol1,iCol2,iCol3,TQColor::Hsv)); else - m_pPainter->setPen(QColor(iCol1,iCol2,iCol3,QColor::Rgb)); + m_pPainter->setPen(TQColor(iCol1,iCol2,iCol3,TQColor::Rgb)); return true; } @@ -723,7 +723,7 @@ bool KviKvsObject_painter::functiondrawPie(KviKvsObjectFunctionCall *c) KVSO_PARAMETER("w",KVS_PT_INT,KVS_PF_OPTIONAL,iW) KVSO_PARAMETER("h",KVS_PT_INT,KVS_PF_OPTIONAL,iH) KVSO_PARAMETERS_END(c) - QString function="$drawPie"; + TQString function="$drawPie"; KVSO_PARAMETERS_PAINTER(pXOrArray,iY,iW,iH) if(m_pPainter) m_pPainter->drawPie(iX,iY,iW,iH,iSangle,iLena); @@ -737,7 +737,7 @@ bool KviKvsObject_painter::functiondrawPoint(KviKvsObjectFunctionCall *c) KVSO_PARAMETER("x_or_array",KVS_PT_VARIANT,0,pXOrArray) KVSO_PARAMETER("y",KVS_PT_INT,KVS_PF_OPTIONAL,iY) KVSO_PARAMETERS_END(c) - QString function="$drawPoint"; + TQString function="$drawPoint"; KVSO_2ARRAYPARAMETERS(pXOrArray,iY) if(m_pPainter) m_pPainter->drawPoint(iX,iY); @@ -760,7 +760,7 @@ bool KviKvsObject_painter::functionfontAscent(KviKvsObjectFunctionCall * c) bool KviKvsObject_painter::functionfontMetricsWidth(KviKvsObjectFunctionCall * c) { - QString szText; + TQString szText; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("text",KVS_PT_STRING,0,szText) KVSO_PARAMETERS_END(c) @@ -790,9 +790,9 @@ bool KviKvsObject_painter::functionbegin(KviKvsObjectFunctionCall *c) return true; } - QPaintDevice * pd = 0; - if(pObject->inherits("KviKvsObject_pixmap"))pd =((KviKvsObject_pixmap *)pObject)->getPixmap(); - else if (pObject->inherits("KviKvsObject_widget")) pd=((KviKvsObject_widget *)pObject)->widget(); + TQPaintDevice * pd = 0; + if(pObject->inherits("KviKvsObject_pixmap"))pd =TQT_TQPAINTDEVICE(((KviKvsObject_pixmap *)pObject)->getPixmap()); + else if (pObject->inherits("KviKvsObject_widget")) pd=TQT_TQPAINTDEVICE(((KviKvsObject_widget *)pObject)->widget()); if (!pd) c->warning(__tr2qs("Widget or Pixmap required ")); @@ -803,16 +803,16 @@ bool KviKvsObject_painter::functionbegin(KviKvsObjectFunctionCall *c) } return true; } -void KviKvsObject_painter::attachDevice(KviKvsObject * o,QPaintDevice * p) +void KviKvsObject_painter::attachDevice(KviKvsObject * o,TQPaintDevice * p) { if(!m_pPainter)return; if(m_pDeviceObject)detachDevice(); m_pDeviceObject = o; // KviKvsObject_pixmap and KviKvsObject_widget object have this signal - // it is emitted BEFORE the real QPaintDevice is deleted, so we can eventually + // it is emitted BEFORE the real TQPaintDevice is deleted, so we can eventually // call m_pPainter->end() in time - QObject::connect(m_pDeviceObject,SIGNAL(aboutToDie()),this,SLOT(detachDevice())); + TQObject::connect(m_pDeviceObject,TQT_SIGNAL(aboutToDie()),this,TQT_SLOT(detachDevice())); m_pPainter->begin(p); } @@ -820,7 +820,7 @@ void KviKvsObject_painter::detachDevice() { if(!m_pDeviceObject)return; if(!m_pPainter)return; - disconnect(m_pDeviceObject,SIGNAL(aboutToDie()),this,SLOT(detachDevice())); + disconnect(m_pDeviceObject,TQT_SIGNAL(aboutToDie()),this,TQT_SLOT(detachDevice())); m_pPainter->end(); m_pDeviceObject = 0; } @@ -833,7 +833,7 @@ bool KviKvsObject_painter::functionend(KviKvsObjectFunctionCall *c) bool KviKvsObject_painter::functiondrawText(KviKvsObjectFunctionCall *c) { - QString szText,szMode; + TQString szText,szMode; kvs_int_t iX,iY,iLen; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("x",KVS_PT_INT,0,iX) @@ -845,8 +845,8 @@ bool KviKvsObject_painter::functiondrawText(KviKvsObjectFunctionCall *c) if(!m_pPainter)return true; #ifdef COMPILE_USE_QT4 if (!szMode.isEmpty()){ - if(KviQString::equalCI(szMode,"RTL"))m_pPainter->setLayoutDirection(Qt::RightToLeft); - else if(KviQString::equalCI(szMode,"LTR"))m_pPainter->setLayoutDirection(Qt::LeftToRight); + if(KviTQString::equalCI(szMode,"RTL"))m_pPainter->setLayoutDirection(TQt::RightToLeft); + else if(KviTQString::equalCI(szMode,"LTR"))m_pPainter->setLayoutDirection(TQt::LeftToRight); else { c->warning(__tr2qs("Invalid mode '%Q'"),&szMode); @@ -856,9 +856,9 @@ bool KviKvsObject_painter::functiondrawText(KviKvsObjectFunctionCall *c) m_pPainter->drawText(iX,iY,szText); #else - if(KviQString::equalCI(szMode,"Auto")) m_pPainter->drawText(iX,iY,szText,iLen,QPainter::Auto); - else if(KviQString::equalCI(szMode,"RTL")) m_pPainter->drawText(iX,iY,szText,iLen,QPainter::RTL); - else if(KviQString::equalCI(szMode,"LTR"))m_pPainter->drawText(iX,iY,szText,iLen,QPainter::LTR); + if(KviTQString::equalCI(szMode,"Auto")) m_pPainter->drawText(iX,iY,szText,iLen,TQPainter::Auto); + else if(KviTQString::equalCI(szMode,"RTL")) m_pPainter->drawText(iX,iY,szText,iLen,TQPainter::RTL); + else if(KviTQString::equalCI(szMode,"LTR"))m_pPainter->drawText(iX,iY,szText,iLen,TQPainter::LTR); else c->warning(__tr2qs("Invalid mode '%Q'"),&szMode); #endif @@ -891,7 +891,7 @@ bool KviKvsObject_painter::functiondrawPixmap(KviKvsObjectFunctionCall *c) c->warning(__tr2qs("Pixmap object required")); return true; } - QPixmap * pm=((KviKvsObject_pixmap *)obj)->getPixmap(); + TQPixmap * pm=((KviKvsObject_pixmap *)obj)->getPixmap(); m_pPainter->drawPixmap(iX,iY,*((KviKvsObject_pixmap *)obj)->getPixmap(),iStartx,iStarty,iEndx,iEndy); return true; } @@ -915,7 +915,7 @@ bool KviKvsObject_painter::functiontranslateMatrix(KviKvsObjectFunctionCall *c) KVSO_PARAMETER("trasl_y",KVS_PT_DOUBLE,0,dYtrasl) KVSO_PARAMETERS_END(c) if(!m_pPainter)return true; - QWMatrix tmpMatrix; + TQWMatrix tmpMatrix; tmpMatrix.translate(dXtrasl,dYtrasl); tmpMatrix = m_pMatrix * tmpMatrix; m_pPainter->setWorldMatrix( tmpMatrix ); @@ -975,7 +975,7 @@ bool KviKvsObject_painter::functionsetTextAntialiasing(KviKvsObjectFunctionCall KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("bEnabled",KVS_PT_BOOL,0,bEnabled) KVSO_PARAMETERS_END(c) - m_pPainter->setRenderHint(QPainter::TextAntialiasing,bEnabled); + m_pPainter->setRenderHint(TQPainter::TextAntialiasing,bEnabled); return true; } bool KviKvsObject_painter::functionsetAntialiasing(KviKvsObjectFunctionCall *c) @@ -986,7 +986,7 @@ bool KviKvsObject_painter::functionsetAntialiasing(KviKvsObjectFunctionCall *c) KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("bEnabled",KVS_PT_BOOL,0,bEnabled) KVSO_PARAMETERS_END(c) - m_pPainter->setRenderHint(QPainter::Antialiasing,bEnabled); + m_pPainter->setRenderHint(TQPainter::Antialiasing,bEnabled); return true; } bool KviKvsObject_painter::functionsetSmoothPixmapTransform(KviKvsObjectFunctionCall *c) @@ -997,7 +997,7 @@ bool KviKvsObject_painter::functionsetSmoothPixmapTransform(KviKvsObjectFunction KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("bEnabled",KVS_PT_BOOL,0,bEnabled) KVSO_PARAMETERS_END(c) - m_pPainter->setRenderHint(QPainter::SmoothPixmapTransform,bEnabled); + m_pPainter->setRenderHint(TQPainter::SmoothPixmapTransform,bEnabled); return true; } #endif diff --git a/src/modules/objects/class_painter.h b/src/modules/objects/class_painter.h index 2ee8a5bb..fd32f9c5 100644 --- a/src/modules/objects/class_painter.h +++ b/src/modules/objects/class_painter.h @@ -23,8 +23,8 @@ // -#include -#include +#include +#include #include "kvi_string.h" @@ -34,11 +34,12 @@ class KviKvsObject_painter : public KviKvsObject { Q_OBJECT + TQ_OBJECT public: KVSO_DECLARE_OBJECT(KviKvsObject_painter) protected: - QPainter * m_pPainter; - QWMatrix m_pMatrix; + TQPainter * m_pPainter; + TQWMatrix m_pMatrix; public: bool functionSetFont(KviKvsObjectFunctionCall *c); bool functionSetFontSize(KviKvsObjectFunctionCall *c); @@ -84,7 +85,7 @@ public: protected: - void attachDevice(KviKvsObject * o,QPaintDevice * p); + void attachDevice(KviKvsObject * o,TQPaintDevice * p); protected slots: void detachDevice(); private: diff --git a/src/modules/objects/class_pixmap.cpp b/src/modules/objects/class_pixmap.cpp index 48aeb1e8..30018f8a 100644 --- a/src/modules/objects/class_pixmap.cpp +++ b/src/modules/objects/class_pixmap.cpp @@ -25,7 +25,7 @@ #include "kvi_debug.h" #include "kvi_locale.h" -#include +#include /* @doc: pixmap @@ -77,8 +77,8 @@ KVSO_END_REGISTERCLASS(KviKvsObject_pixmap) KVSO_BEGIN_CONSTRUCTOR(KviKvsObject_pixmap,KviKvsObject) - m_pPixmap=new QPixmap(); - m_pImage=new QImage(); + m_pPixmap=new TQPixmap(); + m_pImage=new TQImage(); bPixmapModified=false; bImageModified=false; KVSO_END_CONSTRUCTOR(KviKvsObject_pixmap) @@ -116,7 +116,7 @@ bool KviKvsObject_pixmap::functionfill(KviKvsObjectFunctionCall *c) return true; } bPixmapModified=true; - m_pPixmap->fill(((QWidget *)(ob->object())),iXoffset,iYoffset); + m_pPixmap->fill(((TQWidget *)(ob->object())),iXoffset,iYoffset); return true; } @@ -130,7 +130,7 @@ bool KviKvsObject_pixmap::functionscale(KviKvsObjectFunctionCall *c) #ifdef COMPILE_USE_QT4 *m_pPixmap = m_pPixmap->scaled((m_pPixmap->width() * uScaleX), (m_pPixmap->height() * uScaleX)); #else - QWMatrix wm; + TQWMatrix wm; wm.scale(uScaleX, uScaleY); *m_pPixmap = m_pPixmap->xForm(wm); #endif @@ -145,11 +145,11 @@ bool KviKvsObject_pixmap::functionrotate(KviKvsObjectFunctionCall *c) KVSO_PARAMETER("a",KVS_PT_REAL,0,uDegrees) KVSO_PARAMETERS_END(c) #ifdef COMPILE_USE_QT4 - QMatrix m; + TQMatrix m; m.rotate(uDegrees); *m_pPixmap = m_pPixmap->transformed(m); #else - QWMatrix wm; + TQWMatrix wm; wm.rotate(uDegrees); *m_pPixmap = m_pPixmap->xForm(wm); #endif @@ -172,12 +172,12 @@ bool KviKvsObject_pixmap::functionresize(KviKvsObjectFunctionCall *c) bool KviKvsObject_pixmap::functionload(KviKvsObjectFunctionCall *c) { - QString szFile; + TQString szFile; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("file",KVS_PT_STRING,0,szFile) KVSO_PARAMETERS_END(c) - if(!QFile::exists(szFile)) + if(!TQFile::exists(szFile)) { c->warning(__tr2qs("I can't find the specified file %Q."),&szFile); return true; @@ -228,7 +228,7 @@ bool KviKvsObject_pixmap::functionsetOpacity(KviKvsObjectFunctionCall *c) c->warning(__tr2qs("Destination must be a pixmap object")); return true; } - QImage *buffer=((KviKvsObject_pixmap *)pObDest)->getImage(); + TQImage *buffer=((KviKvsObject_pixmap *)pObDest)->getImage(); ((KviKvsObject_pixmap *)pObDest)->imageChanged(); if (bPixmapModified) { *m_pImage=m_pPixmap->convertToImage(); @@ -273,18 +273,18 @@ if(uXoffset+uWidth>m_pImage->width()) for(int y = uYoffset;yscanLine(y); - QRgb * src = (QRgb *)m_pImage->scanLine(y); + TQRgb * dst = (TQRgb *)buffer->scanLine(y); + TQRgb * src = (TQRgb *)m_pImage->scanLine(y); src += uXoffset; - QRgb * end; + TQRgb * end; end = src + iWedge; while(src < end) { - *dst = qRgba( - (int)(qRed(*src)), - (int)(qGreen(*src)), - (int)(qBlue(*src)), - (int)(qAlpha(*src)*dOpacity) + *dst = tqRgba( + (int)(tqRed(*src)), + (int)(tqGreen(*src)), + (int)(tqBlue(*src)), + (int)(tqAlpha(*src)*dOpacity) ); src++; dst++; @@ -294,7 +294,7 @@ if(uXoffset+uWidth>m_pImage->width()) } -QPixmap * KviKvsObject_pixmap::getPixmap() +TQPixmap * KviKvsObject_pixmap::getPixmap() { if (bImageModified) { m_pPixmap->convertFromImage(*m_pImage); @@ -302,7 +302,7 @@ QPixmap * KviKvsObject_pixmap::getPixmap() } return m_pPixmap; } -QImage * KviKvsObject_pixmap::getImage() +TQImage * KviKvsObject_pixmap::getImage() { if (bPixmapModified) { *m_pImage=m_pPixmap->convertToImage(); diff --git a/src/modules/objects/class_pixmap.h b/src/modules/objects/class_pixmap.h index 22d1b95d..8b6ba37d 100644 --- a/src/modules/objects/class_pixmap.h +++ b/src/modules/objects/class_pixmap.h @@ -24,12 +24,12 @@ -#include -#include +#include +#include #ifdef COMPILE_USE_QT4 - #include + #include #else - #include + #include #endif #include "kvi_string.h" @@ -40,18 +40,19 @@ class KviKvsObject_pixmap : public KviKvsObject { Q_OBJECT -// Q_PROPERTY(QPixmap pixmap READ getPixmap) + TQ_OBJECT +// TQ_PROPERTY(TQPixmap pixmap READ getPixmap) public: KVSO_DECLARE_OBJECT(KviKvsObject_pixmap); - QPixmap * getPixmap(); - QImage * getImage(); + TQPixmap * getPixmap(); + TQImage * getImage(); void pixmapChanged(){bPixmapModified=true;} void imageChanged(){bImageModified=true;} - QPixmap * pixmap(){ return m_pPixmap; } + TQPixmap * pixmap(){ return m_pPixmap; } protected: - QPixmap * m_pPixmap; - QImage * m_pImage; + TQPixmap * m_pPixmap; + TQImage * m_pImage; bool bImageModified; bool bPixmapModified; signals: diff --git a/src/modules/objects/class_popupmenu.cpp b/src/modules/objects/class_popupmenu.cpp index a3db5339..17bf5c0c 100644 --- a/src/modules/objects/class_popupmenu.cpp +++ b/src/modules/objects/class_popupmenu.cpp @@ -89,7 +89,7 @@ {[br] #Geometry of the widget and setting-up of popupmenu [br] $$->$setGeometry(%X,%Y,100,100)[br] - $$->%lay=$new(layout,$$)[br] + $$->%lay=$new(tqlayout,$$)[br] #Here we generate a cicle to create our labels inside the widget.[br] %i=0[br] while (%i<10)[br] @@ -110,7 +110,7 @@ #we create the label widget wich will be used as popup's title[br] $$->%Popuptitle=$new(label)[br] $$->%Popuptitle->$settext("Windows Options")[br] - $$->%Popuptitle->$setAlignment(Center)[br] + $$->%Popuptitle->$tqsetAlignment(Center)[br] #and we add it.[br] %A=$$->%Popuptitle[br] $$->%Popupmenu->$insertwidget(%A)[br] @@ -184,21 +184,21 @@ KVSO_END_CONSTRUCTOR(KviKvsObject_popupmenu) bool KviKvsObject_popupmenu::init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams) { - setObject(new KviTalPopupMenu(parentScriptWidget(), name()), true); - connect(widget(),SIGNAL(activated(int)),this,SLOT(slotactivated(int))); - connect(widget(),SIGNAL(highlighted(int)),this,SLOT(slothighlighted(int))); + setObject(TQT_TQOBJECT(new KviTalPopupMenu(tqparentScriptWidget(), name())), true); + connect(widget(),TQT_SIGNAL(activated(int)),this,TQT_SLOT(slotactivated(int))); + connect(widget(),TQT_SIGNAL(highlighted(int)),this,TQT_SLOT(slothighlighted(int))); return true; } bool KviKvsObject_popupmenu::functioninsertItem(KviKvsObjectFunctionCall *c) { - QString szItem,szIcon; + TQString szItem,szIcon; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("text",KVS_PT_STRING,0,szItem) KVSO_PARAMETER("icon_id",KVS_PT_STRING,KVS_PF_OPTIONAL,szIcon) KVSO_PARAMETERS_END(c) if(!widget())return true; - QPixmap *pix = 0; + TQPixmap *pix = 0; int id=0; if(!szIcon.isEmpty()) { @@ -241,7 +241,7 @@ bool KviKvsObject_popupmenu::functioninsertWidget(KviKvsObjectFunctionCall *c) bool KviKvsObject_popupmenu::functioninsertHandle(KviKvsObjectFunctionCall *c) { KviKvsObject *ob; - QString szLabel,szIcon; + TQString szLabel,szIcon; kvs_hobject_t hObject; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("text_label",KVS_PT_STRING,0,szLabel) @@ -255,7 +255,7 @@ bool KviKvsObject_popupmenu::functioninsertHandle(KviKvsObjectFunctionCall *c) return TRUE; } if(!widget())return true; - QPixmap *pix = 0; + TQPixmap *pix = 0; int id=0; if(!szIcon.isEmpty()) { @@ -273,13 +273,13 @@ bool KviKvsObject_popupmenu::functionexec(KviKvsObjectFunctionCall *c) { if(!c->params()->count()) { - ((KviTalPopupMenu *)widget())->exec(QCursor::pos()); + ((KviTalPopupMenu *)widget())->exec(TQCursor::pos()); return true; } KviKvsObject *pObject; kvs_uint_t iX,iY; - QString szLabel,szIcon; + TQString szLabel,szIcon; kvs_hobject_t hObject; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("widget",KVS_PT_HOBJECT,0,hObject) @@ -303,7 +303,7 @@ bool KviKvsObject_popupmenu::functionexec(KviKvsObjectFunctionCall *c) return true; } - ((KviTalPopupMenu *)widget())->exec(((QWidget *)(pObject->object()))->mapToGlobal(QPoint(iX,iY)) ); + ((KviTalPopupMenu *)widget())->exec(((TQWidget *)(pObject->object()))->mapToGlobal(TQPoint(iX,iY)) ); return true; } diff --git a/src/modules/objects/class_popupmenu.h b/src/modules/objects/class_popupmenu.h index e5960119..f106b4de 100644 --- a/src/modules/objects/class_popupmenu.h +++ b/src/modules/objects/class_popupmenu.h @@ -25,17 +25,18 @@ #include "kvi_tal_popupmenu.h" -#include +#include #include "class_widget.h" #include "object_macros.h" class KviKvsObject_popupmenu : public KviKvsObject_widget { Q_OBJECT + TQ_OBJECT public: KVSO_DECLARE_OBJECT(KviKvsObject_popupmenu) public: - QWidget * widget() { return (QWidget *)object(); }; + TQWidget * widget() { return (TQWidget *)object(); }; protected: virtual bool init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams); diff --git a/src/modules/objects/class_process.cpp b/src/modules/objects/class_process.cpp index 81efaae4..16ed7a42 100644 --- a/src/modules/objects/class_process.cpp +++ b/src/modules/objects/class_process.cpp @@ -25,11 +25,11 @@ #include "kvi_debug.h" #include "kvi_settings.h" #include "kvi_locale.h" -#include +#include #ifdef COMPILE_USE_QT4 -#include +#include #else -#include +#include #endif /* @@ -82,7 +82,7 @@ %tt=$new(test)[br] %A=$new(widget)[br] %A->$setGeometry(100,100,400,300)[br] - %layoutA=$new(layout,%A)[br] + %tqlayoutA=$new(tqlayout,%A)[br] %Ainput=$new(lineedit,%A)[br] #%Aoutput=$new(textedit,%A)// coming soon in the new texteditor class[br] %Aoutput=$new(label,%A)[br] @@ -92,11 +92,11 @@ %bkill->$settext("&Kill ")[br] %bterminate=$new(button,%A)[br] %bterminate->$settext("&Ask to Terminate ")[br] - %layoutA->$addwidget(%Ainput,0,0)[br] - %layoutA->$addwidget(%Aoutput,1,0)[br] - %layoutA->$addwidget(%bclosekill,3,0)[br] - %layoutA->$addwidget(%bkill,4,0,)[br] - %layoutA->$addwidget(%bterminate,5,0)[br] + %tqlayoutA->$addwidget(%Ainput,0,0)[br] + %tqlayoutA->$addwidget(%Aoutput,1,0)[br] + %tqlayoutA->$addwidget(%bclosekill,3,0)[br] + %tqlayoutA->$addwidget(%bkill,4,0,)[br] + %tqlayoutA->$addwidget(%bterminate,5,0)[br] %Process=$new(process)[br] %Process->$addArg("cmd.exe")[br] @@ -187,10 +187,10 @@ KVSO_BEGIN_CONSTRUCTOR(KviKvsObject_process,KviKvsObject) #ifdef COMPILE_USE_QT4 m_pProcess = new Q3Process(); #else - m_pProcess = new QProcess(); + m_pProcess = new TQProcess(); #endif - connect(m_pProcess,SIGNAL(readyReadStdout()),this,SLOT(slotReadStdout())); - connect(m_pProcess,SIGNAL(readyReadStderr()),this,SLOT(slotReadStderr())); + connect(m_pProcess,TQT_SIGNAL(readyReadStdout()),this,TQT_SLOT(slotReadStdout())); + connect(m_pProcess,TQT_SIGNAL(readyReadStderr()),this,TQT_SLOT(slotReadStderr())); KVSO_END_CONSTRUCTOR(KviKvsObject_process) @@ -205,7 +205,7 @@ KVSO_END_CONSTRUCTOR(KviKvsObject_process) bool KviKvsObject_process::functionaddArgument(KviKvsObjectFunctionCall *c) { - QString szArgument; + TQString szArgument; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("argument",KVS_PT_NONEMPTYSTRING,0,szArgument) KVSO_PARAMETERS_END(c) @@ -224,7 +224,7 @@ bool KviKvsObject_process::functionstartProcess(KviKvsObjectFunctionCall *c) //-->Read the standard output. bool KviKvsObject_process::functionreadStderr(KviKvsObjectFunctionCall *c) { - QString ng_Process =m_pProcess->readStderr(); + TQString ng_Process =m_pProcess->readStderr(); c->returnValue()->setString(ng_Process); return true; } @@ -232,7 +232,7 @@ bool KviKvsObject_process::functionreadStderr(KviKvsObjectFunctionCall *c) //-->Read the standard error. bool KviKvsObject_process::functionreadStdout(KviKvsObjectFunctionCall *c) { - QString ng_Process =m_pProcess->readStdout(); + TQString ng_Process =m_pProcess->readStdout(); c->returnValue()->setString(ng_Process); return true; } @@ -255,7 +255,7 @@ bool KviKvsObject_process::functionreadyReadStderrEvent(KviKvsObjectFunctionCall bool KviKvsObject_process::functionwriteToStdin(KviKvsObjectFunctionCall *c) { - QString szCommand; + TQString szCommand; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("command",KVS_PT_STRING,0,szCommand) KVSO_PARAMETERS_END(c) @@ -269,7 +269,7 @@ bool KviKvsObject_process::functionclosekill(KviKvsObjectFunctionCall *c) //I try to to terminate the process the nice way.... m_pProcess->tryTerminate(); //If the process is still running after 5 seconds, I'll terminate the process in the hard way. - QTimer::singleShot( 5000, m_pProcess, SLOT( kill() ) ); + TQTimer::singleShot( 5000, m_pProcess, TQT_SLOT( kill() ) ); return true; } bool KviKvsObject_process::functionkill(KviKvsObjectFunctionCall *c) diff --git a/src/modules/objects/class_process.h b/src/modules/objects/class_process.h index 70842950..bbe81e98 100644 --- a/src/modules/objects/class_process.h +++ b/src/modules/objects/class_process.h @@ -23,21 +23,22 @@ // Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -#include +#include #include "class_widget.h" #include "object_macros.h" #ifdef COMPILE_USE_QT4 -#include +#include #else -#include +#include #endif class KviKvsObject_process : public KviKvsObject { Q_OBJECT + TQ_OBJECT public: KVSO_DECLARE_OBJECT(KviKvsObject_process) protected: @@ -45,7 +46,7 @@ protected: #ifdef COMPILE_USE_QT4 Q3Process * m_pProcess; #else - QProcess * m_pProcess; + TQProcess * m_pProcess; #endif public: diff --git a/src/modules/objects/class_progressbar.cpp b/src/modules/objects/class_progressbar.cpp index 12fc5b39..b75c144d 100644 --- a/src/modules/objects/class_progressbar.cpp +++ b/src/modules/objects/class_progressbar.cpp @@ -28,11 +28,11 @@ #include "kvi_locale.h" #include "kvi_iconmanager.h" #ifdef COMPILE_USE_QT4 -#include +#include #define KVI_PROGRESS_BAR Q3ProgressBar #else -#include -#define KVI_PROGRESS_BAR QProgressBar +#include +#define KVI_PROGRESS_BAR TQProgressBar #endif /* @@ -96,11 +96,11 @@ KVSO_END_CONSTRUCTOR(KviKvsObject_progressbar) bool KviKvsObject_progressbar::init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams) { #ifdef COMPILE_USE_QT4 - Q3ProgressBar *pbar=new Q3ProgressBar(parentScriptWidget()); + Q3ProgressBar *pbar=new Q3ProgressBar(tqparentScriptWidget()); pbar->setObjectName(name()); setObject(pbar,true); #else - setObject(new QProgressBar(parentScriptWidget(), name()), true); + setObject(TQT_TQOBJECT(new TQProgressBar(tqparentScriptWidget(), name())), true); #endif return true; } diff --git a/src/modules/objects/class_progressbar.h b/src/modules/objects/class_progressbar.h index 44c4eac8..09c5a116 100644 --- a/src/modules/objects/class_progressbar.h +++ b/src/modules/objects/class_progressbar.h @@ -24,7 +24,7 @@ // Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // -//#include +//#include #include "class_widget.h" #include "object_macros.h" @@ -33,7 +33,7 @@ class KviKvsObject_progressbar : public KviKvsObject_widget public: KVSO_DECLARE_OBJECT(KviKvsObject_progressbar) public: - QWidget * widget() { return (QWidget *)object(); }; + TQWidget * widget() { return (TQWidget *)object(); }; protected: virtual bool init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams); diff --git a/src/modules/objects/class_radiobutton.cpp b/src/modules/objects/class_radiobutton.cpp index 08211e12..75a20f52 100644 --- a/src/modules/objects/class_radiobutton.cpp +++ b/src/modules/objects/class_radiobutton.cpp @@ -82,23 +82,23 @@ KVSO_END_CONSTRUCTOR(KviKvsObject_radiobutton) bool KviKvsObject_radiobutton::init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams) { - setObject(new QRadioButton(parentScriptWidget(),name()),true); - connect(widget(),SIGNAL(toggled(bool)),this,SLOT(toggled(bool))); + setObject(TQT_TQOBJECT(new TQRadioButton(tqparentScriptWidget(),name())),true); + connect(widget(),TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(toggled(bool))); return true; } bool KviKvsObject_radiobutton::functionSetText(KviKvsObjectFunctionCall *c) { - QString szText; + TQString szText; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("text",KVS_PT_STRING,0,szText) KVSO_PARAMETERS_END(c) if (widget()) - ((QRadioButton *)widget())->setText(szText); + ((TQRadioButton *)widget())->setText(szText); return true; } bool KviKvsObject_radiobutton::functionIsChecked(KviKvsObjectFunctionCall *c) { - if(widget()) c->returnValue()->setBoolean(((QRadioButton *)widget())->isChecked()); + if(widget()) c->returnValue()->setBoolean(((TQRadioButton *)widget())->isChecked()); return true; } @@ -108,17 +108,17 @@ bool KviKvsObject_radiobutton::functionSetChecked(KviKvsObjectFunctionCall *c) KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("bChecked",KVS_PT_BOOL,0,bChecked) KVSO_PARAMETERS_END(c) - if(widget()) ((QRadioButton *)widget())->setChecked(bChecked); + if(widget()) ((TQRadioButton *)widget())->setChecked(bChecked); return true; } bool KviKvsObject_radiobutton::functionSetImage(KviKvsObjectFunctionCall *c) { - QString icon; + TQString icon; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("icon_id",KVS_PT_STRING,0,icon) KVSO_PARAMETERS_END(c) if (!widget()) return true; - QPixmap * pix = g_pIconManager->getImage(icon); + TQPixmap * pix = g_pIconManager->getImage(icon); if(pix)widget()->setIcon(*pix); return true; } diff --git a/src/modules/objects/class_radiobutton.h b/src/modules/objects/class_radiobutton.h index 127af8cd..35cedb72 100644 --- a/src/modules/objects/class_radiobutton.h +++ b/src/modules/objects/class_radiobutton.h @@ -22,7 +22,7 @@ // along with this program. If not, write to the Free Software Foundation, // Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // -#include +#include #include "class_widget.h" @@ -31,10 +31,11 @@ class KviKvsObject_radiobutton : public KviKvsObject_widget { Q_OBJECT + TQ_OBJECT public: KVSO_DECLARE_OBJECT(KviKvsObject_radiobutton) public: - QWidget * widget() { return (QWidget *)object(); }; + TQWidget * widget() { return (TQWidget *)object(); }; protected: virtual bool init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams); diff --git a/src/modules/objects/class_slider.cpp b/src/modules/objects/class_slider.cpp index 603e4c9a..2357da5f 100644 --- a/src/modules/objects/class_slider.cpp +++ b/src/modules/objects/class_slider.cpp @@ -49,7 +49,7 @@ @functions: !fn: $setOrientation() Sets the slider's orientation.[br] - Orientation value can be "Horizontal" or "Vertical". + Qt::Orientation value can be "Horizontal" or "Vertical". !fn: $setTracking() Sets whether slider tracking is enabled to enable.[br] Value can be 1 or 0. @@ -130,8 +130,8 @@ KVSO_END_CONSTRUCTOR(KviKvsObject_slider) bool KviKvsObject_slider::init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams) { - setObject(new QSlider(parentScriptWidget(), name()), true); - connect(widget(),SIGNAL(valueChanged(int)),this,SLOT(valueChanged(int))); + setObject(TQT_TQOBJECT(new TQSlider(tqparentScriptWidget(), name())), true); + connect(widget(),TQT_SIGNAL(valueChanged(int)),this,TQT_SLOT(valueChanged(int))); return true; } @@ -142,7 +142,7 @@ bool KviKvsObject_slider::functionsetTracking(KviKvsObjectFunctionCall *c) KVSO_PARAMETER("bEnabled",KVS_PT_BOOL,0,bEnabled) KVSO_PARAMETERS_END(c) if(widget()) - ((QSlider *)widget())->setTracking(bEnabled); + ((TQSlider *)widget())->setTracking(bEnabled); return true; } @@ -153,7 +153,7 @@ bool KviKvsObject_slider::functionsetValue(KviKvsObjectFunctionCall *c) KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("value",KVS_PT_INT,0,iValue) KVSO_PARAMETERS_END(c) - if (widget()) ((QSlider *)widget())->setValue(iValue); + if (widget()) ((TQSlider *)widget())->setValue(iValue); return true; } bool KviKvsObject_slider::functionsetMinValue(KviKvsObjectFunctionCall *c) @@ -162,7 +162,7 @@ bool KviKvsObject_slider::functionsetMinValue(KviKvsObjectFunctionCall *c) KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("minimum_value",KVS_PT_INT,0,iMinvalue) KVSO_PARAMETERS_END(c) - if (widget()) ((QSlider *)widget())->setMinValue(iMinvalue); + if (widget()) ((TQSlider *)widget())->setMinValue(iMinvalue); return true; } bool KviKvsObject_slider::functionsetMaxValue(KviKvsObjectFunctionCall *c) @@ -171,7 +171,7 @@ bool KviKvsObject_slider::functionsetMaxValue(KviKvsObjectFunctionCall *c) KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("max_value",KVS_PT_INT,0,iMaxvalue) KVSO_PARAMETERS_END(c) - if (widget()) ((QSlider *)widget())->setMaxValue(iMaxvalue); + if (widget()) ((TQSlider *)widget())->setMaxValue(iMaxvalue); return true; } @@ -181,7 +181,7 @@ bool KviKvsObject_slider::functionsetLineStep(KviKvsObjectFunctionCall *c) KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("line_step",KVS_PT_INT,0,iLinestep) KVSO_PARAMETERS_END(c) - if (widget()) ((QSlider *)widget())->setLineStep(iLinestep); + if (widget()) ((TQSlider *)widget())->setLineStep(iLinestep); return true; } bool KviKvsObject_slider::functionsetPageStep(KviKvsObjectFunctionCall *c) @@ -190,7 +190,7 @@ bool KviKvsObject_slider::functionsetPageStep(KviKvsObjectFunctionCall *c) KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("page_step",KVS_PT_INT,0,iPagestep) KVSO_PARAMETERS_END(c) - if (widget()) ((QSlider *)widget())->setPageStep(iPagestep); + if (widget()) ((TQSlider *)widget())->setPageStep(iPagestep); return true; } @@ -200,35 +200,35 @@ bool KviKvsObject_slider::functionsetTickInterval(KviKvsObjectFunctionCall *c) KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("tick_interval",KVS_PT_INT,0,iInterval) KVSO_PARAMETERS_END(c) - if (widget()) ((QSlider *)widget())->setTickInterval(iInterval); + if (widget()) ((TQSlider *)widget())->setTickInterval(iInterval); return true; } bool KviKvsObject_slider::functionvalue(KviKvsObjectFunctionCall *c) { - if (widget()) c->returnValue()->setInteger(((QSlider *)widget())->value()); + if (widget()) c->returnValue()->setInteger(((TQSlider *)widget())->value()); return true; } bool KviKvsObject_slider::functionminValue(KviKvsObjectFunctionCall *c) { - if (widget()) c->returnValue()->setInteger(((QSlider *)widget())->minValue()); + if (widget()) c->returnValue()->setInteger(((TQSlider *)widget())->minValue()); return true; } bool KviKvsObject_slider::functionmaxValue(KviKvsObjectFunctionCall *c) { - if (widget()) c->returnValue()->setInteger(((QSlider *)widget())->maxValue()); + if (widget()) c->returnValue()->setInteger(((TQSlider *)widget())->maxValue()); return true; } bool KviKvsObject_slider::functionlineStep(KviKvsObjectFunctionCall *c) { - if (widget()) c->returnValue()->setInteger(((QSlider *)widget())->lineStep()); + if (widget()) c->returnValue()->setInteger(((TQSlider *)widget())->lineStep()); return true; } bool KviKvsObject_slider::functionpageStep(KviKvsObjectFunctionCall *c) { - if (widget()) c->returnValue()->setInteger(((QSlider *)widget())->pageStep()); + if (widget()) c->returnValue()->setInteger(((TQSlider *)widget())->pageStep()); return true; } @@ -236,38 +236,38 @@ bool KviKvsObject_slider::functionpageStep(KviKvsObjectFunctionCall *c) bool KviKvsObject_slider::functionsetTickmarks(KviKvsObjectFunctionCall *c) { - QString szTick; + TQString szTick; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("tick_marks",KVS_PT_STRING,0,szTick) KVSO_PARAMETERS_END(c) if(!widget())return true; - if(KviQString::equalCI(szTick,"NoMarks")) - ((QSlider *)widget())->setTickmarks(QSlider::NoMarks); - else if(KviQString::equalCI(szTick,"Both")) - ((QSlider *)widget())->setTickmarks(QSlider::Both); - else if(KviQString::equalCI(szTick,"Above")) - ((QSlider *)widget())->setTickmarks(QSlider::Above); - else if(KviQString::equalCI(szTick,"Below")) - ((QSlider *)widget())->setTickmarks(QSlider::Below); - else if(KviQString::equalCI(szTick,"Left")) - ((QSlider *)widget())->setTickmarks(QSlider::Left); - else if(KviQString::equalCI(szTick,"Right")) - ((QSlider *)widget())->setTickmarks(QSlider::Right); + if(KviTQString::equalCI(szTick,"NoMarks")) + ((TQSlider *)widget())->setTickmarks(TQSlider::NoMarks); + else if(KviTQString::equalCI(szTick,"Both")) + ((TQSlider *)widget())->setTickmarks(TQSlider::Both); + else if(KviTQString::equalCI(szTick,"Above")) + ((TQSlider *)widget())->setTickmarks(TQSlider::Above); + else if(KviTQString::equalCI(szTick,"Below")) + ((TQSlider *)widget())->setTickmarks(TQSlider::Below); + else if(KviTQString::equalCI(szTick,"Left")) + ((TQSlider *)widget())->setTickmarks(TQSlider::Left); + else if(KviTQString::equalCI(szTick,"Right")) + ((TQSlider *)widget())->setTickmarks(TQSlider::Right); else c->warning( __tr2qs("Unknown tickmark '%Q'"),&szTick); return true; } bool KviKvsObject_slider::functionsetOrientation(KviKvsObjectFunctionCall *c) { - QString szOrientation; + TQString szOrientation; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("orientation",KVS_PT_STRING,0,szOrientation) KVSO_PARAMETERS_END(c) if(!widget())return true; - if(KviQString::equalCI(szOrientation,"Horizontal")) - ((QSlider *)widget())->setOrientation(Qt::Horizontal); - else if(KviQString::equalCI(szOrientation,"Vertical")) - ((QSlider *)widget())->setOrientation(Qt::Vertical); + if(KviTQString::equalCI(szOrientation,"Horizontal")) + ((TQSlider *)widget())->setOrientation(Qt::Horizontal); + else if(KviTQString::equalCI(szOrientation,"Vertical")) + ((TQSlider *)widget())->setOrientation(Qt::Vertical); else c->warning( __tr2qs("Unknown orientation '%Q'"),&szOrientation); return true; } diff --git a/src/modules/objects/class_slider.h b/src/modules/objects/class_slider.h index e2c8c397..bf5e55ad 100644 --- a/src/modules/objects/class_slider.h +++ b/src/modules/objects/class_slider.h @@ -22,7 +22,7 @@ // along with this program. If not, write to the Free Software Foundation, // Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // -#include +#include #include "class_widget.h" @@ -31,10 +31,11 @@ class KviKvsObject_slider : public KviKvsObject_widget { Q_OBJECT + TQ_OBJECT public: KVSO_DECLARE_OBJECT(KviKvsObject_slider) public: - QWidget * widget() { return (QWidget *)object(); }; + TQWidget * widget() { return (TQWidget *)object(); }; protected: virtual bool init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams); diff --git a/src/modules/objects/class_socket.cpp b/src/modules/objects/class_socket.cpp index f0afe3a5..4ce0b92a 100644 --- a/src/modules/objects/class_socket.cpp +++ b/src/modules/objects/class_socket.cpp @@ -57,7 +57,7 @@ KviScriptSocketObject::KviScriptSocketObject(KviScriptObjectClass * cla,KviScrip { m_uConnectionId = 0; m_sock = KVI_INVALID_SOCKET; - m_iStatus = KVI_SCRIPT_SOCKET_STATUS_DISCONNECTED; + m_itqStatus = KVI_SCRIPT_SOCKET_STATUS_DISCONNECTED; m_uRemotePort = 0; m_uSecondaryPort = 0; m_pSn = 0; @@ -68,11 +68,11 @@ KviScriptSocketObject::KviScriptSocketObject(KviScriptObjectClass * cla,KviScrip m_uInBufferLen = 0; m_uInDataLen = 0; m_pOutBuffer = new KviDataBuffer(); - m_pFlushTimer = new QTimer(); + m_pFlushTimer = new TQTimer(); m_bIpV6 = false; m_uLocalPort = 0; m_secondarySock = KVI_INVALID_SOCKET; - connect(m_pFlushTimer,SIGNAL(timeout()),this,SLOT(tryFlush())); + connect(m_pFlushTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(tryFlush())); } KviScriptSocketObject::~KviScriptSocketObject() @@ -128,7 +128,7 @@ void KviScriptSocketObject::reset() m_pOutBuffer = new KviDataBuffer(); m_uInBufferLen = 0; m_uInDataLen = 0; - m_iStatus = KVI_SCRIPT_SOCKET_STATUS_DISCONNECTED; + m_itqStatus = KVI_SCRIPT_SOCKET_STATUS_DISCONNECTED; m_uRemotePort = 0; m_szRemoteIp.clear(); m_uLocalPort = 0; @@ -218,7 +218,7 @@ void KviScriptSocketObject::reset() the incoming connection will be automatically terminated. !fn: $connectFailedEvent() - This function is called when a connection attempt fails for some reason. contains + This function is called when a connection attempt fails for some reason. tqcontains the error string.[br] This function may be called only between a call to [classfnc:socket]$connect[/classfnc]() and the [classfnc:socket]$connectEvent[/classfnc](). @@ -366,7 +366,7 @@ void KviScriptSocketObject::reset() KVSO_BEGIN_REGISTERCLASS(KviKvsObject_socket,"socket","object") - KVSO_REGISTER_HANDLER(KviKvsObject_socket,"status",functionStatus) + KVSO_REGISTER_HANDLER(KviKvsObject_socket,"status",functiontqStatus) KVSO_REGISTER_HANDLER(KviKvsObject_socket,"remotePort",functionRemotePort) KVSO_REGISTER_HANDLER(KviKvsObject_socket,"remoteIp",functionRemoteIp) KVSO_REGISTER_HANDLER(KviKvsObject_socket,"localIp",functionLocalIp) @@ -398,7 +398,7 @@ KVSO_BEGIN_CONSTRUCTOR(KviKvsObject_socket,KviKvsObject) m_bUdp = false; m_uConnectionId = 0; m_sock = KVI_INVALID_SOCKET; - m_iStatus = KVI_SCRIPT_SOCKET_STATUS_DISCONNECTED; + m_itqStatus = KVI_SCRIPT_SOCKET_STATUS_DISCONNECTED; m_uRemotePort = 0; m_uSecondaryPort = 0; m_pSn = 0; @@ -409,11 +409,11 @@ KVSO_BEGIN_CONSTRUCTOR(KviKvsObject_socket,KviKvsObject) m_uInBufferLen = 0; m_uInDataLen = 0; m_pOutBuffer = new KviDataBuffer(); - m_pFlushTimer = new QTimer(); + m_pFlushTimer = new TQTimer(); m_bIpV6 = false; m_uLocalPort = 0; m_secondarySock = KVI_INVALID_SOCKET; - connect(m_pFlushTimer,SIGNAL(timeout()),this,SLOT(tryFlush())); + connect(m_pFlushTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(tryFlush())); KVSO_END_CONSTRUCTOR(KviKvsObject_socket) KVSO_BEGIN_DESTRUCTOR(KviKvsObject_socket) @@ -430,15 +430,15 @@ KVSO_END_DESTRUCTOR(KviKvsObject_socket) //---------------------- -bool KviKvsObject_socket::functionStatus(KviKvsObjectFunctionCall *c) +bool KviKvsObject_socket::functiontqStatus(KviKvsObjectFunctionCall *c) { - c->returnValue()->setInteger(m_iStatus); + c->returnValue()->setInteger(m_itqStatus); return true; } bool KviKvsObject_socket::functionClose(KviKvsObjectFunctionCall *c) { - if((m_pOutBuffer->size() != 0) && (m_iStatus == KVI_SCRIPT_SOCKET_STATUS_CONNECTED)) + if((m_pOutBuffer->size() != 0) && (m_itqStatus == KVI_SCRIPT_SOCKET_STATUS_CONNECTED)) tryFlush(); reset(); @@ -523,18 +523,18 @@ bool KviKvsObject_socket::functionAccept(KviKvsObjectFunctionCall *c) bool KviKvsObject_socket::functionSetProtocol(KviKvsObjectFunctionCall *c) { - QString m_szHex; + TQString m_szHex; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("hex_string",KVS_PT_STRING,0,m_szHex) KVSO_PARAMETERS_END(c) - m_bUdp=KviQString::equalCI(m_szHex,"udp"); + m_bUdp=KviTQString::equalCI(m_szHex,"udp"); return false; } bool KviKvsObject_socket::functionWriteHex(KviKvsObjectFunctionCall *c) { - QString m_szHex; + TQString m_szHex; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("hex_string",KVS_PT_STRING,0,m_szHex) KVSO_PARAMETERS_END(c) @@ -542,11 +542,11 @@ bool KviKvsObject_socket::functionWriteHex(KviKvsObjectFunctionCall *c) if(m_szHex.length() > 0) { bool bOk; - QString szTmp; + TQString szTmp; szTmp=m_szHex.setNum(m_szHex.toInt(&bOk,16),16); if(szTmp.length()>0) { - KviQCString szData8 = szTmp.utf8(); + KviTQCString szData8 = szTmp.utf8(); m_pOutBuffer->append((const unsigned char *)(szData8.data()),szData8.length()); delayedFlush(0); c->returnValue()->setInteger(szData8.length()); @@ -591,7 +591,7 @@ bool KviKvsObject_socket::functionConnect(KviKvsObjectFunctionCall *c) c->warning(__tr2qs("Value %d for port is out of range (values allowed are from 0 to 65535"),m_uRemotePort); return true; } - if((m_sock != KVI_INVALID_SOCKET) || (m_iStatus != KVI_SCRIPT_SOCKET_STATUS_DISCONNECTED)) + if((m_sock != KVI_INVALID_SOCKET) || (m_itqStatus != KVI_SCRIPT_SOCKET_STATUS_DISCONNECTED)) { c->warning(__tr2qs("Another connection in progress")); c->returnValue()->setBoolean(true); @@ -608,11 +608,11 @@ bool KviKvsObject_socket::functionConnect(KviKvsObjectFunctionCall *c) debug ("ok connecting"); debug ("connectinhg on ip %s ",m_szRemoteIp.latin1()); debug ("non so ip"); - m_iStatus = KVI_SCRIPT_SOCKET_STATUS_CONNECTING; + m_itqStatus = KVI_SCRIPT_SOCKET_STATUS_CONNECTING; delayedConnect(); } else { debug ("connectinhg on ip %s port %d",m_szRemoteIp.latin1(),m_uRemotePort); - m_iStatus = KVI_SCRIPT_SOCKET_STATUS_DNS; + m_itqStatus = KVI_SCRIPT_SOCKET_STATUS_DNS; delayedLookupRemoteIp(); } c->returnValue()->setBoolean(true); @@ -626,14 +626,14 @@ bool KviKvsObject_socket::functionConnect(KviKvsObjectFunctionCall *c) bool KviKvsObject_socket::functionListen(KviKvsObjectFunctionCall *c) { - if((m_sock != KVI_INVALID_SOCKET) || (m_iStatus != KVI_SCRIPT_SOCKET_STATUS_DISCONNECTED)) + if((m_sock != KVI_INVALID_SOCKET) || (m_itqStatus != KVI_SCRIPT_SOCKET_STATUS_DISCONNECTED)) { c->warning(__tr2qs("Another connection in progress")); c->returnValue()->setBoolean(false); return true; } kvs_uint_t uLocalPort; - QString m_szLocalIp; + TQString m_szLocalIp; bool m_bIpV6; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("local_port",KVS_PT_UNSIGNEDINTEGER,0,uLocalPort) @@ -766,11 +766,11 @@ bool KviKvsObject_socket::functionListen(KviKvsObjectFunctionCall *c) } // and setup the READ notifier... - m_pSn = new QSocketNotifier(m_sock,QSocketNotifier::Read); - QObject::connect(m_pSn,SIGNAL(activated(int)),this,SLOT(incomingConnection(int))); + m_pSn = new TQSocketNotifier(m_sock,TQSocketNotifier::Read); + TQObject::connect(m_pSn,TQT_SIGNAL(activated(int)),this,TQT_SLOT(incomingConnection(int))); m_pSn->setEnabled(true); - m_iStatus = KVI_SCRIPT_SOCKET_STATUS_LISTENING; + m_itqStatus = KVI_SCRIPT_SOCKET_STATUS_LISTENING; c->returnValue()->setBoolean(true); return true; @@ -846,18 +846,18 @@ void KviKvsObject_socket::acceptConnection(kvi_socket_t s,kvi_u32_t uPort,const sareal.getStringAddress(m_szLocalIp); } - m_iStatus = KVI_SCRIPT_SOCKET_STATUS_CONNECTED; + m_itqStatus = KVI_SCRIPT_SOCKET_STATUS_CONNECTED; - m_pSn = new QSocketNotifier((int)m_sock,QSocketNotifier::Read); - QObject::connect(m_pSn,SIGNAL(activated(int)),this,SLOT(readNotifierFired(int))); + m_pSn = new TQSocketNotifier((int)m_sock,TQSocketNotifier::Read); + TQObject::connect(m_pSn,TQT_SIGNAL(activated(int)),this,TQT_SLOT(readNotifierFired(int))); m_pSn->setEnabled(true); } void KviKvsObject_socket::delayedConnect() { if(m_pDelayTimer)delete m_pDelayTimer; - m_pDelayTimer = new QTimer(); - connect(m_pDelayTimer,SIGNAL(timeout()),this,SLOT(doConnect())); + m_pDelayTimer = new TQTimer(); + connect(m_pDelayTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(doConnect())); m_pDelayTimer->start(0,true); } @@ -873,13 +873,13 @@ void KviKvsObject_socket::doConnect() if(!sa.socketAddress()) { unsigned int uOldConnectionId = m_uConnectionId; - QString ipAddressError=__tr2qs("Invalid ip address "); + TQString ipAddressError=__tr2qs("Invalid ip address "); ipAddressError.append(m_szRemoteIp); KviKvsVariantList params; - QString tmp; - KviQString::sprintf(tmp,__tr2qs("Invalid ip address (%Q)"),&m_szRemoteIp); + TQString tmp; + KviTQString::sprintf(tmp,__tr2qs("Invalid ip address (%Q)"),&m_szRemoteIp); params.append(new KviKvsVariant(tmp)); callFunction(this,"connectFailedEvent",¶ms); /* callEventFunction("connectFailedEvent",0,new KviParameterList( @@ -936,7 +936,7 @@ debug ("Socket created"); (void *)&sockError,&iSize))sockError=0; } unsigned int uOldConnectionId = m_uConnectionId; - QString callBackError=__tr2qs("Connect failure: "); + TQString callBackError=__tr2qs("Connect failure: "); callBackError.append((KviError::getDescription(KviError::translateSystemError(sockError)).utf8().data())); callFunction(this,"connectFailedEvent",new KviKvsVariantList( @@ -950,12 +950,12 @@ debug ("Socket created"); } } debug ("Socket connected"); - m_pDelayTimer = new QTimer(); - connect(m_pDelayTimer,SIGNAL(timeout()),this,SLOT(connectTimeout())); + m_pDelayTimer = new TQTimer(); + connect(m_pDelayTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(connectTimeout())); m_pDelayTimer->start(m_uConnectTimeout,true); - m_pSn = new QSocketNotifier((int)m_sock,QSocketNotifier::Write); - QObject::connect(m_pSn,SIGNAL(activated(int)),this,SLOT(writeNotifierFired(int))); + m_pSn = new TQSocketNotifier((int)m_sock,TQSocketNotifier::Write); + TQObject::connect(m_pSn,TQT_SIGNAL(activated(int)),this,TQT_SLOT(writeNotifierFired(int))); m_pSn->setEnabled(true); } @@ -972,8 +972,8 @@ void KviKvsObject_socket::connectTimeout() void KviKvsObject_socket::delayedLookupRemoteIp() { if(m_pDelayTimer)delete m_pDelayTimer; - m_pDelayTimer = new QTimer(); - connect(m_pDelayTimer,SIGNAL(timeout()),this,SLOT(lookupRemoteIp())); + m_pDelayTimer = new TQTimer(); + connect(m_pDelayTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(lookupRemoteIp())); m_pDelayTimer->start(0,true); } @@ -984,7 +984,7 @@ void KviKvsObject_socket::lookupRemoteIp() m_pDelayTimer = 0; if(m_pDns)delete m_pDns; m_pDns = new KviDns(); - connect(m_pDns,SIGNAL(lookupDone(KviDns *)),this,SLOT(lookupDone(KviDns *))); + connect(m_pDns,TQT_SIGNAL(lookupDone(KviDns *)),this,TQT_SLOT(lookupDone(KviDns *))); if(!m_pDns->lookup(m_szRemoteIp,KviDns::Any)) { unsigned int uOldConnectionId = m_uConnectionId; @@ -1051,8 +1051,8 @@ void KviKvsObject_socket::writeNotifierFired(int) } else { // Succesfully connected // create the correct read notifier now... - m_pSn = new QSocketNotifier((int)m_sock,QSocketNotifier::Read); - QObject::connect(m_pSn,SIGNAL(activated(int)),this,SLOT(readNotifierFired(int))); + m_pSn = new TQSocketNotifier((int)m_sock,TQSocketNotifier::Read); + TQObject::connect(m_pSn,TQT_SIGNAL(activated(int)),this,TQT_SLOT(readNotifierFired(int))); m_pSn->setEnabled(true); #ifdef COMPILE_IPV6_SUPPORT @@ -1070,7 +1070,7 @@ void KviKvsObject_socket::writeNotifierFired(int) KviKvsVariantList *params=0; callFunction(this,"connectEvent",params); if(m_uConnectionId == uOldConnectionId) - m_iStatus = KVI_SCRIPT_SOCKET_STATUS_CONNECTED; + m_itqStatus = KVI_SCRIPT_SOCKET_STATUS_CONNECTED; // else the connection has been already changed! } } @@ -1110,7 +1110,7 @@ void KviKvsObject_socket::readNotifierFired(int) if(err > 0) { - // QString error=KviError::translateSystemError(err); + // TQString error=KviError::translateSystemError(err); callFunction(this,"disconnectEvent",new KviKvsVariantList( new KviKvsVariant((kvs_int_t)KviError::translateSystemError(err)))); } else { @@ -1129,7 +1129,7 @@ void KviKvsObject_socket::readNotifierFired(int) m_uInDataLen += readLength; //KviStr * s = new KviStr(); - QString s; + TQString s; s.setNum(m_uInDataLen); @@ -1256,7 +1256,7 @@ void KviKvsObject_socket::reset() m_pOutBuffer = new KviDataBuffer(); m_uInBufferLen = 0; m_uInDataLen = 0; - m_iStatus = KVI_SCRIPT_SOCKET_STATUS_DISCONNECTED; + m_itqStatus = KVI_SCRIPT_SOCKET_STATUS_DISCONNECTED; m_uRemotePort = 0; m_szRemoteIp=""; m_uLocalPort = 0; @@ -1284,7 +1284,7 @@ bool KviKvsObject_socket::functionRead(KviKvsObjectFunctionCall *c) { if(!m_pInBuffer[i])m_pInBuffer[i] = (char)(255); } - QString tmpBuffer = QString::fromUtf8(m_pInBuffer,uLen); + TQString tmpBuffer = TQString::fromUtf8(m_pInBuffer,uLen); c->returnValue()->setString(tmpBuffer); eatInData(uLen); @@ -1299,7 +1299,7 @@ bool KviKvsObject_socket::functionReadHex(KviKvsObjectFunctionCall *c) bool bOk; if(uLen > 0) { - QString szTmp; + TQString szTmp; szTmp =m_pInBuffer; szTmp.toInt(&bOk,16); c->returnValue()->setString(szTmp); @@ -1310,12 +1310,12 @@ bool KviKvsObject_socket::functionReadHex(KviKvsObjectFunctionCall *c) bool KviKvsObject_socket::functionWrite(KviKvsObjectFunctionCall *c) { - QString szData; + TQString szData; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("szData",KVS_PT_STRING,0,szData) KVSO_PARAMETERS_END(c) -KviQCString szData8 = szData.utf8(); +KviTQCString szData8 = szData.utf8(); if(szData8.length() > 0) { m_pOutBuffer->append((const unsigned char*)szData8.data(),szData8.length()); diff --git a/src/modules/objects/class_socket.h b/src/modules/objects/class_socket.h index 7ed2e421..84771cae 100644 --- a/src/modules/objects/class_socket.h +++ b/src/modules/objects/class_socket.h @@ -26,8 +26,8 @@ #include "kvi_pointerlist.h" -#include -#include +#include +#include #define KVI_SCRIPT_SOCKET_STATUS_DISCONNECTED 0 #define KVI_SCRIPT_SOCKET_STATUS_DNS 1 @@ -41,20 +41,21 @@ class KviDataBuffer; class KviScriptSocketObject : public KviScriptObject { Q_OBJECT + TQ_OBJECT public: KviScriptSocketObject(KviScriptObjectClass * cla,KviScriptObject * par,const char * nam); virtual ~KviScriptSocketObject(); protected: kvi_socket_t m_sock; - int m_iStatus; + int m_itqStatus; KviStr m_szRemoteIp; unsigned short int m_uRemotePort; KviStr m_szLocalIp; unsigned short int m_uLocalPort; unsigned int m_uConnectTimeout; - QSocketNotifier * m_pSn; + TQSocketNotifier * m_pSn; KviDns * m_pDns; - QTimer * m_pDelayTimer; + TQTimer * m_pDelayTimer; char * m_pInBuffer; unsigned int m_uInBufferLen; unsigned int m_uInDataLen; @@ -62,13 +63,13 @@ protected: unsigned int m_uConnectionId; KviDataBuffer * m_pOutBuffer; - QTimer * m_pFlushTimer; + TQTimer * m_pFlushTimer; kvi_socket_t m_secondarySock; unsigned short int m_uSecondaryPort; KviStr m_szSecondaryIp; protected: - bool functionStatus(KviCommand *c,KviParameterList * params,KviStr &buffer); + bool functiontqStatus(KviCommand *c,KviParameterList * params,KviStr &buffer); bool functionRemotePort(KviCommand *c,KviParameterList * params,KviStr &buffer); bool functionRemoteIp(KviCommand *c,KviParameterList * params,KviStr &buffer); bool functionLocalPort(KviCommand *c,KviParameterList * params,KviStr &buffer); @@ -115,20 +116,21 @@ public: class KviKvsObject_socket : public KviKvsObject { Q_OBJECT + TQ_OBJECT public: KVSO_DECLARE_OBJECT(KviKvsObject_socket) protected: bool m_bUdp; kvi_socket_t m_sock; - int m_iStatus; - QString m_szRemoteIp; + int m_itqStatus; + TQString m_szRemoteIp; // unsigned short int m_uRemotePort; - QString m_szLocalIp; + TQString m_szLocalIp; kvi_u32_t m_uLocalPort; unsigned int m_uConnectTimeout; - QSocketNotifier * m_pSn; + TQSocketNotifier * m_pSn; KviDns * m_pDns; - QTimer * m_pDelayTimer; + TQTimer * m_pDelayTimer; char * m_pInBuffer; unsigned int m_uInBufferLen; unsigned int m_uInDataLen; @@ -136,13 +138,13 @@ protected: unsigned int m_uConnectionId; kvs_uint_t m_uRemotePort; KviDataBuffer * m_pOutBuffer; - QTimer * m_pFlushTimer; + TQTimer * m_pFlushTimer; kvi_socket_t m_secondarySock; kvi_u32_t m_uSecondaryPort; - QString m_szSecondaryIp; + TQString m_szSecondaryIp; protected: - bool functionStatus(KviKvsObjectFunctionCall *c); + bool functiontqStatus(KviKvsObjectFunctionCall *c); bool functionRemotePort(KviKvsObjectFunctionCall *c); bool functionRemoteIp(KviKvsObjectFunctionCall *c); bool functionLocalPort(KviKvsObjectFunctionCall *c); diff --git a/src/modules/objects/class_spinbox.cpp b/src/modules/objects/class_spinbox.cpp index f87a3a51..62f7df54 100644 --- a/src/modules/objects/class_spinbox.cpp +++ b/src/modules/objects/class_spinbox.cpp @@ -21,7 +21,7 @@ // Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // -#include +#include #include "class_spinbox.h" #include "kvi_error.h" #include "kvi_debug.h" @@ -132,8 +132,8 @@ KVSO_END_CONSTRUCTOR(KviKvsObject_spinbox) bool KviKvsObject_spinbox::init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams) { - setObject(new QSpinBox(parentScriptWidget(), name()), true); - connect(widget(),SIGNAL(valueChanged(int)),this,SLOT(valueChanged(int))); + setObject(TQT_TQOBJECT(new TQSpinBox(tqparentScriptWidget(), name())), true); + connect(widget(),TQT_SIGNAL(valueChanged(int)),this,TQT_SLOT(valueChanged(int))); return true; } @@ -145,7 +145,7 @@ bool KviKvsObject_spinbox::functionsetValue(KviKvsObjectFunctionCall *c) KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("value",KVS_PT_INT,0,iValue) KVSO_PARAMETERS_END(c) - if (widget()) ((QSpinBox *)widget())->setValue(iValue); + if (widget()) ((TQSpinBox *)widget())->setValue(iValue); return true; } bool KviKvsObject_spinbox::functionsetMinValue(KviKvsObjectFunctionCall *c) @@ -154,7 +154,7 @@ bool KviKvsObject_spinbox::functionsetMinValue(KviKvsObjectFunctionCall *c) KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("min_value",KVS_PT_INT,0,iMinvalue) KVSO_PARAMETERS_END(c) - if (widget()) ((QSpinBox *)widget())->setMinValue(iMinvalue); + if (widget()) ((TQSpinBox *)widget())->setMinValue(iMinvalue); return true; } bool KviKvsObject_spinbox::functionsetMaxValue(KviKvsObjectFunctionCall *c) @@ -163,7 +163,7 @@ bool KviKvsObject_spinbox::functionsetMaxValue(KviKvsObjectFunctionCall *c) KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("max_value",KVS_PT_INT,0,iMaxvalue) KVSO_PARAMETERS_END(c) - if (widget()) ((QSpinBox *)widget())->setMaxValue(iMaxvalue); + if (widget()) ((TQSpinBox *)widget())->setMaxValue(iMaxvalue); return true; } @@ -173,25 +173,25 @@ bool KviKvsObject_spinbox::functionsetLineStep(KviKvsObjectFunctionCall *c) KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("line_step",KVS_PT_INT,0,iLinestep) KVSO_PARAMETERS_END(c) - if (widget()) ((QSpinBox *)widget())->setLineStep(iLinestep); + if (widget()) ((TQSpinBox *)widget())->setLineStep(iLinestep); return true; } bool KviKvsObject_spinbox::functionvalue(KviKvsObjectFunctionCall *c) { - if (widget()) c->returnValue()->setInteger(((QSpinBox *)widget())->value()); + if (widget()) c->returnValue()->setInteger(((TQSpinBox *)widget())->value()); return true; } bool KviKvsObject_spinbox::functionminValue(KviKvsObjectFunctionCall *c) { - if (widget()) c->returnValue()->setInteger(((QSpinBox *)widget())->minValue()); + if (widget()) c->returnValue()->setInteger(((TQSpinBox *)widget())->minValue()); return true; } bool KviKvsObject_spinbox::functionmaxValue(KviKvsObjectFunctionCall *c) { - if (widget()) c->returnValue()->setInteger(((QSpinBox *)widget())->maxValue()); + if (widget()) c->returnValue()->setInteger(((TQSpinBox *)widget())->maxValue()); return true; } bool KviKvsObject_spinbox::functionlineStep(KviKvsObjectFunctionCall *c) @@ -199,9 +199,9 @@ bool KviKvsObject_spinbox::functionlineStep(KviKvsObjectFunctionCall *c) if (widget()) { #ifdef COMPILE_USE_QT4 - c->returnValue()->setInteger(((QSpinBox *)widget())->singleStep()); + c->returnValue()->setInteger(((TQSpinBox *)widget())->singleStep()); #else - c->returnValue()->setInteger(((QSpinBox *)widget())->lineStep()); + c->returnValue()->setInteger(((TQSpinBox *)widget())->lineStep()); #endif } @@ -211,7 +211,7 @@ bool KviKvsObject_spinbox::functionlineStep(KviKvsObjectFunctionCall *c) bool KviKvsObject_spinbox::functionspecialValueText(KviKvsObjectFunctionCall *c) { - if (widget()) c->returnValue()->setString(((QSpinBox *)widget())->specialValueText()); + if (widget()) c->returnValue()->setString(((TQSpinBox *)widget())->specialValueText()); return true; } @@ -219,34 +219,34 @@ bool KviKvsObject_spinbox::functionspecialValueText(KviKvsObjectFunctionCall *c) bool KviKvsObject_spinbox::functionsetSpecialValueText(KviKvsObjectFunctionCall *c) { - QString szText; + TQString szText; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("text",KVS_PT_STRING,0,szText) KVSO_PARAMETERS_END(c) if(widget()) - ((QSpinBox *)widget())->setSpecialValueText(szText); + ((TQSpinBox *)widget())->setSpecialValueText(szText); return true; } bool KviKvsObject_spinbox::functionsetPrefix(KviKvsObjectFunctionCall *c) { - QString szPrefix; + TQString szPrefix; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("text",KVS_PT_STRING,0,szPrefix) KVSO_PARAMETERS_END(c) if(widget()) - ((QSpinBox *)widget())->setPrefix(szPrefix); + ((TQSpinBox *)widget())->setPrefix(szPrefix); return true; } bool KviKvsObject_spinbox::functionsetSuffix(KviKvsObjectFunctionCall *c) { - QString szSuffix; + TQString szSuffix; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("text",KVS_PT_STRING,0,szSuffix) KVSO_PARAMETERS_END(c) if(widget()) - ((QSpinBox *)widget())->setSuffix(szSuffix); + ((TQSpinBox *)widget())->setSuffix(szSuffix); return true; } diff --git a/src/modules/objects/class_spinbox.h b/src/modules/objects/class_spinbox.h index d5a6ee94..dde0a017 100644 --- a/src/modules/objects/class_spinbox.h +++ b/src/modules/objects/class_spinbox.h @@ -25,7 +25,7 @@ -#include +#include #include "class_widget.h" #include "object_macros.h" @@ -33,10 +33,11 @@ class KviKvsObject_spinbox : public KviKvsObject_widget { Q_OBJECT + TQ_OBJECT public: KVSO_DECLARE_OBJECT(KviKvsObject_spinbox) public: - QWidget * widget() { return (QWidget *)object(); }; + TQWidget * widget() { return (TQWidget *)object(); }; protected: virtual bool init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams); diff --git a/src/modules/objects/class_tabwidget.cpp b/src/modules/objects/class_tabwidget.cpp index c5e97b60..57e30a18 100644 --- a/src/modules/objects/class_tabwidget.cpp +++ b/src/modules/objects/class_tabwidget.cpp @@ -94,7 +94,7 @@ %secondtab=$new(widget,%Tabwidget) # Now we'll create the item to put in to tab's pages. - %layoutfirsttab=$new(layout,%firsttab) + %tqlayoutfirsttab=$new(tqlayout,%firsttab) %labelbt=$new(label,%firsttab) %labelbt->$settext(Botton Tab) %labeltt=$new(label,%firsttab) @@ -104,12 +104,12 @@ %buttontt=$new(button,%firsttab) %buttontt->$settext("To &Top") - # Now we'll give a layout to all items. + # Now we'll give a tqlayout to all items. # This also allows to use privateimpl without making buttons global variables - %layoutfirsttab->$addwidget(%labelbt,0,0) - %layoutfirsttab->$addwidget(%labeltt,0,1) - %layoutfirsttab->$addwidget(%buttontb,1,0) - %layoutfirsttab->$addwidget(%buttontt,1,1) + %tqlayoutfirsttab->$addwidget(%labelbt,0,0) + %tqlayoutfirsttab->$addwidget(%labeltt,0,1) + %tqlayoutfirsttab->$addwidget(%buttontb,1,0) + %tqlayoutfirsttab->$addwidget(%buttontt,1,1) # Add the page to the main tab. %Tabwidget->$addTab(%firsttab,Top&Button,33) @@ -125,15 +125,15 @@ } # We do the same work with the second tab's page. - %layoutsecondtab=$new(layout,%secondtab) + %tqlayoutsecondtab=$new(tqlayout,%secondtab) %labelwp=$new(label,%secondtab) %labelwp->$settext("Enjoy the new Class provided by") - %layoutsecondtab->$addwidget(%labelwp,0,0) - %labelwp->$setalignment("Center") + %tqlayoutsecondtab->$addwidget(%labelwp,0,0) + %labelwp->$settqalignment("Center") %labelgen=$new(label,%secondtab) %labelgen->$settext(Grifisx \& Noldor) - %labelgen->$setalignment("Center") - %layoutsecondtab->$addwidget(%labelgen,1,0) + %labelgen->$settqalignment("Center") + %tqlayoutsecondtab->$addwidget(%labelgen,1,0) %Tabwidget->$addTab(%secondtab,&About,50) # Let's show our example. @@ -182,14 +182,14 @@ KVSO_END_CONSTRUCTOR(KviKvsObject_tabwidget) bool KviKvsObject_tabwidget::init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams) { - setObject(new QTabWidget(parentScriptWidget(), name()), true); - connect(widget(),SIGNAL(currentChanged(int)),this,SLOT(slotcurrentChanged(int))); + setObject(TQT_TQOBJECT(new TQTabWidget(tqparentScriptWidget(), name())), true); + connect(widget(),TQT_SIGNAL(currentChanged(int)),this,TQT_SLOT(slotcurrentChanged(int))); return true; } bool KviKvsObject_tabwidget::functionaddTab(KviKvsObjectFunctionCall *c) { KviKvsObject *ob; - QString szLabel,szIcon; + TQString szLabel,szIcon; kvs_hobject_t hObject; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("widget",KVS_PT_HOBJECT,0,hObject) @@ -213,23 +213,23 @@ bool KviKvsObject_tabwidget::functionaddTab(KviKvsObjectFunctionCall *c) c->warning(__tr2qs("Can't add a non-widget object")); return true; } - QPixmap * pix = g_pIconManager->getImage(szIcon); + TQPixmap * pix = g_pIconManager->getImage(szIcon); if(pix){ #ifdef COMPILE_USE_QT4 - ((QTabWidget *)widget())->addTab(((QWidget *)(ob->object())),QIconSet(*pix),szLabel); + ((TQTabWidget *)widget())->addTab(((TQWidget *)(ob->object())),TQIconSet(*pix),szLabel); #else - ((QTabWidget *)widget())->addTab(((QWidget *)(ob->object())),QIconSet(*pix,QIconSet::Small),szLabel); + ((TQTabWidget *)widget())->addTab(((TQWidget *)(ob->object())),TQIconSet(*pix,TQIconSet::Small),szLabel); #endif } - else((QTabWidget *)widget())->addTab(((QWidget *)(ob->object())),szLabel); + else((TQTabWidget *)widget())->addTab(((TQWidget *)(ob->object())),szLabel); return true; } bool KviKvsObject_tabwidget::functioninsertTab(KviKvsObjectFunctionCall *c) { KviKvsObject *ob; - QString szLabel,szIcon; + TQString szLabel,szIcon; kvs_uint_t uIndex; kvs_hobject_t hObject; KVSO_PARAMETERS_BEGIN(c) @@ -255,15 +255,15 @@ bool KviKvsObject_tabwidget::functioninsertTab(KviKvsObjectFunctionCall *c) c->warning(__tr2qs("Can't add a non-widget object")); return true; } - QPixmap * pix = g_pIconManager->getImage(szIcon); + TQPixmap * pix = g_pIconManager->getImage(szIcon); if(pix){ #ifdef COMPILE_USE_QT4 - ((QTabWidget *)widget())->insertTab( ((QWidget *)(ob->object())),QIconSet(*pix),szLabel,uIndex); + ((TQTabWidget *)widget())->insertTab( ((TQWidget *)(ob->object())),TQIconSet(*pix),szLabel,uIndex); #else - ((QTabWidget *)widget())->insertTab(((QWidget *)(ob->object())),QIconSet(*pix,QIconSet::Small),szLabel,uIndex); + ((TQTabWidget *)widget())->insertTab(((TQWidget *)(ob->object())),TQIconSet(*pix,TQIconSet::Small),szLabel,uIndex); #endif } - else ((QTabWidget *)widget())->insertTab(((QWidget *)(ob->object())),szLabel,uIndex); + else ((TQTabWidget *)widget())->insertTab(((TQWidget *)(ob->object())),szLabel,uIndex); return true; } @@ -273,13 +273,13 @@ bool KviKvsObject_tabwidget::functionsetCurrentPage(KviKvsObjectFunctionCall *c) KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("index",KVS_PT_UNSIGNEDINTEGER,0,uIndex) KVSO_PARAMETERS_END(c) - if (widget()) ((QTabWidget *)widget())->setCurrentPage(uIndex); + if (widget()) ((TQTabWidget *)widget())->setCurrentPage(uIndex); return true; } bool KviKvsObject_tabwidget::functionsetTabToolTip(KviKvsObjectFunctionCall *c) { KviKvsObject *ob; - QString szTooltip; + TQString szTooltip; kvs_hobject_t hObject; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("tab_widget",KVS_PT_HOBJECT,0,hObject) @@ -302,13 +302,13 @@ bool KviKvsObject_tabwidget::functionsetTabToolTip(KviKvsObjectFunctionCall *c) c->warning(__tr2qs("Not a widget object")); return true; } - int ctrl = ((QTabWidget *)widget())->indexOf (((QWidget *)(ob->object()))); + int ctrl = ((TQTabWidget *)widget())->indexOf (((TQWidget *)(ob->object()))); if (ctrl == -1) { c->warning(__tr2qs("Can't find the tab ")); return true; } - ((QTabWidget *)widget())->setTabToolTip(((QWidget *)(ob->object())),szTooltip); + ((TQTabWidget *)widget())->setTabToolTip(((TQWidget *)(ob->object())),szTooltip); return true; } bool KviKvsObject_tabwidget::functionremoveTabToolTip(KviKvsObjectFunctionCall *c) @@ -335,19 +335,19 @@ bool KviKvsObject_tabwidget::functionremoveTabToolTip(KviKvsObjectFunctionCall * c->warning(__tr2qs("Not a widget object")); return true; } - if (((QTabWidget *)widget())->indexOf (((QWidget *)(ob->object()))) == -1) + if (((TQTabWidget *)widget())->indexOf (((TQWidget *)(ob->object()))) == -1) { c->warning(__tr2qs("Can't find the tab ")); return true; } - ((QTabWidget *)widget())->removeTabToolTip(((QWidget *)(ob->object()))); + ((TQTabWidget *)widget())->removeTabToolTip(((TQWidget *)(ob->object()))); return true; } bool KviKvsObject_tabwidget::functionsetTabLabel(KviKvsObjectFunctionCall *c) { KviKvsObject *ob; - QString szLabel; + TQString szLabel; kvs_hobject_t hObject; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("tab_widget",KVS_PT_HOBJECT,0, hObject) @@ -370,18 +370,18 @@ bool KviKvsObject_tabwidget::functionsetTabLabel(KviKvsObjectFunctionCall *c) c->warning(__tr2qs("Not a widget object")); return true; } - int ctrl = ((QTabWidget *)widget())->indexOf (((QWidget *)(ob->object()))); + int ctrl = ((TQTabWidget *)widget())->indexOf (((TQWidget *)(ob->object()))); if (ctrl == -1) { c->warning(__tr2qs("Can't find the tab ")); return true; } - ((QTabWidget *)widget())->setTabLabel(((QWidget *)(ob->object())),szLabel); + ((TQTabWidget *)widget())->setTabLabel(((TQWidget *)(ob->object())),szLabel); return true; } bool KviKvsObject_tabwidget::functioncurrentPageIndex(KviKvsObjectFunctionCall *c) { - int index=((QTabWidget *)widget())->currentPageIndex(); + int index=((TQTabWidget *)widget())->currentPageIndex(); if (widget()) c->returnValue()->setInteger(index); return true; } @@ -392,7 +392,7 @@ bool KviKvsObject_tabwidget::functiontabLabel(KviKvsObjectFunctionCall *c) KVSO_PARAMETER("index",KVS_PT_INT,0,uIndex) KVSO_PARAMETERS_END(c) if (!widget()) return true; - QString label=((QTabWidget *)widget())->label(uIndex); + TQString label=((TQTabWidget *)widget())->label(uIndex); c->returnValue()->setString(label); return true; } @@ -402,20 +402,20 @@ bool KviKvsObject_tabwidget::functionsetMargin(KviKvsObjectFunctionCall *c) KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("margin",KVS_PT_INT,0,iMargin) KVSO_PARAMETERS_END(c) - if (widget()) ((QTabWidget *)widget())->setMargin(iMargin); + if (widget()) ((TQTabWidget *)widget())->setMargin(iMargin); return true; } bool KviKvsObject_tabwidget::functionmargin(KviKvsObjectFunctionCall *c) { - if (widget()) c->returnValue()->setInteger(((QTabWidget *)widget())->margin()); + if (widget()) c->returnValue()->setInteger(((TQTabWidget *)widget())->margin()); return true; } bool KviKvsObject_tabwidget::functioncount(KviKvsObjectFunctionCall *c) { if (!widget()) return true; - int count = ((QTabWidget *)widget())->count(); + int count = ((TQTabWidget *)widget())->count(); c->returnValue()->setInteger(count); return true; } @@ -424,8 +424,8 @@ bool KviKvsObject_tabwidget::functioncurrentTabLabel(KviKvsObjectFunctionCall *c { if (widget()) { - int i= ((QTabWidget *)widget())->currentPageIndex(); - QString label=((QTabWidget *)widget())->label(i); + int i= ((TQTabWidget *)widget())->currentPageIndex(); + TQString label=((TQTabWidget *)widget())->label(i); c->returnValue()->setString(label); } return true; @@ -454,20 +454,20 @@ bool KviKvsObject_tabwidget::functionremovePage(KviKvsObjectFunctionCall *c) c->warning(__tr2qs("Not a widget object")); return true; } - int ctrl = ((QTabWidget *)widget())->indexOf (((QWidget *)(ob->object()))); + int ctrl = ((TQTabWidget *)widget())->indexOf (((TQWidget *)(ob->object()))); if (ctrl == -1) { c->warning(__tr2qs("Can't find the tab ")); return true; } - ((QTabWidget *)widget())->removePage(((QWidget *)(ob->object()))); + ((TQTabWidget *)widget())->removePage(((TQWidget *)(ob->object()))); return true; } bool KviKvsObject_tabwidget::functionchangeTab(KviKvsObjectFunctionCall *c) { KviKvsObject *ob; - QString szLabel,szIcon; + TQString szLabel,szIcon; kvs_hobject_t hObject; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("tab_widget",KVS_PT_HOBJECT,0,hObject) @@ -491,34 +491,34 @@ bool KviKvsObject_tabwidget::functionchangeTab(KviKvsObjectFunctionCall *c) c->warning(__tr2qs("Not a widget object")); return true; } - int ctrl = ((QTabWidget *)widget())->indexOf (((QWidget *)(ob->object()))); + int ctrl = ((TQTabWidget *)widget())->indexOf (((TQWidget *)(ob->object()))); if (ctrl == -1) { c->warning(__tr2qs("Can't find the tab ")); return true; } - QPixmap * pix = g_pIconManager->getImage(szIcon); + TQPixmap * pix = g_pIconManager->getImage(szIcon); if(pix){ #ifdef COMPILE_USE_QT4 - ((QTabWidget *)widget())->changeTab(((QWidget *)(ob->object())),QIconSet(*pix),szLabel); + ((TQTabWidget *)widget())->changeTab(((TQWidget *)(ob->object())),TQIconSet(*pix),szLabel); #else - ((QTabWidget *)widget())->changeTab(((QWidget *)(ob->object())),QIconSet(*pix,QIconSet::Small),szLabel); + ((TQTabWidget *)widget())->changeTab(((TQWidget *)(ob->object())),TQIconSet(*pix,TQIconSet::Small),szLabel); #endif } - else ((QTabWidget *)widget())->changeTab(((QWidget *)(ob->object())),szLabel); + else ((TQTabWidget *)widget())->changeTab(((TQWidget *)(ob->object())),szLabel); return true; } bool KviKvsObject_tabwidget::functionsetTabPosition(KviKvsObjectFunctionCall *c) { - QString szPos; + TQString szPos; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("tab_position",KVS_PT_STRING,0,szPos) KVSO_PARAMETERS_END(c) if(!widget())return true; - if(KviQString::equalCI(szPos,"Top")) - ((QTabWidget *)widget())->setTabPosition(QTabWidget::Top); - else if(KviQString::equalCI(szPos,"Bottom")) - ((QTabWidget *)widget())->setTabPosition(QTabWidget::Bottom); + if(KviTQString::equalCI(szPos,"Top")) + ((TQTabWidget *)widget())->setTabPosition(TQTabWidget::Top); + else if(KviTQString::equalCI(szPos,"Bottom")) + ((TQTabWidget *)widget())->setTabPosition(TQTabWidget::Bottom); else c->warning( __tr2qs("Unknown position 'Q%'"),&szPos); return true; } diff --git a/src/modules/objects/class_tabwidget.h b/src/modules/objects/class_tabwidget.h index acc76d36..f82d6cac 100644 --- a/src/modules/objects/class_tabwidget.h +++ b/src/modules/objects/class_tabwidget.h @@ -22,7 +22,7 @@ // along with this program. If not, write to the Free Software Foundation, // Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // -#include +#include #include "class_widget.h" #include "object_macros.h" @@ -30,10 +30,11 @@ class KviKvsObject_tabwidget : public KviKvsObject_widget { Q_OBJECT + TQ_OBJECT public: KVSO_DECLARE_OBJECT(KviKvsObject_tabwidget) public: - QWidget * widget() { return (QWidget *)object(); }; + TQWidget * widget() { return (TQWidget *)object(); }; protected: virtual bool init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams); diff --git a/src/modules/objects/class_tbrowser.cpp b/src/modules/objects/class_tbrowser.cpp index 67dce8cb..872a9c86 100644 --- a/src/modules/objects/class_tbrowser.cpp +++ b/src/modules/objects/class_tbrowser.cpp @@ -21,7 +21,7 @@ // Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // -#include +#include #include "class_tbrowser.h" #include "kvi_error.h" #include "kvi_debug.h" @@ -82,53 +82,53 @@ KVSO_END_CONSTRUCTOR(KviKvsObject_textbrowser) bool KviKvsObject_textbrowser::init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams) { - QTextBrowser * tb = new QTextBrowser(parentScriptWidget(), name()); - setObject(tb, true); - connect(tb,SIGNAL(anchorClicked(const QString &,const QString &)),this,SLOT(anchorClicked(const QString &,const QString &))); + TQTextBrowser * tb = new TQTextBrowser(tqparentScriptWidget(), name()); + setObject(TQT_TQOBJECT(tb), true); + connect(tb,TQT_SIGNAL(anchorClicked(const TQString &,const TQString &)),this,TQT_SLOT(anchorClicked(const TQString &,const TQString &))); return true; } bool KviKvsObject_textbrowser::function_setSource(KviKvsObjectFunctionCall *c) { - QString szFile; + TQString szFile; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("file_name",KVS_PT_STRING,0,szFile) KVSO_PARAMETERS_END(c) - if(!QFile::exists(szFile)) + if(!TQFile::exists(szFile)) { c->warning(__tr2qs("I can't find the specified file '%Q'."),&szFile); return true; } - if (widget()) ((QTextBrowser *)widget())->setSource(szFile); + if (widget()) ((TQTextBrowser *)widget())->setSource(szFile); return true; } bool KviKvsObject_textbrowser::function_forward(KviKvsObjectFunctionCall *c) { - if (widget()) ((QTextBrowser *)widget())->forward(); + if (widget()) ((TQTextBrowser *)widget())->forward(); return true; } bool KviKvsObject_textbrowser::function_backward(KviKvsObjectFunctionCall *c) { - if (widget()) ((QTextBrowser *)widget())->backward(); + if (widget()) ((TQTextBrowser *)widget())->backward(); return true; } bool KviKvsObject_textbrowser::function_home(KviKvsObjectFunctionCall *c) { - if (widget()) ((QTextBrowser *)widget())->home(); + if (widget()) ((TQTextBrowser *)widget())->home(); return true; } bool KviKvsObject_textbrowser::function_reload(KviKvsObjectFunctionCall *c) { - if (widget()) ((QTextBrowser *)widget())->reload(); + if (widget()) ((TQTextBrowser *)widget())->reload(); return true; } -void KviKvsObject_textbrowser::anchorClicked(const QString &szName,const QString &szLink) +void KviKvsObject_textbrowser::anchorClicked(const TQString &szName,const TQString &szLink) { KviKvsVariantList parms(new KviKvsVariant(szLink)); callFunction(this,"linkClickedEvent",0,&parms); diff --git a/src/modules/objects/class_tbrowser.h b/src/modules/objects/class_tbrowser.h index 980bdc28..f494a05e 100644 --- a/src/modules/objects/class_tbrowser.h +++ b/src/modules/objects/class_tbrowser.h @@ -23,19 +23,20 @@ // Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // -#include +#include #include "class_widget.h" -#include +#include #include "class_multilineedit.h" #include "object_macros.h" class KviKvsObject_textbrowser : public KviKvsObject_mledit { Q_OBJECT + TQ_OBJECT public: KVSO_DECLARE_OBJECT(KviKvsObject_textbrowser) public: - QWidget * widget() { return (QWidget *)object(); }; + TQWidget * widget() { return (TQWidget *)object(); }; protected: virtual bool init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams); @@ -46,7 +47,7 @@ protected: bool function_reload(KviKvsObjectFunctionCall *c); bool function_linkClickedEvent(KviKvsObjectFunctionCall *c); protected slots: - void anchorClicked(const QString &szName,const QString &szLink); + void anchorClicked(const TQString &szName,const TQString &szLink); }; #endif //!_CLASS_TBROWSER_H_ diff --git a/src/modules/objects/class_toolbar.cpp b/src/modules/objects/class_toolbar.cpp index ed280bd0..036c31ee 100644 --- a/src/modules/objects/class_toolbar.cpp +++ b/src/modules/objects/class_toolbar.cpp @@ -79,18 +79,18 @@ KVSO_END_CONSTRUCTOR(KviKvsObject_toolbar) bool KviKvsObject_toolbar::init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams) { - if (!parentObject()) + if (!tqparentObject()) { - pContext->warning(__tr2qs("the toolbar cannot be a parent-widget!")); + pContext->warning(__tr2qs("the toolbar cannot be a tqparent-widget!")); return true; } - if(parentObject()->inherits("KviKvsObject_mainwindow")) + if(tqparentObject()->inherits("KviKvsObject_mainwindow")) { - setObject(new KviTalToolBar(name(), ((KviTalMainWindow *)parentScriptWidget())), true); + setObject(TQT_TQOBJECT(new KviTalToolBar(name(), ((KviTalMainWindow *)tqparentScriptWidget()))), true); } else { - pContext->warning(__tr2qs("The parent-widget isn't a MainWindow.")); + pContext->warning(__tr2qs("The tqparent-widget isn't a MainWindow.")); } return true; @@ -103,7 +103,7 @@ bool KviKvsObject_toolbar::functionaddSeparator(KviKvsObjectFunctionCall *c) } bool KviKvsObject_toolbar::functionsetLabel(KviKvsObjectFunctionCall *c) { - QString szLabel; + TQString szLabel; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("label",KVS_PT_STRING,0,szLabel) KVSO_PARAMETERS_END(c) @@ -140,8 +140,8 @@ bool KviKvsObject_toolbar::functionsetStretchableWidget(KviKvsObjectFunctionCall return TRUE; } #ifndef COMPILE_USE_QT4 - // FIXME: no support for this in Qt4 ? - if(widget()) ((KviTalToolBar *)widget())->setStretchableWidget(((QWidget *)(ob->object()))); + // FIXME: no support for this in TQt4 ? + if(widget()) ((KviTalToolBar *)widget())->setStretchableWidget(((TQWidget *)(ob->object()))); #endif //!COMPILE_USE_QT4 return true; } diff --git a/src/modules/objects/class_toolbar.h b/src/modules/objects/class_toolbar.h index 1912e639..d258f96a 100644 --- a/src/modules/objects/class_toolbar.h +++ b/src/modules/objects/class_toolbar.h @@ -32,10 +32,11 @@ class KviKvsObject_toolbar : public KviKvsObject_widget { Q_OBJECT + TQ_OBJECT public: KVSO_DECLARE_OBJECT(KviKvsObject_toolbar) public: - QWidget * widget() { return (QWidget *)object(); }; + TQWidget * widget() { return (TQWidget *)object(); }; protected: virtual bool init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams); diff --git a/src/modules/objects/class_toolbutton.cpp b/src/modules/objects/class_toolbutton.cpp index 032b0c60..c8efb269 100644 --- a/src/modules/objects/class_toolbutton.cpp +++ b/src/modules/objects/class_toolbutton.cpp @@ -129,28 +129,28 @@ KVSO_END_CONSTRUCTOR(KviKvsObject_toolbutton) bool KviKvsObject_toolbutton::init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams) { - setObject(new QToolButton(parentScriptWidget(), name()), true); - connect(widget(),SIGNAL(clicked()),this,SLOT(slotClicked())); + setObject(TQT_TQOBJECT(new TQToolButton(tqparentScriptWidget(), name())), true); + connect(widget(),TQT_SIGNAL(clicked()),this,TQT_SLOT(slotClicked())); return true; } bool KviKvsObject_toolbutton::functionsetImage(KviKvsObjectFunctionCall *c) { - QString icon; + TQString icon; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("icon_id",KVS_PT_STRING,0,icon) KVSO_PARAMETERS_END(c) if (!widget()) return true; - QPixmap * pix = g_pIconManager->getImage(icon); + TQPixmap * pix = g_pIconManager->getImage(icon); if(pix){ #ifdef COMPILE_USE_QT4 - ((QToolButton *)widget())->setIconSet(QIconSet(*pix)); + ((TQToolButton *)widget())->setIconSet(TQIconSet(*pix)); #else - ((QToolButton *)widget())->setIconSet(QIconSet(*pix,QIconSet::Small)); + ((TQToolButton *)widget())->setIconSet(TQIconSet(*pix,TQIconSet::Small)); #endif } else - ((QToolButton *)widget())->setIconSet(QIconSet()); + ((TQToolButton *)widget())->setIconSet(TQIconSet()); return true; } bool KviKvsObject_toolbutton::functionsetUsesBigPixmap(KviKvsObjectFunctionCall *c) @@ -160,13 +160,13 @@ bool KviKvsObject_toolbutton::functionsetUsesBigPixmap(KviKvsObjectFunctionCall KVSO_PARAMETER("bEnabled",KVS_PT_BOOL,0,bEnabled) KVSO_PARAMETERS_END(c) if(widget()) - ((QToolButton *)widget())->setUsesBigPixmap(bEnabled); + ((TQToolButton *)widget())->setUsesBigPixmap(bEnabled); return true; } bool KviKvsObject_toolbutton::functionusesBigPixmap(KviKvsObjectFunctionCall *c) { if (widget()) - c->returnValue()->setBoolean(((QToolButton *)widget())->usesBigPixmap()); + c->returnValue()->setBoolean(((TQToolButton *)widget())->usesBigPixmap()); return true; } bool KviKvsObject_toolbutton::functionsetUsesTextLabel(KviKvsObjectFunctionCall *c) @@ -176,13 +176,13 @@ bool KviKvsObject_toolbutton::functionsetUsesTextLabel(KviKvsObjectFunctionCall KVSO_PARAMETER("bEnabled",KVS_PT_BOOL,0,bEnabled) KVSO_PARAMETERS_END(c) if(widget()) - ((QToolButton *)widget())->setUsesTextLabel(bEnabled); + ((TQToolButton *)widget())->setUsesTextLabel(bEnabled); return true; } bool KviKvsObject_toolbutton::functionusesTextLabel(KviKvsObjectFunctionCall *c) { if (widget()) - c->returnValue()->setBoolean(((QToolButton *)widget())->usesTextLabel()); + c->returnValue()->setBoolean(((TQToolButton *)widget())->usesTextLabel()); return true; } bool KviKvsObject_toolbutton::function_setAutoRaise(KviKvsObjectFunctionCall *c) @@ -192,13 +192,13 @@ bool KviKvsObject_toolbutton::function_setAutoRaise(KviKvsObjectFunctionCall *c) KVSO_PARAMETER("bEnabled",KVS_PT_BOOL,0,bEnabled) KVSO_PARAMETERS_END(c) if(widget()) - ((QToolButton *)widget())->setAutoRaise(bEnabled); + ((TQToolButton *)widget())->setAutoRaise(bEnabled); return true; } bool KviKvsObject_toolbutton::function_autoRaise(KviKvsObjectFunctionCall *c) { if(widget()) - c->returnValue()->setBoolean(((QToolButton *)widget())->autoRaise()); + c->returnValue()->setBoolean(((TQToolButton *)widget())->autoRaise()); return true; } bool KviKvsObject_toolbutton::functionsetOn(KviKvsObjectFunctionCall *c) @@ -208,7 +208,7 @@ bool KviKvsObject_toolbutton::functionsetOn(KviKvsObjectFunctionCall *c) KVSO_PARAMETER("bEnabled",KVS_PT_BOOL,0,bEnabled) KVSO_PARAMETERS_END(c) if(widget()) - ((QToolButton *)widget())->setOn(bEnabled); + ((TQToolButton *)widget())->setOn(bEnabled); return true; } @@ -219,19 +219,19 @@ bool KviKvsObject_toolbutton::functionsetToggleButton(KviKvsObjectFunctionCall * KVSO_PARAMETER("bEnabled",KVS_PT_BOOL,0,bEnabled) KVSO_PARAMETERS_END(c) if(widget()) - ((QToolButton *)widget())->setToggleButton(bEnabled); + ((TQToolButton *)widget())->setToggleButton(bEnabled); return true; } bool KviKvsObject_toolbutton::functiontoggle(KviKvsObjectFunctionCall *c) { if (widget()) - ((QToolButton *)widget())->toggle(); + ((TQToolButton *)widget())->toggle(); return true; } bool KviKvsObject_toolbutton::functionsetTextLabel(KviKvsObjectFunctionCall *c) { - QString szLabel,szTip; + TQString szLabel,szTip; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("label",KVS_PT_STRING,0,szLabel) KVSO_PARAMETER("tooltip",KVS_PT_STRING,KVS_PF_OPTIONAL,szTip) @@ -239,18 +239,18 @@ bool KviKvsObject_toolbutton::functionsetTextLabel(KviKvsObjectFunctionCall *c) if(!widget()) return true; #ifdef COMPILE_USE_QT4 - ((QToolButton *)widget())->setText(szLabel); - if (!szTip.isEmpty()) ((QToolButton *)widget())->setToolTip(szTip); + ((TQToolButton *)widget())->setText(szLabel); + if (!szTip.isEmpty()) ((TQToolButton *)widget())->setToolTip(szTip); #else - if (szTip.isEmpty()) ((QToolButton *)widget())->setTextLabel(szLabel); - else ((QToolButton *)widget())->setTextLabel(szLabel,szTip); + if (szTip.isEmpty()) ((TQToolButton *)widget())->setTextLabel(szLabel); + else ((TQToolButton *)widget())->setTextLabel(szLabel,szTip); #endif return true; } bool KviKvsObject_toolbutton::functiontextLabel(KviKvsObjectFunctionCall *c) { if (widget()) - c->returnValue()->setString(((QToolButton *)widget())->textLabel()); + c->returnValue()->setString(((TQToolButton *)widget())->textLabel()); return true; } bool KviKvsObject_toolbutton::functionsetPopup(KviKvsObjectFunctionCall *c) @@ -277,13 +277,13 @@ bool KviKvsObject_toolbutton::functionsetPopup(KviKvsObjectFunctionCall *c) return TRUE; } if(widget()) - ((QToolButton *)widget())->setPopup(((KviTalPopupMenu *)(ob->object()))); + ((TQToolButton *)widget())->setPopup(((KviTalPopupMenu *)(ob->object()))); return true; } bool KviKvsObject_toolbutton::functionopenPopup(KviKvsObjectFunctionCall *c) { if(widget()) - ((QToolButton *)widget())->openPopup(); + ((TQToolButton *)widget())->openPopup(); return true; } bool KviKvsObject_toolbutton::functionsetPopupDelay(KviKvsObjectFunctionCall *c) @@ -293,34 +293,34 @@ bool KviKvsObject_toolbutton::functionsetPopupDelay(KviKvsObjectFunctionCall *c) KVSO_PARAMETER("delay",KVS_PT_UNSIGNEDINTEGER,0,uDelay) KVSO_PARAMETERS_END(c) if (widget()) - ((QToolButton *)widget())->setPopupDelay(uDelay); + ((TQToolButton *)widget())->setPopupDelay(uDelay); return true; } bool KviKvsObject_toolbutton::functionpopupDelay(KviKvsObjectFunctionCall *c) { if (widget()) - c->returnValue()->setInteger(((QToolButton *)widget())->popupDelay()); + c->returnValue()->setInteger(((TQToolButton *)widget())->popupDelay()); return true; } bool KviKvsObject_toolbutton::functionsetTextPosition(KviKvsObjectFunctionCall *c) { - QString szPos; + TQString szPos; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("position",KVS_PT_STRING,0,szPos) KVSO_PARAMETERS_END(c) if(!widget())return true; - if(KviQString::equalCI(szPos,"BesideIcon")) - ((QToolButton *)widget())->setTextPosition(QToolButton::BesideIcon); - else if(KviQString::equalCI(szPos,"BelowIcon")) - ((QToolButton *)widget())->setTextPosition(QToolButton::BelowIcon); + if(KviTQString::equalCI(szPos,"BesideIcon")) + ((TQToolButton *)widget())->setTextPosition(TQToolButton::BesideIcon); + else if(KviTQString::equalCI(szPos,"BelowIcon")) + ((TQToolButton *)widget())->setTextPosition(TQToolButton::BelowIcon); else c->warning(__tr2qs("Unknown text position '%Q'"),&szPos); return true; } bool KviKvsObject_toolbutton::functiontextPosition(KviKvsObjectFunctionCall *c) { if(!widget()) return true; - QString szPos="BelowIcon"; - if ((((QToolButton *)widget())->textPosition())==(QToolButton::BesideIcon)) + TQString szPos="BelowIcon"; + if ((((TQToolButton *)widget())->textPosition())==(TQToolButton::BesideIcon)) szPos="BesideIcon"; c->returnValue()->setString(szPos); return true; diff --git a/src/modules/objects/class_toolbutton.h b/src/modules/objects/class_toolbutton.h index 2cd4dfec..244f6e9a 100644 --- a/src/modules/objects/class_toolbutton.h +++ b/src/modules/objects/class_toolbutton.h @@ -25,17 +25,18 @@ // -#include +#include #include "class_widget.h" #include "object_macros.h" class KviKvsObject_toolbutton : public KviKvsObject_widget { Q_OBJECT + TQ_OBJECT public: KVSO_DECLARE_OBJECT(KviKvsObject_toolbutton) public: - QWidget * widget() { return (QWidget *)object(); }; + TQWidget * widget() { return (TQWidget *)object(); }; protected: virtual bool init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams); diff --git a/src/modules/objects/class_urllabel.cpp b/src/modules/objects/class_urllabel.cpp index 544153c2..8b989236 100644 --- a/src/modules/objects/class_urllabel.cpp +++ b/src/modules/objects/class_urllabel.cpp @@ -33,10 +33,10 @@ #include "kvi_window.h" #include "kvi_kvs_script.h" #ifdef COMPILE_USE_QT4 -#include -#define QT_LEFT_BUTTON Qt::LeftButton +#include +#define TQT_LEFT_BUTTON Qt::LeftButton #else -#define QT_LEFT_BUTTON QEvent::LeftButton +#define TQT_LEFT_BUTTON Qt::LeftButton #endif //#warning "Functions to change colors for different states" //#warning "$setUnderline(), $underline()" @@ -53,39 +53,39 @@ static KviScriptObject * urlLabelClassCreateInstance(KviScriptObjectClass * c, KviScriptUrlLabelObject::KviScriptUrlLabelObject(KviScriptObjectClass * c, \ KviScriptObject * p, const char *n) : KviScriptLabelObject(c, p, n) { - m_normalClr = QColor("black"); - m_enterClr = QColor("blue"); - m_activeClr = QColor("red"); + m_normalClr = TQColor("black"); + m_enterClr = TQColor("blue"); + m_activeClr = TQColor("red"); m_useSingleClick = true; -// ((QLabel *)widget())->setAutoResize(true); - //widget()->setCursor(Qt::pointingHandCursor); - //((KviScriptWidgetObject: * )p)->widget()->setCursor(Qt::pointingHandCursor); +// ((TQLabel *)widget())->setAutoResize(true); + //widget()->setCursor(TQt::pointingHandCursor); + //((KviScriptWidgetObject: * )p)->widget()->setCursor(TQt::pointingHandCursor); } KviScriptUrlLabelObject::~KviScriptUrlLabelObject() { } -bool KviScriptUrlLabelObject::eventFilter(QObject * o, QEvent * e) +bool KviScriptUrlLabelObject::eventFilter(TQObject * o, TQEvent * e) { - QPalette pal = ((QLabel *)widget())->palette(); + TQPalette pal = ((TQLabel *)widget())->palette(); switch(e->type()) { - case QEvent::Enter: - pal.setColor(QColorGroup::Foreground, m_enterClr); + case TQEvent::Enter: + pal.setColor(TQColorGroup::Foreground, m_enterClr); break; - case QEvent::Leave: + case TQEvent::Leave: // this doesn't work... - if(((QMouseEvent *)e)->state() & QEvent::LeftButton) - pal.setColor(QColorGroup::Foreground, \ + if(((TQMouseEvent *)e)->state() & TQEvent::LeftButton) + pal.setColor(TQColorGroup::Foreground, \ m_activeClr); else - pal.setColor(QColorGroup::Foreground, \ + pal.setColor(TQColorGroup::Foreground, \ m_normalClr); break; - case QEvent::MouseButtonRelease: - pal.setColor(QColorGroup::Foreground, m_enterClr); + case TQEvent::MouseButtonRelease: + pal.setColor(TQColorGroup::Foreground, m_enterClr); // perform actions here if(!m_lastClickWasDbl && !m_useSingleClick) break; @@ -94,24 +94,24 @@ bool KviScriptUrlLabelObject::eventFilter(QObject * o, QEvent * e) } break; - case QEvent::MouseButtonPress: + case TQEvent::MouseButtonPress: m_lastClickWasDbl = false; - if(!((QMouseEvent * )e)->button() & \ - QEvent::LeftButton || !m_useSingleClick) + if(!((TQMouseEvent * )e)->button() & \ + TQEvent::LeftButton || !m_useSingleClick) break; - pal.setColor(QColorGroup::Foreground, m_activeClr); + pal.setColor(TQColorGroup::Foreground, m_activeClr); break; - case QEvent::MouseButtonDblClick: + case TQEvent::MouseButtonDblClick: m_lastClickWasDbl = true; if(m_useSingleClick) break; - pal.setColor(QColorGroup::Foreground, m_activeClr); + pal.setColor(TQColorGroup::Foreground, m_activeClr); break; default: // make gcc happy break; } - ((QLabel *)widget())->setPalette(pal); + ((TQLabel *)widget())->setPalette(pal); return false; } @@ -152,7 +152,7 @@ bool KviScriptUrlLabelObject::eventFilter(QObject * o, QEvent * e) !fn: $setText() Sets the label's text. Reimplemented from internal reasons. !fn: $setCursorChange() - Tells the label wheather to change or not the shape of cursor, + Tells the label wheather to change or not the tqshape of cursor, when it is above the widget. Default is false. !fn: $cursorChange() Returns true if the cursor changes over the label, false if not. @@ -181,9 +181,9 @@ KVSO_END_REGISTERCLASS(KviKvsObject_urlabel) KVSO_BEGIN_CONSTRUCTOR(KviKvsObject_urlabel,KviKvsObject_label) - m_normalClr = QColor("black"); - m_enterClr = QColor("blue"); - m_activeClr = QColor("red"); + m_normalClr = TQColor("black"); + m_enterClr = TQColor("blue"); + m_activeClr = TQColor("red"); m_useSingleClick = true; KVSO_END_CONSTRUCTOR(KviKvsObject_urlabel) @@ -192,26 +192,26 @@ KVSO_BEGIN_DESTRUCTOR(KviKvsObject_urlabel) KVSO_END_CONSTRUCTOR(KviKvsObject_urlabel) -bool KviKvsObject_urlabel::eventFilter(QObject * o, QEvent * e) +bool KviKvsObject_urlabel::eventFilter(TQObject * o, TQEvent * e) { - QPalette pal = ((QLabel *)widget())->palette(); + TQPalette pal = ((TQLabel *)widget())->palette(); switch(e->type()) { - case QEvent::Enter: - pal.setColor(QColorGroup::Foreground, m_enterClr); + case TQEvent::Enter: + pal.setColor(TQColorGroup::Foreground, m_enterClr); break; - case QEvent::Leave: + case TQEvent::Leave: // this doesn't work... - if(((QMouseEvent *)e)->state() & QT_LEFT_BUTTON) - pal.setColor(QColorGroup::Foreground, \ + if(((TQMouseEvent *)e)->state() & TQT_LEFT_BUTTON) + pal.setColor(TQColorGroup::Foreground, \ m_activeClr); else - pal.setColor(QColorGroup::Foreground, \ + pal.setColor(TQColorGroup::Foreground, \ m_normalClr); break; - case QEvent::MouseButtonRelease: - pal.setColor(QColorGroup::Foreground, m_enterClr); + case TQEvent::MouseButtonRelease: + pal.setColor(TQColorGroup::Foreground, m_enterClr); // perform actions here if(!m_lastClickWasDbl && !m_useSingleClick) break; @@ -225,30 +225,30 @@ bool KviKvsObject_urlabel::eventFilter(QObject * o, QEvent * e) kvs.run(g_pActiveWindow,0,0/*,KviKvsScript::AssumeLocals*/); } break; - case QEvent::MouseButtonPress: + case TQEvent::MouseButtonPress: m_lastClickWasDbl = false; - if(!((QMouseEvent * )e)->button() & \ - QT_LEFT_BUTTON || !m_useSingleClick) + if(!((TQMouseEvent * )e)->button() & \ + TQT_LEFT_BUTTON || !m_useSingleClick) break; - pal.setColor(QColorGroup::Foreground, m_activeClr); + pal.setColor(TQColorGroup::Foreground, m_activeClr); break; - case QEvent::MouseButtonDblClick: + case TQEvent::MouseButtonDblClick: m_lastClickWasDbl = true; if(m_useSingleClick) break; - pal.setColor(QColorGroup::Foreground, m_activeClr); + pal.setColor(TQColorGroup::Foreground, m_activeClr); break; default: // make gcc happy break; } - ((QLabel *)widget())->setPalette(pal); + ((TQLabel *)widget())->setPalette(pal); return false; } bool KviKvsObject_urlabel::functionsetUrl(KviKvsObjectFunctionCall *c) { - QString szUrl; + TQString szUrl; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("url",KVS_PT_STRING,0,szUrl) KVSO_PARAMETERS_END(c) @@ -267,7 +267,7 @@ bool KviKvsObject_urlabel::functionurl(KviKvsObjectFunctionCall *c) } bool KviKvsObject_urlabel::functionsetAction(KviKvsObjectFunctionCall *c) { - QString szAction; + TQString szAction; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("action",KVS_PT_STRING,0,szAction) KVSO_PARAMETERS_END(c) @@ -281,13 +281,13 @@ bool KviKvsObject_urlabel::functionsetAction(KviKvsObjectFunctionCall *c) } bool KviKvsObject_urlabel::functionsetText(KviKvsObjectFunctionCall *c) { - QString szText; + TQString szText; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("text",KVS_PT_STRING,0,szText) KVSO_PARAMETERS_END(c) if(!widget()) return true; - ((QLabel *)widget())->setText(szText); - ((QLabel *)widget())->setFixedSize(((QLabel *)widget())->sizeHint()); + ((TQLabel *)widget())->setText(szText); + ((TQLabel *)widget())->setFixedSize(((TQLabel *)widget())->tqsizeHint()); return true; } bool KviKvsObject_urlabel::functionaction(KviKvsObjectFunctionCall *c) @@ -304,9 +304,9 @@ bool KviKvsObject_urlabel::functionsetCursorChange(KviKvsObjectFunctionCall *c) if(!widget()) return true; if(m_changeCursor = bFlag) - widget()->setCursor(Qt::pointingHandCursor); + widget()->setCursor(TQt::pointingHandCursor); else - widget()->setCursor(Qt::arrowCursor); + widget()->setCursor(TQt::arrowCursor); return true; } bool KviKvsObject_urlabel::functionsetUseSingleClick(KviKvsObjectFunctionCall *c) diff --git a/src/modules/objects/class_urllabel.h b/src/modules/objects/class_urllabel.h index b9ee35d6..a36d910e 100644 --- a/src/modules/objects/class_urllabel.h +++ b/src/modules/objects/class_urllabel.h @@ -33,9 +33,9 @@ class KviKvsObject_urlabel : public KviKvsObject_label public: KVSO_DECLARE_OBJECT(KviKvsObject_urlabel) public: - QWidget * widget() { return (QWidget *)object(); }; + TQWidget * widget() { return (TQWidget *)object(); }; protected: - virtual bool eventFilter(QObject *, QEvent *); + virtual bool eventFilter(TQObject *, TQEvent *); bool functionsetUrl(KviKvsObjectFunctionCall *c); bool functionsetAction(KviKvsObjectFunctionCall *c); @@ -47,12 +47,12 @@ protected: bool functionsetUseSingleClick(KviKvsObjectFunctionCall *c); bool functionuseSingleClick(KviKvsObjectFunctionCall *c); - QString m_url; - QString m_action; + TQString m_url; + TQString m_action; - QColor m_normalClr; - QColor m_enterClr; - QColor m_activeClr; + TQColor m_normalClr; + TQColor m_enterClr; + TQColor m_activeClr; bool m_changeCursor; bool m_useSingleClick; diff --git a/src/modules/objects/class_vbox.cpp b/src/modules/objects/class_vbox.cpp index 477a5b69..edec898e 100644 --- a/src/modules/objects/class_vbox.cpp +++ b/src/modules/objects/class_vbox.cpp @@ -35,16 +35,16 @@ @type: class @short: - Manages child widget vertical geometry + Manages child widget vertical tqgeometry @inherits: [class]object[/class] @description: - The vbox class widget provides vertical geometry management for its child widgets. + The vbox class widget provides vertical tqgeometry management for its child widgets. @functions: !fn: $setSpacing() Sets the default spacing of the widgets in pixels !fn: $setMargin() - Sets the dimension of the layout margin : the distance from the border to the outermost child widget edges. + Sets the dimension of the tqlayout margin : the distance from the border to the outermost child widget edges. !fn: $setStretchFactor(,) Sets the stretch factor of widget to stretch. */ @@ -67,7 +67,7 @@ KVSO_END_CONSTRUCTOR(KviKvsObject_vbox) bool KviKvsObject_vbox::init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams) { - setObject(new KviTalVBox(parentScriptWidget()), true); + setObject(TQT_TQOBJECT(new KviTalVBox(tqparentScriptWidget())), true); return true; } @@ -118,11 +118,11 @@ bool KviKvsObject_vbox::functionsetStretchFactor(KviKvsObjectFunctionCall *c) return true; } - if(((KviKvsObject_widget *)pObject)->widget()->parentWidget() != widget()) + if(((KviKvsObject_widget *)pObject)->widget()->tqparentWidget() != widget()) { c->warning(__tr2qs("The widget must be a child of this vbox")); return true; } - ((KviTalVBox *)widget())->setStretchFactor(((QWidget *)(pObject->object())),uStretch); + ((KviTalVBox *)widget())->setStretchFactor(((TQWidget *)(pObject->object())),uStretch); return true; } \ No newline at end of file diff --git a/src/modules/objects/class_vbox.h b/src/modules/objects/class_vbox.h index d6b9d1cf..24e85e08 100644 --- a/src/modules/objects/class_vbox.h +++ b/src/modules/objects/class_vbox.h @@ -32,7 +32,7 @@ class KviKvsObject_vbox : public KviKvsObject_widget public: KVSO_DECLARE_OBJECT(KviKvsObject_vbox) public: - QWidget * widget() { return (QWidget *)object(); }; + TQWidget * widget() { return (TQWidget *)object(); }; protected: virtual bool init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams); bool functionsetMargin(KviKvsObjectFunctionCall *c); diff --git a/src/modules/objects/class_widget.cpp b/src/modules/objects/class_widget.cpp index d248c98b..6790bbf6 100644 --- a/src/modules/objects/class_widget.cpp +++ b/src/modules/objects/class_widget.cpp @@ -33,26 +33,26 @@ #include "kvi_mirccntrl.h" #include "kvi_app.h" #include "kvi_string.h" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include "class_widget.h" #include "class_pixmap.h" #ifdef COMPILE_USE_QT4 - #include - #include + #include + #include #else - #include + #include #endif -#include -#include -#include -#include +#include +#include +#include +#include // FIX ME: WFLAGS const char * const widgettypes_tbl[] = { @@ -69,11 +69,11 @@ const char * const widgettypes_tbl[] = { "NoAutoErase" }; #ifdef COMPILE_USE_QT4 -const Qt::WidgetAttribute widgetattributes_cod[]= { - Qt::WA_OpaquePaintEvent, - Qt::WA_NoSystemBackground, - Qt::WA_PaintOnScreen, - Qt::WA_NoMousePropagation, +const TQt::WidgetAttribute widgetattributes_cod[]= { + TQt::WA_OpaquePaintEvent, + TQt::WA_NoSystemBackground, + TQt::WA_PaintOnScreen, + TQt::WA_NoMousePropagation, }; const char * const widgetattributes_tbl[] = { @@ -85,36 +85,36 @@ const char * const widgetattributes_tbl[] = { #define widgetattributes_num (sizeof(widgetattributes_tbl) / sizeof(widgetattributes_tbl[0])) -const Qt::WindowType widgettypes_cod[] = { +const TQt::WindowType widgettypes_cod[] = { #else const int widgettypes_cod[] = { #endif - Qt::WType_TopLevel, - Qt::WType_Dialog, - Qt::WType_Popup, - Qt::WType_Desktop, - Qt::WStyle_Customize, - Qt::WStyle_Title, - Qt::WStyle_StaysOnTop, - Qt::WStyle_SysMenu, - Qt::WStyle_Minimize, - Qt::WStyle_Maximize, - Qt::WNoAutoErase + TQt::WType_TopLevel, + TQt::WType_Dialog, + TQt::WType_Popup, + TQt::WType_Desktop, + TQt::WStyle_Customize, + TQt::WStyle_Title, + TQt::WStyle_StaysOnTop, + TQt::WStyle_SysMenu, + TQt::WStyle_Minimize, + TQt::WStyle_Maximize, + TQt::WNoAutoErase }; #ifdef COMPILE_USE_QT4 - #define QT_WIDGET_TABFOCUS Qt::TabFocus - #define QT_WIDGET_CLICKFOCUS Qt::ClickFocus - #define QT_WIDGET_STRONGFOCUS Qt::StrongFocus - #define QT_WIDGET_NOFOCUS Qt::NoFocus + #define TQT_WIDGET_TABFOCUS TTQ_TabFocus + #define TQT_WIDGET_CLICKFOCUS TTQ_ClickFocus + #define TQT_WIDGET_STRONGFOCUS TTQ_StrongFocus + #define TQT_WIDGET_NOFOCUS TTQ_NoFocus #else - #define QT_WIDGET_TABFOCUS QWidget::TabFocus - #define QT_WIDGET_CLICKFOCUS QWidget::ClickFocus - #define QT_WIDGET_STRONGFOCUS QWidget::StrongFocus - #define QT_WIDGET_NOFOCUS QWidget::NoFocus + #define TQT_WIDGET_TABFOCUS TQ_TabFocus + #define TQT_WIDGET_CLICKFOCUS TQ_ClickFocus + #define TQT_WIDGET_STRONGFOCUS TQ_StrongFocus + #define TQT_WIDGET_NOFOCUS TQ_NoFocus #endif @@ -137,52 +137,52 @@ const int widgettypes_cod[] = { All the other widget-type classes inherit from this one. @functions: !fn: $show() - Shows this widget and the children. + Shows this widget and the tqchildren. See also [classfnc]$hide[/classfnc]() and [classfnc]$isVisible[/classfnc]. !fn: $hide() - Hides this widget (and conseguently all the children). + Hides this widget (and conseguently all the tqchildren). See also [classfnc]$show[/classfnc]() and [classfnc]$isVisible[/classfnc]. - !fn: $repaint() + !fn: $tqrepaint() Repaints the widget directly by calling [classfnc]$paintEvent[/classfnc]() immediately.[br] If erase is TRUE, erases the widget before the $paintEvent() call. !fn: $x() Returns the x coordinate of the upper-left corner - of this widget relative to the parent widget, + of this widget relative to the tqparent widget, or to the desktop if this widget is a toplevel one. !fn: $y() Returns the y coordinate of the uspper-left corner - of this widget relative to the parent widget, + of this widget relative to the tqparent widget, or to the desktop if this widget is a toplevel one. !fn: $width() Returns the width of this widget in pixels. !fn: $height() Returns the height of this widget in pixels. - !fn: $geometry() - Returns the widget geometry in this form:[br] + !fn: $tqgeometry() + Returns the widget tqgeometry in this form:[br] x, y, width, height. !fn: $setGeometry(,[,,]) - Sets the geometry of this widget. and are relative - to the parent widget or to the desktop (if this widget is + Sets the tqgeometry of this widget. and are relative + to the tqparent widget or to the desktop (if this widget is a toplevel one). All the parameters are in pixels. !fn: $setMinimumWidth() Sets the minimum width of this widget to . The user will not be able to resize the widget to a smaller - value. This value is also used by the [class:layout]layout class[/class]. + value. This value is also used by the [class:tqlayout]tqlayout class[/class]. !fn: $setMinimumHeight() Sets the minimum height of this widget to . The user will not be able to resize the widget to a smaller - value. This value is also used by the [class:layout]layout class[/class]. + value. This value is also used by the [class:tqlayout]tqlayout class[/class]. !fn: $setMaximumWidth() Sets the maximum width of this widget to . The user will not be able to resize the widget to a bigger - value. This value is also used by the [class:layout]layout class[/class]. + value. This value is also used by the [class:tqlayout]tqlayout class[/class]. !fn: $setMaximumHeight() Sets the maximum height of this widget to . The user will not be able to resize the widget to a bigger - value. This value is also used by the [class:layout]layout class[/class]. + value. This value is also used by the [class:tqlayout]tqlayout class[/class]. !fn: $move([,]) Moves this widget to the coordinate and relative to its - parent widget (or the desktop if this widget is a toplevel one). + tqparent widget (or the desktop if this widget is a toplevel one). This is equivalent to [classfnc]$setGeometry[/classfnc](,, [classfnc]$width[/classfnc](),[classfnc]$height[/classfnc]()). !fn: $resize(,[height]) @@ -202,7 +202,7 @@ const int widgettypes_cod[] = { !fn: $window.caption() Returns the caption text of this widget. !fn: $isTopLevel() - Returns '1' if this widget is a toplevel (parentless) one, + Returns '1' if this widget is a toplevel (tqparentless) one, '0' otherwise. !fn: $isVisible() Returns '1' if this widget is currently visible (read: is managed @@ -212,18 +212,18 @@ const int widgettypes_cod[] = { See also [classfnc]$show[/classfnc]() and [classfnc]$hide[/classfnc](). !fn: $raise() Moves this widget to the top of the stack of the widgets relative - to its parent. See also [classfnc]$lower[/classfnc]. + to its tqparent. See also [classfnc]$lower[/classfnc]. !fn: $lower() Moves this widget to the bottom of the stack of the widgets relative - to its parent. See also [classfnc]$raise[/classfnc] + to its tqparent. See also [classfnc]$raise[/classfnc] !fn: $hasFocus() Returns '1' if this widget has the keyboard focus. See also [classfnc]$setFocus[/classfnc]. !fn: $setFocus() Sets this widget to be the one that receives keyboard events. See also [classfnc]$hasFocus[/classfnc] - !fn: $parentWidget() - Returns the object id of the parent widget, or '0' if this + !fn: $tqparentWidget() + Returns the object id of the tqparent widget, or '0' if this widget is a toplevel one. !fn: $backgroundColor() Returns the background color of this widget in hexadecimal @@ -341,7 +341,7 @@ const int widgettypes_cod[] = { If a tooltip has setted with [classfnc]$setTooltip[/classfnc] the dynamic tooltip will be ignored. The default implementation does nothing. !fn: $paintEvent() - This event handler can be reimplemented to repaint all or part of the widget. + This event handler can be reimplemented to tqrepaint all or part of the widget. It's needed by the Painter class. It's very useful for drawing flicker free animations or low level special graphic effects. If you call "[cmd]return[/cmd] $true" you will stop the internal processing @@ -521,8 +521,8 @@ const int widgettypes_cod[] = { // but in derived classes WILL be // ... now that I think about it , it // may happen that widget() will be zero here too: - // If the Qt "physical" widget gets destroyed - // by some external factor (for example when children + // If the TQt "physical" widget gets destroyed + // by some external factor (for example when tqchildren // of a wrapper widget destroyed by KVIrc). // // as a convention: @@ -546,7 +546,7 @@ KVSO_BEGIN_REGISTERCLASS(KviKvsObject_widget,"widget","object") // apparence KVSO_REGISTER_HANDLER(KviKvsObject_widget,"show",function_show) KVSO_REGISTER_HANDLER(KviKvsObject_widget,"hide",function_hide) - KVSO_REGISTER_HANDLER(KviKvsObject_widget,"repaint",function_repaint) + KVSO_REGISTER_HANDLER(KviKvsObject_widget,"tqrepaint",function_tqrepaint) KVSO_REGISTER_HANDLER(KviKvsObject_widget,"isTopLevel",function_isTopLevel) KVSO_REGISTER_HANDLER(KviKvsObject_widget,"isVisible",function_isVisible) KVSO_REGISTER_HANDLER(KviKvsObject_widget,"raise",function_raise) @@ -567,10 +567,10 @@ KVSO_BEGIN_REGISTERCLASS(KviKvsObject_widget,"widget","object") KVSO_REGISTER_HANDLER(KviKvsObject_widget,"fontMetricsWidth",function_fontMetricsWidth) KVSO_REGISTER_HANDLER(KviKvsObject_widget,"fontMetricsHeight",function_fontMetricsHeight) KVSO_REGISTER_HANDLER(KviKvsObject_widget,"setFont",function_setFont) - // geometry + // tqgeometry KVSO_REGISTER_HANDLER(KviKvsObject_widget,"screenResolution",function_screenResolution) KVSO_REGISTER_HANDLER(KviKvsObject_widget,"centerToScreen",function_centerToScreen) - KVSO_REGISTER_HANDLER(KviKvsObject_widget,"geometry",function_geometry) + KVSO_REGISTER_HANDLER(KviKvsObject_widget,"geometry",function_tqgeometry) KVSO_REGISTER_HANDLER(KviKvsObject_widget,"setGeometry",function_setGeometry) KVSO_REGISTER_HANDLER(KviKvsObject_widget,"mapToGlobal",function_mapToGlobal) KVSO_REGISTER_HANDLER(KviKvsObject_widget,"mapFromGlobal",function_mapFromGlobal) @@ -587,7 +587,7 @@ KVSO_BEGIN_REGISTERCLASS(KviKvsObject_widget,"widget","object") KVSO_REGISTER_HANDLER(KviKvsObject_widget,"setMaximumWidth",function_setMaximumWidth) KVSO_REGISTER_HANDLER(KviKvsObject_widget,"setMaximumHeight",function_setMaximumHeight) KVSO_REGISTER_HANDLER(KviKvsObject_widget,"move",function_move) - KVSO_REGISTER_HANDLER(KviKvsObject_widget,"sizeHint",function_sizeHint) + KVSO_REGISTER_HANDLER(KviKvsObject_widget,"tqsizeHint",function_tqsizeHint) KVSO_REGISTER_HANDLER(KviKvsObject_widget,"resize",function_resize) KVSO_REGISTER_HANDLER(KviKvsObject_widget,"setFocusPolicy",function_setFocusPolicy) @@ -639,11 +639,11 @@ KVSO_END_CONSTRUCTOR(KviKvsObject_widget) bool KviKvsObject_widget::init(KviKvsRunTimeContext * pContext,KviKvsVariantList * pParams) { - setObject(new QWidget(parentScriptWidget(),getName()),true); + setObject(TQT_TQOBJECT(new TQWidget(tqparentScriptWidget(),getName())),true); return true; } -bool KviKvsObject_widget::eventFilter(QObject *o,QEvent *e) +bool KviKvsObject_widget::eventFilter(TQObject *o,TQEvent *e) { if(o == object()) { @@ -655,203 +655,203 @@ bool KviKvsObject_widget::eventFilter(QObject *o,QEvent *e) switch(e->type()) { #ifdef COMPILE_USE_QT4 - case QEvent::ToolTip: + case TQEvent::ToolTip: { - QHelpEvent *helpEvent = static_cast(e); - QPoint point=helpEvent->pos(); - QString szTooltip; + TQHelpEvent *helpEvent = static_cast(e); + TQPoint point=helpEvent->pos(); + TQString szTooltip; KviKvsVariant *tipret=new KviKvsVariant(szTooltip); KviKvsVariantList params(new KviKvsVariant((kvs_int_t)point.x()),new KviKvsVariant((kvs_int_t)point.y())); callFunction(this,"maybeTipEvent",tipret,¶ms); tipret->asString(szTooltip); - QToolTip::showText(helpEvent->globalPos(),szTooltip); + TQToolTip::showText(helpEvent->globalPos(),szTooltip); break; } #endif - case QEvent::Paint: + case TQEvent::Paint: { - QRect rect=((QPaintEvent *)e)->rect(); + TQRect rect=((TQPaintEvent *)e)->rect(); KviKvsVariantList params(new KviKvsVariant((kvs_int_t)rect.x()),new KviKvsVariant((kvs_int_t)rect.y()),new KviKvsVariant((kvs_int_t)rect.width()),new KviKvsVariant((kvs_int_t)rect.height())); callFunction(this,"paintEvent",retv,¶ms); break; } - case QEvent::KeyPress: + case TQEvent::KeyPress: { - QString tmp=""; - switch(((QKeyEvent *)e)->key()) + TQString tmp=""; + switch(((TQKeyEvent *)e)->key()) { - case Qt::Key_Return: + case TQt::Key_Return: tmp="Return"; break; - case Qt::Key_Down: + case TQt::Key_Down: tmp="Down"; break; - case Qt::Key_Up: + case TQt::Key_Up: tmp="Up"; break; - case Qt::Key_Left: + case TQt::Key_Left: tmp="Left"; break; - case Qt::Key_Right: + case TQt::Key_Right: tmp="Right"; break; - case Qt::Key_Shift: + case TQt::Key_Shift: tmp="Shift"; break; - case Qt::Key_Control: + case TQt::Key_Control: tmp="Ctrl"; break; - case Qt::Key_Alt: + case TQt::Key_Alt: tmp="Alt"; break; - case Qt::Key_CapsLock: + case TQt::Key_CapsLock: tmp="CapsLock"; break; - case Qt::Key_Backspace: + case TQt::Key_Backspace: tmp="Backspace"; break; - case Qt::Key_Delete: + case TQt::Key_Delete: tmp="Del"; break; - case Qt::Key_Enter: + case TQt::Key_Enter: tmp="Enter"; break; - case Qt::Key_Escape: + case TQt::Key_Escape: tmp="Esc"; break; - case Qt::Key_0: + case TQt::Key_0: tmp="0"; - case Qt::Key_1: + case TQt::Key_1: tmp="1"; break; - case Qt::Key_2: + case TQt::Key_2: tmp="2"; break; - case Qt::Key_3: + case TQt::Key_3: tmp="3"; break; - case Qt::Key_4: + case TQt::Key_4: tmp="4"; break; - case Qt::Key_5: + case TQt::Key_5: tmp="5"; break; - case Qt::Key_6: + case TQt::Key_6: tmp="6"; break; - case Qt::Key_7: + case TQt::Key_7: tmp="7"; break; - case Qt::Key_8: + case TQt::Key_8: tmp="8"; break; - case Qt::Key_9: + case TQt::Key_9: tmp="9"; break; - case Qt::Key_Plus: + case TQt::Key_Plus: tmp="+"; break; - case Qt::Key_Minus: + case TQt::Key_Minus: tmp="-"; break; - case Qt::Key_Slash: + case TQt::Key_Slash: tmp="/"; break; - case Qt::Key_Asterisk: + case TQt::Key_Asterisk: tmp="*"; break; - case Qt::Key_Period: + case TQt::Key_Period: tmp="."; break; - case Qt::Key_ParenLeft: + case TQt::Key_ParenLeft: tmp="("; break; - case Qt::Key_ParenRight: + case TQt::Key_ParenRight: tmp=")"; break; - case Qt::Key_Equal: + case TQt::Key_Equal: tmp="="; break; - case Qt::Key_AsciiCircum: + case TQt::Key_AsciiCircum: tmp="^"; break; default: - if (!((QKeyEvent *)e)->text().isEmpty()) tmp = ((QKeyEvent *)e)->text(); + if (!((TQKeyEvent *)e)->text().isEmpty()) tmp = ((TQKeyEvent *)e)->text(); } KviKvsVariantList params(new KviKvsVariant(tmp)); callFunction(this,"keyPressEvent",0,¶ms); } break; - case QEvent::MouseButtonPress: - if(((QMouseEvent *)e)->button() & Qt::LeftButton)aparam = 0; + case TQEvent::MouseButtonPress: + if(((TQMouseEvent *)e)->button() & Qt::LeftButton)aparam = 0; else { - if(((QMouseEvent *)e)->button() & Qt::RightButton)aparam = 1; + if(((TQMouseEvent *)e)->button() & Qt::RightButton)aparam = 1; else aparam = 2; } - if(!callFunction(this,"mousePressEvent",retv,new KviKvsVariantList(new KviKvsVariant((kvs_int_t)aparam),new KviKvsVariant((kvs_int_t)((QMouseEvent *)e)->pos().x()),new KviKvsVariant((kvs_int_t)((QMouseEvent *)e)->pos().y()) + if(!callFunction(this,"mousePressEvent",retv,new KviKvsVariantList(new KviKvsVariant((kvs_int_t)aparam),new KviKvsVariant((kvs_int_t)((TQMouseEvent *)e)->pos().x()),new KviKvsVariant((kvs_int_t)((TQMouseEvent *)e)->pos().y()) ))) brokenhandler = true; // ignore results of a broken event handler break; - case QEvent::MouseButtonRelease: - if(((QMouseEvent *)e)->button() & Qt::LeftButton)aparam = 0; + case TQEvent::MouseButtonRelease: + if(((TQMouseEvent *)e)->button() & Qt::LeftButton)aparam = 0; else { - if(((QMouseEvent *)e)->button() & Qt::RightButton)aparam = 1; + if(((TQMouseEvent *)e)->button() & Qt::RightButton)aparam = 1; else aparam = 2; } - if(!callFunction(this,"mouseReleaseEvent",retv,new KviKvsVariantList(new KviKvsVariant((kvs_int_t)aparam),new KviKvsVariant((kvs_int_t)((QMouseEvent *)e)->pos().x()),new KviKvsVariant((kvs_int_t)((QMouseEvent *)e)->pos().y()) + if(!callFunction(this,"mouseReleaseEvent",retv,new KviKvsVariantList(new KviKvsVariant((kvs_int_t)aparam),new KviKvsVariant((kvs_int_t)((TQMouseEvent *)e)->pos().x()),new KviKvsVariant((kvs_int_t)((TQMouseEvent *)e)->pos().y()) ))) brokenhandler = true; // ignore results of a broken event handler break; - case QEvent::MouseButtonDblClick: - if(( (QMouseEvent *)e)->button() & Qt::LeftButton)aparam = 0; + case TQEvent::MouseButtonDblClick: + if(( (TQMouseEvent *)e)->button() & Qt::LeftButton)aparam = 0; else { - if(((QMouseEvent *)e)->button() & Qt::RightButton)aparam = 1; + if(((TQMouseEvent *)e)->button() & Qt::RightButton)aparam = 1; else aparam = 2; } - if(!callFunction(this,"mouseDoubleClickEvent",retv,new KviKvsVariantList(new KviKvsVariant((kvs_int_t)aparam),new KviKvsVariant((kvs_int_t)((QMouseEvent *)e)->pos().x()),new KviKvsVariant((kvs_int_t)((QMouseEvent *)e)->pos().y()) + if(!callFunction(this,"mouseDoubleClickEvent",retv,new KviKvsVariantList(new KviKvsVariant((kvs_int_t)aparam),new KviKvsVariant((kvs_int_t)((TQMouseEvent *)e)->pos().x()),new KviKvsVariant((kvs_int_t)((TQMouseEvent *)e)->pos().y()) ))) brokenhandler = true; // ignore results of a broken event handler break; - case QEvent::MouseMove: - if( (((QMouseEvent *)e)->state()) & Qt::LeftButton) aparam = 0; + case TQEvent::MouseMove: + if( (((TQMouseEvent *)e)->state()) & Qt::LeftButton) aparam = 0; else { - if(((QMouseEvent *)e)->state() & Qt::RightButton)aparam = 1; + if(((TQMouseEvent *)e)->state() & Qt::RightButton)aparam = 1; else { - if(((QMouseEvent *)e)->state() & Qt::MidButton)aparam = 2; + if(((TQMouseEvent *)e)->state() & Qt::MidButton)aparam = 2; else aparam = -1; } } - if(!callFunction(this,"mouseMoveEvent",retv,new KviKvsVariantList(new KviKvsVariant((kvs_int_t)aparam),new KviKvsVariant((kvs_int_t)((QMouseEvent *)e)->pos().x()),new KviKvsVariant((kvs_int_t)((QMouseEvent *)e)->pos().y()) + if(!callFunction(this,"mouseMoveEvent",retv,new KviKvsVariantList(new KviKvsVariant((kvs_int_t)aparam),new KviKvsVariant((kvs_int_t)((TQMouseEvent *)e)->pos().x()),new KviKvsVariant((kvs_int_t)((TQMouseEvent *)e)->pos().y()) ))) brokenhandler = true; // ignore results of a broken event handler break; - case QEvent::FocusIn: + case TQEvent::FocusIn: if(!callFunction(this,"focusInEvent",retv,0))brokenhandler = true; break; - case QEvent::FocusOut: + case TQEvent::FocusOut: if(!callFunction(this,"focusOutEvent",retv,0))brokenhandler = true; break; - case QEvent::Resize: + case TQEvent::Resize: if(!callFunction(this,"resizeEvent",retv,0))brokenhandler = true; break; - case QEvent::Move: + case TQEvent::Move: if(!callFunction(this,"moveEvent",retv,0))brokenhandler = true; break; - case QEvent::Close: + case TQEvent::Close: if(!callFunction(this,"closeEvent",retv,0))brokenhandler = true; break; - case QEvent::Enter: + case TQEvent::Enter: if(!callFunction(this,"mouseEnterEvent",retv,0))brokenhandler = true; break; - case QEvent::Leave: + case TQEvent::Leave: if(!callFunction(this,"mouseLeaveEvent",retv,0))brokenhandler = true; break; - case QEvent::Show: + case TQEvent::Show: if(!callFunction(this,"showEvent",retv,0))brokenhandler = true; break; - case QEvent::Hide: + case TQEvent::Hide: if(!callFunction(this,"hideEvent",retv,0))ret =false; break; default: @@ -865,7 +865,7 @@ bool KviKvsObject_widget::eventFilter(QObject *o,QEvent *e) /* if(ret.length() == 1) { - if(KviQString::equalCI("1",ret))return true; + if(KviTQString::equalCI("1",ret))return true; } */ } @@ -900,7 +900,7 @@ bool KviKvsObject_widget::function_isEnabled(KviKvsObjectFunctionCall *c) bool KviKvsObject_widget::function_fontDescent(KviKvsObjectFunctionCall * c) { if(!widget()) return true; - QFontMetrics fm = widget()->fontMetrics(); + TQFontMetrics fm = widget()->fontMetrics(); int d = fm.descent(); c->returnValue()->setInteger(d); return true; @@ -909,27 +909,27 @@ bool KviKvsObject_widget::function_fontDescent(KviKvsObjectFunctionCall * c) bool KviKvsObject_widget::function_fontAscent(KviKvsObjectFunctionCall * c) { if(!widget()) return true; - QFontMetrics fm = widget()->fontMetrics(); + TQFontMetrics fm = widget()->fontMetrics(); int d = fm.ascent(); c->returnValue()->setInteger(d); return true; } -bool KviKvsObject_widget::function_repaint(KviKvsObjectFunctionCall * c) +bool KviKvsObject_widget::function_tqrepaint(KviKvsObjectFunctionCall * c) { bool bEnabled; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("bEnabled",KVS_PT_BOOL,0,bEnabled) KVSO_PARAMETERS_END(c) if(!widget()) return true; - widget()->repaint(bEnabled); + widget()->tqrepaint(bEnabled); return true; } bool KviKvsObject_widget::function_fontMetricsWidth(KviKvsObjectFunctionCall * c) { - QString m_szStr; + TQString m_szStr; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("string",KVS_PT_STRING,0,m_szStr) KVSO_PARAMETERS_END(c) @@ -955,9 +955,9 @@ bool KviKvsObject_widget::function_screenResolution(KviKvsObjectFunctionCall * c return true; } -bool KviKvsObject_widget::function_geometry(KviKvsObjectFunctionCall *c) +bool KviKvsObject_widget::function_tqgeometry(KviKvsObjectFunctionCall *c) { - QRect r = widget() ? widget()->geometry() : QRect(0,0,0,0); + TQRect r = widget() ? widget()->tqgeometry() : TQRect(0,0,0,0); KviKvsArray * a = new KviKvsArray(); a->set(0,new KviKvsVariant((kvs_int_t)r.x())); a->set(1,new KviKvsVariant((kvs_int_t)r.y())); @@ -992,7 +992,7 @@ bool KviKvsObject_widget::function_setGeometry(KviKvsObjectFunctionCall *c) if(pXOrArray->isArray()) { - // the user has passed a complete geometry array as first parameter + // the user has passed a complete tqgeometry array as first parameter // make sure it has at least 4 elements if(pXOrArray->array()->size() < 4) { @@ -1009,12 +1009,12 @@ bool KviKvsObject_widget::function_setGeometry(KviKvsObjectFunctionCall *c) // no parameter was set in that place if(!(pX && pY && pW && pH)) { - c->error(__tr2qs("One of the geometry array parameters is empty")); + c->error(__tr2qs("One of the tqgeometry array parameters is empty")); return false; } if(!(pX->asInteger(iX) && pY->asInteger(iY) && pW->asInteger(iW) && pH->asInteger(iH))) { - c->error(__tr2qs("One of the geometry array parameters didn't evaluate to an integer")); + c->error(__tr2qs("One of the tqgeometry array parameters didn't evaluate to an integer")); return false; } // ok: the params are correct @@ -1049,7 +1049,7 @@ bool KviKvsObject_widget::function_mapToGlobal(KviKvsObjectFunctionCall *c) KVSO_PARAMETER("x",KVS_PT_INT,0,iX) KVSO_PARAMETER("y",KVS_PT_INT,0,iY) KVSO_PARAMETERS_END(c) - QPoint point=widget()->mapToGlobal(QPoint(iX,iY)); + TQPoint point=widget()->mapToGlobal(TQPoint(iX,iY)); KviKvsArray * a = new KviKvsArray(); a->set(0,new KviKvsVariant((kvs_int_t)point.x())); a->set(1,new KviKvsVariant((kvs_int_t)point.y())); @@ -1066,7 +1066,7 @@ bool KviKvsObject_widget::function_mapFromGlobal(KviKvsObjectFunctionCall *c) KVSO_PARAMETER("x",KVS_PT_INT,0,iX) KVSO_PARAMETER("y",KVS_PT_INT,0,iY) KVSO_PARAMETERS_END(c) - QPoint point=widget()->mapFromGlobal(QPoint(iX,iY)); + TQPoint point=widget()->mapFromGlobal(TQPoint(iX,iY)); KviKvsArray * a = new KviKvsArray(); a->set(0,new KviKvsVariant((kvs_int_t)point.x())); a->set(1,new KviKvsVariant((kvs_int_t)point.y())); @@ -1115,7 +1115,7 @@ bool KviKvsObject_widget::function_setPaletteForeground(KviKvsObjectFunctionCall if (c->params()->count()==1) { bool bOk,bOk1,bOk2; - QString value; + TQString value; pColArray->asString(value); int i=0; if (value.length()!=6) @@ -1123,7 +1123,7 @@ bool KviKvsObject_widget::function_setPaletteForeground(KviKvsObjectFunctionCall c->warning(__tr2qs("A string of 6 digits hex is required")); return true; } - QString buffer(value.mid(0,2)); + TQString buffer(value.mid(0,2)); iColR=buffer.toInt(&bOk,16); buffer=value.mid(2,2); iColG=buffer.toInt(&bOk1,16); @@ -1134,7 +1134,7 @@ bool KviKvsObject_widget::function_setPaletteForeground(KviKvsObjectFunctionCall c->warning(__tr2qs("Not an hex digits")); return true; } - if (widget()) widget()->setPaletteForegroundColor(QColor(iColR,iColG,iColB)); + if (widget()) widget()->setPaletteForegroundColor(TQColor(iColR,iColG,iColB)); return true; } @@ -1150,7 +1150,7 @@ bool KviKvsObject_widget::function_setPaletteForeground(KviKvsObjectFunctionCall return false; } } - if (widget()) widget()->setPaletteForegroundColor(QColor(iColR,iColG,iColB)); + if (widget()) widget()->setPaletteForegroundColor(TQColor(iColR,iColG,iColB)); return true; } @@ -1190,7 +1190,7 @@ bool KviKvsObject_widget::function_setBackgroundColor(KviKvsObjectFunctionCall * if (c->params()->count()==1) { bool bOk,bOk1,bOk2; - QString value; + TQString value; pColArray->asString(value); int i=0; if (value.length()!=6) @@ -1198,7 +1198,7 @@ bool KviKvsObject_widget::function_setBackgroundColor(KviKvsObjectFunctionCall * c->warning(__tr2qs("A string of 6 digits hex is required")); return true; } - QString buffer(value.mid(0,2)); + TQString buffer(value.mid(0,2)); iColR=buffer.toInt(&bOk,16); buffer=value.mid(2,2); iColG=buffer.toInt(&bOk1,16); @@ -1209,7 +1209,7 @@ bool KviKvsObject_widget::function_setBackgroundColor(KviKvsObjectFunctionCall * c->warning(__tr2qs("Not an hex digits")); return true; } - if (widget()) widget()->setBackgroundColor(QColor(iColR,iColG,iColB)); + if (widget()) widget()->setBackgroundColor(TQColor(iColR,iColG,iColB)); return true; } @@ -1225,14 +1225,14 @@ bool KviKvsObject_widget::function_setBackgroundColor(KviKvsObjectFunctionCall * return false; } } - if (widget()) widget()->setBackgroundColor(QColor(iColR,iColG,iColB)); + if (widget()) widget()->setBackgroundColor(TQColor(iColR,iColG,iColB)); return true; } bool KviKvsObject_widget::function_backgroundColor(KviKvsObjectFunctionCall *c) { if(!widget())return true; - QColor col = widget()->backgroundColor(); + TQColor col = widget()->backgroundColor(); KviKvsArray * a = new KviKvsArray(); a->set(0,new KviKvsVariant((kvs_int_t)col.red())); a->set(1,new KviKvsVariant((kvs_int_t)col.green())); @@ -1244,7 +1244,7 @@ bool KviKvsObject_widget::function_backgroundColor(KviKvsObjectFunctionCall *c) bool KviKvsObject_widget::function_foregroundColor(KviKvsObjectFunctionCall *c) { if(!widget())return true; - QColor col = widget()->foregroundColor(); + TQColor col = widget()->foregroundColor(); KviKvsArray * a = new KviKvsArray(); a->set(0,new KviKvsVariant((kvs_int_t)col.red())); a->set(1,new KviKvsVariant((kvs_int_t)col.green())); @@ -1256,7 +1256,7 @@ bool KviKvsObject_widget::function_foregroundColor(KviKvsObjectFunctionCall *c) bool KviKvsObject_widget::function_parentWidget(KviKvsObjectFunctionCall *c) { if(!widget())return true; - if(parentScriptWidget()) c->returnValue()->setHObject(parentObject()->handle()); + if(tqparentScriptWidget()) c->returnValue()->setHObject(tqparentObject()->handle()); else c->returnValue()->setHObject((kvs_hobject_t)0); return true; @@ -1274,7 +1274,7 @@ bool KviKvsObject_widget::function_setMouseTracking(KviKvsObjectFunctionCall *c) bool KviKvsObject_widget::function_setCaption(KviKvsObjectFunctionCall *c) { - QString szCaption; + TQString szCaption; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("caption",KVS_PT_STRING,0,szCaption) KVSO_PARAMETERS_END(c) @@ -1331,11 +1331,11 @@ bool KviKvsObject_widget::function_hide(KviKvsObjectFunctionCall *) bool KviKvsObject_widget::function_setToolTip(KviKvsObjectFunctionCall *c) { - QString szTooltip; + TQString szTooltip; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("tooltip",KVS_PT_STRING,0,szTooltip) KVSO_PARAMETERS_END(c) - if(widget())QToolTip::add( widget(), szTooltip ); + if(widget())TQToolTip::add( widget(), szTooltip ); return true; } @@ -1447,13 +1447,13 @@ bool KviKvsObject_widget::function_move(KviKvsObjectFunctionCall *c) } if(!widget())return true; - widget()->move(QPoint(iX,iY)); + widget()->move(TQPoint(iX,iY)); return true; } -bool KviKvsObject_widget::function_sizeHint(KviKvsObjectFunctionCall *c) +bool KviKvsObject_widget::function_tqsizeHint(KviKvsObjectFunctionCall *c) { if(!widget())return true; - QSize sizehint = widget()->sizeHint(); + TQSize sizehint = widget()->tqsizeHint(); KviKvsArray * a = new KviKvsArray(); a->set(0,new KviKvsVariant((kvs_int_t)sizehint.width())); a->set(1,new KviKvsVariant((kvs_int_t)sizehint.height())); @@ -1504,51 +1504,51 @@ bool KviKvsObject_widget::function_resize(KviKvsObjectFunctionCall *c) } if(!widget())return true; - widget()->resize(QSize(iW,iH)); + widget()->resize(TQSize(iW,iH)); return true; } bool KviKvsObject_widget::function_setFocusPolicy(KviKvsObjectFunctionCall *c) { - QString szMode; + TQString szMode; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("focus",KVS_PT_STRING,0,szMode) KVSO_PARAMETERS_END(c) if(!widget())return true; - if(KviQString::equalCI(szMode, "TabFocus")) - widget()->setFocusPolicy(QT_WIDGET_TABFOCUS); + if(KviTQString::equalCI(szMode, "TabFocus")) + widget()->setFocusPolicy(TQT_WIDGET_TABFOCUS); else - if(KviQString::equalCI(szMode, "ClickFocus")) - widget()->setFocusPolicy(QT_WIDGET_CLICKFOCUS); + if(KviTQString::equalCI(szMode, "ClickFocus")) + widget()->setFocusPolicy(TQT_WIDGET_CLICKFOCUS); else - if(KviQString::equalCI(szMode, "StrongFocus")) - widget()->setFocusPolicy(QT_WIDGET_STRONGFOCUS); + if(KviTQString::equalCI(szMode, "StrongFocus")) + widget()->setFocusPolicy(TQT_WIDGET_STRONGFOCUS); else - if(KviQString::equalCI(szMode, "NoFocus")) - widget()->setFocusPolicy(QT_WIDGET_NOFOCUS); + if(KviTQString::equalCI(szMode, "NoFocus")) + widget()->setFocusPolicy(TQT_WIDGET_NOFOCUS); else c->warning(__tr2qs("Invalid parameters")); return true; } bool KviKvsObject_widget::function_setWFlags(KviKvsObjectFunctionCall *c) { - QStringList wflags; - //Qt::WindowType sum; + TQStringList wflags; + //TQt::WindowType sum; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("widget_flags",KVS_PT_STRINGLIST,KVS_PF_OPTIONAL,wflags) KVSO_PARAMETERS_END(c) if (!widget()) return true; #ifdef COMPILE_USE_QT4 - Qt::WindowFlags flag,sum=0; + TQt::WindowFlags flag,sum=0; #else int flag,sum=0; #endif - for ( QStringList::Iterator it = wflags.begin(); it != wflags.end(); ++it ) + for ( TQStringList::Iterator it = wflags.begin(); it != wflags.end(); ++it ) { flag=0; for(unsigned int j = 0; j < widgettypes_num; j++) { - if(KviQString::equalCI((*it), widgettypes_tbl[j])) + if(KviTQString::equalCI((*it), widgettypes_tbl[j])) { flag=widgettypes_cod[j]; break; @@ -1564,7 +1564,7 @@ bool KviKvsObject_widget::function_setWFlags(KviKvsObjectFunctionCall *c) #ifdef COMPILE_USE_QT4 widget()->setWindowFlags(sum); #else - widget()->reparent(widget()->parentWidget(),sum,QPoint(widget()->x(),widget()->y())); + widget()->reparent(widget()->tqparentWidget(),sum,TQPoint(widget()->x(),widget()->y())); #endif return true; } @@ -1572,7 +1572,7 @@ bool KviKvsObject_widget::function_setWFlags(KviKvsObjectFunctionCall *c) bool KviKvsObject_widget::function_setFont(KviKvsObjectFunctionCall *c) { - QString szFamily,szStyle; + TQString szFamily,szStyle; kvs_int_t uSize; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("size",KVS_PT_UNSIGNEDINTEGER,0,uSize) @@ -1580,15 +1580,15 @@ bool KviKvsObject_widget::function_setFont(KviKvsObjectFunctionCall *c) KVSO_PARAMETER("style",KVS_PT_STRING,0,szStyle) KVSO_PARAMETERS_END(c) if(!widget())return true; - QFont font=widget()->font(); + TQFont font=widget()->font(); font.setFamily(szFamily); font.setPointSize(uSize); - if(KviQString::equalCI(szStyle,"italic")) font.setItalic(TRUE); - else if(KviQString::equalCI(szStyle,"bold")) font.setBold(TRUE); - else if(KviQString::equalCI(szStyle,"underline"))font.setUnderline(TRUE); - else if(KviQString::equalCI(szStyle,"overline")) font.setOverline(TRUE); - else if(KviQString::equalCI(szStyle,"strikeout"))font.setStrikeOut(TRUE); - else if(KviQString::equalCI(szStyle,"fixedpitch")) font.setFixedPitch(TRUE); + if(KviTQString::equalCI(szStyle,"italic")) font.setItalic(TRUE); + else if(KviTQString::equalCI(szStyle,"bold")) font.setBold(TRUE); + else if(KviTQString::equalCI(szStyle,"underline"))font.setUnderline(TRUE); + else if(KviTQString::equalCI(szStyle,"overline")) font.setOverline(TRUE); + else if(KviTQString::equalCI(szStyle,"strikeout"))font.setStrikeOut(TRUE); + else if(KviTQString::equalCI(szStyle,"fixedpitch")) font.setFixedPitch(TRUE); else c->warning(__tr2qs("Unknown style '%Q'"),&szStyle); widget()->setFont(font); return true; @@ -1616,7 +1616,7 @@ bool KviKvsObject_widget::function_addWidgetToWrappedLayout(KviKvsObjectFunction c->warning(__tr2qs("Widget parameter is not a valid object")); return true; } - QLayout *lay=widget()->layout(); + TQLayout *lay=widget()->tqlayout(); if (!lay) { c->warning(__tr2qs("No Layout associated to the widget ")); @@ -1627,7 +1627,7 @@ bool KviKvsObject_widget::function_addWidgetToWrappedLayout(KviKvsObjectFunction c->warning(__tr2qs("Can't add a non-widget object")); return true; } - lay->add(((QWidget *)(ob->object()))); + lay->add(((TQWidget *)(ob->object()))); return true; } bool KviKvsObject_widget::function_reparent(KviKvsObjectFunctionCall *c) @@ -1641,7 +1641,7 @@ bool KviKvsObject_widget::function_reparent(KviKvsObjectFunctionCall *c) if(!widget()) return true; if(!ob) { - widget()->reparent(0,QPoint(widget()->x(),widget()->y())); + widget()->reparent(0,TQPoint(widget()->x(),widget()->y())); return true; } else @@ -1650,41 +1650,41 @@ bool KviKvsObject_widget::function_reparent(KviKvsObjectFunctionCall *c) c->warning(__tr("Parent must be a widget object")); return true; } - widget()->reparent(((QWidget *)(ob->object())),QPoint(((QWidget *)(ob->object()))->x(),((QWidget *)(ob->object()))->y())); + widget()->reparent(((TQWidget *)(ob->object())),TQPoint(((TQWidget *)(ob->object()))->x(),((TQWidget *)(ob->object()))->y())); return true; } bool KviKvsObject_widget::function_setIcon(KviKvsObjectFunctionCall *c) { - QString icon; + TQString icon; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("icon",KVS_PT_STRING,0,icon) KVSO_PARAMETERS_END(c) if(!widget())return true; - QPixmap * pix = g_pIconManager->getImage(icon); + TQPixmap * pix = g_pIconManager->getImage(icon); if(pix)widget()->setIcon(*pix); return true; } bool KviKvsObject_widget::function_setBackgroundImage(KviKvsObjectFunctionCall *c) { - QString image; + TQString image; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("image",KVS_PT_STRING,0,image) KVSO_PARAMETERS_END(c) if(!widget())return true; - QPixmap * pix = g_pIconManager->getImage(image); + TQPixmap * pix = g_pIconManager->getImage(image); if(pix)widget()->setPaletteBackgroundPixmap(*pix); return true; } bool KviKvsObject_widget::function_globalCursorX(KviKvsObjectFunctionCall *c) { - if(widget())c->returnValue()->setInteger(QCursor::pos().x()); + if(widget())c->returnValue()->setInteger(TQCursor::pos().x()); return true; } bool KviKvsObject_widget::function_globalCursorY(KviKvsObjectFunctionCall *c) { - if(widget())c->returnValue()->setInteger(QCursor::pos().y()); + if(widget())c->returnValue()->setInteger(TQCursor::pos().y()); return true; } bool KviKvsObject_widget::function_setMask(KviKvsObjectFunctionCall *c) @@ -1706,20 +1706,20 @@ bool KviKvsObject_widget::function_setMask(KviKvsObjectFunctionCall *c) c->warning(__tr2qs("Pixmap object required")); return true; } - QPixmap * pm=((KviKvsObject_pixmap *)obj)->getPixmap(); + TQPixmap * pm=((KviKvsObject_pixmap *)obj)->getPixmap(); #ifdef COMPILE_USE_QT4 - QBitmap mask(pm->mask()); + TQBitmap tqmask(pm->tqmask()); #else - QBitmap mask(*pm->mask()); + TQBitmap tqmask(*pm->tqmask()); #endif - if (mask.isNull()) c->warning(__tr2qs("Null mask")); - widget()->setMask(mask); + if (tqmask.isNull()) c->warning(__tr2qs("Null tqmask")); + widget()->setMask(tqmask); return true; } #ifdef COMPILE_USE_QT4 bool KviKvsObject_widget::function_setAttribute(KviKvsObjectFunctionCall *c) { - QString attribute; + TQString attribute; bool bFlag; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("widget_atribute",KVS_PT_STRING,0,attribute) @@ -1730,7 +1730,7 @@ bool KviKvsObject_widget::function_setAttribute(KviKvsObjectFunctionCall *c) unsigned int j = 0; for(; j < widgetattributes_num; j++) { - if(KviQString::equalCI(attribute, widgetattributes_tbl[j])) + if(KviTQString::equalCI(attribute, widgetattributes_tbl[j])) { found=true; break; diff --git a/src/modules/objects/class_widget.h b/src/modules/objects/class_widget.h index ecd87bba..807d50ab 100644 --- a/src/modules/objects/class_widget.h +++ b/src/modules/objects/class_widget.h @@ -23,21 +23,22 @@ // #include #include "kvi_string.h" -#include "qtooltip.h" +#include "tqtooltip.h" #include "object_macros.h" class KviKvsObject_widget : public KviKvsObject { Q_OBJECT + TQ_OBJECT public: KVSO_DECLARE_OBJECT(KviKvsObject_widget) public: - QWidget * widget() { return (QWidget *)object(); }; + TQWidget * widget() { return (TQWidget *)object(); }; protected: virtual bool init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams); - virtual bool eventFilter(QObject *o,QEvent *e); + virtual bool eventFilter(TQObject *o,TQEvent *e); // ok, it is clear that we're messing with the naming conventions for the // object classes :D @@ -58,7 +59,7 @@ protected: bool function_fontMetricsHeight(KviKvsObjectFunctionCall * c); bool function_fontMetricsWidth(KviKvsObjectFunctionCall * c); bool function_foregroundColor(KviKvsObjectFunctionCall *c); - bool function_geometry(KviKvsObjectFunctionCall *c); + bool function_tqgeometry(KviKvsObjectFunctionCall *c); bool function_globalCursorX(KviKvsObjectFunctionCall *c); bool function_globalCursorY(KviKvsObjectFunctionCall *c); bool function_hasFocus(KviKvsObjectFunctionCall *c); @@ -73,7 +74,7 @@ protected: bool function_move(KviKvsObjectFunctionCall *c); bool function_parentWidget(KviKvsObjectFunctionCall *c); bool function_raise(KviKvsObjectFunctionCall *); - bool function_repaint(KviKvsObjectFunctionCall *c); + bool function_tqrepaint(KviKvsObjectFunctionCall *c); bool function_reparent(KviKvsObjectFunctionCall *c); bool function_resize(KviKvsObjectFunctionCall *c); bool function_screenResolution(KviKvsObjectFunctionCall * c); @@ -95,7 +96,7 @@ protected: bool function_setGeometry(KviKvsObjectFunctionCall *c); bool function_setWFlags(KviKvsObjectFunctionCall *c); bool function_show(KviKvsObjectFunctionCall *c); - bool function_sizeHint(KviKvsObjectFunctionCall *c); + bool function_tqsizeHint(KviKvsObjectFunctionCall *c); bool function_width(KviKvsObjectFunctionCall *); bool function_x(KviKvsObjectFunctionCall *); bool function_y(KviKvsObjectFunctionCall *); diff --git a/src/modules/objects/class_window.cpp b/src/modules/objects/class_window.cpp index 9218cb8f..732e6f4e 100644 --- a/src/modules/objects/class_window.cpp +++ b/src/modules/objects/class_window.cpp @@ -32,14 +32,14 @@ -KviKvsScriptWindowWindow::KviKvsScriptWindowWindow(KviFrame * pParent,const QString &szName) +KviKvsScriptWindowWindow::KviKvsScriptWindowWindow(KviFrame * pParent,const TQString &szName) : KviWindow(KVI_WINDOW_TYPE_SCRIPTOBJECT,pParent,szName) { m_pCentralWidget = 0; #ifdef COMPILE_USE_QT4 - setBackgroundMode(Qt::NoBackground); + setBackgroundMode(TQt::NoBackground); #else - setBackgroundMode(QWidget::NoBackground); + setBackgroundMode(TQWidget::NoBackground); #endif } @@ -47,13 +47,13 @@ KviKvsScriptWindowWindow::~KviKvsScriptWindowWindow() { } -void KviKvsScriptWindowWindow::setCentralWidget(KviKvsObject_widget *o,QWidget * w) +void KviKvsScriptWindowWindow::setCentralWidget(KviKvsObject_widget *o,TQWidget * w) { m_pCentralWidgetObject = o; m_pCentralWidget = w; } -void KviKvsScriptWindowWindow::resizeEvent(QResizeEvent *e) +void KviKvsScriptWindowWindow::resizeEvent(TQResizeEvent *e) { if(m_pCentralWidget) m_pCentralWidget->setGeometry(0,0,width(),height()); @@ -87,9 +87,9 @@ void KviKvsScriptWindowWindow::centralWidgetDestroyed() [class]widget[/class] @description: This class rappresents a MDI window in a KVIrc frame. - Regardless of the parent object passed, the window will be always + Regardless of the tqparent object passed, the window will be always a "physical" child of the frame window: you can't embed a window object - inside a widget or another window. The parent object will just "own" this + inside a widget or another window. The tqparent object will just "own" this window object and eventually destroy it when it dies. This class can manage only a single central child widget that must be set with $setCentralWidget(). @@ -117,15 +117,15 @@ KVSO_END_CONSTRUCTOR(KviKvsObject_window) bool KviKvsObject_window::init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams) { KviWindow * w = new KviKvsScriptWindowWindow(pContext->window()->frame(),name()); - setObject(w); + setObject(TQT_TQOBJECT(w)); pContext->window()->frame()->addWindow(w,false); - w->minimize(); // must be minimized before children are added, otherwise the focus handling goes nuts... + w->minimize(); // must be minimized before tqchildren are added, otherwise the focus handling goes nuts... return true; } bool KviKvsObject_window::functionsetCaption(KviKvsObjectFunctionCall *c) { - QString szCaption; + TQString szCaption; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("caption",KVS_PT_STRING,0,szCaption) KVSO_PARAMETERS_END(c) diff --git a/src/modules/objects/class_window.h b/src/modules/objects/class_window.h index 1f2ae482..4477a2df 100644 --- a/src/modules/objects/class_window.h +++ b/src/modules/objects/class_window.h @@ -32,7 +32,7 @@ class KviKvsObject_window : public KviKvsObject_widget public: KVSO_DECLARE_OBJECT(KviKvsObject_window) public: - QWidget * widget() { return (QWidget *)object(); }; + TQWidget * widget() { return (TQWidget *)object(); }; protected: virtual bool init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams); @@ -46,16 +46,17 @@ protected: class KviKvsScriptWindowWindow : public KviWindow { Q_OBJECT + TQ_OBJECT public: - KviKvsScriptWindowWindow(KviFrame * pParent,const QString &szName); + KviKvsScriptWindowWindow(KviFrame * pParent,const TQString &szName); ~KviKvsScriptWindowWindow(); protected: KviKvsObject_widget * m_pCentralWidgetObject; - QWidget * m_pCentralWidget; + TQWidget * m_pCentralWidget; public: - void setCentralWidget(KviKvsObject_widget *o,QWidget * w); - void setCaptionString(const QString &s){ setFixedCaption(s); }; - virtual void resizeEvent(QResizeEvent *e); + void setCentralWidget(KviKvsObject_widget *o,TQWidget * w); + void setCaptionString(const TQString &s){ setFixedCaption(s); }; + virtual void resizeEvent(TQResizeEvent *e); protected slots: void centralWidgetObjectDestroyed(); void centralWidgetDestroyed(); diff --git a/src/modules/objects/class_wizard.cpp b/src/modules/objects/class_wizard.cpp index 091b3065..67226503 100644 --- a/src/modules/objects/class_wizard.cpp +++ b/src/modules/objects/class_wizard.cpp @@ -22,7 +22,7 @@ // #include -#include +#include #include "class_wizard.h" #include "kvi_error.h" #include "kvi_debug.h" @@ -124,14 +124,14 @@ KVSO_END_CONSTRUCTOR(KviKvsObject_wizard) bool KviKvsObject_wizard::init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams) { - setObject(new KviKvsMdmWizard(parentScriptWidget(), name(),this), true); + setObject(TQT_TQOBJECT(new KviKvsMdmWizard(tqparentScriptWidget(), name(),this)), true); return true; } bool KviKvsObject_wizard::functionaddPage(KviKvsObjectFunctionCall *c) { KviKvsObject *ob; - QString szLabel; + TQString szLabel; kvs_hobject_t hObject; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("page_widget",KVS_PT_HOBJECT,0,hObject) @@ -144,13 +144,13 @@ bool KviKvsObject_wizard::functionaddPage(KviKvsObjectFunctionCall *c) c->warning(__tr2qs("Can't add a non-widget object")); return true; } - ((KviTalWizard *)widget())->addPage(((QWidget *)(ob->object())),szLabel); + ((KviTalWizard *)widget())->addPage(((TQWidget *)(ob->object())),szLabel); return true; } bool KviKvsObject_wizard::functioninsertPage(KviKvsObjectFunctionCall *c) { KviKvsObject *ob; - QString szLabel; + TQString szLabel; kvs_int_t uIndex; kvs_hobject_t hObject; KVSO_PARAMETERS_BEGIN(c) @@ -165,7 +165,7 @@ bool KviKvsObject_wizard::functioninsertPage(KviKvsObjectFunctionCall *c) c->warning(__tr2qs("Can't add a non-widget object")); return true; } - ((KviTalWizard *)widget())->insertPage(((QWidget *)(ob->object())),szLabel,uIndex); + ((KviTalWizard *)widget())->insertPage(((TQWidget *)(ob->object())),szLabel,uIndex); return true; } @@ -173,7 +173,7 @@ bool KviKvsObject_wizard::functioninsertPage(KviKvsObjectFunctionCall *c) bool KviKvsObject_wizard::functionsetTitle(KviKvsObjectFunctionCall *c) { KviKvsObject *ob; - QString szTitle; + TQString szTitle; kvs_hobject_t hObject; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("page_widget",KVS_PT_HOBJECT,0,hObject) @@ -186,7 +186,7 @@ bool KviKvsObject_wizard::functionsetTitle(KviKvsObjectFunctionCall *c) c->warning(__tr2qs("Widget object required")); return true; } - ((KviTalWizard *)widget())->setPageTitle(((QWidget *)(ob->object())),szTitle); + ((KviTalWizard *)widget())->setPageTitle(((TQWidget *)(ob->object())),szTitle); return true; } bool KviKvsObject_wizard::functionsetBackEnabled(KviKvsObjectFunctionCall *c) @@ -205,7 +205,7 @@ bool KviKvsObject_wizard::functionsetBackEnabled(KviKvsObjectFunctionCall *c) c->warning(__tr2qs("Widget object required")); return true; } - ((KviTalWizard *)widget())->setBackEnabled(((QWidget *)(ob->object())),bEnabled); + ((KviTalWizard *)widget())->setBackEnabled(((TQWidget *)(ob->object())),bEnabled); return true; } @@ -225,7 +225,7 @@ bool KviKvsObject_wizard::functionsetNextEnabled(KviKvsObjectFunctionCall *c) c->warning(__tr2qs("Widget object required")); return true; } - ((KviTalWizard *)widget())->setNextEnabled(((QWidget *)(ob->object())),bEnabled); + ((KviTalWizard *)widget())->setNextEnabled(((TQWidget *)(ob->object())),bEnabled); return true; } bool KviKvsObject_wizard::functionsetFinishEnabled(KviKvsObjectFunctionCall *c) @@ -244,7 +244,7 @@ bool KviKvsObject_wizard::functionsetFinishEnabled(KviKvsObjectFunctionCall *c) c->warning(__tr2qs("Widget object required")); return true; } - ((KviTalWizard *)widget())->setFinishEnabled(((QWidget *)(ob->object())),bEnabled); + ((KviTalWizard *)widget())->setFinishEnabled(((TQWidget *)(ob->object())),bEnabled); return true; } bool KviKvsObject_wizard::functionsetHelpEnabled(KviKvsObjectFunctionCall *c) @@ -263,12 +263,12 @@ bool KviKvsObject_wizard::functionsetHelpEnabled(KviKvsObjectFunctionCall *c) c->warning(__tr2qs("Widget object required")); return true; } - ((KviTalWizard *)widget())->setHelpEnabled(((QWidget *)(ob->object())),bEnabled); + ((KviTalWizard *)widget())->setHelpEnabled(((TQWidget *)(ob->object())),bEnabled); return true; } bool KviKvsObject_wizard::functionsetBackBtnText(KviKvsObjectFunctionCall *c) { - QString szText; + TQString szText; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("text",KVS_PT_STRING,0,szText) KVSO_PARAMETERS_END(c) @@ -278,7 +278,7 @@ bool KviKvsObject_wizard::functionsetBackBtnText(KviKvsObjectFunctionCall *c) } bool KviKvsObject_wizard::functionsetNextBtnText(KviKvsObjectFunctionCall *c) { - QString szText; + TQString szText; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("text",KVS_PT_STRING,0,szText) KVSO_PARAMETERS_END(c) @@ -288,7 +288,7 @@ bool KviKvsObject_wizard::functionsetNextBtnText(KviKvsObjectFunctionCall *c) } bool KviKvsObject_wizard::functionsetHelpBtnText(KviKvsObjectFunctionCall *c) { - QString szText; + TQString szText; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("text",KVS_PT_STRING,0,szText) KVSO_PARAMETERS_END(c) @@ -298,7 +298,7 @@ bool KviKvsObject_wizard::functionsetHelpBtnText(KviKvsObjectFunctionCall *c) } bool KviKvsObject_wizard::functionsetFinishBtnText(KviKvsObjectFunctionCall *c) { - QString szText; + TQString szText; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("text",KVS_PT_STRING,0,szText) KVSO_PARAMETERS_END(c) @@ -340,12 +340,12 @@ void KviKvsObject_wizard::backClicked() KviKvsVariantList *params=0; callFunction(this,"backClickedEvent",params); } -KviKvsMdmWizard::KviKvsMdmWizard(QWidget * par,const char * name,KviKvsObject_wizard * parent) +KviKvsMdmWizard::KviKvsMdmWizard(TQWidget * par,const char * name,KviKvsObject_wizard * tqparent) :KviTalWizard(par) { - m_pParentScript=parent; - connect (this->backButton(),SIGNAL(clicked()),this,SLOT(slotBackClicked())); - connect (this->nextButton(),SIGNAL(clicked()),this,SLOT(slotNextClicked())); + m_pParentScript=tqparent; + connect (this->backButton(),TQT_SIGNAL(clicked()),this,TQT_SLOT(slotBackClicked())); + connect (this->nextButton(),TQT_SIGNAL(clicked()),this,TQT_SLOT(slotNextClicked())); } void KviKvsMdmWizard::accept() { diff --git a/src/modules/objects/class_wizard.h b/src/modules/objects/class_wizard.h index 0c605efe..ddc8a839 100644 --- a/src/modules/objects/class_wizard.h +++ b/src/modules/objects/class_wizard.h @@ -33,7 +33,7 @@ class KviKvsObject_wizard : public KviKvsObject_widget public: KVSO_DECLARE_OBJECT(KviKvsObject_wizard) public: - QWidget * widget() { return (QWidget *)object(); }; + TQWidget * widget() { return (TQWidget *)object(); }; bool accept(); bool reject(); void nextClicked(); @@ -65,8 +65,9 @@ class KviKvsMdmWizard : public KviTalWizard { Q_OBJECT + TQ_OBJECT public: - KviKvsMdmWizard(QWidget * par,const char * name,KviKvsObject_wizard *); + KviKvsMdmWizard(TQWidget * par,const char * name,KviKvsObject_wizard *); void accept(); void reject(); virtual ~KviKvsMdmWizard(); diff --git a/src/modules/objects/class_workspace.cpp b/src/modules/objects/class_workspace.cpp index 1f6d8a3e..90e36876 100644 --- a/src/modules/objects/class_workspace.cpp +++ b/src/modules/objects/class_workspace.cpp @@ -24,7 +24,7 @@ -#include +#include #include "class_workspace.h" #include "kvi_error.h" #include "kvi_debug.h" @@ -110,7 +110,7 @@ constructor[br] {[br] $$->$setGeometry(%X,%Y,100,100)[br] - $$->%lay=$new(layout,$$)[br] + $$->%lay=$new(tqlayout,$$)[br] %i=0[br] while (%i<10)[br] {[br] @@ -184,13 +184,13 @@ KVSO_END_CONSTRUCTOR(KviKvsObject_workspace) bool KviKvsObject_workspace::init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams) { - setObject(new QWorkspace(parentScriptWidget(), name()), true); + setObject(TQT_TQOBJECT(new TQWorkspace(tqparentScriptWidget(), name())), true); return true; } bool KviKvsObject_workspace::functionactiveWindow(KviKvsObjectFunctionCall *c) { - //if(widget()) c->returnValue()->setHObject((unsigned long)(((QWorkspace *)widget())->activeWindow())); + //if(widget()) c->returnValue()->setHObject((unsigned long)(((TQWorkspace *)widget())->activeWindow())); // FIXME! c->returnValue()->setHObject(0); return true; //?pFIX ME? @@ -199,7 +199,7 @@ bool KviKvsObject_workspace::functionactiveWindow(KviKvsObjectFunctionCall *c) bool KviKvsObject_workspace::functionscrollBarsEnabled(KviKvsObjectFunctionCall *c) { if(widget()) - c->returnValue()->setBoolean(((QWorkspace *)widget())->scrollBarsEnabled()); + c->returnValue()->setBoolean(((TQWorkspace *)widget())->scrollBarsEnabled()); return true; } @@ -210,42 +210,42 @@ bool KviKvsObject_workspace::functionsetscrollBarsEnabled(KviKvsObjectFunctionCa KVSO_PARAMETER("bEnabled",KVS_PT_BOOL,0,bEnabled) KVSO_PARAMETERS_END(c) if(widget()) - ((QWorkspace *)widget())->setScrollBarsEnabled(bEnabled); + ((TQWorkspace *)widget())->setScrollBarsEnabled(bEnabled); return true; } bool KviKvsObject_workspace::functioncascade(KviKvsObjectFunctionCall *c) { if(widget()) - ((QWorkspace *)widget())->cascade(); + ((TQWorkspace *)widget())->cascade(); return true; } bool KviKvsObject_workspace::functiontile(KviKvsObjectFunctionCall *c) { if(widget()) - ((QWorkspace *)widget())->tile(); + ((TQWorkspace *)widget())->tile(); return true; } bool KviKvsObject_workspace::functioncloseActiveWindow(KviKvsObjectFunctionCall *c) { if(widget()) - ((QWorkspace *)widget())->closeActiveWindow(); + ((TQWorkspace *)widget())->closeActiveWindow(); return true; } bool KviKvsObject_workspace::functioncloseAllWindows(KviKvsObjectFunctionCall *c) { if(widget()) - ((QWorkspace *)widget())->closeAllWindows(); + ((TQWorkspace *)widget())->closeAllWindows(); return true; } bool KviKvsObject_workspace::functionactivateNextWindow(KviKvsObjectFunctionCall *c) { if(widget()) - ((QWorkspace *)widget())->activateNextWindow(); + ((TQWorkspace *)widget())->activateNextWindow(); return true; } @@ -253,9 +253,9 @@ bool KviKvsObject_workspace::functionactivatePrevWindow(KviKvsObjectFunctionCall { if(widget()){ #ifdef COMPILE_USE_QT4 - ((QWorkspace *)widget())->activatePreviousWindow(); + ((TQWorkspace *)widget())->activatePreviousWindow(); #else - ((QWorkspace *)widget())->activatePrevWindow(); + ((TQWorkspace *)widget())->activatePrevWindow(); #endif } return true; diff --git a/src/modules/objects/class_workspace.h b/src/modules/objects/class_workspace.h index c18264df..d250d1e1 100644 --- a/src/modules/objects/class_workspace.h +++ b/src/modules/objects/class_workspace.h @@ -26,7 +26,7 @@ -#include +#include #include "class_widget.h" class KviKvsObject_workspace : public KviKvsObject_widget @@ -34,7 +34,7 @@ class KviKvsObject_workspace : public KviKvsObject_widget public: KVSO_DECLARE_OBJECT(KviKvsObject_workspace) public: - QWidget * widget() { return (QWidget *)object(); }; + TQWidget * widget() { return (TQWidget *)object(); }; protected: virtual bool init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams); diff --git a/src/modules/objects/class_wrapper.cpp b/src/modules/objects/class_wrapper.cpp index 02ff632c..87d2e0c4 100644 --- a/src/modules/objects/class_wrapper.cpp +++ b/src/modules/objects/class_wrapper.cpp @@ -29,10 +29,10 @@ #include "kvi_iconmanager.h" #include "class_widget.h" -#include +#include #ifndef COMPILE_USE_QT4 - #include - #include + #include + #include #endif #include "kvi_app.h" #include "kvi_frame.h" @@ -47,7 +47,7 @@ @type: class @short: - Provides a wrapper class that hooks to an existing Qt graphic object modifying it. + Provides a wrapper class that hooks to an existing TQt graphic object modifying it. @inherits: [class]object[/class] [class]widget[/class] @@ -58,21 +58,21 @@ in fact, could hook every widget, you can modify the property or you can be inserted other widget as child of this...[br] in short you have absolute liberty. [br] The power of this class is fantastic, because it allows the change at "run time" of almost all the elements of the Kvirc.[br] - But to use this class in optimal way and to exploit its power, you have to know the Qt.... so you won't have limits [br] - The KVIrc Qt widgets are arranged in trees (just as the objects).[br] + But to use this class in optimal way and to exploit its power, you have to know the TQt.... so you won't have limits [br] + The KVIrc TQt widgets are arranged in trees (just as the objects).[br] The difference is that there are more toplevel widgets (and so more than one tree).[br] - You can use [fnc]$objects.dump()[/fnc] to take a look at the KVIrc Qt objects tree.[br] + You can use [fnc]$objects.dump()[/fnc] to take a look at the KVIrc TQt objects tree.[br] Here is a part of the tree:[br][br] Ptr 14332520: top level object: kvirc_frame, class KviFrame, visible, rect = -4, -4, 1024, 708 - Ptr 17296024: object: qt_top_dock, class QDockArea + Ptr 17296024: object: qt_top_dock, class TQDockArea Ptr 14882136: object: qt_custom_toolbar, class KviCustomToolBar - Ptr 18143368: object: qt_dockwidget_internal, class QDockWindowTitleBar + Ptr 18143368: object: qt_dockwidget_internal, class TQDockWindowTitleBar [br][br] Every listed widget has a "name", a "class" and a set of properties.[br] The first entry in this example is a KVIrc server window, class "KviFrame" and name "kvirc_frame": it is a toplevel widget.[br] The "qt_top_dock", "qt_custom_toolbar" and the "qt_dockwidget_internal" are - direct children of that widget.[br] + direct tqchildren of that widget.[br] To indicate a specific widget we will use the "class::name" form.[br] So to indicate the main KVIrc frame you will use "KviFrame::kvirc_main_frame". Look at this example:[br] @@ -93,7 +93,7 @@ Now %A. will be point to the wrapped object, therefore we could modify its property or to consider it as if it were an object created by us in scripting. [br] Obviously, deleting the created object (for example %A) you don't will delete the object of Kvirc (in this case the statusbar). [br] Another example could be this:[br] - %A=$new(wrapper,0,test,KviFrame::kvirc_frame,QToolButton::kvirc.identityoptions)[br] + %A=$new(wrapper,0,test,KviFrame::kvirc_frame,TQToolButton::kvirc.identityoptions)[br] %A->$setProperty(usesBigPixmap,0)[br] In this fool example with the function $setProperty, we has setted the property usesBigPixmap to False, making to become the small icons of the ToolBar.[br] [br] @@ -122,17 +122,17 @@ bool KviKvsObject_wrapper::init(KviKvsRunTimeContext * pContext,KviKvsVariantLis if( !pParams ) return false; debug ("ci sono i parametri"); - QWidget *pWidget = 0; + TQWidget *pWidget = 0; int i=0; while(i!=pParams->count()) { - QString szClass; - QString szName; - QString s=0; + TQString szClass; + TQString szName; + TQString s=0; pParams->at(i)->asString(s); if (!s.isEmpty()) { - int idx = s.find("::"); + int idx = s.tqfind("::"); if( idx != -1 ) { szClass = s.left(idx); szName = s.right(s.length() - idx - 2); @@ -144,7 +144,7 @@ bool KviKvsObject_wrapper::init(KviKvsRunTimeContext * pContext,KviKvsVariantLis debug ("szName %s",szName.latin1()); debug ("s %s",s.latin1()); - if(KviQString::equalCI(szClass,"WinId")) + if(KviTQString::equalCI(szClass,"WinId")) { if(pWidget) { @@ -156,10 +156,10 @@ bool KviKvsObject_wrapper::init(KviKvsRunTimeContext * pContext,KviKvsVariantLis } else { if(pWidget) { pWidget = findWidgetToWrap( - !szClass.isEmpty() ? szClass : KviQString::empty, !szName.isEmpty() ? szName : KviQString::empty, pWidget + !szClass.isEmpty() ? szClass : KviTQString::empty, !szName.isEmpty() ? szName : KviTQString::empty, pWidget ); } else { - pWidget = findTopLevelWidgetToWrap(szClass.isEmpty() ? szClass : KviQString::empty, !szName.isEmpty() ? szName : KviQString::empty); + pWidget = findTopLevelWidgetToWrap(szClass.isEmpty() ? szClass : KviTQString::empty, !szName.isEmpty() ? szName : KviTQString::empty); } } if( !pWidget ) @@ -176,52 +176,52 @@ bool KviKvsObject_wrapper::init(KviKvsRunTimeContext * pContext,KviKvsVariantLis pContext->warning(__tr2qs("Failed to find the widget to wrap")); return false; } - setObject(pWidget,false); + setObject(TQT_TQOBJECT(pWidget),false); return true; } -QWidget *KviKvsObject_wrapper::findTopLevelWidgetToWrap(const QString szClass, const QString szName) +TQWidget *KviKvsObject_wrapper::findTopLevelWidgetToWrap(const TQString szClass, const TQString szName) { #ifdef COMPILE_USE_QT4 - QWidgetList list = g_pApp->topLevelWidgets(); + TQWidgetList list = g_pApp->tqtopLevelWidgets(); if( !list.count() ) return 0; for(int idx=0;idxname(), szName); + bNameMatch = KviTQString::equalCI(list.at(idx)->name(), szName); else bNameMatch = true; if( !szClass.isEmpty()) - bClassMatch = KviQString::equalCI(list.at(idx)->className(), szClass); + bClassMatch = KviTQString::equalCI(list.at(idx)->className(), szClass); else bClassMatch = true; if( bNameMatch && bClassMatch ) { - QWidget *w = list.at(idx); + TQWidget *w = list.at(idx); return w; } } return 0; #else - QWidgetList *list = g_pApp->topLevelWidgets(); + TQWidgetList *list = g_pApp->tqtopLevelWidgets(); if( !list ) return 0; - QWidgetListIt it(*list); + TQWidgetListIt it(*list); while( it.current() ) { bool bNameMatch = false; bool bClassMatch = false; if( szName ) - bNameMatch = KviQString::equalCI(it.current()->name(), szName); + bNameMatch = KviTQString::equalCI(it.current()->name(), szName); else bNameMatch = true; if( szClass ) - bClassMatch = KviQString::equalCI(it.current()->className(), szClass); + bClassMatch = KviTQString::equalCI(it.current()->className(), szClass); else bClassMatch = true; if( bNameMatch && bClassMatch ) { - QWidget *w = it.current(); + TQWidget *w = it.current(); delete list; return w; } @@ -233,15 +233,15 @@ QWidget *KviKvsObject_wrapper::findTopLevelWidgetToWrap(const QString szClass, c #endif } -QWidget *KviKvsObject_wrapper::findWidgetToWrap(const char *szClass, const char *szName, QWidget *childOf) +TQWidget *KviKvsObject_wrapper::findWidgetToWrap(const char *szClass, const char *szName, TQWidget *childOf) { #ifdef COMPILE_USE_QT4 - QObjectList list = childOf->queryList(szClass ? szClass : 0, szName ? szName : 0, false, true); + TQObjectList list = childOf->queryList(szClass ? szClass : 0, szName ? szName : 0, false, true); if( !list.count() ) return 0; for(int idx=0;idxisWidgetType() ) { - QWidget *w = (QWidget *)list.at(idx); + TQWidget *w = (TQWidget *)list.at(idx); return w; } @@ -249,13 +249,13 @@ QWidget *KviKvsObject_wrapper::findWidgetToWrap(const char *szClass, const char return 0; #else - QObjectList *list = childOf->queryList(szClass ? szClass : 0, szName ? szName : 0, false, true); + TQObjectList *list = childOf->queryList(szClass ? szClass : 0, szName ? szName : 0, false, true); if( !list ) return 0; - QObjectListIt it(*list); + TQObjectListIt it(*list); while( it.current() ) { if( it.current()->isWidgetType() ) { - QWidget *w = (QWidget *) it.current(); + TQWidget *w = (TQWidget *) it.current(); delete list; return w; } diff --git a/src/modules/objects/class_wrapper.h b/src/modules/objects/class_wrapper.h index 900b0672..62bb651d 100644 --- a/src/modules/objects/class_wrapper.h +++ b/src/modules/objects/class_wrapper.h @@ -27,7 +27,7 @@ #include "class_widget.h" -#include "qlistview.h" +#include "tqlistview.h" @@ -37,14 +37,15 @@ class KviKvsObject_wrapper : public KviKvsObject_widget { Q_OBJECT + TQ_OBJECT public: KVSO_DECLARE_OBJECT(KviKvsObject_wrapper) public: - QWidget * widget() { return (QWidget *)object(); }; + TQWidget * widget() { return (TQWidget *)object(); }; protected: virtual bool init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams); - QWidget * findTopLevelWidgetToWrap(const QString szClass, const QString szName); - QWidget * findWidgetToWrap(const char *szClass, const char *szName, QWidget *childOf); + TQWidget * findTopLevelWidgetToWrap(const TQString szClass, const TQString szName); + TQWidget * findWidgetToWrap(const char *szClass, const char *szName, TQWidget *childOf); }; diff --git a/src/modules/objects/class_xmlreader.cpp b/src/modules/objects/class_xmlreader.cpp index f4bccc8f..243a0b79 100644 --- a/src/modules/objects/class_xmlreader.cpp +++ b/src/modules/objects/class_xmlreader.cpp @@ -128,15 +128,15 @@ */ -#ifndef QT_NO_XML +#ifndef TQT_NO_XML -#include +#include -class KviXmlHandler : public QXmlDefaultHandler +class KviXmlHandler : public TQXmlDefaultHandler { protected: KviKvsObject_xmlreader * m_pReader; - QString m_szErrorString; + TQString m_szErrorString; public: KviXmlHandler(KviKvsObject_xmlreader * pReader) { @@ -156,12 +156,12 @@ private: m_szErrorString = __tr2qs("Processing aborted"); return false; } - void decodeException(QString &szMsg,bool bError,const QXmlParseException &exception) + void decodeException(TQString &szMsg,bool bError,const TQXmlParseException &exception) { if(bError) - KviQString::sprintf(szMsg,__tr2qs("Error near line %d, column %d"),exception.lineNumber(),exception.columnNumber()); + KviTQString::sprintf(szMsg,__tr2qs("Error near line %d, column %d"),exception.lineNumber(),exception.columnNumber()); else - KviQString::sprintf(szMsg,__tr2qs("Warning near line %d, column %d"),exception.lineNumber(),exception.columnNumber()); + KviTQString::sprintf(szMsg,__tr2qs("Warning near line %d, column %d"),exception.lineNumber(),exception.columnNumber()); szMsg += ": "; szMsg += exception.message(); } @@ -187,7 +187,7 @@ public: return handleKvsCallReturnValue(&ret); } - virtual bool startElement(const QString &szNamespaceUri,const QString &szLocalName,const QString &szQualifiedName,const QXmlAttributes &attrs) + virtual bool startElement(const TQString &szNamespaceUri,const TQString &szLocalName,const TQString &szQualifiedName,const TQXmlAttributes &attrs) { KviKvsVariant ret; KviKvsVariantList par; @@ -205,7 +205,7 @@ public: return handleKvsCallReturnValue(&ret); } - virtual bool endElement(const QString &szNamespaceUri,const QString &szLocalName,const QString &szQualifiedName) + virtual bool endElement(const TQString &szNamespaceUri,const TQString &szLocalName,const TQString &szQualifiedName) { KviKvsVariant ret; KviKvsVariantList par; @@ -218,7 +218,7 @@ public: return handleKvsCallReturnValue(&ret); } - virtual bool characters(const QString &szChars) + virtual bool characters(const TQString &szChars) { KviKvsVariant ret; KviKvsVariantList par; @@ -229,10 +229,10 @@ public: return handleKvsCallReturnValue(&ret); } - virtual bool warning(const QXmlParseException &exception) + virtual bool warning(const TQXmlParseException &exception) { // recoverable - QString szMsg; + TQString szMsg; decodeException(szMsg,false,exception); KviKvsVariant ret; @@ -244,10 +244,10 @@ public: return handleKvsCallReturnValue(&ret); } - virtual bool error(const QXmlParseException &exception) + virtual bool error(const TQXmlParseException &exception) { // recoverable - QString szMsg; + TQString szMsg; decodeException(szMsg,false,exception); KviKvsVariant ret; @@ -259,21 +259,21 @@ public: return handleKvsCallReturnValue(&ret); } - virtual bool fatalError(const QXmlParseException &exception) + virtual bool fatalError(const TQXmlParseException &exception) { - QString szMsg; + TQString szMsg; decodeException(szMsg,true,exception); m_pReader->fatalError(szMsg); return true; } - virtual QString errorString() + virtual TQString errorString() { return m_szErrorString; } }; -#endif // !QT_NO_XML +#endif // !TQT_NO_XML KVSO_BEGIN_REGISTERCLASS(KviKvsObject_xmlreader,"xmlreader","object") @@ -295,7 +295,7 @@ KVSO_END_CONSTRUCTOR(KviKvsObject_xmlreader) KVSO_BEGIN_DESTRUCTOR(KviKvsObject_xmlreader) KVSO_END_DESTRUCTOR(KviKvsObject_xmlreader) -void KviKvsObject_xmlreader::fatalError(const QString &szError) +void KviKvsObject_xmlreader::fatalError(const TQString &szError) { m_szLastError = szError; @@ -306,27 +306,27 @@ void KviKvsObject_xmlreader::fatalError(const QString &szError) bool KviKvsObject_xmlreader::function_parse(KviKvsObjectFunctionCall *c) { - QString szString; + TQString szString; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("string",KVS_PT_STRING,0,szString) KVSO_PARAMETERS_END(c) -#ifdef QT_NO_XML - fatalError(__tr2qs("XML support not available in the Qt library")); +#ifdef TQT_NO_XML + fatalError(__tr2qs("XML support not available in the TQt library")); c->returnValue()->setBoolean(false); #else m_szLastError = ""; KviXmlHandler handler(this); - QXmlInputSource source; + TQXmlInputSource source; // We have a problem here.. most kvirc functions already interpret the data // read from files. We should have binary data handling features to get this to work correctly. // The following snippet of code tries to provide a best-effort workaround. - KviQCString utf8data = KviQString::toUtf8(szString); - QByteArray data = utf8data; + KviTQCString utf8data = KviTQString::toUtf8(szString); + TQByteArray data = utf8data; data.truncate(utf8data.length()); // don't include the null terminator in data source.setData(data); //debug("PARSING(%s) LEN(%d)",szString.utf8().data(),szString.utf8().length()); - QXmlSimpleReader reader; + TQXmlSimpleReader reader; reader.setContentHandler(&handler); reader.setErrorHandler(&handler); c->returnValue()->setBoolean(reader.parse(source)); diff --git a/src/modules/objects/class_xmlreader.h b/src/modules/objects/class_xmlreader.h index dca69333..d1854ced 100644 --- a/src/modules/objects/class_xmlreader.h +++ b/src/modules/objects/class_xmlreader.h @@ -32,15 +32,16 @@ class KviKvsObject_xmlreader : public KviKvsObject { Q_OBJECT + TQ_OBJECT public: KVSO_DECLARE_OBJECT(KviKvsObject_xmlreader) public: bool function_parse(KviKvsObjectFunctionCall *c); bool function_lastError(KviKvsObjectFunctionCall *c); - void fatalError(const QString &szError); + void fatalError(const TQString &szError); protected: - QString m_szLastError; + TQString m_szLastError; }; #endif //!_CLASS_XMLREADER_H_ diff --git a/src/modules/objects/libkviobjects.cpp b/src/modules/objects/libkviobjects.cpp index 73eacace..81d3bef1 100644 --- a/src/modules/objects/libkviobjects.cpp +++ b/src/modules/objects/libkviobjects.cpp @@ -23,7 +23,7 @@ //============================================================================= #include "kvi_tal_listview.h" -#include +#include #include "kvi_iconmanager.h" #include "kvi_window.h" #include "kvi_out.h" @@ -40,11 +40,11 @@ #include "kvi_app.h" #include "kvi_fileutils.h" #ifndef COMPILE_USE_QT4 - #include - #include + #include + #include #endif -#include +#include #include "class_button.h" #include "class_checkbox.h" @@ -86,7 +86,7 @@ #include "class_dockwindow.h" #include "class_vbox.h" #include "class_hbox.h" -static void dumpChildObjects(KviWindow *pWnd, QObject *parent, const char *spacing, bool bWidgetsOnly, KviKvsArray *n, int &idx); +static void dumpChildObjects(KviWindow *pWnd, TQObject *tqparent, const char *spacing, bool bWidgetsOnly, KviKvsArray *n, int &idx); static bool objects_module_cleanup(KviModule *m) { @@ -153,7 +153,7 @@ static bool objects_kvs_cmd_killClass(KviKvsModuleCommandCall * c) Suppresses any warning message @description: Removes the definition of the class .[br] - All the instances of the class are killed (thus children objects are killed too).[br] + All the instances of the class are killed (thus tqchildren objects are killed too).[br] All the derived class definitions are removed as well.[br] Builtin class definitions cannot be removed and this commands kills only all the instances of that class (derived class definitions @@ -164,7 +164,7 @@ static bool objects_kvs_cmd_killClass(KviKvsModuleCommandCall * c) */ - QString szClass; + TQString szClass; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("class",KVS_PT_NONEMPTYSTRING,0,szClass) KVSM_PARAMETERS_END(c) @@ -209,7 +209,7 @@ static bool objects_kvs_cmd_clearObjects(KviKvsModuleCommandCall * c) */ KviKvsKernel::instance()->objectController()->clearInstances(); - if(!c->switches()->find('i',"ii")) KviKvsKernel::instance()->objectController()->clearUserClasses(); + if(!c->switches()->tqfind('i',"ii")) KviKvsKernel::instance()->objectController()->clearUserClasses(); return true; } @@ -242,7 +242,7 @@ static bool objects_kvs_cmd_connect(KviKvsModuleCommandCall * c) KviKvsObject *obSrc; KviKvsObject *obTrg; - QString szSignal,szSlot; + TQString szSignal,szSlot; kvs_hobject_t hSrc,hTrg; KVSM_PARAMETERS_BEGIN(c) KVSO_PARAMETER("object source",KVS_PT_HOBJECT,0,hSrc) @@ -332,8 +332,8 @@ static bool objects_kvs_fnc_instances(KviKvsModuleFunctionCall * c) [doc:objects]objects documentation[/doc] */ - QString szClassName; - QString szFlags; + TQString szClassName; + TQString szFlags; KVSM_PARAMETERS_BEGIN(c) KVSO_PARAMETER("class name",KVS_PT_NONEMPTYSTRING,0,szClassName) KVSO_PARAMETER("flags",KVS_PT_STRING,KVS_PF_OPTIONAL,szFlags) @@ -345,7 +345,7 @@ static bool objects_kvs_fnc_instances(KviKvsModuleFunctionCall * c) KviKvsObjectClass * pClass = KviKvsKernel::instance()->objectController()->lookupClass(szClassName); if(!pClass) { - if(!szFlags.contains(QChar('q'))) + if(!szFlags.tqcontains(TQChar('q'))) c->warning(__tr2qs("The class '%Q' does not exist"),&szClassName); return true; } @@ -353,7 +353,7 @@ static bool objects_kvs_fnc_instances(KviKvsModuleFunctionCall * c) KviPointerHashTableIterator it(*od); kvs_uint_t uIdx = 0; - if(szFlags.contains(QChar('s'))) + if(szFlags.tqcontains(TQChar('s'))) { while(KviKvsObject * ob = it.current()) { @@ -404,7 +404,7 @@ static bool objects_kvs_fnc_variables(KviKvsModuleFunctionCall * c) c->warning(__tr2qs("Object does not exists")); return true; } - KviPointerHashTableIterator it(* ob->dataContainer()->dict()); + KviPointerHashTableIterator it(* ob->dataContainer()->dict()); KviKvsHash* pHash = new KviKvsHash(); c->returnValue()->setHash(pHash); while(KviKvsVariant * t = it.current()) @@ -434,7 +434,7 @@ static bool objects_kvs_fnc_variables(KviKvsModuleFunctionCall * c) */ static bool objects_kvs_fnc_classAllHandlers(KviKvsModuleFunctionCall * c) { - QString szClassName; + TQString szClassName; KVSM_PARAMETERS_BEGIN(c) KVSO_PARAMETER("class name",KVS_PT_NONEMPTYSTRING,0,szClassName) KVSM_PARAMETERS_END(c) @@ -445,12 +445,12 @@ static bool objects_kvs_fnc_classAllHandlers(KviKvsModuleFunctionCall * c) return true; } - KviPointerHashTableIterator it(* pClass->getHandlers()); + KviPointerHashTableIterator it(* pClass->getHandlers()); KviKvsHash* pHash = new KviKvsHash(); c->returnValue()->setHash(pHash); while(KviKvsObjectFunctionHandler * t = it.current()) { - QString szCode; + TQString szCode; KviKvsObjectFunctionHandler *handler=pClass->lookupFunctionHandler(it.currentKey()); pClass->getFunctionCode(szCode,*handler); pHash->set(it.currentKey(),new KviKvsVariant(szCode)); @@ -481,8 +481,8 @@ static bool objects_kvs_fnc_classes(KviKvsModuleFunctionCall * c) KviKvsArray * pArry = new KviKvsArray(); c->returnValue()->setArray(pArry); int uIdx=0; - KviPointerHashTableIterator it(*KviKvsKernel::instance()->objectController()->classDict()); - KviPointerHashTable *classdict=new KviPointerHashTable; + KviPointerHashTableIterator it(*KviKvsKernel::instance()->objectController()->classDict()); + KviPointerHashTable *classdict=new KviPointerHashTable; classdict->setAutoDelete(false); bool bFake=true; while(KviKvsObjectClass * pClass=it.current()) @@ -490,21 +490,21 @@ static bool objects_kvs_fnc_classes(KviKvsModuleFunctionCall * c) if (!pClass->isBuiltin())classdict->insert(it.currentKey(),&bFake); ++it; } - QString szPath; + TQString szPath; g_pApp->getLocalKvircDirectory(szPath,KviApp::Classes); - QDir d(szPath); - QStringList sl; - sl = d.entryList(QDir::Files); - for(QStringList::Iterator it2 = sl.begin();it2 != sl.end();++it2) + TQDir d(szPath); + TQStringList sl; + sl = d.entryList(TQDir::Files); + for(TQStringList::Iterator it2 = sl.begin();it2 != sl.end();++it2) { - QString szName=*it2; - szName.replace("--","::"); + TQString szName=*it2; + szName.tqreplace("--","::"); if (szName!=".." && szName!=".") classdict->insert(szName.left(szName.length()-4),&bFake); } KviKvsArray* pArray = new KviKvsArray(); c->returnValue()->setArray(pArray); int idx=0; - KviPointerHashTableIterator strIt(*classdict); + KviPointerHashTableIterator strIt(*classdict); while(strIt.current()) { pArray->set(idx,new KviKvsVariant(strIt.currentKey())); @@ -542,7 +542,7 @@ static bool objects_kvs_cmd_disconnect(KviKvsModuleCommandCall * c) KviKvsObject *obSrc; KviKvsObject *obTrg; - QString szSignal,szSlot; + TQString szSignal,szSlot; kvs_hobject_t hSrc,hTrg; KVSM_PARAMETERS_BEGIN(c) KVSO_PARAMETER("object source",KVS_PT_HOBJECT,0,hSrc) @@ -615,21 +615,21 @@ static bool objects_kvs_cmd_bitBlt(KviKvsModuleCommandCall * c) return true; } - QImage * imgSource=0; - QPaintDevice * pdSource = 0; + TQImage * imgSource=0; + TQPaintDevice * pdSource = 0; - if(obSrc->inherits("KviKvsObject_pixmap")) pdSource =((KviKvsObject_pixmap *)obSrc)->getPixmap(); - else if (obSrc->inherits("KviKvsObject_widget")) pdSource=((KviKvsObject_widget *)obSrc)->widget(); + if(obSrc->inherits("KviKvsObject_pixmap")) pdSource =TQT_TQPAINTDEVICE(((KviKvsObject_pixmap *)obSrc)->getPixmap()); + else if (obSrc->inherits("KviKvsObject_widget")) pdSource=TQT_TQPAINTDEVICE(((KviKvsObject_widget *)obSrc)->widget()); if (!pdSource) { c->warning(__tr2qs("Widget, Image or Pixmap required ")); return true; } - QPaintDevice * pdDest = 0; + TQPaintDevice * pdDest = 0; if(obDst->inherits("KviKvsObject_pixmap")){ - pdDest= ((KviKvsObject_pixmap *)obDst)->getPixmap(); + pdDest= TQT_TQPAINTDEVICE(((KviKvsObject_pixmap *)obDst)->getPixmap()); } - else if (obDst->inherits("KviKvsObject_widget")) pdDest=((KviKvsObject_widget *)obDst)->widget(); + else if (obDst->inherits("KviKvsObject_widget")) pdDest=TQT_TQPAINTDEVICE(((KviKvsObject_widget *)obDst)->widget()); if (!pdDest) { c->warning(__tr2qs("Widget or Pixmap required")); @@ -639,9 +639,9 @@ static bool objects_kvs_cmd_bitBlt(KviKvsModuleCommandCall * c) ((KviKvsObject_pixmap *)obDst)->pixmapChanged(); } #ifdef COMPILE_USE_QT4 - /*QPainter p(pdDest); - QRect rectdest(iXdst,iYdst,uW,uH); - QRect rectsrc(iXsrc,iYsrc,uW,uH); + /*TQPainter p(pdDest); + TQRect rectdest(iXdst,iYdst,uW,uH); + TQRect rectsrc(iXsrc,iYsrc,uW,uH); p.drawPixmap(rectdest,pdSource,rectsrc); */ @@ -721,9 +721,9 @@ static bool objects_kvs_cmd_blend(KviKvsModuleCommandCall * c) return true; } - QPaintDevice * pdDest = 0; - if(obDest->inherits("KviKvsObject_pixmap")) pdDest = ((KviKvsObject_pixmap *)obDest)->getPixmap(); - else if (obDest->inherits("KviKvsObject_widget")) pdDest=((KviKvsObject_widget *)obDest)->widget(); + TQPaintDevice * pdDest = 0; + if(obDest->inherits("KviKvsObject_pixmap")) pdDest = TQT_TQPAINTDEVICE(((KviKvsObject_pixmap *)obDest)->getPixmap()); + else if (obDest->inherits("KviKvsObject_widget")) pdDest=TQT_TQPAINTDEVICE(((KviKvsObject_widget *)obDest)->widget()); if (!pdDest) { @@ -734,8 +734,8 @@ static bool objects_kvs_cmd_blend(KviKvsModuleCommandCall * c) if(obDest->inherits("KviKvsObject_pixmap")) ((KviKvsObject_pixmap *)obDest)->pixmapChanged(); - QImage *img_back=((KviKvsObject_pixmap *)obBck)->getImage(); - QImage *img_fore=((KviKvsObject_pixmap *)obFor)->getImage(); + TQImage *img_back=((KviKvsObject_pixmap *)obBck)->getImage(); + TQImage *img_fore=((KviKvsObject_pixmap *)obFor)->getImage(); // check size if ((iBkX+uW>img_back->width())||(iBkY+uH>img_back->height())) @@ -748,16 +748,16 @@ static bool objects_kvs_cmd_blend(KviKvsModuleCommandCall * c) c->warning(__tr2qs("Values for foreground are out of image size ")); return true; } - QImage buffer; + TQImage buffer; buffer.create(uW,uH,32); buffer.setAlphaBuffer(true); for(int y = 0;y < buffer.height();y++) { - QRgb * dst = (QRgb *)buffer.scanLine(y); - QRgb * end = dst + buffer.width(); - QRgb * bkg = (QRgb *)img_back->scanLine(y+iBkY); + TQRgb * dst = (TQRgb *)buffer.scanLine(y); + TQRgb * end = dst + buffer.width(); + TQRgb * bkg = (TQRgb *)img_back->scanLine(y+iBkY); bkg += iBkX; - QRgb * fgn = (QRgb *)img_fore->scanLine(y+iFoY); + TQRgb * fgn = (TQRgb *)img_fore->scanLine(y+iFoY); fgn += iFoX; double dRemaining = 1.0 - dBlend; int a=0; @@ -765,11 +765,11 @@ static bool objects_kvs_cmd_blend(KviKvsModuleCommandCall * c) { - *dst = qRgba( - (int)((qRed(*bkg) * dRemaining) + (qRed(*fgn) * dBlend)), - (int)((qGreen(*bkg) * dRemaining) + (qGreen(*fgn) * dBlend)), - (int)((qBlue(*bkg) * dRemaining) + (qBlue(*fgn) * dBlend)), - (int)((qAlpha(*bkg) * dRemaining) + (qAlpha(*fgn) * dBlend)) + *dst = tqRgba( + (int)((tqRed(*bkg) * dRemaining) + (tqRed(*fgn) * dBlend)), + (int)((tqGreen(*bkg) * dRemaining) + (tqGreen(*fgn) * dBlend)), + (int)((tqBlue(*bkg) * dRemaining) + (tqBlue(*fgn) * dBlend)), + (int)((tqAlpha(*bkg) * dRemaining) + (tqAlpha(*fgn) * dBlend)) ); dst++; @@ -780,8 +780,8 @@ static bool objects_kvs_cmd_blend(KviKvsModuleCommandCall * c) } #ifdef COMPILE_USE_QT4 - QPainter p(pdDest); - QRect rect(iDesX,iDesY,buffer.width(),buffer.height()); + TQPainter p(pdDest); + TQRect rect(iDesX,iDesY,buffer.width(),buffer.height()); p.drawImage(rect,buffer); #else bitBlt(pdDest,iDesX,iDesY,&buffer,0,0,buffer.width(),buffer.height()); @@ -827,10 +827,10 @@ static bool objects_kvs_fnc_listObjects(KviKvsModuleFunctionCall * cmd) KVSO_PARAMETERS_END(cmd) if (bFlag) cmd->window()->output(80, "Objects dump:"); #ifdef COMPILE_USE_QT4 - QWidgetList list = g_pApp->topLevelWidgets(); + TQWidgetList list = g_pApp->tqtopLevelWidgets(); KviStr spacing = ">"; - QString szTemp; + TQString szTemp; KviKvsArray * n = new KviKvsArray(); int idx=0; for(int i=0;iisVisible() ? "visible" : "hidden", list.at(i)->x(), list.at(i)->y(), list.at(i)->width(), list.at(i)->height()); } - QString szClass=list.at(i)->className(); - QString szObj=list.at(i)->name(); - QString szTemp; + TQString szClass=list.at(i)->className(); + TQString szObj=list.at(i)->name(); + TQString szTemp; szTemp = szClass + "::" + szObj; KviKvsVariant v; v.setString(szTemp); @@ -865,11 +865,11 @@ static bool objects_kvs_fnc_listObjects(KviKvsModuleFunctionCall * cmd) } #else - QWidgetList *l = g_pApp->topLevelWidgets(); + TQWidgetList *l = g_pApp->tqtopLevelWidgets(); l->setAutoDelete(false); - QWidgetListIt it(*l); + TQWidgetListIt it(*l); KviStr spacing = ">"; - QString szTemp; + TQString szTemp; KviKvsArray * n = new KviKvsArray(); int idx=0; while( it.current() ) @@ -885,9 +885,9 @@ static bool objects_kvs_fnc_listObjects(KviKvsModuleFunctionCall * cmd) it.current()->isVisible() ? "visible" : "hidden", it.current()->x(), it.current()->y(), it.current()->width(), it.current()->height()); } - QString szClass=it.current()->className(); - QString szObj=it.current()->name(); - QString szTemp; + TQString szClass=it.current()->className(); + TQString szObj=it.current()->name(); + TQString szTemp; szTemp = szClass + "::" + szObj; KviKvsVariant v; v.setString(szTemp); @@ -898,7 +898,7 @@ static bool objects_kvs_fnc_listObjects(KviKvsModuleFunctionCall * cmd) idx++; - dumpChildObjects(cmd->window(), it.current(), spacing.ptr(), bFlag,n,idx); + dumpChildObjects(cmd->window(), TQT_TQOBJECT(it.current()), spacing.ptr(), bFlag,n,idx); } @@ -910,12 +910,12 @@ static bool objects_kvs_fnc_listObjects(KviKvsModuleFunctionCall * cmd) return true; } -static void dumpChildObjects(KviWindow *pWnd, QObject *parent, const char *spacing, bool bFlag, KviKvsArray *n, int &idx) +static void dumpChildObjects(KviWindow *pWnd, TQObject *tqparent, const char *spacing, bool bFlag, KviKvsArray *n, int &idx) { #ifdef COMPILE_USE_QT4 - const QObjectList list = parent->children(); + const TQObjectList list = tqparent->tqchildren(); if( !list.count() ) return; - QString sp(spacing); + TQString sp(spacing); sp.append(">"); for(int i=0;iname(), KVI_TEXT_BOLD, list.at(i)->className() ); } - QString szClass=list.at(i)->className(); - QString szObj=list.at(i)->name(); - QString szTemp; + TQString szClass=list.at(i)->className(); + TQString szObj=list.at(i)->name(); + TQString szTemp; szTemp=spacing+szClass+"::"+szObj; KviKvsVariant v; v.setString(szTemp); @@ -942,11 +942,10 @@ static void dumpChildObjects(KviWindow *pWnd, QObject *parent, const char *spaci } #else - const QObjectList *l = parent->children(); - if( !l ) return; - if( l->isEmpty() ) return; - QObjectListIt it(*l); - QString sp(spacing); + const TQObjectList l = tqparent->childrenListObject(); + if( l.isEmpty() ) return; + TQObjectListIt it(l); + TQString sp(spacing); sp.append(">"); while( it.current() ) { @@ -959,9 +958,9 @@ static void dumpChildObjects(KviWindow *pWnd, QObject *parent, const char *spaci it.current()->name(), KVI_TEXT_BOLD, it.current()->className() ); } - QString szClass=it.current()->className(); - QString szObj=it.current()->name(); - QString szTemp; + TQString szClass=it.current()->className(); + TQString szObj=it.current()->name(); + TQString szTemp; szTemp=spacing+szClass+"::"+szObj; KviKvsVariant v; v.setString(szTemp); diff --git a/src/modules/objects/object_macros.h b/src/modules/objects/object_macros.h index 9c0360b2..8e9b788d 100644 --- a/src/modules/objects/object_macros.h +++ b/src/modules/objects/object_macros.h @@ -31,7 +31,7 @@ #include "kvi_kvs_object_functioncall.h" #define KVSO_DECLARE_OBJECT(__className) \ - __className(KviKvsObjectClass * pClass,KviKvsObject * pParent,const QString &szName); \ + __className(KviKvsObjectClass * pClass,KviKvsObject * pParent,const TQString &szName); \ ~__className(); \ static void registerSelf(); \ static void unregisterSelf(); @@ -51,7 +51,7 @@ #define KVSO_BEGIN_REGISTERCLASS(__className,__stringName,__baseClass) \ static KviKvsObjectClass * g_pKvs##__className##Class = 0; \ - static KviKvsObject * kvs_##__className##_createInstance(KviKvsObjectClass * pClass,KviKvsObject * pParent,const QString &szName) \ + static KviKvsObject * kvs_##__className##_createInstance(KviKvsObjectClass * pClass,KviKvsObject * pParent,const TQString &szName) \ { \ return new __className(pClass,pParent,szName); \ } \ @@ -72,7 +72,7 @@ #define KVSO_BEGIN_CONSTRUCTOR(__className,__baseClass) \ - __className::__className(KviKvsObjectClass * pClass,KviKvsObject * pParent,const QString &szName) \ + __className::__className(KviKvsObjectClass * pClass,KviKvsObject * pParent,const TQString &szName) \ : __baseClass(pClass,pParent,szName) \ { diff --git a/src/modules/options/container.cpp b/src/modules/options/container.cpp index 7e2272c1..d86abbba 100644 --- a/src/modules/options/container.cpp +++ b/src/modules/options/container.cpp @@ -27,19 +27,19 @@ #include "kvi_iconmanager.h" #include "kvi_app.h" -#include -#include +#include +#include #include "kvi_tal_tooltip.h" -#include +#include #ifdef COMPILE_USE_QT4 - #include + #include #endif extern KviOptionsInstanceManager * g_pOptionsInstanceManager; -KviOptionsWidgetContainer::KviOptionsWidgetContainer(QWidget * par,bool bModal) -: QDialog(par,"container","options") +KviOptionsWidgetContainer::KviOptionsWidgetContainer(TQWidget * par,bool bModal) +: TQDialog(par,"container","options") { m_pOptionsWidget = 0; setModal(bModal); @@ -52,23 +52,23 @@ KviOptionsWidgetContainer::~KviOptionsWidgetContainer() void KviOptionsWidgetContainer::setup(KviOptionsWidget * w) { - QGridLayout * g = new QGridLayout(this,2,3,4,8); + TQGridLayout * g = new TQGridLayout(this,2,3,4,8); g->addMultiCellWidget(w,0,0,0,2); - QPushButton * b = new QPushButton(__tr2qs_ctx("&OK","options"),this); + TQPushButton * b = new TQPushButton(__tr2qs_ctx("&OK","options"),this); KviTalToolTip::add(b,__tr2qs_ctx("Close this dialog, accepting all changes.","options")); - //b->setMinimumWidth(m_pCancel->sizeHint().width()); + //b->setMinimumWidth(m_pCancel->tqsizeHint().width()); g->addWidget(b,1,1); b->setDefault(true); - connect(b,SIGNAL(clicked()),this,SLOT(okClicked())); + connect(b,TQT_SIGNAL(clicked()),this,TQT_SLOT(okClicked())); b->setIconSet(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_ACCEPT))); - m_pCancel = new QPushButton(__tr2qs_ctx("Cancel","options"),this); + m_pCancel = new TQPushButton(__tr2qs_ctx("Cancel","options"),this); KviTalToolTip::add(m_pCancel,__tr2qs_ctx("Close this dialog, discarding all changes.","options")); g->addWidget(m_pCancel,1,2); - connect(m_pCancel,SIGNAL(clicked()),this,SLOT(cancelClicked())); + connect(m_pCancel,TQT_SIGNAL(clicked()),this,TQT_SLOT(cancelClicked())); m_pCancel->setIconSet(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_DISCARD))); @@ -86,20 +86,20 @@ void KviOptionsWidgetContainer::setup(KviOptionsWidget * w) } -void KviOptionsWidgetContainer::closeEvent(QCloseEvent *e) +void KviOptionsWidgetContainer::closeEvent(TQCloseEvent *e) { e->ignore(); cancelClicked(); } -void KviOptionsWidgetContainer::showEvent(QShowEvent *e) +void KviOptionsWidgetContainer::showEvent(TQShowEvent *e) { - if(parent() == 0) + if(tqparent() == 0) { move((g_pApp->desktop()->width() - width()) / 2, (g_pApp->desktop()->height() - height()) / 2); } - QWidget::showEvent(e); + TQWidget::showEvent(e); m_pCancel->setFocus(); } diff --git a/src/modules/options/container.h b/src/modules/options/container.h index 10ae69de..dad9789b 100644 --- a/src/modules/options/container.h +++ b/src/modules/options/container.h @@ -24,24 +24,25 @@ #include "kvi_optionswidget.h" -#include +#include -class QPushButton; +class TQPushButton; -class KviOptionsWidgetContainer : public QDialog +class KviOptionsWidgetContainer : public TQDialog { Q_OBJECT + TQ_OBJECT public: - KviOptionsWidgetContainer(QWidget * par,bool bModal = false); + KviOptionsWidgetContainer(TQWidget * par,bool bModal = false); ~KviOptionsWidgetContainer(); protected: KviOptionsWidget * m_pOptionsWidget; - QPushButton * m_pCancel; + TQPushButton * m_pCancel; public: void setup(KviOptionsWidget * w); protected: - virtual void closeEvent(QCloseEvent *e); - virtual void showEvent(QShowEvent *e); + virtual void closeEvent(TQCloseEvent *e); + virtual void showEvent(TQShowEvent *e); virtual void reject(); protected slots: void okClicked(); diff --git a/src/modules/options/dialog.cpp b/src/modules/options/dialog.cpp index bebcae3e..6b5f6e80 100644 --- a/src/modules/options/dialog.cpp +++ b/src/modules/options/dialog.cpp @@ -32,45 +32,45 @@ #include "kvi_module.h" #include "kvi_styled_controls.h" #include "kvi_pointerhashtable.h" -#include +#include #include "kvi_accel.h" -#include +#include #include "kvi_tal_vbox.h" -#include +#include #include "kvi_tal_widgetstack.h" -#include +#include #include "kvi_tal_tooltip.h" #ifdef COMPILE_USE_QT4 - #include + #include #else - #include - #include + #include + #include #endif #include "kvi_tal_popupmenu.h" -#include -#include +#include +#include #include -#include -#include -#include +#include +#include +#include //extern KviModule * g_pOptionsModule; -extern KviPointerHashTable * g_pOptionsDialogDict; +extern KviPointerHashTable * g_pOptionsDialogDict; extern KVIRC_API KviApp * g_pApp; extern KviOptionsInstanceManager * g_pOptionsInstanceManager; -KviGeneralOptionsFrontWidget::KviGeneralOptionsFrontWidget(QWidget *parent,const QString &szText) -:KviOptionsWidget(parent,"general_options_front_widget") +KviGeneralOptionsFrontWidget::KviGeneralOptionsFrontWidget(TQWidget *tqparent,const TQString &szText) +:KviOptionsWidget(tqparent,"general_options_front_widget") { createLayout(1,1); - QLabel * l = new QLabel(szText,this); + TQLabel * l = new TQLabel(szText,this); #ifdef COMPILE_USE_QT4 l->setWordWrap(true); #endif - l->setAlignment(Qt::AlignTop); - layout()->addWidget(l,0,0); + l->tqsetAlignment(TQt::AlignTop); + tqlayout()->addWidget(l,0,0); } KviGeneralOptionsFrontWidget::~KviGeneralOptionsFrontWidget() @@ -80,8 +80,8 @@ KviGeneralOptionsFrontWidget::~KviGeneralOptionsFrontWidget() -KviOptionsListViewItem::KviOptionsListViewItem(KviTalListView *parent,KviOptionsWidgetInstanceEntry * e) -:KviTalListViewItem(parent,e->szName) +KviOptionsListViewItem::KviOptionsListViewItem(KviTalListView *tqparent,KviOptionsWidgetInstanceEntry * e) +:KviTalListViewItem(tqparent,e->szName) { m_pInstanceEntry = e; m_pOptionsWidget = 0; @@ -89,8 +89,8 @@ KviOptionsListViewItem::KviOptionsListViewItem(KviTalListView *parent,KviOptions setPixmap(0,*(g_pIconManager->getSmallIcon(e->iIcon))); } -KviOptionsListViewItem::KviOptionsListViewItem(KviTalListViewItem *parent,KviOptionsWidgetInstanceEntry * e) -:KviTalListViewItem(parent,e->szName) +KviOptionsListViewItem::KviOptionsListViewItem(KviTalListViewItem *tqparent,KviOptionsWidgetInstanceEntry * e) +:KviTalListViewItem(tqparent,e->szName) { m_pInstanceEntry = e; m_pOptionsWidget = 0; @@ -102,14 +102,14 @@ KviOptionsListViewItem::~KviOptionsListViewItem() { } -void KviOptionsListViewItem::paintCell(QPainter * p,const QColorGroup & cg,int column,int width,int align) +void KviOptionsListViewItem::paintCell(TQPainter * p,const TQColorGroup & cg,int column,int width,int align) { if(m_bHighlighted) { - QColorGroup tmp(cg); - tmp.setColor(QColorGroup::Base,Qt::red); - tmp.setColor(QColorGroup::Background,Qt::red); - tmp.setColor(QColorGroup::Text,Qt::yellow); + TQColorGroup tmp(cg); + tmp.setColor(TQColorGroup::Base,TQt::red); + tmp.setColor(TQColorGroup::Background,TQt::red); + tmp.setColor(TQColorGroup::Text,TQt::yellow); KviTalListViewItem::paintCell(p,tmp,column,width,align); } else { KviTalListViewItem::paintCell(p,cg,column,width,align); @@ -117,44 +117,44 @@ void KviOptionsListViewItem::paintCell(QPainter * p,const QColorGroup & cg,int c } -KviOptionsDialog::KviOptionsDialog(QWidget * par,const QString &szGroup) -: QDialog(par,"general_options_dialog") +KviOptionsDialog::KviOptionsDialog(TQWidget * par,const TQString &szGroup) +: TQDialog(par,"general_options_dialog") { setIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_KVIRC))); m_szGroup = szGroup; - QString szDialogTitle; + TQString szDialogTitle; - if(szGroup.isEmpty() || KviQString::equalCI(szGroup,"general")) + if(szGroup.isEmpty() || KviTQString::equalCI(szGroup,"general")) { szDialogTitle = __tr2qs_ctx("General Preferences","options"); - } else if(KviQString::equalCI(szGroup,"theme")) + } else if(KviTQString::equalCI(szGroup,"theme")) { szDialogTitle = __tr2qs_ctx("Theme Preferences","options"); } else { szDialogTitle = __tr2qs_ctx("KVIrc Preferences","options"); } - QString szDialog = __tr2qs_ctx("This dialog contains a set of KVIrc settings.
Use the icons " \ + TQString szDialog = __tr2qs_ctx("This dialog contains a set of KVIrc settings.
Use the icons " \ "on the left to navigate through the option pages. The text box in the " \ "bottom left corner is a small search engine. It will highlight the " \ "pages that contain options related to the search term you have entered.","options"); - QString szInfoTips; + TQString szInfoTips; #ifdef COMPILE_INFO_TIPS szInfoTips = __tr2qs_ctx("Many settings have tooltips that can be shown by holding " \ "the cursor over their label for a few seconds.","options"); #else szInfoTips = ""; #endif - QString szOkCancelButtons = __tr2qs_ctx("When you have finished, click \"OK\" to accept your changes " \ + TQString szOkCancelButtons = __tr2qs_ctx("When you have finished, click \"OK\" to accept your changes " \ "or \"Cancel\" to discard them. Clicking \"Apply\" will commit your " \ "changes without closing the window.","options"); - QString szFrontText = QString( + TQString szFrontText = TQString( "" \ "" \ "" \ "" \ "
" \ @@ -179,13 +179,13 @@ KviOptionsDialog::KviOptionsDialog(QWidget * par,const QString &szGroup) "
" - ).arg(szDialogTitle).arg(szDialog).arg(szInfoTips).arg(szOkCancelButtons); + ).tqarg(szDialogTitle).tqarg(szDialog).tqarg(szInfoTips).tqarg(szOkCancelButtons); - QString szCaption = szDialogTitle + " - KVIrc"; + TQString szCaption = szDialogTitle + " - KVIrc"; setCaption(szCaption); - QGridLayout * g1 = new QGridLayout(this,2,5,8,8); - QSplitter * spl = new QSplitter(Qt::Horizontal,this); + TQGridLayout * g1 = new TQGridLayout(this,2,5,8,8); + TQSplitter * spl = new TQSplitter(Qt::Horizontal,this); g1->addMultiCellWidget(spl,0,0,0,4); @@ -199,22 +199,22 @@ KviOptionsDialog::KviOptionsDialog(QWidget * par,const QString &szGroup) m_pListView->header()->hide(); m_pListView->setRootIsDecorated(true); m_pListView->setSorting(-1); - connect(m_pListView,SIGNAL(selectionChanged(KviTalListViewItem *)),this,SLOT(listViewItemSelectionChanged(KviTalListViewItem *))); + connect(m_pListView,TQT_SIGNAL(selectionChanged(KviTalListViewItem *)),this,TQT_SLOT(listViewItemSelectionChanged(KviTalListViewItem *))); KviTalHBox * hbox = new KviTalHBox(vbox); vbox->setSpacing(2); vbox->setMargin(0); - m_pSearchLineEdit = new QLineEdit(hbox); - connect(m_pSearchLineEdit,SIGNAL(returnPressed()),this,SLOT(searchClicked())); + m_pSearchLineEdit = new TQLineEdit(hbox); + connect(m_pSearchLineEdit,TQT_SIGNAL(returnPressed()),this,TQT_SLOT(searchClicked())); m_pSearchButton = new KviStyledToolButton(hbox); m_pSearchButton->setUsesBigPixmap(false); m_pSearchButton->setIconSet(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_SEARCH))); - connect(m_pSearchButton,SIGNAL(clicked()),this,SLOT(searchClicked())); - connect(m_pSearchLineEdit,SIGNAL(textChanged(const QString &)),this,SLOT(searchLineEditTextChanged(const QString &))); + connect(m_pSearchButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(searchClicked())); + connect(m_pSearchLineEdit,TQT_SIGNAL(textChanged(const TQString &)),this,TQT_SLOT(searchLineEditTextChanged(const TQString &))); #ifdef COMPILE_INFO_TIPS - QString szTip = __tr2qs_ctx("

This is the search tool for this options dialog.

" \ + TQString szTip = __tr2qs_ctx("

This is the search tool for this options dialog.

" \ "

You can enter a search term either in your native " \ "language or in english and press the button on the right. " \ "The pages that contain some options related to the " \ @@ -228,11 +228,11 @@ KviOptionsDialog::KviOptionsDialog(QWidget * par,const QString &szGroup) vbox->setSpacing(2); vbox->setMargin(0); - m_pCategoryLabel = new QLabel(" ",vbox,"labgeneraloptions"); + m_pCategoryLabel = new TQLabel(" ",vbox,"labgeneraloptions"); //m_pCategoryLabel->setMargin(3); - QFrame * f = new QFrame(vbox); - f->setFrameStyle(QFrame::HLine | QFrame::Sunken); + TQFrame * f = new TQFrame(vbox); + f->setFrameStyle(TQFrame::HLine | TQFrame::Sunken); // Widget stack m_pWidgetStack = new KviTalWidgetStack(vbox); @@ -245,24 +245,24 @@ KviOptionsDialog::KviOptionsDialog(QWidget * par,const QString &szGroup) // Ok,Cancel,Help - QPushButton * b = new QPushButton(__tr2qs_ctx("&OK","options"),this,"btnok"); + TQPushButton * b = new TQPushButton(__tr2qs_ctx("&OK","options"),this,"btnok"); KviTalToolTip::add(b,__tr2qs_ctx("Close this dialog, accepting all changes.","options")); - connect(b,SIGNAL(clicked()),this,SLOT(okClicked())); + connect(b,TQT_SIGNAL(clicked()),this,TQT_SLOT(okClicked())); //b->setMinimumWidth(whatIsThisWidth); b->setIconSet(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_ACCEPT))); g1->addWidget(b,1,2); - b = new QPushButton(__tr2qs_ctx("&Apply","options"),this,"btnapply"); + b = new TQPushButton(__tr2qs_ctx("&Apply","options"),this,"btnapply"); KviTalToolTip::add(b,__tr2qs_ctx("Commit all changes immediately.","options")); - connect(b,SIGNAL(clicked()),this,SLOT(applyClicked())); + connect(b,TQT_SIGNAL(clicked()),this,TQT_SLOT(applyClicked())); b->setIconSet(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_ACCEPT))); g1->addWidget(b,1,3); - b = new QPushButton(__tr2qs_ctx("Cancel","options"),this,"btncancel"); + b = new TQPushButton(__tr2qs_ctx("Cancel","options"),this,"btncancel"); KviTalToolTip::add(b,__tr2qs_ctx("Close this dialog, discarding all changes.","options")); b->setDefault(true); //b->setMinimumWidth(whatIsThisWidth); - connect(b,SIGNAL(clicked()),this,SLOT(cancelClicked())); + connect(b,TQT_SIGNAL(clicked()),this,TQT_SLOT(cancelClicked())); b->setIconSet(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_DISCARD))); g1->addWidget(b,1,4); @@ -272,7 +272,7 @@ KviOptionsDialog::KviOptionsDialog(QWidget * par,const QString &szGroup) fillListView(0,g_pOptionsInstanceManager->instanceEntryTree(),szGroup); - if(!parent()) + if(!tqparent()) { if(KVI_OPTION_RECT(KviOption_rectGeneralOptionsDialogGeometry).y() < 5) @@ -287,26 +287,26 @@ KviOptionsDialog::KviOptionsDialog(QWidget * par,const QString &szGroup) } KviAccel *a = new KviAccel( this ); - a->connectItem( a->insertItem(Qt::Key_Escape), this,SLOT(close()) ); + a->connectItem( a->insertItem(TQt::Key_Escape), this,TQT_SLOT(close()) ); } KviOptionsDialog::~KviOptionsDialog() { - if(!parent())KVI_OPTION_RECT(KviOption_rectGeneralOptionsDialogGeometry) = QRect(pos().x(),pos().y(), + if(!tqparent())KVI_OPTION_RECT(KviOption_rectGeneralOptionsDialogGeometry) = TQRect(pos().x(),pos().y(), size().width(),size().height()); if(g_pOptionsDialogDict) g_pOptionsDialogDict->remove(m_szGroup); } -void KviOptionsDialog::searchLineEditTextChanged(const QString &) +void KviOptionsDialog::searchLineEditTextChanged(const TQString &) { - QString txt = m_pSearchLineEdit->text().stripWhiteSpace(); + TQString txt = m_pSearchLineEdit->text().stripWhiteSpace(); m_pSearchButton->setEnabled(txt.length() > 0); } -bool KviOptionsDialog::recursiveSearch(KviOptionsListViewItem * pItem,const QStringList &lKeywords) +bool KviOptionsDialog::recursiveSearch(KviOptionsListViewItem * pItem,const TQStringList &lKeywords) { //debug("recursive search:"); if(!pItem)return false; @@ -320,34 +320,34 @@ bool KviOptionsDialog::recursiveSearch(KviOptionsListViewItem * pItem,const QStr bool bFoundSomethingHere = false; KviPointerHashTable lOptionWidgetsToMark; lOptionWidgetsToMark.setAutoDelete(true); - QTabWidget * pTabWidgetToMark = 0; + TQTabWidget * pTabWidgetToMark = 0; - QObject * o; + TQObject * o; #ifdef COMPILE_USE_QT4 - QObjectList ol = pItem->m_pOptionsWidget->queryList(); + TQObjectList ol = pItem->m_pOptionsWidget->queryList(); if(ol.count() > 0) { - for(QObjectList::Iterator it = ol.begin();it != ol.end();++it) + for(TQObjectList::Iterator it = ol.begin();it != ol.end();++it) { o = *it; #else - QObjectList * ol = pItem->m_pOptionsWidget->queryList(); + TQObjectList * ol = pItem->m_pOptionsWidget->queryList(); if(ol) { - QObjectListIt it(*ol); + TQObjectListIt it(*ol); while((o = it.current())/* && (!bFoundSomethingHere)*/) { #endif - QString szText; - if(o->inherits("QLabel"))szText = ((QLabel *)o)->text(); - else if(o->inherits("QCheckBox"))szText = ((QCheckBox *)o)->text(); + TQString szText; + if(o->inherits(TQLABEL_OBJECT_NAME_STRING))szText = ((TQLabel *)o)->text(); + else if(o->inherits(TQCHECKBOX_OBJECT_NAME_STRING))szText = ((TQCheckBox *)o)->text(); else if(o->inherits("KviTalGroupBox"))szText = ((KviTalGroupBox *)o)->title(); #ifdef COMPILE_INFO_TIPS - if(o->inherits("QWidget")) + if(o->inherits(TQWIDGET_OBJECT_NAME_STRING)) #ifdef COMPILE_USE_QT4 - szText.append(((QWidget *)o)->toolTip()); + szText.append(((TQWidget *)o)->toolTip()); #else - szText.append(QToolTip::textFor((QWidget*)o)); + szText.append(TQToolTip::textFor((TQWidget*)o)); #endif #endif if(!szText.isEmpty()) @@ -356,9 +356,9 @@ bool KviOptionsDialog::recursiveSearch(KviOptionsListViewItem * pItem,const QStr for(int j=0;jinherits("QWidget")) + if(o->inherits(TQWIDGET_OBJECT_NAME_STRING)) { - QWidget* pWidget=(QWidget*)o; - QFont font = pWidget->font(); + TQWidget* pWidget=(TQWidget*)o; + TQFont font = pWidget->font(); font.setBold(bOk); font.setUnderline(bOk); pWidget->setFont(font); - // if there is a QTabWidget in the parent chain, signal it in the tab text - QObject * pParent = pWidget->parent(); + // if there is a TQTabWidget in the tqparent chain, signal it in the tab text + TQObject * pParent = pWidget->tqparent(); while(pParent) { - if(pParent->inherits("QTabWidget")) + if(pParent->inherits(TQTABWIDGET_OBJECT_NAME_STRING)) { - pTabWidgetToMark = (QTabWidget *)pParent; + pTabWidgetToMark = (TQTabWidget *)pParent; break; } - pParent = pParent->parent(); + pParent = pParent->tqparent(); } if(pTabWidgetToMark) { - // lookup the KviOptionsWidget parent - pParent = pWidget->parent(); + // lookup the KviOptionsWidget tqparent + pParent = pWidget->tqparent(); while(pParent) { if(pParent->inherits("KviOptionsWidget")) { - bool * pExistingBool = lOptionWidgetsToMark.find(pParent); + bool * pExistingBool = lOptionWidgetsToMark.tqfind(pParent); if(pExistingBool) { if(bOk) @@ -408,7 +408,7 @@ bool KviOptionsDialog::recursiveSearch(KviOptionsListViewItem * pItem,const QStr } break; } - pParent = pParent->parent(); + pParent = pParent->tqparent(); } } } @@ -429,16 +429,16 @@ bool KviOptionsDialog::recursiveSearch(KviOptionsListViewItem * pItem,const QStr while(bool * pBool = it.current()) { KviOptionsWidget * pOptionsWidget = (KviOptionsWidget *)it.currentKey(); - QString szTxt = pTabWidgetToMark->tabLabel(pOptionsWidget); - if(KviQString::equalCIN(szTxt,">>> ",4)) + TQString szTxt = pTabWidgetToMark->tabLabel(pOptionsWidget); + if(KviTQString::equalCIN(szTxt,">>> ",4)) { - szTxt.replace(">>> ",""); - szTxt.replace(" <<<",""); + szTxt.tqreplace(">>> ",""); + szTxt.tqreplace(" <<<",""); } if(*pBool) { szTxt.insert(0,">>> "); - szTxt += QString(" <<<"); + szTxt += TQString(" <<<"); } pTabWidgetToMark->setTabLabel(pOptionsWidget,szTxt); ++it; @@ -460,7 +460,7 @@ bool KviOptionsDialog::recursiveSearch(KviOptionsListViewItem * pItem,const QStr return (bFoundSomethingInside || bFoundSomethingHere); } -void KviOptionsDialog::search(const QStringList &lKeywords) +void KviOptionsDialog::search(const TQStringList &lKeywords) { m_pListView->setUpdatesEnabled(false); @@ -475,20 +475,20 @@ void KviOptionsDialog::search(const QStringList &lKeywords) m_pListView->triggerUpdate(); } -void KviOptionsDialog::search(const QString &szKeywords) +void KviOptionsDialog::search(const TQString &szKeywords) { - QStringList lKeywords = QStringList::split(" ",szKeywords,false); + TQStringList lKeywords = TQStringList::split(" ",szKeywords,false); search(lKeywords); } void KviOptionsDialog::searchClicked() { - QString szTxt = m_pSearchLineEdit->text().stripWhiteSpace(); + TQString szTxt = m_pSearchLineEdit->text().stripWhiteSpace(); if(!szTxt.isEmpty()) search(szTxt); } -void KviOptionsDialog::fillListView(KviTalListViewItem * p,KviPointerList * l,const QString &szGroup,bool bNotContainedOnly) +void KviOptionsDialog::fillListView(KviTalListViewItem * p,KviPointerList * l,const TQString &szGroup,bool bNotContainedOnly) { if(!l)return; @@ -503,7 +503,7 @@ void KviOptionsDialog::fillListView(KviTalListViewItem * p,KviPointerListbDoInsert = KviQString::equalCI(szGroup,e->szGroup) && ((!bNotContainedOnly) || e->bIsContainer || e->bIsNotContained); + e->bDoInsert = KviTQString::equalCI(szGroup,e->szGroup) && ((!bNotContainedOnly) || e->bIsContainer || e->bIsNotContained); KviOptionsWidgetInstanceEntry * ee = tmp.first(); int idx = 0; while(ee) @@ -534,10 +534,10 @@ void KviOptionsDialog::fillListView(KviTalListViewItem * p,KviPointerListbIsContainer) { - // it's a container: add only eventual not contained children (containers or explicitly marked as not contained) + // it's a container: add only eventual not contained tqchildren (containers or explicitly marked as not contained) fillListView(it,e->pChildList,szGroup,true); } else { - // it's not a container, add any children + // it's not a container, add any tqchildren fillListView(it,e->pChildList,szGroup,false); } } @@ -548,14 +548,14 @@ void KviOptionsDialog::listViewItemSelectionChanged(KviTalListViewItem *it) { if(it) { - QString str = it->text(0); - KviTalListViewItem * par = it->parent(); + TQString str = it->text(0); + KviTalListViewItem * par = it->tqparent(); while(par) { str.prepend(" :: "); str.prepend(par->text(0)); - par = par->parent(); + par = par->tqparent(); } str.prepend(""); str += ""; @@ -578,7 +578,7 @@ KviOptionsListViewItem * KviOptionsDialog::findItemByPage(KviOptionsListViewItem if(it->m_pOptionsWidget == pPage)return it; KviOptionsListViewItem *i; - // run through the children + // run through the tqchildren i = (KviOptionsListViewItem *)(it->firstChild()); if(i) { @@ -586,7 +586,7 @@ KviOptionsListViewItem * KviOptionsDialog::findItemByPage(KviOptionsListViewItem if(i)return i; } - // not found in the children tree.. look in the next sibling + // not found in the tqchildren tree.. look in the next sibling i = (KviOptionsListViewItem *)(it->nextSibling()); if(i) { @@ -639,7 +639,7 @@ void KviOptionsDialog::cancelClicked() delete this; } -void KviOptionsDialog::closeEvent(QCloseEvent *e) +void KviOptionsDialog::closeEvent(TQCloseEvent *e) { e->ignore(); delete this; @@ -647,7 +647,7 @@ void KviOptionsDialog::closeEvent(QCloseEvent *e) void KviOptionsDialog::recursiveCommit(KviOptionsListViewItem *it) { - // First commit the children + // First commit the tqchildren if(!it) return; KviOptionsListViewItem *it2 = (KviOptionsListViewItem *)it->firstChild(); while(it2) @@ -655,7 +655,7 @@ void KviOptionsDialog::recursiveCommit(KviOptionsListViewItem *it) recursiveCommit(it2); it2 = (KviOptionsListViewItem *)it2->nextSibling(); } - // then the parents + // then the tqparents if(it->m_pOptionsWidget) { it->m_pOptionsWidget->commit(); @@ -664,9 +664,9 @@ void KviOptionsDialog::recursiveCommit(KviOptionsListViewItem *it) } //refreshListView(); // <-- this tends to jump into infinite recursion } -void KviOptionsDialog::keyPressEvent( QKeyEvent * e ) +void KviOptionsDialog::keyPressEvent( TQKeyEvent * e ) { - if(e->key()==Qt::Key_Return) + if(e->key()==TQt::Key_Return) e->accept(); else e->ignore(); diff --git a/src/modules/options/dialog.h b/src/modules/options/dialog.h index b342ca51..267c5529 100644 --- a/src/modules/options/dialog.h +++ b/src/modules/options/dialog.h @@ -26,32 +26,33 @@ //============================================================================= -#include +#include #include "kvi_tal_listview.h" -#include +#include #include "kvi_optionswidget.h" #include "instances.h" -class QLabel; +class TQLabel; class KviTalWidgetStack; -class QPushButton; -class QLineEdit; -class QToolButton; +class TQPushButton; +class TQLineEdit; +class TQToolButton; class KviGeneralOptionsFrontWidget : public KviOptionsWidget { Q_OBJECT + TQ_OBJECT public: - KviGeneralOptionsFrontWidget(QWidget *parent,const QString &szText); + KviGeneralOptionsFrontWidget(TQWidget *tqparent,const TQString &szText); ~KviGeneralOptionsFrontWidget(); }; class KviOptionsListViewItem : public KviTalListViewItem { public: - KviOptionsListViewItem(KviTalListView *parent,KviOptionsWidgetInstanceEntry * e); - KviOptionsListViewItem(KviTalListViewItem *parent,KviOptionsWidgetInstanceEntry * e); + KviOptionsListViewItem(KviTalListView *tqparent,KviOptionsWidgetInstanceEntry * e); + KviOptionsListViewItem(KviTalListViewItem *tqparent,KviOptionsWidgetInstanceEntry * e); ~KviOptionsListViewItem(); public: KviOptionsWidgetInstanceEntry * m_pInstanceEntry; @@ -60,26 +61,27 @@ public: public: void setHighlighted(bool b){ m_bHighlighted = b; }; protected: - virtual void paintCell(QPainter * p,const QColorGroup & cg,int column,int width,int align); + virtual void paintCell(TQPainter * p,const TQColorGroup & cg,int column,int width,int align); }; -class KviOptionsDialog : public QDialog +class KviOptionsDialog : public TQDialog { Q_OBJECT + TQ_OBJECT public: - KviOptionsDialog(QWidget * par,const QString &szGroup); + KviOptionsDialog(TQWidget * par,const TQString &szGroup); ~KviOptionsDialog(); private: KviTalListView * m_pListView; - QLabel * m_pCategoryLabel; + TQLabel * m_pCategoryLabel; KviTalWidgetStack * m_pWidgetStack; KviGeneralOptionsFrontWidget* m_pFrontWidget; - QString m_szGroup; - QLineEdit * m_pSearchLineEdit; - QToolButton * m_pSearchButton; + TQString m_szGroup; + TQLineEdit * m_pSearchLineEdit; + TQToolButton * m_pSearchButton; private: void recursiveCommit(KviOptionsListViewItem *it); - void fillListView(KviTalListViewItem * p,KviPointerList * l,const QString &szGroup,bool bNotContainedOnly = false); + void fillListView(KviTalListViewItem * p,KviPointerList * l,const TQString &szGroup,bool bNotContainedOnly = false); //KviOptionsListViewItem * showHiddenChildren(KviTalListViewItem * p,KviPointerList * l); KviOptionsListViewItem * findItemByPage(KviOptionsListViewItem *it,KviOptionsWidget * pPage); private slots: @@ -89,15 +91,15 @@ private slots: void cancelClicked(); void pageWantsToSwitchToAdvancedPage(KviOptionsWidget * pPage); void searchClicked(); - void searchLineEditTextChanged(const QString &); + void searchLineEditTextChanged(const TQString &); protected: void apply(bool bDialogAboutToClose); - virtual void closeEvent(QCloseEvent *e); - virtual void keyPressEvent( QKeyEvent * e ); - bool recursiveSearch(KviOptionsListViewItem * pItem,const QStringList &lKeywords); + virtual void closeEvent(TQCloseEvent *e); + virtual void keyPressEvent( TQKeyEvent * e ); + bool recursiveSearch(KviOptionsListViewItem * pItem,const TQStringList &lKeywords); public: - void search(const QString &szKeywords); - void search(const QStringList &lKeywords); + void search(const TQString &szKeywords); + void search(const TQStringList &lKeywords); }; diff --git a/src/modules/options/instances.cpp b/src/modules/options/instances.cpp index aa23e7be..c338f4a3 100644 --- a/src/modules/options/instances.cpp +++ b/src/modules/options/instances.cpp @@ -76,409 +76,409 @@ int g_iOptionWidgetInstances = 0; -KviOptionsWidget * classKviAntispamOptionsWidget_createInstanceProc(QWidget * parent) +KviOptionsWidget * classKviAntispamOptionsWidget_createInstanceProc(TQWidget * tqparent) { - return new KviAntispamOptionsWidget(parent); + return new KviAntispamOptionsWidget(tqparent); } -KviOptionsWidget * classKviAvatarAdvancedOptionsWidget_createInstanceProc(QWidget * parent) +KviOptionsWidget * classKviAvatarAdvancedOptionsWidget_createInstanceProc(TQWidget * tqparent) { - return new KviAvatarAdvancedOptionsWidget(parent); + return new KviAvatarAdvancedOptionsWidget(tqparent); } -KviOptionsWidget * classKviAwayOptionsWidget_createInstanceProc(QWidget * parent) +KviOptionsWidget * classKviAwayOptionsWidget_createInstanceProc(TQWidget * tqparent) { - return new KviAwayOptionsWidget(parent); + return new KviAwayOptionsWidget(tqparent); } -KviOptionsWidget * classKviConnectionOptionsWidget_createInstanceProc(QWidget * parent) +KviOptionsWidget * classKviConnectionOptionsWidget_createInstanceProc(TQWidget * tqparent) { - return new KviConnectionOptionsWidget(parent); + return new KviConnectionOptionsWidget(tqparent); } -KviOptionsWidget * classKviConnectionAdvancedOptionsWidget_createInstanceProc(QWidget * parent) +KviOptionsWidget * classKviConnectionAdvancedOptionsWidget_createInstanceProc(TQWidget * tqparent) { - return new KviConnectionAdvancedOptionsWidget(parent); + return new KviConnectionAdvancedOptionsWidget(tqparent); } -KviOptionsWidget * classKviSSLOptionsWidget_createInstanceProc(QWidget * parent) +KviOptionsWidget * classKviSSLOptionsWidget_createInstanceProc(TQWidget * tqparent) { - return new KviSSLOptionsWidget(parent); + return new KviSSLOptionsWidget(tqparent); } -KviOptionsWidget * classKviTransportOptionsWidget_createInstanceProc(QWidget * parent) +KviOptionsWidget * classKviTransportOptionsWidget_createInstanceProc(TQWidget * tqparent) { - return new KviTransportOptionsWidget(parent); + return new KviTransportOptionsWidget(tqparent); } -KviOptionsWidget * classKviIdentOptionsWidget_createInstanceProc(QWidget * parent) +KviOptionsWidget * classKviIdentOptionsWidget_createInstanceProc(TQWidget * tqparent) { - return new KviIdentOptionsWidget(parent); + return new KviIdentOptionsWidget(tqparent); } -KviOptionsWidget * classKviCtcpOptionsWidget_createInstanceProc(QWidget * parent) +KviOptionsWidget * classKviCtcpOptionsWidget_createInstanceProc(TQWidget * tqparent) { - return new KviCtcpOptionsWidget(parent); + return new KviCtcpOptionsWidget(tqparent); } -KviOptionsWidget * classKviCtcpFloodProtectionOptionsWidget_createInstanceProc(QWidget * parent) +KviOptionsWidget * classKviCtcpFloodProtectionOptionsWidget_createInstanceProc(TQWidget * tqparent) { - return new KviCtcpFloodProtectionOptionsWidget(parent); + return new KviCtcpFloodProtectionOptionsWidget(tqparent); } -KviOptionsWidget * classKviDccOptionsWidget_createInstanceProc(QWidget * parent) +KviOptionsWidget * classKviDccOptionsWidget_createInstanceProc(TQWidget * tqparent) { - return new KviDccOptionsWidget(parent); + return new KviDccOptionsWidget(tqparent); } -KviOptionsWidget * classKviDccGeneralOptionsWidget_createInstanceProc(QWidget * parent) +KviOptionsWidget * classKviDccGeneralOptionsWidget_createInstanceProc(TQWidget * tqparent) { - return new KviDccGeneralOptionsWidget(parent); + return new KviDccGeneralOptionsWidget(tqparent); } -KviOptionsWidget * classKviDccAdvancedOptionsWidget_createInstanceProc(QWidget * parent) +KviOptionsWidget * classKviDccAdvancedOptionsWidget_createInstanceProc(TQWidget * tqparent) { - return new KviDccAdvancedOptionsWidget(parent); + return new KviDccAdvancedOptionsWidget(tqparent); } -KviOptionsWidget * classKviDccSendOptionsWidget_createInstanceProc(QWidget * parent) +KviOptionsWidget * classKviDccSendOptionsWidget_createInstanceProc(TQWidget * tqparent) { - return new KviDccSendOptionsWidget(parent); + return new KviDccSendOptionsWidget(tqparent); } -KviOptionsWidget * classKviDccSendGeneralOptionsWidget_createInstanceProc(QWidget * parent) +KviOptionsWidget * classKviDccSendGeneralOptionsWidget_createInstanceProc(TQWidget * tqparent) { - return new KviDccSendGeneralOptionsWidget(parent); + return new KviDccSendGeneralOptionsWidget(tqparent); } -KviOptionsWidget * classKviDccSendAdvancedOptionsWidget_createInstanceProc(QWidget * parent) +KviOptionsWidget * classKviDccSendAdvancedOptionsWidget_createInstanceProc(TQWidget * tqparent) { - return new KviDccSendAdvancedOptionsWidget(parent); + return new KviDccSendAdvancedOptionsWidget(tqparent); } -KviOptionsWidget * classKviDccChatOptionsWidget_createInstanceProc(QWidget * parent) +KviOptionsWidget * classKviDccChatOptionsWidget_createInstanceProc(TQWidget * tqparent) { - return new KviDccChatOptionsWidget(parent); + return new KviDccChatOptionsWidget(tqparent); } -KviOptionsWidget * classKviDccVoiceOptionsWidget_createInstanceProc(QWidget * parent) +KviOptionsWidget * classKviDccVoiceOptionsWidget_createInstanceProc(TQWidget * tqparent) { - return new KviDccVoiceOptionsWidget(parent); + return new KviDccVoiceOptionsWidget(tqparent); } -KviOptionsWidget * classKviGeneralOptOptionsWidget_createInstanceProc(QWidget * parent) +KviOptionsWidget * classKviGeneralOptOptionsWidget_createInstanceProc(TQWidget * tqparent) { - return new KviGeneralOptOptionsWidget(parent); + return new KviGeneralOptOptionsWidget(tqparent); } -KviOptionsWidget * classKviAlertHighlightingOptionsWidget_createInstanceProc(QWidget * parent) +KviOptionsWidget * classKviAlertHighlightingOptionsWidget_createInstanceProc(TQWidget * tqparent) { - return new KviAlertHighlightingOptionsWidget(parent); + return new KviAlertHighlightingOptionsWidget(tqparent); } -KviOptionsWidget * classKviHighlightingOptionsWidget_createInstanceProc(QWidget * parent) +KviOptionsWidget * classKviHighlightingOptionsWidget_createInstanceProc(TQWidget * tqparent) { - return new KviHighlightingOptionsWidget(parent); + return new KviHighlightingOptionsWidget(tqparent); } -KviOptionsWidget * classKviAlertOptionsWidget_createInstanceProc(QWidget * parent) +KviOptionsWidget * classKviAlertOptionsWidget_createInstanceProc(TQWidget * tqparent) { - return new KviAlertOptionsWidget(parent); + return new KviAlertOptionsWidget(tqparent); } -KviOptionsWidget * classKviIdentityOptionsWidget_createInstanceProc(QWidget * parent) +KviOptionsWidget * classKviIdentityOptionsWidget_createInstanceProc(TQWidget * tqparent) { - return new KviIdentityOptionsWidget(parent); + return new KviIdentityOptionsWidget(tqparent); } -KviOptionsWidget * classKviIdentityGeneralOptionsWidget_createInstanceProc(QWidget * parent) +KviOptionsWidget * classKviIdentityGeneralOptionsWidget_createInstanceProc(TQWidget * tqparent) { - return new KviIdentityGeneralOptionsWidget(parent); + return new KviIdentityGeneralOptionsWidget(tqparent); } -KviOptionsWidget * classKviIdentityAvatarOptionsWidget_createInstanceProc(QWidget * parent) +KviOptionsWidget * classKviIdentityAvatarOptionsWidget_createInstanceProc(TQWidget * tqparent) { - return new KviIdentityAvatarOptionsWidget(parent); + return new KviIdentityAvatarOptionsWidget(tqparent); } -KviOptionsWidget * classKviIdentityAdvancedOptionsWidget_createInstanceProc(QWidget * parent) +KviOptionsWidget * classKviIdentityAdvancedOptionsWidget_createInstanceProc(TQWidget * tqparent) { - return new KviIdentityAdvancedOptionsWidget(parent); + return new KviIdentityAdvancedOptionsWidget(tqparent); } -KviOptionsWidget * classKviIgnoreOptionsWidget_createInstanceProc(QWidget * parent) +KviOptionsWidget * classKviIgnoreOptionsWidget_createInstanceProc(TQWidget * tqparent) { - return new KviIgnoreOptionsWidget(parent); + return new KviIgnoreOptionsWidget(tqparent); } -KviOptionsWidget * classKviInputLookOptionsWidget_createInstanceProc(QWidget * parent) +KviOptionsWidget * classKviInputLookOptionsWidget_createInstanceProc(TQWidget * tqparent) { - return new KviInputLookOptionsWidget(parent); + return new KviInputLookOptionsWidget(tqparent); } -KviOptionsWidget * classKviInputFeaturesOptionsWidget_createInstanceProc(QWidget * parent) +KviOptionsWidget * classKviInputFeaturesOptionsWidget_createInstanceProc(TQWidget * tqparent) { - return new KviInputFeaturesOptionsWidget(parent); + return new KviInputFeaturesOptionsWidget(tqparent); } -KviOptionsWidget * classKviInterfaceFeaturesOptionsWidget_createInstanceProc(QWidget * parent) +KviOptionsWidget * classKviInterfaceFeaturesOptionsWidget_createInstanceProc(TQWidget * tqparent) { - return new KviInterfaceFeaturesOptionsWidget(parent); + return new KviInterfaceFeaturesOptionsWidget(tqparent); } -KviOptionsWidget * classKviThemeGeneralOptionsWidget_createInstanceProc(QWidget * parent) +KviOptionsWidget * classKviThemeGeneralOptionsWidget_createInstanceProc(TQWidget * tqparent) { - return new KviThemeGeneralOptionsWidget(parent); + return new KviThemeGeneralOptionsWidget(tqparent); } -KviOptionsWidget * classKviThemeTransparencyOptionsWidget_createInstanceProc(QWidget * parent) +KviOptionsWidget * classKviThemeTransparencyOptionsWidget_createInstanceProc(TQWidget * tqparent) { - return new KviThemeTransparencyOptionsWidget(parent); + return new KviThemeTransparencyOptionsWidget(tqparent); } -KviOptionsWidget * classKviThemeMdiCaptionsOptionsWidget_createInstanceProc(QWidget * parent) +KviOptionsWidget * classKviThemeMdiCaptionsOptionsWidget_createInstanceProc(TQWidget * tqparent) { - return new KviThemeMdiCaptionsOptionsWidget(parent); + return new KviThemeMdiCaptionsOptionsWidget(tqparent); } -KviOptionsWidget * classKviThemeMdiAreaOptionsWidget_createInstanceProc(QWidget * parent) +KviOptionsWidget * classKviThemeMdiAreaOptionsWidget_createInstanceProc(TQWidget * tqparent) { - return new KviThemeMdiAreaOptionsWidget(parent); + return new KviThemeMdiAreaOptionsWidget(tqparent); } -KviOptionsWidget * classKviThemeToolBarAppletsOptionsWidget_createInstanceProc(QWidget * parent) +KviOptionsWidget * classKviThemeToolBarAppletsOptionsWidget_createInstanceProc(TQWidget * tqparent) { - return new KviThemeToolBarAppletsOptionsWidget(parent); + return new KviThemeToolBarAppletsOptionsWidget(tqparent); } -KviOptionsWidget * classKviIrcOptionsWidget_createInstanceProc(QWidget * parent) +KviOptionsWidget * classKviIrcOptionsWidget_createInstanceProc(TQWidget * tqparent) { - return new KviIrcOptionsWidget(parent); + return new KviIrcOptionsWidget(tqparent); } -KviOptionsWidget * classKviIrcGeneralOptionsWidget_createInstanceProc(QWidget * parent) +KviOptionsWidget * classKviIrcGeneralOptionsWidget_createInstanceProc(TQWidget * tqparent) { - return new KviIrcGeneralOptionsWidget(parent); + return new KviIrcGeneralOptionsWidget(tqparent); } -KviOptionsWidget * classKviIrcAdvancedOptionsWidget_createInstanceProc(QWidget * parent) +KviOptionsWidget * classKviIrcAdvancedOptionsWidget_createInstanceProc(TQWidget * tqparent) { - return new KviIrcAdvancedOptionsWidget(parent); + return new KviIrcAdvancedOptionsWidget(tqparent); } -KviOptionsWidget * classKviChannelOptionsWidget_createInstanceProc(QWidget * parent) +KviOptionsWidget * classKviChannelOptionsWidget_createInstanceProc(TQWidget * tqparent) { - return new KviChannelOptionsWidget(parent); + return new KviChannelOptionsWidget(tqparent); } -KviOptionsWidget * classKviChannelGeneralOptionsWidget_createInstanceProc(QWidget * parent) +KviOptionsWidget * classKviChannelGeneralOptionsWidget_createInstanceProc(TQWidget * tqparent) { - return new KviChannelGeneralOptionsWidget(parent); + return new KviChannelGeneralOptionsWidget(tqparent); } -KviOptionsWidget * classKviChannelAdvancedOptionsWidget_createInstanceProc(QWidget * parent) +KviOptionsWidget * classKviChannelAdvancedOptionsWidget_createInstanceProc(TQWidget * tqparent) { - return new KviChannelAdvancedOptionsWidget(parent); + return new KviChannelAdvancedOptionsWidget(tqparent); } -KviOptionsWidget * classKviIrcOutputOptionsWidget_createInstanceProc(QWidget * parent) +KviOptionsWidget * classKviIrcOutputOptionsWidget_createInstanceProc(TQWidget * tqparent) { - return new KviIrcOutputOptionsWidget(parent); + return new KviIrcOutputOptionsWidget(tqparent); } -KviOptionsWidget * classKviIrcViewThemeOptionsWidget_createInstanceProc(QWidget * parent) +KviOptionsWidget * classKviIrcViewThemeOptionsWidget_createInstanceProc(TQWidget * tqparent) { - return new KviIrcViewThemeOptionsWidget(parent); + return new KviIrcViewThemeOptionsWidget(tqparent); } -KviOptionsWidget * classKviIrcViewLookOptionsWidget_createInstanceProc(QWidget * parent) +KviOptionsWidget * classKviIrcViewLookOptionsWidget_createInstanceProc(TQWidget * tqparent) { - return new KviIrcViewLookOptionsWidget(parent); + return new KviIrcViewLookOptionsWidget(tqparent); } -KviOptionsWidget * classKviIrcViewFeaturesOptionsWidget_createInstanceProc(QWidget * parent) +KviOptionsWidget * classKviIrcViewFeaturesOptionsWidget_createInstanceProc(TQWidget * tqparent) { - return new KviIrcViewFeaturesOptionsWidget(parent); + return new KviIrcViewFeaturesOptionsWidget(tqparent); } -KviOptionsWidget * classKviLagOptionsWidget_createInstanceProc(QWidget * parent) +KviOptionsWidget * classKviLagOptionsWidget_createInstanceProc(TQWidget * tqparent) { - return new KviLagOptionsWidget(parent); + return new KviLagOptionsWidget(tqparent); } -KviOptionsWidget * classKviLoggingOptionsWidget_createInstanceProc(QWidget * parent) +KviOptionsWidget * classKviLoggingOptionsWidget_createInstanceProc(TQWidget * tqparent) { - return new KviLoggingOptionsWidget(parent); + return new KviLoggingOptionsWidget(tqparent); } -KviOptionsWidget * classKviMediaTypesOptionsWidget_createInstanceProc(QWidget * parent) +KviOptionsWidget * classKviMediaTypesOptionsWidget_createInstanceProc(TQWidget * tqparent) { - return new KviMediaTypesOptionsWidget(parent); + return new KviMediaTypesOptionsWidget(tqparent); } -KviOptionsWidget * classKviMessageOptionsWidget_createInstanceProc(QWidget * parent) +KviOptionsWidget * classKviMessageOptionsWidget_createInstanceProc(TQWidget * tqparent) { - return new KviMessageOptionsWidget(parent); + return new KviMessageOptionsWidget(tqparent); } -KviOptionsWidget * classKviPrivmsgOptionsWidget_createInstanceProc(QWidget * parent) +KviOptionsWidget * classKviPrivmsgOptionsWidget_createInstanceProc(TQWidget * tqparent) { - return new KviPrivmsgOptionsWidget(parent); + return new KviPrivmsgOptionsWidget(tqparent); } -KviOptionsWidget * classKviTimestampOptionsWidget_createInstanceProc(QWidget * parent) +KviOptionsWidget * classKviTimestampOptionsWidget_createInstanceProc(TQWidget * tqparent) { - return new KviTimestampOptionsWidget(parent); + return new KviTimestampOptionsWidget(tqparent); } -KviOptionsWidget * classKviMessageColorsOptionsWidget_createInstanceProc(QWidget * parent) +KviOptionsWidget * classKviMessageColorsOptionsWidget_createInstanceProc(TQWidget * tqparent) { - return new KviMessageColorsOptionsWidget(parent); + return new KviMessageColorsOptionsWidget(tqparent); } -KviOptionsWidget * classKviStandardColorsOptionsWidget_createInstanceProc(QWidget * parent) +KviOptionsWidget * classKviStandardColorsOptionsWidget_createInstanceProc(TQWidget * tqparent) { - return new KviStandardColorsOptionsWidget(parent); + return new KviStandardColorsOptionsWidget(tqparent); } -KviOptionsWidget * classKviNickServOptionsWidget_createInstanceProc(QWidget * parent) +KviOptionsWidget * classKviNickServOptionsWidget_createInstanceProc(TQWidget * tqparent) { - return new KviNickServOptionsWidget(parent); + return new KviNickServOptionsWidget(tqparent); } -KviOptionsWidget * classKviNotifyOptionsWidget_createInstanceProc(QWidget * parent) +KviOptionsWidget * classKviNotifyOptionsWidget_createInstanceProc(TQWidget * tqparent) { - return new KviNotifyOptionsWidget(parent); + return new KviNotifyOptionsWidget(tqparent); } -KviOptionsWidget * classKviNotifierOptionsWidget_createInstanceProc(QWidget * parent) +KviOptionsWidget * classKviNotifierOptionsWidget_createInstanceProc(TQWidget * tqparent) { - return new KviNotifierOptionsWidget(parent); + return new KviNotifierOptionsWidget(tqparent); } -KviOptionsWidget * classKviProtectionOptionsWidget_createInstanceProc(QWidget * parent) +KviOptionsWidget * classKviProtectionOptionsWidget_createInstanceProc(TQWidget * tqparent) { - return new KviProtectionOptionsWidget(parent); + return new KviProtectionOptionsWidget(tqparent); } -KviOptionsWidget * classKviProxyOptionsWidget_createInstanceProc(QWidget * parent) +KviOptionsWidget * classKviProxyOptionsWidget_createInstanceProc(TQWidget * tqparent) { - return new KviProxyOptionsWidget(parent); + return new KviProxyOptionsWidget(tqparent); } -KviOptionsWidget * classKviQueryOptionsWidget_createInstanceProc(QWidget * parent) +KviOptionsWidget * classKviQueryOptionsWidget_createInstanceProc(TQWidget * tqparent) { - return new KviQueryOptionsWidget(parent); + return new KviQueryOptionsWidget(tqparent); } -KviOptionsWidget * classKviServerOptionsWidget_createInstanceProc(QWidget * parent) +KviOptionsWidget * classKviServerOptionsWidget_createInstanceProc(TQWidget * tqparent) { - return new KviServerOptionsWidget(parent); + return new KviServerOptionsWidget(tqparent); } -KviOptionsWidget * classKviSoundOptionsWidget_createInstanceProc(QWidget * parent) +KviOptionsWidget * classKviSoundOptionsWidget_createInstanceProc(TQWidget * tqparent) { - return new KviSoundOptionsWidget(parent); + return new KviSoundOptionsWidget(tqparent); } -KviOptionsWidget * classKviSoundGeneralOptionsWidget_createInstanceProc(QWidget * parent) +KviOptionsWidget * classKviSoundGeneralOptionsWidget_createInstanceProc(TQWidget * tqparent) { - return new KviSoundGeneralOptionsWidget(parent); + return new KviSoundGeneralOptionsWidget(tqparent); } -KviOptionsWidget * classKviSoundsOptionsWidget_createInstanceProc(QWidget * parent) +KviOptionsWidget * classKviSoundsOptionsWidget_createInstanceProc(TQWidget * tqparent) { - return new KviSoundsOptionsWidget(parent); + return new KviSoundsOptionsWidget(tqparent); } -KviOptionsWidget * classKviTaskBarOptionsWidget_createInstanceProc(QWidget * parent) +KviOptionsWidget * classKviTaskBarOptionsWidget_createInstanceProc(TQWidget * tqparent) { - return new KviTaskBarOptionsWidget(parent); + return new KviTaskBarOptionsWidget(tqparent); } -KviOptionsWidget * classKviTreeTaskBarOptionsWidget_createInstanceProc(QWidget * parent) +KviOptionsWidget * classKviTreeTaskBarOptionsWidget_createInstanceProc(TQWidget * tqparent) { - return new KviTreeTaskBarOptionsWidget(parent); + return new KviTreeTaskBarOptionsWidget(tqparent); } -KviOptionsWidget * classKviTreeTaskBarForegroundOptionsWidget_createInstanceProc(QWidget * parent) +KviOptionsWidget * classKviTreeTaskBarForegroundOptionsWidget_createInstanceProc(TQWidget * tqparent) { - return new KviTreeTaskBarForegroundOptionsWidget(parent); + return new KviTreeTaskBarForegroundOptionsWidget(tqparent); } -KviOptionsWidget * classKviTreeTaskBarBackgroundOptionsWidget_createInstanceProc(QWidget * parent) +KviOptionsWidget * classKviTreeTaskBarBackgroundOptionsWidget_createInstanceProc(TQWidget * tqparent) { - return new KviTreeTaskBarBackgroundOptionsWidget(parent); + return new KviTreeTaskBarBackgroundOptionsWidget(tqparent); } -KviOptionsWidget * classKviTreeTaskBarFeaturesOptionsWidget_createInstanceProc(QWidget * parent) +KviOptionsWidget * classKviTreeTaskBarFeaturesOptionsWidget_createInstanceProc(TQWidget * tqparent) { - return new KviTreeTaskBarFeaturesOptionsWidget(parent); + return new KviTreeTaskBarFeaturesOptionsWidget(tqparent); } -KviOptionsWidget * classKviClassicTaskBarOptionsWidget_createInstanceProc(QWidget * parent) +KviOptionsWidget * classKviClassicTaskBarOptionsWidget_createInstanceProc(TQWidget * tqparent) { - return new KviClassicTaskBarOptionsWidget(parent); + return new KviClassicTaskBarOptionsWidget(tqparent); } -KviOptionsWidget * classKviTextEncodingOptionsWidget_createInstanceProc(QWidget * parent) +KviOptionsWidget * classKviTextEncodingOptionsWidget_createInstanceProc(TQWidget * tqparent) { - return new KviTextEncodingOptionsWidget(parent); + return new KviTextEncodingOptionsWidget(tqparent); } -KviOptionsWidget * classKviTextIconsOptionsWidget_createInstanceProc(QWidget * parent) +KviOptionsWidget * classKviTextIconsOptionsWidget_createInstanceProc(TQWidget * tqparent) { - return new KviTextIconsOptionsWidget(parent); + return new KviTextIconsOptionsWidget(tqparent); } -KviOptionsWidget * classKviToolsOptionsWidget_createInstanceProc(QWidget * parent) +KviOptionsWidget * classKviToolsOptionsWidget_createInstanceProc(TQWidget * tqparent) { - return new KviToolsOptionsWidget(parent); + return new KviToolsOptionsWidget(tqparent); } -KviOptionsWidget * classKviTopicLabelLookOptionsWidget_createInstanceProc(QWidget * parent) +KviOptionsWidget * classKviTopicLabelLookOptionsWidget_createInstanceProc(TQWidget * tqparent) { - return new KviTopicLabelLookOptionsWidget(parent); + return new KviTopicLabelLookOptionsWidget(tqparent); } -KviOptionsWidget * classKviTrayOptionsWidget_createInstanceProc(QWidget * parent) +KviOptionsWidget * classKviTrayOptionsWidget_createInstanceProc(TQWidget * tqparent) { - return new KviTrayOptionsWidget(parent); + return new KviTrayOptionsWidget(tqparent); } -KviOptionsWidget * classKviUParserOptionsWidget_createInstanceProc(QWidget * parent) +KviOptionsWidget * classKviUParserOptionsWidget_createInstanceProc(TQWidget * tqparent) { - return new KviUParserOptionsWidget(parent); + return new KviUParserOptionsWidget(tqparent); } -KviOptionsWidget * classKviUrlHandlersOptionsWidget_createInstanceProc(QWidget * parent) +KviOptionsWidget * classKviUrlHandlersOptionsWidget_createInstanceProc(TQWidget * tqparent) { - return new KviUrlHandlersOptionsWidget(parent); + return new KviUrlHandlersOptionsWidget(tqparent); } -KviOptionsWidget * classKviUserListLookOptionsWidget_createInstanceProc(QWidget * parent) +KviOptionsWidget * classKviUserListLookOptionsWidget_createInstanceProc(TQWidget * tqparent) { - return new KviUserListLookOptionsWidget(parent); + return new KviUserListLookOptionsWidget(tqparent); } -KviOptionsWidget * classKviUserListLookBackgroundOptionsWidget_createInstanceProc(QWidget * parent) +KviOptionsWidget * classKviUserListLookBackgroundOptionsWidget_createInstanceProc(TQWidget * tqparent) { - return new KviUserListLookBackgroundOptionsWidget(parent); + return new KviUserListLookBackgroundOptionsWidget(tqparent); } -KviOptionsWidget * classKviUserListLookForegroundOptionsWidget_createInstanceProc(QWidget * parent) +KviOptionsWidget * classKviUserListLookForegroundOptionsWidget_createInstanceProc(TQWidget * tqparent) { - return new KviUserListLookForegroundOptionsWidget(parent); + return new KviUserListLookForegroundOptionsWidget(tqparent); } -KviOptionsWidget * classKviUserListGridOptionsWidget_createInstanceProc(QWidget * parent) +KviOptionsWidget * classKviUserListGridOptionsWidget_createInstanceProc(TQWidget * tqparent) { - return new KviUserListGridOptionsWidget(parent); + return new KviUserListGridOptionsWidget(tqparent); } -KviOptionsWidget * classKviUserListFeaturesOptionsWidget_createInstanceProc(QWidget * parent) +KviOptionsWidget * classKviUserListFeaturesOptionsWidget_createInstanceProc(TQWidget * tqparent) { - return new KviUserListFeaturesOptionsWidget(parent); + return new KviUserListFeaturesOptionsWidget(tqparent); } @@ -647,7 +647,7 @@ static const char * g_szName_KviUserListFeaturesOptionsWidget = KVI_OPTIONS_WIDG static const char * g_szClassName_KviUserListFeaturesOptionsWidget = "KviUserListFeaturesOptionsWidget"; KviOptionsInstanceManager::KviOptionsInstanceManager() -: QObject(0) +: TQObject(0) { //debug("Instantiating"); @@ -3460,10 +3460,10 @@ void KviOptionsInstanceManager::deleteInstanceTree(KviPointerListpWidget) { - if(e->pWidget->parent()->inherits("KviOptionsWidgetContainer")) + if(e->pWidget->tqparent()->inherits("KviOptionsWidgetContainer")) { - disconnect(e->pWidget,SIGNAL(destroyed()),this,SLOT(widgetDestroyed())); - delete e->pWidget->parent(); + disconnect(e->pWidget,TQT_SIGNAL(destroyed()),this,TQT_SLOT(widgetDestroyed())); + delete e->pWidget->tqparent(); e->pWidget = 0; } else { debug("Ops...i have deleted the options dialog ?"); @@ -3489,25 +3489,25 @@ void KviOptionsInstanceManager::cleanup(KviModule * m) void KviOptionsInstanceManager::widgetDestroyed() { - KviOptionsWidgetInstanceEntry * e = findInstanceEntry(sender(),m_pInstanceTree); + KviOptionsWidgetInstanceEntry * e = findInstanceEntry(TQT_TQOBJECT(const_cast(sender())),m_pInstanceTree); if(e)e->pWidget = 0; if(g_iOptionWidgetInstances > 0)g_iOptionWidgetInstances--; } -KviOptionsWidget * KviOptionsInstanceManager::getInstance(KviOptionsWidgetInstanceEntry * e,QWidget * par) +KviOptionsWidget * KviOptionsInstanceManager::getInstance(KviOptionsWidgetInstanceEntry * e,TQWidget * par) { if(!e)return 0; if(!(e->pWidget)) { e->pWidget = e->createProc(par); g_iOptionWidgetInstances++; - connect(e->pWidget,SIGNAL(destroyed()),this,SLOT(widgetDestroyed())); + connect(e->pWidget,TQT_SIGNAL(destroyed()),this,TQT_SLOT(widgetDestroyed())); } - if(e->pWidget->parent() != par) + if(TQT_BASE_OBJECT(e->pWidget->tqparent()) != TQT_BASE_OBJECT(par)) { - QWidget * oldPar = (QWidget *)e->pWidget->parent(); - e->pWidget->reparent(par,QPoint(0,0)); + TQWidget * oldPar = (TQWidget *)e->pWidget->tqparent(); + e->pWidget->reparent(par,TQPoint(0,0)); delete oldPar; } if(e->bIsContainer) @@ -3546,13 +3546,13 @@ KviOptionsWidget * KviOptionsInstanceManager::getInstance(KviOptionsWidgetInstan return e->pWidget; } -KviOptionsWidgetInstanceEntry * KviOptionsInstanceManager::findInstanceEntry(const QObject * ptr,KviPointerList * l) +KviOptionsWidgetInstanceEntry * KviOptionsInstanceManager::findInstanceEntry(const TQObject * ptr,KviPointerList * l) { if(l) { for(KviOptionsWidgetInstanceEntry * e = l->first();e;e = l->next()) { - if(ptr == e->pWidget)return e; + if(TQT_BASE_OBJECT_CONST(ptr) == TQT_BASE_OBJECT(e->pWidget))return e; if(e->pChildList) { KviOptionsWidgetInstanceEntry * e2 = findInstanceEntry(ptr,e->pChildList); diff --git a/src/modules/options/instances.h b/src/modules/options/instances.h index fc8674cc..c5564d9e 100644 --- a/src/modules/options/instances.h +++ b/src/modules/options/instances.h @@ -41,16 +41,16 @@ typedef struct _KviOptionsWidgetInstanceEntry KviOptionsWidgetInstanceEntry; typedef struct _KviOptionsWidgetInstanceEntry { - KviOptionsWidget * (*createProc)(QWidget *); + KviOptionsWidget * (*createProc)(TQWidget *); KviOptionsWidget * pWidget; // singleton int iIcon; - QString szName; - QString szNameNoLocale; + TQString szName; + TQString szNameNoLocale; const char * szClassName; int iPriority; - QString szKeywords; - QString szKeywordsNoLocale; - QString szGroup; + TQString szKeywords; + TQString szKeywordsNoLocale; + TQString szGroup; bool bIsContainer; bool bIsNotContained; KviPointerList * pChildList; @@ -58,9 +58,10 @@ typedef struct _KviOptionsWidgetInstanceEntry } KviOptionsWidgetInstanceEntry; -class KviOptionsInstanceManager : public QObject +class KviOptionsInstanceManager : public TQObject { Q_OBJECT + TQ_OBJECT public: KviOptionsInstanceManager(); virtual ~KviOptionsInstanceManager(); @@ -68,12 +69,12 @@ protected: KviPointerList * m_pInstanceTree; public: KviPointerList * instanceEntryTree(){ return m_pInstanceTree; }; - KviOptionsWidget * getInstance(KviOptionsWidgetInstanceEntry * e,QWidget * par); + KviOptionsWidget * getInstance(KviOptionsWidgetInstanceEntry * e,TQWidget * par); KviOptionsWidgetInstanceEntry * findInstanceEntry(const char * clName); void cleanup(KviModule * m); protected: KviOptionsWidgetInstanceEntry * findInstanceEntry(const char * clName,KviPointerList * l); - KviOptionsWidgetInstanceEntry * findInstanceEntry(const QObject * ptr,KviPointerList * l); + KviOptionsWidgetInstanceEntry * findInstanceEntry(const TQObject * ptr,KviPointerList * l); void deleteInstanceTree(KviPointerList * l); protected slots: void widgetDestroyed(); diff --git a/src/modules/options/libkvioptions.cpp b/src/modules/options/libkvioptions.cpp index 175b61ff..38593666 100644 --- a/src/modules/options/libkvioptions.cpp +++ b/src/modules/options/libkvioptions.cpp @@ -37,11 +37,11 @@ #include "dialog.h" -#include +#include #include "kvi_pointerhashtable.h" -KviPointerHashTable * g_pOptionsDialogDict = 0; +KviPointerHashTable * g_pOptionsDialogDict = 0; KviOptionsInstanceManager * g_pOptionsInstanceManager = 0; @@ -93,24 +93,24 @@ static bool options_kvs_cmd_save(KviKvsModuleCommandCall * c) static bool options_kvs_cmd_dialog(KviKvsModuleCommandCall * c) { - QString szGroup; + TQString szGroup; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("options_group",KVS_PT_STRING,KVS_PF_OPTIONAL,szGroup) KVSM_PARAMETERS_END(c) if(szGroup.isEmpty())szGroup = "general"; - KviOptionsDialog * d = g_pOptionsDialogDict->find(szGroup); + KviOptionsDialog * d = g_pOptionsDialogDict->tqfind(szGroup); if(d) { if(c->hasSwitch('t',"toplevel")) { - if(d->parent()) + if(d->tqparent()) { - d->reparent(0,QPoint(0,0),true); + d->reparent(0,TQPoint(0,0),true); } } else { - if(d->parent() != c->window()->frame()->splitter()) + if(TQT_BASE_OBJECT(d->tqparent()) != TQT_BASE_OBJECT(c->window()->frame()->splitter())) { - d->reparent(c->window()->frame()->splitter(),QPoint(0,0),true); + d->reparent(c->window()->frame()->splitter(),TQPoint(0,0),true); } } } else { @@ -189,7 +189,7 @@ static bool options_kvs_cmd_pages(KviKvsModuleCommandCall * c) static bool options_kvs_cmd_edit(KviKvsModuleCommandCall * c) { - QString szOption; + TQString szOption; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("option",KVS_PT_STRING,0,szOption) KVSM_PARAMETERS_END(c) @@ -209,11 +209,11 @@ static bool options_kvs_cmd_edit(KviKvsModuleCommandCall * c) return true; } - QWidget * w; + TQWidget * w; if(c->hasSwitch('m',"modal")) { - w = g_pApp->activeModalWidget(); + w = TQT_TQWIDGET(g_pApp->activeModalWidget()); if(!w)w = g_pFrame; } else { w = g_pFrame; @@ -223,12 +223,12 @@ static bool options_kvs_cmd_edit(KviKvsModuleCommandCall * c) wc->setup(g_pOptionsInstanceManager->getInstance(e,wc)); - // a trick for the dialog covering the splash screen before the time (this is prolly a WM or Qt bug) + // a trick for the dialog covering the splash screen before the time (this is prolly a WM or TQt bug) if(g_pSplashScreen) { if(g_pSplashScreen->isVisible()) // another bug: this ALWAYS RETURNS TRUE, even if the splash was hidden by a mouse click... { - QObject::connect(g_pSplashScreen,SIGNAL(destroyed()),wc,SLOT(show())); + TQObject::connect(g_pSplashScreen,TQT_SIGNAL(destroyed()),wc,TQT_SLOT(show())); return true; } } @@ -259,12 +259,12 @@ static bool options_kvs_cmd_edit(KviKvsModuleCommandCall * c) static bool options_kvs_fnc_isdialog(KviKvsModuleFunctionCall * c) { - QString szGroup; + TQString szGroup; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("options_group",KVS_PT_STRING,KVS_PF_OPTIONAL,szGroup) KVSM_PARAMETERS_END(c) if(szGroup.isEmpty())szGroup = "general"; - c->returnValue()->setBoolean(g_pOptionsDialogDict->find(szGroup)); + c->returnValue()->setBoolean(g_pOptionsDialogDict->tqfind(szGroup)); return true; } @@ -279,7 +279,7 @@ static bool options_module_init(KviModule * m) KVSM_REGISTER_SIMPLE_COMMAND(m,"edit",options_kvs_cmd_edit); KVSM_REGISTER_FUNCTION(m,"isDialog",options_kvs_fnc_isdialog); - g_pOptionsDialogDict = new KviPointerHashTable; + g_pOptionsDialogDict = new KviPointerHashTable; g_pOptionsDialogDict->setAutoDelete(false); return true; @@ -287,7 +287,7 @@ static bool options_module_init(KviModule * m) static bool options_module_cleanup(KviModule *m) { - KviPointerHashTableIterator it(*g_pOptionsDialogDict); + KviPointerHashTableIterator it(*g_pOptionsDialogDict); KviPointerList l; l.setAutoDelete(false); KviOptionsDialog * d; diff --git a/src/modules/options/mkcreateinstanceproc.sh b/src/modules/options/mkcreateinstanceproc.sh index 97be80b5..fd1d7ffe 100755 --- a/src/modules/options/mkcreateinstanceproc.sh +++ b/src/modules/options/mkcreateinstanceproc.sh @@ -90,7 +90,7 @@ protected: KviOptionsWidgetInstanceEntry * findInstanceEntry(const char * clName,KviPointerList * l); KviOptionsWidgetInstanceEntry * findInstanceEntry(const QObject * ptr,KviPointerList * l); void deleteInstanceTree(KviPointerList * l); -protected slots: +protected Q_SLOTS: void widgetDestroyed(); }; @@ -160,9 +160,9 @@ EOF for aclass in $CLASS_LIST; do echo -n "KviOptionsWidget * class$aclass" >> $TARGET - echo "_createInstanceProc(QWidget * parent)" >> $TARGET + echo "_createInstanceProc(QWidget * tqparent)" >> $TARGET echo "{" >> $TARGET - echo " return new $aclass(parent);" >> $TARGET + echo " return new $aclass(tqparent);" >> $TARGET echo "}" >> $TARGET echo "" >> $TARGET done @@ -271,7 +271,7 @@ printclass() fi } -addchildren() +addtqchildren() { if [ -f "$CLASSDIR/$2" ]; then LEVEL=`cat $CLASSDIR/$2` @@ -282,7 +282,7 @@ addchildren() echo "$3 e$1->pChildList = new KviPointerList;" >> $TARGET echo "$3 e$1->pChildList->setAutoDelete(true);" >> $TARGET NEXTLEVEL=`expr $1 + 1` - addchildren $NEXTLEVEL $achild "$3 " + addtqchildren $NEXTLEVEL $achild "$3 " else echo "$3 e$1->pChildList = 0;" >> $TARGET fi @@ -290,7 +290,7 @@ addchildren() fi } -addchildren 0 NOPARENT "" +addtqchildren 0 NOPARENT "" rm -fr $CLASSDIR @@ -308,10 +308,10 @@ void KviOptionsInstanceManager::deleteInstanceTree(KviPointerListpWidget) { - if(e->pWidget->parent()->inherits("KviOptionsWidgetContainer")) + if(e->pWidget->tqparent()->inherits("KviOptionsWidgetContainer")) { disconnect(e->pWidget,SIGNAL(destroyed()),this,SLOT(widgetDestroyed())); - delete e->pWidget->parent(); + delete e->pWidget->tqparent(); e->pWidget = 0; } else { debug("Ops...i have deleted the options dialog ?"); @@ -352,9 +352,9 @@ KviOptionsWidget * KviOptionsInstanceManager::getInstance(KviOptionsWidgetInstan g_iOptionWidgetInstances++; connect(e->pWidget,SIGNAL(destroyed()),this,SLOT(widgetDestroyed())); } - if(e->pWidget->parent() != par) + if(e->pWidget->tqparent() != par) { - QWidget * oldPar = (QWidget *)e->pWidget->parent(); + QWidget * oldPar = (QWidget *)e->pWidget->tqparent(); e->pWidget->reparent(par,QPoint(0,0)); delete oldPar; } diff --git a/src/modules/options/optw_antispam.cpp b/src/modules/options/optw_antispam.cpp index ba8180e6..b317307b 100644 --- a/src/modules/options/optw_antispam.cpp +++ b/src/modules/options/optw_antispam.cpp @@ -22,32 +22,32 @@ #include "optw_antispam.h" -#include +#include #include "kvi_options.h" #include "kvi_locale.h" -#include +#include -KviAntispamOptionsWidget::KviAntispamOptionsWidget(QWidget * parent) -: KviOptionsWidget(parent,"antispam_options_widget") +KviAntispamOptionsWidget::KviAntispamOptionsWidget(TQWidget * tqparent) +: KviOptionsWidget(tqparent,"antispam_options_widget") { createLayout(3,1); KviTalGroupBox *g = addGroupBox(0,0,0,0,1,Qt::Horizontal,__tr2qs_ctx("Enable Anti-spam For","options")); m_b1 = addBoolSelector(g,__tr2qs_ctx("Private messages","options"),KviOption_boolUseAntiSpamOnPrivmsg); - connect(m_b1,SIGNAL(toggled(bool)),this,SLOT(reenableStuff(bool))); + connect(m_b1,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(reenableStuff(bool))); m_b2 = addBoolSelector(g,__tr2qs_ctx("Private notices","options"),KviOption_boolUseAntiSpamOnNotice); - connect(m_b2,SIGNAL(toggled(bool)),this,SLOT(reenableStuff(bool))); + connect(m_b2,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(reenableStuff(bool))); m_b3 = addBoolSelector(0,1,0,1,__tr2qs_ctx("Silent anti-spam (no warnings)","options"),KviOption_boolSilentAntiSpam); m_sl = addStringListSelector(0,2,0,2,__tr2qs_ctx("Words considered spam:","options"),KviOption_stringlistSpamWords); reenableStuff(true); - layout()->setRowStretch(2,1); + tqlayout()->setRowStretch(2,1); } KviAntispamOptionsWidget::~KviAntispamOptionsWidget() diff --git a/src/modules/options/optw_antispam.h b/src/modules/options/optw_antispam.h index 28e51b41..5e7f9bed 100644 --- a/src/modules/options/optw_antispam.h +++ b/src/modules/options/optw_antispam.h @@ -31,8 +31,9 @@ class KviAntispamOptionsWidget : public KviOptionsWidget { Q_OBJECT + TQ_OBJECT public: - KviAntispamOptionsWidget(QWidget * parent); + KviAntispamOptionsWidget(TQWidget * tqparent); ~KviAntispamOptionsWidget(); protected: KviBoolSelector * m_b1; diff --git a/src/modules/options/optw_avatar.cpp b/src/modules/options/optw_avatar.cpp index f93631fd..58165847 100644 --- a/src/modules/options/optw_avatar.cpp +++ b/src/modules/options/optw_avatar.cpp @@ -30,8 +30,8 @@ #include "kvi_tal_tooltip.h" -KviAvatarAdvancedOptionsWidget::KviAvatarAdvancedOptionsWidget(QWidget * parent) -: KviOptionsWidget(parent,"avatar_advanced_options_widget") +KviAvatarAdvancedOptionsWidget::KviAvatarAdvancedOptionsWidget(TQWidget * tqparent) +: KviOptionsWidget(tqparent,"avatar_advanced_options_widget") { createLayout(4,1); // AVATAR @@ -48,18 +48,18 @@ KviAvatarAdvancedOptionsWidget::KviAvatarAdvancedOptionsWidget(QWidget * parent) addBoolSelector(g,__tr2qs_ctx("Do not scale avatar if it is less than required size","options"),KviOption_boolDoNotStretchAvatars); KviUIntSelector *u = addUIntSelector(g,__tr2qs_ctx("Image width:","options"),KviOption_uintAvatarScaleWidth,0,512,80,KVI_OPTION_BOOL(KviOption_boolScaleAvatars)); - connect(b,SIGNAL(toggled(bool)),u,SLOT(setEnabled(bool))); + connect(b,TQT_SIGNAL(toggled(bool)),u,TQT_SLOT(setEnabled(bool))); u = addUIntSelector(g,__tr2qs_ctx("Image height:","options"),KviOption_uintAvatarScaleHeight,0,512,80,KVI_OPTION_BOOL(KviOption_boolScaleAvatars)); - connect(b,SIGNAL(toggled(bool)),u,SLOT(setEnabled(bool))); + connect(b,TQT_SIGNAL(toggled(bool)),u,TQT_SLOT(setEnabled(bool))); //2nd g = addGroupBox(0,1,0,1,1,Qt::Horizontal,__tr2qs_ctx("Scaling on load (and in user tooltips)","options")); b = addBoolSelector(g,__tr2qs_ctx("Scale avatar images on image load","options"),KviOption_boolScaleAvatarsOnLoad); u = addUIntSelector(g,__tr2qs_ctx("Image width:","options"),KviOption_uintScaleAvatarsOnLoadWidth,0,1280,80,KVI_OPTION_BOOL(KviOption_boolScaleAvatarsOnLoad)); - connect(b,SIGNAL(toggled(bool)),u,SLOT(setEnabled(bool))); + connect(b,TQT_SIGNAL(toggled(bool)),u,TQT_SLOT(setEnabled(bool))); u = addUIntSelector(g,__tr2qs_ctx("Image height:","options"),KviOption_uintScaleAvatarsOnLoadHeight,0,1280,80,KVI_OPTION_BOOL(KviOption_boolScaleAvatarsOnLoad)); - connect(b,SIGNAL(toggled(bool)),u,SLOT(setEnabled(bool))); + connect(b,TQT_SIGNAL(toggled(bool)),u,TQT_SLOT(setEnabled(bool))); // 2st Box KviTalGroupBox *gs = addGroupBox(0,2,0,2,1,Qt::Horizontal,__tr2qs_ctx("Request CTCP","options")); @@ -78,7 +78,7 @@ KviAvatarAdvancedOptionsWidget::KviAvatarAdvancedOptionsWidget(QWidget * parent) "will be automatically requested.
" \ "A reasonable value might be 102400 bytes (100 K).

","options")); #endif - connect(bs,SIGNAL(toggled(bool)),us,SLOT(setEnabled(bool))); + connect(bs,TQT_SIGNAL(toggled(bool)),us,TQT_SLOT(setEnabled(bool))); bs = addBoolSelector(gs,__tr2qs_ctx("Automatically accept incoming avatars","options"),KviOption_boolAutoAcceptIncomingAvatars); #ifdef COMPILE_INFO_TIPS diff --git a/src/modules/options/optw_avatar.h b/src/modules/options/optw_avatar.h index 2235a659..003f8d86 100644 --- a/src/modules/options/optw_avatar.h +++ b/src/modules/options/optw_avatar.h @@ -37,8 +37,9 @@ class KviAvatarAdvancedOptionsWidget : public KviOptionsWidget { Q_OBJECT + TQ_OBJECT public: - KviAvatarAdvancedOptionsWidget(QWidget * parent); + KviAvatarAdvancedOptionsWidget(TQWidget * tqparent); ~KviAvatarAdvancedOptionsWidget(); }; diff --git a/src/modules/options/optw_away.cpp b/src/modules/options/optw_away.cpp index 151b8446..3f67fa24 100644 --- a/src/modules/options/optw_away.cpp +++ b/src/modules/options/optw_away.cpp @@ -23,7 +23,7 @@ #include "optw_away.h" -#include +#include #include "kvi_options.h" #include "kvi_locale.h" @@ -31,8 +31,8 @@ //#warning "Info tips" -KviAwayOptionsWidget::KviAwayOptionsWidget(QWidget * parent) -: KviOptionsWidget(parent,"away_options_widget") +KviAwayOptionsWidget::KviAwayOptionsWidget(TQWidget * tqparent) +: KviOptionsWidget(tqparent,"away_options_widget") { createLayout(4,1); @@ -42,11 +42,11 @@ KviAwayOptionsWidget::KviAwayOptionsWidget(QWidget * parent) KviTalGroupBox *g = addGroupBox(0,2,0,2,1,Qt::Horizontal,__tr2qs_ctx("Away Nickname","options")); m_pEnableAwayNick = addBoolSelector(g,__tr2qs_ctx("Change nickname on away","options"),KviOption_boolChangeNickAway); - connect(m_pEnableAwayNick,SIGNAL(toggled(bool)),this,SLOT(enableCustomAwayText(bool))); + connect(m_pEnableAwayNick,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(enableCustomAwayText(bool))); m_pEnableCustomAwayNick = addBoolSelector(g,__tr2qs_ctx("Use automatic nickname ([5 letters]AWAY)","options"),KviOption_boolAutoGeneratedAwayNick,KVI_OPTION_BOOL(KviOption_boolChangeNickAway)); - connect(m_pEnableAwayNick,SIGNAL(toggled(bool)),m_pEnableCustomAwayNick,SLOT(setEnabled(bool))); - connect(m_pEnableCustomAwayNick,SIGNAL(toggled(bool)),this,SLOT(enableCustomAwayText(bool))); + connect(m_pEnableAwayNick,TQT_SIGNAL(toggled(bool)),m_pEnableCustomAwayNick,TQT_SLOT(setEnabled(bool))); + connect(m_pEnableCustomAwayNick,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(enableCustomAwayText(bool))); // m_p <-- stands for pointer // m_sz <-- stands for a string :) diff --git a/src/modules/options/optw_away.h b/src/modules/options/optw_away.h index e8892faa..53d342b0 100644 --- a/src/modules/options/optw_away.h +++ b/src/modules/options/optw_away.h @@ -31,8 +31,9 @@ class KviAwayOptionsWidget : public KviOptionsWidget { Q_OBJECT + TQ_OBJECT public: - KviAwayOptionsWidget(QWidget * parent); + KviAwayOptionsWidget(TQWidget * tqparent); ~KviAwayOptionsWidget(); protected: KviBoolSelector * m_pEnableAwayNick; diff --git a/src/modules/options/optw_connection.cpp b/src/modules/options/optw_connection.cpp index 608b47bd..3427522d 100644 --- a/src/modules/options/optw_connection.cpp +++ b/src/modules/options/optw_connection.cpp @@ -28,11 +28,11 @@ #include "kvi_locale.h" #include "kvi_options.h" #include "kvi_iconmanager.h" -#include +#include -KviConnectionOptionsWidget::KviConnectionOptionsWidget(QWidget * parent) -: KviOptionsWidget(parent,"connection_options_widget") +KviConnectionOptionsWidget::KviConnectionOptionsWidget(TQWidget * tqparent) +: KviOptionsWidget(tqparent,"connection_options_widget") { createLayout(2,1); @@ -76,11 +76,11 @@ KviConnectionOptionsWidget::KviConnectionOptionsWidget(QWidget * parent) #ifdef COMPILE_INFO_TIPS mergeTip(b,__tr2qs_ctx("
This option will enable auto-reconnecting after an unexpected disconnect. " \ "An unexpected disconnect is the termination of a fully connected IRC session " \ - "that was not requested by the user by the means of the QUIT message." \ - "

Warning: If you use /RAW to send a QUIT message to the server, " \ + "that was not requested by the user by the means of the TQUIT message." \ + "

Warning: If you use /RAW to send a TQUIT message to the server, " \ "this option will not behave correctly, since does not detect the outgoing " \ - "QUIT message and will attempt to reconnect after the server has closed the connection. " \ - "For this reason, always use the /QUIT command to close your connections. " \ + "TQUIT message and will attempt to reconnect after the server has closed the connection. " \ + "For this reason, always use the /TQUIT command to close your connections. " \ "This option may also behave incorrectly with bouncers that support " \ "detaching, in this case a solution could be to prepare an alias that sends the " \ "bouncer \"detach\" command immediately before the \"quit\" command.
" \ @@ -89,13 +89,13 @@ KviConnectionOptionsWidget::KviConnectionOptionsWidget(QWidget * parent) KviUIntSelector * u = addUIntSelector(gbox,__tr2qs_ctx("Maximum attempts (0: unlimited):","options"), KviOption_uintMaxAutoReconnectAttempts,0,100,5, KVI_OPTION_BOOL(KviOption_boolAutoReconnectOnUnexpectedDisconnect)); - connect(b,SIGNAL(toggled(bool)),u,SLOT(setEnabled(bool))); + connect(b,TQT_SIGNAL(toggled(bool)),u,TQT_SLOT(setEnabled(bool))); u = addUIntSelector(gbox,__tr2qs_ctx("Delay between attempts:","options"), KviOption_uintAutoReconnectDelay,0,86400,5, KVI_OPTION_BOOL(KviOption_boolAutoReconnectOnUnexpectedDisconnect)); u->setSuffix(__tr2qs_ctx(" sec","options")); - connect(b,SIGNAL(toggled(bool)),u,SLOT(setEnabled(bool))); + connect(b,TQT_SIGNAL(toggled(bool)),u,TQT_SLOT(setEnabled(bool))); #ifdef COMPILE_INFO_TIPS mergeTip(u,__tr2qs_ctx("

Minimum value: 0 sec
Maximum value: 86400 sec
","options")); #endif @@ -114,8 +114,8 @@ KviConnectionOptionsWidget::~KviConnectionOptionsWidget() -KviSSLOptionsWidget::KviSSLOptionsWidget(QWidget * parent) -: KviOptionsWidget(parent,"ssl_options_widget") +KviSSLOptionsWidget::KviSSLOptionsWidget(TQWidget * tqparent) +: KviOptionsWidget(tqparent,"ssl_options_widget") { #ifdef COMPILE_SSL_SUPPORT createLayout(3,1); @@ -126,20 +126,20 @@ KviSSLOptionsWidget::KviSSLOptionsWidget(QWidget * parent) &(KVI_OPTION_BOOL(KviOption_boolUseSSLCertificate)),true); KviFileSelector * f = addFileSelector(gbox,__tr2qs_ctx("Certificate location:","options"), &(KVI_OPTION_STRING(KviOption_stringSSLCertificatePath)),KVI_OPTION_BOOL(KviOption_boolUseSSLCertificate)); - connect(b,SIGNAL(toggled(bool)),f,SLOT(setEnabled(bool))); + connect(b,TQT_SIGNAL(toggled(bool)),f,TQT_SLOT(setEnabled(bool))); KviPasswordSelector * p = new KviPasswordSelector(gbox,__tr2qs_ctx("Certificate password:","options"), &(KVI_OPTION_STRING(KviOption_stringSSLCertificatePass)),KVI_OPTION_BOOL(KviOption_boolUseSSLCertificate)); - connect(b,SIGNAL(toggled(bool)),p,SLOT(setEnabled(bool))); + connect(b,TQT_SIGNAL(toggled(bool)),p,TQT_SLOT(setEnabled(bool))); gbox = addGroupBox(0,1,0,1,1,Qt::Horizontal,__tr2qs_ctx("Private Key","options")); b = addBoolSelector(gbox,__tr2qs_ctx("Use SSL private key","options"), &(KVI_OPTION_BOOL(KviOption_boolUseSSLPrivateKey)),true); f = addFileSelector(gbox,__tr2qs_ctx("Private key location:","options"), &(KVI_OPTION_STRING(KviOption_stringSSLPrivateKeyPath)),KVI_OPTION_BOOL(KviOption_boolUseSSLPrivateKey)); - connect(b,SIGNAL(toggled(bool)),f,SLOT(setEnabled(bool))); + connect(b,TQT_SIGNAL(toggled(bool)),f,TQT_SLOT(setEnabled(bool))); p = addPasswordSelector(gbox,__tr2qs_ctx("Private key password:","options"), &(KVI_OPTION_STRING(KviOption_stringSSLPrivateKeyPass)),KVI_OPTION_BOOL(KviOption_boolUseSSLPrivateKey)); - connect(b,SIGNAL(toggled(bool)),p,SLOT(setEnabled(bool))); + connect(b,TQT_SIGNAL(toggled(bool)),p,TQT_SLOT(setEnabled(bool))); addRowSpacer(0,2,0,2); #else createLayout(1,1); @@ -156,8 +156,8 @@ KviSSLOptionsWidget::~KviSSLOptionsWidget() -KviTransportOptionsWidget::KviTransportOptionsWidget(QWidget * parent) -: KviOptionsWidget(parent,"transport_options_widget") +KviTransportOptionsWidget::KviTransportOptionsWidget(TQWidget * tqparent) +: KviOptionsWidget(tqparent,"transport_options_widget") { createLayout(5,1); KviUIntSelector * u; @@ -174,17 +174,17 @@ KviTransportOptionsWidget::KviTransportOptionsWidget(QWidget * parent) #ifdef COMPILE_INFO_TIPS mergeTip(u,__tr2qs_ctx("
Minimum value: 10000 usec
Maximum value: 10000000 usec
","options")); #endif - connect(b,SIGNAL(toggled(bool)),u,SLOT(setEnabled(bool))); + connect(b,TQT_SIGNAL(toggled(bool)),u,TQT_SLOT(setEnabled(bool))); g = addGroupBox(0,3,0,3,2,Qt::Horizontal,__tr2qs_ctx("Network Interfaces","options")); b = addBoolSelector(g,__tr2qs_ctx("Bind IPv4 connections to:","options"),KviOption_boolBindIrcIpV4ConnectionsToSpecifiedAddress); KviStringSelector * s = addStringSelector(g,"",KviOption_stringIpV4ConnectionBindAddress,KVI_OPTION_BOOL(KviOption_boolBindIrcIpV4ConnectionsToSpecifiedAddress)); - connect(b,SIGNAL(toggled(bool)),s,SLOT(setEnabled(bool))); + connect(b,TQT_SIGNAL(toggled(bool)),s,TQT_SLOT(setEnabled(bool))); #ifdef COMPILE_IPV6_SUPPORT b = addBoolSelector(g,__tr2qs_ctx("Bind IPv6 connections to:","options"),KviOption_boolBindIrcIpV6ConnectionsToSpecifiedAddress); s = addStringSelector(g,"",KviOption_stringIpV6ConnectionBindAddress,KVI_OPTION_BOOL(KviOption_boolBindIrcIpV6ConnectionsToSpecifiedAddress)); - connect(b,SIGNAL(toggled(bool)),s,SLOT(setEnabled(bool))); + connect(b,TQT_SIGNAL(toggled(bool)),s,TQT_SLOT(setEnabled(bool))); #endif //!COMPILE_IPV6_SUPPORT addRowSpacer(0,4,0,4); @@ -202,22 +202,22 @@ KviTransportOptionsWidget::~KviTransportOptionsWidget() -KviIdentOptionsWidget::KviIdentOptionsWidget(QWidget * parent) -: KviOptionsWidget(parent,"ident_options_widget") +KviIdentOptionsWidget::KviIdentOptionsWidget(TQWidget * tqparent) +: KviOptionsWidget(tqparent,"ident_options_widget") { createLayout(6,1); m_pEnableIdent = addBoolSelector(0,0,0,0,__tr2qs_ctx("Enable ident service (bad practice on UNIX!)","options"),KviOption_boolUseIdentService); - connect(m_pEnableIdent,SIGNAL(toggled(bool)),this,SLOT(enableIpv4InIpv6(bool))); + connect(m_pEnableIdent,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(enableIpv4InIpv6(bool))); KviTalGroupBox * gbox = addGroupBox(0,1,0,1,1,Qt::Horizontal,__tr2qs_ctx("Output verbosity","options"),KVI_OPTION_BOOL(KviOption_boolUseIdentService)); - connect(m_pEnableIdent,SIGNAL(toggled(bool)),gbox,SLOT(setEnabled(bool))); + connect(m_pEnableIdent,TQT_SIGNAL(toggled(bool)),gbox,TQT_SLOT(setEnabled(bool))); addLabel(gbox,__tr2qs_ctx("Output identd messages to:","options")); - m_pActiveRadio = new QRadioButton(__tr2qs_ctx("Active window","options"),gbox); - m_pConsoleRadio = new QRadioButton(__tr2qs_ctx("Console","options"),gbox); - m_pQuietRadio = new QRadioButton(__tr2qs_ctx("Do not show any identd messages","options"),gbox); + m_pActiveRadio = new TQRadioButton(__tr2qs_ctx("Active window","options"),gbox); + m_pConsoleRadio = new TQRadioButton(__tr2qs_ctx("Console","options"),gbox); + m_pQuietRadio = new TQRadioButton(__tr2qs_ctx("Do not show any identd messages","options"),gbox); switch(KVI_OPTION_UINT(KviOption_uintIdentdOutputMode)) { @@ -235,30 +235,30 @@ KviIdentOptionsWidget::KviIdentOptionsWidget(QWidget * parent) gbox = addGroupBox(0,2,0,2,1,Qt::Horizontal,__tr2qs_ctx("Configuration","options"),KVI_OPTION_BOOL(KviOption_boolUseIdentService)); KviBoolSelector *b = addBoolSelector(gbox,__tr2qs_ctx("Enable ident service only while connecting to server","options"),KviOption_boolUseIdentServiceOnlyOnConnect); - connect(m_pEnableIdent,SIGNAL(toggled(bool)),b,SLOT(setEnabled(bool))); + connect(m_pEnableIdent,TQT_SIGNAL(toggled(bool)),b,TQT_SLOT(setEnabled(bool))); KviStringSelector * s = addStringSelector(gbox,__tr2qs_ctx("Ident username:","options"), KviOption_stringIdentdUser,KVI_OPTION_BOOL(KviOption_boolUseIdentService)); KviUIntSelector * u = addUIntSelector(gbox,__tr2qs_ctx("Service port:","options"), KviOption_uintIdentdPort,0,65535,113,KVI_OPTION_BOOL(KviOption_boolUseIdentService)); - connect(m_pEnableIdent,SIGNAL(toggled(bool)),u,SLOT(setEnabled(bool))); - connect(m_pEnableIdent,SIGNAL(toggled(bool)),gbox,SLOT(setEnabled(bool))); + connect(m_pEnableIdent,TQT_SIGNAL(toggled(bool)),u,TQT_SLOT(setEnabled(bool))); + connect(m_pEnableIdent,TQT_SIGNAL(toggled(bool)),gbox,TQT_SLOT(setEnabled(bool))); gbox = addGroupBox(0,3,0,3,1,Qt::Horizontal,__tr2qs_ctx("IPv6 Settings","options"),KVI_OPTION_BOOL(KviOption_boolUseIdentService)); m_pEnableIpv6 = addBoolSelector(gbox,__tr2qs_ctx("Enable service for IPv6","options"), KviOption_boolIdentdEnableIpV6, KVI_OPTION_BOOL(KviOption_boolUseIdentService)); #ifdef COMPILE_IPV6_SUPPORT - connect(m_pEnableIdent,SIGNAL(toggled(bool)),m_pEnableIpv6,SLOT(setEnabled(bool))); - connect(m_pEnableIpv6,SIGNAL(toggled(bool)),this,SLOT(enableIpv4InIpv6(bool))); + connect(m_pEnableIdent,TQT_SIGNAL(toggled(bool)),m_pEnableIpv6,TQT_SLOT(setEnabled(bool))); + connect(m_pEnableIpv6,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(enableIpv4InIpv6(bool))); #else m_pEnableIpv6->setEnabled(false); #endif m_pIpv4InIpv6 = addBoolSelector(gbox,__tr2qs_ctx("IP stack treats IPv4 as part of IPv6 namespace","options"), KviOption_boolIdentdIpV6ContainsIpV4, KVI_OPTION_BOOL(KviOption_boolUseIdentService) && KVI_OPTION_BOOL(KviOption_boolIdentdEnableIpV6)); - connect(m_pEnableIdent,SIGNAL(toggled(bool)),gbox,SLOT(setEnabled(bool))); + connect(m_pEnableIdent,TQT_SIGNAL(toggled(bool)),gbox,TQT_SLOT(setEnabled(bool))); addLabel(0,4,0,4, #ifdef COMPILE_ON_WINDOWS @@ -307,8 +307,8 @@ void KviIdentOptionsWidget::enableIpv4InIpv6(bool) -KviConnectionAdvancedOptionsWidget::KviConnectionAdvancedOptionsWidget(QWidget * parent) -: KviOptionsWidget(parent,"connection_advanced_options_widget") +KviConnectionAdvancedOptionsWidget::KviConnectionAdvancedOptionsWidget(TQWidget * tqparent) +: KviOptionsWidget(tqparent,"connection_advanced_options_widget") { } diff --git a/src/modules/options/optw_connection.h b/src/modules/options/optw_connection.h index 189ee4a0..fd180e42 100644 --- a/src/modules/options/optw_connection.h +++ b/src/modules/options/optw_connection.h @@ -31,8 +31,9 @@ class KviConnectionOptionsWidget : public KviOptionsWidget { Q_OBJECT + TQ_OBJECT public: - KviConnectionOptionsWidget(QWidget * parent); + KviConnectionOptionsWidget(TQWidget * tqparent); ~KviConnectionOptionsWidget(); }; @@ -45,8 +46,9 @@ public: class KviConnectionAdvancedOptionsWidget : public KviOptionsWidget { Q_OBJECT + TQ_OBJECT public: - KviConnectionAdvancedOptionsWidget(QWidget * parent); + KviConnectionAdvancedOptionsWidget(TQWidget * tqparent); ~KviConnectionAdvancedOptionsWidget(); }; @@ -61,8 +63,9 @@ public: class KviSSLOptionsWidget : public KviOptionsWidget { Q_OBJECT + TQ_OBJECT public: - KviSSLOptionsWidget(QWidget * parent); + KviSSLOptionsWidget(TQWidget * tqparent); ~KviSSLOptionsWidget(); }; @@ -77,8 +80,9 @@ public: class KviTransportOptionsWidget : public KviOptionsWidget { Q_OBJECT + TQ_OBJECT public: - KviTransportOptionsWidget(QWidget * parent); + KviTransportOptionsWidget(TQWidget * tqparent); ~KviTransportOptionsWidget(); }; @@ -88,13 +92,14 @@ public: #define KVI_OPTIONS_WIDGET_PARENT_KviIdentOptionsWidget KviConnectionAdvancedOptionsWidget #define KVI_OPTIONS_WIDGET_PRIORITY_KviIdentOptionsWidget 10 -class QRadioButton; +class TQRadioButton; class KviIdentOptionsWidget : public KviOptionsWidget { Q_OBJECT + TQ_OBJECT public: - KviIdentOptionsWidget(QWidget * parent); + KviIdentOptionsWidget(TQWidget * tqparent); ~KviIdentOptionsWidget(); virtual void commit(); @@ -103,9 +108,9 @@ protected: KviBoolSelector * m_pEnableIpv6; KviBoolSelector * m_pIpv4InIpv6; - QRadioButton *m_pConsoleRadio; - QRadioButton *m_pActiveRadio; - QRadioButton *m_pQuietRadio; + TQRadioButton *m_pConsoleRadio; + TQRadioButton *m_pActiveRadio; + TQRadioButton *m_pQuietRadio; public slots: void enableIpv4InIpv6(bool); }; diff --git a/src/modules/options/optw_ctcp.cpp b/src/modules/options/optw_ctcp.cpp index 3913751e..72a6d039 100644 --- a/src/modules/options/optw_ctcp.cpp +++ b/src/modules/options/optw_ctcp.cpp @@ -30,13 +30,13 @@ // #include "kvi_tal_tooltip.h" //#endif -KviCtcpOptionsWidget::KviCtcpOptionsWidget(QWidget * parent) -: KviOptionsWidget(parent,"ctcp_options_widget") +KviCtcpOptionsWidget::KviCtcpOptionsWidget(TQWidget * tqparent) +: KviOptionsWidget(tqparent,"ctcp_options_widget") { createLayout(4,1); - QLabel * l; + TQLabel * l; l = addLabel(0,0,0,0,__tr2qs_ctx("
Settings for CTCP.
"\ "

The Client-To-Client Protocol (CTCP) " \ "is used to transmit special control messages over an IRC connection. " \ diff --git a/src/modules/options/optw_ctcp.h b/src/modules/options/optw_ctcp.h index 55bdb238..745f0bb7 100644 --- a/src/modules/options/optw_ctcp.h +++ b/src/modules/options/optw_ctcp.h @@ -32,8 +32,9 @@ class KviCtcpOptionsWidget : public KviOptionsWidget { Q_OBJECT + TQ_OBJECT public: - KviCtcpOptionsWidget(QWidget * parent); + KviCtcpOptionsWidget(TQWidget * tqparent); ~KviCtcpOptionsWidget(); }; diff --git a/src/modules/options/optw_ctcpfloodprotection.cpp b/src/modules/options/optw_ctcpfloodprotection.cpp index f814858e..9d03daaf 100644 --- a/src/modules/options/optw_ctcpfloodprotection.cpp +++ b/src/modules/options/optw_ctcpfloodprotection.cpp @@ -22,12 +22,12 @@ #include "optw_ctcpfloodprotection.h" -#include +#include #include "kvi_options.h" #include "kvi_locale.h" -#include +#include /* @doc: ctcpfloodprotectionoptions @@ -71,8 +71,8 @@ */ -KviCtcpFloodProtectionOptionsWidget::KviCtcpFloodProtectionOptionsWidget(QWidget * parent) -: KviOptionsWidget(parent,"ctcpfloodprotection_options_widget") +KviCtcpFloodProtectionOptionsWidget::KviCtcpFloodProtectionOptionsWidget(TQWidget * tqparent) +: KviOptionsWidget(tqparent,"ctcpfloodprotection_options_widget") { createLayout(4,2); @@ -85,13 +85,13 @@ KviCtcpFloodProtectionOptionsWidget::KviCtcpFloodProtectionOptionsWidget(QWidget #ifdef COMPILE_INFO_TIPS mergeTip(u,__tr2qs_ctx("

Minimum value: 0 requests
Maximum value: 10000 requests
","options")); #endif - connect(b,SIGNAL(toggled(bool)),u,SLOT(setEnabled(bool))); + connect(b,TQT_SIGNAL(toggled(bool)),u,TQT_SLOT(setEnabled(bool))); u = addUIntSelector(1,1,1,1,__tr2qs_ctx("within:","options"),KviOption_uintCtcpFloodCheckInterval,1,3600,6,KVI_OPTION_BOOL(KviOption_boolUseCtcpFloodProtection)); u->setSuffix(__tr2qs_ctx(" sec","options")); #ifdef COMPILE_INFO_TIPS mergeTip(u,__tr2qs_ctx("
Minimum value: 1 sec
Maximum value: 3600 sec
","options")); #endif - connect(b,SIGNAL(toggled(bool)),u,SLOT(setEnabled(bool))); + connect(b,TQT_SIGNAL(toggled(bool)),u,TQT_SLOT(setEnabled(bool))); KviTalGroupBox * g = addGroupBox(0,2,1,2,2,Qt::Horizontal,__tr2qs_ctx("Ignored Requests","options")); addBoolSelector(g,__tr2qs_ctx("PING","options"),KviOption_boolIgnoreCtcpPing); diff --git a/src/modules/options/optw_ctcpfloodprotection.h b/src/modules/options/optw_ctcpfloodprotection.h index 43f28fbe..0462c432 100644 --- a/src/modules/options/optw_ctcpfloodprotection.h +++ b/src/modules/options/optw_ctcpfloodprotection.h @@ -32,9 +32,10 @@ class KviCtcpFloodProtectionOptionsWidget : public KviOptionsWidget { Q_OBJECT -// Q_CLASSINFO("help","ctcpfloodprotectionoptions") + TQ_OBJECT +// TQ_CLASSINFO("help","ctcpfloodprotectionoptions") public: - KviCtcpFloodProtectionOptionsWidget(QWidget * parent); + KviCtcpFloodProtectionOptionsWidget(TQWidget * tqparent); ~KviCtcpFloodProtectionOptionsWidget(); }; diff --git a/src/modules/options/optw_dcc.cpp b/src/modules/options/optw_dcc.cpp index 1b792da3..d6d66e20 100644 --- a/src/modules/options/optw_dcc.cpp +++ b/src/modules/options/optw_dcc.cpp @@ -24,14 +24,14 @@ #include "optw_dcc.h" -#include +#include #include "kvi_options.h" #include "kvi_locale.h" //#warning "Info tips" -KviDccOptionsWidget::KviDccOptionsWidget(QWidget * pParent) +KviDccOptionsWidget::KviDccOptionsWidget(TQWidget * pParent) : KviOptionsWidget(pParent) { } @@ -43,8 +43,8 @@ KviDccOptionsWidget::~KviDccOptionsWidget() /////////////////////////////////////////////////////////////////////////////////////////////////////////////// -KviDccGeneralOptionsWidget::KviDccGeneralOptionsWidget(QWidget * parent) -: KviOptionsWidget(parent,"dccgeneral_options_widget") +KviDccGeneralOptionsWidget::KviDccGeneralOptionsWidget(TQWidget * tqparent) +: KviOptionsWidget(tqparent,"dccgeneral_options_widget") { createLayout(2,1); @@ -65,8 +65,8 @@ KviDccGeneralOptionsWidget::~KviDccGeneralOptionsWidget() /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -KviDccAdvancedOptionsWidget::KviDccAdvancedOptionsWidget(QWidget * parent) -: KviOptionsWidget(parent,"dccgeneral_options_widget") +KviDccAdvancedOptionsWidget::KviDccAdvancedOptionsWidget(TQWidget * tqparent) +: KviOptionsWidget(tqparent,"dccgeneral_options_widget") { createLayout(5,1); @@ -89,7 +89,7 @@ KviDccAdvancedOptionsWidget::KviDccAdvancedOptionsWidget(QWidget * parent) "If you set it to 0.0.0.0, KVIrc will try to use the first available IPv4 interface
","options")); #endif - connect(b,SIGNAL(toggled(bool)),s,SLOT(setEnabled(bool))); + connect(b,TQT_SIGNAL(toggled(bool)),s,TQT_SLOT(setEnabled(bool))); b = addBoolSelector(g,__tr2qs_ctx("Use user-defined port range","options"),KviOption_boolUserDefinedPortRange); @@ -100,10 +100,10 @@ KviDccAdvancedOptionsWidget::KviDccAdvancedOptionsWidget(QWidget * parent) KviTalHBox * hb = new KviTalHBox(g); hb->setSpacing(4); KviUIntSelector * u = addUIntSelector(hb,__tr2qs_ctx("Lowest port:","options"),KviOption_uintDccMinPort,1,65535,5000,KVI_OPTION_BOOL(KviOption_boolUserDefinedPortRange)); - connect(b,SIGNAL(toggled(bool)),u,SLOT(setEnabled(bool))); + connect(b,TQT_SIGNAL(toggled(bool)),u,TQT_SLOT(setEnabled(bool))); u = addUIntSelector(hb,__tr2qs_ctx("Highest port:","options"),KviOption_uintDccMaxPort,1,65535,30000,KVI_OPTION_BOOL(KviOption_boolUserDefinedPortRange)); - connect(b,SIGNAL(toggled(bool)),u,SLOT(setEnabled(bool))); + connect(b,TQT_SIGNAL(toggled(bool)),u,TQT_SLOT(setEnabled(bool))); b = addBoolSelector(g,__tr2qs_ctx("Send a fixed address in requests","options"),KviOption_boolDccSendFakeAddressByDefault); @@ -113,7 +113,7 @@ KviDccAdvancedOptionsWidget::KviDccAdvancedOptionsWidget(QWidget * parent) #endif s = addStringSelector(g,__tr2qs_ctx("Send address/interface:","options"),KviOption_stringDefaultDccFakeAddress,KVI_OPTION_BOOL(KviOption_boolDccSendFakeAddressByDefault)); - connect(b,SIGNAL(toggled(bool)),s,SLOT(setEnabled(bool))); + connect(b,TQT_SIGNAL(toggled(bool)),s,TQT_SLOT(setEnabled(bool))); #ifdef COMPILE_INFO_TIPS mergeTip(s,__tr2qs_ctx("
This is the fixed address that will be sent with all DCC requests if you enable the option above.
","options")); @@ -122,13 +122,13 @@ KviDccAdvancedOptionsWidget::KviDccAdvancedOptionsWidget(QWidget * parent) KviBoolSelector * b2; b2 = addBoolSelector(g,__tr2qs_ctx("Guess address from IRC server if unroutable","options"), KviOption_boolDccGuessIpFromServerWhenLocalIsUnroutable,!KVI_OPTION_BOOL(KviOption_boolDccSendFakeAddressByDefault)); - connect(b,SIGNAL(toggled(bool)),b2,SLOT(setNotEnabled(bool))); + connect(b,TQT_SIGNAL(toggled(bool)),b2,TQT_SLOT(setNotEnabled(bool))); #ifdef COMPILE_INFO_TIPS mergeTip(b2,__tr2qs_ctx("
You can enable this option if you are behind a router that forwards all or a range of ports.
" \ "KVIrc will try to guess the IP address to use for DCC by looking up the local hostname as seen " \ "by the IRC server you're connected to.
This method is an exclusive alternative to the \"fixed address\" above.
" \ - "It might guess the correct address automatically if certain conditions are met (e.g. the IRC server does not mask hostnames).
","options")); + "It might guess the correct address automatically if certain conditions are met (e.g. the IRC server does not tqmask hostnames).","options")); #endif b = addBoolSelector(g,__tr2qs_ctx("Use \"broken bouncer hack\" to detect address","options"), @@ -139,7 +139,7 @@ KviDccAdvancedOptionsWidget::KviDccAdvancedOptionsWidget(QWidget * parent) "It's an ugly hack - use it only if nothing else works.","options")); #endif - connect(b2,SIGNAL(toggled(bool)),b,SLOT(setEnabled(bool))); + connect(b2,TQT_SIGNAL(toggled(bool)),b,TQT_SLOT(setEnabled(bool))); b = addBoolSelector(0,1,1,1,__tr2qs_ctx("Notify failed DCC handshakes to the remote end","options"), KviOption_boolNotifyFailedDccHandshakes); @@ -177,8 +177,8 @@ KviDccAdvancedOptionsWidget::~KviDccAdvancedOptionsWidget() /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -KviDccSendOptionsWidget::KviDccSendOptionsWidget(QWidget * parent) -: KviOptionsWidget(parent,"dccsend_options_widget") +KviDccSendOptionsWidget::KviDccSendOptionsWidget(TQWidget * tqparent) +: KviOptionsWidget(tqparent,"dccsend_options_widget") { } @@ -188,8 +188,8 @@ KviDccSendOptionsWidget::~KviDccSendOptionsWidget() -KviDccSendGeneralOptionsWidget::KviDccSendGeneralOptionsWidget(QWidget * parent) -: KviOptionsWidget(parent,"dccsend_options_widget") +KviDccSendGeneralOptionsWidget::KviDccSendGeneralOptionsWidget(TQWidget * tqparent) +: KviOptionsWidget(tqparent,"dccsend_options_widget") { createLayout(5,1); @@ -219,8 +219,8 @@ KviDccSendGeneralOptionsWidget::KviDccSendGeneralOptionsWidget(QWidget * parent) KviBoolSelector * b1 = addBoolSelector(0,3,0,3,__tr2qs_ctx("Always open transfer window as minimized","options"),KviOption_boolCreateMinimizedDccSend); - connect(b1,SIGNAL(toggled(bool)),b3,SLOT(setNotEnabled(bool))); - connect(b2,SIGNAL(toggled(bool)),b4,SLOT(setEnabled(bool))); + connect(b1,TQT_SIGNAL(toggled(bool)),b3,TQT_SLOT(setNotEnabled(bool))); + connect(b2,TQT_SIGNAL(toggled(bool)),b4,TQT_SLOT(setEnabled(bool))); addRowSpacer(0,4,0,4); } @@ -230,8 +230,8 @@ KviDccSendGeneralOptionsWidget::~KviDccSendGeneralOptionsWidget() } -KviDccSendAdvancedOptionsWidget::KviDccSendAdvancedOptionsWidget(QWidget * parent) -: KviOptionsWidget(parent,"dccsend_advanced_options_widget") +KviDccSendAdvancedOptionsWidget::KviDccSendAdvancedOptionsWidget(TQWidget * tqparent) +: KviOptionsWidget(tqparent,"dccsend_advanced_options_widget") { createLayout(4,1); @@ -265,13 +265,13 @@ KviDccSendAdvancedOptionsWidget::KviDccSendAdvancedOptionsWidget(QWidget * paren b = addBoolSelector(hb,__tr2qs_ctx("Limit upload bandwidth to","options"),KviOption_boolLimitDccSendSpeed); KviUIntSelector * u = addUIntSelector(hb,"",KviOption_uintMaxDccSendSpeed,0,0xffffff1,1024,KVI_OPTION_BOOL(KviOption_boolLimitDccSendSpeed)); u->setSuffix(" " + __tr2qs_ctx("bytes/sec","options")); - connect(b,SIGNAL(toggled(bool)),u,SLOT(setEnabled(bool))); + connect(b,TQT_SIGNAL(toggled(bool)),u,TQT_SLOT(setEnabled(bool))); hb = new KviTalHBox(g); b = addBoolSelector(hb,__tr2qs_ctx("Limit download bandwidth to","options"),KviOption_boolLimitDccRecvSpeed); u = addUIntSelector(hb,"",KviOption_uintMaxDccRecvSpeed,0,0xffffff1,1024,KVI_OPTION_BOOL(KviOption_boolLimitDccRecvSpeed)); u->setSuffix(" " + __tr2qs_ctx("bytes/sec","options")); - connect(b,SIGNAL(toggled(bool)),u,SLOT(setEnabled(bool))); + connect(b,TQT_SIGNAL(toggled(bool)),u,TQT_SLOT(setEnabled(bool))); u = addUIntSelector(g,__tr2qs_ctx("Maximum number of DCC transfers","options"),KviOption_uintMaxDccSendTransfers,0,1000,10); @@ -302,7 +302,7 @@ KviDccSendAdvancedOptionsWidget::KviDccSendAdvancedOptionsWidget(QWidget * paren #endif // COMPILE_INFO_TIPS u = addUIntSelector(hb,__tr2qs_ctx("","options"),KviOption_uintDccSendIdleStepInMSec,1,65536,30,KVI_OPTION_BOOL(KviOption_boolDccSendForceIdleStep)); - connect(b,SIGNAL(toggled(bool)),u,SLOT(setEnabled(bool))); + connect(b,TQT_SIGNAL(toggled(bool)),u,TQT_SLOT(setEnabled(bool))); u->setSuffix(__tr2qs_ctx(" msec","options")); #ifdef COMPILE_INFO_TIPS @@ -341,8 +341,8 @@ KviDccSendAdvancedOptionsWidget::~KviDccSendAdvancedOptionsWidget() //} -KviDccChatOptionsWidget::KviDccChatOptionsWidget(QWidget * parent) -: KviOptionsWidget(parent,"dccchat_options_widget") +KviDccChatOptionsWidget::KviDccChatOptionsWidget(TQWidget * tqparent) +: KviOptionsWidget(tqparent,"dccchat_options_widget") { createLayout(3,1); @@ -352,7 +352,7 @@ KviDccChatOptionsWidget::KviDccChatOptionsWidget(QWidget * parent) KviBoolSelector * b1 = addBoolSelector(0,1,0,1,__tr2qs_ctx("Always open as minimized","options"),KviOption_boolCreateMinimizedDccChat); - connect(b1,SIGNAL(toggled(bool)),b,SLOT(setNotEnabled(bool))); + connect(b1,TQT_SIGNAL(toggled(bool)),b,TQT_SLOT(setNotEnabled(bool))); addRowSpacer(0,2,0,2); } @@ -362,7 +362,7 @@ KviDccChatOptionsWidget::~KviDccChatOptionsWidget() } -KviDccVoiceOptionsWidget::KviDccVoiceOptionsWidget(QWidget *p):KviOptionsWidget(p) +KviDccVoiceOptionsWidget::KviDccVoiceOptionsWidget(TQWidget *p):KviOptionsWidget(p) { createLayout(8, 1); @@ -371,7 +371,7 @@ KviDccVoiceOptionsWidget::KviDccVoiceOptionsWidget(QWidget *p):KviOptionsWidget( KviBoolSelector * b = addBoolSelector(g,__tr2qs_ctx("Automatically accept","options"),KviOption_boolAutoAcceptDccVoice); b = addBoolSelector(g,__tr2qs_ctx("Open minimized when auto-accepted","options"),KviOption_boolCreateMinimizedDccVoiceWhenAutoAccepted,!KVI_OPTION_BOOL(KviOption_boolCreateMinimizedDccVoice)); - connect(b1,SIGNAL(toggled(bool)),b,SLOT(setNotEnabled(bool))); + connect(b1,TQT_SIGNAL(toggled(bool)),b,TQT_SLOT(setNotEnabled(bool))); addBoolSelector(0,2,0,2,__tr2qs_ctx("Force half-duplex mode on sound device","options"), KviOption_boolDccVoiceForceHalfDuplex); addBoolSelector(0,3,0,3,__tr2qs_ctx("Volume slider controls PCM, not Master","options"), KviOption_boolDccVoiceVolumeSliderControlsPCM); diff --git a/src/modules/options/optw_dcc.h b/src/modules/options/optw_dcc.h index 5dc67424..90587666 100644 --- a/src/modules/options/optw_dcc.h +++ b/src/modules/options/optw_dcc.h @@ -32,8 +32,9 @@ class KviDccOptionsWidget : public KviOptionsWidget { Q_OBJECT + TQ_OBJECT public: - KviDccOptionsWidget(QWidget * parent); + KviDccOptionsWidget(TQWidget * tqparent); ~KviDccOptionsWidget(); }; @@ -47,8 +48,9 @@ public: class KviDccGeneralOptionsWidget : public KviOptionsWidget { Q_OBJECT + TQ_OBJECT public: - KviDccGeneralOptionsWidget(QWidget * parent); + KviDccGeneralOptionsWidget(TQWidget * tqparent); ~KviDccGeneralOptionsWidget(); }; @@ -60,8 +62,9 @@ public: class KviDccAdvancedOptionsWidget : public KviOptionsWidget { Q_OBJECT + TQ_OBJECT public: - KviDccAdvancedOptionsWidget(QWidget * parent); + KviDccAdvancedOptionsWidget(TQWidget * tqparent); ~KviDccAdvancedOptionsWidget(); }; @@ -77,8 +80,9 @@ public: class KviDccSendOptionsWidget : public KviOptionsWidget { Q_OBJECT + TQ_OBJECT public: - KviDccSendOptionsWidget(QWidget * parent); + KviDccSendOptionsWidget(TQWidget * tqparent); ~KviDccSendOptionsWidget(); }; @@ -90,8 +94,9 @@ public: class KviDccSendGeneralOptionsWidget : public KviOptionsWidget { Q_OBJECT + TQ_OBJECT public: - KviDccSendGeneralOptionsWidget(QWidget * parent); + KviDccSendGeneralOptionsWidget(TQWidget * tqparent); ~KviDccSendGeneralOptionsWidget(); }; @@ -103,8 +108,9 @@ public: class KviDccSendAdvancedOptionsWidget : public KviOptionsWidget { Q_OBJECT + TQ_OBJECT public: - KviDccSendAdvancedOptionsWidget(QWidget * parent); + KviDccSendAdvancedOptionsWidget(TQWidget * tqparent); ~KviDccSendAdvancedOptionsWidget(); }; @@ -117,8 +123,9 @@ public: class KviDccChatOptionsWidget : public KviOptionsWidget { Q_OBJECT + TQ_OBJECT public: - KviDccChatOptionsWidget(QWidget * parent); + KviDccChatOptionsWidget(TQWidget * tqparent); ~KviDccChatOptionsWidget(); }; @@ -130,8 +137,9 @@ public: class KviDccVoiceOptionsWidget : public KviOptionsWidget { Q_OBJECT + TQ_OBJECT public: - KviDccVoiceOptionsWidget(QWidget *); + KviDccVoiceOptionsWidget(TQWidget *); ~KviDccVoiceOptionsWidget(); }; diff --git a/src/modules/options/optw_generalopt.cpp b/src/modules/options/optw_generalopt.cpp index 18f86902..c411b735 100644 --- a/src/modules/options/optw_generalopt.cpp +++ b/src/modules/options/optw_generalopt.cpp @@ -29,13 +29,13 @@ #include "kvi_options.h" -KviGeneralOptOptionsWidget::KviGeneralOptOptionsWidget(QWidget * parent) -: KviOptionsWidget(parent,"generalopt_options_widget") +KviGeneralOptOptionsWidget::KviGeneralOptOptionsWidget(TQWidget * tqparent) +: KviOptionsWidget(tqparent,"generalopt_options_widget") { createLayout(1,4); - QLabel * l; + TQLabel * l; l = addLabel(0,0,4,0,__tr2qs_ctx("This section contains the general client options
"\ "

like sound, mediafiles, URL handler etc... " \ "

","options")); diff --git a/src/modules/options/optw_generalopt.h b/src/modules/options/optw_generalopt.h index fbaaf192..7da3c28a 100644 --- a/src/modules/options/optw_generalopt.h +++ b/src/modules/options/optw_generalopt.h @@ -31,8 +31,9 @@ class KviGeneralOptOptionsWidget : public KviOptionsWidget { Q_OBJECT + TQ_OBJECT public: - KviGeneralOptOptionsWidget(QWidget * parent); + KviGeneralOptOptionsWidget(TQWidget * tqparent); ~KviGeneralOptOptionsWidget(); }; diff --git a/src/modules/options/optw_highlighting.cpp b/src/modules/options/optw_highlighting.cpp index ef0f5442..bf12aafa 100644 --- a/src/modules/options/optw_highlighting.cpp +++ b/src/modules/options/optw_highlighting.cpp @@ -24,15 +24,15 @@ #include "optw_highlighting.h" -#include +#include #include "kvi_options.h" #include "kvi_locale.h" -#include +#include -KviAlertHighlightingOptionsWidget::KviAlertHighlightingOptionsWidget(QWidget * parent) -: KviOptionsWidget(parent,"highlighting_options_widget") +KviAlertHighlightingOptionsWidget::KviAlertHighlightingOptionsWidget(TQWidget * tqparent) +: KviOptionsWidget(tqparent,"highlighting_options_widget") { } @@ -42,8 +42,8 @@ KviAlertHighlightingOptionsWidget::~KviAlertHighlightingOptionsWidget() -KviHighlightingOptionsWidget::KviHighlightingOptionsWidget(QWidget * parent) -: KviOptionsWidget(parent,"highlighting_options_widget") +KviHighlightingOptionsWidget::KviHighlightingOptionsWidget(TQWidget * tqparent) +: KviOptionsWidget(tqparent,"highlighting_options_widget") { createLayout(7,1); @@ -51,9 +51,9 @@ KviHighlightingOptionsWidget::KviHighlightingOptionsWidget(QWidget * parent) connect( addBoolSelector(0,0,0,0,__tr2qs_ctx("Enable word highlighting","options"),KviOption_boolUseWordHighlighting), - SIGNAL(toggled(bool)), + TQT_SIGNAL(toggled(bool)), addStringListSelector(0,1,0,1,__tr2qs_ctx("Words to highlight:","options"),KviOption_stringlistHighlightWords,KVI_OPTION_BOOL(KviOption_boolUseWordHighlighting)), - SLOT(setEnabled(bool))); + TQT_SLOT(setEnabled(bool))); addStringSelector(0,2,0,2,__tr2qs_ctx("Word splitters:","options"),KviOption_stringWordSplitters); // This can be used even without Word highlighting b = addBoolSelector(0,3,0,3,__tr2qs_ctx("Highlight messages containing my nickname","options"),KviOption_boolAlwaysHighlightNick); @@ -81,8 +81,8 @@ KviHighlightingOptionsWidget::~KviHighlightingOptionsWidget() -KviAlertOptionsWidget::KviAlertOptionsWidget(QWidget * parent) -: KviOptionsWidget(parent,"highlighting_options_widget") +KviAlertOptionsWidget::KviAlertOptionsWidget(TQWidget * tqparent) +: KviOptionsWidget(tqparent,"highlighting_options_widget") { createLayout(2,1); @@ -101,8 +101,8 @@ KviAlertOptionsWidget::KviAlertOptionsWidget(QWidget * parent) #ifdef COMPILE_INFO_TIPS mergeTip(b5, __tr2qs_ctx("
If this option is enabled, the taskbar will also alert for messages which are shown in queries.
","options")); #endif - connect(b3,SIGNAL(toggled(bool)),b4,SLOT(setEnabled(bool))); - connect(b3,SIGNAL(toggled(bool)),b5,SLOT(setEnabled(bool))); + connect(b3,TQT_SIGNAL(toggled(bool)),b4,TQT_SLOT(setEnabled(bool))); + connect(b3,TQT_SIGNAL(toggled(bool)),b5,TQT_SLOT(setEnabled(bool))); KviBoolSelector * b6 = addBoolSelector(g,__tr2qs_ctx("Use custom alert level","options"),KviOption_boolHighlightOnlyAtCostumHighlightLevel); #ifdef COMPILE_INFO_TIPS @@ -113,7 +113,7 @@ KviAlertOptionsWidget::KviAlertOptionsWidget(QWidget * parent) #ifdef COMPILE_INFO_TIPS mergeTip(b6, __tr2qs_ctx("
This option sets the minimum alert level for the taskbar.
","options")); #endif - connect(b6,SIGNAL(toggled(bool)),b7,SLOT(setEnabled(bool))); + connect(b6,TQT_SIGNAL(toggled(bool)),b7,TQT_SLOT(setEnabled(bool))); addRowSpacer(0,1,0,1); } diff --git a/src/modules/options/optw_highlighting.h b/src/modules/options/optw_highlighting.h index f222412e..6f03a0db 100644 --- a/src/modules/options/optw_highlighting.h +++ b/src/modules/options/optw_highlighting.h @@ -32,8 +32,9 @@ class KviAlertHighlightingOptionsWidget : public KviOptionsWidget { Q_OBJECT + TQ_OBJECT public: - KviAlertHighlightingOptionsWidget(QWidget * parent); + KviAlertHighlightingOptionsWidget(TQWidget * tqparent); ~KviAlertHighlightingOptionsWidget(); }; @@ -45,8 +46,9 @@ public: class KviHighlightingOptionsWidget : public KviOptionsWidget { Q_OBJECT + TQ_OBJECT public: - KviHighlightingOptionsWidget(QWidget * parent); + KviHighlightingOptionsWidget(TQWidget * tqparent); ~KviHighlightingOptionsWidget(); }; @@ -58,8 +60,9 @@ public: class KviAlertOptionsWidget : public KviOptionsWidget { Q_OBJECT + TQ_OBJECT public: - KviAlertOptionsWidget(QWidget * parent); + KviAlertOptionsWidget(TQWidget * tqparent); ~KviAlertOptionsWidget(); }; diff --git a/src/modules/options/optw_identity.cpp b/src/modules/options/optw_identity.cpp index 998ca5a4..4c892102 100644 --- a/src/modules/options/optw_identity.cpp +++ b/src/modules/options/optw_identity.cpp @@ -24,16 +24,16 @@ #include "optw_identity.h" -#include -#include -#include -#include +#include +#include +#include +#include #include "kvi_tal_tooltip.h" -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "kvi_defaults.h" #include "kvi_settings.h" @@ -51,51 +51,51 @@ //#warning "Info tips" -KviNickAlternativesDialog::KviNickAlternativesDialog(QWidget * par,const QString &n1,const QString &n2,const QString &n3) -: QDialog(par) +KviNickAlternativesDialog::KviNickAlternativesDialog(TQWidget * par,const TQString &n1,const TQString &n2,const TQString &n3) +: TQDialog(par) { - QGridLayout * g = new QGridLayout(this,5,3,4,12); + TQGridLayout * g = new TQGridLayout(this,5,3,4,12); setCaption(__tr2qs_ctx("Nickname alternatives","options")); - QLabel * l = new QLabel(this); + TQLabel * l = new TQLabel(this); l->setText(__tr2qs_ctx("
Here you can choose up to three nicknames " \ "alternative to the primary one. KVIrc will use the alternatives " \ "if the primary nick is already used by someone else on a particular " \ "IRC network.
","options")); g->addMultiCellWidget(l,0,0,0,2); - l = new QLabel(this); + l = new TQLabel(this); l->setText(__tr2qs_ctx("Alt. Nickname 1:","options")); g->addWidget(l,1,0); - m_pNickEdit1 = new QLineEdit(this); + m_pNickEdit1 = new TQLineEdit(this); g->addMultiCellWidget(m_pNickEdit1,1,1,1,2); m_pNickEdit1->setText(n1); - l = new QLabel(this); + l = new TQLabel(this); l->setText(__tr2qs_ctx("Alt. Nickname 2:","options")); g->addWidget(l,2,0); - m_pNickEdit2 = new QLineEdit(this); + m_pNickEdit2 = new TQLineEdit(this); g->addMultiCellWidget(m_pNickEdit2,2,2,1,2); m_pNickEdit2->setText(n2); - l = new QLabel(this); + l = new TQLabel(this); l->setText(__tr2qs_ctx("Alt. Nickname 3:","options")); g->addWidget(l,3,0); - m_pNickEdit3 = new QLineEdit(this); + m_pNickEdit3 = new TQLineEdit(this); g->addMultiCellWidget(m_pNickEdit3,3,3,1,2); m_pNickEdit3->setText(n3); KviTalHBox * h = new KviTalHBox(this); h->setSpacing(8); g->addWidget(h,4,2); - QPushButton * pb = new QPushButton(__tr2qs_ctx("Cancel","options"),h); + TQPushButton * pb = new TQPushButton(__tr2qs_ctx("Cancel","options"),h); //g->addWidget(pb,4,2); - connect(pb,SIGNAL(clicked()),this,SLOT(reject())); + connect(pb,TQT_SIGNAL(clicked()),this,TQT_SLOT(reject())); - pb = new QPushButton(__tr2qs_ctx("Ok","options"),h); + pb = new TQPushButton(__tr2qs_ctx("Ok","options"),h); pb->setDefault(true); - connect(pb,SIGNAL(clicked()),this,SLOT(accept())); + connect(pb,TQT_SIGNAL(clicked()),this,TQT_SLOT(accept())); g->setColStretch(0,1); @@ -106,7 +106,7 @@ KviNickAlternativesDialog::~KviNickAlternativesDialog() { } -void KviNickAlternativesDialog::fill(QString &n1,QString &n2,QString &n3) +void KviNickAlternativesDialog::fill(TQString &n1,TQString &n2,TQString &n3) { n1 = m_pNickEdit1->text(); n2 = m_pNickEdit2->text(); @@ -124,25 +124,25 @@ void KviNickAlternativesDialog::fill(QString &n1,QString &n2,QString &n3) -KviAvatarDownloadDialog::KviAvatarDownloadDialog(QWidget * par,const QString &szUrl) -: QDialog(par) +KviAvatarDownloadDialog::KviAvatarDownloadDialog(TQWidget * par,const TQString &szUrl) +: TQDialog(par) { setCaption(__tr2qs_ctx("Avatar Download - KVIrc","options")); m_szUrl = szUrl; - QGridLayout * g = new QGridLayout(this,2,2,4,8); + TQGridLayout * g = new TQGridLayout(this,2,2,4,8); - m_pOutput = new QLabel(__tr2qs_ctx("
Please wait while the avatar is being downloaded
","options"),this); + m_pOutput = new TQLabel(__tr2qs_ctx("
Please wait while the avatar is being downloaded
","options"),this); g->addMultiCellWidget(m_pOutput,0,0,0,1); - QPushButton * b = new QPushButton(__tr2qs_ctx("Abort","options"),this); + TQPushButton * b = new TQPushButton(__tr2qs_ctx("Abort","options"),this); g->addWidget(b,1,1); - connect(b,SIGNAL(clicked()),this,SLOT(cancelClicked())); + connect(b,TQT_SIGNAL(clicked()),this,TQT_SLOT(cancelClicked())); m_pRequest = new KviHttpRequest(); - QTimer::singleShot(0,this,SLOT(startDownload())); + TQTimer::singleShot(0,this,TQT_SLOT(startDownload())); g->setRowStretch(0,1); g->setColStretch(0,1); @@ -157,10 +157,10 @@ KviAvatarDownloadDialog::~KviAvatarDownloadDialog() void KviAvatarDownloadDialog::startDownload() { - connect(m_pRequest,SIGNAL(terminated(bool)),this,SLOT(downloadTerminated(bool))); - connect(m_pRequest,SIGNAL(status(const char *)),this,SLOT(downloadMessage(const char *))); + connect(m_pRequest,TQT_SIGNAL(terminated(bool)),this,TQT_SLOT(downloadTerminated(bool))); + connect(m_pRequest,TQT_SIGNAL(status(const char *)),this,TQT_SLOT(downloadMessage(const char *))); - QString tmp = m_szUrl; + TQString tmp = m_szUrl; g_pIconManager->urlToCachedFileName(tmp); g_pApp->getLocalKvircDirectory(m_szLocalFileName,KviApp::Avatars,tmp); @@ -172,7 +172,7 @@ void KviAvatarDownloadDialog::startDownload() } } -void KviAvatarDownloadDialog::closeEvent(QCloseEvent * e) +void KviAvatarDownloadDialog::closeEvent(TQCloseEvent * e) { m_szErrorMessage = __tr2qs_ctx("Download aborted by user","options"); e->ignore(); @@ -189,7 +189,7 @@ void KviAvatarDownloadDialog::downloadMessage(const char * message) { if(message) { - QString txt = "
"; + TQString txt = "
"; txt += message; txt += "
"; m_pOutput->setText(message); @@ -207,15 +207,15 @@ void KviAvatarDownloadDialog::downloadTerminated(bool bSuccess) } } -KviAvatarSelectionDialog::KviAvatarSelectionDialog(QWidget * par,const QString &szInitialPath) -: QDialog(par) +KviAvatarSelectionDialog::KviAvatarSelectionDialog(TQWidget * par,const TQString &szInitialPath) +: TQDialog(par) { setCaption(__tr2qs_ctx("Choose Avatar - KVIrc","options")); - QGridLayout * g = new QGridLayout(this,3,3,4,8); + TQGridLayout * g = new TQGridLayout(this,3,3,4,8); - QString msg = "
"; + TQString msg = "
"; msg += __tr2qs_ctx("Please select an avatar image. " \ "The full path to a local file or an image on the Web can be used.
" \ "If you wish to use a local image file, click the \"Browse\"" \ @@ -223,30 +223,30 @@ KviAvatarSelectionDialog::KviAvatarSelectionDialog(QWidget * par,const QString & "The full URL for an image (including http://) can be entered manually.","options"); msg += "

"; - QLabel * l = new QLabel(msg,this); + TQLabel * l = new TQLabel(msg,this); l->setMinimumWidth(250); g->addMultiCellWidget(l,0,0,0,2); - m_pLineEdit = new QLineEdit(this); + m_pLineEdit = new TQLineEdit(this); m_pLineEdit->setText(szInitialPath); m_pLineEdit->setMinimumWidth(180); g->addMultiCellWidget(m_pLineEdit,1,1,0,1); - QPushButton * b = new QPushButton(__tr2qs_ctx("&Browse...","options"),this); - connect(b,SIGNAL(clicked()),this,SLOT(chooseFileClicked())); + TQPushButton * b = new TQPushButton(__tr2qs_ctx("&Browse...","options"),this); + connect(b,TQT_SIGNAL(clicked()),this,TQT_SLOT(chooseFileClicked())); g->addWidget(b,1,2); KviTalHBox * h = new KviTalHBox(this);h->setSpacing(8);g->addMultiCellWidget(h,2,2,1,2); - b = new QPushButton(__tr2qs_ctx("&OK","options"),h); + b = new TQPushButton(__tr2qs_ctx("&OK","options"),h); b->setMinimumWidth(80); b->setDefault(true); - connect(b,SIGNAL(clicked()),this,SLOT(okClicked())); + connect(b,TQT_SIGNAL(clicked()),this,TQT_SLOT(okClicked())); //g->addWidget(b,2,1); - b = new QPushButton(__tr2qs_ctx("Cancel","options"),h); + b = new TQPushButton(__tr2qs_ctx("Cancel","options"),h); b->setMinimumWidth(80); - connect(b,SIGNAL(clicked()),this,SLOT(cancelClicked())); + connect(b,TQT_SIGNAL(clicked()),this,TQT_SLOT(cancelClicked())); //g->addWidget(b,2,2); g->setRowStretch(0,1); @@ -271,15 +271,15 @@ void KviAvatarSelectionDialog::cancelClicked() void KviAvatarSelectionDialog::chooseFileClicked() { - QString tmp; + TQString tmp; if(KviFileDialog::askForOpenFileName(tmp,__tr2qs_ctx("Choose an Image File - KVIrc","options"), - QString::null,QString::null,false,true,this)) + TQString(),TQString(),false,true,this)) { m_pLineEdit->setText(tmp); } } -void KviAvatarSelectionDialog::closeEvent(QCloseEvent * e) +void KviAvatarSelectionDialog::closeEvent(TQCloseEvent * e) { e->ignore(); reject(); @@ -290,8 +290,8 @@ void KviAvatarSelectionDialog::closeEvent(QCloseEvent * e) -KviIdentityOptionsWidget::KviIdentityOptionsWidget(QWidget * parent) -: KviOptionsWidget(parent) +KviIdentityOptionsWidget::KviIdentityOptionsWidget(TQWidget * tqparent) +: KviOptionsWidget(tqparent) { } @@ -302,8 +302,8 @@ KviIdentityOptionsWidget::~KviIdentityOptionsWidget() -KviIdentityGeneralOptionsWidget::KviIdentityGeneralOptionsWidget(QWidget * parent) -: KviOptionsWidget(parent) +KviIdentityGeneralOptionsWidget::KviIdentityGeneralOptionsWidget(TQWidget * tqparent) +: KviOptionsWidget(tqparent) { m_szAltNicknames[0] = KVI_OPTION_STRING(KviOption_stringNickname2); m_szAltNicknames[1] = KVI_OPTION_STRING(KviOption_stringNickname3); @@ -311,7 +311,7 @@ KviIdentityGeneralOptionsWidget::KviIdentityGeneralOptionsWidget(QWidget * paren createLayout(3,1); - layout()->setMargin(10); + tqlayout()->setMargin(10); KviTalGroupBox * gbox = addGroupBox(0,0,0,0,1,Qt::Horizontal,__tr2qs_ctx("Basic Properties","options")); KviTalHBox * hb = new KviTalHBox(gbox); @@ -325,11 +325,11 @@ KviIdentityGeneralOptionsWidget::KviIdentityGeneralOptionsWidget(QWidget * paren "(case insensitive), you can provide alternative nicknames to be used in case"\ "the server refuses to accept the default one.
","options")); #endif - QValidator * v = new QRegExpValidator(QRegExp("[^-0-9 ][^ ]*"),hb); + TQValidator * v = new TQRegExpValidator(TQRegExp("[^-0-9 ][^ ]*"),TQT_TQOBJECT(hb)); sel->setValidator(v); - QPushButton * pb = new QPushButton(__tr2qs_ctx("Alternatives...","options"),hb); - connect(pb,SIGNAL(clicked()),this,SLOT(setNickAlternatives())); + TQPushButton * pb = new TQPushButton(__tr2qs_ctx("Alternatives...","options"),hb); + connect(pb,TQT_SIGNAL(clicked()),this,TQT_SLOT(setNickAlternatives())); sel = addStringSelector(gbox,__tr2qs_ctx("Username:","options"),KviOption_stringUsername); sel->setMinimumLabelWidth(120); @@ -348,22 +348,22 @@ KviIdentityGeneralOptionsWidget::KviIdentityGeneralOptionsWidget(QWidget * paren #endif - QString szOptionalCtcpUserInfo = __tr2qs_ctx("This field is optional and will appear as part of the CTCP USERINFO reply.","options"); - QString szCenterBegin("
"); - QString szCenterEnd("
"); - QString szTrailing = "

" + szOptionalCtcpUserInfo + szCenterEnd; + TQString szOptionalCtcpUserInfo = __tr2qs_ctx("This field is optional and will appear as part of the CTCP USERINFO reply.","options"); + TQString szCenterBegin("
"); + TQString szCenterEnd("
"); + TQString szTrailing = "

" + szOptionalCtcpUserInfo + szCenterEnd; gbox = addGroupBox(0,1,0,1,1,Qt::Horizontal,__tr2qs_ctx("Profile","options")); hb = new KviTalHBox(gbox); hb->setSpacing(4); - QLabel * l = new QLabel(__tr2qs_ctx("Age:","options"),hb); + TQLabel * l = new TQLabel(__tr2qs_ctx("Age:","options"),hb); l->setMinimumWidth(120); - m_pAgeCombo = new QComboBox(hb); + m_pAgeCombo = new TQComboBox(hb); #ifdef COMPILE_INFO_TIPS - QString szTip1 = szCenterBegin + __tr2qs_ctx("Here you can specify your age.","options") + szTrailing; + TQString szTip1 = szCenterBegin + __tr2qs_ctx("Here you can specify your age.","options") + szTrailing; KviTalToolTip::add(l,szTip1); KviTalToolTip::add(m_pAgeCombo,szTip1); #endif @@ -371,7 +371,7 @@ KviIdentityGeneralOptionsWidget::KviIdentityGeneralOptionsWidget(QWidget * paren unsigned int i; for(i=1;i<120;i++) { - QString tmp; + TQString tmp; tmp.setNum(i); m_pAgeCombo->insertItem(tmp); } @@ -388,12 +388,12 @@ KviIdentityGeneralOptionsWidget::KviIdentityGeneralOptionsWidget(QWidget * paren hb = new KviTalHBox(gbox); hb->setSpacing(4); - l = new QLabel(__tr2qs_ctx("Gender:","options"),hb); + l = new TQLabel(__tr2qs_ctx("Gender:","options"),hb); l->setMinimumWidth(120); - m_pGenderCombo = new QComboBox(hb); + m_pGenderCombo = new TQComboBox(hb); #ifdef COMPILE_INFO_TIPS - QString szTip2 = szCenterBegin + __tr2qs_ctx("Here you can specify your gender.","options") + szTrailing; + TQString szTip2 = szCenterBegin + __tr2qs_ctx("Here you can specify your gender.","options") + szTrailing; KviTalToolTip::add(l,szTip2); KviTalToolTip::add(m_pGenderCombo,szTip2); #endif @@ -402,9 +402,9 @@ KviIdentityGeneralOptionsWidget::KviIdentityGeneralOptionsWidget(QWidget * paren m_pGenderCombo->insertItem(__tr2qs_ctx("Female","options")); m_pGenderCombo->insertItem(__tr2qs_ctx("Male","options")); - if(KviQString::equalCI(KVI_OPTION_STRING(KviOption_stringCtcpUserInfoGender),"Male")) + if(KviTQString::equalCI(KVI_OPTION_STRING(KviOption_stringCtcpUserInfoGender),"Male")) m_pGenderCombo->setCurrentItem(2); - else if(KviQString::equalCI(KVI_OPTION_STRING(KviOption_stringCtcpUserInfoGender),"Female")) + else if(KviTQString::equalCI(KVI_OPTION_STRING(KviOption_stringCtcpUserInfoGender),"Female")) m_pGenderCombo->setCurrentItem(1); else m_pGenderCombo->setCurrentItem(0); @@ -445,7 +445,7 @@ KviIdentityGeneralOptionsWidget::~KviIdentityGeneralOptionsWidget() void KviIdentityGeneralOptionsWidget::setNickAlternatives() { KviNickAlternativesDialog * dlg = new KviNickAlternativesDialog(this,m_szAltNicknames[0],m_szAltNicknames[1],m_szAltNicknames[2]); - if(dlg->exec() != QDialog::Accepted)return; + if(dlg->exec() != TQDialog::Accepted)return; dlg->fill(m_szAltNicknames[0],m_szAltNicknames[1],m_szAltNicknames[2]); delete dlg; } @@ -488,18 +488,18 @@ void KviIdentityGeneralOptionsWidget::commit() } -KviIdentityAvatarOptionsWidget::KviIdentityAvatarOptionsWidget(QWidget * parent) -: KviOptionsWidget(parent) +KviIdentityAvatarOptionsWidget::KviIdentityAvatarOptionsWidget(TQWidget * tqparent) +: KviOptionsWidget(tqparent) { createLayout(4,1); - layout()->setMargin(10); + tqlayout()->setMargin(10); m_pLocalAvatar = new KviPixmap(KVI_OPTION_PIXMAP(KviOption_pixmapMyAvatar)); bool bHaveAvatar = (!KVI_OPTION_STRING(KviOption_stringMyAvatar).isEmpty()) && m_pLocalAvatar->pixmap(); #ifdef COMPILE_INFO_TIPS - QString szTip = __tr2qs_ctx("Here you can choose your avatar image. It will be visible
" \ + TQString szTip = __tr2qs_ctx("Here you can choose your avatar image. It will be visible
" \ "by other people that request it. Choose a nice image of yourself,
" \ "possibly avoiding obscenity and offending images. It is a good idea
" \ "to choose a relatively small file (say 150 Kb max) because
" \ @@ -519,7 +519,7 @@ KviIdentityAvatarOptionsWidget::KviIdentityAvatarOptionsWidget(QWidget * parent) addWidgetToLayout(m_pAvatarPreview,0,1,0,1); m_pAvatarPreview->setPixmap(m_pLocalAvatar); m_pAvatarPreview->setEnabled(bHaveAvatar); - connect(m_pUseAvatarCheck,SIGNAL(toggled(bool)),m_pAvatarPreview,SLOT(setEnabled(bool))); + connect(m_pUseAvatarCheck,TQT_SIGNAL(toggled(bool)),m_pAvatarPreview,TQT_SLOT(setEnabled(bool))); #ifdef COMPILE_INFO_TIPS mergeTip(m_pAvatarPreview,szTip); #endif @@ -528,19 +528,19 @@ KviIdentityAvatarOptionsWidget::KviIdentityAvatarOptionsWidget(QWidget * parent) hb->setSpacing(4); addWidgetToLayout(hb,0,2,0,2); - m_pAvatarNameEdit = new QLineEdit(hb); + m_pAvatarNameEdit = new TQLineEdit(hb); m_pAvatarNameEdit->setReadOnly(true); m_pAvatarNameEdit->setEnabled(bHaveAvatar); m_pAvatarNameEdit->setText(KVI_OPTION_STRING(KviOption_stringMyAvatar)); - connect(m_pUseAvatarCheck,SIGNAL(toggled(bool)),m_pAvatarNameEdit,SLOT(setEnabled(bool))); + connect(m_pUseAvatarCheck,TQT_SIGNAL(toggled(bool)),m_pAvatarNameEdit,TQT_SLOT(setEnabled(bool))); - m_pChooseAvatarButton = new QPushButton(__tr2qs_ctx("Choose...","options"),hb); + m_pChooseAvatarButton = new TQPushButton(__tr2qs_ctx("Choose...","options"),hb); m_pChooseAvatarButton->setEnabled(bHaveAvatar); - connect(m_pUseAvatarCheck,SIGNAL(toggled(bool)),m_pChooseAvatarButton,SLOT(setEnabled(bool))); + connect(m_pUseAvatarCheck,TQT_SIGNAL(toggled(bool)),m_pChooseAvatarButton,TQT_SLOT(setEnabled(bool))); - connect(m_pChooseAvatarButton,SIGNAL(clicked()),this,SLOT(chooseAvatar())); + connect(m_pChooseAvatarButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(chooseAvatar())); - layout()->setRowStretch(1,2); + tqlayout()->setRowStretch(1,2); } KviIdentityAvatarOptionsWidget::~KviIdentityAvatarOptionsWidget() @@ -553,7 +553,7 @@ void KviIdentityAvatarOptionsWidget::commit(void) { KviOptionsWidget::commit(); - QString szAvatarName = m_pAvatarNameEdit->text(); + TQString szAvatarName = m_pAvatarNameEdit->text(); if(m_pUseAvatarCheck->isChecked() && m_pLocalAvatar->pixmap() && (!szAvatarName.isEmpty())) { @@ -570,24 +570,24 @@ void KviIdentityAvatarOptionsWidget::commit(void) void KviIdentityAvatarOptionsWidget::chooseAvatar() { - QString szCurrent = m_pAvatarNameEdit->text(); + TQString szCurrent = m_pAvatarNameEdit->text(); KviAvatarSelectionDialog dlg(this,szCurrent); - if(dlg.exec() != QDialog::Accepted)return; + if(dlg.exec() != TQDialog::Accepted)return; szCurrent = dlg.avatarName(); szCurrent.stripWhiteSpace(); - if(KviQString::equalCIN(szCurrent,"http://",7)) + if(KviTQString::equalCIN(szCurrent,"http://",7)) { // this is an url // first check if we have it in the cache - KviAvatar * a = g_pIconManager->getAvatar(QString::null,szCurrent); + KviAvatar * a = g_pIconManager->getAvatar(TQString(),szCurrent); if(!a) { // no cache... try downloading KviAvatarDownloadDialog dlg(this,szCurrent); - if(dlg.exec() == QDialog::Accepted) + if(dlg.exec() == TQDialog::Accepted) { // downloaded! // try to load it @@ -595,17 +595,17 @@ void KviIdentityAvatarOptionsWidget::chooseAvatar() { // unloadable szCurrent = ""; - QMessageBox::warning(this,__tr2qs_ctx("Failed to Load Avatar - KVIrc","options"), + TQMessageBox::warning(this,__tr2qs_ctx("Failed to Load Avatar - KVIrc","options"), __tr2qs_ctx("Failed to load the avatar image.
" \ "It may be an unaccessible file or an " \ - "unsupported image format.","options"),QMessageBox::Ok,QMessageBox::NoButton); + "unsupported image format.","options"),TQMessageBox::Ok,TQMessageBox::NoButton); } // else loaded! } else { // unloadable - QString tmp; - KviQString::sprintf(tmp,__tr2qs_ctx("Failed to download the avatar image.
" \ + TQString tmp; + KviTQString::sprintf(tmp,__tr2qs_ctx("Failed to download the avatar image.
" \ "%Q","options"),&(dlg.errorMessage())); - QMessageBox::warning(this,__tr2qs_ctx("Avatar Download Failed - KVIrc","options"),tmp,QMessageBox::Ok,QMessageBox::NoButton); + TQMessageBox::warning(this,__tr2qs_ctx("Avatar Download Failed - KVIrc","options"),tmp,TQMessageBox::Ok,TQMessageBox::NoButton); szCurrent = ""; m_pLocalAvatar->setNull(); } @@ -619,14 +619,14 @@ void KviIdentityAvatarOptionsWidget::chooseAvatar() if(m_pLocalAvatar->load(szCurrent)) { // local path, loaded - QString tmp = szCurrent; - int idx = tmp.findRev("/"); + TQString tmp = szCurrent; + int idx = tmp.tqfindRev("/"); if(idx != -1) { szCurrent = tmp.right(tmp.length() - (idx + 1)); tmp = szCurrent; } - idx = tmp.findRev("\\"); + idx = tmp.tqfindRev("\\"); if(idx != -1) { szCurrent = tmp.right(tmp.length() - (idx + 1)); @@ -634,10 +634,10 @@ void KviIdentityAvatarOptionsWidget::chooseAvatar() } } else { // unloadable - QMessageBox::warning(this,__tr2qs_ctx("Failed to Load Avatar - KVIrc","options"), + TQMessageBox::warning(this,__tr2qs_ctx("Failed to Load Avatar - KVIrc","options"), __tr2qs_ctx("Failed to load the avatar image.
" \ "It may be an unaccessible file or an " \ - "unsupported image format.","options"),QMessageBox::Ok,QMessageBox::NoButton); + "unsupported image format.","options"),TQMessageBox::Ok,TQMessageBox::NoButton); szCurrent = ""; } } @@ -646,7 +646,7 @@ void KviIdentityAvatarOptionsWidget::chooseAvatar() { if((m_pLocalAvatar->pixmap()->width() > 1024) || (m_pLocalAvatar->pixmap()->height() > 768)) { - QMessageBox::warning(this,__tr2qs_ctx("Avatar Might Be Too Big - KVIrc","options"), + TQMessageBox::warning(this,__tr2qs_ctx("Avatar Might Be Too Big - KVIrc","options"), __tr2qs_ctx("The avatar you have choosen is bigger than 1024x768 pixels.
" \ "Such a big image will not be seen on all the user monitors
" \ "and will probably be scaled by the remote clients with poor quality
" \ @@ -664,21 +664,21 @@ void KviIdentityAvatarOptionsWidget::chooseAvatar() -KviIdentityAdvancedOptionsWidget::KviIdentityAdvancedOptionsWidget(QWidget * parent) -: KviOptionsWidget(parent) +KviIdentityAdvancedOptionsWidget::KviIdentityAdvancedOptionsWidget(TQWidget * tqparent) +: KviOptionsWidget(tqparent) { m_pISelector=0; m_pWSelector=0; m_pSSelector=0; m_sModeStr = KVI_OPTION_STRING(KviOption_stringDefaultUserMode); - m_bI = m_sModeStr.contains('i'); - m_bW = m_sModeStr.contains('w'); - m_bS = m_sModeStr.contains('s'); + m_bI = m_sModeStr.tqcontains('i'); + m_bW = m_sModeStr.tqcontains('w'); + m_bS = m_sModeStr.tqcontains('s'); createLayout(2,1); - layout()->setMargin(10); + tqlayout()->setMargin(10); KviTalGroupBox * gbox = addGroupBox(0,0,0,0,1,Qt::Horizontal,__tr2qs_ctx("User Mode","options")); m_pISelector = addBoolSelector(gbox,__tr2qs_ctx("Invisible (+i)","options"),&m_bI); diff --git a/src/modules/options/optw_identity.h b/src/modules/options/optw_identity.h index 479614c4..5170e4df 100644 --- a/src/modules/options/optw_identity.h +++ b/src/modules/options/optw_identity.h @@ -30,43 +30,45 @@ #include "kvi_settings.h" #include "kvi_selectors.h" -#include +#include #include "kvi_pixmap.h" -class QLineEdit; -class QCheckBox; -class QPushButton; -class QComboBox; +class TQLineEdit; +class TQCheckBox; +class TQPushButton; +class TQComboBox; -class KviNickAlternativesDialog : public QDialog +class KviNickAlternativesDialog : public TQDialog { friend class KviIdentityGeneralOptionsWidget; Q_OBJECT + TQ_OBJECT protected: - KviNickAlternativesDialog(QWidget * par,const QString &n1,const QString &n2,const QString &n3); + KviNickAlternativesDialog(TQWidget * par,const TQString &n1,const TQString &n2,const TQString &n3); ~KviNickAlternativesDialog(); protected: - QLineEdit * m_pNickEdit1; - QLineEdit * m_pNickEdit2; - QLineEdit * m_pNickEdit3; + TQLineEdit * m_pNickEdit1; + TQLineEdit * m_pNickEdit2; + TQLineEdit * m_pNickEdit3; protected: - void fill(QString &n1,QString &n2,QString &n3); + void fill(TQString &n1,TQString &n2,TQString &n3); }; -class KviAvatarSelectionDialog : public QDialog +class KviAvatarSelectionDialog : public TQDialog { friend class KviIdentityAvatarOptionsWidget; Q_OBJECT + TQ_OBJECT public: - KviAvatarSelectionDialog(QWidget * par,const QString &szInitialPath); + KviAvatarSelectionDialog(TQWidget * par,const TQString &szInitialPath); ~KviAvatarSelectionDialog(); protected: - QLineEdit * m_pLineEdit; - QString m_szAvatarName; + TQLineEdit * m_pLineEdit; + TQString m_szAvatarName; protected: - virtual void closeEvent(QCloseEvent * e); - const QString &avatarName(){ return m_szAvatarName; }; + virtual void closeEvent(TQCloseEvent * e); + const TQString &avatarName(){ return m_szAvatarName; }; protected slots: void okClicked(); void cancelClicked(); @@ -75,23 +77,24 @@ protected slots: class KviHttpRequest; -class KviAvatarDownloadDialog : public QDialog +class KviAvatarDownloadDialog : public TQDialog { friend class KviIdentityAvatarOptionsWidget; Q_OBJECT + TQ_OBJECT public: - KviAvatarDownloadDialog(QWidget * par,const QString &szUrl); + KviAvatarDownloadDialog(TQWidget * par,const TQString &szUrl); ~KviAvatarDownloadDialog(); protected: KviHttpRequest * m_pRequest; - QLabel * m_pOutput; - QString m_szErrorMessage; - QString m_szLocalFileName; - QString m_szUrl; + TQLabel * m_pOutput; + TQString m_szErrorMessage; + TQString m_szLocalFileName; + TQString m_szUrl; protected: - virtual void closeEvent(QCloseEvent * e); - const QString & localFileName(){ return m_szLocalFileName; }; - const QString & errorMessage(){ return m_szErrorMessage; }; + virtual void closeEvent(TQCloseEvent * e); + const TQString & localFileName(){ return m_szLocalFileName; }; + const TQString & errorMessage(){ return m_szErrorMessage; }; protected slots: void startDownload(); void cancelClicked(); @@ -109,8 +112,9 @@ protected slots: class KviIdentityOptionsWidget : public KviOptionsWidget { Q_OBJECT + TQ_OBJECT public: - KviIdentityOptionsWidget(QWidget * parent); + KviIdentityOptionsWidget(TQWidget * tqparent); ~KviIdentityOptionsWidget(); }; @@ -125,14 +129,15 @@ public: class KviIdentityGeneralOptionsWidget : public KviOptionsWidget { Q_OBJECT + TQ_OBJECT public: - KviIdentityGeneralOptionsWidget(QWidget * pParent); + KviIdentityGeneralOptionsWidget(TQWidget * pParent); ~KviIdentityGeneralOptionsWidget(); protected: - QString m_szAltNicknames[3]; + TQString m_szAltNicknames[3]; - QComboBox * m_pAgeCombo; - QComboBox * m_pGenderCombo; + TQComboBox * m_pAgeCombo; + TQComboBox * m_pGenderCombo; protected slots: void setNickAlternatives(); protected: @@ -149,13 +154,14 @@ protected: class KviIdentityAvatarOptionsWidget : public KviOptionsWidget { Q_OBJECT + TQ_OBJECT public: - KviIdentityAvatarOptionsWidget(QWidget * pParent); + KviIdentityAvatarOptionsWidget(TQWidget * pParent); ~KviIdentityAvatarOptionsWidget(); protected: - QCheckBox * m_pUseAvatarCheck; - QLineEdit * m_pAvatarNameEdit; - QPushButton * m_pChooseAvatarButton; + TQCheckBox * m_pUseAvatarCheck; + TQLineEdit * m_pAvatarNameEdit; + TQPushButton * m_pChooseAvatarButton; KviPixmap * m_pLocalAvatar; KviPixmapPreview * m_pAvatarPreview; protected slots: @@ -174,8 +180,9 @@ protected: class KviIdentityAdvancedOptionsWidget : public KviOptionsWidget { Q_OBJECT + TQ_OBJECT public: - KviIdentityAdvancedOptionsWidget(QWidget * pParent); + KviIdentityAdvancedOptionsWidget(TQWidget * pParent); ~KviIdentityAdvancedOptionsWidget(); protected: bool m_bI; diff --git a/src/modules/options/optw_ignore.cpp b/src/modules/options/optw_ignore.cpp index 26e4c0d9..d164f64f 100644 --- a/src/modules/options/optw_ignore.cpp +++ b/src/modules/options/optw_ignore.cpp @@ -22,7 +22,7 @@ #include "optw_ignore.h" -#include +#include #include "kvi_options.h" #include "kvi_locale.h" @@ -30,8 +30,8 @@ //#warning "Info tips" -KviIgnoreOptionsWidget::KviIgnoreOptionsWidget(QWidget * parent) -: KviOptionsWidget(parent,"ignore_options_widget") +KviIgnoreOptionsWidget::KviIgnoreOptionsWidget(TQWidget * tqparent) +: KviOptionsWidget(tqparent,"ignore_options_widget") { createLayout(3,1); @@ -39,7 +39,7 @@ KviIgnoreOptionsWidget::KviIgnoreOptionsWidget(QWidget * parent) m_pIgnorePrivmsg = addBoolSelector(g,__tr2qs_ctx("Private/channel messages","options"),KviOption_boolEnableIgnoreOnPrivMsg); m_pIgnoreNotice = addBoolSelector(g,__tr2qs_ctx("Private/channel notices","options"),KviOption_boolEnableIgnoreOnNotice); - connect(m_pIgnorePrivmsg,SIGNAL(toggled(bool)),this,SLOT(enableVerbose(bool))); + connect(m_pIgnorePrivmsg,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(enableVerbose(bool))); m_pVerboseIgnore = addBoolSelector(0,1,0,1,__tr2qs_ctx("Use verbose ignore (show messages in console)","options"), KviOption_boolVerboseIgnore, diff --git a/src/modules/options/optw_ignore.h b/src/modules/options/optw_ignore.h index cb7203f5..92864f33 100644 --- a/src/modules/options/optw_ignore.h +++ b/src/modules/options/optw_ignore.h @@ -33,8 +33,9 @@ class KviIgnoreOptionsWidget : public KviOptionsWidget { Q_OBJECT + TQ_OBJECT public: - KviIgnoreOptionsWidget(QWidget * parent); + KviIgnoreOptionsWidget(TQWidget * tqparent); ~KviIgnoreOptionsWidget(); public: KviBoolSelector * m_pIgnorePrivmsg; diff --git a/src/modules/options/optw_input.cpp b/src/modules/options/optw_input.cpp index 4dd73987..210980e7 100644 --- a/src/modules/options/optw_input.cpp +++ b/src/modules/options/optw_input.cpp @@ -21,15 +21,15 @@ // #include "optw_input.h" -#include +#include #include "kvi_options.h" #include "kvi_locale.h" //#warning "Info tips" -KviInputLookOptionsWidget::KviInputLookOptionsWidget(QWidget * parent) -: KviOptionsWidget(parent,"ircviewlook_options_widget") +KviInputLookOptionsWidget::KviInputLookOptionsWidget(TQWidget * tqparent) +: KviOptionsWidget(tqparent,"ircviewlook_options_widget") { createLayout(10,2); @@ -44,11 +44,11 @@ KviInputLookOptionsWidget::KviInputLookOptionsWidget(QWidget * parent) addPixmapSelector(0,7,1,7,__tr2qs_ctx("Background image","options"),KviOption_pixmapInputBackground); addLabel(0,8,0,8,__tr2qs_ctx("Horizontal align:","options")); - m_pHorizontalAlign=new QComboBox(this); + m_pHorizontalAlign=new TQComboBox(this); addWidgetToLayout(m_pHorizontalAlign,1,8,1,8); addLabel(0,9,0,9,__tr2qs_ctx("Vertical align:","options")); - m_pVerticalAlign=new QComboBox(this); + m_pVerticalAlign=new TQComboBox(this); addWidgetToLayout(m_pVerticalAlign,1,9,1,9); m_pHorizontalAlign->insertItem(__tr2qs_ctx("Tile","options")); @@ -61,30 +61,30 @@ KviInputLookOptionsWidget::KviInputLookOptionsWidget(QWidget * parent) m_pVerticalAlign->insertItem(__tr2qs_ctx("Bottom","options")); m_pVerticalAlign->insertItem(__tr2qs_ctx("Center","options")); - switch( KVI_OPTION_UINT(KviOption_uintInputPixmapAlign) & Qt::AlignHorizontal_Mask) + switch( KVI_OPTION_UINT(KviOption_uintInputPixmapAlign) & TQt::AlignHorizontal_Mask) { - case Qt::AlignLeft: + case TQt::AlignLeft: m_pHorizontalAlign->setCurrentItem(1); break; - case Qt::AlignRight: + case TQt::AlignRight: m_pHorizontalAlign->setCurrentItem(2); break; - case Qt::AlignHCenter: + case TQt::AlignHCenter: m_pHorizontalAlign->setCurrentItem(3); break; default: m_pHorizontalAlign->setCurrentItem(0); } - switch( KVI_OPTION_UINT(KviOption_uintInputPixmapAlign) & Qt::AlignVertical_Mask) + switch( KVI_OPTION_UINT(KviOption_uintInputPixmapAlign) & TQt::AlignVertical_Mask) { - case Qt::AlignTop: + case TQt::AlignTop: m_pVerticalAlign->setCurrentItem(1); break; - case Qt::AlignBottom: + case TQt::AlignBottom: m_pVerticalAlign->setCurrentItem(2); break; - case Qt::AlignVCenter: + case TQt::AlignVCenter: m_pVerticalAlign->setCurrentItem(3); break; default: @@ -92,7 +92,7 @@ KviInputLookOptionsWidget::KviInputLookOptionsWidget(QWidget * parent) } - layout()->setRowStretch(7,1); + tqlayout()->setRowStretch(7,1); } KviInputLookOptionsWidget::~KviInputLookOptionsWidget() @@ -105,25 +105,25 @@ void KviInputLookOptionsWidget::commit() switch(m_pHorizontalAlign->currentItem()) { case 1: - iFlags|=Qt::AlignLeft; + iFlags|=TQt::AlignLeft; break; case 2: - iFlags|=Qt::AlignRight; + iFlags|=TQt::AlignRight; break; case 3: - iFlags|=Qt::AlignHCenter; + iFlags|=TQt::AlignHCenter; break; } switch(m_pVerticalAlign->currentItem()) { case 1: - iFlags|=Qt::AlignTop; + iFlags|=TQt::AlignTop; break; case 2: - iFlags|=Qt::AlignBottom; + iFlags|=TQt::AlignBottom; break; case 3: - iFlags|=Qt::AlignVCenter; + iFlags|=TQt::AlignVCenter; break; } @@ -133,8 +133,8 @@ void KviInputLookOptionsWidget::commit() -KviInputFeaturesOptionsWidget::KviInputFeaturesOptionsWidget(QWidget * parent) -: KviOptionsWidget(parent,"ircviewfeatures_options_widget") +KviInputFeaturesOptionsWidget::KviInputFeaturesOptionsWidget(TQWidget * tqparent) +: KviOptionsWidget(tqparent,"ircviewfeatures_options_widget") { createLayout(6,1); diff --git a/src/modules/options/optw_input.h b/src/modules/options/optw_input.h index eb088460..0642ee71 100644 --- a/src/modules/options/optw_input.h +++ b/src/modules/options/optw_input.h @@ -26,7 +26,7 @@ //================================================================================== #include "kvi_optionswidget.h" -#include +#include #define KVI_OPTIONS_WIDGET_ICON_KviInputLookOptionsWidget KVI_SMALLICON_INPUT #define KVI_OPTIONS_WIDGET_NAME_KviInputLookOptionsWidget __tr2qs_no_lookup("Input") @@ -36,11 +36,12 @@ class KviInputLookOptionsWidget : public KviOptionsWidget { Q_OBJECT + TQ_OBJECT private: - QComboBox* m_pHorizontalAlign; - QComboBox* m_pVerticalAlign; + TQComboBox* m_pHorizontalAlign; + TQComboBox* m_pVerticalAlign; public: - KviInputLookOptionsWidget(QWidget * parent); + KviInputLookOptionsWidget(TQWidget * tqparent); ~KviInputLookOptionsWidget(); virtual void commit(); @@ -53,8 +54,9 @@ public: class KviInputFeaturesOptionsWidget : public KviOptionsWidget { Q_OBJECT + TQ_OBJECT public: - KviInputFeaturesOptionsWidget(QWidget * parent); + KviInputFeaturesOptionsWidget(TQWidget * tqparent); ~KviInputFeaturesOptionsWidget(); }; diff --git a/src/modules/options/optw_interfacefeatures.cpp b/src/modules/options/optw_interfacefeatures.cpp index 3cae7662..0eb2766e 100644 --- a/src/modules/options/optw_interfacefeatures.cpp +++ b/src/modules/options/optw_interfacefeatures.cpp @@ -24,8 +24,8 @@ #include "optw_interfacefeatures.h" -#include -#include +#include +#include #include #include "kvi_options.h" @@ -33,8 +33,8 @@ #include "kvi_app.h" #include "kvi_fileutils.h" -KviInterfaceFeaturesOptionsWidget::KviInterfaceFeaturesOptionsWidget(QWidget * parent) -: KviOptionsWidget(parent,"interfacefeatures_options_widget") +KviInterfaceFeaturesOptionsWidget::KviInterfaceFeaturesOptionsWidget(TQWidget * tqparent) +: KviOptionsWidget(tqparent,"interfacefeatures_options_widget") { createLayout(8,1); @@ -44,7 +44,7 @@ KviInterfaceFeaturesOptionsWidget::KviInterfaceFeaturesOptionsWidget(QWidget * p addBoolSelector(0,1,0,1,__tr2qs_ctx("Confirm quit with active connections","options"),KviOption_boolConfirmCloseWhenThereAreConnections); addBoolSelector(0,2,0,2,__tr2qs_ctx("Remember window properties","options"),KviOption_boolWindowsRememberProperties); - QString szSplashDisableFile; + TQString szSplashDisableFile; g_pApp->getLocalKvircDirectory(szSplashDisableFile,KviApp::Pics,"disable-splash." KVI_VERSION); bool bDisableSplash = KviFileUtils::fileExists(szSplashDisableFile); m_pDisableSplash = new KviStyledCheckBox(__tr2qs_ctx("Disable splash screen","options"),this); @@ -71,7 +71,7 @@ void KviInterfaceFeaturesOptionsWidget::commit() { KviOptionsWidget::commit(); - QString szSplashDisableFile; + TQString szSplashDisableFile; g_pApp->getLocalKvircDirectory(szSplashDisableFile,KviApp::Pics,"disable-splash." KVI_VERSION); if(m_pDisableSplash->isChecked()) diff --git a/src/modules/options/optw_interfacefeatures.h b/src/modules/options/optw_interfacefeatures.h index f85dfb9e..d302ce21 100644 --- a/src/modules/options/optw_interfacefeatures.h +++ b/src/modules/options/optw_interfacefeatures.h @@ -31,16 +31,17 @@ #define KVI_OPTIONS_WIDGET_NAME_KviInterfaceFeaturesOptionsWidget __tr2qs_no_lookup("Interface") #define KVI_OPTIONS_WIDGET_PRIORITY_KviInterfaceFeaturesOptionsWidget 50000 -class QCheckBox; +class TQCheckBox; class KviInterfaceFeaturesOptionsWidget : public KviOptionsWidget { Q_OBJECT + TQ_OBJECT public: - KviInterfaceFeaturesOptionsWidget(QWidget * parent); + KviInterfaceFeaturesOptionsWidget(TQWidget * tqparent); ~KviInterfaceFeaturesOptionsWidget(); protected: - QCheckBox * m_pDisableSplash; + TQCheckBox * m_pDisableSplash; public: virtual void commit(); }; diff --git a/src/modules/options/optw_interfacelookglobal.cpp b/src/modules/options/optw_interfacelookglobal.cpp index 50cf845f..5b7dde18 100644 --- a/src/modules/options/optw_interfacelookglobal.cpp +++ b/src/modules/options/optw_interfacelookglobal.cpp @@ -22,7 +22,7 @@ #include "optw_interfacelookglobal.h" -#include +#include #include "kvi_settings.h" #include "kvi_options.h" @@ -31,8 +31,8 @@ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -KviThemeGeneralOptionsWidget::KviThemeGeneralOptionsWidget(QWidget * parent) -: KviOptionsWidget(parent) +KviThemeGeneralOptionsWidget::KviThemeGeneralOptionsWidget(TQWidget * tqparent) +: KviOptionsWidget(tqparent) { createLayout(4,2); @@ -41,7 +41,7 @@ KviThemeGeneralOptionsWidget::KviThemeGeneralOptionsWidget(QWidget * parent) KviFontSelector * f = addFontSelector(0,2,1,2,__tr2qs_ctx("Global application font:","options"),KviOption_fontApplication, KVI_OPTION_BOOL(KviOption_boolUseGlobalApplicationFont)); - connect(b,SIGNAL(toggled(bool)),f,SLOT(setEnabled(bool))); + connect(b,TQT_SIGNAL(toggled(bool)),f,TQT_SLOT(setEnabled(bool))); addRowSpacer(0,3,1,3); } @@ -53,8 +53,8 @@ KviThemeGeneralOptionsWidget::~KviThemeGeneralOptionsWidget() //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -KviThemeTransparencyOptionsWidget::KviThemeTransparencyOptionsWidget(QWidget * parent) -: KviOptionsWidget(parent) +KviThemeTransparencyOptionsWidget::KviThemeTransparencyOptionsWidget(TQWidget * tqparent) +: KviOptionsWidget(tqparent) { #ifdef COMPILE_PSEUDO_TRANSPARENCY @@ -82,38 +82,38 @@ KviThemeTransparencyOptionsWidget::KviThemeTransparencyOptionsWidget(QWidget * p KviUIntSelector * u = addUIntSelector(0,1,1,1,__tr2qs_ctx("Child window opacity:","options"),KviOption_uintGlobalTransparencyChildFadeFactor, 0,100,35,KVI_OPTION_BOOL(KviOption_boolUseGlobalPseudoTransparency)); - connect(m_pUseTransparencyBoolSelector,SIGNAL(toggled(bool)),u,SLOT(setEnabled(bool))); + connect(m_pUseTransparencyBoolSelector,TQT_SIGNAL(toggled(bool)),u,TQT_SLOT(setEnabled(bool))); u = addUIntSelector(0,2,1,2,__tr2qs_ctx("Parent window opacity:","options"),KviOption_uintGlobalTransparencyParentFadeFactor, 0,100,10,KVI_OPTION_BOOL(KviOption_boolUseGlobalPseudoTransparency)); - connect(m_pUseTransparencyBoolSelector,SIGNAL(toggled(bool)),u,SLOT(setEnabled(bool))); + connect(m_pUseTransparencyBoolSelector,TQT_SIGNAL(toggled(bool)),u,TQT_SLOT(setEnabled(bool))); KviColorSelector * c = addColorSelector(0,3,1,3,__tr2qs_ctx("Blend color:","options"),KviOption_colorGlobalTransparencyFade, KVI_OPTION_BOOL(KviOption_boolUseGlobalPseudoTransparency)); - connect(m_pUseTransparencyBoolSelector,SIGNAL(toggled(bool)),c,SLOT(setEnabled(bool))); + connect(m_pUseTransparencyBoolSelector,TQT_SIGNAL(toggled(bool)),c,TQT_SLOT(setEnabled(bool))); // addRowSpacer(0,13,0,13); #ifdef COMPILE_KDE_SUPPORT m_pObtainBackgroundFromKdeBoolSelector = addBoolSelector(0,4,1,4,__tr2qs_ctx("Use KDE desktop for transparency","options"),KviOption_boolObtainGlobalBackgroundFromKde, KVI_OPTION_BOOL(KviOption_boolUseGlobalPseudoTransparency)); - connect(m_pUseTransparencyBoolSelector,SIGNAL(toggled(bool)),m_pObtainBackgroundFromKdeBoolSelector,SLOT(setEnabled(bool))); - connect(m_pObtainBackgroundFromKdeBoolSelector,SIGNAL(toggled(bool)),this,SLOT(enableUpdateKdeBackgroundBoolSelector(bool))); + connect(m_pUseTransparencyBoolSelector,TQT_SIGNAL(toggled(bool)),m_pObtainBackgroundFromKdeBoolSelector,TQT_SLOT(setEnabled(bool))); + connect(m_pObtainBackgroundFromKdeBoolSelector,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(enableUpdateKdeBackgroundBoolSelector(bool))); m_pUpdateKdeBackgroundOnChangeBoolSelector = addBoolSelector(0,5,1,5,__tr2qs_ctx("Keep in sync with KDE background changes","options"),KviOption_boolUpdateKdeBackgroundOnChange, KVI_OPTION_BOOL(KviOption_boolUseGlobalPseudoTransparency) && KVI_OPTION_BOOL(KviOption_boolObtainGlobalBackgroundFromKde)); m_pGlobalBackgroundPixmapSelector = addPixmapSelector(0,6,1,6,__tr2qs_ctx("Transparency blend image:","options"),KviOption_pixmapGlobalTransparencyBackground, KVI_OPTION_BOOL(KviOption_boolUseGlobalPseudoTransparency) && !KVI_OPTION_BOOL(KviOption_boolObtainGlobalBackgroundFromKde)); - layout()->setRowStretch(6,1); - connect(m_pObtainBackgroundFromKdeBoolSelector,SIGNAL(toggled(bool)),this,SLOT(enableGlobalBackgroundPixmapSelector(bool))); + tqlayout()->setRowStretch(6,1); + connect(m_pObtainBackgroundFromKdeBoolSelector,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(enableGlobalBackgroundPixmapSelector(bool))); #else //!COMPILE_KDE_SUPPORT m_pGlobalBackgroundPixmapSelector = addPixmapSelector(0,4,1,4,__tr2qs_ctx("Transparency blend image:","options"),KviOption_pixmapGlobalTransparencyBackground, KVI_OPTION_BOOL(KviOption_boolUseGlobalPseudoTransparency)); - layout()->setRowStretch(4,1); + tqlayout()->setRowStretch(4,1); #endif //!COMPILE_KDE_SUPPORT - connect(m_pUseTransparencyBoolSelector,SIGNAL(toggled(bool)),this,SLOT(enableGlobalBackgroundPixmapSelector(bool))); - connect(m_pUseTransparencyBoolSelector,SIGNAL(toggled(bool)),this,SLOT(enableUpdateKdeBackgroundBoolSelector(bool))); + connect(m_pUseTransparencyBoolSelector,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(enableGlobalBackgroundPixmapSelector(bool))); + connect(m_pUseTransparencyBoolSelector,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(enableUpdateKdeBackgroundBoolSelector(bool))); #else createLayout(1,1); addRowSpacer(0,0,0,0); @@ -147,8 +147,8 @@ void KviThemeTransparencyOptionsWidget::enableUpdateKdeBackgroundBoolSelector(bo //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -KviThemeMdiCaptionsOptionsWidget::KviThemeMdiCaptionsOptionsWidget(QWidget * parent) -: KviOptionsWidget(parent) +KviThemeMdiCaptionsOptionsWidget::KviThemeMdiCaptionsOptionsWidget(TQWidget * tqparent) +: KviOptionsWidget(tqparent) { createLayout(7,1); @@ -169,15 +169,15 @@ KviThemeMdiCaptionsOptionsWidget::~KviThemeMdiCaptionsOptionsWidget() //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -KviThemeMdiAreaOptionsWidget::KviThemeMdiAreaOptionsWidget(QWidget * parent) -: KviOptionsWidget(parent) +KviThemeMdiAreaOptionsWidget::KviThemeMdiAreaOptionsWidget(TQWidget * tqparent) +: KviOptionsWidget(tqparent) { createLayout(2,1); addColorSelector(0,0,0,0,__tr2qs_ctx("Background","options"),KviOption_colorMdiBackground); addPixmapSelector(0,1,0,1,__tr2qs_ctx("Background Image","options"),KviOption_pixmapMdiBackground); - layout()->setRowStretch(1,1); + tqlayout()->setRowStretch(1,1); } KviThemeMdiAreaOptionsWidget::~KviThemeMdiAreaOptionsWidget() @@ -187,8 +187,8 @@ KviThemeMdiAreaOptionsWidget::~KviThemeMdiAreaOptionsWidget() //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -KviThemeToolBarAppletsOptionsWidget::KviThemeToolBarAppletsOptionsWidget(QWidget * parent) -: KviOptionsWidget(parent) +KviThemeToolBarAppletsOptionsWidget::KviThemeToolBarAppletsOptionsWidget(TQWidget * tqparent) +: KviOptionsWidget(tqparent) { createLayout(9,1); @@ -204,7 +204,7 @@ KviThemeToolBarAppletsOptionsWidget::KviThemeToolBarAppletsOptionsWidget(QWidget addPixmapSelector(0,8,0,8,__tr2qs_ctx("Background Image","options"),KviOption_pixmapIrcToolBarAppletBackground); - layout()->setRowStretch(8,1); + tqlayout()->setRowStretch(8,1); } KviThemeToolBarAppletsOptionsWidget::~KviThemeToolBarAppletsOptionsWidget() diff --git a/src/modules/options/optw_interfacelookglobal.h b/src/modules/options/optw_interfacelookglobal.h index ac4153b1..a631dbe8 100644 --- a/src/modules/options/optw_interfacelookglobal.h +++ b/src/modules/options/optw_interfacelookglobal.h @@ -37,8 +37,9 @@ class KviThemeGeneralOptionsWidget : public KviOptionsWidget { Q_OBJECT + TQ_OBJECT public: - KviThemeGeneralOptionsWidget(QWidget * parent); + KviThemeGeneralOptionsWidget(TQWidget * tqparent); ~KviThemeGeneralOptionsWidget(); }; @@ -52,8 +53,9 @@ public: class KviThemeTransparencyOptionsWidget : public KviOptionsWidget { Q_OBJECT + TQ_OBJECT public: - KviThemeTransparencyOptionsWidget(QWidget * parent); + KviThemeTransparencyOptionsWidget(TQWidget * tqparent); ~KviThemeTransparencyOptionsWidget(); protected: #ifdef COMPILE_PSEUDO_TRANSPARENCY @@ -78,8 +80,9 @@ protected slots: class KviThemeMdiCaptionsOptionsWidget : public KviOptionsWidget { Q_OBJECT + TQ_OBJECT public: - KviThemeMdiCaptionsOptionsWidget(QWidget * parent); + KviThemeMdiCaptionsOptionsWidget(TQWidget * tqparent); ~KviThemeMdiCaptionsOptionsWidget(); }; @@ -91,8 +94,9 @@ public: class KviThemeMdiAreaOptionsWidget : public KviOptionsWidget { Q_OBJECT + TQ_OBJECT public: - KviThemeMdiAreaOptionsWidget(QWidget * parent); + KviThemeMdiAreaOptionsWidget(TQWidget * tqparent); ~KviThemeMdiAreaOptionsWidget(); }; @@ -105,8 +109,9 @@ public: class KviThemeToolBarAppletsOptionsWidget : public KviOptionsWidget { Q_OBJECT + TQ_OBJECT public: - KviThemeToolBarAppletsOptionsWidget(QWidget * parent); + KviThemeToolBarAppletsOptionsWidget(TQWidget * tqparent); ~KviThemeToolBarAppletsOptionsWidget(); }; diff --git a/src/modules/options/optw_irc.cpp b/src/modules/options/optw_irc.cpp index 537fde9a..56552a23 100644 --- a/src/modules/options/optw_irc.cpp +++ b/src/modules/options/optw_irc.cpp @@ -28,11 +28,11 @@ #include "kvi_options.h" #include "kvi_ircmask.h" -#include +#include -KviIrcOptionsWidget::KviIrcOptionsWidget(QWidget * parent) -: KviOptionsWidget(parent,"irc_options_widget") +KviIrcOptionsWidget::KviIrcOptionsWidget(TQWidget * tqparent) +: KviOptionsWidget(tqparent,"irc_options_widget") { } @@ -42,8 +42,8 @@ KviIrcOptionsWidget::~KviIrcOptionsWidget() } -KviIrcGeneralOptionsWidget::KviIrcGeneralOptionsWidget(QWidget * parent) -: KviOptionsWidget(parent,"irc_options_widget") +KviIrcGeneralOptionsWidget::KviIrcGeneralOptionsWidget(TQWidget * tqparent) +: KviOptionsWidget(tqparent,"irc_options_widget") { createLayout(3,1); KviBoolSelector *b = addBoolSelector(0,0,0,0,__tr2qs_ctx("Minimize console after successful login","options"),KviOption_boolMinimizeConsoleAfterConnect); @@ -68,18 +68,18 @@ KviIrcGeneralOptionsWidget::~KviIrcGeneralOptionsWidget() -KviIrcAdvancedOptionsWidget::KviIrcAdvancedOptionsWidget(QWidget * parent) -: KviOptionsWidget(parent,"irc_advanced_options_widget") +KviIrcAdvancedOptionsWidget::KviIrcAdvancedOptionsWidget(TQWidget * tqparent) +: KviOptionsWidget(tqparent,"irc_advanced_options_widget") { createLayout(3,1); KviBoolSelector *b = addBoolSelector(0,0,0,0,__tr2qs_ctx("Force immediate quit","options"),KviOption_boolForceBrutalQuit); #ifdef COMPILE_INFO_TIPS mergeTip(b, __tr2qs_ctx("
This option causes KVIrc to close " \ - "the connection immediately after sending the QUIT message.
" \ + "the connection immediately after sending the TQUIT message.
" \ "When this option is disabled, KVIrc will wait for the server " \ "to close the connection.
" \ - "Note that if you use this, your QUIT message may be not displayed.
","options")); + "Note that if you use this, your TQUIT message may be not displayed.
","options")); #endif addBoolSelector(0,1,0,1,__tr2qs_ctx("Prepend gender info to realname","options"),KviOption_boolPrependGenderInfoToRealname); } @@ -92,7 +92,7 @@ KviIrcAdvancedOptionsWidget::~KviIrcAdvancedOptionsWidget() -KviChannelOptionsWidget::KviChannelOptionsWidget(QWidget * pParent) +KviChannelOptionsWidget::KviChannelOptionsWidget(TQWidget * pParent) : KviOptionsWidget(pParent) { } @@ -102,7 +102,7 @@ KviChannelOptionsWidget::~KviChannelOptionsWidget() } -KviChannelGeneralOptionsWidget::KviChannelGeneralOptionsWidget(QWidget * pParent) +KviChannelGeneralOptionsWidget::KviChannelGeneralOptionsWidget(TQWidget * pParent) : KviOptionsWidget(pParent) { createLayout(5,1); @@ -160,28 +160,28 @@ KviChannelGeneralOptionsWidget::~KviChannelGeneralOptionsWidget() } -KviChannelAdvancedOptionsWidget::KviChannelAdvancedOptionsWidget(QWidget * pParent) +KviChannelAdvancedOptionsWidget::KviChannelAdvancedOptionsWidget(TQWidget * pParent) : KviOptionsWidget(pParent) { createLayout(6,4); KviBoolSelector * b = addBoolSelector(0,0,4,0,__tr2qs_ctx("Log joined channels history","options"),KviOption_boolLogChannelHistory); - addLabel(0,1,0,1,__tr2qs_ctx("Default ban mask:","options")); + addLabel(0,1,0,1,__tr2qs_ctx("Default ban tqmask:","options")); - m_pBanTypeCombo=new QComboBox(this); + m_pBanTypeCombo=new TQComboBox(this); addWidgetToLayout(m_pBanTypeCombo,1,1,4,1); - KviIrcMask hostmask("nick!user@machine.host.top"); - KviIrcMask ipmask("nick!user@192.168.1.2"); - QString tmp1; - QString tmp2; + KviIrcMask hosttqmask("nick!user@machine.host.top"); + KviIrcMask iptqmask("nick!user@192.168.1.2"); + TQString tmp1; + TQString tmp2; for(int i=0;i<=26;i++) { - hostmask.mask(tmp1,(KviIrcMask::MaskType)i); - ipmask.mask(tmp2,(KviIrcMask::MaskType)i); - m_pBanTypeCombo->insertItem(QString("%1 (%2)").arg(tmp1).arg(tmp2)); + hosttqmask.tqmask(tmp1,(KviIrcMask::MaskType)i); + iptqmask.tqmask(tmp2,(KviIrcMask::MaskType)i); + m_pBanTypeCombo->insertItem(TQString("%1 (%2)").tqarg(tmp1).tqarg(tmp2)); } m_pBanTypeCombo->setCurrentItem(KVI_OPTION_UINT(KviOption_uintDefaultBanType)); diff --git a/src/modules/options/optw_irc.h b/src/modules/options/optw_irc.h index cc33d284..d64c34ff 100644 --- a/src/modules/options/optw_irc.h +++ b/src/modules/options/optw_irc.h @@ -26,7 +26,7 @@ #include "kvi_optionswidget.h" -class QComboBox; +class TQComboBox; #define KVI_OPTIONS_WIDGET_ICON_KviIrcOptionsWidget KVI_SMALLICON_IRC #define KVI_OPTIONS_WIDGET_NAME_KviIrcOptionsWidget __tr2qs_no_lookup("IRC") @@ -36,8 +36,9 @@ class QComboBox; class KviIrcOptionsWidget : public KviOptionsWidget { Q_OBJECT + TQ_OBJECT public: - KviIrcOptionsWidget(QWidget * parent); + KviIrcOptionsWidget(TQWidget * tqparent); ~KviIrcOptionsWidget(); }; @@ -49,8 +50,9 @@ public: class KviIrcGeneralOptionsWidget : public KviOptionsWidget { Q_OBJECT + TQ_OBJECT public: - KviIrcGeneralOptionsWidget(QWidget * parent); + KviIrcGeneralOptionsWidget(TQWidget * tqparent); ~KviIrcGeneralOptionsWidget(); }; @@ -63,8 +65,9 @@ public: class KviIrcAdvancedOptionsWidget : public KviOptionsWidget { Q_OBJECT + TQ_OBJECT public: - KviIrcAdvancedOptionsWidget(QWidget * parent); + KviIrcAdvancedOptionsWidget(TQWidget * tqparent); ~KviIrcAdvancedOptionsWidget(); }; @@ -79,8 +82,9 @@ public: class KviChannelOptionsWidget : public KviOptionsWidget { Q_OBJECT + TQ_OBJECT public: - KviChannelOptionsWidget(QWidget * parent); + KviChannelOptionsWidget(TQWidget * tqparent); ~KviChannelOptionsWidget(); }; @@ -92,8 +96,9 @@ public: class KviChannelGeneralOptionsWidget : public KviOptionsWidget { Q_OBJECT + TQ_OBJECT public: - KviChannelGeneralOptionsWidget(QWidget * parent); + KviChannelGeneralOptionsWidget(TQWidget * tqparent); ~KviChannelGeneralOptionsWidget(); }; @@ -104,13 +109,14 @@ public: class KviChannelAdvancedOptionsWidget : public KviOptionsWidget { Q_OBJECT + TQ_OBJECT public: - KviChannelAdvancedOptionsWidget(QWidget * parent); + KviChannelAdvancedOptionsWidget(TQWidget * tqparent); ~KviChannelAdvancedOptionsWidget(); public: virtual void commit(); protected: - QComboBox * m_pBanTypeCombo; + TQComboBox * m_pBanTypeCombo; }; #endif //_OPTW_IRC_H_ diff --git a/src/modules/options/optw_ircoutput.cpp b/src/modules/options/optw_ircoutput.cpp index cfa28456..83414f33 100644 --- a/src/modules/options/optw_ircoutput.cpp +++ b/src/modules/options/optw_ircoutput.cpp @@ -22,28 +22,28 @@ #include "optw_ircoutput.h" -#include +#include #include "kvi_settings.h" #include "kvi_options.h" #include "kvi_locale.h" -#include -#include +#include +#include #ifdef COMPILE_INFO_TIPS #include "kvi_tal_tooltip.h" #endif -KviIrcOutputOptionsWidget::KviIrcOutputOptionsWidget(QWidget * parent) -: KviOptionsWidget(parent,"ircoutput_options_widget") +KviIrcOutputOptionsWidget::KviIrcOutputOptionsWidget(TQWidget * tqparent) +: KviOptionsWidget(tqparent,"ircoutput_options_widget") { createLayout(7,2); - QLabel * l =new QLabel(__tr2qs_ctx("Output verbosity","options"),this); + TQLabel * l =new TQLabel(__tr2qs_ctx("Output verbosity","options"),this); addWidgetToLayout(l,0,0,0,0); - m_pVerbosityCombo = new QComboBox(false,this); + m_pVerbosityCombo = new TQComboBox(false,this); addWidgetToLayout(m_pVerbosityCombo,1,0,1,0); m_pVerbosityCombo->insertItem(__tr2qs_ctx("Mute","options")); diff --git a/src/modules/options/optw_ircoutput.h b/src/modules/options/optw_ircoutput.h index 27e5c4c8..3c82add2 100644 --- a/src/modules/options/optw_ircoutput.h +++ b/src/modules/options/optw_ircoutput.h @@ -26,7 +26,7 @@ #include "kvi_optionswidget.h" #include "kvi_tal_listview.h" -class QComboBox; +class TQComboBox; #define KVI_OPTIONS_WIDGET_ICON_KviIrcOutputOptionsWidget KVI_SMALLICON_RAW #define KVI_OPTIONS_WIDGET_NAME_KviIrcOutputOptionsWidget __tr2qs_no_lookup("Verbosity And Output") @@ -37,11 +37,12 @@ class QComboBox; class KviIrcOutputOptionsWidget : public KviOptionsWidget { Q_OBJECT + TQ_OBJECT public: - KviIrcOutputOptionsWidget(QWidget * parent); + KviIrcOutputOptionsWidget(TQWidget * tqparent); ~KviIrcOutputOptionsWidget(); protected: - QComboBox * m_pVerbosityCombo; + TQComboBox * m_pVerbosityCombo; protected: virtual void commit(); }; diff --git a/src/modules/options/optw_ircview.cpp b/src/modules/options/optw_ircview.cpp index 860f80c5..1c9e4a28 100644 --- a/src/modules/options/optw_ircview.cpp +++ b/src/modules/options/optw_ircview.cpp @@ -21,13 +21,13 @@ // #include "optw_ircview.h" -#include +#include #include "kvi_options.h" #include "kvi_locale.h" //#warning "Info tips" -KviIrcViewThemeOptionsWidget::KviIrcViewThemeOptionsWidget(QWidget * pParent) +KviIrcViewThemeOptionsWidget::KviIrcViewThemeOptionsWidget(TQWidget * pParent) : KviOptionsWidget(pParent) { } @@ -38,8 +38,8 @@ KviIrcViewThemeOptionsWidget::~KviIrcViewThemeOptionsWidget() //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -KviIrcViewLookOptionsWidget::KviIrcViewLookOptionsWidget(QWidget * parent) -: KviOptionsWidget(parent,"ircviewlook_options_widget") +KviIrcViewLookOptionsWidget::KviIrcViewLookOptionsWidget(TQWidget * tqparent) +: KviOptionsWidget(tqparent,"ircviewlook_options_widget") { createLayout(6,2); @@ -49,11 +49,11 @@ KviIrcViewLookOptionsWidget::KviIrcViewLookOptionsWidget(QWidget * parent) addPixmapSelector(0,2,1,2,__tr2qs_ctx("Background image:","options"),KviOption_pixmapIrcViewBackground); addLabel(0,3,0,3,__tr2qs_ctx("Horizontal align:","options")); - m_pHorizontalAlign=new QComboBox(this); + m_pHorizontalAlign=new TQComboBox(this); addWidgetToLayout(m_pHorizontalAlign,1,3,1,3); addLabel(0,4,0,4,__tr2qs_ctx("Vertical align:","options")); - m_pVerticalAlign=new QComboBox(this); + m_pVerticalAlign=new TQComboBox(this); addWidgetToLayout(m_pVerticalAlign,1,4,1,4); addColorSelector(0,5,1,5,__tr2qs_ctx("Mark Line:","options"),KviOption_colorIrcViewMarkLine); @@ -68,37 +68,37 @@ KviIrcViewLookOptionsWidget::KviIrcViewLookOptionsWidget(QWidget * parent) m_pVerticalAlign->insertItem(__tr2qs_ctx("Bottom","options")); m_pVerticalAlign->insertItem(__tr2qs_ctx("Center","options")); - switch( KVI_OPTION_UINT(KviOption_uintIrcViewPixmapAlign) & Qt::AlignHorizontal_Mask) + switch( KVI_OPTION_UINT(KviOption_uintIrcViewPixmapAlign) & TQt::AlignHorizontal_Mask) { - case Qt::AlignLeft: + case TQt::AlignLeft: m_pHorizontalAlign->setCurrentItem(1); break; - case Qt::AlignRight: + case TQt::AlignRight: m_pHorizontalAlign->setCurrentItem(2); break; - case Qt::AlignHCenter: + case TQt::AlignHCenter: m_pHorizontalAlign->setCurrentItem(3); break; default: m_pHorizontalAlign->setCurrentItem(0); } - switch( KVI_OPTION_UINT(KviOption_uintIrcViewPixmapAlign) & Qt::AlignVertical_Mask) + switch( KVI_OPTION_UINT(KviOption_uintIrcViewPixmapAlign) & TQt::AlignVertical_Mask) { - case Qt::AlignTop: + case TQt::AlignTop: m_pVerticalAlign->setCurrentItem(1); break; - case Qt::AlignBottom: + case TQt::AlignBottom: m_pVerticalAlign->setCurrentItem(2); break; - case Qt::AlignVCenter: + case TQt::AlignVCenter: m_pVerticalAlign->setCurrentItem(3); break; default: m_pVerticalAlign->setCurrentItem(0); } - layout()->setRowStretch(2,1); + tqlayout()->setRowStretch(2,1); } KviIrcViewLookOptionsWidget::~KviIrcViewLookOptionsWidget() @@ -111,25 +111,25 @@ void KviIrcViewLookOptionsWidget::commit() switch(m_pHorizontalAlign->currentItem()) { case 1: - iFlags|=Qt::AlignLeft; + iFlags|=TQt::AlignLeft; break; case 2: - iFlags|=Qt::AlignRight; + iFlags|=TQt::AlignRight; break; case 3: - iFlags|=Qt::AlignHCenter; + iFlags|=TQt::AlignHCenter; break; } switch(m_pVerticalAlign->currentItem()) { case 1: - iFlags|=Qt::AlignTop; + iFlags|=TQt::AlignTop; break; case 2: - iFlags|=Qt::AlignBottom; + iFlags|=TQt::AlignBottom; break; case 3: - iFlags|=Qt::AlignVCenter; + iFlags|=TQt::AlignVCenter; break; } @@ -139,8 +139,8 @@ void KviIrcViewLookOptionsWidget::commit() //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -KviIrcViewFeaturesOptionsWidget::KviIrcViewFeaturesOptionsWidget(QWidget * parent) -: KviOptionsWidget(parent,"ircviewfeatures_options_widget") +KviIrcViewFeaturesOptionsWidget::KviIrcViewFeaturesOptionsWidget(TQWidget * tqparent) +: KviOptionsWidget(tqparent,"ircviewfeatures_options_widget") { createLayout(14,1); diff --git a/src/modules/options/optw_ircview.h b/src/modules/options/optw_ircview.h index 3da03a5a..0f7fbfa7 100644 --- a/src/modules/options/optw_ircview.h +++ b/src/modules/options/optw_ircview.h @@ -27,7 +27,7 @@ #include "kvi_optionswidget.h" -#include +#include #define KVI_OPTIONS_WIDGET_ICON_KviIrcViewThemeOptionsWidget KVI_SMALLICON_IRCVIEW @@ -39,8 +39,9 @@ class KviIrcViewThemeOptionsWidget : public KviOptionsWidget { Q_OBJECT + TQ_OBJECT public: - KviIrcViewThemeOptionsWidget(QWidget * pParent); + KviIrcViewThemeOptionsWidget(TQWidget * pParent); ~KviIrcViewThemeOptionsWidget(); }; @@ -54,11 +55,12 @@ public: class KviIrcViewLookOptionsWidget : public KviOptionsWidget { Q_OBJECT + TQ_OBJECT private: - QComboBox* m_pHorizontalAlign; - QComboBox* m_pVerticalAlign; + TQComboBox* m_pHorizontalAlign; + TQComboBox* m_pVerticalAlign; public: - KviIrcViewLookOptionsWidget(QWidget * parent); + KviIrcViewLookOptionsWidget(TQWidget * tqparent); ~KviIrcViewLookOptionsWidget(); public: virtual void commit(); @@ -73,8 +75,9 @@ public: class KviIrcViewFeaturesOptionsWidget : public KviOptionsWidget { Q_OBJECT + TQ_OBJECT public: - KviIrcViewFeaturesOptionsWidget(QWidget * parent); + KviIrcViewFeaturesOptionsWidget(TQWidget * tqparent); ~KviIrcViewFeaturesOptionsWidget(); }; diff --git a/src/modules/options/optw_lag.cpp b/src/modules/options/optw_lag.cpp index 8c9cf201..89786184 100644 --- a/src/modules/options/optw_lag.cpp +++ b/src/modules/options/optw_lag.cpp @@ -23,7 +23,7 @@ #include "optw_lag.h" -#include +#include #include "kvi_tal_tooltip.h" #include "kvi_options.h" @@ -32,8 +32,8 @@ //#warning "Info tips" -KviLagOptionsWidget::KviLagOptionsWidget(QWidget * parent) -: KviOptionsWidget(parent,"lag_options_widget") +KviLagOptionsWidget::KviLagOptionsWidget(TQWidget * tqparent) +: KviOptionsWidget(tqparent,"lag_options_widget") { createLayout(3,1); @@ -53,7 +53,7 @@ KviLagOptionsWidget::KviLagOptionsWidget(QWidget * parent) "the pings (if any) will be sent really less often. " \ "5000 is a reasonable value.","options")); #endif - connect(pUse,SIGNAL(toggled(bool)),pInterval,SLOT(setEnabled(bool))); + connect(pUse,TQT_SIGNAL(toggled(bool)),pInterval,TQT_SLOT(setEnabled(bool))); KviUIntSelector * pAlarm = addUIntSelector(g, __tr2qs_ctx("Trigger event if lag exceeds:","options"), KviOption_uintLagAlarmTime,5000,1000000,30000, KVI_OPTION_BOOL(KviOption_boolUseLagMeterEngine)); pAlarm->setSuffix(__tr2qs_ctx(" msec","options")); @@ -63,15 +63,15 @@ KviLagOptionsWidget::KviLagOptionsWidget(QWidget * parent) "the threshold OnLagAlarmTimeUp will be triggered and when the lag falls " \ "back below the threshold then OnLagAlarmTimeDown will be triggered","options")); #endif - connect(pUse,SIGNAL(toggled(bool)),pAlarm,SLOT(setEnabled(bool))); + connect(pUse,TQT_SIGNAL(toggled(bool)),pAlarm,TQT_SLOT(setEnabled(bool))); KviBoolSelector * pShow = addBoolSelector(g, __tr2qs_ctx("Show lag in IRC context display","options"), KviOption_boolShowLagOnContextDisplay, KVI_OPTION_BOOL(KviOption_boolUseLagMeterEngine)); #ifdef COMPILE_INFO_TIPS mergeTip(pShow,__tr2qs_ctx("
This makes the IRC context display applet show the current lag after the user's nickname (in seconds)
","options")); #endif - connect(pUse,SIGNAL(toggled(bool)),pShow,SLOT(setEnabled(bool))); - connect(pUse,SIGNAL(toggled(bool)),g,SLOT(setEnabled(bool))); + connect(pUse,TQT_SIGNAL(toggled(bool)),pShow,TQT_SLOT(setEnabled(bool))); + connect(pUse,TQT_SIGNAL(toggled(bool)),g,TQT_SLOT(setEnabled(bool))); addRowSpacer(0,2,0,2); diff --git a/src/modules/options/optw_lag.h b/src/modules/options/optw_lag.h index 7e49cafd..065c884f 100644 --- a/src/modules/options/optw_lag.h +++ b/src/modules/options/optw_lag.h @@ -32,8 +32,9 @@ class KviLagOptionsWidget : public KviOptionsWidget { Q_OBJECT + TQ_OBJECT public: - KviLagOptionsWidget(QWidget * parent); + KviLagOptionsWidget(TQWidget * tqparent); ~KviLagOptionsWidget(); }; diff --git a/src/modules/options/optw_logging.cpp b/src/modules/options/optw_logging.cpp index 9d77836d..87b998a2 100644 --- a/src/modules/options/optw_logging.cpp +++ b/src/modules/options/optw_logging.cpp @@ -23,7 +23,7 @@ #include "optw_logging.h" -#include +#include #include "kvi_options.h" #include "kvi_locale.h" @@ -31,8 +31,8 @@ //#warning "Info tips" -KviLoggingOptionsWidget::KviLoggingOptionsWidget(QWidget * parent) -: KviOptionsWidget(parent,"logging_options_widget") +KviLoggingOptionsWidget::KviLoggingOptionsWidget(TQWidget * tqparent) +: KviOptionsWidget(tqparent,"logging_options_widget") { createLayout(4,1); diff --git a/src/modules/options/optw_logging.h b/src/modules/options/optw_logging.h index f3f3e1c4..ede7d413 100644 --- a/src/modules/options/optw_logging.h +++ b/src/modules/options/optw_logging.h @@ -34,8 +34,9 @@ class KviLoggingOptionsWidget : public KviOptionsWidget { Q_OBJECT + TQ_OBJECT public: - KviLoggingOptionsWidget(QWidget * parent); + KviLoggingOptionsWidget(TQWidget * tqparent); ~KviLoggingOptionsWidget(); }; diff --git a/src/modules/options/optw_mediatypes.cpp b/src/modules/options/optw_mediatypes.cpp index c798a4eb..0b0d7c5e 100644 --- a/src/modules/options/optw_mediatypes.cpp +++ b/src/modules/options/optw_mediatypes.cpp @@ -22,8 +22,8 @@ #include "optw_mediatypes.h" -#include -#include +#include +#include #include "kvi_tal_tooltip.h" #include "kvi_options.h" @@ -62,8 +62,8 @@ void KviMediaTypeListViewItem::copyData(KviMediaType * t) setText(2,m_data.szDescription.ptr()); } -KviMediaTypesOptionsWidget::KviMediaTypesOptionsWidget(QWidget * parent) -: KviOptionsWidget(parent,"mediatypes_options_widget") +KviMediaTypesOptionsWidget::KviMediaTypesOptionsWidget(TQWidget * tqparent) +: KviOptionsWidget(tqparent,"mediatypes_options_widget") { createLayout(11,3); @@ -75,74 +75,74 @@ KviMediaTypesOptionsWidget::KviMediaTypesOptionsWidget(QWidget * parent) - connect(m_pListView,SIGNAL(currentChanged(KviTalListViewItem *)),this,SLOT(currentItemChanged(KviTalListViewItem *))); + connect(m_pListView,TQT_SIGNAL(currentChanged(KviTalListViewItem *)),this,TQT_SLOT(currentItemChanged(KviTalListViewItem *))); - layout()->addMultiCellWidget(m_pListView,0,0,0,2); + tqlayout()->addMultiCellWidget(m_pListView,0,0,0,2); - QLabel * l = new QLabel(__tr2qs_ctx("Description:","options"),this); - layout()->addWidget(l,1,0); - m_pDescription = new QLineEdit(this); - layout()->addMultiCellWidget(m_pDescription,1,1,1,2); + TQLabel * l = new TQLabel(__tr2qs_ctx("Description:","options"),this); + tqlayout()->addWidget(l,1,0); + m_pDescription = new TQLineEdit(this); + tqlayout()->addMultiCellWidget(m_pDescription,1,1,1,2); - l = new QLabel(__tr2qs_ctx("MIME type:","options"),this); - layout()->addWidget(l,2,0); - m_pIanaType = new QLineEdit(this); - layout()->addMultiCellWidget(m_pIanaType,2,2,1,2); + l = new TQLabel(__tr2qs_ctx("MIME type:","options"),this); + tqlayout()->addWidget(l,2,0); + m_pIanaType = new TQLineEdit(this); + tqlayout()->addMultiCellWidget(m_pIanaType,2,2,1,2); - l = new QLabel(__tr2qs_ctx("File pattern:","options"),this); - layout()->addWidget(l,3,0); - m_pFileMask = new QLineEdit(this); - layout()->addMultiCellWidget(m_pFileMask,3,3,1,2); + l = new TQLabel(__tr2qs_ctx("File pattern:","options"),this); + tqlayout()->addWidget(l,3,0); + m_pFileMask = new TQLineEdit(this); + tqlayout()->addMultiCellWidget(m_pFileMask,3,3,1,2); - l = new QLabel(__tr2qs_ctx("Magic bytes:","options"),this); - layout()->addWidget(l,4,0); - m_pMagicBytes = new QLineEdit(this); - layout()->addMultiCellWidget(m_pMagicBytes,4,4,1,2); + l = new TQLabel(__tr2qs_ctx("Magic bytes:","options"),this); + tqlayout()->addWidget(l,4,0); + m_pMagicBytes = new TQLineEdit(this); + tqlayout()->addMultiCellWidget(m_pMagicBytes,4,4,1,2); - l = new QLabel(__tr2qs_ctx("Save path:","options"),this); - layout()->addWidget(l,5,0); - m_pSavePath = new QLineEdit(this); - layout()->addMultiCellWidget(m_pSavePath,5,5,1,2); + l = new TQLabel(__tr2qs_ctx("Save path:","options"),this); + tqlayout()->addWidget(l,5,0); + m_pSavePath = new TQLineEdit(this); + tqlayout()->addMultiCellWidget(m_pSavePath,5,5,1,2); - l = new QLabel(__tr2qs_ctx("Local open command:","options"),this); - layout()->addWidget(l,6,0); - m_pCommandline = new QLineEdit(this); - layout()->addMultiCellWidget(m_pCommandline,6,6,1,2); + l = new TQLabel(__tr2qs_ctx("Local open command:","options"),this); + tqlayout()->addWidget(l,6,0); + m_pCommandline = new TQLineEdit(this); + tqlayout()->addMultiCellWidget(m_pCommandline,6,6,1,2); #ifdef COMPILE_INFO_TIPS mergeTip(m_pCommandline,__tr2qs_ctx("
This field contains the command to execute to open a local file.
" \ "$0 is used in place of the filename
","options")); #endif - l = new QLabel(__tr2qs_ctx("Remote open command:","options"),this); - layout()->addWidget(l,7,0); - m_pRemoteExecCommandline = new QLineEdit(this); - layout()->addMultiCellWidget(m_pRemoteExecCommandline,7,7,1,2); + l = new TQLabel(__tr2qs_ctx("Remote open command:","options"),this); + tqlayout()->addWidget(l,7,0); + m_pRemoteExecCommandline = new TQLineEdit(this); + tqlayout()->addMultiCellWidget(m_pRemoteExecCommandline,7,7,1,2); #ifdef COMPILE_INFO_TIPS mergeTip(m_pRemoteExecCommandline,__tr2qs_ctx("
This field contains the command to execute when automatically opening a received file.
" \ "$0 is used in place of the filename
","options")); #endif - l = new QLabel(__tr2qs_ctx("Icon","options"),this); - layout()->addWidget(l,8,0); - m_pIcon = new QLineEdit(this); - layout()->addMultiCellWidget(m_pIcon,8,8,1,2); + l = new TQLabel(__tr2qs_ctx("Icon","options"),this); + tqlayout()->addWidget(l,8,0); + m_pIcon = new TQLineEdit(this); + tqlayout()->addMultiCellWidget(m_pIcon,8,8,1,2); - QFrame * f = new QFrame(this); - f->setFrameStyle(QFrame::Sunken | QFrame::HLine); - layout()->addMultiCellWidget(f,9,9,0,2); + TQFrame * f = new TQFrame(this); + f->setFrameStyle(TQFrame::Sunken | TQFrame::HLine); + tqlayout()->addMultiCellWidget(f,9,9,0,2); - QPushButton * b = new QPushButton(__tr2qs_ctx("&New","options"),this); - connect(b,SIGNAL(clicked()),this,SLOT(newMediaType())); - layout()->addWidget(b,10,1); + TQPushButton * b = new TQPushButton(__tr2qs_ctx("&New","options"),this); + connect(b,TQT_SIGNAL(clicked()),this,TQT_SLOT(newMediaType())); + tqlayout()->addWidget(b,10,1); - m_pDelete = new QPushButton(__tr2qs_ctx("Re&move","options"),this); - connect(m_pDelete,SIGNAL(clicked()),this,SLOT(delMediaType())); - layout()->addWidget(m_pDelete,10,2); + m_pDelete = new TQPushButton(__tr2qs_ctx("Re&move","options"),this); + connect(m_pDelete,TQT_SIGNAL(clicked()),this,TQT_SLOT(delMediaType())); + tqlayout()->addWidget(m_pDelete,10,2); - layout()->setColStretch(1,1); - layout()->setColStretch(2,1); - layout()->setRowStretch(0,1); + tqlayout()->setColStretch(1,1); + tqlayout()->setColStretch(2,1); + tqlayout()->setRowStretch(0,1); m_pLastItem = 0; diff --git a/src/modules/options/optw_mediatypes.h b/src/modules/options/optw_mediatypes.h index 22fab930..06de7f7c 100644 --- a/src/modules/options/optw_mediatypes.h +++ b/src/modules/options/optw_mediatypes.h @@ -25,8 +25,8 @@ #include "kvi_optionswidget.h" #include "kvi_tal_listview.h" -#include -#include +#include +#include #include "kvi_mediatype.h" @@ -52,20 +52,21 @@ public: class KviMediaTypesOptionsWidget : public KviOptionsWidget { Q_OBJECT + TQ_OBJECT public: - KviMediaTypesOptionsWidget(QWidget * parent); + KviMediaTypesOptionsWidget(TQWidget * tqparent); ~KviMediaTypesOptionsWidget(); private: KviTalListView * m_pListView; - QLineEdit * m_pDescription; - QLineEdit * m_pIanaType; - QLineEdit * m_pFileMask; - QLineEdit * m_pSavePath; - QLineEdit * m_pCommandline; - QLineEdit * m_pMagicBytes; - QLineEdit * m_pRemoteExecCommandline; - QLineEdit * m_pIcon; - QPushButton * m_pDelete; + TQLineEdit * m_pDescription; + TQLineEdit * m_pIanaType; + TQLineEdit * m_pFileMask; + TQLineEdit * m_pSavePath; + TQLineEdit * m_pCommandline; + TQLineEdit * m_pMagicBytes; + TQLineEdit * m_pRemoteExecCommandline; + TQLineEdit * m_pIcon; + TQPushButton * m_pDelete; KviMediaTypeListViewItem * m_pLastItem; private: void fillListView(); diff --git a/src/modules/options/optw_messages.cpp b/src/modules/options/optw_messages.cpp index 54b4629a..9e79daa5 100644 --- a/src/modules/options/optw_messages.cpp +++ b/src/modules/options/optw_messages.cpp @@ -26,11 +26,11 @@ #include "optw_messages.h" -#include -#include +#include +#include #include "kvi_tal_vbox.h" -#include -#include +#include +#include #include "kvi_styled_controls.h" #include "kvi_settings.h" @@ -50,11 +50,11 @@ //#warning "Info tips" #ifdef COMPILE_PSEUDO_TRANSPARENCY - extern KVIRC_API QPixmap * g_pShadedChildGlobalDesktopBackground; + extern KVIRC_API TQPixmap * g_pShadedChildGlobalDesktopBackground; #endif -KviMessageOptionsWidget::KviMessageOptionsWidget(QWidget * pParent) +KviMessageOptionsWidget::KviMessageOptionsWidget(TQWidget * pParent) : KviOptionsWidget(pParent) { } @@ -68,8 +68,8 @@ KviMessageOptionsWidget::~KviMessageOptionsWidget() //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -KviPrivmsgOptionsWidget::KviPrivmsgOptionsWidget(QWidget * parent) -: KviOptionsWidget(parent,"privmsg_options_widget") +KviPrivmsgOptionsWidget::KviPrivmsgOptionsWidget(TQWidget * tqparent) +: KviOptionsWidget(tqparent,"privmsg_options_widget") { createLayout(4,1); @@ -89,33 +89,33 @@ KviPrivmsgOptionsWidget::KviPrivmsgOptionsWidget(QWidget * parent) b1 = addBoolSelector(g,__tr2qs_ctx("\"Smart\" nickname colors","options"),KviOption_boolColorNicks); b2 = addBoolSelector(g,__tr2qs_ctx("Use same colors as in the userlist","options"),KviOption_boolUseUserListColorsAsNickColors,!KVI_OPTION_BOOL(KviOption_boolColorNicks)); - connect(b1,SIGNAL(toggled(bool)),b2,SLOT(setNotEnabled(bool))); + connect(b1,TQT_SIGNAL(toggled(bool)),b2,TQT_SLOT(setNotEnabled(bool))); addBoolSelector(g,__tr2qs_ctx("Show nicknames in bold","options"),KviOption_boolBoldedNicks); addBoolSelector(g,__tr2qs_ctx("Show user and host","options"),KviOption_boolShowUserAndHostInPrivmsgView); addBoolSelector(g,__tr2qs_ctx("Show channel mode prefix","options"),KviOption_boolShowChannelUserFlagInPrivmsgView); KviBoolSelector * b = addBoolSelector(g,__tr2qs_ctx("User-defined prefix and postfix","options"),KviOption_boolUseExtendedPrivmsgView); - QLabel * l = addLabel(g,__tr2qs_ctx("[PREFIX]nickname[!user@host][POSTFIX] message","options")); + TQLabel * l = addLabel(g,__tr2qs_ctx("[PREFIX]nickname[!user@host][POSTFIX] message","options")); l->setEnabled(KVI_OPTION_BOOL(KviOption_boolUseExtendedPrivmsgView)); connect(b, - SIGNAL(toggled(bool)), + TQT_SIGNAL(toggled(bool)), l, - SLOT(setEnabled(bool))); + TQT_SLOT(setEnabled(bool))); KviTalVBox * vb = new KviTalVBox(g); vb->setSpacing(5); connect( b, - SIGNAL(toggled(bool)), + TQT_SIGNAL(toggled(bool)), addStringSelector(vb,__tr2qs_ctx("Prefix:","options"),KviOption_stringExtendedPrivmsgPrefix,KVI_OPTION_BOOL(KviOption_boolUseExtendedPrivmsgView)), - SLOT(setEnabled(bool))); + TQT_SLOT(setEnabled(bool))); connect( b, - SIGNAL(toggled(bool)), + TQT_SIGNAL(toggled(bool)), addStringSelector(vb,__tr2qs_ctx("Postfix:","options"),KviOption_stringExtendedPrivmsgPostfix,KVI_OPTION_BOOL(KviOption_boolUseExtendedPrivmsgView)), - SLOT(setEnabled(bool))); + TQT_SLOT(setEnabled(bool))); addRowSpacer(0,3,0,3); } @@ -124,30 +124,30 @@ KviPrivmsgOptionsWidget::~KviPrivmsgOptionsWidget() } -KviTimestampOptionsWidget::KviTimestampOptionsWidget(QWidget * pParent) +KviTimestampOptionsWidget::KviTimestampOptionsWidget(TQWidget * pParent) : KviOptionsWidget(pParent) { createLayout(5,1); m_pUseTimestampSelector = addBoolSelector(0,0,0,0,__tr2qs_ctx("Show timestamp","options"),KviOption_boolIrcViewTimestamp); - connect(m_pUseTimestampSelector,SIGNAL(toggled(bool)),this,SLOT(enableDisableTimestampSelector(bool))); + connect(m_pUseTimestampSelector,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(enableDisableTimestampSelector(bool))); KviBoolSelector* b = addBoolSelector(0,1,0,1,__tr2qs_ctx("Use UTC time for timestamp","options"),KviOption_boolIrcViewTimestampUTC,KVI_OPTION_BOOL(KviOption_boolIrcViewTimestamp)); - connect(m_pUseTimestampSelector,SIGNAL(toggled(bool)),b,SLOT(setEnabled(bool))); + connect(m_pUseTimestampSelector,TQT_SIGNAL(toggled(bool)),b,TQT_SLOT(setEnabled(bool))); KviTalHBox *hb = new KviTalHBox(this); addWidgetToLayout(hb,0,2,0,2); m_pSpecialTimestampColorSelector = addBoolSelector(hb,__tr2qs_ctx("Use special color for timestamps","options"),KviOption_boolUseSpecialColorForTimestamp,KVI_OPTION_BOOL(KviOption_boolIrcViewTimestamp)); - connect(m_pSpecialTimestampColorSelector,SIGNAL(toggled(bool)),this,SLOT(enableDisableTimestampSelector(bool))); - connect(m_pUseTimestampSelector,SIGNAL(toggled(bool)),m_pSpecialTimestampColorSelector,SLOT(setEnabled(bool))); + connect(m_pSpecialTimestampColorSelector,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(enableDisableTimestampSelector(bool))); + connect(m_pUseTimestampSelector,TQT_SIGNAL(toggled(bool)),m_pSpecialTimestampColorSelector,TQT_SLOT(setEnabled(bool))); m_pTimestampColorSelector = addMircTextColorSelector(hb,"",KviOption_uintTimeStampForeground,KviOption_uintTimeStampBackground,KVI_OPTION_BOOL(KviOption_boolIrcViewTimestamp) && KVI_OPTION_BOOL(KviOption_boolUseSpecialColorForTimestamp)); KviStringSelector * st=addStringSelector(0,3,0,3,__tr2qs_ctx("Timestamp format:","options"),KviOption_stringIrcViewTimestampFormat); - connect(m_pUseTimestampSelector,SIGNAL(toggled(bool)),st,SLOT(setEnabled(bool))); + connect(m_pUseTimestampSelector,TQT_SIGNAL(toggled(bool)),st,TQT_SLOT(setEnabled(bool))); - connect(m_pUseTimestampSelector,SIGNAL(toggled(bool)),m_pSpecialTimestampColorSelector,SLOT(setEnabled(bool))); + connect(m_pUseTimestampSelector,TQT_SIGNAL(toggled(bool)),m_pSpecialTimestampColorSelector,TQT_SLOT(setEnabled(bool))); addRowSpacer(0,4,0,4); } @@ -162,8 +162,8 @@ void KviTimestampOptionsWidget::enableDisableTimestampSelector(bool) ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -KviStandardColorsOptionsWidget::KviStandardColorsOptionsWidget(QWidget * parent) -: KviOptionsWidget(parent,"stdcolors") +KviStandardColorsOptionsWidget::KviStandardColorsOptionsWidget(TQWidget * tqparent) +: KviOptionsWidget(tqparent,"stdcolors") { createLayout(5,4); @@ -186,7 +186,7 @@ KviStandardColorsOptionsWidget::KviStandardColorsOptionsWidget(QWidget * parent) addRowSpacer(0,4,3,4); - layout()->setRowStretch(4,1); + tqlayout()->setRowStretch(4,1); } KviStandardColorsOptionsWidget::~KviStandardColorsOptionsWidget() @@ -197,7 +197,7 @@ KviStandardColorsOptionsWidget::~KviStandardColorsOptionsWidget() ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -KviMessageListView::KviMessageListView(QWidget * par) +KviMessageListView::KviMessageListView(TQWidget * par) : KviTalListView(par) { setItemMargin(2); @@ -208,19 +208,19 @@ KviMessageListView::~KviMessageListView() } -void KviMessageListView::paintEmptyAreaInternal(QPainter * p,const QRect &viewportRect,const QRect &painterRect) +void KviMessageListView::paintEmptyAreaInternal(TQPainter * p,const TQRect &viewportRect,const TQRect &painterRect) { #ifdef COMPILE_PSEUDO_TRANSPARENCY if(g_pShadedChildGlobalDesktopBackground) { - QPoint pnt = viewport()->mapToGlobal(viewportRect.topLeft()); + TQPoint pnt = viewport()->mapToGlobal(viewportRect.topLeft()); p->drawTiledPixmap(painterRect.x(),painterRect.y(),painterRect.width(),painterRect.height(),*g_pShadedChildGlobalDesktopBackground,pnt.x(),pnt.y()); } else { #endif - QPixmap * pix = KVI_OPTION_PIXMAP(KviOption_pixmapIrcViewBackground).pixmap(); + TQPixmap * pix = KVI_OPTION_PIXMAP(KviOption_pixmapIrcViewBackground).pixmap(); if(pix) { - QPoint pnt = viewportToContents(viewportRect.topLeft()); + TQPoint pnt = viewportToContents(viewportRect.topLeft()); p->fillRect(painterRect.x(),painterRect.y(),painterRect.width(),painterRect.height(),KVI_OPTION_COLOR(KviOption_colorIrcViewBackground)); p->drawTiledPixmap(painterRect.x(),painterRect.y(),painterRect.width(),painterRect.height(),*pix,pnt.x(),pnt.y()); } else { @@ -231,7 +231,7 @@ void KviMessageListView::paintEmptyAreaInternal(QPainter * p,const QRect &viewpo #endif } -void KviMessageListView::paintEmptyArea(QPainter * p,const QRect &rct) +void KviMessageListView::paintEmptyArea(TQPainter * p,const TQRect &rct) { paintEmptyAreaInternal(p,rct,rct); KviTalListView::paintEmptyArea(p,rct); @@ -256,19 +256,19 @@ KviMessageListViewItem::~KviMessageListViewItem() delete m_pMsgType; } -void KviMessageListViewItem::paintCell(QPainter * p,const QColorGroup &,int,int w,int) +void KviMessageListViewItem::paintCell(TQPainter * p,const TQColorGroup &,int,int w,int) { #ifdef COMPILE_PSEUDO_TRANSPARENCY if(g_pShadedChildGlobalDesktopBackground) { - QPoint pnt = listView()->viewport()->mapToGlobal(QPoint(int(p->worldMatrix().dx()),int(p->worldMatrix().dy()))); + TQPoint pnt = listView()->viewport()->mapToGlobal(TQPoint(int(p->tqworldMatrix().dx()),int(p->tqworldMatrix().dy()))); p->drawTiledPixmap(0,0,w,height(),*g_pShadedChildGlobalDesktopBackground,pnt.x(),pnt.y()); } else { #endif - QPixmap * pix = KVI_OPTION_PIXMAP(KviOption_pixmapIrcViewBackground).pixmap(); + TQPixmap * pix = KVI_OPTION_PIXMAP(KviOption_pixmapIrcViewBackground).pixmap(); if(pix) { - QPoint pnt = listView()->viewportToContents(QPoint(int(p->worldMatrix().dx()),int(p->worldMatrix().dy()))); + TQPoint pnt = listView()->viewportToContents(TQPoint(int(p->tqworldMatrix().dx()),int(p->tqworldMatrix().dy()))); p->fillRect(0,0,w,height(),KVI_OPTION_COLOR(KviOption_colorIrcViewBackground)); p->drawTiledPixmap(0,0,w,height(),*pix,pnt.x(),pnt.y()); } else { @@ -283,23 +283,23 @@ void KviMessageListViewItem::paintCell(QPainter * p,const QColorGroup &,int,int // draw the background if(m_pMsgType->back() < 16) { - QColor bColor = KVI_OPTION_MIRCCOLOR(m_pMsgType->back()); + TQColor bColor = KVI_OPTION_MIRCCOLOR(m_pMsgType->back()); p->fillRect(22,listView()->itemMargin(),w - 24,height() - (listView()->itemMargin() * 2),bColor); } unsigned char ucFore = m_pMsgType->fore(); if(ucFore > 15)ucFore = 0; - p->setPen(QPen(KVI_OPTION_MIRCCOLOR(ucFore))); + p->setPen(TQPen(KVI_OPTION_MIRCCOLOR(ucFore))); // skip the msgtype prefix - QString txt = (g_msgtypeOptionsTable[m_iOptId].name + 7); + TQString txt = (g_msgtypeOptionsTable[m_iOptId].name + 7); txt += " ("; - txt += __tr2qs_no_xgettext(QString::fromUtf8(m_pMsgType->type())); + txt += __tr2qs_no_xgettext(TQString::fromUtf8(m_pMsgType->type())); txt += ")"; - p->drawText(24,listView()->itemMargin(),w - 24,height() - (listView()->itemMargin() * 2),Qt::AlignLeft | Qt::AlignVCenter,txt); + p->drawText(24,listView()->itemMargin(),w - 24,height() - (listView()->itemMargin() * 2),TQt::AlignLeft | TQt::AlignVCenter,txt); if(isSelected()) { #ifdef COMPILE_USE_QT4 - QPen pen(KVI_OPTION_COLOR(KviOption_colorIrcViewBackground)); - pen.setStyle(Qt::DashLine); + TQPen pen(KVI_OPTION_COLOR(KviOption_colorIrcViewBackground)); + pen.setStyle(TQt::DashLine); p->setPen( pen); p->drawRect(0,0,w,height()); p->drawRect(1,1,w - 2,height() - 2); @@ -312,8 +312,8 @@ void KviMessageListViewItem::paintCell(QPainter * p,const QColorGroup &,int,int } -KviMessageColorListBoxItem::KviMessageColorListBoxItem(KviTalListBox * b,const QColor &clr,int idx) -: KviTalListBoxText(b,QString::null) +KviMessageColorListBoxItem::KviMessageColorListBoxItem(KviTalListBox * b,const TQColor &clr,int idx) +: KviTalListBoxText(b,TQString()) { m_clr = clr; m_iClrIdx = idx; @@ -324,29 +324,25 @@ KviMessageColorListBoxItem::~KviMessageColorListBoxItem() { } -void KviMessageColorListBoxItem::paint(QPainter * p) +void KviMessageColorListBoxItem::paint(TQPainter * p) { - QColor clr; + TQColor clr; const KviTalListBox * lb = (const KviTalListBox *)listBox(); if((m_iClrIdx >= 0) && (m_iClrIdx <= 15)) { - clr = lb->isEnabled() ? KVI_OPTION_MIRCCOLOR(m_iClrIdx) : Qt::gray; + clr = lb->isEnabled() ? KVI_OPTION_MIRCCOLOR(m_iClrIdx) : TQt::gray; p->fillRect(0,0,width(lb),height(lb),clr); } else { - clr = listBox()->colorGroup().background(); + clr = listBox()->tqcolorGroup().background(); KviTalListBoxText::paint(p); } -#if QT_VERSION >= 300 if(isSelected()) -#else - if(selected()) -#endif { #ifdef COMPILE_USE_QT4 - QPen pen(clr); - pen.setStyle(Qt::DashLine); + TQPen pen(clr); + pen.setStyle(TQt::DashLine); p->setPen( pen); p->drawRect(0,0,width(lb),height(lb)); p->drawRect(1,1,width(lb) - 2,height(lb) - 2); @@ -374,8 +370,8 @@ int KviMessageColorListBoxItem::height(const KviTalListBox *) const */ /* -KviIrcColorsOptionsWidget::KviIrcColorsOptionsWidget(QWidget * parent) -: KviOptionsWidget(parent,"irccolors","options") +KviIrcColorsOptionsWidget::KviIrcColorsOptionsWidget(TQWidget * tqparent) +: KviOptionsWidget(tqparent,"irccolors","options") { createLayout(5,4); @@ -387,8 +383,8 @@ KviIrcColorsOptionsWidget::~KviIrcColorsOptionsWidget() } */ -KviMessageColorsOptionsWidget::KviMessageColorsOptionsWidget(QWidget * parent) -: KviOptionsWidget(parent,"messages") +KviMessageColorsOptionsWidget::KviMessageColorsOptionsWidget(TQWidget * tqparent) +: KviOptionsWidget(tqparent,"messages") { int i; @@ -404,9 +400,9 @@ KviMessageColorsOptionsWidget::KviMessageColorsOptionsWidget(QWidget * parent) m_pListView->setFont(KVI_OPTION_FONT(KviOption_fontIrcView)); m_pListView->setStaticBackground(true); #ifdef COMPILE_USE_QT4 - m_pListView->viewport()->setBackgroundMode(Qt::NoBackground); + m_pListView->viewport()->setBackgroundMode(TQt::NoBackground); #else - m_pListView->viewport()->setBackgroundMode(QWidget::NoBackground); + m_pListView->viewport()->setBackgroundMode(TQWidget::NoBackground); #endif addWidgetToLayout(m_pListView,0,0,2,0); @@ -414,16 +410,16 @@ KviMessageColorsOptionsWidget::KviMessageColorsOptionsWidget(QWidget * parent) KviTalVBox * box = new KviTalVBox(this); addWidgetToLayout(box,3,0,3,0); - QLabel * l = new QLabel(__tr2qs_ctx("Background:","options"),box); + TQLabel * l = new TQLabel(__tr2qs_ctx("Background:","options"),box); m_pBackListBox = new KviTalListBox(box); - m_pBackItems[16] = new KviMessageColorListBoxItem(m_pBackListBox,Qt::gray,KVI_TRANSPARENT); + m_pBackItems[16] = new KviMessageColorListBoxItem(m_pBackListBox,TQt::gray,KVI_TRANSPARENT); for(i=0;i<16;i++) { m_pBackItems[i] = new KviMessageColorListBoxItem(m_pBackListBox,KVI_OPTION_MIRCCOLOR(i),i); } - l = new QLabel(__tr2qs_ctx("Foreground:","options"),box); + l = new TQLabel(__tr2qs_ctx("Foreground:","options"),box); m_pForeListBox = new KviTalListBox(box); for(i=0;i<16;i++) @@ -431,23 +427,23 @@ KviMessageColorsOptionsWidget::KviMessageColorsOptionsWidget(QWidget * parent) m_pForeItems[i] = new KviMessageColorListBoxItem(m_pForeListBox,KVI_OPTION_MIRCCOLOR(i),i); } - l = new QLabel(__tr2qs_ctx("Alert level:","options"),box); + l = new TQLabel(__tr2qs_ctx("Alert level:","options"),box); m_pLevelListBox = new KviTalListBox(box); KviTalListBoxText * lbt; for(i=0;i<6;i++) { - QString tmpn; + TQString tmpn; tmpn.setNum(i); lbt = new KviTalListBoxText(m_pLevelListBox,tmpn); } m_pIconButton = new KviStyledToolButton(box); - connect(m_pIconButton,SIGNAL(clicked()),this,SLOT(iconButtonClicked())); + connect(m_pIconButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(iconButtonClicked())); m_pIconPopup = new KviTalPopupMenu(this); KviIconWidget * iw = new KviIconWidget(m_pIconPopup); - connect(iw,SIGNAL(selected(int)),this,SLOT(newIconSelected(int))); + connect(iw,TQT_SIGNAL(selected(int)),this,TQT_SLOT(newIconSelected(int))); m_pIconPopup->insertItem(iw); @@ -455,10 +451,10 @@ KviMessageColorsOptionsWidget::KviMessageColorsOptionsWidget(QWidget * parent) KviTalHBox * h = new KviTalHBox(this); addWidgetToLayout(h,0,1,3,1); - QPushButton * b = new QPushButton(__tr2qs_ctx("Load From...","options"),h); - connect(b,SIGNAL(clicked()),this,SLOT(load())); - b = new QPushButton(__tr2qs_ctx("Save As...","options"),h); - connect(b,SIGNAL(clicked()),this,SLOT(save())); + TQPushButton * b = new TQPushButton(__tr2qs_ctx("Load From...","options"),h); + connect(b,TQT_SIGNAL(clicked()),this,TQT_SLOT(load())); + b = new TQPushButton(__tr2qs_ctx("Save As...","options"),h); + connect(b,TQT_SIGNAL(clicked()),this,TQT_SLOT(save())); KviMessageListViewItem * it; @@ -468,12 +464,12 @@ KviMessageColorsOptionsWidget::KviMessageColorsOptionsWidget(QWidget * parent) it = new KviMessageListViewItem(m_pListView,i); } - layout()->setRowStretch(0,1); - layout()->setColStretch(0,1); + tqlayout()->setRowStretch(0,1); + tqlayout()->setColStretch(0,1); - connect(m_pListView,SIGNAL(selectionChanged(KviTalListViewItem *)),this,SLOT(itemChanged(KviTalListViewItem *))); - connect(m_pForeListBox,SIGNAL(selectionChanged(KviTalListBoxItem *)),this,SLOT(colorChanged(KviTalListBoxItem *))); - connect(m_pBackListBox,SIGNAL(selectionChanged(KviTalListBoxItem *)),this,SLOT(colorChanged(KviTalListBoxItem *))); + connect(m_pListView,TQT_SIGNAL(selectionChanged(KviTalListViewItem *)),this,TQT_SLOT(itemChanged(KviTalListViewItem *))); + connect(m_pForeListBox,TQT_SIGNAL(selectionChanged(KviTalListBoxItem *)),this,TQT_SLOT(colorChanged(KviTalListBoxItem *))); + connect(m_pBackListBox,TQT_SIGNAL(selectionChanged(KviTalListBoxItem *)),this,TQT_SLOT(colorChanged(KviTalListBoxItem *))); itemChanged(0); } @@ -488,7 +484,7 @@ void KviMessageColorsOptionsWidget::newIconSelected(int iconId) if(iconId >= KVI_NUM_SMALL_ICONS)return; m_pLastItem->msgType()->setPixId(iconId); m_pIconButton->setIconSet(*(g_pIconManager->getSmallIcon(iconId))); - m_pListView->repaintItem(m_pLastItem); + m_pListView->tqrepaintItem(m_pLastItem); } void KviMessageColorsOptionsWidget::saveLastItem() @@ -514,7 +510,7 @@ void KviMessageColorsOptionsWidget::saveLastItem() curIt = m_pLevelListBox->currentItem(); if(curIt < 0 || curIt > 5)curIt = 1; m_pLastItem->msgType()->setLevel(curIt); - m_pListView->repaintItem(m_pLastItem); + m_pListView->tqrepaintItem(m_pLastItem); } void KviMessageColorsOptionsWidget::itemChanged(KviTalListViewItem * it) @@ -561,7 +557,7 @@ void KviMessageColorsOptionsWidget::colorChanged(KviTalListBoxItem *) void KviMessageColorsOptionsWidget::iconButtonClicked() { - m_pIconPopup->popup(QCursor::pos()); + m_pIconPopup->popup(TQCursor::pos()); } void KviMessageColorsOptionsWidget::commit() @@ -582,8 +578,8 @@ void KviMessageColorsOptionsWidget::commit() void KviMessageColorsOptionsWidget::save() { - QString szName; - QString szInit; + TQString szName; + TQString szInit; g_pApp->getLocalKvircDirectory(szInit,KviApp::MsgColors); if(KviFileDialog::askForSaveFileName(szName,__tr2qs_ctx("Choose a Filename - KVIrc","options"),szInit)) @@ -623,18 +619,18 @@ void KviMessageColorsOptionsWidget::load() { //KviStr szName; - QString szName; + TQString szName; //KviStr szInit; - QString szInit; + TQString szInit; g_pApp->getLocalKvircDirectory(szInit,KviApp::MsgColors); #ifndef COMPILE_ON_WINDOWS // symlink local to global //KviStr szGlobal; - QString szGlobal; + TQString szGlobal; g_pApp->getGlobalKvircDirectory(szGlobal,KviApp::MsgColors); //KviStr szLocal; - QString szLocal; + TQString szLocal; g_pApp->getLocalKvircDirectory(szLocal,KviApp::MsgColors,"presets"); //debug("SYMLINKING %s to %s",szGlobal.ptr(),szLocal.ptr()); //debug("SYMLINK RETURNS %d (%d)",::symlink(szGlobal.ptr(),szLocal.ptr())); @@ -654,7 +650,7 @@ void KviMessageColorsOptionsWidget::load() cfg.setGroup("Messages"); //KviStr tmp; - QString tmp; + TQString tmp; KviMessageListViewItem * it = (KviMessageListViewItem *)m_pListView->firstChild(); while(it) @@ -682,7 +678,7 @@ void KviMessageColorsOptionsWidget::load() int iLevel = cfg.readIntEntry(tmp,it->msgType()->level()); it->msgType()->setLevel(iLevel); - m_pListView->repaintItem(it); + m_pListView->tqrepaintItem(it); it = (KviMessageListViewItem *)(it->nextSibling()); } diff --git a/src/modules/options/optw_messages.h b/src/modules/options/optw_messages.h index 7f82a145..e8ecb59a 100644 --- a/src/modules/options/optw_messages.h +++ b/src/modules/options/optw_messages.h @@ -29,8 +29,8 @@ #include "kvi_tal_listview.h" #include "kvi_tal_listbox.h" -#include -#include +#include +#include #include "kvi_tal_popupmenu.h" #define KVI_OPTIONS_WIDGET_ICON_KviMessageOptionsWidget KVI_SMALLICON_MESSAGES @@ -42,8 +42,9 @@ class KviMessageOptionsWidget : public KviOptionsWidget { Q_OBJECT + TQ_OBJECT public: - KviMessageOptionsWidget(QWidget * pParent); + KviMessageOptionsWidget(TQWidget * pParent); ~KviMessageOptionsWidget(); }; @@ -58,8 +59,9 @@ public: class KviPrivmsgOptionsWidget : public KviOptionsWidget { Q_OBJECT + TQ_OBJECT public: - KviPrivmsgOptionsWidget(QWidget * parent); + KviPrivmsgOptionsWidget(TQWidget * tqparent); ~KviPrivmsgOptionsWidget(); }; @@ -73,8 +75,9 @@ public: class KviTimestampOptionsWidget : public KviOptionsWidget { Q_OBJECT + TQ_OBJECT public: - KviTimestampOptionsWidget(QWidget * parent); + KviTimestampOptionsWidget(TQWidget * tqparent); ~KviTimestampOptionsWidget(); public: KviBoolSelector * m_pUseTimestampSelector; @@ -94,13 +97,14 @@ protected slots: class KviMessageListView : public KviTalListView { Q_OBJECT + TQ_OBJECT public: - KviMessageListView(QWidget * par); + KviMessageListView(TQWidget * par); ~KviMessageListView(); protected: - void paintEmptyAreaInternal(QPainter * p,const QRect &viewportRect,const QRect &painterRect); + void paintEmptyAreaInternal(TQPainter * p,const TQRect &viewportRect,const TQRect &painterRect); public: - void paintEmptyArea(QPainter * p,const QRect &rct); + void paintEmptyArea(TQPainter * p,const TQRect &rct); }; @@ -115,20 +119,20 @@ private: public: int optionId(){ return m_iOptId; }; KviMsgType * msgType(){ return m_pMsgType; }; - virtual void paintCell(QPainter * p,const QColorGroup &,int,int,int); + virtual void paintCell(TQPainter * p,const TQColorGroup &,int,int,int); }; class KviMessageColorListBoxItem : public KviTalListBoxText { public: - KviMessageColorListBoxItem(KviTalListBox * b,const QColor & clr,int idx); + KviMessageColorListBoxItem(KviTalListBox * b,const TQColor & clr,int idx); ~KviMessageColorListBoxItem(); public: int m_iClrIdx; - QColor m_clr; + TQColor m_clr; public: - virtual void paint(QPainter * p); + virtual void paint(TQPainter * p); virtual int width(const KviTalListBox * lv) const { return 120; }; }; @@ -138,8 +142,9 @@ public: class KviMessageColorsOptionsWidget : public KviOptionsWidget { Q_OBJECT + TQ_OBJECT public: - KviMessageColorsOptionsWidget(QWidget * parent); + KviMessageColorsOptionsWidget(TQWidget * tqparent); ~KviMessageColorsOptionsWidget(); public: KviMessageListView * m_pListView; @@ -149,8 +154,8 @@ public: KviMessageColorListBoxItem * m_pForeItems[16]; KviMessageColorListBoxItem * m_pBackItems[17]; KviMessageListViewItem * m_pLastItem; - QCheckBox * m_pEnableLogging; - QToolButton * m_pIconButton; + TQCheckBox * m_pEnableLogging; + TQToolButton * m_pIconButton; KviTalPopupMenu * m_pIconPopup; public: void saveLastItem(); @@ -174,8 +179,9 @@ protected slots: class KviStandardColorsOptionsWidget : public KviOptionsWidget { Q_OBJECT + TQ_OBJECT public: - KviStandardColorsOptionsWidget(QWidget * par); + KviStandardColorsOptionsWidget(TQWidget * par); ~KviStandardColorsOptionsWidget(); }; diff --git a/src/modules/options/optw_nickserv.cpp b/src/modules/options/optw_nickserv.cpp index f182dc32..92d17036 100644 --- a/src/modules/options/optw_nickserv.cpp +++ b/src/modules/options/optw_nickserv.cpp @@ -24,13 +24,13 @@ #include "optw_nickserv.h" -#include +#include #include "kvi_tal_tooltip.h" #include "kvi_tal_listview.h" -#include -#include -#include -#include +#include +#include +#include +#include #include "kvi_qstring.h" #include "kvi_options.h" @@ -42,43 +42,43 @@ extern KVIRC_API KviNickServRuleSet * g_pNickServRuleSet; -KviNickServRuleEditor::KviNickServRuleEditor(QWidget * par,bool bUseServerMaskField) -: QDialog(par) +KviNickServRuleEditor::KviNickServRuleEditor(TQWidget * par,bool bUseServerMaskField) +: TQDialog(par) { setCaption(__tr2qs_ctx("NickServ Authentication Rule","options")); - QString html_center_begin = "
"; - QString html_center_end = "
"; + TQString html_center_begin = "
"; + TQString html_center_end = "
"; - QGridLayout * gl = new QGridLayout(this,bUseServerMaskField ? 7 : 6,4,10,5); + TQGridLayout * gl = new TQGridLayout(this,bUseServerMaskField ? 7 : 6,4,10,5); - QLabel * l = new QLabel(__tr2qs_ctx("Registered NickName","options"),this); + TQLabel * l = new TQLabel(__tr2qs_ctx("Registered NickName","options"),this); gl->addWidget(l,0,0); - m_pRegisteredNickEdit = new QLineEdit(this); + m_pRegisteredNickEdit = new TQLineEdit(this); #ifdef COMPILE_INFO_TIPS KviTalToolTip::add(m_pRegisteredNickEdit,html_center_begin + __tr2qs_ctx("Put here the nickname that you have registered with NickServ","options") + html_center_end); #endif gl->addMultiCellWidget(m_pRegisteredNickEdit,0,0,1,3); - l = new QLabel(__tr2qs_ctx("NickServ Mask","options"),this); + l = new TQLabel(__tr2qs_ctx("NickServ Mask","options"),this); gl->addWidget(l,1,0); - m_pNickServMaskEdit = new QLineEdit(this); + m_pNickServMaskEdit = new TQLineEdit(this); #ifdef COMPILE_INFO_TIPS KviTalToolTip::add(m_pNickServMaskEdit, - html_center_begin + __tr2qs_ctx("This is the mask that NickServ must match to be correctly identified as the NickServ service. " \ + html_center_begin + __tr2qs_ctx("This is the tqmask that NickServ must match to be correctly identified as the NickServ service. " \ "This usually will be something like NickServ!service@services.dalnet.
" \ "You can use wildcards for this field, but generally it is a security flaw. " \ "If you're 100%% sure that NO user on the network can use the nickname \"NickServ\", " \ - "the mask NickServ!*@* may be safe to use in this field.","options") + html_center_end); + "the tqmask NickServ!*@* may be safe to use in this field.","options") + html_center_end); #endif gl->addMultiCellWidget(m_pNickServMaskEdit,1,1,1,3); - l = new QLabel(__tr2qs_ctx("Message Regexp","options"),this); + l = new TQLabel(__tr2qs_ctx("Message Regexp","options"),this); gl->addWidget(l,2,0); - m_pMessageRegexpEdit = new QLineEdit(this); + m_pMessageRegexpEdit = new TQLineEdit(this); gl->addMultiCellWidget(m_pMessageRegexpEdit,2,2,1,3); #ifdef COMPILE_INFO_TIPS @@ -89,14 +89,14 @@ KviNickServRuleEditor::KviNickServRuleEditor(QWidget * par,bool bUseServerMaskFi "and it is sent when the NickServ wants you to authenticate yourself. " \ "You can use the * and ? wildcards.","options") + html_center_end); #endif - l = new QLabel(__tr2qs_ctx("Identify Command","options"),this); + l = new TQLabel(__tr2qs_ctx("Identify Command","options"),this); gl->addWidget(l,3,0); - m_pIdentifyCommandEdit = new QLineEdit(this); + m_pIdentifyCommandEdit = new TQLineEdit(this); #ifdef COMPILE_INFO_TIPS KviTalToolTip::add(m_pIdentifyCommandEdit, html_center_begin + __tr2qs_ctx("This is the command that will be executed when NickServ requests authentication " \ - "for the nickname described in this rule (if the both server and NickServ mask are matched). " \ + "for the nickname described in this rule (if the both server and NickServ tqmask are matched). " \ "This usually will be something like msg NickServ identify <yourpassword>.
" \ "You can use msg -q if you don't want the password echoed on the screen. " \ "Please note that there is no leading slash in this command.","options") + html_center_end); @@ -108,13 +108,13 @@ KviNickServRuleEditor::KviNickServRuleEditor(QWidget * par,bool bUseServerMaskFi if(bUseServerMaskField) { - l = new QLabel(__tr2qs_ctx("Server mask","options"),this); + l = new TQLabel(__tr2qs_ctx("Server tqmask","options"),this); gl->addWidget(l,4,0); - m_pServerMaskEdit = new QLineEdit(this); + m_pServerMaskEdit = new TQLineEdit(this); #ifdef COMPILE_INFO_TIPS KviTalToolTip::add(m_pServerMaskEdit, - html_center_begin + __tr2qs_ctx("This is the mask that the current server must match in order " \ + html_center_begin + __tr2qs_ctx("This is the tqmask that the current server must match in order " \ "for this rule to apply. It can contain * and ? wildcards.
Do NOT use simply \"*\" here...","options") + html_center_end); #endif gl->addMultiCellWidget(m_pServerMaskEdit,4,4,1,3); @@ -125,24 +125,24 @@ KviNickServRuleEditor::KviNickServRuleEditor(QWidget * par,bool bUseServerMaskFi #ifdef COMPILE_INFO_TIPS - l = new QLabel(html_center_begin + __tr2qs_ctx("Hint: Move the mouse cursor over the fields to get help","options") + html_center_end,this); + l = new TQLabel(html_center_begin + __tr2qs_ctx("Hint: Move the mouse cursor over the fields to get help","options") + html_center_end,this); #else - l = new QLabel("",this); + l = new TQLabel("",this); #endif l->setMargin(10); gl->addMultiCellWidget(l,iNextLine,iNextLine,0,3); iNextLine++; - QPushButton * p = new QPushButton(__tr2qs_ctx("Cancel","options"),this); + TQPushButton * p = new TQPushButton(__tr2qs_ctx("Cancel","options"),this); p->setMinimumWidth(100); - connect(p,SIGNAL(clicked()),this,SLOT(reject())); + connect(p,TQT_SIGNAL(clicked()),this,TQT_SLOT(reject())); gl->addWidget(p,iNextLine,2); - m_pOkButton = new QPushButton(__tr2qs_ctx("OK","options"),this); + m_pOkButton = new TQPushButton(__tr2qs_ctx("OK","options"),this); m_pOkButton->setMinimumWidth(100); m_pOkButton->setDefault(true); - connect(m_pOkButton,SIGNAL(clicked()),this,SLOT(okPressed())); + connect(m_pOkButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(okPressed())); gl->addWidget(m_pOkButton,iNextLine,3); gl->setColStretch(1,1); @@ -159,20 +159,20 @@ KviNickServRuleEditor::~KviNickServRuleEditor() bool KviNickServRuleEditor::validate() { - QString s = m_pRegisteredNickEdit->text(); + TQString s = m_pRegisteredNickEdit->text(); - QString m = __tr2qs_ctx("Invalid NickServ Rule","options"); - QString o = __tr2qs_ctx("OK","options"); + TQString m = __tr2qs_ctx("Invalid NickServ Rule","options"); + TQString o = __tr2qs_ctx("OK","options"); if(s.isEmpty()) { - QMessageBox::warning(this,m,__tr2qs_ctx("The Nickname field can't be empty!","options"),o); + TQMessageBox::warning(this,m,__tr2qs_ctx("The Nickname field can't be empty!","options"),o); return false; } - if(s.find(QChar(' ')) != -1) + if(s.tqfind(TQChar(' ')) != -1) { - QMessageBox::warning(this,m,__tr2qs_ctx("The Nickname field can't contain spaces!","options"),o); + TQMessageBox::warning(this,m,__tr2qs_ctx("The Nickname field can't contain spaces!","options"),o); return false; } @@ -180,7 +180,7 @@ bool KviNickServRuleEditor::validate() if(s.isEmpty()) { - QMessageBox::warning(this,m,__tr2qs_ctx("The NickServ mask can't be empty!
You must put at least * there.","options"),o); + TQMessageBox::warning(this,m,__tr2qs_ctx("The NickServ tqmask can't be empty!
You must put at least * there.","options"),o); return false; } @@ -188,7 +188,7 @@ bool KviNickServRuleEditor::validate() if(s.isEmpty()) { - QMessageBox::warning(this,m,__tr2qs_ctx("The Message Regexp can't be empty!
You must put at least * there.","options"),o); + TQMessageBox::warning(this,m,__tr2qs_ctx("The Message Regexp can't be empty!
You must put at least * there.","options"),o); return false; } @@ -196,7 +196,7 @@ bool KviNickServRuleEditor::validate() if(s.isEmpty()) { - QMessageBox::warning(this,m,__tr2qs_ctx("The Identify Command can't be empty!","options"),o); + TQMessageBox::warning(this,m,__tr2qs_ctx("The Identify Command can't be empty!","options"),o); return false; } @@ -212,14 +212,14 @@ void KviNickServRuleEditor::okPressed() bool KviNickServRuleEditor::editRule(KviNickServRule * r) { - m_pRegisteredNickEdit->setText(r->registeredNick().isEmpty() ? QString("MyNick") : r->registeredNick()); - m_pNickServMaskEdit->setText(r->nickServMask().isEmpty() ? QString("NickServ!*@*") : r->nickServMask()); - m_pMessageRegexpEdit->setText(r->messageRegexp().isEmpty() ? QString("*IDENTIFY*") : r->messageRegexp()); - m_pIdentifyCommandEdit->setText(r->identifyCommand().isEmpty() ? QString("msg -q NickServ IDENTIFY ") : r->identifyCommand()); + m_pRegisteredNickEdit->setText(r->registeredNick().isEmpty() ? TQString("MyNick") : r->registeredNick()); + m_pNickServMaskEdit->setText(r->nickServMask().isEmpty() ? TQString("NickServ!*@*") : r->nickServMask()); + m_pMessageRegexpEdit->setText(r->messageRegexp().isEmpty() ? TQString("*IDENTIFY*") : r->messageRegexp()); + m_pIdentifyCommandEdit->setText(r->identifyCommand().isEmpty() ? TQString("msg -q NickServ IDENTIFY ") : r->identifyCommand()); if(m_pServerMaskEdit) - m_pServerMaskEdit->setText(r->serverMask().isEmpty() ? QString("irc.yourserver.org") : r->serverMask()); + m_pServerMaskEdit->setText(r->serverMask().isEmpty() ? TQString("irc.yourserver.org") : r->serverMask()); m_pRegisteredNickEdit->selectAll(); - if(exec() != QDialog::Accepted)return false; + if(exec() != TQDialog::Accepted)return false; r->setRegisteredNick(m_pRegisteredNickEdit->text()); r->setNickServMask(m_pNickServMaskEdit->text()); r->setMessageRegexp(m_pMessageRegexpEdit->text()); @@ -231,12 +231,12 @@ bool KviNickServRuleEditor::editRule(KviNickServRule * r) -KviNickServOptionsWidget::KviNickServOptionsWidget(QWidget * parent) -: KviOptionsWidget(parent,"nickserv_options_widget") +KviNickServOptionsWidget::KviNickServOptionsWidget(TQWidget * tqparent) +: KviOptionsWidget(tqparent,"nickserv_options_widget") { createLayout(3,3); - QGridLayout * gl = layout(); + TQGridLayout * gl = tqlayout(); KviNickServRuleSet * rs = g_pNickServRuleSet; bool bNickServEnabled = rs ? (rs->isEnabled() && !rs->isEmpty()) : false; @@ -253,11 +253,11 @@ KviNickServOptionsWidget::KviNickServOptionsWidget(QWidget * parent) m_pNickServListView->setSelectionMode(KviTalListView::Single); m_pNickServListView->setAllColumnsShowFocus(true); m_pNickServListView->addColumn(__tr2qs_ctx("Nickname","options")); - m_pNickServListView->addColumn(__tr2qs_ctx("Server mask","options")); + m_pNickServListView->addColumn(__tr2qs_ctx("Server tqmask","options")); m_pNickServListView->addColumn(__tr2qs_ctx("NickServ Mask","options")); m_pNickServListView->addColumn(__tr2qs_ctx("NickServ Request Mask","options")); m_pNickServListView->addColumn(__tr2qs_ctx("Identify Command","options")); - connect(m_pNickServListView,SIGNAL(selectionChanged()),this,SLOT(enableDisableNickServControls())); + connect(m_pNickServListView,TQT_SIGNAL(selectionChanged()),this,TQT_SLOT(enableDisableNickServControls())); gl->addMultiCellWidget(m_pNickServListView,1,1,0,2); #ifdef COMPILE_INFO_TIPS @@ -273,19 +273,19 @@ KviNickServOptionsWidget::KviNickServOptionsWidget(QWidget * parent) "","options")); #endif - m_pAddRuleButton = new QPushButton(__tr2qs_ctx("Add Rule","options"),this); - connect(m_pAddRuleButton,SIGNAL(clicked()),this,SLOT(addNickServRule())); + m_pAddRuleButton = new TQPushButton(__tr2qs_ctx("Add Rule","options"),this); + connect(m_pAddRuleButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(addNickServRule())); gl->addWidget(m_pAddRuleButton,2,0); - m_pEditRuleButton = new QPushButton(__tr2qs_ctx("Edit Rule","options"),this); - connect(m_pEditRuleButton,SIGNAL(clicked()),this,SLOT(editNickServRule())); + m_pEditRuleButton = new TQPushButton(__tr2qs_ctx("Edit Rule","options"),this); + connect(m_pEditRuleButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(editNickServRule())); gl->addWidget(m_pEditRuleButton,2,1); - m_pDelRuleButton = new QPushButton(__tr2qs_ctx("Delete Rule","options"),this); - connect(m_pDelRuleButton,SIGNAL(clicked()),this,SLOT(delNickServRule())); + m_pDelRuleButton = new TQPushButton(__tr2qs_ctx("Delete Rule","options"),this); + connect(m_pDelRuleButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(delNickServRule())); gl->addWidget(m_pDelRuleButton,2,2); - connect(m_pNickServCheck,SIGNAL(toggled(bool)),this,SLOT(enableDisableNickServControls())); + connect(m_pNickServCheck,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(enableDisableNickServControls())); if(rs && rs->rules()) { diff --git a/src/modules/options/optw_nickserv.h b/src/modules/options/optw_nickserv.h index b9e41e90..9fb6bfc0 100644 --- a/src/modules/options/optw_nickserv.h +++ b/src/modules/options/optw_nickserv.h @@ -29,7 +29,7 @@ #include "kvi_settings.h" #include "kvi_optionswidget.h" -#include +#include #define KVI_OPTIONS_WIDGET_ICON_KviNickServOptionsWidget KVI_SMALLICON_NICKSERV #define KVI_OPTIONS_WIDGET_NAME_KviNickServOptionsWidget __tr2qs_no_lookup("NickServ") @@ -38,25 +38,26 @@ #define KVI_OPTIONS_WIDGET_PRIORITY_KviNickServOptionsWidget 10000 //#define KVI_OPTIONS_WIDGET_HIDDEN_KviNickServOptionsWidget true -class QLineEdit; -class QPushButton; +class TQLineEdit; +class TQPushButton; class KviNickServRule; class KviTalListView; -class QCheckBox; +class TQCheckBox; -class KviNickServRuleEditor : public QDialog +class KviNickServRuleEditor : public TQDialog { Q_OBJECT + TQ_OBJECT public: - KviNickServRuleEditor(QWidget * par,bool bUseServerMaskField = false); + KviNickServRuleEditor(TQWidget * par,bool bUseServerMaskField = false); ~KviNickServRuleEditor(); protected: - QLineEdit * m_pRegisteredNickEdit; - QLineEdit * m_pNickServMaskEdit; - QLineEdit * m_pMessageRegexpEdit; - QLineEdit * m_pIdentifyCommandEdit; - QLineEdit * m_pServerMaskEdit; - QPushButton * m_pOkButton; + TQLineEdit * m_pRegisteredNickEdit; + TQLineEdit * m_pNickServMaskEdit; + TQLineEdit * m_pMessageRegexpEdit; + TQLineEdit * m_pIdentifyCommandEdit; + TQLineEdit * m_pServerMaskEdit; + TQPushButton * m_pOkButton; public: bool editRule(KviNickServRule * r); protected: @@ -68,15 +69,16 @@ protected slots: class KviNickServOptionsWidget : public KviOptionsWidget { Q_OBJECT + TQ_OBJECT public: - KviNickServOptionsWidget(QWidget * parent); + KviNickServOptionsWidget(TQWidget * tqparent); ~KviNickServOptionsWidget(); protected: KviTalListView * m_pNickServListView; - QCheckBox * m_pNickServCheck; - QPushButton * m_pAddRuleButton; - QPushButton * m_pDelRuleButton; - QPushButton * m_pEditRuleButton; + TQCheckBox * m_pNickServCheck; + TQPushButton * m_pAddRuleButton; + TQPushButton * m_pDelRuleButton; + TQPushButton * m_pEditRuleButton; protected slots: void enableDisableNickServControls(); void addNickServRule(); diff --git a/src/modules/options/optw_notify.cpp b/src/modules/options/optw_notify.cpp index 6ee5dc05..c8d3f9b0 100644 --- a/src/modules/options/optw_notify.cpp +++ b/src/modules/options/optw_notify.cpp @@ -22,7 +22,7 @@ #include "optw_notify.h" -#include +#include #include "kvi_settings.h" #include "kvi_options.h" #include "kvi_locale.h" @@ -31,67 +31,67 @@ //#warning "Info tips" -KviNotifyOptionsWidget::KviNotifyOptionsWidget(QWidget * parent) -: KviOptionsWidget(parent,"notify_options_widget") +KviNotifyOptionsWidget::KviNotifyOptionsWidget(TQWidget * tqparent) +: KviOptionsWidget(tqparent,"notify_options_widget") { createLayout(5,1); KviBoolSelector * b = addBoolSelector(0,0,0,0,__tr2qs_ctx("Use online notify list","options"),KviOption_boolUseNotifyList); KviTalGroupBox *g = addGroupBox(0,1,0,1,1,Qt::Horizontal,__tr2qs_ctx("Configuration","options")); - connect(b,SIGNAL(toggled(bool)),g,SLOT(setEnabled(bool))); + connect(b,TQT_SIGNAL(toggled(bool)),g,TQT_SLOT(setEnabled(bool))); connect(b, - SIGNAL(toggled(bool)), + TQT_SIGNAL(toggled(bool)), addBoolSelector(g,__tr2qs_ctx("Show notifications in active window","options"), KviOption_boolNotifyListChangesToActiveWindow,KVI_OPTION_BOOL(KviOption_boolUseNotifyList)), - SLOT(setEnabled(bool))); + TQT_SLOT(setEnabled(bool))); connect(b, - SIGNAL(toggled(bool)), + TQT_SIGNAL(toggled(bool)), addBoolSelector(g,__tr2qs_ctx("Flash window when users are going online","options"), KviOption_boolFlashWindowOnNotifyOnLine,KVI_OPTION_BOOL(KviOption_boolUseNotifyList)), - SLOT(setEnabled(bool))); + TQT_SLOT(setEnabled(bool))); connect(b, - SIGNAL(toggled(bool)), + TQT_SIGNAL(toggled(bool)), addBoolSelector(g,__tr2qs_ctx("Popup notifier when users are going online","options"), KviOption_boolPopupNotifierOnNotifyOnLine,KVI_OPTION_BOOL(KviOption_boolUseNotifyList)), - SLOT(setEnabled(bool))); + TQT_SLOT(setEnabled(bool))); g = addGroupBox(0,2,0,2,1,Qt::Horizontal,__tr2qs_ctx("Advanced configuration","options")); - connect(b,SIGNAL(toggled(bool)),g,SLOT(setEnabled(bool))); + connect(b,TQT_SIGNAL(toggled(bool)),g,TQT_SLOT(setEnabled(bool))); connect(b, - SIGNAL(toggled(bool)), + TQT_SIGNAL(toggled(bool)), addBoolSelector(g,__tr2qs_ctx("Check USERHOST for online users","options"), KviOption_boolNotifyListSendUserhostForOnlineUsers,KVI_OPTION_BOOL(KviOption_boolUseNotifyList)), - SLOT(setEnabled(bool))); + TQT_SLOT(setEnabled(bool))); connect(b, - SIGNAL(toggled(bool)), + TQT_SIGNAL(toggled(bool)), addBoolSelector(g,__tr2qs_ctx("Use \"smart\" notify list manager","options"), KviOption_boolUseIntelligentNotifyListManager,KVI_OPTION_BOOL(KviOption_boolUseNotifyList)), - SLOT(setEnabled(bool))); + TQT_SLOT(setEnabled(bool))); connect(b, - SIGNAL(toggled(bool)), + TQT_SIGNAL(toggled(bool)), addBoolSelector(g,__tr2qs_ctx("Use the WATCH method if available","options"), KviOption_boolUseWatchListIfAvailable,KVI_OPTION_BOOL(KviOption_boolUseNotifyList)), - SLOT(setEnabled(bool))); + TQT_SLOT(setEnabled(bool))); connect(b, - SIGNAL(toggled(bool)), + TQT_SIGNAL(toggled(bool)), addUIntSelector(g,__tr2qs_ctx("Check interval (in seconds)","options"), KviOption_uintNotifyListCheckTimeInSecs, 5,3600,180,KVI_OPTION_BOOL(KviOption_boolUseNotifyList)), - SLOT(setEnabled(bool))); + TQT_SLOT(setEnabled(bool))); connect(b, - SIGNAL(toggled(bool)), + TQT_SIGNAL(toggled(bool)), addUIntSelector(g,__tr2qs_ctx("ISON delay (in seconds)","options"), KviOption_uintNotifyListIsOnDelayTimeInSecs, 5,180,6,KVI_OPTION_BOOL(KviOption_boolUseNotifyList)), - SLOT(setEnabled(bool))); + TQT_SLOT(setEnabled(bool))); connect(b, - SIGNAL(toggled(bool)), + TQT_SIGNAL(toggled(bool)), addUIntSelector(g,__tr2qs_ctx("USERHOST delay (in seconds)","options"), KviOption_uintNotifyListUserhostDelayTimeInSecs, 5,180,6,KVI_OPTION_BOOL(KviOption_boolUseNotifyList)), - SLOT(setEnabled(bool))); + TQT_SLOT(setEnabled(bool))); addLabel(0,3,0,3,__tr2qs_ctx("

Note:
The notify list is managed using the \"Registered Users\" settings.

","options")); addRowSpacer(0,4,0,4); @@ -104,14 +104,14 @@ KviNotifyOptionsWidget::~KviNotifyOptionsWidget() -KviNotifierOptionsWidget::KviNotifierOptionsWidget(QWidget * parent) -: KviOptionsWidget(parent,"notifier_options_widget") +KviNotifierOptionsWidget::KviNotifierOptionsWidget(TQWidget * tqparent) +: KviOptionsWidget(tqparent,"notifier_options_widget") { createLayout(3,1); KviBoolSelector * b = addBoolSelector(0,0,0,0,__tr2qs_ctx("Forcibly and completely disable the notifier","options"),KviOption_boolForciblyDisableNotifier); #ifdef COMPILE_INFO_TIPS - QString tip = "
"; + TQString tip = "
"; tip += __tr2qs_ctx("This is an option for the impatient: it allows to forcibly and permanently disable " \ "the notifier window. Please note that if this option is activated then " \ "the notifier will NOT popup even if all the other options around specify " \ diff --git a/src/modules/options/optw_notify.h b/src/modules/options/optw_notify.h index 374ddc21..be771b84 100644 --- a/src/modules/options/optw_notify.h +++ b/src/modules/options/optw_notify.h @@ -33,8 +33,9 @@ class KviNotifyOptionsWidget : public KviOptionsWidget { Q_OBJECT + TQ_OBJECT public: - KviNotifyOptionsWidget(QWidget * parent); + KviNotifyOptionsWidget(TQWidget * tqparent); ~KviNotifyOptionsWidget(); }; @@ -46,8 +47,9 @@ public: class KviNotifierOptionsWidget : public KviOptionsWidget { Q_OBJECT + TQ_OBJECT public: - KviNotifierOptionsWidget(QWidget * parent); + KviNotifierOptionsWidget(TQWidget * tqparent); ~KviNotifierOptionsWidget(); }; diff --git a/src/modules/options/optw_protection.cpp b/src/modules/options/optw_protection.cpp index 27a0f4b1..dc8fa0ee 100644 --- a/src/modules/options/optw_protection.cpp +++ b/src/modules/options/optw_protection.cpp @@ -24,19 +24,19 @@ #include "optw_protection.h" -#include +#include #include "kvi_settings.h" #include "kvi_options.h" #include "kvi_locale.h" -KviProtectionOptionsWidget::KviProtectionOptionsWidget(QWidget * parent) -: KviOptionsWidget(parent,"protection_options_widget") +KviProtectionOptionsWidget::KviProtectionOptionsWidget(TQWidget * tqparent) +: KviOptionsWidget(tqparent,"protection_options_widget") { createLayout(1,1); - QLabel * l; + TQLabel * l; l = addLabel(0,0,0,0,__tr2qs_ctx("This section contains irc protection tools
"\ "

like flood, ignore, antispam. " \ "

","options")); diff --git a/src/modules/options/optw_protection.h b/src/modules/options/optw_protection.h index 5ac37e43..1837f591 100644 --- a/src/modules/options/optw_protection.h +++ b/src/modules/options/optw_protection.h @@ -40,8 +40,9 @@ class KviProtectionOptionsWidget : public KviOptionsWidget { Q_OBJECT + TQ_OBJECT public: - KviProtectionOptionsWidget(QWidget * parent); + KviProtectionOptionsWidget(TQWidget * tqparent); ~KviProtectionOptionsWidget(); }; diff --git a/src/modules/options/optw_proxy.cpp b/src/modules/options/optw_proxy.cpp index 523d3c79..98acb0a5 100644 --- a/src/modules/options/optw_proxy.cpp +++ b/src/modules/options/optw_proxy.cpp @@ -30,19 +30,19 @@ #include "kvi_options.h" #include "kvi_styled_controls.h" -#include -#include -#include -#include +#include +#include +#include +#include #include #include "kvi_tal_popupmenu.h" -#include +#include #include "kvi_tal_tooltip.h" -#include +#include -KviProxyOptionsListViewItem::KviProxyOptionsListViewItem(KviTalListView *parent,const QPixmap &pm,KviProxy * prx) -: KviTalListViewItem(parent,prx->m_szHostname.ptr()) +KviProxyOptionsListViewItem::KviProxyOptionsListViewItem(KviTalListView *tqparent,const TQPixmap &pm,KviProxy * prx) +: KviTalListViewItem(tqparent,prx->m_szHostname.ptr()) { setPixmap(0,pm); m_pProxyData = new KviProxy(*prx); @@ -53,8 +53,8 @@ KviProxyOptionsListViewItem::~KviProxyOptionsListViewItem() delete m_pProxyData; } -KviProxyOptionsWidget::KviProxyOptionsWidget(QWidget * parent) -: KviOptionsWidget(parent,"proxy_options_widget") +KviProxyOptionsWidget::KviProxyOptionsWidget(TQWidget * tqparent) +: KviOptionsWidget(tqparent,"proxy_options_widget") { createLayout(3,2); @@ -67,13 +67,13 @@ KviProxyOptionsWidget::KviProxyOptionsWidget(QWidget * parent) m_pListView->setAllColumnsShowFocus(true); m_pListView->setSelectionMode(KviTalListView::Single); - connect(m_pListView,SIGNAL(selectionChanged(KviTalListViewItem *)), - this,SLOT(listViewItemSelectionChanged(KviTalListViewItem *))); - connect(m_pListView,SIGNAL(rightButtonPressed(KviTalListViewItem *,const QPoint &,int)), - this,SLOT(listViewRightButtonPressed(KviTalListViewItem *,const QPoint &,int))); + connect(m_pListView,TQT_SIGNAL(selectionChanged(KviTalListViewItem *)), + this,TQT_SLOT(listViewItemSelectionChanged(KviTalListViewItem *))); + connect(m_pListView,TQT_SIGNAL(rightButtonPressed(KviTalListViewItem *,const TQPoint &,int)), + this,TQT_SLOT(listViewRightButtonPressed(KviTalListViewItem *,const TQPoint &,int))); #ifdef COMPILE_INFO_TIPS - QString tiptxt = __tr2qs_ctx("
This is the list of available proxy servers.
" \ + TQString tiptxt = __tr2qs_ctx("
This is the list of available proxy servers.
" \ "Right-click on the list to add or remove proxies.
","options"); mergeTip(m_pListView,tiptxt); mergeTip(m_pListView->viewport(),tiptxt); @@ -82,10 +82,10 @@ KviProxyOptionsWidget::KviProxyOptionsWidget(QWidget * parent) KviTalVBox * vbox = new KviTalVBox(this); addWidgetToLayout(vbox,1,1,1,1); - QToolButton * tb = new KviStyledToolButton(vbox); + TQToolButton * tb = new KviStyledToolButton(vbox); tb->setPixmap(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_PROXY))); tb->setAutoRaise(true); - connect(tb,SIGNAL(clicked()),this,SLOT(newProxy())); + connect(tb,TQT_SIGNAL(clicked()),this,TQT_SLOT(newProxy())); #ifdef COMPILE_INFO_TIPS mergeTip(tb,__tr2qs_ctx("New Proxy","options")); #endif @@ -94,51 +94,51 @@ KviProxyOptionsWidget::KviProxyOptionsWidget(QWidget * parent) tb->setPixmap(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_CUT))); //tb->setEnabled(false); tb->setAutoRaise(true); - connect(tb,SIGNAL(clicked()),this,SLOT(removeCurrent())); + connect(tb,TQT_SIGNAL(clicked()),this,TQT_SLOT(removeCurrent())); #ifdef COMPILE_INFO_TIPS mergeTip(tb,__tr2qs_ctx("Remove Proxy","options")); #endif - QFrame * lll = new QFrame(vbox); + TQFrame * lll = new TQFrame(vbox); vbox->setStretchFactor(lll,100); KviTalGroupBox * gbox = addGroupBox(0,2,1,2,2,Qt::Horizontal,__tr2qs_ctx("Configuration","options"),this); - //QGridLayout * gl = new QGridLayout(gbox->layout()); + //TQGridLayout * gl = new TQGridLayout(gbox->tqlayout()); //gl->setMargin(2); //gl->setSpacing(4); - m_pProxyLabel = new QLabel(__tr2qs_ctx("Proxy:","options"),gbox); + m_pProxyLabel = new TQLabel(__tr2qs_ctx("Proxy:","options"),gbox); - m_pProxyEdit = new QLineEdit(gbox); + m_pProxyEdit = new TQLineEdit(gbox); - m_pPortLabel = new QLabel(__tr2qs_ctx("Port:","options"),gbox); + m_pPortLabel = new TQLabel(__tr2qs_ctx("Port:","options"),gbox); - m_pPortEdit = new QLineEdit(gbox); + m_pPortEdit = new TQLineEdit(gbox); - m_pIpLabel = new QLabel(__tr2qs_ctx("IP address:","options"),gbox); + m_pIpLabel = new TQLabel(__tr2qs_ctx("IP address:","options"),gbox); m_pIpEditor = new KviIpEditor(gbox,KviIpEditor::IpV4); - m_pUserLabel = new QLabel(__tr2qs_ctx("Username:","options"),gbox); + m_pUserLabel = new TQLabel(__tr2qs_ctx("Username:","options"),gbox); - m_pUserEdit = new QLineEdit(gbox); + m_pUserEdit = new TQLineEdit(gbox); - m_pPassLabel = new QLabel(__tr2qs_ctx("Password:","options"),gbox); + m_pPassLabel = new TQLabel(__tr2qs_ctx("Password:","options"),gbox); - m_pPassEdit = new QLineEdit(gbox); + m_pPassEdit = new TQLineEdit(gbox); - m_pProtocolLabel = new QLabel(__tr2qs_ctx("Protocol:","options"),gbox); + m_pProtocolLabel = new TQLabel(__tr2qs_ctx("Protocol:","options"),gbox); - m_pProtocolBox = new QComboBox(false,gbox); + m_pProtocolBox = new TQComboBox(false,gbox); - QStringList l; + TQStringList l; KviProxy::getSupportedProtocolNames(l); m_pProtocolBox->insertStringList(l); m_pIpV6Check = new KviStyledCheckBox(__tr2qs_ctx("Use IPv6 protocol","options"),gbox); - connect(m_pIpV6Check,SIGNAL(toggled(bool)),this,SLOT(ipV6CheckToggled(bool))); + connect(m_pIpV6Check,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(ipV6CheckToggled(bool))); #ifndef COMPILE_IPV6_SUPPORT m_pIpV6Check->setEnabled(false); #endif @@ -147,8 +147,8 @@ KviProxyOptionsWidget::KviProxyOptionsWidget(QWidget * parent) fillProxyList(); - layout()->setRowStretch(0,1); - layout()->setColStretch(0,1); + tqlayout()->setRowStretch(0,1); + tqlayout()->setColStretch(0,1); m_pContextPopup = new KviTalPopupMenu(this); @@ -330,12 +330,12 @@ void KviProxyOptionsWidget::commit() KviOptionsWidget::commit(); } -void KviProxyOptionsWidget::listViewRightButtonPressed(KviTalListViewItem *it,const QPoint &pnt,int col) +void KviProxyOptionsWidget::listViewRightButtonPressed(KviTalListViewItem *it,const TQPoint &pnt,int col) { m_pContextPopup->clear(); - m_pContextPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_PROXY)),__tr2qs_ctx("&New Proxy","options"),this,SLOT(newProxy())); - m_pContextPopup->setItemEnabled(m_pContextPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_CUT)),__tr2qs_ctx("Re&move Proxy","options"),this,SLOT(removeCurrent())),it); - m_pContextPopup->popup(QCursor::pos()); + m_pContextPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_PROXY)),__tr2qs_ctx("&New Proxy","options"),this,TQT_SLOT(newProxy())); + m_pContextPopup->setItemEnabled(m_pContextPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_CUT)),__tr2qs_ctx("Re&move Proxy","options"),this,TQT_SLOT(removeCurrent())),it); + m_pContextPopup->popup(TQCursor::pos()); } void KviProxyOptionsWidget::newProxy() diff --git a/src/modules/options/optw_proxy.h b/src/modules/options/optw_proxy.h index a6f18ada..73b4f78a 100644 --- a/src/modules/options/optw_proxy.h +++ b/src/modules/options/optw_proxy.h @@ -35,18 +35,18 @@ extern KVIRC_API KviProxyDataBase * g_pProxyDataBase; class KviProxyOptionsListViewItem : public KviTalListViewItem { public: - KviProxyOptionsListViewItem(KviTalListView *parent,const QPixmap &pm,KviProxy * prx); + KviProxyOptionsListViewItem(KviTalListView *tqparent,const TQPixmap &pm,KviProxy * prx); ~KviProxyOptionsListViewItem(); public: KviProxy * m_pProxyData; }; -class QLabel; -class QLineEdit; +class TQLabel; +class TQLineEdit; class KviIpEditor; -class QCheckBox; +class TQCheckBox; class KviTalPopupMenu; -class QComboBox; +class TQComboBox; #define KVI_OPTIONS_WIDGET_ICON_KviProxyOptionsWidget KVI_SMALLICON_PROXY #define KVI_OPTIONS_WIDGET_NAME_KviProxyOptionsWidget __tr2qs_no_lookup("Proxy Hosts") @@ -57,25 +57,26 @@ class QComboBox; class KviProxyOptionsWidget : public KviOptionsWidget { Q_OBJECT + TQ_OBJECT public: - KviProxyOptionsWidget(QWidget * parent); + KviProxyOptionsWidget(TQWidget * tqparent); ~KviProxyOptionsWidget(); protected: KviTalListView * m_pListView; - QLabel * m_pProxyLabel; - QLineEdit * m_pProxyEdit; - QLabel * m_pIpLabel; + TQLabel * m_pProxyLabel; + TQLineEdit * m_pProxyEdit; + TQLabel * m_pIpLabel; KviIpEditor * m_pIpEditor; - QLabel * m_pUserLabel; - QLineEdit * m_pUserEdit; - QLabel * m_pPassLabel; - QLineEdit * m_pPassEdit; - QLabel * m_pPortLabel; - QLineEdit * m_pPortEdit; - QLabel * m_pProtocolLabel; - QComboBox * m_pProtocolBox; + TQLabel * m_pUserLabel; + TQLineEdit * m_pUserEdit; + TQLabel * m_pPassLabel; + TQLineEdit * m_pPassEdit; + TQLabel * m_pPortLabel; + TQLineEdit * m_pPortEdit; + TQLabel * m_pProtocolLabel; + TQComboBox * m_pProtocolBox; KviTalPopupMenu * m_pContextPopup; - QCheckBox * m_pIpV6Check; + TQCheckBox * m_pIpV6Check; KviProxyOptionsListViewItem * m_pLastEditedItem; private: @@ -83,7 +84,7 @@ private: void saveLastItem(); protected slots: void listViewItemSelectionChanged(KviTalListViewItem *it); - void listViewRightButtonPressed(KviTalListViewItem *it,const QPoint &pnt,int col); + void listViewRightButtonPressed(KviTalListViewItem *it,const TQPoint &pnt,int col); void newProxy(); void removeCurrent(); void ipV6CheckToggled(bool bEnabled); diff --git a/src/modules/options/optw_query.cpp b/src/modules/options/optw_query.cpp index d0026c6e..a97ce83f 100644 --- a/src/modules/options/optw_query.cpp +++ b/src/modules/options/optw_query.cpp @@ -23,7 +23,7 @@ #include "optw_query.h" -#include +#include #include "kvi_options.h" #include "kvi_locale.h" @@ -34,8 +34,8 @@ #include #endif -KviQueryOptionsWidget::KviQueryOptionsWidget(QWidget * parent) -: KviOptionsWidget(parent,"query_options_widget") +KviQueryOptionsWidget::KviQueryOptionsWidget(TQWidget * tqparent) +: KviOptionsWidget(tqparent,"query_options_widget") { createLayout(8,1); diff --git a/src/modules/options/optw_query.h b/src/modules/options/optw_query.h index bae1c7bc..6e6b96ff 100644 --- a/src/modules/options/optw_query.h +++ b/src/modules/options/optw_query.h @@ -1,5 +1,5 @@ -#ifndef _OPTW_QUERY_H_ -#define _OPTW_QUERY_H_ +#ifndef _OPTW_TQUERY_H_ +#define _OPTW_TQUERY_H_ // // File : optw_query.h // Creation date : Tue Mar 05 22:31:18 2002 GMT by Szymon Stefanek @@ -24,7 +24,7 @@ #include "kvi_optionswidget.h" -#define KVI_OPTIONS_WIDGET_ICON_KviQueryOptionsWidget KVI_SMALLICON_QUERY +#define KVI_OPTIONS_WIDGET_ICON_KviQueryOptionsWidget KVI_SMALLICON_TQUERY #define KVI_OPTIONS_WIDGET_NAME_KviQueryOptionsWidget __tr2qs_no_lookup("Query") #define KVI_OPTIONS_WIDGET_PARENT_KviQueryOptionsWidget KviIrcOptionsWidget #define KVI_OPTIONS_WIDGET_KEYWORDS_KviQueryOptionsWidget __tr2qs_no_lookup("chat") @@ -34,8 +34,9 @@ class KviQueryOptionsWidget : public KviOptionsWidget { Q_OBJECT + TQ_OBJECT public: - KviQueryOptionsWidget(QWidget * parent); + KviQueryOptionsWidget(TQWidget * tqparent); ~KviQueryOptionsWidget(); protected: }; diff --git a/src/modules/options/optw_servers.cpp b/src/modules/options/optw_servers.cpp index 0b50bc78..9410d174 100644 --- a/src/modules/options/optw_servers.cpp +++ b/src/modules/options/optw_servers.cpp @@ -51,24 +51,24 @@ #include "kvi_kvs_script.h" #include "kvi_styled_controls.h" -#include -#include -#include +#include +#include +#include #include "kvi_tal_popupmenu.h" -#include +#include #include "kvi_tal_tooltip.h" -#include -#include +#include +#include #include "kvi_pointerhashtable.h" -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include -KviNetworkDetailsWidget::KviNetworkDetailsWidget(QWidget * par,KviIrcNetwork * n) - : QDialog(par,"network_details",true) +KviNetworkDetailsWidget::KviNetworkDetailsWidget(TQWidget * par,KviIrcNetwork * n) + : TQDialog(par,"network_details",true) { m_pOnConnectEditor=0; m_pOnLoginEditor=0; @@ -91,25 +91,25 @@ KviNetworkDetailsWidget::KviNetworkDetailsWidget(QWidget * par,KviIrcNetwork * n m_pChannelListSelector=0; - QGridLayout * g = new QGridLayout(this,4,4,10,4); + TQGridLayout * g = new TQGridLayout(this,4,4,10,4); setCaption(__tr2qs_ctx("Network Details","options")); setIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_WORLD))); - QString szTmp = ""; + TQString szTmp = ""; szTmp += n->name(); szTmp += ""; - QLabel * l = new QLabel(szTmp,this); - l->setFrameStyle(QFrame::Raised | QFrame::StyledPanel); - l->setAlignment(Qt::AlignCenter); + TQLabel * l = new TQLabel(szTmp,this); + l->setFrameStyle(TQFrame::Raised | TQFrame::StyledPanel); + l->tqsetAlignment(TQt::AlignCenter); l->setMargin(10); g->addMultiCellWidget(l,0,0,0,3); l->setMinimumWidth(200); - l = new QLabel(__tr2qs_ctx("Description:","options"),this); + l = new TQLabel(__tr2qs_ctx("Description:","options"),this); g->addWidget(l,1,0); - m_pDescEditor = new QLineEdit(this); + m_pDescEditor = new TQLineEdit(this); g->addMultiCellWidget(m_pDescEditor,1,1,1,3); m_pDescEditor->setText(n->description()); #ifdef COMPILE_INFO_TIPS @@ -118,17 +118,17 @@ KviNetworkDetailsWidget::KviNetworkDetailsWidget(QWidget * par,KviIrcNetwork * n // Identity tab - QTabWidget * tw = new QTabWidget(this); + TQTabWidget * tw = new TQTabWidget(this); g->addMultiCellWidget(tw,2,2,0,3); - QWidget * tab = new QWidget(tw); - QGridLayout * gl = new QGridLayout(tab,4,2,10,4); + TQWidget * tab = new TQWidget(tw); + TQGridLayout * gl = new TQGridLayout(tab,4,2,10,4); KviTalGroupBox *gbox = new KviTalGroupBox(2,Qt::Horizontal,__tr2qs_ctx("Properties","options"),tab); gl->addMultiCellWidget(gbox,0,0,0,1); - l = new QLabel(__tr2qs_ctx("Username:","options"),gbox); - m_pUserEditor = new QLineEdit(gbox); + l = new TQLabel(__tr2qs_ctx("Username:","options"),gbox); + m_pUserEditor = new TQLineEdit(gbox); m_pUserEditor->setText(n->userName()); #ifdef COMPILE_INFO_TIPS KviTalToolTip::add(m_pUserEditor,__tr2qs_ctx("
This is the username that KVIrc will use to login to servers on this network.\n" \ @@ -136,9 +136,9 @@ KviNetworkDetailsWidget::KviNetworkDetailsWidget(QWidget * par,KviIrcNetwork * n "specified in the \"Identity\" options tab.
","options")); #endif - l = new QLabel(__tr2qs_ctx("Nickname:","options"),gbox); - m_pNickEditor = new QLineEdit(gbox); - QValidator * v = new QRegExpValidator(QRegExp("[^-0-9 ][^ ]*","options"),gbox); + l = new TQLabel(__tr2qs_ctx("Nickname:","options"),gbox); + m_pNickEditor = new TQLineEdit(gbox); + TQValidator * v = new TQRegExpValidator(TQRegExp("[^-0-9 ][^ ]*","options"),TQT_TQOBJECT(gbox)); m_pNickEditor->setValidator(v); m_pNickEditor->setText(n->nickName()); #ifdef COMPILE_INFO_TIPS @@ -146,8 +146,8 @@ KviNetworkDetailsWidget::KviNetworkDetailsWidget(QWidget * par,KviIrcNetwork * n "If this field is left empty (most common case), the default nickname (specified in the \"Identity\" settings) will be used.
","options")); #endif - l = new QLabel(__tr2qs_ctx("Real name:","options"),gbox); - m_pRealEditor = new QLineEdit(gbox); + l = new TQLabel(__tr2qs_ctx("Real name:","options"),gbox); + m_pRealEditor = new TQLineEdit(gbox); m_pRealEditor->setText(n->realName()); #ifdef COMPILE_INFO_TIPS KviTalToolTip::add(m_pRealEditor,__tr2qs_ctx("
You can specify a \"special\" real name that will be used to login with the servers on this network.
" \ @@ -155,9 +155,9 @@ KviNetworkDetailsWidget::KviNetworkDetailsWidget(QWidget * par,KviIrcNetwork * n #endif - l = new QLabel(__tr2qs_ctx("Encoding:","options"),tab); + l = new TQLabel(__tr2qs_ctx("Encoding:","options"),tab); gl->addWidget(l,1,0); - m_pEncodingEditor = new QComboBox(false,tab); + m_pEncodingEditor = new TQComboBox(false,tab); m_pEncodingEditor->setDuplicatesEnabled(false); gl->addWidget(m_pEncodingEditor,1,1); #ifdef COMPILE_INFO_TIPS @@ -169,13 +169,13 @@ KviNetworkDetailsWidget::KviNetworkDetailsWidget(QWidget * par,KviIrcNetwork * n int i = 0; int current = 0; KviLocale::EncodingDescription * d = KviLocale::encodingDescription(i); - QString tmp; + TQString tmp; m_pEncodingEditor->insertItem(__tr2qs_ctx("Use System Encoding","options")); while(d->szName) { - KviQString::sprintf(tmp,"%s (%s)",d->szName,d->szDescription); + KviTQString::sprintf(tmp,"%s (%s)",d->szName,d->szDescription); m_pEncodingEditor->insertItem(tmp); - if(KviQString::equalCI(d->szName,n->encoding()))current = i + 1; + if(KviTQString::equalCI(d->szName,n->encoding()))current = i + 1; i = i + 1; d = KviLocale::encodingDescription(i); } @@ -190,7 +190,7 @@ KviNetworkDetailsWidget::KviNetworkDetailsWidget(QWidget * par,KviIrcNetwork * n #endif - l = new QLabel("",tab); + l = new TQLabel("",tab); gl->addWidget(l,3,0); gl->setRowStretch(3,1); @@ -199,9 +199,9 @@ KviNetworkDetailsWidget::KviNetworkDetailsWidget(QWidget * par,KviIrcNetwork * n tw->addTab(tab,__tr2qs_ctx("General","options")); // after login join channels - tab = new QWidget(tw); + tab = new TQWidget(tw); - gl = new QGridLayout(tab,1,1,10,4); + gl = new TQGridLayout(tab,1,1,10,4); if(n->autoJoinChannelList()) m_lstChannels = *(n->autoJoinChannelList()); @@ -217,8 +217,8 @@ KviNetworkDetailsWidget::KviNetworkDetailsWidget(QWidget * par,KviIrcNetwork * n tw->addTab(tab,__tr2qs_ctx("Join Channels","options")); // after connect execute - tab = new QWidget(tw); - gl = new QGridLayout(tab,1,1,10,4); + tab = new TQWidget(tw); + gl = new TQGridLayout(tab,1,1,10,4); m_pOnConnectEditor = KviScriptEditor::createInstance(tab); gl->addWidget(m_pOnConnectEditor,0,0); @@ -235,8 +235,8 @@ KviNetworkDetailsWidget::KviNetworkDetailsWidget(QWidget * par,KviIrcNetwork * n // after login execute - tab = new QWidget(tw); - gl = new QGridLayout(tab,1,1,10,4); + tab = new TQWidget(tw); + gl = new TQGridLayout(tab,1,1,10,4); m_pOnLoginEditor = KviScriptEditor::createInstance(tab); gl->addWidget(m_pOnLoginEditor,0,0); @@ -256,8 +256,8 @@ KviNetworkDetailsWidget::KviNetworkDetailsWidget(QWidget * par,KviIrcNetwork * n // nick serv rules - tab = new QWidget(tw); - gl = new QGridLayout(tab,3,3,10,5); + tab = new TQWidget(tw); + gl = new TQGridLayout(tab,3,3,10,5); KviNickServRuleSet * rs = n->nickServRuleSet(); bool bNickServEnabled = rs ? (rs->isEnabled() && !rs->isEmpty()) : false; @@ -277,7 +277,7 @@ KviNetworkDetailsWidget::KviNetworkDetailsWidget(QWidget * par,KviIrcNetwork * n m_pNickServListView->addColumn(__tr2qs_ctx("NickServ Mask","options")); m_pNickServListView->addColumn(__tr2qs_ctx("NickServ Request Mask","options")); m_pNickServListView->addColumn(__tr2qs_ctx("Identify Command","options")); - connect(m_pNickServListView,SIGNAL(selectionChanged()),this,SLOT(enableDisableNickServControls())); + connect(m_pNickServListView,TQT_SIGNAL(selectionChanged()),this,TQT_SLOT(enableDisableNickServControls())); gl->addMultiCellWidget(m_pNickServListView,1,1,0,2); #ifdef COMPILE_INFO_TIPS @@ -290,20 +290,20 @@ KviNetworkDetailsWidget::KviNetworkDetailsWidget(QWidget * par,KviIrcNetwork * n "Also note that the password that you provide is stored as PLAIN TEXT.
","options")); #endif - m_pAddRuleButton = new QPushButton(__tr2qs_ctx("Add Rule","options"),tab); - connect(m_pAddRuleButton,SIGNAL(clicked()),this,SLOT(addNickServRule())); + m_pAddRuleButton = new TQPushButton(__tr2qs_ctx("Add Rule","options"),tab); + connect(m_pAddRuleButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(addNickServRule())); gl->addWidget(m_pAddRuleButton,2,0); - m_pEditRuleButton = new QPushButton(__tr2qs_ctx("Edit Rule","options"),tab); - connect(m_pEditRuleButton,SIGNAL(clicked()),this,SLOT(editNickServRule())); + m_pEditRuleButton = new TQPushButton(__tr2qs_ctx("Edit Rule","options"),tab); + connect(m_pEditRuleButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(editNickServRule())); gl->addWidget(m_pEditRuleButton,2,1); - m_pDelRuleButton = new QPushButton(__tr2qs_ctx("Delete Rule","options"),tab); - connect(m_pDelRuleButton,SIGNAL(clicked()),this,SLOT(delNickServRule())); + m_pDelRuleButton = new TQPushButton(__tr2qs_ctx("Delete Rule","options"),tab); + connect(m_pDelRuleButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(delNickServRule())); gl->addWidget(m_pDelRuleButton,2,2); - connect(m_pNickServCheck,SIGNAL(toggled(bool)),this,SLOT(enableDisableNickServControls())); + connect(m_pNickServCheck,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(enableDisableNickServControls())); if(rs && rs->rules()) { @@ -320,16 +320,16 @@ KviNetworkDetailsWidget::KviNetworkDetailsWidget(QWidget * par,KviIrcNetwork * n tw->addTab(tab,__tr2qs_ctx("NickServ","options")); - QPushButton * b = new QPushButton(__tr2qs_ctx("&OK","options"),this); + TQPushButton * b = new TQPushButton(__tr2qs_ctx("&OK","options"),this); b->setMinimumWidth(80); g->addWidget(b,3,2); b->setDefault(true); - connect(b,SIGNAL(clicked()),this,SLOT(accept())); + connect(b,TQT_SIGNAL(clicked()),this,TQT_SLOT(accept())); - b = new QPushButton(__tr2qs_ctx("Cancel","options"),this); + b = new TQPushButton(__tr2qs_ctx("Cancel","options"),this); g->addWidget(b,3,3); b->setMinimumWidth(80); - connect(b,SIGNAL(clicked()),this,SLOT(reject())); + connect(b,TQT_SIGNAL(clicked()),this,TQT_SLOT(reject())); g->setRowStretch(2,1); @@ -396,7 +396,7 @@ void KviNetworkDetailsWidget::fillData(KviIrcNetwork * n) if(m_pAutoConnectCheck) n->setAutoConnect(m_pAutoConnectCheck->isChecked()); if(m_pEncodingEditor) - if(m_pEncodingEditor->currentItem() <= 0)n->setEncoding(QString::null); + if(m_pEncodingEditor->currentItem() <= 0)n->setEncoding(TQString()); else { KviLocale::EncodingDescription * d = KviLocale::encodingDescription(m_pEncodingEditor->currentItem() - 1); n->setEncoding(d->szName); @@ -404,7 +404,7 @@ void KviNetworkDetailsWidget::fillData(KviIrcNetwork * n) if(m_pChannelListSelector) m_pChannelListSelector->commit(); if(m_lstChannels.isEmpty())n->setAutoJoinChannelList(0); - else n->setAutoJoinChannelList(new QStringList(m_lstChannels)); + else n->setAutoJoinChannelList(new TQStringList(m_lstChannels)); if(m_pNickServListView) { if(m_pNickServListView->childCount() > 0) @@ -422,13 +422,13 @@ void KviNetworkDetailsWidget::fillData(KviIrcNetwork * n) } if(m_pOnConnectEditor) { - QString tmp; + TQString tmp; m_pOnConnectEditor->getText(tmp); n->setOnConnectCommand(tmp); } if(m_pOnLoginEditor) { - QString tmp; + TQString tmp; m_pOnLoginEditor->getText(tmp); n->setOnLoginCommand(tmp); } @@ -440,25 +440,25 @@ void KviNetworkDetailsWidget::fillData(KviIrcNetwork * n) -KviServerDetailsWidget::KviServerDetailsWidget(QWidget * par,KviIrcServer * s) - : QDialog(par,"server_details",true) +KviServerDetailsWidget::KviServerDetailsWidget(TQWidget * par,KviIrcServer * s) + : TQDialog(par,"server_details",true) { m_szHostname = s->hostName(); - QGridLayout * g = new QGridLayout(this,4,4,10,4); + TQGridLayout * g = new TQGridLayout(this,4,4,10,4); setCaption(__tr2qs_ctx("Server Details","options")); setIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_SERVER))); - m_pHeaderLabel = new QLabel("",this); // the text will be set later - m_pHeaderLabel->setFrameStyle(QFrame::Raised | QFrame::StyledPanel); - m_pHeaderLabel->setAlignment(Qt::AlignCenter); + m_pHeaderLabel = new TQLabel("",this); // the text will be set later + m_pHeaderLabel->setFrameStyle(TQFrame::Raised | TQFrame::StyledPanel); + m_pHeaderLabel->tqsetAlignment(TQt::AlignCenter); m_pHeaderLabel->setMargin(10); g->addMultiCellWidget(m_pHeaderLabel,0,0,0,3); m_pHeaderLabel->setMinimumWidth(200); - QLabel * l = new QLabel(__tr2qs_ctx("Description:","options"),this); + TQLabel * l = new TQLabel(__tr2qs_ctx("Description:","options"),this); g->addWidget(l,1,0); - m_pDescEditor = new QLineEdit(this); + m_pDescEditor = new TQLineEdit(this); g->addMultiCellWidget(m_pDescEditor,1,1,1,3); m_pDescEditor->setText(s->description()); #ifdef COMPILE_INFO_TIPS @@ -468,17 +468,17 @@ KviServerDetailsWidget::KviServerDetailsWidget(QWidget * par,KviIrcServer * s) // Identity tab - QTabWidget * tw = new QTabWidget(this); + TQTabWidget * tw = new TQTabWidget(this); g->addMultiCellWidget(tw,2,2,0,3); - QWidget * tab = new QWidget(tw); - QGridLayout * gl = new QGridLayout(tab,3,1,10,4); + TQWidget * tab = new TQWidget(tw); + TQGridLayout * gl = new TQGridLayout(tab,3,1,10,4); KviTalGroupBox *gbox = new KviTalGroupBox(2,Qt::Horizontal,__tr2qs_ctx("Properties","options"),tab); gl->addWidget(gbox,0,0); - l = new QLabel(__tr2qs_ctx("Username:","options"),gbox); - m_pUserEditor = new QLineEdit(gbox); + l = new TQLabel(__tr2qs_ctx("Username:","options"),gbox); + m_pUserEditor = new TQLineEdit(gbox); m_pUserEditor->setText(s->userName()); #ifdef COMPILE_INFO_TIPS KviTalToolTip::add(m_pUserEditor,__tr2qs_ctx("
This is the username that KVIrc will use to login to this server.\n" \ @@ -487,17 +487,17 @@ KviServerDetailsWidget::KviServerDetailsWidget(QWidget * par,KviIrcServer * s) "specified in the \"Identity\" options tab.
","options")); #endif - l = new QLabel(__tr2qs_ctx("Password:","options"),gbox); - m_pPassEditor = new QLineEdit(gbox); - m_pPassEditor->setEchoMode(QLineEdit::Password); + l = new TQLabel(__tr2qs_ctx("Password:","options"),gbox); + m_pPassEditor = new TQLineEdit(gbox); + m_pPassEditor->setEchoMode(TQLineEdit::Password); m_pPassEditor->setText(s->password()); #ifdef COMPILE_INFO_TIPS KviTalToolTip::add(m_pPassEditor,__tr2qs_ctx("
If this server requires a password, put it in this field, otherwise leave it empty.
","options")); #endif - l = new QLabel(__tr2qs_ctx("Nickname:","options"),gbox); - m_pNickEditor = new QLineEdit(gbox); - QValidator * v = new QRegExpValidator(QRegExp("[^-0-9 ][^ ]*"),gbox); + l = new TQLabel(__tr2qs_ctx("Nickname:","options"),gbox); + m_pNickEditor = new TQLineEdit(gbox); + TQValidator * v = new TQRegExpValidator(TQRegExp("[^-0-9 ][^ ]*"),TQT_TQOBJECT(gbox)); m_pNickEditor->setValidator(v); m_pNickEditor->setText(s->nickName()); #ifdef COMPILE_INFO_TIPS @@ -506,8 +506,8 @@ KviServerDetailsWidget::KviServerDetailsWidget(QWidget * par,KviIrcServer * s) "for the network that this server belongs to, and if that is empty then the default nickname (specified in the \"Identity\" settings) will be used.
","options")); #endif - l = new QLabel(__tr2qs_ctx("Real name:","options"),gbox); - m_pRealEditor = new QLineEdit(gbox); + l = new TQLabel(__tr2qs_ctx("Real name:","options"),gbox); + m_pRealEditor = new TQLineEdit(gbox); m_pRealEditor->setText(s->realName()); #ifdef COMPILE_INFO_TIPS KviTalToolTip::add(m_pRealEditor,__tr2qs_ctx("
You can specify a \"special\" real name that will be used to login with this server.
" \ @@ -525,21 +525,21 @@ KviServerDetailsWidget::KviServerDetailsWidget(QWidget * par,KviIrcServer * s) bool bHasUmode = !(s->initUMode().isEmpty()); KviStr szDefUMode = KVI_OPTION_STRING(KviOption_stringDefaultUserMode); m_pUseDefaultInitUMode->setChecked(!bHasUmode); - connect(m_pUseDefaultInitUMode,SIGNAL(toggled(bool)),this,SLOT(useDefaultInitUModeToggled(bool))); + connect(m_pUseDefaultInitUMode,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(useDefaultInitUModeToggled(bool))); m_pIMode = new KviStyledCheckBox(__tr2qs_ctx("Invisible (+i)","options"),gbox); m_pIMode->setEnabled(bHasUmode); - m_pIMode->setChecked(bHasUmode ? s->initUMode().contains('i',false) : szDefUMode.contains('i',false)); + m_pIMode->setChecked(bHasUmode ? s->initUMode().tqcontains('i',false) : szDefUMode.tqcontains('i',false)); m_pSMode = new KviStyledCheckBox(__tr2qs_ctx("Server notices (+s)","options"),gbox); m_pSMode->setEnabled(bHasUmode); - m_pSMode->setChecked(bHasUmode ? s->initUMode().contains('s',false) : szDefUMode.contains('s',false)); + m_pSMode->setChecked(bHasUmode ? s->initUMode().tqcontains('s',false) : szDefUMode.tqcontains('s',false)); m_pWMode = new KviStyledCheckBox(__tr2qs_ctx("Wallops (+w)","options"),gbox); m_pWMode->setEnabled(bHasUmode); - m_pWMode->setChecked(bHasUmode ? s->initUMode().contains('w',false) : szDefUMode.contains('w',false)); + m_pWMode->setChecked(bHasUmode ? s->initUMode().tqcontains('w',false) : szDefUMode.tqcontains('w',false)); - l = new QLabel("",tab); + l = new TQLabel("",tab); gl->addWidget(l,2,0); gl->setRowStretch(2,1); @@ -549,26 +549,26 @@ KviServerDetailsWidget::KviServerDetailsWidget(QWidget * par,KviIrcServer * s) // Connection tab - tab = new QWidget(tw); - gl = new QGridLayout(tab,11,1,10,4); + tab = new TQWidget(tw); + gl = new TQGridLayout(tab,11,1,10,4); - l = new QLabel(__tr2qs_ctx("Port:","options"),tab); + l = new TQLabel(__tr2qs_ctx("Port:","options"),tab); gl->addWidget(l,0,0); - m_pPortEditor = new QLineEdit(tab); + m_pPortEditor = new TQLineEdit(tab); gl->addWidget(m_pPortEditor,0,1); - QString tmpz; + TQString tmpz; tmpz.setNum(s->port()); m_pPortEditor->setText(tmpz); #ifdef COMPILE_INFO_TIPS KviTalToolTip::add(m_pPortEditor,__tr2qs_ctx("
This is the default port that this server will be contacted on.
Usually 6667 is OK.
","options")); #endif - connect(m_pPortEditor,SIGNAL(textChanged(const QString &)),this,SLOT(portEditorTextChanged(const QString &))); + connect(m_pPortEditor,TQT_SIGNAL(textChanged(const TQString &)),this,TQT_SLOT(portEditorTextChanged(const TQString &))); - l = new QLabel(__tr2qs_ctx("IP address:","options"),tab); + l = new TQLabel(__tr2qs_ctx("IP address:","options"),tab); gl->addWidget(l,1,0); m_pIpEditor = new KviIpEditor(tab,KviIpEditor::IpV4); gl->addWidget(m_pIpEditor,1,1); @@ -613,7 +613,7 @@ KviServerDetailsWidget::KviServerDetailsWidget(QWidget * par,KviIrcServer * s) #else m_pUseIPV6Check->setEnabled(false); #endif - connect(m_pUseIPV6Check,SIGNAL(toggled(bool)),this,SLOT(useIPV6CheckToggled(bool))); + connect(m_pUseIPV6Check,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(useIPV6CheckToggled(bool))); #ifdef COMPILE_INFO_TIPS KviTalToolTip::add(m_pUseIPV6Check,__tr2qs_ctx("
This check identifies IPv6 servers.
If enabled, KVIrc will attempt to use the IPv6 protocol " \ @@ -641,9 +641,9 @@ KviServerDetailsWidget::KviServerDetailsWidget(QWidget * par,KviIrcServer * s) KviTalToolTip::add(m_pUseAutoConnect,__tr2qs_ctx("
This option will cause KVIrc to connect to the IRC server when it is started.
","options")); #endif - l = new QLabel(__tr2qs_ctx("Encoding:","options"),tab); + l = new TQLabel(__tr2qs_ctx("Encoding:","options"),tab); gl->addWidget(l,6,0); - m_pEncodingEditor = new QComboBox(false,tab); + m_pEncodingEditor = new TQComboBox(false,tab); m_pEncodingEditor->setDuplicatesEnabled(false); gl->addWidget(m_pEncodingEditor,6,1); #ifdef COMPILE_INFO_TIPS @@ -655,13 +655,13 @@ KviServerDetailsWidget::KviServerDetailsWidget(QWidget * par,KviIrcServer * s) int i = 0; int current = 0; KviLocale::EncodingDescription * d = KviLocale::encodingDescription(i); - QString tmp; + TQString tmp; m_pEncodingEditor->insertItem(__tr2qs_ctx("Use Network Encoding","options")); while(d->szName) { - KviQString::sprintf(tmp,"%s (%s)",d->szName,d->szDescription); + KviTQString::sprintf(tmp,"%s (%s)",d->szName,d->szDescription); m_pEncodingEditor->insertItem(tmp); - if(KviQString::equalCI(d->szName,s->encoding()))current = i + 1; + if(KviTQString::equalCI(d->szName,s->encoding()))current = i + 1; i = i + 1; d = KviLocale::encodingDescription(i); } @@ -669,9 +669,9 @@ KviServerDetailsWidget::KviServerDetailsWidget(QWidget * par,KviIrcServer * s) m_pEncodingEditor->setCurrentItem(current); - l = new QLabel(__tr2qs_ctx("Link filter:","options"),tab); + l = new TQLabel(__tr2qs_ctx("Link filter:","options"),tab); gl->addWidget(l,7,0); - m_pLinkFilterEditor = new QComboBox(true,tab); + m_pLinkFilterEditor = new TQComboBox(true,tab); m_pLinkFilterEditor->setDuplicatesEnabled(false); gl->addWidget(m_pLinkFilterEditor,7,1); @@ -702,9 +702,9 @@ KviServerDetailsWidget::KviServerDetailsWidget(QWidget * par,KviIrcServer * s) "For plain IRC connections, you don't need any link filters; this is used for incompatible protocols.
","options")); #endif - l = new QLabel(__tr2qs_ctx("Id:","options"),tab); + l = new TQLabel(__tr2qs_ctx("Id:","options"),tab); gl->addWidget(l,8,0); - m_pIdEditor = new QLineEdit(tab); + m_pIdEditor = new TQLineEdit(tab); if(s->id().isEmpty())s->generateUniqueId(); m_pIdEditor->setText(s->id()); gl->addWidget(m_pIdEditor,8,1); @@ -716,9 +716,9 @@ KviServerDetailsWidget::KviServerDetailsWidget(QWidget * par,KviIrcServer * s) #endif - l = new QLabel(__tr2qs_ctx("Proxy server:","options"),tab); + l = new TQLabel(__tr2qs_ctx("Proxy server:","options"),tab); gl->addWidget(l,9,0); - m_pProxyEditor = new QComboBox(tab); + m_pProxyEditor = new TQComboBox(tab); gl->addWidget(m_pProxyEditor,9,1); #ifdef COMPILE_INFO_TIPS KviTalToolTip::add(m_pProxyEditor,__tr2qs_ctx("
This is the proxy that KVIrc will use to connect to thos server.\n" \ @@ -732,13 +732,13 @@ KviServerDetailsWidget::KviServerDetailsWidget(QWidget * par,KviIrcServer * s) KviPointerList * proxylist = g_pProxyDataBase->proxyList(); for(KviProxy * p = proxylist->first();p;p = proxylist->next()) { - m_pProxyEditor->insertItem(QString("%1:%2").arg(p->hostname()).arg(p->port())); + m_pProxyEditor->insertItem(TQString("%1:%2").tqarg(p->hostname()).tqarg(p->port())); } if(m_pProxyEditor->count() > (s->proxy()+2)) m_pProxyEditor->setCurrentItem(s->proxy()+2); - l = new QLabel("",tab); + l = new TQLabel("",tab); gl->addMultiCellWidget(l,10,10,0,1); gl->setRowStretch(10,1); @@ -746,9 +746,9 @@ KviServerDetailsWidget::KviServerDetailsWidget(QWidget * par,KviIrcServer * s) tw->addTab(tab,*(g_pIconManager->getSmallIcon(KVI_SMALLICON_SOCKETWARNING)),__tr2qs_ctx("Connection","options")); // after login join channels - tab = new QWidget(tw); + tab = new TQWidget(tw); - gl = new QGridLayout(tab,1,1,10,4); + gl = new TQGridLayout(tab,1,1,10,4); if(s->autoJoinChannelList()) m_lstChannels = *(s->autoJoinChannelList()); @@ -764,8 +764,8 @@ KviServerDetailsWidget::KviServerDetailsWidget(QWidget * par,KviIrcServer * s) tw->addTab(tab,*(g_pIconManager->getSmallIcon(KVI_SMALLICON_CHANNEL)),__tr2qs_ctx("Join Channels","options")); // after connect execute - tab = new QWidget(tw); - gl = new QGridLayout(tab,1,1,10,4); + tab = new TQWidget(tw); + gl = new TQGridLayout(tab,1,1,10,4); m_pOnConnectEditor = KviScriptEditor::createInstance(tab); @@ -782,8 +782,8 @@ KviServerDetailsWidget::KviServerDetailsWidget(QWidget * par,KviIrcServer * s) tw->addTab(tab,__tr2qs_ctx("On Connect","options")); // after login execute - tab = new QWidget(tw); - gl = new QGridLayout(tab,1,1,10,4); + tab = new TQWidget(tw); + gl = new TQGridLayout(tab,1,1,10,4); m_pOnLoginEditor = KviScriptEditor::createInstance(tab); gl->addWidget(m_pOnLoginEditor,0,0); @@ -800,16 +800,16 @@ KviServerDetailsWidget::KviServerDetailsWidget(QWidget * par,KviIrcServer * s) tw->addTab(tab,__tr2qs_ctx("On Login","options")); - QPushButton * b = new QPushButton(__tr2qs_ctx("OK","options"),this); + TQPushButton * b = new TQPushButton(__tr2qs_ctx("OK","options"),this); b->setMinimumWidth(80); g->addWidget(b,3,2); b->setDefault(true); - connect(b,SIGNAL(clicked()),this,SLOT(accept())); + connect(b,TQT_SIGNAL(clicked()),this,TQT_SLOT(accept())); - b = new QPushButton(__tr2qs_ctx("Cancel","options"),this); + b = new TQPushButton(__tr2qs_ctx("Cancel","options"),this); g->addWidget(b,3,3); b->setMinimumWidth(80); - connect(b,SIGNAL(clicked()),this,SLOT(reject())); + connect(b,TQT_SIGNAL(clicked()),this,TQT_SLOT(reject())); g->setRowStretch(2,1); g->setColStretch(1,1); @@ -835,14 +835,14 @@ void KviServerDetailsWidget::useIPV6CheckToggled(bool) setHeaderLabelText(); } -void KviServerDetailsWidget::portEditorTextChanged(const QString &) +void KviServerDetailsWidget::portEditorTextChanged(const TQString &) { setHeaderLabelText(); } void KviServerDetailsWidget::setHeaderLabelText() { - QString szTmp = "irc"; + TQString szTmp = "irc"; if(m_pUseIPV6Check->isChecked())szTmp += "6"; szTmp += "://"; szTmp += m_szHostname; @@ -850,7 +850,7 @@ void KviServerDetailsWidget::setHeaderLabelText() bool bOk; - QString num = m_pPortEditor->text(); + TQString num = m_pPortEditor->text(); unsigned int uPort = num.toUInt(&bOk); if(!bOk)uPort = 6667; num.setNum(uPort); @@ -897,7 +897,7 @@ void KviServerDetailsWidget::fillData(KviIrcServer * s) s->setInitUMode(szUMode.ptr()); } - QString tmp = m_pPortEditor->text(); + TQString tmp = m_pPortEditor->text(); bool bOk; kvi_u32_t uPort = tmp.toUInt(&bOk); if(!bOk)uPort = 6667; @@ -943,20 +943,20 @@ void KviServerDetailsWidget::fillData(KviIrcServer * s) } if(m_pOnConnectEditor) { - QString tmp; + TQString tmp; m_pOnConnectEditor->getText(tmp); s->setOnConnectCommand(tmp); } if(m_pOnLoginEditor) { - QString tmp; + TQString tmp; m_pOnLoginEditor->getText(tmp); s->setOnLoginCommand(tmp); } if(m_pChannelListSelector) m_pChannelListSelector->commit(); if(m_lstChannels.isEmpty())s->setAutoJoinChannelList(0); - else s->setAutoJoinChannelList(new QStringList(m_lstChannels)); + else s->setAutoJoinChannelList(new TQStringList(m_lstChannels)); if(m_pUseAutoConnect) s->setAutoConnect(m_pUseAutoConnect->isChecked()); if(m_pProxyEditor) @@ -973,8 +973,8 @@ void KviServerDetailsWidget::useDefaultInitUModeToggled(bool b) // kvi_app.cpp extern KVIRC_API KviIrcServerDataBase * g_pIrcServerDataBase; -KviServerOptionsListViewItem::KviServerOptionsListViewItem(KviTalListView *parent,const QPixmap &pm,const KviIrcNetwork *n) - : KviTalListViewItem(parent) +KviServerOptionsListViewItem::KviServerOptionsListViewItem(KviTalListView *tqparent,const TQPixmap &pm,const KviIrcNetwork *n) + : KviTalListViewItem(tqparent) { setPixmap(0,pm); m_pServerData = 0; @@ -983,8 +983,8 @@ KviServerOptionsListViewItem::KviServerOptionsListViewItem(KviTalListView *paren setText(1,n->description()); } -KviServerOptionsListViewItem::KviServerOptionsListViewItem(KviTalListViewItem *parent,const QPixmap &pm,const KviIrcServer *s) - : KviTalListViewItem(parent) +KviServerOptionsListViewItem::KviServerOptionsListViewItem(KviTalListViewItem *tqparent,const TQPixmap &pm,const KviIrcServer *s) + : KviTalListViewItem(tqparent) { setPixmap(0,pm); m_pServerData = new KviIrcServer(*s); @@ -1021,16 +1021,16 @@ void KviServerOptionsListViewItem::updateVisibleStrings() -KviServerOptionsWidget::KviServerOptionsWidget(QWidget * parent) - : KviOptionsWidget(parent,"server_options_widget") +KviServerOptionsWidget::KviServerOptionsWidget(TQWidget * tqparent) + : KviOptionsWidget(tqparent,"server_options_widget") { createLayout(4,2); m_pContextPopup = new KviTalPopupMenu(this); m_pImportPopup = new KviTalPopupMenu(this); - connect(m_pImportPopup,SIGNAL(aboutToShow()),this,SLOT(importPopupAboutToShow())); - connect(m_pImportPopup,SIGNAL(activated(int)),this,SLOT(importPopupActivated(int))); + connect(m_pImportPopup,TQT_SIGNAL(aboutToShow()),this,TQT_SLOT(importPopupAboutToShow())); + connect(m_pImportPopup,TQT_SIGNAL(activated(int)),this,TQT_SLOT(importPopupActivated(int))); m_pServerDetailsDialog = 0; m_pNetworkDetailsDialog = 0; @@ -1043,15 +1043,15 @@ KviServerOptionsWidget::KviServerOptionsWidget(QWidget * parent) m_pListView->setRootIsDecorated(true); m_pListView->setAllColumnsShowFocus(true); m_pListView->setSelectionMode(KviTalListView::Single); - connect(m_pListView,SIGNAL(selectionChanged(KviTalListViewItem *)), - this,SLOT(listViewItemSelectionChanged(KviTalListViewItem *))); - connect(m_pListView,SIGNAL(rightButtonPressed(KviTalListViewItem *,const QPoint &,int)), - this,SLOT(listViewRightButtonPressed(KviTalListViewItem *,const QPoint &,int))); - connect(m_pListView,SIGNAL(doubleClicked(KviTalListViewItem*, const QPoint&, int )), - this,SLOT(detailsClicked())); + connect(m_pListView,TQT_SIGNAL(selectionChanged(KviTalListViewItem *)), + this,TQT_SLOT(listViewItemSelectionChanged(KviTalListViewItem *))); + connect(m_pListView,TQT_SIGNAL(rightButtonPressed(KviTalListViewItem *,const TQPoint &,int)), + this,TQT_SLOT(listViewRightButtonPressed(KviTalListViewItem *,const TQPoint &,int))); + connect(m_pListView,TQT_SIGNAL(doubleClicked(KviTalListViewItem*, const TQPoint&, int )), + this,TQT_SLOT(detailsClicked())); #ifdef COMPILE_INFO_TIPS - QString tiptxt = __tr2qs_ctx("
This is the list of available IRC servers.
" \ + TQString tiptxt = __tr2qs_ctx("
This is the list of available IRC servers.
" \ "Right-click on the list to add or remove servers and perform other actions.
"\ "Double-click on a item for advanced options.
","options"); KviTalToolTip::add(m_pListView,tiptxt); @@ -1064,7 +1064,7 @@ KviServerOptionsWidget::KviServerOptionsWidget(QWidget * parent) m_pNewNetworkButton = new KviStyledToolButton(vbox); m_pNewNetworkButton->setPixmap(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_WORLD))); m_pNewNetworkButton->setAutoRaise(true); - connect(m_pNewNetworkButton,SIGNAL(clicked()),this,SLOT(newNetwork())); + connect(m_pNewNetworkButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(newNetwork())); #ifdef COMPILE_INFO_TIPS KviTalToolTip::add(m_pNewNetworkButton,__tr2qs_ctx("New Network","options")); #endif @@ -1072,7 +1072,7 @@ KviServerOptionsWidget::KviServerOptionsWidget(QWidget * parent) m_pNewServerButton = new KviStyledToolButton(vbox); m_pNewServerButton->setPixmap(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_SERVER))); m_pNewServerButton->setAutoRaise(true); - connect(m_pNewServerButton,SIGNAL(clicked()),this,SLOT(newServer())); + connect(m_pNewServerButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(newServer())); #ifdef COMPILE_INFO_TIPS KviTalToolTip::add(m_pNewServerButton,__tr2qs_ctx("New Server","options")); #endif @@ -1081,19 +1081,19 @@ KviServerOptionsWidget::KviServerOptionsWidget(QWidget * parent) m_pRemoveButton->setPixmap(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_CUT))); m_pRemoveButton->setEnabled(false); m_pRemoveButton->setAutoRaise(true); - connect(m_pRemoveButton,SIGNAL(clicked()),this,SLOT(removeCurrent())); + connect(m_pRemoveButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(removeCurrent())); #ifdef COMPILE_INFO_TIPS KviTalToolTip::add(m_pRemoveButton,__tr2qs_ctx("Remove Network/Server","options")); #endif - QFrame * f = new QFrame(vbox); - f->setFrameStyle(QFrame::Sunken | QFrame::HLine); + TQFrame * f = new TQFrame(vbox); + f->setFrameStyle(TQFrame::Sunken | TQFrame::HLine); m_pCopyServerButton = new KviStyledToolButton(vbox); m_pCopyServerButton->setPixmap(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_COPY))); m_pCopyServerButton->setEnabled(false); m_pCopyServerButton->setAutoRaise(true); - connect(m_pCopyServerButton,SIGNAL(clicked()),this,SLOT(copyServer())); + connect(m_pCopyServerButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(copyServer())); #ifdef COMPILE_INFO_TIPS KviTalToolTip::add(m_pCopyServerButton,__tr2qs_ctx("Copy Server","options")); #endif @@ -1102,13 +1102,13 @@ KviServerOptionsWidget::KviServerOptionsWidget(QWidget * parent) m_pPasteServerButton->setPixmap(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_PASTE))); m_pPasteServerButton->setEnabled(false); m_pPasteServerButton->setAutoRaise(true); - connect(m_pPasteServerButton,SIGNAL(clicked()),this,SLOT(pasteServer())); + connect(m_pPasteServerButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(pasteServer())); #ifdef COMPILE_INFO_TIPS KviTalToolTip::add(m_pPasteServerButton,__tr2qs_ctx("Paste Server","options")); #endif - f = new QFrame(vbox); - f->setFrameStyle(QFrame::Sunken | QFrame::HLine); + f = new TQFrame(vbox); + f->setFrameStyle(TQFrame::Sunken | TQFrame::HLine); m_pImportButton = new KviStyledToolButton(vbox); m_pImportButton->setPixmap(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_FOLDER))); @@ -1119,13 +1119,13 @@ KviServerOptionsWidget::KviServerOptionsWidget(QWidget * parent) KviTalToolTip::add(m_pImportButton,__tr2qs_ctx("Import List","options")); #endif - QFrame * lll = new QFrame(vbox); + TQFrame * lll = new TQFrame(vbox); vbox->setStretchFactor(lll,100); KviTalGroupBox *gbox = addGroupBox(0,1,1,1,3,Qt::Horizontal,__tr2qs_ctx("Active Configuration","options")); - m_pSrvNetLabel = new QLabel(__tr2qs_ctx("Server:","options"),gbox); + m_pSrvNetLabel = new TQLabel(__tr2qs_ctx("Server:","options"),gbox); - m_pSrvNetEdit = new QLineEdit(gbox); + m_pSrvNetEdit = new TQLineEdit(gbox); #ifdef COMPILE_INFO_TIPS KviTalToolTip::add(m_pSrvNetEdit,__tr2qs_ctx("
This is the name of the currently selected server or network
","options")); #endif @@ -1142,33 +1142,33 @@ KviServerOptionsWidget::KviServerOptionsWidget(QWidget * parent) "(thus your OS must have a working IPv6 stack and you must have an IPv6 connection).
","options")); #endif - m_pPortLabel = new QLabel(__tr2qs_ctx("Port:","options"),gbox); + m_pPortLabel = new TQLabel(__tr2qs_ctx("Port:","options"),gbox); - m_pPortEdit = new QLineEdit(gbox); + m_pPortEdit = new TQLineEdit(gbox); #ifdef COMPILE_INFO_TIPS KviTalToolTip::add(m_pPortEdit,__tr2qs_ctx("
This is the default port that this server will be contacted on.
Usually 6667 is OK.
","options")); #endif */ - m_pDetailsButton = new QPushButton(__tr2qs_ctx("Advanced...","options"),gbox); - connect(m_pDetailsButton,SIGNAL(clicked()),this,SLOT(detailsClicked())); + m_pDetailsButton = new TQPushButton(__tr2qs_ctx("Advanced...","options"),gbox); + connect(m_pDetailsButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(detailsClicked())); #ifdef COMPILE_INFO_TIPS KviTalToolTip::add(m_pDetailsButton,__tr2qs_ctx("
Click here to edit advanced options for this entry
","options")); #endif - m_pConnectCurrent = new QPushButton(__tr2qs_ctx("Connect &Now","options"),this); + m_pConnectCurrent = new TQPushButton(__tr2qs_ctx("Connect &Now","options"),this); addWidgetToLayout(m_pConnectCurrent,0,2,0,2); - connect(m_pConnectCurrent,SIGNAL(clicked()),this,SLOT(connectCurrentClicked())); + connect(m_pConnectCurrent,TQT_SIGNAL(clicked()),this,TQT_SLOT(connectCurrentClicked())); #ifdef COMPILE_INFO_TIPS KviTalToolTip::add(m_pConnectCurrent,__tr2qs_ctx("
Hit this button to connect to the currently selected server.
","options")); #endif m_pRecentPopup = new KviTalPopupMenu(this); - connect(m_pRecentPopup,SIGNAL(aboutToShow()),this,SLOT(recentServersPopupAboutToShow())); - connect(m_pRecentPopup,SIGNAL(activated(int)),this,SLOT(recentServersPopupClicked(int))); + connect(m_pRecentPopup,TQT_SIGNAL(aboutToShow()),this,TQT_SLOT(recentServersPopupAboutToShow())); + connect(m_pRecentPopup,TQT_SIGNAL(activated(int)),this,TQT_SLOT(recentServersPopupClicked(int))); - QToolButton * tb = new KviStyledToolButton(this); + TQToolButton * tb = new KviStyledToolButton(this); addWidgetToLayout(tb,1,2,1,2); tb->setPixmap(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_TIME))); tb->setPopup(m_pRecentPopup); @@ -1192,10 +1192,10 @@ KviServerOptionsWidget::KviServerOptionsWidget(QWidget * parent) fillServerList(); - layout()->setRowStretch(0,1); - //layout()->setColStretch(1,5); - //layout()->setColStretch(2,2); - layout()->setColStretch(0,1); + tqlayout()->setRowStretch(0,1); + //tqlayout()->setColStretch(1,5); + //tqlayout()->setColStretch(2,2); + tqlayout()->setColStretch(0,1); setMinimumWidth(320); } @@ -1289,7 +1289,7 @@ void KviServerOptionsWidget::fillServerList() KviServerOptionsListViewItem * srv; KviServerOptionsListViewItem * cur = 0; - KviPointerHashTableIterator it(*(g_pIrcServerDataBase->recordDict())); + KviPointerHashTableIterator it(*(g_pIrcServerDataBase->recordDict())); while(KviIrcServerDataBaseRecord * r = it.current()) { @@ -1360,7 +1360,7 @@ void KviServerOptionsWidget::saveLastItem() m_pLastEditedItem->updateVisibleStrings(); } else if(m_pLastEditedItem->m_pNetworkData) { - QString tmp = m_pSrvNetEdit->text(); + TQString tmp = m_pSrvNetEdit->text(); if(tmp.isEmpty())tmp = __tr2qs_ctx("UnknownNet","options"); m_pLastEditedItem->m_pNetworkData->setName(tmp); m_pLastEditedItem->updateVisibleStrings(); @@ -1374,7 +1374,7 @@ void KviServerOptionsWidget::commit() KviServerOptionsListViewItem * it = (KviServerOptionsListViewItem *)m_pListView->firstChild(); while(it) { - QString tmp = it->m_pNetworkData ? it->m_pNetworkData->name() : QString::null; + TQString tmp = it->m_pNetworkData ? it->m_pNetworkData->name() : TQString(); if(!tmp.isEmpty()) { KviIrcNetwork * net = 0; @@ -1422,29 +1422,29 @@ void KviServerOptionsWidget::commit() KviOptionsWidget::commit(); } -void KviServerOptionsWidget::listViewRightButtonPressed(KviTalListViewItem *it,const QPoint &pnt,int col) +void KviServerOptionsWidget::listViewRightButtonPressed(KviTalListViewItem *it,const TQPoint &pnt,int col) { int id; bool bServer = (it && ((KviServerOptionsListViewItem *)it)->m_pServerData); m_pContextPopup->clear(); - m_pContextPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_WORLD)),__tr2qs_ctx("New Network","options"),this,SLOT(newNetwork())); - id = m_pContextPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_CUT)),__tr2qs_ctx("Remove Network","options"),this,SLOT(removeCurrent())); + m_pContextPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_WORLD)),__tr2qs_ctx("New Network","options"),this,TQT_SLOT(newNetwork())); + id = m_pContextPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_CUT)),__tr2qs_ctx("Remove Network","options"),this,TQT_SLOT(removeCurrent())); m_pContextPopup->setItemEnabled(id,!bServer); m_pContextPopup->insertSeparator(); - id = m_pContextPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_SERVER)),__tr2qs_ctx("&New Server","options"),this,SLOT(newServer())); - id = m_pContextPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_CUT)),__tr2qs_ctx("Re&move Server","options"),this,SLOT(removeCurrent())); + id = m_pContextPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_SERVER)),__tr2qs_ctx("&New Server","options"),this,TQT_SLOT(newServer())); + id = m_pContextPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_CUT)),__tr2qs_ctx("Re&move Server","options"),this,TQT_SLOT(removeCurrent())); m_pContextPopup->setItemEnabled(id,bServer); - id = m_pContextPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_COPY)),__tr2qs_ctx("&Copy Server","options"),this,SLOT(copyServer())); + id = m_pContextPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_COPY)),__tr2qs_ctx("&Copy Server","options"),this,TQT_SLOT(copyServer())); m_pContextPopup->setItemEnabled(id,bServer); - id = m_pContextPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_PASTE)),__tr2qs_ctx("&Paste Server","options"),this,SLOT(pasteServer())); + id = m_pContextPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_PASTE)),__tr2qs_ctx("&Paste Server","options"),this,TQT_SLOT(pasteServer())); m_pContextPopup->setItemEnabled(id,m_pClipboard); m_pContextPopup->insertSeparator(); - // m_pContextPopup->insertItem(__c2q(__tr("Merge list from server.ini","options")),this,SLOT(importFromIni())); - m_pContextPopup->insertItem(__tr2qs_ctx("Clear List","options"),this,SLOT(clearList())); + // m_pContextPopup->insertItem(__c2q(__tr("Merge list from server.ini","options")),this,TQT_SLOT(importFromIni())); + m_pContextPopup->insertItem(__tr2qs_ctx("Clear List","options"),this,TQT_SLOT(clearList())); m_pContextPopup->insertSeparator(); m_pContextPopup->insertItem(__tr2qs_ctx("Import List","options"),m_pImportPopup); - m_pContextPopup->popup(QCursor::pos()); + m_pContextPopup->popup(TQCursor::pos()); } void KviServerOptionsWidget::importPopupAboutToShow() @@ -1501,8 +1501,8 @@ void KviServerOptionsWidget::importPopupActivated(int id) return; } - connect(m_pImportFilter,SIGNAL(server(const KviIrcServer &,const char *)),this,SLOT(importServer(const KviIrcServer &,const char *))); - connect(m_pImportFilter,SIGNAL(destroyed()),this,SLOT(importerDead())); + connect(m_pImportFilter,TQT_SIGNAL(server(const KviIrcServer &,const char *)),this,TQT_SLOT(importServer(const KviIrcServer &,const char *))); + connect(m_pImportFilter,TQT_SIGNAL(destroyed()),this,TQT_SLOT(importerDead())); m_pImportFilter->start(); } @@ -1528,7 +1528,7 @@ void KviServerOptionsWidget::importServer(const KviIrcServer &s,const char * net { if(srv->m_pServerData->isIpV6() == s.isIpV6()) { - if(KviQString::equalCI(srv->m_pServerData->hostName(),s.hostName())) + if(KviTQString::equalCI(srv->m_pServerData->hostName(),s.hostName())) { // update the port srv->m_pServerData->setPort(s.port()); @@ -1565,7 +1565,7 @@ void KviServerOptionsWidget::newServer() KviServerOptionsListViewItem * net; if(m_pLastEditedItem->m_pServerData) { - net = (KviServerOptionsListViewItem *)m_pLastEditedItem->parent(); + net = (KviServerOptionsListViewItem *)m_pLastEditedItem->tqparent(); if(!net)return; } else net = m_pLastEditedItem; @@ -1607,7 +1607,7 @@ void KviServerOptionsWidget::pasteServer() KviServerOptionsListViewItem * net; if(m_pLastEditedItem->m_pServerData) { - net = (KviServerOptionsListViewItem *)m_pLastEditedItem->parent(); + net = (KviServerOptionsListViewItem *)m_pLastEditedItem->tqparent(); if(!net)return; } else net = m_pLastEditedItem; @@ -1669,7 +1669,7 @@ void KviServerOptionsWidget::detailsClicked() m_pServerDetailsDialog = new KviServerDetailsWidget(this,m_pLastEditedItem->m_pServerData); int retCode = m_pServerDetailsDialog->exec(); - if(retCode == QDialog::Accepted) + if(retCode == TQDialog::Accepted) { if(m_pLastEditedItem) { @@ -1692,7 +1692,7 @@ void KviServerOptionsWidget::detailsClicked() m_pNetworkDetailsDialog = new KviNetworkDetailsWidget(this,m_pLastEditedItem->m_pNetworkData); int retCode = m_pNetworkDetailsDialog->exec(); - if(retCode == QDialog::Accepted) + if(retCode == TQDialog::Accepted) { if(m_pLastEditedItem) { diff --git a/src/modules/options/optw_servers.h b/src/modules/options/optw_servers.h index ea71c6d3..d03f8246 100644 --- a/src/modules/options/optw_servers.h +++ b/src/modules/options/optw_servers.h @@ -27,9 +27,9 @@ #include "kvi_optionswidget.h" #include "kvi_tal_listview.h" -#include -#include -#include +#include +#include +#include class KviIrcServer; class KviIrcNetwork; @@ -41,8 +41,8 @@ class KviMexServerImport; class KviServerOptionsListViewItem : public KviTalListViewItem { public: - KviServerOptionsListViewItem(KviTalListView *parent,const QPixmap &pm,const KviIrcNetwork *n); - KviServerOptionsListViewItem(KviTalListViewItem *parent,const QPixmap &pm,const KviIrcServer *s); + KviServerOptionsListViewItem(KviTalListView *tqparent,const TQPixmap &pm,const KviIrcNetwork *n); + KviServerOptionsListViewItem(KviTalListViewItem *tqparent,const TQPixmap &pm,const KviIrcServer *s); ~KviServerOptionsListViewItem(); public: KviIrcServer * m_pServerData; @@ -51,47 +51,48 @@ public: void updateVisibleStrings(); }; -class QLabel; -class QLineEdit; +class TQLabel; +class TQLineEdit; class KviIpEditor; class KviIrcServer; -class QCheckBox; +class TQCheckBox; class KviTalPopupMenu; class KviScriptEditor; -class QComboBox; -class QPushButton; -class QToolButton; +class TQComboBox; +class TQPushButton; +class TQToolButton; class KviNickServRule; class KviNickServRuleEditor; -class KviNetworkDetailsWidget : public QDialog +class KviNetworkDetailsWidget : public TQDialog { Q_OBJECT + TQ_OBJECT public: - KviNetworkDetailsWidget(QWidget * par,KviIrcNetwork * d); + KviNetworkDetailsWidget(TQWidget * par,KviIrcNetwork * d); ~KviNetworkDetailsWidget(); protected: KviScriptEditor * m_pOnConnectEditor; KviScriptEditor * m_pOnLoginEditor; - QLineEdit * m_pUserEditor; - QLineEdit * m_pPassEditor; - QLineEdit * m_pNickEditor; - QLineEdit * m_pRealEditor; - QLineEdit * m_pDescEditor; + TQLineEdit * m_pUserEditor; + TQLineEdit * m_pPassEditor; + TQLineEdit * m_pNickEditor; + TQLineEdit * m_pRealEditor; + TQLineEdit * m_pDescEditor; - QComboBox * m_pEncodingEditor; + TQComboBox * m_pEncodingEditor; - QCheckBox * m_pAutoConnectCheck; + TQCheckBox * m_pAutoConnectCheck; KviTalListView * m_pNickServListView; - QCheckBox * m_pNickServCheck; - QPushButton * m_pAddRuleButton; - QPushButton * m_pDelRuleButton; - QPushButton * m_pEditRuleButton; + TQCheckBox * m_pNickServCheck; + TQPushButton * m_pAddRuleButton; + TQPushButton * m_pDelRuleButton; + TQPushButton * m_pEditRuleButton; - QStringList m_lstChannels; + TQStringList m_lstChannels; KviCahnnelListSelector * m_pChannelListSelector; public: void fillData(KviIrcNetwork * d); @@ -102,42 +103,43 @@ protected slots: void editNickServRule(); }; -class KviServerDetailsWidget : public QDialog +class KviServerDetailsWidget : public TQDialog { Q_OBJECT + TQ_OBJECT public: - KviServerDetailsWidget(QWidget * par,KviIrcServer * s); + KviServerDetailsWidget(TQWidget * par,KviIrcServer * s); ~KviServerDetailsWidget(); protected: - QString m_szHostname; - QLabel * m_pHeaderLabel; + TQString m_szHostname; + TQLabel * m_pHeaderLabel; KviScriptEditor * m_pOnConnectEditor; KviScriptEditor * m_pOnLoginEditor; - QLineEdit * m_pUserEditor; - QLineEdit * m_pPassEditor; - QLineEdit * m_pNickEditor; - QLineEdit * m_pRealEditor; - QLineEdit * m_pDescEditor; - QLineEdit * m_pIdEditor; - QComboBox * m_pLinkFilterEditor; - QComboBox * m_pEncodingEditor; + TQLineEdit * m_pUserEditor; + TQLineEdit * m_pPassEditor; + TQLineEdit * m_pNickEditor; + TQLineEdit * m_pRealEditor; + TQLineEdit * m_pDescEditor; + TQLineEdit * m_pIdEditor; + TQComboBox * m_pLinkFilterEditor; + TQComboBox * m_pEncodingEditor; KviIpEditor * m_pIpEditor; - QCheckBox * m_pCacheIpCheck; - QCheckBox * m_pUseSSLCheck; - QCheckBox * m_pUseDefaultInitUMode; - QCheckBox * m_pIMode; - QCheckBox * m_pWMode; - QCheckBox * m_pSMode; - QCheckBox * m_pUseAutoConnect; - QCheckBox * m_pUseIPV6Check; - QLineEdit * m_pPortEditor; - QStringList m_lstChannels; + TQCheckBox * m_pCacheIpCheck; + TQCheckBox * m_pUseSSLCheck; + TQCheckBox * m_pUseDefaultInitUMode; + TQCheckBox * m_pIMode; + TQCheckBox * m_pWMode; + TQCheckBox * m_pSMode; + TQCheckBox * m_pUseAutoConnect; + TQCheckBox * m_pUseIPV6Check; + TQLineEdit * m_pPortEditor; + TQStringList m_lstChannels; KviCahnnelListSelector * m_pChannelListSelector; - QComboBox * m_pProxyEditor; + TQComboBox * m_pProxyEditor; protected slots: void useDefaultInitUModeToggled(bool); - void portEditorTextChanged(const QString &); + void portEditorTextChanged(const TQString &); void useIPV6CheckToggled(bool); public: void setHeaderLabelText(); @@ -154,34 +156,35 @@ public: class KviServerOptionsWidget : public KviOptionsWidget { Q_OBJECT + TQ_OBJECT public: - KviServerOptionsWidget(QWidget * parent); + KviServerOptionsWidget(TQWidget * tqparent); ~KviServerOptionsWidget(); protected: KviTalListView * m_pListView; - QLabel * m_pSrvNetLabel; - QLineEdit * m_pSrvNetEdit; - //QLabel * m_pPortLabel; - //QLineEdit * m_pPortEdit; - QPushButton * m_pDetailsButton; + TQLabel * m_pSrvNetLabel; + TQLineEdit * m_pSrvNetEdit; + //TQLabel * m_pPortLabel; + //TQLineEdit * m_pPortEdit; + TQPushButton * m_pDetailsButton; KviTalPopupMenu * m_pRecentPopup; KviTalPopupMenu * m_pContextPopup; KviTalPopupMenu * m_pImportPopup; KviIrcServer * m_pClipboard; - //QCheckBox * m_pIpV6Check; - QPushButton * m_pConnectCurrent; - QPushButton * m_pConnectNew; + //TQCheckBox * m_pIpV6Check; + TQPushButton * m_pConnectCurrent; + TQPushButton * m_pConnectNew; KviServerOptionsListViewItem * m_pLastEditedItem; KviServerDetailsWidget * m_pServerDetailsDialog; KviNetworkDetailsWidget * m_pNetworkDetailsDialog; KviMexServerImport * m_pImportFilter; - QToolButton * m_pNewServerButton; - QToolButton * m_pNewNetworkButton; - QToolButton * m_pRemoveButton; - QToolButton * m_pCopyServerButton; - QToolButton * m_pPasteServerButton; - QToolButton * m_pImportButton; + TQToolButton * m_pNewServerButton; + TQToolButton * m_pNewNetworkButton; + TQToolButton * m_pRemoveButton; + TQToolButton * m_pCopyServerButton; + TQToolButton * m_pPasteServerButton; + TQToolButton * m_pImportButton; private: void fillServerList(); void saveLastItem(); @@ -191,7 +194,7 @@ protected slots: void importServer(const KviIrcServer & s,const char * network); void importPopupAboutToShow(); void listViewItemSelectionChanged(KviTalListViewItem *it); - void listViewRightButtonPressed(KviTalListViewItem *it,const QPoint &pnt,int col); + void listViewRightButtonPressed(KviTalListViewItem *it,const TQPoint &pnt,int col); void newNetwork(); void removeCurrent(); void newServer(); diff --git a/src/modules/options/optw_sound.cpp b/src/modules/options/optw_sound.cpp index 9fec0a0c..569d4aee 100644 --- a/src/modules/options/optw_sound.cpp +++ b/src/modules/options/optw_sound.cpp @@ -31,8 +31,8 @@ #include "kvi_pointerlist.h" #include "kvi_string.h" -#include -#include +#include +#include #include "kvi_tal_hbox.h" #ifdef COMPILE_INFO_TIPS @@ -43,7 +43,7 @@ -KviSoundOptionsWidget::KviSoundOptionsWidget(QWidget * pParent) +KviSoundOptionsWidget::KviSoundOptionsWidget(TQWidget * pParent) : KviOptionsWidget(pParent) { } @@ -53,8 +53,8 @@ KviSoundOptionsWidget::~KviSoundOptionsWidget() } -KviSoundGeneralOptionsWidget::KviSoundGeneralOptionsWidget(QWidget * parent) -: KviOptionsWidget(parent,"sound_system_options_widget") +KviSoundGeneralOptionsWidget::KviSoundGeneralOptionsWidget(TQWidget * tqparent) +: KviOptionsWidget(tqparent,"sound_system_options_widget") { #ifdef COMPILE_ON_WINDOWS createLayout(4,1); @@ -67,13 +67,13 @@ KviSoundGeneralOptionsWidget::KviSoundGeneralOptionsWidget(QWidget * parent) KviTalHBox * h = new KviTalHBox(g); - m_pSoundSystemBox = new QComboBox(false,h); + m_pSoundSystemBox = new TQComboBox(false,h); - m_pSoundAutoDetectButton = new QPushButton(__tr2qs_ctx("Auto-detect","options"),h); - connect(m_pSoundAutoDetectButton,SIGNAL(clicked()),this,SLOT(soundAutoDetect())); + m_pSoundAutoDetectButton = new TQPushButton(__tr2qs_ctx("Auto-detect","options"),h); + connect(m_pSoundAutoDetectButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(soundAutoDetect())); - m_pSoundTestButton = new QPushButton(__tr2qs_ctx("Test","options"),h); - connect(m_pSoundTestButton,SIGNAL(clicked()),this,SLOT(soundTest())); + m_pSoundTestButton = new TQPushButton(__tr2qs_ctx("Test","options"),h); + connect(m_pSoundTestButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(soundTest())); g = addGroupBox(0,1,0,1,1,Qt::Horizontal,__tr2qs_ctx("Media Player","options"),true); @@ -83,13 +83,13 @@ KviSoundGeneralOptionsWidget::KviSoundGeneralOptionsWidget(QWidget * parent) h = new KviTalHBox(g); - m_pMediaPlayerBox = new QComboBox(false,h); + m_pMediaPlayerBox = new TQComboBox(false,h); - m_pMediaAutoDetectButton = new QPushButton(__tr2qs_ctx("Auto-detect","options"),h); - connect(m_pMediaAutoDetectButton,SIGNAL(clicked()),this,SLOT(mediaAutoDetect())); + m_pMediaAutoDetectButton = new TQPushButton(__tr2qs_ctx("Auto-detect","options"),h); + connect(m_pMediaAutoDetectButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(mediaAutoDetect())); - m_pMediaTestButton = new QPushButton(__tr2qs_ctx("Test","options"),h); - connect(m_pMediaTestButton,SIGNAL(clicked()),this,SLOT(mediaTest())); + m_pMediaTestButton = new TQPushButton(__tr2qs_ctx("Test","options"),h); + connect(m_pMediaTestButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(mediaTest())); addRowSpacer(0,2,0,2); @@ -105,7 +105,7 @@ KviSoundGeneralOptionsWidget::KviSoundGeneralOptionsWidget(QWidget * parent) h = new KviTalHBox(g); - m_pTagsEncodingCombo = new QComboBox(false,h); + m_pTagsEncodingCombo = new TQComboBox(false,h); m_pTagsEncodingCombo->insertItem(__tr2qs_ctx("Use Language Encoding","options")); int i = 0; @@ -114,7 +114,7 @@ KviSoundGeneralOptionsWidget::KviSoundGeneralOptionsWidget(QWidget * parent) KviLocale::EncodingDescription * d = KviLocale::encodingDescription(i); while(d->szName) { - if(KviQString::equalCI(d->szName,KVI_OPTION_STRING(KviOption_stringMp3TagsEncoding)))iMatch = i + 1; + if(KviTQString::equalCI(d->szName,KVI_OPTION_STRING(KviOption_stringMp3TagsEncoding)))iMatch = i + 1; m_pTagsEncodingCombo->insertItem(d->szName); i++; d = KviLocale::encodingDescription(i); @@ -128,7 +128,7 @@ KviSoundGeneralOptionsWidget::KviSoundGeneralOptionsWidget(QWidget * parent) h = new KviTalHBox(g); - m_pWinampEncodingCombo = new QComboBox(false,h); + m_pWinampEncodingCombo = new TQComboBox(false,h); m_pWinampEncodingCombo->insertItem(__tr2qs_ctx("Use Language Encoding","options")); i = 0; @@ -137,7 +137,7 @@ KviSoundGeneralOptionsWidget::KviSoundGeneralOptionsWidget(QWidget * parent) d = KviLocale::encodingDescription(i); while(d->szName) { - if(KviQString::equalCI(d->szName,KVI_OPTION_STRING(KviOption_stringWinampTextEncoding)))iMatch = i + 1; + if(KviTQString::equalCI(d->szName,KVI_OPTION_STRING(KviOption_stringWinampTextEncoding)))iMatch = i + 1; m_pWinampEncodingCombo->insertItem(d->szName); i++; d = KviLocale::encodingDescription(i); @@ -180,8 +180,8 @@ void KviSoundGeneralOptionsWidget::mediaAutoDetect() void KviSoundGeneralOptionsWidget::soundFillBox() { - QStringList l; - QStringList::Iterator it; + TQStringList l; + TQStringList::Iterator it; int cnt; int i; KviModule * m = g_pModuleManager->getModule("snd"); @@ -203,8 +203,8 @@ void KviSoundGeneralOptionsWidget::soundFillBox() for(i=0;itext(i); - if(KviQString::equalCI(t,KVI_OPTION_STRING(KviOption_stringSoundSystem))) + TQString t = m_pSoundSystemBox->text(i); + if(KviTQString::equalCI(t,KVI_OPTION_STRING(KviOption_stringSoundSystem))) { m_pSoundSystemBox->setCurrentItem(i); break; @@ -221,8 +221,8 @@ disable: void KviSoundGeneralOptionsWidget::mediaFillBox() { - QStringList l; - QStringList::Iterator it; + TQStringList l; + TQStringList::Iterator it; int cnt; int i; KviModule * m = g_pModuleManager->getModule("mediaplayer"); @@ -238,8 +238,8 @@ void KviSoundGeneralOptionsWidget::mediaFillBox() for(i=0;itext(i); - if(KviQString::equalCI(t,KVI_OPTION_STRING(KviOption_stringPreferredMediaPlayer))) + TQString t = m_pMediaPlayerBox->text(i); + if(KviTQString::equalCI(t,KVI_OPTION_STRING(KviOption_stringPreferredMediaPlayer))) { m_pMediaPlayerBox->setCurrentItem(i); break; @@ -283,8 +283,8 @@ void KviSoundGeneralOptionsWidget::commit() #endif } -KviSoundsOptionsWidget::KviSoundsOptionsWidget(QWidget * parent) -: KviOptionsWidget(parent,"sound_options_widget") +KviSoundsOptionsWidget::KviSoundsOptionsWidget(TQWidget * tqparent) +: KviOptionsWidget(tqparent,"sound_options_widget") { createLayout(5,2); addLabel(0,0,0,0,__tr2qs_ctx("New Query opened","options")); diff --git a/src/modules/options/optw_sound.h b/src/modules/options/optw_sound.h index 37b3c0ed..3c2128f3 100644 --- a/src/modules/options/optw_sound.h +++ b/src/modules/options/optw_sound.h @@ -25,8 +25,8 @@ //============================================================================= #include "kvi_optionswidget.h" -#include -#include +#include +#include #define KVI_OPTIONS_WIDGET_ICON_KviSoundOptionsWidget KVI_SMALLICON_SOUND #define KVI_OPTIONS_WIDGET_NAME_KviSoundOptionsWidget __tr2qs_no_lookup("Sound") @@ -37,8 +37,9 @@ class KviSoundOptionsWidget : public KviOptionsWidget { Q_OBJECT + TQ_OBJECT public: - KviSoundOptionsWidget(QWidget * parent); + KviSoundOptionsWidget(TQWidget * tqparent); ~KviSoundOptionsWidget(); }; @@ -51,21 +52,22 @@ public: class KviSoundGeneralOptionsWidget : public KviOptionsWidget { Q_OBJECT + TQ_OBJECT public: - KviSoundGeneralOptionsWidget(QWidget * parent); + KviSoundGeneralOptionsWidget(TQWidget * tqparent); ~KviSoundGeneralOptionsWidget(); protected: - QComboBox * m_pSoundSystemBox; - QPushButton * m_pSoundTestButton; - QPushButton * m_pSoundAutoDetectButton; - QComboBox * m_pMediaPlayerBox; - QPushButton * m_pMediaTestButton; - QPushButton * m_pMediaAutoDetectButton; + TQComboBox * m_pSoundSystemBox; + TQPushButton * m_pSoundTestButton; + TQPushButton * m_pSoundAutoDetectButton; + TQComboBox * m_pMediaPlayerBox; + TQPushButton * m_pMediaTestButton; + TQPushButton * m_pMediaAutoDetectButton; #ifdef COMPILE_ON_WINDOWS - QComboBox * m_pWinampEncodingCombo; + TQComboBox * m_pWinampEncodingCombo; #endif - QComboBox * m_pTagsEncodingCombo; + TQComboBox * m_pTagsEncodingCombo; protected: void soundFillBox(); void mediaFillBox(); @@ -86,8 +88,9 @@ protected slots: class KviSoundsOptionsWidget : public KviOptionsWidget { Q_OBJECT + TQ_OBJECT public: - KviSoundsOptionsWidget(QWidget * parent); + KviSoundsOptionsWidget(TQWidget * tqparent); ~KviSoundsOptionsWidget(); }; diff --git a/src/modules/options/optw_ssl.cpp b/src/modules/options/optw_ssl.cpp index bf3ef46a..54135f69 100644 --- a/src/modules/options/optw_ssl.cpp +++ b/src/modules/options/optw_ssl.cpp @@ -22,7 +22,7 @@ #include "optw_ssl.h" -#include +#include #include #include "kvi_options.h" diff --git a/src/modules/options/optw_taskbar.cpp b/src/modules/options/optw_taskbar.cpp index 1b146d39..dae204e3 100644 --- a/src/modules/options/optw_taskbar.cpp +++ b/src/modules/options/optw_taskbar.cpp @@ -27,8 +27,8 @@ #include "kvi_options.h" -KviTaskBarOptionsWidget::KviTaskBarOptionsWidget(QWidget * parent) -: KviOptionsWidget(parent,"taskbar_options_widget") +KviTaskBarOptionsWidget::KviTaskBarOptionsWidget(TQWidget * tqparent) +: KviOptionsWidget(tqparent,"taskbar_options_widget") { createLayout(7,1); @@ -60,8 +60,8 @@ KviTaskBarOptionsWidget::~KviTaskBarOptionsWidget() ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -KviTreeTaskBarOptionsWidget::KviTreeTaskBarOptionsWidget(QWidget * parent) -: KviOptionsWidget(parent,"treetaskbar_options_widget") +KviTreeTaskBarOptionsWidget::KviTreeTaskBarOptionsWidget(TQWidget * tqparent) +: KviOptionsWidget(tqparent,"treetaskbar_options_widget") { } @@ -72,8 +72,8 @@ KviTreeTaskBarOptionsWidget::~KviTreeTaskBarOptionsWidget() ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -KviTreeTaskBarForegroundOptionsWidget::KviTreeTaskBarForegroundOptionsWidget(QWidget * parent) -: KviOptionsWidget(parent,"treetaskbar_options_widget") +KviTreeTaskBarForegroundOptionsWidget::KviTreeTaskBarForegroundOptionsWidget(TQWidget * tqparent) +: KviOptionsWidget(tqparent,"treetaskbar_options_widget") { createLayout(3,1); @@ -102,8 +102,8 @@ KviTreeTaskBarForegroundOptionsWidget::~KviTreeTaskBarForegroundOptionsWidget() ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -KviTreeTaskBarBackgroundOptionsWidget::KviTreeTaskBarBackgroundOptionsWidget(QWidget * parent) -: KviOptionsWidget(parent,"treetaskbar_options_widget") +KviTreeTaskBarBackgroundOptionsWidget::KviTreeTaskBarBackgroundOptionsWidget(TQWidget * tqparent) +: KviOptionsWidget(tqparent,"treetaskbar_options_widget") { createLayout(4,2); @@ -114,11 +114,11 @@ KviTreeTaskBarBackgroundOptionsWidget::KviTreeTaskBarBackgroundOptionsWidget(QWi addPixmapSelector(0,1,1,1,__tr2qs_ctx("Background image:","options"),KviOption_pixmapTreeTaskBarBackground); addLabel(0,2,0,2,__tr2qs_ctx("Horizontal align:","options")); - m_pHorizontalAlign=new QComboBox(this); + m_pHorizontalAlign=new TQComboBox(this); addWidgetToLayout(m_pHorizontalAlign,1,2,1,2); addLabel(0,3,0,3,__tr2qs_ctx("Vertical align:","options")); - m_pVerticalAlign=new QComboBox(this); + m_pVerticalAlign=new TQComboBox(this); addWidgetToLayout(m_pVerticalAlign,1,3,1,3); m_pHorizontalAlign->insertItem(__tr2qs_ctx("Tile","options")); @@ -131,37 +131,37 @@ KviTreeTaskBarBackgroundOptionsWidget::KviTreeTaskBarBackgroundOptionsWidget(QWi m_pVerticalAlign->insertItem(__tr2qs_ctx("Bottom","options")); m_pVerticalAlign->insertItem(__tr2qs_ctx("Center","options")); - switch( KVI_OPTION_UINT(KviOption_uintTreeTaskBarPixmapAlign) & Qt::AlignHorizontal_Mask) + switch( KVI_OPTION_UINT(KviOption_uintTreeTaskBarPixmapAlign) & TQt::AlignHorizontal_Mask) { - case Qt::AlignLeft: + case TQt::AlignLeft: m_pHorizontalAlign->setCurrentItem(1); break; - case Qt::AlignRight: + case TQt::AlignRight: m_pHorizontalAlign->setCurrentItem(2); break; - case Qt::AlignHCenter: + case TQt::AlignHCenter: m_pHorizontalAlign->setCurrentItem(3); break; default: m_pHorizontalAlign->setCurrentItem(0); } - switch( KVI_OPTION_UINT(KviOption_uintTreeTaskBarPixmapAlign) & Qt::AlignVertical_Mask) + switch( KVI_OPTION_UINT(KviOption_uintTreeTaskBarPixmapAlign) & TQt::AlignVertical_Mask) { - case Qt::AlignTop: + case TQt::AlignTop: m_pVerticalAlign->setCurrentItem(1); break; - case Qt::AlignBottom: + case TQt::AlignBottom: m_pVerticalAlign->setCurrentItem(2); break; - case Qt::AlignVCenter: + case TQt::AlignVCenter: m_pVerticalAlign->setCurrentItem(3); break; default: m_pVerticalAlign->setCurrentItem(0); } - layout()->setRowStretch(1,1); + tqlayout()->setRowStretch(1,1); } @@ -177,25 +177,25 @@ void KviTreeTaskBarBackgroundOptionsWidget::commit() switch(m_pHorizontalAlign->currentItem()) { case 1: - iFlags|=Qt::AlignLeft; + iFlags|=TQt::AlignLeft; break; case 2: - iFlags|=Qt::AlignRight; + iFlags|=TQt::AlignRight; break; case 3: - iFlags|=Qt::AlignHCenter; + iFlags|=TQt::AlignHCenter; break; } switch(m_pVerticalAlign->currentItem()) { case 1: - iFlags|=Qt::AlignTop; + iFlags|=TQt::AlignTop; break; case 2: - iFlags|=Qt::AlignBottom; + iFlags|=TQt::AlignBottom; break; case 3: - iFlags|=Qt::AlignVCenter; + iFlags|=TQt::AlignVCenter; break; } @@ -204,8 +204,8 @@ void KviTreeTaskBarBackgroundOptionsWidget::commit() ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -KviTreeTaskBarFeaturesOptionsWidget::KviTreeTaskBarFeaturesOptionsWidget(QWidget * parent) -: KviOptionsWidget(parent,"treetaskbar_options_widget") +KviTreeTaskBarFeaturesOptionsWidget::KviTreeTaskBarFeaturesOptionsWidget(TQWidget * tqparent) +: KviOptionsWidget(tqparent,"treetaskbar_options_widget") { createLayout(4,1); @@ -225,8 +225,8 @@ KviTreeTaskBarFeaturesOptionsWidget::~KviTreeTaskBarFeaturesOptionsWidget() ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -KviClassicTaskBarOptionsWidget::KviClassicTaskBarOptionsWidget(QWidget * parent) -: KviOptionsWidget(parent,"classictaskbar_options_widget") +KviClassicTaskBarOptionsWidget::KviClassicTaskBarOptionsWidget(TQWidget * tqparent) +: KviOptionsWidget(tqparent,"classictaskbar_options_widget") { createLayout(8,1); addFontSelector(0,0,0,0,__tr2qs_ctx("Font:","options"),KviOption_fontTaskbar); diff --git a/src/modules/options/optw_taskbar.h b/src/modules/options/optw_taskbar.h index 66990c26..84a0633d 100644 --- a/src/modules/options/optw_taskbar.h +++ b/src/modules/options/optw_taskbar.h @@ -27,7 +27,7 @@ #include "kvi_optionswidget.h" -#include +#include #define KVI_OPTIONS_WIDGET_ICON_KviTaskBarOptionsWidget KVI_SMALLICON_CLASSICTASKBAR #define KVI_OPTIONS_WIDGET_NAME_KviTaskBarOptionsWidget __tr2qs_no_lookup("Taskbar") @@ -38,8 +38,9 @@ class KviTaskBarOptionsWidget : public KviOptionsWidget { Q_OBJECT + TQ_OBJECT public: - KviTaskBarOptionsWidget(QWidget * parent); + KviTaskBarOptionsWidget(TQWidget * tqparent); ~KviTaskBarOptionsWidget(); }; @@ -53,8 +54,9 @@ public: class KviTreeTaskBarOptionsWidget : public KviOptionsWidget { Q_OBJECT + TQ_OBJECT public: - KviTreeTaskBarOptionsWidget(QWidget * pParent); + KviTreeTaskBarOptionsWidget(TQWidget * pParent); ~KviTreeTaskBarOptionsWidget(); }; @@ -68,8 +70,9 @@ public: class KviTreeTaskBarForegroundOptionsWidget : public KviOptionsWidget { Q_OBJECT + TQ_OBJECT public: - KviTreeTaskBarForegroundOptionsWidget(QWidget * parent); + KviTreeTaskBarForegroundOptionsWidget(TQWidget * tqparent); ~KviTreeTaskBarForegroundOptionsWidget(); }; @@ -83,11 +86,12 @@ public: class KviTreeTaskBarBackgroundOptionsWidget : public KviOptionsWidget { Q_OBJECT + TQ_OBJECT private: - QComboBox* m_pHorizontalAlign; - QComboBox* m_pVerticalAlign; + TQComboBox* m_pHorizontalAlign; + TQComboBox* m_pVerticalAlign; public: - KviTreeTaskBarBackgroundOptionsWidget(QWidget * parent); + KviTreeTaskBarBackgroundOptionsWidget(TQWidget * tqparent); ~KviTreeTaskBarBackgroundOptionsWidget(); virtual void commit(); @@ -102,8 +106,9 @@ public: class KviTreeTaskBarFeaturesOptionsWidget : public KviOptionsWidget { Q_OBJECT + TQ_OBJECT public: - KviTreeTaskBarFeaturesOptionsWidget(QWidget * parent); + KviTreeTaskBarFeaturesOptionsWidget(TQWidget * tqparent); ~KviTreeTaskBarFeaturesOptionsWidget(); }; @@ -117,8 +122,9 @@ public: class KviClassicTaskBarOptionsWidget : public KviOptionsWidget { Q_OBJECT + TQ_OBJECT public: - KviClassicTaskBarOptionsWidget(QWidget * parent); + KviClassicTaskBarOptionsWidget(TQWidget * tqparent); ~KviClassicTaskBarOptionsWidget(); }; diff --git a/src/modules/options/optw_textencoding.cpp b/src/modules/options/optw_textencoding.cpp index 431cdad0..1b44f803 100644 --- a/src/modules/options/optw_textencoding.cpp +++ b/src/modules/options/optw_textencoding.cpp @@ -27,19 +27,19 @@ #include "kvi_app.h" #include "kvi_fileutils.h" -#include -#include +#include +#include -QString g_szPrevSettedLocale; +TQString g_szPrevSettedLocale; -KviTextEncodingOptionsWidget::KviTextEncodingOptionsWidget(QWidget * parent) -: KviOptionsWidget(parent,"textencoding_options_widget") +KviTextEncodingOptionsWidget::KviTextEncodingOptionsWidget(TQWidget * tqparent) +: KviOptionsWidget(tqparent,"textencoding_options_widget") { createLayout(5,2); addLabel(0,0,0,0,__tr2qs_ctx("Default text encoding:","options")); - m_pTextEncodingCombo = new QComboBox(this); + m_pTextEncodingCombo = new TQComboBox(this); addWidgetToLayout(m_pTextEncodingCombo,1,0,1,0); m_pTextEncodingCombo->insertItem(__tr2qs_ctx("Use Language Encoding","options")); @@ -48,7 +48,7 @@ KviTextEncodingOptionsWidget::KviTextEncodingOptionsWidget(QWidget * parent) KviLocale::EncodingDescription * d = KviLocale::encodingDescription(i); while(d->szName) { - if(KviQString::equalCI(d->szName,KVI_OPTION_STRING(KviOption_stringDefaultTextEncoding)))iMatch = i + 1; + if(KviTQString::equalCI(d->szName,KVI_OPTION_STRING(KviOption_stringDefaultTextEncoding)))iMatch = i + 1; m_pTextEncodingCombo->insertItem(d->szName); i++; d = KviLocale::encodingDescription(i); @@ -58,17 +58,17 @@ KviTextEncodingOptionsWidget::KviTextEncodingOptionsWidget(QWidget * parent) addLabel(0,1,0,1,__tr2qs_ctx("Force language:","options")); - m_pForcedLocaleCombo = new QComboBox(this); + m_pForcedLocaleCombo = new TQComboBox(this); addWidgetToLayout(m_pForcedLocaleCombo,1,1,1,1); - QLabel * l = new QLabel(__tr2qs_ctx("Note: You need to restart KVirc to apply a language changing","options"),this); + TQLabel * l = new TQLabel(__tr2qs_ctx("Note: You need to restart KVirc to apply a language changing","options"),this); addWidgetToLayout(l,0,2,1,2); m_pForcedLocaleCombo->insertItem(__tr2qs_ctx("Automatic detection","options")); m_pForcedLocaleCombo->insertItem(__tr2qs_ctx("en","options")); - QString szLangFile=QString("%1/.kvirc_force_locale").arg(QDir::homeDirPath()); + TQString szLangFile=TQString("%1/.kvirc_force_locale").tqarg(TQDir::homeDirPath()); bool bIsDefaultLocale = !KviFileUtils::fileExists(szLangFile); //We Have setted locale, but not restarted kvirc @@ -79,26 +79,26 @@ KviTextEncodingOptionsWidget::KviTextEncodingOptionsWidget(QWidget * parent) m_szLanguage=KviLocale::localeName(); } - QString szLocaleDir; + TQString szLocaleDir; g_pApp->getGlobalKvircDirectory(szLocaleDir,KviApp::Locale); - QStringList list=QDir(szLocaleDir).entryList("kvirc_*.mo",QDir::Files); + TQStringList list=TQDir(szLocaleDir).entryList("kvirc_*.mo",TQDir::Files); i = 0; iMatch = 0; - for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) { - QString szTmp=*it; - szTmp.replace("kvirc_",""); - szTmp.replace(".mo",""); + for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) { + TQString szTmp=*it; + szTmp.tqreplace("kvirc_",""); + szTmp.tqreplace(".mo",""); m_pForcedLocaleCombo->insertItem(szTmp); - if(KviQString::equalCI(szTmp,m_szLanguage)) + if(KviTQString::equalCI(szTmp,m_szLanguage)) iMatch = i + 2; i++; } if(bIsDefaultLocale) m_pForcedLocaleCombo->setCurrentItem(0); - else if(KviQString::equalCI(m_szLanguage,"en")) + else if(KviTQString::equalCI(m_szLanguage,"en")) m_pForcedLocaleCombo->setCurrentItem(1); else m_pForcedLocaleCombo->setCurrentItem(iMatch); @@ -121,7 +121,7 @@ void KviTextEncodingOptionsWidget::commit() } idx=m_pForcedLocaleCombo->currentItem(); - QString szLangFile=QString("%1/.kvirc_force_locale").arg(QDir::homeDirPath()); + TQString szLangFile=TQString("%1/.kvirc_force_locale").tqarg(TQDir::homeDirPath()); if(idx==0) { if(KviFileUtils::fileExists(szLangFile)) KviFileUtils::removeFile(szLangFile); @@ -129,11 +129,11 @@ void KviTextEncodingOptionsWidget::commit() g_szPrevSettedLocale=m_pForcedLocaleCombo->text(idx); if(!KviFileUtils::writeFile(szLangFile,m_pForcedLocaleCombo->text(idx))) { - QMessageBox::critical(this,"KVIrc",__tr2qs_ctx("Unable to write language information to","options")+"\n"+szLangFile,__tr2qs_ctx("Ok","options")); + TQMessageBox::critical(this,"KVIrc",__tr2qs_ctx("Unable to write language information to","options")+"\n"+szLangFile,__tr2qs_ctx("Ok","options")); } } -/* if(!KviQString::equalCI(m_pForcedLocaleCombo->text(idx),m_szLanguage)) - QMessageBox::information(0,"KVIrc",__tr2qs_ctx("You need to restart KVirc to apply a language changing","options"),QMessageBox::Ok);*/ +/* if(!KviTQString::equalCI(m_pForcedLocaleCombo->text(idx),m_szLanguage)) + TQMessageBox::information(0,"KVIrc",__tr2qs_ctx("You need to restart KVirc to apply a language changing","options"),TQMessageBox::Ok);*/ } #include "m_optw_textencoding.moc" diff --git a/src/modules/options/optw_textencoding.h b/src/modules/options/optw_textencoding.h index 75bdeb75..9b0e1864 100644 --- a/src/modules/options/optw_textencoding.h +++ b/src/modules/options/optw_textencoding.h @@ -25,7 +25,7 @@ #include "kvi_optionswidget.h" -#include +#include #define KVI_OPTIONS_WIDGET_ICON_KviTextEncodingOptionsWidget KVI_SMALLICON_TEXTENCODING #define KVI_OPTIONS_WIDGET_NAME_KviTextEncodingOptionsWidget __tr2qs_no_lookup("Language") @@ -36,13 +36,14 @@ class KviTextEncodingOptionsWidget : public KviOptionsWidget { Q_OBJECT + TQ_OBJECT public: - KviTextEncodingOptionsWidget(QWidget * parent); + KviTextEncodingOptionsWidget(TQWidget * tqparent); ~KviTextEncodingOptionsWidget(); protected: - QString m_szLanguage; - QComboBox * m_pTextEncodingCombo; - QComboBox * m_pForcedLocaleCombo; + TQString m_szLanguage; + TQComboBox * m_pTextEncodingCombo; + TQComboBox * m_pForcedLocaleCombo; public: virtual void commit(); }; diff --git a/src/modules/options/optw_texticons.cpp b/src/modules/options/optw_texticons.cpp index d1752c0f..257689c1 100644 --- a/src/modules/options/optw_texticons.cpp +++ b/src/modules/options/optw_texticons.cpp @@ -27,23 +27,23 @@ #include "kvi_locale.h" #include "kvi_filedialog.h" -#include -#include +#include +#include #include "kvi_tal_hbox.h" -KviTextIconEditor::KviTextIconEditor(QWidget * par,KviTextIcon * icon,KviTextIconTableItem* item) +KviTextIconEditor::KviTextIconEditor(TQWidget * par,KviTextIcon * icon,KviTextIconTableItem* item) : KviTalHBox(par),m_pTableItem(item) { - m_pIconButton=new QToolButton(this); - m_pBrowseButton=new QToolButton(this); - m_pBrowseButton->setSizePolicy(QSizePolicy(QSizePolicy::Maximum,QSizePolicy::Maximum)); + m_pIconButton=new TQToolButton(this); + m_pBrowseButton=new TQToolButton(this); + m_pBrowseButton->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Maximum,TQSizePolicy::Maximum)); m_pBrowseButton->setText("..."); m_pIcon = icon; m_pPopup = 0; updateIcon(); - connect(m_pIconButton,SIGNAL(clicked()),this,SLOT(doPopup())); - connect(m_pBrowseButton,SIGNAL(clicked()),this,SLOT(chooseFromFile())); + connect(m_pIconButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(doPopup())); + connect(m_pBrowseButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(chooseFromFile())); } @@ -58,10 +58,10 @@ void KviTextIconEditor::doPopup() { m_pPopup = new KviTalPopupMenu(this); KviIconWidget * iw = new KviIconWidget(m_pPopup); - connect(iw,SIGNAL(selected(int)),this,SLOT(iconSelected(int))); + connect(iw,TQT_SIGNAL(selected(int)),this,TQT_SLOT(iconSelected(int))); m_pPopup->insertItem(iw); } - m_pPopup->popup(QCursor::pos()); + m_pPopup->popup(TQCursor::pos()); } void KviTextIconEditor::iconSelected(int id) @@ -72,8 +72,8 @@ void KviTextIconEditor::iconSelected(int id) void KviTextIconEditor::chooseFromFile() { - QString szFile; - KviFileDialog::askForOpenFileName(szFile,"Choose icon filename",QString::null,"*.png","options"); + TQString szFile; + KviFileDialog::askForOpenFileName(szFile,"Choose icon filename",TQString(),"*.png","options"); if(!szFile.isEmpty()) { if(g_pIconManager->getPixmap(szFile)) @@ -89,20 +89,20 @@ void KviTextIconEditor::updateIcon() { if(m_pIcon) { - QPixmap* pix=m_pIcon->pixmap(); + TQPixmap* pix=m_pIcon->pixmap(); if(pix) m_pIconButton->setPixmap(*pix); } } KviTextIconTableItem::KviTextIconTableItem(KviTalTable * t,KviTextIcon * icon) -: KviTalTableItem(t,KviTalTableItem::WhenCurrent,QString::null) +: KviTalTableItem(t,KviTalTableItem::WhenCurrent,TQString()) { if(icon) m_pIcon=icon; else m_pIcon=new KviTextIcon(0); - QPixmap* pix=m_pIcon->pixmap(); + TQPixmap* pix=m_pIcon->pixmap(); if(pix) setPixmap(*pix); } @@ -115,33 +115,33 @@ KviTextIconTableItem::~KviTextIconTableItem() void KviTextIconTableItem::setId(int id) { m_pIcon->setId(id); - QPixmap* pix=m_pIcon->pixmap(); + TQPixmap* pix=m_pIcon->pixmap(); if(pix) setPixmap(*pix); } -QWidget * KviTextIconTableItem::createEditor() const +TQWidget * KviTextIconTableItem::createEditor() const { return new KviTextIconEditor(table()->viewport(),m_pIcon,(KviTextIconTableItem*)this); } -void KviTextIconTableItem::setContentFromEditor(QWidget * w) +void KviTextIconTableItem::setContentFromEditor(TQWidget * w) { if(w->inherits("KviTextIconEditor")) { - QPixmap* pix=m_pIcon->pixmap(); + TQPixmap* pix=m_pIcon->pixmap(); if(pix) setPixmap(*pix); } } -KviTextIconsOptionsWidget::KviTextIconsOptionsWidget(QWidget * parent) -: KviOptionsWidget(parent,"texticons_options_widget") +KviTextIconsOptionsWidget::KviTextIconsOptionsWidget(TQWidget * tqparent) +: KviOptionsWidget(tqparent,"texticons_options_widget") { createLayout(2,2); - KviPointerHashTableIterator it(*(g_pTextIconManager->textIconDict())); + KviPointerHashTableIterator it(*(g_pTextIconManager->textIconDict())); m_pTable = new KviTalTable(g_pTextIconManager->textIconDict()->count(),2,this); @@ -160,19 +160,19 @@ KviTextIconsOptionsWidget::KviTextIconsOptionsWidget(QWidget * parent) ++it; } - layout()->addMultiCellWidget(m_pTable,0,0,0,1); + tqlayout()->addMultiCellWidget(m_pTable,0,0,0,1); - m_pAdd = new QPushButton(__tr2qs_ctx("Add","options"),this); - layout()->addWidget(m_pAdd,1,0); - connect(m_pAdd,SIGNAL(clicked()),this,SLOT(addClicked())); + m_pAdd = new TQPushButton(__tr2qs_ctx("Add","options"),this); + tqlayout()->addWidget(m_pAdd,1,0); + connect(m_pAdd,TQT_SIGNAL(clicked()),this,TQT_SLOT(addClicked())); - m_pDel = new QPushButton(__tr2qs_ctx("Delete","options"),this); - layout()->addWidget(m_pDel,1,1); - connect(m_pDel,SIGNAL(clicked()),this,SLOT(delClicked())); + m_pDel = new TQPushButton(__tr2qs_ctx("Delete","options"),this); + tqlayout()->addWidget(m_pDel,1,1); + connect(m_pDel,TQT_SIGNAL(clicked()),this,TQT_SLOT(delClicked())); m_pDel->setEnabled(false); - connect(m_pTable,SIGNAL(selectionChanged()),this,SLOT(selectionChanged())); + connect(m_pTable,TQT_SIGNAL(selectionChanged()),this,TQT_SLOT(selectionChanged())); } KviTextIconsOptionsWidget::~KviTextIconsOptionsWidget() @@ -222,7 +222,7 @@ void KviTextIconsOptionsWidget::commit() int n = m_pTable->numRows(); for(int i=0;i < n;i++) { - QString szVal = m_pTable->text(i,0); + TQString szVal = m_pTable->text(i,0); if(!szVal.isEmpty()) { KviTextIconTableItem * it = (KviTextIconTableItem *)m_pTable->item(i,1); diff --git a/src/modules/options/optw_texticons.h b/src/modules/options/optw_texticons.h index 652c7da9..fe4e2f12 100644 --- a/src/modules/options/optw_texticons.h +++ b/src/modules/options/optw_texticons.h @@ -32,18 +32,18 @@ -#include +#include #include "kvi_tal_popupmenu.h" #include "kvi_tal_hbox.h" #ifdef COMPILE_USE_QT4 -#include +#include #define KviTalTable Q3Table #define KviTalTableItem Q3TableItem #else -#include -#define KviTalTable QTable -#define KviTalTableItem QTableItem +#include +#define KviTalTable TQTable +#define KviTalTableItem TQTableItem #endif class KviTextIconTableItem; @@ -51,15 +51,16 @@ class KviTextIconTableItem; class KviTextIconEditor : public KviTalHBox { Q_OBJECT + TQ_OBJECT public: - KviTextIconEditor(QWidget * par,KviTextIcon * icon,KviTextIconTableItem* item); + KviTextIconEditor(TQWidget * par,KviTextIcon * icon,KviTextIconTableItem* item); ~KviTextIconEditor(); protected: KviTextIconTableItem *m_pTableItem; KviTextIcon *m_pIcon; KviTalPopupMenu *m_pPopup; - QToolButton *m_pIconButton; - QToolButton *m_pBrowseButton; + TQToolButton *m_pIconButton; + TQToolButton *m_pBrowseButton; public: void updateIcon(); KviTextIcon* icon() { return m_pIcon; }; @@ -80,20 +81,21 @@ protected: public: KviTextIcon * icon() { return m_pIcon; }; void setId(int id); - virtual QWidget * createEditor() const; - virtual void setContentFromEditor(QWidget * w); + virtual TQWidget * createEditor() const; + virtual void setContentFromEditor(TQWidget * w); }; class KviTextIconsOptionsWidget : public KviOptionsWidget { Q_OBJECT + TQ_OBJECT public: - KviTextIconsOptionsWidget(QWidget * parent); + KviTextIconsOptionsWidget(TQWidget * tqparent); ~KviTextIconsOptionsWidget(); protected: KviTalTable * m_pTable; - QPushButton * m_pAdd; - QPushButton * m_pDel; + TQPushButton * m_pAdd; + TQPushButton * m_pDel; public: virtual void commit(); protected slots: diff --git a/src/modules/options/optw_tools.cpp b/src/modules/options/optw_tools.cpp index b46b9a01..bbbac049 100644 --- a/src/modules/options/optw_tools.cpp +++ b/src/modules/options/optw_tools.cpp @@ -24,19 +24,19 @@ #include "optw_tools.h" -#include +#include #include "kvi_settings.h" #include "kvi_options.h" #include "kvi_locale.h" -KviToolsOptionsWidget::KviToolsOptionsWidget(QWidget * parent) -: KviOptionsWidget(parent,"tools_options_widget") +KviToolsOptionsWidget::KviToolsOptionsWidget(TQWidget * tqparent) +: KviOptionsWidget(tqparent,"tools_options_widget") { createLayout(1,1); - QLabel * l; + TQLabel * l; l = addLabel(0,0,0,0,__tr2qs_ctx("This section contains irc tools
"\ "

like away, lag and logging system. " \ "

","options")); diff --git a/src/modules/options/optw_tools.h b/src/modules/options/optw_tools.h index 9ebf35e8..c0f9fe40 100644 --- a/src/modules/options/optw_tools.h +++ b/src/modules/options/optw_tools.h @@ -38,8 +38,9 @@ class KviToolsOptionsWidget : public KviOptionsWidget { Q_OBJECT + TQ_OBJECT public: - KviToolsOptionsWidget(QWidget * parent); + KviToolsOptionsWidget(TQWidget * tqparent); ~KviToolsOptionsWidget(); }; diff --git a/src/modules/options/optw_topiclabel.cpp b/src/modules/options/optw_topiclabel.cpp index 71bc2b64..ec076dac 100644 --- a/src/modules/options/optw_topiclabel.cpp +++ b/src/modules/options/optw_topiclabel.cpp @@ -24,7 +24,7 @@ #include "kvi_locale.h" #include "optw_topiclabel.h" -KviTopicLabelLookOptionsWidget::KviTopicLabelLookOptionsWidget(QWidget *p):KviOptionsWidget(p, "topic_label_look_options_widget") +KviTopicLabelLookOptionsWidget::KviTopicLabelLookOptionsWidget(TQWidget *p):KviOptionsWidget(p, "topic_label_look_options_widget") { createLayout(4, 1); @@ -33,7 +33,7 @@ KviTopicLabelLookOptionsWidget::KviTopicLabelLookOptionsWidget(QWidget *p):KviOp addColorSelector(0, 2, 0, 2, __tr2qs_ctx("Background color","options"), KviOption_colorLabelBackground); addPixmapSelector(0, 3, 0, 3, __tr2qs_ctx("Background image","options"), KviOption_pixmapLabelBackground); - layout()->setRowStretch(3, 1); + tqlayout()->setRowStretch(3, 1); } KviTopicLabelLookOptionsWidget::~KviTopicLabelLookOptionsWidget() diff --git a/src/modules/options/optw_topiclabel.h b/src/modules/options/optw_topiclabel.h index 1185fae6..58e0be93 100644 --- a/src/modules/options/optw_topiclabel.h +++ b/src/modules/options/optw_topiclabel.h @@ -33,8 +33,9 @@ class KviTopicLabelLookOptionsWidget : public KviOptionsWidget { Q_OBJECT + TQ_OBJECT public: - KviTopicLabelLookOptionsWidget(QWidget *); + KviTopicLabelLookOptionsWidget(TQWidget *); ~KviTopicLabelLookOptionsWidget(); }; diff --git a/src/modules/options/optw_tray.cpp b/src/modules/options/optw_tray.cpp index e988ba54..0e833ec5 100644 --- a/src/modules/options/optw_tray.cpp +++ b/src/modules/options/optw_tray.cpp @@ -23,7 +23,7 @@ #include "optw_tray.h" -#include +#include #include "kvi_tal_tooltip.h" #include "kvi_options.h" @@ -32,8 +32,8 @@ //#warning "Info tips" -KviTrayOptionsWidget::KviTrayOptionsWidget(QWidget * parent) -: KviOptionsWidget(parent,"tray_options_widget") +KviTrayOptionsWidget::KviTrayOptionsWidget(TQWidget * tqparent) +: KviOptionsWidget(tqparent,"tray_options_widget") { createLayout(7,1); @@ -56,8 +56,8 @@ KviTrayOptionsWidget::KviTrayOptionsWidget(QWidget * parent) addRowSpacer(0,6,0,6); - connect(m_pEnable,SIGNAL(toggled(bool)),this,SLOT(setEnabled(bool))); - connect(m_pLevelBasedNotify,SIGNAL(toggled(bool)),this,SLOT(setEnabled(bool))); + connect(m_pEnable,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(setEnabled(bool))); + connect(m_pLevelBasedNotify,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(setEnabled(bool))); setEnabled(true); } diff --git a/src/modules/options/optw_tray.h b/src/modules/options/optw_tray.h index 5be68f36..5fc4ba78 100644 --- a/src/modules/options/optw_tray.h +++ b/src/modules/options/optw_tray.h @@ -23,7 +23,7 @@ // #include "kvi_optionswidget.h" -#include +#include #define KVI_OPTIONS_WIDGET_ICON_KviTrayOptionsWidget KVI_SMALLICON_DOCKWIDGET #define KVI_OPTIONS_WIDGET_NAME_KviTrayOptionsWidget __tr2qs_no_lookup("Tray icon") @@ -33,8 +33,9 @@ class KviTrayOptionsWidget : public KviOptionsWidget { Q_OBJECT + TQ_OBJECT public: - KviTrayOptionsWidget(QWidget * parent); + KviTrayOptionsWidget(TQWidget * tqparent); ~KviTrayOptionsWidget(); protected: KviBoolSelector * m_pEnable; diff --git a/src/modules/options/optw_uparser.cpp b/src/modules/options/optw_uparser.cpp index 01036fb6..6b05d46a 100644 --- a/src/modules/options/optw_uparser.cpp +++ b/src/modules/options/optw_uparser.cpp @@ -23,16 +23,16 @@ #include "optw_uparser.h" -#include +#include #include "kvi_options.h" #include "kvi_locale.h" -#include +#include -KviUParserOptionsWidget::KviUParserOptionsWidget(QWidget * parent) -: KviOptionsWidget(parent,"uparser_options_widget") +KviUParserOptionsWidget::KviUParserOptionsWidget(TQWidget * tqparent) +: KviOptionsWidget(tqparent,"uparser_options_widget") { createLayout(11,1); diff --git a/src/modules/options/optw_uparser.h b/src/modules/options/optw_uparser.h index 1e35fe92..8b538a76 100644 --- a/src/modules/options/optw_uparser.h +++ b/src/modules/options/optw_uparser.h @@ -32,8 +32,9 @@ class KviUParserOptionsWidget : public KviOptionsWidget { Q_OBJECT + TQ_OBJECT public: - KviUParserOptionsWidget(QWidget * parent); + KviUParserOptionsWidget(TQWidget * tqparent); ~KviUParserOptionsWidget(); }; diff --git a/src/modules/options/optw_urlhandlers.cpp b/src/modules/options/optw_urlhandlers.cpp index 48ea2297..efe00321 100644 --- a/src/modules/options/optw_urlhandlers.cpp +++ b/src/modules/options/optw_urlhandlers.cpp @@ -24,16 +24,16 @@ #include "optw_urlhandlers.h" -#include +#include #include "kvi_options.h" #include "kvi_locale.h" -#include +#include -KviUrlHandlersOptionsWidget::KviUrlHandlersOptionsWidget(QWidget * parent) -: KviOptionsWidget(parent,"urlhandlers_options_widget") +KviUrlHandlersOptionsWidget::KviUrlHandlersOptionsWidget(TQWidget * tqparent) +: KviOptionsWidget(tqparent,"urlhandlers_options_widget") { #ifdef COMPILE_ON_WINDOWS #define START_ROW 1 @@ -62,7 +62,7 @@ KviUrlHandlersOptionsWidget::KviUrlHandlersOptionsWidget(QWidget * parent) m_pMailtoHandler->setEnabled(!KVI_OPTION_BOOL(KviOption_boolUseSystemUrlHandlers)); m_pOtherHandler->setEnabled(!KVI_OPTION_BOOL(KviOption_boolUseSystemUrlHandlers)); - connect(b,SIGNAL(toggled(bool)),this,SLOT(toggleEditors(bool))); + connect(b,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(toggleEditors(bool))); #endif @@ -88,37 +88,37 @@ void KviUrlHandlersOptionsWidget::commit() KviOptionsWidget::commit(); #ifdef COMPILE_ON_WINDOWS - KVI_OPTION_STRING(KviOption_stringUrlHttpCommand).replace("\\\\","@MAGIC@","options"); - KVI_OPTION_STRING(KviOption_stringUrlHttpCommand).replace("\\","\\\\","options"); - KVI_OPTION_STRING(KviOption_stringUrlHttpCommand).replace("@MAGIC@","\\\\","options"); + KVI_OPTION_STRING(KviOption_stringUrlHttpCommand).tqreplace("\\\\","@MAGIC@","options"); + KVI_OPTION_STRING(KviOption_stringUrlHttpCommand).tqreplace("\\","\\\\","options"); + KVI_OPTION_STRING(KviOption_stringUrlHttpCommand).tqreplace("@MAGIC@","\\\\","options"); - KVI_OPTION_STRING(KviOption_stringUrlHttpsCommand).replace("\\\\","@MAGIC@","options"); - KVI_OPTION_STRING(KviOption_stringUrlHttpsCommand).replace("\\","\\\\","options"); - KVI_OPTION_STRING(KviOption_stringUrlHttpsCommand).replace("@MAGIC@","\\\\","options"); + KVI_OPTION_STRING(KviOption_stringUrlHttpsCommand).tqreplace("\\\\","@MAGIC@","options"); + KVI_OPTION_STRING(KviOption_stringUrlHttpsCommand).tqreplace("\\","\\\\","options"); + KVI_OPTION_STRING(KviOption_stringUrlHttpsCommand).tqreplace("@MAGIC@","\\\\","options"); - KVI_OPTION_STRING(KviOption_stringUrlFtpCommand).replace("\\\\","@MAGIC@","options"); - KVI_OPTION_STRING(KviOption_stringUrlFtpCommand).replace("\\","\\\\","options"); - KVI_OPTION_STRING(KviOption_stringUrlFtpCommand).replace("@MAGIC@","\\\\","options"); + KVI_OPTION_STRING(KviOption_stringUrlFtpCommand).tqreplace("\\\\","@MAGIC@","options"); + KVI_OPTION_STRING(KviOption_stringUrlFtpCommand).tqreplace("\\","\\\\","options"); + KVI_OPTION_STRING(KviOption_stringUrlFtpCommand).tqreplace("@MAGIC@","\\\\","options"); - KVI_OPTION_STRING(KviOption_stringUrlMailtoCommand).replace("\\\\","@MAGIC@","options"); - KVI_OPTION_STRING(KviOption_stringUrlMailtoCommand).replace("\\","\\\\","options"); - KVI_OPTION_STRING(KviOption_stringUrlMailtoCommand).replace("@MAGIC@","\\\\","options"); + KVI_OPTION_STRING(KviOption_stringUrlMailtoCommand).tqreplace("\\\\","@MAGIC@","options"); + KVI_OPTION_STRING(KviOption_stringUrlMailtoCommand).tqreplace("\\","\\\\","options"); + KVI_OPTION_STRING(KviOption_stringUrlMailtoCommand).tqreplace("@MAGIC@","\\\\","options"); - KVI_OPTION_STRING(KviOption_stringUrlFileCommand).replace("\\\\","@MAGIC@","options"); - KVI_OPTION_STRING(KviOption_stringUrlFileCommand).replace("\\","\\\\","options"); - KVI_OPTION_STRING(KviOption_stringUrlFileCommand).replace("@MAGIC@","\\\\","options"); + KVI_OPTION_STRING(KviOption_stringUrlFileCommand).tqreplace("\\\\","@MAGIC@","options"); + KVI_OPTION_STRING(KviOption_stringUrlFileCommand).tqreplace("\\","\\\\","options"); + KVI_OPTION_STRING(KviOption_stringUrlFileCommand).tqreplace("@MAGIC@","\\\\","options"); - KVI_OPTION_STRING(KviOption_stringUrlUnknownCommand).replace("\\\\","@MAGIC@","options"); - KVI_OPTION_STRING(KviOption_stringUrlUnknownCommand).replace("\\","\\\\","options"); - KVI_OPTION_STRING(KviOption_stringUrlUnknownCommand).replace("@MAGIC@","\\\\","options"); + KVI_OPTION_STRING(KviOption_stringUrlUnknownCommand).tqreplace("\\\\","@MAGIC@","options"); + KVI_OPTION_STRING(KviOption_stringUrlUnknownCommand).tqreplace("\\","\\\\","options"); + KVI_OPTION_STRING(KviOption_stringUrlUnknownCommand).tqreplace("@MAGIC@","\\\\","options"); //Check for escaped " in url handler ( \" ) - KVI_OPTION_STRING(KviOption_stringUrlHttpCommand).replace("\\\\\"","\\\"","options"); - KVI_OPTION_STRING(KviOption_stringUrlHttpsCommand).replace("\\\\\"","\\\"","options"); - KVI_OPTION_STRING(KviOption_stringUrlFtpCommand).replace("\\\\\"","\\\"","options"); - KVI_OPTION_STRING(KviOption_stringUrlMailtoCommand).replace("\\\\\"","\\\"","options"); - KVI_OPTION_STRING(KviOption_stringUrlFileCommand).replace("\\\\\"","\\\"","options"); - KVI_OPTION_STRING(KviOption_stringUrlUnknownCommand).replace("\\\\\"","\\\"","options"); + KVI_OPTION_STRING(KviOption_stringUrlHttpCommand).tqreplace("\\\\\"","\\\"","options"); + KVI_OPTION_STRING(KviOption_stringUrlHttpsCommand).tqreplace("\\\\\"","\\\"","options"); + KVI_OPTION_STRING(KviOption_stringUrlFtpCommand).tqreplace("\\\\\"","\\\"","options"); + KVI_OPTION_STRING(KviOption_stringUrlMailtoCommand).tqreplace("\\\\\"","\\\"","options"); + KVI_OPTION_STRING(KviOption_stringUrlFileCommand).tqreplace("\\\\\"","\\\"","options"); + KVI_OPTION_STRING(KviOption_stringUrlUnknownCommand).tqreplace("\\\\\"","\\\"","options"); #endif } diff --git a/src/modules/options/optw_urlhandlers.h b/src/modules/options/optw_urlhandlers.h index 9ed6c188..611ed509 100644 --- a/src/modules/options/optw_urlhandlers.h +++ b/src/modules/options/optw_urlhandlers.h @@ -33,8 +33,9 @@ class KviUrlHandlersOptionsWidget : public KviOptionsWidget { Q_OBJECT + TQ_OBJECT public: - KviUrlHandlersOptionsWidget(QWidget * parent); + KviUrlHandlersOptionsWidget(TQWidget * tqparent); ~KviUrlHandlersOptionsWidget(); private: KviStringSelector* m_pHttpHandler; diff --git a/src/modules/options/optw_userlist.cpp b/src/modules/options/optw_userlist.cpp index 07b39d0d..90695e2a 100644 --- a/src/modules/options/optw_userlist.cpp +++ b/src/modules/options/optw_userlist.cpp @@ -21,7 +21,7 @@ // #include "optw_userlist.h" -#include +#include #include "kvi_options.h" #include "kvi_locale.h" @@ -29,8 +29,8 @@ //#warning "Info tips" -KviUserListLookOptionsWidget::KviUserListLookOptionsWidget(QWidget * parent) -: KviOptionsWidget(parent,"userlistlook_options_widget") +KviUserListLookOptionsWidget::KviUserListLookOptionsWidget(TQWidget * tqparent) +: KviOptionsWidget(tqparent,"userlistlook_options_widget") { } @@ -43,8 +43,8 @@ KviUserListLookOptionsWidget::~KviUserListLookOptionsWidget() ////////////////////////////////////////////////////////////////////////////////////////////////////// -KviUserListLookForegroundOptionsWidget::KviUserListLookForegroundOptionsWidget(QWidget * parent) -: KviOptionsWidget(parent,"userlistlook_foreground_options_widget") +KviUserListLookForegroundOptionsWidget::KviUserListLookForegroundOptionsWidget(TQWidget * tqparent) +: KviOptionsWidget(tqparent,"userlistlook_foreground_options_widget") { createLayout(2,2); @@ -65,7 +65,7 @@ KviUserListLookForegroundOptionsWidget::KviUserListLookForegroundOptionsWidget(Q hb->setSpacing(4); KviBoolSelector * b = addBoolSelector(hb,__tr2qs_ctx("Use different color for own nick:","options"),KviOption_boolUseDifferentColorForOwnNick); KviColorSelector * s = addColorSelector(hb,"",KviOption_colorUserListViewOwnForeground,KVI_OPTION_BOOL(KviOption_boolUseDifferentColorForOwnNick)); - connect(b,SIGNAL(toggled(bool)),s,SLOT(setEnabled(bool))); + connect(b,TQT_SIGNAL(toggled(bool)),s,TQT_SLOT(setEnabled(bool))); addRowSpacer(0,3,0,3); } @@ -74,30 +74,30 @@ KviUserListLookForegroundOptionsWidget::~KviUserListLookForegroundOptionsWidget( { } -KviUserListGridOptionsWidget::KviUserListGridOptionsWidget(QWidget * parent) -: KviOptionsWidget(parent) +KviUserListGridOptionsWidget::KviUserListGridOptionsWidget(TQWidget * tqparent) +: KviOptionsWidget(tqparent) { createLayout(5,1); KviBoolSelector* b = addBoolSelector(0,0,0,0,__tr2qs_ctx("Draw nickname grid","options"),KviOption_boolUserListViewDrawGrid); KviColorSelector* s = addColorSelector(0,1,0,1,__tr2qs_ctx("Grid color:","options"),KviOption_colorUserListViewGrid,KVI_OPTION_BOOL(KviOption_boolUserListViewDrawGrid)); - connect(b,SIGNAL(toggled(bool)),s,SLOT(setEnabled(bool))); + connect(b,TQT_SIGNAL(toggled(bool)),s,TQT_SLOT(setEnabled(bool))); KviTalHBox* hb = new KviTalHBox(this); addWidgetToLayout(hb,0,2,0,2); hb->setSpacing(4); - QLabel * l = new QLabel(__tr2qs_ctx("Grid type:","options"),hb); + TQLabel * l = new TQLabel(__tr2qs_ctx("Grid type:","options"),hb); l->setEnabled(KVI_OPTION_BOOL(KviOption_boolUserListViewDrawGrid)); - connect(b,SIGNAL(toggled(bool)),l,SLOT(setEnabled(bool))); - m_pGridTypeCombo = new QComboBox(false,hb); + connect(b,TQT_SIGNAL(toggled(bool)),l,TQT_SLOT(setEnabled(bool))); + m_pGridTypeCombo = new TQComboBox(false,hb); m_pGridTypeCombo->insertItem(__tr2qs_ctx("3D Grid","options")); m_pGridTypeCombo->insertItem(__tr2qs_ctx("3D Buttons","options")); m_pGridTypeCombo->insertItem(__tr2qs_ctx("Plain Grid","options")); m_pGridTypeCombo->insertItem(__tr2qs_ctx("Dotted Grid","options")); m_pGridTypeCombo->setCurrentItem(KVI_OPTION_UINT(KviOption_uintUserListViewGridType)); m_pGridTypeCombo->setEnabled(KVI_OPTION_BOOL(KviOption_boolUserListViewDrawGrid)); - connect(b,SIGNAL(toggled(bool)),m_pGridTypeCombo,SLOT(setEnabled(bool))); + connect(b,TQT_SIGNAL(toggled(bool)),m_pGridTypeCombo,TQT_SLOT(setEnabled(bool))); addRowSpacer(0,3,0,3); } @@ -116,8 +116,8 @@ void KviUserListGridOptionsWidget::commit() ////////////////////////////////////////////////////////////////////////////////////////////////////// -KviUserListLookBackgroundOptionsWidget::KviUserListLookBackgroundOptionsWidget(QWidget * parent) -: KviOptionsWidget(parent,"userlistlook_background_options_widget") +KviUserListLookBackgroundOptionsWidget::KviUserListLookBackgroundOptionsWidget(TQWidget * tqparent) +: KviOptionsWidget(tqparent,"userlistlook_background_options_widget") { createLayout(3,2); @@ -129,11 +129,11 @@ KviUserListLookBackgroundOptionsWidget::KviUserListLookBackgroundOptionsWidget(Q addPixmapSelector(0,1,1,1,__tr2qs_ctx("Background image:","options"),KviOption_pixmapUserListViewBackground); addLabel(0,2,0,2,__tr2qs_ctx("Horizontal Alignment:","options")); - m_pHorizontalAlign=new QComboBox(this); + m_pHorizontalAlign=new TQComboBox(this); addWidgetToLayout(m_pHorizontalAlign,1,2,1,2); addLabel(0,3,0,3,__tr2qs_ctx("Vertical Alignment:","options")); - m_pVerticalAlign=new QComboBox(this); + m_pVerticalAlign=new TQComboBox(this); addWidgetToLayout(m_pVerticalAlign,1,3,1,3); m_pHorizontalAlign->insertItem(__tr2qs_ctx("Tile","options")); @@ -146,30 +146,30 @@ KviUserListLookBackgroundOptionsWidget::KviUserListLookBackgroundOptionsWidget(Q m_pVerticalAlign->insertItem(__tr2qs_ctx("Bottom","options")); m_pVerticalAlign->insertItem(__tr2qs_ctx("Center","options")); - switch( KVI_OPTION_UINT(KviOption_uintUserListPixmapAlign) & Qt::AlignHorizontal_Mask) + switch( KVI_OPTION_UINT(KviOption_uintUserListPixmapAlign) & TQt::AlignHorizontal_Mask) { - case Qt::AlignLeft: + case TQt::AlignLeft: m_pHorizontalAlign->setCurrentItem(1); break; - case Qt::AlignRight: + case TQt::AlignRight: m_pHorizontalAlign->setCurrentItem(2); break; - case Qt::AlignHCenter: + case TQt::AlignHCenter: m_pHorizontalAlign->setCurrentItem(3); break; default: m_pHorizontalAlign->setCurrentItem(0); } - switch( KVI_OPTION_UINT(KviOption_uintUserListPixmapAlign) & Qt::AlignVertical_Mask) + switch( KVI_OPTION_UINT(KviOption_uintUserListPixmapAlign) & TQt::AlignVertical_Mask) { - case Qt::AlignTop: + case TQt::AlignTop: m_pVerticalAlign->setCurrentItem(1); break; - case Qt::AlignBottom: + case TQt::AlignBottom: m_pVerticalAlign->setCurrentItem(2); break; - case Qt::AlignVCenter: + case TQt::AlignVCenter: m_pVerticalAlign->setCurrentItem(3); break; default: @@ -178,8 +178,8 @@ KviUserListLookBackgroundOptionsWidget::KviUserListLookBackgroundOptionsWidget(Q - //layout()->setColStretch(0,1); - layout()->setRowStretch(1,1); + //tqlayout()->setColStretch(0,1); + tqlayout()->setRowStretch(1,1); } KviUserListLookBackgroundOptionsWidget::~KviUserListLookBackgroundOptionsWidget() @@ -195,25 +195,25 @@ void KviUserListLookBackgroundOptionsWidget::commit() switch(m_pHorizontalAlign->currentItem()) { case 1: - iFlags|=Qt::AlignLeft; + iFlags|=TQt::AlignLeft; break; case 2: - iFlags|=Qt::AlignRight; + iFlags|=TQt::AlignRight; break; case 3: - iFlags|=Qt::AlignHCenter; + iFlags|=TQt::AlignHCenter; break; } switch(m_pVerticalAlign->currentItem()) { case 1: - iFlags|=Qt::AlignTop; + iFlags|=TQt::AlignTop; break; case 2: - iFlags|=Qt::AlignBottom; + iFlags|=TQt::AlignBottom; break; case 3: - iFlags|=Qt::AlignVCenter; + iFlags|=TQt::AlignVCenter; break; } @@ -223,8 +223,8 @@ void KviUserListLookBackgroundOptionsWidget::commit() ////////////////////////////////////////////////////////////////////////////////////////////////////// -KviUserListFeaturesOptionsWidget::KviUserListFeaturesOptionsWidget(QWidget * parent) -: KviOptionsWidget(parent,"userlistfeatures_options_widget") +KviUserListFeaturesOptionsWidget::KviUserListFeaturesOptionsWidget(TQWidget * tqparent) +: KviOptionsWidget(tqparent,"userlistfeatures_options_widget") { createLayout(7,1); diff --git a/src/modules/options/optw_userlist.h b/src/modules/options/optw_userlist.h index d5fd4c12..8c4eaee1 100644 --- a/src/modules/options/optw_userlist.h +++ b/src/modules/options/optw_userlist.h @@ -24,7 +24,7 @@ // #include "kvi_optionswidget.h" -#include +#include #define KVI_OPTIONS_WIDGET_ICON_KviUserListLookOptionsWidget KVI_SMALLICON_USERLIST #define KVI_OPTIONS_WIDGET_NAME_KviUserListLookOptionsWidget __tr2qs_no_lookup("Userlist") @@ -35,8 +35,9 @@ class KviUserListLookOptionsWidget : public KviOptionsWidget { Q_OBJECT + TQ_OBJECT public: - KviUserListLookOptionsWidget(QWidget * parent); + KviUserListLookOptionsWidget(TQWidget * tqparent); ~KviUserListLookOptionsWidget(); }; @@ -51,12 +52,13 @@ public: class KviUserListLookBackgroundOptionsWidget : public KviOptionsWidget { Q_OBJECT + TQ_OBJECT public: - KviUserListLookBackgroundOptionsWidget(QWidget * parent); + KviUserListLookBackgroundOptionsWidget(TQWidget * tqparent); ~KviUserListLookBackgroundOptionsWidget(); protected: - QComboBox* m_pHorizontalAlign; - QComboBox* m_pVerticalAlign; + TQComboBox* m_pHorizontalAlign; + TQComboBox* m_pVerticalAlign; public: virtual void commit(); }; @@ -72,8 +74,9 @@ public: class KviUserListLookForegroundOptionsWidget : public KviOptionsWidget { Q_OBJECT + TQ_OBJECT public: - KviUserListLookForegroundOptionsWidget(QWidget * parent); + KviUserListLookForegroundOptionsWidget(TQWidget * tqparent); ~KviUserListLookForegroundOptionsWidget(); }; @@ -88,11 +91,12 @@ public: class KviUserListGridOptionsWidget : public KviOptionsWidget { Q_OBJECT + TQ_OBJECT public: - KviUserListGridOptionsWidget(QWidget * parent); + KviUserListGridOptionsWidget(TQWidget * tqparent); ~KviUserListGridOptionsWidget(); protected: - QComboBox * m_pGridTypeCombo; + TQComboBox * m_pGridTypeCombo; public: virtual void commit(); }; @@ -106,8 +110,9 @@ public: class KviUserListFeaturesOptionsWidget : public KviOptionsWidget { Q_OBJECT + TQ_OBJECT public: - KviUserListFeaturesOptionsWidget(QWidget * parent); + KviUserListFeaturesOptionsWidget(TQWidget * tqparent); ~KviUserListFeaturesOptionsWidget(); }; diff --git a/src/modules/perl/libkviperl.cpp b/src/modules/perl/libkviperl.cpp index a898e43a..3362586c 100644 --- a/src/modules/perl/libkviperl.cpp +++ b/src/modules/perl/libkviperl.cpp @@ -43,7 +43,7 @@ g_pPerlCoreModule = g_pModuleManager->getModule("perlcore"); \ if(!g_pPerlCoreModule) \ { \ - if(!_c->switches()->find('q',"quiet")) \ + if(!_c->switches()->tqfind('q',"quiet")) \ { \ _c->warning(__tr2qs_ctx("The perlcore module can't be loaded: perl support not available","perl")); \ _c->warning(__tr2qs_ctx("To see more details about loading failure try /perlcore.load","perl")); \ @@ -58,7 +58,7 @@ #define KVS_CHECK_MODULE_STATE(_m,_c) KVS_CHECK_PERLCORE(_m,_c) #else // !COMPILE_PERL_SUPPORT #define KVS_CHECK_MODULE_STATE(_m,_c) \ - if(!_c->switches()->find('q',"quiet")) \ + if(!_c->switches()->tqfind('q',"quiet")) \ _c->warning(__tr2qs_ctx("This KVIrc executable has been compiled without perl scripting support","perl")); \ return true; #endif // !COMPILE_PERL_SUPPORT @@ -431,7 +431,7 @@ static bool perl_kvs_cmd_begin(KviKvsModuleCommandCall * c) // The parser sets the perl code as the first parameter of our call, // the remaining params are the context name and the arguments - QString szCode,szContext; + TQString szCode,szContext; KviKvsVariantList vList; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("code",KVS_PT_STRING,0,szCode) @@ -450,31 +450,31 @@ static bool perl_kvs_cmd_begin(KviKvsModuleCommandCall * c) ex.szCode = szCode; for(KviKvsVariant * v = vList.first();v;v = vList.next()) { - QString tmp; + TQString tmp; v->asString(tmp); ex.lArgs.append(tmp); } - ex.bQuiet = c->switches()->find('q',"quiet"); + ex.bQuiet = c->switches()->tqfind('q',"quiet"); if(!g_pPerlCoreModule->ctrl(KVI_PERLCORECTRLCOMMAND_EXECUTE,&ex)) { - if(!c->switches()->find('q',"quiet")) + if(!c->switches()->tqfind('q',"quiet")) c->warning(__tr2qs_ctx("The perlcore module failed to execute the code: something is wrong with the perl support","perl")); return true; } if(!ex.lWarnings.isEmpty()) { - for(QStringList::Iterator it = ex.lWarnings.begin();it != ex.lWarnings.end();++it) + for(TQStringList::Iterator it = ex.lWarnings.begin();it != ex.lWarnings.end();++it) c->warning(*it); } if(!ex.bExitOk) { - if(!c->switches()->find('q',"quiet")) + if(!c->switches()->tqfind('q',"quiet")) { - if(c->switches()->find('f',"fail-on-error")) + if(c->switches()->tqfind('f',"fail-on-error")) { c->warning(__tr2qs_ctx("Perl execution error:","perl")); c->warning(ex.szError); @@ -486,7 +486,7 @@ static bool perl_kvs_cmd_begin(KviKvsModuleCommandCall * c) } } - if(!c->switches()->find('n',"no-return")) + if(!c->switches()->tqfind('n',"no-return")) c->context()->returnValue()->setString(ex.szRetVal); #endif //COMPILE_PERL_SUPPORT @@ -518,7 +518,7 @@ static bool perl_kvs_cmd_begin(KviKvsModuleCommandCall * c) static bool perl_kvs_cmd_destroy(KviKvsModuleCommandCall * c) { - QString szContext; + TQString szContext; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("context",KVS_PT_NONEMPTYSTRING,0,szContext) KVSM_PARAMETERS_END(c) @@ -532,7 +532,7 @@ static bool perl_kvs_cmd_destroy(KviKvsModuleCommandCall * c) if(!g_pPerlCoreModule->ctrl(KVI_PERLCORECTRLCOMMAND_DESTROY,&ex)) { - if(!c->switches()->find('q',"quiet")) + if(!c->switches()->tqfind('q',"quiet")) c->warning(__tr2qs_ctx("The perlcore module failed to execute the code: something is wrong with the perl support","perl")); } #endif //COMPILE_PERL_SUPPORT diff --git a/src/modules/perlcore/KVIrc.xs b/src/modules/perlcore/KVIrc.xs index 37b040cf..72ee5fd3 100644 --- a/src/modules/perlcore/KVIrc.xs +++ b/src/modules/perlcore/KVIrc.xs @@ -15,7 +15,7 @@ void echo(text,colorset = 0,windowid = 0) } else { pWnd = g_pCurrentKvsContext->window(); } - pWnd->outputNoFmt(colorset,QString::fromUtf8(text)); + pWnd->outputNoFmt(colorset,TQString::fromUtf8(text)); } void say(text,windowid = 0) @@ -32,7 +32,7 @@ void say(text,windowid = 0) } else { pWnd = g_pCurrentKvsContext->window(); } - QString tmp = QString::fromUtf8(text); + TQString tmp = TQString::fromUtf8(text); KviUserInput::parse(tmp,pWnd); } @@ -46,17 +46,17 @@ void internalWarning(text) char * text CODE: if(!g_bExecuteQuiet) - g_lWarningList.append(QString(text)); + g_lWarningList.append(TQString(text)); char * getLocal(varname) char * varname CODE: - QString tmp; + TQString tmp; KviStr hack; if(g_pCurrentKvsContext) { - KviKvsVariant * pVar = g_pCurrentKvsContext->localVariables()->find(varname); + KviKvsVariant * pVar = g_pCurrentKvsContext->localVariables()->tqfind(varname); if(pVar) { pVar->asString(tmp); @@ -85,11 +85,11 @@ void setLocal(varname,value) char * getGlobal(varname) char * varname CODE: - QString tmp; + TQString tmp; KviStr hack; if(g_pCurrentKvsContext) { - KviKvsVariant * pVar = g_pCurrentKvsContext->globalVariables()->find(varname); + KviKvsVariant * pVar = g_pCurrentKvsContext->globalVariables()->tqfind(varname); if(pVar) { pVar->asString(tmp); @@ -122,9 +122,9 @@ char * eval(code) if(g_pCurrentKvsContext && code) { KviKvsVariant ret; - if(KviKvsScript::run(QString::fromUtf8(code),g_pCurrentKvsContext->window(),0,&ret)) + if(KviKvsScript::run(TQString::fromUtf8(code),g_pCurrentKvsContext->window(),0,&ret)) { - QString tmp; + TQString tmp; ret.asString(tmp); g_szLastReturnValue = tmp; } else { diff --git a/src/modules/perlcore/libkviperlcore.cpp b/src/modules/perlcore/libkviperlcore.cpp index a9196219..4325ccda 100644 --- a/src/modules/perlcore/libkviperlcore.cpp +++ b/src/modules/perlcore/libkviperlcore.cpp @@ -72,7 +72,7 @@ static KviKvsRunTimeContext * g_pCurrentKvsContext = 0; static bool g_bExecuteQuiet = false; static KviStr g_szLastReturnValue(""); - static QStringList g_lWarningList; + static TQStringList g_lWarningList; #include "xs.inc" #endif // COMPILE_PERL_SUPPORT @@ -92,21 +92,21 @@ class KviPerlInterpreter { public: - KviPerlInterpreter(const QString &szContextName); + KviPerlInterpreter(const TQString &szContextName); ~KviPerlInterpreter(); protected: - QString m_szContextName; + TQString m_szContextName; PerlInterpreter * m_pInterpreter; public: bool init(); // if this fails then well.. :D void done(); - bool execute(const QString &szCode,QStringList &args,QString &szRetVal,QString &szError,QStringList &lWarnings); - const QString & contextName(){ return m_szContextName; }; + bool execute(const TQString &szCode,TQStringList &args,TQString &szRetVal,TQString &szError,TQStringList &lWarnings); + const TQString & contextName(){ return m_szContextName; }; protected: - QString svToQString(SV * sv); + TQString svToTQString(SV * sv); }; -KviPerlInterpreter::KviPerlInterpreter(const QString &szContextName) +KviPerlInterpreter::KviPerlInterpreter(const TQString &szContextName) { m_szContextName = szContextName; m_pInterpreter = 0; @@ -156,7 +156,7 @@ bool KviPerlInterpreter::init() perl_construct(m_pInterpreter); char * daArgs[] = { "yo", "-e", "0", "-w" }; perl_parse(m_pInterpreter,xs_init,4,daArgs,NULL); - QString szInitCode; + TQString szInitCode; // this part of the code seems to be unnecessary // even if it is created by the perl make process... @@ -169,7 +169,7 @@ bool KviPerlInterpreter::init() // declaration could be dropped as well... // I just haven't tried :D - KviQString::sprintf( + KviTQString::sprintf( szInitCode, "{\n" \ "package KVIrc;\n" \ @@ -202,9 +202,9 @@ void KviPerlInterpreter::done() m_pInterpreter = 0; } -QString KviPerlInterpreter::svToQString(SV * sv) +TQString KviPerlInterpreter::svToTQString(SV * sv) { - QString ret = ""; + TQString ret = ""; if(!sv)return ret; STRLEN len; char * ptr = SvPV(sv,len); @@ -213,11 +213,11 @@ QString KviPerlInterpreter::svToQString(SV * sv) } bool KviPerlInterpreter::execute( - const QString &szCode, - QStringList &args, - QString &szRetVal, - QString &szError, - QStringList &lWarnings) + const TQString &szCode, + TQStringList &args, + TQString &szRetVal, + TQString &szError, + TQStringList &lWarnings) { if(!m_pInterpreter) { @@ -227,7 +227,7 @@ bool KviPerlInterpreter::execute( g_lWarningList.clear(); - KviQCString szUtf8 = szCode.utf8(); + KviTQCString szUtf8 = szCode.utf8(); PERL_SET_CONTEXT(m_pInterpreter); // clear the _ array @@ -244,9 +244,9 @@ bool KviPerlInterpreter::execute( // set the args in the _ arry av_unshift(pArgs,(I32)args.count()); int idx = 0; - for(QStringList::Iterator it = args.begin();it != args.end();++it) + for(TQStringList::Iterator it = args.begin();it != args.end();++it) { - QString tmp = *it; + TQString tmp = *it; const char * val = tmp.utf8().data(); if(val) { @@ -275,7 +275,7 @@ bool KviPerlInterpreter::execute( if(pRet) { if(SvOK(pRet)) - szRetVal = svToQString(pRet); + szRetVal = svToTQString(pRet); } if(!g_lWarningList.isEmpty()) @@ -287,7 +287,7 @@ bool KviPerlInterpreter::execute( { if(SvOK(pRet)) { - szError = svToQString(pRet); + szError = svToTQString(pRet); if(!szError.isEmpty())return false; } } @@ -295,11 +295,11 @@ bool KviPerlInterpreter::execute( return true; } -static KviPointerHashTable * g_pInterpreters = 0; +static KviPointerHashTable * g_pInterpreters = 0; -static KviPerlInterpreter * perlcore_get_interpreter(const QString &szContextName) +static KviPerlInterpreter * perlcore_get_interpreter(const TQString &szContextName) { - KviPerlInterpreter * i = g_pInterpreters->find(szContextName); + KviPerlInterpreter * i = g_pInterpreters->tqfind(szContextName); if(i)return i; i = new KviPerlInterpreter(szContextName); if(!i->init()) @@ -307,13 +307,13 @@ static KviPerlInterpreter * perlcore_get_interpreter(const QString &szContextNam delete i; return 0; } - g_pInterpreters->replace(szContextName,i); + g_pInterpreters->tqreplace(szContextName,i); return i; } -static void perlcore_destroy_interpreter(const QString &szContextName) +static void perlcore_destroy_interpreter(const TQString &szContextName) { - KviPerlInterpreter * i = g_pInterpreters->find(szContextName); + KviPerlInterpreter * i = g_pInterpreters->tqfind(szContextName); if(!i)return; g_pInterpreters->remove(szContextName); i->done(); @@ -322,7 +322,7 @@ static void perlcore_destroy_interpreter(const QString &szContextName) static void perlcore_destroy_all_interpreters() { - KviPointerHashTableIterator it(*g_pInterpreters); + KviPointerHashTableIterator it(*g_pInterpreters); while(it.current()) { @@ -376,7 +376,7 @@ static bool perlcore_module_ctrl(KviModule * m,const char * cmd,void * param) static bool perlcore_module_init(KviModule * m) { #ifdef COMPILE_PERL_SUPPORT - g_pInterpreters = new KviPointerHashTable(17,false); + g_pInterpreters = new KviPointerHashTable(17,false); g_pInterpreters->setAutoDelete(false); return true; #else // !COMPILE_PERL_SUPPORT diff --git a/src/modules/perlcore/perlcoreinterface.h b/src/modules/perlcore/perlcoreinterface.h index a7ceb1fc..0e26f2b4 100644 --- a/src/modules/perlcore/perlcoreinterface.h +++ b/src/modules/perlcore/perlcoreinterface.h @@ -29,7 +29,7 @@ #include "kvi_qstring.h" #include "kvi_kvs_runtimecontext.h" -#include +#include #define KVI_PERLCORECTRLCOMMAND_EXECUTE "execute" @@ -38,13 +38,13 @@ typedef struct _KviPerlCoreCtrlCommand_execute { unsigned int uSize; KviKvsRunTimeContext * pKvsContext; - QString szContext; - QString szCode; + TQString szContext; + TQString szCode; bool bExitOk; - QString szRetVal; - QString szError; - QStringList lWarnings; - QStringList lArgs; + TQString szRetVal; + TQString szError; + TQStringList lWarnings; + TQStringList lArgs; bool bQuiet; } KviPerlCoreCtrlCommand_execute; @@ -53,7 +53,7 @@ typedef struct _KviPerlCoreCtrlCommand_execute typedef struct _KviPerlCoreCtrlCommand_destroy { unsigned int uSize; - QString szContext; + TQString szContext; } KviPerlCoreCtrlCommand_destroy; #endif // !_PERLCOREINTERFACE_H_ diff --git a/src/modules/perlcore/ppport.h b/src/modules/perlcore/ppport.h index 2a802132..86d03bce 100644 --- a/src/modules/perlcore/ppport.h +++ b/src/modules/perlcore/ppport.h @@ -81,11 +81,11 @@ /* #!/usr/bin/perl @ARGV = ("*.xs") if !@ARGV; -%badmacros = %funcs = %macros = (); $replace = 0; +%badmacros = %funcs = %macros = (); $tqreplace = 0; foreach () { $funcs{$1} = 1 if /Provide:\s+(\S+)/; $macros{$1} = 1 if /^#\s*define\s+([a-zA-Z0-9_]+)/; - $replace = $1 if /Replace:\s+(\d+)/; + $tqreplace = $1 if /Replace:\s+(\d+)/; $badmacros{$2}=$1 if $replace and /^#\s*define\s+([a-zA-Z0-9_]+).*?\s+([a-zA-Z0-9_]+)/; $badmacros{$1}=$2 if /Replace (\S+) with (\S+)/; } @@ -404,7 +404,7 @@ SV *sv; * * Code that uses these macros is responsible for the following: * 1. #define MY_CXT_KEY to a unique string, e.g. "DynaLoader_guts" - * 2. Declare a typedef named my_cxt_t that is a structure that contains + * 2. Declare a typedef named my_cxt_t that is a structure that tqcontains * all the data that needs to be interpreter-local. * 3. Use the START_MY_CXT macro after the declaration of my_cxt_t. * 4. Use the MY_CXT_INIT macro such that it is called exactly once diff --git a/src/modules/perlcore/xs.inc b/src/modules/perlcore/xs.inc index 5c31cb19..092e9369 100644 --- a/src/modules/perlcore/xs.inc +++ b/src/modules/perlcore/xs.inc @@ -41,7 +41,7 @@ XS(XS_KVIrc_echo) } else { pWnd = g_pCurrentKvsContext->window(); } - pWnd->outputNoFmt(colorset,QString::fromUtf8(text)); + pWnd->outputNoFmt(colorset,TQString::fromUtf8(text)); } #line 47 "KVIrc.c" } @@ -74,7 +74,7 @@ XS(XS_KVIrc_say) } else { pWnd = g_pCurrentKvsContext->window(); } - QString tmp = QString::fromUtf8(text); + TQString tmp = TQString::fromUtf8(text); KviUserInput::parse(tmp,pWnd); } #line 81 "KVIrc.c" @@ -108,7 +108,7 @@ XS(XS_KVIrc_internalWarning) char * text = (char *)SvPV_nolen(ST(0)); #line 48 "KVIrc.xs" if(!g_bExecuteQuiet) - g_lWarningList.append(QString(text)); + g_lWarningList.append(TQString(text)); #line 113 "KVIrc.c" } XSRETURN_EMPTY; @@ -125,11 +125,11 @@ XS(XS_KVIrc_getLocal) char * RETVAL; dXSTARG; #line 55 "KVIrc.xs" - QString tmp; + TQString tmp; KviStr hack; if(g_pCurrentKvsContext) { - KviKvsVariant * pVar = g_pCurrentKvsContext->localVariables()->find(varname); + KviKvsVariant * pVar = g_pCurrentKvsContext->localVariables()->tqfind(varname); if(pVar) { pVar->asString(tmp); @@ -179,11 +179,11 @@ XS(XS_KVIrc_getGlobal) char * RETVAL; dXSTARG; #line 88 "KVIrc.xs" - QString tmp; + TQString tmp; KviStr hack; if(g_pCurrentKvsContext) { - KviKvsVariant * pVar = g_pCurrentKvsContext->globalVariables()->find(varname); + KviKvsVariant * pVar = g_pCurrentKvsContext->globalVariables()->tqfind(varname); if(pVar) { pVar->asString(tmp); @@ -236,9 +236,9 @@ XS(XS_KVIrc_eval) if(g_pCurrentKvsContext && code) { KviKvsVariant ret; - if(KviKvsScript::run(QString::fromUtf8(code),g_pCurrentKvsContext->window(),0,&ret)) + if(KviKvsScript::run(TQString::fromUtf8(code),g_pCurrentKvsContext->window(),0,&ret)) { - QString tmp; + TQString tmp; ret.asString(tmp); g_szLastReturnValue = tmp; } else { diff --git a/src/modules/popupeditor/popupeditor.cpp b/src/modules/popupeditor/popupeditor.cpp index 942b5b2f..99beab90 100644 --- a/src/modules/popupeditor/popupeditor.cpp +++ b/src/modules/popupeditor/popupeditor.cpp @@ -40,14 +40,14 @@ #include "kvi_kvs_variantlist.h" //#include "kvi_parameterlist.h" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include "kvi_pointerhashtable.h" -#include +#include #include "kvi_tal_vbox.h" extern KviPopupEditorWindow * g_pPopupEditorWindow; @@ -62,8 +62,8 @@ KviPopupListViewItem::KviPopupListViewItem(KviTalListView * pListView,KviPopupLi init(); } -KviPopupListViewItem::KviPopupListViewItem(KviPopupListViewItem * parent,KviPopupListViewItem * after,Type t) -: KviTalListViewItem(parent,after) +KviPopupListViewItem::KviPopupListViewItem(KviPopupListViewItem * tqparent,KviPopupListViewItem * after,Type t) +: KviTalListViewItem(tqparent,after) { m_type = t; init(); @@ -102,7 +102,7 @@ void KviPopupListViewItem::init() } } -void KviPopupListViewItem::setItemText(const QString & szText) +void KviPopupListViewItem::setItemText(const TQString & szText) { switch(m_type) { @@ -118,7 +118,7 @@ void KviPopupListViewItem::setItemText(const QString & szText) } } -void KviPopupListViewItem::setCondition(const QString & szCondition) +void KviPopupListViewItem::setCondition(const TQString & szCondition) { switch(m_type) { @@ -133,7 +133,7 @@ void KviPopupListViewItem::setCondition(const QString & szCondition) } } -void KviPopupListViewItem::setCode(const QString & szCode) +void KviPopupListViewItem::setCode(const TQString & szCode) { switch(m_type) { @@ -148,12 +148,12 @@ void KviPopupListViewItem::setCode(const QString & szCode) } } -void KviPopupListViewItem::setId(const QString & szId) +void KviPopupListViewItem::setId(const TQString & szId) { m_szId = szId; } -void KviPopupListViewItem::setIcon(const QString & szIcon) +void KviPopupListViewItem::setIcon(const TQString & szIcon) { switch(m_type) { @@ -163,9 +163,9 @@ void KviPopupListViewItem::setIcon(const QString & szIcon) case ExtMenu: m_szIcon = szIcon; { - QPixmap * pix = g_pIconManager->getImage(szIcon); + TQPixmap * pix = g_pIconManager->getImage(szIcon); if(pix)setPixmap(0,*pix); - else setPixmap(0,QPixmap()); + else setPixmap(0,TQPixmap()); } break; default: @@ -184,29 +184,29 @@ void KviPopupListViewItem::setIcon(const QString & szIcon) -KviSinglePopupEditor::KviSinglePopupEditor(QWidget * par) -: QWidget(par) +KviSinglePopupEditor::KviSinglePopupEditor(TQWidget * par) +: TQWidget(par) { m_pLastSelectedItem = 0; m_pContextPopup = new KviTalPopupMenu(this); m_pClipboard = 0; m_pTestPopup = 0; - QGridLayout * g = new QGridLayout(this,7,3,2,2); + TQGridLayout * g = new TQGridLayout(this,7,3,2,2); - m_pNameEditor = new QLineEdit(this); - QToolTip::add(m_pNameEditor,__tr2qs("Popup name")); + m_pNameEditor = new TQLineEdit(this); + TQToolTip::add(m_pNameEditor,__tr2qs("Popup name")); g->addMultiCellWidget(m_pNameEditor,0,0,0,1); - m_pMenuButton = new QPushButton(__tr2qs("Test"),this); + m_pMenuButton = new TQPushButton(__tr2qs("Test"),this); g->addWidget(m_pMenuButton,0,2); - connect(m_pMenuButton,SIGNAL(clicked()),this,SLOT(testPopup())); + connect(m_pMenuButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(testPopup())); #ifdef COMPILE_USE_QT4 - QSplitter * spl = new QSplitter(Qt::Vertical,this,"popupeditor"); + TQSplitter * spl = new TQSplitter(Qt::Vertical,this,"popupeditor"); spl->setOpaqueResize(false); #else - QSplitter * spl = new QSplitter(QSplitter::Vertical,this); + TQSplitter * spl = new TQSplitter(Qt::Vertical,this); #endif m_pListView = new KviTalListView(spl); @@ -219,57 +219,57 @@ KviSinglePopupEditor::KviSinglePopupEditor(QWidget * par) m_pListView->setSorting(-1); - connect(m_pListView,SIGNAL(selectionChanged(KviTalListViewItem *)),this,SLOT(selectionChanged(KviTalListViewItem *))); - connect(m_pListView,SIGNAL(rightButtonPressed(KviTalListViewItem *,const QPoint &,int)), - this,SLOT(itemPressed(KviTalListViewItem *,const QPoint &,int))); + connect(m_pListView,TQT_SIGNAL(selectionChanged(KviTalListViewItem *)),this,TQT_SLOT(selectionChanged(KviTalListViewItem *))); + connect(m_pListView,TQT_SIGNAL(rightButtonPressed(KviTalListViewItem *,const TQPoint &,int)), + this,TQT_SLOT(itemPressed(KviTalListViewItem *,const TQPoint &,int))); m_pEditor = KviScriptEditor::createInstance(spl); g->addMultiCellWidget(spl,1,1,0,2); - QLabel * l = new QLabel(__tr2qs("Text:"),this); + TQLabel * l = new TQLabel(__tr2qs("Text:"),this); l->setMargin(2); g->addWidget(l,2,0); - m_pTextEditor = new QLineEdit(this); - QToolTip::add(m_pTextEditor, + m_pTextEditor = new TQLineEdit(this); + TQToolTip::add(m_pTextEditor, __tr2qs("
Visible text
May contain identifiers that will be evaluated at popup call time.
For labels, this text can contain also limited HTML tags.
")); g->addMultiCellWidget(m_pTextEditor,2,2,1,2); - l = new QLabel(__tr2qs("Condition:"),this); + l = new TQLabel(__tr2qs("Condition:"),this); l->setMargin(2); g->addWidget(l,3,0); - m_pConditionEditor = new QLineEdit(this); - QToolTip::add(m_pConditionEditor, + m_pConditionEditor = new TQLineEdit(this); + TQToolTip::add(m_pConditionEditor, __tr2qs("
Boolean condition
Will be evaluated at popup call time in order to decide if this entry has to be shown.
An empty condition evaluates to true.
")); g->addMultiCellWidget(m_pConditionEditor,3,3,1,2); - l = new QLabel(__tr2qs("Icon:"),this); + l = new TQLabel(__tr2qs("Icon:"),this); l->setMargin(2); g->addWidget(l,4,0); - m_pIconEditor = new QLineEdit(this); - QToolTip::add(m_pIconEditor, + m_pIconEditor = new TQLineEdit(this); + TQToolTip::add(m_pIconEditor, __tr2qs("
Icon identifier
May be an internal icon ID, an absolute path or a relative path.
Portable scripts should never use absolute paths.
")); g->addMultiCellWidget(m_pIconEditor,4,4,1,2); - l = new QLabel(__tr2qs("External menu:"),this); + l = new TQLabel(__tr2qs("External menu:"),this); l->setMargin(2); g->addWidget(l,5,0); - m_pExtNameEditor = new QLineEdit(this); - QToolTip::add(m_pExtNameEditor, + m_pExtNameEditor = new TQLineEdit(this); + TQToolTip::add(m_pExtNameEditor, __tr2qs("
External menu name
This allows to nest externally defined popup menus. The popup menu with the specified name will be looked up at menu setup time.
")); g->addMultiCellWidget(m_pExtNameEditor,5,5,1,2); - l = new QLabel(__tr2qs("Item Id:"),this); + l = new TQLabel(__tr2qs("Item Id:"),this); l->setMargin(2); g->addWidget(l,6,0); - m_pIdEditor = new QLineEdit(this); - QToolTip::add(m_pIdEditor, + m_pIdEditor = new TQLineEdit(this); + TQToolTip::add(m_pIdEditor, __tr2qs("
Item id
This will allow you to use delpopupitem later.
")); g->addMultiCellWidget(m_pIdEditor,6,6,1,2); @@ -292,13 +292,13 @@ void KviSinglePopupEditor::testPopup() if(m_pTestPopup)delete m_pTestPopup; m_pTestPopup = getMenu(); if(!m_pTestPopup)return; - connect(m_pTestPopup,SIGNAL(testModeItemClicked(KviKvsPopupMenuItem *)),this,SLOT(testModeMenuItemClicked(KviKvsPopupMenuItem *))); - QPoint pnt = m_pMenuButton->mapToGlobal(QPoint(0,m_pMenuButton->height())); + connect(m_pTestPopup,TQT_SIGNAL(testModeItemClicked(KviKvsPopupMenuItem *)),this,TQT_SLOT(testModeMenuItemClicked(KviKvsPopupMenuItem *))); + TQPoint pnt = m_pMenuButton->mapToGlobal(TQPoint(0,m_pMenuButton->height())); KviKvsVariantList * parms = new KviKvsVariantList(); - parms->append(new KviKvsVariant(QString("test1"))); - parms->append(new KviKvsVariant(QString("test2"))); - parms->append(new KviKvsVariant(QString("test3"))); - parms->append(new KviKvsVariant(QString("test4"))); + parms->append(new KviKvsVariant(TQString("test1"))); + parms->append(new KviKvsVariant(TQString("test2"))); + parms->append(new KviKvsVariant(TQString("test3"))); + parms->append(new KviKvsVariant(TQString("test4"))); m_pTestPopup->doPopup(pnt,g_pActiveWindow,parms,true); } @@ -370,65 +370,65 @@ void KviSinglePopupEditor::testModeMenuItemClicked(KviKvsPopupMenuItem * it) } -void KviSinglePopupEditor::itemPressed(KviTalListViewItem *it,const QPoint &pnt,int col) +void KviSinglePopupEditor::itemPressed(KviTalListViewItem *it,const TQPoint &pnt,int col) { m_pContextPopup->clear(); - KviPopupListViewItem * parentMenu = 0; + KviPopupListViewItem * tqparentMenu = 0; bool bIsMenu = false; if(it) { - parentMenu = (KviPopupListViewItem *) (((KviPopupListViewItem *)it)->parent()); + tqparentMenu = (KviPopupListViewItem *) (((KviPopupListViewItem *)it)->tqparent()); bIsMenu = ((KviPopupListViewItem *)it)->m_type == KviPopupListViewItem::Menu; } - m_pContextPopup->insertItem(__tr2qs("New Separator Below"),this,SLOT(contextNewSeparatorBelow())); + m_pContextPopup->insertItem(__tr2qs("New Separator Below"),this,TQT_SLOT(contextNewSeparatorBelow())); m_pContextPopup->setItemEnabled( - m_pContextPopup->insertItem(__tr2qs("New Separator Above"),this,SLOT(contextNewSeparatorAbove())), + m_pContextPopup->insertItem(__tr2qs("New Separator Above"),this,TQT_SLOT(contextNewSeparatorAbove())), it); m_pContextPopup->setItemEnabled( - m_pContextPopup->insertItem(__tr2qs("New Separator Inside"),this,SLOT(contextNewSeparatorInside())), + m_pContextPopup->insertItem(__tr2qs("New Separator Inside"),this,TQT_SLOT(contextNewSeparatorInside())), it && bIsMenu); m_pContextPopup->insertSeparator(); - m_pContextPopup->insertItem(__tr2qs("New Label Below"),this,SLOT(contextNewLabelBelow())); + m_pContextPopup->insertItem(__tr2qs("New Label Below"),this,TQT_SLOT(contextNewLabelBelow())); m_pContextPopup->setItemEnabled( - m_pContextPopup->insertItem(__tr2qs("New Label Above"),this,SLOT(contextNewLabelAbove())), + m_pContextPopup->insertItem(__tr2qs("New Label Above"),this,TQT_SLOT(contextNewLabelAbove())), it); m_pContextPopup->setItemEnabled( - m_pContextPopup->insertItem(__tr2qs("New Label Inside"),this,SLOT(contextNewLabelInside())), + m_pContextPopup->insertItem(__tr2qs("New Label Inside"),this,TQT_SLOT(contextNewLabelInside())), it && bIsMenu); m_pContextPopup->insertSeparator(); - m_pContextPopup->insertItem(__tr2qs("New Item Below"),this,SLOT(contextNewItemBelow())); + m_pContextPopup->insertItem(__tr2qs("New Item Below"),this,TQT_SLOT(contextNewItemBelow())); m_pContextPopup->setItemEnabled( - m_pContextPopup->insertItem(__tr2qs("New Item Above"),this,SLOT(contextNewItemAbove())), + m_pContextPopup->insertItem(__tr2qs("New Item Above"),this,TQT_SLOT(contextNewItemAbove())), it); m_pContextPopup->setItemEnabled( - m_pContextPopup->insertItem(__tr2qs("New Item Inside"),this,SLOT(contextNewItemInside())), + m_pContextPopup->insertItem(__tr2qs("New Item Inside"),this,TQT_SLOT(contextNewItemInside())), it && bIsMenu); m_pContextPopup->insertSeparator(); - m_pContextPopup->insertItem(__tr2qs("New Menu Below"),this,SLOT(contextNewMenuBelow())); + m_pContextPopup->insertItem(__tr2qs("New Menu Below"),this,TQT_SLOT(contextNewMenuBelow())); m_pContextPopup->setItemEnabled( - m_pContextPopup->insertItem(__tr2qs("New Menu Above"),this,SLOT(contextNewMenuAbove())), + m_pContextPopup->insertItem(__tr2qs("New Menu Above"),this,TQT_SLOT(contextNewMenuAbove())), it); m_pContextPopup->setItemEnabled( - m_pContextPopup->insertItem(__tr2qs("New Menu Inside"),this,SLOT(contextNewMenuInside())), + m_pContextPopup->insertItem(__tr2qs("New Menu Inside"),this,TQT_SLOT(contextNewMenuInside())), it && bIsMenu); m_pContextPopup->insertSeparator(); - m_pContextPopup->insertItem(__tr2qs("New External Menu Below"),this,SLOT(contextNewExtMenuBelow())); + m_pContextPopup->insertItem(__tr2qs("New External Menu Below"),this,TQT_SLOT(contextNewExtMenuBelow())); m_pContextPopup->setItemEnabled( - m_pContextPopup->insertItem(__tr2qs("New External Menu Above"),this,SLOT(contextNewExtMenuAbove())), + m_pContextPopup->insertItem(__tr2qs("New External Menu Above"),this,TQT_SLOT(contextNewExtMenuAbove())), it); m_pContextPopup->setItemEnabled( - m_pContextPopup->insertItem(__tr2qs("New External Menu Inside"),this,SLOT(contextNewExtMenuInside())), + m_pContextPopup->insertItem(__tr2qs("New External Menu Inside"),this,TQT_SLOT(contextNewExtMenuInside())), it && bIsMenu); m_pContextPopup->insertSeparator(); @@ -437,48 +437,48 @@ void KviSinglePopupEditor::itemPressed(KviTalListViewItem *it,const QPoint &pnt, m_pContextPopup->insertItem( *(g_pIconManager->getSmallIcon(KVI_SMALLICON_CUT)), __tr2qs("Cu&t"), - this,SLOT(contextCut())), + this,TQT_SLOT(contextCut())), it); m_pContextPopup->setItemEnabled( m_pContextPopup->insertItem( *(g_pIconManager->getSmallIcon(KVI_SMALLICON_COPY)), __tr2qs("&Copy"), - this,SLOT(contextCopy())), + this,TQT_SLOT(contextCopy())), it); m_pContextPopup->setItemEnabled( m_pContextPopup->insertItem( *(g_pIconManager->getSmallIcon(KVI_SMALLICON_PASTE)), - __tr2qs("&Paste Below"),this,SLOT(contextPasteBelow())), + __tr2qs("&Paste Below"),this,TQT_SLOT(contextPasteBelow())), m_pClipboard); m_pContextPopup->setItemEnabled( m_pContextPopup->insertItem( *(g_pIconManager->getSmallIcon(KVI_SMALLICON_PASTE)), - __tr2qs("Paste Above"),this,SLOT(contextPasteAbove())), + __tr2qs("Paste Above"),this,TQT_SLOT(contextPasteAbove())), it && m_pClipboard); m_pContextPopup->setItemEnabled( m_pContextPopup->insertItem( *(g_pIconManager->getSmallIcon(KVI_SMALLICON_PASTE)), - __tr2qs("Paste Inside"),this,SLOT(contextPasteInside())), + __tr2qs("Paste Inside"),this,TQT_SLOT(contextPasteInside())), it && bIsMenu && m_pClipboard); bool bSeparatorInserted = false; -// if(!findPrologue(parentMenu)) +// if(!findPrologue(tqparentMenu)) // { m_pContextPopup->insertSeparator(); bSeparatorInserted = true; m_pContextPopup->insertItem( *(g_pIconManager->getSmallIcon(KVI_SMALLICON_PROLOGUE)), - __tr2qs("New Menu Prologue"),this,SLOT(contextNewPrologue())); + __tr2qs("New Menu Prologue"),this,TQT_SLOT(contextNewPrologue())); // } -// if(!findEpilogue(parentMenu)) +// if(!findEpilogue(tqparentMenu)) // { if(!bSeparatorInserted)m_pContextPopup->insertSeparator(); m_pContextPopup->insertItem( *(g_pIconManager->getSmallIcon(KVI_SMALLICON_EPILOGUE)), - __tr2qs("New Menu Epilogue"),this,SLOT(contextNewEpilogue())); + __tr2qs("New Menu Epilogue"),this,TQT_SLOT(contextNewEpilogue())); // } m_pContextPopup->popup(pnt); @@ -584,13 +584,13 @@ KviPopupListViewItem * KviSinglePopupEditor::newItem(KviPopupListViewItem * par, KviPopupListViewItem * KviSinglePopupEditor::newItemBelow(KviPopupListViewItem * it,KviPopupListViewItem::Type t) { if(!it)return newItem(0,0,t); - return newItem((KviPopupListViewItem *)it->parent(),it,t); + return newItem((KviPopupListViewItem *)it->tqparent(),it,t); } KviPopupListViewItem * KviSinglePopupEditor::newItemAbove(KviPopupListViewItem * it,KviPopupListViewItem::Type t) { if(!it)return newItem(0,0,t); - return newItem((KviPopupListViewItem *)it->parent(),(KviPopupListViewItem *)it->itemAbove(),t); + return newItem((KviPopupListViewItem *)it->tqparent(),(KviPopupListViewItem *)it->itemAbove(),t); } KviPopupListViewItem * KviSinglePopupEditor::newItemInside(KviPopupListViewItem * it,KviPopupListViewItem::Type t) @@ -607,7 +607,7 @@ KviPopupListViewItem * KviSinglePopupEditor::newItemInside(KviPopupListViewItem void KviSinglePopupEditor::contextNewPrologue() { - KviPopupListViewItem * it = m_pLastSelectedItem ? (KviPopupListViewItem *)m_pLastSelectedItem->parent() : 0; + KviPopupListViewItem * it = m_pLastSelectedItem ? (KviPopupListViewItem *)m_pLastSelectedItem->tqparent() : 0; // if(!findPrologue(it)) // { m_pListView->setCurrentItem(newItem(it,it,KviPopupListViewItem::Prologue)); @@ -616,7 +616,7 @@ void KviSinglePopupEditor::contextNewPrologue() void KviSinglePopupEditor::contextNewEpilogue() { - KviPopupListViewItem * it = m_pLastSelectedItem ? (KviPopupListViewItem *)m_pLastSelectedItem->parent() : 0; + KviPopupListViewItem * it = m_pLastSelectedItem ? (KviPopupListViewItem *)m_pLastSelectedItem->tqparent() : 0; // if(!findEpilogue(it)) // { KviPopupListViewItem * after = it ? (KviPopupListViewItem *)it->firstChild() : (KviPopupListViewItem *)m_pListView->firstChild(); @@ -653,14 +653,14 @@ void KviSinglePopupEditor::contextCut() void KviSinglePopupEditor::contextPasteBelow() { if(!m_pClipboard)return; - KviPopupListViewItem * par = m_pLastSelectedItem ? (KviPopupListViewItem *)m_pLastSelectedItem->parent() : 0; + KviPopupListViewItem * par = m_pLastSelectedItem ? (KviPopupListViewItem *)m_pLastSelectedItem->tqparent() : 0; populateMenu(m_pClipboard,par,m_pLastSelectedItem); } void KviSinglePopupEditor::contextPasteAbove() { if(!m_pClipboard)return; - KviPopupListViewItem * par = m_pLastSelectedItem ? (KviPopupListViewItem *)m_pLastSelectedItem->parent() : 0; + KviPopupListViewItem * par = m_pLastSelectedItem ? (KviPopupListViewItem *)m_pLastSelectedItem->tqparent() : 0; KviPopupListViewItem * above = m_pLastSelectedItem ? (KviPopupListViewItem *)m_pLastSelectedItem->itemAbove() : 0; populateMenu(m_pClipboard,par,above); @@ -685,7 +685,7 @@ void KviSinglePopupEditor::saveLastSelectedItem() { if(!m_pLastSelectedItem)return; - QString tmp; + TQString tmp; switch(m_pLastSelectedItem->m_type) { @@ -693,7 +693,7 @@ void KviSinglePopupEditor::saveLastSelectedItem() case KviPopupListViewItem::Epilogue: case KviPopupListViewItem::Item: { - QString tmpx; + TQString tmpx; m_pEditor->getText(tmpx); m_pLastSelectedItem->setCode(tmpx); } @@ -792,7 +792,7 @@ KviKvsPopupMenu * KviSinglePopupEditor::getMenu() { saveLastSelectedItem(); - QString tmp = m_pNameEditor->text(); + TQString tmp = m_pNameEditor->text(); tmp.stripWhiteSpace(); KviKvsPopupMenu * p = new KviKvsPopupMenu(tmp); @@ -898,27 +898,27 @@ void KviSinglePopupEditor::populateMenu(KviKvsPopupMenu * pop,KviPopupListViewIt case KviKvsPopupMenuItem::Item: if(par)theItem = new KviPopupListViewItem(par,theItem,KviPopupListViewItem::Item); else theItem = new KviPopupListViewItem(m_pListView,theItem,KviPopupListViewItem::Item); - theItem->setIcon(item->kvsIcon() ? item->kvsIcon()->code() : QString::null); - theItem->setItemText(item->kvsText() ? item->kvsText()->code() : QString::null); - theItem->setCondition(item->kvsCondition() ? item->kvsCondition()->code() : QString::null); - theItem->setCode(item->kvsCode() ? item->kvsCode()->code() : QString::null); + theItem->setIcon(item->kvsIcon() ? item->kvsIcon()->code() : TQString()); + theItem->setItemText(item->kvsText() ? item->kvsText()->code() : TQString()); + theItem->setCondition(item->kvsCondition() ? item->kvsCondition()->code() : TQString()); + theItem->setCode(item->kvsCode() ? item->kvsCode()->code() : TQString()); theItem->setId(item->name()); break; case KviKvsPopupMenuItem::ExtMenu: if(par)theItem = new KviPopupListViewItem(par,theItem,KviPopupListViewItem::ExtMenu); else theItem = new KviPopupListViewItem(m_pListView,theItem,KviPopupListViewItem::ExtMenu); - theItem->setIcon(item->kvsIcon() ? item->kvsIcon()->code() : QString::null); - theItem->setItemText(item->kvsText() ? item->kvsText()->code() : QString::null); - theItem->setCondition(item->kvsCondition() ? item->kvsCondition()->code() : QString::null); + theItem->setIcon(item->kvsIcon() ? item->kvsIcon()->code() : TQString()); + theItem->setItemText(item->kvsText() ? item->kvsText()->code() : TQString()); + theItem->setCondition(item->kvsCondition() ? item->kvsCondition()->code() : TQString()); theItem->setCode(((KviKvsPopupMenuItemExtMenu *)item)->extName()); theItem->setId(item->name()); break; case KviKvsPopupMenuItem::Label: if(par)theItem = new KviPopupListViewItem(par,theItem,KviPopupListViewItem::Label); else theItem = new KviPopupListViewItem(m_pListView,theItem,KviPopupListViewItem::Label); - theItem->setIcon(item->kvsIcon() ? item->kvsIcon()->code() : QString::null); - theItem->setItemText(item->kvsText() ? item->kvsText()->code() : QString::null); - theItem->setCondition(item->kvsCondition() ? item->kvsCondition()->code() : QString::null); + theItem->setIcon(item->kvsIcon() ? item->kvsIcon()->code() : TQString()); + theItem->setItemText(item->kvsText() ? item->kvsText()->code() : TQString()); + theItem->setCondition(item->kvsCondition() ? item->kvsCondition()->code() : TQString()); theItem->setId(item->name()); break; case KviKvsPopupMenuItem::Separator: @@ -929,9 +929,9 @@ void KviSinglePopupEditor::populateMenu(KviKvsPopupMenu * pop,KviPopupListViewIt case KviKvsPopupMenuItem::Menu: if(par)theItem = new KviPopupListViewItem(par,theItem,KviPopupListViewItem::Menu); else theItem = new KviPopupListViewItem(m_pListView,theItem,KviPopupListViewItem::Menu); - theItem->setIcon(item->kvsIcon() ? item->kvsIcon()->code() : QString::null); - theItem->setItemText(item->kvsText() ? item->kvsText()->code() : QString::null); - theItem->setCondition(item->kvsCondition() ? item->kvsCondition()->code() : QString::null); + theItem->setIcon(item->kvsIcon() ? item->kvsIcon()->code() : TQString()); + theItem->setItemText(item->kvsText() ? item->kvsText()->code() : TQString()); + theItem->setCondition(item->kvsCondition() ? item->kvsCondition()->code() : TQString()); theItem->setId(item->name()); populateMenu(((KviKvsPopupMenuItemMenu *)item)->menu(),theItem,0); break; @@ -1024,15 +1024,15 @@ void KviMenuListViewItem::replacePopup(KviKvsPopupMenu * popup) } -KviPopupEditor::KviPopupEditor(QWidget * par) -: QWidget(par) +KviPopupEditor::KviPopupEditor(TQWidget * par) +: TQWidget(par) { - QGridLayout * l = new QGridLayout(this,1,1,0,2); + TQGridLayout * l = new TQGridLayout(this,1,1,0,2); #ifdef COMPILE_USE_QT4 - QSplitter * spl = new QSplitter(Qt::Horizontal,this,"popupeditor"); + TQSplitter * spl = new TQSplitter(Qt::Horizontal,this,"popupeditor"); spl->setOpaqueResize(false); #else - QSplitter * spl = new QSplitter(QSplitter::Horizontal,this); + TQSplitter * spl = new TQSplitter(Qt::Horizontal,this); #endif l->addWidget(spl,0,0); @@ -1043,10 +1043,10 @@ KviPopupEditor::KviPopupEditor(QWidget * par) m_pListView->setSelectionMode(KviTalListView::Extended); m_pListView->setShowSortIndicator(true); - QPushButton * pb = new QPushButton(__tr2qs("&Export All To..."),box); - connect(pb,SIGNAL(clicked()),this,SLOT(exportAll())); - QPushButton * gn = new QPushButton(__tr2qs("&Export selected To..."),box); - connect(gn,SIGNAL(clicked()),this,SLOT(exportSelected())); + TQPushButton * pb = new TQPushButton(__tr2qs("&Export All To..."),box); + connect(pb,TQT_SIGNAL(clicked()),this,TQT_SLOT(exportAll())); + TQPushButton * gn = new TQPushButton(__tr2qs("&Export selected To..."),box); + connect(gn,TQT_SIGNAL(clicked()),this,TQT_SLOT(exportSelected())); m_pEditor = new KviSinglePopupEditor(spl); @@ -1067,10 +1067,10 @@ void KviPopupEditor::oneTimeSetup() if(m_bOneTimeSetupDone)return; m_bOneTimeSetupDone = true; - const KviPointerHashTable * a = KviKvsPopupManager::instance()->popupDict(); + const KviPointerHashTable * a = KviKvsPopupManager::instance()->popupDict(); if(!a)return; - KviPointerHashTableIterator it(*a); + KviPointerHashTableIterator it(*a); KviMenuListViewItem * item; @@ -1083,13 +1083,13 @@ void KviPopupEditor::oneTimeSetup() ++it; } - connect(m_pListView,SIGNAL(currentChanged(KviTalListViewItem *)),this,SLOT(currentItemChanged(KviTalListViewItem *))); - connect(m_pListView,SIGNAL(rightButtonPressed(KviTalListViewItem *,const QPoint &,int)), - this,SLOT(itemPressed(KviTalListViewItem *,const QPoint &,int))); + connect(m_pListView,TQT_SIGNAL(currentChanged(KviTalListViewItem *)),this,TQT_SLOT(currentItemChanged(KviTalListViewItem *))); + connect(m_pListView,TQT_SIGNAL(rightButtonPressed(KviTalListViewItem *,const TQPoint &,int)), + this,TQT_SLOT(itemPressed(KviTalListViewItem *,const TQPoint &,int))); } -void KviPopupEditor::itemPressed(KviTalListViewItem *it,const QPoint &pnt,int col) +void KviPopupEditor::itemPressed(KviTalListViewItem *it,const TQPoint &pnt,int col) { __range_valid(m_bOneTimeSetupDone); m_pContextPopup->clear(); @@ -1097,20 +1097,20 @@ void KviPopupEditor::itemPressed(KviTalListViewItem *it,const QPoint &pnt,int co m_pContextPopup->insertItem( *(g_pIconManager->getSmallIcon(KVI_SMALLICON_POPUP)), __tr2qs("&New Popup"), - this,SLOT(newPopup())); + this,TQT_SLOT(newPopup())); m_pContextPopup->setItemEnabled( m_pContextPopup->insertItem( - *(g_pIconManager->getSmallIcon(KVI_SMALLICON_QUIT)), + *(g_pIconManager->getSmallIcon(KVI_SMALLICON_TQUIT)), __tr2qs("Re&move Popup"), - this,SLOT(removeCurrentPopup())), + this,TQT_SLOT(removeCurrentPopup())), it); m_pContextPopup->setItemEnabled( m_pContextPopup->insertItem( *(g_pIconManager->getSmallIcon(KVI_SMALLICON_FOLDER)), __tr2qs("&Export Popup To..."), - this,SLOT(exportCurrentPopup())), + this,TQT_SLOT(exportCurrentPopup())), it); m_pContextPopup->popup(pnt); @@ -1123,21 +1123,21 @@ void KviPopupEditor::exportCurrentPopup() saveLastEditedItem(); if(!m_pLastEditedItem)return; - QString szName = QDir::homeDirPath(); - if(!szName.endsWith(QString(KVI_PATH_SEPARATOR)))szName += KVI_PATH_SEPARATOR; + TQString szName = TQDir::homeDirPath(); + if(!szName.endsWith(TQString(KVI_PATH_SEPARATOR)))szName += KVI_PATH_SEPARATOR; szName += m_pLastEditedItem->popup()->name(); szName += ".kvs"; - QString szFile; + TQString szFile; if(!KviFileDialog::askForSaveFileName(szFile,__tr2qs("Choose a Filename - KVIrc"),szName,"*.kvs",true,true,true))return; - QString szOut; + TQString szOut; m_pLastEditedItem->popup()->generateDefPopup(szOut); if(!KviFileUtils::writeFile(szFile,szOut)) { - QMessageBox::warning(this,__tr2qs("Write Failed - KVIrc"),__tr2qs("Unable to write to the popup file."),__tr2qs("Ok")); + TQMessageBox::warning(this,__tr2qs("Write Failed - KVIrc"),__tr2qs("Unable to write to the popup file."),__tr2qs("Ok")); } } @@ -1159,7 +1159,7 @@ void KviPopupEditor::exportPopups(bool bSelectedOnly) KviMenuListViewItem * it = (KviMenuListViewItem *)m_pListView->firstChild(); - QString out; + TQString out; int count=0; KviTalListViewItemIterator itv( m_pListView ); @@ -1168,7 +1168,7 @@ void KviPopupEditor::exportPopups(bool bSelectedOnly) if ( (itv.current()->isSelected()) || (bSelectedOnly == true) ) { count ++; - QString tmp; + TQString tmp; it->popup()->generateDefPopup(tmp); out += tmp; out += "\n"; @@ -1178,17 +1178,17 @@ void KviPopupEditor::exportPopups(bool bSelectedOnly) } if (!count && bSelectedOnly==false) return; - QString szName = QDir::homeDirPath(); - if(!szName.endsWith(QString(KVI_PATH_SEPARATOR)))szName += KVI_PATH_SEPARATOR; + TQString szName = TQDir::homeDirPath(); + if(!szName.endsWith(TQString(KVI_PATH_SEPARATOR)))szName += KVI_PATH_SEPARATOR; szName += "popups.kvs"; - QString szFile; + TQString szFile; if(!KviFileDialog::askForSaveFileName(szFile,__tr2qs("Choose a Filename - KVIrc"),szName,"*.kvs",true,true,true))return; if(!KviFileUtils::writeFile(szFile,out)) { - QMessageBox::warning(this,__tr2qs("Write Failed - KVIrc"),__tr2qs("Unable to write to the alias file."),__tr2qs("Ok")); + TQMessageBox::warning(this,__tr2qs("Write Failed - KVIrc"),__tr2qs("Unable to write to the alias file."),__tr2qs("Ok")); } } @@ -1206,7 +1206,7 @@ void KviPopupEditor::removeCurrentPopup() void KviPopupEditor::newPopup() { - QString newName; + TQString newName; getUniquePopupName(0,newName); KviMenuListViewItem * it = new KviMenuListViewItem(m_pListView,new KviKvsPopupMenu(newName)); m_pListView->setCurrentItem(it); @@ -1217,9 +1217,9 @@ void KviPopupEditor::saveLastEditedItem() if(m_pLastEditedItem == 0)return; KviKvsPopupMenu * m = m_pEditor->getMenu(); - QString tmp = m->popupName(); - QString old = m_pLastEditedItem->m_pPopup->popupName(); - if(!KviQString::equalCI(tmp,old)) + TQString tmp = m->popupName(); + TQString old = m_pLastEditedItem->m_pPopup->popupName(); + if(!KviTQString::equalCI(tmp,old)) { getUniquePopupName(m_pLastEditedItem,tmp); m->setPopupName(tmp); @@ -1238,10 +1238,10 @@ void KviPopupEditor::currentItemChanged(KviTalListViewItem *it) m_pEditor->edit(m_pLastEditedItem); } -void KviPopupEditor::showEvent(QShowEvent *e) +void KviPopupEditor::showEvent(TQShowEvent *e) { oneTimeSetup(); - QWidget::showEvent(e); + TQWidget::showEvent(e); } void KviPopupEditor::commit() @@ -1255,7 +1255,7 @@ void KviPopupEditor::commit() KviMenuListViewItem * it = (KviMenuListViewItem *)m_pListView->firstChild(); // Copy the original popup dict - KviPointerHashTable copy(*(KviKvsPopupManager::instance()->popupDict())); + KviPointerHashTable copy(*(KviKvsPopupManager::instance()->popupDict())); copy.setAutoDelete(false); while(it) @@ -1270,7 +1270,7 @@ void KviPopupEditor::commit() // the remaining elements in the copy need to be removed from // the "new" dictionary (they are no longer used) - KviPointerHashTableIterator iter(copy); + KviPointerHashTableIterator iter(copy); while(iter.current()) { @@ -1283,12 +1283,12 @@ void KviPopupEditor::commit() } -void KviPopupEditor::getUniquePopupName(KviMenuListViewItem *item,QString &buffer) +void KviPopupEditor::getUniquePopupName(KviMenuListViewItem *item,TQString &buffer) { __range_valid(m_bOneTimeSetupDone); if(buffer.isEmpty())buffer = __tr2qs("unnamed"); - QString newName = buffer; + TQString newName = buffer; bool bFound = true; int idx = 1; @@ -1299,10 +1299,10 @@ void KviPopupEditor::getUniquePopupName(KviMenuListViewItem *item,QString &buffe for(KviMenuListViewItem * ch = (KviMenuListViewItem *)(m_pListView->firstChild());ch;ch = (KviMenuListViewItem *)ch->nextSibling()) { - if(KviQString::equalCI(newName,ch->m_pPopup->popupName()) && (ch != item)) + if(KviTQString::equalCI(newName,ch->m_pPopup->popupName()) && (ch != item)) { bFound = true; - KviQString::sprintf(newName,"%Q.%d",&buffer,idx); + KviTQString::sprintf(newName,"%Q.%d",&buffer,idx); idx++; break; } @@ -1322,21 +1322,21 @@ KviPopupEditorWindow::KviPopupEditorWindow(KviFrame * lpFrm) m_pEditor = new KviPopupEditor(this); - m_pBase = new QWidget(this); - QGridLayout * g = new QGridLayout(m_pBase,1,4,4,4); + m_pBase = new TQWidget(this); + TQGridLayout * g = new TQGridLayout(m_pBase,1,4,4,4); - QPushButton * btn = new QPushButton(__tr2qs("&OK"),m_pBase); - connect(btn,SIGNAL(clicked()),this,SLOT(okClicked())); + TQPushButton * btn = new TQPushButton(__tr2qs("&OK"),m_pBase); + connect(btn,TQT_SIGNAL(clicked()),this,TQT_SLOT(okClicked())); btn->setIconSet(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_ACCEPT))); g->addWidget(btn,0,1); - btn = new QPushButton(__tr2qs("&Apply"),m_pBase); - connect(btn,SIGNAL(clicked()),this,SLOT(applyClicked())); + btn = new TQPushButton(__tr2qs("&Apply"),m_pBase); + connect(btn,TQT_SIGNAL(clicked()),this,TQT_SLOT(applyClicked())); btn->setIconSet(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_ACCEPT))); g->addWidget(btn,0,2); - btn = new QPushButton(__tr2qs("Cancel"),m_pBase); - connect(btn,SIGNAL(clicked()),this,SLOT(cancelClicked())); + btn = new TQPushButton(__tr2qs("Cancel"),m_pBase); + connect(btn,TQT_SIGNAL(clicked()),this,TQT_SLOT(cancelClicked())); btn->setIconSet(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_DISCARD))); g->addWidget(btn,0,3); @@ -1365,14 +1365,14 @@ void KviPopupEditorWindow::cancelClicked() } -QPixmap * KviPopupEditorWindow::myIconPtr() +TQPixmap * KviPopupEditorWindow::myIconPtr() { return g_pIconManager->getSmallIcon(KVI_SMALLICON_POPUP); } -void KviPopupEditorWindow::resizeEvent(QResizeEvent *e) +void KviPopupEditorWindow::resizeEvent(TQResizeEvent *e) { - int hght = m_pBase->sizeHint().height(); + int hght = m_pBase->tqsizeHint().height(); m_pEditor->setGeometry(0,0,width(),height()- hght); m_pBase->setGeometry(0,height() - hght,width(),hght); } @@ -1381,9 +1381,9 @@ void KviPopupEditorWindow::fillCaptionBuffers() { m_szPlainTextCaption = __tr2qs("Popup Editor"); - static QString p1(""); - static QString p3(""); + static TQString p1(""); + static TQString p3(""); m_szHtmlActiveCaption = p1; m_szHtmlActiveCaption += KVI_OPTION_COLOR(KviOption_colorCaptionTextActive).name(); @@ -1421,7 +1421,7 @@ void KviPopupEditorWindow::loadProperties(KviConfig *cfg) { /* #ifdef COMPILE_SCRIPTTOOLBAR - QValueList def; + TQValueList def; def.append(20); def.append(80); m_pEditor->setSizes(cfg->readIntListEntry("Sizes",def)); diff --git a/src/modules/popupeditor/popupeditor.h b/src/modules/popupeditor/popupeditor.h index 3560ffa7..5c4ce209 100644 --- a/src/modules/popupeditor/popupeditor.h +++ b/src/modules/popupeditor/popupeditor.h @@ -26,11 +26,11 @@ #include "kvi_string.h" -#include +#include #include "kvi_tal_listview.h" -#include +#include #include "kvi_tal_popupmenu.h" -#include +#include class KviKvsPopupMenu; class KviKvsPopupMenuItem; @@ -42,22 +42,22 @@ public: enum Type { Item , Menu , Separator , Label , Epilogue , Prologue , ExtMenu }; public: KviPopupListViewItem(KviTalListView * pListView,KviPopupListViewItem * after,Type t); - KviPopupListViewItem(KviPopupListViewItem * parent,KviPopupListViewItem * after,Type t); + KviPopupListViewItem(KviPopupListViewItem * tqparent,KviPopupListViewItem * after,Type t); public: Type m_type; - QString m_szText; - QString m_szCondition; - QString m_szIcon; - QString m_szCode; - QString m_szId; + TQString m_szText; + TQString m_szCondition; + TQString m_szIcon; + TQString m_szCode; + TQString m_szId; private: void init(); public: - void setItemText(const QString & szText); - void setCondition(const QString & szCondition); - void setIcon(const QString & szIcon); - void setCode(const QString & szCode); - void setId(const QString & szId); + void setItemText(const TQString & szText); + void setCondition(const TQString & szCondition); + void setIcon(const TQString & szIcon); + void setCode(const TQString & szCode); + void setId(const TQString & szId); }; @@ -66,25 +66,26 @@ class KviScriptEditor; class KviMenuListViewItem; -class KviSinglePopupEditor : public QWidget +class KviSinglePopupEditor : public TQWidget { Q_OBJECT + TQ_OBJECT public: - KviSinglePopupEditor(QWidget * par); + KviSinglePopupEditor(TQWidget * par); ~KviSinglePopupEditor(); protected: - QPushButton * m_pMenuButton; + TQPushButton * m_pMenuButton; KviKvsPopupMenu * m_pClipboard; KviKvsPopupMenu * m_pTestPopup; KviPopupListViewItem * m_pLastSelectedItem; KviTalListView * m_pListView; - QLineEdit * m_pNameEditor; + TQLineEdit * m_pNameEditor; KviScriptEditor * m_pEditor; - QLineEdit * m_pTextEditor; - QLineEdit * m_pIdEditor; - QLineEdit * m_pIconEditor; - QLineEdit * m_pConditionEditor; - QLineEdit * m_pExtNameEditor; + TQLineEdit * m_pTextEditor; + TQLineEdit * m_pIdEditor; + TQLineEdit * m_pIconEditor; + TQLineEdit * m_pConditionEditor; + TQLineEdit * m_pExtNameEditor; KviTalPopupMenu * m_pContextPopup; public: void edit(KviMenuListViewItem * it); @@ -126,7 +127,7 @@ protected slots: void contextNewPrologue(); void contextNewEpilogue(); void selectionChanged(KviTalListViewItem * it); - void itemPressed(KviTalListViewItem *it,const QPoint &pnt,int col); + void itemPressed(KviTalListViewItem *it,const TQPoint &pnt,int col); void testPopup(); void testModeMenuItemClicked(KviKvsPopupMenuItem * it); }; @@ -147,11 +148,12 @@ public: }; -class KviPopupEditor : public QWidget +class KviPopupEditor : public TQWidget { Q_OBJECT + TQ_OBJECT public: - KviPopupEditor(QWidget * par); + KviPopupEditor(TQWidget * par); ~KviPopupEditor(); public: KviSinglePopupEditor * m_pEditor; @@ -169,14 +171,14 @@ protected slots: void exportSelected(); void exportCurrentPopup(); void removeCurrentPopup(); - void itemPressed(KviTalListViewItem *it,const QPoint &pnt,int col); + void itemPressed(KviTalListViewItem *it,const TQPoint &pnt,int col); protected: - void showEvent(QShowEvent *e); - void getExportPopupBuffer(QString &buffer,KviMenuListViewItem * it); + void showEvent(TQShowEvent *e); + void getExportPopupBuffer(TQString &buffer,KviMenuListViewItem * it); private: void oneTimeSetup(); void saveLastEditedItem(); - void getUniquePopupName(KviMenuListViewItem * it,QString &buffer); + void getUniquePopupName(KviMenuListViewItem * it,TQString &buffer); }; @@ -184,16 +186,17 @@ private: class KviPopupEditorWindow : public KviWindow { Q_OBJECT + TQ_OBJECT public: KviPopupEditorWindow(KviFrame * lpFrm); ~KviPopupEditorWindow(); protected: KviPopupEditor * m_pEditor; - QWidget * m_pBase; + TQWidget * m_pBase; protected: - virtual QPixmap * myIconPtr(); + virtual TQPixmap * myIconPtr(); virtual void fillCaptionBuffers(); - virtual void resizeEvent(QResizeEvent *e); + virtual void resizeEvent(TQResizeEvent *e); virtual void getConfigGroupName(KviStr &szName); virtual void saveProperties(KviConfig *); virtual void loadProperties(KviConfig *); diff --git a/src/modules/raweditor/raweditor.cpp b/src/modules/raweditor/raweditor.cpp index 72b3888b..662dc371 100644 --- a/src/modules/raweditor/raweditor.cpp +++ b/src/modules/raweditor/raweditor.cpp @@ -36,14 +36,14 @@ #include "kvi_kvs_eventmanager.h" #include "kvi_kvs_eventhandler.h" -#include -#include -#include +#include +#include +#include #include "kvi_tal_vbox.h" #include "kvi_tal_popupmenu.h" -#include -#include -#include +#include +#include +#include extern KviRawEditorWindow * g_pRawEditorWindow; @@ -58,27 +58,27 @@ KviRawListViewItem::KviRawListViewItem(KviTalListView *par,int idx) if(idx < 10)m_szName.prepend('0'); }; -const QPixmap * KviRawListViewItem::pixmap(int col) const +const TQPixmap * KviRawListViewItem::pixmap(int col) const { return g_pIconManager->getSmallIcon(firstChild() ? KVI_SMALLICON_RAWEVENT : KVI_SMALLICON_RAWEVENTNOHANDLERS); } -const QPixmap * KviRawHandlerListViewItem::pixmap(int col) const +const TQPixmap * KviRawHandlerListViewItem::pixmap(int col) const { return g_pIconManager->getSmallIcon(m_bEnabled ? KVI_SMALLICON_HANDLER : KVI_SMALLICON_HANDLERDISABLED); } -KviRawEditor::KviRawEditor(QWidget * par) -: QWidget(par,"raw_event_editor") +KviRawEditor::KviRawEditor(TQWidget * par) +: TQWidget(par,"raw_event_editor") { - QGridLayout * l = new QGridLayout(this,1,1,2,2); + TQGridLayout * l = new TQGridLayout(this,1,1,2,2); #ifdef COMPILE_USE_QT4 - QSplitter * spl = new QSplitter(Qt::Horizontal,this,"raweditorv"); + TQSplitter * spl = new TQSplitter(Qt::Horizontal,this,"raweditorv"); spl->setOpaqueResize(false); #else - QSplitter * spl = new QSplitter(QSplitter::Horizontal,this); + TQSplitter * spl = new TQSplitter(Qt::Horizontal,this); #endif l->addWidget(spl,0,0); @@ -89,12 +89,12 @@ KviRawEditor::KviRawEditor(QWidget * par) m_pListView->setShowSortIndicator(true); m_pListView->setRootIsDecorated(true); - QPushButton * pb = new QPushButton(__tr2qs("&Export All To..."),boxi); - connect(pb,SIGNAL(clicked()),this,SLOT(exportAllEvents())); + TQPushButton * pb = new TQPushButton(__tr2qs("&Export All To..."),boxi); + connect(pb,TQT_SIGNAL(clicked()),this,TQT_SLOT(exportAllEvents())); KviTalVBox * box = new KviTalVBox(spl); - m_pNameEditor = new QLineEdit(box); - QToolTip::add(m_pNameEditor,__tr2qs("Edit the raw event handler name.")); + m_pNameEditor = new TQLineEdit(box); + TQToolTip::add(m_pNameEditor,__tr2qs("Edit the raw event handler name.")); m_pEditor = KviScriptEditor::createInstance(box); m_bOneTimeSetupDone = false; @@ -135,41 +135,41 @@ void KviRawEditor::oneTimeSetup() m_pContextPopup = new KviTalPopupMenu(this); - connect(m_pListView,SIGNAL(selectionChanged(KviTalListViewItem *)),this,SLOT(selectionChanged(KviTalListViewItem *))); - connect(m_pListView,SIGNAL(rightButtonPressed(KviTalListViewItem *,const QPoint &,int)), - this,SLOT(itemPressed(KviTalListViewItem *,const QPoint &,int))); + connect(m_pListView,TQT_SIGNAL(selectionChanged(KviTalListViewItem *)),this,TQT_SLOT(selectionChanged(KviTalListViewItem *))); + connect(m_pListView,TQT_SIGNAL(rightButtonPressed(KviTalListViewItem *,const TQPoint &,int)), + this,TQT_SLOT(itemPressed(KviTalListViewItem *,const TQPoint &,int))); } -void KviRawEditor::itemPressed(KviTalListViewItem *it,const QPoint &pnt,int col) +void KviRawEditor::itemPressed(KviTalListViewItem *it,const TQPoint &pnt,int col) { __range_valid(m_bOneTimeSetupDone); m_pContextPopup->clear(); if(it) { - if(it->parent()) + if(it->tqparent()) { if(!(((KviRawHandlerListViewItem *)it)->m_bEnabled)) m_pContextPopup->insertItem( *(g_pIconManager->getSmallIcon(KVI_SMALLICON_HANDLER)), - __tr2qs("&Enable Handler"),this,SLOT(toggleCurrentHandlerEnabled())); + __tr2qs("&Enable Handler"),this,TQT_SLOT(toggleCurrentHandlerEnabled())); else m_pContextPopup->insertItem( *(g_pIconManager->getSmallIcon(KVI_SMALLICON_HANDLERDISABLED)), - __tr2qs("&Disable Handler"),this,SLOT(toggleCurrentHandlerEnabled())); + __tr2qs("&Disable Handler"),this,TQT_SLOT(toggleCurrentHandlerEnabled())); m_pContextPopup->insertItem( - *(g_pIconManager->getSmallIcon(KVI_SMALLICON_QUIT)), + *(g_pIconManager->getSmallIcon(KVI_SMALLICON_TQUIT)), __tr2qs("Re&move Handler"), - this,SLOT(removeCurrentHandler())); + this,TQT_SLOT(removeCurrentHandler())); m_pContextPopup->insertItem( *(g_pIconManager->getSmallIcon(KVI_SMALLICON_FOLDER)), __tr2qs("&Export Handler To..."), - this,SLOT(exportCurrentHandler())); + this,TQT_SLOT(exportCurrentHandler())); } else { m_pContextPopup->insertItem( *(g_pIconManager->getSmallIcon(KVI_SMALLICON_HANDLER)), __tr2qs("&New Handler"), - this,SLOT(addHandlerForCurrentRaw())); + this,TQT_SLOT(addHandlerForCurrentRaw())); } } @@ -177,16 +177,16 @@ void KviRawEditor::itemPressed(KviTalListViewItem *it,const QPoint &pnt,int col) m_pContextPopup->insertItem( *(g_pIconManager->getSmallIcon(KVI_SMALLICON_RAWEVENT)), __tr2qs("&Add Raw Event..."), - this,SLOT(addRaw())); + this,TQT_SLOT(addRaw())); m_pContextPopup->popup(pnt); } -void KviRawEditor::getUniqueHandlerName(KviRawListViewItem *it,QString &buffer) +void KviRawEditor::getUniqueHandlerName(KviRawListViewItem *it,TQString &buffer) { __range_valid(m_bOneTimeSetupDone); - QString newName = buffer; + TQString newName = buffer; if(newName.isEmpty())newName = __tr2qs("unnamed"); bool bFound = true; @@ -198,10 +198,10 @@ void KviRawEditor::getUniqueHandlerName(KviRawListViewItem *it,QString &buffer) for(KviRawHandlerListViewItem * ch = (KviRawHandlerListViewItem *)(it->firstChild());ch;ch = (KviRawHandlerListViewItem *)ch->nextSibling()) { - if(KviQString::equalCI(newName,ch->m_szName)) + if(KviTQString::equalCI(newName,ch->m_szName)) { bFound = true; - KviQString::sprintf(newName,"%Q_%d",&buffer,idx); + KviTQString::sprintf(newName,"%TQ_%d",&buffer,idx); idx++; break; } @@ -216,7 +216,7 @@ void KviRawEditor::addRaw() { bool bOk = false; - int iIdx = QInputDialog::getInteger(__tr2qs("New Raw Event"),__tr2qs("Enter the numeric code of the message (0-999)"),0,0,999,1,&bOk,this); + int iIdx = TQInputDialog::getInteger(__tr2qs("New Raw Event"),__tr2qs("Enter the numeric code of the message (0-999)"),0,0,999,1,&bOk,this); if(!bOk)return; @@ -245,9 +245,9 @@ void KviRawEditor::addHandlerForCurrentRaw() KviTalListViewItem * it = m_pListView->selectedItem(); if(it) { - if(it->parent() == 0) + if(it->tqparent() == 0) { - QString buffer = __tr2qs("default"); + TQString buffer = __tr2qs("default"); getUniqueHandlerName((KviRawListViewItem *)it,buffer); KviTalListViewItem * ch = new KviRawHandlerListViewItem(it,buffer,"",true); it->setOpen(true); @@ -275,7 +275,7 @@ void KviRawEditor::toggleCurrentHandlerEnabled() if(m_pLastEditedItem) { m_pLastEditedItem->m_bEnabled = !(m_pLastEditedItem->m_bEnabled); - m_pListView->repaintItem(m_pLastEditedItem); + m_pListView->tqrepaintItem(m_pLastEditedItem); selectionChanged(m_pLastEditedItem); } } @@ -290,11 +290,11 @@ void KviRawEditor::commit() { if(it->firstChild()) { - QString szContext; + TQString szContext; for(KviTalListViewItem * ch = it->firstChild();ch;ch = ch->nextSibling()) { - KviQString::sprintf(szContext,"RawEvent%d::%Q",&(((KviRawListViewItem *)it)->m_iIdx),&(((KviRawHandlerListViewItem *)ch)->m_szName)); + KviTQString::sprintf(szContext,"RawEvent%d::%Q",&(((KviRawListViewItem *)it)->m_iIdx),&(((KviRawHandlerListViewItem *)ch)->m_szName)); KviKvsScriptEventHandler * s = new KviKvsScriptEventHandler( ((KviRawHandlerListViewItem *)ch)->m_szName, szContext, @@ -315,14 +315,14 @@ void KviRawEditor::saveLastEditedItem() __range_valid(m_bOneTimeSetupDone); if(!m_pLastEditedItem)return; - QString buffer = m_pNameEditor->text(); - if(!KviQString::equalCI(buffer,m_pLastEditedItem->m_szName)) + TQString buffer = m_pNameEditor->text(); + if(!KviTQString::equalCI(buffer,m_pLastEditedItem->m_szName)) { - getUniqueHandlerName((KviRawListViewItem *)(m_pLastEditedItem->parent()),buffer); + getUniqueHandlerName((KviRawListViewItem *)(m_pLastEditedItem->tqparent()),buffer); } m_pLastEditedItem->m_szName = buffer; - QString tmp; + TQString tmp; m_pEditor->getText(tmp); m_pLastEditedItem->m_szBuffer = tmp; @@ -332,7 +332,7 @@ void KviRawEditor::selectionChanged(KviTalListViewItem * it) { __range_valid(m_bOneTimeSetupDone); saveLastEditedItem(); - if(it->parent()) + if(it->tqparent()) { m_pLastEditedItem = (KviRawHandlerListViewItem *)it; m_pNameEditor->setEnabled(true); @@ -347,22 +347,22 @@ void KviRawEditor::selectionChanged(KviTalListViewItem * it) } } -void KviRawEditor::showEvent(QShowEvent *e) +void KviRawEditor::showEvent(TQShowEvent *e) { oneTimeSetup(); - QWidget::showEvent(e); + TQWidget::showEvent(e); } -void KviRawEditor::getExportEventBuffer(QString &buffer,KviRawHandlerListViewItem * it) +void KviRawEditor::getExportEventBuffer(TQString &buffer,KviRawHandlerListViewItem * it) { - if(!it->parent())return; + if(!it->tqparent())return; - QString szBuf = it->m_szBuffer; + TQString szBuf = it->m_szBuffer; KviCommandFormatter::blockFromBuffer(szBuf); buffer = "event("; - buffer += ((KviRawListViewItem *)(it->parent()))->m_szName; + buffer += ((KviRawListViewItem *)(it->tqparent()))->m_szName; buffer += ","; buffer += it->m_szName; buffer += ")\n"; @@ -373,7 +373,7 @@ void KviRawEditor::getExportEventBuffer(QString &buffer,KviRawHandlerListViewIte { buffer += "\n"; buffer += "eventctl -d "; - buffer += ((KviRawListViewItem *)(it->parent()))->m_szName; + buffer += ((KviRawListViewItem *)(it->tqparent()))->m_szName; buffer += " "; buffer += it->m_szName; } @@ -385,24 +385,24 @@ void KviRawEditor::exportCurrentHandler() saveLastEditedItem(); if(!m_pLastEditedItem)return; - QString szName = QDir::homeDirPath(); - if(!szName.endsWith(QString(KVI_PATH_SEPARATOR)))szName += KVI_PATH_SEPARATOR; + TQString szName = TQDir::homeDirPath(); + if(!szName.endsWith(TQString(KVI_PATH_SEPARATOR)))szName += KVI_PATH_SEPARATOR; szName += "raw"; - szName += ((KviRawListViewItem *)(m_pLastEditedItem->parent()))->m_szName; + szName += ((KviRawListViewItem *)(m_pLastEditedItem->tqparent()))->m_szName; szName += "."; szName += m_pLastEditedItem->m_szName; szName += ".kvs"; - QString szFile; + TQString szFile; if(!KviFileDialog::askForSaveFileName(szFile,__tr2qs("Choose a Filename - KVIrc"),szName,"*.kvs",true,true,true))return; - QString szOut; + TQString szOut; getExportEventBuffer(szOut,m_pLastEditedItem); if(!KviFileUtils::writeFile(szFile,szOut)) { - QMessageBox::warning(this,__tr2qs("Write Failed - KVIrc"),__tr2qs("Unable to write to the raw event file."),__tr2qs("&OK")); + TQMessageBox::warning(this,__tr2qs("Write Failed - KVIrc"),__tr2qs("Unable to write to the raw event file."),__tr2qs("&OK")); } } @@ -412,14 +412,14 @@ void KviRawEditor::exportAllEvents() KviRawListViewItem * it = (KviRawListViewItem *)m_pListView->firstChild(); - QString out; + TQString out; while(it) { KviRawHandlerListViewItem * item = (KviRawHandlerListViewItem *)it->firstChild(); while(item) { - QString tmp; + TQString tmp; getExportEventBuffer(tmp,item); out += tmp; out += "\n"; @@ -428,17 +428,17 @@ void KviRawEditor::exportAllEvents() it = (KviRawListViewItem *)it->nextSibling(); } - QString szName = QDir::homeDirPath(); - if(!szName.endsWith(QString(KVI_PATH_SEPARATOR)))szName += KVI_PATH_SEPARATOR; + TQString szName = TQDir::homeDirPath(); + if(!szName.endsWith(TQString(KVI_PATH_SEPARATOR)))szName += KVI_PATH_SEPARATOR; szName += "rawevents.kvs"; - QString szFile; + TQString szFile; if(!KviFileDialog::askForSaveFileName(szFile,__tr2qs("Choose a Filename - KVIrc"),szName,"*.kvs",true,true,true))return; if(!KviFileUtils::writeFile(szFile,out)) { - QMessageBox::warning(this,__tr2qs("Write Failed - KVIrc"),__tr2qs("Unable to write to the raw events file."),__tr2qs("Ok")); + TQMessageBox::warning(this,__tr2qs("Write Failed - KVIrc"),__tr2qs("Unable to write to the raw events file."),__tr2qs("Ok")); } } @@ -452,21 +452,21 @@ KviRawEditorWindow::KviRawEditorWindow(KviFrame * lpFrm) m_pEditor = new KviRawEditor(this); - m_pBase = new QWidget(this); - QGridLayout * g = new QGridLayout(m_pBase,1,4,4,4); + m_pBase = new TQWidget(this); + TQGridLayout * g = new TQGridLayout(m_pBase,1,4,4,4); - QPushButton * btn = new QPushButton(__tr2qs("&OK"),m_pBase); - connect(btn,SIGNAL(clicked()),this,SLOT(okClicked())); + TQPushButton * btn = new TQPushButton(__tr2qs("&OK"),m_pBase); + connect(btn,TQT_SIGNAL(clicked()),this,TQT_SLOT(okClicked())); btn->setIconSet(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_ACCEPT))); g->addWidget(btn,0,1); - btn = new QPushButton(__tr2qs("&Apply"),m_pBase); - connect(btn,SIGNAL(clicked()),this,SLOT(applyClicked())); + btn = new TQPushButton(__tr2qs("&Apply"),m_pBase); + connect(btn,TQT_SIGNAL(clicked()),this,TQT_SLOT(applyClicked())); btn->setIconSet(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_ACCEPT))); g->addWidget(btn,0,2); - btn = new QPushButton(__tr2qs("Cancel"),m_pBase); - connect(btn,SIGNAL(clicked()),this,SLOT(cancelClicked())); + btn = new TQPushButton(__tr2qs("Cancel"),m_pBase); + connect(btn,TQT_SIGNAL(clicked()),this,TQT_SLOT(cancelClicked())); btn->setIconSet(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_DISCARD))); g->addWidget(btn,0,3); @@ -495,14 +495,14 @@ void KviRawEditorWindow::cancelClicked() } -QPixmap * KviRawEditorWindow::myIconPtr() +TQPixmap * KviRawEditorWindow::myIconPtr() { return g_pIconManager->getSmallIcon(KVI_SMALLICON_RAWEVENT); } -void KviRawEditorWindow::resizeEvent(QResizeEvent *e) +void KviRawEditorWindow::resizeEvent(TQResizeEvent *e) { - int hght = m_pBase->sizeHint().height(); + int hght = m_pBase->tqsizeHint().height(); m_pEditor->setGeometry(0,0,width(),height()- hght); m_pBase->setGeometry(0,height() - hght,width(),hght); } @@ -511,9 +511,9 @@ void KviRawEditorWindow::fillCaptionBuffers() { m_szPlainTextCaption = __tr2qs("Raw Editor"); - static QString p1(""); - static QString p3(""); + static TQString p1(""); + static TQString p3(""); m_szHtmlActiveCaption = p1; m_szHtmlActiveCaption += KVI_OPTION_COLOR(KviOption_colorCaptionTextActive).name(); @@ -551,7 +551,7 @@ void KviRawEditorWindow::loadProperties(KviConfig *cfg) { /* #ifdef COMPILE_SCRIPTTOOLBAR - QValueList def; + TQValueList def; def.append(20); def.append(80); m_pEditor->setSizes(cfg->readIntListEntry("Sizes",def)); diff --git a/src/modules/raweditor/raweditor.h b/src/modules/raweditor/raweditor.h index 7adf2213..349399b4 100644 --- a/src/modules/raweditor/raweditor.h +++ b/src/modules/raweditor/raweditor.h @@ -25,9 +25,9 @@ #include "kvi_window.h" #include "kvi_qstring.h" -#include +#include #include "kvi_tal_listview.h" -#include +#include class KviScriptEditor; @@ -35,52 +35,53 @@ class KviRawListViewItem : public KviTalListViewItem { public: int m_iIdx; - QString m_szName; + TQString m_szName; public: KviRawListViewItem(KviTalListView * par,int idx); ~KviRawListViewItem() {}; public: - virtual QString text(int col) const { return m_szName; }; - virtual const QPixmap * pixmap(int col) const; + virtual TQString text(int col) const { return m_szName; }; + virtual const TQPixmap * pixmap(int col) const; }; class KviRawHandlerListViewItem : public KviTalListViewItem { public: - KviRawHandlerListViewItem(KviTalListViewItem * par,const QString & name,const QString & buffer,bool bEnabled) + KviRawHandlerListViewItem(KviTalListViewItem * par,const TQString & name,const TQString & buffer,bool bEnabled) : KviTalListViewItem(par), m_szName(name) , m_szBuffer(buffer) , m_bEnabled(bEnabled) {}; ~KviRawHandlerListViewItem() {}; public: - QString m_szName; - QString m_szBuffer; + TQString m_szName; + TQString m_szBuffer; bool m_bEnabled; - virtual QString text(int col) const { return m_szName; }; - virtual const QPixmap * pixmap(int col) const; + virtual TQString text(int col) const { return m_szName; }; + virtual const TQPixmap * pixmap(int col) const; }; class KviTalPopupMenu; -class KviRawEditor : public QWidget +class KviRawEditor : public TQWidget { Q_OBJECT + TQ_OBJECT public: - KviRawEditor(QWidget * par); + KviRawEditor(TQWidget * par); ~KviRawEditor(); public: KviScriptEditor * m_pEditor; KviTalListView * m_pListView; - QLineEdit * m_pNameEditor; + TQLineEdit * m_pNameEditor; KviTalPopupMenu * m_pContextPopup; KviRawHandlerListViewItem * m_pLastEditedItem; bool m_bOneTimeSetupDone; public: void commit(); void saveLastEditedItem(); - void getUniqueHandlerName(KviRawListViewItem *it,QString &buffer); - void getExportEventBuffer(QString &szBuffer,KviRawHandlerListViewItem * it); + void getUniqueHandlerName(KviRawListViewItem *it,TQString &buffer); + void getExportEventBuffer(TQString &szBuffer,KviRawHandlerListViewItem * it); protected slots: void selectionChanged(KviTalListViewItem *it); - void itemPressed(KviTalListViewItem *it,const QPoint &pnt,int col); + void itemPressed(KviTalListViewItem *it,const TQPoint &pnt,int col); void toggleCurrentHandlerEnabled(); void removeCurrentHandler(); void addHandlerForCurrentRaw(); @@ -88,7 +89,7 @@ protected slots: void exportAllEvents(); void exportCurrentHandler(); protected: - void showEvent(QShowEvent *e); + void showEvent(TQShowEvent *e); private: void oneTimeSetup(); }; @@ -96,16 +97,17 @@ private: class KviRawEditorWindow : public KviWindow { Q_OBJECT + TQ_OBJECT public: KviRawEditorWindow(KviFrame * lpFrm); ~KviRawEditorWindow(); protected: KviRawEditor * m_pEditor; - QWidget * m_pBase; + TQWidget * m_pBase; protected: - virtual QPixmap * myIconPtr(); + virtual TQPixmap * myIconPtr(); virtual void fillCaptionBuffers(); - virtual void resizeEvent(QResizeEvent *e); + virtual void resizeEvent(TQResizeEvent *e); virtual void getConfigGroupName(KviStr &szName); virtual void saveProperties(KviConfig *); virtual void loadProperties(KviConfig *); diff --git a/src/modules/regchan/libkviregchan.cpp b/src/modules/regchan/libkviregchan.cpp index eaa53268..4af15128 100644 --- a/src/modules/regchan/libkviregchan.cpp +++ b/src/modules/regchan/libkviregchan.cpp @@ -46,10 +46,10 @@ extern KVIRC_API KviRegisteredChannelDataBase * g_pRegisteredChannelDataBase; @short: Registers a channel @syntax: - regchan.add [netmask:string] + regchan.add [nettqmask:string] @description: - Registers the with the specified [netmask]. - [netmask] can be a full network name or a wildcard string + Registers the with the specified [nettqmask]. + [nettqmask] can be a full network name or a wildcard string tht will be matched against network names. For example, if you want to register #kvirc on IRCNet you can use regchan.add #kvirc IRCNet. @@ -57,7 +57,7 @@ extern KVIRC_API KviRegisteredChannelDataBase * g_pRegisteredChannelDataBase; you can use regchan.add #kvirc *[br] Obviously if you register both #kvirc/IRCNet and #kvirc/* then #kvirc/IRCNet will be looked first. - If netmask is not passed a netmask of * is assumed.[br] + If nettqmask is not passed a nettqmask of * is assumed.[br] @examples: [example] regchan.add #kvirc openprojects @@ -67,13 +67,13 @@ extern KVIRC_API KviRegisteredChannelDataBase * g_pRegisteredChannelDataBase; static bool regchan_kvs_cmd_add(KviKvsModuleCommandCall * c) { - QString szChan,szNetmask; + TQString szChan,szNettqmask; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("channel name",KVS_PT_NONEMPTYSTRING,0,szChan) - KVSM_PARAMETER("netmask",KVS_PT_STRING,KVS_PF_OPTIONAL,szNetmask) + KVSM_PARAMETER("nettqmask",KVS_PT_STRING,KVS_PF_OPTIONAL,szNettqmask) KVSM_PARAMETERS_END(c) - if(szNetmask.isEmpty())szNetmask="*"; - g_pRegisteredChannelDataBase->add(new KviRegisteredChannel(szChan,szNetmask)); + if(szNettqmask.isEmpty())szNettqmask="*"; + g_pRegisteredChannelDataBase->add(new KviRegisteredChannel(szChan,szNettqmask)); return true; } @@ -91,12 +91,12 @@ static bool regchan_kvs_cmd_add(KviKvsModuleCommandCall * c) regchan.remove [-q|--quiet] [-e|--exactly] @description: Unregisters the channel named that best matches - with its netmask.[br] + with its nettqmask.[br] If no match for / is found in the database then a warning is printed unless -q is used.[br] If -e is specified then is not matched against the - netmasks in the database but is compared directly. This means - that must be exactly the netmask used to register a channel. + nettqmasks in the database but is compared directly. This means + that must be exactly the nettqmask used to register a channel. @examples: [example] regchan.remove #kvirc openprojects @@ -106,19 +106,19 @@ static bool regchan_kvs_cmd_add(KviKvsModuleCommandCall * c) */ static bool regchan_kvs_cmd_remove(KviKvsModuleCommandCall * c) { - QString szChan,szNetwork; + TQString szChan,szNetwork; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("channel name",KVS_PT_NONEMPTYSTRING,0,szChan) KVSM_PARAMETER("network",KVS_PT_NONEMPTYSTRING,0,szNetwork) KVSM_PARAMETERS_END(c) KviRegisteredChannel * ch; if(c->hasSwitch('e',"exactly"))ch = g_pRegisteredChannelDataBase->findExact(szChan,szNetwork); - else ch = g_pRegisteredChannelDataBase->find(szChan,szNetwork); + else ch = g_pRegisteredChannelDataBase->tqfind(szChan,szNetwork); if(ch) { g_pRegisteredChannelDataBase->remove(ch); } else { - if(!c->hasSwitch('q',"quiet"))c->warning(__tr2qs("No such channel/netmask entry in the database")); + if(!c->hasSwitch('q',"quiet"))c->warning(__tr2qs("No such channel/nettqmask entry in the database")); } return true; } @@ -144,8 +144,8 @@ static bool regchan_kvs_cmd_remove(KviKvsModuleCommandCall * c) No warning on screen. !fn: -e|--exactly If -e is specified then is not matched against the - netmasks in the database but is compared directly. This means - that must be exactly the netmask used to register a channel. + nettqmasks in the database but is compared directly. This means + that must be exactly the nettqmask used to register a channel. @examples: [example] regchan.setproperty #kvirc openprojects autojoin true @@ -156,7 +156,7 @@ static bool regchan_kvs_cmd_remove(KviKvsModuleCommandCall * c) static bool regchan_kvs_cmd_setProperty(KviKvsModuleCommandCall * c) { - QString szChan,szNetwork,szProperty,szValue; + TQString szChan,szNetwork,szProperty,szValue; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("channel name",KVS_PT_NONEMPTYSTRING,0,szChan) KVSM_PARAMETER("network",KVS_PT_NONEMPTYSTRING,0,szNetwork) @@ -165,7 +165,7 @@ static bool regchan_kvs_cmd_setProperty(KviKvsModuleCommandCall * c) KVSM_PARAMETERS_END(c) KviRegisteredChannel * ch; if(c->hasSwitch('e',"exactly"))ch = g_pRegisteredChannelDataBase->findExact(szChan,szNetwork); - else ch = g_pRegisteredChannelDataBase->find(szChan,szNetwork); + else ch = g_pRegisteredChannelDataBase->tqfind(szChan,szNetwork); if(ch) { if(!szValue.isEmpty()) @@ -175,7 +175,7 @@ static bool regchan_kvs_cmd_setProperty(KviKvsModuleCommandCall * c) ch->removeProperty(szProperty); } } else { - if(!c->hasSwitch('q',"quiet")) c->warning(__tr2qs("No such channel/netmask entry in the database")); + if(!c->hasSwitch('q',"quiet")) c->warning(__tr2qs("No such channel/nettqmask entry in the database")); } return true; } @@ -230,11 +230,11 @@ static bool regchan_kvs_cmd_showlist(KviKvsModuleCommandCall * c) @short: Get a list of registered channels @syntax: - $regchan.list([],[]) + $regchan.list([],[]) @description: - Returns an array of the channel@netmask entries in the registered + Returns an array of the channel@nettqmask entries in the registered channels database.[br] - Please note that is a wildcard string that will match + Please note that is a wildcard string that will match wildcard strings.[br] @examples: [example] @@ -244,20 +244,20 @@ static bool regchan_kvs_cmd_showlist(KviKvsModuleCommandCall * c) static bool regchan_kvs_fnc_list(KviKvsModuleFunctionCall * c) { - QString szChan,szNetmask; + TQString szChan,szNettqmask; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("channel name",KVS_PT_STRING,KVS_PF_OPTIONAL,szChan) - KVSM_PARAMETER("netmask",KVS_PT_STRING,KVS_PF_OPTIONAL,szNetmask) + KVSM_PARAMETER("nettqmask",KVS_PT_STRING,KVS_PF_OPTIONAL,szNettqmask) KVSM_PARAMETERS_END(c) KviKvsArray* pArray = new KviKvsArray(); // KviKvsArray* pArrayCN = new KviKvsArray(); -// pArrayCN->set(0,new KviKvsVariant(QString(""))); -// pArrayCN->set(1,new KviKvsVariant(QString(""))); +// pArrayCN->set(0,new KviKvsVariant(TQString(""))); +// pArrayCN->set(1,new KviKvsVariant(TQString(""))); int aid=0; if(szChan.isEmpty())szChan="*"; - if(szNetmask.isEmpty())szNetmask="*"; + if(szNettqmask.isEmpty())szNettqmask="*"; KviPointerHashTable * d = g_pRegisteredChannelDataBase->channelDict(); KviPointerHashTableIterator it(*d); @@ -265,14 +265,14 @@ static bool regchan_kvs_fnc_list(KviKvsModuleFunctionCall * c) while(KviRegisteredChannelList * l = it.current()) { for(KviRegisteredChannel * ch = l->first();ch;ch = l->next()) - if(KviQString::matchWildExpressionsCI(ch->name().ptr(),szChan) && - KviQString::matchWildExpressionsCI(ch->netMask().ptr(),szNetmask)) + if(KviTQString::matchWildExpressionsCI(ch->name().ptr(),szChan) && + KviTQString::matchWildExpressionsCI(ch->netMask().ptr(),szNettqmask)) { -// FIXME: WE NEED TO RETURN AN ARRAY OF 2-ELEMENT ARRAYS (chan name, netmask) - pArray->set(aid,new KviKvsVariant(QString(ch->name()+"@"+ch->netMask()))); -// pArray->set(aid,new KviKvsVariant(QString(ch->name())); -// pArrayCN->set(0,new KviKvsVariant(QString(ch->name()))); -// pArrayCN->set(1,new KviKvsVariant(QString(ch->netMask()))); +// FIXME: WE NEED TO RETURN AN ARRAY OF 2-ELEMENT ARRAYS (chan name, nettqmask) + pArray->set(aid,new KviKvsVariant(TQString(ch->name()+"@"+ch->netMask()))); +// pArray->set(aid,new KviKvsVariant(TQString(ch->name())); +// pArrayCN->set(0,new KviKvsVariant(TQString(ch->name()))); +// pArrayCN->set(1,new KviKvsVariant(TQString(ch->netMask()))); // pArray->set(aid,new KviKvsVariant(pArrayCN)); aid++; } @@ -305,13 +305,13 @@ static bool regchan_kvs_fnc_list(KviKvsModuleFunctionCall * c) static bool regchan_kvs_fnc_property(KviKvsModuleFunctionCall * c) { - QString szChan,szNetwork,szPropertyName; + TQString szChan,szNetwork,szPropertyName; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("channel name",KVS_PT_STRING,0,szChan) KVSM_PARAMETER("network",KVS_PT_STRING,0,szNetwork) KVSM_PARAMETER("property name",KVS_PT_NONEMPTYSTRING,0,szPropertyName) KVSM_PARAMETERS_END(c) - KviRegisteredChannel * ch = g_pRegisteredChannelDataBase->find(szChan,szNetwork); + KviRegisteredChannel * ch = g_pRegisteredChannelDataBase->tqfind(szChan,szNetwork); if(ch) { KviStr * p = ch->property(szPropertyName); @@ -338,54 +338,54 @@ static bool regchan_kvs_fnc_property(KviKvsModuleFunctionCall * c) echo $regchan.match(#kvirc,$my.network) [/example] @seealso: - [fnc]$regchan.find[/fnc] + [fnc]$regchan.tqfind[/fnc] */ static bool regchan_kvs_fnc_match(KviKvsModuleFunctionCall * c) { - QString szChan,szNetwork; + TQString szChan,szNetwork; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("channel name",KVS_PT_STRING,0,szChan) KVSM_PARAMETER("network",KVS_PT_STRING,0,szNetwork) KVSM_PARAMETERS_END(c) - KviRegisteredChannel * ch = g_pRegisteredChannelDataBase->find(szChan,szNetwork); + KviRegisteredChannel * ch = g_pRegisteredChannelDataBase->tqfind(szChan,szNetwork); c->returnValue()->setBoolean(ch); return true; } /* - @doc: regchan.find + @doc: regchan.tqfind @type: function @title: - $regchan.find + $regchan.tqfind @short: Checks if a channel is registered @syntax: - $regchan.find(,) + $regchan.tqfind(,) @description: - Returns 1 if the channel identified by and + Returns 1 if the channel identified by and is registered and 0 otherwise. This function is similar to $regchan.match - but for $regchan.find the second parameter is the exact netmask + but for $regchan.find the second parameter is the exact nettqmask of the registered channel entry. @examples: [example] - echo $regchan.find(#kvirc,IRCNet) - echo $regchan.find(#kvirc,*) + echo $regchan.tqfind(#kvirc,IRCNet) + echo $regchan.tqfind(#kvirc,*) [/example] @seealso: [fnc]$regchan.match[/fnc] */ -static bool regchan_kvs_fnc_find(KviKvsModuleFunctionCall * c) +static bool regchan_kvs_fnc_tqfind(KviKvsModuleFunctionCall * c) { - QString szChan,szNetmask; + TQString szChan,szNettqmask; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("channel name",KVS_PT_STRING,0,szChan) - KVSM_PARAMETER("netmask",KVS_PT_STRING,0,szNetmask) + KVSM_PARAMETER("nettqmask",KVS_PT_STRING,0,szNettqmask) KVSM_PARAMETERS_END(c) - KviRegisteredChannel * ch = g_pRegisteredChannelDataBase->find(szChan,szNetmask); + KviRegisteredChannel * ch = g_pRegisteredChannelDataBase->tqfind(szChan,szNettqmask); c->returnValue()->setBoolean(ch); return true; } @@ -398,7 +398,7 @@ static bool regchan_module_init(KviModule * m) KVSM_REGISTER_SIMPLE_COMMAND(m,"setProperty",regchan_kvs_cmd_setProperty); KVSM_REGISTER_FUNCTION(m,"property",regchan_kvs_fnc_property); KVSM_REGISTER_FUNCTION(m,"match",regchan_kvs_fnc_match); - KVSM_REGISTER_FUNCTION(m,"find",regchan_kvs_fnc_find); + KVSM_REGISTER_FUNCTION(m,"tqfind",regchan_kvs_fnc_tqfind); KVSM_REGISTER_FUNCTION(m,"list",regchan_kvs_fnc_list); return true; diff --git a/src/modules/reguser/dialog.cpp b/src/modules/reguser/dialog.cpp index b8d02fe2..59c272d8 100644 --- a/src/modules/reguser/dialog.cpp +++ b/src/modules/reguser/dialog.cpp @@ -40,35 +40,35 @@ #include "kvi_stringconversion.h" #include "kvi_options.h" -#include -#include +#include +#include #ifdef COMPILE_USE_QT4 -#include -#include -#include -#include +#include +#include +#include +#include #else -#include +#include #endif #include "kvi_pointerhashtable.h" -#include -#include -#include +#include +#include +#include -#include -#include +#include +#include #include "kvi_tal_hbox.h" #include "kvi_tal_vbox.h" -#include +#include #include "wizard.h" #include "dialog.h" #ifdef COMPILE_INFO_TIPS - #include + #include #endif // COMPILE_INFO_TIPS @@ -84,8 +84,8 @@ extern KviRegisteredUsersDialog * g_pRegisteredUsersDialog; KviRegisteredUsersDialogItem::KviRegisteredUsersDialogItem(KviTalListViewItem * par,KviRegisteredUser * u) : KviRegisteredUsersDialogItemBase(User,par), m_pUser(u) { - QString szTmp; - QString t = ""; + TQString szTmp; + TQString t = ""; t += u->name(); t += " ["; szTmp = m_pUser->getProperty("notify"); @@ -108,7 +108,7 @@ KviRegisteredUsersDialogItem::KviRegisteredUsersDialogItem(KviTalListViewItem * t += m_pUser->getProperty("comment"); } t += "
"; - m_pText = new QSimpleRichText(t,listView()->font()); + m_pText = new TQSimpleRichText(t,listView()->font()); //setText(0,u->name()); } @@ -118,27 +118,27 @@ KviRegisteredUsersDialogItem::~KviRegisteredUsersDialogItem() delete m_pText; } -QString KviRegisteredUsersDialogItem::key(int,bool) const +TQString KviRegisteredUsersDialogItem::key(int,bool) const { return m_pUser->name(); } -void KviRegisteredUsersDialogItem::paintCell(QPainter * p,const QColorGroup &cg,int column,int width,int align) +void KviRegisteredUsersDialogItem::paintCell(TQPainter * p,const TQColorGroup &cg,int column,int width,int align) { KviTalListViewItem::paintCell(p,cg,column,width,align); if(column==0) { - p->drawPixmap(LVI_BORDER,LVI_BORDER, *(g_pIconManager->getBigIcon(QString(KVI_BIGICON_REGUSERS))) ); + p->drawPixmap(LVI_BORDER,LVI_BORDER, *(g_pIconManager->getBigIcon(TQString(KVI_BIGICON_REGUSERS))) ); int afterIcon = LVI_BORDER + LVI_ICON_SIZE + LVI_SPACING; int www = listView()->visibleWidth() - (afterIcon + LVI_BORDER); m_pText->setWidth(www); if(isSelected()) { - QColorGroup cg2(cg); - cg2.setColor(QColorGroup::HighlightedText,cg.text()); - m_pText->draw(p,afterIcon,LVI_BORDER,QRect(afterIcon,LVI_BORDER,www,height() - (LVI_BORDER * 2)),cg2); + TQColorGroup cg2(cg); + cg2.setColor(TQColorGroup::HighlightedText,cg.text()); + m_pText->draw(p,afterIcon,LVI_BORDER,TQRect(afterIcon,LVI_BORDER,www,height() - (LVI_BORDER * 2)),cg2); } else { - m_pText->draw(p,afterIcon,LVI_BORDER,QRect(afterIcon,LVI_BORDER,www,height() - (LVI_BORDER * 2)),cg); + m_pText->draw(p,afterIcon,LVI_BORDER,TQRect(afterIcon,LVI_BORDER,www,height() - (LVI_BORDER * 2)),cg); } } else { if(m_pUser) @@ -164,8 +164,8 @@ void KviRegisteredUsersDialogItem::setup() } -KviRegisteredUsersDialog::KviRegisteredUsersDialog(QWidget * par) -: QWidget(par) +KviRegisteredUsersDialog::KviRegisteredUsersDialog(TQWidget * par) +: TQWidget(par) { g_pRegisteredUsersDialog = this; @@ -175,7 +175,7 @@ KviRegisteredUsersDialog::KviRegisteredUsersDialog(QWidget * par) setIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_REGUSERS))); setCaption(__tr2qs("Registered Users - KVIrc")); - QGridLayout * g = new QGridLayout(this,4,3,4,4); + TQGridLayout * g = new TQGridLayout(this,4,3,4,4); m_pListView = new KviTalListView(this); @@ -189,15 +189,15 @@ KviRegisteredUsersDialog::KviRegisteredUsersDialog(QWidget * par) m_pListView->setRootIsDecorated(TRUE); #ifdef COMPILE_INFO_TIPS - QToolTip::add(m_pListView,__tr2qs("
This is the list of registered users. " \ + TQToolTip::add(m_pListView,__tr2qs("
This is the list of registered users. " \ "KVIrc can automatically recognize and associate properties to them.
" \ "Use the buttons on the right to add, edit and remove entries. " \ "The \"notify\" column allows you to quickly add users to the notify list. " \ "Notify list fine-tuning can be performed by editing the entry properties.
")); #endif // COMPILE_INFO_TIPS - connect(m_pListView,SIGNAL(pressed(KviTalListViewItem *,const QPoint &,int)),this,SLOT(itemPressed(KviTalListViewItem *,const QPoint &,int))); - connect(m_pListView,SIGNAL(doubleClicked(KviTalListViewItem *)),this,SLOT(itemDoubleClicked(KviTalListViewItem *))); + connect(m_pListView,TQT_SIGNAL(pressed(KviTalListViewItem *,const TQPoint &,int)),this,TQT_SLOT(itemPressed(KviTalListViewItem *,const TQPoint &,int))); + connect(m_pListView,TQT_SIGNAL(doubleClicked(KviTalListViewItem *)),this,TQT_SLOT(itemDoubleClicked(KviTalListViewItem *))); g->addMultiCellWidget(m_pListView,0,1,0,1); @@ -205,61 +205,61 @@ KviRegisteredUsersDialog::KviRegisteredUsersDialog(QWidget * par) vbox->setSpacing(4); g->addWidget(vbox,0,2); - m_pWizardAddButton = new QPushButton(__tr2qs("Add (Wizard)..."),vbox); - connect(m_pWizardAddButton,SIGNAL(clicked()),this,SLOT(addWizardClicked())); + m_pWizardAddButton = new TQPushButton(__tr2qs("Add (Wizard)..."),vbox); + connect(m_pWizardAddButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(addWizardClicked())); #ifdef COMPILE_INFO_TIPS - QToolTip::add(m_pWizardAddButton,__tr2qs("Add a registered user by means of a user-friendly wizard.")); + TQToolTip::add(m_pWizardAddButton,__tr2qs("Add a registered user by means of a user-friendly wizard.")); #endif // COMPILE_INFO_TIPS m_pWizardAddButton->setIconSet(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_NEWITEMBYWIZARD))); - m_pAddButton = new QPushButton(__tr2qs("&Add..."),vbox); - connect(m_pAddButton,SIGNAL(clicked()),this,SLOT(addClicked())); + m_pAddButton = new TQPushButton(__tr2qs("&Add..."),vbox); + connect(m_pAddButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(addClicked())); #ifdef COMPILE_INFO_TIPS - QToolTip::add(m_pAddButton,__tr2qs("Open the edit dialog to create a new user entry.")); + TQToolTip::add(m_pAddButton,__tr2qs("Open the edit dialog to create a new user entry.")); #endif // COMPILE_INFO_TIPS m_pAddButton->setIconSet(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_NEWITEM))); - m_pAddGroupButton = new QPushButton(__tr2qs("&Add Group..."),vbox); - connect(m_pAddGroupButton,SIGNAL(clicked()),this,SLOT(addGroupClicked())); + m_pAddGroupButton = new TQPushButton(__tr2qs("&Add Group..."),vbox); + connect(m_pAddGroupButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(addGroupClicked())); #ifdef COMPILE_INFO_TIPS - QToolTip::add(m_pAddGroupButton,__tr2qs("Adds a new group")); + TQToolTip::add(m_pAddGroupButton,__tr2qs("Adds a new group")); #endif // COMPILE_INFO_TIPS m_pAddGroupButton->setIconSet(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_NEWITEM))); - m_pRemoveButton = new QPushButton(__tr2qs("Re&move"),vbox); - connect(m_pRemoveButton,SIGNAL(clicked()),this,SLOT(removeClicked())); + m_pRemoveButton = new TQPushButton(__tr2qs("Re&move"),vbox); + connect(m_pRemoveButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(removeClicked())); m_pRemoveButton->setEnabled(false); #ifdef COMPILE_INFO_TIPS - QToolTip::add(m_pRemoveButton,__tr2qs("Remove the currently selected entries.")); + TQToolTip::add(m_pRemoveButton,__tr2qs("Remove the currently selected entries.")); #endif // COMPILE_INFO_TIPS m_pRemoveButton->setIconSet(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_DELETEITEM))); - m_pEditButton = new QPushButton(__tr2qs("&Edit..."),vbox); - connect(m_pEditButton,SIGNAL(clicked()),this,SLOT(editClicked())); + m_pEditButton = new TQPushButton(__tr2qs("&Edit..."),vbox); + connect(m_pEditButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(editClicked())); m_pEditButton->setEnabled(false); #ifdef COMPILE_INFO_TIPS - QToolTip::add(m_pEditButton,__tr2qs("Edit the first selected entry.")); + TQToolTip::add(m_pEditButton,__tr2qs("Edit the first selected entry.")); #endif // COMPILE_INFO_TIPS m_pEditButton->setIconSet(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_EDITITEM))); - QFrame * f = new QFrame(vbox); - f->setFrameStyle(QFrame::HLine | QFrame::Sunken); + TQFrame * f = new TQFrame(vbox); + f->setFrameStyle(TQFrame::HLine | TQFrame::Sunken); - m_pExportButton = new QPushButton(__tr("Export To..."),vbox); + m_pExportButton = new TQPushButton(__tr("Export To..."),vbox); m_pExportButton->setEnabled(false); - connect(m_pExportButton,SIGNAL(clicked()),this,SLOT(exportClicked())); + connect(m_pExportButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(exportClicked())); #ifdef COMPILE_INFO_TIPS - QToolTip::add(m_pExportButton,__tr2qs("Export the selected entries to a file.
All the data associated with the selected registered users will be exported.
You (or anyone else) can later import the entries by using the \"Import\" button.")); + TQToolTip::add(m_pExportButton,__tr2qs("Export the selected entries to a file.
All the data associated with the selected registered users will be exported.
You (or anyone else) can later import the entries by using the \"Import\" button.")); #endif // COMPILE_INFO_TIPS m_pExportButton->setIconSet(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_FLOPPY))); - m_pImportButton = new QPushButton(__tr("Import From..."),vbox); - connect(m_pImportButton,SIGNAL(clicked()),this,SLOT(importClicked())); + m_pImportButton = new TQPushButton(__tr("Import From..."),vbox); + connect(m_pImportButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(importClicked())); #ifdef COMPILE_INFO_TIPS - QToolTip::add(m_pImportButton,__tr2qs("Import entries from a file exported earlier by the \"export\" function of this dialog.")); + TQToolTip::add(m_pImportButton,__tr2qs("Import entries from a file exported earlier by the \"export\" function of this dialog.")); #endif // COMPILE_INFO_TIPS m_pImportButton->setIconSet(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_FOLDER))); @@ -268,16 +268,16 @@ KviRegisteredUsersDialog::KviRegisteredUsersDialog(QWidget * par) hbox->setSpacing(4); g->addMultiCellWidget(hbox,3,3,1,2); - QPushButton * b; + TQPushButton * b; - b = new QPushButton(__tr2qs("&OK"),hbox); - connect(b,SIGNAL(clicked()),this,SLOT(okClicked())); + b = new TQPushButton(__tr2qs("&OK"),hbox); + connect(b,TQT_SIGNAL(clicked()),this,TQT_SLOT(okClicked())); b->setIconSet(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_ACCEPT))); //b->setMinimumWidth(120); - b = new QPushButton(__tr2qs("Cancel"),hbox); - connect(b,SIGNAL(clicked()),this,SLOT(cancelClicked())); + b = new TQPushButton(__tr2qs("Cancel"),hbox); + connect(b,TQT_SIGNAL(clicked()),this,TQT_SLOT(cancelClicked())); b->setIconSet(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_DISCARD))); //b->setMinimumWidth(120); @@ -287,12 +287,12 @@ KviRegisteredUsersDialog::KviRegisteredUsersDialog(QWidget * par) g->setColStretch(0,1); g->setRowStretch(1,1); - connect(m_pListView,SIGNAL(selectionChanged()),this,SLOT(selectionChanged())); - connect(m_pListView,SIGNAL(rightButtonClicked ( KviTalListViewItem *, const QPoint &, int ) ),this,SLOT(listViewRightButtonClicked ( KviTalListViewItem *, const QPoint &, int ))); + connect(m_pListView,TQT_SIGNAL(selectionChanged()),this,TQT_SLOT(selectionChanged())); + connect(m_pListView,TQT_SIGNAL(rightButtonClicked ( KviTalListViewItem *, const TQPoint &, int ) ),this,TQT_SLOT(listViewRightButtonClicked ( KviTalListViewItem *, const TQPoint &, int ))); fillList(); - if(!parent()) + if(!tqparent()) { if(KVI_OPTION_RECT(KviOption_rectRegisteredUsersDialogGeometry).y() < 5) { @@ -309,10 +309,10 @@ KviRegisteredUsersDialog::KviRegisteredUsersDialog(QWidget * par) KviRegisteredUsersDialog::~KviRegisteredUsersDialog() { #ifndef Q_OS_MACX - if(!parent())KVI_OPTION_RECT(KviOption_rectRegisteredUsersDialogGeometry) = QRect(pos().x(),pos().y(), + if(!tqparent())KVI_OPTION_RECT(KviOption_rectRegisteredUsersDialogGeometry) = TQRect(pos().x(),pos().y(), size().width(),size().height()); #else - if(!parent())KVI_OPTION_RECT(KviOption_rectRegisteredUsersDialogGeometry) = geometry(); + if(!tqparent())KVI_OPTION_RECT(KviOption_rectRegisteredUsersDialogGeometry) = tqgeometry(); #endif g_pRegisteredUsersDialog = 0; @@ -321,7 +321,7 @@ KviRegisteredUsersDialog::~KviRegisteredUsersDialog() g_pLocalRegisteredUserDataBase = 0; } -void KviRegisteredUsersDialog::itemPressed(KviTalListViewItem *it,const QPoint &pnt,int c) +void KviRegisteredUsersDialog::itemPressed(KviTalListViewItem *it,const TQPoint &pnt,int c) { if(!it)return; KviRegisteredUsersDialogItemBase* b=(KviRegisteredUsersDialogItemBase*)it; @@ -329,10 +329,10 @@ void KviRegisteredUsersDialog::itemPressed(KviTalListViewItem *it,const QPoint & { KviRegisteredUsersDialogItem *i = (KviRegisteredUsersDialogItem *)it; - QRect r = m_pListView->itemRect(i); + TQRect r = m_pListView->tqitemRect(i); int daw = m_pListView->columnWidth(0); - QPoint ppp = m_pListView->mapFromGlobal(pnt); + TQPoint ppp = m_pListView->mapFromGlobal(pnt); if((c == 1) && (ppp.x() < (r.height() + 5 + daw))) { @@ -342,12 +342,12 @@ void KviRegisteredUsersDialog::itemPressed(KviTalListViewItem *it,const QPoint & i->user()->setProperty("notify",""); // kill that } else { // try to find the nicknames to be notified - QString szMask; + TQString szMask; - for(KviIrcMask * m = i->user()->maskList()->first();m;m = i->user()->maskList()->next()) + for(KviIrcMask * m = i->user()->tqmaskList()->first();m;m = i->user()->tqmaskList()->next()) { - QString tmp = m->nick(); - if((tmp.find('*') == -1) && (tmp.find('?') == -1) && (!tmp.isEmpty())) + TQString tmp = m->nick(); + if((tmp.tqfind('*') == -1) && (tmp.tqfind('?') == -1) && (!tmp.isEmpty())) { if(!szMask.isEmpty())szMask.append(' '); szMask.append(tmp); @@ -355,10 +355,10 @@ void KviRegisteredUsersDialog::itemPressed(KviTalListViewItem *it,const QPoint & } // if the nickname list is still empty , build a dummy nick to notify szMask = i->user()->name(); - szMask.replace(" ",""); - szMask.replace("'",""); - szMask.replace("&",""); - szMask.replace(",",""); + szMask.tqreplace(" ",""); + szMask.tqreplace("'",""); + szMask.tqreplace("&",""); + szMask.tqreplace(",",""); i->user()->setProperty("notify",szMask); } @@ -383,9 +383,9 @@ void KviRegisteredUsersDialog::itemDoubleClicked(KviTalListViewItem *it) void KviRegisteredUsersDialog::addGroupClicked() { bool ok; - QString text = QInputDialog::getText( - "KVIrc", __tr("Group name:"), QLineEdit::Normal, - QString::null, &ok, this ); + TQString text = TQInputDialog::getText( + "KVIrc", __tr("Group name:"), TQLineEdit::Normal, + TQString(), &ok, this ); if ( ok && !text.isEmpty() ) { g_pLocalRegisteredUserDataBase->addGroup(text); fillList(); @@ -395,18 +395,18 @@ void KviRegisteredUsersDialog::editGroup(KviRegisteredUserGroup* group) { bool ok; - QString text = QInputDialog::getText( - "KVIrc", __tr("Group name:"), QLineEdit::Normal, + TQString text = TQInputDialog::getText( + "KVIrc", __tr("Group name:"), TQLineEdit::Normal, group->name(), &ok, this ); if ( ok && !text.isEmpty() ) { - QString szOldGroup=group->name(); + TQString szOldGroup=group->name(); g_pLocalRegisteredUserDataBase->groupDict()->setAutoDelete(0); g_pLocalRegisteredUserDataBase->groupDict()->remove(szOldGroup); g_pLocalRegisteredUserDataBase->groupDict()->setAutoDelete(1); group->setName(text); g_pLocalRegisteredUserDataBase->groupDict()->insert(text,group); - KviPointerHashTable * d = g_pLocalRegisteredUserDataBase->userDict(); + KviPointerHashTable * d = g_pLocalRegisteredUserDataBase->userDict(); for(KviRegisteredUser * u = d->first();u;u = d->next()) { @@ -419,7 +419,7 @@ void KviRegisteredUsersDialog::editGroup(KviRegisteredUserGroup* group) } } -void KviRegisteredUsersDialog::listViewRightButtonClicked ( KviTalListViewItem * pItem, const QPoint & point, int ) +void KviRegisteredUsersDialog::listViewRightButtonClicked ( KviTalListViewItem * pItem, const TQPoint & point, int ) { if(pItem) { @@ -428,15 +428,15 @@ void KviRegisteredUsersDialog::listViewRightButtonClicked ( KviTalListViewItem * { KviTalPopupMenu *groups = new KviTalPopupMenu; - KviPointerHashTable * pGroups = g_pLocalRegisteredUserDataBase->groupDict(); + KviPointerHashTable * pGroups = g_pLocalRegisteredUserDataBase->groupDict(); m_TmpDict.clear(); - for(KviPointerHashTableEntry * g = pGroups->firstEntry();g;g = pGroups->nextEntry()) + for(KviPointerHashTableEntry * g = pGroups->firstEntry();g;g = pGroups->nextEntry()) { int id=groups->insertItem(g->key()); - m_TmpDict.replace(id,g->data()); + m_TmpDict.tqreplace(id,g->data()); } - connect(groups,SIGNAL(activated ( int )),this,SLOT(moveToGroupMenuClicked(int))); + connect(groups,TQT_SIGNAL(activated ( int )),this,TQT_SLOT(moveToGroupMenuClicked(int))); KviTalPopupMenu *mainPopup = new KviTalPopupMenu; mainPopup->insertItem(__tr("Move to group"),groups); @@ -447,7 +447,7 @@ void KviRegisteredUsersDialog::listViewRightButtonClicked ( KviTalListViewItem * void KviRegisteredUsersDialog::moveToGroupMenuClicked(int id) { - QString szGroup=m_TmpDict.find(id)->name(); + TQString szGroup=m_TmpDict.tqfind(id)->name(); KviTalListViewItemIterator it( m_pListView, KviTalListViewItemIterator::Selected ); while ( it.current() ) { KviRegisteredUsersDialogItemBase* b=(KviRegisteredUsersDialogItemBase*)(it.current()); @@ -463,10 +463,10 @@ void KviRegisteredUsersDialog::moveToGroupMenuClicked(int id) void KviRegisteredUsersDialog::fillList() { m_pListView->clear(); - KviPointerHashTable groupItems(5,false); + KviPointerHashTable groupItems(5,false); groupItems.setAutoDelete(false); - KviPointerHashTable * pGroups = g_pLocalRegisteredUserDataBase->groupDict(); + KviPointerHashTable * pGroups = g_pLocalRegisteredUserDataBase->groupDict(); for(KviRegisteredUserGroup * g = pGroups->first();g;g = pGroups->next()) { KviRegisteredUsersGroupItem* pCur = new KviRegisteredUsersGroupItem(m_pListView,g); @@ -474,17 +474,17 @@ void KviRegisteredUsersDialog::fillList() pCur->setOpen(TRUE); } - KviPointerHashTable * d = g_pLocalRegisteredUserDataBase->userDict(); + KviPointerHashTable * d = g_pLocalRegisteredUserDataBase->userDict(); KviRegisteredUsersDialogItem * item; for(KviRegisteredUser * u = d->first();u;u = d->next()) { if(u->group().isEmpty()) u->setGroup(__tr("Default")); - if(groupItems.find(u->group())) - item = new KviRegisteredUsersDialogItem(groupItems.find(u->group()),u); - else if(groupItems.find(__tr("Default"))) - item = new KviRegisteredUsersDialogItem(groupItems.find(__tr("Default")),u); + if(groupItems.tqfind(u->group())) + item = new KviRegisteredUsersDialogItem(groupItems.tqfind(u->group()),u); + else if(groupItems.tqfind(__tr("Default"))) + item = new KviRegisteredUsersDialogItem(groupItems.tqfind(__tr("Default")),u); else { //should never be called KviRegisteredUserGroup* pGroup = g_pLocalRegisteredUserDataBase->addGroup(__tr("Default")); KviRegisteredUsersGroupItem* pCur = new KviRegisteredUsersGroupItem(m_pListView,pGroup); @@ -499,7 +499,7 @@ void KviRegisteredUsersDialog::fillList() } } -void KviRegisteredUsersDialog::closeEvent(QCloseEvent *e) +void KviRegisteredUsersDialog::closeEvent(TQCloseEvent *e) { m_pListView->clear(); e->accept(); @@ -529,7 +529,7 @@ void KviRegisteredUsersDialog::addClicked() if(!g_pRegisteredUsersDialog)return; // we have been deleted! - if(ret == QDialog::Accepted) + if(ret == TQDialog::Accepted) { fillList(); } @@ -541,7 +541,7 @@ void KviRegisteredUsersDialog::addWizardClicked() int ret = w->exec(); delete w; if(!g_pRegisteredUsersDialog)return; // we have been deleted! - if(ret == QDialog::Accepted) + if(ret == TQDialog::Accepted) { fillList(); } @@ -603,7 +603,7 @@ void KviRegisteredUsersDialog::editItem(KviRegisteredUsersDialogItem * i) i->setUser(0); - QString szName = u->name(); + TQString szName = u->name(); KviRegisteredUserEntryDialog * dlg = new KviRegisteredUserEntryDialog(this,u); int res = dlg->exec(); @@ -611,7 +611,7 @@ void KviRegisteredUsersDialog::editItem(KviRegisteredUsersDialogItem * i) if(!g_pRegisteredUsersDialog)return; // we have been deleted! - if(res == QDialog::Accepted) + if(res == TQDialog::Accepted) { fillList(); @@ -619,8 +619,8 @@ void KviRegisteredUsersDialog::editItem(KviRegisteredUsersDialogItem * i) KviTalListViewItem * i = m_pListView->firstChild(); while(i) { - QString szTmp = i->text(0); - if(KviQString::equalCI(szTmp,szName)) + TQString szTmp = i->text(0); + if(KviTQString::equalCI(szTmp,szName)) { m_pListView->setSelected(i,true); m_pListView->setCurrentItem(i); @@ -675,7 +675,7 @@ void KviRegisteredUsersDialog::exportClicked() return; } - QString buffer; + TQString buffer; if(!KviFileDialog::askForSaveFileName(buffer,__tr("Choose a Filename - KVIrc"),0,0,true,true))return; @@ -698,18 +698,18 @@ void KviRegisteredUsersDialog::exportClicked() while ( it.current() ) { KviRegisteredUsersDialogItemBase *pBase = (KviRegisteredUsersDialogItemBase *)(it.current()); if(pBase->type()!=KviRegisteredUsersDialogItemBase::User) continue; - QString szName = it.current()->text(0); + TQString szName = it.current()->text(0); KviRegisteredUser * u = ((KviRegisteredUsersDialogItem *)(it.current()))->user(); if(u) { if(!f.save(szName))goto write_error; - KviPointerHashTable * pd = u->propertyDict(); + KviPointerHashTable * pd = u->propertyDict(); if(pd) { if(!f.save(pd->count()))goto write_error; - for(KviPointerHashTableEntry * pCur = pd->firstEntry();pCur;pCur = pd->nextEntry()) + for(KviPointerHashTableEntry * pCur = pd->firstEntry();pCur;pCur = pd->nextEntry()) { - QString key = pCur->key(); + TQString key = pCur->key(); if(!f.save(key))goto write_error; if(!f.save(*(pCur->data())))goto write_error; } @@ -717,38 +717,38 @@ void KviRegisteredUsersDialog::exportClicked() if(!f.save(0))goto write_error; } - KviPointerList * ml = u->maskList(); + KviPointerList * ml = u->tqmaskList(); if(ml) { if(!f.save(ml->count()))goto write_error; for(KviIrcMask * m = ml->first();m;m = ml->next()) { - QString fullMask; - m->mask(fullMask,KviIrcMask::NickUserHost); + TQString fullMask; + m->tqmask(fullMask,KviIrcMask::NickUserHost); if(!f.save(fullMask))goto write_error; } } else { if(!f.save(0))goto write_error; } - QString avatar; + TQString avatar; if(u->getProperty("avatar",avatar)) { - KviAvatar * av = g_pIconManager->getAvatar(QString::null,avatar); + KviAvatar * av = g_pIconManager->getAvatar(TQString(),avatar); if(av) { if(!av->pixmap()->isNull()) { if(!f.save(1))goto write_error; #ifdef COMPILE_USE_QT4 - QImageWriter io; + TQImageWriter io; io.setDevice(&f); io.setFormat("PNG"); if(!io.write(av->pixmap()->convertToImage()))goto write_error; #else - QImageIO io; + TQImageIO io; io.setImage(av->pixmap()->convertToImage()); - io.setIODevice(&f); + io.setIODevice(TQT_TQIODEVICE(&f)); io.setFormat("PNG"); if(!io.write())goto write_error; #endif @@ -781,7 +781,7 @@ succesfull_export: void KviRegisteredUsersDialog::importClicked() { //KviStr buffer; - QString buffer; + TQString buffer; if(!KviFileDialog::askForOpenFileName(buffer,__tr("Choose a Filename - KVIrc")))return; @@ -817,14 +817,14 @@ void KviRegisteredUsersDialog::importClicked() for(idx = 0;idx < hf.nentries;idx++) { - QString szName; + TQString szName; if(!f.load(szName))goto read_error; KviRegisteredUser * u = g_pLocalRegisteredUserDataBase->getUser(szName); unsigned int count = 0; if(!f.load(count))goto read_error; for(unsigned int up = 0;up < count;up++) { - QString szKey,szValue; + TQString szKey,szValue; if(!f.load(szKey))goto read_error; if(!f.load(szValue))goto read_error; u->setProperty(szKey,szValue); @@ -832,7 +832,7 @@ void KviRegisteredUsersDialog::importClicked() if(!f.load(count))goto read_error; for(unsigned int um = 0;um < count;um++) { - QString szMask; + TQString szMask; if(!f.load(szMask))goto read_error; if(!szMask.isEmpty()) { @@ -844,18 +844,18 @@ void KviRegisteredUsersDialog::importClicked() if(count) { // there is an avatar - QImage img; + TQImage img; #ifdef COMPILE_USE_QT4 - QImageReader io; + TQImageReader io; io.setDevice(&f); io.setFormat("PNG"); img=io.read(); // if(io.read())goto read_error; #else - QImageIO io; + TQImageIO io; io.setImage(img); - io.setIODevice(&f); + io.setIODevice(TQT_TQIODEVICE(&f)); io.setFormat("PNG"); if(!io.read())goto read_error; diff --git a/src/modules/reguser/dialog.h b/src/modules/reguser/dialog.h index c292adc4..28ff1a15 100644 --- a/src/modules/reguser/dialog.h +++ b/src/modules/reguser/dialog.h @@ -27,20 +27,20 @@ #include "kvi_regusersdb.h" #include "kvi_selectors.h" -#include -#include -#include +#include +#include +#include #include "kvi_tal_listview.h" #include "kvi_tal_listbox.h" #include "kvi_pointerhashtable.h" #include "kvi_tal_popupmenu.h" #ifdef COMPILE_USE_QT4 - #include - #include - #define QSimpleRichText Q3SimpleRichText + #include + #include + #define TQSimpleRichText Q3SimpleRichText #else - #include - #include + #include + #include #endif @@ -88,46 +88,47 @@ class KviRegisteredUsersDialogItem : public KviRegisteredUsersDialogItemBase { protected: KviRegisteredUser * m_pUser; - QSimpleRichText * m_pText; + TQSimpleRichText * m_pText; public: KviRegisteredUsersDialogItem(KviTalListViewItem * par,KviRegisteredUser * u); ~KviRegisteredUsersDialogItem(); public: KviRegisteredUser * user(){ return m_pUser; }; void setUser(KviRegisteredUser * u){ m_pUser = u; }; - virtual void paintCell(QPainter * p,const QColorGroup &cg,int column,int width,int align); + virtual void paintCell(TQPainter * p,const TQColorGroup &cg,int column,int width,int align); virtual void setup(); - virtual QString key(int,bool) const; + virtual TQString key(int,bool) const; }; -class KviRegisteredUsersDialog : public QWidget +class KviRegisteredUsersDialog : public TQWidget { Q_OBJECT + TQ_OBJECT public: - KviRegisteredUsersDialog(QWidget * par = 0); + KviRegisteredUsersDialog(TQWidget * par = 0); ~KviRegisteredUsersDialog(); public: KviTalListView * m_pListView; - QPushButton * m_pAddButton; - QPushButton * m_pWizardAddButton; - QPushButton * m_pRemoveButton; - QPushButton * m_pEditButton; - QPushButton * m_pImportButton; - QPushButton * m_pExportButton; - QPushButton * m_pAddGroupButton; + TQPushButton * m_pAddButton; + TQPushButton * m_pWizardAddButton; + TQPushButton * m_pRemoveButton; + TQPushButton * m_pEditButton; + TQPushButton * m_pImportButton; + TQPushButton * m_pExportButton; + TQPushButton * m_pAddGroupButton; #ifdef COMPILE_USE_QT4 Q3IntDict m_TmpDict; #else - QIntDict m_TmpDict; + TQIntDict m_TmpDict; #endif protected slots: - void itemPressed(KviTalListViewItem *it,const QPoint &pnt,int c); + void itemPressed(KviTalListViewItem *it,const TQPoint &pnt,int c); void itemDoubleClicked(KviTalListViewItem *it); protected: void fillList(); protected: - virtual void closeEvent(QCloseEvent *); + virtual void closeEvent(TQCloseEvent *); void editItem(KviRegisteredUsersDialogItem * i); void editGroup(KviRegisteredUserGroup* group); protected slots: @@ -141,7 +142,7 @@ protected slots: void exportClicked(); void addWizardClicked(); void addGroupClicked(); - void listViewRightButtonClicked ( KviTalListViewItem *, const QPoint &, int ); + void listViewRightButtonClicked ( KviTalListViewItem *, const TQPoint &, int ); void moveToGroupMenuClicked(int); }; diff --git a/src/modules/reguser/edituser.cpp b/src/modules/reguser/edituser.cpp index f0d6d6b9..6fd82caa 100644 --- a/src/modules/reguser/edituser.cpp +++ b/src/modules/reguser/edituser.cpp @@ -41,34 +41,34 @@ #include "kvi_stringconversion.h" #include "kvi_options.h" -#include -#include -#include +#include +#include +#include #ifdef COMPILE_USE_QT4 -#include -#include -#include +#include +#include +#include #else -#include +#include #endif #include "kvi_pointerhashtable.h" -#include -#include -#include +#include +#include +#include -#include -#include +#include +#include #include "kvi_tal_hbox.h" #include "kvi_tal_vbox.h" -#include +#include #include "wizard.h" #include "dialog.h" #ifdef COMPILE_INFO_TIPS - #include + #include #endif // COMPILE_INFO_TIPS // kvi_app.cpp @@ -78,20 +78,20 @@ KviRegisteredUserDataBase * g_pLocalRegisteredUserDataBase; // local copy! -KviReguserPropertiesDialog::KviReguserPropertiesDialog(QWidget * p,KviPointerHashTable * dict) -: QDialog(p,"property_editor",true) +KviReguserPropertiesDialog::KviReguserPropertiesDialog(TQWidget * p,KviPointerHashTable * dict) +: TQDialog(p,"property_editor",true) { m_pPropertyDict = dict; setCaption(__tr2qs("Property Editor")); setIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_LINUX))); - QGridLayout * g = new QGridLayout(this,3,3,4,4); + TQGridLayout * g = new TQGridLayout(this,3,3,4,4); #ifdef COMPILE_USE_QT4 m_pTable = new Q3Table(this); #else - m_pTable = new QTable(this); + m_pTable = new TQTable(this); #endif g->addMultiCellWidget(m_pTable,0,1,0,1); @@ -102,31 +102,31 @@ KviReguserPropertiesDialog::KviReguserPropertiesDialog(QWidget * p,KviPointerHas m_pTable->horizontalHeader()->setLabel(1,__tr2qs("Value")); m_pTable->setMinimumSize(250,250); - //connect(m_pTable,SIGNAL(valueChanged(int,int)),this,SLOT(propertyValueChanged(int,int))); + //connect(m_pTable,TQT_SIGNAL(valueChanged(int,int)),this,TQT_SLOT(propertyValueChanged(int,int))); KviTalVBox * vb = new KviTalVBox(this); vb->setSpacing(4); g->addWidget(vb,0,2); - m_pAddButton = new QPushButton(__tr2qs("&New"),vb); - connect(m_pAddButton,SIGNAL(clicked()),this,SLOT(addClicked())); + m_pAddButton = new TQPushButton(__tr2qs("&New"),vb); + connect(m_pAddButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(addClicked())); m_pAddButton->setIconSet(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_NEWITEM))); - m_pDelButton = new QPushButton(__tr2qs("&Remove"),vb); - connect(m_pDelButton,SIGNAL(clicked()),this,SLOT(delClicked())); + m_pDelButton = new TQPushButton(__tr2qs("&Remove"),vb); + connect(m_pDelButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(delClicked())); m_pDelButton->setIconSet(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_DELETEITEM))); KviTalHBox * b = new KviTalHBox(this); b->setSpacing(4); g->addMultiCellWidget(b,2,2,1,2); - QPushButton * pb = new QPushButton(__tr2qs("&OK"),b); - connect(pb,SIGNAL(clicked()),this,SLOT(okClicked())); + TQPushButton * pb = new TQPushButton(__tr2qs("&OK"),b); + connect(pb,TQT_SIGNAL(clicked()),this,TQT_SLOT(okClicked())); pb->setIconSet(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_ACCEPT))); - pb = new QPushButton(__tr2qs("Cancel"),b); - connect(pb,SIGNAL(clicked()),this,SLOT(reject())); + pb = new TQPushButton(__tr2qs("Cancel"),b); + connect(pb,TQT_SIGNAL(clicked()),this,TQT_SLOT(reject())); pb->setIconSet(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_DISCARD))); g->setRowStretch(1,1); @@ -139,7 +139,7 @@ KviReguserPropertiesDialog::~KviReguserPropertiesDialog() { } -void KviReguserPropertiesDialog::closeEvent(QCloseEvent *e) +void KviReguserPropertiesDialog::closeEvent(TQCloseEvent *e) { e->accept(); //delete this; @@ -148,7 +148,7 @@ void KviReguserPropertiesDialog::closeEvent(QCloseEvent *e) void KviReguserPropertiesDialog::fillData() { m_pTable->setNumRows(m_pPropertyDict->count()); - KviPointerHashTableIterator it(*m_pPropertyDict); + KviPointerHashTableIterator it(*m_pPropertyDict); int row = 0; while(it.current()) { @@ -167,11 +167,11 @@ void KviReguserPropertiesDialog::okClicked() int n = m_pTable->numRows(); for(int i=0;itext(i,0); - QString szValue = m_pTable->text(i,1); + TQString szName = m_pTable->text(i,0); + TQString szValue = m_pTable->text(i,1); if((!szName.isEmpty()) && (!szValue.isEmpty())) { - m_pPropertyDict->replace(szName,new QString(szValue)); + m_pPropertyDict->tqreplace(szName,new TQString(szValue)); } } @@ -207,69 +207,69 @@ void KviReguserPropertiesDialog::delClicked() } -KviReguserMaskDialog::KviReguserMaskDialog(QWidget * p,KviIrcMask * m) -: QDialog(p,"reguser_mask_editor",true) +KviReguserMaskDialog::KviReguserMaskDialog(TQWidget * p,KviIrcMask * m) +: TQDialog(p,"reguser_tqmask_editor",true) { m_pMask = m; setCaption(__tr2qs("Mask Editor")); - QGridLayout * g = new QGridLayout(this,3,2,4,4); + TQGridLayout * g = new TQGridLayout(this,3,2,4,4); - QLabel * l = new QLabel(__tr2qs("Insert a mask for this user.
It can contain the wildcard characters '*' and '?'."),this); - //l->setAlignment(Qt::AlignCenter); + TQLabel * l = new TQLabel(__tr2qs("Insert a tqmask for this user.
It can contain the wildcard characters '*' and '?'."),this); + //l->tqsetAlignment(TQt::AlignCenter); g->addMultiCellWidget(l,0,0,0,1); KviTalHBox * b = new KviTalHBox(this); g->addMultiCellWidget(b,1,1,0,1); - m_pNickEdit = new QLineEdit(b); + m_pNickEdit = new TQLineEdit(b); //m_pNickEdit->setMinimumWidth(120); - m_pNickEdit->setAlignment(Qt::AlignRight); + m_pNickEdit->tqsetAlignment(TQt::AlignRight); #ifdef COMPILE_INFO_TIPS - QToolTip::add(m_pNickEdit,__tr2qs("
This the nickname that will match this user, default value is the registered name.
")); + TQToolTip::add(m_pNickEdit,__tr2qs("
This the nickname that will match this user, default value is the registered name.
")); #endif - l = new QLabel("
!
",b); - l->setAlignment(Qt::AlignCenter); + l = new TQLabel("
!
",b); + l->tqsetAlignment(TQt::AlignCenter); //l->setMinimumWidth(40); - m_pUserEdit = new QLineEdit(b); + m_pUserEdit = new TQLineEdit(b); //m_pUserEdit->setMinimumWidth(120); - m_pUserEdit->setAlignment(Qt::AlignCenter); + m_pUserEdit->tqsetAlignment(TQt::AlignCenter); #ifdef COMPILE_INFO_TIPS - QToolTip::add(m_pUserEdit,__tr2qs("
This the username that will match this user. * will match any username.
")); + TQToolTip::add(m_pUserEdit,__tr2qs("
This the username that will match this user. * will match any username.
")); #endif - l = new QLabel("
@
",b); - l->setAlignment(Qt::AlignCenter); + l = new TQLabel("
@
",b); + l->tqsetAlignment(TQt::AlignCenter); //l->setMinimumWidth(40); - m_pHostEdit = new QLineEdit(b); + m_pHostEdit = new TQLineEdit(b); //m_pHostEdit->setMinimumWidth(120); - m_pHostEdit->setAlignment(Qt::AlignLeft); + m_pHostEdit->tqsetAlignment(TQt::AlignLeft); #ifdef COMPILE_INFO_TIPS - QToolTip::add(m_pHostEdit,__tr2qs("
This the hostname that will match this user. * will match any hostname.
")); + TQToolTip::add(m_pHostEdit,__tr2qs("
This the hostname that will match this user. * will match any hostname.
")); #endif // just a spacer -// l = new QLabel(" ",this); +// l = new TQLabel(" ",this); // g->addMultiCellWidget(l,2,2,0,1); -// QFrame * f = new QFrame(this); -// f->setFrameStyle(QFrame::HLine | QFrame::Sunken); +// TQFrame * f = new TQFrame(this); +// f->setFrameStyle(TQFrame::HLine | TQFrame::Sunken); // g->addMultiCellWidget(f,3,3,0,1); b = new KviTalHBox(this); b->setSpacing(4); g->addWidget(b,2,1); - QPushButton * pb = new QPushButton(__tr2qs("&OK"),b); - connect(pb,SIGNAL(clicked()),this,SLOT(okClicked())); + TQPushButton * pb = new TQPushButton(__tr2qs("&OK"),b); + connect(pb,TQT_SIGNAL(clicked()),this,TQT_SLOT(okClicked())); //pb->setMinimumWidth(120); - pb = new QPushButton(__tr2qs("Cancel"),b); - connect(pb,SIGNAL(clicked()),this,SLOT(reject())); + pb = new TQPushButton(__tr2qs("Cancel"),b); + connect(pb,TQT_SIGNAL(clicked()),this,TQT_SLOT(reject())); //pb->setMinimumWidth(120); @@ -286,7 +286,7 @@ KviReguserMaskDialog::~KviReguserMaskDialog() { } -void KviReguserMaskDialog::closeEvent(QCloseEvent *e) +void KviReguserMaskDialog::closeEvent(TQCloseEvent *e) { e->accept(); //delete this; @@ -312,19 +312,19 @@ void KviReguserMaskDialog::okClicked() -KviRegisteredUserEntryDialog::KviRegisteredUserEntryDialog(QWidget *p,KviRegisteredUser * r,bool bModal) +KviRegisteredUserEntryDialog::KviRegisteredUserEntryDialog(TQWidget *p,KviRegisteredUser * r,bool bModal) : KviTalTabDialog(p,"reguser_entry_editor",bModal) { m_pUser = r; - m_pCustomColor = new QColor(); + m_pCustomColor = new TQColor(); if(r) { - QString col=r->getProperty("customColor"); + TQString col=r->getProperty("customColor"); KviStringConversion::fromString(col,(*m_pCustomColor)); } - m_pPropertyDict = new KviPointerHashTable(17,false); + m_pPropertyDict = new KviPointerHashTable(17,false); m_pPropertyDict->setAutoDelete(true); //setMinimumSize(400,450); @@ -332,31 +332,31 @@ KviRegisteredUserEntryDialog::KviRegisteredUserEntryDialog(QWidget *p,KviRegiste setIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_LINUX))); setCaption(__tr2qs("Registered User Entry")); - QWidget * p1 = new QWidget(this); + TQWidget * p1 = new TQWidget(this); - QGridLayout * g = new QGridLayout(p1,6,2,4,4); + TQGridLayout * g = new TQGridLayout(p1,6,2,4,4); - QLabel * l = new QLabel(__tr2qs("Name:"),p1); + TQLabel * l = new TQLabel(__tr2qs("Name:"),p1); g->addWidget(l,0,0); - m_pNameEdit = new QLineEdit(p1); + m_pNameEdit = new TQLineEdit(p1); g->addWidget(m_pNameEdit,0,1); - l = new QLabel(__tr2qs("Comment:"),p1); + l = new TQLabel(__tr2qs("Comment:"),p1); g->addWidget(l,1,0); - m_pCommentEdit = new QLineEdit(p1); + m_pCommentEdit = new TQLineEdit(p1); g->addWidget(m_pCommentEdit,1,1); - QFrame * f = new QFrame(p1); + TQFrame * f = new TQFrame(p1); g->addMultiCellWidget(f,2,2,0,1); - f->setFrameStyle(QFrame::HLine | QFrame::Sunken); + f->setFrameStyle(TQFrame::HLine | TQFrame::Sunken); - l = new QLabel(__tr2qs("Masks:"),p1); + l = new TQLabel(__tr2qs("Masks:"),p1); g->addMultiCellWidget(l,3,3,0,1); m_pMaskListBox = new KviTalListBox(p1); - connect(m_pMaskListBox,SIGNAL(currentChanged(KviTalListBoxItem *)),this,SLOT(maskCurrentChanged(KviTalListBoxItem *))); + connect(m_pMaskListBox,TQT_SIGNAL(currentChanged(KviTalListBoxItem *)),this,TQT_SLOT(tqmaskCurrentChanged(KviTalListBoxItem *))); m_pMaskListBox->setMinimumSize(300,200); g->addMultiCellWidget(m_pMaskListBox,4,4,0,1); @@ -365,18 +365,18 @@ KviRegisteredUserEntryDialog::KviRegisteredUserEntryDialog(QWidget *p,KviRegiste g->addMultiCellWidget(b,5,5,0,1); b->setSpacing(4); - m_pAddMaskButton = new QPushButton(__tr2qs("&Add..."),b); - connect(m_pAddMaskButton,SIGNAL(clicked()),this,SLOT(addMaskClicked())); + m_pAddMaskButton = new TQPushButton(__tr2qs("&Add..."),b); + connect(m_pAddMaskButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(addMaskClicked())); m_pAddMaskButton->setIconSet(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_NEWITEM))); - m_pDelMaskButton = new QPushButton(__tr2qs("Re&move"),b); + m_pDelMaskButton = new TQPushButton(__tr2qs("Re&move"),b); m_pDelMaskButton->setEnabled(false); - connect(m_pDelMaskButton,SIGNAL(clicked()),this,SLOT(delMaskClicked())); + connect(m_pDelMaskButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(delMaskClicked())); m_pDelMaskButton->setIconSet(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_DELETEITEM))); - m_pEditMaskButton = new QPushButton(__tr2qs("&Edit"),b); + m_pEditMaskButton = new TQPushButton(__tr2qs("&Edit"),b); m_pEditMaskButton->setEnabled(false); - connect(m_pEditMaskButton,SIGNAL(clicked()),this,SLOT(editMaskClicked())); + connect(m_pEditMaskButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(editMaskClicked())); m_pEditMaskButton->setIconSet(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_EDITITEM))); g->setRowStretch(4,1); @@ -386,30 +386,30 @@ KviRegisteredUserEntryDialog::KviRegisteredUserEntryDialog(QWidget *p,KviRegiste - QWidget * p2 = new QWidget(this); + TQWidget * p2 = new TQWidget(this); - g = new QGridLayout(p2,6,3,5,2); + g = new TQGridLayout(p2,6,3,5,2); m_pNotifyCheck = new KviStyledCheckBox(__tr2qs("Notify when user is online"),p2); g->addMultiCellWidget(m_pNotifyCheck,0,0,0,2); - l = new QLabel(__tr2qs("Notify nicknames:"),p2); + l = new TQLabel(__tr2qs("Notify nicknames:"),p2); l->setEnabled(m_pNotifyCheck->isChecked()); g->addWidget(l,1,0); - connect(m_pNotifyCheck,SIGNAL(toggled(bool)),l,SLOT(setEnabled(bool))); + connect(m_pNotifyCheck,TQT_SIGNAL(toggled(bool)),l,TQT_SLOT(setEnabled(bool))); #ifdef COMPILE_INFO_TIPS - QToolTip::add(m_pNotifyCheck,__tr2qs("
You can enter a space separated list of nicknames.
")); + TQToolTip::add(m_pNotifyCheck,__tr2qs("
You can enter a space separated list of nicknames.
")); #endif - m_pNotifyNick = new QLineEdit(p2); + m_pNotifyNick = new TQLineEdit(p2); m_pNotifyNick->setEnabled(false); g->addMultiCellWidget(m_pNotifyNick,1,1,1,2); - connect(m_pNotifyCheck,SIGNAL(toggled(bool)),m_pNotifyNick,SLOT(setEnabled(bool))); + connect(m_pNotifyCheck,TQT_SIGNAL(toggled(bool)),m_pNotifyNick,TQT_SLOT(setEnabled(bool))); - f = new QFrame(p2); - f->setFrameStyle(QFrame::HLine | QFrame::Sunken); + f = new TQFrame(p2); + f->setFrameStyle(TQFrame::HLine | TQFrame::Sunken); g->addMultiCellWidget(f,2,2,0,2); m_pAvatar = 0; @@ -426,8 +426,8 @@ KviRegisteredUserEntryDialog::KviRegisteredUserEntryDialog(QWidget *p,KviRegiste m_pAvatarSelector = new KviPixmapSelector(p2,__tr2qs("Avatar"),m_pAvatar,true); g->addMultiCellWidget(m_pAvatarSelector,3,3,0,2); - f = new QFrame(p2); - f->setFrameStyle(QFrame::HLine | QFrame::Sunken); + f = new TQFrame(p2); + f->setFrameStyle(TQFrame::HLine | TQFrame::Sunken); g->addMultiCellWidget(f,4,4,0,2); m_pCustomColorCheck = new KviStyledCheckBox(__tr2qs("Use custom color in userlist"),p2); @@ -435,11 +435,11 @@ KviRegisteredUserEntryDialog::KviRegisteredUserEntryDialog(QWidget *p,KviRegiste m_pCustomColorCheck->setChecked(r->getBoolProperty("useCustomColor")); g->addMultiCellWidget(m_pCustomColorCheck,5,5,0,1); - m_pCustomColorSelector = new KviColorSelector(p2,QString::null,m_pCustomColor,1); + m_pCustomColorSelector = new KviColorSelector(p2,TQString(),m_pCustomColor,1); g->addWidget(m_pCustomColorSelector,5,2); - QPushButton * pb = new QPushButton(__tr2qs("All Properties..."),p2); - connect(pb,SIGNAL(clicked()),this,SLOT(editAllPropertiesClicked())); + TQPushButton * pb = new TQPushButton(__tr2qs("All Properties..."),p2); + connect(pb,TQT_SIGNAL(clicked()),this,TQT_SLOT(editAllPropertiesClicked())); g->addWidget(pb,6,2); g->setColStretch(1,1); @@ -451,60 +451,60 @@ KviRegisteredUserEntryDialog::KviRegisteredUserEntryDialog(QWidget *p,KviRegiste #ifdef COMPILE_USE_QT4 Q3VBox * vb = new Q3VBox(this); #else - QVBox * vb = new QVBox(this); + TQVBox * vb = new TQVBox(this); #endif vb->setMargin(10); m_pIgnoreEnabled = new KviStyledCheckBox(__tr2qs("Enable ignore for this user"),vb); - QGroupBox * gb = new QGroupBox(__tr2qs("Ignore features"),vb); - connect(m_pIgnoreEnabled,SIGNAL(toggled(bool)),gb,SLOT(setEnabled(bool))); + TQGroupBox * gb = new TQGroupBox(__tr2qs("Ignore features"),vb); + connect(m_pIgnoreEnabled,TQT_SIGNAL(toggled(bool)),gb,TQT_SLOT(setEnabled(bool))); - QVBoxLayout * layout = new QVBoxLayout(gb,20,3); + TQVBoxLayout * tqlayout = new TQVBoxLayout(gb,20,3); m_pIgnoreQuery = new KviStyledCheckBox(__tr2qs("Ignore query-messages"),gb); - layout->addWidget(m_pIgnoreQuery); + tqlayout->addWidget(m_pIgnoreQuery); m_pIgnoreChannel = new KviStyledCheckBox(__tr2qs("Ignore channel-messages"),gb); - layout->addWidget(m_pIgnoreChannel); + tqlayout->addWidget(m_pIgnoreChannel); m_pIgnoreNotice = new KviStyledCheckBox(__tr2qs("Ignore notice-messages"),gb); - layout->addWidget(m_pIgnoreNotice); + tqlayout->addWidget(m_pIgnoreNotice); m_pIgnoreCtcp = new KviStyledCheckBox(__tr2qs("Ignore ctcp-messages"),gb); - layout->addWidget(m_pIgnoreCtcp); + tqlayout->addWidget(m_pIgnoreCtcp); m_pIgnoreInvite = new KviStyledCheckBox(__tr2qs("Ignore invites"),gb); - layout->addWidget(m_pIgnoreInvite); + tqlayout->addWidget(m_pIgnoreInvite); m_pIgnoreDcc = new KviStyledCheckBox(__tr2qs("Ignore DCCs"),gb); - layout->addWidget(m_pIgnoreDcc); + tqlayout->addWidget(m_pIgnoreDcc); - QWidget *w = new QWidget(vb); - w->setSizePolicy(QSizePolicy::Ignored,QSizePolicy::Ignored); + TQWidget *w = new TQWidget(vb); + w->tqsetSizePolicy(TQSizePolicy::Ignored,TQSizePolicy::Ignored); addTab(vb,__tr2qs("Ignore")); setCancelButton(__tr2qs("Cancel")); setOkButton(__tr2qs("&OK")); - connect(this,SIGNAL(applyButtonPressed()),this,SLOT(okClicked())); - connect(this,SIGNAL(cancelButtonPressed()),this,SLOT(reject())); + connect(this,TQT_SIGNAL(applyButtonPressed()),this,TQT_SLOT(okClicked())); + connect(this,TQT_SIGNAL(cancelButtonPressed()),this,TQT_SLOT(reject())); if(r) { m_pNameEdit->setText(r->name()); m_pCommentEdit->setText(r->getProperty("comment")); - for(KviIrcMask * m = r->maskList()->first();m;m = r->maskList()->next()) + for(KviIrcMask * m = r->tqmaskList()->first();m;m = r->tqmaskList()->next()) { - QString mk = m->nick(); - mk += QChar('!'); + TQString mk = m->nick(); + mk += TQChar('!'); mk += m->user(); - mk += QChar('@'); + mk += TQChar('@'); mk += m->host(); m_pMaskListBox->insertItem(mk); } - QString szNotifyNicks = r->getProperty("notify"); + TQString szNotifyNicks = r->getProperty("notify"); if(!szNotifyNicks.isEmpty()) { m_pNotifyCheck->setChecked(true); @@ -514,10 +514,10 @@ KviRegisteredUserEntryDialog::KviRegisteredUserEntryDialog(QWidget *p,KviRegiste if(r->propertyDict()) { - KviPointerHashTableIterator it(*(r->propertyDict())); - while(QString *s = it.current()) + KviPointerHashTableIterator it(*(r->propertyDict())); + while(TQString *s = it.current()) { - m_pPropertyDict->insert(it.currentKey(),new QString(*s)); + m_pPropertyDict->insert(it.currentKey(),new TQString(*s)); ++it; } } @@ -541,7 +541,7 @@ KviRegisteredUserEntryDialog::KviRegisteredUserEntryDialog(QWidget *p,KviRegiste } } -void KviRegisteredUserEntryDialog::closeEvent(QCloseEvent *e) +void KviRegisteredUserEntryDialog::closeEvent(TQCloseEvent *e) { e->accept(); okClicked(); @@ -555,7 +555,7 @@ KviRegisteredUserEntryDialog::~KviRegisteredUserEntryDialog() delete m_pCustomColor; } -void KviRegisteredUserEntryDialog::maskCurrentChanged(KviTalListBoxItem *it) +void KviRegisteredUserEntryDialog::tqmaskCurrentChanged(KviTalListBoxItem *it) { m_pDelMaskButton->setEnabled(it); m_pEditMaskButton->setEnabled(it); @@ -563,20 +563,20 @@ void KviRegisteredUserEntryDialog::maskCurrentChanged(KviTalListBoxItem *it) void KviRegisteredUserEntryDialog::okClicked() { - QString szGroup; + TQString szGroup; if(m_pUser) { szGroup=m_pUser->group(); g_pLocalRegisteredUserDataBase->removeUser(m_pUser->name()); } - QString name = m_pNameEdit->text(); + TQString name = m_pNameEdit->text(); if(name.isEmpty())name = "user"; KviRegisteredUser * u; - QString szNameOk = name; + TQString szNameOk = name; int idx = 1; @@ -584,7 +584,7 @@ void KviRegisteredUserEntryDialog::okClicked() u = g_pLocalRegisteredUserDataBase->findUserByName(szNameOk); if(u) { - KviQString::sprintf(szNameOk,"%Q%d",&name,idx); + KviTQString::sprintf(szNameOk,"%Q%d",&name,idx); idx++; } } while(u); @@ -606,8 +606,8 @@ void KviRegisteredUserEntryDialog::okClicked() idx = 0; while(cnt > 0) { - QString mask = m_pMaskListBox->text(idx); - KviIrcMask * mk = new KviIrcMask(mask); + TQString tqmask = m_pMaskListBox->text(idx); + KviIrcMask * mk = new KviIrcMask(tqmask); g_pLocalRegisteredUserDataBase->removeMask(*mk); g_pLocalRegisteredUserDataBase->addMask(u,mk); cnt--; @@ -619,13 +619,13 @@ void KviRegisteredUserEntryDialog::okClicked() if(!m_pAvatar->isNull()) { - QString szPath = m_pAvatar->path(); + TQString szPath = m_pAvatar->path(); u->setProperty("avatar",szPath); } if(m_pNotifyCheck->isChecked()) { - QString szNicks = m_pNotifyNick->text(); + TQString szNicks = m_pNotifyNick->text(); if(!szNicks.isEmpty()) { @@ -636,8 +636,8 @@ void KviRegisteredUserEntryDialog::okClicked() m_pPropertyDict->remove("notify"); m_pPropertyDict->remove("avatar"); - KviPointerHashTableIterator it(*m_pPropertyDict); - while(QString *s = it.current()) + KviPointerHashTableIterator it(*m_pPropertyDict); + while(TQString *s = it.current()) { u->setProperty(it.currentKey(),*s); ++it; @@ -645,7 +645,7 @@ void KviRegisteredUserEntryDialog::okClicked() u->setProperty("useCustomColor",m_pCustomColorCheck->isChecked()); - QString col; + TQString col; KviStringConversion::toString(m_pCustomColorSelector->getColor(),col); u->setProperty("customColor",col); @@ -675,12 +675,12 @@ void KviRegisteredUserEntryDialog::addMaskClicked() { KviIrcMask mk; KviReguserMaskDialog * dlg = new KviReguserMaskDialog(this,&mk); - if(dlg->exec() == QDialog::Accepted) + if(dlg->exec() == TQDialog::Accepted) { - QString m = mk.nick(); - m += QChar('!'); + TQString m = mk.nick(); + m += TQChar('!'); m += mk.user(); - m += QChar('@'); + m += TQChar('@'); m += mk.host(); m_pMaskListBox->insertItem(m); } @@ -703,12 +703,12 @@ void KviRegisteredUserEntryDialog::editMaskClicked() KviIrcMask mk(szM.ptr()); KviReguserMaskDialog * dlg = new KviReguserMaskDialog(this,&mk); - if(dlg->exec() == QDialog::Accepted) + if(dlg->exec() == TQDialog::Accepted) { - QString m = mk.nick(); - m += QChar('!'); + TQString m = mk.nick(); + m += TQChar('!'); m += mk.user(); - m += QChar('@'); + m += TQChar('@'); m += mk.host(); m_pMaskListBox->changeItem(m,idx); } @@ -725,16 +725,16 @@ void KviRegisteredUserEntryDialog::editAllPropertiesClicked() } else { KviStr szPath = m_pAvatar->path(); if(szPath.isEmpty())m_pPropertyDict->remove("avatar"); - else m_pPropertyDict->replace("avatar",new QString(szPath)); + else m_pPropertyDict->tqreplace("avatar",new TQString(szPath)); } if(m_pNotifyCheck->isChecked()) { - QString szNicks = m_pNotifyNick->text(); + TQString szNicks = m_pNotifyNick->text(); if(!szNicks.isEmpty()) { - m_pPropertyDict->replace("notify",new QString(szNicks)); + m_pPropertyDict->tqreplace("notify",new TQString(szNicks)); } else { m_pPropertyDict->remove("notify"); } @@ -744,14 +744,14 @@ void KviRegisteredUserEntryDialog::editAllPropertiesClicked() KviReguserPropertiesDialog * dlg = new KviReguserPropertiesDialog(this,m_pPropertyDict); - if(dlg->exec() != QDialog::Accepted) + if(dlg->exec() != TQDialog::Accepted) { delete dlg; return; } delete dlg; - QString * notify = m_pPropertyDict->find("notify"); + TQString * notify = m_pPropertyDict->tqfind("notify"); bool bGotIt = false; if(notify) { @@ -765,7 +765,7 @@ void KviRegisteredUserEntryDialog::editAllPropertiesClicked() m_pNotifyNick->setEnabled(bGotIt); if(!bGotIt)m_pNotifyNick->setText(""); - QString * avatar = m_pPropertyDict->find("avatar"); + TQString * avatar = m_pPropertyDict->tqfind("avatar"); bGotIt = false; if(avatar) { diff --git a/src/modules/reguser/edituser.h b/src/modules/reguser/edituser.h index fecbbf09..0318dbdd 100644 --- a/src/modules/reguser/edituser.h +++ b/src/modules/reguser/edituser.h @@ -28,22 +28,22 @@ #include "kvi_regusersdb.h" #include "kvi_selectors.h" -#include -#include -#include +#include +#include +#include #include "kvi_tal_listview.h" #include "kvi_tal_listbox.h" #include "kvi_pointerhashtable.h" #include #ifdef COMPILE_USE_QT4 -#include +#include #define Kvi_Tal_Table Q3Table #define Kvi_Tal_TableItem Q3TableItem #else -#include -#define Kvi_Tal_Table QTable -#define Kvi_Tal_TableItem QTableItem +#include +#define Kvi_Tal_Table TQTable +#define Kvi_Tal_TableItem TQTableItem #endif #include "kvi_tal_popupmenu.h" @@ -54,24 +54,25 @@ class KviRegisteredUser; -class KviReguserPropertiesDialog : public QDialog +class KviReguserPropertiesDialog : public TQDialog { Q_OBJECT + TQ_OBJECT public: - KviReguserPropertiesDialog(QWidget *p,KviPointerHashTable * dict); + KviReguserPropertiesDialog(TQWidget *p,KviPointerHashTable * dict); ~KviReguserPropertiesDialog(); protected: #ifdef COMPILE_USE_QT4 Q3Table *m_pTable; #else - QTable * m_pTable; + TQTable * m_pTable; #endif - KviPointerHashTable * m_pPropertyDict; - QPushButton * m_pDelButton; - QPushButton * m_pAddButton; + KviPointerHashTable * m_pPropertyDict; + TQPushButton * m_pDelButton; + TQPushButton * m_pAddButton; protected: void fillData(); - virtual void closeEvent(QCloseEvent *); + virtual void closeEvent(TQCloseEvent *); protected slots: void okClicked(); void addClicked(); @@ -79,20 +80,21 @@ protected slots: }; -class KviReguserMaskDialog : public QDialog +class KviReguserMaskDialog : public TQDialog { Q_OBJECT + TQ_OBJECT public: - KviReguserMaskDialog(QWidget * p,KviIrcMask * m); + KviReguserMaskDialog(TQWidget * p,KviIrcMask * m); ~KviReguserMaskDialog(); protected: KviIrcMask * m_pMask; - QLineEdit * m_pNickEdit; - QLineEdit * m_pUserEdit; - QLineEdit * m_pHostEdit; + TQLineEdit * m_pNickEdit; + TQLineEdit * m_pUserEdit; + TQLineEdit * m_pHostEdit; - virtual void closeEvent(QCloseEvent *); + virtual void closeEvent(TQCloseEvent *); protected slots: void okClicked(); }; @@ -101,50 +103,51 @@ protected slots: class KviRegisteredUserEntryDialog : public KviTalTabDialog { Q_OBJECT + TQ_OBJECT public: - KviRegisteredUserEntryDialog(QWidget * p,KviRegisteredUser * r,bool bModal = true); + KviRegisteredUserEntryDialog(TQWidget * p,KviRegisteredUser * r,bool bModal = true); virtual ~KviRegisteredUserEntryDialog(); protected: KviRegisteredUser * m_pUser; - QLineEdit * m_pNameEdit; - QLineEdit * m_pCommentEdit; + TQLineEdit * m_pNameEdit; + TQLineEdit * m_pCommentEdit; KviTalListBox * m_pMaskListBox; - QPushButton * m_pDelMaskButton; - QPushButton * m_pEditMaskButton; - QPushButton * m_pAddMaskButton; + TQPushButton * m_pDelMaskButton; + TQPushButton * m_pEditMaskButton; + TQPushButton * m_pAddMaskButton; - QCheckBox * m_pNotifyCheck; - QLineEdit * m_pNotifyNick; + TQCheckBox * m_pNotifyCheck; + TQLineEdit * m_pNotifyNick; KviPixmap * m_pAvatar; KviPixmapSelector * m_pAvatarSelector; - KviPointerHashTable * m_pPropertyDict; + KviPointerHashTable * m_pPropertyDict; - QCheckBox * m_pCustomColorCheck; - QColor * m_pCustomColor; + TQCheckBox * m_pCustomColorCheck; + TQColor * m_pCustomColor; KviColorSelector * m_pCustomColorSelector; //Ignore TAB - QCheckBox * m_pIgnoreEnabled; - QCheckBox * m_pIgnoreQuery; - QCheckBox * m_pIgnoreChannel; - QCheckBox * m_pIgnoreNotice; - QCheckBox * m_pIgnoreCtcp; - QCheckBox * m_pIgnoreInvite; - QCheckBox * m_pIgnoreDcc; - - virtual void closeEvent(QCloseEvent *); + TQCheckBox * m_pIgnoreEnabled; + TQCheckBox * m_pIgnoreQuery; + TQCheckBox * m_pIgnoreChannel; + TQCheckBox * m_pIgnoreNotice; + TQCheckBox * m_pIgnoreCtcp; + TQCheckBox * m_pIgnoreInvite; + TQCheckBox * m_pIgnoreDcc; + + virtual void closeEvent(TQCloseEvent *); protected slots: void okClicked(); void addMaskClicked(); void delMaskClicked(); void editMaskClicked(); void editAllPropertiesClicked(); - void maskCurrentChanged(KviTalListBoxItem *it); + void tqmaskCurrentChanged(KviTalListBoxItem *it); }; diff --git a/src/modules/reguser/libkvireguser.cpp b/src/modules/reguser/libkvireguser.cpp index 49e4a204..b8363175 100644 --- a/src/modules/reguser/libkvireguser.cpp +++ b/src/modules/reguser/libkvireguser.cpp @@ -40,7 +40,7 @@ #include "dialog.h" #include "kvi_pointerlist.h" -#include // FIXME: REmove this! +#include // FIXME: REmove this! //#warning "$reguser.matches..." //#warning "$reguser.clear" @@ -68,16 +68,16 @@ KviRegisteredUsersDialog * g_pRegisteredUsersDialog = 0; The reguser module is the scripting interface to the [doc:registered_users]registered users database[/doc].[br] It provides the following set of commands:[br] [cmd]reguser.add[/cmd]: adds an user entry to the database[br] - [cmd]reguser.addmask[/cmd]: adds an user's mask to the database[br] + [cmd]reguser.addtqmask[/cmd]: adds an user's tqmask to the database[br] [cmd]reguser.remove[/cmd]: removes an user entry from the database[br] [fnc]$reguser.list[/fnc]: lists the entries[br] [cmd]reguser.setproperty[/cmd]: sets a property associated to an entry[br] [cmd]reguser.edit[/cmd]: shows an editor for an user entry - [fnc]$reguser.match[/fnc](): finds an entry by matching masks[br] - [fnc]$reguser.exactMatch[/fnc](): finds an entry by comparing masks[br] + [fnc]$reguser.match[/fnc](): finds an entry by matching tqmasks[br] + [fnc]$reguser.exactMatch[/fnc](): finds an entry by comparing tqmasks[br] [fnc]$reguser.property[/fnc](): finds a property associated to an entry[br] [fnc]$reguser.matchProperty[/fnc](): shortcut for [fnc]$reguser.property[/fnc]([fnc]$reguser.match[/fnc]())[br] - [fnc]$reguser.mask[/fnc](): returns the registration masks for an entry + [fnc]$reguser.tqmask[/fnc](): returns the registration tqmasks for an entry */ /* @@ -105,7 +105,7 @@ KviRegisteredUsersDialog * g_pRegisteredUsersDialog = 0; [doc:registered_users]Registered users database[/doc], [cmd]reguser.add[/cmd], [cmd]reguser.remove[/cmd], - [cmd]reguser.addmask[/cmd], + [cmd]reguser.addtqmask[/cmd], [fnc]$reguser.list[/fnc] */ @@ -115,14 +115,14 @@ static bool reguser_kvs_cmd_edit(KviKvsModuleCommandCall * c) { if(c->hasSwitch('t',"toplevel")) { - if(g_pRegisteredUsersDialog->parent()) + if(g_pRegisteredUsersDialog->tqparent()) { - g_pRegisteredUsersDialog->reparent(0,QPoint(0,0),true); + g_pRegisteredUsersDialog->reparent(0,TQPoint(0,0),true); } } else { - if(g_pRegisteredUsersDialog->parent() != c->window()->frame()->splitter()) + if(TQT_BASE_OBJECT(g_pRegisteredUsersDialog->tqparent()) != TQT_BASE_OBJECT(c->window()->frame()->splitter())) { - g_pRegisteredUsersDialog->reparent(c->window()->frame()->splitter(),QPoint(0,0),true); + g_pRegisteredUsersDialog->reparent(c->window()->frame()->splitter(),TQPoint(0,0),true); } } } else { @@ -150,19 +150,19 @@ static bool reguser_kvs_cmd_edit(KviKvsModuleCommandCall * c) @short: Registers an user @syntax: - reguser.add [-r] [-f] [-q] [-g=group] [mask] + reguser.add [-r] [-f] [-q] [-g=group] [tqmask] @description: Adds a new entry with the specified to the database.[br] If the database contains an entry with the same , this command just prints a warning and returns.[br] - If no [mask] is given the new entry has no registration masks: so it can't be "matched" yet. You have to add - at least one mask with [cmd]reguser.addmask[/cmd]. - If [mask] is given, then it is added to the entry mask list.[br] + If no [tqmask] is given the new entry has no registration tqmasks: so it can't be "matched" yet. You have to add + at least one tqmask with [cmd]reguser.addtqmask[/cmd]. + If [tqmask] is given, then it is added to the entry tqmask list.[br] The parameter may contain any character: even spaces are allowed (obviously you have to use quotes in that case).[br] If the '-r' switch is given , the new entry replaces any previous one with the same (the old entry is removed).[br] If the '-f' switch is given , and there is an existing entry with the same name , no warning is printed - and the old entry is treated just like it has been just added (thus the [mask] is eventually added to its mask list).[br] + and the old entry is treated just like it has been just added (thus the [tqmask] is eventually added to its tqmask list).[br] The '-q' switch causes the command to run in "quiet" mode and print no warning.[br] @examples: [example] @@ -172,17 +172,17 @@ static bool reguser_kvs_cmd_edit(KviKvsModuleCommandCall * c) [module:reguser]Registered users database interface[/module], [doc:registered_users]Registered users database[/doc], [cmd]reguser.remove[/cmd], - [cmd]reguser.addmask[/cmd], + [cmd]reguser.addtqmask[/cmd], [fnc]$reguser.list[/fnc] */ static bool reguser_kvs_cmd_add(KviKvsModuleCommandCall * c) { - QString szName; - QString szMask; + TQString szName; + TQString szMask; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("name",KVS_PT_STRING,0,szName) - KVSM_PARAMETER("mask",KVS_PT_STRING,0,szMask) + KVSM_PARAMETER("tqmask",KVS_PT_STRING,0,szMask) KVSM_PARAMETERS_END(c) if(szName.isEmpty()) { @@ -190,11 +190,11 @@ static bool reguser_kvs_cmd_add(KviKvsModuleCommandCall * c) return true; } - if(c->hasSwitch('r',"replace"))g_pRegisteredUserDataBase->removeUser(szName); + if(c->hasSwitch('r',"tqreplace"))g_pRegisteredUserDataBase->removeUser(szName); KviRegisteredUser * u = g_pRegisteredUserDataBase->addUser(szName); - QString group; + TQString group; if(c->hasSwitch('g',"group")) { c->switches()->getAsStringIfExisting('g',"group",group); @@ -253,13 +253,13 @@ static bool reguser_kvs_cmd_add(KviKvsModuleCommandCall * c) [module:reguser]Registered users database interface[/module], [doc:registered_users]Registered users database[/doc], [cmd]reguser.add[/cmd], - [cmd]reguser.addmask[/cmd], + [cmd]reguser.addtqmask[/cmd], [fnc]$reguser.list[/fnc] */ static bool reguser_kvs_cmd_remove(KviKvsModuleCommandCall * c) { - QString szName; + TQString szName; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("name",KVS_PT_STRING,0,szName) KVSM_PARAMETERS_END(c) @@ -280,51 +280,51 @@ static bool reguser_kvs_cmd_remove(KviKvsModuleCommandCall * c) } /* - @doc: reguser.addmask + @doc: reguser.addtqmask @type: command @title: - reguser.addmask + reguser.addtqmask @keyterms: registering users @short: - Adds a mask to a registered user + Adds a tqmask to a registered user @syntax: - reguser.addmask [-f] + reguser.addtqmask [-f] @description: - Adds a registration mask to the database entry with name .[br] - The has the common [doc:irc_masks]irc mask[/doc] format.[br] - The only restriction on the is that it must be unique inside the - regusers database: you can't match two users with the same mask (it would + Adds a registration tqmask to the database entry with name .[br] + The has the common [doc:irc_tqmasks]irc tqmask[/doc] format.[br] + The only restriction on the is that it must be unique inside the + regusers database: you can't match two users with the same tqmask (it would have rather undefined results).[br] - If -f is used , KVIrc ensures that the mask is unique in the database + If -f is used , KVIrc ensures that the tqmask is unique in the database and associates is to THIS registered user (breaking the previous associations).
- Once at least one mask has been added, the user can be "matched" + Once at least one tqmask has been added, the user can be "matched" by using the [fnc]$reguser.match[/fnc]() function.[br] - Each database entry can have an unlimited number of masks.[br] + Each database entry can have an unlimited number of tqmasks.[br] @examples: [example] [cmd]reguser.add[/cmd] "Szymon Stefanek" - reguser.addmask "Szymon Stefanek" Pragma!*@*.it + reguser.addtqmask "Szymon Stefanek" Pragma!*@*.it [/example] @seealso: [module:reguser]Registered users database interface[/module], [doc:registered_users]Registered users database[/doc], [cmd]reguser.add[cmd], [cmd]reguser.remove[/cmd], - [cmd]reguser.delmask[/cmd], + [cmd]reguser.deltqmask[/cmd], [fnc]$reguser.list[/fnc], [fnc]$reguser.match[/fnc], [fnc]$reguser.exactMatch[/fnc] */ -static bool reguser_kvs_cmd_addmask(KviKvsModuleCommandCall * c) +static bool reguser_kvs_cmd_addtqmask(KviKvsModuleCommandCall * c) { - QString szName; - QString szMask; + TQString szName; + TQString szMask; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("name",KVS_PT_STRING,0,szName) - KVSM_PARAMETER("mask",KVS_PT_STRING,0,szMask) + KVSM_PARAMETER("tqmask",KVS_PT_STRING,0,szMask) KVSM_PARAMETERS_END(c) if(szName.isEmpty()) @@ -335,7 +335,7 @@ static bool reguser_kvs_cmd_addmask(KviKvsModuleCommandCall * c) if(szMask.isEmpty()) { - c->warning(__tr2qs("No mask specified")); + c->warning(__tr2qs("No tqmask specified")); return true; } @@ -357,27 +357,27 @@ static bool reguser_kvs_cmd_addmask(KviKvsModuleCommandCall * c) } /* - @doc: reguser.delmask + @doc: reguser.deltqmask @type: command @title: - reguser.delmask + reguser.deltqmask @keyterms: registering users @short: - Removes a mask from the regusers database + Removes a tqmask from the regusers database @syntax: - reguser.delmask + reguser.deltqmask @description: - Removes a mask from the regusers database.[br] - Since masks are unique in the database , you don't need to pass - an parameter: if an entry has the , removing that + Removes a tqmask from the regusers database.[br] + Since tqmasks are unique in the database , you don't need to pass + an parameter: if an entry has the , removing that will surely remove it from that entry. (contorsions ?)[br] @examples: [example] [cmd]reguser.add[/cmd] "Szymon Stefanek" - [cmd]reguser.addmask[/cmd] "Szymon Stefanek" Pragma!*@*.it - reguser.delmask Pragma!*@*.it + [cmd]reguser.addtqmask[/cmd] "Szymon Stefanek" Pragma!*@*.it + reguser.deltqmask Pragma!*@*.it [fnc]$reguser.list[/fnc] [/example] @seealso: @@ -385,22 +385,22 @@ static bool reguser_kvs_cmd_addmask(KviKvsModuleCommandCall * c) [doc:registered_users]Registered users database[/doc], [cmd]reguser.add[/cmd], [cmd]reguser.remove[/cmd], - [cmd]reguser.addmask[/cmd], + [cmd]reguser.addtqmask[/cmd], [fnc]$reguser.list[/fnc], [fnc]$reguser.match[/fnc], [fnc]$reguser.exactMatch[/fnc] */ -static bool reguser_kvs_cmd_delmask(KviKvsModuleCommandCall * c) +static bool reguser_kvs_cmd_deltqmask(KviKvsModuleCommandCall * c) { - QString szMask; + TQString szMask; KVSM_PARAMETERS_BEGIN(c) - KVSM_PARAMETER("mask",KVS_PT_STRING,0,szMask) + KVSM_PARAMETER("tqmask",KVS_PT_STRING,0,szMask) KVSM_PARAMETERS_END(c) if(szMask.isEmpty()) { - c->warning(__tr2qs("No mask specified")); + c->warning(__tr2qs("No tqmask specified")); return true; } @@ -440,7 +440,7 @@ static bool reguser_kvs_cmd_delmask(KviKvsModuleCommandCall * c) static bool reguser_kvs_cmd_setIgnoreEnabled(KviKvsModuleCommandCall * c) { - QString szName; + TQString szName; bool bEnabled; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("name",KVS_PT_STRING,0,szName) @@ -507,7 +507,7 @@ static bool reguser_kvs_cmd_setIgnoreEnabled(KviKvsModuleCommandCall * c) static bool reguser_kvs_cmd_setIgnoreFlags(KviKvsModuleCommandCall * c) { - QString szName; + TQString szName; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("name",KVS_PT_STRING,0,szName) KVSM_PARAMETERS_END(c) @@ -564,8 +564,8 @@ static bool reguser_kvs_cmd_setIgnoreFlags(KviKvsModuleCommandCall * c) [doc:registered_users]Registered users database[/doc], [cmd]reguser.add[/cmd], [cmd]reguser.remove[/cmd], - [cmd]reguser.addmask[/cmd], - [cmd]reguser.delmask[/cmd], + [cmd]reguser.addtqmask[/cmd], + [cmd]reguser.deltqmask[/cmd], [fnc]$reguser.list[/fnc], [fnc]$reguser.match[/fnc], [fnc]$reguser.matchProperty[/fnc] @@ -573,8 +573,8 @@ static bool reguser_kvs_cmd_setIgnoreFlags(KviKvsModuleCommandCall * c) static bool reguser_kvs_fnc_getIgnoreFlags(KviKvsModuleFunctionCall * c) { - QString szName; - QString szFlags; + TQString szName; + TQString szFlags; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("name",KVS_PT_STRING,0,szName) KVSM_PARAMETERS_END(c) @@ -619,8 +619,8 @@ static bool reguser_kvs_fnc_getIgnoreFlags(KviKvsModuleFunctionCall * c) [doc:registered_users]Registered users database[/doc], [cmd]reguser.add[/cmd], [cmd]reguser.remove[/cmd], - [cmd]reguser.addmask[/cmd], - [cmd]reguser.delmask[/cmd], + [cmd]reguser.addtqmask[/cmd], + [cmd]reguser.deltqmask[/cmd], [fnc]$reguser.list[/fnc], [fnc]$reguser.match[/fnc], [fnc]$reguser.matchProperty[/fnc] @@ -628,7 +628,7 @@ static bool reguser_kvs_fnc_getIgnoreFlags(KviKvsModuleFunctionCall * c) static bool reguser_kvs_fnc_isIgnoreEnabled(KviKvsModuleFunctionCall * c) { - QString szName; + TQString szName; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("name",KVS_PT_STRING,0,szName) KVSM_PARAMETERS_END(c) @@ -681,11 +681,11 @@ static bool reguser_kvs_fnc_isIgnoreEnabled(KviKvsModuleFunctionCall * c) static bool reguser_kvs_cmd_setproperty(KviKvsModuleCommandCall * c) { - QString szName; - QString szProperty; - QString szValue; + TQString szName; + TQString szProperty; + TQString szValue; KVSM_PARAMETERS_BEGIN(c) - KVSM_PARAMETER("mask",KVS_PT_STRING,0,szName) + KVSM_PARAMETER("tqmask",KVS_PT_STRING,0,szName) KVSM_PARAMETER("property",KVS_PT_STRING,0,szProperty) KVSM_PARAMETER("value",KVS_PT_STRING,KVS_PF_OPTIONAL,szValue) KVSM_PARAMETERS_END(c) @@ -720,46 +720,46 @@ static bool reguser_kvs_cmd_setproperty(KviKvsModuleCommandCall * c) @title: $reguser.list @short: - Get a list of registered user masks + Get a list of registered user tqmasks @syntax: - $reguser.list([mask]) + $reguser.list([tqmask]) @description: Returns an array of the entries in the registered users database.[br] - If is specified, only entries matching the - and the entries with no registration masks are listed.[br] - Please note that is a wildcard string that will match + If is specified, only entries matching the + and the entries with no registration tqmasks are listed.[br] + Please note that is a wildcard string that will match wildcard strings... don't get messed with that :D[br] @seealso: [module:reguser]Registered users database interface[/module], [doc:registered_users]Registered users database[/doc], [cmd]reguser.add[/cmd], [cmd]reguser.remove[/cmd], - [cmd]reguser.addmask[/cmd], + [cmd]reguser.addtqmask[/cmd], [fnc]$reguser.list[/fnc], [fnc]$reguser.exactMatch[/fnc] */ static bool reguser_kvs_fnc_list(KviKvsModuleFunctionCall * c) { - QString szMask; + TQString szMask; KVSM_PARAMETERS_BEGIN(c) - KVSM_PARAMETER("user_mask",KVS_PT_STRING,KVS_PF_OPTIONAL,szMask) + KVSM_PARAMETER("user_tqmask",KVS_PT_STRING,KVS_PF_OPTIONAL,szMask) KVSM_PARAMETERS_END(c) - KviIrcMask mask(szMask); + KviIrcMask tqmask(szMask); KviKvsArray* pArray = new KviKvsArray(); int aid=0; int cnt = 0; - KviPointerHashTable * d = g_pRegisteredUserDataBase->userDict(); - KviPointerHashTableIterator it(*d); + KviPointerHashTable * d = g_pRegisteredUserDataBase->userDict(); + KviPointerHashTableIterator it(*d); while(KviRegisteredUser * u = it.current()) { - KviPointerList * ml = u->maskList(); - if(u->matches(mask) || (ml->count() == 0)) + KviPointerList * ml = u->tqmaskList(); + if(u->matches(tqmask) || (ml->count() == 0)) { pArray->set(aid,new KviKvsVariant(u->name())); aid++; @@ -781,12 +781,12 @@ static bool reguser_kvs_fnc_list(KviKvsModuleFunctionCall * c) @short: Lists the registered users @syntax: - reguser.showlist [mask] + reguser.showlist [tqmask] @description: Lists the entries in the registered users database.[br] - If is specified, only entries matching the - and the entries with no registration masks are listed.[br] - Please note that is a wildcard string that will match + If is specified, only entries matching the + and the entries with no registration tqmasks are listed.[br] + Please note that is a wildcard string that will match wildcard strings... don't get messed with that :D[br] @seealso: [module:reguser]Registered users database interface[/module], @@ -799,28 +799,28 @@ static bool reguser_kvs_fnc_list(KviKvsModuleFunctionCall * c) static bool reguser_kvs_cmd_showlist(KviKvsModuleCommandCall * c) { - QString szMask; + TQString szMask; KVSM_PARAMETERS_BEGIN(c) - KVSM_PARAMETER("mask",KVS_PT_STRING,KVS_PF_OPTIONAL,szMask) + KVSM_PARAMETER("tqmask",KVS_PT_STRING,KVS_PF_OPTIONAL,szMask) KVSM_PARAMETERS_END(c) - KviIrcMask mask(szMask); + KviIrcMask tqmask(szMask); c->window()->outputNoFmt(KVI_OUT_SYSTEMMESSAGE,__tr2qs("Registered users database dump:")); int count = 0; - KviPointerHashTable * d = g_pRegisteredUserDataBase->userDict(); - KviPointerHashTableIterator it(*d); + KviPointerHashTable * d = g_pRegisteredUserDataBase->userDict(); + KviPointerHashTableIterator it(*d); while(KviRegisteredUser * u = it.current()) { - KviPointerList * ml = u->maskList(); - if(u->matches(mask) || (ml->count() == 0)) + KviPointerList * ml = u->tqmaskList(); + if(u->matches(tqmask) || (ml->count() == 0)) { c->window()->output(KVI_OUT_SYSTEMMESSAGE,__tr2qs(" User: %c%Q"),KVI_TEXT_BOLD,&(u->name())); if(ml->count() == 0) { - c->window()->output(KVI_OUT_SYSTEMWARNING,__tr2qs(" Warning: this user has no registration masks")); + c->window()->output(KVI_OUT_SYSTEMWARNING,__tr2qs(" Warning: this user has no registration tqmasks")); } else { for(KviIrcMask * m = ml->first();m;m = ml->next()) { @@ -828,13 +828,13 @@ static bool reguser_kvs_cmd_showlist(KviKvsModuleCommandCall * c) } } - KviPointerHashTable * pd = u->propertyDict(); + KviPointerHashTable * pd = u->propertyDict(); if(pd) { - KviPointerHashTableIterator pdit(*pd); + KviPointerHashTableIterator pdit(*pd); while(pdit.current()) { - QString key = pdit.currentKey(); + TQString key = pdit.currentKey(); c->window()->output(KVI_OUT_SYSTEMMESSAGE,__tr2qs(" Property: %Q=%Q"),&(key),pdit.current()); ++pdit; } @@ -859,30 +859,30 @@ static bool reguser_kvs_cmd_showlist(KviKvsModuleCommandCall * c) @short: Returns an entry in the registered user database @syntax: - $reguser.match() + $reguser.match() @description: - Returns the name of the first entry matching in the registered user database.[br] - The has the common [doc:irc_masks]irc mask[/doc] format but can't contain wildcards.[br] + Returns the name of the first entry matching in the registered user database.[br] + The has the common [doc:irc_tqmasks]irc tqmask[/doc] format but can't contain wildcards.[br] @seealso: [module:reguser]Registered users database interface[/module], [doc:registered_users]Registered users database[/doc], [cmd]reguser.add[/cmd], [cmd]reguser.remove[/cmd], - [cmd]reguser.addmask[/cmd], + [cmd]reguser.addtqmask[/cmd], [fnc]$reguser.list[/fnc], [fnc]$reguser.exactMatch[/fnc] */ static bool reguser_kvs_fnc_match(KviKvsModuleFunctionCall * c) { - QString szMask; + TQString szMask; KVSM_PARAMETERS_BEGIN(c) - KVSM_PARAMETER("user_mask",KVS_PT_STRING,0,szMask) + KVSM_PARAMETER("user_tqmask",KVS_PT_STRING,0,szMask) KVSM_PARAMETERS_END(c) - KviIrcMask mask(szMask); -//FIXME: it crashes kvirc KviRegisteredUser * u = c->context()->connection()->userDataBase()->registeredUser(mask.nick(),mask.user(),mask.host()); - KviRegisteredUser * u = g_pRegisteredUserDataBase->findMatchingUser(mask.nick(),mask.user(),mask.host()); + KviIrcMask tqmask(szMask); +//FIXME: it crashes kvirc KviRegisteredUser * u = c->context()->connection()->userDataBase()->registeredUser(tqmask.nick(),tqmask.user(),tqmask.host()); + KviRegisteredUser * u = g_pRegisteredUserDataBase->findMatchingUser(tqmask.nick(),tqmask.user(),tqmask.host()); if(u) c->returnValue()->setString(u->name()); return true; } @@ -896,29 +896,29 @@ static bool reguser_kvs_fnc_match(KviKvsModuleFunctionCall * c) @short: Returns an entry in the registered user database @syntax: - $reguser.exactMatch() + $reguser.exactMatch() @description: - Returns the name of the registered user database entry that has in its registration mask list.[br] - The has the common [doc:irc_masks]wild irc mask[/doc] format and can contain wildcards.[br] + Returns the name of the registered user database entry that has in its registration tqmask list.[br] + The has the common [doc:irc_tqmasks]wild irc tqmask[/doc] format and can contain wildcards.[br] @seealso: [module:reguser]Registered users database interface[/module], [doc:registered_users]Registered users database[/doc], [cmd]reguser.add[/cmd], [cmd]reguser.remove[/cmd], - [cmd]reguser.addmask[/cmd], + [cmd]reguser.addtqmask[/cmd], [fnc]$reguser.list[/fnc], [fnc]$reguser.match[/fnc] */ static bool reguser_kvs_fnc_exactMatch(KviKvsModuleFunctionCall * c) { - QString szMask; + TQString szMask; KVSM_PARAMETERS_BEGIN(c) - KVSM_PARAMETER("user_mask",KVS_PT_STRING,0,szMask) + KVSM_PARAMETER("user_tqmask",KVS_PT_STRING,0,szMask) KVSM_PARAMETERS_END(c) - KviIrcMask mask(szMask); - KviRegisteredUser * u = g_pRegisteredUserDataBase->findUserWithMask(mask); + KviIrcMask tqmask(szMask); + KviRegisteredUser * u = g_pRegisteredUserDataBase->findUserWithMask(tqmask); if(u) c->returnValue()->setString(u->name()); return true; } @@ -932,24 +932,24 @@ static bool reguser_kvs_fnc_exactMatch(KviKvsModuleFunctionCall * c) // @short: // Returns entries in the registered user database // @syntax: -// $reguser.matches() +// $reguser.matches() // @description: -// Returns a comma separated list of registered user masks that match .[br] -// User mask must be in the format !@ , where and +// Returns a comma separated list of registered user tqmasks that match .[br] +// User tqmask must be in the format !@ , where and // may contain '*' wildcards.[br] -// If no registered mask matches the an empty string is returned.[br] +// If no registered tqmask matches the an empty string is returned.[br] // @seealso: // [module:reguser]reguser module documentation[/module] //*/ -//static void search_reguser_list(KviRegisteredUserList * l,KviWindow * w,const char * mask,KviStr & buffer) +//static void search_reguser_list(KviRegisteredUserList * l,KviWindow * w,const char * tqmask,KviStr & buffer) //{ // for(KviRegisteredUser * u = l->first();u;u = l->next()) // { -// if(u->matches(mask)) +// if(u->matches(tqmask)) // { // if(buffer.hasData())buffer.append(','); -// buffer.append(u->mask()); +// buffer.append(u->tqmask()); // } // } //} @@ -977,43 +977,43 @@ static bool reguser_kvs_fnc_exactMatch(KviKvsModuleFunctionCall * c) /* - @doc: reguser.mask + @doc: reguser.tqmask @type: function @title: - $reguser.mask + $reguser.tqmask @short: - Returns the registration masks for a db entry + Returns the registration tqmasks for a db entry @syntax: - $reguser.mask([,]) + $reguser.tqmask([,]) @description: - Returns the th registration mask for the registered user database record identified - by . If is not given , returns an array of registration masks for that entry.[br] + Returns the th registration tqmask for the registered user database record identified + by . If is not given , returns an array of registration tqmasks for that entry.[br] If does not identify a valid entry an empty string is returned; - if is out of range (or there are no masks at all) , an empty string is returned.[br] + if is out of range (or there are no tqmasks at all) , an empty string is returned.[br] is a ZERO BASED index.[br] @examples: [example] [cmd]reguser.add[/cmd] Pragma - [cmd]reguser.addmask[/cmd] Pragma Pragma!*@*.it - [cmd]echo[/cmd] $reguser.mask(Pragma,0) + [cmd]reguser.addtqmask[/cmd] Pragma Pragma!*@*.it + [cmd]echo[/cmd] $reguser.tqmask(Pragma,0) [/example] @seealso: [module:reguser]Registered users database interface[/module], [doc:registered_users]Registered users database[/doc], [cmd]reguser.add[/cmd], [cmd]reguser.remove[/cmd], - [cmd]reguser.addmask[/cmd], - [cmd]reguser.delmask[/cmd], + [cmd]reguser.addtqmask[/cmd], + [cmd]reguser.deltqmask[/cmd], [fnc]$reguser.list[/fnc], [fnc]$reguser.match[/fnc], [fnc]$reguser.matchProperty[/fnc] */ -static bool reguser_kvs_fnc_mask(KviKvsModuleFunctionCall * c) +static bool reguser_kvs_fnc_tqmask(KviKvsModuleFunctionCall * c) { - QString szName; - QString szN; + TQString szName; + TQString szN; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("name",KVS_PT_STRING,0,szName) KVSM_PARAMETER("N",KVS_PT_STRING,KVS_PF_OPTIONAL,szN) @@ -1027,13 +1027,13 @@ static bool reguser_kvs_fnc_mask(KviKvsModuleFunctionCall * c) KviStr n = szName; if(n.hasData() && n.isUnsignedNum()) { - KviIrcMask * m = u->maskList()->at(n.toInt()); + KviIrcMask * m = u->tqmaskList()->at(n.toInt()); if(m) c->returnValue()->setString(m->nick()+"!"+m->user()+"@"+m->host()); } else { int id=0; - for(KviIrcMask * m = u->maskList()->first();m;m = u->maskList()->next()) + for(KviIrcMask * m = u->tqmaskList()->first();m;m = u->tqmaskList()->next()) { - pArray->set(aid,new KviKvsVariant(QString(m->nick()+"!"+m->user()+"@"+m->host()))); + pArray->set(aid,new KviKvsVariant(TQString(m->nick()+"!"+m->user()+"@"+m->host()))); aid++; } c->returnValue()->setArray(pArray); @@ -1058,7 +1058,7 @@ static bool reguser_kvs_fnc_mask(KviKvsModuleFunctionCall * c) @examples: [example] [cmd]reguser.add[/cmd] Pragma - [cmd]reguser.addmask[/cmd] Pragma Pragma!*@*.it + [cmd]reguser.addtqmask[/cmd] Pragma Pragma!*@*.it [cmd]reguser.setproperty[/cmd] Pragma isDev 1 [cmd]echo[/cmd] $reguser.property(Pragma,isDev) [/example] @@ -1067,7 +1067,7 @@ static bool reguser_kvs_fnc_mask(KviKvsModuleFunctionCall * c) [doc:registered_users]Registered users database[/doc], [cmd]reguser.add[/cmd], [cmd]reguser.remove[/cmd], - [cmd]reguser.addmask[/cmd], + [cmd]reguser.addtqmask[/cmd], [fnc]$reguser.list[/fnc], [fnc]$reguser.match[/fnc], [fnc]$reguser.matchProperty[/fnc] @@ -1075,8 +1075,8 @@ static bool reguser_kvs_fnc_mask(KviKvsModuleFunctionCall * c) static bool reguser_kvs_fnc_property(KviKvsModuleFunctionCall * c) { - QString szName; - QString szProperty; + TQString szName; + TQString szProperty; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("user_name",KVS_PT_STRING,0,szName) KVSM_PARAMETER("property_name",KVS_PT_STRING,KVS_PF_OPTIONAL,szProperty) @@ -1085,7 +1085,7 @@ static bool reguser_kvs_fnc_property(KviKvsModuleFunctionCall * c) KviRegisteredUser * u = g_pRegisteredUserDataBase->findUserByName(szName); if(u) { - QString tmp; + TQString tmp; u->getProperty(szProperty,tmp); c->returnValue()->setString(tmp); } @@ -1100,19 +1100,19 @@ static bool reguser_kvs_fnc_property(KviKvsModuleFunctionCall * c) @short: Returns a property of an entry in the registered user database @syntax: - $reguser.matchProperty(,) + $reguser.matchProperty(,) @description: Returns the value of the property identified by and - bound to the first entry matched by by .[br] + bound to the first entry matched by by .[br] If the property is not set, an empty string is returned.[br] - If no entry matches this function returns an empty string + If no entry matches this function returns an empty string and does not print any error.[br] [example] - %property = $reguser.matchProperty(,) + %property = $reguser.matchProperty(,) [/example] Is actually a shortcut for:[br] [example] - %tmp = [fnc]$reguser.match[/fnc]() + %tmp = [fnc]$reguser.match[/fnc]() if("%tmp" != "")%property = $reguser.property(%tmp,) [/example] @seealso: @@ -1120,7 +1120,7 @@ static bool reguser_kvs_fnc_property(KviKvsModuleFunctionCall * c) [doc:registered_users]Registered users database[/doc], [cmd]reguser.add[/cmd], [cmd]reguser.remove[/cmd], - [cmd]reguser.addmask[/cmd], + [cmd]reguser.addtqmask[/cmd], [fnc]$reguser.list[/fnc], [fnc]$reguser.match[/fnc], [fnc]$reguser.property[/fnc] @@ -1128,19 +1128,19 @@ static bool reguser_kvs_fnc_property(KviKvsModuleFunctionCall * c) static bool reguser_kvs_fnc_matchProperty(KviKvsModuleFunctionCall * c) { - QString szMask; - QString szProperty; + TQString szMask; + TQString szProperty; KVSM_PARAMETERS_BEGIN(c) - KVSM_PARAMETER("user_mask",KVS_PT_STRING,0,szMask) + KVSM_PARAMETER("user_tqmask",KVS_PT_STRING,0,szMask) KVSM_PARAMETER("property_name",KVS_PT_STRING,KVS_PF_OPTIONAL,szProperty) KVSM_PARAMETERS_END(c) - KviIrcMask mask(szMask); -//FIXME: it crashes kvirc KviRegisteredUser * u = c->context()->connection()->userDataBase()->registeredUser(mask.nick(),mask.user(),mask.host()); - KviRegisteredUser * u = g_pRegisteredUserDataBase->findMatchingUser(mask.nick(),mask.user(),mask.host()); + KviIrcMask tqmask(szMask); +//FIXME: it crashes kvirc KviRegisteredUser * u = c->context()->connection()->userDataBase()->registeredUser(tqmask.nick(),tqmask.user(),tqmask.host()); + KviRegisteredUser * u = g_pRegisteredUserDataBase->findMatchingUser(tqmask.nick(),tqmask.user(),tqmask.host()); if(u) { - QString tmp; + TQString tmp; u->getProperty(szProperty,tmp); c->returnValue()->setString(tmp); } @@ -1158,10 +1158,10 @@ static bool reguser_kvs_fnc_matchProperty(KviKvsModuleFunctionCall * c) @short: Shows a registration wizard dialog @syntax: - reguser.wizard [mask] + reguser.wizard [tqmask] @description: Allows registering an user with an intuitive and easy to use interface. - If [mask] is specified , it is used as inital mask in the dialog. + If [tqmask] is specified , it is used as inital tqmask in the dialog. @seealso: [module:reguser]Registered users database interface[/module], [doc:registered_users]Registered users database[/doc], @@ -1170,9 +1170,9 @@ static bool reguser_kvs_fnc_matchProperty(KviKvsModuleFunctionCall * c) static bool reguser_kvs_cmd_wizard(KviKvsModuleCommandCall * c) { - QString szMask; + TQString szMask; KVSM_PARAMETERS_BEGIN(c) - KVSM_PARAMETER("mask",KVS_PT_STRING,KVS_PF_OPTIONAL,szMask) + KVSM_PARAMETER("tqmask",KVS_PT_STRING,KVS_PF_OPTIONAL,szMask) KVSM_PARAMETERS_END(c) KviRegistrationWizard * w = new KviRegistrationWizard(szMask); @@ -1188,8 +1188,8 @@ static bool reguser_module_init(KviModule * m) KVSM_REGISTER_SIMPLE_COMMAND(m,"add",reguser_kvs_cmd_add); KVSM_REGISTER_SIMPLE_COMMAND(m,"remove",reguser_kvs_cmd_remove); - KVSM_REGISTER_SIMPLE_COMMAND(m,"addmask",reguser_kvs_cmd_addmask); - KVSM_REGISTER_SIMPLE_COMMAND(m,"delmask",reguser_kvs_cmd_delmask); + KVSM_REGISTER_SIMPLE_COMMAND(m,"addtqmask",reguser_kvs_cmd_addtqmask); + KVSM_REGISTER_SIMPLE_COMMAND(m,"deltqmask",reguser_kvs_cmd_deltqmask); KVSM_REGISTER_SIMPLE_COMMAND(m,"edit",reguser_kvs_cmd_edit); KVSM_REGISTER_SIMPLE_COMMAND(m,"showlist",reguser_kvs_cmd_showlist); KVSM_REGISTER_SIMPLE_COMMAND(m,"setproperty",reguser_kvs_cmd_setproperty); @@ -1200,7 +1200,7 @@ static bool reguser_module_init(KviModule * m) KVSM_REGISTER_FUNCTION(m,"match",reguser_kvs_fnc_match); KVSM_REGISTER_FUNCTION(m,"list",reguser_kvs_fnc_list); KVSM_REGISTER_FUNCTION(m,"exactMatch",reguser_kvs_fnc_exactMatch); - KVSM_REGISTER_FUNCTION(m,"mask",reguser_kvs_fnc_mask); + KVSM_REGISTER_FUNCTION(m,"tqmask",reguser_kvs_fnc_tqmask); KVSM_REGISTER_FUNCTION(m,"property",reguser_kvs_fnc_property); KVSM_REGISTER_FUNCTION(m,"matchProperty",reguser_kvs_fnc_matchProperty); KVSM_REGISTER_FUNCTION(m,"getIgnoreFlags",reguser_kvs_fnc_getIgnoreFlags); diff --git a/src/modules/reguser/wizard.cpp b/src/modules/reguser/wizard.cpp index 1777621d..8d61617e 100644 --- a/src/modules/reguser/wizard.cpp +++ b/src/modules/reguser/wizard.cpp @@ -32,23 +32,23 @@ #include "kvi_regusersdb.h" #include "kvi_iconmanager.h" #ifdef COMPILE_USE_QT4 -#include +#include #endif -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include extern KVIRC_API KviRegisteredUserDataBase * g_pRegisteredUserDataBase; extern KviPointerList * g_pRegistrationWizardList; -KviRegistrationWizard::KviRegistrationWizard(const char * startMask,KviRegisteredUserDataBase * db,QWidget * par,bool bModal) +KviRegistrationWizard::KviRegistrationWizard(const char * startMask,KviRegisteredUserDataBase * db,TQWidget * par,bool bModal) : KviTalWizard(par) { m_pDb = db; @@ -57,22 +57,22 @@ KviRegistrationWizard::KviRegistrationWizard(const char * startMask,KviRegistere m_bModal = bModal; - KviIrcMask mask(startMask ? startMask : "*!*@*"); + KviIrcMask tqmask(startMask ? startMask : "*!*@*"); g_pRegistrationWizardList->append(this); - QGridLayout* m_pPage1Layout; - QGridLayout* m_pPage2Layout; - QGridLayout* m_pPage3Layout; - QGridLayout* m_pPage4Layout; - QGridLayout* m_pPage5Layout; + TQGridLayout* m_pPage1Layout; + TQGridLayout* m_pPage2Layout; + TQGridLayout* m_pPage3Layout; + TQGridLayout* m_pPage4Layout; + TQGridLayout* m_pPage5Layout; - QLabel* TextLabel10_2; - QLabel* TextLabel10; - QLabel* TextLabel10_3; - QLabel* TextLabel10_3_2; + TQLabel* TextLabel10_2; + TQLabel* TextLabel10; + TQLabel* TextLabel10_3; + TQLabel* TextLabel10_3_2; - QFrame * f; + TQFrame * f; // resize( 490, 456 ); setCaption(__tr2qs("User Registration Wizard - KVIrc")); @@ -80,91 +80,91 @@ KviRegistrationWizard::KviRegistrationWizard(const char * startMask,KviRegistere setSizeGripEnabled( TRUE ); - m_pPage1 = new QWidget(this); - m_pPage1Layout = new QGridLayout(m_pPage1); + m_pPage1 = new TQWidget(this); + m_pPage1Layout = new TQGridLayout(m_pPage1); m_pPage1Layout->setSpacing(4); m_pPage1Layout->setMargin(8); - m_pLabel1 = new QLabel(m_pPage1); + m_pLabel1 = new TQLabel(m_pPage1); m_pLabel1->setText(__tr2qs("

Welcome to the user registration wizard.
This process allows you to add an IRC user to the database and set properties for that user. KVIrc will be (hopefully) able to recognize the user, add him to the notify list, and display the associated avatar.

First of all, you must insert an entry name or real name for the user you're going to register. The name will be used to identify the database entry and has no specific requirements, it can be a given name, nickname, or just some text to remind you of the real person.
Examples: \"George W Bush\", \"Dubya\".\n

" )); m_pPage1Layout->addWidget(m_pLabel1, 0, 0); - m_pEditRealName = new QLineEdit(m_pPage1); - //m_pEditRealName->setAlignment(int(QLineEdit::AlignHCenter)); + m_pEditRealName = new TQLineEdit(m_pPage1); + //m_pEditRealName->tqsetAlignment(int(TQLineEdit::AlignHCenter)); m_pPage1Layout->addWidget(m_pEditRealName,1,0); addPage( m_pPage1,__tr2qs("Step 1: Entry Name")); - if(mask.nick() != "*")m_pEditRealName->setText(mask.nick()); + if(tqmask.nick() != "*")m_pEditRealName->setText(tqmask.nick()); - connect(m_pEditRealName,SIGNAL(textChanged(const QString &)),this,SLOT(realNameChanged(const QString &))); + connect(m_pEditRealName,TQT_SIGNAL(textChanged(const TQString &)),this,TQT_SLOT(realNameChanged(const TQString &))); // PAGE 2 - m_pPage2 = new QWidget(this); - m_pPage2Layout = new QGridLayout( m_pPage2 ); + m_pPage2 = new TQWidget(this); + m_pPage2Layout = new TQGridLayout( m_pPage2 ); m_pPage2Layout->setSpacing( 4 ); m_pPage2Layout->setMargin( 8 ); - m_pLabel2 = new QLabel( m_pPage2); - m_pLabel2->setText(__tr2qs("

A registered user is identified by one or more IRC masks.
A mask must be in the following form:
nickname!username@hostname
and can contain wildcard characters '*' and '?'. Be careful in choosing the masks, as they are the only way to verify the identity of a registered user.

You can enter at most two masks here, if you wish to add more masks, use the \"Edit\" button in the Registered Users dialog. You must enter at least one mask.

")); + m_pLabel2 = new TQLabel( m_pPage2); + m_pLabel2->setText(__tr2qs("

A registered user is identified by one or more IRC tqmasks.
A tqmask must be in the following form:
nickname!username@hostname
and can contain wildcard characters '*' and '?'. Be careful in choosing the tqmasks, as they are the only way to verify the identity of a registered user.

You can enter at most two tqmasks here, if you wish to add more tqmasks, use the \"Edit\" button in the Registered Users dialog. You must enter at least one tqmask.

")); m_pPage2Layout->addMultiCellWidget(m_pLabel2,0,0,0,4); //KviStr szMask; - //mask.mask(szMask,11); + //tqmask.tqmask(szMask,11); - //KviIrcMask masktempl(szMask.ptr()); + //KviIrcMask tqmasktempl(szMask.ptr()); - m_pNicknameEdit1 = new QLineEdit(m_pPage2); - m_pNicknameEdit1->setAlignment(Qt::AlignRight); - if(mask.nick() != "*")m_pNicknameEdit1->setText(mask.nick()); - connect(m_pNicknameEdit1,SIGNAL(textChanged(const QString &)),this,SLOT(maskChanged(const QString &))); + m_pNicknameEdit1 = new TQLineEdit(m_pPage2); + m_pNicknameEdit1->tqsetAlignment(TQt::AlignRight); + if(tqmask.nick() != "*")m_pNicknameEdit1->setText(tqmask.nick()); + connect(m_pNicknameEdit1,TQT_SIGNAL(textChanged(const TQString &)),this,TQT_SLOT(tqmaskChanged(const TQString &))); m_pPage2Layout->addWidget( m_pNicknameEdit1, 1, 0 ); - m_pUsernameEdit1 = new QLineEdit(m_pPage2); - m_pUsernameEdit1->setAlignment(Qt::AlignHCenter); - if(mask.hasUser())m_pUsernameEdit1->setText(mask.user()); - connect(m_pUsernameEdit1,SIGNAL(textChanged(const QString &)),this,SLOT(maskChanged(const QString &))); + m_pUsernameEdit1 = new TQLineEdit(m_pPage2); + m_pUsernameEdit1->tqsetAlignment(TQt::AlignHCenter); + if(tqmask.hasUser())m_pUsernameEdit1->setText(tqmask.user()); + connect(m_pUsernameEdit1,TQT_SIGNAL(textChanged(const TQString &)),this,TQT_SLOT(tqmaskChanged(const TQString &))); m_pPage2Layout->addWidget(m_pUsernameEdit1,1,2); - m_pHostEdit1 = new QLineEdit(m_pPage2); - if(mask.hasHost())m_pHostEdit1->setText(mask.host()); - connect(m_pHostEdit1,SIGNAL(textChanged(const QString &)),this,SLOT(maskChanged(const QString &))); + m_pHostEdit1 = new TQLineEdit(m_pPage2); + if(tqmask.hasHost())m_pHostEdit1->setText(tqmask.host()); + connect(m_pHostEdit1,TQT_SIGNAL(textChanged(const TQString &)),this,TQT_SLOT(tqmaskChanged(const TQString &))); m_pPage2Layout->addWidget(m_pHostEdit1,1,4); - m_pNicknameEdit2 = new QLineEdit(m_pPage2); - m_pNicknameEdit2->setAlignment(Qt::AlignRight); + m_pNicknameEdit2 = new TQLineEdit(m_pPage2); + m_pNicknameEdit2->tqsetAlignment(TQt::AlignRight); m_pPage2Layout->addWidget(m_pNicknameEdit2,2,0); - m_pUsernameEdit2 = new QLineEdit(m_pPage2); - m_pUsernameEdit2->setAlignment(Qt::AlignHCenter); + m_pUsernameEdit2 = new TQLineEdit(m_pPage2); + m_pUsernameEdit2->tqsetAlignment(TQt::AlignHCenter); m_pPage2Layout->addWidget(m_pUsernameEdit2,2,2); - m_pHostEdit2 = new QLineEdit(m_pPage2); + m_pHostEdit2 = new TQLineEdit(m_pPage2); m_pPage2Layout->addWidget(m_pHostEdit2,2,4); - TextLabel10_2 = new QLabel(m_pPage2); + TextLabel10_2 = new TQLabel(m_pPage2); TextLabel10_2->setText("
!
"); - TextLabel10_2->setAlignment(int(Qt::AlignCenter)); + TextLabel10_2->tqsetAlignment(int(TQt::AlignCenter)); m_pPage2Layout->addWidget(TextLabel10_2,2,1); - TextLabel10 = new QLabel(m_pPage2); + TextLabel10 = new TQLabel(m_pPage2); TextLabel10->setText("
!
"); - TextLabel10->setAlignment(int(Qt::AlignCenter)); + TextLabel10->tqsetAlignment(int(TQt::AlignCenter)); m_pPage2Layout->addWidget(TextLabel10,1,1); - TextLabel10_3 = new QLabel(m_pPage2); + TextLabel10_3 = new TQLabel(m_pPage2); TextLabel10_3->setText("
@
"); - TextLabel10_3->setAlignment(int(Qt::AlignCenter)); + TextLabel10_3->tqsetAlignment(int(TQt::AlignCenter)); m_pPage2Layout->addWidget(TextLabel10_3,1,3); - TextLabel10_3_2 = new QLabel(m_pPage2); + TextLabel10_3_2 = new TQLabel(m_pPage2); TextLabel10_3_2->setText("
@
"); - TextLabel10_3_2->setAlignment(int(Qt::AlignCenter)); + TextLabel10_3_2->tqsetAlignment(int(TQt::AlignCenter)); m_pPage2Layout->addWidget(TextLabel10_3_2,2,3); addPage(m_pPage2,__tr2qs("Step 2: Mask Selection")); @@ -173,17 +173,17 @@ KviRegistrationWizard::KviRegistrationWizard(const char * startMask,KviRegistere - m_pPage3 = new QWidget(this); - m_pPage3Layout = new QGridLayout(m_pPage3); + m_pPage3 = new TQWidget(this); + m_pPage3Layout = new TQGridLayout(m_pPage3); m_pPage3Layout->setSpacing(4); m_pPage3Layout->setMargin(8); - m_pLabel3 = new QLabel(m_pPage3); + m_pLabel3 = new TQLabel(m_pPage3); m_pLabel3->setText(__tr2qs("

If you want to store an avatar image for this user, you can set it here. KVIrc will show the avatar in the userlist next to the user's nickname.
An avatar can be in any supported image format (PNG is recommended). Keep in mind that KVIrc stores avatars in memory and has to resize them to fit in the userlist, thus it's better to use small, low-resolution images.

")); m_pPage3Layout->addWidget(m_pLabel3,0,0); - f = new QFrame(m_pPage3); - f->setFrameStyle(QFrame::HLine | QFrame::Sunken); + f = new TQFrame(m_pPage3); + f->setFrameStyle(TQFrame::HLine | TQFrame::Sunken); m_pPage3Layout->addWidget(f,1,0); m_pAvatar = new KviPixmap(); @@ -197,41 +197,41 @@ KviRegistrationWizard::KviRegistrationWizard(const char * startMask,KviRegistere - m_pPage4 = new QWidget(this); - m_pPage4Layout = new QGridLayout(m_pPage4); + m_pPage4 = new TQWidget(this); + m_pPage4Layout = new TQGridLayout(m_pPage4); m_pPage4Layout->setSpacing(4); m_pPage4Layout->setMargin(8); - m_pLabel4 = new QLabel(m_pPage4); + m_pLabel4 = new TQLabel(m_pPage4); m_pLabel4->setText(__tr2qs("

If you want to be notified when this user is online or goes offline, you must specify the list of nicknames that KVIrc will look for.

You can enter at most two nicknames here, if you wish to add more nicknames, use the \"Edit\" button in the Registered Users dialog.

")); m_pPage4Layout->addMultiCellWidget(m_pLabel4,0,0,0,1); - f = new QFrame(m_pPage4); - f->setFrameStyle(QFrame::HLine | QFrame::Sunken); + f = new TQFrame(m_pPage4); + f->setFrameStyle(TQFrame::HLine | TQFrame::Sunken); m_pPage4Layout->addMultiCellWidget(f,1,1,0,1); - m_pNotifyCheck = new QCheckBox(m_pPage4); + m_pNotifyCheck = new TQCheckBox(m_pPage4); m_pNotifyCheck->setText(__tr2qs("Add this user to the notify list")); m_pNotifyCheck->setChecked(false); - connect(m_pNotifyCheck,SIGNAL(toggled(bool)),this,SLOT(notifyCheckToggled(bool))); + connect(m_pNotifyCheck,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(notifyCheckToggled(bool))); m_pPage4Layout->addMultiCellWidget(m_pNotifyCheck,2,2,0,1); - m_pNotifyNickLabel1 = new QLabel(m_pPage4); + m_pNotifyNickLabel1 = new TQLabel(m_pPage4); m_pNotifyNickLabel1->setText(__tr2qs("Nickname:")); m_pPage4Layout->addWidget(m_pNotifyNickLabel1,3,0); - m_pNotifyNickLabel2 = new QLabel(m_pPage4); + m_pNotifyNickLabel2 = new TQLabel(m_pPage4); m_pNotifyNickLabel2->setText(__tr2qs("Nickname 2:")); m_pPage4Layout->addWidget(m_pNotifyNickLabel2,4,0); - m_pNotifyNickEdit1 = new QLineEdit(m_pPage4); - if(mask.nick() != "*")m_pNotifyNickEdit1->setText(mask.nick()); - connect(m_pNotifyNickEdit1,SIGNAL(textChanged(const QString &)),this,SLOT(notifyNickChanged(const QString &))); + m_pNotifyNickEdit1 = new TQLineEdit(m_pPage4); + if(tqmask.nick() != "*")m_pNotifyNickEdit1->setText(tqmask.nick()); + connect(m_pNotifyNickEdit1,TQT_SIGNAL(textChanged(const TQString &)),this,TQT_SLOT(notifyNickChanged(const TQString &))); m_pPage4Layout->addWidget(m_pNotifyNickEdit1,3,1); - m_pNotifyNickEdit2 = new QLineEdit(m_pPage4); - connect(m_pNotifyNickEdit2,SIGNAL(textChanged(const QString &)),this,SLOT(notifyNickChanged(const QString &))); + m_pNotifyNickEdit2 = new TQLineEdit(m_pPage4); + connect(m_pNotifyNickEdit2,TQT_SIGNAL(textChanged(const TQString &)),this,TQT_SLOT(notifyNickChanged(const TQString &))); m_pPage4Layout->addWidget(m_pNotifyNickEdit2,4,1); m_pPage4Layout->setRowStretch(0,1); @@ -242,24 +242,24 @@ KviRegistrationWizard::KviRegistrationWizard(const char * startMask,KviRegistere - m_pPage5 = new QWidget(this); - m_pPage5Layout = new QGridLayout(m_pPage5); + m_pPage5 = new TQWidget(this); + m_pPage5Layout = new TQGridLayout(m_pPage5); m_pPage5Layout->setSpacing(4); m_pPage5Layout->setMargin(8); - m_pTextLabel5 = new QLabel(m_pPage5); + m_pTextLabel5 = new TQLabel(m_pPage5); m_pTextLabel5->setText(__tr2qs("

That's it. The user registration has been completed.

Click \"Finish\" to close this dialog.

")); m_pPage5Layout->addWidget(m_pTextLabel5,0,0); addPage(m_pPage5,__tr2qs("Registration Complete")); setFinishEnabled(m_pPage5,true); - QString dummy; - maskChanged(dummy); + TQString dummy; + tqmaskChanged(dummy); realNameChanged(dummy); notifyCheckToggled(false); - setMinimumSize(QSize(350,420)); + setMinimumSize(TQSize(350,420)); // signals and slots connections } @@ -289,7 +289,7 @@ void KviRegistrationWizard::accept() m_pDb = g_pRegisteredUserDataBase; } - QString szName = m_pEditRealName->text(); + TQString szName = m_pEditRealName->text(); KviRegisteredUser * u; @@ -297,7 +297,7 @@ void KviRegistrationWizard::accept() { if(szName.isEmpty()) szName = "user"; - QString szNameOk = szName; + TQString szNameOk = szName; int idx = 1; @@ -305,7 +305,7 @@ void KviRegistrationWizard::accept() u = m_pDb->findUserByName(szNameOk); if(u) { - KviQString::sprintf(szNameOk,"%Q%d",&szNameOk,idx); + KviTQString::sprintf(szNameOk,"%Q%d",&szNameOk,idx); idx++; } } while(u); @@ -326,9 +326,9 @@ void KviRegistrationWizard::accept() return; } - QString m1 = m_pNicknameEdit1->text(); - QString m2 = m_pUsernameEdit1->text(); - QString m3 = m_pHostEdit1->text(); + TQString m1 = m_pNicknameEdit1->text(); + TQString m2 = m_pUsernameEdit1->text(); + TQString m3 = m_pHostEdit1->text(); KviIrcMask * mk = new KviIrcMask(m1,m2,m3); m_pDb->removeMask(*mk); m_pDb->addMask(u,mk); @@ -350,7 +350,7 @@ void KviRegistrationWizard::accept() if(!m_pAvatar->isNull()) { - QString szPath = m_pAvatar->path(); + TQString szPath = m_pAvatar->path(); u->setProperty("avatar",szPath); bSetAvatar = true; } @@ -384,14 +384,14 @@ void KviRegistrationWizard::accept() } -void KviRegistrationWizard::showEvent(QShowEvent *e) +void KviRegistrationWizard::showEvent(TQShowEvent *e) { if(height() < 420)resize(width(),420); move((g_pApp->desktop()->width() - width())/2,(g_pApp->desktop()->height() - height())/2); KviTalWizard::showEvent(e); } -void KviRegistrationWizard::maskChanged(const QString &) +void KviRegistrationWizard::tqmaskChanged(const TQString &) { KviStr tmp1 = m_pNicknameEdit1->text(); KviStr tmp2 = m_pUsernameEdit1->text(); @@ -415,20 +415,20 @@ void KviRegistrationWizard::maskChanged(const QString &) return; } - KviStr mask(KviStr::Format,"%s!%s@%s",tmp1.ptr(),tmp2.ptr(),tmp3.ptr()); + KviStr tqmask(KviStr::Format,"%s!%s@%s",tmp1.ptr(),tmp2.ptr(),tmp3.ptr()); - //KviIrcMask m(mask.ptr()); + //KviIrcMask m(tqmask.ptr()); - setNextEnabled(m_pPage2,mask!="*!*@*"); + setNextEnabled(m_pPage2,tqmask!="*!*@*"); } -void KviRegistrationWizard::realNameChanged(const QString &) +void KviRegistrationWizard::realNameChanged(const TQString &) { - QString tmp = m_pEditRealName->text(); + TQString tmp = m_pEditRealName->text(); setNextEnabled(m_pPage1,!(tmp.isEmpty() || tmp.isNull())); } -void KviRegistrationWizard::notifyNickChanged(const QString &) +void KviRegistrationWizard::notifyNickChanged(const TQString &) { bool bYes = !m_pNotifyCheck->isChecked(); @@ -457,7 +457,7 @@ void KviRegistrationWizard::notifyCheckToggled(bool) m_pNotifyNickLabel1->setEnabled(bYes); m_pNotifyNickLabel2->setEnabled(bYes); - QString dummy; + TQString dummy; notifyNickChanged(dummy); } diff --git a/src/modules/reguser/wizard.h b/src/modules/reguser/wizard.h index f1446ec6..23cb4572 100644 --- a/src/modules/reguser/wizard.h +++ b/src/modules/reguser/wizard.h @@ -30,18 +30,19 @@ class KviPixmap; class KviPixmapSelector; class KviTalVBoxLayout; class KviTalHBoxLayout; -class QGridLayout; -class QCheckBox; -class QLabel; -class QLineEdit; -class QWidget; +class TQGridLayout; +class TQCheckBox; +class TQLabel; +class TQLineEdit; +class TQWidget; class KviRegisteredUserDataBase; class KviRegistrationWizard : public KviTalWizard { Q_OBJECT + TQ_OBJECT public: - KviRegistrationWizard(const char * startMask,KviRegisteredUserDataBase * db = 0,QWidget * par = 0,bool bModal = false); + KviRegistrationWizard(const char * startMask,KviRegisteredUserDataBase * db = 0,TQWidget * par = 0,bool bModal = false); ~KviRegistrationWizard(); KviRegisteredUserDataBase * m_pDb; @@ -50,39 +51,39 @@ public: bool m_bModal; - QWidget* m_pPage1; - QLabel* m_pLabel1; - QLineEdit* m_pEditRealName; - QWidget* m_pPage2; - QLabel* m_pLabel2; - QLineEdit* m_pNicknameEdit1; - QLineEdit* m_pNicknameEdit2; - QLineEdit* m_pHostEdit1; - QLineEdit* m_pHostEdit2; - QLineEdit* m_pUsernameEdit1; - QLineEdit* m_pUsernameEdit2; - QWidget* m_pPage3; - QLabel* m_pLabel3; + TQWidget* m_pPage1; + TQLabel* m_pLabel1; + TQLineEdit* m_pEditRealName; + TQWidget* m_pPage2; + TQLabel* m_pLabel2; + TQLineEdit* m_pNicknameEdit1; + TQLineEdit* m_pNicknameEdit2; + TQLineEdit* m_pHostEdit1; + TQLineEdit* m_pHostEdit2; + TQLineEdit* m_pUsernameEdit1; + TQLineEdit* m_pUsernameEdit2; + TQWidget* m_pPage3; + TQLabel* m_pLabel3; KviPixmapSelector * m_pAvatarSelector; - QWidget* m_pPage4; - QCheckBox* m_pNotifyCheck; - QLabel* m_pNotifyNickLabel1; - QLabel* m_pNotifyNickLabel2; - QLabel* m_pLabel4; - QLineEdit* m_pNotifyNickEdit1; - QLineEdit* m_pNotifyNickEdit2; - QWidget* m_pPage5; - QLabel* m_pTextLabel5; + TQWidget* m_pPage4; + TQCheckBox* m_pNotifyCheck; + TQLabel* m_pNotifyNickLabel1; + TQLabel* m_pNotifyNickLabel2; + TQLabel* m_pLabel4; + TQLineEdit* m_pNotifyNickEdit1; + TQLineEdit* m_pNotifyNickEdit2; + TQWidget* m_pPage5; + TQLabel* m_pTextLabel5; KviPixmap * m_pAvatar; protected: - virtual void showEvent(QShowEvent *e); + virtual void showEvent(TQShowEvent *e); virtual void accept(); virtual void reject(); protected slots: - void realNameChanged(const QString &str); - void maskChanged(const QString &str); - void notifyNickChanged(const QString &); + void realNameChanged(const TQString &str); + void tqmaskChanged(const TQString &str); + void notifyNickChanged(const TQString &); void notifyCheckToggled(bool); }; diff --git a/src/modules/rijndael/libkvirijndael.cpp b/src/modules/rijndael/libkvirijndael.cpp index 0a678437..07f37afe 100644 --- a/src/modules/rijndael/libkvirijndael.cpp +++ b/src/modules/rijndael/libkvirijndael.cpp @@ -46,7 +46,7 @@ on the Advanced Encryptiong Standard algorithm called Rijndael. Rijndael was originally written by Joan Daemen and Vincent Rijmen. The original Rijndael description is available at http://www.esat.kuleuven.ac.be/~rijmen/rijndael/.[br] - It is a private key block cipher that has been designed to replace + It is a private key block cipher that has been designed to tqreplace the widely used DES, and it should provide at leas a decent security agains common attacks. Theoretically the best attack that one can perform on this cipher is the "brute force" attack that requires a really massive parallel computation: @@ -471,7 +471,7 @@ */ } - static unsigned char fake_base64[]="./0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; + static unsigned char fake_base64[]="./0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPTQRSTUVWXYZ"; unsigned int fake_base64dec(unsigned char c) { @@ -538,9 +538,9 @@ unsigned char * p = (unsigned char *)encoded.ptr(); while(outb < oute) { - Q_UINT32 * dd1 = (Q_UINT32 *)outb; + TQ_UINT32 * dd1 = (TQ_UINT32 *)outb; outb += 4; - Q_UINT32 * dd2 = (Q_UINT32 *)outb; + TQ_UINT32 * dd2 = (TQ_UINT32 *)outb; outb += 4; *p++ = fake_base64[*dd2 & 0x3f]; *dd2 >>= 6; *p++ = fake_base64[*dd2 & 0x3f]; *dd2 >>= 6; @@ -585,9 +585,9 @@ unsigned char * bufp = buf; while(p < e) { - Q_UINT32 * dw1 = (Q_UINT32 *)bufp; + TQ_UINT32 * dw1 = (TQ_UINT32 *)bufp; bufp += 4; - Q_UINT32 * dw2 = (Q_UINT32 *)bufp; + TQ_UINT32 * dw2 = (TQ_UINT32 *)bufp; bufp += 4; *dw2 = 0; for(i=0;i < 6;i++)*dw2 |= (fake_base64dec(*p++)) << (i * 6); diff --git a/src/modules/rijndael/libkvirijndael.h b/src/modules/rijndael/libkvirijndael.h index 900ff252..38a92056 100644 --- a/src/modules/rijndael/libkvirijndael.h +++ b/src/modules/rijndael/libkvirijndael.h @@ -32,6 +32,7 @@ class KviRijndaelEngine : public KviCryptEngine { Q_OBJECT + TQ_OBJECT public: KviRijndaelEngine(); virtual ~KviRijndaelEngine(); @@ -54,6 +55,7 @@ class KviRijndaelHexEngine : public KviRijndaelEngine { Q_OBJECT + TQ_OBJECT public: KviRijndaelHexEngine() : KviRijndaelEngine() {}; virtual ~KviRijndaelHexEngine(){}; @@ -65,6 +67,7 @@ class KviRijndael128HexEngine : public KviRijndaelHexEngine { Q_OBJECT + TQ_OBJECT public: KviRijndael128HexEngine() : KviRijndaelHexEngine() {}; virtual ~KviRijndael128HexEngine(){}; @@ -76,6 +79,7 @@ class KviRijndael192HexEngine : public KviRijndaelHexEngine { Q_OBJECT + TQ_OBJECT public: KviRijndael192HexEngine() : KviRijndaelHexEngine() {}; virtual ~KviRijndael192HexEngine(){}; @@ -87,6 +91,7 @@ class KviRijndael256HexEngine : public KviRijndaelHexEngine { Q_OBJECT + TQ_OBJECT public: KviRijndael256HexEngine() : KviRijndaelHexEngine() {}; virtual ~KviRijndael256HexEngine(){}; @@ -97,6 +102,7 @@ class KviRijndaelBase64Engine : public KviRijndaelEngine { Q_OBJECT + TQ_OBJECT public: KviRijndaelBase64Engine() : KviRijndaelEngine() {}; virtual ~KviRijndaelBase64Engine(){}; @@ -108,6 +114,7 @@ class KviRijndael128Base64Engine : public KviRijndaelBase64Engine { Q_OBJECT + TQ_OBJECT public: KviRijndael128Base64Engine() : KviRijndaelBase64Engine() {}; virtual ~KviRijndael128Base64Engine(){}; @@ -119,6 +126,7 @@ class KviRijndael192Base64Engine : public KviRijndaelBase64Engine { Q_OBJECT + TQ_OBJECT public: KviRijndael192Base64Engine() : KviRijndaelBase64Engine() {}; virtual ~KviRijndael192Base64Engine(){}; @@ -130,6 +138,7 @@ class KviRijndael256Base64Engine : public KviRijndaelBase64Engine { Q_OBJECT + TQ_OBJECT public: KviRijndael256Base64Engine() : KviRijndaelBase64Engine() {}; virtual ~KviRijndael256Base64Engine(){}; @@ -144,6 +153,7 @@ class KviMircryptionEngine : public KviCryptEngine { Q_OBJECT + TQ_OBJECT public: KviMircryptionEngine(); ~KviMircryptionEngine(); @@ -153,7 +163,7 @@ KviStr m_szDecryptKey; bool m_bDecryptCBC; public: - virtual bool isCryptographicEngine(){ return false; }; // we need to return false since it doesn't use the Qt::CTRL+P escape + virtual bool isCryptographicEngine(){ return false; }; // we need to return false since it doesn't use the TQt::CTRL+P escape virtual bool init(const char *encKey,int encKeyLen,const char *decKey,int decKeyLen); virtual KviCryptEngine::EncryptResult encrypt(const char * plainText,KviStr &outBuffer); virtual KviCryptEngine::DecryptResult decrypt(const char * inBuffer,KviStr &plainText); diff --git a/src/modules/setup/libkvisetup.cpp b/src/modules/setup/libkvisetup.cpp index 7f5bad25..07ffc359 100644 --- a/src/modules/setup/libkvisetup.cpp +++ b/src/modules/setup/libkvisetup.cpp @@ -26,8 +26,8 @@ #include "setupwizard.h" -#include -#include +#include +#include #include "kvi_options.h" #include "kvi_defaults.h" @@ -39,14 +39,14 @@ #include "kvi_ircserverdb.h" // this will be choosen during the setup process -QString g_szChoosenIncomingDirectory; +TQString g_szChoosenIncomingDirectory; //int g_iThemeToApply = THEME_APPLY_NONE; bool bNeedToApplyDefaults; unsigned int uPort; -QString szHost; -QString szUrl; -QString szMircServers; -QString szMircIni; +TQString szHost; +TQString szUrl; +TQString szMircServers; +TQString szMircIni; @@ -61,7 +61,7 @@ KVIMODULEEXPORTFUNC bool setup_begin() KviSetupWizard * w = new KviSetupWizard(); int retcode = w->exec(); delete w; - return (retcode == QDialog::Accepted); + return (retcode == TQDialog::Accepted); } @@ -76,8 +76,8 @@ KVIMODULEEXPORTFUNC void setup_finish() KVI_OPTION_STRING(KviOption_stringIncomingPath) = g_szChoosenIncomingDirectory; // Reset the quit message and the real name... if they contain the KVIrc version // then probably the user hasn't even edited them. - if(KVI_OPTION_STRING(KviOption_stringQuitMessage).find("KVIrc",0,false) != -1) - KVI_OPTION_STRING(KviOption_stringQuitMessage) = KVI_DEFAULT_QUIT_MESSAGE; + if(KVI_OPTION_STRING(KviOption_stringQuitMessage).tqfind("KVIrc",0,false) != -1) + KVI_OPTION_STRING(KviOption_stringQuitMessage) = KVI_DEFAULT_TQUIT_MESSAGE; // We deserve to change the user's part message in something nice :) KVI_OPTION_STRING(KviOption_stringPartMessage) = KVI_DEFAULT_PART_MESSAGE; @@ -86,7 +86,7 @@ KVIMODULEEXPORTFUNC void setup_finish() // #define KVI_DEFAULT_AWAY_MESSAGE "I'm off to see the wizard." // Apply the choosen default theme - QString szDir; + TQString szDir; /* switch(g_iThemeToApply) { case THEME_APPLY_HIRES: diff --git a/src/modules/setup/setupwizard.cpp b/src/modules/setup/setupwizard.cpp index 5b8c1ff7..3d23a476 100644 --- a/src/modules/setup/setupwizard.cpp +++ b/src/modules/setup/setupwizard.cpp @@ -38,12 +38,12 @@ bool g_bFoundMirc; #include "kvi_config.h" #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include "kvi_tal_hbox.h" #ifdef COMPILE_ON_WINDOWS @@ -56,18 +56,18 @@ bool g_bFoundMirc; #endif #ifdef COMPILE_USE_QT4 - #include + #include #endif // libkvisetup.cpp -extern QString g_szChoosenIncomingDirectory; +extern TQString g_szChoosenIncomingDirectory; //extern int g_iThemeToApply; extern bool bNeedToApplyDefaults; extern unsigned int uPort; -extern QString szHost; -extern QString szUrl; -extern QString szMircServers; -extern QString szMircIni; +extern TQString szHost; +extern TQString szUrl; +extern TQString szMircServers; +extern TQString szMircIni; #ifdef COMPILE_ON_WINDOWS #define KVI_LOCAL_KVIRC_SUBDIRECTORY_NAME "KVIrc" @@ -76,11 +76,11 @@ extern QString szMircIni; #endif KviSetupPage::KviSetupPage(KviSetupWizard * w) -: QWidget(w) +: TQWidget(w) { - QGridLayout * g = new QGridLayout(this); + TQGridLayout * g = new TQGridLayout(this); - //setBackgroundColor(QColor(255,0,0)); + //setBackgroundColor(TQColor(255,0,0)); // we need this to set localized text on buttons (see QT doc/ KviTalWizard class) w->KviTalWizard::backButton()->setText(__tr2qs("< &Back")); @@ -89,12 +89,12 @@ KviSetupPage::KviSetupPage(KviSetupWizard * w) w->KviTalWizard::cancelButton()->setText(__tr2qs("Cancel")); //w->KviTalWizard::helpButton()->setText(__tr2qs("Help")); - m_pPixmapLabel = new QLabel(this); + m_pPixmapLabel = new TQLabel(this); g->addWidget(m_pPixmapLabel,0,0); m_pPixmapLabel->setPixmap(*(w->m_pLabelPixmap)); m_pPixmapLabel->setFixedSize(w->m_pLabelPixmap->size()); - m_pPixmapLabel->setFrameStyle(QFrame::Sunken | QFrame::StyledPanel); + m_pPixmapLabel->setFrameStyle(TQFrame::Sunken | TQFrame::StyledPanel); m_pPixmapLabel->setMargin(0); g->setSpacing(8); @@ -103,32 +103,32 @@ KviSetupPage::KviSetupPage(KviSetupWizard * w) m_pVBox = new KviTalVBox(this); m_pVBox->setSpacing(4); m_pVBox->setMargin(0); - //m_pVBox->setSizePolicy(QSizePolicy(QSizePolicy::Expanding)); - //m_pVBox->setBackgroundColor(QColor(0,80,0)); + //m_pVBox->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Expanding)); + //m_pVBox->setBackgroundColor(TQColor(0,80,0)); //m_pVBox->setMaximumHeight(450); g->addWidget(m_pVBox,0,1); g->setColStretch(1,1); - QLabel * l = new QLabel(m_pVBox); - l->setAlignment(Qt::AlignAuto | Qt::AlignTop); + TQLabel * l = new TQLabel(m_pVBox); + l->tqsetAlignment(TQt::AlignAuto | TQt::AlignTop); /* - QString szHeader = "
" \ + TQString szHeader = "
" \ "

KVIrc " KVI_VERSION "

" \ "
"; */ - QString szHeader = "

 KVIrc " KVI_VERSION "

"; + TQString szHeader = "

 KVIrc " KVI_VERSION "

"; l->setText(szHeader); - l->setFrameStyle(QFrame::Sunken | QFrame::StyledPanel); - l->setAlignment(Qt::AlignAuto | Qt::AlignVCenter); + l->setFrameStyle(TQFrame::Sunken | TQFrame::StyledPanel); + l->tqsetAlignment(TQt::AlignAuto | TQt::AlignVCenter); l->setMargin(0); - l->setBackgroundColor(QColor(48,48,48)); + l->setBackgroundColor(TQColor(48,48,48)); - m_pTextLabel = new QLabel(m_pVBox); + m_pTextLabel = new TQLabel(m_pVBox); #ifdef COMPILE_USE_QT4 m_pTextLabel->setWordWrap(true); #endif - m_pTextLabel->setAlignment(Qt::AlignJustify | Qt::AlignTop); + m_pTextLabel->tqsetAlignment(TQt::AlignJustify | TQt::AlignTop); m_pVBox->setStretchFactor(m_pTextLabel,1); } @@ -143,16 +143,16 @@ KviSetupWizard::KviSetupWizard() setModal(true); g_bFoundMirc = false; - QString szLabelText; + TQString szLabelText; - QString szImagePath; + TQString szImagePath; g_pApp->getGlobalKvircDirectory(szImagePath,KviApp::Pics,"kvi_setup_label.png"); - m_pLabelPixmap = new QPixmap(szImagePath); + m_pLabelPixmap = new TQPixmap(szImagePath); if(m_pLabelPixmap->isNull()) { delete m_pLabelPixmap; - m_pLabelPixmap = new QPixmap(250,450); + m_pLabelPixmap = new TQPixmap(250,450); } ///////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -161,7 +161,7 @@ KviSetupWizard::KviSetupWizard() m_pWelcome = new KviSetupPage(this); // here we go... - QString szText = __tr2qs("

" \ + TQString szText = __tr2qs("

" \ "

Welcome :)

" \ "This is your first time running this version of KVIrc.
" \ "This wizard will guide you through the few steps " \ @@ -195,8 +195,8 @@ KviSetupWizard::KviSetupWizard() KviTalTextEdit * ed = new KviTalTextEdit(m_pLicense->m_pVBox); ed->setReadOnly(true); ed->setWordWrap(KviTalTextEdit::NoWrap); - QString szLicense; - QString szLicensePath; + TQString szLicense; + TQString szLicensePath; g_pApp->getGlobalKvircDirectory(szLicensePath,KviApp::License,"EULA"); if(!KviFileUtils::loadFile(szLicensePath,szLicense)) { @@ -233,66 +233,66 @@ KviSetupWizard::KviSetupWizard() addPage(m_pDirectory,__tr2qs("Application Folders")); - QString tmp; + TQString tmp; m_pDirButtonGroup = new KviTalVButtonGroup(__tr2qs("Store configuration in folder"),m_pDirectory->m_pVBox); - m_pDirUsePrev = new QRadioButton(__tr2qs("Use settings folder from previous installation"),m_pDirButtonGroup); - connect(m_pDirUsePrev,SIGNAL(clicked()),this,SLOT(oldDirClicked())); + m_pDirUsePrev = new TQRadioButton(__tr2qs("Use settings folder from previous installation"),m_pDirButtonGroup); + connect(m_pDirUsePrev,TQT_SIGNAL(clicked()),this,TQT_SLOT(oldDirClicked())); m_pOldPathBox = new KviTalHBox(m_pDirButtonGroup); - m_pOldDataPathEdit = new QLineEdit(m_pOldPathBox); - connect(m_pOldDataPathEdit,SIGNAL(textChanged ( const QString & )),this,SLOT(oldDataTextChanged ( const QString & ))); + m_pOldDataPathEdit = new TQLineEdit(m_pOldPathBox); + connect(m_pOldDataPathEdit,TQT_SIGNAL(textChanged ( const TQString & )),this,TQT_SLOT(oldDataTextChanged ( const TQString & ))); - QPushButton * pb = new QPushButton(__tr2qs("&Browse..."),m_pOldPathBox); - connect(pb,SIGNAL(clicked()),this,SLOT(chooseOldDataPath())); + TQPushButton * pb = new TQPushButton(__tr2qs("&Browse..."),m_pOldPathBox); + connect(pb,TQT_SIGNAL(clicked()),this,TQT_SLOT(chooseOldDataPath())); m_pOldPathBox->setSpacing(3); m_pOldPathBox->setStretchFactor(m_pOldDataPathEdit,1); - m_pDirUseNew = new QRadioButton(__tr2qs("Use new settings folder"),m_pDirButtonGroup); - connect(m_pDirUseNew,SIGNAL(clicked()),this,SLOT(newDirClicked())); + m_pDirUseNew = new TQRadioButton(__tr2qs("Use new settings folder"),m_pDirButtonGroup); + connect(m_pDirUseNew,TQT_SIGNAL(clicked()),this,TQT_SLOT(newDirClicked())); - QLabel* l = new QLabel(m_pDirButtonGroup); + TQLabel* l = new TQLabel(m_pDirButtonGroup); l->setText(__tr2qs("Settings folder:")); m_pNewPathBox = new KviTalHBox(m_pDirButtonGroup); - m_pDataPathEdit = new QLineEdit(m_pNewPathBox); + m_pDataPathEdit = new TQLineEdit(m_pNewPathBox); - pb = new QPushButton(__tr2qs("&Browse..."),m_pNewPathBox); - connect(pb,SIGNAL(clicked()),this,SLOT(chooseDataPath())); + pb = new TQPushButton(__tr2qs("&Browse..."),m_pNewPathBox); + connect(pb,TQT_SIGNAL(clicked()),this,TQT_SLOT(chooseDataPath())); m_pNewPathBox->setSpacing(3); m_pNewPathBox->setStretchFactor(m_pDataPathEdit,1); #ifdef COMPILE_ON_WINDOWS - tmp = QTextCodec::codecForLocale()->toUnicode(getenv( "APPDATA" )); + tmp = TQTextCodec::codecForLocale()->toUnicode(getenv( "APPDATA" )); if(tmp.isEmpty()) - tmp = QDir::homeDirPath(); + tmp = TQDir::homeDirPath(); #else - tmp = QDir::homeDirPath(); + tmp = TQDir::homeDirPath(); #endif //COMPILE_ON_WINDOWS - KviQString::ensureLastCharIs(tmp,KVI_PATH_SEPARATOR_CHAR); + KviTQString::ensureLastCharIs(tmp,KVI_PATH_SEPARATOR_CHAR); tmp.append(KVI_LOCAL_KVIRC_SUBDIRECTORY_NAME); KviFileUtils::adjustFilePath(tmp); m_pDataPathEdit->setText(tmp); - l = new QLabel(m_pDirButtonGroup); + l = new TQLabel(m_pDirButtonGroup); l->setText(__tr2qs("Download files to folder:")); m_pNewIncomingBox = new KviTalHBox(m_pDirButtonGroup); - m_pIncomingPathEdit = new QLineEdit(m_pNewIncomingBox); + m_pIncomingPathEdit = new TQLineEdit(m_pNewIncomingBox); - pb = new QPushButton(__tr2qs("&Browse..."),m_pNewIncomingBox); - connect(pb,SIGNAL(clicked()),this,SLOT(chooseIncomingPath())); + pb = new TQPushButton(__tr2qs("&Browse..."),m_pNewIncomingBox); + connect(pb,TQT_SIGNAL(clicked()),this,TQT_SLOT(chooseIncomingPath())); m_pNewIncomingBox->setSpacing(3); m_pNewIncomingBox->setStretchFactor(m_pIncomingPathEdit,1); - tmp = QDir::homeDirPath(); - KviQString::ensureLastCharIs(tmp,KVI_PATH_SEPARATOR_CHAR); + tmp = TQDir::homeDirPath(); + KviTQString::ensureLastCharIs(tmp,KVI_PATH_SEPARATOR_CHAR); tmp.append(KVI_DEFAULT_INCOMING_SUBDIRECTORY_NAME); KviFileUtils::adjustFilePath(tmp); m_pIncomingPathEdit->setText(tmp); @@ -301,21 +301,21 @@ KviSetupWizard::KviSetupWizard() newDirClicked(); #ifdef COMPILE_ON_WINDOWS - m_pDirMakePortable = new QRadioButton(__tr2qs("All settings in shared program folder (portable)") + m_pDirMakePortable = new TQRadioButton(__tr2qs("All settings in shared program folder (portable)") ,m_pDirButtonGroup); #endif // Pragma: Unused, takes only space. - //m_pDirRestore = new QRadioButton(__tr2qs("Restore from backup archive"),m_pDirButtonGroup); + //m_pDirRestore = new TQRadioButton(__tr2qs("Restore from backup archive"),m_pDirButtonGroup); //m_pDirRestore->setEnabled(FALSE); - //l = new QLabel(m_pDirectory->m_pVBox," "); + //l = new TQLabel(m_pDirectory->m_pVBox," "); //m_pDirectory->m_pVBox->setStretchFactor(m_pDirectory->m_pTextLabel,1); setHelpEnabled(m_pDirectory,false); - connect(m_pDataPathEdit,SIGNAL(textChanged ( const QString & )),this,SLOT(newDataTextChanged ( const QString & ))); - connect(m_pIncomingPathEdit,SIGNAL(textChanged ( const QString & )),this,SLOT(newIncomingTextChanged ( const QString & ))); + connect(m_pDataPathEdit,TQT_SIGNAL(textChanged ( const TQString & )),this,TQT_SLOT(newDataTextChanged ( const TQString & ))); + connect(m_pIncomingPathEdit,TQT_SIGNAL(textChanged ( const TQString & )),this,TQT_SLOT(newIncomingTextChanged ( const TQString & ))); ///////////////////////////////////////////////////////////////////////////////////////////////////////////// // Identity @@ -329,7 +329,7 @@ KviSetupWizard::KviSetupWizard() "If in doubt, just enter the first nick that comes to mind. " \ "You will be able to change it later in the Identity properties, or with the /NICK command.")); - QString nick; + TQString nick; char * nnn = kvi_getenv("USER"); if(nnn)nick = nnn; else nick = "newbie"; @@ -337,18 +337,18 @@ KviSetupWizard::KviSetupWizard() if(nick == "root")nick = "newbie"; //m_pIdentity->m_pVBox //__tr2qs("Basic Properties") - KviTalGroupBox * gbox = new KviTalGroupBox(1,Qt::Horizontal,QString(),m_pIdentity->m_pVBox); + KviTalGroupBox * gbox = new KviTalGroupBox(1,Qt::Horizontal,TQString(),m_pIdentity->m_pVBox); m_pNickSelector = new KviStringSelector(gbox,__tr2qs("Nickname:"),&(KVI_OPTION_STRING(KviOption_stringNickname1)),true); m_pNickSelector->setMinimumLabelWidth(120); - QValidator * v = new QRegExpValidator(QRegExp("[^-0-9 ][^ ]*"),gbox); + TQValidator * v = new TQRegExpValidator(TQRegExp("[^-0-9 ][^ ]*"),TQT_TQOBJECT(gbox)); m_pNickSelector->setValidator(v); - QString szOptionalCtcpUserInfo = __tr2qs("This field is optional and will appear as part of the CTCP USERINFO reply."); - QString szCenterBegin("
"); - QString szCenterEnd("
"); - QString szTrailing = "

" + szOptionalCtcpUserInfo + szCenterEnd; + TQString szOptionalCtcpUserInfo = __tr2qs("This field is optional and will appear as part of the CTCP USERINFO reply."); + TQString szCenterBegin("
"); + TQString szCenterEnd("
"); + TQString szTrailing = "

" + szOptionalCtcpUserInfo + szCenterEnd; gbox = new KviTalGroupBox(1,Qt::Horizontal,__tr2qs("Profile"),m_pIdentity->m_pVBox); @@ -358,16 +358,16 @@ KviSetupWizard::KviSetupWizard() KviTalHBox* hb = new KviTalHBox(gbox); hb->setSpacing(4); - l = new QLabel(__tr2qs("Age:"),hb); + l = new TQLabel(__tr2qs("Age:"),hb); l->setMinimumWidth(120); - m_pAgeCombo = new QComboBox(hb); + m_pAgeCombo = new TQComboBox(hb); m_pAgeCombo->insertItem(__tr2qs("Unspecified")); unsigned int i; for(i=1;i<120;i++) { - QString tmp; + TQString tmp; tmp.setNum(i); m_pAgeCombo->insertItem(tmp); } @@ -384,18 +384,18 @@ KviSetupWizard::KviSetupWizard() hb = new KviTalHBox(gbox); hb->setSpacing(4); - l = new QLabel(__tr2qs("Gender:"),hb); + l = new TQLabel(__tr2qs("Gender:"),hb); l->setMinimumWidth(120); - m_pGenderCombo = new QComboBox(hb); + m_pGenderCombo = new TQComboBox(hb); m_pGenderCombo->insertItem(__tr2qs("Unspecified")); m_pGenderCombo->insertItem(__tr2qs("Female")); m_pGenderCombo->insertItem(__tr2qs("Male")); - if(KviQString::equalCI(KVI_OPTION_STRING(KviOption_stringCtcpUserInfoGender),"Male")) + if(KviTQString::equalCI(KVI_OPTION_STRING(KviOption_stringCtcpUserInfoGender),"Male")) m_pGenderCombo->setCurrentItem(2); - else if(KviQString::equalCI(KVI_OPTION_STRING(KviOption_stringCtcpUserInfoGender),"Female")) + else if(KviTQString::equalCI(KVI_OPTION_STRING(KviOption_stringCtcpUserInfoGender),"Female")) m_pGenderCombo->setCurrentItem(1); else m_pGenderCombo->setCurrentItem(0); @@ -413,7 +413,7 @@ KviSetupWizard::KviSetupWizard() addPage(m_pIdentity,__tr2qs("Identity")); - //l = new QLabel(m_pIdentity->m_pVBox," "); + //l = new TQLabel(m_pIdentity->m_pVBox," "); setHelpEnabled(m_pIdentity,false); @@ -436,43 +436,43 @@ KviSetupWizard::KviSetupWizard() KviTalVBox* pThemesVb = new KviTalVBox(pThemesHb); - QString szThemeImagePath; + TQString szThemeImagePath; g_pApp->getGlobalKvircDirectory(szThemeImagePath,KviApp::Pics,"kvi_setup_theme_hires.png"); - QPixmap* pHiResPixmap = new QPixmap(szThemeImagePath); + TQPixmap* pHiResPixmap = new TQPixmap(szThemeImagePath); if(pHiResPixmap->isNull()) { delete pHiResPixmap; - pHiResPixmap= new QPixmap(250,200); + pHiResPixmap= new TQPixmap(250,200); } - QLabel* pPixmapLabelHiRes = new QLabel(pThemesVb); + TQLabel* pPixmapLabelHiRes = new TQLabel(pThemesVb); pPixmapLabelHiRes->setPixmap(*pHiResPixmap); pPixmapLabelHiRes->setFixedSize(pHiResPixmap->size()); - pPixmapLabelHiRes->setFrameStyle(QFrame::Sunken | QFrame::StyledPanel); + pPixmapLabelHiRes->setFrameStyle(TQFrame::Sunken | TQFrame::StyledPanel); pPixmapLabelHiRes->setMargin(0); - m_pThemeHiRes = new QRadioButton(__tr2qs("&Fancy Theme"),pThemesVb); + m_pThemeHiRes = new TQRadioButton(__tr2qs("&Fancy Theme"),pThemesVb); pThemesVb = new KviTalVBox(pThemesHb); g_pApp->getGlobalKvircDirectory(szThemeImagePath,KviApp::Pics,"kvi_setup_theme_lowres.png"); - QPixmap* pLowResPixmap = new QPixmap(szThemeImagePath); + TQPixmap* pLowResPixmap = new TQPixmap(szThemeImagePath); if(pLowResPixmap->isNull()) { delete pLowResPixmap; - pLowResPixmap= new QPixmap(250,200); + pLowResPixmap= new TQPixmap(250,200); } - QLabel* pPixmapLabelLowRes = new QLabel(pThemesVb); + TQLabel* pPixmapLabelLowRes = new TQLabel(pThemesVb); pPixmapLabelLowRes->setPixmap(*pLowResPixmap); pPixmapLabelLowRes->setFixedSize(pLowResPixmap->size()); - pPixmapLabelLowRes->setFrameStyle(QFrame::Sunken | QFrame::StyledPanel); + pPixmapLabelLowRes->setFrameStyle(TQFrame::Sunken | TQFrame::StyledPanel); pPixmapLabelLowRes->setMargin(0); - m_pThemeLoRes = new QRadioButton(__tr2qs("&Minimalist Theme"),pThemesVb); - m_pThemeNone = new QRadioButton(__tr2qs("&Don't apply any theme"),m_pThemeButtonGroup); + m_pThemeLoRes = new TQRadioButton(__tr2qs("&Minimalist Theme"),pThemesVb); + m_pThemeNone = new TQRadioButton(__tr2qs("&Don't apply any theme"),m_pThemeButtonGroup); m_pThemeButtonGroup->insert(m_pThemeHiRes); m_pThemeButtonGroup->insert(m_pThemeLoRes); @@ -501,16 +501,16 @@ KviSetupWizard::KviSetupWizard() addPage(m_pDesktopIntegration,__tr2qs("Desktop Integration")); #ifdef COMPILE_ON_WINDOWS - m_pCreateUrlHandlers = new QCheckBox(__tr2qs("Make KVIrc default IRC client"),m_pDesktopIntegration->m_pVBox); + m_pCreateUrlHandlers = new TQCheckBox(__tr2qs("Make KVIrc default IRC client"),m_pDesktopIntegration->m_pVBox); m_pCreateUrlHandlers->setChecked(true); #endif #ifdef COMPILE_KDE_SUPPORT - m_pCreateDesktopShortcut = new QCheckBox(__tr2qs("Create desktop shortcut"),m_pDesktopIntegration->m_pVBox); + m_pCreateDesktopShortcut = new TQCheckBox(__tr2qs("Create desktop shortcut"),m_pDesktopIntegration->m_pVBox); m_pCreateDesktopShortcut->setChecked(true); #endif #ifdef COMPILE_ON_WINDOWS - m_pUseMircServerList = new QRadioButton(__tr2qs("Import server list from mIRC"),m_pDesktopIntegration->m_pVBox); + m_pUseMircServerList = new TQRadioButton(__tr2qs("Import server list from mIRC"),m_pDesktopIntegration->m_pVBox); m_pUseMircServerList->setEnabled(false); #endif @@ -527,9 +527,9 @@ KviSetupWizard::KviSetupWizard() m_pServersButtonGroup = new KviTalVButtonGroup(__tr2qs("Choose a server to connect"),m_pServers->m_pVBox); - m_pServersChooseFromList = new QRadioButton(__tr2qs("Choose from built-in server list"),m_pServersButtonGroup); + m_pServersChooseFromList = new TQRadioButton(__tr2qs("Choose from built-in server list"),m_pServersButtonGroup); - m_pServersSpecifyManually = new QRadioButton(__tr2qs("Specify server manually"),m_pServersButtonGroup); + m_pServersSpecifyManually = new TQRadioButton(__tr2qs("Specify server manually"),m_pServersButtonGroup); hb = new KviTalHBox(m_pServersButtonGroup); m_uServerPort=6667; @@ -537,13 +537,13 @@ KviSetupWizard::KviSetupWizard() m_pServerPortSelector = new KviUIntSelector(hb,__tr2qs("Port:"),&m_uServerPort,1,65536,6667,true,false); - m_pServersOpenIrcUrl = new QRadioButton(__tr2qs("Open irc:// or irc6:// URL"),m_pServersButtonGroup); + m_pServersOpenIrcUrl = new TQRadioButton(__tr2qs("Open irc:// or irc6:// URL"),m_pServersButtonGroup); m_szServerUrl="irc://"; m_pServerUrlSelector = new KviStringSelector(m_pServersButtonGroup,__tr2qs("URL:"),&m_szServerUrl,true); */ /* - m_pServersLoadConfig = new QRadioButton(__tr2qs("Use server config"),m_pServersButtonGroup); + m_pServersLoadConfig = new TQRadioButton(__tr2qs("Use server config"),m_pServersButtonGroup); m_pServersLoadConfig->setEnabled(FALSE); m_pServerConfigSelector = new KviFileSelector(m_pServersButtonGroup,__tr2qs("Config file:"),&m_szServerConfigFile,true); m_pServerConfigSelector->setEnabled(FALSE); @@ -557,7 +557,7 @@ KviSetupWizard::KviSetupWizard() // Preconfigured values #ifdef COMPILE_ON_WINDOWS - QString szTmp; + TQString szTmp; g_pApp->getGlobalKvircDirectory(szTmp,KviApp::Config,"preinstalled.kvc"); if(KviFileUtils::fileExists(szTmp)) { @@ -588,21 +588,21 @@ KviSetupWizard::KviSetupWizard() } //mIRC import - #define QUERY_BUFFER 2048 + #define TQUERY_BUFFER 2048 char* buffer; - DWORD len = QUERY_BUFFER; + DWORD len = TQUERY_BUFFER; buffer = (char*)malloc(len*sizeof(char)); HKEY hKey; - QString szMircDir; + TQString szMircDir; if(RegOpenKeyEx(HKEY_CLASSES_ROOT,"ChatFile\\DefaultIcon",0,KEY_READ,&hKey) == ERROR_SUCCESS ) { if( RegQueryValueEx( hKey,0,0,0,(LPBYTE)buffer,&len) == ERROR_SUCCESS) { - szMircDir = QString::fromLocal8Bit(buffer,len); + szMircDir = TQString::fromLocal8Bit(buffer,len); szMircDir.remove('"'); - QString szMircFile = KviFileUtils::extractFileName(szMircDir); + TQString szMircFile = KviFileUtils::extractFileName(szMircDir); szMircFile = szMircFile.left(szMircFile.length()-4); //cut off ".exe" szMircDir = KviFileUtils::extractFilePath(szMircDir); @@ -620,16 +620,16 @@ KviSetupWizard::KviSetupWizard() { g_bFoundMirc = true; cfg.setGroup("mirc"); - m_pNickSelector->setText(cfg.readQStringEntry("nick",KVI_OPTION_STRING(KviOption_stringNickname1))); - m_pRealNameSelector->setText(cfg.readQStringEntry("user",KVI_OPTION_STRING(KviOption_stringRealname))); + m_pNickSelector->setText(cfg.readTQStringEntry("nick",KVI_OPTION_STRING(KviOption_stringNickname1))); + m_pRealNameSelector->setText(cfg.readTQStringEntry("user",KVI_OPTION_STRING(KviOption_stringRealname))); KVI_OPTION_STRING(KviOption_stringNickname2) = - cfg.readQStringEntry("anick",KVI_OPTION_STRING(KviOption_stringNickname2)); + cfg.readTQStringEntry("anick",KVI_OPTION_STRING(KviOption_stringNickname2)); KVI_OPTION_STRING(KviOption_stringUsername) = - cfg.readQStringEntry("email",KVI_OPTION_STRING(KviOption_stringUsername)).section('@',0,0); + cfg.readTQStringEntry("email",KVI_OPTION_STRING(KviOption_stringUsername)).section('@',0,0); if(cfg.hasGroup("files")) { - m_szMircServerIniFile = cfg.readQStringEntry("servers","servers.ini"); + m_szMircServerIniFile = cfg.readTQStringEntry("servers","servers.ini"); m_szMircServerIniFile.prepend('/'); m_szMircServerIniFile.prepend(szMircDir); if(KviFileUtils::fileExists(m_szMircServerIniFile)) @@ -657,10 +657,10 @@ KviSetupWizard::~KviSetupWizard() delete m_pLabelPixmap; } -void KviSetupWizard::showEvent(QShowEvent *e) +void KviSetupWizard::showEvent(TQShowEvent *e) { - int w = QApplication::desktop()->width(); - int h = QApplication::desktop()->height(); + int w = TQApplication::desktop()->width(); + int h = TQApplication::desktop()->height(); int ww = width(); int wh = height(); @@ -673,7 +673,7 @@ void KviSetupWizard::showEvent(QShowEvent *e) if(ww < 770)ww = 770; } - //wh = sizeHint().height(); + //wh = tqsizeHint().height(); setGeometry((w - ww) / 2,(h - wh) / 2,ww,wh); @@ -694,17 +694,17 @@ void KviSetupWizard::oldDirClicked() else setNextEnabled(m_pDirectory,true); } -void KviSetupWizard::oldDataTextChanged ( const QString & str) +void KviSetupWizard::oldDataTextChanged ( const TQString & str) { setNextEnabled(m_pDirectory,!str.isEmpty()); } -void KviSetupWizard::newDataTextChanged ( const QString & str) +void KviSetupWizard::newDataTextChanged ( const TQString & str) { setNextEnabled(m_pDirectory,!str.isEmpty() && !m_pIncomingPathEdit->text().isEmpty()); } -void KviSetupWizard::newIncomingTextChanged ( const QString & str) +void KviSetupWizard::newIncomingTextChanged ( const TQString & str) { setNextEnabled(m_pDirectory,!str.isEmpty() && !m_pDataPathEdit->text().isEmpty()); } @@ -724,21 +724,21 @@ void KviSetupWizard::newDirClicked() } void KviSetupWizard::chooseOldDataPath() { - QString szBuffer = KviTalFileDialog::getExistingDirectoryPath(m_pDataPathEdit->text(),__tr2qs("Choose an Old Configuration Folder - KVIrc Setup"),0); + TQString szBuffer = KviTalFileDialog::getExistingDirectoryPath(m_pDataPathEdit->text(),__tr2qs("Choose an Old Configuration Folder - KVIrc Setup"),0); if(!szBuffer.isEmpty()) { - KviQString::ensureLastCharIs(szBuffer,KVI_PATH_SEPARATOR_CHAR); + KviTQString::ensureLastCharIs(szBuffer,KVI_PATH_SEPARATOR_CHAR); if(!g_pApp->checkLocalKvircDirectory(szBuffer)) { if( - QMessageBox::question( + TQMessageBox::question( this, __tr2qs("Do not overwrite folder? - KVIrc"), - tr("A folder %1 seems to be not a valid KVIrc settings folder." + tqtr("A folder %1 seems to be not a valid KVIrc settings folder." "Do you want to use it anyway?") - .arg( szBuffer ), + .tqarg( szBuffer ), __tr2qs("&Yes"), __tr2qs("&No"), - QString::null, 0, 1 ) == 0 + TQString(), 0, 1 ) == 0 ) { m_pOldDataPathEdit->setText(szBuffer); } @@ -750,18 +750,18 @@ void KviSetupWizard::chooseOldDataPath() void KviSetupWizard::chooseDataPath() { - QString szBuffer = KviTalFileDialog::getExistingDirectoryPath(m_pDataPathEdit->text(),__tr2qs("Choose a Configuration Folder - KVIrc Setup"),0); + TQString szBuffer = KviTalFileDialog::getExistingDirectoryPath(m_pDataPathEdit->text(),__tr2qs("Choose a Configuration Folder - KVIrc Setup"),0); if(!szBuffer.isEmpty()) { - KviQString::ensureLastCharIs(szBuffer,KVI_PATH_SEPARATOR_CHAR); + KviTQString::ensureLastCharIs(szBuffer,KVI_PATH_SEPARATOR_CHAR); m_pDataPathEdit->setText(szBuffer); } } void KviSetupWizard::chooseIncomingPath() { - //QString szBuffer = QFileDialog::getExistingDirectory(m_pIncomingPathEdit->text(),0,0,__tr2qs("Choose the download folder")); - QString szBuffer = KviTalFileDialog::getExistingDirectoryPath(m_pIncomingPathEdit->text(),__tr2qs("Choose a Download Folder - KVIrc Setup"),0); + //TQString szBuffer = TQFileDialog::getExistingDirectory(m_pIncomingPathEdit->text(),0,0,__tr2qs("Choose the download folder")); + TQString szBuffer = KviTalFileDialog::getExistingDirectoryPath(m_pIncomingPathEdit->text(),__tr2qs("Choose a Download Folder - KVIrc Setup"),0); if(!szBuffer.isEmpty()) { m_pIncomingPathEdit->setText(szBuffer); @@ -796,7 +796,7 @@ void KviSetupWizard::makeLink() // Dig in the registry looking up the Desktop path if(RegOpenKeyEx(HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders", - 0,KEY_QUERY_VALUE,&hCU) == ERROR_SUCCESS) + 0,KEY_TQUERY_VALUE,&hCU) == ERROR_SUCCESS) { RegQueryValueEx(hCU,"Desktop",NULL,&lpType, (unsigned char *)&szLink,&ulSize); @@ -804,10 +804,10 @@ void KviSetupWizard::makeLink() } // Build our paths - QString szLinkTarget = szLink; + TQString szLinkTarget = szLink; szLinkTarget.append("\\kvirc.lnk"); - QString szKvircExec = g_pApp->m_szGlobalKvircDir; + TQString szKvircExec = g_pApp->m_szGlobalKvircDir; szKvircExec.append("\\kvirc.exe"); // Trigger a horrible machinery @@ -830,11 +830,11 @@ void KviSetupWizard::makeLink() { WORD wsz[MAX_PATH]; // Set the path to the shell link target. - psl->SetPath(QTextCodec::codecForLocale()->fromUnicode(szKvircExec).data()); + psl->SetPath(TQTextCodec::codecForLocale()->fromUnicode(szKvircExec).data()); // Set the description of the shell link. psl->SetDescription("kvirc"); // Ensure string is ANSI. - MultiByteToWideChar(CP_ACP,0,QTextCodec::codecForLocale()->fromUnicode(szLinkTarget).data(),-1,(LPWSTR)wsz,MAX_PATH); + MultiByteToWideChar(CP_ACP,0,TQTextCodec::codecForLocale()->fromUnicode(szLinkTarget).data(),-1,(LPWSTR)wsz,MAX_PATH); // Save the link via the IPersistFile::Save method. ppf->Save((LPCOLESTR)wsz,true); ppf->Release(); @@ -846,13 +846,13 @@ void KviSetupWizard::makeLink() #endif //COMPILE_ON_WINDOWS #ifdef COMPILE_KDE_SUPPORT - QString tmp = QDir::homeDirPath(); - KviQString::ensureLastCharIs(tmp,KVI_PATH_SEPARATOR_CHAR); + TQString tmp = TQDir::homeDirPath(); + KviTQString::ensureLastCharIs(tmp,KVI_PATH_SEPARATOR_CHAR); tmp.append("Desktop"); - KviQString::ensureLastCharIs(tmp,KVI_PATH_SEPARATOR_CHAR); + KviTQString::ensureLastCharIs(tmp,KVI_PATH_SEPARATOR_CHAR); tmp.append("kvirc.desktop"); - QString contents = "[Desktop Entry]\n" \ + TQString contents = "[Desktop Entry]\n" \ "GenericName=IRC Client\n" \ "Comment=Connect to Internet Relay Chat\n" \ "Exec=kvirc -m %u\n" \ @@ -871,7 +871,7 @@ void KviSetupWizard::makeLink() void KviSetupWizard::setUrlHandlers() { #ifdef COMPILE_ON_WINDOWS - QString szReg = "REGEDIT4\r\n" \ + TQString szReg = "REGEDIT4\r\n" \ "\r\n" \ "[HKEY_CLASSES_ROOT\\irc]\r\n" \ "@=\"URL:IRC Protocol\"\r\n" \ @@ -909,37 +909,37 @@ void KviSetupWizard::setUrlHandlers() "[HKEY_CLASSES_ROOT\\irc6\\shell\\open\\command]\r\n" \ "@=\"\\\"@KVIRCEXECUTABLE@\\\" %1\"\r\n"; - QString szKvircExec = g_pApp->m_szGlobalKvircDir; + TQString szKvircExec = g_pApp->m_szGlobalKvircDir; szKvircExec.append("\\kvirc.exe"); - szKvircExec.replace("\\","\\\\"); + szKvircExec.tqreplace("\\","\\\\"); - szReg.replace("@KVIRCEXECUTABLE@",QTextCodec::codecForLocale()->fromUnicode(szKvircExec)); + szReg.tqreplace("@KVIRCEXECUTABLE@",TQTextCodec::codecForLocale()->fromUnicode(szKvircExec)); - QString szRegFile = g_pApp->m_szGlobalKvircDir; + TQString szRegFile = g_pApp->m_szGlobalKvircDir; szRegFile.append("\\kvirc.reg"); KviFileUtils::writeFile(szRegFile,szReg,false); - QString szCmd = "regedit /S \""; + TQString szCmd = "regedit /S \""; szCmd += szRegFile; szCmd += "\""; - WinExec(QTextCodec::codecForLocale()->fromUnicode(szCmd).data(),SW_SHOW); + WinExec(TQTextCodec::codecForLocale()->fromUnicode(szCmd).data(),SW_SHOW); #endif } void KviSetupWizard::reject() { - if(QMessageBox::warning(this,__tr2qs("Abort Setup - KVIrc Setup"), + if(TQMessageBox::warning(this,__tr2qs("Abort Setup - KVIrc Setup"), __tr2qs("You have chosen to abort the setup.
KVIrc cannot run until you complete this procedure.

Do you really wish to abort?"), - QMessageBox::Yes,QMessageBox::No|QMessageBox::Default|QMessageBox::Escape) != QMessageBox::Yes)return; + TQMessageBox::Yes,TQMessageBox::No|TQMessageBox::Default|TQMessageBox::Escape) != TQMessageBox::Yes)return; KviTalWizard::reject(); } void KviSetupWizard::accept() { - QString szDir; + TQString szDir; if(m_pDirUsePrev->isOn()) { @@ -957,7 +957,7 @@ void KviSetupWizard::accept() #endif KviFileUtils::adjustFilePath(szDir); - KviQString::ensureLastCharIs(szDir,KVI_PATH_SEPARATOR_CHAR); + KviTQString::ensureLastCharIs(szDir,KVI_PATH_SEPARATOR_CHAR); if(!KviFileUtils::directoryExists(szDir)) { if(!KviFileUtils::makeDir(szDir)) @@ -1005,9 +1005,9 @@ void KviSetupWizard::accept() #ifndef COMPILE_ON_WINDOWS // Make local->global link - QString localPath = QString("%1/global").arg(g_pApp->m_szLocalKvircDir); - unlink(QTextCodec::codecForLocale()->fromUnicode(localPath).data()); - symlink(QTextCodec::codecForLocale()->fromUnicode(g_pApp->m_szGlobalKvircDir).data(),QTextCodec::codecForLocale()->fromUnicode(localPath).data()); + TQString localPath = TQString("%1/global").tqarg(g_pApp->m_szLocalKvircDir); + unlink(TQTextCodec::codecForLocale()->fromUnicode(localPath).data()); + symlink(TQTextCodec::codecForLocale()->fromUnicode(g_pApp->m_szGlobalKvircDir).data(),TQTextCodec::codecForLocale()->fromUnicode(localPath).data()); #endif #ifdef COMPILE_KDE_SUPPORT @@ -1042,17 +1042,17 @@ void KviSetupWizard::accept() //m_pOtherInfoSelector->commit(); KVI_OPTION_STRING(KviOption_stringNickname1).stripWhiteSpace(); - KVI_OPTION_STRING(KviOption_stringNickname1).replace(" ",""); + KVI_OPTION_STRING(KviOption_stringNickname1).tqreplace(" ",""); if(KVI_OPTION_STRING(KviOption_stringNickname1).length() > 32) { - QString tmp = KVI_OPTION_STRING(KviOption_stringNickname1).left(32); + TQString tmp = KVI_OPTION_STRING(KviOption_stringNickname1).left(32); KVI_OPTION_STRING(KviOption_stringNickname1) = tmp; } if(KVI_OPTION_STRING(KviOption_stringNickname1).isEmpty())KVI_OPTION_STRING(KviOption_stringNickname1) = "newbie"; - QString szNickPart; + TQString szNickPart; if(KVI_OPTION_STRING(KviOption_stringNickname1).length() < 31) { szNickPart = KVI_OPTION_STRING(KviOption_stringNickname1); @@ -1060,7 +1060,7 @@ void KviSetupWizard::accept() szNickPart = KVI_OPTION_STRING(KviOption_stringNickname1).left(30); } - QString alt = szNickPart; + TQString alt = szNickPart; alt.prepend("|"); // <-- this is an erroneous nickname on IrcNet :/ alt.append("|"); if(!g_bFoundMirc) diff --git a/src/modules/setup/setupwizard.h b/src/modules/setup/setupwizard.h index 2492007a..99226bd8 100644 --- a/src/modules/setup/setupwizard.h +++ b/src/modules/setup/setupwizard.h @@ -29,19 +29,19 @@ #include "kvi_tal_vbox.h" #include "kvi_tal_hbox.h" #include "kvi_tal_groupbox.h" -#include -#include -#include +#include +#include +#include #ifdef COMPILE_USE_QT4 -#include +#include #define KviTalVButtonGroup Q3VButtonGroup #else - #include -#define KviTalVButtonGroup QVButtonGroup + #include +#define KviTalVButtonGroup TQVButtonGroup #endif -#include -#include -#include +#include +#include +#include #include "kvi_settings.h" #include "kvi_string.h" @@ -49,16 +49,17 @@ class KviSetupWizard; -class KviSetupPage : public QWidget +class KviSetupPage : public TQWidget { Q_OBJECT + TQ_OBJECT public: KviSetupPage(KviSetupWizard * w); ~KviSetupPage(); public: KviTalVBox * m_pVBox; - QLabel * m_pPixmapLabel; - QLabel * m_pTextLabel; + TQLabel * m_pPixmapLabel; + TQLabel * m_pTextLabel; }; @@ -70,11 +71,12 @@ public: class KviSetupWizard : public KviTalWizard { Q_OBJECT + TQ_OBJECT public: KviSetupWizard(); ~KviSetupWizard(); public: - QPixmap * m_pLabelPixmap; + TQPixmap * m_pLabelPixmap; KviSetupPage * m_pWelcome; KviSetupPage * m_pLicense; @@ -87,32 +89,32 @@ public: // Theme KviTalVButtonGroup * m_pThemeButtonGroup; - QRadioButton * m_pThemeHiRes; - QRadioButton * m_pThemeLoRes; - QRadioButton * m_pThemeNone; + TQRadioButton * m_pThemeHiRes; + TQRadioButton * m_pThemeLoRes; + TQRadioButton * m_pThemeNone; // Welcome - QCheckBox * m_pCreateUrlHandlers; - QCheckBox * m_pCreateDesktopShortcut; + TQCheckBox * m_pCreateUrlHandlers; + TQCheckBox * m_pCreateDesktopShortcut; //Dir - QLineEdit * m_pDataPathEdit; - QLineEdit * m_pIncomingPathEdit; + TQLineEdit * m_pDataPathEdit; + TQLineEdit * m_pIncomingPathEdit; KviTalVButtonGroup * m_pDirButtonGroup; - QRadioButton * m_pDirUsePrev; - QRadioButton * m_pDirUseNew; + TQRadioButton * m_pDirUsePrev; + TQRadioButton * m_pDirUseNew; #ifdef COMPILE_ON_WINDOWS - QRadioButton * m_pDirMakePortable; + TQRadioButton * m_pDirMakePortable; #endif - //QRadioButton * m_pDirRestore; - QLineEdit * m_pOldDataPathEdit; + //TQRadioButton * m_pDirRestore; + TQLineEdit * m_pOldDataPathEdit; KviTalHBox * m_pOldPathBox; KviTalHBox * m_pNewPathBox; KviTalHBox * m_pNewIncomingBox; //Identify - QComboBox * m_pAgeCombo; - QComboBox * m_pGenderCombo; + TQComboBox * m_pAgeCombo; + TQComboBox * m_pGenderCombo; KviStringSelector * m_pNickSelector; KviStringSelector * m_pRealNameSelector; @@ -122,18 +124,18 @@ public: //Servers //KviTalVButtonGroup * m_pServersButtonGroup; - //QRadioButton * m_pServersChooseFromList; - //QRadioButton * m_pServersSpecifyManually; - //QRadioButton * m_pServersOpenIrcUrl; - //QRadioButton * m_pServersLoadConfig; + //TQRadioButton * m_pServersChooseFromList; + //TQRadioButton * m_pServersSpecifyManually; + //TQRadioButton * m_pServersOpenIrcUrl; + //TQRadioButton * m_pServersLoadConfig; #ifdef COMPILE_ON_WINDOWS - QString m_szMircServerIniFile; - QRadioButton * m_pUseMircServerList; + TQString m_szMircServerIniFile; + TQRadioButton * m_pUseMircServerList; #endif - QString m_szServerConfigFile; - QString m_szServerUrl; - QString m_szServerHost; + TQString m_szServerConfigFile; + TQString m_szServerUrl; + TQString m_szServerHost; unsigned int m_uServerPort; KviStringSelector * m_pServerHostSelector; @@ -144,7 +146,7 @@ public: protected: void makeLink(); void setUrlHandlers(); - virtual void showEvent(QShowEvent *e); + virtual void showEvent(TQShowEvent *e); public slots: void chooseOldDataPath(); void chooseDataPath(); @@ -155,9 +157,9 @@ public slots: void oldDirClicked(); void newDirClicked(); - void oldDataTextChanged ( const QString & ); - void newDataTextChanged ( const QString & ); - void newIncomingTextChanged ( const QString & ); + void oldDataTextChanged ( const TQString & ); + void newDataTextChanged ( const TQString & ); + void newIncomingTextChanged ( const TQString & ); }; diff --git a/src/modules/sharedfile/libkvisharedfile.cpp b/src/modules/sharedfile/libkvisharedfile.cpp index 93959f77..adbf7af1 100644 --- a/src/modules/sharedfile/libkvisharedfile.cpp +++ b/src/modules/sharedfile/libkvisharedfile.cpp @@ -52,7 +52,7 @@ extern KVIRC_API KviSharedFilesManager * g_pSharedFilesManager; @short: Adds a file sharedfile @syntax: - sharedfile.add [-t=] [-n=] [user_mask] + sharedfile.add [-t=] [-n=] [user_tqmask] @switches: !sw: -t= | --timeout= Specified the timeout after that the share will be automatically removed @@ -61,8 +61,8 @@ extern KVIRC_API KviSharedFilesManager * g_pSharedFilesManager; @description: Adds to the list of the active shared files. The users will be able to request the file via [cmd]dcc.get[/cmd]. - If [user_mask] is specified , the access to the file is limited - to the users that match this mask, otherwise the mask will + If [user_tqmask] is specified , the access to the file is limited + to the users that match this tqmask, otherwise the tqmask will be automatically set to '*!*@*'.[br] If the 't' switch is used, the sharedfile will be removed after seconds. If the 'n' switch is used, the sharedfile @@ -76,10 +76,10 @@ extern KVIRC_API KviSharedFilesManager * g_pSharedFilesManager; static bool sharedfile_kvs_cmd_add(KviKvsModuleCommandCall * c) { - QString szFileName,szUserMask; + TQString szFileName,szUserMask; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("filename",KVS_PT_NONEMPTYSTRING,0,szFileName) - KVSM_PARAMETER("user_mask",KVS_PT_NONEMPTYSTRING,KVS_PF_OPTIONAL,szUserMask) + KVSM_PARAMETER("user_tqmask",KVS_PT_NONEMPTYSTRING,KVS_PF_OPTIONAL,szUserMask) KVSM_PARAMETERS_END(c) if(!KviFileUtils::isReadable(szFileName)) @@ -91,12 +91,12 @@ static bool sharedfile_kvs_cmd_add(KviKvsModuleCommandCall * c) if(szUserMask.isEmpty())szUserMask="*!*@*"; KviIrcMask u(szUserMask); - QString szm; - u.mask(szm); + TQString szm; + u.tqmask(szm); kvs_int_t timeout = 0; - if(KviKvsVariant * v = c->switches()->find('t',"timeout")) + if(KviKvsVariant * v = c->switches()->tqfind('t',"timeout")) { if(!v->asInteger(timeout)) { @@ -105,12 +105,12 @@ static bool sharedfile_kvs_cmd_add(KviKvsModuleCommandCall * c) } } - QString szVisibleName = szFileName; - KviQString::cutToLast(szVisibleName,'/'); + TQString szVisibleName = szFileName; + KviTQString::cutToLast(szVisibleName,'/'); - if(KviKvsVariant * n = c->switches()->find('n',"name")) + if(KviKvsVariant * n = c->switches()->tqfind('n',"name")) { - QString tmp; + TQString tmp; n->asString(tmp); if(tmp.isEmpty()) { @@ -138,9 +138,9 @@ static bool sharedfile_kvs_cmd_add(KviKvsModuleCommandCall * c) @short: Removes a shared file @syntax: - sharedfile.remove [filesize:integer] + sharedfile.remove [filesize:integer] @description: - Removes the shared file that matches and . + Removes the shared file that matches and . If [filesize] is specified, then it must be matched by the entry to be removed. @seealso: @@ -149,16 +149,16 @@ static bool sharedfile_kvs_cmd_add(KviKvsModuleCommandCall * c) static bool sharedfile_kvs_cmd_remove(KviKvsModuleCommandCall * c) { - QString szVisibleName,szUserMask; + TQString szVisibleName,szUserMask; kvs_uint_t uSize; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("visible_name",KVS_PT_NONEMPTYSTRING,0,szVisibleName) - KVSM_PARAMETER("user_mask",KVS_PT_NONEMPTYSTRING,0,szUserMask) + KVSM_PARAMETER("user_tqmask",KVS_PT_NONEMPTYSTRING,0,szUserMask) KVSM_PARAMETER("filesize",KVS_PT_UINT,KVS_PF_OPTIONAL,uSize) KVSM_PARAMETERS_END(c) if(!g_pSharedFilesManager->removeSharedFile(szVisibleName,szUserMask,uSize)) - c->warning(__tr2qs_ctx("No sharedfile with visible name '%Q' and user mask '%Q'","sharedfile"),&szVisibleName,&szUserMask); + c->warning(__tr2qs_ctx("No sharedfile with visible name '%Q' and user tqmask '%Q'","sharedfile"),&szVisibleName,&szUserMask); return true; } @@ -210,7 +210,7 @@ static bool sharedfile_kvs_cmd_clear(KviKvsModuleCommandCall * c) static bool sharedfile_kvs_cmd_list(KviKvsModuleCommandCall * c) { - KviPointerHashTableIterator it(*(g_pSharedFilesManager->sharedFileListDict())); + KviPointerHashTableIterator it(*(g_pSharedFilesManager->sharedFileListDict())); int idx = 0; diff --git a/src/modules/sharedfileswindow/libkvisharedfileswindow.cpp b/src/modules/sharedfileswindow/libkvisharedfileswindow.cpp index a7cab111..48e81dc8 100644 --- a/src/modules/sharedfileswindow/libkvisharedfileswindow.cpp +++ b/src/modules/sharedfileswindow/libkvisharedfileswindow.cpp @@ -32,7 +32,7 @@ #include "kvi_locale.h" #include "kvi_iconmanager.h" -#include +#include #define KVI_SHARED_FILES_WINDOW_EXTENSION_NAME "Shared files window extension" @@ -47,11 +47,11 @@ static KviModuleExtension * sharedfileswindow_extension_alloc(KviModuleExtension { if(s->pParams) { - if(QVariant * v = s->pParams->find("bCreateMinimized")) + if(TQVariant * v = s->pParams->tqfind("bCreateMinimized")) { if(v->isValid()) { - if(v->type() == QVariant::Bool) + if(v->type() == TQVariant::Bool) { bCreateMinimized = v->toBool(); } @@ -67,11 +67,11 @@ static KviModuleExtension * sharedfileswindow_extension_alloc(KviModuleExtension if(s->pParams) { - if(QVariant * v = s->pParams->find("bNoRaise")) + if(TQVariant * v = s->pParams->tqfind("bNoRaise")) { if(v) { - if(v->isValid() && v->type() == QVariant::Bool) + if(v->isValid() && v->type() == TQVariant::Bool) bNoRaise = v->toBool(); } } @@ -106,10 +106,10 @@ static bool sharedfileswindow_kvs_cmd_open(KviKvsModuleCommandCall * c) KviModuleExtensionDescriptor * d = c->module()->findExtensionDescriptor("tool",KVI_SHARED_FILES_WINDOW_EXTENSION_NAME); if(d) { - KviPointerHashTable dict(17,true); + KviPointerHashTable dict(17,true); dict.setAutoDelete(true); - dict.replace("bCreateMinimized",new QVariant(c->hasSwitch('m',"minimized"))); - dict.replace("bNoRaise",new QVariant(c->hasSwitch('n',"noraise"))); + dict.tqreplace("bCreateMinimized",new TQVariant(c->hasSwitch('m',"minimized"))); + dict.tqreplace("bNoRaise",new TQVariant(c->hasSwitch('n',"noraise"))); d->allocate(c->window(),&dict,0); } else { diff --git a/src/modules/sharedfileswindow/sharedfileswindow.cpp b/src/modules/sharedfileswindow/sharedfileswindow.cpp index aa851684..3f486ddc 100644 --- a/src/modules/sharedfileswindow/sharedfileswindow.cpp +++ b/src/modules/sharedfileswindow/sharedfileswindow.cpp @@ -37,66 +37,66 @@ #include "kvi_filedialog.h" #include "kvi_styled_controls.h" -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "kvi_tal_hbox.h" #include "kvi_tal_vbox.h" -#include -#include -#include -#include +#include +#include +#include +#include extern KviSharedFilesWindow * g_pSharedFilesWindow; extern KVIRC_API KviSharedFilesManager * g_pSharedFilesManager; -KviSharedFileEditDialog::KviSharedFileEditDialog(QWidget * par,KviSharedFile * f) -: QDialog(par,"shared_file_editor",true) +KviSharedFileEditDialog::KviSharedFileEditDialog(TQWidget * par,KviSharedFile * f) +: TQDialog(par,"shared_file_editor",true) { - QGridLayout * g = new QGridLayout(this,1,1,11,6); + TQGridLayout * g = new TQGridLayout(this,1,1,11,6); setCaption(__tr2qs_ctx("Edit Shared File - KVIrc","sharedfileswindow")); - QLabel * l = new QLabel(__tr2qs_ctx("Share name:","sharedfileswindow"),this); + TQLabel * l = new TQLabel(__tr2qs_ctx("Share name:","sharedfileswindow"),this); g->addWidget(l, 0, 0 ); - m_pShareNameEdit = new QLineEdit(this); + m_pShareNameEdit = new TQLineEdit(this); g->addMultiCellWidget( m_pShareNameEdit, 0, 0, 1, 3 ); - l = new QLabel(__tr2qs_ctx("File path:","sharedfileswindow"),this); + l = new TQLabel(__tr2qs_ctx("File path:","sharedfileswindow"),this); g->addWidget(l, 1, 0 ); - m_pFilePathEdit = new QLineEdit(this); + m_pFilePathEdit = new TQLineEdit(this); g->addMultiCellWidget( m_pFilePathEdit, 1, 1, 1, 2 ); - m_pBrowseButton = new QPushButton(__tr2qs_ctx("&Browse...","sharedfileswindow"),this); + m_pBrowseButton = new TQPushButton(__tr2qs_ctx("&Browse...","sharedfileswindow"),this); g->addWidget( m_pBrowseButton, 1, 3 ); - connect(m_pBrowseButton,SIGNAL(clicked()),this,SLOT(browse())); + connect(m_pBrowseButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(browse())); - l = new QLabel(__tr2qs_ctx("User mask:","sharedfileswindow"),this); + l = new TQLabel(__tr2qs_ctx("User tqmask:","sharedfileswindow"),this); g->addWidget(l, 2, 0 ); - m_pUserMaskEdit = new QLineEdit(this); + m_pUserMaskEdit = new TQLineEdit(this); g->addMultiCellWidget( m_pUserMaskEdit, 2, 2, 1, 3 ); m_pExpireCheckBox = new KviStyledCheckBox(__tr2qs_ctx("Expire at:","sharedfileswindow"),this); g->addWidget(m_pExpireCheckBox,3,0); - m_pExpireDateTimeEdit = new QDateTimeEdit(this); + m_pExpireDateTimeEdit = new TQDateTimeEdit(this); g->addMultiCellWidget(m_pExpireDateTimeEdit, 3, 3, 1, 3 ); - connect(m_pExpireCheckBox,SIGNAL(toggled(bool)),m_pExpireDateTimeEdit,SLOT(setEnabled(bool))); + connect(m_pExpireCheckBox,TQT_SIGNAL(toggled(bool)),m_pExpireDateTimeEdit,TQT_SLOT(setEnabled(bool))); - QPushButton * pb; + TQPushButton * pb; - pb = new QPushButton(__tr2qs_ctx("&OK","sharedfileswindow"),this); - connect(pb,SIGNAL(clicked()),this,SLOT(okClicked())); + pb = new TQPushButton(__tr2qs_ctx("&OK","sharedfileswindow"),this); + connect(pb,TQT_SIGNAL(clicked()),this,TQT_SLOT(okClicked())); pb->setIconSet(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_ACCEPT))); g->addWidget(pb,5,2); - pb = new QPushButton(__tr2qs_ctx("Cancel","sharedfileswindow"),this); - connect(pb,SIGNAL(clicked()),this,SLOT(reject())); + pb = new TQPushButton(__tr2qs_ctx("Cancel","sharedfileswindow"),this); + connect(pb,TQT_SIGNAL(clicked()),this,TQT_SLOT(reject())); pb->setIconSet(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_DISCARD))); g->addWidget(pb,5,3); @@ -108,14 +108,14 @@ KviSharedFileEditDialog::KviSharedFileEditDialog(QWidget * par,KviSharedFile * f m_pShareNameEdit->setText(f->name()); m_pFilePathEdit->setText(f->absFilePath()); m_pUserMaskEdit->setText(f->userMask()); - QDateTime dt; + TQDateTime dt; dt.setTime_t(f->expireTime()); m_pExpireDateTimeEdit->setDateTime(dt); m_pExpireCheckBox->setChecked(f->expires()); m_pExpireDateTimeEdit->setEnabled(f->expires()); } else { m_pExpireCheckBox->setChecked(false); - m_pExpireDateTimeEdit->setDateTime(QDateTime::currentDateTime()); + m_pExpireDateTimeEdit->setDateTime(TQDateTime::tqcurrentDateTime()); m_pExpireDateTimeEdit->setEnabled(false); } @@ -128,32 +128,32 @@ KviSharedFileEditDialog::~KviSharedFileEditDialog() void KviSharedFileEditDialog::browse() { - QString szBuf; - QString szTxt = m_pFilePathEdit->text(); + TQString szBuf; + TQString szTxt = m_pFilePathEdit->text(); if(!KviFileDialog::askForOpenFileName(szBuf,__tr2qs("Choose the file to share"),szTxt))return; m_pFilePathEdit->setText(szBuf); } KviSharedFile * KviSharedFileEditDialog::getResult() { - QString szName = m_pShareNameEdit->text(); - QString szPath = m_pFilePathEdit->text(); - QString szMask = m_pUserMaskEdit->text(); - QDateTime dt = m_pExpireDateTimeEdit->dateTime(); + TQString szName = m_pShareNameEdit->text(); + TQString szPath = m_pFilePathEdit->text(); + TQString szMask = m_pUserMaskEdit->text(); + TQDateTime dt = m_pExpireDateTimeEdit->dateTime(); bool bExpires = m_pExpireCheckBox->isChecked(); - QFileInfo f(szPath); + TQFileInfo f(szPath); return new KviSharedFile(szName,szPath,szMask,bExpires ? dt.toTime_t() : (time_t)0,f.size()); } void KviSharedFileEditDialog::okClicked() { - QString szName = m_pShareNameEdit->text(); - QString szPath = m_pFilePathEdit->text(); - QDateTime dt = m_pExpireDateTimeEdit->dateTime(); + TQString szName = m_pShareNameEdit->text(); + TQString szPath = m_pFilePathEdit->text(); + TQDateTime dt = m_pExpireDateTimeEdit->dateTime(); bool bExpires = m_pExpireCheckBox->isChecked(); - if(bExpires && (dt <= QDateTime::currentDateTime())) + if(bExpires && (dt <= TQDateTime::tqcurrentDateTime())) { - QMessageBox::warning(this,__tr2qs_ctx("Invalid expire time","sharedfileswindow"), + TQMessageBox::warning(this,__tr2qs_ctx("Invalid expire time","sharedfileswindow"), __tr2qs_ctx("The expire date/time is in the past: please either remove the \"expires\"" \ "check mark or specify a expire date/time in the future","sharedfileswindow"), __tr2qs_ctx("OK","sharedfileswindow")); @@ -162,16 +162,16 @@ void KviSharedFileEditDialog::okClicked() if(szName.isEmpty()) { - QMessageBox::warning(this,__tr2qs_ctx("Invalid share name","sharedfileswindow"), + TQMessageBox::warning(this,__tr2qs_ctx("Invalid share name","sharedfileswindow"), __tr2qs_ctx("The share name can't be empty, please correct it","sharedfileswindow"), __tr2qs_ctx("OK","sharedfileswindow")); return; } - QFileInfo f(szPath); + TQFileInfo f(szPath); if(!(f.exists() && f.isFile() && f.isReadable())) { - QMessageBox::warning(this,__tr2qs_ctx("Can't open the file","sharedfileswindow"), + TQMessageBox::warning(this,__tr2qs_ctx("Can't open the file","sharedfileswindow"), __tr2qs_ctx("The file doesn't exist or it is not readable, please check the path","sharedfileswindow"), __tr2qs_ctx("OK","sharedfileswindow")); return; @@ -188,7 +188,7 @@ KviSharedFilesListViewItem::KviSharedFilesListViewItem(KviTalListView * lv,KviSh setText(2,f->userMask()); if(f->expires()) { - QDateTime dt; + TQDateTime dt; dt.setTime_t(f->expireTime()); setText(3,dt.toString()); } else { @@ -207,9 +207,9 @@ KviSharedFilesWindow::KviSharedFilesWindow(KviModuleExtensionDescriptor * d,KviF { g_pSharedFilesWindow = this; #ifdef COMPILE_USE_QT4 - m_pSplitter = new QSplitter(Qt::Horizontal,this,"splitter"); + m_pSplitter = new TQSplitter(Qt::Horizontal,this,"splitter"); #else - m_pSplitter = new QSplitter(QSplitter::Horizontal,this,"splitter"); + m_pSplitter = new TQSplitter(Qt::Horizontal,this,"splitter"); #endif KviTalVBox * vbox = new KviTalVBox(m_pSplitter); @@ -222,20 +222,20 @@ KviSharedFilesWindow::KviSharedFilesWindow(KviModuleExtensionDescriptor * d,KviF m_pListView->addColumn(__tr2qs_ctx("Mask","sharedfileswindow"),200); m_pListView->addColumn(__tr2qs_ctx("Expires","sharedfileswindow"),200); m_pListView->setSelectionMode(KviTalListView::Single); - connect(m_pListView,SIGNAL(selectionChanged()),this,SLOT(enableButtons())); + connect(m_pListView,TQT_SIGNAL(selectionChanged()),this,TQT_SLOT(enableButtons())); - connect(g_pSharedFilesManager,SIGNAL(sharedFilesChanged()),this,SLOT(fillFileView())); - connect(g_pSharedFilesManager,SIGNAL(sharedFileAdded(KviSharedFile *)),this,SLOT(sharedFileAdded(KviSharedFile *))); - connect(g_pSharedFilesManager,SIGNAL(sharedFileRemoved(KviSharedFile *)),this,SLOT(sharedFileRemoved(KviSharedFile *))); + connect(g_pSharedFilesManager,TQT_SIGNAL(sharedFilesChanged()),this,TQT_SLOT(fillFileView())); + connect(g_pSharedFilesManager,TQT_SIGNAL(sharedFileAdded(KviSharedFile *)),this,TQT_SLOT(sharedFileAdded(KviSharedFile *))); + connect(g_pSharedFilesManager,TQT_SIGNAL(sharedFileRemoved(KviSharedFile *)),this,TQT_SLOT(sharedFileRemoved(KviSharedFile *))); KviTalHBox * b = new KviTalHBox(vbox); - m_pAddButton = new QPushButton(__tr2qs_ctx("&Add...","sharedfileswindow"),b); - connect(m_pAddButton,SIGNAL(clicked()),this,SLOT(addClicked())); - m_pRemoveButton = new QPushButton(__tr2qs_ctx("Re&move","sharedfileswindow"),b); - connect(m_pRemoveButton,SIGNAL(clicked()),this,SLOT(removeClicked())); - m_pEditButton = new QPushButton(__tr2qs_ctx("&Edit","sharedfileswindow"),b); - connect(m_pEditButton,SIGNAL(clicked()),this,SLOT(editClicked())); + m_pAddButton = new TQPushButton(__tr2qs_ctx("&Add...","sharedfileswindow"),b); + connect(m_pAddButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(addClicked())); + m_pRemoveButton = new TQPushButton(__tr2qs_ctx("Re&move","sharedfileswindow"),b); + connect(m_pRemoveButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(removeClicked())); + m_pEditButton = new TQPushButton(__tr2qs_ctx("&Edit","sharedfileswindow"),b); + connect(m_pEditButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(editClicked())); fillFileView(); } @@ -263,7 +263,7 @@ void KviSharedFilesWindow::removeClicked() void KviSharedFilesWindow::addClicked() { KviSharedFileEditDialog dlg(0); - if(dlg.exec() != QDialog::Accepted)return; + if(dlg.exec() != TQDialog::Accepted)return; KviSharedFile * f = dlg.getResult(); if(!f)return; @@ -276,7 +276,7 @@ void KviSharedFilesWindow::editClicked() if(!it)return; KviSharedFileEditDialog dlg(0,it->readOnlySharedFilePointer()); - if(dlg.exec() != QDialog::Accepted)return; + if(dlg.exec() != TQDialog::Accepted)return; KviSharedFilesListViewItem * it2 = (KviSharedFilesListViewItem *)m_pListView->currentItem(); if(it2 != it)return; // ooops ? @@ -290,7 +290,7 @@ void KviSharedFilesWindow::editClicked() void KviSharedFilesWindow::fillFileView() { m_pListView->clear(); - KviPointerHashTableIterator it(*(g_pSharedFilesManager->sharedFileListDict())); + KviPointerHashTableIterator it(*(g_pSharedFilesManager->sharedFileListDict())); KviSharedFilesListViewItem * itm; @@ -330,13 +330,13 @@ void KviSharedFilesWindow::sharedFileRemoved(KviSharedFile * f) /* -void KviSharedFilesWindow::tipRequest(KviDynamicToolTip * tip,const QPoint &pnt) +void KviSharedFilesWindow::tipRequest(KviDynamicToolTip * tip,const TQPoint &pnt) { KviSharedFilesItem * it = (KviSharedFilesItem *)m_pListView->itemAt(pnt); if(!it)return; - QString txt = it->transfer()->tipText(); - tip->tip(m_pListView->itemRect(it),txt); + TQString txt = it->transfer()->tipText(); + tip->tip(m_pListView->tqitemRect(it),txt); } */ @@ -377,14 +377,14 @@ void KviSharedFilesWindow::transferUnregistering(KviSharedFiles * t) if(it)delete it; } -void KviSharedFilesWindow::rightButtonPressed(KviTalListViewItem *it,const QPoint &pnt,int col) +void KviSharedFilesWindow::rightButtonPressed(KviTalListViewItem *it,const TQPoint &pnt,int col) { if(!m_pContextPopup)m_pContextPopup = new KviTalPopupMenu(this); if(!m_pLocalFilePopup)m_pLocalFilePopup = new KviTalPopupMenu(this); if(!m_pOpenFilePopup) { m_pOpenFilePopup= new KviTalPopupMenu(this); - connect(m_pOpenFilePopup,SIGNAL(activated(int)),this,SLOT(openFilePopupActivated(int))); + connect(m_pOpenFilePopup,TQT_SIGNAL(activated(int)),this,TQT_SLOT(openFilePopupActivated(int))); } m_pContextPopup->clear(); @@ -398,20 +398,20 @@ void KviSharedFilesWindow::rightButtonPressed(KviTalListViewItem *it,const QPoin if(i->transfer()) { - QString szFile = i->transfer()->localFileName(); + TQString szFile = i->transfer()->localFileName(); if(!szFile.isEmpty()) { m_pLocalFilePopup->clear(); - QString tmp = "file:/"; + TQString tmp = "file:/"; tmp += szFile; tmp += "
"; - QFileInfo fi(szFile); + TQFileInfo fi(szFile); if(fi.exists()) { tmp += ""; - tmp += __tr2qs_ctx("Size: %1 bytes","filetransferwindow").arg(fi.size()); + tmp += __tr2qs_ctx("Size: %1 bytes","filetransferwindow").tqarg(fi.size()); tmp += "
"; } @@ -421,12 +421,12 @@ void KviSharedFilesWindow::rightButtonPressed(KviTalListViewItem *it,const QPoin tmp += ""; #endif //COMPILE_KDE_SUPPORT - QLabel * l = new QLabel(tmp,m_pLocalFilePopup); - l->setFrameStyle(QFrame::Raised | QFrame::Panel); + TQLabel * l = new TQLabel(tmp,m_pLocalFilePopup); + l->setFrameStyle(TQFrame::Raised | TQFrame::Panel); m_pLocalFilePopup->insertItem(l); #ifdef COMPILE_KDE_SUPPORT - QString mimetype = KMimeType::findByPath(szFile)->name(); + TQString mimetype = KMimeType::findByPath(szFile)->name(); KServiceTypeProfile::OfferList offers = KServiceTypeProfile::offers(mimetype,"Application"); m_pOpenFilePopup->clear(); @@ -444,18 +444,18 @@ void KviSharedFilesWindow::rightButtonPressed(KviTalListViewItem *it,const QPoin m_pOpenFilePopup->insertSeparator(); - id = m_pOpenFilePopup->insertItem(__tr2qs_ctx("Default application","filetransferwindow"),this,SLOT(openLocalFile())); + id = m_pOpenFilePopup->insertItem(__tr2qs_ctx("Default application","filetransferwindow"),this,TQT_SLOT(openLocalFile())); m_pOpenFilePopup->setItemParameter(id,-1); - id = m_pOpenFilePopup->insertItem(__tr2qs_ctx("&Other...","filetransferwindow"),this,SLOT(openLocalFileWith())); + id = m_pOpenFilePopup->insertItem(__tr2qs_ctx("&Other...","filetransferwindow"),this,TQT_SLOT(openLocalFileWith())); m_pOpenFilePopup->setItemParameter(id,-1); m_pLocalFilePopup->insertItem(__tr2qs_ctx("Open with","filetransferwindow"),m_pOpenFilePopup); m_pLocalFilePopup->insertSeparator(); - m_pLocalFilePopup->insertItem(__tr2qs_ctx("Open folder","filetransferwindow"),this,SLOT(openLocalFileFolder())); - m_pLocalFilePopup->insertItem(__tr2qs_ctx("Reach in terminal","filetransferwindow"),this,SLOT(openLocalFileTerminal())); + m_pLocalFilePopup->insertItem(__tr2qs_ctx("Open folder","filetransferwindow"),this,TQT_SLOT(openLocalFileFolder())); + m_pLocalFilePopup->insertItem(__tr2qs_ctx("Reach in terminal","filetransferwindow"),this,TQT_SLOT(openLocalFileTerminal())); m_pLocalFilePopup->insertSeparator(); #endif //COMPILE_KDE_SUPPORT - m_pLocalFilePopup->insertItem(__tr2qs_ctx("Copy path to clipboard","filetransferwindow"),this,SLOT(copyLocalFileToClipboard())); + m_pLocalFilePopup->insertItem(__tr2qs_ctx("Copy path to clipboard","filetransferwindow"),this,TQT_SLOT(copyLocalFileToClipboard())); m_pContextPopup->insertItem(__tr2qs_ctx("Local file","filetransferwindow"),m_pLocalFilePopup); } @@ -478,10 +478,10 @@ void KviSharedFilesWindow::rightButtonPressed(KviTalListViewItem *it,const QPoin item = (KviSharedFilesItem *)item->nextSibling(); } - id = m_pContextPopup->insertItem(__tr2qs_ctx("Clear terminated","filetransferwindow"),this,SLOT(clearTerminated())); + id = m_pContextPopup->insertItem(__tr2qs_ctx("Clear terminated","filetransferwindow"),this,TQT_SLOT(clearTerminated())); m_pContextPopup->setItemEnabled(id,bHaveTerminated); - id = m_pContextPopup->insertItem(__tr2qs_ctx("Clear all","filetransferwindow"),this,SLOT(clearAll())); + id = m_pContextPopup->insertItem(__tr2qs_ctx("Clear all","filetransferwindow"),this,TQT_SLOT(clearAll())); m_pContextPopup->setItemEnabled(id,it); m_pContextPopup->popup(pnt); @@ -501,14 +501,14 @@ void KviSharedFilesWindow::openFilePopupActivated(int id) #ifdef COMPILE_KDE_SUPPORT int ip = m_pOpenFilePopup->itemParameter(id); if(ip < 0)return; - QString txt = m_pOpenFilePopup->text(id); + TQString txt = m_pOpenFilePopup->text(id); KviSharedFiles * t = selectedTransfer(); if(!t)return; - QString tmp = t->localFileName(); + TQString tmp = t->localFileName(); if(tmp.isEmpty())return; - QString mimetype = KMimeType::findByPath(tmp)->name(); + TQString mimetype = KMimeType::findByPath(tmp)->name(); KServiceTypeProfile::OfferList offers = KServiceTypeProfile::offers(mimetype,"Application"); for(KServiceTypeProfile::OfferList::Iterator itOffers = offers.begin(); @@ -532,10 +532,10 @@ void KviSharedFilesWindow::openLocalFileTerminal() #ifdef COMPILE_KDE_SUPPORT KviSharedFiles * t = selectedTransfer(); if(!t)return; - QString tmp = t->localFileName(); + TQString tmp = t->localFileName(); if(tmp.isEmpty())return; - int idx = tmp.findRev("/"); + int idx = tmp.tqfindRev("/"); if(idx == -1)return; tmp = tmp.left(idx); @@ -551,10 +551,10 @@ void KviSharedFilesWindow::openLocalFile() #ifdef COMPILE_KDE_SUPPORT KviSharedFiles * t = selectedTransfer(); if(!t)return; - QString tmp = t->localFileName(); + TQString tmp = t->localFileName(); if(tmp.isEmpty())return; - QString mimetype = KMimeType::findByPath(tmp)->name(); + TQString mimetype = KMimeType::findByPath(tmp)->name(); KService::Ptr offer = KServiceTypeProfile::preferredService(mimetype,"Application"); if(!offer) { @@ -575,7 +575,7 @@ void KviSharedFilesWindow::openLocalFileWith() #ifdef COMPILE_KDE_SUPPORT KviSharedFiles * t = selectedTransfer(); if(!t)return; - QString tmp = t->localFileName(); + TQString tmp = t->localFileName(); if(tmp.isEmpty())return; KURL::List lst; @@ -590,12 +590,12 @@ void KviSharedFilesWindow::copyLocalFileToClipboard() { KviSharedFiles * t = selectedTransfer(); if(!t)return; - QString tmp = t->localFileName(); + TQString tmp = t->localFileName(); if(tmp.isEmpty())return; - QApplication::clipboard()->setSelectionMode(false); - QApplication::clipboard()->setText(tmp); - QApplication::clipboard()->setSelectionMode(true); - QApplication::clipboard()->setText(tmp); + TQApplication::tqclipboard()->setSelectionMode(false); + TQApplication::tqclipboard()->setText(tmp); + TQApplication::tqclipboard()->setSelectionMode(true); + TQApplication::tqclipboard()->setText(tmp); } void KviSharedFilesWindow::openLocalFileFolder() @@ -603,14 +603,14 @@ void KviSharedFilesWindow::openLocalFileFolder() #ifdef COMPILE_KDE_SUPPORT KviSharedFiles * t = selectedTransfer(); if(!t)return; - QString tmp = t->localFileName(); + TQString tmp = t->localFileName(); if(tmp.isEmpty())return; - int idx = tmp.findRev("/"); + int idx = tmp.tqfindRev("/"); if(idx == -1)return; tmp = tmp.left(idx); - QString mimetype = KMimeType::findByPath(tmp)->name(); // inode/directory + TQString mimetype = KMimeType::findByPath(tmp)->name(); // inode/directory KService::Ptr offer = KServiceTypeProfile::preferredService(mimetype,"Application"); if(!offer)return; @@ -629,20 +629,20 @@ void KviSharedFilesWindow::heartbeat() KviTalListViewItem * i1; KviTalListViewItem * i2; - i1 = m_pListView->itemAt(QPoint(1,1)); + i1 = m_pListView->itemAt(TQPoint(1,1)); if(!i1) { m_pListView->viewport()->update(); return; } - i2 = m_pListView->itemAt(QPoint(1,m_pListView->viewport()->height() - 2)); + i2 = m_pListView->itemAt(TQPoint(1,m_pListView->viewport()->height() - 2)); if(i2)i2 = i2->nextSibling(); while(i1 && (i1 != i2)) { if(((KviSharedFilesItem *)i1)->transfer()->active()) { - m_pListView->repaintItem(i1); + m_pListView->tqrepaintItem(i1); } i1 = i1->nextSibling(); } @@ -650,7 +650,7 @@ void KviSharedFilesWindow::heartbeat() void KviSharedFilesWindow::clearAll() { - if(QMessageBox::information(this,__tr2qs_ctx("Clear all transfers","filetransferwindow"), + if(TQMessageBox::information(this,__tr2qs_ctx("Clear all transfers","filetransferwindow"), __tr2qs_ctx("Remove all the transfers including the running ones ?","filetransferwindow"), __tr2qs_ctx("Yes","filetransferwindow"),__tr2qs_ctx("No","filetransferwindow")) != 0)return; @@ -667,21 +667,21 @@ void KviSharedFilesWindow::getBaseLogFileName(KviStr &buffer) buffer.sprintf("SHAREDFILES"); } -QPixmap * KviSharedFilesWindow::myIconPtr() +TQPixmap * KviSharedFilesWindow::myIconPtr() { return g_pIconManager->getSmallIcon(KVI_SMALLICON_SHAREDFILES); } -void KviSharedFilesWindow::resizeEvent(QResizeEvent *e) +void KviSharedFilesWindow::resizeEvent(TQResizeEvent *e) { //int h = m_pInput->heightHint(); m_pSplitter->setGeometry(0,0,width(),height()); //m_pInput->setGeometry(0,height() - h,width(),h); } -QSize KviSharedFilesWindow::sizeHint() const +TQSize KviSharedFilesWindow::tqsizeHint() const { - return m_pSplitter->sizeHint(); + return m_pSplitter->tqsizeHint(); } void KviSharedFilesWindow::fillCaptionBuffers() @@ -716,7 +716,7 @@ void KviSharedFilesWindow::die() // KviWindowProperty p; // p.rect = externalGeometry(); // p.isDocked = isAttacched(); -// QValueList l(m_pSplitter->sizes()); +// TQValueList l(m_pSplitter->sizes()); // if(l.count() >= 1)p.splitWidth1 = *(l.at(0)); // if(l.count() >= 2)p.splitWidth2 = *(l.at(1)); // p.timestamp = m_pView->timestamp(); @@ -730,7 +730,7 @@ void KviSharedFilesWindow::die() // //void KviSharedFilesWindow::setProperties(KviWindowProperty *p) //{ -// QValueList l; +// TQValueList l; // l.append(p->splitWidth1); // l.append(p->splitWidth2); // m_pVertSplitter->setSizes(l); diff --git a/src/modules/sharedfileswindow/sharedfileswindow.h b/src/modules/sharedfileswindow/sharedfileswindow.h index f46bd6df..4832dc88 100644 --- a/src/modules/sharedfileswindow/sharedfileswindow.h +++ b/src/modules/sharedfileswindow/sharedfileswindow.h @@ -33,13 +33,13 @@ #include "kvi_styled_controls.h" #include "kvi_tal_listview.h" -#include +#include -class QGridLayout; -class QDateTimeEdit; -class QLabel; -class QLineEdit; -class QPushButton; +class TQGridLayout; +class TQDateTimeEdit; +class TQLabel; +class TQLineEdit; +class TQPushButton; class KviSharedFilesListViewItem : public KviTalListViewItem { @@ -54,18 +54,19 @@ public: -class KviSharedFileEditDialog : public QDialog +class KviSharedFileEditDialog : public TQDialog { Q_OBJECT + TQ_OBJECT public: - KviSharedFileEditDialog(QWidget* par,KviSharedFile * f = 0); + KviSharedFileEditDialog(TQWidget* par,KviSharedFile * f = 0); ~KviSharedFileEditDialog(); - QDateTimeEdit * m_pExpireDateTimeEdit; - QLineEdit * m_pFilePathEdit; - QLineEdit * m_pUserMaskEdit; - QPushButton * m_pBrowseButton; - QLineEdit * m_pShareNameEdit; + TQDateTimeEdit * m_pExpireDateTimeEdit; + TQLineEdit * m_pFilePathEdit; + TQLineEdit * m_pUserMaskEdit; + TQPushButton * m_pBrowseButton; + TQLineEdit * m_pShareNameEdit; KviStyledCheckBox * m_pExpireCheckBox; public: KviSharedFile * getResult(); @@ -81,26 +82,27 @@ class KviSharedFilesWindow : public KviWindow , public KviModuleExtension { friend class KviSharedFilesItem; Q_OBJECT + TQ_OBJECT public: KviSharedFilesWindow(KviModuleExtensionDescriptor * d,KviFrame * lpFrm); ~KviSharedFilesWindow(); protected: - QSplitter * m_pVertSplitter; + TQSplitter * m_pVertSplitter; KviTalListView * m_pListView; - QPushButton * m_pRemoveButton; - QPushButton * m_pEditButton; - QPushButton * m_pAddButton; + TQPushButton * m_pRemoveButton; + TQPushButton * m_pEditButton; + TQPushButton * m_pAddButton; public: // Methods virtual void die(); protected: - virtual QPixmap * myIconPtr(); + virtual TQPixmap * myIconPtr(); virtual void fillCaptionBuffers(); - virtual void resizeEvent(QResizeEvent *e); + virtual void resizeEvent(TQResizeEvent *e); virtual void getBaseLogFileName(KviStr &buffer); public: - virtual QSize sizeHint() const; + virtual TQSize tqsizeHint() const; protected slots: void fillFileView(); void sharedFileAdded(KviSharedFile * f); diff --git a/src/modules/snd/libkvisnd.cpp b/src/modules/snd/libkvisnd.cpp index bf0d2eab..70ade834 100644 --- a/src/modules/snd/libkvisnd.cpp +++ b/src/modules/snd/libkvisnd.cpp @@ -34,13 +34,13 @@ #include "kvi_locale.h" #include "kvi_qstring.h" -#include +#include #ifdef COMPILE_ON_WINDOWS #include #else //!COMPILE_ON_WINDOWS - #include + #include #include #include @@ -78,12 +78,12 @@ static KviSoundPlayer * g_pSoundPlayer = 0; KviSoundPlayer::KviSoundPlayer() -: QObject() +: TQObject() { m_pThreadList = new KviPointerList; m_pThreadList->setAutoDelete(true); - m_pSoundSystemDict = new KviPointerHashTable(17,false); + m_pSoundSystemDict = new KviPointerHashTable(17,false); m_pSoundSystemDict->setAutoDelete(true); #ifdef COMPILE_ON_WINDOWS @@ -103,13 +103,8 @@ KviSoundPlayer::KviSoundPlayer() #endif //COMPILE_ARTS_SUPPORT #endif //!COMPILE_ON_WINDOWS -#if QT_VERSION >= 0x030100 - if(QSound::isAvailable()) - m_pSoundSystemDict->insert("qt",new SoundSystemRoutine(KVI_PTR2MEMBER(KviSoundPlayer::playQt))); -#else - if(QSound::available()) - m_pSoundSystemDict->insert("qt",new SoundSystemRoutine(KVI_PTR2MEMBER(KviSoundPlayer::playQt))); -#endif + if(TQSound::isAvailable()) + m_pSoundSystemDict->insert("qt",new SoundSystemRoutine(KVI_PTR2MEMBER(KviSoundPlayer::playTQt))); m_pSoundSystemDict->insert("null",new SoundSystemRoutine(KVI_PTR2MEMBER(KviSoundPlayer::playNull))); @@ -132,9 +127,9 @@ KviSoundPlayer::~KviSoundPlayer() g_pSoundPlayer = 0; } -void KviSoundPlayer::getAvailableSoundSystems(QStringList *l) +void KviSoundPlayer::getAvailableSoundSystems(TQStringList *l) { - KviPointerHashTableIterator it(*m_pSoundSystemDict); + KviPointerHashTableIterator it(*m_pSoundSystemDict); while(it.current()) { l->append(it.currentKey()); @@ -158,7 +153,7 @@ void KviSoundPlayer::unregisterSoundThread(KviSoundThread * t) m_pThreadList->removeRef(t); } -bool KviSoundPlayer::event(QEvent * e) +bool KviSoundPlayer::event(TQEvent * e) { if(e->type() == KVI_THREAD_EVENT) { @@ -167,7 +162,7 @@ bool KviSoundPlayer::event(QEvent * e) delete (KviSoundThread *)t; return true; } - return QObject::event(e); + return TQObject::event(e); } @@ -206,11 +201,7 @@ void KviSoundPlayer::detectSoundSystem() KVI_OPTION_STRING(KviOption_stringSoundSystem) = "oss"; #endif -#if QT_VERSION >= 0x030100 - if(QSound::isAvailable()) -#else - if(QSound::available()) -#endif + if(TQSound::isAvailable()) { KVI_OPTION_STRING(KviOption_stringSoundSystem) = "qt"; return; @@ -221,7 +212,7 @@ void KviSoundPlayer::detectSoundSystem() } #ifdef COMPILE_ON_WINDOWS - bool KviSoundPlayer::playWinmm(const QString &szFileName) + bool KviSoundPlayer::playWinmm(const TQString &szFileName) { if(isMuted()) return true; sndPlaySound(szFileName.local8Bit().data(),SND_ASYNC | SND_NODEFAULT); @@ -230,7 +221,7 @@ void KviSoundPlayer::detectSoundSystem() #else //!COMPILE_ON_WINDOWS #ifdef COMPILE_OSS_SUPPORT #ifdef COMPILE_AUDIOFILE_SUPPORT - bool KviSoundPlayer::playOssAudiofile(const QString &szFileName) + bool KviSoundPlayer::playOssAudiofile(const TQString &szFileName) { if(isMuted()) return true; KviOssAudiofileSoundThread * t = new KviOssAudiofileSoundThread(szFileName); @@ -242,7 +233,7 @@ void KviSoundPlayer::detectSoundSystem() return true; } #endif //COMPILE_AUDIOFILE_SUPPORT - bool KviSoundPlayer::playOss(const QString &szFileName) + bool KviSoundPlayer::playOss(const TQString &szFileName) { if(isMuted()) return true; KviOssSoundThread * t = new KviOssSoundThread(szFileName); @@ -255,7 +246,7 @@ void KviSoundPlayer::detectSoundSystem() } #endif //COMPILE_OSS_SUPPORT #ifdef COMPILE_ESD_SUPPORT - bool KviSoundPlayer::playEsd(const QString &szFileName) + bool KviSoundPlayer::playEsd(const TQString &szFileName) { if(isMuted()) return true; KviEsdSoundThread * t = new KviEsdSoundThread(szFileName); @@ -268,7 +259,7 @@ void KviSoundPlayer::detectSoundSystem() } #endif //COMPILE_ESD_SUPPORT #ifdef COMPILE_ARTS_SUPPORT - bool KviSoundPlayer::playArts(const QString &szFileName) + bool KviSoundPlayer::playArts(const TQString &szFileName) { if(isMuted()) return true; KviArtsSoundThread * t = new KviArtsSoundThread(szFileName); @@ -282,31 +273,31 @@ void KviSoundPlayer::detectSoundSystem() #endif //COMPILE_ARTS_SUPPORT #endif //!COMPILE_ON_WINDOWS -bool KviSoundPlayer::playQt(const QString &szFileName) +bool KviSoundPlayer::playTQt(const TQString &szFileName) { if(isMuted()) return true; - QSound::play(szFileName); + TQSound::play(szFileName); return true; } -bool KviSoundPlayer::playNull(const QString &szFileName) +bool KviSoundPlayer::playNull(const TQString &szFileName) { // null sound system return true; } -bool KviSoundPlayer::play(const QString &szFileName) +bool KviSoundPlayer::play(const TQString &szFileName) { if(isMuted()) return true; - SoundSystemRoutine * r = m_pSoundSystemDict->find(KVI_OPTION_STRING(KviOption_stringSoundSystem)); + SoundSystemRoutine * r = m_pSoundSystemDict->tqfind(KVI_OPTION_STRING(KviOption_stringSoundSystem)); if(!r) { - if(KviQString::equalCI(KVI_OPTION_STRING(KviOption_stringSoundSystem),"unknown")) + if(KviTQString::equalCI(KVI_OPTION_STRING(KviOption_stringSoundSystem),"unknown")) { detectSoundSystem(); - r = m_pSoundSystemDict->find(KVI_OPTION_STRING(KviOption_stringSoundSystem)); + r = m_pSoundSystemDict->tqfind(KVI_OPTION_STRING(KviOption_stringSoundSystem)); if(!r)return false; } else { return false; @@ -319,7 +310,7 @@ bool KviSoundPlayer::play(const QString &szFileName) -KviSoundThread::KviSoundThread(const QString &szFileName) +KviSoundThread::KviSoundThread(const TQString &szFileName) : KviThread() { g_pSoundPlayer->registerSoundThread(this); @@ -347,7 +338,7 @@ void KviSoundThread::run() #ifndef COMPILE_ON_WINDOWS #ifdef COMPILE_OSS_SUPPORT #ifdef COMPILE_AUDIOFILE_SUPPORT - KviOssAudiofileSoundThread::KviOssAudiofileSoundThread(const QString &szFileName) + KviOssAudiofileSoundThread::KviOssAudiofileSoundThread(const TQString &szFileName) : KviSoundThread(szFileName) { } @@ -373,7 +364,7 @@ void KviSoundThread::run() buffer = kvi_malloc(int(BUFFER_FRAMES * frameSize)); int audiofd_c = open("/dev/dsp", O_WRONLY | O_EXCL | O_NDELAY); - QFile audiofd; + TQFile audiofd; audiofd.open(IO_WriteOnly,audiofd_c); if(audiofd_c < 0) @@ -422,7 +413,7 @@ void KviSoundThread::run() #endif //COMPILE_AUDIOFILE_SUPPORT - KviOssSoundThread::KviOssSoundThread(const QString &szFileName) + KviOssSoundThread::KviOssSoundThread(const TQString &szFileName) : KviSoundThread(szFileName) { } @@ -435,7 +426,7 @@ void KviSoundThread::run() { #define OSS_BUFFER_SIZE 16384 - QFile f(m_szFileName); + TQFile f(m_szFileName); int fd = -1; char buf[OSS_BUFFER_SIZE]; int iDataLen = 0; @@ -515,7 +506,7 @@ void KviSoundThread::run() #ifdef COMPILE_ESD_SUPPORT - KviEsdSoundThread::KviEsdSoundThread(const QString &szFileName) + KviEsdSoundThread::KviEsdSoundThread(const TQString &szFileName) : KviSoundThread(szFileName) { } @@ -535,7 +526,7 @@ void KviSoundThread::run() #ifdef COMPILE_ARTS_SUPPORT - KviArtsSoundThread::KviArtsSoundThread(const QString &szFileName) + KviArtsSoundThread::KviArtsSoundThread(const TQString &szFileName) : KviSoundThread(szFileName) { } @@ -589,7 +580,7 @@ void KviSoundThread::run() static bool snd_kvs_cmd_play(KviKvsModuleCommandCall * c) { - QString szFile; + TQString szFile; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("file name",KVS_PT_STRING,0,szFile) KVSM_PARAMETERS_END(c) @@ -610,7 +601,7 @@ static bool snd_kvs_cmd_play(KviKvsModuleCommandCall * c) static bool snd_kvs_cmd_autodetect(KviKvsModuleCommandCall * c) { g_pSoundPlayer->detectSoundSystem(); - if(KviQString::equalCI(KVI_OPTION_STRING(KviOption_stringSoundSystem),"null")) + if(KviTQString::equalCI(KVI_OPTION_STRING(KviOption_stringSoundSystem),"null")) { c->window()->outputNoFmt(KVI_OUT_SYSTEMERROR,__tr2qs("Sorry , I can't find a sound system to use on this machine")); } else { @@ -715,8 +706,8 @@ static bool snd_module_ctrl(KviModule * m,const char * operation,void * param) { if(kvi_strEqualCI(operation,"getAvailableSoundSystems")) { - // we expect param to be a pointer to QStringList - QStringList *l=(QStringList *)param; + // we expect param to be a pointer to TQStringList + TQStringList *l=(TQStringList *)param; g_pSoundPlayer->getAvailableSoundSystems(l); return true; } diff --git a/src/modules/snd/libkvisnd.h b/src/modules/snd/libkvisnd.h index 6becfa38..79f6b47a 100644 --- a/src/modules/snd/libkvisnd.h +++ b/src/modules/snd/libkvisnd.h @@ -25,7 +25,7 @@ #include "kvi_settings.h" -#include +#include #include "kvi_thread.h" #include "kvi_string.h" @@ -37,10 +37,10 @@ //class KviWavSoundFileReader //{ //public: -// KviWavSoundFileReader(QFile * f); +// KviWavSoundFileReader(TQFile * f); // ~KviWavSoundFileReader(); //protected: -// QFile * m_pFile; +// TQFile * m_pFile; //public: // static bool recognize(KviFile * f); // bool readHeader(); @@ -107,10 +107,10 @@ class KviSoundThread : public KviThread { public: - KviSoundThread(const QString &szFileName); + KviSoundThread(const TQString &szFileName); virtual ~KviSoundThread(); protected: - QString m_szFileName; + TQString m_szFileName; protected: virtual void play(); virtual void run(); @@ -121,7 +121,7 @@ protected: class KviOssSoundThread : public KviSoundThread { public: - KviOssSoundThread(const QString &szFileName); + KviOssSoundThread(const TQString &szFileName); virtual ~KviOssSoundThread(); protected: virtual void play(); @@ -131,7 +131,7 @@ protected: class KviOssAudiofileSoundThread : public KviSoundThread { public: - KviOssAudiofileSoundThread(const QString &szFileName); + KviOssAudiofileSoundThread(const TQString &szFileName); virtual ~KviOssAudiofileSoundThread(); protected: virtual void play(); @@ -143,7 +143,7 @@ protected: class KviEsdSoundThread : public KviSoundThread { public: - KviEsdSoundThread(const QString &szFileName); + KviEsdSoundThread(const TQString &szFileName); virtual ~KviEsdSoundThread(); protected: virtual void play(); @@ -154,7 +154,7 @@ protected: class KviArtsSoundThread : public KviSoundThread { public: - KviArtsSoundThread(const QString &szFileName); + KviArtsSoundThread(const TQString &szFileName); virtual ~KviArtsSoundThread(); protected: virtual void play(); @@ -164,49 +164,50 @@ protected: class KviSoundPlayer; -typedef bool (KviSoundPlayer::*SoundSystemRoutine)(const QString &szFileName); +typedef bool (KviSoundPlayer::*SoundSystemRoutine)(const TQString &szFileName); -class KviSoundPlayer : public QObject +class KviSoundPlayer : public TQObject { friend class KviSoundThread; Q_OBJECT + TQ_OBJECT public: KviSoundPlayer(); virtual ~KviSoundPlayer(); public: - bool play(const QString &szFileName); + bool play(const TQString &szFileName); void detectSoundSystem(); bool havePlayingSounds(); - //void getAvailableSoundSystems(KviPointerList * l); - void getAvailableSoundSystems(QStringList * l); + //void getAvailableSoundSystems(KviPointerList * l); + void getAvailableSoundSystems(TQStringList * l); bool isMuted() {return KVI_OPTION_BOOL(KviOption_boolMuteAllSounds); }; void setMuted(bool muted) {KVI_OPTION_BOOL(KviOption_boolMuteAllSounds)=muted;}; protected: KviPointerList * m_pThreadList; - KviPointerHashTable * m_pSoundSystemDict; + KviPointerHashTable * m_pSoundSystemDict; protected: void registerSoundThread(KviSoundThread * t); void unregisterSoundThread(KviSoundThread * t); - virtual bool event(QEvent *e); + virtual bool event(TQEvent *e); protected: #ifdef COMPILE_ON_WINDOWS - bool playWinmm(const QString &szFileName); + bool playWinmm(const TQString &szFileName); #else //!COMPILE_ON_WINDOWS #ifdef COMPILE_OSS_SUPPORT - bool playOss(const QString &szFileName); + bool playOss(const TQString &szFileName); #ifdef COMPILE_AUDIOFILE_SUPPORT - bool playOssAudiofile(const QString &szFileName); + bool playOssAudiofile(const TQString &szFileName); #endif //COMPILE_AUDIOFILE_SUPPORT #endif //COMPILE_OSS_SUPPORT #ifdef COMPILE_ARTS_SUPPORT - bool playArts(const QString &szFileName); + bool playArts(const TQString &szFileName); #endif //COMPILE_ARTS_SUPPORT #ifdef COMPILE_ESD_SUPPORT - bool playEsd(const QString &szFileName); + bool playEsd(const TQString &szFileName); #endif //COMPILE_ESD_SUPPORT #endif //!COMPILE_ON_WINDOWS - bool playQt(const QString &szFileName); - bool playNull(const QString &szFileName); + bool playTQt(const TQString &szFileName); + bool playNull(const TQString &szFileName); }; diff --git a/src/modules/socketspy/libkvisocketspy.cpp b/src/modules/socketspy/libkvisocketspy.cpp index c4076620..ceb79951 100644 --- a/src/modules/socketspy/libkvisocketspy.cpp +++ b/src/modules/socketspy/libkvisocketspy.cpp @@ -29,7 +29,7 @@ #include "kvi_window.h" #include "kvi_locale.h" -#include +#include KviPointerList * g_pSocketSpyWindowList = 0; diff --git a/src/modules/socketspy/socketspywindow.cpp b/src/modules/socketspy/socketspywindow.cpp index 4d59b5aa..6ab0154b 100644 --- a/src/modules/socketspy/socketspywindow.cpp +++ b/src/modules/socketspy/socketspywindow.cpp @@ -28,7 +28,7 @@ #include "kvi_locale.h" #include "kvi_console.h" -#include +#include //#include "kvi_module.h" extern KviPointerList * g_pSocketSpyWindowList; @@ -38,9 +38,9 @@ KviSocketSpyWindow::KviSocketSpyWindow(KviFrame * lpFrm,KviConsole * lpConsole) { g_pSocketSpyWindowList->append(this); #ifdef COMPILE_USE_QT4 - m_pSplitter = new QSplitter(Qt::Horizontal,this,"splitter"); + m_pSplitter = new TQSplitter(Qt::Horizontal,this,"splitter"); #else - m_pSplitter = new QSplitter(QSplitter::Horizontal,this,"splitter"); + m_pSplitter = new TQSplitter(Qt::Horizontal,this,"splitter"); #endif m_pIrcView = new KviIrcView(m_pSplitter,lpFrm,this); // Ensure proper focusing @@ -57,19 +57,19 @@ void KviSocketSpyWindow::die() close(); } -QPixmap * KviSocketSpyWindow::myIconPtr() +TQPixmap * KviSocketSpyWindow::myIconPtr() { return g_pIconManager->getSmallIcon(KVI_SMALLICON_SPY); } -void KviSocketSpyWindow::resizeEvent(QResizeEvent *e) +void KviSocketSpyWindow::resizeEvent(TQResizeEvent *e) { m_pSplitter->setGeometry(0,0,width(),height()); } -QSize KviSocketSpyWindow::sizeHint() const +TQSize KviSocketSpyWindow::tqsizeHint() const { - return m_pIrcView->sizeHint(); + return m_pIrcView->tqsizeHint(); } void KviSocketSpyWindow::getBaseLogFileName(KviStr &buffer) @@ -79,20 +79,20 @@ void KviSocketSpyWindow::getBaseLogFileName(KviStr &buffer) void KviSocketSpyWindow::fillCaptionBuffers() { - KviQString::sprintf(m_szPlainTextCaption,__tr2qs("Socket Spy [IRC Context %u]"),m_pConsole->ircContextId()); + KviTQString::sprintf(m_szPlainTextCaption,__tr2qs("Socket Spy [IRC Context %u]"),m_pConsole->ircContextId()); - KviQString::sprintf(m_szHtmlActiveCaption, + KviTQString::sprintf(m_szHtmlActiveCaption, __tr2qs("Socket Spy " \ "[IRC Context %u]"), - KVI_OPTION_COLOR(KviOption_colorCaptionTextActive).name().ascii(), - KVI_OPTION_COLOR(KviOption_colorCaptionTextActive2).name().ascii(), + TQString(KVI_OPTION_COLOR(KviOption_colorCaptionTextActive).name()).ascii(), + TQString(KVI_OPTION_COLOR(KviOption_colorCaptionTextActive2).name()).ascii(), m_pConsole->ircContextId()); - KviQString::sprintf(m_szHtmlInactiveCaption, + KviTQString::sprintf(m_szHtmlInactiveCaption, __tr2qs("Socket Spy " \ "[IRC Context %u]"), - KVI_OPTION_COLOR(KviOption_colorCaptionTextInactive).name().ascii(), - KVI_OPTION_COLOR(KviOption_colorCaptionTextInactive2).name().ascii(), + TQString(KVI_OPTION_COLOR(KviOption_colorCaptionTextInactive).name()).ascii(), + TQString(KVI_OPTION_COLOR(KviOption_colorCaptionTextInactive2).name()).ascii(), m_pConsole->ircContextId()); } diff --git a/src/modules/socketspy/socketspywindow.h b/src/modules/socketspy/socketspywindow.h index ab516d3e..b210ce0b 100644 --- a/src/modules/socketspy/socketspywindow.h +++ b/src/modules/socketspy/socketspywindow.h @@ -31,17 +31,18 @@ class KviConsole; class KviSocketSpyWindow : public KviWindow, public KviIrcDataStreamMonitor { Q_OBJECT + TQ_OBJECT public: KviSocketSpyWindow(KviFrame * lpFrm,KviConsole * lpConsole); ~KviSocketSpyWindow(); protected: - virtual QPixmap * myIconPtr(); + virtual TQPixmap * myIconPtr(); virtual void fillCaptionBuffers(); - virtual void resizeEvent(QResizeEvent *e); + virtual void resizeEvent(TQResizeEvent *e); virtual void getBaseLogFileName(KviStr &buffer); virtual void applyOptions(); public: - virtual QSize sizeHint() const; + virtual TQSize tqsizeHint() const; virtual void incomingMessage(const char * message); // message is NOT null terminated! For proxy connections it might spit out binary data! virtual void outgoingMessage(const char * message,int len); diff --git a/src/modules/spaste/controller.cpp b/src/modules/spaste/controller.cpp index 5a132dbd..a98c8b24 100644 --- a/src/modules/spaste/controller.cpp +++ b/src/modules/spaste/controller.cpp @@ -26,9 +26,9 @@ #include "kvi_app.h" #include "kvi_options.h" -#include -#include -#include +#include +#include +#include extern KviPointerList * g_pControllerList; @@ -37,7 +37,7 @@ SPasteController::SPasteController(KviWindow * w,int id) { g_pControllerList->append(this); //m_pWindow = w; - m_pTimer = new QTimer(this); + m_pTimer = new TQTimer(this); } SPasteController::~SPasteController() @@ -57,13 +57,13 @@ SPasteController::~SPasteController() delete m_pClipBuff; } -bool SPasteController::pasteFileInit(QString &fileName) +bool SPasteController::pasteFileInit(TQString &fileName) { if(m_pClipBuff)return false; // can't paste a file while pasting the clipboard if(m_pFile)return false; // can't paste two files at a time - m_pFile = new QFile(fileName); + m_pFile = new TQFile(fileName); if(!m_pFile->open(IO_ReadOnly))return false; - connect(m_pTimer,SIGNAL(timeout()),this,SLOT(pasteFile())); + connect(m_pTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(pasteFile())); m_pTimer->start(KVI_OPTION_UINT(KviOption_uintPasteDelay)); return true; } @@ -71,15 +71,15 @@ bool SPasteController::pasteFileInit(QString &fileName) bool SPasteController::pasteClipboardInit(void) { if(m_pFile)return false; // can't paste clipboard while pasting a file - QString tmp(g_pApp->clipboard()->text()); + TQString tmp(g_pApp->clipboard()->text()); if(m_pClipBuff) { - (*m_pClipBuff) += QStringList::split("\n",tmp,true); + (*m_pClipBuff) += TQStringList::split("\n",tmp,true); } else { - m_pClipBuff = new QStringList(QStringList::split("\n",tmp,true)); + m_pClipBuff = new TQStringList(TQStringList::split("\n",tmp,true)); m_clipBuffIterator = m_pClipBuff->begin(); } - connect(m_pTimer,SIGNAL(timeout()),this,SLOT(pasteClipboard())); + connect(m_pTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(pasteClipboard())); m_pTimer->start(KVI_OPTION_UINT(KviOption_uintPasteDelay)); return true; } @@ -87,11 +87,11 @@ bool SPasteController::pasteClipboardInit(void) void SPasteController::pasteFile(void) { #ifndef COMPILE_USE_QT4 - QString line; + TQString line; if(m_pFile->readLine(line,999) != -1) { if(line.isEmpty()) - line = QChar(KVI_TEXT_RESET); + line = TQChar(KVI_TEXT_RESET); if( (!g_pApp->windowExists(m_pWindow)) || m_pWindow->console()->isNotConnected() ) { m_pFile->close(); @@ -111,7 +111,7 @@ void SPasteController::pasteClipboard(void) if((!g_pApp->windowExists(m_pWindow)) || m_pWindow->console()->isNotConnected() ) delete this; else { - if((*m_clipBuffIterator).isEmpty())(*m_clipBuffIterator) = QChar(KVI_TEXT_RESET); + if((*m_clipBuffIterator).isEmpty())(*m_clipBuffIterator) = TQChar(KVI_TEXT_RESET); m_pWindow->ownMessage((*m_clipBuffIterator).ascii()); // <-- not good :/ ++m_clipBuffIterator; } diff --git a/src/modules/spaste/controller.h b/src/modules/spaste/controller.h index 55aeeaab..a89608ec 100644 --- a/src/modules/spaste/controller.h +++ b/src/modules/spaste/controller.h @@ -25,19 +25,20 @@ #include "kvi_window.h" #include "kvi_string.h" -#include -#include -#include +#include +#include +#include -class SPasteController : public QObject +class SPasteController : public TQObject { Q_OBJECT + TQ_OBJECT public: SPasteController(KviWindow * w,int id); ~SPasteController(); //bool pasteFileInit(KviStr * fileName); - bool pasteFileInit(QString &fileName); + bool pasteFileInit(TQString &fileName); bool pasteClipboardInit(void); int getId(void){return m_pId;}; KviWindow * window(void){return m_pWindow;}; @@ -47,12 +48,12 @@ protected slots: void pasteClipboard(void); private: - QStringList *m_pClipBuff; - QFile *m_pFile; + TQStringList *m_pClipBuff; + TQFile *m_pFile; int m_pId; KviWindow *m_pWindow; - QTimer *m_pTimer; - QStringList::Iterator m_clipBuffIterator; + TQTimer *m_pTimer; + TQStringList::Iterator m_clipBuffIterator; }; #endif //SPASTE_CONTROLLER_H diff --git a/src/modules/spaste/libkvispaste.cpp b/src/modules/spaste/libkvispaste.cpp index 6b310324..d22fbb70 100644 --- a/src/modules/spaste/libkvispaste.cpp +++ b/src/modules/spaste/libkvispaste.cpp @@ -34,8 +34,8 @@ #include "kvi_options.h" #include "kvi_out.h" -#include -#include +#include +#include #ifndef COMPILE_ON_WINDOWS #include @@ -53,7 +53,7 @@ static SPasteController * spaste_find_controller(KviWindow * w) return 0; } -static KviWindow * spaste_kvs_find_window(QString &win, KviKvsModuleCommandCall * c) +static KviWindow * spaste_kvs_find_window(TQString &win, KviKvsModuleCommandCall * c) { KviWindow * w; if(!win.isEmpty())w = g_pApp->findWindow(win); @@ -63,7 +63,7 @@ static KviWindow * spaste_kvs_find_window(QString &win, KviKvsModuleCommandCall c->warning(__tr("Window with ID '%Q' not found"),&win); return 0; } - if((w->type() == KVI_WINDOW_TYPE_CHANNEL) || (w->type() == KVI_WINDOW_TYPE_QUERY) || (w->type() == KVI_WINDOW_TYPE_DCCCHAT))return w; + if((w->type() == KVI_WINDOW_TYPE_CHANNEL) || (w->type() == KVI_WINDOW_TYPE_TQUERY) || (w->type() == KVI_WINDOW_TYPE_DCCCHAT))return w; c->warning(__tr2qs("The specified window (%Q) is not a channel/query/DCC chat"),&win); return 0; } @@ -94,7 +94,7 @@ static KviWindow * spaste_kvs_find_window(QString &win, KviKvsModuleCommandCall static bool spaste_kvs_cmd_file(KviKvsModuleCommandCall * c) { - QString szFile,szWindow; + TQString szFile,szWindow; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("file name",KVS_PT_STRING,0,szFile) KVSM_PARAMETER("window",KVS_PT_STRING,KVS_PF_OPTIONAL,szWindow) @@ -109,7 +109,7 @@ static bool spaste_kvs_cmd_file(KviKvsModuleCommandCall * c) return false; } - QFile tmp(szFile); + TQFile tmp(szFile); if(!tmp.open(IO_ReadOnly)) { c->warning(__tr2qs("I can't open that file")); return false; @@ -152,7 +152,7 @@ static bool spaste_kvs_cmd_file(KviKvsModuleCommandCall * c) static bool spaste_kvs_cmd_clipboard(KviKvsModuleCommandCall * c) { - QString szWindow; + TQString szWindow; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("window",KVS_PT_STRING,KVS_PF_OPTIONAL,szWindow) KVSM_PARAMETERS_END(c) @@ -212,9 +212,9 @@ static bool spaste_kvs_cmd_stop(KviKvsModuleCommandCall * c) if(!iId) //Delete all spaste's from the current window { - if((c->window()->type() != KVI_WINDOW_TYPE_CHANNEL) && (c->window()->type() != KVI_WINDOW_TYPE_QUERY) && (c->window()->type() != KVI_WINDOW_TYPE_DCCCHAT)) + if((c->window()->type() != KVI_WINDOW_TYPE_CHANNEL) && (c->window()->type() != KVI_WINDOW_TYPE_TQUERY) && (c->window()->type() != KVI_WINDOW_TYPE_DCCCHAT)) { - QString szWinId = c->window()->id(); + TQString szWinId = c->window()->id(); c->warning(__tr2qs("The specified window (%Q) is not a channel/query/dcc"),&szWinId); return false; } else { @@ -267,7 +267,7 @@ static bool spaste_kvs_cmd_list(KviKvsModuleCommandCall * c) while( (item = it.current()) != 0) { ++it; - QString szWinId = item->window()->id(); + TQString szWinId = item->window()->id(); c->window()->output(KVI_OUT_NONE,__tr2qs("Slow-paste ID:%d Window:%Q"),item->getId(),&szWinId); } return true; diff --git a/src/modules/spaste/libkvispaste.h b/src/modules/spaste/libkvispaste.h index 53724c2d..aa9b3ed6 100644 --- a/src/modules/spaste/libkvispaste.h +++ b/src/modules/spaste/libkvispaste.h @@ -4,7 +4,7 @@ #include "kvi_window.h" typedef struct _SPasteThreadData { - QString * strData; + TQString * strData; KviWindow * win; } SPasteThreadData; diff --git a/src/modules/str/libkvistr.cpp b/src/modules/str/libkvistr.cpp index 58549f57..0403bbc1 100644 --- a/src/modules/str/libkvistr.cpp +++ b/src/modules/str/libkvistr.cpp @@ -34,8 +34,8 @@ #include "kvi_malloc.h" #include "kvi_kvs_arraycast.h" -#include -#include +#include +#include #ifdef COMPILE_SSL_SUPPORT #include @@ -65,7 +65,7 @@ static bool str_kvs_fnc_section(KviKvsModuleFunctionCall * c) { - QString szString, szSeparator,szSplittedString; + TQString szString, szSeparator,szSplittedString; kvs_int_t iPosFrom, iPosTo; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("string_to_split",KVS_PT_STRING,0,szString) @@ -99,11 +99,11 @@ static bool str_kvs_fnc_section(KviKvsModuleFunctionCall * c) static bool str_kvs_fnc_fromclipboard(KviKvsModuleFunctionCall * c) { - QString szString; + TQString szString; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETERS_END(c) - QClipboard *cb = QApplication::clipboard(); - szString = cb->text(QClipboard::Clipboard); + TQClipboard *cb = TQApplication::tqclipboard(); + szString = cb->text(TQClipboard::Clipboard); c->returnValue()->setString(szString); return true; } @@ -128,12 +128,12 @@ static bool str_kvs_fnc_fromclipboard(KviKvsModuleFunctionCall * c) static bool str_kvs_cmd_toClipboard(KviKvsModuleCommandCall * c) { - QString szValue; + TQString szValue; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("value",KVS_PT_STRING,KVS_PF_OPTIONAL,szValue) KVSM_PARAMETERS_END(c) - QClipboard *cb = QApplication::clipboard(); - cb->setText(szValue, QClipboard::Clipboard ); + TQClipboard *cb = TQApplication::tqclipboard(); + cb->setText(szValue, TQClipboard::Clipboard ); return true; } @@ -169,7 +169,7 @@ static bool str_kvs_cmd_toClipboard(KviKvsModuleCommandCall * c) static bool str_kvs_fnc_len(KviKvsModuleFunctionCall * c) { - QString szString; + TQString szString; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("data",KVS_PT_STRING,0,szString) KVSM_PARAMETERS_END(c) @@ -196,11 +196,11 @@ static bool str_kvs_fnc_len(KviKvsModuleFunctionCall * c) static bool str_kvs_fnc_lowcase(KviKvsModuleFunctionCall * c) { - QString szString; + TQString szString; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("string_to_convert",KVS_PT_STRING,0,szString) KVSM_PARAMETERS_END(c) - c->returnValue()->setString(KviQString::lowerISO88591(szString)); + c->returnValue()->setString(KviTQString::lowerISO88591(szString)); return true; } /* @@ -222,11 +222,11 @@ static bool str_kvs_fnc_lowcase(KviKvsModuleFunctionCall * c) static bool str_kvs_fnc_upcase(KviKvsModuleFunctionCall * c) { - QString szString; + TQString szString; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("string_to_convert",KVS_PT_STRING,0,szString) KVSM_PARAMETERS_END(c) - c->returnValue()->setString(KviQString::upperISO88591(szString)); + c->returnValue()->setString(KviTQString::upperISO88591(szString)); return true; } /* @@ -248,7 +248,7 @@ static bool str_kvs_fnc_upcase(KviKvsModuleFunctionCall * c) static bool str_kvs_fnc_localelowcase(KviKvsModuleFunctionCall * c) { - QString szString; + TQString szString; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("string_to_convert",KVS_PT_STRING,0,szString) KVSM_PARAMETERS_END(c) @@ -275,7 +275,7 @@ static bool str_kvs_fnc_localelowcase(KviKvsModuleFunctionCall * c) static bool str_kvs_fnc_localeupcase(KviKvsModuleFunctionCall * c) { - QString szString; + TQString szString; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("string_to_convert",KVS_PT_STRING,0,szString) KVSM_PARAMETERS_END(c) @@ -365,7 +365,7 @@ static bool str_kvs_fnc_isunsignednumber(KviKvsModuleFunctionCall * c) static bool str_kvs_fnc_isempty(KviKvsModuleFunctionCall * c) { - QString v; + TQString v; bool bRet; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("datastring",KVS_PT_STRING,0,v) @@ -377,15 +377,15 @@ static bool str_kvs_fnc_isempty(KviKvsModuleFunctionCall * c) } /* - @doc: str.contains + @doc: str.tqcontains @type: function @title: - $str.contains + $str.tqcontains @short: Returns 1 if the first parameter contains the second @syntax: - $str.contains(,) + $str.tqcontains(,) @description: Returns 1 if the first string parameter contains the second string parameter. This function is case sensitive. @@ -394,15 +394,15 @@ static bool str_kvs_fnc_isempty(KviKvsModuleFunctionCall * c) */ -static bool str_kvs_fnc_contains(KviKvsModuleFunctionCall * c) +static bool str_kvs_fnc_tqcontains(KviKvsModuleFunctionCall * c) { - QString szString,szSubString; + TQString szString,szSubString; bool bIs; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("container",KVS_PT_STRING,0,szString) - KVSM_PARAMETER("tofind",KVS_PT_STRING,0,szSubString) + KVSM_PARAMETER("totqfind",KVS_PT_STRING,0,szSubString) KVSM_PARAMETERS_END(c) - bIs = szString.find(szSubString) != -1; + bIs = szString.tqfind(szSubString) != -1; c->returnValue()->setBoolean(bIs); return true; } @@ -416,23 +416,23 @@ static bool str_kvs_fnc_contains(KviKvsModuleFunctionCall * c) @short: Returns 1 if the first parameter contains the second, case insensitive @syntax: - $str.containsnocase(,) + $str.containsnocase(,) @description: Returns 1 if the first string parameter contains the second string parameter whithout taking in consideration the case of the characters in the string. @seealso: - [fnc]$str.contains[/fnc] + [fnc]$str.tqcontains[/fnc] */ static bool str_kvs_fnc_containsnocase(KviKvsModuleFunctionCall * c) { - QString szString,szSubString; + TQString szString,szSubString; bool bIs; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("container",KVS_PT_STRING,0,szString) - KVSM_PARAMETER("tofind",KVS_PT_STRING,0,szSubString) + KVSM_PARAMETER("totqfind",KVS_PT_STRING,0,szSubString) KVSM_PARAMETERS_END(c) - bIs = szString.find(szSubString,0,false) != -1; + bIs = szString.tqfind(szSubString,0,false) != -1; c->returnValue()->setBoolean(bIs); return true; } @@ -455,13 +455,13 @@ static bool str_kvs_fnc_containsnocase(KviKvsModuleFunctionCall * c) static bool str_kvs_fnc_equal(KviKvsModuleFunctionCall * c) { - QString szString,szString2; + TQString szString,szString2; bool bIs; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("fromcompare",KVS_PT_STRING,0,szString) KVSM_PARAMETER("tocompare",KVS_PT_STRING,0,szString2) KVSM_PARAMETERS_END(c) - bIs = KviQString::equalCS(szString,szString2); + bIs = KviTQString::equalCS(szString,szString2); c->returnValue()->setBoolean(bIs); return true; } @@ -484,13 +484,13 @@ static bool str_kvs_fnc_equal(KviKvsModuleFunctionCall * c) static bool str_kvs_fnc_equalnocase(KviKvsModuleFunctionCall * c) { - QString szString,szString2; + TQString szString,szString2; bool bIs; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("fromcompare",KVS_PT_STRING,0,szString) KVSM_PARAMETER("tocompare",KVS_PT_STRING,0,szString2) KVSM_PARAMETERS_END(c) - bIs = KviQString::equalCI(szString,szString2); + bIs = KviTQString::equalCI(szString,szString2); c->returnValue()->setBoolean(bIs); return true; } @@ -515,13 +515,13 @@ static bool str_kvs_fnc_equalnocase(KviKvsModuleFunctionCall * c) static bool str_kvs_fnc_cmp(KviKvsModuleFunctionCall * c) { - QString szString,szString2; + TQString szString,szString2; int iCmp; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("fromcompare",KVS_PT_STRING,0,szString) KVSM_PARAMETER("tocompare",KVS_PT_STRING,0,szString2) KVSM_PARAMETERS_END(c) - iCmp = KviQString::cmpCS(szString,szString2); + iCmp = KviTQString::cmpCS(szString,szString2); c->returnValue()->setInteger(iCmp); return true; } @@ -545,27 +545,27 @@ static bool str_kvs_fnc_cmp(KviKvsModuleFunctionCall * c) */ static bool str_kvs_fnc_cmpnocase(KviKvsModuleFunctionCall * c) { - QString szString,szString2; + TQString szString,szString2; int iCmp; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("fromcompare",KVS_PT_STRING,0,szString) KVSM_PARAMETER("tocompare",KVS_PT_STRING,0,szString2) KVSM_PARAMETERS_END(c) - iCmp = KviQString::cmpCI(szString,szString2); + iCmp = KviTQString::cmpCI(szString,szString2); c->returnValue()->setInteger(iCmp); return true; } /* - @doc: str.find + @doc: str.tqfind @type: function @title: - $str.find + $str.tqfind @short: Find the index of the nth ocurrence of a substring in a string @syntax: - $str.find(,[,ocurrence:int]) + $str.tqfind(,[,ocurrence:int]) @description: This function search in the string given as the first parameter for the string given as his second parameter, and will return the index where the nth ocurrence @@ -576,13 +576,13 @@ static bool str_kvs_fnc_cmpnocase(KviKvsModuleFunctionCall * c) FIXME: The semantics of this function are totally broken :( */ -static bool str_kvs_fnc_find(KviKvsModuleFunctionCall * c) +static bool str_kvs_fnc_tqfind(KviKvsModuleFunctionCall * c) { - QString szFindIn, szToFind; + TQString szFindIn, szToFind; kvs_int_t iOcurence; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("findIn",KVS_PT_STRING,0,szFindIn) - KVSM_PARAMETER("tofind",KVS_PT_STRING,0,szToFind) + KVSM_PARAMETER("totqfind",KVS_PT_STRING,0,szToFind) KVSM_PARAMETER("ocurrence",KVS_PT_INTEGER,KVS_PF_OPTIONAL,iOcurence) KVSM_PARAMETERS_END(c) int pos = 1; @@ -609,7 +609,7 @@ static bool str_kvs_fnc_find(KviKvsModuleFunctionCall * c) while (cnt<=pos) { - idx = szFindIn.right(szFindIn.length() - totalIdx).find(szToFind); + idx = szFindIn.right(szFindIn.length() - totalIdx).tqfind(szToFind); if(idx == -1) { c->returnValue()->setInteger(-1); @@ -641,12 +641,12 @@ static bool str_kvs_fnc_find(KviKvsModuleFunctionCall * c) static bool str_kvs_fnc_findfirst(KviKvsModuleFunctionCall * c) { - QString szString,szString2; + TQString szString,szString2; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("findIn",KVS_PT_STRING,0,szString) KVSM_PARAMETER("toFind",KVS_PT_STRING,0,szString2) KVSM_PARAMETERS_END(c) - c->returnValue()->setInteger(szString.find(szString2)); + c->returnValue()->setInteger(szString.tqfind(szString2)); return true; } /* @@ -667,12 +667,12 @@ static bool str_kvs_fnc_findfirst(KviKvsModuleFunctionCall * c) static bool str_kvs_fnc_findfirstnocase(KviKvsModuleFunctionCall * c) { - QString szString,szString2; + TQString szString,szString2; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("findIn",KVS_PT_STRING,0,szString) KVSM_PARAMETER("toFind",KVS_PT_STRING,0,szString2) KVSM_PARAMETERS_END(c) - c->returnValue()->setInteger(szString.find(szString2,0,false)); + c->returnValue()->setInteger(szString.tqfind(szString2,0,false)); return true; } /* @@ -693,12 +693,12 @@ static bool str_kvs_fnc_findfirstnocase(KviKvsModuleFunctionCall * c) static bool str_kvs_fnc_findlast(KviKvsModuleFunctionCall * c) { - QString szString,szString2; + TQString szString,szString2; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("findIn",KVS_PT_STRING,0,szString) KVSM_PARAMETER("toFind",KVS_PT_STRING,0,szString2) KVSM_PARAMETERS_END(c) - c->returnValue()->setInteger(szString.findRev(szString2)); + c->returnValue()->setInteger(szString.tqfindRev(szString2)); return true; } /* @@ -719,12 +719,12 @@ static bool str_kvs_fnc_findlast(KviKvsModuleFunctionCall * c) static bool str_kvs_fnc_findlastnocase(KviKvsModuleFunctionCall * c) { - QString szString,szString2; + TQString szString,szString2; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("findIn",KVS_PT_STRING,0,szString) KVSM_PARAMETER("toFind",KVS_PT_STRING,0,szString2) KVSM_PARAMETERS_END(c) - c->returnValue()->setInteger(szString.findRev(szString2,-1,false)); + c->returnValue()->setInteger(szString.tqfindRev(szString2,-1,false)); return true; } /* @@ -744,7 +744,7 @@ static bool str_kvs_fnc_findlastnocase(KviKvsModuleFunctionCall * c) static bool str_kvs_fnc_left(KviKvsModuleFunctionCall * c) { - QString szString; + TQString szString; kvs_int_t iIdx; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("data",KVS_PT_STRING,0,szString) @@ -771,7 +771,7 @@ static bool str_kvs_fnc_left(KviKvsModuleFunctionCall * c) static bool str_kvs_fnc_right(KviKvsModuleFunctionCall * c) { - QString szString; + TQString szString; kvs_int_t iIdx; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("data",KVS_PT_STRING,0,szString) @@ -798,7 +798,7 @@ static bool str_kvs_fnc_right(KviKvsModuleFunctionCall * c) static bool str_kvs_fnc_mid(KviKvsModuleFunctionCall * c) { - QString szString; + TQString szString; kvs_int_t iIdx,iNchars; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("data",KVS_PT_STRING,0,szString) @@ -825,7 +825,7 @@ static bool str_kvs_fnc_mid(KviKvsModuleFunctionCall * c) static bool str_kvs_fnc_append(KviKvsModuleFunctionCall * c) { - QString szString,szString2; + TQString szString,szString2; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("string",KVS_PT_STRING,0,szString) KVSM_PARAMETER("toappend",KVS_PT_STRING,0,szString2) @@ -850,7 +850,7 @@ static bool str_kvs_fnc_append(KviKvsModuleFunctionCall * c) static bool str_kvs_fnc_prepend(KviKvsModuleFunctionCall * c) { - QString szString,szString2; + TQString szString,szString2; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("string",KVS_PT_STRING,0,szString) KVSM_PARAMETER("toprepend",KVS_PT_STRING,0,szString2) @@ -876,7 +876,7 @@ static bool str_kvs_fnc_prepend(KviKvsModuleFunctionCall * c) static bool str_kvs_fnc_insert(KviKvsModuleFunctionCall * c) { - QString szString,szString2; + TQString szString,szString2; kvs_int_t iIdx; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("string",KVS_PT_STRING,0,szString) @@ -903,7 +903,7 @@ static bool str_kvs_fnc_insert(KviKvsModuleFunctionCall * c) static bool str_kvs_fnc_strip(KviKvsModuleFunctionCall * c) { - QString szString; + TQString szString; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("string",KVS_PT_STRING,0,szString) KVSM_PARAMETERS_END(c) @@ -927,7 +927,7 @@ static bool str_kvs_fnc_strip(KviKvsModuleFunctionCall * c) static bool str_kvs_fnc_stripleft(KviKvsModuleFunctionCall * c) { - QString szString; + TQString szString; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("string",KVS_PT_STRING,0,szString) KVSM_PARAMETERS_END(c) @@ -957,7 +957,7 @@ static bool str_kvs_fnc_stripleft(KviKvsModuleFunctionCall * c) static bool str_kvs_fnc_stripright(KviKvsModuleFunctionCall * c) { - QString szString; + TQString szString; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("string",KVS_PT_STRING,0,szString) KVSM_PARAMETERS_END(c) @@ -985,7 +985,7 @@ static bool str_kvs_fnc_stripright(KviKvsModuleFunctionCall * c) static bool str_kvs_fnc_stripcolors(KviKvsModuleFunctionCall * c) { - QString szString; + TQString szString; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("string",KVS_PT_STRING,0,szString) KVSM_PARAMETERS_END(c) @@ -994,37 +994,37 @@ static bool str_kvs_fnc_stripcolors(KviKvsModuleFunctionCall * c) } /* - @doc: str.replace + @doc: str.tqreplace @type: function @title: - $str.replace + $str.tqreplace @short: Replace substrings in a string @syntax: - $str.replace(,,) + $str.tqreplace(,,) @description: This function returns a string created replacing all ocurrences of the third parameter - ('toreplace') in the string given as the first parameter ('string') with the string + ('totqreplace') in the string given as the first parameter ('string') with the string given as the second parameter ('replacewith'). The string replacement is case sensitive!. FIXME: The order of the parameters in this function is illogical (and probably incompatible with any other scripting language) :D @examples: [example] - echo $str.replace("I like big networks","neural","big") + echo $str.tqreplace("I like big networks","neural","big") [/example] */ -static bool str_kvs_fnc_replace(KviKvsModuleFunctionCall * c) +static bool str_kvs_fnc_tqreplace(KviKvsModuleFunctionCall * c) { - QString szString,szNewstr,szToreplace; + TQString szString,szNewstr,szTotqreplace; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("string",KVS_PT_STRING,0,szString) KVSM_PARAMETER("newstr",KVS_PT_STRING,0,szNewstr) - KVSM_PARAMETER("toreplace",KVS_PT_STRING,0,szToreplace) + KVSM_PARAMETER("totqreplace",KVS_PT_STRING,0,szTotqreplace) KVSM_PARAMETERS_END(c) - szString.replace(szToreplace,szNewstr); + szString.tqreplace(szTotqreplace,szNewstr); c->returnValue()->setString(szString); return true; } @@ -1038,10 +1038,10 @@ static bool str_kvs_fnc_replace(KviKvsModuleFunctionCall * c) @short: Replace substrings in a string ignoring case @syntax: - $str.replacenocase(,,) + $str.replacenocase(,,) @description: This function returns a string created replacing all ocurrences of the third parameter - ('toreplace') in the string given as the first parameter ('string') with the string + ('totqreplace') in the string given as the first parameter ('string') with the string given as the second parameter ('newstr').[br] The replacement is case insensitive.[br] FIXME: The order of the parameters in this function is illogical (and probably incompatible @@ -1050,13 +1050,13 @@ static bool str_kvs_fnc_replace(KviKvsModuleFunctionCall * c) static bool str_kvs_fnc_replacenocase(KviKvsModuleFunctionCall * c) { - QString szString,szNewstr,szToreplace; + TQString szString,szNewstr,szTotqreplace; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("string",KVS_PT_STRING,0,szString) KVSM_PARAMETER("newstr",KVS_PT_STRING,0,szNewstr) - KVSM_PARAMETER("toreplace",KVS_PT_STRING,0,szToreplace) + KVSM_PARAMETER("totqreplace",KVS_PT_STRING,0,szTotqreplace) KVSM_PARAMETERS_END(c) - szString.replace(szToreplace,szNewstr,false); + szString.tqreplace(szTotqreplace,szNewstr,false); c->returnValue()->setString(szString); return true; } @@ -1080,7 +1080,7 @@ static bool str_kvs_fnc_replacenocase(KviKvsModuleFunctionCall * c) static bool str_kvs_fnc_urlencode(KviKvsModuleFunctionCall * c) { - QString szString,szNewstr; + TQString szString,szNewstr; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("string",KVS_PT_STRING,0,szString) KVSM_PARAMETERS_END(c) @@ -1090,12 +1090,12 @@ static bool str_kvs_fnc_urlencode(KviKvsModuleFunctionCall * c) /* for(int idx=0,idx<22,idx++) - szNewstr=szString.replace(toReplace[idx],newStr[idx],false); + szNewstr=szString.tqreplace(toReplace[idx],newStr[idx],false); */ int idx=0; while(idx<20){ - szNewstr=szString.replace(toReplace[idx],newStr[idx],false); + szNewstr=szString.tqreplace(toReplace[idx],newStr[idx],false); idx++; } @@ -1123,13 +1123,13 @@ static bool str_kvs_fnc_urlencode(KviKvsModuleFunctionCall * c) static bool str_kvs_fnc_lefttofirst(KviKvsModuleFunctionCall * c) { - QString szString,szNewstr; + TQString szString,szNewstr; int where; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("string",KVS_PT_STRING,0,szString) KVSM_PARAMETER("substring",KVS_PT_STRING,0,szNewstr) KVSM_PARAMETERS_END(c) - where = szString.find(szNewstr,false); + where = szString.tqfind(szNewstr,false); if(where != -1) c->returnValue()->setString(szString.left(where)); else c->returnValue()->setString(szString); return true; @@ -1154,12 +1154,12 @@ static bool str_kvs_fnc_lefttofirst(KviKvsModuleFunctionCall * c) static bool str_kvs_fnc_lefttolast(KviKvsModuleFunctionCall * c) { - QString szString,szNewstr; + TQString szString,szNewstr; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("string",KVS_PT_STRING,0,szString) KVSM_PARAMETER("substring",KVS_PT_STRING,0,szNewstr) KVSM_PARAMETERS_END(c) - int where = szString.findRev(szNewstr,-1,false); + int where = szString.tqfindRev(szNewstr,-1,false); if(where != -1) c->returnValue()->setString(szString.left(where)); else c->returnValue()->setString(szString); return true; @@ -1184,12 +1184,12 @@ static bool str_kvs_fnc_lefttolast(KviKvsModuleFunctionCall * c) static bool str_kvs_fnc_rightfromfirst(KviKvsModuleFunctionCall * c) { - QString szString,szNewstr; + TQString szString,szNewstr; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("string",KVS_PT_STRING,0,szString) KVSM_PARAMETER("substring",KVS_PT_STRING,0,szNewstr) KVSM_PARAMETERS_END(c) - int idx = szString.find(szNewstr,false); + int idx = szString.tqfind(szNewstr,false); if(idx != -1) c->returnValue()->setString(szString.right(szString.length()-(idx+szNewstr.length()))); else c->returnValue()->setString(""); return true; @@ -1215,12 +1215,12 @@ static bool str_kvs_fnc_rightfromfirst(KviKvsModuleFunctionCall * c) static bool str_kvs_fnc_rightfromlast(KviKvsModuleFunctionCall * c) { - QString szString,szNewstr; + TQString szString,szNewstr; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("string",KVS_PT_STRING,0,szString) KVSM_PARAMETER("substring",KVS_PT_STRING,0,szNewstr) KVSM_PARAMETERS_END(c) - int idx = szString.findRev(szNewstr,-1,false); + int idx = szString.tqfindRev(szNewstr,-1,false); if(idx != -1) c->returnValue()->setString(szString.right(szString.length()-(idx+szNewstr.length()))); else c->returnValue()->setString(""); return true; @@ -1259,15 +1259,15 @@ static bool str_kvs_fnc_rightfromlast(KviKvsModuleFunctionCall * c) static bool str_kvs_fnc_match(KviKvsModuleFunctionCall * c) { - QString szWildcard,szString,szFlags; + TQString szWildcard,szString,szFlags; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("wildcard",KVS_PT_NONEMPTYSTRING,0,szWildcard) KVSM_PARAMETER("string",KVS_PT_STRING,0,szString) KVSM_PARAMETER("flags",KVS_PT_STRING,KVS_PF_OPTIONAL,szFlags) KVSM_PARAMETERS_END(c) - bool bRegExp = (szFlags.find(QChar('r')) != -1) || (szFlags.find(QChar('R')) != -1); - bool bExact = (szFlags.find(QChar('e')) != -1) || (szFlags.find(QChar('E')) != -1); - c->returnValue()->setBoolean(KviQString::matchStringCS(szWildcard,szString,bRegExp,bExact)); + bool bRegExp = (szFlags.tqfind(TQChar('r')) != -1) || (szFlags.tqfind(TQChar('R')) != -1); + bool bExact = (szFlags.tqfind(TQChar('e')) != -1) || (szFlags.tqfind(TQChar('E')) != -1); + c->returnValue()->setBoolean(KviTQString::matchStringCS(szWildcard,szString,bRegExp,bExact)); return true; } @@ -1305,15 +1305,15 @@ static bool str_kvs_fnc_match(KviKvsModuleFunctionCall * c) static bool str_kvs_fnc_matchnocase(KviKvsModuleFunctionCall * c) { - QString szWildcard,szString,szFlags; + TQString szWildcard,szString,szFlags; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("wildcard",KVS_PT_NONEMPTYSTRING,0,szWildcard) KVSM_PARAMETER("string",KVS_PT_STRING,0,szString) KVSM_PARAMETER("flags",KVS_PT_STRING,KVS_PF_OPTIONAL,szFlags) KVSM_PARAMETERS_END(c) - bool bRegExp = (szFlags.find(QChar('r')) != -1) || (szFlags.find(QChar('R')) != -1); - bool bExact = (szFlags.find(QChar('e')) != -1) || (szFlags.find(QChar('E')) != -1); - c->returnValue()->setBoolean(KviQString::matchStringCI(szWildcard,szString,bRegExp,bExact)); + bool bRegExp = (szFlags.tqfind(TQChar('r')) != -1) || (szFlags.tqfind(TQChar('R')) != -1); + bool bExact = (szFlags.tqfind(TQChar('e')) != -1) || (szFlags.tqfind(TQChar('E')) != -1); + c->returnValue()->setBoolean(KviTQString::matchStringCI(szWildcard,szString,bRegExp,bExact)); return true; } @@ -1348,7 +1348,7 @@ static bool str_kvs_fnc_matchnocase(KviKvsModuleFunctionCall * c) static bool str_kvs_fnc_word(KviKvsModuleFunctionCall * c) { - QString szString; + TQString szString; kvs_int_t iOccurence; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("occurence",KVS_PT_INT,0,iOccurence) @@ -1360,17 +1360,17 @@ static bool str_kvs_fnc_word(KviKvsModuleFunctionCall * c) int len = szString.length(); while (idxat(uIdx); if(v) { - QString tmp; + TQString tmp; v->asString(tmp); if(bFirst) { @@ -1681,7 +1681,7 @@ static bool str_kvs_fnc_join(KviKvsModuleFunctionCall * c) static bool str_kvs_fnc_grep(KviKvsModuleFunctionCall * c) { KviKvsArrayCast ac; - QString szMatch,szFlags; + TQString szMatch,szFlags; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("match",KVS_PT_STRING,0,szMatch) KVSM_PARAMETER("strings",KVS_PT_ARRAYCAST,0,ac) @@ -1693,22 +1693,22 @@ static bool str_kvs_fnc_grep(KviKvsModuleFunctionCall * c) KviKvsArray * a = ac.array(); - bool bCaseSensitive = szFlags.find('s',0,false) != -1; - bool bRegexp = szFlags.find('r',0,false) != -1; - bool bWild = szFlags.find('w',0,false) != -1; + bool bCaseSensitive = szFlags.tqfind('s',0,false) != -1; + bool bRegexp = szFlags.tqfind('r',0,false) != -1; + bool bWild = szFlags.tqfind('w',0,false) != -1; int idx = 0; int cnt = a->size(); int i = 0; if(bRegexp || bWild) { - QRegExp re(szMatch,bCaseSensitive,bWild); + TQRegExp re(szMatch,bCaseSensitive,bWild); while(idx < cnt) { KviKvsVariant * v = a->at(idx); if(v) { - QString sz; + TQString sz; v->asString(sz); if(re.search(sz) != -1) { @@ -1724,9 +1724,9 @@ static bool str_kvs_fnc_grep(KviKvsModuleFunctionCall * c) KviKvsVariant * v = a->at(idx); if(v) { - QString sz; + TQString sz; v->asString(sz); - if(sz.find(szMatch,0,bCaseSensitive) != -1) + if(sz.tqfind(szMatch,0,bCaseSensitive) != -1) { n->set(i,new KviKvsVariant(sz)); i++; @@ -1790,7 +1790,7 @@ static bool str_kvs_fnc_grep(KviKvsModuleFunctionCall * c) static bool str_kvs_fnc_split(KviKvsModuleFunctionCall * c) { - QString szSep,szStr,szFla; + TQString szSep,szStr,szFla; kvs_int_t iMaxItems; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("separator",KVS_PT_STRING,0,szSep) @@ -1812,10 +1812,10 @@ static bool str_kvs_fnc_split(KviKvsModuleFunctionCall * c) if(iMaxItems == 0)return true; - bool bWild = szFla.find('w',0,false) != -1; - bool bContainsR = szFla.find('r',0,false) != -1; - bool bCaseSensitive = szFla.find('s',0,false) != -1; - bool bNoEmpty = szFla.find('n',0,false) != -1; + bool bWild = szFla.tqfind('w',0,false) != -1; + bool bContainsR = szFla.tqfind('r',0,false) != -1; + bool bCaseSensitive = szFla.tqfind('s',0,false) != -1; + bool bNoEmpty = szFla.tqfind('n',0,false) != -1; int id = 0; @@ -1825,7 +1825,7 @@ static bool str_kvs_fnc_split(KviKvsModuleFunctionCall * c) if(bContainsR || bWild) { - QRegExp re(szSep,bCaseSensitive,bWild); + TQRegExp re(szSep,bCaseSensitive,bWild); while((iMatch != -1) && (iMatch < iStrLen) && ((id < (iMaxItems-1)) || (iMaxItems < 0))) { @@ -1835,7 +1835,7 @@ static bool str_kvs_fnc_split(KviKvsModuleFunctionCall * c) int len = re.matchedLength(); if((len == 0) && (iBegin == iMatch))iMatch++; // safety measure for empty string matching - QString tmp = szStr.mid(iBegin,iMatch - iBegin); + TQString tmp = szStr.mid(iBegin,iMatch - iBegin); if(bNoEmpty) { if(!tmp.isEmpty()) @@ -1855,10 +1855,10 @@ static bool str_kvs_fnc_split(KviKvsModuleFunctionCall * c) } else { while((iMatch != -1) && (iMatch < iStrLen) && ((id < (iMaxItems-1)) || (iMaxItems < 0))) { - iMatch = szStr.find(szSep,iBegin,bCaseSensitive); + iMatch = szStr.tqfind(szSep,iBegin,bCaseSensitive); if(iMatch != -1) { - QString tmp = szStr.mid(iBegin,iMatch - iBegin); + TQString tmp = szStr.mid(iBegin,iMatch - iBegin); if(bNoEmpty) { if(!tmp.isEmpty()) @@ -1879,7 +1879,7 @@ static bool str_kvs_fnc_split(KviKvsModuleFunctionCall * c) if(iBegin < iStrLen) { - QString tmpx = szStr.right(iStrLen-iBegin); + TQString tmpx = szStr.right(iStrLen-iBegin); if(bNoEmpty) { if(!tmpx.isEmpty()) @@ -1889,7 +1889,7 @@ static bool str_kvs_fnc_split(KviKvsModuleFunctionCall * c) } } else { if(!bNoEmpty) - a->set(id,new KviKvsVariant(QString::null)); // empty string at the end + a->set(id,new KviKvsVariant(TQString())); // empty string at the end } return true; @@ -1942,14 +1942,14 @@ static bool str_kvs_fnc_split(KviKvsModuleFunctionCall * c) static bool str_kvs_fnc_printf(KviKvsModuleFunctionCall * c) { - QString szFormat; + TQString szFormat; KviKvsVariantList vArgs; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("format",KVS_PT_STRING,0,szFormat) KVSM_PARAMETER("vArgs",KVS_PT_VARIANTLIST,0,vArgs) KVSM_PARAMETERS_END(c) - QString s; + TQString s; #define MEMINCREMENT 32 @@ -1958,12 +1958,12 @@ static bool str_kvs_fnc_printf(KviKvsModuleFunctionCall * c) //s.setLength(allocsize); - const QChar * fmt = KviQString::nullTerminatedArray(szFormat); + const TQChar * fmt = KviTQString::nullTerminatedArray(szFormat); if(fmt) { - QChar * buffer = (QChar *)kvi_malloc(sizeof(QChar) * allocsize); - //QChar * p = (QChar *)s.unicode(); + TQChar * buffer = (TQChar *)kvi_malloc(sizeof(TQChar) * allocsize); + //TQChar * p = (TQChar *)s.tqunicode(); //9999999999999999999999999999999\0 char numberBuffer[1024]; @@ -1973,19 +1973,19 @@ static bool str_kvs_fnc_printf(KviKvsModuleFunctionCall * c) kvs_uint_t argUValue; kvs_real_t argRValue; - QChar * p = buffer; + TQChar * p = buffer; #define INCREMENT_MEM \ { \ allocsize += MEMINCREMENT; \ - buffer = (QChar *)kvi_realloc(buffer,sizeof(QChar) * allocsize); \ + buffer = (TQChar *)kvi_realloc(buffer,sizeof(TQChar) * allocsize); \ p = buffer + reallen; \ } #define INCREMENT_MEM_BY(numchars) \ { \ allocsize += numchars + MEMINCREMENT; \ - buffer = (QChar *)kvi_realloc(buffer,sizeof(QChar) * allocsize); \ + buffer = (TQChar *)kvi_realloc(buffer,sizeof(TQChar) * allocsize); \ p = buffer + reallen; \ } @@ -1993,12 +1993,12 @@ static bool str_kvs_fnc_printf(KviKvsModuleFunctionCall * c) pVar = vArgs.first(); - for(; fmt->unicode() ; ++fmt) + for(; fmt->tqunicode() ; ++fmt) { if(reallen == allocsize)INCREMENT_MEM //copy up to a '?' - if(fmt->unicode() != '?') + if(fmt->tqunicode() != '?') { *p++ = *fmt; reallen++; @@ -2006,16 +2006,16 @@ static bool str_kvs_fnc_printf(KviKvsModuleFunctionCall * c) } ++fmt; //skip this '?' - switch(fmt->unicode()) + switch(fmt->tqunicode()) { case 's': { - QString sz; + TQString sz; if(pVar)pVar->asString(sz); if(sz.isEmpty())continue; int len = sz.length(); if((allocsize - reallen) < len)INCREMENT_MEM_BY(len) - const QChar * ch = sz.unicode(); + const TQChar * ch = sz.tqunicode(); while(len--)*p++ = *ch++; reallen += sz.length(); pVar = vArgs.next(); @@ -2052,7 +2052,7 @@ static bool str_kvs_fnc_printf(KviKvsModuleFunctionCall * c) //copy now.... argUValue = pNumBuf - numberBuffer; //length of the number string if((allocsize - reallen) < (int)argUValue)INCREMENT_MEM_BY(argUValue) - do { *p++ = QChar(*--pNumBuf); } while(pNumBuf != numberBuffer); + do { *p++ = TQChar(*--pNumBuf); } while(pNumBuf != numberBuffer); reallen += argUValue; pVar = vArgs.next(); continue; @@ -2149,7 +2149,7 @@ static bool str_kvs_fnc_printf(KviKvsModuleFunctionCall * c) } case '?': { - if(fmt->unicode()) + if(fmt->tqunicode()) { if(reallen == allocsize)INCREMENT_MEM *p++ = *fmt; @@ -2161,7 +2161,7 @@ static bool str_kvs_fnc_printf(KviKvsModuleFunctionCall * c) case '.': { // precision mark - const QChar * save = fmt; + const TQChar * save = fmt; fmt++; unsigned int uPrecision = 0; @@ -2171,15 +2171,15 @@ static bool str_kvs_fnc_printf(KviKvsModuleFunctionCall * c) int idx = 2; - while((fmt->unicode() >= '0') && (fmt->unicode() <= '9') && (idx < 6)) + while((fmt->tqunicode() >= '0') && (fmt->tqunicode() <= '9') && (idx < 6)) { uPrecision *= 10; - fmtbuffer[idx] = fmt->unicode(); + fmtbuffer[idx] = fmt->tqunicode(); uPrecision += fmtbuffer[idx] - '0'; fmt++; idx++; } - fmtbuffer[idx] = fmt->unicode(); + fmtbuffer[idx] = fmt->tqunicode(); fmtbuffer[idx+1] = 0; if(pVar) @@ -2193,7 +2193,7 @@ static bool str_kvs_fnc_printf(KviKvsModuleFunctionCall * c) c->warning(__tr2qs("Missing argument for a floating point escape sequence, 0.0 assumed")); argRValue = 0; } - switch(fmt->unicode()) + switch(fmt->tqunicode()) { case 'e': case 'E': @@ -2212,7 +2212,7 @@ static bool str_kvs_fnc_printf(KviKvsModuleFunctionCall * c) fmt = save; *p++ = '?'; //write it reallen++; - if(fmt->unicode()) + if(fmt->tqunicode()) { if(reallen == allocsize)INCREMENT_MEM *p++ = *fmt; @@ -2228,7 +2228,7 @@ static bool str_kvs_fnc_printf(KviKvsModuleFunctionCall * c) { *p++ = '?'; //write it reallen++; - if(fmt->unicode()) + if(fmt->tqunicode()) { if(reallen == allocsize)INCREMENT_MEM *p++ = *fmt; @@ -2270,13 +2270,13 @@ static bool str_module_init(KviModule * m) KVSM_REGISTER_FUNCTION(m,"localelowcase",str_kvs_fnc_localelowcase); KVSM_REGISTER_FUNCTION(m,"isnumber",str_kvs_fnc_isnumber); KVSM_REGISTER_FUNCTION(m,"isunsignednumber",str_kvs_fnc_isunsignednumber); - KVSM_REGISTER_FUNCTION(m,"contains",str_kvs_fnc_contains); + KVSM_REGISTER_FUNCTION(m,"tqcontains",str_kvs_fnc_tqcontains); KVSM_REGISTER_FUNCTION(m,"containsnocase",str_kvs_fnc_containsnocase); KVSM_REGISTER_FUNCTION(m,"equal",str_kvs_fnc_equal); KVSM_REGISTER_FUNCTION(m,"equalnocase",str_kvs_fnc_equalnocase); KVSM_REGISTER_FUNCTION(m,"cmp",str_kvs_fnc_cmp); KVSM_REGISTER_FUNCTION(m,"cmpnocase",str_kvs_fnc_cmpnocase); - KVSM_REGISTER_FUNCTION(m,"find",str_kvs_fnc_find); + KVSM_REGISTER_FUNCTION(m,"tqfind",str_kvs_fnc_tqfind); KVSM_REGISTER_FUNCTION(m,"findfirst",str_kvs_fnc_findfirst); KVSM_REGISTER_FUNCTION(m,"findfirstnocase",str_kvs_fnc_findfirstnocase); KVSM_REGISTER_FUNCTION(m,"findlast",str_kvs_fnc_findlast); @@ -2291,7 +2291,7 @@ static bool str_module_init(KviModule * m) KVSM_REGISTER_FUNCTION(m,"stripright",str_kvs_fnc_stripright); KVSM_REGISTER_FUNCTION(m,"stripleft",str_kvs_fnc_stripleft); KVSM_REGISTER_FUNCTION(m,"stripcolors",str_kvs_fnc_stripcolors); - KVSM_REGISTER_FUNCTION(m,"replace",str_kvs_fnc_replace); + KVSM_REGISTER_FUNCTION(m,"tqreplace",str_kvs_fnc_tqreplace); KVSM_REGISTER_FUNCTION(m,"replacenocase",str_kvs_fnc_replacenocase); KVSM_REGISTER_FUNCTION(m,"urlencode",str_kvs_fnc_urlencode); KVSM_REGISTER_FUNCTION(m,"lefttolast",str_kvs_fnc_lefttolast); diff --git a/src/modules/system/libkvisystem.cpp b/src/modules/system/libkvisystem.cpp index 54ada405..d81524af 100644 --- a/src/modules/system/libkvisystem.cpp +++ b/src/modules/system/libkvisystem.cpp @@ -35,7 +35,7 @@ #include "kvi_osinfo.h" #include "kvi_qcstring.h" -#include +#include #ifndef COMPILE_ON_WINDOWS #include @@ -197,20 +197,20 @@ static bool system_kvs_fnc_osnodename(KviKvsModuleFunctionCall *c) static bool system_kvs_fnc_getenv(KviKvsModuleFunctionCall *c) { - QString szVariable; + TQString szVariable; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("variable",KVS_PT_NONEMPTYSTRING,0,szVariable) KVSM_PARAMETERS_END(c) - KviQCString szVar = szVariable.local8Bit(); + KviTQCString szVar = szVariable.local8Bit(); #ifdef COMPILE_ON_WINDOWS - QString env = getenv(szVar.data()); - QString def = __tr2qs("No environment variable found, please don't use the %% in the request"); - c->returnValue()->setString(env.isEmpty() ? QString::fromLocal8Bit(env) : QString::fromLocal8Bit(def)); + TQString env = getenv(szVar.data()); + TQString def = __tr2qs("No environment variable found, please don't use the %% in the request"); + c->returnValue()->setString(env.isEmpty() ? TQString::fromLocal8Bit(env) : TQString::fromLocal8Bit(def)); #else char * b = kvi_getenv(szVar.data()); - c->returnValue()->setString(b ? QString::fromLocal8Bit(b) : QString::null); + c->returnValue()->setString(b ? TQString::fromLocal8Bit(b) : TQString()); #endif return true; } @@ -240,7 +240,7 @@ static bool system_kvs_fnc_getenv(KviKvsModuleFunctionCall *c) static bool system_kvs_fnc_clipboard(KviKvsModuleFunctionCall *c) { - c->returnValue()->setString(g_pApp->clipboard()->text(QClipboard::Clipboard)); + c->returnValue()->setString(g_pApp->tqclipboard()->text(TQClipboard::Clipboard)); return true; } @@ -270,12 +270,12 @@ static bool system_kvs_fnc_clipboard(KviKvsModuleFunctionCall *c) static bool system_kvs_cmd_setClipboard(KviKvsModuleCommandCall * c) { - QString szValue; + TQString szValue; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("data",KVS_PT_STRING,KVS_PF_OPTIONAL,szValue) KVSM_PARAMETERS_END(c) - g_pApp->clipboard()->setText(szValue,QClipboard::Clipboard); + g_pApp->tqclipboard()->setText(szValue,TQClipboard::Clipboard); return true; } @@ -303,11 +303,11 @@ static bool system_kvs_cmd_setClipboard(KviKvsModuleCommandCall * c) static bool system_kvs_cmd_setSelection(KviKvsModuleCommandCall * c) { - QString szValue; + TQString szValue; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("data",KVS_PT_STRING,KVS_PF_OPTIONAL,szValue) KVSM_PARAMETERS_END(c) - g_pApp->clipboard()->setText(szValue,QClipboard::Selection); + g_pApp->tqclipboard()->setText(szValue,TQClipboard::Selection); return true; } @@ -337,7 +337,7 @@ static bool system_kvs_cmd_setSelection(KviKvsModuleCommandCall * c) static bool system_kvs_fnc_selection(KviKvsModuleFunctionCall *c) { - c->returnValue()->setString(g_pApp->clipboard()->text(QClipboard::Selection)); + c->returnValue()->setString(g_pApp->tqclipboard()->text(TQClipboard::Selection)); return true; } @@ -364,7 +364,7 @@ static bool system_kvs_fnc_selection(KviKvsModuleFunctionCall *c) static bool system_kvs_fnc_checkModule(KviKvsModuleFunctionCall *c) { - QString szModuleName; + TQString szModuleName; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("module_name",KVS_PT_STRING,0,szModuleName) @@ -420,11 +420,11 @@ static bool system_kvs_fnc_hostname(KviKvsModuleFunctionCall *c) identifier of the object called, is the function to be executed on the remote object and ,,... is the list of parameters to be passed. The name must contain the - trailing parenthesis and parameter specification (see examples). + trailing tqparenthesis and parameter specification (see examples). The parameters MUST be in the form "type=value" where "type" is the C++ type of the parameter and value is the string rappresentation of the parameter data. Currently - KVIrc supports only QString,KviQCString,bool,int and uint data types.[br] + KVIrc supports only TQString,KviTQCString,bool,int and uint data types.[br] The returned value is the string rappresentation of the returned data if the return type is known, otherwise it is the name of the data type returned. [br] @@ -439,7 +439,7 @@ static bool system_kvs_fnc_hostname(KviKvsModuleFunctionCall *c) # we can also ignore the return value in several ways %dummy = $system.dcop("kicker","kicker","showKMenu()") $system.dcop("kdesktop","KScreensaverIface","save()") - $system.dcop("kicker","Panel","addBrowserButton(QString)","QString=/") + $system.dcop("kicker","Panel","addBrowserButton(TQString)","TQString=/") # runtime test if a call would work (i.e. , kicker is running at all, parameters are right etc...) if($system.dcop("?kicker","kicker","showKMenu()"))echo "Can't make dcop calls to kicker!" [/example] @@ -449,8 +449,8 @@ static bool system_kvs_fnc_dcop(KviKvsModuleFunctionCall *c) { bool bTestMode = false; - KviQCString szApp,szObj,szFun; - QStringList parms; + KviTQCString szApp,szObj,szFun; + TQStringList parms; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("application",KVS_PT_NONEMPTYCSTRING,0,szApp) @@ -470,10 +470,10 @@ static bool system_kvs_fnc_dcop(KviKvsModuleFunctionCall *c) #ifdef COMPILE_KDE_SUPPORT - QByteArray ba; - QDataStream ds(ba, IO_WriteOnly); + TQByteArray ba; + TQDataStream ds(ba, IO_WriteOnly); - for ( QStringList::Iterator it = parms.begin(); it != parms.end(); ++it ) + for ( TQStringList::Iterator it = parms.begin(); it != parms.end(); ++it ) { KviStr tmp = *it; @@ -496,19 +496,19 @@ static bool system_kvs_fnc_dcop(KviKvsModuleFunctionCall *c) return false; } ds << iii; - } else if(kvi_strEqualCI("QString",szType.ptr())) + } else if(kvi_strEqualCI(TQSTRING_OBJECT_NAME_STRING,szType.ptr())) { - QString ddd = tmp.ptr(); + TQString ddd = tmp.ptr(); ds << ddd; - } else if(kvi_strEqualCI("KviQCString",szType.ptr())) + } else if(kvi_strEqualCI("KviTQCString",szType.ptr())) { - KviQCString qcs = tmp.ptr(); + KviTQCString qcs = tmp.ptr(); ds << qcs; } else if(kvi_strEqualCI("bool",szType.ptr())) { bool bbb = kvi_strEqualCI(tmp.ptr(),"true"); ds << bbb; - } else if(kvi_strEqualCI("unsigned int",szType.ptr()) || kvi_strEqualCI("uint",szType.ptr()) || kvi_strEqualCI("Q_UINT32",szType.ptr())) + } else if(kvi_strEqualCI("unsigned int",szType.ptr()) || kvi_strEqualCI("uint",szType.ptr()) || kvi_strEqualCI("TQ_UINT32",szType.ptr())) { unsigned int uii = tmp.toUInt(&bOk); if(!bOk) @@ -523,8 +523,8 @@ static bool system_kvs_fnc_dcop(KviKvsModuleFunctionCall *c) } } - QByteArray rba; - KviQCString szRetType; + TQByteArray rba; + KviTQCString szRetType; bool bRet = g_pApp->dcopClient()->call(szApp,szObj,szFun,ba,szRetType,rba); @@ -537,23 +537,23 @@ static bool system_kvs_fnc_dcop(KviKvsModuleFunctionCall *c) if(bTestMode) c->returnValue()->setInteger(1); else { - QDataStream ret(rba, IO_ReadOnly); + TQDataStream ret(rba, IO_ReadOnly); if(szRetType == "bool") { bool bqw; ret >> bqw; c->returnValue()->setInteger(bqw ? 1 : 0); - } else if(szRetType == "QString") + } else if(szRetType == TQSTRING_OBJECT_NAME_STRING) { - QString szz; + TQString szz; ret >> szz; c->returnValue()->setString(szz); - } else if(szRetType == "QCString") + } else if(szRetType == "TQCString") { - KviQCString sss; + KviTQCString sss; ret >> sss; c->returnValue()->setString(sss.data()); - } else if((szRetType == "uint") || (szRetType == "unsigned int") || (szRetType == "Q_UINT32")) + } else if((szRetType == "uint") || (szRetType == "unsigned int") || (szRetType == "TQ_UINT32")) { unsigned int ui3; ret >> ui3; @@ -572,18 +572,18 @@ static bool system_kvs_fnc_dcop(KviKvsModuleFunctionCall *c) int idx = 0; for(QCStringList::Iterator iter = csl.begin();iter != csl.end();++iter) { - arry->set(idx,new KviKvsVariant(QString(*iter))); + arry->set(idx,new KviKvsVariant(TQString(*iter))); idx++; } c->returnValue()->setArray(arry); #endif - } else if(szRetType == "QStringList") + } else if(szRetType == TQSTRINGLIST_OBJECT_NAME_STRING) { - QStringList csl; + TQStringList csl; ret >> csl; KviKvsArray * arry = new KviKvsArray(); int idx = 0; - for(QStringList::Iterator iter = csl.begin();iter != csl.end();++iter) + for(TQStringList::Iterator iter = csl.begin();iter != csl.end();++iter) { arry->set(idx,new KviKvsVariant(*iter)); idx++; @@ -626,21 +626,21 @@ static bool system_kvs_fnc_dcop(KviKvsModuleFunctionCall *c) static bool system_kvs_cmd_setenv(KviKvsModuleCommandCall * c) { - QString szVariable,szValue; + TQString szVariable,szValue; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("variable",KVS_PT_NONEMPTYSTRING,0,szVariable) KVSM_PARAMETER("value",KVS_PT_STRING,KVS_PF_OPTIONAL,szValue) KVSM_PARAMETERS_END(c) - KviQCString szVar = szVariable.local8Bit(); - KviQCString szVal = szValue.local8Bit(); + KviTQCString szVar = szVariable.local8Bit(); + KviTQCString szVal = szValue.local8Bit(); if(szVal.isEmpty())kvi_unsetenv(szVar.data()); else { /*#ifdef COMPILE_ON_WINDOWS - QString Var,Val,VarAndVal; + TQString Var,Val,VarAndVal; Val = szVar.data(); Var = szVal.data(); VarAndVal = Var+"="+Val; diff --git a/src/modules/system/plugin.cpp b/src/modules/system/plugin.cpp index b14b18c0..5891c39c 100644 --- a/src/modules/system/plugin.cpp +++ b/src/modules/system/plugin.cpp @@ -32,8 +32,8 @@ #include "kvi_app.h" #include "kvi_fileutils.h" -#include -#include +#include +#include /* @doc: easyplugins @type: @@ -103,7 +103,7 @@ [/example] */ -KviPlugin::KviPlugin(kvi_library_t pLib, const QString& name) +KviPlugin::KviPlugin(kvi_library_t pLib, const TQString& name) { m_Plugin = pLib; m_szName = name; @@ -113,7 +113,7 @@ KviPlugin::~KviPlugin() { } -KviPlugin* KviPlugin::load(const QString& szFileName) +KviPlugin* KviPlugin::load(const TQString& szFileName) { kvi_library_t pLibrary = kvi_library_open(szFileName.local8Bit()); if (!pLibrary) @@ -183,7 +183,7 @@ bool KviPlugin::canunload() return true; } -int KviPlugin::call(const QString& pszFunctionName, int argc, char * argv[], char ** pBuffer) +int KviPlugin::call(const TQString& pszFunctionName, int argc, char * argv[], char ** pBuffer) { int r; plugin_function function_call; @@ -199,12 +199,12 @@ int KviPlugin::call(const QString& pszFunctionName, int argc, char * argv[], cha return r; } -QString KviPlugin::name() +TQString KviPlugin::name() { return m_szName; } -void KviPlugin::setName(const QString& Name) +void KviPlugin::setName(const TQString& Name) { m_szName = Name; } @@ -212,7 +212,7 @@ void KviPlugin::setName(const QString& Name) KviPluginManager::KviPluginManager() { - m_pPluginDict = new KviPointerHashTable(5,false); + m_pPluginDict = new KviPointerHashTable(5,false); m_pPluginDict->setAutoDelete(false); m_bCanUnload = true; @@ -226,8 +226,8 @@ KviPluginManager::~KviPluginManager() bool KviPluginManager::pluginCall(KviKvsModuleFunctionCall *c) { // /echo $system.call("traffic.dll",about) - QString szPluginPath; //contains full path and plugin name like "c:/plugin.dll" - QString szFunctionName; + TQString szPluginPath; //contains full path and plugin name like "c:/plugin.dll" + TQString szFunctionName; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("plugin_path",KVS_PT_NONEMPTYSTRING,0,szPluginPath) @@ -262,7 +262,7 @@ bool KviPluginManager::pluginCall(KviKvsModuleFunctionCall *c) if (iArgc > 0) { int i = 2; - QString tmp; + TQString tmp; int iSize = 0; //Calculate buffer size @@ -313,7 +313,7 @@ bool KviPluginManager::pluginCall(KviKvsModuleFunctionCall *c) } if (r > 0) { - c->returnValue()->setString(QString::fromLocal8Bit(returnBuffer)); + c->returnValue()->setString(TQString::fromLocal8Bit(returnBuffer)); } @@ -339,7 +339,7 @@ bool KviPluginManager::checkUnload() Always called when system module should be unloaded Checking here if all small "modules" can be unloaded */ - KviPointerHashTableIterator it(*m_pPluginDict); + KviPointerHashTableIterator it(*m_pPluginDict); m_bCanUnload = true; @@ -360,7 +360,7 @@ bool KviPluginManager::checkUnload() void KviPluginManager::unloadAll() { - KviPointerHashTableIterator it(*m_pPluginDict); + KviPointerHashTableIterator it(*m_pPluginDict); while(it.current()) { @@ -369,9 +369,9 @@ void KviPluginManager::unloadAll() } } -bool KviPluginManager::findPlugin(QString& szPath) +bool KviPluginManager::findPlugin(TQString& szPath) { - QString szFileName(KviFileUtils::extractFileName(szPath)); + TQString szFileName(KviFileUtils::extractFileName(szPath)); // szFileName.detach(); if(KviFileUtils::isAbsolutePath(szPath) && KviFileUtils::fileExists(szPath)) { @@ -395,16 +395,16 @@ bool KviPluginManager::findPlugin(QString& szPath) return true; } -bool KviPluginManager::isPluginLoaded(const QString& pSingleName) +bool KviPluginManager::isPluginLoaded(const TQString& pSingleName) { - KviPlugin * p = m_pPluginDict->find(pSingleName); + KviPlugin * p = m_pPluginDict->tqfind(pSingleName); if (!p) return false; else return true; } -bool KviPluginManager::loadPlugin(const QString& szPluginPath) +bool KviPluginManager::loadPlugin(const TQString& szPluginPath) { if(isPluginLoaded(szPluginPath)) { @@ -420,8 +420,8 @@ bool KviPluginManager::loadPlugin(const QString& szPluginPath) return false; } -KviPlugin * KviPluginManager::getPlugin(const QString& szPluginPath) +KviPlugin * KviPluginManager::getPlugin(const TQString& szPluginPath) { - KviPlugin * p = m_pPluginDict->find(szPluginPath); + KviPlugin * p = m_pPluginDict->tqfind(szPluginPath); return p; } \ No newline at end of file diff --git a/src/modules/system/plugin.h b/src/modules/system/plugin.h index 64b1723a..c5aa5014 100644 --- a/src/modules/system/plugin.h +++ b/src/modules/system/plugin.h @@ -37,22 +37,22 @@ class KviPlugin { protected: // You have to create plugin instance by calling KviPlugin::load() - KviPlugin(kvi_library_t pLib, const QString& name); + KviPlugin(kvi_library_t pLib, const TQString& name); public: ~KviPlugin(); private: // shared // internal kvi_library_t m_Plugin; - QString m_szName; + TQString m_szName; public: - static KviPlugin* load(const QString& szFileName); + static KviPlugin* load(const TQString& szFileName); bool pfree(char * pBuffer); bool unload(); bool canunload(); - int call(const QString& szFunctionName, int argc, char * argv[], char ** pBuffer); - QString name(); - void setName(const QString& szName); + int call(const TQString& szFunctionName, int argc, char * argv[], char ** pBuffer); + TQString name(); + void setName(const TQString& szName); protected: }; @@ -65,16 +65,16 @@ class KviPluginManager // shared bool m_bCanUnload; // internal - KviPointerHashTable * m_pPluginDict; + KviPointerHashTable * m_pPluginDict; public: bool pluginCall(KviKvsModuleFunctionCall *c); bool checkUnload(); void unloadAll(); protected: - bool findPlugin(QString& szName); - bool isPluginLoaded(const QString& szFileNameOrPathToLoad); - bool loadPlugin(const QString& szPluginPath); - KviPlugin * getPlugin(const QString& szPluginPath); + bool findPlugin(TQString& szName); + bool isPluginLoaded(const TQString& szFileNameOrPathToLoad); + bool loadPlugin(const TQString& szPluginPath); + KviPlugin * getPlugin(const TQString& szPluginPath); }; #endif //_PLUGIN_H_ \ No newline at end of file diff --git a/src/modules/term/libkviterm.cpp b/src/modules/term/libkviterm.cpp index 742aaa62..66717cf1 100644 --- a/src/modules/term/libkviterm.cpp +++ b/src/modules/term/libkviterm.cpp @@ -28,7 +28,7 @@ #include "kvi_frame.h" -#include +#include #include "kvi_pointerlist.h" #ifdef COMPILE_KDE_SUPPORT diff --git a/src/modules/term/termwidget.cpp b/src/modules/term/termwidget.cpp index 45bf63a0..04d61567 100644 --- a/src/modules/term/termwidget.cpp +++ b/src/modules/term/termwidget.cpp @@ -28,10 +28,10 @@ #include "kvi_iconmanager.h" #include "kvi_locale.h" -#include +#include #include "kvi_pointerlist.h" -#include -#include +#include +#include #ifdef COMPILE_KDE_SUPPORT @@ -44,8 +44,8 @@ extern KviPointerList * g_pTermWidgetList; extern KviPointerList * g_pTermWindowList; extern KviStr g_szKonsoleLibraryName; -KviTermWidget::KviTermWidget(QWidget * par,KviFrame * lpFrm,bool bIsStandalone) -: QFrame(par,"term_widget") +KviTermWidget::KviTermWidget(TQWidget * par,KviFrame * lpFrm,bool bIsStandalone) +: TQFrame(par,"term_widget") { if(bIsStandalone)g_pTermWidgetList->append(this); m_bIsStandalone = bIsStandalone; @@ -56,20 +56,20 @@ KviTermWidget::KviTermWidget(QWidget * par,KviFrame * lpFrm,bool bIsStandalone) if(bIsStandalone) { m_pHBox = new KviTalHBox(this); - m_pTitleLabel = new QLabel(__tr2qs("Terminal emulator"),m_pHBox); - m_pTitleLabel->setFrameStyle(QFrame::Raised | QFrame::WinPanel); - m_pCloseButton = new QPushButton("",m_pHBox); + m_pTitleLabel = new TQLabel(__tr2qs("Terminal emulator"),m_pHBox); + m_pTitleLabel->setFrameStyle(TQFrame::Raised | TQFrame::WinPanel); + m_pCloseButton = new TQPushButton("",m_pHBox); m_pCloseButton->setPixmap(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_CLOSE))); - QToolTip::add(m_pCloseButton,__tr2qs("Close this window")); + TQToolTip::add(m_pCloseButton,__tr2qs("Close this window")); m_pHBox->setStretchFactor(m_pTitleLabel,2); - connect(m_pCloseButton,SIGNAL(clicked()),this,SLOT(closeClicked())); + connect(m_pCloseButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(closeClicked())); } else { m_pHBox = 0; m_pTitleLabel = 0; m_pCloseButton = 0; } - setFrameStyle(QFrame::Sunken | QFrame::Panel); + setFrameStyle(TQFrame::Sunken | TQFrame::Panel); KParts::Factory * pKonsoleFactory = static_cast( KLibLoader::self()->factory(g_szKonsoleLibraryName.ptr())); @@ -84,15 +84,15 @@ KviTermWidget::KviTermWidget(QWidget * par,KviFrame * lpFrm,bool bIsStandalone) { // debug("PART %d",m_pKonsolePart); m_pKonsoleWidget = m_pKonsolePart->widget(); - connect(m_pKonsoleWidget,SIGNAL(destroyed()),this,SLOT(konsoleDestroyed())); + connect(m_pKonsoleWidget,TQT_SIGNAL(destroyed()),this,TQT_SLOT(konsoleDestroyed())); // debug("Widget %d",m_pKonsoleWidget); } else { - m_pKonsoleWidget = new QLabel(this, + m_pKonsoleWidget = new TQLabel(this, __tr2qs("Can't create the terminal emulation part")); } } else { - m_pKonsoleWidget = new QLabel(this, + m_pKonsoleWidget = new TQLabel(this, __tr2qs("Can't retrieve the terminal emulation factory")); } } @@ -100,24 +100,24 @@ KviTermWidget::KviTermWidget(QWidget * par,KviFrame * lpFrm,bool bIsStandalone) KviTermWidget::~KviTermWidget() { if(m_pKonsoleWidget) - disconnect(m_pKonsoleWidget,SIGNAL(destroyed()),this,SLOT(konsoleDestroyed())); + disconnect(m_pKonsoleWidget,TQT_SIGNAL(destroyed()),this,TQT_SLOT(konsoleDestroyed())); if(m_bIsStandalone)g_pTermWidgetList->removeRef(this); if(g_pTermWindowList->isEmpty() && g_pTermWidgetList->isEmpty())g_pTermModule->unlock(); // debug("DELETING KONSOLE WIDGET"); -// if(m_pKonsoleWidget)delete m_pKonsoleWidget; <--// Qt will delete it +// if(m_pKonsoleWidget)delete m_pKonsoleWidget; <--// TQt will delete it // debug("DELETING KONSOLE PART"); // if(m_pKonsolePart)delete m_pKonsolePart; <--// the part will delete self when the widget will die // debug("KONSOLE PART DELETED"); } -void KviTermWidget::resizeEvent(QResizeEvent *e) +void KviTermWidget::resizeEvent(TQResizeEvent *e) { int hght = 0; if(m_bIsStandalone) { - hght = m_pCloseButton->sizeHint().height(); + hght = m_pCloseButton->tqsizeHint().height(); m_pHBox->setGeometry(1,1,width() - 2,hght + 1); } @@ -135,16 +135,16 @@ void KviTermWidget::konsoleDestroyed() m_pKonsoleWidget = 0; m_pKonsolePart = 0; hide(); - QTimer::singleShot(0,this,SLOT(autoClose())); + TQTimer::singleShot(0,this,TQT_SLOT(autoClose())); } void KviTermWidget::autoClose() { if(m_bIsStandalone)delete this; - else ((KviWindow *)parent())->close(); + else ((KviWindow *)tqparent())->close(); } -void KviTermWidget::changeTitle(int i,const QString& str) +void KviTermWidget::changeTitle(int i,const TQString& str) { if(m_bIsStandalone)m_pTitleLabel->setText(str); } @@ -157,21 +157,21 @@ void KviTermWidget::changeColumns(int) { } -QSize KviTermWidget::sizeHint() const +TQSize KviTermWidget::tqsizeHint() const { int hght = 0; int wdth = 0; if(m_pKonsoleWidget) { - hght += m_pKonsoleWidget->sizeHint().height(); - wdth = m_pKonsoleWidget->sizeHint().width(); + hght += m_pKonsoleWidget->tqsizeHint().height(); + wdth = m_pKonsoleWidget->tqsizeHint().width(); } if(m_pCloseButton) { - hght += m_pCloseButton->sizeHint().height(); + hght += m_pCloseButton->tqsizeHint().height(); } - return QSize(wdth + 2,hght + 2); + return TQSize(wdth + 2,hght + 2); } #include "termwidget.moc" diff --git a/src/modules/term/termwidget.h b/src/modules/term/termwidget.h index 88e9d9a7..75739677 100644 --- a/src/modules/term/termwidget.h +++ b/src/modules/term/termwidget.h @@ -26,9 +26,9 @@ #ifdef COMPILE_KDE_SUPPORT -#include -#include -#include +#include +#include +#include #include "kvi_tal_hbox.h" #include "kparts/part.h" @@ -36,30 +36,31 @@ class KviFrame; -class KviTermWidget : public QFrame +class KviTermWidget : public TQFrame { Q_OBJECT - Q_PROPERTY( int KviProperty_ChildFocusOwner READ dummy ) + TQ_OBJECT + TQ_PROPERTY( int KviProperty_ChildFocusOwner READ dummy ) public: - KviTermWidget(QWidget * par,KviFrame * lpFrm,bool bIsStandalone = false); + KviTermWidget(TQWidget * par,KviFrame * lpFrm,bool bIsStandalone = false); ~KviTermWidget(); private: KviTalHBox * m_pHBox; - QLabel * m_pTitleLabel; - QPushButton * m_pCloseButton; + TQLabel * m_pTitleLabel; + TQPushButton * m_pCloseButton; KParts::Part * m_pKonsolePart; bool m_bIsStandalone; - QWidget * m_pKonsoleWidget; + TQWidget * m_pKonsoleWidget; protected: - virtual void resizeEvent(QResizeEvent *e); + virtual void resizeEvent(TQResizeEvent *e); protected slots: void closeClicked(); - void changeTitle(int i,const QString& str); + void changeTitle(int i,const TQString& str); void notifySize(int,int); void changeColumns(int); public: - QWidget * konsoleWidget(){ return m_pKonsoleWidget ? m_pKonsoleWidget : this; }; - virtual QSize sizeHint() const; + TQWidget * konsoleWidget(){ return m_pKonsoleWidget ? m_pKonsoleWidget : this; }; + virtual TQSize tqsizeHint() const; int dummy() const { return 0; }; protected slots: void konsoleDestroyed(); diff --git a/src/modules/term/termwindow.cpp b/src/modules/term/termwindow.cpp index 39b6cc1a..700328fc 100644 --- a/src/modules/term/termwindow.cpp +++ b/src/modules/term/termwindow.cpp @@ -50,19 +50,19 @@ KviTermWindow::~KviTermWindow() if(g_pTermWindowList->isEmpty() && g_pTermWidgetList->isEmpty())g_pTermModule->unlock(); } -QPixmap * KviTermWindow::myIconPtr() +TQPixmap * KviTermWindow::myIconPtr() { return g_pIconManager->getSmallIcon(KVI_SMALLICON_RAW); } -void KviTermWindow::resizeEvent(QResizeEvent *e) +void KviTermWindow::resizeEvent(TQResizeEvent *e) { if(m_pTermWidget)m_pTermWidget->setGeometry(0,0,width(),height()); } -QSize KviTermWindow::sizeHint() const +TQSize KviTermWindow::tqsizeHint() const { - return m_pTermWidget ? m_pTermWidget->sizeHint() : KviWindow::sizeHint(); + return m_pTermWidget ? m_pTermWidget->tqsizeHint() : KviWindow::tqsizeHint(); } void KviTermWindow::fillCaptionBuffers() diff --git a/src/modules/term/termwindow.h b/src/modules/term/termwindow.h index e3a9d556..340e7439 100644 --- a/src/modules/term/termwindow.h +++ b/src/modules/term/termwindow.h @@ -35,17 +35,18 @@ class KviTermWidget; class KviTermWindow : public KviWindow { Q_OBJECT + TQ_OBJECT public: KviTermWindow(KviFrame * lpFrm,const char * name); ~KviTermWindow(); protected: KviTermWidget * m_pTermWidget; protected: - virtual QPixmap * myIconPtr(); + virtual TQPixmap * myIconPtr(); virtual void fillCaptionBuffers(); - virtual void resizeEvent(QResizeEvent *e); + virtual void resizeEvent(TQResizeEvent *e); public: - virtual QSize sizeHint() const; + virtual TQSize tqsizeHint() const; }; diff --git a/src/modules/texticons/libkvitexticons.cpp b/src/modules/texticons/libkvitexticons.cpp index 2179bf41..307a3340 100644 --- a/src/modules/texticons/libkvitexticons.cpp +++ b/src/modules/texticons/libkvitexticons.cpp @@ -46,7 +46,7 @@ static bool texticons_kvs_fnc_get(KviKvsModuleFunctionCall * c) { - QString szIcon; + TQString szIcon; KviTextIcon* pIcon=0; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("iconName",KVS_PT_NONEMPTYSTRING,KVS_PF_OPTIONAL,szIcon) @@ -66,7 +66,7 @@ static bool texticons_kvs_fnc_get(KviKvsModuleFunctionCall * c) } else { KviKvsHash* hash = new KviKvsHash(); - KviPointerHashTableIterator it(*(g_pTextIconManager->textIconDict())); + KviPointerHashTableIterator it(*(g_pTextIconManager->textIconDict())); while(KviTextIcon * i = it.current()) { @@ -103,7 +103,7 @@ static bool texticons_kvs_fnc_get(KviKvsModuleFunctionCall * c) static bool texticons_kvs_cmd_set(KviKvsModuleCommandCall * c) { - QString szName,szIcon; + TQString szName,szIcon; KviTextIcon* pIcon=0; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("iconName",KVS_PT_NONEMPTYSTRING,0,szName) diff --git a/src/modules/theme/libkvitheme.cpp b/src/modules/theme/libkvitheme.cpp index cba1b4e8..c2b34f5b 100644 --- a/src/modules/theme/libkvitheme.cpp +++ b/src/modules/theme/libkvitheme.cpp @@ -40,9 +40,9 @@ #include "managementdialog.h" #include "themefunctions.h" -#include +#include -QRect g_rectManagementDialogGeometry(0,0,0,0); +TQRect g_rectManagementDialogGeometry(0,0,0,0); /* @@ -61,13 +61,13 @@ QRect g_rectManagementDialogGeometry(0,0,0,0); static bool theme_kvs_cmd_install(KviKvsModuleCommandCall * c) { - QString szThemePackFile; + TQString szThemePackFile; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("package_path",KVS_PT_STRING,0,szThemePackFile) KVSM_PARAMETERS_END(c) - QString szError; + TQString szError; if(!KviThemeFunctions::installThemePackage(szThemePackFile,szError)) { c->error(__tr2qs_ctx("Error installing theme package: %Q","theme"),&szError); @@ -95,7 +95,7 @@ static bool theme_kvs_cmd_install(KviKvsModuleCommandCall * c) static bool theme_kvs_cmd_screenshot(KviKvsModuleCommandCall * c) { - QString szFileName; + TQString szFileName; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("file_name_path",KVS_PT_STRING,KVS_PF_OPTIONAL,szFileName) @@ -104,7 +104,7 @@ static bool theme_kvs_cmd_screenshot(KviKvsModuleCommandCall * c) KviFileUtils::adjustFilePath(szFileName); - QString szTmp; + TQString szTmp; c->enterBlockingSection(); bool bResult = KviFileDialog::askForSaveFileName(szTmp,__tr2qs_ctx("Choose a file to save the screenshot to","theme"),szFileName,"*.png"); @@ -116,10 +116,10 @@ static bool theme_kvs_cmd_screenshot(KviKvsModuleCommandCall * c) if(szFileName.isEmpty())return true; // done KviFileUtils::adjustFilePath(szFileName); - if(QFileInfo(szFileName).extension(false)!="png") + if(TQFileInfo(szFileName).extension(false)!="png") szFileName+=".png"; - QString szError; + TQString szError; if(!KviThemeFunctions::makeKVIrcScreenshot(szFileName)) { c->error(__tr2qs_ctx("Error making screenshot","theme")); // FIXME: a nicer error ? @@ -155,10 +155,10 @@ static bool theme_module_init(KviModule *m) KVSM_REGISTER_SIMPLE_COMMAND(m,"install",theme_kvs_cmd_install); KVSM_REGISTER_SIMPLE_COMMAND(m,"screenshot",theme_kvs_cmd_screenshot); - QString szBuf; + TQString szBuf; m->getDefaultConfigFileName(szBuf); KviConfig cfg(szBuf,KviConfig::Read); - g_rectManagementDialogGeometry = cfg.readRectEntry("EditorGeometry",QRect(10,10,390,440)); + g_rectManagementDialogGeometry = cfg.readRectEntry("EditorGeometry",TQRect(10,10,390,440)); return true; } @@ -167,7 +167,7 @@ static bool theme_module_cleanup(KviModule *m) { KviThemeManagementDialog::cleanup(); - QString szBuf; + TQString szBuf; m->getDefaultConfigFileName(szBuf); KviConfig cfg(szBuf,KviConfig::Write); cfg.writeEntry("EditorGeometry",g_rectManagementDialogGeometry); diff --git a/src/modules/theme/managementdialog.cpp b/src/modules/theme/managementdialog.cpp index bfd75283..7ed10db7 100644 --- a/src/modules/theme/managementdialog.cpp +++ b/src/modules/theme/managementdialog.cpp @@ -37,28 +37,28 @@ #include "kvi_msgbox.h" -#include -#include +#include +#include #include "kvi_tal_listbox.h" -#include +#include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include "kvi_tal_popupmenu.h" -#include -#include -#include -#include +#include +#include +#include +#include #include -//#include +//#include #ifdef COMPILE_USE_QT4 -#include +#include #endif -#include +#include #include "kvi_options.h" #include "kvi_locale.h" @@ -77,7 +77,7 @@ #include // rand & srand -extern QRect g_rectManagementDialogGeometry; +extern TQRect g_rectManagementDialogGeometry; @@ -85,7 +85,7 @@ KviThemeListBoxItem::KviThemeListBoxItem(KviTalListBox * box,KviThemeInfo * inf) : KviTalListBoxText(box) { m_pThemeInfo = inf; - QString t; + TQString t; t = ""; t += inf->name(); t += ""; @@ -121,14 +121,14 @@ KviThemeListBoxItem::~KviThemeListBoxItem() delete m_pText; } -void KviThemeListBoxItem::paint(QPainter * p) +void KviThemeListBoxItem::paint(TQPainter * p) { KviTalListBoxText::paint(p); - p->drawPixmap(LVI_BORDER,LVI_BORDER, *(g_pIconManager->getBigIcon(QString(KVI_BIGICON_THEME))) ); + p->drawPixmap(LVI_BORDER,LVI_BORDER, *(g_pIconManager->getBigIcon(TQString(KVI_BIGICON_THEME))) ); int afterIcon = LVI_BORDER + LVI_ICON_SIZE + LVI_SPACING; int www = p->window().width() - (afterIcon + LVI_BORDER); m_pText->setWidth(www); - m_pText->draw(p,afterIcon,LVI_BORDER,QRect(afterIcon,LVI_BORDER,www,p->window().height() - (LVI_BORDER * 2)),listBox()->viewport()->colorGroup()); + m_pText->draw(p,afterIcon,LVI_BORDER,TQRect(afterIcon,LVI_BORDER,www,p->window().height() - (LVI_BORDER * 2)),listBox()->viewport()->tqcolorGroup()); } int KviThemeListBoxItem::height(const KviTalListBox * lb) const @@ -141,8 +141,8 @@ int KviThemeListBoxItem::height(const KviTalListBox * lb) const KviThemeManagementDialog * KviThemeManagementDialog::m_pInstance = 0; -KviThemeManagementDialog::KviThemeManagementDialog(QWidget * parent) -: QDialog(parent,"theme_options_widget") +KviThemeManagementDialog::KviThemeManagementDialog(TQWidget * tqparent) +: TQDialog(tqparent,"theme_options_widget") { setCaption(__tr2qs_ctx("Manage Themes - KVIrc","theme")); setIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_THEME))); @@ -151,70 +151,70 @@ KviThemeManagementDialog::KviThemeManagementDialog(QWidget * parent) m_pInstance = this; - QGridLayout * g = new QGridLayout(this,3,2,4,4); + TQGridLayout * g = new TQGridLayout(this,3,2,4,4); KviTalHBox *hb = new KviTalHBox(this); g->addMultiCellWidget(hb,0,0,0,1); KviStyledToolButton * tb; - QFrame * sep; + TQFrame * sep; tb = new KviStyledToolButton(hb); tb->setIconSet(*(g_pIconManager->getBigIcon(KVI_BIGICON_SAVE))); tb->setUsesBigPixmap(true); - QToolTip::add(tb,__tr2qs_ctx("Save Current Theme...","theme")); - connect(tb,SIGNAL(clicked()),this,SLOT(saveCurrentTheme())); + TQToolTip::add(tb,__tr2qs_ctx("Save Current Theme...","theme")); + connect(tb,TQT_SIGNAL(clicked()),this,TQT_SLOT(saveCurrentTheme())); - sep = new QFrame(hb); - sep->setFrameStyle(QFrame::VLine | QFrame::Sunken); + sep = new TQFrame(hb); + sep->setFrameStyle(TQFrame::VLine | TQFrame::Sunken); sep->setMinimumWidth(12); m_pPackThemeButton = new KviStyledToolButton(hb); m_pPackThemeButton->setIconSet(*(g_pIconManager->getBigIcon(KVI_BIGICON_PACK))); m_pPackThemeButton->setUsesBigPixmap(true); - QToolTip::add(m_pPackThemeButton,__tr2qs_ctx("Export Selected Themes to a Distributable Package","theme")); - connect(m_pPackThemeButton,SIGNAL(clicked()),this,SLOT(packTheme())); + TQToolTip::add(m_pPackThemeButton,__tr2qs_ctx("Export Selected Themes to a Distributable Package","theme")); + connect(m_pPackThemeButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(packTheme())); m_pDeleteThemeButton = new KviStyledToolButton(hb); m_pDeleteThemeButton->setIconSet(*(g_pIconManager->getBigIcon(KVI_BIGICON_REMOVE))); m_pDeleteThemeButton->setUsesBigPixmap(true); - QToolTip::add(m_pDeleteThemeButton,__tr2qs_ctx("Delete Selected Themes","theme")); - connect(m_pDeleteThemeButton,SIGNAL(clicked()),this,SLOT(deleteTheme())); + TQToolTip::add(m_pDeleteThemeButton,__tr2qs_ctx("Delete Selected Themes","theme")); + connect(m_pDeleteThemeButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(deleteTheme())); - sep = new QFrame(hb); - sep->setFrameStyle(QFrame::VLine | QFrame::Sunken); + sep = new TQFrame(hb); + sep->setFrameStyle(TQFrame::VLine | TQFrame::Sunken); sep->setMinimumWidth(12); tb = new KviStyledToolButton(hb); tb->setIconSet(*(g_pIconManager->getBigIcon(KVI_BIGICON_OPEN))); tb->setUsesBigPixmap(true); - QToolTip::add(tb,__tr2qs_ctx("Install Theme Package From Disk","theme")); - connect(tb,SIGNAL(clicked()),this,SLOT(installFromFile())); + TQToolTip::add(tb,__tr2qs_ctx("Install Theme Package From Disk","theme")); + connect(tb,TQT_SIGNAL(clicked()),this,TQT_SLOT(installFromFile())); tb = new KviStyledToolButton(hb); tb->setIconSet(*(g_pIconManager->getBigIcon(KVI_BIGICON_WWW))); tb->setUsesBigPixmap(true); - QToolTip::add(tb,__tr2qs_ctx("Get More Themes...","theme")); - connect(tb,SIGNAL(clicked()),this,SLOT(getMoreThemes())); + TQToolTip::add(tb,__tr2qs_ctx("Get More Themes...","theme")); + connect(tb,TQT_SIGNAL(clicked()),this,TQT_SLOT(getMoreThemes())); - QWidget *w= new QWidget(hb); - w->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Minimum); + TQWidget *w= new TQWidget(hb); + w->tqsetSizePolicy(TQSizePolicy::Expanding,TQSizePolicy::Minimum); m_pListBox = new KviTalListBox(this); m_pListBox->setMinimumHeight(400); m_pListBox->setMinimumWidth(400); m_pListBox->setSelectionMode(KviTalListBox::Extended); - connect(m_pListBox,SIGNAL(doubleClicked(KviTalListBoxItem *)),this,SLOT(applyTheme(KviTalListBoxItem *))); - connect(m_pListBox,SIGNAL(contextMenuRequested(KviTalListBoxItem *,const QPoint &)), - this,SLOT(contextMenuRequested(KviTalListBoxItem *,const QPoint &))); - connect(m_pListBox,SIGNAL(selectionChanged()),this,SLOT(enableDisableButtons())); + connect(m_pListBox,TQT_SIGNAL(doubleClicked(KviTalListBoxItem *)),this,TQT_SLOT(applyTheme(KviTalListBoxItem *))); + connect(m_pListBox,TQT_SIGNAL(contextMenuRequested(KviTalListBoxItem *,const TQPoint &)), + this,TQT_SLOT(contextMenuRequested(KviTalListBoxItem *,const TQPoint &))); + connect(m_pListBox,TQT_SIGNAL(selectionChanged()),this,TQT_SLOT(enableDisableButtons())); g->addMultiCellWidget(m_pListBox,1,1,0,1); KviDynamicToolTip * tip = new KviDynamicToolTip(m_pListBox); - connect(tip,SIGNAL(tipRequest(KviDynamicToolTip *,const QPoint &)),this,SLOT(tipRequest(KviDynamicToolTip *,const QPoint &))); + connect(tip,TQT_SIGNAL(tipRequest(KviDynamicToolTip *,const TQPoint &)),this,TQT_SLOT(tipRequest(KviDynamicToolTip *,const TQPoint &))); - QPushButton * b = new QPushButton(__tr2qs("Close"),this); - connect(b,SIGNAL(clicked()),this,SLOT(closeClicked())); + TQPushButton * b = new TQPushButton(__tr2qs("Close"),this); + connect(b,TQT_SIGNAL(clicked()),this,TQT_SLOT(closeClicked())); g->addWidget(b,2,1); g->setRowStretch(1,0); @@ -235,7 +235,7 @@ KviThemeManagementDialog::KviThemeManagementDialog(QWidget * parent) KviThemeManagementDialog::~KviThemeManagementDialog() { - g_rectManagementDialogGeometry = QRect(pos().x(),pos().y(),size().width(),size().height()); + g_rectManagementDialogGeometry = TQRect(pos().x(),pos().y(),size().width(),size().height()); m_pInstance = 0; } @@ -277,14 +277,14 @@ void KviThemeManagementDialog::packTheme() } -void KviThemeManagementDialog::contextMenuRequested(KviTalListBoxItem * it,const QPoint & pos) +void KviThemeManagementDialog::contextMenuRequested(KviTalListBoxItem * it,const TQPoint & pos) { if(it) { m_pListBox->setCurrentItem(it); m_pContextPopup->clear(); - m_pContextPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_MINUS)),__tr2qs_ctx("&Remove Theme","theme"),this,SLOT(deleteTheme())); - m_pContextPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_ACCEPT)),__tr2qs_ctx("&Apply Theme","theme"),this,SLOT(applyCurrentTheme())); + m_pContextPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_MINUS)),__tr2qs_ctx("&Remove Theme","theme"),this,TQT_SLOT(deleteTheme())); + m_pContextPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_ACCEPT)),__tr2qs_ctx("&Apply Theme","theme"),this,TQT_SLOT(applyCurrentTheme())); m_pContextPopup->popup(pos); } } @@ -304,17 +304,17 @@ void KviThemeManagementDialog::applyCurrentTheme() __tr2qs_ctx("Do you wish to apply theme \"%Q\" (version %Q)?","theme"), &(it->themeInfo()->name()),&(it->themeInfo()->version()))) { - QString szPath = it->themeInfo()->absoluteDirectory(); + TQString szPath = it->themeInfo()->absoluteDirectory(); if(szPath.isEmpty())return; KviThemeInfo out; if(!KviTheme::load(szPath,out)) { - QString szErr = out.lastError(); - QString szMsg; - KviQString::sprintf(szMsg,__tr2qs_ctx("Failed to apply the specified theme: %Q","theme"),&szErr); - QMessageBox::critical(this,__tr2qs_ctx("Apply theme - KVIrc","theme"),szMsg, - QMessageBox::Ok,QMessageBox::NoButton,QMessageBox::NoButton); + TQString szErr = out.lastError(); + TQString szMsg; + KviTQString::sprintf(szMsg,__tr2qs_ctx("Failed to apply the specified theme: %Q","theme"),&szErr); + TQMessageBox::critical(this,__tr2qs_ctx("Apply theme - KVIrc","theme"),szMsg, + TQMessageBox::Ok,TQMessageBox::NoButton,TQMessageBox::NoButton); } } @@ -340,10 +340,10 @@ jump_out: void KviThemeManagementDialog::installFromFile() { int iThemeCount=0; - QString szFileName; - QString szError; + TQString szFileName; + TQString szError; - if(!KviFileDialog::askForOpenFileName(szFileName,__tr2qs_ctx("Open Theme - KVIrc","theme"),QString::null,"*.kvt")) + if(!KviFileDialog::askForOpenFileName(szFileName,__tr2qs_ctx("Open Theme - KVIrc","theme"),TQString(),"*.kvt")) return; if(!KviThemeFunctions::installThemePackage(szFileName,szError,this)) @@ -368,18 +368,18 @@ void KviThemeManagementDialog::saveCurrentTheme() fillThemeBox(); } -void KviThemeManagementDialog::fillThemeBox(const QString &szDir) +void KviThemeManagementDialog::fillThemeBox(const TQString &szDir) { - QDir d(szDir); + TQDir d(szDir); - QStringList sl = d.entryList(QDir::Dirs); + TQStringList sl = d.entryList(TQDir::Dirs); - for(QStringList::Iterator it = sl.begin();it != sl.end();++it) + for(TQStringList::Iterator it = sl.begin();it != sl.end();++it) { if(*it == ".")continue; if(*it == "..")continue; - QString szTest = szDir; + TQString szTest = szDir; szTest += KVI_PATH_SEPARATOR_CHAR; szTest += *it; @@ -399,7 +399,7 @@ void KviThemeManagementDialog::fillThemeBox() { m_pListBox->clear(); - QString szDir; + TQString szDir; g_pApp->getGlobalKvircDirectory(szDir,KviApp::Themes); fillThemeBox(szDir); g_pApp->getLocalKvircDirectory(szDir,KviApp::Themes); @@ -425,13 +425,13 @@ void KviThemeManagementDialog::enableDisableButtons() m_pDeleteThemeButton->setEnabled(b); } -void KviThemeManagementDialog::closeEvent(QCloseEvent * e) +void KviThemeManagementDialog::closeEvent(TQCloseEvent * e) { e->ignore(); delete this; } -void KviThemeManagementDialog::tipRequest(KviDynamicToolTip *pTip,const QPoint &pnt) +void KviThemeManagementDialog::tipRequest(KviDynamicToolTip *pTip,const TQPoint &pnt) { KviThemeListBoxItem * it = (KviThemeListBoxItem *)(m_pListBox->itemAt(pnt)); @@ -439,7 +439,7 @@ void KviThemeManagementDialog::tipRequest(KviDynamicToolTip *pTip,const QPoint & KviThemeInfo * pThemeInfo = it->themeInfo(); - QString szThemeDescription; + TQString szThemeDescription; KviThemeFunctions::getThemeHtmlDescription( szThemeDescription, @@ -455,5 +455,5 @@ void KviThemeManagementDialog::tipRequest(KviDynamicToolTip *pTip,const QPoint & 0 ); - pTip->tip(m_pListBox->itemRect(it),szThemeDescription); + pTip->tip(m_pListBox->tqitemRect(it),szThemeDescription); } diff --git a/src/modules/theme/managementdialog.h b/src/modules/theme/managementdialog.h index 52ae0f86..97e47344 100644 --- a/src/modules/theme/managementdialog.h +++ b/src/modules/theme/managementdialog.h @@ -28,28 +28,28 @@ #include "kvi_pointerlist.h" #include "kvi_theme.h" -#include +#include #ifdef COMPILE_USE_QT4 -#include +#include #define KviTalSimpleRichText Q3SimpleRichText #else -#include -#define KviTalSimpleRichText QSimpleRichText +#include +#define KviTalSimpleRichText TQSimpleRichText #endif #include "kvi_tal_listbox.h" -#include +#include #include "kvi_tal_popupmenu.h" -#include +#include #include -class QLineEdit; +class TQLineEdit; class KviTalTextEdit; -class QPushButton; -class QLabel; -class QCheckBox; +class TQPushButton; +class TQLabel; +class TQCheckBox; -//class QMultiLineEdit; +//class TQMultiLineEdit; class KviDynamicToolTip; class KviStyledToolButton; @@ -67,15 +67,16 @@ public: KviThemeInfo * themeInfo(){ return m_pThemeInfo; }; virtual int height ( const KviTalListBox * lb ) const ; protected: - virtual void paint ( QPainter * painter ); + virtual void paint ( TQPainter * painter ); }; -class KviThemeManagementDialog : public QDialog +class KviThemeManagementDialog : public TQDialog { Q_OBJECT + TQ_OBJECT public: - KviThemeManagementDialog(QWidget * parent); + KviThemeManagementDialog(TQWidget * tqparent); virtual ~KviThemeManagementDialog(); protected: static KviThemeManagementDialog * m_pInstance; @@ -88,9 +89,9 @@ public: static void display(); static void cleanup(); protected: - void fillThemeBox(const QString &szDir); + void fillThemeBox(const TQString &szDir); bool hasSelectedItems(); - virtual void closeEvent(QCloseEvent * e); + virtual void closeEvent(TQCloseEvent * e); protected slots: void saveCurrentTheme(); void getMoreThemes(); @@ -102,8 +103,8 @@ protected slots: void applyTheme(KviTalListBoxItem *); void applyCurrentTheme(); void enableDisableButtons(); - void contextMenuRequested(KviTalListBoxItem * item, const QPoint & pos); - void tipRequest(KviDynamicToolTip *pTip,const QPoint &pnt); + void contextMenuRequested(KviTalListBoxItem * item, const TQPoint & pos); + void tipRequest(KviDynamicToolTip *pTip,const TQPoint &pnt); }; #endif //!_MANAGEMENTDIALOG_H_ diff --git a/src/modules/theme/packthemedialog.cpp b/src/modules/theme/packthemedialog.cpp index 88b248a8..de9b2333 100644 --- a/src/modules/theme/packthemedialog.cpp +++ b/src/modules/theme/packthemedialog.cpp @@ -25,26 +25,26 @@ #include "packthemedialog.h" #include "themefunctions.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #ifdef COMPILE_USE_QT4 -#include -#include +#include +#include #else -#include +#include #endif -#include -#include -#include +#include +#include +#include #include "kvi_options.h" @@ -65,19 +65,19 @@ -KviPackThemeDialog::KviPackThemeDialog(QWidget * pParent,KviPointerList * pThemeInfoList) +KviPackThemeDialog::KviPackThemeDialog(TQWidget * pParent,KviPointerList * pThemeInfoList) : KviTalWizard(pParent) { m_pThemeInfoList = pThemeInfoList; KviThemeInfo * pThemeInfo; - QString szPackageName; - QString szPackageAuthor; - QString szPackageDescription; - QString szPackageVersion; + TQString szPackageName; + TQString szPackageAuthor; + TQString szPackageDescription; + TQString szPackageVersion; - m_szPackagePath = QDir::homeDirPath(); - KviQString::ensureLastCharIs(m_szPackagePath,QChar(KVI_PATH_SEPARATOR_CHAR)); + m_szPackagePath = TQDir::homeDirPath(); + KviTQString::ensureLastCharIs(m_szPackagePath,TQChar(KVI_PATH_SEPARATOR_CHAR)); bool bPackagePathSet = false; @@ -97,7 +97,7 @@ KviPackThemeDialog::KviPackThemeDialog(QWidget * pParent,KviPointerListversion(); m_szPackagePath += pThemeInfo->subdirectory(); - if(m_szPackagePath.find(QRegExp("[0-9]\\.[0-9]")) == -1) + if(m_szPackagePath.tqfind(TQRegExp("[0-9]\\.[0-9]")) == -1) { m_szPackagePath += "-"; m_szPackagePath += szPackageVersion; @@ -122,11 +122,11 @@ KviPackThemeDialog::KviPackThemeDialog(QWidget * pParent,KviPointerListsetText(__tr2qs_ctx("This is the information list for the themes you're packaging. If it looks OK press \"Next\" to continue, otherwise press \"Cancel\" and rewiew your themes first.","theme")); - pLabel->setTextFormat(Qt::RichText); + pLabel->setTextFormat(TQt::RichText); pLayout->addWidget(pLabel,0,0); - QString szThemesDescription = ""; + TQString szThemesDescription = ""; int iIdx = 0; - QPixmap pixScreenshot; - QString szScreenshotPath; + TQPixmap pixScreenshot; + TQString szScreenshotPath; for(pThemeInfo = m_pThemeInfoList->first();pThemeInfo;pThemeInfo = m_pThemeInfoList->next()) { - QString szThemeDescription; + TQString szThemeDescription; if(pixScreenshot.isNull()) { @@ -194,7 +194,7 @@ KviPackThemeDialog::KviPackThemeDialog(QWidget * pParent,KviPointerListsetPaper(QBrush(QColor(255,255,255))); + pTextEdit->setPaper(TQBrush(TQColor(255,255,255))); pTextEdit->setReadOnly(true); pTextEdit->setText(szThemesDescription); pLayout->addWidget(pTextEdit,1,0); @@ -208,31 +208,31 @@ KviPackThemeDialog::KviPackThemeDialog(QWidget * pParent,KviPointerListsetText(__tr2qs_ctx("Here you need to provide informations about you (the packager) and a short description of the package you're creating.","theme")); - pLabel->setTextFormat(Qt::RichText); + pLabel->setTextFormat(TQt::RichText); pLayout->addMultiCellWidget(pLabel,0,0,0,1); - pLabel = new QLabel(pPage); + pLabel = new TQLabel(pPage); pLabel->setText(__tr2qs_ctx("Package Name:","theme")); pLayout->addWidget(pLabel,1,0); - m_pPackageNameEdit = new QLineEdit(pPage); + m_pPackageNameEdit = new TQLineEdit(pPage); m_pPackageNameEdit->setText(szPackageName); pLayout->addWidget(m_pPackageNameEdit,1,1); - pLabel = new QLabel(pPage); + pLabel = new TQLabel(pPage); pLabel->setText(__tr2qs_ctx("Version:","theme")); pLayout->addWidget(pLabel,2,0); - m_pPackageVersionEdit = new QLineEdit(pPage); + m_pPackageVersionEdit = new TQLineEdit(pPage); m_pPackageVersionEdit->setText(szPackageVersion); pLayout->addWidget(m_pPackageVersionEdit,2,1); - pLabel = new QLabel(pPage); + pLabel = new TQLabel(pPage); pLabel->setText(__tr2qs_ctx("Description:","theme")); pLayout->addWidget(pLabel,3,0); @@ -240,11 +240,11 @@ KviPackThemeDialog::KviPackThemeDialog(QWidget * pParent,KviPointerListsetText(szPackageDescription); pLayout->addWidget(m_pPackageDescriptionEdit,3,1); - pLabel = new QLabel(pPage); + pLabel = new TQLabel(pPage); pLabel->setText(__tr2qs_ctx("Package Author:","theme")); pLayout->addWidget(pLabel,4,0); - m_pPackagerNameEdit = new QLineEdit(pPage); + m_pPackagerNameEdit = new TQLineEdit(pPage); m_pPackagerNameEdit->setText(szPackageAuthor); pLayout->addWidget(m_pPackagerNameEdit,4,1); @@ -260,23 +260,23 @@ KviPackThemeDialog::KviPackThemeDialog(QWidget * pParent,KviPointerListsetText(__tr2qs_ctx("Here you can choose the image that will appear in the installation dialog for your theme package. It can be an icon, a logo or a screenshot and it should be not larger than 300x225. If you don't provide an image a simple default icon will be used at installation stage.","theme")); - pLabel->setTextFormat(Qt::RichText); + pLabel->setTextFormat(TQt::RichText); pLayout->addWidget(pLabel,0,0); - m_pImageLabel = new QLabel(pPage); - m_pImageLabel->setFrameStyle(QFrame::Sunken | QFrame::Panel); + m_pImageLabel = new TQLabel(pPage); + m_pImageLabel->setFrameStyle(TQFrame::Sunken | TQFrame::Panel); m_pImageLabel->setMinimumSize(300,225); - m_pImageLabel->setAlignment(Qt::AlignCenter | Qt::AlignVCenter); + m_pImageLabel->tqsetAlignment(TQt::AlignCenter | TQt::AlignVCenter); pLayout->addWidget(m_pImageLabel,1,0); - QString szFilter = "*.png *.jpg *.xpm"; + TQString szFilter = "*.png *.jpg *.xpm"; m_pImageSelector = new KviFileSelector(pPage,"",&m_szImagePath,true,0,szFilter); - connect(m_pImageSelector,SIGNAL(selectionChanged(const QString &)),this,SLOT(imageSelectionChanged(const QString &))); + connect(m_pImageSelector,TQT_SIGNAL(selectionChanged(const TQString &)),this,TQT_SLOT(imageSelectionChanged(const TQString &))); pLayout->addWidget(m_pImageSelector,2,0); pLayout->setRowStretch(1,1); @@ -289,12 +289,12 @@ KviPackThemeDialog::KviPackThemeDialog(QWidget * pParent,KviPointerListsetText(__tr2qs_ctx("Here you must choose the file name for the theme package. It should have a *.%1 extension.","theme").arg(KVI_FILEEXTENSION_THEMEPACKAGE)); - pLabel->setTextFormat(Qt::RichText); + pLabel = new TQLabel(pPage); + pLabel->setText(__tr2qs_ctx("Here you must choose the file name for the theme package. It should have a *.%1 extension.","theme").tqarg(KVI_FILEEXTENSION_THEMEPACKAGE)); + pLabel->setTextFormat(TQt::RichText); pLayout->addWidget(pLabel,0,0); szFilter = "*."; @@ -302,9 +302,9 @@ KviPackThemeDialog::KviPackThemeDialog(QWidget * pParent,KviPointerListaddWidget(m_pPathSelector,1,0); - pLabel = new QLabel(pPage); + pLabel = new TQLabel(pPage); pLabel->setText(__tr2qs_ctx("Finally hit the \"Finish\" button to complete the packaging operation.","theme")); - pLabel->setTextFormat(Qt::RichText); + pLabel->setTextFormat(TQt::RichText); pLayout->addWidget(pLabel,3,0); pLayout->setRowStretch(2,1); @@ -326,17 +326,17 @@ KviPackThemeDialog::~KviPackThemeDialog() { } -void KviPackThemeDialog::imageSelectionChanged(const QString &szImagePath) +void KviPackThemeDialog::imageSelectionChanged(const TQString &szImagePath) { - QImage pix(szImagePath); + TQImage pix(szImagePath); if(!pix.isNull()) { - QPixmap out; + TQPixmap out; if(pix.width() > 300 || pix.height() > 225) #ifdef COMPILE_USE_QT4 - out.convertFromImage(pix.scaled(300,225,Qt::KeepAspectRatio,Qt::SmoothTransformation)); + out.convertFromImage(pix.scaled(300,225,TQt::KeepAspectRatio,TQt::SmoothTransformation)); #else - out.convertFromImage(pix.smoothScale(300,225,QImage::ScaleMin)); + out.convertFromImage(pix.smoothScale(300,225,TQ_ScaleMin)); #endif else out.convertFromImage(pix); @@ -344,11 +344,11 @@ void KviPackThemeDialog::imageSelectionChanged(const QString &szImagePath) return; } - QMessageBox::critical(this,__tr2qs_ctx("Export Theme - KVIrc","theme"),__tr2qs_ctx("Failed to load the selected image","theme"), - QMessageBox::Ok,QMessageBox::NoButton,QMessageBox::NoButton); + TQMessageBox::critical(this,__tr2qs_ctx("Export Theme - KVIrc","theme"),__tr2qs_ctx("Failed to load the selected image","theme"), + TQMessageBox::Ok,TQMessageBox::NoButton,TQMessageBox::NoButton); m_pImageSelector->setSelection(""); - m_pImageLabel->setPixmap(QPixmap()); + m_pImageLabel->setPixmap(TQPixmap()); } @@ -364,28 +364,28 @@ bool KviPackThemeDialog::packTheme() m_pImageSelector->commit(); m_pPathSelector->commit(); - QString szPackageAuthor = m_pPackagerNameEdit->text(); - QString szPackageName = m_pPackageNameEdit->text(); - QString szPackageDescription = m_pPackageDescriptionEdit->text(); - QString szPackageVersion = m_pPackageVersionEdit->text(); + TQString szPackageAuthor = m_pPackagerNameEdit->text(); + TQString szPackageName = m_pPackageNameEdit->text(); + TQString szPackageDescription = m_pPackageDescriptionEdit->text(); + TQString szPackageVersion = m_pPackageVersionEdit->text(); - QImage pix(m_szImagePath); - QPixmap out; + TQImage pix(m_szImagePath); + TQPixmap out; if(!pix.isNull()) { if(pix.width() > 300 || pix.height() > 225) #ifdef COMPILE_USE_QT4 - out.convertFromImage(pix.scaled(300,225,Qt::KeepAspectRatio)); + out.convertFromImage(pix.scaled(300,225,TQt::KeepAspectRatio)); #else - out.convertFromImage(pix.smoothScale(300,225,QImage::ScaleMin)); + out.convertFromImage(pix.smoothScale(300,225,TQ_ScaleMin)); #endif else out.convertFromImage(pix); } else { if(!m_szImagePath.isEmpty()) { - QMessageBox::critical(this,__tr2qs_ctx("Export Theme - KVIrc","theme"),__tr2qs_ctx("Failed to load the selected image: please fix it","theme"), - QMessageBox::Ok,QMessageBox::NoButton,QMessageBox::NoButton); + TQMessageBox::critical(this,__tr2qs_ctx("Export Theme - KVIrc","theme"),__tr2qs_ctx("Failed to load the selected image: please fix it","theme"), + TQMessageBox::Ok,TQMessageBox::NoButton,TQMessageBox::NoButton); setCurrentPage(m_pImageSelectionPage); return false; } @@ -393,7 +393,7 @@ bool KviPackThemeDialog::packTheme() KviPackageWriter f; - QString szTmp = QDateTime::currentDateTime().toString(); + TQString szTmp = TQDateTime::tqcurrentDateTime().toString(); f.addInfoField("PackageType","ThemePack"); f.addInfoField("ThemePackVersion","1"); @@ -406,11 +406,11 @@ bool KviPackThemeDialog::packTheme() if(!out.isNull()) { - QByteArray * pba = new QByteArray(); + TQByteArray * pba = new TQByteArray(); #ifdef COMPILE_USE_QT4 - QBuffer buffer(pba,0); + TQBuffer buffer(pba,0); #else - QBuffer buffer(*pba); + TQBuffer buffer(*pba); #endif buffer.open(IO_WriteOnly); out.save(&buffer,"PNG"); @@ -424,31 +424,31 @@ bool KviPackThemeDialog::packTheme() int iIdx = 0; for(KviThemeInfo * pInfo = m_pThemeInfoList->first();pInfo;pInfo = m_pThemeInfoList->next()) { - KviQString::sprintf(szTmp,"Theme%dName",iIdx); + KviTQString::sprintf(szTmp,"Theme%dName",iIdx); f.addInfoField(szTmp,pInfo->name()); - KviQString::sprintf(szTmp,"Theme%dVersion",iIdx); + KviTQString::sprintf(szTmp,"Theme%dVersion",iIdx); f.addInfoField(szTmp,pInfo->version()); - KviQString::sprintf(szTmp,"Theme%dDescription",iIdx); + KviTQString::sprintf(szTmp,"Theme%dDescription",iIdx); f.addInfoField(szTmp,pInfo->description()); - KviQString::sprintf(szTmp,"Theme%dDate",iIdx); + KviTQString::sprintf(szTmp,"Theme%dDate",iIdx); f.addInfoField(szTmp,pInfo->date()); - KviQString::sprintf(szTmp,"Theme%dSubdirectory",iIdx); + KviTQString::sprintf(szTmp,"Theme%dSubdirectory",iIdx); f.addInfoField(szTmp,pInfo->subdirectory()); - KviQString::sprintf(szTmp,"Theme%dAuthor",iIdx); + KviTQString::sprintf(szTmp,"Theme%dAuthor",iIdx); f.addInfoField(szTmp,pInfo->author()); - KviQString::sprintf(szTmp,"Theme%dApplication",iIdx); + KviTQString::sprintf(szTmp,"Theme%dApplication",iIdx); f.addInfoField(szTmp,pInfo->application()); - KviQString::sprintf(szTmp,"Theme%dThemeEngineVersion",iIdx); + KviTQString::sprintf(szTmp,"Theme%dThemeEngineVersion",iIdx); f.addInfoField(szTmp,pInfo->themeEngineVersion()); - QPixmap pixScreenshot = pInfo->smallScreenshot(); + TQPixmap pixScreenshot = pInfo->smallScreenshot(); if(!pixScreenshot.isNull()) { - KviQString::sprintf(szTmp,"Theme%dScreenshot",iIdx); - QByteArray * pba = new QByteArray(); + KviTQString::sprintf(szTmp,"Theme%dScreenshot",iIdx); + TQByteArray * pba = new TQByteArray(); #ifdef COMPILE_USE_QT4 - QBuffer bufferz(pba,0); + TQBuffer bufferz(pba,0); #else - QBuffer bufferz(*pba); + TQBuffer bufferz(*pba); #endif bufferz.open(IO_WriteOnly); pixScreenshot.save(&bufferz,"PNG"); @@ -461,8 +461,8 @@ bool KviPackThemeDialog::packTheme() szTmp = __tr2qs_ctx("Packaging failed","theme"); szTmp += ": "; szTmp += f.lastError(); - QMessageBox::critical(this,__tr2qs_ctx("Export Theme - KVIrc","theme"),szTmp, - QMessageBox::Ok,QMessageBox::NoButton,QMessageBox::NoButton); + TQMessageBox::critical(this,__tr2qs_ctx("Export Theme - KVIrc","theme"),szTmp, + TQMessageBox::Ok,TQMessageBox::NoButton,TQMessageBox::NoButton); } iIdx++; @@ -473,16 +473,16 @@ bool KviPackThemeDialog::packTheme() szTmp = __tr2qs_ctx("Packaging failed","theme"); szTmp += ": "; szTmp += f.lastError(); - QMessageBox::critical(this,__tr2qs_ctx("Export Theme - KVIrc","theme"),szTmp, - QMessageBox::Ok,QMessageBox::NoButton,QMessageBox::NoButton); + TQMessageBox::critical(this,__tr2qs_ctx("Export Theme - KVIrc","theme"),szTmp, + TQMessageBox::Ok,TQMessageBox::NoButton,TQMessageBox::NoButton); return false; } //KviPackageReader r; //r.unpack("/root/test.kvt","/root/unpacked_test_kvt"); - QMessageBox::information(this,__tr2qs_ctx("Export Theme - KVIrc","theme"),__tr2qs("Package saved succesfully"), - QMessageBox::Ok,QMessageBox::NoButton,QMessageBox::NoButton); + TQMessageBox::information(this,__tr2qs_ctx("Export Theme - KVIrc","theme"),__tr2qs("Package saved succesfully"), + TQMessageBox::Ok,TQMessageBox::NoButton,TQMessageBox::NoButton); return true; } diff --git a/src/modules/theme/packthemedialog.h b/src/modules/theme/packthemedialog.h index 7731cc30..6fab163f 100644 --- a/src/modules/theme/packthemedialog.h +++ b/src/modules/theme/packthemedialog.h @@ -28,39 +28,40 @@ #include "kvi_pointerlist.h" #include "kvi_theme.h" -#include +#include #include -class QLineEdit; +class TQLineEdit; class KviTalTextEdit; -class QLabel; -class QMultiLineEdit; +class TQLabel; +class TQMultiLineEdit; class KviFileSelector; class KviPackThemeDialog : public KviTalWizard { Q_OBJECT + TQ_OBJECT public: - KviPackThemeDialog(QWidget * pParent,KviPointerList * pThemeInfoList); + KviPackThemeDialog(TQWidget * pParent,KviPointerList * pThemeInfoList); virtual ~KviPackThemeDialog(); protected: - QString m_szImagePath; + TQString m_szImagePath; KviFileSelector * m_pImageSelector; - QString m_szPackagePath; + TQString m_szPackagePath; KviFileSelector * m_pPathSelector; - QLabel * m_pImageLabel; + TQLabel * m_pImageLabel; KviPointerList * m_pThemeInfoList; - QLineEdit * m_pPackageNameEdit; + TQLineEdit * m_pPackageNameEdit; KviTalTextEdit * m_pPackageDescriptionEdit; - QLineEdit * m_pPackageVersionEdit; - QLineEdit * m_pPackagerNameEdit; - QWidget * m_pImageSelectionPage; + TQLineEdit * m_pPackageVersionEdit; + TQLineEdit * m_pPackagerNameEdit; + TQWidget * m_pImageSelectionPage; protected: virtual void accept(); bool packTheme(); protected slots: - void imageSelectionChanged(const QString &szImagePath); + void imageSelectionChanged(const TQString &szImagePath); }; #endif //!_PACKTHEMEDIALOG_H_ diff --git a/src/modules/theme/savethemedialog.cpp b/src/modules/theme/savethemedialog.cpp index 79319e60..fb7cee03 100644 --- a/src/modules/theme/savethemedialog.cpp +++ b/src/modules/theme/savethemedialog.cpp @@ -25,25 +25,25 @@ #include "savethemedialog.h" #include "themefunctions.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #ifdef COMPILE_USE_QT4 -#include -#include +#include +#include #else -#include +#include #endif -#include -#include +#include +#include #include "kvi_options.h" @@ -64,18 +64,18 @@ -KviSaveThemeDialog::KviSaveThemeDialog(QWidget * pParent) +KviSaveThemeDialog::KviSaveThemeDialog(TQWidget * pParent) : KviTalWizard(pParent) { setCaption(__tr2qs_ctx("Save Current Theme - KVIrc","theme")); setMinimumSize(400,350); // welcome page ================================================================================== - QWidget * pPage = new QWidget(this); - QGridLayout * pLayout = new QGridLayout(pPage,2,1,4,4); + TQWidget * pPage = new TQWidget(this); + TQGridLayout * pLayout = new TQGridLayout(pPage,2,1,4,4); - QLabel * pLabel = new QLabel(pPage); - QString szText = "

"; + TQLabel * pLabel = new TQLabel(pPage); + TQString szText = "

"; szText += __tr2qs_ctx("This procedure allows you to save the current theme settings to a single directory. It is useful if you want to apply other themes or play with the theme settings and later come back to this theme with a single click. It will also allow you to manually modify the theme settings and later export them to a distributable package.","theme"); szText += "

"; } - QString szShowDetails = __tr2qs_ctx("Show Details","theme"); + TQString szShowDetails = __tr2qs_ctx("Show Details","theme"); - KviQString::sprintf(hd.szHtmlText, + KviTQString::sprintf(hd.szHtmlText, "" \ "" \ "

" \ @@ -266,8 +266,8 @@ namespace KviThemeFunctions KviTalMimeSourceFactory::defaultFactory()->setText("theme_dialog_details",szDetails); KviTalMimeSourceFactory::defaultFactory()->setText("theme_dialog_main",hd.szHtmlText); - QString beginCenter = "
"; - QString endCenter = "
"; + TQString beginCenter = "
"; + TQString endCenter = "
"; hd.szCaption = __tr2qs_ctx("Install Theme Pack - KVIrc","theme"); hd.szUpperLabelText = beginCenter + __tr2qs_ctx("You're about to install the following theme package","theme") + endCenter; @@ -285,12 +285,12 @@ namespace KviThemeFunctions if(bInstall) { - QString szUnpackPath; + TQString szUnpackPath; g_pApp->getLocalKvircDirectory(szUnpackPath,KviApp::Themes); if(!r.unpack(szThemePackageFileName,szUnpackPath)) { - QString szErr2 = r.lastError(); - KviQString::sprintf(szError,__tr2qs_ctx("Failed to unpack the selected file: %Q","theme"),&szErr2); + TQString szErr2 = r.lastError(); + KviTQString::sprintf(szError,__tr2qs_ctx("Failed to unpack the selected file: %Q","theme"),&szErr2); return true; } } @@ -300,37 +300,37 @@ namespace KviThemeFunctions void getThemeHtmlDescription( - QString &szBuffer, - const QString &szThemeName, - const QString &szThemeVersion, - const QString &szThemeDescription, - const QString &szThemeSubdirectory, - const QString &szThemeApplication, - const QString &szThemeAuthor, - const QString &szThemeDate, - const QString &szThemeThemeEngineVersion, - const QPixmap &pixScreenshot, + TQString &szBuffer, + const TQString &szThemeName, + const TQString &szThemeVersion, + const TQString &szThemeDescription, + const TQString &szThemeSubdirectory, + const TQString &szThemeApplication, + const TQString &szThemeAuthor, + const TQString &szThemeDate, + const TQString &szThemeThemeEngineVersion, + const TQPixmap &pixScreenshot, int iUniqueIndexInDocument ) { - QString szAuthor = __tr2qs_ctx("Author","theme"); - QString szCreatedAt = __tr2qs_ctx("Created at","theme"); - QString szCreatedOn = __tr2qs_ctx("Created with","theme"); - QString szThemeEngineVersion = __tr2qs_ctx("Theme Engine Version","theme"); - QString szSubdirectory = __tr2qs_ctx("Subdirectory","theme"); + TQString szAuthor = __tr2qs_ctx("Author","theme"); + TQString szCreatedAt = __tr2qs_ctx("Created at","theme"); + TQString szCreatedOn = __tr2qs_ctx("Created with","theme"); + TQString szThemeEngineVersion = __tr2qs_ctx("Theme Engine Version","theme"); + TQString szSubdirectory = __tr2qs_ctx("Subdirectory","theme"); - QString szScreenshot; + TQString szScreenshot; if(!pixScreenshot.isNull()) { - KviQString::sprintf(szScreenshot,"

",iUniqueIndexInDocument); - QString szTmp; - KviQString::sprintf(szTmp,"theme_shot%d",iUniqueIndexInDocument); + KviTQString::sprintf(szScreenshot,"

",iUniqueIndexInDocument); + TQString szTmp; + KviTQString::sprintf(szTmp,"theme_shot%d",iUniqueIndexInDocument); KviTalMimeSourceFactory::defaultFactory()->setPixmap(szTmp,pixScreenshot); } else { szScreenshot = ""; } - KviQString::sprintf( + KviTQString::sprintf( szBuffer, "

" \ "

%Q %Q

" \ @@ -367,7 +367,7 @@ namespace KviThemeFunctions ); } - bool makeKVIrcScreenshot(const QString &szSavePngFilePath,bool bMaximizeFrame) + bool makeKVIrcScreenshot(const TQString &szSavePngFilePath,bool bMaximizeFrame) { if(bMaximizeFrame) { @@ -378,7 +378,7 @@ namespace KviThemeFunctions if(bMaximizeFrame) g_pFrame->showMaximized(); - QPixmap pix = QPixmap::grabWidget(g_pFrame); + TQPixmap pix = TQPixmap::grabWidget(g_pFrame); bool bResult = true; if(pix.isNull()) diff --git a/src/modules/theme/themefunctions.h b/src/modules/theme/themefunctions.h index 124a65f6..29cec356 100644 --- a/src/modules/theme/themefunctions.h +++ b/src/modules/theme/themefunctions.h @@ -27,26 +27,26 @@ #include "kvi_settings.h" #include "kvi_qstring.h" -#include -#include +#include +#include namespace KviThemeFunctions { - bool installThemePackage(const QString &szThemePackageFileName,QString &szError,QWidget * pDialogParent = 0); + bool installThemePackage(const TQString &szThemePackageFileName,TQString &szError,TQWidget * pDialogParent = 0); void getThemeHtmlDescription( - QString &szBuffer, - const QString &szThemeName, - const QString &szThemeVersion, - const QString &szThemeDescription, - const QString &szThemeSubdirectory, - const QString &szThemeApplication, - const QString &szThemeAuthor, - const QString &szThemeDate, - const QString &szThemeThemeEngineVersion, - const QPixmap &pixScreenshot, + TQString &szBuffer, + const TQString &szThemeName, + const TQString &szThemeVersion, + const TQString &szThemeDescription, + const TQString &szThemeSubdirectory, + const TQString &szThemeApplication, + const TQString &szThemeAuthor, + const TQString &szThemeDate, + const TQString &szThemeThemeEngineVersion, + const TQPixmap &pixScreenshot, int iUniqueIndexInDocument = 0 ); - bool makeKVIrcScreenshot(const QString &szSavePngFilePath,bool bMaximizeFrame = false); + bool makeKVIrcScreenshot(const TQString &szSavePngFilePath,bool bMaximizeFrame = false); }; diff --git a/src/modules/tip/libkvitip.cpp b/src/modules/tip/libkvitip.cpp index ac23d914..9fa3cc76 100644 --- a/src/modules/tip/libkvitip.cpp +++ b/src/modules/tip/libkvitip.cpp @@ -31,21 +31,21 @@ #include "kvi_options.h" #include "kvi_fileutils.h" -#include +#include #ifdef COMPILE_USE_QT4 -#include -#include -#include +#include +#include +#include #define KviTalSimpleRichText Q3SimpleRichText #else -#include -#define KviTalSimpleRichText QSimpleRichText +#include +#define KviTalSimpleRichText TQSimpleRichText #endif -#include -#include -#include +#include +#include +#include KviTipWindow * g_pTipWindow = 0; @@ -58,18 +58,18 @@ KviTipWindow * g_pTipWindow = 0; #define KVI_TIP_WINDOW_SPACING 2 -KviTipFrame::KviTipFrame(QWidget * par) -: QFrame(par) +KviTipFrame::KviTipFrame(TQWidget * par) +: TQFrame(par) { KviStr buffer; g_pApp->findImage(buffer,"kvi_tip.png"); - m_pTipPixmap = new QPixmap(buffer.ptr()); + m_pTipPixmap = new TQPixmap(TQString(buffer.ptr())); #ifdef COMPILE_USE_QT4 - setBackgroundMode(Qt::NoBackground); + setBackgroundMode(TQt::NoBackground); #else - setBackgroundMode(QWidget::NoBackground); + setBackgroundMode(TQWidget::NoBackground); #endif - setFrameStyle(QFrame::Sunken | QFrame::WinPanel); + setFrameStyle(TQFrame::Sunken | TQFrame::WinPanel); } KviTipFrame::~KviTipFrame() @@ -77,7 +77,7 @@ KviTipFrame::~KviTipFrame() delete m_pTipPixmap; } -void KviTipFrame::setText(const QString &text) +void KviTipFrame::setText(const TQString &text) { m_szText = "
"; m_szText += text; @@ -85,29 +85,25 @@ void KviTipFrame::setText(const QString &text) update(); } -void KviTipFrame::drawContents(QPainter *p) +void KviTipFrame::drawContents(TQPainter *p) { - p->fillRect(contentsRect(),QColor(0,0,0)); + p->fillRect(contentsRect(),TQColor(0,0,0)); p->drawPixmap(5,(height() - m_pTipPixmap->height()) / 2,*m_pTipPixmap); - QFont f = QFont(); - f.setStyleHint(QFont::SansSerif); + TQFont f = TQFont(); + f.setStyleHint(TQFont::SansSerif); f.setPointSize(12); KviTalSimpleRichText doc(m_szText,f); doc.setWidth(width() - 80); - QRegion reg(0,0,1000,20000); + TQRegion reg(0,0,1000,20000); -#if QT_VERSION >= 300 - doc.draw(p,70,10,reg,colorGroup()); -#else - doc.draw(p,70,10,reg,palette()); -#endif + doc.draw(p,70,10,reg,tqcolorGroup()); } KviTipWindow::KviTipWindow() -: QWidget(0,"kvirc_tip_window" /*,WStyle_Customize | WStyle_Title | WStyle_DialogBorder | WStyle_StaysOnTop*/ ) +: TQWidget(0,"kvirc_tip_window" /*,WStyle_Customize | WStyle_Title | WStyle_DialogBorder | WStyle_StaysOnTop*/ ) { m_pConfig = 0; @@ -119,23 +115,23 @@ KviTipWindow::KviTipWindow() KVI_TIP_WINDOW_WIDTH - KVI_TIP_WINDOW_DOUBLE_BORDER, KVI_TIP_WINDOW_HEIGHT - (KVI_TIP_WINDOW_DOUBLE_BORDER + KVI_TIP_WINDOW_BUTTON_HEIGHT + KVI_TIP_WINDOW_SPACING)); - QPushButton * pb = new QPushButton(">>",this); + TQPushButton * pb = new TQPushButton(">>",this); pb->setGeometry( KVI_TIP_WINDOW_WIDTH - ((KVI_TIP_WINDOW_BUTTON_WIDTH * 2)+ KVI_TIP_WINDOW_BORDER + KVI_TIP_WINDOW_SPACING), KVI_TIP_WINDOW_HEIGHT - (KVI_TIP_WINDOW_BUTTON_HEIGHT + KVI_TIP_WINDOW_BORDER), KVI_TIP_WINDOW_BUTTON_WIDTH, KVI_TIP_WINDOW_BUTTON_HEIGHT ); - connect(pb,SIGNAL(clicked()),this,SLOT(nextTip())); + connect(pb,TQT_SIGNAL(clicked()),this,TQT_SLOT(nextTip())); - pb = new QPushButton(__tr2qs("Close"),this); + pb = new TQPushButton(__tr2qs("Close"),this); pb->setGeometry( KVI_TIP_WINDOW_WIDTH - (KVI_TIP_WINDOW_BUTTON_WIDTH + KVI_TIP_WINDOW_BORDER), KVI_TIP_WINDOW_HEIGHT - (KVI_TIP_WINDOW_BUTTON_HEIGHT + KVI_TIP_WINDOW_BORDER), KVI_TIP_WINDOW_BUTTON_WIDTH, KVI_TIP_WINDOW_BUTTON_HEIGHT ); - connect(pb,SIGNAL(clicked()),this,SLOT(close())); + connect(pb,TQT_SIGNAL(clicked()),this,TQT_SLOT(close())); pb->setDefault(true); m_pShowAtStartupCheck = new KviStyledCheckBox(__tr2qs("Show at startup"),this); @@ -217,7 +213,7 @@ void KviTipWindow::nextTip() KviStr tmp(KviStr::Format,"%u",uNextTip); - QString szTip = m_pConfig->readEntry(tmp.ptr(),__tr2qs("Can't find any tip... :(")); + TQString szTip = m_pConfig->readEntry(tmp.ptr(),__tr2qs("Can't find any tip... :(")); //debug("REDECODED=%s",szTip.utf8().data()); @@ -228,15 +224,15 @@ void KviTipWindow::nextTip() m_pTipFrame->setText(szTip); } -void KviTipWindow::showEvent(QShowEvent *e) +void KviTipWindow::showEvent(TQShowEvent *e) { resize(KVI_TIP_WINDOW_WIDTH,KVI_TIP_WINDOW_HEIGHT); move((g_pApp->desktop()->width() - KVI_TIP_WINDOW_WIDTH) / 2, (g_pApp->desktop()->height() - KVI_TIP_WINDOW_HEIGHT) / 2); - QWidget::showEvent(e); + TQWidget::showEvent(e); } -void KviTipWindow::closeEvent(QCloseEvent *e) +void KviTipWindow::closeEvent(TQCloseEvent *e) { e->ignore(); delete this; @@ -267,7 +263,7 @@ void KviTipWindow::closeEvent(QCloseEvent *e) static bool tip_kvs_cmd_open(KviKvsModuleCommandCall * c) { - QString szTipfilename; + TQString szTipfilename; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("filename",KVS_PT_STRING,KVS_PF_OPTIONAL,szTipfilename) KVSM_PARAMETERS_END(c) diff --git a/src/modules/tip/libkvitip.h b/src/modules/tip/libkvitip.h index 1387f8df..45339308 100644 --- a/src/modules/tip/libkvitip.h +++ b/src/modules/tip/libkvitip.h @@ -23,33 +23,35 @@ // Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // -#include -#include -#include -#include +#include +#include +#include +#include #include "kvi_styled_controls.h" #include "kvi_string.h" #include "kvi_config.h" -class KviTipFrame : public QFrame +class KviTipFrame : public TQFrame { Q_OBJECT + TQ_OBJECT public: - KviTipFrame(QWidget * par); + KviTipFrame(TQWidget * par); ~KviTipFrame(); protected: - QString m_szText; - QPixmap * m_pTipPixmap; + TQString m_szText; + TQPixmap * m_pTipPixmap; protected: - virtual void drawContents(QPainter *p); + virtual void drawContents(TQPainter *p); public: - void setText(const QString &text); + void setText(const TQString &text); }; -class KviTipWindow : public QWidget +class KviTipWindow : public TQWidget { Q_OBJECT + TQ_OBJECT public: KviTipWindow(); ~KviTipWindow(); @@ -59,8 +61,8 @@ protected: KviConfig * m_pConfig; KviStr m_szConfigFileName; // no path! protected: - virtual void showEvent(QShowEvent *e); - virtual void closeEvent(QCloseEvent *e); + virtual void showEvent(TQShowEvent *e); + virtual void closeEvent(TQCloseEvent *e); public: bool openConfig(const char * filename,bool bEnsureExists = true); void closeConfig(); diff --git a/src/modules/tip/libkvitip_cs.kvc b/src/modules/tip/libkvitip_cs.kvc index ab169fe7..da343337 100644 --- a/src/modules/tip/libkvitip_cs.kvc +++ b/src/modules/tip/libkvitip_cs.kvc @@ -4,7 +4,7 @@ uNumTips=25 Encoding=UTF8 0=Můžete otevřít více spojení s více servery v jednom KVIrc okně, jen vyberte "Nový IRC Kontext" v KVIrc menu.
Původní styl vnořeného okna KVIrcu pro každé spojení je stále podporován, stačí vybrat "Nové okno s rámcem" ze stejné nabídky. 1=IPv6 je nyní plně podporováno, dokonce pro DCC přenosy.
/server -i <název_serveru> je příkaz. :) -2=KVIrc podporuje Šifrování SSL.
IRC spojení šifrovaná pomocí SSL mohou být navázána příkazem /server -s, a DCC spojení použitím /dcc.chat -s
Funguje také na IPv6. +2=KVIrc podporuje Šifrování SSL.
IRC spojení šifrovaná potqmocí SSL mohou být navázána příkazem /server -s, a DCC spojení použitím /dcc.chat -s
Funguje také na IPv6. 3=IRC context je soubor zdrojů patřících k jednomu spojení se serverem. Má přiřazené okno Console které ukazuje systémové zprávy a zprávy serveru. 4=KVIrc je vysoce modulární aplikace. Moduly jsou načítány a vypínány transparentně pro uživatele (i pro skriptora!). Můžete také napsat vlastní moduly pro rozšíření skriptovacího jazyka, nebo rozšíření funkcí KVIrc. 5=Modul gnutella byl odstraněn ze zdrojového stromu KVIrc a je dodáván jako samostatný balíček. @@ -22,7 +22,7 @@ Encoding=UTF8 17=K dispozici je samostatný OpenNap modul (opennap), který umožnuje chat založený na OpenNap s KVIrc. 18=KVIrc podporuje mnoho 8-bitových znakových sad. Můžete "mluvit" KOI8-R Ruštinou na jednom kanále a Japonsky na jiném při stejném spojení (s příslušnými fonty). Doporučujeme použít Unicode (UTF-8), který podporuje téměř každý světový jazyk. 19=Abyste předešli mnohým DCC přenosům, doporučuje se dát si Avatar online na Web. Můžete také použít libovolný existující obrázek na webu jako Avatar.
/avatar #váškanál http://funnyhost.com/funny/funny.png funguje! -20=KVIrc má vestavěný HTTP klient, takže můžete stahovat soubory z Webu pomocí příkazu /http.get. +20=KVIrc má vestavěný HTTP klient, takže můžete stahovat soubory z Webu potqmocí příkazu /http.get. 21=Nelíbí se vám taskbar ve stromu? Můžete si nastavit tradiční taskbar (podobný mIRC) v Nastavení taskbaru. 22=Můžete kopírovat text z okna do schránky pouhým označením myší. Pokud podržíte Shift, budou zkopírovány i barevné kódy. 23=Můžete zkopírovat text kanálu nebo query jen jeho pouhým vybráním. Pokud podržíte Shift, tak se zkopírují i barvy. diff --git a/src/modules/tip/libkvitip_it.kvc b/src/modules/tip/libkvitip_it.kvc index edabad68..481e7e34 100644 --- a/src/modules/tip/libkvitip_it.kvc +++ b/src/modules/tip/libkvitip_it.kvc @@ -6,7 +6,7 @@ TranslatorHint=This-file-MUST-be-encoded-in-UTF8 1=IPv6 ora è supportato completamente, anche per le connessioni DCC.
Il comando è /server -i <nomeserver> :) 2=KVIrc supporta crittazione SSL.
Le connessioni IRC crittate con SSL possono essere stabilite usando /server -s, e connessioni DCC usando /dcc.chat -s
Funziona anche usando IPv6. 3=Un contesto IRC è un set di risorse che dialogano con una singola connessione server. Ha associato una finestra Console che mostra i messaggi di sistema e del server. -4=KVIrc è un'applicazione altamente modulare. I moduli sono caricati e scaricati trasparentemente all'utente (ed anche allo scripter!). Puoi anche scrivere i tuoi moduli personali che estendono il linguaggio di scripting o aggiungono altre funzionalità. +4=KVIrc è un'applicazione altamente modulare. I moduli sono caricati e scaricati trastqparentemente all'utente (ed anche allo scripter!). Puoi anche scrivere i tuoi moduli personali che estendono il linguaggio di scripting o aggiungono altre funzionalità. 5=Il modulo gnutella è stato rimosso dai sorgenti di KVIrc ed è ora distribuito in un pacchetto separato. 6=KVIrc supporta diversi gestori per lo stesso evento. Questo permette di avere diversi script installati allo stesso momento, evitare collisioni tra gestori ed aiutare ad aggiungere/rimuovere e attivare/disattivare gli script. 7=KVIrc supporta gli URL (Uniform Resource Locator) irc://. Lancia il comando:
kvirc irc://irc.tuoserver.org:6667/canale
per connettere a quel server.
La sintassi generale è:
irc[6]://<nome-server>[:<porta>][/[<canale>[?<password>]]] diff --git a/src/modules/tmphighlight/libkvitmphighlight.cpp b/src/modules/tmphighlight/libkvitmphighlight.cpp index 17f4ce17..b69b7998 100644 --- a/src/modules/tmphighlight/libkvitmphighlight.cpp +++ b/src/modules/tmphighlight/libkvitmphighlight.cpp @@ -51,7 +51,7 @@ static bool tmphighlight_kvs_cmd_add(KviKvsModuleCommandCall * c) { - QString szNick; + TQString szNick; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("nick",KVS_PT_NONEMPTYSTRING,0,szNick) KVSM_PARAMETERS_END(c) @@ -90,7 +90,7 @@ static bool tmphighlight_kvs_cmd_add(KviKvsModuleCommandCall * c) static bool tmphighlight_kvs_cmd_remove(KviKvsModuleCommandCall * c) { - QString szNick; + TQString szNick; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("nick",KVS_PT_NONEMPTYSTRING,0,szNick) KVSM_PARAMETERS_END(c) @@ -128,7 +128,7 @@ static bool tmphighlight_kvs_cmd_remove(KviKvsModuleCommandCall * c) static bool tmphighlight_kvs_fnc_ishighlighted(KviKvsModuleFunctionCall * c) { - QString szNick; + TQString szNick; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("nick",KVS_PT_NONEMPTYSTRING,0,szNick) KVSM_PARAMETERS_END(c) diff --git a/src/modules/toolbar/libkvitoolbar.cpp b/src/modules/toolbar/libkvitoolbar.cpp index a72949ca..714de08f 100644 --- a/src/modules/toolbar/libkvitoolbar.cpp +++ b/src/modules/toolbar/libkvitoolbar.cpp @@ -72,7 +72,7 @@ static bool toolbar_kvs_cmd_create(KviKvsModuleCommandCall * c) { - QString szId,szLabel,szIconId; + TQString szId,szLabel,szIconId; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("id",KVS_PT_NONEMPTYSTRING,0,szId) KVSM_PARAMETER("label",KVS_PT_STRING,KVS_PF_OPTIONAL,szLabel) @@ -87,10 +87,10 @@ static bool toolbar_kvs_cmd_create(KviKvsModuleCommandCall * c) */ if(szLabel.isEmpty())szLabel = "$tr(Unnamed)"; - KviCustomToolBarDescriptor * d = KviCustomToolBarManager::instance()->find(szId); + KviCustomToolBarDescriptor * d = KviCustomToolBarManager::instance()->tqfind(szId); if(d) { - if(!c->switches()->find('p',"preserve"))d->clear(); + if(!c->switches()->tqfind('p',"preserve"))d->clear(); d->rename(szLabel); } else { d = KviCustomToolBarManager::instance()->create(szId,szLabel); @@ -127,15 +127,15 @@ static bool toolbar_kvs_cmd_create(KviKvsModuleCommandCall * c) static bool toolbar_kvs_cmd_clear(KviKvsModuleCommandCall * c) { - QString szId; + TQString szId; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("id",KVS_PT_NONEMPTYSTRING,0,szId) KVSM_PARAMETERS_END(c) - KviCustomToolBarDescriptor * d = KviCustomToolBarManager::instance()->find(szId); + KviCustomToolBarDescriptor * d = KviCustomToolBarManager::instance()->tqfind(szId); if(d)d->clear(); else { - if(!c->switches()->find('q',"quiet")) + if(!c->switches()->tqfind('q',"quiet")) c->warning(__tr2qs("The specified toolbar doesn't exist")); } @@ -171,14 +171,14 @@ static bool toolbar_kvs_cmd_clear(KviKvsModuleCommandCall * c) static bool toolbar_kvs_cmd_destroy(KviKvsModuleCommandCall * c) { - QString szId; + TQString szId; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("id",KVS_PT_NONEMPTYSTRING,0,szId) KVSM_PARAMETERS_END(c) if(!KviCustomToolBarManager::instance()->destroyDescriptor(szId)) { - if(!c->switches()->find('q',"quiet")) + if(!c->switches()->tqfind('q',"quiet")) c->warning(__tr2qs("The specified toolbar doesn't exist")); } @@ -214,16 +214,16 @@ static bool toolbar_kvs_cmd_destroy(KviKvsModuleCommandCall * c) static bool toolbar_kvs_cmd_show(KviKvsModuleCommandCall * c) { - QString szId; + TQString szId; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("id",KVS_PT_NONEMPTYSTRING,0,szId) KVSM_PARAMETERS_END(c) - KviCustomToolBarDescriptor * d = KviCustomToolBarManager::instance()->find(szId); + KviCustomToolBarDescriptor * d = KviCustomToolBarManager::instance()->tqfind(szId); if(!d) { - if(!c->switches()->find('q',"quiet")) + if(!c->switches()->tqfind('q',"quiet")) c->warning(__tr2qs("The specified toolbar doesn't exist")); return true; } @@ -263,16 +263,16 @@ static bool toolbar_kvs_cmd_show(KviKvsModuleCommandCall * c) static bool toolbar_kvs_cmd_hide(KviKvsModuleCommandCall * c) { - QString szId; + TQString szId; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("id",KVS_PT_NONEMPTYSTRING,0,szId) KVSM_PARAMETERS_END(c) - KviCustomToolBarDescriptor * d = KviCustomToolBarManager::instance()->find(szId); + KviCustomToolBarDescriptor * d = KviCustomToolBarManager::instance()->tqfind(szId); if(!d) { - if(!c->switches()->find('q',"quiet")) + if(!c->switches()->tqfind('q',"quiet")) c->warning(__tr2qs("The specified toolbar doesn't exist")); return true; } @@ -302,12 +302,12 @@ static bool toolbar_kvs_cmd_hide(KviKvsModuleCommandCall * c) static bool toolbar_kvs_fnc_exists(KviKvsModuleFunctionCall * c) { - QString szId; + TQString szId; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("id",KVS_PT_NONEMPTYSTRING,0,szId) KVSM_PARAMETERS_END(c) - c->returnValue()->setBoolean(KviCustomToolBarManager::instance()->find(szId) ? true : false); + c->returnValue()->setBoolean(KviCustomToolBarManager::instance()->tqfind(szId) ? true : false); return true; } @@ -330,11 +330,11 @@ static bool toolbar_kvs_fnc_exists(KviKvsModuleFunctionCall * c) static bool toolbar_kvs_fnc_isVisible(KviKvsModuleFunctionCall * c) { - QString szId; + TQString szId; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("id",KVS_PT_NONEMPTYSTRING,0,szId) KVSM_PARAMETERS_END(c) - KviCustomToolBarDescriptor * d = KviCustomToolBarManager::instance()->find(szId); + KviCustomToolBarDescriptor * d = KviCustomToolBarManager::instance()->tqfind(szId); c->returnValue()->setBoolean(d ? (d->toolBar() ? true : false) : false); return true; } @@ -359,7 +359,7 @@ static bool toolbar_kvs_fnc_list(KviKvsModuleFunctionCall * c) { KviKvsArray * a = new KviKvsArray(); - KviPointerHashTableIterator it(*(KviCustomToolBarManager::instance()->descriptors())); + KviPointerHashTableIterator it(*(KviCustomToolBarManager::instance()->descriptors())); kvs_uint_t id = 0; @@ -409,49 +409,49 @@ static bool toolbar_kvs_fnc_list(KviKvsModuleFunctionCall * c) static bool toolbar_kvs_cmd_removeitem(KviKvsModuleCommandCall * c) { - QString szId; + TQString szId; KviKvsVariant * pvAction; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("id",KVS_PT_NONEMPTYSTRING,0,szId) KVSM_PARAMETER("action",KVS_PT_VARIANT,0,pvAction) KVSM_PARAMETERS_END(c) - KviCustomToolBarDescriptor * d = KviCustomToolBarManager::instance()->find(szId); + KviCustomToolBarDescriptor * d = KviCustomToolBarManager::instance()->tqfind(szId); if(!pvAction) { - if(!c->switches()->find('q',"quiet")) + if(!c->switches()->tqfind('q',"quiet")) c->error(__tr2qs("No action name/index specified")); // syntax error return false; } if(!d) { - if(!c->switches()->find('q',"quiet")) + if(!c->switches()->tqfind('q',"quiet")) c->warning(__tr2qs("The specified toolbar doesn't exist")); return true; } - if(c->switches()->find('i',"index")) + if(c->switches()->tqfind('i',"index")) { kvs_int_t iAction; if(!pvAction->asInteger(iAction)) { - if(!c->switches()->find('q',"quiet")) + if(!c->switches()->tqfind('q',"quiet")) c->warning(__tr2qs("The action parameter didn't evaluate to an index")); } else { if(!d->removeAction(iAction)) { - if(!c->switches()->find('q',"quiet")) + if(!c->switches()->tqfind('q',"quiet")) c->warning(__tr2qs("The toolbar does not contain the specified item")); } } } else { - QString szAction; + TQString szAction; pvAction->asString(szAction); if(!d->removeAction(szAction)) { - if(!c->switches()->find('q',"quiet")) + if(!c->switches()->tqfind('q',"quiet")) c->warning(__tr2qs("The toolbar does not contain the specified item")); } } @@ -492,25 +492,25 @@ static bool toolbar_kvs_cmd_removeitem(KviKvsModuleCommandCall * c) static bool toolbar_kvs_cmd_additem(KviKvsModuleCommandCall * c) { - QString szId; - QString szAction; + TQString szId; + TQString szAction; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("id",KVS_PT_NONEMPTYSTRING,0,szId) KVSM_PARAMETER("action",KVS_PT_NONEMPTYSTRING,0,szAction) KVSM_PARAMETERS_END(c) - KviCustomToolBarDescriptor * d = KviCustomToolBarManager::instance()->find(szId); + KviCustomToolBarDescriptor * d = KviCustomToolBarManager::instance()->tqfind(szId); if(!d) { - if(!c->switches()->find('q',"quiet")) + if(!c->switches()->tqfind('q',"quiet")) c->warning(__tr2qs("The specified toolbar doesn't exist")); return true; } if(!d->addAction(szAction)) { - if(!c->switches()->find('q',"quiet"))c->warning(__tr2qs("The action \"%Q\" doesn't exist"),&szAction); + if(!c->switches()->tqfind('q',"quiet"))c->warning(__tr2qs("The action \"%Q\" doesn't exist"),&szAction); } return true; @@ -535,12 +535,12 @@ static bool toolbar_kvs_cmd_additem(KviKvsModuleCommandCall * c) static bool toolbar_kvs_fnc_items(KviKvsModuleFunctionCall * c) { - QString szId; + TQString szId; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("id",KVS_PT_NONEMPTYSTRING,0,szId) KVSM_PARAMETERS_END(c) - KviCustomToolBarDescriptor * d = KviCustomToolBarManager::instance()->find(szId); + KviCustomToolBarDescriptor * d = KviCustomToolBarManager::instance()->tqfind(szId); if(!d) { @@ -550,11 +550,11 @@ static bool toolbar_kvs_fnc_items(KviKvsModuleFunctionCall * c) KviKvsArray * a = new KviKvsArray(); - KviPointerHashTableIterator it(*(KviCustomToolBarManager::instance()->descriptors())); + KviPointerHashTableIterator it(*(KviCustomToolBarManager::instance()->descriptors())); kvs_uint_t id = 0; - for(QString * s = d->actions()->first();s;s = d->actions()->next()) + for(TQString * s = d->actions()->first();s;s = d->actions()->next()) { a->set(id,new KviKvsVariant(*s)); id++; diff --git a/src/modules/toolbareditor/libkvitoolbareditor.cpp b/src/modules/toolbareditor/libkvitoolbareditor.cpp index b4f9e258..4cfa80ed 100644 --- a/src/modules/toolbareditor/libkvitoolbareditor.cpp +++ b/src/modules/toolbareditor/libkvitoolbareditor.cpp @@ -32,7 +32,7 @@ #include "kvi_config.h" #include "kvi_app.h" -QRect g_rectToolBarEditorDialogGeometry(0,0,0,0); +TQRect g_rectToolBarEditorDialogGeometry(0,0,0,0); /* @doc: toolbareditor.open @@ -58,10 +58,10 @@ static bool toolbareditor_kvs_cmd_open(KviKvsModuleCommandCall * c) static bool toolbareditor_module_init(KviModule * m) { KVSM_REGISTER_SIMPLE_COMMAND(m,"open",toolbareditor_kvs_cmd_open); - QString szBuf; + TQString szBuf; m->getDefaultConfigFileName(szBuf); KviConfig cfg(szBuf,KviConfig::Read); - g_rectToolBarEditorDialogGeometry = cfg.readRectEntry("EditorGeometry",QRect(10,10,390,440)); + g_rectToolBarEditorDialogGeometry = cfg.readRectEntry("EditorGeometry",TQRect(10,10,390,440)); return true; @@ -76,7 +76,7 @@ static bool toolbareditor_module_cleanup(KviModule *m) { KviCustomizeToolBarsDialog::cleanup(); - QString szBuf; + TQString szBuf; m->getDefaultConfigFileName(szBuf); KviConfig cfg(szBuf,KviConfig::Write); cfg.writeEntry("EditorGeometry",g_rectToolBarEditorDialogGeometry); diff --git a/src/modules/toolbareditor/toolbareditor.cpp b/src/modules/toolbareditor/toolbareditor.cpp index 5b00f47a..d80d8844 100644 --- a/src/modules/toolbareditor/toolbareditor.cpp +++ b/src/modules/toolbareditor/toolbareditor.cpp @@ -36,37 +36,37 @@ #include "kvi_kvs_useraction.h" #include "kvi_draganddrop.h" -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include KviCustomizeToolBarsDialog * KviCustomizeToolBarsDialog::m_pInstance = 0; -extern QRect g_rectToolBarEditorDialogGeometry; +extern TQRect g_rectToolBarEditorDialogGeometry; -KviTrashcanLabel::KviTrashcanLabel(QWidget * p) -: QLabel(p) +KviTrashcanLabel::KviTrashcanLabel(TQWidget * p) +: TQLabel(p) { setPixmap(*(g_pIconManager->getBigIcon("kvi_bigicon_trashcan.png"))); - QToolTip::add(this,__tr2qs("Drop here the icons from the toolbars to remove them")); - setFrameStyle(QFrame::Sunken | QFrame::WinPanel); + TQToolTip::add(this,__tr2qs("Drop here the icons from the toolbars to remove them")); + setFrameStyle(TQFrame::Sunken | TQFrame::WinPanel); setAcceptDrops(true); - setAlignment(Qt::AlignCenter); + tqsetAlignment(TQt::AlignCenter); setMinimumSize(40,40); m_uFlashCount = 0; m_pFlashTimer = 0; m_clrOriginal = paletteBackgroundColor(); - connect(KviActionManager::instance(),SIGNAL(removeActionsHintRequest()),this,SLOT(flash())); + connect(KviActionManager::instance(),TQT_SIGNAL(removeActionsHintRequest()),this,TQT_SLOT(flash())); } KviTrashcanLabel::~KviTrashcanLabel() @@ -82,8 +82,8 @@ void KviTrashcanLabel::flash() { m_uFlashCount = 0; if(m_pFlashTimer)return; - m_pFlashTimer = new QTimer(); - connect(m_pFlashTimer,SIGNAL(timeout()),this,SLOT(heartbeat())); + m_pFlashTimer = new TQTimer(); + connect(m_pFlashTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(heartbeat())); m_pFlashTimer->start(200); } @@ -91,7 +91,7 @@ void KviTrashcanLabel::heartbeat() { m_uFlashCount++; if(m_uFlashCount % 2) - setPaletteBackgroundColor(QColor(0,0,0)); + setPaletteBackgroundColor(TQColor(0,0,0)); else setPaletteBackgroundColor(m_clrOriginal); update(); @@ -103,23 +103,23 @@ void KviTrashcanLabel::heartbeat() } } -void KviTrashcanLabel::dropEvent(QDropEvent * e) +void KviTrashcanLabel::dropEvent(TQDropEvent * e) { if(KviTextDrag::canDecode(e)) e->accept(); } -void KviTrashcanLabel::dragEnterEvent(QDragEnterEvent * e) +void KviTrashcanLabel::dragEnterEvent(TQDragEnterEvent * e) { - QString s; + TQString s; if(KviTextDrag::decode(e,s)) e->accept(); } -KviCustomToolBarPropertiesDialog::KviCustomToolBarPropertiesDialog(QWidget * p,const QString &szText,const QString &szId,const QString &szLabel,const QString &szIconId) -: QDialog(p) +KviCustomToolBarPropertiesDialog::KviCustomToolBarPropertiesDialog(TQWidget * p,const TQString &szText,const TQString &szId,const TQString &szLabel,const TQString &szIconId) +: TQDialog(p) { m_szId = szId; m_szOriginalId = szId; @@ -128,40 +128,40 @@ KviCustomToolBarPropertiesDialog::KviCustomToolBarPropertiesDialog(QWidget * p,c setCaption(__tr2qs("ToolBar Properties")); setIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_TOOLBAR))); - QGridLayout * g = new QGridLayout(this,5,6,5,3); + TQGridLayout * g = new TQGridLayout(this,5,6,5,3); - QLabel * l = new QLabel(szText,this); + TQLabel * l = new TQLabel(szText,this); g->addMultiCellWidget(l,0,0,0,5); - l = new QLabel(__tr2qs("Label") + ":",this); + l = new TQLabel(__tr2qs("Label") + ":",this); g->addWidget(l,1,0); - m_pLabelEdit = new QLineEdit(this); + m_pLabelEdit = new TQLineEdit(this); g->addMultiCellWidget(m_pLabelEdit,1,1,1,5); m_pLabelEdit->setText(szLabel); - connect(m_pLabelEdit,SIGNAL(textChanged(const QString &)),this,SLOT(labelTextChanged(const QString &))); + connect(m_pLabelEdit,TQT_SIGNAL(textChanged(const TQString &)),this,TQT_SLOT(labelTextChanged(const TQString &))); - l = new QLabel(__tr2qs("Icon") + ":",this); + l = new TQLabel(__tr2qs("Icon") + ":",this); g->addWidget(l,2,0); - m_pIconEdit = new QLineEdit(this); + m_pIconEdit = new TQLineEdit(this); m_pIconEdit->setReadOnly(true); g->addMultiCellWidget(m_pIconEdit,2,2,1,4); - m_pIconButton = new QPushButton(this); + m_pIconButton = new TQPushButton(this); g->addMultiCellWidget(m_pIconButton,2,2,5,5); - connect(m_pIconButton,SIGNAL(clicked()),this,SLOT(iconButtonClicked())); + connect(m_pIconButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(iconButtonClicked())); iconSelected(szIconId); - m_pAdvanced = new QWidget(this); - QGridLayout * ag = new QGridLayout(m_pAdvanced,1,2,0,3); + m_pAdvanced = new TQWidget(this); + TQGridLayout * ag = new TQGridLayout(m_pAdvanced,1,2,0,3); - l = new QLabel(__tr2qs("Id") + ":",m_pAdvanced); + l = new TQLabel(__tr2qs("Id") + ":",m_pAdvanced); l->setMinimumWidth(100); ag->addWidget(l,0,0); - m_pIdEdit = new QLineEdit(m_pAdvanced); + m_pIdEdit = new TQLineEdit(m_pAdvanced); ag->addWidget(m_pIdEdit,0,1); ag->setRowStretch(0,1); @@ -172,18 +172,18 @@ KviCustomToolBarPropertiesDialog::KviCustomToolBarPropertiesDialog(QWidget * p,c m_pLabelEdit->setFocus(); - QPushButton * pb = new QPushButton(__tr2qs("OK"),this); - connect(pb,SIGNAL(clicked()),this,SLOT(okClicked())); + TQPushButton * pb = new TQPushButton(__tr2qs("OK"),this); + connect(pb,TQT_SIGNAL(clicked()),this,TQT_SLOT(okClicked())); pb->setMinimumWidth(80); g->addMultiCellWidget(pb,4,4,4,5); - pb = new QPushButton(__tr2qs("Cancel"),this); - connect(pb,SIGNAL(clicked()),this,SLOT(reject())); + pb = new TQPushButton(__tr2qs("Cancel"),this); + connect(pb,TQT_SIGNAL(clicked()),this,TQT_SLOT(reject())); pb->setMinimumWidth(80); g->addWidget(pb,4,3); - m_pAdvancedButton = new QPushButton(__tr2qs("Advanced..."),this); - connect(m_pAdvancedButton,SIGNAL(clicked()),this,SLOT(advancedClicked())); + m_pAdvancedButton = new TQPushButton(__tr2qs("Advanced..."),this); + connect(m_pAdvancedButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(advancedClicked())); m_pAdvancedButton->setMinimumWidth(100); g->addMultiCellWidget(m_pAdvancedButton,4,4,0,1); @@ -197,9 +197,9 @@ KviCustomToolBarPropertiesDialog::~KviCustomToolBarPropertiesDialog() { } -void KviCustomToolBarPropertiesDialog::iconSelected(const QString &szIconId) +void KviCustomToolBarPropertiesDialog::iconSelected(const TQString &szIconId) { - QPixmap * p = g_pIconManager->getImage(szIconId.utf8().data()); + TQPixmap * p = g_pIconManager->getImage(szIconId.utf8().data()); if(p) { m_pIconButton->setPixmap(*p); @@ -215,22 +215,22 @@ void KviCustomToolBarPropertiesDialog::iconSelected(const QString &szIconId) void KviCustomToolBarPropertiesDialog::iconButtonClicked() { KviImageDialog * dlg = new KviImageDialog(this,__tr2qs("Please choose the icon for the ToolBar")); - if(dlg->exec() != QDialog::Accepted) + if(dlg->exec() != TQDialog::Accepted) { delete dlg; return; } - QString s = dlg->selectedImage(); + TQString s = dlg->selectedImage(); delete dlg; iconSelected(s); } -void KviCustomToolBarPropertiesDialog::labelTextChanged(const QString &s) +void KviCustomToolBarPropertiesDialog::labelTextChanged(const TQString &s) { if(m_szOriginalId.isEmpty()) { - QString szId = KviCustomToolBarManager::instance()->idForNewToolBar(s); + TQString szId = KviCustomToolBarManager::instance()->idForNewToolBar(s); m_pIdEdit->setText(szId); } } @@ -240,7 +240,7 @@ void KviCustomToolBarPropertiesDialog::okClicked() { if(m_szLabel.isEmpty()) { - QMessageBox::information(this,__tr2qs("Invalid ToolBar Label"),__tr2qs("The ToolBar Label can't be empty!"),__tr2qs("OK")); + TQMessageBox::information(this,__tr2qs("Invalid ToolBar Label"),__tr2qs("The ToolBar Label can't be empty!"),__tr2qs("OK")); return; } @@ -249,11 +249,11 @@ void KviCustomToolBarPropertiesDialog::okClicked() m_szId = KviCustomToolBarManager::instance()->idForNewToolBar(m_szLabel); } - if(KviCustomToolBarManager::instance()->find(m_szId)) + if(KviCustomToolBarManager::instance()->tqfind(m_szId)) { if(m_szId != m_szOriginalId) { - if(QMessageBox::information(this,__tr2qs("Duplicate ToolBar Id"), + if(TQMessageBox::information(this,__tr2qs("Duplicate ToolBar Id"), __tr2qs("The specified ToolBar Id already exists.
" \ "Would you like KVIrc to assign it automatically (so it doesn't " "collide with any other toolbar) or you prefer to do it manually ?"), @@ -281,43 +281,43 @@ void KviCustomToolBarPropertiesDialog::advancedClicked() } -KviCustomizeToolBarsDialog::KviCustomizeToolBarsDialog(QWidget * p) -: QDialog(p,"" /*,WType_TopLevel | WStyle_Customize | WStyle_Title | WStyle_StaysOnTop | WStyle_DialogBorder*/) +KviCustomizeToolBarsDialog::KviCustomizeToolBarsDialog(TQWidget * p) +: TQDialog(p,"" /*,WType_TopLevel | WStyle_Customize | WStyle_Title | WStyle_StaysOnTop | WStyle_DialogBorder*/) { setCaption(__tr2qs("Customize Toolbars")); setIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_TOOLBAR))); m_pInstance = this; - QGridLayout * g = new QGridLayout(this,8,2,4,5); + TQGridLayout * g = new TQGridLayout(this,8,2,4,5); m_pDrawer = new KviActionDrawer(this); g->addMultiCellWidget(m_pDrawer,0,6,0,0); - QPushButton * b = new QPushButton(__tr2qs("New ToolBar"),this); - connect(b,SIGNAL(clicked()),this,SLOT(newToolBar())); + TQPushButton * b = new TQPushButton(__tr2qs("New ToolBar"),this); + connect(b,TQT_SIGNAL(clicked()),this,TQT_SLOT(newToolBar())); g->addWidget(b,0,1); - m_pDeleteToolBarButton = new QPushButton(__tr2qs("Delete ToolBar"),this); - connect(m_pDeleteToolBarButton,SIGNAL(clicked()),this,SLOT(deleteToolBar())); + m_pDeleteToolBarButton = new TQPushButton(__tr2qs("Delete ToolBar"),this); + connect(m_pDeleteToolBarButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(deleteToolBar())); g->addWidget(m_pDeleteToolBarButton,1,1); - m_pRenameToolBarButton = new QPushButton(__tr2qs("Edit ToolBar"),this); - connect(m_pRenameToolBarButton,SIGNAL(clicked()),this,SLOT(renameToolBar())); + m_pRenameToolBarButton = new TQPushButton(__tr2qs("Edit ToolBar"),this); + connect(m_pRenameToolBarButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(renameToolBar())); g->addWidget(m_pRenameToolBarButton,2,1); - QFrame * f = new QFrame(this); - f->setFrameStyle(QFrame::HLine | QFrame::Sunken); + TQFrame * f = new TQFrame(this); + f->setFrameStyle(TQFrame::HLine | TQFrame::Sunken); g->addWidget(f,3,1); - m_pExportToolBarButton = new QPushButton(__tr2qs("Export ToolBar"),this); - connect(m_pExportToolBarButton,SIGNAL(clicked()),this,SLOT(exportToolBar())); + m_pExportToolBarButton = new TQPushButton(__tr2qs("Export ToolBar"),this); + connect(m_pExportToolBarButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(exportToolBar())); g->addWidget(m_pExportToolBarButton,4,1); KviTrashcanLabel * t = new KviTrashcanLabel(this); g->addWidget(t,6,1); - b = new QPushButton(__tr2qs("Close"),this); - connect(b,SIGNAL(clicked()),this,SLOT(closeClicked())); + b = new TQPushButton(__tr2qs("Close"),this); + connect(b,TQT_SIGNAL(clicked()),this,TQT_SLOT(closeClicked())); g->addWidget(b,7,1); g->setRowStretch(5,1); @@ -325,7 +325,7 @@ KviCustomizeToolBarsDialog::KviCustomizeToolBarsDialog(QWidget * p) m_pDrawer->fill(); - connect(KviActionManager::instance(),SIGNAL(currentToolBarChanged()),this,SLOT(currentToolBarChanged())); + connect(KviActionManager::instance(),TQT_SIGNAL(currentToolBarChanged()),this,TQT_SLOT(currentToolBarChanged())); KviActionManager::instance()->customizeToolBarsDialogCreated(); currentToolBarChanged(); @@ -343,7 +343,7 @@ KviCustomizeToolBarsDialog::KviCustomizeToolBarsDialog(QWidget * p) KviCustomizeToolBarsDialog::~KviCustomizeToolBarsDialog() { - g_rectToolBarEditorDialogGeometry = QRect(pos().x(),pos().y(),size().width(),size().height()); + g_rectToolBarEditorDialogGeometry = TQRect(pos().x(),pos().y(),size().width(),size().height()); KviActionManager::instance()->customizeToolBarsDialogDestroyed(); m_pInstance = 0; @@ -355,10 +355,10 @@ void KviCustomizeToolBarsDialog::currentToolBarChanged() m_pRenameToolBarButton->setEnabled(KviActionManager::instance()->currentToolBar()); } -void KviCustomizeToolBarsDialog::showEvent(QShowEvent * e) +void KviCustomizeToolBarsDialog::showEvent(TQShowEvent * e) { -// repaintContents(); -// QRect r = parentWidget() ? parentWidget()->rect() : QApplication::desktop()->rect(); +// tqrepaintContents(); +// TQRect r = tqparentWidget() ? tqparentWidget()->rect() : TQApplication::desktop()->rect(); // int x = (r.width() - width()) / 2; // int y = (r.height() - height()) / 2; // move(x,y); @@ -369,9 +369,9 @@ void KviCustomizeToolBarsDialog::deleteToolBar() { KviCustomToolBar * t = KviActionManager::currentToolBar(); if(!t)return; - if(QMessageBox::question(this, + if(TQMessageBox::question(this, __tr2qs("Confirm ToolBar Deletion"), - __tr2qs("Do you really want to delete toolbar \"%1\" ?").arg(t->label()), + __tr2qs("Do you really want to delete toolbar \"%1\" ?").tqarg(t->label()), __tr2qs("No"), __tr2qs("Yes")) == 0)return; KviCustomToolBarManager::instance()->destroyDescriptor(t->descriptor()->id()); @@ -382,18 +382,18 @@ void KviCustomizeToolBarsDialog::exportToolBar() KviCustomToolBar * t = KviActionManager::currentToolBar(); if(!t)return; - QString szName = QDir::homeDirPath(); - if(!szName.endsWith(QString(KVI_PATH_SEPARATOR)))szName += KVI_PATH_SEPARATOR; + TQString szName = TQDir::homeDirPath(); + if(!szName.endsWith(TQString(KVI_PATH_SEPARATOR)))szName += KVI_PATH_SEPARATOR; szName += t->descriptor()->id(); szName += ".kvs"; - QString szFile; + TQString szFile; if(!KviFileDialog::askForSaveFileName(szFile,__tr2qs("Choose a Filename - KVIrc"),szName,"*.kvs",true,true,true))return; - QString szCode; + TQString szCode; - int ret = QMessageBox::question(this, + int ret = TQMessageBox::question(this, __tr2qs("ToolBar Export"), __tr2qs("Do you want the associated actions to be exported with the toolbar ?"), __tr2qs("Yes"), @@ -406,10 +406,10 @@ void KviCustomizeToolBarsDialog::exportToolBar() if(bExportActions) { - KviPointerList * a = t->descriptor()->actions(); + KviPointerList * a = t->descriptor()->actions(); if(a) { - for(QString * s = a->first();s;s = a->next()) + for(TQString * s = a->first();s;s = a->next()) { KviAction * act = KviActionManager::instance()->getAction(*s); if(act) @@ -432,10 +432,10 @@ void KviCustomizeToolBarsDialog::exportToolBar() szCode += t->descriptor()->iconId(); szCode += "\n"; - KviPointerList * aa = t->descriptor()->actions(); + KviPointerList * aa = t->descriptor()->actions(); if(aa) { - for(QString * ss = aa->first();ss;ss = aa->next()) + for(TQString * ss = aa->first();ss;ss = aa->next()) { szCode += "toolbar.additem "; szCode += t->descriptor()->id(); @@ -451,7 +451,7 @@ void KviCustomizeToolBarsDialog::exportToolBar() if(!KviFileUtils::writeFile(szFile,szCode)) { - QMessageBox::warning(this,__tr2qs("Write Failed - KVIrc"),__tr2qs("Unable to write to the toolbar file."),__tr2qs("OK")); + TQMessageBox::warning(this,__tr2qs("Write Failed - KVIrc"),__tr2qs("Unable to write to the toolbar file."),__tr2qs("OK")); } } @@ -462,21 +462,21 @@ void KviCustomizeToolBarsDialog::renameToolBar() if(!t)return; KviCustomToolBarPropertiesDialog * dlg = new KviCustomToolBarPropertiesDialog(this, - __tr2qs("Please specify the properties for the toolbar \"%1\"").arg(t->label()), + __tr2qs("Please specify the properties for the toolbar \"%1\"").tqarg(t->label()), t->descriptor()->id(), t->descriptor()->labelCode(), t->descriptor()->iconId()); dlg->show(); - if(dlg->exec() != QDialog::Accepted) + if(dlg->exec() != TQDialog::Accepted) { delete dlg; return; } - QString id = dlg->id(); - QString label = dlg->label(); - QString icon = dlg->iconId(); + TQString id = dlg->id(); + TQString label = dlg->label(); + TQString icon = dlg->iconId(); delete dlg; if((id == t->descriptor()->id()) && (label == t->descriptor()->labelCode()) && (icon == t->descriptor()->iconId()))return; @@ -493,15 +493,15 @@ void KviCustomizeToolBarsDialog::newToolBar() __tr2qs("My ToolBar")); dlg->show(); - if(dlg->exec() != QDialog::Accepted) + if(dlg->exec() != TQDialog::Accepted) { delete dlg; return; } - QString id = dlg->id(); - QString label = dlg->label(); - QString icon = dlg->iconId(); + TQString id = dlg->id(); + TQString label = dlg->label(); + TQString icon = dlg->iconId(); delete dlg; KviCustomToolBarDescriptor * d = KviCustomToolBarManager::instance()->create(id,label); @@ -529,7 +529,7 @@ void KviCustomizeToolBarsDialog::display() m_pInstance->show(); } -void KviCustomizeToolBarsDialog::closeEvent(QCloseEvent * e) +void KviCustomizeToolBarsDialog::closeEvent(TQCloseEvent * e) { e->ignore(); delete this; diff --git a/src/modules/toolbareditor/toolbareditor.h b/src/modules/toolbareditor/toolbareditor.h index 2c44178c..ea2f5252 100644 --- a/src/modules/toolbareditor/toolbareditor.h +++ b/src/modules/toolbareditor/toolbareditor.h @@ -25,34 +25,35 @@ //============================================================================= #include "kvi_settings.h" -#include -#include -#include -#include +#include +#include +#include +#include -class QPushButton; +class TQPushButton; class KviActionDrawer; -class KviCustomizeToolBarsDialog : public QDialog +class KviCustomizeToolBarsDialog : public TQDialog { Q_OBJECT + TQ_OBJECT protected: - KviCustomizeToolBarsDialog(QWidget * p); + KviCustomizeToolBarsDialog(TQWidget * p); public: ~KviCustomizeToolBarsDialog(); protected: KviActionDrawer * m_pDrawer; static KviCustomizeToolBarsDialog * m_pInstance; - QPushButton * m_pDeleteToolBarButton; - QPushButton * m_pRenameToolBarButton; - QPushButton * m_pExportToolBarButton; + TQPushButton * m_pDeleteToolBarButton; + TQPushButton * m_pRenameToolBarButton; + TQPushButton * m_pExportToolBarButton; public: static KviCustomizeToolBarsDialog * instance(){ return m_pInstance; }; static void display(); static void cleanup(); protected: - virtual void showEvent(QShowEvent * e); - virtual void closeEvent(QCloseEvent *e); + virtual void showEvent(TQShowEvent * e); + virtual void closeEvent(TQCloseEvent *e); protected slots: void closeClicked(); void newToolBar(); @@ -62,54 +63,56 @@ protected slots: void currentToolBarChanged(); }; -class QLineEdit; -class QPushButton; +class TQLineEdit; +class TQPushButton; -class KviCustomToolBarPropertiesDialog : public QDialog +class KviCustomToolBarPropertiesDialog : public TQDialog { Q_OBJECT + TQ_OBJECT public: - KviCustomToolBarPropertiesDialog(QWidget * p,const QString &szText,const QString &szId = QString::null,const QString &szLabel = QString::null,const QString &szIconId = QString::null); + KviCustomToolBarPropertiesDialog(TQWidget * p,const TQString &szText,const TQString &szId = TQString(),const TQString &szLabel = TQString(),const TQString &szIconId = TQString()); ~KviCustomToolBarPropertiesDialog(); protected: - QString m_szId; - QString m_szOriginalId; - QString m_szLabel; - QString m_szIconId; - QWidget * m_pAdvanced; - QLineEdit * m_pIdEdit; - QLineEdit * m_pLabelEdit; - QLineEdit * m_pIconEdit; - QPushButton * m_pIconButton; - QPushButton * m_pAdvancedButton; + TQString m_szId; + TQString m_szOriginalId; + TQString m_szLabel; + TQString m_szIconId; + TQWidget * m_pAdvanced; + TQLineEdit * m_pIdEdit; + TQLineEdit * m_pLabelEdit; + TQLineEdit * m_pIconEdit; + TQPushButton * m_pIconButton; + TQPushButton * m_pAdvancedButton; public: - const QString &id(){ return m_szId; }; - const QString &label(){ return m_szLabel; }; - const QString &iconId(){ return m_szIconId; }; + const TQString &id(){ return m_szId; }; + const TQString &label(){ return m_szLabel; }; + const TQString &iconId(){ return m_szIconId; }; protected slots: void okClicked(); void advancedClicked(); void iconButtonClicked(); - void labelTextChanged(const QString &s); + void labelTextChanged(const TQString &s); protected: - void iconSelected(const QString &szIconId); + void iconSelected(const TQString &szIconId); }; -class QTimer; +class TQTimer; -class KviTrashcanLabel : public QLabel +class KviTrashcanLabel : public TQLabel { Q_OBJECT + TQ_OBJECT public: - KviTrashcanLabel(QWidget * p); + KviTrashcanLabel(TQWidget * p); virtual ~KviTrashcanLabel(); protected: unsigned int m_uFlashCount; - QTimer * m_pFlashTimer; - QColor m_clrOriginal; + TQTimer * m_pFlashTimer; + TQColor m_clrOriginal; protected: - virtual void dragEnterEvent(QDragEnterEvent * e); - virtual void dropEvent(QDropEvent * e); + virtual void dragEnterEvent(TQDragEnterEvent * e); + virtual void dropEvent(TQDropEvent * e); public slots: void flash(); protected slots: diff --git a/src/modules/torrent/libkvitorrent.cpp b/src/modules/torrent/libkvitorrent.cpp index 9a929483..8ab218ab 100644 --- a/src/modules/torrent/libkvitorrent.cpp +++ b/src/modules/torrent/libkvitorrent.cpp @@ -86,9 +86,9 @@ static KviTorrentInterface *auto_detect_torrent_client(KviWindow * pOut = 0) } if(pOut) { - QString szOut; - QString szNam = d->name(); - KviQString::sprintf(szOut,__tr2qs_ctx("Trying media player interface \"%Q\": score %d","mediaplayer"),&(szNam),iScore); + TQString szOut; + TQString szNam = d->name(); + KviTQString::sprintf(szOut,__tr2qs_ctx("Trying media player interface \"%Q\": score %d","mediaplayer"),&(szNam),iScore); pOut->output(KVI_OUT_MULTIMEDIA,szOut); } } @@ -127,7 +127,7 @@ static KviTorrentInterface *auto_detect_torrent_client(KviWindow * pOut = 0) if (!c->hasSwitch('q',"quiet")) \ { \ c->warning(__tr2qs_ctx("The selected torrent client interface failed to execute the requested function", "torrent")); \ - QString tmp = __tr2qs_ctx("Last interface error: ", "torrent"); \ + TQString tmp = __tr2qs_ctx("Last interface error: ", "torrent"); \ tmp += KviTorrentInterface::selected()->lastError(); \ c->warning(tmp); \ } \ @@ -169,7 +169,7 @@ static KviTorrentInterface *auto_detect_torrent_client(KviWindow * pOut = 0) { \ kvs_int_t arg1; \ kvs_int_t arg2; \ - QString arg3; \ + TQString arg3; \ KVSM_PARAMETERS_BEGIN(c) \ KVSM_PARAMETER(__argname1, KVS_PT_INT, 0, arg1) \ KVSM_PARAMETER(__argname2, KVS_PT_INT, 0, arg2) \ @@ -191,7 +191,7 @@ static KviTorrentInterface *auto_detect_torrent_client(KviWindow * pOut = 0) TC_KVS_FUNCTION(__name) \ { \ TC_KVS_FAIL_ON_NO_INTERFACE \ - QString szRet = KviTorrentInterface::selected()->__ifacecommand(); \ + TQString szRet = KviTorrentInterface::selected()->__ifacecommand(); \ c->returnValue()->setString(szRet); \ return true; \ } @@ -235,7 +235,7 @@ static KviTorrentInterface *auto_detect_torrent_client(KviWindow * pOut = 0) KVSM_PARAMETER(__argname, KVS_PT_INT, 0, arg) \ KVSM_PARAMETERS_END(c) \ TC_KVS_FAIL_ON_NO_INTERFACE \ - QString szRet = KviTorrentInterface::selected()->__ifacecommand(arg); \ + TQString szRet = KviTorrentInterface::selected()->__ifacecommand(arg); \ c->returnValue()->setString(szRet); \ return true; \ } @@ -250,7 +250,7 @@ static KviTorrentInterface *auto_detect_torrent_client(KviWindow * pOut = 0) KVSM_PARAMETER(__argname2, KVS_PT_INT, 0, arg2) \ KVSM_PARAMETERS_END(c) \ TC_KVS_FAIL_ON_NO_INTERFACE \ - QString szRet = KviTorrentInterface::selected()->__ifacecommand(arg1, arg2); \ + TQString szRet = KviTorrentInterface::selected()->__ifacecommand(arg1, arg2); \ c->returnValue()->setString(szRet); \ return true; \ } @@ -694,7 +694,7 @@ TC_KVS_SIMPLE_COMMAND(stopAll, stopAll) TC_KVS_COMMAND(setClient) { - QString client; + TQString client; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("client", KVS_PT_STRING, 0, client) @@ -873,8 +873,8 @@ static bool torrent_module_ctrl(KviModule * m,const char * operation,void * para debug("torrent module ctrl"); /* if(kvi_strEqualCI(operation,"getAvailableMediaPlayers")) { - // we expect param to be a pointer to QStringList - QStringList * l = (QStringList *)param; + // we expect param to be a pointer to TQStringList + TQStringList * l = (TQStringList *)param; for(KviMediaPlayerInterfaceDescriptor * d = g_pDescriptorList->first();d;d = g_pDescriptorList->next()) { l->append(d->name()); diff --git a/src/modules/torrent/tc_interface.h b/src/modules/torrent/tc_interface.h index 797ea428..c7de40b1 100644 --- a/src/modules/torrent/tc_interface.h +++ b/src/modules/torrent/tc_interface.h @@ -30,9 +30,9 @@ #include "kvi_settings.h" #include "kvi_qstring.h" -#include +#include -class KviTorrentInterface : public QObject +class KviTorrentInterface : public TQObject { public: @@ -47,19 +47,19 @@ public: /* // path of torrent file - virtual QCString getTorrentFile(int i)=0; + virtual TQCString getTorrentFile(int i)=0; // directory where data is downloaded to - virtual QCString getTorrentDataDir(int i)=0; + virtual TQCString getTorrentDataDir(int i)=0; */ // number of files in torrent virtual int fileCount(int i)=0; // name of file in torrent - virtual QString fileName(int i, int file)=0; + virtual TQString fileName(int i, int file)=0; // returns file priority (low, normal, high) - virtual QString filePriority(int i, int file)=0; + virtual TQString filePriority(int i, int file)=0; // sets file priority - virtual bool setFilePriority(int i, int file, const QString &prio)=0; + virtual bool setFilePriority(int i, int file, const TQString &prio)=0; virtual bool start(int i)=0; virtual bool stop(int i)=0; @@ -72,16 +72,16 @@ public: // remove torrent from client virtual bool removeTorrent(int i)=0; - virtual bool addTorrent(const QCString &mrl); + virtual bool addTorrent(const TQCString &mrl); */ // returns state of torrent number i (Stopped, Stalled, Seeding, Downloading) // this uses getTorrentInfo() to obtain the state and then // returns it as string - virtual QString state(int i)=0; + virtual TQString state(int i)=0; // name of torrent as displayed in client // uses getTorrentInfo() - virtual QString name(int i)=0; + virtual TQString name(int i)=0; virtual float speedUp()=0; virtual float speedDown()=0; @@ -95,14 +95,14 @@ public: virtual bool setMaxUploadSpeed(int kbytes_per_sec)=0; virtual bool setMaxDownloadSpeed(int kbytes_per_sec)=0; - QString lastError() { return m_lastError; } + TQString lastError() { return m_lastError; } static void select(KviTorrentInterface *i) { m_selected = i; } static KviTorrentInterface *selected() { return m_selected; } protected: - QString m_lastError; + TQString m_lastError; static KviTorrentInterface *m_selected; }; @@ -113,8 +113,8 @@ public: KviTorrentInterfaceDescriptor() {}; virtual ~KviTorrentInterfaceDescriptor() {}; public: - virtual const QString & name() = 0; - virtual const QString & description() = 0; + virtual const TQString & name() = 0; + virtual const TQString & description() = 0; virtual KviTorrentInterface * instance() = 0; }; @@ -126,11 +126,11 @@ public: virtual ~_interfaceclass ## Descriptor(); \ protected: \ _interfaceclass * m_pInstance; \ - QString m_szName; \ - QString m_szDescription; \ + TQString m_szName; \ + TQString m_szDescription; \ public: \ - virtual const QString & name(); \ - virtual const QString & description(); \ + virtual const TQString & name(); \ + virtual const TQString & description(); \ virtual KviTorrentInterface * instance(); \ }; @@ -146,11 +146,11 @@ public: { \ delete m_pInstance; \ } \ - const QString & _interfaceclass ## Descriptor::name() \ + const TQString & _interfaceclass ## Descriptor::name() \ { \ return m_szName; \ } \ - const QString & _interfaceclass ## Descriptor::description() \ + const TQString & _interfaceclass ## Descriptor::description() \ { \ return m_szDescription; \ } \ diff --git a/src/modules/torrent/tc_ktorrentdcopinterface.cpp b/src/modules/torrent/tc_ktorrentdcopinterface.cpp index 8e770bfc..d6047194 100644 --- a/src/modules/torrent/tc_ktorrentdcopinterface.cpp +++ b/src/modules/torrent/tc_ktorrentdcopinterface.cpp @@ -36,7 +36,7 @@ #include "kvi_locale.h" -#include +#include TORR_IMPLEMENT_DESCRIPTOR( KviKTorrentDCOPInterface, @@ -49,16 +49,16 @@ TORR_IMPLEMENT_DESCRIPTOR( ) #define ERROR_MSG \ - QCString msg; \ + TQCString msg; \ if (!findRunningApp(m_szAppId)) \ msg = "KTorrent's isn't running!"; \ else \ msg = "Something's wrong here! KTorrent's DCOP interface has probably changed."; \ - m_lastError = __tr2qs_ctx(QString(msg), "torrent"); \ + m_lastError = __tr2qs_ctx(TQString(msg), "torrent"); \ debug("%s (%s:%d): %s", __PRETTY_FUNCTION__, __FILE__, __LINE__, (const char*)msg); \ #define ERROR_MSG_RANGE(I, SIZE) \ - KviQString::sprintf(m_lastError, __tr2qs_ctx("Index out of range: %d [0-%d]!", "torrent"), I, (SIZE>0)?(SIZE-1):0); \ + KviTQString::sprintf(m_lastError, __tr2qs_ctx("Index out of range: %d [0-%d]!", "torrent"), I, (SIZE>0)?(SIZE-1):0); \ debug("%s (%s:%d): Index out of range: %d [0-%d]!", __PRETTY_FUNCTION__ , __FILE__, __LINE__, I, (SIZE>0)?(SIZE-1):0); #define ERROR_RET_BOOL \ @@ -112,8 +112,8 @@ KviKTorrentDCOPInterface::KviKTorrentDCOPInterface() { printf("KviKTorrentDCOPInterface\n"); - QTimer *timer = new QTimer(this); - connect(timer, SIGNAL(timeout()), this, SLOT(slotTimer())); + TQTimer *timer = new TQTimer(this); + connect(timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotTimer())); timer->start(250, FALSE); // make sure we have a list of files, @@ -166,7 +166,7 @@ int KviKTorrentDCOPInterface::detect() return 100; } -bool makeSize(float &sz, const QString &s, const QString &u) +bool makeSize(float &sz, const TQString &s, const TQString &u) { bool ok; sz = s.toFloat(&ok); @@ -222,14 +222,14 @@ bool KviKTorrentDCOPInterface::announce(int i) return true; } -QString KviKTorrentDCOPInterface::state(int i) +TQString KviKTorrentDCOPInterface::state(int i) { CHECK_RANGE_STRING(i, m_ti.size()) return m_ti[i].state; } -QString KviKTorrentDCOPInterface::name(int i) +TQString KviKTorrentDCOPInterface::name(int i) { CHECK_RANGE_STRING(i, m_ti.size()) @@ -247,7 +247,7 @@ int KviKTorrentDCOPInterface::fileCount(int i) return ret; } -QString KviKTorrentDCOPInterface::fileName(int i, int file) +TQString KviKTorrentDCOPInterface::fileName(int i, int file) { CHECK_RANGE_STRING(i, m_ti.size()) @@ -260,11 +260,11 @@ QString KviKTorrentDCOPInterface::fileName(int i, int file) return ret[file]; } -QString KviKTorrentDCOPInterface::filePriority(int i, int file) +TQString KviKTorrentDCOPInterface::filePriority(int i, int file) { CHECK_RANGE_STRING(i, m_ti.size()) - QValueList ret; + TQValueList ret; if (!qvalueListIntRetIntDCOPCall("KTorrent", "getFilePriorities(int)",ret, m_ti[i].num)) ERROR_RET_STRING @@ -281,7 +281,7 @@ QString KviKTorrentDCOPInterface::filePriority(int i, int file) ERROR_RET_STRING } -bool KviKTorrentDCOPInterface::setFilePriority(int i, int file, const QString &prio) +bool KviKTorrentDCOPInterface::setFilePriority(int i, int file, const TQString &prio) { CHECK_RANGE_BOOL(i, m_ti.size()) @@ -330,7 +330,7 @@ float KviKTorrentDCOPInterface::speedUp() if (!qcstringListRetVoidDCOPCall("KTorrent", "getInfo()", ret)) ERROR_RET_NUM - QStringList tmp = QStringList::split(" ", ret[2]); + TQStringList tmp = TQStringList::split(" ", ret[2]); if (tmp.size() != 8) ERROR_RET_NUM @@ -348,7 +348,7 @@ float KviKTorrentDCOPInterface::speedDown() if (!qcstringListRetVoidDCOPCall("KTorrent", "getInfo()", ret)) ERROR_RET_NUM - QStringList tmp = QStringList::split(" ", ret[2]); + TQStringList tmp = TQStringList::split(" ", ret[2]); if (tmp.size() != 8) ERROR_RET_NUM @@ -366,7 +366,7 @@ float KviKTorrentDCOPInterface::trafficUp() if (!qcstringListRetVoidDCOPCall("KTorrent", "getInfo()", ret)) ERROR_RET_NUM - QStringList tmp = QStringList::split(" ", ret[1]); + TQStringList tmp = TQStringList::split(" ", ret[1]); if (tmp.size() != 8) ERROR_RET_NUM @@ -383,7 +383,7 @@ float KviKTorrentDCOPInterface::trafficDown() if (!qcstringListRetVoidDCOPCall("KTorrent", "getInfo()", ret)) ERROR_RET_NUM - QStringList tmp = QStringList::split(" ", ret[1]); + TQStringList tmp = TQStringList::split(" ", ret[1]); if (tmp.size() != 8) ERROR_RET_NUM @@ -412,29 +412,29 @@ bool KviKTorrentDCOPInterface::makeTorrentInfo(TorrentInfo &ti, const KviQCStrin ti.state = "Stopped"; - QStringList tmp; - tmp = QStringList::split(" ", ret[2]); + TQStringList tmp; + tmp = TQStringList::split(" ", ret[2]); if (tmp.size()!=2 || !makeSize(ti.trafficDown, tmp[0], tmp[1])) ERROR_RET_BOOL - tmp = QStringList::split(" ", ret[3]); + tmp = TQStringList::split(" ", ret[3]); if (tmp.size()!=2 || !makeSize(ti.size, tmp[0], tmp[1])) ERROR_RET_BOOL - tmp = QStringList::split(" ", ret[4]); + tmp = TQStringList::split(" ", ret[4]); if (tmp.size()!=2 || !makeSize(ti.trafficUp, tmp[0], tmp[1])) ERROR_RET_BOOL bool ok; - tmp = QStringList::split(" ", ret[5]); + tmp = TQStringList::split(" ", ret[5]); if (tmp.size()!=2) ERROR_RET_BOOL ti.speedDown = tmp[0].toFloat(&ok); if (!ok) ERROR_RET_BOOL - tmp = QStringList::split(" ", ret[6]); + tmp = TQStringList::split(" ", ret[6]); if (tmp.size()!=2) ERROR_RET_BOOL ti.speedUp = tmp[0].toFloat(&ok); @@ -447,7 +447,7 @@ bool KviKTorrentDCOPInterface::makeTorrentInfo(TorrentInfo &ti, const KviQCStrin if (!ok) ERROR_RET_BOOL - tmp = QStringList::split(" ", ret[9]); + tmp = TQStringList::split(" ", ret[9]); if (tmp.size()!=2) ERROR_RET_BOOL ti.percent = tmp[0].toFloat(&ok); diff --git a/src/modules/torrent/tc_ktorrentdcopinterface.h b/src/modules/torrent/tc_ktorrentdcopinterface.h index 8f39810f..529fb37e 100644 --- a/src/modules/torrent/tc_ktorrentdcopinterface.h +++ b/src/modules/torrent/tc_ktorrentdcopinterface.h @@ -41,6 +41,7 @@ class KviKTorrentDCOPInterface : public KviTorrentInterface, private KviDCOPHelper { Q_OBJECT + TQ_OBJECT public: @@ -54,13 +55,13 @@ public: virtual bool start(int i); virtual bool stop(int i); virtual bool announce(int i); - virtual QString state(int i); - virtual QString name(int i); + virtual TQString state(int i); + virtual TQString name(int i); virtual int fileCount(int i); - virtual QString fileName(int i, int file); - virtual QString filePriority(int i, int file); - virtual bool setFilePriority(int i, int file, const QString &prio); + virtual TQString fileName(int i, int file); + virtual TQString filePriority(int i, int file); + virtual bool setFilePriority(int i, int file, const TQString &prio); virtual bool startAll(); virtual bool stopAll(); @@ -96,9 +97,9 @@ private: // internal number int num; // name displayed in ktorrent - QString name; + TQString name; // state of torrent - QString state; + TQString state; // bytes float size; // bytes @@ -117,7 +118,7 @@ private: bool operator<(const TorrentInfo &ti) { return name < ti.name; } }; - QValueList m_ti; + TQValueList m_ti; private: diff --git a/src/modules/torrent/tc_statusbarapplet.cpp b/src/modules/torrent/tc_statusbarapplet.cpp index 5d23a299..b609e8d4 100644 --- a/src/modules/torrent/tc_statusbarapplet.cpp +++ b/src/modules/torrent/tc_statusbarapplet.cpp @@ -1,14 +1,14 @@ -#include "qtimer.h" +#include "tqtimer.h" #include "kvi_locale.h" #include "kvi_iconmanager.h" #include "tc_interface.h" #include "tc_statusbarapplet.h" -KviTorrentStatusBarApplet::KviTorrentStatusBarApplet(KviStatusBar *parent, KviStatusBarAppletDescriptor *desc) - : KviStatusBarApplet(parent, desc) +KviTorrentStatusBarApplet::KviTorrentStatusBarApplet(KviStatusBar *tqparent, KviStatusBarAppletDescriptor *desc) + : KviStatusBarApplet(tqparent, desc) { - QTimer *timer = new QTimer(this); - connect(timer, SIGNAL(timeout()), this, SLOT(update())); + TQTimer *timer = new TQTimer(this); + connect(timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(update())); timer->start(250, FALSE); // updateDisplay(); // @@ -36,26 +36,26 @@ void KviTorrentStatusBarApplet::selfRegister(KviStatusBar *bar) bar->registerAppletDescriptor(d); } -QString formatSize(float sz) +TQString formatSize(float sz) { if (sz >= 1024.0f*1024.0f*1024.0f) - return QString("%1 GB").arg(sz / (1024.0f*1024.0f*1024.0f), 2, 'f', 2); + return TQString("%1 GB").tqarg(sz / (1024.0f*1024.0f*1024.0f), 2, 'f', 2); if (sz >= 1024.0f*1024.0f) - return QString("%1 MB").arg(sz / (1024.0f*1024.0f), 2, 'f', 2); + return TQString("%1 MB").tqarg(sz / (1024.0f*1024.0f), 2, 'f', 2); if (sz >= 1024.0f) - return QString("%1 KB").arg(sz / 1024.0f, 2, 'f', 2); - return QString("%1 B").arg(sz, 2, 'f', 2); + return TQString("%1 KB").tqarg(sz / 1024.0f, 2, 'f', 2); + return TQString("%1 B").tqarg(sz, 2, 'f', 2); } void KviTorrentStatusBarApplet::update() { if (KviTorrentInterface::selected()) { - QString msg = QString("up: %1 K/s (%2), dn: %3 K/s (%4)") - .arg(KviTorrentInterface::selected()->speedUp(), 2) - .arg(formatSize(KviTorrentInterface::selected()->trafficUp())) - .arg(KviTorrentInterface::selected()->speedDown(), 2) - .arg(formatSize(KviTorrentInterface::selected()->trafficDown())); + TQString msg = TQString("up: %1 K/s (%2), dn: %3 K/s (%4)") + .tqarg(KviTorrentInterface::selected()->speedUp(), 2) + .tqarg(formatSize(KviTorrentInterface::selected()->trafficUp())) + .tqarg(KviTorrentInterface::selected()->speedDown(), 2) + .tqarg(formatSize(KviTorrentInterface::selected()->trafficDown())); setText(msg); diff --git a/src/modules/torrent/tc_statusbarapplet.h b/src/modules/torrent/tc_statusbarapplet.h index 03dd6d0d..63ab3054 100644 --- a/src/modules/torrent/tc_statusbarapplet.h +++ b/src/modules/torrent/tc_statusbarapplet.h @@ -9,10 +9,11 @@ class KviTorrentStatusBarApplet : public KviStatusBarApplet { Q_OBJECT + TQ_OBJECT public: - KviTorrentStatusBarApplet(KviStatusBar *parent, KviStatusBarAppletDescriptor *desc); + KviTorrentStatusBarApplet(KviStatusBar *tqparent, KviStatusBarAppletDescriptor *desc); virtual ~KviTorrentStatusBarApplet(); static void selfRegister(KviStatusBar *bar); diff --git a/src/modules/url/libkviurl.cpp b/src/modules/url/libkviurl.cpp index 16430c67..abe3d79e 100644 --- a/src/modules/url/libkviurl.cpp +++ b/src/modules/url/libkviurl.cpp @@ -33,17 +33,17 @@ #include "kvi_taskbar.h" #include "icons.h" #include "kvi_pointerlist.h" -#include -#include -#include -#include +#include +#include +#include +#include #ifdef COMPILE_USE_QT4 - #include - #include + #include + #include #endif -static QPixmap * g_pUrlIconPixmap = 0; +static TQPixmap * g_pUrlIconPixmap = 0; static KviUrlAction * g_pUrlAction = 0; typedef struct _UrlDlgList @@ -80,7 +80,7 @@ static KviModuleExtension * url_extension_alloc(KviModuleExtensionAllocStruct * } -KviUrlAction::KviUrlAction(QObject * pParent) +KviUrlAction::KviUrlAction(TQObject * pParent) : KviKvsAction(pParent, "url.list", "url.list", @@ -88,8 +88,8 @@ KviUrlAction::KviUrlAction(QObject * pParent) __tr2qs("Shows the URL list window"), KviActionManager::categoryGeneric()) { - m_pBigIcon = new QPixmap(url_toolbar_xpm); - m_pSmallIcon = new QPixmap(url_icon_xpm); + m_pBigIcon = new TQPixmap(url_toolbar_xpm); + m_pSmallIcon = new TQPixmap(url_icon_xpm); } KviUrlAction::~KviUrlAction() @@ -98,12 +98,12 @@ KviUrlAction::~KviUrlAction() delete m_pSmallIcon; } -QPixmap * KviUrlAction::bigIcon() +TQPixmap * KviUrlAction::bigIcon() { return m_pBigIcon; } -QPixmap * KviUrlAction::smallIcon() +TQPixmap * KviUrlAction::smallIcon() { return m_pSmallIcon; } @@ -121,15 +121,15 @@ UrlDialog::UrlDialog(KviPointerList *g_pList) KviTalPopupMenu *pop; pop = new KviTalPopupMenu(this); - pop->insertItem(__tr2qs("&Configure"),this,SLOT(config())); - pop->insertItem(__tr2qs("&Help"),this,SLOT(help())); - pop->insertItem(__tr2qs("Clo&se"),this,SLOT(close_slot())); + pop->insertItem(__tr2qs("&Configure"),this,TQT_SLOT(config())); + pop->insertItem(__tr2qs("&Help"),this,TQT_SLOT(help())); + pop->insertItem(__tr2qs("Clo&se"),this,TQT_SLOT(close_slot())); m_pMenuBar->insertItem(__tr2qs("&Module"),pop); pop = new KviTalPopupMenu(this); - pop->insertItem(__tr2qs("&Load"),this,SLOT(loadList())); - pop->insertItem(__tr2qs("&Save"),this,SLOT(saveList())); - pop->insertItem(__tr2qs("&Clear"),this,SLOT(clear())); + pop->insertItem(__tr2qs("&Load"),this,TQT_SLOT(loadList())); + pop->insertItem(__tr2qs("&Save"),this,TQT_SLOT(saveList())); + pop->insertItem(__tr2qs("&Clear"),this,TQT_SLOT(clear())); m_pMenuBar->insertItem(__tr2qs("&List"),pop); m_pUrlList->setShowSortIndicator(true); @@ -144,14 +144,14 @@ UrlDialog::UrlDialog(KviPointerList *g_pList) m_pUrlList->setColumnWidth(2,cfg.readIntEntry("Count",70)); m_pUrlList->setColumnWidth(3,cfg.readIntEntry("Timestamp",70)); - connect(m_pUrlList,SIGNAL(doubleClicked(KviTalListViewItem *)),SLOT(dblclk_url(KviTalListViewItem *))); - connect(m_pUrlList,SIGNAL(rightButtonPressed(KviTalListViewItem *, const QPoint &, int)),SLOT(popup(KviTalListViewItem *, const QPoint &, int))); + connect(m_pUrlList,TQT_SIGNAL(doubleClicked(KviTalListViewItem *)),TQT_SLOT(dblclk_url(KviTalListViewItem *))); + connect(m_pUrlList,TQT_SIGNAL(rightButtonPressed(KviTalListViewItem *, const TQPoint &, int)),TQT_SLOT(popup(KviTalListViewItem *, const TQPoint &, int))); // setFocusHandlerNoChildren(m_pUrlList); #ifdef COMPILE_USE_QT4 - m_pUrlList->setFocusPolicy(Qt::StrongFocus); + m_pUrlList->setFocusPolicy(TTQ_StrongFocus); #else - m_pUrlList->setFocusPolicy(QWidget::StrongFocus); + m_pUrlList->setFocusPolicy(TQ_StrongFocus); #endif m_pUrlList->setFocus(); } @@ -213,7 +213,7 @@ void UrlDialog::close_slot() void UrlDialog::remove() { if (!m_pUrlList->currentItem()) { - QMessageBox::warning(0,__tr2qs("Warning - KVIrc"),__tr2qs("Select an URL."),QMessageBox::Ok,QMessageBox::NoButton,QMessageBox::NoButton); + TQMessageBox::warning(0,__tr2qs("Warning - KVIrc"),__tr2qs("Select an URL."),TQMessageBox::Ok,TQMessageBox::NoButton,TQMessageBox::NoButton); return; } @@ -238,7 +238,7 @@ void UrlDialog::findtext() for(KviUrl *tmp=g_pList->first();tmp;tmp=g_pList->next()) { if (tmp->url == KviStr(m_pUrlList->currentItem()->text(0))) { - g_pList->find(tmp); + g_pList->tqfind(tmp); KviStr ft="findtext %"; ft.replaceAll('%',tmp->url.ptr()); KviWindow *wnd = m_pFrm->findWindow(tmp->window.ptr()); @@ -255,53 +255,53 @@ void UrlDialog::findtext() void UrlDialog::dblclk_url(KviTalListViewItem *item) { - QString cmd="openurl "; + TQString cmd="openurl "; cmd.append(item->text(0)); KviKvsScript::run(cmd,this); } -void UrlDialog::popup(KviTalListViewItem *item, const QPoint &point, int col) +void UrlDialog::popup(KviTalListViewItem *item, const TQPoint &point, int col) { if (col == 0) { m_szUrl = item->text(0); KviTalPopupMenu p(0,"menu"); - p.insertItem(__tr2qs("&Remove"),this,SLOT(remove())); - p.insertItem(__tr2qs("&Find Text"),this,SLOT(findtext())); + p.insertItem(__tr2qs("&Remove"),this,TQT_SLOT(remove())); + p.insertItem(__tr2qs("&Find Text"),this,TQT_SLOT(findtext())); p.insertSeparator(); m_pListPopup = new KviTalPopupMenu(0,"list"); int i=0; for(KviWindow *w=g_pFrame->windowList()->first();w;w=g_pFrame->windowList()->next()){ if ((w->type() <= 2) || (w->type() == 2) || (w->type() == 6)) { // values defined in kvi_define.h (console,channel,query,chat,uwindow) - m_pListPopup->insertItem(QString(w->plainTextCaption()),i); - m_pListPopup->connectItem(i,this,SLOT(sayToWin(int))); + m_pListPopup->insertItem(TQString(w->plainTextCaption()),i); + m_pListPopup->connectItem(i,this,TQT_SLOT(sayToWin(int))); i++; } } p.insertItem(__tr2qs("&Say to Window"),m_pListPopup); - p.exec(QCursor::pos()); + p.exec(TQCursor::pos()); } } void UrlDialog::sayToWin(int itemID) { KviWindow *wnd = g_pApp->findWindowByCaption(m_pListPopup->text(itemID).utf8().data()); - QString say=QString("PRIVMSG %1 %2").arg(wnd->windowName()).arg(m_szUrl.ptr()); + TQString say=TQString("PRIVMSG %1 %2").tqarg(wnd->windowName()).tqarg(m_szUrl.ptr()); if (wnd) { KviKvsScript::run(say,wnd); wnd->raise(); wnd->setActiveWindow(); wnd->setFocus(); - } else QMessageBox::warning(0,__tr2qs("Warning - KVIrc"),__tr2qs("Window not found."),QMessageBox::Ok,QMessageBox::NoButton,QMessageBox::NoButton); + } else TQMessageBox::warning(0,__tr2qs("Warning - KVIrc"),__tr2qs("Window not found."),TQMessageBox::Ok,TQMessageBox::NoButton,TQMessageBox::NoButton); } -QPixmap *UrlDialog::myIconPtr() +TQPixmap *UrlDialog::myIconPtr() { - //QPixmap *icon = new QPixmap(url_icon_xpm); + //TQPixmap *icon = new TQPixmap(url_icon_xpm); //return icon; return g_pUrlIconPixmap; } -void UrlDialog::addUrl(QString url, QString window, QString count, QString timestamp) +void UrlDialog::addUrl(TQString url, TQString window, TQString count, TQString timestamp) { KviTalListViewItem *UrlItem = new KviTalListViewItem(m_pUrlList); @@ -311,7 +311,7 @@ void UrlDialog::addUrl(QString url, QString window, QString count, QString times UrlItem->setText(3, timestamp); } -void UrlDialog::resizeEvent(QResizeEvent *) +void UrlDialog::resizeEvent(TQResizeEvent *) { int hght = m_pMenuBar->heightForWidth(width()); m_pMenuBar->setGeometry(0,0,width(),hght); @@ -344,11 +344,11 @@ UrlDialog::~UrlDialog() // --------------------------- CLASS CONFIGDIALOG ----------------------begin // ConfigDialog::ConfigDialog() -:QDialog() +:TQDialog() { setCaption(__tr2qs("URL Module Configuration")); - QGridLayout *g = new QGridLayout(this,4,2,10,10); + TQGridLayout *g = new TQGridLayout(this,4,2,10,10); KviConfig *cfg = new KviConfig(szConfigPath.ptr(),KviConfig::Read); cfg->setGroup("ConfigDialog"); @@ -367,14 +367,14 @@ ConfigDialog::ConfigDialog() m_pBanFrame = new BanFrame(this,"banlist",tmp); g->addMultiCellWidget(m_pBanFrame,3,3,0,1); - QPushButton *b; + TQPushButton *b; // configure buttons - b = new QPushButton(__tr2qs("&Cancel"),this,"discard"); - connect(b,SIGNAL(clicked()),this,SLOT(discardbtn())); + b = new TQPushButton(__tr2qs("&Cancel"),this,"discard"); + connect(b,TQT_SIGNAL(clicked()),this,TQT_SLOT(discardbtn())); g->addWidget(b,4,0); - b = new QPushButton(__tr2qs("&OK"),this,"accept"); - connect(b,SIGNAL(clicked()),this,SLOT(acceptbtn())); + b = new TQPushButton(__tr2qs("&OK"),this,"accept"); + connect(b,TQT_SIGNAL(clicked()),this,TQT_SLOT(acceptbtn())); g->addWidget(b,4,1); show(); @@ -398,7 +398,7 @@ void ConfigDialog::acceptbtn() delete this; } -void ConfigDialog::closeEvent(QCloseEvent *) +void ConfigDialog::closeEvent(TQCloseEvent *) { delete this; } @@ -413,15 +413,15 @@ ConfigDialog::~ConfigDialog() // ---------------------------- CLASS BANFRAME ------------------------begin // -BanFrame::BanFrame(QWidget *parent, const char *name, bool banEnabled) -:QFrame(parent,name) +BanFrame::BanFrame(TQWidget *tqparent, const char *name, bool banEnabled) +:TQFrame(tqparent,name) { - setFrameStyle(QFrame::Panel | QFrame::Raised); + setFrameStyle(TQFrame::Panel | TQFrame::Raised); - QGridLayout *g = new QGridLayout(this,2,2,10,10); + TQGridLayout *g = new TQGridLayout(this,2,2,10,10); m_pEnable = new KviStyledCheckBox(__tr2qs("Enable URL ban list"),this); - connect(m_pEnable,SIGNAL(clicked()),this,SLOT(enableClicked())); + connect(m_pEnable,TQT_SIGNAL(clicked()),this,TQT_SLOT(enableClicked())); m_pEnable->setChecked(banEnabled); g->addMultiCellWidget(m_pEnable,0,0,0,1); @@ -432,13 +432,13 @@ BanFrame::BanFrame(QWidget *parent, const char *name, bool banEnabled) m_pBanList->setEnabled(m_pEnable->isChecked()); g->addMultiCellWidget(m_pBanList,1,1,0,1); - m_pAddBtn = new QPushButton(__tr2qs("&Add Ban"),this,"add"); - connect(m_pAddBtn,SIGNAL(clicked()),this,SLOT(addBan())); + m_pAddBtn = new TQPushButton(__tr2qs("&Add Ban"),this,"add"); + connect(m_pAddBtn,TQT_SIGNAL(clicked()),this,TQT_SLOT(addBan())); m_pAddBtn->setEnabled(m_pEnable->isChecked()); g->addWidget(m_pAddBtn,2,0); - m_pRemoveBtn = new QPushButton(__tr2qs("&Remove Selected"),this,"remove"); - connect(m_pRemoveBtn,SIGNAL(clicked()),this,SLOT(removeBan())); + m_pRemoveBtn = new TQPushButton(__tr2qs("&Remove Selected"),this,"remove"); + connect(m_pRemoveBtn,TQT_SIGNAL(clicked()),this,TQT_SLOT(removeBan())); m_pRemoveBtn->setEnabled(m_pEnable->isChecked()); g->addWidget(m_pRemoveBtn,2,1); } @@ -453,7 +453,7 @@ void BanFrame::enableClicked() void BanFrame::addBan() { bool ok = false; - KviStr *text = new KviStr(QInputDialog::getText(__tr2qs("URL Ban List"),__tr2qs("Add"),QLineEdit::Normal,QString::null,&ok,this)); + KviStr *text = new KviStr(TQInputDialog::getText(__tr2qs("URL Ban List"),__tr2qs("Add"),TQLineEdit::Normal,TQString(),&ok,this)); if (ok && !text->isEmpty()) { g_pBanList->append(text); m_pBanList->insertItem(text->ptr()); @@ -465,7 +465,7 @@ void BanFrame::removeBan() uint i = 0; while ((!m_pBanList->isSelected(i)) && (i < m_pBanList->count())) i++; if (!m_pBanList->isSelected(i)) { - QMessageBox::warning(0,__tr2qs("Warning - KVIrc"),__tr2qs("Select a ban."),QMessageBox::Ok,QMessageBox::NoButton,QMessageBox::NoButton); + TQMessageBox::warning(0,__tr2qs("Warning - KVIrc"),__tr2qs("Select a ban."),TQMessageBox::Ok,TQMessageBox::NoButton,TQMessageBox::NoButton); return; } KviStr item(m_pBanList->text(i).utf8().data()); @@ -500,14 +500,14 @@ BanFrame::~BanFrame() void saveUrlList() { - QString urllist; + TQString urllist; g_pApp->getLocalKvircDirectory(urllist,KviApp::ConfigPlugins); urllist += g_pUrlListFilename; - QFile file; + TQFile file; file.setName(urllist); file.open(IO_WriteOnly); - QTextStream stream(&file); + TQTextStream stream(&file); stream << g_pList->count() << endl; @@ -527,13 +527,13 @@ void loadUrlList() KviStr urllist; g_pApp->getLocalKvircDirectory(urllist,KviApp::ConfigPlugins); urllist += g_pUrlListFilename; - QFile file; - file.setName(QString::fromUtf8(urllist.ptr())); + TQFile file; + file.setName(TQString::fromUtf8(urllist.ptr())); if (!file.open(IO_ReadOnly))return; #ifdef COMPILE_USE_QT4 Q3TextStream stream(&file); #else - QTextStream stream(&file); + TQTextStream stream(&file); #endif @@ -556,9 +556,9 @@ void loadUrlList() for (UrlDlgList *tmpitem=g_pUrlDlgList->first();tmpitem;tmpitem=g_pUrlDlgList->next()) { if (tmpitem->dlg) { - QString tmpCount; + TQString tmpCount; tmpCount.setNum(tmp->count); - tmpitem->dlg->addUrl(QString(tmp->url), QString(tmp->window), tmpCount, QString(tmp->timestamp)); + tmpitem->dlg->addUrl(TQString(tmp->url), TQString(tmp->window), tmpCount, TQString(tmp->timestamp)); } } i++; @@ -571,11 +571,11 @@ void saveBanList() KviStr banlist; g_pApp->getLocalKvircDirectory(banlist,KviApp::ConfigPlugins); banlist += g_pBanListFilename; - QFile file; - file.setName(QString::fromUtf8(banlist.ptr())); + TQFile file; + file.setName(TQString::fromUtf8(banlist.ptr())); file.open(IO_WriteOnly); - QTextStream stream(&file); + TQTextStream stream(&file); stream << g_pBanList->count() << endl; for(KviStr *tmp=g_pBanList->first();tmp;tmp=g_pBanList->next()) @@ -591,13 +591,13 @@ void loadBanList() KviStr banlist; g_pApp->getLocalKvircDirectory(banlist,KviApp::ConfigPlugins); banlist += g_pBanListFilename; - QFile file; - file.setName(QString::fromUtf8(banlist.ptr())); + TQFile file; + file.setName(TQString::fromUtf8(banlist.ptr())); if (!file.open(IO_ReadOnly))return; #ifdef COMPILE_USE_QT4 Q3TextStream stream(&file); #else - QTextStream stream(&file); + TQTextStream stream(&file); #endif g_pBanList->clear(); @@ -667,9 +667,9 @@ bool urllist() for(KviUrl *tmp=g_pList->first();tmp;tmp=g_pList->next()) { - QString tmpCount; + TQString tmpCount; tmpCount.setNum(tmp->count); - tmpitem->dlg->addUrl(QString(tmp->url), QString(tmp->window), tmpCount, QString(tmp->timestamp)); + tmpitem->dlg->addUrl(TQString(tmp->url), TQString(tmp->window), tmpCount, TQString(tmp->timestamp)); } return true; } @@ -704,13 +704,13 @@ static bool url_kvs_cmd_config(KviKvsModuleCommandCall * c) return true; } -int check_url(KviWindow *w,const QString &szUrl) // return 0 if no occurence of the url were found +int check_url(KviWindow *w,const TQString &szUrl) // return 0 if no occurence of the url were found { int tmp = 0; for(KviStr *tmpi=g_pBanList->first();tmpi;tmpi=g_pBanList->next()) { - if (szUrl.find(QString(tmpi->ptr())) != -1) tmp++; + if (szUrl.tqfind(TQString(tmpi->ptr())) != -1) tmp++; } if (tmp > 0) return tmp; @@ -731,7 +731,7 @@ int check_url(KviWindow *w,const QString &szUrl) // return 0 if no occurence of if (lvi.current()->text(0) == szUrl) { int tmpCount = lvi.current()->text(2).toInt(); tmpCount++; - QString tmpStr; + TQString tmpStr; tmpStr.setNum(tmpCount); lvi.current()->setText(2,tmpStr); lvi.current()->setText(1,w->plainTextCaption()); @@ -745,7 +745,7 @@ int check_url(KviWindow *w,const QString &szUrl) // return 0 if no occurence of bool urllist_module_event_onUrl(KviKvsModuleEventCall * c) { KviKvsVariant * vUrl = c->firstParam(); - QString szUrl; + TQString szUrl; if(vUrl)vUrl->asString(szUrl); if (check_url(c->window(),szUrl) == 0) @@ -753,10 +753,10 @@ bool urllist_module_event_onUrl(KviKvsModuleEventCall * c) KviUrl *tmp = new KviUrl; KviStr tmpTimestamp; - QDate d = QDate::currentDate(); + TQDate d = TQDate::tqcurrentDate(); KviStr date(KviStr::Format,"%d-%d%d-%d%d",d.year(),d.month() / 10,d.month() % 10,d.day() / 10,d.day() % 10); tmpTimestamp = "["+date+"]"+" ["; - tmpTimestamp += QTime::currentTime().toString()+"]"; + tmpTimestamp += TQTime::currentTime().toString()+"]"; tmp->url = szUrl; tmp->window = c->window()->plainTextCaption(); tmp->count = 1; @@ -765,9 +765,9 @@ bool urllist_module_event_onUrl(KviKvsModuleEventCall * c) g_pList->append(tmp); for (UrlDlgList *tmpitem=g_pUrlDlgList->first();tmpitem;tmpitem=g_pUrlDlgList->next()) { if (tmpitem->dlg) { - QString tmpCount; + TQString tmpCount; tmpCount.setNum(tmp->count); - tmpitem->dlg->addUrl(QString(tmp->url), QString(tmp->window), tmpCount, QString(tmp->timestamp)); + tmpitem->dlg->addUrl(TQString(tmp->url), TQString(tmp->window), tmpCount, TQString(tmp->timestamp)); tmpitem->dlg->taskBarItem()->highlight(false); } } @@ -807,7 +807,7 @@ static bool url_module_init(KviModule *m) g_pBanList = new KviPointerList; g_pBanList->setAutoDelete(true); - g_pUrlIconPixmap = new QPixmap(url_icon_xpm); + g_pUrlIconPixmap = new TQPixmap(url_icon_xpm); KVSM_REGISTER_SIMPLE_COMMAND(m,"list",url_kvs_cmd_list); KVSM_REGISTER_SIMPLE_COMMAND(m,"config",url_kvs_cmd_config); diff --git a/src/modules/url/libkviurl.h b/src/modules/url/libkviurl.h index 05d56ce8..a0cc1ead 100644 --- a/src/modules/url/libkviurl.h +++ b/src/modules/url/libkviurl.h @@ -21,23 +21,23 @@ // -#include -#include +#include +#include #include "kvi_tal_listview.h" -#include -#include -#include +#include +#include +#include #ifdef COMPILE_USE_QT4 - #include + #include #else - #include + #include #endif -#include +#include #include "kvi_tal_listbox.h" -#include -#include -#include -#include +#include +#include +#include +#include #include "kvi_locale.h" #include "kvi_config.h" @@ -48,20 +48,21 @@ #include "kvi_mextoolbar.h" #include "kvi_styled_controls.h" -#include +#include typedef struct _KviUrl { - QString url; - QString window; + TQString url; + TQString window; int count; - QString timestamp; + TQString timestamp; } KviUrl; class UrlDialog : public KviWindow { Q_OBJECT + TQ_OBJECT public: UrlDialog(KviPointerList *g_pList); ~UrlDialog(); @@ -70,11 +71,11 @@ private: KviTalPopupMenu *m_pListPopup; // dynamic popup menu KviStr m_szUrl; // used to pass urls to sayToWin slot protected: - QPixmap *myIconPtr(); - void resizeEvent(QResizeEvent *); + TQPixmap *myIconPtr(); + void resizeEvent(TQResizeEvent *); public: KviTalListView *m_pUrlList; - void addUrl(QString url, QString window, QString count, QString timestamp); + void addUrl(TQString url, TQString window, TQString count, TQString timestamp); // void saveProperties(); protected slots: void config(); @@ -86,22 +87,23 @@ protected slots: void remove(); void findtext(); void dblclk_url(KviTalListViewItem *item); - void popup(KviTalListViewItem *item, const QPoint &p, int col); + void popup(KviTalListViewItem *item, const TQPoint &p, int col); void sayToWin(int); }; -class BanFrame : public QFrame +class BanFrame : public TQFrame { Q_OBJECT + TQ_OBJECT public: - BanFrame(QWidget *parent=0, const char *name=0, bool banEnable = false); + BanFrame(TQWidget *tqparent=0, const char *name=0, bool banEnable = false); ~BanFrame(); void saveBans(); private: KviStyledCheckBox *m_pEnable; KviTalListBox *m_pBanList; - QPushButton *m_pAddBtn; - QPushButton *m_pRemoveBtn; + TQPushButton *m_pAddBtn; + TQPushButton *m_pRemoveBtn; protected slots: void enableClicked(); void addBan(); @@ -110,16 +112,17 @@ protected slots: #define cbnum 2 -class ConfigDialog : public QDialog +class ConfigDialog : public TQDialog { Q_OBJECT + TQ_OBJECT public: ConfigDialog(); ~ConfigDialog(); private: KviStyledCheckBox *cb[cbnum]; BanFrame *m_pBanFrame; - void closeEvent(QCloseEvent *); + void closeEvent(TQCloseEvent *); protected slots: void acceptbtn(); void discardbtn(); @@ -130,15 +133,16 @@ protected slots: class KviUrlAction : public KviKvsAction { Q_OBJECT + TQ_OBJECT public: - KviUrlAction(QObject * pParent); + KviUrlAction(TQObject * pParent); ~KviUrlAction(); protected: - QPixmap * m_pBigIcon; - QPixmap * m_pSmallIcon; + TQPixmap * m_pBigIcon; + TQPixmap * m_pSmallIcon; public: - virtual QPixmap * bigIcon(); - virtual QPixmap * smallIcon(); + virtual TQPixmap * bigIcon(); + virtual TQPixmap * smallIcon(); }; #endif diff --git a/src/modules/window/libkviwindow.cpp b/src/modules/window/libkviwindow.cpp index abef0dd9..1b46d366 100644 --- a/src/modules/window/libkviwindow.cpp +++ b/src/modules/window/libkviwindow.cpp @@ -42,7 +42,7 @@ #include "userwindow.h" #include "kvi_pointerhashtable.h" -#include +#include #ifdef COMPILE_CRYPT_SUPPORT @@ -62,7 +62,7 @@ KviPointerList * g_pUserWindowList = 0; #define GET_KVS_WINDOW_ID \ - QString szWnd; \ + TQString szWnd; \ KviWindow * pWnd; \ KVSM_PARAMETERS_BEGIN(c) \ KVSM_PARAMETER("window_id",KVS_PT_STRING,KVS_PF_OPTIONAL,szWnd) \ @@ -81,7 +81,7 @@ KviPointerList * g_pUserWindowList = 0; } #define GET_KVS_FNC_WINDOW_ID \ - QString szWnd; \ + TQString szWnd; \ KviWindow * pWnd; \ KVSM_PARAMETERS_BEGIN(c) \ KVSM_PARAMETER("window_id",KVS_PT_STRING,KVS_PF_OPTIONAL,szWnd) \ @@ -597,7 +597,7 @@ static bool window_kvs_fnc_console(KviKvsModuleFunctionCall * c) GET_KVS_FNC_WINDOW_ID if(pWnd) { - c->returnValue()->setInteger(pWnd->console() ? QString(pWnd->console()->id()).toInt() : 0); + c->returnValue()->setInteger(pWnd->console() ? TQString(pWnd->console()->id()).toInt() : 0); } return true; } @@ -836,8 +836,8 @@ static bool window_kvs_cmd_listtypes(KviKvsModuleCommandCall * c) static bool window_kvs_fnc_list(KviKvsModuleFunctionCall * c) { - QString szType; - QString szContext; + TQString szType; + TQString szContext; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("type",KVS_PT_STRING,0,szType) @@ -854,10 +854,10 @@ static bool window_kvs_fnc_list(KviKvsModuleFunctionCall * c) int id=0; - if(KviQString::equalCI(szContext,"all")) + if(KviTQString::equalCI(szContext,"all")) { // all contexts but no "no_context" windows - bool bAllWindows = KviQString::equalCI(szType,"all"); + bool bAllWindows = KviTQString::equalCI(szType,"all"); KviPointerHashTableIterator it(*g_pGlobalWindowDict); while(KviWindow * wnd = it.current()) @@ -866,43 +866,43 @@ static bool window_kvs_fnc_list(KviKvsModuleFunctionCall * c) { if(bAllWindows) { - pArray->set(id, new KviKvsVariant(QString(wnd->id()))); + pArray->set(id, new KviKvsVariant(TQString(wnd->id()))); id++; } else { if(szType.lower()==wnd->typeString()) { - pArray->set(id, new KviKvsVariant(QString(wnd->id()))); + pArray->set(id, new KviKvsVariant(TQString(wnd->id()))); id++; } } } ++it; } - } else if(KviQString::equalCI(szContext,"any")) + } else if(KviTQString::equalCI(szContext,"any")) { // all contexts and also "no_context" windows - bool bAllWindows = KviQString::equalCI(szType.lower(),"all"); + bool bAllWindows = KviTQString::equalCI(szType.lower(),"all"); KviPointerHashTableIterator it(*g_pGlobalWindowDict); while(KviWindow * wnd = it.current()) { if(bAllWindows) { - pArray->set(id, new KviKvsVariant(QString(wnd->id()))); + pArray->set(id, new KviKvsVariant(TQString(wnd->id()))); id++; } else { if(szType.lower()==wnd->typeString()) { - pArray->set(id, new KviKvsVariant(QString(wnd->id()))); + pArray->set(id, new KviKvsVariant(TQString(wnd->id()))); id++; } } ++it; } - } else if(KviQString::equalCI(szContext,"none")) + } else if(KviTQString::equalCI(szContext,"none")) { // only "no_context" windows - bool bAllWindows = KviQString::equalCI(szType.lower(),"all"); + bool bAllWindows = KviTQString::equalCI(szType.lower(),"all"); KviPointerHashTableIterator it(*g_pGlobalWindowDict); while(KviWindow * wnd = it.current()) @@ -911,12 +911,12 @@ static bool window_kvs_fnc_list(KviKvsModuleFunctionCall * c) { if(bAllWindows) { - pArray->set(id, new KviKvsVariant(QString(wnd->id()))); + pArray->set(id, new KviKvsVariant(TQString(wnd->id()))); id++; } else { if(szType.lower()==wnd->typeString()) { - pArray->set(id, new KviKvsVariant(QString(wnd->id()))); + pArray->set(id, new KviKvsVariant(TQString(wnd->id()))); id++; } } @@ -947,7 +947,7 @@ static bool window_kvs_fnc_list(KviKvsModuleFunctionCall * c) uId = c->window()->console()->ircContextId(); } - bool bAllWindows = KviQString::equalCI(szType.lower(),"all"); + bool bAllWindows = KviTQString::equalCI(szType.lower(),"all"); KviPointerHashTableIterator it(*g_pGlobalWindowDict); while(KviWindow * wnd = it.current()) @@ -958,12 +958,12 @@ static bool window_kvs_fnc_list(KviKvsModuleFunctionCall * c) { if(bAllWindows) { - pArray->set(id, new KviKvsVariant(QString(wnd->id()))); + pArray->set(id, new KviKvsVariant(TQString(wnd->id()))); id++; } else { if(szType.lower()==wnd->typeString()) { - pArray->set(id, new KviKvsVariant(QString(wnd->id()))); + pArray->set(id, new KviKvsVariant(TQString(wnd->id()))); id++; } } @@ -1020,8 +1020,8 @@ static bool window_kvs_fnc_list(KviKvsModuleFunctionCall * c) static bool window_kvs_fnc_open(KviKvsModuleFunctionCall * c) { - QString szFlags; - QString szCaption; + TQString szFlags; + TQString szCaption; kvs_uint_t uCtx; kvs_int_t iIcon; @@ -1034,13 +1034,13 @@ static bool window_kvs_fnc_open(KviKvsModuleFunctionCall * c) iIcon = iIcon % KVI_NUM_SMALL_ICONS; int iFlags = 0; - if(szFlags.contains('i'))iFlags |= KviUserWindow::HasInput; + if(szFlags.tqcontains('i'))iFlags |= KviUserWindow::HasInput; KviConsole * pConsole = 0; if(c->parameterList()->count() >= 3) { pConsole = g_pApp->findConsole(uCtx); - if(!pConsole && !szFlags.contains('q')) + if(!pConsole && !szFlags.tqcontains('q')) { c->warning(__tr2qs("The specified IRC context is not valid: creating a context free window")); } @@ -1053,10 +1053,10 @@ static bool window_kvs_fnc_open(KviKvsModuleFunctionCall * c) pConsole, iFlags); - c->window()->frame()->addWindow(wnd,!szFlags.contains('m')); - if(szFlags.contains('m'))wnd->minimize(); + c->window()->frame()->addWindow(wnd,!szFlags.tqcontains('m')); + if(szFlags.tqcontains('m'))wnd->minimize(); - c->returnValue()->setInteger(QString(wnd->id()).toUInt()); + c->returnValue()->setInteger(TQString(wnd->id()).toUInt()); return true; } @@ -1092,10 +1092,10 @@ static bool window_kvs_fnc_open(KviKvsModuleFunctionCall * c) static bool window_kvs_cmd_setCaption(KviKvsModuleCommandCall * c) { - QString szWnd; - QString szPlain; - QString szInactive; - QString szActive; + TQString szWnd; + TQString szPlain; + TQString szInactive; + TQString szActive; KviWindow * pWnd; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("window_id",KVS_PT_STRING,0,szWnd) @@ -1142,8 +1142,8 @@ static bool window_kvs_cmd_setCaption(KviKvsModuleCommandCall * c) static bool window_kvs_cmd_setInputText(KviKvsModuleCommandCall * c) { - QString szWnd; - QString szText; + TQString szWnd; + TQString szText; KviWindow * pWnd; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("window_id",KVS_PT_STRING,0,szWnd) @@ -1187,8 +1187,8 @@ static bool window_kvs_cmd_setInputText(KviKvsModuleCommandCall * c) static bool window_kvs_cmd_insertInInputText(KviKvsModuleCommandCall * c) { - QString szWnd; - QString szText; + TQString szWnd; + TQString szText; KviWindow * pWnd; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("window_id",KVS_PT_STRING,0,szWnd) @@ -1260,8 +1260,8 @@ static bool window_kvs_fnc_inputText(KviKvsModuleFunctionCall * c) static bool window_kvs_cmd_setBackground(KviKvsModuleCommandCall * c) { - QString szWnd; - QString szBackground; + TQString szWnd; + TQString szBackground; KviWindow * pWnd; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("window_id",KVS_PT_STRING,0,szWnd) @@ -1277,7 +1277,7 @@ static bool window_kvs_cmd_setBackground(KviKvsModuleCommandCall * c) } /* - QPixmap *pix=0; + TQPixmap *pix=0; pix = g_pIconManager->getImage(szBackground); if (!pix){ KviScriptObject * ob = g_pScriptObjectController->lookupObject(szBackground); @@ -1289,7 +1289,7 @@ static bool window_kvs_cmd_setBackground(KviKvsModuleCommandCall * c) c->warning(__tr("Pixmap objects required !")); return true; } - QVariant pix1= ob->property("pixmap"); + TQVariant pix1= ob->property("pixmap"); if (!pix1.asPixmap().isNull()){ c->warning(__tr("Pixmap is null")); return true; @@ -1347,7 +1347,7 @@ static bool window_kvs_cmd_setBackground(KviKvsModuleCommandCall * c) #ifdef COMPILE_CRYPT_SUPPORT -static bool initializeCryptEngine(KviCryptEngine * eng,KviStr &szEncryptKey,KviStr &szDecryptKey,QString &szError) +static bool initializeCryptEngine(KviCryptEngine * eng,KviStr &szEncryptKey,KviStr &szDecryptKey,TQString &szError) { char * encKey = 0; int encKeyLen = 0; @@ -1388,10 +1388,10 @@ static bool initializeCryptEngine(KviCryptEngine * eng,KviStr &szEncryptKey,KviS static bool window_kvs_cmd_setCryptEngine(KviKvsModuleCommandCall * c) { - QString szWnd; - QString szEngine; - QString szEncryptKey; - QString szDecryptKey; + TQString szWnd; + TQString szEngine; + TQString szEncryptKey; + TQString szDecryptKey; KviWindow * pWnd; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("window_id",KVS_PT_STRING,0,szWnd) @@ -1432,7 +1432,7 @@ static bool window_kvs_cmd_setCryptEngine(KviKvsModuleCommandCall * c) { KviStr enc = KviStr(szEncryptKey.utf8().data()); KviStr dec = KviStr(szDecryptKey.utf8().data()); - QString szError; + TQString szError; if(initializeCryptEngine(e,enc,dec,szError)) { KviCryptSessionInfo * inf = KviCryptController::allocateCryptSessionInfo(); @@ -1499,7 +1499,7 @@ static bool window_module_init(KviModule *m) // saveOutput (view()->saveBuffer()) /* - m->registerFunction("geometry",window_module_fnc_geometry); + m->registerFunction("geometry",window_module_fnc_tqgeometry); m->registerCommand("setGeometry",window_module_cmd_setGeometry); m->registerFunction("isActive",window_module_fnc_isActive); diff --git a/src/modules/window/userwindow.cpp b/src/modules/window/userwindow.cpp index 08a7405b..e0a77c29 100644 --- a/src/modules/window/userwindow.cpp +++ b/src/modules/window/userwindow.cpp @@ -47,13 +47,13 @@ KviUserWindow::KviUserWindow(KviFrame * pFrm,const char * name,int iIcon,KviCons // Register ourselves //connection()->registerChannel(this); // Central splitter -// m_pSplitter = new QSplitter(QSplitter::Horizontal,this,"main_splitter"); +// m_pSplitter = new TQSplitter(TQSplitter::Horizontal,this,"main_splitter"); // Spitted vertially on the left -// m_pVertSplitter = new QSplitter(QSplitter::Vertical,m_pSplitter, +// m_pVertSplitter = new TQSplitter(TQSplitter::Vertical,m_pSplitter, // "vertical_splitter"); // With the IRC view over m_pIrcView = new KviIrcView(this,pFrm,this); - // connect(m_pIrcView,SIGNAL(rightClicked()),this,SLOT(textViewRightClicked())); + // connect(m_pIrcView,TQT_SIGNAL(rightClicked()),this,TQT_SLOT(textViewRightClicked())); // The userlist on the right // m_pUserListView = new KviUserListView(m_pSplitter,connection()->userDataBase(),this, // AVERAGE_CHANNEL_USERS,__tr2qs("User List"),"user_list_view"); @@ -73,12 +73,12 @@ KviUserWindow::~KviUserWindow() g_pUserWindowList->removeRef(this); } -QPixmap * KviUserWindow::myIconPtr() +TQPixmap * KviUserWindow::myIconPtr() { return g_pIconManager->getSmallIcon(m_iIcon); } -void KviUserWindow::resizeEvent(QResizeEvent *e) +void KviUserWindow::resizeEvent(TQResizeEvent *e) { if(m_pInput) { @@ -95,7 +95,7 @@ void KviUserWindow::fillCaptionBuffers() // nothing here } -void KviUserWindow::setCaptionStrings(const QString &szPlainText,const QString &szHtmlInactive,const QString &szHtmlActive) +void KviUserWindow::setCaptionStrings(const TQString &szPlainText,const TQString &szHtmlInactive,const TQString &szHtmlActive) { m_szPlainTextCaption = szPlainText; m_szHtmlActiveCaption = szHtmlActive; diff --git a/src/modules/window/userwindow.h b/src/modules/window/userwindow.h index 333b7edb..e120410e 100644 --- a/src/modules/window/userwindow.h +++ b/src/modules/window/userwindow.h @@ -30,6 +30,7 @@ class KviUserWindow : public KviWindow { Q_OBJECT + TQ_OBJECT public: enum CreationFlags { HasInput = 1 }; public: @@ -38,11 +39,11 @@ public: protected: int m_iIcon; protected: - virtual void resizeEvent(QResizeEvent *e); - virtual QPixmap * myIconPtr(); + virtual void resizeEvent(TQResizeEvent *e); + virtual TQPixmap * myIconPtr(); virtual void fillCaptionBuffers(); public: - void setCaptionStrings(const QString &szPlainText,const QString &szHtmlInactive,const QString &szHtmlActive); + void setCaptionStrings(const TQString &szPlainText,const TQString &szHtmlInactive,const TQString &szHtmlActive); }; #endif //!_USERWINDOW_H_ -- cgit v1.2.1

"; szText += __tr2qs_ctx("You will be asked to provide a theme name, a description and, if you want, a screenshot.","theme"); @@ -95,31 +95,31 @@ KviSaveThemeDialog::KviSaveThemeDialog(QWidget * pParent) // packager informations ================================================================================ - pPage = new QWidget(this); - pLayout = new QGridLayout(pPage,5,2,4,4); + pPage = new TQWidget(this); + pLayout = new TQGridLayout(pPage,5,2,4,4); - pLabel = new QLabel(pPage); + pLabel = new TQLabel(pPage); pLabel->setText(__tr2qs_ctx("Here you need to provide informations about you (the author) and a short description of the theme you're creating.","theme")); - pLabel->setTextFormat(Qt::RichText); + pLabel->setTextFormat(TQt::RichText); pLayout->addMultiCellWidget(pLabel,0,0,0,1); - pLabel = new QLabel(pPage); + pLabel = new TQLabel(pPage); pLabel->setText(__tr2qs_ctx("Theme Name:","theme")); pLayout->addWidget(pLabel,1,0); - m_pThemeNameEdit = new QLineEdit(pPage); + m_pThemeNameEdit = new TQLineEdit(pPage); //m_pThemeNameEdit->setText(szThemeName); pLayout->addWidget(m_pThemeNameEdit,1,1); - pLabel = new QLabel(pPage); + pLabel = new TQLabel(pPage); pLabel->setText(__tr2qs_ctx("Version:","theme")); pLayout->addWidget(pLabel,2,0); - m_pThemeVersionEdit = new QLineEdit(pPage); + m_pThemeVersionEdit = new TQLineEdit(pPage); //m_pThemeVersionEdit->setText(szThemeVersion); pLayout->addWidget(m_pThemeVersionEdit,2,1); - pLabel = new QLabel(pPage); + pLabel = new TQLabel(pPage); pLabel->setText(__tr2qs_ctx("Description:","theme")); pLayout->addWidget(pLabel,3,0); @@ -127,11 +127,11 @@ KviSaveThemeDialog::KviSaveThemeDialog(QWidget * pParent) //m_pThemeDescriptionEdit->setText(szThemeDescription); pLayout->addWidget(m_pThemeDescriptionEdit,3,1); - pLabel = new QLabel(pPage); + pLabel = new TQLabel(pPage); pLabel->setText(__tr2qs_ctx("Theme Author:","theme")); pLayout->addWidget(pLabel,4,0); - m_pAuthorNameEdit = new QLineEdit(pPage); + m_pAuthorNameEdit = new TQLineEdit(pPage); //m_pAuthorNameEdit->setText(szThemeAuthor); pLayout->addWidget(m_pAuthorNameEdit,4,1); @@ -147,28 +147,28 @@ KviSaveThemeDialog::KviSaveThemeDialog(QWidget * pParent) // screenshot/logo/icon ================================================================================ - pPage = new QWidget(this); - pLayout = new QGridLayout(pPage,4,1,4,4); + pPage = new TQWidget(this); + pLayout = new TQGridLayout(pPage,4,1,4,4); - pLabel = new QLabel(pPage); + pLabel = new TQLabel(pPage); pLabel->setText(__tr2qs_ctx("Here you can either choose a screenshot image from disk or make one now. The screenshot will be displayed in the tooltips of the theme management dialog and will be also visible in the package installation dialog if you will export the theme to a distributable package.","theme")); - pLabel->setTextFormat(Qt::RichText); + pLabel->setTextFormat(TQt::RichText); pLayout->addWidget(pLabel,0,0); - m_pImageLabel = new QLabel(pPage); - m_pImageLabel->setFrameStyle(QFrame::Sunken | QFrame::Panel); + m_pImageLabel = new TQLabel(pPage); + m_pImageLabel->setFrameStyle(TQFrame::Sunken | TQFrame::Panel); m_pImageLabel->setMinimumSize(300,225); - m_pImageLabel->setAlignment(Qt::AlignCenter | Qt::AlignVCenter); + m_pImageLabel->tqsetAlignment(TQt::AlignCenter | TQt::AlignVCenter); pLayout->addWidget(m_pImageLabel,1,0); - QString szFilter = "*.png *.jpg *.xpm"; + TQString szFilter = "*.png *.jpg *.xpm"; m_pImageSelector = new KviFileSelector(pPage,"",&m_szScreenshotPath,true,0,szFilter); - connect(m_pImageSelector,SIGNAL(selectionChanged(const QString &)),this,SLOT(imageSelectionChanged(const QString &))); + connect(m_pImageSelector,TQT_SIGNAL(selectionChanged(const TQString &)),this,TQT_SLOT(imageSelectionChanged(const TQString &))); pLayout->addWidget(m_pImageSelector,2,0); - QPushButton * pButton = new QPushButton(pPage); + TQPushButton * pButton = new TQPushButton(pPage); pButton->setText(__tr2qs_ctx("Make Screenshot Now","theme")); - connect(pButton,SIGNAL(clicked()),this,SLOT(makeScreenshot())); + connect(pButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(makeScreenshot())); pLayout->addWidget(pButton,3,0); pLayout->setRowStretch(1,1); @@ -185,17 +185,17 @@ KviSaveThemeDialog::~KviSaveThemeDialog() { } -void KviSaveThemeDialog::imageSelectionChanged(const QString &szImagePath) +void KviSaveThemeDialog::imageSelectionChanged(const TQString &szImagePath) { - QImage pix(szImagePath); + TQImage pix(szImagePath); if(!pix.isNull()) { - QPixmap out; + TQPixmap out; if(pix.width() > 300 || pix.height() > 225) #ifdef COMPILE_USE_QT4 - out.convertFromImage(pix.scaled(300,225,Qt::KeepAspectRatio)); + out.convertFromImage(pix.scaled(300,225,TQt::KeepAspectRatio)); #else - out.convertFromImage(pix.smoothScale(300,225,QImage::ScaleMin)); + out.convertFromImage(pix.smoothScale(300,225,TQ_ScaleMin)); #endif else out.convertFromImage(pix); @@ -203,11 +203,11 @@ void KviSaveThemeDialog::imageSelectionChanged(const QString &szImagePath) return; } - QMessageBox::critical(this,__tr2qs_ctx("Save Current Theme - KVIrc","theme"),__tr2qs_ctx("Failed to load the selected image","theme"), - QMessageBox::Ok,QMessageBox::NoButton,QMessageBox::NoButton); + TQMessageBox::critical(this,__tr2qs_ctx("Save Current Theme - KVIrc","theme"),__tr2qs_ctx("Failed to load the selected image","theme"), + TQMessageBox::Ok,TQMessageBox::NoButton,TQMessageBox::NoButton); m_pImageSelector->setSelection(""); - m_pImageLabel->setPixmap(QPixmap()); + m_pImageLabel->setPixmap(TQPixmap()); } @@ -220,12 +220,12 @@ void KviSaveThemeDialog::accept() void KviSaveThemeDialog::makeScreenshot() { - QString szFileName; + TQString szFileName; g_pApp->getTmpFileName(szFileName,"screenshot.png"); if(!KviThemeFunctions::makeKVIrcScreenshot(szFileName)) { - QMessageBox::critical(this,__tr2qs_ctx("Acquire Screenshot - KVIrc","theme"),__tr2qs_ctx("Failed to make screenshot","theme"), - QMessageBox::Ok,QMessageBox::NoButton,QMessageBox::NoButton); + TQMessageBox::critical(this,__tr2qs_ctx("Acquire Screenshot - KVIrc","theme"),__tr2qs_ctx("Failed to make screenshot","theme"), + TQMessageBox::Ok,TQMessageBox::NoButton,TQMessageBox::NoButton); return; } m_pImageSelector->setSelection(szFileName); @@ -240,29 +240,29 @@ bool KviSaveThemeDialog::saveTheme() sto.setName(m_pThemeNameEdit->text()); if(sto.name().isEmpty()) { - QMessageBox::critical(this,__tr2qs_ctx("Save Current Theme - KVIrc","theme"),__tr2qs_ctx("You must choose a theme name!","theme"),QMessageBox::Ok, - QMessageBox::NoButton,QMessageBox::NoButton); + TQMessageBox::critical(this,__tr2qs_ctx("Save Current Theme - KVIrc","theme"),__tr2qs_ctx("You must choose a theme name!","theme"),TQMessageBox::Ok, + TQMessageBox::NoButton,TQMessageBox::NoButton); return false; } sto.setAuthor(m_pAuthorNameEdit->text()); sto.setDescription(m_pThemeDescriptionEdit->text()); - sto.setDate(QDateTime::currentDateTime().toString()); + sto.setDate(TQDateTime::tqcurrentDateTime().toString()); sto.setVersion(m_pThemeVersionEdit->text()); sto.setApplication("KVIrc " KVI_VERSION "." KVI_SOURCES_DATE); if(sto.version().isEmpty())sto.setVersion("1.0.0"); - QString szSubdir = sto.name() + QString("-") + sto.version(); - szSubdir.replace(QRegExp("[ \\\\/:][ \\\\/:]*"),"_"); + TQString szSubdir = sto.name() + TQString("-") + sto.version(); + szSubdir.tqreplace(TQRegExp("[ \\\\/:][ \\\\/:]*"),"_"); sto.setSubdirectory(szSubdir); - QString szAbsDir; + TQString szAbsDir; g_pApp->getLocalKvircDirectory(szAbsDir,KviApp::Themes,sto.subdirectory(),true); if(!KviFileUtils::makeDir(szAbsDir)) { - QMessageBox::critical(this,__tr2qs_ctx("Save Current Theme - KVIrc","theme"),__tr2qs_ctx("Unable to create theme directory.","theme"), - QMessageBox::Ok,QMessageBox::NoButton,QMessageBox::NoButton); + TQMessageBox::critical(this,__tr2qs_ctx("Save Current Theme - KVIrc","theme"),__tr2qs_ctx("Unable to create theme directory.","theme"), + TQMessageBox::Ok,TQMessageBox::NoButton,TQMessageBox::NoButton); return false; } @@ -270,11 +270,11 @@ bool KviSaveThemeDialog::saveTheme() if(!KviTheme::save(sto)) { - QString szMsg2; - QString szErr = sto.lastError(); - KviQString::sprintf(szMsg2,__tr2qs_ctx("Unable to save theme: %Q","theme"),&szErr); - QMessageBox::critical(this,__tr2qs_ctx("Save Current Theme - KVIrc","theme"),szMsg2, - QMessageBox::Ok,QMessageBox::NoButton,QMessageBox::NoButton); + TQString szMsg2; + TQString szErr = sto.lastError(); + KviTQString::sprintf(szMsg2,__tr2qs_ctx("Unable to save theme: %Q","theme"),&szErr); + TQMessageBox::critical(this,__tr2qs_ctx("Save Current Theme - KVIrc","theme"),szMsg2, + TQMessageBox::Ok,TQMessageBox::NoButton,TQMessageBox::NoButton); return false; } // write down the screenshot, if needed @@ -283,18 +283,18 @@ bool KviSaveThemeDialog::saveTheme() { if(!KviTheme::saveScreenshots(sto,m_szScreenshotPath)) { - QMessageBox::critical(this,__tr2qs_ctx("Save Current Theme - KVIrc","theme"),__tr2qs_ctx("Failed to load the selected screenshot image: please fix it","theme"), - QMessageBox::Ok,QMessageBox::NoButton,QMessageBox::NoButton); + TQMessageBox::critical(this,__tr2qs_ctx("Save Current Theme - KVIrc","theme"),__tr2qs_ctx("Failed to load the selected screenshot image: please fix it","theme"), + TQMessageBox::Ok,TQMessageBox::NoButton,TQMessageBox::NoButton); setCurrentPage(m_pImageSelectionPage); return false; } } - QString szMsg = __tr2qs_ctx("Theme saved successfully to ","theme"); + TQString szMsg = __tr2qs_ctx("Theme saved successfully to ","theme"); szMsg += sto.absoluteDirectory(); - QMessageBox::information(this,__tr2qs_ctx("Save Theme - KVIrc","theme"),szMsg,QMessageBox::Ok, - QMessageBox::NoButton,QMessageBox::NoButton); + TQMessageBox::information(this,__tr2qs_ctx("Save Theme - KVIrc","theme"),szMsg,TQMessageBox::Ok, + TQMessageBox::NoButton,TQMessageBox::NoButton); return true; } diff --git a/src/modules/theme/savethemedialog.h b/src/modules/theme/savethemedialog.h index df55ee92..b8723aa7 100644 --- a/src/modules/theme/savethemedialog.h +++ b/src/modules/theme/savethemedialog.h @@ -28,42 +28,43 @@ #include "kvi_pointerlist.h" #include "kvi_theme.h" -#include +#include #include -class QLineEdit; +class TQLineEdit; class KviTalTextEdit; -class QPushButton; -class QCheckBox; -class QLabel; -class QMultiLineEdit; +class TQPushButton; +class TQCheckBox; +class TQLabel; +class TQMultiLineEdit; class KviFileSelector; class KviSaveThemeDialog : public KviTalWizard { Q_OBJECT + TQ_OBJECT public: - KviSaveThemeDialog(QWidget * pParent); + KviSaveThemeDialog(TQWidget * pParent); virtual ~KviSaveThemeDialog(); protected: - QString m_szScreenshotPath; + TQString m_szScreenshotPath; KviFileSelector * m_pImageSelector; - QLabel * m_pImageLabel; - QLineEdit * m_pThemeNameEdit; + TQLabel * m_pImageLabel; + TQLineEdit * m_pThemeNameEdit; KviTalTextEdit * m_pThemeDescriptionEdit; - QLineEdit * m_pThemeVersionEdit; - QLineEdit * m_pAuthorNameEdit; - QWidget * m_pImageSelectionPage; - QPushButton * m_pOkButton; + TQLineEdit * m_pThemeVersionEdit; + TQLineEdit * m_pAuthorNameEdit; + TQWidget * m_pImageSelectionPage; + TQPushButton * m_pOkButton; protected: virtual void accept(); bool saveTheme(); protected slots: void makeScreenshot(); - void imageSelectionChanged(const QString &szImagePath); - //void themeNameChanged(const QString &txt); + void imageSelectionChanged(const TQString &szImagePath); + //void themeNameChanged(const TQString &txt); }; diff --git a/src/modules/theme/themefunctions.cpp b/src/modules/theme/themefunctions.cpp index 0a011956..c215d943 100644 --- a/src/modules/theme/themefunctions.cpp +++ b/src/modules/theme/themefunctions.cpp @@ -36,28 +36,28 @@ #include "kvi_frame.h" #ifdef COMPILE_USE_QT4 #define KviTalMimeSourceFactory Q3MimeSourceFactory -#include +#include #else -#define KviTalMimeSourceFactory QMimeSourceFactory +#define KviTalMimeSourceFactory TQMimeSourceFactory #endif -#include +#include namespace KviThemeFunctions { - static bool notAValidThemePackage(QString &szError) + static bool notAValidThemePackage(TQString &szError) { - KviQString::sprintf(szError,__tr2qs_ctx("The selected file does not seem to be a valid KVIrc theme package","theme")); + KviTQString::sprintf(szError,__tr2qs_ctx("The selected file does not seem to be a valid KVIrc theme package","theme")); return false; } - bool installThemePackage(const QString &szThemePackageFileName,QString &szError,QWidget * pDialogParent) + bool installThemePackage(const TQString &szThemePackageFileName,TQString &szError,TQWidget * pDialogParent) { - KviPointerHashTable * pInfoFields; - QString * pValue; + KviPointerHashTable * pInfoFields; + TQString * pValue; bool bInstall; - QPixmap pix; - QByteArray * pByteArray; + TQPixmap pix; + TQByteArray * pByteArray; KviHtmlDialogData hd; const char * check_fields[] = { "Name", "Version", "Author", "Description", "Date", "Application" }; @@ -66,28 +66,28 @@ namespace KviThemeFunctions KviPackageReader r; if(!r.readHeader(szThemePackageFileName)) { - QString szErr = r.lastError(); - KviQString::sprintf(szError,__tr2qs_ctx("The selected file does not seem to be a valid KVIrc package: %Q","theme"),&szErr); + TQString szErr = r.lastError(); + KviTQString::sprintf(szError,__tr2qs_ctx("The selected file does not seem to be a valid KVIrc package: %Q","theme"),&szErr); return false; } pInfoFields = r.stringInfoFields(); - pValue = pInfoFields->find("PackageType"); + pValue = pInfoFields->tqfind("PackageType"); if(!pValue)return notAValidThemePackage(szError); - if(!KviQString::equalCI(*pValue,"ThemePack"))return notAValidThemePackage(szError); - pValue = pInfoFields->find("ThemePackVersion"); + if(!KviTQString::equalCI(*pValue,"ThemePack"))return notAValidThemePackage(szError); + pValue = pInfoFields->tqfind("ThemePackVersion"); if(!pValue)return notAValidThemePackage(szError); - if(!KviQString::equalCI(*pValue,"1"))return notAValidThemePackage(szError); + if(!KviTQString::equalCI(*pValue,"1"))return notAValidThemePackage(szError); // make sure the default fields exist for(int i=0;i<6;i++) { - pValue = pInfoFields->find(check_fields[i]); + pValue = pInfoFields->tqfind(check_fields[i]); if(!pValue)return notAValidThemePackage(szError); } - pValue = pInfoFields->find("ThemeCount"); + pValue = pInfoFields->tqfind("ThemeCount"); if(!pValue)return notAValidThemePackage(szError); bool bOk; int iThemeCount = pValue->toInt(&bOk); @@ -97,7 +97,7 @@ namespace KviThemeFunctions // ok.. it should be really valid at this point // load its picture - pByteArray = r.binaryInfoFields()->find("Image"); + pByteArray = r.binaryInfoFields()->tqfind("Image"); if(pByteArray) pix.loadFromData(*pByteArray,0,0); @@ -107,17 +107,17 @@ namespace KviThemeFunctions pix = *(g_pIconManager->getBigIcon(KVI_BIGICON_THEME)); } - QString szPackageName; - QString szPackageVersion; - QString szPackageAuthor; - QString szPackageDescription; - QString szPackageDate; - QString szPackageThemeEngineVersion; - QString szPackageApplication; + TQString szPackageName; + TQString szPackageVersion; + TQString szPackageAuthor; + TQString szPackageDescription; + TQString szPackageDate; + TQString szPackageThemeEngineVersion; + TQString szPackageApplication; - QString szAuthor = __tr2qs_ctx("Author","theme"); - QString szCreatedAt = __tr2qs_ctx("Created at","theme"); - QString szCreatedOn = __tr2qs_ctx("Created with","theme"); + TQString szAuthor = __tr2qs_ctx("Author","theme"); + TQString szCreatedAt = __tr2qs_ctx("Created at","theme"); + TQString szCreatedOn = __tr2qs_ctx("Created with","theme"); r.getStringInfoField("Name",szPackageName); r.getStringInfoField("Version",szPackageVersion); @@ -126,9 +126,9 @@ namespace KviThemeFunctions r.getStringInfoField("Application",szPackageApplication); r.getStringInfoField("Date",szPackageDate); - QString szWarnings; - QString szDetails = ""; - QString szTmp; + TQString szWarnings; + TQString szDetails = ""; + TQString szTmp; int iIdx = 0; int iValidThemeCount = iThemeCount; @@ -137,34 +137,34 @@ namespace KviThemeFunctions { bool bValid = true; - QString szThemeName; - QString szThemeVersion; - QString szThemeDescription; - QString szThemeDate; - QString szThemeSubdirectory; - QString szThemeAuthor; - QString szThemeThemeEngineVersion; - QString szThemeApplication; - - KviQString::sprintf(szTmp,"Theme%dName",iIdx); + TQString szThemeName; + TQString szThemeVersion; + TQString szThemeDescription; + TQString szThemeDate; + TQString szThemeSubdirectory; + TQString szThemeAuthor; + TQString szThemeThemeEngineVersion; + TQString szThemeApplication; + + KviTQString::sprintf(szTmp,"Theme%dName",iIdx); r.getStringInfoField(szTmp,szThemeName); - KviQString::sprintf(szTmp,"Theme%dVersion",iIdx); + KviTQString::sprintf(szTmp,"Theme%dVersion",iIdx); r.getStringInfoField(szTmp,szThemeVersion); - KviQString::sprintf(szTmp,"Theme%dApplication",iIdx); + KviTQString::sprintf(szTmp,"Theme%dApplication",iIdx); r.getStringInfoField(szTmp,szThemeApplication); - KviQString::sprintf(szTmp,"Theme%dDescription",iIdx); + KviTQString::sprintf(szTmp,"Theme%dDescription",iIdx); r.getStringInfoField(szTmp,szThemeDescription); - KviQString::sprintf(szTmp,"Theme%dDate",iIdx); + KviTQString::sprintf(szTmp,"Theme%dDate",iIdx); r.getStringInfoField(szTmp,szThemeDate); - KviQString::sprintf(szTmp,"Theme%dSubdirectory",iIdx); + KviTQString::sprintf(szTmp,"Theme%dSubdirectory",iIdx); r.getStringInfoField(szTmp,szThemeSubdirectory); - KviQString::sprintf(szTmp,"Theme%dAuthor",iIdx); + KviTQString::sprintf(szTmp,"Theme%dAuthor",iIdx); r.getStringInfoField(szTmp,szThemeAuthor); - KviQString::sprintf(szTmp,"Theme%dThemeEngineVersion",iIdx); + KviTQString::sprintf(szTmp,"Theme%dThemeEngineVersion",iIdx); r.getStringInfoField(szTmp,szThemeThemeEngineVersion); - KviQString::sprintf(szTmp,"Theme%dScreenshot",iIdx); - QPixmap pixScreenshot; - pByteArray = r.binaryInfoFields()->find(szTmp); + KviTQString::sprintf(szTmp,"Theme%dScreenshot",iIdx); + TQPixmap pixScreenshot; + pByteArray = r.binaryInfoFields()->tqfind(szTmp); if(pByteArray) pixScreenshot.loadFromData(*pByteArray,0,0); @@ -173,7 +173,7 @@ namespace KviThemeFunctions if(KviMiscUtils::compareVersions(szThemeThemeEngineVersion,KVI_CURRENT_THEME_ENGINE_VERSION) < 0) bValid = false; - QString szDetailsBuffer; + TQString szDetailsBuffer; getThemeHtmlDescription( szDetailsBuffer, @@ -217,9 +217,9 @@ namespace KviThemeFunctions szWarnings += "