summaryrefslogtreecommitdiffstats
path: root/tdecore
diff options
context:
space:
mode:
authorDarrell Anderson <humanreadable@yahoo.com>2013-03-02 15:57:34 -0600
committerDarrell Anderson <humanreadable@yahoo.com>2013-03-02 15:57:34 -0600
commit7c0b0c9dc9fcbe9c198925bdc7ee18ac6be49f4f (patch)
treec76702a7f6310fbe9d437e347535422e836e94e9 /tdecore
parenta2a38be7600e2a2c2b49c66902d912ca036a2c0f (diff)
parent27bbee9a5f9dcda53d8eb23863ee670ad1360e41 (diff)
downloadtdelibs-7c0b0c9dc9fcbe9c198925bdc7ee18ac6be49f4f.tar.gz
tdelibs-7c0b0c9dc9fcbe9c198925bdc7ee18ac6be49f4f.zip
Merge branch 'master' of http://scm.trinitydesktop.org/scm/git/tdelibs
Diffstat (limited to 'tdecore')
-rw-r--r--tdecore/AUTHORS16
-rw-r--r--tdecore/CMakeLists.txt61
-rw-r--r--tdecore/DESIGN.COLOR2
-rw-r--r--tdecore/DESIGN.iconloading8
-rw-r--r--tdecore/DESIGN.tdeconfig (renamed from tdecore/DESIGN.kconfig)38
-rw-r--r--tdecore/KCONFIG_DESIGN32
-rw-r--r--tdecore/MAINTAINERS46
-rw-r--r--tdecore/Mainpage.dox2
-rw-r--r--tdecore/Makefile.am68
-rw-r--r--tdecore/README.exec6
-rw-r--r--tdecore/README.kiosk20
-rw-r--r--tdecore/README.kstartupinfo22
-rw-r--r--tdecore/hwlibdaemons/CMakeLists.txt13
-rw-r--r--tdecore/hwlibdaemons/dbus/CMakeLists.txt37
-rw-r--r--tdecore/hwlibdaemons/dbus/org.trinitydesktop.hardwarecontrol.conf38
-rw-r--r--tdecore/hwlibdaemons/dbus/org.trinitydesktop.hardwarecontrol.service.cmake4
-rw-r--r--tdecore/hwlibdaemons/dbus/tde_dbus_hardwarecontrol.c327
-rw-r--r--tdecore/kallocator.cpp22
-rw-r--r--tdecore/kallocator.h16
-rw-r--r--tdecore/kapp.h6
-rw-r--r--tdecore/kappdcopiface.cpp18
-rw-r--r--tdecore/kappdcopiface.h14
-rw-r--r--tdecore/kapplication_win.cpp26
-rw-r--r--tdecore/kbufferedio.cpp44
-rw-r--r--tdecore/kbufferedio.h12
-rw-r--r--tdecore/kcalendarsystem.cpp12
-rw-r--r--tdecore/kcalendarsystem.h6
-rw-r--r--tdecore/kcalendarsystemfactory.cpp2
-rw-r--r--tdecore/kcalendarsystemfactory.h4
-rw-r--r--tdecore/kcalendarsystemgregorian.cpp4
-rw-r--r--tdecore/kcalendarsystemgregorian.h4
-rw-r--r--tdecore/kcalendarsystemhebrew.cpp4
-rw-r--r--tdecore/kcalendarsystemhebrew.h4
-rw-r--r--tdecore/kcalendarsystemhijri.cpp4
-rw-r--r--tdecore/kcalendarsystemhijri.h4
-rw-r--r--tdecore/kcalendarsystemjalali.cpp6
-rw-r--r--tdecore/kcalendarsystemjalali.h2
-rw-r--r--tdecore/kcatalogue.h2
-rw-r--r--tdecore/kcharsets.cpp14
-rw-r--r--tdecore/kcharsets.h6
-rw-r--r--tdecore/kcheckaccelerators.cpp24
-rw-r--r--tdecore/kclipboard.cpp42
-rw-r--r--tdecore/kclipboard.h22
-rw-r--r--tdecore/kcompletion.cpp190
-rw-r--r--tdecore/kcompletion.h180
-rw-r--r--tdecore/kcompletion_private.h72
-rw-r--r--tdecore/kcompletionbase.cpp28
-rw-r--r--tdecore/kconfig_compiler/Makefile.am18
-rw-r--r--tdecore/kconfig_compiler/tests/myprefs.h7
-rw-r--r--tdecore/kconfig_compiler/tests/test1.cpp.ref72
-rw-r--r--tdecore/kconfig_compiler/tests/test3.cpp.ref29
-rw-r--r--tdecore/kconfig_compiler/tests/test4.cpp.ref82
-rw-r--r--tdecore/kconfig_compiler/tests/test5.cpp.ref82
-rw-r--r--tdecore/kconfig_compiler/tests/test6.cpp.ref31
-rw-r--r--tdecore/kconfig_compiler/tests/test7.cpp.ref31
-rw-r--r--tdecore/kconfig_compiler/tests/test8a.cpp.ref22
-rw-r--r--tdecore/kcrash.cpp46
-rw-r--r--tdecore/kcrash.h2
-rw-r--r--tdecore/kdebug.areas194
-rw-r--r--tdecore/kdebug.cpp32
-rw-r--r--tdecore/kdebug.h20
-rw-r--r--tdecore/kdebugrc18
-rw-r--r--tdecore/kdesktopfile.cpp24
-rw-r--r--tdecore/kdesktopfile.h6
-rw-r--r--tdecore/kdetcompmgr.cpp28
-rw-r--r--tdecore/kentities.c2
-rw-r--r--tdecore/kentities.gperf2
-rw-r--r--tdecore/kextsock.cpp34
-rw-r--r--tdecore/kextsock.h40
-rw-r--r--tdecore/kgenericfactory.h62
-rw-r--r--tdecore/kglobalaccel.cpp82
-rw-r--r--tdecore/kglobalaccel.h70
-rw-r--r--tdecore/kglobalaccel_emb.h12
-rw-r--r--tdecore/kglobalaccel_mac.h14
-rw-r--r--tdecore/kglobalaccel_win.cpp58
-rw-r--r--tdecore/kglobalaccel_win.h20
-rw-r--r--tdecore/kglobalaccel_x11.cpp66
-rw-r--r--tdecore/kglobalaccel_x11.h22
-rw-r--r--tdecore/kiconeffect.cpp80
-rw-r--r--tdecore/kiconeffect.h42
-rw-r--r--tdecore/kiconloader.cpp474
-rw-r--r--tdecore/kiconloader.h210
-rw-r--r--tdecore/kiconloader_p.h38
-rw-r--r--tdecore/kicontheme.cpp206
-rw-r--r--tdecore/kicontheme.h68
-rw-r--r--tdecore/kinstance.cpp104
-rw-r--r--tdecore/kinstance.h68
-rw-r--r--tdecore/kipc.h6
-rw-r--r--tdecore/kkeynative.h2
-rw-r--r--tdecore/kkeynative_x11.cpp2
-rw-r--r--tdecore/kkeyserver_x11.cpp22
-rw-r--r--tdecore/kkeyserver_x11.h2
-rw-r--r--tdecore/klibloader.cpp6
-rw-r--r--tdecore/klibloader.h16
-rw-r--r--tdecore/klockfile.cpp84
-rw-r--r--tdecore/klockfile.h14
-rw-r--r--tdecore/kmanagerselection.cpp86
-rw-r--r--tdecore/kmanagerselection.h24
-rw-r--r--tdecore/kmdcodec_compat.h2
-rw-r--r--tdecore/kmimesourcefactory.cpp24
-rw-r--r--tdecore/kmimesourcefactory.h16
-rw-r--r--tdecore/kmountpoint.cpp10
-rw-r--r--tdecore/kmountpoint.h4
-rw-r--r--tdecore/knotifyclient.cpp44
-rw-r--r--tdecore/knotifyclient.h26
-rw-r--r--tdecore/kpalette.cpp4
-rw-r--r--tdecore/kpixmapprovider.h2
-rw-r--r--tdecore/kprocctrl.cpp58
-rw-r--r--tdecore/kprocctrl.h32
-rw-r--r--tdecore/kprocess.cpp148
-rw-r--r--tdecore/kprocess.h88
-rw-r--r--tdecore/kprocio.cpp42
-rw-r--r--tdecore/kprocio.h20
-rw-r--r--tdecore/kprotocolinfo_tdecore.cpp18
-rw-r--r--tdecore/kprotocolinfofactory.cpp8
-rw-r--r--tdecore/kprotocolinfofactory.h4
-rw-r--r--tdecore/kpty.cpp14
-rw-r--r--tdecore/krandomsequence.cpp4
-rw-r--r--tdecore/krandomsequence.h4
-rw-r--r--tdecore/krootprop.cpp6
-rw-r--r--tdecore/krootprop.h4
-rw-r--r--tdecore/ksavefile.cpp4
-rw-r--r--tdecore/ksavefile.h2
-rw-r--r--tdecore/ksharedptr.h68
-rw-r--r--tdecore/ksimpleconfig.cpp20
-rw-r--r--tdecore/ksimpleconfig.h12
-rw-r--r--tdecore/ksimpledirwatch.cpp12
-rw-r--r--tdecore/ksimpledirwatch.h2
-rw-r--r--tdecore/ksock.cpp70
-rw-r--r--tdecore/ksock.h64
-rw-r--r--tdecore/ksockaddr.cpp54
-rw-r--r--tdecore/ksockaddr.h56
-rw-r--r--tdecore/ksocks.cpp12
-rw-r--r--tdecore/ksocks.h6
-rw-r--r--tdecore/kstandarddirs.cpp142
-rw-r--r--tdecore/kstandarddirs.h72
-rw-r--r--tdecore/kstaticdeleter.h28
-rw-r--r--tdecore/kstringhandler.cpp4
-rw-r--r--tdecore/kstringhandler.h4
-rw-r--r--tdecore/ktempdir.cpp8
-rw-r--r--tdecore/ktempdir.h4
-rw-r--r--tdecore/ktimezones.cpp8
-rw-r--r--tdecore/ktimezones.h6
-rw-r--r--tdecore/kuniqueapplication.cpp74
-rw-r--r--tdecore/kuniqueapplication.h28
-rw-r--r--tdecore/kurl.cpp8
-rw-r--r--tdecore/kurldrag.cpp10
-rw-r--r--tdecore/kurldrag.h2
-rw-r--r--tdecore/kuser.cpp4
-rw-r--r--tdecore/kuser.h4
-rw-r--r--tdecore/kvmallocator.cpp2
-rw-r--r--tdecore/kxmessages.cpp2
-rw-r--r--tdecore/kxmessages.h4
-rw-r--r--tdecore/libtdecore_weak.nmcheck2
-rw-r--r--tdecore/netsupp.cpp2
-rw-r--r--tdecore/network/CMakeLists.txt4
-rw-r--r--tdecore/network/Makefile.am6
-rw-r--r--tdecore/network/kbufferedsocket.cpp72
-rw-r--r--tdecore/network/kbufferedsocket.h34
-rw-r--r--tdecore/network/kclientsocketbase.cpp12
-rw-r--r--tdecore/network/kclientsocketbase.h42
-rw-r--r--tdecore/network/kdatagramsocket.cpp4
-rw-r--r--tdecore/network/kdatagramsocket.h12
-rw-r--r--tdecore/network/khttpproxysocketdevice.cpp26
-rw-r--r--tdecore/network/khttpproxysocketdevice.h10
-rw-r--r--tdecore/network/kresolver.cpp12
-rw-r--r--tdecore/network/kresolver.h10
-rw-r--r--tdecore/network/kresolverstandardworkers.cpp32
-rw-r--r--tdecore/network/kresolverstandardworkers_p.h4
-rw-r--r--tdecore/network/kreverseresolver.cpp16
-rw-r--r--tdecore/network/kreverseresolver.h6
-rw-r--r--tdecore/network/kserversocket.cpp116
-rw-r--r--tdecore/network/kserversocket.h50
-rw-r--r--tdecore/network/ksockssocketdevice.cpp56
-rw-r--r--tdecore/network/ksockssocketdevice.h20
-rw-r--r--tdecore/network/kstreamsocket.h12
-rw-r--r--tdecore/network/tdeiobuffer.h (renamed from tdecore/network/kiobuffer.h)14
-rw-r--r--tdecore/network/tdemulticastsocket.h (renamed from tdecore/network/kmulticastsocket.h)12
-rw-r--r--tdecore/network/tdemulticastsocketdevice.h (renamed from tdecore/network/kmulticastsocketdevice.h)14
-rw-r--r--tdecore/network/tdesocketaddress.cpp88
-rw-r--r--tdecore/network/tdesocketaddress.h46
-rw-r--r--tdecore/network/tdesocketbase.cpp68
-rw-r--r--tdecore/network/tdesocketbase.h52
-rw-r--r--tdecore/network/tdesocketbuffer.cpp32
-rw-r--r--tdecore/network/tdesocketbuffer_p.h16
-rw-r--r--tdecore/network/tdesocketdevice.cpp130
-rw-r--r--tdecore/network/tdesocketdevice.h80
-rw-r--r--tdecore/networkbackends/network-manager/network-manager.cpp12
-rw-r--r--tdecore/networkbackends/network-manager/network-manager_p.h2
-rw-r--r--tdecore/tde-config.cpp.cmake46
-rw-r--r--tdecore/tde-config.cpp.in46
-rw-r--r--tdecore/tdeaboutdata.cpp (renamed from tdecore/kaboutdata.cpp)126
-rw-r--r--tdecore/tdeaboutdata.h (renamed from tdecore/kaboutdata.h)62
-rw-r--r--tdecore/tdeaccel.cpp (renamed from tdecore/kaccel.cpp)270
-rw-r--r--tdecore/tdeaccel.h (renamed from tdecore/kaccel.h)98
-rw-r--r--tdecore/tdeaccelaction.cpp (renamed from tdecore/kaccelaction.cpp)246
-rw-r--r--tdecore/tdeaccelaction.h (renamed from tdecore/kaccelaction.h)158
-rw-r--r--tdecore/tdeaccelbase.cpp (renamed from tdecore/kaccelbase.cpp)154
-rw-r--r--tdecore/tdeaccelbase.h (renamed from tdecore/kaccelbase.h)78
-rw-r--r--tdecore/tdeaccelmanager.cpp (renamed from tdecore/kaccelmanager.cpp)174
-rw-r--r--tdecore/tdeaccelmanager.h (renamed from tdecore/kaccelmanager.h)4
-rw-r--r--tdecore/tdeaccelmanager_private.h (renamed from tdecore/kaccelmanager_private.h)26
-rw-r--r--tdecore/tdeaccelprivate.h (renamed from tdecore/kaccelprivate.h)20
-rw-r--r--tdecore/tdeapplication.cpp (renamed from tdecore/kapplication.cpp)612
-rw-r--r--tdecore/tdeapplication.h (renamed from tdecore/kapplication.h)188
-rw-r--r--tdecore/tdecmdlineargs.cpp (renamed from tdecore/kcmdlineargs.cpp)238
-rw-r--r--tdecore/tdecmdlineargs.h (renamed from tdecore/kcmdlineargs.h)122
-rw-r--r--tdecore/tdeconfig.cpp (renamed from tdecore/kconfig.cpp)80
-rw-r--r--tdecore/tdeconfig.h (renamed from tdecore/kconfig.h)58
-rw-r--r--tdecore/tdeconfig_compiler/CMakeLists.txt (renamed from tdecore/kconfig_compiler/CMakeLists.txt)6
-rw-r--r--tdecore/tdeconfig_compiler/Makefile.am18
-rw-r--r--tdecore/tdeconfig_compiler/README.dox (renamed from tdecore/kconfig_compiler/README.dox)12
-rw-r--r--tdecore/tdeconfig_compiler/TODO (renamed from tdecore/kconfig_compiler/TODO)0
-rwxr-xr-xtdecore/tdeconfig_compiler/checkkcfg.pl (renamed from tdecore/kconfig_compiler/checkkcfg.pl)4
-rw-r--r--tdecore/tdeconfig_compiler/example/Makefile.am (renamed from tdecore/kconfig_compiler/example/Makefile.am)8
-rw-r--r--tdecore/tdeconfig_compiler/example/autoexample.cpp (renamed from tdecore/kconfig_compiler/example/autoexample.cpp)22
-rw-r--r--tdecore/tdeconfig_compiler/example/example.cpp (renamed from tdecore/kconfig_compiler/example/example.cpp)18
-rw-r--r--tdecore/tdeconfig_compiler/example/example.kcfg (renamed from tdecore/kconfig_compiler/example/example.kcfg)0
-rw-r--r--tdecore/tdeconfig_compiler/example/exampleprefs_base.kcfgc (renamed from tdecore/kconfig_compiler/example/exampleprefs_base.kcfgc)4
-rw-r--r--tdecore/tdeconfig_compiler/example/general_base.ui (renamed from tdecore/kconfig_compiler/example/general_base.ui)0
-rw-r--r--tdecore/tdeconfig_compiler/example/myoptions_base.ui (renamed from tdecore/kconfig_compiler/example/myoptions_base.ui)0
-rw-r--r--tdecore/tdeconfig_compiler/kcfg.xsd (renamed from tdecore/kconfig_compiler/kcfg.xsd)2
-rw-r--r--tdecore/tdeconfig_compiler/tdeconfig_compiler.cpp (renamed from tdecore/kconfig_compiler/kconfig_compiler.cpp)66
-rw-r--r--tdecore/tdeconfig_compiler/tests/Makefile.am (renamed from tdecore/kconfig_compiler/tests/Makefile.am)76
-rw-r--r--tdecore/tdeconfig_compiler/tests/myprefs.h7
-rw-r--r--tdecore/tdeconfig_compiler/tests/tdeconfigcompiler_test.cpp (renamed from tdecore/kconfig_compiler/tests/kconfigcompiler_test.cpp)16
-rw-r--r--tdecore/tdeconfig_compiler/tests/tdeconfigcompiler_test.h (renamed from tdecore/kconfig_compiler/tests/kconfigcompiler_test.h)6
-rw-r--r--tdecore/tdeconfig_compiler/tests/test1.cpp.ref72
-rw-r--r--tdecore/tdeconfig_compiler/tests/test1.h.ref (renamed from tdecore/kconfig_compiler/tests/test1.h.ref)6
-rw-r--r--tdecore/tdeconfig_compiler/tests/test1.kcfg (renamed from tdecore/kconfig_compiler/tests/test1.kcfg)0
-rw-r--r--tdecore/tdeconfig_compiler/tests/test1.kcfgc (renamed from tdecore/kconfig_compiler/tests/test1.kcfgc)4
-rw-r--r--tdecore/tdeconfig_compiler/tests/test1main.cpp (renamed from tdecore/kconfig_compiler/tests/test1main.cpp)2
-rw-r--r--tdecore/tdeconfig_compiler/tests/test2.cpp.ref (renamed from tdecore/kconfig_compiler/tests/test2.cpp.ref)38
-rw-r--r--tdecore/tdeconfig_compiler/tests/test2.h.ref (renamed from tdecore/kconfig_compiler/tests/test2.h.ref)4
-rw-r--r--tdecore/tdeconfig_compiler/tests/test2.kcfg (renamed from tdecore/kconfig_compiler/tests/test2.kcfg)0
-rw-r--r--tdecore/tdeconfig_compiler/tests/test2.kcfgc (renamed from tdecore/kconfig_compiler/tests/test2.kcfgc)2
-rw-r--r--tdecore/tdeconfig_compiler/tests/test2main.cpp (renamed from tdecore/kconfig_compiler/tests/test2main.cpp)2
-rw-r--r--tdecore/tdeconfig_compiler/tests/test3.cpp.ref29
-rw-r--r--tdecore/tdeconfig_compiler/tests/test3.h.ref (renamed from tdecore/kconfig_compiler/tests/test3.h.ref)6
-rw-r--r--tdecore/tdeconfig_compiler/tests/test3.kcfg (renamed from tdecore/kconfig_compiler/tests/test3.kcfg)0
-rw-r--r--tdecore/tdeconfig_compiler/tests/test3.kcfgc (renamed from tdecore/kconfig_compiler/tests/test3.kcfgc)2
-rw-r--r--tdecore/tdeconfig_compiler/tests/test3main.cpp (renamed from tdecore/kconfig_compiler/tests/test3main.cpp)2
-rw-r--r--tdecore/tdeconfig_compiler/tests/test4.cpp.ref82
-rw-r--r--tdecore/tdeconfig_compiler/tests/test4.h.ref (renamed from tdecore/kconfig_compiler/tests/test4.h.ref)8
-rw-r--r--tdecore/tdeconfig_compiler/tests/test4.kcfg (renamed from tdecore/kconfig_compiler/tests/test4.kcfg)0
-rw-r--r--tdecore/tdeconfig_compiler/tests/test4.kcfgc (renamed from tdecore/kconfig_compiler/tests/test4.kcfgc)2
-rw-r--r--tdecore/tdeconfig_compiler/tests/test4main.cpp (renamed from tdecore/kconfig_compiler/tests/test4main.cpp)2
-rw-r--r--tdecore/tdeconfig_compiler/tests/test5.cpp.ref82
-rw-r--r--tdecore/tdeconfig_compiler/tests/test5.h.ref (renamed from tdecore/kconfig_compiler/tests/test5.h.ref)8
-rw-r--r--tdecore/tdeconfig_compiler/tests/test5.kcfg (renamed from tdecore/kconfig_compiler/tests/test5.kcfg)0
-rw-r--r--tdecore/tdeconfig_compiler/tests/test5.kcfgc (renamed from tdecore/kconfig_compiler/tests/test5.kcfgc)2
-rw-r--r--tdecore/tdeconfig_compiler/tests/test5main.cpp (renamed from tdecore/kconfig_compiler/tests/test5main.cpp)2
-rw-r--r--tdecore/tdeconfig_compiler/tests/test6.cpp.ref31
-rw-r--r--tdecore/tdeconfig_compiler/tests/test6.h.ref (renamed from tdecore/kconfig_compiler/tests/test6.h.ref)6
-rw-r--r--tdecore/tdeconfig_compiler/tests/test6.kcfg (renamed from tdecore/kconfig_compiler/tests/test6.kcfg)0
-rw-r--r--tdecore/tdeconfig_compiler/tests/test6.kcfgc (renamed from tdecore/kconfig_compiler/tests/test6.kcfgc)2
-rw-r--r--tdecore/tdeconfig_compiler/tests/test6main.cpp (renamed from tdecore/kconfig_compiler/tests/test6main.cpp)2
-rw-r--r--tdecore/tdeconfig_compiler/tests/test7.cpp.ref31
-rw-r--r--tdecore/tdeconfig_compiler/tests/test7.h.ref (renamed from tdecore/kconfig_compiler/tests/test7.h.ref)6
-rw-r--r--tdecore/tdeconfig_compiler/tests/test7.kcfg (renamed from tdecore/kconfig_compiler/tests/test7.kcfg)0
-rw-r--r--tdecore/tdeconfig_compiler/tests/test7.kcfgc (renamed from tdecore/kconfig_compiler/tests/test7.kcfgc)2
-rw-r--r--tdecore/tdeconfig_compiler/tests/test7main.cpp (renamed from tdecore/kconfig_compiler/tests/test7main.cpp)2
-rw-r--r--tdecore/tdeconfig_compiler/tests/test8a.cpp.ref22
-rw-r--r--tdecore/tdeconfig_compiler/tests/test8a.h.ref (renamed from tdecore/kconfig_compiler/tests/test8a.h.ref)10
-rw-r--r--tdecore/tdeconfig_compiler/tests/test8a.kcfg (renamed from tdecore/kconfig_compiler/tests/test8a.kcfg)4
-rw-r--r--tdecore/tdeconfig_compiler/tests/test8a.kcfgc (renamed from tdecore/kconfig_compiler/tests/test8a.kcfgc)0
-rw-r--r--tdecore/tdeconfig_compiler/tests/test8b.cpp.ref (renamed from tdecore/kconfig_compiler/tests/test8b.cpp.ref)14
-rw-r--r--tdecore/tdeconfig_compiler/tests/test8b.h.ref (renamed from tdecore/kconfig_compiler/tests/test8b.h.ref)6
-rw-r--r--tdecore/tdeconfig_compiler/tests/test8b.kcfg (renamed from tdecore/kconfig_compiler/tests/test8b.kcfg)0
-rw-r--r--tdecore/tdeconfig_compiler/tests/test8b.kcfgc (renamed from tdecore/kconfig_compiler/tests/test8b.kcfgc)0
-rw-r--r--tdecore/tdeconfig_compiler/tests/test8main.cpp (renamed from tdecore/kconfig_compiler/tests/test8main.cpp)4
-rw-r--r--tdecore/tdeconfig_compiler/tests/test9.cpp.ref (renamed from tdecore/kconfig_compiler/tests/test9.cpp.ref)16
-rw-r--r--tdecore/tdeconfig_compiler/tests/test9.h.ref (renamed from tdecore/kconfig_compiler/tests/test9.h.ref)6
-rw-r--r--tdecore/tdeconfig_compiler/tests/test9.kcfg (renamed from tdecore/kconfig_compiler/tests/test9.kcfg)0
-rw-r--r--tdecore/tdeconfig_compiler/tests/test9.kcfgc (renamed from tdecore/kconfig_compiler/tests/test9.kcfgc)4
-rw-r--r--tdecore/tdeconfig_compiler/tests/test9main.cpp (renamed from tdecore/kconfig_compiler/tests/test9main.cpp)2
-rw-r--r--tdecore/tdeconfig_compiler/tests/test_dpointer.cpp.ref (renamed from tdecore/kconfig_compiler/tests/test_dpointer.cpp.ref)84
-rw-r--r--tdecore/tdeconfig_compiler/tests/test_dpointer.h.ref (renamed from tdecore/kconfig_compiler/tests/test_dpointer.h.ref)8
-rw-r--r--tdecore/tdeconfig_compiler/tests/test_dpointer.kcfg (renamed from tdecore/kconfig_compiler/tests/test_dpointer.kcfg)0
-rw-r--r--tdecore/tdeconfig_compiler/tests/test_dpointer.kcfgc (renamed from tdecore/kconfig_compiler/tests/test_dpointer.kcfgc)2
-rw-r--r--tdecore/tdeconfig_compiler/tests/test_dpointer_main.cpp (renamed from tdecore/kconfig_compiler/tests/test_dpointer_main.cpp)2
-rw-r--r--tdecore/tdeconfigbackend.cpp (renamed from tdecore/kconfigbackend.cpp)110
-rw-r--r--tdecore/tdeconfigbackend.h (renamed from tdecore/kconfigbackend.h)50
-rw-r--r--tdecore/tdeconfigbase.cpp (renamed from tdecore/kconfigbase.cpp)322
-rw-r--r--tdecore/tdeconfigbase.h (renamed from tdecore/kconfigbase.h)118
-rw-r--r--tdecore/tdeconfigdata.h (renamed from tdecore/kconfigdata.h)0
-rw-r--r--tdecore/tdeconfigdialogmanager.cpp (renamed from tdecore/kconfigdialogmanager.cpp)56
-rw-r--r--tdecore/tdeconfigdialogmanager.h (renamed from tdecore/kconfigdialogmanager.h)28
-rw-r--r--tdecore/tdeconfigskeleton.cpp (renamed from tdecore/kconfigskeleton.cpp)436
-rw-r--r--tdecore/tdeconfigskeleton.h (renamed from tdecore/kconfigskeleton.h)192
-rw-r--r--tdecore/tdeglobal.cpp (renamed from tdecore/kglobal.cpp)88
-rw-r--r--tdecore/tdeglobal.h (renamed from tdecore/kglobal.h)58
-rw-r--r--tdecore/tdeglobalsettings.cpp (renamed from tdecore/kglobalsettings.cpp)266
-rw-r--r--tdecore/tdeglobalsettings.h (renamed from tdecore/kglobalsettings.h)28
-rw-r--r--tdecore/tdehardwaredevices.cpp143
-rw-r--r--tdecore/tdehardwaredevices.h14
-rw-r--r--tdecore/tdelibs_export.h12
-rw-r--r--tdecore/tdelocale.cpp (renamed from tdecore/klocale.cpp)338
-rw-r--r--tdecore/tdelocale.h (renamed from tdecore/klocale.h)68
-rw-r--r--tdecore/tdemultipledrag.cpp (renamed from tdecore/kmultipledrag.cpp)4
-rw-r--r--tdecore/tdemultipledrag.h (renamed from tdecore/kmultipledrag.h)0
-rw-r--r--tdecore/tdenetworkconnections.cpp6
-rw-r--r--tdecore/tdeshortcut.cpp (renamed from tdecore/kshortcut.cpp)80
-rw-r--r--tdecore/tdeshortcut.h (renamed from tdecore/kshortcut.h)60
-rw-r--r--tdecore/tdeshortcutlist.cpp (renamed from tdecore/kshortcutlist.cpp)104
-rw-r--r--tdecore/tdeshortcutlist.h (renamed from tdecore/kshortcutlist.h)96
-rw-r--r--tdecore/tdeshortcutmenu.cpp (renamed from tdecore/kshortcutmenu.cpp)26
-rw-r--r--tdecore/tdeshortcutmenu.h (renamed from tdecore/kshortcutmenu.h)10
-rw-r--r--tdecore/tdestartupinfo.cpp (renamed from tdecore/kstartupinfo.cpp)344
-rw-r--r--tdecore/tdestartupinfo.h (renamed from tdecore/kstartupinfo.h)154
-rw-r--r--tdecore/tdestdaccel.cpp (renamed from tdecore/kstdaccel.cpp)288
-rw-r--r--tdecore/tdestdaccel.h (renamed from tdecore/kstdaccel.h)118
-rw-r--r--tdecore/tdesycoca.cpp (renamed from tdecore/ksycoca.cpp)42
-rw-r--r--tdecore/tdesycoca.h (renamed from tdecore/ksycoca.h)14
-rw-r--r--tdecore/tdesycocadict.cpp (renamed from tdecore/ksycocadict.cpp)6
-rw-r--r--tdecore/tdesycocadict.h (renamed from tdecore/ksycocadict.h)4
-rw-r--r--tdecore/tdesycocaentry.h (renamed from tdecore/ksycocaentry.h)12
-rw-r--r--tdecore/tdesycocafactory.cpp (renamed from tdecore/ksycocafactory.cpp)12
-rw-r--r--tdecore/tdesycocafactory.h (renamed from tdecore/ksycocafactory.h)8
-rw-r--r--tdecore/tdesycocatype.h (renamed from tdecore/ksycocatype.h)4
-rw-r--r--tdecore/tdetempfile.cpp (renamed from tdecore/ktempfile.cpp)10
-rw-r--r--tdecore/tdetempfile.h (renamed from tdecore/ktempfile.h)2
-rw-r--r--tdecore/tests/KIDLTest.cpp4
-rw-r--r--tdecore/tests/KIDLTestClient.cpp4
-rw-r--r--tdecore/tests/Makefile.am20
-rw-r--r--tdecore/tests/dcopkonqtest.cpp8
-rw-r--r--tdecore/tests/kapptest.cpp18
-rw-r--r--tdecore/tests/kcalendartest.cpp120
-rw-r--r--tdecore/tests/kcmdlineargstest.cpp24
-rw-r--r--tdecore/tests/kdebugtest.cpp2
-rw-r--r--tdecore/tests/kglobaltest.cpp12
-rw-r--r--tdecore/tests/kiconloadertest.cpp12
-rw-r--r--tdecore/tests/kipctest.cpp10
-rw-r--r--tdecore/tests/klocaletest.cpp110
-rw-r--r--tdecore/tests/klocaletest.h2
-rw-r--r--tdecore/tests/kmacroexpandertest.cpp8
-rw-r--r--tdecore/tests/kmdcodectest.cpp18
-rw-r--r--tdecore/tests/kmemtest.cpp6
-rw-r--r--tdecore/tests/knotifytest.cpp4
-rw-r--r--tdecore/tests/kprocesstest.cpp52
-rw-r--r--tdecore/tests/kprocesstest.h10
-rw-r--r--tdecore/tests/kprociotest.cpp8
-rw-r--r--tdecore/tests/kprociotest.h4
-rw-r--r--tdecore/tests/krandomsequencetest.cpp4
-rw-r--r--tdecore/tests/kresolvertest.cpp10
-rw-r--r--tdecore/tests/krfcdatetest.cpp6
-rw-r--r--tdecore/tests/ksimpleconfigtest.cpp4
-rw-r--r--tdecore/tests/ksocktest.cpp16
-rw-r--r--tdecore/tests/kstdacceltest.cpp39
-rw-r--r--tdecore/tests/kstddirstest.cpp10
-rw-r--r--tdecore/tests/ktempfiletest.cpp8
-rw-r--r--tdecore/tests/ktimezonestest.cpp4
-rw-r--r--tdecore/tests/kuniqueapptest.cpp10
-rw-r--r--tdecore/tests/kurltest.cpp30
-rw-r--r--tdecore/tests/startserviceby.cpp14
-rw-r--r--tdecore/tests/tdeconfigtest.cpp (renamed from tdecore/tests/kconfigtest.cpp)26
-rw-r--r--tdecore/tests/tdeconfigtestgui.cpp (renamed from tdecore/tests/kconfigtestgui.cpp)36
-rw-r--r--tdecore/tests/tdeconfigtestgui.h (renamed from tdecore/tests/kconfigtestgui.h)14
-rw-r--r--tdecore/tests/tdestdacceltest.cpp39
-rw-r--r--tdecore/tests/testqtargs.cpp32
-rw-r--r--tdecore/twin.cpp18
-rw-r--r--tdecore/twin.h2
-rw-r--r--tdecore/twinmodule.cpp4
363 files changed, 7757 insertions, 7270 deletions
diff --git a/tdecore/AUTHORS b/tdecore/AUTHORS
index a76f6be1e..57935fce7 100644
--- a/tdecore/AUTHORS
+++ b/tdecore/AUTHORS
@@ -1,5 +1,5 @@
Matthias Kalle Dalheimer <kalle@kde.org>:
-classes KConfig, KTextStream, KColorSet, KApplication
+classes TDEConfig, KTextStream, KColorSet, TDEApplication
automake, autoconf, maintenance
Richard Moore <moorer@cs.man.ac.uk>:
@@ -12,20 +12,20 @@ Steffen Hansen <stefh@dit.ou.dk>:
KURL class
Torben Weis <weis@stud.uni-frankfurt.de>
-DnD stuff, KSocket and KServerSocket classes, KPixmap
+DnD stuff, TDESocket and TDEServerSocket classes, KPixmap
Alexander Sanda <alex@darkstar.ping.at>
Read and write numerical config entries, KPanner, KTabControl,
-KPopupMenu, KMessageBox, KEdit widgets.
+TDEPopupMenu, KMessageBox, KEdit widgets.
Martin Jones <mjones@powerup.com.au>
-Bugfixes in KPixmap and KURL, KColorDialog, KSelector
+Bugfixes in KPixmap and KURL, KColorDialog, TDESelector
Keith Brown <kbrown@pdq.net>
KTreeList class
Bernd Johannes Wuebben <wuebben@math.cornell.edu>
-KFontDialog classes
+TDEFontDialog classes
Tim D. Gilman <tdgilman@best.com>
KDatePicker, KDateTable class
@@ -37,10 +37,10 @@ Michael Will <Michael.Will@student.uni-tuebingen.de>
loading routine in KPixmap
Christian Czezatke <e9025461@student.tuwien.ac.at>
-KProcess class
+TDEProcess class
Matthias Ettrich <ettrich@kde.org>
-KWM, Changes to KApplication and KIconLoader
+KWM, Changes to TDEApplication and TDEIconLoader
Stephan Kulow <coolo@kde.org>
heavy modifications to KURL, autoconf and automake stuff
@@ -53,4 +53,4 @@ Thomas Tanner <tanner@gmx.de>
ltdl.c + ltdl.h
Carsten Pfeiffer <pfeiffer@kde.org>
-KCompletion classes
+TDECompletion classes
diff --git a/tdecore/CMakeLists.txt b/tdecore/CMakeLists.txt
index f0ea3b5b4..b8f512873 100644
--- a/tdecore/CMakeLists.txt
+++ b/tdecore/CMakeLists.txt
@@ -11,8 +11,9 @@
add_subdirectory( malloc )
add_subdirectory( network )
-add_subdirectory( kconfig_compiler )
+add_subdirectory( tdeconfig_compiler )
add_subdirectory( hwlibdata )
+add_subdirectory( hwlibdaemons )
if( NOT DBUS_SYSTEM_BUS )
set( DBUS_SYSTEM_BUS "unix:path=/var/run/dbus/system_bus_socket" CACHE INTERNAL "" FORCE )
@@ -52,7 +53,7 @@ include_directories(
${CMAKE_SOURCE_DIR}/libltdl
${CMAKE_SOURCE_DIR}/tdefx
${CMAKE_SOURCE_DIR}/tdeui
- ${CMAKE_SOURCE_DIR}/kio/kio
+ ${CMAKE_SOURCE_DIR}/tdeio/tdeio
${LIBART_INCLUDE_DIRS}
${LIBIDN_INCLUDE_DIRS}
${GAMIN_INCLUDEDIR}
@@ -68,25 +69,25 @@ link_directories(
##### headers ###################################
install( FILES
- kconfig.h kconfigskeleton.h kconfigdata.h ksimpleconfig.h
- kconfigdialogmanager.h kconfigbase.h kdesktopfile.h
- kurl.h ksock.h kaboutdata.h kcmdlineargs.h kconfigbackend.h
- kapp.h kapplication.h kuniqueapp.h kuniqueapplication.h
+ tdeconfig.h tdeconfigskeleton.h tdeconfigdata.h ksimpleconfig.h
+ tdeconfigdialogmanager.h tdeconfigbase.h kdesktopfile.h
+ kurl.h ksock.h tdeaboutdata.h tdecmdlineargs.h tdeconfigbackend.h
+ kapp.h tdeapplication.h kuniqueapp.h kuniqueapplication.h
kcharsets.h tdeversion.h kpty.h kprocess.h kprocctrl.h
- klocale.h kicontheme.h kiconloader.h kdebug.h twinmodule.h
- twin.h krootprop.h kshortcut.h kkeynative.h kaccel.h
- kglobalaccel.h kstdaccel.h kshortcutlist.h kcatalogue.h
+ tdelocale.h kicontheme.h kiconloader.h kdebug.h twinmodule.h
+ twin.h krootprop.h tdeshortcut.h kkeynative.h tdeaccel.h
+ kglobalaccel.h tdestdaccel.h tdeshortcutlist.h kcatalogue.h
kregexp.h kcompletion.h kstringhandler.h kstddirs.h
- kstandarddirs.h kglobal.h kglobalsettings.h ksharedptr.h
+ kstandarddirs.h tdeglobal.h tdeglobalsettings.h ksharedptr.h
kallocator.h kvmallocator.h kcrash.h krfcdate.h kinstance.h
- kpalette.h kipc.h klibloader.h ktempfile.h ksavefile.h
+ kpalette.h kipc.h klibloader.h tdetempfile.h ksavefile.h
krandomsequence.h knotifyclient.h kiconeffect.h kaudioplayer.h
- kdcoppropertyproxy.h netwm.h kaccelmanager.h netwm_def.h
+ kdcoppropertyproxy.h netwm.h tdeaccelmanager.h netwm_def.h
kpixmapprovider.h kunload.h kstaticdeleter.h kextsock.h
kextendedsocket.h ksockaddr.h kprocio.h kasyncio.h kbufferedio.h
- kurldrag.h kmimesourcefactory.h kmdcodec.h ksocks.h ksycoca.h
- ksycocaentry.h ksycocatype.h kxmessages.h kstartupinfo.h
- klargefile.h kmultipledrag.h kgenericfactory.h kgenericfactory.tcc
+ kurldrag.h kmimesourcefactory.h kmdcodec.h ksocks.h tdesycoca.h
+ tdesycocaentry.h tdesycocatype.h kxmessages.h tdestartupinfo.h
+ klargefile.h tdemultipledrag.h kgenericfactory.h kgenericfactory.tcc
ktypelist.h ksortablevaluelist.h kdebugclasses.h kclipboard.h
kcalendarsystem.h kcalendarsystemfactory.h kmacroexpander.h
kmanagerselection.h kmountpoint.h kuser.h klockfile.h
@@ -109,7 +110,7 @@ install( FILES kdebug.areas kdebugrc language.codes
DESTINATION ${CONFIG_INSTALL_DIR} )
install( FILES kmdcodec_compat.h
- DESTINATION ${INCLUDE_INSTALL_DIR}/kio RENAME kmdcodec.h )
+ DESTINATION ${INCLUDE_INSTALL_DIR}/tdeio RENAME kmdcodec.h )
install( FILES eventsrc
DESTINATION ${DATA_INSTALL_DIR}/knotify )
@@ -119,27 +120,27 @@ install( FILES eventsrc
set( target tdecore )
set( ${target}_SRCS
- libintl.cpp kapplication.cpp kdebug.cpp netwm.cpp
- kconfigbase.cpp kconfig.cpp ksimpleconfig.cpp kconfigbackend.cpp
+ libintl.cpp tdeapplication.cpp kdebug.cpp netwm.cpp
+ tdeconfigbase.cpp tdeconfig.cpp ksimpleconfig.cpp tdeconfigbackend.cpp
kmanagerselection.cpp kdesktopfile.cpp kstandarddirs.cpp
- ksock.cpp kpty.cpp kprocess.cpp kprocctrl.cpp klocale.cpp
+ ksock.cpp kpty.cpp kprocess.cpp kprocctrl.cpp tdelocale.cpp
krfcdate.cpp kiconeffect.cpp kicontheme.cpp kiconloader.cpp
twin.cpp twinmodule.cpp krootprop.cpp kcharsets.cpp
- kckey.cpp kshortcut.cpp kkeynative_x11.cpp kkeyserver_x11.cpp
- kaccelaction.cpp kshortcutmenu.cpp kaccelbase.cpp kaccel.cpp
- kglobalaccel_x11.cpp kglobalaccel.cpp kstdaccel.cpp kshortcutlist.cpp
- kcrash.cpp kurl.cpp kregexp.cpp kglobal.cpp kglobalsettings.cpp
+ kckey.cpp tdeshortcut.cpp kkeynative_x11.cpp kkeyserver_x11.cpp
+ tdeaccelaction.cpp tdeshortcutmenu.cpp tdeaccelbase.cpp tdeaccel.cpp
+ kglobalaccel_x11.cpp kglobalaccel.cpp tdestdaccel.cpp tdeshortcutlist.cpp
+ kcrash.cpp kurl.cpp kregexp.cpp tdeglobal.cpp tdeglobalsettings.cpp
kallocator.cpp kvmallocator.cpp kmimesourcefactory.cpp
- kinstance.cpp kpalette.cpp kipc.cpp klibloader.cpp ktempfile.cpp
- kuniqueapplication.cpp kaccelmanager.cpp ksavefile.cpp
+ kinstance.cpp kpalette.cpp kipc.cpp klibloader.cpp tdetempfile.cpp
+ kuniqueapplication.cpp tdeaccelmanager.cpp ksavefile.cpp
krandomsequence.cpp kstringhandler.cpp kcompletion.cpp
- kcmdlineargs.cpp kaboutdata.cpp kcompletionbase.cpp knotifyclient.cpp
+ tdecmdlineargs.cpp tdeaboutdata.cpp kcompletionbase.cpp knotifyclient.cpp
kaudioplayer.cpp kdcoppropertyproxy.cpp ksockaddr.cpp
kextsock.cpp netsupp.cpp kprocio.cpp kbufferedio.cpp
kpixmapprovider.cpp kurldrag.cpp kmdcodec.cpp ksocks.cpp
- fakes.c vsnprintf.c ksycoca.cpp ksycocadict.cpp ksycoca.skel
- ksycocafactory.cpp kxmessages.cpp kstartupinfo.cpp
- kcatalogue.cpp kasyncio.cpp kmultipledrag.cpp kstaticdeleter.cpp
+ fakes.c vsnprintf.c tdesycoca.cpp tdesycocadict.cpp tdesycoca.skel
+ tdesycocafactory.cpp kxmessages.cpp tdestartupinfo.cpp
+ kcatalogue.cpp kasyncio.cpp tdemultipledrag.cpp kstaticdeleter.cpp
kappdcopiface.cpp kappdcopiface.skel kclipboard.cpp
kcheckaccelerators.cpp tdeversion.cpp kdebugdcopiface.cpp
kdebugdcopiface.skel kcalendarsystem.cpp kcalendarsystemgregorian.cpp
@@ -147,7 +148,7 @@ set( ${target}_SRCS
kcalendarsystemfactory.cpp kmacroexpander.cpp kidna.cpp
ktempdir.cpp kshell.cpp kmountpoint.cpp kcalendarsystemjalali.cpp
kprotocolinfo_tdecore.cpp kprotocolinfofactory.cpp kxerrorhandler.cpp
- kuser.cpp kconfigskeleton.cpp kconfigdialogmanager.cpp klockfile.cpp
+ kuser.cpp tdeconfigskeleton.cpp tdeconfigdialogmanager.cpp klockfile.cpp
kqiodevicegzip_p.cpp ktimezones.cpp tdehardwaredevices.cpp tdenetworkconnections.cpp
ksimpledirwatch.cpp
${TDENM_BACKEND_SOURCES}
diff --git a/tdecore/DESIGN.COLOR b/tdecore/DESIGN.COLOR
index b997a6de0..56ffd1774 100644
--- a/tdecore/DESIGN.COLOR
+++ b/tdecore/DESIGN.COLOR
@@ -25,7 +25,7 @@ contrast at all which can lead to a completely unreadable UI.
Color schemes are supported by Qt (see TQColorGroup) and can be
configured on a KDE wide basis from the Control Panel. The settings
are stored in the global KDE configuration file under the "General"
-setting. The KApplication class takes care that the configured
+setting. The TDEApplication class takes care that the configured
settings are passed on to Qt. Application developers can just use the
values provided by TQColorGroup.
diff --git a/tdecore/DESIGN.iconloading b/tdecore/DESIGN.iconloading
index bcfb13c95..a675a8922 100644
--- a/tdecore/DESIGN.iconloading
+++ b/tdecore/DESIGN.iconloading
@@ -58,7 +58,7 @@ can copy this pixmap:
// p contains now 30x30 pixels of test.png.
The only hard part is then to publish the icons in a way that applications
-know what to copy. I'm thinking about a ksycoca-sort-of index that
+know what to copy. I'm thinking about a tdesycoca-sort-of index that
applications can map and can use to do fast lookups with. This has no major
problems except for the race-condition that might exist when an icon is
removed. In that case you will remove it from the index first and then later
@@ -72,14 +72,14 @@ information and then waiting for a sufficient long period, e.. 5 minutes,
before actually removing the image data.
I can also imagine a scenario where the index information is only used very
-temporarily, e.g. during the creation of a KMainWindow (mmap the file in the
+temporarily, e.g. during the creation of a TDEMainWindow (mmap the file in the
constructor, unmap it from the next event loop) that way icons can be removed
from the index and after e.g. a timeout of 5 minutes one can be relatively
sure that the index will no longer be used.
I think the best way to distribute the index information is through the file
system but the update mechanism for this file should probably more complex
-than the one used in ksycoca. Since ksycoca updates only happen once in a
+than the one used in tdesycoca. Since tdesycoca updates only happen once in a
while, we can afford it to write out a whole new file. For icons this will
probably be more difficult since updates will be part of normal operation, if
the index file is rather large (no idea about that.. how much icons are in
@@ -182,6 +182,6 @@ KDE 2.2: We deliver.
<pmax> oh I see
<Zogje> to answer you rfirst question: "won't the ipc be a bottleneck?" no, because you don't use ipc in the critical part (the icon loading)
<pmax> yup I understand how it works now I think
-<Zogje> instead you access an index from disk which is quite fast (as fast as ksycoca)
+<Zogje> instead you access an index from disk which is quite fast (as fast as tdesycoca)
<pmax> I think this will definitely speed things up on my machine since I have a relatively fast box with slow disks
<Zogje> that's why I want to use the file-system instaed of X-properties
diff --git a/tdecore/DESIGN.kconfig b/tdecore/DESIGN.tdeconfig
index 4ced76726..a1fb48dbd 100644
--- a/tdecore/DESIGN.kconfig
+++ b/tdecore/DESIGN.tdeconfig
@@ -1,4 +1,4 @@
-kconfigdata.h contains definitions of the data formats used by kconfig.
+tdeconfigdata.h contains definitions of the data formats used by tdeconfig.
Configuration entries are stored as "KEntry". They are indexed with "KEntryKey".
The primary store is a "KEntryMap" which is defined as a QMap from "KEntryKey"
@@ -70,7 +70,7 @@ When an entry is read with readEntry(key, defaultValue), non-existing
entries will return "defaultValue" while hasKey(key) will return "false"
for such entries.
-Currently all entries are stored in memory. When KConfig is "sync()'ed"
+Currently all entries are stored in memory. When TDEConfig is "sync()'ed"
it reads the file that it is about to overwrite (for the second time), it
then merges in the entries it has in memory and writes the result back to
the file. It does NOT update its map of entries in memory with the entries
@@ -99,12 +99,12 @@ KDE3.0 Changes
------------------------------------------------------------------------------
-KConfig XT
+TDEConfig XT
==========
-My buzzword picker offered KConfig XT ("eXtended Technology") and KConfig NG
+My buzzword picker offered TDEConfig XT ("eXtended Technology") and TDEConfig NG
("Next Generation"). Since the planned changes are ment to be evolutionary
-rather than revolutionary, KConfig NG was dropped.
+rather than revolutionary, TDEConfig NG was dropped.
Goals
=====
@@ -130,12 +130,12 @@ Type information can be provide by preceding every entry with a formalized
comment.
Work to be done:
-* KConfig needs to be extended to provide access to the default values provided
-by the default config files. KConfig already stores this information internally.
+* TDEConfig needs to be extended to provide access to the default values provided
+by the default config files. TDEConfig already stores this information internally.
(DONE)
* A formal comment structure needs to be designed that can convey type-information.
Preferably in such a way that it is easily parsable by both machine and user.
-* KConfig needs to be extended, or another class created, that is able to parse
+* TDEConfig needs to be extended, or another class created, that is able to parse
the formalized comments.
* A tool needs to be developed that can assist developers with the generation
and verification of default configuration files including type-information.
@@ -170,34 +170,34 @@ Host=wantelbos.zogje.fr
Class overview
- KConfigBase
+ TDEConfigBase
|
v
- KConfigBackend <-----> KConfig <------> KConfigSkeleton /--< myapp.kcfg
+ TDEConfigBackend <-----> TDEConfig <------> TDEConfigSkeleton /--< myapp.kcfg
| | | /
v v |*---------------<
-KConfigINIBackend KSimpleConfig |kconfig_compiler \
+TDEConfigINIBackend KSimpleConfig |tdeconfig_compiler \
| \--< myconfig.kcfg-codegen
v
- MyConfig <-----KConfigDialogManager----> MyConfigWidget *---< myconfigwidget.ui
+ MyConfig <-----TDEConfigDialogManager----> MyConfigWidget *---< myconfigwidget.ui
uic
-KConfigBase: defines API for generic config class
+TDEConfigBase: defines API for generic config class
-KConfig: functional generic config class that supports merging of cascaded
+TDEConfig: functional generic config class that supports merging of cascaded
configuration files
KSimpleConfig: functional generic config class without support for cascading
configuration files.
-KConfigBackend: defines API for config backend, t.i. the actual handling
+TDEConfigBackend: defines API for config backend, t.i. the actual handling
of the storage method and storage format.
-KConfigINIBackend: the standard (and only one so far) class that implements
+TDEConfigINIBackend: the standard (and only one so far) class that implements
the config backend using the file-based .INI format
for configuration files
-KConfigSkeleton: base class for deriving classes that store application
+TDEConfigSkeleton: base class for deriving classes that store application
specific options providing type-safety and single-point
defaults.
@@ -215,9 +215,9 @@ myconfig.kcfg-codegen: Implementation specific code generation instructions
just an example name, the application developer
choses the actual name.
-KConfigDialogManager: Class that links widgets in a dialog up with their
+TDEConfigDialogManager: Class that links widgets in a dialog up with their
corresponding confguration options in a configuration
- object derived from KConfigSkeleton.
+ object derived from TDEConfigSkeleton.
MyConfigWidget: Dialog generated from a .ui description file. Widget names
in the dialog that start with "kcfg_" refer to configuration
diff --git a/tdecore/KCONFIG_DESIGN b/tdecore/KCONFIG_DESIGN
index dfd9aa151..d0fa141ff 100644
--- a/tdecore/KCONFIG_DESIGN
+++ b/tdecore/KCONFIG_DESIGN
@@ -1,9 +1,9 @@
- The basic design on KConfig for KDE 2.0 and KDE 3.0:
+ The basic design on TDEConfig for KDE 2.0 and KDE 3.0:
----------------------------------------
-KConfig is a hierarchy of classes for loading and saving configuration
-data in KDE. KConfigBase is an abstract data type (ADT) with pure
+TDEConfig is a hierarchy of classes for loading and saving configuration
+data in KDE. TDEConfigBase is an abstract data type (ADT) with pure
virtual functions which describes the API for accessing configuration
data. It cannot be instantiated directly; only subclasses which
actually implement the API may be created. The reason for this design
@@ -15,34 +15,34 @@ achieve shared memory config values. The possibilities are endless,
and with this design we insure that future designs will not break
compatibility.
-This means that most classes that currently take pointers to KConfig
-objects should be changed to take pointers to KConfigBase objects.
+This means that most classes that currently take pointers to TDEConfig
+objects should be changed to take pointers to TDEConfigBase objects.
The virtual functions and c++ polymorphism will make sure that the
correct function in the actual, instantiated object are called, but
-this lets the user/programmer change the type of KConfig that has been
+this lets the user/programmer change the type of TDEConfig that has been
implemented at runtime without changing other code.
-Similarly, there is a abstract data type KConfigBackEnd. All
+Similarly, there is a abstract data type TDEConfigBackEnd. All
reading/writing of the physical, on-disk configuration should be done
-through a subclass of KConfigBackEnd. The only class that is
-currently implemented right now is KConfigINIBackEnd, which
+through a subclass of TDEConfigBackEnd. The only class that is
+currently implemented right now is TDEConfigINIBackEnd, which
reads/writes the standard windows INI-style configuration files that
KDE has used since KDE 1.x days. However, it is conceivable that one
might program an XML backend, or even a database/registry style
backend. Again, this abstract data type approach provides flexibility
-for the future. Currently KConfig and KSimpleConfig hardcode that
-they are using a KConfigINIBackEnd in the constructor. If more back
+for the future. Currently TDEConfig and KSimpleConfig hardcode that
+they are using a TDEConfigINIBackEnd in the constructor. If more back
ends are implemented, this will have to be changed to use a factory
method of some sort to create the backend; all they maintain is a
-pointer to a KConfigBackEnd, so the actual type of backend does not
+pointer to a TDEConfigBackEnd, so the actual type of backend does not
matter.
-If you are interested in using KConfig, you need simply to look at the
-public members of KConfigBase. They will provide you with everything
+If you are interested in using TDEConfig, you need simply to look at the
+public members of TDEConfigBase. They will provide you with everything
you need to do to look up data, change and write data, etc. If you
-are interested in implementing a new KConfig format, look at KConfig
+are interested in implementing a new TDEConfig format, look at TDEConfig
for ideas. Likewise if you want to implement a backend, look at
-KConfigINIBackEnd for inspiration. The KDoc-style API documentation
+TDEConfigINIBackEnd for inspiration. The KDoc-style API documentation
should be complete. If there is anything confusing, please either fix
it in CVS yourself or mail me with your questions, and we will make
sure things get clarified.
diff --git a/tdecore/MAINTAINERS b/tdecore/MAINTAINERS
index 07a996b24..ae94ecd7c 100644
--- a/tdecore/MAINTAINERS
+++ b/tdecore/MAINTAINERS
@@ -6,31 +6,31 @@ When adding yourself as a maintainer, don't be afraid to reorder the files to a
more logical grouping.
dmalloc.cpp
-kaboutdata.cpp David Faure <faure@kde.org>
-kaccel.cpp Ellis Whitehead <ellis@kde.org>
-kaccelaction.cpp Ellis Whitehead <ellis@kde.org>
-kaccelbase.cpp Ellis Whitehead <ellis@kde.org>
+tdeaboutdata.cpp David Faure <faure@kde.org>
+tdeaccel.cpp Ellis Whitehead <ellis@kde.org>
+tdeaccelaction.cpp Ellis Whitehead <ellis@kde.org>
+tdeaccelbase.cpp Ellis Whitehead <ellis@kde.org>
kallocator.cpp Waldo Bastian <bastian@kde.org>
kappdcopiface.cpp
-kapplication.cpp Waldo Bastian <bastian@kde.org>
+tdeapplication.cpp Waldo Bastian <bastian@kde.org>
kaudioplayer.cpp
kcatalogue.cpp Hans Petter Bieker <bieker@kde.org>
kcharsets.cpp Lars Knoll <knoll@kde.org>
kckey.cpp
-kcmdlineargs.cpp Waldo Bastian <bastian@kde.org>
+tdecmdlineargs.cpp Waldo Bastian <bastian@kde.org>
kcompletion.cpp Carsten Pfeiffer <pfeiffer@kde.org>
kcompletionbase.cpp
-kconfig.cpp Waldo Bastian <bastian@kde.org>
-kconfigbackend.cpp Waldo Bastian <bastian@kde.org>
-kconfigbase.cpp Waldo Bastian <bastian@kde.org>
+tdeconfig.cpp Waldo Bastian <bastian@kde.org>
+tdeconfigbackend.cpp Waldo Bastian <bastian@kde.org>
+tdeconfigbase.cpp Waldo Bastian <bastian@kde.org>
kcrash.cpp Waldo Bastian <bastian@kde.org>
kdcoppropertyproxy.cpp
kdebug.cpp Stephan Kulow <coolo@kde.org>
kdesktopfile.cpp
-kglobal.cpp Stephan Kulow <coolo@kde.org>
+tdeglobal.cpp Stephan Kulow <coolo@kde.org>
kglobalaccel.cpp Ellis Whitehead <ellis@kde.org>
kglobalaccel_x11.cpp Ellis Whitehead <ellis@kde.org>
-kglobalsettings.cpp David Faure <faure@kde.org>
+tdeglobalsettings.cpp David Faure <faure@kde.org>
kiconeffect.cpp
kiconloader.cpp
kicontheme.cpp
@@ -41,10 +41,10 @@ kkeynative_x11.cpp Ellis Whitehead <ellis@kde.org>
kkeysequence.cpp Ellis Whitehead <ellis@kde.org>
kkeysequence_emb.cpp Ellis Whitehead <ellis@kde.org>
klibloader.cpp
-klocale.cpp Hans Petter Bieker <bieker@kde.org>
+tdelocale.cpp Hans Petter Bieker <bieker@kde.org>
kmdcodec.cpp
kmimesourcefactory.cpp
-kmultipledrag.cpp David Faure <faure@kde.org>
+tdemultipledrag.cpp David Faure <faure@kde.org>
knotifyclient.cpp
kpalette.cpp Waldo Bastian <bastian@kde.org>
kpixmapprovider.cpp Carsten Pfeiffer <pfeiffer@kde.org>
@@ -56,18 +56,18 @@ kregexp.cpp
krfcdate.cpp Waldo Bastian <bastian@kde.org>
krootprop.cpp Lubos Lunak <l.lunak@kde.org>
ksavefile.cpp Waldo Bastian <bastian@kde.org>
-kshortcut.cpp Ellis Whitehead <ellis@kde.org>
+tdeshortcut.cpp Ellis Whitehead <ellis@kde.org>
ksimpleconfig.cpp Waldo Bastian <bastian@kde.org>
ksocks.cpp
kstandarddirs.cpp Waldo Bastian <bastian@kde.org>
-kstartupinfo.cpp Lubos Lunak <l.lunak@kde.org>
+tdestartupinfo.cpp Lubos Lunak <l.lunak@kde.org>
kstaticdeleter.cpp Stephan Kulow <coolo@kde.org>
-kstdaccel.cpp Ellis Whitehead <ellis@kde.org>
+tdestdaccel.cpp Ellis Whitehead <ellis@kde.org>
kstringhandler.cpp
-ksycoca.cpp Waldo Bastian <bastian@kde.org>
-ksycocadict.cpp Waldo Bastian <bastian@kde.org>
-ksycocafactory.cpp Waldo Bastian <bastian@kde.org>
-ktempfile.cpp Waldo Bastian <bastian@kde.org>
+tdesycoca.cpp Waldo Bastian <bastian@kde.org>
+tdesycocadict.cpp Waldo Bastian <bastian@kde.org>
+tdesycocafactory.cpp Waldo Bastian <bastian@kde.org>
+tdetempfile.cpp Waldo Bastian <bastian@kde.org>
kuniqueapplication.cpp Waldo Bastian <bastian@kde.org>
kurl.cpp Waldo Bastian <bastian@kde.org>
kurldrag.cpp David Faure <faure@kde.org>
@@ -94,8 +94,8 @@ kcalendarsystemhijri.cpp
kcalendarsystemjalali.cpp Arash Bijanzadeh and FarsiKDE Project <www.farsikde.org> (copyright)
kcheckaccelerators.cpp Matthias Kalle Dalheimer (kalle@kde.org) (copyright)
kclipboard.cpp Carsten Pfeiffer <pfeiffer@kde.org> (copyright)
-kconfigdialogmanager.cpp
-kconfigskeleton.cpp
+tdeconfigdialogmanager.cpp
+tdeconfigskeleton.cpp
kdebugdcopiface.cpp Andreas Beckermann (b_mann@gmx.de) (copyright)
tdeversion.cpp
kglobalaccel_win.cpp Ellis Whitehead <ellis@kde.org> (copyright)
@@ -109,7 +109,7 @@ kprotocolinfofactory.cpp Torben Weis <weis@kde.org> (copyright)
kprotocolinfofactory.cpp Waldo Bastian <bastian@kde.org> (copyright)
kpty.cpp
kshell.cpp Oswald Buddenhagen <ossi@kde.org> (copyright)
-kshortcutmenu.cpp Ellis Whitehead <ellis@kde.org> (copyright)
+tdeshortcutmenu.cpp Ellis Whitehead <ellis@kde.org> (copyright)
ktempdir.cpp Joseph Wenninger <jowenn@kde.org> (copyright)
kuser.cpp Tim Jansen <tim@tjansen.de> (copyright)
kvmallocator.cpp Waldo Bastian (bastian@kde.org) (copyright)
diff --git a/tdecore/Mainpage.dox b/tdecore/Mainpage.dox
index c0e13a339..cbf8f69d9 100644
--- a/tdecore/Mainpage.dox
+++ b/tdecore/Mainpage.dox
@@ -6,7 +6,7 @@ support, site-independent access to the filesystem and a large number
of other (but no less important) things.
<p>
All Trinity applications should link to the tdecore library. Also, using a
-KApplication derived class instead of TQApplication is almost
+TDEApplication derived class instead of TQApplication is almost
mandatory if you expect your application to behave nicely within the
Trinity environment.
diff --git a/tdecore/Makefile.am b/tdecore/Makefile.am
index f8856108c..c04ee4c6d 100644
--- a/tdecore/Makefile.am
+++ b/tdecore/Makefile.am
@@ -27,7 +27,7 @@ SVGICONS=svgicons
SVGICON_LIB=svgicons/libkdesvgicons.la
endif
-SUBDIRS = malloc network $(SVGICONS) . kconfig_compiler tests
+SUBDIRS = malloc network $(SVGICONS) . tdeconfig_compiler tests
# For the future: examine if condensing the tons of *_LDFLAGS variables
# into $(all_libraries) isn't better
@@ -36,25 +36,25 @@ AM_LDFLAGS = $(LDFLAGS_AS_NEEDED) $(LDFLAGS_NEW_DTAGS)
lib_LTLIBRARIES = libtdefakes.la libtdecore.la
lib_LIBRARIES = libtdefakes_nonpic.a libtdefakes_pic.a
-include_HEADERS = kconfig.h kconfigskeleton.h \
- kconfigdata.h ksimpleconfig.h kconfigdialogmanager.h \
- kconfigbase.h kdesktopfile.h kurl.h ksock.h kaboutdata.h \
- kcmdlineargs.h kconfigbackend.h kapp.h kapplication.h kuniqueapp.h \
+include_HEADERS = tdeconfig.h tdeconfigskeleton.h \
+ tdeconfigdata.h ksimpleconfig.h tdeconfigdialogmanager.h \
+ tdeconfigbase.h kdesktopfile.h kurl.h ksock.h tdeaboutdata.h \
+ tdecmdlineargs.h tdeconfigbackend.h kapp.h tdeapplication.h kuniqueapp.h \
kuniqueapplication.h kcharsets.h tdeversion.h kpty.h kprocess.h \
- kprocctrl.h klocale.h kicontheme.h kiconloader.h kdebug.h \
- twinmodule.h twin.h krootprop.h kshortcut.h kkeynative.h kaccel.h \
- kglobalaccel.h kstdaccel.h kshortcutlist.h kcatalogue.h \
+ kprocctrl.h tdelocale.h kicontheme.h kiconloader.h kdebug.h \
+ twinmodule.h twin.h krootprop.h tdeshortcut.h kkeynative.h tdeaccel.h \
+ kglobalaccel.h tdestdaccel.h tdeshortcutlist.h kcatalogue.h \
kregexp.h kcompletion.h kstringhandler.h \
- kstddirs.h kstandarddirs.h kglobal.h kglobalsettings.h ksharedptr.h \
+ kstddirs.h kstandarddirs.h tdeglobal.h tdeglobalsettings.h ksharedptr.h \
kallocator.h kvmallocator.h kcrash.h krfcdate.h \
- kinstance.h kpalette.h kipc.h klibloader.h ktempfile.h ksavefile.h \
+ kinstance.h kpalette.h kipc.h klibloader.h tdetempfile.h ksavefile.h \
krandomsequence.h knotifyclient.h kiconeffect.h \
- kaudioplayer.h kdcoppropertyproxy.h netwm.h kaccelmanager.h \
+ kaudioplayer.h kdcoppropertyproxy.h netwm.h tdeaccelmanager.h \
netwm_def.h kpixmapprovider.h kunload.h kstaticdeleter.h \
kextsock.h kextendedsocket.h ksockaddr.h kprocio.h kasyncio.h \
kbufferedio.h kurldrag.h kmimesourcefactory.h kmdcodec.h ksocks.h \
- ksycoca.h ksycocaentry.h ksycocatype.h kxmessages.h kstartupinfo.h \
- klargefile.h kmultipledrag.h kgenericfactory.h kgenericfactory.tcc \
+ tdesycoca.h tdesycocaentry.h tdesycocatype.h kxmessages.h tdestartupinfo.h \
+ klargefile.h tdemultipledrag.h kgenericfactory.h kgenericfactory.tcc \
ktypelist.h ksortablevaluelist.h kdebugclasses.h kclipboard.h \
kcalendarsystem.h kcalendarsystemfactory.h kmacroexpander.h \
kmanagerselection.h kmountpoint.h kuser.h klockfile.h \
@@ -81,36 +81,36 @@ libtdefakes_pic.a: libtdefakes.la
ar cru libtdefakes_pic.a fakes_pic.o vsnprintf_pic.o
ranlib libtdefakes_pic.a
-noinst_HEADERS = kaccelaction.h kaccelbase.h kaccelprivate.h kckey.h \
+noinst_HEADERS = tdeaccelaction.h tdeaccelbase.h tdeaccelprivate.h kckey.h \
kcompletion_private.h netwm_p.h \
kglobalaccel_x11.h kglobalaccel_win.h kkeyserver_x11.h kkeyserver.h \
- kregpriv.h kshortcutmenu.h ksycocadict.h ksycocafactory.h netsupp.h \
+ kregpriv.h tdeshortcutmenu.h tdesycocadict.h tdesycocafactory.h netsupp.h \
kcheckaccelerators.h kcalendarsystemgregorian.h \
kcalendarsystemhijri.h kcalendarsystemhebrew.h kcalendarsystemjalali.h \
kprotocolinfofactory.h kqiodevicegzip_p.h kiconloader_p.h
-libtdecore_la_SOURCES = libintl.cpp kapplication.cpp \
- kdebug.cpp netwm.cpp kconfigbase.cpp kconfig.cpp ksimpleconfig.cpp \
- kconfigbackend.cpp kmanagerselection.cpp kdesktopfile.cpp \
+libtdecore_la_SOURCES = libintl.cpp tdeapplication.cpp \
+ kdebug.cpp netwm.cpp tdeconfigbase.cpp tdeconfig.cpp ksimpleconfig.cpp \
+ tdeconfigbackend.cpp kmanagerselection.cpp kdesktopfile.cpp \
kstandarddirs.cpp ksock.cpp kpty.cpp kprocess.cpp kprocctrl.cpp \
- klocale.cpp krfcdate.cpp kiconeffect.cpp kicontheme.cpp \
+ tdelocale.cpp krfcdate.cpp kiconeffect.cpp kicontheme.cpp \
kiconloader.cpp twin.cpp twinmodule.cpp krootprop.cpp kcharsets.cpp \
- kckey.cpp kshortcut.cpp kkeynative_x11.cpp kkeyserver_x11.cpp \
- kaccelaction.cpp kshortcutmenu.cpp kaccelbase.cpp kaccel.cpp \
- kglobalaccel_x11.cpp kglobalaccel.cpp kstdaccel.cpp kshortcutlist.cpp \
- kcrash.cpp kurl.cpp kregexp.cpp kglobal.cpp kglobalsettings.cpp \
+ kckey.cpp tdeshortcut.cpp kkeynative_x11.cpp kkeyserver_x11.cpp \
+ tdeaccelaction.cpp tdeshortcutmenu.cpp tdeaccelbase.cpp tdeaccel.cpp \
+ kglobalaccel_x11.cpp kglobalaccel.cpp tdestdaccel.cpp tdeshortcutlist.cpp \
+ kcrash.cpp kurl.cpp kregexp.cpp tdeglobal.cpp tdeglobalsettings.cpp \
kallocator.cpp kvmallocator.cpp kmimesourcefactory.cpp \
- kinstance.cpp kpalette.cpp kipc.cpp klibloader.cpp ktempfile.cpp \
- kuniqueapplication.cpp kaccelmanager.cpp \
+ kinstance.cpp kpalette.cpp kipc.cpp klibloader.cpp tdetempfile.cpp \
+ kuniqueapplication.cpp tdeaccelmanager.cpp \
ksavefile.cpp krandomsequence.cpp kstringhandler.cpp kcompletion.cpp \
- kcmdlineargs.cpp kaboutdata.cpp kcompletionbase.cpp knotifyclient.cpp \
+ tdecmdlineargs.cpp tdeaboutdata.cpp kcompletionbase.cpp knotifyclient.cpp \
kaudioplayer.cpp kdcoppropertyproxy.cpp \
ksockaddr.cpp kextsock.cpp netsupp.cpp kprocio.cpp kbufferedio.cpp \
kpixmapprovider.cpp kurldrag.cpp \
kmdcodec.cpp ksocks.cpp fakes.c vsnprintf.c \
- ksycoca.cpp ksycocadict.cpp ksycocafactory.cpp ksycoca.skel \
- kxmessages.cpp kstartupinfo.cpp kcatalogue.cpp kasyncio.cpp \
- kmultipledrag.cpp kstaticdeleter.cpp kappdcopiface.cpp \
+ tdesycoca.cpp tdesycocadict.cpp tdesycocafactory.cpp tdesycoca.skel \
+ kxmessages.cpp tdestartupinfo.cpp kcatalogue.cpp kasyncio.cpp \
+ tdemultipledrag.cpp kstaticdeleter.cpp kappdcopiface.cpp \
kappdcopiface.skel kclipboard.cpp kcheckaccelerators.cpp \
tdeversion.cpp kdebugdcopiface.cpp kdebugdcopiface.skel \
kcalendarsystem.cpp kcalendarsystemgregorian.cpp \
@@ -118,7 +118,7 @@ libtdecore_la_SOURCES = libintl.cpp kapplication.cpp \
kcalendarsystemfactory.cpp kmacroexpander.cpp kidna.cpp \
ktempdir.cpp kshell.cpp kmountpoint.cpp kcalendarsystemjalali.cpp \
kprotocolinfo_tdecore.cpp kprotocolinfofactory.cpp kxerrorhandler.cpp \
- kuser.cpp kconfigskeleton.cpp kconfigdialogmanager.cpp klockfile.cpp \
+ kuser.cpp tdeconfigskeleton.cpp tdeconfigdialogmanager.cpp klockfile.cpp \
kqiodevicegzip_p.cpp ktimezones.cpp
libtdecore_la_LDFLAGS = $(QT_LDFLAGS) $(KDE_RPATH) $(KDE_MT_LDFLAGS) $(X_LDFLAGS) $(USER_LDFLAGS) -version-info 6:0:2 -no-undefined
@@ -143,16 +143,16 @@ kckey_h : $(srcdir)/generate_keys.sh $(QNAMESPACE_H)
install-data-local:
$(mkinstalldirs) $(DESTDIR)$(kde_locale)
$(INSTALL_DATA) $(srcdir)/all_languages.desktop $(DESTDIR)$(kde_locale)/all_languages
- $(mkinstalldirs) $(DESTDIR)$(includedir)/kio
+ $(mkinstalldirs) $(DESTDIR)$(includedir)/tdeio
$(mkinstalldirs) $(DESTDIR)$(kde_datadir)/knotify
$(INSTALL_DATA) $(srcdir)/eventsrc $(DESTDIR)$(kde_datadir)/knotify/eventsrc
- $(INSTALL_DATA) $(srcdir)/kmdcodec_compat.h $(DESTDIR)$(includedir)/kio/kmdcodec.h
+ $(INSTALL_DATA) $(srcdir)/kmdcodec_compat.h $(DESTDIR)$(includedir)/tdeio/kmdcodec.h
rm -f "$(DESTDIR)$(kde_confdir)/colors/40 Colors"
rm -f $(DESTDIR)$(kde_confdir)/colors/Web
rm -f $(DESTDIR)$(kde_confdir)/colors/Royal
uninstall-local:
- -rm -f $(DESTDIR)$(includedir)/kio/kmdcodec.h
+ -rm -f $(DESTDIR)$(includedir)/tdeio/kmdcodec.h
# If you add a color palette file here, please change tdelibs/tdeui/kcolordialog.cpp too to allow to translate the name
colors_DATA = 40.colors Web.colors Royal.colors Rainbow.colors
@@ -188,7 +188,7 @@ install-exec-hook:
DISTCLEANFILES = tde-config.cpp
-DOXYGEN_REFERENCES = dcop tdeui kparts kio
+DOXYGEN_REFERENCES = dcop tdeui tdeparts kio
DOXYGEN_EXCLUDE = malloc kde_file.h
DOXYGEN_SET_WARN_IF_UNDOCUMENTED = YES
diff --git a/tdecore/README.exec b/tdecore/README.exec
index f2065b7ad..d47c808e9 100644
--- a/tdecore/README.exec
+++ b/tdecore/README.exec
@@ -7,9 +7,9 @@ you should or should not use them.
1. fork + exec
You never want to use this unless you have a very good reason why it is
-impossible to use KProcess.
+impossible to use TDEProcess.
-2. KProcess
+2. TDEProcess
You want to use this if you need to start a new process which needs to be a
child of your process, e.g. because you want to catch stdout/stderr or need
@@ -20,7 +20,7 @@ off with KProcIO
3. KProcIO
-Like KProcess. Unlike KProcess, this class actually makes it easy to
+Like TDEProcess. Unlike TDEProcess, this class actually makes it easy to
send data to and receive data from the process.
4. startServiceByDesktopPath
diff --git a/tdecore/README.kiosk b/tdecore/README.kiosk
index 896981d33..54ab60d2d 100644
--- a/tdecore/README.kiosk
+++ b/tdecore/README.kiosk
@@ -28,7 +28,7 @@ resources provided by the system were located under $TDEDIR and user-
specific resources were located under $HOME/.trinity.
In KDE2 resource management has been largely abstracted by the introduction
-of the KStandardDirs class and has become much more flexible. The user /
+of the TDEStandardDirs class and has become much more flexible. The user /
administrator can now specify a variable number of locations where resources
can be found. A list of locations can either be specified via $TDEDIRS
(notice the extra 'S'), via /etc/kderc and even via the kdeglobals config
@@ -64,7 +64,7 @@ that haven't explicitly changed the affected settings to something else.
Starting with KDE3, configuration entries can be marked "immutable". When a
configuration entry is immutable it means that configuration files that are
read later will not be able to override its value. Immutable entries cannot
-be changed via KConfig and if the entry is present under $TDEHOME it will
+be changed via TDEConfig and if the entry is present under $TDEHOME it will
be ignored.
Entries can be marked immutable on 4 different levels:
@@ -331,7 +331,7 @@ Applications may use additional actions that they defined themselves.
You can get a list of the actions used by a certain applications by using the
following dcop command:
-dcop <dcopid> qt objects | grep KActionCollection/ | cut -d '/' -f 3
+dcop <dcopid> qt objects | grep TDEActionCollection/ | cut -d '/' -f 3
or with
@@ -492,11 +492,11 @@ of these actions then the application will not appear in the TDE menu and will n
be used by KDE for opening files.
IMPORTANT NOTE:
-Changing restrictions may influence the data that is cached in the ksycoca
+Changing restrictions may influence the data that is cached in the tdesycoca
database. Since changes to .../share/config/kdeglobals do not trigger an
-automatic ksycoca update you need to force an update manually.
-To force an update of the ksycoca database touch the file
-.../share/services/update_ksycoca. This will force a user's sycoca database
+automatic tdesycoca update you need to force an update manually.
+To force an update of the tdesycoca database touch the file
+.../share/services/update_tdesycoca. This will force a user's sycoca database
to be rebuild the next time the user logs in.
KDE3 URL Restrictions
@@ -616,7 +616,7 @@ tde-display.desktop
tde-proxy.desktop
tde-screensaver.desktop
-See also kcmshell --list for a list of all the base names.
+See also tdecmshell --list for a list of all the base names.
Expansion of environment variables in KDE config files.
=======================================================
@@ -657,10 +657,10 @@ Host[$e]=$(hostname)
KDE3 Kiosk Application API
==========================
-Three new methods have been added to KApplication:
+Three new methods have been added to TDEApplication:
- bool authorize(QString action); // Generic actions
-- bool authorizeKAction(QString action); // For KActions exclusively
+- bool authorizeTDEAction(QString action); // For TDEActions exclusively
- bool authorizeURLAction(QString, referringURL, destinationURL) // URL Handling
Automatic Logout
diff --git a/tdecore/README.kstartupinfo b/tdecore/README.kstartupinfo
index 496f75ecd..5ece291ea 100644
--- a/tdecore/README.kstartupinfo
+++ b/tdecore/README.kstartupinfo
@@ -30,7 +30,7 @@ ASNs which will stay too long until a timeout ). For improving the quality
of ASN and reducing the number of ASNs that don't detect when the application
has started, some .desktop file entries may be helpful ( see below ).
If you want to start an application in your code, prefer using KRun or
-KApplication::startServiceByXXX() calls. Classes like KProcess don't create
+TDEApplication::startServiceByXXX() calls. Classes like TDEProcess don't create
ASN, so if you need to use it, you have to send it manually ( only in case
ASN is useful in this case, it shouldn't be sent e.g. for system processes ).
@@ -84,16 +84,16 @@ value, and for apps which need it also X-TDE-WMClass should be set. This
sometimes gives slightly better behavior than when these entries are not set.
-The KStartupInfo classes :
+The TDEStartupInfo classes :
--------------------------
In some cases, or if you are interested in getting the ASN information, you
-have to use the KStartupInfo classes in tdelibs/tdecore.
+have to use the TDEStartupInfo classes in tdelibs/tdecore.
Receiving the application startup notification information :
------------------------------------------------------------
- Create an instance of class KStartupInfo and connect to its slots, they
+ Create an instance of class TDEStartupInfo and connect to its slots, they
will be emitted whenever a ASN info is received.
The clean_on_cantdetect argument to the constructor means whether all
ASN info for non-compliant apps should be removed when a window is mapped
@@ -125,8 +125,8 @@ about the finished process should be sent. Since the application may
have forked into background, the finish info should include the PID
and hostname, and the notification will be stopped only if there's
no other PID for it. On the other hand, if you simply really need
-to stop ASN, send only the identification ( KStartupInfo::sendFinish()
-with only KStartupInfoId argument ).
+to stop ASN, send only the identification ( TDEStartupInfo::sendFinish()
+with only TDEStartupInfoId argument ).
@@ -148,8 +148,8 @@ forks into background, it sends the PID change. That's how compliant
applications should work, and this support for ASN should be provided
by toolkits. All KDE application should be compliant by now, since
tdelibs do all the necessary things. The KDE_STARTUP_ENV variable
-is read and unset in KApplication constructor, and _KDE_STARTUP_ID
-is set on every toplevel window in KApplication::setTopWidget().
+is read and unset in TDEApplication constructor, and _KDE_STARTUP_ID
+is set on every toplevel window in TDEApplication::setTopWidget().
However, majority of applications aren't compliant now, and even
if I succeed making this thing a standard ( part of NETWM_SPEC
or whatever ), there still will be old applications that won't behave
@@ -171,11 +171,11 @@ is 'xemacs', but WM_CLASS is 'emacs', 'Emacs', so its X-TDE-WMClass
in its .desktop file should be set to 'emacs' - the case doesn't
matter ).
The ASN identification string must be a unique string for every ASN.
-In KStartupInfo class, it's created as 'hostname;tm.sec;tm.usec;pid',
+In TDEStartupInfo class, it's created as 'hostname;tm.sec;tm.usec;pid',
tm being the current time. If the identification string is set to "0",
-it means no ASN should be done ( e.g. for things like kio_uiserver,
+it means no ASN should be done ( e.g. for things like tdeio_uiserver,
which shouldn't get ASN ). Empty identification string means the same
-like "0", except for the call to KStartupInfoId::initId(), where it means
+like "0", except for the call to TDEStartupInfoId::initId(), where it means
to create a new one.
diff --git a/tdecore/hwlibdaemons/CMakeLists.txt b/tdecore/hwlibdaemons/CMakeLists.txt
new file mode 100644
index 000000000..edc853c95
--- /dev/null
+++ b/tdecore/hwlibdaemons/CMakeLists.txt
@@ -0,0 +1,13 @@
+#################################################
+#
+# (C) 2012 Timothy Pearson
+# kb9vqf (AT) pearsoncomputing.net
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+
+add_subdirectory( dbus )
diff --git a/tdecore/hwlibdaemons/dbus/CMakeLists.txt b/tdecore/hwlibdaemons/dbus/CMakeLists.txt
new file mode 100644
index 000000000..4d1f4618a
--- /dev/null
+++ b/tdecore/hwlibdaemons/dbus/CMakeLists.txt
@@ -0,0 +1,37 @@
+#################################################
+#
+# (C) 2012 Timothy Pearson
+# kb9vqf (AT) pearsoncomputing.net
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+include_directories(
+ ${DBUS_INCLUDE_DIRS}
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}
+)
+
+##### tde_dbus_hardwarecontrol ##################
+
+tde_add_executable( tde_dbus_hardwarecontrol
+ SOURCES tde_dbus_hardwarecontrol.c
+ LINK ${DBUS_LIBRARIES}
+ DESTINATION ${BIN_INSTALL_DIR}
+)
+
+##### other data ################################
+
+configure_file( org.trinitydesktop.hardwarecontrol.service.cmake org.trinitydesktop.hardwarecontrol.service @ONLY )
+
+install( FILES
+ org.trinitydesktop.hardwarecontrol.conf
+ DESTINATION ${DBUS_SYSTEM_CONF_DIRECTORY} )
+
+install( FILES
+ ${CMAKE_CURRENT_BINARY_DIR}/org.trinitydesktop.hardwarecontrol.service
+ DESTINATION ${DBUS_SERVICE_DIRECTORY} )
diff --git a/tdecore/hwlibdaemons/dbus/org.trinitydesktop.hardwarecontrol.conf b/tdecore/hwlibdaemons/dbus/org.trinitydesktop.hardwarecontrol.conf
new file mode 100644
index 000000000..a649b969f
--- /dev/null
+++ b/tdecore/hwlibdaemons/dbus/org.trinitydesktop.hardwarecontrol.conf
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?> <!-- -*- XML -*- -->
+
+<!DOCTYPE busconfig PUBLIC
+ "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
+ "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
+<busconfig>
+ <!-- Only root can own the service -->
+ <policy user="root">
+ <allow own="org.trinitydesktop.hardwarecontrol"/>
+ </policy>
+
+ <policy at_console="true">
+ <!-- Users with physical access to the machine are allowed access -->
+ <allow send_destination="org.trinitydesktop.hardwarecontrol"
+ send_interface="org.freedesktop.DBus.Introspectable"/>
+
+ <allow send_destination="org.trinitydesktop.hardwarecontrol"
+ send_interface="org.freedesktop.DBus.Properties"/>
+ <allow send_destination="org.trinitydesktop.hardwarecontrol.CPUGovernor"
+ send_interface="org.freedesktop.DBus.Properties"/>
+ <allow send_destination="org.trinitydesktop.hardwarecontrol.Brightness"
+ send_interface="org.freedesktop.DBus.Properties"/>
+
+ <allow send_destination="org.trinitydesktop.hardwarecontrol"
+ send_interface="org.trinitydesktop.hardwarecontrol"/>
+ <allow send_destination="org.trinitydesktop.hardwarecontrol"
+ send_interface="org.trinitydesktop.hardwarecontrol.CPUGovernor"/>
+ <allow send_destination="org.trinitydesktop.hardwarecontrol"
+ send_interface="org.trinitydesktop.hardwarecontrol.Brightness"/>
+ </policy>
+
+ <policy context="default">
+ <!-- Everyone else is denied access -->
+ <deny own="org.trinitydesktop.hardwarecontrol"/>
+
+ <deny send_destination="org.trinitydesktop.hardwarecontrol"/>
+ </policy>
+</busconfig>
diff --git a/tdecore/hwlibdaemons/dbus/org.trinitydesktop.hardwarecontrol.service.cmake b/tdecore/hwlibdaemons/dbus/org.trinitydesktop.hardwarecontrol.service.cmake
new file mode 100644
index 000000000..3be2ebeee
--- /dev/null
+++ b/tdecore/hwlibdaemons/dbus/org.trinitydesktop.hardwarecontrol.service.cmake
@@ -0,0 +1,4 @@
+[D-BUS Service]
+Name=org.trinitydesktop.hardwarecontrol
+Exec=@BIN_INSTALL_DIR@/tde_dbus_hardwarecontrol
+User=root \ No newline at end of file
diff --git a/tdecore/hwlibdaemons/dbus/tde_dbus_hardwarecontrol.c b/tdecore/hwlibdaemons/dbus/tde_dbus_hardwarecontrol.c
new file mode 100644
index 000000000..f7e707522
--- /dev/null
+++ b/tdecore/hwlibdaemons/dbus/tde_dbus_hardwarecontrol.c
@@ -0,0 +1,327 @@
+#define DBUS_API_SUBJECT_TO_CHANGE
+#include <dbus/dbus.h>
+#include <stdbool.h>
+#include <unistd.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+void reply_Bool(DBusMessage* msg, DBusConnection* conn, int value) {
+ DBusMessage* reply;
+ DBusMessageIter args;
+ const char* member = dbus_message_get_member(msg);
+ dbus_uint32_t serial = 0;
+
+ // create a reply from the message
+ reply = dbus_message_new_method_return(msg);
+
+ // add the arguments to the reply
+ dbus_message_iter_init_append(reply, &args);
+ if (!dbus_message_iter_append_basic(&args, DBUS_TYPE_BOOLEAN, &value)) {
+ fprintf(stderr, "[tde_dbus_hardwarecontrol] %s: dbus_message_iter_append_basic failed\n", member);
+ return;
+ }
+
+ // send the reply && flush the connection
+ if (!dbus_connection_send(conn, reply, &serial)) {
+ fprintf(stderr, "[tde_dbus_hardwarecontrol] %s: dbus_connection_send failed\n", member);
+ return;
+ }
+ dbus_connection_flush(conn);
+
+ // free the reply
+ dbus_message_unref(reply);
+}
+
+void reply_CanSetGivenPath(DBusMessage* msg, DBusConnection* conn, const char* param) {
+ DBusMessage* reply;
+ DBusMessageIter args;
+ const char* member = dbus_message_get_member(msg);
+ dbus_uint32_t serial = 0;
+ int writable = false;
+
+ // check if path is writable
+ int rval = access (param, W_OK);
+ if (rval == 0) {
+ writable = true;
+ }
+
+ // create a reply from the message
+ reply = dbus_message_new_method_return(msg);
+
+ // add the arguments to the reply
+ dbus_message_iter_init_append(reply, &args);
+ if (!dbus_message_iter_append_basic(&args, DBUS_TYPE_BOOLEAN, &writable)) {
+ fprintf(stderr, "[tde_dbus_hardwarecontrol] %s: dbus_message_iter_append_basic failed\n", member);
+ return;
+ }
+
+ // send the reply && flush the connection
+ if (!dbus_connection_send(conn, reply, &serial)) {
+ fprintf(stderr, "[tde_dbus_hardwarecontrol] %s: dbus_connection_send failed\n", member);
+ return;
+ }
+ dbus_connection_flush(conn);
+
+ // free the reply
+ dbus_message_unref(reply);
+}
+
+void reply_SetGivenPath(DBusMessage* msg, DBusConnection* conn, const char* param, const char* contents) {
+ DBusMessage* reply;
+ DBusMessageIter args;
+ const char* member = dbus_message_get_member(msg);
+ dbus_uint32_t serial = 0;
+ int writable = false;
+ int written = false;
+
+ // check if path is writable
+ int rval = access (param, W_OK);
+ if (rval == 0) {
+ writable = true;
+ }
+
+ if (writable) {
+ FILE *node = fopen(param, "w");
+ if (node != NULL) {
+ if (fputs(contents, node) != EOF) {
+ written = true;
+ }
+ if (fclose(node) == EOF) {
+ // Error!
+ }
+ }
+ }
+
+ // create a reply from the message
+ reply = dbus_message_new_method_return(msg);
+
+ // add the arguments to the reply
+ dbus_message_iter_init_append(reply, &args);
+ if (!dbus_message_iter_append_basic(&args, DBUS_TYPE_BOOLEAN, &written)) {
+ fprintf(stderr, "[tde_dbus_hardwarecontrol] %s: dbus_message_iter_append_basic failed\n", member);
+ return;
+ }
+
+ // send the reply && flush the connection
+ if (!dbus_connection_send(conn, reply, &serial)) {
+ fprintf(stderr, "[tde_dbus_hardwarecontrol] %s: dbus_connection_send failed\n", member);
+ return;
+ }
+ dbus_connection_flush(conn);
+
+ // free the reply
+ dbus_message_unref(reply);
+}
+
+void reply_CanSetCPUGovernor(DBusMessage* msg, DBusConnection* conn) {
+ DBusMessageIter args;
+ const char* member = dbus_message_get_member(msg);
+ dbus_int32_t cpunum;
+ char path[256];
+
+ // read the arguments
+ if (!dbus_message_iter_init(msg, &args)) {
+ fprintf(stderr, "[tde_dbus_hardwarecontrol] %s: no argument supplied\n", member);
+ }
+ else if (DBUS_TYPE_INT32 != dbus_message_iter_get_arg_type(&args)) {
+ fprintf(stderr, "[tde_dbus_hardwarecontrol] %s: argument not 32-bit integer\n", member);
+ }
+ else {
+ dbus_message_iter_get_basic(&args, &cpunum);
+ }
+
+ snprintf(path, 256, "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor", cpunum);
+ reply_CanSetGivenPath(msg, conn, path);
+}
+
+void reply_SetCPUGovernor(DBusMessage* msg, DBusConnection* conn) {
+ DBusMessageIter args;
+ const char* member = dbus_message_get_member(msg);
+ dbus_int32_t cpunum = -1;
+ char* governor = NULL;
+ char path[256];
+
+ // read the arguments
+ if (!dbus_message_iter_init(msg, &args)) {
+ fprintf(stderr, "[tde_dbus_hardwarecontrol] %s: no arguments supplied\n", member);
+ }
+ else if (DBUS_TYPE_INT32 != dbus_message_iter_get_arg_type(&args)) {
+ fprintf(stderr, "[tde_dbus_hardwarecontrol] %s: first argument not 32-bit integer\n", member);
+ }
+ else {
+ dbus_message_iter_get_basic(&args, &cpunum);
+ }
+
+ if (!dbus_message_iter_next(&args)) {
+ fprintf(stderr, "[tde_dbus_hardwarecontrol] %s: second argument not supplied\n", member);
+ }
+ else if (DBUS_TYPE_STRING != dbus_message_iter_get_arg_type(&args)) {
+ fprintf(stderr, "[tde_dbus_hardwarecontrol] %s: second argument not string\n", member);
+ }
+ else {
+ dbus_message_iter_get_basic(&args, &governor);
+ }
+
+ snprintf(path, 256, "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor", cpunum);
+ if ((cpunum>-1) && governor) {
+ reply_SetGivenPath(msg, conn, path, governor);
+ }
+ else {
+ reply_Bool(msg, conn, false);
+ }
+}
+
+void reply_CanSetBrightness(DBusMessage* msg, DBusConnection* conn) {
+ DBusMessageIter args;
+ const char* member = dbus_message_get_member(msg);
+ char* rawpath;
+ char* safepath;
+ char path[256];
+
+ // read the arguments
+ if (!dbus_message_iter_init(msg, &args)) {
+ fprintf(stderr, "[tde_dbus_hardwarecontrol] %s: no argument supplied\n", member);
+ }
+ else if (DBUS_TYPE_STRING != dbus_message_iter_get_arg_type(&args)) {
+ fprintf(stderr, "[tde_dbus_hardwarecontrol] %s: argument not string\n", member);
+ }
+ else {
+ dbus_message_iter_get_basic(&args, &rawpath);
+ }
+
+ safepath = realpath(rawpath, NULL);
+
+ if (safepath &&
+ (strstr(safepath, "/sys/devices") == safepath) &&
+ (strstr(safepath, "/brightness") == (safepath+strlen(safepath)-strlen("/brightness")))
+ ) {
+ reply_CanSetGivenPath(msg, conn, safepath);
+ }
+ else {
+ reply_Bool(msg, conn, false);
+ }
+
+ free(safepath);
+}
+
+void reply_SetBrightness(DBusMessage* msg, DBusConnection* conn) {
+ DBusMessageIter args;
+ const char* member = dbus_message_get_member(msg);
+ char* rawpath;
+ char* safepath;
+ char* brightness;
+ char path[256];
+
+ // read the arguments
+ if (!dbus_message_iter_init(msg, &args)) {
+ fprintf(stderr, "[tde_dbus_hardwarecontrol] %s: no arguments supplied\n", member);
+ }
+ else if (DBUS_TYPE_STRING != dbus_message_iter_get_arg_type(&args)) {
+ fprintf(stderr, "[tde_dbus_hardwarecontrol] %s: first argument not string\n", member);
+ }
+ else {
+ dbus_message_iter_get_basic(&args, &rawpath);
+ }
+
+ if (!dbus_message_iter_next(&args)) {
+ fprintf(stderr, "[tde_dbus_hardwarecontrol] %s: second argument not supplied\n", member);
+ }
+ else if (DBUS_TYPE_STRING != dbus_message_iter_get_arg_type(&args)) {
+ fprintf(stderr, "[tde_dbus_hardwarecontrol] %s: second argument not string\n", member);
+ }
+ else {
+ dbus_message_iter_get_basic(&args, &brightness);
+ }
+
+ safepath = realpath(rawpath, NULL);
+
+ if (safepath && brightness &&
+ (strstr(safepath, "/sys/devices") == safepath) &&
+ (strstr(safepath, "/brightness") == (safepath+strlen(safepath)-strlen("/brightness")))
+ ) {
+ reply_SetGivenPath(msg, conn, safepath, brightness);
+ }
+ else {
+ reply_Bool(msg, conn, false);
+ }
+
+ free(safepath);
+}
+
+void listen() {
+ DBusMessage* msg;
+ DBusMessage* reply;
+ DBusMessageIter args;
+ DBusConnection* conn;
+ DBusError err;
+ int ret;
+ char* param;
+
+ fprintf(stderr, "[tde_dbus_hardwarecontrol] Listening...\n");
+
+ // initialise the error structure
+ dbus_error_init(&err);
+
+ // connect to the bus and check for errors
+ conn = dbus_bus_get(DBUS_BUS_SYSTEM, &err);
+ if (dbus_error_is_set(&err)) {
+ fprintf(stderr, "[tde_dbus_hardwarecontrol] Connection failed with error '%s'\n", err.message);
+ dbus_error_free(&err);
+ }
+ if (NULL == conn) {
+ fprintf(stderr, "[tde_dbus_hardwarecontrol] No connection, exiting!\n");
+ exit(1);
+ }
+
+ // request our name on the bus and check for errors
+ ret = dbus_bus_request_name(conn, "org.trinitydesktop.hardwarecontrol", DBUS_NAME_FLAG_REPLACE_EXISTING , &err);
+ if (dbus_error_is_set(&err)) {
+ fprintf(stderr, "[tde_dbus_hardwarecontrol] Name request failed with error '%s'\n", err.message);
+ dbus_error_free(&err);
+ }
+ if (DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER != ret) {
+ fprintf(stderr, "[tde_dbus_hardwarecontrol] Not primary owner (%d), exiting!\n", ret);
+ exit(1);
+ }
+
+ // loop, testing for new messages
+ while (true) {
+ // non blocking read of the next available message
+ dbus_connection_read_write(conn, 1000); // block for up to 1 second
+ msg = dbus_connection_pop_message(conn);
+
+ // loop again if we haven't got a message
+ if (NULL == msg) {
+ continue;
+ }
+
+ // check this is a method call for the right interface & method
+ if (dbus_message_is_method_call(msg, "org.trinitydesktop.hardwarecontrol.CPUGovernor", "CanSetCPUGovernor")) {
+ reply_CanSetCPUGovernor(msg, conn);
+ }
+ else if (dbus_message_is_method_call(msg, "org.trinitydesktop.hardwarecontrol.CPUGovernor", "SetCPUGovernor")) {
+ reply_SetCPUGovernor(msg, conn);
+ }
+ else if (dbus_message_is_method_call(msg, "org.trinitydesktop.hardwarecontrol.Brightness", "CanSetBrightness")) {
+ reply_CanSetBrightness(msg, conn);
+ }
+ else if (dbus_message_is_method_call(msg, "org.trinitydesktop.hardwarecontrol.Brightness", "SetBrightness")) {
+ reply_SetBrightness(msg, conn);
+ }
+ else {
+ fprintf(stderr, "[tde_dbus_hardwarecontrol] Unknown method '%s' called on interface '%s', ignoring\n", dbus_message_get_member(msg), dbus_message_get_interface(msg));
+ }
+
+ // free the message
+ dbus_message_unref(msg);
+ }
+
+ // close the connection
+ dbus_connection_close(conn);
+}
+
+int main(int argc, char** argv) {
+ listen();
+ return 0;
+}
diff --git a/tdecore/kallocator.cpp b/tdecore/kallocator.cpp
index e8d2e8692..254088050 100644
--- a/tdecore/kallocator.cpp
+++ b/tdecore/kallocator.cpp
@@ -30,7 +30,7 @@
#include "kallocator.h"
#include <kdebug.h>
-class KZoneAllocator::MemBlock
+class TDEZoneAllocator::MemBlock
{
public:
MemBlock(size_t s) : size(s), ref(0), older(0), newer(0)
@@ -45,7 +45,7 @@ class KZoneAllocator::MemBlock
MemBlock *newer;
};
-KZoneAllocator::KZoneAllocator(unsigned long _blockSize)
+TDEZoneAllocator::TDEZoneAllocator(unsigned long _blockSize)
: currentBlock(0), blockSize(1), blockOffset(0), log2(0), num_blocks(0),
hashList(0), hashSize(0), hashDirty(true)
{
@@ -56,7 +56,7 @@ KZoneAllocator::KZoneAllocator(unsigned long _blockSize)
blockOffset = blockSize + 1;
}
-KZoneAllocator::~KZoneAllocator()
+TDEZoneAllocator::~TDEZoneAllocator()
{
unsigned int count = 0;
if (hashList) {
@@ -80,7 +80,7 @@ KZoneAllocator::~KZoneAllocator()
#endif
}
-void KZoneAllocator::insertHash(MemBlock *b)
+void TDEZoneAllocator::insertHash(MemBlock *b)
{
unsigned long adr = ((unsigned long)b->begin) & (~(blockSize - 1));
unsigned long end = ((unsigned long)b->begin) + blockSize;
@@ -99,7 +99,7 @@ void KZoneAllocator::insertHash(MemBlock *b)
@param b block to add
@internal
*/
-void KZoneAllocator::addBlock(MemBlock *b)
+void TDEZoneAllocator::addBlock(MemBlock *b)
{
b->newer = 0;
b->older = currentBlock;
@@ -119,7 +119,7 @@ void KZoneAllocator::addBlock(MemBlock *b)
}
/** Reinitialize hash list. @internal */
-void KZoneAllocator::initHash()
+void TDEZoneAllocator::initHash()
{
if (hashList) {
for (unsigned int i = 0; i < hashSize; i++)
@@ -145,7 +145,7 @@ void KZoneAllocator::initHash()
@param b block to delete
@internal
*/
-void KZoneAllocator::delBlock(MemBlock *b)
+void TDEZoneAllocator::delBlock(MemBlock *b)
{
/* Update also the hashlists if we aren't going to reconstruct them
soon. */
@@ -181,7 +181,7 @@ void KZoneAllocator::delBlock(MemBlock *b)
}
void *
-KZoneAllocator::allocate(size_t _size)
+TDEZoneAllocator::allocate(size_t _size)
{
// Use the size of (void *) as alignment
const size_t alignment = sizeof(void *) - 1;
@@ -190,7 +190,7 @@ KZoneAllocator::allocate(size_t _size)
if ((unsigned long) _size + blockOffset > blockSize)
{
if (_size > blockSize) {
- tqDebug("KZoneAllocator: allocating more than %lu bytes", blockSize);
+ tqDebug("TDEZoneAllocator: allocating more than %lu bytes", blockSize);
return 0;
}
addBlock(new MemBlock(blockSize));
@@ -204,7 +204,7 @@ KZoneAllocator::allocate(size_t _size)
}
void
-KZoneAllocator::deallocate(void *ptr)
+TDEZoneAllocator::deallocate(void *ptr)
{
if (hashDirty)
initHash();
@@ -237,7 +237,7 @@ KZoneAllocator::deallocate(void *ptr)
}
void
-KZoneAllocator::free_since(void *ptr)
+TDEZoneAllocator::free_since(void *ptr)
{
/* If we have a hashList and it's not yet dirty, see, if we will dirty
it by removing too many blocks. This will make the below delBlock()s
diff --git a/tdecore/kallocator.h b/tdecore/kallocator.h
index abc4c4b64..158fd76a8 100644
--- a/tdecore/kallocator.h
+++ b/tdecore/kallocator.h
@@ -29,7 +29,7 @@
#include <tqvaluelist.h>
#include "tdelibs_export.h"
-class KZoneAllocatorPrivate;
+class TDEZoneAllocatorPrivate;
/**
@@ -43,19 +43,19 @@ class KZoneAllocatorPrivate;
* memory though.
* @author Waldo Bastian <bastian@kde.org>, Michael Matz <matz@kde.org>
*/
-class TDECORE_EXPORT KZoneAllocator
+class TDECORE_EXPORT TDEZoneAllocator
{
public:
/**
- * Creates a KZoneAllocator object.
+ * Creates a TDEZoneAllocator object.
* @param _blockSize Size in bytes of the blocks requested from malloc.
*/
- KZoneAllocator(unsigned long _blockSize = 8*1024);
+ TDEZoneAllocator(unsigned long _blockSize = 8*1024);
/**
* Destructs the ZoneAllocator and free all memory allocated by it.
*/
- ~KZoneAllocator();
+ ~TDEZoneAllocator();
/**
* Allocates a memory block.
@@ -78,7 +78,7 @@ public:
* more time then the normal calls, and that after this list is built, i.e.
* generally if deallocate() is used at all, also allocate() is a
* little bit slower. This means, that if you want to squeeze out the last
- * bit performance you would want to use KZoneAllocator as an obstack, i.e.
+ * bit performance you would want to use TDEZoneAllocator as an obstack, i.e.
* just use the functions allocate() and free_since(). All the
* remaining memory is returned to the system if the zone allocator
* is destroyed.
@@ -93,7 +93,7 @@ public:
*
* The intended use is something along the lines of:
* \code
- * KZoneAllocator alloc(8192);
+ * TDEZoneAllocator alloc(8192);
* void *remember_me = alloc.allocate(0);
* for (int i = 0; i < 1000; i++)
* do_something_with (alloc.allocate(12));
@@ -134,7 +134,7 @@ protected:
/** Flag the hashes as in need of reorganization. @internal */
bool hashDirty;
private:
- KZoneAllocatorPrivate *d;
+ TDEZoneAllocatorPrivate *d;
};
#endif
diff --git a/tdecore/kapp.h b/tdecore/kapp.h
index c51c463a0..5d48a852f 100644
--- a/tdecore/kapp.h
+++ b/tdecore/kapp.h
@@ -1,6 +1,6 @@
-// kapp.h is the old name. Use #include <kapplication.h> from now on
+// kapp.h is the old name. Use #include <tdeapplication.h> from now on
#ifdef KDE_NO_COMPAT
-#error include <kapplication.h> instead of <kapp.h>
+#error include <tdeapplication.h> instead of <kapp.h>
#else
-#include <kapplication.h>
+#include <tdeapplication.h>
#endif
diff --git a/tdecore/kappdcopiface.cpp b/tdecore/kappdcopiface.cpp
index fc0198d87..ed6e26163 100644
--- a/tdecore/kappdcopiface.cpp
+++ b/tdecore/kappdcopiface.cpp
@@ -18,16 +18,16 @@
*/
#include "kappdcopiface.h"
-#include <kapplication.h>
+#include <tdeapplication.h>
#include <dcopclient.h>
-#include <kglobal.h>
-#include <kconfig.h>
+#include <tdeglobal.h>
+#include <tdeconfig.h>
-KAppDCOPInterface::KAppDCOPInterface(KApplication * theKApp)
+KAppDCOPInterface::KAppDCOPInterface(TDEApplication * theKApp)
: DCOPObject( "MainApplication-Interface")
{
- m_KApplication = theKApp;
+ m_TDEApplication = theKApp;
}
KAppDCOPInterface::~KAppDCOPInterface()
@@ -51,20 +51,20 @@ TQCString KAppDCOPInterface::caption()
void KAppDCOPInterface::quit()
{
- m_KApplication->quit();
+ m_TDEApplication->quit();
}
void KAppDCOPInterface::updateUserTimestamp( ulong time )
{
- m_KApplication->updateUserTimestamp( time );
+ m_TDEApplication->updateUserTimestamp( time );
}
void KAppDCOPInterface::reparseConfiguration()
{
- KGlobal::config()->reparseConfiguration();
+ TDEGlobal::config()->reparseConfiguration();
}
void KAppDCOPInterface::sendFakeKey( unsigned int keyCode) {
- m_KApplication->broadcastKeyCode(keyCode);
+ m_TDEApplication->broadcastKeyCode(keyCode);
}
diff --git a/tdecore/kappdcopiface.h b/tdecore/kappdcopiface.h
index 187c9f5ae..164c8b115 100644
--- a/tdecore/kappdcopiface.h
+++ b/tdecore/kappdcopiface.h
@@ -26,12 +26,12 @@
#include <dcopref.h>
#include "tdelibs_export.h"
-class KApplication;
+class TDEApplication;
/**
-This is the main interface to the KApplication. This will provide a consistant
+This is the main interface to the TDEApplication. This will provide a consistant
dcop interface to all KDE applications that use it.
-@short DCOP interface to KApplication.
+@short DCOP interface to TDEApplication.
@author Ian Reinhart Geiser <geiseri@yahoo.com>
*/
class TDECORE_EXPORT KAppDCOPInterface : virtual public DCOPObject
@@ -41,10 +41,10 @@ K_DCOP
public:
/**
Construct a new interface object.
- @param theKapp - The parent KApplication object
+ @param theKapp - The parent TDEApplication object
that will provide us with the functional interface.
*/
- KAppDCOPInterface( KApplication * theKapp );
+ KAppDCOPInterface( TDEApplication * theKapp );
/**
Destructor
Cleans up the dcop connection.
@@ -65,14 +65,14 @@ k_dcop:
void updateUserTimestamp( ulong time );
/**
- Send a fake keypress to all KApplication instances
+ Send a fake keypress to all TDEApplication instances
For internal use in connecting insecure function keys to
KDE applications while the X keyboard is locked.
**/
void sendFakeKey( unsigned int keyCode);
private:
- KApplication *m_KApplication;
+ TDEApplication *m_TDEApplication;
};
#endif
diff --git a/tdecore/kapplication_win.cpp b/tdecore/kapplication_win.cpp
index abf0694b4..38bafaef8 100644
--- a/tdecore/kapplication_win.cpp
+++ b/tdecore/kapplication_win.cpp
@@ -17,9 +17,9 @@
Boston, MA 02110-1301, USA.
*/
-#include <kapplication.h>
+#include <tdeapplication.h>
#include <kstandarddirs.h>
-#include <klocale.h>
+#include <tdelocale.h>
#include <kurl.h>
#include "kcheckaccelerators.h"
@@ -32,7 +32,7 @@
#include "shellapi.h"
/**
- * MS Windows-related actions for KApplication startup.
+ * MS Windows-related actions for TDEApplication startup.
*
* - Use Qt translation which will be usable for TQFileDialog
* and other Qt-only GUIs. The "qt_<language>.qm" file should be stored
@@ -40,10 +40,10 @@
*
* @internal
*/
-void KApplication_init_windows(bool /*GUIenabled*/)
+void TDEApplication_init_windows(bool /*GUIenabled*/)
{
- TQString qt_transl_file = ::locate( "locale", KGlobal::locale()->language()
- + "/LC_MESSAGES/qt_" + KGlobal::locale()->language() + ".qm" );
+ TQString qt_transl_file = ::locate( "locale", TDEGlobal::locale()->language()
+ + "/LC_MESSAGES/qt_" + TDEGlobal::locale()->language() + ".qm" );
QTranslator *qt_transl = new QTranslator();
if (qt_transl->load( qt_transl_file, ""))
kapp->installTranslator( qt_transl );
@@ -54,11 +54,11 @@ void KApplication_init_windows(bool /*GUIenabled*/)
//unsafe; create kapplication_p.h instead!
typedef void* IceIOErrorHandler;
-class KApplicationPrivate
+class TDEApplicationPrivate
{
public:
- KApplicationPrivate();
- ~KApplicationPrivate();
+ TDEApplicationPrivate();
+ ~TDEApplicationPrivate();
bool actionRestrictions : 1;
bool guiEnabled : 1;
@@ -74,12 +74,12 @@ public:
QAssistantClient* qassistantclient;
};
-void KApplication::invokeHelp( const TQString& anchor,
+void TDEApplication::invokeHelp( const TQString& anchor,
const TQString& _appname, const TQCString& startup_id ) const
{
if (!d->qassistantclient) {
d->qassistantclient = new QAssistantClient(
- KStandardDirs::findExe( "assistant" ), 0);
+ TDEStandardDirs::findExe( "assistant" ), 0);
TQStringList args;
args << "-profile";
args << TQDir::convertSeparators( locate("html", TQString(name())+"/"+TQString(name())+".adp") );
@@ -90,14 +90,14 @@ void KApplication::invokeHelp( const TQString& anchor,
// on win32, for invoking browser we're using win32 API
// see kapplication_win.cpp
-void KApplication::invokeBrowser( const TQString &url, const TQCString& startup_id )
+void TDEApplication::invokeBrowser( const TQString &url, const TQCString& startup_id )
{
TQCString s = url.latin1();
const unsigned short *l = (const unsigned short *)s.data();
ShellExecuteA(0, "open", s.data(), 0, 0, SW_NORMAL);
}
-void KApplication::invokeMailer(const TQString &to, const TQString &cc, const TQString &bcc,
+void TDEApplication::invokeMailer(const TQString &to, const TQString &cc, const TQString &bcc,
const TQString &subject, const TQString &body,
const TQString & /*messageFile TODO*/, const TQStringList &attachURLs,
const TQCString& startup_id )
diff --git a/tdecore/kbufferedio.cpp b/tdecore/kbufferedio.cpp
index 951c41244..2424c95e9 100644
--- a/tdecore/kbufferedio.cpp
+++ b/tdecore/kbufferedio.cpp
@@ -29,7 +29,7 @@
/**
* @section impldetails Implementation Details
*
- * The KBufferedIO class has two purposes: first, it defines an API on how
+ * The TDEBufferedIO class has two purposes: first, it defines an API on how
* that classes providing buffered I/O should provide. Next, it implements on
* top of that API a generic buffering, that should suffice for most cases.
*
@@ -86,7 +86,7 @@
*/
// constructor
-KBufferedIO::KBufferedIO() :
+TDEBufferedIO::TDEBufferedIO() :
inBufIndex(0), outBufIndex(0)
{
inBuf.setAutoDelete(true);
@@ -94,14 +94,14 @@ KBufferedIO::KBufferedIO() :
}
// destructor
-KBufferedIO::~KBufferedIO()
+TDEBufferedIO::~TDEBufferedIO()
{
}
// sets the buffer sizes
// this implementation doesn't support setting the buffer sizes
// if any parameter is different than -1 or -2, fail
-bool KBufferedIO::setBufferSize(int rsize, int wsize /* = -2 */)
+bool TDEBufferedIO::setBufferSize(int rsize, int wsize /* = -2 */)
{
if (wsize != -2 && wsize != -1)
return false;
@@ -112,27 +112,27 @@ bool KBufferedIO::setBufferSize(int rsize, int wsize /* = -2 */)
}
#ifdef USE_QT3
-int KBufferedIO::bytesAvailable() const
+int TDEBufferedIO::bytesAvailable() const
#endif // USE_QT3
#ifdef USE_QT4
-qint64 KBufferedIO::bytesAvailable() const
+qint64 TDEBufferedIO::bytesAvailable() const
#endif // USE_QT4
{
return readBufferSize();
}
#ifdef USE_QT3
-int KBufferedIO::bytesToWrite() const
+int TDEBufferedIO::bytesToWrite() const
#endif // USE_QT3
#ifdef USE_QT4
-qint64 KBufferedIO::bytesToWrite() const
+qint64 TDEBufferedIO::bytesToWrite() const
#endif // USE_QT4
{
return writeBufferSize();
}
// This function will scan the read buffer for a '\n'
-bool KBufferedIO::canReadLine() const
+bool TDEBufferedIO::canReadLine() const
{
if (bytesAvailable() == 0)
return false; // no new line in here
@@ -140,7 +140,7 @@ bool KBufferedIO::canReadLine() const
TQByteArray* buf;
// scan each TQByteArray for the occurrence of '\n'
- TQPtrList<TQByteArray> &buflist = ((KBufferedIO*)this)->inBuf;
+ TQPtrList<TQByteArray> &buflist = ((TDEBufferedIO*)this)->inBuf;
buf = buflist.first();
char *p = buf->data() + inBufIndex;
int n = buf->size() - inBufIndex;
@@ -162,7 +162,7 @@ bool KBufferedIO::canReadLine() const
// unreads the current data
// that is, writes into the read buffer, at the beginning
-int KBufferedIO::unreadBlock(const char *data, uint len)
+int TDEBufferedIO::unreadBlock(const char *data, uint len)
{
return feedReadBuffer(len, data, true);
}
@@ -171,7 +171,7 @@ int KBufferedIO::unreadBlock(const char *data, uint len)
// protected member functions
//
-unsigned KBufferedIO::consumeReadBuffer(unsigned nbytes, char *destbuffer, bool discard)
+unsigned TDEBufferedIO::consumeReadBuffer(unsigned nbytes, char *destbuffer, bool discard)
{
{
register unsigned u = readBufferSize();
@@ -221,7 +221,7 @@ unsigned KBufferedIO::consumeReadBuffer(unsigned nbytes, char *destbuffer, bool
return copied;
}
-void KBufferedIO::consumeWriteBuffer(unsigned nbytes)
+void TDEBufferedIO::consumeWriteBuffer(unsigned nbytes)
{
TQByteArray *buf = outBuf.first();
if (buf == NULL)
@@ -250,7 +250,7 @@ void KBufferedIO::consumeWriteBuffer(unsigned nbytes)
}
}
-unsigned KBufferedIO::feedReadBuffer(unsigned nbytes, const char *buffer, bool atBeginning)
+unsigned TDEBufferedIO::feedReadBuffer(unsigned nbytes, const char *buffer, bool atBeginning)
{
if (nbytes == 0)
return 0;
@@ -266,7 +266,7 @@ unsigned KBufferedIO::feedReadBuffer(unsigned nbytes, const char *buffer, bool a
return nbytes;
}
-unsigned KBufferedIO::feedWriteBuffer(unsigned nbytes, const char *buffer)
+unsigned TDEBufferedIO::feedWriteBuffer(unsigned nbytes, const char *buffer)
{
if (nbytes == 0)
return 0;
@@ -277,33 +277,33 @@ unsigned KBufferedIO::feedWriteBuffer(unsigned nbytes, const char *buffer)
return nbytes;
}
-unsigned KBufferedIO::readBufferSize() const
+unsigned TDEBufferedIO::readBufferSize() const
{
unsigned count = 0;
- TQByteArray *buf = ((KBufferedIO*)this)->inBuf.first();
+ TQByteArray *buf = ((TDEBufferedIO*)this)->inBuf.first();
while (buf != NULL)
{
count += buf->size();
- buf = ((KBufferedIO*)this)->inBuf.next();
+ buf = ((TDEBufferedIO*)this)->inBuf.next();
}
return count - inBufIndex;
}
-unsigned KBufferedIO::writeBufferSize() const
+unsigned TDEBufferedIO::writeBufferSize() const
{
unsigned count = 0;
- TQByteArray *buf = ((KBufferedIO*)this)->outBuf.first();
+ TQByteArray *buf = ((TDEBufferedIO*)this)->outBuf.first();
while (buf != NULL)
{
count += buf->size();
- buf = (const_cast<KBufferedIO*>(this))->outBuf.next();
+ buf = (const_cast<TDEBufferedIO*>(this))->outBuf.next();
}
return count - outBufIndex;
}
-void KBufferedIO::virtual_hook( int id, void* data )
+void TDEBufferedIO::virtual_hook( int id, void* data )
{ KAsyncIO::virtual_hook( id, data ); }
#include "kbufferedio.moc"
diff --git a/tdecore/kbufferedio.h b/tdecore/kbufferedio.h
index 78bccc9ef..f00ab52b6 100644
--- a/tdecore/kbufferedio.h
+++ b/tdecore/kbufferedio.h
@@ -25,7 +25,7 @@
#include <tqptrlist.h>
#include "kasyncio.h"
-class KBufferedIOPrivate;
+class TDEBufferedIOPrivate;
/**
* This abstract class implements basic functionality for buffered
* input/output.
@@ -39,7 +39,7 @@ class KBufferedIOPrivate;
* written using QSocket's buffering characteristics will be more easily
* ported to the more powerful KExtendedSocket class.
*
- * KBufferedIO already provides a powerful internal buffering algorithm. However,
+ * TDEBufferedIO already provides a powerful internal buffering algorithm. However,
* this does not include the I/O itself, which must be implemented in
* derived classes. Thus, to implement a class that does some I/O, you must
* override, in addition to the pure virtual TQIODevice methods, these two:
@@ -53,14 +53,14 @@ class KBufferedIOPrivate;
* @author Thiago Macieira <thiagom@mail.com>
* @short Buffered I/O
*/
-class TDECORE_EXPORT KBufferedIO: public KAsyncIO
+class TDECORE_EXPORT TDEBufferedIO: public KAsyncIO
{
Q_OBJECT
protected:
// no default public constructor
- KBufferedIO();
+ TDEBufferedIO();
public:
/**
@@ -79,7 +79,7 @@ public:
* Destroys this class. The flushing of the buffers is implementation dependant.
* The default implementation discards the contents
*/
- virtual ~KBufferedIO();
+ virtual ~TDEBufferedIO();
/**
* Closes the stream now, discarding the contents of the
@@ -294,7 +294,7 @@ protected:
protected:
virtual void virtual_hook( int id, void* data );
private:
- KBufferedIOPrivate *d;
+ TDEBufferedIOPrivate *d;
};
#endif // KBUFFEREDIO_H
diff --git a/tdecore/kcalendarsystem.cpp b/tdecore/kcalendarsystem.cpp
index 57898da84..20d00d181 100644
--- a/tdecore/kcalendarsystem.cpp
+++ b/tdecore/kcalendarsystem.cpp
@@ -22,18 +22,18 @@
// systems.
// Also default gregorian and factory classes
-#include <kglobal.h>
+#include <tdeglobal.h>
#include "kcalendarsystem.h"
-#include "klocale.h"
+#include "tdelocale.h"
class KCalendarSystemPrivate
{
public:
- const KLocale * locale;
+ const TDELocale * locale;
};
-KCalendarSystem::KCalendarSystem(const KLocale * locale)
+KCalendarSystem::KCalendarSystem(const TDELocale * locale)
: d(new KCalendarSystemPrivate)
{
d->locale = locale;
@@ -44,12 +44,12 @@ KCalendarSystem::~KCalendarSystem()
delete d;
}
-const KLocale * KCalendarSystem::locale() const
+const TDELocale * KCalendarSystem::locale() const
{
if ( d->locale )
return d->locale;
- return KGlobal::locale();
+ return TDEGlobal::locale();
}
TQString KCalendarSystem::dayString(const TQDate & pDate, bool bShort) const
diff --git a/tdecore/kcalendarsystem.h b/tdecore/kcalendarsystem.h
index bd936336c..bd3fbe4ff 100644
--- a/tdecore/kcalendarsystem.h
+++ b/tdecore/kcalendarsystem.h
@@ -25,7 +25,7 @@
#include <tqstring.h>
#include "tdelibs_export.h"
-class KLocale;
+class TDELocale;
class KCalendarSystemPrivate;
@@ -47,7 +47,7 @@ public:
*
* @param locale It will use this locale for translations, 0 means global.
*/
- KCalendarSystem(const KLocale * locale = 0);
+ KCalendarSystem(const TDELocale * locale = 0);
/**
* Descructor.
@@ -348,7 +348,7 @@ protected:
* Gets the locale the calendar uses for translations. Set in
* the constructor.
*/
- const KLocale * locale() const;
+ const TDELocale * locale() const;
private:
KCalendarSystemPrivate * d;
diff --git a/tdecore/kcalendarsystemfactory.cpp b/tdecore/kcalendarsystemfactory.cpp
index 723873497..d3bd166e0 100644
--- a/tdecore/kcalendarsystemfactory.cpp
+++ b/tdecore/kcalendarsystemfactory.cpp
@@ -41,7 +41,7 @@ KCalendarSystemFactory::~KCalendarSystemFactory()
}
KCalendarSystem *KCalendarSystemFactory::create( const TQString &calType,
- const KLocale * locale )
+ const TDELocale * locale )
{
if ( calType == "hebrew" )
return new KCalendarSystemHebrew(locale);
diff --git a/tdecore/kcalendarsystemfactory.h b/tdecore/kcalendarsystemfactory.h
index 6ebba1573..96aef1c4a 100644
--- a/tdecore/kcalendarsystemfactory.h
+++ b/tdecore/kcalendarsystemfactory.h
@@ -26,7 +26,7 @@
#include "tdelibs_export.h"
class KCalendarSystem;
-class KLocale;
+class TDELocale;
/**
* Factory class for calendar types
@@ -50,7 +50,7 @@ public:
* @return a KCalendarSystem object
*/
static KCalendarSystem *create (const TQString & calType = TQString::fromLatin1("gregorian"),
- const KLocale * locale = 0);
+ const TDELocale * locale = 0);
/**
* Gets list of names of supported calendar systems
diff --git a/tdecore/kcalendarsystemgregorian.cpp b/tdecore/kcalendarsystemgregorian.cpp
index 38ee1014a..9d4d14661 100644
--- a/tdecore/kcalendarsystemgregorian.cpp
+++ b/tdecore/kcalendarsystemgregorian.cpp
@@ -24,12 +24,12 @@
#include <tqdatetime.h>
#include <tqstring.h>
-#include <klocale.h>
+#include <tdelocale.h>
#include <kdebug.h>
#include "kcalendarsystemgregorian.h"
-KCalendarSystemGregorian::KCalendarSystemGregorian(const KLocale * locale)
+KCalendarSystemGregorian::KCalendarSystemGregorian(const TDELocale * locale)
: KCalendarSystem(locale)
{
}
diff --git a/tdecore/kcalendarsystemgregorian.h b/tdecore/kcalendarsystemgregorian.h
index 98fd10e90..34c9ecde3 100644
--- a/tdecore/kcalendarsystemgregorian.h
+++ b/tdecore/kcalendarsystemgregorian.h
@@ -35,7 +35,7 @@ class KCalendarSystemGregorianPrivate;
* The Gregorian calender is the most used calendar today. The first year in
* the calendar is set to the birth of Christ.
*
- * @see KLocale,KCalendarSystem,KCalendarSystemFactory
+ * @see TDELocale,KCalendarSystem,KCalendarSystemFactory
*
* @author Carlos Moro <cfmoro@correo.uniovi.es>
* @since 3.2
@@ -44,7 +44,7 @@ class TDECORE_EXPORT KCalendarSystemGregorian: public KCalendarSystem
{
public:
/** Constructor. Just like KCalendarSystem::KCalendarSystem(). */
- KCalendarSystemGregorian (const KLocale * locale = 0);
+ KCalendarSystemGregorian (const TDELocale * locale = 0);
virtual ~KCalendarSystemGregorian ();
virtual int year (const TQDate & date) const;
diff --git a/tdecore/kcalendarsystemhebrew.cpp b/tdecore/kcalendarsystemhebrew.cpp
index 2824445bb..2f0aa111a 100644
--- a/tdecore/kcalendarsystemhebrew.cpp
+++ b/tdecore/kcalendarsystemhebrew.cpp
@@ -21,7 +21,7 @@
// Derived hebrew kde calendar class
-#include <klocale.h>
+#include <tdelocale.h>
#include <kdebug.h>
#include "kcalendarsystemhebrew.h"
@@ -259,7 +259,7 @@ static bool is_leap_year(int year)
}
// Ok
-KCalendarSystemHebrew::KCalendarSystemHebrew(const KLocale * locale)
+KCalendarSystemHebrew::KCalendarSystemHebrew(const TDELocale * locale)
: KCalendarSystem(locale)
{
}
diff --git a/tdecore/kcalendarsystemhebrew.h b/tdecore/kcalendarsystemhebrew.h
index 728954c58..1482c1a80 100644
--- a/tdecore/kcalendarsystemhebrew.h
+++ b/tdecore/kcalendarsystemhebrew.h
@@ -37,7 +37,7 @@ class KCalendarSystemHebrewPrivate;
* The Hebrew calendar is the traditional Islamic calendar used in the Midle
* East.
*
- * @see KLocale,KCalendarSystem,KCalendarSystemFactory
+ * @see TDELocale,KCalendarSystem,KCalendarSystemFactory
*
* @author Hans Petter Bieker <bieker@kde.org>
* @since 3.2
@@ -46,7 +46,7 @@ class TDECORE_EXPORT KCalendarSystemHebrew : public KCalendarSystem
{
public:
/** Constructor. Just like KCalendarSystem::KCalendarSystem(). */
- KCalendarSystemHebrew(const KLocale * locale = 0);
+ KCalendarSystemHebrew(const TDELocale * locale = 0);
virtual ~KCalendarSystemHebrew();
virtual int year (const TQDate & date) const;
diff --git a/tdecore/kcalendarsystemhijri.cpp b/tdecore/kcalendarsystemhijri.cpp
index a6487060e..cc66805e0 100644
--- a/tdecore/kcalendarsystemhijri.cpp
+++ b/tdecore/kcalendarsystemhijri.cpp
@@ -23,7 +23,7 @@
#include <tqdatetime.h>
#include <tqstring.h>
-#include <klocale.h>
+#include <tdelocale.h>
#include <kdebug.h>
#include "kcalendarsystemhijri.h"
@@ -178,7 +178,7 @@ static void gregorianToHijri(const TQDate & date, int * pYear, int * pMonth,
*pDay = islamic.getDay();
}
-KCalendarSystemHijri::KCalendarSystemHijri(const KLocale * locale)
+KCalendarSystemHijri::KCalendarSystemHijri(const TDELocale * locale)
: KCalendarSystem(locale)
{
}
diff --git a/tdecore/kcalendarsystemhijri.h b/tdecore/kcalendarsystemhijri.h
index 444f938c7..0ba1e52df 100644
--- a/tdecore/kcalendarsystemhijri.h
+++ b/tdecore/kcalendarsystemhijri.h
@@ -35,7 +35,7 @@ class KCalendarSystemHijriPrivate;
* The Hijri calendar is the traditional Islamic calendar used in the Midle
* East.
*
- * @see KLocale,KCalendarSystem,KCalendarSystemFactory
+ * @see TDELocale,KCalendarSystem,KCalendarSystemFactory
*
* @author Carlos Moro <cfmoro@correo.uniovi.es>
* @since 3.2
@@ -44,7 +44,7 @@ class TDECORE_EXPORT KCalendarSystemHijri : public KCalendarSystem
{
public:
/** Constructor. Just like KCalendarSystem::KCalendarSystem(). */
- KCalendarSystemHijri(const KLocale * locale = 0);
+ KCalendarSystemHijri(const TDELocale * locale = 0);
virtual ~KCalendarSystemHijri();
virtual int year (const TQDate & date) const;
diff --git a/tdecore/kcalendarsystemjalali.cpp b/tdecore/kcalendarsystemjalali.cpp
index 29798a1dd..631693e45 100644
--- a/tdecore/kcalendarsystemjalali.cpp
+++ b/tdecore/kcalendarsystemjalali.cpp
@@ -26,8 +26,8 @@
#include <tqstringlist.h>
#include <math.h>
-#include <kglobal.h>
-#include <klocale.h>
+#include <tdeglobal.h>
+#include <tdelocale.h>
#include <kdebug.h>
#include <stdio.h>
@@ -200,7 +200,7 @@ static int hndays(int m,int y)
}
-KCalendarSystemJalali::KCalendarSystemJalali(const KLocale * locale)
+KCalendarSystemJalali::KCalendarSystemJalali(const TDELocale * locale)
: KCalendarSystem(locale)
{
}
diff --git a/tdecore/kcalendarsystemjalali.h b/tdecore/kcalendarsystemjalali.h
index e5dd56681..8f9c4ddb9 100644
--- a/tdecore/kcalendarsystemjalali.h
+++ b/tdecore/kcalendarsystemjalali.h
@@ -37,7 +37,7 @@ class TDECORE_EXPORT KCalendarSystemJalali : public KCalendarSystem
{
public:
/** Constructor. Just like KCalendarSystem::KCalendarSystem(). */
- KCalendarSystemJalali(const KLocale * locale = 0);
+ KCalendarSystemJalali(const TDELocale * locale = 0);
virtual ~KCalendarSystemJalali();
diff --git a/tdecore/kcatalogue.h b/tdecore/kcatalogue.h
index be918789d..04ba4594b 100644
--- a/tdecore/kcatalogue.h
+++ b/tdecore/kcatalogue.h
@@ -31,7 +31,7 @@ class KCataloguePrivate;
* This class abstracts a gettext message catalog. It will take care of
* opening the file and reading the catalog.
*
- * @see KLocale
+ * @see TDELocale
*/
//REVISED: hausmann
class TDECORE_EXPORT KCatalogue
diff --git a/tdecore/kcharsets.cpp b/tdecore/kcharsets.cpp
index 52cf87849..23786c53e 100644
--- a/tdecore/kcharsets.cpp
+++ b/tdecore/kcharsets.cpp
@@ -21,10 +21,10 @@
#include "kqiodevicegzip_p.h"
#include "kentities.c"
-#include <kapplication.h>
-#include <kglobal.h>
-#include <klocale.h>
-#include <kconfig.h>
+#include <tdeapplication.h>
+#include <tdeglobal.h>
+#include <tdelocale.h>
+#include <tdeconfig.h>
#include <tqfontinfo.h>
#include <tqstrlist.h>
@@ -535,7 +535,7 @@ TQTextCodec *KCharsets::codecForName(const TQString &n, bool &ok) const
return codec; // cache hit, return
if (n.isEmpty()) {
- codec = KGlobal::locale()->codecForEncoding();
+ codec = TDEGlobal::locale()->codecForEncoding();
d->codecForNameDict.replace("->locale<-", codec);
return codec;
}
@@ -572,8 +572,8 @@ TQTextCodec *KCharsets::codecForName(const TQString &n, bool &ok) const
TQString dir;
{
- KConfigGroupSaver cfgsav( KGlobal::config(), "i18n" );
- dir = KGlobal::config()->readPathEntry("i18ndir", TQString::fromLatin1("/usr/share/i18n/charmaps"));
+ TDEConfigGroupSaver cfgsav( TDEGlobal::config(), "i18n" );
+ dir = TDEGlobal::config()->readPathEntry("i18ndir", TQString::fromLatin1("/usr/share/i18n/charmaps"));
}
// these are codecs not included in Qt. They can be build up if the corresponding charmap
diff --git a/tdecore/kcharsets.h b/tdecore/kcharsets.h
index 2816e4fcd..da96643ff 100644
--- a/tdecore/kcharsets.h
+++ b/tdecore/kcharsets.h
@@ -25,7 +25,7 @@
#include <tqptrlist.h>
#include "tdelibs_export.h"
-class KGlobal;
+class TDEGlobal;
class KCharsetsPrivate;
class TQTextCodec;
@@ -42,11 +42,11 @@ class TQTextCodec;
*/
class TDECORE_EXPORT KCharsets
{
- friend class KGlobal;
+ friend class TDEGlobal;
protected:
/** Protected constructor. If you need the kcharsets object, use
- KGlobal::charsets() instead.
+ TDEGlobal::charsets() instead.
*/
KCharsets();
diff --git a/tdecore/kcheckaccelerators.cpp b/tdecore/kcheckaccelerators.cpp
index 06337485c..306591e67 100644
--- a/tdecore/kcheckaccelerators.cpp
+++ b/tdecore/kcheckaccelerators.cpp
@@ -26,7 +26,7 @@
#include "config.h"
#include "kcheckaccelerators.h"
-#include "kaccelmanager.h"
+#include "tdeaccelmanager.h"
#include <tqpopupmenu.h>
#include <tqapplication.h>
#include <tqdialog.h>
@@ -39,11 +39,11 @@
#include <tqmetaobject.h>
#include <tqcheckbox.h>
-#include <kconfig.h>
+#include <tdeconfig.h>
#include <kdebug.h>
-#include <kglobal.h>
-#include <kshortcut.h>
-#include <klocale.h>
+#include <tdeglobal.h>
+#include <tdeshortcut.h>
+#include <tdelocale.h>
/*
@@ -80,15 +80,15 @@ KCheckAccelerators::KCheckAccelerators( TQObject* parent )
: TQObject( parent, "kapp_accel_filter" ), key(0), block( false ), drklash(0)
{
parent->installEventFilter( this );
- KConfigGroupSaver saver( KGlobal::config(), "Development" );
- TQString sKey = KGlobal::config()->readEntry( "CheckAccelerators" ).stripWhiteSpace();
+ TDEConfigGroupSaver saver( TDEGlobal::config(), "Development" );
+ TQString sKey = TDEGlobal::config()->readEntry( "CheckAccelerators" ).stripWhiteSpace();
if( !sKey.isEmpty() ) {
- KShortcut cuts( sKey );
+ TDEShortcut cuts( sKey );
if( cuts.count() > 0 )
key = int(cuts.seq(0).qt());
}
- alwaysShow = KGlobal::config()->readBoolEntry( "AlwaysShowCheckAccelerators", false );
- autoCheck = KGlobal::config()->readBoolEntry( "AutoCheckAccelerators", true );
+ alwaysShow = TDEGlobal::config()->readBoolEntry( "AlwaysShowCheckAccelerators", false );
+ autoCheck = TDEGlobal::config()->readBoolEntry( "AutoCheckAccelerators", true );
connect( &autoCheckTimer, TQT_SIGNAL( timeout()), TQT_SLOT( autoCheckSlot()));
}
@@ -177,9 +177,9 @@ void KCheckAccelerators::checkAccelerators( bool automatic )
if ( !actWin )
return;
- KAcceleratorManager::manage(actWin);
+ TDEAcceleratorManager::manage(actWin);
TQString a, c, r;
- KAcceleratorManager::last_manage(a, c, r);
+ TDEAcceleratorManager::last_manage(a, c, r);
if (automatic) // for now we only show dialogs on F12 checks
return;
diff --git a/tdecore/kclipboard.cpp b/tdecore/kclipboard.cpp
index 1e3cafbae..8ab23cccc 100644
--- a/tdecore/kclipboard.cpp
+++ b/tdecore/kclipboard.cpp
@@ -16,9 +16,9 @@
Boston, MA 02110-1301, USA.
*/
-#include <kapplication.h>
-#include <kconfig.h>
-#include <kglobal.h>
+#include <tdeapplication.h>
+#include <tdeconfig.h>
+#include <tdeglobal.h>
#include "kclipboard.h"
@@ -38,7 +38,7 @@
* especially the second one.
*/
-class KClipboardSynchronizer::MimeSource : public TQMimeSource
+class TDEClipboardSynchronizer::MimeSource : public TQMimeSource
{
public:
MimeSource( const TQMimeSource * src )
@@ -89,25 +89,25 @@ private:
};
-KClipboardSynchronizer * KClipboardSynchronizer::s_self = 0L;
-bool KClipboardSynchronizer::s_sync = false;
-bool KClipboardSynchronizer::s_reverse_sync = false;
-bool KClipboardSynchronizer::s_blocked = false;
+TDEClipboardSynchronizer * TDEClipboardSynchronizer::s_self = 0L;
+bool TDEClipboardSynchronizer::s_sync = false;
+bool TDEClipboardSynchronizer::s_reverse_sync = false;
+bool TDEClipboardSynchronizer::s_blocked = false;
-KClipboardSynchronizer * KClipboardSynchronizer::self()
+TDEClipboardSynchronizer * TDEClipboardSynchronizer::self()
{
if ( !s_self )
- s_self = new KClipboardSynchronizer( TQT_TQOBJECT(kapp), "KDE Clipboard" );
+ s_self = new TDEClipboardSynchronizer( TQT_TQOBJECT(kapp), "KDE Clipboard" );
return s_self;
}
-KClipboardSynchronizer::KClipboardSynchronizer( TQObject *parent, const char *name )
+TDEClipboardSynchronizer::TDEClipboardSynchronizer( TQObject *parent, const char *name )
: TQObject( parent, name )
{
s_self = this;
- KConfigGroup config( KGlobal::config(), "General" );
+ TDEConfigGroup config( TDEGlobal::config(), "General" );
s_sync = config.readBoolEntry( "SynchronizeClipboardAndSelection", s_sync);
s_reverse_sync = config.readBoolEntry( "ClipboardSetSelection",
s_reverse_sync );
@@ -115,13 +115,13 @@ KClipboardSynchronizer::KClipboardSynchronizer( TQObject *parent, const char *na
setupSignals();
}
-KClipboardSynchronizer::~KClipboardSynchronizer()
+TDEClipboardSynchronizer::~TDEClipboardSynchronizer()
{
if ( s_self == this )
s_self = 0L;
}
-void KClipboardSynchronizer::setupSignals()
+void TDEClipboardSynchronizer::setupSignals()
{
TQClipboard *clip = TQApplication::clipboard();
disconnect( clip, NULL, this, NULL );
@@ -133,7 +133,7 @@ void KClipboardSynchronizer::setupSignals()
TQT_SLOT( slotClipboardChanged() ));
}
-void KClipboardSynchronizer::slotSelectionChanged()
+void TDEClipboardSynchronizer::slotSelectionChanged()
{
TQClipboard *clip = TQApplication::clipboard();
@@ -145,7 +145,7 @@ void KClipboardSynchronizer::slotSelectionChanged()
TQClipboard::Clipboard );
}
-void KClipboardSynchronizer::slotClipboardChanged()
+void TDEClipboardSynchronizer::slotClipboardChanged()
{
TQClipboard *clip = TQApplication::clipboard();
@@ -157,7 +157,7 @@ void KClipboardSynchronizer::slotClipboardChanged()
TQClipboard::Selection );
}
-void KClipboardSynchronizer::setClipboard( TQMimeSource *data, TQClipboard::Mode mode )
+void TDEClipboardSynchronizer::setClipboard( TQMimeSource *data, TQClipboard::Mode mode )
{
// tqDebug("---> setting clipboard: %p", data);
@@ -177,20 +177,20 @@ void KClipboardSynchronizer::setClipboard( TQMimeSource *data, TQClipboard::Mode
s_blocked = false;
}
-void KClipboardSynchronizer::setSynchronizing( bool sync )
+void TDEClipboardSynchronizer::setSynchronizing( bool sync )
{
s_sync = sync;
self()->setupSignals();
}
-void KClipboardSynchronizer::setReverseSynchronizing( bool enable )
+void TDEClipboardSynchronizer::setReverseSynchronizing( bool enable )
{
s_reverse_sync = enable;
self()->setupSignals();
}
-// private, called by KApplication
-void KClipboardSynchronizer::newConfiguration( int config )
+// private, called by TDEApplication
+void TDEClipboardSynchronizer::newConfiguration( int config )
{
s_sync = (config & Synchronize);
self()->setupSignals();
diff --git a/tdecore/kclipboard.h b/tdecore/kclipboard.h
index 7facc86fd..8ed8dcc91 100644
--- a/tdecore/kclipboard.h
+++ b/tdecore/kclipboard.h
@@ -33,23 +33,23 @@
* @since 3.1
* @internal
*/
-class TDECORE_EXPORT KClipboardSynchronizer : public TQObject
+class TDECORE_EXPORT TDEClipboardSynchronizer : public TQObject
{
Q_OBJECT
public:
/** Systray widget for manipulating the clipboard. */
friend class KlipperWidget;
- friend class KApplication;
+ friend class TDEApplication;
/**
- * Returns the KClipboardSynchronizer singleton object.
- * @return the KClipboardSynchronizer singleton object.
+ * Returns the TDEClipboardSynchronizer singleton object.
+ * @return the TDEClipboardSynchronizer singleton object.
*/
- static KClipboardSynchronizer *self();
+ static TDEClipboardSynchronizer *self();
/**
- * Configures KClipboardSynchronizer to synchronize the Selection to Clipboard whenever
+ * Configures TDEClipboardSynchronizer to synchronize the Selection to Clipboard whenever
* it changes.
*
* Default is false.
@@ -69,7 +69,7 @@ public:
}
/**
- * Configures KClipboardSynchronizer to copy the Clipboard buffer to the Selection
+ * Configures TDEClipboardSynchronizer to copy the Clipboard buffer to the Selection
* buffer whenever the Clipboard changes.
*
*
@@ -93,19 +93,19 @@ public:
protected:
- ~KClipboardSynchronizer();
+ ~TDEClipboardSynchronizer();
private slots:
void slotSelectionChanged();
void slotClipboardChanged();
private:
- KClipboardSynchronizer( TQObject *parent = 0, const char *name = 0L );
+ TDEClipboardSynchronizer( TQObject *parent = 0, const char *name = 0L );
void setupSignals();
static void setClipboard( TQMimeSource* data, TQClipboard::Mode mode );
- static KClipboardSynchronizer *s_self;
+ static TDEClipboardSynchronizer *s_self;
static bool s_sync;
static bool s_reverse_sync;
static bool s_blocked;
@@ -115,7 +115,7 @@ private:
private:
// needed by klipper
enum Configuration { Synchronize = 1 };
- // called by KApplication upon kipc message, invoked by klipper
+ // called by TDEApplication upon kipc message, invoked by klipper
static void newConfiguration( int config );
};
diff --git a/tdecore/kcompletion.cpp b/tdecore/kcompletion.cpp
index f74c0460c..4a80d85df 100644
--- a/tdecore/kcompletion.cpp
+++ b/tdecore/kcompletion.cpp
@@ -18,11 +18,11 @@
*/
-#include <kapplication.h>
+#include <tdeapplication.h>
#include <kdebug.h>
-#include <klocale.h>
+#include <tdelocale.h>
#include <knotifyclient.h>
-#include <kglobal.h>
+#include <tdeglobal.h>
#include <tqptrvector.h>
@@ -30,20 +30,20 @@
#include "kcompletion_private.h"
-class KCompletionPrivate
+class TDECompletionPrivate
{
public:
// not a member to avoid #including kcompletion_private.h from kcompletion.h
// list used for nextMatch() and previousMatch()
- KCompletionMatchesWrapper matches;
+ TDECompletionMatchesWrapper matches;
};
-KCompletion::KCompletion()
+TDECompletion::TDECompletion()
{
- d = new KCompletionPrivate;
+ d = new TDECompletionPrivate;
- myCompletionMode = KGlobalSettings::completionMode();
- myTreeRoot = new KCompTreeNode;
+ myCompletionMode = TDEGlobalSettings::completionMode();
+ myTreeRoot = new TDECompTreeNode;
myBeep = true;
myIgnoreCase = false;
myHasMultipleMatches = false;
@@ -51,31 +51,31 @@ KCompletion::KCompletion()
setOrder( Insertion );
}
-KCompletion::~KCompletion()
+TDECompletion::~TDECompletion()
{
delete d;
delete myTreeRoot;
}
-void KCompletion::setOrder( CompOrder order )
+void TDECompletion::setOrder( CompOrder order )
{
myOrder = order;
d->matches.setSorting( order == Weighted );
}
-void KCompletion::setIgnoreCase( bool ignoreCase )
+void TDECompletion::setIgnoreCase( bool ignoreCase )
{
myIgnoreCase = ignoreCase;
}
-void KCompletion::setItems( const TQStringList& items )
+void TDECompletion::setItems( const TQStringList& items )
{
clear();
insertItems( items );
}
-void KCompletion::insertItems( const TQStringList& items )
+void TDECompletion::insertItems( const TQStringList& items )
{
bool weighted = (myOrder == Weighted);
TQStringList::ConstIterator it;
@@ -89,21 +89,21 @@ void KCompletion::insertItems( const TQStringList& items )
}
}
-TQStringList KCompletion::items() const
+TQStringList TDECompletion::items() const
{
- KCompletionMatchesWrapper list; // unsorted
+ TDECompletionMatchesWrapper list; // unsorted
bool addWeight = (myOrder == Weighted);
extractStringsFromNode( myTreeRoot, TQString::null, &list, addWeight );
return list.list();
}
-bool KCompletion::isEmpty() const
+bool TDECompletion::isEmpty() const
{
return (myTreeRoot->childrenCount() == 0);
}
-void KCompletion::addItem( const TQString& item )
+void TDECompletion::addItem( const TQString& item )
{
d->matches.clear();
myRotationIndex = 0;
@@ -112,12 +112,12 @@ void KCompletion::addItem( const TQString& item )
addItem( item, 0 );
}
-void KCompletion::addItem( const TQString& item, uint weight )
+void TDECompletion::addItem( const TQString& item, uint weight )
{
if ( item.isEmpty() )
return;
- KCompTreeNode *node = myTreeRoot;
+ TDECompTreeNode *node = myTreeRoot;
uint len = item.length();
bool sorted = (myOrder == Sorted);
@@ -139,7 +139,7 @@ void KCompletion::addItem( const TQString& item, uint weight )
// tqDebug("*** added: %s (%i)", item.latin1(), node->weight());
}
-void KCompletion::addWeightedItem( const TQString& item )
+void TDECompletion::addWeightedItem( const TQString& item )
{
if ( myOrder != Weighted ) {
addItem( item, 0 );
@@ -165,7 +165,7 @@ void KCompletion::addWeightedItem( const TQString& item )
}
-void KCompletion::removeItem( const TQString& item )
+void TDECompletion::removeItem( const TQString& item )
{
d->matches.clear();
myRotationIndex = 0;
@@ -175,23 +175,23 @@ void KCompletion::removeItem( const TQString& item )
}
-void KCompletion::clear()
+void TDECompletion::clear()
{
d->matches.clear();
myRotationIndex = 0;
myLastString = TQString::null;
delete myTreeRoot;
- myTreeRoot = new KCompTreeNode;
+ myTreeRoot = new TDECompTreeNode;
}
-TQString KCompletion::makeCompletion( const TQString& string )
+TQString TDECompletion::makeCompletion( const TQString& string )
{
- if ( myCompletionMode == KGlobalSettings::CompletionNone )
+ if ( myCompletionMode == TDEGlobalSettings::CompletionNone )
return TQString::null;
- //kdDebug(0) << "KCompletion: completing: " << string << endl;
+ //kdDebug(0) << "TDECompletion: completing: " << string << endl;
d->matches.clear();
myRotationIndex = 0;
@@ -200,7 +200,7 @@ TQString KCompletion::makeCompletion( const TQString& string )
// in Shell-completion-mode, emit all matches when we get the same
// complete-string twice
- if ( myCompletionMode == KGlobalSettings::CompletionShell &&
+ if ( myCompletionMode == TDEGlobalSettings::CompletionShell &&
string == myLastString ) {
// Don't use d->matches since calling postProcessMatches()
// on d->matches here would interfere with call to
@@ -219,8 +219,8 @@ TQString KCompletion::makeCompletion( const TQString& string )
TQString completion;
// in case-insensitive popup mode, we search all completions at once
- if ( myCompletionMode == KGlobalSettings::CompletionPopup ||
- myCompletionMode == KGlobalSettings::CompletionPopupAuto ) {
+ if ( myCompletionMode == TDEGlobalSettings::CompletionPopup ||
+ myCompletionMode == TDEGlobalSettings::CompletionPopupAuto ) {
findAllCompletions( string, &d->matches, myHasMultipleMatches );
if ( !d->matches.isEmpty() )
completion = d->matches.first();
@@ -237,7 +237,7 @@ TQString KCompletion::makeCompletion( const TQString& string )
postProcessMatch( &completion );
if ( !string.isEmpty() ) { // only emit match when string is not empty
- //kdDebug(0) << "KCompletion: Match: " << completion << endl;
+ //kdDebug(0) << "TDECompletion: Match: " << completion << endl;
emit match( completion );
}
@@ -248,11 +248,11 @@ TQString KCompletion::makeCompletion( const TQString& string )
}
-TQStringList KCompletion::substringCompletion( const TQString& string ) const
+TQStringList TDECompletion::substringCompletion( const TQString& string ) const
{
// get all items in the tree, possibly in sorted order
bool sorted = (myOrder == Weighted);
- KCompletionMatchesWrapper allItems( sorted );
+ TDECompletionMatchesWrapper allItems( sorted );
extractStringsFromNode( myTreeRoot, TQString::null, &allItems, false );
TQStringList list = allItems.list();
@@ -288,17 +288,17 @@ TQStringList KCompletion::substringCompletion( const TQString& string ) const
}
-void KCompletion::setCompletionMode( KGlobalSettings::Completion mode )
+void TDECompletion::setCompletionMode( TDEGlobalSettings::Completion mode )
{
myCompletionMode = mode;
}
-TQStringList KCompletion::allMatches()
+TQStringList TDECompletion::allMatches()
{
// Don't use d->matches since calling postProcessMatches()
// on d->matches here would interfere with call to
// postProcessMatch() during rotation
- KCompletionMatchesWrapper matches( myOrder == Weighted );
+ TDECompletionMatchesWrapper matches( myOrder == Weighted );
bool dummy;
findAllCompletions( myLastString, &matches, dummy );
TQStringList l = matches.list();
@@ -306,22 +306,22 @@ TQStringList KCompletion::allMatches()
return l;
}
-KCompletionMatches KCompletion::allWeightedMatches()
+TDECompletionMatches TDECompletion::allWeightedMatches()
{
// Don't use d->matches since calling postProcessMatches()
// on d->matches here would interfere with call to
// postProcessMatch() during rotation
- KCompletionMatchesWrapper matches( myOrder == Weighted );
+ TDECompletionMatchesWrapper matches( myOrder == Weighted );
bool dummy;
findAllCompletions( myLastString, &matches, dummy );
- KCompletionMatches ret( matches );
+ TDECompletionMatches ret( matches );
postProcessMatches( &ret );
return ret;
}
-TQStringList KCompletion::allMatches( const TQString &string )
+TQStringList TDECompletion::allMatches( const TQString &string )
{
- KCompletionMatchesWrapper matches( myOrder == Weighted );
+ TDECompletionMatchesWrapper matches( myOrder == Weighted );
bool dummy;
findAllCompletions( string, &matches, dummy );
TQStringList l = matches.list();
@@ -329,12 +329,12 @@ TQStringList KCompletion::allMatches( const TQString &string )
return l;
}
-KCompletionMatches KCompletion::allWeightedMatches( const TQString &string )
+TDECompletionMatches TDECompletion::allWeightedMatches( const TQString &string )
{
- KCompletionMatchesWrapper matches( myOrder == Weighted );
+ TDECompletionMatchesWrapper matches( myOrder == Weighted );
bool dummy;
findAllCompletions( string, &matches, dummy );
- KCompletionMatches ret( matches );
+ TDECompletionMatches ret( matches );
postProcessMatches( &ret );
return ret;
}
@@ -343,7 +343,7 @@ KCompletionMatches KCompletion::allWeightedMatches( const TQString &string )
///////////////// tree operations ///////////////////
-TQString KCompletion::nextMatch()
+TQString TDECompletion::nextMatch()
{
TQString completion;
myLastMatch = myCurrentMatch;
@@ -376,7 +376,7 @@ TQString KCompletion::nextMatch()
-TQString KCompletion::previousMatch()
+TQString TDECompletion::previousMatch()
{
TQString completion;
myLastMatch = myCurrentMatch;
@@ -411,11 +411,11 @@ TQString KCompletion::previousMatch()
// tries to complete "string" from the tree-root
-TQString KCompletion::findCompletion( const TQString& string )
+TQString TDECompletion::findCompletion( const TQString& string )
{
TQChar ch;
TQString completion;
- const KCompTreeNode *node = myTreeRoot;
+ const TDECompTreeNode *node = myTreeRoot;
// start at the tree-root and try to find the search-string
for( uint i = 0; i < string.length(); i++ ) {
@@ -442,7 +442,7 @@ TQString KCompletion::findCompletion( const TQString& string )
if ( node && node->childrenCount() > 1 ) {
myHasMultipleMatches = true;
- if ( myCompletionMode == KGlobalSettings::CompletionAuto ) {
+ if ( myCompletionMode == TDEGlobalSettings::CompletionAuto ) {
myRotationIndex = 1;
if (myOrder != Weighted) {
while ( (node = node->firstChild()) ) {
@@ -456,12 +456,12 @@ TQString KCompletion::findCompletion( const TQString& string )
// don't just find the "first" match, but the one with the
// highest priority
- const KCompTreeNode* temp_node = 0L;
+ const TDECompTreeNode* temp_node = 0L;
while(1) {
int count = node->childrenCount();
temp_node = node->firstChild();
uint weight = temp_node->weight();
- const KCompTreeNode* hit = temp_node;
+ const TDECompTreeNode* hit = temp_node;
for( int i = 1; i < count; i++ ) {
temp_node = node->childAt(i);
if( temp_node->weight() > weight ) {
@@ -487,8 +487,8 @@ TQString KCompletion::findCompletion( const TQString& string )
}
-void KCompletion::findAllCompletions(const TQString& string,
- KCompletionMatchesWrapper *matches,
+void TDECompletion::findAllCompletions(const TQString& string,
+ TDECompletionMatchesWrapper *matches,
bool& hasMultipleMatches) const
{
//kdDebug(0) << "*** finding all completions for " << string << endl;
@@ -504,7 +504,7 @@ void KCompletion::findAllCompletions(const TQString& string,
TQChar ch;
TQString completion;
- const KCompTreeNode *node = myTreeRoot;
+ const TDECompTreeNode *node = myTreeRoot;
// start at the tree-root and try to find the search-string
for( uint i = 0; i < string.length(); i++ ) {
@@ -542,21 +542,21 @@ void KCompletion::findAllCompletions(const TQString& string,
}
-void KCompletion::extractStringsFromNode( const KCompTreeNode *node,
+void TDECompletion::extractStringsFromNode( const TDECompTreeNode *node,
const TQString& beginning,
- KCompletionMatchesWrapper *matches,
+ TDECompletionMatchesWrapper *matches,
bool addWeight ) const
{
if ( !node || !matches )
return;
// kDebug() << "Beginning: " << beginning << endl;
- const KCompTreeChildren *list = node->children();
+ const TDECompTreeChildren *list = node->children();
TQString string;
TQString w;
// loop thru all children
- for ( KCompTreeNode *cur = list->begin(); cur ; cur = cur->next) {
+ for ( TDECompTreeNode *cur = list->begin(); cur ; cur = cur->next) {
string = beginning;
node = cur;
if ( !node->isNull() )
@@ -585,10 +585,10 @@ void KCompletion::extractStringsFromNode( const KCompTreeNode *node,
}
}
-void KCompletion::extractStringsFromNodeCI( const KCompTreeNode *node,
+void TDECompletion::extractStringsFromNodeCI( const TDECompTreeNode *node,
const TQString& beginning,
const TQString& restString,
- KCompletionMatchesWrapper *matches ) const
+ TDECompletionMatchesWrapper *matches ) const
{
if ( restString.isEmpty() ) {
extractStringsFromNode( node, beginning, matches, false /*noweight*/ );
@@ -597,7 +597,7 @@ void KCompletion::extractStringsFromNodeCI( const KCompTreeNode *node,
TQChar ch1 = restString.at(0);
TQString newRest = restString.mid(1);
- KCompTreeNode *child1, *child2;
+ TDECompTreeNode *child1, *child2;
child1 = node->find( ch1 ); // the correct match
if ( child1 )
@@ -619,7 +619,7 @@ void KCompletion::extractStringsFromNodeCI( const KCompTreeNode *node,
}
}
-void KCompletion::doBeep( BeepMode mode ) const
+void TDECompletion::doBeep( BeepMode mode ) const
{
if ( !myBeep )
return;
@@ -632,14 +632,14 @@ void KCompletion::doBeep( BeepMode mode ) const
text = i18n("You reached the end of the list\nof matching items.\n");
break;
case PartialMatch:
- if ( myCompletionMode == KGlobalSettings::CompletionShell ||
- myCompletionMode == KGlobalSettings::CompletionMan ) {
+ if ( myCompletionMode == TDEGlobalSettings::CompletionShell ||
+ myCompletionMode == TDEGlobalSettings::CompletionMan ) {
event = TQString::fromLatin1("Textcompletion: partial match");
text = i18n("The completion is ambiguous, more than one\nmatch is available.\n");
}
break;
case NoMatch:
- if ( myCompletionMode == KGlobalSettings::CompletionShell ) {
+ if ( myCompletionMode == TDEGlobalSettings::CompletionShell ) {
event = TQString::fromLatin1("Textcompletion: no match");
text = i18n("There is no matching item available.\n");
}
@@ -660,12 +660,12 @@ void KCompletion::doBeep( BeepMode mode ) const
// TQChar( 0x0 ) is used as the delimiter of a string; the last child of each
// inserted string is 0x0.
-KCompTreeNode::~KCompTreeNode()
+TDECompTreeNode::~TDECompTreeNode()
{
// delete all children
- KCompTreeNode *cur = myChildren.begin();
+ TDECompTreeNode *cur = myChildren.begin();
while (cur) {
- KCompTreeNode * next = cur->next;
+ TDECompTreeNode * next = cur->next;
delete myChildren.remove(cur);
cur = next;
}
@@ -674,16 +674,16 @@ KCompTreeNode::~KCompTreeNode()
// Adds a child-node "ch" to this node. If such a node is already existant,
// it will not be created. Returns the new/existing node.
-KCompTreeNode * KCompTreeNode::insert( const TQChar& ch, bool sorted )
+TDECompTreeNode * TDECompTreeNode::insert( const TQChar& ch, bool sorted )
{
- KCompTreeNode *child = find( ch );
+ TDECompTreeNode *child = find( ch );
if ( !child ) {
- child = new KCompTreeNode( ch );
+ child = new TDECompTreeNode( ch );
// FIXME, first (slow) sorted insertion implementation
if ( sorted ) {
- KCompTreeNode * prev = 0;
- KCompTreeNode * cur = myChildren.begin();
+ TDECompTreeNode * prev = 0;
+ TDECompTreeNode * cur = myChildren.begin();
while ( cur ) {
if ( ch > *cur ) {
prev = cur;
@@ -711,15 +711,15 @@ KCompTreeNode * KCompTreeNode::insert( const TQChar& ch, bool sorted )
// Iteratively removes a string from the tree. The nicer recursive
// version apparently was a little memory hungry (see #56757)
-void KCompTreeNode::remove( const TQString& str )
+void TDECompTreeNode::remove( const TQString& str )
{
TQString string = str;
string += TQChar(0x0);
- TQPtrVector<KCompTreeNode> deletables( string.length() + 1 );
+ TQPtrVector<TDECompTreeNode> deletables( string.length() + 1 );
- KCompTreeNode *child = 0L;
- KCompTreeNode *parent = this;
+ TDECompTreeNode *child = 0L;
+ TDECompTreeNode *parent = this;
deletables.insert( 0, parent );
uint i = 0;
@@ -743,7 +743,7 @@ void KCompTreeNode::remove( const TQString& str )
}
}
-TQStringList KCompletionMatchesWrapper::list() const
+TQStringList TDECompletionMatchesWrapper::list() const
{
if ( sortedList && dirty ) {
sortedList->sort();
@@ -760,16 +760,16 @@ TQStringList KCompletionMatchesWrapper::list() const
return stringList;
}
-KCompletionMatches::KCompletionMatches( bool sort_P )
+TDECompletionMatches::TDECompletionMatches( bool sort_P )
: _sorting( sort_P )
{
}
-KCompletionMatches::KCompletionMatches( const KCompletionMatchesWrapper& matches )
+TDECompletionMatches::TDECompletionMatches( const TDECompletionMatchesWrapper& matches )
: _sorting( matches.sorting())
{
if( matches.sortedList != 0L )
- KCompletionMatchesList::operator=( *matches.sortedList );
+ TDECompletionMatchesList::operator=( *matches.sortedList );
else {
TQStringList l = matches.list();
for( TQStringList::ConstIterator it = l.begin();
@@ -779,14 +779,14 @@ KCompletionMatches::KCompletionMatches( const KCompletionMatchesWrapper& matches
}
}
-KCompletionMatches::~KCompletionMatches()
+TDECompletionMatches::~TDECompletionMatches()
{
}
-TQStringList KCompletionMatches::list( bool sort_P ) const
+TQStringList TDECompletionMatches::list( bool sort_P ) const
{
if( _sorting && sort_P )
- const_cast< KCompletionMatches* >( this )->sort();
+ const_cast< TDECompletionMatches* >( this )->sort();
TQStringList stringList;
// high weight == sorted last -> reverse the sorting here
for ( ConstIterator it = begin(); it != end(); ++it )
@@ -794,7 +794,7 @@ TQStringList KCompletionMatches::list( bool sort_P ) const
return stringList;
}
-void KCompletionMatches::removeDuplicates()
+void TDECompletionMatches::removeDuplicates()
{
Iterator it1, it2;
for ( it1 = begin(); it1 != end(); ++it1 ) {
@@ -810,7 +810,7 @@ void KCompletionMatches::removeDuplicates()
}
}
-void KCompTreeNodeList::append(KCompTreeNode *item)
+void TDECompTreeNodeList::append(TDECompTreeNode *item)
{
m_count++;
if (!last) {
@@ -824,7 +824,7 @@ void KCompTreeNodeList::append(KCompTreeNode *item)
last = item;
}
-void KCompTreeNodeList::prepend(KCompTreeNode *item)
+void TDECompTreeNodeList::prepend(TDECompTreeNode *item)
{
m_count++;
if (!last) {
@@ -837,7 +837,7 @@ void KCompTreeNodeList::prepend(KCompTreeNode *item)
first = item;
}
-void KCompTreeNodeList::insert(KCompTreeNode *after, KCompTreeNode *item)
+void TDECompTreeNodeList::insert(TDECompTreeNode *after, TDECompTreeNode *item)
{
if (!after) {
append(item);
@@ -853,11 +853,11 @@ void KCompTreeNodeList::insert(KCompTreeNode *after, KCompTreeNode *item)
last = item;
}
-KCompTreeNode *KCompTreeNodeList::remove(KCompTreeNode *item)
+TDECompTreeNode *TDECompTreeNodeList::remove(TDECompTreeNode *item)
{
if (!first || !item)
return 0;
- KCompTreeNode *cur = 0;
+ TDECompTreeNode *cur = 0;
if (item == first)
first = first->next;
@@ -874,19 +874,19 @@ KCompTreeNode *KCompTreeNodeList::remove(KCompTreeNode *item)
return item;
}
-KCompTreeNode *KCompTreeNodeList::at(uint index) const
+TDECompTreeNode *TDECompTreeNodeList::at(uint index) const
{
- KCompTreeNode *cur = first;
+ TDECompTreeNode *cur = first;
while (index-- && cur) cur = cur->next;
return cur;
}
-KZoneAllocator KCompTreeNode::alloc(8192);
+TDEZoneAllocator TDECompTreeNode::alloc(8192);
-void KCompletion::virtual_hook( int, void* )
+void TDECompletion::virtual_hook( int, void* )
{ /*BASE::virtual_hook( id, data );*/ }
-void KCompletionBase::virtual_hook( int, void* )
+void TDECompletionBase::virtual_hook( int, void* )
{ /*BASE::virtual_hook( id, data );*/ }
#include "kcompletion.moc"
diff --git a/tdecore/kcompletion.h b/tdecore/kcompletion.h
index c0ba02d34..2bce648fb 100644
--- a/tdecore/kcompletion.h
+++ b/tdecore/kcompletion.h
@@ -28,15 +28,15 @@
#include <tqguardedptr.h>
#include "tdelibs_export.h"
-#include <kglobalsettings.h>
+#include <tdeglobalsettings.h>
#include <ksortablevaluelist.h>
-#include <kshortcut.h>
+#include <tdeshortcut.h>
-class KCompTreeNode;
-class KCompletionPrivate;
-class KCompletionBasePrivate;
-class KCompletionMatchesWrapper;
-class KCompletionMatches;
+class TDECompTreeNode;
+class TDECompletionPrivate;
+class TDECompletionBasePrivate;
+class TDECompletionMatchesWrapper;
+class TDECompletionMatches;
class TQPopupMenu;
/**
@@ -49,13 +49,13 @@ class TQPopupMenu;
* The user should be able to complete email-addresses, telephone-numbers,
* commands, SQL queries, ...
* Every time your program knows what the user can type into an edit-field, you
- * should offer completion. With KCompletion, this is very easy, and if you are
+ * should offer completion. With TDECompletion, this is very easy, and if you are
* using a line edit widget ( KLineEdit), it is even more easy.
- * Basically, you tell a KCompletion object what strings should be completable
+ * Basically, you tell a TDECompletion object what strings should be completable
* and whenever completion should be invoked, you call makeCompletion().
* KLineEdit and (an editable) KComboBox even do this automatically for you.
*
- * KCompletion offers the completed string via the signal match() and
+ * TDECompletion offers the completed string via the signal match() and
* all matching strings (when the result is ambiguous) via the method
* allMatches().
*
@@ -75,11 +75,11 @@ class TQPopupMenu;
* subtle difference is, that it isn't invoked automatically while the user
* is typing, but only when the user presses a special key. The difference
* of manual and auto-completion is therefore only visible in UI classes,
- * KCompletion needs to know whether to deliver partial matches
+ * TDECompletion needs to know whether to deliver partial matches
* (shell completion) or whole matches (auto/manual completion), therefore
- * KGlobalSettings::CompletionMan and
- * KGlobalSettings::CompletionAuto have the exact same effect in
- * KCompletion.
+ * TDEGlobalSettings::CompletionMan and
+ * TDEGlobalSettings::CompletionAuto have the exact same effect in
+ * TDECompletion.
*
* @li shell completion works like how shells complete filenames:
* when multiple matches are available, the longest possible string of all
@@ -87,15 +87,15 @@ class TQPopupMenu;
* Iterating over all matching items (complete, not partial) is possible
* via nextMatch() and previousMatch().
*
- * You don't have to worry much about that though, KCompletion handles
+ * You don't have to worry much about that though, TDECompletion handles
* that for you, according to the setting setCompletionMode().
* The default setting is globally configured by the user and read
- * from KGlobalSettings::completionMode().
+ * from TDEGlobalSettings::completionMode().
*
* A short example:
* \code
- * KCompletion completion;
- * completion.setOrder( KCompletion::Sorted );
+ * TDECompletion completion;
+ * completion.setOrder( TDECompletion::Sorted );
* completion.addItem( "pfeiffer@kde.org" );
* completion.addItem( "coolo@kde.org" );
* completion.addItem( "carpdjih@sp.zrz.tu-berlin.de" );
@@ -113,23 +113,23 @@ class TQPopupMenu;
*
* You can dynamically update the completable items by removing and adding them
* whenever you want.
- * For advanced usage, you could even use multiple KCompletion objects. E.g.
+ * For advanced usage, you could even use multiple TDECompletion objects. E.g.
* imagine an editor like kwrite with multiple open files. You could store
- * items of each file in a different KCompletion object, so that you know (and
+ * items of each file in a different TDECompletion object, so that you know (and
* tell the user) where a completion comes from.
*
- * Note: KCompletion does not work with strings that contain 0x0 characters
+ * Note: TDECompletion does not work with strings that contain 0x0 characters
* (unicode nul), as this is used internally as a delimiter.
*
- * You may inherit from KCompletion and override makeCompletion() in
+ * You may inherit from TDECompletion and override makeCompletion() in
* special cases (like reading directories/urls and then supplying the
- * contents to KCompletion, as KURLCompletion does), but generally, this is
+ * contents to TDECompletion, as KURLCompletion does), but generally, this is
* not necessary.
*
*
* @author Carsten Pfeiffer <pfeiffer@kde.org>
*/
-class TDECORE_EXPORT KCompletion : public TQObject
+class TDECORE_EXPORT TDECompletion : public TQObject
{
TQ_ENUMS( CompOrder )
TQ_PROPERTY( CompOrder order READ order WRITE setOrder )
@@ -139,7 +139,7 @@ class TDECORE_EXPORT KCompletion : public TQObject
public:
/**
- * Constants that represent the order in which KCompletion performs
+ * Constants that represent the order in which TDECompletion performs
* completion-lookups.
*/
enum CompOrder { Sorted, ///< Use alphabetically sorted order
@@ -150,14 +150,14 @@ public:
/**
* Constructor, nothing special here :)
*/
- KCompletion();
+ TDECompletion();
// FIXME: copy constructor, assignment operator...
/**
* Destructor, nothing special here, either.
*/
- virtual ~KCompletion();
+ virtual ~TDECompletion();
/**
* Attempts to find an item in the list of available completions,
@@ -224,8 +224,8 @@ public:
virtual const TQString& lastMatch() const { return myLastMatch; }
/**
- * Returns a list of all items inserted into KCompletion. This is useful
- * if you need to save the state of a KCompletion object and restore it
+ * Returns a list of all items inserted into TDECompletion. This is useful
+ * if you need to save the state of a TDECompletion object and restore it
* later.
*
* Important note: when order() == Weighted, then every item in the
@@ -235,7 +235,7 @@ public:
* This is necessary so that you can save the items along with its
* weighting on disk and load them back with setItems(), restoring its
* weight as well. If you really don't want the appended weightings, call
- * setOrder( KCompletion::Insertion )
+ * setOrder( TDECompletion::Insertion )
* before calling items().
*
* @return a list of all items
@@ -251,32 +251,32 @@ public:
/**
* Sets the completion mode to Auto/Manual, Shell or None.
* If you don't set the mode explicitly, the global default value
- * KGlobalSettings::completionMode() is used.
- * KGlobalSettings::CompletionNone disables completion.
+ * TDEGlobalSettings::completionMode() is used.
+ * TDEGlobalSettings::CompletionNone disables completion.
* @param mode the completion mode
* @see completionMode
- * @see KGlobalSettings::completionMode
+ * @see TDEGlobalSettings::completionMode
*/
- virtual void setCompletionMode( KGlobalSettings::Completion mode );
+ virtual void setCompletionMode( TDEGlobalSettings::Completion mode );
/**
* Return the current completion mode.
- * May be different from KGlobalSettings::completionMode(), if you
+ * May be different from TDEGlobalSettings::completionMode(), if you
* explicitly called setCompletionMode().
* @return the current completion mode
* @see setCompletionMode
*/
- KGlobalSettings::Completion completionMode() const {
+ TDEGlobalSettings::Completion completionMode() const {
return myCompletionMode;
}
/**
- * KCompletion offers three different ways in which it offers its items:
+ * TDECompletion offers three different ways in which it offers its items:
* @li in the order of insertion
* @li sorted alphabetically
* @li weighted
*
- * Choosing weighted makes KCompletion perform an implicit weighting based
+ * Choosing weighted makes TDECompletion perform an implicit weighting based
* on how often an item is inserted. Imagine a web browser with a location
* bar, where the user enters URLs. The more often a URL is entered, the
* higher priority it gets.
@@ -300,7 +300,7 @@ public:
CompOrder order() const { return myOrder; }
/**
- * Setting this to true makes KCompletion behave case insensitively.
+ * Setting this to true makes TDECompletion behave case insensitively.
* E.g. makeCompletion( "CA" ); might return "carp\@cs.tu-berlin.de".
* Default is false (case sensitive).
* @param ignoreCase true to ignore the case
@@ -309,7 +309,7 @@ public:
virtual void setIgnoreCase( bool ignoreCase );
/**
- * Return whether KCompletion acts case insensitively or not.
+ * Return whether TDECompletion acts case insensitively or not.
* Default is false (case sensitive).
* @return true if the case will be ignored
* @see setIgnoreCase
@@ -334,7 +334,7 @@ public:
/**
* Returns a list of all items matching the last completed string.
* Might take some time, when you have LOTS of items.
- * The matches are returned as KCompletionMatches, which also
+ * The matches are returned as TDECompletionMatches, which also
* keeps the weight of the matches, allowing
* you to modify some matches or merge them with matches
* from another call to allWeightedMatches(), and sort the matches
@@ -343,14 +343,14 @@ public:
* @return a list of all completion matches
* @see substringCompletion
*/
- KCompletionMatches allWeightedMatches();
+ TDECompletionMatches allWeightedMatches();
/**
* Returns a list of all items matching @p string.
* @param string the string to match
* @return a list of all matches
*/
- KCompletionMatches allWeightedMatches( const TQString& string );
+ TDECompletionMatches allWeightedMatches( const TQString& string );
/**
* Enables/disables playing a sound when
@@ -368,7 +368,7 @@ public:
virtual void setEnableSounds( bool enable ) { myBeep = enable; }
/**
- * Tells you whether KCompletion will play sounds on certain occasions.
+ * Tells you whether TDECompletion will play sounds on certain occasions.
* Default is enabled.
* @return true if sounds are enabled
* @see enableSounds
@@ -444,7 +444,7 @@ public slots:
* where number is an unsigned integer, specifying the weighting.
*
* If you don't like this, call
- * setOrder( KCompletion::Insertion )
+ * setOrder( TDECompletion::Insertion )
* before calling setItems().
*
* @param list the list of items that are available for completion
@@ -518,7 +518,7 @@ protected:
* string that will be emitted.
* This is necessary e.g. in KURLCompletion(), where files with spaces
* in their names are shown escaped ("filename\ with\ spaces"), but stored
- * unescaped inside KCompletion.
+ * unescaped inside TDECompletion.
* Never delete that pointer!
*
* Default implementation does nothing.
@@ -549,34 +549,34 @@ protected:
* @param matches the matches to process
* @see postProcessMatch
*/
- virtual void postProcessMatches( KCompletionMatches * matches ) const {Q_UNUSED(matches)}
+ virtual void postProcessMatches( TDECompletionMatches * matches ) const {Q_UNUSED(matches)}
private:
void addWeightedItem( const TQString& );
TQString findCompletion( const TQString& string );
void findAllCompletions( const TQString&,
- KCompletionMatchesWrapper *matches,
+ TDECompletionMatchesWrapper *matches,
bool& hasMultipleMatches ) const;
- void extractStringsFromNode( const KCompTreeNode *,
+ void extractStringsFromNode( const TDECompTreeNode *,
const TQString& beginning,
- KCompletionMatchesWrapper *matches,
+ TDECompletionMatchesWrapper *matches,
bool addWeight = false ) const;
- void extractStringsFromNodeCI( const KCompTreeNode *,
+ void extractStringsFromNodeCI( const TDECompTreeNode *,
const TQString& beginning,
const TQString& restString,
- KCompletionMatchesWrapper *matches) const;
+ TDECompletionMatchesWrapper *matches) const;
enum BeepMode { NoMatch, PartialMatch, Rotation };
void doBeep( BeepMode ) const;
- KGlobalSettings::Completion myCompletionMode;
+ TDEGlobalSettings::Completion myCompletionMode;
CompOrder myOrder;
TQString myLastString;
TQString myLastMatch;
TQString myCurrentMatch;
- KCompTreeNode * myTreeRoot;
+ TDECompTreeNode * myTreeRoot;
TQStringList myRotations;
bool myBeep;
bool myIgnoreCase;
@@ -587,15 +587,15 @@ private:
protected:
virtual void virtual_hook( int id, void* data );
private:
- KCompletionPrivate *d;
+ TDECompletionPrivate *d;
};
// some more helper stuff
-typedef KSortableValueList<TQString> KCompletionMatchesList;
-class KCompletionMatchesPrivate;
+typedef KSortableValueList<TQString> TDECompletionMatchesList;
+class TDECompletionMatchesPrivate;
/**
- * This structure is returned by KCompletion::allWeightedMatches .
+ * This structure is returned by TDECompletion::allWeightedMatches .
* It also keeps the weight of the matches, allowing
* you to modify some matches or merge them with matches
* from another call to allWeightedMatches(), and sort the matches
@@ -603,24 +603,24 @@ class KCompletionMatchesPrivate;
*
* Example (a simplified example of what Konqueror's completion does):
* \code
- * KCompletionMatches matches = completion->allWeightedMatches( location );
+ * TDECompletionMatches matches = completion->allWeightedMatches( location );
* if( !location.startsWith( "www." ))
matches += completion->allWeightedmatches( "www." + location" );
* matches.removeDuplicates();
* TQStringList list = matches.list();
* \endcode
*
- * @short List for keeping matches returned from KCompletion
+ * @short List for keeping matches returned from TDECompletion
*/
-class TDECORE_EXPORT KCompletionMatches : public KCompletionMatchesList
+class TDECORE_EXPORT TDECompletionMatches : public TDECompletionMatchesList
{
public:
- KCompletionMatches( bool sort );
+ TDECompletionMatches( bool sort );
/**
* @internal
*/
- KCompletionMatches( const KCompletionMatchesWrapper& matches );
- ~KCompletionMatches();
+ TDECompletionMatches( const TDECompletionMatchesWrapper& matches );
+ ~TDECompletionMatches();
/**
* Removes duplicate matches. Needed only when you merged several matches
* results and there's a possibility of duplicates.
@@ -643,7 +643,7 @@ public:
}
private:
bool _sorting;
- KCompletionMatchesPrivate* d;
+ TDECompletionMatchesPrivate* d;
};
/**
@@ -660,13 +660,13 @@ private:
* @short An abstract class for adding text completion support to widgets.
* @author Dawit Alemayehu <adawit@kde.org>
*/
-class TDECORE_EXPORT KCompletionBase
+class TDECORE_EXPORT TDECompletionBase
{
public:
/**
* Constants that represent the items whose short-cut
* key-binding is programmable. The default key-bindings
- * for these items are defined in KStdAccel.
+ * for these items are defined in TDEStdAccel.
*/
enum KeyBindingType {
/**
@@ -689,17 +689,17 @@ public:
// Map for the key binding types mentioned above.
- typedef TQMap<KeyBindingType, KShortcut> KeyBindingMap;
+ typedef TQMap<KeyBindingType, TDEShortcut> KeyBindingMap;
/**
* Default constructor.
*/
- KCompletionBase();
+ TDECompletionBase();
/**
* Destructor.
*/
- virtual ~KCompletionBase();
+ virtual ~TDECompletionBase();
/**
* Returns a pointer to the current completion object.
@@ -716,7 +716,7 @@ public:
* @param hsig if true, handles completion signals internally.
* @return a pointer the completion object.
*/
- KCompletion* completionObject( bool hsig = true );
+ TDECompletion* completionObject( bool hsig = true );
/**
* Sets up the completion object to be used.
@@ -731,10 +731,10 @@ public:
* after calling this method. Be sure to set the bool argument to false, if
* you want to handle the completion signals yourself.
*
- * @param compObj a KCompletion() or a derived child object.
+ * @param compObj a TDECompletion() or a derived child object.
* @param hsig if true, handles completion signals internally.
*/
- virtual void setCompletionObject( KCompletion* compObj, bool hsig = true );
+ virtual void setCompletionObject( TDECompletion* compObj, bool hsig = true );
/**
* Enables this object to handle completion and rotation
@@ -825,7 +825,7 @@ public:
* Sets the type of completion to be used.
*
* The completion modes supported are those defined in
- * KGlobalSettings(). See below.
+ * TDEGlobalSettings(). See below.
*
* @param mode Completion type:
* @li CompletionNone: Disables completion feature.
@@ -841,17 +841,17 @@ public:
* @li CompletionPopup: Shows all available completions at once,
* in a listbox popping up.
*/
- virtual void setCompletionMode( KGlobalSettings::Completion mode );
+ virtual void setCompletionMode( TDEGlobalSettings::Completion mode );
/**
* Returns the current completion mode.
*
- * The return values are of type KGlobalSettings::Completion.
+ * The return values are of type TDEGlobalSettings::Completion.
* See setCompletionMode() for details.
*
* @return the completion mode.
*/
- KGlobalSettings::Completion completionMode() const {
+ TDEGlobalSettings::Completion completionMode() const {
return m_delegate ? m_delegate->completionMode() : m_iCompletionMode;
}
@@ -885,7 +885,7 @@ public:
* @return true if key-binding can successfully be set.
* @see getKeyBinding
*/
- bool setKeyBinding( KeyBindingType item , const KShortcut& key );
+ bool setKeyBinding( KeyBindingType item , const TDEShortcut& key );
/**
* Returns the key-binding used for the specified item.
@@ -899,7 +899,7 @@ public:
* @return the key-binding used for the feature given by @p item.
* @see setKeyBinding
*/
- const KShortcut& getKeyBinding( KeyBindingType item ) const {
+ const TDEShortcut& getKeyBinding( KeyBindingType item ) const {
return m_delegate ? m_delegate->getKeyBinding( item ) : m_keyMap[ item ];
}
@@ -908,7 +908,7 @@ public:
*
* This method changes the values of the key bindings for
* rotation and completion features to the default values
- * provided in KGlobalSettings.
+ * provided in TDEGlobalSettings.
*
* NOTE: By default inheriting widgets should uses the
* global key-bindings so that there will be no need to
@@ -924,7 +924,7 @@ public:
* implementations to set completed text appropriately. It
* is mostly relevant when the completion mode is set to
* CompletionAuto and CompletionManual modes. See
- * KCompletionBase::setCompletedText.
+ * TDECompletionBase::setCompletedText.
* Does nothing in CompletionPopup mode, as all available
* matches will be shown in the popup.
*
@@ -943,14 +943,14 @@ public:
* Returns a pointer to the completion object.
*
* This method is only different from completionObject()
- * in that it does not create a new KCompletion object even if
+ * in that it does not create a new TDECompletion object even if
* the internal pointer is @p NULL. Use this method to get the
* pointer to a completion object when inheriting so that you
* won't inadvertently create it!!
*
* @return the completion object or NULL if one does not exist.
*/
- KCompletion* compObj() const { return m_delegate ? m_delegate->compObj() : (KCompletion*) m_pCompObj; }
+ TDECompletion* compObj() const { return m_delegate ? m_delegate->compObj() : (TDECompletion*) m_pCompObj; }
protected:
/**
@@ -968,14 +968,14 @@ protected:
* set, all function calls will be forwarded to the delegation object.
* @param delegate the delegation object, or 0 to remove it
*/
- void setDelegate( KCompletionBase *delegate );
+ void setDelegate( TDECompletionBase *delegate );
/**
* Returns the delegation object.
* @return the delegation object, or 0 if there is none
* @see setDelegate()
*/
- KCompletionBase *delegate() const { return m_delegate; }
+ TDECompletionBase *delegate() const { return m_delegate; }
private:
// This method simply sets the autodelete boolean for
@@ -992,19 +992,19 @@ private:
// Determines whether this widget fires rotation signals
bool m_bEmitSignals;
// Stores the completion mode locally.
- KGlobalSettings::Completion m_iCompletionMode;
+ TDEGlobalSettings::Completion m_iCompletionMode;
// Pointer to Completion object.
- TQGuardedPtr<KCompletion> m_pCompObj;
+ TQGuardedPtr<TDECompletion> m_pCompObj;
// Keybindings
KeyBindingMap m_keyMap;
- // we may act as a proxy to another KCompletionBase object
- KCompletionBase *m_delegate;
+ // we may act as a proxy to another TDECompletionBase object
+ TDECompletionBase *m_delegate;
// BCI
protected:
virtual void virtual_hook( int id, void* data );
private:
- KCompletionBasePrivate *d;
+ TDECompletionBasePrivate *d;
};
#endif // KCOMPLETION_H
diff --git a/tdecore/kcompletion_private.h b/tdecore/kcompletion_private.h
index 3d72586f3..3d956f29d 100644
--- a/tdecore/kcompletion_private.h
+++ b/tdecore/kcompletion_private.h
@@ -24,36 +24,36 @@
#include <tqstring.h>
#include <ksortablevaluelist.h>
-class KCompTreeNode;
+class TDECompTreeNode;
#include <kallocator.h>
/**
* @internal
*/
-class TDECORE_EXPORT KCompTreeNodeList
+class TDECORE_EXPORT TDECompTreeNodeList
{
public:
- KCompTreeNodeList() : first(0), last(0), m_count(0) {}
- KCompTreeNode *begin() const { return first; }
- KCompTreeNode *end() const { return last; }
-
- KCompTreeNode *at(uint index) const;
- void append(KCompTreeNode *item);
- void prepend(KCompTreeNode *item);
- void insert(KCompTreeNode *after, KCompTreeNode *item);
- KCompTreeNode *remove(KCompTreeNode *item);
+ TDECompTreeNodeList() : first(0), last(0), m_count(0) {}
+ TDECompTreeNode *begin() const { return first; }
+ TDECompTreeNode *end() const { return last; }
+
+ TDECompTreeNode *at(uint index) const;
+ void append(TDECompTreeNode *item);
+ void prepend(TDECompTreeNode *item);
+ void insert(TDECompTreeNode *after, TDECompTreeNode *item);
+ TDECompTreeNode *remove(TDECompTreeNode *item);
uint count() const { return m_count; }
private:
- KCompTreeNode *first, *last;
+ TDECompTreeNode *first, *last;
uint m_count;
};
-typedef KCompTreeNodeList KCompTreeChildren;
+typedef TDECompTreeNodeList TDECompTreeChildren;
/**
- * A helper class for KCompletion. Implements a tree of TQChar.
+ * A helper class for TDECompletion. Implements a tree of TQChar.
*
* The tree looks like this (containing the items "kde", "kde-ui",
* "kde-core" and "pfeiffer". Every item is delimited with TQChar( 0x0 )
@@ -81,14 +81,14 @@ typedef KCompTreeNodeList KCompTreeChildren;
* @author Carsten Pfeiffer <pfeiffer@kde.org>
* @internal
*/
-class TDECORE_EXPORT KCompTreeNode : public TQChar
+class TDECORE_EXPORT TDECompTreeNode : public TQChar
{
public:
- KCompTreeNode() : TQChar(), myWeight(0) {}
- KCompTreeNode( const TQChar& ch, uint weight = 0 )
+ TDECompTreeNode() : TQChar(), myWeight(0) {}
+ TDECompTreeNode( const TQChar& ch, uint weight = 0 )
: TQChar( ch ),
myWeight( weight ) {}
- ~KCompTreeNode();
+ ~TDECompTreeNode();
void * operator new( size_t s ) {
return alloc.allocate( s );
@@ -99,12 +99,12 @@ public:
// Returns a child of this node matching ch, if available.
// Otherwise, returns 0L
- inline KCompTreeNode * find( const TQChar& ch ) const {
- KCompTreeNode * cur = myChildren.begin();
+ inline TDECompTreeNode * find( const TQChar& ch ) const {
+ TDECompTreeNode * cur = myChildren.begin();
while (cur && (*cur != ch)) cur = cur->next;
return cur;
}
- KCompTreeNode * insert( const TQChar&, bool sorted );
+ TDECompTreeNode * insert( const TQChar&, bool sorted );
void remove( const TQString& );
inline int childrenCount() const { return myChildren.count(); }
@@ -115,51 +115,51 @@ public:
inline void decline() { myWeight--; }
inline uint weight() const { return myWeight; }
- inline const KCompTreeChildren * children() const {
+ inline const TDECompTreeChildren * children() const {
return &myChildren;
}
- inline const KCompTreeNode * childAt(int index) const {
+ inline const TDECompTreeNode * childAt(int index) const {
return myChildren.at(index);
}
- inline const KCompTreeNode * firstChild() const {
+ inline const TDECompTreeNode * firstChild() const {
return myChildren.begin();
}
- inline const KCompTreeNode * lastChild() const {
+ inline const TDECompTreeNode * lastChild() const {
return myChildren.end();
}
- /* We want to handle a list of KCompTreeNodes on our own, to not
+ /* We want to handle a list of TDECompTreeNodes on our own, to not
need to use TQValueList<>. And to make it even more fast we don't
use an accessor, but just a public member. */
- KCompTreeNode *next;
+ TDECompTreeNode *next;
private:
uint myWeight;
- KCompTreeNodeList myChildren;
- static KZoneAllocator alloc;
+ TDECompTreeNodeList myChildren;
+ static TDEZoneAllocator alloc;
};
// some more helper stuff
-typedef KSortableValueList<TQString> KCompletionMatchesList;
+typedef KSortableValueList<TQString> TDECompletionMatchesList;
/**
* @internal
*/
-class TDECORE_EXPORT KCompletionMatchesWrapper
+class TDECORE_EXPORT TDECompletionMatchesWrapper
{
public:
- KCompletionMatchesWrapper( bool sort = false )
- : sortedList( sort ? new KCompletionMatchesList : 0L ),
+ TDECompletionMatchesWrapper( bool sort = false )
+ : sortedList( sort ? new TDECompletionMatchesList : 0L ),
dirty( false )
{}
- ~KCompletionMatchesWrapper() {
+ ~TDECompletionMatchesWrapper() {
delete sortedList;
}
void setSorting( bool sort ) {
if ( sort && !sortedList )
- sortedList = new KCompletionMatchesList;
+ sortedList = new TDECompletionMatchesList;
else if ( !sort ) {
delete sortedList;
sortedList = 0L;
@@ -208,7 +208,7 @@ public:
TQStringList list() const;
mutable TQStringList stringList;
- KCompletionMatchesList *sortedList;
+ TDECompletionMatchesList *sortedList;
mutable bool dirty;
};
diff --git a/tdecore/kcompletionbase.cpp b/tdecore/kcompletionbase.cpp
index 9e7f6d746..8a67f4647 100644
--- a/tdecore/kcompletionbase.cpp
+++ b/tdecore/kcompletionbase.cpp
@@ -22,11 +22,11 @@
#include <kcompletion.h>
-KCompletionBase::KCompletionBase()
+TDECompletionBase::TDECompletionBase()
{
m_delegate = 0L;
// Assign the default completion type to use.
- m_iCompletionMode = KGlobalSettings::completionMode();
+ m_iCompletionMode = TDEGlobalSettings::completionMode();
// Initialize all key-bindings to 0 by default so that
// the event filter will use the global settings.
@@ -38,7 +38,7 @@ KCompletionBase::KCompletionBase()
setup( false, false, false );
}
-KCompletionBase::~KCompletionBase()
+TDECompletionBase::~TDECompletionBase()
{
if( m_bAutoDelCompObj && m_pCompObj )
{
@@ -46,7 +46,7 @@ KCompletionBase::~KCompletionBase()
}
}
-void KCompletionBase::setDelegate( KCompletionBase *delegate )
+void TDECompletionBase::setDelegate( TDECompletionBase *delegate )
{
m_delegate = delegate;
@@ -59,20 +59,20 @@ void KCompletionBase::setDelegate( KCompletionBase *delegate )
}
}
-KCompletion* KCompletionBase::completionObject( bool hsig )
+TDECompletion* TDECompletionBase::completionObject( bool hsig )
{
if ( m_delegate )
return m_delegate->completionObject( hsig );
if ( !m_pCompObj )
{
- setCompletionObject( new KCompletion(), hsig );
+ setCompletionObject( new TDECompletion(), hsig );
m_bAutoDelCompObj = true;
}
return m_pCompObj;
}
-void KCompletionBase::setCompletionObject( KCompletion* compObj, bool hsig )
+void TDECompletionBase::setCompletionObject( TDECompletion* compObj, bool hsig )
{
if ( m_delegate ) {
m_delegate->setCompletionObject( compObj, hsig );
@@ -90,7 +90,7 @@ void KCompletionBase::setCompletionObject( KCompletion* compObj, bool hsig )
}
// BC: Inline this function and possibly rename it to setHandleEvents??? (DA)
-void KCompletionBase::setHandleSignals( bool handle )
+void TDECompletionBase::setHandleSignals( bool handle )
{
if ( m_delegate )
m_delegate->setHandleSignals( handle );
@@ -98,7 +98,7 @@ void KCompletionBase::setHandleSignals( bool handle )
m_bHandleSignals = handle;
}
-void KCompletionBase::setCompletionMode( KGlobalSettings::Completion mode )
+void TDECompletionBase::setCompletionMode( TDEGlobalSettings::Completion mode )
{
if ( m_delegate ) {
m_delegate->setCompletionMode( mode );
@@ -106,13 +106,13 @@ void KCompletionBase::setCompletionMode( KGlobalSettings::Completion mode )
}
m_iCompletionMode = mode;
- // Always sync up KCompletion mode with ours as long as we
+ // Always sync up TDECompletion mode with ours as long as we
// are performing completions.
- if( m_pCompObj && m_iCompletionMode != KGlobalSettings::CompletionNone )
+ if( m_pCompObj && m_iCompletionMode != TDEGlobalSettings::CompletionNone )
m_pCompObj->setCompletionMode( m_iCompletionMode );
}
-bool KCompletionBase::setKeyBinding( KeyBindingType item, const KShortcut& cut )
+bool TDECompletionBase::setKeyBinding( KeyBindingType item, const TDEShortcut& cut )
{
if ( m_delegate )
return m_delegate->setKeyBinding( item, cut );
@@ -127,7 +127,7 @@ bool KCompletionBase::setKeyBinding( KeyBindingType item, const KShortcut& cut )
return true;
}
-void KCompletionBase::useGlobalKeyBindings()
+void TDECompletionBase::useGlobalKeyBindings()
{
if ( m_delegate ) {
m_delegate->useGlobalKeyBindings();
@@ -141,7 +141,7 @@ void KCompletionBase::useGlobalKeyBindings()
m_keyMap.insert( SubstringCompletion, 0 );
}
-void KCompletionBase::setup( bool autodel, bool hsig, bool esig )
+void TDECompletionBase::setup( bool autodel, bool hsig, bool esig )
{
if ( m_delegate ) {
m_delegate->setup( autodel, hsig, esig );
diff --git a/tdecore/kconfig_compiler/Makefile.am b/tdecore/kconfig_compiler/Makefile.am
deleted file mode 100644
index 5a3b0f2e8..000000000
--- a/tdecore/kconfig_compiler/Makefile.am
+++ /dev/null
@@ -1,18 +0,0 @@
-SUBDIRS = example tests
-
-AM_CPPFLAGS = -I$(top_srcdir)/tdecore -I$(top_srcdir) $(all_includes)
-
-bin_PROGRAMS = kconfig_compiler
-
-kconfig_compiler_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -lktexteditor
-kconfig_compiler_LDADD = $(LIB_TDECORE)
-kconfig_compiler_SOURCES = kconfig_compiler.cpp
-
-TESTFILES = test1.kcfg test2.kcfg test3.kcfg test4.kcfg test_dpointer.kcfg
-
-check-local:
- for i in $(TESTFILES); \
- do xmllint --noout --schema $(srcdir)/kcfg.xsd $(srcdir)/tests/$$i; \
- perl $(top_srcdir)/tdecore/kconfig_compiler/checkkcfg.pl \
- $(top_srcdir)/tdecore/kconfig_compiler/tests/$$i; done
-
diff --git a/tdecore/kconfig_compiler/tests/myprefs.h b/tdecore/kconfig_compiler/tests/myprefs.h
deleted file mode 100644
index ebef89c08..000000000
--- a/tdecore/kconfig_compiler/tests/myprefs.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <kconfigskeleton.h>
-
-class MyPrefs : public KConfigSkeleton
-{
- public:
- MyPrefs( const TQString &a ) : KConfigSkeleton( a ) {}
-};
diff --git a/tdecore/kconfig_compiler/tests/test1.cpp.ref b/tdecore/kconfig_compiler/tests/test1.cpp.ref
deleted file mode 100644
index b3050921e..000000000
--- a/tdecore/kconfig_compiler/tests/test1.cpp.ref
+++ /dev/null
@@ -1,72 +0,0 @@
-// This file is generated by kconfig_compiler from test1.kcfg.
-// All changes you do to this file will be lost.
-
-#include "test1.h"
-
-Test1::Test1( const TQString & transport, const TQString & folder )
- : KConfigSkeleton( TQString::fromLatin1( "examplerc" ) )
- , mParamtransport(transport)
- , mParamfolder(folder)
-{
- setCurrentGroup( TQString::fromLatin1( "General-%1" ).arg( mParamfolder ) );
-
- KConfigSkeleton::ItemBool *itemOneOption;
- itemOneOption = new KConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "OneOption" ), mOneOption, true );
- addItem( itemOneOption, TQString::fromLatin1( "OneOption" ) );
- KConfigSkeleton::ItemInt *itemAnotherOption;
- itemAnotherOption = new KConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Another Option" ), mAnotherOption, 5 );
- addItem( itemAnotherOption, TQString::fromLatin1( "AnotherOption" ) );
- TQValueList<KConfigSkeleton::ItemEnum::Choice> valuesListOption;
- {
- KConfigSkeleton::ItemEnum::Choice choice;
- choice.name = TQString::fromLatin1( "One" );
- valuesListOption.append( choice );
- }
- {
- KConfigSkeleton::ItemEnum::Choice choice;
- choice.name = TQString::fromLatin1( "Two" );
- valuesListOption.append( choice );
- }
- {
- KConfigSkeleton::ItemEnum::Choice choice;
- choice.name = TQString::fromLatin1( "Three" );
- valuesListOption.append( choice );
- }
- KConfigSkeleton::ItemEnum *itemListOption;
- itemListOption = new KConfigSkeleton::ItemEnum( currentGroup(), TQString::fromLatin1( "ListOption" ), mListOption, valuesListOption, EnumListOption::One );
- addItem( itemListOption, TQString::fromLatin1( "ListOption" ) );
-
- setCurrentGroup( TQString::fromLatin1( "MyOptions" ) );
-
- KConfigSkeleton::ItemString *itemMyString;
- itemMyString = new KConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "MyString" ), mMyString, TQString::fromLatin1( "Default String" ) );
- addItem( itemMyString, TQString::fromLatin1( "MyString" ) );
- KConfigSkeleton::ItemPath *itemMyPath;
- itemMyPath = new KConfigSkeleton::ItemPath( currentGroup(), TQString::fromLatin1( "MyPath" ), mMyPath, TQDir::homeDirPath()+TQString::fromLatin1(".hidden_file") );
- addItem( itemMyPath, TQString::fromLatin1( "MyPath" ) );
- KConfigSkeleton::ItemInt *itemAnotherOption2;
- itemAnotherOption2 = new KConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Another Option" ), mAnotherOption2, 10 );
- addItem( itemAnotherOption2, TQString::fromLatin1( "AnotherOption2" ) );
- TQStringList defaultMyStringList;
- defaultMyStringList.append( TQString::fromUtf8( "up" ) );
- defaultMyStringList.append( TQString::fromUtf8( "down" ) );
-
- KConfigSkeleton::ItemStringList *itemMyStringList;
- itemMyStringList = new KConfigSkeleton::ItemStringList( currentGroup(), TQString::fromLatin1( "MyStringList" ), mMyStringList, defaultMyStringList );
- addItem( itemMyStringList, TQString::fromLatin1( "MyStringList" ) );
- TQStringList defaultMyStringListHidden;
- defaultMyStringListHidden.append( TQString::fromUtf8( "up" ) );
- defaultMyStringListHidden.append( TQString::fromUtf8( "down" ) );
-
- KConfigSkeleton::ItemStringList *itemMyStringListHidden;
- itemMyStringListHidden = new KConfigSkeleton::ItemStringList( currentGroup(), TQString::fromLatin1( "MyStringListHidden" ), mMyStringListHidden, defaultMyStringListHidden );
- addItem( itemMyStringListHidden, TQString::fromLatin1( "MyStringListHidden" ) );
- KConfigSkeleton::ItemInt *itemMyNumber;
- itemMyNumber = new KConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "List-%1-%2" ).arg( mParamtransport ).arg( mParamfolder ), mMyNumber, 1 );
- addItem( itemMyNumber, TQString::fromLatin1( "MyNumber" ) );
-}
-
-Test1::~Test1()
-{
-}
-
diff --git a/tdecore/kconfig_compiler/tests/test3.cpp.ref b/tdecore/kconfig_compiler/tests/test3.cpp.ref
deleted file mode 100644
index 11fe6b38f..000000000
--- a/tdecore/kconfig_compiler/tests/test3.cpp.ref
+++ /dev/null
@@ -1,29 +0,0 @@
-// This file is generated by kconfig_compiler from test3.kcfg.
-// All changes you do to this file will be lost.
-
-#include "test3.h"
-
-using namespace TestNameSpace;
-
-Test3::Test3( )
- : KConfigSkeleton( TQString::fromLatin1( "test3rc" ) )
-{
- setCurrentGroup( TQString::fromLatin1( "General" ) );
-
- mAutoSaveItem = new KConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "Auto Save" ), mAutoSave, false );
- addItem( mAutoSaveItem, TQString::fromLatin1( "AutoSave" ) );
-
- setCurrentGroup( TQString::fromLatin1( "Blah" ) );
-
- mBlubbItem = new KConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Blubb" ), mBlubb, 10 );
- addItem( mBlubbItem, TQString::fromLatin1( "Blubb" ) );
- mBlahBlahItem = new KConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "BlahBlah" ), mBlahBlah, TQString::fromLatin1( "a string" ) );
- addItem( mBlahBlahItem, TQString::fromLatin1( "BlahBlah" ) );
- mMyPasswordItem = new KConfigSkeleton::ItemPassword( currentGroup(), TQString::fromLatin1( "MyPassword" ), mMyPassword );
- addItem( mMyPasswordItem, TQString::fromLatin1( "MyPassword" ) );
-}
-
-Test3::~Test3()
-{
-}
-
diff --git a/tdecore/kconfig_compiler/tests/test4.cpp.ref b/tdecore/kconfig_compiler/tests/test4.cpp.ref
deleted file mode 100644
index 6918a8c8a..000000000
--- a/tdecore/kconfig_compiler/tests/test4.cpp.ref
+++ /dev/null
@@ -1,82 +0,0 @@
-// This file is generated by kconfig_compiler from test4.kcfg.
-// All changes you do to this file will be lost.
-
-#include "test4.h"
-
-#include <kstaticdeleter.h>
-
-Test4 *Test4::mSelf = 0;
-static KStaticDeleter<Test4> staticTest4Deleter;
-
-Test4 *Test4::self()
-{
- if ( !mSelf ) {
- staticTest4Deleter.setObject( mSelf, new Test4() );
- mSelf->readConfig();
- }
-
- return mSelf;
-}
-
-const char* const Test4::EnumButton::enumToString[] = { "right", "mid", "left" };
-
-Test4::Test4( )
- : KConfigSkeleton( TQString::fromLatin1( "test4rc" ) )
-{
- mSelf = this;
- setCurrentGroup( TQString::fromLatin1( "Foo" ) );
-
-TQColor defaultColor[4] = { Qt::red, Qt::blue, Qt::green, Qt::black };
- KConfigSkeleton::ItemColor *itemColor[4];
- itemColor[0] = new KConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "color #0" ), mColor[0], defaultColor[0] );
- addItem( itemColor[0], TQString::fromLatin1( "Color0" ) );
- itemColor[1] = new KConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "color #1" ), mColor[1], defaultColor[1] );
- addItem( itemColor[1], TQString::fromLatin1( "Color1" ) );
- itemColor[2] = new KConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "color #2" ), mColor[2], defaultColor[2] );
- addItem( itemColor[2], TQString::fromLatin1( "Color2" ) );
- itemColor[3] = new KConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "color #3" ), mColor[3], defaultColor[3] );
- addItem( itemColor[3], TQString::fromLatin1( "Color3" ) );
- TQValueList<KConfigSkeleton::ItemEnum::Choice> valuesMouseAction;
- {
- KConfigSkeleton::ItemEnum::Choice choice;
- choice.name = TQString::fromLatin1( "Encrypt" );
- valuesMouseAction.append( choice );
- }
- {
- KConfigSkeleton::ItemEnum::Choice choice;
- choice.name = TQString::fromLatin1( "Decrypt" );
- valuesMouseAction.append( choice );
- }
- {
- KConfigSkeleton::ItemEnum::Choice choice;
- choice.name = TQString::fromLatin1( "CrashNBurn" );
- valuesMouseAction.append( choice );
- }
- {
- KConfigSkeleton::ItemEnum::Choice choice;
- choice.name = TQString::fromLatin1( "PumpNDump" );
- valuesMouseAction.append( choice );
- }
- KConfigSkeleton::ItemEnum *itemMouseAction[3];
- itemMouseAction[0] = new KConfigSkeleton::ItemEnum( currentGroup(), TQString::fromLatin1( "right_mouse_action" ), mMouseAction[0], valuesMouseAction, EnumMouseAction::Decrypt );
- addItem( itemMouseAction[0], TQString::fromLatin1( "MouseActionright" ) );
- itemMouseAction[1] = new KConfigSkeleton::ItemEnum( currentGroup(), TQString::fromLatin1( "mid_mouse_action" ), mMouseAction[1], valuesMouseAction, EnumMouseAction::Encrypt );
- addItem( itemMouseAction[1], TQString::fromLatin1( "MouseActionmid" ) );
- itemMouseAction[2] = new KConfigSkeleton::ItemEnum( currentGroup(), TQString::fromLatin1( "left_mouse_action" ), mMouseAction[2], valuesMouseAction, EnumMouseAction::PumpNDump );
- addItem( itemMouseAction[2], TQString::fromLatin1( "MouseActionleft" ) );
- KConfigSkeleton::ItemString *itemFooBar;
- itemFooBar = new KConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "foo bar" ), mFooBar );
- addItem( itemFooBar, TQString::fromLatin1( "FooBar" ) );
- KConfigSkeleton::ItemInt *itemAge;
- itemAge = new KConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Age" ), mAge, 35 );
- itemAge->setMinValue(8);
- itemAge->setMaxValue(88);
- addItem( itemAge, TQString::fromLatin1( "Age" ) );
-}
-
-Test4::~Test4()
-{
- if ( mSelf == this )
- staticTest4Deleter.setObject( mSelf, 0, false );
-}
-
diff --git a/tdecore/kconfig_compiler/tests/test5.cpp.ref b/tdecore/kconfig_compiler/tests/test5.cpp.ref
deleted file mode 100644
index 8373eb3f6..000000000
--- a/tdecore/kconfig_compiler/tests/test5.cpp.ref
+++ /dev/null
@@ -1,82 +0,0 @@
-// This file is generated by kconfig_compiler from test5.kcfg.
-// All changes you do to this file will be lost.
-
-#include "test5.h"
-
-#include <kstaticdeleter.h>
-
-Test5 *Test5::mSelf = 0;
-static KStaticDeleter<Test5> staticTest5Deleter;
-
-Test5 *Test5::self()
-{
- if ( !mSelf ) {
- staticTest5Deleter.setObject( mSelf, new Test5() );
- mSelf->readConfig();
- }
-
- return mSelf;
-}
-
-const char* const Test5::EnumButtonToString[] = { "right", "mid", "left" };
-
-Test5::Test5( )
- : KConfigSkeleton( TQString::fromLatin1( "test4rc" ) )
-{
- mSelf = this;
- setCurrentGroup( TQString::fromLatin1( "Foo" ) );
-
-TQColor defaultColor[4] = { Qt::red, Qt::blue, Qt::green, Qt::black };
- KConfigSkeleton::ItemColor *itemColor[4];
- itemColor[0] = new KConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "color #0" ), mColor[0], defaultColor[0] );
- addItem( itemColor[0], TQString::fromLatin1( "Color0" ) );
- itemColor[1] = new KConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "color #1" ), mColor[1], defaultColor[1] );
- addItem( itemColor[1], TQString::fromLatin1( "Color1" ) );
- itemColor[2] = new KConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "color #2" ), mColor[2], defaultColor[2] );
- addItem( itemColor[2], TQString::fromLatin1( "Color2" ) );
- itemColor[3] = new KConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "color #3" ), mColor[3], defaultColor[3] );
- addItem( itemColor[3], TQString::fromLatin1( "Color3" ) );
- TQValueList<KConfigSkeleton::ItemEnum::Choice> valuesMouseAction;
- {
- KConfigSkeleton::ItemEnum::Choice choice;
- choice.name = TQString::fromLatin1( "Encrypt" );
- valuesMouseAction.append( choice );
- }
- {
- KConfigSkeleton::ItemEnum::Choice choice;
- choice.name = TQString::fromLatin1( "Decrypt" );
- valuesMouseAction.append( choice );
- }
- {
- KConfigSkeleton::ItemEnum::Choice choice;
- choice.name = TQString::fromLatin1( "CrashNBurn" );
- valuesMouseAction.append( choice );
- }
- {
- KConfigSkeleton::ItemEnum::Choice choice;
- choice.name = TQString::fromLatin1( "PumpNDump" );
- valuesMouseAction.append( choice );
- }
- KConfigSkeleton::ItemEnum *itemMouseAction[3];
- itemMouseAction[0] = new KConfigSkeleton::ItemEnum( currentGroup(), TQString::fromLatin1( "right_mouse_action" ), mMouseAction[0], valuesMouseAction, Decrypt );
- addItem( itemMouseAction[0], TQString::fromLatin1( "MouseActionright" ) );
- itemMouseAction[1] = new KConfigSkeleton::ItemEnum( currentGroup(), TQString::fromLatin1( "mid_mouse_action" ), mMouseAction[1], valuesMouseAction, Encrypt );
- addItem( itemMouseAction[1], TQString::fromLatin1( "MouseActionmid" ) );
- itemMouseAction[2] = new KConfigSkeleton::ItemEnum( currentGroup(), TQString::fromLatin1( "left_mouse_action" ), mMouseAction[2], valuesMouseAction, PumpNDump );
- addItem( itemMouseAction[2], TQString::fromLatin1( "MouseActionleft" ) );
- KConfigSkeleton::ItemString *itemFooBar;
- itemFooBar = new KConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "foo bar" ), mFooBar );
- addItem( itemFooBar, TQString::fromLatin1( "FooBar" ) );
- KConfigSkeleton::ItemInt *itemAge;
- itemAge = new KConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Age" ), mAge, 35 );
- itemAge->setMinValue(8);
- itemAge->setMaxValue(88);
- addItem( itemAge, TQString::fromLatin1( "Age" ) );
-}
-
-Test5::~Test5()
-{
- if ( mSelf == this )
- staticTest5Deleter.setObject( mSelf, 0, false );
-}
-
diff --git a/tdecore/kconfig_compiler/tests/test6.cpp.ref b/tdecore/kconfig_compiler/tests/test6.cpp.ref
deleted file mode 100644
index 51b96d4c4..000000000
--- a/tdecore/kconfig_compiler/tests/test6.cpp.ref
+++ /dev/null
@@ -1,31 +0,0 @@
-// This file is generated by kconfig_compiler from test6.kcfg.
-// All changes you do to this file will be lost.
-
-#include "test6.h"
-
-Test6::Test6( const TQString & Number )
- : KConfigSkeleton( TQString::fromLatin1( "test4rc" ) )
- , mParamNumber(Number)
-{
- setCurrentGroup( TQString::fromLatin1( "Foo" ) );
-
- KConfigSkeleton::ItemColor *itemColor;
- itemColor = new KConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "color #%1" ).arg( mParamNumber ), mColor, TQColor( "red" ) );
- addItem( itemColor, TQString::fromLatin1( "Color" ) );
-
- setCurrentGroup( TQString::fromLatin1( "Bar%1" ).arg( mParamNumber ) );
-
- KConfigSkeleton::ItemString *itemFooBar;
- itemFooBar = new KConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "foo bar" ), mFooBar );
- addItem( itemFooBar, TQString::fromLatin1( "FooBar" ) );
- KConfigSkeleton::ItemInt *itemAge;
- itemAge = new KConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Age" ), mAge, 35 );
- itemAge->setMinValue(8);
- itemAge->setMaxValue(88);
- addItem( itemAge, TQString::fromLatin1( "Age" ) );
-}
-
-Test6::~Test6()
-{
-}
-
diff --git a/tdecore/kconfig_compiler/tests/test7.cpp.ref b/tdecore/kconfig_compiler/tests/test7.cpp.ref
deleted file mode 100644
index 91a22e036..000000000
--- a/tdecore/kconfig_compiler/tests/test7.cpp.ref
+++ /dev/null
@@ -1,31 +0,0 @@
-// This file is generated by kconfig_compiler from test7.kcfg.
-// All changes you do to this file will be lost.
-
-#include "test7.h"
-
-Test7::Test7( int Number )
- : KConfigSkeleton( TQString::fromLatin1( "test7rc" ) )
- , mParamNumber(Number)
-{
- setCurrentGroup( TQString::fromLatin1( "Foo" ) );
-
- KConfigSkeleton::ItemColor *itemColor;
- itemColor = new KConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "color #%1" ).arg( mParamNumber ), mColor, TQColor( "red" ) );
- addItem( itemColor, TQString::fromLatin1( "Color" ) );
-
- setCurrentGroup( TQString::fromLatin1( "Bar%1" ).arg( mParamNumber ) );
-
- KConfigSkeleton::ItemString *itemFooBar;
- itemFooBar = new KConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "foo bar" ), mFooBar );
- addItem( itemFooBar, TQString::fromLatin1( "FooBar" ) );
- KConfigSkeleton::ItemInt *itemAge;
- itemAge = new KConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Age" ), mAge, 35 );
- itemAge->setMinValue(8);
- itemAge->setMaxValue(88);
- addItem( itemAge, TQString::fromLatin1( "Age" ) );
-}
-
-Test7::~Test7()
-{
-}
-
diff --git a/tdecore/kconfig_compiler/tests/test8a.cpp.ref b/tdecore/kconfig_compiler/tests/test8a.cpp.ref
deleted file mode 100644
index f89b7c133..000000000
--- a/tdecore/kconfig_compiler/tests/test8a.cpp.ref
+++ /dev/null
@@ -1,22 +0,0 @@
-// This file is generated by kconfig_compiler from test8a.kcfg.
-// All changes you do to this file will be lost.
-
-#include "test8a.h"
-
-Test8a::Test8a( KSharedConfig::Ptr config )
- : KConfigSkeleton( config )
-{
- setCurrentGroup( TQString::fromLatin1( "Group" ) );
-
- KConfigSkeleton::ItemFont *itemFont;
- itemFont = new KConfigSkeleton::ItemFont( currentGroup(), TQString::fromLatin1( "Font" ), mFont, KGlobalSettings::generalFont() );
- addItem( itemFont, TQString::fromLatin1( "Font" ) );
- KConfigSkeleton::ItemFont *itemTitleFont;
- itemTitleFont = new KConfigSkeleton::ItemFont( currentGroup(), TQString::fromLatin1( "TitleFont" ), mTitleFont, KGlobalSettings::windowTitleFont() );
- addItem( itemTitleFont, TQString::fromLatin1( "TitleFont" ) );
-}
-
-Test8a::~Test8a()
-{
-}
-
diff --git a/tdecore/kcrash.cpp b/tdecore/kcrash.cpp
index af9cc6dd7..08abe75c7 100644
--- a/tdecore/kcrash.cpp
+++ b/tdecore/kcrash.cpp
@@ -44,30 +44,30 @@
#include <errno.h>
#include <tqwindowdefs.h>
-#include <kglobal.h>
+#include <tdeglobal.h>
#include <kinstance.h>
-#include <kaboutdata.h>
+#include <tdeaboutdata.h>
#include <kdebug.h>
-#include <kapplication.h>
+#include <tdeapplication.h>
#include <dcopclient.h>
-#include <../kinit/klauncher_cmds.h>
+#include <../kinit/tdelauncher_cmds.h>
#if defined Q_WS_X11
#include <X11/Xlib.h>
#endif
-KCrash::HandlerType KCrash::_emergencySaveFunction = 0;
-KCrash::HandlerType KCrash::_crashHandler = 0;
-const char *KCrash::appName = 0;
-const char *KCrash::appPath = 0;
-bool KCrash::safer = false;
+TDECrash::HandlerType TDECrash::_emergencySaveFunction = 0;
+TDECrash::HandlerType TDECrash::_crashHandler = 0;
+const char *TDECrash::appName = 0;
+const char *TDECrash::appPath = 0;
+bool TDECrash::safer = false;
// This function sets the function which should be called when the
// application crashes and the
// application is asked to try to save its data.
void
-KCrash::setEmergencySaveFunction (HandlerType saveFunction)
+TDECrash::setEmergencySaveFunction (HandlerType saveFunction)
{
_emergencySaveFunction = saveFunction;
@@ -83,7 +83,7 @@ KCrash::setEmergencySaveFunction (HandlerType saveFunction)
// This function sets the function which should be responsible for
// the application crash handling.
void
-KCrash::setCrashHandler (HandlerType handler)
+TDECrash::setCrashHandler (HandlerType handler)
{
#ifdef Q_OS_UNIX
if (!handler)
@@ -116,7 +116,7 @@ KCrash::setCrashHandler (HandlerType handler)
}
void
-KCrash::defaultCrashHandler (int sig)
+TDECrash::defaultCrashHandler (int sig)
{
#ifdef Q_OS_UNIX
// WABA: Do NOT use kdDebug() in this function because it is much too risky!
@@ -148,10 +148,10 @@ KCrash::defaultCrashHandler (int sig)
if (appName)
{
#ifndef NDEBUG
- fprintf(stderr, "[kcrash] KCrash: crashing... crashRecursionCounter = %d\n", crashRecursionCounter);
- fprintf(stderr, "[kcrash] KCrash: Application Name = %s path = %s pid = %d\n", appName ? appName : "<unknown>" , appPath ? appPath : "<unknown>", getpid());
+ fprintf(stderr, "[kcrash] TDECrash: crashing... crashRecursionCounter = %d\n", crashRecursionCounter);
+ fprintf(stderr, "[kcrash] TDECrash: Application Name = %s path = %s pid = %d\n", appName ? appName : "<unknown>" , appPath ? appPath : "<unknown>", getpid());
#else
- fprintf(stderr, "[kcrash] KCrash: Application '%s' crashing...\n", appName ? appName : "<unknown>");
+ fprintf(stderr, "[kcrash] TDECrash: Application '%s' crashing...\n", appName ? appName : "<unknown>");
#endif
const char * argv[24]; // don't forget to update this
@@ -176,7 +176,7 @@ KCrash::defaultCrashHandler (int sig)
// we have already tested this
argv[i++] = "--appname";
argv[i++] = appName;
- if (KApplication::loadedByKdeinit)
+ if (TDEApplication::loadedByKdeinit)
argv[i++] = "--tdeinit";
// only add apppath if it's not NULL
@@ -196,8 +196,8 @@ KCrash::defaultCrashHandler (int sig)
argv[i++] = "--pid";
argv[i++] = pidtxt;
- const KInstance *instance = KGlobal::_instance;
- const KAboutData *about = instance ? instance->aboutData() : 0;
+ const TDEInstance *instance = TDEGlobal::_instance;
+ const TDEAboutData *about = instance ? instance->aboutData() : 0;
if (about) {
if (about->internalVersion()) {
argv[i++] = "--appversion";
@@ -254,7 +254,7 @@ static int write_socket(int sock, char *buffer, int len);
static int read_socket(int sock, char *buffer, int len);
static int openSocket();
-void KCrash::startDrKonqi( const char* argv[], int argc )
+void TDECrash::startDrKonqi( const char* argv[], int argc )
{
int socket = openSocket();
if( socket < -1 )
@@ -262,7 +262,7 @@ void KCrash::startDrKonqi( const char* argv[], int argc )
startDirectly( argv, argc );
return;
}
- klauncher_header header;
+ tdelauncher_header header;
header.cmd = LAUNCHER_EXEC_NEW;
const int BUFSIZE = 8192; // make sure this is big enough
char buffer[ BUFSIZE + 10 ];
@@ -277,7 +277,7 @@ void KCrash::startDrKonqi( const char* argv[], int argc )
int len = strlen( argv[ i ] ) + 1; // include terminating \0
if( pos + len > BUFSIZE )
{
- fprintf( stderr, "[kcrash] BUFSIZE in KCrash not big enough!\n" );
+ fprintf( stderr, "[kcrash] BUFSIZE in TDECrash not big enough!\n" );
startDirectly( argv, argc );
return;
}
@@ -315,9 +315,9 @@ void KCrash::startDrKonqi( const char* argv[], int argc )
}
// If we can't reach tdeinit we can still at least try to fork()
-void KCrash::startDirectly( const char* argv[], int )
+void TDECrash::startDirectly( const char* argv[], int )
{
- fprintf( stderr, "[kcrash] KCrash cannot reach tdeinit, launching directly.\n" );
+ fprintf( stderr, "[kcrash] TDECrash cannot reach tdeinit, launching directly.\n" );
pid_t pid = fork();
if (pid <= 0)
{
diff --git a/tdecore/kcrash.h b/tdecore/kcrash.h
index d6941b825..0ea938bfe 100644
--- a/tdecore/kcrash.h
+++ b/tdecore/kcrash.h
@@ -34,7 +34,7 @@
* be called by the default crash handler, giving the application a chance
* to save its data.
*/
-class TDECORE_EXPORT KCrash
+class TDECORE_EXPORT TDECrash
{
private: // ;o)
static const char *appName;
diff --git a/tdecore/kdebug.areas b/tdecore/kdebug.areas
index df38ff422..5653a9a03 100644
--- a/tdecore/kdebug.areas
+++ b/tdecore/kdebug.areas
@@ -5,69 +5,69 @@
#
#Format : number<tab>description
-125 tdecore (KAccel)
+125 tdecore (TDEAccel)
126 tdecore (KURL)
127 kio (KProtocolInfo)
128 tdecore (KRegExp)
-129 tdecore (KAction)
+129 tdecore (TDEAction)
130 kio (KPasswdServer)
-131 tdecore (KAcceleratorManager)
+131 tdecore (TDEAcceleratorManager)
150 tdecore (KLibLoader)
160 tdecore (KNotifyClient)
170 tdecore (KNetwork socket)
171 tdecore (KSocks)
-172 tdecore (KStartupInfo)
-173 tdecore (KLocale)
+172 tdecore (TDEStartupInfo)
+173 tdecore (TDELocale)
174 tdecore (KProcIO)
-175 tdecore (KProcess)
+175 tdecore (TDEProcess)
176 tdecore (KWin)
-177 tdecore (KConfigSkeleton)
-178 tdecore (KConfigDialogManager)
+177 tdecore (TDEConfigSkeleton)
+178 tdecore (TDEConfigDialogManager)
179 tdecore (KNetwork resolver)
180 tdecore (tdelibs)
-200 tdeui (KMainWindow)
-220 tdeui (KToolBar)
+200 tdeui (TDEMainWindow)
+220 tdeui (TDEToolBar)
230 tdeui (KCommand)
240 tdeui (tdelibs)
-250 kfile (tdelibs)
-264 tdecore (KIconLoader)
-265 tdecore (KIconEffect)
+250 tdefile (tdelibs)
+264 tdecore (TDEIconLoader)
+265 tdecore (TDEIconEffect)
270 tdeui (KRootPixmap)
-280 tdeui (KSharedPixmap)
-281 tdeui (KCModule)
+280 tdeui (TDESharedPixmap)
+281 tdeui (TDECModule)
282 tdeui (KDockWidget)
290 tdeui (KPixmapIO)
-291 tdeui (KAboutDialog)
+291 tdeui (TDEAboutDialog)
292 tdeui (KComboBox)
293 tdeui (KLineEdit)
294 tdeui (KEdit)
295 tdeui (KMenuBar)
-296 tdeui (KPopupMenu)
+296 tdeui (TDEPopupMenu)
298 tdeui (KDatePicker)
399 kimgio
400 artskde
500 tdeprint
-700 kutils (KSettings::Dialog)
-701 kutils (KSettings::Dispatcher)
-702 kutils (KPluginSelector)
-703 kutils (KPluginInfo)
-704 kutils (KSettings::ComponentsDialog)
-710 kutils (KCMultiDialog)
-711 kutils (KCModuleProxy)
-712 kutils (KCModuleInfo)
-713 kutils (KCModuleContainer)
-750 kspell (tdelibs)
-760 kmdi
-780 kcmshell (tdelibs)
-790 kimproxy (tdelibs)
+700 tdeutils (KSettings::Dialog)
+701 tdeutils (KSettings::Dispatcher)
+702 tdeutils (KPluginSelector)
+703 tdeutils (KPluginInfo)
+704 tdeutils (KSettings::ComponentsDialog)
+710 tdeutils (KCMultiDialog)
+711 tdeutils (TDECModuleProxy)
+712 tdeutils (TDECModuleInfo)
+713 tdeutils (TDECModuleContainer)
+750 tdespell (tdelibs)
+760 tdemdi
+780 tdecmshell (tdelibs)
+790 tdeimproxy (tdelibs)
800 kabapi (tdelibs)
900 tdesu (tdelibs)
912 ksmartcard (tdelibs)
-1000 kparts
-1001 kparts (mainwindow)
-1002 kparts (factory)
+1000 tdeparts
+1001 tdeparts (mainwindow)
+1002 tdeparts (factory)
# tdebase
1201 konqtree
@@ -87,15 +87,15 @@
1216 twin (client errors)
1217 khotkeys
1218 ksmserver
-1219 media kioslave
-1220 remote kioslave
+1219 media tdeioslave
+1220 remote tdeioslave
1400 khelpcenter (tdebase)
1401 kcmhelpcenter
1402 khc_indexbuilder
1420 kikbd
-1421 ki18b_keys (kcmodule)
+1421 ki18b_keys (tdecmodule)
1430 nspluginviewer (Qt/Xt)
1431 nspluginviewer (plugin)
@@ -116,7 +116,7 @@
2003 ksim
2100 kgpg
2200 kdf
-2300 kwallet
+2300 tdewallet
# 2500-2999 Reserved for private use
@@ -182,9 +182,9 @@
5600 kontact (core)
5601 kontact (interfaces)
5602 kontact (plugins)
-5650 kresources
+5650 tderesources
5700 kabc
-5710 kabc/vcard
+5710 tdeabc/vcard
5720 kaddressbook
5800 libkcal
5850 korganizer
@@ -197,30 +197,30 @@
5960 kandy
5970 karm
-# libkhtml
-6000 khtml
-6005 khtml (encoding)
-6010 khtml (dom)
-6020 khtml (xml)
-6030 khtml (html)
-6031 khtml (frames & objects)
-6035 khtml (parser)
-6036 khtml (tokenizer)
-6040 khtml (render)
-6041 khtml (bidi)
-6045 khtml (rendering tree)
-6050 khtml (part)
-6060 khtml (cache)
-6061 khtml (cache-expiredates)
-6070 khtml (jscript)
-6080 khtml (css)
-6090 khtml (memory)
+# libtdehtml
+6000 tdehtml
+6005 tdehtml (encoding)
+6010 tdehtml (dom)
+6020 tdehtml (xml)
+6030 tdehtml (html)
+6031 tdehtml (frames & objects)
+6035 tdehtml (parser)
+6036 tdehtml (tokenizer)
+6040 tdehtml (render)
+6041 tdehtml (bidi)
+6045 tdehtml (rendering tree)
+6050 tdehtml (part)
+6060 tdehtml (cache)
+6061 tdehtml (cache-expiredates)
+6070 tdehtml (jscript)
+6080 tdehtml (css)
+6090 tdehtml (memory)
6100 kjas
-6200 khtml (caret)
-6201 khtml (caret table)
-6210 khtml (editor)
+6200 tdehtml (caret)
+6201 tdehtml (caret table)
+6210 tdehtml (editor)
-# libkio
+# libtdeio
7000 kio
7001 kio (KDirWatch)
7002 kio (Slave)
@@ -228,20 +228,20 @@
7004 kio (KDirListerCache)
7005 kio (Filter)
7006 kio (Scheduler)
-7007 kio (KIOJob)
+7007 kio (TDEIOJob)
7009 kio (KMimeType)
7010 kio (KRun)
7011 kio (KSycoca)
7012 kio (KService*)
7013 kio (KPing)
-7014 kio (KTrader)
+7014 kio (TDETrader)
7015 kio (KAutoMount)
-7016 kio (KLauncher)
+7016 kio (TDELauncher)
7017 kio (KIOConnection)
7018 kio (KMimeMagic)
-7019 kio (kioslave)
+7019 kio (tdeioslave)
7020 kded
-7021 kbuildsycoca
+7021 tdebuildsycoca
7022 kurifilter
7023 kurifilter (plugins)
7024 kio (UIServer)
@@ -260,35 +260,35 @@
7042 KAr
7043 kio (bookmarks)
-# 71xx are for kioslaves
-7101 kio_file
-7102 kio_ftp
-7103 kio_http
+# 71xx are for tdeioslaves
+7101 tdeio_file
+7102 tdeio_ftp
+7103 tdeio_http
7104 kcookiejar
-7105 kio_pop3
-7106 kio_smb
-7107 kio_man
-7108 kio_info
-7109 kio_tar
-7110 kio_gzip
-7111 kio_sql
-7112 kio_smtp
-7113 kio_http_debug
-7114 kio_nntp
-7115 kio_thumbnail
-7116 kio_imap
-7117 kio_audiocd
-7118 kio_bzip2
-7119 kio_help
-7120 kio_sftp
-7121 kio_nfs
-7122 kio_sieve
-7123 kio_kamera
-7124 kio_cgi
-7125 kio_ldap
-7126 kio_devices
-7127 kio_fish
-7128 kio_svn
+7105 tdeio_pop3
+7106 tdeio_smb
+7107 tdeio_man
+7108 tdeio_info
+7109 tdeio_tar
+7110 tdeio_gzip
+7111 tdeio_sql
+7112 tdeio_smtp
+7113 tdeio_http_debug
+7114 tdeio_nntp
+7115 tdeio_thumbnail
+7116 tdeio_imap
+7117 tdeio_audiocd
+7118 tdeio_bzip2
+7119 tdeio_help
+7120 tdeio_sftp
+7121 tdeio_nfs
+7122 tdeio_sieve
+7123 tdeio_kamera
+7124 tdeio_cgi
+7125 tdeio_ldap
+7126 tdeio_devices
+7127 tdeio_fish
+7128 tdeio_svn
# tdesdk
8100 kompare
@@ -427,8 +427,8 @@
20011 KDB (Connection)
20012 KDB (plugin)
-#kfilereplace
-23000 KFileReplace (kfilereplacepart)
+#tdefilereplace
+23000 KFileReplace (tdefilereplacepart)
#klinkstatus
23100 KLinkStatus
@@ -556,7 +556,7 @@
66666 noatun
67000 kscd
67100 kmix
-67200 kmid
+67200 tdemid
# tdebindings
70001 dcoppython
diff --git a/tdecore/kdebug.cpp b/tdecore/kdebug.cpp
index 9f2d1458c..656edf6f9 100644
--- a/tdecore/kdebug.cpp
+++ b/tdecore/kdebug.cpp
@@ -27,13 +27,13 @@
#include "kdebugdcopiface.h"
-#include "kapplication.h"
-#include "kglobal.h"
+#include "tdeapplication.h"
+#include "tdeglobal.h"
#include "kinstance.h"
#include "kstandarddirs.h"
#include <tqmessagebox.h>
-#include <klocale.h>
+#include <tdelocale.h>
#include <tqfile.h>
#include <tqintdict.h>
#include <tqstring.h>
@@ -55,7 +55,7 @@
#include <syslog.h>
#include <errno.h>
#include <string.h>
-#include <kconfig.h>
+#include <tdeconfig.h>
#include "kstaticdeleter.h"
#include <config.h>
@@ -81,8 +81,8 @@ static TQCString getDescrFromNum(unsigned int _num)
{
if (!KDebugCache) {
kdd.setObject(KDebugCache, new TQIntDict<KDebugEntry>( 601 ));
- // Do not call this deleter from ~KApplication
- KGlobal::unregisterStaticDeleter(&kdd);
+ // Do not call this deleter from ~TDEApplication
+ TDEGlobal::unregisterStaticDeleter(&kdd);
KDebugCache->setAutoDelete(true);
}
@@ -162,7 +162,7 @@ struct kDebugPrivate {
TQCString aAreaName;
unsigned int oldarea;
- KConfig *config;
+ TDEConfig *config;
};
static kDebugPrivate *kDebug_data = 0;
@@ -175,8 +175,8 @@ static void kDebugBackend( unsigned short nLevel, unsigned int nArea, const char
if ( !kDebug_data )
{
pcd.setObject(kDebug_data, new kDebugPrivate());
- // Do not call this deleter from ~KApplication
- KGlobal::unregisterStaticDeleter(&pcd);
+ // Do not call this deleter from ~TDEApplication
+ TDEGlobal::unregisterStaticDeleter(&pcd);
// create the dcop interface if it has not been created yet
if (!kDebugDCOPIface)
@@ -185,25 +185,25 @@ static void kDebugBackend( unsigned short nLevel, unsigned int nArea, const char
}
}
- if (!kDebug_data->config && KGlobal::_instance )
+ if (!kDebug_data->config && TDEGlobal::_instance )
{
- kDebug_data->config = new KConfig("kdebugrc", false, false);
+ kDebug_data->config = new TDEConfig("kdebugrc", false, false);
kDebug_data->config->setGroup("0");
//AB: this is necessary here, otherwise all output with area 0 won't be
//prefixed with anything, unless something with area != 0 is called before
- if ( KGlobal::_instance )
- kDebug_data->aAreaName = KGlobal::instance()->instanceName();
+ if ( TDEGlobal::_instance )
+ kDebug_data->aAreaName = TDEGlobal::instance()->instanceName();
}
if (kDebug_data->config && kDebug_data->oldarea != nArea) {
kDebug_data->config->setGroup( TQString::number(static_cast<int>(nArea)) );
kDebug_data->oldarea = nArea;
- if ( nArea > 0 && KGlobal::_instance )
+ if ( nArea > 0 && TDEGlobal::_instance )
kDebug_data->aAreaName = getDescrFromNum(nArea);
if ((nArea == 0) || kDebug_data->aAreaName.isEmpty())
- if ( KGlobal::_instance )
- kDebug_data->aAreaName = KGlobal::instance()->instanceName();
+ if ( TDEGlobal::_instance )
+ kDebug_data->aAreaName = TDEGlobal::instance()->instanceName();
}
int nPriority = 0;
diff --git a/tdecore/kdebug.h b/tdecore/kdebug.h
index 1121d3679..d8a1998f9 100644
--- a/tdecore/kdebug.h
+++ b/tdecore/kdebug.h
@@ -422,7 +422,7 @@ kdbgstream &kdbgstream::operator<<( const TQValueList<T> &list )
}
/**
- * \relates KGlobal
+ * \relates TDEGlobal
* Prints an "\n".
* @param s the debug stream to write to
* @return the debug stream (@p s)
@@ -430,7 +430,7 @@ kdbgstream &kdbgstream::operator<<( const TQValueList<T> &list )
inline kdbgstream &endl( kdbgstream &s) { s << "\n"; return s; }
/**
- * \relates KGlobal
+ * \relates TDEGlobal
* Flushes the stream.
* @param s the debug stream to write to
* @return the debug stream (@p s)
@@ -440,7 +440,7 @@ inline kdbgstream &flush( kdbgstream &s) { s.flush(); return s; }
TDECORE_EXPORT kdbgstream &perror( kdbgstream &s);
/**
- * \relates KGlobal
+ * \relates TDEGlobal
* kndbgstream is a dummy variant of kdbgstream. All functions do
* nothing.
* @see kndDebug()
@@ -590,7 +590,7 @@ inline kndbgstream &flush( kndbgstream & s) { return s; }
inline kndbgstream &perror( kndbgstream & s) { return s; }
/**
- * \relates KGlobal
+ * \relates TDEGlobal
* Returns a debug stream. You can use it to print debug
* information.
* @param area an id to identify the output, 0 for default
@@ -599,13 +599,13 @@ inline kndbgstream &perror( kndbgstream & s) { return s; }
TDECORE_EXPORT kdbgstream kdDebug(int area = 0);
TDECORE_EXPORT kdbgstream kdDebug(bool cond, int area = 0);
/**
- * \relates KGlobal
+ * \relates TDEGlobal
* Returns a backtrace.
* @return a backtrace
*/
TDECORE_EXPORT TQString kdBacktrace();
/**
- * \relates KGlobal
+ * \relates TDEGlobal
* Returns a backtrace.
* @param levels the number of levels of the backtrace
* @return a backtrace
@@ -623,7 +623,7 @@ inline TQString kndBacktrace() { return TQString::null; }
inline TQString kndBacktrace(int) { return TQString::null; }
/**
- * \relates KGlobal
+ * \relates TDEGlobal
* Returns a warning stream. You can use it to print warning
* information.
* @param area an id to identify the output, 0 for default
@@ -631,7 +631,7 @@ inline TQString kndBacktrace(int) { return TQString::null; }
TDECORE_EXPORT kdbgstream kdWarning(int area = 0);
TDECORE_EXPORT kdbgstream kdWarning(bool cond, int area = 0);
/**
- * \relates KGlobal
+ * \relates TDEGlobal
* Returns an error stream. You can use it to print error
* information.
* @param area an id to identify the output, 0 for default
@@ -639,7 +639,7 @@ TDECORE_EXPORT kdbgstream kdWarning(bool cond, int area = 0);
TDECORE_EXPORT kdbgstream kdError(int area = 0);
TDECORE_EXPORT kdbgstream kdError(bool cond, int area = 0);
/**
- * \relates KGlobal
+ * \relates TDEGlobal
* Returns a fatal error stream. You can use it to print fatal error
* information.
* @param area an id to identify the output, 0 for default
@@ -648,7 +648,7 @@ TDECORE_EXPORT kdbgstream kdFatal(int area = 0);
TDECORE_EXPORT kdbgstream kdFatal(bool cond, int area = 0);
/**
- * \relates KGlobal
+ * \relates TDEGlobal
* Deletes the kdebugrc cache and therefore forces KDebug to reread the
* config file
*/
diff --git a/tdecore/kdebugrc b/tdecore/kdebugrc
index 10032a633..dbf3ed53f 100644
--- a/tdecore/kdebugrc
+++ b/tdecore/kdebugrc
@@ -32,7 +32,7 @@
# AbortFatal=1
#
-# KAccel debug info off
+# TDEAccel debug info off
[125]
InfoOutput=4
@@ -40,19 +40,19 @@ InfoOutput=4
[131]
InfoOutput=4
-# KAction debug info off
+# TDEAction debug info off
[129]
InfoOutput=4
-# KStartupInfo debug info off
+# TDEStartupInfo debug info off
[172]
InfoOutput=4
-# KLocale debug info off
+# TDELocale debug info off
[173]
InfoOutput=4
-# KMainWindow debug info off
+# TDEMainWindow debug info off
[200]
InfoOutput=4
@@ -60,7 +60,7 @@ InfoOutput=4
[250]
InfoOutput=4
-# KIconloader debug info off
+# TDEIconloader debug info off
[264]
InfoOutput=4
@@ -96,7 +96,7 @@ InfoOutput=4
[5400]
InfoOutput=4
-# kabc/vcard
+# tdeabc/vcard
[5710]
InfoOutput=4
@@ -112,7 +112,7 @@ InfoOutput=4
[5901]
InfoOutput=4
-# kio_http_debug debug info off
+# tdeio_http_debug debug info off
[7113]
InfoOutput=4
@@ -120,7 +120,7 @@ InfoOutput=4
[7118]
InfoOutput=4
-# kio_nntp debug info off
+# tdeio_nntp debug info off
[7114]
InfoOutput=4
diff --git a/tdecore/kdesktopfile.cpp b/tdecore/kdesktopfile.cpp
index 02dfb1d5f..b385eeb18 100644
--- a/tdecore/kdesktopfile.cpp
+++ b/tdecore/kdesktopfile.cpp
@@ -30,21 +30,21 @@
#include <kdebug.h>
#include "kurl.h"
-#include "kconfigbackend.h"
-#include "kapplication.h"
+#include "tdeconfigbackend.h"
+#include "tdeapplication.h"
#include "kstandarddirs.h"
#include "kmountpoint.h"
#include "kcatalogue.h"
-#include "klocale.h"
+#include "tdelocale.h"
#include "kdesktopfile.h"
#include "kdesktopfile.moc"
KDesktopFile::KDesktopFile(const TQString &fileName, bool bReadOnly,
const char * resType)
- : KConfig(TQString::fromLatin1(""), bReadOnly, false)
+ : TDEConfig(TQString::fromLatin1(""), bReadOnly, false)
{
- // KConfigBackEnd will try to locate the filename that is provided
+ // TDEConfigBackEnd will try to locate the filename that is provided
// based on the resource type specified, _only_ if the filename
// is not an absolute path.
backEnd->changeFileName(fileName, resType, false);
@@ -67,7 +67,7 @@ TQString KDesktopFile::locateLocal(const TQString &path)
if (!TQDir::isRelativePath(local))
{
// Relative wrt apps?
- local = KGlobal::dirs()->relativeLocation("apps", path);
+ local = TDEGlobal::dirs()->relativeLocation("apps", path);
}
if (TQDir::isRelativePath(local))
@@ -78,7 +78,7 @@ TQString KDesktopFile::locateLocal(const TQString &path)
{
// XDG Desktop menu items come with absolute paths, we need to
// extract their relative path and then build a local path.
- local = KGlobal::dirs()->relativeLocation("xdgdata-dirs", local);
+ local = TDEGlobal::dirs()->relativeLocation("xdgdata-dirs", local);
if (!TQDir::isRelativePath(local))
{
// Hm, that didn't work...
@@ -98,7 +98,7 @@ TQString KDesktopFile::locateLocal(const TQString &path)
{
// XDG Desktop menu items come with absolute paths, we need to
// extract their relative path and then build a local path.
- local = KGlobal::dirs()->relativeLocation("xdgdata-apps", path);
+ local = TDEGlobal::dirs()->relativeLocation("xdgdata-apps", path);
if (!TQDir::isRelativePath(local))
{
// What now? Use filename only and hope for the best.
@@ -133,7 +133,7 @@ bool KDesktopFile::isAuthorizedDesktopFile(const TQString& path)
if (TQDir::isRelativePath(path))
return true; // Relative paths are ok.
- KStandardDirs *dirs = KGlobal::dirs();
+ TDEStandardDirs *dirs = TDEGlobal::dirs();
if (TQDir::isRelativePath( dirs->relativeLocation("apps", path) ))
return true;
if (TQDir::isRelativePath( dirs->relativeLocation("xdgdata-apps", path) ))
@@ -157,7 +157,7 @@ TQString KDesktopFile::translatedEntry(const char* key) const
TQString fName = fileName();
fName = fName.mid(fName.findRev('/')+1);
TQString po_lookup_key = TQString::fromLatin1(key) + "(" + fName + "): " + value;
- TQString po_value = KGlobal::locale()->translate(po_lookup_key.utf8().data());
+ TQString po_value = TDEGlobal::locale()->translate(po_lookup_key.utf8().data());
if (po_value == po_lookup_key)
return value;
@@ -346,7 +346,7 @@ KDesktopFile::sortOrder() const
}
void KDesktopFile::virtual_hook( int id, void* data )
-{ KConfig::virtual_hook( id, data ); }
+{ TDEConfig::virtual_hook( id, data ); }
TQString KDesktopFile::readDocPath() const
{
@@ -361,7 +361,7 @@ TQString KDesktopFile::readDocPath() const
KDesktopFile* KDesktopFile::copyTo(const TQString &file) const
{
KDesktopFile *config = new KDesktopFile(TQString::null, false);
- KConfig::copyTo(file, config);
+ TDEConfig::copyTo(file, config);
config->setDesktopGroup();
return config;
}
diff --git a/tdecore/kdesktopfile.h b/tdecore/kdesktopfile.h
index ff19981cd..60e9fc096 100644
--- a/tdecore/kdesktopfile.h
+++ b/tdecore/kdesktopfile.h
@@ -19,7 +19,7 @@
#ifndef _KDESKTOPFILE_H
#define _KDESKTOPFILE_H
-#include "kconfig.h"
+#include "tdeconfig.h"
#include "tdelibs_export.h"
class KDesktopFilePrivate;
@@ -28,10 +28,10 @@ class KDesktopFilePrivate;
* KDE Desktop File Management.
*
* @author Pietro Iglio <iglio@kde.org>
- * @see KConfigBase KConfig
+ * @see TDEConfigBase TDEConfig
* @short KDE Desktop File Management class
*/
-class TDECORE_EXPORT KDesktopFile : public KConfig
+class TDECORE_EXPORT KDesktopFile : public TDEConfig
{
Q_OBJECT
diff --git a/tdecore/kdetcompmgr.cpp b/tdecore/kdetcompmgr.cpp
index 8b9b4804e..964cd49be 100644
--- a/tdecore/kdetcompmgr.cpp
+++ b/tdecore/kdetcompmgr.cpp
@@ -21,12 +21,12 @@
#include <stdio.h>
#include <stdlib.h>
-#include <kapplication.h>
-#include <kaboutdata.h>
-#include <kcmdlineargs.h>
-#include <klocale.h>
+#include <tdeapplication.h>
+#include <tdeaboutdata.h>
+#include <tdecmdlineargs.h>
+#include <tdelocale.h>
#include <kdebug.h>
-#include <kconfig.h>
+#include <tdeconfig.h>
#include <pwd.h>
#include <signal.h>
@@ -36,22 +36,22 @@ static const char description[] =
static const char version[] = "0.1";
-static KCmdLineOptions options[] =
+static TDECmdLineOptions options[] =
{
- KCmdLineLastOption
+ TDECmdLineLastOption
};
int main(int argc, char **argv)
{
- KAboutData about("kdetcompmgr", I18N_NOOP("kdetcompmgr"), version, description,
- KAboutData::License_GPL, "(C) 2011 Timothy Pearson", 0, 0, "kb9vqf@pearsoncomputing.net");
+ TDEAboutData about("kdetcompmgr", I18N_NOOP("kdetcompmgr"), version, description,
+ TDEAboutData::License_GPL, "(C) 2011 Timothy Pearson", 0, 0, "kb9vqf@pearsoncomputing.net");
about.addAuthor( "Timothy Pearson", 0, "kb9vqf@pearsoncomputing.net" );
- KCmdLineArgs::init(argc, argv, &about);
- KCmdLineArgs::addCmdLineOptions( options );
+ TDECmdLineArgs::init(argc, argv, &about);
+ TDECmdLineArgs::addCmdLineOptions( options );
- KApplication app;
+ TDEApplication app;
- KConfig config("twinrc", true);
+ TDEConfig config("twinrc", true);
config.setGroup( "Notification Messages" );
if (!config.readBoolEntry("UseTranslucency",false)) {
// Attempt to load the kompmgr pid file
@@ -97,7 +97,7 @@ int main(int argc, char **argv)
}
if (app.detectCompositionManagerAvailable(false, false)) { // Perform a shallow check for the composite extension (a deep check would cause noticeable flicker)
- KConfig config2("twinrc", true);
+ TDEConfig config2("twinrc", true);
config2.setGroup( "Notification Messages" );
if (config2.readBoolEntry("UseTranslucency",false)) {
app.detectCompositionManagerAvailable(true, true);
diff --git a/tdecore/kentities.c b/tdecore/kentities.c
index 8181e5a6c..141ed9db0 100644
--- a/tdecore/kentities.c
+++ b/tdecore/kentities.c
@@ -53,7 +53,7 @@
kentities.gperf: input file to generate a hash table for entities
kentities.c: DO NOT EDIT! generated by the command
- "gperf -a -L "ANSI-C" -C -G -c -o -t -k '*' -Nkde_findEntity -D -s 2 khtmlentities.gperf > entities.c"
+ "gperf -a -L "ANSI-C" -C -G -c -o -t -k '*' -Nkde_findEntity -D -s 2 tdehtmlentities.gperf > entities.c"
from kentities.gperf
$Id$
diff --git a/tdecore/kentities.gperf b/tdecore/kentities.gperf
index 08f712707..5d848b837 100644
--- a/tdecore/kentities.gperf
+++ b/tdecore/kentities.gperf
@@ -22,7 +22,7 @@
kentities.gperf: input file to generate a hash table for entities
kentities.c: DO NOT EDIT! generated by the command
- "gperf -a -L "ANSI-C" -C -G -c -o -t -k '*' -Nkde_findEntity -D -s 2 khtmlentities.gperf > entities.c"
+ "gperf -a -L "ANSI-C" -C -G -c -o -t -k '*' -Nkde_findEntity -D -s 2 tdehtmlentities.gperf > entities.c"
from kentities.gperf
$Id$
diff --git a/tdecore/kextsock.cpp b/tdecore/kextsock.cpp
index cd74f9ad0..de1735382 100644
--- a/tdecore/kextsock.cpp
+++ b/tdecore/kextsock.cpp
@@ -72,8 +72,8 @@ public:
KResolver resLocal; // binding resolution
unsigned current; // used by the asynchronous connection
- ::KSocketAddress *local; // local socket address
- ::KSocketAddress *peer; // peer socket address
+ ::TDESocketAddress *local; // local socket address
+ ::TDESocketAddress *peer; // peer socket address
TQSocketNotifier *qsnIn, *qsnOut;
int inMaxSize, outMaxSize;
@@ -718,7 +718,7 @@ bool KExtendedSocket::setBufferSize(int rsize, int wsize)
* if we have done this already, we return it. Otherwise, we'll have
* to find the socket name
*/
-const ::KSocketAddress *KExtendedSocket::localAddress()
+const ::TDESocketAddress *KExtendedSocket::localAddress()
{
if (d->local != NULL)
return d->local;
@@ -733,7 +733,7 @@ const ::KSocketAddress *KExtendedSocket::localAddress()
* passiveSocket and that we require to be connected already. Also note that
* the behavior on connectionless sockets is not defined here.
*/
-const ::KSocketAddress* KExtendedSocket::peerAddress()
+const ::TDESocketAddress* KExtendedSocket::peerAddress()
{
if (d->peer != NULL)
return d->peer;
@@ -1570,7 +1570,7 @@ qint64 KExtendedSocket::bytesAvailable() const
// as of now, we don't do any extra processing
// we only work in input-buffered sockets
if (d->flags & inputBufferedSocket)
- return KBufferedIO::bytesAvailable();
+ return TDEBufferedIO::bytesAvailable();
return 0; // TODO: FIONREAD ioctl
}
@@ -2002,7 +2002,7 @@ int KExtendedSocket::resolve(sockaddr *sock, ksocklen_t len, TQString &host,
return err;
}
-int KExtendedSocket::resolve(::KSocketAddress *sock, TQString &host, TQString &port,
+int KExtendedSocket::resolve(::TDESocketAddress *sock, TQString &host, TQString &port,
int flags)
{
return resolve(sock->data, sock->datasize, host, port, flags);
@@ -2058,7 +2058,7 @@ TQPtrList<KAddressInfo> KExtendedSocket::lookup(const TQString& host, const TQSt
ai->ai->ai_addr = 0;
}
- ai->addr = ::KSocketAddress::newAddress(ai->ai->ai_addr, ai->ai->ai_addrlen);
+ ai->addr = ::TDESocketAddress::newAddress(ai->ai->ai_addr, ai->ai->ai_addrlen);
l.append(ai);
}
@@ -2069,9 +2069,9 @@ TQPtrList<KAddressInfo> KExtendedSocket::lookup(const TQString& host, const TQSt
return l;
}
-::KSocketAddress *KExtendedSocket::localAddress(int fd)
+::TDESocketAddress *KExtendedSocket::localAddress(int fd)
{
- ::KSocketAddress *local;
+ ::TDESocketAddress *local;
struct sockaddr static_sa, *sa = &static_sa;
ksocklen_t len = sizeof(static_sa);
@@ -2106,20 +2106,20 @@ TQPtrList<KAddressInfo> KExtendedSocket::lookup(const TQString& host, const TQSt
return NULL;
}
- local = ::KSocketAddress::newAddress(sa, len);
+ local = ::TDESocketAddress::newAddress(sa, len);
free(sa);
}
else
- local = ::KSocketAddress::newAddress(sa, len);
+ local = ::TDESocketAddress::newAddress(sa, len);
return local;
}
/* This is exactly the same code as localAddress, except
* we call getpeername here */
-::KSocketAddress *KExtendedSocket::peerAddress(int fd)
+::TDESocketAddress *KExtendedSocket::peerAddress(int fd)
{
- ::KSocketAddress *peer;
+ ::TDESocketAddress *peer;
struct sockaddr static_sa, *sa = &static_sa;
ksocklen_t len = sizeof(static_sa);
@@ -2154,11 +2154,11 @@ TQPtrList<KAddressInfo> KExtendedSocket::lookup(const TQString& host, const TQSt
return NULL;
}
- peer = ::KSocketAddress::newAddress(sa, len);
+ peer = ::TDESocketAddress::newAddress(sa, len);
free(sa);
}
else
- peer = ::KSocketAddress::newAddress(sa, len);
+ peer = ::TDESocketAddress::newAddress(sa, len);
return peer;
}
@@ -2204,7 +2204,7 @@ KAddressInfo::KAddressInfo(addrinfo *p)
ai->ai_addrlen = 0;
}
- addr = ::KSocketAddress::newAddress(ai->ai_addr, ai->ai_addrlen);
+ addr = ::TDESocketAddress::newAddress(ai->ai_addr, ai->ai_addrlen);
}
#endif
KAddressInfo::~KAddressInfo()
@@ -2246,6 +2246,6 @@ const char* KAddressInfo::canonname() const
}
void KExtendedSocket::virtual_hook( int id, void* data )
-{ KBufferedIO::virtual_hook( id, data ); }
+{ TDEBufferedIO::virtual_hook( id, data ); }
#include "kextsock.moc"
diff --git a/tdecore/kextsock.h b/tdecore/kextsock.h
index 080898443..fad502c04 100644
--- a/tdecore/kextsock.h
+++ b/tdecore/kextsock.h
@@ -58,8 +58,8 @@ class KExtendedSocketPrivate;
/**
* The extended socket class.
*
- * This class should be used instead of KSocket whenever the user needs
- * fine-grained control over the socket being created. Unlike KSocket, which
+ * This class should be used instead of TDESocket whenever the user needs
+ * fine-grained control over the socket being created. Unlike TDESocket, which
* does everything at once, without much intervention, KExtendedSocket allows
* intervention at every step of the process and the setting of parameters.
*
@@ -87,12 +87,12 @@ class KExtendedSocketPrivate;
* @deprecated
* This class is now deprecated. Please use the classes in KNetwork for
* new programs. In particular, this class is replaced by KNetwork::KStreamSocket
- * and @ref KNetwork::KServerSocket.
+ * and @ref KNetwork::TDEServerSocket.
*
* @author Thiago Macieira <thiago.macieira@kdemail.net>
* @short an extended socket
*/
-class TDECORE_EXPORT KExtendedSocket: public KBufferedIO // public TQObject, public QIODevice
+class TDECORE_EXPORT KExtendedSocket: public TDEBufferedIO // public TQObject, public QIODevice
{
Q_OBJECT
@@ -491,7 +491,7 @@ public:
* @return the local socket address, can be 0 if the connection has not been established
* yet
*/
- const ::KSocketAddress *localAddress();
+ const ::TDESocketAddress *localAddress();
/**
* Returns the peer socket address. Use KExtendedSocket::resolve() to
@@ -499,7 +499,7 @@ public:
* @return the peer address, can be 0 if the connection has not been established yet
* or the socket is passive
*/
- const ::KSocketAddress *peerAddress();
+ const ::TDESocketAddress *peerAddress();
/**
* Returns the file descriptor
@@ -582,7 +582,7 @@ public:
* @li #closed() will only be sent if we are indeed reading from the input
* stream. That is, if this socket is buffering the input. See setBufferSize
*
- * Note that, in general, functions inherited/overridden from KBufferedIO will only
+ * Note that, in general, functions inherited/overridden from TDEBufferedIO will only
* work on buffered sockets, like bytesAvailable and bytesToWrite.
* @return The return values are:
* @li 0: success
@@ -964,7 +964,7 @@ public:
* @param flags the same flags as getnameinfo()
* @returns 0 on success, nonzero otherwise.
*/
- static int resolve(::KSocketAddress* sock, TQString& host, TQString& port, int flags = 0) KDE_DEPRECATED;
+ static int resolve(::TDESocketAddress* sock, TQString& host, TQString& port, int flags = 0) KDE_DEPRECATED;
/** @deprecated
* This function is now deprecated. Please use @ref KNetwork::KResolver::resolve.
@@ -994,7 +994,7 @@ public:
* @param fd the file descriptor
* @return the local socket address or 0 if an error occurred. Delete after use.
*/
- static ::KSocketAddress *localAddress(int fd) KDE_DEPRECATED;
+ static ::TDESocketAddress *localAddress(int fd) KDE_DEPRECATED;
/**
* Returns the peer socket address. Use KExtendedSocket::resolve() to
@@ -1003,7 +1003,7 @@ public:
* @param fd the file descriptor
* @return the peer socket address or 0 if an error occurred. Delete after use.
*/
- static ::KSocketAddress *peerAddress(int fd) KDE_DEPRECATED;
+ static ::TDESocketAddress *peerAddress(int fd) KDE_DEPRECATED;
/**
* Returns the representing text of this error code
@@ -1029,8 +1029,8 @@ protected:
private:
KExtendedSocketPrivate *d;
- friend class KSocket;
- friend class KServerSocket;
+ friend class TDESocket;
+ friend class TDEServerSocket;
};
/** @deprecated
@@ -1043,7 +1043,7 @@ class TDECORE_EXPORT KAddressInfo
{
private:
addrinfo *ai;
- ::KSocketAddress *addr;
+ ::TDESocketAddress *addr;
inline KAddressInfo() : ai(0), addr(0)
{ }
@@ -1056,10 +1056,10 @@ public:
~KAddressInfo();
/**
- * Returns the KAddressInfo's KSocketAddress.
+ * Returns the KAddressInfo's TDESocketAddress.
* Only valid as long as the KAddressInfo exists.
*/
- inline KDE_DEPRECATED operator const ::KSocketAddress*() const
+ inline KDE_DEPRECATED operator const ::TDESocketAddress*() const
{ return addr; }
/**
@@ -1076,11 +1076,11 @@ public:
{ return ai; }
/**
- * Returns the KAddressInfo's KSocketAddress.
+ * Returns the KAddressInfo's TDESocketAddress.
* Only valid as long as the KAddressInfo exists.
- * @return the KAddressInfo's KSocketAddress.
+ * @return the KAddressInfo's TDESocketAddress.
*/
- inline KDE_DEPRECATED const ::KSocketAddress* address() const
+ inline KDE_DEPRECATED const ::TDESocketAddress* address() const
{ return addr; }
/**
@@ -1116,8 +1116,8 @@ public:
const char* canonname() const KDE_DEPRECATED;
/**
- * Returns the length of the KSocketAddress.
- * @return the KSocketAddress's length
+ * Returns the length of the TDESocketAddress.
+ * @return the TDESocketAddress's length
*/
inline int length() const
{ if (addr) return addr->size(); return 0; }
diff --git a/tdecore/kgenericfactory.h b/tdecore/kgenericfactory.h
index 3faaae7bf..7f2b7b453 100644
--- a/tdecore/kgenericfactory.h
+++ b/tdecore/kgenericfactory.h
@@ -23,8 +23,8 @@
#include <ktypelist.h>
#include <kinstance.h>
#include <kgenericfactory.tcc>
-#include <kglobal.h>
-#include <klocale.h>
+#include <tdeglobal.h>
+#include <tdelocale.h>
#include <kdebug.h>
/* @internal */
@@ -39,7 +39,7 @@ public:
s_self = this;
m_catalogueInitialized = false;
}
- KGenericFactoryBase( const KAboutData *data )
+ KGenericFactoryBase( const TDEAboutData *data )
: m_aboutData(data)
{
s_self = this;
@@ -49,30 +49,30 @@ public:
virtual ~KGenericFactoryBase()
{
if ( s_instance )
- KGlobal::locale()->removeCatalogue( TQString::fromAscii( s_instance->instanceName() ) );
+ TDEGlobal::locale()->removeCatalogue( TQString::fromAscii( s_instance->instanceName() ) );
delete s_instance;
s_instance = 0;
s_self = 0;
}
- static KInstance *instance();
+ static TDEInstance *instance();
protected:
- virtual KInstance *createInstance()
+ virtual TDEInstance *createInstance()
{
if ( m_aboutData )
- return new KInstance( m_aboutData );
+ return new TDEInstance( m_aboutData );
if ( m_instanceName.isEmpty() ) {
kdWarning() << "KGenericFactory: instance requested but no instance name or about data passed to the constructor!" << endl;
return 0;
}
- return new KInstance( m_instanceName );
+ return new TDEInstance( m_instanceName );
}
virtual void setupTranslations( void )
{
if ( instance() )
- KGlobal::locale()->insertCatalogue( TQString::fromAscii( instance()->instanceName() ) );
+ TDEGlobal::locale()->insertCatalogue( TQString::fromAscii( instance()->instanceName() ) );
}
void initializeMessageCatalogue()
@@ -86,16 +86,16 @@ protected:
private:
TQCString m_instanceName;
- const KAboutData *m_aboutData;
+ const TDEAboutData *m_aboutData;
bool m_catalogueInitialized;
- static KInstance *s_instance;
+ static TDEInstance *s_instance;
static KGenericFactoryBase<T> *s_self;
};
/* @internal */
template <class T>
-KInstance *KGenericFactoryBase<T>::s_instance = 0;
+TDEInstance *KGenericFactoryBase<T>::s_instance = 0;
/* @internal */
template <class T>
@@ -103,7 +103,7 @@ KGenericFactoryBase<T> *KGenericFactoryBase<T>::s_self = 0;
/* @internal */
template <class T>
-KInstance *KGenericFactoryBase<T>::instance()
+TDEInstance *KGenericFactoryBase<T>::instance()
{
if ( !s_instance && s_self )
s_instance = s_self->createInstance();
@@ -141,17 +141,17 @@ KInstance *KGenericFactoryBase<T>::instance()
* that the caller passed to KLibFactory's create method.
*
* In addition upon instantiation this template provides a central
- * KInstance object for your component, accessible through the
+ * TDEInstance object for your component, accessible through the
* static instance() method. The instanceName argument of the
- * KGenericFactory constructor is passed to the KInstance object.
+ * KGenericFactory constructor is passed to the TDEInstance object.
*
- * The creation of the KInstance object can be customized by inheriting
+ * The creation of the TDEInstance object can be customized by inheriting
* from this template class and re-implementing the virtual createInstance
* method. For example it could look like this:
* \code
- * KInstance *MyFactory::createInstance()
+ * TDEInstance *MyFactory::createInstance()
* {
- * return new KInstance( myAboutData );
+ * return new TDEInstance( myAboutData );
* }
* \endcode
*
@@ -180,7 +180,7 @@ public:
/**
* @since 3.3
*/
- KGenericFactory( const KAboutData *data )
+ KGenericFactory( const TDEAboutData *data )
: KGenericFactoryBase<Product>( data )
{}
@@ -224,17 +224,17 @@ protected:
* that the caller passed to KLibFactory's create method.
*
* In addition upon instantiation this template provides a central
- * KInstance object for your component, accessible through the
+ * TDEInstance object for your component, accessible through the
* static instance() method. The instanceName argument of the
- * KGenericFactory constructor is passed to the KInstance object.
+ * KGenericFactory constructor is passed to the TDEInstance object.
*
- * The creation of the KInstance object can be customized by inheriting
+ * The creation of the TDEInstance object can be customized by inheriting
* from this template class and re-implementing the virtual createInstance
* method. For example it could look like this:
* \code
- * KInstance *MyFactory::createInstance()
+ * TDEInstance *MyFactory::createInstance()
* {
- * return new KInstance( myAboutData );
+ * return new TDEInstance( myAboutData );
* }
* \endcode
*
@@ -275,7 +275,7 @@ public:
/**
* @since 3.3
*/
- KGenericFactory( const KAboutData *data )
+ KGenericFactory( const TDEAboutData *data )
: KGenericFactoryBase< KTypeList<Product, ProductListTail> >( data )
{}
@@ -319,17 +319,17 @@ protected:
* that the caller passed to KLibFactory's create method.
*
* In addition upon instantiation this template provides a central
- * KInstance object for your component, accessible through the
+ * TDEInstance object for your component, accessible through the
* static instance() method. The instanceName argument of the
- * KGenericFactory constructor is passed to the KInstance object.
+ * KGenericFactory constructor is passed to the TDEInstance object.
*
- * The creation of the KInstance object can be customized by inheriting
+ * The creation of the TDEInstance object can be customized by inheriting
* from this template class and re-implementing the virtual createInstance
* method. For example it could look like this:
* \code
- * KInstance *MyFactory::createInstance()
+ * TDEInstance *MyFactory::createInstance()
* {
- * return new KInstance( myAboutData );
+ * return new TDEInstance( myAboutData );
* }
* \endcode
*
@@ -371,7 +371,7 @@ public:
/**
* @since 3.3
*/
- KGenericFactory( const KAboutData *data )
+ KGenericFactory( const TDEAboutData *data )
: KGenericFactoryBase< KTypeList<Product, ProductListTail> >( data )
{}
diff --git a/tdecore/kglobalaccel.cpp b/tdecore/kglobalaccel.cpp
index 32ed04f3f..746721e40 100644
--- a/tdecore/kglobalaccel.cpp
+++ b/tdecore/kglobalaccel.cpp
@@ -29,53 +29,53 @@
#endif
#include <tqstring.h>
-#include "kaccelbase.h"
+#include "tdeaccelbase.h"
#include <kdebug.h>
-#include <kshortcut.h>
-#include <klocale.h>
+#include <tdeshortcut.h>
+#include <tdelocale.h>
//----------------------------------------------------
-KGlobalAccel::KGlobalAccel( TQObject* pParent, const char* psName )
+TDEGlobalAccel::TDEGlobalAccel( TQObject* pParent, const char* psName )
: TQObject( pParent, psName )
{
- kdDebug(125) << "KGlobalAccel(): this = " << this << endl;
- d = new KGlobalAccelPrivate();
+ kdDebug(125) << "TDEGlobalAccel(): this = " << this << endl;
+ d = new TDEGlobalAccelPrivate();
}
-KGlobalAccel::~KGlobalAccel()
+TDEGlobalAccel::~TDEGlobalAccel()
{
- kdDebug(125) << "~KGlobalAccel(): this = " << this << endl;
+ kdDebug(125) << "~TDEGlobalAccel(): this = " << this << endl;
delete d;
}
/*
-void KGlobalAccel::clear()
+void TDEGlobalAccel::clear()
{ d->clearActions(); }
*/
-KAccelActions& KGlobalAccel::actions()
- { return d->KAccelBase::actions(); }
+TDEAccelActions& TDEGlobalAccel::actions()
+ { return d->TDEAccelBase::actions(); }
-const KAccelActions& KGlobalAccel::actions() const
- { return d->KAccelBase::actions(); }
+const TDEAccelActions& TDEGlobalAccel::actions() const
+ { return d->TDEAccelBase::actions(); }
-bool KGlobalAccel::isEnabled()
- { return ((KAccelBase*)d)->isEnabled(); }
+bool TDEGlobalAccel::isEnabled()
+ { return ((TDEAccelBase*)d)->isEnabled(); }
-void KGlobalAccel::setEnabled( bool bEnabled )
+void TDEGlobalAccel::setEnabled( bool bEnabled )
{ d->setEnabled( bEnabled ); }
-void KGlobalAccel::suspend( bool s )
+void TDEGlobalAccel::suspend( bool s )
{ d->suspend( s ); }
-void KGlobalAccel::blockShortcuts( bool block )
- { KGlobalAccelPrivate::blockShortcuts( block ); }
+void TDEGlobalAccel::blockShortcuts( bool block )
+ { TDEGlobalAccelPrivate::blockShortcuts( block ); }
-void KGlobalAccel::disableBlocking( bool disable )
+void TDEGlobalAccel::disableBlocking( bool disable )
{ d->disableBlocking( disable ); }
-KAccelAction* KGlobalAccel::insert( const TQString& sAction, const TQString& sDesc, const TQString& sHelp,
- const KShortcut& cutDef3, const KShortcut& cutDef4,
+TDEAccelAction* TDEGlobalAccel::insert( const TQString& sAction, const TQString& sDesc, const TQString& sHelp,
+ const TDEShortcut& cutDef3, const TDEShortcut& cutDef4,
const TQObject* pObjSlot, const char* psMethodSlot,
bool bConfigurable, bool bEnabled )
{
@@ -85,55 +85,55 @@ KAccelAction* KGlobalAccel::insert( const TQString& sAction, const TQString& sDe
bConfigurable, bEnabled );
}
-KAccelAction* KGlobalAccel::insert( const TQString& sName, const TQString& sDesc )
+TDEAccelAction* TDEGlobalAccel::insert( const TQString& sName, const TQString& sDesc )
{ return d->insert( sName, sDesc ); }
-bool KGlobalAccel::updateConnections()
+bool TDEGlobalAccel::updateConnections()
{ return d->updateConnections(); }
-bool KGlobalAccel::remove( const TQString& sAction )
+bool TDEGlobalAccel::remove( const TQString& sAction )
{ return d->remove( sAction ); }
-const KShortcut& KGlobalAccel::shortcut( const TQString& sAction ) const
+const TDEShortcut& TDEGlobalAccel::shortcut( const TQString& sAction ) const
{
- const KAccelAction* pAction = d->KAccelBase::actions().actionPtr( sAction );
- return (pAction) ? pAction->shortcut() : KShortcut::null();
+ const TDEAccelAction* pAction = d->TDEAccelBase::actions().actionPtr( sAction );
+ return (pAction) ? pAction->shortcut() : TDEShortcut::null();
}
-bool KGlobalAccel::setShortcut( const TQString& sAction, const KShortcut& cut )
+bool TDEGlobalAccel::setShortcut( const TQString& sAction, const TDEShortcut& cut )
{ return d->setShortcut( sAction, cut ); }
-bool KGlobalAccel::setSlot( const TQString& sAction, const TQObject* pObjSlot, const char* psMethodSlot )
+bool TDEGlobalAccel::setSlot( const TQString& sAction, const TQObject* pObjSlot, const char* psMethodSlot )
{ return d->setActionSlot( sAction, pObjSlot, psMethodSlot ); }
-TQString KGlobalAccel::label( const TQString& sAction ) const
+TQString TDEGlobalAccel::label( const TQString& sAction ) const
{
- const KAccelAction* pAction = d->KAccelBase::actions().actionPtr( sAction );
+ const TDEAccelAction* pAction = d->TDEAccelBase::actions().actionPtr( sAction );
return (pAction) ? pAction->label() : TQString();
}
-bool KGlobalAccel::setActionEnabled( const TQString& sAction, bool bEnable )
+bool TDEGlobalAccel::setActionEnabled( const TQString& sAction, bool bEnable )
{
return d->setActionEnabled( sAction, bEnable );
}
-const TQString& KGlobalAccel::configGroup() const
+const TQString& TDEGlobalAccel::configGroup() const
{ return d->configGroup(); }
// for tdemultimedia/kmix
-void KGlobalAccel::setConfigGroup( const TQString& s )
+void TDEGlobalAccel::setConfigGroup( const TQString& s )
{ d->setConfigGroup( s ); }
-bool KGlobalAccel::readSettings( KConfigBase* pConfig )
+bool TDEGlobalAccel::readSettings( TDEConfigBase* pConfig )
{ d->readSettings( pConfig ); return true; }
-bool KGlobalAccel::writeSettings( KConfigBase* pConfig ) const
+bool TDEGlobalAccel::writeSettings( TDEConfigBase* pConfig ) const
{ d->writeSettings( pConfig ); return true; }
-bool KGlobalAccel::writeSettings( KConfigBase* pConfig, bool bGlobal ) const
+bool TDEGlobalAccel::writeSettings( TDEConfigBase* pConfig, bool bGlobal ) const
{
d->setConfigGlobal( bGlobal );
d->writeSettings( pConfig );
return true;
}
-bool KGlobalAccel::useFourModifierKeys()
- { return KAccelAction::useFourModifierKeys(); }
+bool TDEGlobalAccel::useFourModifierKeys()
+ { return TDEAccelAction::useFourModifierKeys(); }
-void KGlobalAccel::virtual_hook( int, void* )
+void TDEGlobalAccel::virtual_hook( int, void* )
{ /*BASE::virtual_hook( id, data );*/ }
#include "kglobalaccel.moc"
diff --git a/tdecore/kglobalaccel.h b/tdecore/kglobalaccel.h
index 7fb44a021..a8ed8a955 100644
--- a/tdecore/kglobalaccel.h
+++ b/tdecore/kglobalaccel.h
@@ -21,49 +21,49 @@
#define _KGLOBALACCEL_H_
#include <tqobject.h>
-#include <kshortcut.h>
+#include <tdeshortcut.h>
class TQPopupMenu;
class TQWidget;
-class KAccelAction;
-class KAccelActions;
-class KConfigBase;
+class TDEAccelAction;
+class TDEAccelActions;
+class TDEConfigBase;
-class KGlobalAccelPrivate;
+class TDEGlobalAccelPrivate;
/**
-* KGlobalAccel allows you to have global accelerators that are independent of
-* the focused window. Unlike KAccel it does not matter which window is
+* TDEGlobalAccel allows you to have global accelerators that are independent of
+* the focused window. Unlike TDEAccel it does not matter which window is
* currently active.
*
-* @see KAccel
-* @see KAccelShortcutList
+* @see TDEAccel
+* @see TDEAccelShortcutList
* @see KKeyChooser
* @see KKeyDialog
* @short Configurable global shortcut support
*/
-class TDECORE_EXPORT KGlobalAccel : public TQObject
+class TDECORE_EXPORT TDEGlobalAccel : public TQObject
{
Q_OBJECT
public:
/**
- * Creates a new KGlobalAccel object with the given pParent and
+ * Creates a new TDEGlobalAccel object with the given pParent and
* psName.
* @param pParent the parent of the QObject
* @param psName the name of the QObject
*/
- KGlobalAccel( TQObject* pParent, const char* psName = 0 );
- virtual ~KGlobalAccel();
+ TDEGlobalAccel( TQObject* pParent, const char* psName = 0 );
+ virtual ~TDEGlobalAccel();
/**
* Checks whether the accelerators are enabled.
- * @return true if the KGlobalAccel is enabled
+ * @return true if the TDEGlobalAccel is enabled
*/
bool isEnabled();
/**
- * Enables or disables the KGlobalAccel
- * @param bEnabled true if the KGlobalAccel should be enabled, false if it
+ * Enables or disables the TDEGlobalAccel
+ * @param bEnabled true if the TDEGlobalAccel should be enabled, false if it
* should be disabled.
*/
void setEnabled( bool bEnabled );
@@ -90,8 +90,8 @@ class TDECORE_EXPORT KGlobalAccel : public TQObject
* @param bConfigurable Allow the user to change this shortcut if set to 'true'.
* @param bEnabled The action will be activated by the shortcut if set to 'true'.
*/
- KAccelAction* insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis,
- const KShortcut& cutDef3, const KShortcut& cutDef4,
+ TDEAccelAction* insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis,
+ const TDEShortcut& cutDef3, const TDEShortcut& cutDef4,
const TQObject* pObjSlot, const char* psMethodSlot,
bool bConfigurable = true, bool bEnabled = true );
@@ -108,9 +108,9 @@ class TDECORE_EXPORT KGlobalAccel : public TQObject
* displayed when the user configures shortcuts.
* @param sName of the of the action to insert
* @param sLabel a user-readable (i18n!) name for the action
- * @return the KAccelAction of the action
+ * @return the TDEAccelAction of the action
*/
- KAccelAction* insert( const TQString& sName, const TQString& sLabel );
+ TDEAccelAction* insert( const TQString& sName, const TQString& sLabel );
/**
* Updates the connections of the accelerations after changing them.
@@ -123,14 +123,14 @@ class TDECORE_EXPORT KGlobalAccel : public TQObject
* @param sAction the name of the action
* @return the shortcut. If the action does not exist a null shortcut will be returned.
*/
- const KShortcut& shortcut( const TQString& sAction ) const;
+ const TDEShortcut& shortcut( const TQString& sAction ) const;
/**
* Set the shortcut to be associated with the action named by @p sAction.
* @param sAction the name of the action
* @param shortcut the shortcut for the action
* @return true if successful, false otherwise
*/
- bool setShortcut( const TQString& sAction, const KShortcut &shortcut );
+ bool setShortcut( const TQString& sAction, const TDEShortcut &shortcut );
/**
* Set the slot to be called when the shortcut of the action named
* by @p sAction is pressed.
@@ -157,26 +157,26 @@ class TDECORE_EXPORT KGlobalAccel : public TQObject
/**
* Returns the configuration group that is used to save the accelerators.
* @return the configuration group
- * @see KConfig
+ * @see TDEConfig
*/
const TQString& configGroup() const;
/**
* Sets the configuration group that is used to save the accelerators.
* @param cg the configuration group
- * @see KConfig
+ * @see TDEConfig
*/
void setConfigGroup( const TQString &cg );
/**
* Read all shortcuts from @p pConfig, or (if @p pConfig
* is zero) from the application's configuration file
- * KGlobal::config().
+ * TDEGlobal::config().
* @param pConfig the configuration file to read from, or 0 for the application
* configuration file
* @return true if successful, false otherwise
*/
- bool readSettings( KConfigBase* pConfig = 0 );
+ bool readSettings( TDEConfigBase* pConfig = 0 );
/**
* Write the current shortcuts to @p pConfig,
@@ -187,7 +187,7 @@ class TDECORE_EXPORT KGlobalAccel : public TQObject
* @return true if successful, false otherwise
* @since 3.1
*/
- bool writeSettings( KConfigBase* pConfig = 0 ) const;
+ bool writeSettings( TDEConfigBase* pConfig = 0 ) const;
// BCI: merge these two writeSettings methods in KDE 4.0
/**
* Write the current shortcuts to @p pConfig,
@@ -199,11 +199,11 @@ class TDECORE_EXPORT KGlobalAccel : public TQObject
* @param bGlobal if true write the configuration to the kde global settings
* @return true if successful, false otherwise
*/
- bool writeSettings( KConfigBase* pConfig, bool bGlobal ) const;
+ bool writeSettings( TDEConfigBase* pConfig, bool bGlobal ) const;
/**
* @internal -- this a wrapper function to
- * KAccelActions::useFourModifierKeys().
+ * TDEAccelActions::useFourModifierKeys().
*/
static bool useFourModifierKeys();
@@ -219,21 +219,21 @@ class TDECORE_EXPORT KGlobalAccel : public TQObject
/**
* @internal
*/
- // like setEnabled(), but doesn't ungrab (see in KGlobalAccelPrivate)
+ // like setEnabled(), but doesn't ungrab (see in TDEGlobalAccelPrivate)
void suspend( bool s );
private:
- KAccelActions& actions();
- const KAccelActions& actions() const;
+ TDEAccelActions& actions();
+ const TDEAccelActions& actions() const;
- friend class KGlobalAccelPrivate;
- friend class KAccelShortcutList;
+ friend class TDEGlobalAccelPrivate;
+ friend class TDEAccelShortcutList;
protected:
/** \internal */
virtual void virtual_hook( int id, void* data );
private:
- class KGlobalAccelPrivate* d;
+ class TDEGlobalAccelPrivate* d;
};
#endif // _KGLOBALACCEL_H_
diff --git a/tdecore/kglobalaccel_emb.h b/tdecore/kglobalaccel_emb.h
index 859a53362..5e5145d66 100644
--- a/tdecore/kglobalaccel_emb.h
+++ b/tdecore/kglobalaccel_emb.h
@@ -1,18 +1,18 @@
#ifndef _KGLOBALACCEL_EMB_H
#define _KGLOBALACCEL_EMB_H
-#include "kaccelbase.h"
-#include "kshortcut.h"
+#include "tdeaccelbase.h"
+#include "tdeshortcut.h"
-class KGlobalAccelPrivate
+class TDEGlobalAccelPrivate
{
public:
- KGlobalAccelPrivate();
+ TDEGlobalAccelPrivate();
virtual void setEnabled( bool bEnabled );
- virtual bool connectKey( KAccelAction&, KKeySequence );
- virtual bool disconnectKey( KAccelAction&, KKeySequence );
+ virtual bool connectKey( TDEAccelAction&, KKeySequence );
+ virtual bool disconnectKey( TDEAccelAction&, KKeySequence );
};
#endif // _KGLOBALACCEL_EMB_H
diff --git a/tdecore/kglobalaccel_mac.h b/tdecore/kglobalaccel_mac.h
index 1bed4f3cc..b2803b0c0 100644
--- a/tdecore/kglobalaccel_mac.h
+++ b/tdecore/kglobalaccel_mac.h
@@ -3,14 +3,14 @@
#include <tqwidget.h>
-#include "kshortcut.h"
-#include "kaccelbase.h"
+#include "tdeshortcut.h"
+#include "tdeaccelbase.h"
-class KGlobalAccelPrivate: public KAccelBase
+class TDEGlobalAccelPrivate: public TDEAccelBase
{
public:
- KGlobalAccelPrivate()
- : KAccelBase(KAccelBase::NATIVE_KEYS)
+ TDEGlobalAccelPrivate()
+ : TDEAccelBase(TDEAccelBase::NATIVE_KEYS)
{}
// reimplemented pure virtuals
@@ -18,11 +18,11 @@ public:
{ Q_UNUSED(bEnabled); }
bool emitSignal( Signal signal )
{ Q_UNUSED(signal); return false; }
- bool connectKey( KAccelAction& action, const KKeyServer::Key& key)
+ bool connectKey( TDEAccelAction& action, const KKeyServer::Key& key)
{ Q_UNUSED(action); Q_UNUSED(key); return false; }
bool connectKey( const KKeyServer::Key& key)
{ Q_UNUSED(key); return false; }
- bool disconnectKey( KAccelAction&, const KKeyServer::Key& key)
+ bool disconnectKey( TDEAccelAction&, const KKeyServer::Key& key)
{ Q_UNUSED(key); return false; }
bool disconnectKey( const KKeyServer::Key& )
{ return false; }
diff --git a/tdecore/kglobalaccel_win.cpp b/tdecore/kglobalaccel_win.cpp
index 4323320bc..09c216b99 100644
--- a/tdecore/kglobalaccel_win.cpp
+++ b/tdecore/kglobalaccel_win.cpp
@@ -31,27 +31,27 @@
#include <tqwidget.h>
#include <tqmetaobject.h>
#include <private/qucomextra_p.h>
-#include <kapplication.h>
+#include <tdeapplication.h>
#include <kdebug.h>
#include <kkeynative.h>
//----------------------------------------------------
-static TQValueList< KGlobalAccelPrivate* >* all_accels = 0;
+static TQValueList< TDEGlobalAccelPrivate* >* all_accels = 0;
-KGlobalAccelPrivate::KGlobalAccelPrivate()
-: KAccelBase( KAccelBase::NATIVE_KEYS )
+TDEGlobalAccelPrivate::TDEGlobalAccelPrivate()
+: TDEAccelBase( TDEAccelBase::NATIVE_KEYS )
, m_blocked( false )
, m_blockingDisabled( false )
{
if( all_accels == NULL )
- all_accels = new TQValueList< KGlobalAccelPrivate* >;
+ all_accels = new TQValueList< TDEGlobalAccelPrivate* >;
all_accels->append( this );
m_sConfigGroup = "Global Shortcuts";
// kapp->installX11EventFilter( this );
}
-KGlobalAccelPrivate::~KGlobalAccelPrivate()
+TDEGlobalAccelPrivate::~TDEGlobalAccelPrivate()
{
// TODO: Need to release all grabbed keys if the main window is not shutting down.
//for( CodeModMap::ConstIterator it = m_rgCodeModToAction.begin(); it != m_rgCodeModToAction.end(); ++it ) {
@@ -64,17 +64,17 @@ KGlobalAccelPrivate::~KGlobalAccelPrivate()
}
}
-void KGlobalAccelPrivate::setEnabled( bool bEnable )
+void TDEGlobalAccelPrivate::setEnabled( bool bEnable )
{
m_bEnabled = bEnable;
//updateConnections();
}
-void KGlobalAccelPrivate::blockShortcuts( bool block )
+void TDEGlobalAccelPrivate::blockShortcuts( bool block )
{
if( all_accels == NULL )
return;
- for( TQValueList< KGlobalAccelPrivate* >::ConstIterator it = all_accels->begin();
+ for( TQValueList< TDEGlobalAccelPrivate* >::ConstIterator it = all_accels->begin();
it != all_accels->end();
++it ) {
if( (*it)->m_blockingDisabled )
@@ -84,35 +84,35 @@ void KGlobalAccelPrivate::blockShortcuts( bool block )
}
}
-void KGlobalAccelPrivate::disableBlocking( bool block )
+void TDEGlobalAccelPrivate::disableBlocking( bool block )
{
m_blockingDisabled = block;
}
-bool KGlobalAccelPrivate::isEnabledInternal() const
+bool TDEGlobalAccelPrivate::isEnabledInternal() const
{
- return KAccelBase::isEnabled() && !m_blocked;
+ return TDEAccelBase::isEnabled() && !m_blocked;
}
-bool KGlobalAccelPrivate::emitSignal( Signal )
+bool TDEGlobalAccelPrivate::emitSignal( Signal )
{
return false;
}
-bool KGlobalAccelPrivate::connectKey( KAccelAction& action, const KKeyServer::Key& key )
+bool TDEGlobalAccelPrivate::connectKey( TDEAccelAction& action, const KKeyServer::Key& key )
{ return grabKey( key, true, &action ); }
-bool KGlobalAccelPrivate::connectKey( const KKeyServer::Key& key )
+bool TDEGlobalAccelPrivate::connectKey( const KKeyServer::Key& key )
{ return grabKey( key, true, 0 ); }
-bool KGlobalAccelPrivate::disconnectKey( KAccelAction& action, const KKeyServer::Key& key )
+bool TDEGlobalAccelPrivate::disconnectKey( TDEAccelAction& action, const KKeyServer::Key& key )
{ return grabKey( key, false, &action ); }
-bool KGlobalAccelPrivate::disconnectKey( const KKeyServer::Key& key )
+bool TDEGlobalAccelPrivate::disconnectKey( const KKeyServer::Key& key )
{ return grabKey( key, false, 0 ); }
-bool KGlobalAccelPrivate::grabKey( const KKeyServer::Key& key, bool bGrab, KAccelAction* pAction )
+bool TDEGlobalAccelPrivate::grabKey( const KKeyServer::Key& key, bool bGrab, TDEAccelAction* pAction )
{
/*
if( !key.code() ) {
- kdWarning(125) << "KGlobalAccelPrivate::grabKey( " << key.key().toStringInternal() << ", " << bGrab << ", \"" << (pAction ? pAction->name().latin1() : "(null)") << "\" ): Tried to grab key with null code." << endl;
+ kdWarning(125) << "TDEGlobalAccelPrivate::grabKey( " << key.key().toStringInternal() << ", " << bGrab << ", \"" << (pAction ? pAction->name().latin1() : "(null)") << "\" ): Tried to grab key with null code." << endl;
return false;
}
@@ -190,7 +190,7 @@ bool KGlobalAccelPrivate::grabKey( const KKeyServer::Key& key, bool bGrab, KAcce
return false;
}
-/*bool KGlobalAccelPrivate::x11Event( XEvent* pEvent )
+/*bool TDEGlobalAccelPrivate::x11Event( XEvent* pEvent )
{
//kdDebug(125) << "x11EventFilter( type = " << pEvent->type << " )" << endl;
switch( pEvent->type ) {
@@ -206,9 +206,9 @@ bool KGlobalAccelPrivate::grabKey( const KKeyServer::Key& key, bool bGrab, KAcce
}
}
-void KGlobalAccelPrivate::x11MappingNotify()
+void TDEGlobalAccelPrivate::x11MappingNotify()
{
- kdDebug(125) << "KGlobalAccelPrivate::x11MappingNotify()" << endl;
+ kdDebug(125) << "TDEGlobalAccelPrivate::x11MappingNotify()" << endl;
if( m_bEnabled ) {
// Maybe the X modifier map has been changed.
KKeyServer::initializeMods();
@@ -218,7 +218,7 @@ void KGlobalAccelPrivate::x11MappingNotify()
}
}
-bool KGlobalAccelPrivate::x11KeyPress( const XEvent *pEvent )
+bool TDEGlobalAccelPrivate::x11KeyPress( const XEvent *pEvent )
{
// do not change this line unless you really really know what you are doing (Matthias)
if ( !TQWidget::keyboardGrabber() && !TQApplication::activePopupWidget() ) {
@@ -268,7 +268,7 @@ bool KGlobalAccelPrivate::x11KeyPress( const XEvent *pEvent )
if( !m_rgCodeModToAction.contains( codemod ) ) {
#ifndef NDEBUG
for( CodeModMap::ConstIterator it = m_rgCodeModToAction.begin(); it != m_rgCodeModToAction.end(); ++it ) {
- KAccelAction* pAction = *it;
+ TDEAccelAction* pAction = *it;
kdDebug(125) << "\tcode: " << TQString::number(it.key().code, 16) << " mod: " << TQString::number(it.key().mod, 16)
<< (pAction ? TQString(" name: \"%1\" shortcut: %2").arg(pAction->name()).arg(pAction->shortcut().toStringInternal()) : TQString::null)
<< endl;
@@ -276,7 +276,7 @@ bool KGlobalAccelPrivate::x11KeyPress( const XEvent *pEvent )
#endif
return false;
}
- KAccelAction* pAction = m_rgCodeModToAction[codemod];
+ TDEAccelAction* pAction = m_rgCodeModToAction[codemod];
if( !pAction ) {
static bool recursion_block = false;
@@ -297,9 +297,9 @@ bool KGlobalAccelPrivate::x11KeyPress( const XEvent *pEvent )
return true;
}*/
-void KGlobalAccelPrivate::activate( KAccelAction* pAction, const KKeySequence& seq )
+void TDEGlobalAccelPrivate::activate( TDEAccelAction* pAction, const KKeySequence& seq )
{
- kdDebug(125) << "KGlobalAccelPrivate::activate( \"" << pAction->name() << "\" ) " << endl;
+ kdDebug(125) << "TDEGlobalAccelPrivate::activate( \"" << pAction->name() << "\" ) " << endl;
TQRegExp rexPassIndex( "([ ]*int[ ]*)" );
TQRegExp rexPassInfo( " TQString" );
@@ -333,9 +333,9 @@ void KGlobalAccelPrivate::activate( KAccelAction* pAction, const KKeySequence& s
}
}
-void KGlobalAccelPrivate::slotActivated( int iAction )
+void TDEGlobalAccelPrivate::slotActivated( int iAction )
{
- KAccelAction* pAction = actions().actionPtr( iAction );
+ TDEAccelAction* pAction = actions().actionPtr( iAction );
if( pAction )
activate( pAction, KKeySequence() );
}
diff --git a/tdecore/kglobalaccel_win.h b/tdecore/kglobalaccel_win.h
index 414254881..e60fed8ee 100644
--- a/tdecore/kglobalaccel_win.h
+++ b/tdecore/kglobalaccel_win.h
@@ -23,27 +23,27 @@
#include <tqmap.h>
#include <tqwidget.h>
-#include "kaccelbase.h"
+#include "tdeaccelbase.h"
#include "kkeyserver.h"
-#include "kshortcut.h"
+#include "tdeshortcut.h"
/**
* @internal
*/
-class KGlobalAccelPrivate : public TQWidget, public KAccelBase
+class TDEGlobalAccelPrivate : public TQWidget, public TDEAccelBase
{
- friend class KGlobalAccel;
+ friend class TDEGlobalAccel;
Q_OBJECT
public:
- KGlobalAccelPrivate();
- virtual ~KGlobalAccelPrivate();
+ TDEGlobalAccelPrivate();
+ virtual ~TDEGlobalAccelPrivate();
virtual void setEnabled( bool bEnabled );
virtual bool emitSignal( Signal signal );
- virtual bool connectKey( KAccelAction& action, const KKeyServer::Key& key );
+ virtual bool connectKey( TDEAccelAction& action, const KKeyServer::Key& key );
virtual bool connectKey( const KKeyServer::Key& key );
- virtual bool disconnectKey( KAccelAction& action, const KKeyServer::Key& key );
+ virtual bool disconnectKey( TDEAccelAction& action, const KKeyServer::Key& key );
virtual bool disconnectKey( const KKeyServer::Key& key );
protected:
@@ -51,7 +51,7 @@ class KGlobalAccelPrivate : public TQWidget, public KAccelBase
/**
* @param bGrab Set to true to grab key, false to ungrab key.
*/
- bool grabKey( const KKeyServer::Key&, bool bGrab, KAccelAction* );
+ bool grabKey( const KKeyServer::Key&, bool bGrab, TDEAccelAction* );
/**
* Filters X11 events ev for key bindings in the accelerator dictionary.
@@ -63,7 +63,7 @@ class KGlobalAccelPrivate : public TQWidget, public KAccelBase
// virtual bool x11Event( XEvent* );
// void x11MappingNotify();
// bool x11KeyPress( const XEvent *pEvent );
- void activate( KAccelAction* pAction, const KKeySequence& seq );
+ void activate( TDEAccelAction* pAction, const KKeySequence& seq );
virtual bool isEnabledInternal() const;
static void blockShortcuts( bool block );
void disableBlocking( bool disable );
diff --git a/tdecore/kglobalaccel_x11.cpp b/tdecore/kglobalaccel_x11.cpp
index 260bc39e1..2a67c73b5 100644
--- a/tdecore/kglobalaccel_x11.cpp
+++ b/tdecore/kglobalaccel_x11.cpp
@@ -31,7 +31,7 @@
#include <tqwidget.h>
#include <tqmetaobject.h>
#include <tqucomextra_p.h>
-#include <kapplication.h>
+#include <tdeapplication.h>
#include <kdebug.h>
#include <kkeynative.h>
@@ -77,23 +77,23 @@ static void calculateGrabMasks()
//----------------------------------------------------
-static TQValueList< KGlobalAccelPrivate* >* all_accels = 0;
+static TQValueList< TDEGlobalAccelPrivate* >* all_accels = 0;
-KGlobalAccelPrivate::KGlobalAccelPrivate()
-: KAccelBase( KAccelBase::NATIVE_KEYS )
+TDEGlobalAccelPrivate::TDEGlobalAccelPrivate()
+: TDEAccelBase( TDEAccelBase::NATIVE_KEYS )
, m_blocked( false )
, m_blockingDisabled( false )
, m_suspended( false )
{
if( all_accels == NULL )
- all_accels = new TQValueList< KGlobalAccelPrivate* >;
+ all_accels = new TQValueList< TDEGlobalAccelPrivate* >;
all_accels->append( this );
m_sConfigGroup = "Global Shortcuts";
kapp->installX11EventFilter( this );
connect(kapp, TQT_SIGNAL(coreFakeKeyPress(unsigned int)), this, TQT_SLOT(fakeKeyPressed(unsigned int)));
}
-KGlobalAccelPrivate::~KGlobalAccelPrivate()
+TDEGlobalAccelPrivate::~TDEGlobalAccelPrivate()
{
// TODO: Need to release all grabbed keys if the main window is not shutting down.
//for( CodeModMap::ConstIterator it = m_rgCodeModToAction.begin(); it != m_rgCodeModToAction.end(); ++it ) {
@@ -106,17 +106,17 @@ KGlobalAccelPrivate::~KGlobalAccelPrivate()
}
}
-void KGlobalAccelPrivate::setEnabled( bool bEnable )
+void TDEGlobalAccelPrivate::setEnabled( bool bEnable )
{
m_bEnabled = bEnable;
updateConnections();
}
-void KGlobalAccelPrivate::blockShortcuts( bool block )
+void TDEGlobalAccelPrivate::blockShortcuts( bool block )
{
if( all_accels == NULL )
return;
- for( TQValueList< KGlobalAccelPrivate* >::ConstIterator it = all_accels->begin();
+ for( TQValueList< TDEGlobalAccelPrivate* >::ConstIterator it = all_accels->begin();
it != all_accels->end();
++it ) {
if( (*it)->m_blockingDisabled )
@@ -126,41 +126,41 @@ void KGlobalAccelPrivate::blockShortcuts( bool block )
}
}
-void KGlobalAccelPrivate::disableBlocking( bool block )
+void TDEGlobalAccelPrivate::disableBlocking( bool block )
{
m_blockingDisabled = block;
}
-bool KGlobalAccelPrivate::isEnabledInternal() const
+bool TDEGlobalAccelPrivate::isEnabledInternal() const
{
- return KAccelBase::isEnabled() && !m_blocked;
+ return TDEAccelBase::isEnabled() && !m_blocked;
}
// see #117169 - the bug is hard to reproduce, probably somewhere in X, testcase would be probably
// difficult to make, and so on - just don't release the grabs and only ignore the events instead
-void KGlobalAccelPrivate::suspend( bool s )
+void TDEGlobalAccelPrivate::suspend( bool s )
{
m_suspended = s;
}
-bool KGlobalAccelPrivate::emitSignal( Signal )
+bool TDEGlobalAccelPrivate::emitSignal( Signal )
{
return false;
}
-bool KGlobalAccelPrivate::connectKey( KAccelAction& action, const KKeyServer::Key& key )
+bool TDEGlobalAccelPrivate::connectKey( TDEAccelAction& action, const KKeyServer::Key& key )
{ return grabKey( key, true, &action ); }
-bool KGlobalAccelPrivate::connectKey( const KKeyServer::Key& key )
+bool TDEGlobalAccelPrivate::connectKey( const KKeyServer::Key& key )
{ return grabKey( key, true, 0 ); }
-bool KGlobalAccelPrivate::disconnectKey( KAccelAction& action, const KKeyServer::Key& key )
+bool TDEGlobalAccelPrivate::disconnectKey( TDEAccelAction& action, const KKeyServer::Key& key )
{ return grabKey( key, false, &action ); }
-bool KGlobalAccelPrivate::disconnectKey( const KKeyServer::Key& key )
+bool TDEGlobalAccelPrivate::disconnectKey( const KKeyServer::Key& key )
{ return grabKey( key, false, 0 ); }
-bool KGlobalAccelPrivate::grabKey( const KKeyServer::Key& key, bool bGrab, KAccelAction* pAction )
+bool TDEGlobalAccelPrivate::grabKey( const KKeyServer::Key& key, bool bGrab, TDEAccelAction* pAction )
{
if( !key.code() ) {
- kdWarning(125) << "KGlobalAccelPrivate::grabKey( " << key.key().toStringInternal() << ", " << bGrab << ", \"" << (pAction ? pAction->name().latin1() : "(null)") << "\" ): Tried to grab key with null code." << endl;
+ kdWarning(125) << "TDEGlobalAccelPrivate::grabKey( " << key.key().toStringInternal() << ", " << bGrab << ", \"" << (pAction ? pAction->name().latin1() : "(null)") << "\" ): Tried to grab key with null code." << endl;
return false;
}
@@ -245,7 +245,7 @@ bool KGlobalAccelPrivate::grabKey( const KKeyServer::Key& key, bool bGrab, KAcce
return !failed;
}
-bool KGlobalAccelPrivate::x11Event( XEvent* pEvent )
+bool TDEGlobalAccelPrivate::x11Event( XEvent* pEvent )
{
//kdDebug(125) << "x11EventFilter( type = " << pEvent->type << " )" << endl;
switch( pEvent->type ) {
@@ -261,9 +261,9 @@ bool KGlobalAccelPrivate::x11Event( XEvent* pEvent )
}
}
-void KGlobalAccelPrivate::x11MappingNotify()
+void TDEGlobalAccelPrivate::x11MappingNotify()
{
- kdDebug(125) << "KGlobalAccelPrivate::x11MappingNotify()" << endl;
+ kdDebug(125) << "TDEGlobalAccelPrivate::x11MappingNotify()" << endl;
// Maybe the X modifier map has been changed.
KKeyServer::initializeMods();
calculateGrabMasks();
@@ -271,7 +271,7 @@ void KGlobalAccelPrivate::x11MappingNotify()
updateConnections();
}
-void KGlobalAccelPrivate::fakeKeyPressed(unsigned int keyCode) {
+void TDEGlobalAccelPrivate::fakeKeyPressed(unsigned int keyCode) {
CodeMod codemod;
codemod.code = keyCode;
codemod.mod = 0;
@@ -286,7 +286,7 @@ void KGlobalAccelPrivate::fakeKeyPressed(unsigned int keyCode) {
if( !m_rgCodeModToAction.contains( codemod ) ) {
#ifndef NDEBUG
for( CodeModMap::ConstIterator it = m_rgCodeModToAction.begin(); it != m_rgCodeModToAction.end(); ++it ) {
- KAccelAction* pAction = *it;
+ TDEAccelAction* pAction = *it;
kdDebug(125) << "\tcode: " << TQString::number(it.key().code, 16) << " mod: " << TQString::number(it.key().mod, 16)
<< (pAction ? TQString(" name: \"%1\" shortcut: %2").arg(pAction->name()).arg(pAction->shortcut().toStringInternal()) : TQString())
<< endl;
@@ -295,7 +295,7 @@ void KGlobalAccelPrivate::fakeKeyPressed(unsigned int keyCode) {
return;
}
- KAccelAction* pAction = m_rgCodeModToAction[codemod];
+ TDEAccelAction* pAction = m_rgCodeModToAction[codemod];
if( !pAction ) {
static bool recursion_block = false;
@@ -314,7 +314,7 @@ void KGlobalAccelPrivate::fakeKeyPressed(unsigned int keyCode) {
activate( pAction, KKeySequence(key) );
}
-bool KGlobalAccelPrivate::x11KeyPress( const XEvent *pEvent )
+bool TDEGlobalAccelPrivate::x11KeyPress( const XEvent *pEvent )
{
// do not change this line unless you really really know what you are doing (Matthias)
if ( !TQWidget::keyboardGrabber() && !TQApplication::activePopupWidget() ) {
@@ -364,7 +364,7 @@ bool KGlobalAccelPrivate::x11KeyPress( const XEvent *pEvent )
if( !m_rgCodeModToAction.contains( codemod ) ) {
#ifndef NDEBUG
for( CodeModMap::ConstIterator it = m_rgCodeModToAction.begin(); it != m_rgCodeModToAction.end(); ++it ) {
- KAccelAction* pAction = *it;
+ TDEAccelAction* pAction = *it;
kdDebug(125) << "\tcode: " << TQString::number(it.key().code, 16) << " mod: " << TQString::number(it.key().mod, 16)
<< (pAction ? TQString(" name: \"%1\" shortcut: %2").arg(pAction->name()).arg(pAction->shortcut().toStringInternal()) : TQString())
<< endl;
@@ -373,7 +373,7 @@ bool KGlobalAccelPrivate::x11KeyPress( const XEvent *pEvent )
return false;
}
- KAccelAction* pAction = m_rgCodeModToAction[codemod];
+ TDEAccelAction* pAction = m_rgCodeModToAction[codemod];
if( !pAction ) {
static bool recursion_block = false;
@@ -394,9 +394,9 @@ bool KGlobalAccelPrivate::x11KeyPress( const XEvent *pEvent )
return true;
}
-void KGlobalAccelPrivate::activate( KAccelAction* pAction, const KKeySequence& seq )
+void TDEGlobalAccelPrivate::activate( TDEAccelAction* pAction, const KKeySequence& seq )
{
- kdDebug(125) << "KGlobalAccelPrivate::activate( \"" << pAction->name() << "\" ) " << endl;
+ kdDebug(125) << "TDEGlobalAccelPrivate::activate( \"" << pAction->name() << "\" ) " << endl;
TQRegExp rexPassIndex( "([ ]*int[ ]*)" );
TQRegExp rexPassInfo( " TQString" );
@@ -430,9 +430,9 @@ void KGlobalAccelPrivate::activate( KAccelAction* pAction, const KKeySequence& s
}
}
-void KGlobalAccelPrivate::slotActivated( int iAction )
+void TDEGlobalAccelPrivate::slotActivated( int iAction )
{
- KAccelAction* pAction = KAccelBase::actions().actionPtr( iAction );
+ TDEAccelAction* pAction = TDEAccelBase::actions().actionPtr( iAction );
if( pAction )
activate( pAction, KKeySequence() );
}
diff --git a/tdecore/kglobalaccel_x11.h b/tdecore/kglobalaccel_x11.h
index 3022e0d90..b22363926 100644
--- a/tdecore/kglobalaccel_x11.h
+++ b/tdecore/kglobalaccel_x11.h
@@ -23,27 +23,27 @@
#include <tqmap.h>
#include <tqwidget.h>
-#include "kaccelbase.h"
+#include "tdeaccelbase.h"
#include "kkeyserver_x11.h"
-#include "kshortcut.h"
+#include "tdeshortcut.h"
/**
* @internal
*/
-class KGlobalAccelPrivate : public TQWidget, public KAccelBase
+class TDEGlobalAccelPrivate : public TQWidget, public TDEAccelBase
{
- friend class KGlobalAccel;
+ friend class TDEGlobalAccel;
Q_OBJECT
public:
- KGlobalAccelPrivate();
- virtual ~KGlobalAccelPrivate();
+ TDEGlobalAccelPrivate();
+ virtual ~TDEGlobalAccelPrivate();
virtual void setEnabled( bool bEnabled );
virtual bool emitSignal( Signal signal );
- virtual bool connectKey( KAccelAction& action, const KKeyServer::Key& key );
+ virtual bool connectKey( TDEAccelAction& action, const KKeyServer::Key& key );
virtual bool connectKey( const KKeyServer::Key& key );
- virtual bool disconnectKey( KAccelAction& action, const KKeyServer::Key& key );
+ virtual bool disconnectKey( TDEAccelAction& action, const KKeyServer::Key& key );
virtual bool disconnectKey( const KKeyServer::Key& key );
protected:
@@ -73,14 +73,14 @@ class KGlobalAccelPrivate : public TQWidget, public KAccelBase
return false;
}
};
- typedef TQMap<CodeMod, KAccelAction*> CodeModMap;
+ typedef TQMap<CodeMod, TDEAccelAction*> CodeModMap;
CodeModMap m_rgCodeModToAction;
/**
* @param bGrab Set to true to grab key, false to ungrab key.
*/
- bool grabKey( const KKeyServer::Key&, bool bGrab, KAccelAction* );
+ bool grabKey( const KKeyServer::Key&, bool bGrab, TDEAccelAction* );
/**
* Filters X11 events ev for key bindings in the accelerator dictionary.
@@ -92,7 +92,7 @@ class KGlobalAccelPrivate : public TQWidget, public KAccelBase
virtual bool x11Event( XEvent* );
void x11MappingNotify();
bool x11KeyPress( const XEvent *pEvent );
- void activate( KAccelAction* pAction, const KKeySequence& seq );
+ void activate( TDEAccelAction* pAction, const KKeySequence& seq );
virtual bool isEnabledInternal() const;
static void blockShortcuts( bool block );
void disableBlocking( bool disable );
diff --git a/tdecore/kiconeffect.cpp b/tdecore/kiconeffect.cpp
index 7525e6760..c1a4a8ca5 100644
--- a/tdecore/kiconeffect.cpp
+++ b/tdecore/kiconeffect.cpp
@@ -29,9 +29,9 @@
#include <tqrect.h>
#include <kdebug.h>
-#include <kglobal.h>
-#include <kconfig.h>
-#include <kglobalsettings.h>
+#include <tdeglobal.h>
+#include <tdeconfig.h>
+#include <tdeglobalsettings.h>
#include <kicontheme.h>
#include "kiconeffect.h"
@@ -42,28 +42,28 @@ static bool tqt_has_xft=true;
extern bool tqt_use_xrender;
extern bool tqt_has_xft;
#endif
-class KIconEffectPrivate
+class TDEIconEffectPrivate
{
public:
TQString mKey[6][3];
TQColor mColor2[6][3];
};
-KIconEffect::KIconEffect()
+TDEIconEffect::TDEIconEffect()
{
- d = new KIconEffectPrivate;
+ d = new TDEIconEffectPrivate;
init();
}
-KIconEffect::~KIconEffect()
+TDEIconEffect::~TDEIconEffect()
{
delete d;
d = 0L;
}
-void KIconEffect::init()
+void TDEIconEffect::init()
{
- KConfig *config = KGlobal::config();
+ TDEConfig *config = TDEGlobal::config();
int i, j, effect=-1;
TQStringList groups;
@@ -86,7 +86,7 @@ void KIconEffect::init()
TQString _none("none");
TQString _tomonochrome("tomonochrome");
- KConfigGroupSaver cs(config, "default");
+ TDEConfigGroupSaver cs(config, "default");
for (it=groups.begin(), i=0; it!=groups.end(); it++, i++)
{
@@ -137,14 +137,14 @@ void KIconEffect::init()
}
}
-bool KIconEffect::hasEffect(int group, int state) const
+bool TDEIconEffect::hasEffect(int group, int state) const
{
return mEffect[group][state] != NoEffect;
}
-TQString KIconEffect::fingerprint(int group, int state) const
+TQString TDEIconEffect::fingerprint(int group, int state) const
{
- if ( group >= KIcon::LastGroup ) return "";
+ if ( group >= TDEIcon::LastGroup ) return "";
TQString cached = d->mKey[group][state];
if (cached.isEmpty())
{
@@ -172,14 +172,14 @@ TQString KIconEffect::fingerprint(int group, int state) const
return cached;
}
-TQImage KIconEffect::apply(TQImage image, int group, int state) const
+TQImage TDEIconEffect::apply(TQImage image, int group, int state) const
{
- if (state >= KIcon::LastState)
+ if (state >= TDEIcon::LastState)
{
kdDebug(265) << "Illegal icon state: " << state << "\n";
return image;
}
- if (group >= KIcon::LastGroup)
+ if (group >= TDEIcon::LastGroup)
{
kdDebug(265) << "Illegal icon group: " << group << "\n";
return image;
@@ -188,12 +188,12 @@ TQImage KIconEffect::apply(TQImage image, int group, int state) const
mColor[group][state], d->mColor2[group][state], mTrans[group][state]);
}
-TQImage KIconEffect::apply(TQImage image, int effect, float value, const TQColor col, bool trans) const
+TQImage TDEIconEffect::apply(TQImage image, int effect, float value, const TQColor col, bool trans) const
{
- return apply (image, effect, value, col, KGlobalSettings::baseColor(), trans);
+ return apply (image, effect, value, col, TDEGlobalSettings::baseColor(), trans);
}
-TQImage KIconEffect::apply(TQImage image, int effect, float value, const TQColor col, const TQColor col2, bool trans) const
+TQImage TDEIconEffect::apply(TQImage image, int effect, float value, const TQColor col, const TQColor col2, bool trans) const
{
if (effect >= LastEffect )
{
@@ -229,14 +229,14 @@ TQImage KIconEffect::apply(TQImage image, int effect, float value, const TQColor
return image;
}
-TQPixmap KIconEffect::apply(TQPixmap pixmap, int group, int state) const
+TQPixmap TDEIconEffect::apply(TQPixmap pixmap, int group, int state) const
{
- if (state >= KIcon::LastState)
+ if (state >= TDEIcon::LastState)
{
kdDebug(265) << "Illegal icon state: " << state << "\n";
return pixmap;
}
- if (group >= KIcon::LastGroup)
+ if (group >= TDEIcon::LastGroup)
{
kdDebug(265) << "Illegal icon group: " << group << "\n";
return pixmap;
@@ -245,13 +245,13 @@ TQPixmap KIconEffect::apply(TQPixmap pixmap, int group, int state) const
mColor[group][state], d->mColor2[group][state], mTrans[group][state]);
}
-TQPixmap KIconEffect::apply(TQPixmap pixmap, int effect, float value,
+TQPixmap TDEIconEffect::apply(TQPixmap pixmap, int effect, float value,
const TQColor col, bool trans) const
{
- return apply (pixmap, effect, value, col, KGlobalSettings::baseColor(), trans);
+ return apply (pixmap, effect, value, col, TDEGlobalSettings::baseColor(), trans);
}
-TQPixmap KIconEffect::apply(TQPixmap pixmap, int effect, float value,
+TQPixmap TDEIconEffect::apply(TQPixmap pixmap, int effect, float value,
const TQColor col, const TQColor col2, bool trans) const
{
TQPixmap result;
@@ -282,7 +282,7 @@ TQPixmap KIconEffect::apply(TQPixmap pixmap, int effect, float value,
// Taken from KImageEffect. We don't want to link tdecore to tdeui! As long
// as this code is not too big, it doesn't seem much of a problem to me.
-void KIconEffect::toGray(TQImage &img, float value)
+void TDEIconEffect::toGray(TQImage &img, float value)
{
int pixels = (img.depth() > 8) ? img.width()*img.height()
: img.numColors();
@@ -304,7 +304,7 @@ void KIconEffect::toGray(TQImage &img, float value)
}
}
-void KIconEffect::colorize(TQImage &img, const TQColor &col, float value)
+void TDEIconEffect::colorize(TQImage &img, const TQColor &col, float value)
{
int pixels = (img.depth() > 8) ? img.width()*img.height()
: img.numColors();
@@ -345,7 +345,7 @@ void KIconEffect::colorize(TQImage &img, const TQColor &col, float value)
}
}
-void KIconEffect::toMonochrome(TQImage &img, const TQColor &black, const TQColor &white, float value) {
+void TDEIconEffect::toMonochrome(TQImage &img, const TQColor &black, const TQColor &white, float value) {
int pixels = (img.depth() > 8) ? img.width()*img.height() : img.numColors();
unsigned int *data = img.depth() > 8 ? (unsigned int *) img.bits()
: (unsigned int *) img.tqcolorTable();
@@ -395,7 +395,7 @@ void KIconEffect::toMonochrome(TQImage &img, const TQColor &black, const TQColor
}
}
-void KIconEffect::deSaturate(TQImage &img, float value)
+void TDEIconEffect::deSaturate(TQImage &img, float value)
{
int pixels = (img.depth() > 8) ? img.width()*img.height()
: img.numColors();
@@ -413,7 +413,7 @@ void KIconEffect::deSaturate(TQImage &img, float value)
}
}
-void KIconEffect::toGamma(TQImage &img, float value)
+void TDEIconEffect::toGamma(TQImage &img, float value)
{
int pixels = (img.depth() > 8) ? img.width()*img.height()
: img.numColors();
@@ -435,7 +435,7 @@ void KIconEffect::toGamma(TQImage &img, float value)
}
}
-void KIconEffect::semiTransparent(TQImage &img)
+void TDEIconEffect::semiTransparent(TQImage &img)
{
img.setAlphaBuffer(true);
@@ -509,7 +509,7 @@ void KIconEffect::semiTransparent(TQImage &img)
}
}
-void KIconEffect::semiTransparent(TQPixmap &pix)
+void TDEIconEffect::semiTransparent(TQPixmap &pix)
{
if ( tqt_use_xrender && tqt_has_xft )
{
@@ -540,7 +540,7 @@ void KIconEffect::semiTransparent(TQPixmap &pix)
pix.setMask(mask);
}
-TQImage KIconEffect::doublePixels(TQImage src) const
+TQImage TDEIconEffect::doublePixels(TQImage src) const
{
TQImage dst;
if (src.depth() == 1)
@@ -589,7 +589,7 @@ TQImage KIconEffect::doublePixels(TQImage src) const
return dst;
}
-void KIconEffect::overlay(TQImage &src, TQImage &overlay)
+void TDEIconEffect::overlay(TQImage &src, TQImage &overlay)
{
if (src.depth() != overlay.depth())
{
@@ -704,12 +704,12 @@ void KIconEffect::overlay(TQImage &src, TQImage &overlay)
}
void
-KIconEffect::visualActivate(TQWidget * widget, TQRect rect)
+TDEIconEffect::visualActivate(TQWidget * widget, TQRect rect)
{
- if (!KGlobalSettings::visualActivate())
+ if (!TDEGlobalSettings::visualActivate())
return;
- uint actSpeed = KGlobalSettings::visualActivateSpeed();
+ uint actSpeed = TDEGlobalSettings::visualActivateSpeed();
uint actCount = QMIN(rect.width(), rect.height()) / 2;
@@ -772,9 +772,9 @@ KIconEffect::visualActivate(TQWidget * widget, TQRect rect)
}
void
-KIconEffect::visualActivate(TQWidget * widget, TQRect rect, TQPixmap *pixmap)
+TDEIconEffect::visualActivate(TQWidget * widget, TQRect rect, TQPixmap *pixmap)
{
- if (!KGlobalSettings::visualActivate())
+ if (!TDEGlobalSettings::visualActivate())
return;
// Image too big to display smoothly
@@ -783,7 +783,7 @@ KIconEffect::visualActivate(TQWidget * widget, TQRect rect, TQPixmap *pixmap)
return;
}
- uint actSpeed = KGlobalSettings::visualActivateSpeed();
+ uint actSpeed = TDEGlobalSettings::visualActivateSpeed();
uint actCount = TQMIN(rect.width(), rect.height()) / 4;
diff --git a/tdecore/kiconeffect.h b/tdecore/kiconeffect.h
index 299be3d2e..06deb0d4c 100644
--- a/tdecore/kiconeffect.h
+++ b/tdecore/kiconeffect.h
@@ -10,8 +10,8 @@
* exact licensing terms.
*/
-#ifndef __KIconEffect_h_Included__
-#define __KIconEffect_h_Included__
+#ifndef __TDEIconEffect_h_Included__
+#define __TDEIconEffect_h_Included__
#include <tqimage.h>
#include <tqpixmap.h>
@@ -21,7 +21,7 @@
class TQWidget;
-class KIconEffectPrivate;
+class TDEIconEffectPrivate;
/**
* Applies effects to icons.
@@ -29,16 +29,16 @@ class KIconEffectPrivate;
* This class applies effects to icons depending on their state and
* group. For example, it can be used to make all disabled icons
* in a toolbar gray.
- * @see KIcon
+ * @see TDEIcon
*/
-class TDECORE_EXPORT KIconEffect
+class TDECORE_EXPORT TDEIconEffect
{
public:
/**
- * Create a new KIconEffect.
+ * Create a new TDEIconEffect.
*/
- KIconEffect();
- ~KIconEffect();
+ TDEIconEffect();
+ ~TDEIconEffect();
/**
* This is the enumeration of all possible icon effects.
@@ -63,12 +63,12 @@ public:
/**
* Tests whether an effect has been configured for the given icon group.
- * @param group the group to check, see KIcon::Group
- * @param state the state to check, see KIcon::States
+ * @param group the group to check, see TDEIcon::Group
+ * @param state the state to check, see TDEIcon::States
* @returns true if an effect is configured for the given @p group
* in @p state, otherwise false.
- * @see KIcon::Group
- * KIcon::States
+ * @see TDEIcon::Group
+ * TDEIcon::States
*/
bool hasEffect(int group, int state) const;
@@ -76,8 +76,8 @@ public:
* Returns a fingerprint for the effect by encoding
* the given @p group and @p state into a TQString. This
* is useful for caching.
- * @param group the group, see KIcon::Group
- * @param state the state, see KIcon::States
+ * @param group the group, see TDEIcon::Group
+ * @param state the state, see TDEIcon::States
* @return the fingerprint of the given @p group+@p state
*/
TQString fingerprint(int group, int state) const;
@@ -86,8 +86,8 @@ public:
* Applies an effect to an image. The effect to apply depends on the
* @p group and @p state parameters, and is configured by the user.
* @param src The image.
- * @param group The group for the icon, see KIcon::Group
- * @param state The icon's state, see KIcon::States
+ * @param group The group for the icon, see TDEIcon::Group
+ * @param state The icon's state, see TDEIcon::States
* @return An image with the effect applied.
*/
TQImage apply(TQImage src, int group, int state) const;
@@ -95,7 +95,7 @@ public:
/**
* Applies an effect to an image.
* @param src The image.
- * @param effect The effect to apply, one of KIconEffect::Effects.
+ * @param effect The effect to apply, one of TDEIconEffect::Effects.
* @param value Strength of the effect. 0 <= @p value <= 1.
* @param rgb Color parameter for effects that need one.
* @param trans Add Transparency if trans = true.
@@ -111,8 +111,8 @@ public:
/**
* Applies an effect to a pixmap.
* @param src The pixmap.
- * @param group The group for the icon, see KIcon::Group
- * @param state The icon's state, see KIcon::States
+ * @param group The group for the icon, see TDEIcon::Group
+ * @param state The icon's state, see TDEIcon::States
* @return A pixmap with the effect applied.
*/
TQPixmap apply(TQPixmap src, int group, int state) const;
@@ -120,7 +120,7 @@ public:
/**
* Applies an effect to a pixmap.
* @param src The pixmap.
- * @param effect The effect to apply, one of KIconEffect::Effects.
+ * @param effect The effect to apply, one of TDEIconEffect::Effects.
* @param value Strength of the effect. 0 <= @p value <= 1.
* @param rgb Color parameter for effects that need one.
* @param trans Add Transparency if trans = true.
@@ -225,7 +225,7 @@ private:
float mValue[6][3];
TQColor mColor[6][3];
bool mTrans[6][3];
- KIconEffectPrivate *d;
+ TDEIconEffectPrivate *d;
};
#endif
diff --git a/tdecore/kiconloader.cpp b/tdecore/kiconloader.cpp
index d3d8d5239..e81293986 100644
--- a/tdecore/kiconloader.cpp
+++ b/tdecore/kiconloader.cpp
@@ -26,12 +26,12 @@
#include <tqmovie.h>
#include <tqbitmap.h>
-#include <kapplication.h>
+#include <tdeapplication.h>
#include <kipc.h>
#include <kdebug.h>
#include <kstandarddirs.h>
-#include <kglobal.h>
-#include <kconfig.h>
+#include <tdeglobal.h>
+#include <tdeconfig.h>
#include <ksimpleconfig.h>
#include <kinstance.h>
@@ -55,19 +55,19 @@
#include "kiconloader_p.h"
-/*** KIconThemeNode: A node in the icon theme dependancy tree. ***/
+/*** TDEIconThemeNode: A node in the icon theme dependancy tree. ***/
-KIconThemeNode::KIconThemeNode(KIconTheme *_theme)
+TDEIconThemeNode::TDEIconThemeNode(TDEIconTheme *_theme)
{
theme = _theme;
}
-KIconThemeNode::~KIconThemeNode()
+TDEIconThemeNode::~TDEIconThemeNode()
{
delete theme;
}
-void KIconThemeNode::printTree(TQString& dbgString) const
+void TDEIconThemeNode::printTree(TQString& dbgString) const
{
/* This method doesn't have much sense anymore, so maybe it should
be removed in the (near?) future */
@@ -76,30 +76,30 @@ void KIconThemeNode::printTree(TQString& dbgString) const
dbgString += ")";
}
-void KIconThemeNode::queryIcons(TQStringList *result,
- int size, KIcon::Context context) const
+void TDEIconThemeNode::queryIcons(TQStringList *result,
+ int size, TDEIcon::Context context) const
{
// add the icons of this theme to it
*result += theme->queryIcons(size, context);
}
-void KIconThemeNode::queryIconsByContext(TQStringList *result,
- int size, KIcon::Context context) const
+void TDEIconThemeNode::queryIconsByContext(TQStringList *result,
+ int size, TDEIcon::Context context) const
{
// add the icons of this theme to it
*result += theme->queryIconsByContext(size, context);
}
-KIcon KIconThemeNode::findIcon(const TQString& name, int size,
- KIcon::MatchType match) const
+TDEIcon TDEIconThemeNode::findIcon(const TQString& name, int size,
+ TDEIcon::MatchType match) const
{
return theme->iconPath(name, size, match);
}
-/*** KIconGroup: Icon type description. ***/
+/*** TDEIconGroup: Icon type description. ***/
-struct KIconGroup
+struct TDEIconGroup
{
int size;
bool dblPixels;
@@ -108,33 +108,33 @@ struct KIconGroup
#define KICONLOADER_CHECKS
#ifdef KICONLOADER_CHECKS
-// Keep a list of recently created and destroyed KIconLoader instances in order
+// Keep a list of recently created and destroyed TDEIconLoader instances in order
// to detect bugs like #68528.
-struct KIconLoaderDebug
+struct TDEIconLoaderDebug
{
- KIconLoaderDebug( KIconLoader* l, const TQString& a )
+ TDEIconLoaderDebug( TDEIconLoader* l, const TQString& a )
: loader( l ), appname( a ), valid( true )
{}
- KIconLoaderDebug() {}; // this TQValueList feature annoys me
- KIconLoader* loader;
+ TDEIconLoaderDebug() {}; // this TQValueList feature annoys me
+ TDEIconLoader* loader;
TQString appname;
bool valid;
TQString delete_bt;
};
-static TQValueList< KIconLoaderDebug > *kiconloaders;
+static TQValueList< TDEIconLoaderDebug > *kiconloaders;
#endif
-/*** KIconLoader: the icon loader ***/
+/*** TDEIconLoader: the icon loader ***/
-KIconLoader::KIconLoader(const TQString& _appname, KStandardDirs *_dirs)
+TDEIconLoader::TDEIconLoader(const TQString& _appname, TDEStandardDirs *_dirs)
{
#ifdef KICONLOADER_CHECKS
if( kiconloaders == NULL )
- kiconloaders = new TQValueList< KIconLoaderDebug>();
- // check for the (very unlikely case) that new KIconLoader gets allocated
+ kiconloaders = new TQValueList< TDEIconLoaderDebug>();
+ // check for the (very unlikely case) that new TDEIconLoader gets allocated
// at exactly same address like some previous one
- for( TQValueList< KIconLoaderDebug >::Iterator it = kiconloaders->begin();
+ for( TQValueList< TDEIconLoaderDebug >::Iterator it = kiconloaders->begin();
it != kiconloaders->end();
)
{
@@ -143,9 +143,9 @@ KIconLoader::KIconLoader(const TQString& _appname, KStandardDirs *_dirs)
else
++it;
}
- kiconloaders->append( KIconLoaderDebug( this, _appname ));
+ kiconloaders->append( TDEIconLoaderDebug( this, _appname ));
#endif
- d = new KIconLoaderPrivate;
+ d = new TDEIconLoaderPrivate;
d->q = this;
d->mpGroups = 0L;
d->imgDict.setAutoDelete(true);
@@ -159,7 +159,7 @@ KIconLoader::KIconLoader(const TQString& _appname, KStandardDirs *_dirs)
init( _appname, _dirs );
}
-void KIconLoader::reconfigure( const TQString& _appname, KStandardDirs *_dirs )
+void TDEIconLoader::reconfigure( const TQString& _appname, TDEStandardDirs *_dirs )
{
d->links.clear();
d->imgDict.clear();
@@ -171,7 +171,7 @@ void KIconLoader::reconfigure( const TQString& _appname, KStandardDirs *_dirs )
init( _appname, _dirs );
}
-void KIconLoader::init( const TQString& _appname, KStandardDirs *_dirs )
+void TDEIconLoader::init( const TQString& _appname, TDEStandardDirs *_dirs )
{
// If this is unequal to 0, the iconloader is initialized
// successfully.
@@ -184,42 +184,42 @@ void KIconLoader::init( const TQString& _appname, KStandardDirs *_dirs )
if (_dirs)
d->mpDirs = _dirs;
else
- d->mpDirs = KGlobal::dirs();
+ d->mpDirs = TDEGlobal::dirs();
TQString appname = _appname;
if (appname.isEmpty())
- appname = KGlobal::instance()->instanceName();
+ appname = TDEGlobal::instance()->instanceName();
// Add the default theme and its base themes to the theme tree
- KIconTheme *def = new KIconTheme(KIconTheme::current(), appname);
+ TDEIconTheme *def = new TDEIconTheme(TDEIconTheme::current(), appname);
if (!def->isValid())
{
delete def;
// warn, as this is actually a small penalty hit
kdDebug(264) << "Couldn't find current icon theme, falling back to default." << endl;
- def = new KIconTheme(KIconTheme::defaultThemeName(), appname);
+ def = new TDEIconTheme(TDEIconTheme::defaultThemeName(), appname);
if (!def->isValid())
{
kdError(264) << "Error: standard icon theme"
- << " \"" << KIconTheme::defaultThemeName() << "\" "
+ << " \"" << TDEIconTheme::defaultThemeName() << "\" "
<< " not found!" << endl;
d->mpGroups=0L;
return;
}
}
- d->mpThemeRoot = new KIconThemeNode(def);
+ d->mpThemeRoot = new TDEIconThemeNode(def);
d->links.append(d->mpThemeRoot);
- d->mThemesInTree += KIconTheme::current();
+ d->mThemesInTree += TDEIconTheme::current();
addBaseThemes(d->mpThemeRoot, appname);
// These have to match the order in kicontheme.h
static const char * const groups[] = { "Desktop", "Toolbar", "MainToolbar", "Small", "Panel", 0L };
- KConfig *config = KGlobal::config();
- KConfigGroupSaver cs(config, "dummy");
+ TDEConfig *config = TDEGlobal::config();
+ TDEConfigGroupSaver cs(config, "dummy");
// loading config and default sizes
- d->mpGroups = new KIconGroup[(int) KIcon::LastGroup];
- for (KIcon::Group i=KIcon::FirstGroup; i<KIcon::LastGroup; i++)
+ d->mpGroups = new TDEIconGroup[(int) TDEIcon::LastGroup];
+ for (TDEIcon::Group i=TDEIcon::FirstGroup; i<TDEIcon::LastGroup; i++)
{
if (groups[i] == 0L)
break;
@@ -236,10 +236,10 @@ void KIconLoader::init( const TQString& _appname, KStandardDirs *_dirs )
}
// Insert application specific themes at the top.
- d->mpDirs->addResourceType("appicon", KStandardDirs::kde_default("data") +
+ d->mpDirs->addResourceType("appicon", TDEStandardDirs::kde_default("data") +
appname + "/pics/");
// ################## KDE4: consider removing the toolbar directory
- d->mpDirs->addResourceType("appicon", KStandardDirs::kde_default("data") +
+ d->mpDirs->addResourceType("appicon", TDEStandardDirs::kde_default("data") +
appname + "/toolbar/");
// Add legacy icon dirs.
@@ -260,10 +260,10 @@ void KIconLoader::init( const TQString& _appname, KStandardDirs *_dirs )
#endif
}
-KIconLoader::~KIconLoader()
+TDEIconLoader::~TDEIconLoader()
{
#ifdef KICONLOADER_CHECKS
- for( TQValueList< KIconLoaderDebug >::Iterator it = kiconloaders->begin();
+ for( TQValueList< TDEIconLoaderDebug >::Iterator it = kiconloaders->begin();
it != kiconloaders->end();
++it )
{
@@ -282,34 +282,34 @@ KIconLoader::~KIconLoader()
delete d;
}
-void KIconLoader::enableDelayedIconSetLoading( bool enable )
+void TDEIconLoader::enableDelayedIconSetLoading( bool enable )
{
d->delayedLoading = enable;
}
-bool KIconLoader::isDelayedIconSetLoadingEnabled() const
+bool TDEIconLoader::isDelayedIconSetLoadingEnabled() const
{
return d->delayedLoading;
}
-void KIconLoader::addAppDir(const TQString& appname)
+void TDEIconLoader::addAppDir(const TQString& appname)
{
- d->mpDirs->addResourceType("appicon", KStandardDirs::kde_default("data") +
+ d->mpDirs->addResourceType("appicon", TDEStandardDirs::kde_default("data") +
appname + "/pics/");
// ################## KDE4: consider removing the toolbar directory
- d->mpDirs->addResourceType("appicon", KStandardDirs::kde_default("data") +
+ d->mpDirs->addResourceType("appicon", TDEStandardDirs::kde_default("data") +
appname + "/toolbar/");
addAppThemes(appname);
}
-void KIconLoader::addAppThemes(const TQString& appname)
+void TDEIconLoader::addAppThemes(const TQString& appname)
{
- if ( KIconTheme::current() != KIconTheme::defaultThemeName() )
+ if ( TDEIconTheme::current() != TDEIconTheme::defaultThemeName() )
{
- KIconTheme *def = new KIconTheme(KIconTheme::current(), appname);
+ TDEIconTheme *def = new TDEIconTheme(TDEIconTheme::current(), appname);
if (def->isValid())
{
- KIconThemeNode* node = new KIconThemeNode(def);
+ TDEIconThemeNode* node = new TDEIconThemeNode(def);
d->links.append(node);
addBaseThemes(node, appname);
}
@@ -317,13 +317,13 @@ void KIconLoader::addAppThemes(const TQString& appname)
delete def;
}
- KIconTheme *def = new KIconTheme(KIconTheme::defaultThemeName(), appname);
- KIconThemeNode* node = new KIconThemeNode(def);
+ TDEIconTheme *def = new TDEIconTheme(TDEIconTheme::defaultThemeName(), appname);
+ TDEIconThemeNode* node = new TDEIconThemeNode(def);
d->links.append(node);
addBaseThemes(node, appname);
}
-void KIconLoader::addBaseThemes(KIconThemeNode *node, const TQString &appname)
+void TDEIconLoader::addBaseThemes(TDEIconThemeNode *node, const TQString &appname)
{
TQStringList lst = node->theme->inherits();
TQStringList::ConstIterator it;
@@ -332,24 +332,24 @@ void KIconLoader::addBaseThemes(KIconThemeNode *node, const TQString &appname)
{
if( d->mThemesInTree.contains(*it) && (*it) != "hicolor")
continue;
- KIconTheme *theme = new KIconTheme(*it,appname);
+ TDEIconTheme *theme = new TDEIconTheme(*it,appname);
if (!theme->isValid()) {
delete theme;
continue;
}
- KIconThemeNode *n = new KIconThemeNode(theme);
+ TDEIconThemeNode *n = new TDEIconThemeNode(theme);
d->mThemesInTree.append(*it);
d->links.append(n);
addBaseThemes(n, appname);
}
}
-void KIconLoader::addExtraDesktopThemes()
+void TDEIconLoader::addExtraDesktopThemes()
{
if ( d->extraDesktopIconsLoaded ) return;
TQStringList list;
- TQStringList icnlibs = KGlobal::dirs()->resourceDirs("icon");
+ TQStringList icnlibs = TDEGlobal::dirs()->resourceDirs("icon");
TQStringList::ConstIterator it;
char buf[1000];
int r;
@@ -362,8 +362,8 @@ void KIconLoader::addExtraDesktopThemes()
TQStringList::ConstIterator it2;
for (it2=lst.begin(); it2!=lst.end(); ++it2)
{
- if (!KStandardDirs::exists(*it + *it2 + "/index.desktop")
- && !KStandardDirs::exists(*it + *it2 + "/index.theme"))
+ if (!TDEStandardDirs::exists(*it + *it2 + "/index.desktop")
+ && !TDEStandardDirs::exists(*it + *it2 + "/index.theme"))
continue;
r=readlink( TQFile::encodeName(*it + *it2) , buf, sizeof(buf)-1);
if ( r>0 )
@@ -384,8 +384,8 @@ void KIconLoader::addExtraDesktopThemes()
continue;
if ( *it == TQString("default.tde") ) continue;
- KIconTheme *def = new KIconTheme( *it, "" );
- KIconThemeNode* node = new KIconThemeNode(def);
+ TDEIconTheme *def = new TDEIconTheme( *it, "" );
+ TDEIconThemeNode* node = new TDEIconThemeNode(def);
d->mThemesInTree.append(*it);
d->links.append(node);
addBaseThemes(node, "" );
@@ -395,26 +395,26 @@ void KIconLoader::addExtraDesktopThemes()
}
-bool KIconLoader::extraDesktopThemesAdded() const
+bool TDEIconLoader::extraDesktopThemesAdded() const
{
return d->extraDesktopIconsLoaded;
}
-TQString KIconLoader::removeIconExtension(const TQString &name) const
+TQString TDEIconLoader::removeIconExtension(const TQString &name) const
{
int extensionLength=0;
TQString ext = name.right(4);
- static const TQString &png_ext = KGlobal::staticQString(".png");
- static const TQString &xpm_ext = KGlobal::staticQString(".xpm");
+ static const TQString &png_ext = TDEGlobal::staticQString(".png");
+ static const TQString &xpm_ext = TDEGlobal::staticQString(".xpm");
if (ext == png_ext || ext == xpm_ext)
extensionLength=4;
#ifdef HAVE_LIBART
else
{
- static const TQString &svgz_ext = KGlobal::staticQString(".svgz");
- static const TQString &svg_ext = KGlobal::staticQString(".svg");
+ static const TQString &svgz_ext = TDEGlobal::staticQString(".svgz");
+ static const TQString &svg_ext = TDEGlobal::staticQString(".svg");
if (name.right(5) == svgz_ext)
extensionLength=5;
@@ -430,14 +430,14 @@ TQString KIconLoader::removeIconExtension(const TQString &name) const
return name;
}
-TQString KIconLoader::removeIconExtensionInternal(const TQString &name) const
+TQString TDEIconLoader::removeIconExtensionInternal(const TQString &name) const
{
TQString name_noext = removeIconExtension(name);
#ifndef NDEBUG
if (name != name_noext)
{
- kdDebug(264) << "Application " << KGlobal::instance()->instanceName()
+ kdDebug(264) << "Application " << TDEGlobal::instance()->instanceName()
<< " loads icon " << name << " with extension." << endl;
}
#endif
@@ -445,21 +445,21 @@ TQString KIconLoader::removeIconExtensionInternal(const TQString &name) const
return name_noext;
}
-KIcon KIconLoader::findMatchingIcon(const TQString& name, int size) const
+TDEIcon TDEIconLoader::findMatchingIcon(const TQString& name, int size) const
{
- KIcon icon;
+ TDEIcon icon;
const TQString *ext[4];
int count=0;
- static const TQString &png_ext = KGlobal::staticQString(".png");
+ static const TQString &png_ext = TDEGlobal::staticQString(".png");
ext[count++]=&png_ext;
#ifdef HAVE_LIBART
- static const TQString &svgz_ext = KGlobal::staticQString(".svgz");
+ static const TQString &svgz_ext = TDEGlobal::staticQString(".svgz");
ext[count++]=&svgz_ext;
- static const TQString &svg_ext = KGlobal::staticQString(".svg");
+ static const TQString &svg_ext = TDEGlobal::staticQString(".svg");
ext[count++]=&svg_ext;
#endif
- static const TQString &xpm_ext = KGlobal::staticQString(".xpm");
+ static const TQString &xpm_ext = TDEGlobal::staticQString(".xpm");
ext[count++]=&xpm_ext;
/* JRT: To follow the XDG spec, the order in which we look for an
@@ -474,18 +474,18 @@ KIcon KIconLoader::findMatchingIcon(const TQString& name, int size) const
and so on
*/
- for ( KIconThemeNode *themeNode = d->links.first() ; themeNode ;
+ for ( TDEIconThemeNode *themeNode = d->links.first() ; themeNode ;
themeNode = d->links.next() )
{
for (int i = 0 ; i < count ; i++)
{
- icon = themeNode->theme->iconPath(name + *ext[i], size, KIcon::MatchExact);
+ icon = themeNode->theme->iconPath(name + *ext[i], size, TDEIcon::MatchExact);
if (icon.isValid()) goto icon_found ;
}
for (int i = 0 ; i < count ; i++)
{
- icon = themeNode->theme->iconPath(name + *ext[i], size, KIcon::MatchBest);
+ icon = themeNode->theme->iconPath(name + *ext[i], size, TDEIcon::MatchBest);
if (icon.isValid()) goto icon_found;
}
}
@@ -493,11 +493,11 @@ KIcon KIconLoader::findMatchingIcon(const TQString& name, int size) const
return icon;
}
-inline TQString KIconLoader::unknownIconPath( int size ) const
+inline TQString TDEIconLoader::unknownIconPath( int size ) const
{
- static const TQString &str_unknown = KGlobal::staticQString("unknown");
+ static const TQString &str_unknown = TDEGlobal::staticQString("unknown");
- KIcon icon = findMatchingIcon(str_unknown, size);
+ TDEIcon icon = findMatchingIcon(str_unknown, size);
if (!icon.isValid())
{
kdDebug(264) << "Warning: could not find \"Unknown\" icon for size = "
@@ -509,7 +509,7 @@ inline TQString KIconLoader::unknownIconPath( int size ) const
// Finds the absolute path to an icon.
-TQString KIconLoader::iconPath(const TQString& _name, int group_or_size,
+TQString TDEIconLoader::iconPath(const TQString& _name, int group_or_size,
bool canReturnNull) const
{
if (d->mpThemeRoot == 0L)
@@ -521,15 +521,15 @@ TQString KIconLoader::iconPath(const TQString& _name, int group_or_size,
TQString name = removeIconExtensionInternal( _name );
TQString path;
- if (group_or_size == KIcon::User)
+ if (group_or_size == TDEIcon::User)
{
- static const TQString &png_ext = KGlobal::staticQString(".png");
- static const TQString &xpm_ext = KGlobal::staticQString(".xpm");
+ static const TQString &png_ext = TDEGlobal::staticQString(".png");
+ static const TQString &xpm_ext = TDEGlobal::staticQString(".xpm");
path = d->mpDirs->findResource("appicon", name + png_ext);
#ifdef HAVE_LIBART
- static const TQString &svgz_ext = KGlobal::staticQString(".svgz");
- static const TQString &svg_ext = KGlobal::staticQString(".svg");
+ static const TQString &svgz_ext = TDEGlobal::staticQString(".svgz");
+ static const TQString &svg_ext = TDEGlobal::staticQString(".svg");
if (path.isEmpty())
path = d->mpDirs->findResource("appicon", name + svgz_ext);
if (path.isEmpty())
@@ -540,7 +540,7 @@ TQString KIconLoader::iconPath(const TQString& _name, int group_or_size,
return path;
}
- if (group_or_size >= KIcon::LastGroup)
+ if (group_or_size >= TDEIcon::LastGroup)
{
kdDebug(264) << "Illegal icon group: " << group_or_size << endl;
return path;
@@ -559,12 +559,12 @@ TQString KIconLoader::iconPath(const TQString& _name, int group_or_size,
return unknownIconPath(size);
}
- KIcon icon = findMatchingIcon(name, size);
+ TDEIcon icon = findMatchingIcon(name, size);
if (!icon.isValid())
{
// Try "User" group too.
- path = iconPath(name, KIcon::User, true);
+ path = iconPath(name, TDEIcon::User, true);
if (!path.isEmpty() || canReturnNull)
return path;
@@ -576,7 +576,7 @@ TQString KIconLoader::iconPath(const TQString& _name, int group_or_size,
return icon.path;
}
-TQPixmap KIconLoader::loadIcon(const TQString& _name, KIcon::Group group, int size,
+TQPixmap TDEIconLoader::loadIcon(const TQString& _name, TDEIcon::Group group, int size,
int state, TQString *path_store, bool canReturnNull) const
{
TQString name = _name;
@@ -595,10 +595,10 @@ TQPixmap KIconLoader::loadIcon(const TQString& _name, KIcon::Group group, int si
}
if (!TQDir::isRelativePath(name)) absolutePath=true;
- static const TQString &str_unknown = KGlobal::staticQString("unknown");
+ static const TQString &str_unknown = TDEGlobal::staticQString("unknown");
// Special case for "User" icons.
- if (group == KIcon::User)
+ if (group == TDEIcon::User)
{
key = "$kicou_";
key += TQString::number(size); key += '_';
@@ -608,13 +608,13 @@ TQPixmap KIconLoader::loadIcon(const TQString& _name, KIcon::Group group, int si
return pix;
TQString path = (absolutePath) ? name :
- iconPath(name, KIcon::User, canReturnNull);
+ iconPath(name, TDEIcon::User, canReturnNull);
if (path.isEmpty())
{
if (canReturnNull)
return pix;
// We don't know the desired size: use small
- path = iconPath(str_unknown, KIcon::Small, true);
+ path = iconPath(str_unknown, TDEIcon::Small, true);
if (path.isEmpty())
{
kdDebug(264) << "Warning: Cannot find \"unknown\" icon." << endl;
@@ -637,24 +637,24 @@ TQPixmap KIconLoader::loadIcon(const TQString& _name, KIcon::Group group, int si
// Regular case: Check parameters
- if ((group < -1) || (group >= KIcon::LastGroup))
+ if ((group < -1) || (group >= TDEIcon::LastGroup))
{
kdDebug(264) << "Illegal icon group: " << group << endl;
- group = KIcon::Desktop;
+ group = TDEIcon::Desktop;
}
- int overlay = (state & KIcon::OverlayMask);
- state &= ~KIcon::OverlayMask;
- if ((state < 0) || (state >= KIcon::LastState))
+ int overlay = (state & TDEIcon::OverlayMask);
+ state &= ~TDEIcon::OverlayMask;
+ if ((state < 0) || (state >= TDEIcon::LastState))
{
kdDebug(264) << "Illegal icon state: " << state << endl;
- state = KIcon::DefaultState;
+ state = TDEIcon::DefaultState;
}
if (size == 0 && group < 0)
{
kdDebug(264) << "Neither size nor group specified!" << endl;
- group = KIcon::Desktop;
+ group = TDEIcon::Desktop;
}
if (!absolutePath)
@@ -705,11 +705,11 @@ TQPixmap KIconLoader::loadIcon(const TQString& _name, KIcon::Group group, int si
noEffectKey != d->lastImageKey )
{
// No? load it.
- KIcon icon;
+ TDEIcon icon;
if (absolutePath && !favIconOverlay)
{
- icon.context=KIcon::Any;
- icon.type=KIcon::Scalable;
+ icon.context=TDEIcon::Any;
+ icon.type=TDEIcon::Scalable;
icon.path=name;
}
else
@@ -721,7 +721,7 @@ TQPixmap KIconLoader::loadIcon(const TQString& _name, KIcon::Group group, int si
{
// Try "User" icon too. Some apps expect this.
if (!name.isEmpty())
- pix = loadIcon(name, KIcon::User, size, state, path_store, true);
+ pix = loadIcon(name, TDEIcon::User, size, state, path_store, true);
if (!pix.isNull() || canReturnNull) {
TQPixmapCache::insert(key, pix);
return pix;
@@ -789,20 +789,20 @@ TQPixmap KIconLoader::loadIcon(const TQString& _name, KIcon::Group group, int si
if (overlay)
{
TQImage *ovl;
- KIconTheme *theme = d->mpThemeRoot->theme;
- if ((overlay & KIcon::LockOverlay) &&
+ TDEIconTheme *theme = d->mpThemeRoot->theme;
+ if ((overlay & TDEIcon::LockOverlay) &&
((ovl = loadOverlay(theme->lockOverlay(), size)) != 0L))
- KIconEffect::overlay(*img, *ovl);
- if ((overlay & KIcon::LinkOverlay) &&
+ TDEIconEffect::overlay(*img, *ovl);
+ if ((overlay & TDEIcon::LinkOverlay) &&
((ovl = loadOverlay(theme->linkOverlay(), size)) != 0L))
- KIconEffect::overlay(*img, *ovl);
- if ((overlay & KIcon::ZipOverlay) &&
+ TDEIconEffect::overlay(*img, *ovl);
+ if ((overlay & TDEIcon::ZipOverlay) &&
((ovl = loadOverlay(theme->zipOverlay(), size)) != 0L))
- KIconEffect::overlay(*img, *ovl);
- if ((overlay & KIcon::ShareOverlay) &&
+ TDEIconEffect::overlay(*img, *ovl);
+ if ((overlay & TDEIcon::ShareOverlay) &&
((ovl = loadOverlay(theme->shareOverlay(), size)) != 0L))
- KIconEffect::overlay(*img, *ovl);
- if (overlay & KIcon::HiddenOverlay)
+ TDEIconEffect::overlay(*img, *ovl);
+ if (overlay & TDEIcon::HiddenOverlay)
{
if (img->depth() != 32)
*img = img->convertDepth(32);
@@ -816,11 +816,11 @@ TQPixmap KIconLoader::loadIcon(const TQString& _name, KIcon::Group group, int si
}
// Scale the icon and apply effects if necessary
- if (iconType == KIcon::Scalable && size != img->width())
+ if (iconType == TDEIcon::Scalable && size != img->width())
{
*img = img->smoothScale(size, size);
}
- if (iconType == KIcon::Threshold && size != img->width())
+ if (iconType == TDEIcon::Threshold && size != img->width())
{
if ( abs(size-img->width())>iconThreshold )
*img = img->smoothScale(size, size);
@@ -868,14 +868,14 @@ TQPixmap KIconLoader::loadIcon(const TQString& _name, KIcon::Group group, int si
return pix;
}
-TQImage *KIconLoader::loadOverlay(const TQString &name, int size) const
+TQImage *TDEIconLoader::loadOverlay(const TQString &name, int size) const
{
TQString key = name + '_' + TQString::number(size);
TQImage *image = d->imgDict.find(key);
if (image != 0L)
return image;
- KIcon icon = findMatchingIcon(name, size);
+ TDEIcon icon = findMatchingIcon(name, size);
if (!icon.isValid())
{
kdDebug(264) << "Overlay " << name << "not found." << endl;
@@ -892,7 +892,7 @@ TQImage *KIconLoader::loadOverlay(const TQString &name, int size) const
-TQMovie KIconLoader::loadMovie(const TQString& name, KIcon::Group group, int size) const
+TQMovie TDEIconLoader::loadMovie(const TQString& name, TDEIcon::Group group, int size) const
{
TQString file = moviePath( name, group, size );
if (file.isEmpty())
@@ -904,23 +904,23 @@ TQMovie KIconLoader::loadMovie(const TQString& name, KIcon::Group group, int siz
return TQMovie(file);
}
-TQString KIconLoader::moviePath(const TQString& name, KIcon::Group group, int size) const
+TQString TDEIconLoader::moviePath(const TQString& name, TDEIcon::Group group, int size) const
{
if (!d->mpGroups) return TQString::null;
- if ( (group < -1 || group >= KIcon::LastGroup) && group != KIcon::User )
+ if ( (group < -1 || group >= TDEIcon::LastGroup) && group != TDEIcon::User )
{
kdDebug(264) << "Illegal icon group: " << group << endl;
- group = KIcon::Desktop;
+ group = TDEIcon::Desktop;
}
if (size == 0 && group < 0)
{
kdDebug(264) << "Neither size nor group specified!" << endl;
- group = KIcon::Desktop;
+ group = TDEIcon::Desktop;
}
TQString file = name + ".mng";
- if (group == KIcon::User)
+ if (group == TDEIcon::User)
{
file = d->mpDirs->findResource("appicon", file);
}
@@ -929,15 +929,15 @@ TQString KIconLoader::moviePath(const TQString& name, KIcon::Group group, int si
if (size == 0)
size = d->mpGroups[group].size;
- KIcon icon;
+ TDEIcon icon;
- for ( KIconThemeNode *themeNode = d->links.first() ; themeNode ;
+ for ( TDEIconThemeNode *themeNode = d->links.first() ; themeNode ;
themeNode = d->links.next() )
{
- icon = themeNode->theme->iconPath(file, size, KIcon::MatchExact);
+ icon = themeNode->theme->iconPath(file, size, TDEIcon::MatchExact);
if (icon.isValid()) goto icon_found ;
- icon = themeNode->theme->iconPath(file, size, KIcon::MatchBest);
+ icon = themeNode->theme->iconPath(file, size, TDEIcon::MatchBest);
if (icon.isValid()) goto icon_found ;
}
@@ -948,32 +948,32 @@ TQString KIconLoader::moviePath(const TQString& name, KIcon::Group group, int si
}
-TQStringList KIconLoader::loadAnimated(const TQString& name, KIcon::Group group, int size) const
+TQStringList TDEIconLoader::loadAnimated(const TQString& name, TDEIcon::Group group, int size) const
{
TQStringList lst;
if (!d->mpGroups) return lst;
- if ((group < -1) || (group >= KIcon::LastGroup))
+ if ((group < -1) || (group >= TDEIcon::LastGroup))
{
kdDebug(264) << "Illegal icon group: " << group << endl;
- group = KIcon::Desktop;
+ group = TDEIcon::Desktop;
}
if ((size == 0) && (group < 0))
{
kdDebug(264) << "Neither size nor group specified!" << endl;
- group = KIcon::Desktop;
+ group = TDEIcon::Desktop;
}
TQString file = name + "/0001";
- if (group == KIcon::User)
+ if (group == TDEIcon::User)
{
file = d->mpDirs->findResource("appicon", file + ".png");
} else
{
if (size == 0)
size = d->mpGroups[group].size;
- KIcon icon = findMatchingIcon(file, size);
+ TDEIcon icon = findMatchingIcon(file, size);
file = icon.isValid() ? icon.path : TQString::null;
}
@@ -999,17 +999,17 @@ TQStringList KIconLoader::loadAnimated(const TQString& name, KIcon::Group group,
return lst;
}
-KIconTheme *KIconLoader::theme() const
+TDEIconTheme *TDEIconLoader::theme() const
{
if (d->mpThemeRoot) return d->mpThemeRoot->theme;
return 0L;
}
-int KIconLoader::currentSize(KIcon::Group group) const
+int TDEIconLoader::currentSize(TDEIcon::Group group) const
{
if (!d->mpGroups) return -1;
- if (group < 0 || group >= KIcon::LastGroup)
+ if (group < 0 || group >= TDEIcon::LastGroup)
{
kdDebug(264) << "Illegal icon group: " << group << endl;
return -1;
@@ -1017,7 +1017,7 @@ int KIconLoader::currentSize(KIcon::Group group) const
return d->mpGroups[group].size;
}
-TQStringList KIconLoader::queryIconsByDir( const TQString& iconsDir ) const
+TQStringList TDEIconLoader::queryIconsByDir( const TQString& iconsDir ) const
{
TQDir dir(iconsDir);
TQStringList lst = dir.entryList("*.png;*.xpm", TQDir::Files);
@@ -1028,11 +1028,11 @@ TQStringList KIconLoader::queryIconsByDir( const TQString& iconsDir ) const
return result;
}
-TQStringList KIconLoader::queryIconsByContext(int group_or_size,
- KIcon::Context context) const
+TQStringList TDEIconLoader::queryIconsByContext(int group_or_size,
+ TDEIcon::Context context) const
{
TQStringList result;
- if (group_or_size >= KIcon::LastGroup)
+ if (group_or_size >= TDEIcon::LastGroup)
{
kdDebug(264) << "Illegal icon group: " << group_or_size << endl;
return result;
@@ -1043,7 +1043,7 @@ TQStringList KIconLoader::queryIconsByContext(int group_or_size,
else
size = -group_or_size;
- for ( KIconThemeNode *themeNode = d->links.first() ; themeNode ;
+ for ( TDEIconThemeNode *themeNode = d->links.first() ; themeNode ;
themeNode = d->links.next() )
themeNode->queryIconsByContext(&result, size, context);
@@ -1069,10 +1069,10 @@ TQStringList KIconLoader::queryIconsByContext(int group_or_size,
}
-TQStringList KIconLoader::queryIcons(int group_or_size, KIcon::Context context) const
+TQStringList TDEIconLoader::queryIcons(int group_or_size, TDEIcon::Context context) const
{
TQStringList result;
- if (group_or_size >= KIcon::LastGroup)
+ if (group_or_size >= TDEIcon::LastGroup)
{
kdDebug(264) << "Illegal icon group: " << group_or_size << endl;
return result;
@@ -1083,7 +1083,7 @@ TQStringList KIconLoader::queryIcons(int group_or_size, KIcon::Context context)
else
size = -group_or_size;
- for ( KIconThemeNode *themeNode = d->links.first() ; themeNode ;
+ for ( TDEIconThemeNode *themeNode = d->links.first() ; themeNode ;
themeNode = d->links.next() )
themeNode->queryIcons(&result, size, context);
@@ -1108,26 +1108,26 @@ TQStringList KIconLoader::queryIcons(int group_or_size, KIcon::Context context)
return res2;
}
-// used by KIconDialog to find out which contexts to offer in a combobox
-bool KIconLoader::hasContext(KIcon::Context context) const
+// used by TDEIconDialog to find out which contexts to offer in a combobox
+bool TDEIconLoader::hasContext(TDEIcon::Context context) const
{
- for ( KIconThemeNode *themeNode = d->links.first() ; themeNode ;
+ for ( TDEIconThemeNode *themeNode = d->links.first() ; themeNode ;
themeNode = d->links.next() )
if( themeNode->theme->hasContext( context ))
return true;
return false;
}
-KIconEffect * KIconLoader::iconEffect() const
+TDEIconEffect * TDEIconLoader::iconEffect() const
{
return &d->mpEffect;
}
-bool KIconLoader::alphaBlending(KIcon::Group group) const
+bool TDEIconLoader::alphaBlending(TDEIcon::Group group) const
{
if (!d->mpGroups) return false;
- if (group < 0 || group >= KIcon::LastGroup)
+ if (group < 0 || group >= TDEIcon::LastGroup)
{
kdDebug(264) << "Illegal icon group: " << group << endl;
return false;
@@ -1135,103 +1135,103 @@ bool KIconLoader::alphaBlending(KIcon::Group group) const
return d->mpGroups[group].alphaBlending;
}
-TQIconSet KIconLoader::loadIconSet(const TQString& name, KIcon::Group group, int size, bool canReturnNull)
+TQIconSet TDEIconLoader::loadIconSet(const TQString& name, TDEIcon::Group group, int size, bool canReturnNull)
{
return loadIconSet( name, group, size, canReturnNull, true );
}
-TQIconSet KIconLoader::loadIconSet(const TQString& name, KIcon::Group group, int size)
+TQIconSet TDEIconLoader::loadIconSet(const TQString& name, TDEIcon::Group group, int size)
{
return loadIconSet( name, group, size, false );
}
/*** class for delayed icon loading for TQIconSet ***/
-class KIconFactory
+class TDEIconFactory
: public TQIconFactory
{
public:
- KIconFactory( const TQString& iconName_P, KIcon::Group group_P,
- int size_P, KIconLoader* loader_P );
- KIconFactory( const TQString& iconName_P, KIcon::Group group_P,
- int size_P, KIconLoader* loader_P, bool canReturnNull );
+ TDEIconFactory( const TQString& iconName_P, TDEIcon::Group group_P,
+ int size_P, TDEIconLoader* loader_P );
+ TDEIconFactory( const TQString& iconName_P, TDEIcon::Group group_P,
+ int size_P, TDEIconLoader* loader_P, bool canReturnNull );
virtual TQPixmap* createPixmap( const TQIconSet&, TQIconSet::Size, TQIconSet::Mode, TQIconSet::State );
private:
TQString iconName;
- KIcon::Group group;
+ TDEIcon::Group group;
int size;
- KIconLoader* loader;
+ TDEIconLoader* loader;
bool canReturnNull;
};
-TQIconSet KIconLoader::loadIconSet( const TQString& name, KIcon::Group g, int s,
+TQIconSet TDEIconLoader::loadIconSet( const TQString& name, TDEIcon::Group g, int s,
bool canReturnNull, bool immediateExistenceCheck)
{
if ( !d->delayedLoading )
return loadIconSetNonDelayed( name, g, s, canReturnNull );
if (g < -1 || g > 6) {
- kdDebug() << "KIconLoader::loadIconSet " << name << " " << (int)g << " " << s << endl;
+ kdDebug() << "TDEIconLoader::loadIconSet " << name << " " << (int)g << " " << s << endl;
tqDebug("%s", kdBacktrace().latin1());
abort();
}
if(canReturnNull && immediateExistenceCheck)
{ // we need to find out if the icon actually exists
- TQPixmap pm = loadIcon( name, g, s, KIcon::DefaultState, NULL, true );
+ TQPixmap pm = loadIcon( name, g, s, TDEIcon::DefaultState, NULL, true );
if( pm.isNull())
return TQIconSet();
TQIconSet ret( pm );
- ret.installIconFactory( new KIconFactory( name, g, s, this ));
+ ret.installIconFactory( new TDEIconFactory( name, g, s, this ));
return ret;
}
TQIconSet ret;
- ret.installIconFactory( new KIconFactory( name, g, s, this, canReturnNull ));
+ ret.installIconFactory( new TDEIconFactory( name, g, s, this, canReturnNull ));
return ret;
}
-TQIconSet KIconLoader::loadIconSetNonDelayed( const TQString& name,
- KIcon::Group g,
+TQIconSet TDEIconLoader::loadIconSetNonDelayed( const TQString& name,
+ TDEIcon::Group g,
int s, bool canReturnNull )
{
TQIconSet iconset;
- TQPixmap tmp = loadIcon(name, g, s, KIcon::ActiveState, NULL, canReturnNull);
+ TQPixmap tmp = loadIcon(name, g, s, TDEIcon::ActiveState, NULL, canReturnNull);
iconset.setPixmap( tmp, TQIconSet::Small, TQIconSet::Active );
// we don't use QIconSet's resizing anyway
iconset.setPixmap( tmp, TQIconSet::Large, TQIconSet::Active );
- tmp = loadIcon(name, g, s, KIcon::DisabledState, NULL, canReturnNull);
+ tmp = loadIcon(name, g, s, TDEIcon::DisabledState, NULL, canReturnNull);
iconset.setPixmap( tmp, TQIconSet::Small, TQIconSet::Disabled );
iconset.setPixmap( tmp, TQIconSet::Large, TQIconSet::Disabled );
- tmp = loadIcon(name, g, s, KIcon::DefaultState, NULL, canReturnNull);
+ tmp = loadIcon(name, g, s, TDEIcon::DefaultState, NULL, canReturnNull);
iconset.setPixmap( tmp, TQIconSet::Small, TQIconSet::Normal );
iconset.setPixmap( tmp, TQIconSet::Large, TQIconSet::Normal );
return iconset;
}
-KIconFactory::KIconFactory( const TQString& iconName_P, KIcon::Group group_P,
- int size_P, KIconLoader* loader_P )
+TDEIconFactory::TDEIconFactory( const TQString& iconName_P, TDEIcon::Group group_P,
+ int size_P, TDEIconLoader* loader_P )
: iconName( iconName_P ), group( group_P ), size( size_P ), loader( loader_P )
{
canReturnNull = false;
setAutoDelete( true );
}
-KIconFactory::KIconFactory( const TQString& iconName_P, KIcon::Group group_P,
- int size_P, KIconLoader* loader_P, bool canReturnNull_P )
+TDEIconFactory::TDEIconFactory( const TQString& iconName_P, TDEIcon::Group group_P,
+ int size_P, TDEIconLoader* loader_P, bool canReturnNull_P )
: iconName( iconName_P ), group( group_P ), size( size_P ),
loader( loader_P ), canReturnNull( canReturnNull_P)
{
setAutoDelete( true );
}
-TQPixmap* KIconFactory::createPixmap( const TQIconSet&, TQIconSet::Size, TQIconSet::Mode mode_P, TQIconSet::State )
+TQPixmap* TDEIconFactory::createPixmap( const TQIconSet&, TQIconSet::Size, TQIconSet::Mode mode_P, TQIconSet::State )
{
#ifdef KICONLOADER_CHECKS
bool found = false;
- for( TQValueList< KIconLoaderDebug >::Iterator it = kiconloaders->begin();
+ for( TQValueList< TDEIconLoaderDebug >::Iterator it = kiconloaders->begin();
it != kiconloaders->end();
++it )
{
@@ -1241,10 +1241,10 @@ TQPixmap* KIconFactory::createPixmap( const TQIconSet&, TQIconSet::Size, TQIconS
if( !(*it).valid )
{
#ifdef NDEBUG
- loader = KGlobal::iconLoader();
+ loader = TDEGlobal::iconLoader();
iconName = "no_way_man_you_will_get_broken_icon";
#else
- kdWarning() << "Using already destroyed KIconLoader for loading an icon!" << endl;
+ kdWarning() << "Using already destroyed TDEIconLoader for loading an icon!" << endl;
kdWarning() << "Appname:" << (*it).appname << ", icon:" << iconName << endl;
kdWarning() << "Deleted at:" << endl;
kdWarning() << (*it).delete_bt << endl;
@@ -1260,10 +1260,10 @@ TQPixmap* KIconFactory::createPixmap( const TQIconSet&, TQIconSet::Size, TQIconS
if( !found )
{
#ifdef NDEBUG
- loader = KGlobal::iconLoader();
+ loader = TDEGlobal::iconLoader();
iconName = "no_way_man_you_will_get_broken_icon";
#else
- kdWarning() << "Using unknown KIconLoader for loading an icon!" << endl;
+ kdWarning() << "Using unknown TDEIconLoader for loading an icon!" << endl;
kdWarning() << "Icon:" << iconName << endl;
kdWarning() << kdBacktrace() << endl;
abort();
@@ -1271,15 +1271,15 @@ TQPixmap* KIconFactory::createPixmap( const TQIconSet&, TQIconSet::Size, TQIconS
#endif
}
#endif
- // TQIconSet::Mode to KIcon::State conversion
- static const KIcon::States tbl[] = { KIcon::DefaultState, KIcon::DisabledState, KIcon::ActiveState };
- int state = KIcon::DefaultState;
+ // TQIconSet::Mode to TDEIcon::State conversion
+ static const TDEIcon::States tbl[] = { TDEIcon::DefaultState, TDEIcon::DisabledState, TDEIcon::ActiveState };
+ int state = TDEIcon::DefaultState;
if( mode_P <= TQIconSet::Active )
state = tbl[ mode_P ];
- if( group >= 0 && state == KIcon::ActiveState )
+ if( group >= 0 && state == TDEIcon::ActiveState )
{ // active and normal icon are usually the same
- if( loader->iconEffect()->fingerprint(group, KIcon::ActiveState )
- == loader->iconEffect()->fingerprint(group, KIcon::DefaultState ))
+ if( loader->iconEffect()->fingerprint(group, TDEIcon::ActiveState )
+ == loader->iconEffect()->fingerprint(group, TDEIcon::DefaultState ))
return 0; // so let TQIconSet simply duplicate it
}
// ignore passed size
@@ -1291,107 +1291,107 @@ TQPixmap* KIconFactory::createPixmap( const TQIconSet&, TQIconSet::Size, TQIconS
// Easy access functions
TQPixmap DesktopIcon(const TQString& name, int force_size, int state,
- KInstance *instance)
+ TDEInstance *instance)
{
- KIconLoader *loader = instance->iconLoader();
- return loader->loadIcon(name, KIcon::Desktop, force_size, state);
+ TDEIconLoader *loader = instance->iconLoader();
+ return loader->loadIcon(name, TDEIcon::Desktop, force_size, state);
}
-TQPixmap DesktopIcon(const TQString& name, KInstance *instance)
+TQPixmap DesktopIcon(const TQString& name, TDEInstance *instance)
{
- return DesktopIcon(name, 0, KIcon::DefaultState, instance);
+ return DesktopIcon(name, 0, TDEIcon::DefaultState, instance);
}
-TQIconSet DesktopIconSet(const TQString& name, int force_size, KInstance *instance)
+TQIconSet DesktopIconSet(const TQString& name, int force_size, TDEInstance *instance)
{
- KIconLoader *loader = instance->iconLoader();
- return loader->loadIconSet( name, KIcon::Desktop, force_size );
+ TDEIconLoader *loader = instance->iconLoader();
+ return loader->loadIconSet( name, TDEIcon::Desktop, force_size );
}
TQPixmap BarIcon(const TQString& name, int force_size, int state,
- KInstance *instance)
+ TDEInstance *instance)
{
- KIconLoader *loader = instance->iconLoader();
- return loader->loadIcon(name, KIcon::Toolbar, force_size, state);
+ TDEIconLoader *loader = instance->iconLoader();
+ return loader->loadIcon(name, TDEIcon::Toolbar, force_size, state);
}
-TQPixmap BarIcon(const TQString& name, KInstance *instance)
+TQPixmap BarIcon(const TQString& name, TDEInstance *instance)
{
- return BarIcon(name, 0, KIcon::DefaultState, instance);
+ return BarIcon(name, 0, TDEIcon::DefaultState, instance);
}
-TQIconSet BarIconSet(const TQString& name, int force_size, KInstance *instance)
+TQIconSet BarIconSet(const TQString& name, int force_size, TDEInstance *instance)
{
- KIconLoader *loader = instance->iconLoader();
- return loader->loadIconSet( name, KIcon::Toolbar, force_size );
+ TDEIconLoader *loader = instance->iconLoader();
+ return loader->loadIconSet( name, TDEIcon::Toolbar, force_size );
}
TQPixmap SmallIcon(const TQString& name, int force_size, int state,
- KInstance *instance)
+ TDEInstance *instance)
{
- KIconLoader *loader = instance->iconLoader();
- return loader->loadIcon(name, KIcon::Small, force_size, state);
+ TDEIconLoader *loader = instance->iconLoader();
+ return loader->loadIcon(name, TDEIcon::Small, force_size, state);
}
-TQPixmap SmallIcon(const TQString& name, KInstance *instance)
+TQPixmap SmallIcon(const TQString& name, TDEInstance *instance)
{
- return SmallIcon(name, 0, KIcon::DefaultState, instance);
+ return SmallIcon(name, 0, TDEIcon::DefaultState, instance);
}
-TQIconSet SmallIconSet(const TQString& name, int force_size, KInstance *instance)
+TQIconSet SmallIconSet(const TQString& name, int force_size, TDEInstance *instance)
{
- KIconLoader *loader = instance->iconLoader();
- return loader->loadIconSet( name, KIcon::Small, force_size );
+ TDEIconLoader *loader = instance->iconLoader();
+ return loader->loadIconSet( name, TDEIcon::Small, force_size );
}
TQPixmap MainBarIcon(const TQString& name, int force_size, int state,
- KInstance *instance)
+ TDEInstance *instance)
{
- KIconLoader *loader = instance->iconLoader();
- return loader->loadIcon(name, KIcon::MainToolbar, force_size, state);
+ TDEIconLoader *loader = instance->iconLoader();
+ return loader->loadIcon(name, TDEIcon::MainToolbar, force_size, state);
}
-TQPixmap MainBarIcon(const TQString& name, KInstance *instance)
+TQPixmap MainBarIcon(const TQString& name, TDEInstance *instance)
{
- return MainBarIcon(name, 0, KIcon::DefaultState, instance);
+ return MainBarIcon(name, 0, TDEIcon::DefaultState, instance);
}
-TQIconSet MainBarIconSet(const TQString& name, int force_size, KInstance *instance)
+TQIconSet MainBarIconSet(const TQString& name, int force_size, TDEInstance *instance)
{
- KIconLoader *loader = instance->iconLoader();
- return loader->loadIconSet( name, KIcon::MainToolbar, force_size );
+ TDEIconLoader *loader = instance->iconLoader();
+ return loader->loadIconSet( name, TDEIcon::MainToolbar, force_size );
}
-TQPixmap UserIcon(const TQString& name, int state, KInstance *instance)
+TQPixmap UserIcon(const TQString& name, int state, TDEInstance *instance)
{
- KIconLoader *loader = instance->iconLoader();
- return loader->loadIcon(name, KIcon::User, 0, state);
+ TDEIconLoader *loader = instance->iconLoader();
+ return loader->loadIcon(name, TDEIcon::User, 0, state);
}
-TQPixmap UserIcon(const TQString& name, KInstance *instance)
+TQPixmap UserIcon(const TQString& name, TDEInstance *instance)
{
- return UserIcon(name, KIcon::DefaultState, instance);
+ return UserIcon(name, TDEIcon::DefaultState, instance);
}
-TQIconSet UserIconSet(const TQString& name, KInstance *instance)
+TQIconSet UserIconSet(const TQString& name, TDEInstance *instance)
{
- KIconLoader *loader = instance->iconLoader();
- return loader->loadIconSet( name, KIcon::User );
+ TDEIconLoader *loader = instance->iconLoader();
+ return loader->loadIconSet( name, TDEIcon::User );
}
-int IconSize(KIcon::Group group, KInstance *instance)
+int IconSize(TDEIcon::Group group, TDEInstance *instance)
{
- KIconLoader *loader = instance->iconLoader();
+ TDEIconLoader *loader = instance->iconLoader();
return loader->currentSize(group);
}
-TQPixmap KIconLoader::unknown()
+TQPixmap TDEIconLoader::unknown()
{
TQPixmap pix;
if ( TQPixmapCache::find("unknown", pix) )
return pix;
- TQString path = KGlobal::iconLoader()->iconPath("unknown", KIcon::Small, true);
+ TQString path = TDEGlobal::iconLoader()->iconPath("unknown", TDEIcon::Small, true);
if (path.isEmpty())
{
kdDebug(264) << "Warning: Cannot find \"unknown\" icon." << endl;
@@ -1405,7 +1405,7 @@ TQPixmap KIconLoader::unknown()
return pix;
}
-void KIconLoaderPrivate::reconfigure()
+void TDEIconLoaderPrivate::reconfigure()
{
q->reconfigure(appname, mpDirs);
}
diff --git a/tdecore/kiconloader.h b/tdecore/kiconloader.h
index db5a8ff5a..434a3d976 100644
--- a/tdecore/kiconloader.h
+++ b/tdecore/kiconloader.h
@@ -9,8 +9,8 @@
* exact licensing terms.
*/
-#ifndef __KIconLoader_h_Included__
-#define __KIconLoader_h_Included__
+#ifndef __TDEIconLoader_h_Included__
+#define __TDEIconLoader_h_Included__
#include <tqstring.h>
#include <tqpixmap.h>
@@ -18,31 +18,31 @@
// Grmbl, X headers.....
#ifdef Status
-#define KIconLoaderXStatus Status
+#define TDEIconLoaderXStatus Status
#undef Status
#endif
#include <tqmovie.h>
-#ifdef KIconLoaderXStatus
+#ifdef TDEIconLoaderXStatus
#define Status int
-#undef KIconLoaderXStatus
+#undef TDEIconLoaderXStatus
#endif
-#include <kglobal.h>
+#include <tdeglobal.h>
#include <kinstance.h>
#include <kicontheme.h>
-struct KIconGroup;
-class KIconThemeNode;
-class KConfig;
-struct KIconLoaderPrivate;
-class KStandardDirs;
-class KIconEffect;
+struct TDEIconGroup;
+class TDEIconThemeNode;
+class TDEConfig;
+struct TDEIconLoaderPrivate;
+class TDEStandardDirs;
+class TDEIconEffect;
/**
* Iconloader for KDE.
*
- * KIconLoader will load the current icon theme and all its base themes.
+ * TDEIconLoader will load the current icon theme and all its base themes.
* Icons will be searched in any of these themes. Additionally, it caches
* icons and applies effects according the the user's preferences.
*
@@ -55,12 +55,12 @@ class KIconEffect;
*
* The standard groups are defined below.
*
- * @li KIcon::Desktop: Icons in the iconview of konqueror, kdesktop and similar apps.
- * @li KIcon::Toolbar: Icons in toolbars.
- * @li KIcon::MainToolbar: Icons in the main toolbars.
- * @li KIcon::Small: Various small (typical 16x16) places: titlebars, listviews
+ * @li TDEIcon::Desktop: Icons in the iconview of konqueror, kdesktop and similar apps.
+ * @li TDEIcon::Toolbar: Icons in toolbars.
+ * @li TDEIcon::MainToolbar: Icons in the main toolbars.
+ * @li TDEIcon::Small: Various small (typical 16x16) places: titlebars, listviews
* and menu entries.
- * @li KIcon::Panel: Icons in kicker's panel
+ * @li TDEIcon::Panel: Icons in kicker's panel
*
* The icons are stored on disk in an icon theme or in a standalone
* directory. The icon theme directories contain multiple sizes and/or
@@ -74,7 +74,7 @@ class KIconEffect;
* "User".
*
*/
-class TDECORE_EXPORT KIconLoader
+class TDECORE_EXPORT TDEIconLoader
{
public:
@@ -83,21 +83,21 @@ public:
* @param appname Add the data directories of this application to the
* icon search path for the "User" group. The default argument adds the
* directories of the current application.
- * @param dirs the KStandardDirs object to use. If null the global one is used
+ * @param dirs the TDEStandardDirs object to use. If null the global one is used
*
* Usually, you use the default iconloader, which can be accessed via
- * KGlobal::iconLoader(), so you hardly ever have to create an
- * iconloader object yourself. That one is the current KInstance's
- * (typically KApplication's) iconloader.
- * @see KGlobal::iconLoader()
- * @see KInstance::iconLoader()
+ * TDEGlobal::iconLoader(), so you hardly ever have to create an
+ * iconloader object yourself. That one is the current TDEInstance's
+ * (typically TDEApplication's) iconloader.
+ * @see TDEGlobal::iconLoader()
+ * @see TDEInstance::iconLoader()
*/
- KIconLoader(const TQString& appname=TQString::null, KStandardDirs *dirs = 0);
+ TDEIconLoader(const TQString& appname=TQString::null, TDEStandardDirs *dirs = 0);
/**
* Cleanup
*/
- ~KIconLoader();
+ ~TDEIconLoader();
/**
* Adds @p appname to the list of application specific directories.
@@ -116,7 +116,7 @@ public:
* @param group The icon group. This will specify the size of and effects to
* be applied to the icon.
* @param size If nonzero, this overrides the size specified by @p group.
- * See KIcon::StdSizes.
+ * See TDEIcon::StdSizes.
* @param state The icon state: @p DefaultState, @p ActiveState or
* @p DisabledState. Depending on the user's preferences, the iconloader
* may apply a visual effect to hint about its state.
@@ -126,8 +126,8 @@ public:
* @return the TQPixmap. Can be null when not found, depending on
* @p canReturnNull.
*/
- TQPixmap loadIcon(const TQString& name, KIcon::Group group, int size=0,
- int state=KIcon::DefaultState, TQString *path_store=0L,
+ TQPixmap loadIcon(const TQString& name, TDEIcon::Group group, int size=0,
+ int state=TDEIcon::DefaultState, TQString *path_store=0L,
bool canReturnNull=false) const;
/**
@@ -138,7 +138,7 @@ public:
* @param group The icon group. This will specify the size of and effects to
* be applied to the icon.
* @param size If nonzero, this overrides the size specified by @p group.
- * See KIcon::StdSizes.
+ * See TDEIcon::StdSizes.
* @param canReturnNull Can return a null iconset? If false, iconset
* containing the "unknown" pixmap is returned when no appropriate icon has
* been found.
@@ -148,10 +148,10 @@ public:
* @p canReturnNull.
* @since 3.5
*/
- TQIconSet loadIconSet(const TQString& name, KIcon::Group group, int size,
+ TQIconSet loadIconSet(const TQString& name, TDEIcon::Group group, int size,
bool canReturnNull, bool immediateExistenceCheck);
- // KDE4 merge as (const TQString&,KIcon::Group,int=0,bool=false,bool=true);
+ // KDE4 merge as (const TQString&,TDEIcon::Group,int=0,bool=false,bool=true);
/**
* Creates an icon set, that will do on-demand loading of the icon.
* Loading itself is done by calling loadIcon .
@@ -160,7 +160,7 @@ public:
* @param group The icon group. This will specify the size of and effects to
* be applied to the icon.
* @param size If nonzero, this overrides the size specified by @p group.
- * See KIcon::StdSizes.
+ * See TDEIcon::StdSizes.
* @param canReturnNull Can return a null iconset? If false, iconset
* containing the "unknown" pixmap is returned when no appropriate icon has
* been found.
@@ -168,10 +168,10 @@ public:
* @p canReturnNull.
* @since 3.1
*/
- TQIconSet loadIconSet(const TQString& name, KIcon::Group group, int size,
+ TQIconSet loadIconSet(const TQString& name, TDEIcon::Group group, int size,
bool canReturnNull);
- // KDE4 merge as (const TQString&,KIcon::Group,int=0,bool=false,bool=true);
+ // KDE4 merge as (const TQString&,TDEIcon::Group,int=0,bool=false,bool=true);
/**
* Creates an icon set, that will do on-demand loading of the icon.
* Loading itself is done by calling loadIcon .
@@ -180,10 +180,10 @@ public:
* @param group The icon group. This will specify the size of and effects to
* be applied to the icon.
* @param size If nonzero, this overrides the size specified by @p group.
- * See KIcon::StdSizes.
+ * See TDEIcon::StdSizes.
* @return the icon set. Can be null when not found
*/
- TQIconSet loadIconSet(const TQString& name, KIcon::Group group, int size=0);
+ TQIconSet loadIconSet(const TQString& name, TDEIcon::Group group, int size=0);
/**
* Returns the path of an icon.
@@ -193,7 +193,7 @@ public:
* @param group_or_size If positive, search icons whose size is
* specified by the icon group @p group_or_size. If negative, search
* icons whose size is - @p group_or_size.
- * See KIcon::Group and KIcon::StdSizes
+ * See TDEIcon::Group and TDEIcon::StdSizes
* @param canReturnNull Can return a null string? If not, a path to the
* "unknown" icon will be returned.
* @return the path of an icon, can be null or the "unknown" icon when
@@ -207,21 +207,21 @@ public:
* @param name The name of the icon.
* @param group The icon group. See loadIcon().
* @param size Override the default size for @p group.
- * See KIcon::StdSizes.
+ * See TDEIcon::StdSizes.
* @return A TQMovie object. Can be null if not found.
*/
- TQMovie loadMovie(const TQString& name, KIcon::Group group, int size=0) const;
+ TQMovie loadMovie(const TQString& name, TDEIcon::Group group, int size=0) const;
/**
* Returns the path to an animated icon.
* @param name The name of the icon.
* @param group The icon group. See loadIcon().
* @param size Override the default size for @p group.
- * See KIcon::StdSizes.
+ * See TDEIcon::StdSizes.
* @return the full path to the movie, ready to be passed to QMovie's constructor.
* Empty string if not found.
*/
- TQString moviePath(const TQString& name, KIcon::Group group, int size=0) const;
+ TQString moviePath(const TQString& name, TDEIcon::Group group, int size=0) const;
/**
* Loads an animated icon as a series of still frames. If you want to load
@@ -229,11 +229,11 @@ public:
* @param name The name of the icon.
* @param group The icon group. See loadIcon().
* @param size Override the default size for @p group.
- * See KIcon::StdSizes.
+ * See TDEIcon::StdSizes.
* @return A TQStringList containing the absolute path of all the frames
* making up the animation.
*/
- TQStringList loadAnimated(const TQString& name, KIcon::Group group, int size=0) const;
+ TQStringList loadAnimated(const TQString& name, TDEIcon::Group group, int size=0) const;
/**
* Queries all available icons for a specific group, having a specific
@@ -241,30 +241,30 @@ public:
* @param group_or_size If positive, search icons whose size is
* specified by the icon group @p group_or_size. If negative, search
* icons whose size is - @p group_or_size.
- * See KIcon::Group and KIcon::StdSizes
+ * See TDEIcon::Group and TDEIcon::StdSizes
* @param context The icon context.
* @return a list of all icons
*/
- TQStringList queryIcons(int group_or_size, KIcon::Context context=KIcon::Any) const;
+ TQStringList queryIcons(int group_or_size, TDEIcon::Context context=TDEIcon::Any) const;
/**
* Queries all available icons for a specific context.
* @param group_or_size The icon preferred group or size. If available
* at this group or size, those icons will be returned, in other case,
* icons of undefined size will be returned. Positive numbers are groups,
- * negative numbers are negated sizes. See KIcon::Group and
- * KIcon::StdSizes
+ * negative numbers are negated sizes. See TDEIcon::Group and
+ * TDEIcon::StdSizes
* @param context The icon context.
* @return A TQStringList containing the icon names
* available for that context
*/
TQStringList queryIconsByContext(int group_or_size,
- KIcon::Context context=KIcon::Any) const;
+ TDEIcon::Context context=TDEIcon::Any) const;
/**
* @internal
*/
- bool hasContext( KIcon::Context context ) const;
+ bool hasContext( TDEIcon::Context context ) const;
/**
* Returns a list of all icons (*.png or *.xpm extension) in the
@@ -280,28 +280,28 @@ public:
* @param group the group to check.
* @return the current size for an icon group.
*/
- int currentSize(KIcon::Group group) const;
+ int currentSize(TDEIcon::Group group) const;
/**
* Returns a pointer to the current theme. Can be used to query
* available and default sizes for groups.
* @return a pointer to the current theme. 0 if no theme set.
*/
- KIconTheme *theme() const;
+ TDEIconTheme *theme() const;
/**
- * Returns a pointer to the KIconEffect object used by the icon loader.
- * @return the KIconEffect.
+ * Returns a pointer to the TDEIconEffect object used by the icon loader.
+ * @return the TDEIconEffect.
*/
- KIconEffect *iconEffect() const;
+ TDEIconEffect *iconEffect() const;
/**
- * Called by KInstance::newIconLoader to reconfigure the icon loader.
+ * Called by TDEInstance::newIconLoader to reconfigure the icon loader.
* @param _appname the new application name
* @param _dirs the new standard directories. If 0, the directories
- * from KGlobal will be taken.
+ * from TDEGlobal will be taken.
*/
- void reconfigure( const TQString& _appname, KStandardDirs *_dirs );
+ void reconfigure( const TQString& _appname, TDEStandardDirs *_dirs );
/**
* Returns the unknown icon. An icon that is used when no other icon
@@ -317,7 +317,7 @@ public:
* @return true if alpha blending is desired
* @obsolete
*/
- bool alphaBlending( KIcon::Group group ) const;
+ bool alphaBlending( TDEIcon::Group group ) const;
/**
* Adds all the default themes from other desktops at the end of
@@ -344,8 +344,8 @@ public:
* The default is disabled, as the iconloader object must not be
* destroyed before all those iconsets are destroyed.
*
- * (Some broken applications use temporary KIconLoader objects).
- * Every KInstance 's iconloader has this feature enabled.
+ * (Some broken applications use temporary TDEIconLoader objects).
+ * Every TDEInstance 's iconloader has this feature enabled.
*
* @param enable true to enable delayed icon loading, false to disable
* @see isDelayedIconSetLoadingEnabled()
@@ -368,14 +368,14 @@ public:
/**
* @internal
*/
- void init( const TQString& _appname, KStandardDirs *_dirs );
+ void init( const TQString& _appname, TDEStandardDirs *_dirs );
/**
* @internal
* tries to find an icon with the name. It tries some extension and
* match strategies
*/
- KIcon findMatchingIcon(const TQString& name, int size) const;
+ TDEIcon findMatchingIcon(const TQString& name, int size) const;
/**
* @internal
@@ -394,7 +394,7 @@ public:
* below (the fallbacks of the theme) in the tree.
* @internal
*/
- void addBaseThemes(KIconThemeNode *node, const TQString &appname);
+ void addBaseThemes(TDEIconThemeNode *node, const TQString &appname);
/**
* @internal
@@ -434,120 +434,120 @@ public:
/**
* Loads all the different sizes for an iconset.
*/
- TQIconSet loadIconSetNonDelayed( const TQString& name, KIcon::Group group,
+ TQIconSet loadIconSetNonDelayed( const TQString& name, TDEIcon::Group group,
int size, bool canReturnNull );
// @internal the data object
- KIconLoaderPrivate *d;
+ TDEIconLoaderPrivate *d;
};
/**
- * \relates KIconLoader
+ * \relates TDEIconLoader
* Load a desktop icon.
*/
TDECORE_EXPORT TQPixmap DesktopIcon(const TQString& name, int size=0,
- int state=KIcon::DefaultState,
- KInstance *instance=KGlobal::instance());
+ int state=TDEIcon::DefaultState,
+ TDEInstance *instance=TDEGlobal::instance());
/**
- * \relates KIconLoader
+ * \relates TDEIconLoader
* Load a desktop icon.
*/
-TDECORE_EXPORT TQPixmap DesktopIcon(const TQString& name, KInstance *instance);
+TDECORE_EXPORT TQPixmap DesktopIcon(const TQString& name, TDEInstance *instance);
/**
- * \relates KIconLoader
+ * \relates TDEIconLoader
* Load a desktop icon, and apply the necessary effects to get an IconSet.
*/
TDECORE_EXPORT TQIconSet DesktopIconSet(const TQString& name, int size=0,
- KInstance *instance=KGlobal::instance());
+ TDEInstance *instance=TDEGlobal::instance());
/**
- * \relates KIconLoader
+ * \relates TDEIconLoader
* Load a toolbar icon.
*/
-TDECORE_EXPORT TQPixmap BarIcon(const TQString& name, int size=0, int state=KIcon::DefaultState,
- KInstance *instance=KGlobal::instance());
+TDECORE_EXPORT TQPixmap BarIcon(const TQString& name, int size=0, int state=TDEIcon::DefaultState,
+ TDEInstance *instance=TDEGlobal::instance());
/**
- * \relates KIconLoader
+ * \relates TDEIconLoader
* Load a toolbar icon.
*/
-TDECORE_EXPORT TQPixmap BarIcon(const TQString& name, KInstance *instance);
+TDECORE_EXPORT TQPixmap BarIcon(const TQString& name, TDEInstance *instance);
/**
- * \relates KIconLoader
+ * \relates TDEIconLoader
* Load a toolbar icon, and apply the necessary effects to get an IconSet.
*/
TDECORE_EXPORT TQIconSet BarIconSet(const TQString& name, int size=0,
- KInstance *instance=KGlobal::instance());
+ TDEInstance *instance=TDEGlobal::instance());
/**
- * \relates KIconLoader
+ * \relates TDEIconLoader
* Load a small icon.
*/
TDECORE_EXPORT TQPixmap SmallIcon(const TQString& name, int size=0,
- int state=KIcon::DefaultState,
- KInstance *instance=KGlobal::instance());
+ int state=TDEIcon::DefaultState,
+ TDEInstance *instance=TDEGlobal::instance());
/**
- * \relates KIconLoader
+ * \relates TDEIconLoader
* Load a small icon.
*/
-TDECORE_EXPORT TQPixmap SmallIcon(const TQString& name, KInstance *instance);
+TDECORE_EXPORT TQPixmap SmallIcon(const TQString& name, TDEInstance *instance);
/**
- * \relates KIconLoader
+ * \relates TDEIconLoader
* Load a small icon, and apply the necessary effects to get an IconSet.
*/
TDECORE_EXPORT TQIconSet SmallIconSet(const TQString& name, int size=0,
- KInstance *instance=KGlobal::instance());
+ TDEInstance *instance=TDEGlobal::instance());
/**
- * \relates KIconLoader
+ * \relates TDEIconLoader
* Load a main toolbar icon.
*/
TDECORE_EXPORT TQPixmap MainBarIcon(const TQString& name, int size=0,
- int state=KIcon::DefaultState,
- KInstance *instance=KGlobal::instance());
+ int state=TDEIcon::DefaultState,
+ TDEInstance *instance=TDEGlobal::instance());
/**
- * \relates KIconLoader
+ * \relates TDEIconLoader
* Load a main toolbar icon.
*/
-TDECORE_EXPORT TQPixmap MainBarIcon(const TQString& name, KInstance *instance);
+TDECORE_EXPORT TQPixmap MainBarIcon(const TQString& name, TDEInstance *instance);
/**
- * \relates KIconLoader
+ * \relates TDEIconLoader
* Load a main toolbar icon, and apply the effects to get an IconSet.
*/
TDECORE_EXPORT TQIconSet MainBarIconSet(const TQString& name, int size=0,
- KInstance *instance=KGlobal::instance());
+ TDEInstance *instance=TDEGlobal::instance());
/**
- * \relates KIconLoader
+ * \relates TDEIconLoader
* Load a user icon. User icons are searched in $appdir/pics.
*/
-TDECORE_EXPORT TQPixmap UserIcon(const TQString& name, int state=KIcon::DefaultState,
- KInstance *instance=KGlobal::instance());
+TDECORE_EXPORT TQPixmap UserIcon(const TQString& name, int state=TDEIcon::DefaultState,
+ TDEInstance *instance=TDEGlobal::instance());
/**
- * \relates KIconLoader
+ * \relates TDEIconLoader
* Load a user icon. User icons are searched in $appdir/pics.
*/
-TDECORE_EXPORT TQPixmap UserIcon(const TQString& name, KInstance *instance);
+TDECORE_EXPORT TQPixmap UserIcon(const TQString& name, TDEInstance *instance);
/**
- * \relates KIconLoader
+ * \relates TDEIconLoader
* Load a user icon, and apply the effects to get an IconSet.
*/
TDECORE_EXPORT TQIconSet UserIconSet(const TQString& name,
- KInstance *instance=KGlobal::instance());
+ TDEInstance *instance=TDEGlobal::instance());
/**
- * \relates KIconLoader
+ * \relates TDEIconLoader
* Returns the current icon size for a specific group.
*/
-TDECORE_EXPORT int IconSize(KIcon::Group group, KInstance *instance=KGlobal::instance());
+TDECORE_EXPORT int IconSize(TDEIcon::Group group, TDEInstance *instance=TDEGlobal::instance());
-#endif // __KIconLoader_h_Included__
+#endif // __TDEIconLoader_h_Included__
diff --git a/tdecore/kiconloader_p.h b/tdecore/kiconloader_p.h
index 4a7695390..82ff9dbe8 100644
--- a/tdecore/kiconloader_p.h
+++ b/tdecore/kiconloader_p.h
@@ -9,8 +9,8 @@
* exact licensing terms.
*/
-#ifndef __KIconLoader_p_h_Included__
-#define __KIconLoader_p_h_Included__
+#ifndef __TDEIconLoader_p_h_Included__
+#define __TDEIconLoader_p_h_Included__
#include <tqobject.h>
#include <tqstringlist.h>
@@ -19,37 +19,37 @@
#include <kiconeffect.h>
#include <tqdict.h>
-class KIconThemeNode
+class TDEIconThemeNode
{
public:
- KIconThemeNode(KIconTheme *_theme);
- ~KIconThemeNode();
+ TDEIconThemeNode(TDEIconTheme *_theme);
+ ~TDEIconThemeNode();
- void queryIcons(TQStringList *lst, int size, KIcon::Context context) const;
- void queryIconsByContext(TQStringList *lst, int size, KIcon::Context context) const;
- KIcon findIcon(const TQString& name, int size, KIcon::MatchType match) const;
+ void queryIcons(TQStringList *lst, int size, TDEIcon::Context context) const;
+ void queryIconsByContext(TQStringList *lst, int size, TDEIcon::Context context) const;
+ TDEIcon findIcon(const TQString& name, int size, TDEIcon::MatchType match) const;
void printTree(TQString& dbgString) const;
- KIconTheme *theme;
+ TDEIconTheme *theme;
};
-class KIconLoaderPrivate : public TQObject
+class TDEIconLoaderPrivate : public TQObject
{
Q_OBJECT
public:
TQStringList mThemesInTree;
- KIconGroup *mpGroups;
- KIconThemeNode *mpThemeRoot;
- KStandardDirs *mpDirs;
- KIconLoader *q;
- KIconEffect mpEffect;
+ TDEIconGroup *mpGroups;
+ TDEIconThemeNode *mpThemeRoot;
+ TDEStandardDirs *mpDirs;
+ TDEIconLoader *q;
+ TDEIconEffect mpEffect;
TQDict<TQImage> imgDict;
TQImage lastImage; // last loaded image without effect applied
TQString lastImageKey; // key for icon without effect
TQString appname;
- int lastIconType; // see KIcon::type
- int lastIconThreshold; // see KIcon::threshold
- TQPtrList<KIconThemeNode> links;
+ int lastIconType; // see TDEIcon::type
+ int lastIconThreshold; // see TDEIcon::threshold
+ TQPtrList<TDEIconThemeNode> links;
bool extraDesktopIconsLoaded;
bool delayedLoading;
@@ -57,4 +57,4 @@ public slots:
void reconfigure();
};
-#endif // __KIconLoader_p_h_Included__
+#endif // __TDEIconLoader_p_h_Included__
diff --git a/tdecore/kicontheme.cpp b/tdecore/kicontheme.cpp
index d30e254d0..544eefe01 100644
--- a/tdecore/kicontheme.cpp
+++ b/tdecore/kicontheme.cpp
@@ -30,37 +30,37 @@
#include <kdebug.h>
#include <kstandarddirs.h>
-#include <kglobal.h>
-#include <kconfig.h>
+#include <tdeglobal.h>
+#include <tdeconfig.h>
#include <ksimpleconfig.h>
#include <kinstance.h>
#include "kicontheme.h"
-class KIconThemePrivate
+class TDEIconThemePrivate
{
public:
TQString example, screenshot;
TQString linkOverlay, lockOverlay, zipOverlay, shareOverlay;
bool hidden;
- KSharedConfig::Ptr sharedConfig;
+ TDESharedConfig::Ptr sharedConfig;
};
/**
* A subdirectory in an icon theme.
*/
-class KIconThemeDir
+class TDEIconThemeDir
{
public:
- KIconThemeDir(const TQString& dir, const KConfigBase *config);
+ TDEIconThemeDir(const TQString& dir, const TDEConfigBase *config);
bool isValid() const { return mbValid; }
TQString iconPath(const TQString& name) const;
TQStringList iconList() const;
TQString dir() const { return mDir; }
- KIcon::Context context() const { return mContext; }
- KIcon::Type type() const { return mType; }
+ TDEIcon::Context context() const { return mContext; }
+ TDEIcon::Type type() const { return mType; }
int size() const { return mSize; }
int minSize() const { return mMinSize; }
int maxSize() const { return mMaxSize; }
@@ -68,8 +68,8 @@ public:
private:
bool mbValid;
- KIcon::Type mType;
- KIcon::Context mContext;
+ TDEIcon::Type mType;
+ TDEIcon::Context mContext;
int mSize, mMinSize, mMaxSize;
int mThreshold;
@@ -77,11 +77,11 @@ private:
};
-/*** KIconTheme ***/
+/*** TDEIconTheme ***/
-KIconTheme::KIconTheme(const TQString& name, const TQString& appName)
+TDEIconTheme::TDEIconTheme(const TQString& name, const TQString& appName)
{
- d = new KIconThemePrivate;
+ d = new TDEIconThemePrivate;
TQStringList icnlibs;
TQStringList::ConstIterator it, itDir;
@@ -95,7 +95,7 @@ KIconTheme::KIconTheme(const TQString& name, const TQString& appName)
if (!appName.isEmpty() &&
( name == "crystalsvg" || name== "hicolor" || name == "locolor" ) )
{
- icnlibs = KGlobal::dirs()->resourceDirs("data");
+ icnlibs = TDEGlobal::dirs()->resourceDirs("data");
for (it=icnlibs.begin(); it!=icnlibs.end(); ++it)
{
cDir = *it + appName + "/icons/" + name;
@@ -105,19 +105,19 @@ KIconTheme::KIconTheme(const TQString& name, const TQString& appName)
}
// Find the theme description file. These are always global.
- icnlibs = KGlobal::dirs()->resourceDirs("icon");
- icnlibs += KGlobal::dirs()->resourceDirs("xdgdata-icon");
+ icnlibs = TDEGlobal::dirs()->resourceDirs("icon");
+ icnlibs += TDEGlobal::dirs()->resourceDirs("xdgdata-icon");
icnlibs += "/usr/share/pixmaps";
// These are not in the icon spec, but e.g. GNOME puts some icons there anyway.
- icnlibs += KGlobal::dirs()->resourceDirs("xdgdata-pixmap");
+ icnlibs += TDEGlobal::dirs()->resourceDirs("xdgdata-pixmap");
for (it=icnlibs.begin(); it!=icnlibs.end(); ++it)
{
cDir = *it + name + "/";
- if (KStandardDirs::exists(cDir))
+ if (TDEStandardDirs::exists(cDir))
{
themeDirs += cDir;
if (mDir.isEmpty()
- && (KStandardDirs::exists( cDir + "index.desktop") || KStandardDirs::exists( cDir + "index.theme")))
+ && (TDEStandardDirs::exists( cDir + "index.desktop") || TDEStandardDirs::exists( cDir + "index.theme")))
mDir = cDir;
}
}
@@ -136,10 +136,10 @@ KIconTheme::KIconTheme(const TQString& name, const TQString& appName)
fileName = mDir + "index.theme";
mainSection="Icon Theme";
}
- // Use KSharedConfig to avoid parsing the file many times, from each kinstance.
+ // Use TDESharedConfig to avoid parsing the file many times, from each kinstance.
// Need to keep a ref to it to make this useful
- d->sharedConfig = KSharedConfig::openConfig( fileName, true /*readonly*/, false /*useKDEGlobals*/ );
- KConfig& cfg = *d->sharedConfig;
+ d->sharedConfig = TDESharedConfig::openConfig( fileName, true /*readonly*/, false /*useKDEGlobals*/ );
+ TDEConfig& cfg = *d->sharedConfig;
//was: KSimpleConfig cfg(fileName);
cfg.setGroup(mainSection);
@@ -166,9 +166,9 @@ KIconTheme::KIconTheme(const TQString& name, const TQString& appName)
cfg.setGroup(*it);
for (itDir=themeDirs.begin(); itDir!=themeDirs.end(); ++itDir)
{
- if (KStandardDirs::exists(*itDir + *it + "/"))
+ if (TDEStandardDirs::exists(*itDir + *it + "/"))
{
- KIconThemeDir *dir = new KIconThemeDir(*itDir + *it, &cfg);
+ TDEIconThemeDir *dir = new TDEIconThemeDir(*itDir + *it, &cfg);
if (!dir->isValid())
{
kdDebug(264) << "Icon directory " << *itDir << " group " << *it << " not valid.\n";
@@ -183,9 +183,9 @@ KIconTheme::KIconTheme(const TQString& name, const TQString& appName)
// Expand available sizes for scalable icons to their full range
int i;
TQMap<int,TQValueList<int> > scIcons;
- for (KIconThemeDir *dir=mDirs.first(); dir!=0L; dir=mDirs.next())
+ for (TDEIconThemeDir *dir=mDirs.first(); dir!=0L; dir=mDirs.next())
{
- if ((dir->type() == KIcon::Scalable) && !scIcons.contains(dir->size()))
+ if ((dir->type() == TDEIcon::Scalable) && !scIcons.contains(dir->size()))
{
TQValueList<int> lst;
for (i=dir->minSize(); i<=dir->maxSize(); i++)
@@ -219,31 +219,31 @@ KIconTheme::KIconTheme(const TQString& name, const TQString& appName)
}
-KIconTheme::~KIconTheme()
+TDEIconTheme::~TDEIconTheme()
{
delete d;
}
-bool KIconTheme::isValid() const
+bool TDEIconTheme::isValid() const
{
return !mDirs.isEmpty();
}
-bool KIconTheme::isHidden() const
+bool TDEIconTheme::isHidden() const
{
return d->hidden;
}
-TQString KIconTheme::example() const { return d->example; }
-TQString KIconTheme::screenshot() const { return d->screenshot; }
-TQString KIconTheme::linkOverlay() const { return d->linkOverlay; }
-TQString KIconTheme::lockOverlay() const { return d->lockOverlay; }
-TQString KIconTheme::zipOverlay() const { return d->zipOverlay; }
-TQString KIconTheme::shareOverlay() const { return d->shareOverlay; }
+TQString TDEIconTheme::example() const { return d->example; }
+TQString TDEIconTheme::screenshot() const { return d->screenshot; }
+TQString TDEIconTheme::linkOverlay() const { return d->linkOverlay; }
+TQString TDEIconTheme::lockOverlay() const { return d->lockOverlay; }
+TQString TDEIconTheme::zipOverlay() const { return d->zipOverlay; }
+TQString TDEIconTheme::shareOverlay() const { return d->shareOverlay; }
-int KIconTheme::defaultSize(KIcon::Group group) const
+int TDEIconTheme::defaultSize(TDEIcon::Group group) const
{
- if ((group < 0) || (group >= KIcon::LastGroup))
+ if ((group < 0) || (group >= TDEIcon::LastGroup))
{
kdDebug(264) << "Illegal icon group: " << group << "\n";
return -1;
@@ -251,10 +251,10 @@ int KIconTheme::defaultSize(KIcon::Group group) const
return mDefSize[group];
}
-TQValueList<int> KIconTheme::querySizes(KIcon::Group group) const
+TQValueList<int> TDEIconTheme::querySizes(TDEIcon::Group group) const
{
TQValueList<int> empty;
- if ((group < 0) || (group >= KIcon::LastGroup))
+ if ((group < 0) || (group >= TDEIcon::LastGroup))
{
kdDebug(264) << "Illegal icon group: " << group << "\n";
return empty;
@@ -262,32 +262,32 @@ TQValueList<int> KIconTheme::querySizes(KIcon::Group group) const
return mSizes[group];
}
-TQStringList KIconTheme::queryIcons(int size, KIcon::Context context) const
+TQStringList TDEIconTheme::queryIcons(int size, TDEIcon::Context context) const
{
int delta = 1000, dw;
- TQPtrListIterator<KIconThemeDir> dirs(mDirs);
- KIconThemeDir *dir;
+ TQPtrListIterator<TDEIconThemeDir> dirs(mDirs);
+ TDEIconThemeDir *dir;
// Try to find exact match
TQStringList result;
for ( ; dirs.current(); ++dirs)
{
dir = dirs.current();
- if ((context != KIcon::Any) && (context != dir->context()))
+ if ((context != TDEIcon::Any) && (context != dir->context()))
continue;
- if ((dir->type() == KIcon::Fixed) && (dir->size() == size))
+ if ((dir->type() == TDEIcon::Fixed) && (dir->size() == size))
{
result += dir->iconList();
continue;
}
- if ((dir->type() == KIcon::Scalable) &&
+ if ((dir->type() == TDEIcon::Scalable) &&
(size >= dir->minSize()) && (size <= dir->maxSize()))
{
result += dir->iconList();
continue;
}
- if ((dir->type() == KIcon::Threshold) &&
+ if ((dir->type() == TDEIcon::Threshold) &&
(abs(size-dir->size())<dir->threshold()))
result+=dir->iconList();
}
@@ -297,11 +297,11 @@ TQStringList KIconTheme::queryIcons(int size, KIcon::Context context) const
dirs.toFirst();
// Find close match
- KIconThemeDir *best = 0L;
+ TDEIconThemeDir *best = 0L;
for ( ; dirs.current(); ++dirs)
{
dir = dirs.current();
- if ((context != KIcon::Any) && (context != dir->context()))
+ if ((context != TDEIcon::Any) && (context != dir->context()))
continue;
dw = dir->size() - size;
if ((dw > 6) || (abs(dw) >= abs(delta)))
@@ -315,11 +315,11 @@ TQStringList KIconTheme::queryIcons(int size, KIcon::Context context) const
return best->iconList();
}
-TQStringList KIconTheme::queryIconsByContext(int size, KIcon::Context context) const
+TQStringList TDEIconTheme::queryIconsByContext(int size, TDEIcon::Context context) const
{
- TQPtrListIterator<KIconThemeDir> dirs(mDirs);
+ TQPtrListIterator<TDEIconThemeDir> dirs(mDirs);
int dw;
- KIconThemeDir *dir;
+ TDEIconThemeDir *dir;
// We want all the icons for a given context, but we prefer icons
// of size size . Note that this may (will) include duplicate icons
@@ -332,7 +332,7 @@ TQStringList KIconTheme::queryIconsByContext(int size, KIcon::Context context) c
for ( ; dirs.current(); ++dirs)
{
dir = dirs.current();
- if ((context != KIcon::Any) && (context != dir->context()))
+ if ((context != TDEIcon::Any) && (context != dir->context()))
continue;
dw = abs(dir->size() - size);
iconlist[(dw<127)?dw:127]+=dir->iconList();
@@ -344,50 +344,50 @@ TQStringList KIconTheme::queryIconsByContext(int size, KIcon::Context context) c
return iconlistResult;
}
-bool KIconTheme::hasContext(KIcon::Context context) const
+bool TDEIconTheme::hasContext(TDEIcon::Context context) const
{
- TQPtrListIterator<KIconThemeDir> dirs(mDirs);
- KIconThemeDir *dir;
+ TQPtrListIterator<TDEIconThemeDir> dirs(mDirs);
+ TDEIconThemeDir *dir;
for ( ; dirs.current(); ++dirs)
{
dir = dirs.current();
- if ((context == KIcon::Any) || (context == dir->context()))
+ if ((context == TDEIcon::Any) || (context == dir->context()))
return true;
}
return false;
}
-KIcon KIconTheme::iconPath(const TQString& name, int size, KIcon::MatchType match) const
+TDEIcon TDEIconTheme::iconPath(const TQString& name, int size, TDEIcon::MatchType match) const
{
- KIcon icon;
+ TDEIcon icon;
TQString path;
int delta = -1000, dw;
- KIconThemeDir *dir;
+ TDEIconThemeDir *dir;
dw = 1000; // shut up, gcc
- TQPtrListIterator<KIconThemeDir> dirs(mDirs);
+ TQPtrListIterator<TDEIconThemeDir> dirs(mDirs);
for ( ; dirs.current(); ++dirs)
{
dir = dirs.current();
- if (match == KIcon::MatchExact)
+ if (match == TDEIcon::MatchExact)
{
- if ((dir->type() == KIcon::Fixed) && (dir->size() != size))
+ if ((dir->type() == TDEIcon::Fixed) && (dir->size() != size))
continue;
- if ((dir->type() == KIcon::Scalable) &&
+ if ((dir->type() == TDEIcon::Scalable) &&
((size < dir->minSize()) || (size > dir->maxSize())))
continue;
- if ((dir->type() == KIcon::Threshold) &&
+ if ((dir->type() == TDEIcon::Threshold) &&
(abs(dir->size()-size) > dir->threshold()))
continue;
} else
{
// dw < 0 means need to scale up to get an icon of the requested size
- if (dir->type() == KIcon::Fixed)
+ if (dir->type() == TDEIcon::Fixed)
{
dw = dir->size() - size;
- } else if (dir->type() == KIcon::Scalable)
+ } else if (dir->type() == TDEIcon::Scalable)
{
if (size < dir->minSize())
dw = dir->minSize() - size;
@@ -395,7 +395,7 @@ KIcon KIconTheme::iconPath(const TQString& name, int size, KIcon::MatchType matc
dw = dir->maxSize() - size;
else
dw = 0;
- } else if (dir->type() == KIcon::Threshold)
+ } else if (dir->type() == TDEIcon::Threshold)
{
if (size < dir->size() - dir->threshold())
dw = dir->size() - dir->threshold() - size;
@@ -423,7 +423,7 @@ KIcon KIconTheme::iconPath(const TQString& name, int size, KIcon::MatchType matc
icon.context = dir->context();
// if we got in MatchExact that far, we find no better
- if (match == KIcon::MatchExact)
+ if (match == TDEIcon::MatchExact)
return icon;
else
{
@@ -435,21 +435,21 @@ KIcon KIconTheme::iconPath(const TQString& name, int size, KIcon::MatchType matc
}
// static
-TQString *KIconTheme::_theme = 0L;
+TQString *TDEIconTheme::_theme = 0L;
// static
-TQStringList *KIconTheme::_theme_list = 0L;
+TQStringList *TDEIconTheme::_theme_list = 0L;
// static
-TQString KIconTheme::current()
+TQString TDEIconTheme::current()
{
// Static pointer because of unloading problems wrt DSO's.
if (_theme != 0L)
return *_theme;
_theme = new TQString();
- KConfig *config = KGlobal::config();
- KConfigGroupSaver saver(config, "Icons");
+ TDEConfig *config = TDEGlobal::config();
+ TDEConfigGroupSaver saver(config, "Icons");
*_theme = config->readEntry("Theme",defaultThemeName());
if ( *_theme == TQString::fromLatin1("hicolor") ) *_theme = defaultThemeName();
/* if (_theme->isEmpty())
@@ -463,18 +463,18 @@ TQString KIconTheme::current()
}
// static
-TQStringList KIconTheme::list()
+TQStringList TDEIconTheme::list()
{
// Static pointer because of unloading problems wrt DSO's.
if (_theme_list != 0L)
return *_theme_list;
_theme_list = new TQStringList();
- TQStringList icnlibs = KGlobal::dirs()->resourceDirs("icon");
- icnlibs += (KGlobal::dirs()->resourceDirs("xdgdata-icon"));
+ TQStringList icnlibs = TDEGlobal::dirs()->resourceDirs("icon");
+ icnlibs += (TDEGlobal::dirs()->resourceDirs("xdgdata-icon"));
icnlibs += "/usr/share/pixmaps";
// These are not in the icon spec, but e.g. GNOME puts some icons there anyway.
- icnlibs += KGlobal::dirs()->resourceDirs("xdgdata-pixmap");
+ icnlibs += TDEGlobal::dirs()->resourceDirs("xdgdata-pixmap");
TQStringList::ConstIterator it;
for (it=icnlibs.begin(); it!=icnlibs.end(); ++it)
{
@@ -487,9 +487,9 @@ TQStringList KIconTheme::list()
{
if ((*it2 == ".") || (*it2 == "..") || (*it2).startsWith("default.") )
continue;
- if (!KStandardDirs::exists(*it + *it2 + "/index.desktop") && !KStandardDirs::exists(*it + *it2 + "/index.theme"))
+ if (!TDEStandardDirs::exists(*it + *it2 + "/index.desktop") && !TDEStandardDirs::exists(*it + *it2 + "/index.theme"))
continue;
- KIconTheme oink(*it2);
+ TDEIconTheme oink(*it2);
if (!oink.isValid()) continue;
if (!_theme_list->contains(*it2))
@@ -500,7 +500,7 @@ TQStringList KIconTheme::list()
}
// static
-void KIconTheme::reconfigure()
+void TDEIconTheme::reconfigure()
{
delete _theme;
_theme=0L;
@@ -509,75 +509,75 @@ void KIconTheme::reconfigure()
}
// static
-TQString KIconTheme::defaultThemeName()
+TQString TDEIconTheme::defaultThemeName()
{
return TQString::fromLatin1("crystalsvg");
}
-/*** KIconThemeDir ***/
+/*** TDEIconThemeDir ***/
-KIconThemeDir::KIconThemeDir(const TQString& dir, const KConfigBase *config)
+TDEIconThemeDir::TDEIconThemeDir(const TQString& dir, const TDEConfigBase *config)
{
mbValid = false;
mDir = dir;
mSize = config->readNumEntry("Size");
mMinSize = 1; // just set the variables to something
mMaxSize = 50; // meaningful in case someone calls minSize or maxSize
- mType = KIcon::Fixed;
+ mType = TDEIcon::Fixed;
if (mSize == 0)
return;
TQString tmp = config->readEntry("Context");
if (tmp == "Devices")
- mContext = KIcon::Device;
+ mContext = TDEIcon::Device;
else if (tmp == "MimeTypes")
- mContext = KIcon::MimeType;
+ mContext = TDEIcon::MimeType;
else if (tmp == "FileSystems")
- mContext = KIcon::FileSystem;
+ mContext = TDEIcon::FileSystem;
else if (tmp == "Applications")
- mContext = KIcon::Application;
+ mContext = TDEIcon::Application;
else if (tmp == "Actions")
- mContext = KIcon::Action;
+ mContext = TDEIcon::Action;
else if (tmp == "Animations")
- mContext = KIcon::Animation;
+ mContext = TDEIcon::Animation;
else if (tmp == "Categories")
- mContext = KIcon::Category;
+ mContext = TDEIcon::Category;
else if (tmp == "Emblems")
- mContext = KIcon::Emblem;
+ mContext = TDEIcon::Emblem;
else if (tmp == "Emotes")
- mContext = KIcon::Emote;
+ mContext = TDEIcon::Emote;
else if (tmp == "International")
- mContext = KIcon::International;
+ mContext = TDEIcon::International;
else if (tmp == "Places")
- mContext = KIcon::Place;
+ mContext = TDEIcon::Place;
else if (tmp == "Status")
- mContext = KIcon::StatusIcon;
+ mContext = TDEIcon::StatusIcon;
else {
kdDebug(264) << "Invalid Context= line for icon theme: " << mDir << "\n";
return;
}
tmp = config->readEntry("Type");
if (tmp == "Fixed")
- mType = KIcon::Fixed;
+ mType = TDEIcon::Fixed;
else if (tmp == "Scalable")
- mType = KIcon::Scalable;
+ mType = TDEIcon::Scalable;
else if (tmp == "Threshold")
- mType = KIcon::Threshold;
+ mType = TDEIcon::Threshold;
else {
kdDebug(264) << "Invalid Type= line for icon theme: " << mDir << "\n";
return;
}
- if (mType == KIcon::Scalable)
+ if (mType == TDEIcon::Scalable)
{
mMinSize = config->readNumEntry("MinSize", mSize);
mMaxSize = config->readNumEntry("MaxSize", mSize);
- } else if (mType == KIcon::Threshold)
+ } else if (mType == TDEIcon::Threshold)
mThreshold = config->readNumEntry("Threshold", 2);
mbValid = true;
}
-TQString KIconThemeDir::iconPath(const TQString& name) const
+TQString TDEIconThemeDir::iconPath(const TQString& name) const
{
if (!mbValid)
return TQString::null;
@@ -589,7 +589,7 @@ TQString KIconThemeDir::iconPath(const TQString& name) const
return TQString::null;
}
-TQStringList KIconThemeDir::iconList() const
+TQStringList TDEIconThemeDir::iconList() const
{
TQDir dir(mDir);
#ifdef HAVE_LIBART
diff --git a/tdecore/kicontheme.h b/tdecore/kicontheme.h
index 9aa4d8e32..9079eff0c 100644
--- a/tdecore/kicontheme.h
+++ b/tdecore/kicontheme.h
@@ -10,8 +10,8 @@
*
*/
-#ifndef __KIconTheme_h_Included__
-#define __KIconTheme_h_Included__
+#ifndef __TDEIconTheme_h_Included__
+#define __TDEIconTheme_h_Included__
#include <tqstring.h>
#include <tqstringlist.h>
@@ -19,24 +19,24 @@
#include <tqvaluelist.h>
#include "tdelibs_export.h"
-class KConfig;
-class KIconThemeDir;
+class TDEConfig;
+class TDEIconThemeDir;
-class KIconThemePrivate;
+class TDEIconThemePrivate;
-class KIconPrivate;
+class TDEIconPrivate;
/**
- * One icon as found by KIconTheme. Also serves as a namespace containing
+ * One icon as found by TDEIconTheme. Also serves as a namespace containing
* icon related constants.
- * @see KIconEffect
- * @see KIconTheme
- * @see KIconLoader
+ * @see TDEIconEffect
+ * @see TDEIconTheme
+ * @see TDEIconLoader
*/
-class TDECORE_EXPORT KIcon
+class TDECORE_EXPORT TDEIcon
{
public:
- KIcon() { size = 0; }
+ TDEIcon() { size = 0; }
/**
* Return true if this icon is valid, false otherwise.
@@ -81,7 +81,7 @@ public:
};
// if you add a group here, make sure to change the config reading in
- // KIconLoader too
+ // TDEIconLoader too
/**
* The group of the icon.
*/
@@ -173,18 +173,18 @@ public:
TQString path;
private:
- KIconPrivate *d;
+ TDEIconPrivate *d;
};
-inline KIcon::Group& operator++(KIcon::Group& group) { group = static_cast<KIcon::Group>(group+1); return group; }
-inline KIcon::Group operator++(KIcon::Group& group,int) { KIcon::Group ret = group; ++group; return ret; }
+inline TDEIcon::Group& operator++(TDEIcon::Group& group) { group = static_cast<TDEIcon::Group>(group+1); return group; }
+inline TDEIcon::Group operator++(TDEIcon::Group& group,int) { TDEIcon::Group ret = group; ++group; return ret; }
/**
* Class to use/access icon themes in KDE. This class is used by the
* iconloader but can be used by others too.
- * @see KIconLoader
+ * @see TDEIconLoader
*/
-class TDECORE_EXPORT KIconTheme
+class TDECORE_EXPORT TDEIconTheme
{
public:
/**
@@ -193,8 +193,8 @@ public:
* @param appName the name of the application. Can be null. This argument
* allows applications to have themed application icons.
*/
- KIconTheme(const TQString& name, const TQString& appName=TQString::null);
- ~KIconTheme();
+ TDEIconTheme(const TQString& name, const TQString& appName=TQString::null);
+ ~TDEIconTheme();
/**
* The stylized name of the icon theme.
@@ -281,17 +281,17 @@ public:
/**
* The default size of this theme for a certain icon group.
- * @param group The icon group. See KIcon::Group.
+ * @param group The icon group. See TDEIcon::Group.
* @return The default size in pixels for the given icon group.
*/
- int defaultSize(KIcon::Group group) const;
+ int defaultSize(TDEIcon::Group group) const;
/**
* Query available sizes for a group.
- * @param group The icon group. See KIcon::Group.
+ * @param group The icon group. See TDEIcon::Group.
* @return a list of available sized for the given group
*/
- TQValueList<int> querySizes(KIcon::Group group) const;
+ TQValueList<int> querySizes(TDEIcon::Group group) const;
/**
* Query available icons for a size and context.
@@ -299,7 +299,7 @@ public:
* @param context the context of the icons
* @return the list of icon names
*/
- TQStringList queryIcons(int size, KIcon::Context context = KIcon::Any) const;
+ TQStringList queryIcons(int size, TDEIcon::Context context = TDEIcon::Any) const;
/**
* Query available icons for a context and preferred size.
@@ -307,26 +307,26 @@ public:
* @param context the context of the icons
* @return the list of icon names
*/
- TQStringList queryIconsByContext(int size, KIcon::Context context = KIcon::Any) const;
+ TQStringList queryIconsByContext(int size, TDEIcon::Context context = TDEIcon::Any) const;
/**
* Lookup an icon in the theme.
* @param name The name of the icon, without extension.
* @param size The desired size of the icon.
- * @param match The matching mode. KIcon::MatchExact returns an icon
- * only if matches exactly. KIcon::MatchBest returns the best matching
+ * @param match The matching mode. TDEIcon::MatchExact returns an icon
+ * only if matches exactly. TDEIcon::MatchBest returns the best matching
* icon.
- * @return A KIcon class that describes the icon. If an icon is found,
- * @see KIcon::isValid will return true, and false otherwise.
+ * @return A TDEIcon class that describes the icon. If an icon is found,
+ * @see TDEIcon::isValid will return true, and false otherwise.
*/
- KIcon iconPath(const TQString& name, int size, KIcon::MatchType match) const;
+ TDEIcon iconPath(const TQString& name, int size, TDEIcon::MatchType match) const;
/**
* Returns true if the theme has any icons for the given context.
* @since 3.5.5
*/
- bool hasContext( KIcon::Context context ) const;
+ bool hasContext( TDEIcon::Context context ) const;
/**
* List all icon themes installed on the system, global and local.
@@ -359,8 +359,8 @@ private:
int mDepth;
TQString mDir, mName, mDesc;
TQStringList mInherits;
- TQPtrList<KIconThemeDir> mDirs;
- KIconThemePrivate *d;
+ TQPtrList<TDEIconThemeDir> mDirs;
+ TDEIconThemePrivate *d;
static TQString *_theme;
static TQStringList *_theme_list;
diff --git a/tdecore/kinstance.cpp b/tdecore/kinstance.cpp
index 721864e5a..6760c95a0 100644
--- a/tdecore/kinstance.cpp
+++ b/tdecore/kinstance.cpp
@@ -20,16 +20,16 @@
#include <stdlib.h>
#include <unistd.h>
-#include "kconfig.h"
-#include "klocale.h"
+#include "tdeconfig.h"
+#include "tdelocale.h"
#include "kcharsets.h"
#include "kiconloader.h"
#include "tdehardwaredevices.h"
#include "tdenetworkconnections.h"
-#include "kaboutdata.h"
+#include "tdeaboutdata.h"
#include "kstandarddirs.h"
#include "kdebug.h"
-#include "kglobal.h"
+#include "tdeglobal.h"
#include "kmimesourcefactory.h"
#include <tqfont.h>
@@ -38,26 +38,26 @@
#ifndef NDEBUG
#include <assert.h>
#include <tqptrdict.h>
- static TQPtrList<KInstance> *allInstances = 0;
+ static TQPtrList<TDEInstance> *allInstances = 0;
static TQPtrDict<TQCString> *allOldInstances = 0;
- #define DEBUG_ADD do { if (!allInstances) { allInstances = new TQPtrList<KInstance>(); allOldInstances = new TQPtrDict<TQCString>(); } allInstances->append(this); allOldInstances->insert( this, new TQCString( _name)); } while (false);
+ #define DEBUG_ADD do { if (!allInstances) { allInstances = new TQPtrList<TDEInstance>(); allOldInstances = new TQPtrDict<TQCString>(); } allInstances->append(this); allOldInstances->insert( this, new TQCString( _name)); } while (false);
#define DEBUG_REMOVE do { allInstances->removeRef(this); } while (false);
- #define DEBUG_CHECK_ALIVE do { if (!allInstances->contains((KInstance*)this)) { TQCString *old = allOldInstances->find((KInstance*)this); tqWarning("ACCESSING DELETED KINSTANCE! (%s)", old ? old->data() : "<unknown>"); assert(false); } } while (false);
+ #define DEBUG_CHECK_ALIVE do { if (!allInstances->contains((TDEInstance*)this)) { TQCString *old = allOldInstances->find((TDEInstance*)this); tqWarning("ACCESSING DELETED KINSTANCE! (%s)", old ? old->data() : "<unknown>"); assert(false); } } while (false);
#else
#define DEBUG_ADD
#define DEBUG_REMOVE
#define DEBUG_CHECK_ALIVE
#endif
-class KInstancePrivate
+class TDEInstancePrivate
{
public:
- KInstancePrivate ()
+ TDEInstancePrivate ()
{
mimeSourceFactory = 0L;
}
- ~KInstancePrivate ()
+ ~TDEInstancePrivate ()
{
delete mimeSourceFactory;
}
@@ -65,30 +65,30 @@ public:
KMimeSourceFactory* mimeSourceFactory;
TQString configName;
bool ownAboutdata;
- KSharedConfig::Ptr sharedConfig;
+ TDESharedConfig::Ptr sharedConfig;
};
-KInstance::KInstance( const TQCString& name)
+TDEInstance::TDEInstance( const TQCString& name)
: _dirs (0L),
_config (0L),
_iconLoader (0L),
_hardwaredevices (0L),
_networkmanager (0L),
- _name( name ), _aboutData( new KAboutData( name, "", 0 ) ), m_configReadOnly(false)
+ _name( name ), _aboutData( new TDEAboutData( name, "", 0 ) ), m_configReadOnly(false)
{
DEBUG_ADD
Q_ASSERT(!name.isEmpty());
- if (!KGlobal::_instance)
+ if (!TDEGlobal::_instance)
{
- KGlobal::_instance = this;
- KGlobal::setActiveInstance(this);
+ TDEGlobal::_instance = this;
+ TDEGlobal::setActiveInstance(this);
}
- d = new KInstancePrivate ();
+ d = new TDEInstancePrivate ();
d->ownAboutdata = true;
}
-KInstance::KInstance( const KAboutData * aboutData )
+TDEInstance::TDEInstance( const TDEAboutData * aboutData )
: _dirs (0L),
_config (0L),
_iconLoader (0L),
@@ -99,17 +99,17 @@ KInstance::KInstance( const KAboutData * aboutData )
DEBUG_ADD
Q_ASSERT(!_name.isEmpty());
- if (!KGlobal::_instance)
+ if (!TDEGlobal::_instance)
{
- KGlobal::_instance = this;
- KGlobal::setActiveInstance(this);
+ TDEGlobal::_instance = this;
+ TDEGlobal::setActiveInstance(this);
}
- d = new KInstancePrivate ();
+ d = new TDEInstancePrivate ();
d->ownAboutdata = false;
}
-KInstance::KInstance( KInstance* src )
+TDEInstance::TDEInstance( TDEInstance* src )
: _dirs ( src->_dirs ),
_config ( src->_config ),
_iconLoader ( src->_iconLoader ),
@@ -120,13 +120,13 @@ KInstance::KInstance( KInstance* src )
DEBUG_ADD
Q_ASSERT(!_name.isEmpty());
- if (!KGlobal::_instance || KGlobal::_instance == src )
+ if (!TDEGlobal::_instance || TDEGlobal::_instance == src )
{
- KGlobal::_instance = this;
- KGlobal::setActiveInstance(this);
+ TDEGlobal::_instance = this;
+ TDEGlobal::setActiveInstance(this);
}
- d = new KInstancePrivate ();
+ d = new TDEInstancePrivate ();
d->ownAboutdata = src->d->ownAboutdata;
d->sharedConfig = src->d->sharedConfig;
@@ -139,7 +139,7 @@ KInstance::KInstance( KInstance* src )
delete src;
}
-KInstance::~KInstance()
+TDEInstance::~TDEInstance()
{
DEBUG_CHECK_ALIVE
@@ -164,19 +164,19 @@ KInstance::~KInstance()
delete _dirs;
_dirs = 0;
- if (KGlobal::_instance == this)
- KGlobal::_instance = 0;
- if (KGlobal::activeInstance() == this)
- KGlobal::setActiveInstance(0);
+ if (TDEGlobal::_instance == this)
+ TDEGlobal::_instance = 0;
+ if (TDEGlobal::activeInstance() == this)
+ TDEGlobal::setActiveInstance(0);
DEBUG_REMOVE
}
-KStandardDirs *KInstance::dirs() const
+TDEStandardDirs *TDEInstance::dirs() const
{
DEBUG_CHECK_ALIVE
if( _dirs == 0 ) {
- _dirs = new KStandardDirs( );
+ _dirs = new TDEStandardDirs( );
if (_config) {
if (_dirs->addCustomized(_config))
_config->reparseConfiguration();
@@ -190,18 +190,18 @@ KStandardDirs *KInstance::dirs() const
extern bool kde_kiosk_exception;
extern bool kde_kiosk_admin;
-void KInstance::setConfigReadOnly(bool ro)
+void TDEInstance::setConfigReadOnly(bool ro)
{
m_configReadOnly = ro;
}
-KConfig *KInstance::config() const
+TDEConfig *TDEInstance::config() const
{
DEBUG_CHECK_ALIVE
if( _config == 0 ) {
if ( !d->configName.isEmpty() )
{
- d->sharedConfig = KSharedConfig::openConfig( d->configName );
+ d->sharedConfig = TDESharedConfig::openConfig( d->configName );
// Check whether custom config files are allowed.
d->sharedConfig->setGroup( "KDE Action Restrictions" );
@@ -220,10 +220,10 @@ KConfig *KInstance::config() const
if ( d->sharedConfig == 0 )
{
if ( !_name.isEmpty() ) {
- d->sharedConfig = KSharedConfig::openConfig( _name + "rc", m_configReadOnly );
+ d->sharedConfig = TDESharedConfig::openConfig( _name + "rc", m_configReadOnly );
}
else {
- d->sharedConfig = KSharedConfig::openConfig( TQString::null );
+ d->sharedConfig = TDESharedConfig::openConfig( TQString::null );
}
}
@@ -244,7 +244,7 @@ KConfig *KInstance::config() const
return _config;
}
-KSharedConfig *KInstance::sharedConfig() const
+TDESharedConfig *TDEInstance::sharedConfig() const
{
DEBUG_CHECK_ALIVE
if (_config == 0)
@@ -253,24 +253,24 @@ KSharedConfig *KInstance::sharedConfig() const
return d->sharedConfig;
}
-void KInstance::setConfigName(const TQString &configName)
+void TDEInstance::setConfigName(const TQString &configName)
{
DEBUG_CHECK_ALIVE
d->configName = configName;
}
-KIconLoader *KInstance::iconLoader() const
+TDEIconLoader *TDEInstance::iconLoader() const
{
DEBUG_CHECK_ALIVE
if( _iconLoader == 0 ) {
- _iconLoader = new KIconLoader( _name, dirs() );
+ _iconLoader = new TDEIconLoader( _name, dirs() );
_iconLoader->enableDelayedIconSetLoading( true );
}
return _iconLoader;
}
-TDEHardwareDevices *KInstance::hardwareDevices() const
+TDEHardwareDevices *TDEInstance::hardwareDevices() const
{
DEBUG_CHECK_ALIVE
if( _hardwaredevices == 0 ) {
@@ -280,7 +280,7 @@ TDEHardwareDevices *KInstance::hardwareDevices() const
return _hardwaredevices;
}
-TDEGlobalNetworkManager *KInstance::networkManager() const
+TDEGlobalNetworkManager *TDEInstance::networkManager() const
{
DEBUG_CHECK_ALIVE
if( _networkmanager == 0 ) {
@@ -290,37 +290,37 @@ TDEGlobalNetworkManager *KInstance::networkManager() const
return _networkmanager;
}
-void KInstance::newIconLoader() const
+void TDEInstance::newIconLoader() const
{
DEBUG_CHECK_ALIVE
- KIconTheme::reconfigure();
+ TDEIconTheme::reconfigure();
_iconLoader->reconfigure( _name, dirs() );
}
-const KAboutData * KInstance::aboutData() const
+const TDEAboutData * TDEInstance::aboutData() const
{
DEBUG_CHECK_ALIVE
return _aboutData;
}
-TQCString KInstance::instanceName() const
+TQCString TDEInstance::instanceName() const
{
DEBUG_CHECK_ALIVE
return _name;
}
-KMimeSourceFactory* KInstance::mimeSourceFactory () const
+KMimeSourceFactory* TDEInstance::mimeSourceFactory () const
{
DEBUG_CHECK_ALIVE
if (!d->mimeSourceFactory)
{
d->mimeSourceFactory = new KMimeSourceFactory(_iconLoader);
- d->mimeSourceFactory->setInstance(const_cast<KInstance *>(this));
+ d->mimeSourceFactory->setInstance(const_cast<TDEInstance *>(this));
}
return d->mimeSourceFactory;
}
-void KInstance::virtual_hook( int, void* )
+void TDEInstance::virtual_hook( int, void* )
{ /*BASE::virtual_hook( id, data );*/ }
diff --git a/tdecore/kinstance.h b/tdecore/kinstance.h
index 5d1dbdce0..be60c943c 100644
--- a/tdecore/kinstance.h
+++ b/tdecore/kinstance.h
@@ -18,15 +18,15 @@
#ifndef _KINSTANCE_H
#define _KINSTANCE_H
-class KStandardDirs;
-class KAboutData;
-class KConfig;
-class KIconLoader;
+class TDEStandardDirs;
+class TDEAboutData;
+class TDEConfig;
+class TDEIconLoader;
class KCharsets;
class TQFont;
-class KInstancePrivate;
+class TDEInstancePrivate;
class KMimeSourceFactory;
-class KSharedConfig;
+class TDESharedConfig;
class TDEHardwareDevices;
class TDEGlobalNetworkManager;
@@ -38,32 +38,32 @@ class TDEGlobalNetworkManager;
* Access to KDE global objects for use in shared libraries. In
* practical terms, this class is used in KDE components. This allows
* components to store things that normally would be accessed by
- * KGlobal.
+ * TDEGlobal.
*
* @author Torben Weis
*/
-class TDECORE_EXPORT KInstance
+class TDECORE_EXPORT TDEInstance
{
- friend class KStandardDirs;
+ friend class TDEStandardDirs;
public:
/**
* Constructor.
* @param instanceName the name of the instance
*/
- KInstance( const TQCString& instanceName) ;
+ TDEInstance( const TQCString& instanceName) ;
/**
* Constructor.
- * When building a KInstance that is not your KApplication,
- * make sure that the KAboutData and the KInstance have the same life time.
+ * When building a TDEInstance that is not your TDEApplication,
+ * make sure that the TDEAboutData and the TDEInstance have the same life time.
* You have to destroy both, since the instance doesn't own the about data.
- * Don't build a KAboutData on the stack in this case !
- * Building a KAboutData on the stack is only ok for usage with
- * KCmdLineArgs and KApplication (not destroyed until the app exits).
- * @param aboutData data about this instance (see KAboutData)
+ * Don't build a TDEAboutData on the stack in this case !
+ * Building a TDEAboutData on the stack is only ok for usage with
+ * TDECmdLineArgs and TDEApplication (not destroyed until the app exits).
+ * @param aboutData data about this instance (see TDEAboutData)
*/
- KInstance( const KAboutData * aboutData );
+ TDEInstance( const TDEAboutData * aboutData );
/*
* @internal
@@ -71,30 +71,30 @@ class TDECORE_EXPORT KInstance
* Initialize from src and delete it.
*/
- KInstance( KInstance* src );
+ TDEInstance( TDEInstance* src );
/**
* Destructor.
*/
- virtual ~KInstance();
+ virtual ~TDEInstance();
/**
* Returns the application standard dirs object.
- * @return The KStandardDirs of the application.
+ * @return The TDEStandardDirs of the application.
*/
- KStandardDirs *dirs() const;
+ TDEStandardDirs *dirs() const;
/**
* Returns the general config object ("appnamerc").
- * @return the KConfig object for the instance.
+ * @return the TDEConfig object for the instance.
*/
- KConfig *config() const;
+ TDEConfig *config() const;
/**
* Returns the general config object ("appnamerc").
- * @return the KConfig object for the instance.
+ * @return the TDEConfig object for the instance.
*/
- KSharedConfig *sharedConfig() const;
+ TDESharedConfig *sharedConfig() const;
/**
* Set a read-only flag on the configuration files
@@ -108,7 +108,7 @@ class TDECORE_EXPORT KInstance
* Returns an iconloader object.
* @return the iconloader object.
*/
- KIconLoader *iconLoader() const;
+ TDEIconLoader *iconLoader() const;
/**
* Returns a TDEHardwareDevices object.
@@ -133,11 +133,11 @@ class TDECORE_EXPORT KInstance
* @return the about data of the instance, or 0 if it has
* not been set yet
*/
- const KAboutData *aboutData() const;
+ const TDEAboutData *aboutData() const;
/**
* Returns the name of the instance
- * @return the instance name, can be null if the KInstance has been
+ * @return the instance name, can be null if the TDEInstance has been
* created with a null name
*/
TQCString instanceName() const;
@@ -153,7 +153,7 @@ protected:
/**
* Copy Constructor is not allowed
*/
- KInstance( const KInstance& );
+ TDEInstance( const TDEInstance& );
/**
* Set name of default config file.
@@ -163,22 +163,22 @@ protected:
void setConfigName(const TQString &name);
private:
- mutable KStandardDirs *_dirs;
+ mutable TDEStandardDirs *_dirs;
- mutable KConfig *_config;
- mutable KIconLoader *_iconLoader;
+ mutable TDEConfig *_config;
+ mutable TDEIconLoader *_iconLoader;
mutable TDEHardwareDevices *_hardwaredevices;
mutable TDEGlobalNetworkManager *_networkmanager;
mutable void *_placeholder;
TQCString _name;
- const KAboutData *_aboutData;
+ const TDEAboutData *_aboutData;
protected:
virtual void virtual_hook( int id, void* data );
private:
- KInstancePrivate *d;
+ TDEInstancePrivate *d;
bool m_configReadOnly;
};
diff --git a/tdecore/kipc.h b/tdecore/kipc.h
index 45e96f194..82bf22748 100644
--- a/tdecore/kipc.h
+++ b/tdecore/kipc.h
@@ -37,13 +37,13 @@
* Communications Protocol.
*
* Messages with id code < 32 are called "System Messages". These are
- * directly handled by KApplication. Examples are: PaletteChanged and
- * StyleChanged. Messages with id code >= 32 are user messages. KApplication
+ * directly handled by TDEApplication. Examples are: PaletteChanged and
+ * StyleChanged. Messages with id code >= 32 are user messages. TDEApplication
* emits the signal kipcMessage(id,arg) for each user message it receives.
*
* KIPC is implemented using X11 ClientMessage events.
*
- * @see KApplication::kipcMessage()
+ * @see TDEApplication::kipcMessage()
* @author Geert Jansen <jansen@kde.org>
*/
class TDECORE_EXPORT KIPC
diff --git a/tdecore/kkeynative.h b/tdecore/kkeynative.h
index cf29fcabc..e2774417d 100644
--- a/tdecore/kkeynative.h
+++ b/tdecore/kkeynative.h
@@ -23,7 +23,7 @@
#ifndef __KKEYNATIVE_H
#define __KKEYNATIVE_H
-#include <kshortcut.h>
+#include <tdeshortcut.h>
#ifdef Q_WS_X11
typedef union _XEvent XEvent;
diff --git a/tdecore/kkeynative_x11.cpp b/tdecore/kkeynative_x11.cpp
index 64635acc3..a44305dad 100644
--- a/tdecore/kkeynative_x11.cpp
+++ b/tdecore/kkeynative_x11.cpp
@@ -32,7 +32,7 @@
#include <tqstringlist.h>
#include "kckey.h"
#include <kdebug.h>
-#include <klocale.h>
+#include <tdelocale.h>
#ifdef Q_WS_X11
#define XK_MISCELLANY
diff --git a/tdecore/kkeyserver_x11.cpp b/tdecore/kkeyserver_x11.cpp
index c12cde7e6..64bfe383d 100644
--- a/tdecore/kkeyserver_x11.cpp
+++ b/tdecore/kkeyserver_x11.cpp
@@ -29,12 +29,12 @@
#include "kkeyserver_x11.h"
#include "kkeynative.h"
-#include "kshortcut.h"
+#include "tdeshortcut.h"
-#include <kconfig.h>
+#include <tdeconfig.h>
#include <kdebug.h>
-#include <kglobal.h>
-#include <klocale.h>
+#include <tdeglobal.h>
+#include <tdelocale.h>
#ifdef Q_WS_X11
# define XK_MISCELLANY
@@ -361,7 +361,7 @@ bool initializeMods()
XFreeModifiermap( xmk );
- //KConfigGroupSaver cgs( KGlobal::config(), "Keyboard" );
+ //TDEConfigGroupSaver cgs( TDEGlobal::config(), "Keyboard" );
// read in mod that win should be attached to
g_bInitializedMods = true;
@@ -380,11 +380,11 @@ static void initializeVariations()
static void intializeKKeyLabels()
{
- KConfigGroupSaver cgs( KGlobal::config(), "Keyboard" );
- g_rgModInfo[0].sLabel = KGlobal::config()->readEntry( "Label Shift", i18n(g_rgModInfo[0].psName) );
- g_rgModInfo[1].sLabel = KGlobal::config()->readEntry( "Label Ctrl", i18n(g_rgModInfo[1].psName) );
- g_rgModInfo[2].sLabel = KGlobal::config()->readEntry( "Label Alt", i18n(g_rgModInfo[2].psName) );
- g_rgModInfo[3].sLabel = KGlobal::config()->readEntry( "Label Win", i18n(g_rgModInfo[3].psName) );
+ TDEConfigGroupSaver cgs( TDEGlobal::config(), "Keyboard" );
+ g_rgModInfo[0].sLabel = TDEGlobal::config()->readEntry( "Label Shift", i18n(g_rgModInfo[0].psName) );
+ g_rgModInfo[1].sLabel = TDEGlobal::config()->readEntry( "Label Ctrl", i18n(g_rgModInfo[1].psName) );
+ g_rgModInfo[2].sLabel = TDEGlobal::config()->readEntry( "Label Alt", i18n(g_rgModInfo[2].psName) );
+ g_rgModInfo[3].sLabel = TDEGlobal::config()->readEntry( "Label Win", i18n(g_rgModInfo[3].psName) );
g_bMacLabels = (g_rgModInfo[2].sLabel == "Command");
g_bInitializedKKeyLabels = true;
}
@@ -1020,7 +1020,7 @@ void Variations::init( const KKey& key, bool bQt )
} // end of namespace KKeyServer block
-// FIXME: This needs to be moved to kshortcut.cpp, and create a
+// FIXME: This needs to be moved to tdeshortcut.cpp, and create a
// KKeyServer::method which it will call.
// Alt+SysReq => Alt+Print
// Ctrl+Shift+Plus => Ctrl+Plus (en)
diff --git a/tdecore/kkeyserver_x11.h b/tdecore/kkeyserver_x11.h
index ce3fa2fed..90330911b 100644
--- a/tdecore/kkeyserver_x11.h
+++ b/tdecore/kkeyserver_x11.h
@@ -23,7 +23,7 @@
#ifndef _KKEYSERVER_X11_H
#define _KKEYSERVER_X11_H
-#include "kshortcut.h"
+#include "tdeshortcut.h"
#include "kkeynative.h"
/**
diff --git a/tdecore/klibloader.cpp b/tdecore/klibloader.cpp
index 2c75989d3..aed2c06af 100644
--- a/tdecore/klibloader.cpp
+++ b/tdecore/klibloader.cpp
@@ -25,11 +25,11 @@
#include <tqtimer.h>
#include <tqobjectdict.h>
-#include "kapplication.h"
+#include "tdeapplication.h"
#include "klibloader.h"
#include "kstandarddirs.h"
#include "kdebug.h"
-#include "klocale.h"
+#include "tdelocale.h"
#include "ltdl.h"
@@ -346,7 +346,7 @@ static inline TQCString makeLibName( const char* name )
}
//static
-TQString KLibLoader::findLibrary( const char * name, const KInstance * instance )
+TQString KLibLoader::findLibrary( const char * name, const TDEInstance * instance )
{
TQCString libname = makeLibName( name );
diff --git a/tdecore/klibloader.h b/tdecore/klibloader.h
index aa88db925..d9e632184 100644
--- a/tdecore/klibloader.h
+++ b/tdecore/klibloader.h
@@ -23,11 +23,11 @@
#include <tqstringlist.h>
#include <tqasciidict.h>
#include <tqptrlist.h>
-#include <kglobal.h>
+#include <tdeglobal.h>
#include <stdlib.h> // For backwards compatibility
-class KInstance;
+class TDEInstance;
class TQTimer;
class KLibrary;
class KLibFactory;
@@ -255,7 +255,7 @@ public:
/**
* @internal
- * Internal Method, called by the KApplication destructor.
+ * Internal Method, called by the TDEApplication destructor.
* Do not call it.
* This is what makes it possible to rely on ~KLibFactory
* being called in all cases, whether the library is unloaded
@@ -271,9 +271,9 @@ public:
* @param name of the library. If it is not a path, the function searches in
* the "module" and "lib" resources. If there is no extension,
* ".la" will be appended.
- * @param instance a KInstance used to get the standard paths
+ * @param instance a TDEInstance used to get the standard paths
*/
- static TQString findLibrary( const char * name, const KInstance * instance = KGlobal::instance() );
+ static TQString findLibrary( const char * name, const TDEInstance * instance = TDEGlobal::instance() );
protected:
KLibLoader( TQObject* parent = 0, const char* name = 0 );
@@ -306,12 +306,12 @@ private:
* NOTE: you probably want to use KGenericFactory<PluginClassName>
* instead of writing your own factory.
*
- * In the constructor of your factory you should create an instance of KInstance
+ * In the constructor of your factory you should create an instance of TDEInstance
* like this:
* \code
- * s_global = new KInstance( "kspread" );
+ * s_global = new TDEInstance( "kspread" );
* \endcode
- * This KInstance is comparable to KGlobal used by normal applications.
+ * This TDEInstance is comparable to TDEGlobal used by normal applications.
* It allows you to find resource files (images, XML, sound etc.) belonging
* to the library.
*
diff --git a/tdecore/klockfile.cpp b/tdecore/klockfile.cpp
index bc2175d0d..1f4f8337e 100644
--- a/tdecore/klockfile.cpp
+++ b/tdecore/klockfile.cpp
@@ -37,15 +37,15 @@
#include <tqtextstream.h>
#include <kde_file.h>
-#include <kapplication.h>
-#include <kcmdlineargs.h>
-#include <kglobal.h>
-#include <ktempfile.h>
+#include <tdeapplication.h>
+#include <tdecmdlineargs.h>
+#include <tdeglobal.h>
+#include <tdetempfile.h>
// TODO: http://www.spinnaker.de/linux/nfs-locking.html
// TODO: Make regression test
-class KLockFile::KLockFilePrivate {
+class TDELockFile::TDELockFilePrivate {
public:
TQString file;
int staleTime;
@@ -62,9 +62,9 @@ public:
// 30 seconds
-KLockFile::KLockFile(const TQString &file)
+TDELockFile::TDELockFile(const TQString &file)
{
- d = new KLockFilePrivate();
+ d = new TDELockFilePrivate();
d->file = file;
d->staleTime = 30;
d->isLocked = false;
@@ -72,21 +72,21 @@ KLockFile::KLockFile(const TQString &file)
d->linkCountSupport = true;
}
-KLockFile::~KLockFile()
+TDELockFile::~TDELockFile()
{
unlock();
delete d;
}
int
-KLockFile::staleTime() const
+TDELockFile::staleTime() const
{
return d->staleTime;
}
void
-KLockFile::setStaleTime(int _staleTime)
+TDELockFile::setStaleTime(int _staleTime)
{
d->staleTime = _staleTime;
}
@@ -109,23 +109,23 @@ static bool testLinkCountSupport(const TQCString &fileName)
return ((result == 0) && (st_buf.st_nlink == 2));
}
-static KLockFile::LockResult lockFile(const TQString &lockFile, KDE_struct_stat &st_buf, bool &linkCountSupport)
+static TDELockFile::LockResult lockFile(const TQString &lockFile, KDE_struct_stat &st_buf, bool &linkCountSupport)
{
TQCString lockFileName = TQFile::encodeName( lockFile );
int result = KDE_lstat( lockFileName, &st_buf );
if (result == 0)
- return KLockFile::LockFail;
+ return TDELockFile::LockFail;
KTempFile uniqueFile(lockFile, TQString::null, 0644);
uniqueFile.setAutoDelete(true);
if (uniqueFile.status() != 0)
- return KLockFile::LockError;
+ return TDELockFile::LockError;
char hostname[256];
hostname[0] = 0;
gethostname(hostname, 255);
hostname[255] = 0;
- TQCString instanceName = KCmdLineArgs::appName();
+ TQCString instanceName = TDECmdLineArgs::appName();
(*(uniqueFile.textStream())) << TQString::number(getpid()) << endl
<< instanceName << endl
@@ -138,23 +138,23 @@ static KLockFile::LockResult lockFile(const TQString &lockFile, KDE_struct_stat
// Create lock file
result = ::link( uniqueName, lockFileName );
if (result != 0)
- return KLockFile::LockError;
+ return TDELockFile::LockError;
if (!linkCountSupport)
- return KLockFile::LockOK;
+ return TDELockFile::LockOK;
#else
//TODO for win32
- return KLockFile::LockOK;
+ return TDELockFile::LockOK;
#endif
KDE_struct_stat st_buf2;
result = KDE_lstat( uniqueName, &st_buf2 );
if (result != 0)
- return KLockFile::LockError;
+ return TDELockFile::LockError;
result = KDE_lstat( lockFileName, &st_buf );
if (result != 0)
- return KLockFile::LockError;
+ return TDELockFile::LockError;
if (!statResultIsEqual(st_buf, st_buf2) || S_ISLNK(st_buf.st_mode) || S_ISLNK(st_buf2.st_mode))
{
@@ -163,15 +163,15 @@ static KLockFile::LockResult lockFile(const TQString &lockFile, KDE_struct_stat
{
linkCountSupport = testLinkCountSupport(uniqueName);
if (!linkCountSupport)
- return KLockFile::LockOK; // Link count support is missing... assume everything is OK.
+ return TDELockFile::LockOK; // Link count support is missing... assume everything is OK.
}
- return KLockFile::LockFail;
+ return TDELockFile::LockFail;
}
- return KLockFile::LockOK;
+ return TDELockFile::LockOK;
}
-static KLockFile::LockResult deleteStaleLock(const TQString &lockFile, KDE_struct_stat &st_buf, bool &linkCountSupport)
+static TDELockFile::LockResult deleteStaleLock(const TQString &lockFile, KDE_struct_stat &st_buf, bool &linkCountSupport)
{
// This is dangerous, we could be deleting a new lock instead of
// the old stale one, let's be very careful
@@ -179,7 +179,7 @@ static KLockFile::LockResult deleteStaleLock(const TQString &lockFile, KDE_struc
// Create temp file
KTempFile ktmpFile(lockFile);
if (ktmpFile.status() != 0)
- return KLockFile::LockError;
+ return TDELockFile::LockError;
TQCString lckFile = TQFile::encodeName(lockFile);
TQCString tmpFile = TQFile::encodeName(ktmpFile.name());
@@ -189,10 +189,10 @@ static KLockFile::LockResult deleteStaleLock(const TQString &lockFile, KDE_struc
#ifdef Q_OS_UNIX
// link to lock file
if (::link(lckFile, tmpFile) != 0)
- return KLockFile::LockFail; // Try again later
+ return TDELockFile::LockFail; // Try again later
#else
//TODO for win32
- return KLockFile::LockOK;
+ return TDELockFile::LockOK;
#endif
// check if link count increased with exactly one
@@ -209,7 +209,7 @@ static KLockFile::LockResult deleteStaleLock(const TQString &lockFile, KDE_struc
tqWarning("WARNING: deleting stale lockfile %s", lckFile.data());
::unlink(lckFile);
::unlink(tmpFile);
- return KLockFile::LockOK;
+ return TDELockFile::LockOK;
}
}
@@ -227,34 +227,34 @@ static KLockFile::LockResult deleteStaleLock(const TQString &lockFile, KDE_struc
tqWarning("WARNING: deleting stale lockfile %s", lckFile.data());
::unlink(lckFile);
::unlink(tmpFile);
- return KLockFile::LockOK;
+ return TDELockFile::LockOK;
}
// Failed to delete stale lock file
tqWarning("WARNING: Problem deleting stale lockfile %s", lckFile.data());
::unlink(tmpFile);
- return KLockFile::LockFail;
+ return TDELockFile::LockFail;
}
-KLockFile::LockResult KLockFile::lock(int options)
+TDELockFile::LockResult TDELockFile::lock(int options)
{
if (d->isLocked)
- return KLockFile::LockOK;
+ return TDELockFile::LockOK;
- KLockFile::LockResult result;
+ TDELockFile::LockResult result;
int hardErrors = 5;
int n = 5;
while(true)
{
KDE_struct_stat st_buf;
result = lockFile(d->file, st_buf, d->linkCountSupport);
- if (result == KLockFile::LockOK)
+ if (result == TDELockFile::LockOK)
{
d->staleTimer = TQTime();
break;
}
- else if (result == KLockFile::LockError)
+ else if (result == TDELockFile::LockError)
{
d->staleTimer = TQTime();
if (--hardErrors == 0)
@@ -262,7 +262,7 @@ KLockFile::LockResult KLockFile::lock(int options)
break;
}
}
- else // KLockFile::Fail
+ else // TDELockFile::Fail
{
if (!d->staleTimer.isNull() && !statResultIsEqual(d->statBuf, st_buf))
d->staleTimer = TQTime();
@@ -292,17 +292,17 @@ KLockFile::LockResult KLockFile::lock(int options)
if (isStale)
{
if ((options & LockForce) == 0)
- return KLockFile::LockStale;
+ return TDELockFile::LockStale;
result = deleteStaleLock(d->file, d->statBuf, d->linkCountSupport);
- if (result == KLockFile::LockOK)
+ if (result == TDELockFile::LockOK)
{
// Lock deletion successful
d->staleTimer = TQTime();
continue; // Now try to get the new lock
}
- else if (result != KLockFile::LockFail)
+ else if (result != TDELockFile::LockFail)
{
return result;
}
@@ -336,7 +336,7 @@ KLockFile::LockResult KLockFile::lock(int options)
struct timeval tv;
tv.tv_sec = 0;
- tv.tv_usec = n*((KApplication::random() % 200)+100);
+ tv.tv_usec = n*((TDEApplication::random() % 200)+100);
if (n < 2000)
n = n * 2;
@@ -351,12 +351,12 @@ KLockFile::LockResult KLockFile::lock(int options)
return result;
}
-bool KLockFile::isLocked() const
+bool TDELockFile::isLocked() const
{
return d->isLocked;
}
-void KLockFile::unlock()
+void TDELockFile::unlock()
{
if (d->isLocked)
{
@@ -365,7 +365,7 @@ void KLockFile::unlock()
}
}
-bool KLockFile::getLockInfo(int &pid, TQString &hostname, TQString &appname)
+bool TDELockFile::getLockInfo(int &pid, TQString &hostname, TQString &appname)
{
if (d->pid == -1)
return false;
diff --git a/tdecore/klockfile.h b/tdecore/klockfile.h
index 61968bf0f..d0bfc5785 100644
--- a/tdecore/klockfile.h
+++ b/tdecore/klockfile.h
@@ -25,22 +25,22 @@
#include <ksharedptr.h>
/**
- * The KLockFile class provides NFS safe lockfiles.
+ * The TDELockFile class provides NFS safe lockfiles.
*
* @author Waldo Bastian <bastian@kde.org>
* @since 3.3
*/
-class TDECORE_EXPORT KLockFile : public KShared
+class TDECORE_EXPORT TDELockFile : public TDEShared
{
public:
- typedef KSharedPtr<KLockFile> Ptr;
+ typedef TDESharedPtr<TDELockFile> Ptr;
- KLockFile(const TQString &file);
+ TDELockFile(const TQString &file);
/**
* Destroys the object, releasing the lock if held
**/
- ~KLockFile();
+ ~TDELockFile();
/**
* Possible return values of the lock function.
@@ -116,8 +116,8 @@ public:
bool getLockInfo(int &pid, TQString &hostname, TQString &appname);
private:
- class KLockFilePrivate;
- KLockFilePrivate *d;
+ class TDELockFilePrivate;
+ TDELockFilePrivate *d;
};
#endif
diff --git a/tdecore/kmanagerselection.cpp b/tdecore/kmanagerselection.cpp
index 75dde5c9c..2e019f73e 100644
--- a/tdecore/kmanagerselection.cpp
+++ b/tdecore/kmanagerselection.cpp
@@ -47,61 +47,61 @@ DEALINGS IN THE SOFTWARE.
#include <kdebug.h>
#include <tqwidget.h>
-#include <kapplication.h>
+#include <tdeapplication.h>
#include <kxerrorhandler.h>
#include <X11/Xatom.h>
-class KSelectionOwnerPrivate
+class TDESelectionOwnerPrivate
: public QWidget
{
public:
- KSelectionOwnerPrivate( KSelectionOwner* owner );
+ TDESelectionOwnerPrivate( TDESelectionOwner* owner );
protected:
virtual bool x11Event( XEvent* ev );
private:
- KSelectionOwner* owner;
+ TDESelectionOwner* owner;
};
-KSelectionOwnerPrivate::KSelectionOwnerPrivate( KSelectionOwner* owner_P )
+TDESelectionOwnerPrivate::TDESelectionOwnerPrivate( TDESelectionOwner* owner_P )
: owner( owner_P )
{
kapp->installX11EventFilter( TQT_TQWIDGET(this) );
}
-bool KSelectionOwnerPrivate::x11Event( XEvent* ev_P )
+bool TDESelectionOwnerPrivate::x11Event( XEvent* ev_P )
{
return owner->filterEvent( ev_P );
}
-KSelectionOwner::KSelectionOwner( Atom selection_P, int screen_P, TQObject* parent_P )
+TDESelectionOwner::TDESelectionOwner( Atom selection_P, int screen_P, TQObject* parent_P )
: TQObject( parent_P ),
selection( selection_P ),
screen( screen_P >= 0 ? screen_P : DefaultScreen( tqt_xdisplay())),
window( None ),
timestamp( CurrentTime ),
extra1( 0 ), extra2( 0 ),
- d( new KSelectionOwnerPrivate( this ))
+ d( new TDESelectionOwnerPrivate( this ))
{
}
-KSelectionOwner::KSelectionOwner( const char* selection_P, int screen_P, TQObject* parent_P )
+TDESelectionOwner::TDESelectionOwner( const char* selection_P, int screen_P, TQObject* parent_P )
: TQObject( parent_P ),
selection( XInternAtom( tqt_xdisplay(), selection_P, False )),
screen( screen_P >= 0 ? screen_P : DefaultScreen( tqt_xdisplay())),
window( None ),
timestamp( CurrentTime ),
extra1( 0 ), extra2( 0 ),
- d( new KSelectionOwnerPrivate( this ))
+ d( new TDESelectionOwnerPrivate( this ))
{
}
-KSelectionOwner::~KSelectionOwner()
+TDESelectionOwner::~TDESelectionOwner()
{
release();
delete d;
}
-bool KSelectionOwner::claim( bool force_P, bool force_kill_P )
+bool TDESelectionOwner::claim( bool force_P, bool force_kill_P )
{
if( manager_atom == None )
getAtoms();
@@ -179,7 +179,7 @@ bool KSelectionOwner::claim( bool force_P, bool force_kill_P )
}
// destroy resource first
-void KSelectionOwner::release()
+void TDESelectionOwner::release()
{
if( timestamp == CurrentTime )
return;
@@ -188,20 +188,20 @@ void KSelectionOwner::release()
timestamp = CurrentTime;
}
-Window KSelectionOwner::ownerWindow() const
+Window TDESelectionOwner::ownerWindow() const
{
if( timestamp == CurrentTime )
return None;
return window;
}
-void KSelectionOwner::setData( long extra1_P, long extra2_P )
+void TDESelectionOwner::setData( long extra1_P, long extra2_P )
{
extra1 = extra1_P;
extra2 = extra2_P;
}
-bool KSelectionOwner::filterEvent( XEvent* ev_P )
+bool TDESelectionOwner::filterEvent( XEvent* ev_P )
{
if( timestamp != CurrentTime && ev_P->xany.window == window )
{
@@ -244,12 +244,12 @@ bool KSelectionOwner::filterEvent( XEvent* ev_P )
return false;
}
-bool KSelectionOwner::handleMessage( XEvent* )
+bool TDESelectionOwner::handleMessage( XEvent* )
{
return false;
}
-void KSelectionOwner::filter_selection_request( XSelectionRequestEvent& ev_P )
+void TDESelectionOwner::filter_selection_request( XSelectionRequestEvent& ev_P )
{
if( timestamp == CurrentTime || ev_P.selection != selection )
return;
@@ -311,7 +311,7 @@ void KSelectionOwner::filter_selection_request( XSelectionRequestEvent& ev_P )
XSendEvent( tqt_xdisplay(), ev_P.requestor, False, 0, &ev );
}
-bool KSelectionOwner::handle_selection( Atom target_P, Atom property_P, Window requestor_P )
+bool TDESelectionOwner::handle_selection( Atom target_P, Atom property_P, Window requestor_P )
{
if( target_P == xa_timestamp )
{
@@ -328,7 +328,7 @@ bool KSelectionOwner::handle_selection( Atom target_P, Atom property_P, Window r
return true;
}
-void KSelectionOwner::replyTargets( Atom property_P, Window requestor_P )
+void TDESelectionOwner::replyTargets( Atom property_P, Window requestor_P )
{
Atom atoms[ 3 ] = { xa_multiple, xa_timestamp, xa_targets };
// kdDebug() << "Handling targets request" << endl;
@@ -336,12 +336,12 @@ void KSelectionOwner::replyTargets( Atom property_P, Window requestor_P )
reinterpret_cast< unsigned char* >( atoms ), 3 );
}
-bool KSelectionOwner::genericReply( Atom, Atom, Window )
+bool TDESelectionOwner::genericReply( Atom, Atom, Window )
{
return false;
}
-void KSelectionOwner::getAtoms()
+void TDESelectionOwner::getAtoms()
{
if( manager_atom == None )
{
@@ -356,66 +356,66 @@ void KSelectionOwner::getAtoms()
}
}
-Atom KSelectionOwner::manager_atom = None;
-Atom KSelectionOwner::xa_multiple = None;
-Atom KSelectionOwner::xa_targets = None;
-Atom KSelectionOwner::xa_timestamp = None;
+Atom TDESelectionOwner::manager_atom = None;
+Atom TDESelectionOwner::xa_multiple = None;
+Atom TDESelectionOwner::xa_targets = None;
+Atom TDESelectionOwner::xa_timestamp = None;
//*******************************************
-// KSelectionWatcher
+// TDESelectionWatcher
//*******************************************
-class KSelectionWatcherPrivate
+class TDESelectionWatcherPrivate
: public QWidget
{
public:
- KSelectionWatcherPrivate( KSelectionWatcher* watcher );
+ TDESelectionWatcherPrivate( TDESelectionWatcher* watcher );
protected:
virtual bool x11Event( XEvent* ev );
private:
- KSelectionWatcher* watcher;
+ TDESelectionWatcher* watcher;
};
-KSelectionWatcherPrivate::KSelectionWatcherPrivate( KSelectionWatcher* watcher_P )
+TDESelectionWatcherPrivate::TDESelectionWatcherPrivate( TDESelectionWatcher* watcher_P )
: watcher( watcher_P )
{
kapp->installX11EventFilter( TQT_TQWIDGET(this) );
}
-bool KSelectionWatcherPrivate::x11Event( XEvent* ev_P )
+bool TDESelectionWatcherPrivate::x11Event( XEvent* ev_P )
{
watcher->filterEvent( ev_P );
return false;
}
-KSelectionWatcher::KSelectionWatcher( Atom selection_P, int screen_P, TQObject* parent_P )
+TDESelectionWatcher::TDESelectionWatcher( Atom selection_P, int screen_P, TQObject* parent_P )
: TQObject( parent_P ),
selection( selection_P ),
screen( screen_P >= 0 ? screen_P : DefaultScreen( tqt_xdisplay())),
selection_owner( None ),
- d( new KSelectionWatcherPrivate( this ))
+ d( new TDESelectionWatcherPrivate( this ))
{
init();
}
-KSelectionWatcher::KSelectionWatcher( const char* selection_P, int screen_P, TQObject* parent_P )
+TDESelectionWatcher::TDESelectionWatcher( const char* selection_P, int screen_P, TQObject* parent_P )
: TQObject( parent_P ),
selection( XInternAtom( tqt_xdisplay(), selection_P, False )),
screen( screen_P >= 0 ? screen_P : DefaultScreen( tqt_xdisplay())),
selection_owner( None ),
- d( new KSelectionWatcherPrivate( this ))
+ d( new TDESelectionWatcherPrivate( this ))
{
init();
}
-KSelectionWatcher::~KSelectionWatcher()
+TDESelectionWatcher::~TDESelectionWatcher()
{
delete d;
}
-void KSelectionWatcher::init()
+void TDESelectionWatcher::init()
{
if( manager_atom == None )
{
@@ -429,7 +429,7 @@ void KSelectionWatcher::init()
}
}
-Window KSelectionWatcher::owner()
+Window TDESelectionWatcher::owner()
{
Display* const dpy = tqt_xdisplay();
KXErrorHandler handler;
@@ -451,7 +451,7 @@ Window KSelectionWatcher::owner()
}
// void return value in order to allow more watchers in one process
-void KSelectionWatcher::filterEvent( XEvent* ev_P )
+void TDESelectionWatcher::filterEvent( XEvent* ev_P )
{
if( ev_P->type == ClientMessage )
{
@@ -478,12 +478,12 @@ void KSelectionWatcher::filterEvent( XEvent* ev_P )
return;
}
-Atom KSelectionWatcher::manager_atom = None;
+Atom TDESelectionWatcher::manager_atom = None;
-void KSelectionOwner::virtual_hook( int, void* )
+void TDESelectionOwner::virtual_hook( int, void* )
{ /*BASE::virtual_hook( id, data );*/ }
-void KSelectionWatcher::virtual_hook( int, void* )
+void TDESelectionWatcher::virtual_hook( int, void* )
{ /*BASE::virtual_hook( id, data );*/ }
#include "kmanagerselection.moc"
diff --git a/tdecore/kmanagerselection.h b/tdecore/kmanagerselection.h
index 5b46488ab..de294187d 100644
--- a/tdecore/kmanagerselection.h
+++ b/tdecore/kmanagerselection.h
@@ -36,7 +36,7 @@ DEALINGS IN THE SOFTWARE.
#include <X11/Xlib.h>
-class KSelectionOwnerPrivate;
+class TDESelectionOwnerPrivate;
/**
This class implements claiming and owning manager selections, as described
@@ -47,7 +47,7 @@ class KSelectionOwnerPrivate;
@since 3.2
@short ICCCM manager selection owner
*/
-class TDECORE_EXPORT KSelectionOwner
+class TDECORE_EXPORT TDESelectionOwner
: public TQObject
{
Q_OBJECT
@@ -60,7 +60,7 @@ class TDECORE_EXPORT KSelectionOwner
* @param screen X screen, or -1 for default
* @param parent parent object, or NULL if there is none
*/
- KSelectionOwner( Atom selection, int screen = -1, TQObject* parent = NULL );
+ TDESelectionOwner( Atom selection, int screen = -1, TQObject* parent = NULL );
/**
* @overload
* This constructor accepts the selection name and creates the appropriate atom
@@ -70,11 +70,11 @@ class TDECORE_EXPORT KSelectionOwner
* @param screen X screen, or -1 for default
* @param parent parent object, or NULL if there is none
*/
- KSelectionOwner( const char* selection, int screen = -1, TQObject* parent = NULL );
+ TDESelectionOwner( const char* selection, int screen = -1, TQObject* parent = NULL );
/**
* Destructor. Calls release().
*/
- virtual ~KSelectionOwner();
+ virtual ~TDESelectionOwner();
/**
* This function attemps to claim ownership of the manager selection, using
* the current X timestamp. If @p force is false, and the selection is already
@@ -157,10 +157,10 @@ class TDECORE_EXPORT KSelectionOwner
protected:
virtual void virtual_hook( int id, void* data );
private:
- KSelectionOwnerPrivate* d;
+ TDESelectionOwnerPrivate* d;
};
-class KSelectionWatcherPrivate;
+class TDESelectionWatcherPrivate;
/**
This class implements watching manager selections, as described in the ICCCM
@@ -170,7 +170,7 @@ class KSelectionWatcherPrivate;
@since 3.2
@short ICCCM manager selection watching
*/
-class TDECORE_EXPORT KSelectionWatcher
+class TDECORE_EXPORT TDESelectionWatcher
: public TQObject
{
Q_OBJECT
@@ -183,7 +183,7 @@ class TDECORE_EXPORT KSelectionWatcher
* @param screen X screen, or -1 for default
* @param parent parent object, or NULL if there is none
*/
- KSelectionWatcher( Atom selection, int screen = -1, TQObject* parent = NULL );
+ TDESelectionWatcher( Atom selection, int screen = -1, TQObject* parent = NULL );
/**
* @overload
* This constructor accepts the selection name and creates the appropriate atom
@@ -193,8 +193,8 @@ class TDECORE_EXPORT KSelectionWatcher
* @param screen X screen, or -1 for default
* @param parent parent object, or NULL if there is none
*/
- KSelectionWatcher( const char* selection, int screen = -1, TQObject* parent = NULL );
- virtual ~KSelectionWatcher();
+ TDESelectionWatcher( const char* selection, int screen = -1, TQObject* parent = NULL );
+ virtual ~TDESelectionWatcher();
/**
* Return the current owner of the manager selection, if any.
*/
@@ -226,7 +226,7 @@ class TDECORE_EXPORT KSelectionWatcher
protected:
virtual void virtual_hook( int id, void* data );
private:
- KSelectionWatcherPrivate* d;
+ TDESelectionWatcherPrivate* d;
};
#endif
diff --git a/tdecore/kmdcodec_compat.h b/tdecore/kmdcodec_compat.h
index f2ed3b580..80da5356b 100644
--- a/tdecore/kmdcodec_compat.h
+++ b/tdecore/kmdcodec_compat.h
@@ -1,4 +1,4 @@
#ifdef __GNUC__
-#warning #include <kio/kmdcodec.h> is deprecated, use #include <kmdcodec.h> instead.
+#warning #include <tdeio/kmdcodec.h> is deprecated, use #include <kmdcodec.h> instead.
#endif
#include "../kmdcodec.h"
diff --git a/tdecore/kmimesourcefactory.cpp b/tdecore/kmimesourcefactory.cpp
index 37745d398..8ed02941e 100644
--- a/tdecore/kmimesourcefactory.cpp
+++ b/tdecore/kmimesourcefactory.cpp
@@ -19,7 +19,7 @@
*/
#include <kdebug.h>
-#include <kglobal.h>
+#include <tdeglobal.h>
#include <kinstance.h>
#include <kiconloader.h>
@@ -28,8 +28,8 @@
class KMimeSourceFactoryPrivate
{
public:
- inline KMimeSourceFactoryPrivate (KIconLoader* loader) : m_iconLoader(loader), m_instance(0L) {}
- inline KIconLoader *iconLoader()
+ inline KMimeSourceFactoryPrivate (TDEIconLoader* loader) : m_iconLoader(loader), m_instance(0L) {}
+ inline TDEIconLoader *iconLoader()
{
// If we don't have either of these, things are looking grim.
Q_ASSERT(m_instance || m_iconLoader);
@@ -40,11 +40,11 @@ public:
return m_instance->iconLoader();
}
- KIconLoader *m_iconLoader;
- KInstance *m_instance;
+ TDEIconLoader *m_iconLoader;
+ TDEInstance *m_instance;
};
-KMimeSourceFactory::KMimeSourceFactory (KIconLoader* loader)
+KMimeSourceFactory::KMimeSourceFactory (TDEIconLoader* loader)
: TQMimeSourceFactory (),
d (new KMimeSourceFactoryPrivate (loader))
{
@@ -71,23 +71,23 @@ TQString KMimeSourceFactory::makeAbsolute (const TQString& absOrRelName, const T
if (myContext == "desktop")
{
- result = d->iconLoader()->iconPath (myName, KIcon::Desktop);
+ result = d->iconLoader()->iconPath (myName, TDEIcon::Desktop);
}
else if (myContext == "toolbar")
{
- result = d->iconLoader()->iconPath (myName, KIcon::Toolbar);
+ result = d->iconLoader()->iconPath (myName, TDEIcon::Toolbar);
}
else if (myContext == "maintoolbar")
{
- result = d->iconLoader()->iconPath (myName, KIcon::MainToolbar);
+ result = d->iconLoader()->iconPath (myName, TDEIcon::MainToolbar);
}
else if (myContext == "small")
{
- result = d->iconLoader()->iconPath (myName, KIcon::Small);
+ result = d->iconLoader()->iconPath (myName, TDEIcon::Small);
}
else if (myContext == "user")
{
- result = d->iconLoader()->iconPath (myName, KIcon::User);
+ result = d->iconLoader()->iconPath (myName, TDEIcon::User);
}
if (result.isEmpty())
@@ -96,7 +96,7 @@ TQString KMimeSourceFactory::makeAbsolute (const TQString& absOrRelName, const T
return result;
}
-void KMimeSourceFactory::setInstance(KInstance *instance)
+void KMimeSourceFactory::setInstance(TDEInstance *instance)
{
d->m_instance = instance;
}
diff --git a/tdecore/kmimesourcefactory.h b/tdecore/kmimesourcefactory.h
index bf5b67d4c..8292cda42 100644
--- a/tdecore/kmimesourcefactory.h
+++ b/tdecore/kmimesourcefactory.h
@@ -23,16 +23,16 @@
#define KMIMESOURCEFACTORY_H
#include <tqmime.h>
-#include <kglobal.h>
+#include <tdeglobal.h>
class KMimeSourceFactoryPrivate;
-class KInstance;
+class TDEInstance;
/**
- * An extension to TQMimeSourceFactory that uses KIconLoader to
+ * An extension to TQMimeSourceFactory that uses TDEIconLoader to
* find images.
*
- * Normally you don't have to instantiate this class at all, KApplication does that for
+ * Normally you don't have to instantiate this class at all, TDEApplication does that for
* you automagically and sets TQMimeSourceFactory::setDefaultFactory().
*
* @author Peter Putzer <putzer@kde.org>
@@ -46,7 +46,7 @@ public:
*
* @param loader is the iconloader used to find images.
*/
- KMimeSourceFactory (KIconLoader* loader = KGlobal::iconLoader());
+ KMimeSourceFactory (TDEIconLoader* loader = TDEGlobal::iconLoader());
/**
* Destructor.
@@ -74,10 +74,10 @@ protected:
private:
/**
* @internal
- * Associate with a KInstance so we can pull its iconLoader() when need arises.
+ * Associate with a TDEInstance so we can pull its iconLoader() when need arises.
*/
- friend class KInstance;
- void setInstance(KInstance *);
+ friend class TDEInstance;
+ void setInstance(TDEInstance *);
KMimeSourceFactoryPrivate* d;
};
diff --git a/tdecore/kmountpoint.cpp b/tdecore/kmountpoint.cpp
index 764f085a0..a9be89e76 100644
--- a/tdecore/kmountpoint.cpp
+++ b/tdecore/kmountpoint.cpp
@@ -158,7 +158,7 @@ KMountPoint::List KMountPoint::possibleMountPoints(int infoNeeded)
if (infoNeeded & NeedRealDeviceName)
{
if (mp->m_mountedFrom.startsWith("/"))
- mp->m_device = KStandardDirs::realPath(mp->m_mountedFrom);
+ mp->m_device = TDEStandardDirs::realPath(mp->m_mountedFrom);
}
// TODO: Strip trailing '/' ?
result.append(mp);
@@ -209,7 +209,7 @@ KMountPoint::List KMountPoint::possibleMountPoints(int infoNeeded)
if (infoNeeded & NeedRealDeviceName)
{
if (mp->m_mountedFrom.startsWith("/"))
- mp->m_device = KStandardDirs::realPath(mp->m_mountedFrom);
+ mp->m_device = TDEStandardDirs::realPath(mp->m_mountedFrom);
}
// TODO: Strip trailing '/' ?
result.append(mp);
@@ -256,7 +256,7 @@ KMountPoint::List KMountPoint::currentMountPoints(int infoNeeded)
if (infoNeeded & NeedRealDeviceName)
{
if (mp->m_mountedFrom.startsWith("/"))
- mp->m_device = KStandardDirs::realPath(mp->m_mountedFrom);
+ mp->m_device = TDEStandardDirs::realPath(mp->m_mountedFrom);
}
// TODO: Strip trailing '/' ?
result.append(mp);
@@ -320,7 +320,7 @@ KMountPoint::List KMountPoint::currentMountPoints(int infoNeeded)
if (infoNeeded & NeedRealDeviceName)
{
if (mp->m_mountedFrom.startsWith("/"))
- mp->m_device = KStandardDirs::realPath(mp->m_mountedFrom);
+ mp->m_device = TDEStandardDirs::realPath(mp->m_mountedFrom);
}
result.append(mp);
@@ -363,7 +363,7 @@ KMountPoint::List KMountPoint::currentMountPoints(int infoNeeded)
if (infoNeeded & NeedRealDeviceName)
{
if (mp->m_mountedFrom.startsWith("/"))
- mp->m_device = KStandardDirs::realPath(mp->m_mountedFrom);
+ mp->m_device = TDEStandardDirs::realPath(mp->m_mountedFrom);
}
// TODO: Strip trailing '/' ?
result.append(mp);
diff --git a/tdecore/kmountpoint.h b/tdecore/kmountpoint.h
index e68fb23ab..e35b042e6 100644
--- a/tdecore/kmountpoint.h
+++ b/tdecore/kmountpoint.h
@@ -32,11 +32,11 @@
* @author Waldo Bastian <bastian@kde.org>
* @since 3.2
*/
-class TDECORE_EXPORT KMountPoint : public KShared
+class TDECORE_EXPORT KMountPoint : public TDEShared
{
typedef signed long long int filesize_t;
public:
- typedef KSharedPtr<KMountPoint> Ptr;
+ typedef TDESharedPtr<KMountPoint> Ptr;
typedef TQValueList<Ptr> List;
public:
enum { NeedMountOptions = 1, NeedRealDeviceName = 2 };
diff --git a/tdecore/knotifyclient.cpp b/tdecore/knotifyclient.cpp
index bfde017af..b6f70bd23 100644
--- a/tdecore/knotifyclient.cpp
+++ b/tdecore/knotifyclient.cpp
@@ -23,10 +23,10 @@
#include <tqdatastream.h>
#include <tqptrstack.h>
-#include <kapplication.h>
+#include <tdeapplication.h>
#include <kstandarddirs.h>
-#include <kapplication.h>
-#include <kconfig.h>
+#include <tdeapplication.h>
+#include <tdeconfig.h>
#include <dcopclient.h>
#include <kdebug.h>
#include <kstaticdeleter.h>
@@ -51,12 +51,12 @@ static bool canAvoidStartupEvent( const TQString& event, const TQString& appname
return false;
}
// starttde event is in global events file
- static KConfig* configfile = appname != "ksmserver"
- ? new KConfig( appname + ".eventsrc", true, false )
- : new KConfig( "knotify.eventsrc", true, false );
- static KConfig* eventsfile = appname != "ksmserver"
- ? new KConfig( appname + "/eventsrc", true, false, "data" )
- : new KConfig( "knotify/eventsrc", true, false, "data" );
+ static TDEConfig* configfile = appname != "ksmserver"
+ ? new TDEConfig( appname + ".eventsrc", true, false )
+ : new TDEConfig( "knotify.eventsrc", true, false );
+ static TDEConfig* eventsfile = appname != "ksmserver"
+ ? new TDEConfig( appname + "/eventsrc", true, false, "data" )
+ : new TDEConfig( "knotify/eventsrc", true, false, "data" );
configfile->setGroup( event );
eventsfile->setGroup( event );
int ev1 = configfile->readNumEntry( "presentation", -2 );
@@ -178,7 +178,7 @@ int KNotifyClient::getPresentation(const TQString &eventname)
int present;
if (eventname.isEmpty()) return Default;
- KConfig eventsfile( KNotifyClient::instance()->instanceName()+".eventsrc", true, false);
+ TDEConfig eventsfile( KNotifyClient::instance()->instanceName()+".eventsrc", true, false);
eventsfile.setGroup(eventname);
present=eventsfile.readNumEntry("presentation", -1);
@@ -190,7 +190,7 @@ TQString KNotifyClient::getFile(const TQString &eventname, int present)
{
if (eventname.isEmpty()) return TQString::null;
- KConfig eventsfile( KNotifyClient::instance()->instanceName()+".eventsrc", true, false);
+ TDEConfig eventsfile( KNotifyClient::instance()->instanceName()+".eventsrc", true, false);
eventsfile.setGroup(eventname);
switch (present)
@@ -209,7 +209,7 @@ int KNotifyClient::getDefaultPresentation(const TQString &eventname)
int present;
if (eventname.isEmpty()) return Default;
- KConfig eventsfile( KNotifyClient::instance()->instanceName()+"/eventsrc", true, false, "data");
+ TDEConfig eventsfile( KNotifyClient::instance()->instanceName()+"/eventsrc", true, false, "data");
eventsfile.setGroup(eventname);
present=eventsfile.readNumEntry("default_presentation", -1);
@@ -221,7 +221,7 @@ TQString KNotifyClient::getDefaultFile(const TQString &eventname, int present)
{
if (eventname.isEmpty()) return TQString::null;
- KConfig eventsfile( KNotifyClient::instance()->instanceName()+"/eventsrc", true, false, "data");
+ TDEConfig eventsfile( KNotifyClient::instance()->instanceName()+"/eventsrc", true, false, "data");
eventsfile.setGroup(eventname);
switch (present)
@@ -241,7 +241,7 @@ bool KNotifyClient::startDaemon()
if (!kapp->dcopClient()->isApplicationRegistered(daemonName)) {
if( firstTry ) {
firstTry = false;
- return KApplication::startServiceByDesktopName(daemonName) == 0;
+ return TDEApplication::startServiceByDesktopName(daemonName) == 0;
}
return false;
}
@@ -277,7 +277,7 @@ void KNotifyClient::beep(const TQString& reason)
}
-KInstance * KNotifyClient::instance() {
+TDEInstance * KNotifyClient::instance() {
return KNotifyClient::Instance::current();
}
@@ -296,7 +296,7 @@ public:
else if (!m_instances.isEmpty())
{
kdWarning(160) << "Tried to remove an Instance that is not the current," << endl;
- kdWarning(160) << "Resetting to the main KApplication." << endl;
+ kdWarning(160) << "Resetting to the main TDEApplication." << endl;
m_instances.clear();
}
else
@@ -322,18 +322,18 @@ static KStaticDeleter<KNotifyClient::InstanceStack > instancesDeleter;
struct KNotifyClient::InstancePrivate
{
- KInstance *instance;
+ TDEInstance *instance;
bool useSystemBell;
};
-KNotifyClient::Instance::Instance(KInstance *instance)
+KNotifyClient::Instance::Instance(TDEInstance *instance)
{
d = new InstancePrivate;
d->instance = instance;
instances()->push(this);
- KConfig *config = instance->config();
- KConfigGroupSaver cs( config, "General" );
+ TDEConfig *config = instance->config();
+ TDEConfigGroupSaver cs( config, "General" );
d->useSystemBell = config->readBoolEntry( "UseSystemBell", false );
}
@@ -360,7 +360,7 @@ bool KNotifyClient::Instance::useSystemBell() const
// static methods
// We always return a valid KNotifyClient::Instance here. If no special one
-// is available, we have a default-instance with kapp as KInstance.
+// is available, we have a default-instance with kapp as TDEInstance.
// We make sure to always have that default-instance in the stack, because
// the stack might have gotten cleared in the destructor.
// We can't use QStack::setAutoDelete( true ), because no instance besides
@@ -370,7 +370,7 @@ KNotifyClient::Instance * KNotifyClient::Instance::currentInstance()
return instances()->currentInstance();
}
-KInstance *KNotifyClient::Instance::current()
+TDEInstance *KNotifyClient::Instance::current()
{
return currentInstance()->d->instance;
}
diff --git a/tdecore/knotifyclient.h b/tdecore/knotifyclient.h
index 1eeebbb0a..ff96b020a 100644
--- a/tdecore/knotifyclient.h
+++ b/tdecore/knotifyclient.h
@@ -20,7 +20,7 @@
#include <tqstring.h>
#include "tdelibs_export.h"
-class KInstance;
+class TDEInstance;
#undef None // X11 headers...
/**
@@ -82,7 +82,7 @@ namespace KNotifyClient
class InstanceStack;
/**
- * Makes it possible to use KNotifyClient with a KInstance
+ * Makes it possible to use KNotifyClient with a TDEInstance
* that is not the application.
*
* Use like this:
@@ -91,20 +91,20 @@ namespace KNotifyClient
* KNotifyClient::event("MyEvent");
* \endcode
*
- * @short Enables KNotifyClient to use a different KInstance
+ * @short Enables KNotifyClient to use a different TDEInstance
*/
class TDECORE_EXPORT Instance
{
public:
/**
* Constructs a KNotifyClient::Instance to make KNotifyClient use
- * the specified KInstance for the event configuration.
+ * the specified TDEInstance for the event configuration.
* @param instance the instance for the event configuration
*/
- Instance(KInstance *instance);
+ Instance(TDEInstance *instance);
/**
* Destructs the KNotifyClient::Instance and resets KNotifyClient
- * to the previously used KInstance.
+ * to the previously used TDEInstance.
*/
~Instance();
/**
@@ -114,13 +114,13 @@ namespace KNotifyClient
*/
bool useSystemBell() const;
/**
- * Returns the currently active KInstance.
- * @return the active KInstance
+ * Returns the currently active TDEInstance.
+ * @return the active TDEInstance
*/
- static KInstance *current();
+ static TDEInstance *current();
/**
- * Returns the current KNotifyClient::Instance (not the KInstance).
+ * Returns the current KNotifyClient::Instance (not the TDEInstance).
* @return the active Instance
*/
static Instance *currentInstance();
@@ -217,7 +217,7 @@ namespace KNotifyClient
* placed appropriately.
*
* Call it by KNotifyClient::event(widget->winId(), "EventName");
- * It will use KApplication::kApplication->dcopClient() to communicate to
+ * It will use TDEApplication::kApplication->dcopClient() to communicate to
* the server
* @param winId The winId() of the widget where the event originates
* @param message The name of the event
@@ -317,9 +317,9 @@ namespace KNotifyClient
/**
* Shortcut to KNotifyClient::Instance::current() :)
- * @returns the current KInstance.
+ * @returns the current TDEInstance.
*/
- TDECORE_EXPORT KInstance * instance();
+ TDECORE_EXPORT TDEInstance * instance();
}
#endif
diff --git a/tdecore/kpalette.cpp b/tdecore/kpalette.cpp
index 073dff626..7335e8e14 100644
--- a/tdecore/kpalette.cpp
+++ b/tdecore/kpalette.cpp
@@ -24,7 +24,7 @@
#include <tqfile.h>
#include <tqtextstream.h>
#include <kstandarddirs.h>
-#include <kglobal.h>
+#include <tdeglobal.h>
#include <ksavefile.h>
#include <kstringhandler.h>
@@ -34,7 +34,7 @@ TQStringList
KPalette::getPaletteList()
{
TQStringList paletteList;
- KGlobal::dirs()->findAllResources("config", "colors/*", false, true, paletteList);
+ TDEGlobal::dirs()->findAllResources("config", "colors/*", false, true, paletteList);
int strip = strlen("colors/");
for(TQStringList::Iterator it = paletteList.begin();
diff --git a/tdecore/kpixmapprovider.h b/tdecore/kpixmapprovider.h
index 009f1ed75..f01466315 100644
--- a/tdecore/kpixmapprovider.h
+++ b/tdecore/kpixmapprovider.h
@@ -43,7 +43,7 @@ public:
* You may subclass this and return a pixmap of size @p size for @p text.
* @param text the text that is associated with the pixmap
* @param size the size of the icon in pixels, 0 for defaylt size.
- * See KIcon::StdSize.
+ * See TDEIcon::StdSize.
* @return the pixmap for the arguments, or null if there is none
*/
virtual TQPixmap pixmapFor( const TQString& text, int size = 0 ) = 0;
diff --git a/tdecore/kprocctrl.cpp b/tdecore/kprocctrl.cpp
index d8170c0a8..76ad0b167 100644
--- a/tdecore/kprocctrl.cpp
+++ b/tdecore/kprocctrl.cpp
@@ -33,29 +33,29 @@
#include <tqsocketnotifier.h>
-KProcessController *KProcessController::theKProcessController;
-int KProcessController::refCount;
+TDEProcessController *TDEProcessController::theTDEProcessController;
+int TDEProcessController::refCount;
-void KProcessController::ref()
+void TDEProcessController::ref()
{
if( !refCount ) {
- theKProcessController = new KProcessController;
+ theTDEProcessController = new TDEProcessController;
setupHandlers();
}
refCount++;
}
-void KProcessController::deref()
+void TDEProcessController::deref()
{
refCount--;
if( !refCount ) {
resetHandlers();
- delete theKProcessController;
- theKProcessController = 0;
+ delete theTDEProcessController;
+ theTDEProcessController = 0;
}
}
-KProcessController::KProcessController()
+TDEProcessController::TDEProcessController()
: needcheck( false )
{
if( pipe( fd ) )
@@ -75,7 +75,7 @@ KProcessController::KProcessController()
TQT_SLOT(slotDoHousekeeping()));
}
-KProcessController::~KProcessController()
+TDEProcessController::~TDEProcessController()
{
delete notifier;
@@ -87,16 +87,16 @@ KProcessController::~KProcessController()
extern "C" {
static void theReaper( int num )
{
- KProcessController::theSigCHLDHandler( num );
+ TDEProcessController::theSigCHLDHandler( num );
}
}
#ifdef Q_OS_UNIX
-struct sigaction KProcessController::oldChildHandlerData;
+struct sigaction TDEProcessController::oldChildHandlerData;
#endif
-bool KProcessController::handlerSet = false;
+bool TDEProcessController::handlerSet = false;
-void KProcessController::setupHandlers()
+void TDEProcessController::setupHandlers()
{
if( handlerSet )
return;
@@ -127,7 +127,7 @@ void KProcessController::setupHandlers()
#endif
}
-void KProcessController::resetHandlers()
+void TDEProcessController::resetHandlers()
{
if( !handlerSet )
return;
@@ -144,12 +144,12 @@ void KProcessController::resetHandlers()
// the pipe is needed to sync the child reaping with our event processing,
// as otherwise there are race conditions, locking requirements, and things
// generally get harder
-void KProcessController::theSigCHLDHandler( int arg )
+void TDEProcessController::theSigCHLDHandler( int arg )
{
int saved_errno = errno;
char dummy = 0;
- ::write( theKProcessController->fd[1], &dummy, 1 );
+ ::write( theTDEProcessController->fd[1], &dummy, 1 );
#ifdef Q_OS_UNIX
if( oldChildHandlerData.sa_handler != SIG_IGN &&
@@ -162,12 +162,12 @@ void KProcessController::theSigCHLDHandler( int arg )
errno = saved_errno;
}
-int KProcessController::notifierFd() const
+int TDEProcessController::notifierFd() const
{
return fd[0];
}
-void KProcessController::unscheduleCheck()
+void TDEProcessController::unscheduleCheck()
{
char dummy[16]; // somewhat bigger - just in case several have queued up
if( ::read( fd[0], dummy, sizeof(dummy) ) > 0 )
@@ -175,7 +175,7 @@ void KProcessController::unscheduleCheck()
}
void
-KProcessController::rescheduleCheck()
+TDEProcessController::rescheduleCheck()
{
if( needcheck )
{
@@ -185,23 +185,23 @@ KProcessController::rescheduleCheck()
}
}
-void KProcessController::slotDoHousekeeping()
+void TDEProcessController::slotDoHousekeeping()
{
char dummy[16]; // somewhat bigger - just in case several have queued up
::read( fd[0], dummy, sizeof(dummy) );
int status;
again:
- TQValueListIterator<KProcess*> it( kProcessList.begin() );
- TQValueListIterator<KProcess*> eit( kProcessList.end() );
+ TQValueListIterator<TDEProcess*> it( kProcessList.begin() );
+ TQValueListIterator<TDEProcess*> eit( kProcessList.end() );
while( it != eit )
{
- KProcess *prc = *it;
+ TDEProcess *prc = *it;
if( prc->runs && waitpid( prc->pid_, &status, WNOHANG ) > 0 )
{
prc->processHasExited( status );
// the callback can nuke the whole process list and even 'this'
- if (!theKProcessController)
+ if (!theTDEProcessController)
return;
goto again;
}
@@ -220,7 +220,7 @@ void KProcessController::slotDoHousekeeping()
}
}
-bool KProcessController::waitForProcessExit( int timeout )
+bool TDEProcessController::waitForProcessExit( int timeout )
{
#ifdef Q_OS_UNIX
for(;;)
@@ -258,20 +258,20 @@ bool KProcessController::waitForProcessExit( int timeout )
#endif
}
-void KProcessController::addKProcess( KProcess* p )
+void TDEProcessController::addTDEProcess( TDEProcess* p )
{
kProcessList.append( p );
}
-void KProcessController::removeKProcess( KProcess* p )
+void TDEProcessController::removeTDEProcess( TDEProcess* p )
{
kProcessList.remove( p );
}
-void KProcessController::addProcess( int pid )
+void TDEProcessController::addProcess( int pid )
{
unixProcessList.append( pid );
- ref(); // make sure we stay around when the KProcess goes away
+ ref(); // make sure we stay around when the TDEProcess goes away
}
#include "kprocctrl.moc"
diff --git a/tdecore/kprocctrl.h b/tdecore/kprocctrl.h
index 9a596334b..1cb6cc302 100644
--- a/tdecore/kprocctrl.h
+++ b/tdecore/kprocctrl.h
@@ -27,29 +27,29 @@
class TQSocketNotifier;
/**
- * @short Used internally by KProcess
+ * @short Used internally by TDEProcess
* @internal
* @author Christian Czezatke <e9025461@student.tuwien.ac.at>
*
- * A class for internal use by KProcess only. -- Exactly one instance
- * of this class is created by KApplication.
+ * A class for internal use by TDEProcess only. -- Exactly one instance
+ * of this class is created by TDEApplication.
*
* This class takes care of the actual (UN*X) signal handling.
*/
-class TDECORE_EXPORT KProcessController : public TQObject
+class TDECORE_EXPORT TDEProcessController : public TQObject
{
Q_OBJECT
public:
/**
* Create an instance if none exists yet.
- * Called by KApplication::KApplication()
+ * Called by TDEApplication::TDEApplication()
*/
static void ref();
/**
* Destroy the instance if one exists and it is not referenced any more.
- * Called by KApplication::~KApplication()
+ * Called by TDEApplication::~TDEApplication()
*/
static void deref();
@@ -57,7 +57,7 @@ public:
* Only a single instance of this class is allowed at a time,
* and this static variable is used to track the one instance.
*/
- static KProcessController *theKProcessController; // kde4: rename: instance
+ static TDEProcessController *theTDEProcessController; // kde4: rename: instance
/**
* Automatically called upon SIGCHLD. Never call it directly.
@@ -71,7 +71,7 @@ public:
/**
* Wait for any process to exit and handle their exit without
* starting an event loop.
- * This function may cause KProcess to emit any of its signals.
+ * This function may cause TDEProcess to emit any of its signals.
*
* @param timeout the timeout in seconds. -1 means no timeout.
* @return true if a process exited, false
@@ -95,7 +95,7 @@ public:
void rescheduleCheck();
/*
- * Obtain the file descriptor KProcessController uses to get notified
+ * Obtain the file descriptor TDEProcessController uses to get notified
* about process exits. select() or poll() on it if you create a custom
* event loop that needs to act upon SIGCHLD.
* @return the file descriptor of the reading end of the notification pipe
@@ -106,11 +106,11 @@ public:
/**
* @internal
*/
- void addKProcess( KProcess* );
+ void addTDEProcess( TDEProcess* );
/**
* @internal
*/
- void removeKProcess( KProcess* );
+ void removeTDEProcess( TDEProcess* );
/**
* @internal
*/
@@ -125,7 +125,7 @@ private:
int fd[2];
bool needcheck;
TQSocketNotifier *notifier;
- TQValueList<KProcess*> kProcessList;
+ TQValueList<TDEProcess*> kProcessList;
TQValueList<int> unixProcessList;
static void setupHandlers();
@@ -136,12 +136,12 @@ private:
static int refCount;
// Disallow instantiation
- KProcessController();
- ~KProcessController();
+ TDEProcessController();
+ ~TDEProcessController();
// Disallow assignment and copy-construction
- KProcessController( const KProcessController& );
- KProcessController& operator= ( const KProcessController& );
+ TDEProcessController( const TDEProcessController& );
+ TDEProcessController& operator= ( const TDEProcessController& );
};
diff --git a/tdecore/kprocess.cpp b/tdecore/kprocess.cpp
index 3658116ab..b899c637f 100644
--- a/tdecore/kprocess.cpp
+++ b/tdecore/kprocess.cpp
@@ -85,10 +85,10 @@
// private data //
//////////////////
-class KProcessPrivate {
+class TDEProcessPrivate {
public:
- KProcessPrivate() :
- usePty(KProcess::NoCommunication),
+ TDEProcessPrivate() :
+ usePty(TDEProcess::NoCommunication),
addUtmp(false), useShell(false),
#ifdef Q_OS_UNIX
pty(0),
@@ -97,7 +97,7 @@ public:
{
}
- KProcess::Communication usePty;
+ TDEProcess::Communication usePty;
bool addUtmp : 1;
bool useShell : 1;
@@ -117,7 +117,7 @@ public:
// public member functions //
/////////////////////////////
-KProcess::KProcess( TQObject* parent, const char *name )
+TDEProcess::TDEProcess( TQObject* parent, const char *name )
: TQObject( parent, name ),
run_mode(NotifyOnExit),
runs(false),
@@ -132,17 +132,17 @@ KProcess::KProcess( TQObject* parent, const char *name )
input_sent(0),
input_total(0)
{
- KProcessController::ref();
- KProcessController::theKProcessController->addKProcess(this);
+ TDEProcessController::ref();
+ TDEProcessController::theTDEProcessController->addTDEProcess(this);
- d = new KProcessPrivate;
+ d = new TDEProcessPrivate;
out[0] = out[1] = -1;
in[0] = in[1] = -1;
err[0] = err[1] = -1;
}
-KProcess::KProcess()
+TDEProcess::TDEProcess()
: TQObject(),
run_mode(NotifyOnExit),
runs(false),
@@ -157,10 +157,10 @@ KProcess::KProcess()
input_sent(0),
input_total(0)
{
- KProcessController::ref();
- KProcessController::theKProcessController->addKProcess(this);
+ TDEProcessController::ref();
+ TDEProcessController::theTDEProcessController->addTDEProcess(this);
- d = new KProcessPrivate;
+ d = new TDEProcessPrivate;
out[0] = out[1] = -1;
in[0] = in[1] = -1;
@@ -168,19 +168,19 @@ KProcess::KProcess()
}
void
-KProcess::setEnvironment(const TQString &name, const TQString &value)
+TDEProcess::setEnvironment(const TQString &name, const TQString &value)
{
d->env.insert(name, value);
}
void
-KProcess::setWorkingDirectory(const TQString &dir)
+TDEProcess::setWorkingDirectory(const TQString &dir)
{
d->wd = dir;
}
void
-KProcess::setupEnvironment()
+TDEProcess::setupEnvironment()
{
TQMap<TQString,TQString>::Iterator it;
for(it = d->env.begin(); it != d->env.end(); ++it)
@@ -195,19 +195,19 @@ KProcess::setupEnvironment()
}
void
-KProcess::setRunPrivileged(bool keepPrivileges)
+TDEProcess::setRunPrivileged(bool keepPrivileges)
{
keepPrivs = keepPrivileges;
}
bool
-KProcess::runPrivileged() const
+TDEProcess::runPrivileged() const
{
return keepPrivs;
}
bool
-KProcess::setPriority(int prio)
+TDEProcess::setPriority(int prio)
{
#ifdef Q_OS_UNIX
if (runs) {
@@ -222,7 +222,7 @@ KProcess::setPriority(int prio)
return true;
}
-KProcess::~KProcess()
+TDEProcess::~TDEProcess()
{
if (run_mode != DontCare)
kill(SIGKILL);
@@ -233,26 +233,26 @@ KProcess::~KProcess()
#endif
delete d;
- KProcessController::theKProcessController->removeKProcess(this);
- KProcessController::deref();
+ TDEProcessController::theTDEProcessController->removeTDEProcess(this);
+ TDEProcessController::deref();
}
-void KProcess::detach()
+void TDEProcess::detach()
{
if (runs) {
- KProcessController::theKProcessController->addProcess(pid_);
+ TDEProcessController::theTDEProcessController->addProcess(pid_);
runs = false;
pid_ = 0; // close without draining
commClose(); // Clean up open fd's and socket notifiers.
}
}
-void KProcess::setBinaryExecutable(const char *filename)
+void TDEProcess::setBinaryExecutable(const char *filename)
{
d->executable = filename;
}
-bool KProcess::setExecutable(const TQString& proc)
+bool TDEProcess::setExecutable(const TQString& proc)
{
if (runs) return false;
@@ -265,7 +265,7 @@ bool KProcess::setExecutable(const TQString& proc)
return true;
}
-KProcess &KProcess::operator<<(const TQStringList& args)
+TDEProcess &TDEProcess::operator<<(const TQStringList& args)
{
TQStringList::ConstIterator it = args.begin();
for ( ; it != args.end() ; ++it )
@@ -273,29 +273,29 @@ KProcess &KProcess::operator<<(const TQStringList& args)
return *this;
}
-KProcess &KProcess::operator<<(const TQCString& arg)
+TDEProcess &TDEProcess::operator<<(const TQCString& arg)
{
return operator<< (arg.data());
}
-KProcess &KProcess::operator<<(const char* arg)
+TDEProcess &TDEProcess::operator<<(const char* arg)
{
arguments.append(arg);
return *this;
}
-KProcess &KProcess::operator<<(const TQString& arg)
+TDEProcess &TDEProcess::operator<<(const TQString& arg)
{
arguments.append(TQFile::encodeName(arg));
return *this;
}
-void KProcess::clearArguments()
+void TDEProcess::clearArguments()
{
arguments.clear();
}
-bool KProcess::start(RunMode runmode, Communication comm)
+bool TDEProcess::start(RunMode runmode, Communication comm)
{
if (runs) {
kdDebug(175) << "Attempted to start an already running process" << endl;
@@ -454,11 +454,11 @@ bool KProcess::start(RunMode runmode, Communication comm)
if (!runs)
{
// commClose detected data on the process exit notifification pipe
- KProcessController::theKProcessController->unscheduleCheck();
+ TDEProcessController::theTDEProcessController->unscheduleCheck();
if (waitpid(pid_, &status, WNOHANG) != 0) // error finishes, too
{
commClose(); // this time for real (runs is false)
- KProcessController::theKProcessController->rescheduleCheck();
+ TDEProcessController::theTDEProcessController->rescheduleCheck();
break;
}
runs = true; // for next commClose() iteration
@@ -490,7 +490,7 @@ bool KProcess::start(RunMode runmode, Communication comm)
-bool KProcess::kill(int signo)
+bool TDEProcess::kill(int signo)
{
#ifdef Q_OS_UNIX
if (runs && pid_ > 0 && !::kill(run_mode == OwnGroup ? -pid_ : pid_, signo))
@@ -501,14 +501,14 @@ bool KProcess::kill(int signo)
-bool KProcess::isRunning() const
+bool TDEProcess::isRunning() const
{
return runs;
}
-pid_t KProcess::pid() const
+pid_t TDEProcess::pid() const
{
return pid_;
}
@@ -525,7 +525,7 @@ pid_t KProcess::pid() const
} while (0)
#endif
-bool KProcess::wait(int timeout)
+bool TDEProcess::wait(int timeout)
{
if (!runs)
return true;
@@ -549,7 +549,7 @@ bool KProcess::wait(int timeout)
}
#ifdef Q_OS_UNIX
- int fd = KProcessController::theKProcessController->notifierFd();
+ int fd = TDEProcessController::theTDEProcessController->notifierFd();
for(;;)
{
fd_set fds;
@@ -573,14 +573,14 @@ bool KProcess::wait(int timeout)
break;
// fall through; should happen if tvp->tv_sec < 0
case 0:
- KProcessController::theKProcessController->rescheduleCheck();
+ TDEProcessController::theTDEProcessController->rescheduleCheck();
return false;
default:
- KProcessController::theKProcessController->unscheduleCheck();
+ TDEProcessController::theTDEProcessController->unscheduleCheck();
if (waitpid(pid_, &status, WNOHANG) != 0) // error finishes, too
{
processHasExited(status);
- KProcessController::theKProcessController->rescheduleCheck();
+ TDEProcessController::theTDEProcessController->rescheduleCheck();
return true;
}
}
@@ -591,19 +591,19 @@ bool KProcess::wait(int timeout)
-bool KProcess::normalExit() const
+bool TDEProcess::normalExit() const
{
return (pid_ != 0) && !runs && WIFEXITED(status);
}
-bool KProcess::signalled() const
+bool TDEProcess::signalled() const
{
return (pid_ != 0) && !runs && WIFSIGNALED(status);
}
-bool KProcess::coreDumped() const
+bool TDEProcess::coreDumped() const
{
#ifdef WCOREDUMP
return signalled() && WCOREDUMP(status);
@@ -613,19 +613,19 @@ bool KProcess::coreDumped() const
}
-int KProcess::exitStatus() const
+int TDEProcess::exitStatus() const
{
return WEXITSTATUS(status);
}
-int KProcess::exitSignal() const
+int TDEProcess::exitSignal() const
{
return WTERMSIG(status);
}
-bool KProcess::writeStdin(const char *buffer, int buflen)
+bool TDEProcess::writeStdin(const char *buffer, int buflen)
{
// if there is still data pending, writing new data
// to stdout is not allowed (since it could also confuse
@@ -645,19 +645,19 @@ bool KProcess::writeStdin(const char *buffer, int buflen)
return false;
}
-void KProcess::suspend()
+void TDEProcess::suspend()
{
if (outnot)
outnot->setEnabled(false);
}
-void KProcess::resume()
+void TDEProcess::resume()
{
if (outnot)
outnot->setEnabled(true);
}
-bool KProcess::closeStdin()
+bool TDEProcess::closeStdin()
{
if (communication & Stdin) {
communication = (Communication) (communication & ~Stdin);
@@ -671,7 +671,7 @@ bool KProcess::closeStdin()
return false;
}
-bool KProcess::closeStdout()
+bool TDEProcess::closeStdout()
{
if (communication & Stdout) {
communication = (Communication) (communication & ~Stdout);
@@ -685,7 +685,7 @@ bool KProcess::closeStdout()
return false;
}
-bool KProcess::closeStderr()
+bool TDEProcess::closeStderr()
{
if (communication & Stderr) {
communication = (Communication) (communication & ~Stderr);
@@ -699,7 +699,7 @@ bool KProcess::closeStderr()
return false;
}
-bool KProcess::closePty()
+bool TDEProcess::closePty()
{
#ifdef Q_OS_UNIX
if (d->pty && d->pty->masterFd() >= 0) {
@@ -714,7 +714,7 @@ bool KProcess::closePty()
#endif
}
-void KProcess::closeAll()
+void TDEProcess::closeAll()
{
closeStdin();
closeStdout();
@@ -728,21 +728,21 @@ void KProcess::closeAll()
-void KProcess::slotChildOutput(int fdno)
+void TDEProcess::slotChildOutput(int fdno)
{
if (!childOutput(fdno))
closeStdout();
}
-void KProcess::slotChildError(int fdno)
+void TDEProcess::slotChildError(int fdno)
{
if (!childError(fdno))
closeStderr();
}
-void KProcess::slotSendData(int)
+void TDEProcess::slotSendData(int)
{
if (input_sent == input_total) {
innot->setEnabled(false);
@@ -762,7 +762,7 @@ void KProcess::slotSendData(int)
}
}
-void KProcess::setUseShell(bool useShell, const char *shell)
+void TDEProcess::setUseShell(bool useShell, const char *shell)
{
d->useShell = useShell;
if (shell && *shell)
@@ -787,7 +787,7 @@ void KProcess::setUseShell(bool useShell, const char *shell)
}
#ifdef Q_OS_UNIX
-void KProcess::setUsePty(Communication usePty, bool addUtmp)
+void TDEProcess::setUsePty(Communication usePty, bool addUtmp)
{
d->usePty = usePty;
d->addUtmp = addUtmp;
@@ -800,13 +800,13 @@ void KProcess::setUsePty(Communication usePty, bool addUtmp)
}
}
-KPty *KProcess::pty() const
+KPty *TDEProcess::pty() const
{
return d->pty;
}
#endif //Q_OS_UNIX
-TQString KProcess::quote(const TQString &arg)
+TQString TDEProcess::quote(const TQString &arg)
{
TQChar q('\'');
return TQString(arg).replace(q, "'\\''").prepend(q).append(q);
@@ -818,7 +818,7 @@ TQString KProcess::quote(const TQString &arg)
//////////////////////////////
-void KProcess::processHasExited(int state)
+void TDEProcess::processHasExited(int state)
{
// only successfully run NotifyOnExit processes ever get here
@@ -833,7 +833,7 @@ void KProcess::processHasExited(int state)
-int KProcess::childOutput(int fdno)
+int TDEProcess::childOutput(int fdno)
{
if (communication & NoRead) {
int len = -1;
@@ -856,7 +856,7 @@ int KProcess::childOutput(int fdno)
}
}
-int KProcess::childError(int fdno)
+int TDEProcess::childError(int fdno)
{
char buffer[1025];
int len;
@@ -871,7 +871,7 @@ int KProcess::childError(int fdno)
}
-int KProcess::setupCommunication(Communication comm)
+int TDEProcess::setupCommunication(Communication comm)
{
#ifdef Q_OS_UNIX
// PTY stuff //
@@ -939,7 +939,7 @@ int KProcess::setupCommunication(Communication comm)
-int KProcess::commSetupDoneP()
+int TDEProcess::commSetupDoneP()
{
int rcomm = communication & ~d->usePty;
if (rcomm & Stdin)
@@ -984,7 +984,7 @@ int KProcess::commSetupDoneP()
-int KProcess::commSetupDoneC()
+int TDEProcess::commSetupDoneC()
{
int ok = 1;
#ifdef Q_OS_UNIX
@@ -1034,7 +1034,7 @@ int KProcess::commSetupDoneC()
-void KProcess::commClose()
+void TDEProcess::commClose()
{
closeStdin();
@@ -1044,7 +1044,7 @@ void KProcess::commClose()
// buffer doesn't fill up whilst we are waiting for data on the other
// (causing a deadlock). Hence we need to use select.
- int notfd = KProcessController::theKProcessController->notifierFd();
+ int notfd = TDEProcessController::theTDEProcessController->notifierFd();
while ((communication & (Stdout | Stderr)) || runs) {
fd_set rfds;
@@ -1104,7 +1104,7 @@ void KProcess::commClose()
}
-void KProcess::virtual_hook( int, void* )
+void TDEProcess::virtual_hook( int, void* )
{ /*BASE::virtual_hook( id, data );*/ }
@@ -1113,7 +1113,7 @@ void KProcess::virtual_hook( int, void* )
///////////////////////////
KShellProcess::KShellProcess(const char *shellname):
- KProcess()
+ TDEProcess()
{
setUseShell( true, shellname ? shellname : getenv("SHELL") );
}
@@ -1123,15 +1123,15 @@ KShellProcess::~KShellProcess() {
TQString KShellProcess::quote(const TQString &arg)
{
- return KProcess::quote(arg);
+ return TDEProcess::quote(arg);
}
bool KShellProcess::start(RunMode runmode, Communication comm)
{
- return KProcess::start(runmode, comm);
+ return TDEProcess::start(runmode, comm);
}
void KShellProcess::virtual_hook( int id, void* data )
-{ KProcess::virtual_hook( id, data ); }
+{ TDEProcess::virtual_hook( id, data ); }
#include "kprocess.moc"
diff --git a/tdecore/kprocess.h b/tdecore/kprocess.h
index 7e9941717..ae4a25af6 100644
--- a/tdecore/kprocess.h
+++ b/tdecore/kprocess.h
@@ -30,7 +30,7 @@
#include "tdelibs_export.h"
class TQSocketNotifier;
-class KProcessPrivate;
+class TDEProcessPrivate;
#ifdef Q_OS_UNIX
#include <kpty.h>
@@ -60,15 +60,15 @@ class KPty;
* @li NotifyOnExit -- The child process is invoked and both the
* child and the parent process run concurrently.
*
- * When the child process exits, the KProcess instance
+ * When the child process exits, the TDEProcess instance
* corresponding to it emits the Qt signal processExited().
* Since this signal is @em not emitted from within a UN*X
* signal handler, arbitrary function calls can be made.
*
- * Be aware: When the KProcess object gets destructed, the child
+ * Be aware: When the TDEProcess object gets destructed, the child
* process will be killed if it is still running!
* This means in particular, that it usually makes no sense to use
- * a KProcess on the stack with NotifyOnExit.
+ * a TDEProcess on the stack with NotifyOnExit.
*
* @li OwnGroup -- like NotifyOnExit, but the child process is started
* in an own process group (and an own session, FWIW). The behavior of
@@ -84,7 +84,7 @@ class KPty;
* In this mode the parent can read the child's output, but can't send it any
* input.
*
- * KProcess also provides several functions for determining the exit status
+ * TDEProcess also provides several functions for determining the exit status
* and the pid of the child process it represents.
*
* Furthermore it is possible to supply command-line arguments to the process
@@ -92,12 +92,12 @@ class KPty;
*
* A small usage example:
* \code
- * KProcess *proc = new KProcess;
+ * TDEProcess *proc = new TDEProcess;
*
* *proc << "my_executable";
* *proc << "These" << "are" << "the" << "command" << "line" << "args";
- * TQApplication::connect(proc, TQT_SIGNAL(processExited(KProcess *)),
- * pointer_to_my_object, TQT_SLOT(my_objects_slot(KProcess *)));
+ * TQApplication::connect(proc, TQT_SIGNAL(processExited(TDEProcess *)),
+ * pointer_to_my_object, TQT_SLOT(my_objects_slot(TDEProcess *)));
* proc->start();
* \endcode
*
@@ -107,7 +107,7 @@ class KPty;
*
* <b>Communication with the child process:</b>\n
*
- * KProcess supports communication with the child process through
+ * TDEProcess supports communication with the child process through
* stdin/stdout/stderr.
*
* The following functions are provided for getting data from the child
@@ -127,7 +127,7 @@ class KPty;
* @author Christian Czezatke e9025461@student.tuwien.ac.at
*
**/
-class TDECORE_EXPORT KProcess : public TQObject
+class TDECORE_EXPORT TDEProcess : public TQObject
{
Q_OBJECT
@@ -191,12 +191,12 @@ public:
* Constructor
* @since 3.2
*/
- KProcess( TQObject* parent, const char *name = 0 );
+ TDEProcess( TQObject* parent, const char *name = 0 );
/**
* Constructor
*/ // KDE4 merge with the above
- KProcess();
+ TDEProcess();
/**
*Destructor:
@@ -206,13 +206,13 @@ public:
* only if the run mode is not of type @p DontCare.
* Processes started as @p DontCare keep running anyway.
*/
- virtual ~KProcess();
+ virtual ~TDEProcess();
/**
@deprecated
Use operator<<() instead.
- Sets the executable to be started with this KProcess object.
+ Sets the executable to be started with this TDEProcess object.
Returns false if the process is currently running (in that
case the executable remains unchanged).
@@ -227,33 +227,33 @@ public:
*
* For example, doing an "ls -l /usr/local/bin" can be achieved by:
* \code
- * KProcess p;
+ * TDEProcess p;
* ...
* p << "ls" << "-l" << "/usr/local/bin"
* \endcode
*
* @param arg the argument to add
- * @return a reference to this KProcess
+ * @return a reference to this TDEProcess
**/
- KProcess &operator<<(const TQString& arg);
+ TDEProcess &operator<<(const TQString& arg);
/**
* Similar to previous method, takes a char *, supposed to be in locale 8 bit already.
*/
- KProcess &operator<<(const char * arg);
+ TDEProcess &operator<<(const char * arg);
/**
* Similar to previous method, takes a TQCString, supposed to be in locale 8 bit already.
* @param arg the argument to add
- * @return a reference to this KProcess
+ * @return a reference to this TDEProcess
*/
- KProcess &operator<<(const TQCString & arg);
+ TDEProcess &operator<<(const TQCString & arg);
/**
* Sets the executable and the command line argument list for this process,
* in a single method call, or add a list of arguments.
* @param args the arguments to add
- * @return a reference to this KProcess
+ * @return a reference to this TDEProcess
**/
- KProcess &operator<<(const TQStringList& args);
+ TDEProcess &operator<<(const TQStringList& args);
/**
* Clear a command line argument list that has been set by using
@@ -265,7 +265,7 @@ public:
* Starts the process.
* For a detailed description of the
* various run modes and communication semantics, have a look at the
- * general description of the KProcess class. Note that if you use
+ * general description of the TDEProcess class. Note that if you use
* setUsePty( Stdout | Stderr, \<bool\> ), you cannot use Stdout | Stderr
* here - instead, use Stdout only to receive the mixed output.
*
@@ -308,10 +308,10 @@ public:
*
* If it is called after
* the process has exited, it returns the process id of the last
- * child process that was created by this instance of KProcess.
+ * child process that was created by this instance of TDEProcess.
*
* Calling it before any child process has been started by this
- * KProcess instance causes pid() to return 0.
+ * TDEProcess instance causes pid() to return 0.
* @return the pid of the process or 0 if no process has been started yet.
**/
pid_t pid() const;
@@ -535,9 +535,9 @@ public:
static TQString quote(const TQString &arg);
/**
- * Detaches KProcess from child process. All communication is closed.
+ * Detaches TDEProcess from child process. All communication is closed.
* No exit notification is emitted any more for the child process.
- * Deleting the KProcess will no longer kill the child process.
+ * Deleting the TDEProcess will no longer kill the child process.
* Note that the current process remains the parent process of the
* child process.
*/
@@ -588,7 +588,7 @@ signals:
* start() ) or the Block mode.
* @param proc a pointer to the process that has exited
**/
- void processExited(KProcess *proc);
+ void processExited(TDEProcess *proc);
/**
@@ -609,7 +609,7 @@ signals:
* TQString myBuf = TQString::fromLatin1(buffer, buflen);
* \endcode
**/
- void receivedStdout(KProcess *proc, char *buffer, int buflen);
+ void receivedStdout(TDEProcess *proc, char *buffer, int buflen);
/**
* Emitted when output from the child process has
@@ -646,7 +646,7 @@ signals:
* @param buffer The data received.
* @param buflen The number of bytes that are available.
**/
- void receivedStderr(KProcess *proc, char *buffer, int buflen);
+ void receivedStderr(TDEProcess *proc, char *buffer, int buflen);
/**
* Emitted after all the data that has been
@@ -654,7 +654,7 @@ signals:
* written to the child process.
* @param proc a pointer to the process
**/
- void wroteStdin(KProcess *proc);
+ void wroteStdin(TDEProcess *proc);
protected slots:
@@ -703,7 +703,7 @@ protected:
* true if the process is currently running. You should not
* modify this data member directly from derived classes. Please use
* isRunning() for reading the value of this data member since it
- * will probably be made private in later versions of KProcess.
+ * will probably be made private in later versions of TDEProcess.
*/
bool runs;
@@ -712,7 +712,7 @@ protected:
* You should not modify this data member in derived classes.
* Please use pid() instead of directly accessing this
* member since it will probably be made private in
- * later versions of KProcess.
+ * later versions of TDEProcess.
*/
pid_t pid_;
@@ -721,7 +721,7 @@ protected:
* modify the value of this data member from derived classes. You should
* rather use exitStatus() than accessing this data member directly
* since it will probably be made private in further versions of
- * KProcess.
+ * TDEProcess.
*/
int status;
@@ -736,7 +736,7 @@ protected:
/**
* This function is called from start() right before a fork() takes
* place. According to the @p comm parameter this function has to initialize
- * the in, out and err data members of KProcess.
+ * the in, out and err data members of TDEProcess.
*
* This function should return 1 if setting the needed communication channels
* was successful.
@@ -754,7 +754,7 @@ protected:
*
* Furthermore, it must also create the TQSocketNotifiers innot,
* outnot and errnot and connect their Qt signals to the respective
- * KProcess slots.
+ * TDEProcess slots.
*
* For a more detailed explanation, it is best to have a look at the default
* implementation in kprocess.cpp.
@@ -788,12 +788,12 @@ protected:
* before closing them.
* @li if pid() returns non-zero and runs is true, the communication
* links should be monitored for data until the file handle returned by
- * KProcessController::theKProcessController->notifierFd() becomes ready
+ * TDEProcessController::theTDEProcessController->notifierFd() becomes ready
* for reading - when it triggers, runs should be reset to false, and
* the function should be immediately left without closing anything.
*
* The previous semantics of this function are forward-compatible, but should
- * be avoided, as they are prone to race conditions and can cause KProcess
+ * be avoided, as they are prone to race conditions and can cause TDEProcess
* (and thus the whole program) to lock up under certain circumstances. At the
* end the function closes the communication links in any case. Additionally
* @li if runs is true, the communication links are monitored for data
@@ -879,15 +879,15 @@ protected:
int input_total;
/**
- * KProcessController is a friend of KProcess because it has to have
+ * TDEProcessController is a friend of TDEProcess because it has to have
* access to various data members.
*/
- friend class KProcessController;
+ friend class TDEProcessController;
protected:
virtual void virtual_hook( int id, void* data );
private:
- KProcessPrivate *d;
+ TDEProcessPrivate *d;
};
class KShellProcessPrivate;
@@ -895,13 +895,13 @@ class KShellProcessPrivate;
/**
* @obsolete
*
-* Use KProcess and KProcess::setUseShell(true) instead.
+* Use TDEProcess and TDEProcess::setUseShell(true) instead.
*
-* @short A class derived from KProcess to start child
+* @short A class derived from TDEProcess to start child
* processes through a shell.
* @author Christian Czezatke <e9025461@student.tuwien.ac.at>
*/
-class TDECORE_EXPORT KShellProcess: public KProcess
+class TDECORE_EXPORT KShellProcess: public TDEProcess
{
Q_OBJECT
diff --git a/tdecore/kprocio.cpp b/tdecore/kprocio.cpp
index 9159edab5..7157662df 100644
--- a/tdecore/kprocio.cpp
+++ b/tdecore/kprocio.cpp
@@ -31,8 +31,8 @@
class KProcIOPrivate {
public:
- KProcIOPrivate() : comm(KProcess::All) {}
- KProcess::Communication comm;
+ KProcIOPrivate() : comm(TDEProcess::All) {}
+ TDEProcess::Communication comm;
};
KProcIO::KProcIO ( TQTextCodec *_codec)
@@ -67,14 +67,14 @@ KProcIO::resetAll ()
rbi=0;
readsignalon=writeready=true;
- disconnect (this, TQT_SIGNAL (receivedStdout (KProcess *, char *, int)),
- this, TQT_SLOT (received (KProcess *, char *, int)));
+ disconnect (this, TQT_SIGNAL (receivedStdout (TDEProcess *, char *, int)),
+ this, TQT_SLOT (received (TDEProcess *, char *, int)));
- disconnect (this, TQT_SIGNAL (receivedStderr (KProcess *, char *, int)),
- this, TQT_SLOT (received (KProcess *, char *, int)));
+ disconnect (this, TQT_SIGNAL (receivedStderr (TDEProcess *, char *, int)),
+ this, TQT_SLOT (received (TDEProcess *, char *, int)));
- disconnect (this, TQT_SIGNAL (wroteStdin(KProcess *)),
- this, TQT_SLOT (sent (KProcess *)));
+ disconnect (this, TQT_SIGNAL (wroteStdin(TDEProcess *)),
+ this, TQT_SLOT (sent (TDEProcess *)));
outbuffer.clear();
@@ -87,19 +87,19 @@ void KProcIO::setComm (Communication comm)
bool KProcIO::start (RunMode runmode, bool includeStderr)
{
- connect (this, TQT_SIGNAL (receivedStdout (KProcess *, char *, int)),
- this, TQT_SLOT (received (KProcess *, char *, int)));
+ connect (this, TQT_SIGNAL (receivedStdout (TDEProcess *, char *, int)),
+ this, TQT_SLOT (received (TDEProcess *, char *, int)));
if (includeStderr)
{
- connect (this, TQT_SIGNAL (receivedStderr (KProcess *, char *, int)),
- this, TQT_SLOT (received (KProcess *, char *, int)));
+ connect (this, TQT_SIGNAL (receivedStderr (TDEProcess *, char *, int)),
+ this, TQT_SLOT (received (TDEProcess *, char *, int)));
}
- connect (this, TQT_SIGNAL (wroteStdin(KProcess *)),
- this, TQT_SLOT (sent (KProcess *)));
+ connect (this, TQT_SIGNAL (wroteStdin(TDEProcess *)),
+ this, TQT_SLOT (sent (TDEProcess *)));
- return KProcess::start (runmode, d->comm);
+ return TDEProcess::start (runmode, d->comm);
}
bool KProcIO::writeStdin (const TQString &line, bool appendnewline)
@@ -131,7 +131,7 @@ bool KProcIO::writeStdin (const TQCString &line, bool appendnewline)
if (writeready)
{
writeready=false;
- return KProcess::writeStdin( b->data(), b->size() );
+ return TDEProcess::writeStdin( b->data(), b->size() );
}
return true;
}
@@ -146,7 +146,7 @@ bool KProcIO::writeStdin(const TQByteArray &data)
if (writeready)
{
writeready=false;
- return KProcess::writeStdin( b->data(), b->size() );
+ return TDEProcess::writeStdin( b->data(), b->size() );
}
return true;
}
@@ -163,7 +163,7 @@ void KProcIO::closeWhenDone()
return;
}
-void KProcIO::sent(KProcess *)
+void KProcIO::sent(TDEProcess *)
{
outbuffer.removeFirst();
@@ -180,13 +180,13 @@ void KProcIO::sent(KProcess *)
}
else
{
- KProcess::writeStdin(b->data(), b->size());
+ TDEProcess::writeStdin(b->data(), b->size());
}
}
}
-void KProcIO::received (KProcess *, char *buffer, int buflen)
+void KProcIO::received (TDEProcess *, char *buffer, int buflen)
{
recvbuffer += TQCString(buffer, buflen+1);
@@ -270,7 +270,7 @@ int KProcIO::readln (TQString &line, bool autoAck, bool *partial)
}
void KProcIO::virtual_hook( int id, void* data )
-{ KProcess::virtual_hook( id, data ); }
+{ TDEProcess::virtual_hook( id, data ); }
#include "kprocio.moc"
diff --git a/tdecore/kprocio.h b/tdecore/kprocio.h
index 3dceb9c1b..4e42ee533 100644
--- a/tdecore/kprocio.h
+++ b/tdecore/kprocio.h
@@ -30,7 +30,7 @@ class TQTextCodec;
* KProcIO
*
* This class provides a slightly simpler interface to the communication
- * functions provided by KProcess. The simplifications are:
+ * functions provided by TDEProcess. The simplifications are:
* @li The buffer for a write is copied to an internal KProcIO
* buffer and maintained/freed appropriately. There is no need
* to be concerned with wroteStdin() signals _at_all_.
@@ -40,14 +40,14 @@ class TQTextCodec;
* Basically, KProcIO gives you buffered I/O similar to fgets()/fputs().
*
* Aside from these, and the fact that start() takes different
- * parameters, use this class just like KProcess.
+ * parameters, use this class just like TDEProcess.
*
* @author David Sweet
- * @short A slightly simpler interface to KProcess
+ * @short A slightly simpler interface to TDEProcess
**/
-class TDECORE_EXPORT KProcIO : public KProcess
+class TDECORE_EXPORT KProcIO : public TDEProcess
{
Q_OBJECT
@@ -63,10 +63,10 @@ public:
~KProcIO();
/**
- * Sets the communication mode to be passed to KProcess::start()
- * by start(). The default communication mode is KProcess::All.
+ * Sets the communication mode to be passed to TDEProcess::start()
+ * by start(). The default communication mode is TDEProcess::All.
* You probably want to use this function in conjunction with
- * KProcess::setUsePty().
+ * TDEProcess::setUsePty().
* @param comm the communication mode
*/
void setComm (Communication comm);
@@ -80,7 +80,7 @@ public:
*
* @param runmode For a detailed description of the
* various run modes, have a look at the
- * general description of the KProcess class.
+ * general description of the TDEProcess class.
* @param includeStderr If true, data from both stdout and stderr is
* listened to. If false, only stdout is listened to.
* @return true on success, false on error.
@@ -204,8 +204,8 @@ protected:
void controlledEmission ();
protected slots:
- void received (KProcess *proc, char *buffer, int buflen);
- void sent (KProcess *);
+ void received (TDEProcess *proc, char *buffer, int buflen);
+ void sent (TDEProcess *);
protected:
virtual void virtual_hook( int id, void* data );
diff --git a/tdecore/kprotocolinfo_tdecore.cpp b/tdecore/kprotocolinfo_tdecore.cpp
index 943ad1b9a..86a9a6fcc 100644
--- a/tdecore/kprotocolinfo_tdecore.cpp
+++ b/tdecore/kprotocolinfo_tdecore.cpp
@@ -17,8 +17,8 @@
*/
#ifdef MAKE_TDECORE_LIB //needed for proper linkage (win32)
-#undef KIO_EXPORT
-#define KIO_EXPORT KDE_EXPORT
+#undef TDEIO_EXPORT
+#define TDEIO_EXPORT KDE_EXPORT
#endif
#define KPROTOCOLINFO_TDECORE
@@ -26,11 +26,11 @@
#include "kprotocolinfofactory.h"
#include <kstandarddirs.h>
-#include <kglobal.h>
-#include <kapplication.h>
+#include <tdeglobal.h>
+#include <tdeapplication.h>
#include <kdebug.h>
#include <ksimpleconfig.h>
-#include <kconfig.h>
+#include <tdeconfig.h>
#include <kstringhandler.h>
class KProtocolInfo::KProtocolInfoPrivate
@@ -150,7 +150,7 @@ void
KProtocolInfo::load( TQDataStream& _str)
{
// You may add new fields at the end. Make sure to update the version
- // number in ksycoca.h
+ // number in tdesycoca.h
TQ_INT32 i_inputType, i_outputType;
TQ_INT8 i_isSourceProtocol, i_isHelperProtocol,
i_supportsListing, i_supportsReading,
@@ -205,7 +205,7 @@ KProtocolInfo::save( TQDataStream& _str)
KSycocaEntry::save( _str );
// You may add new fields at the end. Make sure to update the version
- // number in ksycoca.h
+ // number in tdesycoca.h
TQ_INT32 i_inputType, i_outputType;
TQ_INT8 i_isSourceProtocol, i_isHelperProtocol,
i_supportsListing, i_supportsReading,
@@ -403,7 +403,7 @@ TQString KProtocolInfo::config( const TQString& _protocol )
if ( !prot )
return TQString::null;
- return TQString("kio_%1rc").arg(prot->m_config);
+ return TQString("tdeio_%1rc").arg(prot->m_config);
}
int KProtocolInfo::maxSlaves( const TQString& _protocol )
@@ -555,7 +555,7 @@ TQDataStream& operator<<( TQDataStream& s, const KProtocolInfo::ExtraField& fiel
return s;
}
-// KURL based static functions are implemented in ../kio/kio/kprotocolinfo.cpp
+// KURL based static functions are implemented in ../tdeio/tdeio/kprotocolinfo.cpp
void KProtocolInfo::virtual_hook( int id, void* data )
{ KSycocaEntry::virtual_hook( id, data ); }
diff --git a/tdecore/kprotocolinfofactory.cpp b/tdecore/kprotocolinfofactory.cpp
index e47cbb881..115a44f25 100644
--- a/tdecore/kprotocolinfofactory.cpp
+++ b/tdecore/kprotocolinfofactory.cpp
@@ -18,11 +18,11 @@
*/
#include <kstandarddirs.h>
-#include <kglobal.h>
-#include <kapplication.h>
+#include <tdeglobal.h>
+#include <tdeapplication.h>
#include <kdebug.h>
-#include <ksycoca.h>
-#include <ksycocadict.h>
+#include <tdesycoca.h>
+#include <tdesycocadict.h>
#include "kprotocolinfofactory.h"
diff --git a/tdecore/kprotocolinfofactory.h b/tdecore/kprotocolinfofactory.h
index 6a10ac1e3..89ba330a9 100644
--- a/tdecore/kprotocolinfofactory.h
+++ b/tdecore/kprotocolinfofactory.h
@@ -20,13 +20,13 @@
#ifndef __kprotocolinfofactory_h__
#define __kprotocolinfofactory_h__
-#include "../kio/kio/kprotocolinfo.h"
+#include "../tdeio/tdeio/kprotocolinfo.h"
#include <tqmap.h>
#include <tqstring.h>
#include <tqstringlist.h>
#include <kurl.h>
-#include <ksycocafactory.h>
+#include <tdesycocafactory.h>
class KProtocolInfoPrivate;
diff --git a/tdecore/kpty.cpp b/tdecore/kpty.cpp
index f6fc9d5cd..e13540e19 100644
--- a/tdecore/kpty.cpp
+++ b/tdecore/kpty.cpp
@@ -144,7 +144,7 @@ extern "C" {
///////////////////////
#ifdef HAVE_UTEMPTER
-class KProcess_Utmp : public KProcess
+class TDEProcess_Utmp : public TDEProcess
{
public:
int commSetupDoneC()
@@ -440,12 +440,12 @@ void KPty::setCTty()
void KPty::login(const char *user, const char *remotehost)
{
#ifdef HAVE_UTEMPTER
- KProcess_Utmp utmp;
+ TDEProcess_Utmp utmp;
utmp.cmdFd = d->masterFd;
utmp << "/usr/lib/utempter/utempter" << "add";
if (remotehost)
utmp << remotehost;
- utmp.start(KProcess::Block);
+ utmp.start(TDEProcess::Block);
Q_UNUSED(user);
Q_UNUSED(remotehost);
#elif defined(USE_LOGIN)
@@ -485,10 +485,10 @@ void KPty::login(const char *user, const char *remotehost)
void KPty::logout()
{
#ifdef HAVE_UTEMPTER
- KProcess_Utmp utmp;
+ TDEProcess_Utmp utmp;
utmp.cmdFd = d->masterFd;
utmp << "/usr/lib/utempter/utempter" << "del";
- utmp.start(KProcess::Block);
+ utmp.start(TDEProcess::Block);
#elif defined(USE_LOGIN)
const char *str_ptr = d->ttyName.data();
if (!memcmp(str_ptr, "/dev/", 5))
@@ -572,8 +572,8 @@ int KPty::slaveFd() const
// private
bool KPty::chownpty(bool grant)
{
- KProcess proc;
+ TDEProcess proc;
proc << locate("exe", BASE_CHOWN) << (grant?"--grant":"--revoke") << TQString::number(d->masterFd);
- return proc.start(KProcess::Block) && proc.normalExit() && !proc.exitStatus();
+ return proc.start(TDEProcess::Block) && proc.normalExit() && !proc.exitStatus();
}
diff --git a/tdecore/krandomsequence.cpp b/tdecore/krandomsequence.cpp
index 04240733f..8896db70b 100644
--- a/tdecore/krandomsequence.cpp
+++ b/tdecore/krandomsequence.cpp
@@ -21,7 +21,7 @@
#include <tqptrlist.h>
#include "krandomsequence.h"
-#include "kapplication.h"
+#include "tdeapplication.h"
const int KRandomSequence::m_nShuffleTableSize = 32;
@@ -78,7 +78,7 @@ void KRandomSequence::setSeed( long lngSeed1 )
}
else if (lngSeed1 == 0)
{
- m_lngSeed1 = -((KApplication::random() & ~1)+1);
+ m_lngSeed1 = -((TDEApplication::random() & ~1)+1);
}
else
{
diff --git a/tdecore/krandomsequence.h b/tdecore/krandomsequence.h
index 8fa6e3c29..256d03f17 100644
--- a/tdecore/krandomsequence.h
+++ b/tdecore/krandomsequence.h
@@ -50,7 +50,7 @@ public:
*
* @param lngSeed Seed to initialize the sequence with.
* If lngSeed is 0, the sequence is initialized with a value from
- * KApplication::random().
+ * TDEApplication::random().
*/
KRandomSequence( long lngSeed = 0 );
@@ -73,7 +73,7 @@ public:
* Restart the sequence based on lngSeed.
* @param lngSeed Seed to initialize the sequence with.
* If lngSeed is 0, the sequence is initialized with a value from
- * KApplication::random().
+ * TDEApplication::random().
*/
void setSeed( long lngSeed = 0 );
diff --git a/tdecore/krootprop.cpp b/tdecore/krootprop.cpp
index cb0200c99..c717a1823 100644
--- a/tdecore/krootprop.cpp
+++ b/tdecore/krootprop.cpp
@@ -23,10 +23,10 @@
#ifdef Q_WS_X11 // not needed anyway :-)
#include "krootprop.h"
-#include "kglobal.h"
-#include "klocale.h"
+#include "tdeglobal.h"
+#include "tdelocale.h"
#include "kcharsets.h"
-#include "kapplication.h"
+#include "tdeapplication.h"
#include <tqtextstream.h>
#include <X11/Xlib.h>
diff --git a/tdecore/krootprop.h b/tdecore/krootprop.h
index 002790ca4..f1a72d265 100644
--- a/tdecore/krootprop.h
+++ b/tdecore/krootprop.h
@@ -33,14 +33,14 @@ class KRootPropPrivate;
/**
* Access KDE desktop resources stored on the root window.
*
-* A companion to the KConfig class.
+* A companion to the TDEConfig class.
*
* The KRootProp class is used for reading and writing configuration entries
* to properties on the root window.
*
* All configuration entries are of the form "key=value".
*
-* @see KConfig::KConfig
+* @see TDEConfig::TDEConfig
* @author Mark Donohoe (donohe@kde.org)
*/
class TDECORE_EXPORT KRootProp
diff --git a/tdecore/ksavefile.cpp b/tdecore/ksavefile.cpp
index cddf44bc5..4ad96c0f2 100644
--- a/tdecore/ksavefile.cpp
+++ b/tdecore/ksavefile.cpp
@@ -36,7 +36,7 @@
#include <tqdir.h>
#include <kde_file.h>
-#include "kapplication.h"
+#include "tdeapplication.h"
#include "ksavefile.h"
#include "kstandarddirs.h"
@@ -44,7 +44,7 @@ KSaveFile::KSaveFile(const TQString &filename, int mode)
: mTempFile(true)
{
// follow symbolic link, if any
- TQString real_filename = KStandardDirs::realFilePath(filename);
+ TQString real_filename = TDEStandardDirs::realFilePath(filename);
// we only check here if the directory can be written to
// the actual filename isn't written to, but replaced later
diff --git a/tdecore/ksavefile.h b/tdecore/ksavefile.h
index e035115a9..282652dea 100644
--- a/tdecore/ksavefile.h
+++ b/tdecore/ksavefile.h
@@ -23,7 +23,7 @@
#include <tqstring.h>
#include <stdio.h>
#include <errno.h>
-#include <ktempfile.h>
+#include <tdetempfile.h>
class KSaveFilePrivate;
diff --git a/tdecore/ksharedptr.h b/tdecore/ksharedptr.h
index 16ece722c..60a06a55f 100644
--- a/tdecore/ksharedptr.h
+++ b/tdecore/ksharedptr.h
@@ -15,132 +15,132 @@
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
-#ifndef KSharedPTR_H
-#define KSharedPTR_H
+#ifndef TDESharedPTR_H
+#define TDESharedPTR_H
#include "tdelibs_export.h"
/**
* Reference counting for shared objects. If you derive your object
* from this class, then you may use it in conjunction with
- * KSharedPtr to control the lifetime of your object.
+ * TDESharedPtr to control the lifetime of your object.
*
- * Specifically, all classes that derive from KShared have an internal
+ * Specifically, all classes that derive from TDEShared have an internal
* counter keeping track of how many other objects have a reference to
- * their object. If used with KSharedPtr, then your object will
+ * their object. If used with TDESharedPtr, then your object will
* not be deleted until all references to the object have been
* released.
*
* You should probably not ever use any of the methods in this class
- * directly -- let the KSharedPtr take care of that. Just derive
- * your class from KShared and forget about it.
+ * directly -- let the TDESharedPtr take care of that. Just derive
+ * your class from TDEShared and forget about it.
*
* @author Waldo Bastian <bastian@kde.org>
*/
-class TDECORE_EXPORT KShared {
+class TDECORE_EXPORT TDEShared {
public:
/**
* Standard constructor. This will initialize the reference count
* on this object to 0.
*/
- KShared() : count(0) { }
+ TDEShared() : count(0) { }
/**
* Copy constructor. This will @em not actually copy the objects
* but it will initialize the reference count on this object to 0.
*/
- KShared( const KShared & ) : count(0) { }
+ TDEShared( const TDEShared & ) : count(0) { }
/**
* Overloaded assignment operator.
*/
- KShared &operator=(const KShared & ) { return *this; }
+ TDEShared &operator=(const TDEShared & ) { return *this; }
/**
* Increases the reference count by one.
*/
- void _KShared_ref() const { count++; }
+ void _TDEShared_ref() const { count++; }
/**
* Releases a reference (decreases the reference count by one). If
* the count goes to 0, this object will delete itself.
*/
- void _KShared_unref() const { if (!--count) delete this; }
+ void _TDEShared_unref() const { if (!--count) delete this; }
/**
* Return the current number of references held.
*
* @return Number of references
*/
- int _KShared_count() const { return count; }
+ int _TDEShared_count() const { return count; }
protected:
- virtual ~KShared() { }
+ virtual ~TDEShared() { }
private:
mutable int count;
};
/**
* Can be used to control the lifetime of an object that has derived
- * KShared. As long a someone holds a KSharedPtr on some KShared
+ * TDEShared. As long a someone holds a TDESharedPtr on some TDEShared
* object it won't become deleted but is deleted once its reference
* count is 0. This struct emulates C++ pointers virtually perfectly.
* So just use it like a simple C++ pointer.
*
- * KShared and KSharedPtr are preferred over QShared / QSharedPtr
+ * TDEShared and TDESharedPtr are preferred over QShared / QSharedPtr
* since they are more safe.
*
* WARNING: Please note that this class template provides an implicit
* conversion to T*. Do *not* change this pointer or the pointee (don't
- * call delete on it, for instance) behind KSharedPtr's back.
+ * call delete on it, for instance) behind TDESharedPtr's back.
*
* @author Waldo Bastian <bastian@kde.org>
*/
template< class T >
-class KSharedPtr
+class TDESharedPtr
{
public:
/**
* Creates a null pointer.
*/
- KSharedPtr()
+ TDESharedPtr()
: ptr(0) { }
/**
* Creates a new pointer.
* @param t the pointer
*/
- KSharedPtr( T* t )
- : ptr(t) { if ( ptr ) ptr->_KShared_ref(); }
+ TDESharedPtr( T* t )
+ : ptr(t) { if ( ptr ) ptr->_TDEShared_ref(); }
/**
* Copies a pointer.
* @param p the pointer to copy
*/
- KSharedPtr( const KSharedPtr& p )
- : ptr(p.ptr) { if ( ptr ) ptr->_KShared_ref(); }
+ TDESharedPtr( const TDESharedPtr& p )
+ : ptr(p.ptr) { if ( ptr ) ptr->_TDEShared_ref(); }
/**
* Unreferences the object that this pointer points to. If it was
* the last reference, the object will be deleted.
*/
- ~KSharedPtr() { if ( ptr ) ptr->_KShared_unref(); }
+ ~TDESharedPtr() { if ( ptr ) ptr->_TDEShared_unref(); }
- KSharedPtr<T>& operator= ( const KSharedPtr<T>& p ) {
+ TDESharedPtr<T>& operator= ( const TDESharedPtr<T>& p ) {
if ( ptr == p.ptr ) return *this;
- if ( ptr ) ptr->_KShared_unref();
+ if ( ptr ) ptr->_TDEShared_unref();
ptr = p.ptr;
- if ( ptr ) ptr->_KShared_ref();
+ if ( ptr ) ptr->_TDEShared_ref();
return *this;
}
- KSharedPtr<T>& operator= ( T* p ) {
+ TDESharedPtr<T>& operator= ( T* p ) {
if ( ptr == p ) return *this;
- if ( ptr ) ptr->_KShared_unref();
+ if ( ptr ) ptr->_TDEShared_unref();
ptr = p;
- if ( ptr ) ptr->_KShared_ref();
+ if ( ptr ) ptr->_TDEShared_ref();
return *this;
}
- bool operator== ( const KSharedPtr<T>& p ) const { return ( ptr == p.ptr ); }
- bool operator!= ( const KSharedPtr<T>& p ) const { return ( ptr != p.ptr ); }
+ bool operator== ( const TDESharedPtr<T>& p ) const { return ( ptr == p.ptr ); }
+ bool operator!= ( const TDESharedPtr<T>& p ) const { return ( ptr != p.ptr ); }
bool operator== ( const T* p ) const { return ( ptr == p ); }
bool operator!= ( const T* p ) const { return ( ptr != p ); }
bool operator!() const { return ( ptr == 0 ); }
@@ -167,7 +167,7 @@ public:
* Returns the number of references.
* @return the number of references
*/
- int count() const { return ptr->_KShared_count(); } // for debugging purposes
+ int count() const { return ptr->_TDEShared_count(); } // for debugging purposes
private:
T* ptr;
};
diff --git a/tdecore/ksimpleconfig.cpp b/tdecore/ksimpleconfig.cpp
index 6b4e13a14..dc359f17e 100644
--- a/tdecore/ksimpleconfig.cpp
+++ b/tdecore/ksimpleconfig.cpp
@@ -31,19 +31,19 @@
#include <tqfileinfo.h>
#include <tqdir.h>
-#include "kglobal.h"
+#include "tdeglobal.h"
#include "kstandarddirs.h"
-#include "kconfigbackend.h"
+#include "tdeconfigbackend.h"
#include "ksimpleconfig.h"
KSimpleConfig::KSimpleConfig(const TQString &fileName, bool bReadOnly)
- : KConfig(TQString::fromLatin1(""), bReadOnly, false)
+ : TDEConfig(TQString::fromLatin1(""), bReadOnly, false)
{
- // the difference between KConfig and KSimpleConfig is just that
+ // the difference between TDEConfig and KSimpleConfig is just that
// for KSimpleConfig an absolute filename is guaranteed
if (!fileName.isNull() && TQDir::isRelativePath(fileName)) {
- backEnd->changeFileName( KGlobal::dirs()->
+ backEnd->changeFileName( TDEGlobal::dirs()->
saveLocation("config", TQString::null, !bReadOnly)+fileName, "config", false);
} else {
backEnd->changeFileName(fileName, "config", false);
@@ -52,16 +52,16 @@ KSimpleConfig::KSimpleConfig(const TQString &fileName, bool bReadOnly)
reparseConfiguration();
}
-KSimpleConfig::KSimpleConfig(KConfigBackEnd *backEnd, bool bReadOnly)
- : KConfig(backEnd, bReadOnly)
+KSimpleConfig::KSimpleConfig(TDEConfigBackEnd *backEnd, bool bReadOnly)
+ : TDEConfig(backEnd, bReadOnly)
{}
KSimpleConfig::~KSimpleConfig()
{
// we need to call the KSimpleConfig version of sync. Relying on the
- // regular KConfig sync is bad, because the KSimpleConfig sync has
+ // regular TDEConfig sync is bad, because the KSimpleConfig sync has
// different behavior. Syncing here will insure that the sync() call
- // in the KConfig destructor doesn't actually do anything.
+ // in the TDEConfig destructor doesn't actually do anything.
sync();
}
@@ -76,6 +76,6 @@ void KSimpleConfig::sync()
}
void KSimpleConfig::virtual_hook( int id, void* data )
-{ KConfig::virtual_hook( id, data ); }
+{ TDEConfig::virtual_hook( id, data ); }
#include "ksimpleconfig.moc"
diff --git a/tdecore/ksimpleconfig.h b/tdecore/ksimpleconfig.h
index c7efeecfa..541117500 100644
--- a/tdecore/ksimpleconfig.h
+++ b/tdecore/ksimpleconfig.h
@@ -21,24 +21,24 @@
#ifndef _KSIMPLECONFIG_H
#define _KSIMPLECONFIG_H
-#include "kconfig.h"
+#include "tdeconfig.h"
class KSimpleConfigPrivate;
/**
* KDE Configuration entries
*
- * This is a trivial extension of KConfig for applications that need
+ * This is a trivial extension of TDEConfig for applications that need
* only one configuration file and no default system.
- * A difference with KConfig is that when the data in memory is written back
+ * A difference with TDEConfig is that when the data in memory is written back
* it is not merged with what is on disk.
* Whatever is in memory simply replaces what is on disk entirely.
*
* @author Kalle Dalheimer <kalle@kde.org>, Preston Brown <pbrown@kde.org>
- * @see KConfigBase KConfig
+ * @see TDEConfigBase TDEConfig
* @short KDE Configuration Management class with deletion ability
*/
-class TDECORE_EXPORT KSimpleConfig : public KConfig
+class TDECORE_EXPORT KSimpleConfig : public TDEConfig
{
Q_OBJECT
@@ -55,7 +55,7 @@ public:
*/
KSimpleConfig( const TQString &fileName, bool bReadOnly = false);
- KSimpleConfig(KConfigBackEnd *backEnd, bool bReadOnly = false);
+ KSimpleConfig(TDEConfigBackEnd *backEnd, bool bReadOnly = false);
/**
* Destructor.
diff --git a/tdecore/ksimpledirwatch.cpp b/tdecore/ksimpledirwatch.cpp
index cad0345ab..835566268 100644
--- a/tdecore/ksimpledirwatch.cpp
+++ b/tdecore/ksimpledirwatch.cpp
@@ -43,10 +43,10 @@
#include <tqstringlist.h>
#include <tqtimer.h>
-#include <kapplication.h>
+#include <tdeapplication.h>
#include <kdebug.h>
-#include <kconfig.h>
-#include <kglobal.h>
+#include <tdeconfig.h>
+#include <tdeglobal.h>
#include <kstaticdeleter.h>
#include <kde_file.h>
@@ -184,7 +184,7 @@ void KSimpleDirWatchPrivate::dnotify_sigio_handler(int sig, siginfo_t *si, void
* are supported:
* - Polling: All files to be watched are polled regularly
* using stat (more precise: TQFileInfo.lastModified()).
- * The polling frequency is determined from global kconfig
+ * The polling frequency is determined from global tdeconfig
* settings, defaulting to 500 ms for local directories
* and 5000 ms for remote mounts
* - FAM (File Alternation Monitor): first used on IRIX, SGI
@@ -214,7 +214,7 @@ KSimpleDirWatchPrivate::KSimpleDirWatchPrivate()
delayRemove = false;
m_ref = 0;
- KConfigGroup config(KGlobal::config(), TQCString("DirWatch"));
+ TDEConfigGroup config(TDEGlobal::config(), TQCString("DirWatch"));
m_nfsPollInterval = config.readNumEntry("NFSPollInterval", 5000);
m_PollInterval = config.readNumEntry("PollInterval", 500);
@@ -1377,7 +1377,7 @@ bool KSimpleDirWatchPrivate::isNoisyFile( const char * filename )
if (strncmp(filename, ".X.err", 6) == 0) return true;
if (strncmp(filename, ".xsession-errors", 16) == 0) return true;
// fontconfig updates the cache on every KDE app start
- // (inclusive kio_thumbnail slaves)
+ // (inclusive tdeio_thumbnail slaves)
if (strncmp(filename, ".fonts.cache", 12) == 0) return true;
}
diff --git a/tdecore/ksimpledirwatch.h b/tdecore/ksimpledirwatch.h
index 36ceafba6..4dcae30b7 100644
--- a/tdecore/ksimpledirwatch.h
+++ b/tdecore/ksimpledirwatch.h
@@ -63,7 +63,7 @@ class KSimpleDirWatchPrivate;
* @short Class for watching directory and file changes.
* @author Sven Radej <sven@lisa.exp.univie.ac.at>
*/
-class KIO_EXPORT KSimpleDirWatch : public TQObject
+class TDEIO_EXPORT KSimpleDirWatch : public TQObject
{
Q_OBJECT
diff --git a/tdecore/ksock.cpp b/tdecore/ksock.cpp
index 10c694512..96526463a 100644
--- a/tdecore/ksock.cpp
+++ b/tdecore/ksock.cpp
@@ -89,21 +89,21 @@ extern "C" {
#include "tqwindowdefs.h"
#endif
-class KSocketPrivate
+class TDESocketPrivate
{
public:
TQSocketNotifier *readNotifier;
TQSocketNotifier *writeNotifier;
- KSocketPrivate() :
+ TDESocketPrivate() :
readNotifier(0), writeNotifier(0)
{ }
};
// I moved this into here so we could accurately detect the domain, for
// posterity. Really.
-KSocket::KSocket( int _sock)
- : sock(_sock), d(new KSocketPrivate)
+TDESocket::TDESocket( int _sock)
+ : sock(_sock), d(new TDESocketPrivate)
{
struct sockaddr_in sin;
ksocklen_t len = sizeof(sin);
@@ -116,19 +116,19 @@ KSocket::KSocket( int _sock)
KSocks::self()->getsockname(_sock, (struct sockaddr *)&sin, &len);
}
-KSocket::KSocket( const char *_host, unsigned short int _port, int _timeout ) :
- sock( -1 ), d(new KSocketPrivate)
+TDESocket::TDESocket( const char *_host, unsigned short int _port, int _timeout ) :
+ sock( -1 ), d(new TDESocketPrivate)
{
connect( _host, _port, _timeout );
}
-KSocket::KSocket( const char *_path ) :
- sock( -1 ), d(new KSocketPrivate)
+TDESocket::TDESocket( const char *_path ) :
+ sock( -1 ), d(new TDESocketPrivate)
{
connect( _path );
}
-void KSocket::enableRead( bool _state )
+void TDESocket::enableRead( bool _state )
{
if ( _state )
{
@@ -144,7 +144,7 @@ void KSocket::enableRead( bool _state )
d->readNotifier->setEnabled( false );
}
-void KSocket::enableWrite( bool _state )
+void TDESocket::enableWrite( bool _state )
{
if ( _state )
{
@@ -161,7 +161,7 @@ void KSocket::enableWrite( bool _state )
d->writeNotifier->setEnabled( false );
}
-void KSocket::slotRead( int )
+void TDESocket::slotRead( int )
{
char buffer[2];
@@ -172,7 +172,7 @@ void KSocket::slotRead( int )
emit readEvent( this );
}
-void KSocket::slotWrite( int )
+void TDESocket::slotWrite( int )
{
emit writeEvent( this );
}
@@ -180,7 +180,7 @@ void KSocket::slotWrite( int )
/*
* Connects the PF_UNIX domain socket to _path.
*/
-bool KSocket::connect( const char *_path )
+bool TDESocket::connect( const char *_path )
{
KExtendedSocket ks(TQString::null, _path, KExtendedSocket::unixSocket);
@@ -194,7 +194,7 @@ bool KSocket::connect( const char *_path )
/*
* Connects the socket to _host, _port.
*/
-bool KSocket::connect( const TQString& _host, unsigned short int _port, int _timeout )
+bool TDESocket::connect( const TQString& _host, unsigned short int _port, int _timeout )
{
KExtendedSocket ks(_host, _port, KExtendedSocket::inetSocket);
ks.setTimeout(_timeout, 0);
@@ -208,10 +208,10 @@ bool KSocket::connect( const TQString& _host, unsigned short int _port, int _tim
// only for doxygen - the define is always true as defined above
#ifdef KSOCK_NO_BROKEN
-unsigned long KSocket::ipv4_addr()
+unsigned long TDESocket::ipv4_addr()
{
unsigned long retval = 0;
- KSocketAddress *sa = KExtendedSocket::peerAddress(sock);
+ TDESocketAddress *sa = KExtendedSocket::peerAddress(sock);
if (sa == NULL)
return 0;
@@ -230,12 +230,12 @@ unsigned long KSocket::ipv4_addr()
return retval;
}
-bool KSocket::initSockaddr (ksockaddr_in *server_name, const char *hostname, unsigned short int port, int domain)
+bool TDESocket::initSockaddr (ksockaddr_in *server_name, const char *hostname, unsigned short int port, int domain)
{
// This function is now IPv4 only
// if you want something better, you should use KExtendedSocket::lookup yourself
- kdWarning(170) << "deprecated KSocket::initSockaddr called" << endl;
+ kdWarning(170) << "deprecated TDESocket::initSockaddr called" << endl;
if (domain != PF_INET)
return false;
@@ -255,13 +255,13 @@ bool KSocket::initSockaddr (ksockaddr_in *server_name, const char *hostname, uns
return false;
memcpy(server_name, sin->addressV4(), sizeof(*server_name));
- kdDebug(170) << "KSocket::initSockaddr: returning " << sin->pretty() << endl;
+ kdDebug(170) << "TDESocket::initSockaddr: returning " << sin->pretty() << endl;
return true;
}
#endif
-KSocket::~KSocket()
+TDESocket::~TDESocket()
{
// Coolo says delete 0 is ok :) -thiago
delete d->readNotifier;
@@ -274,7 +274,7 @@ KSocket::~KSocket()
}
}
-class KServerSocketPrivate
+class TDEServerSocketPrivate
{
public:
bool bind;
@@ -284,25 +284,25 @@ public:
};
-KServerSocket::KServerSocket( const char *_path, bool _bind ) :
+TDEServerSocket::TDEServerSocket( const char *_path, bool _bind ) :
sock( -1 )
{
- d = new KServerSocketPrivate();
+ d = new TDEServerSocketPrivate();
d->bind = _bind;
init ( _path );
}
-KServerSocket::KServerSocket( unsigned short int _port, bool _bind ) :
+TDEServerSocket::TDEServerSocket( unsigned short int _port, bool _bind ) :
sock( -1 )
{
- d = new KServerSocketPrivate();
+ d = new TDEServerSocketPrivate();
d->bind = _bind;
init ( _port );
}
-bool KServerSocket::init( const char *_path )
+bool TDEServerSocket::init( const char *_path )
{
unlink(_path );
d->path = _path;
@@ -317,7 +317,7 @@ bool KServerSocket::init( const char *_path )
}
-bool KServerSocket::init( unsigned short int _port )
+bool TDEServerSocket::init( unsigned short int _port )
{
d->port = _port;
KExtendedSocket *ks;
@@ -330,7 +330,7 @@ bool KServerSocket::init( unsigned short int _port )
return true;
}
-bool KServerSocket::bindAndListen()
+bool TDEServerSocket::bindAndListen()
{
if (d == NULL || d->ks == NULL)
return false;
@@ -354,11 +354,11 @@ bool KServerSocket::bindAndListen()
}
-unsigned short int KServerSocket::port()
+unsigned short int TDEServerSocket::port()
{
if (d == NULL || d->ks == NULL || sock == -1)
return 0;
- const KSocketAddress *sa = d->ks->localAddress();
+ const TDESocketAddress *sa = d->ks->localAddress();
if (sa == NULL)
return 0;
@@ -378,11 +378,11 @@ unsigned short int KServerSocket::port()
return 0; // not a port we know
}
-unsigned long KServerSocket::ipv4_addr()
+unsigned long TDEServerSocket::ipv4_addr()
{
if (d == NULL || d->ks == NULL || sock == -1)
return 0;
- const KSocketAddress *sa = d->ks->localAddress();
+ const TDESocketAddress *sa = d->ks->localAddress();
const sockaddr_in *sin = (sockaddr_in*)sa->address();
@@ -401,7 +401,7 @@ unsigned long KServerSocket::ipv4_addr()
return 0; // this is dumb, isn't it?
}
-void KServerSocket::slotAccept( int )
+void TDEServerSocket::slotAccept( int )
{
if (d == NULL || d->ks == NULL || sock == -1)
return; // nothing!
@@ -417,10 +417,10 @@ void KServerSocket::slotAccept( int )
s->release(); // we're getting rid of the KExtendedSocket
delete s;
- emit accepted( new KSocket( new_sock ) );
+ emit accepted( new TDESocket( new_sock ) );
}
-KServerSocket::~KServerSocket()
+TDEServerSocket::~TDEServerSocket()
{
if (d != NULL)
{
diff --git a/tdecore/ksock.h b/tdecore/ksock.h
index d6e4515ea..cdf4ad1ac 100644
--- a/tdecore/ksock.h
+++ b/tdecore/ksock.h
@@ -65,8 +65,8 @@ typedef sockaddr_in ksockaddr_in;
#define KSOCK_DEFAULT_DOMAIN PF_INET
-class KSocketPrivate;
-class KServerSocketPrivate;
+class TDESocketPrivate;
+class TDEServerSocketPrivate;
/** @deprecated
* You can connect this socket to any Internet address.
@@ -79,7 +79,7 @@ class KServerSocketPrivate;
* Using socket() you get a file descriptor
* which you can use with the usual UNIX function like write() or
* read().
- * If you have already such a socket identifier you can construct a KSocket
+ * If you have already such a socket identifier you can construct a TDESocket
* on this identifier.
*
* If socket() delivers a value of -1 or less, the connection
@@ -88,33 +88,33 @@ class KServerSocketPrivate;
* @author Torben Weis <weis@uni-frankfurt.de>
* @short A TCP/IP client socket.
*/
-class TDECORE_EXPORT KSocket : public TQObject
+class TDECORE_EXPORT TDESocket : public TQObject
{
Q_OBJECT
public:
/**
- * Constructs a KSocket with the provided file descriptor.
+ * Constructs a TDESocket with the provided file descriptor.
* @param _sock The file descriptor to use.
*/
- KSocket( int _sock ) KDE_DEPRECATED;
+ TDESocket( int _sock ) KDE_DEPRECATED;
/**
* Creates a socket and connects to a host.
* @param _host The remote host to which to connect.
* @param _port The port on the remote host.
* @param timeOut The number of seconds waiting for connect (default 30).
*/
- KSocket( const char *_host, unsigned short int _port, int timeOut = 30) KDE_DEPRECATED;
+ TDESocket( const char *_host, unsigned short int _port, int timeOut = 30) KDE_DEPRECATED;
/**
* Connects to a UNIX domain socket.
* @param _path The filename of the socket.
*/
- KSocket( const char * _path ) KDE_DEPRECATED;
+ TDESocket( const char * _path ) KDE_DEPRECATED;
/**
* Destructor. Closes the socket if it is still open.
*/
- virtual ~KSocket();
+ virtual ~TDESocket();
/**
* Returns a file descriptor for this socket.
@@ -171,9 +171,9 @@ signals:
*
* This signal will only be raised if enableRead( @p true ) was called
* first.
- * @param s the KSocket that triggered the event
+ * @param s the TDESocket that triggered the event
*/
- void readEvent( KSocket *s );
+ void readEvent( TDESocket *s );
/**
* Socket is ready for writing.
@@ -184,15 +184,15 @@ signals:
* Warning: If you forget to call enableWrite(false) when you are
* not ready to send data, you will get lots of writeEvent() signals,
* in the order of thousands a second !
- * @param s the KSocket that triggered the event
+ * @param s the TDESocket that triggered the event
*/
- void writeEvent( KSocket *s );
+ void writeEvent( TDESocket *s );
/**
* Raised when the connection is broken.
- * @param s the KSocket that triggered the event
+ * @param s the TDESocket that triggered the event
*/
- void closeEvent( KSocket *s );
+ void closeEvent( TDESocket *s );
public slots:
/**
@@ -224,10 +224,10 @@ protected:
int sock;
private:
- KSocket(const KSocket&);
- KSocket& operator=(const KSocket&);
+ TDESocket(const TDESocket&);
+ TDESocket& operator=(const TDESocket&);
- KSocketPrivate *d;
+ TDESocketPrivate *d;
};
@@ -239,19 +239,19 @@ private:
* This class is deprecated and will be removed in the future.
* Please use the classes in KNetwork for new programs.
* In special, this class is replaced by KNetwork::KStreamSocket
- * and KNetwork::KServerSocket.
+ * and KNetwork::TDEServerSocket.
*
- * You can use a KServerSocket to listen on a port for incoming
- * connections. When a connection arrived in the port, a KSocket
+ * You can use a TDEServerSocket to listen on a port for incoming
+ * connections. When a connection arrived in the port, a TDESocket
* is created and the signal accepted is raised. Make sure you
* always connect to this signal. If you don't the ServerSocket will
- * create new KSocket's and no one will delete them!
+ * create new TDESocket's and no one will delete them!
*
* If socket() is -1 or less the socket was not created properly.
*
* @author Torben Weis <weis@stud.uni-frankfurt.de>
*/
-class TDECORE_EXPORT KServerSocket : public TQObject
+class TDECORE_EXPORT TDEServerSocket : public TQObject
{
Q_OBJECT
public:
@@ -262,7 +262,7 @@ public:
* This gives you the opportunity to set options on the
* socket.
*/
- KServerSocket( unsigned short int _port, bool _bind = true );
+ TDEServerSocket( unsigned short int _port, bool _bind = true );
/**
* Creates a UNIX domain server socket.
@@ -271,12 +271,12 @@ public:
* This gives you the opportunity to set options on the
* socket.
*/
- KServerSocket( const char *_path, bool _bind = true);
+ TDEServerSocket( const char *_path, bool _bind = true);
/**
* Destructor. Closes the socket if it was not already closed.
*/
- virtual ~KServerSocket();
+ virtual ~TDEServerSocket();
/**
* Binds the socket and start listening. This should only be called
@@ -319,14 +319,14 @@ public slots:
signals:
/**
* A connection has been accepted.
- * It is your task to delete the KSocket if it is no longer needed.
+ * It is your task to delete the TDESocket if it is no longer needed.
*
* WARNING: this signal is always emitted, even if you don't connect
- * anything to it. That would mean memory loss, because the KSockets
+ * anything to it. That would mean memory loss, because the TDESockets
* created go to oblivion.
* @param s the socket that accepted
*/
- void accepted( KSocket*s );
+ void accepted( TDESocket*s );
protected:
bool init( unsigned short int );
@@ -339,10 +339,10 @@ protected:
int sock;
private:
- KServerSocket(const KServerSocket&);
- KServerSocket& operator=(const KServerSocket&);
+ TDEServerSocket(const TDEServerSocket&);
+ TDEServerSocket& operator=(const TDEServerSocket&);
- KServerSocketPrivate *d;
+ TDEServerSocketPrivate *d;
};
#endif //Q_OS_UNIX
diff --git a/tdecore/ksockaddr.cpp b/tdecore/ksockaddr.cpp
index 899f32dba..a645b3aa9 100644
--- a/tdecore/ksockaddr.cpp
+++ b/tdecore/ksockaddr.cpp
@@ -38,7 +38,7 @@
#include <tqfile.h>
#include "kdebug.h"
-#include "klocale.h"
+#include "tdelocale.h"
//#include "kextsock.h"
#ifndef HAVE_STRUCT_SOCKADDR_IN6
@@ -77,10 +77,10 @@
/**
- * Class KSocketAddress
+ * Class TDESocketAddress
*/
-KSocketAddress::KSocketAddress(const sockaddr* sa, ksocklen_t size)
+TDESocketAddress::TDESocketAddress(const sockaddr* sa, ksocklen_t size)
{
if ( !sa )
init();
@@ -94,44 +94,44 @@ KSocketAddress::KSocketAddress(const sockaddr* sa, ksocklen_t size)
}
}
-void KSocketAddress::init()
+void TDESocketAddress::init()
{
data = NULL;
datasize = 0;
owndata = false;
}
-KSocketAddress::~KSocketAddress()
+TDESocketAddress::~TDESocketAddress()
{
if (owndata && data != NULL)
free(data);
}
-TQString KSocketAddress::pretty() const
+TQString TDESocketAddress::pretty() const
{
return i18n("<unknown socket>");
}
-int KSocketAddress::family() const
+int TDESocketAddress::family() const
{
if (data != NULL)
return data->sa_family;
return AF_UNSPEC;
}
-// This creates a new KSocketAddress with given sockaddr
-KSocketAddress* KSocketAddress::newAddress(const struct sockaddr* sa, ksocklen_t size)
+// This creates a new TDESocketAddress with given sockaddr
+TDESocketAddress* TDESocketAddress::newAddress(const struct sockaddr* sa, ksocklen_t size)
{
if (size == 0)
{
- kdWarning() << "KSocketAddress::newAddress called with size = 0!\n";
+ kdWarning() << "TDESocketAddress::newAddress called with size = 0!\n";
return NULL;
}
// make sure we have the right stuff
if (size < MIN_SOCKADDR_LEN)
{
- kdWarning() << "KSocketAddress::newAddress called with invalid size\n";
+ kdWarning() << "TDESocketAddress::newAddress called with invalid size\n";
return NULL;
}
@@ -153,10 +153,10 @@ KSocketAddress* KSocketAddress::newAddress(const struct sockaddr* sa, ksocklen_t
return new KUnixSocketAddress((const sockaddr_un*)sa, size);
}
- return new KSocketAddress(sa, size);
+ return new TDESocketAddress(sa, size);
}
-bool KSocketAddress::isEqual(const KSocketAddress& other) const
+bool TDESocketAddress::isEqual(const TDESocketAddress& other) const
{
switch(family())
{
@@ -176,7 +176,7 @@ bool KSocketAddress::isEqual(const KSocketAddress& other) const
return memcmp(data, other.data, datasize) == 0;
}
-bool KSocketAddress::isCoreEqual(const KSocketAddress& other) const
+bool TDESocketAddress::isCoreEqual(const TDESocketAddress& other) const
{
switch(family())
{
@@ -193,17 +193,17 @@ bool KSocketAddress::isCoreEqual(const KSocketAddress& other) const
return false;
}
-TQString KSocketAddress::nodeName() const
+TQString TDESocketAddress::nodeName() const
{
return TQString::null;
}
-TQString KSocketAddress::serviceName() const
+TQString TDESocketAddress::serviceName() const
{
return TQString::null;
}
-int KSocketAddress::ianaFamily(int af)
+int TDESocketAddress::ianaFamily(int af)
{
switch (af)
{
@@ -218,7 +218,7 @@ int KSocketAddress::ianaFamily(int af)
}
}
-int KSocketAddress::fromIanaFamily(int iana)
+int TDESocketAddress::fromIanaFamily(int iana)
{
switch (iana)
{
@@ -274,7 +274,7 @@ KInetSocketAddress::KInetSocketAddress() :
}
KInetSocketAddress::KInetSocketAddress(const KInetSocketAddress &other) :
- KSocketAddress(), d(new KInetSocketAddressPrivate)
+ TDESocketAddress(), d(new KInetSocketAddressPrivate)
{
setAddress(other);
}
@@ -313,7 +313,7 @@ KInetSocketAddress::~KInetSocketAddress()
{
delete d;
- // KSocketAddress::~KSocketAddress();
+ // TDESocketAddress::~TDESocketAddress();
}
bool KInetSocketAddress::setAddress(const KInetSocketAddress &other)
@@ -626,7 +626,7 @@ ksocklen_t KInetSocketAddress::size() const
return 0;
}
-bool KInetSocketAddress::areEqualInet(const KSocketAddress &s1, const KSocketAddress &s2, bool coreOnly)
+bool KInetSocketAddress::areEqualInet(const TDESocketAddress &s1, const TDESocketAddress &s2, bool coreOnly)
{
if (s1.family() != s2.family())
return false;
@@ -643,7 +643,7 @@ bool KInetSocketAddress::areEqualInet(const KSocketAddress &s1, const KSocketAdd
(memcmp(&sin1->sin_addr, &sin2->sin_addr, sizeof(struct in_addr)) == 0);
}
-bool KInetSocketAddress::areEqualInet6(const KSocketAddress &s1, const KSocketAddress &s2, bool coreOnly)
+bool KInetSocketAddress::areEqualInet6(const TDESocketAddress &s1, const TDESocketAddress &s2, bool coreOnly)
{
#ifdef AF_INET6
if (s1.family() != s2.family())
@@ -688,7 +688,7 @@ void KInetSocketAddress::fromV4()
# endif
#endif
- // data == KSocketAddress::data
+ // data == TDESocketAddress::data
data = (sockaddr*)&d->sin;
datasize = sizeof( sockaddr_in );
}
@@ -864,7 +864,7 @@ const sockaddr_un* KUnixSocketAddress::address() const
return d->m_sun;
}
-bool KUnixSocketAddress::areEqualUnix(const KSocketAddress &s1, const KSocketAddress &s2, bool /* coreOnly */)
+bool KUnixSocketAddress::areEqualUnix(const TDESocketAddress &s1, const TDESocketAddress &s2, bool /* coreOnly */)
{
if (s1.family() != s2.family())
return false;
@@ -881,14 +881,14 @@ bool KUnixSocketAddress::areEqualUnix(const KSocketAddress &s1, const KSocketAdd
return (strcmp(sun1->sun_path, sun2->sun_path) == 0);
}
-void KSocketAddress::virtual_hook( int, void* )
+void TDESocketAddress::virtual_hook( int, void* )
{ /*BASE::virtual_hook( id, data );*/ }
void KInetSocketAddress::virtual_hook( int id, void* data )
-{ KSocketAddress::virtual_hook( id, data ); }
+{ TDESocketAddress::virtual_hook( id, data ); }
void KUnixSocketAddress::virtual_hook( int id, void* data )
-{ KSocketAddress::virtual_hook( id, data ); }
+{ TDESocketAddress::virtual_hook( id, data ); }
#include "ksockaddr.moc"
diff --git a/tdecore/ksockaddr.h b/tdecore/ksockaddr.h
index fd73e722a..d3eb62d0d 100644
--- a/tdecore/ksockaddr.h
+++ b/tdecore/ksockaddr.h
@@ -34,7 +34,7 @@ struct sockaddr;
class KExtendedSocket; // No need to define it fully
-class KSocketAddressPrivate;
+class TDESocketAddressPrivate;
/**
* A socket address.
*
@@ -43,27 +43,27 @@ class KSocketAddressPrivate;
* @author Thiago Macieira <thiago.macieira@kdemail.net>
* @short a socket address.
*/
-class TDECORE_EXPORT KSocketAddress: public TQObject
+class TDECORE_EXPORT TDESocketAddress: public TQObject
{
Q_OBJECT
protected:
/**
* Creates an empty class
*/
- KSocketAddress() { init(); }
+ TDESocketAddress() { init(); }
/**
* Creates with given data
* @param sa a sockaddr structure
* @param size the size of @p sa
*/
- KSocketAddress(const sockaddr* sa, ksocklen_t size);
+ TDESocketAddress(const sockaddr* sa, ksocklen_t size);
public:
/**
* Destructor.
*/
- virtual ~KSocketAddress();
+ virtual ~TDESocketAddress();
/**
* Returns a string representation of this socket.
@@ -112,15 +112,15 @@ public:
* @param other the other socket
* @return true if both sockets are equal
*/
- virtual bool isEqual(const KSocketAddress& other) const;
- bool isEqual(const KSocketAddress* other) const
+ virtual bool isEqual(const TDESocketAddress& other) const;
+ bool isEqual(const TDESocketAddress* other) const
{ return isEqual(*other); }
/**
* Overloaded == operator.
* @see isEqual()
*/
- bool operator==(const KSocketAddress& other) const
+ bool operator==(const TDESocketAddress& other) const
{ return isEqual(other); }
/**
@@ -133,7 +133,7 @@ public:
* @param other the other socket
* @return true if the code part is equal
*/
- bool isCoreEqual(const KSocketAddress& other) const;
+ bool isCoreEqual(const TDESocketAddress& other) const;
/**
* Some sockets may differ in such things as services or port numbers,
@@ -145,7 +145,7 @@ public:
* @param other the other socket
* @return true if the code part is equal
*/
- bool isCoreEqual(const KSocketAddress* other) const
+ bool isCoreEqual(const TDESocketAddress* other) const
{ return isCoreEqual(*other); }
/**
@@ -174,18 +174,18 @@ protected:
private:
void init();
/* No copy constructor */
- KSocketAddress(KSocketAddress&);
- KSocketAddress& operator=(KSocketAddress&);
+ TDESocketAddress(TDESocketAddress&);
+ TDESocketAddress& operator=(TDESocketAddress&);
public:
/**
- * Creates a new KSocketAddress or descendant class from given
+ * Creates a new TDESocketAddress or descendant class from given
* raw socket address.
* @param sa new socket address
* @param size new socket address's length
- * @return the new KSocketAddress, or 0 if the function failed
+ * @return the new TDESocketAddress, or 0 if the function failed
*/
- static KSocketAddress* newAddress(const struct sockaddr *sa, ksocklen_t size);
+ static TDESocketAddress* newAddress(const struct sockaddr *sa, ksocklen_t size);
/**
* Returns the IANA family number of the given address family.
@@ -206,7 +206,7 @@ public:
protected:
virtual void virtual_hook( int id, void* data );
private:
- KSocketAddressPrivate* d;
+ TDESocketAddressPrivate* d;
};
/*
@@ -224,13 +224,13 @@ class KInetSocketAddressPrivate;
*
* This is an IPv4 or IPv6 address of the Internet
*
- * This class inherits most of the functionality from KSocketAddress, but
+ * This class inherits most of the functionality from TDESocketAddress, but
* is targeted specifically to Internet addresses
*
* @author Thiago Macieira <thiago.macieira@kdemail.net>
* @short an Internet socket address
*/
-class TDECORE_EXPORT KInetSocketAddress: public ::KSocketAddress
+class TDECORE_EXPORT KInetSocketAddress: public ::TDESocketAddress
{
Q_OBJECT
public:
@@ -485,10 +485,10 @@ public:
* the address)
* @return true if the given addresses are equal.
* @see areEqualInet6()
- * @see KSocketAddress::isEqual()
- * @see KSocketAddress::isCoreEqual()
+ * @see TDESocketAddress::isEqual()
+ * @see TDESocketAddress::isCoreEqual()
*/
- static bool areEqualInet(const KSocketAddress &s1, const KSocketAddress &s2, bool coreOnly);
+ static bool areEqualInet(const TDESocketAddress &s1, const TDESocketAddress &s2, bool coreOnly);
/**
* Compares two IPv6 addresses.
@@ -498,10 +498,10 @@ public:
* the address)
* @return true if the given addresses are equal.
* @see areEqualInet()
- * @see KSocketAddress::isEqual()
- * @see KSocketAddress::isCoreEqual()
+ * @see TDESocketAddress::isEqual()
+ * @see TDESocketAddress::isCoreEqual()
*/
- static bool areEqualInet6(const KSocketAddress &s1, const KSocketAddress &s2, bool coreOnly);
+ static bool areEqualInet6(const TDESocketAddress &s1, const TDESocketAddress &s2, bool coreOnly);
/* operators */
@@ -581,7 +581,7 @@ class KUnixSocketAddressPrivate;
* @author Thiago Macieira <thiago.macieira@kdemail.net>
* @short a Unix socket address
*/
-class TDECORE_EXPORT KUnixSocketAddress: public ::KSocketAddress
+class TDECORE_EXPORT KUnixSocketAddress: public ::TDESocketAddress
{
Q_OBJECT
public:
@@ -665,10 +665,10 @@ public:
* @param coreOnly true if only core parts should be compared (currently
* unused)
* @return true if the given addresses are equal.
- * @see KSocketAddress::isEqual()
- * @see KSocketAddress::isCoreEqual()
+ * @see TDESocketAddress::isEqual()
+ * @see TDESocketAddress::isCoreEqual()
*/
- static bool areEqualUnix(const KSocketAddress &s1, const KSocketAddress &s2, bool coreOnly);
+ static bool areEqualUnix(const TDESocketAddress &s1, const TDESocketAddress &s2, bool coreOnly);
private:
void init();
diff --git a/tdecore/ksocks.cpp b/tdecore/ksocks.cpp
index 3de74bd88..a6ecc37d2 100644
--- a/tdecore/ksocks.cpp
+++ b/tdecore/ksocks.cpp
@@ -26,11 +26,11 @@
#include <tqstring.h>
#include <tqmap.h>
-#include <klocale.h>
+#include <tdelocale.h>
#include <kdebug.h>
#include "klibloader.h"
-#include <kconfig.h>
-#include <kapplication.h>
+#include <tdeconfig.h>
+#include <tdeapplication.h>
#include <sys/types.h>
#include <sys/socket.h>
@@ -213,7 +213,7 @@ KSocks *KSocks::self() {
// Note that we don't use a static deleter here. It makes no sense and tends to cause crashes.
if (!_me) {
if (kapp) {
- KConfigGroup cfg(kapp->config(), "Socks");
+ TDEConfigGroup cfg(kapp->config(), "Socks");
_me = new KSocks(&cfg);
} else {
_disabled = true;
@@ -223,7 +223,7 @@ KSocks *KSocks::self() {
return _me;
}
-void KSocks::setConfig(KConfigBase *config)
+void KSocks::setConfig(TDEConfigBase *config)
{
// We can change the config from disabled to enabled
// but not the other way around.
@@ -239,7 +239,7 @@ void KSocks::setConfig(KConfigBase *config)
bool KSocks::activated() { return (_me != 0L); }
-KSocks::KSocks(KConfigBase *config) : _socksLib(0L), _st(0L) {
+KSocks::KSocks(TDEConfigBase *config) : _socksLib(0L), _st(0L) {
_hasSocks = false;
_useSocks = false;
diff --git a/tdecore/ksocks.h b/tdecore/ksocks.h
index 14067c0f3..b55829941 100644
--- a/tdecore/ksocks.h
+++ b/tdecore/ksocks.h
@@ -29,7 +29,7 @@
class KSocksTable;
class KSocksPrivate;
class KLibrary;
-class KConfigBase;
+class TDEConfigBase;
struct sockaddr;
typedef unsigned ksocklen_t;
@@ -185,10 +185,10 @@ public:
* Set this before the first call to KSocks::self() and it will use
* @p config to read its configuration from.
*/
- static void setConfig(KConfigBase *config);
+ static void setConfig(TDEConfigBase *config);
private:
- KSocks(KConfigBase *config);
+ KSocks(TDEConfigBase *config);
~KSocks();
void stopSocks();
diff --git a/tdecore/kstandarddirs.cpp b/tdecore/kstandarddirs.cpp
index a7cdd3659..dc9ca909a 100644
--- a/tdecore/kstandarddirs.cpp
+++ b/tdecore/kstandarddirs.cpp
@@ -47,7 +47,7 @@
#include <tqstringlist.h>
#include "kstandarddirs.h"
-#include "kconfig.h"
+#include "tdeconfig.h"
#include "kinstance.h"
#include "kshell.h"
#include "ksimpleconfig.h"
@@ -57,10 +57,10 @@
template class TQDict<TQStringList>;
-class KStandardDirs::KStandardDirsPrivate
+class TDEStandardDirs::TDEStandardDirsPrivate
{
public:
- KStandardDirsPrivate()
+ TDEStandardDirsPrivate()
: restrictionsActive(false),
dataRestrictionActive(false),
checkRestrictions(true)
@@ -76,20 +76,20 @@ public:
// Singleton, with data shared by all kstandarddirs instances.
// Used in static methods like findExe()
-class KStandardDirsSingleton
+class TDEStandardDirsSingleton
{
public:
TQString defaultprefix;
TQString defaultbindir;
- static KStandardDirsSingleton* self();
+ static TDEStandardDirsSingleton* self();
private:
- static KStandardDirsSingleton* s_self;
+ static TDEStandardDirsSingleton* s_self;
};
-static KStaticDeleter<KStandardDirsSingleton> kstds_sd;
-KStandardDirsSingleton* KStandardDirsSingleton::s_self = 0;
-KStandardDirsSingleton* KStandardDirsSingleton::self() {
+static KStaticDeleter<TDEStandardDirsSingleton> kstds_sd;
+TDEStandardDirsSingleton* TDEStandardDirsSingleton::s_self = 0;
+TDEStandardDirsSingleton* TDEStandardDirsSingleton::self() {
if ( !s_self )
- kstds_sd.setObject( s_self, new KStandardDirsSingleton );
+ kstds_sd.setObject( s_self, new TDEStandardDirsSingleton );
return s_self;
}
@@ -105,9 +105,9 @@ static const char* const types[] = {"html", "html-bundle", "icon", "apps", "soun
static int tokenize( TQStringList& token, const TQString& str,
const TQString& delim );
-KStandardDirs::KStandardDirs( ) : addedCustoms(false)
+TDEStandardDirs::TDEStandardDirs( ) : addedCustoms(false)
{
- d = new KStandardDirsPrivate;
+ d = new TDEStandardDirsPrivate;
dircache.setAutoDelete(true);
relatives.setAutoDelete(true);
absolutes.setAutoDelete(true);
@@ -115,12 +115,12 @@ KStandardDirs::KStandardDirs( ) : addedCustoms(false)
addKDEDefaults();
}
-KStandardDirs::~KStandardDirs()
+TDEStandardDirs::~TDEStandardDirs()
{
delete d;
}
-bool KStandardDirs::isRestrictedResource(const char *type, const TQString& relPath) const
+bool TDEStandardDirs::isRestrictedResource(const char *type, const TQString& relPath) const
{
if (!d || !d->restrictionsActive)
return false;
@@ -140,7 +140,7 @@ bool KStandardDirs::isRestrictedResource(const char *type, const TQString& relPa
return false;
}
-void KStandardDirs::applyDataRestrictions(const TQString &relPath) const
+void TDEStandardDirs::applyDataRestrictions(const TQString &relPath) const
{
TQString key;
int i = relPath.find(QChar('/'));
@@ -154,7 +154,7 @@ void KStandardDirs::applyDataRestrictions(const TQString &relPath) const
}
-TQStringList KStandardDirs::allTypes() const
+TQStringList TDEStandardDirs::allTypes() const
{
TQStringList list;
for (int i = 0; types[i] != 0; ++i)
@@ -177,12 +177,12 @@ static void priorityAdd(TQStringList &prefixes, const TQString& dir, bool priori
}
}
-void KStandardDirs::addPrefix( const TQString& _dir )
+void TDEStandardDirs::addPrefix( const TQString& _dir )
{
addPrefix(_dir, false);
}
-void KStandardDirs::addPrefix( const TQString& _dir, bool priority )
+void TDEStandardDirs::addPrefix( const TQString& _dir, bool priority )
{
if (_dir.isEmpty())
return;
@@ -197,12 +197,12 @@ void KStandardDirs::addPrefix( const TQString& _dir, bool priority )
}
}
-void KStandardDirs::addXdgConfigPrefix( const TQString& _dir )
+void TDEStandardDirs::addXdgConfigPrefix( const TQString& _dir )
{
addXdgConfigPrefix(_dir, false);
}
-void KStandardDirs::addXdgConfigPrefix( const TQString& _dir, bool priority )
+void TDEStandardDirs::addXdgConfigPrefix( const TQString& _dir, bool priority )
{
if (_dir.isEmpty())
return;
@@ -217,12 +217,12 @@ void KStandardDirs::addXdgConfigPrefix( const TQString& _dir, bool priority )
}
}
-void KStandardDirs::addXdgDataPrefix( const TQString& _dir )
+void TDEStandardDirs::addXdgDataPrefix( const TQString& _dir )
{
addXdgDataPrefix(_dir, false);
}
-void KStandardDirs::addXdgDataPrefix( const TQString& _dir, bool priority )
+void TDEStandardDirs::addXdgDataPrefix( const TQString& _dir, bool priority )
{
if (_dir.isEmpty())
return;
@@ -237,27 +237,27 @@ void KStandardDirs::addXdgDataPrefix( const TQString& _dir, bool priority )
}
}
-TQString KStandardDirs::kfsstnd_prefixes()
+TQString TDEStandardDirs::kfsstnd_prefixes()
{
return prefixes.join(TQChar(KPATH_SEPARATOR));
}
-TQString KStandardDirs::kfsstnd_xdg_conf_prefixes()
+TQString TDEStandardDirs::kfsstnd_xdg_conf_prefixes()
{
return d->xdgconf_prefixes.join(TQChar(KPATH_SEPARATOR));
}
-TQString KStandardDirs::kfsstnd_xdg_data_prefixes()
+TQString TDEStandardDirs::kfsstnd_xdg_data_prefixes()
{
return d->xdgdata_prefixes.join(TQChar(KPATH_SEPARATOR));
}
-bool KStandardDirs::addResourceType( const char *type,
+bool TDEStandardDirs::addResourceType( const char *type,
const TQString& relativename )
{
return addResourceType(type, relativename, true);
}
-bool KStandardDirs::addResourceType( const char *type,
+bool TDEStandardDirs::addResourceType( const char *type,
const TQString& relativename,
bool priority )
{
@@ -283,14 +283,14 @@ bool KStandardDirs::addResourceType( const char *type,
return false;
}
-bool KStandardDirs::addResourceDir( const char *type,
+bool TDEStandardDirs::addResourceDir( const char *type,
const TQString& absdir)
{
// KDE4: change priority to bring in line with addResourceType
return addResourceDir(type, absdir, false);
}
-bool KStandardDirs::addResourceDir( const char *type,
+bool TDEStandardDirs::addResourceDir( const char *type,
const TQString& absdir,
bool priority)
{
@@ -314,7 +314,7 @@ bool KStandardDirs::addResourceDir( const char *type,
return false;
}
-TQString KStandardDirs::findResource( const char *type,
+TQString TDEStandardDirs::findResource( const char *type,
const TQString& filename ) const
{
if (!TQDir::isRelativePath(filename))
@@ -349,7 +349,7 @@ static TQ_UINT32 updateHash(const TQString &file, TQ_UINT32 hash)
return hash;
}
-TQ_UINT32 KStandardDirs::calcResourceHash( const char *type,
+TQ_UINT32 TDEStandardDirs::calcResourceHash( const char *type,
const TQString& filename, bool deep) const
{
TQ_UINT32 hash = 0;
@@ -375,7 +375,7 @@ TQ_UINT32 KStandardDirs::calcResourceHash( const char *type,
}
-TQStringList KStandardDirs::findDirs( const char *type,
+TQStringList TDEStandardDirs::findDirs( const char *type,
const TQString& reldir ) const
{
TQDir testdir;
@@ -409,12 +409,12 @@ TQStringList KStandardDirs::findDirs( const char *type,
return list;
}
-TQString KStandardDirs::findResourceDir( const char *type,
+TQString TDEStandardDirs::findResourceDir( const char *type,
const TQString& filename) const
{
#ifndef NDEBUG
if (filename.isEmpty()) {
- fprintf(stderr, "filename for type %s in KStandardDirs::findResourceDir is not supposed to be empty!!", type);
+ fprintf(stderr, "filename for type %s in TDEStandardDirs::findResourceDir is not supposed to be empty!!", type);
return TQString::null;
}
#endif
@@ -430,7 +430,7 @@ TQString KStandardDirs::findResourceDir( const char *type,
#ifdef Q_WS_WIN //this ensures we're using installed .la files
if ((*it).isEmpty() && filename.right(3)==".la") {
#ifndef NDEBUG
- fprintf(stderr, "KStandardDirs::findResourceDir() found .la in cwd: skipping. (fname=%s)\n", filename.ascii());
+ fprintf(stderr, "TDEStandardDirs::findResourceDir() found .la in cwd: skipping. (fname=%s)\n", filename.ascii());
#endif
continue;
}
@@ -447,7 +447,7 @@ TQString KStandardDirs::findResourceDir( const char *type,
return TQString::null;
}
-bool KStandardDirs::exists(const TQString &fullPath)
+bool TDEStandardDirs::exists(const TQString &fullPath)
{
KDE_struct_stat buff;
if ((access(TQFile::encodeName(fullPath), R_OK) == 0) && (KDE_stat( TQFile::encodeName(fullPath), &buff ) == 0)) {
@@ -620,7 +620,7 @@ static void lookupPrefix(const TQString& prefix, const TQString& relpath,
}
TQStringList
-KStandardDirs::findAllResources( const char *type,
+TDEStandardDirs::findAllResources( const char *type,
const TQString& filter,
bool recursive,
bool unique,
@@ -676,7 +676,7 @@ KStandardDirs::findAllResources( const char *type,
}
TQStringList
-KStandardDirs::findAllResources( const char *type,
+TDEStandardDirs::findAllResources( const char *type,
const TQString& filter,
bool recursive,
bool unique) const
@@ -686,7 +686,7 @@ KStandardDirs::findAllResources( const char *type,
}
TQString
-KStandardDirs::realPath(const TQString &dirname)
+TDEStandardDirs::realPath(const TQString &dirname)
{
char realpath_buffer[MAXPATHLEN + 1];
memset(realpath_buffer, 0, MAXPATHLEN + 1);
@@ -704,7 +704,7 @@ KStandardDirs::realPath(const TQString &dirname)
}
TQString
-KStandardDirs::realFilePath(const TQString &filename)
+TDEStandardDirs::realFilePath(const TQString &filename)
{
char realpath_buffer[MAXPATHLEN + 1];
memset(realpath_buffer, 0, MAXPATHLEN + 1);
@@ -718,7 +718,7 @@ KStandardDirs::realFilePath(const TQString &filename)
return filename;
}
-void KStandardDirs::createSpecialResource(const char *type)
+void TDEStandardDirs::createSpecialResource(const char *type)
{
char hostname[256];
hostname[0] = 0;
@@ -792,17 +792,17 @@ void KStandardDirs::createSpecialResource(const char *type)
addResourceDir(type, dir+QChar('/'));
}
-TQStringList KStandardDirs::resourceDirs(const char *type) const
+TQStringList TDEStandardDirs::resourceDirs(const char *type) const
{
TQStringList *candidates = dircache.find(type);
if (!candidates) { // filling cache
if (strcmp(type, "socket") == 0)
- const_cast<KStandardDirs *>(this)->createSpecialResource(type);
+ const_cast<TDEStandardDirs *>(this)->createSpecialResource(type);
else if (strcmp(type, "tmp") == 0)
- const_cast<KStandardDirs *>(this)->createSpecialResource(type);
+ const_cast<TDEStandardDirs *>(this)->createSpecialResource(type);
else if (strcmp(type, "cache") == 0)
- const_cast<KStandardDirs *>(this)->createSpecialResource(type);
+ const_cast<TDEStandardDirs *>(this)->createSpecialResource(type);
TQDir testdir;
@@ -883,7 +883,7 @@ TQStringList KStandardDirs::resourceDirs(const char *type) const
return *candidates;
}
-TQStringList KStandardDirs::systemPaths( const TQString& pstr )
+TQStringList TDEStandardDirs::systemPaths( const TQString& pstr )
{
TQStringList tokens;
TQString p = pstr;
@@ -929,7 +929,7 @@ TQStringList KStandardDirs::systemPaths( const TQString& pstr )
}
-TQString KStandardDirs::findExe( const TQString& appname,
+TQString TDEStandardDirs::findExe( const TQString& appname,
const TQString& pstr, bool ignore)
{
#ifdef Q_WS_WIN
@@ -978,7 +978,7 @@ TQString KStandardDirs::findExe( const TQString& appname,
return TQString::null;
}
-int KStandardDirs::findAllExe( TQStringList& list, const TQString& appname,
+int TDEStandardDirs::findAllExe( TQStringList& list, const TQString& appname,
const TQString& pstr, bool ignore )
{
#ifdef Q_WS_WIN
@@ -1033,7 +1033,7 @@ static int tokenize( TQStringList& tokens, const TQString& str,
return tokens.count();
}
-TQString KStandardDirs::kde_default(const char *type) {
+TQString TDEStandardDirs::kde_default(const char *type) {
if (!strcmp(type, "data"))
return "share/apps/";
if (!strcmp(type, "html-bundle"))
@@ -1096,7 +1096,7 @@ TQString KStandardDirs::kde_default(const char *type) {
return TQString::null;
}
-TQString KStandardDirs::saveLocation(const char *type,
+TQString TDEStandardDirs::saveLocation(const char *type,
const TQString& suffix,
bool create) const
{
@@ -1127,7 +1127,7 @@ TQString KStandardDirs::saveLocation(const char *type,
else {
dirs = absolutes.find(type);
if (!dirs)
- tqFatal("KStandardDirs: The resource type %s is not registered", type);
+ tqFatal("TDEStandardDirs: The resource type %s is not registered", type);
pPath = new TQString(realPath(dirs->last()));
}
@@ -1151,7 +1151,7 @@ TQString KStandardDirs::saveLocation(const char *type,
return fullPath;
}
-TQString KStandardDirs::relativeLocation(const char *type, const TQString &absPath)
+TQString TDEStandardDirs::relativeLocation(const char *type, const TQString &absPath)
{
TQString fullPath = absPath;
int i = absPath.findRev('/');
@@ -1173,7 +1173,7 @@ TQString KStandardDirs::relativeLocation(const char *type, const TQString &absPa
}
-bool KStandardDirs::makeDir(const TQString& dir, int mode)
+bool TDEStandardDirs::makeDir(const TQString& dir, int mode)
{
// we want an absolute path
if (TQDir::isRelativePath(dir))
@@ -1254,9 +1254,9 @@ static TQString executablePrefix()
}
#endif
-TQString KStandardDirs::kfsstnd_defaultprefix()
+TQString TDEStandardDirs::kfsstnd_defaultprefix()
{
- KStandardDirsSingleton* s = KStandardDirsSingleton::self();
+ TDEStandardDirsSingleton* s = TDEStandardDirsSingleton::self();
if (!s->defaultprefix.isEmpty())
return s->defaultprefix;
#ifdef Q_WS_WIN
@@ -1269,14 +1269,14 @@ TQString KStandardDirs::kfsstnd_defaultprefix()
s->defaultprefix = TDEDIR;
#endif
if (s->defaultprefix.isEmpty()) {
- fprintf(stderr, "KStandardDirs::kfsstnd_defaultprefix(): default TDE prefix not found!\n");
+ fprintf(stderr, "TDEStandardDirs::kfsstnd_defaultprefix(): default TDE prefix not found!\n");
}
return s->defaultprefix;
}
-TQString KStandardDirs::kfsstnd_defaultbindir()
+TQString TDEStandardDirs::kfsstnd_defaultbindir()
{
- KStandardDirsSingleton* s = KStandardDirsSingleton::self();
+ TDEStandardDirsSingleton* s = TDEStandardDirsSingleton::self();
if (!s->defaultbindir.isEmpty())
return s->defaultbindir;
#ifdef Q_WS_WIN
@@ -1287,12 +1287,12 @@ TQString KStandardDirs::kfsstnd_defaultbindir()
s->defaultbindir = kfsstnd_defaultprefix() + TQString::fromLatin1("/bin");
#endif
if (s->defaultbindir.isEmpty()) {
- fprintf(stderr, "KStandardDirs::kfsstnd_defaultbindir(): default binary TDE dir not found!\n");
+ fprintf(stderr, "TDEStandardDirs::kfsstnd_defaultbindir(): default binary TDE dir not found!\n");
}
return s->defaultbindir;
}
-void KStandardDirs::addKDEDefaults()
+void TDEStandardDirs::addKDEDefaults()
{
TQStringList tdedirList;
@@ -1459,10 +1459,10 @@ void KStandardDirs::addKDEDefaults()
addResourceDir("locale", "/usr/share/locale-langpack/", true);
}
-void KStandardDirs::checkConfig() const
+void TDEStandardDirs::checkConfig() const
{
- if (!addedCustoms && KGlobal::_instance && KGlobal::_instance->_config)
- const_cast<KStandardDirs*>(this)->addCustomized(KGlobal::_instance->_config);
+ if (!addedCustoms && TDEGlobal::_instance && TDEGlobal::_instance->_config)
+ const_cast<TDEStandardDirs*>(this)->addCustomized(TDEGlobal::_instance->_config);
}
static TQStringList lookupProfiles(const TQString &mapFile)
@@ -1534,13 +1534,13 @@ static TQStringList lookupProfiles(const TQString &mapFile)
extern bool kde_kiosk_admin;
-bool KStandardDirs::addCustomized(KConfig *config)
+bool TDEStandardDirs::addCustomized(TDEConfig *config)
{
if (addedCustoms && !d->checkRestrictions) // there are already customized entries
return false; // we just quit and hope they are the right ones
// save the numbers of config directories. If this changes,
- // we will return true to give KConfig a chance to reparse
+ // we will return true to give TDEConfig a chance to reparse
uint configdirs = resourceDirs("config").count();
// Remember original group
@@ -1666,19 +1666,19 @@ bool KStandardDirs::addCustomized(KConfig *config)
return configDirsChanged;
}
-TQString KStandardDirs::localtdedir() const
+TQString TDEStandardDirs::localtdedir() const
{
// Return the prefix to use for saving
return prefixes.first();
}
-TQString KStandardDirs::localxdgdatadir() const
+TQString TDEStandardDirs::localxdgdatadir() const
{
// Return the prefix to use for saving
return d->xdgdata_prefixes.first();
}
-TQString KStandardDirs::localxdgconfdir() const
+TQString TDEStandardDirs::localxdgconfdir() const
{
// Return the prefix to use for saving
return d->xdgconf_prefixes.first();
@@ -1687,19 +1687,19 @@ TQString KStandardDirs::localxdgconfdir() const
// just to make code more readable without macros
TQString locate( const char *type,
- const TQString& filename, const KInstance* inst )
+ const TQString& filename, const TDEInstance* inst )
{
return inst->dirs()->findResource(type, filename);
}
TQString locateLocal( const char *type,
- const TQString& filename, const KInstance* inst )
+ const TQString& filename, const TDEInstance* inst )
{
return locateLocal(type, filename, true, inst);
}
TQString locateLocal( const char *type,
- const TQString& filename, bool createDir, const KInstance* inst )
+ const TQString& filename, bool createDir, const TDEInstance* inst )
{
// try to find slashes. If there are some, we have to
// create the subdir first
diff --git a/tdecore/kstandarddirs.h b/tdecore/kstandarddirs.h
index 77fec4efd..7cdf44e37 100644
--- a/tdecore/kstandarddirs.h
+++ b/tdecore/kstandarddirs.h
@@ -26,10 +26,10 @@
#include <tqstring.h>
#include <tqdict.h>
#include <tqstringlist.h>
-#include <kglobal.h>
+#include <tdeglobal.h>
-class KConfig;
-class KStandardDirsPrivate;
+class TDEConfig;
+class TDEStandardDirsPrivate;
/**
* @short Site-independent access to standard KDE directories.
@@ -45,12 +45,12 @@ class KStandardDirsPrivate;
* and applications always refer to a file with a resource type
* (e.g. icon) and a filename (e.g. khexdit.xpm). In an ideal world
* the application would make no assumption where this file is and
- * leave it up to KStandardDirs::findResource("apps", "Home.desktop")
+ * leave it up to TDEStandardDirs::findResource("apps", "Home.desktop")
* to apply this knowledge to return /opt/kde/share/applnk/Home.desktop
* or ::locate("data", "kgame/background.jpg") to return
* /opt/kde/share/apps/kgame/background.jpg
*
- * The main idea behind KStandardDirs is that there are several
+ * The main idea behind TDEStandardDirs is that there are several
* toplevel prefixes below which the files lie. One of these prefixes is
* the one where the user installed tdelibs, one is where the
* application was installed, and one is $HOME/.trinity, but there
@@ -61,7 +61,7 @@ class KStandardDirsPrivate;
* So the search algorithm basically appends to each prefix each registered
* suffix and tries to locate the file there.
* To make the thing even more complex, it's also possible to register
- * absolute paths that KStandardDirs looks up after not finding anything
+ * absolute paths that TDEStandardDirs looks up after not finding anything
* in the former steps. They can be useful if the user wants to provide
* specific directories that aren't in his $HOME/.trinity directory for,
* for example, icons.
@@ -75,9 +75,9 @@ class KStandardDirsPrivate;
* @li data - Where applications store data.
* @li exe - Executables in $prefix/bin. findExe() for a function that takes $PATH into account.
* @li html - HTML documentation.
- * @li icon - Icons, see KIconLoader.
+ * @li icon - Icons, see TDEIconLoader.
* @li lib - Libraries.
- * @li locale - Translation files for KLocale.
+ * @li locale - Translation files for TDELocale.
* @li mime - Mime types.
* @li module - Module (dynamically loaded library).
* @li qtplugins - Qt plugins (dynamically loaded objects for Qt)
@@ -91,19 +91,19 @@ class KStandardDirsPrivate;
* @li socket - UNIX Sockets (specific for both current host and current user)
* @li emoticons - Emoticons themes (Since KDE 3.4)
*
- * A type that is added by the class KApplication if you use it, is
+ * A type that is added by the class TDEApplication if you use it, is
* appdata. This one makes the use of the type data a bit easier as it
* appends the name of the application.
* So while you had to ::locate("data", "appname/filename") so you can
- * also write ::locate("appdata", "filename") if your KApplication instance
- * is called "appname" (as set via KApplication's constructor or KAboutData, if
- * you use the global KStandardDirs object KGlobal::dirs()).
+ * also write ::locate("appdata", "filename") if your TDEApplication instance
+ * is called "appname" (as set via TDEApplication's constructor or TDEAboutData, if
+ * you use the global TDEStandardDirs object TDEGlobal::dirs()).
* Please note though that you cannot use the "appdata"
* type if you intend to use it in an applet for Kicker because 'appname' would
* be "Kicker" instead of the applet's name. Therefore, for applets, you've got
* to work around this by using ::locate("data", "appletname/filename").
*
- * <b>KStandardDirs supports the following environment variables:</b>
+ * <b>TDEStandardDirs supports the following environment variables:</b>
*
* @li TDEDIRS: This may set an additional number of directory prefixes to
* search for resources. The directories should be separated
@@ -120,20 +120,20 @@ class KStandardDirsPrivate;
* home directory of root, usually "/root/.trinity".
* Note that the setting of $HOME is ignored in this case.
*
- * @see KGlobalSettings
+ * @see TDEGlobalSettings
*/
-class TDECORE_EXPORT KStandardDirs
+class TDECORE_EXPORT TDEStandardDirs
{
public:
/**
- * KStandardDirs' constructor. It just initializes the caches.
+ * TDEStandardDirs' constructor. It just initializes the caches.
**/
- KStandardDirs( );
+ TDEStandardDirs( );
/**
- * KStandardDirs' destructor.
+ * TDEStandardDirs' destructor.
*/
- virtual ~KStandardDirs();
+ virtual ~TDEStandardDirs();
/**
* Adds another search dir to front of the @p fsstnd list.
@@ -175,7 +175,7 @@ public:
* The later a suffix is added, the higher its priority. Note, that the
* suffix should end with / but doesn't have to start with one (as prefixes
* should end with one). So adding a suffix for app_pics would look
- * like KGlobal::dirs()->addResourceType("app_pics", "share/app/pics");
+ * like TDEGlobal::dirs()->addResourceType("app_pics", "share/app/pics");
*
* @param type Specifies a short descriptive string to access
* files of this type.
@@ -211,7 +211,7 @@ public:
*
* The filename should be a filename relative to the base dir
* for resources. So is a way to get the path to libtdecore.la
- * to findResource("lib", "libtdecore.la"). KStandardDirs will
+ * to findResource("lib", "libtdecore.la"). TDEStandardDirs will
* then look into the subdir lib of all elements of all prefixes
* ($TDEDIRS) for a file libtdecore.la and return the path to
* the first one it finds (e.g. /opt/kde/lib/libtdecore.la)
@@ -414,7 +414,7 @@ public:
* It's a series of addResourceTypes()
* and addPrefix() calls.
* You normally wouldn't call this function because it's called
- * for you from KGlobal.
+ * for you from TDEGlobal.
*/
void addKDEDefaults();
@@ -427,7 +427,7 @@ public:
* @return true if new config paths have been added
* from @p config.
**/
- bool addCustomized(KConfig *config);
+ bool addCustomized(TDEConfig *config);
/**
* This function is used internally by almost all other function as
@@ -443,7 +443,7 @@ public:
TQStringList resourceDirs(const char *type) const;
/**
- * This function will return a list of all the types that KStandardDirs
+ * This function will return a list of all the types that TDEStandardDirs
* supports.
*
* @return All types that KDE supports
@@ -545,7 +545,7 @@ public:
TQString kfsstnd_xdg_data_prefixes();
/**
- * Returns the toplevel directory in which KStandardDirs
+ * Returns the toplevel directory in which TDEStandardDirs
* will store things. Most likely $HOME/.trinity
* Don't use this function if you can use locateLocal
* @return the toplevel directory
@@ -617,13 +617,13 @@ public:
mutable TQDict<TQString> savelocations;
// Disallow assignment and copy-construction
- KStandardDirs( const KStandardDirs& );
- KStandardDirs& operator= ( const KStandardDirs& );
+ TDEStandardDirs( const TDEStandardDirs& );
+ TDEStandardDirs& operator= ( const TDEStandardDirs& );
bool addedCustoms;
- class KStandardDirsPrivate;
- KStandardDirsPrivate *d;
+ class TDEStandardDirsPrivate;
+ TDEStandardDirsPrivate *d;
void checkConfig() const;
void applyDataRestrictions(const TQString &) const;
@@ -696,14 +696,14 @@ public:
**/
/*!
- * \relates KStandardDirs
+ * \relates TDEStandardDirs
* This function is just for convenience. It simply calls
- *instance->dirs()->\link KStandardDirs::findResource() findResource\endlink(type, filename).
+ *instance->dirs()->\link TDEStandardDirs::findResource() findResource\endlink(type, filename).
**/
-TDECORE_EXPORT TQString locate( const char *type, const TQString& filename, const KInstance* instance = KGlobal::instance() );
+TDECORE_EXPORT TQString locate( const char *type, const TQString& filename, const TDEInstance* instance = TDEGlobal::instance() );
/*!
- * \relates KStandardDirs
+ * \relates TDEStandardDirs
* This function is much like locate. However it returns a
* filename suitable for writing to. No check is made if the
* specified filename actually exists. Missing directories
@@ -711,10 +711,10 @@ TDECORE_EXPORT TQString locate( const char *type, const TQString& filename, cons
* specific file, filename must have a trailing slash.
*
**/
-TDECORE_EXPORT TQString locateLocal( const char *type, const TQString& filename, const KInstance* instance = KGlobal::instance() );
+TDECORE_EXPORT TQString locateLocal( const char *type, const TQString& filename, const TDEInstance* instance = TDEGlobal::instance() );
/*!
- * \relates KStandardDirs
+ * \relates TDEStandardDirs
* This function is much like locate. No check is made if the
* specified filename actually exists. Missing directories
* are created if @p createDir is true. If filename is only
@@ -722,7 +722,7 @@ TDECORE_EXPORT TQString locateLocal( const char *type, const TQString& filename,
* filename must have a trailing slash.
*
**/
-TDECORE_EXPORT TQString locateLocal( const char *type, const TQString& filename, bool createDir, const KInstance* instance = KGlobal::instance() );
+TDECORE_EXPORT TQString locateLocal( const char *type, const TQString& filename, bool createDir, const TDEInstance* instance = TDEGlobal::instance() );
/*! @} */
diff --git a/tdecore/kstaticdeleter.h b/tdecore/kstaticdeleter.h
index 61b4a8e4a..b6967268c 100644
--- a/tdecore/kstaticdeleter.h
+++ b/tdecore/kstaticdeleter.h
@@ -23,18 +23,18 @@
#ifndef _KSTATIC_DELETER_H_
#define _KSTATIC_DELETER_H_
-#include <kglobal.h>
+#include <tdeglobal.h>
/**
* Static deleters are used to manage static resources. They can register
- * themselves with KGlobal. KGlobal will call destructObject() when
- * KGlobal::deleteStaticDeleters() is called or when it the process
+ * themselves with TDEGlobal. TDEGlobal will call destructObject() when
+ * TDEGlobal::deleteStaticDeleters() is called or when it the process
* finishes.
*
* @see KStaticDeleter
- * @see KGlobal::registerStaticDeleter()
- * @see KGlobal::unregisterStaticDeleter()
- * @see KGlobal::deleteStaticDeleters()
+ * @see TDEGlobal::registerStaticDeleter()
+ * @see TDEGlobal::unregisterStaticDeleter()
+ * @see TDEGlobal::deleteStaticDeleters()
*/
class TDECORE_EXPORT KStaticDeleterBase {
public:
@@ -42,7 +42,7 @@ public:
/**
* Should destruct the resources managed by this KStaticDeleterBase.
* Usually you also want to call it in your destructor.
- * @see KGlobal::deleteStaticDeleters()
+ * @see TDEGlobal::deleteStaticDeleters()
*/
virtual void destructObject();
};
@@ -76,7 +76,7 @@ public:
KStaticDeleter() { deleteit = 0; globalReference = 0; array = false; }
/**
* Sets the object to delete and registers the object to be
- * deleted to KGlobal. If the given object is 0, the former
+ * deleted to TDEGlobal. If the given object is 0, the former
* registration is unregistered.
* @param obj the object to delete
* @param isArray tells the destructor to delete an array instead of an object
@@ -87,14 +87,14 @@ public:
globalReference = 0;
array = isArray;
if (obj)
- KGlobal::registerStaticDeleter(this);
+ TDEGlobal::registerStaticDeleter(this);
else
- KGlobal::unregisterStaticDeleter(this);
+ TDEGlobal::unregisterStaticDeleter(this);
return obj;
}
/**
* Sets the object to delete and registers the object to be
- * deleted to KGlobal. If the given object is 0, the former
+ * deleted to TDEGlobal. If the given object is 0, the former
* registration is unregistered.
* @param globalRef the static pointer where this object is stored
* This pointer will be reset to 0 after deletion of the object.
@@ -106,9 +106,9 @@ public:
deleteit = obj;
array = isArray;
if (obj)
- KGlobal::registerStaticDeleter(this);
+ TDEGlobal::registerStaticDeleter(this);
else
- KGlobal::unregisterStaticDeleter(this);
+ TDEGlobal::unregisterStaticDeleter(this);
globalRef = obj;
return obj;
}
@@ -127,7 +127,7 @@ public:
deleteit = 0;
}
virtual ~KStaticDeleter() {
- KGlobal::unregisterStaticDeleter(this);
+ TDEGlobal::unregisterStaticDeleter(this);
destructObject();
}
private:
diff --git a/tdecore/kstringhandler.cpp b/tdecore/kstringhandler.cpp
index d33c3c924..b19c5b875 100644
--- a/tdecore/kstringhandler.cpp
+++ b/tdecore/kstringhandler.cpp
@@ -18,7 +18,7 @@
*/
#include "kstringhandler.h"
-#include "kglobal.h"
+#include "tdeglobal.h"
static void parsePythonRange( const TQCString &range, uint &start, uint &end )
{
@@ -654,7 +654,7 @@ TQString KStringHandler::from8Bit( const char *str )
if (!str)
return TQString::null;
if (!*str) {
- static const TQString &emptyString = KGlobal::staticQString("");
+ static const TQString &emptyString = TDEGlobal::staticQString("");
return emptyString;
}
return KStringHandler::isUtf8( str ) ?
diff --git a/tdecore/kstringhandler.h b/tdecore/kstringhandler.h
index 40cfa3617..f20963d63 100644
--- a/tdecore/kstringhandler.h
+++ b/tdecore/kstringhandler.h
@@ -350,8 +350,8 @@ public:
*
* Example:
* \code
- * perlSplit(' ', "kparts reaches the parts other parts can't", 3)
- * TQStringList contains: "kparts", "reaches", "the parts other parts can't"
+ * perlSplit(' ', "tdeparts reaches the parts other parts can't", 3)
+ * TQStringList contains: "tdeparts", "reaches", "the parts other parts can't"
* \endcode
*
* @param sep is the character to use to delimit s.
diff --git a/tdecore/ktempdir.cpp b/tdecore/ktempdir.cpp
index c134914c1..d16d2e185 100644
--- a/tdecore/ktempdir.cpp
+++ b/tdecore/ktempdir.cpp
@@ -47,8 +47,8 @@
#include <tqdatetime.h>
#include <tqdir.h>
-#include "kglobal.h"
-#include "kapplication.h"
+#include "tdeglobal.h"
+#include "tdeapplication.h"
#include "kinstance.h"
#include "ktempdir.h"
#include "kstandarddirs.h"
@@ -63,7 +63,7 @@ KTempDir::KTempDir(TQString directoryPrefix, int mode)
mError=0;
if (directoryPrefix.isEmpty())
{
- directoryPrefix = locateLocal("tmp", KGlobal::instance()->instanceName());
+ directoryPrefix = locateLocal("tmp", TDEGlobal::instance()->instanceName());
}
(void) create(directoryPrefix , mode);
}
@@ -72,7 +72,7 @@ bool
KTempDir::create(const TQString &directoryPrefix, int mode)
{
// make sure the random seed is randomized
- (void) KApplication::random();
+ (void) TDEApplication::random();
TQCString nme = TQFile::encodeName(directoryPrefix) + "XXXXXX";
char *realName;
diff --git a/tdecore/ktempdir.h b/tdecore/ktempdir.h
index f5b2f8026..33bb825d0 100644
--- a/tdecore/ktempdir.h
+++ b/tdecore/ktempdir.h
@@ -45,7 +45,7 @@ class KTempDirPrivate;
*
* KTempFile does not create any missing directories, but locateLocal() does.
*
- * See also KStandardDirs
+ * See also TDEStandardDirs
*
* @since 3.2
* @author Joseph Wenninger <jowenn@kde.org>
@@ -133,7 +133,7 @@ public:
*
* @note This function is more meant for removing a directory
* not created by the user. For user-created directories,
- * using KIO::NetAccess::del is recommended instead,
+ * using TDEIO::NetAccess::del is recommended instead,
* especially as it has user feedback for long operations.
*
* @param path Path of the directory to delete
diff --git a/tdecore/ktimezones.cpp b/tdecore/ktimezones.cpp
index 77a0cca0f..3436cdabb 100644
--- a/tdecore/ktimezones.cpp
+++ b/tdecore/ktimezones.cpp
@@ -24,7 +24,7 @@
#include <kmdcodec.h>
#include <kprocess.h>
#include <kstringhandler.h>
-#include <ktempfile.h>
+#include <tdetempfile.h>
#include <tqdatetime.h>
#include <tqfile.h>
@@ -203,7 +203,7 @@ bool KTimezone::isValidLongitude(float longitude)
}
KTimezone::KTimezone(
- KSharedPtr<KTimezoneSource> db, const TQString& name,
+ TDESharedPtr<KTimezoneSource> db, const TQString& name,
const TQString &countryCode, float latitude, float longitude,
const TQString &comment) :
m_db(db),
@@ -400,7 +400,7 @@ const KTimezones::ZoneMap KTimezones::allZones()
"/bin/awk" << "'{print \"??\\t+9999+99999\\t\" $2}'";
// Note the use of blocking here...it is a trivial amount of data!
temp.close();
- reader.start(KProcess::Block);
+ reader.start(TDEProcess::Block);
f.setName(temp.name());
if (!temp.status() || !f.open(IO_ReadOnly))
{
@@ -415,7 +415,7 @@ const KTimezones::ZoneMap KTimezones::allZones()
TQTextStream str(&f);
TQRegExp lineSeparator("[ \t]");
TQRegExp ordinateSeparator("[+-]");
- KSharedPtr<KTimezoneSource> db(new KTimezoneSource(m_zoneinfoDir));
+ TDESharedPtr<KTimezoneSource> db(new KTimezoneSource(m_zoneinfoDir));
while (!str.atEnd())
{
TQString line = str.readLine();
diff --git a/tdecore/ktimezones.h b/tdecore/ktimezones.h
index d24e8ec10..339cbf5bf 100644
--- a/tdecore/ktimezones.h
+++ b/tdecore/ktimezones.h
@@ -49,7 +49,7 @@ class KTimezonesPrivate;
* @author S.R.Haque <srhaque@iee.org>.
*/
class TDECORE_EXPORT KTimezoneSource :
- public KShared
+ public TDEShared
{
public:
KTimezoneSource(const TQString &db);
@@ -114,7 +114,7 @@ public:
* @param comment description of the timezone, if any.
*/
KTimezone(
- KSharedPtr<KTimezoneSource> db, const TQString &name,
+ TDESharedPtr<KTimezoneSource> db, const TQString &name,
const TQString &countryCode = TQString(), float latitude = UNKNOWN, float longitude = UNKNOWN,
const TQString &comment = TQString());
~KTimezone();
@@ -191,7 +191,7 @@ private:
KTimezone(const KTimezone&);
KTimezone& operator=(const KTimezone&);
- KSharedPtr<KTimezoneSource> m_db;
+ TDESharedPtr<KTimezoneSource> m_db;
TQString m_name;
TQString m_countryCode;
float m_latitude;
diff --git a/tdecore/kuniqueapplication.cpp b/tdecore/kuniqueapplication.cpp
index 5f7087313..0a3a0962a 100644
--- a/tdecore/kuniqueapplication.cpp
+++ b/tdecore/kuniqueapplication.cpp
@@ -34,16 +34,16 @@
#include <tqtimer.h>
#include <dcopclient.h>
-#include <kcmdlineargs.h>
+#include <tdecmdlineargs.h>
#include <kstandarddirs.h>
-#include <kaboutdata.h>
+#include <tdeaboutdata.h>
#if defined Q_WS_X11
#include <twin.h>
-#include <kstartupinfo.h>
+#include <tdestartupinfo.h>
#endif
-#include <kconfig.h>
+#include <tdeconfig.h>
#include "kdebug.h"
#include "kuniqueapplication.h"
@@ -64,10 +64,10 @@ bool KUniqueApplication::s_multipleInstances = false;
bool KUniqueApplication::s_uniqueTestDone = false;
bool KUniqueApplication::s_handleAutoStarted = false;
-static KCmdLineOptions kunique_options[] =
+static TDECmdLineOptions kunique_options[] =
{
{ "nofork", "Don't run in the background.", 0 },
- KCmdLineLastOption
+ TDECmdLineLastOption
};
struct DCOPRequest {
@@ -86,7 +86,7 @@ public:
void
KUniqueApplication::addCmdLineOptions()
{
- KCmdLineArgs::addCmdLineOptions(kunique_options, 0, "kuniqueapp", "tde" );
+ TDECmdLineArgs::addCmdLineOptions(kunique_options, 0, "kuniqueapp", "tde" );
}
bool
@@ -99,12 +99,12 @@ KUniqueApplication::start()
#ifdef Q_WS_WIN
s_nofork = true;
#else
- KCmdLineArgs *args = KCmdLineArgs::parsedArgs("kuniqueapp");
+ TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs("kuniqueapp");
s_nofork = !args->isSet("fork");
delete args;
#endif
- TQCString appName = KCmdLineArgs::about->appName();
+ TQCString appName = TDECmdLineArgs::about->appName();
if (s_nofork)
{
@@ -186,17 +186,17 @@ KUniqueApplication::start()
#if 0
#ifdef Q_WS_X11
// say we're up and running ( probably no new window will appear )
- KStartupInfoId id;
- if( kapp != NULL ) // KApplication constructor unsets the env. variable
+ TDEStartupInfoId id;
+ if( kapp != NULL ) // TDEApplication constructor unsets the env. variable
id.initId( kapp->startupId());
else
- id = KStartupInfo::currentStartupIdEnv();
+ id = TDEStartupInfo::currentStartupIdEnv();
if( !id.none())
{
Display* disp = XOpenDisplay( NULL );
if( disp != NULL ) // use extra X connection
{
- KStartupInfo::sendFinishX( disp, id );
+ TDEStartupInfo::sendFinishX( disp, id );
XCloseDisplay( disp );
}
}
@@ -210,19 +210,19 @@ KUniqueApplication::start()
{
#ifdef Q_WS_X11
- KStartupInfoId id;
- if( kapp != NULL ) // KApplication constructor unsets the env. variable
+ TDEStartupInfoId id;
+ if( kapp != NULL ) // TDEApplication constructor unsets the env. variable
id.initId( kapp->startupId());
else
- id = KStartupInfo::currentStartupIdEnv();
+ id = TDEStartupInfo::currentStartupIdEnv();
if( !id.none())
{ // notice about pid change
Display* disp = XOpenDisplay( NULL );
if( disp != NULL ) // use extra X connection
{
- KStartupInfoData data;
+ TDEStartupInfoData data;
data.addPid( getpid());
- KStartupInfo::sendChangeX( disp, id, data );
+ TDEStartupInfo::sendChangeX( disp, id, data );
XCloseDisplay( disp );
}
}
@@ -273,11 +273,11 @@ KUniqueApplication::start()
TQCString new_asn_id;
#if defined Q_WS_X11
- KStartupInfoId id;
- if( kapp != NULL ) // KApplication constructor unsets the env. variable
+ TDEStartupInfoId id;
+ if( kapp != NULL ) // TDEApplication constructor unsets the env. variable
id.initId( kapp->startupId());
else
- id = KStartupInfo::currentStartupIdEnv();
+ id = TDEStartupInfo::currentStartupIdEnv();
if( !id.none())
new_asn_id = id.id();
#endif
@@ -285,14 +285,14 @@ KUniqueApplication::start()
TQByteArray data, reply;
TQDataStream ds(data, IO_WriteOnly);
- KCmdLineArgs::saveAppArgs(ds);
+ TDECmdLineArgs::saveAppArgs(ds);
ds << new_asn_id;
dc->setPriorityCall(true);
TQCString replyType;
- if (!dc->call(appName, KCmdLineArgs::about->appName(), "newInstance()", data, replyType, reply))
+ if (!dc->call(appName, TDECmdLineArgs::about->appName(), "newInstance()", data, replyType, reply))
{
- kdError() << "Communication problem with " << KCmdLineArgs::about->appName() << ", it probably crashed." << endl;
+ kdError() << "Communication problem with " << TDECmdLineArgs::about->appName() << ", it probably crashed." << endl;
delete dc; // Clean up DCOP commmunication
::exit(255);
}
@@ -315,8 +315,8 @@ KUniqueApplication::start()
KUniqueApplication::KUniqueApplication(bool allowStyles, bool GUIenabled, bool configUnique)
- : KApplication( allowStyles, GUIenabled, initHack( configUnique )),
- DCOPObject(KCmdLineArgs::about->appName())
+ : TDEApplication( allowStyles, GUIenabled, initHack( configUnique )),
+ DCOPObject(TDECmdLineArgs::about->appName())
{
d = new KUniqueApplicationPrivate;
d->processingRequest = false;
@@ -331,8 +331,8 @@ KUniqueApplication::KUniqueApplication(bool allowStyles, bool GUIenabled, bool c
#ifdef Q_WS_X11
KUniqueApplication::KUniqueApplication(Display *display, Qt::HANDLE visual,
Qt::HANDLE colormap, bool allowStyles, bool configUnique)
- : KApplication( display, visual, colormap, allowStyles, initHack( configUnique )),
- DCOPObject(KCmdLineArgs::about->appName())
+ : TDEApplication( display, visual, colormap, allowStyles, initHack( configUnique )),
+ DCOPObject(TDECmdLineArgs::about->appName())
{
d = new KUniqueApplicationPrivate;
d->processingRequest = false;
@@ -351,12 +351,12 @@ KUniqueApplication::~KUniqueApplication()
}
// this gets called before even entering TQApplication::TQApplication()
-KInstance* KUniqueApplication::initHack( bool configUnique )
+TDEInstance* KUniqueApplication::initHack( bool configUnique )
{
- KInstance* inst = new KInstance( KCmdLineArgs::about );
+ TDEInstance* inst = new TDEInstance( TDECmdLineArgs::about );
if (configUnique)
{
- KConfigGroupSaver saver( inst->config(), "KDE" );
+ TDEConfigGroupSaver saver( inst->config(), "KDE" );
s_multipleInstances = inst->config()->readBoolEntry("MultipleInstances", false);
}
if( !start())
@@ -381,11 +381,11 @@ void KUniqueApplication::newInstanceNoFork()
// KDE4 remove
// A hack to make startup notification stop for apps which override newInstance()
// and reuse an already existing window there, but use KWin::activateWindow()
- // instead of KStartupInfo::setNewStartupId(). Therefore KWin::activateWindow()
+ // instead of TDEStartupInfo::setNewStartupId(). Therefore KWin::activateWindow()
// for now sets this flag. Automatically ending startup notification always
// would cause problem if the new window would show up with a small delay.
if( s_handleAutoStarted )
- KStartupInfo::handleAutoAppStartedSending();
+ TDEStartupInfo::handleAutoAppStartedSending();
#endif
// What to do with the return value ?
}
@@ -433,7 +433,7 @@ KUniqueApplication::processDelayed()
if (request->fun == "newInstance()") {
dcopClient()->setPriorityCall(false);
TQDataStream ds(request->data, IO_ReadOnly);
- KCmdLineArgs::loadAppArgs(ds);
+ TDECmdLineArgs::loadAppArgs(ds);
if( !ds.atEnd()) // backwards compatibility
{
TQCString asn_id;
@@ -445,7 +445,7 @@ KUniqueApplication::processDelayed()
d->firstInstance = false;
#if defined Q_WS_X11
if( s_handleAutoStarted )
- KStartupInfo::handleAutoAppStartedSending(); // KDE4 remove?
+ TDEStartupInfo::handleAutoAppStartedSending(); // KDE4 remove?
#endif
TQDataStream rs(replyData, IO_WriteOnly);
rs << exitCode;
@@ -476,7 +476,7 @@ int KUniqueApplication::newInstance()
// and what's important, it does it properly. If you reimplement newInstance(),
// and don't call the inherited one, use this (but NOT when newInstance()
// is called for the first time, like here).
- KStartupInfo::setNewStartupId( mainWidget(), kapp->startupId());
+ TDEStartupInfo::setNewStartupId( mainWidget(), kapp->startupId());
#endif
}
}
@@ -489,7 +489,7 @@ void KUniqueApplication::setHandleAutoStarted()
}
void KUniqueApplication::virtual_hook( int id, void* data )
-{ KApplication::virtual_hook( id, data );
+{ TDEApplication::virtual_hook( id, data );
DCOPObject::virtual_hook( id, data ); }
#include "kuniqueapplication.moc"
diff --git a/tdecore/kuniqueapplication.h b/tdecore/kuniqueapplication.h
index b4ad50129..3b7bd8d6e 100644
--- a/tdecore/kuniqueapplication.h
+++ b/tdecore/kuniqueapplication.h
@@ -21,7 +21,7 @@
#ifndef _KUNIQUEAPP_H
#define _KUNIQUEAPP_H
-#include <kapplication.h>
+#include <tdeapplication.h>
#include <dcopobject.h>
class KUniqueApplicationPrivate;
@@ -36,27 +36,27 @@ class KUniqueApplicationPrivate;
* the information to the first instance and then quit.
*
* The .desktop file for the application should state X-DCOP-ServiceType=Unique,
- * see kapplication.h
+ * see tdeapplication.h
*
* If your application is used to open files, it should also support the --tempfile
- * option (see KCmdLineArgs::addTempFileOption()), to delete tempfiles after use.
+ * option (see TDECmdLineArgs::addTempFileOption()), to delete tempfiles after use.
* Add X-TDE-HasTempFileOption=true to the .desktop file to indicate this.
*
- * @see KApplication DCOPObject
+ * @see TDEApplication DCOPObject
* @author Preston Brown <pbrown@kde.org>
*/
-class TDECORE_EXPORT KUniqueApplication : public KApplication, public DCOPObject
+class TDECORE_EXPORT KUniqueApplication : public TDEApplication, public DCOPObject
{
Q_OBJECT
public:
/**
- * Constructor. Takes command line arguments from KCmdLineArgs
+ * Constructor. Takes command line arguments from TDECmdLineArgs
*
* @param allowStyles Set to false to disable the loading on plugin based
* styles. This is only useful to applications that do not display a GUI
* normally. If you do create an application with @p allowStyles set to false
* it normally runs in the background but under special circumstances
- * displays widgets. Call KApplication::enableStyles() before
+ * displays widgets. Call TDEApplication::enableStyles() before
* displaying any widgets.
* @param GUIenabled Set to false to disable all GUI stuff. This implies
* no styles either.
@@ -70,7 +70,7 @@ public:
#ifdef Q_WS_X11
/**
- * Constructor. Takes command line arguments from KCmdLineArgs
+ * Constructor. Takes command line arguments from TDECmdLineArgs
*
* @param display Will be passed to Qt as the X display. The display
* must be valid and already opened.
@@ -82,7 +82,7 @@ public:
* styles. This is only useful to applications that do not display a GUI
* normally. If you do create an application with @p allowStyles set to false
* it normally runs in the background but under special circumstances
- * displays widgets. Call KApplication::enableStyles() before
+ * displays widgets. Call TDEApplication::enableStyles() before
* displaying any widgets.
* @param configUnique If true, the uniqueness of the application will
* depend on the value of the "MultipleInstances"
@@ -113,9 +113,9 @@ public:
* Typically this is used like:
* \code
* int main(int argc, char **argv) {
- * KAboutData about("myappname", "myAppName", .....);
- * KCmdLineArgs::init(argc, argv, &about);
- * KCmdLineArgs::addCmdLineOptions( myCmdOptions );
+ * TDEAboutData about("myappname", "myAppName", .....);
+ * TDECmdLineArgs::init(argc, argv, &about);
+ * TDECmdLineArgs::addCmdLineOptions( myCmdOptions );
* KUniqueApplication::addCmdLineOptions();
*
* if (!KUniqueApplication::start()) {
@@ -162,7 +162,7 @@ public:
* application asking for a new window to be created, possibly with
* some data already loaded based on the arguments received.
*
- * Command line arguments have been passed to KCmdLineArgs before this
+ * Command line arguments have been passed to TDECmdLineArgs before this
* function is called and can be checked in the usual way.
*
* The default implementation ensures the mainwindow of the already
@@ -204,7 +204,7 @@ private slots:
void newInstanceNoFork();
- static KInstance* initHack( bool configUnique );
+ static TDEInstance* initHack( bool configUnique );
private:
static bool s_nofork;
diff --git a/tdecore/kurl.cpp b/tdecore/kurl.cpp
index 7817742bc..2079c050b 100644
--- a/tdecore/kurl.cpp
+++ b/tdecore/kurl.cpp
@@ -27,7 +27,7 @@
// KDE_QT_ONLY is first used for dcop/client (e.g. marshalling)
#ifndef KDE_QT_ONLY
#include <kdebug.h>
-#include <kglobal.h>
+#include <tdeglobal.h>
#include <kidna.h>
#include <kprotocolinfo.h>
#endif
@@ -334,14 +334,14 @@ static TQString cleanpath(const TQString &_path, bool cleanDirSeparator, bool de
if (decodeDots)
{
#ifndef KDE_QT_ONLY
- static const TQString &encodedDot = KGlobal::staticQString("%2e");
+ static const TQString &encodedDot = TDEGlobal::staticQString("%2e");
#else
TQString encodedDot("%2e");
#endif
if (path.find(encodedDot, 0, false) != -1)
{
#ifndef KDE_QT_ONLY
- static const TQString &encodedDOT = KGlobal::staticQString("%2E"); // Uppercase!
+ static const TQString &encodedDOT = TDEGlobal::staticQString("%2E"); // Uppercase!
#else
TQString encodedDOT("%2E");
#endif
@@ -2340,7 +2340,7 @@ KURL::URIMode KURL::uriModeForProtocol(const TQString& protocol)
KURL::URIMode mode = Auto;
if (protocol == fileProt)
return URL;
- if (KGlobal::_instance)
+ if (TDEGlobal::_instance)
mode = KProtocolInfo::uriParseMode(protocol);
if (mode == Auto ) {
#else
diff --git a/tdecore/kurldrag.cpp b/tdecore/kurldrag.cpp
index 2b07c2580..5e64d09b2 100644
--- a/tdecore/kurldrag.cpp
+++ b/tdecore/kurldrag.cpp
@@ -24,8 +24,8 @@
#include <unistd.h>
#include <tdeversion.h>
-#include <kglobal.h>
-#include <klocale.h>
+#include <tdeglobal.h>
+#include <tdelocale.h>
#include <kdebug.h>
class KURLDragPrivate
@@ -253,7 +253,7 @@ TQByteArray KURLDrag::encodedData( const char* mime ) const
KURL KURLDrag::stringToUrl(const TQCString &s)
{
if (strncmp(s.data(), "file:", 5) == 0)
- return KURL(s, KGlobal::locale()->fileEncodingMib());
+ return KURL(s, TDEGlobal::locale()->fileEncodingMib());
return KURL(s, 106); // 106 is mib enum for utf8 codec;
}
@@ -263,12 +263,12 @@ TQString KURLDrag::urlToString(const KURL &url)
if (url.isLocalFile())
{
#if 1
- return url.url(0, KGlobal::locale()->fileEncodingMib());
+ return url.url(0, TDEGlobal::locale()->fileEncodingMib());
#else
// According to the XDND spec, file:/ URLs for DND must have
// the hostname part. But in really it just breaks many apps,
// so it's disabled for now.
- TQString s = url.url(0, KGlobal::locale()->fileEncodingMib());
+ TQString s = url.url(0, TDEGlobal::locale()->fileEncodingMib());
if( !s.startsWith( "file://" ))
{
char hostname[257];
diff --git a/tdecore/kurldrag.h b/tdecore/kurldrag.h
index 45a0e5945..ccaf86e1a 100644
--- a/tdecore/kurldrag.h
+++ b/tdecore/kurldrag.h
@@ -95,7 +95,7 @@ public:
* This is an alternative way of setting the metadata:
* either use the constructor to pass it all at once, or use
* drag->metaData()["key"] = data;
- * @see KIO::TransferJob
+ * @see TDEIO::TransferJob
*/
TQMap<TQString, TQString> &metaData() { return m_metaData; }
diff --git a/tdecore/kuser.cpp b/tdecore/kuser.cpp
index 3fffddf4f..6bad14bd0 100644
--- a/tdecore/kuser.cpp
+++ b/tdecore/kuser.cpp
@@ -32,7 +32,7 @@
#include <grp.h>
-class KUserPrivate : public KShared
+class KUserPrivate : public TDEShared
{
public:
bool valid;
@@ -271,7 +271,7 @@ TQStringList KUser::allUserNames() {
KUser::~KUser() {
}
-class KUserGroupPrivate : public KShared
+class KUserGroupPrivate : public TDEShared
{
public:
bool valid;
diff --git a/tdecore/kuser.h b/tdecore/kuser.h
index 12b511f9f..a48cf124d 100644
--- a/tdecore/kuser.h
+++ b/tdecore/kuser.h
@@ -233,7 +233,7 @@ public:
static TQStringList allUserNames();
private:
- KSharedPtr<KUserPrivate> d;
+ TDESharedPtr<KUserPrivate> d;
void fillPasswd(struct passwd* p);
void fillName(const char* name);
};
@@ -375,7 +375,7 @@ public:
static TQStringList allGroupNames();
private:
- KSharedPtr<KUserGroupPrivate> d;
+ TDESharedPtr<KUserGroupPrivate> d;
void fillGroup(struct group* g);
void fillName(const char* name);
};
diff --git a/tdecore/kvmallocator.cpp b/tdecore/kvmallocator.cpp
index 996d55791..3b887eeee 100644
--- a/tdecore/kvmallocator.cpp
+++ b/tdecore/kvmallocator.cpp
@@ -31,7 +31,7 @@
#include <tqintdict.h>
#include <tqmap.h>
-#include <ktempfile.h>
+#include <tdetempfile.h>
#include <kdebug.h>
#include "kvmallocator.h"
diff --git a/tdecore/kxmessages.cpp b/tdecore/kxmessages.cpp
index 52781188f..116c74d1c 100644
--- a/tdecore/kxmessages.cpp
+++ b/tdecore/kxmessages.cpp
@@ -26,7 +26,7 @@ DEALINGS IN THE SOFTWARE.
#include "kxmessages.h"
-#include <kapplication.h>
+#include <tdeapplication.h>
#ifdef Q_WS_X11 // FIXME(E): Figure out what parts we can/should emulate in QT/E
diff --git a/tdecore/kxmessages.h b/tdecore/kxmessages.h
index 261dc6fdf..5caec19fc 100644
--- a/tdecore/kxmessages.h
+++ b/tdecore/kxmessages.h
@@ -43,12 +43,12 @@ class KXMessagesPrivate;
/**
* Sending string messages to other applications using the X Client Messages.
*
- * Used internally by KStartupInfo. You usually don't want to use this, use DCOP
+ * Used internally by TDEStartupInfo. You usually don't want to use this, use DCOP
* instead.
*
* @author Lubos Lunak <l.lunak@kde.org>
*/
-// KDE4 - make this internal for KStartupInfo only?
+// KDE4 - make this internal for TDEStartupInfo only?
class TDECORE_EXPORT KXMessages
: public TQWidget
{
diff --git a/tdecore/libtdecore_weak.nmcheck b/tdecore/libtdecore_weak.nmcheck
index dc43acb6b..a72cebff4 100644
--- a/tdecore/libtdecore_weak.nmcheck
+++ b/tdecore/libtdecore_weak.nmcheck
@@ -1,7 +1,7 @@
# KDE namespace check file
# tdelibs classes
-KApplication::*
+TDEApplication::*
# these should preferably go in some namespace in KDE4
kDebugPrivate::*
diff --git a/tdecore/netsupp.cpp b/tdecore/netsupp.cpp
index c7e968c16..0c072752c 100644
--- a/tdecore/netsupp.cpp
+++ b/tdecore/netsupp.cpp
@@ -37,7 +37,7 @@
#include "config.h"
#include "kdebug.h"
-#include "klocale.h"
+#include "tdelocale.h"
#ifndef IN6_IS_ADDR_V4MAPPED
#define NEED_IN6_TESTS
diff --git a/tdecore/network/CMakeLists.txt b/tdecore/network/CMakeLists.txt
index addc3633b..b68b9266f 100644
--- a/tdecore/network/CMakeLists.txt
+++ b/tdecore/network/CMakeLists.txt
@@ -24,9 +24,9 @@ install( FILES
kresolver.h kreverseresolver.h tdesocketaddress.h
tdesocketbase.h tdesocketdevice.h kclientsocketbase.h
kstreamsocket.h kserversocket.h kdatagramsocket.h
- kmulticastsocketdevice.h kmulticastsocket.h
+ tdemulticastsocketdevice.h tdemulticastsocket.h
knetworkinterface.h khttpproxysocketdevice.h
- ksockssocketdevice.h kbufferedsocket.h kiobuffer.h
+ ksockssocketdevice.h kbufferedsocket.h tdeiobuffer.h
DESTINATION ${INCLUDE_INSTALL_DIR} )
diff --git a/tdecore/network/Makefile.am b/tdecore/network/Makefile.am
index 768180d1b..621e5fab2 100644
--- a/tdecore/network/Makefile.am
+++ b/tdecore/network/Makefile.am
@@ -38,13 +38,13 @@ include_HEADERS = kresolver.h \
kstreamsocket.h \
kserversocket.h \
kdatagramsocket.h \
- kmulticastsocketdevice.h \
- kmulticastsocket.h \
+ tdemulticastsocketdevice.h \
+ tdemulticastsocket.h \
knetworkinterface.h \
khttpproxysocketdevice.h \
ksockssocketdevice.h \
kbufferedsocket.h \
- kiobuffer.h
+ tdeiobuffer.h
noinst_HEADERS = kresolver_p.h \
kresolverworkerbase.h \
kresolverstandardworkers_p.h \
diff --git a/tdecore/network/kbufferedsocket.cpp b/tdecore/network/kbufferedsocket.cpp
index 3566bde93..3e9462922 100644
--- a/tdecore/network/kbufferedsocket.cpp
+++ b/tdecore/network/kbufferedsocket.cpp
@@ -35,28 +35,28 @@
using namespace KNetwork;
using namespace KNetwork::Internal;
-class KNetwork::KBufferedSocketPrivate
+class KNetwork::TDEBufferedSocketPrivate
{
public:
- mutable KSocketBuffer *input, *output;
+ mutable TDESocketBuffer *input, *output;
- KBufferedSocketPrivate()
+ TDEBufferedSocketPrivate()
{
input = 0L;
output = 0L;
}
};
-KBufferedSocket::KBufferedSocket(const TQString& host, const TQString& service,
+TDEBufferedSocket::TDEBufferedSocket(const TQString& host, const TQString& service,
TQObject *parent, const char *name)
: KStreamSocket(host, service, parent, name),
- d(new KBufferedSocketPrivate)
+ d(new TDEBufferedSocketPrivate)
{
setInputBuffering(true);
setOutputBuffering(true);
}
-KBufferedSocket::~KBufferedSocket()
+TDEBufferedSocket::~TDEBufferedSocket()
{
closeNow();
delete d->input;
@@ -64,13 +64,13 @@ KBufferedSocket::~KBufferedSocket()
delete d;
}
-void KBufferedSocket::setSocketDevice(KSocketDevice* device)
+void TDEBufferedSocket::setSocketDevice(TDESocketDevice* device)
{
KStreamSocket::setSocketDevice(device);
device->setBlocking(false);
}
-bool KBufferedSocket::setSocketOptions(int opts)
+bool TDEBufferedSocket::setSocketOptions(int opts)
{
if (opts == Blocking)
return false;
@@ -79,7 +79,7 @@ bool KBufferedSocket::setSocketOptions(int opts)
return KStreamSocket::setSocketOptions(opts);
}
-void KBufferedSocket::close()
+void TDEBufferedSocket::close()
{
if (!d->output || d->output->isEmpty())
closeNow();
@@ -94,10 +94,10 @@ void KBufferedSocket::close()
}
#ifdef USE_QT3
-TQ_LONG KBufferedSocket::bytesAvailable() const
+TQ_LONG TDEBufferedSocket::bytesAvailable() const
#endif
#ifdef USE_QT4
-qint64 KBufferedSocket::bytesAvailable() const
+qint64 TDEBufferedSocket::bytesAvailable() const
#endif
{
if (!d->input)
@@ -106,7 +106,7 @@ qint64 KBufferedSocket::bytesAvailable() const
return d->input->length();
}
-TQ_LONG KBufferedSocket::waitForMore(int msecs, bool *timeout)
+TQ_LONG TDEBufferedSocket::waitForMore(int msecs, bool *timeout)
{
TQ_LONG retval = KStreamSocket::waitForMore(msecs, timeout);
if (d->input)
@@ -118,7 +118,7 @@ TQ_LONG KBufferedSocket::waitForMore(int msecs, bool *timeout)
return retval;
}
-TQT_TQIO_LONG KBufferedSocket::tqreadBlock(char *data, TQT_TQIO_ULONG maxlen)
+TQT_TQIO_LONG TDEBufferedSocket::tqreadBlock(char *data, TQT_TQIO_ULONG maxlen)
{
if (d->input)
{
@@ -134,13 +134,13 @@ TQT_TQIO_LONG KBufferedSocket::tqreadBlock(char *data, TQT_TQIO_ULONG maxlen)
return KStreamSocket::tqreadBlock(data, maxlen);
}
-TQT_TQIO_LONG KBufferedSocket::tqreadBlock(char *data, TQT_TQIO_ULONG maxlen, KSocketAddress& from)
+TQT_TQIO_LONG TDEBufferedSocket::tqreadBlock(char *data, TQT_TQIO_ULONG maxlen, TDESocketAddress& from)
{
from = peerAddress();
return tqreadBlock(data, maxlen);
}
-TQ_LONG KBufferedSocket::peekBlock(char *data, TQ_ULONG maxlen)
+TQ_LONG TDEBufferedSocket::peekBlock(char *data, TQ_ULONG maxlen)
{
if (d->input)
{
@@ -156,13 +156,13 @@ TQ_LONG KBufferedSocket::peekBlock(char *data, TQ_ULONG maxlen)
return KStreamSocket::peekBlock(data, maxlen);
}
-TQ_LONG KBufferedSocket::peekBlock(char *data, TQ_ULONG maxlen, KSocketAddress& from)
+TQ_LONG TDEBufferedSocket::peekBlock(char *data, TQ_ULONG maxlen, TDESocketAddress& from)
{
from = peerAddress();
return peekBlock(data, maxlen);
}
-TQT_TQIO_LONG KBufferedSocket::tqwriteBlock(const char *data, TQT_TQIO_ULONG len)
+TQT_TQIO_LONG TDEBufferedSocket::tqwriteBlock(const char *data, TQT_TQIO_ULONG len)
{
if (state() != Connected)
{
@@ -192,14 +192,14 @@ TQT_TQIO_LONG KBufferedSocket::tqwriteBlock(const char *data, TQT_TQIO_ULONG len
return KStreamSocket::tqwriteBlock(data, len);
}
-TQT_TQIO_LONG KBufferedSocket::tqwriteBlock(const char *data, TQT_TQIO_ULONG maxlen,
- const KSocketAddress&)
+TQT_TQIO_LONG TDEBufferedSocket::tqwriteBlock(const char *data, TQT_TQIO_ULONG maxlen,
+ const TDESocketAddress&)
{
// ignore the third parameter
return tqwriteBlock(data, maxlen);
}
-void KBufferedSocket::enableRead(bool enable)
+void TDEBufferedSocket::enableRead(bool enable)
{
KStreamSocket::enableRead(enable);
if (!enable && d->input)
@@ -216,7 +216,7 @@ void KBufferedSocket::enableRead(bool enable)
TQTimer::singleShot(0, this, TQT_SLOT(slotReadActivity()));
}
-void KBufferedSocket::enableWrite(bool enable)
+void TDEBufferedSocket::enableWrite(bool enable)
{
KStreamSocket::enableWrite(enable);
if (!enable && d->output && !d->output->isEmpty())
@@ -228,7 +228,7 @@ void KBufferedSocket::enableWrite(bool enable)
}
}
-void KBufferedSocket::stateChanging(SocketState newState)
+void TDEBufferedSocket::stateChanging(SocketState newState)
{
if (newState == Connecting || newState == Connected)
{
@@ -246,7 +246,7 @@ void KBufferedSocket::stateChanging(SocketState newState)
KStreamSocket::stateChanging(newState);
}
-void KBufferedSocket::setInputBuffering(bool enable)
+void TDEBufferedSocket::setInputBuffering(bool enable)
{
TQMutexLocker locker(mutex());
if (!enable)
@@ -256,16 +256,16 @@ void KBufferedSocket::setInputBuffering(bool enable)
}
else if (d->input == 0L)
{
- d->input = new KSocketBuffer;
+ d->input = new TDESocketBuffer;
}
}
-KIOBufferBase* KBufferedSocket::inputBuffer()
+TDEIOBufferBase* TDEBufferedSocket::inputBuffer()
{
return d->input;
}
-void KBufferedSocket::setOutputBuffering(bool enable)
+void TDEBufferedSocket::setOutputBuffering(bool enable)
{
TQMutexLocker locker(mutex());
if (!enable)
@@ -275,20 +275,20 @@ void KBufferedSocket::setOutputBuffering(bool enable)
}
else if (d->output == 0L)
{
- d->output = new KSocketBuffer;
+ d->output = new TDESocketBuffer;
}
}
-KIOBufferBase* KBufferedSocket::outputBuffer()
+TDEIOBufferBase* TDEBufferedSocket::outputBuffer()
{
return d->output;
}
#ifdef USE_QT3
-TQ_ULONG KBufferedSocket::bytesToWrite() const
+TQ_ULONG TDEBufferedSocket::bytesToWrite() const
#endif
#ifdef USE_QT4
-qint64 KBufferedSocket::bytesToWrite() const
+qint64 TDEBufferedSocket::bytesToWrite() const
#endif
{
if (!d->output)
@@ -297,14 +297,14 @@ qint64 KBufferedSocket::bytesToWrite() const
return d->output->length();
}
-void KBufferedSocket::closeNow()
+void TDEBufferedSocket::closeNow()
{
KStreamSocket::close();
if (d->output)
d->output->clear();
}
-bool KBufferedSocket::canReadLine() const
+bool TDEBufferedSocket::canReadLine() const
{
if (!d->input)
return false;
@@ -312,12 +312,12 @@ bool KBufferedSocket::canReadLine() const
return d->input->canReadLine();
}
-TQCString KBufferedSocket::readLine()
+TQCString TDEBufferedSocket::readLine()
{
return d->input->readLine();
}
-void KBufferedSocket::waitForConnect()
+void TDEBufferedSocket::waitForConnect()
{
if (state() != Connecting)
return; // nothing to be waited on
@@ -327,7 +327,7 @@ void KBufferedSocket::waitForConnect()
KStreamSocket::setSocketOptions(socketOptions() & ~Blocking);
}
-void KBufferedSocket::slotReadActivity()
+void TDEBufferedSocket::slotReadActivity()
{
if (d->input && state() == Connected)
{
@@ -374,7 +374,7 @@ void KBufferedSocket::slotReadActivity()
}
}
-void KBufferedSocket::slotWriteActivity()
+void TDEBufferedSocket::slotWriteActivity()
{
if (d->output && !d->output->isEmpty() &&
(state() == Connected || state() == Closing))
diff --git a/tdecore/network/kbufferedsocket.h b/tdecore/network/kbufferedsocket.h
index 93bee08f3..60ad3e81d 100644
--- a/tdecore/network/kbufferedsocket.h
+++ b/tdecore/network/kbufferedsocket.h
@@ -31,12 +31,12 @@
#include "kstreamsocket.h"
#include <tdelibs_export.h>
-class KIOBufferBase;
+class TDEIOBufferBase;
namespace KNetwork {
-class KBufferedSocketPrivate;
-/** @class KBufferedSocket kbufferedsocket.h kbufferedsocket.h
+class TDEBufferedSocketPrivate;
+/** @class TDEBufferedSocket kbufferedsocket.h kbufferedsocket.h
* @brief Buffered stream sockets.
*
* This class allows the user to create and operate buffered stream sockets
@@ -52,10 +52,10 @@ class KBufferedSocketPrivate;
* imposed by Qt's TQSocketNotifier. If you want to use a socket
* in an auxiliary thread, please use KStreamSocket.
*
- * @see KNetwork::KStreamSocket, KNetwork::KServerSocket
+ * @see KNetwork::KStreamSocket, KNetwork::TDEServerSocket
* @author Thiago Macieira <thiago@kde.org>
*/
-class TDECORE_EXPORT KBufferedSocket: public KStreamSocket
+class TDECORE_EXPORT TDEBufferedSocket: public KStreamSocket
{
Q_OBJECT
@@ -68,18 +68,18 @@ public:
* @param parent the parent object for this object
* @param name the internal name for this object
*/
- KBufferedSocket(const TQString& node = TQString::null, const TQString& service = TQString::null,
+ TDEBufferedSocket(const TQString& node = TQString::null, const TQString& service = TQString::null,
TQObject* parent = 0L, const char *name = 0L);
/**
* Destructor.
*/
- virtual ~KBufferedSocket();
+ virtual ~TDEBufferedSocket();
/**
* Be sure to catch new devices.
*/
- virtual void setSocketDevice(KSocketDevice* device);
+ virtual void setSocketDevice(TDESocketDevice* device);
protected:
/**
@@ -122,7 +122,7 @@ public:
*
* The @p from parameter is always set to @ref peerAddress()
*/
- virtual TQT_TQIO_LONG tqreadBlock(char *data, TQT_TQIO_ULONG maxlen, KSocketAddress& from);
+ virtual TQT_TQIO_LONG tqreadBlock(char *data, TQT_TQIO_ULONG maxlen, TDESocketAddress& from);
/**
* Peeks data from the socket.
@@ -135,7 +135,7 @@ public:
*
* The @p from parameter is always set to @ref peerAddress()
*/
- virtual TQ_LONG peekBlock(char *data, TQ_ULONG maxlen, KSocketAddress &from);
+ virtual TQ_LONG peekBlock(char *data, TQ_ULONG maxlen, TDESocketAddress &from);
/**
* Writes data to the socket.
@@ -148,7 +148,7 @@ public:
*
* The @p to parameter is discarded.
*/
- virtual TQT_TQIO_LONG tqwriteBlock(const char *data, TQT_TQIO_ULONG len, const KSocketAddress& to);
+ virtual TQT_TQIO_LONG tqwriteBlock(const char *data, TQT_TQIO_ULONG len, const TDESocketAddress& to);
/**
* Catch changes.
@@ -168,7 +168,7 @@ public:
/**
* Retrieves the input buffer object.
*/
- KIOBufferBase* inputBuffer();
+ TDEIOBufferBase* inputBuffer();
/**
* Sets the use of output buffering.
@@ -178,7 +178,7 @@ public:
/**
* Retrieves the output buffer object.
*/
- KIOBufferBase* outputBuffer();
+ TDEIOBufferBase* outputBuffer();
/**
* Returns the length of the output buffer.
@@ -240,10 +240,10 @@ signals:
void bytesWritten(int bytes);
private:
- KBufferedSocket(const KBufferedSocket&);
- KBufferedSocket& operator=(const KBufferedSocket&);
+ TDEBufferedSocket(const TDEBufferedSocket&);
+ TDEBufferedSocket& operator=(const TDEBufferedSocket&);
- KBufferedSocketPrivate *d;
+ TDEBufferedSocketPrivate *d;
public:
// KDE4: remove this function
@@ -253,7 +253,7 @@ public:
*
* This function is provided to ease porting from KExtendedSocket,
* which required a call to reset() in order to be able to connect again
- * using the same device. This is not necessary in KBufferedSocket any more.
+ * using the same device. This is not necessary in TDEBufferedSocket any more.
*/
#ifdef USE_QT3
inline void reset()
diff --git a/tdecore/network/kclientsocketbase.cpp b/tdecore/network/kclientsocketbase.cpp
index 780a5ec71..eb8e4883b 100644
--- a/tdecore/network/kclientsocketbase.cpp
+++ b/tdecore/network/kclientsocketbase.cpp
@@ -83,7 +83,7 @@ void KClientSocketBase::setState(SocketState state)
bool KClientSocketBase::setSocketOptions(int opts)
{
TQMutexLocker locker(mutex());
- KSocketBase::setSocketOptions(opts); // call parent
+ TDESocketBase::setSocketOptions(opts); // call parent
// don't create the device unnecessarily
if (hasDevice())
@@ -323,7 +323,7 @@ TQT_TQIO_LONG KClientSocketBase::tqreadBlock(char *data, TQT_TQIO_ULONG maxlen)
return retval;
}
-TQT_TQIO_LONG KClientSocketBase::tqreadBlock(char *data, TQT_TQIO_ULONG maxlen, KSocketAddress& from)
+TQT_TQIO_LONG KClientSocketBase::tqreadBlock(char *data, TQT_TQIO_ULONG maxlen, TDESocketAddress& from)
{
resetError();
TQ_LONG retval = socketDevice()->tqreadBlock(data, maxlen, from);
@@ -347,7 +347,7 @@ TQ_LONG KClientSocketBase::peekBlock(char *data, TQ_ULONG maxlen)
return retval;
}
-TQ_LONG KClientSocketBase::peekBlock(char *data, TQ_ULONG maxlen, KSocketAddress& from)
+TQ_LONG KClientSocketBase::peekBlock(char *data, TQ_ULONG maxlen, TDESocketAddress& from)
{
resetError();
TQ_LONG retval = socketDevice()->peekBlock(data, maxlen, from);
@@ -371,7 +371,7 @@ TQT_TQIO_LONG KClientSocketBase::tqwriteBlock(const char *data, TQT_TQIO_ULONG l
return retval;
}
-TQT_TQIO_LONG KClientSocketBase::tqwriteBlock(const char *data, TQT_TQIO_ULONG len, const KSocketAddress& to)
+TQT_TQIO_LONG KClientSocketBase::tqwriteBlock(const char *data, TQT_TQIO_ULONG len, const TDESocketAddress& to)
{
resetError();
TQ_LONG retval = socketDevice()->tqwriteBlock(data, len, to);
@@ -383,12 +383,12 @@ TQT_TQIO_LONG KClientSocketBase::tqwriteBlock(const char *data, TQT_TQIO_ULONG l
return retval;
}
-KSocketAddress KClientSocketBase::localAddress() const
+TDESocketAddress KClientSocketBase::localAddress() const
{
return socketDevice()->localAddress();
}
-KSocketAddress KClientSocketBase::peerAddress() const
+TDESocketAddress KClientSocketBase::peerAddress() const
{
return socketDevice()->peerAddress();
}
diff --git a/tdecore/network/kclientsocketbase.h b/tdecore/network/kclientsocketbase.h
index 59da43511..27da219a9 100644
--- a/tdecore/network/kclientsocketbase.h
+++ b/tdecore/network/kclientsocketbase.h
@@ -46,7 +46,7 @@ class KClientSocketBasePrivate;
* such as, and especially, name resolution and signals.
*
* @note This class is abstract. If you're looking for a normal,
- * client socket class, see @ref KStreamSocket and KBufferedSocket
+ * client socket class, see @ref KStreamSocket and TDEBufferedSocket
*
* @author Thiago Macieira <thiago.macieira@kdemail.net>
*/
@@ -115,7 +115,7 @@ public:
protected:
/**
- * Sets the socket options. Reimplemented from KSocketBase.
+ * Sets the socket options. Reimplemented from TDESocketBase.
*/
virtual bool setSocketOptions(int opts);
@@ -160,7 +160,7 @@ public:
*
* This is useful, for instance, when IP addresses are in
* their string representation (such as "1.2.3.4") or come
- * from other sources like @ref KSocketAddress.
+ * from other sources like @ref TDESocketAddress.
*
* @param enable whether to enable
*/
@@ -186,7 +186,7 @@ public:
* emitted (only once, even if we're doing a double lookup).
* If the lookup failed (for any of the two lookups) the
* @ref gotError signal will be emitted with the appropriate
- * error condition (see @ref KSocketBase::SocketError).
+ * error condition (see @ref TDESocketBase::SocketError).
*
* This function returns true on success and false on error. Note that
* this is not the lookup result!
@@ -216,7 +216,7 @@ public:
const TQString& service = TQString::null) = 0;
/**
- * Reimplemented from KSocketBase. Connect this socket to this
+ * Reimplemented from TDESocketBase. Connect this socket to this
* specific address.
*
* Unlike @ref bind(const TQString&, const TQString&) above, this function
@@ -258,7 +258,7 @@ public:
/**
* @overload
- * Reimplemented from KSocketBase.
+ * Reimplemented from TDESocketBase.
*/
virtual bool connect(const KResolverEntry& address);
@@ -300,7 +300,7 @@ public:
/**
* Returns the number of bytes available on this socket.
- * Reimplemented from KSocketBase.
+ * Reimplemented from TDESocketBase.
*/
#ifdef USE_QT3
virtual TQ_LONG bytesAvailable() const;
@@ -310,52 +310,52 @@ public:
#endif
/**
- * Waits for more data. Reimplemented from KSocketBase.
+ * Waits for more data. Reimplemented from TDESocketBase.
*/
virtual TQ_LONG waitForMore(int msecs, bool *timeout = 0L);
/**
- * Reads data from a socket. Reimplemented from KSocketBase.
+ * Reads data from a socket. Reimplemented from TDESocketBase.
*/
virtual TQT_TQIO_LONG tqreadBlock(char *data, TQT_TQIO_ULONG maxlen);
/**
* @overload
- * Reads data from a socket. Reimplemented from KSocketBase.
+ * Reads data from a socket. Reimplemented from TDESocketBase.
*/
- virtual TQT_TQIO_LONG tqreadBlock(char *data, TQT_TQIO_ULONG maxlen, KSocketAddress& from);
+ virtual TQT_TQIO_LONG tqreadBlock(char *data, TQT_TQIO_ULONG maxlen, TDESocketAddress& from);
/**
- * Peeks data from the socket. Reimplemented from KSocketBase.
+ * Peeks data from the socket. Reimplemented from TDESocketBase.
*/
virtual TQ_LONG peekBlock(char *data, TQ_ULONG maxlen);
/**
* @overload
- * Peeks data from the socket. Reimplemented from KSocketBase.
+ * Peeks data from the socket. Reimplemented from TDESocketBase.
*/
- virtual TQ_LONG peekBlock(char *data, TQ_ULONG maxlen, KSocketAddress &from);
+ virtual TQ_LONG peekBlock(char *data, TQ_ULONG maxlen, TDESocketAddress &from);
/**
- * Writes data to the socket. Reimplemented from KSocketBase.
+ * Writes data to the socket. Reimplemented from TDESocketBase.
*/
virtual TQT_TQIO_LONG tqwriteBlock(const char *data, TQT_TQIO_ULONG len);
/**
* @overload
- * Writes data to the socket. Reimplemented from KSocketBase.
+ * Writes data to the socket. Reimplemented from TDESocketBase.
*/
- virtual TQT_TQIO_LONG tqwriteBlock(const char *data, TQT_TQIO_ULONG len, const KSocketAddress& to);
+ virtual TQT_TQIO_LONG tqwriteBlock(const char *data, TQT_TQIO_ULONG len, const TDESocketAddress& to);
/**
- * Returns the local socket address. Reimplemented from KSocketBase.
+ * Returns the local socket address. Reimplemented from TDESocketBase.
*/
- virtual KSocketAddress localAddress() const;
+ virtual TDESocketAddress localAddress() const;
/**
- * Returns the peer socket address. Reimplemented from KSocketBase.
+ * Returns the peer socket address. Reimplemented from TDESocketBase.
*/
- virtual KSocketAddress peerAddress() const;
+ virtual TDESocketAddress peerAddress() const;
/**
* Returns true if the readyRead signal is set to be emitted.
diff --git a/tdecore/network/kdatagramsocket.cpp b/tdecore/network/kdatagramsocket.cpp
index c5a1562a4..ac8e526ee 100644
--- a/tdecore/network/kdatagramsocket.cpp
+++ b/tdecore/network/kdatagramsocket.cpp
@@ -153,7 +153,7 @@ KDatagramPacket KDatagramSocket::receive()
}
TQByteArray data(size);
- KSocketAddress address;
+ TDESocketAddress address;
// now do the reading
size = tqreadBlock(data.data(), size, address);
@@ -170,7 +170,7 @@ TQ_LONG KDatagramSocket::send(const KDatagramPacket& packet)
return tqwriteBlock(packet.data(), packet.size(), packet.address());
}
-TQ_LONG KDatagramSocket::tqwriteBlock(const char *data, TQ_ULONG len, const KSocketAddress& to)
+TQ_LONG KDatagramSocket::tqwriteBlock(const char *data, TQ_ULONG len, const TDESocketAddress& to)
{
if (to.family() != AF_UNSPEC)
{
diff --git a/tdecore/network/kdatagramsocket.h b/tdecore/network/kdatagramsocket.h
index c51fea1ef..fd12a0d97 100644
--- a/tdecore/network/kdatagramsocket.h
+++ b/tdecore/network/kdatagramsocket.h
@@ -51,7 +51,7 @@ class KResolverEntry;
class TDECORE_EXPORT KDatagramPacket
{
TQByteArray m_data;
- KSocketAddress m_address;
+ TDESocketAddress m_address;
public:
/**
@@ -78,14 +78,14 @@ public:
/**
* Constructs the datagram with the specified content and address.
*/
- KDatagramPacket(const TQByteArray& content, const KSocketAddress& addr)
+ KDatagramPacket(const TQByteArray& content, const TDESocketAddress& addr)
: m_data(content), m_address(addr)
{ }
/**
* Constructs the datagram with the specified content and address.
*/
- KDatagramPacket(const char *content, uint length, const KSocketAddress& addr)
+ KDatagramPacket(const char *content, uint length, const TDESocketAddress& addr)
: m_address(addr)
{ setData(content, length); }
@@ -134,13 +134,13 @@ public:
/**
* Returns the socket address
*/
- const KSocketAddress& address() const
+ const TDESocketAddress& address() const
{ return m_address; }
/**
* Sets the address stored to the given value.
*/
- void setAddress(const KSocketAddress& addr)
+ void setAddress(const TDESocketAddress& addr)
{ m_address = addr; }
/**
@@ -241,7 +241,7 @@ public:
/**
* Writes data to the socket. Reimplemented from KClientSocketBase.
*/
- virtual TQ_LONG tqwriteBlock(const char *data, TQ_ULONG len, const KSocketAddress& to);
+ virtual TQ_LONG tqwriteBlock(const char *data, TQ_ULONG len, const TDESocketAddress& to);
/**
* Receives one datagram from the stream. The reading process is guaranteed
diff --git a/tdecore/network/khttpproxysocketdevice.cpp b/tdecore/network/khttpproxysocketdevice.cpp
index 42d65326b..e4529f28a 100644
--- a/tdecore/network/khttpproxysocketdevice.cpp
+++ b/tdecore/network/khttpproxysocketdevice.cpp
@@ -45,15 +45,15 @@ public:
KResolverEntry proxy;
TQCString request;
TQCString reply;
- KSocketAddress peer;
+ TDESocketAddress peer;
KHttpProxySocketDevicePrivate()
: proxy(KHttpProxySocketDevice::defaultProxy)
{ }
};
-KHttpProxySocketDevice::KHttpProxySocketDevice(const KSocketBase* parent)
- : KSocketDevice(parent), d(new KHttpProxySocketDevicePrivate)
+KHttpProxySocketDevice::KHttpProxySocketDevice(const TDESocketBase* parent)
+ : TDESocketDevice(parent), d(new KHttpProxySocketDevicePrivate)
{
}
@@ -66,7 +66,7 @@ KHttpProxySocketDevice::KHttpProxySocketDevice(const KResolverEntry& proxy)
KHttpProxySocketDevice::~KHttpProxySocketDevice()
{
// nothing special to be done during closing
- // KSocketDevice::~KSocketDevice closes the socket
+ // TDESocketDevice::~TDESocketDevice closes the socket
delete d;
}
@@ -90,27 +90,27 @@ void KHttpProxySocketDevice::setProxyServer(const KResolverEntry& proxy)
void KHttpProxySocketDevice::close()
{
d->reply = d->request = TQCString();
- d->peer = KSocketAddress();
- KSocketDevice::close();
+ d->peer = TDESocketAddress();
+ TDESocketDevice::close();
}
-KSocketAddress KHttpProxySocketDevice::peerAddress() const
+TDESocketAddress KHttpProxySocketDevice::peerAddress() const
{
if (isOpen())
return d->peer;
- return KSocketAddress();
+ return TDESocketAddress();
}
-KSocketAddress KHttpProxySocketDevice::externalAddress() const
+TDESocketAddress KHttpProxySocketDevice::externalAddress() const
{
- return KSocketAddress();
+ return TDESocketAddress();
}
bool KHttpProxySocketDevice::connect(const KResolverEntry& address)
{
if (d->proxy.family() == AF_UNSPEC)
// no proxy server set !
- return KSocketDevice::connect(address);
+ return TDESocketDevice::connect(address);
if (isOpen())
{
@@ -148,7 +148,7 @@ bool KHttpProxySocketDevice::connect(const TQString& node, const TQString& servi
if (m_sockfd == -1)
{
// must create the socket
- if (!KSocketDevice::connect(d->proxy))
+ if (!TDESocketDevice::connect(d->proxy))
return false; // also unable to contact proxy server
setState(0); // unset open flag
@@ -170,7 +170,7 @@ bool KHttpProxySocketDevice::connect(const TQString& node, const TQString& servi
bool KHttpProxySocketDevice::parseServerReply()
{
// make sure we're connected
- if (!KSocketDevice::connect(d->proxy))
+ if (!TDESocketDevice::connect(d->proxy))
if (error() == InProgress)
return true;
else if (error() != NoError)
diff --git a/tdecore/network/khttpproxysocketdevice.h b/tdecore/network/khttpproxysocketdevice.h
index 903d7aa6f..dc5faef93 100644
--- a/tdecore/network/khttpproxysocketdevice.h
+++ b/tdecore/network/khttpproxysocketdevice.h
@@ -35,18 +35,18 @@ class KHttpProxySocketDevicePrivate;
* @class KHttpProxySocketDevice khttpproxysocketdevice.h khttproxysocketdevice.h
* @brief The low-level backend for HTTP proxying.
*
- * This class derives from @ref KSocketDevice and implements the necessary
+ * This class derives from @ref TDESocketDevice and implements the necessary
* calls to make a connection through an HTTP proxy.
*
* @author Thiago Macieira <thiago.macieira@kdemail.net>
*/
-class TDECORE_EXPORT KHttpProxySocketDevice: public KSocketDevice
+class TDECORE_EXPORT KHttpProxySocketDevice: public TDESocketDevice
{
public:
/**
* Constructor.
*/
- KHttpProxySocketDevice(const KSocketBase* = 0L);
+ KHttpProxySocketDevice(const TDESocketBase* = 0L);
/**
* Constructor with proxy server's address.
@@ -92,13 +92,13 @@ public:
/**
* Return the peer address.
*/
- virtual KSocketAddress peerAddress() const;
+ virtual TDESocketAddress peerAddress() const;
/**
* Return the externally visible address. We can't tell what that address is,
* so this function always returns an empty object.
*/
- virtual KSocketAddress externalAddress() const;
+ virtual TDESocketAddress externalAddress() const;
private:
/**
diff --git a/tdecore/network/kresolver.cpp b/tdecore/network/kresolver.cpp
index a6ca8e45c..b9ac605c0 100644
--- a/tdecore/network/kresolver.cpp
+++ b/tdecore/network/kresolver.cpp
@@ -54,7 +54,7 @@
#endif
// KDE
-#include <klocale.h>
+#include <tdelocale.h>
// Us
#include "kresolver.h"
@@ -75,7 +75,7 @@ using namespace KNetwork::Internal;
class KNetwork::KResolverEntryPrivate: public TQShared
{
public:
- KSocketAddress addr;
+ TDESocketAddress addr;
int socktype;
int protocol;
TQString canonName;
@@ -93,7 +93,7 @@ KResolverEntry::KResolverEntry() :
}
// constructor with stuff
-KResolverEntry::KResolverEntry(const KSocketAddress& addr, int socktype, int protocol,
+KResolverEntry::KResolverEntry(const TDESocketAddress& addr, int socktype, int protocol,
const TQString& canonName, const TQCString& encodedName) :
d(new KResolverEntryPrivate)
{
@@ -110,7 +110,7 @@ KResolverEntry::KResolverEntry(const struct sockaddr* sa, TQ_UINT16 salen, int s
const TQCString& encodedName) :
d(new KResolverEntryPrivate)
{
- d->addr = KSocketAddress(sa, salen);
+ d->addr = TDESocketAddress(sa, salen);
d->socktype = socktype;
d->protocol = protocol;
d->canonName = canonName;
@@ -135,9 +135,9 @@ KResolverEntry::~KResolverEntry()
}
// returns the socket address
-KSocketAddress KResolverEntry::address() const
+TDESocketAddress KResolverEntry::address() const
{
- return d ? d->addr : KSocketAddress();
+ return d ? d->addr : TDESocketAddress();
}
// returns the length
diff --git a/tdecore/network/kresolver.h b/tdecore/network/kresolver.h
index 5e20e174a..3de19acd3 100644
--- a/tdecore/network/kresolver.h
+++ b/tdecore/network/kresolver.h
@@ -73,10 +73,10 @@ public:
KResolverEntry();
/**
- * Constructs a new KResolverEntry from a KSocketAddress
+ * Constructs a new KResolverEntry from a TDESocketAddress
* and other data.
*
- * The KSocketAddress @p addr parameter will be deep-copied.
+ * The TDESocketAddress @p addr parameter will be deep-copied.
*
* @param addr the address that was resolved
* @param socktype the socket type of the resolved address
@@ -84,7 +84,7 @@ public:
* @param canonName the canonical name of the resolved hostname
* @param encodedName the ASCII-compatible encoding of the hostname
*/
- KResolverEntry(const KSocketAddress& addr, int socktype, int protocol,
+ KResolverEntry(const TDESocketAddress& addr, int socktype, int protocol,
const TQString& canonName = TQString::null,
const TQCString& encodedName = TQCString());
@@ -92,7 +92,7 @@ public:
* Constructs a new KResolverEntry from raw forms of
* socket addresses and other data.
*
- * This constructor instead creates an internal KSocketAddress object.
+ * This constructor instead creates an internal TDESocketAddress object.
*
* @param sa the sockaddr structure containing the raw address
* @param salen the length of the sockaddr structure
@@ -123,7 +123,7 @@ public:
/**
* Retrieves the socket address associated with this entry.
*/
- KSocketAddress address() const;
+ TDESocketAddress address() const;
/**
* Retrieves the length of the socket address structure.
diff --git a/tdecore/network/kresolverstandardworkers.cpp b/tdecore/network/kresolverstandardworkers.cpp
index 77c085e08..96519d1aa 100644
--- a/tdecore/network/kresolverstandardworkers.cpp
+++ b/tdecore/network/kresolverstandardworkers.cpp
@@ -44,9 +44,9 @@
#include <tqfile.h>
#include "kdebug.h"
-#include "kglobal.h"
+#include "tdeglobal.h"
#include "kstandarddirs.h"
-#include "kapplication.h"
+#include "tdeapplication.h"
#include "kresolver.h"
#include "tdesocketaddress.h"
@@ -84,7 +84,7 @@ void KBlacklistWorker::init()
// HACK!
// FIXME KDE4: How do I detect there is an instance, without triggering
// its creation or an assertion fault?
- if (!KGlobal::_instance)
+ if (!TDEGlobal::_instance)
return;
static bool beenhere = false;
@@ -99,7 +99,7 @@ void KBlacklistWorker::init()
void KBlacklistWorker::loadBlacklist()
{
TQMutexLocker locker(&blacklistMutex);
- TQStringList filelist = KGlobal::dirs()->findAllResources("config", "ipv6blacklist");
+ TQStringList filelist = TDEGlobal::dirs()->findAllResources("config", "ipv6blacklist");
TQStringList::ConstIterator it = filelist.constBegin(),
end = filelist.constEnd();
@@ -317,7 +317,7 @@ namespace
{
if (herrno)
{
- tqDebug("KStandardWorker::processResults: got error %d", herrno);
+ tqDebug("TDEStandardWorker::processResults: got error %d", herrno);
switch (herrno)
{
case HOST_NOT_FOUND:
@@ -368,9 +368,9 @@ namespace
{
sa.setHost(KIpAddress(he->h_addr_list[i], he->h_addrtype == AF_INET ? 4 : 6));
results.prepend(KResolverEntry(sa, socktype, proto, canon, m_hostname));
- // tqDebug("KStandardWorker::processResults: adding %s", sa.toString().latin1());
+ // tqDebug("TDEStandardWorker::processResults: adding %s", sa.toString().latin1());
}
- // tqDebug("KStandardWorker::processResults: added %d entries", i);
+ // tqDebug("TDEStandardWorker::processResults: added %d entries", i);
}
#else // HAVE_GETADDRINFO
@@ -540,7 +540,7 @@ namespace
#endif // HAVE_GETADDRINFO
} // namespace
-bool KStandardWorker::sanityCheck()
+bool TDEStandardWorker::sanityCheck()
{
// check that the requested values are sensible
@@ -580,7 +580,7 @@ bool KStandardWorker::sanityCheck()
return true; // it's sane
}
-bool KStandardWorker::resolveScopeId()
+bool TDEStandardWorker::resolveScopeId()
{
// we must test the original name, not the encoded one
scopeid = 0;
@@ -606,7 +606,7 @@ bool KStandardWorker::resolveScopeId()
return true;
}
-bool KStandardWorker::resolveService()
+bool TDEStandardWorker::resolveService()
{
// find the service first
bool ok;
@@ -656,7 +656,7 @@ bool KStandardWorker::resolveService()
return true;
}
-KResolver::ErrorCodes KStandardWorker::addUnix()
+KResolver::ErrorCodes TDEStandardWorker::addUnix()
{
// before trying to add, see if the user wants Unix sockets
if ((familyMask() & KResolver::UnixFamily) == 0)
@@ -691,7 +691,7 @@ KResolver::ErrorCodes KStandardWorker::addUnix()
return KResolver::NoError;
}
-bool KStandardWorker::resolveNumerically()
+bool TDEStandardWorker::resolveNumerically()
{
// if the NoResolve flag is active, our result from this point forward
// will always be true, even if the resolution failed.
@@ -793,7 +793,7 @@ bool KStandardWorker::resolveNumerically()
return ok || (flags() & KResolver::NoResolve);
}
-bool KStandardWorker::preprocess()
+bool TDEStandardWorker::preprocess()
{
// check sanity
if (!sanityCheck())
@@ -841,7 +841,7 @@ bool KStandardWorker::preprocess()
return true; // it's ok
}
-bool KStandardWorker::run()
+bool TDEStandardWorker::run()
{
#ifndef HAVE_GETADDRINFO
// check the scope id first
@@ -900,7 +900,7 @@ bool KStandardWorker::run()
return true;
}
-bool KStandardWorker::postprocess()
+bool TDEStandardWorker::postprocess()
{
if (results.count())
return true; // no need
@@ -1020,7 +1020,7 @@ bool KGetAddrinfoWorker::wantThis(int family)
void KNetwork::Internal::initStandardWorkers()
{
//KResolverWorkerFactoryBase::registerNewWorker(new KResolverWorkerFactory<KBlacklistWorker>);
- KResolverWorkerFactoryBase::registerNewWorker(new KResolverWorkerFactory<KStandardWorker>);
+ KResolverWorkerFactoryBase::registerNewWorker(new KResolverWorkerFactory<TDEStandardWorker>);
#ifdef HAVE_GETADDRINFO
KResolverWorkerFactoryBase::registerNewWorker(new KResolverWorkerFactory<KGetAddrinfoWorker>);
diff --git a/tdecore/network/kresolverstandardworkers_p.h b/tdecore/network/kresolverstandardworkers_p.h
index 2db460bef..95d21bbc0 100644
--- a/tdecore/network/kresolverstandardworkers_p.h
+++ b/tdecore/network/kresolverstandardworkers_p.h
@@ -62,7 +62,7 @@ namespace KNetwork { namespace Internal
/** @internal
* Standard worker.
*/
- class KStandardWorker: public KNetwork::KResolverWorkerBase
+ class TDEStandardWorker: public KNetwork::KResolverWorkerBase
{
protected:
mutable TQCString m_encodedName;
@@ -90,7 +90,7 @@ namespace KNetwork { namespace Internal
*
* This class does not do post-processing.
*/
- class KGetAddrinfoWorker: public KStandardWorker
+ class KGetAddrinfoWorker: public TDEStandardWorker
{
public:
KGetAddrinfoWorker()
diff --git a/tdecore/network/kreverseresolver.cpp b/tdecore/network/kreverseresolver.cpp
index 20ec41b1d..fc172c2ff 100644
--- a/tdecore/network/kreverseresolver.cpp
+++ b/tdecore/network/kreverseresolver.cpp
@@ -55,7 +55,7 @@ namespace
class ReverseThread: public KResolverWorkerBase
{
public:
- ReverseThread(const KSocketAddress& addr, int flags)
+ ReverseThread(const TDESocketAddress& addr, int flags)
: m_addr(addr), m_flags(flags), m_parent(0L)
{ }
@@ -68,7 +68,7 @@ namespace
virtual bool postprocess();
// input:
- KSocketAddress m_addr;
+ TDESocketAddress m_addr;
int m_flags;
KReverseResolver *m_parent;
@@ -99,18 +99,18 @@ class KNetwork::KReverseResolverPrivate
public:
TQString node;
TQString service;
- KSocketAddress addr;
+ TDESocketAddress addr;
int flags;
ReverseThread* worker;
bool success;
- inline KReverseResolverPrivate(const KSocketAddress& _addr)
+ inline KReverseResolverPrivate(const TDESocketAddress& _addr)
: addr(_addr), worker(0L), success(false)
{ }
};
-KReverseResolver::KReverseResolver(const KSocketAddress& addr, int flags,
+KReverseResolver::KReverseResolver(const TDESocketAddress& addr, int flags,
TQObject *parent, const char* name)
: TQObject(parent, name), d(new KReverseResolverPrivate(addr))
{
@@ -148,7 +148,7 @@ TQString KReverseResolver::service() const
return d->service;
}
-const KSocketAddress& KReverseResolver::address() const
+const TDESocketAddress& KReverseResolver::address() const
{
return d->addr;
}
@@ -190,7 +190,7 @@ bool KReverseResolver::event(TQEvent *e)
return true;
}
-bool KReverseResolver::resolve(const KSocketAddress& addr, TQString& node,
+bool KReverseResolver::resolve(const TDESocketAddress& addr, TQString& node,
TQString& serv, int flags)
{
ReverseThread th(addr, flags);
@@ -206,7 +206,7 @@ bool KReverseResolver::resolve(const KSocketAddress& addr, TQString& node,
bool KReverseResolver::resolve(const struct sockaddr* sa, TQ_UINT16 salen,
TQString& node, TQString& serv, int flags)
{
- return resolve(KSocketAddress(sa, salen), node, serv, flags);
+ return resolve(TDESocketAddress(sa, salen), node, serv, flags);
}
bool ReverseThread::run()
diff --git a/tdecore/network/kreverseresolver.h b/tdecore/network/kreverseresolver.h
index 21a17b0a5..4a3fa4bdd 100644
--- a/tdecore/network/kreverseresolver.h
+++ b/tdecore/network/kreverseresolver.h
@@ -88,7 +88,7 @@ public:
* @param addr the address to resolve
* @param flags the flags to use, see @ref Flags
*/
- KReverseResolver(const KSocketAddress& addr, int flags = 0,
+ KReverseResolver(const TDESocketAddress& addr, int flags = 0,
TQObject * = 0L, const char * = 0L);
/**
@@ -128,7 +128,7 @@ public:
/**
* Returns the socket address which was subject to resolution.
*/
- const KSocketAddress& address() const;
+ const TDESocketAddress& address() const;
/**
* Starts the resolution. This function returns 'true'
@@ -165,7 +165,7 @@ public:
* @return true if the resolution succeeded, false if not
* @see ReverseFlags for the possible values for @p flags
*/
- static bool resolve(const KSocketAddress& addr, TQString& node,
+ static bool resolve(const TDESocketAddress& addr, TQString& node,
TQString& serv, int flags = 0);
/**
diff --git a/tdecore/network/kserversocket.cpp b/tdecore/network/kserversocket.cpp
index 007258f6b..16a48cdf2 100644
--- a/tdecore/network/kserversocket.cpp
+++ b/tdecore/network/kserversocket.cpp
@@ -37,7 +37,7 @@
using namespace KNetwork;
-class KNetwork::KServerSocketPrivate
+class KNetwork::TDEServerSocketPrivate
{
public:
KResolver resolver;
@@ -47,67 +47,67 @@ public:
int backlog;
int timeout;
- bool bindWhenFound : 1, listenWhenBound : 1, useKBufferedSocket : 1;
+ bool bindWhenFound : 1, listenWhenBound : 1, useTDEBufferedSocket : 1;
- KServerSocketPrivate()
+ TDEServerSocketPrivate()
: state(None), timeout(0), bindWhenFound(false), listenWhenBound(false),
- useKBufferedSocket(true)
+ useTDEBufferedSocket(true)
{
resolver.setFlags(KResolver::Passive);
resolver.setFamily(KResolver::KnownFamily);
}
};
-KServerSocket::KServerSocket(TQObject* parent, const char *name)
- : TQObject(parent, name), d(new KServerSocketPrivate)
+TDEServerSocket::TDEServerSocket(TQObject* parent, const char *name)
+ : TQObject(parent, name), d(new TDEServerSocketPrivate)
{
TQObject::connect(&d->resolver, TQT_SIGNAL(finished(KResolverResults)),
this, TQT_SLOT(lookupFinishedSlot()));
}
-KServerSocket::KServerSocket(const TQString& service, TQObject* parent, const char *name)
- : TQObject(parent, name), d(new KServerSocketPrivate)
+TDEServerSocket::TDEServerSocket(const TQString& service, TQObject* parent, const char *name)
+ : TQObject(parent, name), d(new TDEServerSocketPrivate)
{
TQObject::connect(&d->resolver, TQT_SIGNAL(finished(KResolverResults)),
this, TQT_SLOT(lookupFinishedSlot()));
d->resolver.setServiceName(service);
}
-KServerSocket::KServerSocket(const TQString& node, const TQString& service,
+TDEServerSocket::TDEServerSocket(const TQString& node, const TQString& service,
TQObject* parent, const char* name)
- : TQObject(parent, name), d(new KServerSocketPrivate)
+ : TQObject(parent, name), d(new TDEServerSocketPrivate)
{
TQObject::connect(&d->resolver, TQT_SIGNAL(finished(KResolverResults)),
this, TQT_SLOT(lookupFinishedSlot()));
setAddress(node, service);
}
-KServerSocket::~KServerSocket()
+TDEServerSocket::~TDEServerSocket()
{
close();
delete d;
}
-bool KServerSocket::setSocketOptions(int opts)
+bool TDEServerSocket::setSocketOptions(int opts)
{
TQMutexLocker locker(mutex());
- KSocketBase::setSocketOptions(opts); // call parent
+ TDESocketBase::setSocketOptions(opts); // call parent
bool result = socketDevice()->setSocketOptions(opts); // and set the implementation
copyError();
return result;
}
-KResolver& KServerSocket::resolver() const
+KResolver& TDEServerSocket::resolver() const
{
return d->resolver;
}
-const KResolverResults& KServerSocket::resolverResults() const
+const KResolverResults& TDEServerSocket::resolverResults() const
{
return d->resolverResults;
}
-void KServerSocket::setResolutionEnabled(bool enable)
+void TDEServerSocket::setResolutionEnabled(bool enable)
{
if (enable)
d->resolver.setFlags(d->resolver.flags() & ~KResolver::NoResolve);
@@ -115,41 +115,41 @@ void KServerSocket::setResolutionEnabled(bool enable)
d->resolver.setFlags(d->resolver.flags() | KResolver::NoResolve);
}
-void KServerSocket::setFamily(int families)
+void TDEServerSocket::setFamily(int families)
{
d->resolver.setFamily(families);
}
-void KServerSocket::setAddress(const TQString& service)
+void TDEServerSocket::setAddress(const TQString& service)
{
d->resolver.setNodeName(TQString::null);
d->resolver.setServiceName(service);
d->resolverResults.empty();
- if (d->state <= KServerSocketPrivate::LookupDone)
- d->state = KServerSocketPrivate::None;
+ if (d->state <= TDEServerSocketPrivate::LookupDone)
+ d->state = TDEServerSocketPrivate::None;
}
-void KServerSocket::setAddress(const TQString& node, const TQString& service)
+void TDEServerSocket::setAddress(const TQString& node, const TQString& service)
{
d->resolver.setNodeName(node);
d->resolver.setServiceName(service);
d->resolverResults.empty();
- if (d->state <= KServerSocketPrivate::LookupDone)
- d->state = KServerSocketPrivate::None;
+ if (d->state <= TDEServerSocketPrivate::LookupDone)
+ d->state = TDEServerSocketPrivate::None;
}
-void KServerSocket::setTimeout(int msec)
+void TDEServerSocket::setTimeout(int msec)
{
d->timeout = msec;
}
-bool KServerSocket::lookup()
+bool TDEServerSocket::lookup()
{
setError(NoError);
if (d->resolver.isRunning() && !blocking())
return true; // already doing lookup
- if (d->state >= KServerSocketPrivate::LookupDone)
+ if (d->state >= TDEServerSocketPrivate::LookupDone)
return true; // results are already available
// make sure we have at least one parameter for lookup
@@ -179,13 +179,13 @@ bool KServerSocket::lookup()
return true;
}
-bool KServerSocket::bind(const KResolverEntry& address)
+bool TDEServerSocket::bind(const KResolverEntry& address)
{
if (socketDevice()->bind(address))
{
setError(NoError);
- d->state = KServerSocketPrivate::Bound;
+ d->state = TDEServerSocketPrivate::Bound;
emit bound(address);
return true;
}
@@ -193,30 +193,30 @@ bool KServerSocket::bind(const KResolverEntry& address)
return false;
}
-bool KServerSocket::bind(const TQString& node, const TQString& service)
+bool TDEServerSocket::bind(const TQString& node, const TQString& service)
{
setAddress(node, service);
return bind();
}
-bool KServerSocket::bind(const TQString& service)
+bool TDEServerSocket::bind(const TQString& service)
{
setAddress(service);
return bind();
}
-bool KServerSocket::bind()
+bool TDEServerSocket::bind()
{
- if (d->state >= KServerSocketPrivate::Bound)
+ if (d->state >= TDEServerSocketPrivate::Bound)
return true;
- if (d->state < KServerSocketPrivate::LookupDone)
+ if (d->state < TDEServerSocketPrivate::LookupDone)
{
if (!blocking())
{
d->bindWhenFound = true;
bool ok = lookup(); // will call doBind
- if (d->state >= KServerSocketPrivate::Bound)
+ if (d->state >= TDEServerSocketPrivate::Bound)
d->bindWhenFound = false;
return ok;
}
@@ -229,19 +229,19 @@ bool KServerSocket::bind()
return doBind();
}
-bool KServerSocket::listen(int backlog)
+bool TDEServerSocket::listen(int backlog)
{
// WARNING
// this function has to be reentrant
// due to the mechanisms used for binding, this function might
// end up calling itself
- if (d->state == KServerSocketPrivate::Listening)
+ if (d->state == TDEServerSocketPrivate::Listening)
return true; // already listening
d->backlog = backlog;
- if (d->state < KServerSocketPrivate::Bound)
+ if (d->state < TDEServerSocketPrivate::Bound)
{
// we must bind
// note that we can end up calling ourselves here
@@ -252,7 +252,7 @@ bool KServerSocket::listen(int backlog)
return false;
}
- if (d->state < KServerSocketPrivate::Bound)
+ if (d->state < TDEServerSocketPrivate::Bound)
// asynchronous lookup in progress...
// we can't be blocking here anyways
return true;
@@ -260,29 +260,29 @@ bool KServerSocket::listen(int backlog)
d->listenWhenBound = false;
}
- if (d->state < KServerSocketPrivate::Listening)
+ if (d->state < TDEServerSocketPrivate::Listening)
return doListen();
return true;
}
-void KServerSocket::close()
+void TDEServerSocket::close()
{
socketDevice()->close();
if (d->resolver.isRunning())
d->resolver.cancel(false);
- d->state = KServerSocketPrivate::None;
+ d->state = TDEServerSocketPrivate::None;
emit closed();
}
-void KServerSocket::setAcceptBuffered(bool enable)
+void TDEServerSocket::setAcceptBuffered(bool enable)
{
- d->useKBufferedSocket = enable;
+ d->useTDEBufferedSocket = enable;
}
-KActiveSocketBase* KServerSocket::accept()
+KActiveSocketBase* TDEServerSocket::accept()
{
- if (d->state < KServerSocketPrivate::Listening)
+ if (d->state < TDEServerSocketPrivate::Listening)
{
if (!blocking())
{
@@ -310,7 +310,7 @@ KActiveSocketBase* KServerSocket::accept()
}
// we're listening here
- KSocketDevice* accepted = socketDevice()->accept();
+ TDESocketDevice* accepted = socketDevice()->accept();
if (!accepted)
{
// error happened during accept
@@ -319,8 +319,8 @@ KActiveSocketBase* KServerSocket::accept()
}
KStreamSocket* streamsocket;
- if (d->useKBufferedSocket)
- streamsocket = new KBufferedSocket();
+ if (d->useTDEBufferedSocket)
+ streamsocket = new TDEBufferedSocket();
else
streamsocket = new KStreamSocket();
streamsocket->setSocketDevice(accepted);
@@ -334,19 +334,19 @@ KActiveSocketBase* KServerSocket::accept()
return streamsocket;
}
-KSocketAddress KServerSocket::localAddress() const
+TDESocketAddress TDEServerSocket::localAddress() const
{
return socketDevice()->localAddress();
}
-KSocketAddress KServerSocket::externalAddress() const
+TDESocketAddress TDEServerSocket::externalAddress() const
{
return socketDevice()->externalAddress();
}
-void KServerSocket::lookupFinishedSlot()
+void TDEServerSocket::lookupFinishedSlot()
{
- if (d->resolver.isRunning() || d->state > KServerSocketPrivate::LookupDone)
+ if (d->resolver.isRunning() || d->state > TDEServerSocketPrivate::LookupDone)
return;
if (d->resolver.status() < 0)
@@ -354,25 +354,25 @@ void KServerSocket::lookupFinishedSlot()
setError(LookupFailure);
emit gotError(LookupFailure);
d->bindWhenFound = d->listenWhenBound = false;
- d->state = KServerSocketPrivate::None;
+ d->state = TDEServerSocketPrivate::None;
return;
}
// lookup succeeded
d->resolverResults = d->resolver.results();
- d->state = KServerSocketPrivate::LookupDone;
+ d->state = TDEServerSocketPrivate::LookupDone;
emit hostFound();
if (d->bindWhenFound)
doBind();
}
-void KServerSocket::copyError()
+void TDEServerSocket::copyError()
{
setError(socketDevice()->error());
}
-bool KServerSocket::doBind()
+bool TDEServerSocket::doBind()
{
d->bindWhenFound = false;
// loop through the results and bind to the first that works
@@ -393,7 +393,7 @@ bool KServerSocket::doBind()
return false;
}
-bool KServerSocket::doListen()
+bool TDEServerSocket::doListen()
{
if (!socketDevice()->listen(d->backlog))
{
@@ -405,7 +405,7 @@ bool KServerSocket::doListen()
// set up ready accept signal
TQObject::connect(socketDevice()->readNotifier(), TQT_SIGNAL(activated(int)),
this, TQT_SIGNAL(readyAccept()));
- d->state = KServerSocketPrivate::Listening;
+ d->state = TDEServerSocketPrivate::Listening;
return true;
}
diff --git a/tdecore/network/kserversocket.h b/tdecore/network/kserversocket.h
index 4f1af33b9..edb86d0b2 100644
--- a/tdecore/network/kserversocket.h
+++ b/tdecore/network/kserversocket.h
@@ -30,14 +30,14 @@
namespace KNetwork {
-class KSocketDevice;
+class TDESocketDevice;
class KStreamSocket;
class KResolver;
class KResolverResults;
-class KServerSocketPrivate;
+class TDEServerSocketPrivate;
/**
- * @class KServerSocket kserversocket.h kserversocket.h
+ * @class TDEServerSocket kserversocket.h kserversocket.h
* @brief A server socket for accepting connections.
*
* This class provides functionality for creating a socket to
@@ -49,7 +49,7 @@ class KServerSocketPrivate;
* A typical example would look like:
* \code
* TQString service = "http";
- * KServerSocket *ss = new KServerSocket(service);
+ * TDEServerSocket *ss = new TDEServerSocket(service);
* connect(ss, TQT_SIGNAL(readyAccept()), this, TQT_SLOT(slotReadyAccept()));
* connect(ss, TQT_SIGNAL(gotError(int)), this, TQT_SLOT(slotSocketError(int)));
* ss->listen();
@@ -70,14 +70,14 @@ class KServerSocketPrivate;
*
* For another example of usage, this below code attempts to make a connection on any port within a range:
* \code
- * KServerSocket *ss = new KServerSocket();
+ * TDEServerSocket *ss = new TDEServerSocket();
* ss->setFamily(KResolver::InetFamily);
* bool found = false;
* for( unsigned int port = firstport; port <= lastport; ++port) {
* ss->setAddress( TQString::number( port ) );
* bool success = ss->listen();
* if( found = ( success && ss->error() ==
- * KSocketBase::NoError ) )
+ * TDESocketBase::NoError ) )
* break;
* ss->close();
* }
@@ -95,16 +95,16 @@ class KServerSocketPrivate;
*
* It is important to note that @ref accept can return either an
* object of type KNetwork::KStreamSocket or
- * KNetwork::KBufferedSocket (default). If you want to accept a
+ * KNetwork::TDEBufferedSocket (default). If you want to accept a
* non-buffered socket, you must first call setAcceptBuffered.
*
- * @warning If you use KServerSocket in an auxiliary (non-GUI) thread,
+ * @warning If you use TDEServerSocket in an auxiliary (non-GUI) thread,
* you need to accept only KNetwork::KStreamSocket objects.
*
- * @see KNetwork::KStreamSocket, KNetwork::KBufferedSocket
+ * @see KNetwork::KStreamSocket, KNetwork::TDEBufferedSocket
* @author Thiago Macieira <thiago@kde.org>
*/
-class TDECORE_EXPORT KServerSocket: public TQObject, public KPassiveSocketBase
+class TDECORE_EXPORT TDEServerSocket: public TQObject, public KPassiveSocketBase
{
Q_OBJECT
@@ -119,7 +119,7 @@ public:
* @param parent the parent TQObject object
* @param name the name of this object
*/
- KServerSocket(TQObject* parent = 0L, const char *name = 0L);
+ TDEServerSocket(TQObject* parent = 0L, const char *name = 0L);
/**
* Construct this object specifying the service to listen on.
@@ -138,7 +138,7 @@ public:
* @param parent the parent TQObject object
* @param name the name of this object
*/
- KServerSocket(const TQString& service, TQObject* parent = 0L, const char *name = 0L);
+ TDEServerSocket(const TQString& service, TQObject* parent = 0L, const char *name = 0L);
/**
* Construct this object specifying the node and service names to listen on.
@@ -158,7 +158,7 @@ public:
* @param parent the parent TQObject object
* @param name the name of this object
*/
- KServerSocket(const TQString& node, const TQString& service,
+ TDEServerSocket(const TQString& node, const TQString& service,
TQObject* parent = 0L, const char *name = 0L);
/**
@@ -167,11 +167,11 @@ public:
* Note, however, that accepted sockets do not get closed when this
* object closes.
*/
- ~KServerSocket();
+ ~TDEServerSocket();
protected:
/**
- * Sets the socket options. Reimplemented from KSocketBase.
+ * Sets the socket options. Reimplemented from TDESocketBase.
*/
virtual bool setSocketOptions(int opts);
@@ -201,7 +201,7 @@ public:
*
* This is useful, for instance, when IP addresses are in
* their string representation (such as "1.2.3.4") or come
- * from other sources like @ref KSocketAddress.
+ * from other sources like @ref TDESocketAddress.
*
* @param enable whether to enable
*/
@@ -268,7 +268,7 @@ public:
* emitted (only once, even if we're doing a double lookup).
* If the lookup failed (for any of the two lookups) the
* @ref gotError signal will be emitted with the appropriate
- * error condition (see @ref KSocketBase::SocketError).
+ * error condition (see @ref TDESocketBase::SocketError).
*
* This function returns true on success and false on error. Note that
* this is not the lookup result!
@@ -306,7 +306,7 @@ public:
virtual bool bind();
/**
- * Connect this socket to this specific address. Reimplemented from KSocketBase.
+ * Connect this socket to this specific address. Reimplemented from TDESocketBase.
*
* Unlike @ref bind(const TQString&, const TQString&) above, this function
* really does bind the socket. No lookup is performed. The @ref bound signal
@@ -338,7 +338,7 @@ public:
* Toggles whether the accepted socket will be buffered or not.
* That is, the @ref accept function will always return a KStreamSocket
* object or descended from it. If buffering is enabled, the class
- * to be returned will be KBufferedSocket.
+ * to be returned will be TDEBufferedSocket.
*
* By default, this flag is set to true.
*
@@ -361,7 +361,7 @@ public:
* the base class for active sockets, but it is guaranteed
* that the object will be a KStreamSocket or derived from it.
*
- * @sa KBufferedSocket
+ * @sa TDEBufferedSocket
* @sa setAcceptBuffered
*/
virtual KActiveSocketBase* accept();
@@ -369,12 +369,12 @@ public:
/**
* Returns this socket's local address.
*/
- virtual KSocketAddress localAddress() const;
+ virtual TDESocketAddress localAddress() const;
/**
* Returns this socket's externally-visible address if know.
*/
- virtual KSocketAddress externalAddress() const;
+ virtual TDESocketAddress externalAddress() const;
private slots:
void lookupFinishedSlot();
@@ -425,10 +425,10 @@ private:
bool doListen();
private:
- KServerSocket(const KServerSocket&);
- KServerSocket& operator=(const KServerSocket&);
+ TDEServerSocket(const TDEServerSocket&);
+ TDEServerSocket& operator=(const TDEServerSocket&);
- KServerSocketPrivate *d;
+ TDEServerSocketPrivate *d;
};
} // namespace KNetwork
diff --git a/tdecore/network/ksockssocketdevice.cpp b/tdecore/network/ksockssocketdevice.cpp
index a3c975d94..69c674438 100644
--- a/tdecore/network/ksockssocketdevice.cpp
+++ b/tdecore/network/ksockssocketdevice.cpp
@@ -32,7 +32,7 @@
#define kde_socklen_t ksocklen_t
#endif
-#include "kapplication.h"
+#include "tdeapplication.h"
#include "ksocks.h"
#include "tdesocketaddress.h"
@@ -43,15 +43,15 @@ using namespace KNetwork;
// constructor
// nothing to do
-KSocksSocketDevice::KSocksSocketDevice(const KSocketBase* obj)
- : KSocketDevice(obj)
+KSocksSocketDevice::KSocksSocketDevice(const TDESocketBase* obj)
+ : TDESocketDevice(obj)
{
}
// constructor with argument
// nothing to do
KSocksSocketDevice::KSocksSocketDevice(int fd)
- : KSocketDevice(fd)
+ : TDESocketDevice(fd)
{
}
@@ -67,7 +67,7 @@ int KSocksSocketDevice::capabilities() const
return 0; // can do everything!
}
-// From here on, the code is almost exactly a copy of KSocketDevice
+// From here on, the code is almost exactly a copy of TDESocketDevice
// the differences are the use of KSocks where appropriate
bool KSocksSocketDevice::bind(const KResolverEntry& address)
@@ -190,7 +190,7 @@ KSocksSocketDevice* KSocksSocketDevice::accept()
return new KSocksSocketDevice(newfd);
}
-static int socks_read_common(int sockfd, char *data, TQ_ULONG maxlen, KSocketAddress* from, ssize_t &retval, bool peek = false)
+static int socks_read_common(int sockfd, char *data, TQ_ULONG maxlen, TDESocketAddress* from, ssize_t &retval, bool peek = false)
{
kde_socklen_t len;
if (from)
@@ -204,9 +204,9 @@ static int socks_read_common(int sockfd, char *data, TQ_ULONG maxlen, KSocketAdd
if (retval == -1)
{
if (errno == EAGAIN || errno == EWOULDBLOCK)
- return KSocketDevice::WouldBlock;
+ return TDESocketDevice::WouldBlock;
else
- return KSocketDevice::UnknownError;
+ return TDESocketDevice::UnknownError;
}
if (from)
@@ -235,7 +235,7 @@ TQ_LONG KSocksSocketDevice::tqreadBlock(char *data, TQ_ULONG maxlen)
return retval;
}
-TQ_LONG KSocksSocketDevice::tqreadBlock(char *data, TQ_ULONG maxlen, KSocketAddress &from)
+TQ_LONG KSocksSocketDevice::tqreadBlock(char *data, TQ_ULONG maxlen, TDESocketAddress &from)
{
resetError();
if (m_sockfd == -1)
@@ -277,7 +277,7 @@ TQ_LONG KSocksSocketDevice::peekBlock(char *data, TQ_ULONG maxlen)
return retval;
}
-TQ_LONG KSocksSocketDevice::peekBlock(char *data, TQ_ULONG maxlen, KSocketAddress& from)
+TQ_LONG KSocksSocketDevice::peekBlock(char *data, TQ_ULONG maxlen, TDESocketAddress& from)
{
resetError();
if (m_sockfd == -1)
@@ -300,10 +300,10 @@ TQ_LONG KSocksSocketDevice::peekBlock(char *data, TQ_ULONG maxlen, KSocketAddres
TQ_LONG KSocksSocketDevice::tqwriteBlock(const char *data, TQ_ULONG len)
{
- return tqwriteBlock(data, len, KSocketAddress());
+ return tqwriteBlock(data, len, TDESocketAddress());
}
-TQ_LONG KSocksSocketDevice::tqwriteBlock(const char *data, TQ_ULONG len, const KSocketAddress& to)
+TQ_LONG KSocksSocketDevice::tqwriteBlock(const char *data, TQ_ULONG len, const TDESocketAddress& to)
{
resetError();
if (m_sockfd == -1)
@@ -325,17 +325,17 @@ TQ_LONG KSocksSocketDevice::tqwriteBlock(const char *data, TQ_ULONG len, const K
return retval;
}
-KSocketAddress KSocksSocketDevice::localAddress() const
+TDESocketAddress KSocksSocketDevice::localAddress() const
{
if (m_sockfd == -1)
- return KSocketAddress(); // not open, empty value
+ return TDESocketAddress(); // not open, empty value
kde_socklen_t len;
- KSocketAddress localAddress;
+ TDESocketAddress localAddress;
localAddress.setLength(len = 32); // arbitrary value
if (KSocks::self()->getsockname(m_sockfd, localAddress.address(), &len) == -1)
// error!
- return KSocketAddress();
+ return TDESocketAddress();
if (len <= localAddress.length())
{
@@ -349,22 +349,22 @@ KSocketAddress KSocksSocketDevice::localAddress() const
localAddress.setLength(len);
if (KSocks::self()->getsockname(m_sockfd, localAddress.address(), &len) == -1)
// error!
- return KSocketAddress();
+ return TDESocketAddress();
return localAddress;
}
-KSocketAddress KSocksSocketDevice::peerAddress() const
+TDESocketAddress KSocksSocketDevice::peerAddress() const
{
if (m_sockfd == -1)
- return KSocketAddress(); // not open, empty value
+ return TDESocketAddress(); // not open, empty value
kde_socklen_t len;
- KSocketAddress peerAddress;
+ TDESocketAddress peerAddress;
peerAddress.setLength(len = 32); // arbitrary value
if (KSocks::self()->getpeername(m_sockfd, peerAddress.address(), &len) == -1)
// error!
- return KSocketAddress();
+ return TDESocketAddress();
if (len <= peerAddress.length())
{
@@ -378,15 +378,15 @@ KSocketAddress KSocksSocketDevice::peerAddress() const
peerAddress.setLength(len);
if (KSocks::self()->getpeername(m_sockfd, peerAddress.address(), &len) == -1)
// error!
- return KSocketAddress();
+ return TDESocketAddress();
return peerAddress;
}
-KSocketAddress KSocksSocketDevice::externalAddress() const
+TDESocketAddress KSocksSocketDevice::externalAddress() const
{
// return empty, indicating unknown external address
- return KSocketAddress();
+ return TDESocketAddress();
}
bool KSocksSocketDevice::poll(bool *input, bool *output, bool *exception,
@@ -468,19 +468,19 @@ void KSocksSocketDevice::initSocks()
return;
if (kapp == 0L)
- return; // no KApplication, so don't initialise
- // this should, however, test for KInstance
+ return; // no TDEApplication, so don't initialise
+ // this should, however, test for TDEInstance
init = true;
if (KSocks::self()->hasSocks())
- delete KSocketDevice::setDefaultImpl(new KSocketDeviceFactory<KSocksSocketDevice>);
+ delete TDESocketDevice::setDefaultImpl(new TDESocketDeviceFactory<KSocksSocketDevice>);
}
#if 0
static bool register()
{
- KSocketDevice::addNewImpl(new KSocketDeviceFactory<KSocksSocketDevice>, 0);
+ TDESocketDevice::addNewImpl(new TDESocketDeviceFactory<KSocksSocketDevice>, 0);
}
static bool register = registered();
diff --git a/tdecore/network/ksockssocketdevice.h b/tdecore/network/ksockssocketdevice.h
index 5c93b6d8c..2a83c0adc 100644
--- a/tdecore/network/ksockssocketdevice.h
+++ b/tdecore/network/ksockssocketdevice.h
@@ -28,7 +28,7 @@ namespace KNetwork {
* @class KSocksSocketDevice ksockssocketdevice.h ksockssocketdevice.h
* @brief The low-level class for SOCKS proxying.
*
- * This class reimplements several functions from @ref KSocketDevice in order
+ * This class reimplements several functions from @ref TDESocketDevice in order
* to implement SOCKS support.
*
* This works by using KSocks.
@@ -37,13 +37,13 @@ namespace KNetwork {
*
* @warning This code is untested!
*/
-class TDECORE_EXPORT KSocksSocketDevice: public KSocketDevice
+class TDECORE_EXPORT KSocksSocketDevice: public TDESocketDevice
{
public:
/**
* Constructor.
*/
- KSocksSocketDevice(const KSocketBase* = 0L);
+ KSocksSocketDevice(const TDESocketBase* = 0L);
/**
* Construct from a file descriptor.
@@ -84,34 +84,34 @@ public:
* Overrides reading.
*/
virtual TQ_LONG tqreadBlock(char *data, TQ_ULONG maxlen);
- virtual TQ_LONG tqreadBlock(char *data, TQ_ULONG maxlen, KSocketAddress& from);
+ virtual TQ_LONG tqreadBlock(char *data, TQ_ULONG maxlen, TDESocketAddress& from);
/**
* Overrides peeking.
*/
virtual TQ_LONG peekBlock(char *data, TQ_ULONG maxlen);
- virtual TQ_LONG peekBlock(char *data, TQ_ULONG maxlen, KSocketAddress& from);
+ virtual TQ_LONG peekBlock(char *data, TQ_ULONG maxlen, TDESocketAddress& from);
/**
* Overrides writing.
*/
virtual TQ_LONG tqwriteBlock(const char *data, TQ_ULONG len);
- virtual TQ_LONG tqwriteBlock(const char *data, TQ_ULONG len, const KSocketAddress& to);
+ virtual TQ_LONG tqwriteBlock(const char *data, TQ_ULONG len, const TDESocketAddress& to);
/**
* Overrides getting socket address.
*/
- virtual KSocketAddress localAddress() const;
+ virtual TDESocketAddress localAddress() const;
/**
* Overrides getting peer address.
*/
- virtual KSocketAddress peerAddress() const;
+ virtual TDESocketAddress peerAddress() const;
/**
* Overrides getting external address.
*/
- virtual KSocketAddress externalAddress() const;
+ virtual TDESocketAddress externalAddress() const;
/**
* Overrides polling.
@@ -121,7 +121,7 @@ public:
private:
static void initSocks();
- friend class KSocketDevice;
+ friend class TDESocketDevice;
};
} // namespace KNetwork
diff --git a/tdecore/network/kstreamsocket.h b/tdecore/network/kstreamsocket.h
index ab90e923a..c1f9e5848 100644
--- a/tdecore/network/kstreamsocket.h
+++ b/tdecore/network/kstreamsocket.h
@@ -34,8 +34,8 @@ namespace KNetwork {
class KResolverEntry;
class KResolverResults;
-class KServerSocket;
-class KBufferedSocket;
+class TDEServerSocket;
+class TDEBufferedSocket;
class KStreamSocketPrivate;
/** @class KStreamSocket kstreamsocket.h kstreamsocket.h
@@ -50,7 +50,7 @@ class KStreamSocketPrivate;
*
* KStreamSocket objects are thread-safe and can be used in auxiliary
* threads (i.e., not the thread in which the Qt event loop runs in).
- * Note that KBufferedSocket cannot be used reliably in an auxiliary thread.
+ * Note that TDEBufferedSocket cannot be used reliably in an auxiliary thread.
*
* Sample usage:
* \code
@@ -91,7 +91,7 @@ class KStreamSocketPrivate;
* }
* \endcode
*
- * @see KNetwork::KBufferedSocket, KNetwork::KServerSocket
+ * @see KNetwork::TDEBufferedSocket, KNetwork::TDEServerSocket
* @author Thiago Macieira <thiago@kde.org>
*/
class TDECORE_EXPORT KStreamSocket: public KClientSocketBase
@@ -241,8 +241,8 @@ private:
KStreamSocketPrivate *d;
- friend class KServerSocket;
- friend class KBufferedSocket;
+ friend class TDEServerSocket;
+ friend class TDEBufferedSocket;
};
} // namespace KNetwork
diff --git a/tdecore/network/kiobuffer.h b/tdecore/network/tdeiobuffer.h
index ac1352a4d..88b1db4e7 100644
--- a/tdecore/network/kiobuffer.h
+++ b/tdecore/network/tdeiobuffer.h
@@ -32,41 +32,41 @@
class TQIODevice;
/**
- * @class KIOBufferBase kiobuffer.h kiobuffer.h
+ * @class TDEIOBufferBase tdeiobuffer.h tdeiobuffer.h
* @brief base for I/O buffer implementation
*
* This class declares the base methods to interface with an I/O buffer.
* Most applications will not need to access this class directly, since
- * it is all handled by @ref KNetwork::KBufferedSocket and other buffering
+ * it is all handled by @ref KNetwork::TDEBufferedSocket and other buffering
* classes.
*
* @author Thiago Macieira <thiago.macieira@kdemail.net>
*/
-class KIOBufferBase
+class TDEIOBufferBase
{
public:
/**
* Default constructor. Does nothing.
*/
- KIOBufferBase()
+ TDEIOBufferBase()
{ }
/**
* Copy constructor. Does nothing here.
*/
- KIOBufferBase(const KIOBufferBase& )
+ TDEIOBufferBase(const TDEIOBufferBase& )
{ }
/**
* Virtual destructor. Does nothing.
*/
- virtual ~KIOBufferBase()
+ virtual ~TDEIOBufferBase()
{ }
/**
* Assignment operator. Does nothing.
*/
- KIOBufferBase& operator=(const KIOBufferBase& )
+ TDEIOBufferBase& operator=(const TDEIOBufferBase& )
{ return *this; }
/**
diff --git a/tdecore/network/kmulticastsocket.h b/tdecore/network/tdemulticastsocket.h
index 848e64491..15d3a28ea 100644
--- a/tdecore/network/kmulticastsocket.h
+++ b/tdecore/network/tdemulticastsocket.h
@@ -26,13 +26,13 @@
#define KMULTICASTSOCKET_H
#include "kdatagramsocket.h"
-#include "kmulticastsocketdevice.h"
+#include "tdemulticastsocketdevice.h"
namespace KNetwork {
class KMulticastSocketPrivate;
/**
- * @class KMulticastSocket kmulticastsocket.h kmulticastsocket.h
+ * @class KMulticastSocket tdemulticastsocket.h tdemulticastsocket.h
* @brief A multicast-capable datagram socket class
*
* This class derives from @ref KDatagramSocket adding methods to it to
@@ -78,14 +78,14 @@ public:
* @param group the multicast group to join
* @returns true on success
*/
- virtual bool joinGroup(const KSocketAddress& group);
+ virtual bool joinGroup(const TDESocketAddress& group);
/**
* @overload
* Joins a multicast group. This function also specifies the network interface
* to be used.
*/
- virtual bool joinGroup(const KSocketAddress& group,
+ virtual bool joinGroup(const TDESocketAddress& group,
const KNetworkInterface& iface);
/**
@@ -95,13 +95,13 @@ public:
* @param group the group to leave
* @returns true on successful leaving the group
*/
- virtual bool leaveGroup(const KSocketAddress& group);
+ virtual bool leaveGroup(const TDESocketAddress& group);
/**
* @overload
* Leaves a multicast group.
*/
- virtual bool leaveGroup(const KSocketAddress& group,
+ virtual bool leaveGroup(const TDESocketAddress& group,
const KNetworkInterface& iface);
private:
diff --git a/tdecore/network/kmulticastsocketdevice.h b/tdecore/network/tdemulticastsocketdevice.h
index ffb567ff1..bddb048a8 100644
--- a/tdecore/network/kmulticastsocketdevice.h
+++ b/tdecore/network/tdemulticastsocketdevice.h
@@ -34,7 +34,7 @@ namespace KNetwork {
class KMulticastSocketImplPrivate;
/**
- * @class KMulticastSocketImpl kmulticastsocketdevice.h kmulticastsocketdevice.h
+ * @class KMulticastSocketImpl tdemulticastsocketdevice.h tdemulticastsocketdevice.h
* @brief The low-level backend for multicasting sockets.
*
* This class is an interface providing methods for handling multicast
@@ -42,13 +42,13 @@ class KMulticastSocketImplPrivate;
*
* @author Thiago Macieira <thiago.macieira@kdemail.net>
*/
-class KMulticastSocketImpl: public KSocketDevice
+class KMulticastSocketImpl: public TDESocketDevice
{
public:
/**
* Constructor.
*/
- KMulticastSocketImpl(const KSocketBase* = 0L);
+ KMulticastSocketImpl(const TDESocketBase* = 0L);
/**
* Destructor
@@ -117,14 +117,14 @@ public:
* @param group the multicast group to join
* @returns true on success
*/
- virtual bool joinGroup(const KSocketAddress& group);
+ virtual bool joinGroup(const TDESocketAddress& group);
/**
* @overload
* Joins a multicast group. This function also specifies the network interface
* to be used.
*/
- virtual bool joinGroup(const KSocketAddress& group,
+ virtual bool joinGroup(const TDESocketAddress& group,
const KNetworkInterface& iface);
/**
@@ -134,13 +134,13 @@ public:
* @param group the group to leave
* @returns true on successful leaving the group
*/
- virtual bool leaveGroup(const KSocketAddress& group);
+ virtual bool leaveGroup(const TDESocketAddress& group);
/**
* @overload
* Leaves a multicast group.
*/
- virtual bool leaveGroup(const KSocketAddress& group,
+ virtual bool leaveGroup(const TDESocketAddress& group,
const KNetworkInterface& iface);
private:
KMulticastSocketImplPrivate *d;
diff --git a/tdecore/network/tdesocketaddress.cpp b/tdecore/network/tdesocketaddress.cpp
index d1234044b..a6da5f7c0 100644
--- a/tdecore/network/tdesocketaddress.cpp
+++ b/tdecore/network/tdesocketaddress.cpp
@@ -36,7 +36,7 @@
#include <tqfile.h>
#include <tqobject.h>
-#include "klocale.h"
+#include "tdelocale.h"
#include "tdesocketaddress.h"
#include "netsupp.h"
@@ -238,7 +238,7 @@ struct our_sockaddr_in6
#define MIN_SOCKADDR_UN_LEN (sizeof(TQ_UINT16) + sizeof(char))
-class KNetwork::KSocketAddressData
+class KNetwork::TDESocketAddressData
{
public:
/*
@@ -249,7 +249,7 @@ public:
class QMixSocketAddressRef : public KInetSocketAddress, public KUnixSocketAddress
{
public:
- QMixSocketAddressRef(KSocketAddressData* d)
+ QMixSocketAddressRef(TDESocketAddressData* d)
: KInetSocketAddress(d), KUnixSocketAddress(d)
{
}
@@ -265,7 +265,7 @@ public:
} addr;
TQ_UINT16 curlen, reallen;
- KSocketAddressData()
+ TDESocketAddressData()
: ref(this)
{
addr.generic = 0L;
@@ -273,7 +273,7 @@ public:
invalidate();
}
- ~KSocketAddressData()
+ ~TDESocketAddressData()
{
if (addr.generic != 0L)
free(addr.generic);
@@ -343,7 +343,7 @@ public:
};
// create duplicates of
-void KSocketAddressData::dup(const sockaddr* sa, TQ_UINT16 len, bool clear)
+void TDESocketAddressData::dup(const sockaddr* sa, TQ_UINT16 len, bool clear)
{
if (len < MIN_SOCKADDR_LEN)
{
@@ -405,30 +405,30 @@ void KSocketAddressData::dup(const sockaddr* sa, TQ_UINT16 len, bool clear)
}
// default constructor
-KSocketAddress::KSocketAddress()
- : d(new KSocketAddressData)
+TDESocketAddress::TDESocketAddress()
+ : d(new TDESocketAddressData)
{
}
// constructor from binary data
-KSocketAddress::KSocketAddress(const sockaddr *sa, TQ_UINT16 len)
- : d(new KSocketAddressData)
+TDESocketAddress::TDESocketAddress(const sockaddr *sa, TQ_UINT16 len)
+ : d(new TDESocketAddressData)
{
setAddress(sa, len);
}
-KSocketAddress::KSocketAddress(const KSocketAddress& other)
- : d(new(KSocketAddressData))
+TDESocketAddress::TDESocketAddress(const TDESocketAddress& other)
+ : d(new(TDESocketAddressData))
{
*this = other;
}
-KSocketAddress::KSocketAddress(KSocketAddressData *d2)
+TDESocketAddress::TDESocketAddress(TDESocketAddressData *d2)
: d(d2)
{
}
-KSocketAddress::~KSocketAddress()
+TDESocketAddress::~TDESocketAddress()
{
// prevent double-deletion, since we're already being deleted
if (d)
@@ -439,7 +439,7 @@ KSocketAddress::~KSocketAddress()
}
}
-KSocketAddress& KSocketAddress::operator =(const KSocketAddress& other)
+TDESocketAddress& TDESocketAddress::operator =(const TDESocketAddress& other)
{
if (other.d && !other.d->invalid())
d->dup(other.d->addr.generic, other.d->reallen);
@@ -448,21 +448,21 @@ KSocketAddress& KSocketAddress::operator =(const KSocketAddress& other)
return *this;
}
-const sockaddr* KSocketAddress::address() const
+const sockaddr* TDESocketAddress::address() const
{
if (d->invalid())
return 0L;
return d->addr.generic;
}
-sockaddr* KSocketAddress::address()
+sockaddr* TDESocketAddress::address()
{
if (d->invalid())
return 0L;
return d->addr.generic;
}
-KSocketAddress& KSocketAddress::setAddress(const sockaddr* sa, TQ_UINT16 len)
+TDESocketAddress& TDESocketAddress::setAddress(const sockaddr* sa, TQ_UINT16 len)
{
if (sa != 0L && len >= MIN_SOCKADDR_LEN)
d->dup(sa, len);
@@ -472,28 +472,28 @@ KSocketAddress& KSocketAddress::setAddress(const sockaddr* sa, TQ_UINT16 len)
return *this;
}
-TQ_UINT16 KSocketAddress::length() const
+TQ_UINT16 TDESocketAddress::length() const
{
if (d->invalid())
return 0;
return d->reallen;
}
-KSocketAddress& KSocketAddress::setLength(TQ_UINT16 len)
+TDESocketAddress& TDESocketAddress::setLength(TQ_UINT16 len)
{
d->dup((sockaddr*)0L, len, false);
return *this;
}
-int KSocketAddress::family() const
+int TDESocketAddress::family() const
{
if (d->invalid())
return AF_UNSPEC;
return d->addr.generic->sa_family;
}
-KSocketAddress& KSocketAddress::setFamily(int family)
+TDESocketAddress& TDESocketAddress::setFamily(int family)
{
if (d->invalid())
d->dup((sockaddr*)0L, MIN_SOCKADDR_LEN);
@@ -502,7 +502,7 @@ KSocketAddress& KSocketAddress::setFamily(int family)
return *this;
}
-bool KSocketAddress::operator ==(const KSocketAddress& other) const
+bool TDESocketAddress::operator ==(const TDESocketAddress& other) const
{
// if this is invalid, it's only equal if the other one is invalid as well
if (d->invalid())
@@ -559,7 +559,7 @@ bool KSocketAddress::operator ==(const KSocketAddress& other) const
return false; // not equal in any other case
}
-TQString KSocketAddress::nodeName() const
+TQString TDESocketAddress::nodeName() const
{
if (d->invalid())
return TQString::null;
@@ -585,7 +585,7 @@ TQString KSocketAddress::nodeName() const
return TQString::null;
}
-TQString KSocketAddress::serviceName() const
+TQString TDESocketAddress::serviceName() const
{
if (d->invalid())
return TQString::null;
@@ -605,7 +605,7 @@ TQString KSocketAddress::serviceName() const
return TQString::null;
}
-TQString KSocketAddress::toString() const
+TQString TDESocketAddress::toString() const
{
if (d->invalid())
return TQString::null;
@@ -627,27 +627,27 @@ TQString KSocketAddress::toString() const
return fmt.arg(nodeName()).arg(serviceName());
}
-KInetSocketAddress& KSocketAddress::asInet()
+KInetSocketAddress& TDESocketAddress::asInet()
{
return d->ref;
}
-KInetSocketAddress KSocketAddress::asInet() const
+KInetSocketAddress TDESocketAddress::asInet() const
{
return d->ref;
}
-KUnixSocketAddress& KSocketAddress::asUnix()
+KUnixSocketAddress& TDESocketAddress::asUnix()
{
return d->ref;
}
-KUnixSocketAddress KSocketAddress::asUnix() const
+KUnixSocketAddress TDESocketAddress::asUnix() const
{
return d->ref;
}
-int KSocketAddress::ianaFamily(int af)
+int TDESocketAddress::ianaFamily(int af)
{
switch (af)
{
@@ -664,7 +664,7 @@ int KSocketAddress::ianaFamily(int af)
}
}
-int KSocketAddress::fromIanaFamily(int iana)
+int TDESocketAddress::fromIanaFamily(int iana)
{
switch (iana)
{
@@ -688,7 +688,7 @@ KInetSocketAddress::KInetSocketAddress()
// binary data constructor
KInetSocketAddress::KInetSocketAddress(const sockaddr* sa, TQ_UINT16 len)
- : KSocketAddress(sa, len)
+ : TDESocketAddress(sa, len)
{
if (!d->invalid())
update();
@@ -703,21 +703,21 @@ KInetSocketAddress::KInetSocketAddress(const KIpAddress& host, TQ_UINT16 port)
// copy constructor
KInetSocketAddress::KInetSocketAddress(const KInetSocketAddress& other)
- : KSocketAddress(other)
+ : TDESocketAddress(other)
{
}
// special copy constructor
-KInetSocketAddress::KInetSocketAddress(const KSocketAddress& other)
- : KSocketAddress(other)
+KInetSocketAddress::KInetSocketAddress(const TDESocketAddress& other)
+ : TDESocketAddress(other)
{
if (!d->invalid())
update();
}
// special constructor
-KInetSocketAddress::KInetSocketAddress(KSocketAddressData *d)
- : KSocketAddress(d)
+KInetSocketAddress::KInetSocketAddress(TDESocketAddressData *d)
+ : TDESocketAddress(d)
{
}
@@ -730,7 +730,7 @@ KInetSocketAddress::~KInetSocketAddress()
// copy operator
KInetSocketAddress& KInetSocketAddress::operator =(const KInetSocketAddress& other)
{
- KSocketAddress::operator =(other);
+ TDESocketAddress::operator =(other);
return *this;
}
@@ -905,14 +905,14 @@ KUnixSocketAddress::KUnixSocketAddress()
}
KUnixSocketAddress::KUnixSocketAddress(const sockaddr* sa, TQ_UINT16 len)
- : KSocketAddress(sa, len)
+ : TDESocketAddress(sa, len)
{
if (!d->invalid() && d->addr.un->sun_family != AF_UNIX)
d->invalidate();
}
KUnixSocketAddress::KUnixSocketAddress(const KUnixSocketAddress& other)
- : KSocketAddress(other)
+ : TDESocketAddress(other)
{
}
@@ -921,8 +921,8 @@ KUnixSocketAddress::KUnixSocketAddress(const TQString& pathname)
setPathname(pathname);
}
-KUnixSocketAddress::KUnixSocketAddress(KSocketAddressData* d)
- : KSocketAddress(d)
+KUnixSocketAddress::KUnixSocketAddress(TDESocketAddressData* d)
+ : TDESocketAddress(d)
{
}
@@ -932,7 +932,7 @@ KUnixSocketAddress::~KUnixSocketAddress()
KUnixSocketAddress& KUnixSocketAddress::operator =(const KUnixSocketAddress& other)
{
- KSocketAddress::operator =(other);
+ TDESocketAddress::operator =(other);
return *this;
}
diff --git a/tdecore/network/tdesocketaddress.h b/tdecore/network/tdesocketaddress.h
index 885bb77cb..100e05fb2 100644
--- a/tdecore/network/tdesocketaddress.h
+++ b/tdecore/network/tdesocketaddress.h
@@ -38,7 +38,7 @@ struct sockaddr_un;
namespace KNetwork {
class KIpAddress;
-class KSocketAddress;
+class TDESocketAddress;
class KInetSocketAddress;
class KUnixSocketAddress;
@@ -412,15 +412,15 @@ public:
};
-class KSocketAddressData;
-/** @class KSocketAddress tdesocketaddress.h tdesocketaddress.h
+class TDESocketAddressData;
+/** @class TDESocketAddress tdesocketaddress.h tdesocketaddress.h
* @brief A generic socket address.
*
* This class holds one generic socket address.
*
* @author Thiago Macieira <thiago.macieira@kdemail.net>
*/
-class TDECORE_EXPORT KSocketAddress
+class TDECORE_EXPORT TDESocketAddress
{
public:
/**
@@ -428,7 +428,7 @@ public:
*
* Creates an empty object
*/
- KSocketAddress();
+ TDESocketAddress();
/**
* Creates this object with the given data.
@@ -437,7 +437,7 @@ public:
* @param sa the socket address structure
* @param len the socket address length
*/
- KSocketAddress(const sockaddr* sa, TQ_UINT16 len);
+ TDESocketAddress(const sockaddr* sa, TQ_UINT16 len);
/**
* Copy constructor. This creates a copy of the other
@@ -447,12 +447,12 @@ public:
*
* @param other the object to copy from
*/
- KSocketAddress(const KSocketAddress& other);
+ TDESocketAddress(const TDESocketAddress& other);
/**
* Destructor. Frees any associated resources.
*/
- virtual ~KSocketAddress();
+ virtual ~TDESocketAddress();
/**
* Performs a shallow copy of the other object into this one.
@@ -460,7 +460,7 @@ public:
*
* @param other the object to copy from
*/
- KSocketAddress& operator =(const KSocketAddress& other);
+ TDESocketAddress& operator =(const TDESocketAddress& other);
/**
* Returns the socket address structure, to be passed down to
@@ -490,7 +490,7 @@ public:
* @param sa the socket address structure
* @param len the socket address length
*/
- KSocketAddress& setAddress(const sockaddr *sa, TQ_UINT16 len);
+ TDESocketAddress& setAddress(const sockaddr *sa, TQ_UINT16 len);
/**
* Returns the socket address structure, to be passed down to
@@ -517,14 +517,14 @@ public:
* the family:
*
* \code
- * KSocketAddress qsa;
+ * TDESocketAddress qsa;
* [...]
* qsa.setFamily(AF_UNSPEC).setLength(newlen);
* \endcode
*
* @param len the new length
*/
- KSocketAddress& setLength(TQ_UINT16 len);
+ TDESocketAddress& setLength(TQ_UINT16 len);
/**
* Returns the family of this address.
@@ -540,7 +540,7 @@ public:
*
* @param family the new family to set
*/
- virtual KSocketAddress& setFamily(int family);
+ virtual TDESocketAddress& setFamily(int family);
/**
* Returns the IANA family number of this address.
@@ -558,7 +558,7 @@ public:
* @param other the other socket
* @return true if both sockets are equal
*/
- bool operator ==(const KSocketAddress& other) const;
+ bool operator ==(const TDESocketAddress& other) const;
/**
* Returns the node name of this socket.
@@ -615,11 +615,11 @@ public:
protected:
/// @internal
/// private data
- KSocketAddressData *d;
+ TDESocketAddressData *d;
/// @internal
/// extra constructor
- KSocketAddress(KSocketAddressData* d);
+ TDESocketAddress(TDESocketAddressData* d);
public: // static
/**
@@ -648,9 +648,9 @@ public: // static
*
* @author Thiago Macieira <thiago.macieira@kdemail.net>
*/
-class TDECORE_EXPORT KInetSocketAddress: public KSocketAddress
+class TDECORE_EXPORT KInetSocketAddress: public TDESocketAddress
{
- friend class KSocketAddress;
+ friend class TDESocketAddress;
public:
/**
* Public constructor. Creates an empty object.
@@ -693,7 +693,7 @@ public:
*
* @param other the other object
*/
- KInetSocketAddress(const KSocketAddress& other);
+ KInetSocketAddress(const TDESocketAddress& other);
/**
* Destroys this object.
@@ -817,7 +817,7 @@ public:
protected:
/// @internal
/// extra constructor
- KInetSocketAddress(KSocketAddressData* d);
+ KInetSocketAddress(TDESocketAddressData* d);
private:
void update();
@@ -837,9 +837,9 @@ private:
*
* @author Thiago Macieira <thiago.macieira@kdemail.net>
*/
-class TDECORE_EXPORT KUnixSocketAddress: public KSocketAddress
+class TDECORE_EXPORT KUnixSocketAddress: public TDESocketAddress
{
- friend class KSocketAddress;
+ friend class TDESocketAddress;
public:
/**
* Default constructor. Creates an empty object.
@@ -904,7 +904,7 @@ public:
protected:
/// @internal
/// extra constructor
- KUnixSocketAddress(KSocketAddressData* d);
+ KUnixSocketAddress(TDESocketAddressData* d);
};
} // namespace KNetwork
diff --git a/tdecore/network/tdesocketbase.cpp b/tdecore/network/tdesocketbase.cpp
index 9be0d6e52..66decb15d 100644
--- a/tdecore/network/tdesocketbase.cpp
+++ b/tdecore/network/tdesocketbase.cpp
@@ -24,31 +24,31 @@
#include <config.h>
#include <tqmutex.h>
-#include "klocale.h"
+#include "tdelocale.h"
#include "tdesocketbase.h"
#include "tdesocketdevice.h"
using namespace KNetwork;
-class KNetwork::KSocketBasePrivate
+class KNetwork::TDESocketBasePrivate
{
public:
int socketOptions;
int socketError;
int capabilities;
- mutable KSocketDevice* device;
+ mutable TDESocketDevice* device;
TQMutex mutex;
- KSocketBasePrivate()
+ TDESocketBasePrivate()
: mutex(true) // create recursive
{ }
};
-KSocketBase::KSocketBase()
- : d(new KSocketBasePrivate)
+TDESocketBase::TDESocketBase()
+ : d(new TDESocketBasePrivate)
{
d->socketOptions = Blocking;
d->socketError = 0;
@@ -56,64 +56,64 @@ KSocketBase::KSocketBase()
d->capabilities = 0;
}
-KSocketBase::~KSocketBase()
+TDESocketBase::~TDESocketBase()
{
delete d->device;
delete d;
}
-bool KSocketBase::setSocketOptions(int opts)
+bool TDESocketBase::setSocketOptions(int opts)
{
d->socketOptions = opts;
return true;
}
-int KSocketBase::socketOptions() const
+int TDESocketBase::socketOptions() const
{
return d->socketOptions;
}
-bool KSocketBase::setBlocking(bool enable)
+bool TDESocketBase::setBlocking(bool enable)
{
return setSocketOptions((socketOptions() & ~Blocking) | (enable ? Blocking : 0));
}
-bool KSocketBase::blocking() const
+bool TDESocketBase::blocking() const
{
return socketOptions() & Blocking;
}
-bool KSocketBase::setAddressReuseable(bool enable)
+bool TDESocketBase::setAddressReuseable(bool enable)
{
return setSocketOptions((socketOptions() & ~AddressReuseable) | (enable ? AddressReuseable : 0));
}
-bool KSocketBase::addressReuseable() const
+bool TDESocketBase::addressReuseable() const
{
return socketOptions() & AddressReuseable;
}
-bool KSocketBase::setIPv6Only(bool enable)
+bool TDESocketBase::setIPv6Only(bool enable)
{
return setSocketOptions((socketOptions() & ~IPv6Only) | (enable ? IPv6Only : 0));
}
-bool KSocketBase::isIPv6Only() const
+bool TDESocketBase::isIPv6Only() const
{
return socketOptions() & IPv6Only;
}
-bool KSocketBase::setBroadcast(bool enable)
+bool TDESocketBase::setBroadcast(bool enable)
{
return setSocketOptions((socketOptions() & ~Broadcast) | (enable ? Broadcast : 0));
}
-bool KSocketBase::broadcast() const
+bool TDESocketBase::broadcast() const
{
return socketOptions() & Broadcast;
}
-KSocketDevice* KSocketBase::socketDevice() const
+TDESocketDevice* TDESocketBase::socketDevice() const
{
if (d->device)
return d->device;
@@ -123,47 +123,47 @@ KSocketDevice* KSocketBase::socketDevice() const
if (d->device)
return d->device;
- KSocketBase* that = const_cast<KSocketBase*>(this);
- KSocketDevice* dev = 0;
+ TDESocketBase* that = const_cast<TDESocketBase*>(this);
+ TDESocketDevice* dev = 0;
if (d->capabilities)
- dev = KSocketDevice::createDefault(that, d->capabilities);
+ dev = TDESocketDevice::createDefault(that, d->capabilities);
if (!dev)
- dev = KSocketDevice::createDefault(that);
+ dev = TDESocketDevice::createDefault(that);
that->setSocketDevice(dev);
return d->device;
}
-void KSocketBase::setSocketDevice(KSocketDevice* device)
+void TDESocketBase::setSocketDevice(TDESocketDevice* device)
{
TQMutexLocker locker(mutex());
if (d->device == 0L)
d->device = device;
}
-int KSocketBase::setRequestedCapabilities(int add, int remove)
+int TDESocketBase::setRequestedCapabilities(int add, int remove)
{
d->capabilities |= add;
d->capabilities &= ~remove;
return d->capabilities;
}
-bool KSocketBase::hasDevice() const
+bool TDESocketBase::hasDevice() const
{
return d->device != 0L;
}
-void KSocketBase::setError(SocketError error)
+void TDESocketBase::setError(SocketError error)
{
d->socketError = error;
}
-KSocketBase::SocketError KSocketBase::error() const
+TDESocketBase::SocketError TDESocketBase::error() const
{
- return static_cast<KSocketBase::SocketError>(d->socketError);
+ return static_cast<TDESocketBase::SocketError>(d->socketError);
}
// static
-TQString KSocketBase::errorString(KSocketBase::SocketError code)
+TQString TDESocketBase::errorString(TDESocketBase::SocketError code)
{
TQString reason;
switch (code)
@@ -256,7 +256,7 @@ TQString KSocketBase::errorString(KSocketBase::SocketError code)
}
// static
-bool KSocketBase::isFatalError(int code)
+bool TDESocketBase::isFatalError(int code)
{
switch (code)
{
@@ -270,12 +270,12 @@ bool KSocketBase::isFatalError(int code)
return true;
}
-void KSocketBase::unsetSocketDevice()
+void TDESocketBase::unsetSocketDevice()
{
d->device = 0L;
}
-TQMutex* KSocketBase::mutex() const
+TQMutex* TDESocketBase::mutex() const
{
return &d->mutex;
}
@@ -308,13 +308,13 @@ int KActiveSocketBase::putch(int ch)
void KActiveSocketBase::setError(int status, SocketError error)
{
- KSocketBase::setError(error);
+ TDESocketBase::setError(error);
setStatus(status);
}
void KActiveSocketBase::resetError()
{
- KSocketBase::setError(NoError);
+ TDESocketBase::setError(NoError);
resetStatus();
}
diff --git a/tdecore/network/tdesocketbase.h b/tdecore/network/tdesocketbase.h
index 48ae15e05..bd0828408 100644
--- a/tdecore/network/tdesocketbase.h
+++ b/tdecore/network/tdesocketbase.h
@@ -80,10 +80,10 @@ class TQMutex;
namespace KNetwork {
class KResolverEntry;
-class KSocketDevice;
+class TDESocketDevice;
-class KSocketBasePrivate;
-/** @class KSocketBase tdesocketbase.h tdesocketbase.h
+class TDESocketBasePrivate;
+/** @class TDESocketBase tdesocketbase.h tdesocketbase.h
* @brief Basic socket functionality.
*
* This class provides the basic socket functionlity for descended classes.
@@ -94,7 +94,7 @@ class KSocketBasePrivate;
*
* @author Thiago Macieira <thiago.macieira@kdemail.net>
*/
-class TDECORE_EXPORT KSocketBase
+class TDECORE_EXPORT TDESocketBase
{
public:
/**
@@ -175,12 +175,12 @@ public:
/**
* Default constructor.
*/
- KSocketBase();
+ TDESocketBase();
/**
* Destructor.
*/
- virtual ~KSocketBase();
+ virtual ~TDESocketBase();
/*
* The following functions are shared by all descended classes and will have
@@ -316,7 +316,7 @@ public:
* This function creates the device if none has been set
* using the default factory.
*/
- KSocketDevice* socketDevice() const;
+ TDESocketDevice* socketDevice() const;
/**
* Sets the socket implementation to be used on this socket.
@@ -331,7 +331,7 @@ public:
* This function is called by @ref socketDevice above when the socket is
* first created.
*/
- virtual void setSocketDevice(KSocketDevice* device);
+ virtual void setSocketDevice(TDESocketDevice* device);
/**
* Sets the internally requested capabilities for a socket device.
@@ -341,16 +341,16 @@ public:
* implementation. By using this function, derived classes can request
* that a backend with those capabilities be created when necessary.
*
- * For the possible flags, see @ref KSocketDevice::Capabilities. However, note
+ * For the possible flags, see @ref TDESocketDevice::Capabilities. However, note
* that only the Can* flags make sense in this context.
*
* @note Since socketDevice must always return a valid backend object, it
* is is possible that the created device does not conform to all
* requirements requested. Implementations sensitive to this fact
* should test the object returned by @ref socketDevice (through
- * @ref KSocketDevice::capabilities, for instance) the availability.
+ * @ref TDESocketDevice::capabilities, for instance) the availability.
*
- * @param add mask of @ref KSocketDevice::Capabilities to add
+ * @param add mask of @ref TDESocketDevice::Capabilities to add
* @param remove mask of bits to remove from the requirements
* @return the current mask of requested capabilities
*/
@@ -420,15 +420,15 @@ public:
private:
/// @internal
- /// called by KSocketDevice
+ /// called by TDESocketDevice
void unsetSocketDevice();
- KSocketBase(const KSocketBase&);
- KSocketBase& operator =(const KSocketBase&);
+ TDESocketBase(const TDESocketBase&);
+ TDESocketBase& operator =(const TDESocketBase&);
- KSocketBasePrivate *d;
+ TDESocketBasePrivate *d;
- friend class KSocketDevice;
+ friend class TDESocketDevice;
};
/**
@@ -440,7 +440,7 @@ private:
*
* @author Thiago Macieira <thiago.macieira@kdemail.net>
*/
-class TDECORE_EXPORT KActiveSocketBase: public TQIODevice, virtual public KSocketBase
+class TDECORE_EXPORT KActiveSocketBase: public TQIODevice, virtual public TDESocketBase
{
public:
/**
@@ -575,7 +575,7 @@ public:
* @param from the address of the sender will be stored here
* @returns the actual number of bytes read
*/
- virtual TQT_TQIO_LONG tqreadBlock(char *data, TQT_TQIO_ULONG maxlen, KSocketAddress& from) = 0;
+ virtual TQT_TQIO_LONG tqreadBlock(char *data, TQT_TQIO_ULONG maxlen, TDESocketAddress& from) = 0;
/**
* Peeks the data in the socket.
@@ -602,7 +602,7 @@ public:
* @param from the address of the sender will be stored here
* @returns the actual number of bytes copied into @p data
*/
- virtual TQ_LONG peekBlock(char *data, TQ_ULONG maxlen, KSocketAddress& from) = 0;
+ virtual TQ_LONG peekBlock(char *data, TQ_ULONG maxlen, TDESocketAddress& from) = 0;
/**
* Writes the given data to the socket.
@@ -623,7 +623,7 @@ public:
* @param to the address to send to
* @returns the number of bytes actually sent
*/
- virtual TQT_TQIO_LONG tqwriteBlock(const char *data, TQT_TQIO_ULONG len, const KSocketAddress& to) = 0;
+ virtual TQT_TQIO_LONG tqwriteBlock(const char *data, TQT_TQIO_ULONG len, const TDESocketAddress& to) = 0;
/**
* Reads one character from the socket.
@@ -647,14 +647,14 @@ public:
/**
* Returns this socket's local address.
*/
- virtual KSocketAddress localAddress() const = 0;
+ virtual TDESocketAddress localAddress() const = 0;
/**
* Return this socket's peer address, if we are connected.
* If the address cannot be retrieved, the returned object will contain
* an invalid address.
*/
- virtual KSocketAddress peerAddress() const = 0;
+ virtual TDESocketAddress peerAddress() const = 0;
// FIXME KDE 4.0:
// enable this function
@@ -662,7 +662,7 @@ public:
/**
* Returns this socket's externally-visible address, if known.
*/
- virtual KSocketAddress externalAddress() const = 0;
+ virtual TDESocketAddress externalAddress() const = 0;
#endif
protected:
@@ -689,7 +689,7 @@ protected:
*
* @author Thiago Macieira <thiago.macieira@kdemail.net>
*/
-class TDECORE_EXPORT KPassiveSocketBase: virtual public KSocketBase
+class TDECORE_EXPORT KPassiveSocketBase: virtual public TDESocketBase
{
public:
/**
@@ -754,12 +754,12 @@ public:
/**
* Returns this socket's local address.
*/
- virtual KSocketAddress localAddress() const = 0;
+ virtual TDESocketAddress localAddress() const = 0;
/**
* Returns this socket's externally-visible address if known.
*/
- virtual KSocketAddress externalAddress() const = 0;
+ virtual TDESocketAddress externalAddress() const = 0;
private:
KPassiveSocketBase(const KPassiveSocketBase&);
diff --git a/tdecore/network/tdesocketbuffer.cpp b/tdecore/network/tdesocketbuffer.cpp
index 0ba18b77b..33b8fe776 100644
--- a/tdecore/network/tdesocketbuffer.cpp
+++ b/tdecore/network/tdesocketbuffer.cpp
@@ -33,28 +33,28 @@
using namespace KNetwork;
using namespace KNetwork::Internal;
-KSocketBuffer::KSocketBuffer(TQ_LONG size)
+TDESocketBuffer::TDESocketBuffer(TQ_LONG size)
: m_mutex(true), m_offset(0), m_size(size), m_length(0)
{
}
-KSocketBuffer::KSocketBuffer(const KSocketBuffer& other)
- : KIOBufferBase(other), m_mutex(true)
+TDESocketBuffer::TDESocketBuffer(const TDESocketBuffer& other)
+ : TDEIOBufferBase(other), m_mutex(true)
{
*this = other;
}
-KSocketBuffer::~KSocketBuffer()
+TDESocketBuffer::~TDESocketBuffer()
{
// TQValueList takes care of deallocating memory
}
-KSocketBuffer& KSocketBuffer::operator=(const KSocketBuffer& other)
+TDESocketBuffer& TDESocketBuffer::operator=(const TDESocketBuffer& other)
{
TQMutexLocker locker1(&m_mutex);
TQMutexLocker locker2(&other.m_mutex);
- KIOBufferBase::operator=(other);
+ TDEIOBufferBase::operator=(other);
m_list = other.m_list; // copy-on-write
m_offset = other.m_offset;
@@ -64,7 +64,7 @@ KSocketBuffer& KSocketBuffer::operator=(const KSocketBuffer& other)
return *this;
}
-bool KSocketBuffer::canReadLine() const
+bool TDESocketBuffer::canReadLine() const
{
TQMutexLocker locker(&m_mutex);
@@ -85,7 +85,7 @@ bool KSocketBuffer::canReadLine() const
return false; // not found
}
-TQCString KSocketBuffer::readLine()
+TQCString TDESocketBuffer::readLine()
{
if (!canReadLine())
return TQCString(); // empty
@@ -120,17 +120,17 @@ TQCString KSocketBuffer::readLine()
return result;
}
-TQ_LONG KSocketBuffer::length() const
+TQ_LONG TDESocketBuffer::length() const
{
return m_length;
}
-TQ_LONG KSocketBuffer::size() const
+TQ_LONG TDESocketBuffer::size() const
{
return m_size;
}
-bool KSocketBuffer::setSize(TQ_LONG size)
+bool TDESocketBuffer::setSize(TQ_LONG size)
{
m_size = size;
if (size == -1 || m_length < m_size)
@@ -147,7 +147,7 @@ bool KSocketBuffer::setSize(TQ_LONG size)
return (m_length - m_size) == consumeBuffer(0L, m_length - m_size, true);
}
-TQ_LONG KSocketBuffer::feedBuffer(const char *data, TQ_LONG len)
+TQ_LONG TDESocketBuffer::feedBuffer(const char *data, TQ_LONG len)
{
if (data == 0L || len == 0)
return 0; // nothing to write
@@ -168,7 +168,7 @@ TQ_LONG KSocketBuffer::feedBuffer(const char *data, TQ_LONG len)
return len;
}
-TQ_LONG KSocketBuffer::consumeBuffer(char *destbuffer, TQ_LONG maxlen, bool discard)
+TQ_LONG TDESocketBuffer::consumeBuffer(char *destbuffer, TQ_LONG maxlen, bool discard)
{
if (maxlen == 0 || isEmpty())
return 0;
@@ -220,7 +220,7 @@ TQ_LONG KSocketBuffer::consumeBuffer(char *destbuffer, TQ_LONG maxlen, bool disc
return copied;
}
-void KSocketBuffer::clear()
+void TDESocketBuffer::clear()
{
TQMutexLocker locker(&m_mutex);
m_list.clear();
@@ -228,7 +228,7 @@ void KSocketBuffer::clear()
m_length = 0;
}
-TQ_LONG KSocketBuffer::sendTo(KActiveSocketBase* dev, TQ_LONG len)
+TQ_LONG TDESocketBuffer::sendTo(KActiveSocketBase* dev, TQ_LONG len)
{
if (len == 0 || isEmpty())
return 0;
@@ -293,7 +293,7 @@ TQ_LONG KSocketBuffer::sendTo(KActiveSocketBase* dev, TQ_LONG len)
return written;
}
-TQ_LONG KSocketBuffer::receiveFrom(KActiveSocketBase* dev, TQ_LONG len)
+TQ_LONG TDESocketBuffer::receiveFrom(KActiveSocketBase* dev, TQ_LONG len)
{
if (len == 0 || isFull())
return 0;
diff --git a/tdecore/network/tdesocketbuffer_p.h b/tdecore/network/tdesocketbuffer_p.h
index b2c5dc6b2..2f8e4fa75 100644
--- a/tdecore/network/tdesocketbuffer_p.h
+++ b/tdecore/network/tdesocketbuffer_p.h
@@ -28,7 +28,7 @@
#include <tqmutex.h>
#include <tqcstring.h>
#include <tqvaluelist.h>
-#include "kiobuffer.h"
+#include "tdeiobuffer.h"
namespace KNetwork {
@@ -38,14 +38,14 @@ class KActiveSocketBase;
/**
* @internal
- * @class KSocketBuffer tdesocketbuffer_p.h tdesocketbuffer_p.h
+ * @class TDESocketBuffer tdesocketbuffer_p.h tdesocketbuffer_p.h
* @brief generic socket buffering code
*
- * This class implements generic buffering used by @ref KBufferedSocket.
+ * This class implements generic buffering used by @ref TDEBufferedSocket.
*
* @author Thiago Macieira <thiago.macieira@kdemail.net>
*/
-class KSocketBuffer: public KIOBufferBase
+class TDESocketBuffer: public TDEIOBufferBase
{
public:
/**
@@ -53,22 +53,22 @@ public:
*
* @param size the maximum size of the buffer
*/
- KSocketBuffer(TQ_LONG size = -1);
+ TDESocketBuffer(TQ_LONG size = -1);
/**
* Copy constructor.
*/
- KSocketBuffer(const KSocketBuffer& other);
+ TDESocketBuffer(const TDESocketBuffer& other);
/**
* Virtual destructor. Frees the buffer and discards its contents.
*/
- virtual ~KSocketBuffer();
+ virtual ~TDESocketBuffer();
/**
* Assignment operator.
*/
- KSocketBuffer& operator=(const KSocketBuffer& other);
+ TDESocketBuffer& operator=(const TDESocketBuffer& other);
/**
* Returns true if a line can be read from the buffer.
diff --git a/tdecore/network/tdesocketdevice.cpp b/tdecore/network/tdesocketdevice.cpp
index 064b66b08..e4802bb7c 100644
--- a/tdecore/network/tdesocketdevice.cpp
+++ b/tdecore/network/tdesocketdevice.cpp
@@ -60,14 +60,14 @@
using namespace KNetwork;
-class KNetwork::KSocketDevicePrivate
+class KNetwork::TDESocketDevicePrivate
{
public:
mutable TQSocketNotifier *input, *output, *exception;
- KSocketAddress local, peer;
+ TDESocketAddress local, peer;
int af;
- inline KSocketDevicePrivate()
+ inline TDESocketDevicePrivate()
{
input = output = exception = 0L;
af = 0;
@@ -75,16 +75,16 @@ public:
};
-KSocketDevice::KSocketDevice(const KSocketBase* parent)
- : m_sockfd(-1), d(new KSocketDevicePrivate)
+TDESocketDevice::TDESocketDevice(const TDESocketBase* parent)
+ : m_sockfd(-1), d(new TDESocketDevicePrivate)
{
setSocketDevice(this);
if (parent)
setSocketOptions(parent->socketOptions());
}
-KSocketDevice::KSocketDevice(int fd)
- : m_sockfd(fd), d(new KSocketDevicePrivate)
+TDESocketDevice::TDESocketDevice(int fd)
+ : m_sockfd(fd), d(new TDESocketDevicePrivate)
{
setState(IO_Open);
setFlags(IO_Sequential | IO_Raw | IO_ReadWrite);
@@ -92,26 +92,26 @@ KSocketDevice::KSocketDevice(int fd)
d->af = localAddress().family();
}
-KSocketDevice::KSocketDevice(bool, const KSocketBase* parent)
- : m_sockfd(-1), d(new KSocketDevicePrivate)
+TDESocketDevice::TDESocketDevice(bool, const TDESocketBase* parent)
+ : m_sockfd(-1), d(new TDESocketDevicePrivate)
{
// do not set parent
if (parent)
setSocketOptions(parent->socketOptions());
}
-KSocketDevice::~KSocketDevice()
+TDESocketDevice::~TDESocketDevice()
{
close(); // deletes the notifiers
unsetSocketDevice(); // prevent double deletion
delete d;
}
-bool KSocketDevice::setSocketOptions(int opts)
+bool TDESocketDevice::setSocketOptions(int opts)
{
// must call parent
TQMutexLocker locker(mutex());
- KSocketBase::setSocketOptions(opts);
+ TDESocketBase::setSocketOptions(opts);
if (m_sockfd == -1)
return true; // flags are stored
@@ -171,13 +171,13 @@ bool KSocketDevice::setSocketOptions(int opts)
return true; // all went well
}
-bool KSocketDevice::open(TQ_OpenMode)
+bool TDESocketDevice::open(TQ_OpenMode)
{
resetError();
return false;
}
-void KSocketDevice::close()
+void TDESocketDevice::close()
{
resetError();
if (m_sockfd != -1)
@@ -198,7 +198,7 @@ void KSocketDevice::close()
m_sockfd = -1;
}
-bool KSocketDevice::create(int family, int type, int protocol)
+bool TDESocketDevice::create(int family, int type, int protocol)
{
resetError();
@@ -224,12 +224,12 @@ bool KSocketDevice::create(int family, int type, int protocol)
return true; // successfully created
}
-bool KSocketDevice::create(const KResolverEntry& address)
+bool TDESocketDevice::create(const KResolverEntry& address)
{
return create(address.family(), address.socketType(), address.protocol());
}
-bool KSocketDevice::bind(const KResolverEntry& address)
+bool TDESocketDevice::bind(const KResolverEntry& address)
{
resetError();
@@ -252,7 +252,7 @@ bool KSocketDevice::bind(const KResolverEntry& address)
return true;
}
-bool KSocketDevice::listen(int backlog)
+bool TDESocketDevice::listen(int backlog)
{
if (m_sockfd != -1)
{
@@ -273,7 +273,7 @@ bool KSocketDevice::listen(int backlog)
return false;
}
-bool KSocketDevice::connect(const KResolverEntry& address)
+bool TDESocketDevice::connect(const KResolverEntry& address)
{
resetError();
@@ -306,7 +306,7 @@ bool KSocketDevice::connect(const KResolverEntry& address)
return true; // all is well
}
-KSocketDevice* KSocketDevice::accept()
+TDESocketDevice* TDESocketDevice::accept()
{
if (m_sockfd == -1)
{
@@ -327,17 +327,17 @@ KSocketDevice* KSocketDevice::accept()
return NULL;
}
- return new KSocketDevice(newfd);
+ return new TDESocketDevice(newfd);
}
-bool KSocketDevice::disconnect()
+bool TDESocketDevice::disconnect()
{
resetError();
if (m_sockfd == -1)
return false; // can't create
- KSocketAddress address;
+ TDESocketAddress address;
address.setFamily(AF_UNSPEC);
if (kde_connect(m_sockfd, address.address(), address.length()) == -1)
{
@@ -365,10 +365,10 @@ bool KSocketDevice::disconnect()
}
#ifdef USE_QT3
-TQ_LONG KSocketDevice::bytesAvailable() const
+TQ_LONG TDESocketDevice::bytesAvailable() const
#endif
#ifdef USE_QT4
-qint64 KSocketDevice::bytesAvailable() const
+qint64 TDESocketDevice::bytesAvailable() const
#endif
{
if (m_sockfd == -1)
@@ -381,7 +381,7 @@ qint64 KSocketDevice::bytesAvailable() const
return nchars;
}
-TQ_LONG KSocketDevice::waitForMore(int msecs, bool *timeout)
+TQ_LONG TDESocketDevice::waitForMore(int msecs, bool *timeout)
{
if (m_sockfd == -1)
return -1; // there won't ever be anything to read...
@@ -393,7 +393,7 @@ TQ_LONG KSocketDevice::waitForMore(int msecs, bool *timeout)
return bytesAvailable();
}
-static int do_read_common(int sockfd, char *data, TQ_ULONG maxlen, KSocketAddress* from, ssize_t &retval, bool peek = false)
+static int do_read_common(int sockfd, char *data, TQ_ULONG maxlen, TDESocketAddress* from, ssize_t &retval, bool peek = false)
{
socklen_t len;
if (from)
@@ -407,19 +407,19 @@ static int do_read_common(int sockfd, char *data, TQ_ULONG maxlen, KSocketAddres
if (retval == -1)
{
if (errno == EAGAIN || errno == EWOULDBLOCK)
- return KSocketDevice::WouldBlock;
+ return TDESocketDevice::WouldBlock;
else
- return KSocketDevice::UnknownError;
+ return TDESocketDevice::UnknownError;
}
if (retval == 0)
- return KSocketDevice::RemotelyDisconnected;
+ return TDESocketDevice::RemotelyDisconnected;
if (from)
from->setLength(len);
return 0;
}
-TQT_TQIO_LONG KSocketDevice::tqreadBlock(char *data, TQT_TQIO_ULONG maxlen)
+TQT_TQIO_LONG TDESocketDevice::tqreadBlock(char *data, TQT_TQIO_ULONG maxlen)
{
resetError();
if (m_sockfd == -1)
@@ -440,7 +440,7 @@ TQT_TQIO_LONG KSocketDevice::tqreadBlock(char *data, TQT_TQIO_ULONG maxlen)
return retval;
}
-TQT_TQIO_LONG KSocketDevice::tqreadBlock(char *data, TQT_TQIO_ULONG maxlen, KSocketAddress &from)
+TQT_TQIO_LONG TDESocketDevice::tqreadBlock(char *data, TQT_TQIO_ULONG maxlen, TDESocketAddress &from)
{
resetError();
if (m_sockfd == -1)
@@ -461,7 +461,7 @@ TQT_TQIO_LONG KSocketDevice::tqreadBlock(char *data, TQT_TQIO_ULONG maxlen, KSoc
return retval;
}
-TQ_LONG KSocketDevice::peekBlock(char *data, TQ_ULONG maxlen)
+TQ_LONG TDESocketDevice::peekBlock(char *data, TQ_ULONG maxlen)
{
resetError();
if (m_sockfd == -1)
@@ -482,7 +482,7 @@ TQ_LONG KSocketDevice::peekBlock(char *data, TQ_ULONG maxlen)
return retval;
}
-TQ_LONG KSocketDevice::peekBlock(char *data, TQ_ULONG maxlen, KSocketAddress& from)
+TQ_LONG TDESocketDevice::peekBlock(char *data, TQ_ULONG maxlen, TDESocketAddress& from)
{
resetError();
if (m_sockfd == -1)
@@ -503,12 +503,12 @@ TQ_LONG KSocketDevice::peekBlock(char *data, TQ_ULONG maxlen, KSocketAddress& fr
return retval;
}
-TQT_TQIO_LONG KSocketDevice::tqwriteBlock(const char *data, TQT_TQIO_ULONG len)
+TQT_TQIO_LONG TDESocketDevice::tqwriteBlock(const char *data, TQT_TQIO_ULONG len)
{
- return tqwriteBlock(data, len, KSocketAddress());
+ return tqwriteBlock(data, len, TDESocketAddress());
}
-TQT_TQIO_LONG KSocketDevice::tqwriteBlock(const char *data, TQT_TQIO_ULONG len, const KSocketAddress& to)
+TQT_TQIO_LONG TDESocketDevice::tqwriteBlock(const char *data, TQT_TQIO_ULONG len, const TDESocketAddress& to)
{
resetError();
if (m_sockfd == -1)
@@ -532,20 +532,20 @@ TQT_TQIO_LONG KSocketDevice::tqwriteBlock(const char *data, TQT_TQIO_ULONG len,
return retval;
}
-KSocketAddress KSocketDevice::localAddress() const
+TDESocketAddress TDESocketDevice::localAddress() const
{
if (m_sockfd == -1)
- return KSocketAddress(); // not open, empty value
+ return TDESocketAddress(); // not open, empty value
if (d->local.family() != AF_UNSPEC)
return d->local;
socklen_t len;
- KSocketAddress localAddress;
+ TDESocketAddress localAddress;
localAddress.setLength(len = 32); // arbitrary value
if (kde_getsockname(m_sockfd, localAddress.address(), &len) == -1)
// error!
- return d->local = KSocketAddress();
+ return d->local = TDESocketAddress();
#ifdef HAVE_STRUCT_SOCKADDR_SA_LEN
len = localAddress.address()->sa_len;
@@ -563,25 +563,25 @@ KSocketAddress KSocketDevice::localAddress() const
localAddress.setLength(len);
if (kde_getsockname(m_sockfd, localAddress.address(), &len) == -1)
// error!
- return d->local = KSocketAddress();
+ return d->local = TDESocketAddress();
return d->local = localAddress;
}
-KSocketAddress KSocketDevice::peerAddress() const
+TDESocketAddress TDESocketDevice::peerAddress() const
{
if (m_sockfd == -1)
- return KSocketAddress(); // not open, empty value
+ return TDESocketAddress(); // not open, empty value
if (d->peer.family() != AF_UNSPEC)
return d->peer;
socklen_t len;
- KSocketAddress peerAddress;
+ TDESocketAddress peerAddress;
peerAddress.setLength(len = 32); // arbitrary value
if (kde_getpeername(m_sockfd, peerAddress.address(), &len) == -1)
// error!
- return d->peer = KSocketAddress();
+ return d->peer = TDESocketAddress();
#ifdef HAVE_STRUCT_SOCKADDR_SA_LEN
len = peerAddress.address()->sa_len;
@@ -599,19 +599,19 @@ KSocketAddress KSocketDevice::peerAddress() const
peerAddress.setLength(len);
if (kde_getpeername(m_sockfd, peerAddress.address(), &len) == -1)
// error!
- return d->peer = KSocketAddress();
+ return d->peer = TDESocketAddress();
return d->peer = peerAddress;
}
-KSocketAddress KSocketDevice::externalAddress() const
+TDESocketAddress TDESocketDevice::externalAddress() const
{
// for normal sockets, the externally visible address is the same
// as the local address
return localAddress();
}
-TQSocketNotifier* KSocketDevice::readNotifier() const
+TQSocketNotifier* TDESocketDevice::readNotifier() const
{
if (d->input)
return d->input;
@@ -629,7 +629,7 @@ TQSocketNotifier* KSocketDevice::readNotifier() const
return d->input = createNotifier(TQSocketNotifier::Read);
}
-TQSocketNotifier* KSocketDevice::writeNotifier() const
+TQSocketNotifier* TDESocketDevice::writeNotifier() const
{
if (d->output)
return d->output;
@@ -647,7 +647,7 @@ TQSocketNotifier* KSocketDevice::writeNotifier() const
return d->output = createNotifier(TQSocketNotifier::Write);
}
-TQSocketNotifier* KSocketDevice::exceptionNotifier() const
+TQSocketNotifier* TDESocketDevice::exceptionNotifier() const
{
if (d->exception)
return d->exception;
@@ -665,7 +665,7 @@ TQSocketNotifier* KSocketDevice::exceptionNotifier() const
return d->exception = createNotifier(TQSocketNotifier::Exception);
}
-bool KSocketDevice::poll(bool *input, bool *output, bool *exception,
+bool TDESocketDevice::poll(bool *input, bool *output, bool *exception,
int timeout, bool* timedout)
{
if (m_sockfd == -1)
@@ -787,13 +787,13 @@ bool KSocketDevice::poll(bool *input, bool *output, bool *exception,
#endif
}
-bool KSocketDevice::poll(int timeout, bool *timedout)
+bool TDESocketDevice::poll(int timeout, bool *timedout)
{
bool input, output, exception;
return poll(&input, &output, &exception, timeout, timedout);
}
-TQSocketNotifier* KSocketDevice::createNotifier(TQSocketNotifier::Type type) const
+TQSocketNotifier* TDESocketDevice::createNotifier(TQSocketNotifier::Type type) const
{
if (m_sockfd == -1)
return 0L;
@@ -836,14 +836,14 @@ namespace
};
}
-static KSocketDeviceFactoryBase* defaultImplFactory;
+static TDESocketDeviceFactoryBase* defaultImplFactory;
static TQMutex defaultImplFactoryMutex;
-typedef TQMap<int, KSocketDeviceFactoryBase* > factoryMap;
+typedef TQMap<int, TDESocketDeviceFactoryBase* > factoryMap;
static factoryMap factories;
-KSocketDevice* KSocketDevice::createDefault(KSocketBase* parent)
+TDESocketDevice* TDESocketDevice::createDefault(TDESocketBase* parent)
{
- KSocketDevice* device = dynamic_cast<KSocketDevice*>(parent);
+ TDESocketDevice* device = dynamic_cast<TDESocketDevice*>(parent);
if (device != 0L)
return device;
@@ -853,12 +853,12 @@ KSocketDevice* KSocketDevice::createDefault(KSocketBase* parent)
return defaultImplFactory->create(parent);
// the really default
- return new KSocketDevice(parent);
+ return new TDESocketDevice(parent);
}
-KSocketDevice* KSocketDevice::createDefault(KSocketBase* parent, int capabilities)
+TDESocketDevice* TDESocketDevice::createDefault(TDESocketBase* parent, int capabilities)
{
- KSocketDevice* device = dynamic_cast<KSocketDevice*>(parent);
+ TDESocketDevice* device = dynamic_cast<TDESocketDevice*>(parent);
if (device != 0L)
return device;
@@ -872,16 +872,16 @@ KSocketDevice* KSocketDevice::createDefault(KSocketBase* parent, int capabilitie
return 0L; // no default
}
-KSocketDeviceFactoryBase*
-KSocketDevice::setDefaultImpl(KSocketDeviceFactoryBase* factory)
+TDESocketDeviceFactoryBase*
+TDESocketDevice::setDefaultImpl(TDESocketDeviceFactoryBase* factory)
{
TQMutexLocker locker(&defaultImplFactoryMutex);
- KSocketDeviceFactoryBase* old = defaultImplFactory;
+ TDESocketDeviceFactoryBase* old = defaultImplFactory;
defaultImplFactory = factory;
return old;
}
-void KSocketDevice::addNewImpl(KSocketDeviceFactoryBase* factory, int capabilities)
+void TDESocketDevice::addNewImpl(TDESocketDeviceFactoryBase* factory, int capabilities)
{
TQMutexLocker locker(&defaultImplFactoryMutex);
if (factories.contains(capabilities))
diff --git a/tdecore/network/tdesocketdevice.h b/tdecore/network/tdesocketdevice.h
index 10856716d..52fe18709 100644
--- a/tdecore/network/tdesocketdevice.h
+++ b/tdecore/network/tdesocketdevice.h
@@ -30,32 +30,32 @@
namespace KNetwork {
-class KSocketDevice;
-class KSocketDeviceFactoryBase;
+class TDESocketDevice;
+class TDESocketDeviceFactoryBase;
-class KSocketDevicePrivate;
-/** @class KSocketDevice tdesocketdevice.h tdesocketdevice.h
+class TDESocketDevicePrivate;
+/** @class TDESocketDevice tdesocketdevice.h tdesocketdevice.h
* @brief Low-level socket functionality.
*
* This class provides low-level socket functionality.
*
* Most users will prefer "cooked" interfaces like those of @ref KStreamSocket or
- * @ref KServerSocket.
+ * @ref TDEServerSocket.
*
* Descended classes from this one provide some other kinds of socket functionality,
* like proxying or specific socket types.
*
* @author Thiago Macieira <thiago.macieira@kdemail.net>
*/
-class TDECORE_EXPORT KSocketDevice: public KActiveSocketBase, public KPassiveSocketBase
+class TDECORE_EXPORT TDESocketDevice: public KActiveSocketBase, public KPassiveSocketBase
{
public:
/**
* Capabilities for the socket implementation.
*
- * KSocketDevice-derived classes can implement certain capabilities that are not
+ * TDESocketDevice-derived classes can implement certain capabilities that are not
* available in the default class. These capabilities are described by these flags.
- * The default KSocketDevice class has none of these capabilities.
+ * The default TDESocketDevice class has none of these capabilities.
*
* For the negative capabilities (inabilities, the CanNot* forms), when a capability
* is not present, the implementation will default to the original behaviour.
@@ -101,7 +101,7 @@ public:
* The parameter is used to specify which socket this object is used as
* a device for.
*/
- explicit KSocketDevice(const KSocketBase* = 0L);
+ explicit TDESocketDevice(const TDESocketBase* = 0L);
/**
* Constructs a new object around an already-open socket.
@@ -109,12 +109,12 @@ public:
* Note: you should write programs that create sockets through
* the classes whenever possible.
*/
- explicit KSocketDevice(int fd);
+ explicit TDESocketDevice(int fd);
/**
* Destructor. This closes the socket if it's open.
*/
- virtual ~KSocketDevice();
+ virtual ~TDESocketDevice();
/**
* Returns the file descriptor for this socket.
@@ -186,9 +186,9 @@ public:
/**
* Accepts a new incoming connection.
- * Note: this function returns a socket of type KSocketDevice.
+ * Note: this function returns a socket of type TDESocketDevice.
*/
- virtual KSocketDevice* accept();
+ virtual TDESocketDevice* accept();
/**
* Disconnects this socket.
@@ -221,7 +221,7 @@ public:
/**
* Reads data and the source address from this socket.
*/
- virtual TQT_TQIO_LONG tqreadBlock(char *data, TQT_TQIO_ULONG maxlen, KSocketAddress& from);
+ virtual TQT_TQIO_LONG tqreadBlock(char *data, TQT_TQIO_ULONG maxlen, TDESocketAddress& from);
/**
* Peeks data in the socket.
@@ -231,7 +231,7 @@ public:
/**
* Peeks the data in the socket and the source address.
*/
- virtual TQ_LONG peekBlock(char *data, TQ_ULONG maxlen, KSocketAddress& from);
+ virtual TQ_LONG peekBlock(char *data, TQ_ULONG maxlen, TDESocketAddress& from);
/**
* Writes data to the socket.
@@ -241,18 +241,18 @@ public:
/**
* Writes the given data to the given destination address.
*/
- virtual TQT_TQIO_LONG tqwriteBlock(const char *data, TQT_TQIO_ULONG len, const KSocketAddress& to);
+ virtual TQT_TQIO_LONG tqwriteBlock(const char *data, TQT_TQIO_ULONG len, const TDESocketAddress& to);
/**
* Returns this socket's local address.
*/
- virtual KSocketAddress localAddress() const;
+ virtual TDESocketAddress localAddress() const;
/**
* Returns this socket's peer address. If this implementation does proxying
* of some sort, this is the real external address, not the proxy's address.
*/
- virtual KSocketAddress peerAddress() const;
+ virtual TDESocketAddress peerAddress() const;
/**
* Returns this socket's externally visible local address.
@@ -265,10 +265,10 @@ public:
* addresses different from the local socket values. The default implementation
* returns the same value as @ref localAddress.
*
- * @note This function may return an empty KSocketAddress. In that case, the
+ * @note This function may return an empty TDESocketAddress. In that case, the
* externally visible address could/can not be determined.
*/
- virtual KSocketAddress externalAddress() const;
+ virtual TDESocketAddress externalAddress() const;
/**
* Returns a socket notifier for input on this socket.
@@ -337,7 +337,7 @@ protected:
*
* @param parent the parent, if any
*/
- KSocketDevice(bool, const KSocketBase* parent = 0L);
+ TDESocketDevice(bool, const TDESocketBase* parent = 0L);
/**
* Creates a socket notifier of the given type.
@@ -358,16 +358,16 @@ protected:
public:
/**
- * Creates a new default KSocketDevice object given
+ * Creates a new default TDESocketDevice object given
* the parent object.
*
* The capabilities flag indicates the desired capabilities the object being
* created should possess. Those capabilities are not guaranteed: if no factory
* can provide such an object, a default object will be created.
*
- * @param parent the KSocketBase parent
+ * @param parent the TDESocketBase parent
*/
- static KSocketDevice* createDefault(KSocketBase* parent);
+ static TDESocketDevice* createDefault(TDESocketBase* parent);
/**
* @overload
@@ -377,40 +377,40 @@ public:
* @param parent the parent
* @param capabilities the requested capabilities
*/
- static KSocketDevice* createDefault(KSocketBase* parent, int capabilities);
+ static TDESocketDevice* createDefault(TDESocketBase* parent, int capabilities);
/**
- * Sets the default KSocketDevice implementation to use and
+ * Sets the default TDESocketDevice implementation to use and
* return the old factory.
*
* @param factory the factory object for the implementation
*/
- static KSocketDeviceFactoryBase* setDefaultImpl(KSocketDeviceFactoryBase* factory);
+ static TDESocketDeviceFactoryBase* setDefaultImpl(TDESocketDeviceFactoryBase* factory);
/**
- * Adds a factory of KSocketDevice objects to the list, along with its
+ * Adds a factory of TDESocketDevice objects to the list, along with its
* capabilities flag.
*/
- static void addNewImpl(KSocketDeviceFactoryBase* factory, int capabilities);
+ static void addNewImpl(TDESocketDeviceFactoryBase* factory, int capabilities);
private:
- KSocketDevice(const KSocketDevice&);
- KSocketDevice& operator=(const KSocketDevice&);
+ TDESocketDevice(const TDESocketDevice&);
+ TDESocketDevice& operator=(const TDESocketDevice&);
- KSocketDevicePrivate *d;
+ TDESocketDevicePrivate *d;
};
/** @internal
* This class provides functionality for creating and registering
* socket implementations.
*/
-class KSocketDeviceFactoryBase
+class TDESocketDeviceFactoryBase
{
public:
- KSocketDeviceFactoryBase() {}
- virtual ~KSocketDeviceFactoryBase() {}
+ TDESocketDeviceFactoryBase() {}
+ virtual ~TDESocketDeviceFactoryBase() {}
- virtual KSocketDevice* create(KSocketBase*) const = 0;
+ virtual TDESocketDevice* create(TDESocketBase*) const = 0;
};
/**
@@ -418,13 +418,13 @@ public:
* socket implementations.
*/
template<class Impl>
-class KSocketDeviceFactory: public KSocketDeviceFactoryBase
+class TDESocketDeviceFactory: public TDESocketDeviceFactoryBase
{
public:
- KSocketDeviceFactory() {}
- virtual ~KSocketDeviceFactory() {}
+ TDESocketDeviceFactory() {}
+ virtual ~TDESocketDeviceFactory() {}
- virtual KSocketDevice* create(KSocketBase* parent) const
+ virtual TDESocketDevice* create(TDESocketBase* parent) const
{ return new Impl(parent); }
};
diff --git a/tdecore/networkbackends/network-manager/network-manager.cpp b/tdecore/networkbackends/network-manager/network-manager.cpp
index 8dc501590..d747b61ae 100644
--- a/tdecore/networkbackends/network-manager/network-manager.cpp
+++ b/tdecore/networkbackends/network-manager/network-manager.cpp
@@ -20,7 +20,7 @@
#include <tqdbusmessage.h>
-#include "kconfig.h"
+#include "tdeconfig.h"
#include "tdehardwaredevices.h"
#include "network-manager.h"
@@ -1299,7 +1299,7 @@ TQString macAddressForGenericDevice(TQT_DBusObjectPath path) {
}
TQString tdeDeviceUUIDForMACAddress(TQString macAddress) {
- TDEHardwareDevices *hwdevices = KGlobal::hardwareDevices();
+ TDEHardwareDevices *hwdevices = TDEGlobal::hardwareDevices();
if (!hwdevices) {
return TQString::null;
}
@@ -4828,10 +4828,10 @@ TDENetworkVPNTypeList TDENetworkConnectionManager_BackendNM::availableVPNTypes()
// read in all available Services
for (TQStringList::Iterator i = services.begin (); i != services.end (); ++i) {
TQString service = NM_PLUGIN_SERVICE_DIR + TQString ("/") + *i;
- KConfig* kconfig = new KConfig (service, true, true, "config");
- kconfig->setGroup ("VPN Connection");
+ TDEConfig* tdeconfig = new TDEConfig (service, true, true, "config");
+ tdeconfig->setGroup ("VPN Connection");
- TQString serviceName = kconfig->readEntry("name", TQString());
+ TQString serviceName = tdeconfig->readEntry("name", TQString());
serviceName = serviceName.lower();
if (serviceName == "openvpn") {
@@ -4847,7 +4847,7 @@ TDENetworkVPNTypeList TDENetworkConnectionManager_BackendNM::availableVPNTypes()
ret.append(TDENetworkVPNType::VPNC);
}
- delete kconfig;
+ delete tdeconfig;
}
}
diff --git a/tdecore/networkbackends/network-manager/network-manager_p.h b/tdecore/networkbackends/network-manager/network-manager_p.h
index 474f628bb..0e1fe4de8 100644
--- a/tdecore/networkbackends/network-manager/network-manager_p.h
+++ b/tdecore/networkbackends/network-manager/network-manager_p.h
@@ -27,7 +27,7 @@
/* TDE headers */
#include <kdebug.h>
-#include <klocale.h>
+#include <tdelocale.h>
/* TQDbus headers */
#include <tqdbusconnection.h>
diff --git a/tdecore/tde-config.cpp.cmake b/tdecore/tde-config.cpp.cmake
index 0afbd9422..36e752f33 100644
--- a/tdecore/tde-config.cpp.cmake
+++ b/tdecore/tde-config.cpp.cmake
@@ -1,19 +1,19 @@
// -*- c++ -*-
-#include <kcmdlineargs.h>
-#include <klocale.h>
+#include <tdecmdlineargs.h>
+#include <tdelocale.h>
#include <kinstance.h>
#include <kstandarddirs.h>
-#include <kglobal.h>
-#include <kglobalsettings.h>
+#include <tdeglobal.h>
+#include <tdeglobalsettings.h>
#include <stdio.h>
-#include <kaboutdata.h>
+#include <tdeaboutdata.h>
#include <config.h>
-#include <kapplication.h>
+#include <tdeapplication.h>
static const char *description = I18N_NOOP("A little program to output installation paths");
-static KCmdLineOptions options[] =
+static TDECmdLineOptions options[] =
{
{ "expandvars", I18N_NOOP("expand ${prefix} and ${exec_prefix} in output"), 0 },
{ "prefix", I18N_NOOP("Compiled in prefix for TDE libraries"), 0 },
@@ -113,19 +113,19 @@ void printResult(const TQString &s)
int main(int argc, char **argv)
{
- KLocale::setMainCatalogue("tdelibs");
- KAboutData about("tde-config", "tde-config", "1.0", description, KAboutData::License_GPL, "(C) 2000 Stephan Kulow");
- KCmdLineArgs::init( argc, argv, &about);
+ TDELocale::setMainCatalogue("tdelibs");
+ TDEAboutData about("tde-config", "tde-config", "1.0", description, TDEAboutData::License_GPL, "(C) 2000 Stephan Kulow");
+ TDECmdLineArgs::init( argc, argv, &about);
- KCmdLineArgs::addCmdLineOptions( options ); // Add my own options.
+ TDECmdLineArgs::addCmdLineOptions( options ); // Add my own options.
- KInstance a("tde-config");
+ TDEInstance a("tde-config");
a.setConfigReadOnly(TRUE);
- (void)KGlobal::dirs(); // trigger the creation
- (void)KGlobal::config();
+ (void)TDEGlobal::dirs(); // trigger the creation
+ (void)TDEGlobal::config();
// Get application specific arguments
- KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
+ TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
_expandvars = args->isSet("expandvars");
@@ -151,7 +151,7 @@ int main(int argc, char **argv)
if (args->isSet("localprefix"))
{
- printResult(KGlobal::dirs()->localtdedir());
+ printResult(TDEGlobal::dirs()->localtdedir());
return 0;
}
@@ -163,7 +163,7 @@ int main(int argc, char **argv)
if (args->isSet("types"))
{
- TQStringList types = KGlobal::dirs()->allTypes();
+ TQStringList types = TDEGlobal::dirs()->allTypes();
types.sort();
const char *helptexts[] = {
"apps", I18N_NOOP("Applications menu (.desktop files)"),
@@ -176,7 +176,7 @@ int main(int argc, char **argv)
"kcfg", I18N_NOOP("Configuration description files"),
"lib", I18N_NOOP("Libraries"),
"include", I18N_NOOP("Includes/Headers"),
- "locale", I18N_NOOP("Translation files for KLocale"),
+ "locale", I18N_NOOP("Translation files for TDELocale"),
"mime", I18N_NOOP("Mime types"),
"module", I18N_NOOP("Loadable modules"),
"qtplugins", I18N_NOOP("Qt plugins"),
@@ -211,7 +211,7 @@ int main(int argc, char **argv)
TQString type = args->getOption("path");
if (!type.isEmpty())
{
- printResult(KGlobal::dirs()->resourceDirs(type.latin1()).join(":"));
+ printResult(TDEGlobal::dirs()->resourceDirs(type.latin1()).join(":"));
return 0;
}
@@ -219,13 +219,13 @@ int main(int argc, char **argv)
if (!type.isEmpty())
{
if ( type == "desktop" )
- printResult(KGlobalSettings::desktopPath());
+ printResult(TDEGlobalSettings::desktopPath());
else if ( type == "autostart" )
- printResult(KGlobalSettings::autostartPath());
+ printResult(TDEGlobalSettings::autostartPath());
else if ( type == "trash" )
- printResult(KGlobalSettings::trashPath());
+ printResult(TDEGlobalSettings::trashPath());
else if ( type == "document" )
- printResult(KGlobalSettings::documentPath());
+ printResult(TDEGlobalSettings::documentPath());
else
fprintf(stderr, "%s", i18n("%1 - unknown type of userpath\n").arg(type).local8Bit().data() );
return 0;
diff --git a/tdecore/tde-config.cpp.in b/tdecore/tde-config.cpp.in
index c988b000e..f86e5f5db 100644
--- a/tdecore/tde-config.cpp.in
+++ b/tdecore/tde-config.cpp.in
@@ -1,19 +1,19 @@
// -*- c++ -*-
-#include <kcmdlineargs.h>
-#include <klocale.h>
+#include <tdecmdlineargs.h>
+#include <tdelocale.h>
#include <kinstance.h>
#include <kstandarddirs.h>
-#include <kglobal.h>
-#include <kglobalsettings.h>
+#include <tdeglobal.h>
+#include <tdeglobalsettings.h>
#include <stdio.h>
-#include <kaboutdata.h>
+#include <tdeaboutdata.h>
#include <config.h>
-#include <kapplication.h>
+#include <tdeapplication.h>
static const char *description = I18N_NOOP("A little program to output installation paths");
-static KCmdLineOptions options[] =
+static TDECmdLineOptions options[] =
{
{ "expandvars", I18N_NOOP("expand ${prefix} and ${exec_prefix} in output"), 0 },
{ "prefix", I18N_NOOP("Compiled in prefix for TDE libraries"), 0 },
@@ -113,19 +113,19 @@ void printResult(const TQString &s)
int main(int argc, char **argv)
{
- KLocale::setMainCatalogue("tdelibs");
- KAboutData about("tde-config", "tde-config", "1.0", description, KAboutData::License_GPL, "(C) 2000 Stephan Kulow");
- KCmdLineArgs::init( argc, argv, &about);
+ TDELocale::setMainCatalogue("tdelibs");
+ TDEAboutData about("tde-config", "tde-config", "1.0", description, TDEAboutData::License_GPL, "(C) 2000 Stephan Kulow");
+ TDECmdLineArgs::init( argc, argv, &about);
- KCmdLineArgs::addCmdLineOptions( options ); // Add my own options.
+ TDECmdLineArgs::addCmdLineOptions( options ); // Add my own options.
- KInstance a("tde-config");
+ TDEInstance a("tde-config");
a.setConfigReadOnly(TRUE);
- (void)KGlobal::dirs(); // trigger the creation
- (void)KGlobal::config();
+ (void)TDEGlobal::dirs(); // trigger the creation
+ (void)TDEGlobal::config();
// Get application specific arguments
- KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
+ TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
_expandvars = args->isSet("expandvars");
@@ -151,7 +151,7 @@ int main(int argc, char **argv)
if (args->isSet("localprefix"))
{
- printResult(KGlobal::dirs()->localtdedir());
+ printResult(TDEGlobal::dirs()->localtdedir());
return 0;
}
@@ -163,7 +163,7 @@ int main(int argc, char **argv)
if (args->isSet("types"))
{
- TQStringList types = KGlobal::dirs()->allTypes();
+ TQStringList types = TDEGlobal::dirs()->allTypes();
types.sort();
const char *helptexts[] = {
"apps", I18N_NOOP("Applications menu (.desktop files)"),
@@ -176,7 +176,7 @@ int main(int argc, char **argv)
"kcfg", I18N_NOOP("Configuration description files"),
"lib", I18N_NOOP("Libraries"),
"include", I18N_NOOP("Includes/Headers"),
- "locale", I18N_NOOP("Translation files for KLocale"),
+ "locale", I18N_NOOP("Translation files for TDELocale"),
"mime", I18N_NOOP("Mime types"),
"module", I18N_NOOP("Loadable modules"),
"qtplugins", I18N_NOOP("Qt plugins"),
@@ -210,7 +210,7 @@ int main(int argc, char **argv)
TQString type = args->getOption("path");
if (!type.isEmpty())
{
- printResult(KGlobal::dirs()->resourceDirs(type.latin1()).join(":"));
+ printResult(TDEGlobal::dirs()->resourceDirs(type.latin1()).join(":"));
return 0;
}
@@ -218,13 +218,13 @@ int main(int argc, char **argv)
if (!type.isEmpty())
{
if ( type == "desktop" )
- printResult(KGlobalSettings::desktopPath());
+ printResult(TDEGlobalSettings::desktopPath());
else if ( type == "autostart" )
- printResult(KGlobalSettings::autostartPath());
+ printResult(TDEGlobalSettings::autostartPath());
else if ( type == "trash" )
- printResult(KGlobalSettings::trashPath());
+ printResult(TDEGlobalSettings::trashPath());
else if ( type == "document" )
- printResult(KGlobalSettings::documentPath());
+ printResult(TDEGlobalSettings::documentPath());
else
fprintf(stderr, "%s", TQString(i18n("%1 - unknown type of userpath\n").arg(type)).local8Bit().data() );
return 0;
diff --git a/tdecore/kaboutdata.cpp b/tdecore/tdeaboutdata.cpp
index 00d75225b..bf8538152 100644
--- a/tdecore/kaboutdata.cpp
+++ b/tdecore/tdeaboutdata.cpp
@@ -20,19 +20,19 @@
*/
-#include <kaboutdata.h>
+#include <tdeaboutdata.h>
#include <kstandarddirs.h>
#include <tqfile.h>
#include <tqtextstream.h>
TQString
-KAboutPerson::name() const
+TDEAboutPerson::name() const
{
return TQString::fromUtf8(mName);
}
TQString
-KAboutPerson::task() const
+TDEAboutPerson::task() const
{
if (mTask && *mTask)
return i18n(mTask);
@@ -41,40 +41,40 @@ KAboutPerson::task() const
}
TQString
-KAboutPerson::emailAddress() const
+TDEAboutPerson::emailAddress() const
{
return TQString::fromUtf8(mEmailAddress);
}
TQString
-KAboutPerson::webAddress() const
+TDEAboutPerson::webAddress() const
{
return TQString::fromUtf8(mWebAddress);
}
-KAboutTranslator::KAboutTranslator(const TQString & name,
+TDEAboutTranslator::TDEAboutTranslator(const TQString & name,
const TQString & emailAddress)
{
mName=name;
mEmail=emailAddress;
}
-TQString KAboutTranslator::name() const
+TQString TDEAboutTranslator::name() const
{
return mName;
}
-TQString KAboutTranslator::emailAddress() const
+TQString TDEAboutTranslator::emailAddress() const
{
return mEmail;
}
-class KAboutDataPrivate
+class TDEAboutDataPrivate
{
public:
- KAboutDataPrivate()
+ TDEAboutDataPrivate()
: translatorName("_: NAME OF TRANSLATORS\nYour names")
, translatorEmail("_: EMAIL OF TRANSLATORS\nYour emails")
, productName(0)
@@ -82,7 +82,7 @@ public:
, customAuthorTextEnabled(false)
, mTranslatedProgramName( 0 )
{}
- ~KAboutDataPrivate()
+ ~TDEAboutDataPrivate()
{
delete programLogo;
delete[] mTranslatedProgramName;
@@ -96,9 +96,9 @@ public:
const char *mTranslatedProgramName;
};
-const char *KAboutData::defaultBugTracker = "http://bugs.trinitydesktop.org";
+const char *TDEAboutData::defaultBugTracker = "http://bugs.trinitydesktop.org";
-KAboutData::KAboutData( const char *appName,
+TDEAboutData::TDEAboutData( const char *appName,
const char *programName,
const char *version,
const char *shortDescription,
@@ -118,7 +118,7 @@ KAboutData::KAboutData( const char *appName,
mBugEmailAddress( (bugsEmailAddress!=0)?bugsEmailAddress:defaultBugTracker ),
mLicenseText (0)
{
- d = new KAboutDataPrivate;
+ d = new TDEAboutDataPrivate;
if( appName ) {
const char *p = strrchr(appName, '/');
@@ -130,7 +130,7 @@ KAboutData::KAboutData( const char *appName,
mAppName = 0;
}
-KAboutData::~KAboutData()
+TDEAboutData::~TDEAboutData()
{
if (mLicenseKey == License_File)
delete [] mLicenseText;
@@ -138,109 +138,109 @@ KAboutData::~KAboutData()
}
void
-KAboutData::addAuthor( const char *name, const char *task,
+TDEAboutData::addAuthor( const char *name, const char *task,
const char *emailAddress, const char *webAddress )
{
- mAuthorList.append(KAboutPerson(name,task,emailAddress,webAddress));
+ mAuthorList.append(TDEAboutPerson(name,task,emailAddress,webAddress));
}
void
-KAboutData::addCredit( const char *name, const char *task,
+TDEAboutData::addCredit( const char *name, const char *task,
const char *emailAddress, const char *webAddress )
{
- mCreditList.append(KAboutPerson(name,task,emailAddress,webAddress));
+ mCreditList.append(TDEAboutPerson(name,task,emailAddress,webAddress));
}
void
-KAboutData::setTranslator( const char *name, const char *emailAddress)
+TDEAboutData::setTranslator( const char *name, const char *emailAddress)
{
d->translatorName=name;
d->translatorEmail=emailAddress;
}
void
-KAboutData::setLicenseText( const char *licenseText )
+TDEAboutData::setLicenseText( const char *licenseText )
{
mLicenseText = licenseText;
mLicenseKey = License_Custom;
}
void
-KAboutData::setLicenseTextFile( const TQString &file )
+TDEAboutData::setLicenseTextFile( const TQString &file )
{
mLicenseText = tqstrdup(TQFile::encodeName(file));
mLicenseKey = License_File;
}
void
-KAboutData::setAppName( const char *appName )
+TDEAboutData::setAppName( const char *appName )
{
mAppName = appName;
}
void
-KAboutData::setProgramName( const char* programName )
+TDEAboutData::setProgramName( const char* programName )
{
mProgramName = programName;
translateInternalProgramName();
}
void
-KAboutData::setVersion( const char* version )
+TDEAboutData::setVersion( const char* version )
{
mVersion = version;
}
void
-KAboutData::setShortDescription( const char *shortDescription )
+TDEAboutData::setShortDescription( const char *shortDescription )
{
mShortDescription = shortDescription;
}
void
-KAboutData::setLicense( LicenseKey licenseKey)
+TDEAboutData::setLicense( LicenseKey licenseKey)
{
mLicenseKey = licenseKey;
}
void
-KAboutData::setCopyrightStatement( const char *copyrightStatement )
+TDEAboutData::setCopyrightStatement( const char *copyrightStatement )
{
mCopyrightStatement = copyrightStatement;
}
void
-KAboutData::setOtherText( const char *otherText )
+TDEAboutData::setOtherText( const char *otherText )
{
mOtherText = otherText;
}
void
-KAboutData::setHomepage( const char *homepage )
+TDEAboutData::setHomepage( const char *homepage )
{
mHomepageAddress = homepage;
}
void
-KAboutData::setBugAddress( const char *bugAddress )
+TDEAboutData::setBugAddress( const char *bugAddress )
{
mBugEmailAddress = bugAddress;
}
void
-KAboutData::setProductName( const char *productName )
+TDEAboutData::setProductName( const char *productName )
{
d->productName = productName;
}
const char *
-KAboutData::appName() const
+TDEAboutData::appName() const
{
return mAppName;
}
const char *
-KAboutData::productName() const
+TDEAboutData::productName() const
{
if (d->productName)
return d->productName;
@@ -249,7 +249,7 @@ KAboutData::productName() const
}
TQString
-KAboutData::programName() const
+TDEAboutData::programName() const
{
if (mProgramName && *mProgramName)
return i18n(mProgramName);
@@ -258,7 +258,7 @@ KAboutData::programName() const
}
const char*
-KAboutData::internalProgramName() const
+TDEAboutData::internalProgramName() const
{
if (d->mTranslatedProgramName)
return d->mTranslatedProgramName;
@@ -266,26 +266,26 @@ KAboutData::internalProgramName() const
return mProgramName;
}
-// KCrash should call as few things as possible and should avoid e.g. malloc()
-// because it may deadlock. Since i18n() needs it, when KLocale is available
+// TDECrash should call as few things as possible and should avoid e.g. malloc()
+// because it may deadlock. Since i18n() needs it, when TDELocale is available
// the i18n() call will be done here in advance.
void
-KAboutData::translateInternalProgramName() const
+TDEAboutData::translateInternalProgramName() const
{
delete[] d->mTranslatedProgramName;
d->mTranslatedProgramName = 0;
- if( KGlobal::locale() )
+ if( TDEGlobal::locale() )
d->mTranslatedProgramName = tqstrdup( programName().utf8());
}
TQImage
-KAboutData::programLogo() const
+TDEAboutData::programLogo() const
{
return d->programLogo ? (*d->programLogo) : TQImage();
}
void
-KAboutData::setProgramLogo(const TQImage& image)
+TDEAboutData::setProgramLogo(const TQImage& image)
{
if (!d->programLogo)
d->programLogo = new TQImage( image );
@@ -294,13 +294,13 @@ KAboutData::setProgramLogo(const TQImage& image)
}
TQString
-KAboutData::version() const
+TDEAboutData::version() const
{
return TQString::fromLatin1(mVersion);
}
TQString
-KAboutData::shortDescription() const
+TDEAboutData::shortDescription() const
{
if (mShortDescription && *mShortDescription)
return i18n(mShortDescription);
@@ -309,33 +309,33 @@ KAboutData::shortDescription() const
}
TQString
-KAboutData::homepage() const
+TDEAboutData::homepage() const
{
return TQString::fromLatin1(mHomepageAddress);
}
TQString
-KAboutData::bugAddress() const
+TDEAboutData::bugAddress() const
{
return TQString::fromLatin1(mBugEmailAddress);
}
-const TQValueList<KAboutPerson>
-KAboutData::authors() const
+const TQValueList<TDEAboutPerson>
+TDEAboutData::authors() const
{
return mAuthorList;
}
-const TQValueList<KAboutPerson>
-KAboutData::credits() const
+const TQValueList<TDEAboutPerson>
+TDEAboutData::credits() const
{
return mCreditList;
}
-const TQValueList<KAboutTranslator>
-KAboutData::translators() const
+const TQValueList<TDEAboutTranslator>
+TDEAboutData::translators() const
{
- TQValueList<KAboutTranslator> personList;
+ TQValueList<TDEAboutTranslator> personList;
if(d->translatorName == 0)
return personList;
@@ -375,14 +375,14 @@ KAboutData::translators() const
TQString name=*nit;
- personList.append(KAboutTranslator(name.stripWhiteSpace(), email.stripWhiteSpace()));
+ personList.append(TDEAboutTranslator(name.stripWhiteSpace(), email.stripWhiteSpace()));
}
return personList;
}
TQString
-KAboutData::aboutTranslationTeam()
+TDEAboutData::aboutTranslationTeam()
{
return i18n("replace this with information about your translation team",
"<p>KDE is translated into many languages thanks to the work "
@@ -393,7 +393,7 @@ KAboutData::aboutTranslationTeam()
}
TQString
-KAboutData::otherText() const
+TDEAboutData::otherText() const
{
if (mOtherText && *mOtherText)
return i18n(mOtherText);
@@ -403,7 +403,7 @@ KAboutData::otherText() const
TQString
-KAboutData::license() const
+TDEAboutData::license() const
{
TQString result;
if (!copyrightStatement().isEmpty())
@@ -466,7 +466,7 @@ KAboutData::license() const
}
TQString
-KAboutData::copyrightStatement() const
+TDEAboutData::copyrightStatement() const
{
if (mCopyrightStatement && *mCopyrightStatement)
return i18n(mCopyrightStatement);
@@ -475,25 +475,25 @@ KAboutData::copyrightStatement() const
}
TQString
-KAboutData::customAuthorPlainText() const
+TDEAboutData::customAuthorPlainText() const
{
return d->customAuthorPlainText;
}
TQString
-KAboutData::customAuthorRichText() const
+TDEAboutData::customAuthorRichText() const
{
return d->customAuthorRichText;
}
bool
-KAboutData::customAuthorTextEnabled() const
+TDEAboutData::customAuthorTextEnabled() const
{
return d->customAuthorTextEnabled;
}
void
-KAboutData::setCustomAuthorText(const TQString &plainText, const TQString &richText)
+TDEAboutData::setCustomAuthorText(const TQString &plainText, const TQString &richText)
{
d->customAuthorPlainText = plainText;
d->customAuthorRichText = richText;
@@ -502,7 +502,7 @@ KAboutData::setCustomAuthorText(const TQString &plainText, const TQString &richT
}
void
-KAboutData::unsetCustomAuthorText()
+TDEAboutData::unsetCustomAuthorText()
{
d->customAuthorPlainText = TQString::null;
d->customAuthorRichText = TQString::null;
diff --git a/tdecore/kaboutdata.h b/tdecore/tdeaboutdata.h
index 525ed3c92..db76287f2 100644
--- a/tdecore/kaboutdata.h
+++ b/tdecore/tdeaboutdata.h
@@ -22,36 +22,36 @@
#include <tqvaluelist.h>
#include <tqstring.h>
#include <tqimage.h>
-#include <klocale.h>
+#include <tdelocale.h>
#ifndef _KABOUTDATA_H_
#define _KABOUTDATA_H_
-class KAboutPersonPrivate;
-class KAboutDataPrivate;
+class TDEAboutPersonPrivate;
+class TDEAboutDataPrivate;
/**
* This structure is used to store information about a person or developer.
* It can store the person's name, a task, an email address and a
* link to a home page. This class is intended for use in the
- * KAboutData class, but it can be used elsewhere as well.
+ * TDEAboutData class, but it can be used elsewhere as well.
* Normally you should at least define the person's name.
*
* Example Usage within a main():
*
* \code
- * KAboutData about("khello", I18N_NOOP("KHello"), "0.1",
+ * TDEAboutData about("khello", I18N_NOOP("KHello"), "0.1",
* I18N_NOOP("A TDE version of Hello, world!"),
- * KAboutData::License_LGPL,
+ * TDEAboutData::License_LGPL,
* I18N_NOOP("Copyright (c) 2003 Developer"));
*
* about.addAuthor("Joe Developer", I18N_NOOP("developer"), "joe@host.com", 0);
* about.addCredit("Joe User", I18N_NOOP("A lot of bug reports"),
* "joe.user@host.org", 0);
- * KCmdLineArgs::init(argc, argv, &about);
+ * TDECmdLineArgs::init(argc, argv, &about);
* \endcode
*/
-class TDECORE_EXPORT KAboutPerson
+class TDECORE_EXPORT TDEAboutPerson
{
public:
/**
@@ -67,7 +67,7 @@ public:
*
* @param webAddress Home page of the person.
*/
- KAboutPerson( const char *name, const char *task,
+ TDEAboutPerson( const char *name, const char *task,
const char *emailAddress, const char *webAddress )
{
mName = name;
@@ -79,7 +79,7 @@ public:
* @internal
* Don't use. Required by QValueList
*/
- KAboutPerson() {}
+ TDEAboutPerson() {}
/**
* The person's name
@@ -115,23 +115,23 @@ private:
const char *mEmailAddress;
const char *mWebAddress;
- KAboutPersonPrivate *d;
+ TDEAboutPersonPrivate *d;
};
-class KAboutTranslatorPrivate;
+class TDEAboutTranslatorPrivate;
/**
* This structure is used to store information about a translator.
* It can store the translator's name and an email address.
- * This class is intended for use in the KAboutData class,
+ * This class is intended for use in the TDEAboutData class,
* but it can be used elsewhere as well.
* Normally you should at least define the translator's name.
*
- * It's not possible to use KAboutPerson for this, because
- * KAboutPerson stores internally only const char* pointers, but the
+ * It's not possible to use TDEAboutPerson for this, because
+ * TDEAboutPerson stores internally only const char* pointers, but the
* translator information is generated dynamically from the translation
* of a dummy string.
*/
-class TDECORE_EXPORT KAboutTranslator
+class TDECORE_EXPORT TDEAboutTranslator
{
public:
/**
@@ -141,7 +141,7 @@ public:
*
* @param emailAddress The email address of the person.
*/
- KAboutTranslator(const TQString & name=TQString::null,
+ TDEAboutTranslator(const TQString & name=TQString::null,
const TQString & emailAddress=TQString::null);
/**
@@ -161,7 +161,7 @@ public:
private:
TQString mName;
TQString mEmail;
- KAboutTranslatorPrivate* d;
+ TDEAboutTranslatorPrivate* d;
};
@@ -169,17 +169,17 @@ private:
* This class is used to store information about a program. It can store
* such values as version number, program name, home page, email address
* for bug reporting, multiple authors and contributors
- * (using KAboutPerson), license and copyright information.
+ * (using TDEAboutPerson), license and copyright information.
*
* Currently, the values set here are shown by the "About" box
- * (see KAboutDialog), used by the bug report dialog (see KBugReport),
- * and by the help shown on command line (see KCmdLineArgs).
+ * (see TDEAboutDialog), used by the bug report dialog (see KBugReport),
+ * and by the help shown on command line (see TDECmdLineArgs).
*
* @short Holds information needed by the "About" box and other
* classes.
* @author Espen Sand (espen@kde.org), David Faure (faure@kde.org)
*/
-class TDECORE_EXPORT KAboutData
+class TDECORE_EXPORT TDEAboutData
{
public:
/**
@@ -235,7 +235,7 @@ class TDECORE_EXPORT KAboutData
* This defaults to the trinitydesktop.org bug system.
*
*/
- KAboutData( const char *appName,
+ TDEAboutData( const char *appName,
const char *programName,
const char *version,
const char *shortDescription = 0,
@@ -246,7 +246,7 @@ class TDECORE_EXPORT KAboutData
const char *bugsEmailAddress = 0
);
- ~KAboutData();
+ ~TDEAboutData();
/**
* Defines an author. You can call this function as many times you
@@ -318,7 +318,7 @@ class TDECORE_EXPORT KAboutData
*
* @param name the name of the translator
* @param emailAddress the email address of the translator
- * @see KAboutTranslator
+ * @see TDEAboutTranslator
*/
void setTranslator(const char* name, const char* emailAddress);
@@ -521,19 +521,19 @@ class TDECORE_EXPORT KAboutData
* Returns a list of authors.
* @return author information (list of persons).
*/
- const TQValueList<KAboutPerson> authors() const;
+ const TQValueList<TDEAboutPerson> authors() const;
/**
* Returns a list of persons who contributed.
* @return credit information (list of persons).
*/
- const TQValueList<KAboutPerson> credits() const;
+ const TQValueList<TDEAboutPerson> credits() const;
/**
* Returns a list of translators.
* @return translators information (list of persons)
*/
- const TQValueList<KAboutTranslator> translators() const;
+ const TQValueList<TDEAboutTranslator> translators() const;
/**
* Returns a message about the translation team.
@@ -618,12 +618,12 @@ class TDECORE_EXPORT KAboutData
const char *mOtherText;
const char *mHomepageAddress;
const char *mBugEmailAddress;
- TQValueList<KAboutPerson> mAuthorList;
- TQValueList<KAboutPerson> mCreditList;
+ TQValueList<TDEAboutPerson> mAuthorList;
+ TQValueList<TDEAboutPerson> mCreditList;
const char *mLicenseText;
static const char *defaultBugTracker;
- KAboutDataPrivate *d;
+ TDEAboutDataPrivate *d;
};
#endif
diff --git a/tdecore/kaccel.cpp b/tdecore/tdeaccel.cpp
index 52175e2eb..5430c2529 100644
--- a/tdecore/kaccel.cpp
+++ b/tdecore/tdeaccel.cpp
@@ -17,7 +17,7 @@
Boston, MA 02110-1301, USA.
*/
-#include "kaccel.h"
+#include "tdeaccel.h"
#include <tqaccel.h>
#include <tqguardedptr.h>
@@ -26,13 +26,13 @@
#include <tqstring.h>
#include <tqtimer.h>
-#include "kaccelbase.h"
-#include <kapplication.h>
+#include "tdeaccelbase.h"
+#include <tdeapplication.h>
#include <kdebug.h>
-#include <klocale.h>
-#include <kshortcut.h>
+#include <tdelocale.h>
+#include <tdeshortcut.h>
-#include "kaccelprivate.h"
+#include "tdeaccelprivate.h"
#ifdef Q_WS_X11
# include <X11/Xlib.h>
@@ -43,17 +43,17 @@
# endif
#endif
-// TODO: Put in kaccelbase.cpp
+// TODO: Put in tdeaccelbase.cpp
//---------------------------------------------------------------------
-// KAccelEventHandler
+// TDEAccelEventHandler
//---------------------------------------------------------------------
//
-// In KAccelEventHandler::x11Event we do our own X11 keyboard event handling
+// In TDEAccelEventHandler::x11Event we do our own X11 keyboard event handling
// This allows us to map the Win key to Qt::MetaButton, Qt does not know about
// the Win key.
//
-// KAccelEventHandler::x11Event will generate an AccelOverride event. The
-// AccelOverride event is abused a bit to ensure that KAccelPrivate::eventFilter
+// TDEAccelEventHandler::x11Event will generate an AccelOverride event. The
+// AccelOverride event is abused a bit to ensure that TDEAccelPrivate::eventFilter
// (as an event filter on the toplevel widget) will get the key event first
// (in the form of AccelOverride) before any of the intermediate widgets are
// able to process it.
@@ -63,51 +63,51 @@
// skipped and the KeyPress is followed immediately.
// If the Accel event is accepted, no KeyPress event will follow.
//
-// KAccelEventHandler::x11Event converts a X11 keyboard event into an AccelOverride
+// TDEAccelEventHandler::x11Event converts a X11 keyboard event into an AccelOverride
// event, there are now two possibilities:
//
-// 1) If KAccel intercepts the AccelOverride we are done and can consider the X11
+// 1) If TDEAccel intercepts the AccelOverride we are done and can consider the X11
// keyboard event as handled.
// 2) If another widget accepts the AccelOverride, it will expect to get a normal
// Qt generated KeyPress event afterwards. So we let Qt handle the X11 keyboard event
// again. However, this will first generate an AccelOverride event, and we already
-// had send that one. To compnesate for this, the global event filter in KApplication
+// had send that one. To compnesate for this, the global event filter in TDEApplication
// is instructed to eat the next AccelOveride event. Qt will then send a normal KeyPress
// event and from then on everything is normal again.
//
-// kde_g_bKillAccelOverride is used to tell KApplication::notify to eat the next
+// kde_g_bKillAccelOverride is used to tell TDEApplication::notify to eat the next
// AccelOverride event.
bool kde_g_bKillAccelOverride = false;
-class KAccelEventHandler : public TQWidget
+class TDEAccelEventHandler : public TQWidget
{
public:
- static KAccelEventHandler* self()
+ static TDEAccelEventHandler* self()
{
if( !g_pSelf )
- g_pSelf = new KAccelEventHandler;
+ g_pSelf = new TDEAccelEventHandler;
return g_pSelf;
}
static void accelActivated( bool b ) { g_bAccelActivated = b; }
private:
- KAccelEventHandler();
+ TDEAccelEventHandler();
# ifdef Q_WS_X11
bool x11Event( XEvent* pEvent );
# endif
- static KAccelEventHandler* g_pSelf;
+ static TDEAccelEventHandler* g_pSelf;
static bool g_bAccelActivated;
};
-KAccelEventHandler* KAccelEventHandler::g_pSelf = 0;
-bool KAccelEventHandler::g_bAccelActivated = false;
+TDEAccelEventHandler* TDEAccelEventHandler::g_pSelf = 0;
+bool TDEAccelEventHandler::g_bAccelActivated = false;
-KAccelEventHandler::KAccelEventHandler()
- : TQWidget( 0, "KAccelEventHandler" )
+TDEAccelEventHandler::TDEAccelEventHandler()
+ : TQWidget( 0, "TDEAccelEventHandler" )
{
# ifdef Q_WS_X11
if ( kapp )
@@ -118,7 +118,7 @@ KAccelEventHandler::KAccelEventHandler()
#ifdef Q_WS_X11
bool tqt_try_modal( TQWidget *, XEvent * );
-bool KAccelEventHandler::x11Event( XEvent* pEvent )
+bool TDEAccelEventHandler::x11Event( XEvent* pEvent )
{
if( TQWidget::keyboardGrabber() || !kapp->focusWidget() )
return false;
@@ -146,8 +146,8 @@ bool KAccelEventHandler::x11Event( XEvent* pEvent )
g_bAccelActivated = false;
kapp->sendEvent( kapp->focusWidget(), &ke );
- // If the Override event was accepted from a non-KAccel widget,
- // then kill the next AccelOverride in KApplication::notify.
+ // If the Override event was accepted from a non-TDEAccel widget,
+ // then kill the next AccelOverride in TDEApplication::notify.
if( ke.isAccepted() && !g_bAccelActivated )
kde_g_bKillAccelOverride = true;
@@ -160,35 +160,35 @@ bool KAccelEventHandler::x11Event( XEvent* pEvent )
#endif // Q_WS_X11
//---------------------------------------------------------------------
-// KAccelPrivate
+// TDEAccelPrivate
//---------------------------------------------------------------------
-KAccelPrivate::KAccelPrivate( KAccel* pParent, TQWidget* pWatch )
-: KAccelBase( KAccelBase::QT_KEYS )
+TDEAccelPrivate::TDEAccelPrivate( TDEAccel* pParent, TQWidget* pWatch )
+: TDEAccelBase( TDEAccelBase::QT_KEYS )
{
- //kdDebug(125) << "KAccelPrivate::KAccelPrivate( pParent = " << pParent << " ): this = " << this << endl;
+ //kdDebug(125) << "TDEAccelPrivate::TDEAccelPrivate( pParent = " << pParent << " ): this = " << this << endl;
m_pAccel = pParent;
m_pWatch = pWatch;
m_bAutoUpdate = true;
connect( (TQAccel*)m_pAccel, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotKeyPressed(int)) );
-#ifdef Q_WS_X11 //only makes sense if KAccelEventHandler is working
+#ifdef Q_WS_X11 //only makes sense if TDEAccelEventHandler is working
if( m_pWatch )
m_pWatch->installEventFilter( this );
#endif
- KAccelEventHandler::self();
+ TDEAccelEventHandler::self();
}
-void KAccelPrivate::setEnabled( bool bEnabled )
+void TDEAccelPrivate::setEnabled( bool bEnabled )
{
m_bEnabled = bEnabled;
((TQAccel*)m_pAccel)->setEnabled( bEnabled );
}
-bool KAccelPrivate::setEnabled( const TQString& sAction, bool bEnable )
+bool TDEAccelPrivate::setEnabled( const TQString& sAction, bool bEnable )
{
- kdDebug(125) << "KAccelPrivate::setEnabled( \"" << sAction << "\", " << bEnable << " ): this = " << this << endl;
- KAccelAction* pAction = actionPtr( sAction );
+ kdDebug(125) << "TDEAccelPrivate::setEnabled( \"" << sAction << "\", " << bEnable << " ): this = " << this << endl;
+ TDEAccelAction* pAction = actionPtr( sAction );
if( !pAction )
return false;
if( pAction->isEnabled() == bEnable )
@@ -196,7 +196,7 @@ bool KAccelPrivate::setEnabled( const TQString& sAction, bool bEnable )
pAction->setEnabled( bEnable );
- TQMap<int, KAccelAction*>::const_iterator it = m_mapIDToAction.begin();
+ TQMap<int, TDEAccelAction*>::const_iterator it = m_mapIDToAction.begin();
for( ; it != m_mapIDToAction.end(); ++it ) {
if( *it == pAction )
((TQAccel*)m_pAccel)->setItemEnabled( it.key(), bEnable );
@@ -204,32 +204,32 @@ bool KAccelPrivate::setEnabled( const TQString& sAction, bool bEnable )
return true;
}
-bool KAccelPrivate::removeAction( const TQString& sAction )
+bool TDEAccelPrivate::removeAction( const TQString& sAction )
{
// FIXME: getID() doesn't contains any useful
// information! Use mapIDToAction. --ellis, 2/May/2002
- // Or maybe KAccelBase::remove() takes care of TQAccel indirectly...
- KAccelAction* pAction = actions().actionPtr( sAction );
+ // Or maybe TDEAccelBase::remove() takes care of TQAccel indirectly...
+ TDEAccelAction* pAction = actions().actionPtr( sAction );
if( pAction ) {
int nID = pAction->getID();
//bool b = actions().removeAction( sAction );
- bool b = KAccelBase::remove( sAction );
+ bool b = TDEAccelBase::remove( sAction );
((TQAccel*)m_pAccel)->removeItem( nID );
return b;
} else
return false;
}
-bool KAccelPrivate::emitSignal( KAccelBase::Signal signal )
+bool TDEAccelPrivate::emitSignal( TDEAccelBase::Signal signal )
{
- if( signal == KAccelBase::KEYCODE_CHANGED ) {
+ if( signal == TDEAccelBase::KEYCODE_CHANGED ) {
m_pAccel->emitKeycodeChanged();
return true;
}
return false;
}
-bool KAccelPrivate::connectKey( KAccelAction& action, const KKeyServer::Key& key )
+bool TDEAccelPrivate::connectKey( TDEAccelAction& action, const KKeyServer::Key& key )
{
uint keyQt = key.keyCodeQt();
int nID = ((TQAccel*)m_pAccel)->insertItem( keyQt );
@@ -246,23 +246,23 @@ bool KAccelPrivate::connectKey( KAccelAction& action, const KKeyServer::Key& key
((TQAccel*)m_pAccel)->setItemEnabled( nID, false );
}
- kdDebug(125) << "KAccelPrivate::connectKey( \"" << action.name() << "\", " << key.key().toStringInternal() << " = 0x" << TQString::number(keyQt,16) << " ): id = " << nID << " m_pObjSlot = " << action.objSlotPtr() << endl;
+ kdDebug(125) << "TDEAccelPrivate::connectKey( \"" << action.name() << "\", " << key.key().toStringInternal() << " = 0x" << TQString::number(keyQt,16) << " ): id = " << nID << " m_pObjSlot = " << action.objSlotPtr() << endl;
//kdDebug(125) << "m_pAccel = " << m_pAccel << endl;
return nID != 0;
}
-bool KAccelPrivate::connectKey( const KKeyServer::Key& key )
+bool TDEAccelPrivate::connectKey( const KKeyServer::Key& key )
{
uint keyQt = key.keyCodeQt();
int nID = ((TQAccel*)m_pAccel)->insertItem( keyQt );
m_mapIDToKey[nID] = keyQt;
- kdDebug(125) << "KAccelPrivate::connectKey( " << key.key().toStringInternal() << " = 0x" << TQString::number(keyQt,16) << " ): id = " << nID << endl;
+ kdDebug(125) << "TDEAccelPrivate::connectKey( " << key.key().toStringInternal() << " = 0x" << TQString::number(keyQt,16) << " ): id = " << nID << endl;
return nID != 0;
}
-bool KAccelPrivate::disconnectKey( KAccelAction& action, const KKeyServer::Key& key )
+bool TDEAccelPrivate::disconnectKey( TDEAccelAction& action, const KKeyServer::Key& key )
{
int keyQt = key.keyCodeQt();
TQMap<int, int>::iterator it = m_mapIDToKey.begin();
@@ -270,7 +270,7 @@ bool KAccelPrivate::disconnectKey( KAccelAction& action, const KKeyServer::Key&
//kdDebug(125) << "m_mapIDToKey[" << it.key() << "] = " << TQString::number(*it,16) << " == " << TQString::number(keyQt,16) << endl;
if( *it == keyQt ) {
int nID = it.key();
- kdDebug(125) << "KAccelPrivate::disconnectKey( \"" << action.name() << "\", 0x" << TQString::number(keyQt,16) << " ) : id = " << nID << " m_pObjSlot = " << action.objSlotPtr() << endl;
+ kdDebug(125) << "TDEAccelPrivate::disconnectKey( \"" << action.name() << "\", 0x" << TQString::number(keyQt,16) << " ) : id = " << nID << " m_pObjSlot = " << action.objSlotPtr() << endl;
((TQAccel*)m_pAccel)->removeItem( nID );
m_mapIDToAction.remove( nID );
m_mapIDToKey.remove( it );
@@ -282,10 +282,10 @@ bool KAccelPrivate::disconnectKey( KAccelAction& action, const KKeyServer::Key&
return false;
}
-bool KAccelPrivate::disconnectKey( const KKeyServer::Key& key )
+bool TDEAccelPrivate::disconnectKey( const KKeyServer::Key& key )
{
int keyQt = key.keyCodeQt();
- kdDebug(125) << "KAccelPrivate::disconnectKey( 0x" << TQString::number(keyQt,16) << " )" << endl;
+ kdDebug(125) << "TDEAccelPrivate::disconnectKey( 0x" << TQString::number(keyQt,16) << " )" << endl;
TQMap<int, int>::iterator it = m_mapIDToKey.begin();
for( ; it != m_mapIDToKey.end(); ++it ) {
if( *it == keyQt ) {
@@ -299,9 +299,9 @@ bool KAccelPrivate::disconnectKey( const KKeyServer::Key& key )
return false;
}
-void KAccelPrivate::slotKeyPressed( int id )
+void TDEAccelPrivate::slotKeyPressed( int id )
{
- kdDebug(125) << "KAccelPrivate::slotKeyPressed( " << id << " )" << endl;
+ kdDebug(125) << "TDEAccelPrivate::slotKeyPressed( " << id << " )" << endl;
if( m_mapIDToKey.contains( id ) ) {
KKey key = m_mapIDToKey[id];
@@ -326,14 +326,14 @@ void KAccelPrivate::slotKeyPressed( int id )
}
}
-void KAccelPrivate::slotShowMenu()
+void TDEAccelPrivate::slotShowMenu()
{
}
-void KAccelPrivate::slotMenuActivated( int iAction )
+void TDEAccelPrivate::slotMenuActivated( int iAction )
{
- kdDebug(125) << "KAccelPrivate::slotMenuActivated( " << iAction << " )" << endl;
- KAccelAction* pAction = actions().actionPtr( iAction );
+ kdDebug(125) << "TDEAccelPrivate::slotMenuActivated( " << iAction << " )" << endl;
+ TDEAccelAction* pAction = actions().actionPtr( iAction );
#ifdef Q_WS_WIN /** @todo TEMP: new implementation (commit #424926) didn't work */
if( pAction ) {
connect( this, TQT_SIGNAL(menuItemActivated()), pAction->objSlotPtr(), pAction->methodSlotPtr() );
@@ -345,12 +345,12 @@ void KAccelPrivate::slotMenuActivated( int iAction )
#endif
}
-bool KAccelPrivate::eventFilter( TQObject* /*pWatched*/, TQEvent* pEvent )
+bool TDEAccelPrivate::eventFilter( TQObject* /*pWatched*/, TQEvent* pEvent )
{
if( pEvent->type() == TQEvent::AccelOverride && m_bEnabled ) {
TQKeyEvent* pKeyEvent = (TQKeyEvent*) pEvent;
KKey key( pKeyEvent );
- kdDebug(125) << "KAccelPrivate::eventFilter( AccelOverride ): this = " << this << ", key = " << key.toStringInternal() << endl;
+ kdDebug(125) << "TDEAccelPrivate::eventFilter( AccelOverride ): this = " << this << ", key = " << key.toStringInternal() << endl;
int keyCodeQt = key.keyCodeQt();
TQMap<int, int>::iterator it = m_mapIDToKey.begin();
for( ; it != m_mapIDToKey.end(); ++it ) {
@@ -359,11 +359,11 @@ bool KAccelPrivate::eventFilter( TQObject* /*pWatched*/, TQEvent* pEvent )
kdDebug(125) << "shortcut found!" << endl;
if( m_mapIDToAction.contains( nID ) ) {
// TODO: reduce duplication between here and slotMenuActivated
- KAccelAction* pAction = m_mapIDToAction[nID];
+ TDEAccelAction* pAction = m_mapIDToAction[nID];
if( !pAction->isEnabled() )
continue;
#ifdef Q_WS_WIN /** @todo TEMP: new implementation (commit #424926) didn't work */
- TQGuardedPtr<KAccelPrivate> me = this;
+ TQGuardedPtr<TDEAccelPrivate> me = this;
connect( this, TQT_SIGNAL(menuItemActivated()), pAction->objSlotPtr(), pAction->methodSlotPtr() );
emit menuItemActivated();
if (me) {
@@ -376,7 +376,7 @@ bool KAccelPrivate::eventFilter( TQObject* /*pWatched*/, TQEvent* pEvent )
slotKeyPressed( nID );
pKeyEvent->accept();
- KAccelEventHandler::accelActivated( true );
+ TDEAccelEventHandler::accelActivated( true );
return true;
}
}
@@ -385,17 +385,17 @@ bool KAccelPrivate::eventFilter( TQObject* /*pWatched*/, TQEvent* pEvent )
}
#ifndef Q_WS_WIN /** @todo TEMP: new implementation (commit #424926) didn't work */
-void KAccelPrivate::emitActivatedSignal( KAccelAction* pAction )
+void TDEAccelPrivate::emitActivatedSignal( TDEAccelAction* pAction )
{
if( pAction ) {
- TQGuardedPtr<KAccelPrivate> me = this;
- TQRegExp reg( "([ ]*KAccelAction.*)" );
+ TQGuardedPtr<TDEAccelPrivate> me = this;
+ TQRegExp reg( "([ ]*TDEAccelAction.*)" );
if( reg.search( pAction->methodSlotPtr()) >= 0 ) {
- connect( this, TQT_SIGNAL(menuItemActivated(KAccelAction*)),
+ connect( this, TQT_SIGNAL(menuItemActivated(TDEAccelAction*)),
pAction->objSlotPtr(), pAction->methodSlotPtr() );
emit menuItemActivated( pAction );
if (me)
- disconnect( me, TQT_SIGNAL(menuItemActivated(KAccelAction*)),
+ disconnect( me, TQT_SIGNAL(menuItemActivated(TDEAccelAction*)),
pAction->objSlotPtr(), pAction->methodSlotPtr() );
} else {
connect( this, TQT_SIGNAL(menuItemActivated()),
@@ -411,39 +411,39 @@ void KAccelPrivate::emitActivatedSignal( KAccelAction* pAction )
#endif
//---------------------------------------------------------------------
-// KAccel
+// TDEAccel
//---------------------------------------------------------------------
-KAccel::KAccel( TQWidget* pParent, const char* psName )
-: TQAccel( pParent, (psName) ? psName : "KAccel-TQAccel" )
+TDEAccel::TDEAccel( TQWidget* pParent, const char* psName )
+: TQAccel( pParent, (psName) ? psName : "TDEAccel-TQAccel" )
{
- kdDebug(125) << "KAccel( pParent = " << pParent << ", psName = " << psName << " ): this = " << this << endl;
- d = new KAccelPrivate( this, pParent );
+ kdDebug(125) << "TDEAccel( pParent = " << pParent << ", psName = " << psName << " ): this = " << this << endl;
+ d = new TDEAccelPrivate( this, pParent );
}
-KAccel::KAccel( TQWidget* watch, TQObject* pParent, const char* psName )
-: TQAccel( watch, pParent, (psName) ? psName : "KAccel-TQAccel" )
+TDEAccel::TDEAccel( TQWidget* watch, TQObject* pParent, const char* psName )
+: TQAccel( watch, pParent, (psName) ? psName : "TDEAccel-TQAccel" )
{
- kdDebug(125) << "KAccel( watch = " << watch << ", pParent = " << pParent << ", psName = " << psName << " ): this = " << this << endl;
+ kdDebug(125) << "TDEAccel( watch = " << watch << ", pParent = " << pParent << ", psName = " << psName << " ): this = " << this << endl;
if( !watch )
kdDebug(125) << kdBacktrace() << endl;
- d = new KAccelPrivate( this, watch );
+ d = new TDEAccelPrivate( this, watch );
}
-KAccel::~KAccel()
+TDEAccel::~TDEAccel()
{
- kdDebug(125) << "~KAccel(): this = " << this << endl;
+ kdDebug(125) << "~TDEAccel(): this = " << this << endl;
delete d;
}
-KAccelActions& KAccel::actions() { return d->actions(); }
-const KAccelActions& KAccel::actions() const { return d->actions(); }
-bool KAccel::isEnabled() { return d->isEnabled(); }
-void KAccel::setEnabled( bool bEnabled ) { d->setEnabled( bEnabled ); }
-bool KAccel::setAutoUpdate( bool bAuto ) { return d->setAutoUpdate( bAuto ); }
+TDEAccelActions& TDEAccel::actions() { return d->actions(); }
+const TDEAccelActions& TDEAccel::actions() const { return d->actions(); }
+bool TDEAccel::isEnabled() { return d->isEnabled(); }
+void TDEAccel::setEnabled( bool bEnabled ) { d->setEnabled( bEnabled ); }
+bool TDEAccel::setAutoUpdate( bool bAuto ) { return d->setAutoUpdate( bAuto ); }
-KAccelAction* KAccel::insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis,
- const KShortcut& cutDef,
+TDEAccelAction* TDEAccel::insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis,
+ const TDEShortcut& cutDef,
const TQObject* pObjSlot, const char* psMethodSlot,
bool bConfigurable, bool bEnabled )
{
@@ -453,8 +453,8 @@ KAccelAction* KAccel::insert( const TQString& sAction, const TQString& sLabel, c
bConfigurable, bEnabled );
}
-KAccelAction* KAccel::insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis,
- const KShortcut& cutDef3, const KShortcut& cutDef4,
+TDEAccelAction* TDEAccel::insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis,
+ const TDEShortcut& cutDef3, const TDEShortcut& cutDef4,
const TQObject* pObjSlot, const char* psMethodSlot,
bool bConfigurable, bool bEnabled )
{
@@ -464,7 +464,7 @@ KAccelAction* KAccel::insert( const TQString& sAction, const TQString& sLabel, c
bConfigurable, bEnabled );
}
-KAccelAction* KAccel::insert( const char* psAction, const KShortcut& cutDef,
+TDEAccelAction* TDEAccel::insert( const char* psAction, const TDEShortcut& cutDef,
const TQObject* pObjSlot, const char* psMethodSlot,
bool bConfigurable, bool bEnabled )
{
@@ -474,45 +474,45 @@ KAccelAction* KAccel::insert( const char* psAction, const KShortcut& cutDef,
bConfigurable, bEnabled );
}
-KAccelAction* KAccel::insert( KStdAccel::StdAccel id,
+TDEAccelAction* TDEAccel::insert( TDEStdAccel::StdAccel id,
const TQObject* pObjSlot, const char* psMethodSlot,
bool bConfigurable, bool bEnabled )
{
- TQString sAction = KStdAccel::name( id );
+ TQString sAction = TDEStdAccel::name( id );
if( sAction.isEmpty() )
return 0;
- KAccelAction* pAction = d->insert( sAction, KStdAccel::label( id ), KStdAccel::whatsThis( id ),
- KStdAccel::shortcutDefault3( id ), KStdAccel::shortcutDefault4( id ),
+ TDEAccelAction* pAction = d->insert( sAction, TDEStdAccel::label( id ), TDEStdAccel::whatsThis( id ),
+ TDEStdAccel::shortcutDefault3( id ), TDEStdAccel::shortcutDefault4( id ),
pObjSlot, psMethodSlot,
bConfigurable, bEnabled );
if( pAction )
- pAction->setShortcut( KStdAccel::shortcut( id ) );
+ pAction->setShortcut( TDEStdAccel::shortcut( id ) );
return pAction;
}
-bool KAccel::remove( const TQString& sAction )
+bool TDEAccel::remove( const TQString& sAction )
{ return d->removeAction( sAction ); }
-bool KAccel::updateConnections()
+bool TDEAccel::updateConnections()
{ return d->updateConnections(); }
-const KShortcut& KAccel::shortcut( const TQString& sAction ) const
+const TDEShortcut& TDEAccel::shortcut( const TQString& sAction ) const
{
- const KAccelAction* pAction = actions().actionPtr( sAction );
- return (pAction) ? pAction->shortcut() : KShortcut::null();
+ const TDEAccelAction* pAction = actions().actionPtr( sAction );
+ return (pAction) ? pAction->shortcut() : TDEShortcut::null();
}
-bool KAccel::setSlot( const TQString& sAction, const TQObject* pObjSlot, const char* psMethodSlot )
+bool TDEAccel::setSlot( const TQString& sAction, const TQObject* pObjSlot, const char* psMethodSlot )
{ return d->setActionSlot( sAction, pObjSlot, psMethodSlot ); }
-bool KAccel::setEnabled( const TQString& sAction, bool bEnable )
+bool TDEAccel::setEnabled( const TQString& sAction, bool bEnable )
{ return d->setEnabled( sAction, bEnable ); }
-bool KAccel::setShortcut( const TQString& sAction, const KShortcut& cut )
+bool TDEAccel::setShortcut( const TQString& sAction, const TDEShortcut& cut )
{
- kdDebug(125) << "KAccel::setShortcut( \"" << sAction << "\", " << cut.toStringInternal() << " )" << endl;
- KAccelAction* pAction = actions().actionPtr( sAction );
+ kdDebug(125) << "TDEAccel::setShortcut( \"" << sAction << "\", " << cut.toStringInternal() << " )" << endl;
+ TDEAccelAction* pAction = actions().actionPtr( sAction );
if( pAction ) {
if( pAction->shortcut() != cut )
return d->setShortcut( sAction, cut );
@@ -521,24 +521,24 @@ bool KAccel::setShortcut( const TQString& sAction, const KShortcut& cut )
return false;
}
-const TQString& KAccel::configGroup() const
+const TQString& TDEAccel::configGroup() const
{ return d->configGroup(); }
// for tdegames/ksirtet
-void KAccel::setConfigGroup( const TQString& s )
+void TDEAccel::setConfigGroup( const TQString& s )
{ d->setConfigGroup( s ); }
-bool KAccel::readSettings( KConfigBase* pConfig )
+bool TDEAccel::readSettings( TDEConfigBase* pConfig )
{
d->readSettings( pConfig );
return true;
}
-bool KAccel::writeSettings( KConfigBase* pConfig ) const
+bool TDEAccel::writeSettings( TDEConfigBase* pConfig ) const
{ d->writeSettings( pConfig ); return true; }
-void KAccel::emitKeycodeChanged()
+void TDEAccel::emitKeycodeChanged()
{
- kdDebug(125) << "KAccel::emitKeycodeChanged()" << endl;
+ kdDebug(125) << "TDEAccel::emitKeycodeChanged()" << endl;
emit keycodeChanged();
}
@@ -547,11 +547,11 @@ void KAccel::emitKeycodeChanged()
// Obsolete methods -- for backward compatibility
//------------------------------------------------------------
-bool KAccel::insertItem( const TQString& sLabel, const TQString& sAction,
+bool TDEAccel::insertItem( const TQString& sLabel, const TQString& sAction,
const char* cutsDef,
int /*nIDMenu*/, TQPopupMenu *, bool bConfigurable )
{
- KShortcut cut( cutsDef );
+ TDEShortcut cut( cutsDef );
bool b = d->insert( sAction, sLabel, TQString::null,
cut, cut,
0, 0,
@@ -559,13 +559,13 @@ bool KAccel::insertItem( const TQString& sLabel, const TQString& sAction,
return b;
}
-bool KAccel::insertItem( const TQString& sLabel, const TQString& sAction,
+bool TDEAccel::insertItem( const TQString& sLabel, const TQString& sAction,
int key,
int /*nIDMenu*/, TQPopupMenu*, bool bConfigurable )
{
- KShortcut cut;
+ TDEShortcut cut;
cut.init( TQKeySequence(key) );
- KAccelAction* pAction = d->insert( sAction, sLabel, TQString::null,
+ TDEAccelAction* pAction = d->insert( sAction, sLabel, TQString::null,
cut, cut,
0, 0,
bConfigurable );
@@ -573,20 +573,20 @@ bool KAccel::insertItem( const TQString& sLabel, const TQString& sAction,
}
// Used in tdeutils/kjots
-bool KAccel::insertStdItem( KStdAccel::StdAccel id, const TQString& sLabel )
+bool TDEAccel::insertStdItem( TDEStdAccel::StdAccel id, const TQString& sLabel )
{
- KAccelAction* pAction = d->insert( KStdAccel::name( id ), sLabel, TQString::null,
- KStdAccel::shortcutDefault3( id ), KStdAccel::shortcutDefault4( id ),
+ TDEAccelAction* pAction = d->insert( TDEStdAccel::name( id ), sLabel, TQString::null,
+ TDEStdAccel::shortcutDefault3( id ), TDEStdAccel::shortcutDefault4( id ),
0, 0 );
if( pAction )
- pAction->setShortcut( KStdAccel::shortcut( id ) );
+ pAction->setShortcut( TDEStdAccel::shortcut( id ) );
return true;
}
-bool KAccel::connectItem( const TQString& sAction, const TQObject* pObjSlot, const char* psMethodSlot, bool bActivate )
+bool TDEAccel::connectItem( const TQString& sAction, const TQObject* pObjSlot, const char* psMethodSlot, bool bActivate )
{
- kdDebug(125) << "KAccel::connectItem( " << sAction << ", " << pObjSlot << ", " << psMethodSlot << " )" << endl;
+ kdDebug(125) << "TDEAccel::connectItem( " << sAction << ", " << pObjSlot << ", " << psMethodSlot << " )" << endl;
if( bActivate == false )
d->setActionEnabled( sAction, false );
bool b = setSlot( sAction, pObjSlot, psMethodSlot );
@@ -595,15 +595,15 @@ bool KAccel::connectItem( const TQString& sAction, const TQObject* pObjSlot, con
return b;
}
-bool KAccel::removeItem( const TQString& sAction )
+bool TDEAccel::removeItem( const TQString& sAction )
{ return d->removeAction( sAction ); }
-bool KAccel::setItemEnabled( const TQString& sAction, bool bEnable )
+bool TDEAccel::setItemEnabled( const TQString& sAction, bool bEnable )
{ return setEnabled( sAction, bEnable ); }
-void KAccel::changeMenuAccel( TQPopupMenu *menu, int id, const TQString& action )
+void TDEAccel::changeMenuAccel( TQPopupMenu *menu, int id, const TQString& action )
{
- KAccelAction* pAction = actions().actionPtr( action );
+ TDEAccelAction* pAction = actions().actionPtr( action );
TQString s = menu->text( id );
if( !pAction || s.isEmpty() )
return;
@@ -628,27 +628,27 @@ void KAccel::changeMenuAccel( TQPopupMenu *menu, int id, const TQString& action
menu->changeItem( s, id );
}
-void KAccel::changeMenuAccel( TQPopupMenu *menu, int id, KStdAccel::StdAccel accel )
+void TDEAccel::changeMenuAccel( TQPopupMenu *menu, int id, TDEStdAccel::StdAccel accel )
{
- changeMenuAccel( menu, id, KStdAccel::name( accel ) );
+ changeMenuAccel( menu, id, TDEStdAccel::name( accel ) );
}
-int KAccel::stringToKey( const TQString& sKey )
+int TDEAccel::stringToKey( const TQString& sKey )
{
return KKey( sKey ).keyCodeQt();
}
-int KAccel::currentKey( const TQString& sAction ) const
+int TDEAccel::currentKey( const TQString& sAction ) const
{
- KAccelAction* pAction = d->actionPtr( sAction );
+ TDEAccelAction* pAction = d->actionPtr( sAction );
if( pAction )
return pAction->shortcut().keyCodeQt();
return 0;
}
-TQString KAccel::findKey( int key ) const
+TQString TDEAccel::findKey( int key ) const
{
- KAccelAction* pAction = d->actionPtr( KKey(key) );
+ TDEAccelAction* pAction = d->actionPtr( KKey(key) );
if( pAction )
return pAction->name();
else
@@ -656,8 +656,8 @@ TQString KAccel::findKey( int key ) const
}
#endif // !KDE_NO_COMPAT
-void KAccel::virtual_hook( int, void* )
+void TDEAccel::virtual_hook( int, void* )
{ /*BASE::virtual_hook( id, data );*/ }
-#include "kaccel.moc"
-#include "kaccelprivate.moc"
+#include "tdeaccel.moc"
+#include "tdeaccelprivate.moc"
diff --git a/tdecore/kaccel.h b/tdecore/tdeaccel.h
index 7f24a5e73..8b61102f4 100644
--- a/tdecore/kaccel.h
+++ b/tdecore/tdeaccel.h
@@ -21,17 +21,17 @@
#define _KACCEL_H
#include <tqaccel.h>
-#include <kshortcut.h>
-#include <kstdaccel.h>
+#include <tdeshortcut.h>
+#include <tdestdaccel.h>
#include "tdelibs_export.h"
class TQPopupMenu; // for obsolete insertItem() methods below
class TQWidget;
-class KAccelAction;
-class KAccelActions;
-class KConfigBase;
+class TDEAccelAction;
+class TDEAccelActions;
+class TDEConfigBase;
-class KAccelPrivate;
+class TDEAccelPrivate;
/**
* Handle shortcuts.
*
@@ -39,19 +39,19 @@ class KAccelPrivate;
* through application configuration files or through the
* KKeyChooser GUI.
*
- * A KAccel contains a list of accelerator actions.
+ * A TDEAccel contains a list of accelerator actions.
*
* For example, CTRL+Key_P could be a shortcut for printing a document. The key
* codes are listed in tqnamespace.h. "Print" could be the action name for printing.
* The action name identifies the shortcut in configuration files and the
* KKeyChooser GUI.
*
- * A KAccel object handles key events sent to its parent widget and to all
- * children of this parent widget. The most recently created KAccel object
- * has precedence over any KAccel objects created before it.
- * When a shortcut pressed, KAccel calls the slot to which it has been
+ * A TDEAccel object handles key events sent to its parent widget and to all
+ * children of this parent widget. The most recently created TDEAccel object
+ * has precedence over any TDEAccel objects created before it.
+ * When a shortcut pressed, TDEAccel calls the slot to which it has been
* connected. If you want to set global accelerators, independent of the window
- * which has the focus, use KGlobalAccel.
+ * which has the focus, use TDEGlobalAccel.
*
* Reconfiguration of a given shortcut can be prevented by specifying
* that an accelerator item is not configurable when it is inserted. A special
@@ -69,14 +69,14 @@ class KAccelPrivate;
* The translated first argument for insertItem() is used only
* in the configuration dialog.
*\code
- * KAccel* pAccel = new KAccel( this );
+ * TDEAccel* pAccel = new TDEAccel( this );
*
* // Insert an action "Scroll Up" which is associated with the "Up" key:
* pAccel->insert( "Scroll Up", i18n("Scroll up"),
* i18n("Scroll up the current document by one line."),
* Qt::Key_Up, this, TQT_SLOT(slotScrollUp()) );
* // Insert an standard acclerator action.
- * pAccel->insert( KStdAccel::Print, this, TQT_SLOT(slotPrint()) );
+ * pAccel->insert( TDEStdAccel::Print, this, TQT_SLOT(slotPrint()) );
*
* // Update the shortcuts by read any user-defined settings from the
* // application's config file.
@@ -84,57 +84,57 @@ class KAccelPrivate;
* \endcode
*
* @short Configurable shortcut support for widgets.
- * @see KGlobalAccel
- * @see KAccelShortcutList
+ * @see TDEGlobalAccel
+ * @see TDEAccelShortcutList
* @see KKeyChooser
* @see KKeyDialog
*/
-class TDECORE_EXPORT KAccel : public TQAccel
+class TDECORE_EXPORT TDEAccel : public TQAccel
{
Q_OBJECT
public:
/**
- * Creates a new KAccel that watches @p pParent, which is also
+ * Creates a new TDEAccel that watches @p pParent, which is also
* the QObject's parent.
*
* @param pParent the parent and widget to watch for key strokes
* @param psName the name of the QObject
*/
- KAccel( TQWidget* pParent, const char* psName = 0 );
+ TDEAccel( TQWidget* pParent, const char* psName = 0 );
/**
- * Creates a new KAccel that watches @p watch.
+ * Creates a new TDEAccel that watches @p watch.
*
* @param watch the widget to watch for key strokes
* @param parent the parent of the QObject
* @param psName the name of the QObject
*/
- KAccel( TQWidget* watch, TQObject* parent, const char* psName = 0 );
- virtual ~KAccel();
+ TDEAccel( TQWidget* watch, TQObject* parent, const char* psName = 0 );
+ virtual ~TDEAccel();
/**
* @internal
- * Returns the KAccel's @p KAccelActions, a list of @p KAccelAction.
- * @return the KAccelActions of the KAccel
+ * Returns the TDEAccel's @p TDEAccelActions, a list of @p TDEAccelAction.
+ * @return the TDEAccelActions of the TDEAccel
*/
- KAccelActions& actions();
+ TDEAccelActions& actions();
/**
* @internal
- * Returns the KAccel's @p KAccelActions, a list of @p KAccelAction.
- * @return the KAccelActions of the KAccel
+ * Returns the TDEAccel's @p TDEAccelActions, a list of @p TDEAccelAction.
+ * @return the TDEAccelActions of the TDEAccel
*/
- const KAccelActions& actions() const;
+ const TDEAccelActions& actions() const;
/**
- * Checks whether the KAccel is active.
+ * Checks whether the TDEAccel is active.
* @return true if the TQAccel is enabled
*/
bool isEnabled();
/**
- * Enables or disables the KAccel.
+ * Enables or disables the TDEAccel.
* @param bEnabled true to enable, false to disable
*/
void setEnabled( bool bEnabled );
@@ -172,16 +172,16 @@ class TDECORE_EXPORT KAccel : public TQAccel
* @param bConfigurable Allow the user to change this shortcut if set to 'true'.
* @param bEnabled The action will be activated by the shortcut if set to 'true'.
*/
- KAccelAction* insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis,
- const KShortcut& cutDef,
+ TDEAccelAction* insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis,
+ const TDEShortcut& cutDef,
const TQObject* pObjSlot, const char* psMethodSlot,
bool bConfigurable = true, bool bEnabled = true );
/**
* Same as first insert(), but with separate shortcuts defined for
* 3- and 4- modifier defaults.
*/
- KAccelAction* insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis,
- const KShortcut& cutDef3, const KShortcut& cutDef4,
+ TDEAccelAction* insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis,
+ const TDEShortcut& cutDef3, const TDEShortcut& cutDef4,
const TQObject* pObjSlot, const char* psMethodSlot,
bool bConfigurable = true, bool bEnabled = true );
/**
@@ -201,16 +201,16 @@ class TDECORE_EXPORT KAccel : public TQAccel
* @param bConfigurable Allow the user to change this shortcut if set to 'true'.
* @param bEnabled The action will be activated by the shortcut if set to 'true'.
*/
- KAccelAction* insert( const char* psAction, const KShortcut& cutDef,
+ TDEAccelAction* insert( const char* psAction, const TDEShortcut& cutDef,
const TQObject* pObjSlot, const char* psMethodSlot,
bool bConfigurable = true, bool bEnabled = true );
/**
* Similar to the first insert() method, but with the action
* name, short description, help text, and default shortcuts all
* set according to one of the standard accelerators.
- * @see KStdAccel.
+ * @see TDEStdAccel.
*/
- KAccelAction* insert( KStdAccel::StdAccel id,
+ TDEAccelAction* insert( TDEStdAccel::StdAccel id,
const TQObject* pObjSlot, const char* psMethodSlot,
bool bConfigurable = true, bool bEnabled = true );
@@ -237,7 +237,7 @@ class TDECORE_EXPORT KAccel : public TQAccel
* @param sAction the name of the action
* @return the action's shortcut, or a null shortcut if not found
*/
- const KShortcut& shortcut( const TQString& sAction ) const;
+ const TDEShortcut& shortcut( const TQString& sAction ) const;
/**
* Set the shortcut to be associated with the action named by @p sAction.
@@ -245,7 +245,7 @@ class TDECORE_EXPORT KAccel : public TQAccel
* @param shortcut the shortcut to set
* @return true if successful, false otherwise
*/
- bool setShortcut( const TQString& sAction, const KShortcut &shortcut );
+ bool setShortcut( const TQString& sAction, const TDEShortcut &shortcut );
/**
* Set the slot to be called when the shortcut of the action named
@@ -267,21 +267,21 @@ class TDECORE_EXPORT KAccel : public TQAccel
/**
* Returns the configuration group of the settings.
* @return the configuration group
- * @see KConfig
+ * @see TDEConfig
*/
const TQString& configGroup() const;
/**
* Returns the configuration group of the settings.
* @param name the new configuration group
- * @see KConfig
+ * @see TDEConfig
*/
void setConfigGroup( const TQString &name );
/**
* Read all shortcuts from @p pConfig, or (if @p pConfig
* is zero) from the application's configuration file
- * KGlobal::config().
+ * TDEGlobal::config().
*
* The group in which the configuration is stored can be
* set with setConfigGroup().
@@ -289,7 +289,7 @@ class TDECORE_EXPORT KAccel : public TQAccel
* configuration file
* @return true if successful, false otherwise
*/
- bool readSettings( KConfigBase* pConfig = 0 );
+ bool readSettings( TDEConfigBase* pConfig = 0 );
/**
* Write the current shortcuts to @p pConfig,
* or (if @p pConfig is zero) to the application's
@@ -298,7 +298,7 @@ class TDECORE_EXPORT KAccel : public TQAccel
* configuration file
* @return true if successful, false otherwise
*/
- bool writeSettings( KConfigBase* pConfig = 0 ) const;
+ bool writeSettings( TDEConfigBase* pConfig = 0 ) const;
/**
* Emits the keycodeChanged() signal.
@@ -329,7 +329,7 @@ class TDECORE_EXPORT KAccel : public TQAccel
/**
* @deprecated use insert
*/
- bool insertStdItem( KStdAccel::StdAccel id, const TQString& descr = TQString::null ) KDE_DEPRECATED;
+ bool insertStdItem( TDEStdAccel::StdAccel id, const TQString& descr = TQString::null ) KDE_DEPRECATED;
/**
* @deprecated use insert
*/
@@ -338,7 +338,7 @@ class TDECORE_EXPORT KAccel : public TQAccel
* @deprecated use insert( accel, pObjSlot, psMethodSlot );
*
*/
- KDE_DEPRECATED bool connectItem( KStdAccel::StdAccel accel, const TQObject* pObjSlot, const char* psMethodSlot )
+ KDE_DEPRECATED bool connectItem( TDEStdAccel::StdAccel accel, const TQObject* pObjSlot, const char* psMethodSlot )
{ return insert( accel, pObjSlot, psMethodSlot ); }
/**
* @deprecated use remove
@@ -355,7 +355,7 @@ class TDECORE_EXPORT KAccel : public TQAccel
/**
* @deprecated see KDE3PORTING.html
*/
- void changeMenuAccel( TQPopupMenu *menu, int id, KStdAccel::StdAccel accel ) KDE_DEPRECATED;
+ void changeMenuAccel( TQPopupMenu *menu, int id, TDEStdAccel::StdAccel accel ) KDE_DEPRECATED;
/**
* @deprecated
*/
@@ -383,8 +383,8 @@ class TDECORE_EXPORT KAccel : public TQAccel
/** \internal */
virtual void virtual_hook( int id, void* data );
private:
- class KAccelPrivate* d;
- friend class KAccelPrivate;
+ class TDEAccelPrivate* d;
+ friend class TDEAccelPrivate;
};
#endif // _KACCEL_H
diff --git a/tdecore/kaccelaction.cpp b/tdecore/tdeaccelaction.cpp
index 856bbefdc..89d8efaa2 100644
--- a/tdecore/kaccelaction.cpp
+++ b/tdecore/tdeaccelaction.cpp
@@ -20,33 +20,33 @@
Boston, MA 02110-1301, USA.
*/
-#include "kaccelaction.h"
-#include "kaccelbase.h" // for KAccelBase::slotRemoveAction() & emitSignal()
+#include "tdeaccelaction.h"
+#include "tdeaccelbase.h" // for TDEAccelBase::slotRemoveAction() & emitSignal()
#include <tqkeycode.h>
-#include <kconfig.h>
+#include <tdeconfig.h>
#include "kckey.h"
#include <kdebug.h>
-#include <kglobal.h>
+#include <tdeglobal.h>
#include <kkeynative.h>
-#include <klocale.h>
-#include <kshortcutlist.h>
+#include <tdelocale.h>
+#include <tdeshortcutlist.h>
//---------------------------------------------------------------------
-// KAccelAction
+// TDEAccelAction
//---------------------------------------------------------------------
-class KAccelActionPrivate
+class TDEAccelActionPrivate
{
public:
uint m_nConnections;
};
-KAccelAction::KAccelAction()
+TDEAccelAction::TDEAccelAction()
{
- //kdDebug(125) << "KAccelAction(): this = " << this << endl;
- d = new KAccelActionPrivate;
+ //kdDebug(125) << "TDEAccelAction(): this = " << this << endl;
+ d = new TDEAccelActionPrivate;
m_pObjSlot = 0;
m_psMethodSlot = 0;
m_bConfigurable = true;
@@ -55,33 +55,33 @@ KAccelAction::KAccelAction()
d->m_nConnections = 0;
}
-KAccelAction::KAccelAction( const KAccelAction& action )
+TDEAccelAction::TDEAccelAction( const TDEAccelAction& action )
{
- //kdDebug(125) << "KAccelAction( copy from \"" << action.m_sName << "\" ): this = " << this << endl;
- d = new KAccelActionPrivate;
+ //kdDebug(125) << "TDEAccelAction( copy from \"" << action.m_sName << "\" ): this = " << this << endl;
+ d = new TDEAccelActionPrivate;
*this = action;
}
-KAccelAction::KAccelAction( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis,
- const KShortcut& cutDef3, const KShortcut& cutDef4,
+TDEAccelAction::TDEAccelAction( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis,
+ const TDEShortcut& cutDef3, const TDEShortcut& cutDef4,
const TQObject* pObjSlot, const char* psMethodSlot,
bool bConfigurable, bool bEnabled )
{
- //kdDebug(125) << "KAccelAction( \"" << sName << "\" ): this = " << this << endl;
- d = new KAccelActionPrivate;
+ //kdDebug(125) << "TDEAccelAction( \"" << sName << "\" ): this = " << this << endl;
+ d = new TDEAccelActionPrivate;
init( sName, sLabel, sWhatsThis,
cutDef3, cutDef4,
pObjSlot, psMethodSlot,
bConfigurable, bEnabled );
}
-KAccelAction::~KAccelAction()
+TDEAccelAction::~TDEAccelAction()
{
- //kdDebug(125) << "\t\t\tKAccelAction::~KAccelAction( \"" << m_sName << "\" ): this = " << this << endl;
+ //kdDebug(125) << "\t\t\tTDEAccelAction::~TDEAccelAction( \"" << m_sName << "\" ): this = " << this << endl;
delete d;
}
-void KAccelAction::clear()
+void TDEAccelAction::clear()
{
m_cut.clear();
m_pObjSlot = 0;
@@ -92,8 +92,8 @@ void KAccelAction::clear()
d->m_nConnections = 0;
}
-bool KAccelAction::init( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis,
- const KShortcut& rgCutDefaults3, const KShortcut& rgCutDefaults4,
+bool TDEAccelAction::init( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis,
+ const TDEShortcut& rgCutDefaults3, const TDEShortcut& rgCutDefaults4,
const TQObject* pObjSlot, const char* psMethodSlot,
bool bConfigurable, bool bEnabled )
{
@@ -110,11 +110,11 @@ bool KAccelAction::init( const TQString& sName, const TQString& sLabel, const TQ
m_cut = shortcutDefault();
d->m_nConnections = 0;
if( !m_bEnabled )
- kdDebug(125) << "KAccelAction::init( \"" << sName << "\" ): created with enabled = false" << endl;
+ kdDebug(125) << "TDEAccelAction::init( \"" << sName << "\" ): created with enabled = false" << endl;
return true;
}
-KAccelAction& KAccelAction::operator =( const KAccelAction& action )
+TDEAccelAction& TDEAccelAction::operator =( const TDEAccelAction& action )
{
m_sName = action.m_sName;
m_sLabel = action.m_sLabel;
@@ -132,37 +132,37 @@ KAccelAction& KAccelAction::operator =( const KAccelAction& action )
return *this;
}
-void KAccelAction::setName( const TQString& s )
+void TDEAccelAction::setName( const TQString& s )
{ m_sName = s; }
-void KAccelAction::setLabel( const TQString& s )
+void TDEAccelAction::setLabel( const TQString& s )
{ m_sLabel = s; }
-void KAccelAction::setWhatsThis( const TQString& s )
+void TDEAccelAction::setWhatsThis( const TQString& s )
{ m_sWhatsThis = s; }
-bool KAccelAction::setShortcut( const KShortcut& cut )
+bool TDEAccelAction::setShortcut( const TDEShortcut& cut )
{
m_cut = cut;
return true;
}
-void KAccelAction::setSlot( const TQObject* pObjSlot, const char* psMethodSlot )
+void TDEAccelAction::setSlot( const TQObject* pObjSlot, const char* psMethodSlot )
{
m_pObjSlot = pObjSlot;
m_psMethodSlot = psMethodSlot;
}
-void KAccelAction::setConfigurable( bool b )
+void TDEAccelAction::setConfigurable( bool b )
{ m_bConfigurable = b; }
-void KAccelAction::setEnabled( bool b )
+void TDEAccelAction::setEnabled( bool b )
{ m_bEnabled = b; }
-TQString KAccelAction::toString() const
+TQString TDEAccelAction::toString() const
{ return m_cut.toString(); }
-TQString KAccelAction::toStringInternal() const
+TQString TDEAccelAction::toStringInternal() const
{ return m_cut.toStringInternal( &shortcutDefault() ); }
-bool KAccelAction::setKeySequence( uint i, const KKeySequence& seq )
+bool TDEAccelAction::setKeySequence( uint i, const KKeySequence& seq )
{
if( i < m_cut.count() ) {
m_cut.setSeq( i, seq );
@@ -172,12 +172,12 @@ bool KAccelAction::setKeySequence( uint i, const KKeySequence& seq )
return false;
}
-void KAccelAction::clearShortcut()
+void TDEAccelAction::clearShortcut()
{
m_cut.clear();
}
-bool KAccelAction::contains( const KKeySequence& seq )
+bool TDEAccelAction::contains( const KKeySequence& seq )
{
return m_cut.contains( seq );
for( uint i = 0; i < m_cut.count(); i++ ) {
@@ -187,90 +187,90 @@ bool KAccelAction::contains( const KKeySequence& seq )
return false;
}
-const KShortcut& KAccelAction::shortcutDefault() const
+const TDEShortcut& TDEAccelAction::shortcutDefault() const
{ return (useFourModifierKeys()) ? m_cutDefault4 : m_cutDefault3; }
-bool KAccelAction::isConnected() const
+bool TDEAccelAction::isConnected() const
{ return d->m_nConnections; }
-void KAccelAction::incConnections()
+void TDEAccelAction::incConnections()
{ d->m_nConnections++; }
-void KAccelAction::decConnections()
+void TDEAccelAction::decConnections()
{ if( d->m_nConnections > 0 ) d->m_nConnections--; }
// Indicate whether to default to the 3- or 4- modifier keyboard schemes
-int KAccelAction::g_bUseFourModifierKeys = -1;
+int TDEAccelAction::g_bUseFourModifierKeys = -1;
-bool KAccelAction::useFourModifierKeys()
+bool TDEAccelAction::useFourModifierKeys()
{
- if( KAccelAction::g_bUseFourModifierKeys == -1 ) {
+ if( TDEAccelAction::g_bUseFourModifierKeys == -1 ) {
// Read in whether to use 4 modifier keys
- KConfigGroupSaver cgs( KGlobal::config(), "Keyboard" );
- bool b = KGlobal::config()->readBoolEntry( "Use Four Modifier Keys", false );
- KAccelAction::g_bUseFourModifierKeys = b && KKeyNative::keyboardHasWinKey();
+ TDEConfigGroupSaver cgs( TDEGlobal::config(), "Keyboard" );
+ bool b = TDEGlobal::config()->readBoolEntry( "Use Four Modifier Keys", false );
+ TDEAccelAction::g_bUseFourModifierKeys = b && KKeyNative::keyboardHasWinKey();
}
- return KAccelAction::g_bUseFourModifierKeys == 1;
+ return TDEAccelAction::g_bUseFourModifierKeys == 1;
}
-void KAccelAction::useFourModifierKeys( bool b )
+void TDEAccelAction::useFourModifierKeys( bool b )
{
- if( KAccelAction::g_bUseFourModifierKeys != (int)b ) {
- KAccelAction::g_bUseFourModifierKeys = b && KKeyNative::keyboardHasWinKey();
+ if( TDEAccelAction::g_bUseFourModifierKeys != (int)b ) {
+ TDEAccelAction::g_bUseFourModifierKeys = b && KKeyNative::keyboardHasWinKey();
// If we're 'turning off' the meta key or, if we're turning it on,
// the keyboard must actually have a meta key.
if( b && !KKeyNative::keyboardHasWinKey() )
kdDebug(125) << "Tried to use four modifier keys on a keyboard layout without a Meta key.\n";
}
- KConfigGroupSaver cgs( KGlobal::config(), "Keyboard" );
- KGlobal::config()->writeEntry( "Use Four Modifier Keys", KAccelAction::g_bUseFourModifierKeys, true, true);
+ TDEConfigGroupSaver cgs( TDEGlobal::config(), "Keyboard" );
+ TDEGlobal::config()->writeEntry( "Use Four Modifier Keys", TDEAccelAction::g_bUseFourModifierKeys, true, true);
- kdDebug(125) << "bUseFourModifierKeys = " << KAccelAction::g_bUseFourModifierKeys << endl;
+ kdDebug(125) << "bUseFourModifierKeys = " << TDEAccelAction::g_bUseFourModifierKeys << endl;
}
//---------------------------------------------------------------------
-// KAccelActions
+// TDEAccelActions
//---------------------------------------------------------------------
-class KAccelActionsPrivate
+class TDEAccelActionsPrivate
{
public:
};
-KAccelActions::KAccelActions()
+TDEAccelActions::TDEAccelActions()
{
- kdDebug(125) << "KAccelActions(): this = " << this << endl;
+ kdDebug(125) << "TDEAccelActions(): this = " << this << endl;
initPrivate( 0 );
}
-KAccelActions::KAccelActions( const KAccelActions& actions )
+TDEAccelActions::TDEAccelActions( const TDEAccelActions& actions )
{
- kdDebug(125) << "KAccelActions( actions = " << &actions << " ): this = " << this << endl;
+ kdDebug(125) << "TDEAccelActions( actions = " << &actions << " ): this = " << this << endl;
initPrivate( 0 );
init( actions );
}
-KAccelActions::KAccelActions( KAccelBase* pKAccelBase )
+TDEAccelActions::TDEAccelActions( TDEAccelBase* pTDEAccelBase )
{
- kdDebug(125) << "KAccelActions( KAccelBase = " << pKAccelBase << " ): this = " << this << endl;
- initPrivate( pKAccelBase );
+ kdDebug(125) << "TDEAccelActions( TDEAccelBase = " << pTDEAccelBase << " ): this = " << this << endl;
+ initPrivate( pTDEAccelBase );
}
-KAccelActions::~KAccelActions()
+TDEAccelActions::~TDEAccelActions()
{
- //kdDebug(125) << "KAccelActions::~KAccelActions(): this = " << this << endl;
+ //kdDebug(125) << "TDEAccelActions::~TDEAccelActions(): this = " << this << endl;
clear();
//delete d;
}
-void KAccelActions::initPrivate( KAccelBase* pKAccelBase )
+void TDEAccelActions::initPrivate( TDEAccelBase* pTDEAccelBase )
{
- m_pKAccelBase = pKAccelBase;
+ m_pTDEAccelBase = pTDEAccelBase;
m_nSizeAllocated = m_nSize = 0;
m_prgActions = 0;
- //d = new KAccelActionsPrivate;
+ //d = new TDEAccelActionsPrivate;
}
-void KAccelActions::clear()
+void TDEAccelActions::clear()
{
- kdDebug(125) << "\tKAccelActions::clear()" << endl;
+ kdDebug(125) << "\tTDEAccelActions::clear()" << endl;
for( uint i = 0; i < m_nSize; i++ )
delete m_prgActions[i];
delete[] m_prgActions;
@@ -279,14 +279,14 @@ void KAccelActions::clear()
m_prgActions = 0;
}
-bool KAccelActions::init( const KAccelActions& actions )
+bool TDEAccelActions::init( const TDEAccelActions& actions )
{
clear();
resize( actions.count() );
for( uint i = 0; i < m_nSize; i++ ) {
- KAccelAction* pAction = actions.m_prgActions[i];
+ TDEAccelAction* pAction = actions.m_prgActions[i];
if( pAction )
- m_prgActions[i] = new KAccelAction( *pAction );
+ m_prgActions[i] = new TDEAccelAction( *pAction );
else
m_prgActions[i] = 0;
}
@@ -294,22 +294,22 @@ bool KAccelActions::init( const KAccelActions& actions )
return true;
}
-bool KAccelActions::init( KConfigBase& config, const TQString& sGroup )
+bool TDEAccelActions::init( TDEConfigBase& config, const TQString& sGroup )
{
- kdDebug(125) << "KAccelActions::init( " << sGroup << " )" << endl;
+ kdDebug(125) << "TDEAccelActions::init( " << sGroup << " )" << endl;
TQMap<TQString, TQString> mapEntry = config.entryMap( sGroup );
resize( mapEntry.count() );
TQMap<TQString, TQString>::Iterator it( mapEntry.begin() );
for( uint i = 0; it != mapEntry.end(); ++it, i++ ) {
TQString sShortcuts = *it;
- KShortcut cuts;
+ TDEShortcut cuts;
kdDebug(125) << it.key() << " = " << sShortcuts << endl;
if( !sShortcuts.isEmpty() && sShortcuts != "none" )
cuts.init( sShortcuts );
- m_prgActions[i] = new KAccelAction( it.key(), it.key(), it.key(),
+ m_prgActions[i] = new TDEAccelAction( it.key(), it.key(), it.key(),
cuts, cuts,
0, 0, // pObjSlot, psMethodSlot,
true, false ); // bConfigurable, bEnabled
@@ -318,11 +318,11 @@ bool KAccelActions::init( KConfigBase& config, const TQString& sGroup )
return true;
}
-void KAccelActions::resize( uint nSize )
+void TDEAccelActions::resize( uint nSize )
{
if( nSize > m_nSizeAllocated ) {
uint nSizeAllocated = ((nSize/10) + 1) * 10;
- KAccelAction** prgActions = new KAccelAction* [nSizeAllocated];
+ TDEAccelAction** prgActions = new TDEAccelAction* [nSizeAllocated];
// Copy pointers over to new array
for( uint i = 0; i < m_nSizeAllocated; i++ )
@@ -340,21 +340,21 @@ void KAccelActions::resize( uint nSize )
m_nSize = nSize;
}
-void KAccelActions::insertPtr( KAccelAction* pAction )
+void TDEAccelActions::insertPtr( TDEAccelAction* pAction )
{
resize( m_nSize + 1 );
m_prgActions[m_nSize-1] = pAction;
}
-void KAccelActions::updateShortcuts( KAccelActions& actions2 )
+void TDEAccelActions::updateShortcuts( TDEAccelActions& actions2 )
{
- kdDebug(125) << "KAccelActions::updateShortcuts()" << endl;
+ kdDebug(125) << "TDEAccelActions::updateShortcuts()" << endl;
bool bChanged = false;
for( uint i = 0; i < m_nSize; i++ ) {
- KAccelAction* pAction = m_prgActions[i];
+ TDEAccelAction* pAction = m_prgActions[i];
if( pAction && pAction->m_bConfigurable ) {
- KAccelAction* pAction2 = actions2.actionPtr( pAction->m_sName );
+ TDEAccelAction* pAction2 = actions2.actionPtr( pAction->m_sName );
if( pAction2 ) {
TQString sOld = pAction->m_cut.toStringInternal();
pAction->m_cut = pAction2->m_cut;
@@ -371,68 +371,68 @@ void KAccelActions::updateShortcuts( KAccelActions& actions2 )
emitKeycodeChanged();
}
-int KAccelActions::actionIndex( const TQString& sAction ) const
+int TDEAccelActions::actionIndex( const TQString& sAction ) const
{
for( uint i = 0; i < m_nSize; i++ ) {
if( m_prgActions[i] == 0 )
- kdWarning(125) << "KAccelActions::actionPtr( " << sAction << " ): encountered null pointer at m_prgActions[" << i << "]" << endl;
+ kdWarning(125) << "TDEAccelActions::actionPtr( " << sAction << " ): encountered null pointer at m_prgActions[" << i << "]" << endl;
else if( m_prgActions[i]->m_sName == sAction )
return (int) i;
}
return -1;
}
-KAccelAction* KAccelActions::actionPtr( uint i )
+TDEAccelAction* TDEAccelActions::actionPtr( uint i )
{
return m_prgActions[i];
}
-const KAccelAction* KAccelActions::actionPtr( uint i ) const
+const TDEAccelAction* TDEAccelActions::actionPtr( uint i ) const
{
return m_prgActions[i];
}
-KAccelAction* KAccelActions::actionPtr( const TQString& sAction )
+TDEAccelAction* TDEAccelActions::actionPtr( const TQString& sAction )
{
int i = actionIndex( sAction );
return (i >= 0) ? m_prgActions[i] : 0;
}
-const KAccelAction* KAccelActions::actionPtr( const TQString& sAction ) const
+const TDEAccelAction* TDEAccelActions::actionPtr( const TQString& sAction ) const
{
int i = actionIndex( sAction );
return (i >= 0) ? m_prgActions[i] : 0;
}
-KAccelAction* KAccelActions::actionPtr( KKeySequence cut )
+TDEAccelAction* TDEAccelActions::actionPtr( KKeySequence cut )
{
for( uint i = 0; i < m_nSize; i++ ) {
if( m_prgActions[i] == 0 )
- kdWarning(125) << "KAccelActions::actionPtr( " << cut.toStringInternal() << " ): encountered null pointer at m_prgActions[" << i << "]" << endl;
+ kdWarning(125) << "TDEAccelActions::actionPtr( " << cut.toStringInternal() << " ): encountered null pointer at m_prgActions[" << i << "]" << endl;
else if( m_prgActions[i]->contains( cut ) )
return m_prgActions[i];
}
return 0;
}
-KAccelAction& KAccelActions::operator []( uint i )
+TDEAccelAction& TDEAccelActions::operator []( uint i )
{
return *actionPtr( i );
}
-const KAccelAction& KAccelActions::operator []( uint i ) const
+const TDEAccelAction& TDEAccelActions::operator []( uint i ) const
{
return *actionPtr( i );
}
-KAccelAction* KAccelActions::insert( const TQString& sName, const TQString& sLabel )
+TDEAccelAction* TDEAccelActions::insert( const TQString& sName, const TQString& sLabel )
{
if( actionPtr( sName ) ) {
- kdWarning(125) << "KAccelActions::insertLabel( " << sName << ", " << sLabel << " ): action with same name already present." << endl;
+ kdWarning(125) << "TDEAccelActions::insertLabel( " << sName << ", " << sLabel << " ): action with same name already present." << endl;
return 0;
}
- KAccelAction* pAction = new KAccelAction;
+ TDEAccelAction* pAction = new TDEAccelAction;
pAction->m_sName = sName;
pAction->m_sLabel = sLabel;
pAction->m_bConfigurable = false;
@@ -442,38 +442,38 @@ KAccelAction* KAccelActions::insert( const TQString& sName, const TQString& sLab
return pAction;
}
-KAccelAction* KAccelActions::insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis,
- const KShortcut& rgCutDefaults3, const KShortcut& rgCutDefaults4,
+TDEAccelAction* TDEAccelActions::insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis,
+ const TDEShortcut& rgCutDefaults3, const TDEShortcut& rgCutDefaults4,
const TQObject* pObjSlot, const char* psMethodSlot,
bool bConfigurable, bool bEnabled )
{
- //kdDebug(125) << "KAccelActions::insert()2 begin" << endl;
+ //kdDebug(125) << "TDEAccelActions::insert()2 begin" << endl;
if( actionPtr( sAction ) ) {
- kdWarning(125) << "KAccelActions::insert( " << sAction << " ): action with same name already present." << endl;
+ kdWarning(125) << "TDEAccelActions::insert( " << sAction << " ): action with same name already present." << endl;
return 0;
}
- KAccelAction* pAction = new KAccelAction(
+ TDEAccelAction* pAction = new TDEAccelAction(
sAction, sLabel, sWhatsThis,
rgCutDefaults3, rgCutDefaults4,
pObjSlot, psMethodSlot,
bConfigurable, bEnabled );
insertPtr( pAction );
- //kdDebug(125) << "KAccelActions::insert()2 end" << endl;
+ //kdDebug(125) << "TDEAccelActions::insert()2 end" << endl;
return pAction;
}
-bool KAccelActions::remove( const TQString& sAction )
+bool TDEAccelActions::remove( const TQString& sAction )
{
- kdDebug(125) << "KAccelActions::remove( \"" << sAction << "\" ): this = " << this << " m_pKAccelBase = " << m_pKAccelBase << endl;
+ kdDebug(125) << "TDEAccelActions::remove( \"" << sAction << "\" ): this = " << this << " m_pTDEAccelBase = " << m_pTDEAccelBase << endl;
int iAction = actionIndex( sAction );
if( iAction < 0 )
return false;
- if( m_pKAccelBase )
- m_pKAccelBase->slotRemoveAction( m_prgActions[iAction] );
+ if( m_pTDEAccelBase )
+ m_pTDEAccelBase->slotRemoveAction( m_prgActions[iAction] );
delete m_prgActions[iAction];
for( uint i = iAction; i < m_nSize - 1; i++ )
@@ -483,39 +483,39 @@ bool KAccelActions::remove( const TQString& sAction )
return true;
}
-bool KAccelActions::readActions( const TQString& sConfigGroup, KConfigBase* pConfig )
+bool TDEAccelActions::readActions( const TQString& sConfigGroup, TDEConfigBase* pConfig )
{
- KAccelShortcutList accelList(*this, false);
+ TDEAccelShortcutList accelList(*this, false);
return accelList.readSettings( sConfigGroup, pConfig );
}
/*
- 1) KAccelAction = "Something"
+ 1) TDEAccelAction = "Something"
1) KKeySequence = "Meta+X,Asterisk"
- 1) KAccelSequence = "Meta+X"
+ 1) TDEAccelSequence = "Meta+X"
1) KKeySequence = Meta+X
- 2) KAccelSequence = "Asterisk"
+ 2) TDEAccelSequence = "Asterisk"
1) KKeySequence = Shift+8 (English layout)
2) KKeySequence = Keypad_Asterisk
2) KKeySequence = "Alt+F2"
- 1) KAccelSequence = "Alt+F2"
+ 1) TDEAccelSequence = "Alt+F2"
1) KKeySequence = Alt+F2
-> "Something=Meta+X,Asterisk;Alt+F2"
*/
-bool KAccelActions::writeActions( const TQString &sGroup, KConfigBase* pConfig,
+bool TDEAccelActions::writeActions( const TQString &sGroup, TDEConfigBase* pConfig,
bool bWriteAll, bool bGlobal ) const
{
- kdDebug(125) << "KAccelActions::writeActions( " << sGroup << ", " << pConfig << ", " << bWriteAll << ", " << bGlobal << " )" << endl;
+ kdDebug(125) << "TDEAccelActions::writeActions( " << sGroup << ", " << pConfig << ", " << bWriteAll << ", " << bGlobal << " )" << endl;
if( !pConfig )
- pConfig = KGlobal::config();
- KConfigGroupSaver cs( pConfig, sGroup );
+ pConfig = TDEGlobal::config();
+ TDEConfigGroupSaver cs( pConfig, sGroup );
for( uint i = 0; i < m_nSize; i++ ) {
if( m_prgActions[i] == 0 ) {
- kdWarning(125) << "KAccelActions::writeActions(): encountered null pointer at m_prgActions[" << i << "]" << endl;
+ kdWarning(125) << "TDEAccelActions::writeActions(): encountered null pointer at m_prgActions[" << i << "]" << endl;
continue;
}
- const KAccelAction& action = *m_prgActions[i];
+ const TDEAccelAction& action = *m_prgActions[i];
TQString s;
bool bConfigHasAction = !pConfig->readEntry( action.m_sName ).isEmpty();
@@ -555,11 +555,11 @@ bool KAccelActions::writeActions( const TQString &sGroup, KConfigBase* pConfig,
return true;
}
-void KAccelActions::emitKeycodeChanged()
+void TDEAccelActions::emitKeycodeChanged()
{
- if( m_pKAccelBase )
- m_pKAccelBase->emitSignal( KAccelBase::KEYCODE_CHANGED );
+ if( m_pTDEAccelBase )
+ m_pTDEAccelBase->emitSignal( TDEAccelBase::KEYCODE_CHANGED );
}
-uint KAccelActions::count() const
+uint TDEAccelActions::count() const
{ return m_nSize; }
diff --git a/tdecore/kaccelaction.h b/tdecore/tdeaccelaction.h
index 470c70559..e8232cc44 100644
--- a/tdecore/kaccelaction.h
+++ b/tdecore/tdeaccelaction.h
@@ -25,37 +25,37 @@
#include <tqstring.h>
#include <tqvaluevector.h>
-#include <kshortcut.h>
+#include <tdeshortcut.h>
-class KAccelBase;
+class TDEAccelBase;
class TQObject;
-class KConfig;
-class KConfigBase;
+class TDEConfig;
+class TDEConfigBase;
/**
* @internal
- * A KAccelAction prepresents an action that can be executed using
- * an accelerator key. Each KAccelAction has a name, a label, a
- * "What's this" string and a KShortcut. The user can configure and
+ * A TDEAccelAction prepresents an action that can be executed using
+ * an accelerator key. Each TDEAccelAction has a name, a label, a
+ * "What's this" string and a TDEShortcut. The user can configure and
* enable/disable them using KKeyDialog.
*
* \code
- * 1) KAccelAction = "Run Command"
+ * 1) TDEAccelAction = "Run Command"
* Default3 = "Alt+F2"
* Default4 = "Meta+Enter;Alt+F2"
- * 1) KShortcut = "Meta+Enter"
+ * 1) TDEShortcut = "Meta+Enter"
* 1) KKeySequence = "Meta+Enter"
* 1) KKey = "Meta+Enter"
* 1) Meta+Enter
* 2) Meta+Keypad_Enter
- * 2) KShortcut = "Alt+F2"
+ * 2) TDEShortcut = "Alt+F2"
* 1) KKeySequence = "Alt+F2"
* 1) Alt+F2
- * 2) KAccelAction = "Something"
+ * 2) TDEAccelAction = "Something"
* Default3 = ""
* Default4 = ""
- * 1) KShortcut = "Meta+X,Asterisk"
+ * 1) TDEShortcut = "Meta+X,Asterisk"
* 1) KKeySequence = "Meta+X,Asterisk"
* 1) KKey = "Meta+X"
* 1) Meta+X
@@ -64,27 +64,27 @@ class KConfigBase;
* 2) Keypad_Asterisk
* \endcode
* @short An accelerator action
- * @see KAccel
- * @see KGlobalAccel
+ * @see TDEAccel
+ * @see TDEGlobalAccel
* @see KKeyChooser
* @see KKeyDialog
*/
-class TDECORE_EXPORT KAccelAction
+class TDECORE_EXPORT TDEAccelAction
{
public:
/**
- * Creates an empty KAccelAction.
+ * Creates an empty TDEAccelAction.
* @see clear()
*/
- KAccelAction();
+ TDEAccelAction();
/**
* Copy constructor.
*/
- KAccelAction( const KAccelAction& );
+ TDEAccelAction( const TDEAccelAction& );
/**
- * Creates a new KAccelAction.
+ * Creates a new TDEAccelAction.
* @param sName the name of the accelerator
* @param sLabel the label of the accelerator (i18n!)
* @param sWhatsThis the What's This text (18n!)
@@ -97,11 +97,11 @@ class TDECORE_EXPORT KAccelAction
* @param bConfigurable if true the user can configure the shortcut
* @param bEnabled true if the accelerator should be enabled
*/
- KAccelAction( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis,
- const KShortcut& cutDef3, const KShortcut& cutDef4,
+ TDEAccelAction( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis,
+ const TDEShortcut& cutDef3, const TDEShortcut& cutDef4,
const TQObject* pObjSlot, const char* psMethodSlot,
bool bConfigurable, bool bEnabled );
- ~KAccelAction();
+ ~TDEAccelAction();
/**
* Clears the accelerator.
@@ -109,7 +109,7 @@ class TDECORE_EXPORT KAccelAction
void clear();
/**
- * Re-initialized the KAccelAction.
+ * Re-initialized the TDEAccelAction.
* @param sName the name of the accelerator
* @param sLabel the label of the accelerator (i18n!)
* @param sWhatsThis the What's This text (18n!)
@@ -124,14 +124,14 @@ class TDECORE_EXPORT KAccelAction
* @return true if successful, false otherwise
*/
bool init( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis,
- const KShortcut& cutDef3, const KShortcut& cutDef4,
+ const TDEShortcut& cutDef3, const TDEShortcut& cutDef4,
const TQObject* pObjSlot, const char* psMethodSlot,
bool bConfigurable, bool bEnabled );
/**
- * Copies this KAccelAction.
+ * Copies this TDEAccelAction.
*/
- KAccelAction& operator=( const KAccelAction& );
+ TDEAccelAction& operator=( const TDEAccelAction& );
/**
* Returns the name of the accelerator action.
@@ -156,10 +156,10 @@ class TDECORE_EXPORT KAccelAction
/**
* The shortcut that is actually used (may be used configured).
- * @return the shortcut of the KAccelAction, can be null if not set
+ * @return the shortcut of the TDEAccelAction, can be null if not set
* @see shortcutDefault()
*/
- const KShortcut& shortcut() const { return m_cut; }
+ const TDEShortcut& shortcut() const { return m_cut; }
/**
* The default shortcut for this system.
@@ -168,7 +168,7 @@ class TDECORE_EXPORT KAccelAction
* @see shortcutDefault3()
* @see shortcutDefault4()
*/
- const KShortcut& shortcutDefault() const;
+ const TDEShortcut& shortcutDefault() const;
/**
* The default shortcut for 3 modifier systems.
@@ -178,7 +178,7 @@ class TDECORE_EXPORT KAccelAction
* @see shortcutDefault4()
* @see useFourModifierKeys()
*/
- const KShortcut& shortcutDefault3() const { return m_cutDefault3; }
+ const TDEShortcut& shortcutDefault3() const { return m_cutDefault3; }
/**
* The default shortcut for 4 modifier systems.
@@ -188,7 +188,7 @@ class TDECORE_EXPORT KAccelAction
* @see shortcutDefault3()
* @see useFourModifierKeys()
*/
- const KShortcut& shortcutDefault4() const { return m_cutDefault4; }
+ const TDEShortcut& shortcutDefault4() const { return m_cutDefault4; }
/**
* Returns the receiver of signals.
@@ -237,7 +237,7 @@ class TDECORE_EXPORT KAccelAction
* @param rgCuts the shortcut to set
* @return true if successful, false otherwise
*/
- bool setShortcut( const KShortcut& rgCuts );
+ bool setShortcut( const TDEShortcut& rgCuts );
/**
* Sets the slot of the accelerator action.
@@ -284,14 +284,14 @@ class TDECORE_EXPORT KAccelAction
* @param i the position of the sequence
* @param keySeq the new new sequence
* @return true if successful, false otherwise
- * @see KShortcut::setSeq()
+ * @see TDEShortcut::setSeq()
*/
bool setKeySequence( uint i, const KKeySequence &keySeq );
/**
* Clears the action's shortcut. It will not contain any sequences after
* calling this method.
- * @see KShortcut::clear()
+ * @see TDEShortcut::clear()
*/
void clearShortcut();
@@ -299,14 +299,14 @@ class TDECORE_EXPORT KAccelAction
* Checks whether the action's shortcut contains the given key sequence.
* @param keySeq the key sequence to check
* @return true if the shortcut contains the given sequence
- * @see KShortcut::contains()
+ * @see TDEShortcut::contains()
*/
bool contains( const KKeySequence &keySeq );
/**
* Returns the string representation of the action's shortcut.
* @return the string representation of the action's shortcut.
- * @see KShortcut::toString()
+ * @see TDEShortcut::toString()
*/
TQString toString() const;
@@ -332,8 +332,8 @@ class TDECORE_EXPORT KAccelAction
TQString m_sName /**< Name of accel. @sa setName() */,
m_sLabel /**< Label of accel. User-visible. */,
m_sWhatsThis /**< WhatsThis help for accel. User-visible. */;
- KShortcut m_cut /**< Shortcut actually assigned. */;
- KShortcut m_cutDefault3 /**< Default shortcut in 3-modifier layout */,
+ TDEShortcut m_cut /**< Shortcut actually assigned. */;
+ TDEShortcut m_cutDefault3 /**< Default shortcut in 3-modifier layout */,
m_cutDefault4 /**< Default shortcur in 4-modifier layout */;
const TQObject* m_pObjSlot /**< Object we will send signals to. */;
const char* m_psMethodSlot /**< Slot we send signals to, in m_pObjSlot */;
@@ -349,36 +349,36 @@ class TDECORE_EXPORT KAccelAction
private:
static int g_bUseFourModifierKeys;
- class KAccelActionPrivate* d;
+ class TDEAccelActionPrivate* d;
- friend class KAccelActions;
- friend class KAccelBase;
+ friend class TDEAccelActions;
+ friend class TDEAccelBase;
};
//---------------------------------------------------------------------
-// KAccelActions
+// TDEAccelActions
//---------------------------------------------------------------------
/**
* @internal
- * This class represents a collection of KAccelAction objects.
+ * This class represents a collection of TDEAccelAction objects.
*
* @short A collection of accelerator actions
- * @see KAccelAction
+ * @see TDEAccelAction
*/
-class TDECORE_EXPORT KAccelActions
+class TDECORE_EXPORT TDEAccelActions
{
public:
/**
- * Creates a new, empty KAccelActions object.
+ * Creates a new, empty TDEAccelActions object.
*/
- KAccelActions();
+ TDEAccelActions();
/**
* Copy constructor (deep copy).
*/
- KAccelActions( const KAccelActions& );
- virtual ~KAccelActions();
+ TDEAccelActions( const TDEAccelActions& );
+ virtual ~TDEAccelActions();
/**
* Removes all items from this collection.
@@ -391,7 +391,7 @@ class TDECORE_EXPORT KAccelActions
* @param actions the actions to copy
* @return true if successful, false otherwise
*/
- bool init( const KAccelActions &actions );
+ bool init( const TDEAccelActions &actions );
/**
* Loads the actions from the given configuration file.
@@ -400,7 +400,7 @@ class TDECORE_EXPORT KAccelActions
* @param sGroup the group in the configuration file
* @return true if successful, false otherwise
*/
- bool init( KConfigBase& config, const TQString& sGroup );
+ bool init( TDEConfigBase& config, const TQString& sGroup );
/**
* Updates the shortcuts of all actions in this object
@@ -408,7 +408,7 @@ class TDECORE_EXPORT KAccelActions
* @param shortcuts the collection that contains the new
* shortcuts
*/
- void updateShortcuts( KAccelActions &shortcuts );
+ void updateShortcuts( TDEAccelActions &shortcuts );
/**
* Retrieves the index of the action with the given name.
@@ -421,63 +421,63 @@ class TDECORE_EXPORT KAccelActions
* Returns the action with the given @p index.
* @param index the index of an action. You must not
* use an index that is too high.
- * @return the KAccelAction with the given index
+ * @return the TDEAccelAction with the given index
* @see count()
*/
- KAccelAction* actionPtr( uint index );
+ TDEAccelAction* actionPtr( uint index );
/**
* Returns the action with the given @p index.
* @param index the index of an action. You must not
* use an index that is too high.
- * @return the KAccelAction with the given index
+ * @return the TDEAccelAction with the given index
* @see count()
*/
- const KAccelAction* actionPtr( uint index ) const;
+ const TDEAccelAction* actionPtr( uint index ) const;
/**
* Returns the action with the given name.
* @param sAction the name of the action to search
- * @return the KAccelAction with the given name, or 0
+ * @return the TDEAccelAction with the given name, or 0
* if not found
*/
- KAccelAction* actionPtr( const TQString& sAction );
+ TDEAccelAction* actionPtr( const TQString& sAction );
/**
* Returns the action with the given name.
* @param sAction the name of the action to search
- * @return the KAccelAction with the given name, or 0
+ * @return the TDEAccelAction with the given name, or 0
* if not found
*/
- const KAccelAction* actionPtr( const TQString& sAction ) const;
+ const TDEAccelAction* actionPtr( const TQString& sAction ) const;
/**
* Returns the action with the given key sequence.
* @param cut the sequence to search for
- * @return the KAccelAction with the given sequence, or 0
+ * @return the TDEAccelAction with the given sequence, or 0
* if not found
*/
- KAccelAction* actionPtr( KKeySequence cut );
+ TDEAccelAction* actionPtr( KKeySequence cut );
/**
* Returns the action with the given @p index.
* @param index the index of an action. You must not
* use an index that is too high.
- * @return the KAccelAction with the given index
+ * @return the TDEAccelAction with the given index
* @see actionPtr()
* @see count()
*/
- KAccelAction& operator []( uint index );
+ TDEAccelAction& operator []( uint index );
/**
* Returns the action with the given @p index.
* @param index the index of an action. You must not
* use an index that is too high.
- * @return the KAccelAction with the given index
+ * @return the TDEAccelAction with the given index
* @see actionPtr()
* @see count()
*/
- const KAccelAction& operator []( uint index ) const;
+ const TDEAccelAction& operator []( uint index ) const;
/**
* Inserts an action into the collection.
@@ -494,8 +494,8 @@ class TDECORE_EXPORT KAccelActions
* @param bEnabled if true the accelerator should be enabled
* @return the new action
*/
- KAccelAction* insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis,
- const KShortcut& rgCutDefaults3, const KShortcut& rgCutDefaults4,
+ TDEAccelAction* insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis,
+ const TDEShortcut& rgCutDefaults3, const TDEShortcut& rgCutDefaults4,
const TQObject* pObjSlot = 0, const char* psMethodSlot = 0,
bool bConfigurable = true, bool bEnabled = true );
@@ -505,7 +505,7 @@ class TDECORE_EXPORT KAccelActions
* @param sLabel the label of the accelerator (i18n!)
* @return the new action
*/
- KAccelAction* insert( const TQString& sName, const TQString& sLabel );
+ TDEAccelAction* insert( const TQString& sName, const TQString& sLabel );
/**
* Removes the given action.
@@ -521,7 +521,7 @@ class TDECORE_EXPORT KAccelActions
* @param pConfig the configuration file to load from
* @return true if successful, false otherwise
*/
- bool readActions( const TQString& sConfigGroup = "Shortcuts", KConfigBase* pConfig = 0 );
+ bool readActions( const TQString& sConfigGroup = "Shortcuts", TDEConfigBase* pConfig = 0 );
/**
* Writes the actions to the given configuration file.
@@ -532,7 +532,7 @@ class TDECORE_EXPORT KAccelActions
* @param bGlobal true to write to the global configuration file
* @return true if successful, false otherwise
*/
- bool writeActions( const TQString& sConfigGroup = "Shortcuts", KConfigBase* pConfig = 0,
+ bool writeActions( const TQString& sConfigGroup = "Shortcuts", TDEConfigBase* pConfig = 0,
bool bWriteAll = false, bool bGlobal = false ) const;
/**
@@ -548,9 +548,9 @@ class TDECORE_EXPORT KAccelActions
protected:
/** Base object that proxies signals from us. */
- KAccelBase* m_pKAccelBase;
+ TDEAccelBase* m_pTDEAccelBase;
/** Array of actions we're hanging on to. */
- KAccelAction** m_prgActions;
+ TDEAccelAction** m_prgActions;
uint m_nSizeAllocated /**< Allocated size of the array. */,
m_nSize /**< Amount in use. */ ;
@@ -561,16 +561,16 @@ class TDECORE_EXPORT KAccelActions
*/
void resize( uint new_size );
/** Add a action to this collection. @todo Document ownership. */
- void insertPtr( KAccelAction* );
+ void insertPtr( TDEAccelAction* );
private:
- class KAccelActionsPrivate* d;
+ class TDEAccelActionsPrivate* d;
- KAccelActions( KAccelBase* );
- void initPrivate( KAccelBase* );
- KAccelActions& operator =( KAccelActions& );
+ TDEAccelActions( TDEAccelBase* );
+ void initPrivate( TDEAccelBase* );
+ TDEAccelActions& operator =( TDEAccelActions& );
- friend class KAccelBase;
+ friend class TDEAccelBase;
};
#endif // _KACCELACTION_H
diff --git a/tdecore/kaccelbase.cpp b/tdecore/tdeaccelbase.cpp
index 4ba4c9c3b..6673cabb4 100644
--- a/tdecore/kaccelbase.cpp
+++ b/tdecore/tdeaccelbase.cpp
@@ -20,33 +20,33 @@
Boston, MA 02110-1301, USA.
*/
-#include "kaccelbase.h"
+#include "tdeaccelbase.h"
#include <tqkeycode.h>
#include <tqlabel.h>
#include <tqpopupmenu.h>
-#include <kconfig.h>
+#include <tdeconfig.h>
#include "kckey.h"
#include <kdebug.h>
-#include <kglobal.h>
+#include <tdeglobal.h>
#include <kkeynative.h>
#include "kkeyserver.h"
-#include <klocale.h>
-#include "kshortcutmenu.h"
+#include <tdelocale.h>
+#include "tdeshortcutmenu.h"
//---------------------------------------------------------------------
-// class KAccelBase::ActionInfo
+// class TDEAccelBase::ActionInfo
//---------------------------------------------------------------------
//---------------------------------------------------------------------
-// class KAccelBase
+// class TDEAccelBase
//---------------------------------------------------------------------
-KAccelBase::KAccelBase( int fInitCode )
+TDEAccelBase::TDEAccelBase( int fInitCode )
: m_rgActions( this )
{
- kdDebug(125) << "KAccelBase(): this = " << this << endl;
+ kdDebug(125) << "TDEAccelBase(): this = " << this << endl;
m_bNativeKeys = fInitCode & NATIVE_KEYS;
m_bEnabled = true;
m_sConfigGroup = "Shortcuts";
@@ -55,27 +55,27 @@ KAccelBase::KAccelBase( int fInitCode )
mtemp_pActionRemoving = 0;
}
-KAccelBase::~KAccelBase()
+TDEAccelBase::~TDEAccelBase()
{
- kdDebug(125) << "~KAccelBase(): this = " << this << endl;
+ kdDebug(125) << "~TDEAccelBase(): this = " << this << endl;
}
-uint KAccelBase::actionCount() const { return m_rgActions.count(); }
-KAccelActions& KAccelBase::actions() { return m_rgActions; }
-bool KAccelBase::isEnabled() const { return m_bEnabled; }
-// see KGlobalAccel::blockShortcuts() stuff - it's to temporarily block
+uint TDEAccelBase::actionCount() const { return m_rgActions.count(); }
+TDEAccelActions& TDEAccelBase::actions() { return m_rgActions; }
+bool TDEAccelBase::isEnabled() const { return m_bEnabled; }
+// see TDEGlobalAccel::blockShortcuts() stuff - it's to temporarily block
// all global shortcuts, so that the key grabs are released, but from the app's
-// point of view the KGlobalAccel is still enabled, so KGlobalAccel needs
+// point of view the TDEGlobalAccel is still enabled, so TDEGlobalAccel needs
// to disable key grabbing even if enabled
-bool KAccelBase::isEnabledInternal() const { return isEnabled(); }
+bool TDEAccelBase::isEnabledInternal() const { return isEnabled(); }
-KAccelAction* KAccelBase::actionPtr( const TQString& sAction )
+TDEAccelAction* TDEAccelBase::actionPtr( const TQString& sAction )
{ return m_rgActions.actionPtr( sAction ); }
-const KAccelAction* KAccelBase::actionPtr( const TQString& sAction ) const
+const TDEAccelAction* TDEAccelBase::actionPtr( const TQString& sAction ) const
{ return m_rgActions.actionPtr( sAction ); }
-KAccelAction* KAccelBase::actionPtr( const KKeyServer::Key& key )
+TDEAccelAction* TDEAccelBase::actionPtr( const KKeyServer::Key& key )
{
if( !m_mapKeyToAction.contains( key ) )
return 0;
@@ -83,25 +83,25 @@ KAccelAction* KAccelBase::actionPtr( const KKeyServer::Key& key )
return m_mapKeyToAction[key].pAction;
}
-KAccelAction* KAccelBase::actionPtr( const KKey& key )
+TDEAccelAction* TDEAccelBase::actionPtr( const KKey& key )
{
KKeyServer::Key k2;
k2.init( key, !m_bNativeKeys );
return actionPtr( k2 );
}
-void KAccelBase::setConfigGroup( const TQString& sConfigGroup )
+void TDEAccelBase::setConfigGroup( const TQString& sConfigGroup )
{ m_sConfigGroup = sConfigGroup; }
-void KAccelBase::setConfigGlobal( bool global )
+void TDEAccelBase::setConfigGlobal( bool global )
{ m_bConfigIsGlobal = global; }
-bool KAccelBase::setActionEnabled( const TQString& sAction, bool bEnable )
+bool TDEAccelBase::setActionEnabled( const TQString& sAction, bool bEnable )
{
- KAccelAction* pAction = actionPtr( sAction );
+ TDEAccelAction* pAction = actionPtr( sAction );
if( pAction ) {
if( pAction->m_bEnabled != bEnable ) {
- kdDebug(125) << "KAccelBase::setActionEnabled( " << sAction << ", " << bEnable << " )" << endl;
+ kdDebug(125) << "TDEAccelBase::setActionEnabled( " << sAction << ", " << bEnable << " )" << endl;
pAction->m_bEnabled = bEnable;
if( m_bAutoUpdate ) {
// FIXME: the action may already have it's connections inserted!
@@ -116,9 +116,9 @@ bool KAccelBase::setActionEnabled( const TQString& sAction, bool bEnable )
return false;
}
-bool KAccelBase::setAutoUpdate( bool bAuto )
+bool TDEAccelBase::setAutoUpdate( bool bAuto )
{
- kdDebug(125) << "KAccelBase::setAutoUpdate( " << bAuto << " ): m_bAutoUpdate on entrance = " << m_bAutoUpdate << endl;
+ kdDebug(125) << "TDEAccelBase::setAutoUpdate( " << bAuto << " ): m_bAutoUpdate on entrance = " << m_bAutoUpdate << endl;
bool b = m_bAutoUpdate;
if( !m_bAutoUpdate && bAuto )
updateConnections();
@@ -126,13 +126,13 @@ bool KAccelBase::setAutoUpdate( bool bAuto )
return b;
}
-KAccelAction* KAccelBase::insert( const TQString& sAction, const TQString& sDesc, const TQString& sHelp,
- const KShortcut& rgCutDefaults3, const KShortcut& rgCutDefaults4,
+TDEAccelAction* TDEAccelBase::insert( const TQString& sAction, const TQString& sDesc, const TQString& sHelp,
+ const TDEShortcut& rgCutDefaults3, const TDEShortcut& rgCutDefaults4,
const TQObject* pObjSlot, const char* psMethodSlot,
bool bConfigurable, bool bEnabled )
{
- //kdDebug(125) << "KAccelBase::insert() begin" << endl;
- KAccelAction* pAction = m_rgActions.insert(
+ //kdDebug(125) << "TDEAccelBase::insert() begin" << endl;
+ TDEAccelAction* pAction = m_rgActions.insert(
sAction, sDesc, sHelp,
rgCutDefaults3, rgCutDefaults4,
pObjSlot, psMethodSlot,
@@ -141,27 +141,27 @@ KAccelAction* KAccelBase::insert( const TQString& sAction, const TQString& sDesc
if( pAction && m_bAutoUpdate )
insertConnection( pAction );
- //kdDebug(125) << "KAccelBase::insert() end" << endl;
+ //kdDebug(125) << "TDEAccelBase::insert() end" << endl;
return pAction;
}
-KAccelAction* KAccelBase::insert( const TQString& sName, const TQString& sDesc )
+TDEAccelAction* TDEAccelBase::insert( const TQString& sName, const TQString& sDesc )
{ return m_rgActions.insert( sName, sDesc ); }
-bool KAccelBase::remove( const TQString& sAction )
+bool TDEAccelBase::remove( const TQString& sAction )
{
return m_rgActions.remove( sAction );
}
-void KAccelBase::slotRemoveAction( KAccelAction* pAction )
+void TDEAccelBase::slotRemoveAction( TDEAccelAction* pAction )
{
removeConnection( pAction );
}
-bool KAccelBase::setActionSlot( const TQString& sAction, const TQObject* pObjSlot, const char* psMethodSlot )
+bool TDEAccelBase::setActionSlot( const TQString& sAction, const TQObject* pObjSlot, const char* psMethodSlot )
{
- kdDebug(125) << "KAccelBase::setActionSlot( " << sAction << ", " << pObjSlot << ", " << psMethodSlot << " )\n";
- KAccelAction* pAction = m_rgActions.actionPtr( sAction );
+ kdDebug(125) << "TDEAccelBase::setActionSlot( " << sAction << ", " << pObjSlot << ", " << psMethodSlot << " )\n";
+ TDEAccelAction* pAction = m_rgActions.actionPtr( sAction );
if( pAction ) {
// If there was a previous connection, remove it.
if( m_bAutoUpdate && pAction->isConnected() ) {
@@ -182,24 +182,24 @@ bool KAccelBase::setActionSlot( const TQString& sAction, const TQObject* pObjSlo
}
/*
-KAccelBase
+TDEAccelBase
Run Command=Meta+Enter;Alt+F2
- KAccelAction = "Run Command"
- 1) KAccelKeySeries = "Meta+Enter"
+ TDEAccelAction = "Run Command"
+ 1) TDEAccelKeySeries = "Meta+Enter"
1a) Meta+Enter
1b) Meta+Keypad_Enter
- 2) KAccelKeySeries = "Alt+F2"
+ 2) TDEAccelKeySeries = "Alt+F2"
1a) Alt+F2
Konqueror=Meta+I,I
- KAccelAction = "Konqueror"
- 1) KAccelKeySeries = "Meta+I,I"
+ TDEAccelAction = "Konqueror"
+ 1) TDEAccelKeySeries = "Meta+I,I"
1a) Meta+I
2a) I
Something=Meta+Asterisk,X
- KAccelAction = "Something"
- 1) KAccelKeySeries = "Meta+Asterisk,X"
+ TDEAccelAction = "Something"
+ 1) TDEAccelKeySeries = "Meta+Asterisk,X"
1a) Meta+Shift+8
1b) Meta+Keypad_8
2a) X
@@ -215,25 +215,25 @@ connect new key sequences
/*
{
For {
- for( KAccelAction::iterator itAction = m_rgActions.begin(); itAction != m_rgActions.end(); ++itAction ) {
- KAccelAction& action = *itAction;
- for( KAccelSeries::iterator itSeries = action.m_rgSeries.begin(); itSeries != action.m_rgSeries.end(); ++itSeries ) {
- KAccelSeries& series = *itSeries;
+ for( TDEAccelAction::iterator itAction = m_rgActions.begin(); itAction != m_rgActions.end(); ++itAction ) {
+ TDEAccelAction& action = *itAction;
+ for( TDEAccelSeries::iterator itSeries = action.m_rgSeries.begin(); itSeries != action.m_rgSeries.end(); ++itSeries ) {
+ TDEAccelSeries& series = *itSeries;
if(
}
}
}
Sort by: iVariation, iSequence, iSeries, iAction
- 1) KAccelAction = "Run Command"
- 1) KAccelKeySeries = "Meta+Enter"
+ 1) TDEAccelAction = "Run Command"
+ 1) TDEAccelKeySeries = "Meta+Enter"
1a) Meta+Enter
1b) Meta+Keypad_Enter
- 2) KAccelKeySeries = "Alt+F2"
+ 2) TDEAccelKeySeries = "Alt+F2"
1a) Alt+F2
- 2) KAccelAction = "Enter Calculation"
- 1) KAccelKeySeries = "Meta+Keypad_Enter"
+ 2) TDEAccelAction = "Enter Calculation"
+ 1) TDEAccelKeySeries = "Meta+Keypad_Enter"
1a) Meta+Keypad_Enter
List =
@@ -246,7 +246,7 @@ connect new key sequences
*/
#ifdef Q_WS_X11
-struct KAccelBase::X
+struct TDEAccelBase::X
{
uint iAction, iSeq, iVari;
KKeyServer::Key key;
@@ -312,10 +312,10 @@ struct KAccelBase::X
Ctrl+KP_Add => #2
*/
-bool KAccelBase::updateConnections()
+bool TDEAccelBase::updateConnections()
{
#ifdef Q_WS_X11
- kdDebug(125) << "KAccelBase::updateConnections() this = " << this << endl;
+ kdDebug(125) << "TDEAccelBase::updateConnections() this = " << this << endl;
// Retrieve the list of keys to be connected, sorted by priority.
// (key, variation, seq)
TQValueVector<X> rgKeys;
@@ -356,7 +356,7 @@ bool KAccelBase::updateConnections()
if( bNonUnique ) {
// Remove connection to single action if there is one
if( m_mapKeyToAction.contains( key ) ) {
- KAccelAction* pAction = m_mapKeyToAction[key].pAction;
+ TDEAccelAction* pAction = m_mapKeyToAction[key].pAction;
if( pAction ) {
m_mapKeyToAction.remove( key );
disconnectKey( *pAction, key );
@@ -376,7 +376,7 @@ bool KAccelBase::updateConnections()
// Disconnect keys which no longer have bindings:
for( KKeyToActionMap::iterator it = m_mapKeyToAction.begin(); it != m_mapKeyToAction.end(); ++it ) {
const KKeyServer::Key& key = it.key();
- KAccelAction* pAction = (*it).pAction;
+ TDEAccelAction* pAction = (*it).pAction;
// If this key is longer used or it points to a different action now,
if( !mapKeyToAction.contains( key ) || mapKeyToAction[key].pAction != pAction ) {
if( pAction ) {
@@ -392,7 +392,7 @@ bool KAccelBase::updateConnections()
// new action map, but which are _not_ present in the old one.
for( KKeyToActionMap::iterator it = mapKeyToAction.begin(); it != mapKeyToAction.end(); ++it ) {
const KKeyServer::Key& key = it.key();
- KAccelAction* pAction = (*it).pAction;
+ TDEAccelAction* pAction = (*it).pAction;
if( !m_mapKeyToAction.contains( key ) || m_mapKeyToAction[key].pAction != pAction ) {
// TODO: Decide what to do if connect fails.
// Probably should remove this item from map.
@@ -419,16 +419,16 @@ bool KAccelBase::updateConnections()
#ifdef Q_WS_X11
// Construct a list of keys to be connected, sorted highest priority first.
-void KAccelBase::createKeyList( TQValueVector<struct X>& rgKeys )
+void TDEAccelBase::createKeyList( TQValueVector<struct X>& rgKeys )
{
- //kdDebug(125) << "KAccelBase::createKeyList()" << endl;
+ //kdDebug(125) << "TDEAccelBase::createKeyList()" << endl;
if( !isEnabledInternal())
return;
// create the list
// For each action
for( uint iAction = 0; iAction < m_rgActions.count(); iAction++ ) {
- KAccelAction* pAction = m_rgActions.actionPtr( iAction );
+ TDEAccelAction* pAction = m_rgActions.actionPtr( iAction );
if( pAction && pAction->m_pObjSlot && pAction->m_psMethodSlot && pAction != mtemp_pActionRemoving ) {
// For each key sequence associated with action
for( uint iSeq = 0; iSeq < pAction->shortcut().count(); iSeq++ ) {
@@ -453,12 +453,12 @@ void KAccelBase::createKeyList( TQValueVector<struct X>& rgKeys )
}
#endif //Q_WS_X11
-bool KAccelBase::insertConnection( KAccelAction* pAction )
+bool TDEAccelBase::insertConnection( TDEAccelAction* pAction )
{
if( !pAction->m_pObjSlot || !pAction->m_psMethodSlot )
return true;
- kdDebug(125) << "KAccelBase::insertConnection( " << pAction << "=\"" << pAction->m_sName << "\"; shortcut = " << pAction->shortcut().toStringInternal() << " ) this = " << this << endl;
+ kdDebug(125) << "TDEAccelBase::insertConnection( " << pAction << "=\"" << pAction->m_sName << "\"; shortcut = " << pAction->shortcut().toStringInternal() << " ) this = " << this << endl;
// For each sequence associated with the given action:
for( uint iSeq = 0; iSeq < pAction->shortcut().count(); iSeq++ ) {
@@ -502,7 +502,7 @@ bool KAccelBase::insertConnection( KAccelAction* pAction )
}
//kdDebug(125) << "\tActions = " << m_rgActions.size() << endl;
- //for( KAccelActions::const_iterator it = m_rgActions.begin(); it != m_rgActions.end(); ++it ) {
+ //for( TDEAccelActions::const_iterator it = m_rgActions.begin(); it != m_rgActions.end(); ++it ) {
// kdDebug(125) << "\t" << &(*it) << " '" << (*it).m_sName << "'" << endl;
//}
@@ -516,9 +516,9 @@ bool KAccelBase::insertConnection( KAccelAction* pAction )
return true;
}
-bool KAccelBase::removeConnection( KAccelAction* pAction )
+bool TDEAccelBase::removeConnection( TDEAccelAction* pAction )
{
- kdDebug(125) << "KAccelBase::removeConnection( " << pAction << " = \"" << pAction->m_sName << "\"; shortcut = " << pAction->m_cut.toStringInternal() << " ): this = " << this << endl;
+ kdDebug(125) << "TDEAccelBase::removeConnection( " << pAction << " = \"" << pAction->m_sName << "\"; shortcut = " << pAction->m_cut.toStringInternal() << " ): this = " << this << endl;
//for( KKeyToActionMap::iterator it = m_mapKeyToAction.begin(); it != m_mapKeyToAction.end(); ++it )
// kdDebug(125) << "\tKey: " << it.key().toString() << " => '" << (*it)->m_sName << "'" << " " << *it << endl;
@@ -548,9 +548,9 @@ bool KAccelBase::removeConnection( KAccelAction* pAction )
return true;
}
-bool KAccelBase::setShortcut( const TQString& sAction, const KShortcut& cut )
+bool TDEAccelBase::setShortcut( const TQString& sAction, const TDEShortcut& cut )
{
- KAccelAction* pAction = actionPtr( sAction );
+ TDEAccelAction* pAction = actionPtr( sAction );
if( pAction ) {
if( m_bAutoUpdate )
removeConnection( pAction );
@@ -564,26 +564,26 @@ bool KAccelBase::setShortcut( const TQString& sAction, const KShortcut& cut )
return false;
}
-void KAccelBase::readSettings( KConfigBase* pConfig )
+void TDEAccelBase::readSettings( TDEConfigBase* pConfig )
{
m_rgActions.readActions( m_sConfigGroup, pConfig );
if( m_bAutoUpdate )
updateConnections();
}
-void KAccelBase::writeSettings( KConfigBase* pConfig ) const
+void TDEAccelBase::writeSettings( TDEConfigBase* pConfig ) const
{
m_rgActions.writeActions( m_sConfigGroup, pConfig, m_bConfigIsGlobal, m_bConfigIsGlobal );
}
-TQPopupMenu* KAccelBase::createPopupMenu( TQWidget* pParent, const KKeySequence& seq )
+TQPopupMenu* TDEAccelBase::createPopupMenu( TQWidget* pParent, const KKeySequence& seq )
{
- KShortcutMenu* pMenu = new KShortcutMenu( pParent, &actions(), seq );
+ TDEShortcutMenu* pMenu = new TDEShortcutMenu( pParent, &actions(), seq );
bool bActionInserted = false;
bool bInsertSeparator = false;
for( uint i = 0; i < actionCount(); i++ ) {
- const KAccelAction* pAction = actions().actionPtr( i );
+ const TDEAccelAction* pAction = actions().actionPtr( i );
if( !pAction->isEnabled() )
continue;
diff --git a/tdecore/kaccelbase.h b/tdecore/tdeaccelbase.h
index 082f09324..377589718 100644
--- a/tdecore/kaccelbase.h
+++ b/tdecore/tdeaccelbase.h
@@ -26,7 +26,7 @@
#include <tqvaluevector.h>
#include <tqvaluelist.h>
-#include "kaccelaction.h"
+#include "tdeaccelaction.h"
#include "kkeyserver.h"
class TQPopupMenu;
@@ -42,7 +42,7 @@ class TQWidget;
* key bindings through application configuration files or through the
* KKeyChooser GUI.
*
- * A KAccel contains a list of accelerator items. Each accelerator item
+ * A TDEAccel contains a list of accelerator items. Each accelerator item
* consists of an action name and a keyboard code combined with modifiers
* (Shift, Ctrl and Alt.)
*
@@ -55,7 +55,7 @@ class TQWidget;
* connected. Accelerator items can be connected so that a key will activate
* two different slots.
*
- * A KAccel object handles key events sent to its parent widget and to all
+ * A TDEAccel object handles key events sent to its parent widget and to all
* children of this parent widget.
*
* Key binding reconfiguration during run time can be prevented by specifying
@@ -74,33 +74,33 @@ class TQWidget;
* The translated first argument for insertItem() is used only
* in the configuration dialog.
*\code
- * KAccel *a = new KAccel( myWindow );
+ * TDEAccel *a = new TDEAccel( myWindow );
* // Insert an action "Scroll Up" which is associated with the "Up" key:
* a->insertItem( i18n("Scroll Up"), "Scroll Up", "Up" );
* // Insert an action "Scroll Down" which is not associated with any key:
* a->insertItem( i18n("Scroll Down"), "Scroll Down", 0);
* a->connectItem( "Scroll up", myWindow, TQT_SLOT( scrollUp() ) );
- * // a->insertStdItem( KStdAccel::Print ); //not necessary, since it
+ * // a->insertStdItem( TDEStdAccel::Print ); //not necessary, since it
* // is done automatially with the
* // connect below!
- * a->connectItem(KStdAccel::Print, myWindow, TQT_SLOT( printDoc() ) );
+ * a->connectItem(TDEStdAccel::Print, myWindow, TQT_SLOT( printDoc() ) );
*
* a->readSettings();
*\endcode
*
* If a shortcut has a menu entry as well, you could insert them like
- * this. The example is again the KStdAccel::Print from above.
+ * this. The example is again the TDEStdAccel::Print from above.
*
* \code
* int id;
* id = popup->insertItem("&Print",this, TQT_SLOT(printDoc()));
- * a->changeMenuAccel(popup, id, KStdAccel::Print );
+ * a->changeMenuAccel(popup, id, TDEStdAccel::Print );
* \endcode
*
* If you want a somewhat "exotic" name for your standard print action, like
* id = popup->insertItem(i18n("Print &Document"),this, TQT_SLOT(printDoc()));
* it might be a good idea to insert the standard action before as
- * a->insertStdItem( KStdAccel::Print, i18n("Print Document") )
+ * a->insertStdItem( TDEStdAccel::Print, i18n("Print Document") )
* as well, so that the user can easily find the corresponding function.
*
* This technique works for other actions as well. Your "scroll up" function
@@ -118,10 +118,10 @@ class TQWidget;
* @short Configurable key binding support.
*/
-class TDECORE_EXPORT KAccelBase
+class TDECORE_EXPORT TDEAccelBase
{
public:
- /** Initialization mode of the KAccelBase, used in constructor. */
+ /** Initialization mode of the TDEAccelBase, used in constructor. */
enum Init { QT_KEYS = 0x00, NATIVE_KEYS = 0x01 };
/** Enum for kinds of signals which may be emitted. */
@@ -130,32 +130,32 @@ class TDECORE_EXPORT KAccelBase
/** Constructor. @p fInitCode should be a bitwise OR of
* values from the Init enum.
*/
- KAccelBase( int fInitCode );
- virtual ~KAccelBase();
+ TDEAccelBase( int fInitCode );
+ virtual ~TDEAccelBase();
/** Returns number of actions in this handler. */
uint actionCount() const;
/** Returns a list of all the actions in this handler. */
- KAccelActions& actions();
+ TDEAccelActions& actions();
/** Returns whether this accelerator handler is enabled or not. */
bool isEnabled() const;
- /** Returns a pointer to the KAccelAction named @p sAction. */
- KAccelAction* actionPtr( const TQString& sAction );
+ /** Returns a pointer to the TDEAccelAction named @p sAction. */
+ TDEAccelAction* actionPtr( const TQString& sAction );
/** Const version of the above. */
- const KAccelAction* actionPtr( const TQString& sAction ) const;
- /** Returns a pointer to the KAccelAction associated with
+ const TDEAccelAction* actionPtr( const TQString& sAction ) const;
+ /** Returns a pointer to the TDEAccelAction associated with
* the key @p key. This function takes into account the
* key mapping defined in the constructor.
*
* May return 0 if no (or more than one)
* action is associated with the key.
*/
- KAccelAction* actionPtr( const KKey& key );
+ TDEAccelAction* actionPtr( const KKey& key );
/** Basically the same as above, except a KKeyServer::Key
* already has a key mapping defined (either NATIVE_KEYS or not).
*/
- KAccelAction* actionPtr( const KKeyServer::Key& key );
+ TDEAccelAction* actionPtr( const KKeyServer::Key& key );
/** Returns the name of the configuration group these
* accelerators are stored in. The default is "Shortcuts".
@@ -181,10 +181,10 @@ class TDECORE_EXPORT KAccelBase
// Procedures for manipulating Actions.
//void clearActions();
- KAccelAction* insert( const TQString& sName, const TQString& sDesc );
- KAccelAction* insert(
+ TDEAccelAction* insert( const TQString& sName, const TQString& sDesc );
+ TDEAccelAction* insert(
const TQString& sAction, const TQString& sDesc, const TQString& sHelp,
- const KShortcut& rgCutDefaults3, const KShortcut& rgCutDefaults4,
+ const TDEShortcut& rgCutDefaults3, const TDEShortcut& rgCutDefaults4,
const TQObject* pObjSlot, const char* psMethodSlot,
bool bConfigurable = true, bool bEnabled = true );
bool remove( const TQString& sAction );
@@ -192,7 +192,7 @@ class TDECORE_EXPORT KAccelBase
bool updateConnections();
- bool setShortcut( const TQString& sAction, const KShortcut& cut );
+ bool setShortcut( const TQString& sAction, const TDEShortcut& cut );
// Modify individual Action sub-items
bool setActionEnabled( const TQString& sAction, bool bEnable );
@@ -200,25 +200,25 @@ class TDECORE_EXPORT KAccelBase
/**
* Read all key associations from @p config, or (if @p config
* is zero) from the application's configuration file
- * KGlobal::config().
+ * TDEGlobal::config().
*
* The group in which the configuration is stored can be
* set with setConfigGroup().
*/
- void readSettings( KConfigBase* pConfig = 0 );
+ void readSettings( TDEConfigBase* pConfig = 0 );
/**
* Write the current configurable associations to @p config,
* or (if @p config is zero) to the application's
* configuration file.
*/
- void writeSettings( KConfigBase* pConfig = 0 ) const;
+ void writeSettings( TDEConfigBase* pConfig = 0 ) const;
TQPopupMenu* createPopupMenu( TQWidget* pParent, const KKeySequence& );
// Protected methods
protected:
- void slotRemoveAction( KAccelAction* );
+ void slotRemoveAction( TDEAccelAction* );
struct X;
@@ -226,8 +226,8 @@ class TDECORE_EXPORT KAccelBase
* @param rgKeys constructed list of keys
*/
void createKeyList( TQValueVector<struct X>& rgKeys );
- bool insertConnection( KAccelAction* );
- bool removeConnection( KAccelAction* );
+ bool insertConnection( TDEAccelAction* );
+ bool removeConnection( TDEAccelAction* );
/** Emits a signal.
* @param signal signal to be emitted
@@ -237,14 +237,14 @@ class TDECORE_EXPORT KAccelBase
* @param action action to be executed when key is pressed
* @param key key which causes the action to be executed
*/
- virtual bool connectKey( KAccelAction& action, const KKeyServer::Key& key ) = 0;
+ virtual bool connectKey( TDEAccelAction& action, const KKeyServer::Key& key ) = 0;
/** Defines a key which activates the accelerator
* @param key key which causes the action to be executed
*/
virtual bool connectKey( const KKeyServer::Key& key) = 0;
/** Removes the key from accelerator so it no longer executes the action
*/
- virtual bool disconnectKey( KAccelAction&, const KKeyServer::Key& ) = 0;
+ virtual bool disconnectKey( TDEAccelAction&, const KKeyServer::Key& ) = 0;
/** Removes the key from accelerator
*/
virtual bool disconnectKey( const KKeyServer::Key& ) = 0;
@@ -253,30 +253,30 @@ class TDECORE_EXPORT KAccelBase
virtual bool isEnabledInternal() const;
struct ActionInfo
{
- KAccelAction* pAction;
+ TDEAccelAction* pAction;
uint iSeq, iVariation;
//ActionInfo* pInfoNext; // nil if only one action uses this key.
ActionInfo() { pAction = 0; iSeq = 0xffff; iVariation = 0xffff; }
- ActionInfo( KAccelAction* _pAction, uint _iSeq, uint _iVariation )
+ ActionInfo( TDEAccelAction* _pAction, uint _iSeq, uint _iVariation )
{ pAction = _pAction; iSeq = _iSeq; iVariation = _iVariation; }
};
typedef TQMap<KKeyServer::Key, ActionInfo> KKeyToActionMap;
- KAccelActions m_rgActions;
+ TDEAccelActions m_rgActions;
KKeyToActionMap m_mapKeyToAction;
- TQValueList<KAccelAction*> m_rgActionsNonUnique;
+ TQValueList<TDEAccelAction*> m_rgActionsNonUnique;
bool m_bNativeKeys; // Use native key codes instead of Qt codes
bool m_bEnabled;
bool m_bConfigIsGlobal;
TQString m_sConfigGroup;
bool m_bAutoUpdate;
- KAccelAction* mtemp_pActionRemoving;
+ TDEAccelAction* mtemp_pActionRemoving;
private:
- KAccelBase& operator =( const KAccelBase& );
+ TDEAccelBase& operator =( const TDEAccelBase& );
- friend class KAccelActions;
+ friend class TDEAccelActions;
};
#endif // _KACCELBASE_H
diff --git a/tdecore/kaccelmanager.cpp b/tdecore/tdeaccelmanager.cpp
index d4387e652..5fcfcc450 100644
--- a/tdecore/kaccelmanager.cpp
+++ b/tdecore/tdeaccelmanager.cpp
@@ -17,7 +17,7 @@
Boston, MA 02110-1301, USA.
*/
-#include "kaccelmanager.h"
+#include "tdeaccelmanager.h"
#include <tqapplication.h>
#include <tqcheckbox.h>
@@ -45,9 +45,9 @@
#include <kdebug.h>
-#include "kaccelmanager_private.h"
+#include "tdeaccelmanager_private.h"
#include "../tdeui/kstdaction_p.h"
-#include "../kutils/kmultitabbar.h"
+#include "../tdeutils/tdemultitabbar.h"
/*********************************************************************
@@ -63,7 +63,7 @@
/*********************************************************************
- class KAcceleratorManagerPrivate - internal helper class
+ class TDEAcceleratorManagerPrivate - internal helper class
This class does all the work to find accelerators for a hierarchy of
widgets.
@@ -71,7 +71,7 @@
*********************************************************************/
-class KAcceleratorManagerPrivate
+class TDEAcceleratorManagerPrivate
{
public:
@@ -79,7 +79,7 @@ public:
static bool programmers_mode;
static bool standardName(const TQString &str);
- static bool checkChange(const KAccelString &as) {
+ static bool checkChange(const TDEAccelString &as) {
TQString t2 = as.accelerated();
TQString t1 = as.originalText();
if (t1 != t2)
@@ -125,7 +125,7 @@ private:
void addChild(Item *item);
TQWidget *m_widget;
- KAccelString m_content;
+ TDEAccelString m_content;
ItemList *m_children;
int m_index;
@@ -133,28 +133,28 @@ private:
};
-bool KAcceleratorManagerPrivate::programmers_mode = false;
-TQString KAcceleratorManagerPrivate::changed_string;
-TQString KAcceleratorManagerPrivate::added_string;
-TQString KAcceleratorManagerPrivate::removed_string;
+bool TDEAcceleratorManagerPrivate::programmers_mode = false;
+TQString TDEAcceleratorManagerPrivate::changed_string;
+TQString TDEAcceleratorManagerPrivate::added_string;
+TQString TDEAcceleratorManagerPrivate::removed_string;
static TQStringList *kaccmp_sns = 0;
static KStaticDeleter<TQStringList> kaccmp_sns_d;
-TQMap<TQWidget*, int> KAcceleratorManagerPrivate::ignored_widgets;
+TQMap<TQWidget*, int> TDEAcceleratorManagerPrivate::ignored_widgets;
-bool KAcceleratorManagerPrivate::standardName(const TQString &str)
+bool TDEAcceleratorManagerPrivate::standardName(const TQString &str)
{
if (!kaccmp_sns)
kaccmp_sns_d.setObject(kaccmp_sns, new TQStringList(KStdAction::internal_stdNames()));
return kaccmp_sns->contains(str);
}
-KAcceleratorManagerPrivate::Item::~Item()
+TDEAcceleratorManagerPrivate::Item::~Item()
{
delete m_children;
}
-void KAcceleratorManagerPrivate::Item::addChild(Item *item)
+void TDEAcceleratorManagerPrivate::Item::addChild(Item *item)
{
if (!m_children) {
m_children = new ItemList;
@@ -164,7 +164,7 @@ void KAcceleratorManagerPrivate::Item::addChild(Item *item)
m_children->append(item);
}
-void KAcceleratorManagerPrivate::manage(TQWidget *widget)
+void TDEAcceleratorManagerPrivate::manage(TQWidget *widget)
{
if (!widget)
{
@@ -175,7 +175,7 @@ void KAcceleratorManagerPrivate::manage(TQWidget *widget)
if (dynamic_cast<TQPopupMenu*>(widget))
{
// create a popup accel manager that can deal with dynamic menus
- KPopupAccelManager::manage(static_cast<TQPopupMenu*>(widget));
+ TDEPopupAccelManager::manage(static_cast<TQPopupMenu*>(widget));
return;
}
@@ -189,13 +189,13 @@ void KAcceleratorManagerPrivate::manage(TQWidget *widget)
}
-void KAcceleratorManagerPrivate::calculateAccelerators(Item *item, TQString &used)
+void TDEAcceleratorManagerPrivate::calculateAccelerators(Item *item, TQString &used)
{
if (!item->m_children)
return;
// collect the contents
- KAccelStringList contents;
+ TDEAccelStringList contents;
for (Item *it = item->m_children->first(); it != 0;
it = item->m_children->next())
{
@@ -203,7 +203,7 @@ void KAcceleratorManagerPrivate::calculateAccelerators(Item *item, TQString &use
}
// find the right accelerators
- KAccelManagerAlgorithm::findAccelerators(contents, used);
+ TDEAccelManagerAlgorithm::findAccelerators(contents, used);
// write them back into the widgets
int cnt = -1;
@@ -261,7 +261,7 @@ void KAcceleratorManagerPrivate::calculateAccelerators(Item *item, TQString &use
}
-void KAcceleratorManagerPrivate::traverseChildren(TQWidget *widget, Item *item)
+void TDEAcceleratorManagerPrivate::traverseChildren(TQWidget *widget, Item *item)
{
TQObjectList *childList = widget->queryList(TQWIDGET_OBJECT_NAME_STRING, 0, false, false);
for ( TQObject *it = childList->first(); it; it = childList->next() )
@@ -271,7 +271,7 @@ void KAcceleratorManagerPrivate::traverseChildren(TQWidget *widget, Item *item)
if ( !w->isVisibleTo( widget ) || ( w->isTopLevel() && dynamic_cast<TQPopupMenu*>(w) == NULL ) )
continue;
- if ( KAcceleratorManagerPrivate::ignored_widgets.find( w ) != KAcceleratorManagerPrivate::ignored_widgets.end() )
+ if ( TDEAcceleratorManagerPrivate::ignored_widgets.find( w ) != TDEAcceleratorManagerPrivate::ignored_widgets.end() )
continue;
manageWidget(w, item);
@@ -279,7 +279,7 @@ void KAcceleratorManagerPrivate::traverseChildren(TQWidget *widget, Item *item)
delete childList;
}
-void KAcceleratorManagerPrivate::manageWidget(TQWidget *w, Item *item)
+void TDEAcceleratorManagerPrivate::manageWidget(TQWidget *w, Item *item)
{
// first treat the special cases
@@ -301,7 +301,7 @@ void KAcceleratorManagerPrivate::manageWidget(TQWidget *w, Item *item)
if (popupMenu)
{
// create a popup accel manager that can deal with dynamic menus
- KPopupAccelManager::manage(popupMenu);
+ TDEPopupAccelManager::manage(popupMenu);
return;
}
@@ -368,26 +368,26 @@ void KAcceleratorManagerPrivate::manageWidget(TQWidget *w, Item *item)
i->m_widget = w;
// put some more weight on the usual action elements
- int weight = KAccelManagerAlgorithm::DEFAULT_WEIGHT;
+ int weight = TDEAccelManagerAlgorithm::DEFAULT_WEIGHT;
if (dynamic_cast<TQPushButton*>(w) || dynamic_cast<TQCheckBox*>(w) || dynamic_cast<TQRadioButton*>(w) || dynamic_cast<TQLabel*>(w))
- weight = KAccelManagerAlgorithm::ACTION_ELEMENT_WEIGHT;
+ weight = TDEAccelManagerAlgorithm::ACTION_ELEMENT_WEIGHT;
// don't put weight on group boxes, as usually the contents are more important
if (dynamic_cast<TQGroupBox*>(w))
- weight = KAccelManagerAlgorithm::GROUP_BOX_WEIGHT;
+ weight = TDEAccelManagerAlgorithm::GROUP_BOX_WEIGHT;
// put a lot of extra weight on the KDialogBaseButton's
if (w->inherits("KDialogBaseButton"))
- weight += KAccelManagerAlgorithm::DIALOG_BUTTON_EXTRA_WEIGHT;
+ weight += TDEAccelManagerAlgorithm::DIALOG_BUTTON_EXTRA_WEIGHT;
- i->m_content = KAccelString(content, weight);
+ i->m_content = TDEAccelString(content, weight);
item->addChild(i);
}
}
traverseChildren(w, item);
}
-void KAcceleratorManagerPrivate::manageTabBar(TQTabBar *bar, Item *item)
+void TDEAcceleratorManagerPrivate::manageTabBar(TQTabBar *bar, Item *item)
{
for (int i=0; i<bar->count(); i++)
{
@@ -399,11 +399,11 @@ void KAcceleratorManagerPrivate::manageTabBar(TQTabBar *bar, Item *item)
item->addChild(it);
it->m_widget = bar;
it->m_index = i;
- it->m_content = KAccelString(content);
+ it->m_content = TDEAccelString(content);
}
}
-void KAcceleratorManagerPrivate::manageMenuBar(TQMenuBar *mbar, Item *item)
+void TDEAcceleratorManagerPrivate::manageMenuBar(TQMenuBar *mbar, Item *item)
{
TQMenuItem *mitem;
TQString s;
@@ -424,9 +424,9 @@ void KAcceleratorManagerPrivate::manageMenuBar(TQMenuBar *mbar, Item *item)
Item *it = new Item;
item->addChild(it);
it->m_content =
- KAccelString(s,
+ TDEAccelString(s,
// menu titles are important, so raise the weight
- KAccelManagerAlgorithm::MENU_TITLE_WEIGHT);
+ TDEAccelManagerAlgorithm::MENU_TITLE_WEIGHT);
it->m_widget = mbar;
it->m_index = i;
@@ -434,49 +434,49 @@ void KAcceleratorManagerPrivate::manageMenuBar(TQMenuBar *mbar, Item *item)
// have a look at the popup as well, if present
if (mitem->popup())
- KPopupAccelManager::manage(mitem->popup());
+ TDEPopupAccelManager::manage(mitem->popup());
}
}
/*********************************************************************
- class KAcceleratorManager - main entry point
+ class TDEAcceleratorManager - main entry point
This class is just here to provide a clean public API...
*********************************************************************/
-void KAcceleratorManager::manage(TQWidget *widget)
+void TDEAcceleratorManager::manage(TQWidget *widget)
{
- KAcceleratorManager::manage(widget, false);
+ TDEAcceleratorManager::manage(widget, false);
}
-void KAcceleratorManager::manage(TQWidget *widget, bool programmers_mode)
+void TDEAcceleratorManager::manage(TQWidget *widget, bool programmers_mode)
{
- kdDebug(131) << "KAcceleratorManager::manage\n";
- KAcceleratorManagerPrivate::changed_string = TQString::null;
- KAcceleratorManagerPrivate::added_string = TQString::null;
- KAcceleratorManagerPrivate::removed_string = TQString::null;
- KAcceleratorManagerPrivate::programmers_mode = programmers_mode;
- KAcceleratorManagerPrivate::manage(widget);
+ kdDebug(131) << "TDEAcceleratorManager::manage\n";
+ TDEAcceleratorManagerPrivate::changed_string = TQString::null;
+ TDEAcceleratorManagerPrivate::added_string = TQString::null;
+ TDEAcceleratorManagerPrivate::removed_string = TQString::null;
+ TDEAcceleratorManagerPrivate::programmers_mode = programmers_mode;
+ TDEAcceleratorManagerPrivate::manage(widget);
}
-void KAcceleratorManager::last_manage(TQString &added, TQString &changed, TQString &removed)
+void TDEAcceleratorManager::last_manage(TQString &added, TQString &changed, TQString &removed)
{
- added = KAcceleratorManagerPrivate::added_string;
- changed = KAcceleratorManagerPrivate::changed_string;
- removed = KAcceleratorManagerPrivate::removed_string;
+ added = TDEAcceleratorManagerPrivate::added_string;
+ changed = TDEAcceleratorManagerPrivate::changed_string;
+ removed = TDEAcceleratorManagerPrivate::removed_string;
}
/*********************************************************************
- class KAccelString - a string with weighted characters
+ class TDEAccelString - a string with weighted characters
*********************************************************************/
-KAccelString::KAccelString(const TQString &input, int initialWeight)
+TDEAccelString::TDEAccelString(const TQString &input, int initialWeight)
: m_pureText(input), m_weight()
{
m_orig_accel = m_pureText.find("(!)&");
@@ -495,7 +495,7 @@ KAccelString::KAccelString(const TQString &input, int initialWeight)
m_orig_accel = m_accel = stripAccelerator(m_pureText);
if (initialWeight == -1)
- initialWeight = KAccelManagerAlgorithm::DEFAULT_WEIGHT;
+ initialWeight = TDEAccelManagerAlgorithm::DEFAULT_WEIGHT;
calculateWeights(initialWeight);
@@ -503,13 +503,13 @@ KAccelString::KAccelString(const TQString &input, int initialWeight)
}
-TQString KAccelString::accelerated() const
+TQString TDEAccelString::accelerated() const
{
TQString result = m_origText;
if (result.isEmpty())
return result;
- if (KAcceleratorManagerPrivate::programmers_mode)
+ if (TDEAcceleratorManagerPrivate::programmers_mode)
{
if (m_accel != m_orig_accel) {
int oa = m_orig_accel;
@@ -532,7 +532,7 @@ TQString KAccelString::accelerated() const
}
-TQChar KAccelString::accelerator() const
+TQChar TDEAccelString::accelerator() const
{
if ((m_accel < 0) || (m_accel > (int)m_pureText.length()))
return TQChar();
@@ -541,7 +541,7 @@ TQChar KAccelString::accelerator() const
}
-void KAccelString::calculateWeights(int initialWeight)
+void TDEAccelString::calculateWeights(int initialWeight)
{
m_weight.resize(m_pureText.length());
@@ -556,12 +556,12 @@ void KAccelString::calculateWeights(int initialWeight)
// add special weight to first character
if (pos == 0)
- weight += KAccelManagerAlgorithm::FIRST_CHARACTER_EXTRA_WEIGHT;
+ weight += TDEAccelManagerAlgorithm::FIRST_CHARACTER_EXTRA_WEIGHT;
// add weight to word beginnings
if (start_character)
{
- weight += KAccelManagerAlgorithm::WORD_BEGINNING_EXTRA_WEIGHT;
+ weight += TDEAccelManagerAlgorithm::WORD_BEGINNING_EXTRA_WEIGHT;
start_character = false;
}
@@ -571,10 +571,10 @@ void KAccelString::calculateWeights(int initialWeight)
// try to preserve the wanted accelarators
if ((int)pos == accel()) {
- weight += KAccelManagerAlgorithm::WANTED_ACCEL_EXTRA_WEIGHT;
- // kdDebug(131) << "wanted " << m_pureText << " " << KAcceleratorManagerPrivate::standardName(m_origText) << endl;
- if (KAcceleratorManagerPrivate::standardName(m_origText)) {
- weight += KAccelManagerAlgorithm::STANDARD_ACCEL;
+ weight += TDEAccelManagerAlgorithm::WANTED_ACCEL_EXTRA_WEIGHT;
+ // kdDebug(131) << "wanted " << m_pureText << " " << TDEAcceleratorManagerPrivate::standardName(m_origText) << endl;
+ if (TDEAcceleratorManagerPrivate::standardName(m_origText)) {
+ weight += TDEAccelManagerAlgorithm::STANDARD_ACCEL;
}
}
@@ -592,7 +592,7 @@ void KAccelString::calculateWeights(int initialWeight)
}
-int KAccelString::stripAccelerator(TQString &text)
+int TDEAccelString::stripAccelerator(TQString &text)
{
// Note: this code is derived from TQAccel::shortcutKey
int p = 0;
@@ -621,7 +621,7 @@ int KAccelString::stripAccelerator(TQString &text)
}
-int KAccelString::maxWeight(int &index, const TQString &used)
+int TDEAccelString::maxWeight(int &index, const TQString &used)
{
int max = 0;
index = -1;
@@ -638,7 +638,7 @@ int KAccelString::maxWeight(int &index, const TQString &used)
}
-void KAccelString::dump()
+void TDEAccelString::dump()
{
TQString s;
for (uint i=0; i<m_weight.count(); ++i)
@@ -680,13 +680,13 @@ void KAccelString::dump()
*********************************************************************/
-void KAccelManagerAlgorithm::findAccelerators(KAccelStringList &result, TQString &used)
+void TDEAccelManagerAlgorithm::findAccelerators(TDEAccelStringList &result, TQString &used)
{
kdDebug(131) << "findAccelerators\n";
- KAccelStringList accel_strings = result;
+ TDEAccelStringList accel_strings = result;
// initally remove all accelerators
- for (KAccelStringList::Iterator it = result.begin(); it != result.end(); ++it) {
+ for (TDEAccelStringList::Iterator it = result.begin(); it != result.end(); ++it) {
(*it).setAccel(-1);
}
@@ -720,18 +720,18 @@ void KAccelManagerAlgorithm::findAccelerators(KAccelStringList &result, TQString
}
// make sure we don't visit this one again
- accel_strings[index] = KAccelString();
+ accel_strings[index] = TDEAccelString();
}
}
/*********************************************************************
- class KPopupAccelManager - managing TQPopupMenu widgets dynamically
+ class TDEPopupAccelManager - managing TQPopupMenu widgets dynamically
*********************************************************************/
-KPopupAccelManager::KPopupAccelManager(TQPopupMenu *popup)
+TDEPopupAccelManager::TDEPopupAccelManager(TQPopupMenu *popup)
: TQObject(popup), m_popup(popup), m_count(-1)
{
aboutToShow(); // do one check and then connect to show
@@ -739,7 +739,7 @@ KPopupAccelManager::KPopupAccelManager(TQPopupMenu *popup)
}
-void KPopupAccelManager::aboutToShow()
+void TDEPopupAccelManager::aboutToShow()
{
// Note: we try to be smart and avoid recalculating the accelerators
// whenever possible. Unfortunately, there is no way to know if an
@@ -754,7 +754,7 @@ void KPopupAccelManager::aboutToShow()
}
else
{
- KAccelStringList entries;
+ TDEAccelStringList entries;
findMenuEntries(entries);
if (entries != m_entries)
{
@@ -765,18 +765,18 @@ void KPopupAccelManager::aboutToShow()
}
-void KPopupAccelManager::calculateAccelerators()
+void TDEPopupAccelManager::calculateAccelerators()
{
// find the new accelerators
TQString used;
- KAccelManagerAlgorithm::findAccelerators(m_entries, used);
+ TDEAccelManagerAlgorithm::findAccelerators(m_entries, used);
// change the menu entries
setMenuEntries(m_entries);
}
-void KPopupAccelManager::findMenuEntries(KAccelStringList &list)
+void TDEPopupAccelManager::findMenuEntries(TDEAccelStringList &list)
{
TQMenuItem *mitem;
TQString s;
@@ -797,16 +797,16 @@ void KPopupAccelManager::findMenuEntries(KAccelStringList &list)
if (s.contains('\t'))
weight = 0;
- list.append(KAccelString(s, weight));
+ list.append(TDEAccelString(s, weight));
// have a look at the popup as well, if present
if (mitem->popup())
- KPopupAccelManager::manage(mitem->popup());
+ TDEPopupAccelManager::manage(mitem->popup());
}
}
-void KPopupAccelManager::setMenuEntries(const KAccelStringList &list)
+void TDEPopupAccelManager::setMenuEntries(const TDEAccelStringList &list)
{
TQMenuItem *mitem;
@@ -817,18 +817,18 @@ void KPopupAccelManager::setMenuEntries(const KAccelStringList &list)
if (mitem->isSeparator())
continue;
- if (KAcceleratorManagerPrivate::checkChange(list[cnt]))
+ if (TDEAcceleratorManagerPrivate::checkChange(list[cnt]))
mitem->setText(list[cnt].accelerated());
cnt++;
}
}
-void KPopupAccelManager::manage(TQPopupMenu *popup)
+void TDEPopupAccelManager::manage(TQPopupMenu *popup)
{
// don't add more than one manager to a popup
- if (popup->child(0, "KPopupAccelManager", false) == 0 )
- new KPopupAccelManager(popup);
+ if (popup->child(0, "TDEPopupAccelManager", false) == 0 )
+ new TDEPopupAccelManager(popup);
}
void QWidgetStackAccelManager::manage( TQWidgetStack *stack )
@@ -847,7 +847,7 @@ QWidgetStackAccelManager::QWidgetStackAccelManager(TQWidgetStack *stack)
bool QWidgetStackAccelManager::eventFilter ( TQObject * watched, TQEvent * e )
{
if ( e->type() == TQEvent::Show && tqApp->activeWindow() ) {
- KAcceleratorManager::manage( TQT_TQWIDGET(tqApp->activeWindow()) );
+ TDEAcceleratorManager::manage( TQT_TQWIDGET(tqApp->activeWindow()) );
watched->removeEventFilter( this );
}
return false;
@@ -864,9 +864,9 @@ void QWidgetStackAccelManager::aboutToShow(TQWidget *child)
child->installEventFilter( this );
}
-void KAcceleratorManager::setNoAccel( TQWidget *widget )
+void TDEAcceleratorManager::setNoAccel( TQWidget *widget )
{
- KAcceleratorManagerPrivate::ignored_widgets[widget] = 1;
+ TDEAcceleratorManagerPrivate::ignored_widgets[widget] = 1;
}
-#include "kaccelmanager_private.moc"
+#include "tdeaccelmanager_private.moc"
diff --git a/tdecore/kaccelmanager.h b/tdecore/tdeaccelmanager.h
index 29304803b..03ee627b3 100644
--- a/tdecore/kaccelmanager.h
+++ b/tdecore/tdeaccelmanager.h
@@ -37,7 +37,7 @@ class TQString;
* @since 3.1
*/
-class TDECORE_EXPORT KAcceleratorManager
+class TDECORE_EXPORT TDEAcceleratorManager
{
public:
@@ -69,7 +69,7 @@ public:
*
* TODO KDE4: merge with the above
* @param widget The toplevel widget you want to manage.
- * @param programmers_mode if true, KAcceleratorManager adds (&) for removed
+ * @param programmers_mode if true, TDEAcceleratorManager adds (&) for removed
* accels and & before added accels
*/
static void manage(TQWidget *widget, bool programmers_mode);
diff --git a/tdecore/kaccelmanager_private.h b/tdecore/tdeaccelmanager_private.h
index e931b7e3e..ed401801e 100644
--- a/tdecore/kaccelmanager_private.h
+++ b/tdecore/tdeaccelmanager_private.h
@@ -39,12 +39,12 @@ class TQWidgetStack;
* @author Matthias Hoelzer-Kluepfel <mhk@kde.org>
*/
-class KAccelString
+class TDEAccelString
{
public:
- KAccelString() : m_pureText(), m_accel(-1) {}
- KAccelString(const TQString &input, int initalWeight=-1);
+ TDEAccelString() : m_pureText(), m_accel(-1) {}
+ TDEAccelString(const TQString &input, int initalWeight=-1);
void calculateWeights(int initialWeight);
@@ -61,7 +61,7 @@ public:
int maxWeight(int &index, const TQString &used);
- bool operator == (const KAccelString &c) const { return m_pureText == c.m_pureText && m_accel == c.m_accel && m_orig_accel == c.m_orig_accel; }
+ bool operator == (const TDEAccelString &c) const { return m_pureText == c.m_pureText && m_accel == c.m_accel && m_orig_accel == c.m_orig_accel; }
private:
@@ -77,7 +77,7 @@ private:
};
-typedef TQValueList<KAccelString> KAccelStringList;
+typedef TQValueList<TDEAccelString> TDEAccelStringList;
/**
@@ -87,7 +87,7 @@ typedef TQValueList<KAccelString> KAccelStringList;
* @author Matthias Hoelzer-Kluepfel <mhk@kde.org>
*/
-class KAccelManagerAlgorithm
+class TDEAccelManagerAlgorithm
{
public:
@@ -114,7 +114,7 @@ public:
};
/// Method to call to find the best distribution of accelerators.
- static void findAccelerators(KAccelStringList &result, TQString &used);
+ static void findAccelerators(TDEAccelStringList &result, TQString &used);
};
@@ -131,7 +131,7 @@ class TQPopupMenu;
* @author Matthias Hoelzer-Kluepfel <mhk@kde.org>
*/
-class KPopupAccelManager : public TQObject
+class TDEPopupAccelManager : public TQObject
{
Q_OBJECT
@@ -142,7 +142,7 @@ public:
protected:
- KPopupAccelManager(TQPopupMenu *popup);
+ TDEPopupAccelManager(TQPopupMenu *popup);
private slots:
@@ -154,11 +154,11 @@ private:
void calculateAccelerators();
- void findMenuEntries(KAccelStringList &list);
- void setMenuEntries(const KAccelStringList &list);
+ void findMenuEntries(TDEAccelStringList &list);
+ void setMenuEntries(const TDEAccelStringList &list);
TQPopupMenu *m_popup;
- KAccelStringList m_entries;
+ TDEAccelStringList m_entries;
int m_count;
};
@@ -188,7 +188,7 @@ private:
void calculateAccelerators();
TQWidgetStack *m_stack;
- KAccelStringList m_entries;
+ TDEAccelStringList m_entries;
};
diff --git a/tdecore/kaccelprivate.h b/tdecore/tdeaccelprivate.h
index 8d009b950..0d967998d 100644
--- a/tdecore/kaccelprivate.h
+++ b/tdecore/tdeaccelprivate.h
@@ -4,22 +4,22 @@
#include "kkeyserver_x11.h"
#include <tqtimer.h>
-class KAccelAction;
+class TDEAccelAction;
/**
* @internal
*/
-class TDECORE_EXPORT KAccelPrivate : public TQObject, public KAccelBase
+class TDECORE_EXPORT TDEAccelPrivate : public TQObject, public TDEAccelBase
{
Q_OBJECT
public:
- KAccel* m_pAccel;
+ TDEAccel* m_pAccel;
TQWidget* m_pWatch;
TQMap<int, int> m_mapIDToKey;
- TQMap<int, KAccelAction*> m_mapIDToAction;
+ TQMap<int, TDEAccelAction*> m_mapIDToAction;
TQTimer m_timerShowMenu;
- KAccelPrivate( KAccel* pParent, TQWidget* pWatch );
+ TDEAccelPrivate( TDEAccel* pParent, TQWidget* pWatch );
virtual void setEnabled( bool bEnabled );
@@ -27,19 +27,19 @@ class TDECORE_EXPORT KAccelPrivate : public TQObject, public KAccelBase
virtual bool removeAction( const TQString& sAction );
- virtual bool emitSignal( KAccelBase::Signal signal );
- virtual bool connectKey( KAccelAction& action, const KKeyServer::Key& key );
+ virtual bool emitSignal( TDEAccelBase::Signal signal );
+ virtual bool connectKey( TDEAccelAction& action, const KKeyServer::Key& key );
virtual bool connectKey( const KKeyServer::Key& key );
- virtual bool disconnectKey( KAccelAction& action, const KKeyServer::Key& key );
+ virtual bool disconnectKey( TDEAccelAction& action, const KKeyServer::Key& key );
virtual bool disconnectKey( const KKeyServer::Key& key );
signals:
void menuItemActivated();
- void menuItemActivated(KAccelAction*);
+ void menuItemActivated(TDEAccelAction*);
private:
#ifndef Q_WS_WIN /** @todo TEMP: new implementation (commit #424926) didn't work */
- void emitActivatedSignal(KAccelAction*);
+ void emitActivatedSignal(TDEAccelAction*);
#endif
private slots:
diff --git a/tdecore/kapplication.cpp b/tdecore/tdeapplication.cpp
index b4caefc2c..58b010e4e 100644
--- a/tdecore/kapplication.cpp
+++ b/tdecore/tdeapplication.cpp
@@ -35,7 +35,7 @@
#undef QT_NO_TRANSLATION
#undef TQT_NO_TRANSLATION
#include <tqtranslator.h>
-#include "kapplication.h"
+#include "tdeapplication.h"
#define QT_NO_TRANSLATION
#define TQT_NO_TRANSLATION
#include <tqdir.h>
@@ -61,24 +61,24 @@
#include <tqsqlpropertymap.h>
#endif
-#include <kglobal.h>
+#include <tdeglobal.h>
#include <kstandarddirs.h>
#include <kdebug.h>
-#include <klocale.h>
-#include <kstyle.h>
+#include <tdelocale.h>
+#include <tdestyle.h>
#include <kiconloader.h>
#include <kclipboard.h>
-#include <kconfig.h>
+#include <tdeconfig.h>
#include <ksimpleconfig.h>
-#include <kcmdlineargs.h>
-#include <kaboutdata.h>
-#include <kglobalsettings.h>
+#include <tdecmdlineargs.h>
+#include <tdeaboutdata.h>
+#include <tdeglobalsettings.h>
#include <kcrash.h>
#include <kdatastream.h>
#include <klibloader.h>
#include <kmimesourcefactory.h>
-#include <kstdaccel.h>
-#include <kaccel.h>
+#include <tdestdaccel.h>
+#include <tdeaccel.h>
#include "kcheckaccelerators.h"
#include <tqptrdict.h>
#include <kmacroexpander.h>
@@ -89,7 +89,7 @@
#include <kglobalaccel.h>
#if defined Q_WS_X11
-#include <kstartupinfo.h>
+#include <tdestartupinfo.h>
#endif
#include <dcopclient.h>
@@ -175,10 +175,10 @@ KDE_EXPORT bool kde_have_kipc = true; // magic hook to disable kipc in tdm
bool kde_kiosk_exception = false; // flag to disable kiosk restrictions
bool kde_kiosk_admin = false;
-KApplication* KApplication::KApp = 0L;
-bool KApplication::loadedByKdeinit = false;
-DCOPClient *KApplication::s_DCOPClient = 0L;
-bool KApplication::s_dcopClientNeedsPostInit = false;
+TDEApplication* TDEApplication::KApp = 0L;
+bool TDEApplication::loadedByKdeinit = false;
+DCOPClient *TDEApplication::s_DCOPClient = 0L;
+bool TDEApplication::s_dcopClientNeedsPostInit = false;
#ifdef Q_WS_X11
static Atom atom_DesktopWindow;
@@ -230,7 +230,7 @@ static void kde_ice_ioerrorhandler( IceConn conn )
#endif
#ifdef Q_WS_WIN
-void KApplication_init_windows(bool GUIenabled);
+void TDEApplication_init_windows(bool GUIenabled);
class QAssistantClient;
#endif
@@ -238,10 +238,10 @@ class QAssistantClient;
/*
Private data to make keeping binary compatibility easier
*/
-class KApplicationPrivate
+class TDEApplicationPrivate
{
public:
- KApplicationPrivate()
+ TDEApplicationPrivate()
: actionRestrictions( false ),
refCount( 1 ),
oldIceIOErrorHandler( 0 ),
@@ -260,7 +260,7 @@ public:
{
}
- ~KApplicationPrivate()
+ ~TDEApplicationPrivate()
{
#ifdef Q_WS_WIN
delete qassistantclient;
@@ -272,7 +272,7 @@ public:
bool guiEnabled : 1;
/**
* This counter indicates when to exit the application.
- * It starts at 1, is decremented in KMainWindow when the last window is closed, but
+ * It starts at 1, is decremented in TDEMainWindow when the last window is closed, but
* is incremented by operations that should outlive the last window closed
* (e.g. a file copy for a file manager, or 'compacting folders on exit' for a mail client).
*/
@@ -439,7 +439,7 @@ public:
static TQPtrList<TQWidget>*x11Filter = 0;
static bool autoDcopRegistration = true;
-void KApplication::installX11EventFilter( TQWidget* filter )
+void TDEApplication::installX11EventFilter( TQWidget* filter )
{
if ( !filter )
return;
@@ -449,12 +449,12 @@ void KApplication::installX11EventFilter( TQWidget* filter )
x11Filter->append( filter );
}
-void KApplication::x11FilterDestroyed()
+void TDEApplication::x11FilterDestroyed()
{
removeX11EventFilter( static_cast< const TQWidget* >( sender()));
}
-void KApplication::removeX11EventFilter( const TQWidget* filter )
+void TDEApplication::removeX11EventFilter( const TQWidget* filter )
{
if ( !x11Filter || !filter )
return;
@@ -468,10 +468,10 @@ void KApplication::removeX11EventFilter( const TQWidget* filter )
// FIXME: remove this when we've get a better method of
// customizing accelerator handling -- hopefully in Qt.
// For now, this is set whenever an accelerator is overridden
-// in KAccelEventHandler so that the AccelOverride isn't sent twice. -- ellis, 19/10/02
+// in TDEAccelEventHandler so that the AccelOverride isn't sent twice. -- ellis, 19/10/02
extern bool kde_g_bKillAccelOverride;
-bool KApplication::notify(TQObject *receiver, TQEvent *event)
+bool TDEApplication::notify(TQObject *receiver, TQEvent *event)
{
TQEvent::Type t = event->type();
if (kde_g_bKillAccelOverride)
@@ -489,7 +489,7 @@ bool KApplication::notify(TQObject *receiver, TQEvent *event)
if ((t == TQEvent::AccelOverride) || (t == TQEvent::KeyPress))
{
- static const KShortcut& _selectAll = KStdAccel::selectAll();
+ static const TDEShortcut& _selectAll = TDEStdAccel::selectAll();
TQLineEdit *edit = ::tqqt_cast<TQLineEdit *>(receiver);
if (edit)
{
@@ -552,7 +552,7 @@ bool KApplication::notify(TQObject *receiver, TQEvent *event)
TQWidget* w = TQT_TQWIDGET( receiver );
#if defined Q_WS_X11
if( w->isTopLevel() && !startupId().isEmpty() && !TQT_TQSHOWEVENT(event)->spontaneous()) // TODO better done using window group leader?
- KStartupInfo::setWindowStartupId( w->winId(), startupId());
+ TDEStartupInfo::setWindowStartupId( w->winId(), startupId());
#endif
if( w->isTopLevel() && !w->testWFlags( WX11BypassWM ) && !w->isPopup() && !event->spontaneous())
{
@@ -569,8 +569,8 @@ bool KApplication::notify(TQObject *receiver, TQEvent *event)
// icon() cannot be null pixmap, it'll be the "unknown" icon - so check if there is this application icon
static TQPixmap* ic = NULL;
if( ic == NULL )
- ic = new TQPixmap( KGlobal::iconLoader()->loadIcon( iconName(),
- KIcon::NoGroup, 0, KIcon::DefaultState, NULL, true ));
+ ic = new TQPixmap( TDEGlobal::iconLoader()->loadIcon( iconName(),
+ TDEIcon::NoGroup, 0, TDEIcon::DefaultState, NULL, true ));
if( !ic->isNull())
{
w->setIcon( *ic );
@@ -583,10 +583,10 @@ bool KApplication::notify(TQObject *receiver, TQEvent *event)
return TQApplication::notify(receiver, event);
}
-void KApplication::checkAppStartedSlot()
+void TDEApplication::checkAppStartedSlot()
{
#if defined Q_WS_X11
- KStartupInfo::handleAutoAppStartedSending();
+ TDEStartupInfo::handleAutoAppStartedSending();
#endif
}
@@ -604,7 +604,7 @@ static TQPtrList<KSessionManaged>* sessionClients()
instance specific config object.
Syntax: "session/<appname>_<sessionId>"
*/
-TQString KApplication::sessionConfigName() const
+TQString TDEApplication::sessionConfigName() const
{
TQString sessKey = sessionKey();
if ( sessKey.isEmpty() && !d->sessionKey.isEmpty() )
@@ -621,14 +621,14 @@ static SmcConn tmpSmcConnection = 0;
#endif
static TQTime* smModificationTime = 0;
-KApplication::KApplication( int& argc, char** argv, const TQCString& rAppName,
+TDEApplication::TDEApplication( int& argc, char** argv, const TQCString& rAppName,
bool allowStyles, bool GUIenabled ) :
- TQApplication( argc, argv, GUIenabled ), KInstance(rAppName),
+ TQApplication( argc, argv, GUIenabled ), TDEInstance(rAppName),
#ifdef Q_WS_X11
display(0L),
argb_visual(false),
#endif
- d (new KApplicationPrivate())
+ d (new TDEApplicationPrivate())
{
aIconPixmap.pm.icon = 0L;
aIconPixmap.pm.miniIcon = 0L;
@@ -640,21 +640,21 @@ KApplication::KApplication( int& argc, char** argv, const TQCString& rAppName,
setName(rAppName);
installSigpipeHandler();
- KCmdLineArgs::initIgnore(argc, argv, rAppName.data());
+ TDECmdLineArgs::initIgnore(argc, argv, rAppName.data());
parseCommandLine( );
init(GUIenabled);
d->m_KAppDCOPInterface = new KAppDCOPInterface(this);
}
-KApplication::KApplication( bool allowStyles, bool GUIenabled ) :
-// TQApplication( *KCmdLineArgs::qt_argc(), *KCmdLineArgs::qt_argv(), TRUE ), // Qt4 requires that there always be a GUI
- TQApplication( *KCmdLineArgs::qt_argc(), *KCmdLineArgs::qt_argv(), GUIenabled ), // We need to be able to run command line apps
- KInstance( KCmdLineArgs::about),
+TDEApplication::TDEApplication( bool allowStyles, bool GUIenabled ) :
+// TQApplication( *TDECmdLineArgs::tqt_argc(), *TDECmdLineArgs::tqt_argv(), TRUE ), // Qt4 requires that there always be a GUI
+ TQApplication( *TDECmdLineArgs::tqt_argc(), *TDECmdLineArgs::tqt_argv(), GUIenabled ), // We need to be able to run command line apps
+ TDEInstance( TDECmdLineArgs::about),
#ifdef Q_WS_X11
display(0L),
argb_visual(false),
#endif
- d (new KApplicationPrivate)
+ d (new TDEApplicationPrivate)
{
aIconPixmap.pm.icon = 0L;
aIconPixmap.pm.miniIcon = 0L;
@@ -671,10 +671,10 @@ KApplication::KApplication( bool allowStyles, bool GUIenabled ) :
}
#ifdef Q_WS_X11
-KApplication::KApplication( Display *dpy, bool allowStyles ) :
- TQApplication( dpy, *KCmdLineArgs::qt_argc(), *KCmdLineArgs::qt_argv(),
+TDEApplication::TDEApplication( Display *dpy, bool allowStyles ) :
+ TQApplication( dpy, *TDECmdLineArgs::tqt_argc(), *TDECmdLineArgs::tqt_argv(),
getX11RGBAVisual(dpy), getX11RGBAColormap(dpy) ),
- KInstance( KCmdLineArgs::about), display(0L), d (new KApplicationPrivate)
+ TDEInstance( TDECmdLineArgs::about), display(0L), d (new TDEApplicationPrivate)
{
aIconPixmap.pm.icon = 0L;
aIconPixmap.pm.miniIcon = 0L;
@@ -687,10 +687,10 @@ KApplication::KApplication( Display *dpy, bool allowStyles ) :
d->m_KAppDCOPInterface = new KAppDCOPInterface(this);
}
-KApplication::KApplication( Display *dpy, bool disable_argb, Qt::HANDLE visual, Qt::HANDLE colormap, bool allowStyles ) :
- TQApplication( dpy, *KCmdLineArgs::qt_argc(), *KCmdLineArgs::qt_argv(),
+TDEApplication::TDEApplication( Display *dpy, bool disable_argb, Qt::HANDLE visual, Qt::HANDLE colormap, bool allowStyles ) :
+ TQApplication( dpy, *TDECmdLineArgs::tqt_argc(), *TDECmdLineArgs::tqt_argv(),
disable_argb?visual:getX11RGBAVisual(dpy), disable_argb?colormap:getX11RGBAColormap(dpy) ),
- KInstance( KCmdLineArgs::about), display(0L), d (new KApplicationPrivate)
+ TDEInstance( TDECmdLineArgs::about), display(0L), d (new TDEApplicationPrivate)
{
aIconPixmap.pm.icon = 0L;
aIconPixmap.pm.miniIcon = 0L;
@@ -704,11 +704,11 @@ KApplication::KApplication( Display *dpy, bool disable_argb, Qt::HANDLE visual,
d->m_KAppDCOPInterface = new KAppDCOPInterface(this);
}
-KApplication::KApplication( Display *dpy, Qt::HANDLE visual, Qt::HANDLE colormap,
+TDEApplication::TDEApplication( Display *dpy, Qt::HANDLE visual, Qt::HANDLE colormap,
bool allowStyles ) :
- TQApplication( dpy, *KCmdLineArgs::qt_argc(), *KCmdLineArgs::qt_argv(),
+ TQApplication( dpy, *TDECmdLineArgs::tqt_argc(), *TDECmdLineArgs::tqt_argv(),
visual?visual:getX11RGBAVisual(dpy), colormap?colormap:getX11RGBAColormap(dpy) ),
- KInstance( KCmdLineArgs::about), display(0L), d (new KApplicationPrivate)
+ TDEInstance( TDECmdLineArgs::about), display(0L), d (new TDEApplicationPrivate)
{
if ((visual) && (colormap))
getX11RGBAInformation(dpy);
@@ -723,11 +723,11 @@ KApplication::KApplication( Display *dpy, Qt::HANDLE visual, Qt::HANDLE colormap
d->m_KAppDCOPInterface = new KAppDCOPInterface(this);
}
-KApplication::KApplication( Display *dpy, Qt::HANDLE visual, Qt::HANDLE colormap,
- bool allowStyles, KInstance * _instance ) :
- TQApplication( dpy, *KCmdLineArgs::qt_argc(), *KCmdLineArgs::qt_argv(),
+TDEApplication::TDEApplication( Display *dpy, Qt::HANDLE visual, Qt::HANDLE colormap,
+ bool allowStyles, TDEInstance * _instance ) :
+ TQApplication( dpy, *TDECmdLineArgs::tqt_argc(), *TDECmdLineArgs::tqt_argv(),
visual?visual:getX11RGBAVisual(dpy), colormap?colormap:getX11RGBAColormap(dpy) ),
- KInstance( _instance ), display(0L), d (new KApplicationPrivate)
+ TDEInstance( _instance ), display(0L), d (new TDEApplicationPrivate)
{
if ((visual) && (colormap))
getX11RGBAInformation(dpy);
@@ -743,15 +743,15 @@ KApplication::KApplication( Display *dpy, Qt::HANDLE visual, Qt::HANDLE colormap
}
#endif
-KApplication::KApplication( bool allowStyles, bool GUIenabled, KInstance* _instance ) :
- TQApplication( *KCmdLineArgs::qt_argc(), *KCmdLineArgs::qt_argv(),
+TDEApplication::TDEApplication( bool allowStyles, bool GUIenabled, TDEInstance* _instance ) :
+ TQApplication( *TDECmdLineArgs::tqt_argc(), *TDECmdLineArgs::tqt_argv(),
GUIenabled ),
- KInstance( _instance ),
+ TDEInstance( _instance ),
#ifdef Q_WS_X11
display(0L),
#endif
argb_visual(false),
- d (new KApplicationPrivate)
+ d (new TDEApplicationPrivate)
{
aIconPixmap.pm.icon = 0L;
aIconPixmap.pm.miniIcon = 0L;
@@ -768,12 +768,12 @@ KApplication::KApplication( bool allowStyles, bool GUIenabled, KInstance* _insta
}
#ifdef Q_WS_X11
-KApplication::KApplication(Display *display, int& argc, char** argv, const TQCString& rAppName,
+TDEApplication::TDEApplication(Display *display, int& argc, char** argv, const TQCString& rAppName,
bool allowStyles, bool GUIenabled ) :
- TQApplication( display ), KInstance(rAppName),
+ TQApplication( display ), TDEInstance(rAppName),
display(0L),
argb_visual(false),
- d (new KApplicationPrivate())
+ d (new TDEApplicationPrivate())
{
aIconPixmap.pm.icon = 0L;
aIconPixmap.pm.miniIcon = 0L;
@@ -786,14 +786,14 @@ KApplication::KApplication(Display *display, int& argc, char** argv, const TQCSt
setName(rAppName);
installSigpipeHandler();
- KCmdLineArgs::initIgnore(argc, argv, rAppName.data());
+ TDECmdLineArgs::initIgnore(argc, argv, rAppName.data());
parseCommandLine( );
init(GUIenabled);
d->m_KAppDCOPInterface = new KAppDCOPInterface(this);
}
#endif
-int KApplication::xioErrhandler( Display* dpy )
+int TDEApplication::xioErrhandler( Display* dpy )
{
if(kapp)
{
@@ -808,7 +808,7 @@ int KApplication::xioErrhandler( Display* dpy )
return 0;
}
-int KApplication::xErrhandler( Display* dpy, void* err_ )
+int TDEApplication::xErrhandler( Display* dpy, void* err_ )
{ // no idea how to make forward decl. for XErrorEvent
#ifdef Q_WS_X11
XErrorEvent* err = static_cast< XErrorEvent* >( err_ );
@@ -821,7 +821,7 @@ int KApplication::xErrhandler( Display* dpy, void* err_ )
return 0;
}
-void KApplication::iceIOErrorHandler( _IceConn *conn )
+void TDEApplication::iceIOErrorHandler( _IceConn *conn )
{
emit shutDown();
@@ -841,12 +841,12 @@ public:
const char* message) const
{
TQTranslatorMessage res;
- res.setTranslation(KGlobal::locale()->translateQt(context, sourceText, message));
+ res.setTranslation(TDEGlobal::locale()->translateQt(context, sourceText, message));
return res;
}
};
-void KApplication::init(bool GUIenabled)
+void TDEApplication::init(bool GUIenabled)
{
d->guiEnabled = GUIenabled;
if ((getuid() != geteuid()) ||
@@ -861,9 +861,9 @@ void KApplication::init(bool GUIenabled)
}
}
- KProcessController::ref();
+ TDEProcessController::ref();
- (void) KClipboardSynchronizer::self();
+ (void) TDEClipboardSynchronizer::self();
TQApplication::setDesktopSettingsAware( false );
@@ -912,9 +912,9 @@ void KApplication::init(bool GUIenabled)
#endif
// Trigger creation of locale.
- (void) KGlobal::locale();
+ (void) TDEGlobal::locale();
- KConfig* config = KGlobal::config();
+ TDEConfig* config = TDEGlobal::config();
d->actionRestrictions = config->hasGroup("KDE Action Restrictions" ) && !kde_kiosk_exception;
// For brain-dead configurations where the user's local config file is not writable.
// * We use kdialog to warn the user, so we better not generate warnings from
@@ -923,7 +923,7 @@ void KApplication::init(bool GUIenabled)
TQCString readOnly = getenv("TDE_HOME_READONLY");
if (readOnly.isEmpty() && (tqstrcmp(name(), "kdialog") != 0))
{
- KConfigGroupSaver saver(config, "KDE Action Restrictions");
+ TDEConfigGroupSaver saver(config, "KDE Action Restrictions");
if (config->readBoolEntry("warn_unwritable_config",true))
config->checkConfigFilesWritable(true);
}
@@ -945,7 +945,7 @@ void KApplication::init(bool GUIenabled)
#endif
{
- TQStringList plugins = KGlobal::dirs()->resourceDirs( "qtplugins" );
+ TQStringList plugins = TDEGlobal::dirs()->resourceDirs( "qtplugins" );
TQStringList::Iterator it = plugins.begin();
while (it != plugins.end()) {
addLibraryPath( *it );
@@ -953,9 +953,9 @@ void KApplication::init(bool GUIenabled)
}
}
- kdisplaySetStyle();
- kdisplaySetFont();
-// kdisplaySetPalette(); done by kdisplaySetStyle
+ tdedisplaySetStyle();
+ tdedisplaySetFont();
+// tdedisplaySetPalette(); done by tdedisplaySetStyle
propagateSettings(SETTINGS_QT);
// Set default mime-source factory
@@ -977,8 +977,8 @@ void KApplication::init(bool GUIenabled)
#ifdef Q_WS_MACX
if (GUIenabled) {
- TQPixmap pixmap = KGlobal::iconLoader()->loadIcon( KCmdLineArgs::appName(),
- KIcon::NoGroup, KIcon::SizeLarge, KIcon::DefaultState, 0L, false );
+ TQPixmap pixmap = TDEGlobal::iconLoader()->loadIcon( TDECmdLineArgs::appName(),
+ TDEIcon::NoGroup, TDEIcon::SizeLarge, TDEIcon::DefaultState, 0L, false );
if (!pixmap.isNull()) {
TQImage i = pixmap.convertToImage().convertDepth(32).smoothScale(40, 40);
for(int y = 0; y < i.height(); y++) {
@@ -1013,7 +1013,7 @@ void KApplication::init(bool GUIenabled)
setReverseLayout( !rtl );
// install appdata resource type
- KGlobal::dirs()->addResourceType("appdata", KStandardDirs::kde_default("data")
+ TDEGlobal::dirs()->addResourceType("appdata", TDEStandardDirs::kde_default("data")
+ TQString::fromLatin1(name()) + '/');
pSessionConfig = 0L;
bSessionManagement = true;
@@ -1030,7 +1030,7 @@ void KApplication::init(bool GUIenabled)
}
d->oldIceIOErrorHandler = IceSetIOErrorHandler( kde_ice_ioerrorhandler );
#elif defined(Q_WS_WIN)
- KApplication_init_windows(GUIenabled);
+ TDEApplication_init_windows(GUIenabled);
#else
// FIXME(E): Implement for Qt Embedded
#endif
@@ -1057,13 +1057,13 @@ static int my_system (const char *command) {
}
-DCOPClient *KApplication::dcopClient()
+DCOPClient *TDEApplication::dcopClient()
{
if (s_DCOPClient)
return s_DCOPClient;
s_DCOPClient = new DCOPClient();
- KCmdLineArgs *args = KCmdLineArgs::parsedArgs("tde");
+ TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs("tde");
if (args && args->isSet("dcopserver"))
{
s_DCOPClient->setServerAddress( args->getOption("dcopserver"));
@@ -1081,7 +1081,7 @@ DCOPClient *KApplication::dcopClient()
return s_DCOPClient;
}
-void KApplication::dcopClientPostInit()
+void TDEApplication::dcopClientPostInit()
{
if( s_dcopClientNeedsPostInit )
{
@@ -1092,7 +1092,7 @@ void KApplication::dcopClientPostInit()
}
}
-void KApplication::dcopAutoRegistration()
+void TDEApplication::dcopAutoRegistration()
{
if (autoDcopRegistration)
{
@@ -1102,31 +1102,31 @@ void KApplication::dcopAutoRegistration()
}
}
-void KApplication::disableAutoDcopRegistration()
+void TDEApplication::disableAutoDcopRegistration()
{
autoDcopRegistration = false;
}
-KConfig* KApplication::sessionConfig()
+TDEConfig* TDEApplication::sessionConfig()
{
if (pSessionConfig)
return pSessionConfig;
// create an instance specific config object
- pSessionConfig = new KConfig( sessionConfigName(), false, false);
+ pSessionConfig = new TDEConfig( sessionConfigName(), false, false);
return pSessionConfig;
}
-void KApplication::ref()
+void TDEApplication::ref()
{
d->refCount++;
- //kdDebug() << "KApplication::ref() : refCount = " << d->refCount << endl;
+ //kdDebug() << "TDEApplication::ref() : refCount = " << d->refCount << endl;
}
-void KApplication::deref()
+void TDEApplication::deref()
{
d->refCount--;
- //kdDebug() << "KApplication::deref() : refCount = " << d->refCount << endl;
+ //kdDebug() << "TDEApplication::deref() : refCount = " << d->refCount << endl;
if ( d->refCount <= 0 )
quit();
}
@@ -1153,11 +1153,11 @@ bool KSessionManaged::commitData(TQSessionManager&)
}
-void KApplication::disableSessionManagement() {
+void TDEApplication::disableSessionManagement() {
bSessionManagement = false;
}
-void KApplication::enableSessionManagement() {
+void TDEApplication::enableSessionManagement() {
bSessionManagement = true;
#ifdef Q_WS_X11
// Session management support in Qt/TDE is awfully broken.
@@ -1181,7 +1181,7 @@ void KApplication::enableSessionManagement() {
}
-bool KApplication::requestShutDown(
+bool TDEApplication::requestShutDown(
ShutdownConfirm confirm, ShutdownType sdtype, ShutdownMode sdmode )
{
#ifdef Q_WS_X11
@@ -1244,7 +1244,7 @@ bool KApplication::requestShutDown(
#endif
}
-void KApplication::propagateSessionManager()
+void TDEApplication::propagateSessionManager()
{
#ifdef Q_WS_X11
TQCString fName = TQFile::encodeName(locateLocal("socket", "KSMserver"));
@@ -1279,7 +1279,7 @@ void KApplication::propagateSessionManager()
#endif
}
-void KApplication::commitData( TQSessionManager& sm )
+void TDEApplication::commitData( TQSessionManager& sm )
{
d->session_save = true;
bool canceled = false;
@@ -1297,7 +1297,7 @@ void KApplication::commitData( TQSessionManager& sm )
bool canceled = false;
TQWidget* w = list->first();
while ( !canceled && w ) {
- if ( !w->testWState( WState_ForceHide ) && !w->inherits("KMainWindow") ) {
+ if ( !w->testWState( WState_ForceHide ) && !w->inherits("TDEMainWindow") ) {
TQCloseEvent e;
sendEvent( w, &e );
canceled = !e.isAccepted();
@@ -1346,13 +1346,13 @@ static void checkRestartVersion( TQSessionManager& sm )
}
}
}
- TQString wrapper = KStandardDirs::findExe( "trinity" );
+ TQString wrapper = TDEStandardDirs::findExe( "trinity" );
TQStringList restartCommand = sm.restartCommand();
restartCommand.prepend( wrapper );
sm.setRestartCommand( restartCommand );
}
-void KApplication::saveState( TQSessionManager& sm )
+void TDEApplication::saveState( TQSessionManager& sm )
{
d->session_save = true;
#ifdef Q_WS_X11
@@ -1434,26 +1434,26 @@ void KApplication::saveState( TQSessionManager& sm )
d->session_save = false;
}
-bool KApplication::sessionSaving() const
+bool TDEApplication::sessionSaving() const
{
return d->session_save;
}
-void KApplication::startKdeinit()
+void TDEApplication::startKdeinit()
{
#ifndef Q_WS_WIN //TODO
- KInstance inst( "starttdeinitlock" );
- KLockFile lock( locateLocal( "tmp", "starttdeinitlock", &inst ));
- if( lock.lock( KLockFile::LockNoBlock ) != KLockFile::LockOK ) {
+ TDEInstance inst( "starttdeinitlock" );
+ TDELockFile lock( locateLocal( "tmp", "starttdeinitlock", &inst ));
+ if( lock.lock( TDELockFile::LockNoBlock ) != TDELockFile::LockOK ) {
lock.lock();
DCOPClient cl;
if( cl.attach())
return; // whoever held the lock has already started dcopserver
}
// Try to launch tdeinit.
- TQString srv = KStandardDirs::findExe(TQString::fromLatin1("tdeinit"));
+ TQString srv = TDEStandardDirs::findExe(TQString::fromLatin1("tdeinit"));
if (srv.isEmpty())
- srv = KStandardDirs::findExe(TQString::fromLatin1("tdeinit"), KGlobal::dirs()->kfsstnd_defaultbindir());
+ srv = TDEStandardDirs::findExe(TQString::fromLatin1("tdeinit"), TDEGlobal::dirs()->kfsstnd_defaultbindir());
if (srv.isEmpty())
return;
if (kapp && (Tty != kapp->type()))
@@ -1464,7 +1464,7 @@ void KApplication::startKdeinit()
#endif
}
-void KApplication::dcopFailure(const TQString &msg)
+void TDEApplication::dcopFailure(const TQString &msg)
{
static int failureCount = 0;
failureCount++;
@@ -1476,8 +1476,8 @@ void KApplication::dcopFailure(const TQString &msg)
if (failureCount == 2)
{
#ifdef Q_WS_WIN
- KGlobal::config()->setGroup("General");
- if (KGlobal::config()->readBoolEntry("ignoreDCOPFailures", false))
+ TDEGlobal::config()->setGroup("General");
+ if (TDEGlobal::config()->readBoolEntry("ignoreDCOPFailures", false))
return;
#endif
TQString msgStr(i18n("There was an error setting up inter-process "
@@ -1505,7 +1505,7 @@ void KApplication::dcopFailure(const TQString &msg)
}
}
-static const KCmdLineOptions qt_options[] =
+static const TDECmdLineOptions qt_options[] =
{
//FIXME: Check if other options are specific to Qt/X11
#ifdef Q_WS_X11
@@ -1539,10 +1539,10 @@ static const KCmdLineOptions qt_options[] =
{ "qws", I18N_NOOP("forces the application to run as QWS Server"), 0},
#endif
{ "reverse", I18N_NOOP("mirrors the whole layout of widgets"), 0},
- KCmdLineLastOption
+ TDECmdLineLastOption
};
-static const KCmdLineOptions kde_options[] =
+static const TDECmdLineOptions kde_options[] =
{
{ "caption <caption>", I18N_NOOP("Use 'caption' as name in the titlebar"), 0},
{ "icon <icon>", I18N_NOOP("Use 'icon' as the application icon"), 0},
@@ -1556,19 +1556,19 @@ static const KCmdLineOptions kde_options[] =
{ "smkey <sessionKey>", 0, 0}, // this option is obsolete and exists only to allow smooth upgrades from sessions
// saved under Qt 3.0.x -- Qt 3.1.x includes the session key now automatically in
// the session id (Simon)
- KCmdLineLastOption
+ TDECmdLineLastOption
};
void
-KApplication::addCmdLineOptions()
+TDEApplication::addCmdLineOptions()
{
- KCmdLineArgs::addCmdLineOptions(qt_options, "Qt", "qt");
- KCmdLineArgs::addCmdLineOptions(kde_options, "TDE", "tde");
+ TDECmdLineArgs::addCmdLineOptions(qt_options, "Qt", "qt");
+ TDECmdLineArgs::addCmdLineOptions(kde_options, "TDE", "tde");
}
-void KApplication::parseCommandLine( )
+void TDEApplication::parseCommandLine( )
{
- KCmdLineArgs *args = KCmdLineArgs::parsedArgs("tde");
+ TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs("tde");
if ( !args ) return;
@@ -1581,7 +1581,7 @@ void KApplication::parseCommandLine( )
if (args->isSet("style"))
{
- TQStringList plugins = KGlobal::dirs()->resourceDirs( "qtplugins" );
+ TQStringList plugins = TDEGlobal::dirs()->resourceDirs( "qtplugins" );
TQStringList::Iterator itp = plugins.begin();
while (itp != plugins.end()) {
addLibraryPath( *itp );
@@ -1646,10 +1646,10 @@ void KApplication::parseCommandLine( )
if (!nocrashhandler && args->isSet("crashhandler"))
{
// set default crash handler / set emergency save function to nothing
- KCrash::setCrashHandler(KCrash::defaultCrashHandler);
- KCrash::setEmergencySaveFunction(NULL);
+ TDECrash::setCrashHandler(TDECrash::defaultCrashHandler);
+ TDECrash::setEmergencySaveFunction(NULL);
- KCrash::setApplicationName(TQString(args->appName()));
+ TDECrash::setApplicationName(TQString(args->appName()));
}
#ifdef Q_WS_X11
@@ -1686,12 +1686,12 @@ void KApplication::parseCommandLine( )
}
-TQString KApplication::geometryArgument() const
+TQString TDEApplication::geometryArgument() const
{
return d->geometry_arg;
}
-TQPixmap KApplication::icon() const
+TQPixmap TDEApplication::icon() const
{
if( !aIconPixmap.pm.icon) {
aIconPixmap.pm.icon = new TQPixmap;
@@ -1702,12 +1702,12 @@ TQPixmap KApplication::icon() const
return *aIconPixmap.pm.icon;
}
-TQString KApplication::iconName() const
+TQString TDEApplication::iconName() const
{
return aIconName.isNull() ? (TQString)instanceName() : aIconName;
}
-TQPixmap KApplication::miniIcon() const
+TQPixmap TDEApplication::miniIcon() const
{
if (!aIconPixmap.pm.miniIcon) {
aIconPixmap.pm.miniIcon = new TQPixmap;
@@ -1718,14 +1718,14 @@ TQPixmap KApplication::miniIcon() const
return *aIconPixmap.pm.miniIcon;
}
-TQString KApplication::miniIconName() const
+TQString TDEApplication::miniIconName() const
{
return aMiniIconName.isNull() ? (TQString)instanceName() : aMiniIconName;
}
extern void kDebugCleanup();
-KApplication::~KApplication()
+TDEApplication::~TDEApplication()
{
delete aIconPixmap.pm.miniIcon;
aIconPixmap.pm.miniIcon = 0L;
@@ -1736,7 +1736,7 @@ KApplication::~KApplication()
// First call the static deleters and then call KLibLoader::cleanup()
// The static deleters may delete libraries for which they need KLibLoader.
// KLibLoader will take care of the remaining ones.
- KGlobal::deleteStaticDeleters();
+ TDEGlobal::deleteStaticDeleters();
KLibLoader::cleanUp();
delete smw;
@@ -1745,7 +1745,7 @@ KApplication::~KApplication()
delete s_DCOPClient;
s_DCOPClient = 0L;
- KProcessController::deref();
+ TDEProcessController::deref();
#ifdef Q_WS_X11
if ( d->oldXErrorHandler != NULL )
@@ -1784,7 +1784,7 @@ public:
#endif
#if defined(Q_WS_X11) && defined(COMPOSITE)
-bool KApplication::isCompositionManagerAvailable() {
+bool TDEApplication::isCompositionManagerAvailable() {
bool have_manager = false;
const char *home;
struct passwd *p;
@@ -1816,14 +1816,14 @@ bool KApplication::isCompositionManagerAvailable() {
return have_manager;
}
-bool KApplication::detectCompositionManagerAvailable(bool force_available, bool available) {
+bool TDEApplication::detectCompositionManagerAvailable(bool force_available, bool available) {
bool compositing_manager_available;
if (force_available) {
compositing_manager_available = available;
}
else {
// See if compositing has been enabled
- KCmdLineArgs *qtargs = KCmdLineArgs::parsedArgs("qt");
+ TDECmdLineArgs *qtargs = TDECmdLineArgs::parsedArgs("qt");
char *displayname = 0;
if ( qtargs->isSet("display"))
displayname = qtargs->getOption( "display" ).data();
@@ -1895,8 +1895,8 @@ bool KApplication::detectCompositionManagerAvailable(bool force_available, bool
return compositing_manager_available;
}
-Display* KApplication::openX11RGBADisplay() {
- KCmdLineArgs *qtargs = KCmdLineArgs::parsedArgs("qt");
+Display* TDEApplication::openX11RGBADisplay() {
+ TDECmdLineArgs *qtargs = TDECmdLineArgs::parsedArgs("qt");
char *display = 0;
if ( qtargs->isSet("display"))
display = qtargs->getOption( "display" ).data();
@@ -1910,9 +1910,9 @@ Display* KApplication::openX11RGBADisplay() {
return dpy;
}
-Qt::HANDLE KApplication::getX11RGBAVisual(Display *dpy) {
+Qt::HANDLE TDEApplication::getX11RGBAVisual(Display *dpy) {
getX11RGBAInformation(dpy);
- if (KApplication::isCompositionManagerAvailable() == true) {
+ if (TDEApplication::isCompositionManagerAvailable() == true) {
return argb_x11_visual;
}
else {
@@ -1920,9 +1920,9 @@ Qt::HANDLE KApplication::getX11RGBAVisual(Display *dpy) {
}
}
-Qt::HANDLE KApplication::getX11RGBAColormap(Display *dpy) {
+Qt::HANDLE TDEApplication::getX11RGBAColormap(Display *dpy) {
getX11RGBAInformation(dpy);
- if (KApplication::isCompositionManagerAvailable() == true) {
+ if (TDEApplication::isCompositionManagerAvailable() == true) {
return argb_x11_colormap;
}
else {
@@ -1930,11 +1930,11 @@ Qt::HANDLE KApplication::getX11RGBAColormap(Display *dpy) {
}
}
-bool KApplication::isX11CompositionAvailable() {
+bool TDEApplication::isX11CompositionAvailable() {
return (argb_visual & isCompositionManagerAvailable());
}
-void KApplication::getX11RGBAInformation(Display *dpy) {
+void TDEApplication::getX11RGBAInformation(Display *dpy) {
if ( !dpy ) {
argb_visual = false;
return;
@@ -1976,14 +1976,14 @@ void KApplication::getX11RGBAInformation(Display *dpy) {
return;
}
#else
-void KApplication::getX11RGBAInformation(Display *dpy) {
+void TDEApplication::getX11RGBAInformation(Display *dpy) {
}
-bool KApplication::isCompositionManagerAvailable() {
+bool TDEApplication::isCompositionManagerAvailable() {
return false;
}
-bool KApplication::detectCompositionManagerAvailable(bool force_available) {
+bool TDEApplication::detectCompositionManagerAvailable(bool force_available) {
const char *home;
struct passwd *p;
p = getpwuid(getuid());
@@ -2021,36 +2021,36 @@ bool KApplication::detectCompositionManagerAvailable(bool force_available) {
return false;
}
-Display* KApplication::openX11RGBADisplay() {
+Display* TDEApplication::openX11RGBADisplay() {
return 0;
}
-Qt::HANDLE KApplication::getX11RGBAVisual(char *display) {
+Qt::HANDLE TDEApplication::getX11RGBAVisual(char *display) {
return 0;
}
-Qt::HANDLE KApplication::getX11RGBAColormap(char *display) {
+Qt::HANDLE TDEApplication::getX11RGBAColormap(char *display) {
return 0;
}
-bool KApplication::isX11CompositionAvailable() {
+bool TDEApplication::isX11CompositionAvailable() {
return false;
}
-KApplication KApplication::KARGBApplication( bool allowStyles ) {
- return KApplication::KApplication(allowStyles, true);
+TDEApplication TDEApplication::KARGBApplication( bool allowStyles ) {
+ return TDEApplication::TDEApplication(allowStyles, true);
}
#endif
static bool kapp_block_user_input = false;
-void KApplication::dcopBlockUserInput( bool b )
+void TDEApplication::dcopBlockUserInput( bool b )
{
kapp_block_user_input = b;
}
#ifdef Q_WS_X11
-bool KApplication::x11EventFilter( XEvent *_event )
+bool TDEApplication::x11EventFilter( XEvent *_event )
{
switch ( _event->type ) {
case ClientMessage:
@@ -2123,25 +2123,25 @@ bool KApplication::x11EventFilter( XEvent *_event )
switch (id)
{
case KIPC::StyleChanged:
- KGlobal::config()->reparseConfiguration();
- kdisplaySetStyle();
+ TDEGlobal::config()->reparseConfiguration();
+ tdedisplaySetStyle();
break;
case KIPC::ToolbarStyleChanged:
- KGlobal::config()->reparseConfiguration();
+ TDEGlobal::config()->reparseConfiguration();
if (useStyles)
emit toolbarAppearanceChanged(arg);
break;
case KIPC::PaletteChanged:
- KGlobal::config()->reparseConfiguration();
- kdisplaySetPalette();
+ TDEGlobal::config()->reparseConfiguration();
+ tdedisplaySetPalette();
break;
case KIPC::FontChanged:
- KGlobal::config()->reparseConfiguration();
- KGlobalSettings::rereadFontSettings();
- kdisplaySetFont();
+ TDEGlobal::config()->reparseConfiguration();
+ TDEGlobalSettings::rereadFontSettings();
+ tdedisplaySetFont();
break;
case KIPC::BackgroundChanged:
@@ -2149,28 +2149,28 @@ bool KApplication::x11EventFilter( XEvent *_event )
break;
case KIPC::SettingsChanged:
- KGlobal::config()->reparseConfiguration();
+ TDEGlobal::config()->reparseConfiguration();
if (arg == SETTINGS_PATHS)
- KGlobalSettings::rereadPathSettings();
+ TDEGlobalSettings::rereadPathSettings();
else if (arg == SETTINGS_MOUSE)
- KGlobalSettings::rereadMouseSettings();
+ TDEGlobalSettings::rereadMouseSettings();
propagateSettings((SettingsCategory)arg);
break;
case KIPC::IconChanged:
TQPixmapCache::clear();
- KGlobal::config()->reparseConfiguration();
- KGlobal::instance()->newIconLoader();
+ TDEGlobal::config()->reparseConfiguration();
+ TDEGlobal::instance()->newIconLoader();
emit updateIconLoaders();
emit iconChanged(arg);
break;
case KIPC::ClipboardConfigChanged:
- KClipboardSynchronizer::newConfiguration(arg);
+ TDEClipboardSynchronizer::newConfiguration(arg);
break;
case KIPC::BlockShortcuts:
- KGlobalAccel::blockShortcuts(arg);
+ TDEGlobalAccel::blockShortcuts(arg);
emit kipcMessage(id, arg); // some apps may do additional things
break;
}
@@ -2185,7 +2185,7 @@ bool KApplication::x11EventFilter( XEvent *_event )
}
#endif // Q_WS_X11
-void KApplication::updateUserTimestamp( unsigned long time )
+void TDEApplication::updateUserTimestamp( unsigned long time )
{
#if defined Q_WS_X11
if( time == 0 )
@@ -2205,7 +2205,7 @@ void KApplication::updateUserTimestamp( unsigned long time )
#endif
}
-unsigned long KApplication::userTimestamp() const
+unsigned long TDEApplication::userTimestamp() const
{
#if defined Q_WS_X11
return GET_QT_X_USER_TIME();
@@ -2214,7 +2214,7 @@ unsigned long KApplication::userTimestamp() const
#endif
}
-void KApplication::updateRemoteUserTimestamp( const TQCString& dcopId, unsigned long time )
+void TDEApplication::updateRemoteUserTimestamp( const TQCString& dcopId, unsigned long time )
{
#if defined Q_WS_X11
if( time == 0 )
@@ -2223,7 +2223,7 @@ void KApplication::updateRemoteUserTimestamp( const TQCString& dcopId, unsigned
#endif
}
-void KApplication::invokeEditSlot( const char *slot )
+void TDEApplication::invokeEditSlot( const char *slot )
{
TQObject *object = TQT_TQOBJECT(focusWidget());
if( !object )
@@ -2238,7 +2238,7 @@ void KApplication::invokeEditSlot( const char *slot )
object->tqt_invoke( idx, 0 );
}
-void KApplication::addKipcEventMask(int id)
+void TDEApplication::addKipcEventMask(int id)
{
if (id >= 32)
{
@@ -2248,7 +2248,7 @@ void KApplication::addKipcEventMask(int id)
kipcEventMask |= (1 << id);
}
-void KApplication::removeKipcEventMask(int id)
+void TDEApplication::removeKipcEventMask(int id)
{
if (id >= 32)
{
@@ -2258,7 +2258,7 @@ void KApplication::removeKipcEventMask(int id)
kipcEventMask &= ~(1 << id);
}
-void KApplication::enableStyles()
+void TDEApplication::enableStyles()
{
if (!useStyles)
{
@@ -2267,17 +2267,17 @@ void KApplication::enableStyles()
}
}
-void KApplication::disableStyles()
+void TDEApplication::disableStyles()
{
useStyles = false;
}
-void KApplication::applyGUIStyle()
+void TDEApplication::applyGUIStyle()
{
if ( !useStyles ) return;
- KConfigGroup pConfig (KGlobal::config(), "General");
- TQString defaultStyle = KStyle::defaultStyle();
+ TDEConfigGroup pConfig (TDEGlobal::config(), "General");
+ TQString defaultStyle = TDEStyle::defaultStyle();
TQString styleStr = pConfig.readEntry("widgetStyle", defaultStyle);
if (d->overrideStyle.isEmpty()) {
@@ -2296,18 +2296,18 @@ void KApplication::applyGUIStyle()
else
setStyle(d->overrideStyle);
// Reread palette from config file.
- kdisplaySetPalette();
+ tdedisplaySetPalette();
}
-TQString KApplication::caption() const
+TQString TDEApplication::caption() const
{
// Caption set from command line ?
if( !aCaption.isNull() )
return aCaption;
else
// We have some about data ?
- if ( KGlobal::instance()->aboutData() )
- return KGlobal::instance()->aboutData()->programName();
+ if ( TDEGlobal::instance()->aboutData() )
+ return TDEGlobal::instance()->aboutData()->programName();
else
// Last resort : application name
return name();
@@ -2318,7 +2318,7 @@ TQString KApplication::caption() const
// 1999-09-20: Espen Sand
// An attempt to simplify consistent captions.
//
-TQString KApplication::makeStdCaption( const TQString &userCaption,
+TQString TDEApplication::makeStdCaption( const TQString &userCaption,
bool withAppName, bool modified ) const
{
TQString s = userCaption.isEmpty() ? caption() : userCaption;
@@ -2337,14 +2337,14 @@ TQString KApplication::makeStdCaption( const TQString &userCaption,
return s;
}
-TQPalette KApplication::createApplicationPalette()
+TQPalette TDEApplication::createApplicationPalette()
{
- KConfig *config = KGlobal::config();
- KConfigGroupSaver saver( config, "General" );
- return createApplicationPalette( config, KGlobalSettings::contrast() );
+ TDEConfig *config = TDEGlobal::config();
+ TDEConfigGroupSaver saver( config, "General" );
+ return createApplicationPalette( config, TDEGlobalSettings::contrast() );
}
-TQPalette KApplication::createApplicationPalette( KConfig *config, int contrast_ )
+TQPalette TDEApplication::createApplicationPalette( TDEConfig *config, int contrast_ )
{
TQColor trinity4Background( 239, 239, 239 );
TQColor trinity4Blue( 103,141,178 );
@@ -2435,57 +2435,57 @@ TQPalette KApplication::createApplicationPalette( KConfig *config, int contrast_
}
-void KApplication::kdisplaySetPalette()
+void TDEApplication::tdedisplaySetPalette()
{
#ifdef Q_WS_MACX
//Can I have this on other platforms, please!? --Sam
{
- KConfig *config = KGlobal::config();
- KConfigGroupSaver saver( config, "General" );
+ TDEConfig *config = TDEGlobal::config();
+ TDEConfigGroupSaver saver( config, "General" );
bool do_not_set_palette = FALSE;
if(config->readBoolEntry("nopaletteChange", &do_not_set_palette))
return;
}
#endif
TQApplication::setPalette( createApplicationPalette(), true);
- emit kdisplayPaletteChanged();
+ emit tdedisplayPaletteChanged();
emit appearanceChanged();
}
-void KApplication::kdisplaySetFont()
+void TDEApplication::tdedisplaySetFont()
{
- TQApplication::setFont(KGlobalSettings::generalFont(), true);
- TQApplication::setFont(KGlobalSettings::menuFont(), true, TQMENUBAR_OBJECT_NAME_STRING);
- TQApplication::setFont(KGlobalSettings::menuFont(), true, TQPOPUPMENU_OBJECT_NAME_STRING);
- TQApplication::setFont(KGlobalSettings::menuFont(), true, "KPopupTitle");
+ TQApplication::setFont(TDEGlobalSettings::generalFont(), true);
+ TQApplication::setFont(TDEGlobalSettings::menuFont(), true, TQMENUBAR_OBJECT_NAME_STRING);
+ TQApplication::setFont(TDEGlobalSettings::menuFont(), true, TQPOPUPMENU_OBJECT_NAME_STRING);
+ TQApplication::setFont(TDEGlobalSettings::menuFont(), true, "TDEPopupTitle");
// "patch" standard TQStyleSheet to follow our fonts
TQStyleSheet* sheet = TQStyleSheet::defaultSheet();
- sheet->item ("pre")->setFontFamily (KGlobalSettings::fixedFont().family());
- sheet->item ("code")->setFontFamily (KGlobalSettings::fixedFont().family());
- sheet->item ("tt")->setFontFamily (KGlobalSettings::fixedFont().family());
+ sheet->item ("pre")->setFontFamily (TDEGlobalSettings::fixedFont().family());
+ sheet->item ("code")->setFontFamily (TDEGlobalSettings::fixedFont().family());
+ sheet->item ("tt")->setFontFamily (TDEGlobalSettings::fixedFont().family());
- emit kdisplayFontChanged();
+ emit tdedisplayFontChanged();
emit appearanceChanged();
}
-void KApplication::kdisplaySetStyle()
+void TDEApplication::tdedisplaySetStyle()
{
if (useStyles)
{
applyGUIStyle();
- emit kdisplayStyleChanged();
+ emit tdedisplayStyleChanged();
emit appearanceChanged();
}
}
-void KApplication::propagateSettings(SettingsCategory arg)
+void TDEApplication::propagateSettings(SettingsCategory arg)
{
- KConfigBase* config = KGlobal::config();
- KConfigGroupSaver saver( config, "KDE" );
+ TDEConfigBase* config = TDEGlobal::config();
+ TDEConfigGroupSaver saver( config, "KDE" );
#ifdef QT_HAVE_MAX_IMAGE_SIZE
TQSize maxImageSize(4096, 4096);
@@ -2524,7 +2524,7 @@ void KApplication::propagateSettings(SettingsCategory arg)
emit settingsChanged(arg);
}
-void KApplication::installKDEPropertyMap()
+void TDEApplication::installKDEPropertyMap()
{
#ifndef QT_NO_SQL
static bool installed = false;
@@ -2532,7 +2532,7 @@ void KApplication::installKDEPropertyMap()
installed = true;
/**
* If you are adding a widget that was missing please
- * make sure to also add it to KConfigDialogManager's retrieveSettings()
+ * make sure to also add it to TDEConfigDialogManager's retrieveSettings()
* function.
* Thanks.
*/
@@ -2544,11 +2544,11 @@ void KApplication::installKDEPropertyMap()
kdeMap->insert( "KDateWidget", "date" );
kdeMap->insert( "KDateTimeWidget", "dateTime" );
kdeMap->insert( "KEditListBox", "items" );
- kdeMap->insert( "KFontCombo", "family" );
- kdeMap->insert( "KFontRequester", "font" );
- kdeMap->insert( "KFontChooser", "font" );
+ kdeMap->insert( "TDEFontCombo", "family" );
+ kdeMap->insert( "TDEFontRequester", "font" );
+ kdeMap->insert( "TDEFontChooser", "font" );
kdeMap->insert( "KHistoryCombo", "currentItem" );
- kdeMap->insert( "KListBox", "currentItem" );
+ kdeMap->insert( "TDEListBox", "currentItem" );
kdeMap->insert( "KLineEdit", "text" );
kdeMap->insert( "KRestrictedLine", "text" );
kdeMap->insert( "KSqueezedTextLabel", "text" );
@@ -2566,7 +2566,7 @@ void KApplication::installKDEPropertyMap()
#endif
}
-void KApplication::invokeHelp( const TQString& anchor,
+void TDEApplication::invokeHelp( const TQString& anchor,
const TQString& _appname) const
{
return invokeHelp( anchor, _appname, "" );
@@ -2575,7 +2575,7 @@ void KApplication::invokeHelp( const TQString& anchor,
#ifndef Q_WS_WIN
// for win32 we're using simple help tools like Qt Assistant,
// see kapplication_win.cpp
-void KApplication::invokeHelp( const TQString& anchor,
+void TDEApplication::invokeHelp( const TQString& anchor,
const TQString& _appname,
const TQCString& startup_id ) const
{
@@ -2609,7 +2609,7 @@ void KApplication::invokeHelp( const TQString& anchor,
}
#endif
-void KApplication::invokeHTMLHelp( const TQString& _filename, const TQString& topic ) const
+void TDEApplication::invokeHTMLHelp( const TQString& _filename, const TQString& topic ) const
{
kdWarning() << "invoking HTML help is deprecated! use docbook and invokeHelp!\n";
@@ -2644,28 +2644,28 @@ void KApplication::invokeHTMLHelp( const TQString& _filename, const TQString& to
}
-void KApplication::invokeMailer(const TQString &address, const TQString &subject)
+void TDEApplication::invokeMailer(const TQString &address, const TQString &subject)
{
return invokeMailer(address,subject,"");
}
-void KApplication::invokeMailer(const TQString &address, const TQString &subject, const TQCString& startup_id)
+void TDEApplication::invokeMailer(const TQString &address, const TQString &subject, const TQCString& startup_id)
{
invokeMailer(address, TQString::null, TQString::null, subject, TQString::null, TQString::null,
TQStringList(), startup_id );
}
-void KApplication::invokeMailer(const KURL &mailtoURL)
+void TDEApplication::invokeMailer(const KURL &mailtoURL)
{
return invokeMailer( mailtoURL, "" );
}
-void KApplication::invokeMailer(const KURL &mailtoURL, const TQCString& startup_id )
+void TDEApplication::invokeMailer(const KURL &mailtoURL, const TQCString& startup_id )
{
return invokeMailer( mailtoURL, startup_id, false);
}
-void KApplication::invokeMailer(const KURL &mailtoURL, const TQCString& startup_id, bool allowAttachments )
+void TDEApplication::invokeMailer(const KURL &mailtoURL, const TQCString& startup_id, bool allowAttachments )
{
TQString address = KURL::decode_string(mailtoURL.path()), subject, cc, bcc, body;
TQStringList queries = TQStringList::split('&', mailtoURL.query().mid(1));
@@ -2698,7 +2698,7 @@ void KApplication::invokeMailer(const KURL &mailtoURL, const TQCString& startup_
invokeMailer( address, cc, bcc, subject, body, TQString::null, attachURLs, startup_id );
}
-void KApplication::invokeMailer(const TQString &to, const TQString &cc, const TQString &bcc,
+void TDEApplication::invokeMailer(const TQString &to, const TQString &cc, const TQString &bcc,
const TQString &subject, const TQString &body,
const TQString & messageFile, const TQStringList &attachURLs)
{
@@ -2780,12 +2780,12 @@ static TQStringList splitEmailAddressList( const TQString & aStr )
return list;
}
-void KApplication::invokeMailer(const TQString &_to, const TQString &_cc, const TQString &_bcc,
+void TDEApplication::invokeMailer(const TQString &_to, const TQString &_cc, const TQString &_bcc,
const TQString &subject, const TQString &body,
const TQString & /*messageFile TODO*/, const TQStringList &attachURLs,
const TQCString& startup_id )
{
- KConfig config("emaildefaults");
+ TDEConfig config("emaildefaults");
config.setGroup("Defaults");
TQString group = config.readEntry("Profile","Default");
@@ -2821,7 +2821,7 @@ void KApplication::invokeMailer(const TQString &_to, const TQString &_cc, const
if (config.readBoolEntry("TerminalClient", false))
{
- KConfigGroup confGroup( KGlobal::config(), "General" );
+ TDEConfigGroup confGroup( TDEGlobal::config(), "General" );
TQString preferredTerminal = confGroup.readPathEntry("TerminalApplication", "konsole");
command = preferredTerminal + " -e " + command;
}
@@ -2913,7 +2913,7 @@ void KApplication::invokeMailer(const TQString &_to, const TQString &_cc, const
}
#endif
-void KApplication::invokeBrowser( const TQString &url )
+void TDEApplication::invokeBrowser( const TQString &url )
{
return invokeBrowser( url, "" );
}
@@ -2921,7 +2921,7 @@ void KApplication::invokeBrowser( const TQString &url )
#ifndef Q_WS_WIN
// on win32, for invoking browser we're using win32 API
// see kapplication_win.cpp
-void KApplication::invokeBrowser( const TQString &url, const TQCString& startup_id )
+void TDEApplication::invokeBrowser( const TQString &url, const TQCString& startup_id )
{
TQString error;
@@ -2937,40 +2937,40 @@ void KApplication::invokeBrowser( const TQString &url, const TQCString& startup_
}
#endif
-void KApplication::cut()
+void TDEApplication::cut()
{
invokeEditSlot( TQT_SLOT( cut() ) );
}
-void KApplication::copy()
+void TDEApplication::copy()
{
invokeEditSlot( TQT_SLOT( copy() ) );
}
-void KApplication::paste()
+void TDEApplication::paste()
{
invokeEditSlot( TQT_SLOT( paste() ) );
}
-void KApplication::clear()
+void TDEApplication::clear()
{
invokeEditSlot( TQT_SLOT( clear() ) );
}
-void KApplication::selectAll()
+void TDEApplication::selectAll()
{
invokeEditSlot( TQT_SLOT( selectAll() ) );
}
-void KApplication::broadcastKeyCode(unsigned int keyCode)
+void TDEApplication::broadcastKeyCode(unsigned int keyCode)
{
emit coreFakeKeyPress(keyCode);
}
TQCString
-KApplication::launcher()
+TDEApplication::launcher()
{
- return "klauncher";
+ return "tdelauncher";
}
static int
@@ -3010,7 +3010,7 @@ startServiceInternal( const TQCString &function,
stream << _name << URLs;
TQCString replyType;
TQByteArray replyData;
- TQCString _launcher = KApplication::launcher();
+ TQCString _launcher = TDEApplication::launcher();
TQValueList<TQCString> envs;
#ifdef Q_WS_X11
if (tqt_xdisplay()) {
@@ -3024,7 +3024,7 @@ startServiceInternal( const TQCString &function,
stream << envs;
#if defined Q_WS_X11
// make sure there is id, so that user timestamp exists
- stream << ( startup_id.isEmpty() ? KStartupInfo::createNewStartupId() : startup_id );
+ stream << ( startup_id.isEmpty() ? TDEStartupInfo::createNewStartupId() : startup_id );
#endif
if( function.left( 12 ) != "tdeinit_exec" )
stream << noWait;
@@ -3033,7 +3033,7 @@ startServiceInternal( const TQCString &function,
function, params, replyType, replyData))
{
if (error)
- *error = i18n("KLauncher could not be reached via DCOP.\n");
+ *error = i18n("TDELauncher could not be reached via DCOP.\n");
if (!kapp)
delete dcopClient;
return -1;
@@ -3057,7 +3057,7 @@ startServiceInternal( const TQCString &function,
}
int
-KApplication::startServiceByName( const TQString& _name, const TQString &URL,
+TDEApplication::startServiceByName( const TQString& _name, const TQString &URL,
TQString *error, TQCString *dcopService, int *pid, const TQCString& startup_id, bool noWait )
{
TQStringList URLs;
@@ -3069,7 +3069,7 @@ KApplication::startServiceByName( const TQString& _name, const TQString &URL,
}
int
-KApplication::startServiceByName( const TQString& _name, const TQStringList &URLs,
+TDEApplication::startServiceByName( const TQString& _name, const TQStringList &URLs,
TQString *error, TQCString *dcopService, int *pid, const TQCString& startup_id, bool noWait )
{
return startServiceInternal(
@@ -3078,7 +3078,7 @@ KApplication::startServiceByName( const TQString& _name, const TQStringList &URL
}
int
-KApplication::startServiceByDesktopPath( const TQString& _name, const TQString &URL,
+TDEApplication::startServiceByDesktopPath( const TQString& _name, const TQString &URL,
TQString *error, TQCString *dcopService, int *pid, const TQCString& startup_id, bool noWait )
{
TQStringList URLs;
@@ -3090,7 +3090,7 @@ KApplication::startServiceByDesktopPath( const TQString& _name, const TQString &
}
int
-KApplication::startServiceByDesktopPath( const TQString& _name, const TQStringList &URLs,
+TDEApplication::startServiceByDesktopPath( const TQString& _name, const TQStringList &URLs,
TQString *error, TQCString *dcopService, int *pid, const TQCString& startup_id, bool noWait )
{
return startServiceInternal(
@@ -3099,7 +3099,7 @@ KApplication::startServiceByDesktopPath( const TQString& _name, const TQStringLi
}
int
-KApplication::startServiceByDesktopName( const TQString& _name, const TQString &URL,
+TDEApplication::startServiceByDesktopName( const TQString& _name, const TQString &URL,
TQString *error, TQCString *dcopService, int *pid, const TQCString& startup_id, bool noWait )
{
TQStringList URLs;
@@ -3111,7 +3111,7 @@ KApplication::startServiceByDesktopName( const TQString& _name, const TQString &
}
int
-KApplication::startServiceByDesktopName( const TQString& _name, const TQStringList &URLs,
+TDEApplication::startServiceByDesktopName( const TQString& _name, const TQStringList &URLs,
TQString *error, TQCString *dcopService, int *pid, const TQCString& startup_id, bool noWait )
{
return startServiceInternal(
@@ -3120,14 +3120,14 @@ KApplication::startServiceByDesktopName( const TQString& _name, const TQStringLi
}
int
-KApplication::tdeinitExec( const TQString& name, const TQStringList &args,
+TDEApplication::tdeinitExec( const TQString& name, const TQStringList &args,
TQString *error, int *pid )
{
return tdeinitExec( name, args, error, pid, "" );
}
int
-KApplication::tdeinitExec( const TQString& name, const TQStringList &args,
+TDEApplication::tdeinitExec( const TQString& name, const TQStringList &args,
TQString *error, int *pid, const TQCString& startup_id )
{
return startServiceInternal("tdeinit_exec(TQString,TQStringList,TQValueList<TQCString>,TQCString)",
@@ -3135,27 +3135,27 @@ KApplication::tdeinitExec( const TQString& name, const TQStringList &args,
}
int
-KApplication::tdeinitExecWait( const TQString& name, const TQStringList &args,
+TDEApplication::tdeinitExecWait( const TQString& name, const TQStringList &args,
TQString *error, int *pid )
{
return tdeinitExecWait( name, args, error, pid, "" );
}
int
-KApplication::tdeinitExecWait( const TQString& name, const TQStringList &args,
+TDEApplication::tdeinitExecWait( const TQString& name, const TQStringList &args,
TQString *error, int *pid, const TQCString& startup_id )
{
return startServiceInternal("tdeinit_exec_wait(TQString,TQStringList,TQValueList<TQCString>,TQCString)",
name, args, error, 0, pid, startup_id, false);
}
-TQString KApplication::tempSaveName( const TQString& pFilename ) const
+TQString TDEApplication::tempSaveName( const TQString& pFilename ) const
{
TQString aFilename;
if( TQDir::isRelativePath(pFilename) )
{
- kdWarning(101) << "Relative filename passed to KApplication::tempSaveName" << endl;
+ kdWarning(101) << "Relative filename passed to TDEApplication::tempSaveName" << endl;
aFilename = TQFileInfo( TQDir( "." ), pFilename ).absFilePath();
}
else
@@ -3167,7 +3167,7 @@ TQString KApplication::tempSaveName( const TQString& pFilename ) const
if( !aAutosaveDir.mkdir( aAutosaveDir.absPath() ) )
{
// Last chance: use temp dir
- aAutosaveDir.setPath( KGlobal::dirs()->saveLocation("tmp") );
+ aAutosaveDir.setPath( TDEGlobal::dirs()->saveLocation("tmp") );
}
}
@@ -3177,14 +3177,14 @@ TQString KApplication::tempSaveName( const TQString& pFilename ) const
}
-TQString KApplication::checkRecoverFile( const TQString& pFilename,
+TQString TDEApplication::checkRecoverFile( const TQString& pFilename,
bool& bRecover ) const
{
TQString aFilename;
if( TQDir::isRelativePath(pFilename) )
{
- kdWarning(101) << "Relative filename passed to KApplication::tempSaveName" << endl;
+ kdWarning(101) << "Relative filename passed to TDEApplication::tempSaveName" << endl;
aFilename = TQFileInfo( TQDir( "." ), pFilename ).absFilePath();
}
else
@@ -3196,7 +3196,7 @@ TQString KApplication::checkRecoverFile( const TQString& pFilename,
if( !aAutosaveDir.mkdir( aAutosaveDir.absPath() ) )
{
// Last chance: use temp dir
- aAutosaveDir.setPath( KGlobal::dirs()->saveLocation("tmp") );
+ aAutosaveDir.setPath( TDEGlobal::dirs()->saveLocation("tmp") );
}
}
@@ -3249,13 +3249,13 @@ bool checkAccess(const TQString& pathname, int mode)
return false; // No
}
-void KApplication::setTopWidget( TQWidget *topWidget )
+void TDEApplication::setTopWidget( TQWidget *topWidget )
{
if( !topWidget )
return;
// set the specified caption
- if ( !topWidget->inherits("KMainWindow") ) { // KMainWindow does this already for us
+ if ( !topWidget->inherits("TDEMainWindow") ) { // TDEMainWindow does this already for us
topWidget->setCaption( caption() );
}
@@ -3266,21 +3266,21 @@ void KApplication::setTopWidget( TQWidget *topWidget )
KWin::setIcons(topWidget->winId(), icon(), miniIcon() ); // NET_WM hints for KWin
// set the app startup notification window property
- KStartupInfo::setWindowStartupId( topWidget->winId(), startupId());
+ TDEStartupInfo::setWindowStartupId( topWidget->winId(), startupId());
#endif
}
-TQCString KApplication::startupId() const
+TQCString TDEApplication::startupId() const
{
return d->startup_id;
}
-void KApplication::setStartupId( const TQCString& startup_id )
+void TDEApplication::setStartupId( const TQCString& startup_id )
{
if( startup_id == d->startup_id )
return;
#if defined Q_WS_X11
- KStartupInfo::handleAutoAppStartedSending(); // finish old startup notification if needed
+ TDEStartupInfo::handleAutoAppStartedSending(); // finish old startup notification if needed
#endif
if( startup_id.isEmpty())
d->startup_id = "0";
@@ -3288,7 +3288,7 @@ void KApplication::setStartupId( const TQCString& startup_id )
{
d->startup_id = startup_id;
#if defined Q_WS_X11
- KStartupInfoId id;
+ TDEStartupInfoId id;
id.initId( startup_id );
long timestamp = id.timestamp();
if( timestamp != 0 )
@@ -3299,16 +3299,16 @@ void KApplication::setStartupId( const TQCString& startup_id )
// read the startup notification env variable, save it and unset it in order
// not to propagate it to processes started from this app
-void KApplication::read_app_startup_id()
+void TDEApplication::read_app_startup_id()
{
#if defined Q_WS_X11
- KStartupInfoId id = KStartupInfo::currentStartupIdEnv();
- KStartupInfo::resetStartupEnv();
+ TDEStartupInfoId id = TDEStartupInfo::currentStartupIdEnv();
+ TDEStartupInfo::resetStartupEnv();
d->startup_id = id.id();
#endif
}
-int KApplication::random()
+int TDEApplication::random()
{
static bool init = false;
if (!init)
@@ -3328,7 +3328,7 @@ int KApplication::random()
return rand();
}
-TQString KApplication::randomString(int length)
+TQString TDEApplication::randomString(int length)
{
if (length <=0 ) return TQString::null;
@@ -3346,39 +3346,39 @@ TQString KApplication::randomString(int length)
return str;
}
-bool KApplication::authorize(const TQString &genericAction)
+bool TDEApplication::authorize(const TQString &genericAction)
{
if (!d->actionRestrictions)
return true;
- KConfig *config = KGlobal::config();
- KConfigGroupSaver saver( config, "KDE Action Restrictions" );
+ TDEConfig *config = TDEGlobal::config();
+ TDEConfigGroupSaver saver( config, "KDE Action Restrictions" );
return config->readBoolEntry(genericAction, true);
}
-bool KApplication::authorizeKAction(const char *action)
+bool TDEApplication::authorizeTDEAction(const char *action)
{
if (!d->actionRestrictions || !action)
return true;
- static const TQString &action_prefix = KGlobal::staticQString( "action/" );
+ static const TQString &action_prefix = TDEGlobal::staticQString( "action/" );
return authorize(action_prefix + action);
}
-bool KApplication::authorizeControlModule(const TQString &menuId)
+bool TDEApplication::authorizeControlModule(const TQString &menuId)
{
if (menuId.isEmpty() || kde_kiosk_exception)
return true;
- KConfig *config = KGlobal::config();
- KConfigGroupSaver saver( config, "TDE Control Module Restrictions" );
+ TDEConfig *config = TDEGlobal::config();
+ TDEConfigGroupSaver saver( config, "TDE Control Module Restrictions" );
return config->readBoolEntry(menuId, true);
}
-TQStringList KApplication::authorizeControlModules(const TQStringList &menuIds)
+TQStringList TDEApplication::authorizeControlModules(const TQStringList &menuIds)
{
- KConfig *config = KGlobal::config();
- KConfigGroupSaver saver( config, "TDE Control Module Restrictions" );
+ TDEConfig *config = TDEGlobal::config();
+ TDEConfigGroupSaver saver( config, "TDE Control Module Restrictions" );
TQStringList result;
for(TQStringList::ConstIterator it = menuIds.begin();
it != menuIds.end(); ++it)
@@ -3389,45 +3389,45 @@ TQStringList KApplication::authorizeControlModules(const TQStringList &menuIds)
return result;
}
-void KApplication::initUrlActionRestrictions()
+void TDEApplication::initUrlActionRestrictions()
{
d->urlActionRestrictions.setAutoDelete(true);
d->urlActionRestrictions.clear();
- d->urlActionRestrictions.append( new KApplicationPrivate::URLActionRule
+ d->urlActionRestrictions.append( new TDEApplicationPrivate::URLActionRule
("open", TQString::null, TQString::null, TQString::null, TQString::null, TQString::null, TQString::null, true));
- d->urlActionRestrictions.append( new KApplicationPrivate::URLActionRule
+ d->urlActionRestrictions.append( new TDEApplicationPrivate::URLActionRule
("list", TQString::null, TQString::null, TQString::null, TQString::null, TQString::null, TQString::null, true));
// TEST:
-// d->urlActionRestrictions.append( new KApplicationPrivate::URLActionRule
+// d->urlActionRestrictions.append( new TDEApplicationPrivate::URLActionRule
// ("list", TQString::null, TQString::null, TQString::null, TQString::null, TQString::null, TQString::null, false));
-// d->urlActionRestrictions.append( new KApplicationPrivate::URLActionRule
+// d->urlActionRestrictions.append( new TDEApplicationPrivate::URLActionRule
// ("list", TQString::null, TQString::null, TQString::null, "file", TQString::null, TQDir::homeDirPath(), true));
- d->urlActionRestrictions.append( new KApplicationPrivate::URLActionRule
+ d->urlActionRestrictions.append( new TDEApplicationPrivate::URLActionRule
("link", TQString::null, TQString::null, TQString::null, ":internet", TQString::null, TQString::null, true));
- d->urlActionRestrictions.append( new KApplicationPrivate::URLActionRule
+ d->urlActionRestrictions.append( new TDEApplicationPrivate::URLActionRule
("redirect", TQString::null, TQString::null, TQString::null, ":internet", TQString::null, TQString::null, true));
// We allow redirections to file: but not from internet protocols, redirecting to file:
// is very popular among io-slaves and we don't want to break them
- d->urlActionRestrictions.append( new KApplicationPrivate::URLActionRule
+ d->urlActionRestrictions.append( new TDEApplicationPrivate::URLActionRule
("redirect", TQString::null, TQString::null, TQString::null, "file", TQString::null, TQString::null, true));
- d->urlActionRestrictions.append( new KApplicationPrivate::URLActionRule
+ d->urlActionRestrictions.append( new TDEApplicationPrivate::URLActionRule
("redirect", ":internet", TQString::null, TQString::null, "file", TQString::null, TQString::null, false));
// local protocols may redirect everywhere
- d->urlActionRestrictions.append( new KApplicationPrivate::URLActionRule
+ d->urlActionRestrictions.append( new TDEApplicationPrivate::URLActionRule
("redirect", ":local", TQString::null, TQString::null, TQString::null, TQString::null, TQString::null, true));
// Anyone may redirect to about:
- d->urlActionRestrictions.append( new KApplicationPrivate::URLActionRule
+ d->urlActionRestrictions.append( new TDEApplicationPrivate::URLActionRule
("redirect", TQString::null, TQString::null, TQString::null, "about", TQString::null, TQString::null, true));
// Anyone may redirect to itself, cq. within it's own group
- d->urlActionRestrictions.append( new KApplicationPrivate::URLActionRule
+ d->urlActionRestrictions.append( new TDEApplicationPrivate::URLActionRule
("redirect", TQString::null, TQString::null, TQString::null, "=", TQString::null, TQString::null, true));
- KConfig *config = KGlobal::config();
- KConfigGroupSaver saver( config, "KDE URL Restrictions" );
+ TDEConfig *config = TDEGlobal::config();
+ TDEConfigGroupSaver saver( config, "KDE URL Restrictions" );
int count = config->readNumEntry("rule_count");
TQString keyFormat = TQString("rule_%1");
for(int i = 1; i <= count; i++)
@@ -3457,26 +3457,26 @@ void KApplication::initUrlActionRestrictions()
urlPath.replace(0, 1, TQDir::homeDirPath());
if (refPath.startsWith("$TMP"))
- refPath.replace(0, 4, KGlobal::dirs()->saveLocation("tmp"));
+ refPath.replace(0, 4, TDEGlobal::dirs()->saveLocation("tmp"));
if (urlPath.startsWith("$TMP"))
- urlPath.replace(0, 4, KGlobal::dirs()->saveLocation("tmp"));
+ urlPath.replace(0, 4, TDEGlobal::dirs()->saveLocation("tmp"));
- d->urlActionRestrictions.append(new KApplicationPrivate::URLActionRule
+ d->urlActionRestrictions.append(new TDEApplicationPrivate::URLActionRule
( action, refProt, refHost, refPath, urlProt, urlHost, urlPath, bEnabled));
}
}
-void KApplication::allowURLAction(const TQString &action, const KURL &_baseURL, const KURL &_destURL)
+void TDEApplication::allowURLAction(const TQString &action, const KURL &_baseURL, const KURL &_destURL)
{
if (authorizeURLAction(action, _baseURL, _destURL))
return;
- d->urlActionRestrictions.append(new KApplicationPrivate::URLActionRule
+ d->urlActionRestrictions.append(new TDEApplicationPrivate::URLActionRule
( action, _baseURL.protocol(), _baseURL.host(), _baseURL.path(-1),
_destURL.protocol(), _destURL.host(), _destURL.path(-1), true));
}
-bool KApplication::authorizeURLAction(const TQString &action, const KURL &_baseURL, const KURL &_destURL)
+bool TDEApplication::authorizeURLAction(const TQString &action, const KURL &_baseURL, const KURL &_destURL)
{
if (_destURL.isEmpty())
return true;
@@ -3492,7 +3492,7 @@ bool KApplication::authorizeURLAction(const TQString &action, const KURL &_baseU
destURL.setPath(TQDir::cleanDirPath(destURL.path()));
TQString destClass = KProtocolInfo::protocolClass(destURL.protocol());
- for(KApplicationPrivate::URLActionRule *rule = d->urlActionRestrictions.first();
+ for(TDEApplicationPrivate::URLActionRule *rule = d->urlActionRestrictions.first();
rule; rule = d->urlActionRestrictions.next())
{
if ((result != rule->permission) && // No need to check if it doesn't make a difference
@@ -3507,7 +3507,7 @@ bool KApplication::authorizeURLAction(const TQString &action, const KURL &_baseU
}
-uint KApplication::keyboardModifiers()
+uint TDEApplication::keyboardModifiers()
{
#ifdef Q_WS_X11
Window root;
@@ -3525,7 +3525,7 @@ uint KApplication::keyboardModifiers()
#endif
}
-uint KApplication::mouseState()
+uint TDEApplication::mouseState()
{
uint mousestate;
#ifdef Q_WS_X11
@@ -3550,7 +3550,7 @@ uint KApplication::mouseState()
return mousestate & 0xff00;
}
-TQ_ButtonState KApplication::keyboardMouseState()
+TQ_ButtonState TDEApplication::keyboardMouseState()
{
int ret = 0;
#ifdef Q_WS_X11
@@ -3597,7 +3597,7 @@ TQ_ButtonState KApplication::keyboardMouseState()
return static_cast< ButtonState >( ret );
}
-void KApplication::installSigpipeHandler()
+void TDEApplication::installSigpipeHandler()
{
#ifdef Q_OS_UNIX
struct sigaction act;
@@ -3608,7 +3608,7 @@ void KApplication::installSigpipeHandler()
#endif
}
-void KApplication::sigpipeHandler(int)
+void TDEApplication::sigpipeHandler(int)
{
int saved_errno = errno;
// Using kdDebug from a signal handler is not a good idea.
@@ -3624,15 +3624,15 @@ void KApplication::sigpipeHandler(int)
errno = saved_errno;
}
-bool KApplication::guiEnabled()
+bool TDEApplication::guiEnabled()
{
return kapp && kapp->d->guiEnabled;
}
-void KApplication::virtual_hook( int id, void* data )
-{ KInstance::virtual_hook( id, data ); }
+void TDEApplication::virtual_hook( int id, void* data )
+{ TDEInstance::virtual_hook( id, data ); }
void KSessionManaged::virtual_hook( int, void* )
{ /*BASE::virtual_hook( id, data );*/ }
-#include "kapplication.moc"
+#include "tdeapplication.moc"
diff --git a/tdecore/kapplication.h b/tdecore/tdeapplication.h
index 2da1e0b82..5ab8d7ee7 100644
--- a/tdecore/kapplication.h
+++ b/tdecore/tdeapplication.h
@@ -25,7 +25,7 @@
#include "tdeversion.h"
#include "tdelibs_export.h"
-class KConfig;
+class TDEConfig;
class KCharsets;
class DCOPClient;
class DCOPObject;
@@ -45,12 +45,12 @@ struct _IceConn;
class TQPopupMenu;
class TQStrList;
class KSessionManaged;
-class KStyle;
+class TDEStyle;
class KURL;
-#define kapp KApplication::kApplication()
+#define kapp TDEApplication::kApplication()
-class KApplicationPrivate;
+class TDEApplicationPrivate;
/**
* Controls and provides information to all KDE applications.
@@ -63,15 +63,15 @@ class KApplicationPrivate;
*
* @li It controls the event queue (see TQApplication ).
* @li It provides the application with KDE resources such as
-* accelerators, common menu entries, a KConfig object. session
+* accelerators, common menu entries, a TDEConfig object. session
* management events, help invocation etc.
* @li Installs a signal handler for the SIGCHLD signal in order to
* avoid zombie children. If you want to catch this signal yourself or
* don't want it to be caught at all, you have set a new signal handler
-* (or SIG_IGN) after KApplication's constructor has run.
+* (or SIG_IGN) after TDEApplication's constructor has run.
* @li Installs an empty signal handler for the SIGPIPE signal using
* installSigpipeHandler(). If you want to catch this signal
-* yourself, you have set a new signal handler after KApplication's
+* yourself, you have set a new signal handler after TDEApplication's
* constructor has run.
* @li It can start new services
*
@@ -93,7 +93,7 @@ class KApplicationPrivate;
* @short Controls and provides information to all KDE applications.
* @author Matthias Kalle Dalheimer <kalle@kde.org>
*/
-class TDECORE_EXPORT KApplication : public TQApplication, public KInstance
+class TDECORE_EXPORT TDEApplication : public TQApplication, public TDEInstance
{
Q_OBJECT
@@ -111,13 +111,13 @@ public:
/**
* This constructor takes aboutData and command line
- * arguments from KCmdLineArgs.
+ * arguments from TDECmdLineArgs.
*
* If ARGB (transparent) widgets are to be used in your application,
* please use
- * KApplication app(KApplication::openX11RGBADisplay());
+ * TDEApplication app(TDEApplication::openX11RGBADisplay());
* or
- * KApplication app(KApplication::openX11RGBADisplay(), useStyles);
+ * TDEApplication app(TDEApplication::openX11RGBADisplay(), useStyles);
*
* @param allowStyles Set to false to disable the loading on plugin based
* styles. This is only useful to applications that do not display a GUI
@@ -128,7 +128,7 @@ public:
* @param GUIenabled Set to false to disable all GUI stuff. This implies
* no styles either.
*/
- KApplication( bool allowStyles=true, bool GUIenabled=true);
+ TDEApplication( bool allowStyles=true, bool GUIenabled=true);
#ifdef Q_WS_X11
/**
@@ -148,7 +148,7 @@ public:
*
* @see RGBADisplay()
*/
- KApplication(Display *display, bool allowStyles);
+ TDEApplication(Display *display, bool allowStyles);
/**
* Constructor. Parses command-line arguments. Use this constructor when you
@@ -177,7 +177,7 @@ public:
*
* @see RGBADisplay()
*/
- KApplication(Display *display, bool disable_argb, Qt::HANDLE visual, Qt::HANDLE colormap, bool allowStyles);
+ TDEApplication(Display *display, bool disable_argb, Qt::HANDLE visual, Qt::HANDLE colormap, bool allowStyles);
/**
* Constructor. Parses command-line arguments. Use this constructor when you
@@ -202,11 +202,11 @@ public:
*
* @since KDE 3.3
*/
- KApplication(Display *display, Qt::HANDLE visual = 0, Qt::HANDLE colormap = 0,
+ TDEApplication(Display *display, Qt::HANDLE visual = 0, Qt::HANDLE colormap = 0,
bool allowStyles=true);
/**
- * Constructor. Parses command-line arguments. Use this constructor to use KApplication
+ * Constructor. Parses command-line arguments. Use this constructor to use TDEApplication
* in a Motif or Xt program.
*
* @param display Will be passed to Qt as the X display. The display must be valid and already
@@ -229,12 +229,12 @@ public:
* @param GUIenabled Set to false to disable all GUI stuff. This implies
* no styles either.
*/
- KApplication(Display *display, int& argc, char** argv, const TQCString& rAppName,
+ TDEApplication(Display *display, int& argc, char** argv, const TQCString& rAppName,
bool allowStyles=true, bool GUIenabled=true);
#endif
/**
- * @deprecated do not use it at all, it will make your application crash, use KCmdLineArgs
+ * @deprecated do not use it at all, it will make your application crash, use TDECmdLineArgs
*
* Constructor. Parses command-line arguments.
*
@@ -256,37 +256,37 @@ public:
* no styles either.
*/
// REMOVE FOR KDE 4.0 - using it only gives crashing applications because
- // KCmdLineArgs::init isn't called
- KApplication(int& argc, char** argv,
+ // TDECmdLineArgs::init isn't called
+ TDEApplication(int& argc, char** argv,
const TQCString& rAppName, bool allowStyles=true, bool GUIenabled=true) KDE_DEPRECATED;
/**
- * Add Qt and KDE command line options to KCmdLineArgs.
+ * Add Qt and KDE command line options to TDECmdLineArgs.
*/
static void addCmdLineOptions();
- virtual ~KApplication();
+ virtual ~TDEApplication();
/**
* Returns the current application object.
*
* This is similar to the global TQApplication pointer tqApp. It
- * allows access to the single global KApplication object, since
+ * allows access to the single global TDEApplication object, since
* more than one cannot be created in the same application. It
* saves you the trouble of having to pass the pointer explicitly
* to every function that may require it.
* @return the current application object
*/
- static KApplication* kApplication() { return KApp; }
+ static TDEApplication* kApplication() { return KApp; }
/**
* Returns the application session config object.
*
* @return A pointer to the application's instance specific
- * KConfig object.
- * @see KConfig
+ * TDEConfig object.
+ * @see TDEConfig
*/
- KConfig* sessionConfig();
+ TDEConfig* sessionConfig();
/**
* Is the application restored from the session manager?
@@ -432,10 +432,10 @@ public:
/**
* Returns true if the application is currently saving its session
* data (most probably before KDE logout). This is intended for use
- * mainly in KMainWindow::queryClose() and KMainWindow::queryExit().
+ * mainly in TDEMainWindow::queryClose() and TDEMainWindow::queryExit().
*
- * @see KMainWindow::queryClose
- * @see KMainWindow::queryExit
+ * @see TDEMainWindow::queryClose
+ * @see TDEMainWindow::queryExit
* @since 3.1.1
*/
bool sessionSaving() const;
@@ -450,7 +450,7 @@ public:
/**
* Disable automatic dcop registration
- * Must be called before creating a KApplication instance to have an effect.
+ * Must be called before creating a TDEApplication instance to have an effect.
*/
static void disableAutoDcopRegistration();
@@ -482,7 +482,7 @@ public:
* Sets the top widget of the application.
* This means basically applying the right window caption and
* icon. An application may have several top widgets. You don't
- * need to call this function manually when using KMainWindow.
+ * need to call this function manually when using TDEMainWindow.
*
* @param topWidget A top widget of the application.
*
@@ -627,21 +627,21 @@ public slots:
* If the widget with focus provides a clear() slot, call that slot. Thus for a
* simple application clear() can be implemented as:
* \code
- * new KAction( i18n( "Clear" ), "editclear", 0, kapp, TQT_SLOT( clear() ), actionCollection(), "clear" );
+ * new TDEAction( i18n( "Clear" ), "editclear", 0, kapp, TQT_SLOT( clear() ), actionCollection(), "clear" );
* \endcode
*
* Note that for some widgets, this may not provide the intended bahavior. For
- * example if you make use of the code above and a KListView has the focus, clear()
+ * example if you make use of the code above and a TDEListView has the focus, clear()
* will clear all of the items in the list. If this is not the intened behavior
- * and you want to make use of this slot, you can subclass KListView and reimplement
- * this slot. For example the following code would implement a KListView without this
+ * and you want to make use of this slot, you can subclass TDEListView and reimplement
+ * this slot. For example the following code would implement a TDEListView without this
* behavior:
*
* \code
- * class MyListView : public KListView {
+ * class MyListView : public TDEListView {
* Q_OBJECT
* public:
- * MyListView( TQWidget * parent = 0, const char * name = 0, WFlags f = 0 ) : KListView( parent, name, f ) {}
+ * MyListView( TQWidget * parent = 0, const char * name = 0, WFlags f = 0 ) : TDEListView( parent, name, f ) {}
* virtual ~MyListView() {}
* public slots:
* virtual void clear() {}
@@ -662,7 +662,7 @@ public slots:
/**
* Broadcast a received keycode to all listening KDE applications
* The primary use for this feature is to connect hotkeys such as
- * XF86Display to their respective KGlobalAccel functions while
+ * XF86Display to their respective TDEGlobalAccel functions while
* the screen is locked by kdesktop_lock.
*/
void broadcastKeyCode(unsigned int keyCode);
@@ -872,7 +872,7 @@ public:
/**
* @deprecated
*/
- KDE_DEPRECATED KStyle* kstyle() const { return 0; }
+ KDE_DEPRECATED TDEStyle* kstyle() const { return 0; }
/**
* Builds a caption that contains the application name along with the
@@ -951,10 +951,10 @@ public:
/**
* @internal
* Opens the display
- * This can be used to initialize a KApplication with RGBA support like this:
- * KApplication app(KApplication::openX11RGBADisplay());
+ * This can be used to initialize a TDEApplication with RGBA support like this:
+ * TDEApplication app(TDEApplication::openX11RGBADisplay());
* or
- * KApplication app(KApplication::openX11RGBADisplay(), useStyles);
+ * TDEApplication app(TDEApplication::openX11RGBADisplay(), useStyles);
*/
static Display* openX11RGBADisplay();
@@ -978,7 +978,7 @@ public:
* You must first call getX11RGBAInformation()
*
* Note that getX11RGBAInformation() has already
- * been called if you used the default KApplication
+ * been called if you used the default TDEApplication
* constructor.
*
* Additionally, at least one application must have called
@@ -994,7 +994,7 @@ public:
* Enables style plugins.
*
* This is useful only to applications that normally
- * do not display a GUI and create the KApplication with
+ * do not display a GUI and create the TDEApplication with
* allowStyles set to false.
*/
void enableStyles();
@@ -1071,7 +1071,7 @@ public:
* Sets a new value for the application startup notification window property for newly
* created toplevel windows.
* @param startup_id the startup notification identifier
- * @see KStartupInfo::setNewStartupId
+ * @see TDEStartupInfo::setNewStartupId
*/
void setStartupId( const TQCString& startup_id );
@@ -1121,13 +1121,13 @@ public:
bool authorize(const TQString &genericAction);
/**
- * Returns whether a certain KAction is authorized.
+ * Returns whether a certain TDEAction is authorized.
*
- * @param action The name of a KAction action. The name is prepended
+ * @param action The name of a TDEAction action. The name is prepended
* with "action/" before being passed to authorize()
- * @return true if the KAction is authorized
+ * @return true if the TDEAction is authorized
*/
- bool authorizeKAction(const char *action);
+ bool authorizeTDEAction(const char *action);
/**
* Returns whether a certain URL related action is authorized.
@@ -1215,7 +1215,7 @@ public:
public slots:
/**
- * Tells KApplication about one more operation that should be finished
+ * Tells TDEApplication about one more operation that should be finished
* before the application exits. The standard behavior is to exit on the
* "last window closed" event, but some events should outlive the last window closed
* (e.g. a file copy for a file manager, or 'compacting folders on exit' for a mail client).
@@ -1223,7 +1223,7 @@ public slots:
void ref();
/**
- * Tells KApplication that one operation such as those described in ref() just finished.
+ * Tells TDEApplication that one operation such as those described in ref() just finished.
* The application exits if the counter is back to 0.
*/
void deref();
@@ -1232,14 +1232,14 @@ protected:
/**
* @internal Used by KUniqueApplication
*/
- KApplication( bool allowStyles, bool GUIenabled, KInstance* _instance );
+ TDEApplication( bool allowStyles, bool GUIenabled, TDEInstance* _instance );
#ifdef Q_WS_X11
/**
* @internal Used by KUniqueApplication
*/
- KApplication( Display *display, Qt::HANDLE visual, Qt::HANDLE colormap,
- bool allowStyles, KInstance* _instance );
+ TDEApplication( Display *display, Qt::HANDLE visual, Qt::HANDLE colormap,
+ bool allowStyles, TDEInstance* _instance );
/**
* Used to catch X11 events
@@ -1252,7 +1252,7 @@ protected:
int kipcEventMask;
/// Current application object.
- static KApplication *KApp;
+ static TDEApplication *KApp;
int pArgc;
/**
@@ -1261,8 +1261,8 @@ protected:
*
* @param slot is the slot as returned using the TQT_SLOT() macro, for example TQT_SLOT( cut() )
*
- * This method can be used in KApplication subclasses to implement application wide
- * edit actions not supported by the KApplication class. For example (in your subclass):
+ * This method can be used in TDEApplication subclasses to implement application wide
+ * edit actions not supported by the TDEApplication class. For example (in your subclass):
*
* \code
* void MyApplication::deselect()
@@ -1272,7 +1272,7 @@ protected:
* \endcode
*
* Now in your application calls to MyApplication::deselect() will call this slot on the
- * focused widget if it provides this slot. You can combine this with KAction with:
+ * focused widget if it provides this slot. You can combine this with TDEAction with:
*
* \code
* KStdAction::deselect( static_cast<MyApplication *>( kapp ), TQT_SLOT( cut() ), actionCollection() );
@@ -1296,7 +1296,7 @@ private slots:
private:
TQString sessionConfigName() const;
- KConfig* pSessionConfig; //instance specific application config object
+ TDEConfig* pSessionConfig; //instance specific application config object
static DCOPClient *s_DCOPClient; // app specific application communication client
static bool s_dcopClientNeedsPostInit;
TQString aCaption; // the name for the window title
@@ -1315,7 +1315,7 @@ private:
void init( bool GUIenabled );
- void parseCommandLine( ); // Handle KDE arguments (Using KCmdLineArgs)
+ void parseCommandLine( ); // Handle KDE arguments (Using TDECmdLineArgs)
void read_app_startup_id();
@@ -1380,13 +1380,13 @@ public:
* @internal
* Raw access for use by TDM.
*/
- static TQPalette createApplicationPalette( KConfig *config, int contrast );
+ static TQPalette createApplicationPalette( TDEConfig *config, int contrast );
/**
* Installs a handler for the SIGPIPE signal. It is thrown when you write to
* a pipe or socket that has been closed.
* The handler is installed automatically in the constructor, but you may
- * need it if your application or component does not have a KApplication
+ * need it if your application or component does not have a TDEApplication
* instance.
*/
static void installSigpipeHandler();
@@ -1401,24 +1401,24 @@ public:
signals:
/**
- * Emitted when KApplication has changed its palette due to a KControl request.
+ * Emitted when TDEApplication has changed its palette due to a KControl request.
*
* Normally, widgets will update their palette automatically, but you
* should connect to this to program special behavior.
*/
- void kdisplayPaletteChanged();
+ void tdedisplayPaletteChanged();
/**
- * Emitted when KApplication has changed its GUI style in response to a KControl request.
+ * Emitted when TDEApplication has changed its GUI style in response to a KControl request.
*
* Normally, widgets will update their styles automatically (as they would
* respond to an explicit setGUIStyle() call), but you should connect to
* this to program special behavior.
*/
- void kdisplayStyleChanged();
+ void tdedisplayStyleChanged();
/**
- * Emitted when KApplication has changed its font in response to a KControl request.
+ * Emitted when TDEApplication has changed its font in response to a KControl request.
*
* Normally widgets will update their fonts automatically, but you should
* connect to this to monitor global font changes, especially if you are
@@ -1428,17 +1428,17 @@ signals:
* reimplement TQWidget::fontChange(). This is the preferred way
* to get informed about font updates.
*/
- void kdisplayFontChanged();
+ void tdedisplayFontChanged();
/**
- * Emitted when KApplication has changed either its GUI style, its font or its palette
- * in response to a kdisplay request. Normally, widgets will update their styles
+ * Emitted when TDEApplication has changed either its GUI style, its font or its palette
+ * in response to a tdedisplay request. Normally, widgets will update their styles
* automatically, but you should connect to this to program special
* behavior. */
void appearanceChanged();
/**
- * Emitted when the settings for toolbars have been changed. KToolBar will know what to do.
+ * Emitted when the settings for toolbars have been changed. TDEToolBar will know what to do.
*/
void toolbarAppearanceChanged(int);
@@ -1450,8 +1450,8 @@ signals:
void backgroundChanged(int desk);
/**
- * Emitted when the global settings have been changed - see KGlobalSettings
- * KApplication takes care of calling reparseConfiguration on KGlobal::config()
+ * Emitted when the global settings have been changed - see TDEGlobalSettings
+ * TDEApplication takes care of calling reparseConfiguration on TDEGlobal::config()
* so that applications/classes using this only have to re-read the configuration
* @param category the category among the enum above
*/
@@ -1478,12 +1478,12 @@ signals:
Session management asks you to save the state of your application.
This signal is provided for compatibility only. For new
- applications, simply use KMainWindow. By reimplementing
- KMainWindow::queryClose(), KMainWindow::saveProperties() and
- KMainWindow::readProperties() you can simply handle session
+ applications, simply use TDEMainWindow. By reimplementing
+ TDEMainWindow::queryClose(), TDEMainWindow::saveProperties() and
+ TDEMainWindow::readProperties() you can simply handle session
management for applications with multiple toplevel windows.
- For purposes without KMainWindow, create an instance of
+ For purposes without TDEMainWindow, create an instance of
KSessionManaged and reimplement the functions
KSessionManaged::commitData() and/or
KSessionManaged::saveState()
@@ -1494,7 +1494,7 @@ signals:
manipulate the UI in that slot, it is blocked by the session
manager.
- Use the sessionConfig() KConfig object to store all your
+ Use the sessionConfig() TDEConfig object to store all your
instance specific data.
Do not do any closing at this point! The user may still select
@@ -1516,37 +1516,37 @@ signals:
/**
* @internal
- * Used to notify KIconLoader objects that they need to reload.
+ * Used to notify TDEIconLoader objects that they need to reload.
*/
void updateIconLoaders();
/**
* @internal
- * Used to send KGlobalAccel objects a new keypress from physical hotkeys.
+ * Used to send TDEGlobalAccel objects a new keypress from physical hotkeys.
*/
void coreFakeKeyPress(unsigned int keyCode);
private:
void propagateSettings(SettingsCategory category);
- void kdisplaySetPalette();
- void kdisplaySetStyle();
- void kdisplaySetFont();
+ void tdedisplaySetPalette();
+ void tdedisplaySetStyle();
+ void tdedisplaySetFont();
void applyGUIStyle();
static void sigpipeHandler(int);
int captionLayout;
- KApplication(const KApplication&);
- KApplication& operator=(const KApplication&);
+ TDEApplication(const TDEApplication&);
+ TDEApplication& operator=(const TDEApplication&);
protected:
virtual void virtual_hook( int id, void* data );
private:
- KApplicationPrivate* d;
+ TDEApplicationPrivate* d;
};
/**
- * \relates KGlobal
+ * \relates TDEGlobal
* Check, if a file may be accessed in a given mode.
* This is a wrapper around the access() system call.
* checkAccess() calls access() with the given parameters.
@@ -1572,12 +1572,12 @@ class KSessionManagedPrivate;
KSessionManaged makes it possible to provide implementations for
TQApplication::commitData() and TQApplication::saveState(), without
- subclassing KApplication. KMainWindow internally makes use of this.
+ subclassing TDEApplication. TDEMainWindow internally makes use of this.
You don't need to do anything with this class when using
- KMainWindow. Instead, use KMainWindow::saveProperties(),
- KMainWindow::readProperties(), KMainWindow::queryClose(),
- KMainWindow::queryExit() and friends.
+ TDEMainWindow. Instead, use TDEMainWindow::saveProperties(),
+ TDEMainWindow::readProperties(), TDEMainWindow::queryClose(),
+ TDEMainWindow::queryExit() and friends.
@short Highlevel access to session management.
@author Matthias Ettrich <ettrich@kde.org>
@@ -1591,7 +1591,7 @@ public:
/**
See TQApplication::saveState() for documentation.
- This function is just a convenience version to avoid subclassing KApplication.
+ This function is just a convenience version to avoid subclassing TDEApplication.
Return true to indicate a successful state save or false to
indicate a problem and to halt the shutdown process (will
@@ -1601,7 +1601,7 @@ public:
/**
See TQApplication::commitData() for documentation.
- This function is just a convenience version to avoid subclassing KApplication.
+ This function is just a convenience version to avoid subclassing TDEApplication.
Return true to indicate a successful commit of data or false to
indicate a problem and to halt the shutdown process (will
diff --git a/tdecore/kcmdlineargs.cpp b/tdecore/tdecmdlineargs.cpp
index 7abc46f7a..46d1b9f4a 100644
--- a/tdecore/kcmdlineargs.cpp
+++ b/tdecore/tdecmdlineargs.cpp
@@ -35,11 +35,11 @@
#include <tqasciidict.h>
#include <tqstrlist.h>
-#include "kcmdlineargs.h"
-#include <kaboutdata.h>
-#include <klocale.h>
-#include <kapplication.h>
-#include <kglobal.h>
+#include "tdecmdlineargs.h"
+#include <tdeaboutdata.h>
+#include <tdelocale.h>
+#include <tdeapplication.h>
+#include <tdeglobal.h>
#include <kstringhandler.h>
#include <kstaticdeleter.h>
@@ -54,16 +54,16 @@
#endif
template class TQAsciiDict<TQCString>;
-template class TQPtrList<KCmdLineArgs>;
+template class TQPtrList<TDECmdLineArgs>;
-class KCmdLineParsedOptions : public TQAsciiDict<TQCString>
+class TDECmdLineParsedOptions : public TQAsciiDict<TQCString>
{
public:
- KCmdLineParsedOptions()
+ TDECmdLineParsedOptions()
: TQAsciiDict<TQCString>( 7 ) { }
// WABA: Huh?
- // The compiler doesn't find KCmdLineParsedOptions::write(s) by itself ???
+ // The compiler doesn't find TDECmdLineParsedOptions::write(s) by itself ???
// WABA: No, because there is another write function that hides the
// write function in the base class even though this function has a
// different signature. (obscure C++ feature)
@@ -91,10 +91,10 @@ protected:
};
-class KCmdLineParsedArgs : public TQStrList
+class TDECmdLineParsedArgs : public TQStrList
{
public:
- KCmdLineParsedArgs()
+ TDECmdLineParsedArgs()
: TQStrList( true ) { }
TQDataStream& save( TQDataStream &s) const
{ return TQGList::write(s); }
@@ -104,53 +104,53 @@ public:
};
-class KCmdLineArgsList: public TQPtrList<KCmdLineArgs>
+class TDECmdLineArgsList: public TQPtrList<TDECmdLineArgs>
{
public:
- KCmdLineArgsList() { }
+ TDECmdLineArgsList() { }
};
-KCmdLineArgsList *KCmdLineArgs::argsList = 0;
-int KCmdLineArgs::argc = 0;
-char **KCmdLineArgs::argv = 0;
-char *KCmdLineArgs::mCwd = 0;
+TDECmdLineArgsList *TDECmdLineArgs::argsList = 0;
+int TDECmdLineArgs::argc = 0;
+char **TDECmdLineArgs::argv = 0;
+char *TDECmdLineArgs::mCwd = 0;
static KStaticDeleter <char> mCwdd;
-const KAboutData *KCmdLineArgs::about = 0;
-bool KCmdLineArgs::parsed = false;
-bool KCmdLineArgs::ignoreUnknown = false;
+const TDEAboutData *TDECmdLineArgs::about = 0;
+bool TDECmdLineArgs::parsed = false;
+bool TDECmdLineArgs::ignoreUnknown = false;
//
// Static functions
//
void
-KCmdLineArgs::init(int _argc, char **_argv, const char *_appname, const char* programName,
+TDECmdLineArgs::init(int _argc, char **_argv, const char *_appname, const char* programName,
const char *_description, const char *_version, bool noKApp)
{
init(_argc, _argv,
- new KAboutData(_appname, programName, _version, _description),
+ new TDEAboutData(_appname, programName, _version, _description),
noKApp);
}
void
-KCmdLineArgs::init(int _argc, char **_argv, const char *_appname,
+TDECmdLineArgs::init(int _argc, char **_argv, const char *_appname,
const char *_description, const char *_version, bool noKApp)
{
init(_argc, _argv,
- new KAboutData(_appname, _appname, _version, _description),
+ new TDEAboutData(_appname, _appname, _version, _description),
noKApp);
}
void
-KCmdLineArgs::initIgnore(int _argc, char **_argv, const char *_appname )
+TDECmdLineArgs::initIgnore(int _argc, char **_argv, const char *_appname )
{
init(_argc, _argv,
- new KAboutData(_appname, _appname, "unknown", "TDE Application", false));
+ new TDEAboutData(_appname, _appname, "unknown", "TDE Application", false));
ignoreUnknown = true;
}
void
-KCmdLineArgs::init(const KAboutData* ab)
+TDECmdLineArgs::init(const TDEAboutData* ab)
{
char **_argv = (char **) malloc(sizeof(char *));
_argv[0] = (char *) ab->appName();
@@ -159,14 +159,14 @@ KCmdLineArgs::init(const KAboutData* ab)
void
-KCmdLineArgs::init(int _argc, char **_argv, const KAboutData *_about, bool noKApp)
+TDECmdLineArgs::init(int _argc, char **_argv, const TDEAboutData *_about, bool noKApp)
{
argc = _argc;
argv = _argv;
if (!argv)
{
- fprintf(stderr, "\n\nFAILURE (KCmdLineArgs):\n");
+ fprintf(stderr, "\n\nFAILURE (TDECmdLineArgs):\n");
fprintf(stderr, "Passing null-pointer to 'argv' is not allowed.\n\n");
assert( 0 );
@@ -188,33 +188,33 @@ KCmdLineArgs::init(int _argc, char **_argv, const KAboutData *_about, bool noKAp
win32_slashify(mCwd, PATH_MAX);
#endif
if (!noKApp)
- KApplication::addCmdLineOptions();
+ TDEApplication::addCmdLineOptions();
}
-TQString KCmdLineArgs::cwd()
+TQString TDECmdLineArgs::cwd()
{
return TQFile::decodeName(TQCString(mCwd));
}
-const char * KCmdLineArgs::appName()
+const char * TDECmdLineArgs::appName()
{
if (!argc) return 0;
return argv[0];
}
void
-KCmdLineArgs::addCmdLineOptions( const KCmdLineOptions *options, const char *name,
+TDECmdLineArgs::addCmdLineOptions( const TDECmdLineOptions *options, const char *name,
const char *id, const char *afterId)
{
if (!argsList)
- argsList = new KCmdLineArgsList();
+ argsList = new TDECmdLineArgsList();
int pos = argsList->count();
if (pos && id && argsList->last() && !argsList->last()->name)
pos--;
- KCmdLineArgs *args;
+ TDECmdLineArgs *args;
int i = 0;
for(args = argsList->first(); args; args = argsList->next(), i++)
{
@@ -230,12 +230,12 @@ KCmdLineArgs::addCmdLineOptions( const KCmdLineOptions *options, const char *nam
assert( parsed == false ); // You must add _ALL_ cmd line options
// before accessing the arguments!
- args = new KCmdLineArgs(options, name, id);
+ args = new TDECmdLineArgs(options, name, id);
argsList->insert(pos, args);
}
void
-KCmdLineArgs::saveAppArgs( TQDataStream &ds)
+TDECmdLineArgs::saveAppArgs( TQDataStream &ds)
{
if (!parsed)
parseAllArgs();
@@ -252,7 +252,7 @@ KCmdLineArgs::saveAppArgs( TQDataStream &ds)
if (!count) return;
- KCmdLineArgs *args;
+ TDECmdLineArgs *args;
for(args = argsList->first(); args; args = argsList->next())
{
ds << TQCString(args->id);
@@ -261,7 +261,7 @@ KCmdLineArgs::saveAppArgs( TQDataStream &ds)
}
void
-KCmdLineArgs::loadAppArgs( TQDataStream &ds)
+TDECmdLineArgs::loadAppArgs( TQDataStream &ds)
{
parsed = true; // don't reparse argc/argv!
@@ -269,7 +269,7 @@ KCmdLineArgs::loadAppArgs( TQDataStream &ds)
removeArgs("qt");
removeArgs("tde");
- KCmdLineArgs *args;
+ TDECmdLineArgs *args;
if ( argsList ) {
for(args = argsList->first(); args; args = argsList->next())
{
@@ -307,9 +307,9 @@ KCmdLineArgs::loadAppArgs( TQDataStream &ds)
parsed = true;
}
-KCmdLineArgs *KCmdLineArgs::parsedArgs(const char *id)
+TDECmdLineArgs *TDECmdLineArgs::parsedArgs(const char *id)
{
- KCmdLineArgs *args = argsList ? argsList->first() : 0;
+ TDECmdLineArgs *args = argsList ? argsList->first() : 0;
while(args)
{
if ((id && ::qstrcmp(args->id, id) == 0) || (!id && !args->id))
@@ -324,9 +324,9 @@ KCmdLineArgs *KCmdLineArgs::parsedArgs(const char *id)
return args;
}
-void KCmdLineArgs::removeArgs(const char *id)
+void TDECmdLineArgs::removeArgs(const char *id)
{
- KCmdLineArgs *args = argsList ? argsList->first() : 0;
+ TDECmdLineArgs *args = argsList ? argsList->first() : 0;
while(args)
{
if (args->id && id && ::qstrcmp(args->id, id) == 0)
@@ -352,7 +352,7 @@ void KCmdLineArgs::removeArgs(const char *id)
* +4 - no more options follow // !fork
*/
static int
-findOption(const KCmdLineOptions *options, TQCString &opt,
+findOption(const TDECmdLineOptions *options, TQCString &opt,
const char *&opt_name, const char *&def, bool &enabled)
{
int result;
@@ -426,9 +426,9 @@ findOption(const KCmdLineOptions *options, TQCString &opt,
void
-KCmdLineArgs::findOption(const char *_opt, TQCString opt, int &i, bool _enabled, bool &moreOptions)
+TDECmdLineArgs::findOption(const char *_opt, TQCString opt, int &i, bool _enabled, bool &moreOptions)
{
- KCmdLineArgs *args = argsList->first();
+ TDECmdLineArgs *args = argsList->first();
const char *opt_name;
const char *def;
TQCString argument;
@@ -534,22 +534,22 @@ KCmdLineArgs::findOption(const char *_opt, TQCString opt, int &i, bool _enabled,
}
void
-KCmdLineArgs::printQ(const TQString &msg)
+TDECmdLineArgs::printQ(const TQString &msg)
{
TQCString localMsg = msg.local8Bit();
fprintf(stdout, "%s", localMsg.data());
}
void
-KCmdLineArgs::parseAllArgs()
+TDECmdLineArgs::parseAllArgs()
{
bool allowArgs = false;
bool inOptions = true;
bool everythingAfterArgIsArgs = false;
- KCmdLineArgs *appOptions = argsList->last();
+ TDECmdLineArgs *appOptions = argsList->last();
if (!appOptions->id)
{
- const KCmdLineOptions *option = appOptions->options;
+ const TDECmdLineOptions *option = appOptions->options;
while(option && option->name)
{
if (option->name[0] == '+')
@@ -607,10 +607,10 @@ KCmdLineArgs::parseAllArgs()
} else if ( ::qstrcmp( option, "author") == 0 ) {
enable_i18n();
if ( about ) {
- const TQValueList<KAboutPerson> authors = about->authors();
+ const TQValueList<TDEAboutPerson> authors = about->authors();
if ( !authors.isEmpty() ) {
TQString authorlist;
- for (TQValueList<KAboutPerson>::ConstIterator it = authors.begin(); it != authors.end(); ++it ) {
+ for (TQValueList<TDEAboutPerson>::ConstIterator it = authors.begin(); it != authors.end(); ++it ) {
TQString email;
if ( !(*it).emailAddress().isEmpty() )
email = " <" + (*it).emailAddress() + ">";
@@ -671,92 +671,92 @@ KCmdLineArgs::parseAllArgs()
}
/**
- * For KApplication only:
+ * For TDEApplication only:
*
* Return argc
*/
int *
-KCmdLineArgs::qt_argc()
+TDECmdLineArgs::tqt_argc()
{
if (!argsList)
- KApplication::addCmdLineOptions(); // Lazy bastards!
+ TDEApplication::addCmdLineOptions(); // Lazy bastards!
- static int qt_argc = -1;
- if( qt_argc != -1 )
- return &qt_argc;
+ static int tqt_argc = -1;
+ if( tqt_argc != -1 )
+ return &tqt_argc;
- KCmdLineArgs *args = parsedArgs("qt");
+ TDECmdLineArgs *args = parsedArgs("qt");
assert(args); // No qt options have been added!
if (!argv)
{
- fprintf(stderr, "\n\nFAILURE (KCmdLineArgs):\n");
- fprintf(stderr, "Application has not called KCmdLineArgs::init(...).\n\n");
+ fprintf(stderr, "\n\nFAILURE (TDECmdLineArgs):\n");
+ fprintf(stderr, "Application has not called TDECmdLineArgs::init(...).\n\n");
assert( 0 );
exit(255);
}
assert(argc >= (args->count()+1));
- qt_argc = args->count() +1;
- return &qt_argc;
+ tqt_argc = args->count() +1;
+ return &tqt_argc;
}
/**
- * For KApplication only:
+ * For TDEApplication only:
*
* Return argv
*/
char ***
-KCmdLineArgs::qt_argv()
+TDECmdLineArgs::tqt_argv()
{
if (!argsList)
- KApplication::addCmdLineOptions(); // Lazy bastards!
+ TDEApplication::addCmdLineOptions(); // Lazy bastards!
- static char** qt_argv;
- if( qt_argv != NULL )
- return &qt_argv;
+ static char** tqt_argv;
+ if( tqt_argv != NULL )
+ return &tqt_argv;
- KCmdLineArgs *args = parsedArgs("qt");
+ TDECmdLineArgs *args = parsedArgs("qt");
assert(args); // No qt options have been added!
if (!argv)
{
- fprintf(stderr, "\n\nFAILURE (KCmdLineArgs):\n");
- fprintf(stderr, "Application has not called KCmdLineArgs::init(...).\n\n");
+ fprintf(stderr, "\n\nFAILURE (TDECmdLineArgs):\n");
+ fprintf(stderr, "Application has not called TDECmdLineArgs::init(...).\n\n");
assert( 0 );
exit(255);
}
- qt_argv = new char*[ args->count() + 2 ];
- qt_argv[ 0 ] = tqstrdup( appName());
+ tqt_argv = new char*[ args->count() + 2 ];
+ tqt_argv[ 0 ] = tqstrdup( appName());
int i = 0;
for(; i < args->count(); i++)
{
- qt_argv[i+1] = tqstrdup((char *) args->arg(i));
+ tqt_argv[i+1] = tqstrdup((char *) args->arg(i));
}
- qt_argv[i+1] = 0;
+ tqt_argv[i+1] = 0;
- return &qt_argv;
+ return &tqt_argv;
}
void
-KCmdLineArgs::enable_i18n()
+TDECmdLineArgs::enable_i18n()
{
// called twice or too late
- if (KGlobal::_locale)
+ if (TDEGlobal::_locale)
return;
- if (!KGlobal::_instance) {
- KInstance *instance = new KInstance(about);
+ if (!TDEGlobal::_instance) {
+ TDEInstance *instance = new TDEInstance(about);
(void) instance->config();
// Don't delete instance!
}
}
void
-KCmdLineArgs::usage(const TQString &error)
+TDECmdLineArgs::usage(const TQString &error)
{
- assert(KGlobal::_locale);
+ assert(TDEGlobal::_locale);
TQCString localError = error.local8Bit();
if (localError[error.length()-1] == '\n')
localError = localError.left(error.length()-1);
@@ -769,7 +769,7 @@ KCmdLineArgs::usage(const TQString &error)
}
void
-KCmdLineArgs::usage(const char *id)
+TDECmdLineArgs::usage(const char *id)
{
enable_i18n();
assert(argsList != 0); // It's an error to call usage(...) without
@@ -781,7 +781,7 @@ KCmdLineArgs::usage(const char *id)
TQString tmp;
TQString usage;
- KCmdLineArgs *args = argsList->last();
+ TDECmdLineArgs *args = argsList->last();
if (!(args->id) && (args->options) &&
(args->options->name) && (args->options->name[0] != '+'))
@@ -798,10 +798,10 @@ KCmdLineArgs::usage(const char *id)
args = argsList->prev();
}
- KCmdLineArgs *appOptions = argsList->last();
+ TDECmdLineArgs *appOptions = argsList->last();
if (!appOptions->id)
{
- const KCmdLineOptions *option = appOptions->options;
+ const TDECmdLineOptions *option = appOptions->options;
while(option && option->name)
{
if (option->name[0] == '+')
@@ -864,7 +864,7 @@ KCmdLineArgs::usage(const char *id)
while (args)
{
- const KCmdLineOptions *option = args->options;
+ const TDECmdLineOptions *option = args->options;
TQCString opt = "";
//
while(option && option->name)
@@ -986,7 +986,7 @@ KCmdLineArgs::usage(const char *id)
*
* The given arguments are assumed to be constants.
*/
-KCmdLineArgs::KCmdLineArgs( const KCmdLineOptions *_options,
+TDECmdLineArgs::TDECmdLineArgs( const TDECmdLineOptions *_options,
const char *_name, const char *_id)
: options(_options), name(_name), id(_id)
{
@@ -998,7 +998,7 @@ KCmdLineArgs::KCmdLineArgs( const KCmdLineOptions *_options,
/**
* Destructor.
*/
-KCmdLineArgs::~KCmdLineArgs()
+TDECmdLineArgs::~TDECmdLineArgs()
{
delete parsedOptionList;
delete parsedArgList;
@@ -1007,7 +1007,7 @@ KCmdLineArgs::~KCmdLineArgs()
}
void
-KCmdLineArgs::clear()
+TDECmdLineArgs::clear()
{
delete parsedArgList;
parsedArgList = 0;
@@ -1016,7 +1016,7 @@ KCmdLineArgs::clear()
}
void
-KCmdLineArgs::reset()
+TDECmdLineArgs::reset()
{
if ( argsList ) {
argsList->setAutoDelete( true );
@@ -1028,7 +1028,7 @@ KCmdLineArgs::reset()
}
void
-KCmdLineArgs::save( TQDataStream &ds) const
+TDECmdLineArgs::save( TQDataStream &ds) const
{
uint count = 0;
if (parsedOptionList)
@@ -1043,10 +1043,10 @@ KCmdLineArgs::save( TQDataStream &ds) const
}
void
-KCmdLineArgs::load( TQDataStream &ds)
+TDECmdLineArgs::load( TQDataStream &ds)
{
- if (!parsedOptionList) parsedOptionList = new KCmdLineParsedOptions;
- if (!parsedArgList) parsedArgList = new KCmdLineParsedArgs;
+ if (!parsedOptionList) parsedOptionList = new TDECmdLineParsedOptions;
+ if (!parsedArgList) parsedArgList = new TDECmdLineParsedArgs;
parsedOptionList->load( ds );
parsedArgList->load( ds );
@@ -1064,7 +1064,7 @@ KCmdLineArgs::load( TQDataStream &ds)
}
void
-KCmdLineArgs::setOption(const TQCString &opt, bool enabled)
+TDECmdLineArgs::setOption(const TQCString &opt, bool enabled)
{
if (isQt)
{
@@ -1076,7 +1076,7 @@ KCmdLineArgs::setOption(const TQCString &opt, bool enabled)
addArgument(arg);
}
if (!parsedOptionList) {
- parsedOptionList = new KCmdLineParsedOptions;
+ parsedOptionList = new TDECmdLineParsedOptions;
parsedOptionList->setAutoDelete(true);
}
@@ -1087,7 +1087,7 @@ KCmdLineArgs::setOption(const TQCString &opt, bool enabled)
}
void
-KCmdLineArgs::setOption(const TQCString &opt, const char *value)
+TDECmdLineArgs::setOption(const TQCString &opt, const char *value)
{
if (isQt)
{
@@ -1106,7 +1106,7 @@ KCmdLineArgs::setOption(const TQCString &opt, const char *value)
#endif
}
if (!parsedOptionList) {
- parsedOptionList = new KCmdLineParsedOptions;
+ parsedOptionList = new TDECmdLineParsedOptions;
parsedOptionList->setAutoDelete(true);
}
@@ -1114,7 +1114,7 @@ KCmdLineArgs::setOption(const TQCString &opt, const char *value)
}
TQCString
-KCmdLineArgs::getOption(const char *_opt) const
+TDECmdLineArgs::getOption(const char *_opt) const
{
TQCString *value = 0;
if (parsedOptionList)
@@ -1134,7 +1134,7 @@ KCmdLineArgs::getOption(const char *_opt) const
if (result != 3)
{
- fprintf(stderr, "\n\nFAILURE (KCmdLineArgs):\n");
+ fprintf(stderr, "\n\nFAILURE (TDECmdLineArgs):\n");
fprintf(stderr, "Application requests for getOption(\"%s\") but the \"%s\" option\n",
_opt, _opt);
fprintf(stderr, "has never been specified via addCmdLineOptions( ... )\n\n");
@@ -1146,7 +1146,7 @@ KCmdLineArgs::getOption(const char *_opt) const
}
QCStringList
-KCmdLineArgs::getOptionList(const char *_opt) const
+TDECmdLineArgs::getOptionList(const char *_opt) const
{
QCStringList result;
if (!parsedOptionList)
@@ -1176,7 +1176,7 @@ KCmdLineArgs::getOptionList(const char *_opt) const
}
bool
-KCmdLineArgs::isSet(const char *_opt) const
+TDECmdLineArgs::isSet(const char *_opt) const
{
// Look up the default.
const char *opt_name;
@@ -1187,7 +1187,7 @@ KCmdLineArgs::isSet(const char *_opt) const
if (result == 0)
{
- fprintf(stderr, "\n\nFAILURE (KCmdLineArgs):\n");
+ fprintf(stderr, "\n\nFAILURE (TDECmdLineArgs):\n");
fprintf(stderr, "Application requests for isSet(\"%s\") but the \"%s\" option\n",
_opt, _opt);
fprintf(stderr, "has never been specified via addCmdLineOptions( ... )\n\n");
@@ -1219,7 +1219,7 @@ KCmdLineArgs::isSet(const char *_opt) const
}
int
-KCmdLineArgs::count() const
+TDECmdLineArgs::count() const
{
if (!parsedArgList)
return 0;
@@ -1227,11 +1227,11 @@ KCmdLineArgs::count() const
}
const char *
-KCmdLineArgs::arg(int n) const
+TDECmdLineArgs::arg(int n) const
{
if (!parsedArgList || (n >= (int) parsedArgList->count()))
{
- fprintf(stderr, "\n\nFAILURE (KCmdLineArgs): Argument out of bounds\n");
+ fprintf(stderr, "\n\nFAILURE (TDECmdLineArgs): Argument out of bounds\n");
fprintf(stderr, "Application requests for arg(%d) without checking count() first.\n",
n);
@@ -1243,12 +1243,12 @@ KCmdLineArgs::arg(int n) const
}
KURL
-KCmdLineArgs::url(int n) const
+TDECmdLineArgs::url(int n) const
{
return makeURL( arg(n) );
}
-KURL KCmdLineArgs::makeURL(const char *_urlArg)
+KURL TDECmdLineArgs::makeURL(const char *_urlArg)
{
const TQString urlArg = TQFile::decodeName(_urlArg);
TQFileInfo fileInfo(urlArg);
@@ -1269,29 +1269,29 @@ KURL KCmdLineArgs::makeURL(const char *_urlArg)
}
void
-KCmdLineArgs::addArgument(const char *argument)
+TDECmdLineArgs::addArgument(const char *argument)
{
if (!parsedArgList)
- parsedArgList = new KCmdLineParsedArgs;
+ parsedArgList = new TDECmdLineParsedArgs;
parsedArgList->append(argument);
}
-static const KCmdLineOptions kde_tempfile_option[] =
+static const TDECmdLineOptions kde_tempfile_option[] =
{
{ "tempfile", I18N_NOOP("The files/URLs opened by the application will be deleted after use"), 0},
- KCmdLineLastOption
+ TDECmdLineLastOption
};
void
-KCmdLineArgs::addTempFileOption()
+TDECmdLineArgs::addTempFileOption()
{
- KCmdLineArgs::addCmdLineOptions( kde_tempfile_option, "TDE-tempfile", "tde-tempfile" );
+ TDECmdLineArgs::addCmdLineOptions( kde_tempfile_option, "TDE-tempfile", "tde-tempfile" );
}
-bool KCmdLineArgs::isTempFileSet()
+bool TDECmdLineArgs::isTempFileSet()
{
- KCmdLineArgs* args = KCmdLineArgs::parsedArgs( "tde-tempfile" );
+ TDECmdLineArgs* args = TDECmdLineArgs::parsedArgs( "tde-tempfile" );
if ( args )
return args->isSet( "tempfile" );
return false;
diff --git a/tdecore/kcmdlineargs.h b/tdecore/tdecmdlineargs.h
index dc48fc45d..9b7dc0f4f 100644
--- a/tdecore/kcmdlineargs.h
+++ b/tdecore/tdecmdlineargs.h
@@ -31,13 +31,13 @@ typedef TQValueList<TQCString> QCStringList;
/**
* @short Structure that holds command line options.
*
- * This class is intended to be used with the KCmdLineArgs class, which
+ * This class is intended to be used with the TDECmdLineArgs class, which
* provides convenient and powerful command line argument parsing and
* handling functionality.
*
- * @see KCmdLineArgs for additional usage information
+ * @see TDECmdLineArgs for additional usage information
*/
-struct TDECORE_EXPORT KCmdLineOptions
+struct TDECORE_EXPORT TDECmdLineOptions
{
/**
* The name of the argument as it should be called on the command line and
@@ -49,7 +49,7 @@ struct TDECORE_EXPORT KCmdLineOptions
* <i>myapp --nofoo</i> is called:
*
* \code
- * KCmdLineArgs::parsedArgs()->isSet("foo"); // false
+ * TDECmdLineArgs::parsedArgs()->isSet("foo"); // false
* \endcode
*/
const char *name;
@@ -65,36 +65,36 @@ struct TDECORE_EXPORT KCmdLineOptions
const char *def; // Default
};
-#define KCmdLineLastOption { 0, 0, 0 }
+#define TDECmdLineLastOption { 0, 0, 0 }
-class KCmdLineArgsList;
-class KApplication;
+class TDECmdLineArgsList;
+class TDEApplication;
class KUniqueApplication;
-class KCmdLineParsedOptions;
-class KCmdLineParsedArgs;
-class KAboutData;
-class KCmdLineArgsPrivate;
+class TDECmdLineParsedOptions;
+class TDECmdLineParsedArgs;
+class TDEAboutData;
+class TDECmdLineArgsPrivate;
/**
* @short A class for command-line argument handling.
*
- * KCmdLineArgs provides simple access to the command-line arguments
+ * TDECmdLineArgs provides simple access to the command-line arguments
* for an application. It takes into account Qt-specific options,
* KDE-specific options and application specific options.
*
* This class is used in %main() via the static method
* init().
*
- * A typical %KDE application using %KCmdLineArgs should look like this:
+ * A typical %KDE application using %TDECmdLineArgs should look like this:
*
* \code
* int main(int argc, char *argv[])
* {
* // Initialize command line args
- * KCmdLineArgs::init(argc, argv, appName, programName, description, version);
+ * TDECmdLineArgs::init(argc, argv, appName, programName, description, version);
*
* // Tell which options are supported
- * KCmdLineArgs::addCmdLineOptions( options );
+ * TDECmdLineArgs::addCmdLineOptions( options );
*
* // Add options from other components
* KUniqueApplication::addCmdLineOptions();
@@ -107,11 +107,11 @@ class KCmdLineArgsPrivate;
* ....
*
* // Handle our own options/arguments
- * // A KApplication will usually do this in main but this is not
+ * // A TDEApplication will usually do this in main but this is not
* // necessary.
* // A KUniqueApplication might want to handle it in newInstance().
*
- * KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
+ * TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
*
* // A binary option (on / off)
* if (args->isSet("some-option"))
@@ -136,10 +136,10 @@ class KCmdLineArgsPrivate;
* \endcode
*
* The options that an application supports are configured using the
- * KCmdLineOptions class. An example is shown below:
+ * TDECmdLineOptions class. An example is shown below:
*
* \code
- * static const KCmdLineOptions options[] =
+ * static const TDECmdLineOptions options[] =
* {
* { "a", I18N_NOOP("A short binary option"), 0 },
* { "b \<file>", I18N_NOOP("A short option which takes an argument"), 0 },
@@ -160,12 +160,12 @@ class KCmdLineArgsPrivate;
* { "+[arg1]", I18N_NOOP("An optional argument 'arg1'"), 0 },
* { "!+command", I18N_NOOP("A required argument 'command', that can contain multiple words, even starting with '-'"), 0 },
* { "", I18N_NOOP("Additional help text not associated with any particular option") 0 },
- * KCmdLineLastOption // End of options.
+ * TDECmdLineLastOption // End of options.
* };
* \endcode
*
* The I18N_NOOP macro is used to indicate that these strings should be
- * marked for translation. The actual translation is done by KCmdLineArgs.
+ * marked for translation. The actual translation is done by TDECmdLineArgs.
* You can't use i18n() here because we are setting up a static data
* structure and can't do translations at compile time.
*
@@ -219,11 +219,11 @@ class KCmdLineArgsPrivate;
* @author Waldo Bastian
* @version 0.0.4
*/
-class TDECORE_EXPORT KCmdLineArgs
+class TDECORE_EXPORT TDECmdLineArgs
{
- friend class KApplication;
+ friend class TDEApplication;
friend class KUniqueApplication;
- friend class TQPtrList<KCmdLineArgs>;
+ friend class TQPtrList<TDECmdLineArgs>;
public:
// Static functions:
@@ -242,7 +242,7 @@ public:
* @param _description A short description of what your application is about.
* @param _version A version.
* @param noKApp Set this true to not add commandline options for
- * TQApplication / KApplication
+ * TQApplication / TDEApplication
*
* @since 3.2
*/
@@ -263,17 +263,17 @@ public:
* Initialize class.
*
* This function should be called as the very first thing in
- * your application. It uses KAboutData to replace some of the
+ * your application. It uses TDEAboutData to replace some of the
* arguments that would otherwise be required.
*
* @param _argc As passed to @p main(...).
* @param _argv As passed to @p main(...).
- * @param about A KAboutData object describing your program.
+ * @param about A TDEAboutData object describing your program.
* @param noKApp Set this true to not add commandline options for
- * TQApplication / KApplication
+ * TQApplication / TDEApplication
*/
static void init(int _argc, char **_argv,
- const KAboutData *about, bool noKApp = false);
+ const TDEAboutData *about, bool noKApp = false);
/**
* Initialize Class
@@ -281,14 +281,14 @@ public:
* This function should be called as the very first thing in your
* application. This method will rarely be used, since it doesn't
* provide any argument parsing. It does provide access to the
- * KAboutData information.
+ * TDEAboutData information.
* This method is exactly the same as calling
- * init(0,0, const KAboutData *about, true).
+ * init(0,0, const TDEAboutData *about, true).
*
* @param about the about data.
- * \see KAboutData
+ * \see TDEAboutData
*/
- static void init(const KAboutData *about);
+ static void init(const TDEAboutData *about);
/**
* Add options to your application.
@@ -299,13 +299,13 @@ public:
* The list of options should look like this:
*
* \code
- * static KCmdLineOptions options[] =
+ * static TDECmdLineOptions options[] =
* {
* { "option1 \<argument>", I18N_NOOP("Description 1"), "my_extra_arg" },
* { "o", 0, 0 },
* { "option2", I18N_NOOP("Description 2"), 0 },
* { "nooption3", I18N_NOOP("Description 3"), 0 },
- * KCmdLineLastOption
+ * TDECmdLineLastOption
* }
* \endcode
*
@@ -321,8 +321,8 @@ public:
* true. If required, you must check yourself the number of arguments
* specified by the user:
* \code
- * KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
- * if (args->count() == 0) KCmdLineArgs::usage(i18n("No file specified!"));
+ * TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
+ * if (args->count() == 0) TDECmdLineArgs::usage(i18n("No file specified!"));
* \endcode
*
* In BNF:
@@ -354,7 +354,7 @@ public:
* @param id A name with which these options can be identified, can be 0.
* @param afterId The options are inserted after this set of options, can be 0.
*/
- static void addCmdLineOptions( const KCmdLineOptions *options,
+ static void addCmdLineOptions( const TDECmdLineOptions *options,
const char *name=0, const char *id = 0,
const char *afterId=0);
@@ -367,7 +367,7 @@ public:
*
* @param id The name of the options you are interested in, can be 0.
*/
- static KCmdLineArgs *parsedArgs(const char *id=0);
+ static TDECmdLineArgs *parsedArgs(const char *id=0);
/**
* Get the CWD (Current Working Directory) associated with the
@@ -415,7 +415,7 @@ public:
/**
* Read out a string option.
*
- * The option must have a corresponding KCmdLineOptions entry
+ * The option must have a corresponding TDECmdLineOptions entry
* of the form:
* \code
* { "option \<argument>", I18N_NOOP("Description"), "default" }
@@ -435,7 +435,7 @@ public:
/**
* Read out all occurrences of a string option.
*
- * The option must have a corresponding KCmdLineOptions entry
+ * The option must have a corresponding TDECmdLineOptions entry
* of the form:
* \code
* { "option \<argument>", I18N_NOOP("Description"), "default" }
@@ -457,11 +457,11 @@ public:
*
* @return The value of the option. It will be true if the option
* was specifically turned on in the command line, or if the option
- * is turned on by default (in the KCmdLineOptions list) and was
+ * is turned on by default (in the TDECmdLineOptions list) and was
* not specifically turned off in the command line. Equivalently,
* it will be false if the option was specifically turned off in
* the command line, or if the option is turned off by default (in
- * the KCmdLineOptions list) and was not specifically turned on in
+ * the TDECmdLineOptions list) and was not specifically turned on in
* the command line.
*/
bool isSet(const char *option) const;
@@ -501,14 +501,14 @@ public:
/**
* Used by url().
- * Made public for apps that don't use KCmdLineArgs
+ * Made public for apps that don't use TDECmdLineArgs
* @param urlArg the argument
* @return the url.
*/
static KURL makeURL( const char * urlArg );
/**
- * Made public for apps that don't use KCmdLineArgs
+ * Made public for apps that don't use TDECmdLineArgs
* To be done before makeURL, to set the current working
* directory in case makeURL needs it.
* @param cwd the new working directory
@@ -522,8 +522,8 @@ public:
/**
* Reset all option definitions, i.e. cancel all addCmdLineOptions calls.
- * Note that KApplication's options are removed too, you might want to
- * call KApplication::addCmdLineOptions if you want them back.
+ * Note that TDEApplication's options are removed too, you might want to
+ * call TDEApplication::addCmdLineOptions if you want them back.
*
* You usually don't want to call this method.
*/
@@ -553,7 +553,7 @@ protected:
* @internal
* Constructor.
*/
- KCmdLineArgs( const KCmdLineOptions *_options, const char *_name,
+ TDECmdLineArgs( const TDECmdLineOptions *_options, const char *_name,
const char *_id);
/**
@@ -563,7 +563,7 @@ protected:
*
* Destructor.
*/
- ~KCmdLineArgs();
+ ~TDECmdLineArgs();
private:
/**
@@ -582,19 +582,19 @@ private:
static void parseAllArgs();
/**
- * @internal for KApplication only:
+ * @internal for TDEApplication only:
*
* Return argc
*/
- static int *qt_argc();
+ static int *tqt_argc();
/**
- * @internal for KApplication only:
+ * @internal for TDEApplication only:
*
* Return argv
*/
- static char ***qt_argv();
+ static char ***tqt_argv();
/**
* @internal
@@ -648,7 +648,7 @@ private:
void load( TQDataStream &);
/**
- * @internal for KApplication only
+ * @internal for TDEApplication only
*
* Initialize class.
*
@@ -659,22 +659,22 @@ private:
* @param appname The untranslated name of your application. This should
* match with @p argv[0].
*
- * This function makes KCmdLineArgs ignore all unknown options as well as
+ * This function makes TDECmdLineArgs ignore all unknown options as well as
* all arguments.
*/
static void initIgnore(int _argc, char **_argv, const char *_appname);
static void printQ(const TQString &msg);
- const KCmdLineOptions *options;
+ const TDECmdLineOptions *options;
const char *name;
const char *id;
- KCmdLineParsedOptions *parsedOptionList;
- KCmdLineParsedArgs *parsedArgList;
+ TDECmdLineParsedOptions *parsedOptionList;
+ TDECmdLineParsedArgs *parsedArgList;
bool isQt;
- static KCmdLineArgsList *argsList; // All options.
- static const KAboutData *about;
+ static TDECmdLineArgsList *argsList; // All options.
+ static const TDEAboutData *about;
static int argc; // The original argc
static char **argv; // The original argv
@@ -683,7 +683,7 @@ private:
static char *mCwd; // Current working directory. Important for KUnqiueApp!
static bool parseArgs;
- KCmdLineArgsPrivate *d;
+ TDECmdLineArgsPrivate *d;
};
#endif
diff --git a/tdecore/kconfig.cpp b/tdecore/tdeconfig.cpp
index 709e39de3..68307dc85 100644
--- a/tdecore/kconfig.cpp
+++ b/tdecore/tdeconfig.cpp
@@ -32,18 +32,18 @@
#include <tqfileinfo.h>
-#include <kapplication.h>
-#include "kconfigbackend.h"
+#include <tdeapplication.h>
+#include "tdeconfigbackend.h"
-#include "kconfig.h"
-#include "kglobal.h"
+#include "tdeconfig.h"
+#include "tdeglobal.h"
#include "kstandarddirs.h"
#include "kstaticdeleter.h"
#include <tqtimer.h>
-KConfig::KConfig( const TQString& fileName,
+TDEConfig::TDEConfig( const TQString& fileName,
bool bReadOnly, bool bUseKderc, const char *resType )
- : KConfigBase(), bGroupImmutable(false), bFileImmutable(false),
+ : TDEConfigBase(), bGroupImmutable(false), bFileImmutable(false),
bForceGlobal(false)
{
// set the object's read-only status.
@@ -52,7 +52,7 @@ KConfig::KConfig( const TQString& fileName,
// for right now we will hardcode that we are using the INI
// back end driver. In the future this should be converted over to
// a object factory of some sorts.
- KConfigINIBackEnd *aBackEnd = new KConfigINIBackEnd(this,
+ TDEConfigINIBackEnd *aBackEnd = new TDEConfigINIBackEnd(this,
fileName,
resType,
bUseKderc);
@@ -63,7 +63,7 @@ KConfig::KConfig( const TQString& fileName,
// read initial information off disk
reparseConfiguration();
- // we let KStandardDirs add custom user config files. It will do
+ // we let TDEStandardDirs add custom user config files. It will do
// this only once. So only the first call ever to this constructor
// will anything else than return here We have to reparse here as
// configuration files may appear after customized directories have
@@ -71,11 +71,11 @@ KConfig::KConfig( const TQString& fileName,
// config object.
// Since this makes only sense for config directories, addCustomized
// returns true only if new config directories appeared.
- if (KGlobal::dirs()->addCustomized(this))
+ if (TDEGlobal::dirs()->addCustomized(this))
reparseConfiguration();
}
-KConfig::KConfig(KConfigBackEnd *aBackEnd, bool bReadOnly)
+TDEConfig::TDEConfig(TDEConfigBackEnd *aBackEnd, bool bReadOnly)
: bGroupImmutable(false), bFileImmutable(false),
bForceGlobal(false)
{
@@ -84,19 +84,19 @@ KConfig::KConfig(KConfigBackEnd *aBackEnd, bool bReadOnly)
reparseConfiguration();
}
-KConfig::~KConfig()
+TDEConfig::~TDEConfig()
{
sync();
delete backEnd;
}
-void KConfig::rollback(bool bDeep)
+void TDEConfig::rollback(bool bDeep)
{
- KConfigBase::rollback(bDeep);
+ TDEConfigBase::rollback(bDeep);
if (!bDeep)
- return; // object's bDeep flag is set in KConfigBase method
+ return; // object's bDeep flag is set in TDEConfigBase method
// clear any dirty flags that entries might have set
for (KEntryMapIterator aIt = aEntryMap.begin();
@@ -104,7 +104,7 @@ void KConfig::rollback(bool bDeep)
(*aIt).bDirty = false;
}
-TQStringList KConfig::groupList() const
+TQStringList TDEConfig::groupList() const
{
TQStringList retList;
@@ -138,7 +138,7 @@ TQStringList KConfig::groupList() const
return retList;
}
-TQMap<TQString, TQString> KConfig::entryMap(const TQString &pGroup) const
+TQMap<TQString, TQString> TDEConfig::entryMap(const TQString &pGroup) const
{
TQCString pGroup_utf = pGroup.utf8();
KEntryKey groupKey( pGroup_utf, 0 );
@@ -158,7 +158,7 @@ TQMap<TQString, TQString> KConfig::entryMap(const TQString &pGroup) const
return tmpMap;
}
-void KConfig::reparseConfiguration()
+void TDEConfig::reparseConfiguration()
{
// Don't lose pending changes
if (!isReadOnly() && backEnd && bDirty)
@@ -175,7 +175,7 @@ void KConfig::reparseConfiguration()
bFileImmutable = bReadOnly;
}
-KEntryMap KConfig::internalEntryMap(const TQString &pGroup) const
+KEntryMap TDEConfig::internalEntryMap(const TQString &pGroup) const
{
TQCString pGroup_utf = pGroup.utf8();
KEntry aEntry;
@@ -199,7 +199,7 @@ KEntryMap KConfig::internalEntryMap(const TQString &pGroup) const
return tmpEntryMap;
}
-void KConfig::putData(const KEntryKey &_key, const KEntry &_data, bool _checkGroup)
+void TDEConfig::putData(const KEntryKey &_key, const KEntry &_data, bool _checkGroup)
{
if (bFileImmutable && !_key.bDefault)
return;
@@ -235,7 +235,7 @@ void KConfig::putData(const KEntryKey &_key, const KEntry &_data, bool _checkGro
}
}
-KEntry KConfig::lookupData(const KEntryKey &_key) const
+KEntry TDEConfig::lookupData(const KEntryKey &_key) const
{
KEntryMapConstIterator aIt = aEntryMap.find(_key);
if (aIt != aEntryMap.end())
@@ -251,7 +251,7 @@ KEntry KConfig::lookupData(const KEntryKey &_key) const
}
}
-bool KConfig::internalHasGroup(const TQCString &group) const
+bool TDEConfig::internalHasGroup(const TQCString &group) const
{
KEntryKey groupKey( group, 0);
@@ -272,19 +272,19 @@ bool KConfig::internalHasGroup(const TQCString &group) const
return false;
}
-void KConfig::setFileWriteMode(int mode)
+void TDEConfig::setFileWriteMode(int mode)
{
backEnd->setFileWriteMode(mode);
}
-KLockFile::Ptr KConfig::lockFile(bool bGlobal)
+TDELockFile::Ptr TDEConfig::lockFile(bool bGlobal)
{
- KConfigINIBackEnd *aBackEnd = dynamic_cast<KConfigINIBackEnd*>(backEnd);
+ TDEConfigINIBackEnd *aBackEnd = dynamic_cast<TDEConfigINIBackEnd*>(backEnd);
if (!aBackEnd) return 0;
return aBackEnd->lockFile(bGlobal);
}
-void KConfig::checkUpdate(const TQString &id, const TQString &updateFile)
+void TDEConfig::checkUpdate(const TQString &id, const TQString &updateFile)
{
TQString oldGroup = group();
setGroup("$Version");
@@ -294,16 +294,16 @@ void KConfig::checkUpdate(const TQString &id, const TQString &updateFile)
{
TQStringList args;
args << "--check" << updateFile;
- KApplication::tdeinitExecWait("kconf_update", args);
+ TDEApplication::tdeinitExecWait("tdeconf_update", args);
reparseConfiguration();
}
setGroup(oldGroup);
}
-KConfig* KConfig::copyTo(const TQString &file, KConfig *config) const
+TDEConfig* TDEConfig::copyTo(const TQString &file, TDEConfig *config) const
{
if (!config)
- config = new KConfig(TQString::null, false, false);
+ config = new TDEConfig(TQString::null, false, false);
config->backEnd->changeFileName(file, "config", false);
config->setReadOnly(false);
config->bFileImmutable = false;
@@ -325,17 +325,17 @@ KConfig* KConfig::copyTo(const TQString &file, KConfig *config) const
return config;
}
-void KConfig::virtual_hook( int id, void* data )
-{ KConfigBase::virtual_hook( id, data ); }
+void TDEConfig::virtual_hook( int id, void* data )
+{ TDEConfigBase::virtual_hook( id, data ); }
-static KStaticDeleter< TQValueList<KSharedConfig*> > sd;
-TQValueList<KSharedConfig*> *KSharedConfig::s_list = 0;
+static KStaticDeleter< TQValueList<TDESharedConfig*> > sd;
+TQValueList<TDESharedConfig*> *TDESharedConfig::s_list = 0;
-KSharedConfig::Ptr KSharedConfig::openConfig(const TQString& fileName, bool readOnly, bool useKDEGlobals )
+TDESharedConfig::Ptr TDESharedConfig::openConfig(const TQString& fileName, bool readOnly, bool useKDEGlobals )
{
if (s_list)
{
- for(TQValueList<KSharedConfig*>::ConstIterator it = s_list->begin();
+ for(TQValueList<TDESharedConfig*>::ConstIterator it = s_list->begin();
it != s_list->end(); ++it)
{
if ((*it)->backEnd->fileName() == fileName &&
@@ -344,24 +344,24 @@ KSharedConfig::Ptr KSharedConfig::openConfig(const TQString& fileName, bool read
return (*it);
}
}
- return new KSharedConfig(fileName, readOnly, useKDEGlobals);
+ return new TDESharedConfig(fileName, readOnly, useKDEGlobals);
}
-KSharedConfig::KSharedConfig( const TQString& fileName, bool readonly, bool usekdeglobals)
- : KConfig(fileName, readonly, usekdeglobals)
+TDESharedConfig::TDESharedConfig( const TQString& fileName, bool readonly, bool usekdeglobals)
+ : TDEConfig(fileName, readonly, usekdeglobals)
{
if (!s_list)
{
- sd.setObject(s_list, new TQValueList<KSharedConfig*>);
+ sd.setObject(s_list, new TQValueList<TDESharedConfig*>);
}
s_list->append(this);
}
-KSharedConfig::~KSharedConfig()
+TDESharedConfig::~TDESharedConfig()
{
if ( s_list )
s_list->remove(this);
}
-#include "kconfig.moc"
+#include "tdeconfig.moc"
diff --git a/tdecore/kconfig.h b/tdecore/tdeconfig.h
index e3eb52f64..c2da06446 100644
--- a/tdecore/kconfig.h
+++ b/tdecore/tdeconfig.h
@@ -26,10 +26,10 @@ class TQTimer;
#include <tqvaluelist.h>
-#include "kconfigbase.h"
+#include "tdeconfigbase.h"
#include "klockfile.h"
-class KConfigPrivate;
+class TDEConfigPrivate;
/**
* Access KDE Configuration entries.
@@ -37,17 +37,17 @@ class KConfigPrivate;
* This class implements KDE's default configuration system.
*
* @author Kalle Dalheimer <kalle@kde.org>, Preston Brown <pbrown@kde.org>
-* @see KGlobal::config(), KConfigBase, KSimpleConfig
+* @see TDEGlobal::config(), TDEConfigBase, KSimpleConfig
* @short KDE Configuration Management class
*/
-class TDECORE_EXPORT KConfig : public KConfigBase
+class TDECORE_EXPORT TDEConfig : public TDEConfigBase
{
Q_OBJECT
public:
/**
- * Constructs a KConfig object.
+ * Constructs a TDEConfig object.
*
* @param fileName A file to parse in addition to the
* system-wide file(s). If it is not provided, only global
@@ -57,20 +57,20 @@ public:
* object will automatically become read-only if either the user does not have
* write permission to @p fileName or if no file was specified.
* @param bUseKDEGlobals Toggle reading the global KDE configuration file.
- * @param resType the place to look in (config, data, etc) See KStandardDirs.
+ * @param resType the place to look in (config, data, etc) See TDEStandardDirs.
*/
- KConfig( const TQString& fileName = TQString::null,
+ TDEConfig( const TQString& fileName = TQString::null,
bool bReadOnly = false, bool bUseKDEGlobals = true, const char *resType="config");
- KConfig(KConfigBackEnd *backEnd, bool bReadOnly = false);
+ TDEConfig(TDEConfigBackEnd *backEnd, bool bReadOnly = false);
/**
- * Destructs the KConfig object.
+ * Destructs the TDEConfig object.
*
* Writes back any dirty configuration entries, and destroys
* dynamically created objects.
*/
- virtual ~KConfig();
+ virtual ~TDEConfig();
/**
* Clears all entries out of the @p dirtyEntryMap, so the
@@ -82,7 +82,7 @@ public:
* false, but the dirty entries remain in the dirty entry
* map.
*
- * @see KConfigBase::rollback
+ * @see TDEConfigBase::rollback
*/
virtual void rollback(bool bDeep = true);
@@ -137,7 +137,7 @@ public:
/**
* Checks whether the config file contains the update @p id
- * as contained in @p updateFile. If not, it runs kconf_update
+ * as contained in @p updateFile. If not, it runs tdeconf_update
* to update the config file.
*
* If you install config update files with critical fixes
@@ -162,21 +162,21 @@ public:
* @param config optional config object to reuse
* @since 3.2
*/
- KConfig* copyTo(const TQString &file, KConfig *config=0) const;
+ TDEConfig* copyTo(const TQString &file, TDEConfig *config=0) const;
/**
* Returns a lock file object for the configuration file or 0 if
* the backend does not support locking.
* @param bGlobal if true, return the lock file for the global config file
*
- * NOTE: KConfig::sync() requires a lock on both the normal and global
- * config file. When calling KConfig::sync() while having a lock on the
+ * NOTE: TDEConfig::sync() requires a lock on both the normal and global
+ * config file. When calling TDEConfig::sync() while having a lock on the
* global config file, the normal config file MUST be locked AS WELL and the
* normal config file MUST be locked BEFORE the global config file!
* Otherwise there is a risk of deadlock.
* @since 3.3
*/
- KLockFile::Ptr lockFile( bool bGlobal=false );
+ TDELockFile::Ptr lockFile( bool bGlobal=false );
protected:
@@ -247,12 +247,12 @@ private:
* @internal
* copy-construction and assignment are not allowed
*/
- KConfig( const KConfig& );
+ TDEConfig( const TDEConfig& );
/**
* @internal
* copy-construction and assignment are not allowed
*/
- KConfig& operator= ( const KConfig& rConfig );
+ TDEConfig& operator= ( const TDEConfig& rConfig );
private:
bool bGroupImmutable : 1; // Current group is immutable.
@@ -261,20 +261,20 @@ private:
protected:
virtual void virtual_hook( int id, void* data );
private:
- KConfigPrivate *d;
+ TDEConfigPrivate *d;
};
/**
- * KConfig variant using shared memory
+ * TDEConfig variant using shared memory
*
- * KSharedConfig provides a reference counted, shared memory variant
- * of KConfig.
+ * TDESharedConfig provides a reference counted, shared memory variant
+ * of TDEConfig.
*/
-class TDECORE_EXPORT KSharedConfig : public KConfig, public KShared
+class TDECORE_EXPORT TDESharedConfig : public TDEConfig, public TDEShared
{
- friend class TQValueList<KSharedConfig*>;
+ friend class TQValueList<TDESharedConfig*>;
public:
- typedef KSharedPtr<KSharedConfig> Ptr;
+ typedef TDESharedPtr<TDESharedConfig> Ptr;
public:
/**
@@ -283,14 +283,14 @@ public:
* @param readOnly set the config object's read-only status
* @param bUseKDEGlobals Toggle reading the global KDE configuration file.
*/
- static KSharedConfig::Ptr openConfig(const TQString& fileName, bool readOnly = false,
+ static TDESharedConfig::Ptr openConfig(const TQString& fileName, bool readOnly = false,
bool bUseKDEGlobals = true);
private:
- KSharedConfig( const TQString& fileName, bool readOnly, bool useKDEGlobals );
- ~KSharedConfig();
+ TDESharedConfig( const TQString& fileName, bool readOnly, bool useKDEGlobals );
+ ~TDESharedConfig();
- static TQValueList<KSharedConfig*> *s_list;
+ static TQValueList<TDESharedConfig*> *s_list;
};
#endif
diff --git a/tdecore/kconfig_compiler/CMakeLists.txt b/tdecore/tdeconfig_compiler/CMakeLists.txt
index 4acc09f51..a4f24c43e 100644
--- a/tdecore/kconfig_compiler/CMakeLists.txt
+++ b/tdecore/tdeconfig_compiler/CMakeLists.txt
@@ -20,10 +20,10 @@ link_directories(
)
-##### kconfig_compiler ##########################
+##### tdeconfig_compiler ##########################
-tde_add_executable( kconfig_compiler
- SOURCES kconfig_compiler.cpp
+tde_add_executable( tdeconfig_compiler
+ SOURCES tdeconfig_compiler.cpp
LINK tdecore-shared
DESTINATION ${BIN_INSTALL_DIR}
)
diff --git a/tdecore/tdeconfig_compiler/Makefile.am b/tdecore/tdeconfig_compiler/Makefile.am
new file mode 100644
index 000000000..d5141f102
--- /dev/null
+++ b/tdecore/tdeconfig_compiler/Makefile.am
@@ -0,0 +1,18 @@
+SUBDIRS = example tests
+
+AM_CPPFLAGS = -I$(top_srcdir)/tdecore -I$(top_srcdir) $(all_includes)
+
+bin_PROGRAMS = tdeconfig_compiler
+
+tdeconfig_compiler_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor
+tdeconfig_compiler_LDADD = $(LIB_TDECORE)
+tdeconfig_compiler_SOURCES = tdeconfig_compiler.cpp
+
+TESTFILES = test1.kcfg test2.kcfg test3.kcfg test4.kcfg test_dpointer.kcfg
+
+check-local:
+ for i in $(TESTFILES); \
+ do xmllint --noout --schema $(srcdir)/kcfg.xsd $(srcdir)/tests/$$i; \
+ perl $(top_srcdir)/tdecore/tdeconfig_compiler/checkkcfg.pl \
+ $(top_srcdir)/tdecore/tdeconfig_compiler/tests/$$i; done
+
diff --git a/tdecore/kconfig_compiler/README.dox b/tdecore/tdeconfig_compiler/README.dox
index 36d9f988b..1b4926e96 100644
--- a/tdecore/kconfig_compiler/README.dox
+++ b/tdecore/tdeconfig_compiler/README.dox
@@ -1,10 +1,10 @@
/**
-\page kconfig_compiler The KDE Configuration Compiler
+\page tdeconfig_compiler The KDE Configuration Compiler
-kconfig_compiler generates C++ source code from an XML file containing
+tdeconfig_compiler generates C++ source code from an XML file containing
information about configuration options (.kcfg) and a file that provides
the code generation options (.kcfgc) The generated class is based on
-KConfigSkeleton and provides an API for the application to access its
+TDEConfigSkeleton and provides an API for the application to access its
configuration data.
<h2>XML description of the configuration options</h2>
@@ -96,9 +96,9 @@ The following options are read from the kcfgc file:
<tr>
<td><b>Inherits</b></td>
<td>string</td>
- <td>KConfigSkeleton</td>
+ <td>TDEConfigSkeleton</td>
<td>Class the generated class inherits from. This class must inherit
- KConfigSkeleton.</td>
+ TDEConfigSkeleton.</td>
</tr>
<tr>
<td><b>Visibility</b></td>
@@ -144,7 +144,7 @@ The following options are read from the kcfgc file:
<td><b>ItemAccessors</b></td>
<td>bool</td>
<td>false</td>
- <td>Generate accessor functions for the KConfigSkeletonItem objects
+ <td>Generate accessor functions for the TDEConfigSkeletonItem objects
corresponding to the configuration options. If <b>SetUserTexts</b> is set,
<b>ItemAccessors</b> also has to be set.</td>
</tr>
diff --git a/tdecore/kconfig_compiler/TODO b/tdecore/tdeconfig_compiler/TODO
index e69de29bb..e69de29bb 100644
--- a/tdecore/kconfig_compiler/TODO
+++ b/tdecore/tdeconfig_compiler/TODO
diff --git a/tdecore/kconfig_compiler/checkkcfg.pl b/tdecore/tdeconfig_compiler/checkkcfg.pl
index 2eddbeee6..8d066b810 100755
--- a/tdecore/kconfig_compiler/checkkcfg.pl
+++ b/tdecore/tdeconfig_compiler/checkkcfg.pl
@@ -15,12 +15,12 @@ $file_cpp = "$filebase.cpp";
$kcfgc = $file . "c";
-$cmd = "./kconfig_compiler $file $kcfgc";
+$cmd = "./tdeconfig_compiler $file $kcfgc";
#print "CMD $cmd\n";
if ( system( $cmd ) != 0 ) {
- print STDERR "Unable to run kconfig_compiler\n";
+ print STDERR "Unable to run tdeconfig_compiler\n";
exit 1;
}
diff --git a/tdecore/kconfig_compiler/example/Makefile.am b/tdecore/tdeconfig_compiler/example/Makefile.am
index f7834ba63..612788f6b 100644
--- a/tdecore/kconfig_compiler/example/Makefile.am
+++ b/tdecore/tdeconfig_compiler/example/Makefile.am
@@ -3,11 +3,11 @@ AM_CPPFLAGS = -I$(top_srcdir)/tdecore -I$(top_srcdir) $(all_includes)
check_PROGRAMS = example # autoexample
EXTRA_PROGRAMS = autoexample
-example_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -lktexteditor
+example_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor
example_LDADD = $(LIB_TDECORE)
example_SOURCES = example.cpp exampleprefs_base.cpp
-autoexample_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -lktexteditor
+autoexample_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor
autoexample_LDADD = $(LIB_TDECORE) $(LIB_TDEUI)
autoexample_SOURCES = exampleprefs_base.cpp general_base.ui myoptions_base.ui \
autoexample.cpp
@@ -15,8 +15,8 @@ autoexample_SOURCES = exampleprefs_base.cpp general_base.ui myoptions_base.ui \
example.o exampleprefs_base.o: exampleprefs_base.h
# avoid running the below command in parallel
exampleprefs_base.cpp: exampleprefs_base.h
-exampleprefs_base.cpp exampleprefs_base.h: $(srcdir)/example.kcfg ../kconfig_compiler $(srcdir)/exampleprefs_base.kcfgc
- ../kconfig_compiler $(srcdir)/example.kcfg $(srcdir)/exampleprefs_base.kcfgc
+exampleprefs_base.cpp exampleprefs_base.h: $(srcdir)/example.kcfg ../tdeconfig_compiler $(srcdir)/exampleprefs_base.kcfgc
+ ../tdeconfig_compiler $(srcdir)/example.kcfg $(srcdir)/exampleprefs_base.kcfgc
METASOURCES = AUTO
diff --git a/tdecore/kconfig_compiler/example/autoexample.cpp b/tdecore/tdeconfig_compiler/example/autoexample.cpp
index 2c4e4d442..6085fa6eb 100644
--- a/tdecore/kconfig_compiler/example/autoexample.cpp
+++ b/tdecore/tdeconfig_compiler/example/autoexample.cpp
@@ -24,31 +24,31 @@
#include "exampleprefs_base.h"
-#include <kaboutdata.h>
-#include <kapplication.h>
+#include <tdeaboutdata.h>
+#include <tdeapplication.h>
#include <kdebug.h>
-#include <klocale.h>
-#include <kcmdlineargs.h>
-#include <kglobal.h>
-#include <kconfig.h>
+#include <tdelocale.h>
+#include <tdecmdlineargs.h>
+#include <tdeglobal.h>
+#include <tdeconfig.h>
#include <kstandarddirs.h>
-#include <kconfigdialog.h>
+#include <tdeconfigdialog.h>
#include <tqlabel.h>
int main( int argc, char **argv )
{
- KAboutData aboutData( "example", I18N_NOOP("autoconfig example"), "0.1" );
+ TDEAboutData aboutData( "example", I18N_NOOP("autoconfig example"), "0.1" );
aboutData.addAuthor( "Cornelius Schumacher", 0, "schumacher@kde.org" );
- KCmdLineArgs::init( argc, argv, &aboutData );
+ TDECmdLineArgs::init( argc, argv, &aboutData );
- KApplication app;
+ TDEApplication app;
ExamplePrefsBase configSkeleton( "dummy1", "dummy2" );
configSkeleton.readConfig();
- KConfigDialog *dialog = new KConfigDialog( 0, "settings", &configSkeleton );
+ TDEConfigDialog *dialog = new TDEConfigDialog( 0, "settings", &configSkeleton );
GeneralBase *general = new GeneralBase( 0 );
dialog->addPage( general, i18n("General"), "General", "" );
diff --git a/tdecore/kconfig_compiler/example/example.cpp b/tdecore/tdeconfig_compiler/example/example.cpp
index 146d2460f..157570d98 100644
--- a/tdecore/kconfig_compiler/example/example.cpp
+++ b/tdecore/tdeconfig_compiler/example/example.cpp
@@ -21,23 +21,23 @@
#include "exampleprefs_base.h"
-#include <kaboutdata.h>
-#include <kapplication.h>
+#include <tdeaboutdata.h>
+#include <tdeapplication.h>
#include <kdebug.h>
-#include <klocale.h>
-#include <kcmdlineargs.h>
-#include <kglobal.h>
-#include <kconfig.h>
+#include <tdelocale.h>
+#include <tdecmdlineargs.h>
+#include <tdeglobal.h>
+#include <tdeconfig.h>
#include <kstandarddirs.h>
int main( int argc, char **argv )
{
- KAboutData aboutData( "example", I18N_NOOP("cfgc example"), "0.1" );
+ TDEAboutData aboutData( "example", I18N_NOOP("cfgc example"), "0.1" );
aboutData.addAuthor( "Cornelius Schumacher", 0, "schumacher@kde.org" );
- KCmdLineArgs::init( argc, argv, &aboutData );
+ TDECmdLineArgs::init( argc, argv, &aboutData );
- KApplication app;
+ TDEApplication app;
ExamplePrefsBase *prefs = new ExamplePrefsBase("Trans1", "Folder2");
diff --git a/tdecore/kconfig_compiler/example/example.kcfg b/tdecore/tdeconfig_compiler/example/example.kcfg
index 076bfb644..076bfb644 100644
--- a/tdecore/kconfig_compiler/example/example.kcfg
+++ b/tdecore/tdeconfig_compiler/example/example.kcfg
diff --git a/tdecore/kconfig_compiler/example/exampleprefs_base.kcfgc b/tdecore/tdeconfig_compiler/example/exampleprefs_base.kcfgc
index 829ec2e29..9b72fdb07 100644
--- a/tdecore/kconfig_compiler/example/exampleprefs_base.kcfgc
+++ b/tdecore/tdeconfig_compiler/example/exampleprefs_base.kcfgc
@@ -1,9 +1,9 @@
-# Code generation options for kconfig_compiler
+# Code generation options for tdeconfig_compiler
ClassName=ExamplePrefsBase
#
# Singleton=false
#
-# Inherits=KConfigSkeleton
+# Inherits=TDEConfigSkeleton
#
# IncludeFiles=libtdepim/kpimprefs.h
#
diff --git a/tdecore/kconfig_compiler/example/general_base.ui b/tdecore/tdeconfig_compiler/example/general_base.ui
index 9b41370c7..9b41370c7 100644
--- a/tdecore/kconfig_compiler/example/general_base.ui
+++ b/tdecore/tdeconfig_compiler/example/general_base.ui
diff --git a/tdecore/kconfig_compiler/example/myoptions_base.ui b/tdecore/tdeconfig_compiler/example/myoptions_base.ui
index 3c0c2e6cb..3c0c2e6cb 100644
--- a/tdecore/kconfig_compiler/example/myoptions_base.ui
+++ b/tdecore/tdeconfig_compiler/example/myoptions_base.ui
diff --git a/tdecore/kconfig_compiler/kcfg.xsd b/tdecore/tdeconfig_compiler/kcfg.xsd
index 97f716d62..9eb18a068 100644
--- a/tdecore/kconfig_compiler/kcfg.xsd
+++ b/tdecore/tdeconfig_compiler/kcfg.xsd
@@ -29,7 +29,7 @@
<xsd:annotation>
<xsd:documentation>
- A Schema for KDE's KConfigXT XML format. It is similar to the DTD
+ A Schema for KDE's TDEConfigXT XML format. It is similar to the DTD
found at:
http://www.kde.org/standards/kcfg/1.0/kcfg.dtd
diff --git a/tdecore/kconfig_compiler/kconfig_compiler.cpp b/tdecore/tdeconfig_compiler/tdeconfig_compiler.cpp
index 55a3c7f34..207a78402 100644
--- a/tdecore/kconfig_compiler/kconfig_compiler.cpp
+++ b/tdecore/tdeconfig_compiler/tdeconfig_compiler.cpp
@@ -27,25 +27,25 @@
#include <tqdom.h>
#include <tqregexp.h>
-#include <kaboutdata.h>
-#include <kapplication.h>
+#include <tdeaboutdata.h>
+#include <tdeapplication.h>
#include <kdebug.h>
-#include <klocale.h>
-#include <kcmdlineargs.h>
-#include <kglobal.h>
-#include <kconfig.h>
+#include <tdelocale.h>
+#include <tdecmdlineargs.h>
+#include <tdeglobal.h>
+#include <tdeconfig.h>
#include <ksimpleconfig.h>
#include <kstandarddirs.h>
#include <iostream>
-static const KCmdLineOptions options[] =
+static const TDECmdLineOptions options[] =
{
{ "d", 0, 0 },
{ "directory <dir>", I18N_NOOP("Directory to generate files in"), "." },
{ "+file.kcfg", I18N_NOOP("Input kcfg XML file"), 0 },
{ "+file.kcfgc", I18N_NOOP("Code generation options file"), 0 },
- KCmdLineLastOption
+ TDECmdLineLastOption
};
@@ -627,7 +627,7 @@ TQString param( const TQString &type )
else if ( type == "PathList" ) return "const TQStringList &";
else if ( type == "Password" ) return "const TQString &";
else {
- kdError() <<"kconfig_compiler does not support type \""<< type <<"\""<<endl;
+ kdError() <<"tdeconfig_compiler does not support type \""<< type <<"\""<<endl;
return TQSTRING_OBJECT_NAME_STRING; //For now, but an assert would be better
}
}
@@ -657,7 +657,7 @@ TQString cppType( const TQString &type )
else if ( type == "PathList" ) return TQSTRINGLIST_OBJECT_NAME_STRING;
else if ( type == "Password" ) return TQSTRING_OBJECT_NAME_STRING;
else {
- kdError()<<"kconfig_compiler does not support type \""<< type <<"\""<<endl;
+ kdError()<<"tdeconfig_compiler does not support type \""<< type <<"\""<<endl;
return TQSTRING_OBJECT_NAME_STRING; //For now, but an assert would be better
}
}
@@ -666,7 +666,7 @@ TQString defaultValue( const TQString &type )
{
if ( type == "String" ) return "\"\""; // Use empty string, not null string!
else if ( type == "StringList" ) return "TQStringList()";
- else if ( type == "Font" ) return "KGlobalSettings::generalFont()";
+ else if ( type == "Font" ) return "TDEGlobalSettings::generalFont()";
else if ( type == "Rect" ) return "TQRect()";
else if ( type == "Size" ) return "TQSize()";
else if ( type == "Color" ) return "TQColor(128, 128, 128)";
@@ -684,7 +684,7 @@ TQString defaultValue( const TQString &type )
else if ( type == "PathList" ) return "TQStringList()";
else if ( type == "Password" ) return "\"\""; // Use empty string, not null string!
else {
- kdWarning()<<"Error, kconfig_compiler doesn't support the \""<< type <<"\" type!"<<endl;
+ kdWarning()<<"Error, tdeconfig_compiler doesn't support the \""<< type <<"\" type!"<<endl;
return TQSTRING_OBJECT_NAME_STRING; //For now, but an assert would be better
}
}
@@ -706,7 +706,7 @@ static TQString itemDeclaration(const CfgEntry *e)
TQString fCap = e->name();
fCap[0] = fCap[0].upper();
- return " KConfigSkeleton::Item"+itemType( e->type() ) +
+ return " TDEConfigSkeleton::Item"+itemType( e->type() ) +
" *item" + fCap +
( (!e->param().isEmpty())?(TQString("[%1]").arg(e->paramMax()+1)) : TQString()) +
";\n";
@@ -754,7 +754,7 @@ static TQString itemPath(const CfgEntry *e)
TQString newItem( const TQString &type, const TQString &name, const TQString &key,
const TQString &defaultValue, const TQString &param = TQString())
{
- TQString t = "new KConfigSkeleton::Item" + itemType( type ) +
+ TQString t = "new TDEConfigSkeleton::Item" + itemType( type ) +
"( currentGroup(), " + key + ", " + varPath( name ) + param;
if ( type == "Enum" ) t += ", values" + name;
if ( !defaultValue.isEmpty() ) {
@@ -952,8 +952,8 @@ TQString indent(TQString text, int spaces)
int main( int argc, char **argv )
{
- KAboutData aboutData( "kconfig_compiler", I18N_NOOP("TDE .kcfg compiler"), "0.3",
- I18N_NOOP("KConfig Compiler") , KAboutData::License_LGPL );
+ TDEAboutData aboutData( "tdeconfig_compiler", I18N_NOOP("TDE .kcfg compiler"), "0.3",
+ I18N_NOOP("TDEConfig Compiler") , TDEAboutData::License_LGPL );
aboutData.addAuthor( "Cornelius Schumacher", 0, "schumacher@kde.org" );
aboutData.addAuthor( "Waldo Bastian", 0, "bastian@kde.org" );
aboutData.addAuthor( "Zack Rusin", 0, "zack@kde.org" );
@@ -962,12 +962,12 @@ int main( int argc, char **argv )
aboutData.addCredit( "Duncan Mac-Vicar P.", "dpointer support",
"duncan@kde.org", "http://www.mac-vicar.com/~duncan" );
- KCmdLineArgs::init( argc, argv, &aboutData );
- KCmdLineArgs::addCmdLineOptions( options );
+ TDECmdLineArgs::init( argc, argv, &aboutData );
+ TDECmdLineArgs::addCmdLineOptions( options );
- KInstance app( &aboutData );
+ TDEInstance app( &aboutData );
- KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
+ TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
if ( args->count() < 2 ) {
kdError() << "Too few arguments." << endl;
@@ -1093,7 +1093,7 @@ int main( int argc, char **argv )
}
}
- if ( inherits.isEmpty() ) inherits = "KConfigSkeleton";
+ if ( inherits.isEmpty() ) inherits = "TDEConfigSkeleton";
if ( className.isEmpty() ) {
kdError() << "Class name missing" << endl;
@@ -1134,7 +1134,7 @@ int main( int argc, char **argv )
TQTextStream h( &header );
- h << "// This file is generated by kconfig_compiler from " << args->url(0).fileName() << "." << endl;
+ h << "// This file is generated by tdeconfig_compiler from " << args->url(0).fileName() << "." << endl;
h << "// All changes you do to this file will be lost." << endl;
h << "#ifndef " << ( !nameSpace.isEmpty() ? nameSpace.upper() + "_" : "" )
@@ -1151,9 +1151,9 @@ int main( int argc, char **argv )
if ( headerIncludes.count() > 0 ) h << endl;
if ( !singleton && cfgFileNameArg && parameters.isEmpty() )
- h << "#include <kglobal.h>" << endl;
+ h << "#include <tdeglobal.h>" << endl;
- h << "#include <kconfigskeleton.h>" << endl;
+ h << "#include <tdeconfigskeleton.h>" << endl;
h << "#include <kdebug.h>" << endl << endl;
// Includes
@@ -1220,7 +1220,7 @@ int main( int argc, char **argv )
if ( !singleton ) {
h << " " << className << "(";
if (cfgFileNameArg)
- h << " KSharedConfig::Ptr config" << (parameters.isEmpty() ? " = KGlobal::sharedConfig()" : ", ");
+ h << " TDESharedConfig::Ptr config" << (parameters.isEmpty() ? " = TDEGlobal::sharedConfig()" : ", ");
for (TQValueList<Param>::ConstIterator it = parameters.begin();
it != parameters.end(); ++it)
{
@@ -1330,7 +1330,7 @@ int main( int argc, char **argv )
h << " static" << endl;
h << " void writeConfig()" << endl;
h << " {" << endl;
- h << " static_cast<KConfigSkeleton*>(self())->writeConfig();" << endl;
+ h << " static_cast<TDEConfigSkeleton*>(self())->writeConfig();" << endl;
h << " }" << endl;
}
@@ -1416,12 +1416,12 @@ int main( int argc, char **argv )
TQTextStream cpp( &implementation );
- cpp << "// This file is generated by kconfig_compiler from " << args->url(0).fileName() << "." << endl;
+ cpp << "// This file is generated by tdeconfig_compiler from " << args->url(0).fileName() << "." << endl;
cpp << "// All changes you do to this file will be lost." << endl << endl;
cpp << "#include \"" << headerFileName << "\"" << endl << endl;
- if ( setUserTexts ) cpp << "#include <klocale.h>" << endl << endl;
+ if ( setUserTexts ) cpp << "#include <tdelocale.h>" << endl << endl;
// Header required by singleton implementation
if ( singleton )
@@ -1455,7 +1455,7 @@ int main( int argc, char **argv )
}
cpp << endl << " // items" << endl;
for( e = entries.first(); e; e = entries.next() ) {
- cpp << " KConfigSkeleton::Item" << itemType( e->type() ) << " *" << itemVar( e );
+ cpp << " TDEConfigSkeleton::Item" << itemType( e->type() ) << " *" << itemVar( e );
if (!e->param().isEmpty() ) cpp << TQString("[%1]").arg( e->paramMax()+1 );
cpp << ";" << endl;
}
@@ -1502,7 +1502,7 @@ int main( int argc, char **argv )
cpp << className << "::" << className << "( ";
if ( cfgFileNameArg ) {
if ( !singleton )
- cpp << " KSharedConfig::Ptr config";
+ cpp << " TDESharedConfig::Ptr config";
else
cpp << " const char *config";
cpp << (parameters.isEmpty() ? " " : ", ");
@@ -1553,13 +1553,13 @@ int main( int argc, char **argv )
cpp << e->code() << endl;
}
if ( e->type() == "Enum" ) {
- cpp << " TQValueList<KConfigSkeleton::ItemEnum::Choice> values"
+ cpp << " TQValueList<TDEConfigSkeleton::ItemEnum::Choice> values"
<< e->name() << ";" << endl;
TQValueList<CfgEntry::Choice> choices = e->choices();
TQValueList<CfgEntry::Choice>::ConstIterator it;
for( it = choices.begin(); it != choices.end(); ++it ) {
cpp << " {" << endl;
- cpp << " KConfigSkeleton::ItemEnum::Choice choice;" << endl;
+ cpp << " TDEConfigSkeleton::ItemEnum::Choice choice;" << endl;
cpp << " choice.name = TQString::fromLatin1( \"" << (*it).name << "\" );" << endl;
if ( setUserTexts ) {
if ( !(*it).label.isEmpty() )
@@ -1670,7 +1670,7 @@ int main( int argc, char **argv )
if ( itemAccessors )
{
cpp << endl;
- cpp << "KConfigSkeleton::Item" << itemType( e->type() ) << " *"
+ cpp << "TDEConfigSkeleton::Item" << itemType( e->type() ) << " *"
<< getFunction( n, className ) << "Item(";
if (!e->param().isEmpty()) {
cpp << " " << cppType(e->paramType()) << " i ";
diff --git a/tdecore/kconfig_compiler/tests/Makefile.am b/tdecore/tdeconfig_compiler/tests/Makefile.am
index 9462c800b..fa88f0b4b 100644
--- a/tdecore/kconfig_compiler/tests/Makefile.am
+++ b/tdecore/tdeconfig_compiler/tests/Makefile.am
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = -I$(top_srcdir)/tdecore -I$(top_srcdir)/kunittest $(all_includes) -DQT_NO_CAST_ASCII -DSRCDIR=\"$(srcdir)\"
+AM_CPPFLAGS = -I$(top_srcdir)/tdecore -I$(top_srcdir)/tdeunittest $(all_includes) -DQT_NO_CAST_ASCII -DSRCDIR=\"$(srcdir)\"
check_PROGRAMS = test1 test2 test3 test4 test5 test6 test7 test8 test9 test_dpointer
@@ -14,117 +14,117 @@ CLEANFILES = test1.cpp test1.h \
test_dpointer.cpp test_dpointer.h \
md5sums
-test1_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -lktexteditor
+test1_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor
test1_LDADD = $(LIB_TDECORE)
test1_SOURCES = test1main.cpp test1.cpp
-test2_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -lktexteditor
+test2_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor
test2_LDADD = $(LIB_TDECORE)
test2_SOURCES = test2main.cpp test2.cpp
-test3_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -lktexteditor
+test3_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor
test3_LDADD = $(LIB_TDECORE)
test3_SOURCES = test3main.cpp test3.cpp
-test4_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -lktexteditor
+test4_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor
test4_LDADD = $(LIB_TDECORE)
test4_SOURCES = test4main.cpp test4.cpp
-test5_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -lktexteditor
+test5_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor
test5_LDADD = $(LIB_TDECORE)
test5_SOURCES = test5main.cpp test5.cpp
-test6_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -lktexteditor
+test6_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor
test6_LDADD = $(LIB_TDECORE)
test6_SOURCES = test6main.cpp test6.cpp
-test7_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -lktexteditor
+test7_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor
test7_LDADD = $(LIB_TDECORE)
test7_SOURCES = test7main.cpp test7.cpp
-test8_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -lktexteditor
+test8_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor
test8_LDADD = $(LIB_TDECORE)
test8_SOURCES = test8main.cpp test8a.cpp test8b.cpp
-test9_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -lktexteditor
+test9_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor
test9_LDADD = $(LIB_TDECORE)
test9_SOURCES = test9main.cpp test9.cpp
-test_dpointer_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -lktexteditor
+test_dpointer_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor
test_dpointer_LDADD = $(LIB_TDECORE)
test_dpointer_SOURCES = test_dpointer_main.cpp test_dpointer.cpp
-check_LTLIBRARIES = kunittest_kconfigcompiler_test.la
+check_LTLIBRARIES = tdeunittest_tdeconfigcompiler_test.la
-kunittest_kconfigcompiler_test_la_SOURCES = kconfigcompiler_test.cpp
-kunittest_kconfigcompiler_test_la_LIBADD = \
- $(top_builddir)/kunittest/libkunittest.la
-kunittest_kconfigcompiler_test_la_LDFLAGS = -module $(KDE_CHECK_PLUGIN) \
+tdeunittest_tdeconfigcompiler_test_la_SOURCES = tdeconfigcompiler_test.cpp
+tdeunittest_tdeconfigcompiler_test_la_LIBADD = \
+ $(top_builddir)/tdeunittest/libtdeunittest.la
+tdeunittest_tdeconfigcompiler_test_la_LDFLAGS = -module $(KDE_CHECK_PLUGIN) \
$(all_libraries)
test1main.o test1.o: test1.h
# avoid running the below command in parallel
test1.cpp: test1.h
-test1.cpp test1.h: $(srcdir)/test1.kcfg ../kconfig_compiler $(srcdir)/test1.kcfgc
- ../kconfig_compiler $(srcdir)/test1.kcfg $(srcdir)/test1.kcfgc
+test1.cpp test1.h: $(srcdir)/test1.kcfg ../tdeconfig_compiler $(srcdir)/test1.kcfgc
+ ../tdeconfig_compiler $(srcdir)/test1.kcfg $(srcdir)/test1.kcfgc
test2main.o test2.o: test2.h
# avoid running the below command in parallel
test2.cpp: test2.h
-test2.cpp test2.h: $(srcdir)/test2.kcfg ../kconfig_compiler $(srcdir)/test2.kcfgc
- ../kconfig_compiler $(srcdir)/test2.kcfg $(srcdir)/test2.kcfgc
+test2.cpp test2.h: $(srcdir)/test2.kcfg ../tdeconfig_compiler $(srcdir)/test2.kcfgc
+ ../tdeconfig_compiler $(srcdir)/test2.kcfg $(srcdir)/test2.kcfgc
test3main.o test3.o: test3.h
# avoid running the below command in parallel
test3.cpp: test3.h
-test3.cpp test3.h: $(srcdir)/test3.kcfg ../kconfig_compiler $(srcdir)/test3.kcfgc
- ../kconfig_compiler $(srcdir)/test3.kcfg $(srcdir)/test3.kcfgc
+test3.cpp test3.h: $(srcdir)/test3.kcfg ../tdeconfig_compiler $(srcdir)/test3.kcfgc
+ ../tdeconfig_compiler $(srcdir)/test3.kcfg $(srcdir)/test3.kcfgc
test4main.o test4.o: test4.h
# avoid running the below command in parallel
test4.cpp: test4.h
-test4.cpp test4.h: $(srcdir)/test4.kcfg ../kconfig_compiler $(srcdir)/test4.kcfgc
- ../kconfig_compiler $(srcdir)/test4.kcfg $(srcdir)/test4.kcfgc
+test4.cpp test4.h: $(srcdir)/test4.kcfg ../tdeconfig_compiler $(srcdir)/test4.kcfgc
+ ../tdeconfig_compiler $(srcdir)/test4.kcfg $(srcdir)/test4.kcfgc
test5main.o test5.o: test5.h
# avoid running the below command in parallel
test5.cpp: test5.h
-test5.cpp test5.h: $(srcdir)/test5.kcfg ../kconfig_compiler $(srcdir)/test5.kcfgc
- ../kconfig_compiler $(srcdir)/test5.kcfg $(srcdir)/test5.kcfgc
+test5.cpp test5.h: $(srcdir)/test5.kcfg ../tdeconfig_compiler $(srcdir)/test5.kcfgc
+ ../tdeconfig_compiler $(srcdir)/test5.kcfg $(srcdir)/test5.kcfgc
test6main.o test6.o: test6.h
# avoid running the below command in parallel
test6.cpp: test6.h
-test6.cpp test6.h: $(srcdir)/test6.kcfg ../kconfig_compiler $(srcdir)/test6.kcfgc
- ../kconfig_compiler $(srcdir)/test6.kcfg $(srcdir)/test6.kcfgc
+test6.cpp test6.h: $(srcdir)/test6.kcfg ../tdeconfig_compiler $(srcdir)/test6.kcfgc
+ ../tdeconfig_compiler $(srcdir)/test6.kcfg $(srcdir)/test6.kcfgc
test7main.o test7.o: test7.h
# avoid running the below command in parallel
test7.cpp: test7.h
-test7.cpp test7.h: $(srcdir)/test7.kcfg ../kconfig_compiler $(srcdir)/test7.kcfgc
- ../kconfig_compiler $(srcdir)/test7.kcfg $(srcdir)/test7.kcfgc
+test7.cpp test7.h: $(srcdir)/test7.kcfg ../tdeconfig_compiler $(srcdir)/test7.kcfgc
+ ../tdeconfig_compiler $(srcdir)/test7.kcfg $(srcdir)/test7.kcfgc
test8main.o test8a.o test8b.o: test8a.h test8b.h
# avoid running the below command in parallel
test8a.cpp: test8a.h
-test8a.cpp test8a.h: $(srcdir)/test8a.kcfg ../kconfig_compiler $(srcdir)/test8a.kcfgc
- ../kconfig_compiler $(srcdir)/test8a.kcfg $(srcdir)/test8a.kcfgc
+test8a.cpp test8a.h: $(srcdir)/test8a.kcfg ../tdeconfig_compiler $(srcdir)/test8a.kcfgc
+ ../tdeconfig_compiler $(srcdir)/test8a.kcfg $(srcdir)/test8a.kcfgc
test8b.cpp: test8b.h
-test8b.cpp test8b.h: $(srcdir)/test8b.kcfg ../kconfig_compiler $(srcdir)/test8b.kcfgc
- ../kconfig_compiler $(srcdir)/test8b.kcfg $(srcdir)/test8b.kcfgc
+test8b.cpp test8b.h: $(srcdir)/test8b.kcfg ../tdeconfig_compiler $(srcdir)/test8b.kcfgc
+ ../tdeconfig_compiler $(srcdir)/test8b.kcfg $(srcdir)/test8b.kcfgc
test9main.o test9.o: test9.h
# avoid running the below command in parallel
test9.cpp: test9.h
-test9.cpp test9.h: $(srcdir)/test9.kcfg ../kconfig_compiler $(srcdir)/test9.kcfgc
- ../kconfig_compiler $(srcdir)/test9.kcfg $(srcdir)/test9.kcfgc
+test9.cpp test9.h: $(srcdir)/test9.kcfg ../tdeconfig_compiler $(srcdir)/test9.kcfgc
+ ../tdeconfig_compiler $(srcdir)/test9.kcfg $(srcdir)/test9.kcfgc
test_dpointer_main.o test_dpointer.o: test_dpointer.h
# avoid running the below command in parallel
test_dpointer.cpp: test_dpointer.h
-test_dpointer.cpp test_dpointer.h: $(srcdir)/test_dpointer.kcfg ../kconfig_compiler $(srcdir)/test_dpointer.kcfgc
- ../kconfig_compiler $(srcdir)/test_dpointer.kcfg $(srcdir)/test_dpointer.kcfgc
+test_dpointer.cpp test_dpointer.h: $(srcdir)/test_dpointer.kcfg ../tdeconfig_compiler $(srcdir)/test_dpointer.kcfgc
+ ../tdeconfig_compiler $(srcdir)/test_dpointer.kcfg $(srcdir)/test_dpointer.kcfgc
md5sums:
$(MD5SUM) $(srcdir)/test*.ref | sed -e "s,$(srcdir)/,,; s,\.ref$$,," > md5sums
diff --git a/tdecore/tdeconfig_compiler/tests/myprefs.h b/tdecore/tdeconfig_compiler/tests/myprefs.h
new file mode 100644
index 000000000..99ea62ec1
--- /dev/null
+++ b/tdecore/tdeconfig_compiler/tests/myprefs.h
@@ -0,0 +1,7 @@
+#include <tdeconfigskeleton.h>
+
+class MyPrefs : public TDEConfigSkeleton
+{
+ public:
+ MyPrefs( const TQString &a ) : TDEConfigSkeleton( a ) {}
+};
diff --git a/tdecore/kconfig_compiler/tests/kconfigcompiler_test.cpp b/tdecore/tdeconfig_compiler/tests/tdeconfigcompiler_test.cpp
index 2f8e7eee3..e5bb3dcea 100644
--- a/tdecore/kconfig_compiler/tests/kconfigcompiler_test.cpp
+++ b/tdecore/tdeconfig_compiler/tests/tdeconfigcompiler_test.cpp
@@ -1,5 +1,5 @@
/*
- Tests for KConfig Compiler
+ Tests for TDEConfig Compiler
Copyright (c) 2005 by Duncan Mac-Vicar <duncan@kde.org>
@@ -16,13 +16,13 @@
#include <tqfile.h>
#include <tqstring.h>
#include <kdebug.h>
-#include <kunittest/module.h>
-#include "kconfigcompiler_test.h"
+#include <tdeunittest/module.h>
+#include "tdeconfigcompiler_test.h"
using namespace KUnitTest;
-KUNITTEST_MODULE( kunittest_kconfigcompiler_test, "KConfigXT")
-KUNITTEST_MODULE_REGISTER_TESTER( KConfigCompiler_Test )
+KUNITTEST_MODULE( tdeunittest_tdeconfigcompiler_test, "TDEConfigXT")
+KUNITTEST_MODULE_REGISTER_TESTER( TDEConfigCompiler_Test )
typedef const char * CompilerTestSet[];
@@ -50,12 +50,12 @@ static CompilerTestSet willFailCases =
};
-void KConfigCompiler_Test::allTests()
+void TDEConfigCompiler_Test::allTests()
{
testExpectedOutput();
}
-void KConfigCompiler_Test::testExpectedOutput()
+void TDEConfigCompiler_Test::testExpectedOutput()
{
uint i = 0;
// Known to pass test cases
@@ -74,7 +74,7 @@ void KConfigCompiler_Test::testExpectedOutput()
}
}
-void KConfigCompiler_Test::performCompare(const TQString &fileName, bool fail)
+void TDEConfigCompiler_Test::performCompare(const TQString &fileName, bool fail)
{
TQFile file(fileName);
TQFile fileRef(TQString::fromLatin1(SRCDIR) + TQString::fromLatin1("/") + fileName + TQString::fromLatin1(".ref"));
diff --git a/tdecore/kconfig_compiler/tests/kconfigcompiler_test.h b/tdecore/tdeconfig_compiler/tests/tdeconfigcompiler_test.h
index 36b33cd47..df3f4cf37 100644
--- a/tdecore/kconfig_compiler/tests/kconfigcompiler_test.h
+++ b/tdecore/tdeconfig_compiler/tests/tdeconfigcompiler_test.h
@@ -1,5 +1,5 @@
/*
- Tests for KConfig Compiler
+ Tests for TDEConfig Compiler
Copyright (c) 2005 by Duncan Mac-Vicar <duncan@kde.org>
@@ -16,12 +16,12 @@
#ifndef KCONFIGCOMPILER_TEST_H
#define KCONFIGCOMPILER_TEST_H
-#include <kunittest/tester.h>
+#include <tdeunittest/tester.h>
class TQString;
// change to SlotTester when it works
-class KConfigCompiler_Test : public KUnitTest::Tester
+class TDEConfigCompiler_Test : public KUnitTest::Tester
{
public:
void allTests();
diff --git a/tdecore/tdeconfig_compiler/tests/test1.cpp.ref b/tdecore/tdeconfig_compiler/tests/test1.cpp.ref
new file mode 100644
index 000000000..50f084874
--- /dev/null
+++ b/tdecore/tdeconfig_compiler/tests/test1.cpp.ref
@@ -0,0 +1,72 @@
+// This file is generated by tdeconfig_compiler from test1.kcfg.
+// All changes you do to this file will be lost.
+
+#include "test1.h"
+
+Test1::Test1( const TQString & transport, const TQString & folder )
+ : TDEConfigSkeleton( TQString::fromLatin1( "examplerc" ) )
+ , mParamtransport(transport)
+ , mParamfolder(folder)
+{
+ setCurrentGroup( TQString::fromLatin1( "General-%1" ).arg( mParamfolder ) );
+
+ TDEConfigSkeleton::ItemBool *itemOneOption;
+ itemOneOption = new TDEConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "OneOption" ), mOneOption, true );
+ addItem( itemOneOption, TQString::fromLatin1( "OneOption" ) );
+ TDEConfigSkeleton::ItemInt *itemAnotherOption;
+ itemAnotherOption = new TDEConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Another Option" ), mAnotherOption, 5 );
+ addItem( itemAnotherOption, TQString::fromLatin1( "AnotherOption" ) );
+ TQValueList<TDEConfigSkeleton::ItemEnum::Choice> valuesListOption;
+ {
+ TDEConfigSkeleton::ItemEnum::Choice choice;
+ choice.name = TQString::fromLatin1( "One" );
+ valuesListOption.append( choice );
+ }
+ {
+ TDEConfigSkeleton::ItemEnum::Choice choice;
+ choice.name = TQString::fromLatin1( "Two" );
+ valuesListOption.append( choice );
+ }
+ {
+ TDEConfigSkeleton::ItemEnum::Choice choice;
+ choice.name = TQString::fromLatin1( "Three" );
+ valuesListOption.append( choice );
+ }
+ TDEConfigSkeleton::ItemEnum *itemListOption;
+ itemListOption = new TDEConfigSkeleton::ItemEnum( currentGroup(), TQString::fromLatin1( "ListOption" ), mListOption, valuesListOption, EnumListOption::One );
+ addItem( itemListOption, TQString::fromLatin1( "ListOption" ) );
+
+ setCurrentGroup( TQString::fromLatin1( "MyOptions" ) );
+
+ TDEConfigSkeleton::ItemString *itemMyString;
+ itemMyString = new TDEConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "MyString" ), mMyString, TQString::fromLatin1( "Default String" ) );
+ addItem( itemMyString, TQString::fromLatin1( "MyString" ) );
+ TDEConfigSkeleton::ItemPath *itemMyPath;
+ itemMyPath = new TDEConfigSkeleton::ItemPath( currentGroup(), TQString::fromLatin1( "MyPath" ), mMyPath, TQDir::homeDirPath()+TQString::fromLatin1(".hidden_file") );
+ addItem( itemMyPath, TQString::fromLatin1( "MyPath" ) );
+ TDEConfigSkeleton::ItemInt *itemAnotherOption2;
+ itemAnotherOption2 = new TDEConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Another Option" ), mAnotherOption2, 10 );
+ addItem( itemAnotherOption2, TQString::fromLatin1( "AnotherOption2" ) );
+ TQStringList defaultMyStringList;
+ defaultMyStringList.append( TQString::fromUtf8( "up" ) );
+ defaultMyStringList.append( TQString::fromUtf8( "down" ) );
+
+ TDEConfigSkeleton::ItemStringList *itemMyStringList;
+ itemMyStringList = new TDEConfigSkeleton::ItemStringList( currentGroup(), TQString::fromLatin1( "MyStringList" ), mMyStringList, defaultMyStringList );
+ addItem( itemMyStringList, TQString::fromLatin1( "MyStringList" ) );
+ TQStringList defaultMyStringListHidden;
+ defaultMyStringListHidden.append( TQString::fromUtf8( "up" ) );
+ defaultMyStringListHidden.append( TQString::fromUtf8( "down" ) );
+
+ TDEConfigSkeleton::ItemStringList *itemMyStringListHidden;
+ itemMyStringListHidden = new TDEConfigSkeleton::ItemStringList( currentGroup(), TQString::fromLatin1( "MyStringListHidden" ), mMyStringListHidden, defaultMyStringListHidden );
+ addItem( itemMyStringListHidden, TQString::fromLatin1( "MyStringListHidden" ) );
+ TDEConfigSkeleton::ItemInt *itemMyNumber;
+ itemMyNumber = new TDEConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "List-%1-%2" ).arg( mParamtransport ).arg( mParamfolder ), mMyNumber, 1 );
+ addItem( itemMyNumber, TQString::fromLatin1( "MyNumber" ) );
+}
+
+Test1::~Test1()
+{
+}
+
diff --git a/tdecore/kconfig_compiler/tests/test1.h.ref b/tdecore/tdeconfig_compiler/tests/test1.h.ref
index cc2d99c69..bb74038a5 100644
--- a/tdecore/kconfig_compiler/tests/test1.h.ref
+++ b/tdecore/tdeconfig_compiler/tests/test1.h.ref
@@ -1,13 +1,13 @@
-// This file is generated by kconfig_compiler from test1.kcfg.
+// This file is generated by tdeconfig_compiler from test1.kcfg.
// All changes you do to this file will be lost.
#ifndef TEST1_H
#define TEST1_H
-#include <kconfigskeleton.h>
+#include <tdeconfigskeleton.h>
#include <kdebug.h>
#include <tqdir.h>
-class Test1 : public KConfigSkeleton
+class Test1 : public TDEConfigSkeleton
{
public:
class EnumListOption
diff --git a/tdecore/kconfig_compiler/tests/test1.kcfg b/tdecore/tdeconfig_compiler/tests/test1.kcfg
index ce42aebfb..ce42aebfb 100644
--- a/tdecore/kconfig_compiler/tests/test1.kcfg
+++ b/tdecore/tdeconfig_compiler/tests/test1.kcfg
diff --git a/tdecore/kconfig_compiler/tests/test1.kcfgc b/tdecore/tdeconfig_compiler/tests/test1.kcfgc
index 3b74d7c51..dd086cdda 100644
--- a/tdecore/kconfig_compiler/tests/test1.kcfgc
+++ b/tdecore/tdeconfig_compiler/tests/test1.kcfgc
@@ -1,9 +1,9 @@
-# Code generation options for kconfig_compiler
+# Code generation options for tdeconfig_compiler
ClassName=Test1
#
# Singleton=false
#
-# Inherits=KConfigSkeleton
+# Inherits=TDEConfigSkeleton
#
# IncludeFiles=libtdepim/kpimprefs.h
#
diff --git a/tdecore/kconfig_compiler/tests/test1main.cpp b/tdecore/tdeconfig_compiler/tests/test1main.cpp
index 976a7bbd6..79546639f 100644
--- a/tdecore/kconfig_compiler/tests/test1main.cpp
+++ b/tdecore/tdeconfig_compiler/tests/test1main.cpp
@@ -23,7 +23,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
int main( int, char*[] )
{
- KInstance i("test");
+ TDEInstance i("test");
Test1 *t = new Test1( TQString::null, TQString::null );
delete t;
}
diff --git a/tdecore/kconfig_compiler/tests/test2.cpp.ref b/tdecore/tdeconfig_compiler/tests/test2.cpp.ref
index 2d56f7545..e66c5b9da 100644
--- a/tdecore/kconfig_compiler/tests/test2.cpp.ref
+++ b/tdecore/tdeconfig_compiler/tests/test2.cpp.ref
@@ -1,68 +1,68 @@
-// This file is generated by kconfig_compiler from test2.kcfg.
+// This file is generated by tdeconfig_compiler from test2.kcfg.
// All changes you do to this file will be lost.
#include "test2.h"
-#include <klocale.h>
+#include <tdelocale.h>
Test2::Test2( )
: MyPrefs( TQString::fromLatin1( "korganizerrc" ) )
{
setCurrentGroup( TQString::fromLatin1( "General" ) );
- mAutoSaveItem = new KConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "Auto Save" ), mAutoSave, false );
+ mAutoSaveItem = new TDEConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "Auto Save" ), mAutoSave, false );
mAutoSaveItem->setLabel( i18n("Enable automatic saving of calendar") );
mAutoSaveItem->setWhatsThis( i18n("WhatsThis text for AutoSave option") );
addItem( mAutoSaveItem, TQString::fromLatin1( "AutoSave" ) );
- mAutoSaveIntervalItem = new KConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Auto Save Interval" ), mAutoSaveInterval, 10 );
+ mAutoSaveIntervalItem = new TDEConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Auto Save Interval" ), mAutoSaveInterval, 10 );
mAutoSaveIntervalItem->setLabel( i18n("Auto Save Interval") );
addItem( mAutoSaveIntervalItem, TQString::fromLatin1( "AutoSaveInterval" ) );
- mConfirmItem = new KConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "Confirm Deletes" ), mConfirm, true );
+ mConfirmItem = new TDEConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "Confirm Deletes" ), mConfirm, true );
mConfirmItem->setLabel( i18n("Confirm deletes") );
addItem( mConfirmItem, TQString::fromLatin1( "Confirm" ) );
- mArchiveFileItem = new KConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "Archive File" ), mArchiveFile );
+ mArchiveFileItem = new TDEConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "Archive File" ), mArchiveFile );
mArchiveFileItem->setLabel( i18n("Archive File") );
addItem( mArchiveFileItem, TQString::fromLatin1( "ArchiveFile" ) );
- TQValueList<KConfigSkeleton::ItemEnum::Choice> valuesDestination;
+ TQValueList<TDEConfigSkeleton::ItemEnum::Choice> valuesDestination;
{
- KConfigSkeleton::ItemEnum::Choice choice;
+ TDEConfigSkeleton::ItemEnum::Choice choice;
choice.name = TQString::fromLatin1( "standardDestination" );
valuesDestination.append( choice );
}
{
- KConfigSkeleton::ItemEnum::Choice choice;
+ TDEConfigSkeleton::ItemEnum::Choice choice;
choice.name = TQString::fromLatin1( "askDestination" );
valuesDestination.append( choice );
}
{
- KConfigSkeleton::ItemEnum::Choice choice;
+ TDEConfigSkeleton::ItemEnum::Choice choice;
choice.name = TQString::fromLatin1( "argl1" );
choice.label = i18n("Argl1 Label");
valuesDestination.append( choice );
}
{
- KConfigSkeleton::ItemEnum::Choice choice;
+ TDEConfigSkeleton::ItemEnum::Choice choice;
choice.name = TQString::fromLatin1( "argl2" );
choice.whatsThis = i18n("Argl2 Whatsthis");
valuesDestination.append( choice );
}
{
- KConfigSkeleton::ItemEnum::Choice choice;
+ TDEConfigSkeleton::ItemEnum::Choice choice;
choice.name = TQString::fromLatin1( "argl3" );
choice.label = i18n("Argl3 Label");
choice.whatsThis = i18n("Argl3 Whatsthis");
valuesDestination.append( choice );
}
- mDestinationItem = new KConfigSkeleton::ItemEnum( currentGroup(), TQString::fromLatin1( "Destination" ), mDestination, valuesDestination, standardDestination );
+ mDestinationItem = new TDEConfigSkeleton::ItemEnum( currentGroup(), TQString::fromLatin1( "Destination" ), mDestination, valuesDestination, standardDestination );
mDestinationItem->setLabel( i18n("New Events/Todos Should") );
addItem( mDestinationItem, TQString::fromLatin1( "Destination" ) );
setCurrentGroup( TQString::fromLatin1( "Views" ) );
- mHourSizeItem = new KConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Hour Size" ), mHourSize, 10 );
+ mHourSizeItem = new TDEConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Hour Size" ), mHourSize, 10 );
mHourSizeItem->setLabel( i18n("Hour Size") );
addItem( mHourSizeItem, TQString::fromLatin1( "HourSize" ) );
- mSelectionStartsEditorItem = new KConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "SelectionStartsEditor" ), mSelectionStartsEditor, false );
+ mSelectionStartsEditorItem = new TDEConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "SelectionStartsEditor" ), mSelectionStartsEditor, false );
mSelectionStartsEditorItem->setLabel( i18n("Time range selection in agenda view starts event editor") );
addItem( mSelectionStartsEditorItem, TQString::fromLatin1( "SelectionStartsEditor" ) );
@@ -72,22 +72,22 @@ Test2::Test2( )
defaultSelectedPlugins.append( TQString::fromUtf8( "holidays" ) );
defaultSelectedPlugins.append( TQString::fromUtf8( "webexport" ) );
- mSelectedPluginsItem = new KConfigSkeleton::ItemStringList( currentGroup(), TQString::fromLatin1( "SelectedPlugins" ), mSelectedPlugins, defaultSelectedPlugins );
+ mSelectedPluginsItem = new TDEConfigSkeleton::ItemStringList( currentGroup(), TQString::fromLatin1( "SelectedPlugins" ), mSelectedPlugins, defaultSelectedPlugins );
mSelectedPluginsItem->setLabel( i18n("SelectedPlugins") );
addItem( mSelectedPluginsItem, TQString::fromLatin1( "SelectedPlugins" ) );
setCurrentGroup( TQString::fromLatin1( "Colors" ) );
- mHighlightColorItem = new KConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "Highlight Color" ), mHighlightColor, TQColor( 100, 100, 255 ) );
+ mHighlightColorItem = new TDEConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "Highlight Color" ), mHighlightColor, TQColor( 100, 100, 255 ) );
mHighlightColorItem->setLabel( i18n("Highlight color") );
addItem( mHighlightColorItem, TQString::fromLatin1( "HighlightColor" ) );
- mAgendaBgColorItem = new KConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "Agenda Background Color" ), mAgendaBgColor, TQColor( 255, 255, 255 ) );
+ mAgendaBgColorItem = new TDEConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "Agenda Background Color" ), mAgendaBgColor, TQColor( 255, 255, 255 ) );
mAgendaBgColorItem->setLabel( i18n("Agenda view background color") );
addItem( mAgendaBgColorItem, TQString::fromLatin1( "AgendaBgColor" ) );
setCurrentGroup( TQString::fromLatin1( "Fonts" ) );
- mTimeBarFontItem = new KConfigSkeleton::ItemFont( currentGroup(), TQString::fromLatin1( "TimeBar Font" ), mTimeBarFont );
+ mTimeBarFontItem = new TDEConfigSkeleton::ItemFont( currentGroup(), TQString::fromLatin1( "TimeBar Font" ), mTimeBarFont );
mTimeBarFontItem->setLabel( i18n("Time bar") );
addItem( mTimeBarFontItem, TQString::fromLatin1( "TimeBarFont" ) );
}
diff --git a/tdecore/kconfig_compiler/tests/test2.h.ref b/tdecore/tdeconfig_compiler/tests/test2.h.ref
index 6c0a74d66..47895ccaf 100644
--- a/tdecore/kconfig_compiler/tests/test2.h.ref
+++ b/tdecore/tdeconfig_compiler/tests/test2.h.ref
@@ -1,11 +1,11 @@
-// This file is generated by kconfig_compiler from test2.kcfg.
+// This file is generated by tdeconfig_compiler from test2.kcfg.
// All changes you do to this file will be lost.
#ifndef TEST2_H
#define TEST2_H
#include <myprefs.h>
-#include <kconfigskeleton.h>
+#include <tdeconfigskeleton.h>
#include <kdebug.h>
class Test2 : public MyPrefs
diff --git a/tdecore/kconfig_compiler/tests/test2.kcfg b/tdecore/tdeconfig_compiler/tests/test2.kcfg
index 3b19e270e..3b19e270e 100644
--- a/tdecore/kconfig_compiler/tests/test2.kcfg
+++ b/tdecore/tdeconfig_compiler/tests/test2.kcfg
diff --git a/tdecore/kconfig_compiler/tests/test2.kcfgc b/tdecore/tdeconfig_compiler/tests/test2.kcfgc
index 56620d2f4..e29040686 100644
--- a/tdecore/kconfig_compiler/tests/test2.kcfgc
+++ b/tdecore/tdeconfig_compiler/tests/test2.kcfgc
@@ -1,4 +1,4 @@
-# Code generation options for kconfig_compiler
+# Code generation options for tdeconfig_compiler
File=test2.kcfg
ClassName=Test2
Singleton=false
diff --git a/tdecore/kconfig_compiler/tests/test2main.cpp b/tdecore/tdeconfig_compiler/tests/test2main.cpp
index 904c57270..5970bf03d 100644
--- a/tdecore/kconfig_compiler/tests/test2main.cpp
+++ b/tdecore/tdeconfig_compiler/tests/test2main.cpp
@@ -23,7 +23,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
int main( int, char*[] )
{
- KInstance i("test");
+ TDEInstance i("test");
Test2 *t = new Test2();
delete t;
}
diff --git a/tdecore/tdeconfig_compiler/tests/test3.cpp.ref b/tdecore/tdeconfig_compiler/tests/test3.cpp.ref
new file mode 100644
index 000000000..be3e5c6c1
--- /dev/null
+++ b/tdecore/tdeconfig_compiler/tests/test3.cpp.ref
@@ -0,0 +1,29 @@
+// This file is generated by tdeconfig_compiler from test3.kcfg.
+// All changes you do to this file will be lost.
+
+#include "test3.h"
+
+using namespace TestNameSpace;
+
+Test3::Test3( )
+ : TDEConfigSkeleton( TQString::fromLatin1( "test3rc" ) )
+{
+ setCurrentGroup( TQString::fromLatin1( "General" ) );
+
+ mAutoSaveItem = new TDEConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "Auto Save" ), mAutoSave, false );
+ addItem( mAutoSaveItem, TQString::fromLatin1( "AutoSave" ) );
+
+ setCurrentGroup( TQString::fromLatin1( "Blah" ) );
+
+ mBlubbItem = new TDEConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Blubb" ), mBlubb, 10 );
+ addItem( mBlubbItem, TQString::fromLatin1( "Blubb" ) );
+ mBlahBlahItem = new TDEConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "BlahBlah" ), mBlahBlah, TQString::fromLatin1( "a string" ) );
+ addItem( mBlahBlahItem, TQString::fromLatin1( "BlahBlah" ) );
+ mMyPasswordItem = new TDEConfigSkeleton::ItemPassword( currentGroup(), TQString::fromLatin1( "MyPassword" ), mMyPassword );
+ addItem( mMyPasswordItem, TQString::fromLatin1( "MyPassword" ) );
+}
+
+Test3::~Test3()
+{
+}
+
diff --git a/tdecore/kconfig_compiler/tests/test3.h.ref b/tdecore/tdeconfig_compiler/tests/test3.h.ref
index 75b1b0929..596e154e4 100644
--- a/tdecore/kconfig_compiler/tests/test3.h.ref
+++ b/tdecore/tdeconfig_compiler/tests/test3.h.ref
@@ -1,14 +1,14 @@
-// This file is generated by kconfig_compiler from test3.kcfg.
+// This file is generated by tdeconfig_compiler from test3.kcfg.
// All changes you do to this file will be lost.
#ifndef TESTNAMESPACE_TEST3_H
#define TESTNAMESPACE_TEST3_H
-#include <kconfigskeleton.h>
+#include <tdeconfigskeleton.h>
#include <kdebug.h>
namespace TestNameSpace {
-class Test3 : public KConfigSkeleton
+class Test3 : public TDEConfigSkeleton
{
public:
diff --git a/tdecore/kconfig_compiler/tests/test3.kcfg b/tdecore/tdeconfig_compiler/tests/test3.kcfg
index 77916da40..77916da40 100644
--- a/tdecore/kconfig_compiler/tests/test3.kcfg
+++ b/tdecore/tdeconfig_compiler/tests/test3.kcfg
diff --git a/tdecore/kconfig_compiler/tests/test3.kcfgc b/tdecore/tdeconfig_compiler/tests/test3.kcfgc
index ca2c22057..d699810d0 100644
--- a/tdecore/kconfig_compiler/tests/test3.kcfgc
+++ b/tdecore/tdeconfig_compiler/tests/test3.kcfgc
@@ -1,4 +1,4 @@
-# Code generation options for kconfig_compiler
+# Code generation options for tdeconfig_compiler
File=test3.kcfg
NameSpace=TestNameSpace
ClassName=Test3
diff --git a/tdecore/kconfig_compiler/tests/test3main.cpp b/tdecore/tdeconfig_compiler/tests/test3main.cpp
index 9789d697d..f73ae38e3 100644
--- a/tdecore/kconfig_compiler/tests/test3main.cpp
+++ b/tdecore/tdeconfig_compiler/tests/test3main.cpp
@@ -23,7 +23,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
int main( int, char*[] )
{
- KInstance i("test");
+ TDEInstance i("test");
TestNameSpace::Test3 *t = new TestNameSpace::Test3();
delete t;
}
diff --git a/tdecore/tdeconfig_compiler/tests/test4.cpp.ref b/tdecore/tdeconfig_compiler/tests/test4.cpp.ref
new file mode 100644
index 000000000..c68437969
--- /dev/null
+++ b/tdecore/tdeconfig_compiler/tests/test4.cpp.ref
@@ -0,0 +1,82 @@
+// This file is generated by tdeconfig_compiler from test4.kcfg.
+// All changes you do to this file will be lost.
+
+#include "test4.h"
+
+#include <kstaticdeleter.h>
+
+Test4 *Test4::mSelf = 0;
+static KStaticDeleter<Test4> staticTest4Deleter;
+
+Test4 *Test4::self()
+{
+ if ( !mSelf ) {
+ staticTest4Deleter.setObject( mSelf, new Test4() );
+ mSelf->readConfig();
+ }
+
+ return mSelf;
+}
+
+const char* const Test4::EnumButton::enumToString[] = { "right", "mid", "left" };
+
+Test4::Test4( )
+ : TDEConfigSkeleton( TQString::fromLatin1( "test4rc" ) )
+{
+ mSelf = this;
+ setCurrentGroup( TQString::fromLatin1( "Foo" ) );
+
+TQColor defaultColor[4] = { Qt::red, Qt::blue, Qt::green, Qt::black };
+ TDEConfigSkeleton::ItemColor *itemColor[4];
+ itemColor[0] = new TDEConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "color #0" ), mColor[0], defaultColor[0] );
+ addItem( itemColor[0], TQString::fromLatin1( "Color0" ) );
+ itemColor[1] = new TDEConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "color #1" ), mColor[1], defaultColor[1] );
+ addItem( itemColor[1], TQString::fromLatin1( "Color1" ) );
+ itemColor[2] = new TDEConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "color #2" ), mColor[2], defaultColor[2] );
+ addItem( itemColor[2], TQString::fromLatin1( "Color2" ) );
+ itemColor[3] = new TDEConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "color #3" ), mColor[3], defaultColor[3] );
+ addItem( itemColor[3], TQString::fromLatin1( "Color3" ) );
+ TQValueList<TDEConfigSkeleton::ItemEnum::Choice> valuesMouseAction;
+ {
+ TDEConfigSkeleton::ItemEnum::Choice choice;
+ choice.name = TQString::fromLatin1( "Encrypt" );
+ valuesMouseAction.append( choice );
+ }
+ {
+ TDEConfigSkeleton::ItemEnum::Choice choice;
+ choice.name = TQString::fromLatin1( "Decrypt" );
+ valuesMouseAction.append( choice );
+ }
+ {
+ TDEConfigSkeleton::ItemEnum::Choice choice;
+ choice.name = TQString::fromLatin1( "CrashNBurn" );
+ valuesMouseAction.append( choice );
+ }
+ {
+ TDEConfigSkeleton::ItemEnum::Choice choice;
+ choice.name = TQString::fromLatin1( "PumpNDump" );
+ valuesMouseAction.append( choice );
+ }
+ TDEConfigSkeleton::ItemEnum *itemMouseAction[3];
+ itemMouseAction[0] = new TDEConfigSkeleton::ItemEnum( currentGroup(), TQString::fromLatin1( "right_mouse_action" ), mMouseAction[0], valuesMouseAction, EnumMouseAction::Decrypt );
+ addItem( itemMouseAction[0], TQString::fromLatin1( "MouseActionright" ) );
+ itemMouseAction[1] = new TDEConfigSkeleton::ItemEnum( currentGroup(), TQString::fromLatin1( "mid_mouse_action" ), mMouseAction[1], valuesMouseAction, EnumMouseAction::Encrypt );
+ addItem( itemMouseAction[1], TQString::fromLatin1( "MouseActionmid" ) );
+ itemMouseAction[2] = new TDEConfigSkeleton::ItemEnum( currentGroup(), TQString::fromLatin1( "left_mouse_action" ), mMouseAction[2], valuesMouseAction, EnumMouseAction::PumpNDump );
+ addItem( itemMouseAction[2], TQString::fromLatin1( "MouseActionleft" ) );
+ TDEConfigSkeleton::ItemString *itemFooBar;
+ itemFooBar = new TDEConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "foo bar" ), mFooBar );
+ addItem( itemFooBar, TQString::fromLatin1( "FooBar" ) );
+ TDEConfigSkeleton::ItemInt *itemAge;
+ itemAge = new TDEConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Age" ), mAge, 35 );
+ itemAge->setMinValue(8);
+ itemAge->setMaxValue(88);
+ addItem( itemAge, TQString::fromLatin1( "Age" ) );
+}
+
+Test4::~Test4()
+{
+ if ( mSelf == this )
+ staticTest4Deleter.setObject( mSelf, 0, false );
+}
+
diff --git a/tdecore/kconfig_compiler/tests/test4.h.ref b/tdecore/tdeconfig_compiler/tests/test4.h.ref
index d11dd3aee..9901a4208 100644
--- a/tdecore/kconfig_compiler/tests/test4.h.ref
+++ b/tdecore/tdeconfig_compiler/tests/test4.h.ref
@@ -1,12 +1,12 @@
-// This file is generated by kconfig_compiler from test4.kcfg.
+// This file is generated by tdeconfig_compiler from test4.kcfg.
// All changes you do to this file will be lost.
#ifndef TEST4_H
#define TEST4_H
-#include <kconfigskeleton.h>
+#include <tdeconfigskeleton.h>
#include <kdebug.h>
-class Test4 : public KConfigSkeleton
+class Test4 : public TDEConfigSkeleton
{
public:
class EnumMouseAction
@@ -115,7 +115,7 @@ class Test4 : public KConfigSkeleton
static
void writeConfig()
{
- static_cast<KConfigSkeleton*>(self())->writeConfig();
+ static_cast<TDEConfigSkeleton*>(self())->writeConfig();
}
protected:
Test4();
diff --git a/tdecore/kconfig_compiler/tests/test4.kcfg b/tdecore/tdeconfig_compiler/tests/test4.kcfg
index d8ef2bfae..d8ef2bfae 100644
--- a/tdecore/kconfig_compiler/tests/test4.kcfg
+++ b/tdecore/tdeconfig_compiler/tests/test4.kcfg
diff --git a/tdecore/kconfig_compiler/tests/test4.kcfgc b/tdecore/tdeconfig_compiler/tests/test4.kcfgc
index 754706dff..a81655b6c 100644
--- a/tdecore/kconfig_compiler/tests/test4.kcfgc
+++ b/tdecore/tdeconfig_compiler/tests/test4.kcfgc
@@ -1,4 +1,4 @@
-# Code generation options for kconfig_compiler
+# Code generation options for tdeconfig_compiler
File=test4.kcfg
ClassName=Test4
Singleton=true
diff --git a/tdecore/kconfig_compiler/tests/test4main.cpp b/tdecore/tdeconfig_compiler/tests/test4main.cpp
index 8b38b3dbd..5229d8a87 100644
--- a/tdecore/kconfig_compiler/tests/test4main.cpp
+++ b/tdecore/tdeconfig_compiler/tests/test4main.cpp
@@ -24,7 +24,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
int main( int, char*[] )
{
- KInstance i("test");
+ TDEInstance i("test");
Test4 *t = Test4::self();
delete t;
}
diff --git a/tdecore/tdeconfig_compiler/tests/test5.cpp.ref b/tdecore/tdeconfig_compiler/tests/test5.cpp.ref
new file mode 100644
index 000000000..17965999b
--- /dev/null
+++ b/tdecore/tdeconfig_compiler/tests/test5.cpp.ref
@@ -0,0 +1,82 @@
+// This file is generated by tdeconfig_compiler from test5.kcfg.
+// All changes you do to this file will be lost.
+
+#include "test5.h"
+
+#include <kstaticdeleter.h>
+
+Test5 *Test5::mSelf = 0;
+static KStaticDeleter<Test5> staticTest5Deleter;
+
+Test5 *Test5::self()
+{
+ if ( !mSelf ) {
+ staticTest5Deleter.setObject( mSelf, new Test5() );
+ mSelf->readConfig();
+ }
+
+ return mSelf;
+}
+
+const char* const Test5::EnumButtonToString[] = { "right", "mid", "left" };
+
+Test5::Test5( )
+ : TDEConfigSkeleton( TQString::fromLatin1( "test4rc" ) )
+{
+ mSelf = this;
+ setCurrentGroup( TQString::fromLatin1( "Foo" ) );
+
+TQColor defaultColor[4] = { Qt::red, Qt::blue, Qt::green, Qt::black };
+ TDEConfigSkeleton::ItemColor *itemColor[4];
+ itemColor[0] = new TDEConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "color #0" ), mColor[0], defaultColor[0] );
+ addItem( itemColor[0], TQString::fromLatin1( "Color0" ) );
+ itemColor[1] = new TDEConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "color #1" ), mColor[1], defaultColor[1] );
+ addItem( itemColor[1], TQString::fromLatin1( "Color1" ) );
+ itemColor[2] = new TDEConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "color #2" ), mColor[2], defaultColor[2] );
+ addItem( itemColor[2], TQString::fromLatin1( "Color2" ) );
+ itemColor[3] = new TDEConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "color #3" ), mColor[3], defaultColor[3] );
+ addItem( itemColor[3], TQString::fromLatin1( "Color3" ) );
+ TQValueList<TDEConfigSkeleton::ItemEnum::Choice> valuesMouseAction;
+ {
+ TDEConfigSkeleton::ItemEnum::Choice choice;
+ choice.name = TQString::fromLatin1( "Encrypt" );
+ valuesMouseAction.append( choice );
+ }
+ {
+ TDEConfigSkeleton::ItemEnum::Choice choice;
+ choice.name = TQString::fromLatin1( "Decrypt" );
+ valuesMouseAction.append( choice );
+ }
+ {
+ TDEConfigSkeleton::ItemEnum::Choice choice;
+ choice.name = TQString::fromLatin1( "CrashNBurn" );
+ valuesMouseAction.append( choice );
+ }
+ {
+ TDEConfigSkeleton::ItemEnum::Choice choice;
+ choice.name = TQString::fromLatin1( "PumpNDump" );
+ valuesMouseAction.append( choice );
+ }
+ TDEConfigSkeleton::ItemEnum *itemMouseAction[3];
+ itemMouseAction[0] = new TDEConfigSkeleton::ItemEnum( currentGroup(), TQString::fromLatin1( "right_mouse_action" ), mMouseAction[0], valuesMouseAction, Decrypt );
+ addItem( itemMouseAction[0], TQString::fromLatin1( "MouseActionright" ) );
+ itemMouseAction[1] = new TDEConfigSkeleton::ItemEnum( currentGroup(), TQString::fromLatin1( "mid_mouse_action" ), mMouseAction[1], valuesMouseAction, Encrypt );
+ addItem( itemMouseAction[1], TQString::fromLatin1( "MouseActionmid" ) );
+ itemMouseAction[2] = new TDEConfigSkeleton::ItemEnum( currentGroup(), TQString::fromLatin1( "left_mouse_action" ), mMouseAction[2], valuesMouseAction, PumpNDump );
+ addItem( itemMouseAction[2], TQString::fromLatin1( "MouseActionleft" ) );
+ TDEConfigSkeleton::ItemString *itemFooBar;
+ itemFooBar = new TDEConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "foo bar" ), mFooBar );
+ addItem( itemFooBar, TQString::fromLatin1( "FooBar" ) );
+ TDEConfigSkeleton::ItemInt *itemAge;
+ itemAge = new TDEConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Age" ), mAge, 35 );
+ itemAge->setMinValue(8);
+ itemAge->setMaxValue(88);
+ addItem( itemAge, TQString::fromLatin1( "Age" ) );
+}
+
+Test5::~Test5()
+{
+ if ( mSelf == this )
+ staticTest5Deleter.setObject( mSelf, 0, false );
+}
+
diff --git a/tdecore/kconfig_compiler/tests/test5.h.ref b/tdecore/tdeconfig_compiler/tests/test5.h.ref
index efb9b448a..e2f1f8118 100644
--- a/tdecore/kconfig_compiler/tests/test5.h.ref
+++ b/tdecore/tdeconfig_compiler/tests/test5.h.ref
@@ -1,12 +1,12 @@
-// This file is generated by kconfig_compiler from test5.kcfg.
+// This file is generated by tdeconfig_compiler from test5.kcfg.
// All changes you do to this file will be lost.
#ifndef TEST5_H
#define TEST5_H
-#include <kconfigskeleton.h>
+#include <tdeconfigskeleton.h>
#include <kdebug.h>
-class Test5 : public KConfigSkeleton
+class Test5 : public TDEConfigSkeleton
{
public:
enum { Encrypt, Decrypt, CrashNBurn, PumpNDump };
@@ -107,7 +107,7 @@ class Test5 : public KConfigSkeleton
static
void writeConfig()
{
- static_cast<KConfigSkeleton*>(self())->writeConfig();
+ static_cast<TDEConfigSkeleton*>(self())->writeConfig();
}
protected:
Test5();
diff --git a/tdecore/kconfig_compiler/tests/test5.kcfg b/tdecore/tdeconfig_compiler/tests/test5.kcfg
index d8ef2bfae..d8ef2bfae 100644
--- a/tdecore/kconfig_compiler/tests/test5.kcfg
+++ b/tdecore/tdeconfig_compiler/tests/test5.kcfg
diff --git a/tdecore/kconfig_compiler/tests/test5.kcfgc b/tdecore/tdeconfig_compiler/tests/test5.kcfgc
index 663005e5e..dbc5603a0 100644
--- a/tdecore/kconfig_compiler/tests/test5.kcfgc
+++ b/tdecore/tdeconfig_compiler/tests/test5.kcfgc
@@ -1,4 +1,4 @@
-# Code generation options for kconfig_compiler
+# Code generation options for tdeconfig_compiler
File=test5.kcfg
ClassName=Test5
Singleton=true
diff --git a/tdecore/kconfig_compiler/tests/test5main.cpp b/tdecore/tdeconfig_compiler/tests/test5main.cpp
index 57ad5189d..89f28587f 100644
--- a/tdecore/kconfig_compiler/tests/test5main.cpp
+++ b/tdecore/tdeconfig_compiler/tests/test5main.cpp
@@ -24,7 +24,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
int main( int, char*[] )
{
- KInstance i("test");
+ TDEInstance i("test");
Test5 *t = Test5::self();
delete t;
}
diff --git a/tdecore/tdeconfig_compiler/tests/test6.cpp.ref b/tdecore/tdeconfig_compiler/tests/test6.cpp.ref
new file mode 100644
index 000000000..36717a7c8
--- /dev/null
+++ b/tdecore/tdeconfig_compiler/tests/test6.cpp.ref
@@ -0,0 +1,31 @@
+// This file is generated by tdeconfig_compiler from test6.kcfg.
+// All changes you do to this file will be lost.
+
+#include "test6.h"
+
+Test6::Test6( const TQString & Number )
+ : TDEConfigSkeleton( TQString::fromLatin1( "test4rc" ) )
+ , mParamNumber(Number)
+{
+ setCurrentGroup( TQString::fromLatin1( "Foo" ) );
+
+ TDEConfigSkeleton::ItemColor *itemColor;
+ itemColor = new TDEConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "color #%1" ).arg( mParamNumber ), mColor, TQColor( "red" ) );
+ addItem( itemColor, TQString::fromLatin1( "Color" ) );
+
+ setCurrentGroup( TQString::fromLatin1( "Bar%1" ).arg( mParamNumber ) );
+
+ TDEConfigSkeleton::ItemString *itemFooBar;
+ itemFooBar = new TDEConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "foo bar" ), mFooBar );
+ addItem( itemFooBar, TQString::fromLatin1( "FooBar" ) );
+ TDEConfigSkeleton::ItemInt *itemAge;
+ itemAge = new TDEConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Age" ), mAge, 35 );
+ itemAge->setMinValue(8);
+ itemAge->setMaxValue(88);
+ addItem( itemAge, TQString::fromLatin1( "Age" ) );
+}
+
+Test6::~Test6()
+{
+}
+
diff --git a/tdecore/kconfig_compiler/tests/test6.h.ref b/tdecore/tdeconfig_compiler/tests/test6.h.ref
index 6743d6064..da83c90c4 100644
--- a/tdecore/kconfig_compiler/tests/test6.h.ref
+++ b/tdecore/tdeconfig_compiler/tests/test6.h.ref
@@ -1,12 +1,12 @@
-// This file is generated by kconfig_compiler from test6.kcfg.
+// This file is generated by tdeconfig_compiler from test6.kcfg.
// All changes you do to this file will be lost.
#ifndef TEST6_H
#define TEST6_H
-#include <kconfigskeleton.h>
+#include <tdeconfigskeleton.h>
#include <kdebug.h>
-class Test6 : public KConfigSkeleton
+class Test6 : public TDEConfigSkeleton
{
public:
diff --git a/tdecore/kconfig_compiler/tests/test6.kcfg b/tdecore/tdeconfig_compiler/tests/test6.kcfg
index e59fa88f3..e59fa88f3 100644
--- a/tdecore/kconfig_compiler/tests/test6.kcfg
+++ b/tdecore/tdeconfig_compiler/tests/test6.kcfg
diff --git a/tdecore/kconfig_compiler/tests/test6.kcfgc b/tdecore/tdeconfig_compiler/tests/test6.kcfgc
index b69dc152d..4c395ac08 100644
--- a/tdecore/kconfig_compiler/tests/test6.kcfgc
+++ b/tdecore/tdeconfig_compiler/tests/test6.kcfgc
@@ -1,4 +1,4 @@
-# Code generation options for kconfig_compiler
+# Code generation options for tdeconfig_compiler
File=test6.kcfg
ClassName=Test6
Singleton=false
diff --git a/tdecore/kconfig_compiler/tests/test6main.cpp b/tdecore/tdeconfig_compiler/tests/test6main.cpp
index 27dff57ff..9b1b7503e 100644
--- a/tdecore/kconfig_compiler/tests/test6main.cpp
+++ b/tdecore/tdeconfig_compiler/tests/test6main.cpp
@@ -24,7 +24,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
int main( int, char*[] )
{
- KInstance i("test");
+ TDEInstance i("test");
Test6 *t = new Test6(TQString::null);
delete t;
}
diff --git a/tdecore/tdeconfig_compiler/tests/test7.cpp.ref b/tdecore/tdeconfig_compiler/tests/test7.cpp.ref
new file mode 100644
index 000000000..e4b5f08f9
--- /dev/null
+++ b/tdecore/tdeconfig_compiler/tests/test7.cpp.ref
@@ -0,0 +1,31 @@
+// This file is generated by tdeconfig_compiler from test7.kcfg.
+// All changes you do to this file will be lost.
+
+#include "test7.h"
+
+Test7::Test7( int Number )
+ : TDEConfigSkeleton( TQString::fromLatin1( "test7rc" ) )
+ , mParamNumber(Number)
+{
+ setCurrentGroup( TQString::fromLatin1( "Foo" ) );
+
+ TDEConfigSkeleton::ItemColor *itemColor;
+ itemColor = new TDEConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "color #%1" ).arg( mParamNumber ), mColor, TQColor( "red" ) );
+ addItem( itemColor, TQString::fromLatin1( "Color" ) );
+
+ setCurrentGroup( TQString::fromLatin1( "Bar%1" ).arg( mParamNumber ) );
+
+ TDEConfigSkeleton::ItemString *itemFooBar;
+ itemFooBar = new TDEConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "foo bar" ), mFooBar );
+ addItem( itemFooBar, TQString::fromLatin1( "FooBar" ) );
+ TDEConfigSkeleton::ItemInt *itemAge;
+ itemAge = new TDEConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Age" ), mAge, 35 );
+ itemAge->setMinValue(8);
+ itemAge->setMaxValue(88);
+ addItem( itemAge, TQString::fromLatin1( "Age" ) );
+}
+
+Test7::~Test7()
+{
+}
+
diff --git a/tdecore/kconfig_compiler/tests/test7.h.ref b/tdecore/tdeconfig_compiler/tests/test7.h.ref
index 8f8808da1..8bd22ae97 100644
--- a/tdecore/kconfig_compiler/tests/test7.h.ref
+++ b/tdecore/tdeconfig_compiler/tests/test7.h.ref
@@ -1,12 +1,12 @@
-// This file is generated by kconfig_compiler from test7.kcfg.
+// This file is generated by tdeconfig_compiler from test7.kcfg.
// All changes you do to this file will be lost.
#ifndef TEST7_H
#define TEST7_H
-#include <kconfigskeleton.h>
+#include <tdeconfigskeleton.h>
#include <kdebug.h>
-class Test7 : public KConfigSkeleton
+class Test7 : public TDEConfigSkeleton
{
public:
diff --git a/tdecore/kconfig_compiler/tests/test7.kcfg b/tdecore/tdeconfig_compiler/tests/test7.kcfg
index 0a7fd3272..0a7fd3272 100644
--- a/tdecore/kconfig_compiler/tests/test7.kcfg
+++ b/tdecore/tdeconfig_compiler/tests/test7.kcfg
diff --git a/tdecore/kconfig_compiler/tests/test7.kcfgc b/tdecore/tdeconfig_compiler/tests/test7.kcfgc
index 9a6c40954..c50aac7e3 100644
--- a/tdecore/kconfig_compiler/tests/test7.kcfgc
+++ b/tdecore/tdeconfig_compiler/tests/test7.kcfgc
@@ -1,4 +1,4 @@
-# Code generation options for kconfig_compiler
+# Code generation options for tdeconfig_compiler
File=test7.kcfg
ClassName=Test7
Singleton=false
diff --git a/tdecore/kconfig_compiler/tests/test7main.cpp b/tdecore/tdeconfig_compiler/tests/test7main.cpp
index 9c1ad1931..81cca0184 100644
--- a/tdecore/kconfig_compiler/tests/test7main.cpp
+++ b/tdecore/tdeconfig_compiler/tests/test7main.cpp
@@ -24,7 +24,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
int main( int, char*[] )
{
- KInstance i("test");
+ TDEInstance i("test");
Test7 *t = new Test7(42);
delete t;
}
diff --git a/tdecore/tdeconfig_compiler/tests/test8a.cpp.ref b/tdecore/tdeconfig_compiler/tests/test8a.cpp.ref
new file mode 100644
index 000000000..6181295eb
--- /dev/null
+++ b/tdecore/tdeconfig_compiler/tests/test8a.cpp.ref
@@ -0,0 +1,22 @@
+// This file is generated by tdeconfig_compiler from test8a.kcfg.
+// All changes you do to this file will be lost.
+
+#include "test8a.h"
+
+Test8a::Test8a( TDESharedConfig::Ptr config )
+ : TDEConfigSkeleton( config )
+{
+ setCurrentGroup( TQString::fromLatin1( "Group" ) );
+
+ TDEConfigSkeleton::ItemFont *itemFont;
+ itemFont = new TDEConfigSkeleton::ItemFont( currentGroup(), TQString::fromLatin1( "Font" ), mFont, TDEGlobalSettings::generalFont() );
+ addItem( itemFont, TQString::fromLatin1( "Font" ) );
+ TDEConfigSkeleton::ItemFont *itemTitleFont;
+ itemTitleFont = new TDEConfigSkeleton::ItemFont( currentGroup(), TQString::fromLatin1( "TitleFont" ), mTitleFont, TDEGlobalSettings::windowTitleFont() );
+ addItem( itemTitleFont, TQString::fromLatin1( "TitleFont" ) );
+}
+
+Test8a::~Test8a()
+{
+}
+
diff --git a/tdecore/kconfig_compiler/tests/test8a.h.ref b/tdecore/tdeconfig_compiler/tests/test8a.h.ref
index 2e947c437..a1e5b7e37 100644
--- a/tdecore/kconfig_compiler/tests/test8a.h.ref
+++ b/tdecore/tdeconfig_compiler/tests/test8a.h.ref
@@ -1,17 +1,17 @@
-// This file is generated by kconfig_compiler from test8a.kcfg.
+// This file is generated by tdeconfig_compiler from test8a.kcfg.
// All changes you do to this file will be lost.
#ifndef TEST8A_H
#define TEST8A_H
-#include <kglobal.h>
-#include <kconfigskeleton.h>
+#include <tdeglobal.h>
+#include <tdeconfigskeleton.h>
#include <kdebug.h>
-class Test8a : public KConfigSkeleton
+class Test8a : public TDEConfigSkeleton
{
public:
- Test8a( KSharedConfig::Ptr config = KGlobal::sharedConfig() );
+ Test8a( TDESharedConfig::Ptr config = TDEGlobal::sharedConfig() );
~Test8a();
/**
diff --git a/tdecore/kconfig_compiler/tests/test8a.kcfg b/tdecore/tdeconfig_compiler/tests/test8a.kcfg
index 5ee87199f..53448b624 100644
--- a/tdecore/kconfig_compiler/tests/test8a.kcfg
+++ b/tdecore/tdeconfig_compiler/tests/test8a.kcfg
@@ -7,11 +7,11 @@
<group name="Group">
<entry name="Font" type="Font">
- <default code="true">KGlobalSettings::generalFont()</default>
+ <default code="true">TDEGlobalSettings::generalFont()</default>
</entry>
<entry name="TitleFont" type="Font">
- <default code="true">KGlobalSettings::windowTitleFont()</default>
+ <default code="true">TDEGlobalSettings::windowTitleFont()</default>
</entry>
</group>
</kcfg>
diff --git a/tdecore/kconfig_compiler/tests/test8a.kcfgc b/tdecore/tdeconfig_compiler/tests/test8a.kcfgc
index 5f63c31c2..5f63c31c2 100644
--- a/tdecore/kconfig_compiler/tests/test8a.kcfgc
+++ b/tdecore/tdeconfig_compiler/tests/test8a.kcfgc
diff --git a/tdecore/kconfig_compiler/tests/test8b.cpp.ref b/tdecore/tdeconfig_compiler/tests/test8b.cpp.ref
index e29e3c4e7..288faeb12 100644
--- a/tdecore/kconfig_compiler/tests/test8b.cpp.ref
+++ b/tdecore/tdeconfig_compiler/tests/test8b.cpp.ref
@@ -1,4 +1,4 @@
-// This file is generated by kconfig_compiler from test8b.kcfg.
+// This file is generated by tdeconfig_compiler from test8b.kcfg.
// All changes you do to this file will be lost.
#include "test8b.h"
@@ -24,17 +24,17 @@ Test8b::Test8b( )
mSelf = this;
setCurrentGroup( TQString::fromLatin1( "Group8b1" ) );
- KConfigSkeleton::ItemUInt *itemSomething;
- itemSomething = new KConfigSkeleton::ItemUInt( currentGroup(), TQString::fromLatin1( "Something" ), mSomething, 60 );
+ TDEConfigSkeleton::ItemUInt *itemSomething;
+ itemSomething = new TDEConfigSkeleton::ItemUInt( currentGroup(), TQString::fromLatin1( "Something" ), mSomething, 60 );
addItem( itemSomething, TQString::fromLatin1( "Something" ) );
setCurrentGroup( TQString::fromLatin1( "Group8b2" ) );
- KConfigSkeleton::ItemBool *itemFooBoo;
- itemFooBoo = new KConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "FooBoo" ), mFooBoo, false );
+ TDEConfigSkeleton::ItemBool *itemFooBoo;
+ itemFooBoo = new TDEConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "FooBoo" ), mFooBoo, false );
addItem( itemFooBoo, TQString::fromLatin1( "FooBoo" ) );
- KConfigSkeleton::ItemUInt *itemPort;
- itemPort = new KConfigSkeleton::ItemUInt( currentGroup(), TQString::fromLatin1( "Port" ), mPort, 1000 );
+ TDEConfigSkeleton::ItemUInt *itemPort;
+ itemPort = new TDEConfigSkeleton::ItemUInt( currentGroup(), TQString::fromLatin1( "Port" ), mPort, 1000 );
addItem( itemPort, TQString::fromLatin1( "Port" ) );
}
diff --git a/tdecore/kconfig_compiler/tests/test8b.h.ref b/tdecore/tdeconfig_compiler/tests/test8b.h.ref
index 4ca0d5c7f..82ab5d92b 100644
--- a/tdecore/kconfig_compiler/tests/test8b.h.ref
+++ b/tdecore/tdeconfig_compiler/tests/test8b.h.ref
@@ -1,11 +1,11 @@
-// This file is generated by kconfig_compiler from test8b.kcfg.
+// This file is generated by tdeconfig_compiler from test8b.kcfg.
// All changes you do to this file will be lost.
#ifndef TEST8B_H
#define TEST8B_H
#include <test8a.h>
-#include <kconfigskeleton.h>
+#include <tdeconfigskeleton.h>
#include <kdebug.h>
class Test8b : public Test8a
@@ -75,7 +75,7 @@ class Test8b : public Test8a
static
void writeConfig()
{
- static_cast<KConfigSkeleton*>(self())->writeConfig();
+ static_cast<TDEConfigSkeleton*>(self())->writeConfig();
}
protected:
Test8b();
diff --git a/tdecore/kconfig_compiler/tests/test8b.kcfg b/tdecore/tdeconfig_compiler/tests/test8b.kcfg
index 3e203a155..3e203a155 100644
--- a/tdecore/kconfig_compiler/tests/test8b.kcfg
+++ b/tdecore/tdeconfig_compiler/tests/test8b.kcfg
diff --git a/tdecore/kconfig_compiler/tests/test8b.kcfgc b/tdecore/tdeconfig_compiler/tests/test8b.kcfgc
index 7be055203..7be055203 100644
--- a/tdecore/kconfig_compiler/tests/test8b.kcfgc
+++ b/tdecore/tdeconfig_compiler/tests/test8b.kcfgc
diff --git a/tdecore/kconfig_compiler/tests/test8main.cpp b/tdecore/tdeconfig_compiler/tests/test8main.cpp
index b3c242f68..2611a48af 100644
--- a/tdecore/kconfig_compiler/tests/test8main.cpp
+++ b/tdecore/tdeconfig_compiler/tests/test8main.cpp
@@ -25,8 +25,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
int main( int, char*[] )
{
- KInstance i("test");
- Test8a *config1 = new Test8a( KSharedConfig::openConfig( TQString::null ) );
+ TDEInstance i("test");
+ Test8a *config1 = new Test8a( TDESharedConfig::openConfig( TQString::null ) );
Test8a *config2 = new Test8a();
Test8b::self();
delete config1;
diff --git a/tdecore/kconfig_compiler/tests/test9.cpp.ref b/tdecore/tdeconfig_compiler/tests/test9.cpp.ref
index c5d57e4d1..a5ee144aa 100644
--- a/tdecore/kconfig_compiler/tests/test9.cpp.ref
+++ b/tdecore/tdeconfig_compiler/tests/test9.cpp.ref
@@ -1,10 +1,10 @@
-// This file is generated by kconfig_compiler from test9.kcfg.
+// This file is generated by tdeconfig_compiler from test9.kcfg.
// All changes you do to this file will be lost.
#include "test9.h"
Test9::Test9( const TQString & transport, const TQString & folder )
- : KConfigSkeleton( TQString::fromLatin1( "examplerc" ) )
+ : TDEConfigSkeleton( TQString::fromLatin1( "examplerc" ) )
, mParamtransport(transport)
, mParamfolder(folder)
{
@@ -14,18 +14,18 @@ Test9::Test9( const TQString & transport, const TQString & folder )
defaultMyStringList.append( TQString::fromUtf8( "up" ) );
defaultMyStringList.append( TQString::fromUtf8( "down" ) );
- KConfigSkeleton::ItemStringList *itemMyStringList;
- itemMyStringList = new KConfigSkeleton::ItemStringList( currentGroup(), TQString::fromLatin1( "MyStringList" ), mMyStringList, defaultMyStringList );
+ TDEConfigSkeleton::ItemStringList *itemMyStringList;
+ itemMyStringList = new TDEConfigSkeleton::ItemStringList( currentGroup(), TQString::fromLatin1( "MyStringList" ), mMyStringList, defaultMyStringList );
addItem( itemMyStringList, TQString::fromLatin1( "MyStringList" ) );
TQStringList defaultMyPathList;
defaultMyPathList.append( TQString::fromUtf8( "/home" ) );
defaultMyPathList.append( TQString::fromUtf8( "~" ) );
- KConfigSkeleton::ItemPathList *itemMyPathList;
- itemMyPathList = new KConfigSkeleton::ItemPathList( currentGroup(), TQString::fromLatin1( "MyPathList" ), mMyPathList, defaultMyPathList );
+ TDEConfigSkeleton::ItemPathList *itemMyPathList;
+ itemMyPathList = new TDEConfigSkeleton::ItemPathList( currentGroup(), TQString::fromLatin1( "MyPathList" ), mMyPathList, defaultMyPathList );
addItem( itemMyPathList, TQString::fromLatin1( "MyPathList" ) );
- KConfigSkeleton::ItemPathList *itemMyPathsList2;
- itemMyPathsList2 = new KConfigSkeleton::ItemPathList( currentGroup(), TQString::fromLatin1( "MyPathsList2" ), mMyPathsList2, TQStringList(TQString::fromLatin1("/usr/bin")) += TQDir::homeDirPath() );
+ TDEConfigSkeleton::ItemPathList *itemMyPathsList2;
+ itemMyPathsList2 = new TDEConfigSkeleton::ItemPathList( currentGroup(), TQString::fromLatin1( "MyPathsList2" ), mMyPathsList2, TQStringList(TQString::fromLatin1("/usr/bin")) += TQDir::homeDirPath() );
addItem( itemMyPathsList2, TQString::fromLatin1( "MyPathsList2" ) );
}
diff --git a/tdecore/kconfig_compiler/tests/test9.h.ref b/tdecore/tdeconfig_compiler/tests/test9.h.ref
index 66a629b48..23755f411 100644
--- a/tdecore/kconfig_compiler/tests/test9.h.ref
+++ b/tdecore/tdeconfig_compiler/tests/test9.h.ref
@@ -1,13 +1,13 @@
-// This file is generated by kconfig_compiler from test9.kcfg.
+// This file is generated by tdeconfig_compiler from test9.kcfg.
// All changes you do to this file will be lost.
#ifndef TEST9_H
#define TEST9_H
-#include <kconfigskeleton.h>
+#include <tdeconfigskeleton.h>
#include <kdebug.h>
#include <tqdir.h>
-class Test9 : public KConfigSkeleton
+class Test9 : public TDEConfigSkeleton
{
public:
diff --git a/tdecore/kconfig_compiler/tests/test9.kcfg b/tdecore/tdeconfig_compiler/tests/test9.kcfg
index b7495e2b6..b7495e2b6 100644
--- a/tdecore/kconfig_compiler/tests/test9.kcfg
+++ b/tdecore/tdeconfig_compiler/tests/test9.kcfg
diff --git a/tdecore/kconfig_compiler/tests/test9.kcfgc b/tdecore/tdeconfig_compiler/tests/test9.kcfgc
index 8f124fc25..47f5e5f43 100644
--- a/tdecore/kconfig_compiler/tests/test9.kcfgc
+++ b/tdecore/tdeconfig_compiler/tests/test9.kcfgc
@@ -1,9 +1,9 @@
-# Code generation options for kconfig_compiler
+# Code generation options for tdeconfig_compiler
ClassName=Test9
#
# Singleton=false
#
-# Inherits=KConfigSkeleton
+# Inherits=TDEConfigSkeleton
#
# IncludeFiles=libtdepim/kpimprefs.h
#
diff --git a/tdecore/kconfig_compiler/tests/test9main.cpp b/tdecore/tdeconfig_compiler/tests/test9main.cpp
index 39b904af9..8668d8d8c 100644
--- a/tdecore/kconfig_compiler/tests/test9main.cpp
+++ b/tdecore/tdeconfig_compiler/tests/test9main.cpp
@@ -25,7 +25,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
int main( int, char*[] )
{
- KInstance i("test");
+ TDEInstance i("test");
Test9 *t = new Test9( TQString::null, TQString::null );
TQStringList myPathsList2 = t->myPathsList2();
diff --git a/tdecore/kconfig_compiler/tests/test_dpointer.cpp.ref b/tdecore/tdeconfig_compiler/tests/test_dpointer.cpp.ref
index 7b5f55f03..b3fde4334 100644
--- a/tdecore/kconfig_compiler/tests/test_dpointer.cpp.ref
+++ b/tdecore/tdeconfig_compiler/tests/test_dpointer.cpp.ref
@@ -1,9 +1,9 @@
-// This file is generated by kconfig_compiler from test_dpointer.kcfg.
+// This file is generated by tdeconfig_compiler from test_dpointer.kcfg.
// All changes you do to this file will be lost.
#include "test_dpointer.h"
-#include <klocale.h>
+#include <tdelocale.h>
#include <kstaticdeleter.h>
@@ -33,17 +33,17 @@ class TestDPointerPrivate
TQFont timeBarFont;
// items
- KConfigSkeleton::ItemBool *autoSaveItem;
- KConfigSkeleton::ItemInt *autoSaveIntervalItem;
- KConfigSkeleton::ItemBool *confirmItem;
- KConfigSkeleton::ItemString *archiveFileItem;
- KConfigSkeleton::ItemEnum *destinationItem;
- KConfigSkeleton::ItemInt *hourSizeItem;
- KConfigSkeleton::ItemBool *selectionStartsEditorItem;
- KConfigSkeleton::ItemStringList *selectedPluginsItem;
- KConfigSkeleton::ItemColor *highlightColorItem;
- KConfigSkeleton::ItemColor *agendaBgColorItem;
- KConfigSkeleton::ItemFont *timeBarFontItem;
+ TDEConfigSkeleton::ItemBool *autoSaveItem;
+ TDEConfigSkeleton::ItemInt *autoSaveIntervalItem;
+ TDEConfigSkeleton::ItemBool *confirmItem;
+ TDEConfigSkeleton::ItemString *archiveFileItem;
+ TDEConfigSkeleton::ItemEnum *destinationItem;
+ TDEConfigSkeleton::ItemInt *hourSizeItem;
+ TDEConfigSkeleton::ItemBool *selectionStartsEditorItem;
+ TDEConfigSkeleton::ItemStringList *selectedPluginsItem;
+ TDEConfigSkeleton::ItemColor *highlightColorItem;
+ TDEConfigSkeleton::ItemColor *agendaBgColorItem;
+ TDEConfigSkeleton::ItemFont *timeBarFontItem;
};
TestDPointer *TestDPointer::mSelf = 0;
@@ -60,65 +60,65 @@ TestDPointer *TestDPointer::self()
}
TestDPointer::TestDPointer( )
- : KConfigSkeleton( TQString::fromLatin1( "korganizerrc" ) )
+ : TDEConfigSkeleton( TQString::fromLatin1( "korganizerrc" ) )
{
d = new TestDPointerPrivate;
mSelf = this;
setCurrentGroup( TQString::fromLatin1( "General" ) );
- d->autoSaveItem = new KConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "Auto Save" ), d->autoSave, false );
+ d->autoSaveItem = new TDEConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "Auto Save" ), d->autoSave, false );
d->autoSaveItem->setLabel( i18n("Enable automatic saving of calendar") );
d->autoSaveItem->setWhatsThis( i18n("WhatsThis text for AutoSave option") );
addItem( d->autoSaveItem, TQString::fromLatin1( "AutoSave" ) );
- d->autoSaveIntervalItem = new KConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Auto Save Interval" ), d->autoSaveInterval, 10 );
+ d->autoSaveIntervalItem = new TDEConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Auto Save Interval" ), d->autoSaveInterval, 10 );
d->autoSaveIntervalItem->setLabel( i18n("Auto Save Interval") );
addItem( d->autoSaveIntervalItem, TQString::fromLatin1( "AutoSaveInterval" ) );
- d->confirmItem = new KConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "Confirm Deletes" ), d->confirm, true );
+ d->confirmItem = new TDEConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "Confirm Deletes" ), d->confirm, true );
d->confirmItem->setLabel( i18n("Confirm deletes") );
addItem( d->confirmItem, TQString::fromLatin1( "Confirm" ) );
- d->archiveFileItem = new KConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "Archive File" ), d->archiveFile );
+ d->archiveFileItem = new TDEConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "Archive File" ), d->archiveFile );
d->archiveFileItem->setLabel( i18n("Archive File") );
addItem( d->archiveFileItem, TQString::fromLatin1( "ArchiveFile" ) );
- TQValueList<KConfigSkeleton::ItemEnum::Choice> valuesDestination;
+ TQValueList<TDEConfigSkeleton::ItemEnum::Choice> valuesDestination;
{
- KConfigSkeleton::ItemEnum::Choice choice;
+ TDEConfigSkeleton::ItemEnum::Choice choice;
choice.name = TQString::fromLatin1( "standardDestination" );
valuesDestination.append( choice );
}
{
- KConfigSkeleton::ItemEnum::Choice choice;
+ TDEConfigSkeleton::ItemEnum::Choice choice;
choice.name = TQString::fromLatin1( "askDestination" );
valuesDestination.append( choice );
}
{
- KConfigSkeleton::ItemEnum::Choice choice;
+ TDEConfigSkeleton::ItemEnum::Choice choice;
choice.name = TQString::fromLatin1( "argl1" );
choice.label = i18n("Argl1 Label");
valuesDestination.append( choice );
}
{
- KConfigSkeleton::ItemEnum::Choice choice;
+ TDEConfigSkeleton::ItemEnum::Choice choice;
choice.name = TQString::fromLatin1( "argl2" );
choice.whatsThis = i18n("Argl2 Whatsthis");
valuesDestination.append( choice );
}
{
- KConfigSkeleton::ItemEnum::Choice choice;
+ TDEConfigSkeleton::ItemEnum::Choice choice;
choice.name = TQString::fromLatin1( "argl3" );
choice.label = i18n("Argl3 Label");
choice.whatsThis = i18n("Argl3 Whatsthis");
valuesDestination.append( choice );
}
- d->destinationItem = new KConfigSkeleton::ItemEnum( currentGroup(), TQString::fromLatin1( "Destination" ), d->destination, valuesDestination, EnumDestination::standardDestination );
+ d->destinationItem = new TDEConfigSkeleton::ItemEnum( currentGroup(), TQString::fromLatin1( "Destination" ), d->destination, valuesDestination, EnumDestination::standardDestination );
d->destinationItem->setLabel( i18n("New Events/Todos Should") );
addItem( d->destinationItem, TQString::fromLatin1( "Destination" ) );
setCurrentGroup( TQString::fromLatin1( "Views" ) );
- d->hourSizeItem = new KConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Hour Size" ), d->hourSize, 10 );
+ d->hourSizeItem = new TDEConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Hour Size" ), d->hourSize, 10 );
d->hourSizeItem->setLabel( i18n("Hour Size") );
addItem( d->hourSizeItem, TQString::fromLatin1( "HourSize" ) );
- d->selectionStartsEditorItem = new KConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "SelectionStartsEditor" ), d->selectionStartsEditor, false );
+ d->selectionStartsEditorItem = new TDEConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "SelectionStartsEditor" ), d->selectionStartsEditor, false );
d->selectionStartsEditorItem->setLabel( i18n("Time range selection in agenda view starts event editor") );
addItem( d->selectionStartsEditorItem, TQString::fromLatin1( "SelectionStartsEditor" ) );
@@ -128,22 +128,22 @@ TestDPointer::TestDPointer( )
defaultSelectedPlugins.append( TQString::fromUtf8( "holidays" ) );
defaultSelectedPlugins.append( TQString::fromUtf8( "webexport" ) );
- d->selectedPluginsItem = new KConfigSkeleton::ItemStringList( currentGroup(), TQString::fromLatin1( "SelectedPlugins" ), d->selectedPlugins, defaultSelectedPlugins );
+ d->selectedPluginsItem = new TDEConfigSkeleton::ItemStringList( currentGroup(), TQString::fromLatin1( "SelectedPlugins" ), d->selectedPlugins, defaultSelectedPlugins );
d->selectedPluginsItem->setLabel( i18n("SelectedPlugins") );
addItem( d->selectedPluginsItem, TQString::fromLatin1( "SelectedPlugins" ) );
setCurrentGroup( TQString::fromLatin1( "Colors" ) );
- d->highlightColorItem = new KConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "Highlight Color" ), d->highlightColor, TQColor( 100, 100, 255 ) );
+ d->highlightColorItem = new TDEConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "Highlight Color" ), d->highlightColor, TQColor( 100, 100, 255 ) );
d->highlightColorItem->setLabel( i18n("Highlight color") );
addItem( d->highlightColorItem, TQString::fromLatin1( "HighlightColor" ) );
- d->agendaBgColorItem = new KConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "Agenda Background Color" ), d->agendaBgColor, TQColor( 255, 255, 255 ) );
+ d->agendaBgColorItem = new TDEConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "Agenda Background Color" ), d->agendaBgColor, TQColor( 255, 255, 255 ) );
d->agendaBgColorItem->setLabel( i18n("Agenda view background color") );
addItem( d->agendaBgColorItem, TQString::fromLatin1( "AgendaBgColor" ) );
setCurrentGroup( TQString::fromLatin1( "Fonts" ) );
- d->timeBarFontItem = new KConfigSkeleton::ItemFont( currentGroup(), TQString::fromLatin1( "TimeBar Font" ), d->timeBarFont );
+ d->timeBarFontItem = new TDEConfigSkeleton::ItemFont( currentGroup(), TQString::fromLatin1( "TimeBar Font" ), d->timeBarFont );
d->timeBarFontItem->setLabel( i18n("Time bar") );
addItem( d->timeBarFontItem, TQString::fromLatin1( "TimeBarFont" ) );
}
@@ -160,7 +160,7 @@ bool TestDPointer::autoSave()
}
-KConfigSkeleton::ItemBool *TestDPointer::autoSaveItem()
+TDEConfigSkeleton::ItemBool *TestDPointer::autoSaveItem()
{
return d->autoSaveItem;
}
@@ -177,7 +177,7 @@ int TestDPointer::autoSaveInterval()
}
-KConfigSkeleton::ItemInt *TestDPointer::autoSaveIntervalItem()
+TDEConfigSkeleton::ItemInt *TestDPointer::autoSaveIntervalItem()
{
return d->autoSaveIntervalItem;
}
@@ -194,7 +194,7 @@ bool TestDPointer::confirm()
}
-KConfigSkeleton::ItemBool *TestDPointer::confirmItem()
+TDEConfigSkeleton::ItemBool *TestDPointer::confirmItem()
{
return d->confirmItem;
}
@@ -211,7 +211,7 @@ TQString TestDPointer::archiveFile()
}
-KConfigSkeleton::ItemString *TestDPointer::archiveFileItem()
+TDEConfigSkeleton::ItemString *TestDPointer::archiveFileItem()
{
return d->archiveFileItem;
}
@@ -228,7 +228,7 @@ int TestDPointer::destination()
}
-KConfigSkeleton::ItemEnum *TestDPointer::destinationItem()
+TDEConfigSkeleton::ItemEnum *TestDPointer::destinationItem()
{
return d->destinationItem;
}
@@ -245,7 +245,7 @@ int TestDPointer::hourSize()
}
-KConfigSkeleton::ItemInt *TestDPointer::hourSizeItem()
+TDEConfigSkeleton::ItemInt *TestDPointer::hourSizeItem()
{
return d->hourSizeItem;
}
@@ -262,7 +262,7 @@ bool TestDPointer::selectionStartsEditor()
}
-KConfigSkeleton::ItemBool *TestDPointer::selectionStartsEditorItem()
+TDEConfigSkeleton::ItemBool *TestDPointer::selectionStartsEditorItem()
{
return d->selectionStartsEditorItem;
}
@@ -279,7 +279,7 @@ TQStringList TestDPointer::selectedPlugins()
}
-KConfigSkeleton::ItemStringList *TestDPointer::selectedPluginsItem()
+TDEConfigSkeleton::ItemStringList *TestDPointer::selectedPluginsItem()
{
return d->selectedPluginsItem;
}
@@ -296,7 +296,7 @@ TQColor TestDPointer::highlightColor()
}
-KConfigSkeleton::ItemColor *TestDPointer::highlightColorItem()
+TDEConfigSkeleton::ItemColor *TestDPointer::highlightColorItem()
{
return d->highlightColorItem;
}
@@ -313,7 +313,7 @@ TQColor TestDPointer::agendaBgColor()
}
-KConfigSkeleton::ItemColor *TestDPointer::agendaBgColorItem()
+TDEConfigSkeleton::ItemColor *TestDPointer::agendaBgColorItem()
{
return d->agendaBgColorItem;
}
@@ -330,7 +330,7 @@ TQFont TestDPointer::timeBarFont()
}
-KConfigSkeleton::ItemFont *TestDPointer::timeBarFontItem()
+TDEConfigSkeleton::ItemFont *TestDPointer::timeBarFontItem()
{
return d->timeBarFontItem;
}
diff --git a/tdecore/kconfig_compiler/tests/test_dpointer.h.ref b/tdecore/tdeconfig_compiler/tests/test_dpointer.h.ref
index 81f281e83..0bd7e771e 100644
--- a/tdecore/kconfig_compiler/tests/test_dpointer.h.ref
+++ b/tdecore/tdeconfig_compiler/tests/test_dpointer.h.ref
@@ -1,14 +1,14 @@
-// This file is generated by kconfig_compiler from test_dpointer.kcfg.
+// This file is generated by tdeconfig_compiler from test_dpointer.kcfg.
// All changes you do to this file will be lost.
#ifndef TESTDPOINTER_H
#define TESTDPOINTER_H
-#include <kconfigskeleton.h>
+#include <tdeconfigskeleton.h>
#include <kdebug.h>
class TestDPointerPrivate;
-class TestDPointer : public KConfigSkeleton
+class TestDPointer : public TDEConfigSkeleton
{
public:
class EnumDestination
@@ -210,7 +210,7 @@ class TestDPointer : public KConfigSkeleton
static
void writeConfig()
{
- static_cast<KConfigSkeleton*>(self())->writeConfig();
+ static_cast<TDEConfigSkeleton*>(self())->writeConfig();
}
protected:
TestDPointer();
diff --git a/tdecore/kconfig_compiler/tests/test_dpointer.kcfg b/tdecore/tdeconfig_compiler/tests/test_dpointer.kcfg
index 3b19e270e..3b19e270e 100644
--- a/tdecore/kconfig_compiler/tests/test_dpointer.kcfg
+++ b/tdecore/tdeconfig_compiler/tests/test_dpointer.kcfg
diff --git a/tdecore/kconfig_compiler/tests/test_dpointer.kcfgc b/tdecore/tdeconfig_compiler/tests/test_dpointer.kcfgc
index 48baa376e..83f4bce3b 100644
--- a/tdecore/kconfig_compiler/tests/test_dpointer.kcfgc
+++ b/tdecore/tdeconfig_compiler/tests/test_dpointer.kcfgc
@@ -1,4 +1,4 @@
-# Code generation options for kconfig_compiler
+# Code generation options for tdeconfig_compiler
File=test_dpointer.kcfg
ClassName=TestDPointer
Singleton=true
diff --git a/tdecore/kconfig_compiler/tests/test_dpointer_main.cpp b/tdecore/tdeconfig_compiler/tests/test_dpointer_main.cpp
index a6c23c8fe..b62ee17af 100644
--- a/tdecore/kconfig_compiler/tests/test_dpointer_main.cpp
+++ b/tdecore/tdeconfig_compiler/tests/test_dpointer_main.cpp
@@ -24,7 +24,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
int main( int, char*[] )
{
- KInstance i("test");
+ TDEInstance i("test");
TestDPointer *t = TestDPointer::self();
delete t;
}
diff --git a/tdecore/kconfigbackend.cpp b/tdecore/tdeconfigbackend.cpp
index efb2a20a9..6d5197ff7 100644
--- a/tdecore/kconfigbackend.cpp
+++ b/tdecore/tdeconfigbackend.cpp
@@ -39,12 +39,12 @@
#include <tqtextcodec.h>
#include <tqtextstream.h>
-#include "kconfigbackend.h"
-#include "kconfigbase.h"
-#include <kapplication.h>
-#include <kglobal.h>
+#include "tdeconfigbackend.h"
+#include "tdeconfigbase.h"
+#include <tdeapplication.h>
+#include <tdeglobal.h>
#include <kprocess.h>
-#include <klocale.h>
+#include <tdelocale.h>
#include <kstandarddirs.h>
#include <ksavefile.h>
#include <kurl.h>
@@ -231,16 +231,16 @@ static TQCString decodeKey(const char* key)
return newKey;
}
-class KConfigBackEnd::KConfigBackEndPrivate
+class TDEConfigBackEnd::TDEConfigBackEndPrivate
{
public:
TQDateTime localLastModified;
uint localLastSize;
- KLockFile::Ptr localLockFile;
- KLockFile::Ptr globalLockFile;
+ TDELockFile::Ptr localLockFile;
+ TDELockFile::Ptr globalLockFile;
};
-void KConfigBackEnd::changeFileName(const TQString &_fileName,
+void TDEConfigBackEnd::changeFileName(const TQString &_fileName,
const char * _resType,
bool _useKDEGlobals)
{
@@ -254,11 +254,11 @@ void KConfigBackEnd::changeFileName(const TQString &_fileName,
mLocalFileName = mfileName;
}
else {
- mLocalFileName = KGlobal::dirs()->saveLocation(resType, TQString(), false) + mfileName;
+ mLocalFileName = TDEGlobal::dirs()->saveLocation(resType, TQString(), false) + mfileName;
}
if (useKDEGlobals) {
- mGlobalFileName = KGlobal::dirs()->saveLocation("config", TQString(), false) + TQString::fromLatin1("kdeglobals");
+ mGlobalFileName = TDEGlobal::dirs()->saveLocation("config", TQString(), false) + TQString::fromLatin1("kdeglobals");
}
else {
mGlobalFileName = TQString::null;
@@ -270,7 +270,7 @@ void KConfigBackEnd::changeFileName(const TQString &_fileName,
d->globalLockFile = 0;
}
-KLockFile::Ptr KConfigBackEnd::lockFile(bool bGlobal)
+TDELockFile::Ptr TDEConfigBackEnd::lockFile(bool bGlobal)
{
if (bGlobal)
{
@@ -279,7 +279,7 @@ KLockFile::Ptr KConfigBackEnd::lockFile(bool bGlobal)
if (!mGlobalFileName.isEmpty())
{
- d->globalLockFile = new KLockFile(mGlobalFileName+".lock");
+ d->globalLockFile = new TDELockFile(mGlobalFileName+".lock");
return d->globalLockFile;
}
}
@@ -290,42 +290,42 @@ KLockFile::Ptr KConfigBackEnd::lockFile(bool bGlobal)
if (!mLocalFileName.isEmpty())
{
- d->localLockFile = new KLockFile(mLocalFileName+".lock");
+ d->localLockFile = new TDELockFile(mLocalFileName+".lock");
return d->localLockFile;
}
}
return 0;
}
-KConfigBackEnd::KConfigBackEnd(KConfigBase *_config,
+TDEConfigBackEnd::TDEConfigBackEnd(TDEConfigBase *_config,
const TQString &_fileName,
const char * _resType,
bool _useKDEGlobals)
- : pConfig(_config), bFileImmutable(false), mConfigState(KConfigBase::NoAccess), mFileMode(-1)
+ : pConfig(_config), bFileImmutable(false), mConfigState(TDEConfigBase::NoAccess), mFileMode(-1)
{
- d = new KConfigBackEndPrivate;
+ d = new TDEConfigBackEndPrivate;
changeFileName(_fileName, _resType, _useKDEGlobals);
}
-KConfigBackEnd::~KConfigBackEnd()
+TDEConfigBackEnd::~TDEConfigBackEnd()
{
delete d;
}
-void KConfigBackEnd::setFileWriteMode(int mode)
+void TDEConfigBackEnd::setFileWriteMode(int mode)
{
mFileMode = mode;
}
-bool KConfigINIBackEnd::parseConfigFiles()
+bool TDEConfigINIBackEnd::parseConfigFiles()
{
// Check if we can write to the local file.
- mConfigState = KConfigBase::ReadOnly;
+ mConfigState = TDEConfigBase::ReadOnly;
if (!mLocalFileName.isEmpty() && !pConfig->isReadOnly())
{
if (checkAccess(mLocalFileName, W_OK))
{
- mConfigState = KConfigBase::ReadWrite;
+ mConfigState = TDEConfigBase::ReadWrite;
}
else
{
@@ -333,11 +333,11 @@ bool KConfigINIBackEnd::parseConfigFiles()
KURL path;
path.setPath(mLocalFileName);
TQString dir=path.directory();
- KStandardDirs::makeDir(dir);
+ TDEStandardDirs::makeDir(dir);
if (checkAccess(mLocalFileName, W_OK))
{
- mConfigState = KConfigBase::ReadWrite;
+ mConfigState = TDEConfigBase::ReadWrite;
}
}
TQFileInfo info(mLocalFileName);
@@ -350,7 +350,7 @@ bool KConfigINIBackEnd::parseConfigFiles()
// Parse the general config files
if (useKDEGlobals) {
- TQStringList kdercs = KGlobal::dirs()->
+ TQStringList kdercs = TDEGlobal::dirs()->
findAllResources("config", TQString::fromLatin1("kdeglobals"));
#ifdef Q_WS_WIN
@@ -362,7 +362,7 @@ bool KConfigINIBackEnd::parseConfigFiles()
if (checkAccess(etc_kderc, R_OK))
kdercs += etc_kderc;
- kdercs += KGlobal::dirs()->
+ kdercs += TDEGlobal::dirs()->
findAllResources("config", TQString::fromLatin1("system.kdeglobals"));
TQStringList::ConstIterator it;
@@ -383,9 +383,9 @@ bool KConfigINIBackEnd::parseConfigFiles()
while(bReadFile) {
bReadFile = false;
TQString bootLanguage;
- if (useKDEGlobals && localeString.isEmpty() && !KGlobal::_locale) {
+ if (useKDEGlobals && localeString.isEmpty() && !TDEGlobal::_locale) {
// Boot strap language
- bootLanguage = KLocale::_initLanguage(pConfig);
+ bootLanguage = TDELocale::_initLanguage(pConfig);
setLocaleString(bootLanguage.utf8());
}
@@ -394,7 +394,7 @@ bool KConfigINIBackEnd::parseConfigFiles()
if ( !TQDir::isRelativePath(mfileName) )
list << mfileName;
else
- list = KGlobal::dirs()->findAllResources(resType, mfileName);
+ list = TDEGlobal::dirs()->findAllResources(resType, mfileName);
TQStringList::ConstIterator it;
@@ -410,12 +410,12 @@ bool KConfigINIBackEnd::parseConfigFiles()
break;
}
}
- if (KGlobal::dirs()->isRestrictedResource(resType, mfileName))
+ if (TDEGlobal::dirs()->isRestrictedResource(resType, mfileName))
bFileImmutable = true;
TQString currentLanguage;
if (!bootLanguage.isEmpty())
{
- currentLanguage = KLocale::_initLanguage(pConfig);
+ currentLanguage = TDELocale::_initLanguage(pConfig);
// If the file changed the language, we need to read the file again
// with the new language setting.
if (bootLanguage != currentLanguage)
@@ -426,7 +426,7 @@ bool KConfigINIBackEnd::parseConfigFiles()
}
}
if (bFileImmutable)
- mConfigState = KConfigBase::ReadOnly;
+ mConfigState = TDEConfigBase::ReadOnly;
return true;
}
@@ -447,7 +447,7 @@ extern "C" {
extern bool kde_kiosk_exception;
-void KConfigINIBackEnd::parseSingleConfigFile(TQFile &rFile,
+void TDEConfigINIBackEnd::parseSingleConfigFile(TQFile &rFile,
KEntryMap *pWriteBackMap,
bool bGlobal, bool bDefault)
{
@@ -730,18 +730,18 @@ tqWarning("SIGBUS while reading %s", rFile.name().latin1());
pConfig->putData(aEntryKey, aEntry, false);
}
}
- // Look up translations using KLocale
+ // Look up translations using TDELocale
// https://launchpad.net/distros/ubuntu/+spec/langpacks-desktopfiles-kde
- // This calls KLocale up to 10 times for each config file (and each KConfig has up to 4 files)
+ // This calls TDELocale up to 10 times for each config file (and each TDEConfig has up to 4 files)
// so I'll see how much of a performance hit it is
// it also only acts on the last group in a file
// Ideas: only translate most important fields, only translate "Desktop Entry" files,
- // do translation per KConfig not per single file
+ // do translation per TDEConfig not per single file
if (!pWriteBackMap) {
TQFile file("file.txt");
if (foundGettextDomain) {
- KLocale locale(gettextDomain);
+ TDELocale locale(gettextDomain);
TQString language = locale.language();
translateKey(locale, aCurrentGroup, TQCString("Name"));
@@ -772,7 +772,7 @@ tqWarning("SIGBUS while reading %s", rFile.name().latin1());
#endif
}
-void KConfigINIBackEnd::translateKey(KLocale& locale, TQCString currentGroup, TQCString key) {
+void TDEConfigINIBackEnd::translateKey(TDELocale& locale, TQCString currentGroup, TQCString key) {
KEntryKey entryKey = KEntryKey(currentGroup, key);
KEntry entry = pConfig->lookupData(entryKey);
if (TQString(entry.mValue) != "") {
@@ -788,7 +788,7 @@ void KConfigINIBackEnd::translateKey(KLocale& locale, TQCString currentGroup, TQ
}
}
-void KConfigINIBackEnd::sync(bool bMerge)
+void TDEConfigINIBackEnd::sync(bool bMerge)
{
// write-sync is only necessary if there are dirty entries
if (!pConfig->isDirty())
@@ -806,7 +806,7 @@ void KConfigINIBackEnd::sync(bool bMerge)
KURL path;
path.setPath(mLocalFileName);
TQString dir=path.directory();
- KStandardDirs::makeDir(dir);
+ TDEStandardDirs::makeDir(dir);
}
// Can we allow the write? We can, if the program
@@ -815,7 +815,7 @@ void KConfigINIBackEnd::sync(bool bMerge)
// it wasn't SUID.
if (checkAccess(mLocalFileName, W_OK)) {
// File is writable
- KLockFile::Ptr lf;
+ TDELockFile::Ptr lf;
bool mergeLocalFile = bMerge;
// Check if the file has been updated since.
@@ -827,7 +827,7 @@ void KConfigINIBackEnd::sync(bool bMerge)
if (lf)
{
- lf->lock( KLockFile::LockForce );
+ lf->lock( TDELockFile::LockForce );
// But what if the locking failed? Ignore it for now...
}
@@ -873,13 +873,13 @@ void KConfigINIBackEnd::sync(bool bMerge)
// can we allow the write? (see above)
if (checkAccess ( mGlobalFileName, W_OK )) {
- KLockFile::Ptr lf = lockFile(true); // Lock file for global file
+ TDELockFile::Ptr lf = lockFile(true); // Lock file for global file
if (lf && lf->isLocked())
lf = 0; // Already locked, we don't need to lock/unlock again
if (lf)
{
- lf->lock( KLockFile::LockForce );
+ lf->lock( TDELockFile::LockForce );
// But what if the locking failed? Ignore it for now...
}
writeConfigFile( mGlobalFileName, true, bMerge ); // Always merge
@@ -978,7 +978,7 @@ static void writeEntries(FILE *pStream, const KEntryMap& entryMap, bool defaultG
} // for loop
}
-bool KConfigINIBackEnd::getEntryMap(KEntryMap &aTempMap, bool bGlobal,
+bool TDEConfigINIBackEnd::getEntryMap(KEntryMap &aTempMap, bool bGlobal,
TQFile *mergeFile)
{
bool bEntriesLeft = false;
@@ -1032,7 +1032,7 @@ bool KConfigINIBackEnd::getEntryMap(KEntryMap &aTempMap, bool bGlobal,
}
/* antlarr: KDE 4.0: make the first parameter "const TQString &" */
-bool KConfigINIBackEnd::writeConfigFile(TQString filename, bool bGlobal,
+bool TDEConfigINIBackEnd::writeConfigFile(TQString filename, bool bGlobal,
bool bMerge)
{
// is the config object read-only?
@@ -1135,7 +1135,7 @@ bool KConfigINIBackEnd::writeConfigFile(TQString filename, bool bGlobal,
return bEntriesLeft;
}
-void KConfigINIBackEnd::writeEntries(FILE *pStream, const KEntryMap &aTempMap)
+void TDEConfigINIBackEnd::writeEntries(FILE *pStream, const KEntryMap &aTempMap)
{
bool firstEntry = true;
@@ -1146,13 +1146,13 @@ void KConfigINIBackEnd::writeEntries(FILE *pStream, const KEntryMap &aTempMap)
::writeEntries(pStream, aTempMap, false, firstEntry, localeString);
}
-void KConfigBackEnd::virtual_hook( int, void* )
+void TDEConfigBackEnd::virtual_hook( int, void* )
{ /*BASE::virtual_hook( id, data );*/ }
-void KConfigINIBackEnd::virtual_hook( int id, void* data )
-{ KConfigBackEnd::virtual_hook( id, data ); }
+void TDEConfigINIBackEnd::virtual_hook( int id, void* data )
+{ TDEConfigBackEnd::virtual_hook( id, data ); }
-bool KConfigBackEnd::checkConfigFilesWritable(bool warnUser)
+bool TDEConfigBackEnd::checkConfigFilesWritable(bool warnUser)
{
// WARNING: Do NOT use the event loop as it may not exist at this time.
bool allWritable = true;
@@ -1177,13 +1177,13 @@ bool KConfigBackEnd::checkConfigFilesWritable(bool warnUser)
{
// Note: We don't ask the user if we should not ask this question again because we can't save the answer.
errorMsg += i18n("Please contact your system administrator.");
- TQString cmdToExec = KStandardDirs::findExe(TQString("kdialog"));
- KApplication *app = kapp;
+ TQString cmdToExec = TDEStandardDirs::findExe(TQString("kdialog"));
+ TDEApplication *app = kapp;
if (!cmdToExec.isEmpty() && app)
{
- KProcess lprocess;
+ TDEProcess lprocess;
lprocess << cmdToExec << "--title" << app->instanceName() << "--msgbox" << TQCString(errorMsg.local8Bit());
- lprocess.start( KProcess::Block );
+ lprocess.start( TDEProcess::Block );
}
}
return allWritable;
diff --git a/tdecore/kconfigbackend.h b/tdecore/tdeconfigbackend.h
index 03655ab2d..83c8047bc 100644
--- a/tdecore/kconfigbackend.h
+++ b/tdecore/tdeconfigbackend.h
@@ -22,14 +22,14 @@
#ifndef _KCONFIGBACKEND_H
#define _KCONFIGBACKEND_H
-#include "kconfigdata.h"
-#include <kconfigbase.h>
+#include "tdeconfigdata.h"
+#include <tdeconfigbase.h>
#include <klockfile.h>
-#include <klocale.h>
+#include <tdelocale.h>
#include "tdelibs_export.h"
class TQFile;
-class KConfigBackEndPrivate;
+class TDEConfigBackEndPrivate;
/**
* Abstract base class for KDE configuration file loading/saving.
@@ -45,10 +45,10 @@ class KConfigBackEndPrivate;
* Matthias Kalle Dalheimer <kalle@kde.org>
* @short KDE Configuration file loading/saving abstract base class
*/
-class TDECORE_EXPORT KConfigBackEnd
+class TDECORE_EXPORT TDEConfigBackEnd
{
- friend class KConfig;
- friend class KSharedConfig;
+ friend class TDEConfig;
+ friend class TDESharedConfig;
public:
/**
* Constructs a configuration back end.
@@ -65,13 +65,13 @@ public:
* will be imported into the config object. If false, only
* the filename specified will be dealt with.
*/
- KConfigBackEnd(KConfigBase *_config, const TQString &_fileName,
+ TDEConfigBackEnd(TDEConfigBase *_config, const TQString &_fileName,
const char * _resType, bool _useKDEGlobals);
/**
* Destructs the configuration backend.
*/
- virtual ~KConfigBackEnd();
+ virtual ~TDEConfigBackEnd();
/**
* Parses all configuration files for a configuration object. This
@@ -108,9 +108,9 @@ public:
/**
* Returns the state of the app-config object.
*
- * @see KConfig::getConfigState
+ * @see TDEConfig::getConfigState
*/
- virtual KConfigBase::ConfigState getConfigState() const
+ virtual TDEConfigBase::ConfigState getConfigState() const
{ return mConfigState; }
/**
@@ -128,7 +128,7 @@ public:
/**
* Set the locale string that defines the current language.
* @param _localeString the identifier of the language
- * @see KLocale
+ * @see TDELocale
*/
void setLocaleString(const TQCString &_localeString) { localeString = _localeString; }
@@ -151,7 +151,7 @@ public:
* @param bGlobal If true, returns a lock file object for kdeglobals
* @since 3.3
*/
- KLockFile::Ptr lockFile( bool bGlobal = false );
+ TDELockFile::Ptr lockFile( bool bGlobal = false );
#ifdef KDE_NO_COMPAT
private:
@@ -162,7 +162,7 @@ private:
KDE_DEPRECATED TQString filename() const { return mfileName; }
protected:
- KConfigBase *pConfig;
+ TDEConfigBase *pConfig;
TQString mfileName;
TQCString resType;
@@ -171,14 +171,14 @@ protected:
TQCString localeString;
TQString mLocalFileName;
TQString mGlobalFileName;
- KConfigBase::ConfigState mConfigState;
+ TDEConfigBase::ConfigState mConfigState;
int mFileMode;
protected:
virtual void virtual_hook( int id, void* data );
protected:
- class KConfigBackEndPrivate;
- KConfigBackEndPrivate *d;
+ class TDEConfigBackEndPrivate;
+ TDEConfigBackEndPrivate *d;
};
@@ -188,7 +188,7 @@ protected:
* @author Preston Brown <pbrown@kde.org>,
* Matthias Kalle Dalheimer <kalle@kde.org>
*/
-class TDECORE_EXPORT KConfigINIBackEnd : public KConfigBackEnd
+class TDECORE_EXPORT TDEConfigINIBackEnd : public TDEConfigBackEnd
{
public:
@@ -207,14 +207,14 @@ public:
* will be imported into the config object. If false, only
* the filename specified will be dealt with.
*/
- KConfigINIBackEnd(KConfigBase *_config, const TQString &_fileName,
+ TDEConfigINIBackEnd(TDEConfigBase *_config, const TQString &_fileName,
const char * _resType, bool _useKDEGlobals = true)
- : KConfigBackEnd(_config, _fileName, _resType, _useKDEGlobals) {}
+ : TDEConfigBackEnd(_config, _fileName, _resType, _useKDEGlobals) {}
/**
* Destructs the configuration backend.
*/
- virtual ~KConfigINIBackEnd() {}
+ virtual ~TDEConfigINIBackEnd() {}
/**
* Parses all INI-style configuration files for a config object.
@@ -252,9 +252,9 @@ protected:
bool bGlobal = false, bool bDefault = false);
// Kubuntu patch, 2006-08-03
- // looks up a key in with KLocale
+ // looks up a key in with TDELocale
// see https://launchpad.net/distros/ubuntu/+spec/langpacks-desktopfiles-kde
- void translateKey(KLocale& locale, TQCString currentGroup, TQCString key);
+ void translateKey(TDELocale& locale, TQCString currentGroup, TQCString key);
/**
* Writes configuration file back.
@@ -292,8 +292,8 @@ protected:
protected:
virtual void virtual_hook( int id, void* data );
private:
- class KConfigINIBackEndPrivate;
- KConfigINIBackEndPrivate *not_d;
+ class TDEConfigINIBackEndPrivate;
+ TDEConfigINIBackEndPrivate *not_d;
};
#endif
diff --git a/tdecore/kconfigbase.cpp b/tdecore/tdeconfigbase.cpp
index c5c0a4e25..a3b15185b 100644
--- a/tdecore/kconfigbase.cpp
+++ b/tdecore/tdeconfigbase.cpp
@@ -27,56 +27,56 @@
#include <tqdir.h>
#include <tqtextstream.h>
-#include <kapplication.h>
-#include <kglobal.h>
-#include <klocale.h>
+#include <tdeapplication.h>
+#include <tdeglobal.h>
+#include <tdelocale.h>
#include <kcharsets.h>
-#include "kconfigbase.h"
-#include "kconfigbackend.h"
+#include "tdeconfigbase.h"
+#include "tdeconfigbackend.h"
#include "kdebug.h"
#include "kstandarddirs.h"
#include "kstringhandler.h"
-class KConfigBase::KConfigBasePrivate
+class TDEConfigBase::TDEConfigBasePrivate
{
public:
- KConfigBasePrivate() : readDefaults(false) { };
+ TDEConfigBasePrivate() : readDefaults(false) { };
public:
bool readDefaults;
};
-KConfigBase::KConfigBase()
+TDEConfigBase::TDEConfigBase()
: backEnd(0L), bDirty(false), bLocaleInitialized(false),
bReadOnly(false), bExpand(false), d(0)
{
setGroup(TQString::null);
}
-KConfigBase::~KConfigBase()
+TDEConfigBase::~TDEConfigBase()
{
delete d;
}
-void KConfigBase::setLocale()
+void TDEConfigBase::setLocale()
{
bLocaleInitialized = true;
- if (KGlobal::locale())
- aLocaleString = KGlobal::locale()->language().utf8();
+ if (TDEGlobal::locale())
+ aLocaleString = TDEGlobal::locale()->language().utf8();
else
- aLocaleString = KLocale::defaultLanguage().utf8();
+ aLocaleString = TDELocale::defaultLanguage().utf8();
if (backEnd)
backEnd->setLocaleString(aLocaleString);
}
-TQString KConfigBase::locale() const
+TQString TDEConfigBase::locale() const
{
return TQString::fromUtf8(aLocaleString);
}
-void KConfigBase::setGroup( const TQString& group )
+void TDEConfigBase::setGroup( const TQString& group )
{
if ( group.isEmpty() )
mGroup = "<default>";
@@ -84,12 +84,12 @@ void KConfigBase::setGroup( const TQString& group )
mGroup = group.utf8();
}
-void KConfigBase::setGroup( const char *pGroup )
+void TDEConfigBase::setGroup( const char *pGroup )
{
setGroup(TQCString(pGroup));
}
-void KConfigBase::setGroup( const TQCString &group )
+void TDEConfigBase::setGroup( const TQCString &group )
{
if ( group.isEmpty() )
mGroup = "<default>";
@@ -97,21 +97,21 @@ void KConfigBase::setGroup( const TQCString &group )
mGroup = group;
}
-TQString KConfigBase::group() const {
+TQString TDEConfigBase::group() const {
return TQString::fromUtf8(mGroup);
}
-void KConfigBase::setDesktopGroup()
+void TDEConfigBase::setDesktopGroup()
{
mGroup = "Desktop Entry";
}
-bool KConfigBase::hasKey(const TQString &key) const
+bool TDEConfigBase::hasKey(const TQString &key) const
{
return hasKey(key.utf8().data());
}
-bool KConfigBase::hasKey(const char *pKey) const
+bool TDEConfigBase::hasKey(const char *pKey) const
{
KEntryKey aEntryKey(mGroup, 0);
aEntryKey.c_key = pKey;
@@ -131,7 +131,7 @@ bool KConfigBase::hasKey(const char *pKey) const
return !entry.mValue.isNull();
}
-bool KConfigBase::hasTranslatedKey(const char* pKey) const
+bool TDEConfigBase::hasTranslatedKey(const char* pKey) const
{
KEntryKey aEntryKey(mGroup, 0);
aEntryKey.c_key = pKey;
@@ -149,27 +149,27 @@ bool KConfigBase::hasTranslatedKey(const char* pKey) const
return false;
}
-bool KConfigBase::hasGroup(const TQString &group) const
+bool TDEConfigBase::hasGroup(const TQString &group) const
{
return internalHasGroup( group.utf8());
}
-bool KConfigBase::hasGroup(const char *_pGroup) const
+bool TDEConfigBase::hasGroup(const char *_pGroup) const
{
return internalHasGroup( TQCString(_pGroup));
}
-bool KConfigBase::hasGroup(const TQCString &_pGroup) const
+bool TDEConfigBase::hasGroup(const TQCString &_pGroup) const
{
return internalHasGroup( _pGroup);
}
-bool KConfigBase::isImmutable() const
+bool TDEConfigBase::isImmutable() const
{
return (getConfigState() != ReadWrite);
}
-bool KConfigBase::groupIsImmutable(const TQString &group) const
+bool TDEConfigBase::groupIsImmutable(const TQString &group) const
{
if (getConfigState() != ReadWrite)
return true;
@@ -179,7 +179,7 @@ bool KConfigBase::groupIsImmutable(const TQString &group) const
return entry.bImmutable;
}
-bool KConfigBase::entryIsImmutable(const TQString &key) const
+bool TDEConfigBase::entryIsImmutable(const TQString &key) const
{
if (getConfigState() != ReadWrite)
return true;
@@ -201,14 +201,14 @@ bool KConfigBase::entryIsImmutable(const TQString &key) const
}
-TQString KConfigBase::readEntryUntranslated( const TQString& pKey,
+TQString TDEConfigBase::readEntryUntranslated( const TQString& pKey,
const TQString& aDefault ) const
{
- return KConfigBase::readEntryUntranslated(pKey.utf8().data(), aDefault);
+ return TDEConfigBase::readEntryUntranslated(pKey.utf8().data(), aDefault);
}
-TQString KConfigBase::readEntryUntranslated( const char *pKey,
+TQString TDEConfigBase::readEntryUntranslated( const char *pKey,
const TQString& aDefault ) const
{
TQCString result = readEntryUtf8(pKey);
@@ -218,22 +218,22 @@ TQString KConfigBase::readEntryUntranslated( const char *pKey,
}
-TQString KConfigBase::readEntry( const TQString& pKey,
+TQString TDEConfigBase::readEntry( const TQString& pKey,
const TQString& aDefault ) const
{
- return KConfigBase::readEntry(pKey.utf8().data(), aDefault);
+ return TDEConfigBase::readEntry(pKey.utf8().data(), aDefault);
}
-TQString KConfigBase::readEntry( const char *pKey,
+TQString TDEConfigBase::readEntry( const char *pKey,
const TQString& aDefault ) const
{
// we need to access _locale instead of the method locale()
// because calling locale() will create a locale object if it
- // doesn't exist, which requires KConfig, which will create a infinite
+ // doesn't exist, which requires TDEConfig, which will create a infinite
// loop, and nobody likes those.
- if (!bLocaleInitialized && KGlobal::_locale) {
+ if (!bLocaleInitialized && TDEGlobal::_locale) {
// get around const'ness.
- KConfigBase *that = const_cast<KConfigBase *>(this);
+ TDEConfigBase *that = const_cast<TDEConfigBase *>(this);
that->setLocale();
}
@@ -259,7 +259,7 @@ TQString KConfigBase::readEntry( const char *pKey,
aValue = TQString::fromUtf8(aEntryData.mValue.data());
if (aValue.isNull())
{
- static const TQString &emptyString = KGlobal::staticQString("");
+ static const TQString &emptyString = TDEGlobal::staticQString("");
aValue = emptyString;
}
expand = aEntryData.bExpand;
@@ -335,7 +335,7 @@ TQString KConfigBase::readEntry( const char *pKey,
return aValue;
}
-TQCString KConfigBase::readEntryUtf8( const char *pKey) const
+TQCString TDEConfigBase::readEntryUtf8( const char *pKey) const
{
// We don't try the localized key
KEntryKey entryKey(mGroup, 0);
@@ -350,13 +350,13 @@ TQCString KConfigBase::readEntryUtf8( const char *pKey) const
return aEntryData.mValue;
}
-TQVariant KConfigBase::readPropertyEntry( const TQString& pKey,
+TQVariant TDEConfigBase::readPropertyEntry( const TQString& pKey,
TQVariant::Type type ) const
{
return readPropertyEntry(pKey.utf8().data(), type);
}
-TQVariant KConfigBase::readPropertyEntry( const char *pKey,
+TQVariant TDEConfigBase::readPropertyEntry( const char *pKey,
TQVariant::Type type ) const
{
TQVariant va;
@@ -365,13 +365,13 @@ TQVariant KConfigBase::readPropertyEntry( const char *pKey,
return readPropertyEntry(pKey, va);
}
-TQVariant KConfigBase::readPropertyEntry( const TQString& pKey,
+TQVariant TDEConfigBase::readPropertyEntry( const TQString& pKey,
const TQVariant &aDefault ) const
{
return readPropertyEntry(pKey.utf8().data(), aDefault);
}
-TQVariant KConfigBase::readPropertyEntry( const char *pKey,
+TQVariant TDEConfigBase::readPropertyEntry( const char *pKey,
const TQVariant &aDefault ) const
{
if ( !hasKey( pKey ) ) return aDefault;
@@ -474,13 +474,13 @@ TQVariant KConfigBase::readPropertyEntry( const char *pKey,
return TQVariant();
}
-int KConfigBase::readListEntry( const TQString& pKey,
+int TDEConfigBase::readListEntry( const TQString& pKey,
TQStrList &list, char sep ) const
{
return readListEntry(pKey.utf8().data(), list, sep);
}
-int KConfigBase::readListEntry( const char *pKey,
+int TDEConfigBase::readListEntry( const char *pKey,
TQStrList &list, char sep ) const
{
if( !hasKey( pKey ) )
@@ -519,14 +519,14 @@ int KConfigBase::readListEntry( const char *pKey,
return list.count();
}
-TQStringList KConfigBase::readListEntry( const TQString& pKey, char sep ) const
+TQStringList TDEConfigBase::readListEntry( const TQString& pKey, char sep ) const
{
return readListEntry(pKey.utf8().data(), sep);
}
-TQStringList KConfigBase::readListEntry( const char *pKey, char sep ) const
+TQStringList TDEConfigBase::readListEntry( const char *pKey, char sep ) const
{
- static const TQString& emptyString = KGlobal::staticQString("");
+ static const TQString& emptyString = TDEGlobal::staticQString("");
TQStringList list;
if( !hasKey( pKey ) )
@@ -565,7 +565,7 @@ TQStringList KConfigBase::readListEntry( const char *pKey, char sep ) const
return list;
}
-TQStringList KConfigBase::readListEntry( const char* pKey, const TQStringList& aDefault,
+TQStringList TDEConfigBase::readListEntry( const char* pKey, const TQStringList& aDefault,
char sep ) const
{
if ( !hasKey( pKey ) )
@@ -574,12 +574,12 @@ TQStringList KConfigBase::readListEntry( const char* pKey, const TQStringList& a
return readListEntry( pKey, sep );
}
-TQValueList<int> KConfigBase::readIntListEntry( const TQString& pKey ) const
+TQValueList<int> TDEConfigBase::readIntListEntry( const TQString& pKey ) const
{
return readIntListEntry(pKey.utf8().data());
}
-TQValueList<int> KConfigBase::readIntListEntry( const char *pKey ) const
+TQValueList<int> TDEConfigBase::readIntListEntry( const char *pKey ) const
{
TQStringList strlist = readListEntry(pKey);
TQValueList<int> list;
@@ -592,12 +592,12 @@ TQValueList<int> KConfigBase::readIntListEntry( const char *pKey ) const
return list;
}
-TQString KConfigBase::readPathEntry( const TQString& pKey, const TQString& pDefault ) const
+TQString TDEConfigBase::readPathEntry( const TQString& pKey, const TQString& pDefault ) const
{
return readPathEntry(pKey.utf8().data(), pDefault);
}
-TQString KConfigBase::readPathEntry( const char *pKey, const TQString& pDefault ) const
+TQString TDEConfigBase::readPathEntry( const char *pKey, const TQString& pDefault ) const
{
const bool bExpandSave = bExpand;
bExpand = true;
@@ -606,12 +606,12 @@ TQString KConfigBase::readPathEntry( const char *pKey, const TQString& pDefault
return aValue;
}
-TQStringList KConfigBase::readPathListEntry( const TQString& pKey, char sep ) const
+TQStringList TDEConfigBase::readPathListEntry( const TQString& pKey, char sep ) const
{
return readPathListEntry(pKey.utf8().data(), sep);
}
-TQStringList KConfigBase::readPathListEntry( const char *pKey, char sep ) const
+TQStringList TDEConfigBase::readPathListEntry( const char *pKey, char sep ) const
{
const bool bExpandSave = bExpand;
bExpand = true;
@@ -620,12 +620,12 @@ TQStringList KConfigBase::readPathListEntry( const char *pKey, char sep ) const
return aValue;
}
-int KConfigBase::readNumEntry( const TQString& pKey, int nDefault) const
+int TDEConfigBase::readNumEntry( const TQString& pKey, int nDefault) const
{
return readNumEntry(pKey.utf8().data(), nDefault);
}
-int KConfigBase::readNumEntry( const char *pKey, int nDefault) const
+int TDEConfigBase::readNumEntry( const char *pKey, int nDefault) const
{
TQCString aValue = readEntryUtf8( pKey );
if( aValue.isNull() )
@@ -641,12 +641,12 @@ int KConfigBase::readNumEntry( const char *pKey, int nDefault) const
}
-unsigned int KConfigBase::readUnsignedNumEntry( const TQString& pKey, unsigned int nDefault) const
+unsigned int TDEConfigBase::readUnsignedNumEntry( const TQString& pKey, unsigned int nDefault) const
{
return readUnsignedNumEntry(pKey.utf8().data(), nDefault);
}
-unsigned int KConfigBase::readUnsignedNumEntry( const char *pKey, unsigned int nDefault) const
+unsigned int TDEConfigBase::readUnsignedNumEntry( const char *pKey, unsigned int nDefault) const
{
TQCString aValue = readEntryUtf8( pKey );
if( aValue.isNull() )
@@ -660,12 +660,12 @@ unsigned int KConfigBase::readUnsignedNumEntry( const char *pKey, unsigned int n
}
-long KConfigBase::readLongNumEntry( const TQString& pKey, long nDefault) const
+long TDEConfigBase::readLongNumEntry( const TQString& pKey, long nDefault) const
{
return readLongNumEntry(pKey.utf8().data(), nDefault);
}
-long KConfigBase::readLongNumEntry( const char *pKey, long nDefault) const
+long TDEConfigBase::readLongNumEntry( const char *pKey, long nDefault) const
{
TQCString aValue = readEntryUtf8( pKey );
if( aValue.isNull() )
@@ -679,12 +679,12 @@ long KConfigBase::readLongNumEntry( const char *pKey, long nDefault) const
}
-unsigned long KConfigBase::readUnsignedLongNumEntry( const TQString& pKey, unsigned long nDefault) const
+unsigned long TDEConfigBase::readUnsignedLongNumEntry( const TQString& pKey, unsigned long nDefault) const
{
return readUnsignedLongNumEntry(pKey.utf8().data(), nDefault);
}
-unsigned long KConfigBase::readUnsignedLongNumEntry( const char *pKey, unsigned long nDefault) const
+unsigned long TDEConfigBase::readUnsignedLongNumEntry( const char *pKey, unsigned long nDefault) const
{
TQCString aValue = readEntryUtf8( pKey );
if( aValue.isNull() )
@@ -697,12 +697,12 @@ unsigned long KConfigBase::readUnsignedLongNumEntry( const char *pKey, unsigned
}
}
-TQ_INT64 KConfigBase::readNum64Entry( const TQString& pKey, TQ_INT64 nDefault) const
+TQ_INT64 TDEConfigBase::readNum64Entry( const TQString& pKey, TQ_INT64 nDefault) const
{
return readNum64Entry(pKey.utf8().data(), nDefault);
}
-TQ_INT64 KConfigBase::readNum64Entry( const char *pKey, TQ_INT64 nDefault) const
+TQ_INT64 TDEConfigBase::readNum64Entry( const char *pKey, TQ_INT64 nDefault) const
{
// Note that TQCString::toLongLong() is missing, we muse use a TQString instead.
TQString aValue = readEntry( pKey );
@@ -717,12 +717,12 @@ TQ_INT64 KConfigBase::readNum64Entry( const char *pKey, TQ_INT64 nDefault) const
}
-TQ_UINT64 KConfigBase::readUnsignedNum64Entry( const TQString& pKey, TQ_UINT64 nDefault) const
+TQ_UINT64 TDEConfigBase::readUnsignedNum64Entry( const TQString& pKey, TQ_UINT64 nDefault) const
{
return readUnsignedNum64Entry(pKey.utf8().data(), nDefault);
}
-TQ_UINT64 KConfigBase::readUnsignedNum64Entry( const char *pKey, TQ_UINT64 nDefault) const
+TQ_UINT64 TDEConfigBase::readUnsignedNum64Entry( const char *pKey, TQ_UINT64 nDefault) const
{
// Note that TQCString::toULongLong() is missing, we muse use a TQString instead.
TQString aValue = readEntry( pKey );
@@ -736,12 +736,12 @@ TQ_UINT64 KConfigBase::readUnsignedNum64Entry( const char *pKey, TQ_UINT64 nDefa
}
}
-double KConfigBase::readDoubleNumEntry( const TQString& pKey, double nDefault) const
+double TDEConfigBase::readDoubleNumEntry( const TQString& pKey, double nDefault) const
{
return readDoubleNumEntry(pKey.utf8().data(), nDefault);
}
-double KConfigBase::readDoubleNumEntry( const char *pKey, double nDefault) const
+double TDEConfigBase::readDoubleNumEntry( const char *pKey, double nDefault) const
{
TQCString aValue = readEntryUtf8( pKey );
if( aValue.isNull() )
@@ -755,12 +755,12 @@ double KConfigBase::readDoubleNumEntry( const char *pKey, double nDefault) const
}
-bool KConfigBase::readBoolEntry( const TQString& pKey, bool bDefault ) const
+bool TDEConfigBase::readBoolEntry( const TQString& pKey, bool bDefault ) const
{
return readBoolEntry(pKey.utf8().data(), bDefault);
}
-bool KConfigBase::readBoolEntry( const char *pKey, bool bDefault ) const
+bool TDEConfigBase::readBoolEntry( const char *pKey, bool bDefault ) const
{
TQCString aValue = readEntryUtf8( pKey );
@@ -782,12 +782,12 @@ bool KConfigBase::readBoolEntry( const char *pKey, bool bDefault ) const
}
}
-TQFont KConfigBase::readFontEntry( const TQString& pKey, const TQFont* pDefault ) const
+TQFont TDEConfigBase::readFontEntry( const TQString& pKey, const TQFont* pDefault ) const
{
return readFontEntry(pKey.utf8().data(), pDefault);
}
-TQFont KConfigBase::readFontEntry( const char *pKey, const TQFont* pDefault ) const
+TQFont TDEConfigBase::readFontEntry( const char *pKey, const TQFont* pDefault ) const
{
TQFont aRetFont;
@@ -879,12 +879,12 @@ TQFont KConfigBase::readFontEntry( const char *pKey, const TQFont* pDefault ) co
}
-TQRect KConfigBase::readRectEntry( const TQString& pKey, const TQRect* pDefault ) const
+TQRect TDEConfigBase::readRectEntry( const TQString& pKey, const TQRect* pDefault ) const
{
return readRectEntry(pKey.utf8().data(), pDefault);
}
-TQRect KConfigBase::readRectEntry( const char *pKey, const TQRect* pDefault ) const
+TQRect TDEConfigBase::readRectEntry( const char *pKey, const TQRect* pDefault ) const
{
TQCString aValue = readEntryUtf8(pKey);
@@ -903,13 +903,13 @@ TQRect KConfigBase::readRectEntry( const char *pKey, const TQRect* pDefault ) co
}
-TQPoint KConfigBase::readPointEntry( const TQString& pKey,
+TQPoint TDEConfigBase::readPointEntry( const TQString& pKey,
const TQPoint* pDefault ) const
{
return readPointEntry(pKey.utf8().data(), pDefault);
}
-TQPoint KConfigBase::readPointEntry( const char *pKey,
+TQPoint TDEConfigBase::readPointEntry( const char *pKey,
const TQPoint* pDefault ) const
{
TQCString aValue = readEntryUtf8(pKey);
@@ -928,13 +928,13 @@ TQPoint KConfigBase::readPointEntry( const char *pKey,
return TQPoint();
}
-TQSize KConfigBase::readSizeEntry( const TQString& pKey,
+TQSize TDEConfigBase::readSizeEntry( const TQString& pKey,
const TQSize* pDefault ) const
{
return readSizeEntry(pKey.utf8().data(), pDefault);
}
-TQSize KConfigBase::readSizeEntry( const char *pKey,
+TQSize TDEConfigBase::readSizeEntry( const char *pKey,
const TQSize* pDefault ) const
{
TQCString aValue = readEntryUtf8(pKey);
@@ -954,13 +954,13 @@ TQSize KConfigBase::readSizeEntry( const char *pKey,
}
-TQColor KConfigBase::readColorEntry( const TQString& pKey,
+TQColor TDEConfigBase::readColorEntry( const TQString& pKey,
const TQColor* pDefault ) const
{
return readColorEntry(pKey.utf8().data(), pDefault);
}
-TQColor KConfigBase::readColorEntry( const char *pKey,
+TQColor TDEConfigBase::readColorEntry( const char *pKey,
const TQColor* pDefault ) const
{
TQColor aRetColor;
@@ -1019,14 +1019,14 @@ TQColor KConfigBase::readColorEntry( const char *pKey,
}
-TQDateTime KConfigBase::readDateTimeEntry( const TQString& pKey,
+TQDateTime TDEConfigBase::readDateTimeEntry( const TQString& pKey,
const TQDateTime* pDefault ) const
{
return readDateTimeEntry(pKey.utf8().data(), pDefault);
}
// ### currentDateTime() as fallback ? (Harri)
-TQDateTime KConfigBase::readDateTimeEntry( const char *pKey,
+TQDateTime TDEConfigBase::readDateTimeEntry( const char *pKey,
const TQDateTime* pDefault ) const
{
if( !hasKey( pKey ) )
@@ -1051,7 +1051,7 @@ TQDateTime KConfigBase::readDateTimeEntry( const char *pKey,
return TQDateTime::currentDateTime();
}
-void KConfigBase::writeEntry( const TQString& pKey, const TQString& value,
+void TDEConfigBase::writeEntry( const TQString& pKey, const TQString& value,
bool bPersistent,
bool bGlobal,
bool bNLS )
@@ -1059,7 +1059,7 @@ void KConfigBase::writeEntry( const TQString& pKey, const TQString& value,
writeEntry(pKey.utf8().data(), value, bPersistent, bGlobal, bNLS);
}
-void KConfigBase::writeEntry( const char *pKey, const TQString& value,
+void TDEConfigBase::writeEntry( const char *pKey, const TQString& value,
bool bPersistent,
bool bGlobal,
bool bNLS )
@@ -1067,13 +1067,13 @@ void KConfigBase::writeEntry( const char *pKey, const TQString& value,
writeEntry(pKey, value, bPersistent, bGlobal, bNLS, false);
}
-void KConfigBase::writeEntry( const char *pKey, const TQString& value,
+void TDEConfigBase::writeEntry( const char *pKey, const TQString& value,
bool bPersistent,
bool bGlobal,
bool bNLS,
bool bExpand )
{
- // the KConfig object is dirty now
+ // the TDEConfig object is dirty now
// set this before any IO takes place so that if any derivative
// classes do caching, they won't try and flush the cache out
// from under us before we read. A race condition is still
@@ -1081,7 +1081,7 @@ void KConfigBase::writeEntry( const char *pKey, const TQString& value,
if( bPersistent )
setDirty(true);
- if (!bLocaleInitialized && KGlobal::locale())
+ if (!bLocaleInitialized && TDEGlobal::locale())
setLocale();
KEntryKey entryKey(mGroup, pKey);
@@ -1100,7 +1100,7 @@ void KConfigBase::writeEntry( const char *pKey, const TQString& value,
putData(entryKey, aEntryData, true);
}
-void KConfigBase::writePathEntry( const TQString& pKey, const TQString & path,
+void TDEConfigBase::writePathEntry( const TQString& pKey, const TQString & path,
bool bPersistent, bool bGlobal,
bool bNLS)
{
@@ -1152,7 +1152,7 @@ static TQString translatePath( TQString path )
path.remove(0,1);
}
- // we can not use KGlobal::dirs()->relativeLocation("home", path) here,
+ // we can not use TDEGlobal::dirs()->relativeLocation("home", path) here,
// since it would not recognize paths without a trailing '/'.
// All of the 3 following functions to return the user's home directory
// can return different paths. We have to test all them.
@@ -1171,21 +1171,21 @@ static TQString translatePath( TQString path )
return path;
}
-void KConfigBase::writePathEntry( const char *pKey, const TQString & path,
+void TDEConfigBase::writePathEntry( const char *pKey, const TQString & path,
bool bPersistent, bool bGlobal,
bool bNLS)
{
writeEntry(pKey, translatePath(path), bPersistent, bGlobal, bNLS, true);
}
-void KConfigBase::writePathEntry ( const TQString& pKey, const TQStringList &list,
+void TDEConfigBase::writePathEntry ( const TQString& pKey, const TQStringList &list,
char sep , bool bPersistent,
bool bGlobal, bool bNLS )
{
writePathEntry(pKey.utf8().data(), list, sep, bPersistent, bGlobal, bNLS);
}
-void KConfigBase::writePathEntry ( const char *pKey, const TQStringList &list,
+void TDEConfigBase::writePathEntry ( const char *pKey, const TQStringList &list,
char sep , bool bPersistent,
bool bGlobal, bool bNLS )
{
@@ -1204,25 +1204,25 @@ void KConfigBase::writePathEntry ( const char *pKey, const TQStringList &list,
writeEntry( pKey, new_list, sep, bPersistent, bGlobal, bNLS, true );
}
-void KConfigBase::deleteEntry( const TQString& pKey,
+void TDEConfigBase::deleteEntry( const TQString& pKey,
bool bNLS,
bool bGlobal)
{
deleteEntry(pKey.utf8().data(), bNLS, bGlobal);
}
-void KConfigBase::deleteEntry( const char *pKey,
+void TDEConfigBase::deleteEntry( const char *pKey,
bool bNLS,
bool bGlobal)
{
- // the KConfig object is dirty now
+ // the TDEConfig object is dirty now
// set this before any IO takes place so that if any derivative
// classes do caching, they won't try and flush the cache out
// from under us before we read. A race condition is still
// possible but minimized.
setDirty(true);
- if (!bLocaleInitialized && KGlobal::locale())
+ if (!bLocaleInitialized && TDEGlobal::locale())
setLocale();
KEntryKey entryKey(mGroup, pKey);
@@ -1237,7 +1237,7 @@ void KConfigBase::deleteEntry( const char *pKey,
putData(entryKey, aEntryData, true);
}
-bool KConfigBase::deleteGroup( const TQString& group, bool bDeep, bool bGlobal )
+bool TDEConfigBase::deleteGroup( const TQString& group, bool bDeep, bool bGlobal )
{
KEntryMap aEntryMap = internalEntryMap(group);
@@ -1268,14 +1268,14 @@ bool KConfigBase::deleteGroup( const TQString& group, bool bDeep, bool bGlobal )
return true;
}
-void KConfigBase::writeEntry ( const TQString& pKey, const TQVariant &prop,
+void TDEConfigBase::writeEntry ( const TQString& pKey, const TQVariant &prop,
bool bPersistent,
bool bGlobal, bool bNLS )
{
writeEntry(pKey.utf8().data(), prop, bPersistent, bGlobal, bNLS);
}
-void KConfigBase::writeEntry ( const char *pKey, const TQVariant &prop,
+void TDEConfigBase::writeEntry ( const char *pKey, const TQVariant &prop,
bool bPersistent,
bool bGlobal, bool bNLS )
{
@@ -1391,14 +1391,14 @@ void KConfigBase::writeEntry ( const char *pKey, const TQVariant &prop,
Q_ASSERT( 0 );
}
-void KConfigBase::writeEntry ( const TQString& pKey, const TQStrList &list,
+void TDEConfigBase::writeEntry ( const TQString& pKey, const TQStrList &list,
char sep , bool bPersistent,
bool bGlobal, bool bNLS )
{
writeEntry(pKey.utf8().data(), list, sep, bPersistent, bGlobal, bNLS);
}
-void KConfigBase::writeEntry ( const char *pKey, const TQStrList &list,
+void TDEConfigBase::writeEntry ( const char *pKey, const TQStrList &list,
char sep , bool bPersistent,
bool bGlobal, bool bNLS )
{
@@ -1431,21 +1431,21 @@ void KConfigBase::writeEntry ( const char *pKey, const TQStrList &list,
writeEntry( pKey, str_list, bPersistent, bGlobal, bNLS );
}
-void KConfigBase::writeEntry ( const TQString& pKey, const TQStringList &list,
+void TDEConfigBase::writeEntry ( const TQString& pKey, const TQStringList &list,
char sep , bool bPersistent,
bool bGlobal, bool bNLS )
{
writeEntry(pKey.utf8().data(), list, sep, bPersistent, bGlobal, bNLS);
}
-void KConfigBase::writeEntry ( const char *pKey, const TQStringList &list,
+void TDEConfigBase::writeEntry ( const char *pKey, const TQStringList &list,
char sep , bool bPersistent,
bool bGlobal, bool bNLS )
{
writeEntry(pKey, list, sep, bPersistent, bGlobal, bNLS, false);
}
-void KConfigBase::writeEntry ( const char *pKey, const TQStringList &list,
+void TDEConfigBase::writeEntry ( const char *pKey, const TQStringList &list,
char sep, bool bPersistent,
bool bGlobal, bool bNLS, bool bExpand )
{
@@ -1475,13 +1475,13 @@ void KConfigBase::writeEntry ( const char *pKey, const TQStringList &list,
writeEntry( pKey, str_list, bPersistent, bGlobal, bNLS, bExpand );
}
-void KConfigBase::writeEntry ( const TQString& pKey, const TQValueList<int> &list,
+void TDEConfigBase::writeEntry ( const TQString& pKey, const TQValueList<int> &list,
bool bPersistent, bool bGlobal, bool bNLS )
{
writeEntry(pKey.utf8().data(), list, bPersistent, bGlobal, bNLS);
}
-void KConfigBase::writeEntry ( const char *pKey, const TQValueList<int> &list,
+void TDEConfigBase::writeEntry ( const char *pKey, const TQValueList<int> &list,
bool bPersistent, bool bGlobal, bool bNLS )
{
TQStringList strlist;
@@ -1491,14 +1491,14 @@ void KConfigBase::writeEntry ( const char *pKey, const TQValueList<int> &list,
writeEntry(pKey, strlist, ',', bPersistent, bGlobal, bNLS );
}
-void KConfigBase::writeEntry( const TQString& pKey, int nValue,
+void TDEConfigBase::writeEntry( const TQString& pKey, int nValue,
bool bPersistent, bool bGlobal,
bool bNLS )
{
writeEntry( pKey, TQString::number(nValue), bPersistent, bGlobal, bNLS );
}
-void KConfigBase::writeEntry( const char *pKey, int nValue,
+void TDEConfigBase::writeEntry( const char *pKey, int nValue,
bool bPersistent, bool bGlobal,
bool bNLS )
{
@@ -1506,14 +1506,14 @@ void KConfigBase::writeEntry( const char *pKey, int nValue,
}
-void KConfigBase::writeEntry( const TQString& pKey, unsigned int nValue,
+void TDEConfigBase::writeEntry( const TQString& pKey, unsigned int nValue,
bool bPersistent, bool bGlobal,
bool bNLS )
{
writeEntry( pKey, TQString::number(nValue), bPersistent, bGlobal, bNLS );
}
-void KConfigBase::writeEntry( const char *pKey, unsigned int nValue,
+void TDEConfigBase::writeEntry( const char *pKey, unsigned int nValue,
bool bPersistent, bool bGlobal,
bool bNLS )
{
@@ -1521,14 +1521,14 @@ void KConfigBase::writeEntry( const char *pKey, unsigned int nValue,
}
-void KConfigBase::writeEntry( const TQString& pKey, long nValue,
+void TDEConfigBase::writeEntry( const TQString& pKey, long nValue,
bool bPersistent, bool bGlobal,
bool bNLS )
{
writeEntry( pKey, TQString::number(nValue), bPersistent, bGlobal, bNLS );
}
-void KConfigBase::writeEntry( const char *pKey, long nValue,
+void TDEConfigBase::writeEntry( const char *pKey, long nValue,
bool bPersistent, bool bGlobal,
bool bNLS )
{
@@ -1536,28 +1536,28 @@ void KConfigBase::writeEntry( const char *pKey, long nValue,
}
-void KConfigBase::writeEntry( const TQString& pKey, unsigned long nValue,
+void TDEConfigBase::writeEntry( const TQString& pKey, unsigned long nValue,
bool bPersistent, bool bGlobal,
bool bNLS )
{
writeEntry( pKey, TQString::number(nValue), bPersistent, bGlobal, bNLS );
}
-void KConfigBase::writeEntry( const char *pKey, unsigned long nValue,
+void TDEConfigBase::writeEntry( const char *pKey, unsigned long nValue,
bool bPersistent, bool bGlobal,
bool bNLS )
{
writeEntry( pKey, TQString::number(nValue), bPersistent, bGlobal, bNLS );
}
-void KConfigBase::writeEntry( const TQString& pKey, TQ_INT64 nValue,
+void TDEConfigBase::writeEntry( const TQString& pKey, TQ_INT64 nValue,
bool bPersistent, bool bGlobal,
bool bNLS )
{
writeEntry( pKey, TQString::number(nValue), bPersistent, bGlobal, bNLS );
}
-void KConfigBase::writeEntry( const char *pKey, TQ_INT64 nValue,
+void TDEConfigBase::writeEntry( const char *pKey, TQ_INT64 nValue,
bool bPersistent, bool bGlobal,
bool bNLS )
{
@@ -1565,21 +1565,21 @@ void KConfigBase::writeEntry( const char *pKey, TQ_INT64 nValue,
}
-void KConfigBase::writeEntry( const TQString& pKey, TQ_UINT64 nValue,
+void TDEConfigBase::writeEntry( const TQString& pKey, TQ_UINT64 nValue,
bool bPersistent, bool bGlobal,
bool bNLS )
{
writeEntry( pKey, TQString::number(nValue), bPersistent, bGlobal, bNLS );
}
-void KConfigBase::writeEntry( const char *pKey, TQ_UINT64 nValue,
+void TDEConfigBase::writeEntry( const char *pKey, TQ_UINT64 nValue,
bool bPersistent, bool bGlobal,
bool bNLS )
{
writeEntry( pKey, TQString::number(nValue), bPersistent, bGlobal, bNLS );
}
-void KConfigBase::writeEntry( const TQString& pKey, double nValue,
+void TDEConfigBase::writeEntry( const TQString& pKey, double nValue,
bool bPersistent, bool bGlobal,
char format, int precision,
bool bNLS )
@@ -1588,7 +1588,7 @@ void KConfigBase::writeEntry( const TQString& pKey, double nValue,
bPersistent, bGlobal, bNLS );
}
-void KConfigBase::writeEntry( const char *pKey, double nValue,
+void TDEConfigBase::writeEntry( const char *pKey, double nValue,
bool bPersistent, bool bGlobal,
char format, int precision,
bool bNLS )
@@ -1598,7 +1598,7 @@ void KConfigBase::writeEntry( const char *pKey, double nValue,
}
-void KConfigBase::writeEntry( const TQString& pKey, bool bValue,
+void TDEConfigBase::writeEntry( const TQString& pKey, bool bValue,
bool bPersistent,
bool bGlobal,
bool bNLS )
@@ -1606,7 +1606,7 @@ void KConfigBase::writeEntry( const TQString& pKey, bool bValue,
writeEntry(pKey.utf8().data(), bValue, bPersistent, bGlobal, bNLS);
}
-void KConfigBase::writeEntry( const char *pKey, bool bValue,
+void TDEConfigBase::writeEntry( const char *pKey, bool bValue,
bool bPersistent,
bool bGlobal,
bool bNLS )
@@ -1622,14 +1622,14 @@ void KConfigBase::writeEntry( const char *pKey, bool bValue,
}
-void KConfigBase::writeEntry( const TQString& pKey, const TQFont& rFont,
+void TDEConfigBase::writeEntry( const TQString& pKey, const TQFont& rFont,
bool bPersistent, bool bGlobal,
bool bNLS )
{
writeEntry(pKey.utf8().data(), rFont, bPersistent, bGlobal, bNLS);
}
-void KConfigBase::writeEntry( const char *pKey, const TQFont& rFont,
+void TDEConfigBase::writeEntry( const char *pKey, const TQFont& rFont,
bool bPersistent, bool bGlobal,
bool bNLS )
{
@@ -1637,14 +1637,14 @@ void KConfigBase::writeEntry( const char *pKey, const TQFont& rFont,
}
-void KConfigBase::writeEntry( const TQString& pKey, const TQRect& rRect,
+void TDEConfigBase::writeEntry( const TQString& pKey, const TQRect& rRect,
bool bPersistent, bool bGlobal,
bool bNLS )
{
writeEntry(pKey.utf8().data(), rRect, bPersistent, bGlobal, bNLS);
}
-void KConfigBase::writeEntry( const char *pKey, const TQRect& rRect,
+void TDEConfigBase::writeEntry( const char *pKey, const TQRect& rRect,
bool bPersistent, bool bGlobal,
bool bNLS )
{
@@ -1659,14 +1659,14 @@ void KConfigBase::writeEntry( const char *pKey, const TQRect& rRect,
}
-void KConfigBase::writeEntry( const TQString& pKey, const TQPoint& rPoint,
+void TDEConfigBase::writeEntry( const TQString& pKey, const TQPoint& rPoint,
bool bPersistent, bool bGlobal,
bool bNLS )
{
writeEntry(pKey.utf8().data(), rPoint, bPersistent, bGlobal, bNLS);
}
-void KConfigBase::writeEntry( const char *pKey, const TQPoint& rPoint,
+void TDEConfigBase::writeEntry( const char *pKey, const TQPoint& rPoint,
bool bPersistent, bool bGlobal,
bool bNLS )
{
@@ -1679,14 +1679,14 @@ void KConfigBase::writeEntry( const char *pKey, const TQPoint& rPoint,
}
-void KConfigBase::writeEntry( const TQString& pKey, const TQSize& rSize,
+void TDEConfigBase::writeEntry( const TQString& pKey, const TQSize& rSize,
bool bPersistent, bool bGlobal,
bool bNLS )
{
writeEntry(pKey.utf8().data(), rSize, bPersistent, bGlobal, bNLS);
}
-void KConfigBase::writeEntry( const char *pKey, const TQSize& rSize,
+void TDEConfigBase::writeEntry( const char *pKey, const TQSize& rSize,
bool bPersistent, bool bGlobal,
bool bNLS )
{
@@ -1698,7 +1698,7 @@ void KConfigBase::writeEntry( const char *pKey, const TQSize& rSize,
writeEntry( pKey, list, ',', bPersistent, bGlobal, bNLS );
}
-void KConfigBase::writeEntry( const TQString& pKey, const TQColor& rColor,
+void TDEConfigBase::writeEntry( const TQString& pKey, const TQColor& rColor,
bool bPersistent,
bool bGlobal,
bool bNLS )
@@ -1706,7 +1706,7 @@ void KConfigBase::writeEntry( const TQString& pKey, const TQColor& rColor,
writeEntry( pKey.utf8().data(), rColor, bPersistent, bGlobal, bNLS);
}
-void KConfigBase::writeEntry( const char *pKey, const TQColor& rColor,
+void TDEConfigBase::writeEntry( const char *pKey, const TQColor& rColor,
bool bPersistent,
bool bGlobal,
bool bNLS )
@@ -1720,14 +1720,14 @@ void KConfigBase::writeEntry( const char *pKey, const TQColor& rColor,
writeEntry( pKey, aValue, bPersistent, bGlobal, bNLS );
}
-void KConfigBase::writeEntry( const TQString& pKey, const TQDateTime& rDateTime,
+void TDEConfigBase::writeEntry( const TQString& pKey, const TQDateTime& rDateTime,
bool bPersistent, bool bGlobal,
bool bNLS )
{
writeEntry(pKey.utf8().data(), rDateTime, bPersistent, bGlobal, bNLS);
}
-void KConfigBase::writeEntry( const char *pKey, const TQDateTime& rDateTime,
+void TDEConfigBase::writeEntry( const char *pKey, const TQDateTime& rDateTime,
bool bPersistent, bool bGlobal,
bool bNLS )
{
@@ -1748,9 +1748,9 @@ void KConfigBase::writeEntry( const char *pKey, const TQDateTime& rDateTime,
writeEntry( pKey, list, ',', bPersistent, bGlobal, bNLS );
}
-void KConfigBase::parseConfigFiles()
+void TDEConfigBase::parseConfigFiles()
{
- if (!bLocaleInitialized && KGlobal::_locale) {
+ if (!bLocaleInitialized && TDEGlobal::_locale) {
setLocale();
}
if (backEnd)
@@ -1760,7 +1760,7 @@ void KConfigBase::parseConfigFiles()
}
}
-void KConfigBase::sync()
+void TDEConfigBase::sync()
{
if (isReadOnly())
return;
@@ -1771,35 +1771,35 @@ void KConfigBase::sync()
rollback();
}
-KConfigBase::ConfigState KConfigBase::getConfigState() const {
+TDEConfigBase::ConfigState TDEConfigBase::getConfigState() const {
if (backEnd)
return backEnd->getConfigState();
return ReadOnly;
}
-void KConfigBase::rollback( bool /*bDeep = true*/ )
+void TDEConfigBase::rollback( bool /*bDeep = true*/ )
{
bDirty = false;
}
-void KConfigBase::setReadDefaults(bool b)
+void TDEConfigBase::setReadDefaults(bool b)
{
if (!d)
{
if (!b) return;
- d = new KConfigBasePrivate();
+ d = new TDEConfigBasePrivate();
}
d->readDefaults = b;
}
-bool KConfigBase::readDefaults() const
+bool TDEConfigBase::readDefaults() const
{
return (d && d->readDefaults);
}
-void KConfigBase::revertToDefault(const TQString &key)
+void TDEConfigBase::revertToDefault(const TQString &key)
{
setDirty(true);
@@ -1826,7 +1826,7 @@ void KConfigBase::revertToDefault(const TQString &key)
putData(aEntryKey, entry, true); // Revert
}
-bool KConfigBase::hasDefault(const TQString &key) const
+bool TDEConfigBase::hasDefault(const TQString &key) const
{
KEntryKey aEntryKey(mGroup, key.utf8());
aEntryKey.bDefault = true;
@@ -1851,7 +1851,7 @@ bool KConfigBase::hasDefault(const TQString &key) const
-KConfigGroup::KConfigGroup(KConfigBase *master, const TQString &group)
+TDEConfigGroup::TDEConfigGroup(TDEConfigBase *master, const TQString &group)
{
mMaster = master;
backEnd = mMaster->backEnd; // Needed for getConfigState()
@@ -1864,7 +1864,7 @@ KConfigGroup::KConfigGroup(KConfigBase *master, const TQString &group)
setReadDefaults(mMaster->readDefaults());
}
-KConfigGroup::KConfigGroup(KConfigBase *master, const TQCString &group)
+TDEConfigGroup::TDEConfigGroup(TDEConfigBase *master, const TQCString &group)
{
mMaster = master;
backEnd = mMaster->backEnd; // Needed for getConfigState()
@@ -1877,7 +1877,7 @@ KConfigGroup::KConfigGroup(KConfigBase *master, const TQCString &group)
setReadDefaults(mMaster->readDefaults());
}
-KConfigGroup::KConfigGroup(KConfigBase *master, const char * group)
+TDEConfigGroup::TDEConfigGroup(TDEConfigBase *master, const char * group)
{
mMaster = master;
backEnd = mMaster->backEnd; // Needed for getConfigState()
@@ -1890,43 +1890,43 @@ KConfigGroup::KConfigGroup(KConfigBase *master, const char * group)
setReadDefaults(mMaster->readDefaults());
}
-void KConfigGroup::deleteGroup(bool bGlobal)
+void TDEConfigGroup::deleteGroup(bool bGlobal)
{
- mMaster->deleteGroup(KConfigBase::group(), true, bGlobal);
+ mMaster->deleteGroup(TDEConfigBase::group(), true, bGlobal);
}
-bool KConfigGroup::groupIsImmutable() const
+bool TDEConfigGroup::groupIsImmutable() const
{
- return mMaster->groupIsImmutable(KConfigBase::group());
+ return mMaster->groupIsImmutable(TDEConfigBase::group());
}
-void KConfigGroup::setDirty(bool _bDirty)
+void TDEConfigGroup::setDirty(bool _bDirty)
{
mMaster->setDirty(_bDirty);
}
-void KConfigGroup::putData(const KEntryKey &_key, const KEntry &_data, bool _checkGroup)
+void TDEConfigGroup::putData(const KEntryKey &_key, const KEntry &_data, bool _checkGroup)
{
mMaster->putData(_key, _data, _checkGroup);
}
-KEntry KConfigGroup::lookupData(const KEntryKey &_key) const
+KEntry TDEConfigGroup::lookupData(const KEntryKey &_key) const
{
return mMaster->lookupData(_key);
}
-void KConfigGroup::sync()
+void TDEConfigGroup::sync()
{
mMaster->sync();
}
-void KConfigBase::virtual_hook( int, void* )
+void TDEConfigBase::virtual_hook( int, void* )
{ /*BASE::virtual_hook( id, data );*/ }
-void KConfigGroup::virtual_hook( int id, void* data )
-{ KConfigBase::virtual_hook( id, data ); }
+void TDEConfigGroup::virtual_hook( int id, void* data )
+{ TDEConfigBase::virtual_hook( id, data ); }
-bool KConfigBase::checkConfigFilesWritable(bool warnUser)
+bool TDEConfigBase::checkConfigFilesWritable(bool warnUser)
{
if (backEnd)
return backEnd->checkConfigFilesWritable(warnUser);
@@ -1934,4 +1934,4 @@ bool KConfigBase::checkConfigFilesWritable(bool warnUser)
return false;
}
-#include "kconfigbase.moc"
+#include "tdeconfigbase.moc"
diff --git a/tdecore/kconfigbase.h b/tdecore/tdeconfigbase.h
index 7c0706e46..1166703ce 100644
--- a/tdecore/kconfigbase.h
+++ b/tdecore/tdeconfigbase.h
@@ -32,28 +32,28 @@
#include <tqvariant.h>
#include <tqmap.h>
-#include "kconfigdata.h"
+#include "tdeconfigdata.h"
#include "tdelibs_export.h"
-class KConfigBackEnd;
-class KConfigBasePrivate;
-class KConfigGroup;
+class TDEConfigBackEnd;
+class TDEConfigBasePrivate;
+class TDEConfigGroup;
/**
* @short KDE Configuration Management abstract base class
*
* This class forms the base for all %KDE configuration. It is an
* abstract base class, meaning that you cannot directly instantiate
- * objects of this class. Either use KConfig (for usual %KDE
+ * objects of this class. Either use TDEConfig (for usual %KDE
* configuration) or KSimpleConfig (for special needs as in ksamba), or
- * even KSharedConfig (stores values in shared memory).
+ * even TDESharedConfig (stores values in shared memory).
*
* All configuration entries are key, value pairs. Each entry also
* belongs to a specific group of related entries. All configuration
* entries that do not explicitly specify which group they are in are
* in a special group called the default group.
*
- * If there is a $ character in an entry, KConfigBase tries to expand
+ * If there is a $ character in an entry, TDEConfigBase tries to expand
* environment variable and uses its value instead of its name. You
* can avoid this feature by having two consecutive $ characters in
* your config file which get expanded to one.
@@ -62,30 +62,30 @@ class KConfigGroup;
* a group name.
*
* @author Kalle Dalheimer <kalle@kde.org>, Preston Brown <pbrown@kde.org>
- * @see KGlobal#config()
- * @see KConfig
+ * @see TDEGlobal#config()
+ * @see TDEConfig
* @see KSimpleConfig
- * @see KSharedConfig
+ * @see TDESharedConfig
*/
-class TDECORE_EXPORT KConfigBase : public TQObject
+class TDECORE_EXPORT TDEConfigBase : public TQObject
{
Q_OBJECT
- friend class KConfigBackEnd;
- friend class KConfigINIBackEnd;
- friend class KConfigGroup;
+ friend class TDEConfigBackEnd;
+ friend class TDEConfigINIBackEnd;
+ friend class TDEConfigGroup;
public:
/**
- * Construct a KConfigBase object.
+ * Construct a TDEConfigBase object.
*/
- KConfigBase();
+ TDEConfigBase();
/**
- * Destructs the KConfigBase object.
+ * Destructs the TDEConfigBase object.
*/
- virtual ~KConfigBase();
+ virtual ~TDEConfigBase();
/**
* Specifies the group in which keys will be read and written.
@@ -1670,7 +1670,7 @@ public:
/**
- * Turns on or off "dollar expansion" (see KConfigBase introduction)
+ * Turns on or off "dollar expansion" (see TDEConfigBase introduction)
* when reading config entries.
* Dollar sign expansion is initially OFF.
*
@@ -1688,13 +1688,13 @@ public:
/**
* Mark the config object as "clean," i.e. don't write dirty entries
* at destruction time. If @p bDeep is false, only the global dirty
- * flag of the KConfig object gets cleared. If you then call
+ * flag of the TDEConfig object gets cleared. If you then call
* writeEntry() again, the global dirty flag is set again and all
* dirty entries will be written at a subsequent sync() call.
*
- * Classes that derive from KConfigBase should override this
+ * Classes that derive from TDEConfigBase should override this
* method and implement storage-specific behavior, as well as
- * calling the KConfigBase::rollback() explicitly in the initializer.
+ * calling the TDEConfigBase::rollback() explicitly in the initializer.
*
* @param bDeep If true, the dirty flags of all entries are cleared,
* as well as the global dirty flag.
@@ -1887,7 +1887,7 @@ protected:
/**
* Reads the locale and put in the configuration data struct.
* Note that this should be done in the constructor, but this is not
- * possible due to some mutual dependencies in KApplication::init()
+ * possible due to some mutual dependencies in TDEApplication::init()
*/
void setLocale();
@@ -1901,7 +1901,7 @@ protected:
/**
* Parses all configuration files for a configuration object.
*
- * The actual parsing is done by the associated KConfigBackEnd.
+ * The actual parsing is done by the associated TDEConfigBackEnd.
*/
virtual void parseConfigFiles();
@@ -1937,7 +1937,7 @@ protected:
/**
* Inserts a (key/value) pair into the internal storage mechanism of
- * the configuration object. Classes that derive from KConfigBase
+ * the configuration object. Classes that derive from TDEConfigBase
* will need to implement this method in a storage-specific manner.
*
* Do not use this function, the implementation / return type are
@@ -1954,7 +1954,7 @@ protected:
/**
* Looks up an entry in the config object's internal structure.
- * Classes that derive from KConfigBase will need to implement this
+ * Classes that derive from TDEConfigBase will need to implement this
* method in a storage-specific manner.
*
* Do not use this function, the implementation and return type are
@@ -1973,7 +1973,7 @@ protected:
/**
* A back end for loading/saving to disk in a particular format.
*/
- KConfigBackEnd *backEnd;
+ TDEConfigBackEnd *backEnd;
public:
/**
* Overloaded public methods:
@@ -2008,8 +2008,8 @@ protected:
protected:
virtual void virtual_hook( int id, void* data );
private:
- class KConfigBasePrivate;
- KConfigBasePrivate *d;
+ class TDEConfigBasePrivate;
+ TDEConfigBasePrivate *d;
void writeEntry( const char *pKey, const TQString &rValue,
bool bPersistent, bool bGlobal, bool bNLS, bool bExpand );
@@ -2018,14 +2018,14 @@ private:
};
-class KConfigGroupSaverPrivate;
+class TDEConfigGroupSaverPrivate;
/**
- * Helper class to facilitate working with KConfig / KSimpleConfig
+ * Helper class to facilitate working with TDEConfig / KSimpleConfig
* groups.
*
* Careful programmers always set the group of a
- * KConfig KSimpleConfig object to the group they want to read from
+ * TDEConfig KSimpleConfig object to the group they want to read from
* and set it back to the old one of afterwards. This is usually
* written as:
* \code
@@ -2039,82 +2039,82 @@ class KConfigGroupSaverPrivate;
* \endcode
*
* In order to facilitate this task, you can use
- * KConfigGroupSaver. Simply construct such an object ON THE STACK
+ * TDEConfigGroupSaver. Simply construct such an object ON THE STACK
* when you want to switch to a new group. Then, when the object goes
* out of scope, the group will automatically be restored. If you
* want to use several different groups within a function or method,
- * you can still use KConfigGroupSaver: Simply enclose all work with
- * one group (including the creation of the KConfigGroupSaver object)
+ * you can still use TDEConfigGroupSaver: Simply enclose all work with
+ * one group (including the creation of the TDEConfigGroupSaver object)
* in one block.
*
* @deprecated This class is deprecated and will be removed in KDE 4.
- * KConfigGroup provides similar functionality in a more object oriented
+ * TDEConfigGroup provides similar functionality in a more object oriented
* way.
*
* @author Matthias Kalle Dalheimer <kalle@kde.org>
- * @see KConfigBase, KConfig, KSimpleConfig, KConfigGroup
- * @short Helper class for easier use of KConfig/KSimpleConfig groups
+ * @see TDEConfigBase, TDEConfig, KSimpleConfig, TDEConfigGroup
+ * @short Helper class for easier use of TDEConfig/KSimpleConfig groups
*/
-class TDECORE_EXPORT KConfigGroupSaver // KDE4 remove
+class TDECORE_EXPORT TDEConfigGroupSaver // KDE4 remove
{
public:
/**
- * Constructor. You pass a pointer to the KConfigBase-derived
+ * Constructor. You pass a pointer to the TDEConfigBase-derived
* object you want to work with and a string indicating the _new_
* group.
*
- * @param config The KConfigBase-derived object this
- * KConfigGroupSaver works on.
+ * @param config The TDEConfigBase-derived object this
+ * TDEConfigGroupSaver works on.
* @param group The new group that the config object should switch to.
*/
- KConfigGroupSaver( KConfigBase* config, TQString group )
+ TDEConfigGroupSaver( TDEConfigBase* config, TQString group )
/* KDE 4 : make the second parameter const TQString & */
: _config(config), _oldgroup(config->group())
{ _config->setGroup( group ); }
- KConfigGroupSaver( KConfigBase* config, const char *group )
+ TDEConfigGroupSaver( TDEConfigBase* config, const char *group )
: _config(config), _oldgroup(config->group())
{ _config->setGroup( group ); }
- KConfigGroupSaver( KConfigBase* config, const TQCString &group )
+ TDEConfigGroupSaver( TDEConfigBase* config, const TQCString &group )
: _config(config), _oldgroup(config->group())
{ _config->setGroup( group ); }
- ~KConfigGroupSaver() { _config->setGroup( _oldgroup ); }
+ ~TDEConfigGroupSaver() { _config->setGroup( _oldgroup ); }
- KConfigBase* config() { return _config; };
+ TDEConfigBase* config() { return _config; };
private:
- KConfigBase* _config;
+ TDEConfigBase* _config;
TQString _oldgroup;
- KConfigGroupSaver(const KConfigGroupSaver&);
- KConfigGroupSaver& operator=(const KConfigGroupSaver&);
+ TDEConfigGroupSaver(const TDEConfigGroupSaver&);
+ TDEConfigGroupSaver& operator=(const TDEConfigGroupSaver&);
- KConfigGroupSaverPrivate *d;
+ TDEConfigGroupSaverPrivate *d;
};
-class KConfigGroupPrivate;
+class TDEConfigGroupPrivate;
/**
- * A KConfigBase derived class for one specific group in a KConfig object.
+ * A TDEConfigBase derived class for one specific group in a TDEConfig object.
*/
-class TDECORE_EXPORT KConfigGroup: public KConfigBase
+class TDECORE_EXPORT TDEConfigGroup: public TDEConfigBase
{
public:
/**
* Construct a config group corresponding to @p group in @p master.
* @p group is the group name encoded in UTF-8.
*/
- KConfigGroup(KConfigBase *master, const TQCString &group);
+ TDEConfigGroup(TDEConfigBase *master, const TQCString &group);
/**
* This is an overloaded constructor provided for convenience.
* It behaves essentially like the above function.
*
* Construct a config group corresponding to @p group in @p master
*/
- KConfigGroup(KConfigBase *master, const TQString &group);
+ TDEConfigGroup(TDEConfigBase *master, const TQString &group);
/**
* This is an overloaded constructor provided for convenience.
* It behaves essentially like the above function.
@@ -2122,7 +2122,7 @@ public:
* Construct a config group corresponding to @p group in @p master
* @p group is the group name encoded in UTF-8.
*/
- KConfigGroup(KConfigBase *master, const char * group);
+ TDEConfigGroup(TDEConfigBase *master, const char * group);
/**
* Delete all entries in the entire group
@@ -2170,11 +2170,11 @@ private:
void getConfigState() { }
- KConfigBase *mMaster;
+ TDEConfigBase *mMaster;
protected:
virtual void virtual_hook( int id, void* data );
private:
- KConfigGroupPrivate* d;
+ TDEConfigGroupPrivate* d;
};
#endif
diff --git a/tdecore/kconfigdata.h b/tdecore/tdeconfigdata.h
index f99f72c08..f99f72c08 100644
--- a/tdecore/kconfigdata.h
+++ b/tdecore/tdeconfigdata.h
diff --git a/tdecore/kconfigdialogmanager.cpp b/tdecore/tdeconfigdialogmanager.cpp
index 82567ca0b..9578c05c1 100644
--- a/tdecore/kconfigdialogmanager.cpp
+++ b/tdecore/tdeconfigdialogmanager.cpp
@@ -19,7 +19,7 @@
* Boston, MA 02110-1301, USA.
*/
-#include "kconfigdialogmanager.h"
+#include "tdeconfigdialogmanager.h"
#include <tqbuttongroup.h>
#include <tqcombobox.h>
@@ -30,14 +30,14 @@
#include <tqtimer.h>
#include <tqwhatsthis.h>
-#include <kapplication.h>
-#include <kconfigskeleton.h>
+#include <tdeapplication.h>
+#include <tdeconfigskeleton.h>
#include <kdebug.h>
-#include <kglobal.h>
+#include <tdeglobal.h>
#include <assert.h>
-class KConfigDialogManager::Private {
+class TDEConfigDialogManager::Private {
public:
Private() : insideGroupBox(false) { }
@@ -48,7 +48,7 @@ public:
bool insideGroupBox;
};
-KConfigDialogManager::KConfigDialogManager(TQWidget *parent, KConfigSkeleton *conf, const char *name)
+TDEConfigDialogManager::TDEConfigDialogManager(TQWidget *parent, TDEConfigSkeleton *conf, const char *name)
: TQObject(parent, name), m_conf(conf), m_dialog(parent)
{
d = new Private();
@@ -59,12 +59,12 @@ KConfigDialogManager::KConfigDialogManager(TQWidget *parent, KConfigSkeleton *co
init(true);
}
-KConfigDialogManager::~KConfigDialogManager()
+TDEConfigDialogManager::~TDEConfigDialogManager()
{
delete d;
}
-void KConfigDialogManager::init(bool trackChanges)
+void TDEConfigDialogManager::init(bool trackChanges)
{
if(trackChanges)
{
@@ -95,9 +95,9 @@ void KConfigDialogManager::init(bool trackChanges)
// KDE
changedMap.insert( "KComboBox", TQT_SIGNAL(activated (int)));
- changedMap.insert( "KFontCombo", TQT_SIGNAL(activated (int)));
- changedMap.insert( "KFontRequester", TQT_SIGNAL(fontSelected(const TQFont &)));
- changedMap.insert( "KFontChooser", TQT_SIGNAL(fontSelected(const TQFont &)));
+ changedMap.insert( "TDEFontCombo", TQT_SIGNAL(activated (int)));
+ changedMap.insert( "TDEFontRequester", TQT_SIGNAL(fontSelected(const TQFont &)));
+ changedMap.insert( "TDEFontChooser", TQT_SIGNAL(fontSelected(const TQFont &)));
changedMap.insert( "KHistoryCombo", TQT_SIGNAL(activated (int)));
changedMap.insert( "KColorButton", TQT_SIGNAL(changed(const TQColor &)));
@@ -105,7 +105,7 @@ void KConfigDialogManager::init(bool trackChanges)
changedMap.insert( "KDateWidget", TQT_SIGNAL(changed (TQDate)));
changedMap.insert( "KDateTimeWidget", TQT_SIGNAL(valueChanged (const TQDateTime &)));
changedMap.insert( "KEditListBox", TQT_SIGNAL(changed()));
- changedMap.insert( "KListBox", TQT_SIGNAL(selectionChanged()));
+ changedMap.insert( "TDEListBox", TQT_SIGNAL(selectionChanged()));
changedMap.insert( "KLineEdit", TQT_SIGNAL(textChanged(const TQString &)));
changedMap.insert( "KPasswordEdit", TQT_SIGNAL(textChanged(const TQString &)));
changedMap.insert( "KRestrictedLine", TQT_SIGNAL(textChanged(const TQString &)));
@@ -121,12 +121,12 @@ void KConfigDialogManager::init(bool trackChanges)
(void) parseChildren(m_dialog, trackChanges);
}
-void KConfigDialogManager::addWidget(TQWidget *widget)
+void TDEConfigDialogManager::addWidget(TQWidget *widget)
{
(void) parseChildren(widget, true);
}
-void KConfigDialogManager::setupWidget(TQWidget *widget, KConfigSkeletonItem *item)
+void TDEConfigDialogManager::setupWidget(TQWidget *widget, TDEConfigSkeletonItem *item)
{
TQVariant minValue = item->minValue();
if (minValue.isValid())
@@ -150,7 +150,7 @@ void KConfigDialogManager::setupWidget(TQWidget *widget, KConfigSkeletonItem *it
}
}
-bool KConfigDialogManager::parseChildren(const TQWidget *widget, bool trackChanges)
+bool TDEConfigDialogManager::parseChildren(const TQWidget *widget, bool trackChanges)
{
bool valueChanged = false;
const TQObjectList listOfChildren = widget->childrenListObject();
@@ -174,7 +174,7 @@ bool KConfigDialogManager::parseChildren(const TQWidget *widget, bool trackChang
{
// This is one of our widgets!
TQString configId = widgetName+5;
- KConfigSkeletonItem *item = m_conf->findItem(configId);
+ TDEConfigSkeletonItem *item = m_conf->findItem(configId);
if (item)
{
d->knownWidget.insert(configId, childWidget);
@@ -187,7 +187,7 @@ bool KConfigDialogManager::parseChildren(const TQWidget *widget, bool trackChang
{
// If the class name of the widget wasn't in the monitored widgets map, then look for
// it again using the super class name. This fixes a problem with using QtRuby/Korundum
- // widgets with KConfigXT where 'Qt::Widget' wasn't being seen a the real deal, even
+ // widgets with TDEConfigXT where 'Qt::Widget' wasn't being seen a the real deal, even
// though it was a 'QWidget'.
changedIt = changedMap.find(childWidget->metaObject()->superClassName());
}
@@ -256,7 +256,7 @@ bool KConfigDialogManager::parseChildren(const TQWidget *widget, bool trackChang
return valueChanged;
}
-void KConfigDialogManager::updateWidgets()
+void TDEConfigDialogManager::updateWidgets()
{
bool changed = false;
bool bSignalsBlocked = signalsBlocked();
@@ -266,7 +266,7 @@ void KConfigDialogManager::updateWidgets()
for( TQDictIterator<TQWidget> it( d->knownWidget );
(widget = it.current()); ++it )
{
- KConfigSkeletonItem *item = m_conf->findItem(it.currentKey());
+ TDEConfigSkeletonItem *item = m_conf->findItem(it.currentKey());
if (!item)
{
kdWarning(178) << "The setting '" << it.currentKey() << "' has disappeared!" << endl;
@@ -294,14 +294,14 @@ void KConfigDialogManager::updateWidgets()
TQTimer::singleShot(0, this, TQT_SIGNAL(widgetModified()));
}
-void KConfigDialogManager::updateWidgetsDefault()
+void TDEConfigDialogManager::updateWidgetsDefault()
{
bool bUseDefaults = m_conf->useDefaults(true);
updateWidgets();
m_conf->useDefaults(bUseDefaults);
}
-void KConfigDialogManager::updateSettings()
+void TDEConfigDialogManager::updateSettings()
{
bool changed = false;
@@ -309,7 +309,7 @@ void KConfigDialogManager::updateSettings()
for( TQDictIterator<TQWidget> it( d->knownWidget );
(widget = it.current()); ++it )
{
- KConfigSkeletonItem *item = m_conf->findItem(it.currentKey());
+ TDEConfigSkeletonItem *item = m_conf->findItem(it.currentKey());
if (!item)
{
kdWarning(178) << "The setting '" << it.currentKey() << "' has disappeared!" << endl;
@@ -330,7 +330,7 @@ void KConfigDialogManager::updateSettings()
}
}
-void KConfigDialogManager::setProperty(TQWidget *w, const TQVariant &v)
+void TDEConfigDialogManager::setProperty(TQWidget *w, const TQVariant &v)
{
TQButtonGroup *bg = dynamic_cast<TQButtonGroup *>(w);
if (bg)
@@ -349,7 +349,7 @@ void KConfigDialogManager::setProperty(TQWidget *w, const TQVariant &v)
propertyMap->setProperty(w, v);
}
-TQVariant KConfigDialogManager::property(TQWidget *w)
+TQVariant TDEConfigDialogManager::property(TQWidget *w)
{
TQButtonGroup *bg = dynamic_cast<TQButtonGroup *>(w);
if (bg)
@@ -362,14 +362,14 @@ TQVariant KConfigDialogManager::property(TQWidget *w)
return propertyMap->property(w);
}
-bool KConfigDialogManager::hasChanged()
+bool TDEConfigDialogManager::hasChanged()
{
TQWidget *widget;
for( TQDictIterator<TQWidget> it( d->knownWidget );
(widget = it.current()); ++it )
{
- KConfigSkeletonItem *item = m_conf->findItem(it.currentKey());
+ TDEConfigSkeletonItem *item = m_conf->findItem(it.currentKey());
if (!item)
{
kdWarning(178) << "The setting '" << it.currentKey() << "' has disappeared!" << endl;
@@ -386,7 +386,7 @@ bool KConfigDialogManager::hasChanged()
return false;
}
-bool KConfigDialogManager::isDefault()
+bool TDEConfigDialogManager::isDefault()
{
bool bUseDefaults = m_conf->useDefaults(true);
bool result = !hasChanged();
@@ -394,5 +394,5 @@ bool KConfigDialogManager::isDefault()
return result;
}
-#include "kconfigdialogmanager.moc"
+#include "tdeconfigdialogmanager.moc"
diff --git a/tdecore/kconfigdialogmanager.h b/tdecore/tdeconfigdialogmanager.h
index cc2238d4c..1b82e9eda 100644
--- a/tdecore/kconfigdialogmanager.h
+++ b/tdecore/tdeconfigdialogmanager.h
@@ -25,28 +25,28 @@
#include <tqptrlist.h>
#include "tdelibs_export.h"
-class KConfigSkeleton;
-class KConfigSkeletonItem;
+class TDEConfigSkeleton;
+class TDEConfigSkeletonItem;
class TQWidget;
class TQSqlPropertyMap;
/**
* @short Provides a means of automatically retrieving,
- * saving and resetting KConfigSkeleton based settings in a dialog.
+ * saving and resetting TDEConfigSkeleton based settings in a dialog.
*
- * The KConfigDialogManager class provides a means of automatically
+ * The TDEConfigDialogManager class provides a means of automatically
* retrieving, saving and resetting basic settings.
* It also can emit signals when settings have been changed
* (settings were saved) or modified (the user changes a checkbox
* from on to off).
*
* The names of the widgets to be managed have to correspond to the names of the
- * configuration entries in the KConfigSkeleton object plus an additional
+ * configuration entries in the TDEConfigSkeleton object plus an additional
* "kcfg_" prefix. For example a widget named "kcfg_MyOption" would be
* associated to the configuration entry "MyOption".
*
- * KConfigDialogManager uses the TQSqlPropertyMap class to determine if it can do
- * anything to a widget. Note that KConfigDialogManager doesn't require a
+ * TDEConfigDialogManager uses the TQSqlPropertyMap class to determine if it can do
+ * anything to a widget. Note that TDEConfigDialogManager doesn't require a
* database, it simply uses the functionality that is built into the
* TQSqlPropertyMap class. New widgets can be added to the map using
* TQSqlPropertyMap::installDefaultMap(). Note that you can't just add any
@@ -75,7 +75,7 @@ class TQSqlPropertyMap;
* @author Benjamin C Meyer <ben+tdelibs at meyerhome dot net>
* @author Waldo Bastian <bastian@kde.org>
*/
-class TDECORE_EXPORT KConfigDialogManager : public TQObject {
+class TDECORE_EXPORT TDEConfigDialogManager : public TQObject {
Q_OBJECT
@@ -114,12 +114,12 @@ public:
* @param conf Object that contains settings
* @param name - Object name.
*/
- KConfigDialogManager(TQWidget *parent, KConfigSkeleton *conf, const char *name=0);
+ TDEConfigDialogManager(TQWidget *parent, TDEConfigSkeleton *conf, const char *name=0);
/**
* Destructor.
*/
- ~KConfigDialogManager();
+ ~TDEConfigDialogManager();
/**
* Add additional widgets to manage
@@ -200,13 +200,13 @@ protected:
/**
* Setup secondary widget properties
*/
- void setupWidget(TQWidget *widget, KConfigSkeletonItem *item);
+ void setupWidget(TQWidget *widget, TDEConfigSkeletonItem *item);
protected:
/**
- * KConfigSkeleton object used to store settings
+ * TDEConfigSkeleton object used to store settings
*/
- KConfigSkeleton *m_conf;
+ TDEConfigSkeleton *m_conf;
/**
* Dialog being managed
@@ -226,7 +226,7 @@ protected:
private:
class Private;
/**
- * KConfigDialogManager Private class.
+ * TDEConfigDialogManager Private class.
*/
Private *d;
diff --git a/tdecore/kconfigskeleton.cpp b/tdecore/tdeconfigskeleton.cpp
index b464f64d2..45a4b4112 100644
--- a/tdecore/kconfigskeleton.cpp
+++ b/tdecore/tdeconfigskeleton.cpp
@@ -22,32 +22,32 @@
#include <tqcolor.h>
#include <tqvariant.h>
-#include <kconfig.h>
+#include <tdeconfig.h>
#include <kstandarddirs.h>
-#include <kglobal.h>
-#include <kglobalsettings.h>
+#include <tdeglobal.h>
+#include <tdeglobalsettings.h>
#include <kdebug.h>
#include "kstringhandler.h"
-#include "kconfigskeleton.h"
+#include "tdeconfigskeleton.h"
-void KConfigSkeletonItem::readImmutability( KConfig *config )
+void TDEConfigSkeletonItem::readImmutability( TDEConfig *config )
{
mIsImmutable = config->entryIsImmutable( mKey );
}
-KConfigSkeleton::ItemString::ItemString( const TQString &group, const TQString &key,
+TDEConfigSkeleton::ItemString::ItemString( const TQString &group, const TQString &key,
TQString &reference,
const TQString &defaultValue,
Type type )
- : KConfigSkeletonGenericItem<TQString>( group, key, reference, defaultValue ),
+ : TDEConfigSkeletonGenericItem<TQString>( group, key, reference, defaultValue ),
mType( type )
{
}
-void KConfigSkeleton::ItemString::writeConfig( KConfig *config )
+void TDEConfigSkeleton::ItemString::writeConfig( TDEConfig *config )
{
if ( mReference != mLoadedValue ) // WABA: Is this test needed?
{
@@ -64,7 +64,7 @@ void KConfigSkeleton::ItemString::writeConfig( KConfig *config )
}
-void KConfigSkeleton::ItemString::readConfig( KConfig *config )
+void TDEConfigSkeleton::ItemString::readConfig( TDEConfig *config )
{
config->setGroup( mGroup );
@@ -88,39 +88,39 @@ void KConfigSkeleton::ItemString::readConfig( KConfig *config )
readImmutability( config );
}
-void KConfigSkeleton::ItemString::setProperty(const TQVariant & p)
+void TDEConfigSkeleton::ItemString::setProperty(const TQVariant & p)
{
mReference = p.toString();
}
-TQVariant KConfigSkeleton::ItemString::property() const
+TQVariant TDEConfigSkeleton::ItemString::property() const
{
return TQVariant(mReference);
}
-KConfigSkeleton::ItemPassword::ItemPassword( const TQString &group, const TQString &key,
+TDEConfigSkeleton::ItemPassword::ItemPassword( const TQString &group, const TQString &key,
TQString &reference,
const TQString &defaultValue)
: ItemString( group, key, reference, defaultValue, Password )
{
}
-KConfigSkeleton::ItemPath::ItemPath( const TQString &group, const TQString &key,
+TDEConfigSkeleton::ItemPath::ItemPath( const TQString &group, const TQString &key,
TQString &reference,
const TQString &defaultValue)
: ItemString( group, key, reference, defaultValue, Path )
{
}
-KConfigSkeleton::ItemProperty::ItemProperty( const TQString &group,
+TDEConfigSkeleton::ItemProperty::ItemProperty( const TQString &group,
const TQString &key,
TQVariant &reference,
TQVariant defaultValue )
- : KConfigSkeletonGenericItem<TQVariant>( group, key, reference, defaultValue )
+ : TDEConfigSkeletonGenericItem<TQVariant>( group, key, reference, defaultValue )
{
}
-void KConfigSkeleton::ItemProperty::readConfig( KConfig *config )
+void TDEConfigSkeleton::ItemProperty::readConfig( TDEConfig *config )
{
config->setGroup( mGroup );
mReference = config->readPropertyEntry( mKey, mDefault );
@@ -129,23 +129,23 @@ void KConfigSkeleton::ItemProperty::readConfig( KConfig *config )
readImmutability( config );
}
-void KConfigSkeleton::ItemProperty::setProperty(const TQVariant & p)
+void TDEConfigSkeleton::ItemProperty::setProperty(const TQVariant & p)
{
mReference = p;
}
-TQVariant KConfigSkeleton::ItemProperty::property() const
+TQVariant TDEConfigSkeleton::ItemProperty::property() const
{
return mReference;
}
-KConfigSkeleton::ItemBool::ItemBool( const TQString &group, const TQString &key,
+TDEConfigSkeleton::ItemBool::ItemBool( const TQString &group, const TQString &key,
bool &reference, bool defaultValue )
- : KConfigSkeletonGenericItem<bool>( group, key, reference, defaultValue )
+ : TDEConfigSkeletonGenericItem<bool>( group, key, reference, defaultValue )
{
}
-void KConfigSkeleton::ItemBool::readConfig( KConfig *config )
+void TDEConfigSkeleton::ItemBool::readConfig( TDEConfig *config )
{
config->setGroup( mGroup );
mReference = config->readBoolEntry( mKey, mDefault );
@@ -154,25 +154,25 @@ void KConfigSkeleton::ItemBool::readConfig( KConfig *config )
readImmutability( config );
}
-void KConfigSkeleton::ItemBool::setProperty(const TQVariant & p)
+void TDEConfigSkeleton::ItemBool::setProperty(const TQVariant & p)
{
mReference = p.toBool();
}
-TQVariant KConfigSkeleton::ItemBool::property() const
+TQVariant TDEConfigSkeleton::ItemBool::property() const
{
return TQVariant( mReference, 42 /* dummy */ );
}
-KConfigSkeleton::ItemInt::ItemInt( const TQString &group, const TQString &key,
+TDEConfigSkeleton::ItemInt::ItemInt( const TQString &group, const TQString &key,
int &reference, int defaultValue )
- : KConfigSkeletonGenericItem<int>( group, key, reference, defaultValue )
+ : TDEConfigSkeletonGenericItem<int>( group, key, reference, defaultValue )
,mHasMin(false), mHasMax(false)
{
}
-void KConfigSkeleton::ItemInt::readConfig( KConfig *config )
+void TDEConfigSkeleton::ItemInt::readConfig( TDEConfig *config )
{
config->setGroup( mGroup );
mReference = config->readNumEntry( mKey, mDefault );
@@ -185,51 +185,51 @@ void KConfigSkeleton::ItemInt::readConfig( KConfig *config )
readImmutability( config );
}
-void KConfigSkeleton::ItemInt::setProperty(const TQVariant & p)
+void TDEConfigSkeleton::ItemInt::setProperty(const TQVariant & p)
{
mReference = p.toInt();
}
-TQVariant KConfigSkeleton::ItemInt::property() const
+TQVariant TDEConfigSkeleton::ItemInt::property() const
{
return TQVariant(mReference);
}
-TQVariant KConfigSkeleton::ItemInt::minValue() const
+TQVariant TDEConfigSkeleton::ItemInt::minValue() const
{
if (mHasMin)
return TQVariant(mMin);
return TQVariant();
}
-TQVariant KConfigSkeleton::ItemInt::maxValue() const
+TQVariant TDEConfigSkeleton::ItemInt::maxValue() const
{
if (mHasMax)
return TQVariant(mMax);
return TQVariant();
}
-void KConfigSkeleton::ItemInt::setMinValue(int v)
+void TDEConfigSkeleton::ItemInt::setMinValue(int v)
{
mHasMin = true;
mMin = v;
}
-void KConfigSkeleton::ItemInt::setMaxValue(int v)
+void TDEConfigSkeleton::ItemInt::setMaxValue(int v)
{
mHasMax = true;
mMax = v;
}
-KConfigSkeleton::ItemInt64::ItemInt64( const TQString &group, const TQString &key,
+TDEConfigSkeleton::ItemInt64::ItemInt64( const TQString &group, const TQString &key,
TQ_INT64 &reference, TQ_INT64 defaultValue )
- : KConfigSkeletonGenericItem<TQ_INT64>( group, key, reference, defaultValue )
+ : TDEConfigSkeletonGenericItem<TQ_INT64>( group, key, reference, defaultValue )
,mHasMin(false), mHasMax(false)
{
}
-void KConfigSkeleton::ItemInt64::readConfig( KConfig *config )
+void TDEConfigSkeleton::ItemInt64::readConfig( TDEConfig *config )
{
config->setGroup( mGroup );
mReference = config->readNum64Entry( mKey, mDefault );
@@ -242,43 +242,43 @@ void KConfigSkeleton::ItemInt64::readConfig( KConfig *config )
readImmutability( config );
}
-void KConfigSkeleton::ItemInt64::setProperty(const TQVariant & p)
+void TDEConfigSkeleton::ItemInt64::setProperty(const TQVariant & p)
{
mReference = p.toLongLong();
}
-TQVariant KConfigSkeleton::ItemInt64::property() const
+TQVariant TDEConfigSkeleton::ItemInt64::property() const
{
return TQVariant(mReference);
}
-TQVariant KConfigSkeleton::ItemInt64::minValue() const
+TQVariant TDEConfigSkeleton::ItemInt64::minValue() const
{
if (mHasMin)
return TQVariant(mMin);
return TQVariant();
}
-TQVariant KConfigSkeleton::ItemInt64::maxValue() const
+TQVariant TDEConfigSkeleton::ItemInt64::maxValue() const
{
if (mHasMax)
return TQVariant(mMax);
return TQVariant();
}
-void KConfigSkeleton::ItemInt64::setMinValue(TQ_INT64 v)
+void TDEConfigSkeleton::ItemInt64::setMinValue(TQ_INT64 v)
{
mHasMin = true;
mMin = v;
}
-void KConfigSkeleton::ItemInt64::setMaxValue(TQ_INT64 v)
+void TDEConfigSkeleton::ItemInt64::setMaxValue(TQ_INT64 v)
{
mHasMax = true;
mMax = v;
}
-KConfigSkeleton::ItemEnum::ItemEnum( const TQString &group, const TQString &key,
+TDEConfigSkeleton::ItemEnum::ItemEnum( const TQString &group, const TQString &key,
int &reference,
const TQValueList<Choice> &choices,
int defaultValue )
@@ -286,7 +286,7 @@ KConfigSkeleton::ItemEnum::ItemEnum( const TQString &group, const TQString &key,
{
}
-void KConfigSkeleton::ItemEnum::readConfig( KConfig *config )
+void TDEConfigSkeleton::ItemEnum::readConfig( TDEConfig *config )
{
config->setGroup( mGroup );
if (!config->hasKey(mKey))
@@ -315,7 +315,7 @@ void KConfigSkeleton::ItemEnum::readConfig( KConfig *config )
readImmutability( config );
}
-void KConfigSkeleton::ItemEnum::writeConfig( KConfig *config )
+void TDEConfigSkeleton::ItemEnum::writeConfig( TDEConfig *config )
{
if ( mReference != mLoadedValue ) // WABA: Is this test needed?
{
@@ -329,21 +329,21 @@ void KConfigSkeleton::ItemEnum::writeConfig( KConfig *config )
}
}
-TQValueList<KConfigSkeleton::ItemEnum::Choice> KConfigSkeleton::ItemEnum::choices() const
+TQValueList<TDEConfigSkeleton::ItemEnum::Choice> TDEConfigSkeleton::ItemEnum::choices() const
{
return mChoices;
}
-KConfigSkeleton::ItemUInt::ItemUInt( const TQString &group, const TQString &key,
+TDEConfigSkeleton::ItemUInt::ItemUInt( const TQString &group, const TQString &key,
unsigned int &reference,
unsigned int defaultValue )
- : KConfigSkeletonGenericItem<unsigned int>( group, key, reference, defaultValue )
+ : TDEConfigSkeletonGenericItem<unsigned int>( group, key, reference, defaultValue )
,mHasMin(false), mHasMax(false)
{
}
-void KConfigSkeleton::ItemUInt::readConfig( KConfig *config )
+void TDEConfigSkeleton::ItemUInt::readConfig( TDEConfig *config )
{
config->setGroup( mGroup );
mReference = config->readUnsignedNumEntry( mKey, mDefault );
@@ -356,51 +356,51 @@ void KConfigSkeleton::ItemUInt::readConfig( KConfig *config )
readImmutability( config );
}
-void KConfigSkeleton::ItemUInt::setProperty(const TQVariant & p)
+void TDEConfigSkeleton::ItemUInt::setProperty(const TQVariant & p)
{
mReference = p.toUInt();
}
-TQVariant KConfigSkeleton::ItemUInt::property() const
+TQVariant TDEConfigSkeleton::ItemUInt::property() const
{
return TQVariant(mReference);
}
-TQVariant KConfigSkeleton::ItemUInt::minValue() const
+TQVariant TDEConfigSkeleton::ItemUInt::minValue() const
{
if (mHasMin)
return TQVariant(mMin);
return TQVariant();
}
-TQVariant KConfigSkeleton::ItemUInt::maxValue() const
+TQVariant TDEConfigSkeleton::ItemUInt::maxValue() const
{
if (mHasMax)
return TQVariant(mMax);
return TQVariant();
}
-void KConfigSkeleton::ItemUInt::setMinValue(unsigned int v)
+void TDEConfigSkeleton::ItemUInt::setMinValue(unsigned int v)
{
mHasMin = true;
mMin = v;
}
-void KConfigSkeleton::ItemUInt::setMaxValue(unsigned int v)
+void TDEConfigSkeleton::ItemUInt::setMaxValue(unsigned int v)
{
mHasMax = true;
mMax = v;
}
-KConfigSkeleton::ItemUInt64::ItemUInt64( const TQString &group, const TQString &key,
+TDEConfigSkeleton::ItemUInt64::ItemUInt64( const TQString &group, const TQString &key,
TQ_UINT64 &reference, TQ_UINT64 defaultValue )
- : KConfigSkeletonGenericItem<TQ_UINT64>( group, key, reference, defaultValue )
+ : TDEConfigSkeletonGenericItem<TQ_UINT64>( group, key, reference, defaultValue )
,mHasMin(false), mHasMax(false)
{
}
-void KConfigSkeleton::ItemUInt64::readConfig( KConfig *config )
+void TDEConfigSkeleton::ItemUInt64::readConfig( TDEConfig *config )
{
config->setGroup( mGroup );
mReference = config->readUnsignedNum64Entry( mKey, mDefault );
@@ -413,50 +413,50 @@ void KConfigSkeleton::ItemUInt64::readConfig( KConfig *config )
readImmutability( config );
}
-void KConfigSkeleton::ItemUInt64::setProperty(const TQVariant & p)
+void TDEConfigSkeleton::ItemUInt64::setProperty(const TQVariant & p)
{
mReference = p.toULongLong();
}
-TQVariant KConfigSkeleton::ItemUInt64::property() const
+TQVariant TDEConfigSkeleton::ItemUInt64::property() const
{
return TQVariant(mReference);
}
-TQVariant KConfigSkeleton::ItemUInt64::minValue() const
+TQVariant TDEConfigSkeleton::ItemUInt64::minValue() const
{
if (mHasMin)
return TQVariant(mMin);
return TQVariant();
}
-TQVariant KConfigSkeleton::ItemUInt64::maxValue() const
+TQVariant TDEConfigSkeleton::ItemUInt64::maxValue() const
{
if (mHasMax)
return TQVariant(mMax);
return TQVariant();
}
-void KConfigSkeleton::ItemUInt64::setMinValue(TQ_UINT64 v)
+void TDEConfigSkeleton::ItemUInt64::setMinValue(TQ_UINT64 v)
{
mHasMin = true;
mMin = v;
}
-void KConfigSkeleton::ItemUInt64::setMaxValue(TQ_UINT64 v)
+void TDEConfigSkeleton::ItemUInt64::setMaxValue(TQ_UINT64 v)
{
mHasMax = true;
mMax = v;
}
-KConfigSkeleton::ItemLong::ItemLong( const TQString &group, const TQString &key,
+TDEConfigSkeleton::ItemLong::ItemLong( const TQString &group, const TQString &key,
long &reference, long defaultValue )
- : KConfigSkeletonGenericItem<long>( group, key, reference, defaultValue )
+ : TDEConfigSkeletonGenericItem<long>( group, key, reference, defaultValue )
,mHasMin(false), mHasMax(false)
{
}
-void KConfigSkeleton::ItemLong::readConfig( KConfig *config )
+void TDEConfigSkeleton::ItemLong::readConfig( TDEConfig *config )
{
config->setGroup( mGroup );
mReference = config->readLongNumEntry( mKey, mDefault );
@@ -469,52 +469,52 @@ void KConfigSkeleton::ItemLong::readConfig( KConfig *config )
readImmutability( config );
}
-void KConfigSkeleton::ItemLong::setProperty(const TQVariant & p)
+void TDEConfigSkeleton::ItemLong::setProperty(const TQVariant & p)
{
mReference = p.toLongLong();
}
-TQVariant KConfigSkeleton::ItemLong::property() const
+TQVariant TDEConfigSkeleton::ItemLong::property() const
{
return TQVariant((TQ_LLONG) mReference);
}
-TQVariant KConfigSkeleton::ItemLong::minValue() const
+TQVariant TDEConfigSkeleton::ItemLong::minValue() const
{
if (mHasMin)
return TQVariant((TQ_LLONG) mMin);
return TQVariant();
}
-TQVariant KConfigSkeleton::ItemLong::maxValue() const
+TQVariant TDEConfigSkeleton::ItemLong::maxValue() const
{
if (mHasMax)
return TQVariant((TQ_LLONG) mMax);
return TQVariant();
}
-void KConfigSkeleton::ItemLong::setMinValue(long v)
+void TDEConfigSkeleton::ItemLong::setMinValue(long v)
{
mHasMin = true;
mMin = v;
}
-void KConfigSkeleton::ItemLong::setMaxValue(long v)
+void TDEConfigSkeleton::ItemLong::setMaxValue(long v)
{
mHasMax = true;
mMax = v;
}
-KConfigSkeleton::ItemULong::ItemULong( const TQString &group, const TQString &key,
+TDEConfigSkeleton::ItemULong::ItemULong( const TQString &group, const TQString &key,
unsigned long &reference,
unsigned long defaultValue )
- : KConfigSkeletonGenericItem<unsigned long>( group, key, reference, defaultValue )
+ : TDEConfigSkeletonGenericItem<unsigned long>( group, key, reference, defaultValue )
,mHasMin(false), mHasMax(false)
{
}
-void KConfigSkeleton::ItemULong::readConfig( KConfig *config )
+void TDEConfigSkeleton::ItemULong::readConfig( TDEConfig *config )
{
config->setGroup( mGroup );
mReference = config->readUnsignedLongNumEntry( mKey, mDefault );
@@ -527,51 +527,51 @@ void KConfigSkeleton::ItemULong::readConfig( KConfig *config )
readImmutability( config );
}
-void KConfigSkeleton::ItemULong::setProperty(const TQVariant & p)
+void TDEConfigSkeleton::ItemULong::setProperty(const TQVariant & p)
{
mReference = p.toULongLong();
}
-TQVariant KConfigSkeleton::ItemULong::property() const
+TQVariant TDEConfigSkeleton::ItemULong::property() const
{
return TQVariant((TQ_ULLONG) mReference);
}
-TQVariant KConfigSkeleton::ItemULong::minValue() const
+TQVariant TDEConfigSkeleton::ItemULong::minValue() const
{
if (mHasMin)
return TQVariant((TQ_ULLONG) mMin);
return TQVariant();
}
-TQVariant KConfigSkeleton::ItemULong::maxValue() const
+TQVariant TDEConfigSkeleton::ItemULong::maxValue() const
{
if (mHasMax)
return TQVariant((TQ_ULLONG) mMax);
return TQVariant();
}
-void KConfigSkeleton::ItemULong::setMinValue(unsigned long v)
+void TDEConfigSkeleton::ItemULong::setMinValue(unsigned long v)
{
mHasMin = true;
mMin = v;
}
-void KConfigSkeleton::ItemULong::setMaxValue(unsigned long v)
+void TDEConfigSkeleton::ItemULong::setMaxValue(unsigned long v)
{
mHasMax = true;
mMax = v;
}
-KConfigSkeleton::ItemDouble::ItemDouble( const TQString &group, const TQString &key,
+TDEConfigSkeleton::ItemDouble::ItemDouble( const TQString &group, const TQString &key,
double &reference, double defaultValue )
- : KConfigSkeletonGenericItem<double>( group, key, reference, defaultValue )
+ : TDEConfigSkeletonGenericItem<double>( group, key, reference, defaultValue )
,mHasMin(false), mHasMax(false)
{
}
-void KConfigSkeleton::ItemDouble::readConfig( KConfig *config )
+void TDEConfigSkeleton::ItemDouble::readConfig( TDEConfig *config )
{
config->setGroup( mGroup );
mReference = config->readDoubleNumEntry( mKey, mDefault );
@@ -584,51 +584,51 @@ void KConfigSkeleton::ItemDouble::readConfig( KConfig *config )
readImmutability( config );
}
-void KConfigSkeleton::ItemDouble::setProperty(const TQVariant & p)
+void TDEConfigSkeleton::ItemDouble::setProperty(const TQVariant & p)
{
mReference = p.toDouble();
}
-TQVariant KConfigSkeleton::ItemDouble::property() const
+TQVariant TDEConfigSkeleton::ItemDouble::property() const
{
return TQVariant(mReference);
}
-TQVariant KConfigSkeleton::ItemDouble::minValue() const
+TQVariant TDEConfigSkeleton::ItemDouble::minValue() const
{
if (mHasMin)
return TQVariant(mMin);
return TQVariant();
}
-TQVariant KConfigSkeleton::ItemDouble::maxValue() const
+TQVariant TDEConfigSkeleton::ItemDouble::maxValue() const
{
if (mHasMax)
return TQVariant(mMax);
return TQVariant();
}
-void KConfigSkeleton::ItemDouble::setMinValue(double v)
+void TDEConfigSkeleton::ItemDouble::setMinValue(double v)
{
mHasMin = true;
mMin = v;
}
-void KConfigSkeleton::ItemDouble::setMaxValue(double v)
+void TDEConfigSkeleton::ItemDouble::setMaxValue(double v)
{
mHasMax = true;
mMax = v;
}
-KConfigSkeleton::ItemColor::ItemColor( const TQString &group, const TQString &key,
+TDEConfigSkeleton::ItemColor::ItemColor( const TQString &group, const TQString &key,
TQColor &reference,
const TQColor &defaultValue )
- : KConfigSkeletonGenericItem<TQColor>( group, key, reference, defaultValue )
+ : TDEConfigSkeletonGenericItem<TQColor>( group, key, reference, defaultValue )
{
}
-void KConfigSkeleton::ItemColor::readConfig( KConfig *config )
+void TDEConfigSkeleton::ItemColor::readConfig( TDEConfig *config )
{
config->setGroup( mGroup );
mReference = config->readColorEntry( mKey, &mDefault );
@@ -637,25 +637,25 @@ void KConfigSkeleton::ItemColor::readConfig( KConfig *config )
readImmutability( config );
}
-void KConfigSkeleton::ItemColor::setProperty(const TQVariant & p)
+void TDEConfigSkeleton::ItemColor::setProperty(const TQVariant & p)
{
mReference = p.toColor();
}
-TQVariant KConfigSkeleton::ItemColor::property() const
+TQVariant TDEConfigSkeleton::ItemColor::property() const
{
return TQVariant(mReference);
}
-KConfigSkeleton::ItemFont::ItemFont( const TQString &group, const TQString &key,
+TDEConfigSkeleton::ItemFont::ItemFont( const TQString &group, const TQString &key,
TQFont &reference,
const TQFont &defaultValue )
- : KConfigSkeletonGenericItem<TQFont>( group, key, reference, defaultValue )
+ : TDEConfigSkeletonGenericItem<TQFont>( group, key, reference, defaultValue )
{
}
-void KConfigSkeleton::ItemFont::readConfig( KConfig *config )
+void TDEConfigSkeleton::ItemFont::readConfig( TDEConfig *config )
{
config->setGroup( mGroup );
mReference = config->readFontEntry( mKey, &mDefault );
@@ -664,25 +664,25 @@ void KConfigSkeleton::ItemFont::readConfig( KConfig *config )
readImmutability( config );
}
-void KConfigSkeleton::ItemFont::setProperty(const TQVariant & p)
+void TDEConfigSkeleton::ItemFont::setProperty(const TQVariant & p)
{
mReference = p.toFont();
}
-TQVariant KConfigSkeleton::ItemFont::property() const
+TQVariant TDEConfigSkeleton::ItemFont::property() const
{
return TQVariant(mReference);
}
-KConfigSkeleton::ItemRect::ItemRect( const TQString &group, const TQString &key,
+TDEConfigSkeleton::ItemRect::ItemRect( const TQString &group, const TQString &key,
TQRect &reference,
const TQRect &defaultValue )
- : KConfigSkeletonGenericItem<TQRect>( group, key, reference, defaultValue )
+ : TDEConfigSkeletonGenericItem<TQRect>( group, key, reference, defaultValue )
{
}
-void KConfigSkeleton::ItemRect::readConfig( KConfig *config )
+void TDEConfigSkeleton::ItemRect::readConfig( TDEConfig *config )
{
config->setGroup( mGroup );
mReference = config->readRectEntry( mKey, &mDefault );
@@ -691,25 +691,25 @@ void KConfigSkeleton::ItemRect::readConfig( KConfig *config )
readImmutability( config );
}
-void KConfigSkeleton::ItemRect::setProperty(const TQVariant & p)
+void TDEConfigSkeleton::ItemRect::setProperty(const TQVariant & p)
{
mReference = p.toRect();
}
-TQVariant KConfigSkeleton::ItemRect::property() const
+TQVariant TDEConfigSkeleton::ItemRect::property() const
{
return TQVariant(mReference);
}
-KConfigSkeleton::ItemPoint::ItemPoint( const TQString &group, const TQString &key,
+TDEConfigSkeleton::ItemPoint::ItemPoint( const TQString &group, const TQString &key,
TQPoint &reference,
const TQPoint &defaultValue )
- : KConfigSkeletonGenericItem<TQPoint>( group, key, reference, defaultValue )
+ : TDEConfigSkeletonGenericItem<TQPoint>( group, key, reference, defaultValue )
{
}
-void KConfigSkeleton::ItemPoint::readConfig( KConfig *config )
+void TDEConfigSkeleton::ItemPoint::readConfig( TDEConfig *config )
{
config->setGroup( mGroup );
mReference = config->readPointEntry( mKey, &mDefault );
@@ -718,25 +718,25 @@ void KConfigSkeleton::ItemPoint::readConfig( KConfig *config )
readImmutability( config );
}
-void KConfigSkeleton::ItemPoint::setProperty(const TQVariant & p)
+void TDEConfigSkeleton::ItemPoint::setProperty(const TQVariant & p)
{
mReference = p.toPoint();
}
-TQVariant KConfigSkeleton::ItemPoint::property() const
+TQVariant TDEConfigSkeleton::ItemPoint::property() const
{
return TQVariant(mReference);
}
-KConfigSkeleton::ItemSize::ItemSize( const TQString &group, const TQString &key,
+TDEConfigSkeleton::ItemSize::ItemSize( const TQString &group, const TQString &key,
TQSize &reference,
const TQSize &defaultValue )
- : KConfigSkeletonGenericItem<TQSize>( group, key, reference, defaultValue )
+ : TDEConfigSkeletonGenericItem<TQSize>( group, key, reference, defaultValue )
{
}
-void KConfigSkeleton::ItemSize::readConfig( KConfig *config )
+void TDEConfigSkeleton::ItemSize::readConfig( TDEConfig *config )
{
config->setGroup( mGroup );
mReference = config->readSizeEntry( mKey, &mDefault );
@@ -745,25 +745,25 @@ void KConfigSkeleton::ItemSize::readConfig( KConfig *config )
readImmutability( config );
}
-void KConfigSkeleton::ItemSize::setProperty(const TQVariant & p)
+void TDEConfigSkeleton::ItemSize::setProperty(const TQVariant & p)
{
mReference = p.toSize();
}
-TQVariant KConfigSkeleton::ItemSize::property() const
+TQVariant TDEConfigSkeleton::ItemSize::property() const
{
return TQVariant(mReference);
}
-KConfigSkeleton::ItemDateTime::ItemDateTime( const TQString &group, const TQString &key,
+TDEConfigSkeleton::ItemDateTime::ItemDateTime( const TQString &group, const TQString &key,
TQDateTime &reference,
const TQDateTime &defaultValue )
- : KConfigSkeletonGenericItem<TQDateTime>( group, key, reference, defaultValue )
+ : TDEConfigSkeletonGenericItem<TQDateTime>( group, key, reference, defaultValue )
{
}
-void KConfigSkeleton::ItemDateTime::readConfig( KConfig *config )
+void TDEConfigSkeleton::ItemDateTime::readConfig( TDEConfig *config )
{
config->setGroup( mGroup );
mReference = config->readDateTimeEntry( mKey, &mDefault );
@@ -772,25 +772,25 @@ void KConfigSkeleton::ItemDateTime::readConfig( KConfig *config )
readImmutability( config );
}
-void KConfigSkeleton::ItemDateTime::setProperty(const TQVariant & p)
+void TDEConfigSkeleton::ItemDateTime::setProperty(const TQVariant & p)
{
mReference = p.toDateTime();
}
-TQVariant KConfigSkeleton::ItemDateTime::property() const
+TQVariant TDEConfigSkeleton::ItemDateTime::property() const
{
return TQVariant(mReference);
}
-KConfigSkeleton::ItemStringList::ItemStringList( const TQString &group, const TQString &key,
+TDEConfigSkeleton::ItemStringList::ItemStringList( const TQString &group, const TQString &key,
TQStringList &reference,
const TQStringList &defaultValue )
- : KConfigSkeletonGenericItem<TQStringList>( group, key, reference, defaultValue )
+ : TDEConfigSkeletonGenericItem<TQStringList>( group, key, reference, defaultValue )
{
}
-void KConfigSkeleton::ItemStringList::readConfig( KConfig *config )
+void TDEConfigSkeleton::ItemStringList::readConfig( TDEConfig *config )
{
config->setGroup( mGroup );
if ( !config->hasKey( mKey ) )
@@ -802,25 +802,25 @@ void KConfigSkeleton::ItemStringList::readConfig( KConfig *config )
readImmutability( config );
}
-void KConfigSkeleton::ItemStringList::setProperty(const TQVariant & p)
+void TDEConfigSkeleton::ItemStringList::setProperty(const TQVariant & p)
{
mReference = p.toStringList();
}
-TQVariant KConfigSkeleton::ItemStringList::property() const
+TQVariant TDEConfigSkeleton::ItemStringList::property() const
{
return TQVariant(mReference);
}
-KConfigSkeleton::ItemPathList::ItemPathList( const TQString &group, const TQString &key,
+TDEConfigSkeleton::ItemPathList::ItemPathList( const TQString &group, const TQString &key,
TQStringList &reference,
const TQStringList &defaultValue )
: ItemStringList( group, key, reference, defaultValue )
{
}
-void KConfigSkeleton::ItemPathList::readConfig( KConfig *config )
+void TDEConfigSkeleton::ItemPathList::readConfig( TDEConfig *config )
{
config->setGroup( mGroup );
if ( !config->hasKey( mKey ) )
@@ -832,7 +832,7 @@ void KConfigSkeleton::ItemPathList::readConfig( KConfig *config )
readImmutability( config );
}
-void KConfigSkeleton::ItemPathList::writeConfig( KConfig *config )
+void TDEConfigSkeleton::ItemPathList::writeConfig( TDEConfig *config )
{
if ( mReference != mLoadedValue ) // WABA: Is this test needed?
{
@@ -847,14 +847,14 @@ void KConfigSkeleton::ItemPathList::writeConfig( KConfig *config )
}
-KConfigSkeleton::ItemIntList::ItemIntList( const TQString &group, const TQString &key,
+TDEConfigSkeleton::ItemIntList::ItemIntList( const TQString &group, const TQString &key,
TQValueList<int> &reference,
const TQValueList<int> &defaultValue )
- : KConfigSkeletonGenericItem<TQValueList<int> >( group, key, reference, defaultValue )
+ : TDEConfigSkeletonGenericItem<TQValueList<int> >( group, key, reference, defaultValue )
{
}
-void KConfigSkeleton::ItemIntList::readConfig( KConfig *config )
+void TDEConfigSkeleton::ItemIntList::readConfig( TDEConfig *config )
{
config->setGroup( mGroup );
if ( !config->hasKey( mKey ) )
@@ -866,67 +866,67 @@ void KConfigSkeleton::ItemIntList::readConfig( KConfig *config )
readImmutability( config );
}
-void KConfigSkeleton::ItemIntList::setProperty(const TQVariant &)
+void TDEConfigSkeleton::ItemIntList::setProperty(const TQVariant &)
{
// TODO: Not yet supported
}
-TQVariant KConfigSkeleton::ItemIntList::property() const
+TQVariant TDEConfigSkeleton::ItemIntList::property() const
{
// TODO: Not yet supported
return TQVariant();
}
-KConfigSkeleton::KConfigSkeleton( const TQString &configname )
+TDEConfigSkeleton::TDEConfigSkeleton( const TQString &configname )
: mCurrentGroup( "No Group" ), mUseDefaults(false)
{
- kdDebug(177) << "Creating KConfigSkeleton (" << (void *)this << ")" << endl;
+ kdDebug(177) << "Creating TDEConfigSkeleton (" << (void *)this << ")" << endl;
if ( !configname.isEmpty() )
{
- mConfig = KSharedConfig::openConfig( configname );
+ mConfig = TDESharedConfig::openConfig( configname );
}
else
{
- mConfig = KGlobal::sharedConfig();
+ mConfig = TDEGlobal::sharedConfig();
}
}
-KConfigSkeleton::KConfigSkeleton(KSharedConfig::Ptr config)
+TDEConfigSkeleton::TDEConfigSkeleton(TDESharedConfig::Ptr config)
: mCurrentGroup( "No Group" ), mUseDefaults(false)
{
- kdDebug(177) << "Creating KConfigSkeleton (" << (void *)this << ")" << endl;
+ kdDebug(177) << "Creating TDEConfigSkeleton (" << (void *)this << ")" << endl;
mConfig = config;
}
-KConfigSkeleton::~KConfigSkeleton()
+TDEConfigSkeleton::~TDEConfigSkeleton()
{
- KConfigSkeletonItem::List::ConstIterator it;
+ TDEConfigSkeletonItem::List::ConstIterator it;
for( it = mItems.begin(); it != mItems.end(); ++it )
{
delete *it;
}
}
-void KConfigSkeleton::setCurrentGroup( const TQString &group )
+void TDEConfigSkeleton::setCurrentGroup( const TQString &group )
{
mCurrentGroup = group;
}
-KConfig *KConfigSkeleton::config() const
+TDEConfig *TDEConfigSkeleton::config() const
{
return mConfig;
}
-bool KConfigSkeleton::useDefaults(bool b)
+bool TDEConfigSkeleton::useDefaults(bool b)
{
if (b == mUseDefaults)
return mUseDefaults;
mUseDefaults = b;
- KConfigSkeletonItem::List::ConstIterator it;
+ TDEConfigSkeletonItem::List::ConstIterator it;
for( it = mItems.begin(); it != mItems.end(); ++it )
{
(*it)->swapDefault();
@@ -936,9 +936,9 @@ bool KConfigSkeleton::useDefaults(bool b)
return !mUseDefaults;
}
-void KConfigSkeleton::setDefaults()
+void TDEConfigSkeleton::setDefaults()
{
- KConfigSkeletonItem::List::ConstIterator it;
+ TDEConfigSkeletonItem::List::ConstIterator it;
for( it = mItems.begin(); it != mItems.end(); ++it ) {
(*it)->setDefault();
}
@@ -946,14 +946,14 @@ void KConfigSkeleton::setDefaults()
usrSetDefaults();
}
-void KConfigSkeleton::readConfig()
+void TDEConfigSkeleton::readConfig()
{
- kdDebug(177) << "KConfigSkeleton::readConfig()" << endl;
+ kdDebug(177) << "TDEConfigSkeleton::readConfig()" << endl;
TQString origGroup = mConfig->group();
mConfig->reparseConfiguration();
- KConfigSkeletonItem::List::ConstIterator it;
+ TDEConfigSkeletonItem::List::ConstIterator it;
for( it = mItems.begin(); it != mItems.end(); ++it )
{
(*it)->readConfig( mConfig );
@@ -964,13 +964,13 @@ void KConfigSkeleton::readConfig()
mConfig->setGroup(origGroup);
}
-void KConfigSkeleton::writeConfig()
+void TDEConfigSkeleton::writeConfig()
{
- kdDebug(177) << "KConfigSkeleton::writeConfig()" << endl;
+ kdDebug(177) << "TDEConfigSkeleton::writeConfig()" << endl;
TQString origGroup = mConfig->group();
- KConfigSkeletonItem::List::ConstIterator it;
+ TDEConfigSkeletonItem::List::ConstIterator it;
for( it = mItems.begin(); it != mItems.end(); ++it )
{
(*it)->writeConfig( mConfig );
@@ -985,7 +985,7 @@ void KConfigSkeleton::writeConfig()
mConfig->setGroup(origGroup);
}
-void KConfigSkeleton::addItem( KConfigSkeletonItem *item, const TQString &name )
+void TDEConfigSkeleton::addItem( TDEConfigSkeletonItem *item, const TQString &name )
{
item->setName( name.isEmpty() ? item->key() : name );
mItems.append( item );
@@ -994,214 +994,214 @@ void KConfigSkeleton::addItem( KConfigSkeletonItem *item, const TQString &name )
item->readConfig( mConfig );
}
-KConfigSkeleton::ItemString *KConfigSkeleton::addItemString( const TQString &name, TQString &reference,
+TDEConfigSkeleton::ItemString *TDEConfigSkeleton::addItemString( const TQString &name, TQString &reference,
const TQString &defaultValue, const TQString &key )
{
- KConfigSkeleton::ItemString *item;
- item = new KConfigSkeleton::ItemString( mCurrentGroup, key.isEmpty() ? name : key,
+ TDEConfigSkeleton::ItemString *item;
+ item = new TDEConfigSkeleton::ItemString( mCurrentGroup, key.isEmpty() ? name : key,
reference, defaultValue,
- KConfigSkeleton::ItemString::Normal );
+ TDEConfigSkeleton::ItemString::Normal );
addItem( item, name );
return item;
}
-KConfigSkeleton::ItemPassword *KConfigSkeleton::addItemPassword( const TQString &name, TQString &reference,
+TDEConfigSkeleton::ItemPassword *TDEConfigSkeleton::addItemPassword( const TQString &name, TQString &reference,
const TQString &defaultValue, const TQString &key )
{
- KConfigSkeleton::ItemPassword *item;
- item = new KConfigSkeleton::ItemPassword( mCurrentGroup, key.isNull() ? name : key,
+ TDEConfigSkeleton::ItemPassword *item;
+ item = new TDEConfigSkeleton::ItemPassword( mCurrentGroup, key.isNull() ? name : key,
reference, defaultValue );
addItem( item, name );
return item;
}
-KConfigSkeleton::ItemPath *KConfigSkeleton::addItemPath( const TQString &name, TQString &reference,
+TDEConfigSkeleton::ItemPath *TDEConfigSkeleton::addItemPath( const TQString &name, TQString &reference,
const TQString &defaultValue, const TQString &key )
{
- KConfigSkeleton::ItemPath *item;
- item = new KConfigSkeleton::ItemPath( mCurrentGroup, key.isNull() ? name : key,
+ TDEConfigSkeleton::ItemPath *item;
+ item = new TDEConfigSkeleton::ItemPath( mCurrentGroup, key.isNull() ? name : key,
reference, defaultValue );
addItem( item, name );
return item;
}
-KConfigSkeleton::ItemProperty *KConfigSkeleton::addItemProperty( const TQString &name, TQVariant &reference,
+TDEConfigSkeleton::ItemProperty *TDEConfigSkeleton::addItemProperty( const TQString &name, TQVariant &reference,
const TQVariant &defaultValue, const TQString &key )
{
- KConfigSkeleton::ItemProperty *item;
- item = new KConfigSkeleton::ItemProperty( mCurrentGroup, key.isNull() ? name : key,
+ TDEConfigSkeleton::ItemProperty *item;
+ item = new TDEConfigSkeleton::ItemProperty( mCurrentGroup, key.isNull() ? name : key,
reference, defaultValue );
addItem( item, name );
return item;
}
-KConfigSkeleton::ItemBool *KConfigSkeleton::addItemBool( const TQString &name, bool &reference,
+TDEConfigSkeleton::ItemBool *TDEConfigSkeleton::addItemBool( const TQString &name, bool &reference,
bool defaultValue, const TQString &key )
{
- KConfigSkeleton::ItemBool *item;
- item = new KConfigSkeleton::ItemBool( mCurrentGroup, key.isNull() ? name : key,
+ TDEConfigSkeleton::ItemBool *item;
+ item = new TDEConfigSkeleton::ItemBool( mCurrentGroup, key.isNull() ? name : key,
reference, defaultValue );
addItem( item, name );
return item;
}
-KConfigSkeleton::ItemInt *KConfigSkeleton::addItemInt( const TQString &name, int &reference,
+TDEConfigSkeleton::ItemInt *TDEConfigSkeleton::addItemInt( const TQString &name, int &reference,
int defaultValue, const TQString &key )
{
- KConfigSkeleton::ItemInt *item;
- item = new KConfigSkeleton::ItemInt( mCurrentGroup, key.isNull() ? name : key,
+ TDEConfigSkeleton::ItemInt *item;
+ item = new TDEConfigSkeleton::ItemInt( mCurrentGroup, key.isNull() ? name : key,
reference, defaultValue );
addItem( item, name );
return item;
}
-KConfigSkeleton::ItemUInt *KConfigSkeleton::addItemUInt( const TQString &name, unsigned int &reference,
+TDEConfigSkeleton::ItemUInt *TDEConfigSkeleton::addItemUInt( const TQString &name, unsigned int &reference,
unsigned int defaultValue, const TQString &key )
{
- KConfigSkeleton::ItemUInt *item;
- item = new KConfigSkeleton::ItemUInt( mCurrentGroup, key.isNull() ? name : key,
+ TDEConfigSkeleton::ItemUInt *item;
+ item = new TDEConfigSkeleton::ItemUInt( mCurrentGroup, key.isNull() ? name : key,
reference, defaultValue );
addItem( item, name );
return item;
}
-KConfigSkeleton::ItemInt64 *KConfigSkeleton::addItemInt64( const TQString &name, TQ_INT64 &reference,
+TDEConfigSkeleton::ItemInt64 *TDEConfigSkeleton::addItemInt64( const TQString &name, TQ_INT64 &reference,
TQ_INT64 defaultValue, const TQString &key )
{
- KConfigSkeleton::ItemInt64 *item;
- item = new KConfigSkeleton::ItemInt64( mCurrentGroup, key.isNull() ? name : key,
+ TDEConfigSkeleton::ItemInt64 *item;
+ item = new TDEConfigSkeleton::ItemInt64( mCurrentGroup, key.isNull() ? name : key,
reference, defaultValue );
addItem( item, name );
return item;
}
-KConfigSkeleton::ItemUInt64 *KConfigSkeleton::addItemUInt64( const TQString &name, TQ_UINT64 &reference,
+TDEConfigSkeleton::ItemUInt64 *TDEConfigSkeleton::addItemUInt64( const TQString &name, TQ_UINT64 &reference,
TQ_UINT64 defaultValue, const TQString &key )
{
- KConfigSkeleton::ItemUInt64 *item;
- item = new KConfigSkeleton::ItemUInt64( mCurrentGroup, key.isNull() ? name : key,
+ TDEConfigSkeleton::ItemUInt64 *item;
+ item = new TDEConfigSkeleton::ItemUInt64( mCurrentGroup, key.isNull() ? name : key,
reference, defaultValue );
addItem( item, name );
return item;
}
-KConfigSkeleton::ItemLong *KConfigSkeleton::addItemLong( const TQString &name, long &reference,
+TDEConfigSkeleton::ItemLong *TDEConfigSkeleton::addItemLong( const TQString &name, long &reference,
long defaultValue, const TQString &key )
{
- KConfigSkeleton::ItemLong *item;
- item = new KConfigSkeleton::ItemLong( mCurrentGroup, key.isNull() ? name : key,
+ TDEConfigSkeleton::ItemLong *item;
+ item = new TDEConfigSkeleton::ItemLong( mCurrentGroup, key.isNull() ? name : key,
reference, defaultValue );
addItem( item, name );
return item;
}
-KConfigSkeleton::ItemULong *KConfigSkeleton::addItemULong( const TQString &name, unsigned long &reference,
+TDEConfigSkeleton::ItemULong *TDEConfigSkeleton::addItemULong( const TQString &name, unsigned long &reference,
unsigned long defaultValue, const TQString &key )
{
- KConfigSkeleton::ItemULong *item;
- item = new KConfigSkeleton::ItemULong( mCurrentGroup, key.isNull() ? name : key,
+ TDEConfigSkeleton::ItemULong *item;
+ item = new TDEConfigSkeleton::ItemULong( mCurrentGroup, key.isNull() ? name : key,
reference, defaultValue );
addItem( item, name );
return item;
}
-KConfigSkeleton::ItemDouble *KConfigSkeleton::addItemDouble( const TQString &name, double &reference,
+TDEConfigSkeleton::ItemDouble *TDEConfigSkeleton::addItemDouble( const TQString &name, double &reference,
double defaultValue, const TQString &key )
{
- KConfigSkeleton::ItemDouble *item;
- item = new KConfigSkeleton::ItemDouble( mCurrentGroup, key.isNull() ? name : key,
+ TDEConfigSkeleton::ItemDouble *item;
+ item = new TDEConfigSkeleton::ItemDouble( mCurrentGroup, key.isNull() ? name : key,
reference, defaultValue );
addItem( item, name );
return item;
}
-KConfigSkeleton::ItemColor *KConfigSkeleton::addItemColor( const TQString &name, TQColor &reference,
+TDEConfigSkeleton::ItemColor *TDEConfigSkeleton::addItemColor( const TQString &name, TQColor &reference,
const TQColor &defaultValue, const TQString &key )
{
- KConfigSkeleton::ItemColor *item;
- item = new KConfigSkeleton::ItemColor( mCurrentGroup, key.isNull() ? name : key,
+ TDEConfigSkeleton::ItemColor *item;
+ item = new TDEConfigSkeleton::ItemColor( mCurrentGroup, key.isNull() ? name : key,
reference, defaultValue );
addItem( item, name );
return item;
}
-KConfigSkeleton::ItemFont *KConfigSkeleton::addItemFont( const TQString &name, TQFont &reference,
+TDEConfigSkeleton::ItemFont *TDEConfigSkeleton::addItemFont( const TQString &name, TQFont &reference,
const TQFont &defaultValue, const TQString &key )
{
- KConfigSkeleton::ItemFont *item;
- item = new KConfigSkeleton::ItemFont( mCurrentGroup, key.isNull() ? name : key,
+ TDEConfigSkeleton::ItemFont *item;
+ item = new TDEConfigSkeleton::ItemFont( mCurrentGroup, key.isNull() ? name : key,
reference, defaultValue );
addItem( item, name );
return item;
}
-KConfigSkeleton::ItemRect *KConfigSkeleton::addItemRect( const TQString &name, TQRect &reference,
+TDEConfigSkeleton::ItemRect *TDEConfigSkeleton::addItemRect( const TQString &name, TQRect &reference,
const TQRect &defaultValue, const TQString &key )
{
- KConfigSkeleton::ItemRect *item;
- item = new KConfigSkeleton::ItemRect( mCurrentGroup, key.isNull() ? name : key,
+ TDEConfigSkeleton::ItemRect *item;
+ item = new TDEConfigSkeleton::ItemRect( mCurrentGroup, key.isNull() ? name : key,
reference, defaultValue );
addItem( item, name );
return item;
}
-KConfigSkeleton::ItemPoint *KConfigSkeleton::addItemPoint( const TQString &name, TQPoint &reference,
+TDEConfigSkeleton::ItemPoint *TDEConfigSkeleton::addItemPoint( const TQString &name, TQPoint &reference,
const TQPoint &defaultValue, const TQString &key )
{
- KConfigSkeleton::ItemPoint *item;
- item = new KConfigSkeleton::ItemPoint( mCurrentGroup, key.isNull() ? name : key,
+ TDEConfigSkeleton::ItemPoint *item;
+ item = new TDEConfigSkeleton::ItemPoint( mCurrentGroup, key.isNull() ? name : key,
reference, defaultValue );
addItem( item, name );
return item;
}
-KConfigSkeleton::ItemSize *KConfigSkeleton::addItemSize( const TQString &name, TQSize &reference,
+TDEConfigSkeleton::ItemSize *TDEConfigSkeleton::addItemSize( const TQString &name, TQSize &reference,
const TQSize &defaultValue, const TQString &key )
{
- KConfigSkeleton::ItemSize *item;
- item = new KConfigSkeleton::ItemSize( mCurrentGroup, key.isNull() ? name : key,
+ TDEConfigSkeleton::ItemSize *item;
+ item = new TDEConfigSkeleton::ItemSize( mCurrentGroup, key.isNull() ? name : key,
reference, defaultValue );
addItem( item, name );
return item;
}
-KConfigSkeleton::ItemDateTime *KConfigSkeleton::addItemDateTime( const TQString &name, TQDateTime &reference,
+TDEConfigSkeleton::ItemDateTime *TDEConfigSkeleton::addItemDateTime( const TQString &name, TQDateTime &reference,
const TQDateTime &defaultValue, const TQString &key )
{
- KConfigSkeleton::ItemDateTime *item;
- item = new KConfigSkeleton::ItemDateTime( mCurrentGroup, key.isNull() ? name : key,
+ TDEConfigSkeleton::ItemDateTime *item;
+ item = new TDEConfigSkeleton::ItemDateTime( mCurrentGroup, key.isNull() ? name : key,
reference, defaultValue );
addItem( item, name );
return item;
}
-KConfigSkeleton::ItemStringList *KConfigSkeleton::addItemStringList( const TQString &name, TQStringList &reference,
+TDEConfigSkeleton::ItemStringList *TDEConfigSkeleton::addItemStringList( const TQString &name, TQStringList &reference,
const TQStringList &defaultValue, const TQString &key )
{
- KConfigSkeleton::ItemStringList *item;
- item = new KConfigSkeleton::ItemStringList( mCurrentGroup, key.isNull() ? name : key,
+ TDEConfigSkeleton::ItemStringList *item;
+ item = new TDEConfigSkeleton::ItemStringList( mCurrentGroup, key.isNull() ? name : key,
reference, defaultValue );
addItem( item, name );
return item;
}
-KConfigSkeleton::ItemIntList *KConfigSkeleton::addItemIntList( const TQString &name, TQValueList<int> &reference,
+TDEConfigSkeleton::ItemIntList *TDEConfigSkeleton::addItemIntList( const TQString &name, TQValueList<int> &reference,
const TQValueList<int> &defaultValue, const TQString &key )
{
- KConfigSkeleton::ItemIntList *item;
- item = new KConfigSkeleton::ItemIntList( mCurrentGroup, key.isNull() ? name : key,
+ TDEConfigSkeleton::ItemIntList *item;
+ item = new TDEConfigSkeleton::ItemIntList( mCurrentGroup, key.isNull() ? name : key,
reference, defaultValue );
addItem( item, name );
return item;
}
-bool KConfigSkeleton::isImmutable(const TQString &name)
+bool TDEConfigSkeleton::isImmutable(const TQString &name)
{
- KConfigSkeletonItem *item = findItem(name);
+ TDEConfigSkeletonItem *item = findItem(name);
return !item || item->isImmutable();
}
-KConfigSkeletonItem *KConfigSkeleton::findItem(const TQString &name)
+TDEConfigSkeletonItem *TDEConfigSkeleton::findItem(const TQString &name)
{
return mItemDict.find(name);
}
diff --git a/tdecore/kconfigskeleton.h b/tdecore/tdeconfigskeleton.h
index dde0779cf..b260db1e8 100644
--- a/tdecore/kconfigskeleton.h
+++ b/tdecore/tdeconfigskeleton.h
@@ -33,26 +33,26 @@
#include <tqsize.h>
#include <tqstringlist.h>
#include <tqvariant.h>
-#include <kconfig.h>
-#include <kglobalsettings.h>
+#include <tdeconfig.h>
+#include <tdeglobalsettings.h>
/**
* @short Class for storing a preferences setting
* @author Cornelius Schumacher
- * @see KConfigSkeleton
+ * @see TDEConfigSkeleton
*
- * This class represents one preferences setting as used by @ref KConfigSkeleton.
- * Subclasses of KConfigSkeletonItem implement storage functions for a certain type of
+ * This class represents one preferences setting as used by @ref TDEConfigSkeleton.
+ * Subclasses of TDEConfigSkeletonItem implement storage functions for a certain type of
* setting. Normally you don't have to use this class directly. Use the special
- * addItem() functions of KConfigSkeleton instead. If you subclass this class you will
- * have to register instances with the function KConfigSkeleton::addItem().
+ * addItem() functions of TDEConfigSkeleton instead. If you subclass this class you will
+ * have to register instances with the function TDEConfigSkeleton::addItem().
*/
- class TDECORE_EXPORT KConfigSkeletonItem
+ class TDECORE_EXPORT TDEConfigSkeletonItem
{
public:
- typedef TQValueList < KConfigSkeletonItem * >List;
- typedef TQDict < KConfigSkeletonItem > Dict;
- typedef TQDictIterator < KConfigSkeletonItem > DictIterator;
+ typedef TQValueList < TDEConfigSkeletonItem * >List;
+ typedef TQDict < TDEConfigSkeletonItem > Dict;
+ typedef TQDictIterator < TDEConfigSkeletonItem > DictIterator;
/**
* Constructor.
@@ -60,7 +60,7 @@
* @param group Config file group.
* @param key Config file key.
*/
- KConfigSkeletonItem(const TQString & group, const TQString & key)
+ TDEConfigSkeletonItem(const TQString & group, const TQString & key)
:mGroup(group),mKey(key), mIsImmutable(true)
{
}
@@ -68,7 +68,7 @@
/**
* Destructor.
*/
- virtual ~KConfigSkeletonItem()
+ virtual ~TDEConfigSkeletonItem()
{
}
@@ -153,22 +153,22 @@
}
/**
- * This function is called by @ref KConfigSkeleton to read the value for this setting
+ * This function is called by @ref TDEConfigSkeleton to read the value for this setting
* from a config file.
* value.
*/
- virtual void readConfig(KConfig *) = 0;
+ virtual void readConfig(TDEConfig *) = 0;
/**
- * This function is called by @ref KConfigSkeleton to write the value of this setting
+ * This function is called by @ref TDEConfigSkeleton to write the value of this setting
* to a config file.
*/
- virtual void writeConfig(KConfig *) = 0;
+ virtual void writeConfig(TDEConfig *) = 0;
/**
* Read global default value.
*/
- virtual void readDefault(KConfig *) = 0;
+ virtual void readDefault(TDEConfig *) = 0;
/**
* Set item to @p p
@@ -197,7 +197,7 @@
/**
* Exchanges the current value with the default value
- * Used by KConfigSkeleton::useDefaults(bool);
+ * Used by TDEConfigSkeleton::useDefaults(bool);
*/
virtual void swapDefault() = 0;
@@ -212,9 +212,9 @@
protected:
/**
* sets mIsImmutable to true if mKey in config is immutable
- * @param config KConfig to check if mKey is immutable in
+ * @param config TDEConfig to check if mKey is immutable in
*/
- void readImmutability(KConfig *config);
+ void readImmutability(TDEConfig *config);
TQString mGroup;
TQString mKey;
@@ -228,18 +228,18 @@
};
-template < typename T > class KConfigSkeletonGenericItem:public KConfigSkeletonItem
+template < typename T > class TDEConfigSkeletonGenericItem:public TDEConfigSkeletonItem
{
public:
- KConfigSkeletonGenericItem(const TQString & group, const TQString & key, T & reference,
+ TDEConfigSkeletonGenericItem(const TQString & group, const TQString & key, T & reference,
T defaultValue)
- : KConfigSkeletonItem(group, key), mReference(reference),
+ : TDEConfigSkeletonItem(group, key), mReference(reference),
mDefault(defaultValue), mLoadedValue(defaultValue)
{
}
/**
- * Set value of this KConfigSkeletonItem.
+ * Set value of this TDEConfigSkeletonItem.
*/
void setValue(const T & v)
{
@@ -247,7 +247,7 @@ template < typename T > class KConfigSkeletonGenericItem:public KConfigSkeletonI
}
/**
- * Return value of this KConfigSkeletonItem.
+ * Return value of this TDEConfigSkeletonItem.
*/
T & value()
{
@@ -255,7 +255,7 @@ template < typename T > class KConfigSkeletonGenericItem:public KConfigSkeletonI
}
/**
- * Return const value of this KConfigSkeletonItem.
+ * Return const value of this TDEConfigSkeletonItem.
*/
const T & value() const
{
@@ -275,7 +275,7 @@ template < typename T > class KConfigSkeletonGenericItem:public KConfigSkeletonI
mReference = mDefault;
}
- virtual void writeConfig(KConfig * config)
+ virtual void writeConfig(TDEConfig * config)
{
if ( mReference != mLoadedValue ) // Is this needed?
{
@@ -287,7 +287,7 @@ template < typename T > class KConfigSkeletonGenericItem:public KConfigSkeletonI
}
}
- void readDefault(KConfig * config)
+ void readDefault(TDEConfig * config)
{
config->setReadDefaults(true);
readConfig(config);
@@ -311,19 +311,19 @@ template < typename T > class KConfigSkeletonGenericItem:public KConfigSkeletonI
/**
* @short Class for handling preferences settings for an application.
* @author Cornelius Schumacher
- * @see KConfigSkeletonItem
+ * @see TDEConfigSkeletonItem
*
* This class provides an interface to preferences settings. Preferences items
* can be registered by the addItem() function corresponding to the data type of
- * the seetting. KConfigSkeleton then handles reading and writing of config files and
+ * the seetting. TDEConfigSkeleton then handles reading and writing of config files and
* setting of default values.
*
- * Normally you will subclass KConfigSkeleton, add data members for the preferences
+ * Normally you will subclass TDEConfigSkeleton, add data members for the preferences
* settings and register the members in the constructor of the subclass.
*
* Example:
* \code
- * class MyPrefs : public KConfigSkeleton
+ * class MyPrefs : public TDEConfigSkeleton
* {
* public:
* MyPrefs()
@@ -342,9 +342,9 @@ template < typename T > class KConfigSkeletonGenericItem:public KConfigSkeletonI
* }
* \endcode
*
- * It might be convenient in many cases to make this subclass of KConfigSkeleton a
+ * It might be convenient in many cases to make this subclass of TDEConfigSkeleton a
* singleton for global access from all over the application without passing
- * references to the KConfigSkeleton object around.
+ * references to the TDEConfigSkeleton object around.
*
* You can write the data to the configuration file by calling @ref writeConfig()
* and read the data from the configuration file by calling @ref readConfig().
@@ -355,21 +355,21 @@ template < typename T > class KConfigSkeletonGenericItem:public KConfigSkeletonI
* @ref usrWriteConfig().
*
* Internally preferences settings are stored in instances of subclasses of
- * @ref KConfigSkeletonItem. You can also add KConfigSkeletonItem subclasses
+ * @ref TDEConfigSkeletonItem. You can also add TDEConfigSkeletonItem subclasses
* for your own types and call the generic @ref addItem() to register them.
*
- * In many cases you don't have to write the specific KConfigSkeleton
- * subclasses yourself, but you can use \ref kconfig_compiler to automatically
+ * In many cases you don't have to write the specific TDEConfigSkeleton
+ * subclasses yourself, but you can use \ref tdeconfig_compiler to automatically
* generate the C++ code from an XML description of the configuration options.
*/
-class TDECORE_EXPORT KConfigSkeleton
+class TDECORE_EXPORT TDEConfigSkeleton
{
public:
/**
* Class for handling a string preferences item.
*/
- class TDECORE_EXPORT ItemString:public KConfigSkeletonGenericItem < TQString >
+ class TDECORE_EXPORT ItemString:public TDEConfigSkeletonGenericItem < TQString >
{
public:
enum Type { Normal, Password, Path };
@@ -379,8 +379,8 @@ public:
const TQString & defaultValue = TQString::fromLatin1(""), // NOT TQString::null !!
Type type = Normal);
- void writeConfig(KConfig * config);
- void readConfig(KConfig * config);
+ void writeConfig(TDEConfig * config);
+ void readConfig(TDEConfig * config);
void setProperty(const TQVariant & p);
TQVariant property() const;
@@ -414,13 +414,13 @@ public:
/**
* Class for handling a TQVariant preferences item.
*/
- class TDECORE_EXPORT ItemProperty:public KConfigSkeletonGenericItem < TQVariant >
+ class TDECORE_EXPORT ItemProperty:public TDEConfigSkeletonGenericItem < TQVariant >
{
public:
ItemProperty(const TQString & group, const TQString & key,
TQVariant & reference, TQVariant defaultValue = 0);
- void readConfig(KConfig * config);
+ void readConfig(TDEConfig * config);
void setProperty(const TQVariant & p);
TQVariant property() const;
};
@@ -429,13 +429,13 @@ public:
/**
* Class for handling a bool preferences item.
*/
- class TDECORE_EXPORT ItemBool:public KConfigSkeletonGenericItem < bool >
+ class TDECORE_EXPORT ItemBool:public TDEConfigSkeletonGenericItem < bool >
{
public:
ItemBool(const TQString & group, const TQString & key, bool & reference,
bool defaultValue = true);
- void readConfig(KConfig * config);
+ void readConfig(TDEConfig * config);
void setProperty(const TQVariant & p);
TQVariant property() const;
};
@@ -444,13 +444,13 @@ public:
/**
* Class for handling an integer preferences item.
*/
- class TDECORE_EXPORT ItemInt:public KConfigSkeletonGenericItem < int >
+ class TDECORE_EXPORT ItemInt:public TDEConfigSkeletonGenericItem < int >
{
public:
ItemInt(const TQString & group, const TQString & key, int &reference,
int defaultValue = 0);
- void readConfig(KConfig * config);
+ void readConfig(TDEConfig * config);
void setProperty(const TQVariant & p);
TQVariant property() const;
TQVariant minValue() const;
@@ -469,13 +469,13 @@ public:
/**
* Class for handling an 64-bit integer preferences item.
*/
- class TDECORE_EXPORT ItemInt64:public KConfigSkeletonGenericItem < TQ_INT64 >
+ class TDECORE_EXPORT ItemInt64:public TDEConfigSkeletonGenericItem < TQ_INT64 >
{
public:
ItemInt64(const TQString & group, const TQString & key, TQ_INT64 &reference,
TQ_INT64 defaultValue = 0);
- void readConfig(KConfig * config);
+ void readConfig(TDEConfig * config);
void setProperty(const TQVariant & p);
TQVariant property() const;
@@ -510,8 +510,8 @@ public:
TQValueList<Choice> choices() const;
- void readConfig(KConfig * config);
- void writeConfig(KConfig * config);
+ void readConfig(TDEConfig * config);
+ void writeConfig(TDEConfig * config);
private:
TQValueList<Choice> mChoices;
@@ -521,13 +521,13 @@ public:
/**
* Class for handling an unsingend integer preferences item.
*/
- class TDECORE_EXPORT ItemUInt:public KConfigSkeletonGenericItem < unsigned int >
+ class TDECORE_EXPORT ItemUInt:public TDEConfigSkeletonGenericItem < unsigned int >
{
public:
ItemUInt(const TQString & group, const TQString & key,
unsigned int &reference, unsigned int defaultValue = 0);
- void readConfig(KConfig * config);
+ void readConfig(TDEConfig * config);
void setProperty(const TQVariant & p);
TQVariant property() const;
TQVariant minValue() const;
@@ -547,13 +547,13 @@ public:
/**
* Class for hanlding a long integer preferences item.
*/
- class TDECORE_EXPORT ItemLong:public KConfigSkeletonGenericItem < long >
+ class TDECORE_EXPORT ItemLong:public TDEConfigSkeletonGenericItem < long >
{
public:
ItemLong(const TQString & group, const TQString & key, long &reference,
long defaultValue = 0);
- void readConfig(KConfig * config);
+ void readConfig(TDEConfig * config);
void setProperty(const TQVariant & p);
TQVariant property() const;
TQVariant minValue() const;
@@ -573,13 +573,13 @@ public:
/**
* Class for handling an unsigned long integer preferences item.
*/
- class TDECORE_EXPORT ItemULong:public KConfigSkeletonGenericItem < unsigned long >
+ class TDECORE_EXPORT ItemULong:public TDEConfigSkeletonGenericItem < unsigned long >
{
public:
ItemULong(const TQString & group, const TQString & key,
unsigned long &reference, unsigned long defaultValue = 0);
- void readConfig(KConfig * config);
+ void readConfig(TDEConfig * config);
void setProperty(const TQVariant & p);
TQVariant property() const;
TQVariant minValue() const;
@@ -598,13 +598,13 @@ public:
/**
* Class for handling unsigned 64-bit integer preferences item.
*/
- class TDECORE_EXPORT ItemUInt64:public KConfigSkeletonGenericItem < TQ_UINT64 >
+ class TDECORE_EXPORT ItemUInt64:public TDEConfigSkeletonGenericItem < TQ_UINT64 >
{
public:
ItemUInt64(const TQString & group, const TQString & key, TQ_UINT64 &reference,
TQ_UINT64 defaultValue = 0);
- void readConfig(KConfig * config);
+ void readConfig(TDEConfig * config);
void setProperty(const TQVariant & p);
TQVariant property() const;
@@ -624,13 +624,13 @@ public:
/**
* Class for handling a floating point preference item.
*/
- class TDECORE_EXPORT ItemDouble:public KConfigSkeletonGenericItem < double >
+ class TDECORE_EXPORT ItemDouble:public TDEConfigSkeletonGenericItem < double >
{
public:
ItemDouble(const TQString & group, const TQString & key,
double &reference, double defaultValue = 0);
- void readConfig(KConfig * config);
+ void readConfig(TDEConfig * config);
void setProperty(const TQVariant & p);
TQVariant property() const;
TQVariant minValue() const;
@@ -650,14 +650,14 @@ public:
/**
* Class for handling a color preferences item.
*/
- class TDECORE_EXPORT ItemColor:public KConfigSkeletonGenericItem < TQColor >
+ class TDECORE_EXPORT ItemColor:public TDEConfigSkeletonGenericItem < TQColor >
{
public:
ItemColor(const TQString & group, const TQString & key,
TQColor & reference,
const TQColor & defaultValue = TQColor(128, 128, 128));
- void readConfig(KConfig * config);
+ void readConfig(TDEConfig * config);
void setProperty(const TQVariant & p);
TQVariant property() const;
};
@@ -666,13 +666,13 @@ public:
/**
* Class for handling a font preferences item.
*/
- class TDECORE_EXPORT ItemFont:public KConfigSkeletonGenericItem < TQFont >
+ class TDECORE_EXPORT ItemFont:public TDEConfigSkeletonGenericItem < TQFont >
{
public:
ItemFont(const TQString & group, const TQString & key, TQFont & reference,
- const TQFont & defaultValue = KGlobalSettings::generalFont());
+ const TQFont & defaultValue = TDEGlobalSettings::generalFont());
- void readConfig(KConfig * config);
+ void readConfig(TDEConfig * config);
void setProperty(const TQVariant & p);
TQVariant property() const;
};
@@ -681,13 +681,13 @@ public:
/**
* Class for handling a TQRect preferences item.
*/
- class TDECORE_EXPORT ItemRect:public KConfigSkeletonGenericItem < TQRect >
+ class TDECORE_EXPORT ItemRect:public TDEConfigSkeletonGenericItem < TQRect >
{
public:
ItemRect(const TQString & group, const TQString & key, TQRect & reference,
const TQRect & defaultValue = TQRect());
- void readConfig(KConfig * config);
+ void readConfig(TDEConfig * config);
void setProperty(const TQVariant & p);
TQVariant property() const;
};
@@ -696,13 +696,13 @@ public:
/**
* Class for handling a TQPoint preferences item.
*/
- class TDECORE_EXPORT ItemPoint:public KConfigSkeletonGenericItem < TQPoint >
+ class TDECORE_EXPORT ItemPoint:public TDEConfigSkeletonGenericItem < TQPoint >
{
public:
ItemPoint(const TQString & group, const TQString & key, TQPoint & reference,
const TQPoint & defaultValue = TQPoint());
- void readConfig(KConfig * config);
+ void readConfig(TDEConfig * config);
void setProperty(const TQVariant & p);
TQVariant property() const;
};
@@ -711,13 +711,13 @@ public:
/**
* Class for handling a TQSize preferences item.
*/
- class TDECORE_EXPORT ItemSize:public KConfigSkeletonGenericItem < TQSize >
+ class TDECORE_EXPORT ItemSize:public TDEConfigSkeletonGenericItem < TQSize >
{
public:
ItemSize(const TQString & group, const TQString & key, TQSize & reference,
const TQSize & defaultValue = TQSize());
- void readConfig(KConfig * config);
+ void readConfig(TDEConfig * config);
void setProperty(const TQVariant & p);
TQVariant property() const;
};
@@ -726,14 +726,14 @@ public:
/**
* Class for handling a TQDateTime preferences item.
*/
- class TDECORE_EXPORT ItemDateTime:public KConfigSkeletonGenericItem < TQDateTime >
+ class TDECORE_EXPORT ItemDateTime:public TDEConfigSkeletonGenericItem < TQDateTime >
{
public:
ItemDateTime(const TQString & group, const TQString & key,
TQDateTime & reference,
const TQDateTime & defaultValue = TQDateTime());
- void readConfig(KConfig * config);
+ void readConfig(TDEConfig * config);
void setProperty(const TQVariant & p);
TQVariant property() const;
};
@@ -742,14 +742,14 @@ public:
/**
* Class for handling a string list preferences item.
*/
- class TDECORE_EXPORT ItemStringList:public KConfigSkeletonGenericItem < TQStringList >
+ class TDECORE_EXPORT ItemStringList:public TDEConfigSkeletonGenericItem < TQStringList >
{
public:
ItemStringList(const TQString & group, const TQString & key,
TQStringList & reference,
const TQStringList & defaultValue = TQStringList());
- void readConfig(KConfig * config);
+ void readConfig(TDEConfig * config);
void setProperty(const TQVariant & p);
TQVariant property() const;
};
@@ -765,22 +765,22 @@ public:
TQStringList & reference,
const TQStringList & defaultValue = TQStringList());
- void readConfig(KConfig * config);
- void writeConfig(KConfig * config);
+ void readConfig(TDEConfig * config);
+ void writeConfig(TDEConfig * config);
};
/**
* Class for handling an integer list preferences item.
*/
- class TDECORE_EXPORT ItemIntList:public KConfigSkeletonGenericItem < TQValueList < int > >
+ class TDECORE_EXPORT ItemIntList:public TDEConfigSkeletonGenericItem < TQValueList < int > >
{
public:
ItemIntList(const TQString & group, const TQString & key,
TQValueList < int >&reference,
const TQValueList < int >&defaultValue = TQValueList < int >());
- void readConfig(KConfig * config);
+ void readConfig(TDEConfig * config);
void setProperty(const TQVariant & p);
TQVariant property() const;
};
@@ -793,19 +793,19 @@ public:
* @param configname name of config file. If no name is given, the default
* config file as returned by kapp()->config() is used.
*/
- KConfigSkeleton(const TQString & configname = TQString::null);
+ TDEConfigSkeleton(const TQString & configname = TQString::null);
/**
* Constructor.
*
* @param config configuration object to use.
*/
- KConfigSkeleton(KSharedConfig::Ptr config);
+ TDEConfigSkeleton(TDESharedConfig::Ptr config);
/**
* Destructor
*/
- virtual ~ KConfigSkeleton();
+ virtual ~ TDEConfigSkeleton();
/**
Set all registered items to their default values.
@@ -840,12 +840,12 @@ public:
}
/**
- * Register a custom @ref KConfigSkeletonItem with a given name. If the name
- * parameter is null, take the name from KConfigSkeletonItem::key().
+ * Register a custom @ref TDEConfigSkeletonItem with a given name. If the name
+ * parameter is null, take the name from TDEConfigSkeletonItem::key().
* Note that all names must be unique but that multiple entries can have
* the same key if they reside in different groups.
*/
- void addItem(KConfigSkeletonItem *, const TQString & name = TQString::null );
+ void addItem(TDEConfigSkeletonItem *, const TQString & name = TQString::null );
/**
* Register an item of type TQString.
@@ -1059,7 +1059,7 @@ public:
*/
ItemFont *addItemFont(const TQString & name, TQFont & reference,
const TQFont & defaultValue =
- KGlobalSettings::generalFont(),
+ TDEGlobalSettings::generalFont(),
const TQString & key = TQString::null);
/**
@@ -1154,14 +1154,14 @@ public:
const TQString & key = TQString::null);
/**
- * Return the @ref KConfig object used for reading and writing the settings.
+ * Return the @ref TDEConfig object used for reading and writing the settings.
*/
- KConfig *config() const;
+ TDEConfig *config() const;
/**
- * Return list of items managed by this KConfigSkeleton object.
+ * Return list of items managed by this TDEConfigSkeleton object.
*/
- KConfigSkeletonItem::List items() const
+ TDEConfigSkeletonItem::List items() const
{
return mItems;
}
@@ -1174,7 +1174,7 @@ public:
/**
* Lookup item by name
*/
- KConfigSkeletonItem * findItem(const TQString & name);
+ TDEConfigSkeletonItem * findItem(const TQString & name);
/**
* Indicate whether this object should reflect the actual
@@ -1215,10 +1215,10 @@ protected:
private:
TQString mCurrentGroup;
- KSharedConfig::Ptr mConfig; // pointer to KConfig object
+ TDESharedConfig::Ptr mConfig; // pointer to TDEConfig object
- KConfigSkeletonItem::List mItems;
- KConfigSkeletonItem::Dict mItemDict;
+ TDEConfigSkeletonItem::List mItems;
+ TDEConfigSkeletonItem::Dict mItemDict;
bool mUseDefaults;
diff --git a/tdecore/kglobal.cpp b/tdecore/tdeglobal.cpp
index 6c88302ce..f8639d526 100644
--- a/tdecore/kglobal.cpp
+++ b/tdecore/tdeglobal.cpp
@@ -16,7 +16,7 @@
Boston, MA 02110-1301, USA.
*/
/*
-* kglobal.cpp -- Implementation of class KGlobal.
+* tdeglobal.cpp -- Implementation of class TDEGlobal.
* Author: Sirtaj Singh Kang
* Version: $Id$
* Generated: Sat May 1 02:08:43 EST 1999
@@ -25,13 +25,13 @@
#include <tqglobal.h>
#include <tqdict.h>
#include <tqptrlist.h>
-#include "kglobal.h"
+#include "tdeglobal.h"
-#include <kapplication.h>
-#include <kaboutdata.h>
+#include <tdeapplication.h>
+#include <tdeaboutdata.h>
#include <kdebug.h>
-#include <kconfig.h>
-#include <klocale.h>
+#include <tdeconfig.h>
+#include <tdelocale.h>
#include <kcharsets.h>
#include <kiconloader.h>
#include <tdehardwaredevices.h>
@@ -44,7 +44,7 @@
#ifndef NDEBUG
#define MYASSERT(x) if (!x) \
- tqFatal("Fatal error: you need to have a KInstance object before\n" \
+ tqFatal("Fatal error: you need to have a TDEInstance object before\n" \
"you do anything that requires it! Examples of this are config\n" \
"objects, standard directories or translations.");
#else
@@ -53,55 +53,55 @@
static void kglobal_init();
-KStandardDirs *KGlobal::dirs()
+TDEStandardDirs *TDEGlobal::dirs()
{
MYASSERT(_instance);
return _instance->dirs();
}
-KConfig *KGlobal::config()
+TDEConfig *TDEGlobal::config()
{
MYASSERT(_instance);
return _instance->config();
}
-KSharedConfig *KGlobal::sharedConfig()
+TDESharedConfig *TDEGlobal::sharedConfig()
{
MYASSERT(_instance);
return _instance->sharedConfig();
}
-KIconLoader *KGlobal::iconLoader()
+TDEIconLoader *TDEGlobal::iconLoader()
{
MYASSERT(_instance);
return _instance->iconLoader();
}
-TDEHardwareDevices *KGlobal::hardwareDevices()
+TDEHardwareDevices *TDEGlobal::hardwareDevices()
{
MYASSERT(_instance);
return _instance->hardwareDevices();
}
-TDEGlobalNetworkManager *KGlobal::networkManager()
+TDEGlobalNetworkManager *TDEGlobal::networkManager()
{
MYASSERT(_instance);
return _instance->networkManager();
}
-KInstance *KGlobal::instance()
+TDEInstance *TDEGlobal::instance()
{
MYASSERT(_instance);
return _instance;
}
-KLocale *KGlobal::locale()
+TDELocale *TDEGlobal::locale()
{
if( _locale == 0 ) {
if (!_instance)
@@ -109,7 +109,7 @@ KLocale *KGlobal::locale()
kglobal_init();
// will set _locale if it works - otherwise 0 is returned
- KLocale::initInstance();
+ TDELocale::initInstance();
if( _instance->aboutData())
_instance->aboutData()->translateInternalProgramName();
}
@@ -117,7 +117,7 @@ KLocale *KGlobal::locale()
return _locale;
}
-KCharsets *KGlobal::charsets()
+KCharsets *TDEGlobal::charsets()
{
if( _charsets == 0 ) {
_charsets =new KCharsets();
@@ -127,7 +127,7 @@ KCharsets *KGlobal::charsets()
return _charsets;
}
-void KGlobal::setActiveInstance(KInstance *i)
+void TDEGlobal::setActiveInstance(TDEInstance *i)
{
_activeInstance = i;
if (i && _locale)
@@ -138,10 +138,10 @@ void KGlobal::setActiveInstance(KInstance *i)
* Create a static QString
*
* To be used inside functions(!) like:
- * static const TQString &myString = KGlobal::staticQString("myText");
+ * static const TQString &myString = TDEGlobal::staticQString("myText");
*/
const TQString &
-KGlobal::staticQString(const char *str)
+TDEGlobal::staticQString(const char *str)
{
return staticQString(TQString::fromLatin1(str));
}
@@ -156,10 +156,10 @@ public:
* Create a static QString
*
* To be used inside functions(!) like:
- * static const TQString &myString = KGlobal::staticQString(i18n("My Text"));
+ * static const TQString &myString = TDEGlobal::staticQString(i18n("My Text"));
*/
const TQString &
-KGlobal::staticQString(const TQString &str)
+TDEGlobal::staticQString(const TQString &str)
{
if (!_stringDict) {
_stringDict = new KStringDict;
@@ -182,7 +182,7 @@ public:
};
void
-KGlobal::registerStaticDeleter(KStaticDeleterBase *obj)
+TDEGlobal::registerStaticDeleter(KStaticDeleterBase *obj)
{
if (!_staticDeleters)
kglobal_init();
@@ -191,16 +191,16 @@ KGlobal::registerStaticDeleter(KStaticDeleterBase *obj)
}
void
-KGlobal::unregisterStaticDeleter(KStaticDeleterBase *obj)
+TDEGlobal::unregisterStaticDeleter(KStaticDeleterBase *obj)
{
if (_staticDeleters)
_staticDeleters->removeRef(obj);
}
void
-KGlobal::deleteStaticDeleters()
+TDEGlobal::deleteStaticDeleters()
{
- if (!KGlobal::_staticDeleters)
+ if (!TDEGlobal::_staticDeleters)
return;
for(;_staticDeleters->count();)
@@ -208,18 +208,18 @@ KGlobal::deleteStaticDeleters()
_staticDeleters->take(0)->destructObject();
}
- delete KGlobal::_staticDeleters;
- KGlobal::_staticDeleters = 0;
+ delete TDEGlobal::_staticDeleters;
+ TDEGlobal::_staticDeleters = 0;
}
// The Variables
-KStringDict *KGlobal::_stringDict = 0;
-KInstance *KGlobal::_instance = 0;
-KInstance *KGlobal::_activeInstance = 0;
-KLocale *KGlobal::_locale = 0;
-KCharsets *KGlobal::_charsets = 0;
-KStaticDeleterList *KGlobal::_staticDeleters = 0;
+KStringDict *TDEGlobal::_stringDict = 0;
+TDEInstance *TDEGlobal::_instance = 0;
+TDEInstance *TDEGlobal::_activeInstance = 0;
+TDELocale *TDEGlobal::_locale = 0;
+KCharsets *TDEGlobal::_charsets = 0;
+KStaticDeleterList *TDEGlobal::_staticDeleters = 0;
#ifdef WIN32
#include <windows.h>
@@ -235,23 +235,23 @@ __attribute__((destructor))
#endif
static void kglobal_freeAll()
{
- delete KGlobal::_locale;
- KGlobal::_locale = 0;
- delete KGlobal::_charsets;
- KGlobal::_charsets = 0;
- delete KGlobal::_stringDict;
- KGlobal::_stringDict = 0;
- KGlobal::deleteStaticDeleters();
+ delete TDEGlobal::_locale;
+ TDEGlobal::_locale = 0;
+ delete TDEGlobal::_charsets;
+ TDEGlobal::_charsets = 0;
+ delete TDEGlobal::_stringDict;
+ TDEGlobal::_stringDict = 0;
+ TDEGlobal::deleteStaticDeleters();
// so that we don't hold a reference and see memory leaks :/
- KGlobal::setActiveInstance(0);
+ TDEGlobal::setActiveInstance(0);
}
static void kglobal_init()
{
- if (KGlobal::_staticDeleters)
+ if (TDEGlobal::_staticDeleters)
return;
- KGlobal::_staticDeleters = new KStaticDeleterList;
+ TDEGlobal::_staticDeleters = new KStaticDeleterList;
}
int kasciistricmp( const char *str1, const char *str2 )
diff --git a/tdecore/kglobal.h b/tdecore/tdeglobal.h
index d7aadbc3f..a1a8114be 100644
--- a/tdecore/kglobal.h
+++ b/tdecore/tdeglobal.h
@@ -19,16 +19,16 @@
#define _KGLOBAL_H
#include "tdelibs_export.h"
-#include <kinstance.h> // KDE4: class KInstance is enough here
+#include <kinstance.h> // KDE4: class TDEInstance is enough here
class KCharsets;
-class KConfig;
-class KSharedConfig;
-class KIconLoader;
+class TDEConfig;
+class TDESharedConfig;
+class TDEIconLoader;
class TDEHardwareDevices;
class TDEGlobalNetworkManager;
-class KLocale;
-class KStandardDirs;
+class TDELocale;
+class TDEStandardDirs;
class KStaticDeleterBase;
class KStaticDeleterList;
class KStringDict;
@@ -36,14 +36,14 @@ class TQString;
/**
* Access to the KDE global objects.
- * KGlobal provides you with pointers of many central
+ * TDEGlobal provides you with pointers of many central
* objects that exist only once in the process. It is also
* responsible for managing instances of KStaticDeleterBase.
*
* @see KStaticDeleterBase
* @author Sirtaj Singh Kang (taj@kde.org)
*/
-class TDECORE_EXPORT KGlobal
+class TDECORE_EXPORT TDEGlobal
{
public:
@@ -53,31 +53,31 @@ public:
* cases the application itself).
* @return the global instance
*/
- static KInstance *instance();
+ static TDEInstance *instance();
/**
* Returns the application standard dirs object.
* @return the global standard dir object
*/
- static KStandardDirs *dirs();
+ static TDEStandardDirs *dirs();
/**
* Returns the general config object.
* @return the global configuration object.
*/
- static KConfig *config();
+ static TDEConfig *config();
/**
* Returns the general config object.
* @return the global configuration object.
*/
- static KSharedConfig *sharedConfig();
+ static TDESharedConfig *sharedConfig();
/**
* Returns an iconloader object.
* @return the global iconloader object
*/
- static KIconLoader *iconLoader();
+ static TDEIconLoader *iconLoader();
/**
* Returns a TDEHardwareDevices object.
@@ -95,7 +95,7 @@ public:
* Returns the global locale object.
* @return the global locale object
*/
- static KLocale *locale();
+ static TDELocale *locale();
/**
* The global charset manager.
@@ -108,12 +108,12 @@ public:
*
* To be used inside functions(!) like:
* \code
- * static const TQString &myString = KGlobal::staticQString("myText");
+ * static const TQString &myString = TDEGlobal::staticQString("myText");
* \endcode
*
* !!! Do _NOT_ use: !!!
* \code
- * static TQString myString = KGlobal::staticQString("myText");
+ * static TQString myString = TDEGlobal::staticQString("myText");
* \endcode
* This creates a static object (instead of a static reference)
* and as you know static objects are EVIL.
@@ -127,12 +127,12 @@ public:
*
* To be used inside functions(!) like:
* \code
- * static const TQString &myString = KGlobal::staticQString(i18n("My Text"));
+ * static const TQString &myString = TDEGlobal::staticQString(i18n("My Text"));
* \endcode
*
* !!! Do _NOT_ use: !!!
* \code
- * static TQString myString = KGlobal::staticQString(i18n("myText"));
+ * static TQString myString = TDEGlobal::staticQString(i18n("myText"));
* \endcode
* This creates a static object (instead of a static reference)
* and as you know static objects are EVIL.
@@ -167,40 +167,40 @@ public:
//private:
static KStringDict *_stringDict;
- static KInstance *_instance;
- static KLocale *_locale;
+ static TDEInstance *_instance;
+ static TDELocale *_locale;
static KCharsets *_charsets;
static KStaticDeleterList *_staticDeleters;
/**
* The instance currently active (useful in a multi-instance
* application, such as a KParts application).
- * Don't use this - it's mainly for KAboutDialog and KBugReport.
+ * Don't use this - it's mainly for TDEAboutDialog and KBugReport.
* @internal
*/
- static void setActiveInstance(KInstance *d);
- static KInstance *activeInstance() { return _activeInstance; }
+ static void setActiveInstance(TDEInstance *d);
+ static TDEInstance *activeInstance() { return _activeInstance; }
- static KInstance *_activeInstance;
+ static TDEInstance *_activeInstance;
};
/**
- * \relates KGlobal
+ * \relates TDEGlobal
* A typesafe function to find the minimum of the two arguments.
*/
#define KMIN(a,b) kMin(a,b)
/**
- * \relates KGlobal
+ * \relates TDEGlobal
* A typesafe function to find the maximum of the two arguments.
*/
#define KMAX(a,b) kMax(a,b)
/**
- * \relates KGlobal
+ * \relates TDEGlobal
* A typesafe function to determine the absolute value of the argument.
*/
#define KABS(a) kAbs(a)
/**
- * \relates KGlobal
+ * \relates TDEGlobal
* A typesafe function that returns x if it's between low and high values.
* low if x is smaller than then low and high if x is bigger than high.
*/
@@ -242,7 +242,7 @@ int TDECORE_EXPORT kasciistricmp( const char *str1, const char *str2 );
* of other (but no less important) things.
*
* All KDE applications should link to the tdecore library. Also, using a
- * KApplication derived class instead of TQApplication is almost
+ * TDEApplication derived class instead of TQApplication is almost
* mandatory if you expect your application to behave nicely within the
* KDE environment.
*/
diff --git a/tdecore/kglobalsettings.cpp b/tdecore/tdeglobalsettings.cpp
index d257097bf..c0c6329c7 100644
--- a/tdecore/kglobalsettings.cpp
+++ b/tdecore/tdeglobalsettings.cpp
@@ -16,16 +16,16 @@
Boston, MA 02110-1301, USA.
*/
#include "config.h"
-#include "kglobalsettings.h"
+#include "tdeglobalsettings.h"
#include <tqdir.h>
#include <tqpixmap.h>
#include <tqfontdatabase.h>
#include <tqcursor.h>
-#include <kconfig.h>
+#include <tdeconfig.h>
#include <ksimpleconfig.h>
-#include <kapplication.h>
+#include <tdeapplication.h>
#include <kipc.h>
@@ -40,12 +40,12 @@ static QRgb qt_colorref2qrgb(COLORREF col)
#endif
#include <kdebug.h>
-#include <kglobal.h>
-#include <kshortcut.h>
+#include <tdeglobal.h>
+#include <tdeshortcut.h>
#include <kstandarddirs.h>
#include <kcharsets.h>
-#include <kaccel.h>
-#include <klocale.h>
+#include <tdeaccel.h>
+#include <tdelocale.h>
#include <tqfontinfo.h>
#include <stdlib.h>
#include <kprotocolinfo.h>
@@ -58,28 +58,28 @@ static QRgb qt_colorref2qrgb(COLORREF col)
#include <X11/Xlib.h>
#endif
-TQString* KGlobalSettings::s_desktopPath = 0;
-TQString* KGlobalSettings::s_autostartPath = 0;
-TQString* KGlobalSettings::s_trashPath = 0;
-TQString* KGlobalSettings::s_documentPath = 0;
-TQFont *KGlobalSettings::_generalFont = 0;
-TQFont *KGlobalSettings::_fixedFont = 0;
-TQFont *KGlobalSettings::_toolBarFont = 0;
-TQFont *KGlobalSettings::_menuFont = 0;
-TQFont *KGlobalSettings::_windowTitleFont = 0;
-TQFont *KGlobalSettings::_taskbarFont = 0;
-TQFont *KGlobalSettings::_largeFont = 0;
-TQColor *KGlobalSettings::_trinity4Blue = 0;
-TQColor *KGlobalSettings::_inactiveBackground = 0;
-TQColor *KGlobalSettings::_inactiveForeground = 0;
-TQColor *KGlobalSettings::_activeBackground = 0;
-TQColor *KGlobalSettings::_buttonBackground = 0;
-TQColor *KGlobalSettings::_selectBackground = 0;
-TQColor *KGlobalSettings::_linkColor = 0;
-TQColor *KGlobalSettings::_visitedLinkColor = 0;
-TQColor *KGlobalSettings::alternateColor = 0;
-
-KGlobalSettings::KMouseSettings *KGlobalSettings::s_mouseSettings = 0;
+TQString* TDEGlobalSettings::s_desktopPath = 0;
+TQString* TDEGlobalSettings::s_autostartPath = 0;
+TQString* TDEGlobalSettings::s_trashPath = 0;
+TQString* TDEGlobalSettings::s_documentPath = 0;
+TQFont *TDEGlobalSettings::_generalFont = 0;
+TQFont *TDEGlobalSettings::_fixedFont = 0;
+TQFont *TDEGlobalSettings::_toolBarFont = 0;
+TQFont *TDEGlobalSettings::_menuFont = 0;
+TQFont *TDEGlobalSettings::_windowTitleFont = 0;
+TQFont *TDEGlobalSettings::_taskbarFont = 0;
+TQFont *TDEGlobalSettings::_largeFont = 0;
+TQColor *TDEGlobalSettings::_trinity4Blue = 0;
+TQColor *TDEGlobalSettings::_inactiveBackground = 0;
+TQColor *TDEGlobalSettings::_inactiveForeground = 0;
+TQColor *TDEGlobalSettings::_activeBackground = 0;
+TQColor *TDEGlobalSettings::_buttonBackground = 0;
+TQColor *TDEGlobalSettings::_selectBackground = 0;
+TQColor *TDEGlobalSettings::_linkColor = 0;
+TQColor *TDEGlobalSettings::_visitedLinkColor = 0;
+TQColor *TDEGlobalSettings::alternateColor = 0;
+
+TDEGlobalSettings::KMouseSettings *TDEGlobalSettings::s_mouseSettings = 0;
// helper function for reading xdg user dirs: it is required in order to take
// care of locale stuff
@@ -106,49 +106,49 @@ void readXdgUserDirs(TQString *desktop, TQString *documents)
}
}
-int KGlobalSettings::dndEventDelay()
+int TDEGlobalSettings::dndEventDelay()
{
- KConfigGroup g( KGlobal::config(), "General" );
+ TDEConfigGroup g( TDEGlobal::config(), "General" );
return g.readNumEntry("StartDragDist", TQApplication::startDragDistance());
}
-bool KGlobalSettings::singleClick()
+bool TDEGlobalSettings::singleClick()
{
- KConfigGroup g( KGlobal::config(), "KDE" );
+ TDEConfigGroup g( TDEGlobal::config(), "KDE" );
return g.readBoolEntry("SingleClick", KDE_DEFAULT_SINGLECLICK);
}
-bool KGlobalSettings::iconUseRoundedRect()
+bool TDEGlobalSettings::iconUseRoundedRect()
{
- KConfigGroup g( KGlobal::config(), "KDE" );
+ TDEConfigGroup g( TDEGlobal::config(), "KDE" );
return g.readBoolEntry("IconUseRoundedRect", KDE_DEFAULT_ICONTEXTROUNDED);
}
-KGlobalSettings::TearOffHandle KGlobalSettings::insertTearOffHandle()
+TDEGlobalSettings::TearOffHandle TDEGlobalSettings::insertTearOffHandle()
{
int tearoff;
bool effectsenabled;
- KConfigGroup g( KGlobal::config(), "KDE" );
+ TDEConfigGroup g( TDEGlobal::config(), "KDE" );
effectsenabled = g.readBoolEntry( "EffectsEnabled", false);
tearoff = g.readNumEntry("InsertTearOffHandle", KDE_DEFAULT_INSERTTEAROFFHANDLES);
return effectsenabled ? (TearOffHandle) tearoff : Disable;
}
-bool KGlobalSettings::changeCursorOverIcon()
+bool TDEGlobalSettings::changeCursorOverIcon()
{
- KConfigGroup g( KGlobal::config(), "KDE" );
+ TDEConfigGroup g( TDEGlobal::config(), "KDE" );
return g.readBoolEntry("ChangeCursor", KDE_DEFAULT_CHANGECURSOR);
}
-bool KGlobalSettings::visualActivate()
+bool TDEGlobalSettings::visualActivate()
{
- KConfigGroup g( KGlobal::config(), "KDE" );
+ TDEConfigGroup g( TDEGlobal::config(), "KDE" );
return g.readBoolEntry("VisualActivate", KDE_DEFAULT_VISUAL_ACTIVATE);
}
-unsigned int KGlobalSettings::visualActivateSpeed()
+unsigned int TDEGlobalSettings::visualActivateSpeed()
{
- KConfigGroup g( KGlobal::config(), "KDE" );
+ TDEConfigGroup g( TDEGlobal::config(), "KDE" );
return
g.readNumEntry(
"VisualActivateSpeed",
@@ -158,16 +158,16 @@ unsigned int KGlobalSettings::visualActivateSpeed()
-int KGlobalSettings::autoSelectDelay()
+int TDEGlobalSettings::autoSelectDelay()
{
- KConfigGroup g( KGlobal::config(), "KDE" );
+ TDEConfigGroup g( TDEGlobal::config(), "KDE" );
return g.readNumEntry("AutoSelectDelay", KDE_DEFAULT_AUTOSELECTDELAY);
}
-KGlobalSettings::Completion KGlobalSettings::completionMode()
+TDEGlobalSettings::Completion TDEGlobalSettings::completionMode()
{
int completion;
- KConfigGroup g( KGlobal::config(), "General" );
+ TDEConfigGroup g( TDEGlobal::config(), "General" );
completion = g.readNumEntry("completionMode", -1);
if ((completion < (int) CompletionNone) ||
(completion > (int) CompletionPopupAuto))
@@ -177,51 +177,51 @@ KGlobalSettings::Completion KGlobalSettings::completionMode()
return (Completion) completion;
}
-bool KGlobalSettings::showContextMenusOnPress ()
+bool TDEGlobalSettings::showContextMenusOnPress ()
{
- KConfigGroup g(KGlobal::config(), "ContextMenus");
+ TDEConfigGroup g(TDEGlobal::config(), "ContextMenus");
return g.readBoolEntry("ShowOnPress", true);
}
-int KGlobalSettings::contextMenuKey ()
+int TDEGlobalSettings::contextMenuKey ()
{
- KConfigGroup g(KGlobal::config(), "Shortcuts");
- KShortcut cut (g.readEntry ("PopupMenuContext", "Menu"));
+ TDEConfigGroup g(TDEGlobal::config(), "Shortcuts");
+ TDEShortcut cut (g.readEntry ("PopupMenuContext", "Menu"));
return cut.keyCodeQt();
}
-TQColor KGlobalSettings::toolBarHighlightColor()
+TQColor TDEGlobalSettings::toolBarHighlightColor()
{
initColors();
- KConfigGroup g( KGlobal::config(), "Toolbar style" );
+ TDEConfigGroup g( TDEGlobal::config(), "Toolbar style" );
return g.readColorEntry("HighlightColor", _trinity4Blue);
}
-TQColor KGlobalSettings::inactiveTitleColor()
+TQColor TDEGlobalSettings::inactiveTitleColor()
{
#ifdef Q_WS_WIN
return qt_colorref2qrgb(GetSysColor(COLOR_INACTIVECAPTION));
#else
if (!_inactiveBackground)
_inactiveBackground = new TQColor(157, 170, 186);
- KConfigGroup g( KGlobal::config(), "WM" );
+ TDEConfigGroup g( TDEGlobal::config(), "WM" );
return g.readColorEntry( "inactiveBackground", _inactiveBackground );
#endif
}
-TQColor KGlobalSettings::inactiveTextColor()
+TQColor TDEGlobalSettings::inactiveTextColor()
{
#ifdef Q_WS_WIN
return qt_colorref2qrgb(GetSysColor(COLOR_INACTIVECAPTIONTEXT));
#else
if (!_inactiveForeground)
_inactiveForeground = new TQColor(221,221,221);
- KConfigGroup g( KGlobal::config(), "WM" );
+ TDEConfigGroup g( TDEGlobal::config(), "WM" );
return g.readColorEntry( "inactiveForeground", _inactiveForeground );
#endif
}
-TQColor KGlobalSettings::activeTitleColor()
+TQColor TDEGlobalSettings::activeTitleColor()
{
#ifdef Q_WS_WIN
return qt_colorref2qrgb(GetSysColor(COLOR_ACTIVECAPTION));
@@ -229,89 +229,89 @@ TQColor KGlobalSettings::activeTitleColor()
initColors();
if (!_activeBackground)
_activeBackground = new TQColor(65,142,220);
- KConfigGroup g( KGlobal::config(), "WM" );
+ TDEConfigGroup g( TDEGlobal::config(), "WM" );
return g.readColorEntry( "activeBackground", _activeBackground);
#endif
}
-TQColor KGlobalSettings::activeTextColor()
+TQColor TDEGlobalSettings::activeTextColor()
{
#ifdef Q_WS_WIN
return qt_colorref2qrgb(GetSysColor(COLOR_CAPTIONTEXT));
#else
- KConfigGroup g( KGlobal::config(), "WM" );
+ TDEConfigGroup g( TDEGlobal::config(), "WM" );
return g.readColorEntry( "activeForeground", tqwhiteptr );
#endif
}
-int KGlobalSettings::contrast()
+int TDEGlobalSettings::contrast()
{
- KConfigGroup g( KGlobal::config(), "KDE" );
+ TDEConfigGroup g( TDEGlobal::config(), "KDE" );
return g.readNumEntry( "contrast", 7 );
}
-TQColor KGlobalSettings::buttonBackground()
+TQColor TDEGlobalSettings::buttonBackground()
{
if (!_buttonBackground)
_buttonBackground = new TQColor(221,223,228);
- KConfigGroup g( KGlobal::config(), "General" );
+ TDEConfigGroup g( TDEGlobal::config(), "General" );
return g.readColorEntry( "buttonBackground", _buttonBackground );
}
-TQColor KGlobalSettings::buttonTextColor()
+TQColor TDEGlobalSettings::buttonTextColor()
{
- KConfigGroup g( KGlobal::config(), "General" );
+ TDEConfigGroup g( TDEGlobal::config(), "General" );
return g.readColorEntry( "buttonForeground", tqblackptr );
}
// IMPORTANT:
// This function should be kept in sync with
-// KApplication::kdisplaySetPalette()
-TQColor KGlobalSettings::baseColor()
+// TDEApplication::tdedisplaySetPalette()
+TQColor TDEGlobalSettings::baseColor()
{
- KConfigGroup g( KGlobal::config(), "General" );
+ TDEConfigGroup g( TDEGlobal::config(), "General" );
return g.readColorEntry( "windowBackground", tqwhiteptr );
}
// IMPORTANT:
// This function should be kept in sync with
-// KApplication::kdisplaySetPalette()
-TQColor KGlobalSettings::textColor()
+// TDEApplication::tdedisplaySetPalette()
+TQColor TDEGlobalSettings::textColor()
{
- KConfigGroup g( KGlobal::config(), "General" );
+ TDEConfigGroup g( TDEGlobal::config(), "General" );
return g.readColorEntry( "windowForeground", tqblackptr );
}
// IMPORTANT:
// This function should be kept in sync with
-// KApplication::kdisplaySetPalette()
-TQColor KGlobalSettings::highlightedTextColor()
+// TDEApplication::tdedisplaySetPalette()
+TQColor TDEGlobalSettings::highlightedTextColor()
{
- KConfigGroup g( KGlobal::config(), "General" );
+ TDEConfigGroup g( TDEGlobal::config(), "General" );
return g.readColorEntry( "selectForeground", tqwhiteptr );
}
// IMPORTANT:
// This function should be kept in sync with
-// KApplication::kdisplaySetPalette()
-TQColor KGlobalSettings::highlightColor()
+// TDEApplication::tdedisplaySetPalette()
+TQColor TDEGlobalSettings::highlightColor()
{
initColors();
if (!_selectBackground)
_selectBackground = new TQColor(103,141,178);
- KConfigGroup g( KGlobal::config(), "General" );
+ TDEConfigGroup g( TDEGlobal::config(), "General" );
return g.readColorEntry( "selectBackground", _selectBackground );
}
-TQColor KGlobalSettings::alternateBackgroundColor()
+TQColor TDEGlobalSettings::alternateBackgroundColor()
{
initColors();
- KConfigGroup g( KGlobal::config(), "General" );
+ TDEConfigGroup g( TDEGlobal::config(), "General" );
*alternateColor = calculateAlternateBackgroundColor( baseColor() );
return g.readColorEntry( "alternateBackground", alternateColor );
}
-TQColor KGlobalSettings::calculateAlternateBackgroundColor(const TQColor& base)
+TQColor TDEGlobalSettings::calculateAlternateBackgroundColor(const TQColor& base)
{
if (base == Qt::white)
return TQColor(238,246,255);
@@ -328,30 +328,30 @@ TQColor KGlobalSettings::calculateAlternateBackgroundColor(const TQColor& base)
}
}
-bool KGlobalSettings::shadeSortColumn()
+bool TDEGlobalSettings::shadeSortColumn()
{
- KConfigGroup g( KGlobal::config(), "General" );
+ TDEConfigGroup g( TDEGlobal::config(), "General" );
return g.readBoolEntry( "shadeSortColumn", KDE_DEFAULT_SHADE_SORT_COLUMN );
}
-TQColor KGlobalSettings::linkColor()
+TQColor TDEGlobalSettings::linkColor()
{
initColors();
if (!_linkColor)
_linkColor = new TQColor(0,0,238);
- KConfigGroup g( KGlobal::config(), "General" );
+ TDEConfigGroup g( TDEGlobal::config(), "General" );
return g.readColorEntry( "linkColor", _linkColor );
}
-TQColor KGlobalSettings::visitedLinkColor()
+TQColor TDEGlobalSettings::visitedLinkColor()
{
if (!_visitedLinkColor)
_visitedLinkColor = new TQColor(82,24,139);
- KConfigGroup g( KGlobal::config(), "General" );
+ TDEConfigGroup g( TDEGlobal::config(), "General" );
return g.readColorEntry( "visitedLinkColor", _visitedLinkColor );
}
-TQFont KGlobalSettings::generalFont()
+TQFont TDEGlobalSettings::generalFont()
{
if (_generalFont)
return *_generalFont;
@@ -361,13 +361,13 @@ TQFont KGlobalSettings::generalFont()
_generalFont->setPointSize(10);
_generalFont->setStyleHint(TQFont::SansSerif);
- KConfigGroup g( KGlobal::config(), "General" );
+ TDEConfigGroup g( TDEGlobal::config(), "General" );
*_generalFont = g.readFontEntry("font", _generalFont);
return *_generalFont;
}
-TQFont KGlobalSettings::fixedFont()
+TQFont TDEGlobalSettings::fixedFont()
{
if (_fixedFont)
return *_fixedFont;
@@ -377,13 +377,13 @@ TQFont KGlobalSettings::fixedFont()
_fixedFont->setPointSize(10);
_fixedFont->setStyleHint(TQFont::TypeWriter);
- KConfigGroup g( KGlobal::config(), "General" );
+ TDEConfigGroup g( TDEGlobal::config(), "General" );
*_fixedFont = g.readFontEntry("fixed", _fixedFont);
return *_fixedFont;
}
-TQFont KGlobalSettings::toolBarFont()
+TQFont TDEGlobalSettings::toolBarFont()
{
if(_toolBarFont)
return *_toolBarFont;
@@ -393,13 +393,13 @@ TQFont KGlobalSettings::toolBarFont()
_toolBarFont->setPointSize(10);
_toolBarFont->setStyleHint(TQFont::SansSerif);
- KConfigGroup g( KGlobal::config(), "General" );
+ TDEConfigGroup g( TDEGlobal::config(), "General" );
*_toolBarFont = g.readFontEntry("toolBarFont", _toolBarFont);
return *_toolBarFont;
}
-TQFont KGlobalSettings::menuFont()
+TQFont TDEGlobalSettings::menuFont()
{
if(_menuFont)
return *_menuFont;
@@ -409,13 +409,13 @@ TQFont KGlobalSettings::menuFont()
_menuFont->setPointSize(10);
_menuFont->setStyleHint(TQFont::SansSerif);
- KConfigGroup g( KGlobal::config(), "General" );
+ TDEConfigGroup g( TDEGlobal::config(), "General" );
*_menuFont = g.readFontEntry("menuFont", _menuFont);
return *_menuFont;
}
-TQFont KGlobalSettings::windowTitleFont()
+TQFont TDEGlobalSettings::windowTitleFont()
{
if(_windowTitleFont)
return *_windowTitleFont;
@@ -425,13 +425,13 @@ TQFont KGlobalSettings::windowTitleFont()
_windowTitleFont->setPointSize(10);
_windowTitleFont->setStyleHint(TQFont::SansSerif);
- KConfigGroup g( KGlobal::config(), "WM" );
+ TDEConfigGroup g( TDEGlobal::config(), "WM" );
*_windowTitleFont = g.readFontEntry("activeFont", _windowTitleFont); // inconsistency
return *_windowTitleFont;
}
-TQFont KGlobalSettings::taskbarFont()
+TQFont TDEGlobalSettings::taskbarFont()
{
if(_taskbarFont)
return *_taskbarFont;
@@ -441,14 +441,14 @@ TQFont KGlobalSettings::taskbarFont()
_taskbarFont->setPointSize(10);
_taskbarFont->setStyleHint(TQFont::SansSerif);
- KConfigGroup g( KGlobal::config(), "General" );
+ TDEConfigGroup g( TDEGlobal::config(), "General" );
*_taskbarFont = g.readFontEntry("taskbarFont", _taskbarFont);
return *_taskbarFont;
}
-TQFont KGlobalSettings::largeFont(const TQString &text)
+TQFont TDEGlobalSettings::largeFont(const TQString &text)
{
TQFontDatabase db;
TQStringList fam = db.families();
@@ -501,12 +501,12 @@ TQFont KGlobalSettings::largeFont(const TQString &text)
return *_largeFont;
}
}
- _largeFont = new TQFont(KGlobalSettings::generalFont());
+ _largeFont = new TQFont(TDEGlobalSettings::generalFont());
_largeFont->setPointSize(48);
return *_largeFont;
}
-void KGlobalSettings::initStatic() // should be called initPaths(). Don't put anything else here.
+void TDEGlobalSettings::initStatic() // should be called initPaths(). Don't put anything else here.
{
if ( s_desktopPath != 0 )
return;
@@ -516,7 +516,7 @@ void KGlobalSettings::initStatic() // should be called initPaths(). Don't put an
s_trashPath = new TQString();
s_documentPath = new TQString();
- KConfigGroup g( KGlobal::config(), "Paths" );
+ TDEConfigGroup g( TDEGlobal::config(), "Paths" );
// Read desktop and documents path using XDG_USER_DIRS
readXdgUserDirs(s_desktopPath, s_documentPath);
@@ -539,7 +539,7 @@ void KGlobalSettings::initStatic() // should be called initPaths(). Don't put an
if ( !s_documentPath->endsWith("/"))
s_documentPath->append('/');
- // Trash Path - TODO remove in KDE4 (kio_trash can't use it for interoperability reasons)
+ // Trash Path - TODO remove in KDE4 (tdeio_trash can't use it for interoperability reasons)
*s_trashPath = *s_desktopPath + i18n("Trash") + "/";
*s_trashPath = g.readPathEntry( "Trash" , *s_trashPath);
*s_trashPath = TQDir::cleanDirPath( *s_trashPath );
@@ -553,7 +553,7 @@ void KGlobalSettings::initStatic() // should be called initPaths(). Don't put an
}
// Autostart Path
- *s_autostartPath = KGlobal::dirs()->localtdedir() + "Autostart/";
+ *s_autostartPath = TDEGlobal::dirs()->localtdedir() + "Autostart/";
*s_autostartPath = g.readPathEntry( "Autostart" , *s_autostartPath);
*s_autostartPath = TQDir::cleanDirPath( *s_autostartPath );
if ( !s_autostartPath->endsWith("/") )
@@ -564,7 +564,7 @@ void KGlobalSettings::initStatic() // should be called initPaths(). Don't put an
kapp->addKipcEventMask(KIPC::SettingsChanged);
}
-void KGlobalSettings::initColors()
+void TDEGlobalSettings::initColors()
{
if (!_trinity4Blue) {
if (TQPixmap::defaultDepth() > 8)
@@ -576,7 +576,7 @@ void KGlobalSettings::initColors()
alternateColor = new TQColor(237, 244, 249);
}
-void KGlobalSettings::rereadFontSettings()
+void TDEGlobalSettings::rereadFontSettings()
{
delete _generalFont;
_generalFont = 0L;
@@ -592,9 +592,9 @@ void KGlobalSettings::rereadFontSettings()
_taskbarFont = 0L;
}
-void KGlobalSettings::rereadPathSettings()
+void TDEGlobalSettings::rereadPathSettings()
{
- kdDebug() << "KGlobalSettings::rereadPathSettings" << endl;
+ kdDebug() << "TDEGlobalSettings::rereadPathSettings" << endl;
delete s_autostartPath;
s_autostartPath = 0L;
delete s_trashPath;
@@ -605,7 +605,7 @@ void KGlobalSettings::rereadPathSettings()
s_documentPath = 0L;
}
-KGlobalSettings::KMouseSettings & KGlobalSettings::mouseSettings()
+TDEGlobalSettings::KMouseSettings & TDEGlobalSettings::mouseSettings()
{
if ( ! s_mouseSettings )
{
@@ -613,7 +613,7 @@ KGlobalSettings::KMouseSettings & KGlobalSettings::mouseSettings()
KMouseSettings & s = *s_mouseSettings; // for convenience
#ifndef Q_WS_WIN
- KConfigGroup g( KGlobal::config(), "Mouse" );
+ TDEConfigGroup g( TDEGlobal::config(), "Mouse" );
TQString setting = g.readEntry("MouseButtonMapping");
if (setting == "RightHanded")
s.handed = KMouseSettings::RightHanded;
@@ -655,7 +655,7 @@ KGlobalSettings::KMouseSettings & KGlobalSettings::mouseSettings()
return *s_mouseSettings;
}
-void KGlobalSettings::rereadMouseSettings()
+void TDEGlobalSettings::rereadMouseSettings()
{
#ifndef Q_WS_WIN
delete s_mouseSettings;
@@ -663,7 +663,7 @@ void KGlobalSettings::rereadMouseSettings()
#endif
}
-bool KGlobalSettings::isMultiHead()
+bool TDEGlobalSettings::isMultiHead()
{
#ifdef Q_WS_WIN
return GetSystemMetrics(SM_CMONITORS) > 1;
@@ -676,18 +676,18 @@ bool KGlobalSettings::isMultiHead()
#endif
}
-bool KGlobalSettings::wheelMouseZooms()
+bool TDEGlobalSettings::wheelMouseZooms()
{
- KConfigGroup g( KGlobal::config(), "KDE" );
+ TDEConfigGroup g( TDEGlobal::config(), "KDE" );
return g.readBoolEntry( "WheelMouseZooms", KDE_DEFAULT_WHEEL_ZOOM );
}
-TQRect KGlobalSettings::splashScreenDesktopGeometry()
+TQRect TDEGlobalSettings::splashScreenDesktopGeometry()
{
TQDesktopWidget *dw = TQApplication::desktop();
if (dw->isVirtualDesktop()) {
- KConfigGroup group(KGlobal::config(), "Windows");
+ TDEConfigGroup group(TDEGlobal::config(), "Windows");
int scr = group.readNumEntry("Unmanaged", -3);
if (group.readBoolEntry("XineramaEnabled", true) && scr != -2) {
if (scr == -3)
@@ -701,12 +701,12 @@ TQRect KGlobalSettings::splashScreenDesktopGeometry()
}
}
-TQRect KGlobalSettings::desktopGeometry(const TQPoint& point)
+TQRect TDEGlobalSettings::desktopGeometry(const TQPoint& point)
{
TQDesktopWidget *dw = TQApplication::desktop();
if (dw->isVirtualDesktop()) {
- KConfigGroup group(KGlobal::config(), "Windows");
+ TDEConfigGroup group(TDEGlobal::config(), "Windows");
if (group.readBoolEntry("XineramaEnabled", true) &&
group.readBoolEntry("XineramaPlacementEnabled", true)) {
return dw->screenGeometry(dw->screenNumber(point));
@@ -718,12 +718,12 @@ TQRect KGlobalSettings::desktopGeometry(const TQPoint& point)
}
}
-TQRect KGlobalSettings::desktopGeometry(TQWidget* w)
+TQRect TDEGlobalSettings::desktopGeometry(TQWidget* w)
{
TQDesktopWidget *dw = TQApplication::desktop();
if (dw->isVirtualDesktop()) {
- KConfigGroup group(KGlobal::config(), "Windows");
+ TDEConfigGroup group(TDEGlobal::config(), "Windows");
if (group.readBoolEntry("XineramaEnabled", true) &&
group.readBoolEntry("XineramaPlacementEnabled", true)) {
if (w)
@@ -737,38 +737,38 @@ TQRect KGlobalSettings::desktopGeometry(TQWidget* w)
}
}
-bool KGlobalSettings::showIconsOnPushButtons()
+bool TDEGlobalSettings::showIconsOnPushButtons()
{
- KConfigGroup g( KGlobal::config(), "KDE" );
+ TDEConfigGroup g( TDEGlobal::config(), "KDE" );
return g.readBoolEntry("ShowIconsOnPushButtons",
KDE_DEFAULT_ICON_ON_PUSHBUTTON);
}
-bool KGlobalSettings::showFilePreview(const KURL &url)
+bool TDEGlobalSettings::showFilePreview(const KURL &url)
{
- KConfigGroup g(KGlobal::config(), "PreviewSettings");
+ TDEConfigGroup g(TDEGlobal::config(), "PreviewSettings");
TQString protocol = url.protocol();
bool defaultSetting = KProtocolInfo::showFilePreview( protocol );
return g.readBoolEntry(protocol, defaultSetting );
}
-bool KGlobalSettings::showKonqIconActivationEffect()
+bool TDEGlobalSettings::showKonqIconActivationEffect()
{
- KConfigGroup g( KGlobal::config(), "KDE" );
+ TDEConfigGroup g( TDEGlobal::config(), "KDE" );
return g.readBoolEntry("ShowKonqIconActivationEffect",
KDE_DEFAULT_KONQ_ACTIVATION_EFFECT);
}
-bool KGlobalSettings::opaqueResize()
+bool TDEGlobalSettings::opaqueResize()
{
- KConfigGroup g( KGlobal::config(), "KDE" );
+ TDEConfigGroup g( TDEGlobal::config(), "KDE" );
return g.readBoolEntry("OpaqueResize",
KDE_DEFAULT_OPAQUE_RESIZE);
}
-int KGlobalSettings::buttonLayout()
+int TDEGlobalSettings::buttonLayout()
{
- KConfigGroup g( KGlobal::config(), "KDE" );
+ TDEConfigGroup g( TDEGlobal::config(), "KDE" );
return g.readNumEntry("ButtonLayout",
KDE_DEFAULT_BUTTON_LAYOUT);
}
diff --git a/tdecore/kglobalsettings.h b/tdecore/tdeglobalsettings.h
index 5fef2f67a..0e11426d2 100644
--- a/tdecore/kglobalsettings.h
+++ b/tdecore/tdeglobalsettings.h
@@ -45,7 +45,7 @@ class KURL;
*
* @author David Faure <faure@kde.org>
*/
-class TDECORE_EXPORT KGlobalSettings
+class TDECORE_EXPORT TDEGlobalSettings
{
public:
@@ -74,7 +74,7 @@ class TDECORE_EXPORT KGlobalSettings
* {
* if( !(e->state() && LeftButton)) return;
*
- * int delay = KGlobalSettings::dndEventDelay();
+ * int delay = TDEGlobalSettings::dndEventDelay();
* TQPoint newPos = e->pos();
* if(newPos.x() > mOldPos.x()+delay || newPos.x() < mOldPos.x()-delay ||
* newPos.y() > mOldPos.y()+delay || newPos.y() < mOldPos.y()-delay)
@@ -111,7 +111,7 @@ class TDECORE_EXPORT KGlobalSettings
/**
* This enum describes the return type for insertTearOffHandle() whether to insert
* a handle or not. Applications who independently want to use handles in their popup menus
- * should test for Application level before calling the appropriate function in KPopupMenu.
+ * should test for Application level before calling the appropriate function in TDEPopupMenu.
* @since 3.1
**/
enum TearOffHandle {
@@ -121,8 +121,8 @@ class TDECORE_EXPORT KGlobalSettings
};
/**
- * Returns whether tear-off handles are inserted in KPopupMenus.
- * @return whether tear-off handles are inserted in KPopupMenus.
+ * Returns whether tear-off handles are inserted in TDEPopupMenus.
+ * @return whether tear-off handles are inserted in TDEPopupMenus.
* @since 3.1
**/
static TearOffHandle insertTearOffHandle();
@@ -171,7 +171,7 @@ class TDECORE_EXPORT KGlobalSettings
static bool showContextMenusOnPress ();
/**
- * This enum describes the completion mode used for by the KCompletion class.
+ * This enum describes the completion mode used for by the TDECompletion class.
* See <a href="http://developer.kde.org/documentation/standards/kde/style/keys/completion.html">
* the styleguide</a>.
**/
@@ -241,7 +241,7 @@ class TDECORE_EXPORT KGlobalSettings
/**
* DEPRECATED (starting from kde-3.4).
* This isn't where the trash contents is, anymore.
- * Use KIO::trash() to trash files, "trash:/" to list the trash contents.
+ * Use TDEIO::trash() to trash files, "trash:/" to list the trash contents.
*/
static TQString trashPath() { initStatic(); return *s_trashPath; }
// KDE4: if you want to remove the above, move it to kdesktop/init.cc, which needs
@@ -346,8 +346,8 @@ class TDECORE_EXPORT KGlobalSettings
static TQColor highlightColor();
/**
- * Returns the alternate background color used by KListView with
- * KListViewItem. Any other list that uses alternating background
+ * Returns the alternate background color used by TDEListView with
+ * TDEListViewItem. Any other list that uses alternating background
* colors should use this too, to obey to the user's preferences. Returns
* an invalid color if the user doesn't want alternating backgrounds.
* @return the alternate background color
@@ -365,7 +365,7 @@ class TDECORE_EXPORT KGlobalSettings
static TQColor calculateAlternateBackgroundColor(const TQColor& base);
/**
- * Returns if the sorted column in a KListView shall be drawn with a
+ * Returns if the sorted column in a TDEListView shall be drawn with a
* shaded background color.
* @return true if the sorted column shall be shaded
* @since 3.4
@@ -543,15 +543,15 @@ private:
*/
static void initColors();
/**
- * drop cached values for fonts (called by KApplication)
+ * drop cached values for fonts (called by TDEApplication)
*/
static void rereadFontSettings();
/**
- * drop cached values for paths (called by KApplication)
+ * drop cached values for paths (called by TDEApplication)
*/
static void rereadPathSettings();
/**
- * drop cached values for mouse settings (called by KApplication)
+ * drop cached values for mouse settings (called by TDEApplication)
*/
static void rereadMouseSettings();
@@ -578,7 +578,7 @@ private:
static TQColor * alternateColor;
static KMouseSettings *s_mouseSettings;
- friend class KApplication;
+ friend class TDEApplication;
};
#endif
diff --git a/tdecore/tdehardwaredevices.cpp b/tdecore/tdehardwaredevices.cpp
index b69c40d45..60f3efde9 100644
--- a/tdecore/tdehardwaredevices.cpp
+++ b/tdecore/tdehardwaredevices.cpp
@@ -23,14 +23,14 @@
#include <tqstringlist.h>
#include <tqsocketnotifier.h>
-#include <kglobal.h>
-#include <klocale.h>
-#include <kconfig.h>
-#include <ktempfile.h>
+#include <tdeglobal.h>
+#include <tdelocale.h>
+#include <tdeconfig.h>
+#include <tdetempfile.h>
#include <ksimpledirwatch.h>
#include <kstandarddirs.h>
-#include <kapplication.h>
+#include <tdeapplication.h>
#include <dcopclient.h>
#include <libudev.h>
@@ -286,8 +286,8 @@ TDEGenericDevice* TDEGenericDevice::parentDevice() {
return m_parentDevice;
}
-TQPixmap TDEGenericDevice::icon(KIcon::StdSizes size) {
- return KGlobal::hardwareDevices()->getDeviceTypeIconFromType(type(), size);
+TQPixmap TDEGenericDevice::icon(TDEIcon::StdSizes size) {
+ return TDEGlobal::hardwareDevices()->getDeviceTypeIconFromType(type(), size);
}
bool TDEGenericDevice::blacklistedForUpdate() {
@@ -299,7 +299,7 @@ void TDEGenericDevice::internalSetBlacklistedForUpdate(bool bl) {
}
TQString TDEGenericDevice::friendlyDeviceType() {
- return KGlobal::hardwareDevices()->getFriendlyDeviceTypeStringFromType(type());
+ return TDEGlobal::hardwareDevices()->getFriendlyDeviceTypeStringFromType(type());
}
TQString TDEGenericDevice::busID() {
@@ -321,10 +321,10 @@ TQString TDEGenericDevice::friendlyName() {
m_friendlyName = friendlyDriverName;
}
else if (m_modAlias.lower().startsWith("pci")) {
- m_friendlyName = KGlobal::hardwareDevices()->findPCIDeviceName(m_vendorID, m_modelID, m_subvendorID, m_submodelID);
+ m_friendlyName = TDEGlobal::hardwareDevices()->findPCIDeviceName(m_vendorID, m_modelID, m_subvendorID, m_submodelID);
}
else if (m_modAlias.lower().startsWith("usb")) {
- m_friendlyName = KGlobal::hardwareDevices()->findUSBDeviceName(m_vendorID, m_modelID, m_subvendorID, m_submodelID);
+ m_friendlyName = TDEGlobal::hardwareDevices()->findUSBDeviceName(m_vendorID, m_modelID, m_subvendorID, m_submodelID);
}
else {
TQString acpigentype = systemPath();
@@ -333,7 +333,7 @@ TQString TDEGenericDevice::friendlyName() {
TQString pnpgentype = acpigentype;
pnpgentype.truncate(pnpgentype.find(":"));
if (pnpgentype.startsWith("PNP")) {
- m_friendlyName = KGlobal::hardwareDevices()->findPNPDeviceName(pnpgentype);
+ m_friendlyName = TDEGlobal::hardwareDevices()->findPNPDeviceName(pnpgentype);
}
else if (acpigentype.startsWith("device:")) {
acpigentype.remove(0, acpigentype.findRev(":")+1);
@@ -541,7 +541,7 @@ TQString TDEStorageDevice::friendlyName() {
TQString TDEStorageDevice::friendlyDeviceType() {
TQString ret = i18n("Hard Disk Drive");
- // Keep this in sync with TDEStorageDevice::icon(KIcon::StdSizes size) below
+ // Keep this in sync with TDEStorageDevice::icon(TDEIcon::StdSizes size) below
if (isDiskOfType(TDEDiskDeviceType::Floppy)) {
ret = i18n("Floppy Drive");
}
@@ -602,7 +602,7 @@ TQString TDEStorageDevice::friendlyDeviceType() {
return ret;
}
-TQPixmap TDEStorageDevice::icon(KIcon::StdSizes size) {
+TQPixmap TDEStorageDevice::icon(TDEIcon::StdSizes size) {
TQPixmap ret = DesktopIcon("hdd_unmount", size);
if (isDiskOfType(TDEDiskDeviceType::Floppy)) {
@@ -706,7 +706,7 @@ TQString TDEStorageDevice::mountPath() {
// where <something> is listed in <system path>/dm/name
// First, ensure that all device information (mainly holders/slaves) is accurate
- KGlobal::hardwareDevices()->rescanDeviceInformation(this);
+ TDEGlobal::hardwareDevices()->rescanDeviceInformation(this);
TQString dmnodename = systemPath();
dmnodename.append("/dm/name");
@@ -746,7 +746,7 @@ TQString TDEStorageDevice::mountPath() {
TQStringList slaveDeviceList = holdingDevices();
for ( TQStringList::Iterator slavedevit = slaveDeviceList.begin(); slavedevit != slaveDeviceList.end(); ++slavedevit ) {
// Try to locate this device path in the TDE device tree
- TDEHardwareDevices *hwdevices = KGlobal::hardwareDevices();
+ TDEHardwareDevices *hwdevices = TDEGlobal::hardwareDevices();
TDEGenericDevice *hwdevice = hwdevices->findBySystemPath(*slavedevit);
if ((hwdevice) && (hwdevice->type() == TDEGenericDeviceType::Disk)) {
TDEStorageDevice* sdevice = static_cast<TDEStorageDevice*>(hwdevice);
@@ -792,7 +792,7 @@ TQString TDEStorageDevice::mountDevice(TQString mediaName, TQString mountOptions
}
// Update internal mount data
- KGlobal::hardwareDevices()->processModifiedMounts();
+ TDEGlobal::hardwareDevices()->processModifiedMounts();
ret = mountPath();
@@ -841,7 +841,7 @@ TQString TDEStorageDevice::mountEncryptedDevice(TQString passphrase, TQString me
}
// Update internal mount data
- KGlobal::hardwareDevices()->processModifiedMounts();
+ TDEGlobal::hardwareDevices()->processModifiedMounts();
ret = mountPath();
@@ -879,7 +879,7 @@ bool TDEStorageDevice::unmountDevice(TQString* errRet, int* retcode) {
}
// Update internal mount data
- KGlobal::hardwareDevices()->processModifiedMounts();
+ TDEGlobal::hardwareDevices()->processModifiedMounts();
return false;
}
@@ -977,7 +977,25 @@ bool TDECPUDevice::canSetGovernor() {
return TRUE;
}
else {
+#ifdef WITH_UPOWER
+ TQT_DBusConnection dbusConn = TQT_DBusConnection::addConnection(TQT_DBusConnection::SystemBus);
+ if (dbusConn.isConnected()) {
+ TQT_DBusProxy hardwareControl("org.trinitydesktop.hardwarecontrol", "/org/trinitydesktop/hardwarecontrol", "org.trinitydesktop.hardwarecontrol,CPUGovernor", dbusConn);
+
+ // can set brightness?
+ TQValueList<TQT_DBusData> params;
+ params << TQT_DBusData::fromInt32(coreNumber());
+ TQT_DBusMessage reply = hardwareControl.sendWithReply("CanSetCPUGovernor", params);
+ if (reply.type() == TQT_DBusMessage::ReplyMessage && reply.count() == 1) {
+ return reply[0].toVariant().value.toBool();
+ }
+ }
+ else {
+ return FALSE;
+ }
+#else // WITH_UPOWER
return FALSE;
+#endif// WITH_UPOWER
}
}
@@ -989,9 +1007,25 @@ void TDECPUDevice::setGovernor(TQString gv) {
stream << gv.lower();
file.close();
}
+#ifdef WITH_UPOWER
+ else {
+ TQT_DBusConnection dbusConn = TQT_DBusConnection::addConnection(TQT_DBusConnection::SystemBus);
+ if (dbusConn.isConnected()) {
+ TQT_DBusProxy hardwareControl("org.trinitydesktop.hardwarecontrol", "/org/trinitydesktop/hardwarecontrol", "org.trinitydesktop.hardwarecontrol.CPUGovernor", dbusConn);
+
+ // set brightness
+ TQValueList<TQT_DBusData> params;
+ params << TQT_DBusData::fromInt32(coreNumber()) << TQT_DBusData::fromString(gv.lower());
+ hardwareControl.sendWithReply("SetCPUGovernor", params);
+ }
+ else {
+ return;
+ }
+ }
+#endif // WITH_UPOWER
// Force update of the device information object
- KGlobal::hardwareDevices()->processModifiedCPUs();
+ TDEGlobal::hardwareDevices()->processModifiedCPUs();
}
bool TDECPUDevice::canSetMaximumScalingFrequency() {
@@ -1015,7 +1049,7 @@ void TDECPUDevice::setMaximumScalingFrequency(double fr) {
}
// Force update of the device information object
- KGlobal::hardwareDevices()->processModifiedCPUs();
+ TDEGlobal::hardwareDevices()->processModifiedCPUs();
}
int TDECPUDevice::coreNumber() {
@@ -1183,7 +1217,7 @@ bool TDERootSystemDevice::canPowerOff() {
// Can we power down this system?
// This should probably be checked via DCOP and therefore interface with KDM
- KConfig *config = KGlobal::config();
+ TDEConfig *config = TDEGlobal::config();
config->reparseConfiguration(); // config may have changed in the KControl module
config->setGroup("General" );
@@ -1629,7 +1663,25 @@ bool TDEBacklightDevice::canSetBrightness() {
return TRUE;
}
else {
+#ifdef WITH_UPOWER
+ TQT_DBusConnection dbusConn = TQT_DBusConnection::addConnection(TQT_DBusConnection::SystemBus);
+ if (dbusConn.isConnected()) {
+ TQT_DBusProxy hardwareControl("org.trinitydesktop.hardwarecontrol", "/org/trinitydesktop/hardwarecontrol", "org.trinitydesktop.hardwarecontrol,Brightness", dbusConn);
+
+ // can set brightness?
+ TQValueList<TQT_DBusData> params;
+ params << TQT_DBusData::fromString(brightnessnode);
+ TQT_DBusMessage reply = hardwareControl.sendWithReply("CanSetBrightness", params);
+ if (reply.type() == TQT_DBusMessage::ReplyMessage && reply.count() == 1) {
+ return reply[0].toVariant().value.toBool();
+ }
+ }
+ else {
+ return FALSE;
+ }
+#else // WITH_UPOWER
return FALSE;
+#endif// WITH_UPOWER
}
}
@@ -1639,14 +1691,29 @@ int TDEBacklightDevice::rawBrightness() {
void TDEBacklightDevice::setRawBrightness(int br) {
TQString brightnessnode = systemPath() + "/brightness";
+ TQString brightnessCommand = TQString("%1").arg(br);
TQFile file( brightnessnode );
if ( file.open( IO_WriteOnly ) ) {
- TQString brightnessCommand;
- brightnessCommand = TQString("%1").arg(br);
TQTextStream stream( &file );
stream << brightnessCommand;
file.close();
}
+#ifdef WITH_UPOWER
+ else {
+ TQT_DBusConnection dbusConn = TQT_DBusConnection::addConnection(TQT_DBusConnection::SystemBus);
+ if (dbusConn.isConnected()) {
+ TQT_DBusProxy hardwareControl("org.trinitydesktop.hardwarecontrol", "/org/trinitydesktop/hardwarecontrol", "org.trinitydesktop.hardwarecontrol.Brightness", dbusConn);
+
+ // set brightness
+ TQValueList<TQT_DBusData> params;
+ params << TQT_DBusData::fromString(brightnessnode) << TQT_DBusData::fromString(brightnessCommand);
+ hardwareControl.sendWithReply("SetBrightness", params);
+ }
+ else {
+ return;
+ }
+ }
+#endif // WITH_UPOWER
}
TDEMonitorDevice::TDEMonitorDevice(TDEGenericDeviceType::TDEGenericDeviceType dt, TQString dn) : TDEGenericDevice(dt, dn) {
@@ -2697,9 +2764,9 @@ TDEDiskDeviceType::TDEDiskDeviceType classifyDiskType(udev_device* dev, const TQ
return disktype;
}
- // KStandardDirs::kde_default
+ // TDEStandardDirs::kde_default
-typedef TQMap<TQString, TQString> KConfigMap;
+typedef TQMap<TQString, TQString> TDEConfigMap;
TQString readUdevAttribute(udev_device* dev, TQString attr) {
return TQString(udev_device_get_property_value(dev, attr.ascii()));
@@ -2998,12 +3065,12 @@ TDEGenericDevice* TDEHardwareDevices::classifyUnknownDeviceByExternalRules(udev_
}
}
else {
- TQStringList hardware_info_directories(KGlobal::dirs()->resourceDirs("data"));
+ TQStringList hardware_info_directories(TDEGlobal::dirs()->resourceDirs("data"));
TQString hardware_info_directory_suffix("tdehwlib/deviceclasses/");
TQString hardware_info_directory;
// Scan the hardware_info_directory for configuration files
- // For each one, open it with KConfig() and apply its rules to classify the device
+ // For each one, open it with TDEConfig() and apply its rules to classify the device
// FIXME
// Should this also scan up to <n> subdirectories for the files? That feature might end up being too expensive...
@@ -3012,7 +3079,7 @@ TDEGenericDevice* TDEHardwareDevices::classifyUnknownDeviceByExternalRules(udev_
hardware_info_directory = (*it);
hardware_info_directory += hardware_info_directory_suffix;
- if (KGlobal::dirs()->exists(hardware_info_directory)) {
+ if (TDEGlobal::dirs()->exists(hardware_info_directory)) {
TQDir d(hardware_info_directory);
d.setFilter( TQDir::Files | TQDir::Hidden );
@@ -3025,10 +3092,10 @@ TDEGenericDevice* TDEHardwareDevices::classifyUnknownDeviceByExternalRules(udev_
bool match = true;
// Open the rules file
- KConfig rulesFile(fi->absFilePath(), true, false);
+ TDEConfig rulesFile(fi->absFilePath(), true, false);
rulesFile.setGroup("Conditions");
- KConfigMap conditionmap = rulesFile.entryMap("Conditions");
- KConfigMap::Iterator cndit;
+ TDEConfigMap conditionmap = rulesFile.entryMap("Conditions");
+ TDEConfigMap::Iterator cndit;
for (cndit = conditionmap.begin(); cndit != conditionmap.end(); ++cndit) {
TQStringList conditionList = TQStringList::split(',', cndit.data(), false);
bool atleastonematch = false;
@@ -4391,7 +4458,7 @@ TDEGenericDevice* TDEHardwareDevices::classifyUnknownDevice(udev_device* dev, TD
}
// FIXME
- // Much of the code in libkrandr should be integrated into/interfaced with this library
+ // Much of the code in libtderandr should be integrated into/interfaced with this library
}
if (device->type() == TDEGenericDeviceType::RootSystem) {
@@ -5059,7 +5126,7 @@ TQString TDEHardwareDevices::findPNPDeviceName(TQString pnpid) {
if (!pnp_id_map) {
pnp_id_map = new TDEDeviceIDMap;
- TQStringList hardware_info_directories(KGlobal::dirs()->resourceDirs("data"));
+ TQStringList hardware_info_directories(TDEGlobal::dirs()->resourceDirs("data"));
TQString hardware_info_directory_suffix("tdehwlib/pnpdev/");
TQString hardware_info_directory;
TQString database_filename;
@@ -5068,7 +5135,7 @@ TQString TDEHardwareDevices::findPNPDeviceName(TQString pnpid) {
hardware_info_directory = (*it);
hardware_info_directory += hardware_info_directory_suffix;
- if (KGlobal::dirs()->exists(hardware_info_directory)) {
+ if (TDEGlobal::dirs()->exists(hardware_info_directory)) {
database_filename = hardware_info_directory + "pnp.ids";
if (TQFile::exists(database_filename)) {
break;
@@ -5129,7 +5196,7 @@ TQString TDEHardwareDevices::findMonitorManufacturerName(TQString dpyid) {
if (!dpy_id_map) {
dpy_id_map = new TDEDeviceIDMap;
- TQStringList hardware_info_directories(KGlobal::dirs()->resourceDirs("data"));
+ TQStringList hardware_info_directories(TDEGlobal::dirs()->resourceDirs("data"));
TQString hardware_info_directory_suffix("tdehwlib/pnpdev/");
TQString hardware_info_directory;
TQString database_filename;
@@ -5138,7 +5205,7 @@ TQString TDEHardwareDevices::findMonitorManufacturerName(TQString dpyid) {
hardware_info_directory = (*it);
hardware_info_directory += hardware_info_directory_suffix;
- if (KGlobal::dirs()->exists(hardware_info_directory)) {
+ if (TDEGlobal::dirs()->exists(hardware_info_directory)) {
database_filename = hardware_info_directory + "dpy.ids";
if (TQFile::exists(database_filename)) {
break;
@@ -5428,7 +5495,7 @@ TQString TDEHardwareDevices::getFriendlyDeviceTypeStringFromType(TDEGenericDevic
return ret;
}
-TQPixmap TDEHardwareDevices::getDeviceTypeIconFromType(TDEGenericDeviceType::TDEGenericDeviceType query, KIcon::StdSizes size) {
+TQPixmap TDEHardwareDevices::getDeviceTypeIconFromType(TDEGenericDeviceType::TDEGenericDeviceType query, TDEIcon::StdSizes size) {
TQPixmap ret = DesktopIcon("misc", size);
// // Keep this in sync with the TDEGenericDeviceType definition in the header
@@ -5520,7 +5587,7 @@ TQPixmap TDEHardwareDevices::getDeviceTypeIconFromType(TDEGenericDeviceType::TDE
ret = DesktopIcon("kcmpci", size);
}
else if (query == TDEGenericDeviceType::Backlight) {
- ret = DesktopIcon("kscreensaver", size); // FIXME
+ ret = DesktopIcon("tdescreensaver", size); // FIXME
}
else if (query == TDEGenericDeviceType::Battery) {
ret = DesktopIcon("energy", size);
diff --git a/tdecore/tdehardwaredevices.h b/tdecore/tdehardwaredevices.h
index b6d0dd5ef..0363596e4 100644
--- a/tdecore/tdehardwaredevices.h
+++ b/tdecore/tdehardwaredevices.h
@@ -353,10 +353,10 @@ class TDECORE_EXPORT TDEGenericDevice : public TQObject
/**
* Get an icon for this device
- * @param size a KIcon::StdSizes structure specifying the desired icon size
+ * @param size a TDEIcon::StdSizes structure specifying the desired icon size
* @return a TQPixmap containing the icon for the specified type
*/
- virtual TQPixmap icon(KIcon::StdSizes size);
+ virtual TQPixmap icon(TDEIcon::StdSizes size);
protected:
/**
@@ -622,12 +622,12 @@ class TDECORE_EXPORT TDEStorageDevice : public TDEGenericDevice
/**
* Get an icon for this device
- * @param size a KIcon::StdSizes structure specifying the desired icon size
+ * @param size a TDEIcon::StdSizes structure specifying the desired icon size
* @return a TQPixmap containing the icon for the specified type
*
- * This method overrides TDEGenericDevice::icon(KIcon::StdSizes size)
+ * This method overrides TDEGenericDevice::icon(TDEIcon::StdSizes size)
*/
- TQPixmap icon(KIcon::StdSizes size);
+ TQPixmap icon(TDEIcon::StdSizes size);
/**
* @return a TQString with a friendly name
@@ -1977,10 +1977,10 @@ class TDECORE_EXPORT TDEHardwareDevices : public TQObject
/**
* Get an icon for a device type
* @param query a TDEGenericDeviceType::TDEGenericDeviceType specifying a device type
- * @param size a KIcon::StdSizes structure specifying the desired icon size
+ * @param size a TDEIcon::StdSizes structure specifying the desired icon size
* @return a TQPixmap containing the icon for the specified type
*/
- TQPixmap getDeviceTypeIconFromType(TDEGenericDeviceType::TDEGenericDeviceType query, KIcon::StdSizes size);
+ TQPixmap getDeviceTypeIconFromType(TDEGenericDeviceType::TDEGenericDeviceType query, TDEIcon::StdSizes size);
/**
* Convenience function to obtain the root system device
diff --git a/tdecore/tdelibs_export.h b/tdecore/tdelibs_export.h
index 767752689..46b36f1d8 100644
--- a/tdecore/tdelibs_export.h
+++ b/tdecore/tdelibs_export.h
@@ -37,22 +37,22 @@
#define TDEFX_EXPORT KDE_EXPORT
#define TDEPRINT_EXPORT KDE_EXPORT
#define KDNSSD_EXPORT KDE_EXPORT
-#define KIO_EXPORT KDE_EXPORT
+#define TDEIO_EXPORT KDE_EXPORT
#define DCOP_EXPORT KDE_EXPORT
#define KPARTS_EXPORT KDE_EXPORT
#define KTEXTEDITOR_EXPORT KDE_EXPORT
#define KABC_EXPORT KDE_EXPORT
#define TDESU_EXPORT KDE_EXPORT
#define KVCARD_EXPORT KDE_EXPORT
-#define KRESOURCES_EXPORT KDE_EXPORT
+#define TDERESOURCES_EXPORT KDE_EXPORT
#define KSTYLE_EXPORT KDE_EXPORT
-#define KHTML_EXPORT KDE_EXPORT
+#define TDEHTML_EXPORT KDE_EXPORT
#define KMDI_EXPORT KDE_EXPORT
#define KUTILS_EXPORT KDE_EXPORT
#define KATEPARTINTERFACES_EXPORT KDE_EXPORT
#define KATEPART_EXPORT KDE_EXPORT
#define KMID_EXPORT KDE_EXPORT
-#define KRANDR_EXPORT KDE_EXPORT
+#define TDERANDR_EXPORT KDE_EXPORT
#define KIMPROXY_EXPORT KDE_EXPORT
#define KDE_ARTS_EXPORT KDE_EXPORT
#define KUNITTEST_EXPORT KDE_EXPORT
@@ -73,8 +73,8 @@
# ifndef TDECORE_EXPORT_DEPRECATED
# define TDECORE_EXPORT_DEPRECATED KDE_DEPRECATED TDECORE_EXPORT
# endif
-# ifndef KIO_EXPORT_DEPRECATED
-# define KIO_EXPORT_DEPRECATED KDE_DEPRECATED KIO_EXPORT
+# ifndef TDEIO_EXPORT_DEPRECATED
+# define TDEIO_EXPORT_DEPRECATED KDE_DEPRECATED TDEIO_EXPORT
# endif
# ifndef TDEUI_EXPORT_DEPRECATED
# define TDEUI_EXPORT_DEPRECATED KDE_DEPRECATED TDEUI_EXPORT
diff --git a/tdecore/klocale.cpp b/tdecore/tdelocale.cpp
index c4ae52b19..4402dd183 100644
--- a/tdecore/klocale.cpp
+++ b/tdecore/tdelocale.cpp
@@ -33,15 +33,15 @@
#include <tqregexp.h>
#include "kcatalogue.h"
-#include "kglobal.h"
+#include "tdeglobal.h"
#include "kstandarddirs.h"
#include "ksimpleconfig.h"
#include "kinstance.h"
-#include "kconfig.h"
+#include "tdeconfig.h"
#include "kdebug.h"
#include "kcalendarsystem.h"
#include "kcalendarsystemfactory.h"
-#include "klocale.h"
+#include "tdelocale.h"
#ifdef Q_WS_WIN
#include <windows.h>
@@ -51,7 +51,7 @@ static const char * const SYSTEM_MESSAGES = "tdelibs";
static const char *maincatalogue = 0;
-class KLocalePrivate
+class TDELocalePrivate
{
public:
int weekStartDay;
@@ -62,12 +62,12 @@ public:
TQValueList<KCatalogue> catalogues; // list of all loaded catalogs, contains one instance per catalog name and language
TQString encoding;
TQTextCodec * codecForEncoding;
- KConfig * config;
+ TDEConfig * config;
bool formatInited;
int /*TQPrinter::PageSize*/ pageSize;
- KLocale::MeasureSystem measureSystem;
+ TDELocale::MeasureSystem measureSystem;
TQStringList langTwoAlpha;
- KConfig *languages;
+ TDEConfig *languages;
TQString calendarType;
KCalendarSystem * calendar;
@@ -79,11 +79,11 @@ public:
bool useMainCatalogue;
};
-static KLocale *this_klocale = 0;
+static TDELocale *this_klocale = 0;
-KLocale::KLocale( const TQString & catalog, KConfig * config )
+TDELocale::TDELocale( const TQString & catalog, TDEConfig * config )
{
- d = new KLocalePrivate;
+ d = new TDELocalePrivate;
d->config = config;
d->languages = 0;
d->calendar = 0;
@@ -92,9 +92,9 @@ KLocale::KLocale( const TQString & catalog, KConfig * config )
initEncoding(0);
initFileNameEncoding(0);
- KConfig *cfg = d->config;
+ TDEConfig *cfg = d->config;
this_klocale = this;
- if (!cfg) cfg = KGlobal::instance()->config();
+ if (!cfg) cfg = TDEGlobal::instance()->config();
this_klocale = 0;
Q_ASSERT( cfg );
@@ -103,19 +103,19 @@ KLocale::KLocale( const TQString & catalog, KConfig * config )
initMainCatalogues(catalog);
}
-TQString KLocale::_initLanguage(KConfigBase *config)
+TQString TDELocale::_initLanguage(TDEConfigBase *config)
{
if (this_klocale)
{
// ### HPB Why this cast??
- this_klocale->initLanguageList((KConfig *) config, true);
+ this_klocale->initLanguageList((TDEConfig *) config, true);
// todo: adapt current catalog list: remove unused languages, insert main catalogs, if not already found
return this_klocale->language();
}
return TQString::null;
}
-void KLocale::initMainCatalogues(const TQString & catalog)
+void TDELocale::initMainCatalogues(const TQString & catalog)
{
// Use the first non-null string.
TQString mainCatalogue = catalog;
@@ -128,7 +128,7 @@ void KLocale::initMainCatalogues(const TQString & catalog)
}
if (mainCatalogue.isEmpty()) {
- kdDebug(173) << "KLocale instance created called without valid "
+ kdDebug(173) << "TDELocale instance created called without valid "
<< "catalog! Give an argument or call setMainCatalogue "
<< "before init" << endl;
}
@@ -144,9 +144,9 @@ void KLocale::initMainCatalogues(const TQString & catalog)
}
}
-void KLocale::initLanguageList(KConfig * config, bool useEnv)
+void TDELocale::initLanguageList(TDEConfig * config, bool useEnv)
{
- KConfigGroupSaver saver(config, "Locale");
+ TDEConfigGroupSaver saver(config, "Locale");
m_country = config->readEntry( "Country" );
if ( m_country.isEmpty() )
@@ -193,7 +193,7 @@ void KLocale::initLanguageList(KConfig * config, bool useEnv)
setLanguage( languageList );
}
-void KLocale::initPluralTypes()
+void TDELocale::initPluralTypes()
{
for ( TQValueList<KCatalogue>::Iterator it = d->catalogues.begin();
it != d->catalogues.end();
@@ -206,7 +206,7 @@ void KLocale::initPluralTypes()
}
-int KLocale::pluralType( const TQString & language )
+int TDELocale::pluralType( const TQString & language )
{
for ( TQValueList<KCatalogue>::ConstIterator it = d->catalogues.begin();
it != d->catalogues.end();
@@ -220,7 +220,7 @@ int KLocale::pluralType( const TQString & language )
return -1;
}
-int KLocale::pluralType( const KCatalogue& catalog )
+int TDELocale::pluralType( const KCatalogue& catalog )
{
const char* pluralFormString =
I18N_NOOP("_: Dear translator, please do not translate this string "
@@ -285,31 +285,31 @@ int KLocale::pluralType( const KCatalogue& catalog )
}
}
-void KLocale::doFormatInit() const
+void TDELocale::doFormatInit() const
{
if ( d->formatInited ) return;
- KLocale * that = const_cast<KLocale *>(this);
+ TDELocale * that = const_cast<TDELocale *>(this);
that->initFormat();
d->formatInited = true;
}
-void KLocale::initFormat()
+void TDELocale::initFormat()
{
- KConfig *config = d->config;
- if (!config) config = KGlobal::instance()->config();
+ TDEConfig *config = d->config;
+ if (!config) config = TDEGlobal::instance()->config();
Q_ASSERT( config );
- kdDebug(173) << "KLocale::initFormat" << endl;
+ kdDebug(173) << "TDELocale::initFormat" << endl;
// make sure the config files are read using the correct locale
- // ### Why not add a KConfigBase::setLocale( const KLocale * )?
+ // ### Why not add a TDEConfigBase::setLocale( const TDELocale * )?
// ### Then we could remove this hack
- KLocale *lsave = KGlobal::_locale;
- KGlobal::_locale = this;
+ TDELocale *lsave = TDEGlobal::_locale;
+ TDEGlobal::_locale = this;
- KConfigGroupSaver saver(config, "Locale");
+ TDEConfigGroupSaver saver(config, "Locale");
KSimpleConfig entry(locate("locale",
TQString::fromLatin1("l10n/%1/entry.desktop")
@@ -385,10 +385,10 @@ void KLocale::initFormat()
d->dateMonthNamePossessive);
// end of hack
- KGlobal::_locale = lsave;
+ TDEGlobal::_locale = lsave;
}
-bool KLocale::setCountry(const TQString & country)
+bool TDELocale::setCountry(const TQString & country)
{
// Check if the file exists too??
if ( country.isEmpty() )
@@ -401,7 +401,7 @@ bool KLocale::setCountry(const TQString & country)
return true;
}
-TQString KLocale::catalogueFileName(const TQString & language,
+TQString TDELocale::catalogueFileName(const TQString & language,
const KCatalogue & catalog)
{
TQString path = TQString::fromLatin1("%1/LC_MESSAGES/%2.mo")
@@ -415,7 +415,7 @@ TQString KLocale::catalogueFileName(const TQString & language,
return fileName;
}
-bool KLocale::setLanguage(const TQString & language)
+bool TDELocale::setLanguage(const TQString & language)
{
if ( d->languageList.contains( language ) ) {
d->languageList.remove( language );
@@ -433,7 +433,7 @@ bool KLocale::setLanguage(const TQString & language)
return true; // Maybe the mo-files for this language are empty, but in principle we can speak all languages
}
-bool KLocale::setLanguage(const TQStringList & languages)
+bool TDELocale::setLanguage(const TQStringList & languages)
{
TQStringList languageList( languages );
// This list might contain
@@ -484,7 +484,7 @@ bool KLocale::setLanguage(const TQStringList & languages)
return true; // we found something. Maybe it's only English, but we found something
}
-bool KLocale::isApplicationTranslatedInto( const TQString & language)
+bool TDELocale::isApplicationTranslatedInto( const TQString & language)
{
if ( language.isEmpty() ) {
return false;
@@ -518,7 +518,7 @@ bool KLocale::isApplicationTranslatedInto( const TQString & language)
return ! sAbsFileName.isEmpty();
}
-void KLocale::splitLocale(const TQString & aStr,
+void TDELocale::splitLocale(const TQString & aStr,
TQString & language,
TQString & country,
TQString & chrset)
@@ -551,17 +551,17 @@ void KLocale::splitLocale(const TQString & aStr,
language = str;
}
-TQString KLocale::language() const
+TQString TDELocale::language() const
{
return m_language;
}
-TQString KLocale::country() const
+TQString TDELocale::country() const
{
return m_country;
}
-TQString KLocale::monthName(int i, bool shortName) const
+TQString TDELocale::monthName(int i, bool shortName) const
{
if ( shortName )
switch ( i )
@@ -599,7 +599,7 @@ TQString KLocale::monthName(int i, bool shortName) const
return TQString::null;
}
-TQString KLocale::monthNamePossessive(int i, bool shortName) const
+TQString TDELocale::monthNamePossessive(int i, bool shortName) const
{
if ( shortName )
switch ( i )
@@ -637,12 +637,12 @@ TQString KLocale::monthNamePossessive(int i, bool shortName) const
return TQString::null;
}
-TQString KLocale::weekDayName (int i, bool shortName) const
+TQString TDELocale::weekDayName (int i, bool shortName) const
{
return calendar()->weekDayName(i, shortName);
}
-void KLocale::insertCatalogue( const TQString & catalog )
+void TDELocale::insertCatalogue( const TQString & catalog )
{
if ( !d->catalogNames.contains( catalog) ) {
d->catalogNames.append( catalog );
@@ -650,7 +650,7 @@ void KLocale::insertCatalogue( const TQString & catalog )
updateCatalogues( ); // evaluate the changed list and generate the neccessary KCatalog objects
}
-void KLocale::updateCatalogues( )
+void TDELocale::updateCatalogues( )
{
// some changes have occured. Maybe we have learned or forgotten some languages.
// Maybe the language precedence has changed.
@@ -672,7 +672,7 @@ void KLocale::updateCatalogues( )
}
// now iterate over all languages and all wanted catalog names and append or create them in the right order
- // the sequence must be e.g. nds/appname nds/tdelibs nds/kio de/appname de/tdelibs de/kio etc.
+ // the sequence must be e.g. nds/appname nds/tdelibs nds/tdeio de/appname de/tdelibs de/tdeio etc.
// and not nds/appname de/appname nds/tdelibs de/tdelibs etc. Otherwise we would be in trouble with a language
// sequende nds,en_US, de. In this case en_US must hide everything below in the language list.
for ( TQStringList::ConstIterator itLangs = d->languageList.begin();
@@ -691,16 +691,16 @@ void KLocale::updateCatalogues( )
-void KLocale::removeCatalogue(const TQString &catalog)
+void TDELocale::removeCatalogue(const TQString &catalog)
{
if ( d->catalogNames.contains( catalog )) {
d->catalogNames.remove( catalog );
- if (KGlobal::_instance)
+ if (TDEGlobal::_instance)
updateCatalogues(); // walk through the KCatalogue instances and weed out everything we no longer need
}
}
-void KLocale::setActiveCatalogue(const TQString &catalog)
+void TDELocale::setActiveCatalogue(const TQString &catalog)
{
if ( d->catalogNames.contains( catalog ) ) {
d->catalogNames.remove( catalog );
@@ -709,7 +709,7 @@ void KLocale::setActiveCatalogue(const TQString &catalog)
}
}
-KLocale::~KLocale()
+TDELocale::~TDELocale()
{
delete d->calendar;
delete d->languages;
@@ -717,7 +717,7 @@ KLocale::~KLocale()
d = 0L;
}
-TQString KLocale::translate_priv(const char *msgid,
+TQString TDELocale::translate_priv(const char *msgid,
const char *fallback,
const char **translated,
int* pluralType ) const
@@ -727,7 +727,7 @@ TQString KLocale::translate_priv(const char *msgid,
}
if (!msgid || !msgid[0])
{
- kdWarning() << "KLocale: trying to look up \"\" in catalog. "
+ kdWarning() << "TDELocale: trying to look up \"\" in catalog. "
<< "Fix the program" << endl;
return TQString::null;
}
@@ -766,16 +766,16 @@ TQString KLocale::translate_priv(const char *msgid,
return TQString::fromUtf8( fallback );
}
-TQString KLocale::translate(const char* msgid) const
+TQString TDELocale::translate(const char* msgid) const
{
return translate_priv(msgid, msgid);
}
-TQString KLocale::translate( const char *index, const char *fallback) const
+TQString TDELocale::translate( const char *index, const char *fallback) const
{
if (!index || !index[0] || !fallback || !fallback[0])
{
- kdDebug(173) << "KLocale: trying to look up \"\" in catalog. "
+ kdDebug(173) << "TDELocale: trying to look up \"\" in catalog. "
<< "Fix the program" << endl;
return TQString::null;
}
@@ -807,12 +807,12 @@ static TQString put_n_in(const TQString &orig, unsigned long n)
kdError() << "translation of \"" << singular << "\" doesn't contain " << x << " different plural forms as expected\n"; \
return TQString( "BROKEN TRANSLATION %1" ).arg( singular ); }
-TQString KLocale::translate( const char *singular, const char *plural,
+TQString TDELocale::translate( const char *singular, const char *plural,
unsigned long n ) const
{
if (!singular || !singular[0] || !plural || !plural[0])
{
- kdWarning() << "KLocale: trying to look up \"\" in catalog. "
+ kdWarning() << "TDELocale: trying to look up \"\" in catalog. "
<< "Fix the program" << endl;
return TQString::null;
}
@@ -960,11 +960,11 @@ TQString KLocale::translate( const char *singular, const char *plural,
return TQString::null;
}
-TQString KLocale::translateQt( const char *context, const char *source,
+TQString TDELocale::translateQt( const char *context, const char *source,
const char *message) const
{
if (!source || !source[0]) {
- kdWarning() << "KLocale: trying to look up \"\" in catalog. "
+ kdWarning() << "TDELocale: trying to look up \"\" in catalog. "
<< "Fix the program" << endl;
return TQString::null;
}
@@ -1004,97 +1004,97 @@ TQString KLocale::translateQt( const char *context, const char *source,
return TQString::null;
}
-bool KLocale::nounDeclension() const
+bool TDELocale::nounDeclension() const
{
doFormatInit();
return d->nounDeclension;
}
-bool KLocale::dateMonthNamePossessive() const
+bool TDELocale::dateMonthNamePossessive() const
{
doFormatInit();
return d->dateMonthNamePossessive;
}
-int KLocale::weekStartDay() const
+int TDELocale::weekStartDay() const
{
doFormatInit();
return d->weekStartDay;
}
-bool KLocale::weekStartsMonday() const //deprecated
+bool TDELocale::weekStartsMonday() const //deprecated
{
doFormatInit();
return (d->weekStartDay==1);
}
-TQString KLocale::decimalSymbol() const
+TQString TDELocale::decimalSymbol() const
{
doFormatInit();
return m_decimalSymbol;
}
-TQString KLocale::thousandsSeparator() const
+TQString TDELocale::thousandsSeparator() const
{
doFormatInit();
return m_thousandsSeparator;
}
-TQString KLocale::currencySymbol() const
+TQString TDELocale::currencySymbol() const
{
doFormatInit();
return m_currencySymbol;
}
-TQString KLocale::monetaryDecimalSymbol() const
+TQString TDELocale::monetaryDecimalSymbol() const
{
doFormatInit();
return m_monetaryDecimalSymbol;
}
-TQString KLocale::monetaryThousandsSeparator() const
+TQString TDELocale::monetaryThousandsSeparator() const
{
doFormatInit();
return m_monetaryThousandsSeparator;
}
-TQString KLocale::positiveSign() const
+TQString TDELocale::positiveSign() const
{
doFormatInit();
return m_positiveSign;
}
-TQString KLocale::negativeSign() const
+TQString TDELocale::negativeSign() const
{
doFormatInit();
return m_negativeSign;
}
-int KLocale::fracDigits() const
+int TDELocale::fracDigits() const
{
doFormatInit();
return m_fracDigits;
}
-bool KLocale::positivePrefixCurrencySymbol() const
+bool TDELocale::positivePrefixCurrencySymbol() const
{
doFormatInit();
return m_positivePrefixCurrencySymbol;
}
-bool KLocale::negativePrefixCurrencySymbol() const
+bool TDELocale::negativePrefixCurrencySymbol() const
{
doFormatInit();
return m_negativePrefixCurrencySymbol;
}
-KLocale::SignPosition KLocale::positiveMonetarySignPosition() const
+TDELocale::SignPosition TDELocale::positiveMonetarySignPosition() const
{
doFormatInit();
return m_positiveMonetarySignPosition;
}
-KLocale::SignPosition KLocale::negativeMonetarySignPosition() const
+TDELocale::SignPosition TDELocale::negativeMonetarySignPosition() const
{
doFormatInit();
return m_negativeMonetarySignPosition;
@@ -1127,7 +1127,7 @@ static void _insertSeparator(TQString &str, const TQString &separator,
str = mainPart + fracPart;
}
-TQString KLocale::formatMoney(double num,
+TQString TDELocale::formatMoney(double num,
const TQString & symbol,
int precision) const
{
@@ -1188,24 +1188,24 @@ TQString KLocale::formatMoney(double num,
return res;
}
-TQString KLocale::formatMoney(const TQString &numStr) const
+TQString TDELocale::formatMoney(const TQString &numStr) const
{
return formatMoney(numStr.toDouble());
}
-TQString KLocale::formatNumber(double num, int precision) const
+TQString TDELocale::formatNumber(double num, int precision) const
{
if (precision == -1) precision = 2;
// no need to round since TQString::number does this for us
return formatNumber(TQString::number(num, 'f', precision), false, 0);
}
-TQString KLocale::formatLong(long num) const
+TQString TDELocale::formatLong(long num) const
{
return formatNumber((double)num, 0);
}
-TQString KLocale::formatNumber(const TQString &numStr) const
+TQString TDELocale::formatNumber(const TQString &numStr) const
{
return formatNumber(numStr, true, 2);
}
@@ -1301,7 +1301,7 @@ static void _round(TQString &str, int precision)
if (precision == 0) str = str.section('.', 0, 0);
}
-TQString KLocale::formatNumber(const TQString &numStr, bool round,
+TQString TDELocale::formatNumber(const TQString &numStr, bool round,
int precision) const
{
TQString tmpString = numStr;
@@ -1335,7 +1335,7 @@ TQString KLocale::formatNumber(const TQString &numStr, bool round,
return mantString + expString;
}
-TQString KLocale::formatDate(const TQDate &pDate, bool shortFormat) const
+TQString TDELocale::formatDate(const TQDate &pDate, bool shortFormat) const
{
const TQString rst = shortFormat?dateFormatShort():dateFormat();
@@ -1410,12 +1410,12 @@ TQString KLocale::formatDate(const TQDate &pDate, bool shortFormat) const
return buffer;
}
-void KLocale::setMainCatalogue(const char *catalog)
+void TDELocale::setMainCatalogue(const char *catalog)
{
maincatalogue = catalog;
}
-double KLocale::readNumber(const TQString &_str, bool * ok) const
+double TDELocale::readNumber(const TQString &_str, bool * ok) const
{
TQString str = _str.stripWhiteSpace();
bool neg = str.find(negativeSign()) == 0;
@@ -1480,7 +1480,7 @@ double KLocale::readNumber(const TQString &_str, bool * ok) const
return tot.toDouble(ok);
}
-double KLocale::readMoney(const TQString &_str, bool * ok) const
+double TDELocale::readMoney(const TQString &_str, bool * ok) const
{
TQString str = _str.stripWhiteSpace();
bool neg = false;
@@ -1594,7 +1594,7 @@ static int readInt(const TQString &str, uint &pos)
return result;
}
-TQDate KLocale::readDate(const TQString &intstr, bool* ok) const
+TQDate TDELocale::readDate(const TQString &intstr, bool* ok) const
{
TQDate date;
date = readDate(intstr, ShortFormat, ok);
@@ -1602,15 +1602,15 @@ TQDate KLocale::readDate(const TQString &intstr, bool* ok) const
return readDate(intstr, NormalFormat, ok);
}
-TQDate KLocale::readDate(const TQString &intstr, ReadDateFlags flags, bool* ok) const
+TQDate TDELocale::readDate(const TQString &intstr, ReadDateFlags flags, bool* ok) const
{
TQString fmt = ((flags & ShortFormat) ? dateFormatShort() : dateFormat()).simplifyWhiteSpace();
return readDate( intstr, fmt, ok );
}
-TQDate KLocale::readDate(const TQString &intstr, const TQString &fmt, bool* ok) const
+TQDate TDELocale::readDate(const TQString &intstr, const TQString &fmt, bool* ok) const
{
- //kdDebug() << "KLocale::readDate intstr=" << intstr << " fmt=" << fmt << endl;
+ //kdDebug() << "TDELocale::readDate intstr=" << intstr << " fmt=" << fmt << endl;
TQString str = intstr.simplifyWhiteSpace().lower();
int day = -1, month = -1;
// allow the year to be omitted if not in the format
@@ -1722,7 +1722,7 @@ TQDate KLocale::readDate(const TQString &intstr, const TQString &fmt, bool* ok)
error = true;
}
- //kdDebug(173) << "KLocale::readDate day=" << day << " month=" << month << " year=" << year << endl;
+ //kdDebug(173) << "TDELocale::readDate day=" << day << " month=" << month << " year=" << year << endl;
if ( year != -1 && month != -1 && day != -1 && !error)
{
if (ok) *ok = true;
@@ -1739,7 +1739,7 @@ TQDate KLocale::readDate(const TQString &intstr, const TQString &fmt, bool* ok)
}
}
-TQTime KLocale::readTime(const TQString &intstr, bool *ok) const
+TQTime TDELocale::readTime(const TQString &intstr, bool *ok) const
{
TQTime _time;
_time = readTime(intstr, WithSeconds, ok);
@@ -1747,7 +1747,7 @@ TQTime KLocale::readTime(const TQString &intstr, bool *ok) const
return readTime(intstr, WithoutSeconds, ok);
}
-TQTime KLocale::readTime(const TQString &intstr, ReadTimeFlags flags, bool *ok) const
+TQTime TDELocale::readTime(const TQString &intstr, ReadTimeFlags flags, bool *ok) const
{
TQString str = intstr.simplifyWhiteSpace().lower();
TQString Format = timeFormat().simplifyWhiteSpace();
@@ -1855,12 +1855,12 @@ TQTime KLocale::readTime(const TQString &intstr, ReadTimeFlags flags, bool *ok)
}
//BIC: merge with below
-TQString KLocale::formatTime(const TQTime &pTime, bool includeSecs) const
+TQString TDELocale::formatTime(const TQTime &pTime, bool includeSecs) const
{
return formatTime( pTime, includeSecs, false );
}
-TQString KLocale::formatTime(const TQTime &pTime, bool includeSecs, bool isDuration) const
+TQString TDELocale::formatTime(const TQTime &pTime, bool includeSecs, bool isDuration) const
{
const TQString rst = timeFormat();
@@ -1946,7 +1946,7 @@ TQString KLocale::formatTime(const TQTime &pTime, bool includeSecs, bool isDurat
return ret;
}
-bool KLocale::use12Clock() const
+bool TDELocale::use12Clock() const
{
if ((timeFormat().contains(TQString::fromLatin1("%I")) > 0) ||
(timeFormat().contains(TQString::fromLatin1("%l")) > 0))
@@ -1955,17 +1955,17 @@ bool KLocale::use12Clock() const
return false;
}
-TQString KLocale::languages() const
+TQString TDELocale::languages() const
{
return d->languageList.join( TQString::fromLatin1(":") );
}
-TQStringList KLocale::languageList() const
+TQStringList TDELocale::languageList() const
{
return d->languageList;
}
-TQString KLocale::formatDateTime(const TQDateTime &pDateTime,
+TQString TDELocale::formatDateTime(const TQDateTime &pDateTime,
bool shortFormat,
bool includeSeconds) const
{
@@ -1976,7 +1976,7 @@ TQString KLocale::formatDateTime(const TQDateTime &pDateTime,
TQString i18n(const char* text)
{
- register KLocale *instance = KGlobal::locale();
+ register TDELocale *instance = TDEGlobal::locale();
if (instance)
return instance->translate(text);
return TQString::fromUtf8(text);
@@ -1984,7 +1984,7 @@ TQString i18n(const char* text)
TQString i18n(const char* index, const char *text)
{
- register KLocale *instance = KGlobal::locale();
+ register TDELocale *instance = TDEGlobal::locale();
if (instance)
return instance->translate(index, text);
return TQString::fromUtf8(text);
@@ -1992,7 +1992,7 @@ TQString i18n(const char* index, const char *text)
TQString i18n(const char* singular, const char* plural, unsigned long n)
{
- register KLocale *instance = KGlobal::locale();
+ register TDELocale *instance = TDEGlobal::locale();
if (instance)
return instance->translate(singular, plural, n);
if (n == 1)
@@ -2001,33 +2001,33 @@ TQString i18n(const char* singular, const char* plural, unsigned long n)
return put_n_in(TQString::fromUtf8(plural), n);
}
-void KLocale::initInstance()
+void TDELocale::initInstance()
{
- if (KGlobal::_locale)
+ if (TDEGlobal::_locale)
return;
- KInstance *app = KGlobal::instance();
+ TDEInstance *app = TDEGlobal::instance();
if (app) {
- KGlobal::_locale = new KLocale(TQString::fromLatin1(app->instanceName()));
+ TDEGlobal::_locale = new TDELocale(TQString::fromLatin1(app->instanceName()));
// only do this for the global instance
- TQTextCodec::setCodecForLocale(KGlobal::_locale->codecForEncoding());
+ TQTextCodec::setCodecForLocale(TDEGlobal::_locale->codecForEncoding());
}
else
- kdDebug(173) << "no app name available using KLocale - nothing to do\n";
+ kdDebug(173) << "no app name available using TDELocale - nothing to do\n";
}
-TQString KLocale::langLookup(const TQString &fname, const char *rtype)
+TQString TDELocale::langLookup(const TQString &fname, const char *rtype)
{
TQStringList search;
// assemble the local search paths
- const TQStringList localDoc = KGlobal::dirs()->resourceDirs(rtype);
+ const TQStringList localDoc = TDEGlobal::dirs()->resourceDirs(rtype);
// look up the different languages
for (int id=localDoc.count()-1; id >= 0; --id)
{
- TQStringList langs = KGlobal::locale()->languageList();
+ TQStringList langs = TDEGlobal::locale()->languageList();
langs.append( "en" );
langs.remove( defaultLanguage() );
TQStringList::ConstIterator lang;
@@ -2049,12 +2049,12 @@ TQString KLocale::langLookup(const TQString &fname, const char *rtype)
return TQString::null;
}
-bool KLocale::useDefaultLanguage() const
+bool TDELocale::useDefaultLanguage() const
{
return language() == defaultLanguage();
}
-void KLocale::initEncoding(KConfig *)
+void TDELocale::initEncoding(TDEConfig *)
{
const int mibDefault = 4; // ISO 8859-1
@@ -2070,65 +2070,65 @@ void KLocale::initEncoding(KConfig *)
Q_ASSERT( d->codecForEncoding );
}
-void KLocale::initFileNameEncoding(KConfig *)
+void TDELocale::initFileNameEncoding(TDEConfig *)
{
// If the following environment variable is set, assume all filenames
// are in UTF-8 regardless of the current C locale.
d->utf8FileEncoding = getenv("TDE_UTF8_FILENAMES") != 0;
if (d->utf8FileEncoding)
{
- TQFile::setEncodingFunction(KLocale::encodeFileNameUTF8);
- TQFile::setDecodingFunction(KLocale::decodeFileNameUTF8);
+ TQFile::setEncodingFunction(TDELocale::encodeFileNameUTF8);
+ TQFile::setDecodingFunction(TDELocale::decodeFileNameUTF8);
}
// Otherwise, stay with QFile's default filename encoding functions
// which, on Unix platforms, use the locale's codec.
}
#ifdef USE_QT3
-TQCString KLocale::encodeFileNameUTF8( const TQString & fileName )
+TQCString TDELocale::encodeFileNameUTF8( const TQString & fileName )
#endif // USE_QT3
#ifdef USE_QT4
-QByteArray KLocale::encodeFileNameUTF8( const QString & fileName )
+QByteArray TDELocale::encodeFileNameUTF8( const QString & fileName )
#endif // USE_QT4
{
return TQString(fileName).utf8();
}
#ifdef USE_QT3
-TQString KLocale::decodeFileNameUTF8( const TQCString & localFileName )
+TQString TDELocale::decodeFileNameUTF8( const TQCString & localFileName )
#endif // USE_QT3
#ifdef USE_QT4
-QString KLocale::decodeFileNameUTF8( const QByteArray & localFileName )
+QString TDELocale::decodeFileNameUTF8( const QByteArray & localFileName )
#endif // USE_QT4
{
return TQString::fromUtf8(localFileName);
}
-void KLocale::setDateFormat(const TQString & format)
+void TDELocale::setDateFormat(const TQString & format)
{
doFormatInit();
m_dateFormat = format.stripWhiteSpace();
}
-void KLocale::setDateFormatShort(const TQString & format)
+void TDELocale::setDateFormatShort(const TQString & format)
{
doFormatInit();
m_dateFormatShort = format.stripWhiteSpace();
}
-void KLocale::setDateMonthNamePossessive(bool possessive)
+void TDELocale::setDateMonthNamePossessive(bool possessive)
{
doFormatInit();
d->dateMonthNamePossessive = possessive;
}
-void KLocale::setTimeFormat(const TQString & format)
+void TDELocale::setTimeFormat(const TQString & format)
{
doFormatInit();
m_timeFormat = format.stripWhiteSpace();
}
-void KLocale::setWeekStartsMonday(bool start) //deprecated
+void TDELocale::setWeekStartsMonday(bool start) //deprecated
{
doFormatInit();
if (start)
@@ -2137,7 +2137,7 @@ void KLocale::setWeekStartsMonday(bool start) //deprecated
d->weekStartDay = 7;
}
-void KLocale::setWeekStartDay(int day)
+void TDELocale::setWeekStartDay(int day)
{
doFormatInit();
if (day>7 || day<1)
@@ -2146,134 +2146,134 @@ void KLocale::setWeekStartDay(int day)
d->weekStartDay = day;
}
-TQString KLocale::dateFormat() const
+TQString TDELocale::dateFormat() const
{
doFormatInit();
return m_dateFormat;
}
-TQString KLocale::dateFormatShort() const
+TQString TDELocale::dateFormatShort() const
{
doFormatInit();
return m_dateFormatShort;
}
-TQString KLocale::timeFormat() const
+TQString TDELocale::timeFormat() const
{
doFormatInit();
return m_timeFormat;
}
-void KLocale::setDecimalSymbol(const TQString & symbol)
+void TDELocale::setDecimalSymbol(const TQString & symbol)
{
doFormatInit();
m_decimalSymbol = symbol.stripWhiteSpace();
}
-void KLocale::setThousandsSeparator(const TQString & separator)
+void TDELocale::setThousandsSeparator(const TQString & separator)
{
doFormatInit();
// allow spaces here
m_thousandsSeparator = separator;
}
-void KLocale::setPositiveSign(const TQString & sign)
+void TDELocale::setPositiveSign(const TQString & sign)
{
doFormatInit();
m_positiveSign = sign.stripWhiteSpace();
}
-void KLocale::setNegativeSign(const TQString & sign)
+void TDELocale::setNegativeSign(const TQString & sign)
{
doFormatInit();
m_negativeSign = sign.stripWhiteSpace();
}
-void KLocale::setPositiveMonetarySignPosition(SignPosition signpos)
+void TDELocale::setPositiveMonetarySignPosition(SignPosition signpos)
{
doFormatInit();
m_positiveMonetarySignPosition = signpos;
}
-void KLocale::setNegativeMonetarySignPosition(SignPosition signpos)
+void TDELocale::setNegativeMonetarySignPosition(SignPosition signpos)
{
doFormatInit();
m_negativeMonetarySignPosition = signpos;
}
-void KLocale::setPositivePrefixCurrencySymbol(bool prefix)
+void TDELocale::setPositivePrefixCurrencySymbol(bool prefix)
{
doFormatInit();
m_positivePrefixCurrencySymbol = prefix;
}
-void KLocale::setNegativePrefixCurrencySymbol(bool prefix)
+void TDELocale::setNegativePrefixCurrencySymbol(bool prefix)
{
doFormatInit();
m_negativePrefixCurrencySymbol = prefix;
}
-void KLocale::setFracDigits(int digits)
+void TDELocale::setFracDigits(int digits)
{
doFormatInit();
m_fracDigits = digits;
}
-void KLocale::setMonetaryThousandsSeparator(const TQString & separator)
+void TDELocale::setMonetaryThousandsSeparator(const TQString & separator)
{
doFormatInit();
// allow spaces here
m_monetaryThousandsSeparator = separator;
}
-void KLocale::setMonetaryDecimalSymbol(const TQString & symbol)
+void TDELocale::setMonetaryDecimalSymbol(const TQString & symbol)
{
doFormatInit();
m_monetaryDecimalSymbol = symbol.stripWhiteSpace();
}
-void KLocale::setCurrencySymbol(const TQString & symbol)
+void TDELocale::setCurrencySymbol(const TQString & symbol)
{
doFormatInit();
m_currencySymbol = symbol.stripWhiteSpace();
}
-int KLocale::pageSize() const
+int TDELocale::pageSize() const
{
doFormatInit();
return d->pageSize;
}
-void KLocale::setPageSize(int pageSize)
+void TDELocale::setPageSize(int pageSize)
{
// #### check if it's in range??
doFormatInit();
d->pageSize = pageSize;
}
-KLocale::MeasureSystem KLocale::measureSystem() const
+TDELocale::MeasureSystem TDELocale::measureSystem() const
{
doFormatInit();
return d->measureSystem;
}
-void KLocale::setMeasureSystem(MeasureSystem value)
+void TDELocale::setMeasureSystem(MeasureSystem value)
{
doFormatInit();
d->measureSystem = value;
}
-TQString KLocale::defaultLanguage()
+TQString TDELocale::defaultLanguage()
{
return TQString::fromLatin1("en_US");
}
-TQString KLocale::defaultCountry()
+TQString TDELocale::defaultCountry()
{
return TQString::fromLatin1("C");
}
-const char * KLocale::encoding() const
+const char * TDELocale::encoding() const
{
#ifdef Q_WS_WIN
if (0==qstrcmp("System", codecForEncoding()->name()))
@@ -2290,24 +2290,24 @@ const char * KLocale::encoding() const
return codecForEncoding()->name();
}
-int KLocale::encodingMib() const
+int TDELocale::encodingMib() const
{
return codecForEncoding()->mibEnum();
}
-int KLocale::fileEncodingMib() const
+int TDELocale::fileEncodingMib() const
{
if (d->utf8FileEncoding)
return 106;
return codecForEncoding()->mibEnum();
}
-TQTextCodec * KLocale::codecForEncoding() const
+TQTextCodec * TDELocale::codecForEncoding() const
{
return d->codecForEncoding;
}
-bool KLocale::setEncoding(int mibEnum)
+bool TDELocale::setEncoding(int mibEnum)
{
TQTextCodec * codec = TQTextCodec::codecForMib(mibEnum);
if (codec)
@@ -2316,7 +2316,7 @@ bool KLocale::setEncoding(int mibEnum)
return codec != 0;
}
-TQStringList KLocale::languagesTwoAlpha() const
+TQStringList TDELocale::languagesTwoAlpha() const
{
if (d->langTwoAlpha.count())
return d->langTwoAlpha;
@@ -2325,7 +2325,7 @@ TQStringList KLocale::languagesTwoAlpha() const
TQStringList result;
- KConfig config(TQString::fromLatin1("language.codes"), true, false);
+ TDEConfig config(TQString::fromLatin1("language.codes"), true, false);
config.setGroup("TwoLetterCodes");
for ( TQStringList::ConstIterator it = origList.begin();
@@ -2356,18 +2356,18 @@ TQStringList KLocale::languagesTwoAlpha() const
return result;
}
-TQStringList KLocale::allLanguagesTwoAlpha() const
+TQStringList TDELocale::allLanguagesTwoAlpha() const
{
if (!d->languages)
- d->languages = new KConfig("all_languages", true, false, "locale");
+ d->languages = new TDEConfig("all_languages", true, false, "locale");
return d->languages->groupList();
}
-TQString KLocale::twoAlphaToLanguageName(const TQString &code) const
+TQString TDELocale::twoAlphaToLanguageName(const TQString &code) const
{
if (!d->languages)
- d->languages = new KConfig("all_languages", true, false, "locale");
+ d->languages = new TDEConfig("all_languages", true, false, "locale");
TQString groupName = code;
const int i = groupName.find('_');
@@ -2377,10 +2377,10 @@ TQString KLocale::twoAlphaToLanguageName(const TQString &code) const
return d->languages->readEntry("Name");
}
-TQStringList KLocale::allCountriesTwoAlpha() const
+TQStringList TDELocale::allCountriesTwoAlpha() const
{
TQStringList countries;
- TQStringList paths = KGlobal::dirs()->findAllResources("locale", "l10n/*/entry.desktop");
+ TQStringList paths = TDEGlobal::dirs()->findAllResources("locale", "l10n/*/entry.desktop");
for(TQStringList::ConstIterator it = paths.begin();
it != paths.end(); ++it)
{
@@ -2391,14 +2391,14 @@ TQStringList KLocale::allCountriesTwoAlpha() const
return countries;
}
-TQString KLocale::twoAlphaToCountryName(const TQString &code) const
+TQString TDELocale::twoAlphaToCountryName(const TQString &code) const
{
- KConfig cfg("l10n/"+code.lower()+"/entry.desktop", true, false, "locale");
+ TDEConfig cfg("l10n/"+code.lower()+"/entry.desktop", true, false, "locale");
cfg.setGroup("KCM Locale");
return cfg.readEntry("Name");
}
-void KLocale::setCalendar(const TQString & calType)
+void TDELocale::setCalendar(const TQString & calType)
{
doFormatInit();
@@ -2408,14 +2408,14 @@ void KLocale::setCalendar(const TQString & calType)
d->calendar = 0;
}
-TQString KLocale::calendarType() const
+TQString TDELocale::calendarType() const
{
doFormatInit();
return d->calendarType;
}
-const KCalendarSystem * KLocale::calendar() const
+const KCalendarSystem * TDELocale::calendar() const
{
doFormatInit();
@@ -2426,14 +2426,14 @@ const KCalendarSystem * KLocale::calendar() const
return d->calendar;
}
-KLocale::KLocale(const KLocale & rhs)
+TDELocale::TDELocale(const TDELocale & rhs)
{
- d = new KLocalePrivate;
+ d = new TDELocalePrivate;
*this = rhs;
}
-KLocale & KLocale::operator=(const KLocale & rhs)
+TDELocale & TDELocale::operator=(const TDELocale & rhs)
{
// Numbers and money
m_decimalSymbol = rhs.m_decimalSymbol;
@@ -2465,8 +2465,8 @@ KLocale & KLocale::operator=(const KLocale & rhs)
return *this;
}
-bool KLocale::setCharset(const TQString & ) { return true; }
-TQString KLocale::charset() const { return TQString::fromLatin1("UTF-8"); }
+bool TDELocale::setCharset(const TQString & ) { return true; }
+TQString TDELocale::charset() const { return TQString::fromLatin1("UTF-8"); }
// KDE4: remove
#if 0
diff --git a/tdecore/klocale.h b/tdecore/tdelocale.h
index ce9dad46b..94cf704f1 100644
--- a/tdecore/klocale.h
+++ b/tdecore/tdelocale.h
@@ -31,20 +31,20 @@ class TQDate;
class TQTime;
class TQDateTime;
-class KGlobal;
-class KConfig;
-class KConfigBase;
-class KLocalePrivate;
+class TDEGlobal;
+class TDEConfig;
+class TDEConfigBase;
+class TDELocalePrivate;
class KCatalogue;
class KCalendarSystem;
/**
- * \file klocale.h
+ * \file tdelocale.h
*/
#ifndef I18N_NOOP
/**
- * \relates KLocale
+ * \relates TDELocale
* I18N_NOOP marks a string to be translated without translating it.
* Do not use this unless you know you need it.
* http://developer.kde.org/documentation/other/developer-faq.html#q2.11.2
@@ -54,7 +54,7 @@ class KCalendarSystem;
#ifndef I18N_NOOP2
/**
- * \relates KLocale
+ * \relates TDELocale
* If the string is too ambiguous to be translated well to a non-english
* language, use this instead of I18N_NOOP to separate lookup string and english.
* \warning You need to call i18n( comment, stringVar ) later on, not just i18n( stringVar ).
@@ -64,7 +64,7 @@ class KCalendarSystem;
#endif
/**
- * \relates KLocale
+ * \relates TDELocale
* i18n is the function that does everything you need to translate
* a string. You just wrap around every user visible string a i18n
* call to get a TQString with the string in the user's preferred
@@ -78,7 +78,7 @@ class KCalendarSystem;
TDECORE_EXPORT TQString i18n(const char *text);
/**
- * \relates KLocale
+ * \relates TDELocale
* If the string is too ambiguous to be translated well to a non-english
* language, use this form of i18n to separate lookup string and english
* text.
@@ -87,7 +87,7 @@ TDECORE_EXPORT TQString i18n(const char *text);
TDECORE_EXPORT TQString i18n(const char *comment, const char *text);
/**
- * \relates KLocale
+ * \relates TDELocale
* If you want to handle plural forms, use this form of i18n.
* @param singular the singular form of the word, for example "file".
* @param plural the plural form of the word. Must contain a "%n" that will
@@ -100,7 +100,7 @@ TDECORE_EXPORT TQString i18n(const char *comment, const char *text);
TDECORE_EXPORT TQString i18n(const char *singular, const char *plural, unsigned long n);
/**
- * \relates KLocale
+ * \relates TDELocale
* Qt3's uic generates i18n( "msg", "comment" ) calls which conflict
* with our i18n method. We use uic -tr tr2i18n to redirect
* to the right i18n() function
@@ -111,52 +111,52 @@ inline TQString tr2i18n(const char* message, const char* =0) {
/**
*
- * KLocale provides support for country specific stuff like
+ * TDELocale provides support for country specific stuff like
* the national language.
*
- * KLocale supports translating, as well as specifying the format
+ * TDELocale supports translating, as well as specifying the format
* for numbers, currency, time, and date.
*
* @author Stephan Kulow <coolo@kde.org>, Preston Brown <pbrown@kde.org>,
* Hans Petter Bieker <bieker@kde.org>, Lukas Tinkl <lukas.tinkl@suse.cz>
* @short class for supporting locale settings and national language
*/
-class TDECORE_EXPORT KLocale
+class TDECORE_EXPORT TDELocale
{
- friend class KGlobal; // for initInstance()
+ friend class TDEGlobal; // for initInstance()
public:
/**
- * Constructs a KLocale with the given catalog name.
+ * Constructs a TDELocale with the given catalog name.
* The constructor looks for an entry Locale/Language in the
* configuration file.
* If no config file is specified, it will also look for languages
* using the environment variables (TDE_LANG, LC_MESSAGES, LC_ALL, LANG),
- * as well as the global configuration file. If KLocale is not able to use
+ * as well as the global configuration file. If TDELocale is not able to use
* any of the specified languages, the default language (en_US) will be
* used.
*
* If you specify a configuration file, it has to be valid until
- * the KLocale object is destroyed.
+ * the TDELocale object is destroyed.
*
* @param catalog The name of the main language file
* @param config The configuration file to use.
*/
- KLocale( const TQString& catalog, KConfig *config = 0 );
+ TDELocale( const TQString& catalog, TDEConfig *config = 0 );
/**
* Copy constructor.
*/
- KLocale( const KLocale & rhs );
+ TDELocale( const TDELocale & rhs );
/**
* Assignment operator.
*/
- KLocale& operator= ( const KLocale & rhs );
+ TDELocale& operator= ( const TDELocale & rhs );
/**
* Destructor.
*/
- ~KLocale();
+ ~TDELocale();
/**
* Translates the string into the corresponding string in
@@ -877,14 +877,14 @@ public:
*
* Please use setWeekStartDay instead.
*
- * Changes how KLocale defines the first day in week.
+ * Changes how TDELocale defines the first day in week.
*
* @param start True if Monday is the first day in the week
*/
void setWeekStartsMonday(bool start) KDE_DEPRECATED; //### remove for KDE 4.0
/**
- * Changes how KLocale defines the first day in week.
+ * Changes how TDELocale defines the first day in week.
*
* @param day first day of the week (Monday=1..Sunday=7) as integer
* @since 3.1
@@ -1105,10 +1105,10 @@ public:
TQString & charset);
/**
- * Use this as main catalog for *all* KLocales, if not the appname
+ * Use this as main catalog for *all* TDELocales, if not the appname
* will be used. This function is best to be the very first instruction
* in your program's main function as it only has an effect before the
- * first KLocale object is created.
+ * first TDELocale object is created.
*
* @param catalog Catalogue to override all other main catalogues.
*/
@@ -1138,9 +1138,9 @@ public:
/**
- * @internal Called from KConfigBackend to initialize language.
+ * @internal Called from TDEConfigBackend to initialize language.
*/
- static TQString _initLanguage(KConfigBase *config);
+ static TQString _initLanguage(TDEConfigBase *config);
#ifdef KDE_NO_COMPAT
private:
@@ -1173,7 +1173,7 @@ private:
protected:
/**
- * @internal Creates a KLocale object for KGlobal and inits the locale
+ * @internal Creates a TDELocale object for TDEGlobal and inits the locale
* pointer.
*/
static void initInstance();
@@ -1185,7 +1185,7 @@ private:
*
* @param config The configuration object used for init.
*/
- void initFormat(KConfig *config);
+ void initFormat(TDEConfig *config);
/**
* @internal Initializes the catalogs appname, tdelibs and kio for all chosen languages.
@@ -1203,20 +1203,20 @@ private:
* @param config The configuration object used for init
* @param useEnv True if we should use environment variables
*/
- void initLanguageList(KConfig * config, bool useEnv);
+ void initLanguageList(TDEConfig * config, bool useEnv);
/**
* @internal Figures out which encoding the user prefers.
*
* @param config The configuration object used for init
*/
- void initEncoding(KConfig * config);
+ void initEncoding(TDEConfig * config);
/**
* @internal Figures out which encoding the user prefers for filenames
* and sets up the appropriate TQFile encoding and decoding functions.
*/
- void initFileNameEncoding(KConfig *config);
+ void initFileNameEncoding(TDEConfig *config);
/**
* @internal A TQFile filename encoding function (TQFile::encodeFn).
@@ -1344,7 +1344,7 @@ private:
bool m_positivePrefixCurrencySymbol;
bool m_negativePrefixCurrencySymbol;
- KLocalePrivate *d;
+ TDELocalePrivate *d;
};
#endif
diff --git a/tdecore/kmultipledrag.cpp b/tdecore/tdemultipledrag.cpp
index 29d56bd85..db71c9e87 100644
--- a/tdecore/kmultipledrag.cpp
+++ b/tdecore/tdemultipledrag.cpp
@@ -17,7 +17,7 @@
Boston, MA 02110-1301, USA.
*/
-#include "kmultipledrag.h"
+#include "tdemultipledrag.h"
#include "kdebug.h"
#ifndef QT_NO_DRAGANDDROP
@@ -77,6 +77,6 @@ const char* KMultipleDrag::format( int i ) const
void KMultipleDrag::virtual_hook( int, void* )
{ /*BASE::virtual_hook( id, data );*/ }
-#include "kmultipledrag.moc"
+#include "tdemultipledrag.moc"
#endif
diff --git a/tdecore/kmultipledrag.h b/tdecore/tdemultipledrag.h
index 42baf3530..42baf3530 100644
--- a/tdecore/kmultipledrag.h
+++ b/tdecore/tdemultipledrag.h
diff --git a/tdecore/tdenetworkconnections.cpp b/tdecore/tdenetworkconnections.cpp
index 80f34b765..2682aa991 100644
--- a/tdecore/tdenetworkconnections.cpp
+++ b/tdecore/tdenetworkconnections.cpp
@@ -23,7 +23,7 @@
#include <tqtimer.h>
-#include <klocale.h>
+#include <tdelocale.h>
// #define DEBUG_SIGNAL_QUEUE 1
@@ -717,7 +717,7 @@ TDENetworkConnection* TDENetworkConnectionManager::findConnectionByUUID(TQString
}
TDENetworkDevice* TDENetworkConnectionManager::findDeviceByUUID(TQString uuid) {
- TDEHardwareDevices *hwdevices = KGlobal::hardwareDevices();
+ TDEHardwareDevices *hwdevices = TDEGlobal::hardwareDevices();
if (!hwdevices) return NULL;
TDEGenericHardwareList devices = hwdevices->listByDeviceClass(TDEGenericDeviceType::Network);
@@ -1071,7 +1071,7 @@ TDENetworkDevice* TDEGlobalNetworkManager::findDeviceByUUID(TQString uuid) {
}
TDENetworkWiFiAPInfo* TDEGlobalNetworkManager::findAccessPointByBSSID(TDEMACAddress bssid) {
- TDEHardwareDevices *hwdevices = KGlobal::hardwareDevices();
+ TDEHardwareDevices *hwdevices = TDEGlobal::hardwareDevices();
if (!hwdevices) {
return NULL;
}
diff --git a/tdecore/kshortcut.cpp b/tdecore/tdeshortcut.cpp
index 10c6c31fa..bae897e98 100644
--- a/tdecore/kshortcut.cpp
+++ b/tdecore/tdeshortcut.cpp
@@ -17,7 +17,7 @@
Boston, MA 02110-1301, USA.
*/
-#include "kshortcut.h"
+#include "tdeshortcut.h"
#include "kkeynative.h"
#include "kkeyserver.h"
@@ -25,15 +25,15 @@
#include <tqstringlist.h>
#include <kdebug.h>
-#include <kglobal.h>
-#include <klocale.h>
+#include <tdeglobal.h>
+#include <tdelocale.h>
#include <ksimpleconfig.h>
//----------------------------------------------------
static KKey* g_pspec = 0;
static KKeySequence* g_pseq = 0;
-static KShortcut* g_pcut = 0;
+static TDEShortcut* g_pcut = 0;
//----------------------------------------------------
// KKey
@@ -396,28 +396,28 @@ KKeySequence& KKeySequence::null()
}
//---------------------------------------------------------------------
-// KShortcut
+// TDEShortcut
//---------------------------------------------------------------------
-KShortcut::KShortcut() { clear(); }
-KShortcut::KShortcut( int keyQt ) { init( keyQt ); }
-KShortcut::KShortcut( const TQKeySequence& key ) { init( key ); }
-KShortcut::KShortcut( const KKey& key ) { init( key ); }
-KShortcut::KShortcut( const KKeySequence& seq ) { init( seq ); }
-KShortcut::KShortcut( const KShortcut& cut ) { init( cut ); }
-KShortcut::KShortcut( const char* ps ) { init( TQString(ps) ); }
-KShortcut::KShortcut( const TQString& s ) { init( s ); }
+TDEShortcut::TDEShortcut() { clear(); }
+TDEShortcut::TDEShortcut( int keyQt ) { init( keyQt ); }
+TDEShortcut::TDEShortcut( const TQKeySequence& key ) { init( key ); }
+TDEShortcut::TDEShortcut( const KKey& key ) { init( key ); }
+TDEShortcut::TDEShortcut( const KKeySequence& seq ) { init( seq ); }
+TDEShortcut::TDEShortcut( const TDEShortcut& cut ) { init( cut ); }
+TDEShortcut::TDEShortcut( const char* ps ) { init( TQString(ps) ); }
+TDEShortcut::TDEShortcut( const TQString& s ) { init( s ); }
-KShortcut::~KShortcut()
+TDEShortcut::~TDEShortcut()
{
}
-void KShortcut::clear()
+void TDEShortcut::clear()
{
m_nSeqs = 0;
}
-bool KShortcut::init( int keyQt )
+bool TDEShortcut::init( int keyQt )
{
if( keyQt ) {
m_nSeqs = 1;
@@ -427,28 +427,28 @@ bool KShortcut::init( int keyQt )
return true;
}
-bool KShortcut::init( const TQKeySequence& key )
+bool TDEShortcut::init( const TQKeySequence& key )
{
m_nSeqs = 1;
m_rgseq[0].init( key );
return true;
}
-bool KShortcut::init( const KKey& spec )
+bool TDEShortcut::init( const KKey& spec )
{
m_nSeqs = 1;
m_rgseq[0].init( spec );
return true;
}
-bool KShortcut::init( const KKeySequence& seq )
+bool TDEShortcut::init( const KKeySequence& seq )
{
m_nSeqs = 1;
m_rgseq[0] = seq;
return true;
}
-bool KShortcut::init( const KShortcut& cut )
+bool TDEShortcut::init( const TDEShortcut& cut )
{
m_nSeqs = cut.m_nSeqs;
for( uint i = 0; i < m_nSeqs; i++ )
@@ -456,7 +456,7 @@ bool KShortcut::init( const KShortcut& cut )
return true;
}
-bool KShortcut::init( const TQString& s )
+bool TDEShortcut::init( const TQString& s )
{
bool bRet = true;
TQStringList rgs = TQStringList::split( ';', s );
@@ -480,7 +480,7 @@ bool KShortcut::init( const TQString& s )
if( !s.isEmpty() ) {
TQString sDebug;
TQTextStream os( &sDebug, IO_WriteOnly );
- os << "KShortcut::init( \"" << s << "\" ): ";
+ os << "TDEShortcut::init( \"" << s << "\" ): ";
for( uint i = 0; i < m_nSeqs; i++ ) {
os << " m_rgseq[" << i << "]: ";
KKeyServer::Variations vars;
@@ -494,29 +494,29 @@ bool KShortcut::init( const TQString& s )
return bRet;
}
-uint KShortcut::count() const
+uint TDEShortcut::count() const
{
return m_nSeqs;
}
-const KKeySequence& KShortcut::seq( uint i ) const
+const KKeySequence& TDEShortcut::seq( uint i ) const
{
return (i < m_nSeqs) ? m_rgseq[i] : KKeySequence::null();
}
-int KShortcut::keyCodeQt() const
+int TDEShortcut::keyCodeQt() const
{
if( m_nSeqs >= 1 )
return m_rgseq[0].keyCodeQt();
return TQKeySequence();
}
-bool KShortcut::isNull() const
+bool TDEShortcut::isNull() const
{
return m_nSeqs == 0;
}
-int KShortcut::compare( const KShortcut& cut ) const
+int TDEShortcut::compare( const TDEShortcut& cut ) const
{
for( uint i = 0; i < m_nSeqs && i < cut.m_nSeqs; i++ ) {
int ret = m_rgseq[i].compare( cut.m_rgseq[i] );
@@ -526,12 +526,12 @@ int KShortcut::compare( const KShortcut& cut ) const
return m_nSeqs - cut.m_nSeqs;
}
-bool KShortcut::contains( const KKey& key ) const
+bool TDEShortcut::contains( const KKey& key ) const
{
return contains( KKeySequence(key) );
}
-bool KShortcut::contains( const KKeyNative& keyNative ) const
+bool TDEShortcut::contains( const KKeyNative& keyNative ) const
{
KKey key = keyNative.key();
key.simplify();
@@ -545,7 +545,7 @@ bool KShortcut::contains( const KKeyNative& keyNative ) const
return false;
}
-bool KShortcut::contains( const KKeySequence& seq ) const
+bool TDEShortcut::contains( const KKeySequence& seq ) const
{
for( uint i = 0; i < count(); i++ ) {
if( !m_rgseq[i].isNull() && m_rgseq[i] == seq )
@@ -554,7 +554,7 @@ bool KShortcut::contains( const KKeySequence& seq ) const
return false;
}
-bool KShortcut::setSeq( uint iSeq, const KKeySequence& seq )
+bool TDEShortcut::setSeq( uint iSeq, const KKeySequence& seq )
{
// TODO: check if seq is null, and act accordingly.
if( iSeq <= m_nSeqs && iSeq < MAX_SEQUENCES ) {
@@ -566,7 +566,7 @@ bool KShortcut::setSeq( uint iSeq, const KKeySequence& seq )
return false;
}
-void KShortcut::remove( const KKeySequence& seq )
+void TDEShortcut::remove( const KKeySequence& seq )
{
if (seq.isNull()) return;
@@ -581,7 +581,7 @@ void KShortcut::remove( const KKeySequence& seq )
}
}
-bool KShortcut::append( const KKeySequence& seq )
+bool TDEShortcut::append( const KKeySequence& seq )
{
if( m_nSeqs < MAX_SEQUENCES ) {
if( !seq.isNull() ) {
@@ -593,7 +593,7 @@ bool KShortcut::append( const KKeySequence& seq )
return false;
}
-bool KShortcut::append( const KKey& spec )
+bool TDEShortcut::append( const KKey& spec )
{
if( m_nSeqs < MAX_SEQUENCES ) {
m_rgseq[m_nSeqs].init( spec );
@@ -603,7 +603,7 @@ bool KShortcut::append( const KKey& spec )
return false;
}
-bool KShortcut::append( const KShortcut& cut )
+bool TDEShortcut::append( const TDEShortcut& cut )
{
uint seqs = m_nSeqs, co = cut.count();
for( uint i=0; i<co; i++ ) {
@@ -621,7 +621,7 @@ bool KShortcut::append( const KShortcut& cut )
return true;
}
-KShortcut::operator TQKeySequence () const
+TDEShortcut::operator TQKeySequence () const
{
if( count() >= 1 )
return m_rgseq[0].qt();
@@ -629,7 +629,7 @@ KShortcut::operator TQKeySequence () const
return TQKeySequence();
}
-TQString KShortcut::toString() const
+TQString TDEShortcut::toString() const
{
TQString s;
@@ -642,7 +642,7 @@ TQString KShortcut::toString() const
return s;
}
-TQString KShortcut::toStringInternal( const KShortcut* pcutDefault ) const
+TQString TDEShortcut::toStringInternal( const TDEShortcut* pcutDefault ) const
{
TQString s;
@@ -661,10 +661,10 @@ TQString KShortcut::toStringInternal( const KShortcut* pcutDefault ) const
return s;
}
-KShortcut& KShortcut::null()
+TDEShortcut& TDEShortcut::null()
{
if( !g_pcut )
- g_pcut = new KShortcut;
+ g_pcut = new TDEShortcut;
if( !g_pcut->isNull() )
g_pcut->clear();
return *g_pcut;
diff --git a/tdecore/kshortcut.h b/tdecore/tdeshortcut.h
index 9baf31b0d..e98a007b5 100644
--- a/tdecore/kshortcut.h
+++ b/tdecore/tdeshortcut.h
@@ -34,7 +34,7 @@ class KKeyNative;
* by the underlying system (e.g. X11).
* @see KKeyNative
* @see KKeySequence
-* @see KShortcut
+* @see TDEShortcut
*/
class TDECORE_EXPORT KKey
@@ -282,7 +282,7 @@ class TDECORE_EXPORT KKey
* A KKeySequence object holds a sequence of up to 4 keys.
* Ex: Ctrl+X,I
* @see KKey
-* @see KShortcut
+* @see TDEShortcut
*/
class TDECORE_EXPORT KKeySequence
@@ -518,18 +518,18 @@ class TDECORE_EXPORT KKeySequence
};
/**
-* The KShortcut class is used to represent a keyboard shortcut to an action.
+* The TDEShortcut class is used to represent a keyboard shortcut to an action.
* A shortcut is normally a single key with modifiers, such as Ctrl+V.
-* A KShortcut object may also contain an alternate key which will also
+* A TDEShortcut object may also contain an alternate key which will also
* activate the action it's associated to, as long as no other actions have
* defined that key as their primary key. Ex: Ctrl+V;Shift+Insert.
*
-* This can be used to add additional accelerators to a KAction. For example,
+* This can be used to add additional accelerators to a TDEAction. For example,
* the below code binds the escape key to the close action.
*
* \code
-* KAction *closeAction = KStdAction::close( this, TQT_SLOT( close() ), actionCollection() );
-* KShortcut closeShortcut = closeAction->shortcut();
+* TDEAction *closeAction = KStdAction::close( this, TQT_SLOT( close() ), actionCollection() );
+* TDEShortcut closeShortcut = closeAction->shortcut();
* closeShortcut.append( KKey(Key_Escape));
* closeAction->setShortcut(closeShortcut);
* \endcode
@@ -540,12 +540,12 @@ class TDECORE_EXPORT KKeySequence
*
*/
-class TDECORE_EXPORT KShortcut
+class TDECORE_EXPORT TDEShortcut
{
public:
/**
* The maximum number of key sequences that can be contained in
- * a KShortcut.
+ * a TDEShortcut.
*/
enum { MAX_SEQUENCES = 2 };
@@ -555,7 +555,7 @@ class TDECORE_EXPORT KShortcut
* @see isNull()
* @see clear()
*/
- KShortcut();
+ TDEShortcut();
/**
* Creates a new shortcut with the given Qt key code
@@ -563,34 +563,34 @@ class TDECORE_EXPORT KShortcut
* @param keyQt the qt keycode
* @see Qt::Key
*/
- KShortcut( int keyQt );
+ TDEShortcut( int keyQt );
/**
* Creates a new shortcut that contains only the given qt key
* sequence.
* @param keySeq the qt key sequence to add
*/
- KShortcut( const TQKeySequence& keySeq );
+ TDEShortcut( const TQKeySequence& keySeq );
/**
* Creates a new shortcut that contains only the given key
* in its only sequence.
* @param key the key to add
*/
- KShortcut( const KKey& key );
+ TDEShortcut( const KKey& key );
/**
* Creates a new shortcut that contains only the given key
* sequence.
* @param keySeq the key sequence to add
*/
- KShortcut( const KKeySequence& keySeq );
+ TDEShortcut( const KKeySequence& keySeq );
/**
* Copies the given shortcut.
* @param shortcut the shortcut to add
*/
- KShortcut( const KShortcut& shortcut );
+ TDEShortcut( const TDEShortcut& shortcut );
/**
* Creates a new key sequence that contains the given key sequence.
@@ -599,7 +599,7 @@ class TDECORE_EXPORT KShortcut
* @param shortcut the description of the key
* @see KKeySequence::KKeySequence(const TQString&)
*/
- KShortcut( const char* shortcut );
+ TDEShortcut( const char* shortcut );
/**
* Creates a new key sequence that contains the given key sequence.
@@ -608,8 +608,8 @@ class TDECORE_EXPORT KShortcut
* @param shortcut the description of the key
* @see KKeySequence::KKeySequence(const TQString&)
*/
- KShortcut( const TQString& shortcut );
- ~KShortcut();
+ TDEShortcut( const TQString& shortcut );
+ ~TDEShortcut();
/**
* Clears the shortcut. The shortcut is null after calling this
@@ -648,7 +648,7 @@ class TDECORE_EXPORT KShortcut
* Copies the given shortcut.
* @param shortcut the shortcut to add
*/
- bool init( const KShortcut& shortcut );
+ bool init( const TDEShortcut& shortcut );
/**
* Initializes the key sequence with the given key sequence.
@@ -662,7 +662,7 @@ class TDECORE_EXPORT KShortcut
/**
* Copies the given shortcut over this shortcut.
*/
- KShortcut& operator =( const KShortcut& cut )
+ TDEShortcut& operator =( const TDEShortcut& cut )
{ init( cut ); return *this; }
/**
@@ -708,32 +708,32 @@ class TDECORE_EXPORT KShortcut
* beginning until an unequal key sequences has been found. If a shortcut
* contains more key sequences, it is considered larger.
* @param shortcut the shortcut to compare to
- * @return a negative number if the given KShortcut is larger, 0 if
- * they are equal and a positive number this KShortcut is larger
+ * @return a negative number if the given TDEShortcut is larger, 0 if
+ * they are equal and a positive number this TDEShortcut is larger
* @see KKey::compare()
* @see KKeyShortcut::compare()
*/
- int compare( const KShortcut& shortcut ) const;
+ int compare( const TDEShortcut& shortcut ) const;
/**
* Compares the sequences of both shortcuts.
* @see compare()
*/
- bool operator == ( const KShortcut& cut ) const
+ bool operator == ( const TDEShortcut& cut ) const
{ return compare( cut ) == 0; }
/**
* Compares the sequences of both shortcuts.
* @see compare()
*/
- bool operator != ( const KShortcut& cut ) const
+ bool operator != ( const TDEShortcut& cut ) const
{ return compare( cut ) != 0; }
/**
* Compares the sequences of both shortcuts.
* @see compare()
*/
- bool operator < ( const KShortcut& cut ) const
+ bool operator < ( const TDEShortcut& cut ) const
{ return compare( cut ) < 0; }
/**
@@ -804,7 +804,7 @@ class TDECORE_EXPORT KShortcut
* @see MAX_SEQUENCES
* @since 3.2
*/
- bool append( const KShortcut& cut );
+ bool append( const TDEShortcut& cut );
/**
* Converts this shortcut to a key sequence. The first key sequence
@@ -824,7 +824,7 @@ class TDECORE_EXPORT KShortcut
/**
* @internal
*/
- TQString toStringInternal( const KShortcut* pcutDefault = 0 ) const;
+ TQString toStringInternal( const TDEShortcut* pcutDefault = 0 ) const;
/**
* Returns a null shortcut.
@@ -832,14 +832,14 @@ class TDECORE_EXPORT KShortcut
* @see isNull()
* @see clear()
*/
- static KShortcut& null();
+ static TDEShortcut& null();
protected:
uint m_nSeqs;
KKeySequence m_rgseq[MAX_SEQUENCES];
private:
- class KShortcutPrivate* d;
+ class TDEShortcutPrivate* d;
friend class KKeyNative;
#ifndef KDE_NO_COMPAT
diff --git a/tdecore/kshortcutlist.cpp b/tdecore/tdeshortcutlist.cpp
index 865bdc257..ffacd001c 100644
--- a/tdecore/kshortcutlist.cpp
+++ b/tdecore/tdeshortcutlist.cpp
@@ -1,34 +1,34 @@
#include <tqstring.h>
#include <tqvariant.h>
-#include <kaccel.h>
-#include "kaccelaction.h"
-#include <kconfig.h>
+#include <tdeaccel.h>
+#include "tdeaccelaction.h"
+#include <tdeconfig.h>
#include <kdebug.h>
-#include <kglobal.h>
+#include <tdeglobal.h>
#include <kglobalaccel.h>
#include <kinstance.h>
-#include <kshortcut.h>
-#include "kshortcutlist.h"
+#include <tdeshortcut.h>
+#include "tdeshortcutlist.h"
//---------------------------------------------------------------------
-// KShortcutList
+// TDEShortcutList
//---------------------------------------------------------------------
-KShortcutList::KShortcutList()
+TDEShortcutList::TDEShortcutList()
{
}
-KShortcutList::~KShortcutList()
+TDEShortcutList::~TDEShortcutList()
{
}
-bool KShortcutList::isGlobal( uint ) const
+bool TDEShortcutList::isGlobal( uint ) const
{
return false;
}
-int KShortcutList::index( const TQString& sName ) const
+int TDEShortcutList::index( const TQString& sName ) const
{
uint nSize = count();
for( uint i = 0;
@@ -39,7 +39,7 @@ int KShortcutList::index( const TQString& sName ) const
return -1;
}
-int KShortcutList::index( const KKeySequence& seq ) const
+int TDEShortcutList::index( const KKeySequence& seq ) const
{
if( seq.isNull() )
return -1;
@@ -53,26 +53,26 @@ int KShortcutList::index( const KKeySequence& seq ) const
return -1;
}
-const KInstance* KShortcutList::instance() const
+const TDEInstance* TDEShortcutList::instance() const
{
return 0;
}
-TQVariant KShortcutList::getOther( Other, uint ) const
+TQVariant TDEShortcutList::getOther( Other, uint ) const
{
return TQVariant();
}
-bool KShortcutList::setOther( Other, uint, TQVariant )
+bool TDEShortcutList::setOther( Other, uint, TQVariant )
{
return false;
}
-bool KShortcutList::readSettings( const TQString& sConfigGroup, KConfigBase* pConfig )
+bool TDEShortcutList::readSettings( const TQString& sConfigGroup, TDEConfigBase* pConfig )
{
- kdDebug(125) << "KShortcutList::readSettings( \"" << sConfigGroup << "\", " << pConfig << " ) start" << endl;
+ kdDebug(125) << "TDEShortcutList::readSettings( \"" << sConfigGroup << "\", " << pConfig << " ) start" << endl;
if( !pConfig )
- pConfig = KGlobal::config();
+ pConfig = TDEGlobal::config();
TQString sGroup = (!sConfigGroup.isEmpty()) ? sConfigGroup : TQString("Shortcuts");
// If the config file still has the old group name:
@@ -84,7 +84,7 @@ bool KShortcutList::readSettings( const TQString& sConfigGroup, KConfigBase* pCo
kdDebug(125) << "\treadSettings( \"" << sGroup << "\", " << pConfig << " )" << endl;
if( !pConfig->hasGroup( sGroup ) )
return true;
- KConfigGroupSaver cgs( pConfig, sGroup );
+ TDEConfigGroupSaver cgs( pConfig, sGroup );
uint nSize = count();
for( uint i = 0; i < nSize; i++ ) {
@@ -92,9 +92,9 @@ bool KShortcutList::readSettings( const TQString& sConfigGroup, KConfigBase* pCo
TQString sEntry = pConfig->readEntry( name(i) );
if( !sEntry.isEmpty() ) {
if( sEntry == "none" )
- setShortcut( i, KShortcut() );
+ setShortcut( i, TDEShortcut() );
else
- setShortcut( i, KShortcut(sEntry) );
+ setShortcut( i, TDEShortcut(sEntry) );
}
else // default shortcut
setShortcut( i, shortcutDefault(i) );
@@ -102,15 +102,15 @@ bool KShortcutList::readSettings( const TQString& sConfigGroup, KConfigBase* pCo
}
}
- kdDebug(125) << "KShortcutList::readSettings done" << endl;
+ kdDebug(125) << "TDEShortcutList::readSettings done" << endl;
return true;
}
-bool KShortcutList::writeSettings( const TQString &sConfigGroup, KConfigBase* pConfig, bool bWriteAll, bool bGlobal ) const
+bool TDEShortcutList::writeSettings( const TQString &sConfigGroup, TDEConfigBase* pConfig, bool bWriteAll, bool bGlobal ) const
{
- kdDebug(125) << "KShortcutList::writeSettings( " << sConfigGroup << ", " << pConfig << ", " << bWriteAll << ", " << bGlobal << " )" << endl;
+ kdDebug(125) << "TDEShortcutList::writeSettings( " << sConfigGroup << ", " << pConfig << ", " << bWriteAll << ", " << bGlobal << " )" << endl;
if( !pConfig )
- pConfig = KGlobal::config();
+ pConfig = TDEGlobal::config();
TQString sGroup = (!sConfigGroup.isEmpty()) ? sConfigGroup : TQString("Shortcuts");
@@ -118,7 +118,7 @@ bool KShortcutList::writeSettings( const TQString &sConfigGroup, KConfigBase* pC
if( pConfig->hasGroup( "Keys" ) )
pConfig->deleteGroup( "Keys", true );
- KConfigGroupSaver cs( pConfig, sGroup );
+ TDEConfigGroupSaver cs( pConfig, sGroup );
uint nSize = count();
for( uint i = 0; i < nSize; i++ ) {
@@ -149,72 +149,72 @@ bool KShortcutList::writeSettings( const TQString &sConfigGroup, KConfigBase* pC
}
//---------------------------------------------------------------------
-// KAccelShortcutList
+// TDEAccelShortcutList
//---------------------------------------------------------------------
-class KAccelShortcutListPrivate
+class TDEAccelShortcutListPrivate
{
public:
TQString m_configGroup;
};
-KAccelShortcutList::KAccelShortcutList( KAccel* pAccel )
+TDEAccelShortcutList::TDEAccelShortcutList( TDEAccel* pAccel )
: m_actions( pAccel->actions() )
{
- d=new KAccelShortcutListPrivate;
+ d=new TDEAccelShortcutListPrivate;
m_bGlobal = false;
d->m_configGroup=pAccel->configGroup();
}
-KAccelShortcutList::KAccelShortcutList( KGlobalAccel* pAccel )
+TDEAccelShortcutList::TDEAccelShortcutList( TDEGlobalAccel* pAccel )
: m_actions( pAccel->actions() )
{
- d=new KAccelShortcutListPrivate;
+ d=new TDEAccelShortcutListPrivate;
m_bGlobal = true;
d->m_configGroup=pAccel->configGroup();
}
-KAccelShortcutList::KAccelShortcutList( KAccelActions& actions, bool bGlobal )
+TDEAccelShortcutList::TDEAccelShortcutList( TDEAccelActions& actions, bool bGlobal )
: m_actions( actions )
{
- d=new KAccelShortcutListPrivate;
+ d=new TDEAccelShortcutListPrivate;
m_bGlobal = bGlobal;
}
-KAccelShortcutList::~KAccelShortcutList()
+TDEAccelShortcutList::~TDEAccelShortcutList()
{ delete d;}
-uint KAccelShortcutList::count() const
+uint TDEAccelShortcutList::count() const
{ return m_actions.count(); }
-TQString KAccelShortcutList::name( uint i ) const
+TQString TDEAccelShortcutList::name( uint i ) const
{ return m_actions.actionPtr(i)->name(); }
-TQString KAccelShortcutList::label( uint i ) const
+TQString TDEAccelShortcutList::label( uint i ) const
{ return m_actions.actionPtr(i)->label(); }
-TQString KAccelShortcutList::whatsThis( uint i ) const
+TQString TDEAccelShortcutList::whatsThis( uint i ) const
{ return m_actions.actionPtr(i)->whatsThis(); }
-const KShortcut& KAccelShortcutList::shortcut( uint i ) const
+const TDEShortcut& TDEAccelShortcutList::shortcut( uint i ) const
{ return m_actions.actionPtr(i)->shortcut(); }
-const KShortcut& KAccelShortcutList::shortcutDefault( uint i ) const
+const TDEShortcut& TDEAccelShortcutList::shortcutDefault( uint i ) const
{ return m_actions.actionPtr(i)->shortcutDefault(); }
-bool KAccelShortcutList::isConfigurable( uint i ) const
+bool TDEAccelShortcutList::isConfigurable( uint i ) const
{ return m_actions.actionPtr(i)->isConfigurable(); }
-bool KAccelShortcutList::setShortcut( uint i, const KShortcut& cut )
+bool TDEAccelShortcutList::setShortcut( uint i, const TDEShortcut& cut )
{ return m_actions.actionPtr(i)->setShortcut( cut ); }
-TQVariant KAccelShortcutList::getOther( Other, uint ) const
+TQVariant TDEAccelShortcutList::getOther( Other, uint ) const
{ return TQVariant(); }
-bool KAccelShortcutList::isGlobal( uint ) const
+bool TDEAccelShortcutList::isGlobal( uint ) const
{ return m_bGlobal; }
-bool KAccelShortcutList::setOther( Other, uint, TQVariant )
+bool TDEAccelShortcutList::setOther( Other, uint, TQVariant )
{ return false; }
-bool KAccelShortcutList::save() const
+bool TDEAccelShortcutList::save() const
{ return writeSettings( d->m_configGroup ); }
-void KShortcutList::virtual_hook( int, void* )
+void TDEShortcutList::virtual_hook( int, void* )
{ /*BASE::virtual_hook( id, data );*/ }
-void KAccelShortcutList::virtual_hook( int id, void* data )
-{ KShortcutList::virtual_hook( id, data ); }
+void TDEAccelShortcutList::virtual_hook( int id, void* data )
+{ TDEShortcutList::virtual_hook( id, data ); }
-void KStdAccel::ShortcutList::virtual_hook( int id, void* data )
-{ KShortcutList::virtual_hook( id, data ); }
+void TDEStdAccel::ShortcutList::virtual_hook( int id, void* data )
+{ TDEShortcutList::virtual_hook( id, data ); }
diff --git a/tdecore/kshortcutlist.h b/tdecore/tdeshortcutlist.h
index 7a1890c1c..99e83766b 100644
--- a/tdecore/kshortcutlist.h
+++ b/tdecore/tdeshortcutlist.h
@@ -25,34 +25,34 @@
#include "tdelibs_export.h"
class TQVariant;
-class KConfigBase;
-class KInstance;
+class TDEConfigBase;
+class TDEInstance;
class KKeySequence;
-class KShortcut;
+class TDEShortcut;
/**********************************************************************
* This is a wrapper class which allows a function to use one interface
-* to KActionCollection, KAccelActions, and KActionPtrList.
+* to TDEActionCollection, TDEAccelActions, and TDEActionPtrList.
**********************************************************************/
/**
- * KShortcutList is an abstract base class for
- * KAccelShortcutList and KStdAccel::ShortcutList. It gives
+ * TDEShortcutList is an abstract base class for
+ * TDEAccelShortcutList and TDEStdAccel::ShortcutList. It gives
* you an unified interface for accessing the accelerator lists
- * of KAccel (using KAccelShortcutList),
- * KGlobalAccel (using KAccelShortcutList), and
- * KStdAccel (using KStdAccel::ShortcutList).
+ * of TDEAccel (using TDEAccelShortcutList),
+ * TDEGlobalAccel (using TDEAccelShortcutList), and
+ * TDEStdAccel (using TDEStdAccel::ShortcutList).
*
* @short Base class for accessing accelerator lists
*/
-class TDECORE_EXPORT KShortcutList
+class TDECORE_EXPORT TDEShortcutList
{
public:
/**
* Default constructor.
*/
- KShortcutList();
- virtual ~KShortcutList();
+ TDEShortcutList();
+ virtual ~TDEShortcutList();
/**
* Returns the number of entries.
@@ -90,7 +90,7 @@ class TDECORE_EXPORT KShortcutList
* @return the shortcut
* @see shortcutDefault()
*/
- virtual const KShortcut& shortcut( uint index ) const = 0;
+ virtual const TDEShortcut& shortcut( uint index ) const = 0;
/**
* Returns default shortcut with the given @p index.
@@ -98,7 +98,7 @@ class TDECORE_EXPORT KShortcutList
* @return the default shortcut
* @see shortcut()
*/
- virtual const KShortcut& shortcutDefault( uint index ) const = 0;
+ virtual const TDEShortcut& shortcutDefault( uint index ) const = 0;
/**
* Checks whether the shortcut with the given @p index is configurable.
@@ -112,7 +112,7 @@ class TDECORE_EXPORT KShortcutList
* @param index the index of the shortcut (must be < count())
* @param shortcut the shortcut
*/
- virtual bool setShortcut( uint index, const KShortcut &shortcut ) = 0;
+ virtual bool setShortcut( uint index, const TDEShortcut &shortcut ) = 0;
/**
* Checks whether the shortcut with the given @p index is saved in the
@@ -137,10 +137,10 @@ class TDECORE_EXPORT KShortcutList
virtual int index( const KKeySequence& keySeq ) const;
/**
- * The KInstance.
- * @return the KInstance of the list, can be 0 if not available
+ * The TDEInstance.
+ * @return the TDEInstance of the list, can be 0 if not available
*/
- virtual const KInstance* instance() const;
+ virtual const TDEInstance* instance() const;
// These are here in order to handle expansion.
enum Other { };
@@ -162,7 +162,7 @@ class TDECORE_EXPORT KShortcutList
* @param pConfig the configuration file to load from
* @return true if successful, false otherwise
*/
- virtual bool readSettings( const TQString& sConfigGroup = TQString::null, KConfigBase* pConfig = 0 );
+ virtual bool readSettings( const TQString& sConfigGroup = TQString::null, TDEConfigBase* pConfig = 0 );
/**
* Writes the shortcuts to the given configuration file.
@@ -173,63 +173,63 @@ class TDECORE_EXPORT KShortcutList
* @param bGlobal true to write to the global configuration file
* @return true if successful, false otherwise
*/
- virtual bool writeSettings( const TQString& sConfigGroup = TQString::null, KConfigBase* pConfig = 0,
+ virtual bool writeSettings( const TQString& sConfigGroup = TQString::null, TDEConfigBase* pConfig = 0,
bool bWriteAll = false, bool bGlobal = false ) const;
protected:
/// used to extend the interface with virtuals without breaking binary compatibility
virtual void virtual_hook( int id, void* data );
private:
- class KShortcutListPrivate* d;
+ class TDEShortcutListPrivate* d;
};
//---------------------------------------------------------------------
-// KAccelShortcutList
+// TDEAccelShortcutList
//---------------------------------------------------------------------
-class KAccel;
-class KAccelActions;
-class KGlobalAccel;
+class TDEAccel;
+class TDEAccelActions;
+class TDEGlobalAccel;
/**
- * KShortcutList implementation to access KAccel and
- * KGlobalAccel lists.
+ * TDEShortcutList implementation to access TDEAccel and
+ * TDEGlobalAccel lists.
*/
-class TDECORE_EXPORT KAccelShortcutList : public KShortcutList
+class TDECORE_EXPORT TDEAccelShortcutList : public TDEShortcutList
{
public:
/**
- * Creates a new KShortcutList that accesses the given KAccel.
+ * Creates a new TDEShortcutList that accesses the given TDEAccel.
* @param accel the accelerators to access
*/
- KAccelShortcutList( KAccel* accel );
+ TDEAccelShortcutList( TDEAccel* accel );
/**
- * Creates a new KShortcutList that accesses the given
- * KGlobalAccel.
+ * Creates a new TDEShortcutList that accesses the given
+ * TDEGlobalAccel.
* @param accel the accelerators to access
*/
- KAccelShortcutList( KGlobalAccel* accel );
+ TDEAccelShortcutList( TDEGlobalAccel* accel );
/**
* @internal
- * Creates a new KShortcutList that accesses the given
- * KAccelActions collection.
+ * Creates a new TDEShortcutList that accesses the given
+ * TDEAccelActions collection.
* @param actions the actions to access
* @param bGlobal true to save the actions in the global
* configuration file
*/
- KAccelShortcutList( KAccelActions &actions, bool bGlobal );
- virtual ~KAccelShortcutList();
+ TDEAccelShortcutList( TDEAccelActions &actions, bool bGlobal );
+ virtual ~TDEAccelShortcutList();
virtual uint count() const;
virtual TQString name( uint index ) const;
virtual TQString label( uint index ) const;
virtual TQString whatsThis( uint index ) const;
- virtual const KShortcut& shortcut( uint index ) const;
- virtual const KShortcut& shortcutDefault( uint index ) const;
+ virtual const TDEShortcut& shortcut( uint index ) const;
+ virtual const TDEShortcut& shortcutDefault( uint index ) const;
virtual bool isConfigurable( uint index ) const;
- virtual bool setShortcut( uint index , const KShortcut& shortcut );
+ virtual bool setShortcut( uint index , const TDEShortcut& shortcut );
virtual bool isGlobal( uint index ) const;
/** \internal */
@@ -241,26 +241,26 @@ class TDECORE_EXPORT KAccelShortcutList : public KShortcutList
protected:
/** Actions (collection) for this shortcut list. Set by constructor. */
- KAccelActions& m_actions;
+ TDEAccelActions& m_actions;
/** Is this shortcut list global? Access through isGlobal() */
bool m_bGlobal;
protected:
virtual void virtual_hook( int id, void* data );
private:
- class KAccelShortcutListPrivate* d;
+ class TDEAccelShortcutListPrivate* d;
};
-namespace KStdAccel {
+namespace TDEStdAccel {
//---------------------------------------------------------------------
// ShortcutList
//---------------------------------------------------------------------
/**
- * KShortcutList implementation that accesses KStdAccel
+ * TDEShortcutList implementation that accesses TDEStdAccel
* actions.
*/
-class TDECORE_EXPORT ShortcutList : public KShortcutList
+class TDECORE_EXPORT ShortcutList : public TDEShortcutList
{
public:
/**
@@ -273,10 +273,10 @@ class TDECORE_EXPORT ShortcutList : public KShortcutList
virtual TQString name( uint index ) const;
virtual TQString label( uint index ) const;
virtual TQString whatsThis( uint index ) const;
- virtual const KShortcut& shortcut( uint index ) const;
- virtual const KShortcut& shortcutDefault( uint index ) const;
+ virtual const TDEShortcut& shortcut( uint index ) const;
+ virtual const TDEShortcut& shortcutDefault( uint index ) const;
virtual bool isConfigurable( uint index ) const;
- virtual bool setShortcut( uint index , const KShortcut& shortcut );
+ virtual bool setShortcut( uint index , const TDEShortcut& shortcut );
/** \internal */
virtual TQVariant getOther( Other, uint index ) const;
diff --git a/tdecore/kshortcutmenu.cpp b/tdecore/tdeshortcutmenu.cpp
index 3df389f07..c035c0df9 100644
--- a/tdecore/kshortcutmenu.cpp
+++ b/tdecore/tdeshortcutmenu.cpp
@@ -21,20 +21,20 @@
#include <tqlabel.h>
#include <tqpopupmenu.h>
-#include "kaccelaction.h"
+#include "tdeaccelaction.h"
#include <kdebug.h>
-#include <kglobalsettings.h>
-#include "kshortcutmenu.h"
+#include <tdeglobalsettings.h>
+#include "tdeshortcutmenu.h"
//#include <kkeynative.h>
-KShortcutMenu::KShortcutMenu( TQWidget* pParent, KAccelActions* pActions, KKeySequence seq )
+TDEShortcutMenu::TDEShortcutMenu( TQWidget* pParent, TDEAccelActions* pActions, KKeySequence seq )
: TQPopupMenu( pParent ),
m_pActions( pActions ),
m_seq( seq )
{
kdDebug() << seq.toStringInternal() << endl;
- TQFont fontTitle = KGlobalSettings::menuFont();
+ TQFont fontTitle = TDEGlobalSettings::menuFont();
fontTitle.setBold( true );
pTitle = new TQLabel( "", (TQWidget*)0 );
@@ -44,9 +44,9 @@ KShortcutMenu::KShortcutMenu( TQWidget* pParent, KAccelActions* pActions, KKeySe
insertItem( pTitle );
}
-bool KShortcutMenu::insertAction( uint iAction, KKeySequence seq )
+bool TDEShortcutMenu::insertAction( uint iAction, KKeySequence seq )
{
- KAccelAction* pAction = m_pActions->actionPtr( iAction );
+ TDEAccelAction* pAction = m_pActions->actionPtr( iAction );
if( pAction ) {
insertItem( "", iAction );
@@ -57,14 +57,14 @@ bool KShortcutMenu::insertAction( uint iAction, KKeySequence seq )
}
-void KShortcutMenu::updateShortcuts()
+void TDEShortcutMenu::updateShortcuts()
{
pTitle->setText( m_seq.toString() + ",..." );
for( uint iItem = 1; iItem < count(); iItem++ ) {
int iAction = idAt( iItem );
if( iAction >= 0 ) {
- KAccelAction* pAction = m_pActions->actionPtr( iAction );
+ TDEAccelAction* pAction = m_pActions->actionPtr( iAction );
if( pAction ) {
KKeySequence seq = m_seqs[iItem];
TQString sSeq = seq.key(m_seq.count()).toString();
@@ -78,7 +78,7 @@ void KShortcutMenu::updateShortcuts()
}
}
-void KShortcutMenu::keyPressEvent( TQKeyEvent* pEvent )
+void TDEShortcutMenu::keyPressEvent( TQKeyEvent* pEvent )
{
kdDebug() << "keypress; " << pEvent->key() << endl;
KKey key( pEvent );
@@ -117,7 +117,7 @@ void KShortcutMenu::keyPressEvent( TQKeyEvent* pEvent )
}
}
-int KShortcutMenu::searchForKey( KKey key )
+int TDEShortcutMenu::searchForKey( KKey key )
{
int iItemFound = -1; // -1 indicates no match
uint iKey = m_seq.count();
@@ -138,7 +138,7 @@ int KShortcutMenu::searchForKey( KKey key )
return iItemFound;
}
-void KShortcutMenu::keepItemsMatching( KKey key )
+void TDEShortcutMenu::keepItemsMatching( KKey key )
{
kdDebug(125) << "MyAccel::keepItemsMatching( " << key.toStringInternal() << " )" << endl;
@@ -158,4 +158,4 @@ void KShortcutMenu::keepItemsMatching( KKey key )
updateShortcuts();
}
-#include "kshortcutmenu.moc"
+#include "tdeshortcutmenu.moc"
diff --git a/tdecore/kshortcutmenu.h b/tdecore/tdeshortcutmenu.h
index 2c682342d..a62757316 100644
--- a/tdecore/kshortcutmenu.h
+++ b/tdecore/tdeshortcutmenu.h
@@ -23,20 +23,20 @@
#include <tqmap.h>
#include <tqpopupmenu.h>
-#include "kshortcut.h"
+#include "tdeshortcut.h"
class TQLabel;
-class KAccelActions;
+class TDEAccelActions;
/**
* @internal
*/
-class TDECORE_EXPORT KShortcutMenu : public TQPopupMenu
+class TDECORE_EXPORT TDEShortcutMenu : public TQPopupMenu
{
Q_OBJECT
public:
- KShortcutMenu( TQWidget* pParent, KAccelActions* pActions, KKeySequence seq );
+ TDEShortcutMenu( TQWidget* pParent, TDEAccelActions* pActions, KKeySequence seq );
bool insertAction( uint iAction, KKeySequence seq );
@@ -52,7 +52,7 @@ class TDECORE_EXPORT KShortcutMenu : public TQPopupMenu
private:
typedef TQMap<uint, KKeySequence> IndexToKKeySequence;
- KAccelActions* m_pActions;
+ TDEAccelActions* m_pActions;
KKeySequence m_seq;
TQLabel* pTitle;
IndexToKKeySequence m_seqs;
diff --git a/tdecore/kstartupinfo.cpp b/tdecore/tdestartupinfo.cpp
index 1cb8ce345..3d798cdc1 100644
--- a/tdecore/kstartupinfo.cpp
+++ b/tdecore/tdestartupinfo.cpp
@@ -27,7 +27,7 @@ DEALINGS IN THE SOFTWARE.
// kdDebug() can't be turned off in tdeinit
#if 0
#define KSTARTUPINFO_ALL_DEBUG
-#warning Extra KStartupInfo debug messages enabled.
+#warning Extra TDEStartupInfo debug messages enabled.
#endif
#include <tqwidget.h>
@@ -45,7 +45,7 @@ DEALINGS IN THE SOFTWARE.
#define QT_CLEAN_NAMESPACE
#endif
-#include "kstartupinfo.h"
+#include "tdestartupinfo.h"
#include <unistd.h>
#include <sys/time.h>
@@ -55,7 +55,7 @@ DEALINGS IN THE SOFTWARE.
#include <netwm.h>
#endif
#include <kdebug.h>
-#include <kapplication.h>
+#include <tdeapplication.h>
#include <signal.h>
#ifdef Q_WS_X11
#include <twinmodule.h>
@@ -80,31 +80,31 @@ static TQString escape_str( const TQString& str_P );
static Atom utf8_string_atom = None;
-class KStartupInfo::Data
- : public KStartupInfoData
+class TDEStartupInfo::Data
+ : public TDEStartupInfoData
{
public:
- Data() : KStartupInfoData(), age(0) {} // just because it's in a QMap
+ Data() : TDEStartupInfoData(), age(0) {} // just because it's in a QMap
Data( const TQString& txt_P )
- : KStartupInfoData( txt_P ), age( 0 ) {}
+ : TDEStartupInfoData( txt_P ), age( 0 ) {}
unsigned int age;
};
-struct KStartupInfoPrivate
+struct TDEStartupInfoPrivate
{
public:
- TQMap< KStartupInfoId, KStartupInfo::Data > startups;
+ TQMap< TDEStartupInfoId, TDEStartupInfo::Data > startups;
// contains silenced ASN's only if !AnnounceSilencedChanges
- TQMap< KStartupInfoId, KStartupInfo::Data > silent_startups;
+ TQMap< TDEStartupInfoId, TDEStartupInfo::Data > silent_startups;
// contains ASN's that had change: but no new: yet
- TQMap< KStartupInfoId, KStartupInfo::Data > uninited_startups;
+ TQMap< TDEStartupInfoId, TDEStartupInfo::Data > uninited_startups;
#ifdef Q_WS_X11
KWinModule* wm_module;
KXMessages msgs;
#endif
TQTimer* cleanup;
int flags;
- KStartupInfoPrivate( int flags_P )
+ TDEStartupInfoPrivate( int flags_P )
:
#ifdef Q_WS_X11
msgs( NET_STARTUP_MSG, NULL, false ),
@@ -112,29 +112,29 @@ struct KStartupInfoPrivate
flags( flags_P ) {}
};
-KStartupInfo::KStartupInfo( int flags_P, TQObject* parent_P, const char* name_P )
+TDEStartupInfo::TDEStartupInfo( int flags_P, TQObject* parent_P, const char* name_P )
: TQObject( parent_P, name_P ),
timeout( 60 ), d( NULL )
{
init( flags_P );
}
-KStartupInfo::KStartupInfo( bool clean_on_cantdetect_P, TQObject* parent_P, const char* name_P )
+TDEStartupInfo::TDEStartupInfo( bool clean_on_cantdetect_P, TQObject* parent_P, const char* name_P )
: TQObject( parent_P, name_P ),
timeout( 60 ), d( NULL )
{
init( clean_on_cantdetect_P ? CleanOnCantDetect : 0 );
}
-void KStartupInfo::init( int flags_P )
+void TDEStartupInfo::init( int flags_P )
{
// d == NULL means "disabled"
- if( !KApplication::kApplication())
+ if( !TDEApplication::kApplication())
return;
- if( !KApplication::kApplication()->getDisplay())
+ if( !TDEApplication::kApplication()->getDisplay())
return;
- d = new KStartupInfoPrivate( flags_P );
+ d = new TDEStartupInfoPrivate( flags_P );
#ifdef Q_WS_X11
if( !( d->flags & DisableKWinModule ))
{
@@ -150,12 +150,12 @@ void KStartupInfo::init( int flags_P )
connect( d->cleanup, TQT_SIGNAL( timeout()), TQT_SLOT( startups_cleanup()));
}
-KStartupInfo::~KStartupInfo()
+TDEStartupInfo::~TDEStartupInfo()
{
delete d;
}
-void KStartupInfo::got_message( const TQString& msg_P )
+void TDEStartupInfo::got_message( const TQString& msg_P )
{
// TODO do something with SCREEN= ?
kdDebug( 172 ) << "got:" << msg_P << endl;
@@ -171,7 +171,7 @@ void KStartupInfo::got_message( const TQString& msg_P )
// if the application stops responding for a while, KWinModule may get
// the information about the already mapped window before KXMessages
// actually gets the info about the started application (depends
-// on their order in X11 event filter in KApplication)
+// on their order in X11 event filter in TDEApplication)
// simply delay info from KWinModule a bit
// SELI???
namespace
@@ -186,12 +186,12 @@ class DelayedWindowEvent
};
}
-void KStartupInfo::slot_window_added( WId w_P )
+void TDEStartupInfo::slot_window_added( WId w_P )
{
kapp->postEvent( this, new DelayedWindowEvent( w_P ));
}
-void KStartupInfo::customEvent( TQCustomEvent* e_P )
+void TDEStartupInfo::customEvent( TQCustomEvent* e_P )
{
if( e_P->type() == TQEvent::User + 15 )
window_added( static_cast< DelayedWindowEvent* >( e_P )->w );
@@ -199,10 +199,10 @@ void KStartupInfo::customEvent( TQCustomEvent* e_P )
TQObject::customEvent( e_P );
}
-void KStartupInfo::window_added( WId w_P )
+void TDEStartupInfo::window_added( WId w_P )
{
- KStartupInfoId id;
- KStartupInfoData data;
+ TDEStartupInfoId id;
+ TDEStartupInfoData data;
startup_t ret = check_startup_internal( w_P, &id, &data );
switch( ret )
{
@@ -218,16 +218,16 @@ void KStartupInfo::window_added( WId w_P )
}
}
-void KStartupInfo::got_startup_info( const TQString& msg_P, bool update_P )
+void TDEStartupInfo::got_startup_info( const TQString& msg_P, bool update_P )
{
- KStartupInfoId id( msg_P );
+ TDEStartupInfoId id( msg_P );
if( id.none())
return;
- KStartupInfo::Data data( msg_P );
+ TDEStartupInfo::Data data( msg_P );
new_startup_info_internal( id, data, update_P );
}
-void KStartupInfo::new_startup_info_internal( const KStartupInfoId& id_P,
+void TDEStartupInfo::new_startup_info_internal( const TDEStartupInfoId& id_P,
Data& data_P, bool update_P )
{
if( d == NULL )
@@ -298,10 +298,10 @@ void KStartupInfo::new_startup_info_internal( const KStartupInfoId& id_P,
d->cleanup->start( 1000 ); // 1 sec
}
-void KStartupInfo::got_remove_startup_info( const TQString& msg_P )
+void TDEStartupInfo::got_remove_startup_info( const TQString& msg_P )
{
- KStartupInfoId id( msg_P );
- KStartupInfoData data( msg_P );
+ TDEStartupInfoId id( msg_P );
+ TDEStartupInfoData data( msg_P );
if( data.pids().count() > 0 )
{
if( !id.none())
@@ -313,7 +313,7 @@ void KStartupInfo::got_remove_startup_info( const TQString& msg_P )
remove_startup_info_internal( id );
}
-void KStartupInfo::remove_startup_info_internal( const KStartupInfoId& id_P )
+void TDEStartupInfo::remove_startup_info_internal( const TDEStartupInfoId& id_P )
{
if( d == NULL )
return;
@@ -336,11 +336,11 @@ void KStartupInfo::remove_startup_info_internal( const KStartupInfoId& id_P )
return;
}
-void KStartupInfo::remove_startup_pids( const KStartupInfoData& data_P )
+void TDEStartupInfo::remove_startup_pids( const TDEStartupInfoData& data_P )
{ // first find the matching info
if( d == NULL )
return;
- for( TQMap< KStartupInfoId, Data >::Iterator it = d->startups.begin();
+ for( TQMap< TDEStartupInfoId, Data >::Iterator it = d->startups.begin();
it != d->startups.end();
++it )
{
@@ -353,8 +353,8 @@ void KStartupInfo::remove_startup_pids( const KStartupInfoData& data_P )
}
}
-void KStartupInfo::remove_startup_pids( const KStartupInfoId& id_P,
- const KStartupInfoData& data_P )
+void TDEStartupInfo::remove_startup_pids( const TDEStartupInfoId& id_P,
+ const TDEStartupInfoData& data_P )
{
if( d == NULL )
return;
@@ -376,7 +376,7 @@ void KStartupInfo::remove_startup_pids( const KStartupInfoId& id_P,
remove_startup_info_internal( id_P );
}
-bool KStartupInfo::sendStartup( const KStartupInfoId& id_P, const KStartupInfoData& data_P )
+bool TDEStartupInfo::sendStartup( const TDEStartupInfoId& id_P, const TDEStartupInfoData& data_P )
{
if( id_P.none())
return false;
@@ -389,8 +389,8 @@ bool KStartupInfo::sendStartup( const KStartupInfoId& id_P, const KStartupInfoDa
return true;
}
-bool KStartupInfo::sendStartupX( Display* disp_P, const KStartupInfoId& id_P,
- const KStartupInfoData& data_P )
+bool TDEStartupInfo::sendStartupX( Display* disp_P, const TDEStartupInfoId& id_P,
+ const TDEStartupInfoData& data_P )
{
if( id_P.none())
return false;
@@ -403,7 +403,7 @@ bool KStartupInfo::sendStartupX( Display* disp_P, const KStartupInfoId& id_P,
return KXMessages::broadcastMessageX( disp_P, NET_STARTUP_MSG, msg, -1, false );
}
-TQString KStartupInfo::check_required_startup_fields( const TQString& msg, const KStartupInfoData& data_P,
+TQString TDEStartupInfo::check_required_startup_fields( const TQString& msg, const TDEStartupInfoData& data_P,
int screen )
{
TQString ret = msg;
@@ -420,7 +420,7 @@ TQString KStartupInfo::check_required_startup_fields( const TQString& msg, const
return ret;
}
-bool KStartupInfo::sendChange( const KStartupInfoId& id_P, const KStartupInfoData& data_P )
+bool TDEStartupInfo::sendChange( const TDEStartupInfoId& id_P, const TDEStartupInfoData& data_P )
{
if( id_P.none())
return false;
@@ -432,8 +432,8 @@ bool KStartupInfo::sendChange( const KStartupInfoId& id_P, const KStartupInfoDat
return true;
}
-bool KStartupInfo::sendChangeX( Display* disp_P, const KStartupInfoId& id_P,
- const KStartupInfoData& data_P )
+bool TDEStartupInfo::sendChangeX( Display* disp_P, const TDEStartupInfoId& id_P,
+ const TDEStartupInfoData& data_P )
{
if( id_P.none())
return false;
@@ -445,7 +445,7 @@ bool KStartupInfo::sendChangeX( Display* disp_P, const KStartupInfoId& id_P,
return KXMessages::broadcastMessageX( disp_P, NET_STARTUP_MSG, msg, -1, false );
}
-bool KStartupInfo::sendFinish( const KStartupInfoId& id_P )
+bool TDEStartupInfo::sendFinish( const TDEStartupInfoId& id_P )
{
if( id_P.none())
return false;
@@ -456,7 +456,7 @@ bool KStartupInfo::sendFinish( const KStartupInfoId& id_P )
return true;
}
-bool KStartupInfo::sendFinishX( Display* disp_P, const KStartupInfoId& id_P )
+bool TDEStartupInfo::sendFinishX( Display* disp_P, const TDEStartupInfoId& id_P )
{
if( id_P.none())
return false;
@@ -467,7 +467,7 @@ bool KStartupInfo::sendFinishX( Display* disp_P, const KStartupInfoId& id_P )
return KXMessages::broadcastMessageX( disp_P, NET_STARTUP_MSG, msg, -1, false );
}
-bool KStartupInfo::sendFinish( const KStartupInfoId& id_P, const KStartupInfoData& data_P )
+bool TDEStartupInfo::sendFinish( const TDEStartupInfoId& id_P, const TDEStartupInfoData& data_P )
{
// if( id_P.none()) // id may be none, the pids and hostname matter then
// return false;
@@ -479,8 +479,8 @@ bool KStartupInfo::sendFinish( const KStartupInfoId& id_P, const KStartupInfoDat
return true;
}
-bool KStartupInfo::sendFinishX( Display* disp_P, const KStartupInfoId& id_P,
- const KStartupInfoData& data_P )
+bool TDEStartupInfo::sendFinishX( Display* disp_P, const TDEStartupInfoId& id_P,
+ const TDEStartupInfoData& data_P )
{
// if( id_P.none()) // id may be none, the pids and hostname matter then
// return false;
@@ -492,58 +492,58 @@ bool KStartupInfo::sendFinishX( Display* disp_P, const KStartupInfoId& id_P,
return KXMessages::broadcastMessageX( disp_P, NET_STARTUP_MSG, msg, -1, false );
}
-void KStartupInfo::appStarted()
+void TDEStartupInfo::appStarted()
{
- if( kapp != NULL ) // KApplication constructor unsets the env. variable
+ if( kapp != NULL ) // TDEApplication constructor unsets the env. variable
appStarted( kapp->startupId());
else
- appStarted( KStartupInfo::currentStartupIdEnv().id());
+ appStarted( TDEStartupInfo::currentStartupIdEnv().id());
}
-void KStartupInfo::appStarted( const TQCString& startup_id )
+void TDEStartupInfo::appStarted( const TQCString& startup_id )
{
- KStartupInfoId id;
+ TDEStartupInfoId id;
id.initId( startup_id );
if( id.none())
return;
if( kapp != NULL )
- KStartupInfo::sendFinish( id );
+ TDEStartupInfo::sendFinish( id );
else if( getenv( "DISPLAY" ) != NULL ) // don't rely on tqt_xdisplay()
{
#ifdef Q_WS_X11
Display* disp = XOpenDisplay( NULL );
if( disp != NULL )
{
- KStartupInfo::sendFinishX( disp, id );
+ TDEStartupInfo::sendFinishX( disp, id );
XCloseDisplay( disp );
}
#endif
}
}
-void KStartupInfo::disableAutoAppStartedSending( bool disable )
+void TDEStartupInfo::disableAutoAppStartedSending( bool disable )
{
auto_app_started_sending = !disable;
}
-void KStartupInfo::silenceStartup( bool silence )
+void TDEStartupInfo::silenceStartup( bool silence )
{
- KStartupInfoId id;
+ TDEStartupInfoId id;
id.initId( kapp->startupId());
if( id.none())
return;
- KStartupInfoData data;
- data.setSilent( silence ? KStartupInfoData::Yes : KStartupInfoData::No );
+ TDEStartupInfoData data;
+ data.setSilent( silence ? TDEStartupInfoData::Yes : TDEStartupInfoData::No );
sendChange( id, data );
}
-void KStartupInfo::handleAutoAppStartedSending()
+void TDEStartupInfo::handleAutoAppStartedSending()
{
if( auto_app_started_sending )
appStarted();
}
-void KStartupInfo::setNewStartupId( TQWidget* window, const TQCString& startup_id )
+void TDEStartupInfo::setNewStartupId( TQWidget* window, const TQCString& startup_id )
{
bool activate = true;
kapp->setStartupId( startup_id );
@@ -554,7 +554,7 @@ void KStartupInfo::setNewStartupId( TQWidget* window, const TQCString& startup_i
NETRootInfo i( tqt_xdisplay(), NET::Supported );
if( i.isSupported( NET::WM2StartupId ))
{
- KStartupInfo::setWindowStartupId( window->winId(), startup_id );
+ TDEStartupInfo::setWindowStartupId( window->winId(), startup_id );
activate = false; // WM will take care of it
}
}
@@ -568,32 +568,32 @@ void KStartupInfo::setNewStartupId( TQWidget* window, const TQCString& startup_i
KWin::forceActiveWindow( window->winId());
}
}
- KStartupInfo::handleAutoAppStartedSending();
+ TDEStartupInfo::handleAutoAppStartedSending();
}
-KStartupInfo::startup_t KStartupInfo::checkStartup( WId w_P, KStartupInfoId& id_O,
- KStartupInfoData& data_O )
+TDEStartupInfo::startup_t TDEStartupInfo::checkStartup( WId w_P, TDEStartupInfoId& id_O,
+ TDEStartupInfoData& data_O )
{
return check_startup_internal( w_P, &id_O, &data_O );
}
-KStartupInfo::startup_t KStartupInfo::checkStartup( WId w_P, KStartupInfoId& id_O )
+TDEStartupInfo::startup_t TDEStartupInfo::checkStartup( WId w_P, TDEStartupInfoId& id_O )
{
return check_startup_internal( w_P, &id_O, NULL );
}
-KStartupInfo::startup_t KStartupInfo::checkStartup( WId w_P, KStartupInfoData& data_O )
+TDEStartupInfo::startup_t TDEStartupInfo::checkStartup( WId w_P, TDEStartupInfoData& data_O )
{
return check_startup_internal( w_P, NULL, &data_O );
}
-KStartupInfo::startup_t KStartupInfo::checkStartup( WId w_P )
+TDEStartupInfo::startup_t TDEStartupInfo::checkStartup( WId w_P )
{
return check_startup_internal( w_P, NULL, NULL );
}
-KStartupInfo::startup_t KStartupInfo::check_startup_internal( WId w_P, KStartupInfoId* id_O,
- KStartupInfoData* data_O )
+TDEStartupInfo::startup_t TDEStartupInfo::check_startup_internal( WId w_P, TDEStartupInfoId* id_O,
+ TDEStartupInfoData* data_O )
{
if( d == NULL )
return NoMatch;
@@ -661,13 +661,13 @@ KStartupInfo::startup_t KStartupInfo::check_startup_internal( WId w_P, KStartupI
return CantDetect;
}
-bool KStartupInfo::find_id( const TQCString& id_P, KStartupInfoId* id_O,
- KStartupInfoData* data_O )
+bool TDEStartupInfo::find_id( const TQCString& id_P, TDEStartupInfoId* id_O,
+ TDEStartupInfoData* data_O )
{
if( d == NULL )
return false;
kdDebug( 172 ) << "find_id:" << id_P << endl;
- KStartupInfoId id;
+ TDEStartupInfoId id;
id.initId( id_P );
if( d->startups.contains( id ))
{
@@ -681,13 +681,13 @@ bool KStartupInfo::find_id( const TQCString& id_P, KStartupInfoId* id_O,
return false;
}
-bool KStartupInfo::find_pid( pid_t pid_P, const TQCString& hostname_P,
- KStartupInfoId* id_O, KStartupInfoData* data_O )
+bool TDEStartupInfo::find_pid( pid_t pid_P, const TQCString& hostname_P,
+ TDEStartupInfoId* id_O, TDEStartupInfoData* data_O )
{
if( d == NULL )
return false;
kdDebug( 172 ) << "find_pid:" << pid_P << endl;
- for( TQMap< KStartupInfoId, Data >::Iterator it = d->startups.begin();
+ for( TQMap< TDEStartupInfoId, Data >::Iterator it = d->startups.begin();
it != d->startups.end();
++it )
{
@@ -706,15 +706,15 @@ bool KStartupInfo::find_pid( pid_t pid_P, const TQCString& hostname_P,
return false;
}
-bool KStartupInfo::find_wclass( TQCString res_name, TQCString res_class,
- KStartupInfoId* id_O, KStartupInfoData* data_O )
+bool TDEStartupInfo::find_wclass( TQCString res_name, TQCString res_class,
+ TDEStartupInfoId* id_O, TDEStartupInfoData* data_O )
{
if( d == NULL )
return false;
res_name = res_name.lower();
res_class = res_class.lower();
kdDebug( 172 ) << "find_wclass:" << res_name << ":" << res_class << endl;
- for( TQMap< KStartupInfoId, Data >::Iterator it = d->startups.begin();
+ for( TQMap< TDEStartupInfoId, Data >::Iterator it = d->startups.begin();
it != d->startups.end();
++it )
{
@@ -758,7 +758,7 @@ static TQCString read_startup_id_property( WId w_P )
#endif
-TQCString KStartupInfo::windowStartupId( WId w_P )
+TQCString TDEStartupInfo::windowStartupId( WId w_P )
{
#ifdef Q_WS_X11
if( net_startup_atom == None )
@@ -780,7 +780,7 @@ TQCString KStartupInfo::windowStartupId( WId w_P )
#endif
}
-void KStartupInfo::setWindowStartupId( WId w_P, const TQCString& id_P )
+void TDEStartupInfo::setWindowStartupId( WId w_P, const TQCString& id_P )
{
#ifdef Q_WS_X11
if( id_P.isNull())
@@ -794,7 +794,7 @@ void KStartupInfo::setWindowStartupId( WId w_P, const TQCString& id_P )
#endif
}
-TQCString KStartupInfo::get_window_hostname( WId w_P )
+TQCString TDEStartupInfo::get_window_hostname( WId w_P )
{
#ifdef Q_WS_X11
XTextProperty tp;
@@ -816,19 +816,19 @@ TQCString KStartupInfo::get_window_hostname( WId w_P )
return TQCString();
}
-void KStartupInfo::setTimeout( unsigned int secs_P )
+void TDEStartupInfo::setTimeout( unsigned int secs_P )
{
timeout = secs_P;
// schedule removing entries that are older than the new timeout
TQTimer::singleShot( 0, this, TQT_SLOT( startups_cleanup_no_age()));
}
-void KStartupInfo::startups_cleanup_no_age()
+void TDEStartupInfo::startups_cleanup_no_age()
{
startups_cleanup_internal( false );
}
-void KStartupInfo::startups_cleanup()
+void TDEStartupInfo::startups_cleanup()
{
if( d == NULL )
return;
@@ -841,11 +841,11 @@ void KStartupInfo::startups_cleanup()
startups_cleanup_internal( true );
}
-void KStartupInfo::startups_cleanup_internal( bool age_P )
+void TDEStartupInfo::startups_cleanup_internal( bool age_P )
{
if( d == NULL )
return;
- for( TQMap< KStartupInfoId, Data >::Iterator it = d->startups.begin();
+ for( TQMap< TDEStartupInfoId, Data >::Iterator it = d->startups.begin();
it != d->startups.end();
)
{
@@ -856,7 +856,7 @@ void KStartupInfo::startups_cleanup_internal( bool age_P )
tout *= 20;
if( ( *it ).age >= tout )
{
- const KStartupInfoId& key = it.key();
+ const TDEStartupInfoId& key = it.key();
++it;
kdDebug( 172 ) << "startups entry timeout:" << key.id() << endl;
remove_startup_info_internal( key );
@@ -864,7 +864,7 @@ void KStartupInfo::startups_cleanup_internal( bool age_P )
else
++it;
}
- for( TQMap< KStartupInfoId, Data >::Iterator it = d->silent_startups.begin();
+ for( TQMap< TDEStartupInfoId, Data >::Iterator it = d->silent_startups.begin();
it != d->silent_startups.end();
)
{
@@ -875,7 +875,7 @@ void KStartupInfo::startups_cleanup_internal( bool age_P )
tout *= 20;
if( ( *it ).age >= tout )
{
- const KStartupInfoId& key = it.key();
+ const TDEStartupInfoId& key = it.key();
++it;
kdDebug( 172 ) << "silent entry timeout:" << key.id() << endl;
remove_startup_info_internal( key );
@@ -883,7 +883,7 @@ void KStartupInfo::startups_cleanup_internal( bool age_P )
else
++it;
}
- for( TQMap< KStartupInfoId, Data >::Iterator it = d->uninited_startups.begin();
+ for( TQMap< TDEStartupInfoId, Data >::Iterator it = d->uninited_startups.begin();
it != d->uninited_startups.end();
)
{
@@ -894,7 +894,7 @@ void KStartupInfo::startups_cleanup_internal( bool age_P )
tout *= 20;
if( ( *it ).age >= tout )
{
- const KStartupInfoId& key = it.key();
+ const TDEStartupInfoId& key = it.key();
++it;
kdDebug( 172 ) << "uninited entry timeout:" << key.id() << endl;
remove_startup_info_internal( key );
@@ -904,11 +904,11 @@ void KStartupInfo::startups_cleanup_internal( bool age_P )
}
}
-void KStartupInfo::clean_all_noncompliant()
+void TDEStartupInfo::clean_all_noncompliant()
{
if( d == NULL )
return;
- for( TQMap< KStartupInfoId, Data >::Iterator it = d->startups.begin();
+ for( TQMap< TDEStartupInfoId, Data >::Iterator it = d->startups.begin();
it != d->startups.end();
)
{
@@ -917,14 +917,14 @@ void KStartupInfo::clean_all_noncompliant()
++it;
continue;
}
- const KStartupInfoId& key = it.key();
+ const TDEStartupInfoId& key = it.key();
++it;
kdDebug( 172 ) << "entry cleaning:" << key.id() << endl;
remove_startup_info_internal( key );
}
}
-TQCString KStartupInfo::createNewStartupId()
+TQCString TDEStartupInfo::createNewStartupId()
{
// Assign a unique id, use hostname+time+pid, that should be 200% unique.
// Also append the user timestamp (for focus stealing prevention).
@@ -941,26 +941,26 @@ TQCString KStartupInfo::createNewStartupId()
}
-struct KStartupInfoIdPrivate
+struct TDEStartupInfoIdPrivate
{
- KStartupInfoIdPrivate() : id( "" ) {}
+ TDEStartupInfoIdPrivate() : id( "" ) {}
TQCString id; // id
};
-const TQCString& KStartupInfoId::id() const
+const TQCString& TDEStartupInfoId::id() const
{
return d->id;
}
-TQString KStartupInfoId::to_text() const
+TQString TDEStartupInfoId::to_text() const
{
return TQString::fromLatin1( " ID=\"%1\" " ).arg( escape_str( id()));
}
-KStartupInfoId::KStartupInfoId( const TQString& txt_P )
+TDEStartupInfoId::TDEStartupInfoId( const TQString& txt_P )
{
- d = new KStartupInfoIdPrivate;
+ d = new TDEStartupInfoIdPrivate;
TQStringList items = get_fields( txt_P );
const TQString id_str = TQString::fromLatin1( "ID=" );
for( TQStringList::Iterator it = items.begin();
@@ -972,7 +972,7 @@ KStartupInfoId::KStartupInfoId( const TQString& txt_P )
}
}
-void KStartupInfoId::initId( const TQCString& id_P )
+void TDEStartupInfoId::initId( const TQCString& id_P )
{
if( !id_P.isEmpty())
{
@@ -991,10 +991,10 @@ void KStartupInfoId::initId( const TQCString& id_P )
#endif
return;
}
- d->id = KStartupInfo::createNewStartupId();
+ d->id = TDEStartupInfo::createNewStartupId();
}
-bool KStartupInfoId::setupStartupEnv() const
+bool TDEStartupInfoId::setupStartupEnv() const
{
if( id().isEmpty())
{
@@ -1004,10 +1004,10 @@ bool KStartupInfoId::setupStartupEnv() const
return setenv( NET_STARTUP_ENV, id(), true ) == 0;
}
-KStartupInfoId KStartupInfo::currentStartupIdEnv()
+TDEStartupInfoId TDEStartupInfo::currentStartupIdEnv()
{
const char* startup_env = getenv( NET_STARTUP_ENV );
- KStartupInfoId id;
+ TDEStartupInfoId id;
if( startup_env != NULL && *startup_env != '\0' )
id.d->id = startup_env;
else
@@ -1015,57 +1015,57 @@ KStartupInfoId KStartupInfo::currentStartupIdEnv()
return id;
}
-void KStartupInfo::resetStartupEnv()
+void TDEStartupInfo::resetStartupEnv()
{
unsetenv( NET_STARTUP_ENV );
}
-KStartupInfoId::KStartupInfoId()
+TDEStartupInfoId::TDEStartupInfoId()
{
- d = new KStartupInfoIdPrivate;
+ d = new TDEStartupInfoIdPrivate;
}
-KStartupInfoId::~KStartupInfoId()
+TDEStartupInfoId::~TDEStartupInfoId()
{
delete d;
}
-KStartupInfoId::KStartupInfoId( const KStartupInfoId& id_P )
+TDEStartupInfoId::TDEStartupInfoId( const TDEStartupInfoId& id_P )
{
- d = new KStartupInfoIdPrivate( *id_P.d );
+ d = new TDEStartupInfoIdPrivate( *id_P.d );
}
-KStartupInfoId& KStartupInfoId::operator=( const KStartupInfoId& id_P )
+TDEStartupInfoId& TDEStartupInfoId::operator=( const TDEStartupInfoId& id_P )
{
if( &id_P == this )
return *this;
delete d;
- d = new KStartupInfoIdPrivate( *id_P.d );
+ d = new TDEStartupInfoIdPrivate( *id_P.d );
return *this;
}
-bool KStartupInfoId::operator==( const KStartupInfoId& id_P ) const
+bool TDEStartupInfoId::operator==( const TDEStartupInfoId& id_P ) const
{
return id() == id_P.id();
}
-bool KStartupInfoId::operator!=( const KStartupInfoId& id_P ) const
+bool TDEStartupInfoId::operator!=( const TDEStartupInfoId& id_P ) const
{
return !(*this == id_P );
}
// needed for QMap
-bool KStartupInfoId::operator<( const KStartupInfoId& id_P ) const
+bool TDEStartupInfoId::operator<( const TDEStartupInfoId& id_P ) const
{
return id() < id_P.id();
}
-bool KStartupInfoId::none() const
+bool TDEStartupInfoId::none() const
{
return d->id.isEmpty() || d->id == "0";
}
-unsigned long KStartupInfoId::timestamp() const
+unsigned long TDEStartupInfoId::timestamp() const
{
if( none())
return 0;
@@ -1097,14 +1097,14 @@ unsigned long KStartupInfoId::timestamp() const
return time;
}
}
- // bah ... old KStartupInfo or a problem
+ // bah ... old TDEStartupInfo or a problem
return 0;
}
-struct KStartupInfoDataPrivate
+struct TDEStartupInfoDataPrivate
{
- KStartupInfoDataPrivate() : desktop( 0 ), wmclass( "" ), hostname( "" ),
- silent( KStartupInfoData::Unknown ), timestamp( -1U ), screen( -1 ), xinerama( -1 ), launched_by( 0 ) {}
+ TDEStartupInfoDataPrivate() : desktop( 0 ), wmclass( "" ), hostname( "" ),
+ silent( TDEStartupInfoData::Unknown ), timestamp( -1U ), screen( -1 ), xinerama( -1 ), launched_by( 0 ) {}
TQString bin;
TQString name;
TQString description;
@@ -1113,14 +1113,14 @@ struct KStartupInfoDataPrivate
TQValueList< pid_t > pids;
TQCString wmclass;
TQCString hostname;
- KStartupInfoData::TriState silent;
+ TDEStartupInfoData::TriState silent;
unsigned long timestamp;
int screen;
int xinerama;
WId launched_by;
};
-TQString KStartupInfoData::to_text() const
+TQString TDEStartupInfoData::to_text() const
{
TQString ret = "";
if( !d->bin.isEmpty())
@@ -1155,9 +1155,9 @@ TQString KStartupInfoData::to_text() const
return ret;
}
-KStartupInfoData::KStartupInfoData( const TQString& txt_P )
+TDEStartupInfoData::TDEStartupInfoData( const TQString& txt_P )
{
- d = new KStartupInfoDataPrivate;
+ d = new TDEStartupInfoDataPrivate;
TQStringList items = get_fields( txt_P );
const TQString bin_str = TQString::fromLatin1( "BIN=" );
const TQString name_str = TQString::fromLatin1( "NAME=" );
@@ -1209,21 +1209,21 @@ KStartupInfoData::KStartupInfoData( const TQString& txt_P )
}
}
-KStartupInfoData::KStartupInfoData( const KStartupInfoData& data )
+TDEStartupInfoData::TDEStartupInfoData( const TDEStartupInfoData& data )
{
- d = new KStartupInfoDataPrivate( *data.d );
+ d = new TDEStartupInfoDataPrivate( *data.d );
}
-KStartupInfoData& KStartupInfoData::operator=( const KStartupInfoData& data )
+TDEStartupInfoData& TDEStartupInfoData::operator=( const TDEStartupInfoData& data )
{
if( &data == this )
return *this;
delete d;
- d = new KStartupInfoDataPrivate( *data.d );
+ d = new TDEStartupInfoDataPrivate( *data.d );
return *this;
}
-void KStartupInfoData::update( const KStartupInfoData& data_P )
+void TDEStartupInfoData::update( const TDEStartupInfoData& data_P )
{
if( !data_P.bin().isEmpty())
d->bin = data_P.bin();
@@ -1255,105 +1255,105 @@ void KStartupInfoData::update( const KStartupInfoData& data_P )
d->launched_by = data_P.launchedBy();
}
-KStartupInfoData::KStartupInfoData()
+TDEStartupInfoData::TDEStartupInfoData()
{
- d = new KStartupInfoDataPrivate;
+ d = new TDEStartupInfoDataPrivate;
}
-KStartupInfoData::~KStartupInfoData()
+TDEStartupInfoData::~TDEStartupInfoData()
{
delete d;
}
-void KStartupInfoData::setBin( const TQString& bin_P )
+void TDEStartupInfoData::setBin( const TQString& bin_P )
{
d->bin = bin_P;
}
-const TQString& KStartupInfoData::bin() const
+const TQString& TDEStartupInfoData::bin() const
{
return d->bin;
}
-void KStartupInfoData::setName( const TQString& name_P )
+void TDEStartupInfoData::setName( const TQString& name_P )
{
d->name = name_P;
}
-const TQString& KStartupInfoData::name() const
+const TQString& TDEStartupInfoData::name() const
{
return d->name;
}
-const TQString& KStartupInfoData::findName() const
+const TQString& TDEStartupInfoData::findName() const
{
if( !name().isEmpty())
return name();
return bin();
}
-void KStartupInfoData::setDescription( const TQString& desc_P )
+void TDEStartupInfoData::setDescription( const TQString& desc_P )
{
d->description = desc_P;
}
-const TQString& KStartupInfoData::description() const
+const TQString& TDEStartupInfoData::description() const
{
return d->description;
}
-const TQString& KStartupInfoData::findDescription() const
+const TQString& TDEStartupInfoData::findDescription() const
{
if( !description().isEmpty())
return description();
return name();
}
-void KStartupInfoData::setIcon( const TQString& icon_P )
+void TDEStartupInfoData::setIcon( const TQString& icon_P )
{
d->icon = icon_P;
}
-const TQString& KStartupInfoData::findIcon() const
+const TQString& TDEStartupInfoData::findIcon() const
{
if( !icon().isEmpty())
return icon();
return bin();
}
-const TQString& KStartupInfoData::icon() const
+const TQString& TDEStartupInfoData::icon() const
{
return d->icon;
}
-void KStartupInfoData::setDesktop( int desktop_P )
+void TDEStartupInfoData::setDesktop( int desktop_P )
{
d->desktop = desktop_P;
}
-int KStartupInfoData::desktop() const
+int TDEStartupInfoData::desktop() const
{
return d->desktop;
}
-void KStartupInfoData::setWMClass( const TQCString& wmclass_P )
+void TDEStartupInfoData::setWMClass( const TQCString& wmclass_P )
{
d->wmclass = wmclass_P;
}
-const TQCString KStartupInfoData::findWMClass() const
+const TQCString TDEStartupInfoData::findWMClass() const
{
if( !WMClass().isEmpty() && WMClass() != "0" )
return WMClass();
return bin().utf8();
}
-const TQCString& KStartupInfoData::WMClass() const
+const TQCString& TDEStartupInfoData::WMClass() const
{
return d->wmclass;
}
-void KStartupInfoData::setHostname( const TQCString& hostname_P )
+void TDEStartupInfoData::setHostname( const TQCString& hostname_P )
{
if( !hostname_P.isNull())
d->hostname = hostname_P;
@@ -1367,78 +1367,78 @@ void KStartupInfoData::setHostname( const TQCString& hostname_P )
}
}
-const TQCString& KStartupInfoData::hostname() const
+const TQCString& TDEStartupInfoData::hostname() const
{
return d->hostname;
}
-void KStartupInfoData::addPid( pid_t pid_P )
+void TDEStartupInfoData::addPid( pid_t pid_P )
{
if( !d->pids.contains( pid_P ))
d->pids.append( pid_P );
}
-void KStartupInfoData::remove_pid( pid_t pid_P )
+void TDEStartupInfoData::remove_pid( pid_t pid_P )
{
d->pids.remove( pid_P );
}
-const TQValueList< pid_t >& KStartupInfoData::pids() const
+const TQValueList< pid_t >& TDEStartupInfoData::pids() const
{
return d->pids;
}
-bool KStartupInfoData::is_pid( pid_t pid_P ) const
+bool TDEStartupInfoData::is_pid( pid_t pid_P ) const
{
return d->pids.contains( pid_P );
}
-void KStartupInfoData::setSilent( TriState state_P )
+void TDEStartupInfoData::setSilent( TriState state_P )
{
d->silent = state_P;
}
-KStartupInfoData::TriState KStartupInfoData::silent() const
+TDEStartupInfoData::TriState TDEStartupInfoData::silent() const
{
return d->silent;
}
-void KStartupInfoData::setTimestamp( unsigned long time )
+void TDEStartupInfoData::setTimestamp( unsigned long time )
{
d->timestamp = time;
}
-unsigned long KStartupInfoData::timestamp() const
+unsigned long TDEStartupInfoData::timestamp() const
{
return d->timestamp;
}
-void KStartupInfoData::setScreen( int screen )
+void TDEStartupInfoData::setScreen( int screen )
{
d->screen = screen;
}
-int KStartupInfoData::screen() const
+int TDEStartupInfoData::screen() const
{
return d->screen;
}
-void KStartupInfoData::setXinerama( int xinerama )
+void TDEStartupInfoData::setXinerama( int xinerama )
{
d->xinerama = xinerama;
}
-int KStartupInfoData::xinerama() const
+int TDEStartupInfoData::xinerama() const
{
return d->xinerama;
}
-void KStartupInfoData::setLaunchedBy( WId window )
+void TDEStartupInfoData::setLaunchedBy( WId window )
{
d->launched_by = window;
}
-WId KStartupInfoData::launchedBy() const
+WId TDEStartupInfoData::launchedBy() const
{
return d->launched_by;
}
@@ -1525,5 +1525,5 @@ static TQString escape_str( const TQString& str_P )
return ret;
}
-#include "kstartupinfo.moc"
+#include "tdestartupinfo.moc"
#endif
diff --git a/tdecore/kstartupinfo.h b/tdecore/tdestartupinfo.h
index f71a0b830..3f8310f6b 100644
--- a/tdecore/kstartupinfo.h
+++ b/tdecore/tdestartupinfo.h
@@ -39,17 +39,17 @@ DEALINGS IN THE SOFTWARE.
#include <tqvaluelist.h>
#include "tdelibs_export.h"
-class KStartupInfoId;
-class KStartupInfoData;
+class TDEStartupInfoId;
+class TDEStartupInfoData;
-class KStartupInfoPrivate;
+class TDEStartupInfoPrivate;
/**
* Class for manipulating the application startup notification.
*
* This class can be used to send information about started application,
* change the information and receive this information. For detailed
- * description, see tdelibs/tdecore/README.kstartupinfo.
+ * description, see tdelibs/tdecore/README.tdestartupinfo.
*
* You usually don't need to use this class for sending the notification
* information, as KDE libraries should do this when an application is
@@ -59,12 +59,12 @@ class KStartupInfoPrivate;
* to its slots. It will automatically detect started applications and when
* they are ready.
*
- * @see KStartupInfoId
- * @see KStartupInfoData
+ * @see TDEStartupInfoId
+ * @see TDEStartupInfoData
*
* @author Lubos Lunak <l.lunak@kde.org>
*/
-class TDECORE_EXPORT KStartupInfo
+class TDECORE_EXPORT TDEStartupInfo
: public TQObject
{
Q_OBJECT
@@ -151,7 +151,7 @@ class TDECORE_EXPORT KStartupInfo
* @param name the name of the TQObject (can be 0 for no name)
*
*/
- KStartupInfo( int flags, TQObject* parent = NULL, const char* name = NULL );
+ TDEStartupInfo( int flags, TQObject* parent = NULL, const char* name = NULL );
/**
* Creates an instance that will receive the startup notifications.
*
@@ -163,8 +163,8 @@ class TDECORE_EXPORT KStartupInfo
*
* @obsolete
*/
- KStartupInfo( bool clean_on_cantdetect, TQObject* parent = 0, const char* name = 0 );
- virtual ~KStartupInfo();
+ TDEStartupInfo( bool clean_on_cantdetect, TQObject* parent = 0, const char* name = 0 );
+ virtual ~TDEStartupInfo();
/**
* Sends given notification data about started application
* with the given startup identification. If no notification for this identification
@@ -174,10 +174,10 @@ class TDECORE_EXPORT KStartupInfo
* @param id the id of the application
* @param data the application's data
* @return true if successful, false otherwise
- * @see KStartupInfoId
- * @see KStartupInfoData
+ * @see TDEStartupInfoId
+ * @see TDEStartupInfoData
*/
- static bool sendStartup( const KStartupInfoId& id, const KStartupInfoData& data );
+ static bool sendStartup( const TDEStartupInfoId& id, const TDEStartupInfoData& data );
/**
* Like sendStartup , uses dpy instead of tqt_xdisplay() for sending the info.
@@ -187,8 +187,8 @@ class TDECORE_EXPORT KStartupInfo
* @param data the application's data
* @return true if successful, false otherwise
*/
- static bool sendStartupX( Display* dpy, const KStartupInfoId& id,
- const KStartupInfoData& data );
+ static bool sendStartupX( Display* dpy, const TDEStartupInfoId& id,
+ const TDEStartupInfoData& data );
/**
* Sends given notification data about started application
@@ -197,10 +197,10 @@ class TDECORE_EXPORT KStartupInfo
* @param id the id of the application
* @param data the application's data
* @return true if successful, false otherwise
- * @see KStartupInfoId
- * @see KStartupInfoData
+ * @see TDEStartupInfoId
+ * @see TDEStartupInfoData
*/
- static bool sendChange( const KStartupInfoId& id, const KStartupInfoData& data );
+ static bool sendChange( const TDEStartupInfoId& id, const TDEStartupInfoData& data );
/**
* Like sendChange , uses dpy instead of tqt_xdisplay() for sending the info.
@@ -209,15 +209,15 @@ class TDECORE_EXPORT KStartupInfo
* @param data the application's data
* @return true if successful, false otherwise
*/
- static bool sendChangeX( Display* dpy, const KStartupInfoId& id,
- const KStartupInfoData& data );
+ static bool sendChangeX( Display* dpy, const TDEStartupInfoId& id,
+ const TDEStartupInfoData& data );
/**
* Ends startup notification with the given identification.
* @param id the id of the application
* @return true if successful, false otherwise
*/
- static bool sendFinish( const KStartupInfoId& id );
+ static bool sendFinish( const TDEStartupInfoId& id );
/**
* Like sendFinish , uses dpy instead of tqt_xdisplay() for sending the info.
@@ -225,7 +225,7 @@ class TDECORE_EXPORT KStartupInfo
* @param id the id of the application
* @return true if successful, false otherwise
*/
- static bool sendFinishX( Display* dpy, const KStartupInfoId& id );
+ static bool sendFinishX( Display* dpy, const TDEStartupInfoId& id );
/**
* Ends startup notification with the given identification and the given data ( e.g.
@@ -234,7 +234,7 @@ class TDECORE_EXPORT KStartupInfo
* @param data the application's data
* @return true if successful, false otherwise
*/
- static bool sendFinish( const KStartupInfoId& id, const KStartupInfoData& data );
+ static bool sendFinish( const TDEStartupInfoId& id, const TDEStartupInfoData& data );
/**
* Like sendFinish , uses dpy instead of tqt_xdisplay() for sending the info.
@@ -243,16 +243,16 @@ class TDECORE_EXPORT KStartupInfo
* @param data the application's data
* @return true if successful, false otherwise
*/
- static bool sendFinishX( Display* dpy, const KStartupInfoId& id,
- const KStartupInfoData& data );
+ static bool sendFinishX( Display* dpy, const TDEStartupInfoId& id,
+ const TDEStartupInfoData& data );
/**
* Returns the current startup notification identification for the current
- * startup notification environment variable. Note that KApplication constructor
- * unsets the variable and you have to use KApplication::startupId .
+ * startup notification environment variable. Note that TDEApplication constructor
+ * unsets the variable and you have to use TDEApplication::startupId .
* @return the current startup notification identification
*/
- static KStartupInfoId currentStartupIdEnv();
+ static TDEStartupInfoId currentStartupIdEnv();
/**
* Unsets the startup notification environment variable.
*/
@@ -277,7 +277,7 @@ class TDECORE_EXPORT KStartupInfo
* @param id if found, the id of the startup notification will be written here
* @return the result of the operation
*/
- startup_t checkStartup( WId w, KStartupInfoId& id );
+ startup_t checkStartup( WId w, TDEStartupInfoId& id );
/**
* Checks if the given windows matches any existing startup notification, and
* if yes, returns the notification data in data.
@@ -285,7 +285,7 @@ class TDECORE_EXPORT KStartupInfo
* @param data if found, the data of the startup notification will be written here
* @return the result of the operation
*/
- startup_t checkStartup( WId w, KStartupInfoData& data );
+ startup_t checkStartup( WId w, TDEStartupInfoData& data );
/**
* Checks if the given windows matches any existing startup notification, and
* if yes, returns the identification in id and notification data in data.
@@ -294,7 +294,7 @@ class TDECORE_EXPORT KStartupInfo
* @param data if found, the data of the startup notification will be written here
* @return the result of the operation
*/
- startup_t checkStartup( WId w, KStartupInfoId& id, KStartupInfoData& data );
+ startup_t checkStartup( WId w, TDEStartupInfoId& id, TDEStartupInfoData& data );
/**
* Sets the timeout for notifications, after this timeout a notification is removed.
* @param secs the new timeout in seconds
@@ -327,20 +327,20 @@ class TDECORE_EXPORT KStartupInfo
* @param id the notification identification
* @param data the notification data
*/
- void gotNewStartup( const KStartupInfoId& id, const KStartupInfoData& data );
+ void gotNewStartup( const TDEStartupInfoId& id, const TDEStartupInfoData& data );
/**
* Emitted when a startup notification changes.
* @param id the notification identification
* @param data the notification data
*/
- void gotStartupChange( const KStartupInfoId& id, const KStartupInfoData& data );
+ void gotStartupChange( const TDEStartupInfoId& id, const TDEStartupInfoData& data );
/**
* Emitted when a startup notification is removed (either because it was detected
* that the application is ready or because of a timeout).
* @param id the notification identification
* @param data the notification data
*/
- void gotRemoveStartup( const KStartupInfoId& id, const KStartupInfoData& data );
+ void gotRemoveStartup( const TDEStartupInfoId& id, const TDEStartupInfoData& data );
protected:
/**
*
@@ -354,32 +354,32 @@ class TDECORE_EXPORT KStartupInfo
void slot_window_added( WId w );
private:
void init( int flags );
- friend class KStartupInfoPrivate;
+ friend class TDEStartupInfoPrivate;
void got_startup_info( const TQString& msg_P, bool update_only_P );
void got_remove_startup_info( const TQString& msg_P );
- void new_startup_info_internal( const KStartupInfoId& id_P,
+ void new_startup_info_internal( const TDEStartupInfoId& id_P,
Data& data_P, bool update_only_P );
- void remove_startup_info_internal( const KStartupInfoId& id_P );
- void remove_startup_pids( const KStartupInfoId& id, const KStartupInfoData& data );
- void remove_startup_pids( const KStartupInfoData& data );
- startup_t check_startup_internal( WId w, KStartupInfoId* id, KStartupInfoData* data );
- bool find_id( const TQCString& id_P, KStartupInfoId* id_O,
- KStartupInfoData* data_O );
- bool find_pid( pid_t pid_P, const TQCString& hostname, KStartupInfoId* id_O,
- KStartupInfoData* data_O );
+ void remove_startup_info_internal( const TDEStartupInfoId& id_P );
+ void remove_startup_pids( const TDEStartupInfoId& id, const TDEStartupInfoData& data );
+ void remove_startup_pids( const TDEStartupInfoData& data );
+ startup_t check_startup_internal( WId w, TDEStartupInfoId* id, TDEStartupInfoData* data );
+ bool find_id( const TQCString& id_P, TDEStartupInfoId* id_O,
+ TDEStartupInfoData* data_O );
+ bool find_pid( pid_t pid_P, const TQCString& hostname, TDEStartupInfoId* id_O,
+ TDEStartupInfoData* data_O );
bool find_wclass( TQCString res_name_P, TQCString res_class_P,
- KStartupInfoId* id_O, KStartupInfoData* data_O );
+ TDEStartupInfoId* id_O, TDEStartupInfoData* data_O );
static TQCString get_window_hostname( WId w_P );
void startups_cleanup_internal( bool age_P );
void clean_all_noncompliant();
static TQString check_required_startup_fields( const TQString& msg,
- const KStartupInfoData& data, int screen );
+ const TDEStartupInfoData& data, int screen );
bool clean_on_cantdetect_; // KDE4 remove unused
unsigned int timeout;
- KStartupInfoPrivate* d;
+ TDEStartupInfoPrivate* d;
};
-class KStartupInfoIdPrivate;
+class TDEStartupInfoIdPrivate;
/**
* Class representing an identification of application startup notification.
@@ -387,24 +387,24 @@ class KStartupInfoIdPrivate;
* Every existing notification about a starting application has its own unique
* identification, that's used to identify and manipulate the notification.
*
- * @see KStartupInfo
- * @see KStartupInfoData
+ * @see TDEStartupInfo
+ * @see TDEStartupInfoData
*
* @author Lubos Lunak <l.lunak@kde.org>
*/
-class TDECORE_EXPORT KStartupInfoId
+class TDECORE_EXPORT TDEStartupInfoId
{
public:
/**
* Overloaded operator.
* @return true if the notification identifications are the same
*/
- bool operator==( const KStartupInfoId& id ) const;
+ bool operator==( const TDEStartupInfoId& id ) const;
/**
* Overloaded operator.
* @return true if the notification identifications are different
*/
- bool operator!=( const KStartupInfoId& id ) const;
+ bool operator!=( const TDEStartupInfoId& id ) const;
/**
* Checks whether the identifier is valid.
* @return true if this object doesn't represent a valid notification identification
@@ -437,22 +437,22 @@ class TDECORE_EXPORT KStartupInfoId
/**
* Creates an empty identification
*/
- KStartupInfoId();
+ TDEStartupInfoId();
/**
* Copy constructor.
*/
- KStartupInfoId( const KStartupInfoId& data );
- ~KStartupInfoId();
- KStartupInfoId& operator=( const KStartupInfoId& data );
- bool operator<( const KStartupInfoId& id ) const;
+ TDEStartupInfoId( const TDEStartupInfoId& data );
+ ~TDEStartupInfoId();
+ TDEStartupInfoId& operator=( const TDEStartupInfoId& data );
+ bool operator<( const TDEStartupInfoId& id ) const;
private:
- KStartupInfoId( const TQString& txt );
+ TDEStartupInfoId( const TQString& txt );
TQString to_text() const;
- friend class KStartupInfo;
- KStartupInfoIdPrivate* d;
+ friend class TDEStartupInfo;
+ TDEStartupInfoIdPrivate* d;
};
-class KStartupInfoDataPrivate;
+class TDEStartupInfoDataPrivate;
/**
* Class representing data about an application startup notification.
@@ -460,12 +460,12 @@ class KStartupInfoDataPrivate;
* Such data include the icon of the starting application, the desktop on which
* the application should start, the binary name of the application, etc.
*
- * @see KStartupInfo
- * @see KStartupInfoId
+ * @see TDEStartupInfo
+ * @see TDEStartupInfoId
*
* @author Lubos Lunak <l.lunak@kde.org>
*/
-class TDECORE_EXPORT KStartupInfoData
+class TDECORE_EXPORT TDEStartupInfoData
{
public:
/**
@@ -608,13 +608,13 @@ class TDECORE_EXPORT KStartupInfoData
/**
* Return the silence status for the startup notification.
- * @return KStartupInfoData::Yes if visual feedback is silenced
+ * @return TDEStartupInfoData::Yes if visual feedback is silenced
* @since 3.1.1
*/
TriState silent() const;
/**
- * @obsolete Timestamp is already assigned in KStartupInfoId::initId().
+ * @obsolete Timestamp is already assigned in TDEStartupInfoId::initId().
* Sets timestamp for the startup notification. The timestamp is expressed
* as XServer time, and is used to prevent activation of the matching
* window if user interaction took place after this timestamp.
@@ -624,7 +624,7 @@ class TDECORE_EXPORT KStartupInfoData
void setTimestamp( unsigned long time );
/**
- * @obsolete Use KStartupInfoId::timestamp().
+ * @obsolete Use TDEStartupInfoId::timestamp().
* Return the timestamp for the startup notification, or -1 if no timestamp
* is set.
*/
@@ -670,26 +670,26 @@ class TDECORE_EXPORT KStartupInfoData
* or the name, won't be rewritten if already set.
* @param data the data to update
*/
- void update( const KStartupInfoData& data );
+ void update( const TDEStartupInfoData& data );
/**
* Constructor. Initializes all the data to their default empty values.
*/
- KStartupInfoData();
+ TDEStartupInfoData();
/**
* Copy constructor.
*/
- KStartupInfoData( const KStartupInfoData& data );
- ~KStartupInfoData();
- KStartupInfoData& operator=( const KStartupInfoData& data );
+ TDEStartupInfoData( const TDEStartupInfoData& data );
+ ~TDEStartupInfoData();
+ TDEStartupInfoData& operator=( const TDEStartupInfoData& data );
private:
- KStartupInfoData( const TQString& txt );
+ TDEStartupInfoData( const TQString& txt );
TQString to_text() const;
void remove_pid( pid_t pid );
- friend class KStartupInfo;
- friend class KStartupInfo::Data;
- KStartupInfoDataPrivate* d;
+ friend class TDEStartupInfo;
+ friend class TDEStartupInfo::Data;
+ TDEStartupInfoDataPrivate* d;
};
#endif //Q_WS_X11
diff --git a/tdecore/kstdaccel.cpp b/tdecore/tdestdaccel.cpp
index cb2d9dbba..ba3e64ca5 100644
--- a/tdecore/kstdaccel.cpp
+++ b/tdecore/tdestdaccel.cpp
@@ -19,95 +19,95 @@
*/
#define __KSTDACCEL_CPP_ 1
-#include "kstdaccel.h"
+#include "tdestdaccel.h"
-#include "kaccelaction.h"
-#include "kaccelbase.h"
-#include <kconfig.h>
+#include "tdeaccelaction.h"
+#include "tdeaccelbase.h"
+#include <tdeconfig.h>
#include <kdebug.h>
-#include <kglobal.h>
-#include <klocale.h>
-#include <kshortcut.h>
-#include <kshortcutlist.h>
+#include <tdeglobal.h>
+#include <tdelocale.h>
+#include <tdeshortcut.h>
+#include <tdeshortcutlist.h>
-namespace KStdAccel
+namespace TDEStdAccel
{
-struct KStdAccelInfo
+struct TDEStdAccelInfo
{
StdAccel id;
const char* psName;
const char* psDesc;
int cutDefault, cutDefault4, cutDefault3B, cutDefault4B;
- KShortcut cut;
+ TDEShortcut cut;
bool bInitialized;
};
-/** Array of predefined KStdAccelInfo objects, which cover all
+/** Array of predefined TDEStdAccelInfo objects, which cover all
the "standard" accelerators. Each enum value from StdAccel
should appear in this table.
*/
-static KStdAccelInfo g_infoStdAccel[] =
+static TDEStdAccelInfo g_infoStdAccel[] =
{
- {AccelNone, "Group:File", I18N_NOOP("File"), 0, 0, 0, 0, KShortcut(), false },
- { Open, I18N_NOOP("Open"), 0, Qt::CTRL+Qt::Key_O, 0, 0, 0, KShortcut(), false },
- { New, I18N_NOOP("New"), 0, Qt::CTRL+Qt::Key_N, 0, 0, 0, KShortcut(), false },
- { Close, I18N_NOOP("Close"), 0, Qt::CTRL+Qt::Key_W, Qt::CTRL+Qt::Key_Escape, 0, Qt::CTRL+Qt::Key_W, KShortcut(), false },
- { Save, I18N_NOOP("Save"), 0, Qt::CTRL+Qt::Key_S, 0, 0, 0, KShortcut(), false },
- { Print, I18N_NOOP("Print"), 0, Qt::CTRL+Qt::Key_P, 0, 0, 0, KShortcut(), false },
- { Quit, I18N_NOOP("Quit"), 0, Qt::CTRL+Qt::Key_Q, 0, 0, 0, KShortcut(), false },
- {AccelNone, "Group:Edit", I18N_NOOP("Edit"), 0, 0, 0, 0, KShortcut(), false },
- { Undo, I18N_NOOP("Undo"), 0, Qt::CTRL+Qt::Key_Z, 0, 0, 0, KShortcut(), false },
- { Redo, I18N_NOOP("Redo"), 0, Qt::CTRL+Qt::SHIFT+Qt::Key_Z, 0, 0, 0, KShortcut(), false },
- { Cut, I18N_NOOP("Cut"), 0, Qt::CTRL+Qt::Key_X, 0, Qt::SHIFT+Qt::Key_Delete, 0, KShortcut(), false },
- { Copy, I18N_NOOP("Copy"), 0, Qt::CTRL+Qt::Key_C, 0, Qt::CTRL+Qt::Key_Insert, 0, KShortcut(), false },
- { Paste, I18N_NOOP("Paste"), 0, Qt::CTRL+Qt::Key_V, 0, Qt::SHIFT+Qt::Key_Insert, 0, KShortcut(), false },
- { PasteSelection, I18N_NOOP("Paste Selection"), 0, 0, 0, Qt::CTRL+Qt::SHIFT+Qt::Key_Insert, 0, KShortcut(), false },
- { SelectAll, "SelectAll", I18N_NOOP("Select All"), Qt::CTRL+Qt::Key_A, 0, 0, 0, KShortcut(), false },
- { Deselect, I18N_NOOP("Deselect"), 0, Qt::CTRL+Qt::SHIFT+Qt::Key_A, 0, 0, 0, KShortcut(), false },
- { DeleteWordBack, "DeleteWordBack", I18N_NOOP("Delete Word Backwards"), Qt::CTRL+Qt::Key_Backspace, 0, 0, 0, KShortcut(), false },
- { DeleteWordForward, "DeleteWordForward", I18N_NOOP("Delete Word Forward"), Qt::CTRL+Qt::Key_Delete, 0, 0, 0, KShortcut(), false },
- { Find, I18N_NOOP("Find"), 0, Qt::CTRL+Qt::Key_F, 0, 0, 0, KShortcut(), false },
- { FindNext, "FindNext", I18N_NOOP("Find Next"), Qt::Key_F3, 0, 0, 0, KShortcut(), false },
- { FindPrev, "FindPrev", I18N_NOOP("Find Prev"), Qt::SHIFT+Qt::Key_F3, 0, 0, 0, KShortcut(), false },
- { Replace, I18N_NOOP("Replace"), 0, Qt::CTRL+Qt::Key_R, 0, 0, 0, KShortcut(), false },
- {AccelNone, "Group:Navigation", I18N_NOOP("Navigation"), 0, 0, 0, 0, KShortcut(), false },
- { Home, I18N_NOOP2("Opposite to End","Home"), 0, Qt::CTRL+Qt::Key_Home, 0, Qt::Key_HomePage, 0, KShortcut(), false },
- { End, I18N_NOOP("End"), 0, Qt::CTRL+Qt::Key_End, 0, 0, 0, KShortcut(), false },
- { BeginningOfLine, "BeginningOfLine", I18N_NOOP("Beginning of Line"), Qt::Key_Home, 0, 0, 0, KShortcut(), false},
- { EndOfLine, "EndOfLine", I18N_NOOP("End of Line"), Qt::Key_End, 0, 0, 0, KShortcut(), false},
- { Prior, I18N_NOOP("Prior"), 0, TQt::Key_Prior, 0, 0, 0, KShortcut(), false },
- { Next, I18N_NOOP2("Opposite to Prior","Next"), 0, TQt::Key_Next, 0, 0, 0, KShortcut(), false },
- { GotoLine, "GotoLine", I18N_NOOP("Go to Line"), Qt::CTRL+Qt::Key_G, 0, 0, 0, KShortcut(), false },
- { AddBookmark, "AddBookmark", I18N_NOOP("Add Bookmark"), Qt::CTRL+Qt::Key_B, 0, 0, 0, KShortcut(), false },
- { ZoomIn, "ZoomIn", I18N_NOOP("Zoom In"), Qt::CTRL+Qt::Key_Plus, 0, 0, 0, KShortcut(), false },
- { ZoomOut, "ZoomOut", I18N_NOOP("Zoom Out"), Qt::CTRL+Qt::Key_Minus, 0, 0, 0, KShortcut(), false },
- { Up, I18N_NOOP("Up"), 0, Qt::ALT+Qt::Key_Up, 0, 0, 0, KShortcut(), false },
- { Back, I18N_NOOP("Back"), 0, Qt::ALT+Qt::Key_Left, 0, Qt::Key_Back, 0, KShortcut(), false },
- { Forward, I18N_NOOP("Forward"), 0, Qt::ALT+Qt::Key_Right, 0, Qt::Key_Forward, 0, KShortcut(), false },
- { Reload, I18N_NOOP("Reload"), 0, Qt::Key_F5, 0, Qt::Key_Refresh, 0, KShortcut(), false },
- { PopupMenuContext, "PopupMenuContext", I18N_NOOP("Popup Menu Context"), Qt::Key_Menu, 0, 0, 0, KShortcut(), false },
- { ShowMenubar, "ShowMenubar", I18N_NOOP("Show Menu Bar"), Qt::CTRL+Qt::Key_M, 0, 0, 0, KShortcut(), false },
- { BackwardWord, "BackwardWord", I18N_NOOP("Backward Word"), Qt::CTRL+Qt::Key_Left, 0, 0, 0, KShortcut(), false },
- { ForwardWord, "ForwardWord", I18N_NOOP("Forward Word"), Qt::CTRL+Qt::Key_Right, 0, 0, 0, KShortcut(), false },
- { TabNext, I18N_NOOP("Activate Next Tab"), 0, Qt::CTRL+Qt::Key_Period, 0, Qt::CTRL+Qt::Key_BracketRight, 0, KShortcut(), false },
- { TabPrev, I18N_NOOP("Activate Previous Tab"), 0, Qt::CTRL+Qt::Key_Comma, 0, Qt::CTRL+Qt::Key_BracketLeft, 0, KShortcut(), false },
- { FullScreen, "FullScreen", I18N_NOOP("Full Screen Mode"), Qt::CTRL+Qt::SHIFT+Qt::Key_F, 0, 0, 0, KShortcut(), false },
- {AccelNone, "Group:Help", I18N_NOOP("Help"), 0, 0, 0, 0, KShortcut(), false },
- { Help, I18N_NOOP("Help"), 0, Qt::Key_F1, 0, 0, 0, KShortcut(), false },
- { WhatsThis, "WhatsThis", I18N_NOOP("What's This"), Qt::SHIFT+Qt::Key_F1, 0, 0, 0, KShortcut(), false },
- {AccelNone, "Group:TextCompletion", I18N_NOOP("Text Completion"), 0, 0, 0, 0, KShortcut(), false },
- { TextCompletion, "TextCompletion", I18N_NOOP("Text Completion"), Qt::CTRL+Qt::Key_E, 0, 0, 0, KShortcut(), false },
- { PrevCompletion, "PrevCompletion", I18N_NOOP("Previous Completion Match"), Qt::CTRL+Qt::Key_Up, 0, 0, 0, KShortcut(), false },
- { NextCompletion, "NextCompletion", I18N_NOOP("Next Completion Match"), Qt::CTRL+Qt::Key_Down, 0, 0, 0, KShortcut(), false },
- { SubstringCompletion, "SubstringCompletion", I18N_NOOP("Substring Completion"), Qt::CTRL+Qt::Key_T, 0, 0, 0, KShortcut(), false },
- { RotateUp, "RotateUp", I18N_NOOP("Previous Item in List"), Qt::Key_Up, 0, 0, 0, KShortcut(), false },
- { RotateDown, "RotateDown", I18N_NOOP("Next Item in List"), Qt::Key_Down, 0, 0, 0, KShortcut(), false },
- { AccelNone, 0, 0, 0, 0, 0, 0, KShortcut(), false }
+ {AccelNone, "Group:File", I18N_NOOP("File"), 0, 0, 0, 0, TDEShortcut(), false },
+ { Open, I18N_NOOP("Open"), 0, Qt::CTRL+Qt::Key_O, 0, 0, 0, TDEShortcut(), false },
+ { New, I18N_NOOP("New"), 0, Qt::CTRL+Qt::Key_N, 0, 0, 0, TDEShortcut(), false },
+ { Close, I18N_NOOP("Close"), 0, Qt::CTRL+Qt::Key_W, Qt::CTRL+Qt::Key_Escape, 0, Qt::CTRL+Qt::Key_W, TDEShortcut(), false },
+ { Save, I18N_NOOP("Save"), 0, Qt::CTRL+Qt::Key_S, 0, 0, 0, TDEShortcut(), false },
+ { Print, I18N_NOOP("Print"), 0, Qt::CTRL+Qt::Key_P, 0, 0, 0, TDEShortcut(), false },
+ { Quit, I18N_NOOP("Quit"), 0, Qt::CTRL+Qt::Key_Q, 0, 0, 0, TDEShortcut(), false },
+ {AccelNone, "Group:Edit", I18N_NOOP("Edit"), 0, 0, 0, 0, TDEShortcut(), false },
+ { Undo, I18N_NOOP("Undo"), 0, Qt::CTRL+Qt::Key_Z, 0, 0, 0, TDEShortcut(), false },
+ { Redo, I18N_NOOP("Redo"), 0, Qt::CTRL+Qt::SHIFT+Qt::Key_Z, 0, 0, 0, TDEShortcut(), false },
+ { Cut, I18N_NOOP("Cut"), 0, Qt::CTRL+Qt::Key_X, 0, Qt::SHIFT+Qt::Key_Delete, 0, TDEShortcut(), false },
+ { Copy, I18N_NOOP("Copy"), 0, Qt::CTRL+Qt::Key_C, 0, Qt::CTRL+Qt::Key_Insert, 0, TDEShortcut(), false },
+ { Paste, I18N_NOOP("Paste"), 0, Qt::CTRL+Qt::Key_V, 0, Qt::SHIFT+Qt::Key_Insert, 0, TDEShortcut(), false },
+ { PasteSelection, I18N_NOOP("Paste Selection"), 0, 0, 0, Qt::CTRL+Qt::SHIFT+Qt::Key_Insert, 0, TDEShortcut(), false },
+ { SelectAll, "SelectAll", I18N_NOOP("Select All"), Qt::CTRL+Qt::Key_A, 0, 0, 0, TDEShortcut(), false },
+ { Deselect, I18N_NOOP("Deselect"), 0, Qt::CTRL+Qt::SHIFT+Qt::Key_A, 0, 0, 0, TDEShortcut(), false },
+ { DeleteWordBack, "DeleteWordBack", I18N_NOOP("Delete Word Backwards"), Qt::CTRL+Qt::Key_Backspace, 0, 0, 0, TDEShortcut(), false },
+ { DeleteWordForward, "DeleteWordForward", I18N_NOOP("Delete Word Forward"), Qt::CTRL+Qt::Key_Delete, 0, 0, 0, TDEShortcut(), false },
+ { Find, I18N_NOOP("Find"), 0, Qt::CTRL+Qt::Key_F, 0, 0, 0, TDEShortcut(), false },
+ { FindNext, "FindNext", I18N_NOOP("Find Next"), Qt::Key_F3, 0, 0, 0, TDEShortcut(), false },
+ { FindPrev, "FindPrev", I18N_NOOP("Find Prev"), Qt::SHIFT+Qt::Key_F3, 0, 0, 0, TDEShortcut(), false },
+ { Replace, I18N_NOOP("Replace"), 0, Qt::CTRL+Qt::Key_R, 0, 0, 0, TDEShortcut(), false },
+ {AccelNone, "Group:Navigation", I18N_NOOP("Navigation"), 0, 0, 0, 0, TDEShortcut(), false },
+ { Home, I18N_NOOP2("Opposite to End","Home"), 0, Qt::CTRL+Qt::Key_Home, 0, Qt::Key_HomePage, 0, TDEShortcut(), false },
+ { End, I18N_NOOP("End"), 0, Qt::CTRL+Qt::Key_End, 0, 0, 0, TDEShortcut(), false },
+ { BeginningOfLine, "BeginningOfLine", I18N_NOOP("Beginning of Line"), Qt::Key_Home, 0, 0, 0, TDEShortcut(), false},
+ { EndOfLine, "EndOfLine", I18N_NOOP("End of Line"), Qt::Key_End, 0, 0, 0, TDEShortcut(), false},
+ { Prior, I18N_NOOP("Prior"), 0, TQt::Key_Prior, 0, 0, 0, TDEShortcut(), false },
+ { Next, I18N_NOOP2("Opposite to Prior","Next"), 0, TQt::Key_Next, 0, 0, 0, TDEShortcut(), false },
+ { GotoLine, "GotoLine", I18N_NOOP("Go to Line"), Qt::CTRL+Qt::Key_G, 0, 0, 0, TDEShortcut(), false },
+ { AddBookmark, "AddBookmark", I18N_NOOP("Add Bookmark"), Qt::CTRL+Qt::Key_B, 0, 0, 0, TDEShortcut(), false },
+ { ZoomIn, "ZoomIn", I18N_NOOP("Zoom In"), Qt::CTRL+Qt::Key_Plus, 0, 0, 0, TDEShortcut(), false },
+ { ZoomOut, "ZoomOut", I18N_NOOP("Zoom Out"), Qt::CTRL+Qt::Key_Minus, 0, 0, 0, TDEShortcut(), false },
+ { Up, I18N_NOOP("Up"), 0, Qt::ALT+Qt::Key_Up, 0, 0, 0, TDEShortcut(), false },
+ { Back, I18N_NOOP("Back"), 0, Qt::ALT+Qt::Key_Left, 0, Qt::Key_Back, 0, TDEShortcut(), false },
+ { Forward, I18N_NOOP("Forward"), 0, Qt::ALT+Qt::Key_Right, 0, Qt::Key_Forward, 0, TDEShortcut(), false },
+ { Reload, I18N_NOOP("Reload"), 0, Qt::Key_F5, 0, Qt::Key_Refresh, 0, TDEShortcut(), false },
+ { PopupMenuContext, "PopupMenuContext", I18N_NOOP("Popup Menu Context"), Qt::Key_Menu, 0, 0, 0, TDEShortcut(), false },
+ { ShowMenubar, "ShowMenubar", I18N_NOOP("Show Menu Bar"), Qt::CTRL+Qt::Key_M, 0, 0, 0, TDEShortcut(), false },
+ { BackwardWord, "BackwardWord", I18N_NOOP("Backward Word"), Qt::CTRL+Qt::Key_Left, 0, 0, 0, TDEShortcut(), false },
+ { ForwardWord, "ForwardWord", I18N_NOOP("Forward Word"), Qt::CTRL+Qt::Key_Right, 0, 0, 0, TDEShortcut(), false },
+ { TabNext, I18N_NOOP("Activate Next Tab"), 0, Qt::CTRL+Qt::Key_Period, 0, Qt::CTRL+Qt::Key_BracketRight, 0, TDEShortcut(), false },
+ { TabPrev, I18N_NOOP("Activate Previous Tab"), 0, Qt::CTRL+Qt::Key_Comma, 0, Qt::CTRL+Qt::Key_BracketLeft, 0, TDEShortcut(), false },
+ { FullScreen, "FullScreen", I18N_NOOP("Full Screen Mode"), Qt::CTRL+Qt::SHIFT+Qt::Key_F, 0, 0, 0, TDEShortcut(), false },
+ {AccelNone, "Group:Help", I18N_NOOP("Help"), 0, 0, 0, 0, TDEShortcut(), false },
+ { Help, I18N_NOOP("Help"), 0, Qt::Key_F1, 0, 0, 0, TDEShortcut(), false },
+ { WhatsThis, "WhatsThis", I18N_NOOP("What's This"), Qt::SHIFT+Qt::Key_F1, 0, 0, 0, TDEShortcut(), false },
+ {AccelNone, "Group:TextCompletion", I18N_NOOP("Text Completion"), 0, 0, 0, 0, TDEShortcut(), false },
+ { TextCompletion, "TextCompletion", I18N_NOOP("Text Completion"), Qt::CTRL+Qt::Key_E, 0, 0, 0, TDEShortcut(), false },
+ { PrevCompletion, "PrevCompletion", I18N_NOOP("Previous Completion Match"), Qt::CTRL+Qt::Key_Up, 0, 0, 0, TDEShortcut(), false },
+ { NextCompletion, "NextCompletion", I18N_NOOP("Next Completion Match"), Qt::CTRL+Qt::Key_Down, 0, 0, 0, TDEShortcut(), false },
+ { SubstringCompletion, "SubstringCompletion", I18N_NOOP("Substring Completion"), Qt::CTRL+Qt::Key_T, 0, 0, 0, TDEShortcut(), false },
+ { RotateUp, "RotateUp", I18N_NOOP("Previous Item in List"), Qt::Key_Up, 0, 0, 0, TDEShortcut(), false },
+ { RotateDown, "RotateDown", I18N_NOOP("Next Item in List"), Qt::Key_Down, 0, 0, 0, TDEShortcut(), false },
+ { AccelNone, 0, 0, 0, 0, 0, 0, TDEShortcut(), false }
};
-/** Search for the KStdAccelInfo object associated with the given @p id. */
-static KStdAccelInfo* infoPtr( StdAccel id )
+/** Search for the TDEStdAccelInfo object associated with the given @p id. */
+static TDEStdAccelInfo* infoPtr( StdAccel id )
{
if( id != AccelNone ) {
// Linear search. Changing the data structure doesn't seem possible
@@ -126,11 +126,11 @@ static KStdAccelInfo* infoPtr( StdAccel id )
*/
static void initialize( StdAccel id )
{
- KConfigGroupSaver saver( KGlobal::config(), "Shortcuts" );
- KStdAccelInfo* pInfo = infoPtr( id );
+ TDEConfigGroupSaver saver( TDEGlobal::config(), "Shortcuts" );
+ TDEStdAccelInfo* pInfo = infoPtr( id );
if( !pInfo ) {
- kdWarning(125) << "KStdAccel: id not found!" << endl; // -- ellis
+ kdWarning(125) << "TDEStdAccel: id not found!" << endl; // -- ellis
return;
}
@@ -147,7 +147,7 @@ static void initialize( StdAccel id )
TQString name( StdAccel id )
{
- KStdAccelInfo* pInfo = infoPtr( id );
+ TDEStdAccelInfo* pInfo = infoPtr( id );
if( !pInfo )
return TQString::null;
return pInfo->psName;
@@ -155,27 +155,27 @@ TQString name( StdAccel id )
TQString label( StdAccel id )
{
- KStdAccelInfo* pInfo = infoPtr( id );
+ TDEStdAccelInfo* pInfo = infoPtr( id );
if( !pInfo )
return TQString::null;
return i18n((pInfo->psDesc) ? pInfo->psDesc : pInfo->psName);
}
-// TODO: Add psWhatsThis entry to KStdAccelInfo
+// TODO: Add psWhatsThis entry to TDEStdAccelInfo
TQString whatsThis( StdAccel /*id*/ )
{
-// KStdAccelInfo* pInfo = infoPtr( id );
+// TDEStdAccelInfo* pInfo = infoPtr( id );
// if( pInfo && pInfo->psWhatsThis )
// return i18n(pInfo->psWhatsThis);
// else
return TQString::null;
}
-const KShortcut& shortcut( StdAccel id )
+const TDEShortcut& shortcut( StdAccel id )
{
- KStdAccelInfo* pInfo = infoPtr( id );
+ TDEStdAccelInfo* pInfo = infoPtr( id );
if( !pInfo )
- return KShortcut::null();
+ return TDEShortcut::null();
if( !pInfo->bInitialized )
initialize( id );
@@ -199,17 +199,17 @@ StdAccel findStdAccel( const KKeySequence& seq )
return AccelNone;
}
-KShortcut shortcutDefault( StdAccel id )
+TDEShortcut shortcutDefault( StdAccel id )
{
- return (KAccelAction::useFourModifierKeys())
+ return (TDEAccelAction::useFourModifierKeys())
? shortcutDefault4(id) : shortcutDefault3(id);
}
-KShortcut shortcutDefault3( StdAccel id )
+TDEShortcut shortcutDefault3( StdAccel id )
{
- KShortcut cut;
+ TDEShortcut cut;
- KStdAccelInfo* pInfo = infoPtr( id );
+ TDEStdAccelInfo* pInfo = infoPtr( id );
if( pInfo ) {
if( pInfo->cutDefault )
cut.init( pInfo->cutDefault );
@@ -222,13 +222,13 @@ KShortcut shortcutDefault3( StdAccel id )
return cut;
}
-KShortcut shortcutDefault4( StdAccel id )
+TDEShortcut shortcutDefault4( StdAccel id )
{
- KShortcut cut;
+ TDEShortcut cut;
- KStdAccelInfo* pInfo = infoPtr( id );
+ TDEStdAccelInfo* pInfo = infoPtr( id );
if( pInfo ) {
- KStdAccelInfo& info = *pInfo;
+ TDEStdAccelInfo& info = *pInfo;
KKeySequence key2;
cut.init( (info.cutDefault4) ?
@@ -247,13 +247,13 @@ KShortcut shortcutDefault4( StdAccel id )
}
#if 0 // unused
-void createAccelActions( KAccelActions& actions )
+void createAccelActions( TDEAccelActions& actions )
{
actions.clear();
for( uint i = 0; g_infoStdAccel[i].psName != 0; i++ ) {
StdAccel id = g_infoStdAccel[i].id;
- KStdAccelInfo* pInfo = &g_infoStdAccel[i];
+ TDEStdAccelInfo* pInfo = &g_infoStdAccel[i];
if( id != AccelNone ) {
actions.insert( pInfo->psName,
@@ -267,54 +267,54 @@ void createAccelActions( KAccelActions& actions )
}
#endif
-const KShortcut& open() { return shortcut( Open ); }
-const KShortcut& openNew() { return shortcut( New ); }
-const KShortcut& close() { return shortcut( Close ); }
-const KShortcut& save() { return shortcut( Save ); }
-const KShortcut& print() { return shortcut( Print ); }
-const KShortcut& quit() { return shortcut( Quit ); }
-const KShortcut& cut() { return shortcut( Cut ); }
-const KShortcut& copy() { return shortcut( Copy ); }
-const KShortcut& paste() { return shortcut( Paste ); }
-const KShortcut& pasteSelection() { return shortcut( PasteSelection ); }
-const KShortcut& deleteWordBack() { return shortcut( DeleteWordBack ); }
-const KShortcut& deleteWordForward() { return shortcut( DeleteWordForward ); }
-const KShortcut& undo() { return shortcut( Undo ); }
-const KShortcut& redo() { return shortcut( Redo ); }
-const KShortcut& find() { return shortcut( Find ); }
-const KShortcut& findNext() { return shortcut( FindNext ); }
-const KShortcut& findPrev() { return shortcut( FindPrev ); }
-const KShortcut& replace() { return shortcut( Replace ); }
-const KShortcut& home() { return shortcut( Home ); }
-const KShortcut& end() { return shortcut( End ); }
-const KShortcut& beginningOfLine() { return shortcut( BeginningOfLine ); }
-const KShortcut& endOfLine() { return shortcut( EndOfLine ); }
-const KShortcut& prior() { return shortcut( Prior ); }
-const KShortcut& next() { return shortcut( Next ); }
-const KShortcut& backwardWord() { return shortcut( BackwardWord ); }
-const KShortcut& forwardWord() { return shortcut( ForwardWord ); }
-const KShortcut& gotoLine() { return shortcut( GotoLine ); }
-const KShortcut& addBookmark() { return shortcut( AddBookmark ); }
-const KShortcut& tabNext() { return shortcut( TabNext ); }
-const KShortcut& tabPrev() { return shortcut( TabPrev ); }
-const KShortcut& fullScreen() { return shortcut( FullScreen ); }
-const KShortcut& zoomIn() { return shortcut( ZoomIn ); }
-const KShortcut& zoomOut() { return shortcut( ZoomOut ); }
-const KShortcut& help() { return shortcut( Help ); }
-const KShortcut& completion() { return shortcut( TextCompletion ); }
-const KShortcut& prevCompletion() { return shortcut( PrevCompletion ); }
-const KShortcut& nextCompletion() { return shortcut( NextCompletion ); }
-const KShortcut& rotateUp() { return shortcut( RotateUp ); }
-const KShortcut& rotateDown() { return shortcut( RotateDown ); }
-const KShortcut& substringCompletion() { return shortcut( SubstringCompletion ); }
-const KShortcut& popupMenuContext() { return shortcut( PopupMenuContext ); }
-const KShortcut& whatsThis() { return shortcut( WhatsThis ); }
-const KShortcut& reload() { return shortcut( Reload ); }
-const KShortcut& selectAll() { return shortcut( SelectAll ); }
-const KShortcut& up() { return shortcut( Up ); }
-const KShortcut& back() { return shortcut( Back ); }
-const KShortcut& forward() { return shortcut( Forward ); }
-const KShortcut& showMenubar() { return shortcut( ShowMenubar ); }
+const TDEShortcut& open() { return shortcut( Open ); }
+const TDEShortcut& openNew() { return shortcut( New ); }
+const TDEShortcut& close() { return shortcut( Close ); }
+const TDEShortcut& save() { return shortcut( Save ); }
+const TDEShortcut& print() { return shortcut( Print ); }
+const TDEShortcut& quit() { return shortcut( Quit ); }
+const TDEShortcut& cut() { return shortcut( Cut ); }
+const TDEShortcut& copy() { return shortcut( Copy ); }
+const TDEShortcut& paste() { return shortcut( Paste ); }
+const TDEShortcut& pasteSelection() { return shortcut( PasteSelection ); }
+const TDEShortcut& deleteWordBack() { return shortcut( DeleteWordBack ); }
+const TDEShortcut& deleteWordForward() { return shortcut( DeleteWordForward ); }
+const TDEShortcut& undo() { return shortcut( Undo ); }
+const TDEShortcut& redo() { return shortcut( Redo ); }
+const TDEShortcut& find() { return shortcut( Find ); }
+const TDEShortcut& findNext() { return shortcut( FindNext ); }
+const TDEShortcut& findPrev() { return shortcut( FindPrev ); }
+const TDEShortcut& replace() { return shortcut( Replace ); }
+const TDEShortcut& home() { return shortcut( Home ); }
+const TDEShortcut& end() { return shortcut( End ); }
+const TDEShortcut& beginningOfLine() { return shortcut( BeginningOfLine ); }
+const TDEShortcut& endOfLine() { return shortcut( EndOfLine ); }
+const TDEShortcut& prior() { return shortcut( Prior ); }
+const TDEShortcut& next() { return shortcut( Next ); }
+const TDEShortcut& backwardWord() { return shortcut( BackwardWord ); }
+const TDEShortcut& forwardWord() { return shortcut( ForwardWord ); }
+const TDEShortcut& gotoLine() { return shortcut( GotoLine ); }
+const TDEShortcut& addBookmark() { return shortcut( AddBookmark ); }
+const TDEShortcut& tabNext() { return shortcut( TabNext ); }
+const TDEShortcut& tabPrev() { return shortcut( TabPrev ); }
+const TDEShortcut& fullScreen() { return shortcut( FullScreen ); }
+const TDEShortcut& zoomIn() { return shortcut( ZoomIn ); }
+const TDEShortcut& zoomOut() { return shortcut( ZoomOut ); }
+const TDEShortcut& help() { return shortcut( Help ); }
+const TDEShortcut& completion() { return shortcut( TextCompletion ); }
+const TDEShortcut& prevCompletion() { return shortcut( PrevCompletion ); }
+const TDEShortcut& nextCompletion() { return shortcut( NextCompletion ); }
+const TDEShortcut& rotateUp() { return shortcut( RotateUp ); }
+const TDEShortcut& rotateDown() { return shortcut( RotateDown ); }
+const TDEShortcut& substringCompletion() { return shortcut( SubstringCompletion ); }
+const TDEShortcut& popupMenuContext() { return shortcut( PopupMenuContext ); }
+const TDEShortcut& whatsThis() { return shortcut( WhatsThis ); }
+const TDEShortcut& reload() { return shortcut( Reload ); }
+const TDEShortcut& selectAll() { return shortcut( SelectAll ); }
+const TDEShortcut& up() { return shortcut( Up ); }
+const TDEShortcut& back() { return shortcut( Back ); }
+const TDEShortcut& forward() { return shortcut( Forward ); }
+const TDEShortcut& showMenubar() { return shortcut( ShowMenubar ); }
//---------------------------------------------------------------------
// ShortcutList
@@ -345,24 +345,24 @@ TQString ShortcutList::label( uint i ) const
TQString ShortcutList::whatsThis( uint ) const
{ return TQString::null; }
-const KShortcut& ShortcutList::shortcut( uint i ) const
+const TDEShortcut& ShortcutList::shortcut( uint i ) const
{
if( !g_infoStdAccel[i].bInitialized )
initialize( g_infoStdAccel[i].id );
return g_infoStdAccel[i].cut;
}
-const KShortcut& ShortcutList::shortcutDefault( uint i ) const
+const TDEShortcut& ShortcutList::shortcutDefault( uint i ) const
{
- static KShortcut cut;
- cut = KStdAccel::shortcutDefault( g_infoStdAccel[i].id );
+ static TDEShortcut cut;
+ cut = TDEStdAccel::shortcutDefault( g_infoStdAccel[i].id );
return cut;
}
bool ShortcutList::isConfigurable( uint i ) const
{ return (g_infoStdAccel[i].id != AccelNone); }
-bool ShortcutList::setShortcut( uint i, const KShortcut& cut )
+bool ShortcutList::setShortcut( uint i, const TDEShortcut& cut )
{ g_infoStdAccel[i].cut = cut; return true; }
TQVariant ShortcutList::getOther( Other, uint ) const
diff --git a/tdecore/kstdaccel.h b/tdecore/tdestdaccel.h
index 813255cc3..3914794f6 100644
--- a/tdecore/kstdaccel.h
+++ b/tdecore/tdestdaccel.h
@@ -21,24 +21,24 @@
#define KSTDACCEL_H
#include <tqstring.h>
-#include <kshortcut.h>
+#include <tdeshortcut.h>
#include "tdelibs_export.h"
class TQKeyEvent;
-class KAccelActions;
+class TDEAccelActions;
/**
- * \namespace KStdAccel
+ * \namespace TDEStdAccel
* Convenient methods for access to the common accelerator keys in
* the key configuration. These are the standard keybindings that should
* be used in all KDE applications. They will be configurable,
* so do not hardcode the default behavior.
*
* If you want real configurable keybindings in your applications,
- * please checkout the class KAccel in kaccel.h
- * @see KAccelShortcutList
+ * please checkout the class TDEAccel in tdeaccel.h
+ * @see TDEAccelShortcutList
*/
-namespace KStdAccel
+namespace TDEStdAccel
{
// Always add new std-accels to the end of this enum, never in the middle!
/**
@@ -87,7 +87,7 @@ namespace KStdAccel
* Returns the keybinding for @p accel.
* @param id the id of the accelerator
*/
- TDECORE_EXPORT const KShortcut& shortcut(StdAccel id);
+ TDECORE_EXPORT const TDEShortcut& shortcut(StdAccel id);
/**
* Returns a unique name for the given accel.
@@ -126,326 +126,326 @@ namespace KStdAccel
* @param id the id of the accelerator
* @return the default shortcut of the accelerator
*/
- TDECORE_EXPORT KShortcut shortcutDefault(StdAccel id);
+ TDECORE_EXPORT TDEShortcut shortcutDefault(StdAccel id);
/**
* Returns the hardcoded default 3 modifier shortcut for @p id.
* This does not take into account the user's configuration.
* @param id the id of the accelerator
* @return the default 3 modifier shortcut
*/
- TDECORE_EXPORT KShortcut shortcutDefault3(StdAccel id);
+ TDECORE_EXPORT TDEShortcut shortcutDefault3(StdAccel id);
/**
* Returns the hardcoded default 4 modifier shortcut for @p id.
* This does not take into account the user's configuration.
* @param id the id of the accelerator
* @return the default 4 modifier shortcut
*/
- TDECORE_EXPORT KShortcut shortcutDefault4(StdAccel id);
+ TDECORE_EXPORT TDEShortcut shortcutDefault4(StdAccel id);
/**
* Open file. Default: Ctrl-o
* @return the shortcut of the standard accelerator
*/
- TDECORE_EXPORT const KShortcut& open();
+ TDECORE_EXPORT const TDEShortcut& open();
/**
* Create a new document (or whatever). Default: Ctrl-n
* @return the shortcut of the standard accelerator
*/
- TDECORE_EXPORT const KShortcut& openNew();
+ TDECORE_EXPORT const TDEShortcut& openNew();
/**
* Close current document. Default: Ctrl-w
* @return the shortcut of the standard accelerator
*/
- TDECORE_EXPORT const KShortcut& close();
+ TDECORE_EXPORT const TDEShortcut& close();
/**
* Save current document. Default: Ctrl-s
* @return the shortcut of the standard accelerator
*/
- TDECORE_EXPORT const KShortcut& save();
+ TDECORE_EXPORT const TDEShortcut& save();
/**
* Print current document. Default: Ctrl-p
* @return the shortcut of the standard accelerator
*/
- TDECORE_EXPORT const KShortcut& print();
+ TDECORE_EXPORT const TDEShortcut& print();
/**
* Quit the program. Default: Ctrl-q
* @return the shortcut of the standard accelerator
*/
- TDECORE_EXPORT const KShortcut& quit();
+ TDECORE_EXPORT const TDEShortcut& quit();
/**
* Undo last operation. Default: Ctrl-z
* @return the shortcut of the standard accelerator
*/
- TDECORE_EXPORT const KShortcut& undo();
+ TDECORE_EXPORT const TDEShortcut& undo();
/**
* Redo. Default: Shift-Ctrl-z
* @return the shortcut of the standard accelerator
*/
- TDECORE_EXPORT const KShortcut& redo();
+ TDECORE_EXPORT const TDEShortcut& redo();
/**
* Cut selected area and store it in the clipboard. Default: Ctrl-x
* @return the shortcut of the standard accelerator
*/
- TDECORE_EXPORT const KShortcut& cut();
+ TDECORE_EXPORT const TDEShortcut& cut();
/**
* Copy selected area into the clipboard. Default: Ctrl-c
* @return the shortcut of the standard accelerator
*/
- TDECORE_EXPORT const KShortcut& copy();
+ TDECORE_EXPORT const TDEShortcut& copy();
/**
* Paste contents of clipboard at mouse/cursor position. Default: Ctrl-v
* @return the shortcut of the standard accelerator
*/
- TDECORE_EXPORT const KShortcut& paste();
+ TDECORE_EXPORT const TDEShortcut& paste();
/**
* Paste the selection at mouse/cursor position. Default: Ctrl-Shift-Insert
* @return the shortcut of the standard accelerator
* @since 3.4
*/
- TDECORE_EXPORT const KShortcut& pasteSelection();
+ TDECORE_EXPORT const TDEShortcut& pasteSelection();
/**
* Reload. Default: Ctrl-A
* @return the shortcut of the standard accelerator
**/
- TDECORE_EXPORT const KShortcut& selectAll();
+ TDECORE_EXPORT const TDEShortcut& selectAll();
/**
* Delete a word back from mouse/cursor position. Default: Ctrl-Backspace
* @return the shortcut of the standard accelerator
*/
- TDECORE_EXPORT const KShortcut& deleteWordBack();
+ TDECORE_EXPORT const TDEShortcut& deleteWordBack();
/**
* Delete a word forward from mouse/cursor position. Default: Ctrl-Delete
* @return the shortcut of the standard accelerator
*/
- TDECORE_EXPORT const KShortcut& deleteWordForward();
+ TDECORE_EXPORT const TDEShortcut& deleteWordForward();
/**
* Find, search. Default: Ctrl-f
* @return the shortcut of the standard accelerator
*/
- TDECORE_EXPORT const KShortcut& find();
+ TDECORE_EXPORT const TDEShortcut& find();
/**
* Find/search next. Default: F3
* @return the shortcut of the standard accelerator
*/
- TDECORE_EXPORT const KShortcut& findNext();
+ TDECORE_EXPORT const TDEShortcut& findNext();
/**
* Find/search previous. Default: Shift-F3
* @return the shortcut of the standard accelerator
*/
- TDECORE_EXPORT const KShortcut& findPrev();
+ TDECORE_EXPORT const TDEShortcut& findPrev();
/**
* Find and replace matches. Default: Ctrl-r
* @return the shortcut of the standard accelerator
*/
- TDECORE_EXPORT const KShortcut& replace();
+ TDECORE_EXPORT const TDEShortcut& replace();
/**
* Zoom in. Default: Ctrl-Plus
* @return the shortcut of the standard accelerator
*/
- TDECORE_EXPORT const KShortcut& zoomIn();
+ TDECORE_EXPORT const TDEShortcut& zoomIn();
/**
* Zoom out. Default: Ctrl-Minus
* @return the shortcut of the standard accelerator
*/
- TDECORE_EXPORT const KShortcut& zoomOut();
+ TDECORE_EXPORT const TDEShortcut& zoomOut();
/**
* Toggle insert/overwrite (with visual feedback, e.g. in the statusbar). Default: Insert
* @return the shortcut of the standard accelerator
*/
- TDECORE_EXPORT const KShortcut& insert();
+ TDECORE_EXPORT const TDEShortcut& insert();
/**
* Goto beginning of the document. Default: Ctrl-Home
* @return the shortcut of the standard accelerator
*/
- TDECORE_EXPORT const KShortcut& home();
+ TDECORE_EXPORT const TDEShortcut& home();
/**
* Goto end of the document. Default: Ctrl-End
* @return the shortcut of the standard accelerator
*/
- TDECORE_EXPORT const KShortcut& end();
+ TDECORE_EXPORT const TDEShortcut& end();
/**
* Goto beginning of current line. Default: Home
* @return the shortcut of the standard accelerator
* @since 3.3
*/
- TDECORE_EXPORT const KShortcut& beginningOfLine();
+ TDECORE_EXPORT const TDEShortcut& beginningOfLine();
/**
* Goto end of current line. Default: End
* @return the shortcut of the standard accelerator
* @since 3.3
*/
- TDECORE_EXPORT const KShortcut& endOfLine();
+ TDECORE_EXPORT const TDEShortcut& endOfLine();
/**
* Scroll up one page. Default: Prior
* @return the shortcut of the standard accelerator
*/
- TDECORE_EXPORT const KShortcut& prior();
+ TDECORE_EXPORT const TDEShortcut& prior();
/**
* Scroll down one page. Default: Next
* @return the shortcut of the standard accelerator
*/
- TDECORE_EXPORT const KShortcut& next();
+ TDECORE_EXPORT const TDEShortcut& next();
/**
* Go to line. Default: Ctrl+G
* @return the shortcut of the standard accelerator
*/
- TDECORE_EXPORT const KShortcut& gotoLine();
+ TDECORE_EXPORT const TDEShortcut& gotoLine();
/**
* Add current page to bookmarks. Default: Ctrl+B
* @return the shortcut of the standard accelerator
*/
- TDECORE_EXPORT const KShortcut& addBookmark();
+ TDECORE_EXPORT const TDEShortcut& addBookmark();
/**
* Next Tab. Default: Ctrl-<
* @return the shortcut of the standard accelerator
* @since 3.2
*/
- TDECORE_EXPORT const KShortcut& tabNext();
+ TDECORE_EXPORT const TDEShortcut& tabNext();
/**
* Previous Tab. Default: Ctrl->
* @return the shortcut of the standard accelerator
* @since 3.2
*/
- TDECORE_EXPORT const KShortcut& tabPrev();
+ TDECORE_EXPORT const TDEShortcut& tabPrev();
/**
* Full Screen Mode. Default: Ctrl+Shift+F
* @return the shortcut of the standard accelerator
* @since 3.2
*/
- TDECORE_EXPORT const KShortcut& fullScreen();
+ TDECORE_EXPORT const TDEShortcut& fullScreen();
/**
* Help the user in the current situation. Default: F1
* @return the shortcut of the standard accelerator
*/
- TDECORE_EXPORT const KShortcut& help();
+ TDECORE_EXPORT const TDEShortcut& help();
/**
* Complete text in input widgets. Default Ctrl+E
* @return the shortcut of the standard accelerator
**/
- TDECORE_EXPORT const KShortcut& completion();
+ TDECORE_EXPORT const TDEShortcut& completion();
/**
* Iterate through a list when completion returns
* multiple items. Default: Ctrl+Up
* @return the shortcut of the standard accelerator
*/
- TDECORE_EXPORT const KShortcut& prevCompletion();
+ TDECORE_EXPORT const TDEShortcut& prevCompletion();
/**
* Iterate through a list when completion returns
* multiple items. Default: Ctrl+Down
* @return the shortcut of the standard accelerator
*/
- TDECORE_EXPORT const KShortcut& nextCompletion();
+ TDECORE_EXPORT const TDEShortcut& nextCompletion();
/**
* Find a string within another string or list of strings.
* Default: Ctrl-T
* @return the shortcut of the standard accelerator
*/
- TDECORE_EXPORT const KShortcut& substringCompletion();
+ TDECORE_EXPORT const TDEShortcut& substringCompletion();
/**
* Help users iterate through a list of entries. Default: Up
* @return the shortcut of the standard accelerator
*/
- TDECORE_EXPORT const KShortcut& rotateUp();
+ TDECORE_EXPORT const TDEShortcut& rotateUp();
/**
* Help users iterate through a list of entries. Default: Down
* @return the shortcut of the standard accelerator
*/
- TDECORE_EXPORT const KShortcut& rotateDown();
+ TDECORE_EXPORT const TDEShortcut& rotateDown();
/**
* popup a context menu. Default: Menu
* @return the shortcut of the standard accelerator
*/
- TDECORE_EXPORT const KShortcut& popupMenuContext();
+ TDECORE_EXPORT const TDEShortcut& popupMenuContext();
/**
* What's This button. Default: Shift+F1
* @return the shortcut of the standard accelerator
*/
- TDECORE_EXPORT const KShortcut& whatsThis();
+ TDECORE_EXPORT const TDEShortcut& whatsThis();
/**
* Reload. Default: F5
* @return the shortcut of the standard accelerator
*/
- TDECORE_EXPORT const KShortcut& reload();
+ TDECORE_EXPORT const TDEShortcut& reload();
/**
* Up. Default: Alt+Up
* @return the shortcut of the standard accelerator
*/
- TDECORE_EXPORT const KShortcut& up();
+ TDECORE_EXPORT const TDEShortcut& up();
/**
* Back. Default: Alt+Left
* @return the shortcut of the standard accelerator
*/
- TDECORE_EXPORT const KShortcut& back();
+ TDECORE_EXPORT const TDEShortcut& back();
/**
* Forward. Default: ALT+Right
* @return the shortcut of the standard accelerator
*/
- TDECORE_EXPORT const KShortcut& forward();
+ TDECORE_EXPORT const TDEShortcut& forward();
/**
* BackwardWord. Default: Ctrl+Left
* @return the shortcut of the standard accelerator
* @since 3.3
*/
- TDECORE_EXPORT const KShortcut& backwardWord();
+ TDECORE_EXPORT const TDEShortcut& backwardWord();
/**
* ForwardWord. Default: Ctrl+Right
* @return the shortcut of the standard accelerator
* @since 3.3
*/
- TDECORE_EXPORT const KShortcut& forwardWord();
+ TDECORE_EXPORT const TDEShortcut& forwardWord();
/**
* Show Menu Bar. Default: Ctrl-M
* @return the shortcut of the standard accelerator
*/
- TDECORE_EXPORT const KShortcut& showMenubar();
+ TDECORE_EXPORT const TDEShortcut& showMenubar();
#if !defined(KDE_NO_COMPAT) && !defined(__KSTDACCEL_CPP_)
/**
diff --git a/tdecore/ksycoca.cpp b/tdecore/tdesycoca.cpp
index 3e30aa7c1..8f5ede967 100644
--- a/tdecore/ksycoca.cpp
+++ b/tdecore/tdesycoca.cpp
@@ -18,17 +18,17 @@
#include "config.h"
-#include "ksycoca.h"
-#include "ksycocatype.h"
-#include "ksycocafactory.h"
+#include "tdesycoca.h"
+#include "tdesycocatype.h"
+#include "tdesycocafactory.h"
#include <tqdatastream.h>
#include <tqfile.h>
#include <tqbuffer.h>
-#include <kapplication.h>
+#include <tdeapplication.h>
#include <dcopclient.h>
-#include <kglobal.h>
+#include <tdeglobal.h>
#include <kdebug.h>
#include <kprocess.h>
#include <kstandarddirs.h>
@@ -87,7 +87,7 @@ int KSycoca::version()
// Read-only constructor
KSycoca::KSycoca()
- : DCOPObject("ksycoca"), m_lstFactories(0), m_str(0), m_barray(0), bNoDatabase(false),
+ : DCOPObject("tdesycoca"), m_lstFactories(0), m_str(0), m_barray(0), bNoDatabase(false),
m_sycoca_size(0), m_sycoca_mmap(0), m_timeStamp(0)
{
d = new KSycocaPrivate;
@@ -112,21 +112,21 @@ bool KSycoca::openDatabase( bool openDummyIfNotFound )
m_str = 0;
m_barray = 0;
TQString path;
- TQCString ksycoca_env = getenv("TDESYCOCA");
- if (ksycoca_env.isEmpty())
- path = KGlobal::dirs()->saveLocation("cache") + "ksycoca";
+ TQCString tdesycoca_env = getenv("TDESYCOCA");
+ if (tdesycoca_env.isEmpty())
+ path = TDEGlobal::dirs()->saveLocation("cache") + "tdesycoca";
else
- path = TQFile::decodeName(ksycoca_env);
+ path = TQFile::decodeName(tdesycoca_env);
- kdDebug(7011) << "Trying to open ksycoca from " << path << endl;
+ kdDebug(7011) << "Trying to open tdesycoca from " << path << endl;
TQFile *database = new TQFile(path);
bool bOpen = database->open( IO_ReadOnly );
if (!bOpen)
{
- path = locate("services", "ksycoca");
+ path = locate("services", "tdesycoca");
if (!path.isEmpty())
{
- kdDebug(7011) << "Trying to open global ksycoca from " << path << endl;
+ kdDebug(7011) << "Trying to open global tdesycoca from " << path << endl;
delete database;
database = new TQFile(path);
bOpen = database->open( IO_ReadOnly );
@@ -166,7 +166,7 @@ bool KSycoca::openDatabase( bool openDummyIfNotFound )
}
else
{
- kdDebug(7011) << "Could not open ksycoca" << endl;
+ kdDebug(7011) << "Could not open tdesycoca" << endl;
// No database file
delete database;
@@ -197,7 +197,7 @@ bool KSycoca::openDatabase( bool openDummyIfNotFound )
// Read-write constructor - only for KBuildSycoca
KSycoca::KSycoca( bool /* dummy */ )
- : DCOPObject("ksycoca_building"), m_lstFactories(0), m_str(0), m_barray(0), bNoDatabase(false),
+ : DCOPObject("tdesycoca_building"), m_lstFactories(0), m_str(0), m_barray(0), bNoDatabase(false),
m_sycoca_size(0), m_sycoca_mmap(0)
{
d = new KSycocaPrivate;
@@ -206,14 +206,14 @@ KSycoca::KSycoca( bool /* dummy */ )
_self = this;
}
-static void delete_ksycoca_self() {
+static void delete_tdesycoca_self() {
delete KSycoca::_self;
}
KSycoca * KSycoca::self()
{
if (!_self) {
- tqAddPostRoutine(delete_ksycoca_self);
+ tqAddPostRoutine(delete_tdesycoca_self);
_self = new KSycoca();
}
return _self;
@@ -333,7 +333,7 @@ TQDataStream * KSycoca::findFactory(KSycocaFactoryId id)
{
triedLaunchingKdeinit = true;
kdDebug(7011) << "findFactory: we have no database.... launching tdeinit" << endl;
- KApplication::startKdeinit();
+ TDEApplication::startKdeinit();
// Ok, the new database should be here now, open it.
}
if (!openDatabase(false))
@@ -424,7 +424,7 @@ TQStringList KSycoca::allResourceDirs()
TQString KSycoca::determineRelativePath( const TQString & _fullpath, const char *_resource )
{
TQString sRelativeFilePath;
- TQStringList dirs = KGlobal::dirs()->resourceDirs( _resource );
+ TQStringList dirs = TDEGlobal::dirs()->resourceDirs( _resource );
TQStringList::ConstIterator dirsit = dirs.begin();
for ( ; dirsit != dirs.end() && sRelativeFilePath.isEmpty(); ++dirsit ) {
// might need canonicalPath() ...
@@ -450,7 +450,7 @@ void KSycoca::flagError()
return;
_self->d->readError = true;
if (_self->d->autoRebuild)
- if(system("kbuildsycoca") < 0) // Rebuild the damned thing.
+ if(system("tdebuildsycoca") < 0) // Rebuild the damned thing.
tqWarning("ERROR: Running KSycoca failed.");
}
}
@@ -525,4 +525,4 @@ void KSycoca::virtual_hook( int id, void* data )
void KSycocaEntry::virtual_hook( int, void* )
{ /*BASE::virtual_hook( id, data );*/ }
-#include "ksycoca.moc"
+#include "tdesycoca.moc"
diff --git a/tdecore/ksycoca.h b/tdecore/tdesycoca.h
index adf9d2aa7..4b43d4607 100644
--- a/tdecore/ksycoca.h
+++ b/tdecore/tdesycoca.h
@@ -16,13 +16,13 @@
* Boston, MA 02110-1301, USA.
**/
-#ifndef __ksycoca_h__
-#define __ksycoca_h__
+#ifndef __tdesycoca_h__
+#define __tdesycoca_h__
#include <dcopobject.h>
#include <tqobject.h>
#include <tqstringlist.h>
-#include "ksycocatype.h"
+#include "tdesycocatype.h"
#include <tdelibs_export.h>
class TQDataStream;
@@ -99,7 +99,7 @@ public:
* @internal - returns update signature of database
*
* Signature that keeps track of changes to
- * $TDEDIR/share/services/update_ksycoca
+ * $TDEDIR/share/services/update_tdesycoca
*
* Touching this file causes the database to be recreated
* from scratch.
@@ -124,7 +124,7 @@ public:
virtual bool isBuilding() { return false; }
/**
- * @internal - disables launching of kbuildsycoca
+ * @internal - disables launching of tdebuildsycoca
*/
void disableAutoRebuild();
@@ -136,7 +136,7 @@ public:
/**
* When you receive a "databaseChanged" signal, you can query here if
* a change has occurred in a specific resource type.
- * @see KStandardDirs for the various resource types.
+ * @see TDEStandardDirs for the various resource types.
*/
static bool isChanged(const char *type);
@@ -152,7 +152,7 @@ public:
k_dcop:
/**
- * internal function for receiving kded/kbuildsycoca's signal, when the sycoca file changes
+ * internal function for receiving kded/tdebuildsycoca's signal, when the sycoca file changes
*/
void notifyDatabaseChanged(const TQStringList &);
diff --git a/tdecore/ksycocadict.cpp b/tdecore/tdesycocadict.cpp
index d8dcf3a24..702c163a7 100644
--- a/tdecore/ksycocadict.cpp
+++ b/tdecore/tdesycocadict.cpp
@@ -16,9 +16,9 @@
* Boston, MA 02110-1301, USA.
**/
-#include "ksycocadict.h"
-#include "ksycocaentry.h"
-#include "ksycoca.h"
+#include "tdesycocadict.h"
+#include "tdesycocaentry.h"
+#include "tdesycoca.h"
#include <tqptrlist.h>
#include <tqvaluelist.h>
diff --git a/tdecore/ksycocadict.h b/tdecore/tdesycocadict.h
index 79f1432e8..006e72a61 100644
--- a/tdecore/ksycocadict.h
+++ b/tdecore/tdesycocadict.h
@@ -16,8 +16,8 @@
* Boston, MA 02110-1301, USA.
**/
-#ifndef __ksycocadict_h__
-#define __ksycocadict_h__
+#ifndef __tdesycocadict_h__
+#define __tdesycocadict_h__
#include <tqstring.h>
#include <tqvaluelist.h>
diff --git a/tdecore/ksycocaentry.h b/tdecore/tdesycocaentry.h
index a3071ec5a..d7ddbaf20 100644
--- a/tdecore/ksycocaentry.h
+++ b/tdecore/tdesycocaentry.h
@@ -16,10 +16,10 @@
* Boston, MA 02110-1301, USA.
**/
-#ifndef __ksycocaentry_h__
-#define __ksycocaentry_h__
+#ifndef __tdesycocaentry_h__
+#define __tdesycocaentry_h__
-#include "ksycocatype.h"
+#include "tdesycocatype.h"
#include <tqstringlist.h>
#include <ksharedptr.h>
@@ -32,9 +32,9 @@ class TQDataStream;
* the common functionality for servicetypes and services.
*
* @internal
- * @see http://developer.kde.org/documentation/library/kdeqt/trinityarch/ksycoca.html
+ * @see http://developer.kde.org/documentation/library/kdeqt/trinityarch/tdesycoca.html
*/
-class TDECORE_EXPORT KSycocaEntry : public KShared
+class TDECORE_EXPORT KSycocaEntry : public TDEShared
{
public:
@@ -42,7 +42,7 @@ public:
virtual KSycocaType sycocaType() const { return KST_KSycocaEntry; }
public:
- typedef KSharedPtr<KSycocaEntry> Ptr;
+ typedef TDESharedPtr<KSycocaEntry> Ptr;
typedef TQValueList<Ptr> List;
public: // KDoc seems to barf on those typedefs and generates no docs after them
/**
diff --git a/tdecore/ksycocafactory.cpp b/tdecore/tdesycocafactory.cpp
index c224ebe79..bffd12b6a 100644
--- a/tdecore/ksycocafactory.cpp
+++ b/tdecore/tdesycocafactory.cpp
@@ -16,17 +16,17 @@
* Boston, MA 02110-1301, USA.
**/
-#include "ksycoca.h"
-#include "ksycocatype.h"
-#include "ksycocafactory.h"
-#include "ksycocaentry.h"
-#include "ksycocadict.h"
+#include "tdesycoca.h"
+#include "tdesycocatype.h"
+#include "tdesycocafactory.h"
+#include "tdesycocaentry.h"
+#include "tdesycocadict.h"
#include <tqstringlist.h>
#include <tqdict.h>
#include <kdebug.h>
template class TQDict<KSycocaEntry>;
-template class TQDict<KSharedPtr<KSycocaEntry> >;
+template class TQDict<TDESharedPtr<KSycocaEntry> >;
KSycocaFactory::KSycocaFactory(KSycocaFactoryId factory_id)
: m_resourceList(0), m_entryDict(0), m_sycocaDict(0)
diff --git a/tdecore/ksycocafactory.h b/tdecore/tdesycocafactory.h
index 100047834..4569fff5a 100644
--- a/tdecore/ksycocafactory.h
+++ b/tdecore/tdesycocafactory.h
@@ -16,11 +16,11 @@
* Boston, MA 02110-1301, USA.
**/
-#ifndef __ksycocafactory_h__
-#define __ksycocafactory_h__
+#ifndef __tdesycocafactory_h__
+#define __tdesycocafactory_h__
-#include "ksycocatype.h"
-#include "ksycocaentry.h"
+#include "tdesycocatype.h"
+#include "tdesycocaentry.h"
#include <tqdict.h>
#include <tqptrlist.h>
diff --git a/tdecore/ksycocatype.h b/tdecore/tdesycocatype.h
index 889c3be6d..8407782fc 100644
--- a/tdecore/ksycocatype.h
+++ b/tdecore/tdesycocatype.h
@@ -18,8 +18,8 @@
Boston, MA 02110-1301, USA.
*/
-#ifndef __ksycocatype_h__
-#define __ksycocatype_h__
+#ifndef __tdesycocatype_h__
+#define __tdesycocatype_h__
/**
* \relates KSycocaEntry
diff --git a/tdecore/ktempfile.cpp b/tdecore/tdetempfile.cpp
index 4632f0053..805d315a1 100644
--- a/tdecore/ktempfile.cpp
+++ b/tdecore/tdetempfile.cpp
@@ -48,10 +48,10 @@
#include <tqdatastream.h>
#include <tqtextstream.h>
-#include "kglobal.h"
-#include "kapplication.h"
+#include "tdeglobal.h"
+#include "tdeapplication.h"
#include "kinstance.h"
-#include "ktempfile.h"
+#include "tdetempfile.h"
#include "kstandarddirs.h"
#include "kde_file.h"
#include "kdebug.h"
@@ -71,7 +71,7 @@ KTempFile::KTempFile(TQString filePrefix, TQString fileExtension, int mode)
fileExtension = ".tmp";
if (filePrefix.isEmpty())
{
- filePrefix = locateLocal("tmp", KGlobal::instance()->instanceName());
+ filePrefix = locateLocal("tmp", TDEGlobal::instance()->instanceName());
}
(void) create(filePrefix, fileExtension, mode);
}
@@ -93,7 +93,7 @@ KTempFile::create(const TQString &filePrefix, const TQString &fileExtension,
int mode)
{
// make sure the random seed is randomized
- (void) KApplication::random();
+ (void) TDEApplication::random();
TQCString ext = TQFile::encodeName(fileExtension);
TQCString nme = TQFile::encodeName(filePrefix) + "XXXXXX" + ext;
diff --git a/tdecore/ktempfile.h b/tdecore/tdetempfile.h
index 38cd8b5aa..abc78ffbf 100644
--- a/tdecore/ktempfile.h
+++ b/tdecore/tdetempfile.h
@@ -48,7 +48,7 @@ class KTempFilePrivate;
*
* KTempFile does not create any missing directories, but locateLocal() does.
*
- * See also KStandardDirs
+ * See also TDEStandardDirs
*
* @author Waldo Bastian <bastian@kde.org>
*/
diff --git a/tdecore/tests/KIDLTest.cpp b/tdecore/tests/KIDLTest.cpp
index e714bc52f..a54e32be5 100644
--- a/tdecore/tests/KIDLTest.cpp
+++ b/tdecore/tests/KIDLTest.cpp
@@ -1,6 +1,6 @@
#include "KIDLTest.h"
-#include <kapplication.h>
+#include <tdeapplication.h>
#include <dcopclient.h>
KIDLTest::KIDLTest( const TQCString& id )
@@ -18,7 +18,7 @@ TQString KIDLTest::hello( const TQString& name )
int main( int argc, char** argv )
{
- KApplication app( argc, argv, "kidlservertest", false /* No GUI */ );
+ TDEApplication app( argc, argv, "kidlservertest", false /* No GUI */ );
app.dcopClient()->attach();
app.dcopClient()->registerAs( "kidlservertest" );
diff --git a/tdecore/tests/KIDLTestClient.cpp b/tdecore/tests/KIDLTestClient.cpp
index 87884c05a..4614ed51e 100644
--- a/tdecore/tests/KIDLTestClient.cpp
+++ b/tdecore/tests/KIDLTestClient.cpp
@@ -1,11 +1,11 @@
-#include <kapplication.h>
+#include <tdeapplication.h>
#include <dcopclient.h>
#include "KIDLTest_stub.h"
int main( int argc, char** argv )
{
- KApplication app( argc, argv, "KIDLTestClient", false /* No GUI */ );
+ TDEApplication app( argc, argv, "KIDLTestClient", false /* No GUI */ );
kapp->dcopClient()->attach();
// kapp->dcopClient()->registerAs( "kidlclienttest" );
diff --git a/tdecore/tests/Makefile.am b/tdecore/tests/Makefile.am
index e35ae68a4..a831eb65c 100644
--- a/tdecore/tests/Makefile.am
+++ b/tdecore/tests/Makefile.am
@@ -21,16 +21,16 @@ INCLUDES = -I$(top_srcdir)/tdecore $(all_includes)
AM_LDFLAGS = $(QT_LDFLAGS) $(X_LDFLAGS) $(KDE_RPATH)
-check_PROGRAMS = kconfigtestgui klocaletest kprocesstest ksimpleconfigtest \
+check_PROGRAMS = tdeconfigtestgui klocaletest kprocesstest ksimpleconfigtest \
kstddirstest kurltest kuniqueapptest ktempfiletest krandomsequencetest \
kdebugtest ksocktest kstringhandlertest kcmdlineargstest kapptest \
kmemtest kidlservertest kidlclienttest dcopkonqtest kipctest \
cplusplustest kiconloadertest kresolvertest kmdcodectest knotifytest \
ksortablevaluelisttest krfcdatetest testqtargs kprociotest \
kcharsetstest kcalendartest kmacroexpandertest kshelltest \
- kxerrorhandlertest startserviceby kstdacceltest kglobaltest ktimezonestest
+ kxerrorhandlertest startserviceby tdestdacceltest kglobaltest ktimezonestest
-TESTS = kurltest kstdacceltest
+TESTS = kurltest tdestdacceltest
noinst_HEADERS = klocaletest.h kprocesstest.h KIDLTest.h \
kipctest.h kprociotest.h
@@ -38,10 +38,10 @@ noinst_HEADERS = klocaletest.h kprocesstest.h KIDLTest.h \
METASOURCES = AUTO
LDADD = ../libtdecore.la
-kconfigtestgui_SOURCES = kconfigtestgui.cpp
+tdeconfigtestgui_SOURCES = tdeconfigtestgui.cpp
kdebugtest_SOURCES = kdebugtest.cpp
klocaletest_SOURCES = klocaletest.cpp
-#klocaletest2_SOURCES = klocaletest2.cpp klocale.cpp libintl.cpp kcatalogue.cpp
+#klocaletest2_SOURCES = klocaletest2.cpp tdelocale.cpp libintl.cpp kcatalogue.cpp
#kcatalogue_SOURCES = kcatalogue.cpp libintl.cpp
ksimpleconfigtest_SOURCES = ksimpleconfigtest.cpp
kurltest_SOURCES = kurltest.cpp
@@ -75,12 +75,12 @@ kmacroexpandertest_SOURCES = kmacroexpandertest.cpp
kshelltest_SOURCES = kshelltest.cpp
kxerrorhandlertest_SOURCES = kxerrorhandlertest.cpp
startserviceby_SOURCES = startserviceby.cpp
-kstdacceltest_SOURCES = kstdacceltest.cpp
+tdestdacceltest_SOURCES = tdestdacceltest.cpp
kglobaltest_SOURCES = kglobaltest.cpp
ktimezonestest_SOURCES = ktimezonestest.cpp
-check_LTLIBRARIES = kunittest_kconfig.la
+check_LTLIBRARIES = tdeunittest_tdeconfig.la
-kunittest_kconfig_la_SOURCES = kconfigtest.cpp
-kunittest_kconfig_la_LIBADD = $(LIB_KUNITTEST)
-kunittest_kconfig_la_LDFLAGS = -module $(KDE_CHECK_PLUGIN)
+tdeunittest_tdeconfig_la_SOURCES = tdeconfigtest.cpp
+tdeunittest_tdeconfig_la_LIBADD = $(LIB_KUNITTEST)
+tdeunittest_tdeconfig_la_LDFLAGS = -module $(KDE_CHECK_PLUGIN)
diff --git a/tdecore/tests/dcopkonqtest.cpp b/tdecore/tests/dcopkonqtest.cpp
index 8830d34c7..b8bb055d6 100644
--- a/tdecore/tests/dcopkonqtest.cpp
+++ b/tdecore/tests/dcopkonqtest.cpp
@@ -1,10 +1,10 @@
-#include <kapplication.h>
+#include <tdeapplication.h>
#include <kdebug.h>
#include <dcopclient.h>
int main( int argc, char** argv )
{
- KApplication app( argc, argv, "KIDLTestClient", false );
+ TDEApplication app( argc, argv, "KIDLTestClient", false );
kapp->dcopClient()->attach();
// kapp->dcopClient()->registerAs( "kidlclienttest" );
@@ -27,8 +27,8 @@ debug("sending configure to object KonquerorIface in konqueror");
debug("ko");
/// BROADCAST
-debug("sending databaseChanged to object ksycoca in all apps");
- if (kapp->dcopClient()->send( "*", "ksycoca", "databaseChanged()", data ))
+debug("sending databaseChanged to object tdesycoca in all apps");
+ if (kapp->dcopClient()->send( "*", "tdesycoca", "databaseChanged()", data ))
debug("ok");
else
debug("ko");
diff --git a/tdecore/tests/kapptest.cpp b/tdecore/tests/kapptest.cpp
index 7e3b47f43..6a3abace9 100644
--- a/tdecore/tests/kapptest.cpp
+++ b/tdecore/tests/kapptest.cpp
@@ -17,24 +17,24 @@
*/
#define private public
-#include "kapplication.h"
+#include "tdeapplication.h"
#include <stdio.h>
-#include <kcmdlineargs.h>
-#include <kaboutdata.h>
-#include <kglobalsettings.h>
-#include <ksycoca.h>
+#include <tdecmdlineargs.h>
+#include <tdeaboutdata.h>
+#include <tdeglobalsettings.h>
+#include <tdesycoca.h>
int
main(int argc, char *argv[])
{
- KAboutData about("kapptest", "kapptest", "version");
- KCmdLineArgs::init(argc, argv, &about);
+ TDEAboutData about("kapptest", "kapptest", "version");
+ TDECmdLineArgs::init(argc, argv, &about);
- KApplication a;
+ TDEApplication a;
KSycoca *s = KSycoca::self();
tqWarning("s->language() %s", s->language().latin1());
- tqWarning("Offset of aIconName: %ld", (long) &(static_cast<KApplication *>(0)->aIconName));
+ tqWarning("Offset of aIconName: %ld", (long) &(static_cast<TDEApplication *>(0)->aIconName));
}
diff --git a/tdecore/tests/kcalendartest.cpp b/tdecore/tests/kcalendartest.cpp
index 51a40b892..7dc2cc6d7 100644
--- a/tdecore/tests/kcalendartest.cpp
+++ b/tdecore/tests/kcalendartest.cpp
@@ -7,20 +7,20 @@
#include <tqstringlist.h>
-#include <kapplication.h>
-#include <kaboutdata.h>
+#include <tdeapplication.h>
+#include <tdeaboutdata.h>
#include <kdebug.h>
-#include <kglobal.h>
-#include <klocale.h>
-#include <kcmdlineargs.h>
+#include <tdeglobal.h>
+#include <tdelocale.h>
+#include <tdecmdlineargs.h>
-class KLocale;
+class TDELocale;
void test(TQDate & date);
static const char description[] = "KCalendarTest";
-static KCmdLineOptions options[] =
+static TDECmdLineOptions options[] =
{
{ "help", I18N_NOOP("Prints this help"), 0 },
{ "type hijri|gregorian|jalali|hebrew", I18N_NOOP("Supported calendar types"), 0 },
@@ -32,19 +32,19 @@ int main(int argc, char **argv) {
TQDate date;
TQString calType, option;
- KAboutData aboutData( "kcalendartest", "KCalendarTest" ,
- "0.1", description, KAboutData::License_GPL,
+ TDEAboutData aboutData( "kcalendartest", "KCalendarTest" ,
+ "0.1", description, TDEAboutData::License_GPL,
"(c) 2002, Carlos Moro", 0, 0,
"cfmoro@correo.uniovi.es");
aboutData.addAuthor("Carlos Moro",0, "cfmoro@correo.uniovi.es");
- KCmdLineArgs::init( argc, argv, &aboutData );
- KCmdLineArgs::addCmdLineOptions( options ); // Add our own options.
+ TDECmdLineArgs::init( argc, argv, &aboutData );
+ TDECmdLineArgs::addCmdLineOptions( options ); // Add our own options.
- KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
+ TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
- KApplication app(false, false);
+ TDEApplication app(false, false);
TQStringList lst = KCalendarSystemFactory::calendarSystems();
kdDebug() << "Supported calendar types: " << endl;
@@ -57,7 +57,7 @@ int main(int argc, char **argv) {
calType = args->getOption("type");
- KGlobal::locale()->setCalendar(calType);
+ TDEGlobal::locale()->setCalendar(calType);
/*
* If we like to see some date
@@ -65,7 +65,7 @@ int main(int argc, char **argv) {
*/
if ( args->isSet("date") ) {
option = args->getOption("date");
- date = KGlobal::locale()->readDate(option);
+ date = TDEGlobal::locale()->readDate(option);
} else
date = TQDate::currentDate();
@@ -81,72 +81,72 @@ int main(int argc, char **argv) {
void test(TQDate & date) {
- kdDebug() << "(KLocale) readDate" << endl;
+ kdDebug() << "(TDELocale) readDate" << endl;
- kdDebug() << "Created calendar: " << KGlobal::locale()->calendar()->calendarName() << endl;
+ kdDebug() << "Created calendar: " << TDEGlobal::locale()->calendar()->calendarName() << endl;
- kdDebug() << "Day name for first day of week is " << KGlobal::locale()->calendar()->weekDayName(1) << endl;
- kdDebug() << "Short month name for second month is " << KGlobal::locale()->calendar()->weekDayName(1, true) << endl;
+ kdDebug() << "Day name for first day of week is " << TDEGlobal::locale()->calendar()->weekDayName(1) << endl;
+ kdDebug() << "Short month name for second month is " << TDEGlobal::locale()->calendar()->weekDayName(1, true) << endl;
- kdDebug() << "Month name for second month is " << KGlobal::locale()->calendar()->monthName(2, KGlobal::locale()->calendar()->year(date)) << endl;
- kdDebug() << "Short month name for second month is " << KGlobal::locale()->calendar()->monthName(2, KGlobal::locale()->calendar()->year(date), true) << endl;
- kdDebug() << "Month name possessive for second month is " << KGlobal::locale()->calendar()->monthNamePossessive(2, KGlobal::locale()->calendar()->year(date)) << endl;
- kdDebug() << "Short month name possessive for second month is " << KGlobal::locale()->calendar()->monthNamePossessive(2, KGlobal::locale()->calendar()->year(date), true) << endl;
- kdDebug() << "Month name for fifth month is " << KGlobal::locale()->calendar()->monthName(5, KGlobal::locale()->calendar()->year(date)) << endl;
- kdDebug() << "Short month name for fifth month is " << KGlobal::locale()->calendar()->monthName(5, KGlobal::locale()->calendar()->year(date), true) << endl;
- kdDebug() << "Month name possessive for fifth month is " << KGlobal::locale()->calendar()->monthNamePossessive(5, KGlobal::locale()->calendar()->year(date)) << endl;
- kdDebug() << "Short month name possessive for fifth month is " << KGlobal::locale()->calendar()->monthNamePossessive(5, KGlobal::locale()->calendar()->year(date), true) << endl;
+ kdDebug() << "Month name for second month is " << TDEGlobal::locale()->calendar()->monthName(2, TDEGlobal::locale()->calendar()->year(date)) << endl;
+ kdDebug() << "Short month name for second month is " << TDEGlobal::locale()->calendar()->monthName(2, TDEGlobal::locale()->calendar()->year(date), true) << endl;
+ kdDebug() << "Month name possessive for second month is " << TDEGlobal::locale()->calendar()->monthNamePossessive(2, TDEGlobal::locale()->calendar()->year(date)) << endl;
+ kdDebug() << "Short month name possessive for second month is " << TDEGlobal::locale()->calendar()->monthNamePossessive(2, TDEGlobal::locale()->calendar()->year(date), true) << endl;
+ kdDebug() << "Month name for fifth month is " << TDEGlobal::locale()->calendar()->monthName(5, TDEGlobal::locale()->calendar()->year(date)) << endl;
+ kdDebug() << "Short month name for fifth month is " << TDEGlobal::locale()->calendar()->monthName(5, TDEGlobal::locale()->calendar()->year(date), true) << endl;
+ kdDebug() << "Month name possessive for fifth month is " << TDEGlobal::locale()->calendar()->monthNamePossessive(5, TDEGlobal::locale()->calendar()->year(date)) << endl;
+ kdDebug() << "Short month name possessive for fifth month is " << TDEGlobal::locale()->calendar()->monthNamePossessive(5, TDEGlobal::locale()->calendar()->year(date), true) << endl;
- kdDebug() << "Day for date " << date.toString() << " is " << KGlobal::locale()->calendar()->day(date) << endl;
- kdDebug() << "Month for date " << date.toString() << " is " << KGlobal::locale()->calendar()->month(date) << endl;
- kdDebug() << "Year for date " << date.toString() << " is " << KGlobal::locale()->calendar()->year(date) << endl;
+ kdDebug() << "Day for date " << date.toString() << " is " << TDEGlobal::locale()->calendar()->day(date) << endl;
+ kdDebug() << "Month for date " << date.toString() << " is " << TDEGlobal::locale()->calendar()->month(date) << endl;
+ kdDebug() << "Year for date " << date.toString() << " is " << TDEGlobal::locale()->calendar()->year(date) << endl;
- kdDebug() << "Day for date " << date.toString() << " as a string is " << KGlobal::locale()->calendar()->dayString(date, true) << endl;
- kdDebug() << "Month for date " << date.toString() << " as a string is " << KGlobal::locale()->calendar()->monthString(date, true) << endl;
- kdDebug() << "Year for date " << date.toString() << " as a string is " << KGlobal::locale()->calendar()->yearString(date, true) << endl;
+ kdDebug() << "Day for date " << date.toString() << " as a string is " << TDEGlobal::locale()->calendar()->dayString(date, true) << endl;
+ kdDebug() << "Month for date " << date.toString() << " as a string is " << TDEGlobal::locale()->calendar()->monthString(date, true) << endl;
+ kdDebug() << "Year for date " << date.toString() << " as a string is " << TDEGlobal::locale()->calendar()->yearString(date, true) << endl;
- kdDebug() << "Day of week for date " << date.toString() << " is number " << KGlobal::locale()->calendar()->dayOfWeek(date) << endl;
- kdDebug() << "Week name for date " << date.toString() << " is " << KGlobal::locale()->calendar()->weekDayName(date) << endl;
- kdDebug() << "Short week name for date " << date.toString() << " is " << KGlobal::locale()->calendar()->weekDayName(date, true) << endl;
+ kdDebug() << "Day of week for date " << date.toString() << " is number " << TDEGlobal::locale()->calendar()->dayOfWeek(date) << endl;
+ kdDebug() << "Week name for date " << date.toString() << " is " << TDEGlobal::locale()->calendar()->weekDayName(date) << endl;
+ kdDebug() << "Short week name for date " << date.toString() << " is " << TDEGlobal::locale()->calendar()->weekDayName(date, true) << endl;
- kdDebug() << "Month name for date " << date.toString() << " is " << KGlobal::locale()->calendar()->monthName(date) << endl;
- kdDebug() << "Short month name for date " << date.toString() << " is " << KGlobal::locale()->calendar()->monthName(date, true) << endl;
- kdDebug() << "Month name possessive for date " << date.toString() << " is " << KGlobal::locale()->calendar()->monthNamePossessive(date) << endl;
- kdDebug() << "Short month name possessive for date " << date.toString() << " is " << KGlobal::locale()->calendar()->monthNamePossessive(date, true) << endl;
+ kdDebug() << "Month name for date " << date.toString() << " is " << TDEGlobal::locale()->calendar()->monthName(date) << endl;
+ kdDebug() << "Short month name for date " << date.toString() << " is " << TDEGlobal::locale()->calendar()->monthName(date, true) << endl;
+ kdDebug() << "Month name possessive for date " << date.toString() << " is " << TDEGlobal::locale()->calendar()->monthNamePossessive(date) << endl;
+ kdDebug() << "Short month name possessive for date " << date.toString() << " is " << TDEGlobal::locale()->calendar()->monthNamePossessive(date, true) << endl;
- kdDebug() << "It's week number " << KGlobal::locale()->calendar()->weekNumber(date) << endl;
+ kdDebug() << "It's week number " << TDEGlobal::locale()->calendar()->weekNumber(date) << endl;
- kdDebug() << "(KLocale) Formatted date: " << KGlobal::locale()->formatDate(date) << endl;
- kdDebug() << "(KLocale) Short formatted date: " << KGlobal::locale()->formatDate(date, true) << endl;
+ kdDebug() << "(TDELocale) Formatted date: " << TDEGlobal::locale()->formatDate(date) << endl;
+ kdDebug() << "(TDELocale) Short formatted date: " << TDEGlobal::locale()->formatDate(date, true) << endl;
- kdDebug() << "That month have : " << KGlobal::locale()->calendar()->daysInMonth(date) << " days" << endl;
+ kdDebug() << "That month have : " << TDEGlobal::locale()->calendar()->daysInMonth(date) << " days" << endl;
- kdDebug() << "That year has " << KGlobal::locale()->calendar()->monthsInYear(date) << " months" << endl;
- kdDebug() << "There are " << KGlobal::locale()->calendar()->weeksInYear(KGlobal::locale()->calendar()->year(date)) << " weeks that year" << endl;
- kdDebug() << "There are " << KGlobal::locale()->calendar()->daysInYear(date) << " days that year" << endl;
+ kdDebug() << "That year has " << TDEGlobal::locale()->calendar()->monthsInYear(date) << " months" << endl;
+ kdDebug() << "There are " << TDEGlobal::locale()->calendar()->weeksInYear(TDEGlobal::locale()->calendar()->year(date)) << " weeks that year" << endl;
+ kdDebug() << "There are " << TDEGlobal::locale()->calendar()->daysInYear(date) << " days that year" << endl;
- kdDebug() << "The day of pray is number " << KGlobal::locale()->calendar()->weekDayOfPray() << endl;
+ kdDebug() << "The day of pray is number " << TDEGlobal::locale()->calendar()->weekDayOfPray() << endl;
- kdDebug() << "Max valid year supported is " << KGlobal::locale()->calendar()->maxValidYear() << endl;
- kdDebug() << "Min valid year supported is " << KGlobal::locale()->calendar()->minValidYear() << endl;
+ kdDebug() << "Max valid year supported is " << TDEGlobal::locale()->calendar()->maxValidYear() << endl;
+ kdDebug() << "Min valid year supported is " << TDEGlobal::locale()->calendar()->minValidYear() << endl;
- kdDebug() << "It's the day number " << KGlobal::locale()->calendar()->dayOfYear(date) << " of year" << endl;
+ kdDebug() << "It's the day number " << TDEGlobal::locale()->calendar()->dayOfYear(date) << " of year" << endl;
kdDebug() << "Add 3 days" << endl;
- date = KGlobal::locale()->calendar()->addDays(date, 3);
- kdDebug() << "It's " << KGlobal::locale()->formatDate(date) << endl;
+ date = TDEGlobal::locale()->calendar()->addDays(date, 3);
+ kdDebug() << "It's " << TDEGlobal::locale()->formatDate(date) << endl;
kdDebug() << "Then add 3 months" << endl;
- date = KGlobal::locale()->calendar()->addMonths(date, 3);
- kdDebug() << "It's " << KGlobal::locale()->formatDate(date) << endl;
+ date = TDEGlobal::locale()->calendar()->addMonths(date, 3);
+ kdDebug() << "It's " << TDEGlobal::locale()->formatDate(date) << endl;
kdDebug() << "And last, add -3 years" << endl;
- date = KGlobal::locale()->calendar()->addYears(date, -3);
- kdDebug() << "It's " << KGlobal::locale()->formatDate(date) << endl;
+ date = TDEGlobal::locale()->calendar()->addYears(date, -3);
+ kdDebug() << "It's " << TDEGlobal::locale()->formatDate(date) << endl;
- kdDebug() << "Is lunar based: " << KGlobal::locale()->calendar()->isLunar() << endl;
- kdDebug() << "Is lunisolar based: " << KGlobal::locale()->calendar()->isLunisolar() << endl;
- kdDebug() << "Is solar based: " << KGlobal::locale()->calendar()->isSolar() << endl;
+ kdDebug() << "Is lunar based: " << TDEGlobal::locale()->calendar()->isLunar() << endl;
+ kdDebug() << "Is lunisolar based: " << TDEGlobal::locale()->calendar()->isLunisolar() << endl;
+ kdDebug() << "Is solar based: " << TDEGlobal::locale()->calendar()->isSolar() << endl;
}
diff --git a/tdecore/tests/kcmdlineargstest.cpp b/tdecore/tests/kcmdlineargstest.cpp
index 299196810..5213e443f 100644
--- a/tdecore/tests/kcmdlineargstest.cpp
+++ b/tdecore/tests/kcmdlineargstest.cpp
@@ -1,6 +1,6 @@
-#include <kcmdlineargs.h>
-#include <klocale.h>
-#include <kapplication.h>
+#include <tdecmdlineargs.h>
+#include <tdelocale.h>
+#include <tdeapplication.h>
#include <stdio.h>
@@ -11,30 +11,30 @@
static const char version[] = "v0.0.2 1999 (c) Waldo Bastian";
static const char description[] = I18N_NOP("This is a test program.");
-static KCmdLineOptions options[] =
+static TDECmdLineOptions options[] =
{
{ "test", I18N_NOP("do a short test only, note that\n"
"this is rather long comment"), 0 },
{ "baud <baudrate>", I18N_NOP("set baudrate"), "9600" },
{ "+file(s)", I18N_NOP("Files to load"), 0 },
- KCmdLineLastOption
+ TDECmdLineLastOption
};
#if 1
int
main(int argc, char *argv[])
{
- KLocale::setMainCatalogue("tdelibs");
- KCmdLineArgs::init( argc, argv, "testapp", description, version);
+ TDELocale::setMainCatalogue("tdelibs");
+ TDECmdLineArgs::init( argc, argv, "testapp", description, version);
- KCmdLineArgs::addCmdLineOptions( options ); // Add my own options.
+ TDECmdLineArgs::addCmdLineOptions( options ); // Add my own options.
// MyWidget::addCmdLineOptions();
- KApplication k( false, false /*true, true*/ );
+ TDEApplication k( false, false /*true, true*/ );
// Get application specific arguments
- KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
+ TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
// Check if an option is set
if (args->isSet("test"))
{
@@ -79,9 +79,9 @@ main(int argc, char *argv[])
int
main(int argc, char *argv[])
{
- KCmdLineArgs::init( argc, argv, "testapp", description, version);
+ TDECmdLineArgs::init( argc, argv, "testapp", description, version);
- KApplication k( true, true );
+ TDEApplication k( true, true );
k.exec();
return 0;
diff --git a/tdecore/tests/kdebugtest.cpp b/tdecore/tests/kdebugtest.cpp
index ee49127ea..cc85b4554 100644
--- a/tdecore/tests/kdebugtest.cpp
+++ b/tdecore/tests/kdebugtest.cpp
@@ -26,7 +26,7 @@ public:
kdDebug(2 == 2) << "this is right " << perror << endl;
kdDebug() << "Before instance creation" << endl;
kdDebug(1202) << "Before instance creation" << endl;
- KInstance i("kdebugtest");
+ TDEInstance i("kdebugtest");
kdDebug(1) << "kDebugInfo with inexisting area number" << endl;
kdDebug(1202) << "This number has a value of " << 5 << endl;
// kdDebug() << "This number should come out as appname " << 5 << " " << "test" << endl;
diff --git a/tdecore/tests/kglobaltest.cpp b/tdecore/tests/kglobaltest.cpp
index d03be209e..852e2ba34 100644
--- a/tdecore/tests/kglobaltest.cpp
+++ b/tdecore/tests/kglobaltest.cpp
@@ -1,12 +1,12 @@
#include <config.h>
-#include <kglobal.h>
+#include <tdeglobal.h>
#include <stdio.h>
-#include <kapplication.h>
+#include <tdeapplication.h>
#include <stdlib.h>
#include <kdebug.h>
#include <assert.h>
-#include <kcmdlineargs.h>
+#include <tdecmdlineargs.h>
static bool check(const TQString& txt, TQString a, TQString b)
{
@@ -53,9 +53,9 @@ void testkasciistricmp()
int main(int argc, char *argv[])
{
- KApplication::disableAutoDcopRegistration();
- KCmdLineArgs::init( argc, argv, "kglobaltest", 0, 0, 0, 0 );
- KApplication app( false, false );
+ TDEApplication::disableAutoDcopRegistration();
+ TDECmdLineArgs::init( argc, argv, "kglobaltest", 0, 0, 0, 0 );
+ TDEApplication app( false, false );
testkasciistricmp();
diff --git a/tdecore/tests/kiconloadertest.cpp b/tdecore/tests/kiconloadertest.cpp
index 96a7a6813..c6da1994c 100644
--- a/tdecore/tests/kiconloadertest.cpp
+++ b/tdecore/tests/kiconloadertest.cpp
@@ -1,20 +1,20 @@
#include <kiconloader.h>
#include <tqdatetime.h>
#include <stdio.h>
-#include <kapplication.h>
+#include <tdeapplication.h>
#include <stdlib.h>
#include <kdebug.h>
int main(int argc, char *argv[])
{
- KApplication app(argc,argv,"kiconloadertest"/*,false,false*/);
+ TDEApplication app(argc,argv,"kiconloadertest"/*,false,false*/);
- KIconLoader * mpLoader = KGlobal::iconLoader();
- KIcon::Context mContext = KIcon::Application;
+ TDEIconLoader * mpLoader = TDEGlobal::iconLoader();
+ TDEIcon::Context mContext = TDEIcon::Application;
TQTime dt;
dt.start();
int count = 0;
- for ( int mGroup = 0; mGroup < KIcon::LastGroup ; ++mGroup )
+ for ( int mGroup = 0; mGroup < TDEIcon::LastGroup ; ++mGroup )
{
kdDebug() << "queryIcons " << mGroup << "," << mContext << endl;
TQStringList filelist=mpLoader->queryIcons(mGroup, mContext);
@@ -25,7 +25,7 @@ int main(int argc, char *argv[])
++it, ++i )
{
//kdDebug() << ( i==9 ? "..." : (*it) ) << endl;
- mpLoader->loadIcon( (*it), (KIcon::Group)mGroup );
+ mpLoader->loadIcon( (*it), (TDEIcon::Group)mGroup );
++count;
}
}
diff --git a/tdecore/tests/kipctest.cpp b/tdecore/tests/kipctest.cpp
index 136aa6d70..af6785f0c 100644
--- a/tdecore/tests/kipctest.cpp
+++ b/tdecore/tests/kipctest.cpp
@@ -1,16 +1,16 @@
#include <stdio.h>
#include <stdlib.h>
#include <tqobject.h>
-#include <kapplication.h>
+#include <tdeapplication.h>
#include <kipc.h>
#include "kipctest.h"
MyObject::MyObject()
: TQObject(0L, "testobj")
{
- connect(kapp, TQT_SIGNAL(kdisplayPaletteChanged()), TQT_SLOT(slotPaletteChanged()));
- connect(kapp, TQT_SIGNAL(kdisplayFontChanged()), TQT_SLOT(slotFontChanged()));
- connect(kapp, TQT_SIGNAL(kdisplayStyleChanged()), TQT_SLOT(slotStyleChanged()));
+ connect(kapp, TQT_SIGNAL(tdedisplayPaletteChanged()), TQT_SLOT(slotPaletteChanged()));
+ connect(kapp, TQT_SIGNAL(tdedisplayFontChanged()), TQT_SLOT(slotFontChanged()));
+ connect(kapp, TQT_SIGNAL(tdedisplayStyleChanged()), TQT_SLOT(slotStyleChanged()));
connect(kapp, TQT_SIGNAL(backgroundChanged(int)), TQT_SLOT(slotBackgroundChanged(int)));
connect(kapp, TQT_SIGNAL(appearanceChanged()), TQT_SLOT(slotAppearanceChanged()));
connect(kapp, TQT_SIGNAL(kipcMessage(int,int)), TQT_SLOT(slotMessage(int,int)));
@@ -18,7 +18,7 @@ MyObject::MyObject()
int main(int argc, char **argv)
{
- KApplication app(argc, argv, "kipc");
+ TDEApplication app(argc, argv, "kipc");
if (argc == 3)
{
diff --git a/tdecore/tests/klocaletest.cpp b/tdecore/tests/klocaletest.cpp
index f752467d6..36f301d6c 100644
--- a/tdecore/tests/klocaletest.cpp
+++ b/tdecore/tests/klocaletest.cpp
@@ -11,10 +11,10 @@
#include <tqdatetime.h>
#include <tqlabel.h>
-#include <kglobal.h>
-#include <kglobalsettings.h>
-#include "klocale.h"
-#include <kapplication.h>
+#include <tdeglobal.h>
+#include <tdeglobalsettings.h>
+#include "tdelocale.h"
+#include <tdeapplication.h>
#include <kcharsets.h>
#include <kdebug.h>
@@ -51,7 +51,7 @@ bool checkDate(TQString txt, TQDate a, TQDate b)
Test::Test( TQWidget *parent, const char *name )
: TQWidget( parent, name )
{
- setCaption("Testing KLocale");
+ setCaption("Testing TDELocale");
TQWidget *d = tqApp->desktop();
setGeometry((d->width()-320)>>1, (d->height()-160)>>1, 420, 420);
@@ -70,19 +70,19 @@ void Test::createFields()
TQString string;
string+="Selected languages: ";
- string+=KGlobal::locale()->languages()+"\n";
+ string+=TDEGlobal::locale()->languages()+"\n";
// This will show nothing, as there is no klocaletest.mo
// but you can copy other *.mo file
string+="Used language: ";
- string+=KGlobal::locale()->language()+"\n";
+ string+=TDEGlobal::locale()->language()+"\n";
string+="Locale encoding: ";
- string+=TQString::fromLatin1(KGlobal::locale()->encoding())+"\n";
+ string+=TQString::fromLatin1(TDEGlobal::locale()->encoding())+"\n";
string+="Localized date and time: ";
- string+=KGlobal::locale()->formatDateTime(TQDateTime::currentDateTime());
+ string+=TDEGlobal::locale()->formatDateTime(TQDateTime::currentDateTime());
string+="\nLocalized monetary numbers: ";
- string+=KGlobal::locale()->formatMoney(1234567.89) + " / \n" +KGlobal::locale()->formatMoney(-1234567.89);
+ string+=TDEGlobal::locale()->formatMoney(1234567.89) + " / \n" +TDEGlobal::locale()->formatMoney(-1234567.89);
// This will not work
// but you can copy other *.mo file
string+="\nSome localized strings:\n";
@@ -93,56 +93,56 @@ void Test::createFields()
label=new TQLabel(string,this,"Label");
label->setGeometry(10,10,400,400);
- label->setFont(KGlobalSettings::generalFont());
+ label->setFont(TDEGlobalSettings::generalFont());
label->show();
}
int main( int argc, char ** argv )
{
- KLocale::setMainCatalogue("tdelibs");
- KApplication a( argc, argv, "klocaletest" );
+ TDELocale::setMainCatalogue("tdelibs");
+ TDEApplication a( argc, argv, "klocaletest" );
- KGlobal::locale()->setLanguage(TQString::fromLatin1("en_US"));
- KGlobal::locale()->setCountry(TQString::fromLatin1("C"));
- KGlobal::locale()->setThousandsSeparator(TQString::fromLatin1(","));
+ TDEGlobal::locale()->setLanguage(TQString::fromLatin1("en_US"));
+ TDEGlobal::locale()->setCountry(TQString::fromLatin1("C"));
+ TDEGlobal::locale()->setThousandsSeparator(TQString::fromLatin1(","));
TQString formatted;
- formatted = KGlobal::locale()->formatNumber( 70 ); check("formatNumber(70)",formatted,"70.00");
- formatted = KGlobal::locale()->formatNumber( 70, 0 ); check("formatNumber(70, 0)",formatted,"70");
- formatted = KGlobal::locale()->formatNumber( 70.2 ); check("formatNumber(70.2)",formatted,"70.20");
- formatted = KGlobal::locale()->formatNumber( 70.24 ); check("formatNumber(70.24)",formatted,"70.24");
- formatted = KGlobal::locale()->formatNumber( 70.245 ); check("formatNumber(70.245)",formatted,"70.25"); /*rounded*/
- formatted = KGlobal::locale()->formatNumber(1234567.89123456789,8); check("formatNumber(1234567.89123456789,8)",formatted,"1,234,567.89123457");
+ formatted = TDEGlobal::locale()->formatNumber( 70 ); check("formatNumber(70)",formatted,"70.00");
+ formatted = TDEGlobal::locale()->formatNumber( 70, 0 ); check("formatNumber(70, 0)",formatted,"70");
+ formatted = TDEGlobal::locale()->formatNumber( 70.2 ); check("formatNumber(70.2)",formatted,"70.20");
+ formatted = TDEGlobal::locale()->formatNumber( 70.24 ); check("formatNumber(70.24)",formatted,"70.24");
+ formatted = TDEGlobal::locale()->formatNumber( 70.245 ); check("formatNumber(70.245)",formatted,"70.25"); /*rounded*/
+ formatted = TDEGlobal::locale()->formatNumber(1234567.89123456789,8); check("formatNumber(1234567.89123456789,8)",formatted,"1,234,567.89123457");
- formatted = KGlobal::locale()->formatNumber("70"); check("formatNumber(\"70\")",formatted,"70.00");
- formatted = KGlobal::locale()->formatNumber("70", true, 2); check("formatNumber(\"70\", true, 2)",formatted,"70.00");
- formatted = KGlobal::locale()->formatNumber("70", true, 0); check("formatNumber(\"70\", true, 0)",formatted,"70");
- formatted = KGlobal::locale()->formatNumber("70.9123", true, 0); check("formatNumber(\"70.9123\", true, 0)",formatted,"71"); /* rounded */
- formatted = KGlobal::locale()->formatNumber("-70.2", true, 2); check("formatNumber(\"-70.2\", true, 2)",formatted,"-70.20");
- formatted = KGlobal::locale()->formatNumber("+70.24", true, 2); check("formatNumber(\"+70.24\", true, 2)",formatted,"70.24");
- formatted = KGlobal::locale()->formatNumber("70.245", true, 2); check("formatNumber(\"70.245\", true, 2)",formatted,"70.25"); /*rounded*/
- formatted = KGlobal::locale()->formatNumber("99.996", true, 2); check("formatNumber(\"99.996\", true, 2)",formatted,"100.00"); /*rounded*/
- formatted = KGlobal::locale()->formatNumber("12345678901234567.89123456789", false, 0); check("formatNumber(\"12345678901234567.89123456789\", false, 0)",formatted,"12,345,678,901,234,567.89123456789");
+ formatted = TDEGlobal::locale()->formatNumber("70"); check("formatNumber(\"70\")",formatted,"70.00");
+ formatted = TDEGlobal::locale()->formatNumber("70", true, 2); check("formatNumber(\"70\", true, 2)",formatted,"70.00");
+ formatted = TDEGlobal::locale()->formatNumber("70", true, 0); check("formatNumber(\"70\", true, 0)",formatted,"70");
+ formatted = TDEGlobal::locale()->formatNumber("70.9123", true, 0); check("formatNumber(\"70.9123\", true, 0)",formatted,"71"); /* rounded */
+ formatted = TDEGlobal::locale()->formatNumber("-70.2", true, 2); check("formatNumber(\"-70.2\", true, 2)",formatted,"-70.20");
+ formatted = TDEGlobal::locale()->formatNumber("+70.24", true, 2); check("formatNumber(\"+70.24\", true, 2)",formatted,"70.24");
+ formatted = TDEGlobal::locale()->formatNumber("70.245", true, 2); check("formatNumber(\"70.245\", true, 2)",formatted,"70.25"); /*rounded*/
+ formatted = TDEGlobal::locale()->formatNumber("99.996", true, 2); check("formatNumber(\"99.996\", true, 2)",formatted,"100.00"); /*rounded*/
+ formatted = TDEGlobal::locale()->formatNumber("12345678901234567.89123456789", false, 0); check("formatNumber(\"12345678901234567.89123456789\", false, 0)",formatted,"12,345,678,901,234,567.89123456789");
double num;
bool ok;
- num = KGlobal::locale()->readNumber( "12,1", &ok ); check("readNumber(12,1)",ok?"yes":"no","no");
- num = KGlobal::locale()->readNumber( "12,100", &ok ); check("readNumber(12,100)",ok?"yes":"no","yes");
- num = KGlobal::locale()->readNumber( "12,100000,000", &ok ); check("readNumber(12,100000,000)",ok?"yes":"no","no");
- num = KGlobal::locale()->readNumber( "12,100000000", &ok ); check("readNumber(12,100000000)",ok?"yes":"no","no");
- num = KGlobal::locale()->readNumber( "12,100000,000", &ok ); check("readNumber(12,100000,000)",ok?"yes":"no","no");
- num = KGlobal::locale()->readNumber( "12,,100,000", &ok ); check("readNumber(12,,100,000)",ok?"yes":"no","no");
- num = KGlobal::locale()->readNumber( "12,1000,000", &ok ); check("readNumber(12,1000,000)",ok?"yes":"no","no");
- num = KGlobal::locale()->readNumber( "12,0000000,000", &ok ); check("readNumber(12,0000000,000)",ok?"yes":"no","no");
- num = KGlobal::locale()->readNumber( "12,0000000", &ok ); check("readNumber(12,0000000)",ok?"yes":"no","no");
- num = KGlobal::locale()->readNumber( "12,146,131.12", &ok ); check("readNumber(12,146,131.12)",ok?"yes":"no","yes");
- num = KGlobal::locale()->readNumber( "1.12345678912", &ok );
+ num = TDEGlobal::locale()->readNumber( "12,1", &ok ); check("readNumber(12,1)",ok?"yes":"no","no");
+ num = TDEGlobal::locale()->readNumber( "12,100", &ok ); check("readNumber(12,100)",ok?"yes":"no","yes");
+ num = TDEGlobal::locale()->readNumber( "12,100000,000", &ok ); check("readNumber(12,100000,000)",ok?"yes":"no","no");
+ num = TDEGlobal::locale()->readNumber( "12,100000000", &ok ); check("readNumber(12,100000000)",ok?"yes":"no","no");
+ num = TDEGlobal::locale()->readNumber( "12,100000,000", &ok ); check("readNumber(12,100000,000)",ok?"yes":"no","no");
+ num = TDEGlobal::locale()->readNumber( "12,,100,000", &ok ); check("readNumber(12,,100,000)",ok?"yes":"no","no");
+ num = TDEGlobal::locale()->readNumber( "12,1000,000", &ok ); check("readNumber(12,1000,000)",ok?"yes":"no","no");
+ num = TDEGlobal::locale()->readNumber( "12,0000000,000", &ok ); check("readNumber(12,0000000,000)",ok?"yes":"no","no");
+ num = TDEGlobal::locale()->readNumber( "12,0000000", &ok ); check("readNumber(12,0000000)",ok?"yes":"no","no");
+ num = TDEGlobal::locale()->readNumber( "12,146,131.12", &ok ); check("readNumber(12,146,131.12)",ok?"yes":"no","yes");
+ num = TDEGlobal::locale()->readNumber( "1.12345678912", &ok );
tqDebug( "%s", TQString::number( num, 'g', 12 ).latin1() ); // warning this is the only way to see all decimals
check("readNumber(1.12345678912)",ok && num==1.12345678912?"yes":"no","yes");
// bug 95511
- KLocale locale(*KGlobal::locale());
+ TDELocale locale(*TDEGlobal::locale());
locale.setCurrencySymbol("$$");
num = locale.readMoney("1,234,567.89$$", &ok);
check("readMoney(1,234,567.89$$)",ok?"yes":"no","yes");
@@ -151,41 +151,41 @@ int main( int argc, char ** argv )
TQDate date;
date.setYMD( 2002, 5, 3 );
- checkDate("readDate( 3, 5, 2002 )",date,KGlobal::locale()->readDate( KGlobal::locale()->formatDate( date ) ) );
+ checkDate("readDate( 3, 5, 2002 )",date,TDEGlobal::locale()->readDate( TDEGlobal::locale()->formatDate( date ) ) );
date = TQDate::currentDate();
- checkDate("readDate( TQDate::currentDate() )",date,KGlobal::locale()->readDate( KGlobal::locale()->formatDate( date ) ) );
+ checkDate("readDate( TQDate::currentDate() )",date,TDEGlobal::locale()->readDate( TDEGlobal::locale()->formatDate( date ) ) );
TQTime time;
- time = KGlobal::locale()->readTime( "11:22:33", &ok );
+ time = TDEGlobal::locale()->readTime( "11:22:33", &ok );
check("readTime(\"11:22:33\")", (ok && time == TQTime(11, 22, 33)) ?
"yes" : "no", "yes");
- time = KGlobal::locale()->readTime( "11:22", &ok );
+ time = TDEGlobal::locale()->readTime( "11:22", &ok );
check("readTime(\"11:22\")", (ok && time == TQTime(11, 22, 0)) ?
"yes" : "no", "yes");
- time = KGlobal::locale()->readTime( "foo", &ok );
+ time = TDEGlobal::locale()->readTime( "foo", &ok );
check("readTime(\"foo\")", (!ok && !time.isValid()) ?
"invalid" : "valid", "invalid");
- time = KGlobal::locale()->readTime( "11:22:33", KLocale::WithoutSeconds, &ok );
+ time = TDEGlobal::locale()->readTime( "11:22:33", TDELocale::WithoutSeconds, &ok );
check("readTime(\"11:22:33\", WithoutSeconds)", (!ok && !time.isValid()) ?
"invalid" : "valid", "invalid");
- time = KGlobal::locale()->readTime( "11:22", KLocale::WithoutSeconds, &ok );
+ time = TDEGlobal::locale()->readTime( "11:22", TDELocale::WithoutSeconds, &ok );
check("readTime(\"11:22\", WithoutSeconds)", (ok && time == TQTime(11, 22, 0)) ?
"yes" : "no", "yes");
- KGlobal::locale()->setTimeFormat( "%H:%M %p" );
+ TDEGlobal::locale()->setTimeFormat( "%H:%M %p" );
time = TQTime( 0, 22, 33 );
- TQString timeStr = KGlobal::locale()->formatTime( time, true /*seconds*/, false /*duration*/ );
+ TQString timeStr = TDEGlobal::locale()->formatTime( time, true /*seconds*/, false /*duration*/ );
check("formatTime(\"0:22\", as time)", timeStr, "00:22 am" );
- timeStr = KGlobal::locale()->formatTime( time, true /*seconds*/, true /*duration*/ );
+ timeStr = TDEGlobal::locale()->formatTime( time, true /*seconds*/, true /*duration*/ );
check("formatTime(\"0:22\", as duration)", timeStr, "00:22" );
kdDebug() << "setLanguage C\n";
- KGlobal::locale()->setLanguage(TQString::fromLatin1("C"));
+ TDEGlobal::locale()->setLanguage(TQString::fromLatin1("C"));
kdDebug() << "C: " << i18n("yes") << " " << i18n(TQACCEL_OBJECT_NAME_STRING, "Space") << endl;
kdDebug() << "setLanguage de\n";
- KGlobal::locale()->setLanguage(TQString::fromLatin1("de"));
+ TDEGlobal::locale()->setLanguage(TQString::fromLatin1("de"));
kdDebug() << "de: " << i18n("yes") << " " << i18n(TQACCEL_OBJECT_NAME_STRING, "Space") << endl;
diff --git a/tdecore/tests/klocaletest.h b/tdecore/tests/klocaletest.h
index 83f4f5cef..6634b6107 100644
--- a/tdecore/tests/klocaletest.h
+++ b/tdecore/tests/klocaletest.h
@@ -7,7 +7,7 @@
class TQLabel;
-/** test: a small test program for KLocale
+/** test: a small test program for TDELocale
*/
class Test : public TQWidget
{
diff --git a/tdecore/tests/kmacroexpandertest.cpp b/tdecore/tests/kmacroexpandertest.cpp
index 0c41a309b..e357b5801 100644
--- a/tdecore/tests/kmacroexpandertest.cpp
+++ b/tdecore/tests/kmacroexpandertest.cpp
@@ -1,7 +1,7 @@
#include <kmacroexpander.h>
-#include <kapplication.h>
-#include <kcmdlineargs.h>
+#include <tdeapplication.h>
+#include <tdecmdlineargs.h>
#include <kdebug.h>
#include <stdlib.h>
@@ -51,8 +51,8 @@ protected:
int main(int argc, char *argv[])
{
- KCmdLineArgs::init(argc, argv, ":", "", "", "");
- KApplication app(false,false);
+ TDECmdLineArgs::init(argc, argv, ":", "", "", "");
+ TDEApplication app(false,false);
TQString s, s2;
TQMap<TQChar,TQStringList> map1;
diff --git a/tdecore/tests/kmdcodectest.cpp b/tdecore/tests/kmdcodectest.cpp
index e74d6f4b4..571d3f10b 100644
--- a/tdecore/tests/kmdcodectest.cpp
+++ b/tdecore/tests/kmdcodectest.cpp
@@ -27,9 +27,9 @@
#include <tqfile.h>
#include <kdebug.h>
-#include <klocale.h>
-#include <kcmdlineargs.h>
-#include <kapplication.h>
+#include <tdelocale.h>
+#include <tdecmdlineargs.h>
+#include <tdeapplication.h>
#include <kmdcodec.h>
@@ -316,7 +316,7 @@ int main (int argc, char *argv[])
{
const char *version = "1.0";
const char *description = "Unit test for md5, base64 encode/decode and uuencode/decode facilities";
- KCmdLineOptions options[] =
+ TDECmdLineOptions options[] =
{
{ "c <digest>", "compare <digest> with the calculated digest for a string or file.", 0 },
{ "d", "decode the given string or file using base64", 0 },
@@ -331,15 +331,15 @@ int main (int argc, char *argv[])
{ "x", "uudecode the given string or file", 0 },
{ "z", "run a preset message-digest test", 0 },
{ "+command", "[input1, input2,...]", 0 },
- KCmdLineLastOption
+ TDECmdLineLastOption
};
- KCmdLineArgs::init( argc, argv, "kmdcodectest", description, version );
- KCmdLineArgs::addCmdLineOptions( options );
- KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
+ TDECmdLineArgs::init( argc, argv, "kmdcodectest", description, version );
+ TDECmdLineArgs::addCmdLineOptions( options );
+ TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
int count = args->count();
- KApplication app;
+ TDEApplication app;
if (!count)
{
diff --git a/tdecore/tests/kmemtest.cpp b/tdecore/tests/kmemtest.cpp
index 83c452e50..f0115b569 100644
--- a/tdecore/tests/kmemtest.cpp
+++ b/tdecore/tests/kmemtest.cpp
@@ -1,5 +1,5 @@
#include <stdio.h>
-#include <kapplication.h>
+#include <tdeapplication.h>
#include <stdlib.h>
#include <errno.h>
#include <string.h>
@@ -235,9 +235,9 @@ int main(int argc, char *argv[])
}
// showMem("second");
- KApplication app(argc,argv,"kurltest");
+ TDEApplication app(argc,argv,"kurltest");
-// showMem("After KApplication constructor");
+// showMem("After TDEApplication constructor");
// malloc(10*1024);
diff --git a/tdecore/tests/knotifytest.cpp b/tdecore/tests/knotifytest.cpp
index 8eb0586c0..6c5af25a7 100644
--- a/tdecore/tests/knotifytest.cpp
+++ b/tdecore/tests/knotifytest.cpp
@@ -1,9 +1,9 @@
#include <knotifyclient.h>
-#include <kapplication.h>
+#include <tdeapplication.h>
int main( int argc, char **argv )
{
- KApplication app( argc, argv, "knotifytest" );
+ TDEApplication app( argc, argv, "knotifytest" );
KNotifyClient::userEvent( "This is a notification to notify you :)",
KNotifyClient::Messagebox,
KNotifyClient::Error );
diff --git a/tdecore/tests/kprocesstest.cpp b/tdecore/tests/kprocesstest.cpp
index af04cd421..c81dada50 100644
--- a/tdecore/tests/kprocesstest.cpp
+++ b/tdecore/tests/kprocesstest.cpp
@@ -1,5 +1,5 @@
//
-// MAIN -- a little demo of the capabilities of the "KProcess" class
+// MAIN -- a little demo of the capabilities of the "TDEProcess" class
//
// version 0.2, Aug 2nd 1997
// $Id$
@@ -13,7 +13,7 @@
#include <stdio.h>
#include <string.h>
-#include <kapplication.h>
+#include <tdeapplication.h>
#include <signal.h>
@@ -32,12 +32,12 @@ werke\nmerkt\nich\nund\nden\nbrauch\nund\nmit\ngeistesstaerke\ntu\nich\nwunder\n
int main(int argc, char *argv[])
{
- KProcess p1, p2, p3, p4;
+ TDEProcess p1, p2, p3, p4;
Dummy dummy;
- KApplication app(argc, argv, "kprocesstest");
+ TDEApplication app(argc, argv, "kprocesstest");
- printf("Welcome to the KProcess Demo Application!\n");
+ printf("Welcome to the TDEProcess Demo Application!\n");
//
// The kghostview demo -- Starts a kghostview instance blocking. -- After
@@ -46,39 +46,39 @@ int main(int argc, char *argv[])
//
p1 << "kghostview";
- TQObject::connect(&p1, TQT_SIGNAL(processExited(KProcess *)), &dummy, TQT_SLOT(printMessage(KProcess *)));
+ TQObject::connect(&p1, TQT_SIGNAL(processExited(TDEProcess *)), &dummy, TQT_SLOT(printMessage(TDEProcess *)));
printf("starting kghostview blocking (close to continue)\n");
- p1.start(KProcess::Block);
+ p1.start(TDEProcess::Block);
printf("restarting kghostview non blocking\n");
p1.start();
//
// A konsole with tcsh to demonstrate how to pass command line options to a process
- // with "KProcess" (is run blocking)
+ // with "TDEProcess" (is run blocking)
//
printf("Starting konsole with /bin/tcsh as shell (close to continue)\n");
p2 << "konsole" << "-e" << "/bin/tcsh";
p2.setWorkingDirectory("/tmp");
- TQObject::connect(&p2, TQT_SIGNAL(processExited(KProcess *)), &dummy, TQT_SLOT(printMessage(KProcess *)));
- p2.start(KProcess::Block);
+ TQObject::connect(&p2, TQT_SIGNAL(processExited(TDEProcess *)), &dummy, TQT_SLOT(printMessage(TDEProcess *)));
+ p2.start(TDEProcess::Block);
//
// Getting the output from a process. "ls" with parameter "-l" is called and it output is captured
//
p3 << "ls" << "-l";
- TQObject::connect(&p3, TQT_SIGNAL(processExited(KProcess *)),
- &dummy, TQT_SLOT(printMessage(KProcess *)));
+ TQObject::connect(&p3, TQT_SIGNAL(processExited(TDEProcess *)),
+ &dummy, TQT_SLOT(printMessage(TDEProcess *)));
- TQObject::connect(&p3, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)),
- &dummy, TQT_SLOT(gotOutput(KProcess *, char *, int)));
- TQObject::connect(&p3, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)),
- &dummy, TQT_SLOT(gotOutput(KProcess *, char *, int)));
+ TQObject::connect(&p3, TQT_SIGNAL(receivedStdout(TDEProcess *, char *, int)),
+ &dummy, TQT_SLOT(gotOutput(TDEProcess *, char *, int)));
+ TQObject::connect(&p3, TQT_SIGNAL(receivedStderr(TDEProcess *, char *, int)),
+ &dummy, TQT_SLOT(gotOutput(TDEProcess *, char *, int)));
- p3.start(KProcess::NotifyOnExit, KProcess::AllOutput);
+ p3.start(TDEProcess::NotifyOnExit, TDEProcess::AllOutput);
//
@@ -93,18 +93,18 @@ int main(int argc, char *argv[])
//
p4 << "sort";
- TQObject::connect(&p4, TQT_SIGNAL(processExited(KProcess *)),
- &dummy, TQT_SLOT(printMessage(KProcess *)));
+ TQObject::connect(&p4, TQT_SIGNAL(processExited(TDEProcess *)),
+ &dummy, TQT_SLOT(printMessage(TDEProcess *)));
- TQObject::connect(&p4, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)),
- &dummy, TQT_SLOT(gotOutput(KProcess *, char *, int)));
- TQObject::connect(&p4, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)),
- &dummy, TQT_SLOT(gotOutput(KProcess *, char *, int)));
+ TQObject::connect(&p4, TQT_SIGNAL(receivedStdout(TDEProcess *, char *, int)),
+ &dummy, TQT_SLOT(gotOutput(TDEProcess *, char *, int)));
+ TQObject::connect(&p4, TQT_SIGNAL(receivedStderr(TDEProcess *, char *, int)),
+ &dummy, TQT_SLOT(gotOutput(TDEProcess *, char *, int)));
- TQObject::connect(&p4, TQT_SIGNAL(wroteStdin(KProcess *)),
- &dummy, TQT_SLOT(outputDone(KProcess *)));
+ TQObject::connect(&p4, TQT_SIGNAL(wroteStdin(TDEProcess *)),
+ &dummy, TQT_SLOT(outputDone(TDEProcess *)));
- p4.start(KProcess::NotifyOnExit, KProcess::All);
+ p4.start(TDEProcess::NotifyOnExit, TDEProcess::All);
printf("after p4.start");
p4.writeStdin(txt, strlen(txt));
diff --git a/tdecore/tests/kprocesstest.h b/tdecore/tests/kprocesstest.h
index 23ac443dd..5817af438 100644
--- a/tdecore/tests/kprocesstest.h
+++ b/tdecore/tests/kprocesstest.h
@@ -1,5 +1,5 @@
//
-// DUMMY -- A dummy class with a slot to demonstrate KProcess signals
+// DUMMY -- A dummy class with a slot to demonstrate TDEProcess signals
//
// version 0.2, Aug 2nd 1997
//
@@ -20,20 +20,20 @@ class Dummy : public TQObject
Q_OBJECT
public slots:
- void printMessage(KProcess *proc)
+ void printMessage(TDEProcess *proc)
{
printf("Process %d exited!\n", (int)proc->getPid());
}
- void gotOutput(KProcess*, char *buffer, int len)
+ void gotOutput(TDEProcess*, char *buffer, int len)
{
- char result[1025]; // this is ugly since it relys on the internal buffer size of KProcess,
+ char result[1025]; // this is ugly since it relys on the internal buffer size of TDEProcess,
memcpy(result, buffer, len); // NEVER do that in your own application... ;-)
result[len] = '\0';
printf("OUTPUT>>%s", result);
}
- void outputDone(KProcess *proc)
+ void outputDone(TDEProcess *proc)
/*
Slot Procedure for the "sort" example. -- If it is indicated that the "sort" command has
absorbed all its input, we send an "EOF" to it to indicate that there is no more
diff --git a/tdecore/tests/kprociotest.cpp b/tdecore/tests/kprociotest.cpp
index 446dacb30..ee7aaf2b7 100644
--- a/tdecore/tests/kprociotest.cpp
+++ b/tdecore/tests/kprociotest.cpp
@@ -1,5 +1,5 @@
//
-// MAIN -- a little demo of the capabilities of the "KProcess" class
+// MAIN -- a little demo of the capabilities of the "TDEProcess" class
//
// version 0.2, Aug 2nd 1997
// $Id$
@@ -13,7 +13,7 @@
#include <stdio.h>
#include <string.h>
-#include <kapplication.h>
+#include <tdeapplication.h>
#include <signal.h>
@@ -32,7 +32,7 @@ werke\nmerkt\nich\nund\nden\nbrauch\nund\nmit\ngeistesstaerke\ntu\nich\nwunder\n
int main(int argc, char *argv[])
{
Dummy dummy;
- KApplication app(argc, argv, "kprociotest");
+ TDEApplication app(argc, argv, "kprociotest");
printf("Welcome to the KProcIO Demo Application!\n");
@@ -41,7 +41,7 @@ int main(int argc, char *argv[])
p << "rev";
- p.connect(&p, TQT_SIGNAL(processExited(KProcess*)), &dummy, TQT_SLOT(printMessage(KProcess*)));
+ p.connect(&p, TQT_SIGNAL(processExited(TDEProcess*)), &dummy, TQT_SLOT(printMessage(TDEProcess*)));
p.connect(&p, TQT_SIGNAL(readReady(KProcIO*)), &dummy, TQT_SLOT(gotOutput(KProcIO*)));
bool b;
diff --git a/tdecore/tests/kprociotest.h b/tdecore/tests/kprociotest.h
index 9f948e644..fd60bb87b 100644
--- a/tdecore/tests/kprociotest.h
+++ b/tdecore/tests/kprociotest.h
@@ -1,5 +1,5 @@
//
-// DUMMY -- A dummy class with a slot to demonstrate KProcess signals
+// DUMMY -- A dummy class with a slot to demonstrate TDEProcess signals
//
// version 0.2, Aug 2nd 1997
//
@@ -20,7 +20,7 @@ class Dummy : public TQObject
Q_OBJECT
public slots:
- void printMessage(KProcess *proc)
+ void printMessage(TDEProcess *proc)
{
printf("Process %d exited!\n", (int)proc->getPid());
}
diff --git a/tdecore/tests/krandomsequencetest.cpp b/tdecore/tests/krandomsequencetest.cpp
index 8f337c2f1..2ba0c72ae 100644
--- a/tdecore/tests/krandomsequencetest.cpp
+++ b/tdecore/tests/krandomsequencetest.cpp
@@ -19,14 +19,14 @@
#include <tqptrlist.h>
#include "krandomsequence.h"
-#include "kapplication.h"
+#include "tdeapplication.h"
#include <stdio.h>
int
main(int argc, char *argv[])
{
- KApplication a(argc, argv, "krandomsequencetest");
+ TDEApplication a(argc, argv, "krandomsequencetest");
long seed;
KRandomSequence seq;
diff --git a/tdecore/tests/kresolvertest.cpp b/tdecore/tests/kresolvertest.cpp
index 1c2272c11..0e05cab4e 100644
--- a/tdecore/tests/kresolvertest.cpp
+++ b/tdecore/tests/kresolvertest.cpp
@@ -40,8 +40,8 @@
#include <ksocks.h>
#include <ksockaddr.h>
#include <kextsock.h>
-#include <kaboutdata.h>
-#include <kcmdlineargs.h>
+#include <tdeaboutdata.h>
+#include <tdecmdlineargs.h>
#include "netsupp.h"
@@ -213,7 +213,7 @@ bool testKernel()
printf("succeeded\n");
- KSocketAddress *ksin = KExtendedSocket::localAddress(sock);
+ TDESocketAddress *ksin = KExtendedSocket::localAddress(sock);
if (ksin != NULL)
{
printf("\tWe got socket %s\n", (const char*)ksin->pretty().latin1());
@@ -410,8 +410,8 @@ int TestApp::newInstance(TQValueList<TQCString> /*params*/)
int main(int argc, char **argv)
{
- KAboutData about("socktest2", "SockTest", "1.0");
- KCmdLineArgs::init(argc, argv, &about);
+ TDEAboutData about("socktest2", "SockTest", "1.0");
+ TDECmdLineArgs::init(argc, argv, &about);
KUniqueApplication::addCmdLineOptions();
/* TestApp a;
diff --git a/tdecore/tests/krfcdatetest.cpp b/tdecore/tests/krfcdatetest.cpp
index 368a1106f..94358a8f1 100644
--- a/tdecore/tests/krfcdatetest.cpp
+++ b/tdecore/tests/krfcdatetest.cpp
@@ -1,8 +1,8 @@
#include <stdio.h>
-#include <kapplication.h>
+#include <tdeapplication.h>
#include <stdlib.h>
#include <kdebug.h>
-#include <kglobal.h>
+#include <tdeglobal.h>
#include <kcharsets.h>
#include <tqtextcodec.h>
#include <krfcdate.h>
@@ -21,7 +21,7 @@ bool check(TQString txt, time_t a, time_t b)
int main(int argc, char *argv[])
{
- KApplication app(argc,argv,"kurltest",false,false);
+ TDEApplication app(argc,argv,"kurltest",false,false);
time_t a;
time_t b;
diff --git a/tdecore/tests/ksimpleconfigtest.cpp b/tdecore/tests/ksimpleconfigtest.cpp
index 699be34cf..8b0e4ef25 100644
--- a/tdecore/tests/ksimpleconfigtest.cpp
+++ b/tdecore/tests/ksimpleconfigtest.cpp
@@ -6,7 +6,7 @@
// demonstrates use of KSimpleConfig class
#include <ksimpleconfig.h>
-#include <kapplication.h>
+#include <tdeapplication.h>
#include <unistd.h>
#include <stdio.h>
@@ -20,7 +20,7 @@
int main( int argc, char **argv )
{
- KApplication a( argc, argv, "kconfigtest" );
+ TDEApplication a( argc, argv, "tdeconfigtest" );
KSimpleConfig aConfig( _PATH_TMP"/simpleconfig.cfg" );
diff --git a/tdecore/tests/ksocktest.cpp b/tdecore/tests/ksocktest.cpp
index fe33ec771..a1ce8f86b 100644
--- a/tdecore/tests/ksocktest.cpp
+++ b/tdecore/tests/ksocktest.cpp
@@ -17,14 +17,14 @@
*/
#include "kuniqueapplication.h"
-#include "kglobal.h"
+#include "tdeglobal.h"
#include "kdebug.h"
#include "ksock.h"
#include "ksockaddr.h"
#include "kextsock.h"
-#include <kaboutdata.h>
-#include <kcmdlineargs.h>
+#include <tdeaboutdata.h>
+#include <tdecmdlineargs.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
@@ -57,11 +57,11 @@ bool check(TQString txt, TQString a, TQString b)
int
main(int argc, char *argv[])
{
- KAboutData about("socktest", "SockTest", "version");
- KCmdLineArgs::init(argc, argv, &about);
- KApplication::addCmdLineOptions();
+ TDEAboutData about("socktest", "SockTest", "version");
+ TDECmdLineArgs::init(argc, argv, &about);
+ TDEApplication::addCmdLineOptions();
- KApplication app;
+ TDEApplication app;
TQString host, port;
@@ -100,7 +100,7 @@ main(int argc, char *argv[])
printf("FD %d\n", sock2->fd());
- KSocketAddress* addr = KExtendedSocket::peerAddress( sock2->fd() );
+ TDESocketAddress* addr = KExtendedSocket::peerAddress( sock2->fd() );
check( "peerAddress:", addr->nodeName().latin1(), "213.203.58.36" );
check( "isEqual:", addr->isEqual(KInetSocketAddress("213.203.58.36", 80)) ? "TRUE" : "FALSE", "TRUE");
diff --git a/tdecore/tests/kstdacceltest.cpp b/tdecore/tests/kstdacceltest.cpp
deleted file mode 100644
index ff8842139..000000000
--- a/tdecore/tests/kstdacceltest.cpp
+++ /dev/null
@@ -1,39 +0,0 @@
-#include <config.h>
-
-#include <kapplication.h>
-#include <kdebug.h>
-#include <kstdaccel.h>
-#include <stdlib.h> // for exit
-
-static bool check(TQString txt, TQString a, TQString b)
-{
- if (a.isEmpty())
- a = TQString::null;
- if (b.isEmpty())
- b = TQString::null;
- if (a == b) {
- kdDebug() << txt << " : checking '" << a << "' against expected value '" << b << "'... " << "ok" << endl;
- }
- else {
- kdDebug() << txt << " : checking '" << a << "' against expected value '" << b << "'... " << "KO !" << endl;
- exit(1);
- }
- return true;
-}
-
-int main(int argc, char *argv[])
-{
- KApplication::disableAutoDcopRegistration();
- KApplication app(argc,argv,"kstdacceltest",false,false);
-
- check( "shortcutDefault FullScreen", KStdAccel::shortcutDefault( KStdAccel::FullScreen ).toString(), "Ctrl+Shift+F" );
- check( "shortcutDefault BeginningOfLine", KStdAccel::shortcutDefault( KStdAccel::BeginningOfLine ).toString(), "Home" );
- check( "shortcutDefault EndOfLine", KStdAccel::shortcutDefault( KStdAccel::EndOfLine ).toString(), "End" );
-
- check( "name BeginningOfLine", KStdAccel::name( KStdAccel::BeginningOfLine ), "BeginningOfLine" );
- check( "name EndOfLine", KStdAccel::name( KStdAccel::EndOfLine ), "EndOfLine" );
-
- check( "shortcut method", KStdAccel::shortcut( KStdAccel::ZoomIn ).toString(), KStdAccel::zoomIn().toString() );
-
- return 0;
-}
diff --git a/tdecore/tests/kstddirstest.cpp b/tdecore/tests/kstddirstest.cpp
index 69e9a0200..ae6ea16bd 100644
--- a/tdecore/tests/kstddirstest.cpp
+++ b/tdecore/tests/kstddirstest.cpp
@@ -1,14 +1,14 @@
-#include <kapplication.h>
+#include <tdeapplication.h>
#include <kdebug.h>
#include <kinstance.h>
#include <kstandarddirs.h>
-#include <kconfig.h>
+#include <tdeconfig.h>
int main(int argc, char **argv)
{
- KApplication a(argc, argv, "whatever", false);
- KStandardDirs t;
- KConfig config; // to add custom entries - a bit tricky :/
+ TDEApplication a(argc, argv, "whatever", false);
+ TDEStandardDirs t;
+ TDEConfig config; // to add custom entries - a bit tricky :/
TQStringList list;
TQString s;
diff --git a/tdecore/tests/ktempfiletest.cpp b/tdecore/tests/ktempfiletest.cpp
index 60404f03a..5c2354fff 100644
--- a/tdecore/tests/ktempfiletest.cpp
+++ b/tdecore/tests/ktempfiletest.cpp
@@ -16,8 +16,8 @@
Boston, MA 02110-1301, USA.
*/
-#include "ktempfile.h"
-#include "kapplication.h"
+#include "tdetempfile.h"
+#include "tdeapplication.h"
#include "kstandarddirs.h"
#include <tqstring.h>
@@ -28,8 +28,8 @@
int
main(int argc, char *argv[])
{
- KApplication a(argc, argv, "ktempfiletest");
- printf("Making tempfile after KApplication constructor.\n");
+ TDEApplication a(argc, argv, "ktempfiletest");
+ printf("Making tempfile after TDEApplication constructor.\n");
KTempFile f4;
printf("Filename = %s\n", f4.name().ascii());
diff --git a/tdecore/tests/ktimezonestest.cpp b/tdecore/tests/ktimezonestest.cpp
index 650cc0512..5eaf5a4fb 100644
--- a/tdecore/tests/ktimezonestest.cpp
+++ b/tdecore/tests/ktimezonestest.cpp
@@ -1,11 +1,11 @@
#include "ktimezones.h"
-#include <kapplication.h>
+#include <tdeapplication.h>
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[])
{
- KInstance instance("ktimezonestest");
+ TDEInstance instance("ktimezonestest");
if ((argc==2) && (strcmp(argv[1], "local")==0))
{
diff --git a/tdecore/tests/kuniqueapptest.cpp b/tdecore/tests/kuniqueapptest.cpp
index b1d700c8b..13b8ca534 100644
--- a/tdecore/tests/kuniqueapptest.cpp
+++ b/tdecore/tests/kuniqueapptest.cpp
@@ -17,13 +17,13 @@
*/
#include "kuniqueapplication.h"
-#include "kglobalsettings.h"
+#include "tdeglobalsettings.h"
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
-#include <kcmdlineargs.h>
-#include <kaboutdata.h>
+#include <tdecmdlineargs.h>
+#include <tdeaboutdata.h>
class TestApp : public KUniqueApplication
{
@@ -43,8 +43,8 @@ TestApp::newInstance( )
int
main(int argc, char *argv[])
{
- KAboutData about("kuniqueapptest", "kuniqueapptest", "version");
- KCmdLineArgs::init(argc, argv, &about);
+ TDEAboutData about("kuniqueapptest", "kuniqueapptest", "version");
+ TDECmdLineArgs::init(argc, argv, &about);
KUniqueApplication::addCmdLineOptions();
if (!TestApp::start())
diff --git a/tdecore/tests/kurltest.cpp b/tdecore/tests/kurltest.cpp
index 563eb8937..0f57dd97c 100644
--- a/tdecore/tests/kurltest.cpp
+++ b/tdecore/tests/kurltest.cpp
@@ -2,15 +2,15 @@
#include <kurl.h>
#include <stdio.h>
-#include <kapplication.h>
+#include <tdeapplication.h>
#include <stdlib.h>
#include <kdebug.h>
-#include <kglobal.h>
+#include <tdeglobal.h>
#include <kcharsets.h>
#include <tqtextcodec.h>
#include <tqdatastream.h>
#include <assert.h>
-#include <kcmdlineargs.h>
+#include <tdecmdlineargs.h>
static bool check(TQString txt, TQString a, TQString b)
{
@@ -81,9 +81,9 @@ void testAdjustPath()
int main(int argc, char *argv[])
{
- KApplication::disableAutoDcopRegistration();
- KCmdLineArgs::init( argc, argv, "kurltest", 0, 0, 0, 0 );
- KApplication app( false, false );
+ TDEApplication::disableAutoDcopRegistration();
+ TDECmdLineArgs::init( argc, argv, "kurltest", 0, 0, 0, 0 );
+ TDEApplication app( false, false );
KURL::List lst;
@@ -125,8 +125,8 @@ int main(int argc, char *argv[])
baseURL = "http://www.foo.bar/top//test2/file2.html";
check( "KURL::url()", baseURL.url(), "http://www.foo.bar/top//test2/file2.html" );
- baseURL = "file:/usr/local/src/kde2/////tdelibs/kio";
- check( "KURL::url()", baseURL.url(), "file:///usr/local/src/kde2/////tdelibs/kio" );
+ baseURL = "file:/usr/local/src/kde2/////tdelibs/tdeio";
+ check( "KURL::url()", baseURL.url(), "file:///usr/local/src/kde2/////tdelibs/tdeio" );
baseURL = "http://www.foo.bar";
KURL rel_url2( baseURL, "mailto:bastian@kde.org" );
@@ -135,7 +135,7 @@ int main(int argc, char *argv[])
baseURL = "mailto:bastian@kde.org?subject=hello";
check( "KURL::url()", baseURL.url(), "mailto:bastian@kde.org?subject=hello" );
- baseURL = "file:/usr/local/src/kde2/tdelibs/kio/";
+ baseURL = "file:/usr/local/src/kde2/tdelibs/tdeio/";
KURL url2( baseURL, "../../////tdebase/konqueror" );
check( "KURL::url()", url2.url(), "file:///usr/local/src/kde2/////tdebase/konqueror" );
@@ -318,8 +318,8 @@ int main(int argc, char *argv[])
"http://www.google.com/foo%20%20%20%20%20%20 bar/");
KURL carsten;
- carsten.setPath("/home/gis/src/kde/tdelibs/kfile/.#kfiledetailview.cpp.1.18");
- check("KURL::path()", carsten.path(), "/home/gis/src/kde/tdelibs/kfile/.#kfiledetailview.cpp.1.18");
+ carsten.setPath("/home/gis/src/kde/tdelibs/tdefile/.#tdefiledetailview.cpp.1.18");
+ check("KURL::path()", carsten.path(), "/home/gis/src/kde/tdelibs/tdefile/.#tdefiledetailview.cpp.1.18");
KURL charles;
charles.setPath( "/home/charles/foo%20moo" );
@@ -817,9 +817,9 @@ int main(int argc, char *argv[])
check("path",ulong.path(),"/servlet/CookieAccepted");
#if TQT_VERSION < 300
- qt_set_locale_codec( KGlobal::charsets()->codecForName( "iso-8859-1" ) );
+ qt_set_locale_codec( TDEGlobal::charsets()->codecForName( "iso-8859-1" ) );
#else
- TQTextCodec::setCodecForLocale( KGlobal::charsets()->codecForName( "iso-8859-1" ) );
+ TQTextCodec::setCodecForLocale( TDEGlobal::charsets()->codecForName( "iso-8859-1" ) );
#endif
TQString raw = "data:text/html,%00%2540%00";
check("data URL: encode-decode of %00", KURL(raw).url(), raw );
@@ -862,9 +862,9 @@ int main(int argc, char *argv[])
testAdjustPath();
#if TQT_VERSION < 300
- qt_set_locale_codec( KGlobal::charsets()->codecForName( "koi8-r" ) );
+ qt_set_locale_codec( TDEGlobal::charsets()->codecForName( "koi8-r" ) );
#else
- TQTextCodec::setCodecForLocale( KGlobal::charsets()->codecForName( "koi8-r" ) );
+ TQTextCodec::setCodecForLocale( TDEGlobal::charsets()->codecForName( "koi8-r" ) );
#endif
baseURL = "file:/home/coolo";
KURL russian = baseURL.directory(false, true) + TQString::fromLocal8Bit( "ئاخ7" );
diff --git a/tdecore/tests/startserviceby.cpp b/tdecore/tests/startserviceby.cpp
index 93e6716ef..67c535cec 100644
--- a/tdecore/tests/startserviceby.cpp
+++ b/tdecore/tests/startserviceby.cpp
@@ -16,21 +16,21 @@
Boston, MA 02110-1301, USA.
*/
-#include "kapplication.h"
+#include "tdeapplication.h"
#include <stdio.h>
-#include <kcmdlineargs.h>
-#include <kaboutdata.h>
-#include <kglobalsettings.h>
+#include <tdecmdlineargs.h>
+#include <tdeaboutdata.h>
+#include <tdeglobalsettings.h>
#include <kdebug.h>
int
main(int argc, char *argv[])
{
- KAboutData about("kapptest", "kapptest", "version");
- KCmdLineArgs::init(argc, argv, &about);
+ TDEAboutData about("kapptest", "kapptest", "version");
+ TDECmdLineArgs::init(argc, argv, &about);
- KApplication a;
+ TDEApplication a;
TQString error;
TQCString dcopService;
diff --git a/tdecore/tests/kconfigtest.cpp b/tdecore/tests/tdeconfigtest.cpp
index 384a328cc..d9c89d6d4 100644
--- a/tdecore/tests/kconfigtest.cpp
+++ b/tdecore/tests/tdeconfigtest.cpp
@@ -17,12 +17,12 @@
Boston, MA 02110-1301, USA.
*/
-#include <kunittest/tester.h>
-#include <kunittest/module.h>
+#include <tdeunittest/tester.h>
+#include <tdeunittest/module.h>
-#include <kconfig.h>
+#include <tdeconfig.h>
-class KConfigTest : public KUnitTest::Tester
+class TDEConfigTest : public KUnitTest::Tester
{
public:
void allTests();
@@ -31,8 +31,8 @@ private:
void revertEntries();
};
-KUNITTEST_MODULE( kunittest_kconfig, "KConfigTest" )
-KUNITTEST_MODULE_REGISTER_TESTER( KConfigTest )
+KUNITTEST_MODULE( tdeunittest_tdeconfig, "TDEConfigTest" )
+KUNITTEST_MODULE_REGISTER_TESTER( TDEConfigTest )
// test data
#define BOOLENTRY1 true
@@ -50,9 +50,9 @@ KUNITTEST_MODULE_REGISTER_TESTER( KConfigTest )
#define DATETIMEENTRY TQDateTime( TQDate( 2002, 06, 23 ), TQTime( 12, 55, 40 ) )
#define STRINGLISTENTRY TQStringList( "Hello," )
-void KConfigTest::writeConfigFile()
+void TDEConfigTest::writeConfigFile()
{
- KConfig sc( "kconfigtest" );
+ TDEConfig sc( "tdeconfigtest" );
sc.setGroup("AAA");
sc.writeEntry("stringEntry1", STRINGENTRY1, true, true);
@@ -86,10 +86,10 @@ void KConfigTest::writeConfigFile()
}
// ### TODO: call this, and test the state of things afterwards
-void KConfigTest::revertEntries()
+void TDEConfigTest::revertEntries()
{
tqWarning("Reverting entries");
- KConfig sc( "kconfigtest" );
+ TDEConfig sc( "tdeconfigtest" );
sc.setGroup("Hello");
sc.revertToDefault( "boolEntry1");
@@ -105,13 +105,13 @@ void KConfigTest::revertEntries()
sc.sync();
}
-void KConfigTest::allTests()
+void TDEConfigTest::allTests()
{
writeConfigFile();
- KConfig sc2( "kconfigtest" );
+ TDEConfig sc2( "tdeconfigtest" );
- KConfigGroup sc3( &sc2, "AAA");
+ TDEConfigGroup sc3( &sc2, "AAA");
bool bImmutable = sc3.entryIsImmutable("stringEntry1");
CHECK( bImmutable, false );
diff --git a/tdecore/tests/kconfigtestgui.cpp b/tdecore/tests/tdeconfigtestgui.cpp
index af560b496..d1e2d5393 100644
--- a/tdecore/tests/kconfigtestgui.cpp
+++ b/tdecore/tests/tdeconfigtestgui.cpp
@@ -17,19 +17,19 @@
Boston, MA 02110-1301, USA.
*/
-#include "kconfigtestgui.h"
-#include "kconfigtestgui.moc"
+#include "tdeconfigtestgui.h"
+#include "tdeconfigtestgui.moc"
//
// configtest.cpp: libKDEcore example
//
-// demonstrates use of KConfig class
+// demonstrates use of TDEConfig class
//
// adapted from Qt widgets demo
#include <unistd.h>
#include <stdlib.h>
-#include <kapplication.h>
+#include <tdeapplication.h>
#include <tqdialog.h>
#include <tqfile.h>
#include <tqfileinfo.h>
@@ -45,7 +45,7 @@
#include <tqpushbutton.h>
// KDE includes
-#include <kconfig.h>
+#include <tdeconfig.h>
#ifdef HAVE_PATHS_H
#include <paths.h>
@@ -56,10 +56,10 @@
#endif
//
-// Construct the KConfigTestView with buttons
+// Construct the TDEConfigTestView with buttons
//
-KConfigTestView::KConfigTestView( TQWidget *parent, const char *name )
+TDEConfigTestView::TDEConfigTestView( TQWidget *parent, const char *name )
: TQDialog( parent, name ),
pConfig( 0L ),
pFile( 0L ),
@@ -67,7 +67,7 @@ KConfigTestView::KConfigTestView( TQWidget *parent, const char *name )
{
// Set the window caption/title
- setCaption( "KConfig test" );
+ setCaption( "TDEConfig test" );
// Label and edit for the app config file
pAppFileLabel = new TQLabel( this, "appconfiglabel" );
@@ -123,18 +123,18 @@ KConfigTestView::KConfigTestView( TQWidget *parent, const char *name )
pQuitButton->setGeometry( 340, 60, 60, 60 );
connect( pQuitButton, TQT_SIGNAL(clicked()), tqApp, TQT_SLOT(quit()) );
- // create a default KConfig object in order to be able to start right away
- pConfig = new KConfig( TQString::null );
+ // create a default TDEConfig object in order to be able to start right away
+ pConfig = new TDEConfig( TQString::null );
}
-KConfigTestView::~KConfigTestView()
+TDEConfigTestView::~TDEConfigTestView()
{
delete pConfig;
delete pFile;
delete pStream;
}
-void KConfigTestView::appConfigEditReturnPressed()
+void TDEConfigTestView::appConfigEditReturnPressed()
{
// if there already was a config object, delete it and its associated data
delete pConfig;
@@ -146,12 +146,12 @@ void KConfigTestView::appConfigEditReturnPressed()
// create a new config object
if( !pAppFileEdit->text().isEmpty() )
- pConfig = new KConfig( pAppFileEdit->text() );
+ pConfig = new TDEConfig( pAppFileEdit->text() );
pInfoLabel2->setText( "New config object created." );
}
-void KConfigTestView::groupEditReturnPressed()
+void TDEConfigTestView::groupEditReturnPressed()
{
pConfig->setGroup( pGroupEdit->text() );
// according to the Qt doc, this is begging for trouble, but for a
@@ -162,7 +162,7 @@ void KConfigTestView::groupEditReturnPressed()
pInfoLabel2->setText( aText );
}
-void KConfigTestView::keyEditReturnPressed()
+void TDEConfigTestView::keyEditReturnPressed()
{
TQString aValue = pConfig->readEntry( pKeyEdit->text() );
// just checking aValue.isNull() would be easier here, but this is
@@ -181,7 +181,7 @@ void KConfigTestView::keyEditReturnPressed()
}
}
-void KConfigTestView::writeButtonClicked()
+void TDEConfigTestView::writeButtonClicked()
{
pConfig->writeEntry( pKeyEdit->text(), TQString( pValueEdit->text() ) );
pInfoLabel2->setText( "Entry written" );
@@ -192,9 +192,9 @@ void KConfigTestView::writeButtonClicked()
int main( int argc, char **argv )
{
- KApplication a( argc, argv, "bla" );
+ TDEApplication a( argc, argv, "bla" );
- KConfigTestView *w = new KConfigTestView();
+ TDEConfigTestView *w = new TDEConfigTestView();
a.setMainWidget( w );
return w->exec();
}
diff --git a/tdecore/tests/kconfigtestgui.h b/tdecore/tests/tdeconfigtestgui.h
index 7655c8142..4aa50cb5f 100644
--- a/tdecore/tests/kconfigtestgui.h
+++ b/tdecore/tests/tdeconfigtestgui.h
@@ -19,7 +19,7 @@
#ifndef _KCONFIG_TEST_H
#define _KCONFIG_TEST_H
-#include <kapplication.h>
+#include <tdeapplication.h>
#include <tqdialog.h>
#include <tqfile.h>
#include <tqfileinfo.h>
@@ -33,18 +33,18 @@
#include <tqlineedit.h>
#include <tqpushbutton.h>
-#include <kconfig.h>
+#include <tdeconfig.h>
//
-// KConfigTestView contains lots of Qt widgets.
+// TDEConfigTestView contains lots of Qt widgets.
//
-class KConfigTestView : public TQDialog
+class TDEConfigTestView : public TQDialog
{
Q_OBJECT
public:
- KConfigTestView( TQWidget *parent=0, const char *name=0 );
- ~KConfigTestView();
+ TDEConfigTestView( TQWidget *parent=0, const char *name=0 );
+ ~TDEConfigTestView();
private slots:
void appConfigEditReturnPressed();
@@ -64,7 +64,7 @@ private:
TQLabel* pInfoLabel1, *pInfoLabel2;
TQPushButton* pQuitButton;
- KConfig* pConfig;
+ TDEConfig* pConfig;
TQFile* pFile;
TQTextStream* pStream;
};
diff --git a/tdecore/tests/tdestdacceltest.cpp b/tdecore/tests/tdestdacceltest.cpp
new file mode 100644
index 000000000..7a1fe8697
--- /dev/null
+++ b/tdecore/tests/tdestdacceltest.cpp
@@ -0,0 +1,39 @@
+#include <config.h>
+
+#include <tdeapplication.h>
+#include <kdebug.h>
+#include <tdestdaccel.h>
+#include <stdlib.h> // for exit
+
+static bool check(TQString txt, TQString a, TQString b)
+{
+ if (a.isEmpty())
+ a = TQString::null;
+ if (b.isEmpty())
+ b = TQString::null;
+ if (a == b) {
+ kdDebug() << txt << " : checking '" << a << "' against expected value '" << b << "'... " << "ok" << endl;
+ }
+ else {
+ kdDebug() << txt << " : checking '" << a << "' against expected value '" << b << "'... " << "KO !" << endl;
+ exit(1);
+ }
+ return true;
+}
+
+int main(int argc, char *argv[])
+{
+ TDEApplication::disableAutoDcopRegistration();
+ TDEApplication app(argc,argv,"tdestdacceltest",false,false);
+
+ check( "shortcutDefault FullScreen", TDEStdAccel::shortcutDefault( TDEStdAccel::FullScreen ).toString(), "Ctrl+Shift+F" );
+ check( "shortcutDefault BeginningOfLine", TDEStdAccel::shortcutDefault( TDEStdAccel::BeginningOfLine ).toString(), "Home" );
+ check( "shortcutDefault EndOfLine", TDEStdAccel::shortcutDefault( TDEStdAccel::EndOfLine ).toString(), "End" );
+
+ check( "name BeginningOfLine", TDEStdAccel::name( TDEStdAccel::BeginningOfLine ), "BeginningOfLine" );
+ check( "name EndOfLine", TDEStdAccel::name( TDEStdAccel::EndOfLine ), "EndOfLine" );
+
+ check( "shortcut method", TDEStdAccel::shortcut( TDEStdAccel::ZoomIn ).toString(), TDEStdAccel::zoomIn().toString() );
+
+ return 0;
+}
diff --git a/tdecore/tests/testqtargs.cpp b/tdecore/tests/testqtargs.cpp
index c9e933c51..d69b3f6f4 100644
--- a/tdecore/tests/testqtargs.cpp
+++ b/tdecore/tests/testqtargs.cpp
@@ -1,5 +1,5 @@
/*
- testqtargs -- is there really a bug in KCmdLineArgs or am I on crack?
+ testqtargs -- is there really a bug in TDECmdLineArgs or am I on crack?
I used the following compile options:
@@ -28,7 +28,7 @@
--bg is aliased to --background but If you try it with --background or
-background, you get the same thing.
- in tdecore/kapplication.cpp, KCmdLineOption qt_options is defined and used
+ in tdecore/tdeapplication.cpp, TDECmdLineOption qt_options is defined and used
by the static method Kapplication::addCmdLineOptions to add the Qt options
but its' entries look like this:
@@ -43,15 +43,15 @@ application palette (light and dark shades are\ncalculated)."), 0},
*/
-#include <kapplication.h>
-#include <kcmdlineargs.h>
-#include <kaboutdata.h>
-#include <klocale.h>
+#include <tdeapplication.h>
+#include <tdecmdlineargs.h>
+#include <tdeaboutdata.h>
+#include <tdelocale.h>
-static const KCmdLineOptions options[] =
+static const TDECmdLineOptions options[] =
{
{ "hello ", I18N_NOOP("Says hello"), 0 },
- KCmdLineLastOption
+ TDECmdLineLastOption
};
int main(int argc, char *argv[])
@@ -60,23 +60,23 @@ int main(int argc, char *argv[])
{
tqDebug("argv[%d] = %s", i, argv[i]);
}
- KAboutData aboutData( "testqtargs", I18N_NOOP("testqtargs"),
- "1.0", I18N_NOOP("testqtargs"), KAboutData::License_GPL,
+ TDEAboutData aboutData( "testqtargs", I18N_NOOP("testqtargs"),
+ "1.0", I18N_NOOP("testqtargs"), TDEAboutData::License_GPL,
"", "", "", "");
- KCmdLineArgs::init(argc, argv, &aboutData);
- KCmdLineArgs::addCmdLineOptions(options);
+ TDECmdLineArgs::init(argc, argv, &aboutData);
+ TDECmdLineArgs::addCmdLineOptions(options);
- KCmdLineArgs *qtargs = KCmdLineArgs::parsedArgs("qt");
+ TDECmdLineArgs *qtargs = TDECmdLineArgs::parsedArgs("qt");
for (int i = 0; i < qtargs->count(); i++)
{
tqDebug("qt arg[%d] = %s", i, qtargs->arg(i));
}
- KApplication app;
+ TDEApplication app;
- KCmdLineArgs *kdeargs = KCmdLineArgs::parsedArgs("tde");
- KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
+ TDECmdLineArgs *kdeargs = TDECmdLineArgs::parsedArgs("tde");
+ TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
// An arg set by Qt
if(qtargs->isSet("background"))
diff --git a/tdecore/twin.cpp b/tdecore/twin.cpp
index 63cdc761f..e96c25011 100644
--- a/tdecore/twin.cpp
+++ b/tdecore/twin.cpp
@@ -35,18 +35,18 @@
#include "config.h"
#include "twin.h"
-#include "kapplication.h"
+#include "tdeapplication.h"
-#include <kglobal.h>
+#include <tdeglobal.h>
#include <kiconloader.h>
#include <kdebug.h>
#include <kdatastream.h>
-#include <klocale.h>
+#include <tdelocale.h>
#include <dcopclient.h>
#include <dcopref.h>
#ifdef Q_WS_X11
-#include <kstartupinfo.h>
+#include <tdestartupinfo.h>
#include <kxerrorhandler.h>
#include <X11/Xlib.h>
@@ -483,8 +483,8 @@ TQPixmap KWin::icon( WId win, int width, int height, bool scale, int flags )
if( XGetClassHint( tqt_xdisplay(), win, &hint ) ) {
TQString className = hint.res_class;
- TQPixmap pm = KGlobal::instance()->iconLoader()->loadIcon( className.lower(), KIcon::Small, iconWidth,
- KIcon::DefaultState, 0, true );
+ TQPixmap pm = TDEGlobal::instance()->iconLoader()->loadIcon( className.lower(), TDEIcon::Small, iconWidth,
+ TDEIcon::DefaultState, 0, true );
if( scale && !pm.isNull() )
result.convertFromImage( TQImage(pm.convertToImage()).smoothScale( width, height ) );
else
@@ -500,8 +500,8 @@ TQPixmap KWin::icon( WId win, int width, int height, bool scale, int flags )
// If the icon is still a null pixmap, load the 'xapp' icon
// as a last resort:
if ( result.isNull() ) {
- TQPixmap pm = KGlobal::instance()->iconLoader()->loadIcon( "xapp", KIcon::Small, iconWidth,
- KIcon::DefaultState, 0, true );
+ TQPixmap pm = TDEGlobal::instance()->iconLoader()->loadIcon( "xapp", TDEIcon::Small, iconWidth,
+ TDEIcon::DefaultState, 0, true );
if( scale && !pm.isNull() )
result.convertFromImage( TQImage(pm.convertToImage()).smoothScale( width, height ) );
else
@@ -731,7 +731,7 @@ void KWin::lowerWindow( WId win )
void KWin::appStarted()
{
#ifdef Q_WS_X11
- KStartupInfo::appStarted();
+ TDEStartupInfo::appStarted();
#endif
}
diff --git a/tdecore/twin.h b/tdecore/twin.h
index c7aa37a6a..141edeffc 100644
--- a/tdecore/twin.h
+++ b/tdecore/twin.h
@@ -509,7 +509,7 @@ private:
#endif
/**
* @deprecated
- * Use KStartupInfo::appStarted
+ * Use TDEStartupInfo::appStarted
*/
static void appStarted() KDE_DEPRECATED;
};
diff --git a/tdecore/twinmodule.cpp b/tdecore/twinmodule.cpp
index adc20f218..a37370e58 100644
--- a/tdecore/twinmodule.cpp
+++ b/tdecore/twinmodule.cpp
@@ -26,11 +26,11 @@
#include "twinmodule.h"
#include "twin.h"
#include <X11/Xatom.h>
-#include "kapplication.h"
+#include "tdeapplication.h"
#include "kdebug.h"
#include <tqtl.h>
#include <tqptrlist.h>
-#include <klocale.h>
+#include <tdelocale.h>
#include <dcopclient.h>
#include "netwm.h"