summaryrefslogtreecommitdiffstats
path: root/src/modules
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/about/aboutdialog.cpp46
-rw-r--r--src/modules/about/aboutdialog.h3
-rw-r--r--src/modules/action/libkviaction.cpp60
-rw-r--r--src/modules/actioneditor/actioneditor.cpp320
-rw-r--r--src/modules/actioneditor/actioneditor.h114
-rw-r--r--src/modules/addon/libkviaddon.cpp78
-rw-r--r--src/modules/addon/managementdialog.cpp136
-rw-r--r--src/modules/addon/managementdialog.h54
-rw-r--r--src/modules/aliaseditor/aliaseditor.cpp374
-rw-r--r--src/modules/aliaseditor/aliaseditor.h116
-rw-r--r--src/modules/avatar/libkviavatar.cpp120
-rw-r--r--src/modules/avatar/libkviavatar.h17
-rw-r--r--src/modules/chan/libkvichan.cpp178
-rw-r--r--src/modules/channelsjoin/channelsjoinwindow.cpp76
-rw-r--r--src/modules/channelsjoin/channelsjoinwindow.h21
-rw-r--r--src/modules/channelsjoin/libkvichannelsjoin.cpp10
-rw-r--r--src/modules/clock/libkviclock.cpp28
-rw-r--r--src/modules/clock/libkviclock.h7
-rw-r--r--src/modules/codetester/codetester.cpp40
-rw-r--r--src/modules/codetester/codetester.h22
-rw-r--r--src/modules/config/libkviconfig.cpp100
-rw-r--r--src/modules/context/libkvicontext.cpp10
-rw-r--r--src/modules/dcc/adpcmcodec.h2
-rw-r--r--src/modules/dcc/broker.cpp140
-rw-r--r--src/modules/dcc/broker.h17
-rw-r--r--src/modules/dcc/canvas.cpp38
-rw-r--r--src/modules/dcc/canvas.h17
-rw-r--r--src/modules/dcc/canvaswidget.cpp462
-rw-r--r--src/modules/dcc/canvaswidget.h167
-rw-r--r--src/modules/dcc/chat.cpp88
-rw-r--r--src/modules/dcc/chat.h25
-rw-r--r--src/modules/dcc/descriptor.cpp6
-rw-r--r--src/modules/dcc/descriptor.h72
-rw-r--r--src/modules/dcc/dialogs.cpp88
-rw-r--r--src/modules/dcc/dialogs.h20
-rw-r--r--src/modules/dcc/libkvidcc.cpp148
-rw-r--r--src/modules/dcc/marshal.cpp40
-rw-r--r--src/modules/dcc/marshal.h35
-rw-r--r--src/modules/dcc/requests.cpp68
-rw-r--r--src/modules/dcc/send.cpp312
-rw-r--r--src/modules/dcc/send.h60
-rw-r--r--src/modules/dcc/thread.cpp2
-rw-r--r--src/modules/dcc/thread.h8
-rw-r--r--src/modules/dcc/utils.cpp8
-rw-r--r--src/modules/dcc/utils.h2
-rw-r--r--src/modules/dcc/voice.cpp101
-rw-r--r--src/modules/dcc/voice.h59
-rw-r--r--src/modules/dcc/window.h1
-rw-r--r--src/modules/dialog/libkvidialog.cpp230
-rw-r--r--src/modules/dialog/libkvidialog.h62
-rw-r--r--src/modules/dockwidget/libkvidockwidget_qt3.cpp150
-rw-r--r--src/modules/dockwidget/libkvidockwidget_qt3.h17
-rw-r--r--src/modules/dockwidget/libkvidockwidget_qt4.cpp116
-rw-r--r--src/modules/dockwidget/libkvidockwidget_qt4.h17
-rw-r--r--src/modules/editor/libkvieditor.cpp6
-rw-r--r--src/modules/editor/scripteditor.cpp546
-rw-r--r--src/modules/editor/scripteditor.h129
-rw-r--r--src/modules/eventeditor/eventeditor.cpp160
-rw-r--r--src/modules/eventeditor/eventeditor.h46
-rw-r--r--src/modules/file/libkvifile.cpp194
-rw-r--r--src/modules/filetransferwindow/filetransferwindow.cpp216
-rw-r--r--src/modules/filetransferwindow/filetransferwindow.h35
-rw-r--r--src/modules/filetransferwindow/libkvifiletransferwindow.cpp18
-rw-r--r--src/modules/help/helpwidget.cpp64
-rw-r--r--src/modules/help/helpwidget.h29
-rw-r--r--src/modules/help/helpwindow.cpp134
-rw-r--r--src/modules/help/helpwindow.h29
-rwxr-xr-xsrc/modules/help/index.cpp176
-rwxr-xr-xsrc/modules/help/index.h71
-rw-r--r--src/modules/help/libkvihelp.cpp14
-rw-r--r--src/modules/http/httpfiletransfer.cpp162
-rw-r--r--src/modules/http/httpfiletransfer.h39
-rw-r--r--src/modules/http/libkvihttp.cpp40
-rw-r--r--src/modules/ident/libkviident.cpp12
-rw-r--r--src/modules/ident/libkviident.h7
-rw-r--r--src/modules/iograph/libkviiograph.cpp26
-rw-r--r--src/modules/iograph/libkviiograph.h7
-rw-r--r--src/modules/lamerizer/libkvilamerizer.h1
-rw-r--r--src/modules/links/libkvilinks.cpp2
-rw-r--r--src/modules/links/linkswindow.cpp88
-rw-r--r--src/modules/links/linkswindow.h21
-rw-r--r--src/modules/list/libkvilist.cpp2
-rw-r--r--src/modules/list/listwindow.cpp126
-rw-r--r--src/modules/list/listwindow.h47
-rw-r--r--src/modules/log/libkvilog.cpp12
-rw-r--r--src/modules/logview/libkvilogview.cpp18
-rw-r--r--src/modules/logview/logviewmdiwindow.cpp228
-rw-r--r--src/modules/logview/logviewmdiwindow.h79
-rw-r--r--src/modules/logview/logviewwidget.cpp14
-rw-r--r--src/modules/logview/logviewwidget.h18
-rw-r--r--src/modules/mask/libkvimask.cpp118
-rw-r--r--src/modules/mediaplayer/libkvimediaplayer.cpp58
-rw-r--r--src/modules/mediaplayer/mp_amarokinterface.cpp28
-rw-r--r--src/modules/mediaplayer/mp_amarokinterface.h20
-rw-r--r--src/modules/mediaplayer/mp_amipinterface.cpp58
-rw-r--r--src/modules/mediaplayer/mp_amipinterface.h22
-rw-r--r--src/modules/mediaplayer/mp_dcopinterface.cpp96
-rw-r--r--src/modules/mediaplayer/mp_dcopinterface.h28
-rw-r--r--src/modules/mediaplayer/mp_interface.cpp78
-rw-r--r--src/modules/mediaplayer/mp_interface.h52
-rw-r--r--src/modules/mediaplayer/mp_jukinterface.cpp32
-rw-r--r--src/modules/mediaplayer/mp_jukinterface.h20
-rw-r--r--src/modules/mediaplayer/mp_mp3.cpp10
-rw-r--r--src/modules/mediaplayer/mp_mp3.h6
-rw-r--r--src/modules/mediaplayer/mp_winampinterface.cpp52
-rw-r--r--src/modules/mediaplayer/mp_winampinterface.h8
-rw-r--r--src/modules/mediaplayer/mp_xmmsinterface.cpp30
-rw-r--r--src/modules/mediaplayer/mp_xmmsinterface.h10
-rw-r--r--src/modules/mircimport/libkvimircimport.cpp76
-rw-r--r--src/modules/mircimport/libkvimircimport.h21
-rw-r--r--src/modules/my/idle.cpp22
-rw-r--r--src/modules/my/idle.h19
-rw-r--r--src/modules/my/idle_mac.cpp6
-rw-r--r--src/modules/my/idle_x11.cpp12
-rw-r--r--src/modules/my/libkvimy.cpp2
-rw-r--r--src/modules/notifier/libkvinotifier.cpp12
-rw-r--r--src/modules/notifier/notifiermessage.cpp34
-rw-r--r--src/modules/notifier/notifiermessage.h38
-rw-r--r--src/modules/notifier/notifiersettings.h2
-rw-r--r--src/modules/notifier/notifierwindow.cpp350
-rw-r--r--src/modules/notifier/notifierwindow.h117
-rw-r--r--src/modules/notifier/notifierwindowbody.cpp22
-rw-r--r--src/modules/notifier/notifierwindowbody.h88
-rw-r--r--src/modules/notifier/notifierwindowborder.cpp28
-rw-r--r--src/modules/notifier/notifierwindowborder.h116
-rw-r--r--src/modules/notifier/notifierwindowprogressbar.cpp10
-rw-r--r--src/modules/notifier/notifierwindowprogressbar.h10
-rw-r--r--src/modules/notifier/notifierwindowtabs.cpp102
-rw-r--r--src/modules/notifier/notifierwindowtabs.h133
-rw-r--r--src/modules/objects/class_button.cpp38
-rw-r--r--src/modules/objects/class_button.h5
-rw-r--r--src/modules/objects/class_buttongroup.cpp14
-rw-r--r--src/modules/objects/class_buttongroup.h4
-rw-r--r--src/modules/objects/class_checkbox.cpp10
-rw-r--r--src/modules/objects/class_checkbox.h5
-rw-r--r--src/modules/objects/class_combobox.cpp90
-rw-r--r--src/modules/objects/class_combobox.h7
-rw-r--r--src/modules/objects/class_dialog.cpp16
-rw-r--r--src/modules/objects/class_dialog.h4
-rw-r--r--src/modules/objects/class_dockwindow.cpp98
-rw-r--r--src/modules/objects/class_dockwindow.h1
-rw-r--r--src/modules/objects/class_file.cpp52
-rw-r--r--src/modules/objects/class_file.h17
-rw-r--r--src/modules/objects/class_groupbox.cpp98
-rw-r--r--src/modules/objects/class_groupbox.h2
-rw-r--r--src/modules/objects/class_hbox.cpp12
-rw-r--r--src/modules/objects/class_hbox.h2
-rw-r--r--src/modules/objects/class_label.cpp152
-rw-r--r--src/modules/objects/class_label.h4
-rw-r--r--src/modules/objects/class_layout.cpp94
-rw-r--r--src/modules/objects/class_layout.h4
-rw-r--r--src/modules/objects/class_lcd.cpp34
-rw-r--r--src/modules/objects/class_lcd.h4
-rw-r--r--src/modules/objects/class_lineedit.cpp76
-rw-r--r--src/modules/objects/class_lineedit.h7
-rw-r--r--src/modules/objects/class_listbox.cpp34
-rw-r--r--src/modules/objects/class_listbox.h5
-rw-r--r--src/modules/objects/class_listview.cpp74
-rw-r--r--src/modules/objects/class_listview.h16
-rw-r--r--src/modules/objects/class_listviewitem.cpp42
-rw-r--r--src/modules/objects/class_listviewitem.h1
-rw-r--r--src/modules/objects/class_mainwindow.cpp50
-rw-r--r--src/modules/objects/class_mainwindow.h4
-rw-r--r--src/modules/objects/class_menubar.cpp6
-rw-r--r--src/modules/objects/class_menubar.h4
-rw-r--r--src/modules/objects/class_multilineedit.cpp194
-rw-r--r--src/modules/objects/class_multilineedit.h5
-rw-r--r--src/modules/objects/class_painter.cpp128
-rw-r--r--src/modules/objects/class_painter.h11
-rw-r--r--src/modules/objects/class_pixmap.cpp40
-rw-r--r--src/modules/objects/class_pixmap.h21
-rw-r--r--src/modules/objects/class_popupmenu.cpp24
-rw-r--r--src/modules/objects/class_popupmenu.h5
-rw-r--r--src/modules/objects/class_process.cpp34
-rw-r--r--src/modules/objects/class_process.h9
-rw-r--r--src/modules/objects/class_progressbar.cpp10
-rw-r--r--src/modules/objects/class_progressbar.h4
-rw-r--r--src/modules/objects/class_radiobutton.cpp16
-rw-r--r--src/modules/objects/class_radiobutton.h5
-rw-r--r--src/modules/objects/class_slider.cpp66
-rw-r--r--src/modules/objects/class_slider.h5
-rw-r--r--src/modules/objects/class_socket.cpp102
-rw-r--r--src/modules/objects/class_socket.h32
-rw-r--r--src/modules/objects/class_spinbox.cpp38
-rw-r--r--src/modules/objects/class_spinbox.h5
-rw-r--r--src/modules/objects/class_tabwidget.cpp104
-rw-r--r--src/modules/objects/class_tabwidget.h5
-rw-r--r--src/modules/objects/class_tbrowser.cpp24
-rw-r--r--src/modules/objects/class_tbrowser.h9
-rw-r--r--src/modules/objects/class_toolbar.cpp16
-rw-r--r--src/modules/objects/class_toolbar.h3
-rw-r--r--src/modules/objects/class_toolbutton.cpp66
-rw-r--r--src/modules/objects/class_toolbutton.h5
-rw-r--r--src/modules/objects/class_urllabel.cpp108
-rw-r--r--src/modules/objects/class_urllabel.h14
-rw-r--r--src/modules/objects/class_vbox.cpp12
-rw-r--r--src/modules/objects/class_vbox.h2
-rw-r--r--src/modules/objects/class_widget.cpp412
-rw-r--r--src/modules/objects/class_widget.h13
-rw-r--r--src/modules/objects/class_window.cpp20
-rw-r--r--src/modules/objects/class_window.h13
-rw-r--r--src/modules/objects/class_wizard.cpp40
-rw-r--r--src/modules/objects/class_wizard.h5
-rw-r--r--src/modules/objects/class_workspace.cpp26
-rw-r--r--src/modules/objects/class_workspace.h4
-rw-r--r--src/modules/objects/class_wrapper.cpp72
-rw-r--r--src/modules/objects/class_wrapper.h9
-rw-r--r--src/modules/objects/class_xmlreader.cpp52
-rw-r--r--src/modules/objects/class_xmlreader.h5
-rw-r--r--src/modules/objects/libkviobjects.cpp161
-rw-r--r--src/modules/objects/object_macros.h6
-rw-r--r--src/modules/options/container.cpp32
-rw-r--r--src/modules/options/container.h15
-rw-r--r--src/modules/options/dialog.cpp220
-rw-r--r--src/modules/options/dialog.h48
-rw-r--r--src/modules/options/instances.cpp348
-rw-r--r--src/modules/options/instances.h19
-rw-r--r--src/modules/options/libkvioptions.cpp34
-rwxr-xr-xsrc/modules/options/mkcreateinstanceproc.sh20
-rw-r--r--src/modules/options/optw_antispam.cpp14
-rw-r--r--src/modules/options/optw_antispam.h3
-rw-r--r--src/modules/options/optw_avatar.cpp14
-rw-r--r--src/modules/options/optw_avatar.h3
-rw-r--r--src/modules/options/optw_away.cpp12
-rw-r--r--src/modules/options/optw_away.h3
-rw-r--r--src/modules/options/optw_connection.cpp70
-rw-r--r--src/modules/options/optw_connection.h23
-rw-r--r--src/modules/options/optw_ctcp.cpp6
-rw-r--r--src/modules/options/optw_ctcp.h3
-rw-r--r--src/modules/options/optw_ctcpfloodprotection.cpp12
-rw-r--r--src/modules/options/optw_ctcpfloodprotection.h5
-rw-r--r--src/modules/options/optw_dcc.cpp58
-rw-r--r--src/modules/options/optw_dcc.h24
-rw-r--r--src/modules/options/optw_generalopt.cpp6
-rw-r--r--src/modules/options/optw_generalopt.h3
-rw-r--r--src/modules/options/optw_highlighting.cpp26
-rw-r--r--src/modules/options/optw_highlighting.h9
-rw-r--r--src/modules/options/optw_identity.cpp214
-rw-r--r--src/modules/options/optw_identity.h79
-rw-r--r--src/modules/options/optw_ignore.cpp8
-rw-r--r--src/modules/options/optw_ignore.h3
-rw-r--r--src/modules/options/optw_input.cpp44
-rw-r--r--src/modules/options/optw_input.h12
-rw-r--r--src/modules/options/optw_interfacefeatures.cpp12
-rw-r--r--src/modules/options/optw_interfacefeatures.h7
-rw-r--r--src/modules/options/optw_interfacelookglobal.cpp48
-rw-r--r--src/modules/options/optw_interfacelookglobal.h15
-rw-r--r--src/modules/options/optw_irc.cpp42
-rw-r--r--src/modules/options/optw_irc.h22
-rw-r--r--src/modules/options/optw_ircoutput.cpp14
-rw-r--r--src/modules/options/optw_ircoutput.h7
-rw-r--r--src/modules/options/optw_ircview.cpp46
-rw-r--r--src/modules/options/optw_ircview.h15
-rw-r--r--src/modules/options/optw_lag.cpp14
-rw-r--r--src/modules/options/optw_lag.h3
-rw-r--r--src/modules/options/optw_logging.cpp6
-rw-r--r--src/modules/options/optw_logging.h3
-rw-r--r--src/modules/options/optw_mediatypes.cpp100
-rw-r--r--src/modules/options/optw_mediatypes.h25
-rw-r--r--src/modules/options/optw_messages.cpp172
-rw-r--r--src/modules/options/optw_messages.h38
-rw-r--r--src/modules/options/optw_nickserv.cpp114
-rw-r--r--src/modules/options/optw_nickserv.h36
-rw-r--r--src/modules/options/optw_notify.cpp52
-rw-r--r--src/modules/options/optw_notify.h6
-rw-r--r--src/modules/options/optw_protection.cpp8
-rw-r--r--src/modules/options/optw_protection.h3
-rw-r--r--src/modules/options/optw_proxy.cpp78
-rw-r--r--src/modules/options/optw_proxy.h39
-rw-r--r--src/modules/options/optw_query.cpp6
-rw-r--r--src/modules/options/optw_query.h9
-rw-r--r--src/modules/options/optw_servers.cpp368
-rw-r--r--src/modules/options/optw_servers.h133
-rw-r--r--src/modules/options/optw_sound.cpp58
-rw-r--r--src/modules/options/optw_sound.h29
-rw-r--r--src/modules/options/optw_ssl.cpp2
-rw-r--r--src/modules/options/optw_taskbar.cpp58
-rw-r--r--src/modules/options/optw_taskbar.h24
-rw-r--r--src/modules/options/optw_textencoding.cpp44
-rw-r--r--src/modules/options/optw_textencoding.h11
-rw-r--r--src/modules/options/optw_texticons.cpp62
-rw-r--r--src/modules/options/optw_texticons.h28
-rw-r--r--src/modules/options/optw_tools.cpp8
-rw-r--r--src/modules/options/optw_tools.h3
-rw-r--r--src/modules/options/optw_topiclabel.cpp4
-rw-r--r--src/modules/options/optw_topiclabel.h3
-rw-r--r--src/modules/options/optw_tray.cpp10
-rw-r--r--src/modules/options/optw_tray.h5
-rw-r--r--src/modules/options/optw_uparser.cpp8
-rw-r--r--src/modules/options/optw_uparser.h3
-rw-r--r--src/modules/options/optw_urlhandlers.cpp58
-rw-r--r--src/modules/options/optw_urlhandlers.h3
-rw-r--r--src/modules/options/optw_userlist.cpp70
-rw-r--r--src/modules/options/optw_userlist.h23
-rw-r--r--src/modules/perl/libkviperl.cpp24
-rw-r--r--src/modules/perlcore/KVIrc.xs18
-rw-r--r--src/modules/perlcore/libkviperlcore.cpp58
-rw-r--r--src/modules/perlcore/perlcoreinterface.h16
-rw-r--r--src/modules/perlcore/ppport.h6
-rw-r--r--src/modules/perlcore/xs.inc18
-rw-r--r--src/modules/popupeditor/popupeditor.cpp310
-rw-r--r--src/modules/popupeditor/popupeditor.h69
-rw-r--r--src/modules/raweditor/raweditor.cpp156
-rw-r--r--src/modules/raweditor/raweditor.h42
-rw-r--r--src/modules/regchan/libkviregchan.cpp102
-rw-r--r--src/modules/reguser/dialog.cpp244
-rw-r--r--src/modules/reguser/dialog.h49
-rw-r--r--src/modules/reguser/edituser.cpp282
-rw-r--r--src/modules/reguser/edituser.h85
-rw-r--r--src/modules/reguser/libkvireguser.cpp324
-rw-r--r--src/modules/reguser/wizard.cpp198
-rw-r--r--src/modules/reguser/wizard.h65
-rw-r--r--src/modules/rijndael/libkvirijndael.cpp12
-rw-r--r--src/modules/rijndael/libkvirijndael.h12
-rw-r--r--src/modules/setup/libkvisetup.cpp22
-rw-r--r--src/modules/setup/setupwizard.cpp304
-rw-r--r--src/modules/setup/setupwizard.h82
-rw-r--r--src/modules/sharedfile/libkvisharedfile.cpp36
-rw-r--r--src/modules/sharedfileswindow/libkvisharedfileswindow.cpp16
-rw-r--r--src/modules/sharedfileswindow/sharedfileswindow.cpp210
-rw-r--r--src/modules/sharedfileswindow/sharedfileswindow.h42
-rw-r--r--src/modules/snd/libkvisnd.cpp77
-rw-r--r--src/modules/snd/libkvisnd.h47
-rw-r--r--src/modules/socketspy/libkvisocketspy.cpp2
-rw-r--r--src/modules/socketspy/socketspywindow.cpp28
-rw-r--r--src/modules/socketspy/socketspywindow.h7
-rw-r--r--src/modules/spaste/controller.cpp28
-rw-r--r--src/modules/spaste/controller.h19
-rw-r--r--src/modules/spaste/libkvispaste.cpp20
-rw-r--r--src/modules/spaste/libkvispaste.h2
-rw-r--r--src/modules/str/libkvistr.cpp316
-rw-r--r--src/modules/system/libkvisystem.cpp86
-rw-r--r--src/modules/system/plugin.cpp42
-rw-r--r--src/modules/system/plugin.h22
-rw-r--r--src/modules/term/libkviterm.cpp2
-rw-r--r--src/modules/term/termwidget.cpp52
-rw-r--r--src/modules/term/termwidget.h27
-rw-r--r--src/modules/term/termwindow.cpp8
-rw-r--r--src/modules/term/termwindow.h7
-rw-r--r--src/modules/texticons/libkvitexticons.cpp6
-rw-r--r--src/modules/theme/libkvitheme.cpp22
-rw-r--r--src/modules/theme/managementdialog.cpp142
-rw-r--r--src/modules/theme/managementdialog.h37
-rw-r--r--src/modules/theme/packthemedialog.cpp210
-rw-r--r--src/modules/theme/packthemedialog.h27
-rw-r--r--src/modules/theme/savethemedialog.cpp142
-rw-r--r--src/modules/theme/savethemedialog.h33
-rw-r--r--src/modules/theme/themefunctions.cpp164
-rw-r--r--src/modules/theme/themefunctions.h28
-rw-r--r--src/modules/tip/libkvitip.cpp68
-rw-r--r--src/modules/tip/libkvitip.h28
-rw-r--r--src/modules/tip/libkvitip_cs.kvc4
-rw-r--r--src/modules/tip/libkvitip_it.kvc2
-rw-r--r--src/modules/tmphighlight/libkvitmphighlight.cpp6
-rw-r--r--src/modules/toolbar/libkvitoolbar.cpp74
-rw-r--r--src/modules/toolbareditor/libkvitoolbareditor.cpp8
-rw-r--r--src/modules/toolbareditor/toolbareditor.cpp194
-rw-r--r--src/modules/toolbareditor/toolbareditor.h79
-rw-r--r--src/modules/torrent/libkvitorrent.cpp22
-rw-r--r--src/modules/torrent/tc_interface.h40
-rw-r--r--src/modules/torrent/tc_ktorrentdcopinterface.cpp48
-rw-r--r--src/modules/torrent/tc_ktorrentdcopinterface.h17
-rw-r--r--src/modules/torrent/tc_statusbarapplet.cpp30
-rw-r--r--src/modules/torrent/tc_statusbarapplet.h3
-rw-r--r--src/modules/url/libkviurl.cpp162
-rw-r--r--src/modules/url/libkviurl.h66
-rw-r--r--src/modules/window/libkviwindow.cpp94
-rw-r--r--src/modules/window/userwindow.cpp12
-rw-r--r--src/modules/window/userwindow.h7
369 files changed, 10588 insertions, 10442 deletions
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 <qwidget.h>
-#include <qlayout.h>
+#include <tqwidget.h>
+#include <tqlayout.h>
#include <kvi_tal_textedit.h>
-#include <qlabel.h>
-#include <qpixmap.h>
-#include <qevent.h>
+#include <tqlabel.h>
+#include <tqpixmap.h>
+#include <tqevent.h>
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 <b>" KVI_VERSION " '" KVI_RELEASE_NAME "'</b><br>";
+ TQString aboutString= "KVIrc <b>" KVI_VERSION " '" KVI_RELEASE_NAME "'</b><br>";
aboutString += __tr2qs_ctx("Forged by the <b>KVIrc Development Team</b>","about");
aboutString += "<br>";
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<QString,KviAction> it(*(KviActionManager::instance()->actions()));
+ KviPointerHashTableIterator<TQString,KviAction> 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 <qsplitter.h>
-#include <qlayout.h>
+#include <tqsplitter.h>
+#include <tqlayout.h>
#include "kvi_tal_vbox.h"
-#include <qtooltip.h>
-#include <qpushbutton.h>
-#include <qdir.h>
-#include <qmessagebox.h>
-#include <qlineedit.h>
-#include <qcombobox.h>
-#include <qtoolbutton.h>
-#include <qcheckbox.h>
-#include <qtooltip.h>
-#include <qpainter.h>
+#include <tqtooltip.h>
+#include <tqpushbutton.h>
+#include <tqdir.h>
+#include <tqmessagebox.h>
+#include <tqlineedit.h>
+#include <tqcombobox.h>
+#include <tqtoolbutton.h>
+#include <tqcheckbox.h>
+#include <tqtooltip.h>
+#include <tqpainter.h>
#ifdef COMPILE_USE_QT4
- #include <q3header.h>
+ #include <tq3header.h>
#else
- #include <qheader.h>
+ #include <tqheader.h>
#endif
-#include <qtabwidget.h>
+#include <tqtabwidget.h>
#include <kvi_tal_groupbox.h>
#include "kvi_valuelist.h"
-#include <qlabel.h>
+#include <tqlabel.h>
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 = "<b>" + m_pActionData->m_szName + "</b>";
+ TQString t = "<b>" + m_pActionData->m_szName + "</b>";
t += "<br><font color=\"#808080\" size=\"-1\">" + m_pActionData->m_szVisibleName + "</font>";
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.<br>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.<br>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.<br>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.<br>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.<br>" \
+ TQString s= __tr2qs("The small icon associated to this action.<br>" \
"It will appear at least in the popup menus when this action is inserted.<br>" \
"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.<br>" \
"It will appear at least in the toolbar buttons when this action is inserted.<br>" \
"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.<br>" \
+ TQToolTip::add(m_pKeySequenceEdit,__tr2qs("Optional keyboard sequence that will activate this action.<br>" \
"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\".<br>" \
"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<QString,KviActionCategory> it(*(KviActionManager::instance()->categories()));
+ KviPointerHashTableIterator<TQString,KviActionCategory> 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;i<m_pCategoryCombo->count();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<QString,KviAction> it(*(KviActionManager::instance()->actions()));
+ KviPointerHashTableIterator<TQString,KviAction> 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 <qwidget.h>
+#include <tqwidget.h>
#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 <q3simplerichtext.h>
- #define QSimpleRichText Q3SimpleRichText
+ #include <tq3simplerichtext.h>
+ #define TQSimpleRichText Q3SimpleRichText
#else
- #include <qsimplerichtext.h>
+ #include <tqsimplerichtext.h>
#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<QString,KviKvsScriptAddon> * da = KviKvsScriptAddonManager::instance()->addonDict();
+ KviPointerHashTable<TQString,KviKvsScriptAddon> * da = KviKvsScriptAddonManager::instance()->addonDict();
int cnt = 0;
- KviPointerHashTableIterator<QString,KviKvsScriptAddon> it(*da);
+ KviPointerHashTableIterator<TQString,KviKvsScriptAddon> 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
<id>. Two addons with the same <id> can't co-exist in the same
KVIrc installation (so be sure to choose a token characteristic enough
to avoid collisions with others). The <id> 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 <qpushbutton.h>
-#include <qlayout.h>
-#include <qapplication.h>
-#include <qtooltip.h>
-#include <qlineedit.h>
-#include <qlabel.h>
-#include <qmessagebox.h>
-#include <qframe.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
+#include <tqapplication.h>
+#include <tqtooltip.h>
+#include <tqlineedit.h>
+#include <tqlabel.h>
+#include <tqmessagebox.h>
+#include <tqframe.h>
#include "kvi_tal_scrollview.h"
#ifdef COMPILE_USE_QT4
- #include <q3header.h>
+ #include <tq3header.h>
#else
- #include <qheader.h>
+ #include <tqheader.h>
#endif
#include "kvi_draganddrop.h"
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qmessagebox.h>
-#include <qevent.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <tqmessagebox.h>
+#include <tqevent.h>
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 = "<nobr><b>";
+ TQString t = "<nobr><b>";
t += a->visibleName();
t += "</b> [";
t += a->version();
@@ -85,15 +85,15 @@ KviScriptAddonListViewItem::KviScriptAddonListViewItem(KviTalListView * v,KviKvs
t += "</font></nobr>";
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<QString,KviKvsScriptAddon> * d = KviKvsScriptAddonManager::instance()->addonDict();
+ KviPointerHashTable<TQString,KviKvsScriptAddon> * d = KviKvsScriptAddonManager::instance()->addonDict();
if(!d)return;
- KviPointerHashTableIterator<QString,KviKvsScriptAddon> it(*d);
+ KviPointerHashTableIterator<TQString,KviKvsScriptAddon> 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 = "<p>";
- txt += __tr2qs("Do you really want to uninstall the addon \"%1\" ?").arg(it->addon()->visibleName());
+ TQString txt = "<p>";
+ txt += __tr2qs("Do you really want to uninstall the addon \"%1\" ?").tqarg(it->addon()->visibleName());
txt += "</p>";
- 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 <qdialog.h>
+#include <tqdialog.h>
#include "kvi_listview.h"
#include "kvi_settings.h"
-#include <qwidget.h>
-#include <qlabel.h>
-#include <qdialog.h>
-#include <qcolor.h>
+#include <tqwidget.h>
+#include <tqlabel.h>
+#include <tqdialog.h>
+#include <tqcolor.h>
#include "kvi_tal_listview.h"
-class QPushButton;
-class QPixmap;
+class TQPushButton;
+class TQPixmap;
class KviKvsScriptAddon;
#ifdef COMPILE_USE_QT4
- #include <QTextDocument>
+ #include <TQTextDocument>
#else
- #include <qsimplerichtext.h>
+ #include <tqsimplerichtext.h>
#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 <qsplitter.h>
-#include <qlayout.h>
+#include <tqsplitter.h>
+#include <tqlayout.h>
#include "kvi_tal_vbox.h"
-#include <qtooltip.h>
-#include <qpushbutton.h>
-#include <qdir.h>
-#include <qmessagebox.h>
-#include <qinputdialog.h>
-#include <qregexp.h>
+#include <tqtooltip.h>
+#include <tqpushbutton.h>
+#include <tqdir.h>
+#include <tqmessagebox.h>
+#include <tqinputdialog.h>
+#include <tqregexp.h>
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<QString,KviKvsScript> * a = KviKvsAliasManager::instance()->aliasDict();
+ KviPointerHashTable<TQString,KviKvsScript> * a = KviKvsAliasManager::instance()->aliasDict();
if(!a)return;
- KviPointerHashTableIterator<QString,KviKvsScript> it(*a);
+ KviPointerHashTableIterator<TQString,KviKvsScript> 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<KviAliasListViewItem> *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(KviPointerList<KviAliasListVi
return;
}
- 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 changed in %s",m_szDir.latin1());
bool bReplaceAll=false;
for(KviAliasListViewItem * it = l->first();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<KviAliasListViewItem> 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(KviPointerList<KviAliasEditorListViewIt
bool KviAliasEditor::removeItem(KviAliasEditorListViewItem *it,bool * pbYesToAll,bool bDeleteEmptyTree)
{
if(!it)return true;
- QString szMsg;
- QString szName = it->name();
+ 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 += "<br>";
- 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 ...<namespace>::<name> ?"),
__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 ...<namespace>::<name> ?"),
__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<KviAliasListViewItem> 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<KviAliasListViewItem> 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 += ": <b>";
szLabelText += szNam;
szLabelText += "</b>";
@@ -1235,7 +1235,7 @@ void KviAliasEditor::currentItemChanged(KviTalListViewItem *it)
return;
}
- QString szLabelText = __tr2qs("Alias");
+ TQString szLabelText = __tr2qs("Alias");
szLabelText += ": <b>";
szLabelText += szNam;
szLabelText += "</b>";
@@ -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 <qwidget.h>
+#include <tqwidget.h>
#include "kvi_tal_listview.h"
-#include <qlineedit.h>
+#include <tqlineedit.h>
#include "kvi_tal_popupmenu.h"
-#include <qstringlist.h>
-#include <qpushbutton.h>
-#include <qlabel.h>
+#include <tqstringlist.h>
+#include <tqpushbutton.h>
+#include <tqlabel.h>
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<KviAliasEditorListViewItem> * l,KviAliasEditorListViewItem * pStartFrom,bool bIncludeChildrenOfSelected = false);
void appendAliasItems(KviPointerList<KviAliasListViewItem> * l,KviAliasEditorListViewItem * pStartFrom,bool bSelectedOnly);
void appendNamespaceItems(KviPointerList<KviAliasListViewItem> * 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 <qlineedit.h>
-#include <qpushbutton.h>
-#include <qmessagebox.h>
-#include <qtimer.h>
-#include <qlabel.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
+#include <tqmessagebox.h>
+#include <tqtimer.h>
+#include <tqlabel.h>
#include "kvi_tal_hbox.h"
-#include <qlayout.h>
+#include <tqlayout.h>
static KviPointerList<KviAsyncAvatarSelectionDialog> * 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 = "<center>";
+ TQString msg = "<center>";
msg += __tr2qs("Please select an avatar image. " \
"The full path to a local file or an image on the Web can be used.<br>" \
"If you wish to use a local image file, click the \"<b>Browse</b>\"" \
@@ -76,29 +76,29 @@ KviAsyncAvatarSelectionDialog::KviAsyncAvatarSelectionDialog(QWidget * par,const
"The full URL for an image (including <b>http://</b>) can be entered manually.");
msg += "</center><br>";
- 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 <qdialog.h>
+#include <tqdialog.h>
-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:
- <array> $chan.users([window_id:string],[mask:string],[flags:string])
+ <array> $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:
<array> $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:
<array> $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:
- <string> $chan.matchban([window_id],<complete_mask>)
+ <string> $chan.matchban([window_id],<complete_tqmask>)
@description:
- Returns the ban mask that matches <complete_mask> on channel identified by [window_id].[br]
- If no ban mask matches <complete_mask> an empty string is returned.[br]
+ Returns the ban tqmask that matches <complete_tqmask> on channel identified by [window_id].[br]
+ If no ban tqmask matches <complete_tqmask> 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:
- <string> $chan.matchbanexception([window_id],<complete_mask>)
+ <string> $chan.matchbanexception([window_id],<complete_tqmask>)
@description:
- Returns the ban exception mask that matches <complete_mask> on channel identified by [window_id].[br]
- If no ban exception mask matches <complete_mask> an empty string is returned.[br]
+ Returns the ban exception tqmask that matches <complete_tqmask> on channel identified by [window_id].[br]
+ If no ban exception tqmask matches <complete_tqmask> 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:
- <string> $chan.matchinvite([window_id:string],<complete_mask>)
+ <string> $chan.matchinvite([window_id:string],<complete_tqmask>)
@description:
- Returns the invite mask that matches <complete_mask> on channel identified by [window_id].[br]
- If no invite mask matches <complete_mask> an empty string is returned.[br]
+ Returns the invite tqmask that matches <complete_tqmask> on channel identified by [window_id].[br]
+ If no invite tqmask matches <complete_tqmask> 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 <qlabel.h>
-#include <qlineedit.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
#include "kvi_tal_listview.h"
#include <kvi_tal_groupbox.h>
-#include <qlayout.h>
-#include <qcheckbox.h>
-#include <qpushbutton.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
+#include <tqpushbutton.h>
#ifdef COMPILE_USE_QT4
- #include <q3header.h>
+ #include <tq3header.h>
#else
- #include <qheader.h>
+ #include <tqheader.h>
#endif
-#include <qevent.h>
+#include <tqevent.h>
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 <qdialog.h>
+#include <tqdialog.h>
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 <qsplitter.h>
+#include <tqsplitter.h>
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 <qbitmap.h>
-#include <qtooltip.h>
-#include <qpainter.h>
+#include <tqbitmap.h>
+#include <tqtooltip.h>
+#include <tqpainter.h>
@@ -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<KviClockDisplay> * 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<KviClockDisplay>;
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 <qpushbutton.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qtoolbutton.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqtoolbutton.h>
#include "kvi_tal_popupmenu.h"
extern KviPointerList<KviCodeTesterWindow> * g_pCodeTesterWindowList;
@@ -46,19 +46,19 @@ extern KviPointerList<KviCodeTesterWindow> * 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("<nobr><font color=\"");
- static QString p2("\"><b>");
- static QString p3("</b></font></nobr>");
+ static TQString p1("<nobr><font color=\"");
+ static TQString p2("\"><b>");
+ static TQString p3("</b></font></nobr>");
m_szHtmlActiveCaption = p1;
m_szHtmlActiveCaption += KVI_OPTION_COLOR(KviOption_colorCaptionTextActive).name();
@@ -145,7 +145,7 @@ void KviCodeTesterWindow::loadProperties(KviConfig *cfg)
{
/*
#ifdef COMPILE_SCRIPTTOOLBAR
- QValueList<int> def;
+ TQValueList<int> 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 <qlineedit.h>
+#include <tqlineedit.h>
-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<QString,KviConfig> * g_pConfigDict = 0;
+static KviPointerHashTable<TQString,KviConfig> * 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<QString,KviConfig> it(*g_pConfigDict);
+ KviPointerHashTableIterator<TQString,KviConfig> 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<QString,KviConfig> it(*g_pConfigDict);
+ KviPointerHashTableIterator<TQString,KviConfig> 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<QString,KviConfig> it(*g_pConfigDict);
+ KviPointerHashTableIterator<TQString,KviConfig> 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<QString,KviConfig>;
+ g_pConfigDict = new KviPointerHashTable<TQString,KviConfig>;
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 <qstring.h> // fix for qtextstream.h
+#include <tqstring.h> // 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 <qfileinfo.h>
-#include <qstring.h>
+#include <tqfileinfo.h>
+#include <tqstring.h>
//#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<KviWindow>;
m_pDccWindowList->setAutoDelete(false);
- m_pZeroPortTags = new KviPointerHashTable<QString,KviDccZeroPortTag>(17);
+ m_pZeroPortTags = new KviPointerHashTable<TQString,KviDccZeroPortTag>(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( \
"<b>%1 [%2@%3]</b> requests a " \
"<b>Direct Client Connection</b> in <b>%4</b> mode.<br>", \
- "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.<br>","dcc");
@@ -282,19 +282,19 @@ void KviDccBroker::handleChatRequest(KviDccDescriptor * dcc)
} else {
tmp += __tr2qs_ctx( \
"The connection target will be host <b>%1</b> on port <b>%2</b><br>" \
- ,"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(
"<b>%1 [%2@%3]</b> requests a<br>" \
"<b>Direct Client Connection</b> in <b>VOICE</b> mode.<br>" \
"The connection target will be host <b>%4</b> on port <b>%5</b><br>" \
,"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( \
"<b>%1 [%2@%3]</b> requests a<br>" \
"<b>Direct Client Connection</b> in <b>CANVAS</b> mode.<br>" \
"The connection target will be host <b>%4</b> on port <b>%5</b><br>" \
,"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)
"<b>%5</b> large.<br>" \
"The connection target will be host <b>%6</b> on port <b>%7</b><br>" \
,"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)
"<b>%5</b> large.<br>" \
"You will be the passive side of the connection.<br>" \
,"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)
"<b>auto-rename</b> the new file, or<br>" \
"<b>resume</b> 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)
"<b>overwrite</b> the existing file, or<br> " \
"<b>auto-rename</b> 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 <filename> <fakeip> 0 <tag>
- 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 <qdatetime.h>
-#include <qobject.h>
+#include <tqdatetime.h>
+#include <tqobject.h>
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<KviDccBox> * m_pBoxList;
KviPointerList<KviWindow> * m_pDccWindowList;
- KviPointerHashTable<QString,KviDccZeroPortTag> * m_pZeroPortTags;
+ KviPointerHashTable<TQString,KviDccZeroPortTag> * 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 <qsplitter.h>
+#include <tqsplitter.h>
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("<nobr><font color=\"%s\"><b>%s</b></font></nobr>",
- KVI_OPTION_COLOR(KviOption_colorCaptionTextActive).name().ascii(),tmp.ptr());
+ TQString(KVI_OPTION_COLOR(KviOption_colorCaptionTextActive).name()).ascii(),tmp.ptr());
m_szHtmlInactiveCaption.sprintf("<nobr><font color=\"%s\"><b>%s</b></font></nobr>",
- 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 <qcursor.h>
-#include <qpainter.h>
-#include <qsimplerichtext.h>
-#include <qlineedit.h>
-#include <qcombobox.h>
-#include <qvalidator.h>
+#include <tqcursor.h>
+#include <tqpainter.h>
+#include <tqsimplerichtext.h>
+#include <tqlineedit.h>
+#include <tqcombobox.h>
+#include <tqvalidator.h>
#include <stdlib.h>
#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<m_points.size();i++)
{
int px;
@@ -137,55 +137,47 @@ int KviCanvasPolygon::rtti() const
return KVI_CANVAS_RTTI_POLYGON;
}
-void KviCanvasPolygon::setProperty(const QString &property,const QVariant &val)
+void KviCanvasPolygon::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 if((property == "clrBackground") || (property == "bHasBackground"))
{
if(m_properties["bHasBackground"].asBool())
- setBrush(QBrush(m_properties["clrBackground"].asColor()));
+ setBrush(TQBrush(m_properties["clrBackground"].asColor()));
else
- setBrush(QBrush());
+ setBrush(TQBrush());
} else {
hide(); show();
}
}
}
-void KviCanvasPolygon::draw(QPainter &p)
+void KviCanvasPolygon::draw(TQPainter &p)
{
-#if QT_VERSION >= 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("<center>Insert here your <font color=\"#FF0000\"><b>RICH TEXT</b></font></center>")));
- m_properties.insert("fntDefault",QVariant(f));
+ m_properties.insert("szText",TQVariant(TQString("<center>Insert here your <font color=\"#FF0000\"><b>RICH TEXT</b></font></center>")));
+ 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;i<nVertices;i++)
@@ -622,9 +578,9 @@ static void calcPolygonPoints(QPointArray &pnts,unsigned int nVertices)
}
}
-void KviCanvasView::insertObjectAt(const QPoint & pnt,ObjectType o)
+void KviCanvasView::insertObjectAt(const TQPoint & pnt,ObjectType o)
{
- QCanvasItem * r = 0;
+ TQCanvasItem * r = 0;
switch(o)
{
@@ -648,7 +604,7 @@ void KviCanvasView::insertObjectAt(const QPoint & pnt,ObjectType o)
break;
case PolygonTriangle:
{
- QPointArray pa(3);
+ TQPointArray pa(3);
pa.setPoint(0,0,-500);
pa.setPoint(1,-450,220);
pa.setPoint(2,450,220);
@@ -657,7 +613,7 @@ void KviCanvasView::insertObjectAt(const QPoint & pnt,ObjectType o)
break;
case PolygonRectangle:
{
- QPointArray pa(4);
+ TQPointArray pa(4);
pa.setPoint(0,-350,-350);
pa.setPoint(1,350,-350);
pa.setPoint(2,350,350);
@@ -667,14 +623,14 @@ void KviCanvasView::insertObjectAt(const QPoint & pnt,ObjectType o)
break;
case PolygonPentagon:
{
- QPointArray pa(5);
+ TQPointArray pa(5);
calcPolygonPoints(pa,5);
r = new KviCanvasPolygon(canvas(),pnt.x(),pnt.y(),pa,0.1);
}
break;
case PolygonHexagon:
{
- QPointArray pa(6);
+ TQPointArray pa(6);
calcPolygonPoints(pa,6);
r = new KviCanvasPolygon(canvas(),pnt.x(),pnt.y(),pa,0.1);
}
@@ -704,7 +660,7 @@ void KviCanvasView::insertObjectAt(const QPoint & pnt,ObjectType o)
// canvas()->update();
}
-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;i<pa.size();i++)
{
- QPoint pnt = pa.point(i);
+ TQPoint pnt = pa.point(i);
double dX = pnt.x() - p.x();
double dY = pnt.y() - p.y();
double dHypot = sqrt((dX * dX) + (dY * dY));
@@ -876,7 +832,7 @@ void KviCanvasView::beginDragPolygon(KviCanvasPolygon * it,const QPoint &p,bool
setCursor(pointingHandCursor);
}
-void KviCanvasView::dragPolygon(KviCanvasPolygon * it,const QPoint &p)
+void KviCanvasView::dragPolygon(KviCanvasPolygon * it,const TQPoint &p)
{
switch(m_dragMode)
{
@@ -885,7 +841,7 @@ void KviCanvasView::dragPolygon(KviCanvasPolygon * it,const QPoint &p)
break;
case SinglePoint:
{
- QPointArray pnt = it->internalPoints();
+ 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;i<thePoints.size();i++)
{
- QPoint tmp = thePoints.point(i);
+ TQPoint tmp = thePoints.point(i);
double dx = tmp.x();
double dy = tmp.y();
ssm_2d_rotate(dx,dy,dAngle);
@@ -922,9 +878,9 @@ void KviCanvasView::dragPolygon(KviCanvasPolygon * it,const QPoint &p)
canvas()->update();
}
-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<QString,QVariant> * m = 0;
+ TQMap<TQString,TQVariant> * 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<QString,QVariant>::ConstIterator iter = m->begin();iter != m->end();++iter)
+ for(TQMap<TQString,TQVariant>::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<int> l;
+ TQValueList<int> 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 <qcanvas.h>
+#include <tqcanvas.h>
-//#ifdef QT_NO_CANVAS
+//#ifdef TQT_NO_CANVAS
// #warning "HEre is not"
//#endif
-#include <qmenubar.h>
-#include <qlabel.h>
+#include <tqmenubar.h>
+#include <tqlabel.h>
-#include <qmap.h>
-#include <qvariant.h>
-#include <qtable.h>
-#include <qsplitter.h>
+#include <tqmap.h>
+#include <tqvariant.h>
+#include <tqtable.h>
+#include <tqsplitter.h>
@@ -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<QString,QVariant> m_properties;
+ TQMap<TQString,TQVariant> 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<QString,QVariant> * 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<TQString,TQVariant> * 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<QString,QVariant> m_properties;
+ TQMap<TQString,TQVariant> m_properties;
public:
int right(){ return ((int)x()) + width(); };
int bottom(){ return ((int)y()) + height(); };
- QMap<QString,QVariant> * properties(){ return &m_properties; };
- virtual void setProperty(const QString &property,const QVariant &val);
-// QVariant property(const QString &name){ return m_properties[name]; };
+ TQMap<TQString,TQVariant> * 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<QString,QVariant> m_properties;
+ TQMap<TQString,TQVariant> m_properties;
public:
- QMap<QString,QVariant> * 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<TQString,TQVariant> * 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 <qsplitter.h>
-#include <qevent.h>
+#include <tqsplitter.h>
+#include <tqevent.h>
#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("<nobr><font color=\"%s\"><b>%s</b></font></nobr>",
- KVI_OPTION_COLOR(KviOption_colorCaptionTextActive).name().ascii(),tmp.utf8().data());
+ TQString(KVI_OPTION_COLOR(KviOption_colorCaptionTextActive).name()).ascii(),tmp.utf8().data());
m_szHtmlInactiveCaption.sprintf("<nobr><font color=\"%s\"><b>%s</b></font></nobr>",
- 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<int> *)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<KviDataBuffer>;
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<int,KviDccDescriptor>;
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<int,KviDccDescriptor> * 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 <qlayout.h>
-#include <qpushbutton.h>
-#include <qlabel.h>
-#include <qstringlist.h>
-#include <qevent.h>
-#include <qdesktopwidget.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqlabel.h>
+#include <tqstringlist.h>
+#include <tqevent.h>
+#include <tqdesktopwidget.h>
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 <qwidget.h>
+#include <tqwidget.h>
#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 <qfileinfo.h>
+#include <tqfileinfo.h>
#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 "<nickname>!*@*".
+ A 120 seconds file offer is added for the specified file and tqmask "<nickname>!*@*".
@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:
- <string> $dcc.transferStatus
- <string> $dcc.transferStatus(<dcc_id:uint>)
+ <string> $dcc.transfertqStatus
+ <string> $dcc.transfertqStatus(<dcc_id:uint>)
@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 <qobject.h>
-#include <qsocketnotifier.h>
-#include <qtimer.h>
+#include <tqobject.h>
+#include <tqsocketnotifier.h>
+#include <tqtimer.h>
#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 <qfileinfo.h>
+#include <tqfileinfo.h>
#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("<unknown size>","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("<unknown size>","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 <mask> <ipaddr> <port>
+ // DCC LIST <tqmask> <ipaddr> <port>
// 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 <qevent.h>
-#include <qfile.h>
-#include <qpainter.h>
-#include <qdatetime.h>
-#include <qglobal.h>
-#include <qcheckbox.h>
-#include <qspinbox.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
+#include <tqevent.h>
+#include <tqfile.h>
+#include <tqpainter.h>
+#include <tqdatetime.h>
+#include <tqglobal.h>
+#include <tqcheckbox.h>
+#include <tqspinbox.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
#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<KviDccFileTransfer> * 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<KviStr> * e = new KviThreadDataEvent<KviStr>(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<KviStr> * e = new KviThreadDataEvent<KviStr>(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("<table><tr><td bgcolor=\"#000000\"><font color=\"#FFFFFF\"><b>DCC %1 (ID %2)</b></font></td></tr>").arg(m_szDccType.ptr()).arg(id());
+ s = TQString("<table><tr><td bgcolor=\"#000000\"><font color=\"#FFFFFF\"><b>DCC %1 (ID %2)</b></font></td></tr>").tqarg(m_szDccType.ptr()).tqarg(id());
s += "<tr><td bgcolor=\"#404040\"><font color=\"#FFFFFF\">";
s += __tr2qs_ctx("Transfer Log","dcc");
@@ -1362,9 +1362,9 @@ void KviDccFileTransfer::init()
g_pDccFileTransfers = new KviPointerList<KviDccFileTransfer>;
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 += "<br>";
@@ -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<int> *)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<KviStr> *)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 <qlabel.h>
-#include <qprogressbar.h>
+#include <tqlabel.h>
+#include <tqprogressbar.h>
#include "kvi_tal_popupmenu.h"
#include "kvi_tal_hbox.h"
#include "kvi_tal_vbox.h"
-#include <qfile.h>
-#include <qdialog.h>
+#include <tqfile.h>
+#include <tqdialog.h>
#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 <qobject.h>
+#include <tqobject.h>
#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 <qframe.h>
-#include <qsplitter.h>
+#include <tqframe.h>
+#include <tqsplitter.h>
#include "kvi_tal_vbox.h"
-#include <qslider.h>
-#include <qtooltip.h>
+#include <tqslider.h>
+#include <tqtooltip.h>
#ifndef COMPILE_ON_WINDOWS
#include <sys/time.h>
@@ -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<int> * e = new KviThreadDataEvent<int>(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<int> * e = new KviThreadDataEvent<int>(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<int> * e = new KviThreadDataEvent<int>(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<int> * e = new KviThreadDataEvent<int>(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("<nobr><font color=\"%s\"><b>%s</b></font></nobr>",
- KVI_OPTION_COLOR(KviOption_colorCaptionTextActive).name().ascii(),tmp.ptr());
+ TQString(KVI_OPTION_COLOR(KviOption_colorCaptionTextActive).name()).ascii(),tmp.ptr());
m_szHtmlInactiveCaption.sprintf("<nobr><font color=\"%s\"><b>%s</b></font></nobr>",
- 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<int> *)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 <qlabel.h>
-#include <qtoolbutton.h>
-#include <qtimer.h>
+#include <tqlabel.h>
+#include <tqtoolbutton.h>
+#include <tqtimer.h>
#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<KviVoiceParty> * 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<KviVoiceLink> * m_pLinks;
- KviPointerHashTable<QString,KviVoiceLink> *
+ KviPointerHashTable<TQString,KviVoiceLink> *
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 <qmessagebox.h>
-#include <qlayout.h>
+#include <tqmessagebox.h>
+#include <tqlayout.h>
#include "kvi_tal_hbox.h"
-#include <qlineedit.h>
+#include <tqlineedit.h>
#ifdef COMPILE_USE_QT4
- #include <q3multilineedit.h>
- #define QMultiLineEdit Q3MultiLineEdit
- #include <qdesktopwidget.h>
+ #include <tq3multilineedit.h>
+ #define TQMultiLineEdit Q3MultiLineEdit
+ #include <tqdesktopwidget.h>
#else
- #include <qmultilineedit.h>
+ #include <tqmultilineedit.h>
#endif
-#include <qevent.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
+#include <tqevent.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
#include "kvi_locale.h"
#include "kvi_module.h"
@@ -51,25 +51,25 @@
#include "kvi_kvs_script.h"
#include "kvi_msgbox.h"
-static KviPointerList<QWidget> * g_pDialogModuleDialogList;
+static KviPointerList<TQWidget> * 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)
<magic1>,<magic2>... are the magic parameters: evaluated at dialog.message call time and passed
to the <callback_command> 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 <callback_command> 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,&params,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(&params);
- //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 <default text>.[br]
If the -i switch is used , the dialog displays also the icon <icon> , just on the left ot the <info_text>[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 <icon> 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]
<magic1>,<magic2>... 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,&params,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)
<magic1>,<magic2>... are the magic parameters: evaluated at dialog.message call time and passed
to the <callback_command> 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 <callback_command> 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,&params,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)
<magic1>,<magic2>... are the magic parameters: evaluated at dialog.image call time and passed
to the <callback_command> 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 <callback_command> 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<QWidget>;
+ g_pDialogModuleDialogList = new KviPointerList<TQWidget>;
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 <qmessagebox.h>
-#include <qdialog.h>
+#include <tqmessagebox.h>
+#include <tqdialog.h>
// 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 <kwin.h>
#include <kpopupmenu.h>
#else
- #include <qlabel.h>
+ #include <tqlabel.h>
#endif
#include "kvi_tal_popupmenu.h"
-#include <qpixmap.h>
-#include <qpainter.h>
-#include <qtimer.h>
-#include <qevent.h>
-#include <qregexp.h>
+#include <tqpixmap.h>
+#include <tqpainter.h>
+#include <tqtimer.h>
+#include <tqevent.h>
+#include <tqregexp.h>
#include <stdlib.h>
#include <time.h>
@@ -64,8 +64,8 @@
#ifdef COMPILE_ON_WINDOWS
#include <windows.h>
- #include <qbitmap.h>
- #include <qcursor.h>
+ #include <tqbitmap.h>
+ #include <tqcursor.h>
#define ID_DOCKWIDGET_TASKBAR_ICON 0xdeadbeef
#define WM_KVIRC_NOTIFY_ICON_MESSAGE (WM_USER + 0xbeef)
@@ -92,26 +92,26 @@
extern KVIRC_API KviPointerHashTable<const char *,KviWindow> * g_pGlobalWindowDict;
static KviPointerList<KviDockWidget> * 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('&'),"&amp;");
- line.replace(QChar('<'),"&lt;");
- line.replace(QChar('>'),"&gt;");
+ line.tqreplace(TQChar('&'),"&amp;");
+ line.tqreplace(TQChar('<'),"&lt;");
+ line.tqreplace(TQChar('>'),"&gt;");
tmp += "<b>";
tmp += b->kviWindow()->plainTextCaption();
tmp += "</b><br>";
@@ -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 <qlabel.h>
+#include <tqlabel.h>
#include "kvi_tal_popupmenu.h"
-#include <qpixmap.h>
-#include <qpainter.h>
-#include <qtimer.h>
-#include <qevent.h>
-#include <qregexp.h>
+#include <tqpixmap.h>
+#include <tqpainter.h>
+#include <tqtimer.h>
+#include <tqevent.h>
+#include <tqregexp.h>
#include <stdlib.h>
#include <time.h>
@@ -67,12 +67,12 @@
extern KVIRC_API KviPointerHashTable<const char *,KviWindow> * g_pGlobalWindowDict;
static KviPointerList<KviDockWidget> * 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('&'),"&amp;");
- line.replace(QChar('<'),"&lt;");
- line.replace(QChar('>'),"&gt;");
+ line.tqreplace(TQChar('&'),"&amp;");
+ line.tqreplace(TQChar('<'),"&lt;");
+ line.tqreplace(TQChar('>'),"&gt;");
tmp += "<b>";
tmp += b->kviWindow()->plainTextCaption();
tmp += "</b><br>";
@@ -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<KviDockWidget>;
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 <QSystemTrayIcon>
+#include <TQSystemTrayIcon>
-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 <qlayout.h>
-#include <qtoolbutton.h>
+#include <tqlayout.h>
+#include <tqtoolbutton.h>
#include <kvi_tal_groupbox.h>
#include "kvi_tal_popupmenu.h"
#include "kvi_tal_scrollview.h"
-#include <qmessagebox.h>
-#include <qtimer.h>
+#include <tqmessagebox.h>
+#include <tqtimer.h>
#ifdef COMPILE_USE_QT4
- //#define QSyntaxHighlighter Q3SyntaxHighlighter
+ //#define TQSyntaxHighlighter Q3SyntaxHighlighter
#else
- #include <qobjectlist.h>
+ #include <tqobjectlist.h>
#endif
-#include <qcursor.h>
-#include <qfont.h>
-#include <qrect.h>
+#include <tqcursor.h>
+#include <tqfont.h>
+#include <tqrect.h>
#include "kvi_fileutils.h"
#include "kvi_locale.h"
@@ -55,36 +55,36 @@
#include "kvi_iconmanager.h"
#include "kvi_kvs_kernel.h"
-#include <qlayout.h>
+#include <tqlayout.h>
extern KviPointerList<KviScriptEditorImplementation> * 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<QString> list;
+ KviPointerList<TQString> 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<KviSelectorInterface>;
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(&para,&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(),&para);
buffer=this->text(para);
getWordOnCursor(buffer,index);
- QString tmp=buffer;
- KviPointerList<QString> l;
+ TQString tmp=buffer;
+ KviPointerList<TQString> 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(&para,&index);
buffer=text(para);
@@ -440,8 +440,8 @@ bool KviScriptEditorWidget::contextSensitiveHelp() const
getWordOnCursor(buffer,index);
/*
- QString tmp=buffer;
- KviPointerList<QString> * l;
+ TQString tmp=buffer;
+ KviPointerList<TQString> * 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 <qlabel.h>
+#include <tqlabel.h>
#include <kvi_tal_textedit.h>
-#include <qsyntaxhighlighter.h>
-#include <qdialog.h>
-#include <qcheckbox.h>
+#include <tqsyntaxhighlighter.h>
+#include <tqdialog.h>
+#include <tqcheckbox.h>
#include "kvi_tal_listbox.h"
-#include <qevent.h>
+#include <tqevent.h>
#include "kvi_qcstring.h"
#include "kvi_tal_popupmenu.h"
@@ -45,110 +45,114 @@ typedef KviPointerList<int> 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 <q3syntaxhighlighter.h>
- #define QSyntaxHighlighter Q3SyntaxHighlighter
+ #include <tq3syntaxhighlighter.h>
+ #define TQSyntaxHighlighter Q3SyntaxHighlighter
#else
- #include <qobjectlist.h>
+ #include <tqobjectlist.h>
#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<KviSelectorInterface> * 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 <qmessagebox.h>
+#include <tqmessagebox.h>
-#include <qsplitter.h>
-#include <qlayout.h>
+#include <tqsplitter.h>
+#include <tqlayout.h>
#include "kvi_tal_vbox.h"
#include "kvi_tal_popupmenu.h"
-#include <qtooltip.h>
-#include <qpushbutton.h>
-#include <qevent.h>
+#include <tqtooltip.h>
+#include <tqpushbutton.h>
+#include <tqevent.h>
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("<nobr><font color=\"");
- static QString p2("\"><b>");
- static QString p3("</b></font></nobr>");
+ static TQString p1("<nobr><font color=\"");
+ static TQString p2("\"><b>");
+ static TQString p3("</b></font></nobr>");
m_szHtmlActiveCaption = p1;
m_szHtmlActiveCaption += KVI_OPTION_COLOR(KviOption_colorCaptionTextActive).name();
@@ -524,7 +524,7 @@ void KviEventEditorWindow::loadProperties(KviConfig *cfg)
{
/*
#ifdef COMPILE_SCRIPTTOOLBAR
- QValueList<int> def;
+ TQValueList<int> 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 <qwidget.h>
+#include <tqwidget.h>
#include "kvi_tal_listview.h"
-#include <qlineedit.h>
+#include <tqlineedit.h>
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 &params)
+ KviEventListViewItem(KviTalListView * par,unsigned int uEvIdx,const TQString &name,const TQString &params)
: 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 <qfileinfo.h>
+#include <tqfileinfo.h>
#include "kvi_file.h"
-#include <qdir.h>
-#include <qtextstream.h>
+#include <tqdir.h>
+#include <tqtextstream.h>
/*
@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<QDir::Filter> iFlags = 0;
+ TQFlags<TQDir::Filter> 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<QDir::SortFlag> iSort = 0;
+ TQFlags<TQDir::SortFlag> 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;i<iStartLine;i++)
stream.readLine();
@@ -873,7 +873,7 @@ static bool file_kvs_fnc_readLines(KviKvsModuleFunctionCall * c)
@switches:
!sw: -l | --local-8-bit
Causes the lines to be saved in local 8 bit character set instead
- of the default unicode encoding.
+ of the default tqunicode encoding.
!sw: -a | --append
If the file already exists, then the lines are appended to the end
instead of overwriting the file.
@@ -902,7 +902,7 @@ static bool file_kvs_fnc_readLines(KviKvsModuleFunctionCall * c)
static bool file_kvs_cmd_writeLines(KviKvsModuleCommandCall * c)
{
- QString szFile,szFlags;
+ TQString szFile,szFlags;
KviKvsArrayCast a;
KVSM_PARAMETERS_BEGIN(c)
KVSM_PARAMETER("filename",KVS_PT_NONEMPTYSTRING,0,szFile)
@@ -914,27 +914,27 @@ static bool file_kvs_cmd_writeLines(KviKvsModuleCommandCall * c)
KviFile f(szFile);
int iFlags = IO_WriteOnly;
- if(!f.openForWriting(c->switches()->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)
<string> $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 <relative_path> 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 <relative_path> 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 <qsplitter.h>
-#include <qtooltip.h>
+#include <tqsplitter.h>
+#include <tqtooltip.h>
#include "kvi_tal_hbox.h"
#ifdef COMPILE_USE_QT4
- #include <q3header.h>
+ #include <tq3header.h>
#else
- #include <qheader.h>
+ #include <tqheader.h>
#endif
-#include <qpainter.h>
-#include <qmessagebox.h>
-#include <qclipboard.h>
-#include <qfileinfo.h>
-#include <qfile.h>
-#include <qlabel.h>
-#include <qfontmetrics.h>
-#include <qevent.h>
+#include <tqpainter.h>
+#include <tqmessagebox.h>
+#include <tqclipboard.h>
+#include <tqfileinfo.h>
+#include <tqfile.h>
+#include <tqlabel.h>
+#include <tqfontmetrics.h>
+#include <tqevent.h>
#ifdef COMPILE_KDE_SUPPORT
#include <kurl.h>
@@ -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 = "<b>file:/";
+ TQString tmp = "<b>file:/";
tmp += szFile;
tmp += "</b><br>";
- QFileInfo fi(szFile);
+ TQFileInfo fi(szFile);
if(fi.exists())
{
tmp += "<nobr>";
- tmp += __tr2qs_ctx("Size: %1","filetransferwindow").arg(KviQString::makeSizeReadable(fi.size()));
+ tmp += __tr2qs_ctx("Size: %1","filetransferwindow").tqarg(KviTQString::makeSizeReadable(fi.size()));
tmp += "</nobr><br>";
}
@@ -323,15 +323,15 @@ void KviFileTransferWindow::rightButtonPressed(KviTalListViewItem *it,const QPoi
tmp += "</nobr>";
#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<int> l(m_pSplitter->sizes());
+// TQValueList<int> 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<int> l;
+// TQValueList<int> 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 <qtoolbutton.h>
-#include <qtimer.h>
-#include <qpixmap.h>
+#include <tqtoolbutton.h>
+#include <tqtimer.h>
+#include <tqpixmap.h>
@@ -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 <qsplitter.h>
+#include <tqsplitter.h>
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<QString,QVariant> dict(17,true);
+ KviPointerHashTable<TQString,TQVariant> 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 <qtoolbutton.h>
-#include <qlineedit.h>
-#include <qtooltip.h>
-#include <qtimer.h>
-#include <qclipboard.h>
+#include <tqtoolbutton.h>
+#include <tqlineedit.h>
+#include <tqtooltip.h>
+#include <tqtimer.h>
+#include <tqclipboard.h>
extern Index * g_pDocIndex;
extern KviPointerList<KviHelpWindow> * g_pHelpWindowList;
extern KviPointerList<KviHelpWidget> * 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 <qtextbrowser.h>
+#include <tqtextbrowser.h>
#include "index.h"
-#include <qprogressbar.h>
+#include <tqprogressbar.h>
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 <qfileinfo.h>
-#include <qsplitter.h>
-#include <qlineedit.h>
-#include <qmessagebox.h>
-#include <qregexp.h>
-#include <qtooltip.h>
+#include <tqfileinfo.h>
+#include <tqsplitter.h>
+#include <tqlineedit.h>
+#include <tqmessagebox.h>
+#include <tqregexp.h>
+#include <tqtooltip.h>
#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<int> 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 <qtabwidget.h>
+#include <tqtabwidget.h>
#include "kvi_tal_listbox.h"
-#include <qlineedit.h>
-#include <qprogressdialog.h>
+#include <tqlineedit.h>
+#include <tqprogressdialog.h>
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 <qdir.h>
-#include <qstringlist.h>
+#include <tqdir.h>
+#include <tqstringlist.h>
#include "kvi_pointerhashtable.h"
-#include <qapplication.h>
-#include <qtextstream.h>
+#include <tqapplication.h>
+#include <tqtextstream.h>
#include <ctype.h>
@@ -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<QString,Entry> it( dict );
+ KviPointerHashTableIterator<TQString,Entry> 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<Document> 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<Document> 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( "<title>", 0, FALSE ) + 7;
+ int start = text.tqfind( "<title>", 0, FALSE ) + 7;
- int end = text.find( "</title>", 0, FALSE );
+ int end = text.tqfind( "</title>", 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<QString>::iterator iter;
+ KviValueList<TQString>::iterator iter;
#endif
- KviPointerHashTableIterator<QString,Entry> it( dict );
+ KviPointerHashTableIterator<TQString,Entry> 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<Document> Index::setupDummyTerm( const QStringList &terms )
+KviValueList<Document> 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<Document> 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<Document> 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<uint> 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 <qstringlist.h>
+#include <tqstringlist.h>
#include "kvi_pointerhashtable.h"
#include "kvi_pointerlist.h"
#include "kvi_valuelist.h"
-#include <qdatastream.h>
-#include <qobject.h>
+#include <tqdatastream.h>
+#include <tqobject.h>
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<uint> 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<Document> setupDummyTerm( const QStringList& );
- bool searchForPattern( const QStringList&, const QStringList&, const QString& );
- void buildMiniDict( const QString& );
- QStringList docList;
- QStringList titleList;
- KviPointerHashTable<QString,Entry> dict;
- KviPointerHashTable<QString,PosEntry> miniDict;
+ void parseDocument( const TQString&, int );
+ void insertInDict( const TQString&, int );
+ TQStringList getWildcardTerms( const TQString& );
+ TQStringList split( const TQString& );
+ KviValueList<Document> setupDummyTerm( const TQStringList& );
+ bool searchForPattern( const TQStringList&, const TQStringList&, const TQString& );
+ void buildMiniDict( const TQString& );
+ TQStringList docList;
+ TQStringList titleList;
+ KviPointerHashTable<TQString,Entry> dict;
+ KviPointerHashTable<TQString,PosEntry> 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<Document> l )
+ Term( const TQString &t, int f, KviValueList<Document> l )
: term( t ), frequency( f ), documents( l ) {}
- QString term;
+ TQString term;
int frequency;
KviValueList<Document>documents;
};
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 <q3mimefactory.h>
+ #include <tq3mimefactory.h>
#endif
-#include <qsplitter.h>
+#include <tqsplitter.h>
Index * g_pDocIndex = 0;
KviPointerList<KviHelpWidget> * g_pHelpWidgetList = 0;
KviPointerList<KviHelpWindow> * 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 <qpainter.h>
+#include <tqpainter.h>
static KviPointerList<KviHttpFileTransfer> * 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<const char *,KviStr> *)),this,SLOT(headersReceived(KviPointerHashTable<const char *,KviStr> *)));
- 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<const char *,KviStr> *)),this,TQT_SLOT(headersReceived(KviPointerHashTable<const char *,KviStr> *)));
+ 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("<table><tr><td bgcolor=\"#000000\"><font color=\"#FFFFFF\"><b>HTTP Transfer (ID %1)</b></font></td></tr>").arg(id());
+ TQString s;
+ s = TQString("<table><tr><td bgcolor=\"#000000\"><font color=\"#FFFFFF\"><b>HTTP Transfer (ID %1)</b></font></td></tr>").tqarg(id());
if(m_lRequest.count() > 0)
{
s += "<tr><td bgcolor=\"#404040\"><font color=\"#FFFFFF\">Request Headers</font></td></tr>";
s += "<tr><td bgcolor=\"#C0C0C0\">";
- 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 += "&nbsp; &nbsp;";
s += *it;
@@ -320,7 +320,7 @@ QString KviHttpFileTransfer::tipText()
{
s += "<tr><td bgcolor=\"#404040\"><font color=\"#FFFFFF\">Response Headers</font></td></tr>";
s += "<tr><td bgcolor=\"#C0C0C0\">";
- 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 += "&nbsp; &nbsp;";
s += *it;
@@ -340,9 +340,9 @@ void KviHttpFileTransfer::init()
g_pHttpFileTransfers = new KviPointerList<KviHttpFileTransfer>;
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<const char *,KviSt
KviPointerHashTableIterator<const char *,KviStr> 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(KviPointerHashTable<const char *,KviSt
bool KviHttpFileTransfer::startDownload()
{
- m_eGeneralStatus = Connecting;
+ m_eGeneraltqStatus = Connecting;
return m_pHttpRequest->start();
}
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 <qstringlist.h>
-#include <qtimer.h>
+#include <tqstringlist.h>
+#include <tqtimer.h>
-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<const char *,KviStr> *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 <qobject.h>
+#include <tqobject.h>
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 <qtooltip.h>
-#include <qpointarray.h>
-#include <qpainter.h>
+#include <tqtooltip.h>
+#include <tqpointarray.h>
+#include <tqpainter.h>
-extern QPixmap * g_pIccMemBuffer;
+extern TQPixmap * g_pIccMemBuffer;
static KviPointerList<KviIOGraphDisplay> * 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 <qsplitter.h>
+#include <tqsplitter.h>
KviPointerList<KviLinksWindow> * 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 <qsplitter.h>
-#include <qtooltip.h>
+#include <tqsplitter.h>
+#include <tqtooltip.h>
#include "kvi_tal_hbox.h"
-#include <qlabel.h>
+#include <tqlabel.h>
extern KviPointerList<KviLinksWindow> * 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("<nobr><font color=\"%s\"><b>Links for %Q</b></font> " \
"<font color=\"%s\">[IRC Context %u]</font></nobr>"),
- 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("<nobr><font color=\"%s\"><b>Links for %Q</b></font> " \
"<font color=\"%s\">[IRC Context %u]</font></nobr>"),
- 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 <mask> ?)"),
- 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 <tqmask> ?)"),
+ 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<int> l(m_pSplitter->sizes());
+// TQValueList<int> 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<int> l;
+// TQValueList<int> 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 <qtoolbutton.h>
+#include <tqtoolbutton.h>
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<KviLink> * 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 <qsplitter.h>
+#include <tqsplitter.h>
KviPointerList<KviListWindow> * 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 <qtimer.h>
-#include <qpainter.h>
-#include <qfontmetrics.h>
-#include <qsplitter.h>
-#include <qtooltip.h>
-#include <qdatetime.h>
+#include <tqtimer.h>
+#include <tqpainter.h>
+#include <tqfontmetrics.h>
+#include <tqsplitter.h>
+#include <tqtooltip.h>
+#include <tqdatetime.h>
#include "kvi_tal_hbox.h"
#include "kvi_msgbox.h"
@@ -59,7 +59,7 @@ extern KviPointerList<KviListWindow> * 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<KviChannelListViewItemData>;
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("<center><b>/LIST command parameters:</b><br>Many servers accept special parameters that " \
+ TQToolTip::add(m_pParamsEdit,__tr2qs("<center><b>/LIST command parameters:</b><br>Many servers accept special parameters that " \
"allow you to filter the returned entries.<br>" \
- "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 <b>c&lt;n</b> or <b>c&gt;n</b> where <b>n</b> is the minimum or maximum of users on the channel.</center>"));
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("<nobr><font color=\"%s\"><b>Channel List</b></font> " \
"<font color=\"%s\">[IRC Context %u]</font></nobr>"),
- 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("<nobr><font color=\"%s\"><b>Channel list</b></font> " \
"<font color=\"%s\">[IRC Context %u]</font></nobr>"),
- 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<int> l(m_pSplitter->sizes());
+// TQValueList<int> 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<int> l;
+// TQValueList<int> 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 <qtoolbutton.h>
-#include <qlineedit.h>
+#include <tqtoolbutton.h>
+#include <tqlineedit.h>
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<KviChannelListViewItemData> * 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<QString,QVariant> dict(17,true);
+ KviPointerHashTable<TQString,TQVariant> 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 <q3progressdialog.h>
+ #include <tq3progressdialog.h>
#else
- #include <qprogressdialog.h>
+ #include <tqprogressdialog.h>
#endif
#include "kvi_valuelist.h"
#include "kvi_accel.h"
-#include <qpixmap.h>
-#include <qsplitter.h>
-#include <qtoolbutton.h>
+#include <tqpixmap.h>
+#include <tqsplitter.h>
+#include <tqtoolbutton.h>
#include "kvi_tal_listview.h"
-#include <qfileinfo.h>
-#include <qdir.h>
+#include <tqfileinfo.h>
+#include <tqdir.h>
#include "kvi_tal_popupmenu.h"
-#include <qcursor.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
+#include <tqcursor.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
#ifdef COMPILE_ZLIB_SUPPORT
#include <zlib.h>
#endif
-#include <qtextcodec.h>
+#include <tqtextcodec.h>
#include "kvi_styled_controls.h"
-#include <qdatetimeedit.h>
-#include <qlineedit.h>
-#include <qlabel.h>
+#include <tqdatetimeedit.h>
+#include <tqlineedit.h>
+#include <tqlabel.h>
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<int> 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("<nobr><font color=\"%1\"><b>").arg(KVI_OPTION_COLOR(KviOption_colorCaptionTextActive).name().ascii());
+ m_szHtmlActiveCaption = TQString("<nobr><font color=\"%1\"><b>").tqarg(TQString(KVI_OPTION_COLOR(KviOption_colorCaptionTextActive).name()).ascii());
m_szHtmlActiveCaption.append(m_szPlainTextCaption);
m_szHtmlActiveCaption.append("</b></font></nobr>");
- m_szHtmlInactiveCaption = QString("<nobr><font color=\"%1\"><b>").arg(KVI_OPTION_COLOR(KviOption_colorCaptionTextInactive).name().ascii());
+ m_szHtmlInactiveCaption = TQString("<nobr><font color=\"%1\"><b>").tqarg(TQString(KVI_OPTION_COLOR(KviOption_colorCaptionTextInactive).name()).ascii());
m_szHtmlInactiveCaption.append(m_szPlainTextCaption);
m_szHtmlInactiveCaption.append("</b></font></nobr>");
}
@@ -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 <qtabwidget.h>
-#include <qdatetime.h>
+#include <tqtabwidget.h>
+#include <tqdatetime.h>
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 <qsplitter.h>
-#include <qlayout.h>
-#include <qdir.h>
+#include <tqsplitter.h>
+#include <tqlayout.h>
+#include <tqdir.h>
//#include "kvi_debug.h"
#include "kvi_locale.h"
@@ -35,9 +35,9 @@
#ifdef COMPILE_ZLIB_SUPPORT
#include <zlib.h>
#endif
-#include <qtextcodec.h>
+#include <tqtextcodec.h>
-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:
- <boolean> $mask.match(<wildcard_mask:string>,<fixed_mask:string>)
+ <boolean> $tqmask.match(<wildcard_tqmask:string>,<fixed_tqmask:string>)
@description:
- Returns 1 if the <wildcard_mask> matches <fixed_mask> and 0 otherwise.
- <wildcard_mask> can obviously contain wildcards ('*' and '?').
+ Returns 1 if the <wildcard_tqmask> matches <fixed_tqmask> and 0 otherwise.
+ <wildcard_tqmask> 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:
- <string> $mask.nick(<mask:string>)
+ <string> $tqmask.nick(<tqmask:string>)
@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:
- <string> $mask.user(<mask:string>)
+ <string> $tqmask.user(<tqmask:string>)
@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:
- <string> $mask.host(<mask:string>)
+ <string> $tqmask.host(<tqmask:string>)
@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:
- <boolean> $mask.hasNumericHost(<mask: string>)
+ <boolean> $tqmask.hasNumericHost(<tqmask: string>)
@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 <qdatastream.h>
-#include <qvaluelist.h>
+#include <tqdatastream.h>
+#include <tqvaluelist.h>
#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 <qtextcodec.h>
+#include <tqtextcodec.h>
#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 <qdatastream.h>
-#include <qvaluelist.h>
+#include <tqdatastream.h>
+#include <tqvaluelist.h>
#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<KviQCString> allApps = g_pApp->dcopClient() ->registeredApplications();
- QValueList<KviQCString>::iterator iterator;
- KviQCString sz = szApp.local8Bit();
+ TQValueList<KviTQCString> allApps = g_pApp->dcopClient() ->registeredApplications();
+ TQValueList<KviTQCString>::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 <qtextcodec.h>
+#include <tqtextcodec.h>
-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://<filepath> 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 <qdatastream.h>
-#include <qvaluelist.h>
+#include <tqdatastream.h>
+#include <tqvaluelist.h>
#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 <qfileinfo.h>
-#include <qtextcodec.h>
+#include <tqfileinfo.h>
+#include <tqtextcodec.h>
#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 <stdio.h>
#include <stdlib.h>
-#include <qstring.h>
+#include <tqstring.h>
#ifdef COMPILE_ON_WINDOWS
#include <windows.h>
@@ -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 <qtextcodec.h>
+#include <tqtextcodec.h>
#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 <qmessagebox.h>
-#include <qdir.h>
-#include <qpushbutton.h>
+#include <tqmessagebox.h>
+#include <tqdir.h>
+#include <tqpushbutton.h>
#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;
// <description>SERVER:<server:port>GROUP:<network>
- 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("<center><b>Welcome!</b><br><br>This wizard will guide you in the process of " \
"downloading a list of IRC servers. Please click \"<b>Next</b>\" to begin the operation.</center>"));
addPage(l,capt);
KviTalVBox * vb = new KviTalVBox(this);
- l = new QLabel(vb);
+ l = new TQLabel(vb);
l->setText(__tr2qs("<center>Here you can modify the URL that the list will be downloaded from. In most cases the default URL is acceptable.</center>"));
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 <kvi_tal_wizard.h>
-#include <qlineedit.h>
-#include <qlabel.h>
+#include <tqlineedit.h>
+#include <tqlabel.h>
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<qcursor.h>
-#include<qdatetime.h>
-#include<qtimer.h>
+#include<tqcursor.h>
+#include<tqdatetime.h>
+#include<tqtimer.h>
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<qobject.h>
-#include<qcursor.h>
-#include<qdatetime.h>
-#include<qtimer.h>
+#include<tqobject.h>
+#include<tqcursor.h>
+#include<tqdatetime.h>
+#include<tqtimer.h>
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 <Carbon/Carbon.h>
// 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<qapplication.h>
+#include<tqapplication.h>
#include<X11/Xlib.h>
#include<X11/Xutil.h>
#include<X11/extensions/scrnsaver.h>
#ifdef COMPILE_USE_QT4
- #include <qdesktopwidget.h>
+ #include <tqdesktopwidget.h>
#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 <qx11info_x11.h>
+ #include <tqx11info_x11.h>
#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 <irc_context_id> 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 <qsplitter.h>
+#include <tqsplitter.h>
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 <qapplication.h>
-#include <qpainter.h>
-#include <qimage.h>
-#include <qdesktopwidget.h>
-#include <qtooltip.h>
+#include <tqapplication.h>
+#include <tqpainter.h>
+#include <tqimage.h>
+#include <tqdesktopwidget.h>
+#include <tqtooltip.h>
#ifdef COMPILE_USE_QT4
- #define QPopupMenu Q3PopupMenu
- #include <q3popupmenu.h>
+ #define TQPopupMenu Q3PopupMenu
+ #include <tq3popupmenu.h>
#else
- #include <qpopupmenu.h>
+ #include <tqpopupmenu.h>
#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 <qwidget.h>
-#include <qrect.h>
-#include <qtimer.h>
-#include <qpixmap.h>
-#include <qimage.h>
-#include <qfont.h>
-#include <qcolor.h>
-#include <qlineedit.h>
+#include <tqwidget.h>
+#include <tqrect.h>
+#include <tqtimer.h>
+#include <tqpixmap.h>
+#include <tqimage.h>
+#include <tqfont.h>
+#include <tqcolor.h>
+#include <tqlineedit.h>
#include "kvi_qstring.h"
#include "kvi_pointerlist.h"
#include "kvi_time.h"
#ifdef COMPILE_USE_QT4
- #define QSimpleRichText Q3SimpleRichText
- #define QPopupMenu Q3PopupMenu
- #include <q3popupmenu.h>
- #include <q3simplerichtext.h>
+ #define TQSimpleRichText Q3SimpleRichText
+ #define TQPopupMenu Q3PopupMenu
+ #include <tq3popupmenu.h>
+ #include <tq3simplerichtext.h>
#else
- #include <qsimplerichtext.h>
+ #include <tqsimplerichtext.h>
#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 <q3popupmenu.h>
- #include <q3simplerichtext.h>
+ #include <tq3popupmenu.h>
+ #include <tq3simplerichtext.h>
#else
- #include <qpopupmenu.h>
- #include <qsimplerichtext.h>
+ #include <tqpopupmenu.h>
+ #include <tqsimplerichtext.h>
#endif
- #include <qpainter.h>
+ #include <tqpainter.h>
#include "notifiermessage.h"
#include "notifierwindow.h"
@@ -50,14 +50,14 @@
#include "kvi_options.h"
#include "kvi_userinput.h"
-#include <qapplication.h>
-#include <qimage.h>
-#include <qdesktopwidget.h>
-#include <qtooltip.h>
-#include <qevent.h>
-#include <qpen.h>
-#include <qfontmetrics.h>
-#include <qregexp.h>
+#include <tqapplication.h>
+#include <tqimage.h>
+#include <tqdesktopwidget.h>
+#include <tqtooltip.h>
+#include <tqevent.h>
+#include <tqpen.h>
+#include <tqfontmetrics.h>
+#include <tqregexp.h>
#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;i<NUM_OLD_COLORS;i++)
{
KviStr szKey;
szKey.sprintf("OldTextColor%d",i + 1);
- m_clrOldText[i] = cfg.readColorEntry(szKey.ptr(),QColor(90,90,90));
+ m_clrOldText[i] = cfg.readColorEntry(szKey.ptr(),TQColor(90,90,90));
}
m_iBlinkTimeout = cfg.readIntEntry("BlinkTimeout",650);
@@ -126,24 +126,24 @@ KviNotifierWindow::KviNotifierWindow()
m_iInputHeight = cfg.readIntEntry("InputHeight",20);
if(m_iInputHeight < 10)m_iInputHeight = 10;
- setBackgroundMode(Qt::NoBackground);
+ setBackgroundMode(TQt::NoBackground);
#ifdef COMPILE_USE_QT4
- setFocusPolicy(Qt::NoFocus);
+ setFocusPolicy(TTQ_NoFocus);
#else
- setFocusPolicy(QWidget::NoFocus);
+ setFocusPolicy(TQ_NoFocus);
#endif
setMouseTracking(true);
//setCursor(m_cursor);
hide();
- m_pLineEdit = new QLineEdit(this);
+ m_pLineEdit = new TQLineEdit(this);
m_pLineEdit->setGeometry(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()<WDG_BORDER_THICKNESS) {
if (e.x()<WDG_BORDER_THICKNESS) {
//// UP LEFT CORNER ////
- setCursor(Qt::SizeFDiagCursor);
+ setCursor(TQt::SizeFDiagCursor);
if (m_bLeftButtonIsPressed) {
m_bResizing = true;
m_whereResizing = WDG_UPSX;
}
} else if (e.x() > (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()<WDG_BORDER_THICKNESS) {
//// DOWN LEFT CORNER ////
- setCursor(Qt::SizeBDiagCursor);
+ setCursor(TQt::SizeBDiagCursor);
if (m_bLeftButtonIsPressed) {
m_bResizing = true;
m_whereResizing = WDG_DWNSX;
}
} else 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()<WDG_BORDER_THICKNESS) {
//// LEFT SIZE ////
- setCursor(Qt::SizeHorCursor);
+ setCursor(TQt::SizeHorCursor);
if (m_bLeftButtonIsPressed) {
m_bResizing = true;
m_whereResizing = WDG_SX;
}
} 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("<","&lt;");
- html.replace(">","&gt;");
+ TQString html = txt;
+ html.tqreplace("<","&lt;");
+ html.tqreplace(">","&gt;");
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 <qbitmap.h>
-#include <qcolor.h>
-#include <qcursor.h>
-#include <qdatetime.h>
-#include <qfont.h>
-#include <qimage.h>
-#include <qlineedit.h>
-#include <qpixmap.h>
-#include <qrect.h>
-#include <qtimer.h>
-#include <qwidget.h>
+#include <tqbitmap.h>
+#include <tqcolor.h>
+#include <tqcursor.h>
+#include <tqdatetime.h>
+#include <tqfont.h>
+#include <tqimage.h>
+#include <tqlineedit.h>
+#include <tqpixmap.h>
+#include <tqrect.h>
+#include <tqtimer.h>
+#include <tqwidget.h>
#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 <qbrush.h>
-#include <qcolor.h>
-#include <qpainter.h>
+#include <tqbrush.h>
+#include <tqcolor.h>
+#include <tqpainter.h>
/*
#ifdef QT3_SUPPORT
#include <Q3Painter>
#else
- #include <qpainter.h>
+ #include <tqpainter.h>
#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 <qevent.h>
-#include <qrect.h>
-#include <qpoint.h>
-#include <qpixmap.h>
+#include <tqevent.h>
+#include <tqrect.h>
+#include <tqpoint.h>
+#include <tqpixmap.h>
#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 <qpainter.h>
+#include <tqpainter.h>
-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 <qsize.h>
-#include <qrect.h>
-#include <qpixmap.h>
+#include <tqsize.h>
+#include <tqrect.h>
+#include <tqpixmap.h>
-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 <qrect.h>
-#include <qpainter.h>
+#include <tqrect.h>
+#include <tqpainter.h>
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 <qevent.h>
-#include <qpainter.h>
-#include <qbrush.h>
-#include <qcolor.h>
-#include <qfontmetrics.h>
+#include <tqevent.h>
+#include <tqpainter.h>
+#include <tqbrush.h>
+#include <tqcolor.h>
+#include <tqfontmetrics.h>
#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<KviWindow *, KviNotifierWindowTab *>::Iterator tab;
+ TQMap<KviWindow *, KviNotifierWindowTab *>::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<KviWindow *, KviNotifierWindowTab *>::Iterator tab;
+ TQMap<KviWindow *, KviNotifierWindowTab *>::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<KviNotifierWindowTab> tabIterator (m_tabPtrList);
- //m_tabPtrList.findRef(m_tabMap[m_pTabFocused->wnd()]);
+ //m_tabPtrList.tqfindRef(m_tabMap[m_pTabFocused->wnd()]);
-// QMap<KviWindow *, KviNotifierWindowTab *>::Iterator tab;
+// TQMap<KviWindow *, KviNotifierWindowTab *>::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<KviWindow *, KviNotifierWindowTab *>::Iterator tab;
+ TQMap<KviWindow *, KviNotifierWindowTab *>::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 <qfont.h>
-#include <qmap.h>
-#include <qobject.h>
-#include <qpixmap.h>
-#include <qpoint.h>
-#include <qrect.h>
+#include <tqfont.h>
+#include <tqmap.h>
+#include <tqobject.h>
+#include <tqpixmap.h>
+#include <tqpoint.h>
+#include <tqrect.h>
#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<KviNotifierMessage> * 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<KviNotifierMessage> * 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<KviWindow *, KviNotifierWindowTab *> m_tabMap;
+ TQMap<KviWindow *, KviNotifierWindowTab *> m_tabMap;
KviPointerList<KviNotifierWindowTab> m_tabPtrList;
KviPointerList<KviNotifierWindowTab> 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 <qiconset.h>
+#include <tqiconset.h>
#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 <qpushbutton.h>
+#include <tqpushbutton.h>
#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 <qbuttongroup.h>
+#include <tqbuttongroup.h>
#include "class_buttongroup.h"
-#include <qradiobutton.h>
+#include <tqradiobutton.h>
#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 <qbuttongroup.h>
+#include <tqbuttongroup.h>
#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 <qcheckbox.h>
+#include <tqcheckbox.h>
#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 <qlineedit.h>
-#include <qstring.h>
+#include <tqlineedit.h>
+#include <tqstring.h>
/*
@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",&params);
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 <qcombobox.h>
+#include <tqcombobox.h>
#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 <qdialog.h>
+#include <tqdialog.h>
/*
@@ -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 <QDockWidget>
- #define QT_DOCK_WINDOW QDockWidget
+ #include <TQDockWidget>
+ #define TQT_DOCK_WINDOW TQDockWidget
#else
- #include <qdockwindow.h>
- #define QT_DOCK_WINDOW QDockWindow
+ #include <tqdockwindow.h>
+ #define TQT_DOCK_WINDOW TQDockWindow
#endif
-#include <qlayout.h>
+#include <tqlayout.h>
/*
@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(<widget:hobject>)
- Adds <widget> to the internal layout of this dock window.[br]
+ Adds <widget> 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: <string> $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 <qstringlist.h>
+#include <tqstringlist.h>
// 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 <qfile.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
#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(<text:String>)
Sets the group box title to <text>.
@@ -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: <string> $alignment()
- Returns the alignment of the group box title.
- !fn: $setAlignment(<alignment:string>)
- Set the alignment of the groupbox; Valid values are Left,Right,HCenter.
+ !fn: <string> $tqalignment()
+ Returns the tqalignment of the group box title.
+ !fn: $tqsetAlignment(<tqalignment:string>)
+ Set the tqalignment of the groupbox; Valid values are Left,Right,HCenter.
!fn: $setOrientation<orientation:string>
- 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(<columns:integer>,<orientation:string>)
- Enables the automatic layout management. The children are arranged in n columns with the specified orientation.[br]
- Valid values for <orientation> are: Horizontal, Vertical.
+ Enables the automatic tqlayout management. The tqchildren are arranged in n columns with the specified orientation.[br]
+ Valid values for <orientation> 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(<spacing:uint>)
Sets the default spacing of the widgets in pixels
!fn: $setMargin(<margin:uint>)
- 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(<widget:hobject>,<stretch:uint>)
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 <qfont.h>
-#include <qpixmap.h>
-#include <qmessagebox.h>
+#include <tqfont.h>
+#include <tqpixmap.h>
+#include <tqmessagebox.h>
#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(<text:string>)
Sets the text to be displayed by the label.
@@ -142,17 +142,17 @@ const int frame_cod[] = {
Sets auto-resize ability to enabled (if <benabled> is 1) or disabled
(if <benabled> 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: <string> $alignment()
- Returns a string containing alignment flags that are set for
+ !fn: <string> $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(<flag1:string>, <flag2:string>, ...)
- This function sets alignment flags, given as parameters, for
+ See [classfnc]$tqsetAlignment[/classfnc]() for explanation of all
+ tqalignment flags.
+ !fn: $tqsetAlignment(<flag1:string>, <flag2:string>, ...)
+ 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(<flag1>, <flag2>, ...)
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(<image_id>)
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 <qlabel.h>
+#include <tqlabel.h>
#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(<widget:object widget>,<row:uint>,<column:uint>)
- Adds a widget to this layout placing it at position <row>,<column> in the grid
+ Adds a widget to this tqlayout placing it at position <row>,<column> in the grid
!fn: $addMultiCellWidget(<widget:object widget>,<start_row:uint>,<end_row:uint>,<start_col:uint>,<end_col:uint>)
- Adds a widget to this layout spanning multiple grid cells
+ Adds a widget to this tqlayout spanning multiple grid cells
!fn: $setRowStretch(<row:uint>,<stretch:uint>)
- Sets the stretch value for a particular row of this layout. The <stretch_value>
+ Sets the stretch value for a particular row of this tqlayout. The <stretch_value>
must be a positive integer. The rows with bigger stretch values will take more space
- in the layout.
+ in the tqlayout.
!fn: $setColStretch(<column:uint>,<stretch:uint>)
- Sets the stretch value for a particular column in this layout. The <stretch_value>
+ Sets the stretch value for a particular column in this tqlayout. The <stretch_value>
must be a positive integer. The rows with bigger stretch values will take more space
- in the layout.
+ in the tqlayout.
!fn: $addRowSpacing(<row:uint>,<spacing:uint>)
Sets the minimum height of the specified <row> to <spacing> which must be a positive integer
!fn: $addColSpacing(<column:uint>,<spacing:uint>)
@@ -78,18 +78,18 @@
!fn: $setSpacing(<spacing:uint>)
Sets the default spacing of the widgets in pixels
!fn: $setMargin(<margin:uint>)
- 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(<resize_mode:string>)
- 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.
<mode> 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 <qlayout.h>
+#include <tqlayout.h>
#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 <qlcdnumber.h>
+#include <tqlcdnumber.h>
#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(<bReadonly:boolean>)
Sets the lineedit to read only mode.
- !fn: $setInputMask(<mask:string>)
- Sets the validation input mask to inputMask.[br]
+ !fn: $setInputMask(<tqmask:string>)
+ 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",&params);
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 <qlineedit.h>
+#include <tqlineedit.h>
#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: <index:integer> $onItemEvent()
This function is called by KVIrc when the current item pointed by the mouse changes and gives in $0 the item index.
- !fn: <array:x,y,width,height> $itemRect(<item:index>)
+ !fn: <array:x,y,width,height> $tqitemRect(<item:index>)
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 <q3header.h>
-#include <qevent.h>
+#include <tq3header.h>
+#include <tqevent.h>
#else
-#include <qheader.h>
+#include <tqheader.h>
#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(<item:object>)
- 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(<item:object>)
- 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(<item:object>,<col:integer>,<text:string>)
@@ -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,&params);
}
-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,&params);
}
-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(<bOpen:boolean>)
- 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: <listviewitem> $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: <listviewitem> $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 <qmainwindow.h>
+//#include <tqmainwindow.h>
#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 <qmenubar.h>
+#include <tqmenubar.h>
#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 <qfile.h>
+#include <tqfile.h>
#ifdef COMPILE_USE_QT4
- #include <q3multilineedit.h>
-#include <QTextStream>
+ #include <tq3multilineedit.h>
+#include <TQTextStream>
-#include <q3stylesheet.h>
+#include <tq3stylesheet.h>
#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 <qtextstream.h>
+ #include <tqtextstream.h>
- #include <qmultilineedit.h>
- #define KviTalMultiLineEdit QMultiLineEdit
- #define QTEXTEDIT_AUTO_ALL QTextEdit::AutoAll
- #define QTEXTEDIT_AUTO_NONE QTextEdit::AutoNone
- #define QTEXTEDIT_AUTO_BULLET_LIST QTextEdit::AutoBulletList
+ #include <tqmultilineedit.h>
+ #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: <boolean> $isRedoAvailable ()
Returns 1(TRUE) if redo is available; otherwise returns 0(FALSE).
- !fn: $setAlignment(<alignment:string>)
- Sets the alignment of the current paragraph to <alignment>. Valid values are:[br]
+ !fn: $tqsetAlignment(<tqalignment:string>)
+ Sets the tqalignment of the current paragraph to <tqalignment>. 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(<vertical_alignment:string>)
- Sets the vertical alignment of the current format to <Valignemnt>. 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(<vertical_tqalignment:string>)
+ Sets the vertical tqalignment of the current format to <Valignemnt>. Valid Values are:[br]
+ - AlignNormal - Normal tqalignment.[br]
- AlignSuperScript - Superscript.[br]
- AlignSubScript - Subscript.
!fn: $setAutoFormatting(<afvalue:string>)
@@ -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 <qpainter.h>
-#include <qpaintdevice.h>
+#include <tqpainter.h>
+#include <tqpaintdevice.h>
#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 <qfile.h>
+#include <tqfile.h>
/*
@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;y<iHedge;y++)
{
- QRgb * dst = (QRgb *)buffer->scanLine(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 <qpixmap.h>
-#include <qimage.h>
+#include <tqpixmap.h>
+#include <tqimage.h>
#ifdef COMPILE_USE_QT4
- #include <QMatrix>
+ #include <TQMatrix>
#else
- #include <qwmatrix.h>
+ #include <tqwmatrix.h>
#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(<B><U>"Windows Options"</B></U>)[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 <qcursor.h>
+#include <tqcursor.h>
#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 <qtimer.h>
+#include <tqtimer.h>
#ifdef COMPILE_USE_QT4
-#include <q3process.h>
+#include <tq3process.h>
#else
-#include <qprocess.h>
+#include <tqprocess.h>
#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 <qtimer.h>
+#include <tqtimer.h>
#include "class_widget.h"
#include "object_macros.h"
#ifdef COMPILE_USE_QT4
-#include <q3process.h>
+#include <tq3process.h>
#else
-#include <qprocess.h>
+#include <tqprocess.h>
#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 <q3progressbar.h>
+#include <tq3progressbar.h>
#define KVI_PROGRESS_BAR Q3ProgressBar
#else
-#include <qprogressbar.h>
-#define KVI_PROGRESS_BAR QProgressBar
+#include <tqprogressbar.h>
+#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 <qprogressbar.h>
+//#include <tqprogressbar.h>
#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 <qradiobutton.h>
+#include <tqradiobutton.h>
#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(<orientation:string>)
Sets the slider's orientation.[br]
- Orientation value can be "Horizontal" or "Vertical".
+ Qt::Orientation value can be "Horizontal" or "Vertical".
!fn: $setTracking(<bTracking:boolean>)
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 <qslider.h>
+#include <tqslider.h>
#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(<reason>)
- This function is called when a connection attempt fails for some reason. <reason> contains
+ This function is called when a connection attempt fails for some reason. <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",&params);
/* 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 <qsocketnotifier.h>
-#include <qtimer.h>
+#include <tqsocketnotifier.h>
+#include <tqtimer.h>
#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 <qspinbox.h>
+#include <tqspinbox.h>
#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 <qspinbox.h>
+#include <tqspinbox.h>
#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 <qtabwidget.h>
+#include <tqtabwidget.h>
#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 <qtextbrowser.h>
+#include <tqtextbrowser.h>
#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 <qtextbrowser.h>
+#include <tqtextbrowser.h>
#include "class_widget.h"
-#include <qfile.h>
+#include <tqfile.h>
#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 <qtoolbutton.h>
+#include <tqtoolbutton.h>
#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 <QMouseEvent>
-#define QT_LEFT_BUTTON Qt::LeftButton
+#include <TQMouseEvent>
+#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(<text>)
Sets the label's text. Reimplemented from internal reasons.
!fn: $setCursorChange(<bEnabled:boolean>)
- 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: <boolean> $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(<spacing:int>)
Sets the default spacing of the widgets in pixels
!fn: $setMargin(<margin:int>)
- 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(<widget:hobject>,<stretch:uint>)
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 <qcursor.h>
-#include <qiconset.h>
-#include <qcolor.h>
-#include <qlayout.h>
-#include <qbitmap.h>
-#include <qmetaobject.h>
+#include <tqcursor.h>
+#include <tqiconset.h>
+#include <tqcolor.h>
+#include <tqlayout.h>
+#include <tqbitmap.h>
+#include <tqmetaobject.h>
#include "class_widget.h"
#include "class_pixmap.h"
#ifdef COMPILE_USE_QT4
- #include <QKeyEvent>
- #include <QDesktopWidget>
+ #include <TQKeyEvent>
+ #include <TQDesktopWidget>
#else
- #include <qwidgetlist.h>
+ #include <tqwidgetlist.h>
#endif
-#include <qwidget.h>
-#include <qtooltip.h>
-#include <qfont.h>
-#include <qvariant.h>
+#include <tqwidget.h>
+#include <tqtooltip.h>
+#include <tqfont.h>
+#include <tqvariant.h>
// 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(<bool erase>)
+ !fn: $tqrepaint(<bool erase>)
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(<x_or_array>,[<y>,<width>,<heigth>])
- Sets the geometry of this widget. <x> and <y> are relative
- to the parent widget or to the desktop (if this widget is
+ Sets the tqgeometry of this widget. <x> and <y> 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(<value>)
Sets the minimum width of this widget to <value>.
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(<value>)
Sets the minimum height of this widget to <value>.
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(<value>)
Sets the maximum width of this widget to <value>.
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(<value>)
Sets the maximum height of this widget to <value>.
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(<x_or_array>[,<y>])
Moves this widget to the coordinate <x> and <y> 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](<x>,<y>,
[classfnc]$width[/classfnc](),[classfnc]$height[/classfnc]()).
!fn: $resize(<w_or_array>,[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<QHelpEvent *>(e);
- QPoint point=helpEvent->pos();
- QString szTooltip;
+ TQHelpEvent *helpEvent = static_cast<TQHelpEvent *>(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,&params);
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,&params);
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,&params);
}
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 <kvi_tal_tooltip.h>
#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 <kvi_tal_wizard.h>
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
#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 <qworkspace.h>
+#include <tqworkspace.h>
#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 <qworkspace.h>
+#include <tqworkspace.h>
#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 <qwidget.h>
+#include <tqwidget.h>
#ifndef COMPILE_USE_QT4
- #include <qobjectlist.h>
- #include <qwidgetlist.h>
+ #include <tqobjectlist.h>
+ #include <tqwidgetlist.h>
#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;idx<list.count();idx++)
{
bool bNameMatch = false;
bool bClassMatch = false;
if( !szName.isEmpty() )
- bNameMatch = KviQString::equalCI(list.at(idx)->name(), 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;idx<list.count();idx++)
{
if( list.at(idx)->isWidgetType() ) {
- 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 <qxml.h>
+#include <tqxml.h>
-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 <qimage.h>
+#include <tqimage.h>
#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 <qwidgetlist.h>
- #include <qobjectlist.h>
+ #include <tqwidgetlist.h>
+ #include <tqobjectlist.h>
#endif
-#include <qdir.h>
+#include <tqdir.h>
#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 <class_name>.[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<void *,KviKvsObject> 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<QString,KviKvsVariant> it(* ob->dataContainer()->dict());
+ KviPointerHashTableIterator<TQString,KviKvsVariant> 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<QString,KviKvsObjectFunctionHandler> it(* pClass->getHandlers());
+ KviPointerHashTableIterator<TQString,KviKvsObjectFunctionHandler> 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<QString,KviKvsObjectClass> it(*KviKvsKernel::instance()->objectController()->classDict());
- KviPointerHashTable<QString,bool> *classdict=new KviPointerHashTable<QString,bool>;
+ KviPointerHashTableIterator<TQString,KviKvsObjectClass> it(*KviKvsKernel::instance()->objectController()->classDict());
+ KviPointerHashTable<TQString,bool> *classdict=new KviPointerHashTable<TQString,bool>;
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<QString,bool> strIt(*classdict);
+ KviPointerHashTableIterator<TQString,bool> 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;i<list.count();i++)
@@ -846,9 +846,9 @@ static bool objects_kvs_fnc_listObjects(KviKvsModuleFunctionCall * cmd)
list.at(i)->isVisible() ? "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;i<list.count();i++)
{
@@ -928,9 +928,9 @@ static void dumpChildObjects(KviWindow *pWnd, QObject *parent, const char *spaci
list.at(i)->name(), 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 <qlayout.h>
-#include <qpushbutton.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
#include "kvi_tal_tooltip.h"
-#include <qevent.h>
+#include <tqevent.h>
#ifdef COMPILE_USE_QT4
- #include <qdesktopwidget.h>
+ #include <tqdesktopwidget.h>
#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 <qdialog.h>
+#include <tqdialog.h>
-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 <qlayout.h>
+#include <tqlayout.h>
#include "kvi_accel.h"
-#include <qlabel.h>
+#include <tqlabel.h>
#include "kvi_tal_vbox.h"
-#include <qsplitter.h>
+#include <tqsplitter.h>
#include "kvi_tal_widgetstack.h"
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
#include "kvi_tal_tooltip.h"
#ifdef COMPILE_USE_QT4
- #include <q3header.h>
+ #include <tq3header.h>
#else
- #include <qheader.h>
- #include <qobjectlist.h>
+ #include <tqheader.h>
+ #include <tqobjectlist.h>
#endif
#include "kvi_tal_popupmenu.h"
-#include <qtoolbutton.h>
-#include <qcheckbox.h>
+#include <tqtoolbutton.h>
+#include <tqcheckbox.h>
#include <kvi_tal_groupbox.h>
-#include <qpainter.h>
-#include <qfont.h>
-#include <qevent.h>
+#include <tqpainter.h>
+#include <tqfont.h>
+#include <tqevent.h>
//extern KviModule * g_pOptionsModule;
-extern KviPointerHashTable<QString,KviOptionsDialog> * g_pOptionsDialogDict;
+extern KviPointerHashTable<TQString,KviOptionsDialog> * 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.<br> Use the icons " \
+ TQString szDialog = __tr2qs_ctx("This dialog contains a set of KVIrc settings.<br> 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 \"<b>OK</b>\" to accept your changes " \
+ TQString szOkCancelButtons = __tr2qs_ctx("When you have finished, click \"<b>OK</b>\" to accept your changes " \
"or \"<b>Cancel</b>\" to discard them. Clicking \"<b>Apply</b>\" will commit your " \
"changes without closing the window.","options");
- QString szFrontText = QString(
+ TQString szFrontText = TQString(
"<table width=\"100%\" height=\"100%\" valign=\"top\" align=\"center\" cellpadding=\"4\">" \
"<tr>" \
"<td bgcolor=\"#303030\" valign=\"top\">" \
@@ -179,13 +179,13 @@ KviOptionsDialog::KviOptionsDialog(QWidget * par,const QString &szGroup)
"</td>" \
"</tr>" \
"</table>"
- ).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("<p>This is the search tool for this options dialog.</p>" \
+ TQString szTip = __tr2qs_ctx("<p>This is the search tool for this options dialog.</p>" \
"<p>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("<b>&nbsp;</b>",vbox,"labgeneraloptions");
+ m_pCategoryLabel = new TQLabel("<b>&nbsp;</b>",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<void *,bool> 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;j<lKeywords.count();j++)
{
#ifdef COMPILE_USE_QT4
- if(szText.find(lKeywords.at(j),0,false) == -1)
+ if(szText.tqfind(lKeywords.at(j),0,false) == -1)
#else
- if(szText.find(*(lKeywords.at(j)),0,false) == -1)
+ if(szText.tqfind(*(lKeywords.at(j)),0,false) == -1)
#endif
{
bOk = false;
@@ -370,35 +370,35 @@ bool KviOptionsDialog::recursiveSearch(KviOptionsListViewItem * pItem,const QStr
bFoundSomethingHere = true;
}
- if(o->inherits("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<KviOptionsWidgetInstanceEntry> * l,const QString &szGroup,bool bNotContainedOnly)
+void KviOptionsDialog::fillListView(KviTalListViewItem * p,KviPointerList<KviOptionsWidgetInstanceEntry> * l,const TQString &szGroup,bool bNotContainedOnly)
{
if(!l)return;
@@ -503,7 +503,7 @@ void KviOptionsDialog::fillListView(KviTalListViewItem * p,KviPointerList<KviOpt
{
// must be in the correct group
// if we want only containers then well.. must be one
- e->bDoInsert = 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,KviPointerList<KviOpt
{
if(e->bIsContainer)
{
- // 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("<b>");
str += "</b>";
@@ -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 <qdialog.h>
+#include <tqdialog.h>
#include "kvi_tal_listview.h"
-#include <qstringlist.h>
+#include <tqstringlist.h>
#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<KviOptionsWidgetInstanceEntry> * l,const QString &szGroup,bool bNotContainedOnly = false);
+ void fillListView(KviTalListViewItem * p,KviPointerList<KviOptionsWidgetInstanceEntry> * l,const TQString &szGroup,bool bNotContainedOnly = false);
//KviOptionsListViewItem * showHiddenChildren(KviTalListViewItem * p,KviPointerList<KviOptionsWidgetInstanceEntry> * 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(KviPointerList<KviOptionsWidg
{
if(e->pWidget)
{
- 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<TQT_BASE_OBJECT_NAME*>(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<KviOptionsWidgetInstanceEntry> * l)
+KviOptionsWidgetInstanceEntry * KviOptionsInstanceManager::findInstanceEntry(const TQObject * ptr,KviPointerList<KviOptionsWidgetInstanceEntry> * 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<KviOptionsWidgetInstanceEntry> * 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<KviOptionsWidgetInstanceEntry> * m_pInstanceTree;
public:
KviPointerList<KviOptionsWidgetInstanceEntry> * 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<KviOptionsWidgetInstanceEntry> * l);
- KviOptionsWidgetInstanceEntry * findInstanceEntry(const QObject * ptr,KviPointerList<KviOptionsWidgetInstanceEntry> * l);
+ KviOptionsWidgetInstanceEntry * findInstanceEntry(const TQObject * ptr,KviPointerList<KviOptionsWidgetInstanceEntry> * l);
void deleteInstanceTree(KviPointerList<KviOptionsWidgetInstanceEntry> * 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 <qsplitter.h>
+#include <tqsplitter.h>
#include "kvi_pointerhashtable.h"
-KviPointerHashTable<QString,KviOptionsDialog> * g_pOptionsDialogDict = 0;
+KviPointerHashTable<TQString,KviOptionsDialog> * 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<QString,KviOptionsDialog>;
+ g_pOptionsDialogDict = new KviPointerHashTable<TQString,KviOptionsDialog>;
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<QString,KviOptionsDialog> it(*g_pOptionsDialogDict);
+ KviPointerHashTableIterator<TQString,KviOptionsDialog> it(*g_pOptionsDialogDict);
KviPointerList<KviOptionsDialog> 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<KviOptionsWidgetInstanceEntry> * l);
KviOptionsWidgetInstanceEntry * findInstanceEntry(const QObject * ptr,KviPointerList<KviOptionsWidgetInstanceEntry> * l);
void deleteInstanceTree(KviPointerList<KviOptionsWidgetInstanceEntry> * 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<KviOptionsWidgetInstanceEntry>;" >> $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(KviPointerList<KviOptionsWidg
{
if(e->pWidget)
{
- 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 <qlayout.h>
+#include <tqlayout.h>
#include "kvi_options.h"
#include "kvi_locale.h"
-#include <qlabel.h>
+#include <tqlabel.h>
-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.<br>" \
"A reasonable value might be 102400 bytes (100 K).</center>","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 <qlayout.h>
+#include <tqlayout.h>
#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 <qradiobutton.h>
+#include <tqradiobutton.h>
-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("<center>This option will enable auto-reconnecting after an unexpected disconnect. " \
"An unexpected disconnect is the <b>termination</b> of a <b>fully connected IRC session</b> " \
- "that was <b>not requested by the user</b> by the means of the QUIT message." \
- "<p><b>Warning:</b> If you use /RAW to send a QUIT message to the server, " \
+ "that was <b>not requested by the user</b> by the means of the TQUIT message." \
+ "<p><b>Warning:</b> 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.<br>" \
@@ -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("<center>Minimum value: <b>0 sec</b><br>Maximum value: <b>86400 sec</b></center>","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("<center>Minimum value: <b>10000 usec</b><br>Maximum value: <b>10000000 usec</b></center>","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("<center><b>Settings for CTCP.</b></center>"\
"<p>The <b>Client-To-Client Protocol</b> (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 <qlayout.h>
+#include <tqlayout.h>
#include "kvi_options.h"
#include "kvi_locale.h"
-#include <qlabel.h>
+#include <tqlabel.h>
/*
@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("<center>Minimum value: <b>0 requests</b><br>Maximum value: <b>10000 requests</b></center>","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("<center>Minimum value: <b>1 sec</b><br>Maximum value: <b>3600 sec</b></center>","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 <qlayout.h>
+#include <tqlayout.h>
#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 <b>0.0.0.0</b>, KVIrc will try to use the first available IPv4 interface</center>","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("<center>This is the fixed address that will be sent with all DCC requests if you enable the option above.</center>","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("<center>You can enable this option if you are behind a router that forwards all or a range of ports.<br>" \
"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.<br>This method is an exclusive alternative to the \"fixed address\" above.<br>" \
- "It might guess the correct address automatically if certain conditions are met (e.g. the IRC server does not mask hostnames).</center>","options"));
+ "It might guess the correct address automatically if certain conditions are met (e.g. the IRC server does not tqmask hostnames).</center>","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.</center>","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<br>"\
"<p>like<b> sound, mediafiles, URL handler </b> etc... " \
"</p>","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 <qlayout.h>
+#include <tqlayout.h>
#include "kvi_options.h"
#include "kvi_locale.h"
-#include <qlabel.h>
+#include <tqlabel.h>
-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("<center>If this option is enabled, the taskbar will also alert for messages which are shown in queries.</center>","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("<center>This option sets the minimum alert level for the taskbar.</center>","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 <qlineedit.h>
-#include <qcheckbox.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
+#include <tqlineedit.h>
+#include <tqcheckbox.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
#include "kvi_tal_tooltip.h"
-#include <qtabwidget.h>
-#include <qcombobox.h>
-#include <qmessagebox.h>
-#include <qtimer.h>
-#include <qvalidator.h>
+#include <tqtabwidget.h>
+#include <tqcombobox.h>
+#include <tqmessagebox.h>
+#include <tqtimer.h>
+#include <tqvalidator.h>
#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("<center>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.</center>","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("<center>Please wait while the avatar is being downloaded</center>","options"),this);
+ m_pOutput = new TQLabel(__tr2qs_ctx("<center>Please wait while the avatar is being downloaded</center>","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 = "<center>";
+ TQString txt = "<center>";
txt += message;
txt += "</center>";
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 = "<center>";
+ TQString msg = "<center>";
msg += __tr2qs_ctx("Please select an avatar image. " \
"The full path to a local file or an image on the Web can be used.<br>" \
"If you wish to use a local image file, click the \"<b>Browse</b>\"" \
@@ -223,30 +223,30 @@ KviAvatarSelectionDialog::KviAvatarSelectionDialog(QWidget * par,const QString &
"The full URL for an image (including <b>http://</b>) can be entered manually.","options");
msg += "</center><br>";
- 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.</center>","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("<center>");
- QString szCenterEnd("</center>");
- QString szTrailing = "<br><br>" + szOptionalCtcpUserInfo + szCenterEnd;
+ TQString szOptionalCtcpUserInfo = __tr2qs_ctx("This field is optional and will appear as part of the CTCP USERINFO reply.","options");
+ TQString szCenterBegin("<center>");
+ TQString szCenterEnd("</center>");
+ TQString szTrailing = "<br><br>" + 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<br>" \
+ TQString szTip = __tr2qs_ctx("Here you can choose your avatar image. It will be visible<br>" \
"by other people that request it. Choose a nice image of yourself,<br>" \
"possibly avoiding obscenity and offending images. It is a good idea<br>" \
"to choose a relatively small file (say 150 Kb max) because<br>" \
@@ -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.<br>" \
"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.<br>" \
+ TQString tmp;
+ KviTQString::sprintf(tmp,__tr2qs_ctx("Failed to download the avatar image.<br>" \
"<b>%Q</b>","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.<br>" \
"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.<br>" \
"Such a big image will not be seen on all the user monitors<br>" \
"and will probably be scaled by the remote clients with poor quality<br>" \
@@ -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 <qdialog.h>
+#include <tqdialog.h>
#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 <qlayout.h>
+#include <tqlayout.h>
#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 <qlayout.h>
+#include <tqlayout.h>
#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 <qcombobox.h>
+#include <tqcombobox.h>
#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 <qlayout.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
#include <string.h>
#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 <qlayout.h>
+#include <tqlayout.h>
#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 <qcombobox.h>
+#include <tqcombobox.h>
-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("<center>This option causes KVIrc to close " \
- "the connection immediately after sending the QUIT message.<br>" \
+ "the connection immediately after sending the TQUIT message.<br>" \
"When this option is disabled, KVIrc will wait for the server " \
"to close the connection.<br>" \
- "Note that if you use this, your QUIT message may be not displayed.</center>","options"));
+ "Note that if you use this, your TQUIT message may be not displayed.</center>","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 <qlayout.h>
+#include <tqlayout.h>
#include "kvi_settings.h"
#include "kvi_options.h"
#include "kvi_locale.h"
-#include <qcombobox.h>
-#include <qlabel.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
#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 <qlayout.h>
+#include <tqlayout.h>
#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 <qcombobox.h>
+#include <tqcombobox.h>
#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 <qlayout.h>
+#include <tqlayout.h>
#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.</center>","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</center>","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("<center>This makes the IRC context display applet show the current lag after the user's nickname (in seconds)</center>","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 <qlayout.h>
+#include <tqlayout.h>
#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 <qlayout.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
#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("<center>This field contains the command to execute to open a local file.<br>" \
"<tt>$0</tt> is used in place of the filename</center>","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("<center>This field contains the command to execute when automatically opening a received file.<br>" \
"<tt>$0</tt> is used in place of the filename</center>","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 <qlineedit.h>
-#include <qpushbutton.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
#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 <qlayout.h>
-#include <qpushbutton.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
#include "kvi_tal_vbox.h"
-#include <qcursor.h>
-#include <qpainter.h>
+#include <tqcursor.h>
+#include <tqpainter.h>
#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 <qcheckbox.h>
-#include <qtoolbutton.h>
+#include <tqcheckbox.h>
+#include <tqtoolbutton.h>
#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 <qlayout.h>
+#include <tqlayout.h>
#include "kvi_tal_tooltip.h"
#include "kvi_tal_listview.h"
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qcheckbox.h>
-#include <qmessagebox.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
+#include <tqcheckbox.h>
+#include <tqmessagebox.h>
#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 = "<center>";
- QString html_center_end = "</center>";
+ TQString html_center_begin = "<center>";
+ TQString html_center_end = "</center>";
- 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 <b>NickServ!service@services.dalnet</b>.<br>" \
"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 <b>NickServ!*@*</b> may be safe to use in this field.","options") + html_center_end);
+ "the tqmask <b>NickServ!*@*</b> 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 <b>msg NickServ identify &lt;yourpassword&gt;</b>.<br>" \
"You can use <b>msg -q</b> 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.<br>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!<br>You must put at least * there.","options"),o);
+ TQMessageBox::warning(this,m,__tr2qs_ctx("The NickServ tqmask can't be empty!<br>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!<br>You must put at least * there.","options"),o);
+ TQMessageBox::warning(this,m,__tr2qs_ctx("The Message Regexp can't be empty!<br>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 <password>") : 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 <password>") : 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)
"</center>","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 <qdialog.h>
+#include <tqdialog.h>
#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 <qlayout.h>
+#include <tqlayout.h>
#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("<p><b>Note:</b><br>The notify list is managed using the \"Registered Users\" settings.</p>","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 = "<center>";
+ TQString tip = "<center>";
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 <qlayout.h>
+#include <tqlayout.h>
#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<br>"\
"<p>like<b> flood, ignore, antispam. </b> " \
"</p>","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 <qlabel.h>
-#include <qlineedit.h>
-#include <qcombobox.h>
-#include <qcheckbox.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqcombobox.h>
+#include <tqcheckbox.h>
#include <kvi_tal_groupbox.h>
#include "kvi_tal_popupmenu.h"
-#include <qcursor.h>
+#include <tqcursor.h>
#include "kvi_tal_tooltip.h"
-#include <qtoolbutton.h>
+#include <tqtoolbutton.h>
-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("<center>This is the list of available proxy servers.<br>" \
+ TQString tiptxt = __tr2qs_ctx("<center>This is the list of available proxy servers.<br>" \
"Right-click on the list to add or remove proxies.</center>","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 <qlayout.h>
+#include <tqlayout.h>
#include "kvi_options.h"
#include "kvi_locale.h"
@@ -34,8 +34,8 @@
#include <kdeversion.h>
#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 <qtoolbutton.h>
-#include <qlineedit.h>
-#include <qcheckbox.h>
+#include <tqtoolbutton.h>
+#include <tqlineedit.h>
+#include <tqcheckbox.h>
#include "kvi_tal_popupmenu.h"
-#include <qcursor.h>
+#include <tqcursor.h>
#include "kvi_tal_tooltip.h"
-#include <qvalidator.h>
-#include <qmessagebox.h>
+#include <tqvalidator.h>
+#include <tqmessagebox.h>
#include "kvi_pointerhashtable.h"
-#include <qcombobox.h>
-#include <qbuttongroup.h>
-#include <qmessagebox.h>
-#include <qinputdialog.h>
-#include <qmessagebox.h>
+#include <tqcombobox.h>
+#include <tqbuttongroup.h>
+#include <tqmessagebox.h>
+#include <tqinputdialog.h>
+#include <tqmessagebox.h>
-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 = "<font size=\"+1\"><b>";
+ TQString szTmp = "<font size=\"+1\"><b>";
szTmp += n->name();
szTmp += "</b></font>";
- 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("<center>This is the <b>username</b> 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.</center>","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.</center>","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("<center>You can specify a \"special\" <b>real name</b> that will be used to login with the servers on this network.<br>" \
@@ -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 <b>PLAIN TEXT</b>.</center>","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("<center>This is the <b>username</b> 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.</center>","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("<center>If this server requires a password, put it in this field, otherwise leave it empty.</center>","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.</center>","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("<center>You can specify a \"special\" <b>real name</b> that will be used to login with this server.<br>" \
@@ -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("<center>This is the default <b>port</b> that this server will be contacted on.<br>Usually <b>6667</b> is OK.</center>","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("<center>This check identifies IPv6 servers.<br>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("<center>This option will cause KVIrc to connect to the IRC server when it is started.</center>","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.</center>","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("<center>This is the <b>proxy</b> that KVIrc will use to connect to thos server.\n" \
@@ -732,13 +732,13 @@ KviServerDetailsWidget::KviServerDetailsWidget(QWidget * par,KviIrcServer * s)
KviPointerList<KviProxy> * 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 = "<font size=\"+1\"><b>irc";
+ TQString szTmp = "<font size=\"+1\"><b>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("<center>This is the list of available IRC servers.<br>" \
+ TQString tiptxt = __tr2qs_ctx("<center>This is the list of available IRC servers.<br>" \
"Right-click on the list to add or remove servers and perform other actions.<br>"\
"Double-click on a item for advanced options.</center>","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("<center>This is the name of the currently selected server or network</center>","options"));
#endif
@@ -1142,33 +1142,33 @@ KviServerOptionsWidget::KviServerOptionsWidget(QWidget * parent)
"(thus your OS <b>must</b> have a working IPv6 stack and you <b>must</b> have an IPv6 connection).</center>","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("<center>This is the default <b>port</b> that this server will be contacted on.<br>Usually <b>6667</b> is OK.</center>","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("<center>Click here to edit advanced options for this entry</center>","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("<center>Hit this button to connect to the currently selected server.</center>","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<QString,KviIrcServerDataBaseRecord> it(*(g_pIrcServerDataBase->recordDict()));
+ KviPointerHashTableIterator<TQString,KviIrcServerDataBaseRecord> 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 <qdialog.h>
-#include <qbuttongroup.h>
-#include <qtabwidget.h>
+#include <tqdialog.h>
+#include <tqbuttongroup.h>
+#include <tqtabwidget.h>
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 <qlabel.h>
-#include <qpushbutton.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
#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;i<cnt;i++)
{
- QString t = m_pSoundSystemBox->text(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;i<cnt;i++)
{
- QString t = m_pMediaPlayerBox->text(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 <qcombobox.h>
-#include <qpushbutton.h>
+#include <tqcombobox.h>
+#include <tqpushbutton.h>
#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 <qlayout.h>
+#include <tqlayout.h>
#include <kvi_tal_groupbox.h>
#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 <qcombobox.h>
+#include <tqcombobox.h>
#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 <qdir.h>
-#include <qmessagebox.h>
+#include <tqdir.h>
+#include <tqmessagebox.h>
-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("<b>Note:</b> You need to restart KVirc to apply a language changing","options"),this);
+ TQLabel * l = new TQLabel(__tr2qs_ctx("<b>Note:</b> 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 <qcombobox.h>
+#include <tqcombobox.h>
#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 <qlayout.h>
-#include <qcursor.h>
+#include <tqlayout.h>
+#include <tqcursor.h>
#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<QString,KviTextIcon> it(*(g_pTextIconManager->textIconDict()));
+ KviPointerHashTableIterator<TQString,KviTextIcon> 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 <qtoolbutton.h>
+#include <tqtoolbutton.h>
#include "kvi_tal_popupmenu.h"
#include "kvi_tal_hbox.h"
#ifdef COMPILE_USE_QT4
-#include <q3table.h>
+#include <tq3table.h>
#define KviTalTable Q3Table
#define KviTalTableItem Q3TableItem
#else
-#include <qtable.h>
-#define KviTalTable QTable
-#define KviTalTableItem QTableItem
+#include <tqtable.h>
+#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 <qlayout.h>
+#include <tqlayout.h>
#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<br>"\
"<p>like<b> away, lag and logging system. </b> " \
"</p>","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 <qlayout.h>
+#include <tqlayout.h>
#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 <qcombobox.h>
+#include <tqcombobox.h>
#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 <qlayout.h>
+#include <tqlayout.h>
#include "kvi_options.h"
#include "kvi_locale.h"
-#include <qlabel.h>
+#include <tqlabel.h>
-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 <qlayout.h>
+#include <tqlayout.h>
#include "kvi_options.h"
#include "kvi_locale.h"
-#include <qlabel.h>
+#include <tqlabel.h>
-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 <qlayout.h>
+#include <tqlayout.h>
#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 <qcombobox.h>
+#include <tqcombobox.h>
#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<QString,KviPerlInterpreter> * g_pInterpreters = 0;
+static KviPointerHashTable<TQString,KviPerlInterpreter> * 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<QString,KviPerlInterpreter> it(*g_pInterpreters);
+ KviPointerHashTableIterator<TQString,KviPerlInterpreter> 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<QString,KviPerlInterpreter>(17,false);
+ g_pInterpreters = new KviPointerHashTable<TQString,KviPerlInterpreter>(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 <qstringlist.h>
+#include <tqstringlist.h>
#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 (<DATA>) {
$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 <qmessagebox.h>
-#include <qdir.h>
-#include <qsplitter.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qtooltip.h>
+#include <tqmessagebox.h>
+#include <tqdir.h>
+#include <tqsplitter.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqtooltip.h>
#include "kvi_pointerhashtable.h"
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
#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("<center><b>Visible text</b><br>May contain identifiers that will be evaluated at popup call time.<br>For labels, this text can contain also limited HTML tags.</center>"));
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("<center><b>Boolean condition</b><br>Will be evaluated at popup call time in order to decide if this entry has to be shown.<br>An empty condition evaluates to true.</center>"));
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("<center><b>Icon identifier</b><br>May be an internal icon ID, an absolute path or a relative path.<br>Portable scripts should never use absolute paths.</center>"));
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("<center><b>External menu name</b><br>This allows to nest externally defined popup menus. The popup menu with the specified name will be looked up at menu setup time.</center>"));
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("<center><b>Item id</b><br>This will allow you to use delpopupitem later.</center>"));
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<QString,KviKvsPopupMenu> * a = KviKvsPopupManager::instance()->popupDict();
+ const KviPointerHashTable<TQString,KviKvsPopupMenu> * a = KviKvsPopupManager::instance()->popupDict();
if(!a)return;
- KviPointerHashTableIterator<QString,KviKvsPopupMenu> it(*a);
+ KviPointerHashTableIterator<TQString,KviKvsPopupMenu> 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<QString,KviKvsPopupMenu> copy(*(KviKvsPopupManager::instance()->popupDict()));
+ KviPointerHashTable<TQString,KviKvsPopupMenu> 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<QString,KviKvsPopupMenu> iter(copy);
+ KviPointerHashTableIterator<TQString,KviKvsPopupMenu> 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("<nobr><font color=\"");
- static QString p2("\"><b>");
- static QString p3("</b></font></nobr>");
+ static TQString p1("<nobr><font color=\"");
+ static TQString p2("\"><b>");
+ static TQString p3("</b></font></nobr>");
m_szHtmlActiveCaption = p1;
m_szHtmlActiveCaption += KVI_OPTION_COLOR(KviOption_colorCaptionTextActive).name();
@@ -1421,7 +1421,7 @@ void KviPopupEditorWindow::loadProperties(KviConfig *cfg)
{
/*
#ifdef COMPILE_SCRIPTTOOLBAR
- QValueList<int> def;
+ TQValueList<int> 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 <qwidget.h>
+#include <tqwidget.h>
#include "kvi_tal_listview.h"
-#include <qlineedit.h>
+#include <tqlineedit.h>
#include "kvi_tal_popupmenu.h"
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
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 <qmessagebox.h>
-#include <qsplitter.h>
-#include <qlayout.h>
+#include <tqmessagebox.h>
+#include <tqsplitter.h>
+#include <tqlayout.h>
#include "kvi_tal_vbox.h"
#include "kvi_tal_popupmenu.h"
-#include <qtooltip.h>
-#include <qinputdialog.h>
-#include <qpushbutton.h>
+#include <tqtooltip.h>
+#include <tqinputdialog.h>
+#include <tqpushbutton.h>
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("<nobr><font color=\"");
- static QString p2("\"><b>");
- static QString p3("</b></font></nobr>");
+ static TQString p1("<nobr><font color=\"");
+ static TQString p2("\"><b>");
+ static TQString p3("</b></font></nobr>");
m_szHtmlActiveCaption = p1;
m_szHtmlActiveCaption += KVI_OPTION_COLOR(KviOption_colorCaptionTextActive).name();
@@ -551,7 +551,7 @@ void KviRawEditorWindow::loadProperties(KviConfig *cfg)
{
/*
#ifdef COMPILE_SCRIPTTOOLBAR
- QValueList<int> def;
+ TQValueList<int> 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 <qwidget.h>
+#include <tqwidget.h>
#include "kvi_tal_listview.h"
-#include <qlineedit.h>
+#include <tqlineedit.h>
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 <channel:string> [netmask:string]
+ regchan.add <channel:string> [nettqmask:string]
@description:
- Registers the <channel> with the specified [netmask].
- [netmask] can be a full network name or a wildcard string
+ Registers the <channel> 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] <channel:string> <network:string>
@description:
Unregisters the channel named <channel> that best matches <network>
- with its netmask.[br]
+ with its nettqmask.[br]
If no match for <channel>/<network> is found in the database then
a warning is printed unless -q is used.[br]
If -e is specified then <network> is not matched against the
- netmasks in the database but is compared directly. This means
- that <network> must be exactly the netmask used to register a channel.
+ nettqmasks in the database but is compared directly. This means
+ that <network> 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 <network> is not matched against the
- netmasks in the database but is compared directly. This means
- that <network> must be exactly the netmask used to register a channel.
+ nettqmasks in the database but is compared directly. This means
+ that <network> 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:
- <array> $regchan.list([<channel_mask:string>],[<network_mask:string>])
+ <array> $regchan.list([<channel_tqmask:string>],[<network_tqmask:string>])
@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 <network_mask> is a wildcard string that will match
+ Please note that <network_tqmask> 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<const char *,KviRegisteredChannelList> * d = g_pRegisteredChannelDataBase->channelDict();
KviPointerHashTableIterator<const char *,KviRegisteredChannelList> 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:
- <boolean> $regchan.find(<channel_name:string>,<netmask:string>)
+ <boolean> $regchan.tqfind(<channel_name:string>,<nettqmask:string>)
@description:
- Returns 1 if the channel identified by <channel_name> and <netmask>
+ Returns 1 if the channel identified by <channel_name> and <nettqmask>
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 <qlayout.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
#ifdef COMPILE_USE_QT4
-#include <q3header.h>
-#include <qevent.h>
-#include <QImageWriter>
-#include <QImageReader>
+#include <tq3header.h>
+#include <tqevent.h>
+#include <TQImageWriter>
+#include <TQImageReader>
#else
-#include <qheader.h>
+#include <tqheader.h>
#endif
#include "kvi_pointerhashtable.h"
-#include <qimage.h>
-#include <qstring.h>
-#include <qcombobox.h>
+#include <tqimage.h>
+#include <tqstring.h>
+#include <tqcombobox.h>
-#include <qstyle.h>
-#include <qpainter.h>
+#include <tqstyle.h>
+#include <tqpainter.h>
#include "kvi_tal_hbox.h"
#include "kvi_tal_vbox.h"
-#include <qinputdialog.h>
+#include <tqinputdialog.h>
#include "wizard.h"
#include "dialog.h"
#ifdef COMPILE_INFO_TIPS
- #include <qtooltip.h>
+ #include <tqtooltip.h>
#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 = "<nobr><b>";
+ TQString szTmp;
+ TQString t = "<nobr><b>";
t += u->name();
t += "</b> [";
szTmp = m_pUser->getProperty("notify");
@@ -108,7 +108,7 @@ KviRegisteredUsersDialogItem::KviRegisteredUsersDialogItem(KviTalListViewItem *
t += m_pUser->getProperty("comment");
}
t += "</font></nobr>";
- 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("<center>This is the list of registered users. " \
+ TQToolTip::add(m_pListView,__tr2qs("<center>This is the list of registered users. " \
"KVIrc can automatically recognize and associate properties to them.<br>" \
"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.</center>"));
#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.<br>All the data associated with the selected registered users will be exported.<br>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.<br>All the data associated with the selected registered users will be exported.<br>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<QString,KviRegisteredUser> * d = g_pLocalRegisteredUserDataBase->userDict();
+ KviPointerHashTable<TQString,KviRegisteredUser> * 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<QString,KviRegisteredUserGroup> * pGroups = g_pLocalRegisteredUserDataBase->groupDict();
+ KviPointerHashTable<TQString,KviRegisteredUserGroup> * pGroups = g_pLocalRegisteredUserDataBase->groupDict();
m_TmpDict.clear();
- for(KviPointerHashTableEntry<QString,KviRegisteredUserGroup> * g = pGroups->firstEntry();g;g = pGroups->nextEntry())
+ for(KviPointerHashTableEntry<TQString,KviRegisteredUserGroup> * 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<QString,KviRegisteredUsersGroupItem> groupItems(5,false);
+ KviPointerHashTable<TQString,KviRegisteredUsersGroupItem> groupItems(5,false);
groupItems.setAutoDelete(false);
- KviPointerHashTable<QString,KviRegisteredUserGroup> * pGroups = g_pLocalRegisteredUserDataBase->groupDict();
+ KviPointerHashTable<TQString,KviRegisteredUserGroup> * 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<QString,KviRegisteredUser> * d = g_pLocalRegisteredUserDataBase->userDict();
+ KviPointerHashTable<TQString,KviRegisteredUser> * 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<QString,QString> * pd = u->propertyDict();
+ KviPointerHashTable<TQString,TQString> * pd = u->propertyDict();
if(pd)
{
if(!f.save(pd->count()))goto write_error;
- for(KviPointerHashTableEntry<QString,QString> * pCur = pd->firstEntry();pCur;pCur = pd->nextEntry())
+ for(KviPointerHashTableEntry<TQString,TQString> * 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<KviIrcMask> * ml = u->maskList();
+ KviPointerList<KviIrcMask> * 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 <qwidget.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
+#include <tqwidget.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
#include "kvi_tal_listview.h"
#include "kvi_tal_listbox.h"
#include "kvi_pointerhashtable.h"
#include "kvi_tal_popupmenu.h"
#ifdef COMPILE_USE_QT4
- #include <q3intdict.h>
- #include <q3simplerichtext.h>
- #define QSimpleRichText Q3SimpleRichText
+ #include <tq3intdict.h>
+ #include <tq3simplerichtext.h>
+ #define TQSimpleRichText Q3SimpleRichText
#else
- #include <qsimplerichtext.h>
- #include <qintdict.h>
+ #include <tqsimplerichtext.h>
+ #include <tqintdict.h>
#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<KviRegisteredUserGroup> m_TmpDict;
#else
- QIntDict<KviRegisteredUserGroup> m_TmpDict;
+ TQIntDict<KviRegisteredUserGroup> 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 <qlayout.h>
-#include <qlabel.h>
-#include <qgroupbox.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqgroupbox.h>
#ifdef COMPILE_USE_QT4
-#include <qevent.h>
-#include <q3header.h>
-#include <q3vbox.h>
+#include <tqevent.h>
+#include <tq3header.h>
+#include <tq3vbox.h>
#else
-#include <qheader.h>
+#include <tqheader.h>
#endif
#include "kvi_pointerhashtable.h"
-#include <qimage.h>
-#include <qstring.h>
-#include <qcombobox.h>
+#include <tqimage.h>
+#include <tqstring.h>
+#include <tqcombobox.h>
-#include <qstyle.h>
-#include <qpainter.h>
+#include <tqstyle.h>
+#include <tqpainter.h>
#include "kvi_tal_hbox.h"
#include "kvi_tal_vbox.h"
-#include <qinputdialog.h>
+#include <tqinputdialog.h>
#include "wizard.h"
#include "dialog.h"
#ifdef COMPILE_INFO_TIPS
- #include <qtooltip.h>
+ #include <tqtooltip.h>
#endif // COMPILE_INFO_TIPS
// kvi_app.cpp
@@ -78,20 +78,20 @@ KviRegisteredUserDataBase * g_pLocalRegisteredUserDataBase; // local copy!
-KviReguserPropertiesDialog::KviReguserPropertiesDialog(QWidget * p,KviPointerHashTable<QString,QString> * dict)
-: QDialog(p,"property_editor",true)
+KviReguserPropertiesDialog::KviReguserPropertiesDialog(TQWidget * p,KviPointerHashTable<TQString,TQString> * 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<QString,QString> it(*m_pPropertyDict);
+ KviPointerHashTableIterator<TQString,TQString> 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;i<n;i++)
{
- QString szName = m_pTable->text(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.<br>It can contain the wildcard characters '*' and '?'."),this);
- //l->setAlignment(Qt::AlignCenter);
+ TQLabel * l = new TQLabel(__tr2qs("Insert a tqmask for this user.<br>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("<center>This the <b>nickname</b> that will match this user, default value is the registered name.</center>"));
+ TQToolTip::add(m_pNickEdit,__tr2qs("<center>This the <b>nickname</b> that will match this user, default value is the registered name.</center>"));
#endif
- l = new QLabel("<center><b>!</b></center>",b);
- l->setAlignment(Qt::AlignCenter);
+ l = new TQLabel("<center><b>!</b></center>",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("<center>This the <b>username</b> that will match this user. <b>*</b> will match any username.</center>"));
+ TQToolTip::add(m_pUserEdit,__tr2qs("<center>This the <b>username</b> that will match this user. <b>*</b> will match any username.</center>"));
#endif
- l = new QLabel("<center><b>@</b></center>",b);
- l->setAlignment(Qt::AlignCenter);
+ l = new TQLabel("<center><b>@</b></center>",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("<center>This the <b>hostname</b> that will match this user. <b>*</b> will match any hostname.</center>"));
+ TQToolTip::add(m_pHostEdit,__tr2qs("<center>This the <b>hostname</b> that will match this user. <b>*</b> will match any hostname.</center>"));
#endif
// just a spacer
-// l = new QLabel("<nobr>&nbsp;<nobr>",this);
+// l = new TQLabel("<nobr>&nbsp;<nobr>",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<QString,QString>(17,false);
+ m_pPropertyDict = new KviPointerHashTable<TQString,TQString>(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("<center>You can enter a space separated list of nicknames.</center>"));
+ TQToolTip::add(m_pNotifyCheck,__tr2qs("<center>You can enter a space separated list of nicknames.</center>"));
#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<QString,QString> it(*(r->propertyDict()));
- while(QString *s = it.current())
+ KviPointerHashTableIterator<TQString,TQString> 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<QString,QString> it(*m_pPropertyDict);
- while(QString *s = it.current())
+ KviPointerHashTableIterator<TQString,TQString> 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 <qwidget.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
+#include <tqwidget.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
#include "kvi_tal_listview.h"
#include "kvi_tal_listbox.h"
#include "kvi_pointerhashtable.h"
#include <kvi_tal_tabdialog.h>
#ifdef COMPILE_USE_QT4
-#include <q3table.h>
+#include <tq3table.h>
#define Kvi_Tal_Table Q3Table
#define Kvi_Tal_TableItem Q3TableItem
#else
-#include <qtable.h>
-#define Kvi_Tal_Table QTable
-#define Kvi_Tal_TableItem QTableItem
+#include <tqtable.h>
+#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<QString,QString> * dict);
+ KviReguserPropertiesDialog(TQWidget *p,KviPointerHashTable<TQString,TQString> * dict);
~KviReguserPropertiesDialog();
protected:
#ifdef COMPILE_USE_QT4
Q3Table *m_pTable;
#else
- QTable * m_pTable;
+ TQTable * m_pTable;
#endif
- KviPointerHashTable<QString,QString> * m_pPropertyDict;
- QPushButton * m_pDelButton;
- QPushButton * m_pAddButton;
+ KviPointerHashTable<TQString,TQString> * 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<QString,QString> * m_pPropertyDict;
+ KviPointerHashTable<TQString,TQString> * 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 <qsplitter.h> // FIXME: REmove this!
+#include <tqsplitter.h> // 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] <name> [mask]
+ reguser.add [-r] [-f] [-q] [-g=group] <name> [tqmask]
@description:
Adds a new entry with the specified <name> to the database.[br]
If the database contains an entry with the same <name>, 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 <name> 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 <name> (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] <name> <mask>
+ reguser.addtqmask [-f] <name> <tqmask>
@description:
- Adds a registration mask to the database entry with name <name>.[br]
- The <mask> has the common [doc:irc_masks]irc mask[/doc] format.[br]
- The only restriction on the <mask> 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 <name>.[br]
+ The <tqmask> has the common [doc:irc_tqmasks]irc tqmask[/doc] format.[br]
+ The only restriction on the <tqmask> 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).<br>
- 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 <mask>
+ reguser.deltqmask <tqmask>
@description:
- Removes a mask from the regusers database.[br]
- Since masks are unique in the database , you don't need to pass
- an <user> parameter: if an <user> entry has the <mask>, removing that <mask>
+ Removes a tqmask from the regusers database.[br]
+ Since tqmasks are unique in the database , you don't need to pass
+ an <user> parameter: if an <user> entry has the <tqmask>, removing that <tqmask>
will surely remove it from that <user> 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 <mask> is specified, only entries matching the <mask>
- and the entries with no registration masks are listed.[br]
- Please note that <mask> is a wildcard string that will match
+ If <tqmask> is specified, only entries matching the <tqmask>
+ and the entries with no registration tqmasks are listed.[br]
+ Please note that <tqmask> 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<QString,KviRegisteredUser> * d = g_pRegisteredUserDataBase->userDict();
- KviPointerHashTableIterator<QString,KviRegisteredUser> it(*d);
+ KviPointerHashTable<TQString,KviRegisteredUser> * d = g_pRegisteredUserDataBase->userDict();
+ KviPointerHashTableIterator<TQString,KviRegisteredUser> it(*d);
while(KviRegisteredUser * u = it.current())
{
- KviPointerList<KviIrcMask> * ml = u->maskList();
- if(u->matches(mask) || (ml->count() == 0))
+ KviPointerList<KviIrcMask> * 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 <mask> is specified, only entries matching the <mask>
- and the entries with no registration masks are listed.[br]
- Please note that <mask> is a wildcard string that will match
+ If <tqmask> is specified, only entries matching the <tqmask>
+ and the entries with no registration tqmasks are listed.[br]
+ Please note that <tqmask> 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<QString,KviRegisteredUser> * d = g_pRegisteredUserDataBase->userDict();
- KviPointerHashTableIterator<QString,KviRegisteredUser> it(*d);
+ KviPointerHashTable<TQString,KviRegisteredUser> * d = g_pRegisteredUserDataBase->userDict();
+ KviPointerHashTableIterator<TQString,KviRegisteredUser> it(*d);
while(KviRegisteredUser * u = it.current())
{
- KviPointerList<KviIrcMask> * ml = u->maskList();
- if(u->matches(mask) || (ml->count() == 0))
+ KviPointerList<KviIrcMask> * 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<QString,QString> * pd = u->propertyDict();
+ KviPointerHashTable<TQString,TQString> * pd = u->propertyDict();
if(pd)
{
- KviPointerHashTableIterator<QString,QString> pdit(*pd);
+ KviPointerHashTableIterator<TQString,TQString> 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(<user_mask>)
+ $reguser.match(<user_tqmask>)
@description:
- Returns the name of the first entry matching <user_mask> in the registered user database.[br]
- The <user_mask> has the common [doc:irc_masks]irc mask[/doc] format but can't contain wildcards.[br]
+ Returns the name of the first entry matching <user_tqmask> in the registered user database.[br]
+ The <user_tqmask> 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(<user_mask>)
+ $reguser.exactMatch(<user_tqmask>)
@description:
- Returns the name of the registered user database entry that has <user_mask> in its registration mask list.[br]
- The <user_mask> 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 <user_tqmask> in its registration tqmask list.[br]
+ The <user_tqmask> 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(<user_mask>)
+// $reguser.matches(<user_tqmask>)
// @description:
-// Returns a comma separated list of registered user masks that match <user_mask>.[br]
-// User mask must be in the format <nick>!<user>@<host> , where <user> and
+// Returns a comma separated list of registered user tqmasks that match <user_tqmask>.[br]
+// User tqmask must be in the format <nick>!<user>@<host> , where <user> and
// <host> may contain '*' wildcards.[br]
-// If no registered mask matches the <user_mask> an empty string is returned.[br]
+// If no registered tqmask matches the <user_tqmask> 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(<name>[,<N>])
+ $reguser.tqmask(<name>[,<N>])
@description:
- Returns the <N>th registration mask for the registered user database record identified
- by <name>. If <N> is not given , returns an array of registration masks for that entry.[br]
+ Returns the <N>th registration tqmask for the registered user database record identified
+ by <name>. If <N> is not given , returns an array of registration tqmasks for that entry.[br]
If <name> does not identify a valid entry an empty string is returned;
- if <N> is out of range (or there are no masks at all) , an empty string is returned.[br]
+ if <N> is out of range (or there are no tqmasks at all) , an empty string is returned.[br]
<N> 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(<user_mask>,<property_name>)
+ $reguser.matchProperty(<user_tqmask>,<property_name>)
@description:
Returns the value of the property identified by <property_name> and
- bound to the first entry matched by by <user_mask>.[br]
+ bound to the first entry matched by by <user_tqmask>.[br]
If the property is not set, an empty string is returned.[br]
- If no entry matches <user_mask> this function returns an empty string
+ If no entry matches <user_tqmask> this function returns an empty string
and does not print any error.[br]
[example]
- %property = $reguser.matchProperty(<user_mask>,<property_name>)
+ %property = $reguser.matchProperty(<user_tqmask>,<property_name>)
[/example]
Is actually a shortcut for:[br]
[example]
- %tmp = [fnc]$reguser.match[/fnc](<user_mask>)
+ %tmp = [fnc]$reguser.match[/fnc](<user_tqmask>)
if("%tmp" != "")%property = $reguser.property(%tmp,<property_name>)
[/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 <QDesktopWidget>
+#include <TQDesktopWidget>
#endif
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qwidget.h>
-#include <qlayout.h>
-#include <qvariant.h>
-#include <qframe.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
+#include <tqwidget.h>
+#include <tqlayout.h>
+#include <tqvariant.h>
+#include <tqframe.h>
extern KVIRC_API KviRegisteredUserDataBase * g_pRegisteredUserDataBase;
extern KviPointerList<KviRegistrationWizard> * 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("<p>Welcome to the user registration wizard.<br>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.<br><br>First of all, you must insert an <b>entry name or real name</b> 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.<br>Examples: \"George W Bush\", \"Dubya\".\n</p>" ));
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("<p>A registered user is identified by one or more <b>IRC masks</b>.<br>A mask must be in the following form:<br><b>nickname!username@hostname</b><br>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.<br><br>You can enter at most two masks here, if you wish to add more masks, use the \"<b>Edit</b>\" button in the Registered Users dialog. You must enter at least one mask.</p>"));
+ m_pLabel2 = new TQLabel( m_pPage2);
+ m_pLabel2->setText(__tr2qs("<p>A registered user is identified by one or more <b>IRC tqmasks</b>.<br>A tqmask must be in the following form:<br><b>nickname!username@hostname</b><br>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.<br><br>You can enter at most two tqmasks here, if you wish to add more tqmasks, use the \"<b>Edit</b>\" button in the Registered Users dialog. You must enter at least one tqmask.</p>"));
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("<center><b>!</b></center>");
- 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("<center><b>!</b></center>");
- 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("<center><b>@</b></center>");
- 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("<center><b>@</b></center>");
- 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("<p>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.<br>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.</p>"));
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("<p>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.<br><br>You can enter at most two nicknames here, if you wish to add more nicknames, use the \"<b>Edit</b>\" button in the Registered Users dialog.</p>"));
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("<p>That's it. The user registration has been completed.<br><br>Click \"<b>Finish</b>\" to close this dialog.</p>"));
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 <qstring.h>
-#include <qfile.h>
+#include <tqstring.h>
+#include <tqfile.h>
#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 <kvi_tal_textedit.h>
-#include <qmessagebox.h>
-#include <qdir.h>
-#include <qpushbutton.h>
-#include <qvalidator.h>
-#include <qtextcodec.h>
-#include <qlayout.h>
+#include <tqmessagebox.h>
+#include <tqdir.h>
+#include <tqpushbutton.h>
+#include <tqvalidator.h>
+#include <tqtextcodec.h>
+#include <tqlayout.h>
#include "kvi_tal_hbox.h"
#ifdef COMPILE_ON_WINDOWS
@@ -56,18 +56,18 @@ bool g_bFoundMirc;
#endif
#ifdef COMPILE_USE_QT4
- #include <QDesktopWidget>
+ #include <TQDesktopWidget>
#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 = "<table border=\"0\" cellpadding=\"4\" cellspacing=\"0\" style=\"margin:0px;padding:0px;\" width=\"100%\"><tr><td bgcolor=\"#303030\">" \
+ TQString szHeader = "<table border=\"0\" cellpadding=\"4\" cellspacing=\"0\" style=\"margin:0px;padding:0px;\" width=\"100%\"><tr><td bgcolor=\"#303030\">" \
"<h1><font color=\"#FFFFFF\">KVIrc " KVI_VERSION "</font></h1>" \
"</td></tr></table>";
*/
- QString szHeader = "<h1><font color=\"#FFFFFF\">&nbsp;KVIrc " KVI_VERSION "</font></h1>";
+ TQString szHeader = "<h1><font color=\"#FFFFFF\">&nbsp;KVIrc " KVI_VERSION "</font></h1>";
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("<p>" \
+ TQString szText = __tr2qs("<p>" \
"<h2>Welcome :)</h2>" \
"This is your first time running this version of KVIrc.<br>" \
"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,"<b> </b>");
+ //l = new TQLabel(m_pDirectory->m_pVBox,"<b> </b>");
//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("<center>");
- QString szCenterEnd("</center>");
- QString szTrailing = "<br><br>" + szOptionalCtcpUserInfo + szCenterEnd;
+ TQString szOptionalCtcpUserInfo = __tr2qs("This field is optional and will appear as part of the CTCP USERINFO reply.");
+ TQString szCenterBegin("<center>");
+ TQString szCenterEnd("</center>");
+ TQString szTrailing = "<br><br>" + 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,"<b> </b>");
+ //l = new TQLabel(m_pIdentity->m_pVBox,"<b> </b>");
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.<br>KVIrc cannot run until you complete this procedure.<br><br>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 <qlabel.h>
-#include <qpixmap.h>
-#include <qlineedit.h>
+#include <tqlabel.h>
+#include <tqpixmap.h>
+#include <tqlineedit.h>
#ifdef COMPILE_USE_QT4
-#include <q3buttongroup.h>
+#include <tq3buttongroup.h>
#define KviTalVButtonGroup Q3VButtonGroup
#else
- #include <qvbuttongroup.h>
-#define KviTalVButtonGroup QVButtonGroup
+ #include <tqvbuttongroup.h>
+#define KviTalVButtonGroup TQVButtonGroup
#endif
-#include <qradiobutton.h>
-#include <qcombobox.h>
-#include <qcheckbox.h>
+#include <tqradiobutton.h>
+#include <tqcombobox.h>
+#include <tqcheckbox.h>
#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=<timeout:integer>] [-n=<visible name>] <filename> [user_mask]
+ sharedfile.add [-t=<timeout:integer>] [-n=<visible name>] <filename> [user_tqmask]
@switches:
!sw: -t=<timeout> | --timeout=<timeout>
Specified the timeout after that the share will be automatically removed
@@ -61,8 +61,8 @@ extern KVIRC_API KviSharedFilesManager * g_pSharedFilesManager;
@description:
Adds <filename> 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
<timeout> 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 <visible name:string> <user mask:string> [filesize:integer]
+ sharedfile.remove <visible name:string> <user tqmask:string> [filesize:integer]
@description:
- Removes the shared file that matches <visible name> and <user mask>.
+ Removes the shared file that matches <visible name> and <user tqmask>.
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<QString,KviSharedFileList> it(*(g_pSharedFilesManager->sharedFileListDict()));
+ KviPointerHashTableIterator<TQString,KviSharedFileList> 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 <qsplitter.h>
+#include <tqsplitter.h>
#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<QString,QVariant> dict(17,true);
+ KviPointerHashTable<TQString,TQVariant> 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 <qdatetimeedit.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qsplitter.h>
+#include <tqdatetimeedit.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
+#include <tqsplitter.h>
#include "kvi_tal_hbox.h"
#include "kvi_tal_vbox.h"
-#include <qlayout.h>
-#include <qcheckbox.h>
-#include <qmessagebox.h>
-#include <qfileinfo.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
+#include <tqmessagebox.h>
+#include <tqfileinfo.h>
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<QString,KviSharedFileList> it(*(g_pSharedFilesManager->sharedFileListDict()));
+ KviPointerHashTableIterator<TQString,KviSharedFileList> 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 = "<b>file:/";
+ TQString tmp = "<b>file:/";
tmp += szFile;
tmp += "</b><br>";
- QFileInfo fi(szFile);
+ TQFileInfo fi(szFile);
if(fi.exists())
{
tmp += "<nobr>";
- tmp += __tr2qs_ctx("Size: %1 bytes","filetransferwindow").arg(fi.size());
+ tmp += __tr2qs_ctx("Size: %1 bytes","filetransferwindow").tqarg(fi.size());
tmp += "</nobr><br>";
}
@@ -421,12 +421,12 @@ void KviSharedFilesWindow::rightButtonPressed(KviTalListViewItem *it,const QPoin
tmp += "</nobr>";
#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<int> l(m_pSplitter->sizes());
+// TQValueList<int> 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<int> l;
+// TQValueList<int> 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 <qdialog.h>
+#include <tqdialog.h>
-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 <qsound.h>
+#include <tqsound.h>
#ifdef COMPILE_ON_WINDOWS
#include <mmsystem.h>
#else //!COMPILE_ON_WINDOWS
- #include <qfile.h>
+ #include <tqfile.h>
#include <unistd.h>
#include <errno.h>
@@ -78,12 +78,12 @@
static KviSoundPlayer * g_pSoundPlayer = 0;
KviSoundPlayer::KviSoundPlayer()
-: QObject()
+: TQObject()
{
m_pThreadList = new KviPointerList<KviSoundThread>;
m_pThreadList->setAutoDelete(true);
- m_pSoundSystemDict = new KviPointerHashTable<QString,SoundSystemRoutine>(17,false);
+ m_pSoundSystemDict = new KviPointerHashTable<TQString,SoundSystemRoutine>(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<QString,SoundSystemRoutine> it(*m_pSoundSystemDict);
+ KviPointerHashTableIterator<TQString,SoundSystemRoutine> 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 <qobject.h>
+#include <tqobject.h>
#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<QString> * l);
- void getAvailableSoundSystems(QStringList * l);
+ //void getAvailableSoundSystems(KviPointerList<TQString> * 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<KviSoundThread> * m_pThreadList;
- KviPointerHashTable<QString,SoundSystemRoutine> * m_pSoundSystemDict;
+ KviPointerHashTable<TQString,SoundSystemRoutine> * 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 <qsplitter.h>
+#include <tqsplitter.h>
KviPointerList<KviSocketSpyWindow> * 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 <qsplitter.h>
+#include <tqsplitter.h>
//#include "kvi_module.h"
extern KviPointerList<KviSocketSpyWindow> * 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("<nobr><font color=\"%s\"><b>Socket Spy</b></font> " \
"<font color=\"%s\">[IRC Context %u]</font></nobr>"),
- 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("<nobr><font color=\"%s\"><b>Socket Spy</b></font> " \
"<font color=\"%s\">[IRC Context %u]</font></nobr>"),
- 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 <qtimer.h>
-#include <qstringlist.h>
-#include <qclipboard.h>
+#include <tqtimer.h>
+#include <tqstringlist.h>
+#include <tqclipboard.h>
extern KviPointerList<SPasteController> * 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 <qobject.h>
-#include <qstringlist.h>
-#include <qfile.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
+#include <tqfile.h>
-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 <qfile.h>
-#include <qclipboard.h>
+#include <tqfile.h>
+#include <tqclipboard.h>
#ifndef COMPILE_ON_WINDOWS
#include <unistd.h>
@@ -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 <qregexp.h>
-#include <qclipboard.h>
+#include <tqregexp.h>
+#include <tqclipboard.h>
#ifdef COMPILE_SSL_SUPPORT
#include <openssl/evp.h>
@@ -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:
- <bool> $str.contains(<container:string>,<tofind:string>)
+ <bool> $str.tqcontains(<container:string>,<totqfind:string>)
@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:
- <bool> $str.containsnocase(<container:string>,<tofind:string>)
+ <bool> $str.containsnocase(<container:string>,<totqfind:string>)
@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:
- <int> $str.find(<findIn:string>,<tofind:string>[,ocurrence:int])
+ <int> $str.tqfind(<findIn:string>,<totqfind:string>[,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:
- <string> $str.replace(<string:string>,<replacewith:string>,<toreplace:string>)
+ <string> $str.tqreplace(<string:string>,<replacewith:string>,<totqreplace:string>)
@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:
- <string> $str.replacenocase(<string:string>,<newstr:string>,<toreplace:string>)
+ <string> $str.replacenocase(<string:string>,<newstr:string>,<totqreplace:string>)
@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 (idx<len)
{
- QChar szTmp = szString[idx].unicode();
+ TQChar szTmp = szString[idx].tqunicode();
while (szTmp.isSpace())
{
idx++;
- szTmp = szString[idx].unicode();
+ szTmp = szString[idx].tqunicode();
}
begin = idx;
while (idx<len && !szTmp.isSpace())
{
idx++;
- szTmp = szString[idx].unicode();
+ szTmp = szString[idx].tqunicode();
}
if (iOccurence == (kvs_int_t)cnt)
{
@@ -1414,7 +1414,7 @@ static bool str_kvs_fnc_word(KviKvsModuleFunctionCall * c)
static bool str_kvs_fnc_token(KviKvsModuleFunctionCall * c)
{
- QString szString,sep;
+ TQString szString,sep;
kvs_uint_t n;
KVSM_PARAMETERS_BEGIN(c)
KVSM_PARAMETER("n",KVS_PT_UINT,0,n)
@@ -1433,18 +1433,18 @@ static bool str_kvs_fnc_token(KviKvsModuleFunctionCall * c)
int len = szString.length();
while (idx<len)
{
- QChar szTmp = szString[idx].unicode();
+ TQChar szTmp = szString[idx].tqunicode();
// while (szTmp==sep)
- while (sep.contains(szTmp))
+ while (sep.tqcontains(szTmp))
{
idx++;
- szTmp = szString[idx].unicode();
+ szTmp = szString[idx].tqunicode();
}
begin = idx;
- while (idx<len && !sep.contains(szTmp))
+ while (idx<len && !sep.tqcontains(szTmp))
{
idx++;
- szTmp = szString[idx].unicode();
+ szTmp = szString[idx].tqunicode();
}
if (n == cnt)
{
@@ -1476,7 +1476,7 @@ static bool str_kvs_fnc_token(KviKvsModuleFunctionCall * c)
static bool str_kvs_fnc_charsum(KviKvsModuleFunctionCall * c)
{
- QString szString;
+ TQString szString;
bool bCaseInsensitive;
KVSM_PARAMETERS_BEGIN(c)
KVSM_PARAMETER("data",KVS_PT_STRING,0,szString)
@@ -1489,13 +1489,13 @@ static bool str_kvs_fnc_charsum(KviKvsModuleFunctionCall * c)
{
while(idx < len)
{
- sum += szString[idx].lower().unicode();
+ sum += szString[idx].lower().tqunicode();
idx++;
}
} else {
while(idx < len)
{
- sum += szString[idx].unicode();
+ sum += szString[idx].tqunicode();
idx++;
}
}
@@ -1524,7 +1524,7 @@ static bool str_kvs_fnc_charsum(KviKvsModuleFunctionCall * c)
static bool str_kvs_fnc_digest(KviKvsModuleFunctionCall * c)
{
#ifdef COMPILE_SSL_SUPPORT
- QString szString,szType,szResult;
+ TQString szString,szType,szResult;
KVSM_PARAMETERS_BEGIN(c)
KVSM_PARAMETER("data",KVS_PT_NONEMPTYSTRING,0,szString)
KVSM_PARAMETER("algorythm",KVS_PT_NONEMPTYSTRING,KVS_PF_OPTIONAL,szType)
@@ -1590,17 +1590,17 @@ static bool str_kvs_fnc_digest(KviKvsModuleFunctionCall * c)
static bool str_kvs_fnc_join(KviKvsModuleFunctionCall * c)
{
- QString szSep;
+ TQString szSep;
KviKvsArrayCast ac;
- QString szFlags;
+ TQString szFlags;
KVSM_PARAMETERS_BEGIN(c)
KVSM_PARAMETER("separator",KVS_PT_STRING,0,szSep)
KVSM_PARAMETER("data",KVS_PT_ARRAYCAST,0,ac)
KVSM_PARAMETER("flags",KVS_PT_STRING,KVS_PF_OPTIONAL,szFlags)
KVSM_PARAMETERS_END(c)
- QString szRet;
- bool bSkipEmpty = szFlags.find('n',0,false) != -1;
+ TQString szRet;
+ bool bSkipEmpty = szFlags.tqfind('n',0,false) != -1;
bool bFirst = true;
@@ -1613,7 +1613,7 @@ static bool str_kvs_fnc_join(KviKvsModuleFunctionCall * c)
KviKvsVariant * v = a->at(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 <qclipboard.h>
+#include <tqclipboard.h>
#ifndef COMPILE_ON_WINDOWS
#include <sys/utsname.h>
@@ -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, <function> is the function to be executed
on the remote object and <parameter1>,<parameter2>,... is the list of
parameters to be passed. The <function> 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 <qdir.h>
-#include <qfileinfo.h>
+#include <tqdir.h>
+#include <tqfileinfo.h>
/*
@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<QString,KviPlugin>(5,false);
+ m_pPluginDict = new KviPointerHashTable<TQString,KviPlugin>(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<QString,KviPlugin> it(*m_pPluginDict);
+ KviPointerHashTableIterator<TQString,KviPlugin> it(*m_pPluginDict);
m_bCanUnload = true;
@@ -360,7 +360,7 @@ bool KviPluginManager::checkUnload()
void KviPluginManager::unloadAll()
{
- KviPointerHashTableIterator<QString,KviPlugin> it(*m_pPluginDict);
+ KviPointerHashTableIterator<TQString,KviPlugin> 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<QString,KviPlugin> * m_pPluginDict;
+ KviPointerHashTable<TQString,KviPlugin> * 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 <qsplitter.h>
+#include <tqsplitter.h>
#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 <qlabel.h>
+#include <tqlabel.h>
#include "kvi_pointerlist.h"
-#include <qtooltip.h>
-#include <qtimer.h>
+#include <tqtooltip.h>
+#include <tqtimer.h>
#ifdef COMPILE_KDE_SUPPORT
@@ -44,8 +44,8 @@ extern KviPointerList<KviTermWidget> * g_pTermWidgetList;
extern KviPointerList<KviTermWindow> * 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<KParts::Factory *>(
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 <qframe.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
+#include <tqframe.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
#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<QString,KviTextIcon> it(*(g_pTextIconManager->textIconDict()));
+ KviPointerHashTableIterator<TQString,KviTextIcon> 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 <qfileinfo.h>
+#include <tqfileinfo.h>
-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 <qlayout.h>
-#include <qpushbutton.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
#include "kvi_tal_listbox.h"
-#include <qlineedit.h>
+#include <tqlineedit.h>
#include <kvi_tal_textedit.h>
-#include <qregexp.h>
-#include <qmessagebox.h>
-#include <qdir.h>
-#include <qstringlist.h>
-#include <qdatetime.h>
-#include <qfiledialog.h>
+#include <tqregexp.h>
+#include <tqmessagebox.h>
+#include <tqdir.h>
+#include <tqstringlist.h>
+#include <tqdatetime.h>
+#include <tqfiledialog.h>
#include "kvi_tal_popupmenu.h"
-#include <qcombobox.h>
-#include <qpainter.h>
-#include <qtooltip.h>
-#include <qimage.h>
+#include <tqcombobox.h>
+#include <tqpainter.h>
+#include <tqtooltip.h>
+#include <tqimage.h>
#include <kvi_tal_textedit.h>
-//#include <qmultilineedit.h>
+//#include <tqmultilineedit.h>
#ifdef COMPILE_USE_QT4
-#include <QCloseEvent>
+#include <TQCloseEvent>
#endif
-#include <qbuffer.h>
+#include <tqbuffer.h>
#include "kvi_options.h"
#include "kvi_locale.h"
@@ -77,7 +77,7 @@
#include <stdlib.h> // 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 = "<nobr><b>";
t += inf->name();
t += "</b>";
@@ -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 <qdialog.h>
+#include <tqdialog.h>
#ifdef COMPILE_USE_QT4
-#include <q3simplerichtext.h>
+#include <tq3simplerichtext.h>
#define KviTalSimpleRichText Q3SimpleRichText
#else
-#include <qsimplerichtext.h>
-#define KviTalSimpleRichText QSimpleRichText
+#include <tqsimplerichtext.h>
+#define KviTalSimpleRichText TQSimpleRichText
#endif
#include "kvi_tal_listbox.h"
-#include <qcombobox.h>
+#include <tqcombobox.h>
#include "kvi_tal_popupmenu.h"
-#include <qcursor.h>
+#include <tqcursor.h>
#include <kvi_tal_wizard.h>
-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 <qlayout.h>
-#include <qpushbutton.h>
-#include <qlineedit.h>
-#include <qregexp.h>
-#include <qmessagebox.h>
-#include <qdir.h>
-#include <qcombobox.h>
-#include <qpainter.h>
-#include <qtooltip.h>
-#include <qimage.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqlineedit.h>
+#include <tqregexp.h>
+#include <tqmessagebox.h>
+#include <tqdir.h>
+#include <tqcombobox.h>
+#include <tqpainter.h>
+#include <tqtooltip.h>
+#include <tqimage.h>
#include <kvi_tal_textedit.h>
#ifdef COMPILE_USE_QT4
-#include <q3multilineedit.h>
-#include <QDateTime>
+#include <tq3multilineedit.h>
+#include <TQDateTime>
#else
-#include <qmultilineedit.h>
+#include <tqmultilineedit.h>
#endif
-#include <qbuffer.h>
-#include <qlabel.h>
-#include <qregexp.h>
+#include <tqbuffer.h>
+#include <tqlabel.h>
+#include <tqregexp.h>
#include "kvi_options.h"
@@ -65,19 +65,19 @@
-KviPackThemeDialog::KviPackThemeDialog(QWidget * pParent,KviPointerList<KviThemeInfo> * pThemeInfoList)
+KviPackThemeDialog::KviPackThemeDialog(TQWidget * pParent,KviPointerList<KviThemeInfo> * 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,KviPointerList<KviTheme
szPackageVersion = pThemeInfo->version();
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,KviPointerList<KviTheme
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 = "<p>";
+ TQLabel * pLabel = new TQLabel(pPage);
+ TQString szText = "<p>";
szText += __tr2qs_ctx("This procedure allows you to export the selected themes to a single package. It is useful when you want to distribute your themes to the public.","theme");
szText += "</p><p>";
szText += __tr2qs_ctx("You will be asked to provide a package name, a description and, if you want, an icon/screenshot.","theme");
@@ -146,23 +146,23 @@ KviPackThemeDialog::KviPackThemeDialog(QWidget * pParent,KviPointerList<KviTheme
// theme data name ================================================================================
- pPage = new QWidget(this);
- pLayout = new QGridLayout(pPage,2,1,4,4);
+ pPage = new TQWidget(this);
+ pLayout = new TQGridLayout(pPage,2,1,4,4);
- pLabel = new QLabel(pPage);
+ pLabel = new TQLabel(pPage);
pLabel->setText(__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 = "<html><body bgcolor=\"#ffffff\">";
+ TQString szThemesDescription = "<html><body bgcolor=\"#ffffff\">";
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,KviPointerList<KviTheme
szThemesDescription += "</body></html>";
KviTalTextEdit * pTextEdit = new KviTalTextEdit(pPage);
- pTextEdit->setPaper(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,KviPointerList<KviTheme
// 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 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,KviPointerList<KviTheme
m_pPackageDescriptionEdit->setText(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,KviPointerList<KviTheme
// screenshot/logo/icon ================================================================================
- pPage = new QWidget(this);
- pLayout = new QGridLayout(pPage,3,1,4,4);
+ pPage = new TQWidget(this);
+ pLayout = new TQGridLayout(pPage,3,1,4,4);
- pLabel = new QLabel(pPage);
+ pLabel = new TQLabel(pPage);
pLabel->setText(__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,KviPointerList<KviTheme
// save file name ================================================================================
- 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->setText(__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,KviPointerList<KviTheme
m_pPathSelector = new KviFileSelector(pPage,"",&m_szPackagePath,true,KviFileSelector::ChooseSaveFileName,szFilter);
pLayout->addWidget(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 <qdialog.h>
+#include <tqdialog.h>
#include <kvi_tal_wizard.h>
-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<KviThemeInfo> * pThemeInfoList);
+ KviPackThemeDialog(TQWidget * pParent,KviPointerList<KviThemeInfo> * 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<KviThemeInfo> * 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 <qlayout.h>
-#include <qpushbutton.h>
-#include <qlineedit.h>
-#include <qregexp.h>
-#include <qmessagebox.h>
-#include <qdir.h>
-#include <qcombobox.h>
-#include <qpainter.h>
-#include <qtooltip.h>
-#include <qimage.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqlineedit.h>
+#include <tqregexp.h>
+#include <tqmessagebox.h>
+#include <tqdir.h>
+#include <tqcombobox.h>
+#include <tqpainter.h>
+#include <tqtooltip.h>
+#include <tqimage.h>
#include <kvi_tal_textedit.h>
#ifdef COMPILE_USE_QT4
-#include <q3multilineedit.h>
-#include <QDateTime>
+#include <tq3multilineedit.h>
+#include <TQDateTime>
#else
-#include <qmultilineedit.h>
+#include <tqmultilineedit.h>
#endif
-#include <qbuffer.h>
-#include <qlabel.h>
+#include <tqbuffer.h>
+#include <tqlabel.h>
#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 = "<p>";
+ TQLabel * pLabel = new TQLabel(pPage);
+ TQString szText = "<p>";
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 += "</p><p>";
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 <qdialog.h>
+#include <tqdialog.h>
#include <kvi_tal_wizard.h>
-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 <q3mimefactory.h>
+#include <tq3mimefactory.h>
#else
-#define KviTalMimeSourceFactory QMimeSourceFactory
+#define KviTalMimeSourceFactory TQMimeSourceFactory
#endif
-#include <qmime.h>
+#include <tqmime.h>
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<QString,QString> * pInfoFields;
- QString * pValue;
+ KviPointerHashTable<TQString,TQString> * 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 = "<html><body bgcolor=\"#ffffff\">";
- QString szTmp;
+ TQString szWarnings;
+ TQString szDetails = "<html><body bgcolor=\"#ffffff\">";
+ 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 += "</b></font></center></p>";
}
- QString szShowDetails = __tr2qs_ctx("Show Details","theme");
+ TQString szShowDetails = __tr2qs_ctx("Show Details","theme");
- KviQString::sprintf(hd.szHtmlText,
+ KviTQString::sprintf(hd.szHtmlText,
"<html bgcolor=\"#ffffff\">" \
"<body bgcolor=\"#ffffff\">" \
"<p><center>" \
@@ -266,8 +266,8 @@ namespace KviThemeFunctions
KviTalMimeSourceFactory::defaultFactory()->setText("theme_dialog_details",szDetails);
KviTalMimeSourceFactory::defaultFactory()->setText("theme_dialog_main",hd.szHtmlText);
- QString beginCenter = "<center>";
- QString endCenter = "</center>";
+ TQString beginCenter = "<center>";
+ TQString endCenter = "</center>";
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,"<p><center><img src=\"theme_shot%d\"></center></p>",iUniqueIndexInDocument);
- QString szTmp;
- KviQString::sprintf(szTmp,"theme_shot%d",iUniqueIndexInDocument);
+ KviTQString::sprintf(szScreenshot,"<p><center><img src=\"theme_shot%d\"></center></p>",iUniqueIndexInDocument);
+ TQString szTmp;
+ KviTQString::sprintf(szTmp,"theme_shot%d",iUniqueIndexInDocument);
KviTalMimeSourceFactory::defaultFactory()->setPixmap(szTmp,pixScreenshot);
} else {
szScreenshot = "";
}
- KviQString::sprintf(
+ KviTQString::sprintf(
szBuffer,
"<p><center>" \
"<h2>%Q %Q</h2>" \
@@ -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 <qwidget.h>
-#include <qpixmap.h>
+#include <tqwidget.h>
+#include <tqpixmap.h>
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 <qpushbutton.h>
+#include <tqpushbutton.h>
#ifdef COMPILE_USE_QT4
-#include <q3simplerichtext.h>
-#include <QDesktopWidget>
-#include <QCloseEvent>
+#include <tq3simplerichtext.h>
+#include <TQDesktopWidget>
+#include <TQCloseEvent>
#define KviTalSimpleRichText Q3SimpleRichText
#else
-#include <qsimplerichtext.h>
-#define KviTalSimpleRichText QSimpleRichText
+#include <tqsimplerichtext.h>
+#define KviTalSimpleRichText TQSimpleRichText
#endif
-#include <qfont.h>
-#include <qtextcodec.h>
-#include <qpainter.h>
+#include <tqfont.h>
+#include <tqtextcodec.h>
+#include <tqpainter.h>
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 = "<center><font color=\"#FFFFFF\">";
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("<b>Can't find any tip... :(</b>"));
+ TQString szTip = m_pConfig->readEntry(tmp.ptr(),__tr2qs("<b>Can't find any tip... :(</b>"));
//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 <qwidget.h>
-#include <qframe.h>
-#include <qpixmap.h>
-#include <qcheckbox.h>
+#include <tqwidget.h>
+#include <tqframe.h>
+#include <tqpixmap.h>
+#include <tqcheckbox.h>
#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.<br>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.<br><b>/server -i &lt;název_serveru&gt;</b> je příkaz. :)
-2=KVIrc podporuje Šifrování SSL.<br>IRC spojení šifrovaná pomocí SSL mohou být navázána příkazem <b>/server -s</b>, a DCC spojení použitím <b>/dcc.chat -s</b><br>Funguje také na IPv6.
+2=KVIrc podporuje Šifrování SSL.<br>IRC spojení šifrovaná potqmocí SSL mohou být navázána příkazem <b>/server -s</b>, a DCC spojení použitím <b>/dcc.chat -s</b><br>Funguje také na IPv6.
3=<b>IRC context</b> je soubor zdrojů patřících k jednomu spojení se serverem. Má přiřazené okno <b>Console</b> 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 <b>gnutella</b> 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 (<b>opennap</b>), 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 <b>Unicode</b> (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.<br><b>/avatar #váškanál http://funnyhost.com/funny/funny.png</b> funguje!
-20=KVIrc má vestavěný HTTP klient, takže můžete stahovat soubory z Webu pomocí příkazu <b>/http.get</b>.
+20=KVIrc má vestavěný HTTP klient, takže můžete stahovat soubory z Webu potqmocí příkazu <b>/http.get</b>.
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.<br>Il comando è <b>/server -i &lt;nomeserver&gt;</b> :)
2=KVIrc supporta crittazione SSL.<br>Le connessioni IRC crittate con SSL possono essere stabilite usando <b>/server -s</b>, e connessioni DCC usando <b>/dcc.chat -s</b><br>Funziona anche usando IPv6.
3=Un <b>contesto IRC</b> è un set di risorse che dialogano con una singola connessione server. Ha associato una finestra <b>Console</b> 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 <b>gnutella</b> è 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) <b>irc://</b>. Lancia il comando:<br><b>kvirc irc://irc.tuoserver.org:6667/canale</b><br> per connettere a quel server.<br>La sintassi generale è:<br><b>irc[6]://&lt;nome-server&gt;[:&lt;porta&gt;][/[&lt;canale&gt;[?&lt;password&gt;]]]</b>
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<QString,KviCustomToolBarDescriptor> it(*(KviCustomToolBarManager::instance()->descriptors()));
+ KviPointerHashTableIterator<TQString,KviCustomToolBarDescriptor> 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<QString,KviCustomToolBarDescriptor> it(*(KviCustomToolBarManager::instance()->descriptors()));
+ KviPointerHashTableIterator<TQString,KviCustomToolBarDescriptor> 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 <qpushbutton.h>
-#include <qlayout.h>
-#include <qapplication.h>
-#include <qtooltip.h>
-
-#include <qlineedit.h>
-#include <qlabel.h>
-#include <qmessagebox.h>
-#include <qframe.h>
-#include <qdir.h>
-#include <qtimer.h>
-#include <qevent.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
+#include <tqapplication.h>
+#include <tqtooltip.h>
+
+#include <tqlineedit.h>
+#include <tqlabel.h>
+#include <tqmessagebox.h>
+#include <tqframe.h>
+#include <tqdir.h>
+#include <tqtimer.h>
+#include <tqevent.h>
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.<br>" \
"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<QString> * a = t->descriptor()->actions();
+ KviPointerList<TQString> * 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<QString> * aa = t->descriptor()->actions();
+ KviPointerList<TQString> * 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 <qwidget.h>
-#include <qlabel.h>
-#include <qdialog.h>
-#include <qcolor.h>
+#include <tqwidget.h>
+#include <tqlabel.h>
+#include <tqdialog.h>
+#include <tqcolor.h>
-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 <qobject.h>
+#include <tqobject.h>
-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 <qtimer.h>
+#include <tqtimer.h>
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<int> ret;
+ TQValueList<int> 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<TorrentInfo> m_ti;
+ TQValueList<TorrentInfo> 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 <qfiledialog.h>
-#include <qmessagebox.h>
-#include <qcursor.h>
-#include <qdatetime.h>
+#include <tqfiledialog.h>
+#include <tqmessagebox.h>
+#include <tqcursor.h>
+#include <tqdatetime.h>
#ifdef COMPILE_USE_QT4
- #include <q3textstream.h>
- #include <QTextStream>
+ #include <tq3textstream.h>
+ #include <TQTextStream>
#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<KviUrl> *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<KviUrl> *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<KviStr>;
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 <qdialog.h>
-#include <qlayout.h>
+#include <tqdialog.h>
+#include <tqlayout.h>
#include "kvi_tal_listview.h"
-#include <qstring.h>
-#include <qpushbutton.h>
-#include <qfile.h>
+#include <tqstring.h>
+#include <tqpushbutton.h>
+#include <tqfile.h>
#ifdef COMPILE_USE_QT4
- #include <q3textstream.h>
+ #include <tq3textstream.h>
#else
- #include <qtextstream.h>
+ #include <tqtextstream.h>
#endif
-#include <qcheckbox.h>
+#include <tqcheckbox.h>
#include "kvi_tal_listbox.h"
-#include <qmenubar.h>
-#include <qinputdialog.h>
-#include <qtoolbutton.h>
-#include <qiconset.h>
+#include <tqmenubar.h>
+#include <tqinputdialog.h>
+#include <tqtoolbutton.h>
+#include <tqiconset.h>
#include "kvi_locale.h"
#include "kvi_config.h"
@@ -48,20 +48,21 @@
#include "kvi_mextoolbar.h"
#include "kvi_styled_controls.h"
-#include <qpixmap.h>
+#include <tqpixmap.h>
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<KviUrl> *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 <qtimer.h>
+#include <tqtimer.h>
#ifdef COMPILE_CRYPT_SUPPORT
@@ -62,7 +62,7 @@ KviPointerList<KviUserWindow> * 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<KviUserWindow> * 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<const char *,KviWindow> 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<const char *,KviWindow> 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<const char *,KviWindow> 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<const char *,KviWindow> 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_