From 0aaa8e3fc8f8a1481333b564f0922277c8d8ad59 Mon Sep 17 00:00:00 2001 From: tpearson Date: Thu, 30 Jun 2011 00:15:53 +0000 Subject: TQt4 port piklab This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/piklab@1238822 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- src/coff/base/cdb_parser.cpp | 42 +- src/coff/base/cdb_parser.h | 38 +- src/coff/base/coff.cpp | 26 +- src/coff/base/coff.h | 10 +- src/coff/base/coff_archive.cpp | 48 +-- src/coff/base/coff_archive.h | 18 +- src/coff/base/coff_data.h | 2 +- src/coff/base/coff_object.cpp | 148 +++---- src/coff/base/coff_object.h | 108 +++--- src/coff/base/disassembler.cpp | 88 ++--- src/coff/base/disassembler.h | 28 +- src/coff/base/gpdis.cpp | 14 +- src/coff/base/gpopcode.h | 2 +- src/coff/base/text_coff.cpp | 84 ++-- src/coff/base/text_coff.h | 20 +- src/coff/xml/xml_coff_parser.cpp | 26 +- src/common/cli/cli_global.cpp | 8 +- src/common/cli/cli_global.h | 6 +- src/common/cli/cli_log.cpp | 30 +- src/common/cli/cli_log.h | 10 +- src/common/cli/cli_main.cpp | 22 +- src/common/cli/cli_main.h | 25 +- src/common/cli/cli_pfile.cpp | 6 +- src/common/common/bitvalue.cpp | 10 +- src/common/common/bitvalue.h | 24 +- src/common/common/group.cpp | 8 +- src/common/common/group.h | 20 +- src/common/common/key_enum.h | 14 +- src/common/common/lister.h | 18 +- src/common/common/misc.cpp | 18 +- src/common/common/misc.h | 16 +- src/common/common/number.cpp | 38 +- src/common/common/number.h | 46 +-- src/common/common/purl_base.cpp | 36 +- src/common/common/purl_base.h | 22 +- src/common/common/qflags.h | 66 ++-- src/common/common/range.h | 12 +- src/common/common/storage.cpp | 6 +- src/common/common/storage.h | 12 +- src/common/common/streamer.h | 26 +- src/common/common/synchronous.cpp | 37 +- src/common/common/synchronous.h | 12 +- src/common/common/version_data.cpp | 16 +- src/common/common/version_data.h | 12 +- src/common/global/about.cpp | 8 +- src/common/global/about.h | 2 +- src/common/global/generic_config.cpp | 86 ++-- src/common/global/generic_config.h | 62 +-- src/common/global/global.h | 38 +- src/common/global/log.cpp | 34 +- src/common/global/log.h | 70 ++-- src/common/global/pfile.cpp | 28 +- src/common/global/pfile.h | 28 +- src/common/global/process.cpp | 54 +-- src/common/global/process.h | 67 ++-- src/common/global/progress_monitor.cpp | 12 +- src/common/global/progress_monitor.h | 17 +- src/common/global/purl.cpp | 198 +++++----- src/common/global/purl.h | 60 ++- src/common/global/xml_data_file.cpp | 108 +++--- src/common/global/xml_data_file.h | 32 +- src/common/gui/config_widget.h | 45 +-- src/common/gui/container.cpp | 34 +- src/common/gui/container.h | 26 +- src/common/gui/dialog.cpp | 118 +++--- src/common/gui/dialog.h | 53 +-- src/common/gui/editlistbox.cpp | 106 ++--- src/common/gui/editlistbox.h | 39 +- src/common/gui/hexword_gui.cpp | 44 +-- src/common/gui/hexword_gui.h | 27 +- src/common/gui/key_gui.h | 58 +-- src/common/gui/list_container.cpp | 40 +- src/common/gui/list_container.h | 27 +- src/common/gui/list_view.cpp | 80 ++-- src/common/gui/list_view.h | 31 +- src/common/gui/misc_gui.cpp | 162 ++++---- src/common/gui/misc_gui.h | 86 ++-- src/common/gui/number_gui.cpp | 50 +-- src/common/gui/number_gui.h | 19 +- src/common/gui/pfile_ext.cpp | 24 +- src/common/gui/pfile_ext.h | 2 +- src/common/gui/purl_ext.cpp | 20 +- src/common/gui/purl_gui.cpp | 66 ++-- src/common/gui/purl_gui.h | 59 +-- src/common/nokde/nokde_kaboutdata.cpp | 142 +++---- src/common/nokde/nokde_kaboutdata.h | 96 ++--- src/common/nokde/nokde_kcmdlineargs.cpp | 304 +++++++-------- src/common/nokde/nokde_kcmdlineargs.h | 60 +-- src/common/nokde/nokde_klocale.cpp | 4 +- src/common/nokde/nokde_klocale.h | 8 +- src/common/nokde/nokde_kprocess.cpp | 32 +- src/common/nokde/nokde_kprocess.h | 27 +- src/common/nokde/nokde_kurl.h | 14 +- src/common/nokde/win32_utils.h | 16 +- src/common/port/parallel.cpp | 58 +-- src/common/port/parallel.h | 20 +- src/common/port/port.cpp | 12 +- src/common/port/port.h | 14 +- src/common/port/port_base.cpp | 26 +- src/common/port/port_base.h | 16 +- src/common/port/serial.cpp | 78 ++-- src/common/port/serial.h | 30 +- src/common/port/usb_port.cpp | 60 +-- src/common/port/usb_port.h | 6 +- src/data/syntax_xml_generator.cpp | 24 +- src/devices/base/device_group.cpp | 192 ++++----- src/devices/base/device_group.h | 26 +- src/devices/base/generic_device.cpp | 32 +- src/devices/base/generic_device.h | 74 ++-- src/devices/base/generic_memory.cpp | 12 +- src/devices/base/generic_memory.h | 14 +- src/devices/base/hex_buffer.cpp | 34 +- src/devices/base/hex_buffer.h | 18 +- src/devices/base/register.cpp | 22 +- src/devices/base/register.h | 43 +- src/devices/gui/device_group_ui.h | 14 +- src/devices/gui/hex_view.cpp | 4 +- src/devices/gui/hex_view.h | 3 +- src/devices/gui/hex_word_editor.cpp | 18 +- src/devices/gui/hex_word_editor.h | 16 +- src/devices/gui/memory_editor.cpp | 104 ++--- src/devices/gui/memory_editor.h | 54 +-- src/devices/gui/register_view.cpp | 82 ++-- src/devices/gui/register_view.h | 34 +- src/devices/list/device_list.cpp | 6 +- src/devices/list/device_list.h | 4 +- src/devices/mem24/base/mem24.cpp | 4 +- src/devices/mem24/base/mem24.h | 10 +- src/devices/mem24/gui/mem24_group_ui.cpp | 4 +- src/devices/mem24/gui/mem24_group_ui.h | 8 +- src/devices/mem24/gui/mem24_hex_view.cpp | 10 +- src/devices/mem24/gui/mem24_hex_view.h | 5 +- src/devices/mem24/gui/mem24_memory_editor.cpp | 14 +- src/devices/mem24/gui/mem24_memory_editor.h | 15 +- src/devices/mem24/mem24/mem24_group.cpp | 10 +- src/devices/mem24/mem24/mem24_group.h | 8 +- src/devices/mem24/mem24/mem24_memory.cpp | 20 +- src/devices/mem24/mem24/mem24_memory.h | 4 +- src/devices/mem24/prog/mem24_prog.cpp | 8 +- src/devices/mem24/prog/mem24_prog.h | 2 +- src/devices/mem24/xml/mem24_xml_to_data.cpp | 24 +- src/devices/pic/base/pic.cpp | 120 +++--- src/devices/pic/base/pic.h | 62 +-- src/devices/pic/base/pic_config.cpp | 100 ++--- src/devices/pic/base/pic_config.h | 56 +-- src/devices/pic/base/pic_protection.cpp | 94 ++--- src/devices/pic/base/pic_protection.h | 30 +- src/devices/pic/base/pic_register.cpp | 88 ++--- src/devices/pic/base/pic_register.h | 48 +-- src/devices/pic/gui/pic_config_editor.cpp | 30 +- src/devices/pic/gui/pic_config_editor.h | 6 +- src/devices/pic/gui/pic_config_word_editor.cpp | 108 +++--- src/devices/pic/gui/pic_config_word_editor.h | 19 +- src/devices/pic/gui/pic_group_ui.cpp | 24 +- src/devices/pic/gui/pic_group_ui.h | 10 +- src/devices/pic/gui/pic_hex_view.cpp | 8 +- src/devices/pic/gui/pic_hex_view.h | 5 +- src/devices/pic/gui/pic_memory_editor.cpp | 106 ++--- src/devices/pic/gui/pic_memory_editor.h | 50 ++- src/devices/pic/gui/pic_prog_group_ui.cpp | 10 +- src/devices/pic/gui/pic_prog_group_ui.h | 5 +- src/devices/pic/gui/pic_register_view.cpp | 90 ++--- src/devices/pic/gui/pic_register_view.h | 32 +- src/devices/pic/pic/pic_group.cpp | 24 +- src/devices/pic/pic/pic_group.h | 8 +- src/devices/pic/pic/pic_memory.cpp | 172 ++++---- src/devices/pic/pic/pic_memory.h | 18 +- src/devices/pic/prog/pic_debug.cpp | 34 +- src/devices/pic/prog/pic_debug.h | 12 +- src/devices/pic/prog/pic_prog.cpp | 94 ++--- src/devices/pic/prog/pic_prog.h | 2 +- src/devices/pic/prog/pic_prog_specific.cpp | 28 +- src/devices/pic/prog/pic_prog_specific.h | 6 +- src/devices/pic/xml/pic_xml_to_data.cpp | 432 ++++++++++----------- src/devices/pic/xml_data/10F200.xml | 22 +- src/devices/pic/xml_data/10F202.xml | 22 +- src/devices/pic/xml_data/10F204.xml | 22 +- src/devices/pic/xml_data/10F206.xml | 22 +- src/devices/pic/xml_data/10F220.xml | 26 +- src/devices/pic/xml_data/10F222.xml | 26 +- src/devices/pic/xml_data/12C508.xml | 22 +- src/devices/pic/xml_data/12C508A.xml | 22 +- src/devices/pic/xml_data/12C509.xml | 22 +- src/devices/pic/xml_data/12C509A.xml | 22 +- src/devices/pic/xml_data/12C671.xml | 26 +- src/devices/pic/xml_data/12C672.xml | 26 +- src/devices/pic/xml_data/12CE518.xml | 24 +- src/devices/pic/xml_data/12CE519.xml | 24 +- src/devices/pic/xml_data/12CE673.xml | 26 +- src/devices/pic/xml_data/12CE674.xml | 26 +- src/devices/pic/xml_data/12CR509A.xml | 22 +- src/devices/pic/xml_data/12F508.xml | 22 +- src/devices/pic/xml_data/12F509.xml | 22 +- src/devices/pic/xml_data/12F510.xml | 26 +- src/devices/pic/xml_data/12F519.xml | 30 +- src/devices/pic/xml_data/12F609.xml | 34 +- src/devices/pic/xml_data/12F615.xml | 34 +- src/devices/pic/xml_data/12F629.xml | 38 +- src/devices/pic/xml_data/12F635.xml | 46 +-- src/devices/pic/xml_data/12F675.xml | 38 +- src/devices/pic/xml_data/12F683.xml | 42 +- src/devices/pic/xml_data/14000.xml | 30 +- src/devices/pic/xml_data/16C432.xml | 24 +- src/devices/pic/xml_data/16C433.xml | 26 +- src/devices/pic/xml_data/16C505.xml | 22 +- src/devices/pic/xml_data/16C52.xml | 10 +- src/devices/pic/xml_data/16C54.xml | 16 +- src/devices/pic/xml_data/16C54A.xml | 16 +- src/devices/pic/xml_data/16C54B.xml | 16 +- src/devices/pic/xml_data/16C54C.xml | 16 +- src/devices/pic/xml_data/16C55.xml | 16 +- src/devices/pic/xml_data/16C554.xml | 20 +- src/devices/pic/xml_data/16C557.xml | 20 +- src/devices/pic/xml_data/16C558.xml | 20 +- src/devices/pic/xml_data/16C55A.xml | 16 +- src/devices/pic/xml_data/16C56.xml | 16 +- src/devices/pic/xml_data/16C56A.xml | 16 +- src/devices/pic/xml_data/16C57.xml | 16 +- src/devices/pic/xml_data/16C57C.xml | 16 +- src/devices/pic/xml_data/16C58A.xml | 16 +- src/devices/pic/xml_data/16C58B.xml | 16 +- src/devices/pic/xml_data/16C61.xml | 20 +- src/devices/pic/xml_data/16C62.xml | 20 +- src/devices/pic/xml_data/16C620.xml | 24 +- src/devices/pic/xml_data/16C620A.xml | 24 +- src/devices/pic/xml_data/16C621.xml | 24 +- src/devices/pic/xml_data/16C621A.xml | 24 +- src/devices/pic/xml_data/16C622.xml | 24 +- src/devices/pic/xml_data/16C622A.xml | 24 +- src/devices/pic/xml_data/16C62A.xml | 24 +- src/devices/pic/xml_data/16C62B.xml | 24 +- src/devices/pic/xml_data/16C63.xml | 24 +- src/devices/pic/xml_data/16C63A.xml | 24 +- src/devices/pic/xml_data/16C64.xml | 20 +- src/devices/pic/xml_data/16C641.xml | 28 +- src/devices/pic/xml_data/16C642.xml | 28 +- src/devices/pic/xml_data/16C64A.xml | 24 +- src/devices/pic/xml_data/16C65.xml | 20 +- src/devices/pic/xml_data/16C65A.xml | 24 +- src/devices/pic/xml_data/16C65B.xml | 24 +- src/devices/pic/xml_data/16C66.xml | 24 +- src/devices/pic/xml_data/16C661.xml | 28 +- src/devices/pic/xml_data/16C662.xml | 28 +- src/devices/pic/xml_data/16C67.xml | 24 +- src/devices/pic/xml_data/16C71.xml | 20 +- src/devices/pic/xml_data/16C710.xml | 24 +- src/devices/pic/xml_data/16C711.xml | 24 +- src/devices/pic/xml_data/16C712.xml | 24 +- src/devices/pic/xml_data/16C715.xml | 28 +- src/devices/pic/xml_data/16C716.xml | 24 +- src/devices/pic/xml_data/16C717.xml | 32 +- src/devices/pic/xml_data/16C72.xml | 24 +- src/devices/pic/xml_data/16C72A.xml | 24 +- src/devices/pic/xml_data/16C73.xml | 20 +- src/devices/pic/xml_data/16C73A.xml | 24 +- src/devices/pic/xml_data/16C73B.xml | 24 +- src/devices/pic/xml_data/16C74.xml | 20 +- src/devices/pic/xml_data/16C745.xml | 20 +- src/devices/pic/xml_data/16C74A.xml | 24 +- src/devices/pic/xml_data/16C74B.xml | 24 +- src/devices/pic/xml_data/16C76.xml | 24 +- src/devices/pic/xml_data/16C765.xml | 20 +- src/devices/pic/xml_data/16C77.xml | 24 +- src/devices/pic/xml_data/16C770.xml | 32 +- src/devices/pic/xml_data/16C771.xml | 32 +- src/devices/pic/xml_data/16C773.xml | 28 +- src/devices/pic/xml_data/16C774.xml | 28 +- src/devices/pic/xml_data/16C781.xml | 32 +- src/devices/pic/xml_data/16C782.xml | 32 +- src/devices/pic/xml_data/16C84.xml | 20 +- src/devices/pic/xml_data/16C923.xml | 20 +- src/devices/pic/xml_data/16C924.xml | 20 +- src/devices/pic/xml_data/16C925.xml | 24 +- src/devices/pic/xml_data/16C926.xml | 24 +- src/devices/pic/xml_data/16CE623.xml | 24 +- src/devices/pic/xml_data/16CE624.xml | 24 +- src/devices/pic/xml_data/16CE625.xml | 24 +- src/devices/pic/xml_data/16CR54.xml_broken | 16 +- src/devices/pic/xml_data/16CR54A.xml | 16 +- src/devices/pic/xml_data/16CR54B.xml | 16 +- src/devices/pic/xml_data/16CR54C.xml | 16 +- src/devices/pic/xml_data/16CR56A.xml | 16 +- src/devices/pic/xml_data/16CR57B.xml | 16 +- src/devices/pic/xml_data/16CR57C.xml | 16 +- src/devices/pic/xml_data/16CR58A.xml | 16 +- src/devices/pic/xml_data/16CR58B.xml | 16 +- src/devices/pic/xml_data/16CR62.xml | 24 +- src/devices/pic/xml_data/16CR620A.xml | 24 +- src/devices/pic/xml_data/16CR63.xml | 24 +- src/devices/pic/xml_data/16CR64.xml | 24 +- src/devices/pic/xml_data/16CR65.xml | 24 +- src/devices/pic/xml_data/16CR72.xml | 24 +- src/devices/pic/xml_data/16CR73.xml | 24 +- src/devices/pic/xml_data/16CR74.xml | 24 +- src/devices/pic/xml_data/16CR76.xml | 24 +- src/devices/pic/xml_data/16CR77.xml | 24 +- src/devices/pic/xml_data/16CR83.xml | 24 +- src/devices/pic/xml_data/16CR84.xml | 24 +- src/devices/pic/xml_data/16F505.xml | 22 +- src/devices/pic/xml_data/16F506.xml | 26 +- src/devices/pic/xml_data/16F54.xml | 16 +- src/devices/pic/xml_data/16F57.xml | 16 +- src/devices/pic/xml_data/16F59.xml | 16 +- src/devices/pic/xml_data/16F610.xml | 34 +- src/devices/pic/xml_data/16F616.xml | 34 +- src/devices/pic/xml_data/16F627.xml | 36 +- src/devices/pic/xml_data/16F627A.xml | 36 +- src/devices/pic/xml_data/16F628.xml | 36 +- src/devices/pic/xml_data/16F628A.xml | 36 +- src/devices/pic/xml_data/16F630.xml | 38 +- src/devices/pic/xml_data/16F631.xml | 42 +- src/devices/pic/xml_data/16F636.xml | 46 +-- src/devices/pic/xml_data/16F639.xml | 46 +-- src/devices/pic/xml_data/16F648A.xml | 36 +- src/devices/pic/xml_data/16F676.xml | 38 +- src/devices/pic/xml_data/16F677.xml | 42 +- src/devices/pic/xml_data/16F684.xml | 42 +- src/devices/pic/xml_data/16F685.xml | 42 +- src/devices/pic/xml_data/16F687.xml | 42 +- src/devices/pic/xml_data/16F688.xml | 42 +- src/devices/pic/xml_data/16F689.xml | 42 +- src/devices/pic/xml_data/16F690.xml | 42 +- src/devices/pic/xml_data/16F716.xml | 28 +- src/devices/pic/xml_data/16F72.xml | 24 +- src/devices/pic/xml_data/16F73.xml | 24 +- src/devices/pic/xml_data/16F737.xml | 54 +-- src/devices/pic/xml_data/16F74.xml | 24 +- src/devices/pic/xml_data/16F747.xml | 54 +-- src/devices/pic/xml_data/16F76.xml | 24 +- src/devices/pic/xml_data/16F767.xml | 54 +-- src/devices/pic/xml_data/16F77.xml | 24 +- src/devices/pic/xml_data/16F777.xml | 54 +-- src/devices/pic/xml_data/16F785.xml | 42 +- src/devices/pic/xml_data/16F818.xml | 48 +-- src/devices/pic/xml_data/16F819.xml | 48 +-- src/devices/pic/xml_data/16F83.xml | 20 +- src/devices/pic/xml_data/16F84.xml | 20 +- src/devices/pic/xml_data/16F84A.xml | 20 +- src/devices/pic/xml_data/16F87.xml | 58 +-- src/devices/pic/xml_data/16F870.xml | 40 +- src/devices/pic/xml_data/16F871.xml | 40 +- src/devices/pic/xml_data/16F872.xml | 40 +- src/devices/pic/xml_data/16F873.xml | 40 +- src/devices/pic/xml_data/16F873A.xml | 40 +- src/devices/pic/xml_data/16F874.xml | 40 +- src/devices/pic/xml_data/16F874A.xml | 40 +- src/devices/pic/xml_data/16F876.xml | 40 +- src/devices/pic/xml_data/16F876A.xml | 40 +- src/devices/pic/xml_data/16F877.xml | 40 +- src/devices/pic/xml_data/16F877A.xml | 40 +- src/devices/pic/xml_data/16F88.xml | 58 +-- src/devices/pic/xml_data/16F882.xml | 60 +-- src/devices/pic/xml_data/16F883.xml | 60 +-- src/devices/pic/xml_data/16F884.xml | 60 +-- src/devices/pic/xml_data/16F886.xml | 60 +-- src/devices/pic/xml_data/16F887.xml | 60 +-- src/devices/pic/xml_data/16F913.xml | 46 +-- src/devices/pic/xml_data/16F914.xml | 46 +-- src/devices/pic/xml_data/16F916.xml | 46 +-- src/devices/pic/xml_data/16F917.xml | 46 +-- src/devices/pic/xml_data/16F946.xml | 46 +-- src/devices/pic/xml_data/16HV540.xml | 16 +- src/devices/pic/xml_data/17C42.xml | 14 +- src/devices/pic/xml_data/17C42A.xml | 14 +- src/devices/pic/xml_data/17C43.xml | 14 +- src/devices/pic/xml_data/17C44.xml | 14 +- src/devices/pic/xml_data/17C752.xml | 18 +- src/devices/pic/xml_data/17C756.xml | 18 +- src/devices/pic/xml_data/17C756A.xml | 18 +- src/devices/pic/xml_data/17C762.xml | 18 +- src/devices/pic/xml_data/17C766.xml | 18 +- src/devices/pic/xml_data/17CR42.xml | 14 +- src/devices/pic/xml_data/17CR43.xml | 14 +- src/devices/pic/xml_data/18C242.xml | 58 +-- src/devices/pic/xml_data/18C252.xml | 58 +-- src/devices/pic/xml_data/18C442.xml | 58 +-- src/devices/pic/xml_data/18C452.xml | 58 +-- src/devices/pic/xml_data/18C601.xml | 44 +-- src/devices/pic/xml_data/18C658.xml | 54 +-- src/devices/pic/xml_data/18C801.xml | 44 +-- src/devices/pic/xml_data/18C858.xml | 54 +-- src/devices/pic/xml_data/18F1220.xml | 126 +++--- src/devices/pic/xml_data/18F1230.xml | 150 +++---- src/devices/pic/xml_data/18F1320.xml | 126 +++--- src/devices/pic/xml_data/18F1330.xml | 150 +++---- src/devices/pic/xml_data/18F2220.xml | 134 +++---- src/devices/pic/xml_data/18F2221.xml | 146 +++---- src/devices/pic/xml_data/18F2320.xml | 158 ++++---- src/devices/pic/xml_data/18F2321.xml | 146 +++---- src/devices/pic/xml_data/18F2331.xml | 146 +++---- src/devices/pic/xml_data/18F2410.xml | 134 +++---- src/devices/pic/xml_data/18F242.xml | 122 +++--- src/devices/pic/xml_data/18F2420.xml | 142 +++---- src/devices/pic/xml_data/18F2423.xml | 142 +++---- src/devices/pic/xml_data/18F2431.xml | 146 +++---- src/devices/pic/xml_data/18F2439.xml | 114 +++--- src/devices/pic/xml_data/18F2450.xml | 150 +++---- src/devices/pic/xml_data/18F2455.xml | 170 ++++---- src/devices/pic/xml_data/18F248.xml | 118 +++--- src/devices/pic/xml_data/18F2480.xml | 142 +++---- src/devices/pic/xml_data/18F24J10.xml | 60 +-- src/devices/pic/xml_data/18F2510.xml | 158 ++++---- src/devices/pic/xml_data/18F2515.xml | 146 +++---- src/devices/pic/xml_data/18F252.xml | 146 +++---- src/devices/pic/xml_data/18F2520.xml | 166 ++++---- src/devices/pic/xml_data/18F2523.xml | 166 ++++---- src/devices/pic/xml_data/18F2525.xml | 154 ++++---- src/devices/pic/xml_data/18F2539.xml | 126 +++--- src/devices/pic/xml_data/18F2550.xml | 174 ++++----- src/devices/pic/xml_data/18F258.xml | 142 +++---- src/devices/pic/xml_data/18F2580.xml | 166 ++++---- src/devices/pic/xml_data/18F2585.xml | 154 ++++---- src/devices/pic/xml_data/18F25J10.xml | 60 +-- src/devices/pic/xml_data/18F2610.xml | 158 ++++---- src/devices/pic/xml_data/18F2620.xml | 158 ++++---- src/devices/pic/xml_data/18F2680.xml | 166 ++++---- src/devices/pic/xml_data/18F2682.xml | 178 ++++----- src/devices/pic/xml_data/18F2685.xml | 190 ++++----- src/devices/pic/xml_data/18F4220.xml | 134 +++---- src/devices/pic/xml_data/18F4221.xml | 150 +++---- src/devices/pic/xml_data/18F4320.xml | 158 ++++---- src/devices/pic/xml_data/18F4321.xml | 150 +++---- src/devices/pic/xml_data/18F4331.xml | 162 ++++---- src/devices/pic/xml_data/18F4410.xml | 134 +++---- src/devices/pic/xml_data/18F442.xml | 122 +++--- src/devices/pic/xml_data/18F4420.xml | 142 +++---- src/devices/pic/xml_data/18F4423.xml | 142 +++---- src/devices/pic/xml_data/18F4431.xml | 186 ++++----- src/devices/pic/xml_data/18F4439.xml | 114 +++--- src/devices/pic/xml_data/18F4450.xml | 154 ++++---- src/devices/pic/xml_data/18F4455.xml | 174 ++++----- src/devices/pic/xml_data/18F448.xml | 118 +++--- src/devices/pic/xml_data/18F4480.xml | 142 +++---- src/devices/pic/xml_data/18F44J10.xml | 60 +-- src/devices/pic/xml_data/18F4510.xml | 158 ++++---- src/devices/pic/xml_data/18F4515.xml | 146 +++---- src/devices/pic/xml_data/18F452.xml | 146 +++---- src/devices/pic/xml_data/18F4520.xml | 166 ++++---- src/devices/pic/xml_data/18F4523.xml | 166 ++++---- src/devices/pic/xml_data/18F4525.xml | 154 ++++---- src/devices/pic/xml_data/18F4539.xml | 126 +++--- src/devices/pic/xml_data/18F4550.xml | 178 ++++----- src/devices/pic/xml_data/18F458.xml | 142 +++---- src/devices/pic/xml_data/18F4580.xml | 166 ++++---- src/devices/pic/xml_data/18F4585.xml | 154 ++++---- src/devices/pic/xml_data/18F45J10.xml | 60 +-- src/devices/pic/xml_data/18F4610.xml | 158 ++++---- src/devices/pic/xml_data/18F4620.xml | 158 ++++---- src/devices/pic/xml_data/18F4680.xml | 166 ++++---- src/devices/pic/xml_data/18F4682.xml | 178 ++++----- src/devices/pic/xml_data/18F4685.xml | 190 ++++----- src/devices/pic/xml_data/18F6310.xml | 106 ++--- src/devices/pic/xml_data/18F6390.xml | 106 ++--- src/devices/pic/xml_data/18F6393.xml | 106 ++--- src/devices/pic/xml_data/18F63J11.xml | 60 +-- src/devices/pic/xml_data/18F63J90.xml | 60 +-- src/devices/pic/xml_data/18F6410.xml | 106 ++--- src/devices/pic/xml_data/18F6490.xml | 106 ++--- src/devices/pic/xml_data/18F6493.xml | 106 ++--- src/devices/pic/xml_data/18F64J11.xml | 60 +-- src/devices/pic/xml_data/18F64J90.xml | 60 +-- src/devices/pic/xml_data/18F6520.xml | 146 +++---- src/devices/pic/xml_data/18F6525.xml | 138 +++---- src/devices/pic/xml_data/18F6527.xml | 154 ++++---- src/devices/pic/xml_data/18F6585.xml | 138 +++---- src/devices/pic/xml_data/18F65J10.xml | 60 +-- src/devices/pic/xml_data/18F65J11.xml | 60 +-- src/devices/pic/xml_data/18F65J15.xml | 60 +-- src/devices/pic/xml_data/18F65J50.xml | 68 ++-- src/devices/pic/xml_data/18F65J90.xml | 60 +-- src/devices/pic/xml_data/18F6620.xml | 146 +++---- src/devices/pic/xml_data/18F6621.xml | 150 +++---- src/devices/pic/xml_data/18F6622.xml | 166 ++++---- src/devices/pic/xml_data/18F6627.xml | 190 ++++----- src/devices/pic/xml_data/18F6680.xml | 150 +++---- src/devices/pic/xml_data/18F66J10.xml | 60 +-- src/devices/pic/xml_data/18F66J11.xml | 64 +-- src/devices/pic/xml_data/18F66J15.xml | 60 +-- src/devices/pic/xml_data/18F66J16.xml | 64 +-- src/devices/pic/xml_data/18F66J50.xml | 68 ++-- src/devices/pic/xml_data/18F66J55.xml | 68 ++-- src/devices/pic/xml_data/18F66J60.xml | 60 +-- src/devices/pic/xml_data/18F66J65.xml | 60 +-- src/devices/pic/xml_data/18F6720.xml | 194 ++++----- src/devices/pic/xml_data/18F6722.xml | 214 +++++----- src/devices/pic/xml_data/18F67J10.xml | 60 +-- src/devices/pic/xml_data/18F67J11.xml | 64 +-- src/devices/pic/xml_data/18F67J50.xml | 68 ++-- src/devices/pic/xml_data/18F67J60.xml | 60 +-- src/devices/pic/xml_data/18F8310.xml | 106 ++--- src/devices/pic/xml_data/18F8390.xml | 106 ++--- src/devices/pic/xml_data/18F8393.xml | 94 ++--- src/devices/pic/xml_data/18F83J11.xml | 80 ++-- src/devices/pic/xml_data/18F83J90.xml | 80 ++-- src/devices/pic/xml_data/18F8410.xml | 94 ++--- src/devices/pic/xml_data/18F8490.xml | 94 ++--- src/devices/pic/xml_data/18F8493.xml | 94 ++--- src/devices/pic/xml_data/18F84J11.xml | 80 ++-- src/devices/pic/xml_data/18F84J90.xml | 80 ++-- src/devices/pic/xml_data/18F8520.xml | 154 ++++---- src/devices/pic/xml_data/18F8525.xml | 150 +++---- src/devices/pic/xml_data/18F8527.xml | 174 ++++----- src/devices/pic/xml_data/18F8585.xml | 150 +++---- src/devices/pic/xml_data/18F85J10.xml | 80 ++-- src/devices/pic/xml_data/18F85J11.xml | 80 ++-- src/devices/pic/xml_data/18F85J15.xml | 80 ++-- src/devices/pic/xml_data/18F85J50.xml | 92 ++--- src/devices/pic/xml_data/18F85J90.xml | 80 ++-- src/devices/pic/xml_data/18F8620.xml | 154 ++++---- src/devices/pic/xml_data/18F8621.xml | 162 ++++---- src/devices/pic/xml_data/18F8622.xml | 186 ++++----- src/devices/pic/xml_data/18F8627.xml | 210 +++++----- src/devices/pic/xml_data/18F8680.xml | 162 ++++---- src/devices/pic/xml_data/18F86J10.xml | 80 ++-- src/devices/pic/xml_data/18F86J11.xml | 88 ++--- src/devices/pic/xml_data/18F86J15.xml | 80 ++-- src/devices/pic/xml_data/18F86J16.xml | 88 ++--- src/devices/pic/xml_data/18F86J50.xml | 92 ++--- src/devices/pic/xml_data/18F86J55.xml | 92 ++--- src/devices/pic/xml_data/18F86J60.xml | 68 ++-- src/devices/pic/xml_data/18F86J65.xml | 68 ++-- src/devices/pic/xml_data/18F8720.xml | 202 +++++----- src/devices/pic/xml_data/18F8722.xml | 234 +++++------ src/devices/pic/xml_data/18F87J10.xml | 80 ++-- src/devices/pic/xml_data/18F87J11.xml | 88 ++--- src/devices/pic/xml_data/18F87J50.xml | 92 ++--- src/devices/pic/xml_data/18F87J60.xml | 68 ++-- src/devices/pic/xml_data/18F96J60.xml | 84 ++-- src/devices/pic/xml_data/18F96J65.xml | 84 ++-- src/devices/pic/xml_data/18F97J60.xml | 84 ++-- src/devices/pic/xml_data/24FJ128GA006.xml | 62 +-- src/devices/pic/xml_data/24FJ128GA008.xml | 62 +-- src/devices/pic/xml_data/24FJ128GA010.xml | 62 +-- src/devices/pic/xml_data/24FJ64GA002.xml | 70 ++-- src/devices/pic/xml_data/24FJ64GA004.xml | 70 ++-- src/devices/pic/xml_data/24FJ64GA006.xml | 62 +-- src/devices/pic/xml_data/24FJ64GA008.xml | 62 +-- src/devices/pic/xml_data/24FJ64GA010.xml | 62 +-- src/devices/pic/xml_data/24FJ96GA006.xml | 62 +-- src/devices/pic/xml_data/24FJ96GA008.xml | 62 +-- src/devices/pic/xml_data/24FJ96GA010.xml | 62 +-- src/devices/pic/xml_data/24HJ128GP206.xml | 118 +++--- src/devices/pic/xml_data/24HJ128GP210.xml | 118 +++--- src/devices/pic/xml_data/24HJ128GP306.xml | 118 +++--- src/devices/pic/xml_data/24HJ128GP310.xml | 118 +++--- src/devices/pic/xml_data/24HJ128GP506.xml | 118 +++--- src/devices/pic/xml_data/24HJ128GP510.xml | 118 +++--- src/devices/pic/xml_data/24HJ12GP201.xml | 102 ++--- src/devices/pic/xml_data/24HJ12GP202.xml | 102 ++--- src/devices/pic/xml_data/24HJ16GP304.xml | 102 ++--- src/devices/pic/xml_data/24HJ256GP206.xml | 118 +++--- src/devices/pic/xml_data/24HJ256GP210.xml | 118 +++--- src/devices/pic/xml_data/24HJ256GP610.xml | 118 +++--- src/devices/pic/xml_data/24HJ32GP202.xml | 102 ++--- src/devices/pic/xml_data/24HJ32GP204.xml | 102 ++--- src/devices/pic/xml_data/24HJ64GP206.xml | 118 +++--- src/devices/pic/xml_data/24HJ64GP210.xml | 118 +++--- src/devices/pic/xml_data/24HJ64GP506.xml | 118 +++--- src/devices/pic/xml_data/24HJ64GP510.xml | 118 +++--- src/devices/pic/xml_data/30F1010.xml | 86 ++-- src/devices/pic/xml_data/30F2010.xml | 88 ++--- src/devices/pic/xml_data/30F2011.xml | 72 ++-- src/devices/pic/xml_data/30F2012.xml | 72 ++-- src/devices/pic/xml_data/30F2020.xml | 86 ++-- src/devices/pic/xml_data/30F2023.xml | 86 ++-- src/devices/pic/xml_data/30F3010.xml | 84 ++-- src/devices/pic/xml_data/30F3011.xml | 84 ++-- src/devices/pic/xml_data/30F3012.xml | 72 ++-- src/devices/pic/xml_data/30F3013.xml | 72 ++-- src/devices/pic/xml_data/30F3014.xml | 72 ++-- src/devices/pic/xml_data/30F4011.xml | 88 ++--- src/devices/pic/xml_data/30F4012.xml | 88 ++--- src/devices/pic/xml_data/30F4013.xml | 72 ++-- src/devices/pic/xml_data/30F5011.xml | 116 +++--- src/devices/pic/xml_data/30F5013.xml | 116 +++--- src/devices/pic/xml_data/30F5015.xml | 84 ++-- src/devices/pic/xml_data/30F5016.xml | 84 ++-- src/devices/pic/xml_data/30F6010.xml | 88 ++--- src/devices/pic/xml_data/30F6010A.xml | 124 +++--- src/devices/pic/xml_data/30F6011.xml | 76 ++-- src/devices/pic/xml_data/30F6011A.xml | 112 +++--- src/devices/pic/xml_data/30F6012.xml | 76 ++-- src/devices/pic/xml_data/30F6012A.xml | 112 +++--- src/devices/pic/xml_data/30F6013.xml | 76 ++-- src/devices/pic/xml_data/30F6013A.xml | 112 +++--- src/devices/pic/xml_data/30F6014.xml | 76 ++-- src/devices/pic/xml_data/30F6014A.xml | 112 +++--- src/devices/pic/xml_data/30F6015.xml | 124 +++--- src/devices/pic/xml_data/pic.xsd | 12 +- src/devices/pic/xml_data/registers/registers.xml | 306 +++++++-------- src/libgui/breakpoint_view.cpp | 34 +- src/libgui/breakpoint_view.h | 11 +- src/libgui/config_center.cpp | 26 +- src/libgui/config_center.h | 25 +- src/libgui/config_gen.cpp | 44 +-- src/libgui/config_gen.h | 19 +- src/libgui/console.cpp | 20 +- src/libgui/console.h | 9 +- src/libgui/device_editor.cpp | 52 +-- src/libgui/device_editor.h | 21 +- src/libgui/device_gui.cpp | 202 +++++----- src/libgui/device_gui.h | 84 ++-- src/libgui/editor.cpp | 18 +- src/libgui/editor.h | 31 +- src/libgui/editor_manager.cpp | 118 +++--- src/libgui/editor_manager.h | 43 +- src/libgui/global_config.cpp | 42 +- src/libgui/gui_debug_manager.cpp | 44 +-- src/libgui/gui_debug_manager.h | 3 +- src/libgui/gui_prog_manager.h | 3 +- src/libgui/hex_editor.cpp | 58 +-- src/libgui/hex_editor.h | 16 +- src/libgui/likeback.cpp | 280 ++++++------- src/libgui/likeback.h | 58 +-- src/libgui/log_view.cpp | 54 +-- src/libgui/log_view.h | 27 +- src/libgui/main_global.cpp | 10 +- src/libgui/main_global.h | 8 +- src/libgui/new_dialogs.cpp | 34 +- src/libgui/new_dialogs.h | 28 +- src/libgui/object_view.cpp | 36 +- src/libgui/object_view.h | 19 +- src/libgui/project.cpp | 96 ++--- src/libgui/project.h | 26 +- src/libgui/project_editor.cpp | 32 +- src/libgui/project_editor.h | 15 +- src/libgui/project_manager.cpp | 164 ++++---- src/libgui/project_manager.h | 27 +- src/libgui/project_manager_ui.cpp | 32 +- src/libgui/project_manager_ui.h | 9 +- src/libgui/project_wizard.cpp | 78 ++-- src/libgui/project_wizard.h | 28 +- src/libgui/register_view.cpp | 24 +- src/libgui/register_view.h | 5 +- src/libgui/text_editor.cpp | 78 ++-- src/libgui/text_editor.h | 28 +- src/libgui/toplevel.cpp | 364 ++++++++--------- src/libgui/toplevel.h | 33 +- src/libgui/toplevel_ui.cpp | 32 +- src/libgui/toplevel_ui.h | 22 +- src/libgui/watch_view.cpp | 84 ++-- src/libgui/watch_view.h | 32 +- src/piklab-coff/main.cpp | 68 ++-- src/piklab-coff/main.h | 23 +- src/piklab-hex/main.cpp | 44 +-- src/piklab-hex/main.h | 19 +- src/piklab-prog/cli_debug_manager.h | 1 + src/piklab-prog/cli_interactive.cpp | 88 ++--- src/piklab-prog/cli_interactive.h | 23 +- src/piklab-prog/cli_prog_manager.cpp | 4 +- src/piklab-prog/cli_prog_manager.h | 3 +- src/piklab-prog/cli_purl.cpp | 10 +- src/piklab-prog/cmdline.cpp | 80 ++-- src/piklab-prog/cmdline.h | 17 +- src/piklab-test/base/device_test.cpp | 2 +- src/piklab-test/base/device_test.h | 2 +- src/piklab-test/base/generator_check.cpp | 54 +-- src/piklab-test/base/generator_check.h | 6 +- src/piklab-test/base/main_test.cpp | 2 +- src/piklab-test/base/main_test.h | 4 +- src/piklab-test/checksum/checksum_check.cpp | 56 +-- src/piklab-test/checksum/checksum_check.h | 6 +- src/piklab-test/misc/misc_check.cpp | 2 +- .../save_load_memory/save_load_memory_check.cpp | 4 +- src/progs/base/debug_config.cpp | 4 +- src/progs/base/generic_debug.cpp | 10 +- src/progs/base/generic_debug.h | 16 +- src/progs/base/generic_prog.cpp | 34 +- src/progs/base/generic_prog.h | 15 +- src/progs/base/hardware_config.cpp | 36 +- src/progs/base/hardware_config.h | 26 +- src/progs/base/prog_config.cpp | 36 +- src/progs/base/prog_config.h | 8 +- src/progs/base/prog_group.cpp | 2 +- src/progs/base/prog_group.h | 10 +- src/progs/base/prog_specific.cpp | 8 +- src/progs/base/prog_specific.h | 12 +- src/progs/bootloader/base/bootloader.h | 2 +- src/progs/bootloader/base/bootloader_prog.h | 1 + src/progs/bootloader/gui/bootloader_ui.h | 4 +- src/progs/direct/base/direct.cpp | 18 +- src/progs/direct/base/direct.h | 6 +- src/progs/direct/base/direct_16.cpp | 14 +- src/progs/direct/base/direct_16.h | 2 +- src/progs/direct/base/direct_18F.cpp | 22 +- src/progs/direct/base/direct_data.h | 2 +- src/progs/direct/base/direct_mem24.cpp | 16 +- src/progs/direct/base/direct_pic.cpp | 10 +- src/progs/direct/base/direct_pic.h | 2 +- src/progs/direct/base/direct_prog.h | 8 +- src/progs/direct/base/direct_prog_config.cpp | 8 +- src/progs/direct/base/direct_prog_config.h | 6 +- src/progs/direct/gui/direct_config_widget.cpp | 88 ++--- src/progs/direct/gui/direct_config_widget.h | 26 +- src/progs/direct/xml/xml_direct_parser.cpp | 16 +- src/progs/gpsim/base/gpsim.cpp | 28 +- src/progs/gpsim/base/gpsim.h | 11 +- src/progs/gpsim/base/gpsim_debug.cpp | 68 ++-- src/progs/gpsim/base/gpsim_debug.h | 19 +- src/progs/gpsim/gui/gpsim_group_ui.cpp | 20 +- src/progs/gpsim/gui/gpsim_group_ui.h | 11 +- src/progs/gui/debug_config_center.cpp | 2 +- src/progs/gui/debug_config_center.h | 8 +- src/progs/gui/hardware_config_widget.cpp | 66 ++-- src/progs/gui/hardware_config_widget.h | 33 +- src/progs/gui/port_selector.cpp | 44 +-- src/progs/gui/port_selector.h | 29 +- src/progs/gui/prog_config_center.cpp | 50 +-- src/progs/gui/prog_config_center.h | 21 +- src/progs/gui/prog_config_widget.cpp | 14 +- src/progs/gui/prog_config_widget.h | 7 +- src/progs/gui/prog_group_ui.cpp | 56 +-- src/progs/gui/prog_group_ui.h | 15 +- src/progs/icd1/base/icd1.cpp | 22 +- src/progs/icd1/base/icd1.h | 6 +- src/progs/icd1/base/icd1_data.h | 4 +- src/progs/icd1/base/icd1_prog.cpp | 2 +- src/progs/icd1/base/icd1_prog.h | 7 +- src/progs/icd1/base/icd1_serial.cpp | 10 +- src/progs/icd1/base/icd1_serial.h | 2 +- src/progs/icd1/gui/icd1_group_ui.cpp | 16 +- src/progs/icd1/gui/icd1_group_ui.h | 9 +- src/progs/icd1/xml/xml_icd1_parser.cpp | 8 +- src/progs/icd2/base/icd.cpp | 10 +- src/progs/icd2/base/icd.h | 8 +- src/progs/icd2/base/icd2.cpp | 78 ++-- src/progs/icd2/base/icd2.h | 14 +- src/progs/icd2/base/icd2_data.h | 4 +- src/progs/icd2/base/icd2_debug.cpp | 56 +-- src/progs/icd2/base/icd2_debug.h | 9 +- src/progs/icd2/base/icd2_debug_specific.cpp | 16 +- src/progs/icd2/base/icd2_debug_specific.h | 6 +- src/progs/icd2/base/icd2_prog.cpp | 18 +- src/progs/icd2/base/icd2_prog.h | 8 +- src/progs/icd2/base/icd2_serial.cpp | 12 +- src/progs/icd2/base/icd2_serial.h | 6 +- src/progs/icd2/base/icd2_usb.cpp | 30 +- src/progs/icd2/base/icd2_usb.h | 10 +- src/progs/icd2/base/icd_prog.cpp | 4 +- src/progs/icd2/base/icd_prog.h | 1 + src/progs/icd2/base/microchip.h | 2 +- src/progs/icd2/gui/icd2_group_ui.cpp | 28 +- src/progs/icd2/gui/icd2_group_ui.h | 11 +- src/progs/icd2/xml/xml_icd2_parser.cpp | 14 +- src/progs/manager/breakpoint.cpp | 22 +- src/progs/manager/breakpoint.h | 13 +- src/progs/manager/debug_manager.cpp | 40 +- src/progs/manager/debug_manager.h | 17 +- src/progs/manager/prog_manager.cpp | 20 +- src/progs/manager/prog_manager.h | 9 +- .../picdem_bootloader/base/picdem_bootloader.cpp | 36 +- .../picdem_bootloader/base/picdem_bootloader.h | 8 +- .../base/picdem_bootloader_data.h | 4 +- .../base/picdem_bootloader_prog.h | 5 +- .../picdem_bootloader/gui/picdem_bootloader_ui.cpp | 12 +- .../picdem_bootloader/gui/picdem_bootloader_ui.h | 5 +- .../xml/xml_picdem_bootloader_parser.cpp | 4 +- src/progs/pickit1/base/pickit1.cpp | 4 +- src/progs/pickit1/base/pickit1_data.h | 4 +- src/progs/pickit1/base/pickit1_prog.h | 5 +- src/progs/pickit1/gui/pickit1_group_ui.cpp | 8 +- src/progs/pickit1/gui/pickit1_group_ui.h | 4 +- src/progs/pickit1/xml/xml_pickit1_parser.cpp | 16 +- src/progs/pickit2/base/pickit.cpp | 20 +- src/progs/pickit2/base/pickit.h | 6 +- src/progs/pickit2/base/pickit2.cpp | 16 +- src/progs/pickit2/base/pickit2_data.h | 4 +- src/progs/pickit2/base/pickit2_prog.cpp | 4 +- src/progs/pickit2/base/pickit2_prog.h | 5 +- src/progs/pickit2/base/pickit_prog.cpp | 10 +- src/progs/pickit2/base/pickit_prog.h | 1 + src/progs/pickit2/gui/pickit2_group_ui.cpp | 12 +- src/progs/pickit2/gui/pickit2_group_ui.h | 7 +- src/progs/pickit2/xml/xml_pickit2_parser.cpp | 16 +- .../pickit2_bootloader/base/pickit2_bootloader.cpp | 6 +- .../base/pickit2_bootloader_data.h | 4 +- .../base/pickit2_bootloader_prog.h | 5 +- .../gui/pickit2_bootloader_ui.cpp | 8 +- .../pickit2_bootloader/gui/pickit2_bootloader_ui.h | 5 +- .../xml/xml_pickit2_bootloader_parser.cpp | 4 +- src/progs/pickit2v2/base/pickit2v2.cpp | 40 +- src/progs/pickit2v2/base/pickit2v2.h | 8 +- src/progs/pickit2v2/base/pickit2v2_data.cpp | 8 +- src/progs/pickit2v2/base/pickit2v2_data.h | 4 +- src/progs/pickit2v2/base/pickit2v2_prog.cpp | 22 +- src/progs/pickit2v2/base/pickit2v2_prog.h | 5 +- src/progs/pickit2v2/gui/pickit2v2_group_ui.cpp | 8 +- src/progs/pickit2v2/gui/pickit2v2_group_ui.h | 4 +- src/progs/psp/base/psp.cpp | 48 +-- src/progs/psp/base/psp.h | 6 +- src/progs/psp/base/psp_data.h | 6 +- src/progs/psp/base/psp_prog.h | 7 +- src/progs/psp/base/psp_serial.cpp | 20 +- src/progs/psp/base/psp_serial.h | 8 +- src/progs/psp/gui/psp_group_ui.cpp | 8 +- src/progs/psp/gui/psp_group_ui.h | 4 +- src/progs/psp/xml/xml_psp_parser.cpp | 8 +- src/progs/sdcdb/base/sdcdb_debug.cpp | 64 +-- src/progs/sdcdb/base/sdcdb_debug.h | 19 +- src/progs/tbl_bootloader/base/tbl_bootloader.cpp | 24 +- src/progs/tbl_bootloader/base/tbl_bootloader.h | 2 +- .../tbl_bootloader/base/tbl_bootloader_data.h | 4 +- .../tbl_bootloader/base/tbl_bootloader_prog.h | 5 +- src/progs/tbl_bootloader/gui/tbl_bootloader_ui.cpp | 16 +- src/progs/tbl_bootloader/gui/tbl_bootloader_ui.h | 5 +- .../xml/xml_tbl_bootloader_parser.cpp | 8 +- src/tools/base/generic_tool.h | 12 +- src/tools/base/tool_group.cpp | 26 +- src/tools/base/tool_group.h | 18 +- src/tools/boost/boost.cpp | 22 +- src/tools/boost/boost.h | 16 +- src/tools/boost/boost_generator.cpp | 10 +- src/tools/boost/boostbasic.cpp | 6 +- src/tools/boost/boostbasic.h | 16 +- src/tools/boost/boostc.cpp | 6 +- src/tools/boost/boostc.h | 16 +- src/tools/boost/boostc_compile.cpp | 18 +- src/tools/boost/boostc_compile.h | 17 +- src/tools/boost/boostcpp.cpp | 6 +- src/tools/boost/boostcpp.h | 16 +- src/tools/boost/gui/boost_ui.h | 1 + src/tools/c18/c18.cpp | 18 +- src/tools/c18/c18.h | 20 +- src/tools/c18/c18_compile.cpp | 20 +- src/tools/c18/c18_compile.h | 17 +- src/tools/c18/c18_config.h | 2 +- src/tools/c18/gui/c18_ui.cpp | 8 +- src/tools/c18/gui/c18_ui.h | 3 +- src/tools/cc5x/cc5x.cpp | 14 +- src/tools/cc5x/cc5x.h | 14 +- src/tools/cc5x/cc5x_compile.cpp | 10 +- src/tools/cc5x/cc5x_compile.h | 9 +- src/tools/cc5x/gui/cc5x_ui.h | 1 + src/tools/ccsc/ccsc.cpp | 22 +- src/tools/ccsc/ccsc.h | 14 +- src/tools/ccsc/ccsc_compile.cpp | 22 +- src/tools/ccsc/ccsc_compile.h | 13 +- src/tools/ccsc/gui/ccsc_ui.h | 1 + src/tools/custom/custom.cpp | 6 +- src/tools/custom/custom.h | 8 +- src/tools/gputils/gputils.cpp | 24 +- src/tools/gputils/gputils.h | 16 +- src/tools/gputils/gputils_compile.cpp | 38 +- src/tools/gputils/gputils_compile.h | 30 +- src/tools/gputils/gputils_config.cpp | 2 +- src/tools/gputils/gputils_generator.cpp | 34 +- src/tools/gputils/gputils_generator.h | 2 +- src/tools/gputils/gui/gputils_ui.cpp | 8 +- src/tools/gputils/gui/gputils_ui.h | 3 +- src/tools/gui/tool_config_widget.cpp | 54 +-- src/tools/gui/tool_config_widget.h | 17 +- src/tools/gui/tool_group_ui.cpp | 4 +- src/tools/gui/tool_group_ui.h | 2 +- src/tools/gui/toolchain_config_center.cpp | 32 +- src/tools/gui/toolchain_config_center.h | 15 +- src/tools/gui/toolchain_config_widget.cpp | 100 ++--- src/tools/gui/toolchain_config_widget.h | 29 +- src/tools/jal/gui/jal_ui.h | 1 + src/tools/jal/jal.cpp | 14 +- src/tools/jal/jal.h | 14 +- src/tools/jal/jal_compile.cpp | 10 +- src/tools/jal/jal_compile.h | 9 +- src/tools/jal/jal_generator.cpp | 2 +- src/tools/jalv2/gui/jalv2_ui.h | 1 + src/tools/jalv2/jalv2.cpp | 14 +- src/tools/jalv2/jalv2.h | 14 +- src/tools/jalv2/jalv2_compile.cpp | 14 +- src/tools/jalv2/jalv2_compile.h | 9 +- src/tools/list/compile_config.cpp | 88 ++--- src/tools/list/compile_config.h | 64 +-- src/tools/list/compile_manager.cpp | 32 +- src/tools/list/compile_manager.h | 19 +- src/tools/list/compile_process.cpp | 126 +++--- src/tools/list/compile_process.h | 74 ++-- src/tools/list/device_info.cpp | 20 +- src/tools/list/device_info.h | 8 +- src/tools/list/tools_config_widget.cpp | 54 +-- src/tools/list/tools_config_widget.h | 24 +- src/tools/mpc/gui/mpc_ui.h | 1 + src/tools/mpc/mpc.cpp | 12 +- src/tools/mpc/mpc.h | 14 +- src/tools/mpc/mpc_compile.cpp | 16 +- src/tools/mpc/mpc_compile.h | 11 +- src/tools/pic30/gui/pic30_ui.cpp | 2 +- src/tools/pic30/gui/pic30_ui.h | 1 + src/tools/pic30/pic30.cpp | 24 +- src/tools/pic30/pic30.h | 14 +- src/tools/pic30/pic30_compile.cpp | 80 ++-- src/tools/pic30/pic30_compile.h | 64 +-- src/tools/pic30/pic30_generator.cpp | 8 +- src/tools/picc/gui/picc_ui.h | 1 + src/tools/picc/picc.cpp | 32 +- src/tools/picc/picc.h | 32 +- src/tools/picc/picc_compile.cpp | 44 +-- src/tools/picc/picc_compile.h | 39 +- src/tools/sdcc/gui/sdcc_ui.h | 1 + src/tools/sdcc/sdcc.cpp | 14 +- src/tools/sdcc/sdcc.h | 18 +- src/tools/sdcc/sdcc_compile.cpp | 32 +- src/tools/sdcc/sdcc_compile.h | 26 +- src/tools/sdcc/sdcc_generator.cpp | 16 +- src/tools/sdcc/sdcc_generator.h | 8 +- src/xml_to_data/device_xml_to_data.cpp | 120 +++--- src/xml_to_data/device_xml_to_data.h | 38 +- src/xml_to_data/prog_xml_to_data.h | 86 ++-- src/xml_to_data/xml_to_data.cpp | 38 +- src/xml_to_data/xml_to_data.h | 22 +- test/pic30/standalone_test.s | 2 +- test/pic30/test.s | 2 +- test/picc/standalone_test.c | 2 +- test/picc/test.c | 2 +- 911 files changed, 22571 insertions(+), 22445 deletions(-) diff --git a/src/coff/base/cdb_parser.cpp b/src/coff/base/cdb_parser.cpp index 2e38b84..eb7495b 100644 --- a/src/coff/base/cdb_parser.cpp +++ b/src/coff/base/cdb_parser.cpp @@ -65,7 +65,7 @@ CDB::Object::Object(const PURL::Url &url, Log::Base &log) { PURL::File file(url, log); if ( !file.openForRead() ) return; - QStringList lines = file.readLines(); + TQStringList lines = file.readLines(); for (_line=0; _linefilename, 0); } -bool CDB::Object::parse(Scope &scope, QString &name) +bool CDB::Object::parse(Scope &scope, TQString &name) { - QString s; + TQString s; if ( !readFixedLengthString(s, 1) ) return false; scope.type = ScopeType::fromKey(s); switch (scope.type.type()) { @@ -253,12 +253,12 @@ bool CDB::Object::parse(TypeChain &typeChain) if ( !readAndCheckChar('{') ) return false; if ( !readUInt(nb) ) return false; if ( !readAndCheckChar('}') ) return false; - QString s; + TQString s; if ( !readStoppedString(s, ':') ) return false; - QStringList list = QStringList::split(',', s, true); + TQStringList list = TQStringList::split(',', s, true); for (uint i=0; i types; + TQValueVector types; Sign sign; }; @@ -76,13 +76,13 @@ public: AddressSpaceType type; bool onStack; uint stackOffset; // valid if onStack is true - QStringList registers; // for Register type + TQStringList registers; // for Register type }; class SymbolRecord : public Record { public: - QString name; + TQString name; Scope scope; TypeChain typeChain; AddressSpace addressSpace; @@ -105,8 +105,8 @@ public: class TypeRecord : public Record { public: - QString filename, name; - QValueVector members; + TQString filename, name; + TQValueVector members; }; class LinkerRecord : public Record @@ -115,10 +115,10 @@ public: enum Type { Address = 0, EndAddress, AsmLine, CLine, Nb_Types }; Type type; Scope scope; // for Address and EndAddress - QString name; // for Address and EndAddress + TQString name; // for Address and EndAddress uint address; uint line; // for AsmLine and CLine - QString filename; // for AsmLine and CLine + TQString filename; // for AsmLine and CLine uint block, level; // for CLine }; @@ -131,23 +131,23 @@ public: private: Log::Base &_log; - QString _current; + TQString _current; uint _line, _col; - QValueVector _records; + TQValueVector _records; - void log(Log::LineType type, const QString &message); - void logMalformed(const QString &detail); + void log(Log::LineType type, const TQString &message); + void logMalformed(const TQString &detail); bool readBool(bool &b); - bool getUInt(const QString &s, uint &r); + bool getUInt(const TQString &s, uint &r); bool readUInt(uint &v); bool readChar(char &c); bool readAndCheckChar(char c); - bool getString(const QString &s, QString &r); - bool readStoppedString(QString &s, char stop); - bool readFixedLengthString(QString &s, uint size); + bool getString(const TQString &s, TQString &r); + bool readStoppedString(TQString &s, char stop); + bool readFixedLengthString(TQString &s, uint size); bool readHex(uint &v); - bool parse(Scope &scope, QString &name); + bool parse(Scope &scope, TQString &name); bool parse(TypeChain &typeChain); bool parse(TypeRecord &typeRecord); bool parse(SymbolRecord &sr); diff --git a/src/coff/base/coff.cpp b/src/coff/base/coff.cpp index 5eaad84..83100a4 100644 --- a/src/coff/base/coff.cpp +++ b/src/coff/base/coff.cpp @@ -33,64 +33,64 @@ CoffType Coff::identify(const PURL::Url &url, Log::Base &log) { PURL::File file(url, log); if ( !file.openForRead() ) return CoffType::Nb_Types; - QByteArray data = file.readAll(); + TQByteArray data = file.readAll(); if ( log.hasError() ) return CoffType::Nb_Types; uint offset = 0; Format format; - Q_UINT32 magic; + TQ_UINT32 magic; return identify(data, offset, log, format, magic); } -CoffType Coff::identify(const QByteArray &data, uint &offset, Log::Base &log, Format &format, Q_UINT32 &magic) +CoffType Coff::identify(const TQByteArray &data, uint &offset, Log::Base &log, Format &format, TQ_UINT32 &magic) { - QString id = "!\012"; + TQString id = "!\012"; if ( data.count()>=id.length() ) { - QString s = QString::fromAscii(data.data(), id.length()); + TQString s = TQString::fromAscii(data.data(), id.length()); if ( s==id ) { offset += id.length(); return CoffType::Archive; } } if ( !getULong(data, offset, 2, log, magic) ) return CoffType::Nb_Types; - log.log(Log::DebugLevel::Extra, QString("COFF format: %1").arg(toHexLabel(magic, 4))); + log.log(Log::DebugLevel::Extra, TQString("COFF format: %1").tqarg(toHexLabel(magic, 4))); format = Format::Nb_Types; FOR_EACH(Format, f) if ( magic==f.data().magic ) format = f; return CoffType::Object; } //---------------------------------------------------------------------------- -bool Coff::getULong(const QByteArray &data, uint &offset, uint nbBytes, Log::Base &log, Q_UINT32 &v) +bool Coff::getULong(const TQByteArray &data, uint &offset, uint nbBytes, Log::Base &log, TQ_UINT32 &v) { bool ok; v = ::getULong(data, offset, nbBytes, &ok); if ( !ok ) { - log.log(Log::LineType::Error, i18n("COFF file is truncated (offset: %1 nbBytes: %2 size:%3).").arg(offset).arg(nbBytes).arg(data.count())); + log.log(Log::LineType::Error, i18n("COFF file is truncated (offset: %1 nbBytes: %2 size:%3).").tqarg(offset).tqarg(nbBytes).tqarg(data.count())); return false; } offset += nbBytes; return true; } -bool Coff::getString(const QByteArray &data, uint &offset, uint nbChars, Log::Base &log, QString &name) +bool Coff::getString(const TQByteArray &data, uint &offset, uint nbChars, Log::Base &log, TQString &name) { if ( !checkAvailable(data, offset, nbChars) ) { - log.log(Log::LineType::Error, i18n("COFF file is truncated (offset: %1 nbBytes: %2 size:%3).").arg(offset).arg(nbChars).arg(data.count())); + log.log(Log::LineType::Error, i18n("COFF file is truncated (offset: %1 nbBytes: %2 size:%3).").tqarg(offset).tqarg(nbChars).tqarg(data.count())); return false; } - name = QString::fromAscii(data.data()+offset, nbChars); + name = TQString::fromAscii(data.data()+offset, nbChars); offset += nbChars; return true; } //---------------------------------------------------------------------------- -bool Coff::Base::initParse(CoffType type, QByteArray &data, uint &offset, Log::Base &log) +bool Coff::Base::initParse(CoffType type, TQByteArray &data, uint &offset, Log::Base &log) { PURL::File file(_url, log); if ( !file.openForRead() ) return false; data = file.readAll(); if ( log.hasError() ) return false; if ( identify(data, offset, log, _format, _magic)!=type ) { - log.log(Log::LineType::Error, i18n("Could not recognize file (magic number is %1).").arg(toHexLabel(_magic, 4))); + log.log(Log::LineType::Error, i18n("Could not recognize file (magic number is %1).").tqarg(toHexLabel(_magic, 4))); return false; } return true; diff --git a/src/coff/base/coff.h b/src/coff/base/coff.h index edd0ae5..8e69ef0 100644 --- a/src/coff/base/coff.h +++ b/src/coff/base/coff.h @@ -21,8 +21,8 @@ END_DECLARE_ENUM_STD(CoffType) //---------------------------------------------------------------------------- namespace Coff { -extern bool getString(const QByteArray &data, uint &offset, uint nbChars, Log::Base &log, QString &name); -extern bool getULong(const QByteArray &data, uint &offset, uint nbBytes, Log::Base &log, Q_UINT32 &v); +extern bool getString(const TQByteArray &data, uint &offset, uint nbChars, Log::Base &log, TQString &name); +extern bool getULong(const TQByteArray &data, uint &offset, uint nbBytes, Log::Base &log, TQ_UINT32 &v); //---------------------------------------------------------------------------- enum SizeType { HeaderSize = 0, OptHeaderSize, SectionHeaderSize, SymbolSize, @@ -37,7 +37,7 @@ BEGIN_DECLARE_ENUM(Format) END_DECLARE_ENUM(Format, FormatData) extern CoffType identify(const PURL::Url &url, Log::Base &log); -extern CoffType identify(const QByteArray &data, uint &offset, Log::Base &log, Format &format, Q_UINT32 &magic); +extern CoffType identify(const TQByteArray &data, uint &offset, Log::Base &log, Format &format, TQ_UINT32 &magic); //---------------------------------------------------------------------------- class Base @@ -54,9 +54,9 @@ public: protected: PURL::Url _url; Format _format; - Q_UINT32 _magic; + TQ_UINT32 _magic; - bool initParse(CoffType type, QByteArray &data, uint &offset, Log::Base &log); + bool initParse(CoffType type, TQByteArray &data, uint &offset, Log::Base &log); }; } // namespace diff --git a/src/coff/base/coff_archive.cpp b/src/coff/base/coff_archive.cpp index 72a8883..ea9a2b9 100644 --- a/src/coff/base/coff_archive.cpp +++ b/src/coff/base/coff_archive.cpp @@ -9,35 +9,35 @@ #include "coff_archive.h" //---------------------------------------------------------------------------- -Coff::Member::Member(const QByteArray &data, uint &offset, Log::Base &log) +Coff::Member::Member(const TQByteArray &data, uint &offset, Log::Base &log) { // parse header - QString s; + TQString s; if ( !getString(data, offset, 256, log, s) ) return; - int i = s.find('/'); + int i = s.tqfind('/'); if ( i==-1 ) { - log.log(Log::LineType::Error, i18n("Member name not terminated by '/' (\"%1\").").arg(s)); + log.log(Log::LineType::Error, i18n("Member name not terminated by '/' (\"%1\").").tqarg(s)); return; } _name = s.mid(0, i); if ( !getString(data, offset, 12, log, s) ) return; // mtime if ( !getString(data, offset, 10, log, s) ) return; - i = s.find('l'); + i = s.tqfind('l'); if ( i==-1 ) { - log.log(Log::LineType::Error, i18n("File size not terminated by 'l' (\"%1\").").arg(s)); + log.log(Log::LineType::Error, i18n("File size not terminated by 'l' (\"%1\").").tqarg(s)); return; } bool ok; _nbBytes = s.mid(0, i).toUInt(&ok); if ( !ok ) { - log.log(Log::LineType::Error, i18n("Wrong format for file size \"%1\".").arg(s)); + log.log(Log::LineType::Error, i18n("Wrong format for file size \"%1\".").tqarg(s)); return; } - Q_UINT32 v; + TQ_UINT32 v; if ( !getULong(data, offset, 2, log, v) ) return; - log.log(Log::DebugLevel::Extra, i18n("Magic number: %1").arg(toHexLabel(v, 4))); + log.log(Log::DebugLevel::Extra, i18n("Magic number: %1").tqarg(toHexLabel(v, 4))); // if ( v!=0x600A ) { -// log.log(Log::LineType::Error, i18n("Wrong magic for Microchip archive (\"%1\").").arg(toHexLabel(v, 4))); +// log.log(Log::LineType::Error, i18n("Wrong magic for Microchip archive (\"%1\").").tqarg(toHexLabel(v, 4))); // return; // } offset += _nbBytes; @@ -50,7 +50,7 @@ Coff::Archive::Archive(const PURL::Url &url) bool Coff::Archive::parse(Log::Base &log) { - QByteArray data; + TQByteArray data; uint offset = 0, symbolEnd = 0; Member *symbol = 0; if ( !initParse(CoffType::Archive, data, offset, log) ) return false; @@ -76,26 +76,26 @@ bool Coff::Archive::parse(Log::Base &log) Coff::Archive::~Archive() { - QMap::const_iterator it; + TQMap::const_iterator it; for (it=_members.begin(); it!=_members.end(); ++it) delete it.data(); } -bool Coff::Archive::readSymbols(const QByteArray &data, uint offset, Log::Base &log) +bool Coff::Archive::readSymbols(const TQByteArray &data, uint offset, Log::Base &log) { - Q_UINT32 nb; + TQ_UINT32 nb; if ( !getULong(data, offset, 4, log, nb) ) return false; - QValueVector members(nb); + TQValueVector members(nb); for (uint i=0; i::const_iterator it; + TQMap::const_iterator it; for (it=members().begin(); it!=members().end(); ++it) - keys.append(it.key(), i18n("size: %1 bytes").arg(it.data()->nbBytes())); + keys.append(it.key(), i18n("size: %1 bytes").tqarg(it.data()->nbBytes())); return keys; } Log::KeyList Coff::Archive::symbolsInformation() const { Log::KeyList keys(i18n("Symbols:")); - QMap::const_iterator it; + TQMap::const_iterator it; for (it=symbols().begin(); it!=symbols().end(); ++it) keys.append(it.key(), it.data()->name()); return keys; diff --git a/src/coff/base/coff_archive.h b/src/coff/base/coff_archive.h index ba43a38..e4d0032 100644 --- a/src/coff/base/coff_archive.h +++ b/src/coff/base/coff_archive.h @@ -17,12 +17,12 @@ namespace Coff class Member { public: - Member(const QByteArray &data, uint &offset, Log::Base &log); - QString name() const { return _name; } + Member(const TQByteArray &data, uint &offset, Log::Base &log); + TQString name() const { return _name; } uint nbBytes() const { return _nbBytes; } private: - QString _name; + TQString _name; uint _nbBytes; }; @@ -33,19 +33,19 @@ public: Archive(const PURL::Url &url); virtual ~Archive(); virtual bool parse(Log::Base &log); - const QMapmembers() const { return _members; } - const QMapsymbols() const { return _symbols; } + const TQMapmembers() const { return _members; } + const TQMapsymbols() const { return _symbols; } virtual Log::KeyList information() const; Log::KeyList membersInformation() const; Log::KeyList symbolsInformation() const; private: - QMap _members; // name -> Member * - QMap _offsets; // offset -> Member * - QMap _symbols; // name -> Member * + TQMap _members; // name -> Member * + TQMap _offsets; // offset -> Member * + TQMap _symbols; // name -> Member * - bool readSymbols(const QByteArray &data, uint offset, Log::Base &log); + bool readSymbols(const TQByteArray &data, uint offset, Log::Base &log); }; } // namespace diff --git a/src/coff/base/coff_data.h b/src/coff/base/coff_data.h index 9676e42..17a0e0e 100644 --- a/src/coff/base/coff_data.h +++ b/src/coff/base/coff_data.h @@ -15,7 +15,7 @@ namespace Coff struct Data { uint ids[MAX_NB_IDS]; }; - extern QString findId(uint id); + extern TQString findId(uint id); } // namespace diff --git a/src/coff/base/coff_object.cpp b/src/coff/base/coff_object.cpp index f4109f9..f6263fd 100644 --- a/src/coff/base/coff_object.cpp +++ b/src/coff/base/coff_object.cpp @@ -16,10 +16,10 @@ #include "common/global/pfile.h" //---------------------------------------------------------------------------- -bool Coff::getName(const QByteArray &data, uint &offset, uint nbChars, uint stringTableOffset, - Log::Base &log, QString &name) +bool Coff::getName(const TQByteArray &data, uint &offset, uint nbChars, uint stringTableOffset, + Log::Base &log, TQString &name) { - Q_UINT32 v; + TQ_UINT32 v; if ( !getULong(data, offset, 4, log, v) ) return false; if ( v!=0 ) { // name is not in string table offset -= 4; @@ -27,7 +27,7 @@ bool Coff::getName(const QByteArray &data, uint &offset, uint nbChars, uint stri } if ( !getULong(data, offset, 4, log, v) ) return false; // ### do a sanity check here - name = QString(data.data()+stringTableOffset+v); + name = TQString(data.data()+stringTableOffset+v); return true; } @@ -55,7 +55,7 @@ const Coff::AuxSymbolType::Data Coff::AuxSymbolType::DATA[Nb_Types] = { { 0, I18N_NOOP("Section") } }; -Coff::AuxSymbol *Coff::AuxSymbol::factory(const Object &object, AuxSymbolType type, const QByteArray &data, uint offset, uint stringTableOffset, Log::Base &log) +Coff::AuxSymbol *Coff::AuxSymbol::factory(const Object &object, AuxSymbolType type, const TQByteArray &data, uint offset, uint stringTableOffset, Log::Base &log) { switch (type.type()) { case AuxSymbolType::Direct: return new AuxSymbolDirect(object, data, offset, stringTableOffset, log); @@ -68,47 +68,47 @@ Coff::AuxSymbol *Coff::AuxSymbol::factory(const Object &object, AuxSymbolType ty return 0; } -Coff::AuxSymbolDirect::AuxSymbolDirect(const Object &object, const QByteArray &data, uint start, uint stringTableOffset, Log::Base &log) +Coff::AuxSymbolDirect::AuxSymbolDirect(const Object &object, const TQByteArray &data, uint start, uint stringTableOffset, Log::Base &log) : AuxSymbol(object) { uint offset = start; - Q_UINT32 v; + TQ_UINT32 v; if ( !getULong(data, offset, 1, log, v) ) return; _command = v; if ( !getULong(data, offset, 4, log, v) ) return; - _string = QString(data.data()+stringTableOffset+v); + _string = TQString(data.data()+stringTableOffset+v); } -Coff::AuxSymbolFile::AuxSymbolFile(const Object &object, const QByteArray &data, uint start, uint stringTableOffset, Log::Base &log) +Coff::AuxSymbolFile::AuxSymbolFile(const Object &object, const TQByteArray &data, uint start, uint stringTableOffset, Log::Base &log) : AuxSymbol(object) { uint offset = start; - Q_UINT32 v; + TQ_UINT32 v; if ( object.format()==Format::PIC30 ) { if ( !getName(data, offset, 14, stringTableOffset, log, _filename) ) return; _line = 0; } else { if ( !getULong(data, offset, 4, log, v) ) return; - _filename = QString(data.data()+stringTableOffset+v); + _filename = TQString(data.data()+stringTableOffset+v); if ( !getULong(data, offset, 4, log, v) ) return; _line = v; } } -Coff::AuxSymbolIdentifier::AuxSymbolIdentifier(const Object &object, const QByteArray &data, uint start, uint stringTableOffset, Log::Base &log) +Coff::AuxSymbolIdentifier::AuxSymbolIdentifier(const Object &object, const TQByteArray &data, uint start, uint stringTableOffset, Log::Base &log) : AuxSymbol(object) { uint offset = start; - Q_UINT32 v; + TQ_UINT32 v; if ( !getULong(data, offset, 4, log, v) ) return; - _string = QString(data.data()+stringTableOffset+v); + _string = TQString(data.data()+stringTableOffset+v); } -Coff::AuxSymbolSection::AuxSymbolSection(const Object &object, const QByteArray &data, uint start, uint, Log::Base &log) +Coff::AuxSymbolSection::AuxSymbolSection(const Object &object, const TQByteArray &data, uint start, uint, Log::Base &log) : AuxSymbol(object) { uint offset = start; - Q_UINT32 v; + TQ_UINT32 v; if ( !getULong(data, offset, 4, log, v) ) return; _length = v; if ( !getULong(data, offset, 2, log, v) ) return; @@ -180,12 +180,12 @@ const Coff::SymbolDerivedType::Data Coff::SymbolDerivedType::DATA[Nb_Types] = { { 0, I18N_NOOP("Array"), 0x110000 } }; -Coff::Symbol::Symbol(const Object &object, const QByteArray &data, uint start, - uint stringTableOffset, const QString &lastFilename, Log::Base &log) +Coff::Symbol::Symbol(const Object &object, const TQByteArray &data, uint start, + uint stringTableOffset, const TQString &lastFilename, Log::Base &log) : BaseSymbol(object) { uint offset = start; - Q_UINT32 v; + TQ_UINT32 v; if ( !getName(data, offset, 8, stringTableOffset, log, _name) ) return; if ( !getULong(data, offset, 4, log, v) ) return; _value = v; @@ -212,7 +212,7 @@ Coff::Symbol::Symbol(const Object &object, const QByteArray &data, uint start, else if ( _name==".ident" ) auxType = AuxSymbolType::Identifier; else if ( _sclass==SymbolClass::Filename ) auxType = AuxSymbolType::File; else if ( _sclass==SymbolClass::Section ) auxType = AuxSymbolType::Section; - if ( auxType!=AuxSymbolType::Nb_Types && nbAux==0 ) log.log(Log::LineType::Warning, i18n("Symbol without needed auxilliary symbol (type=%1)").arg(auxType.type())); + if ( auxType!=AuxSymbolType::Nb_Types && nbAux==0 ) log.log(Log::LineType::Warning, i18n("Symbol without needed auxilliary symbol (type=%1)").tqarg(auxType.type())); Q_ASSERT( (offset-start)==object.size(SymbolSize) ); _aux.resize(nbAux); for (uint i=0; isection.size() ) log.log(Log::LineType::Warning, i18n("Relocation address beyong section size: %1/%2").arg(v).arg(section.size())); + if ( _address>section.size() ) log.log(Log::LineType::Warning, i18n("Relocation address beyong section size: %1/%2").tqarg(v).tqarg(section.size())); if ( !getULong(data, offset, 4, log, v) ) return; if ( v>=object.nbSymbols() ) { - log.log(Log::LineType::Error, i18n("Relocation has unknown symbol: %1").arg(v)); + log.log(Log::LineType::Error, i18n("Relocation has unknown symbol: %1").tqarg(v)); return; } if ( object.symbol(v)->isAuxSymbol() ) { - log.log(Log::LineType::Error, i18n("Relocation is an auxiliary symbol: %1").arg(v)); + log.log(Log::LineType::Error, i18n("Relocation is an auxiliary symbol: %1").tqarg(v)); return; } _symbol = static_cast(object.symbol(v)); @@ -267,11 +267,11 @@ Coff::Relocation::Relocation(const Object &object, const Section §ion, //---------------------------------------------------------------------------- Coff::CodeLine::CodeLine(const Object &object, const Section §ion, - const QByteArray &data, uint start, const QString &lastFilename, Log::Base &log) + const TQByteArray &data, uint start, const TQString &lastFilename, Log::Base &log) : Element(object), _section(section), _symbol(0) { uint offset = start; - Q_UINT32 v; + TQ_UINT32 v; if ( !getULong(data, offset, 4, log, v) ) return; uint tmp = v; if ( object.format()==Format::PIC30 ) { @@ -283,11 +283,11 @@ Coff::CodeLine::CodeLine(const Object &object, const Section §ion, //qDebug("code line %i: %s", _line, toHexLabel(_address, nbChars(_address)).latin1()); } else { if ( tmp>=object.nbSymbols() ) { - log.log(Log::LineType::Error, i18n("Codeline has unknown symbol: %1").arg(tmp)); + log.log(Log::LineType::Error, i18n("Codeline has unknown symbol: %1").tqarg(tmp)); return; } if ( object.symbol(tmp)->isAuxSymbol() ) { - log.log(Log::LineType::Error, i18n("Codeline is an auxiliary symbol: %1").arg(tmp)); + log.log(Log::LineType::Error, i18n("Codeline is an auxiliary symbol: %1").tqarg(tmp)); return; } _symbol = static_cast(object.symbol(tmp)); @@ -296,11 +296,11 @@ Coff::CodeLine::CodeLine(const Object &object, const Section §ion, } } else { if ( tmp>=object.nbSymbols() ) { - log.log(Log::LineType::Error, i18n("Codeline has unknown symbol: %1").arg(tmp)); + log.log(Log::LineType::Error, i18n("Codeline has unknown symbol: %1").tqarg(tmp)); return; } if ( object.symbol(tmp)->isAuxSymbol() ) { - log.log(Log::LineType::Error, i18n("Codeline is an auxiliary symbol: %1").arg(tmp)); + log.log(Log::LineType::Error, i18n("Codeline is an auxiliary symbol: %1").tqarg(tmp)); return; } _symbol = static_cast(object.symbol(tmp)); @@ -318,7 +318,7 @@ Coff::CodeLine::CodeLine(const Object &object, const Section §ion, } // if ( _symbol && _symbol->_class!=Symbol::CFile ) // log.log(Log::LineType::Warning, i18n("Line without file symbol associated (%1:%2 %3).") -// .arg(_section._name).arg(toHexLabel(_address, nbChars(_address))).arg(_symbol->_class)); +// .tqarg(_section._name).tqarg(toHexLabel(_address, nbChars(_address))).tqarg(_symbol->_class)); } //---------------------------------------------------------------------------- @@ -333,17 +333,17 @@ const Coff::SectionType::Data Coff::SectionType::DATA[Nb_Types] = { }; Coff::Section::Section(const Device::Data &device, const Object &object, - const QByteArray &data, uint start, uint stringTableOffset, Log::Base &log) + const TQByteArray &data, uint start, uint stringTableOffset, Log::Base &log) : Element(object) { uint offset = start; - Q_UINT32 v; + TQ_UINT32 v; if ( !getName(data, offset, 8, stringTableOffset, log, _name) ) return; if ( !getULong(data, offset, 4, log, v) ) return; _address = v; if ( !getULong(data, offset, 4, log, v) ) return; //if ( _address!=v ) log.log(Log::LineType::Warning, i18n("Virtual address (%1) does not match physical address (%2) in %3.") - // .arg(toHexLabel(v, 4)).arg(toHexLabel(_address, 4)).arg(_name)); + // .tqarg(toHexLabel(v, 4)).tqarg(toHexLabel(_address, 4)).tqarg(_name)); if ( !getULong(data, offset, 4, log, v) ) return; _size = v; if ( !getULong(data, offset, 4, log, v) ) return; @@ -386,7 +386,7 @@ Coff::Section::Section(const Device::Data &device, const Object &object, buffer[0] = 0; BitValue op2 = ((i+1)isAuxSymbol() ) continue; - QString s = static_cast(_symbols[i])->filename(); - if ( s.isEmpty() || s=="fake" || _filenames.contains(s) ) continue; + TQString s = static_cast(_symbols[i])->filename(); + if ( s.isEmpty() || s=="fake" || _filenames.tqcontains(s) ) continue; _filenames.append(s); } @@ -514,7 +514,7 @@ bool Coff::Object::parse(Log::Base &log) const Symbol *sym = static_cast(_symbols[i]); if ( sym->symbolClass()!=SymbolClass::Static ) continue; if ( sym->sectionType()!=SymbolSectionType::InsideSection ) continue; - QString name = sym->name(); + TQString name = sym->name(); if ( name.startsWith("_$_") || name.startsWith("__") || name.startsWith(".") ) continue; // special variables (?) _variables[name] = sym->value() & 0xFFF; // #### ?? } @@ -522,9 +522,9 @@ bool Coff::Object::parse(Log::Base &log) return true; } -bool Coff::Object::parseHeader(const QByteArray &data, uint &offset, Log::Base &log) +bool Coff::Object::parseHeader(const TQByteArray &data, uint &offset, Log::Base &log) { - Q_UINT32 v; + TQ_UINT32 v; if ( !getULong(data, offset, 2, log, v) ) return false; _nbSections = v; if ( !getULong(data, offset, 4, log, v) ) return false; @@ -535,7 +535,7 @@ bool Coff::Object::parseHeader(const QByteArray &data, uint &offset, Log::Base & _nbSymbols = v; if ( !getULong(data, offset, 2, log, v) ) return false; if ( v!=size(OptHeaderSize) ) { - log.log(Log::LineType::Error, i18n("Optionnal header size is not %1: %2").arg(size(OptHeaderSize)).arg(v)); + log.log(Log::LineType::Error, i18n("Optionnal header size is not %1: %2").tqarg(size(OptHeaderSize)).tqarg(v)); return false; } if ( !getULong(data, offset, 2, log, v) ) return false; @@ -543,9 +543,9 @@ bool Coff::Object::parseHeader(const QByteArray &data, uint &offset, Log::Base & return true; } -bool Coff::Object::parseOptionnalHeader(const QByteArray &data, uint &offset, Log::Base &log) +bool Coff::Object::parseOptionnalHeader(const TQByteArray &data, uint &offset, Log::Base &log) { - Q_UINT32 v; + TQ_UINT32 v; int nb = (_format==Format::NewMicrochip ? 4 : 2); if ( !getULong(data, offset, nb, log, v) ) return false; // version stamp if ( _format==Format::PIC30 ) { @@ -560,24 +560,24 @@ bool Coff::Object::parseOptionnalHeader(const QByteArray &data, uint &offset, Lo if ( !getULong(data, offset, 4, log, v) ) return false; // #### at least for C18 compiler, it can be compiled for generic processor: in such case // the pic type will be 18C452 in non-extended mode and 18F4620 for extended mode... - QString name = Coff::findId(v); - log.log(Log::DebugLevel::Normal, QString("Device name: \"%1\"").arg(name)); + TQString name = Coff::findId(v); + log.log(Log::DebugLevel::Normal, TQString("Device name: \"%1\"").tqarg(name)); if ( name.isEmpty() ) { - log.log(Log::DebugLevel::Normal, QString("Unknown processor type: %1").arg(toHexLabel(v, 4))); - log.log(Log::LineType::Error, i18n("Could not determine processor (%1).").arg(toHexLabel(v, 4))); + log.log(Log::DebugLevel::Normal, TQString("Unknown processor type: %1").tqarg(toHexLabel(v, 4))); + log.log(Log::LineType::Error, i18n("Could not determine processor (%1).").tqarg(toHexLabel(v, 4))); return false; } else if ( _device==0 ) _device = Device::lister().data(name); - else if ( name!=_device->name() ) log.log(Log::DebugLevel::Normal, QString("Different processor name: %1").arg(name)); + else if ( name!=_device->name() ) log.log(Log::DebugLevel::Normal, TQString("Different processor name: %1").tqarg(name)); if ( !getULong(data, offset, 4, log, v) ) return false; const Pic::Data *pdata = static_cast(_device); if (pdata) { uint nbBits = pdata->nbBitsWord(Pic::MemoryRangeType::Code) / pdata->addressIncrement(Pic::MemoryRangeType::Code); - if ( v!=nbBits ) log.log(Log::DebugLevel::Normal, QString("Rom width is not %1: %2").arg(nbBits).arg(v)); + if ( v!=nbBits ) log.log(Log::DebugLevel::Normal, TQString("Rom width is not %1: %2").tqarg(nbBits).tqarg(v)); } if ( !getULong(data, offset, 4, log, v) ) return false; if (pdata) { uint nbBits = pdata->registersData().nbBits(); - if ( v!=nbBits ) log.log(Log::DebugLevel::Normal, QString("Ram width is not %1: %2").arg(nbBits).arg(v)); + if ( v!=nbBits ) log.log(Log::DebugLevel::Normal, TQString("Ram width is not %1: %2").tqarg(nbBits).tqarg(v)); } } return true; @@ -589,18 +589,18 @@ Coff::Object::~Object() for (uint i=0; i::const_iterator it; + TQMap::const_iterator it; for (it=_variables.begin(); it!=_variables.end(); ++it) if ( it.data()==address ) return it.key(); - return QString::null; + return TQString(); } //---------------------------------------------------------------------------- -QValueVector Pic::sfrList(const Pic::Data &data) +TQValueVector Pic::sfrList(const Pic::Data &data) { - QValueVector list; + TQValueVector list; const Pic::RegistersData &rdata = data.registersData(); for (uint i=0; i Pic::sfrList(const Pic::Data &data) Register::TypeData rtd(address, rdata.nbChars()); if ( type==Pic::Sfr ) list.append(Pic::RegisterNameData(rdata.label(address), rtd)); } - QMap::const_iterator it; + TQMap::const_iterator it; for (it=rdata.combined.begin(); it!=rdata.combined.end(); ++it) { Register::TypeData td(it.key(), it.data().address, it.data().nbChars); list.append(Pic::RegisterNameData(it.key(), td)); @@ -621,9 +621,9 @@ QValueVector Pic::sfrList(const Pic::Data &data) return list; } -QValueVector Pic::gprList(const Pic::Data &data, const Coff::Object *coff) +TQValueVector Pic::gprList(const Pic::Data &data, const Coff::Object *coff) { - QValueVector list; + TQValueVector list; const Pic::RegistersData &rdata = data.registersData(); for (uint i=0; i Pic::gprList(const Pic::Data &data, const Co Device::RegisterProperties rp = rdata.properties(address); if ( !(rp & Device::Readable) ) continue; if (type==Pic::Gpr ) { - QString s = toHexLabel(address, rdata.nbCharsAddress()); + TQString s = toHexLabel(address, rdata.nbCharsAddress()); if (coff) { - QString name = coff->variableName(address); + TQString name = coff->variableName(address); if ( !name.isEmpty() ) s += " (" + name + ")"; } Register::TypeData rtd(address, rdata.nbChars()); @@ -643,12 +643,12 @@ QValueVector Pic::gprList(const Pic::Data &data, const Co return list; } -QValueVector Pic::variableList(const Pic::Data &data, const Coff::Object &coff) +TQValueVector Pic::variableList(const Pic::Data &data, const Coff::Object &coff) { - QValueVector list; + TQValueVector list; const Pic::RegistersData &rdata = data.registersData(); - QMap variables = coff.variables(); - QMap::const_iterator vit; + TQMap variables = coff.variables(); + TQMap::const_iterator vit; for (vit=variables.begin(); vit!=variables.end(); ++vit) { Register::TypeData rtd(vit.data(), rdata.nbChars()); list.append(Pic::RegisterNameData(vit.key() + " (" + toHexLabel(vit.data(), rdata.nbCharsAddress()) + ")", rtd)); diff --git a/src/coff/base/coff_object.h b/src/coff/base/coff_object.h index 8b98129..fccb744 100644 --- a/src/coff/base/coff_object.h +++ b/src/coff/base/coff_object.h @@ -15,7 +15,7 @@ namespace Coff { //---------------------------------------------------------------------------- -extern bool getName(const QByteArray &data, uint &offset, uint nbChars, uint stringTableOffset, Log::Base &log, QString &name); +extern bool getName(const TQByteArray &data, uint &offset, uint nbChars, uint stringTableOffset, Log::Base &log, TQString &name); extern int disassemble(long int opcode, long int opcode2, int org, Pic::Architecture architecture, char *buffer, size_t sizeof_buffer); BEGIN_DECLARE_ENUM(OptHeaderFormat) @@ -59,7 +59,7 @@ class AuxSymbol : public BaseSymbol { public: virtual bool isAuxSymbol() const { return true; } - static AuxSymbol *factory(const Object &object, AuxSymbolType type, const QByteArray &data, + static AuxSymbol *factory(const Object &object, AuxSymbolType type, const TQByteArray &data, uint offset, uint stringTableOffset, Log::Base &log); public: @@ -70,42 +70,42 @@ public: class AuxSymbolDirect : public AuxSymbol { public: - AuxSymbolDirect(const Object &object, const QByteArray &data, uint offset, uint stringTableOffset, Log::Base &log); + AuxSymbolDirect(const Object &object, const TQByteArray &data, uint offset, uint stringTableOffset, Log::Base &log); virtual AuxSymbolType type() const { return AuxSymbolType::Direct; } private: uchar _command; - QString _string; + TQString _string; }; class AuxSymbolFile : public AuxSymbol { public: - AuxSymbolFile(const Object &object, const QByteArray &data, uint offset, uint stringTableOffset, Log::Base &log); + AuxSymbolFile(const Object &object, const TQByteArray &data, uint offset, uint stringTableOffset, Log::Base &log); virtual AuxSymbolType type() const { return AuxSymbolType::File; } - QString filename() const { return _filename; } + TQString filename() const { return _filename; } uint line() const { return _line; } private: uint _line; - QString _filename; + TQString _filename; }; class AuxSymbolIdentifier : public AuxSymbol { public: - AuxSymbolIdentifier(const Object &object, const QByteArray &data, uint offset, uint stringTableOffset, Log::Base &log); + AuxSymbolIdentifier(const Object &object, const TQByteArray &data, uint offset, uint stringTableOffset, Log::Base &log); virtual AuxSymbolType type() const { return AuxSymbolType::Identifier; } - QString string() const { return _string; } + TQString string() const { return _string; } private: - QString _string; + TQString _string; }; class AuxSymbolSection : public AuxSymbol { public: - AuxSymbolSection(const Object &object, const QByteArray &data, uint offset, uint stringTableOffset, Log::Base &log); + AuxSymbolSection(const Object &object, const TQByteArray &data, uint offset, uint stringTableOffset, Log::Base &log); virtual AuxSymbolType type() const { return AuxSymbolType::Section; } private: @@ -157,12 +157,12 @@ END_DECLARE_ENUM(SymbolDerivedType, SymbolDerivedTypeData) class Symbol : public BaseSymbol { public: - Symbol(const Object &object, const QByteArray &data, uint offset, uint stringTableOffset, - const QString &lastFilename, Log::Base &log); + Symbol(const Object &object, const TQByteArray &data, uint offset, uint stringTableOffset, + const TQString &lastFilename, Log::Base &log); virtual bool isAuxSymbol() const { return false; } - QString name() const { return _name; } - QString filename() const { return _filename; } - const QValueVector &auxSymbols() const { return _aux; } + TQString name() const { return _name; } + TQString filename() const { return _filename; } + const TQValueVector &auxSymbols() const { return _aux; } SymbolClass symbolClass() const { return _sclass; } SymbolSectionType sectionType() const; SymbolType type() const { return _type; } @@ -171,19 +171,19 @@ public: uint section() const { Q_ASSERT( sectionType()==SymbolSectionType::InsideSection ); return _section; } private: - QString _name, _filename; + TQString _name, _filename; uint _value, _section; SymbolClass _sclass; SymbolType _type; SymbolDerivedType _dtype; - QValueVector _aux; + TQValueVector _aux; }; //---------------------------------------------------------------------------- class Relocation : public Element { public: - Relocation(const Object &object, const Section §ion, const QByteArray &data, + Relocation(const Object &object, const Section §ion, const TQByteArray &data, uint offset, Log::Base &log); private: @@ -196,10 +196,10 @@ private: class CodeLine : public Element { public: - CodeLine(const Object &object, const Section §ion, const QByteArray &data, - uint offset, const QString &lastFilename, Log::Base &log); + CodeLine(const Object &object, const Section §ion, const TQByteArray &data, + uint offset, const TQString &lastFilename, Log::Base &log); const Section §ion() const { return _section; } - QString filename() const { return _filename; } + TQString filename() const { return _filename; } uint line() const { return _line; } Address address() const { return _address; } const Symbol *symbol() const { return _symbol; } @@ -208,7 +208,7 @@ private: const Section &_section; uint _line; Address _address; - QString _filename; + TQString _filename; const Symbol *_symbol; }; @@ -223,29 +223,29 @@ public: class InstructionData { public: BitValue value; - QString opcode, disasm; + TQString opcode, disasm; }; public: - Section(const Device::Data &device, const Object &object, const QByteArray &data, uint offset, + Section(const Device::Data &device, const Object &object, const TQByteArray &data, uint offset, uint stringTableOffset, Log::Base &log); ~Section(); SectionType type() const; - QString name() const { return _name; } + TQString name() const { return _name; } Address address() const { return _address; } uint size() const { return _size; } uint flags() const { return _flags; } - const QMap &instructions() const { return _instructions; } - const QValueVector &relocations() const { return _relocations; } - const QValueVector &lines() const { return _lines; } + const TQMap &instructions() const { return _instructions; } + const TQValueVector &relocations() const { return _relocations; } + const TQValueVector &lines() const { return _lines; } private: - QString _name; + TQString _name; Address _address; uint _size, _flags; - QMap _instructions; - QValueVector _relocations; - QValueVector _lines; + TQMap _instructions; + TQValueVector _relocations; + TQValueVector _lines; enum Flag { FText = 0x00020, FData = 0x00040, FBSS = 0x00080, FDataRom = 0x00100, FAbs = 0x01000, FShared = 0x02000, FOverlay = 0x04000, FAccess = 0x08000, @@ -266,33 +266,33 @@ public: uint optHeaderMagic() const { return _optHeaderMagic; } uint nbSymbols() const { return _symbols.count(); } const BaseSymbol *symbol(uint i) const { return _symbols[i]; } - const Symbol *symbol(const QString &name) const { return (_msymbols.contains(name) ? _msymbols[name] : 0); } + const Symbol *symbol(const TQString &name) const { return (_msymbols.tqcontains(name) ? _msymbols[name] : 0); } uint nbSections() const { return _sections.count(); } const Section *section(uint i) const { return _sections[i]; } - const QStringList &filenames() const { return _filenames; } - const QMap &variables() const { return _variables; } - QString variableName(Address address) const; + const TQStringList &filenames() const { return _filenames; } + const TQMap &variables() const { return _variables; } + TQString variableName(Address address) const; enum Flag { RelocationStripped = 0x0001, Executable = 0x0002, LineNumberStripped = 0x0004, SymbolStripped = 0x0080, Extended18 = 0x4000, Generic = 0x8000 }; - Q_DECLARE_FLAGS(Flags, Flag) + TQ_DECLARE_FLAGS(Flags, Flag) protected: - Q_UINT32 _optHeaderMagic; + TQ_UINT32 _optHeaderMagic; OptHeaderFormat _optHeaderFormat; const Device::Data *_device; uint _nbSections, _nbSymbols, _symbolOffset; Flags _flags; - QValueVector _symbols; - QMap _msymbols; // name -> Symbol * - QValueVector
_sections; - QStringList _filenames; - QMap _variables; // name -> address - - virtual bool parseHeader(const QByteArray &data, uint &offset, Log::Base &log); - virtual bool parseOptionnalHeader(const QByteArray &data, uint &offset, Log::Base &log); + TQValueVector _symbols; + TQMap _msymbols; // name -> Symbol * + TQValueVector
_sections; + TQStringList _filenames; + TQMap _variables; // name -> address + + virtual bool parseHeader(const TQByteArray &data, uint &offset, Log::Base &log); + virtual bool parseOptionnalHeader(const TQByteArray &data, uint &offset, Log::Base &log); }; -Q_DECLARE_OPERATORS_FOR_FLAGS(Object::Flags) +TQ_DECLARE_OPERATORS_FOR_FLAGS(Object::Flags) } // namespace @@ -304,18 +304,18 @@ class RegisterNameData { public: RegisterNameData() {} - RegisterNameData(const QString &label, const Register::TypeData &data) : _label(label), _data(data) {} - QString label() const { return _label; } + RegisterNameData(const TQString &label, const Register::TypeData &data) : _label(label), _data(data) {} + TQString label() const { return _label; } const Register::TypeData &data() const { return _data; } bool operator <(const RegisterNameData &rnd) const { return _label sfrList(const Pic::Data &data); -extern QValueVector gprList(const Pic::Data &data, const Coff::Object *coff); -extern QValueVector variableList(const Pic::Data &data, const Coff::Object &coff); +extern TQValueVector sfrList(const Pic::Data &data); +extern TQValueVector gprList(const Pic::Data &data, const Coff::Object *coff); +extern TQValueVector variableList(const Pic::Data &data, const Coff::Object &coff); } // namespace diff --git a/src/coff/base/disassembler.cpp b/src/coff/base/disassembler.cpp index 663c163..c818beb 100644 --- a/src/coff/base/disassembler.cpp +++ b/src/coff/base/disassembler.cpp @@ -8,14 +8,14 @@ ***************************************************************************/ #include "disassembler.h" -#include +#include #include "devices/base/device_group.h" #include "devices/pic/pic/pic_memory.h" #include "coff_object.h" //----------------------------------------------------------------------------- -QString SourceLine::comment(PURL::SourceFamily family, const QString &text) +TQString SourceLine::comment(PURL::SourceFamily family, const TQString &text) { switch (family.type()) { case PURL::SourceFamily::Asm: return "; " + text; @@ -26,7 +26,7 @@ QString SourceLine::comment(PURL::SourceFamily family, const QString &text) case PURL::SourceFamily::Nb_Types: break; } Q_ASSERT(false); - return QString::null; + return TQString(); } namespace SourceLine @@ -34,15 +34,15 @@ namespace SourceLine class LineData { public: LineData() : group(-1) {} - QString text, comment; + TQString text, comment; int group; }; } // namespace -QStringList SourceLine::lines(PURL::SourceFamily family, const List &list, uint nbSpaces) +TQStringList SourceLine::lines(PURL::SourceFamily family, const List &list, uint nbSpaces) { - QValueList lines; - QValueList groupCommentColumn; + TQValueList lines; + TQValueList groupCommentColumn; groupCommentColumn.append(0); List::const_iterator it; for (it=list.begin(); it!=list.end(); ++it) { @@ -71,8 +71,8 @@ QStringList SourceLine::lines(PURL::SourceFamily family, const List &list, uint } lines += data; } - QStringList slines; - QValueList::const_iterator lit; + TQStringList slines; + TQValueList::const_iterator lit; for (lit=lines.begin(); lit!=lines.end(); ++lit) { if ( (*lit).group==-1 || (*lit).comment.isEmpty() ) slines += (*lit).text; else { @@ -83,55 +83,55 @@ QStringList SourceLine::lines(PURL::SourceFamily family, const List &list, uint return slines; } -QString SourceLine::text(PURL::SourceFamily family, const List &list, uint nbSpaces) +TQString SourceLine::text(PURL::SourceFamily family, const List &list, uint nbSpaces) { return lines(family, list, nbSpaces).join("\n") + "\n"; } -QString SourceLine::transformConfigName(const Pic::Data &data, uint wordIndex, const QString &name) +TQString SourceLine::transformConfigName(const Pic::Data &data, uint wordIndex, const TQString &name) { if ( !data.is18Family() ) return name; bool ok; (void)fromHexLabel(name, &ok); if (ok) return name; - QString s = name + '_'; + TQString s = name + '_'; if ( data.name()=="18C601" || data.name()=="18C801" || data.name().startsWith("18F" ) ) - s += QString::number(wordIndex/2+1) + (wordIndex%2==0 ? 'L' : 'H'); - else s += QString::number(wordIndex); + s += TQString::number(wordIndex/2+1) + (wordIndex%2==0 ? 'L' : 'H'); + else s += TQString::number(wordIndex); return s; } -QStringList SourceLine::ignoredConfigNames(const Pic::Data &data, uint wordIndex) +TQStringList SourceLine::ignoredConfigNames(const Pic::Data &data, uint wordIndex) { - QStringList cnames; - const QStringList &names = data.config()._words[wordIndex].ignoredCNames; + TQStringList cnames; + const TQStringList &names = data.config()._words[wordIndex].ignoredCNames; for (uint i=0; i=0; l--) { - const Pic::Config::Value &cvalue = cmask.values[l]; + TQStringList cnames; + for (uint k=0; k=0; l--) { + const Pic::Config::Value &cvalue = ctqmask.values[l]; if ( !cvalue.value.isInside(v) ) continue; - QStringList vcnames = cvalue.configNames[type]; + TQStringList vcnames = cvalue.configNames[type]; if ( vcnames.isEmpty() && type!=Pic::ConfigNameType::Default ) vcnames = cvalue.configNames[Pic::ConfigNameType::Default]; for (uint i=0; i"); return lines; @@ -169,9 +169,9 @@ SourceLine::List GPUtils::generateConfigLines(const Pic::Memory &memory, bool &o const Pic::Config &config = data.config(); for (uint i=0; i +class List : public TQValueList { public: List() {} void appendSeparator() { append(Separator); } void appendEmpty() { append(Empty); } - void appendTitle(const QString &text) { append(Data(Title, QString::null, text)); } - void appendIndentedCode(const QString &code, const QString &comment = QString::null) { append(Data(Indented, code, comment)); } - void appendNotIndentedCode(const QString &code, const QString &comment = QString::null) { append(Data(NotIndented, code, comment)); } + void appendTitle(const TQString &text) { append(Data(Title, TQString(), text)); } + void appendIndentedCode(const TQString &code, const TQString &comment = TQString()) { append(Data(Indented, code, comment)); } + void appendNotIndentedCode(const TQString &code, const TQString &comment = TQString()) { append(Data(NotIndented, code, comment)); } }; -extern QString comment(PURL::SourceFamily family, const QString &text); -extern QStringList lines(PURL::SourceFamily family, const List &list, uint nbSpaces); -extern QString text(PURL::SourceFamily family, const List &list, uint nbSpaces); -extern QString transformConfigName(const Pic::Data &data, uint wordIndex, const QString &name); -extern QStringList ignoredConfigNames(const Pic::Data &data, uint wordIndex); -extern QStringList extraConfigNames(const Pic::Data &data, uint wordIndex, const Pic::Config::Value &value); -extern QStringList configNames(Pic::ConfigNameType type, const Pic::Memory &memory, uint word, bool &ok); +extern TQString comment(PURL::SourceFamily family, const TQString &text); +extern TQStringList lines(PURL::SourceFamily family, const List &list, uint nbSpaces); +extern TQString text(PURL::SourceFamily family, const List &list, uint nbSpaces); +extern TQString transformConfigName(const Pic::Data &data, uint wordIndex, const TQString &name); +extern TQStringList ignoredConfigNames(const Pic::Data &data, uint wordIndex); +extern TQStringList extraConfigNames(const Pic::Data &data, uint wordIndex, const Pic::Config::Value &value); +extern TQStringList configNames(Pic::ConfigNameType type, const Pic::Memory &memory, uint word, bool &ok); } // namespace @@ -53,7 +53,7 @@ extern QStringList configNames(Pic::ConfigNameType type, const Pic::Memory &memo namespace GPUtils { -extern QString toDeviceName(const QString &device); +extern TQString toDeviceName(const TQString &device); extern SourceLine::List includeLines(const Device::Data &data); extern SourceLine::List generateConfigLines(const Pic::Memory &memory, bool &ok); extern SourceLine::List disassemble(const Pic::Memory &memory); diff --git a/src/coff/base/gpdis.cpp b/src/coff/base/gpdis.cpp index 2df4f24..abec54f 100644 --- a/src/coff/base/gpdis.cpp +++ b/src/coff/base/gpdis.cpp @@ -69,7 +69,7 @@ int Coff::disassemble(long int opcode, long int opcode2, return 0; case Pic::Architecture::P10X: for(i = 0; i < num_op_12c5xx; i++) { - if((op_12c5xx[i].mask & opcode) == op_12c5xx[i].opcode) { + if((op_12c5xx[i].tqmask & opcode) == op_12c5xx[i].opcode) { instruction = &op_12c5xx[i]; break; } @@ -77,7 +77,7 @@ int Coff::disassemble(long int opcode, long int opcode2, break; /* case PROC_CLASS_SX: for(i = 0; i < num_op_sx; i++) { - if((op_sx[i].mask & opcode) == op_sx[i].opcode) { + if((op_sx[i].tqmask & opcode) == op_sx[i].opcode) { instruction = &op_sx[i]; break; } @@ -86,7 +86,7 @@ int Coff::disassemble(long int opcode, long int opcode2, */ case Pic::Architecture::P16X: for(i = 0; i < num_op_16cxx; i++) { - if((op_16cxx[i].mask & opcode) == op_16cxx[i].opcode) { + if((op_16cxx[i].tqmask & opcode) == op_16cxx[i].opcode) { instruction = &op_16cxx[i]; break; } @@ -94,7 +94,7 @@ int Coff::disassemble(long int opcode, long int opcode2, break; case Pic::Architecture::P17C: for(i = 0; i < num_op_17cxx; i++) { - if((op_17cxx[i].mask & opcode) == op_17cxx[i].opcode) { + if((op_17cxx[i].tqmask & opcode) == op_17cxx[i].opcode) { instruction = &op_17cxx[i]; break; } @@ -105,7 +105,7 @@ int Coff::disassemble(long int opcode, long int opcode2, case Pic::Architecture::P18J: if (gp_decode_mnemonics) { for(i = 0; i < num_op_18cxx_sp; i++) { - if((op_18cxx_sp[i].mask & opcode) == op_18cxx_sp[i].opcode) { + if((op_18cxx_sp[i].tqmask & opcode) == op_18cxx_sp[i].opcode) { instruction = &op_18cxx_sp[i]; break; } @@ -113,7 +113,7 @@ int Coff::disassemble(long int opcode, long int opcode2, } if (instruction == NULL) { for(i = 0; i < num_op_18cxx; i++) { - if((op_18cxx[i].mask & opcode) == op_18cxx[i].opcode) { + if((op_18cxx[i].tqmask & opcode) == op_18cxx[i].opcode) { instruction = &op_18cxx[i]; break; } @@ -122,7 +122,7 @@ int Coff::disassemble(long int opcode, long int opcode2, if ((instruction == NULL) && (gp_decode_extended)) { /* might be from the extended instruction set */ for(i = 0; i < num_op_18cxx_ext; i++) { - if((op_18cxx_ext[i].mask & opcode) == op_18cxx_ext[i].opcode) { + if((op_18cxx_ext[i].tqmask & opcode) == op_18cxx_ext[i].opcode) { instruction = &op_18cxx_ext[i]; break; } diff --git a/src/coff/base/gpopcode.h b/src/coff/base/gpopcode.h index aed25f9..91a4dea 100644 --- a/src/coff/base/gpopcode.h +++ b/src/coff/base/gpopcode.h @@ -75,7 +75,7 @@ enum insn_class { struct insn { const char *name; - long int mask; + long int tqmask; long int opcode; enum insn_class classType; //int attribs; diff --git a/src/coff/base/text_coff.cpp b/src/coff/base/text_coff.cpp index 0d0862e..1a749fe 100644 --- a/src/coff/base/text_coff.cpp +++ b/src/coff/base/text_coff.cpp @@ -14,18 +14,18 @@ namespace Coff { class CodeData { public: - QString address, opcode, disasm1, disasm2; + TQString address, opcode, disasm1, disasm2; }; class LineData { public: - QValueVector codes; - QString lineNumber, lineText; + TQValueVector codes; + TQString lineNumber, lineText; }; class FileData { public: PURL::Url url; bool read; - QValueVector lines; + TQValueVector lines; }; } @@ -40,7 +40,7 @@ bool Coff::TextObject::parse(Log::Base &log) return ok; } -PURL::Url Coff::TextObject::urlForFilename(const QString &filename) const +PURL::Url Coff::TextObject::urlForFilename(const TQString &filename) const { PURL::Url rurl = PURL::Url::fromPathOrUrl(filename); return rurl.toAbsolute(url().directory()); @@ -48,11 +48,11 @@ PURL::Url Coff::TextObject::urlForFilename(const QString &filename) const const Coff::Section *Coff::TextObject::section(const CodeLine &cline) const { - if ( cline.section().instructions().contains(cline.address()) ) return &cline.section(); + if ( cline.section().instructions().tqcontains(cline.address()) ) return &cline.section(); // possible for coff generated by picc... for (uint i=0; itype()!=SectionType::Code ) continue; - if ( _sections[i]->instructions().contains(cline.address()) ) return _sections[i]; + if ( _sections[i]->instructions().tqcontains(cline.address()) ) return _sections[i]; } return 0; } @@ -63,12 +63,12 @@ void Coff::TextObject::init() const _initialized = true; // open and read files - QMap fd; + TQMap fd; for (uint i=0; itype()!=SectionType::Code ) continue; for (uint k=0; klines().count()); k++) { - QString filename = _sections[i]->lines()[k]->filename(); - if ( filename.isEmpty() || fd.contains(filename) ) continue; + TQString filename = _sections[i]->lines()[k]->filename(); + if ( filename.isEmpty() || fd.tqcontains(filename) ) continue; _filenames.append(filename); FileData fdata; fdata.url = urlForFilename(filename); @@ -76,7 +76,7 @@ void Coff::TextObject::init() const PURL::File file(fdata.url, sview); fdata.read = file.openForRead(); if (fdata.read) { - QStringList lines = file.readLines(); + TQStringList lines = file.readLines(); fdata.lines.resize(lines.count()); for (uint i=0; inbCharsAddress(); uint opcodeWidth = 0, disasm1Width = 0, disasm2Width = 0, lineNumberWidth = 0, lineTextWidth = 0; - QMap::iterator it; + TQMap::iterator it; for (it=fd.begin(); it!=fd.end(); ++it) { for (uint i=0; i lines = findCodeLines(it.key(), i); + TQValueVector lines = findCodeLines(it.key(), i); ldata.codes.resize(lines.count()); for (uint k=0; kaddress(); @@ -102,8 +102,8 @@ void Coff::TextObject::init() const ldata.codes[k].opcode = "0x" + sec->instructions()[address].opcode.upper(); //qDebug("%s: %s", ldata.codes[k].address.latin1(), ldata.codes[k].opcode.latin1()); opcodeWidth = qMax(opcodeWidth, uint(ldata.codes[k].opcode.length())); - QString s = sec->instructions()[address].disasm; - int j = s.find('\t'); + TQString s = sec->instructions()[address].disasm; + int j = s.tqfind('\t'); if ( j!=-1 ) { ldata.codes[k].disasm2 = s.mid(j+1); disasm2Width = qMax(disasm2Width, uint(ldata.codes[k].disasm2.length())); @@ -112,7 +112,7 @@ void Coff::TextObject::init() const disasm1Width = qMax(disasm1Width, uint(ldata.codes[k].disasm1.length())); } } - ldata.lineNumber = QString::number(i+1); + ldata.lineNumber = TQString::number(i+1); lineNumberWidth = qMax(lineNumberWidth, uint(ldata.lineNumber.length())); lineTextWidth = qMax(lineTextWidth, uint(ldata.lineText.length())); } @@ -122,19 +122,19 @@ void Coff::TextObject::init() const // create text for (it = fd.begin(); it!=fd.end(); ++it) { - QString s = QString("--- ") + it.data().url.pretty() + " "; + TQString s = TQString("--- ") + it.data().url.pretty() + " "; _list += s.leftJustify(totalWidth, '-'); if ( !it.data().read ) { - s = QString("--- ") + i18n("File could not be read") + " "; + s = TQString("--- ") + i18n("File could not be read") + " "; _list += s.leftJustify(totalWidth, '-'); } for (uint i=0; i Coff::TextObject::findCodeLines(const QString &filename, uint line) const +TQValueVector Coff::TextObject::findCodeLines(const TQString &filename, uint line) const { init(); - QValueVector list; + TQValueVector list; for (uint i=0; itype()!=SectionType::Code ) continue; for (uint k=0; klines().count()); k++) { @@ -178,13 +178,13 @@ QValueVector Coff::TextObject::findCodeLines(const QStri int Coff::TextObject::lineForAddress(const PURL::Url &url, Address address) const { init(); - if ( url==_url && _lines.contains(address) ) return _lines[address]-1; + if ( url==_url && _lines.tqcontains(address) ) return _lines[address]-1; for (uint i=0; itype()!=SectionType::Code ) continue; for (uint k=0; klines().count()); k++) { const CodeLine *cl = _sections[i]->lines()[k]; if ( cl->address()!=address ) continue; - QString filename = cl->filename(); + TQString filename = cl->filename(); if ( filename.isEmpty() || urlForFilename(filename)!=url ) continue; return cl->line()-1; } @@ -192,30 +192,30 @@ int Coff::TextObject::lineForAddress(const PURL::Url &url, Address address) cons return -1; } -QMap Coff::TextObject::sourceLinesForAddress(Address address) const +TQMap Coff::TextObject::sourceLinesForAddress(Address address) const { - QMap slines; + TQMap slines; init(); for (uint i=0; itype()!=SectionType::Code ) continue; for (uint k=0; klines().count()); k++) { const CodeLine *cl = _sections[i]->lines()[k]; if ( cl->address()!=address ) continue; - QString filename = cl->filename(); + TQString filename = cl->filename(); if ( filename.isEmpty() ) continue; slines[urlForFilename(filename)] = cl->line()-1; } } - if ( _lines.contains(address) ) slines[_url] = _lines[address] - 1; + if ( _lines.tqcontains(address) ) slines[_url] = _lines[address] - 1; return slines; } -QValueVector
Coff::TextObject::addresses(const PURL::Url &url, uint line) const +TQValueVector
Coff::TextObject::addresses(const PURL::Url &url, uint line) const { init(); - QValueVector
ad; + TQValueVector
ad; if ( url==_url ) { - QMap::const_iterator it; + TQMap::const_iterator it; for (it=_lines.begin(); it!=_lines.end(); ++it) if ( line==(it.data()-1) ) ad.append(it.key()); return ad; @@ -225,7 +225,7 @@ QValueVector
Coff::TextObject::addresses(const PURL::Url &url, uint lin for (uint k=0; klines().count()); k++) { const CodeLine *cl = _sections[i]->lines()[k]; if ( line!=(cl->line()-1) ) continue; - QString filename = cl->filename(); + TQString filename = cl->filename(); if ( filename.isEmpty() || urlForFilename(filename)!=url ) continue; ad.append(cl->address()); } @@ -233,13 +233,13 @@ QValueVector
Coff::TextObject::addresses(const PURL::Url &url, uint lin return ad; } -const QStringList &Coff::TextObject::filenames() const +const TQStringList &Coff::TextObject::filenames() const { init(); return _filenames; } -QString Coff::TextObject::disassembly() const +TQString Coff::TextObject::disassembly() const { init(); if ( _list.isEmpty() ) return i18n("Parsing COFF file is not supported for this device or an error occured."); @@ -249,14 +249,14 @@ QString Coff::TextObject::disassembly() const Log::KeyList Coff::TextObject::information() const { Log::KeyList keys; - keys.append(i18n("Format:"), i18n("%1 (magic id: %2)").arg(format().label()).arg(toHexLabel(format().data().magic, 4))); - QString name = (format()==Format::PIC30 || device()==0 ? "?" : device()->name()); + keys.append(i18n("Format:"), i18n("%1 (magic id: %2)").tqarg(format().label()).tqarg(toHexLabel(format().data().magic, 4))); + TQString name = (format()==Format::PIC30 || device()==0 ? "?" : device()->name()); keys.append(i18n("Device:"), name); OptHeaderFormat ohf = optHeaderFormat(); - QString label = (ohf==OptHeaderFormat::Nb_Types ? i18n("Unknown") : ohf.label()); - keys.append(i18n("Option header:"), i18n("%1 (magic id: %2)").arg(label).arg(toHexLabel(optHeaderMagic(), 4))); - keys.append(i18n("No. of sections:"), QString::number(nbSections())); - keys.append(i18n("No. of symbols:"), QString::number(nbSymbols())); - keys.append(i18n("No. of variables:"), QString::number(variables().count())); + TQString label = (ohf==OptHeaderFormat::Nb_Types ? i18n("Unknown") : ohf.label()); + keys.append(i18n("Option header:"), i18n("%1 (magic id: %2)").tqarg(label).tqarg(toHexLabel(optHeaderMagic(), 4))); + keys.append(i18n("No. of sections:"), TQString::number(nbSections())); + keys.append(i18n("No. of symbols:"), TQString::number(nbSymbols())); + keys.append(i18n("No. of variables:"), TQString::number(variables().count())); return keys; } diff --git a/src/coff/base/text_coff.h b/src/coff/base/text_coff.h index 7b6e673..a8a2a11 100644 --- a/src/coff/base/text_coff.h +++ b/src/coff/base/text_coff.h @@ -20,22 +20,22 @@ public: TextObject(const Device::Data *device, const PURL::Url &url); virtual bool parse(Log::Base &log); int lineForAddress(const PURL::Url &url, Address address) const; - QMap sourceLinesForAddress(Address address) const; // url -> line - QValueVector
addresses(const PURL::Url &url, uint line) const; - const QStringList &filenames() const; + TQMap sourceLinesForAddress(Address address) const; // url -> line + TQValueVector
addresses(const PURL::Url &url, uint line) const; + const TQStringList &filenames() const; - QString disassembly() const; + TQString disassembly() const; virtual Log::KeyList information() const; private: mutable bool _initialized; - mutable QMap _lines; // address -> line in disassembly listing - mutable QStringList _list; - mutable QStringList _filenames; + mutable TQMap _lines; // address -> line in disassembly listing + mutable TQStringList _list; + mutable TQStringList _filenames; - uint nbLines(const QString &filename) const; - QValueVector findCodeLines(const QString &filename, uint line) const; - PURL::Url urlForFilename(const QString &filename) const; + uint nbLines(const TQString &filename) const; + TQValueVector findCodeLines(const TQString &filename, uint line) const; + PURL::Url urlForFilename(const TQString &filename) const; void init() const; const Section *section(const CodeLine &cline) const; }; diff --git a/src/coff/xml/xml_coff_parser.cpp b/src/coff/xml/xml_coff_parser.cpp index b6fa2d8..460df7d 100644 --- a/src/coff/xml/xml_coff_parser.cpp +++ b/src/coff/xml/xml_coff_parser.cpp @@ -24,17 +24,17 @@ public: XmlToData() : ExtXmlToData("coff", "Coff") {} private: - QMap _ids; + TQMap _ids; virtual bool hasFamilies() const { return false; } - virtual void parseData(QDomElement element, Data &data); - virtual void outputData(const Data &data, QTextStream &s) const; - virtual void outputFunctions(QTextStream &s) const; + virtual void parseData(TQDomElement element, Data &data); + virtual void outputData(const Data &data, TQTextStream &s) const; + virtual void outputFunctions(TQTextStream &s) const; virtual void parse(); }; -void Coff::XmlToData::parseData(QDomElement element, Data &data) +void Coff::XmlToData::parseData(TQDomElement element, Data &data) { - QStringList list = QStringList::split(' ', element.attribute("id")); + TQStringList list = TQStringList::split(' ', element.attribute("id")); if ( list.isEmpty() ) qFatal("Missing id"); if ( list.count()>MAX_NB_IDS ) qFatal("Please raise MAX_NB_IDS"); for (uint i=0; i::outputFunctions(s); - s << "QString findId(uint id)" << endl; + s << "TQString findId(uint id)" << endl; s << "{" << endl; s << " for (uint i=0; DATA_LIST[i]; i++) {" << endl; s << " for (uint k=0; kdata.ids[k]==id ) return DATA_LIST[i]->name;" << endl; s << " }" << endl; - s << " return QString::null;" << endl; + s << " return TQString();" << endl; s << "}" << endl; } @@ -98,14 +98,14 @@ void Coff::XmlToData::parse() // extract COFF id from gputils for (uint i=0; pics[i].tag!=no_processor; i++) { - _current = QString(pics[i].names[2]).upper(); + _current = TQString(pics[i].names[2]).upper(); if ( !Device::lister().isSupported(_current) ) continue; if ( !hasDevice(_current) ) qDebug(">> add new id %s: %s", _current.latin1(), toHexLabel(pics[i].coff_type, 4).latin1()); else { bool ok = false; for (uint k=0; k +#include #include "common/global/purl.h" #include "cli_log.h" @@ -18,14 +18,14 @@ bool CLI::_isInteractive = false; CLI::View *CLI::_view = 0; CLI::MainBase *CLI::_main = 0; -CLI::ExitCode CLI::errorExit(const QString &message, ExitCode code) +CLI::ExitCode CLI::errorExit(const TQString &message, ExitCode code) { Q_ASSERT( code!=OK ); _view->log(Log::LineType::SoftError, message); return code; } -CLI::ExitCode CLI::okExit(const QString &message) +CLI::ExitCode CLI::okExit(const TQString &message) { _view->log(Log::LineType::Information, message); return OK; @@ -33,5 +33,5 @@ CLI::ExitCode CLI::okExit(const QString &message) PURL::Directory CLI::runDirectory() { - return PURL::Directory(QDir::currentDirPath()); + return PURL::Directory(TQDir::currentDirPath()); } diff --git a/src/common/cli/cli_global.h b/src/common/cli/cli_global.h index b90f36e..e89c1e7 100644 --- a/src/common/cli/cli_global.h +++ b/src/common/cli/cli_global.h @@ -9,7 +9,7 @@ #ifndef CLI_GLOBAL_H #define CLI_GLOBAL_H -#include +#include namespace PURL { class Directory; } namespace CLI @@ -19,8 +19,8 @@ class View; class MainBase; enum ExitCode { EXITING = 1, OK = 0, ARG_ERROR = -1, NOT_SUPPORTED_ERROR = -2, FILE_ERROR = -3, EXEC_ERROR = -4 }; -extern ExitCode errorExit(const QString &message, ExitCode code); -extern ExitCode okExit(const QString &message); +extern ExitCode errorExit(const TQString &message, ExitCode code); +extern ExitCode okExit(const TQString &message); extern PURL::Directory runDirectory(); extern bool _force; diff --git a/src/common/cli/cli_log.cpp b/src/common/cli/cli_log.cpp index 603d5f8..948675b 100644 --- a/src/common/cli/cli_log.cpp +++ b/src/common/cli/cli_log.cpp @@ -11,53 +11,37 @@ #include "common/global/global.h" #include "cli_global.h" -void CLI::View::doLog(Log::LineType type, const QString &text, Log::Action) +void CLI::View::doLog(Log::LineType type, const TQString &text, Log::Action) { - QString s = text + "\n"; + TQString s = text + "\n"; switch (type.type()) { case Log::LineType::Error: case Log::LineType::SoftError: s = "Error: " + s; break; case Log::LineType::Warning: s = "Warning: " + s; break; default: break; } -#if QT_VERSION<0x040000 if ( type==Log::LineType::Error || type==Log::LineType::SoftError ) fprintf(stderr, "%s", s.latin1()); else fprintf(stdout, "%s", s.latin1()); -#else - QByteArray ba = s.toLatin1(); - if ( type==Log::LineType::Error || type==Log::LineType::SoftError ) fprintf(stderr, "%s", ba.constData()); - else fprintf(stdout, "%s", ba.constData()); -#endif } -void CLI::View::doLog(Log::DebugLevel, const QString &text, Log::Action) +void CLI::View::doLog(Log::DebugLevel, const TQString &text, Log::Action) { - QString s = text + "\n"; -#if QT_VERSION<0x040000 + TQString s = text + "\n"; fprintf(stdout, "%s", s.latin1()); -#else - QByteArray ba = s.toLatin1(); - fprintf(stdout, "%s", ba.constData()); -#endif } -void CLI::View::appendToLastLine(const QString &text) +void CLI::View::appendToLastLine(const TQString &text) { -#if QT_VERSION<0x040000 fprintf(stdout, "%s", text.latin1()); -#else - QByteArray ba = text.toLatin1(); - fprintf(stdout, "%s", ba.constData()); -#endif } -void CLI::View::sorry(const QString &message, const QString &details) +void CLI::View::sorry(const TQString &message, const TQString &details) { if ( details.isEmpty() ) log(Log::LineType::Error, message, Log::Immediate); else log(Log::LineType::Error, message + " (" + details + ")", Log::Immediate); } -bool CLI::View::askContinue(const QString &message) +bool CLI::View::askContinue(const TQString &message) { log(Log::LineType::Warning, message + " " + (_force ? i18n("*yes*") : i18n("*no*")), Log::Immediate); if (_force) return true; diff --git a/src/common/cli/cli_log.h b/src/common/cli/cli_log.h index 2fa83dc..7585b05 100644 --- a/src/common/cli/cli_log.h +++ b/src/common/cli/cli_log.h @@ -17,15 +17,15 @@ namespace CLI class View : public Log::View { public: - virtual void appendToLastLine(const QString &text); + virtual void appendToLastLine(const TQString &text); virtual void clear() {} - virtual void sorry(const QString &message, const QString &details); - virtual bool askContinue(const QString &message); + virtual void sorry(const TQString &message, const TQString &details); + virtual bool askContinue(const TQString &message); virtual void logUserAbort(); private: - virtual void doLog(Log::LineType type, const QString &text, Log::Action action); - virtual void doLog(Log::DebugLevel level, const QString &text, Log::Action action); + virtual void doLog(Log::LineType type, const TQString &text, Log::Action action); + virtual void doLog(Log::DebugLevel level, const TQString &text, Log::Action action); }; } // namespace diff --git a/src/common/cli/cli_main.cpp b/src/common/cli/cli_main.cpp index 7d75dbb..11537a7 100644 --- a/src/common/cli/cli_main.cpp +++ b/src/common/cli/cli_main.cpp @@ -12,7 +12,7 @@ #include "common/global/about.h" //----------------------------------------------------------------------------- -const CLI::CommandData *CLI::findCommandData(const QString &command) +const CLI::CommandData *CLI::findCommandData(const TQString &command) { for (uint i=0; NORMAL_COMMAND_DATA[i].name; i++) if ( NORMAL_COMMAND_DATA[i].name==command ) return &NORMAL_COMMAND_DATA[i]; @@ -22,23 +22,23 @@ const CLI::CommandData *CLI::findCommandData(const QString &command) return 0; } -CLI::ExitCode CLI::findCommand(const QString &s) +CLI::ExitCode CLI::findCommand(const TQString &s) { if ( s.isEmpty() ) return errorExit(i18n("No command specified"), ARG_ERROR); const CommandData *data = findCommandData(s); - if ( data==0 ) return errorExit(i18n("Unknown command: %1").arg(s), ARG_ERROR); + if ( data==0 ) return errorExit(i18n("Unknown command: %1").tqarg(s), ARG_ERROR); return OK; } //----------------------------------------------------------------------------- -bool CLI::isPropertyList(const QString &s) +bool CLI::isPropertyList(const TQString &s) { for (uint i=0; PROPERTY_DATA[i].name; i++) if ( s==PROPERTY_DATA[i].list ) return true; return false; } -bool CLI::isProperty(const QString &s) +bool CLI::isProperty(const TQString &s) { for (uint i=0; PROPERTY_DATA[i].name; i++) if ( s==PROPERTY_DATA[i].name ) return true; @@ -112,7 +112,7 @@ CLI::ExitCode CLI::propertyList() //----------------------------------------------------------------------------- CLI::MainBase::MainBase(Properties properties) - : QObject(0, "main"), _properties(properties) + : TQObject(0, "main"), _properties(properties) { Q_ASSERT( _main==0 ); _main = this; @@ -136,7 +136,7 @@ CLI::OptionList CLI::MainBase::optionList(const char *fileDescription) const opt.description = 0; opt.def = 0; if ( PROPERTY_DATA[i].help==0 ) { - Q_ASSERT( QString(PROPERTY_DATA[i].name)!=PROPERTY_DATA[i].optName ); + Q_ASSERT( TQString(PROPERTY_DATA[i].name)!=PROPERTY_DATA[i].optName ); opt.name = PROPERTY_DATA[i].name; // alias list.append(opt); } else { @@ -164,7 +164,7 @@ CLI::OptionList CLI::MainBase::optionList(const char *fileDescription) const return list; } -CLI::ExitCode CLI::MainBase::list(const QString &command) +CLI::ExitCode CLI::MainBase::list(const TQString &command) { if ( command=="command-list" ) return commandList(); if ( command=="property-list" ) return propertyList(); @@ -179,10 +179,10 @@ CLI::ExitCode CLI::MainBase::doRun() for (uint i=0; PROPERTY_DATA[i].name; i++) { if ( PROPERTY_DATA[i].optName==0 ) continue; // alias or interactive only if ( !_args->isSet(PROPERTY_DATA[i].name) ) continue; - QString option = _args->getOption(PROPERTY_DATA[i].name); + TQString option = _args->getOption(PROPERTY_DATA[i].name); ExitCode code = executeSetCommand(PROPERTY_DATA[i].name, option); if ( code!=OK ) return code; - log(Log::LineType::Information, QString("%1: %2").arg(PROPERTY_DATA[i].name).arg(executeGetCommand(PROPERTY_DATA[i].name))); + log(Log::LineType::Information, TQString("%1: %2").tqarg(PROPERTY_DATA[i].name).tqarg(executeGetCommand(PROPERTY_DATA[i].name))); } // process default lists @@ -197,7 +197,7 @@ CLI::ExitCode CLI::MainBase::doRun() if ( code!=OK || interactive ) return code; // find command - QString command = _args->getOption("command"); + TQString command = _args->getOption("command"); code = findCommand(command); if ( code!=OK ) return code; diff --git a/src/common/cli/cli_main.h b/src/common/cli/cli_main.h index 9b54c70..b0d71cb 100644 --- a/src/common/cli/cli_main.h +++ b/src/common/cli/cli_main.h @@ -17,8 +17,8 @@ namespace CLI { //----------------------------------------------------------------------------- enum Property { NoProperty = 0, HasForce = 1, HasInteractiveMode = 2 }; -Q_DECLARE_FLAGS(Properties, Property) -Q_DECLARE_OPERATORS_FOR_FLAGS(Properties) +TQ_DECLARE_FLAGS(Properties, Property) +TQ_DECLARE_OPERATORS_FOR_FLAGS(Properties) extern const KCmdLineOptions OPTIONS[]; //----------------------------------------------------------------------------- @@ -29,8 +29,8 @@ struct CommandData { }; extern const CommandData NORMAL_COMMAND_DATA[]; extern const CommandData INTERACTIVE_COMMAND_DATA[]; -extern const CommandData *findCommandData(const QString &command); -extern ExitCode findCommand(const QString &s); +extern const CommandData *findCommandData(const TQString &command); +extern ExitCode findCommand(const TQString &s); extern ExitCode commandList(); //----------------------------------------------------------------------------- @@ -39,8 +39,8 @@ struct PropertyData const char *name, *optName, *alias, *help, *list, *listHelp; }; extern const PropertyData PROPERTY_DATA[]; -extern bool isPropertyList(const QString &s); -extern bool isProperty(const QString &s); +extern bool isPropertyList(const TQString &s); +extern bool isProperty(const TQString &s); extern ExitCode propertyList(); //----------------------------------------------------------------------------- @@ -55,18 +55,19 @@ private: }; //----------------------------------------------------------------------------- -class MainBase : public QObject, public Log::Base +class MainBase : public TQObject, public Log::Base { Q_OBJECT + TQ_OBJECT public: MainBase(Properties properties); virtual OptionList optionList(const char *fileDescription) const; virtual ExitCode doRun(); - virtual ExitCode list(const QString &listName); - virtual ExitCode prepareCommand(const QString &command) = 0; - virtual ExitCode executeCommand(const QString &command) = 0; - virtual ExitCode executeSetCommand(const QString &property, const QString &value) = 0; - virtual QString executeGetCommand(const QString &property) = 0; + virtual ExitCode list(const TQString &listName); + virtual ExitCode prepareCommand(const TQString &command) = 0; + virtual ExitCode executeCommand(const TQString &command) = 0; + virtual ExitCode executeSetCommand(const TQString &property, const TQString &value) = 0; + virtual TQString executeGetCommand(const TQString &property) = 0; protected: Properties _properties; diff --git a/src/common/cli/cli_pfile.cpp b/src/common/cli/cli_pfile.cpp index 96add3a..e984e52 100644 --- a/src/common/cli/cli_pfile.cpp +++ b/src/common/cli/cli_pfile.cpp @@ -8,7 +8,7 @@ ***************************************************************************/ #include "common/global/pfile.h" -#include +#include //----------------------------------------------------------------------------- bool PURL::File::openForWrite() @@ -17,7 +17,7 @@ bool PURL::File::openForWrite() _file->setName(url().filepath()); if ( !_file->open(IO_WriteOnly) ) { _error = i18n("Could not open file for writing."); - _log.sorry(_error, i18n("File: %1").arg(_file->name())); + _log.sorry(_error, i18n("File: %1").tqarg(_file->name())); return false; } return true; @@ -35,7 +35,7 @@ bool PURL::File::openForRead() _file->setName(_url.filepath()); if ( !_file->open(IO_ReadOnly) ) { _error = i18n("Could not open file for reading."); - _log.sorry(_error, i18n("File: %1").arg(_file->name())); + _log.sorry(_error, i18n("File: %1").tqarg(_file->name())); return false; } return true; diff --git a/src/common/common/bitvalue.cpp b/src/common/common/bitvalue.cpp index 16d5ef0..f4ae5ed 100644 --- a/src/common/common/bitvalue.cpp +++ b/src/common/common/bitvalue.cpp @@ -13,11 +13,11 @@ const uint GenericValue::INVALID = 0xFFFFFFFFU; BitValue BitValue::XORn(uint n) const { uint nb = nbBits(_value); - uint mask = maxValue(NumberBase::Bin, n); + uint tqmask = maxValue(NumberBase::Bin, n); uint res = 0x0; for (uint i=0; i> i) & mask; - //qDebug("%i %s %s", i, toHexLabel((value>>i) & mask, 4).latin1(), toHexLabel(res, 4).latin1()); + res ^= (_value >> i) & tqmask; + //qDebug("%i %s %s", i, toHexLabel((value>>i) & tqmask, 4).latin1(), toHexLabel(res, 4).latin1()); } return res; } @@ -25,6 +25,6 @@ BitValue BitValue::XORn(uint n) const BitValue BitValue::XNORn(uint n) const { BitValue res = XORn(n); - BitValue mask = maxValue(NumberBase::Bin, n); - return res.complementInMask(mask); + BitValue tqmask = maxValue(NumberBase::Bin, n); + return res.complementInMask(tqmask); } diff --git a/src/common/common/bitvalue.h b/src/common/common/bitvalue.h index d3ef9fe..9d0a50f 100644 --- a/src/common/common/bitvalue.h +++ b/src/common/common/bitvalue.h @@ -35,18 +35,18 @@ protected: uint _value; private: - friend QDataStream &operator <<(QDataStream &s, GenericValue v); - friend QDataStream &operator >>(QDataStream &s, GenericValue &v); + friend TQDataStream &operator <<(TQDataStream &s, GenericValue v); + friend TQDataStream &operator >>(TQDataStream &s, GenericValue &v); }; -inline QDataStream &operator <<(QDataStream &s, GenericValue v) { s << v._value; return s; } -inline QDataStream &operator >>(QDataStream &s, GenericValue &v) { s >> v._value; return s; } +inline TQDataStream &operator <<(TQDataStream &s, GenericValue v) { s << v._value; return s; } +inline TQDataStream &operator >>(TQDataStream &s, GenericValue &v) { s >> v._value; return s; } -inline QString toLabel(GenericValue v) { return QString::number(v.toUInt()); } -inline QString toLabel(NumberBase base, GenericValue v, uint nbChars) { return toLabel(base, v.toUInt(), nbChars); } -inline QString toHexLabel(GenericValue v, uint nbChars) { return toHexLabel(v.toUInt(), nbChars); } -inline QString toHex(GenericValue v, uint nbChars) { return toHex(v.toUInt(), nbChars); } -inline QString toHexLabelAbs(GenericValue v) { return ::toHexLabelAbs(v.toUInt()); } +inline TQString toLabel(GenericValue v) { return TQString::number(v.toUInt()); } +inline TQString toLabel(NumberBase base, GenericValue v, uint nbChars) { return toLabel(base, v.toUInt(), nbChars); } +inline TQString toHexLabel(GenericValue v, uint nbChars) { return toHexLabel(v.toUInt(), nbChars); } +inline TQString toHex(GenericValue v, uint nbChars) { return toHex(v.toUInt(), nbChars); } +inline TQString toHexLabelAbs(GenericValue v) { return ::toHexLabelAbs(v.toUInt()); } //---------------------------------------------------------------------------- class Address : public GenericValue @@ -96,11 +96,11 @@ public: BitValue XORn(uint n) const; // XOR between groups of n bits inside value BitValue XNORn(uint n) const; // XORn then NOT on n bits - BitValue maskWith(BitValue mask) const { return _value & mask._value; } + BitValue tqmaskWith(BitValue tqmask) const { return _value & tqmask._value; } bool isInside(BitValue v) const { return ( (_value & v._value)==_value ); } - BitValue complementInMask(BitValue mask) const { return mask._value & ~_value; } + BitValue complementInMask(BitValue tqmask) const { return tqmask._value & ~_value; } BitValue twoComplement() const { return -_value; } - BitValue clearMaskBits(BitValue mask) const { return _value & ~mask._value; } + BitValue clearMaskBits(BitValue tqmask) const { return _value & ~tqmask._value; } bool isOverlapping(BitValue v) const { return ( _value & v._value ); } class const_iterator { diff --git a/src/common/common/group.cpp b/src/common/common/group.cpp index 2a0610f..7c77f3a 100644 --- a/src/common/common/group.cpp +++ b/src/common/common/group.cpp @@ -31,22 +31,22 @@ Group::Base::ConstIterator Group::Base::end() const return _devices.end(); } -void Group::Base::addDevice(const QString &name, const Device::Data *data, Support support) +void Group::Base::addDevice(const TQString &name, const Device::Data *data, Support support) { _devices[name].data = data; _devices[name].support = support; } -Group::Base::Data Group::Base::deviceData(const QString &device) const +Group::Base::Data Group::Base::deviceData(const TQString &device) const { const_cast(*this).checkInitSupported(); return _devices[device]; } -QValueVector Group::Base::supportedDevices() const +TQValueVector Group::Base::supportedDevices() const { const_cast(*this).checkInitSupported(); - QValueVector names; + TQValueVector names; for (ConstIterator it=begin(); it!=end(); ++it) names.append(it.key()); return names; } diff --git a/src/common/common/group.h b/src/common/common/group.h index 2a87674..687c41e 100644 --- a/src/common/common/group.h +++ b/src/common/common/group.h @@ -9,8 +9,8 @@ #ifndef GROUP_H #define GROUP_H -#include -#include +#include +#include #include "common/global/global.h" #include "key_enum.h" @@ -34,27 +34,27 @@ public: const Device::Data *data; Support support; }; - typedef QMap::ConstIterator ConstIterator; + typedef TQMap::ConstIterator ConstIterator; Base(); virtual ~Base() {} - virtual QString name() const = 0; - virtual QString label() const = 0; + virtual TQString name() const = 0; + virtual TQString label() const = 0; ConstIterator begin() const; ConstIterator end() const; - Data deviceData(const QString &device) const; - bool isSupported(const QString &device) const { return deviceData(device).support!=Support::None; } - QValueVector supportedDevices() const; + Data deviceData(const TQString &device) const; + bool isSupported(const TQString &device) const { return deviceData(device).support!=Support::None; } + TQValueVector supportedDevices() const; uint count() const; const BaseGui *gui() const { return _gui; } void checkInitSupported(); protected: virtual void init(); - virtual void addDevice(const QString &name, const Device::Data *data, Support support); + virtual void addDevice(const TQString &name, const Device::Data *data, Support support); virtual void initSupported() = 0; - QMap _devices; + TQMap _devices; private: const BaseGui *_gui; diff --git a/src/common/common/key_enum.h b/src/common/common/key_enum.h index 504ca56..45b1635 100644 --- a/src/common/common/key_enum.h +++ b/src/common/common/key_enum.h @@ -9,7 +9,7 @@ #ifndef KEY_ENUM_H #define KEY_ENUM_H -#include +#include #include "misc.h" #include "common/global/global.h" @@ -30,16 +30,16 @@ protected: uint _value; private: - friend QDataStream &operator >>(QDataStream &s, GenericEnum &e); - friend QDataStream &operator <<(QDataStream &s, const GenericEnum &e); + friend TQDataStream &operator >>(TQDataStream &s, GenericEnum &e); + friend TQDataStream &operator <<(TQDataStream &s, const GenericEnum &e); }; -inline QDataStream &operator <<(QDataStream &s, const GenericEnum &e) +inline TQDataStream &operator <<(TQDataStream &s, const GenericEnum &e) { s << e._value; return s; } -inline QDataStream &operator >>(QDataStream &s, GenericEnum &e) +inline TQDataStream &operator >>(TQDataStream &s, GenericEnum &e) { s >> e._value; return s; @@ -53,7 +53,7 @@ public: \ #define DECLARE_DATA \ public: \ - static Type fromKey(const QString &key) { \ + static Type fromKey(const TQString &key) { \ for (uint i=0; i class Lister { public: - typedef typename QMap::ConstIterator ConstIterator; + typedef typename TQMap::ConstIterator ConstIterator; ConstIterator begin() const { return ConstIterator(_groups.begin()); } ConstIterator end() const { return ConstIterator(_groups.end()); } @@ -26,10 +26,10 @@ public: for (ConstIterator it=begin(); it!=end(); ++it) delete it.data(); } - QValueVector supportedDevices() const { - QValueVector names; + TQValueVector supportedDevices() const { + TQValueVector names; for (ConstIterator it=begin(); it!=end(); ++it) { - QValueVector gnames = it.data()->supportedDevices(); + TQValueVector gnames = it.data()->supportedDevices(); for (uint k=0; kisSupported(device) ) return true; return false; } - const GroupType *group(const QString &name) const { - if ( _groups.contains(name) ) return _groups[name]; + const GroupType *group(const TQString &name) const { + if ( _groups.tqcontains(name) ) return _groups[name]; return 0; } @@ -58,12 +58,12 @@ protected: group->_gui = gui; if (gui) gui->_group = group; group->init(); - Q_ASSERT( !_groups.contains(group->name()) ); + Q_ASSERT( !_groups.tqcontains(group->name()) ); _groups.insert(group->name(), group); } private: - QMap _groups; + TQMap _groups; }; } // namespace diff --git a/src/common/common/misc.cpp b/src/common/common/misc.cpp index 1974024..1c22b4e 100644 --- a/src/common/common/misc.cpp +++ b/src/common/common/misc.cpp @@ -10,8 +10,8 @@ #include -#include -#include +#include +#include #include "number.h" @@ -30,9 +30,9 @@ uchar bcd2bin(uchar bcd) return (h*10) + l; } -QString escapeXml(const QString &cs) +TQString escapeXml(const TQString &cs) { - QString s; + TQString s; for (uint i=0; i' ) s += ">"; @@ -41,7 +41,7 @@ QString escapeXml(const QString &cs) return s; } -QString htmlTableRow(const QString &title, const QString &value) +TQString htmlTableRow(const TQString &title, const TQString &value) { return "" + title + ":" + value + ""; } @@ -53,12 +53,12 @@ void crash(const char *assert, const char *file, int line) (*ptr)++; } -bool checkAvailable(const QByteArray &data, uint offset, uint nbBytes) +bool checkAvailable(const TQByteArray &data, uint offset, uint nbBytes) { return ( offset+nbBytes<=uint(data.size()) ); } -Q_UINT32 getULong(const QByteArray &data, uint offset, uint nbBytes, bool *ok) +TQ_UINT32 getULong(const TQByteArray &data, uint offset, uint nbBytes, bool *ok) { Q_ASSERT( nbBytes<=8 ); if ( !checkAvailable(data, offset, nbBytes) ) { @@ -66,7 +66,7 @@ Q_UINT32 getULong(const QByteArray &data, uint offset, uint nbBytes, bool *ok) return 0; } if (ok) *ok = true; - Q_UINT32 r = 0; - for (uint i=0; i +#include -inline QString repeat(const char *r, uint nb) +inline TQString repeat(const char *r, uint nb) { - QString s; + TQString s; for (uint i=0; i=0; k--) if ( s[k]!=' ' ) break; return s.mid(0, k+1); @@ -28,11 +28,11 @@ extern uchar bin2bcd(uchar bin); extern uchar bcd2bin(uchar bcd); inline bool XOR(bool b1, bool b2) { return ( (!b1 && b2) || (b1 && !b2) ); } -extern bool checkAvailable(const QByteArray &data, uint offset, uint nbBytes); -extern Q_UINT32 getULong(const QByteArray &data, uint offset, uint nbBytes, bool *ok); +extern bool checkAvailable(const TQByteArray &data, uint offset, uint nbBytes); +extern TQ_UINT32 getULong(const TQByteArray &data, uint offset, uint nbBytes, bool *ok); -extern QString escapeXml(const QString &s); -extern QString htmlTableRow(const QString &title, const QString &value); +extern TQString escapeXml(const TQString &s); +extern TQString htmlTableRow(const TQString &title, const TQString &value); extern void crash(const char *assert, const char *file, int line); #define CRASH_ASSERT(x) ((x) ? void(0) : crash(#x, __FILE__, __LINE__)) diff --git a/src/common/common/number.cpp b/src/common/common/number.cpp index 12fcac0..01fa4eb 100644 --- a/src/common/common/number.cpp +++ b/src/common/common/number.cpp @@ -35,10 +35,10 @@ char toChar(NumberBase base, uint value) return 'A' + value - 10; } -QString toString(NumberBase base, ulong value, uint nbChars) +TQString toString(NumberBase base, ulong value, uint nbChars) { ulong tmp = value; - QString s; + TQString s; s.fill(0, nbChars); for (uint i=0; i &values, uint nbChars) +TQString toLabels(NumberBase base, const TQMemArray &values, uint nbChars) { - QString s = "["; + TQString s = "["; for (uint i=0; i &values, uint nbChars) return s; } -QString formatNumber(ulong v) +TQString formatNumber(ulong v) { #if defined(NO_KDE) - return QString::number(v); + return TQString::number(v); #else return KGlobal::locale()->formatNumber(v, 0); #endif } -QByteArray toAscii(const QString &s) +TQByteArray toAscii(const TQString &s) { - QByteArray a(s.length()); + TQByteArray a(s.length()); for (uint i=0; i &values, uint nbChars); +extern TQString toString(NumberBase base, ulong value, uint nbChars); +extern TQString toLabel(NumberBase base, ulong value, uint nbChars); +extern TQString toLabels(NumberBase base, const TQMemArray &values, uint nbChars); extern uint fromChar(NumberBase base, char c, bool *ok); extern ulong fromString(NumberBase base, const char *s, uint size, bool *ok); -extern ulong fromString(NumberBase base, const QString &s, bool *ok); -extern ulong fromLabel(NumberBase base, const QString &s, bool *ok); -extern ulong fromLabel(NumberBase base, const QString &s, uint nbChars, bool *ok); +extern ulong fromString(NumberBase base, const TQString &s, bool *ok); +extern ulong fromLabel(NumberBase base, const TQString &s, bool *ok); +extern ulong fromLabel(NumberBase base, const TQString &s, uint nbChars, bool *ok); extern ulong fromLabel(NumberBase base, const char *s, uint size, bool *ok); -extern ulong fromAnyLabel(const QString &s, bool *ok); +extern ulong fromAnyLabel(const TQString &s, bool *ok); //---------------------------------------------------------------------------- -inline QString toHex(ulong value, uint nbChars) { return toString(NumberBase::Hex, value, nbChars); } -inline QString toHexLabel(ulong value, uint nbChars) { return toLabel(NumberBase::Hex, value, nbChars); } -inline QString toHexLabelAbs(ulong value) { return toLabel(NumberBase::Hex, value, nbChars(NumberBase::Hex, value)); } +inline TQString toHex(ulong value, uint nbChars) { return toString(NumberBase::Hex, value, nbChars); } +inline TQString toHexLabel(ulong value, uint nbChars) { return toLabel(NumberBase::Hex, value, nbChars); } +inline TQString toHexLabelAbs(ulong value) { return toLabel(NumberBase::Hex, value, nbChars(NumberBase::Hex, value)); } inline uint fromHex(char c, bool *ok) { return fromChar(NumberBase::Hex, c, ok); } -inline uint fromHex(QChar c, bool *ok) { return fromChar(NumberBase::Hex, c.latin1(), ok); } +inline uint fromHex(TQChar c, bool *ok) { return fromChar(NumberBase::Hex, c.latin1(), ok); } inline ulong fromHex(const char *s, uint size, bool *ok) { return fromString(NumberBase::Hex, s, size, ok); } -inline ulong fromHex(const QString &s, bool *ok) { return fromString(NumberBase::Hex, s, ok); } -inline ulong fromHexLabel(const QString &s, bool *ok) { return fromLabel(NumberBase::Hex, s, ok); } -inline ulong fromHexLabel(const QString &s, uint nbChars, bool *ok) { return fromLabel(NumberBase::Hex, s, nbChars, ok); } +inline ulong fromHex(const TQString &s, bool *ok) { return fromString(NumberBase::Hex, s, ok); } +inline ulong fromHexLabel(const TQString &s, bool *ok) { return fromLabel(NumberBase::Hex, s, ok); } +inline ulong fromHexLabel(const TQString &s, uint nbChars, bool *ok) { return fromLabel(NumberBase::Hex, s, nbChars, ok); } inline ulong fromHexLabel(const char *s, uint size, bool *ok) { return fromLabel(NumberBase::Hex, s, size, ok); } //---------------------------------------------------------------------------- @@ -63,28 +63,28 @@ inline uint nbChars(ulong value) { return nbBitsToNbChars(nbBits(value)); } inline uint nbBytes(ulong value) { return nbBitsToNbBytes(nbBits(value)); } //---------------------------------------------------------------------------- -extern QString formatNumber(ulong v); -extern QByteArray toAscii(const QString &s); +extern TQString formatNumber(ulong v); +extern TQByteArray toAscii(const TQString &s); //---------------------------------------------------------------------------- enum PrintMode { PrintAlphaNum, PrintEscapeAll }; -inline QString toPrintable(char c, PrintMode mode) +inline TQString toPrintable(char c, PrintMode mode) { - if ( mode==PrintAlphaNum && isalnum(c) ) return QChar(c); + if ( mode==PrintAlphaNum && isalnum(c) ) return TQChar(c); return "\\" + toHex(uchar(c), 2); } -inline QString toPrintable(const char *data, uint size, PrintMode mode) +inline TQString toPrintable(const char *data, uint size, PrintMode mode) { - QString s; + TQString s; for (uint i=0; i &data, PrintMode mode) +inline TQString toPrintable(const TQMemArray &data, PrintMode mode) { return toPrintable((const char *)data.data(), data.size(), mode); } diff --git a/src/common/common/purl_base.cpp b/src/common/common/purl_base.cpp index 2493322..fe15d6b 100644 --- a/src/common/common/purl_base.cpp +++ b/src/common/common/purl_base.cpp @@ -9,7 +9,7 @@ #include "purl_base.h" #include "common/global/global.h" -#include +#include #include "data/xpms/project.xpm" #include "data/xpms/sourcefile.xpm" @@ -58,51 +58,51 @@ const PURL::FileType::Data PURL::FileType::DATA[Nb_Types] = { { "", Nb_FileGroups, NoProperty, SourceFamily::Nb_Types, I18N_NOOP("Pikdev Project File"), { "pikprj", 0 }, 0, 0, 0 } }; -QString PURL::addExtension(const QString &filename, FileType type) +TQString PURL::addExtension(const TQString &filename, FileType type) { - QFileInfo info(filename); + TQFileInfo info(filename); if ( !info.extension().isEmpty() ) return filename; return filename + '.' + extension(type); } -QString PURL::extension(FileType type) +TQString PURL::extension(FileType type) { return type.data().extensions[0]; } -QString PURL::extensions(FileType type) +TQString PURL::extensions(FileType type) { Q_ASSERT( type!=PURL::Nb_FileTypes ); - QString s; + TQString s; for (uint i=0; type.data().extensions[i]; i++) { if ( i!=0 ) s += ' '; - s += QString("*.") + type.data().extensions[i]; + s += TQString("*.") + type.data().extensions[i]; } return s; } -QString PURL::filter(FileType type) +TQString PURL::filter(FileType type) { //if ( hasMimetype(type) ) return DATA[type].mimetype; // #### we cannot mix mimetype and regular filters in KFileDialog... - QString s = extensions(type); + TQString s = extensions(type); return s + ' ' + s.upper() + '|' + type.label() + " (" + s + ")"; } -QString PURL::extensions(FileGroup group) +TQString PURL::extensions(FileGroup group) { - QString e; + TQString e; FOR_EACH(FileType, type) { if ( type.data().group!=group ) continue; if ( type!=FileType::Type(0) ) e += ' '; - QString s = extensions(type); + TQString s = extensions(type); e += s + ' ' + s.upper(); } return e; } -QString PURL::sourceFilter(FilterType type) +TQString PURL::sourceFilter(FilterType type) { - QString f = extensions(Source) + ' ' + extensions(Header) + '|' + i18n("All Source Files"); + TQString f = extensions(Source) + ' ' + extensions(Header) + '|' + i18n("All Source Files"); if ( type==CompleteFilter) { FOR_EACH(FileType, type) { if ( !(type.data().properties & (Source | Header)) ) continue; @@ -112,9 +112,9 @@ QString PURL::sourceFilter(FilterType type) return f; } -QString PURL::objectFilter(FilterType type) +TQString PURL::objectFilter(FilterType type) { - QString f = extensions(Object) + ' ' + extensions(Library) + '|' + i18n("All Object Files"); + TQString f = extensions(Object) + ' ' + extensions(Library) + '|' + i18n("All Object Files"); if ( type==CompleteFilter ) { f += '\n' + filter(Object); f += '\n' + filter(Library); @@ -122,9 +122,9 @@ QString PURL::objectFilter(FilterType type) return f; } -QString PURL::projectFilter(FilterType type) +TQString PURL::projectFilter(FilterType type) { - QString f = extensions(Project) + ' ' + extensions(PikdevProject) + '|' + i18n("Project Files"); + TQString f = extensions(Project) + ' ' + extensions(PikdevProject) + '|' + i18n("Project Files"); if ( type==CompleteFilter ) { f += '\n' + filter(Project); f += '\n' + filter(PikdevProject); diff --git a/src/common/common/purl_base.h b/src/common/common/purl_base.h index 7a7e4ea..783daf0 100644 --- a/src/common/common/purl_base.h +++ b/src/common/common/purl_base.h @@ -38,8 +38,8 @@ END_DECLARE_ENUM(SourceFamily, SourceFamilyData) enum FileGroup { Source = 0, Header, LinkerScript, LinkerObject, Nb_FileGroups }; enum FileProperty { NoProperty = 0, Editable = 1, ReadOnly = 2 }; -Q_DECLARE_FLAGS(FileProperties, FileProperty) -Q_DECLARE_OPERATORS_FOR_FLAGS(FileProperties) +TQ_DECLARE_FLAGS(FileProperties, FileProperty) +TQ_DECLARE_OPERATORS_FOR_FLAGS(FileProperties) struct FileTypeData { const char *key; @@ -52,7 +52,7 @@ struct FileTypeData { const char *mimetype; const char *highlightModeName; }; -#ifndef Q_MOC_RUN // needed because MOC does not expand defines... +#ifndef TQ_TQMOC_RUN // needed because TQMOC does not expand defines... class FileType : public GenericEnum { public: @@ -64,15 +64,15 @@ DECLARE_ENUM_CLASS(FileType) #endif // add correct extension if filename has no extension -extern QString addExtension(const QString &filename, FileType type); -extern QString extension(FileType type); -extern QString extensions(FileType type); -extern QString filter(FileType type); +extern TQString addExtension(const TQString &filename, FileType type); +extern TQString extension(FileType type); +extern TQString extensions(FileType type); +extern TQString filter(FileType type); enum FilterType { SimpleFilter, CompleteFilter }; -extern QString sourceFilter(FilterType type); -extern QString objectFilter(FilterType type); -extern QString projectFilter(FilterType type); -extern QString extensions(FileGroup group); +extern TQString sourceFilter(FilterType type); +extern TQString objectFilter(FilterType type); +extern TQString projectFilter(FilterType type); +extern TQString extensions(FileGroup group); } // namespace diff --git a/src/common/common/qflags.h b/src/common/common/qflags.h index 4858ce4..c7abfc2 100644 --- a/src/common/common/qflags.h +++ b/src/common/common/qflags.h @@ -2,7 +2,7 @@ ** ** Copyright (C) 1992-2005 Trolltech AS. All rights reserved. ** -** This file is part of the QtCore module of the Qt Toolkit. +** This file is part of the TQtCore module of the TQt Toolkit. ** ** This file may be used under the terms of the GNU General Public ** License version 2.0 as published by the Free Software Foundation @@ -20,62 +20,62 @@ ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ****************************************************************************/ -#ifndef QFLAGS_H -#define QFLAGS_H +#ifndef TQFLAGS_H +#define TQFLAGS_H -#include +#include -class QFlag +class TQFlag { int i; public: - inline QFlag(int i); + inline TQFlag(int i); inline operator int() const { return i; } }; -inline QFlag::QFlag(int ai) : i(ai) {} +inline TQFlag::TQFlag(int ai) : i(ai) {} template -class QFlags +class TQFlags { typedef void **Zero; int i; public: typedef Enum enum_type; - inline QFlags(const QFlags &f) : i(f.i) {} - inline QFlags(Enum f) : i(f) {} - inline QFlags(Zero = 0) : i(0) {} - inline QFlags(QFlag f) : i(f) {} + inline TQFlags(const TQFlags &f) : i(f.i) {} + inline TQFlags(Enum f) : i(f) {} + inline TQFlags(Zero = 0) : i(0) {} + inline TQFlags(TQFlag f) : i(f) {} - inline QFlags &operator=(const QFlags &f) { i = f.i; return *this; } - inline QFlags &operator&=(int mask) { i &= mask; return *this; } - inline QFlags &operator&=(uint mask) { i &= mask; return *this; } - inline QFlags &operator|=(QFlags f) { i |= f.i; return *this; } - inline QFlags &operator|=(Enum f) { i |= f; return *this; } - inline QFlags &operator^=(QFlags f) { i ^= f.i; return *this; } - inline QFlags &operator^=(Enum f) { i ^= f; return *this; } + inline TQFlags &operator=(const TQFlags &f) { i = f.i; return *this; } + inline TQFlags &operator&=(int tqmask) { i &= tqmask; return *this; } + inline TQFlags &operator&=(uint tqmask) { i &= tqmask; return *this; } + inline TQFlags &operator|=(TQFlags f) { i |= f.i; return *this; } + inline TQFlags &operator|=(Enum f) { i |= f; return *this; } + inline TQFlags &operator^=(TQFlags f) { i ^= f.i; return *this; } + inline TQFlags &operator^=(Enum f) { i ^= f; return *this; } inline operator int() const { return i;} - inline QFlags operator|(QFlags f) const { QFlags g; g.i = i | f.i; return g; } - inline QFlags operator|(Enum f) const { QFlags g; g.i = i | f; return g; } - inline QFlags operator^(QFlags f) const { QFlags g; g.i = i ^ f.i; return g; } - inline QFlags operator^(Enum f) const { QFlags g; g.i = i ^ f; return g; } - inline QFlags operator&(int mask) const { QFlags g; g.i = i & mask; return g; } - inline QFlags operator&(uint mask) const { QFlags g; g.i = i & mask; return g; } - inline QFlags operator&(Enum f) const { QFlags g; g.i = i & f; return g; } - inline QFlags operator~() const { QFlags g; g.i = ~i; return g; } + inline TQFlags operator|(TQFlags f) const { TQFlags g; g.i = i | f.i; return g; } + inline TQFlags operator|(Enum f) const { TQFlags g; g.i = i | f; return g; } + inline TQFlags operator^(TQFlags f) const { TQFlags g; g.i = i ^ f.i; return g; } + inline TQFlags operator^(Enum f) const { TQFlags g; g.i = i ^ f; return g; } + inline TQFlags operator&(int tqmask) const { TQFlags g; g.i = i & tqmask; return g; } + inline TQFlags operator&(uint tqmask) const { TQFlags g; g.i = i & tqmask; return g; } + inline TQFlags operator&(Enum f) const { TQFlags g; g.i = i & f; return g; } + inline TQFlags operator~() const { TQFlags g; g.i = ~i; return g; } inline bool operator!() const { return !i; } }; -#define Q_DECLARE_FLAGS(Flags, Enum)\ -typedef QFlags Flags; -#define Q_DECLARE_OPERATORS_FOR_FLAGS(Flags) \ -inline QFlags operator|(Flags::enum_type f1, Flags::enum_type f2) \ -{ return QFlags(f1) | f2; } \ -inline QFlags operator|(Flags::enum_type f1, QFlags f2) \ +#define TQ_DECLARE_FLAGS(Flags, Enum)\ +typedef TQFlags Flags; +#define TQ_DECLARE_OPERATORS_FOR_FLAGS(Flags) \ +inline TQFlags operator|(Flags::enum_type f1, Flags::enum_type f2) \ +{ return TQFlags(f1) | f2; } \ +inline TQFlags operator|(Flags::enum_type f1, TQFlags f2) \ { return f2 | f1; } #endif diff --git a/src/common/common/range.h b/src/common/common/range.h index e07cb68..d1e846f 100644 --- a/src/common/common/range.h +++ b/src/common/common/range.h @@ -18,7 +18,7 @@ class GenericRange public: virtual ~GenericRange() {} virtual bool isEmpty() const = 0; - bool contains(Type v) const { return !isEmpty() && v>=start && v<=end; } + bool tqcontains(Type v) const { return !isEmpty() && v>=start && v<=end; } Type start, end; }; @@ -32,14 +32,14 @@ public: }; template -inline QDataStream &operator >>(QDataStream &s, GenericRange &r) { s >> r.start >> r.end; return s; } +inline TQDataStream &operator >>(TQDataStream &s, GenericRange &r) { s >> r.start >> r.end; return s; } template -inline QDataStream &operator <<(QDataStream &s, const GenericRange &r) { s << r.start << r.end; return s; } +inline TQDataStream &operator <<(TQDataStream &s, const GenericRange &r) { s << r.start << r.end; return s; } template inline bool operator ==(const GenericRange &r1, const GenericRange &r2) { return ( r1.start==r2.start && r1.end==r2.end ); } template -class GenericRangeVector : public QValueVector +class GenericRangeVector : public TQValueVector { public: GenericRangeVector() {} @@ -49,9 +49,9 @@ public: for (uint i=0; iat(i).isEmpty() ) return false; return true; } - bool contains(Type v) const { + bool tqcontains(Type v) const { uint nb = this->count(); - for (uint i=0; iat(i).contains(v) ) return true; + for (uint i=0; iat(i).tqcontains(v) ) return true; return false; } }; diff --git a/src/common/common/storage.cpp b/src/common/common/storage.cpp index 00137b8..447a8a0 100644 --- a/src/common/common/storage.cpp +++ b/src/common/common/storage.cpp @@ -8,14 +8,14 @@ ***************************************************************************/ #include "storage.h" -#include +#include //---------------------------------------------------------------------------- void GenericStorage::delayedChanged() { if (_dirty) return; _dirty = true; - QTimer::singleShot(0, this, SLOT(changedSlot())); + TQTimer::singleShot(0, this, TQT_SLOT(changedSlot())); } void GenericStorage::changedSlot() @@ -27,7 +27,7 @@ void GenericStorage::changedSlot() //---------------------------------------------------------------------------- void GenericViewProxy::addStorage(GenericStorage &storage) { - connect(&storage, SIGNAL(changed()), SLOT(changed())); + connect(&storage, TQT_SIGNAL(changed()), TQT_SLOT(changed())); } void GenericViewProxy::changed() diff --git a/src/common/common/storage.h b/src/common/common/storage.h index b61123a..f1c947d 100644 --- a/src/common/common/storage.h +++ b/src/common/common/storage.h @@ -10,7 +10,7 @@ #define STORAGE_H #include "common/global/global.h" -#include +#include //----------------------------------------------------------------------------- template @@ -28,15 +28,16 @@ public: } private: - QValueList _list; + TQValueList _list; }; //---------------------------------------------------------------------------- -class GenericStorage : public QObject +class GenericStorage : public TQObject { Q_OBJECT + TQ_OBJECT public: - GenericStorage(QObject *parent = 0, const char *name = 0) : QObject(parent, name), _dirty(false) {} + GenericStorage(TQObject *tqparent = 0, const char *name = 0) : TQObject(tqparent, name), _dirty(false) {} signals: void changed(); @@ -55,9 +56,10 @@ private: //---------------------------------------------------------------------------- class GenericView; -class GenericViewProxy : public QObject +class GenericViewProxy : public TQObject { Q_OBJECT + TQ_OBJECT public: GenericViewProxy(GenericView &view) : _view(view) {} void addStorage(GenericStorage &storage); diff --git a/src/common/common/streamer.h b/src/common/common/streamer.h index 93d1421..5d0bbaa 100644 --- a/src/common/common/streamer.h +++ b/src/common/common/streamer.h @@ -9,8 +9,8 @@ #ifndef STREAMER_H #define STREAMER_H -#include -#include +#include +#include #include "common/global/global.h" #include "common/common/number.h" @@ -19,13 +19,9 @@ template class DataStreamer { public: - uint toCppString(const QValueList &list, QTextStream &s) { - QByteArray a; -#if QT_VERSION<0x040000 - QDataStream ds(a, IO_WriteOnly); -#else - QDataStream ds(&a, QIODevice::WriteOnly); -#endif + uint toCppString(const TQValueList &list, TQTextStream &s) { + TQByteArray a; + TQDataStream ds(a, IO_WriteOnly); for (uint i=0; i fromCppString(const char *data, uint size) { - QByteArray a; + TQValueList fromCppString(const char *data, uint size) { + TQByteArray a; a.setRawData(data, size); -#if QT_VERSION<0x040000 - QDataStream ds(a, IO_ReadOnly); -#else - QDataStream ds(&a, QIODevice::ReadOnly); -#endif - QValueList list; + TQDataStream ds(a, IO_ReadOnly); + TQValueList list; for (;;) { if ( ds.atEnd() ) break; DataType *data = new DataType; diff --git a/src/common/common/synchronous.cpp b/src/common/common/synchronous.cpp index f392103..b893bf4 100644 --- a/src/common/common/synchronous.cpp +++ b/src/common/common/synchronous.cpp @@ -9,50 +9,35 @@ #include "synchronous.h" #include "common/global/global.h" -#if QT_VERSION<0x040000 -# include -#endif +# include Synchronous::Synchronous(uint timeout) { - connect(&_timer, SIGNAL(timeout()), SLOT(done())); + connect(&_timer, TQT_SIGNAL(timeout()), TQT_SLOT(done())); if (timeout) _timer.start(timeout, true); -#if QT_VERSION>=0x040000 - _loop = new QEventLoop(this); -#endif } -#if QT_VERSION<0x040000 // uplifted from kdelibs... -void qt_enter_modal(QWidget *widget); -void qt_leave_modal(QWidget *widget); -#endif +void qt_enter_modal(TQWidget *widget); +void qt_leave_modal(TQWidget *widget); bool Synchronous::enterLoop() { -#if QT_VERSION<0x040000 - QWidget *dummy = 0; - if ( qApp->type()!=QApplication::Tty ) { - dummy = new QWidget(0, 0, WType_Dialog | WShowModal); - dummy->setFocusPolicy(QWidget::NoFocus); + TQWidget *dummy = 0; + if ( tqApp->type()!=TQApplication::Tty ) { + dummy = new TQWidget(0, 0, WType_Dialog | WShowModal); + dummy->setFocusPolicy(TQ_NoFocus); qt_enter_modal(dummy); } - QApplication::eventLoop()->enterLoop(); - if ( qApp->type()!=QApplication::Tty ) { + TQApplication::eventLoop()->enterLoop(); + if ( tqApp->type()!=TQApplication::Tty ) { qt_leave_modal(dummy); delete dummy; } -#else - _loop->exec(); -#endif return _timer.isActive(); } void Synchronous::done() { -#if QT_VERSION<0x040000 - QApplication::eventLoop()->exitLoop(); -#else - _loop->exit(); -#endif + TQApplication::eventLoop()->exitLoop(); } diff --git a/src/common/common/synchronous.h b/src/common/common/synchronous.h index e855e38..759747a 100644 --- a/src/common/common/synchronous.h +++ b/src/common/common/synchronous.h @@ -9,12 +9,13 @@ #ifndef SYNCHRONOUS_H #define SYNCHRONOUS_H -#include -#include +#include +#include -class Synchronous : public QObject +class Synchronous : public TQObject { Q_OBJECT + TQ_OBJECT public: Synchronous(uint timeout = 0); // timeout is ms (0 == no timeout) bool enterLoop(); // return false on timeout @@ -23,10 +24,7 @@ public slots: void done(); private: - QTimer _timer; -#if QT_VERSION>=0x040000 - QEventLoop *_loop; -#endif + TQTimer _timer; }; #endif diff --git a/src/common/common/version_data.cpp b/src/common/common/version_data.cpp index 481ba1a..926f290 100644 --- a/src/common/common/version_data.cpp +++ b/src/common/common/version_data.cpp @@ -8,14 +8,14 @@ ***************************************************************************/ #include "version_data.h" -#include +#include #include "number.h" -VersionData VersionData::fromString(const QString &s) +VersionData VersionData::fromString(const TQString &s) { VersionData vd; - QRegExp re("([0-9]+)\\.([0-9]+)\\.([0-9]+)(.*)"); + TQRegExp re("([0-9]+)\\.([0-9]+)\\.([0-9]+)(.*)"); if ( !re.exactMatch(s) ) return vd; vd._valid = true; vd._majorNum = re.cap(1).toUInt(); @@ -25,7 +25,7 @@ VersionData VersionData::fromString(const QString &s) return vd; } -VersionData VersionData::fromHexString(const QString &s) +VersionData VersionData::fromHexString(const TQString &s) { VersionData vd; if ( s.length()!=6 ) return vd; @@ -36,16 +36,16 @@ VersionData VersionData::fromHexString(const QString &s) return vd; } -QString VersionData::pretty() const +TQString VersionData::pretty() const { if ( !isValid() ) return "---"; - return QString::number(_majorNum) + '.' + QString::number(_minorNum) + '.' + QString::number(_dotNum) + _sub; + return TQString::number(_majorNum) + '.' + TQString::number(_minorNum) + '.' + TQString::number(_dotNum) + _sub; } -QString VersionData::prettyWithoutDot() const +TQString VersionData::prettyWithoutDot() const { if ( !isValid() ) return "---"; - return QString::number(_majorNum) + '.' + QString::number(_minorNum); + return TQString::number(_majorNum) + '.' + TQString::number(_minorNum); } uint VersionData::toUInt() const diff --git a/src/common/common/version_data.h b/src/common/common/version_data.h index 2571631..a060f7b 100644 --- a/src/common/common/version_data.h +++ b/src/common/common/version_data.h @@ -14,8 +14,8 @@ class VersionData { public: - static VersionData fromString(const QString &s); - static VersionData fromHexString(const QString &s); + static VersionData fromString(const TQString &s); + static VersionData fromHexString(const TQString &s); public: VersionData() : _valid(false) {} @@ -26,10 +26,10 @@ public: uchar majorNum() const { return _majorNum; } uchar minorNum() const { return _minorNum; } uchar dotNum() const { return _dotNum; } - QString sub() const { return _sub; } + TQString sub() const { return _sub; } VersionData toWithoutDot() const { return VersionData(_majorNum, _minorNum, 0); } - QString pretty() const; - QString prettyWithoutDot() const; + TQString pretty() const; + TQString prettyWithoutDot() const; uint toUInt() const; bool operator <(const VersionData &vd) const { return toUInt() +class OptionList : public TQValueList { public: OptionList() : _options(0) {} diff --git a/src/common/global/generic_config.cpp b/src/common/global/generic_config.cpp index 841233b..6ddf44c 100644 --- a/src/common/global/generic_config.cpp +++ b/src/common/global/generic_config.cpp @@ -11,12 +11,12 @@ #include "global.h" #if defined(NO_KDE) -# include +# include class GenericConfigPrivate { public: - GenericConfigPrivate(const QString &group) { _settings.beginGroup("/piklab/" + group); } - QSettings _settings; + GenericConfigPrivate(const TQString &group) { _settings.beginGroup("/piklab/" + group); } + TQSettings _settings; }; #else # include @@ -24,7 +24,7 @@ public: class GenericConfigPrivate { public: - GenericConfigPrivate(const QString &group) : _group(group) {} + GenericConfigPrivate(const TQString &group) : _group(group) {} ~GenericConfigPrivate() { kapp->config()->sync(); } KConfig &config() { KConfig *conf = kapp->config(); @@ -33,11 +33,11 @@ public: } private: - QString _group; + TQString _group; }; #endif -GenericConfig::GenericConfig(const QString &group) +GenericConfig::GenericConfig(const TQString &group) : _group(group) { _d = new GenericConfigPrivate(group); @@ -57,10 +57,10 @@ void GenericConfig::rollback() #endif } -QString GenericConfig::readEntry(const QString &key, const QString &def) const +TQString GenericConfig::readEntry(const TQString &key, const TQString &def) const { #if defined(NO_KDE) -# if QT_VERSION<0x040000 +# if [[[TQT_VERSION IS DEPRECATED]]]<0x040000 return _d->_settings.readEntry(key, def); # else return _d->_settings.value(key, def).toString(); @@ -69,10 +69,10 @@ QString GenericConfig::readEntry(const QString &key, const QString &def) const return _d->config().readEntry(key, def); #endif } -void GenericConfig::writeEntry(const QString &key, const QString &value) +void GenericConfig::writeEntry(const TQString &key, const TQString &value) { #if defined(NO_KDE) -# if QT_VERSION<0x040000 +# if [[[TQT_VERSION IS DEPRECATED]]]<0x040000 _d->_settings.writeEntry(key, value); # else _d->_settings.setValue(key, value); @@ -82,10 +82,10 @@ void GenericConfig::writeEntry(const QString &key, const QString &value) #endif } -QStringList GenericConfig::readListEntry(const QString &key, const QStringList &defaultValues) const +TQStringList GenericConfig::readListEntry(const TQString &key, const TQStringList &defaultValues) const { #if defined(NO_KDE) -# if QT_VERSION<0x040000 +# if [[[TQT_VERSION IS DEPRECATED]]]<0x040000 if ( _d->_settings.readEntry(key).isNull() ) return defaultValues; return _d->_settings.readListEntry(key); # else @@ -96,10 +96,10 @@ QStringList GenericConfig::readListEntry(const QString &key, const QStringList & return _d->config().readListEntry(key); #endif } -void GenericConfig::writeEntry(const QString &key, const QStringList &value) +void GenericConfig::writeEntry(const TQString &key, const TQStringList &value) { #if defined(NO_KDE) -# if QT_VERSION<0x040000 +# if [[[TQT_VERSION IS DEPRECATED]]]<0x040000 _d->_settings.writeEntry(key, value); # else _d->_settings.setValue(key, value); @@ -109,12 +109,12 @@ void GenericConfig::writeEntry(const QString &key, const QStringList &value) #endif } -QValueList GenericConfig::readIntListEntry(const QString &key) const +TQValueList GenericConfig::readIntListEntry(const TQString &key) const { #if defined(NO_KDE) - QValueList ilist; - QStringList list = readListEntry(key, QStringList()); - QStringList::const_iterator it; + TQValueList ilist; + TQStringList list = readListEntry(key, TQStringList()); + TQStringList::const_iterator it; for (it=list.begin(); it!=list.end(); ++it) { bool ok; int v = (*it).toInt(&ok); @@ -126,32 +126,32 @@ QValueList GenericConfig::readIntListEntry(const QString &key) const return _d->config().readIntListEntry(key); #endif } -void GenericConfig::writeEntry(const QString &key, const QValueList &value) +void GenericConfig::writeEntry(const TQString &key, const TQValueList &value) { #if defined(NO_KDE) - QStringList list; - QValueList::const_iterator it; - for (it=value.begin(); it!=value.end(); ++it) list.append(QString::number(*it)); + TQStringList list; + TQValueList::const_iterator it; + for (it=value.begin(); it!=value.end(); ++it) list.append(TQString::number(*it)); writeEntry(key, list); #else _d->config().writeEntry(key, value); #endif } -QSize GenericConfig::readSizeEntry(const QString &key, const QSize *def) const +TQSize GenericConfig::readSizeEntry(const TQString &key, const TQSize *def) const { #if defined(NO_KDE) - QValueList list = readIntListEntry(key); + TQValueList list = readIntListEntry(key); if ( list.count()!=2 ) return *def; - return QSize(list[0], list[1]); + return TQSize(list[0], list[1]); #else return _d->config().readSizeEntry(key, def); #endif } -void GenericConfig::writeEntry(const QString &key, const QSize &value) +void GenericConfig::writeEntry(const TQString &key, const TQSize &value) { #if defined(NO_KDE) - QValueList ilist; + TQValueList ilist; ilist.append(value.width()); ilist.append(value.height()); writeEntry(key, ilist); @@ -160,10 +160,10 @@ void GenericConfig::writeEntry(const QString &key, const QSize &value) #endif } -bool GenericConfig::readBoolEntry(const QString &key, bool def) const +bool GenericConfig::readBoolEntry(const TQString &key, bool def) const { #if defined(NO_KDE) -# if QT_VERSION<0x040000 +# if [[[TQT_VERSION IS DEPRECATED]]]<0x040000 return _d->_settings.readBoolEntry(key, def); # else return _d->_settings.value(key, def).toBool(); @@ -172,10 +172,10 @@ bool GenericConfig::readBoolEntry(const QString &key, bool def) const return _d->config().readBoolEntry(key, def); #endif } -void GenericConfig::writeEntry(const QString &key, bool value) +void GenericConfig::writeEntry(const TQString &key, bool value) { #if defined(NO_KDE) -# if QT_VERSION<0x040000 +# if [[[TQT_VERSION IS DEPRECATED]]]<0x040000 _d->_settings.writeEntry(key, value); # else _d->_settings.setValue(key, value); @@ -185,10 +185,10 @@ void GenericConfig::writeEntry(const QString &key, bool value) #endif } -int GenericConfig::readIntEntry(const QString &key, int def) const +int GenericConfig::readIntEntry(const TQString &key, int def) const { #if defined(NO_KDE) -# if QT_VERSION<0x040000 +# if [[[TQT_VERSION IS DEPRECATED]]]<0x040000 return _d->_settings.readNumEntry(key, def); # else return _d->_settings.value(key, def).toInt(); @@ -197,10 +197,10 @@ int GenericConfig::readIntEntry(const QString &key, int def) const return _d->config().readNumEntry(key, def); #endif } -void GenericConfig::writeEntry(const QString &key, int value) +void GenericConfig::writeEntry(const TQString &key, int value) { #if defined(NO_KDE) -# if QT_VERSION<0x040000 +# if [[[TQT_VERSION IS DEPRECATED]]]<0x040000 _d->_settings.writeEntry(key, value); # else _d->_settings.setValue(key, value); @@ -210,7 +210,7 @@ void GenericConfig::writeEntry(const QString &key, int value) #endif } -void GenericConfig::deleteGroup(const QString &group) +void GenericConfig::deleteGroup(const TQString &group) { #if defined(NO_KDE) Q_UNUSED(group); @@ -220,22 +220,22 @@ void GenericConfig::deleteGroup(const QString &group) #endif } -QVariant GenericConfig::readVariantEntry(const QString &key, const QVariant &defValue) const +TQVariant GenericConfig::readVariantEntry(const TQString &key, const TQVariant &defValue) const { switch (defValue.type()) { - case QVariant::Bool: return QVariant(readBoolEntry(key, defValue.toBool()), 0); - case QVariant::UInt: return readUIntEntry(key, defValue.toUInt()); + case TQVariant::Bool: return TQVariant(readBoolEntry(key, defValue.toBool()), 0); + case TQVariant::UInt: return readUIntEntry(key, defValue.toUInt()); default: break; } Q_ASSERT(false); - return QVariant(); + return TQVariant(); } -void GenericConfig::writeEntry(const QString &key, const QVariant &v) +void GenericConfig::writeEntry(const TQString &key, const TQVariant &v) { switch (v.type()) { - case QVariant::Bool: writeEntry(key, v.toBool()); break; - case QVariant::UInt: writeEntry(key, v.toUInt()); break; + case TQVariant::Bool: writeEntry(key, v.toBool()); break; + case TQVariant::UInt: writeEntry(key, v.toUInt()); break; default: Q_ASSERT(false); break; } } diff --git a/src/common/global/generic_config.h b/src/common/global/generic_config.h index 70dfeaa..74002e5 100644 --- a/src/common/global/generic_config.h +++ b/src/common/global/generic_config.h @@ -9,8 +9,8 @@ #ifndef GENERIC_CONFIG_H #define GENERIC_CONFIG_H -#include -#include +#include +#include #include "global.h" #include "common/common/misc.h" @@ -20,50 +20,50 @@ class GenericConfigPrivate; class GenericConfig { public: - GenericConfig(const QString &group); + GenericConfig(const TQString &group); ~GenericConfig(); - QString group() const { return _group; } + TQString group() const { return _group; } void rollback(); - QString readEntry(const QString &key, const QString &def = QString::null) const; - void writeEntry(const QString &key, const QString &value); - void writeEntry(const QString &key, const QCString &value) { writeEntry(key, QString(value)); } - void writeEntry(const QString &key, const char *value) { writeEntry(key, QString(value)); } - QStringList readListEntry(const QString &key, const QStringList &defaultValues) const; - void writeEntry(const QString &key, const QStringList &value); - QValueList readIntListEntry(const QString &key) const; - void writeEntry(const QString &key, const QValueList &value); - QSize readSizeEntry(const QString &key, const QSize *def = 0) const; - void writeEntry(const QString &key, const QSize &value); - bool readBoolEntry(const QString &key, bool def) const; - void writeEntry(const QString &key, bool value); - int readIntEntry(const QString &key, int def = 0) const; - void writeEntry(const QString &key, int value); - uint readUIntEntry(const QString &key, uint def = 0) const { return qMax(0, readIntEntry(key, def)); } - void writeEntry(const QString &key, uint value) { writeEntry(key, int(value)); } + TQString readEntry(const TQString &key, const TQString &def = TQString()) const; + void writeEntry(const TQString &key, const TQString &value); + void writeEntry(const TQString &key, const TQCString &value) { writeEntry(key, TQString(value)); } + void writeEntry(const TQString &key, const char *value) { writeEntry(key, TQString(value)); } + TQStringList readListEntry(const TQString &key, const TQStringList &defaultValues) const; + void writeEntry(const TQString &key, const TQStringList &value); + TQValueList readIntListEntry(const TQString &key) const; + void writeEntry(const TQString &key, const TQValueList &value); + TQSize readSizeEntry(const TQString &key, const TQSize *def = 0) const; + void writeEntry(const TQString &key, const TQSize &value); + bool readBoolEntry(const TQString &key, bool def) const; + void writeEntry(const TQString &key, bool value); + int readIntEntry(const TQString &key, int def = 0) const; + void writeEntry(const TQString &key, int value); + uint readUIntEntry(const TQString &key, uint def = 0) const { return qMax(0, readIntEntry(key, def)); } + void writeEntry(const TQString &key, uint value) { writeEntry(key, int(value)); } template - Enum readEnumEntry(const QString &key, Enum def = Enum::Nb_Types) const { return Enum::fromKey(readEntry(key, def.key())); } + Enum readEnumEntry(const TQString &key, Enum def = Enum::Nb_Types) const { return Enum::fromKey(readEntry(key, def.key())); } template - void writeEnumEntry(const QString &key, Enum v) { writeEntry(key, v.key()); } - QVariant readVariantEntry(const QString &key, const QVariant &defValue) const; - void writeEntry(const QString &key, const QVariant &value); + void writeEnumEntry(const TQString &key, Enum v) { writeEntry(key, v.key()); } + TQVariant readVariantEntry(const TQString &key, const TQVariant &defValue) const; + void writeEntry(const TQString &key, const TQVariant &value); - static void deleteGroup(const QString &group); + static void deleteGroup(const TQString &group); struct ItemData { const char *key, *label; - QVariant defValue; + TQVariant defValue; }; template - QVariant readVariantEntry(Type type) const { return readVariantEntry(type.data().key, type.data().defValue); } + TQVariant readVariantEntry(Type type) const { return readVariantEntry(type.data().key, type.data().defValue); } template - void writeVariantEntry(Type type, const QVariant &value) { + void writeVariantEntry(Type type, const TQVariant &value) { Q_ASSERT( value.type()==type.data().defValue.type() ); writeEntry(type.data().key, value); } private: - QString _group; + TQString _group; GenericConfigPrivate *_d; }; @@ -72,11 +72,11 @@ private: #define END_DECLARE_CONFIG(Type, group) \ END_DECLARE_ENUM(Type, GenericConfig::ItemData) \ - inline QVariant readConfigEntry(Type type) { \ + inline TQVariant readConfigEntry(Type type) { \ GenericConfig config(group); \ return config.readVariantEntry(type); \ } \ - inline void writeConfigEntry(Type type, const QVariant &v) { \ + inline void writeConfigEntry(Type type, const TQVariant &v) { \ GenericConfig config(group); \ config.writeVariantEntry(type, v); \ } diff --git a/src/common/global/global.h b/src/common/global/global.h index 72dab0e..9eb8979 100644 --- a/src/common/global/global.h +++ b/src/common/global/global.h @@ -9,37 +9,21 @@ #ifndef GLOBAL_H #define GLOBAL_H -#include +#include -#if QT_VERSION<0x040000 -# include -# include -# include -# include +# include +# include +# include +# include # include "common/common/qflags.h" -# define qMax QMAX -# define qMin QMIN -# include -# define Q3Url QUrl -# include -#else -# include -# include -# define QValueList Q3ValueList -# include -# define QValueVector Q3ValueVector -# include -# define QMemArray Q3MemArray -# define qHeapSort qSort -# include -# include -# define QMimeSourceFactory Q3MimeSourceFactory -# include -# define QGuardedPtr QPointer -#endif +# define qMax TQMAX +# define qMin TQMIN +# include +# define Q3Url TQUrl +# include #if defined(NO_KDE) -# include "qt_config.h" +# include "tqt_config.h" # include "common/nokde/nokde_kurl.h" # include "common/nokde/nokde_klocale.h" # include "common/nokde/nokde_kaboutdata.h" diff --git a/src/common/global/log.cpp b/src/common/global/log.cpp index cf85303..1ab42d0 100644 --- a/src/common/global/log.cpp +++ b/src/common/global/log.cpp @@ -8,7 +8,7 @@ ***************************************************************************/ #include "log.h" -#include +#include #include "global.h" //----------------------------------------------------------------------------- @@ -41,12 +41,12 @@ void Log::View::setDebugLevel(DebugLevel level) _debugLevel = level; } -void Log::View::log(LineType type, const QString &text, Action action) +void Log::View::log(LineType type, const TQString &text, Action action) { if ( _modes[type.type()]==Show ) doLog(type, text, action); } -void Log::View::log(DebugLevel level, const QString &text, Action action) +void Log::View::log(DebugLevel level, const TQString &text, Action action) { Q_ASSERT( level!=DebugLevel::Quiet ); updateDebugLevel(); @@ -59,30 +59,30 @@ void Log::View::logUserAbort() } //----------------------------------------------------------------------------- -void Log::StringView::sorry(const QString &message, const QString &details) +void Log::StringView::sorry(const TQString &message, const TQString &details) { if ( details.isEmpty() ) _s += message; else _s += message + ": " + details; } -bool Log::StringView::askContinue(const QString &message) +bool Log::StringView::askContinue(const TQString &message) { log(LineType::Warning, message, Immediate); return false; // always fail } //----------------------------------------------------------------------------- -Log::Base::Base(Base *parent) +Log::Base::Base(Base *tqparent) : _parent(0), _data(0) { - setParent(parent); + setParent(tqparent); } -void Log::Base::setParent(Base *parent) +void Log::Base::setParent(Base *tqparent) { delete _data; - _parent = parent; - _data = (parent ? 0 : new LogData); + _parent = tqparent; + _data = (tqparent ? 0 : new LogData); } Log::Base::~Base() @@ -101,28 +101,28 @@ void Log::Base::logUserAbort() if ( view() ) view()->logUserAbort(); } -void Log::Base::log(LineType type, const QString &message, Action action) +void Log::Base::log(LineType type, const TQString &message, Action action) { if ( type==LineType::Error ) setError(message); if ( view() ) view()->log(type, message, action); } -void Log::Base::log(DebugLevel level, const QString &message, Action action) +void Log::Base::log(DebugLevel level, const TQString &message, Action action) { if ( view() ) view()->log(level, message, action); } -void Log::Base::appendToLastLine(const QString &text) +void Log::Base::appendToLastLine(const TQString &text) { if ( view() ) view()->appendToLastLine(text); } -void Log::Base::sorry(const QString &message, const QString &details) +void Log::Base::sorry(const TQString &message, const TQString &details) { if ( view() ) view()->sorry(message, details); } -bool Log::Base::askContinue(const QString &message) +bool Log::Base::askContinue(const TQString &message) { if ( view()==0 ) return false; return view()->askContinue(message); @@ -135,9 +135,9 @@ void Log::Base::clear() } //----------------------------------------------------------------------------- -QString Log::KeyList::text() const +TQString Log::KeyList::text() const { - QString text; + TQString text; if ( !_title.isEmpty() ) text += _title + "\n"; uint nb = 0; for (uint i=0; i +#include #include "common/common/key_enum.h" @@ -34,11 +34,11 @@ class Generic { public: virtual ~Generic() {} - virtual void log(LineType type, const QString &text, Action action = Immediate) = 0; - virtual void log(DebugLevel level, const QString &text, Action action = Immediate) = 0; - virtual void appendToLastLine(const QString &text) = 0; - virtual void sorry(const QString &message, const QString &details) = 0; - virtual bool askContinue(const QString &message) = 0; + virtual void log(LineType type, const TQString &text, Action action = Immediate) = 0; + virtual void log(DebugLevel level, const TQString &text, Action action = Immediate) = 0; + virtual void appendToLastLine(const TQString &text) = 0; + virtual void sorry(const TQString &message, const TQString &details) = 0; + virtual bool askContinue(const TQString &message) = 0; virtual void clear() = 0; virtual void logUserAbort() = 0; }; @@ -50,8 +50,8 @@ public: ShowMode showMode(LineType type) const { return _modes[type.type()]; } void setShowMode(LineType type, ShowMode mode) { _modes[type.type()] = mode; } void setDebugLevel(DebugLevel level); - virtual void log(LineType type, const QString &text, Action action = Immediate); - virtual void log(DebugLevel level, const QString &text, Action action = Immediate); + virtual void log(LineType type, const TQString &text, Action action = Immediate); + virtual void log(DebugLevel level, const TQString &text, Action action = Immediate); virtual void logUserAbort(); protected: @@ -59,8 +59,8 @@ protected: DebugLevel _debugLevel; virtual void updateDebugLevel() {} - virtual void doLog(LineType type, const QString &text, Action action) = 0; - virtual void doLog(DebugLevel level, const QString &text, Action action) = 0; + virtual void doLog(LineType type, const TQString &text, Action action) = 0; + virtual void doLog(DebugLevel level, const TQString &text, Action action) = 0; }; //----------------------------------------------------------------------------- @@ -68,38 +68,38 @@ class StringView : public View { public: StringView() {} - QString string() const { return _s; } - virtual void appendToLastLine(const QString &text) { _s += text; } - virtual void clear() { _s = QString::null; } - virtual void sorry(const QString &message, const QString &details); - virtual bool askContinue(const QString &message); + TQString string() const { return _s; } + virtual void appendToLastLine(const TQString &text) { _s += text; } + virtual void clear() { _s = TQString(); } + virtual void sorry(const TQString &message, const TQString &details); + virtual bool askContinue(const TQString &message); private: - QString _s; + TQString _s; - virtual void doLog(LineType, const QString &text, Action) { _s += text + "\n"; } - virtual void doLog(DebugLevel, const QString &text, Action) { _s += text + "\n"; } + virtual void doLog(LineType, const TQString &text, Action) { _s += text + "\n"; } + virtual void doLog(DebugLevel, const TQString &text, Action) { _s += text + "\n"; } }; //----------------------------------------------------------------------------- class Base : public Generic { public: - Base(Base *parent = 0); + Base(Base *tqparent = 0); virtual ~Base(); - void setParent(Base *parent); + void setParent(Base *tqparent); void setView(View *view); View *view() { return logData()->view; } - virtual void log(LineType type, const QString &message, Action action = Immediate); - virtual void log(DebugLevel level, const QString &message, Action action = Immediate); - virtual void appendToLastLine(const QString &text); - void setError(const QString &error) { logData()->error = error; } + virtual void log(LineType type, const TQString &message, Action action = Immediate); + virtual void log(DebugLevel level, const TQString &message, Action action = Immediate); + virtual void appendToLastLine(const TQString &text); + void setError(const TQString &error) { logData()->error = error; } virtual bool hasError() const { return !logData()->error.isNull(); } - virtual QString error() const { return logData()->error; } - virtual void resetError() { logData()->error = QString::null; } - virtual void sorry(const QString &message, const QString &details = QString::null); - virtual bool askContinue(const QString &message); + virtual TQString error() const { return logData()->error; } + virtual void resetError() { logData()->error = TQString(); } + virtual void sorry(const TQString &message, const TQString &details = TQString()); + virtual bool askContinue(const TQString &message); virtual void clear(); void logUserAbort(); @@ -108,7 +108,7 @@ protected: class LogData { public: LogData() : view(0) {} - QString error; + TQString error; View *view; }; LogData *_data; @@ -118,15 +118,15 @@ protected: class KeyList { public: - KeyList(const QString &title = QString::null) : _title(title) {} - void setTitle(const QString &title) { _title = title; } - void append(const QString &key, const QString &label) { _keys += key; _labels += label; } - QString text() const; + KeyList(const TQString &title = TQString()) : _title(title) {} + void setTitle(const TQString &title) { _title = title; } + void append(const TQString &key, const TQString &label) { _keys += key; _labels += label; } + TQString text() const; void display(Generic &log) const; private: - QString _title; - QStringList _keys, _labels; + TQString _title; + TQStringList _keys, _labels; }; } // namespace diff --git a/src/common/global/pfile.cpp b/src/common/global/pfile.cpp index 71cee16..66d7f4b 100644 --- a/src/common/global/pfile.cpp +++ b/src/common/global/pfile.cpp @@ -8,10 +8,10 @@ ***************************************************************************/ #include "pfile.h" -#include +#include //----------------------------------------------------------------------------- -PURL::FileBase::FileBase(Log::Generic &log, const QString &extension) +PURL::FileBase::FileBase(Log::Generic &log, const TQString &extension) : _tmp(0), _file(0), _stream(0), _extension(extension), _log(log) {} @@ -22,12 +22,12 @@ PURL::FileBase::~FileBase() delete _tmp; } -const QFile *PURL::FileBase::qfile() const +const TQFile *PURL::FileBase::qfile() const { return (_tmp ? _tmp->file() : _file); } -QFile *PURL::FileBase::qfile() +TQFile *PURL::FileBase::qfile() { return (_tmp ? _tmp->file() : _file); } @@ -37,9 +37,9 @@ void PURL::FileBase::flush() if ( qfile() ) qfile()->flush(); } -QTextStream &PURL::FileBase::stream() +TQTextStream &PURL::FileBase::stream() { - if ( _stream==0 ) _stream = new QTextStream(qfile()); + if ( _stream==0 ) _stream = new TQTextStream(qfile()); return *_stream; } @@ -49,7 +49,7 @@ bool PURL::FileBase::hasError() const return ( uint(qfile()->status())!=IO_Ok ); } -QString PURL::FileBase::errorString() const +TQString PURL::FileBase::errorString() const { if ( _error.isEmpty() ) { if ( qfile()==0 ) return i18n("File not open."); @@ -58,28 +58,28 @@ QString PURL::FileBase::errorString() const return _error; } -QStringList PURL::FileBase::readLines() +TQStringList PURL::FileBase::readLines() { - QStringList lines; + TQStringList lines; for (;;) { - QString s = stream().readLine(); + TQString s = stream().readLine(); if ( s.isNull() ) break; lines.append(s); } return lines; } -QByteArray PURL::FileBase::readAll() +TQByteArray PURL::FileBase::readAll() { if ( qfile() ) return qfile()->readAll(); - return QByteArray(); + return TQByteArray(); } //----------------------------------------------------------------------------- PURL::File::File(const Url &url, Log::Generic &log) - : FileBase(log, QString::null), _url(url) + : FileBase(log, TQString()), _url(url) { - _file = new QFile; + _file = new TQFile; } void PURL::File::setUrl(const Url &url) diff --git a/src/common/global/pfile.h b/src/common/global/pfile.h index d0955e7..477d7c0 100644 --- a/src/common/global/pfile.h +++ b/src/common/global/pfile.h @@ -9,7 +9,7 @@ #ifndef PFILE_H #define PFILE_H -#include +#include #include "purl.h" namespace PURL @@ -18,25 +18,25 @@ namespace PURL class FileBase { public: - FileBase(Log::Generic &log, const QString &extension); + FileBase(Log::Generic &log, const TQString &extension); ~FileBase(); - QFile *qfile(); - const QFile *qfile() const; - QTextStream &stream(); - QString readText() { return stream().read(); } - QString readLine() { return stream().readLine(); } - QStringList readLines(); - QByteArray readAll(); - void appendText(const QString &text) { stream() << text; } + TQFile *qfile(); + const TQFile *qfile() const; + TQTextStream &stream(); + TQString readText() { return stream().read(); } + TQString readLine() { return stream().readLine(); } + TQStringList readLines(); + TQByteArray readAll(); + void appendText(const TQString &text) { stream() << text; } void flush(); bool hasError() const; - QString errorString() const; + TQString errorString() const; protected: KTempFile *_tmp; - QFile *_file; - QTextStream *_stream; - QString _error, _extension; + TQFile *_file; + TQTextStream *_stream; + TQString _error, _extension; Log::Generic &_log; private: // disable copy constructor and operator = diff --git a/src/common/global/process.cpp b/src/common/global/process.cpp index 7659eea..1efe715 100644 --- a/src/common/global/process.cpp +++ b/src/common/global/process.cpp @@ -8,7 +8,7 @@ ***************************************************************************/ #include "process.h" -#include +#include #if defined(NO_KDE) # include "common/nokde/nokde_kprocess.h" @@ -22,8 +22,8 @@ Process::State Process::runSynchronously(Base &process, RunActions actions, uint timeout) { Synchronous sync(timeout); - QObject::connect(&process, SIGNAL(done(int)), &sync, SLOT(done())); - QObject::connect(&process, SIGNAL(requestSynchronousStop()), &sync, SLOT(done())); + TQObject::connect(&process, TQT_SIGNAL(done(int)), &sync, TQT_SLOT(done())); + TQObject::connect(&process, TQT_SIGNAL(requestSynchronousStop()), &sync, TQT_SLOT(done())); if ( (actions & Start) && !process.start(0) ) return process.state(); Q_ASSERT( process.isRunning() ); if ( !sync.enterLoop() ) process.timeoutSlot(); @@ -31,15 +31,15 @@ Process::State Process::runSynchronously(Base &process, RunActions actions, uint } //---------------------------------------------------------------------------- -Process::Base::Base(QObject *parent, const char *name) - : QObject(parent, name), _state(Stopped) +Process::Base::Base(TQObject *tqparent, const char *name) + : TQObject(tqparent, name), _state(Stopped) { _process = new KProcess(this); - connect(_process, SIGNAL(processExited(KProcess *)), SLOT(exited())); - connect(_process, SIGNAL(receivedStdout(KProcess *, char *, int)), SLOT(receivedStdout(KProcess*, char *, int))); - connect(_process, SIGNAL(receivedStderr(KProcess *, char *, int)), SLOT(receivedStderr(KProcess*, char *, int))); - _timer = new QTimer(this); - connect(_timer, SIGNAL(timeout()), SLOT(timeoutSlot())); + connect(_process, TQT_SIGNAL(processExited(KProcess *)), TQT_SLOT(exited())); + connect(_process, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), TQT_SLOT(receivedStdout(KProcess*, char *, int))); + connect(_process, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), TQT_SLOT(receivedStderr(KProcess*, char *, int))); + _timer = new TQTimer(this); + connect(_timer, TQT_SIGNAL(timeout()), TQT_SLOT(timeoutSlot())); } Process::Base::~Base() @@ -47,27 +47,27 @@ Process::Base::~Base() _process->kill(); } -QStringList Process::Base::arguments() const +TQStringList Process::Base::arguments() const { - if ( _process==0 ) return QStringList(); + if ( _process==0 ) return TQStringList(); #if defined(NO_KDE) return _process->args(); #else - QStringList list; - const QValueList &args = _process->args(); + TQStringList list; + const TQValueList &args = _process->args(); for (uint i=0; istop(); _process->clearArguments(); if (withWine) { _process->setEnvironment("WINEDEBUG", "-all"); - *_process << QString("wine"); + *_process << TQString("wine"); } *_process << executable; *_process << options; @@ -77,8 +77,8 @@ bool Process::Base::start(uint timeout) { _state = Stopped; _timer->stop(); - _stdout = QString::null; - _stderr = QString::null; + _stdout = TQString(); + _stderr = TQString(); #if defined(NO_KDE) if ( !_process->start() ) { #else @@ -116,9 +116,9 @@ bool Process::Base::isRunning() const return _process->isRunning(); } -void Process::Base::writeToStdin(const QString &s) +void Process::Base::writeToStdin(const TQString &s) { - QCString cs = s.latin1(); + TQCString cs = s.latin1(); _process->writeStdin(cs.data(), cs.length()); } @@ -137,7 +137,7 @@ void Process::Base::setUseShell(bool useShell) _process->setUseShell(useShell); } -bool Process::Base::isFilteredLine(const QString &line) +bool Process::Base::isFilteredLine(const TQString &line) { // "wine" returns all those "libGL warning" that mess up the output... return line.startsWith("libGL warning"); @@ -146,13 +146,13 @@ bool Process::Base::isFilteredLine(const QString &line) //---------------------------------------------------------------------------- void Process::StringOutput::receivedStdout(KProcess*, char *data, int len) { - _stdout += QString::fromLatin1(data, len); + _stdout += TQString::tqfromLatin1(data, len); emit stdoutDataReceived(); } void Process::StringOutput::receivedStderr(KProcess*, char *data, int len) { - _stderr += QString::fromLatin1(data, len); + _stderr += TQString::tqfromLatin1(data, len); emit stderrDataReceived(); } @@ -163,8 +163,8 @@ void Process::LineBase::receivedStdout(KProcess*, char *data, int len) if ( data[i]=='\r' ) continue; if ( data[i]=='\n' ) { if ( !isFilteredLine(_stdout) ) addStdoutLine(_stdout); - _stdout = QString::null; - } else _stdout += QString::fromLatin1(data + i, 1); + _stdout = TQString(); + } else _stdout += TQString::tqfromLatin1(data + i, 1); } if ( !_process->isRunning() && !isFilteredLine(_stdout) ) addStdoutLine(_stdout); emit stdoutDataReceived(); @@ -176,8 +176,8 @@ void Process::LineBase::receivedStderr(KProcess*, char *data, int len) if ( data[i]=='\r' ) continue; if ( data[i]=='\n' ) { if ( !isFilteredLine(_stderr) ) addStderrLine(_stderr); - _stderr = QString::null; - } else _stderr += QString::fromLatin1(data + i, 1); + _stderr = TQString(); + } else _stderr += TQString::tqfromLatin1(data + i, 1); } if ( !_process->isRunning() && !isFilteredLine(_stderr) ) addStderrLine(_stderr); emit stderrDataReceived(); diff --git a/src/common/global/process.h b/src/common/global/process.h index 9c67149..d4e7db0 100644 --- a/src/common/global/process.h +++ b/src/common/global/process.h @@ -10,9 +10,9 @@ #define PROCESS_H #include -#include -#include -#include +#include +#include +#include class KProcess; #include "global.h" @@ -23,24 +23,25 @@ namespace Process enum State { Stopped, StartFailed, Running, Exited, Timedout }; class Base; enum RunAction { NoRunAction = 0, Start = 1 }; -Q_DECLARE_FLAGS(RunActions, RunAction) -Q_DECLARE_OPERATORS_FOR_FLAGS(RunActions) +TQ_DECLARE_FLAGS(RunActions, RunAction) +TQ_DECLARE_OPERATORS_FOR_FLAGS(RunActions) extern State runSynchronously(Base &process, RunActions actions, uint timeout); // in ms (0 == no timeout) //---------------------------------------------------------------------------- -class Base : public QObject +class Base : public TQObject { Q_OBJECT + TQ_OBJECT public: - Base(QObject *parent, const char *name); + Base(TQObject *tqparent, const char *name); virtual ~Base(); - void setup(const QString &executable, const QStringList &options, bool withWine); - QStringList arguments() const; + void setup(const TQString &executable, const TQStringList &options, bool withWine); + TQStringList arguments() const; void setWorkingDirectory(const PURL::Directory &dir); void setUseShell(bool useShell); virtual bool start(uint timeout); // in ms (0 == no timeout) - QString prettyCommand() const { return arguments().join(" "); } - void writeToStdin(const QString &s); + TQString prettyCommand() const { return arguments().join(" "); } + void writeToStdin(const TQString &s); bool signal(int n); bool isRunning() const; State state() const { return _state; } @@ -64,20 +65,21 @@ protected slots: protected: State _state; KProcess *_process; - QTimer *_timer; - QString _stdout, _stderr; + TQTimer *_timer; + TQString _stdout, _stderr; - static bool isFilteredLine(const QString &line); + static bool isFilteredLine(const TQString &line); }; //---------------------------------------------------------------------------- class StringOutput : public Base { Q_OBJECT + TQ_OBJECT public: - StringOutput(QObject *parent = 0, const char *name = 0) : Base(parent, name) {} - QString sout() const { return _stdout; } - QString serr() const { return _stderr; } + StringOutput(TQObject *tqparent = 0, const char *name = 0) : Base(tqparent, name) {} + TQString sout() const { return _stdout; } + TQString serr() const { return _stderr; } private slots: virtual void receivedStdout(KProcess *, char *buffer, int len); @@ -88,49 +90,52 @@ private slots: class LineBase : public Base { Q_OBJECT + TQ_OBJECT public: - LineBase(QObject *parent = 0, const char *name = 0) : Base(parent, name) {} + LineBase(TQObject *tqparent = 0, const char *name = 0) : Base(tqparent, name) {} private slots: virtual void receivedStdout(KProcess *, char *buffer, int len); virtual void receivedStderr(KProcess *, char *buffer, int len); private: - virtual void addStdoutLine(const QString &line) = 0; - virtual void addStderrLine(const QString &line) = 0; + virtual void addStdoutLine(const TQString &line) = 0; + virtual void addStderrLine(const TQString &line) = 0; }; //---------------------------------------------------------------------------- class LineOutput : public LineBase { Q_OBJECT + TQ_OBJECT public: - LineOutput(QObject *parent = 0, const char *name = 0) : LineBase(parent, name) {} + LineOutput(TQObject *tqparent = 0, const char *name = 0) : LineBase(tqparent, name) {} virtual bool start(uint timeout); - QStringList sout() const { return _stdoutLines; } - QStringList serr() const { return _stderrLines; } + TQStringList sout() const { return _stdoutLines; } + TQStringList serr() const { return _stderrLines; } protected: - QStringList _stdoutLines, _stderrLines; + TQStringList _stdoutLines, _stderrLines; - virtual void addStdoutLine(const QString &line) { _stdoutLines += line; } - virtual void addStderrLine(const QString &line) { _stderrLines += line; } + virtual void addStdoutLine(const TQString &line) { _stdoutLines += line; } + virtual void addStderrLine(const TQString &line) { _stderrLines += line; } }; //---------------------------------------------------------------------------- class LineSignal : public LineBase { Q_OBJECT + TQ_OBJECT public: - LineSignal(QObject *parent = 0, const char *name = 0) : LineBase(parent, name) {} + LineSignal(TQObject *tqparent = 0, const char *name = 0) : LineBase(tqparent, name) {} signals: - void logStdoutLine(const QString &line); - void logStderrLine(const QString &line); + void logStdoutLine(const TQString &line); + void logStderrLine(const TQString &line); private: - virtual void addStdoutLine(const QString &line) { emit logStdoutLine(line); } - virtual void addStderrLine(const QString &line) { emit logStderrLine(line); } + virtual void addStdoutLine(const TQString &line) { emit logStdoutLine(line); } + virtual void addStderrLine(const TQString &line) { emit logStderrLine(line); } }; } // namespace diff --git a/src/common/global/progress_monitor.cpp b/src/common/global/progress_monitor.cpp index fcd0cec..f86d236 100644 --- a/src/common/global/progress_monitor.cpp +++ b/src/common/global/progress_monitor.cpp @@ -8,8 +8,8 @@ ***************************************************************************/ #include "progress_monitor.h" -ProgressMonitor::ProgressMonitor(QObject* parent) - : QObject(parent, "progress_monitor") +ProgressMonitor::ProgressMonitor(TQObject* tqparent) + : TQObject(tqparent, "progress_monitor") { _current = _tasks.end(); } @@ -21,7 +21,7 @@ void ProgressMonitor::clear() emit showProgress(false); } -void ProgressMonitor::appendTask(const QString &label, uint nbSteps) +void ProgressMonitor::appendTask(const TQString &label, uint nbSteps) { Task task; task.label = label; @@ -30,7 +30,7 @@ void ProgressMonitor::appendTask(const QString &label, uint nbSteps) _tasks.append(task); } -void ProgressMonitor::insertTask(const QString &label, uint nbSteps) +void ProgressMonitor::insertTask(const TQString &label, uint nbSteps) { Task task; task.label = label; @@ -57,7 +57,7 @@ uint ProgressMonitor::nbDoneSteps() const void ProgressMonitor::update() { - QString label = (_current==_tasks.end() ? QString::null : (*_current).label); + TQString label = (_current==_tasks.end() ? TQString() : (*_current).label); emit setLabel(label); emit setTotalProgress(nbSteps()); emit setProgress(nbDoneSteps()); @@ -79,6 +79,6 @@ void ProgressMonitor::addTaskProgress(uint nbSteps) uint nb = (*_current).nbDoneSteps + nbSteps; Q_ASSERT( nb<=(*_current).nbSteps ); if ( nb>(*_current).nbSteps ) qDebug("%s %i+%i > %i", (*_current).label.latin1(), (*_current).nbDoneSteps, nbSteps, (*_current).nbSteps); - (*_current).nbDoneSteps = QMIN(nb, (*_current).nbSteps); + (*_current).nbDoneSteps = TQMIN(nb, (*_current).nbSteps); update(); } diff --git a/src/common/global/progress_monitor.h b/src/common/global/progress_monitor.h index bb905f7..1cff202 100644 --- a/src/common/global/progress_monitor.h +++ b/src/common/global/progress_monitor.h @@ -11,14 +11,15 @@ #include "global.h" -class ProgressMonitor : public QObject +class ProgressMonitor : public TQObject { Q_OBJECT + TQ_OBJECT public: - ProgressMonitor(QObject *parent = 0); + ProgressMonitor(TQObject *tqparent = 0); void clear(); - void appendTask(const QString &label, uint nbSteps); - void insertTask(const QString &label, uint nbSteps); + void appendTask(const TQString &label, uint nbSteps); + void insertTask(const TQString &label, uint nbSteps); void startNextTask(); void addTaskProgress(uint nbSteps); uint nbSteps() const; @@ -29,18 +30,18 @@ public slots: signals: void showProgress(bool show); - void setLabel(const QString &label); + void setLabel(const TQString &label); void setTotalProgress(uint nbSteps); void setProgress(uint nbSteps); private: class Task { public: - QString label; + TQString label; uint nbSteps, nbDoneSteps; }; - QValueList _tasks; - QValueList::iterator _current; + TQValueList _tasks; + TQValueList::iterator _current; }; #endif diff --git a/src/common/global/purl.cpp b/src/common/global/purl.cpp index 6db2914..aeae543 100644 --- a/src/common/global/purl.cpp +++ b/src/common/global/purl.cpp @@ -8,14 +8,12 @@ ***************************************************************************/ #include "purl.h" -#include -#include -#include -#include -#include -#if QT_VERSION<0x040000 -# include -#endif +#include +#include +#include +#include +#include +# include #include "common/common/synchronous.h" #include "process.h" @@ -27,38 +25,38 @@ #endif //----------------------------------------------------------------------------- -PURL::Http::Http(const QString &hostname) - : QHttp(hostname) +PURL::Http::Http(const TQString &hostname) + : TQHttp(hostname) { - connect(this, SIGNAL(responseHeaderReceived(const QHttpResponseHeader &)), - SLOT(responseHeaderReceivedSlot(const QHttpResponseHeader &))); + connect(this, TQT_SIGNAL(responseHeaderReceived(const TQHttpResponseHeader &)), + TQT_SLOT(responseHeaderReceivedSlot(const TQHttpResponseHeader &))); } //----------------------------------------------------------------------------- class PURL::Private { public: - QString convertWindowsFilepath(const QString &filepath); + TQString convertWindowsFilepath(const TQString &filepath); private: - QMap _winDrives; // drive -> unix path - QMap _winPaths; // windows path -> unix path - - QString getWindowsDrivePath(char drive); - bool checkCachedPath(QString &filepath) const; - QString cachePath(const QString &origin, const QString &filepath); - QString convertWindowsShortFilepath(const QString &filepath); - QString findName(const QString &path, const QString &name); - static QString findName(const QString &filepath); + TQMap _winDrives; // drive -> unix path + TQMap _winPaths; // windows path -> unix path + + TQString getWindowsDrivePath(char drive); + bool checkCachedPath(TQString &filepath) const; + TQString cachePath(const TQString &origin, const TQString &filepath); + TQString convertWindowsShortFilepath(const TQString &filepath); + TQString findName(const TQString &path, const TQString &name); + static TQString findName(const TQString &filepath); }; -QString PURL::Private::getWindowsDrivePath(char drive) +TQString PURL::Private::getWindowsDrivePath(char drive) { #if defined(Q_OS_UNIX) - if ( !_winDrives.contains(drive) ) { - QStringList args; + if ( !_winDrives.tqcontains(drive) ) { + TQStringList args; args += "-u"; - QString s; + TQString s; s += drive; args += s + ":\\"; ::Process::StringOutput process; @@ -66,71 +64,67 @@ QString PURL::Private::getWindowsDrivePath(char drive) ::Process::State state = ::Process::runSynchronously(process, ::Process::Start, 3000); if ( state!=::Process::Exited ) qWarning("Error running \"winepath\" with \"%s\" (%i)", args.join(" ").latin1(), state); s = process.sout() + process.serr(); - QDir dir(s.stripWhiteSpace()); + TQDir dir(s.stripWhiteSpace()); _winDrives[drive] = dir.canonicalPath(); } return _winDrives[drive]; #else - return QString("%1:\\").arg(drive); + return TQString("%1:\\").tqarg(drive); #endif } -bool PURL::Private::checkCachedPath(QString &filepath) const +bool PURL::Private::checkCachedPath(TQString &filepath) const { - if ( !_winPaths.contains(filepath) ) return false; + if ( !_winPaths.tqcontains(filepath) ) return false; filepath = _winPaths[filepath]; return true; } -QString PURL::Private::cachePath(const QString &origin, const QString &filepath) +TQString PURL::Private::cachePath(const TQString &origin, const TQString &filepath) { _winPaths[origin] = filepath; return filepath; } -QString PURL::Private::convertWindowsFilepath(const QString &filepath) +TQString PURL::Private::convertWindowsFilepath(const TQString &filepath) { // appears to be an absolute windows path if ( filepath[0]=='\\' ) { - QString tmp = filepath; + TQString tmp = filepath; if ( checkCachedPath(tmp) ) return tmp; - return cachePath(filepath, convertWindowsShortFilepath(tmp.replace('\\', "/"))); + return cachePath(filepath, convertWindowsShortFilepath(tmp.tqreplace('\\', "/"))); } // appears to be a windows path with a drive if ( (filepath.length()>=2 && filepath[0].isLetter() && filepath[1]==':') ) { - QString tmp = filepath; + TQString tmp = filepath; if ( checkCachedPath(tmp) ) return tmp; -#if QT_VERSION<0x040000 - tmp = getWindowsDrivePath(filepath[0]) + tmp.mid(2).replace('\\', "/"); -#else - tmp = getWindowsDrivePath(filepath[0].toLatin1()) + tmp.mid(2).replace('\\', "/"); -#endif + tmp = getWindowsDrivePath(filepath[0]) + tmp.mid(2).tqreplace('\\', "/"); return cachePath(filepath, convertWindowsShortFilepath(tmp)); } return filepath; } -QString PURL::Private::findName(const QString &path, const QString &name) +TQString PURL::Private::findName(const TQString &path, const TQString &name) { - QString filepath = path + '/' + name; + TQString filepath = path + '/' + name; if ( checkCachedPath(filepath) ) return filepath; return cachePath(filepath, findName(filepath)); } -QString PURL::Private::findName(const QString &filepath) +TQString PURL::Private::findName(const TQString &filepath) { - QFileInfo finfo(filepath); + TQFileInfo finfo(filepath); if ( finfo.exists() || !finfo.dir().exists() ) return finfo.filePath(); - QStringList list = finfo.dir().entryList(QDir::All, QDir::Name); + TQStringList list = finfo.dir().entryList(TQDir::All, TQDir::Name); // find if name is just in a different case for (uint j=0; jconvertWindowsFilepath(filepath); + TQString tmp = _private->convertWindowsFilepath(filepath); #else - QString tmp = filepath; + TQString tmp = filepath; #endif - if ( tmp.startsWith("~") ) tmp = QDir::homeDirPath() + tmp.mid(1); + if ( tmp.startsWith("~") ) tmp = TQDir::homeDirPath() + tmp.mid(1); _relative = Q3Url::isRelativeUrl(tmp); #if defined(Q_OS_UNIX) if ( !tmp.startsWith("/") ) tmp = '/' + tmp; @@ -203,13 +197,13 @@ bool PURL::Base::operator ==(const Base &url) const return _url==url._url; } -QString PURL::Base::path(SeparatorType type) const +TQString PURL::Base::path(SeparatorType type) const { #if defined(NO_KDE) - QString s = _url.dirPath(); + TQString s = _url.dirPath(); if ( !s.isEmpty() && !s.endsWith("/") ) s += '/'; #else - QString s = _url.directory(false, false); + TQString s = _url.directory(false, false); #endif if ( type==WindowsSeparator ) { for (uint i=0; imainWidget()) ) return false; + if ( !KIO::NetAccess::stat(_url, uds, tqApp->mainWidget()) ) return false; KFileItem item(uds, _url); lastModified->setTime_t(item.time(KIO::UDS_MODIFICATION_TIME)); return true; } else { // assume file exists if ioslave cannot tell... - return KIO::NetAccess::exists(_url, true, qApp->mainWidget()); + return KIO::NetAccess::exists(_url, true, tqApp->mainWidget()); } #else if (lastModified) lastModified->setTime_t(0); @@ -299,62 +291,62 @@ bool PURL::Base::exists(QDateTime *lastModified) const } //---------------------------------------------------------------------------- -PURL::Url PURL::Url::fromPathOrUrl(const QString &s) +PURL::Url PURL::Url::fromPathOrUrl(const TQString &s) { KURL kurl = KURL::fromPathOrURL(s); if ( !kurl.protocol().isEmpty() && kurl.protocol()!="file" && kurl.protocol().length()!=1 ) return kurl; return Url(s.startsWith("file://") ? s.mid(7) : s); } -PURL::Url::Url(const Directory &dir, const QString &filename, FileType type) +PURL::Url::Url(const Directory &dir, const TQString &filename, FileType type) : Base(dir.path() + '/' + addExtension(filename, type)) {} -PURL::Url::Url(const Directory &dir, const QString &filepath) +PURL::Url::Url(const Directory &dir, const TQString &filepath) : Base(dir.path() + '/' + filepath) {} PURL::FileType PURL::Url::fileType() const { - QFileInfo info(filename()); + TQFileInfo info(filename()); FOR_EACH(FileType, type) for (uint i=0; type.data().extensions[i]; i++) if ( info.extension(false).lower()==type.data().extensions[i] ) return type; return Unknown; } -QString PURL::Url::basename() const +TQString PURL::Url::basename() const { - QFileInfo info(_url.fileName(false)); + TQFileInfo info(_url.fileName(false)); return info.baseName(true); } -QString PURL::Url::filename() const +TQString PURL::Url::filename() const { - QFileInfo info(_url.fileName(false)); + TQFileInfo info(_url.fileName(false)); return info.fileName(); } -QString PURL::Url::filepath(SeparatorType type) const +TQString PURL::Url::filepath(SeparatorType type) const { return path(type) + filename(); } -PURL::Url PURL::Url::toExtension(const QString &extension) const +PURL::Url PURL::Url::toExtension(const TQString &extension) const { - QFileInfo info(filename()); + TQFileInfo info(filename()); return Url(directory().path() + info.baseName(true) + '.' + extension); } -PURL::Url PURL::Url::appendExtension(const QString &extension) const +PURL::Url PURL::Url::appendExtension(const TQString &extension) const { - QFileInfo info(filename()); + TQFileInfo info(filename()); return Url(directory().path() + info.fileName() + '.' + extension); } -QString PURL::Url::relativeTo(const Directory &dir, SeparatorType type) const +TQString PURL::Url::relativeTo(const Directory &dir, SeparatorType type) const { - QString s = filepath(type); + TQString s = filepath(type); if ( !isInto(dir) ) return s; return s.right(s.length() - dir.path(type).length()); } @@ -368,7 +360,7 @@ PURL::Url PURL::Url::toAbsolute(const Directory &dir) const bool PURL::findExistingUrl(Url &url) { if ( url.exists() ) return true; - QFileInfo info(url.filename()); + TQFileInfo info(url.filename()); Url tmp = url.toExtension(info.extension(false).upper()); if ( !tmp.exists() ) { tmp = url.toExtension(info.extension(false).lower()); @@ -388,35 +380,35 @@ PURL::UrlList::UrlList(const KURL::List &list) #endif //----------------------------------------------------------------------------- -PURL::Directory::Directory(const QString &path) - : Base(path.isEmpty() ? QString::null : path + '/') +PURL::Directory::Directory(const TQString &path) + : Base(path.isEmpty() ? TQString() : path + '/') {} PURL::Directory PURL::Directory::up() const { - QDir dir(path()); + TQDir dir(path()); dir.cdUp(); return PURL::Directory(dir.path()); } -PURL::Directory PURL::Directory::down(const QString &subPath) const +PURL::Directory PURL::Directory::down(const TQString &subPath) const { - Q_ASSERT( QDir::isRelativePath(subPath) ); - QDir dir(path()); + Q_ASSERT( TQDir::isRelativePath(subPath) ); + TQDir dir(path()); dir.cd(subPath); return PURL::Directory(dir.path()); } -QStringList PURL::Directory::files(const QString &filter) const +TQStringList PURL::Directory::files(const TQString &filter) const { - QDir dir(path()); - return dir.entryList(filter, QDir::Files); + TQDir dir(path()); + return dir.entryList(filter, TQDir::Files); } -PURL::Url PURL::Directory::findMatchingFilename(const QString &filename) const +PURL::Url PURL::Directory::findMatchingFilename(const TQString &filename) const { - QDir dir(path()); - QStringList files = dir.entryList(QDir::Files); + TQDir dir(path()); + TQStringList files = dir.entryList(TQDir::Files); for (uint i=0; i -#else -# include -# include -#endif +# include #include "common/global/log.h" #include "common/common/purl_base.h" namespace PURL { //---------------------------------------------------------------------------- -class Http : public QHttp +class Http : public TQHttp { Q_OBJECT + TQ_OBJECT public: - Http(const QString &hostname); - QHttpResponseHeader _header; + Http(const TQString &hostname); + TQHttpResponseHeader _header; private slots: - void responseHeaderReceivedSlot(const QHttpResponseHeader &rh) { _header = rh; } + void responseHeaderReceivedSlot(const TQHttpResponseHeader &rh) { _header = rh; } }; class Url; @@ -43,21 +39,21 @@ enum SeparatorType { UnixSeparator, WindowsSeparator }; class Base { public: - Base(const QString &filepath = QString::null); + Base(const TQString &filepath = TQString()); Base(const KURL &url); bool operator <(const Base &url) const { return _url +class UrlList : public TQValueList { public: UrlList() {} UrlList(const Url &url) { append(url); } - UrlList(const QValueList &list) : QValueList(list) {} + UrlList(const TQValueList &list) : TQValueList(list) {} #if !defined(NO_KDE) UrlList(const KURL::List &list); #endif @@ -120,11 +116,11 @@ public: class Directory : public Base { public: - Directory(const QString &path = QString::null); - QStringList files(const QString &filter) const; - Url findMatchingFilename(const QString &filename) const; + Directory(const TQString &path = TQString()); + TQStringList files(const TQString &filter) const; + Url findMatchingFilename(const TQString &filename) const; Directory up() const; - Directory down(const QString &path) const; + Directory down(const TQString &path) const; static Directory current(); #if !defined(NO_KDE) bool create(Log::Generic &log) const; diff --git a/src/common/global/xml_data_file.cpp b/src/common/global/xml_data_file.cpp index 2464b34..30d42cd 100644 --- a/src/common/global/xml_data_file.cpp +++ b/src/common/global/xml_data_file.cpp @@ -8,25 +8,25 @@ ***************************************************************************/ #include "xml_data_file.h" -#include -#include +#include +#include #include #include #include "common/global/pfile.h" -XmlDataFile::XmlDataFile(const PURL::Url &url, const QString &name) +XmlDataFile::XmlDataFile(const PURL::Url &url, const TQString &name) : _url(url), _name(name), _document(name) { - QDomElement root = _document.createElement(name); + TQDomElement root = _document.createElement(name); _document.appendChild(root); } -bool XmlDataFile::load(QString &error) +bool XmlDataFile::load(TQString &error) { Log::StringView sview; PURL::File file(_url, sview); if ( !file.openForRead() ) { - error = i18n("Error opening file: %1").arg(sview.string()); + error = i18n("Error opening file: %1").tqarg(sview.string()); return false; } if ( !_document.setContent(file.qfile(), false, &error) ) return false; @@ -38,122 +38,122 @@ bool XmlDataFile::load(QString &error) return true; } -bool XmlDataFile::save(QString &error) const +bool XmlDataFile::save(TQString &error) const { Log::StringView sview; PURL::File file(_url, sview); bool ok = file.openForWrite(); if (ok) { - QString s = _document.toString(2); + TQString s = _document.toString(2); file.appendText(s); ok = file.close(); } - if ( !ok ) error = i18n("Error saving file: %1").arg(sview.string()); + if ( !ok ) error = i18n("Error saving file: %1").tqarg(sview.string()); return ok; } -QDomElement XmlDataFile::findChildElement(QDomElement parent, const QString &name) const +TQDomElement XmlDataFile::findChildElement(TQDomElement tqparent, const TQString &name) const { - QDomNodeList list = parent.elementsByTagName(name); + TQDomNodeList list = tqparent.elementsByTagName(name); return list.item(0).toElement(); } -QDomElement XmlDataFile::createChildElement(QDomElement parent, const QString &name) +TQDomElement XmlDataFile::createChildElement(TQDomElement tqparent, const TQString &name) { - QDomNodeList list = parent.elementsByTagName(name); + TQDomNodeList list = tqparent.elementsByTagName(name); if ( list.count()==0 ) { - QDomElement element = _document.createElement(name); - parent.appendChild(element); + TQDomElement element = _document.createElement(name); + tqparent.appendChild(element); return element; } return list.item(0).toElement(); } -void XmlDataFile::removeChilds(QDomNode parent) const +void XmlDataFile::removeChilds(TQDomNode tqparent) const { - QDomNodeList list = parent.childNodes(); + TQDomNodeList list = tqparent.childNodes(); for (uint i=0; i +#include #include "common/global/purl.h" class XmlDataFile { public: - XmlDataFile(const PURL::Url &url, const QString &name); + XmlDataFile(const PURL::Url &url, const TQString &name); virtual ~XmlDataFile() {} PURL::Url url() const { return _url; } - virtual bool load(QString &error); - bool save(QString &error) const; + virtual bool load(TQString &error); + bool save(TQString &error) const; - QString value(const QString &group, const QString &key, const QString &defaultValue) const; - void setValue(const QString &group, const QString &key, const QString &value); - QStringList listValues(const QString &group, const QString &key, const QStringList &defaultValues) const; - void setListValues(const QString &group, const QString &key, const QStringList &values); - void appendListValue(const QString &group, const QString &key, const QString &value); - void removeListValue(const QString &group, const QString &key, const QString &value); - void clearList(const QString &group, const QString &key); + TQString value(const TQString &group, const TQString &key, const TQString &defaultValue) const; + void setValue(const TQString &group, const TQString &key, const TQString &value); + TQStringList listValues(const TQString &group, const TQString &key, const TQStringList &defaultValues) const; + void setListValues(const TQString &group, const TQString &key, const TQStringList &values); + void appendListValue(const TQString &group, const TQString &key, const TQString &value); + void removeListValue(const TQString &group, const TQString &key, const TQString &value); + void clearList(const TQString &group, const TQString &key); protected: PURL::Url _url; private: - QString _name; - QDomDocument _document; + TQString _name; + TQDomDocument _document; - QDomElement findChildElement(QDomElement element, const QString &tag) const; - QDomElement createChildElement(QDomElement element, const QString &tag); - void removeChilds(QDomNode node) const; + TQDomElement findChildElement(TQDomElement element, const TQString &tag) const; + TQDomElement createChildElement(TQDomElement element, const TQString &tag); + void removeChilds(TQDomNode node) const; }; #endif diff --git a/src/common/gui/config_widget.h b/src/common/gui/config_widget.h index abfafab..787780b 100644 --- a/src/common/gui/config_widget.h +++ b/src/common/gui/config_widget.h @@ -10,10 +10,10 @@ #ifndef CONFIG_WIDGET_H #define CONFIG_WIDGET_H -#include -#include -#include -#include +#include +#include +#include +#include #include "container.h" @@ -21,11 +21,12 @@ class ConfigWidget : public Container { Q_OBJECT + TQ_OBJECT public: - ConfigWidget(QWidget *parent = 0) : Container(parent) {} - virtual QString title() const { return QString::null; } - virtual QString header() const { return QString::null; } - virtual QPixmap pixmap() const { return QPixmap(); } + ConfigWidget(TQWidget *tqparent = 0) : Container(tqparent) {} + virtual TQString title() const { return TQString(); } + virtual TQString header() const { return TQString(); } + virtual TQPixmap pixmap() const { return TQPixmap(); } public slots: virtual void loadConfig() = 0; @@ -52,40 +53,40 @@ public: } private: - QValueVector _widgets; + TQValueVector _widgets; - static QWidget *createWidget(Type type, ConfigWidget *widget) { - QWidget *w = 0; + static TQWidget *createWidget(Type type, ConfigWidget *widget) { + TQWidget *w = 0; uint row = widget->numRows(); switch (type.data().defValue.type()) { - case QVariant::Bool: - w = new QCheckBox(type.label(), widget); + case TQVariant::Bool: + w = new TQCheckBox(type.label(), widget); widget->addWidget(w, row,row, 0,1); break; default: Q_ASSERT(false); break; } return w; } - void load(Type type, QWidget *widget) const { + void load(Type type, TQWidget *widget) const { switch (type.data().defValue.type()) { - case QVariant::Bool: - static_cast(widget)->setChecked(readConfigEntry(type).toBool()); + case TQVariant::Bool: + static_cast(widget)->setChecked(readConfigEntry(type).toBool()); break; default: Q_ASSERT(false); break; } } - void save(Type type, QWidget *widget) { + void save(Type type, TQWidget *widget) { switch (type.data().defValue.type()) { - case QVariant::Bool: - writeConfigEntry(type, QVariant(static_cast(widget)->isChecked(), 0)); + case TQVariant::Bool: + writeConfigEntry(type, TQVariant(static_cast(widget)->isChecked(), 0)); break; default: Q_ASSERT(false); break; } } - void setDefault(Type type, QWidget *widget) const { + void setDefault(Type type, TQWidget *widget) const { switch (type.data().defValue.type()) { - case QVariant::Bool: - static_cast(widget)->setChecked(type.data().defValue.toBool()); + case TQVariant::Bool: + static_cast(widget)->setChecked(type.data().defValue.toBool()); break; default: Q_ASSERT(false); break; } diff --git a/src/common/gui/container.cpp b/src/common/gui/container.cpp index 881e265..960acca 100644 --- a/src/common/gui/container.cpp +++ b/src/common/gui/container.cpp @@ -11,21 +11,21 @@ #include "misc_gui.h" //---------------------------------------------------------------------------- -Container::Container(QWidget *parent, Type type) - : QFrame(parent), _type(type) +Container::Container(TQWidget *tqparent, Type type) + : TQFrame(tqparent), _type(type) { initLayout(); } -Container::Container(QWidgetStack *stack, uint index, Type type) - : QFrame(stack), _type(type) +Container::Container(TQWidgetStack *stack, uint index, Type type) + : TQFrame(stack), _type(type) { initLayout(); stack->addWidget(this, index); } -Container::Container(QTabWidget *tabw, const QString &title, Type type) - : QFrame(tabw), _type(type) +Container::Container(TQTabWidget *tabw, const TQString &title, Type type) + : TQFrame(tabw), _type(type) { initLayout(); tabw->addTab(this, title); @@ -36,43 +36,43 @@ void Container::setFrame(Type type) _type = type; switch (type) { case Flat: - setMargin(parent() && parent()->inherits("QTabWidget") ? 10 : 0); - setFrameStyle(QFrame::NoFrame); + setMargin(tqparent() && tqparent()->inherits(TQTABWIDGET_OBJECT_NAME_STRING) ? 10 : 0); + setFrameStyle(TQFrame::NoFrame); break; case Sunken: setMargin(10); - setFrameStyle(QFrame::StyledPanel | QFrame::Sunken); + setFrameStyle(TQFrame::StyledPanel | TQFrame::Sunken); break; } } void Container::initLayout() { - _topLayout = new QGridLayout(this, 1, 1, 0, 10); - _gridLayout = new QGridLayout(1, 1, 10); + _topLayout = new TQGridLayout(this, 1, 1, 0, 10); + _gridLayout = new TQGridLayout(1, 1, 10); _topLayout->addLayout(_gridLayout, 0, 0); _topLayout->setRowStretch(1, 1); setFrame(_type); } -void Container::addWidget(QWidget *w, uint startRow, uint endRow, uint startCol, uint endCol, int alignment) +void Container::addWidget(TQWidget *w, uint startRow, uint endRow, uint startCol, uint endCol, int tqalignment) { Q_ASSERT( startRow<=endRow ); Q_ASSERT( startCol<=endCol ); w->show(); - _gridLayout->addMultiCellWidget(w, startRow, endRow, startCol, endCol, alignment); + _gridLayout->addMultiCellWidget(w, startRow, endRow, startCol, endCol, tqalignment); } -void Container::addLayout(QLayout *l, uint startRow, uint endRow, uint startCol, uint endCol, int alignment) +void Container::addLayout(TQLayout *l, uint startRow, uint endRow, uint startCol, uint endCol, int tqalignment) { Q_ASSERT( startRow<=endRow ); Q_ASSERT( startCol<=endCol ); - _gridLayout->addMultiCellLayout(l, startRow, endRow, startCol, endCol, alignment); + _gridLayout->addMultiCellLayout(l, startRow, endRow, startCol, endCol, tqalignment); } //---------------------------------------------------------------------------- -ButtonContainer::ButtonContainer(const QString &title, QWidget *parent) - : Container(parent, Sunken) +ButtonContainer::ButtonContainer(const TQString &title, TQWidget *tqparent) + : Container(tqparent, Sunken) { _button = new PopupButton(title, this); addWidget(_button, 0,0, 0,1); diff --git a/src/common/gui/container.h b/src/common/gui/container.h index d718c6f..e64d143 100644 --- a/src/common/gui/container.h +++ b/src/common/gui/container.h @@ -9,24 +9,25 @@ #ifndef CONTAINER_H #define CONTAINER_H -#include -#include -#include -#include +#include +#include +#include +#include class PopupButton; //---------------------------------------------------------------------------- -class Container : public QFrame +class Container : public TQFrame { Q_OBJECT + TQ_OBJECT public: enum Type { Flat, Sunken }; - Container(QWidget *parent = 0, Type type = Flat); - Container(QWidgetStack *stack, uint index, Type type = Flat); - Container(QTabWidget *tabw, const QString &title, Type type = Flat); - void addWidget(QWidget *widget, uint startRow, uint endRow, uint startCol, uint endCol, int alignment = 0); - void addLayout(QLayout *layout, uint startRow, uint endRow, uint startCol, uint endCol, int alignment = 0); + Container(TQWidget *tqparent = 0, Type type = Flat); + Container(TQWidgetStack *stack, uint index, Type type = Flat); + Container(TQTabWidget *tabw, const TQString &title, Type type = Flat); + void addWidget(TQWidget *widget, uint startRow, uint endRow, uint startCol, uint endCol, int tqalignment = 0); + void addLayout(TQLayout *tqlayout, uint startRow, uint endRow, uint startCol, uint endCol, int tqalignment = 0); uint numRows() const { return _gridLayout->numRows(); } uint numCols() const { return _gridLayout->numCols(); } void setFrame(Type type); @@ -38,7 +39,7 @@ public: private: Type _type; - QGridLayout *_topLayout, *_gridLayout; + TQGridLayout *_topLayout, *_gridLayout; void initLayout(); }; @@ -47,8 +48,9 @@ private: class ButtonContainer : public Container { Q_OBJECT + TQ_OBJECT public: - ButtonContainer(const QString &title, QWidget *parent); + ButtonContainer(const TQString &title, TQWidget *tqparent); PopupButton &button() { return *_button; } private: diff --git a/src/common/gui/dialog.cpp b/src/common/gui/dialog.cpp index 650b086..f8ee222 100644 --- a/src/common/gui/dialog.cpp +++ b/src/common/gui/dialog.cpp @@ -8,101 +8,101 @@ ***************************************************************************/ #include "dialog.h" -#include -#include -#include -#include +#include +#include +#include +#include #include #include "misc_gui.h" //----------------------------------------------------------------------------- -Dialog::Dialog(QWidget *parent, const char *name, bool modal, - const QString &caption, int buttonMask, ButtonCode defaultButton, - bool separator, const QSize &defaultSize) - : KDialogBase(parent, name, modal, caption, buttonMask, defaultButton, separator), +Dialog::Dialog(TQWidget *tqparent, const char *name, bool modal, + const TQString &caption, int buttonMask, ButtonCode defaultButton, + bool separator, const TQSize &defaultSize) + : KDialogBase(tqparent, name, modal, caption, buttonMask, defaultButton, separator), _defaultSize(defaultSize) { - BusyCursor::start(); + PBusyCursor::start(); Q_ASSERT(name); - QWidget *main = new QWidget(this); + TQWidget *main = new TQWidget(this); setMainWidget(main); - QTimer::singleShot(0, this, SLOT(updateSize())); + TQTimer::singleShot(0, this, TQT_SLOT(updateSize())); } -Dialog::Dialog(DialogType type, const QString &caption, int buttonMask, ButtonCode defaultButton, - QWidget *parent, const char *name, bool modal, bool separator, const QSize &defaultSize) - : KDialogBase(type, caption, buttonMask, defaultButton, parent, name, modal, separator), +Dialog::Dialog(DialogType type, const TQString &caption, int buttonMask, ButtonCode defaultButton, + TQWidget *tqparent, const char *name, bool modal, bool separator, const TQSize &defaultSize) + : KDialogBase(type, caption, buttonMask, defaultButton, tqparent, name, modal, separator), _defaultSize(defaultSize) { - BusyCursor::start(); + PBusyCursor::start(); Q_ASSERT(name); - QTimer::singleShot(0, this, SLOT(updateSize())); + TQTimer::singleShot(0, this, TQT_SLOT(updateSize())); } Dialog::~Dialog() { GuiConfig gc; - gc.writeEntry(QString(name()) + "_size", size()); + gc.writeEntry(TQString(name()) + "_size", size()); } void Dialog::updateSize() { GuiConfig gc; - resize(gc.readSizeEntry(QString(name()) + "_size", &_defaultSize)); - BusyCursor::stop(); + resize(gc.readSizeEntry(TQString(name()) + "_size", &_defaultSize)); + PBusyCursor::stop(); } //----------------------------------------------------------------------------- -TreeListDialog::Item::Item(const QString &label, QWidget *page, const QString &title, QListView *listview) +TreeListDialog::Item::Item(const TQString &label, TQWidget *page, const TQString &title, TQListView *listview) : KListViewItem(listview, label), _page(page), _title(title) {} -TreeListDialog::Item::Item(const QString &label, QWidget *page, const QString &title, QListViewItem *item) +TreeListDialog::Item::Item(const TQString &label, TQWidget *page, const TQString &title, TQListViewItem *item) : KListViewItem(item, label), _page(page), _title(title) {} -TreeListDialog::TreeListDialog(QWidget *parent, const char *name, bool modal, - const QString &caption, int buttonMask, ButtonCode defaultButton, +TreeListDialog::TreeListDialog(TQWidget *tqparent, const char *name, bool modal, + const TQString &caption, int buttonMask, ButtonCode defaultButton, bool separator) - : Dialog(parent, name, modal, caption, buttonMask, defaultButton, separator) + : Dialog(tqparent, name, modal, caption, buttonMask, defaultButton, separator) { - QVBoxLayout *top = new QVBoxLayout(mainWidget(), 0, 10); + TQVBoxLayout *top = new TQVBoxLayout(mainWidget(), 0, 10); // list view - QValueList widths; + TQValueList widths; widths += 80; widths += 500; - Splitter *splitter = new Splitter(widths, Horizontal, mainWidget(), name); + Splitter *splitter = new Splitter(widths,Qt::Horizontal, mainWidget(), name); top->addWidget(splitter); _listView = new KListView(splitter); - connect(_listView, SIGNAL(currentChanged(QListViewItem *)), SLOT(currentChanged(QListViewItem *))); + connect(_listView, TQT_SIGNAL(currentChanged(TQListViewItem *)), TQT_SLOT(currentChanged(TQListViewItem *))); _listView->setAllColumnsShowFocus(true); _listView->setRootIsDecorated(true); _listView->setSorting(0); - _listView->addColumn(QString::null); + _listView->addColumn(TQString()); _listView->header()->hide(); - _listView->setResizeMode(QListView::LastColumn); + _listView->setResizeMode(TQListView::LastColumn); // pages - _frame = new QFrame(splitter); - QVBoxLayout *vbox = new QVBoxLayout(_frame, 10, 10); - _titleBox = new QHBoxLayout(vbox); - _label = new QLabel(_frame); + _frame = new TQFrame(splitter); + TQVBoxLayout *vbox = new TQVBoxLayout(_frame, 10, 10); + _titleBox = new TQHBoxLayout(vbox); + _label = new TQLabel(_frame); _titleBox->addWidget(_label); - _stack = new QWidgetStack(_frame); - connect(_stack, SIGNAL(aboutToShow(QWidget *)), SIGNAL(aboutToShowPage(QWidget *))); + _stack = new TQWidgetStack(_frame); + connect(_stack, TQT_SIGNAL(aboutToShow(TQWidget *)), TQT_SIGNAL(aboutToShowPage(TQWidget *))); vbox->addWidget(_stack); vbox->addStretch(1); } -QWidget *TreeListDialog::addPage(const QStringList &labels) +TQWidget *TreeListDialog::addPage(const TQStringList &labels) { Q_ASSERT( !labels.isEmpty() ); - QWidget *page = 0; - QListViewItem *item = 0; - QListViewItemIterator it(_listView); + TQWidget *page = 0; + TQListViewItem *item = 0; + TQListViewItemIterator it(_listView); for (; it.current(); ++it) { if ( it.current()->text(0)==labels[0] ) { item = it.current(); @@ -110,8 +110,8 @@ QWidget *TreeListDialog::addPage(const QStringList &labels) } } if ( item==0 ) { - page = new QWidget(_stack); - connect(page, SIGNAL(destroyed(QObject *)), SLOT(pageDestroyed(QObject *))); + page = new TQWidget(_stack); + connect(page, TQT_SIGNAL(destroyed(TQObject *)), TQT_SLOT(pageDestroyed(TQObject *))); _stack->addWidget(page); item = new Item(labels[0], page, labels[0], _listView); item->setOpen(true); @@ -119,9 +119,9 @@ QWidget *TreeListDialog::addPage(const QStringList &labels) item->setSelectable(last); } for (uint i=1; itext(0)==labels[i] ) { item = it.current(); @@ -129,10 +129,10 @@ QWidget *TreeListDialog::addPage(const QStringList &labels) } } if ( item==0 ) { - page = new QWidget(_stack); - connect(page, SIGNAL(destroyed(QObject *)), SLOT(pageDestroyed(QObject *))); + page = new TQWidget(_stack); + connect(page, TQT_SIGNAL(destroyed(TQObject *)), TQT_SLOT(pageDestroyed(TQObject *))); _stack->addWidget(page); - item = new Item(labels[i], page, labels[i], parent); + item = new Item(labels[i], page, labels[i], tqparent); item->setOpen(true); bool last = ( labels.count()==i+1 ); item->setSelectable(last); @@ -142,7 +142,7 @@ QWidget *TreeListDialog::addPage(const QStringList &labels) return page; } -void TreeListDialog::currentChanged(QListViewItem *lvitem) +void TreeListDialog::currentChanged(TQListViewItem *lvitem) { if ( lvitem==0 ) return; Item *item = static_cast(lvitem); @@ -151,9 +151,9 @@ void TreeListDialog::currentChanged(QListViewItem *lvitem) _stack->raiseWidget(item->_page); } -void TreeListDialog::showPage(QWidget *page) +void TreeListDialog::showPage(TQWidget *page) { - QListViewItemIterator it(_listView); + TQListViewItemIterator it(_listView); for (; it.current(); ++it) { Item *item = static_cast(it.current()); if ( item->_page==page ) { @@ -164,7 +164,7 @@ void TreeListDialog::showPage(QWidget *page) } } -int TreeListDialog::pageIndex(QWidget *page) const +int TreeListDialog::pageIndex(TQWidget *page) const { return _stack->id(page); } @@ -176,24 +176,24 @@ int TreeListDialog::activePageIndex() const return pageIndex(item->_page); } -void TreeListDialog::pageDestroyed(QObject *object) +void TreeListDialog::pageDestroyed(TQObject *object) { - QListViewItemIterator it(_listView); + TQListViewItemIterator it(_listView); for (; it.current(); ++it) { Item *item = static_cast(it.current()); - if ( item->_page!=object ) continue; + if ( TQT_BASE_OBJECT(item->_page)!=TQT_BASE_OBJECT(object) ) continue; delete item; break; } } //----------------------------------------------------------------------------- -TextEditorDialog::TextEditorDialog(const QString &text, const QString &caption, - bool wrapAtWidgetWidth, QWidget *parent) - : Dialog(parent, "text_editor_dialog", true, caption, Close, Close, false, QSize(200, 100)) +TextEditorDialog::TextEditorDialog(const TQString &text, const TQString &caption, + bool wrapAtWidgetWidth, TQWidget *tqparent) + : Dialog(tqparent, "text_editor_dialog", true, caption, Close, Close, false, TQSize(200, 100)) { - KTextEdit *w = new KTextEdit(text, QString::null, this); + KTextEdit *w = new KTextEdit(text, TQString(), this); w->setReadOnly(true); - w->setWordWrap(wrapAtWidgetWidth ? QTextEdit::WidgetWidth : QTextEdit::NoWrap); + w->setWordWrap(wrapAtWidgetWidth ? TQTextEdit::WidgetWidth : TQTextEdit::NoWrap); setMainWidget(w); } diff --git a/src/common/gui/dialog.h b/src/common/gui/dialog.h index 1227a7d..bc95d81 100644 --- a/src/common/gui/dialog.h +++ b/src/common/gui/dialog.h @@ -9,7 +9,7 @@ #ifndef DIALOG_H #define DIALOG_H -#include +#include #include #include @@ -17,51 +17,53 @@ class Dialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - Dialog(QWidget *parent, const char *name, bool modal, - const QString &caption, int buttonMask, ButtonCode defaultButton, bool separator, - const QSize &defaultSize = QSize()); - Dialog(DialogType type, const QString &caption, - int buttonMask, ButtonCode defaultButton, QWidget *parent, const char *name, - bool modal, bool separator, const QSize &defaultSize = QSize()); + Dialog(TQWidget *tqparent, const char *name, bool modal, + const TQString &caption, int buttonMask, ButtonCode defaultButton, bool separator, + const TQSize &defaultSize = TQSize()); + Dialog(DialogType type, const TQString &caption, + int buttonMask, ButtonCode defaultButton, TQWidget *tqparent, const char *name, + bool modal, bool separator, const TQSize &defaultSize = TQSize()); virtual ~Dialog(); private slots: void updateSize(); private: - QSize _defaultSize; + TQSize _defaultSize; }; //----------------------------------------------------------------------------- class TreeListDialog : public Dialog { Q_OBJECT + TQ_OBJECT public: - TreeListDialog(QWidget *parent, const char *name, bool modal, - const QString &caption, int buttonMask, ButtonCode defaultButton, bool separator); - QWidget *addPage(const QStringList &labels); - void showPage(QWidget *page); + TreeListDialog(TQWidget *tqparent, const char *name, bool modal, + const TQString &caption, int buttonMask, ButtonCode defaultButton, bool separator); + TQWidget *addPage(const TQStringList &labels); + void showPage(TQWidget *page); int activePageIndex() const; - int pageIndex(QWidget *page) const; + int pageIndex(TQWidget *page) const; protected slots: - virtual void currentChanged(QListViewItem *item); - void pageDestroyed(QObject *page); + virtual void currentChanged(TQListViewItem *item); + void pageDestroyed(TQObject *page); protected: - QFrame *_frame; + TQFrame *_frame; KListView *_listView; - QHBoxLayout *_titleBox; - QLabel *_label; - QWidgetStack *_stack; + TQHBoxLayout *_titleBox; + TQLabel *_label; + TQWidgetStack *_stack; class Item : public KListViewItem { public: - Item(const QString &label, QWidget *page, const QString &title, QListView *listview); - Item(const QString &label, QWidget *page, const QString &title, QListViewItem *item); - QWidget *_page; - QString _title; + Item(const TQString &label, TQWidget *page, const TQString &title, TQListView *listview); + Item(const TQString &label, TQWidget *page, const TQString &title, TQListViewItem *item); + TQWidget *_page; + TQString _title; }; }; @@ -69,9 +71,10 @@ protected: class TextEditorDialog : public Dialog { Q_OBJECT + TQ_OBJECT public: - TextEditorDialog(const QString &text, const QString &caption, - bool wrapAtWidgetWidth, QWidget *parent); + TextEditorDialog(const TQString &text, const TQString &caption, + bool wrapAtWidgetWidth, TQWidget *tqparent); }; #endif diff --git a/src/common/gui/editlistbox.cpp b/src/common/gui/editlistbox.cpp index 1d2916d..2e40b8a 100644 --- a/src/common/gui/editlistbox.cpp +++ b/src/common/gui/editlistbox.cpp @@ -19,9 +19,9 @@ */ #include "editlistbox.h" -#include -#include -#include +#include +#include +#include #include #include @@ -30,22 +30,22 @@ #include #include -EditListBox::EditListBox(uint nbColumns, QWidget *parent, const char *name, Mode mode, Buttons buttons) - : QFrame(parent, name), _mode(mode), _buttons(buttons) +EditListBox::EditListBox(uint nbColumns, TQWidget *tqparent, const char *name, Mode mode, Buttons buttons) + : TQFrame(tqparent, name), _mode(mode), _buttons(buttons) { m_lineEdit = new KLineEdit; init(nbColumns, m_lineEdit); } -EditListBox::EditListBox(uint nbColumns, QWidget *view, KLineEdit *lineEdit, QWidget *parent, const char *name, +EditListBox::EditListBox(uint nbColumns, TQWidget *view, KLineEdit *lineEdit, TQWidget *tqparent, const char *name, Mode mode, Buttons buttons) - : QFrame(parent, name), _mode(mode), _buttons(buttons) + : TQFrame(tqparent, name), _mode(mode), _buttons(buttons) { m_lineEdit = lineEdit; init(nbColumns, view); } -void EditListBox::init(uint nbColumns, QWidget *view) +void EditListBox::init(uint nbColumns, TQWidget *view) { _addButton = 0; _removeButton = 0; @@ -53,48 +53,48 @@ void EditListBox::init(uint nbColumns, QWidget *view) _moveDownButton = 0; _removeAllButton = 0; _resetButton = 0; - setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding)); + tqsetSizePolicy(TQSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding)); - QGridLayout *grid = new QGridLayout(this, 1, 1, 0, KDialog::spacingHint()); + TQGridLayout *grid = new TQGridLayout(this, 1, 1, 0, KDialog::spacingHint()); uint row = 0; if (view) { - QHBoxLayout *hbox = new QHBoxLayout(KDialog::spacingHint()); + TQHBoxLayout *hbox = new TQHBoxLayout(KDialog::spacingHint()); grid->addMultiCellLayout(hbox, row,row, 0,1); if (m_lineEdit) { KIconLoader loader; - QIconSet iconset = loader.loadIcon("locationbar_erase", KIcon::Toolbar); - KPushButton *button = new KPushButton(iconset, QString::null, this); - connect(button, SIGNAL(clicked()), SLOT(clearEdit())); + TQIconSet iconset = loader.loadIcon("locationbar_erase", KIcon::Toolbar); + KPushButton *button = new KPushButton(iconset, TQString(), this); + connect(button, TQT_SIGNAL(clicked()), TQT_SLOT(clearEdit())); hbox->addWidget(button); } - view->reparent( this, QPoint(0,0) ); + view->reparent( this, TQPoint(0,0) ); hbox->addWidget(view); row++; } _listView= new KListView(this); - for (uint i=0; iaddColumn(QString::null); + for (uint i=0; iaddColumn(TQString()); _listView->header()->hide(); _listView->setSorting(-1); _listView->setResizeMode(KListView::LastColumn); _listView->setColumnWidthMode(nbColumns-1, KListView::Maximum); grid->addWidget(_listView, row, 0); - QVBoxLayout *vbox = new QVBoxLayout(10); + TQVBoxLayout *vbox = new TQVBoxLayout(10); grid->addLayout(vbox, row, 1); - _buttonsLayout = new QVBoxLayout(10); + _buttonsLayout = new TQVBoxLayout(10); vbox->addLayout(_buttonsLayout); vbox->addStretch(1); setButtons(_buttons); if (m_lineEdit) { - connect(m_lineEdit,SIGNAL(textChanged(const QString&)),this,SLOT(typedSomething(const QString&))); + connect(m_lineEdit,TQT_SIGNAL(textChanged(const TQString&)),this,TQT_SLOT(typedSomething(const TQString&))); m_lineEdit->setTrapReturnKey(true); - connect(m_lineEdit,SIGNAL(returnPressed()),this,SLOT(addItem())); + connect(m_lineEdit,TQT_SIGNAL(returnPressed()),this,TQT_SLOT(addItem())); } - connect(_listView, SIGNAL(selectionChanged()), SLOT(selectionChanged())); + connect(_listView, TQT_SIGNAL(selectionChanged()), TQT_SLOT(selectionChanged())); // maybe supplied lineedit has some text already - typedSomething(m_lineEdit ? m_lineEdit->text() : QString::null); + typedSomething(m_lineEdit ? m_lineEdit->text() : TQString()); } void EditListBox::setButtons(Buttons buttons) @@ -111,7 +111,7 @@ void EditListBox::setButtons(Buttons buttons) #endif _addButton->setEnabled(false); _addButton->show(); - connect(_addButton, SIGNAL(clicked()), SLOT(addItem())); + connect(_addButton, TQT_SIGNAL(clicked()), TQT_SLOT(addItem())); _buttonsLayout->addWidget(_addButton); } @@ -121,7 +121,7 @@ void EditListBox::setButtons(Buttons buttons) _removeButton = new KPushButton(KGuiItem(i18n("Remove"), "clear"), this); _removeButton->setEnabled(false); _removeButton->show(); - connect(_removeButton, SIGNAL(clicked()), SLOT(removeItem())); + connect(_removeButton, TQT_SIGNAL(clicked()), TQT_SLOT(removeItem())); _buttonsLayout->addWidget(_removeButton); } @@ -130,7 +130,7 @@ void EditListBox::setButtons(Buttons buttons) if ( buttons & RemoveAll ) { _removeAllButton = new KPushButton(KGuiItem(i18n("Remove All"), "delete"), this); _removeAllButton->show(); - connect(_removeAllButton, SIGNAL(clicked()), SLOT(clear())); + connect(_removeAllButton, TQT_SIGNAL(clicked()), TQT_SLOT(clear())); _buttonsLayout->addWidget(_removeAllButton); } @@ -142,12 +142,12 @@ void EditListBox::setButtons(Buttons buttons) _moveUpButton = new KPushButton(KGuiItem(i18n("Move &Up"), "up"), this); _moveUpButton->setEnabled(false); _moveUpButton->show(); - connect(_moveUpButton, SIGNAL(clicked()), SLOT(moveItemUp())); + connect(_moveUpButton, TQT_SIGNAL(clicked()), TQT_SLOT(moveItemUp())); _buttonsLayout->addWidget(_moveUpButton); _moveDownButton = new KPushButton(KGuiItem(i18n("Move &Down"), "down"), this); _moveDownButton->setEnabled(false); _moveDownButton->show(); - connect(_moveDownButton, SIGNAL(clicked()), SLOT(moveItemDown())); + connect(_moveDownButton, TQT_SIGNAL(clicked()), TQT_SLOT(moveItemDown())); _buttonsLayout->addWidget(_moveDownButton); } @@ -156,14 +156,14 @@ void EditListBox::setButtons(Buttons buttons) if ( buttons & Reset ) { _resetButton = new KPushButton(KStdGuiItem::reset(), this); _resetButton->show(); - connect(_resetButton, SIGNAL(clicked()), SIGNAL(reset())); + connect(_resetButton, TQT_SIGNAL(clicked()), TQT_SIGNAL(reset())); _buttonsLayout->addWidget(_resetButton); } } -void EditListBox::typedSomething(const QString& text) +void EditListBox::typedSomething(const TQString& text) { - QListViewItem *item = _listView->selectedItem(); + TQListViewItem *item = _listView->selectedItem(); if (item) { if( selectedText()!=text ) { item->setText(textColumn(), text); @@ -175,7 +175,7 @@ void EditListBox::typedSomething(const QString& text) void EditListBox::moveItemUp() { - QListViewItem *item = _listView->selectedItem(); + TQListViewItem *item = _listView->selectedItem(); if ( item==0 || item->itemAbove()==0 ) return; item->itemAbove()->moveItem(item); updateButtons(); @@ -184,7 +184,7 @@ void EditListBox::moveItemUp() void EditListBox::moveItemDown() { - QListViewItem *item = _listView->selectedItem(); + TQListViewItem *item = _listView->selectedItem(); if ( item==0 || item->itemBelow()==0 ) return; item->moveItem(item->itemBelow()); updateButtons(); @@ -201,11 +201,11 @@ void EditListBox::addItem() addItem(m_lineEdit->text()); } -void EditListBox::addItem(const QString &text) +void EditListBox::addItem(const TQString &text) { bool alreadyInList(false); //if we didn't check for dupes at the inserting we have to do it now - if ( _mode==DuplicatesDisallowed ) alreadyInList = _listView->findItem(text, textColumn()); + if ( _mode==DuplicatesDisallowed ) alreadyInList = _listView->tqfindItem(text, textColumn()); if (m_lineEdit) { bool block = m_lineEdit->signalsBlocked(); @@ -216,7 +216,7 @@ void EditListBox::addItem(const QString &text) _listView->clearSelection(); if (!alreadyInList) { - QListViewItem *item = createItem(); + TQListViewItem *item = createItem(); item->setText(textColumn(), text); if ( _listView->lastItem() ) item->moveItem(_listView->lastItem()); emit changed(); @@ -237,9 +237,9 @@ void EditListBox::clearEdit() void EditListBox::removeItem() { - QListViewItem *item = _listView->selectedItem(); + TQListViewItem *item = _listView->selectedItem(); if (item) { - QString text = item->text(textColumn()); + TQString text = item->text(textColumn()); delete item; emit changed(); emit removed(text); @@ -267,15 +267,15 @@ void EditListBox::clear() uint EditListBox::count() const { uint nb = 0; - QListViewItemIterator it(_listView); + TQListViewItemIterator it(_listView); for (; it.current(); ++it) nb++; return nb; } -const QListViewItem *EditListBox::item(uint i) const +const TQListViewItem *EditListBox::item(uint i) const { uint k = 0; - QListViewItemIterator it(_listView); + TQListViewItemIterator it(_listView); for (; it.current(); ++it) { if ( k==i ) return it.current(); k++; @@ -283,19 +283,19 @@ const QListViewItem *EditListBox::item(uint i) const return 0; } -QStringList EditListBox::texts() const +TQStringList EditListBox::texts() const { - QStringList list; - QListViewItemIterator it(_listView); + TQStringList list; + TQListViewItemIterator it(_listView); for (; it.current(); ++it) list.append(it.current()->text(textColumn())); return list; } -void EditListBox::setTexts(const QStringList& items) +void EditListBox::setTexts(const TQStringList& items) { _listView->clear(); for (int i=items.count()-1; i>=0; i--) { - QListViewItem *item = createItem(); + TQListViewItem *item = createItem(); item->setText(textColumn(), items[i]); } if (m_lineEdit) m_lineEdit->clear(); @@ -304,14 +304,14 @@ void EditListBox::setTexts(const QStringList& items) void EditListBox::updateButtons() { - QListViewItem *item = _listView->selectedItem(); + TQListViewItem *item = _listView->selectedItem(); if (_addButton) { if ( m_lineEdit==0 ) _addButton->setEnabled(true); else { - QString text = m_lineEdit->text(); + TQString text = m_lineEdit->text(); if ( _mode!=DuplicatesCheckedAtEntering ) _addButton->setEnabled(!text.isEmpty()); else if ( text.isEmpty() ) _addButton->setEnabled(false); - else _addButton->setEnabled(!_listView->findItem(text, textColumn())); + else _addButton->setEnabled(!_listView->tqfindItem(text, textColumn())); } } if (_removeButton) _removeButton->setEnabled(item); @@ -320,21 +320,21 @@ void EditListBox::updateButtons() if (_removeAllButton) _removeAllButton->setEnabled(_listView->firstChild()); } -void EditListBox::setEditText(const QString &text) +void EditListBox::setEditText(const TQString &text) { _listView->clearSelection(); if (m_lineEdit) m_lineEdit->setText(text); updateButtons(); } -QListViewItem *EditListBox::createItem() +TQListViewItem *EditListBox::createItem() { return new KListViewItem(_listView); } -QString EditListBox::selectedText() const +TQString EditListBox::selectedText() const { - QListViewItem *item = _listView->selectedItem(); - if ( item==0 ) return QString::null; + TQListViewItem *item = _listView->selectedItem(); + if ( item==0 ) return TQString(); return item->text(textColumn()); } diff --git a/src/common/gui/editlistbox.h b/src/common/gui/editlistbox.h index c259278..3e7a26d 100644 --- a/src/common/gui/editlistbox.h +++ b/src/common/gui/editlistbox.h @@ -19,7 +19,7 @@ #ifndef EDITLISTBOX_H #define EDITLISTBOX_H -#include +#include #include #include #include @@ -32,33 +32,34 @@ // * use KStdGuiItem for buttons // * support for New, Clear, Reset buttons // * use KListView -class EditListBox : public QFrame +class EditListBox : public TQFrame { Q_OBJECT + TQ_OBJECT public: enum Mode { DuplicatesDisallowed, DuplicatesAllowed, DuplicatesCheckedAtEntering }; enum Button { Add = 1, Remove = 2, UpDown = 4, RemoveAll = 8, Reset = 16 }; - Q_DECLARE_FLAGS(Buttons, Button) + TQ_DECLARE_FLAGS(Buttons, Button) - EditListBox(uint nbColumns, QWidget *parent = 0, const char *name = 0, Mode mode = DuplicatesDisallowed, + EditListBox(uint nbColumns, TQWidget *tqparent = 0, const char *name = 0, Mode mode = DuplicatesDisallowed, Buttons buttons = Buttons(Add|Remove|RemoveAll|UpDown) ); - EditListBox(uint nbColumns, QWidget *view, KLineEdit *lineEdit, QWidget *parent = 0, const char *name = 0, + EditListBox(uint nbColumns, TQWidget *view, KLineEdit *lineEdit, TQWidget *tqparent = 0, const char *name = 0, Mode mode = DuplicatesDisallowed, Buttons buttons = Buttons(Add|Remove|RemoveAll|UpDown) ); - void setTexts(const QStringList& items); - QStringList texts() const; + void setTexts(const TQStringList& items); + TQStringList texts() const; uint count() const; - QString text(uint i) const { return item(i)->text(textColumn()); } - const QListViewItem *item(uint i) const; + TQString text(uint i) const { return item(i)->text(textColumn()); } + const TQListViewItem *item(uint i) const; Buttons buttons() const { return _buttons; } void setButtons(Buttons buttons); - void setEditText(const QString &text); - void addItem(const QString &text); + void setEditText(const TQString &text); + void addItem(const TQString &text); signals: void reset(); void changed(); - void added( const QString & text ); - void removed( const QString & text ); + void added( const TQString & text ); + void removed( const TQString & text ); public slots: void clear(); @@ -70,26 +71,26 @@ Q_OBJECT virtual void addItem(); virtual void removeItem(); void selectionChanged(); - void typedSomething(const QString& text); + void typedSomething(const TQString& text); protected: KListView *_listView; - virtual QListViewItem *createItem(); + virtual TQListViewItem *createItem(); virtual uint textColumn() const { return 0; } - QString selectedText() const; + TQString selectedText() const; private: Mode _mode; Buttons _buttons; - QVBoxLayout *_buttonsLayout; + TQVBoxLayout *_buttonsLayout; KLineEdit *m_lineEdit; KPushButton *_addButton, *_removeButton, *_moveUpButton, *_moveDownButton, *_removeAllButton, *_resetButton; - void init(uint nbColumns, QWidget *view); + void init(uint nbColumns, TQWidget *view); void updateButtons(); }; -Q_DECLARE_OPERATORS_FOR_FLAGS(EditListBox::Buttons) +TQ_DECLARE_OPERATORS_FOR_FLAGS(EditListBox::Buttons) #endif diff --git a/src/common/gui/hexword_gui.cpp b/src/common/gui/hexword_gui.cpp index d794a11..b85e829 100644 --- a/src/common/gui/hexword_gui.cpp +++ b/src/common/gui/hexword_gui.cpp @@ -9,16 +9,16 @@ ***************************************************************************/ #include "hexword_gui.h" -#include +#include #include "common/gui/number_gui.h" #include "common/common/misc.h" //----------------------------------------------------------------------------- -HexValueValidator::HexValueValidator(uint nbChars, QObject *parent) - : QValidator(parent, "hex_value_validator"), _nbChars(nbChars) {} +HexValueValidator::HexValueValidator(uint nbChars, TQObject *tqparent) + : TQValidator(tqparent, "hex_value_validator"), _nbChars(nbChars) {} -QValidator::State HexValueValidator::validate(QString &input, int &) const +TQValidator::State HexValueValidator::validate(TQString &input, int &) const { if ( input.length()==0 ) return Acceptable; if ( input.length()>_nbChars ) return Invalid; @@ -28,12 +28,12 @@ QValidator::State HexValueValidator::validate(QString &input, int &) const } //----------------------------------------------------------------------------- -GenericHexWordEditor::GenericHexWordEditor(uint nbChars, bool hasBlankValue, QWidget *parent) - : KLineEdit(parent, "hex_word_editor"), _nbChars(nbChars), _hasBlankValue(hasBlankValue) +GenericHexWordEditor::GenericHexWordEditor(uint nbChars, bool hasBlankValue, TQWidget *tqparent) + : KLineEdit(tqparent, "hex_word_editor"), _nbChars(nbChars), _hasBlankValue(hasBlankValue) { - setFocusPolicy(ClickFocus); - setValidator(new HexValueValidator(nbChars, this)); - connect(this, SIGNAL(textChanged(const QString &)), SLOT(slotTextChanged())); + setFocusPolicy(TQ_ClickFocus); + setValidator(new HexValueValidator(nbChars, TQT_TQOBJECT(this))); + connect(this, TQT_SIGNAL(textChanged(const TQString &)), TQT_SLOT(slotTextChanged())); setFrame(false); } @@ -46,9 +46,9 @@ void GenericHexWordEditor::slotTextChanged() bool GenericHexWordEditor::changeValue() { if ( !isValid() ) return false; - QString s = text(); + TQString s = text(); BitValue v = blankValue(); - if ( s!=QString(repeat("-", _nbChars)) ) { + if ( s!=TQString(repeat("-", _nbChars)) ) { s = s.leftJustify(_nbChars, '0', true); for (uint i=0; i<_nbChars; i++) if ( !isxdigit(s[i].latin1()) ) s[i] = '0'; @@ -74,17 +74,17 @@ void GenericHexWordEditor::set() blockSignals(false); } -bool GenericHexWordEditor::event(QEvent *e) +bool GenericHexWordEditor::event(TQEvent *e) { switch (e->type()) { - case QEvent::FocusOut: + case TQEvent::FocusOut: changeValue(); break; - case QEvent::FocusIn: - QTimer::singleShot(0, this, SLOT(selectAll())); // ugly but it works + case TQEvent::FocusIn: + TQTimer::singleShot(0, this, TQT_SLOT(selectAll())); // ugly but it works break; - case QEvent::KeyPress: - switch ( static_cast(e)->key() ) { + case TQEvent::KeyPress: + switch ( TQT_TQKEYEVENT(e)->key() ) { case Key_Next: emit moveNextPage(); return true; @@ -122,15 +122,15 @@ bool GenericHexWordEditor::event(QEvent *e) } default: break; } - return QLineEdit::event(e); + return TQLineEdit::event(e); } -QSize GenericHexWordEditor::sizeHint() const +TQSize GenericHexWordEditor::tqsizeHint() const { - return QSize(maxCharWidth(NumberBase::Hex, font()) * (_nbChars+1), fontMetrics().height()); + return TQSize(maxCharWidth(NumberBase::Hex, font()) * (_nbChars+1), fontMetrics().height()); } -QSize GenericHexWordEditor::minimumSizeHint() const +TQSize GenericHexWordEditor::tqminimumSizeHint() const { - return QSize(maxCharWidth(NumberBase::Hex, font()) * (_nbChars+1), fontMetrics().height()); + return TQSize(maxCharWidth(NumberBase::Hex, font()) * (_nbChars+1), fontMetrics().height()); } diff --git a/src/common/gui/hexword_gui.h b/src/common/gui/hexword_gui.h index 5da6840..f607f07 100644 --- a/src/common/gui/hexword_gui.h +++ b/src/common/gui/hexword_gui.h @@ -10,18 +10,19 @@ #ifndef HEXWORD_GUI_H #define HEXWORD_GUI_H -#include +#include #include #include "common/common/bitvalue.h" //----------------------------------------------------------------------------- -class HexValueValidator : public QValidator +class HexValueValidator : public TQValidator { Q_OBJECT + TQ_OBJECT public: - HexValueValidator(uint nbChars, QObject *parent); - virtual State validate(QString &input, int &pos) const; + HexValueValidator(uint nbChars, TQObject *tqparent); + virtual State validate(TQString &input, int &pos) const; private: uint _nbChars; @@ -31,10 +32,11 @@ private: class GenericHexWordEditor : public KLineEdit { Q_OBJECT + TQ_OBJECT public: - GenericHexWordEditor(uint nbChars, bool hasBlankValue, QWidget *parent); - virtual QSize sizeHint() const; - virtual QSize minimumSizeHint() const; + GenericHexWordEditor(uint nbChars, bool hasBlankValue, TQWidget *tqparent); + virtual TQSize tqsizeHint() const; + virtual TQSize tqminimumSizeHint() const; signals: void modified(); @@ -56,9 +58,9 @@ protected: bool _hasBlankValue; virtual bool isValid() const = 0; - virtual BitValue mask() const = 0; + virtual BitValue tqmask() const = 0; virtual BitValue normalizeWord(BitValue value) const = 0; - virtual bool event(QEvent *e); + virtual bool event(TQEvent *e); virtual void set(); virtual BitValue word() const = 0; virtual void setWord(BitValue value) = 0; @@ -69,8 +71,9 @@ protected: class HexWordEditor : public GenericHexWordEditor { Q_OBJECT + TQ_OBJECT public: - HexWordEditor(uint nbChars, QWidget *parent) : GenericHexWordEditor(nbChars, false, parent) {} + HexWordEditor(uint nbChars, TQWidget *tqparent) : GenericHexWordEditor(nbChars, false, tqparent) {} void setValue(BitValue word) { _word = word; set(); } BitValue value() const { return _word; } @@ -78,8 +81,8 @@ protected: BitValue _word; virtual bool isValid() const { return true; } - virtual BitValue mask() const { return maxValue(NumberBase::Hex, _nbChars); } - virtual BitValue normalizeWord(BitValue value) const { return value.maskWith(mask()); } + virtual BitValue tqmask() const { return maxValue(NumberBase::Hex, _nbChars); } + virtual BitValue normalizeWord(BitValue value) const { return value.tqmaskWith(tqmask()); } virtual BitValue word() const { return _word; } virtual void setWord(BitValue value) { _word = value; } virtual BitValue blankValue() const { return 0; } diff --git a/src/common/gui/key_gui.h b/src/common/gui/key_gui.h index fb8a9f5..5ae0a84 100644 --- a/src/common/gui/key_gui.h +++ b/src/common/gui/key_gui.h @@ -9,9 +9,9 @@ #ifndef KEY_GUI_H #define KEY_GUI_H -#include -#include -#include +#include +#include +#include #include "common/gui/misc_gui.h" #include "common/common/misc.h" @@ -21,10 +21,10 @@ template class KeyWidget { public: - typedef QMapConstIterator ConstIterator; + typedef TQMapConstIterator ConstIterator; public: - KeyWidget(QWidget *parent) { _widget = new WidgetType(parent); } + KeyWidget(TQWidget *tqparent) { _widget = new WidgetType(tqparent); } virtual ~KeyWidget() { delete _widget; } virtual WidgetType *widget() { return _widget; } virtual void clear() { _ids.clear(); } @@ -32,16 +32,16 @@ public: ConstIterator end() const { return _ids.end(); } uint count() const { return _ids.count(); } void appendItem(const KeyType &key, Type type) { - CRASH_ASSERT( !_ids.contains(key) ); + CRASH_ASSERT( !_ids.tqcontains(key) ); _ids[key] = append(type); } KeyType currentItem() const { return key(currentId()); } void setCurrentItem(const KeyType &key) { - if ( _ids.contains(key) ) setCurrentId(_ids[key]); + if ( _ids.tqcontains(key) ) setCurrentId(_ids[key]); } - bool contains(const KeyType &key) const { return _ids.contains(key); } + bool tqcontains(const KeyType &key) const { return _ids.tqcontains(key); } Type item(const KeyType &key) const { - CRASH_ASSERT( _ids.contains(key) ); + CRASH_ASSERT( _ids.tqcontains(key) ); return get(_ids[key]); } Type item(ConstIterator it) const { @@ -60,64 +60,64 @@ protected: virtual void setCurrentId(int id) = 0; virtual Type get(int id) const = 0; - QWidget *_parent; - QMap _ids; + TQWidget *_parent; + TQMap _ids; WidgetType *_widget; }; //----------------------------------------------------------------------------- template -class KeyComboBox : public KeyWidget +class KeyComboBox : public KeyWidget { public: - typedef KeyWidget ParentType; - KeyComboBox(QWidget *parent = 0) : ParentType(parent) {} + typedef KeyWidget ParentType; + KeyComboBox(TQWidget *tqparent = 0) : ParentType(tqparent) {} virtual void clear() { ParentType::clear(); ParentType::_widget->clear(); } void fixMinimumWidth() { - ParentType::_widget->setMinimumWidth(ParentType::_widget->sizeHint().width()); + ParentType::_widget->setMinimumWidth(ParentType::_widget->tqsizeHint().width()); } protected: - virtual int append(QString label) { ParentType::_widget->insertItem(label); return ParentType::_widget->count()-1; } + virtual int append(TQString label) { ParentType::_widget->insertItem(label); return ParentType::_widget->count()-1; } virtual int currentId() const { return ParentType::_widget->currentItem(); } virtual void setCurrentId(int id) { ParentType::_widget->setCurrentItem(id); } - virtual QString get(int id) const { return ParentType::_widget->text(id); } + virtual TQString get(int id) const { return ParentType::_widget->text(id); } }; //----------------------------------------------------------------------------- template -class KeyWidgetStack : public KeyWidget +class KeyWidgetStack : public KeyWidget { public: - typedef KeyWidget ParentType; - KeyWidgetStack(QWidget *parent = 0) : ParentType(parent) {} + typedef KeyWidget ParentType; + KeyWidgetStack(TQWidget *tqparent = 0) : ParentType(tqparent) {} protected: - virtual int append(QWidget *widget) { return ParentType::_widget->addWidget(widget); } + virtual int append(TQWidget *widget) { return ParentType::_widget->addWidget(widget); } virtual int currentId() const { return ParentType::_widget->id(ParentType::_widget->visibleWidget()); } virtual void setCurrentId(int id) { ParentType::_widget->raiseWidget(id); } - virtual QWidget *get(int id) const { return ParentType::_widget->widget(id); } + virtual TQWidget *get(int id) const { return ParentType::_widget->widget(id); } }; //----------------------------------------------------------------------------- template -class KeyPopupButton : public KeyWidget +class KeyPopupButton : public KeyWidget { public: - typedef KeyWidget ParentType; - KeyPopupButton(QWidget *parent = 0) : ParentType(parent) {} + typedef KeyWidget ParentType; + KeyPopupButton(TQWidget *tqparent = 0) : ParentType(tqparent) {} protected: - virtual int append(QString label) { return ParentType::_widget->appendItem(label, QPixmap()); } - virtual QString get(int id) const { return ParentType::_widget->popup()->text(id); } + virtual int append(TQString label) { return ParentType::_widget->appendItem(label, TQPixmap()); } + virtual TQString get(int id) const { return ParentType::_widget->popup()->text(id); } private: // disabled - QString currentItem() const; - void setCurrentItem(const QString &key); + TQString currentItem() const; + void setCurrentItem(const TQString &key); virtual int currentId() const { return 0; } virtual void setCurrentId(int) {} }; diff --git a/src/common/gui/list_container.cpp b/src/common/gui/list_container.cpp index 0103175..78f5a65 100644 --- a/src/common/gui/list_container.cpp +++ b/src/common/gui/list_container.cpp @@ -9,27 +9,27 @@ #include "list_container.h" //---------------------------------------------------------------------------- -PopupContainer::PopupContainer(const QString &title, QWidget *parent, const char *name) - : KPopupMenu(parent, name) +PopupContainer::PopupContainer(const TQString &title, TQWidget *tqparent, const char *name) + : KPopupMenu(tqparent, name) { if ( !title.isEmpty() ) insertTitle(title); } -ListContainer *PopupContainer::appendBranch(const QString &title) +ListContainer *PopupContainer::appendBranch(const TQString &title) { PopupContainer *branch = new PopupContainer(title, this); insertItem(title, branch); return branch; } -ListContainer *PopupContainer::appendBranch(const QPixmap &pixmap, const QString &title) +ListContainer *PopupContainer::appendBranch(const TQPixmap &pixmap, const TQString &title) { PopupContainer *branch = new PopupContainer(title, this); insertItem(pixmap, title, branch); return branch; } -void PopupContainer::appendItem(const QPixmap &icon, const QString &label, uint id, ItemState state) +void PopupContainer::appendItem(const TQPixmap &icon, const TQString &label, uint id, ItemState state) { insertItem(icon, label, id); switch (state) { @@ -41,16 +41,16 @@ void PopupContainer::appendItem(const QPixmap &icon, const QString &label, uint } //---------------------------------------------------------------------------- -ListViewItemContainer::ListViewItemContainer(const QString &title, KListView *parent) - : KListViewItem(parent, title), _parent(0), _column(0) +ListViewItemContainer::ListViewItemContainer(const TQString &title, KListView *tqparent) + : KListViewItem(tqparent, title), _parent(0), _column(0) { - _ids = new QMap; + _ids = new TQMap; } -ListViewItemContainer::ListViewItemContainer(const QString &title, ListViewItemContainer *parent) - : KListViewItem(parent, title), _parent(parent), _column(0) +ListViewItemContainer::ListViewItemContainer(const TQString &title, ListViewItemContainer *tqparent) + : KListViewItem(tqparent, title), _parent(tqparent), _column(0) { - _ids = parent->_ids; + _ids = tqparent->_ids; } ListViewItemContainer::~ListViewItemContainer() @@ -58,38 +58,38 @@ ListViewItemContainer::~ListViewItemContainer() if ( _parent==0 ) delete _ids; } -ListContainer *ListViewItemContainer::appendBranch(const QString &title) +ListContainer *ListViewItemContainer::appendBranch(const TQString &title) { ListViewItemContainer *branch = new ListViewItemContainer(title, this); branch->setColumn(_column); branch->setSelectable(false); // append instead of prepend - QListViewItem *litem=firstChild(); + TQListViewItem *litem=firstChild(); while ( litem && litem->nextSibling() ) litem = litem->nextSibling(); if (litem) branch->moveItem(litem); return branch; } -void ListViewItemContainer::appendItem(const QPixmap &icon, const QString &title, uint id, ItemState state) +void ListViewItemContainer::appendItem(const TQPixmap &icon, const TQString &title, uint id, ItemState state) { - QListViewItem *item = 0; + TQListViewItem *item = 0; if ( state==Normal || state==Disabled ) { item = new KListViewItem(this); item->setText(_column, title); } else { - item = new QCheckListItem(this, title, QCheckListItem::CheckBox); - static_cast(item)->setState(state==Checked ? QCheckListItem::On : QCheckListItem::Off); + item = new TQCheckListItem(this, title, TQCheckListItem::CheckBox); + static_cast(item)->setState(state==Checked ? TQCheckListItem::On : TQCheckListItem::Off); } item->setPixmap(_column, icon); item->setSelectable(state==Normal); // append instead of prepend - QListViewItem *litem=firstChild(); + TQListViewItem *litem=firstChild(); while ( litem && litem->nextSibling() ) litem = litem->nextSibling(); if (litem) item->moveItem(litem); (*_ids)[item] = id; } -int ListViewItemContainer::id(const QListViewItem *item) const +int ListViewItemContainer::id(const TQListViewItem *item) const { - return (_ids->contains(item) ? int((*_ids)[item]) : -1); + return (_ids->tqcontains(item) ? int((*_ids)[item]) : -1); } diff --git a/src/common/gui/list_container.h b/src/common/gui/list_container.h index b70db57..138b9ea 100644 --- a/src/common/gui/list_container.h +++ b/src/common/gui/list_container.h @@ -17,39 +17,40 @@ class ListContainer { public: virtual ~ListContainer() {} - virtual ListContainer *appendBranch(const QString &title) = 0; + virtual ListContainer *appendBranch(const TQString &title) = 0; enum ItemState { Normal, Checked, UnChecked, Disabled }; - void appendItem(const QString &label, uint id, ItemState state) { appendItem(QPixmap(), label, id, state); } - virtual void appendItem(const QPixmap &icon, const QString &label, uint id, ItemState state) = 0; + void appendItem(const TQString &label, uint id, ItemState state) { appendItem(TQPixmap(), label, id, state); } + virtual void appendItem(const TQPixmap &icon, const TQString &label, uint id, ItemState state) = 0; }; //---------------------------------------------------------------------------- class PopupContainer : public KPopupMenu, public ListContainer { Q_OBJECT + TQ_OBJECT public: - PopupContainer(const QString &title, QWidget *parent = 0, const char *name = 0); - virtual ListContainer *appendBranch(const QString &title); - virtual ListContainer *appendBranch(const QPixmap &icon, const QString &title); - virtual void appendItem(const QPixmap &icon, const QString &label, uint id, ItemState state); + PopupContainer(const TQString &title, TQWidget *tqparent = 0, const char *name = 0); + virtual ListContainer *appendBranch(const TQString &title); + virtual ListContainer *appendBranch(const TQPixmap &icon, const TQString &title); + virtual void appendItem(const TQPixmap &icon, const TQString &label, uint id, ItemState state); }; //---------------------------------------------------------------------------- class ListViewItemContainer : public KListViewItem, public ListContainer { public: - ListViewItemContainer(const QString &title, KListView *parent); - ListViewItemContainer(const QString &title, ListViewItemContainer *parent); + ListViewItemContainer(const TQString &title, KListView *tqparent); + ListViewItemContainer(const TQString &title, ListViewItemContainer *tqparent); virtual ~ListViewItemContainer(); void setColumn(uint column) { _column = column; } - virtual ListContainer *appendBranch(const QString &title); - virtual void appendItem(const QPixmap &icon, const QString &label, uint id, ItemState state); - int id(const QListViewItem* item) const; // -1 if not known + virtual ListContainer *appendBranch(const TQString &title); + virtual void appendItem(const TQPixmap &icon, const TQString &label, uint id, ItemState state); + int id(const TQListViewItem* item) const; // -1 if not known private: ListViewItemContainer *_parent; uint _column; - QMap *_ids; + TQMap *_ids; }; #endif diff --git a/src/common/gui/list_view.cpp b/src/common/gui/list_view.cpp index c9434f3..4d5ac14 100644 --- a/src/common/gui/list_view.cpp +++ b/src/common/gui/list_view.cpp @@ -9,18 +9,18 @@ ***************************************************************************/ #include "list_view.h" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include //---------------------------------------------------------------------------- -ListView::ListView(QWidget *parent, const char *name) - : KListView(parent, name) +ListView::ListView(TQWidget *tqparent, const char *name) + : KListView(tqparent, name) { - QToolTip::remove(this); + TQToolTip::remove(this); _tooltip = new ListViewToolTip(this); } @@ -29,9 +29,9 @@ ListView::~ListView() delete _tooltip; } -QString ListView::tooltip(const QListViewItem &, int) const +TQString ListView::tooltip(const TQListViewItem &, int) const { - return QString::null; + return TQString(); } void ListView::clear() @@ -40,16 +40,16 @@ void ListView::clear() KListView::clear(); } -bool ListView::eventFilter(QObject *o, QEvent *e) +bool ListView::eventFilter(TQObject *o, TQEvent *e) { - QValueList::const_iterator it; + TQValueList::const_iterator it; for (it=_editItems.begin(); it!=_editItems.end(); ++it) { for (uint i=0; i<(*it)->_editWidgets.count(); i++) { - if ( (*it)->_editWidgets[i]==o ) { + if ( TQT_BASE_OBJECT((*it)->_editWidgets[i])==TQT_BASE_OBJECT(o) ) { //qDebug("event %i", e->type()); switch (e->type()) { - case QEvent::KeyPress: { - QKeyEvent *ke = static_cast(e); + case TQEvent::KeyPress: { + TQKeyEvent *ke = TQT_TQKEYEVENT(e); switch (ke->key()) { case Key_Enter: case Key_Return: @@ -61,12 +61,12 @@ bool ListView::eventFilter(QObject *o, QEvent *e) } break; } - case QEvent::FocusOut: { - //qDebug("focus out %i %i=%i", qApp->focusWidget(), focusWidget(), (*it)->_editWidgets[i]); - if ( qApp->focusWidget() && focusWidget()==(*it)->_editWidgets[i] ) break; + case TQEvent::FocusOut: { + //qDebug("focus out %i %i=%i", tqApp->tqfocusWidget(), tqfocusWidget(), (*it)->_editWidgets[i]); + if ( tqApp->tqfocusWidget() && tqfocusWidget()==(*it)->_editWidgets[i] ) break; //qDebug("ext"); - QCustomEvent *e = new QCustomEvent(9999); - QApplication::postEvent(o, e); + TQCustomEvent *e = new TQCustomEvent(9999); + TQApplication::postEvent(o, e); return true; } case 9999: @@ -84,21 +84,21 @@ bool ListView::eventFilter(QObject *o, QEvent *e) void ListView::stopRenaming(bool force) { - QValueList::const_iterator it; + TQValueList::const_iterator it; for (it=_editItems.begin(); it!=_editItems.end(); ++it) if ( (*it)->isRenaming() ) (*it)->renameDone(force); } //---------------------------------------------------------------------------- -void ListViewToolTip::maybeTip(const QPoint &p) +void ListViewToolTip::maybeTip(const TQPoint &p) { if ( _listView==0 ) return; - const QListViewItem* item = _listView->itemAt(p); + const TQListViewItem* item = _listView->itemAt(p); if ( item==0 ) return; - QRect rect = _listView->itemRect(item); + TQRect rect = _listView->tqitemRect(item); if ( !rect.isValid() ) return; int col = _listView->header()->sectionAt(p.x()); - QString text = _listView->tooltip(*item, col); + TQString text = _listView->tooltip(*item, col); if ( !text.isEmpty() ) { int hpos = _listView->header()->sectionPos(col); rect.setLeft(hpos); @@ -128,17 +128,17 @@ EditListViewItem::~EditListViewItem() for (uint i=0; i<_editWidgets.count(); i++) delete _editWidgets[i]; } -void EditListViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int align) +void EditListViewItem::paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int align) { if ( columnfillRect(0, 0, width, height(), cg.color(QColorGroup::Background)); + p->fillRect(0, 0, width, height(), cg.color(TQColorGroup::Background)); else KListViewItem::paintCell(p, cg, column, width, align); } void EditListViewItem::startRename() { if ( !renameEnabled(0) ) return; - QListView *lv = listView(); + TQListView *lv = listView(); if ( !lv ) return; KListViewItem::startRename(0); if (renameBox) { @@ -149,8 +149,8 @@ void EditListViewItem::startRename() _renaming = true; _editWidgets.resize(lv->columns()); for (uint i=0; i<_editWidgets.count(); i++) { - QRect r = lv->itemRect(this); - r = QRect(lv->viewportToContents(r.topLeft()), r.size()); + TQRect r = lv->tqitemRect(this); + r = TQRect(lv->viewportToContents(r.topLeft()), r.size()); r.setLeft(lv->header()->sectionPos(i)); r.setWidth(lv->header()->sectionSize(i) - 1); if ( i==0 ) r.setLeft(r.left() + lv->itemMargin() + (depth() + (lv->rootIsDecorated() ? 1 : 0)) * lv->treeStepSize() - 1); @@ -162,7 +162,7 @@ void EditListViewItem::startRename() if ( _editWidgets[i]==0 ) continue; _editWidgets[i]->installEventFilter(lv); lv->addChild(_editWidgets[i], r.x(), r.y()); - uint w = QMIN(r.width(), _editWidgets[i]->sizeHint().width()); + uint w = TQMIN(r.width(), _editWidgets[i]->tqsizeHint().width()); _editWidgets[i]->resize(w, r.height()); lv->viewport()->setFocusProxy(_editWidgets[i]); _editWidgets[i]->setFocus(); @@ -172,7 +172,7 @@ void EditListViewItem::startRename() void EditListViewItem::removeEditBox() { - QListView *lv = listView(); + TQListView *lv = listView(); if ( !lv ) return; _renaming = false; bool resetFocus = false; @@ -189,17 +189,17 @@ void EditListViewItem::removeEditBox() } } -void EditListViewItem::editDone(int col, const QWidget *edit) +void EditListViewItem::editDone(int col, const TQWidget *edit) { - if ( edit->metaObject()->findProperty("text", true)!=-1 ) + if ( edit->tqmetaObject()->tqfindProperty("text", true)!=-1 ) emit listView()->itemRenamed(this, col, edit->property("text").toString()); - else if ( edit->metaObject()->findProperty("currentText", true)!=-1 ) + else if ( edit->tqmetaObject()->tqfindProperty("currentText", true)!=-1 ) emit listView()->itemRenamed(this, col, edit->property("currentText").toString()); } void EditListViewItem::renameDone(bool force) { - QListView *lv = listView(); + TQListView *lv = listView(); if ( !lv || !_renaming ) return; _renaming = false; for (uint i=0; i<_editWidgets.count(); i++) { @@ -210,12 +210,12 @@ void EditListViewItem::renameDone(bool force) removeEditBox(); } -int EditListViewItem::width(const QFontMetrics &fm, const QListView *lv, int col) const +int EditListViewItem::width(const TQFontMetrics &fm, const TQListView *lv, int col) const { int w = KListViewItem::width(fm, lv, col); - QWidget *edit = editWidgetFactory(col); + TQWidget *edit = editWidgetFactory(col); if ( edit==0 ) return w; - w = QMAX(w, edit->sizeHint().width()); + w = TQMAX(w, edit->tqsizeHint().width()); delete edit; return w; } diff --git a/src/common/gui/list_view.h b/src/common/gui/list_view.h index 09ca984..c76ef46 100644 --- a/src/common/gui/list_view.h +++ b/src/common/gui/list_view.h @@ -9,8 +9,8 @@ #ifndef LIST_VIEW_H #define LIST_VIEW_H -#include -#include +#include +#include #define private public #define protected public #include @@ -24,36 +24,37 @@ class ListViewToolTip; class ListView : public KListView { Q_OBJECT + TQ_OBJECT public: - ListView(QWidget *parent = 0, const char *name = 0); + ListView(TQWidget *tqparent = 0, const char *name = 0); virtual ~ListView(); virtual void clear(); void stopRenaming(bool force); - virtual QString tooltip(const QListViewItem &item, int column) const; + virtual TQString tooltip(const TQListViewItem &item, int column) const; public slots: void cancelRenaming() { stopRenaming(false); } void finishRenaming() { stopRenaming(true); } protected: - virtual bool eventFilter(QObject *o, QEvent *e); + virtual bool eventFilter(TQObject *o, TQEvent *e); private: ListViewToolTip *_tooltip; - QValueList _editItems; + TQValueList _editItems; friend class EditListViewItem; }; //----------------------------------------------------------------------------- -class ListViewToolTip : public QToolTip +class ListViewToolTip : public TQToolTip { public: - ListViewToolTip(ListView *parent) - : QToolTip(parent->viewport()), _listView(parent) {} + ListViewToolTip(ListView *tqparent) + : TQToolTip(tqparent->viewport()), _listView(tqparent) {} protected: - virtual void maybeTip(const QPoint &p); + virtual void maybeTip(const TQPoint &p); private: ListView *_listView; @@ -70,15 +71,15 @@ public: bool isRenaming() const { return _renaming; } protected: - virtual QWidget *editWidgetFactory(int col) const = 0; + virtual TQWidget *editWidgetFactory(int col) const = 0; virtual bool alwaysAcceptEdit(int col) const = 0; - virtual int width(const QFontMetrics &fm, const QListView *lv, int c) const; - virtual void editDone(int col, const QWidget *editWidget); - virtual void paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int align); + virtual int width(const TQFontMetrics &fm, const TQListView *lv, int c) const; + virtual void editDone(int col, const TQWidget *editWidget); + virtual void paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int align); private: bool _renaming; - QValueVector _editWidgets; + TQValueVector _editWidgets; virtual void activate() { startRename(); } virtual void startRename(int) { startRename(); } diff --git a/src/common/gui/misc_gui.cpp b/src/common/gui/misc_gui.cpp index 00f4997..fadf7a9 100644 --- a/src/common/gui/misc_gui.cpp +++ b/src/common/gui/misc_gui.cpp @@ -8,16 +8,16 @@ ***************************************************************************/ #include "misc_gui.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -31,92 +31,92 @@ #include "common/gui/number_gui.h" //----------------------------------------------------------------------------- -bool BusyCursor::_overridePaused = false; +bool PBusyCursor::_overridePaused = false; -void BusyCursor::start() +void PBusyCursor::start() { - QApplication::setOverrideCursor(KCursor::waitCursor(), true); + TQApplication::setOverrideCursor(KCursor::waitCursor(), true); } -void BusyCursor::stop() +void PBusyCursor::stop() { - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); } -void BusyCursor::pause() +void PBusyCursor::pause() { - _overridePaused = QApplication::overrideCursor(); + _overridePaused = TQApplication::overrideCursor(); stop(); } -void BusyCursor::restore() +void PBusyCursor::restore() { if (_overridePaused) start(); } //----------------------------------------------------------------------------- -void MessageBox::information(const QString &text, Log::ShowMode show, const QString &dontShowAgainName) +void MessageBox::information(const TQString &text, Log::ShowMode show, const TQString &dontShowAgainName) { if ( show==Log::DontShow ) return; - BusyCursor::pause(); - KMessageBox::information(qApp->mainWidget(), text, QString::null, dontShowAgainName, KMessageBox::Notify | KMessageBox::AllowLink); - BusyCursor::restore(); + PBusyCursor::pause(); + KMessageBox::information(tqApp->mainWidget(), text, TQString(), dontShowAgainName, KMessageBox::Notify | KMessageBox::AllowLink); + PBusyCursor::restore(); } -void MessageBox::detailedSorry(const QString &text, const QString &details, Log::ShowMode show) +void MessageBox::detailedSorry(const TQString &text, const TQString &details, Log::ShowMode show) { if ( show==Log::DontShow ) return; - BusyCursor::pause(); - if ( details.isEmpty() ) KMessageBox::sorry(qApp->mainWidget(), text, QString::null, KMessageBox::Notify | KMessageBox::AllowLink); - else KMessageBox::detailedSorry(qApp->mainWidget(), text, details, QString::null, KMessageBox::Notify | KMessageBox::AllowLink); - BusyCursor::restore(); + PBusyCursor::pause(); + if ( details.isEmpty() ) KMessageBox::sorry(tqApp->mainWidget(), text, TQString(), KMessageBox::Notify | KMessageBox::AllowLink); + else KMessageBox::detailedSorry(tqApp->mainWidget(), text, details, TQString(), KMessageBox::Notify | KMessageBox::AllowLink); + PBusyCursor::restore(); } -bool MessageBox::askContinue(const QString &text, const KGuiItem &buttonContinue, const QString &caption) +bool MessageBox::askContinue(const TQString &text, const KGuiItem &buttonContinue, const TQString &caption) { - ::BusyCursor::pause(); - int res = KMessageBox::warningContinueCancel(qApp->mainWidget(), text, caption, buttonContinue); - ::BusyCursor::restore(); + ::PBusyCursor::pause(); + int res = KMessageBox::warningContinueCancel(tqApp->mainWidget(), text, caption, buttonContinue); + ::PBusyCursor::restore(); return ( res==KMessageBox::Continue ); } -bool MessageBox::questionYesNo(const QString &text, const KGuiItem &yesButton,const KGuiItem &noButton, const QString &caption) +bool MessageBox::questionYesNo(const TQString &text, const KGuiItem &yesButton,const KGuiItem &noButton, const TQString &caption) { - ::BusyCursor::pause(); - int res = KMessageBox::questionYesNo(qApp->mainWidget(), text, caption, yesButton, noButton); - ::BusyCursor::restore(); + ::PBusyCursor::pause(); + int res = KMessageBox::questionYesNo(tqApp->mainWidget(), text, caption, yesButton, noButton); + ::PBusyCursor::restore(); return ( res==KMessageBox::Yes ); } -MessageBox::Result MessageBox::questionYesNoCancel(const QString &text, const KGuiItem &yesButton, const KGuiItem &noButton, - const QString &caption) +MessageBox::Result MessageBox::questionYesNoCancel(const TQString &text, const KGuiItem &yesButton, const KGuiItem &noButton, + const TQString &caption) { - ::BusyCursor::pause(); - int res = KMessageBox::questionYesNoCancel(qApp->mainWidget(), text, caption, yesButton, noButton); - ::BusyCursor::restore(); + ::PBusyCursor::pause(); + int res = KMessageBox::questionYesNoCancel(tqApp->mainWidget(), text, caption, yesButton, noButton); + ::PBusyCursor::restore(); if ( res==KMessageBox::Yes ) return Yes; if ( res==KMessageBox::No ) return No; return Cancel; } -void MessageBox::text(const QString &text, Log::ShowMode show) +void MessageBox::text(const TQString &text, Log::ShowMode show) { if ( show==Log::DontShow ) return; - BusyCursor::pause(); - TextEditorDialog dialog(text, QString::null, false, qApp->mainWidget()); + PBusyCursor::pause(); + TextEditorDialog dialog(text, TQString(), false, tqApp->mainWidget()); dialog.exec(); - BusyCursor::restore(); + PBusyCursor::restore(); } //---------------------------------------------------------------------------- -PopupButton::PopupButton(QWidget *parent, const char *name) - : KPushButton(parent, name) +PopupButton::PopupButton(TQWidget *tqparent, const char *name) + : KPushButton(tqparent, name) { init(); } -PopupButton::PopupButton(const QString &text, QWidget *parent, const char *name) - : KPushButton(text, parent, name) +PopupButton::PopupButton(const TQString &text, TQWidget *tqparent, const char *name) + : KPushButton(text, tqparent, name) { init(); } @@ -125,8 +125,8 @@ void PopupButton::init() { _separator = false; setFlat(true); - QPopupMenu *popup = new QPopupMenu(this); - connect(popup, SIGNAL(activated(int)), SIGNAL(activated(int))); + TQPopupMenu *popup = new TQPopupMenu(this); + connect(popup, TQT_SIGNAL(activated(int)), TQT_SIGNAL(activated(int))); setPopup(popup); } @@ -137,20 +137,20 @@ void PopupButton::appendAction(KAction *action) action->plug(popup()); } -void PopupButton::appendAction(const QString &label, const QString &icon, - QObject *receiver, const char *slot) +void PopupButton::appendAction(const TQString &label, const TQString &icon, + TQObject *receiver, const char *slot) { appendAction(new KAction(label, icon, 0, receiver, slot, (KActionCollection *)0)); } -int PopupButton::appendItem(const QString &label, const QString &icon, int id) +int PopupButton::appendItem(const TQString &label, const TQString &icon, int id) { KIconLoader loader; - QPixmap pixmap = loader.loadIcon(icon, KIcon::Small); + TQPixmap pixmap = loader.loadIcon(icon, KIcon::Small); return appendItem(label, pixmap, id); } -int PopupButton::appendItem(const QString &label, const QPixmap &icon, int id) +int PopupButton::appendItem(const TQString &label, const TQPixmap &icon, int id) { if ( _separator && popup()->count()!=0 ) popup()->insertSeparator(); _separator = false; @@ -158,41 +158,41 @@ int PopupButton::appendItem(const QString &label, const QPixmap &icon, int id) } //----------------------------------------------------------------------------- -Splitter::Splitter(const QValueList &defaultSizes, Orientation o, QWidget *parent, const char *name) - : QSplitter(o, parent, name), _defaultSizes(defaultSizes) +Splitter::Splitter(const TQValueList &defaultSizes, Qt::Orientation o, TQWidget *tqparent, const char *name) + : TQSplitter(o, tqparent, name), _defaultSizes(defaultSizes) { Q_ASSERT(name); setOpaqueResize(true); - QTimer::singleShot(0, this, SLOT(updateSizes())); + TQTimer::singleShot(0, this, TQT_SLOT(updateSizes())); } Splitter::~Splitter() { GuiConfig gc; - gc.writeEntry(QString(name()) + "_sizes", sizes()); + gc.writeEntry(TQString(name()) + "_sizes", sizes()); } void Splitter::updateSizes() { GuiConfig gc; - QValueList sizes = gc.readIntListEntry(QString(name()) + "_sizes"); + TQValueList sizes = gc.readIntListEntry(TQString(name()) + "_sizes"); for (uint i=sizes.count(); i<_defaultSizes.count(); i++) sizes.append(_defaultSizes[i]); setSizes(sizes); } //----------------------------------------------------------------------------- -TabBar::TabBar(QWidget *parent, const char *name) - : KTabBar(parent, name), _ignoreWheelEvent(false) +TabBar::TabBar(TQWidget *tqparent, const char *name) + : KTabBar(tqparent, name), _ignoreWheelEvent(false) {} -void TabBar::wheelEvent(QWheelEvent *e) +void TabBar::wheelEvent(TQWheelEvent *e) { - if (_ignoreWheelEvent) QApplication::sendEvent(parent(), e); // #### not sure why ignoring is not enough... + if (_ignoreWheelEvent) TQApplication::sendEvent(tqparent(), e); // #### not sure why ignoring is not enough... else KTabBar::wheelEvent(e); } -TabWidget::TabWidget(QWidget *parent, const char *name) - : KTabWidget(parent, name) +TabWidget::TabWidget(TQWidget *tqparent, const char *name) + : KTabWidget(tqparent, name) { setTabBar(new TabBar(this)); } @@ -202,7 +202,7 @@ void TabWidget::setIgnoreWheelEvent(bool ignore) static_cast(tabBar())->_ignoreWheelEvent = ignore; } -void TabWidget::wheelEvent(QWheelEvent *e) +void TabWidget::wheelEvent(TQWheelEvent *e) { if (static_cast(tabBar())->_ignoreWheelEvent) e->ignore(); else KTabWidget::wheelEvent(e); @@ -211,24 +211,24 @@ void TabWidget::wheelEvent(QWheelEvent *e) void TabWidget::setTabBar(TabBar *tabbar) { KTabWidget::setTabBar(tabbar); - connect(tabBar(), SIGNAL(contextMenu( int, const QPoint & )), SLOT(contextMenu( int, const QPoint & ))); - connect(tabBar(), SIGNAL(mouseDoubleClick( int )), SLOT(mouseDoubleClick( int ))); - connect(tabBar(), SIGNAL(mouseMiddleClick( int )), SLOT(mouseMiddleClick( int ))); - connect(tabBar(), SIGNAL(initiateDrag( int )), SLOT(initiateDrag( int ))); - connect(tabBar(), SIGNAL(testCanDecode(const QDragMoveEvent *, bool & )), SIGNAL(testCanDecode(const QDragMoveEvent *, bool & ))); - connect(tabBar(), SIGNAL(receivedDropEvent( int, QDropEvent * )), SLOT(receivedDropEvent( int, QDropEvent * ))); - connect(tabBar(), SIGNAL(moveTab( int, int )), SLOT(moveTab( int, int ))); - connect(tabBar(), SIGNAL(closeRequest( int )), SLOT(closeRequest( int ))); - connect(tabBar(), SIGNAL(wheelDelta( int )), SLOT(wheelDelta( int ))); + connect(tabBar(), TQT_SIGNAL(contextMenu( int, const TQPoint & )), TQT_SLOT(contextMenu( int, const TQPoint & ))); + connect(tabBar(), TQT_SIGNAL(mouseDoubleClick( int )), TQT_SLOT(mouseDoubleClick( int ))); + connect(tabBar(), TQT_SIGNAL(mouseMiddleClick( int )), TQT_SLOT(mouseMiddleClick( int ))); + connect(tabBar(), TQT_SIGNAL(initiateDrag( int )), TQT_SLOT(initiateDrag( int ))); + connect(tabBar(), TQT_SIGNAL(testCanDecode(const TQDragMoveEvent *, bool & )), TQT_SIGNAL(testCanDecode(const TQDragMoveEvent *, bool & ))); + connect(tabBar(), TQT_SIGNAL(receivedDropEvent( int, TQDropEvent * )), TQT_SLOT(receivedDropEvent( int, TQDropEvent * ))); + connect(tabBar(), TQT_SIGNAL(moveTab( int, int )), TQT_SLOT(moveTab( int, int ))); + connect(tabBar(), TQT_SIGNAL(closeRequest( int )), TQT_SLOT(closeRequest( int ))); + connect(tabBar(), TQT_SIGNAL(wheelDelta( int )), TQT_SLOT(wheelDelta( int ))); } //----------------------------------------------------------------------------- -ComboBox::ComboBox(QWidget *parent, const char *name) - : QComboBox(parent, name), _ignoreWheelEvent(false) +ComboBox::ComboBox(TQWidget *tqparent, const char *name) + : TQComboBox(tqparent, name), _ignoreWheelEvent(false) {} -void ComboBox::wheelEvent(QWheelEvent *e) +void ComboBox::wheelEvent(TQWheelEvent *e) { - if (_ignoreWheelEvent) QApplication::sendEvent(parent(), e); // #### not sure why ignoring is not enough... - else QComboBox::wheelEvent(e); + if (_ignoreWheelEvent) TQApplication::sendEvent(tqparent(), e); // #### not sure why ignoring is not enough... + else TQComboBox::wheelEvent(e); } diff --git a/src/common/gui/misc_gui.h b/src/common/gui/misc_gui.h index 2d58569..7003f91 100644 --- a/src/common/gui/misc_gui.h +++ b/src/common/gui/misc_gui.h @@ -9,12 +9,12 @@ #ifndef MISC_GUI_H #define MISC_GUI_H -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include @@ -29,11 +29,11 @@ class KAction; #include "common/common/number.h" //----------------------------------------------------------------------------- -class BusyCursor +class PBusyCursor { public: - BusyCursor() { start(); } - ~BusyCursor() { stop(); } + PBusyCursor() { start(); } + ~PBusyCursor() { stop(); } static void start(); static void stop(); static void pause(); @@ -46,32 +46,33 @@ private: //----------------------------------------------------------------------------- namespace MessageBox { -extern void information(const QString &text, Log::ShowMode show, const QString &dontShowAgainName = QString::null); -extern void detailedSorry(const QString &text, const QString &details, Log::ShowMode show); -inline void sorry(const QString &text, Log::ShowMode show) { detailedSorry(text, QString::null, show); } -extern bool askContinue(const QString &text, const KGuiItem &continueButton = KStdGuiItem::cont(), - const QString &caption = i18n("Warning")); -extern bool questionYesNo(const QString &text, const KGuiItem &yesButton, const KGuiItem &noButton, - const QString &caption = i18n("Warning")); +extern void information(const TQString &text, Log::ShowMode show, const TQString &dontShowAgainName = TQString()); +extern void detailedSorry(const TQString &text, const TQString &details, Log::ShowMode show); +inline void sorry(const TQString &text, Log::ShowMode show) { detailedSorry(text, TQString(), show); } +extern bool askContinue(const TQString &text, const KGuiItem &continueButton = KStdGuiItem::cont(), + const TQString &caption = i18n("Warning")); +extern bool questionYesNo(const TQString &text, const KGuiItem &yesButton, const KGuiItem &noButton, + const TQString &caption = i18n("Warning")); enum Result { Yes, No, Cancel }; -extern Result questionYesNoCancel(const QString &text, const KGuiItem &yesButton, const KGuiItem &noButton, - const QString &caption = i18n("Warning")); -extern void text(const QString &text, Log::ShowMode show); +extern Result questionYesNoCancel(const TQString &text, const KGuiItem &yesButton, const KGuiItem &noButton, + const TQString &caption = i18n("Warning")); +extern void text(const TQString &text, Log::ShowMode show); } //---------------------------------------------------------------------------- class PopupButton : public KPushButton { Q_OBJECT + TQ_OBJECT public: - PopupButton(QWidget *parent = 0, const char *name = 0); - PopupButton(const QString &text, QWidget *parent = 0, const char *name = 0); + PopupButton(TQWidget *tqparent = 0, const char *name = 0); + PopupButton(const TQString &text, TQWidget *tqparent = 0, const char *name = 0); void appendAction(KAction *action); - void appendAction(const QString &label, const QString &icon = QString::null, - QObject *receiver = 0, const char *slot = 0); - int appendItem(const QString &label, uint id) { return appendItem(label, QPixmap(), id); } - int appendItem(const QString &label, const QString &icon, int id = -1); - int appendItem(const QString &label, const QPixmap &icon, int id = -1); + void appendAction(const TQString &label, const TQString &icon = TQString(), + TQObject *receiver = 0, const char *slot = 0); + int appendItem(const TQString &label, uint id) { return appendItem(label, TQPixmap(), id); } + int appendItem(const TQString &label, const TQString &icon, int id = -1); + int appendItem(const TQString &label, const TQPixmap &icon, int id = -1); void appendSeparator() { _separator = true; } signals: @@ -84,19 +85,20 @@ private: }; //----------------------------------------------------------------------------- -class Splitter : public QSplitter +class Splitter : public TQSplitter { Q_OBJECT + TQ_OBJECT public: - Splitter(const QValueList &defaultSizes, Orientation orientation, - QWidget *parent, const char *name); + Splitter(const TQValueList &defaultSizes, Qt::Orientation orientation, + TQWidget *tqparent, const char *name); virtual ~Splitter(); private slots: void updateSizes(); private: - QValueList _defaultSizes; + TQValueList _defaultSizes; }; //----------------------------------------------------------------------------- @@ -107,12 +109,13 @@ public: }; //----------------------------------------------------------------------------- -class SeparatorWidget : public QFrame +class SeparatorWidget : public TQFrame { Q_OBJECT + TQ_OBJECT public: - SeparatorWidget(QWidget *parent) : QFrame(parent, "separator") { - setFrameStyle(QFrame::Panel | QFrame::Sunken); + SeparatorWidget(TQWidget *tqparent) : TQFrame(tqparent, "separator") { + setFrameStyle(TQFrame::Panel | TQFrame::Sunken); setMargin(2); setFixedHeight(2*2); } @@ -122,11 +125,12 @@ public: class TabBar : public KTabBar { Q_OBJECT + TQ_OBJECT public: - TabBar(QWidget *parent = 0, const char *name = 0); + TabBar(TQWidget *tqparent = 0, const char *name = 0); protected: - virtual void wheelEvent(QWheelEvent *e); + virtual void wheelEvent(TQWheelEvent *e); private: bool _ignoreWheelEvent; @@ -137,25 +141,27 @@ private: class TabWidget : public KTabWidget { Q_OBJECT + TQ_OBJECT public: - TabWidget(QWidget *parent = 0, const char *name = 0); + TabWidget(TQWidget *tqparent = 0, const char *name = 0); void setIgnoreWheelEvent(bool ignore); protected: - virtual void wheelEvent(QWheelEvent *e); + virtual void wheelEvent(TQWheelEvent *e); void setTabBar(TabBar *tabbar); }; //----------------------------------------------------------------------------- -class ComboBox : public QComboBox +class ComboBox : public TQComboBox { Q_OBJECT + TQ_OBJECT public: - ComboBox(QWidget *parent = 0, const char *name = 0); + ComboBox(TQWidget *tqparent = 0, const char *name = 0); void setIgnoreWheelEvent(bool ignore) { _ignoreWheelEvent = ignore; } protected: - virtual void wheelEvent(QWheelEvent *e); + virtual void wheelEvent(TQWheelEvent *e); private: bool _ignoreWheelEvent; diff --git a/src/common/gui/number_gui.cpp b/src/common/gui/number_gui.cpp index d855407..1a84a36 100644 --- a/src/common/gui/number_gui.cpp +++ b/src/common/gui/number_gui.cpp @@ -8,65 +8,65 @@ ***************************************************************************/ #include "number_gui.h" -#include +#include //----------------------------------------------------------------------------- -uint maxCharWidth(const QString &s, const QFont &font) +uint maxCharWidth(const TQString &s, const TQFont &font) { - QFontMetrics fm(font); + TQFontMetrics fm(font); uint w = 0; for (uint i=0; i +#include #include #include "common/common/number.h" //----------------------------------------------------------------------------- -extern uint maxCharWidth(const QString &s, const QFont &font); -extern uint maxCharWidth(NumberBase base, const QFont &font); -inline uint maxStringWidth(NumberBase base, uint nbChars, const QFont &font) { return nbChars * maxCharWidth(base, font); } -extern uint maxLabelWidth(NumberBase base, uint nbChars, const QFont &font); +extern uint maxCharWidth(const TQString &s, const TQFont &font); +extern uint maxCharWidth(NumberBase base, const TQFont &font); +inline uint maxStringWidth(NumberBase base, uint nbChars, const TQFont &font) { return nbChars * maxCharWidth(base, font); } +extern uint maxLabelWidth(NumberBase base, uint nbChars, const TQFont &font); -extern QValidator::State validateNumber(const QString &s); +extern TQValidator::State validateNumber(const TQString &s); //----------------------------------------------------------------------------- class NumberLineEdit : public KLineEdit { Q_OBJECT + TQ_OBJECT public: - NumberLineEdit(QWidget *parent = 0, const char *name = 0); - NumberLineEdit(const QString &text, QWidget *parent = 0, const char *name = 0); + NumberLineEdit(TQWidget *tqparent = 0, const char *name = 0); + NumberLineEdit(const TQString &text, TQWidget *tqparent = 0, const char *name = 0); uint value(bool *ok = 0) const { return fromAnyLabel(text(), ok); } - void setColor(const QColor &color) { setPaletteForegroundColor(color); } + void setColor(const TQColor &color) { setPaletteForegroundColor(color); } void unsetColor() { unsetPalette(); } private slots: diff --git a/src/common/gui/pfile_ext.cpp b/src/common/gui/pfile_ext.cpp index d42de16..43f9e81 100644 --- a/src/common/gui/pfile_ext.cpp +++ b/src/common/gui/pfile_ext.cpp @@ -8,7 +8,7 @@ ***************************************************************************/ #include "pfile_ext.h" -#include +#include #include #include #include "common/gui/misc_gui.h" @@ -18,11 +18,11 @@ bool PURL::File::openForWrite() { close(); if (_tmp) delete _tmp; - _tmp = new KTempFile(QString::null, _extension); + _tmp = new KTempFile(TQString(), _extension); _tmp->setAutoDelete(true); if ( _tmp->status()!=0 ) { _error = i18n("Could not create temporary file."); - _log.sorry(_error, i18n("File: %1").arg(_tmp->name())); + _log.sorry(_error, i18n("File: %1").tqarg(_tmp->name())); return false; } return true; @@ -35,11 +35,11 @@ bool PURL::File::close() bool ok = (_tmp ? _tmp->status() : _file->status())==IO_Ok; if ( !_file->name().isEmpty() ) { KIO::NetAccess::removeTempFile(_file->name()); - _file->setName(QString::null); + _file->setName(TQString()); } delete _stream; _stream = 0; - if ( ok && _tmp && !_url.isEmpty() && !KIO::NetAccess::upload(_tmp->name(), _url.kurl(), qApp->mainWidget()) ) { + if ( ok && _tmp && !_url.isEmpty() && !KIO::NetAccess::upload(_tmp->name(), _url.kurl(), tqApp->mainWidget()) ) { _error = KIO::NetAccess::lastErrorString(); ok = false; _log.sorry(i18n("Could not save file."), errorString()); @@ -52,8 +52,8 @@ bool PURL::File::close() bool PURL::File::openForRead() { close(); - QString tmp; - if ( !KIO::NetAccess::download(_url.kurl(), tmp, qApp->mainWidget()) ) { + TQString tmp; + if ( !KIO::NetAccess::download(_url.kurl(), tmp, tqApp->mainWidget()) ) { _error = KIO::NetAccess::lastErrorString(); _log.sorry(i18n("Could not open file for reading."), errorString()); return false; @@ -61,7 +61,7 @@ bool PURL::File::openForRead() _file->setName(tmp); if ( !_file->open(IO_ReadOnly) ) { _error = i18n("Could not open temporary file."); - _log.sorry(_error, i18n("File: %1").arg(_file->name())); + _log.sorry(_error, i18n("File: %1").tqarg(_file->name())); return false; } return true; @@ -75,7 +75,7 @@ bool PURL::File::remove() } //----------------------------------------------------------------------------- -PURL::TempFile::TempFile(Log::Generic &log, const QString &extension) +PURL::TempFile::TempFile(Log::Generic &log, const TQString &extension) : FileBase(log, extension) {} @@ -92,7 +92,7 @@ bool PURL::TempFile::close() _tmp->close(); if ( _tmp->status()!=IO_Ok ) { _error = i18n("Could not write to temporary file."); - _log.sorry(_error, i18n("File: %1").arg(_tmp->name())); + _log.sorry(_error, i18n("File: %1").tqarg(_tmp->name())); return false; } } @@ -103,11 +103,11 @@ bool PURL::TempFile::openForWrite() { close(); if (_tmp) delete _tmp; - _tmp = new KTempFile(QString::null, _extension); + _tmp = new KTempFile(TQString(), _extension); _tmp->setAutoDelete(true); if ( _tmp->status()!=0 ) { _error = i18n("Could not create temporary file."); - _log.sorry(_error, i18n("File: %1").arg(_tmp->name())); + _log.sorry(_error, i18n("File: %1").tqarg(_tmp->name())); return false; } return true; diff --git a/src/common/gui/pfile_ext.h b/src/common/gui/pfile_ext.h index 14c007a..0158ee4 100644 --- a/src/common/gui/pfile_ext.h +++ b/src/common/gui/pfile_ext.h @@ -17,7 +17,7 @@ namespace PURL class TempFile : public FileBase { public: - TempFile(Log::Generic &log, const QString &extension = QString::null); + TempFile(Log::Generic &log, const TQString &extension = TQString()); ~TempFile() { close(); } Url url() const; bool close(); diff --git a/src/common/gui/purl_ext.cpp b/src/common/gui/purl_ext.cpp index 5d69d05..df657a7 100644 --- a/src/common/gui/purl_ext.cpp +++ b/src/common/gui/purl_ext.cpp @@ -8,8 +8,8 @@ ***************************************************************************/ #include "common/global/purl.h" -#include -#include +#include +#include #include #include #include @@ -27,7 +27,7 @@ bool PURL::Url::copyTo(const Url &destination, Log::Generic &log) const // } //#else // do not overwrite - bool ok = KIO::NetAccess::file_copy(_url, destination._url, -1, false, false, qApp->mainWidget()); + bool ok = KIO::NetAccess::file_copy(_url, destination._url, -1, false, false, tqApp->mainWidget()); if ( !ok ) log.sorry(i18n("Could not copy file"), KIO::NetAccess::lastErrorString()); return ok; //#endif @@ -36,7 +36,7 @@ bool PURL::Url::copyTo(const Url &destination, Log::Generic &log) const bool PURL::Url::create(Log::Generic &log) const { //#if defined(NO_KDE) -// QByteArray a; +// TQByteArray a; // Synchronous sync; // if ( sync.op().put(a, _url.filepath()) && sync.execute() ) { // if ( show==Log::Show ) ConsoleView::sorry(i18n("Could not create file"), sync.error()); @@ -44,17 +44,17 @@ bool PURL::Url::create(Log::Generic &log) const // } //#else // assume file do no exist if ioslave cannot tell... - if ( KIO::NetAccess::exists(_url, false, qApp->mainWidget()) ) return true; + if ( KIO::NetAccess::exists(_url, false, tqApp->mainWidget()) ) return true; KTempFile tmp; tmp.setAutoDelete(true); // do not overwrite - bool ok = KIO::NetAccess::file_copy(tmp.name(), _url, -1, false, false, qApp->mainWidget()); + bool ok = KIO::NetAccess::file_copy(tmp.name(), _url, -1, false, false, tqApp->mainWidget()); if ( !ok ) log.sorry(i18n("Could not create file"), KIO::NetAccess::lastErrorString()); //#endif return ok; } -bool PURL::Url::write(const QString &text, Log::Generic &log) const +bool PURL::Url::write(const TQString &text, Log::Generic &log) const { File file(*this, log); if ( !file.openForWrite() ) return false; @@ -71,7 +71,7 @@ bool PURL::Url::del(Log::Generic &log) const // return false; // } //#else - bool ok = KIO::NetAccess::del(_url, qApp->mainWidget()); + bool ok = KIO::NetAccess::del(_url, tqApp->mainWidget()); if ( !ok ) log.sorry(i18n("Could not delete file."), KIO::NetAccess::lastErrorString()); return ok; //#endif @@ -103,8 +103,8 @@ bool PURL::Directory::create(Log::Generic &log) const // } //#else // assume dir do no exist if ioslave cannot tell... - if ( KIO::NetAccess::exists(_url, false, qApp->mainWidget()) ) return true; - bool ok = KIO::NetAccess::mkdir(_url, qApp->mainWidget()); + if ( KIO::NetAccess::exists(_url, false, tqApp->mainWidget()) ) return true; + bool ok = KIO::NetAccess::mkdir(_url, tqApp->mainWidget()); if ( !ok ) log.sorry(i18n("Could not create directory"), KIO::NetAccess::lastErrorString()); //#endif return ok; diff --git a/src/common/gui/purl_gui.cpp b/src/common/gui/purl_gui.cpp index d81fdb6..f93e11c 100644 --- a/src/common/gui/purl_gui.cpp +++ b/src/common/gui/purl_gui.cpp @@ -8,7 +8,7 @@ ***************************************************************************/ #include "purl_gui.h" -#include +#include #include #include #include @@ -18,20 +18,20 @@ #include "misc_gui.h" //----------------------------------------------------------------------------- -PURL::Url PURL::getOpenUrl(const QString &startDir, const QString &filter, - QWidget *widget, const QString &caption) +PURL::Url PURL::getOpenUrl(const TQString &startDir, const TQString &filter, + TQWidget *widget, const TQString &caption) { return KFileDialog::getOpenURL(startDir, filter, widget, caption); } -PURL::UrlList PURL::getOpenUrls(const QString &startDir, const QString &filter, - QWidget *widget, const QString &caption) +PURL::UrlList PURL::getOpenUrls(const TQString &startDir, const TQString &filter, + TQWidget *widget, const TQString &caption) { return KFileDialog::getOpenURLs(startDir, filter, widget, caption); } -PURL::Url PURL::getSaveUrl(const QString &startDir, const QString &filter, - QWidget *widget, const QString &caption, +PURL::Url PURL::getSaveUrl(const TQString &startDir, const TQString &filter, + TQWidget *widget, const TQString &caption, SaveAction action) { Url url = KFileDialog::getSaveURL(startDir, filter, widget, caption); @@ -40,7 +40,7 @@ PURL::Url PURL::getSaveUrl(const QString &startDir, const QString &filter, case NoSaveAction: break; case AskOverwrite: if ( url.exists() ) { - if ( !MessageBox::askContinue(i18n("File \"%1\" already exists. Overwrite ?").arg(url.pretty())) ) return Url(); + if ( !MessageBox::askContinue(i18n("File \"%1\" already exists. Overwrite ?").tqarg(url.pretty())) ) return Url(); } break; case CancelIfExists: @@ -50,19 +50,19 @@ PURL::Url PURL::getSaveUrl(const QString &startDir, const QString &filter, return url; } -PURL::Directory PURL::getExistingDirectory(const QString &startDir, QWidget *widget, - const QString &caption) +PURL::Directory PURL::getExistingDirectory(const TQString &startDir, TQWidget *widget, + const TQString &caption) { KURL kurl = KDirSelectDialog::selectDirectory(startDir, false, widget, caption); if ( kurl.isEmpty() ) return Directory(); return Directory(kurl.path(1)); } -QPixmap PURL::icon(FileType type) +TQPixmap PURL::icon(FileType type) { - if (type.data().xpm_icon) return QPixmap(type.data().xpm_icon); + if (type.data().xpm_icon) return TQPixmap(type.data().xpm_icon); if ( hasMimetype(type) ) return KMimeType::mimeType(type.data().mimetype)->pixmap(KIcon::Small); - return QPixmap(); + return TQPixmap(); } bool PURL::hasMimetype(FileType type) @@ -73,11 +73,11 @@ bool PURL::hasMimetype(FileType type) } //----------------------------------------------------------------------------- -PURL::Label::Label(const QString &url, const QString &text, - QWidget *parent, const char *name) - : KURLLabel(url, text, parent, name) +PURL::Label::Label(const TQString &url, const TQString &text, + TQWidget *tqparent, const char *name) + : KURLLabel(url, text, tqparent, name) { - connect(this, SIGNAL(leftClickedURL()), SLOT(urlClickedSlot())); + connect(this, TQT_SIGNAL(leftClickedURL()), TQT_SLOT(urlClickedSlot())); } void PURL::Label::urlClickedSlot() @@ -86,29 +86,29 @@ void PURL::Label::urlClickedSlot() } //----------------------------------------------------------------------------- -PURL::BaseWidget::BaseWidget(QWidget *parent, const char *name) - : QWidget(parent, name) +PURL::BaseWidget::BaseWidget(TQWidget *tqparent, const char *name) + : TQWidget(tqparent, name) { init(); } -PURL::BaseWidget::BaseWidget(const QString &defaultDir, QWidget *parent, const char *name) - : QWidget(parent, name), _defaultDir(defaultDir) +PURL::BaseWidget::BaseWidget(const TQString &defaultDir, TQWidget *tqparent, const char *name) + : TQWidget(tqparent, name), _defaultDir(defaultDir) { init(); } void PURL::BaseWidget::init() { - QHBoxLayout *top = new QHBoxLayout(this, 0, 10); + TQHBoxLayout *top = new TQHBoxLayout(this, 0, 10); _edit = new KLineEdit(this); - connect(_edit, SIGNAL(textChanged(const QString &)), SIGNAL(changed())); + connect(_edit, TQT_SIGNAL(textChanged(const TQString &)), TQT_SIGNAL(changed())); top->addWidget(_edit); KIconLoader loader; - QIconSet iconset = loader.loadIcon("fileopen", KIcon::Toolbar); - QPushButton *button = new KPushButton(iconset, QString::null, this); - connect(button, SIGNAL(clicked()), SLOT(buttonClicked())); + TQIconSet iconset = loader.loadIcon("fileopen", KIcon::Toolbar); + TQPushButton *button = new KPushButton(iconset, TQString(), this); + connect(button, TQT_SIGNAL(clicked()), TQT_SLOT(buttonClicked())); top->addWidget(button); } @@ -122,23 +122,23 @@ void PURL::DirectoryWidget::buttonClicked() } //---------------------------------------------------------------------------- -PURL::DirectoriesWidget::DirectoriesWidget(const QString &title, QWidget *parent, const char *name) - : QVGroupBox(title, parent, name) +PURL::DirectoriesWidget::DirectoriesWidget(const TQString &title, TQWidget *tqparent, const char *name) + : TQVGroupBox(title, tqparent, name) { - init(QString::null); + init(TQString()); } -PURL::DirectoriesWidget::DirectoriesWidget(const QString &title, const QString &defaultDir, QWidget *parent, const char *name) - : QVGroupBox(title, parent, name) +PURL::DirectoriesWidget::DirectoriesWidget(const TQString &title, const TQString &defaultDir, TQWidget *tqparent, const char *name) + : TQVGroupBox(title, tqparent, name) { init(defaultDir); } -void PURL::DirectoriesWidget::init(const QString &defaultDir) +void PURL::DirectoriesWidget::init(const TQString &defaultDir) { DirectoryWidget *edit = new DirectoryWidget(defaultDir); _editListBox = new EditListBox(1, edit, edit->lineEdit(), this, "directories_editlistbox"); - connect(_editListBox, SIGNAL(changed()), SIGNAL(changed())); + connect(_editListBox, TQT_SIGNAL(changed()), TQT_SIGNAL(changed())); } //---------------------------------------------------------------------------- diff --git a/src/common/gui/purl_gui.h b/src/common/gui/purl_gui.h index a11bedf..d554636 100644 --- a/src/common/gui/purl_gui.h +++ b/src/common/gui/purl_gui.h @@ -9,7 +9,7 @@ #ifndef PURL_GUI_H #define PURL_GUI_H -#include +#include #include #include #include @@ -21,34 +21,36 @@ namespace PURL { //----------------------------------------------------------------------------- extern bool hasMimetype(FileType type); -extern QPixmap icon(FileType type); -extern Directory getExistingDirectory(const QString &startDir, QWidget *widget, const QString &caption); -extern Url getOpenUrl(const QString &startDir, const QString &filter, QWidget *widget, - const QString &caption); -extern UrlList getOpenUrls(const QString &startDir, const QString &filter, QWidget *widget, - const QString &caption); +extern TQPixmap icon(FileType type); +extern Directory getExistingDirectory(const TQString &startDir, TQWidget *widget, const TQString &caption); +extern Url getOpenUrl(const TQString &startDir, const TQString &filter, TQWidget *widget, + const TQString &caption); +extern UrlList getOpenUrls(const TQString &startDir, const TQString &filter, TQWidget *widget, + const TQString &caption); enum SaveAction { NoSaveAction, AskOverwrite, CancelIfExists }; -extern Url getSaveUrl(const QString &startDir, const QString &filter, QWidget *widget, - const QString &caption, SaveAction action); +extern Url getSaveUrl(const TQString &startDir, const TQString &filter, TQWidget *widget, + const TQString &caption, SaveAction action); //----------------------------------------------------------------------------- class Label : public KURLLabel { Q_OBJECT + TQ_OBJECT public: - Label(const QString &url, const QString &text, QWidget *parent = 0, const char *name = 0); + Label(const TQString &url, const TQString &text, TQWidget *tqparent = 0, const char *name = 0); private slots: void urlClickedSlot(); }; //----------------------------------------------------------------------------- -class BaseWidget : public QWidget +class BaseWidget : public TQWidget { Q_OBJECT + TQ_OBJECT public: - BaseWidget(QWidget *parent = 0, const char *name = 0); - BaseWidget(const QString &defaultDir, QWidget *parent = 0, const char *name = 0); + BaseWidget(TQWidget *tqparent = 0, const char *name = 0); + BaseWidget(const TQString &defaultDir, TQWidget *tqparent = 0, const char *name = 0); KLineEdit *lineEdit() { return _edit; } signals: @@ -58,7 +60,7 @@ protected slots: virtual void buttonClicked() = 0; protected: - QString _defaultDir; + TQString _defaultDir; KLineEdit *_edit; void init(); @@ -68,9 +70,10 @@ protected: class DirectoryWidget : public BaseWidget { Q_OBJECT + TQ_OBJECT public: - DirectoryWidget(QWidget *parent = 0, const char *name = 0) : BaseWidget(parent, name) {} - DirectoryWidget(const QString &defaultDir, QWidget *parent = 0, const char *name = 0) : BaseWidget(defaultDir, parent, name) {} + DirectoryWidget(TQWidget *tqparent = 0, const char *name = 0) : BaseWidget(tqparent, name) {} + DirectoryWidget(const TQString &defaultDir, TQWidget *tqparent = 0, const char *name = 0) : BaseWidget(defaultDir, tqparent, name) {} void setDirectory(const Directory &dir) { _edit->setText(dir.path()); } Directory directory() const { return _edit->text(); } @@ -79,32 +82,34 @@ protected slots: }; //----------------------------------------------------------------------------- -class DirectoriesWidget : public QVGroupBox +class DirectoriesWidget : public TQVGroupBox { Q_OBJECT + TQ_OBJECT public: - DirectoriesWidget(const QString &title, QWidget *parent = 0, const char *name = 0); - DirectoriesWidget(const QString &title, const QString &defaultDir, QWidget *parent = 0, const char *name = 0); - void setDirectories(const QStringList &dirs) { _editListBox->setTexts(dirs); } - QStringList directories() const { return _editListBox->texts(); } + DirectoriesWidget(const TQString &title, TQWidget *tqparent = 0, const char *name = 0); + DirectoriesWidget(const TQString &title, const TQString &defaultDir, TQWidget *tqparent = 0, const char *name = 0); + void setDirectories(const TQStringList &dirs) { _editListBox->setTexts(dirs); } + TQStringList directories() const { return _editListBox->texts(); } signals: void changed(); private: EditListBox *_editListBox; - void init(const QString &defaultDir); + void init(const TQString &defaultDir); }; //----------------------------------------------------------------------------- class UrlWidget : public BaseWidget { Q_OBJECT + TQ_OBJECT public: - UrlWidget(const QString &filter, QWidget *parent = 0, const char *name = 0) - : BaseWidget(parent, name), _filter(filter) {} - UrlWidget(const QString &defaultDir, const QString &filter, QWidget *parent = 0, const char *name = 0) - : BaseWidget(defaultDir, parent, name), _filter(filter) {} + UrlWidget(const TQString &filter, TQWidget *tqparent = 0, const char *name = 0) + : BaseWidget(tqparent, name), _filter(filter) {} + UrlWidget(const TQString &defaultDir, const TQString &filter, TQWidget *tqparent = 0, const char *name = 0) + : BaseWidget(defaultDir, tqparent, name), _filter(filter) {} Url url() const { return PURL::Url::fromPathOrUrl(_edit->text()); } void setUrl(const Url &url) { _edit->setText(url.filepath()); } @@ -112,7 +117,7 @@ protected slots: virtual void buttonClicked(); private: - QString _filter; + TQString _filter; }; } // namespace diff --git a/src/common/nokde/nokde_kaboutdata.cpp b/src/common/nokde/nokde_kaboutdata.cpp index 21b6917..6dd8f33 100644 --- a/src/common/nokde/nokde_kaboutdata.cpp +++ b/src/common/nokde/nokde_kaboutdata.cpp @@ -24,52 +24,52 @@ #include "nokde_kaboutdata.h" //#include -#include -#include -#include +#include +#include +#include -QString +TQString KAboutPerson::name() const { - return QString::fromUtf8(mName); + return TQString::fromUtf8(mName); } -QString +TQString KAboutPerson::task() const { if (mTask && *mTask) return i18n(mTask); else - return QString::null; + return TQString(); } -QString +TQString KAboutPerson::emailAddress() const { - return QString::fromUtf8(mEmailAddress); + return TQString::fromUtf8(mEmailAddress); } -QString +TQString KAboutPerson::webAddress() const { - return QString::fromUtf8(mWebAddress); + return TQString::fromUtf8(mWebAddress); } -KAboutTranslator::KAboutTranslator(const QString & name, - const QString & emailAddress) +KAboutTranslator::KAboutTranslator(const TQString & name, + const TQString & emailAddress) { mName=name; mEmail=emailAddress; } -QString KAboutTranslator::name() const +TQString KAboutTranslator::name() const { return mName; } -QString KAboutTranslator::emailAddress() const +TQString KAboutTranslator::emailAddress() const { return mEmail; } @@ -90,7 +90,7 @@ public: const char *translatorName; const char *translatorEmail; const char *productName; -// QImage* programLogo; +// TQImage* programLogo; }; @@ -163,9 +163,9 @@ KAboutData::setLicenseText( const char *licenseText ) } void -KAboutData::setLicenseTextFile( const QString &file ) +KAboutData::setLicenseTextFile( const TQString &file ) { - mLicenseText = qstrdup(QFile::encodeName(file)); + mLicenseText = qstrdup(TQFile::encodeName(file)); mLicenseKey = License_File; } @@ -244,99 +244,99 @@ KAboutData::productName() const return appName(); } -QString +TQString KAboutData::programName() const { if (mProgramName && *mProgramName) return i18n(mProgramName); else - return QString::null; + return TQString(); } /* -QImage +TQImage KAboutData::programLogo() const { - return d->programLogo ? (*d->programLogo) : QImage(); + return d->programLogo ? (*d->programLogo) : TQImage(); } void -KAboutData::setProgramLogo(const QImage& image) +KAboutData::setProgramLogo(const TQImage& image) { if (!d->programLogo) - d->programLogo = new QImage( image ); + d->programLogo = new TQImage( image ); else *d->programLogo = image; } */ -QString +TQString KAboutData::version() const { - return QString::fromLatin1(mVersion); + return TQString::tqfromLatin1(mVersion); } -QString +TQString KAboutData::shortDescription() const { if (mShortDescription && *mShortDescription) return i18n(mShortDescription); else - return QString::null; + return TQString(); } -QString +TQString KAboutData::homepage() const { - return QString::fromLatin1(mHomepageAddress); + return TQString::tqfromLatin1(mHomepageAddress); } -QString +TQString KAboutData::bugAddress() const { - return QString::fromLatin1(mBugEmailAddress); + return TQString::tqfromLatin1(mBugEmailAddress); } -const QValueList +const TQValueList KAboutData::authors() const { return mAuthorList; } -const QValueList +const TQValueList KAboutData::credits() const { return mCreditList; } -const QValueList +const TQValueList KAboutData::translators() const { - QValueList personList; + TQValueList personList; if(d->translatorName == 0) return personList; - QStringList nameList; - QStringList emailList; + TQStringList nameList; + TQStringList emailList; - QString names = i18n(d->translatorName); - if(names != QString::fromUtf8(d->translatorName)) + TQString names = i18n(d->translatorName); + if(names != TQString::fromUtf8(d->translatorName)) { -#if QT_VERSION < 0x040000 - nameList = QStringList::split(',',names); +#if [[[TQT_VERSION IS DEPRECATED]]] < 0x040000 + nameList = TQStringList::split(',',names); #else - nameList = names.split(',', QString::SkipEmptyParts); + nameList = names.split(',', TQString::SkipEmptyParts); #endif } if(d->translatorEmail) { - QString emails = i18n(d->translatorEmail); + TQString emails = i18n(d->translatorEmail); - if(emails != QString::fromUtf8(d->translatorEmail)) + if(emails != TQString::fromUtf8(d->translatorEmail)) { -#if QT_VERSION < 0x040000 - emailList = QStringList::split(',',emails,true); +#if [[[TQT_VERSION IS DEPRECATED]]] < 0x040000 + emailList = TQStringList::split(',',emails,true); #else emailList = emails.split(','); #endif @@ -344,21 +344,21 @@ KAboutData::translators() const } - QStringList::Iterator nit; - QStringList::Iterator eit=emailList.begin(); + TQStringList::Iterator nit; + TQStringList::Iterator eit=emailList.begin(); for(nit = nameList.begin(); nit != nameList.end(); ++nit) { - QString email; + TQString email; if(eit != emailList.end()) { email=*eit; ++eit; } - QString name=*nit; + TQString name=*nit; -#if QT_VERSION < 0x040000 +#if [[[TQT_VERSION IS DEPRECATED]]] < 0x040000 personList.append(KAboutTranslator(name.stripWhiteSpace(), email.stripWhiteSpace())); #else personList.append(KAboutTranslator(name.trimmed(), email.trimmed())); @@ -368,7 +368,7 @@ KAboutData::translators() const return personList; } -QString +TQString KAboutData::aboutTranslationTeam() { return i18n("replace this with information about your translation team", @@ -378,29 +378,29 @@ KAboutData::aboutTranslationTeam() "visit http://i18n.kde.org

"); } -QString +TQString KAboutData::otherText() const { if (mOtherText && *mOtherText) return i18n(mOtherText); else - return QString::null; + return TQString(); } -QString +TQString KAboutData::license() const { - QString result; + TQString result; if (!copyrightStatement().isEmpty()) result = copyrightStatement() + "\n\n"; - QString l; - QString f; + TQString l; + TQString f; switch ( mLicenseKey ) { case License_File: - f = QFile::decodeName(mLicenseText); + f = TQFile::decodeName(mLicenseText); break; case License_GPL_V2: l = "GPL v2"; @@ -418,9 +418,9 @@ KAboutData::license() const l = "Artistic License"; f = locate("data", "LICENSES/ARTISTIC"); break; - case License_QPL_V1_0: - l = "QPL v1.0"; - f = locate("data", "LICENSES/QPL_V1.0"); + case License_TQPL_V1_0: + l = "TQPL v1.0"; + f = locate("data", "LICENSES/TQPL_V1.0"); break; case License_Custom: if (mLicenseText && *mLicenseText) @@ -434,21 +434,21 @@ KAboutData::license() const } if (!l.isEmpty()) - result += i18n("This program is distributed under the terms of the %1.").arg( l ); + result += i18n("This program is distributed under the terms of the %1.").tqarg( l ); if (!f.isEmpty()) { - QFile file(f); -#if QT_VERSION < 0x040000 + TQFile file(f); +#if [[[TQT_VERSION IS DEPRECATED]]] < 0x040000 if (file.open(IO_ReadOnly)) #else - if (file.open(QIODevice::ReadOnly)) + if (file.open(TQIODevice::ReadOnly)) #endif { result += '\n'; result += '\n'; - QTextStream str(&file); -#if QT_VERSION < 0x040000 + TQTextStream str(&file); +#if [[[TQT_VERSION IS DEPRECATED]]] < 0x040000 result += str.read(); #else result += str.readAll(); @@ -459,11 +459,11 @@ KAboutData::license() const return result; } -QString +TQString KAboutData::copyrightStatement() const { if (mCopyrightStatement && *mCopyrightStatement) return i18n(mCopyrightStatement); else - return QString::null; + return TQString(); } diff --git a/src/common/nokde/nokde_kaboutdata.h b/src/common/nokde/nokde_kaboutdata.h index 13076d4..01a8e74 100644 --- a/src/common/nokde/nokde_kaboutdata.h +++ b/src/common/nokde/nokde_kaboutdata.h @@ -21,16 +21,16 @@ * */ -#include -#if QT_VERSION < 0x040000 -# include +#include +#if [[[TQT_VERSION IS DEPRECATED]]] < 0x040000 +# include #else -# include -# define QValueList Q3ValueList -# include +# include +# define TQValueList Q3ValueList +# include #endif -#include -//#include +#include +//#include #include "nokde_klocale.h" @@ -85,37 +85,37 @@ public: } /** * @internal - * Don't use. Required by QValueList + * Don't use. Required by TQValueList */ KAboutPerson() {} /** * The person's name - * @return the person's name (can be QString::null, if it has been + * @return the person's name (can be TQString(), if it has been * constructed with a null name) */ - QString name() const; + TQString name() const; /** * The person's task - * @return the person's task (can be QString::null, if it has been + * @return the person's task (can be TQString(), if it has been * constructed with a null task) */ - QString task() const; + TQString task() const; /** * The person's email address - * @return the person's email address (can be QString::null, if it has been + * @return the person's email address (can be TQString(), if it has been * constructed with a null email) */ - QString emailAddress() const; + TQString emailAddress() const; /** * The home page or a relevant link - * @return the persons home page (can be QString::null, if it has been + * @return the persons home page (can be TQString(), if it has been * constructed with a null home page) */ - QString webAddress() const; + TQString webAddress() const; private: const char *mName; @@ -149,26 +149,26 @@ public: * * @param emailAddress The email address of the person. */ - KAboutTranslator(const QString & name=QString::null, - const QString & emailAddress=QString::null); + KAboutTranslator(const TQString & name=TQString(), + const TQString & emailAddress=TQString()); /** * The translator's name - * @return the translators's name (can be QString::null, if it has been + * @return the translators's name (can be TQString(), if it has been * constructed with a null name) */ - QString name() const; + TQString name() const; /** * The translator's email - * @return the translator's email address (can be QString::null, if it has been + * @return the translator's email address (can be TQString(), if it has been * constructed with a null email) */ - QString emailAddress() const; + TQString emailAddress() const; private: - QString mName; - QString mEmail; + TQString mName; + TQString mEmail; KAboutTranslatorPrivate* d; }; @@ -204,8 +204,8 @@ class KDECORE_EXPORT KAboutData License_LGPL_V2 = 2, License_BSD = 3, License_Artistic = 4, - License_QPL = 5, - License_QPL_V1_0 = 5 + License_TQPL = 5, + License_TQPL_V1_0 = 5 }; public: @@ -352,7 +352,7 @@ class KDECORE_EXPORT KAboutData * * @param file File containing the license text. */ - void setLicenseTextFile( const QString &file ); + void setLicenseTextFile( const TQString &file ); /** * Defines the program name used internally. @@ -379,7 +379,7 @@ class KDECORE_EXPORT KAboutData * @see programLogo() * @since 3.4 */ -// void setProgramLogo(const QImage& image); +// void setProgramLogo(const TQImage& image); /** * Defines the program version string. @@ -469,7 +469,7 @@ class KDECORE_EXPORT KAboutData * Returns the translated program name. * @return the program name (translated). */ - QString programName() const; + TQString programName() const; /** * Returns the program logo image. @@ -477,63 +477,63 @@ class KDECORE_EXPORT KAboutData * no custom application logo defined. * @since 3.4 */ -// QImage programLogo() const; +// TQImage programLogo() const; /** * Returns the program's version. * @return the version string. */ - QString version() const; + TQString version() const; /** * Returns a short, translated description. * @return the short description (translated). Can be - * QString::null if not set. + * TQString() if not set. */ - QString shortDescription() const; + TQString shortDescription() const; /** * Returns the application homepage. - * @return the application homepage URL. Can be QString::null if + * @return the application homepage URL. Can be TQString() if * not set. */ - QString homepage() const; + TQString homepage() const; /** * Returns the email address for bugs. * @return the email address where to report bugs. */ - QString bugAddress() const; + TQString bugAddress() const; /** * Returns a list of authors. * @return author information (list of persons). */ - const QValueList authors() const; + const TQValueList authors() const; /** * Returns a list of persons who contributed. * @return credit information (list of persons). */ - const QValueList credits() const; + const TQValueList credits() const; /** * Returns a list of translators. * @return translators information (list of persons) */ - const QValueList translators() const; + const TQValueList translators() const; /** * Returns a message about the translation team. * @return a message about the translation team */ - static QString aboutTranslationTeam(); + static TQString aboutTranslationTeam(); /** * Returns a translated, free form text. - * @return the free form text (translated). Can be QString::null if not set. + * @return the free form text (translated). Can be TQString() if not set. */ - QString otherText() const; + TQString otherText() const; /** * Returns the license. If the licenseType argument of the constructor has been @@ -542,13 +542,13 @@ class KDECORE_EXPORT KAboutData * * @return The license text. */ - QString license() const; + TQString license() const; /** * Returns the copyright statement. - * @return the copyright statement. Can be QString::null if not set. + * @return the copyright statement. Can be TQString() if not set. */ - QString copyrightStatement() const; + TQString copyrightStatement() const; private: const char *mAppName; @@ -560,8 +560,8 @@ class KDECORE_EXPORT KAboutData const char *mOtherText; const char *mHomepageAddress; const char *mBugEmailAddress; - QValueList mAuthorList; - QValueList mCreditList; + TQValueList mAuthorList; + TQValueList mCreditList; const char *mLicenseText; KAboutDataPrivate *d; diff --git a/src/common/nokde/nokde_kcmdlineargs.cpp b/src/common/nokde/nokde_kcmdlineargs.cpp index 7f026fe..f06f20e 100644 --- a/src/common/nokde/nokde_kcmdlineargs.cpp +++ b/src/common/nokde/nokde_kcmdlineargs.cpp @@ -32,23 +32,23 @@ #include #endif -#include -#include -#include - -#include -#if QT_VERSION<0x040000 -# include -# include +#include +#include +#include + +#include +#if [[[TQT_VERSION IS DEPRECATED]]]<0x040000 +# include +# include #else -# include -# define QGList Q3GList -# define QStrList Q3StrList -# include -# define QGDict Q3GDict -# define QAsciiDict Q3AsciiDict -# include -# define QPtrCollection Q3PtrCollection +# include +# define TQGList Q3GList +# define TQStrList Q3StrList +# include +# define TQGDict Q3GDict +# define TQAsciiDict Q3AsciiDict +# include +# define TQPtrCollection Q3PtrCollection #endif @@ -60,47 +60,47 @@ //#include //#include -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 #define DISPLAY "DISPLAY" -#elif defined(Q_WS_QWS) -#define DISPLAY "QWS_DISPLAY" +#elif defined(TQ_WS_TQWS) +#define DISPLAY "TQWS_DISPLAY" #endif -#ifdef Q_WS_WIN +#ifdef TQ_WS_WIN #include #endif -template class QAsciiDict; -template class QPtrList; +template class TQAsciiDict; +template class TQPtrList; -class KCmdLineParsedOptions : public QAsciiDict +class KCmdLineParsedOptions : public TQAsciiDict { public: KCmdLineParsedOptions() - : QAsciiDict( 7 ) { } + : TQAsciiDict( 7 ) { } // WABA: Huh? // The compiler doesn't find KCmdLineParsedOptions::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) - QDataStream& save( QDataStream &s) const - { return QGDict::write(s); } + TQDataStream& save( TQDataStream &s) const + { return TQGDict::write(s); } - QDataStream& load( QDataStream &s) - { return QGDict::read(s); } + TQDataStream& load( TQDataStream &s) + { return TQGDict::read(s); } protected: - virtual QDataStream& write( QDataStream &s, QPtrCollection::Item data) const + virtual TQDataStream& write( TQDataStream &s, TQPtrCollection::Item data) const { - QCString *str = (QCString *) data; + TQCString *str = (TQCString *) data; s << (*str); return s; } - virtual QDataStream& read( QDataStream &s, QPtrCollection::Item &item) + virtual TQDataStream& read( TQDataStream &s, TQPtrCollection::Item &item) { - QCString *str = new QCString; + TQCString *str = new TQCString; s >> (*str); item = (void *)str; return s; @@ -108,20 +108,20 @@ protected: }; -class KCmdLineParsedArgs : public QStrList +class KCmdLineParsedArgs : public TQStrList { public: KCmdLineParsedArgs() - : QStrList( true ) { } - QDataStream& save( QDataStream &s) const - { return QGList::write(s); } + : TQStrList( true ) { } + TQDataStream& save( TQDataStream &s) const + { return TQGList::write(s); } - QDataStream& load( QDataStream &s) - { return QGList::read(s); } + TQDataStream& load( TQDataStream &s) + { return TQGList::read(s); } }; -class KCmdLineArgsList: public QPtrList +class KCmdLineArgsList: public TQPtrList { public: KCmdLineArgsList() { } @@ -201,16 +201,16 @@ KCmdLineArgs::init(int _argc, char **_argv, const KAboutData *_about, bool /*noK parsed = false; mCwd = /*mCwdd.setObject(mCwd, */new char [PATH_MAX+1];//, true); getcwd(mCwd, PATH_MAX); -#ifdef Q_WS_WIN +#ifdef TQ_WS_WIN win32_slashify(mCwd, PATH_MAX); #endif // if (!noKApp) // KApplication::addCmdLineOptions(); } -QString KCmdLineArgs::cwd() +TQString KCmdLineArgs::cwd() { - return QFile::decodeName(QCString(mCwd)); + return TQFile::decodeName(TQCString(mCwd)); } const char * KCmdLineArgs::appName() @@ -252,16 +252,16 @@ KCmdLineArgs::addCmdLineOptions( const KCmdLineOptions *options, const char *nam } void -KCmdLineArgs::saveAppArgs( QDataStream &ds) +KCmdLineArgs::saveAppArgs( TQDataStream &ds) { if (!parsed) parseAllArgs(); - // Remove Qt and KDE options. + // Remove TQt and KDE options. removeArgs("qt"); removeArgs("kde"); - QCString qCwd = mCwd; + TQCString qCwd = mCwd; ds << qCwd; uint count = argsList ? argsList->count() : 0; @@ -272,15 +272,15 @@ KCmdLineArgs::saveAppArgs( QDataStream &ds) KCmdLineArgs *args; for(args = argsList->first(); args; args = argsList->next()) { - ds << QCString(args->id); + ds << TQCString(args->id); args->save(ds); } } void -KCmdLineArgs::loadAppArgs( QDataStream &ds) +KCmdLineArgs::loadAppArgs( TQDataStream &ds) { - // Remove Qt and KDE options. + // Remove TQt and KDE options. removeArgs("qt"); removeArgs("kde"); @@ -295,7 +295,7 @@ KCmdLineArgs::loadAppArgs( QDataStream &ds) if (ds.atEnd()) return; - QCString qCwd; + TQCString qCwd; ds >> qCwd; delete [] mCwd; @@ -307,7 +307,7 @@ KCmdLineArgs::loadAppArgs( QDataStream &ds) while(count--) { - QCString id; + TQCString id; ds >> id; assert( argsList ); for(args = argsList->first(); args; args = argsList->next()) @@ -367,7 +367,7 @@ void KCmdLineArgs::removeArgs(const char *id) * +4 - no more options follow // !fork */ static int -findOption(const KCmdLineOptions *options, QCString &opt, +findOption(const KCmdLineOptions *options, TQCString &opt, const char *&opt_name, const char *&def, bool &enabled) { int result; @@ -407,11 +407,11 @@ findOption(const KCmdLineOptions *options, QCString &opt, options++; if (!options->name) return result+0; - QCString nextOption = options->name; -# if QT_VERSION<0x040000 - int p = nextOption.find(' '); + TQCString nextOption = options->name; +# if [[[TQT_VERSION IS DEPRECATED]]]<0x040000 + int p = nextOption.tqfind(' '); #else - int p = QString(nextOption).indexOf(' '); + int p = TQString(nextOption).indexOf(' '); #endif if (p > 0) nextOption = nextOption.left(p); @@ -443,16 +443,16 @@ findOption(const KCmdLineOptions *options, QCString &opt, void -KCmdLineArgs::findOption(const char *_opt, QCString opt, int &i, bool _enabled, bool &moreOptions) +KCmdLineArgs::findOption(const char *_opt, TQCString opt, int &i, bool _enabled, bool &moreOptions) { KCmdLineArgs *args = argsList->first(); const char *opt_name; const char *def; - QCString argument; -# if QT_VERSION<0x040000 - int j = opt.find('='); + TQCString argument; +# if [[[TQT_VERSION IS DEPRECATED]]]<0x040000 + int j = opt.tqfind('='); #else - int j = QString(opt).indexOf('='); + int j = TQString(opt).indexOf('='); #endif if (j != -1) { @@ -476,7 +476,7 @@ KCmdLineArgs::findOption(const char *_opt, QCString opt, int &i, bool _enabled, int p = 1; while (true) { - QCString singleCharOption = " "; + TQCString singleCharOption = " "; singleCharOption[0] = _opt[p]; args = argsList->first(); while (args) @@ -518,7 +518,7 @@ KCmdLineArgs::findOption(const char *_opt, QCString opt, int &i, bool _enabled, if (ignoreUnknown) return; enable_i18n(); - usage( i18n("Unknown option '%1'.").arg(QString::fromLocal8Bit(_opt))); + usage( i18n("Unknown option '%1'.").tqarg(TQString::fromLocal8Bit(_opt))); } if ((result & 4) != 0) @@ -534,7 +534,7 @@ KCmdLineArgs::findOption(const char *_opt, QCString opt, int &i, bool _enabled, if (ignoreUnknown) return; enable_i18n(); - usage( i18n("Unknown option '%1'.").arg(QString::fromLocal8Bit(_opt))); + usage( i18n("Unknown option '%1'.").tqarg(TQString::fromLocal8Bit(_opt))); } if (argument.isEmpty()) { @@ -542,7 +542,7 @@ KCmdLineArgs::findOption(const char *_opt, QCString opt, int &i, bool _enabled, if (i >= argc) { enable_i18n(); - usage( i18n("'%1' missing.").arg( opt_name)); + usage( i18n("'%1' missing.").tqarg( opt_name)); } argument = argv[i]; } @@ -555,12 +555,12 @@ KCmdLineArgs::findOption(const char *_opt, QCString opt, int &i, bool _enabled, } void -KCmdLineArgs::printQ(const QString &msg) +KCmdLineArgs::printQ(const TQString &msg) { -# if QT_VERSION<0x040000 - QCString localMsg = msg.local8Bit(); +# if [[[TQT_VERSION IS DEPRECATED]]]<0x040000 + TQCString localMsg = msg.local8Bit(); #else - QCString localMsg = msg.toLocal8Bit(); + TQCString localMsg = msg.toLocal8Bit(); #endif fprintf(stdout, "%s", localMsg.data()); } @@ -618,10 +618,10 @@ KCmdLineArgs::parseAllArgs() else if ( (::qstrcmp(option, "version") == 0) || (::qstrcmp(option, "v") == 0)) { - printQ( QString("Qt: %1\n").arg(qVersion())); -// printQ( QString("KDE: %1\n").arg(KDE_VERSION_STRING)); - printQ( QString("%1: %2\n"). - arg(about->programName()).arg(about->version())); + printQ( TQString("TQt: %1\n").tqarg(qVersion())); +// printQ( TQString("KDE: %1\n").tqarg(KDE_VERSION_STRING)); + printQ( TQString("%1: %2\n"). + arg(about->programName()).tqarg(about->version())); exit(0); } else if ( (::qstrcmp(option, "license") == 0) ) { @@ -632,26 +632,26 @@ KCmdLineArgs::parseAllArgs() } else if ( ::qstrcmp( option, "author") == 0 ) { enable_i18n(); if ( about ) { - const QValueList authors = about->authors(); + const TQValueList authors = about->authors(); if ( !authors.isEmpty() ) { - QString authorlist; - for (QValueList::ConstIterator it = authors.begin(); it != authors.end(); ++it ) { - QString email; + TQString authorlist; + for (TQValueList::ConstIterator it = authors.begin(); it != authors.end(); ++it ) { + TQString email; if ( !(*it).emailAddress().isEmpty() ) email = " <" + (*it).emailAddress() + ">"; - authorlist += QString(" ") + (*it).name() + email + "\n"; + authorlist += TQString(" ") + (*it).name() + email + "\n"; } - printQ( i18n("the 2nd argument is a list of name+address, one on each line","%1 was written by\n%2").arg ( QString(about->programName()) ).arg( authorlist ) ); + printQ( i18n("the 2nd argument is a list of name+address, one on each line","%1 was written by\n%2").arg ( TQString(about->programName()) ).tqarg( authorlist ) ); } } else { - printQ( i18n("%1 was written by somebody who wants to remain anonymous.").arg(about->programName()) ); + printQ( i18n("%1 was written by somebody who wants to remain anonymous.").tqarg(about->programName()) ); } if (!about->bugAddress().isEmpty()) { if (about->bugAddress() == "submit@bugs.kde.org") printQ( i18n( "Please use http://bugs.kde.org to report bugs, do not mail the authors directly.\n" ) ); else - printQ( i18n( "Please use %1 to report bugs, do not mail the authors directly.\n" ).arg(about->bugAddress()) ); + printQ( i18n( "Please use %1 to report bugs, do not mail the authors directly.\n" ).tqarg(about->bugAddress()) ); } exit(0); } else { @@ -671,7 +671,7 @@ KCmdLineArgs::parseAllArgs() if (ignoreUnknown) continue; enable_i18n(); - usage( i18n("Unexpected argument '%1'.").arg(QString::fromLocal8Bit(argv[i]))); + usage( i18n("Unexpected argument '%1'.").tqarg(TQString::fromLocal8Bit(argv[i]))); } else { @@ -768,20 +768,20 @@ KCmdLineArgs::enable_i18n() } void -KCmdLineArgs::usage(const QString &error) +KCmdLineArgs::usage(const TQString &error) { // assert(KGlobal::_locale); -# if QT_VERSION<0x040000 - QCString localError = error.local8Bit(); +# if [[[TQT_VERSION IS DEPRECATED]]]<0x040000 + TQCString localError = error.local8Bit(); #else - QCString localError = error.toLocal8Bit(); + TQCString localError = error.toLocal8Bit(); #endif if (localError[error.length()-1] == '\n') localError = localError.left(error.length()-1); fprintf(stderr, "%s: %s\n", argv[0], localError.data()); - QString tmp = i18n("Use --help to get a list of available command line options."); -# if QT_VERSION<0x040000 + TQString tmp = i18n("Use --help to get a list of available command line options."); +# if [[[TQT_VERSION IS DEPRECATED]]]<0x040000 localError = tmp.local8Bit(); #else localError = tmp.toLocal8Bit(); @@ -797,11 +797,11 @@ KCmdLineArgs::usage(const char *id) assert(argsList != 0); // It's an error to call usage(...) without // having done addCmdLineOptions first! - QString optionFormatString = " %1 %2\n"; - QString optionFormatStringDef = " %1 %2 [%3]\n"; - QString optionHeaderString = i18n("\n%1:\n"); - QString tmp; - QString usage; + TQString optionFormatString = " %1 %2\n"; + TQString optionFormatStringDef = " %1 %2 [%3]\n"; + TQString optionHeaderString = i18n("\n%1:\n"); + TQString tmp; + TQString usage; KCmdLineArgs *args = argsList->last(); @@ -815,7 +815,7 @@ KCmdLineArgs::usage(const char *id) { if (args->name) { - usage = i18n("[%1-options]").arg(args->name)+" "+usage; + usage = i18n("[%1-options]").tqarg(args->name)+" "+usage; } args = argsList->prev(); } @@ -835,30 +835,30 @@ KCmdLineArgs::usage(const char *id) } } - printQ(i18n("Usage: %1 %2\n").arg(argv[0]).arg(usage)); + printQ(i18n("Usage: %1 %2\n").tqarg(argv[0]).tqarg(usage)); printQ("\n"+about->shortDescription()+"\n"); - printQ(optionHeaderString.arg(i18n("Generic options"))); - printQ(optionFormatString.arg("--help", -25).arg(i18n("Show help about options"))); + printQ(optionHeaderString.tqarg(i18n("Generic options"))); + printQ(optionFormatString.tqarg("--help", -25).tqarg(i18n("Show help about options"))); args = argsList->first(); while(args) { if (args->name && args->id) { - QString option = QString("--help-%1").arg(args->id); - QString desc = i18n("Show %1 specific options").arg(args->name); + TQString option = TQString("--help-%1").tqarg(args->id); + TQString desc = i18n("Show %1 specific options").tqarg(args->name); - printQ(optionFormatString.arg(option, -25).arg(desc)); + printQ(optionFormatString.tqarg(option, -25).tqarg(desc)); } args = argsList->next(); } - printQ(optionFormatString.arg("--help-all",-25).arg(i18n("Show all options"))); - printQ(optionFormatString.arg("--author",-25).arg(i18n("Show author information"))); - printQ(optionFormatString.arg("-v, --version",-25).arg(i18n("Show version information"))); - printQ(optionFormatString.arg("--license",-25).arg(i18n("Show license information"))); - printQ(optionFormatString.arg("--", -25).arg(i18n("End of options"))); + printQ(optionFormatString.tqarg("--help-all",-25).tqarg(i18n("Show all options"))); + printQ(optionFormatString.tqarg("--author",-25).tqarg(i18n("Show author information"))); + printQ(optionFormatString.tqarg("-v, --version",-25).tqarg(i18n("Show version information"))); + printQ(optionFormatString.tqarg("--license",-25).tqarg(i18n("Show license information"))); + printQ(optionFormatString.tqarg("--", -25).tqarg(i18n("End of options"))); args = argsList->first(); // Sets current to 1st. @@ -878,22 +878,22 @@ KCmdLineArgs::usage(const char *id) { bool hasArgs = false; bool hasOptions = false; - QString optionsHeader; + TQString optionsHeader; if (args->name) - optionsHeader = optionHeaderString.arg(i18n("%1 options").arg(QString::fromLatin1(args->name))); + optionsHeader = optionHeaderString.tqarg(i18n("%1 options").tqarg(TQString::tqfromLatin1(args->name))); else optionsHeader = i18n("\nOptions:\n"); while (args) { const KCmdLineOptions *option = args->options; - QCString opt = ""; + TQCString opt = ""; // while(option && option->name) { - QString description; - QString descriptionRest; - QStringList dl; + TQString description; + TQString descriptionRest; + TQStringList dl; // Option header if (option->name[0] == ':') @@ -914,7 +914,7 @@ KCmdLineArgs::usage(const char *id) { if (option->description) { - QString tmp = "\n"+i18n(option->description); + TQString tmp = "\n"+i18n(option->description); if (!tmp.endsWith("\n")) tmp.append("\n"); printQ(tmp); @@ -927,15 +927,15 @@ KCmdLineArgs::usage(const char *id) if (option->description) { description = i18n(option->description); -# if QT_VERSION<0x040000 - dl = QStringList::split("\n", description, true); +# if [[[TQT_VERSION IS DEPRECATED]]]<0x040000 + dl = TQStringList::split("\n", description, true); #else dl = description.split("\n"); #endif description = dl.first(); dl.erase( dl.begin() ); } - QCString name = option->name; + TQCString name = option->name; if (name[0] == '!') name = name.mid(1); @@ -950,8 +950,8 @@ KCmdLineArgs::usage(const char *id) name = name.mid(1); if ((name[0] == '[') && (name[name.length()-1] == ']')) name = name.mid(1, name.length()-2); - printQ(optionFormatString.arg(QString(name), -25) - .arg(description)); + printQ(optionFormatString.tqarg(TQString(name), -25) + .tqarg(description)); } else { @@ -974,22 +974,22 @@ KCmdLineArgs::usage(const char *id) opt = opt + name; if (!option->def) { - printQ(optionFormatString.arg(QString(opt), -25) - .arg(description)); + printQ(optionFormatString.tqarg(TQString(opt), -25) + .tqarg(description)); } else { - printQ(optionFormatStringDef.arg(QString(opt), -25) - .arg(description).arg(option->def)); + printQ(optionFormatStringDef.tqarg(TQString(opt), -25) + .tqarg(description).tqarg(option->def)); } opt = ""; } } - for(QStringList::Iterator it = dl.begin(); + for(TQStringList::Iterator it = dl.begin(); it != dl.end(); ++it) { - printQ(optionFormatString.arg("", -25).arg(*it)); + printQ(optionFormatString.tqarg("", -25).tqarg(*it)); } option++; @@ -1018,7 +1018,7 @@ KCmdLineArgs::KCmdLineArgs( const KCmdLineOptions *_options, { parsedOptionList = 0; parsedArgList = 0; - isQt = (::qstrcmp(id, "qt") == 0); + isTQt = (::qstrcmp(id, "qt") == 0); } /** @@ -1054,7 +1054,7 @@ KCmdLineArgs::reset() } void -KCmdLineArgs::save( QDataStream &ds) const +KCmdLineArgs::save( TQDataStream &ds) const { uint count = 0; if (parsedOptionList) @@ -1069,7 +1069,7 @@ KCmdLineArgs::save( QDataStream &ds) const } void -KCmdLineArgs::load( QDataStream &ds) +KCmdLineArgs::load( TQDataStream &ds) { if (!parsedOptionList) parsedOptionList = new KCmdLineParsedOptions; if (!parsedArgList) parsedArgList = new KCmdLineParsedArgs; @@ -1090,12 +1090,12 @@ KCmdLineArgs::load( QDataStream &ds) } void -KCmdLineArgs::setOption(const QCString &opt, bool enabled) +KCmdLineArgs::setOption(const TQCString &opt, bool enabled) { - if (isQt) + if (isTQt) { - // Qt does it own parsing. - QCString arg = "-"; + // TQt does it own parsing. + TQCString arg = "-"; if( !enabled ) arg += "no"; arg += opt; @@ -1107,23 +1107,23 @@ KCmdLineArgs::setOption(const QCString &opt, bool enabled) } if (enabled) - parsedOptionList->replace( opt, new QCString("t") ); + parsedOptionList->tqreplace( opt, new TQCString("t") ); else - parsedOptionList->replace( opt, new QCString("f") ); + parsedOptionList->tqreplace( opt, new TQCString("f") ); } void -KCmdLineArgs::setOption(const QCString &opt, const char *value) +KCmdLineArgs::setOption(const TQCString &opt, const char *value) { - if (isQt) + if (isTQt) { - // Qt does it's own parsing. - QCString arg = "-"; + // TQt does it's own parsing. + TQCString arg = "-"; arg += opt; addArgument(arg); addArgument(value); -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 // Hack coming up! if (arg == "-display") { @@ -1136,16 +1136,16 @@ KCmdLineArgs::setOption(const QCString &opt, const char *value) parsedOptionList->setAutoDelete(true); } - parsedOptionList->insert( opt, new QCString(value) ); + parsedOptionList->insert( opt, new TQCString(value) ); } -QCString +TQCString KCmdLineArgs::getOption(const char *_opt) const { - QCString *value = 0; + TQCString *value = 0; if (parsedOptionList) { - value = parsedOptionList->find(_opt); + value = parsedOptionList->tqfind(_opt); } if (value) @@ -1155,7 +1155,7 @@ KCmdLineArgs::getOption(const char *_opt) const const char *opt_name; const char *def; bool dummy = true; - QCString opt = _opt; + TQCString opt = _opt; int result = ::findOption( options, opt, opt_name, def, dummy) & ~4; if (result != 3) @@ -1168,7 +1168,7 @@ KCmdLineArgs::getOption(const char *_opt) const assert( 0 ); exit(255); } - return QCString(def); + return TQCString(def); } QCStringList @@ -1180,7 +1180,7 @@ KCmdLineArgs::getOptionList(const char *_opt) const while(true) { - QCString *value = parsedOptionList->take(_opt); + TQCString *value = parsedOptionList->take(_opt); if (!value) break; result.prepend(*value); @@ -1196,7 +1196,7 @@ KCmdLineArgs::getOptionList(const char *_opt) const it != result.end(); ++it) { - parsedOptionList->insert(_opt, new QCString(*it)); + parsedOptionList->insert(_opt, new TQCString(*it)); } return result; } @@ -1208,7 +1208,7 @@ KCmdLineArgs::isSet(const char *_opt) const const char *opt_name; const char *def; bool dummy = true; - QCString opt = _opt; + TQCString opt = _opt; int result = ::findOption( options, opt, opt_name, def, dummy) & ~4; if (result == 0) @@ -1222,10 +1222,10 @@ KCmdLineArgs::isSet(const char *_opt) const exit(255); } - QCString *value = 0; + TQCString *value = 0; if (parsedOptionList) { - value = parsedOptionList->find(opt); + value = parsedOptionList->tqfind(opt); } if (value) @@ -1276,18 +1276,18 @@ KCmdLineArgs::url(int n) const KURL KCmdLineArgs::makeURL(const char *_urlArg) { - QString urlArg = QFile::decodeName(_urlArg); - if (!QDir::isRelativePath(urlArg)) + TQString urlArg = TQFile::decodeName(_urlArg); + if (!TQDir::isRelativePath(urlArg)) { //KURL result; //result.setPath(urlArg); //return result; // Absolute path. return urlArg; } -# if QT_VERSION<0x040000 - if ( !QUrl::isRelativeUrl(urlArg) ) +# if [[[TQT_VERSION IS DEPRECATED]]]<0x040000 + if ( !TQUrl::isRelativeUrl(urlArg) ) #else - if ( !QUrl(urlArg).isRelative() ) + if ( !TQUrl(urlArg).isRelative() ) #endif //return KURL(urlArg); // Argument is a URL return urlArg; diff --git a/src/common/nokde/nokde_kcmdlineargs.h b/src/common/nokde/nokde_kcmdlineargs.h index 8b79b62..8808d94 100644 --- a/src/common/nokde/nokde_kcmdlineargs.h +++ b/src/common/nokde/nokde_kcmdlineargs.h @@ -24,20 +24,20 @@ #include "nokde_klocale.h" #include "nokde_kurl.h" -# if QT_VERSION<0x040000 -# include -# include +# if [[[TQT_VERSION IS DEPRECATED]]]<0x040000 +# include +# include #else -# include -# define QCString Q3CString -# include -# define QPtrList Q3PtrList -# include -# define QValueList Q3ValueList +# include +# define TQCString Q3CString +# include +# define TQPtrList Q3PtrList +# include +# define TQValueList Q3ValueList #endif -# include +# include -typedef QValueList QCStringList; +typedef TQValueList QCStringList; /** * @short Structure that holds command line options. @@ -90,7 +90,7 @@ class KCmdLineArgsPrivate; * @short A class for command-line argument handling. * * KCmdLineArgs provides simple access to the command-line arguments - * for an application. It takes into account Qt-specific options, + * for an application. It takes into account TQt-specific options, * KDE-specific options and application specific options. * * This class is used in %main() via the static method @@ -129,13 +129,13 @@ class KCmdLineArgsPrivate; * .... * * // An option which takes an additional argument - * QCString anotherOptionArg = args->getOption("another-option"); + * TQCString anotherOptionArg = args->getOption("another-option"); * * // Arguments (e.g. files to open) * for(int i = 0; i < args->count(); i++) // Counting start at 0! * { * // don't forget to convert to Unicode! - * openFile( QFile::decodeName( args->arg(i))); + * openFile( TQFile::decodeName( args->arg(i))); * // Or more convenient: * // openURL( args->url(i)); * @@ -234,7 +234,7 @@ class KDECORE_EXPORT KCmdLineArgs { friend class KApplication; friend class KUniqueApplication; - friend class QPtrList; + friend class TQPtrList; public: // Static functions: @@ -253,7 +253,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 - * QApplication / KApplication + * TQApplication / KApplication * * @since 3.2 */ @@ -281,7 +281,7 @@ public: * @param _argv As passed to @p main(...). * @param about A KAboutData object describing your program. * @param noKApp Set this true to not add commandline options for - * QApplication / KApplication + * TQApplication / KApplication */ static void init(int _argc, char **_argv, const KAboutData *about, bool noKApp = false); @@ -389,7 +389,7 @@ public: * where the user started a second instance. * @return the current working directory **/ - static QString cwd(); + static TQString cwd(); /** * Get the appname according to argv[0]. @@ -410,7 +410,7 @@ public: * Print an error to stderr and the usage help to stdout and exit. * @param error the error to print **/ - static void usage(const QString &error); + static void usage(const TQString &error); /** * Enable i18n to be able to print a translated error message. @@ -441,7 +441,7 @@ public: * If the option was present more than the value of the * last occurrence is used. */ - QCString getOption(const char *option) const; + TQCString getOption(const char *option) const; /** * Read out all occurrences of a string option. @@ -543,7 +543,7 @@ public: /** * Load arguments from a stream. */ - static void loadAppArgs( QDataStream &); + static void loadAppArgs( TQDataStream &); /** * Add standard option --tempfile @@ -582,7 +582,7 @@ private: * * Checks what to do with a single option */ - static void findOption(const char *_opt, QCString opt, int &i, bool enabled, bool &moreOptions); + static void findOption(const char *_opt, TQCString opt, int &i, bool enabled, bool &moreOptions); /** * @internal @@ -619,23 +619,23 @@ private: /** * @internal for KUniqueApplication only: * - * Save all but the Qt and KDE arguments to a stream. + * Save all but the TQt and KDE arguments to a stream. */ - static void saveAppArgs( QDataStream &); + static void saveAppArgs( TQDataStream &); /** * @internal * * Set a boolean option */ - void setOption(const QCString &option, bool enabled); + void setOption(const TQCString &option, bool enabled); /** * @internal * * Set a string option */ - void setOption(const QCString &option, const char *value); + void setOption(const TQCString &option, const char *value); /** * @internal @@ -649,14 +649,14 @@ private: * * Save to a stream. */ - void save( QDataStream &) const; + void save( TQDataStream &) const; /** * @internal * * Restore from a stream. */ - void load( QDataStream &); + void load( TQDataStream &); /** * @internal for KApplication only @@ -675,14 +675,14 @@ private: */ static void initIgnore(int _argc, char **_argv, const char *_appname); - static void printQ(const QString &msg); + static void printQ(const TQString &msg); const KCmdLineOptions *options; const char *name; const char *id; KCmdLineParsedOptions *parsedOptionList; KCmdLineParsedArgs *parsedArgList; - bool isQt; + bool isTQt; static KCmdLineArgsList *argsList; // All options. static const KAboutData *about; diff --git a/src/common/nokde/nokde_klocale.cpp b/src/common/nokde/nokde_klocale.cpp index e30ba2f..aa6cb26 100644 --- a/src/common/nokde/nokde_klocale.cpp +++ b/src/common/nokde/nokde_klocale.cpp @@ -1,4 +1,4 @@ #include "nokde_klocale.h" -QString i18n(const QString &, const QString &text) { return text; } -QString locate(const QString &, const QString &) { return QString::null; } +TQString i18n(const TQString &, const TQString &text) { return text; } +TQString locate(const TQString &, const TQString &) { return TQString(); } diff --git a/src/common/nokde/nokde_klocale.h b/src/common/nokde/nokde_klocale.h index a1cf720..9a3e361 100644 --- a/src/common/nokde/nokde_klocale.h +++ b/src/common/nokde/nokde_klocale.h @@ -9,9 +9,9 @@ #undef I18N_NOOP #define I18N_NOOP(x) (x) -#include -inline QString i18n(const QString &text) { return text; } -extern QString i18n(const QString &index, const QString &text); -extern QString locate(const QString &, const QString &); +#include +inline TQString i18n(const TQString &text) { return text; } +extern TQString i18n(const TQString &index, const TQString &text); +extern TQString locate(const TQString &, const TQString &); #endif diff --git a/src/common/nokde/nokde_kprocess.cpp b/src/common/nokde/nokde_kprocess.cpp index 92c8968..2886f20 100644 --- a/src/common/nokde/nokde_kprocess.cpp +++ b/src/common/nokde/nokde_kprocess.cpp @@ -1,29 +1,29 @@ #include "nokde_kprocess.h" -#if QT_VERSION<0x040000 -# include -# define Q3Process QProcess +#if [[[TQT_VERSION IS DEPRECATED]]]<0x040000 +# include +# define Q3Process TQProcess #else -# include +# include #endif #if defined(Q_OS_UNIX) # include #endif -KProcess::KProcess(QObject *parent, const char *name) - : QObject(parent, name) +KProcess::KProcess(TQObject *tqparent, const char *name) + : TQObject(tqparent, name) { _process = new Q3Process(this); - connect(_process, SIGNAL(processExited()), SLOT(processExitedSlot())); - connect(_process, SIGNAL(readyReadStdout()), SLOT(readyReadStdoutSlot())); - connect(_process, SIGNAL(readyReadStderr()), SLOT(readyReadStderrSlot())); + connect(_process, TQT_SIGNAL(processExited()), TQT_SLOT(processExitedSlot())); + connect(_process, TQT_SIGNAL(readyReadStdout()), TQT_SLOT(readyReadStdoutSlot())); + connect(_process, TQT_SIGNAL(readyReadStderr()), TQT_SLOT(readyReadStderrSlot())); } bool KProcess::start() { _process->setArguments(_arguments); - QStringList env; + TQStringList env; if ( !_environment.isEmpty() ) { for (uint i=0; environ[i]; i++) env += environ[i]; env += _environment; @@ -40,23 +40,23 @@ void KProcess::processExitedSlot() void KProcess::readyReadStdoutSlot() { - QByteArray a = _process->readStdout(); + TQByteArray a = _process->readStdout(); emit receivedStdout(this, a.data(), a.count()); } void KProcess::readyReadStderrSlot() { - QByteArray a = _process->readStderr(); + TQByteArray a = _process->readStderr(); emit receivedStderr(this, a.data(), a.count()); } bool KProcess::writeStdin(const char *buffer, int len) { -#if QT_VERSION<0x040000 - QByteArray a; +#if [[[TQT_VERSION IS DEPRECATED]]]<0x040000 + TQByteArray a; a.assign(buffer, len); #else - QByteArray a(buffer, len); + TQByteArray a(buffer, len); #endif _process->writeToStdin(a); return true; @@ -88,7 +88,7 @@ bool KProcess::isRunning() const return _process->isRunning(); } -void KProcess::setWorkingDirectory(const QDir &dir) +void KProcess::setWorkingDirectory(const TQDir &dir) { return _process->setWorkingDirectory(dir); } diff --git a/src/common/nokde/nokde_kprocess.h b/src/common/nokde/nokde_kprocess.h index 59ff73c..5c7effd 100644 --- a/src/common/nokde/nokde_kprocess.h +++ b/src/common/nokde/nokde_kprocess.h @@ -1,32 +1,33 @@ #ifndef _KPROCESS_H_ #define _KPROCESS_H_ -#include +#include #include "common/global/global.h" #include "common/common/synchronous.h" -#if QT_VERSION<0x040000 -class QProcess; +#if [[[TQT_VERSION IS DEPRECATED]]]<0x040000 +class TQProcess; #else class Q3Process; #endif -class KProcess : public QObject +class KProcess : public TQObject { Q_OBJECT + TQ_OBJECT public: - KProcess(QObject *parent = 0, const char *name = 0); + KProcess(TQObject *tqparent = 0, const char *name = 0); void clearArguments() { _arguments.clear(); } - KProcess &operator<< (const QString &arg) { _arguments += arg; return *this; } - KProcess &operator<< (const QStringList &args) { _arguments += args; return *this; } - QStringList args() const { return _arguments; } - void setEnvironment(const QString &name, const QString &value) { _environment += name + "=" + value; } + KProcess &operator<< (const TQString &arg) { _arguments += arg; return *this; } + KProcess &operator<< (const TQStringList &args) { _arguments += args; return *this; } + TQStringList args() const { return _arguments; } + void setEnvironment(const TQString &name, const TQString &value) { _environment += name + "=" + value; } bool start(); bool writeStdin(const char *buffer, int len); bool kill(); bool kill(int n); int exitStatus() const; bool isRunning() const; - void setWorkingDirectory(const QDir &dir); + void setWorkingDirectory(const TQDir &dir); void setUseShell(bool useShell); signals: @@ -40,12 +41,12 @@ private slots: void readyReadStderrSlot(); private: -#if QT_VERSION<0x040000 - QProcess *_process; +#if [[[TQT_VERSION IS DEPRECATED]]]<0x040000 + TQProcess *_process; #else Q3Process *_process; #endif - QStringList _arguments,_environment; + TQStringList _arguments,_environment; }; #endif diff --git a/src/common/nokde/nokde_kurl.h b/src/common/nokde/nokde_kurl.h index 202c46d..c31fca1 100644 --- a/src/common/nokde/nokde_kurl.h +++ b/src/common/nokde/nokde_kurl.h @@ -1,7 +1,7 @@ #ifndef _KURL_H_ #define _KURL_H_ -#include +#include #include "common/global/global.h" @@ -9,12 +9,12 @@ class KURL : public Q3Url { public: KURL() {} - KURL(const QString &s) : Q3Url(s) {} + KURL(const TQString &s) : Q3Url(s) {} void cleanPath() {} bool isEmpty() const { return toString(false, false).isEmpty(); } - QString fileName(bool b) const { Q_UNUSED(b); Q_ASSERT(!b); return Q3Url::fileName(); } - static KURL fromPathOrURL(const QString &s) { return KURL(s); } -#if QT_VERSION>=0x040000 + TQString fileName(bool b) const { Q_UNUSED(b); Q_ASSERT(!b); return Q3Url::fileName(); } + static KURL fromPathOrURL(const TQString &s) { return KURL(s); } +#if [[[TQT_VERSION IS DEPRECATED]]]>=0x040000 bool operator <(const KURL &url) const { return path() +#include extern "C" { #endif @@ -60,13 +60,13 @@ KDEWIN32_EXPORT void win32_slashify(char *path, int maxlen); @param item is an item inside subKey or "" if default folder's value should be returned @param ok if not null, will be set to true on success and false on failure */ -KDEWIN32_EXPORT QString getWin32RegistryValue(HKEY key, const QString& subKey, - const QString& item, bool *ok = 0); +KDEWIN32_EXPORT TQString getWin32RegistryValue(HKEY key, const TQString& subKey, + const TQString& item, bool *ok = 0); /** \return a value from MS Windows native registry for shell folder \a folder. */ -inline QString getWin32ShellFoldersPath(const QString& folder) { +inline TQString getWin32ShellFoldersPath(const TQString& folder) { return getWin32RegistryValue(HKEY_CURRENT_USER, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders", folder); } @@ -77,7 +77,7 @@ inline QString getWin32ShellFoldersPath(const QString& folder) { Used by KPropertiesDialog, if possible. */ KDEWIN32_EXPORT -bool showWin32FilePropertyDialog(const QString& fileName); +bool showWin32FilePropertyDialog(const TQString& fileName); /** \return two-letter locale name (like "en" or "pl") taken from MS Windows native registry. @@ -85,12 +85,12 @@ bool showWin32FilePropertyDialog(const QString& fileName); Used e.g. by kbuildsycoca application. */ KDEWIN32_EXPORT -QCString getWin32LocaleName(); +TQCString getWin32LocaleName(); /*! Temporary solutiuon - \return a KFileDialog-compatible filter string converted to QFileDialog compatible one. + \return a KFileDialog-compatible filter string converted to TQFileDialog compatible one. This is temporary solution for kdelibs/win32... */ -KDEWIN32_EXPORT QString convertKFileDialogFilterToQFileDialogFilter(const QString& filter); +KDEWIN32_EXPORT TQString convertKFileDialogFilterToTQFileDialogFilter(const TQString& filter); #endif //__cplusplus diff --git a/src/common/port/parallel.cpp b/src/common/port/parallel.cpp index 22b6a4c..d92bc82 100644 --- a/src/common/port/parallel.cpp +++ b/src/common/port/parallel.cpp @@ -30,9 +30,9 @@ #include "common/common/misc.h" //----------------------------------------------------------------------------- -QStringList *Port::Parallel::_list = 0; +TQStringList *Port::Parallel::_list = 0; -Port::IODirs Port::Parallel::probe(const QString &device) +Port::IODirs Port::Parallel::probe(const TQString &device) { #if defined(HAVE_PPDEV) int fd = ::open(device.latin1(), O_RDWR); @@ -54,26 +54,26 @@ Port::IODirs Port::Parallel::probe(const QString &device) #endif } -QStringList Port::Parallel::deviceList() +TQStringList Port::Parallel::deviceList() { - QStringList list; + TQStringList list; #if defined(HAVE_PPDEV) // standard parport in user space - for(int i = 0; i<8; ++i) list.append(QString("/dev/parport%1").arg(i)); + for(int i = 0; i<8; ++i) list.append(TQString("/dev/parport%1").tqarg(i)); // new devfs parport flavour - for(int i = 0; i<8; ++i) list.append(QString("/dev/parports/%1").arg(i)); + for(int i = 0; i<8; ++i) list.append(TQString("/dev/parports/%1").tqarg(i)); #elif defined(HAVE_PPBUS) // FreeBSD - for(int i = 0; i<8; ++i) list.append(QString("/dev/ppi%1").arg(i)); + for(int i = 0; i<8; ++i) list.append(TQString("/dev/ppi%1").tqarg(i)); #endif return list; } -const QStringList &Port::Parallel::probedDeviceList() +const TQStringList &Port::Parallel::probedDeviceList() { if ( _list==0 ) { - QStringList all = deviceList(); - _list = new QStringList; + TQStringList all = deviceList(); + _list = new TQStringList; for (uint i=0; iappend(all[i]); } @@ -100,12 +100,12 @@ const Port::Parallel::PPinData Port::Parallel::PIN_DATA[Nb_Pins] = { { Data, 0x20, Out, "D5" }, // data 5 { Data, 0x40, Out, "D6" }, // data 6 { Data, 0x80, Out, "D7" }, // data 7 - { Status, 0x40, In, "/ACK" }, // !ack - { Status, 0x80, In, "BUSY" }, // busy - { Status, 0x20, In, "PAPER" }, // pout - { Status, 0x10, In, "SELin" }, // select + { tqStatus, 0x40, In, "/ACK" }, // !ack + { tqStatus, 0x80, In, "BUSY" }, // busy + { tqStatus, 0x20, In, "PAPER" }, // pout + { tqStatus, 0x10, In, "SELin" }, // select { Control, 0x02, Out, "LF" }, // !feed - { Status, 0x08, In, "/ERROR" }, // !error + { tqStatus, 0x08, In, "/ERROR" }, // !error { Control, 0x04, Out, "PRIME" }, // !init { Control, 0x08, Out, "SELout" }, // !si { Nb_RequestTypes, 0x00, NoIO, "GND" }, // GND @@ -118,9 +118,9 @@ const Port::Parallel::PPinData Port::Parallel::PIN_DATA[Nb_Pins] = { { Nb_RequestTypes, 0x00, NoIO, "GND" } // GND }; -QValueVector Port::Parallel::pinData(IODir dir) const +TQValueVector Port::Parallel::pinData(IODir dir) const { - QValueVector v; + TQValueVector v; for (uint i=0; i Port::Parallel::pinData(IODir dir) const bool Port::Parallel::isGroundPin(uint pin) const { - return ( PIN_DATA[pin].label==QString("GND") ); + return ( PIN_DATA[pin].label==TQString("GND") ); } Port::IODir Port::Parallel::ioDir(uint pin) const @@ -155,7 +155,7 @@ const Port::Parallel::RequestData Port::Parallel::REQUEST_DATA[Nb_RequestTypes] #endif }; -Port::Parallel::Parallel(const QString &device, Log::Base &base) +Port::Parallel::Parallel(const TQString &device, Log::Base &base) : Base(base), _fd(-1), _device(device) { for (uint i=0; i pinData(IODir dir) const; + virtual TQValueVector pinData(IODir dir) const; virtual bool isGroundPin(uint pin) const; virtual uint groundPin() const { return P25; } virtual IODir ioDir(uint pin) const; private: int _fd; - QString _device; + TQString _device; struct RequestData { int read, write; }; static const RequestData REQUEST_DATA[Nb_RequestTypes]; uchar _images[Nb_RequestTypes]; - static QStringList *_list; - static QStringList deviceList(); + static TQStringList *_list; + static TQStringList deviceList(); virtual bool internalOpen(); virtual void internalClose(); - virtual void setSystemError(const QString &message); + virtual void setSystemError(const TQString &message); }; } // namespace diff --git a/src/common/port/port.cpp b/src/common/port/port.cpp index c56c120..3df2d48 100644 --- a/src/common/port/port.cpp +++ b/src/common/port/port.cpp @@ -8,7 +8,7 @@ ***************************************************************************/ #include "port.h" -#if defined(Q_WS_WIN) +#if defined(TQ_WS_WIN) # include #else # include @@ -65,16 +65,16 @@ const PortType::Data PortType::DATA[Nb_Types] = { const char * const Port::IO_DIR_NAMES[3] = { "no_io", "in", "out" }; -QStringList Port::probedDeviceList(PortType type) +TQStringList Port::probedDeviceList(PortType type) { - if ( !isAvailable(type) ) return QStringList(); + if ( !isAvailable(type) ) return TQStringList(); switch (type.type()) { case PortType::Serial: return Serial::probedDeviceList(); case PortType::Parallel: return Parallel::probedDeviceList(); case PortType::USB: return USB::probedDeviceList(); case PortType::Nb_Types: break; } - return QStringList(); + return TQStringList(); } bool Port::isAvailable(PortType type) @@ -88,11 +88,11 @@ bool Port::isAvailable(PortType type) return false; } -PortType Port::findType(const QString &portDevice) +PortType Port::findType(const TQString &portDevice) { FOR_EACH(PortType, type) { if ( !type.data().withDevice ) continue; - if ( probedDeviceList(type).contains(portDevice) ) return type; + if ( probedDeviceList(type).tqcontains(portDevice) ) return type; } return PortType::Nb_Types; } diff --git a/src/common/port/port.h b/src/common/port/port.h index f385deb..7c644cd 100644 --- a/src/common/port/port.h +++ b/src/common/port/port.h @@ -9,7 +9,7 @@ #ifndef PORT_H #define PORT_H -#include +#include #include "common/global/global.h" #include "common/common/key_enum.h" @@ -34,17 +34,17 @@ extern void usleep(uint us); // in microseconds class Description { public: Description() : type(PortType::Nb_Types) {} - Description(PortType ptype, const QString &pdevice) : type(ptype), device(pdevice) {} + Description(PortType ptype, const TQString &pdevice) : type(ptype), device(pdevice) {} PortType type; - QString device; + TQString device; }; enum IODir { NoIO = 0, In = 1, Out = 2 }; extern const char * const IO_DIR_NAMES[3]; - Q_DECLARE_FLAGS(IODirs, IODir) - Q_DECLARE_OPERATORS_FOR_FLAGS(IODirs) - extern QStringList probedDeviceList(PortType type); - extern PortType findType(const QString &device); + TQ_DECLARE_FLAGS(IODirs, IODir) + TQ_DECLARE_OPERATORS_FOR_FLAGS(IODirs) + extern TQStringList probedDeviceList(PortType type); + extern PortType findType(const TQString &device); extern bool isAvailable(PortType type); struct PinData { uint pin; diff --git a/src/common/port/port_base.cpp b/src/common/port/port_base.cpp index 7528eeb..0112a1b 100644 --- a/src/common/port/port_base.cpp +++ b/src/common/port/port_base.cpp @@ -28,31 +28,31 @@ void Port::Base::close() bool Port::Base::send(const char *data, uint size, uint timeout) { - log(Log::DebugLevel::LowLevel, QString("Sending: \"%1\"").arg(toPrintable(data, size, PrintAlphaNum))); + log(Log::DebugLevel::LowLevel, TQString("Sending: \"%1\"").tqarg(toPrintable(data, size, PrintAlphaNum))); return internalSend(data, size, timeout); } -bool Port::Base::receive(uint size, QString &s, uint timeout) +bool Port::Base::receive(uint size, TQString &s, uint timeout) { - QMemArray a; + TQMemArray a; if ( !receive(size, a, timeout) ) return false; s.fill(0, size); for (uint i=0; i &a, uint timeout) +bool Port::Base::receive(uint size, TQMemArray &a, uint timeout) { a.resize(size); bool ok = internalReceive(size, (char *)a.data(), timeout); - if (ok) log(Log::DebugLevel::LowLevel, QString("Received: \"%1\"").arg(toPrintable(a, PrintAlphaNum))); + if (ok) log(Log::DebugLevel::LowLevel, TQString("Received: \"%1\"").tqarg(toPrintable(a, PrintAlphaNum))); return ok; } bool Port::Base::receiveChar(char &c, uint timeout) { if ( !internalReceive(1, &c, timeout) ) return false; - log(Log::DebugLevel::LowLevel, QString("Received: \"%1\"").arg(toPrintable(c, PrintAlphaNum))); + log(Log::DebugLevel::LowLevel, TQString("Received: \"%1\"").tqarg(toPrintable(c, PrintAlphaNum))); return true; } @@ -66,10 +66,10 @@ bool Port::Base::readPin(uint, LogicType, bool &) qFatal("readPin not implemented"); return 0; } -QValueVector Port::Base::pinData(IODir) const +TQValueVector Port::Base::pinData(IODir) const { qFatal("pinData not implemented"); - return QValueVector(); + return TQValueVector(); } bool Port::Base::isGroundPin(uint) const { @@ -87,22 +87,22 @@ Port::IODir Port::Base::ioDir(uint) const return NoIO; } -void Port::Base::log(Log::LineType lineType, const QString &message) +void Port::Base::log(Log::LineType lineType, const TQString &message) { if ( lineType==Log::LineType::Error && _closing ) return; Log::Base::log(lineType, description().type.label() + ": " + message); if ( lineType==Log::LineType::Error ) close(); } -void Port::Base::log(Log::DebugLevel level, const QString &message) +void Port::Base::log(Log::DebugLevel level, const TQString &message) { Log::Base::log(level, description().type.label() + ": " + message); } -void Port::Base::logData(const QString &) +void Port::Base::logData(const TQString &) { /* - QString vs; + TQString vs; for (uint i=0; i=32 && c<=126 ) vs += c; else { - QString tmp; + TQString tmp; tmp.sprintf("\\x%02x", c); vs += tmp; } diff --git a/src/common/port/port_base.h b/src/common/port/port_base.h index 3ae4787..c48fed6 100644 --- a/src/common/port/port_base.h +++ b/src/common/port/port_base.h @@ -24,21 +24,21 @@ public: bool open(); void close(); - virtual void log(Log::LineType kind, const QString &message); - virtual void log(Log::DebugLevel level, const QString &message); - void logData(const QString &s); + virtual void log(Log::LineType kind, const TQString &message); + virtual void log(Log::DebugLevel level, const TQString &message); + void logData(const TQString &s); enum { DEFAULT_TIMEOUT = 3000 }; // 3s bool sendChar(char c, uint timeout = DEFAULT_TIMEOUT) { return send(&c, 1, timeout); } bool send(const char *data, uint size, uint timeout = DEFAULT_TIMEOUT); - bool send(const QMemArray &a, uint timeout = DEFAULT_TIMEOUT) { return send((const char *)a.data(), a.count(), timeout); } + bool send(const TQMemArray &a, uint timeout = DEFAULT_TIMEOUT) { return send((const char *)a.data(), a.count(), timeout); } bool receiveChar(char &c, uint timeout = DEFAULT_TIMEOUT); - bool receive(uint size, QString &s, uint timeout = DEFAULT_TIMEOUT); - bool receive(uint size, QMemArray &a, uint timeout = DEFAULT_TIMEOUT); + bool receive(uint size, TQString &s, uint timeout = DEFAULT_TIMEOUT); + bool receive(uint size, TQMemArray &a, uint timeout = DEFAULT_TIMEOUT); virtual bool setPinOn(uint pin, bool on, LogicType type); virtual bool readPin(uint pin, LogicType type, bool &value); - virtual QValueVector pinData(IODir dir) const; + virtual TQValueVector pinData(IODir dir) const; virtual bool isGroundPin(uint pin) const; virtual uint groundPin() const; virtual IODir ioDir(uint pin) const; @@ -48,7 +48,7 @@ protected: virtual void internalClose() = 0; virtual bool internalSend(const char *, uint, uint) { qFatal("Not implemented"); return false; } virtual bool internalReceive(uint, char *, uint) { qFatal("Not implemented"); return false; } - virtual void setSystemError(const QString &message) = 0; + virtual void setSystemError(const TQString &message) = 0; private: bool _closing; diff --git a/src/common/port/serial.cpp b/src/common/port/serial.cpp index b370d22..5942561 100644 --- a/src/common/port/serial.cpp +++ b/src/common/port/serial.cpp @@ -20,17 +20,17 @@ # include # include // needed on some system #endif -#include +#include //----------------------------------------------------------------------------- -QStringList *Port::Serial::_list = 0; +TQStringList *Port::Serial::_list = 0; #if defined(Q_OS_UNIX) const Port::Serial::Handle Port::Serial::INVALID_HANDLE = -1; #elif defined(Q_OS_WIN) const Port::Serial::Handle Port::Serial::INVALID_HANDLE = INVALID_HANDLE_VALUE; #endif -Port::Serial::Handle Port::Serial::openHandle(const QString &device, IODirs dirs) +Port::Serial::Handle Port::Serial::openHandle(const TQString &device, IODirs dirs) { #if defined(Q_OS_UNIX) // open non blocking: avoid missing DCD (comment from xwisp2) @@ -57,7 +57,7 @@ void Port::Serial::closeHandle(Handle handle) #endif } -Port::IODirs Port::Serial::probe(const QString &device) +Port::IODirs Port::Serial::probe(const TQString &device) { Handle handle = openHandle(device, In); if ( handle==INVALID_HANDLE ) return NoIO; @@ -68,35 +68,35 @@ Port::IODirs Port::Serial::probe(const QString &device) return (In | Out); } -QStringList Port::Serial::deviceList() +TQStringList Port::Serial::deviceList() { - QStringList list; + TQStringList list; #if defined(Q_OS_UNIX) // standard serport in user space - for (uint i=0; i<8; i++) list.append(QString("/dev/ttyS%1").arg(i)); + for (uint i=0; i<8; i++) list.append(TQString("/dev/ttyS%1").tqarg(i)); // new devfs serport flavour - for (uint i=0; i<8; i++) list.append(QString("/dev/tts/%1").arg(i)); + for (uint i=0; i<8; i++) list.append(TQString("/dev/tts/%1").tqarg(i)); // standard USB serport in user space - for (uint i=0; i<8; i++) list.append(QString("/dev/ttyUSB%1").arg(i)); + for (uint i=0; i<8; i++) list.append(TQString("/dev/ttyUSB%1").tqarg(i)); // new devfs USB serport flavour - for (uint i=0; i<8; i++) list.append(QString("/dev/usb/tts/%1").arg(i)); + for (uint i=0; i<8; i++) list.append(TQString("/dev/usb/tts/%1").tqarg(i)); // FreeBSD - for (uint i=0; i<8; i++) list.append(QString("/dev/ttyd%1").arg(i)); + for (uint i=0; i<8; i++) list.append(TQString("/dev/ttyd%1").tqarg(i)); // Slackware 11 devfs USB Serial port support. - for (uint i=0; i<8; i++) list.append(QString("/dev/tts/USB%1").arg(i)); + for (uint i=0; i<8; i++) list.append(TQString("/dev/tts/USB%1").tqarg(i)); // MacOSX devfs USB Serial port support. list.append("/dev/tty.usbserial"); #elif defined(Q_OS_WIN) - for (uint i=1; i<10; i++) list.append(QString("COM%1").arg(i)); + for (uint i=1; i<10; i++) list.append(TQString("COM%1").tqarg(i)); #endif return list; } -const QStringList &Port::Serial::probedDeviceList() +const TQStringList &Port::Serial::probedDeviceList() { if ( _list==0 ) { - QStringList all = deviceList(); - _list = new QStringList; + TQStringList all = deviceList(); + _list = new TQStringList; for (uint i=0; iappend(all[i]); } @@ -130,9 +130,9 @@ const Port::Serial::SPinData Port::Serial::PIN_DATA[Nb_Pins] = { { Out, "RI" } }; -QValueVector Port::Serial::pinData(IODir dir) const +TQValueVector Port::Serial::pinData(IODir dir) const { - QValueVector v; + TQValueVector v; for (uint i=0; i Port::Serial::pinData(IODir dir) const } bool Port::Serial::isGroundPin(uint pin) const { - return ( PIN_DATA[pin].label==QString("GND") ); + return ( PIN_DATA[pin].label==TQString("GND") ); } Port::IODir Port::Serial::ioDir(uint pin) const @@ -150,7 +150,7 @@ Port::IODir Port::Serial::ioDir(uint pin) const return PIN_DATA[pin].dir; } -Port::Serial::Serial(const QString &device, Properties properties, Log::Base &base) +Port::Serial::Serial(const TQString &device, Properties properties, Log::Base &base) : Base(base), _device(device), _properties(properties), _fd(INVALID_HANDLE) {} @@ -187,7 +187,7 @@ bool Port::Serial::internalOpen() { _fd = openHandle(_device, In | Out); if ( _fd==INVALID_HANDLE ) { - setSystemError(i18n("Could not open device \"%1\" read-write").arg(_device)); + setSystemError(i18n("Could not open device \"%1\" read-write").tqarg(_device)); return false; } if ( !getParameters(_oldParameters) ) return false; // save configuration @@ -216,7 +216,7 @@ void Port::Serial::internalClose() bool Port::Serial::internalSend(const char *data, uint size, uint timeout) { if ( _fd==INVALID_HANDLE ) return false; - QTime time; + TQTime time; time.start(); for (uint todo=size; todo!=0; ) { #if defined(Q_OS_UNIX) @@ -232,7 +232,7 @@ bool Port::Serial::internalSend(const char *data, uint size, uint timeout) if ( res>0 ) todo -= res; else { if ( uint(time.elapsed())>timeout ) { - log(Log::LineType::Error, i18n("Timeout sending data (%1/%2 bytes sent).").arg(size-todo).arg(size)); + log(Log::LineType::Error, i18n("Timeout sending data (%1/%2 bytes sent).").tqarg(size-todo).tqarg(size)); return false; } msleep(1); @@ -245,7 +245,7 @@ bool Port::Serial::internalSend(const char *data, uint size, uint timeout) bool Port::Serial::internalReceive(uint size, char *data, uint timeout) { if ( _fd==INVALID_HANDLE ) return false; - QTime time; + TQTime time; time.start(); for(uint todo=size; todo!=0; ) { #if defined(Q_OS_UNIX) @@ -277,7 +277,7 @@ bool Port::Serial::internalReceive(uint size, char *data, uint timeout) if ( res>0 ) todo -= res; else { if ( uint(time.elapsed())>timeout ) { - log(Log::LineType::Error, i18n("Timeout receiving data (%1/%2 bytes received).").arg(size-todo).arg(size)); + log(Log::LineType::Error, i18n("Timeout receiving data (%1/%2 bytes received).").tqarg(size-todo).tqarg(size)); return false; } msleep(1); @@ -292,7 +292,7 @@ bool Port::Serial::drain(uint timeout) #if defined(Q_OS_UNIX) // tcdrain will block if the serial cable is disconnected // so we first check for data in output buffer... - QTime time; + TQTime time; time.start(); for (;;) { int nb; @@ -303,7 +303,7 @@ bool Port::Serial::drain(uint timeout) if ( nb==0 ) break; if ( uint(time.elapsed())>timeout ) { _fd = INVALID_HANDLE; // otherwise close blocks... - log(Log::LineType::Error, i18n("Timeout sending data (%1 bytes left).").arg(nb)); + log(Log::LineType::Error, i18n("Timeout sending data (%1 bytes left).").tqarg(nb)); return false; } } @@ -364,7 +364,7 @@ bool Port::Serial::setPinOn(uint pin, bool on, LogicType type) Q_ASSERT( pin pinData(IODir dir) const; + virtual TQValueVector pinData(IODir dir) const; virtual bool isGroundPin(uint pin) const; virtual uint groundPin() const { return SG; } virtual IODir ioDir(uint pin) const; private: - QString _device; + TQString _device; Properties _properties; #if defined(Q_OS_UNIX) typedef int Handle; @@ -93,20 +93,20 @@ private: virtual void internalClose(); virtual bool internalSend(const char *data, uint size, uint timeout); virtual bool internalReceive(uint size, char *data, uint timeout); - virtual void setSystemError(const QString &message); + virtual void setSystemError(const TQString &message); bool internalSetPinOn(Pin pin, bool on); bool internalReadPin(Pin pin, LogicType type, bool &value); static const Handle INVALID_HANDLE; - static Handle openHandle(const QString &device, IODirs dirs); + static Handle openHandle(const TQString &device, IODirs dirs); static void closeHandle(Handle handle); - static QStringList *_list; - static QStringList deviceList(); + static TQStringList *_list; + static TQStringList deviceList(); static void setHardwareFlowControl(Parameters ¶meters, bool on); }; -Q_DECLARE_OPERATORS_FOR_FLAGS(Serial::Properties) -Q_DECLARE_OPERATORS_FOR_FLAGS(Serial::InputFlags) -Q_DECLARE_OPERATORS_FOR_FLAGS(Serial::ControlFlags) +TQ_DECLARE_OPERATORS_FOR_FLAGS(Serial::Properties) +TQ_DECLARE_OPERATORS_FOR_FLAGS(Serial::InputFlags) +TQ_DECLARE_OPERATORS_FOR_FLAGS(Serial::ControlFlags) } // namespace diff --git a/src/common/port/usb_port.cpp b/src/common/port/usb_port.cpp index 392b483..80e7de2 100644 --- a/src/common/port/usb_port.cpp +++ b/src/common/port/usb_port.cpp @@ -14,7 +14,7 @@ #ifdef HAVE_USB # include #endif -#include +#include #include "common/common/version_data.h" #include "common/common/number.h" @@ -38,7 +38,7 @@ void Port::USB::initialize() #ifdef HAVE_USB usb_init(); VersionData vd = VersionData::fromString(LIBUSB_VERSION); - QString s = QString("libusb %1").arg(vd.pretty()); + TQString s = TQString("libusb %1").tqarg(vd.pretty()); if ( vdconfig[c].interface[i].num_altsetting; a++) { qDebug(" Looking at altsetting %d...This altsetting has %d endpoints.", a, dev->config[c].interface[i].altsetting[a].bNumEndpoints); for (int e=0; e < dev->config[c].interface[i].altsetting[a].bNumEndpoints; e++) { - QString s; + TQString s; s.sprintf(" Endpoint %d: Address %02xh, attributes %02xh ", e, dev->config[c].interface[i].altsetting[a].endpoint[e].bEndpointAddress, dev->config[c].interface[i].altsetting[a].endpoint[e].bmAttributes); uchar attribs = (dev->config[c].interface[i].altsetting[a].endpoint[e].bmAttributes & 3); switch (attribs) { @@ -122,17 +122,17 @@ bool Port::USB::findBulk(const struct usb_device *dev) return true; } -QStringList Port::USB::probedDeviceList() +TQStringList Port::USB::probedDeviceList() { initialize(); - QStringList list; + TQStringList list; #ifdef HAVE_USB usb_init(); // needed ? for (usb_bus *bus=getBusses(); bus; bus=bus->next) { for (struct usb_device *dev=bus->devices; dev; dev=dev->next) { if ( dev->descriptor.idVendor==0 ) continue; // controller - list.append(QString("Vendor Id: %1 - Product Id: %2") - .arg(toLabel(NumberBase::Hex, dev->descriptor.idVendor, 4)).arg(toLabel(NumberBase::Hex, dev->descriptor.idProduct, 4))); + list.append(TQString("Vendor Id: %1 - Product Id: %2") + .tqarg(toLabel(NumberBase::Hex, dev->descriptor.idVendor, 4)).tqarg(toLabel(NumberBase::Hex, dev->descriptor.idProduct, 4))); } } #endif @@ -176,10 +176,10 @@ Port::USB::~USB() delete _private; } -void Port::USB::setSystemError(const QString &message) +void Port::USB::setSystemError(const TQString &message) { #ifdef HAVE_USB - log(Log::LineType::Error, message + QString(" (err=%1).").arg(usb_strerror())); + log(Log::LineType::Error, message + TQString(" (err=%1).").tqarg(usb_strerror())); #else log(Log::LineType::Error, message); #endif @@ -192,7 +192,7 @@ void Port::USB::tryToDetachDriver() log(Log::DebugLevel::Extra, "find if there is already an installed driver"); char dname[256] = ""; if ( usb_get_driver_np(_handle, _interface, dname, 255)<0 ) return; - log(Log::DebugLevel::Normal, QString(" a driver \"%1\" is already installed...").arg(dname)); + log(Log::DebugLevel::Normal, TQString(" a driver \"%1\" is already installed...").tqarg(dname)); # if defined(LIBUSB_HAS_DETACH_KERNEL_DRIVER_NP) && LIBUSB_HAS_DETACH_KERNEL_DRIVER_NP usb_detach_kernel_driver_np(_handle, _interface); log(Log::DebugLevel::Normal, " try to detach it..."); @@ -208,10 +208,10 @@ bool Port::USB::internalOpen() _device = findDevice(_vendorId, _productId); if ( _device==0 ) { log(Log::LineType::Error, i18n("Could not find USB device (vendor=%1 product=%2).") - .arg(toLabel(NumberBase::Hex, _vendorId, 4)).arg(toLabel(NumberBase::Hex, _productId, 4))); + .tqarg(toLabel(NumberBase::Hex, _vendorId, 4)).tqarg(toLabel(NumberBase::Hex, _productId, 4))); return false; } - log(Log::DebugLevel::Extra, QString("found USB device as \"%1\" on bus \"%2\"").arg(_device->filename).arg(_device->bus->dirname)); + log(Log::DebugLevel::Extra, TQString("found USB device as \"%1\" on bus \"%2\"").tqarg(_device->filename).tqarg(_device->bus->dirname)); _handle = usb_open(_device); if ( _handle==0 ) { setSystemError(i18n("Error opening USB device.")); @@ -239,11 +239,11 @@ bool Port::USB::internalOpen() uint old = _config; i = 0; _config = _device->config[i].bConfigurationValue; - log(Log::LineType::Warning, i18n("Configuration %1 not present: using %2").arg(old).arg(_config)); + log(Log::LineType::Warning, i18n("Configuration %1 not present: using %2").tqarg(old).tqarg(_config)); } const usb_config_descriptor &configd = _device->config[i]; if ( usb_set_configuration(_handle, _config)<0 ) { - setSystemError(i18n("Error setting USB configuration %1.").arg(_config)); + setSystemError(i18n("Error setting USB configuration %1.").tqarg(_config)); return false; } for (i=0; i_interface = &(configd.interface[i].altsetting[0]); if ( usb_claim_interface(_handle, _interface)<0 ) { - setSystemError(i18n("Could not claim USB interface %1").arg(_interface)); + setSystemError(i18n("Could not claim USB interface %1").tqarg(_interface)); return false; } - log(Log::DebugLevel::Max, QString("alternate setting is %1").arg(_private->_interface->bAlternateSetting)); - log(Log::DebugLevel::Max, QString("USB bcdDevice: %1").arg(toHexLabel(_device->descriptor.bcdDevice, 4))); + log(Log::DebugLevel::Max, TQString("alternate setting is %1").tqarg(_private->_interface->bAlternateSetting)); + log(Log::DebugLevel::Max, TQString("USB bcdDevice: %1").tqarg(toHexLabel(_device->descriptor.bcdDevice, 4))); return true; #else log(Log::LineType::Error, i18n("USB support disabled")); @@ -284,9 +284,9 @@ bool Port::USB::sendControlMessage(const ControlMessageData &data) { if ( hasError() ) return false; #ifdef HAVE_USB - QString s = data.bytes; + TQString s = data.bytes; uint length = strlen(data.bytes) / 2; - QByteArray ba(length); + TQByteArray ba(length); for (uint i=0; i3000 ) { // 3 s - if ( res<0 ) setSystemError(i18n("Error sending data (ep=%1 res=%2)").arg(toHexLabel(ep, 2)).arg(res)); - else log(Log::LineType::Error, i18n("Timeout: only some data sent (%1/%2 bytes).").arg(size-todo).arg(size)); + if ( res<0 ) setSystemError(i18n("Error sending data (ep=%1 res=%2)").tqarg(toHexLabel(ep, 2)).tqarg(res)); + else log(Log::LineType::Error, i18n("Timeout: only some data sent (%1/%2 bytes).").tqarg(size-todo).tqarg(size)); return false; } if ( res==0 ) log(Log::DebugLevel::Normal, i18n("Nothing sent: retrying...")); @@ -376,10 +376,10 @@ bool Port::USB::read(uint ep, char *data, uint size, bool *poll) #ifdef HAVE_USB IODir dir = endpointDir(ep); EndpointMode mode = endpointMode(ep); - log(Log::DebugLevel::LowLevel, QString("read from endpoint %1 (%2 - %3) %4 chars") - .arg(toHexLabel(ep, 2)).arg(ENDPOINT_MODE_NAMES[mode]).arg(IO_DIR_NAMES[dir]).arg(size)); + log(Log::DebugLevel::LowLevel, TQString("read from endpoint %1 (%2 - %3) %4 chars") + .tqarg(toHexLabel(ep, 2)).tqarg(ENDPOINT_MODE_NAMES[mode]).tqarg(IO_DIR_NAMES[dir]).tqarg(size)); Q_ASSERT( dir==In ); - QTime time; + TQTime time; time.start(); int todo = size; for (;;) { @@ -390,8 +390,8 @@ bool Port::USB::read(uint ep, char *data, uint size, bool *poll) //qDebug("res: %i", res); if ( res==todo ) break; if ( uint(time.elapsed())>3000 ) { // 3 s: seems to help icd2 in some case (?) - if ( res<0 ) setSystemError(i18n("Error receiving data (ep=%1 res=%2)").arg(toHexLabel(ep, 2)).arg(res)); - else log(Log::LineType::Error, i18n("Timeout: only some data received (%1/%2 bytes).").arg(size-todo).arg(size)); + if ( res<0 ) setSystemError(i18n("Error receiving data (ep=%1 res=%2)").tqarg(toHexLabel(ep, 2)).tqarg(res)); + else log(Log::LineType::Error, i18n("Timeout: only some data received (%1/%2 bytes).").tqarg(size-todo).tqarg(size)); return false; } if ( res==0 ) { diff --git a/src/common/port/usb_port.h b/src/common/port/usb_port.h index 73961cc..0da7aa1 100644 --- a/src/common/port/usb_port.h +++ b/src/common/port/usb_port.h @@ -27,11 +27,11 @@ class USB : public Base public: USB(Log::Base &base, uint vendorId, uint productId, uint config, uint interface); virtual ~USB(); - virtual Description description() const { return Description(PortType::USB, QString::null); } + virtual Description description() const { return Description(PortType::USB, TQString()); } static struct usb_device *findDevice(uint vendorId, uint productId); static bool isAvailable(); - static QStringList probedDeviceList(); + static TQStringList probedDeviceList(); struct ControlMessageData { int type, request, value; @@ -56,7 +56,7 @@ private: virtual bool internalOpen(); virtual void internalClose(); - virtual void setSystemError(const QString &message); + virtual void setSystemError(const TQString &message); void tryToDetachDriver(); static bool _initialized; diff --git a/src/data/syntax_xml_generator.cpp b/src/data/syntax_xml_generator.cpp index 9f3553e..d1d44b5 100644 --- a/src/data/syntax_xml_generator.cpp +++ b/src/data/syntax_xml_generator.cpp @@ -10,8 +10,8 @@ // this program generate xml files for kate highlighting // the original syntax file was created by Alain Gibaud -#include -#include +#include +#include const char * const DIRECTIVES[] = { "__badram", "__config", "__idlocs", "__maxram", @@ -58,28 +58,28 @@ const char * const INSTRUCTIONS[] = { "tris", "tblrd", "tblwt", "xorlw", "xorwf", 0 }; -QTextStream *initFile(QFile &file) +TQTextStream *initFile(TQFile &file) { if ( !file.open(IO_WriteOnly) ) qFatal("Cannot create \"%s\".", file.name().latin1()); - QTextStream *s = new QTextStream(&file); + TQTextStream *s = new TQTextStream(&file); (*s) << "" << endl; (*s) << "" << endl; (*s) << "" << endl; return s; } -void addList(QTextStream &s, const QString &name, const char * const *items, bool upper) +void addList(TQTextStream &s, const TQString &name, const char * const *items, bool upper) { s << " " << endl; for (uint i=0; items[i]; i++) { s << " " << items[i] << ""; - if (upper) s << "" << QString(items[i]).upper() << ""; + if (upper) s << "" << TQString(items[i]).upper() << ""; s << endl; }; s <<" " << endl; } -void addCommon(QTextStream &s) +void addCommon(TQTextStream &s) { addList(s, "instructions", INSTRUCTIONS, true); s << endl; @@ -106,7 +106,7 @@ void addCommon(QTextStream &s) s << " " << endl; } -void addAsmContexts(QTextStream &s) +void addAsmContexts(TQTextStream &s) { s << " " << endl; s << " " << endl; @@ -161,7 +161,7 @@ void addAsmContexts(QTextStream &s) s << " " << endl; } -void endFile(QTextStream &s) +void endFile(TQTextStream &s) { s << " " << endl; s << "" << endl; @@ -178,8 +178,8 @@ void endFile(QTextStream &s) int main(int, char **) { - QFile afile("asm-pic.xml"); - QTextStream *s = initFile(afile); + TQFile afile("asm-pic.xml"); + TQTextStream *s = initFile(afile); (*s) << "" << endl; @@ -194,7 +194,7 @@ int main(int, char **) addAsmContexts(*s); endFile(*s); - QFile cfile("coff-pic.xml"); + TQFile cfile("coff-pic.xml"); s = initFile(cfile); (*s) << "" << endl; (*s) << endl; diff --git a/src/devices/base/device_group.cpp b/src/devices/base/device_group.cpp index df230d1..4b9d75d 100644 --- a/src/devices/base/device_group.cpp +++ b/src/devices/base/device_group.cpp @@ -9,32 +9,32 @@ #include "device_group.h" #if !defined(NO_KDE) -# include +# include # include -QColor Device::statusColor(Status status) +TQColor Device::statusColor(tqStatus status) { switch (status.type()) { - case Status::Future: return Qt::blue; - case Status::InProduction: return Qt::green; - case Status::Mature: - case Status::NotRecommended: return QColor("orange"); - case Status::EOL: return Qt::red; - case Status::Unknown: - case Status::Nb_Types: break; + case tqStatus::Future: return TQt::blue; + case tqStatus::InProduction: return TQt::green; + case tqStatus::Mature: + case tqStatus::NotRecommended: return TQColor("orange"); + case tqStatus::EOL: return TQt::red; + case tqStatus::Unknown: + case tqStatus::Nb_Types: break; } - return Qt::black; + return TQt::black; } -QString coloredString(const QString &text, QColor color) +TQString coloredString(const TQString &text, TQColor color) { - return QString("" + text + ""; + return TQString("" + text + ""; } -QString supportedString(bool supported) +TQString supportedString(bool supported) { return coloredString(supported ? i18n("Supported") : i18n("Unsupported"), - supported ? Qt::green : Qt::red); + supported ? TQt::green : TQt::red); } class Tick { @@ -44,27 +44,27 @@ public: s = KGlobal::locale()->formatNumber(value, 1); min = oValue; } - QString s; + TQString s; double min; }; -class TickMap : public QMap +class TickMap : public TQMap { public: TickMap() {} void add(double value, double oValue) { insert(value, Tick(value, oValue), false); - (*this)[value].min = QMIN((*this)[value].min, oValue); + (*this)[value].min = TQMIN((*this)[value].min, oValue); } }; -QPixmap drawGraph(const QValueVector &boxes) +TQPixmap drawGraph(const TQValueVector &boxes) { const uint w = 300, h = 200; - QPixmap pixmap(w, h); - pixmap.fill(Qt::white); - QPainter p(&pixmap); - QFontMetrics f(p.font()); + TQPixmap pixmap(w, h); + pixmap.fill(TQt::white); + TQPainter p(&pixmap); + TQFontMetrics f(p.font()); TickMap xTicks, yTicks; xTicks.add(0.0, 0.0); yTicks.add(0.0, 0.0); @@ -85,67 +85,67 @@ QPixmap drawGraph(const QValueVector &boxes) int yStart = h-1 - f.lineSpacing(); TickMap::const_iterator it = xTicks.begin(); for (; it!=xTicks.end(); ++it) { - xStart = QMAX(xStart, f.width(it.data().s)); - xMax = QMAX(xMax, it.key()); + xStart = TQMAX(xStart, f.width(it.data().s)); + xMax = TQMAX(xMax, it.key()); } for (it = yTicks.begin(); it!=yTicks.end(); ++it) - yMax = QMAX(yMax, it.key()); + yMax = TQMAX(yMax, it.key()); int xEnd = w-1 - f.width(xTicks[xMax].s)/2; - QRect rect = f.boundingRect(yTicks[yMax].s); + TQRect rect = f.boundingRect(yTicks[yMax].s); int yEnd = rect.height()/2; // draw boxes - p.setPen(Qt::lightGray); - p.setBrush(Qt::lightGray); + p.setPen(TQt::lightGray); + p.setBrush(TQt::lightGray); for (uint i=0; i &boxes) +TQPixmap Device::vddGraph(const TQString &xLabel, const TQString &yLabel, + const TQValueVector &boxes) { uint sp = 10; - QPixmap graph = drawGraph(boxes); - QPainter p; - QFontMetrics f(p.font()); - QPixmap pixmap(graph.width() + sp + f.width(xLabel), graph.height() + sp + f.lineSpacing()); - pixmap.fill(Qt::white); + TQPixmap graph = drawGraph(boxes); + TQPainter p; + TQFontMetrics f(p.font()); + TQPixmap pixmap(graph.width() + sp + f.width(xLabel), graph.height() + sp + f.lineSpacing()); + pixmap.fill(TQt::white); copyBlt(&pixmap, 0, f.lineSpacing() + sp, &graph, 0, 0, graph.width(), graph.height()); p.begin(&pixmap); - p.setPen(Qt::black); + p.setPen(TQt::black); p.drawText(0, f.lineSpacing(), yLabel); p.drawText(pixmap.width()-1-f.width(xLabel), pixmap.height()-1, xLabel); return pixmap; @@ -159,31 +159,31 @@ const Device::Package *Device::barPackage(const char *name, const Device::Data & return 0; } -QPixmap Device::pinsGraph(const Device::Package &package) +TQPixmap Device::pinsGraph(const Device::Package &package) { - QPixmap pixmap; - QPainter p; - QFontMetrics fm(p.font()); + TQPixmap pixmap; + TQPainter p; + TQFontMetrics fm(p.font()); uint nb = package.pins.count(); const int hspacing = 3, wspacing = 3, wmark = 10, wpin = 4; int theight = fm.ascent() + (fm.ascent()%2==0 ? 1 : 0); int height = hspacing + (nb/2)*(hspacing + theight); int wnumber = fm.width("1"); - wnumber = QMAX(wnumber, fm.width(QString::number(nb/2))); - wnumber = QMAX(wnumber, fm.width(QString::number(nb/2+1))); - wnumber = QMAX(wnumber, fm.width(QString::number(nb))); + wnumber = TQMAX(wnumber, fm.width(TQString::number(nb/2))); + wnumber = TQMAX(wnumber, fm.width(TQString::number(nb/2+1))); + wnumber = TQMAX(wnumber, fm.width(TQString::number(nb))); int bwidth = 4*wspacing + 2*wnumber + wmark; int lwidth = 0, rwidth = 0; for (uint k=0; k%2").arg(href).arg(data.alternatives()[i].upper()); + TQString href = deviceHref.tqarg(data.alternatives()[i].upper()); + s += TQString("%2").tqarg(href).tqarg(data.alternatives()[i].upper()); } } doc += htmlTableRow(i18n("Alternatives"), s); @@ -244,36 +244,36 @@ QString Device::htmlInfo(const Device::Data &data, const QString &deviceHref, co doc += "
"; doc += ""; doc += data.group().informationHtml(data); - QString s; + TQString s; for (uint i=0; i
"; for (uint k=0; ktypes.count(); k++) { if ( k!=0 ) doc += " "; doc += i18n(Package::TYPE_DATA[package->types[k]].label); - doc += "(" + QString::number(package->pins.count()) + ")"; + doc += "(" + TQString::number(package->pins.count()) + ")"; } doc += "
"; - QString label = data.name() + "_pins_graph.png"; + TQString label = data.name() + "_pins_graph.png"; doc += ""; if (msf) msf->setPixmap(label, pix); doc += "
"; @@ -281,15 +281,15 @@ QString Device::htmlPinDiagrams(const Device::Data &data, const QString &imagePr return doc; } -QString Device::htmlVoltageFrequencyGraphs(const Device::Data &data, const QString &imagePrefix, QMimeSourceFactory *msf) +TQString Device::htmlVoltageFrequencyGraphs(const Device::Data &data, const TQString &imagePrefix, TQMimeSourceFactory *msf) { - QString doc; + TQString doc; FOR_EACH(Special, special) { for (uint k=0; k"; - QString label = data.name() + "_" + data.fname(special) + "_" + TQString label = data.name() + "_" + data.fname(special) + "_" + fr.operatingCondition.key() + ".png"; doc += ""; if (msf) msf->setPixmap(label, Device::vddGraph(i18n("F (MHz)"), i18n("Vdd (V)"), fr.vdds)); @@ -298,18 +298,18 @@ QString Device::htmlVoltageFrequencyGraphs(const Device::Data &data, const QStri return doc; } -QPixmap Device::memoryGraph(const QValueList &r) +TQPixmap Device::memoryGraph(const TQValueList &r) { - QValueList ranges = r; - QPixmap pixmap; - QPainter p; - QFontMetrics fm(p.font()); + TQValueList ranges = r; + TQPixmap pixmap; + TQPainter p; + TQFontMetrics fm(p.font()); // order qHeapSort(ranges); // add empty ranges - QValueList::iterator it; + TQValueList::iterator it; for (it=ranges.begin(); it!=ranges.end(); ) { - QValueList::iterator prev = it; + TQValueList::iterator prev = it; ++it; if ( it==ranges.end() ) break; if ( (*prev).endAddress+1==(*it).startAddress ) continue; @@ -324,9 +324,9 @@ QPixmap Device::memoryGraph(const QValueList &r) int height = 1; int w1 = 0, w2 = 0; for (it=ranges.begin(); it!=ranges.end(); ++it) { - w1 = QMAX(w1, fm.width((*it).start)); - w1 = QMAX(w1, fm.width((*it).end)); - w2 = QMAX(w2, fm.width((*it).label)); + w1 = TQMAX(w1, fm.width((*it).start)); + w1 = TQMAX(w1, fm.width((*it).end)); + w2 = TQMAX(w2, fm.width((*it).label)); (*it).height = 2*hspacing + theight; if ( (*it).startAddress!=(*it).endAddress ) (*it).height += 2*theight; height += (*it).height; @@ -334,15 +334,15 @@ QPixmap Device::memoryGraph(const QValueList &r) int wspacing = 4; int width = wspacing + w1 + wspacing + wspacing + w2; pixmap.resize(width, height); - pixmap.fill(Qt::white); + pixmap.fill(TQt::white); p.begin(&pixmap); int h = 0; // draw ranges for (it=ranges.begin(); it!=ranges.end(); ++it) { - p.setPen(QPen(Qt::black, 1, Qt::DotLine)); + p.setPen(TQPen(TQt::black, 1, TQt::DotLine)); p.drawLine(0,h, width-1,h); - p.setPen(QPen(Qt::black, 1)); - p.setBrush((*it).label.isEmpty() ? Qt::gray : Qt::white); + p.setPen(TQPen(TQt::black, 1)); + p.setBrush((*it).label.isEmpty() ? TQt::gray : TQt::white); p.drawRect(0,h, wspacing+w1+wspacing,(*it).height+1); int hmid = h+(*it).height/2+theight/2; p.drawText(wspacing+w1+wspacing+wspacing,hmid, (*it).label); @@ -352,7 +352,7 @@ QPixmap Device::memoryGraph(const QValueList &r) p.drawText(wspacing,h+(*it).height-3, (*it).end); } h += (*it).height; - p.setPen(QPen(Qt::black, 1, Qt::DotLine)); + p.setPen(TQPen(TQt::black, 1, TQt::DotLine)); p.drawLine(0,h, width-1,h); } p.end(); diff --git a/src/devices/base/device_group.h b/src/devices/base/device_group.h index 087ca99..8414515 100644 --- a/src/devices/base/device_group.h +++ b/src/devices/base/device_group.h @@ -10,7 +10,7 @@ #define DEVICE_GROUP_H #if !defined(NO_KDE) -# include +# include #endif #include "generic_device.h" @@ -35,13 +35,13 @@ class GroupBase : public ::Group::Base { public: virtual Memory *createMemory(const Device::Data &data) const = 0; - virtual QString informationHtml(const Device::Data &data) const = 0; + virtual TQString informationHtml(const Device::Data &data) const = 0; #if !defined(NO_KDE) - virtual QPixmap memoryGraph(const Device::Data &data) const = 0; + virtual TQPixmap memoryGraph(const Device::Data &data) const = 0; #endif protected: - virtual void addDevice(const QString &name, const Device::Data *data, ::Group::Support support) { + virtual void addDevice(const TQString &name, const Device::Data *data, ::Group::Support support) { const_cast(data)->_group = this; ::Group::Base::addDevice(name, data, support); } @@ -52,7 +52,7 @@ class Group : public GroupBase, public DataStreamer { protected: virtual void initSupported() { - QValueList list = fromCppString(dataStream(), dataSize()); + TQValueList list = fromCppString(dataStream(), dataSize()); for (uint i=0; iname(), list[i], ::Group::Support::Tested); } virtual uint dataSize() const = 0; @@ -61,24 +61,24 @@ protected: //---------------------------------------------------------------------------- #if !defined(NO_KDE) -extern QColor statusColor(Status status); -extern QPixmap vddGraph(const QString &xLabel, const QString &yLabel, const QValueVector &boxes); +extern TQColor statusColor(tqStatus status); +extern TQPixmap vddGraph(const TQString &xLabel, const TQString &yLabel, const TQValueVector &boxes); extern const Package *barPackage(const char *name, const Data &data); -extern QPixmap pinsGraph(const Package &package); +extern TQPixmap pinsGraph(const Package &package); -extern QString htmlInfo(const Data &data, const QString &deviceHref, const QString &documentHtml); -extern QString htmlPinDiagrams(const Device::Data &data, const QString &imagePrefix, QMimeSourceFactory *msf); -extern QString htmlVoltageFrequencyGraphs(const Device::Data &data, const QString &imagePrefix, QMimeSourceFactory *msf); +extern TQString htmlInfo(const Data &data, const TQString &deviceHref, const TQString &documentHtml); +extern TQString htmlPinDiagrams(const Device::Data &data, const TQString &imagePrefix, TQMimeSourceFactory *msf); +extern TQString htmlVoltageFrequencyGraphs(const Device::Data &data, const TQString &imagePrefix, TQMimeSourceFactory *msf); class MemoryGraphData { public: Address startAddress, endAddress; - QString start, end, label; + TQString start, end, label; int height; bool operator <(const MemoryGraphData &data) const { return ( startAddress < data.startAddress ); } }; -extern QPixmap memoryGraph(const QValueList &ranges); +extern TQPixmap memoryGraph(const TQValueList &ranges); #endif diff --git a/src/devices/base/generic_device.cpp b/src/devices/base/generic_device.cpp index bf69dce..bfbd37d 100644 --- a/src/devices/base/generic_device.cpp +++ b/src/devices/base/generic_device.cpp @@ -13,7 +13,7 @@ #include "register.h" //----------------------------------------------------------------------------- -const Device::Status::Data Device::Status::DATA[Nb_Types] = { +const Device::tqStatus::Data Device::tqStatus::DATA[Nb_Types] = { { "IP", I18N_NOOP("In Production") }, { "Future", I18N_NOOP("Future Product") }, { "NR", I18N_NOOP("Not Recommended for New Design") }, @@ -52,10 +52,10 @@ const Device::Package::TypeData Device::Package::TYPE_DATA[] = { { "tssop", I18N_NOOP("TSSOP"), Bar, { 8, 14, 0, 0, 0, 0, 0, 0, 0 } }, { "soic", I18N_NOOP("SOIC"), Bar, { 8, 14, 18, 20, 28, 0, 0, 0, 0 } }, { "tqfp", I18N_NOOP("TQFP"), Square, { 0, 0, 0, 0, 0, 44, 64, 80, 100 } }, - { "mqfp", I18N_NOOP("MQFP"), Square, { 0, 0, 0, 0, 0, 44, 0, 0, 0 } }, + { "mqfp", I18N_NOOP("MTQFP"), Square, { 0, 0, 0, 0, 0, 44, 0, 0, 0 } }, { "dfns", I18N_NOOP("DFN-S"), Bar, { 8, 0, 0, 0, 0, 0, 0, 0, 0 } }, - { "qfn", I18N_NOOP("QFN"), Square, { 0, 16, 0, 20, 28, 44, 0, 0, 0 } }, - { "qfns", I18N_NOOP("QFN-S"), Bar, { 0, 0, 0, 0, 28, 0, 0, 0, 0 } }, + { "qfn", I18N_NOOP("TQFN"), Square, { 0, 16, 0, 20, 28, 44, 0, 0, 0 } }, + { "qfns", I18N_NOOP("TQFN-S"), Bar, { 0, 0, 0, 0, 28, 0, 0, 0, 0 } }, { "plcc", I18N_NOOP("PLCC"), Square, { 0, 0, 0, 0, 0, 44, 68, 84, 0 } }, { "mlf", I18N_NOOP("MLF"), Square, { 0, 0, 0, 0, 28, 0, 0, 0, 0 } }, { "dfn", I18N_NOOP("DFN"), Bar, { 8, 0, 0, 0, 0, 0, 0, 0, 0 } }, @@ -145,69 +145,69 @@ double Device::Data::vddMax() const } //----------------------------------------------------------------------------- -QDataStream &Device::operator <<(QDataStream &s, const RangeBox::Value &rbv) +TQDataStream &Device::operator <<(TQDataStream &s, const RangeBox::Value &rbv) { s << rbv.x << rbv.yMin << rbv.yMax; return s; } -QDataStream &Device::operator >>(QDataStream &s, RangeBox::Value &rbv) +TQDataStream &Device::operator >>(TQDataStream &s, RangeBox::Value &rbv) { s >> rbv.x >> rbv.yMin >> rbv.yMax; return s; } -QDataStream &Device::operator <<(QDataStream &s, const RangeBox &rb) +TQDataStream &Device::operator <<(TQDataStream &s, const RangeBox &rb) { s << rb.start << rb.end << rb.osc << rb.mode << rb.special; return s; } -QDataStream &Device::operator >>(QDataStream &s, RangeBox &rb) +TQDataStream &Device::operator >>(TQDataStream &s, RangeBox &rb) { s >> rb.start >> rb.end >> rb.osc >> rb.mode >> rb.special; return s; } -QDataStream &Device::operator <<(QDataStream &s, const FrequencyRange &frange) +TQDataStream &Device::operator <<(TQDataStream &s, const FrequencyRange &frange) { s << frange.operatingCondition << frange.special << frange.vdds; return s; } -QDataStream &Device::operator >>(QDataStream &s, FrequencyRange &frange) +TQDataStream &Device::operator >>(TQDataStream &s, FrequencyRange &frange) { s >> frange.operatingCondition >> frange.special >> frange.vdds; return s; } -QDataStream &Device::operator <<(QDataStream &s, const Package &package) +TQDataStream &Device::operator <<(TQDataStream &s, const Package &package) { s << package.types << package.pins; return s; } -QDataStream &Device::operator >>(QDataStream &s, Package &package) +TQDataStream &Device::operator >>(TQDataStream &s, Package &package) { s >> package.types >> package.pins; return s; } -QDataStream &Device::operator <<(QDataStream &s, const Documents &documents) +TQDataStream &Device::operator <<(TQDataStream &s, const Documents &documents) { s << documents.webpage << documents.datasheet << documents.progsheet << documents.erratas; return s; } -QDataStream &Device::operator >>(QDataStream &s, Documents &documents) +TQDataStream &Device::operator >>(TQDataStream &s, Documents &documents) { s >> documents.webpage >> documents.datasheet >> documents.progsheet >> documents.erratas; return s; } -QDataStream &Device::operator <<(QDataStream &s, const Data &data) +TQDataStream &Device::operator <<(TQDataStream &s, const Data &data) { s << data._name << data._documents << data._alternatives << data._status << data._frequencyRanges << data._memoryTechnology << data._packages; return s; } -QDataStream &Device::operator >>(QDataStream &s, Data &data) +TQDataStream &Device::operator >>(TQDataStream &s, Data &data) { s >> data._name >> data._documents >> data._alternatives >> data._status >> data._frequencyRanges >> data._memoryTechnology diff --git a/src/devices/base/generic_device.h b/src/devices/base/generic_device.h index e3cbec9..73f9b15 100644 --- a/src/devices/base/generic_device.h +++ b/src/devices/base/generic_device.h @@ -9,7 +9,7 @@ #ifndef GENERIC_DEVICE_H #define GENERIC_DEVICE_H -#include +#include #include "common/common/misc.h" #include "common/common/bitvalue.h" @@ -19,9 +19,9 @@ namespace Device { //---------------------------------------------------------------------------- -BEGIN_DECLARE_ENUM(Status) +BEGIN_DECLARE_ENUM(tqStatus) InProduction = 0, Future, NotRecommended, EOL, Unknown, Mature -END_DECLARE_ENUM_STD(Status) +END_DECLARE_ENUM_STD(tqStatus) BEGIN_DECLARE_ENUM(MemoryTechnology) Flash = 0, Eprom, Rom, Romless @@ -31,7 +31,7 @@ class RangeBox { public: struct Value { double x, yMin, yMax; }; Value start, end; - QString osc, mode, special; + TQString osc, mode, special; double yMin() const { return qMin(start.yMin, end.yMin); } double yMax() const { return qMax(start.yMax, end.yMax); } }; @@ -48,7 +48,7 @@ class FrequencyRange { public: OperatingCondition operatingCondition; Special special; - QValueVector vdds; + TQValueVector vdds; double vddMin() const; double vddMax() const; }; @@ -62,15 +62,15 @@ public: class Package { public: - QValueVector types; - QValueVector pins; + TQValueVector types; + TQValueVector pins; public: enum Shape { Bar, Square }; enum { MAX_NB = 9 }; struct TypeData { const char *name, *label; - Shape shape; + Shape tqshape; uint nbPins[MAX_NB]; }; static const TypeData TYPE_DATA[]; @@ -79,8 +79,8 @@ public: class Documents { public: - QString webpage, datasheet, progsheet; - QStringList erratas; + TQString webpage, datasheet, progsheet; + TQStringList erratas; }; //---------------------------------------------------------------------------- @@ -108,7 +108,7 @@ public: bool operator !=(const Array &array) const { return _data!=array._data; } private: - QMemArray _data; + TQMemArray _data; }; //---------------------------------------------------------------------------- @@ -118,15 +118,15 @@ public: Data(RegistersData *rdata) : _group(0), _registersData(rdata) {} virtual ~Data(); const GroupBase &group() const { return *_group; } - virtual QString name() const { return _name; } - virtual QString fname(Special) const { return _name; } - virtual QString listViewGroup() const = 0; - Status status() const { return _status; } + virtual TQString name() const { return _name; } + virtual TQString fname(Special) const { return _name; } + virtual TQString listViewGroup() const = 0; + tqStatus status() const { return _status; } const Documents &documents() const { return _documents; } - const QStringList &alternatives() const { return _alternatives; } + const TQStringList &alternatives() const { return _alternatives; } MemoryTechnology memoryTechnology() const { return _memoryTechnology; } virtual bool matchId(BitValue rawId, IdData &idata) const = 0; - const QValueVector &frequencyRanges() const { return _frequencyRanges; } + const TQValueVector &frequencyRanges() const { return _frequencyRanges; } double vddMin() const; double vddMax() const; virtual uint nbBitsAddress() const = 0; @@ -134,37 +134,37 @@ public: uint nbCharsAddress() const { return nbBitsAddress()/4 + (nbBitsAddress()%4 ? 1 : 0); } virtual bool canWriteCalibration() const = 0; // #### REMOVE ME const RegistersData *registersData() const { return _registersData; } - const QValueVector &packages() const { return _packages; } + const TQValueVector &packages() const { return _packages; } protected: const GroupBase *_group; - QString _name; + TQString _name; Documents _documents; - QStringList _alternatives; - Status _status; - QValueVector _frequencyRanges; + TQStringList _alternatives; + tqStatus _status; + TQValueVector _frequencyRanges; MemoryTechnology _memoryTechnology; RegistersData *_registersData; - QValueVector _packages; + TQValueVector _packages; friend class XmlToDataBase; friend class GroupBase; - friend QDataStream &operator <<(QDataStream &s, const Data &data); - friend QDataStream &operator >>(QDataStream &s, Data &data); + friend TQDataStream &operator <<(TQDataStream &s, const Data &data); + friend TQDataStream &operator >>(TQDataStream &s, Data &data); }; -QDataStream &operator <<(QDataStream &s, const RangeBox::Value &rbv); -QDataStream &operator >>(QDataStream &s, RangeBox::Value &rbv); -QDataStream &operator <<(QDataStream &s, const RangeBox &rb); -QDataStream &operator >>(QDataStream &s, RangeBox &rb); -QDataStream &operator <<(QDataStream &s, const FrequencyRange &frange); -QDataStream &operator >>(QDataStream &s, FrequencyRange &frange); -QDataStream &operator <<(QDataStream &s, const Package &package); -QDataStream &operator >>(QDataStream &s, Package &package); -QDataStream &operator <<(QDataStream &s, const Documents &documents); -QDataStream &operator >>(QDataStream &s, Documents &documents); -QDataStream &operator <<(QDataStream &s, const Data &data); -QDataStream &operator >>(QDataStream &s, Data &data); +TQDataStream &operator <<(TQDataStream &s, const RangeBox::Value &rbv); +TQDataStream &operator >>(TQDataStream &s, RangeBox::Value &rbv); +TQDataStream &operator <<(TQDataStream &s, const RangeBox &rb); +TQDataStream &operator >>(TQDataStream &s, RangeBox &rb); +TQDataStream &operator <<(TQDataStream &s, const FrequencyRange &frange); +TQDataStream &operator >>(TQDataStream &s, FrequencyRange &frange); +TQDataStream &operator <<(TQDataStream &s, const Package &package); +TQDataStream &operator >>(TQDataStream &s, Package &package); +TQDataStream &operator <<(TQDataStream &s, const Documents &documents); +TQDataStream &operator >>(TQDataStream &s, Documents &documents); +TQDataStream &operator <<(TQDataStream &s, const Data &data); +TQDataStream &operator >>(TQDataStream &s, Data &data); } // namespace diff --git a/src/devices/base/generic_memory.cpp b/src/devices/base/generic_memory.cpp index 78c4dd6..54190f5 100644 --- a/src/devices/base/generic_memory.cpp +++ b/src/devices/base/generic_memory.cpp @@ -8,8 +8,8 @@ ***************************************************************************/ #include "generic_memory.h" -bool Device::Memory::load(QTextStream &stream, QStringList &errors, - WarningTypes &warningTypes, QStringList &warnings) +bool Device::Memory::load(TQTextStream &stream, TQStringList &errors, + WarningTypes &warningTypes, TQStringList &warnings) { HexBuffer hb; if ( !hb.load(stream, errors) ) return false; @@ -17,12 +17,12 @@ bool Device::Memory::load(QTextStream &stream, QStringList &errors, return true; } -Device::Memory::WarningTypes Device::Memory::fromHexBuffer(const HexBuffer &hb, QStringList &warnings) +Device::Memory::WarningTypes Device::Memory::fromHexBuffer(const HexBuffer &hb, TQStringList &warnings) { clear(); WarningTypes result = NoWarning; warnings.clear(); - QMap inRange; + TQMap inRange; fromHexBuffer(hb, result, warnings, inRange); // check that all values in FragBuffer are within memory ranges @@ -31,7 +31,7 @@ Device::Memory::WarningTypes Device::Memory::fromHexBuffer(const HexBuffer &hb, if ( !it.data().isInitialized() || inRange[it.key()] ) continue; if ( !(result & ValueOutsideRange) ) { result |= ValueOutsideRange; - warnings += i18n("At least one value (at address %1) is defined outside memory ranges.").arg(toHexLabel(it.key(), 8)); + warnings += i18n("At least one value (at address %1) is defined outside memory ranges.").tqarg(toHexLabel(it.key(), 8)); } break; } @@ -39,7 +39,7 @@ Device::Memory::WarningTypes Device::Memory::fromHexBuffer(const HexBuffer &hb, return result; } -bool Device::Memory::save(QTextStream &stream, HexBuffer::Format format) const +bool Device::Memory::save(TQTextStream &stream, HexBuffer::Format format) const { savePartial(stream, format); HexBuffer hb; diff --git a/src/devices/base/generic_memory.h b/src/devices/base/generic_memory.h index 74bd938..f7127b5 100644 --- a/src/devices/base/generic_memory.h +++ b/src/devices/base/generic_memory.h @@ -26,21 +26,21 @@ public: virtual BitValue checksum() const = 0; virtual HexBuffer toHexBuffer() const = 0; - bool save(QTextStream &stream, HexBuffer::Format format) const; + bool save(TQTextStream &stream, HexBuffer::Format format) const; enum WarningType { NoWarning = 0, ValueTooLarge = 1, ValueOutsideRange = 2 }; - Q_DECLARE_FLAGS(WarningTypes, WarningType) - WarningTypes fromHexBuffer(const HexBuffer &hb, QStringList &warnings); - bool load(QTextStream &stream, QStringList &errors, WarningTypes &warningTypes, QStringList &warnings); + TQ_DECLARE_FLAGS(WarningTypes, WarningType) + WarningTypes fromHexBuffer(const HexBuffer &hb, TQStringList &warnings); + bool load(TQTextStream &stream, TQStringList &errors, WarningTypes &warningTypes, TQStringList &warnings); protected: const Data &_device; Memory(const Data &device) : _device(device) {} virtual void fromHexBuffer(const HexBuffer &hb, WarningTypes &warningTypes, - QStringList &warnings, QMap &inRange) = 0; - virtual void savePartial(QTextStream &stream, HexBuffer::Format format) const = 0; + TQStringList &warnings, TQMap &inRange) = 0; + virtual void savePartial(TQTextStream &stream, HexBuffer::Format format) const = 0; }; -Q_DECLARE_OPERATORS_FOR_FLAGS(Memory::WarningTypes) +TQ_DECLARE_OPERATORS_FOR_FLAGS(Memory::WarningTypes) } // namespace diff --git a/src/devices/base/hex_buffer.cpp b/src/devices/base/hex_buffer.cpp index a63554d..09bf847 100644 --- a/src/devices/base/hex_buffer.cpp +++ b/src/devices/base/hex_buffer.cpp @@ -9,7 +9,7 @@ ***************************************************************************/ #include "hex_buffer.h" -#include +#include #include "devices/base/generic_device.h" @@ -18,7 +18,7 @@ const char * const HexBuffer::FORMATS[Nb_Formats] = { "inhx8m", /*"inhx8s", */"inhx16", "inhx32" }; -void HexBuffer::savePartial(QTextStream &stream, Format format) const +void HexBuffer::savePartial(TQTextStream &stream, Format format) const { BitValue oldseg; const_iterator block = begin(); @@ -37,7 +37,7 @@ void HexBuffer::savePartial(QTextStream &stream, Format format) const } } -void HexBuffer::saveEnd(QTextStream &stream) const +void HexBuffer::saveEnd(TQTextStream &stream) const { stream << ":00000001FF\n"; } @@ -46,7 +46,7 @@ void HexBuffer::saveEnd(QTextStream &stream) const * Original code source from Timo Rossi, * modified by Alain Gibaud to support large blocks write */ -void HexBuffer::writeHexBlock(QTextStream &stream, int reclen, // length (in words) +void HexBuffer::writeHexBlock(TQTextStream &stream, int reclen, // length (in words) const_iterator& data, // pointer to 1st data word (incremented by function) Format format) { @@ -133,33 +133,33 @@ bool HexBuffer::fetchNextBlock(const_iterator& it, const const_iterator &end, in return *len != 0 ; } -QString HexBuffer::ErrorData::message() const +TQString HexBuffer::ErrorData::message() const { switch (type) { - case UnrecognizedFormat: return i18n("Unrecognized format (line %1).").arg(line); + case UnrecognizedFormat: return i18n("Unrecognized format (line %1).").tqarg(line); case UnexpectedEOF: return i18n("Unexpected end-of-file."); - case UnexpectedEOL: return i18n("Unexpected end-of-line (line %1).").arg(line); - case WrongCRC: return i18n("CRC mismatch (line %1).").arg(line); + case UnexpectedEOL: return i18n("Unexpected end-of-line (line %1).").tqarg(line); + case WrongCRC: return i18n("CRC mismatch (line %1).").tqarg(line); } Q_ASSERT(false); - return QString::null; + return TQString(); } -bool HexBuffer::load(QTextStream &stream, QStringList &errors) +bool HexBuffer::load(TQTextStream &stream, TQStringList &errors) { Format format; - QValueList list = load(stream, format); + TQValueList list = load(stream, format); if ( list.isEmpty() ) return true; errors.clear(); for (uint i=0; i HexBuffer::load(QTextStream &stream, Format &format) +TQValueList HexBuffer::load(TQTextStream &stream, Format &format) { clear(); format = Nb_Formats; - QValueList errors; + TQValueList errors; load(stream, format, errors); if ( format==Nb_Formats ) format = IHX8M; // default return errors; @@ -170,13 +170,13 @@ QValueList HexBuffer::load(QTextStream &stream, Format &fo the format automagicly by the wordcount and length of the line Tested in 8 and 16 bits modes ------------------------------------------------------------------------ */ -void HexBuffer::load(QTextStream &stream, Format &format, QValueList &errors) +void HexBuffer::load(TQTextStream &stream, Format &format, TQValueList &errors) { uint addrH = 0; // upper 16 bits of 32 bits address (inhx32 format) uint line = 1; for (; !stream.atEnd(); line++) { // read each line - QString s = stream.readLine(); + TQString s = stream.readLine(); if ( !s.startsWith(":") ) continue; // skip invalid intel hex line s = s.stripWhiteSpace(); // clean-up white spaces at end-of-line if ( s==":" ) continue; // skip empty line @@ -250,8 +250,8 @@ void HexBuffer::load(QTextStream &stream, Format &format, QValueList // however, I don't know if such a situation can occurs uint a = addrbase+x >> 1; BitValue value = (*this)[a]; - if ( addrbase+x & 1 ) insert(a, value.maskWith(0x00FF) | data << 8); // Odd addr => Hi byte - else insert(a, value.maskWith(0xFF00) | data); // Low byte + if ( addrbase+x & 1 ) insert(a, value.tqmaskWith(0x00FF) | data << 8); // Odd addr => Hi byte + else insert(a, value.tqmaskWith(0xFF00) | data); // Low byte //if ( x==0 ) qDebug("fb@%s: %s", toHex(addrbase+x >> 1, 8).data(), toHex(fb[addrbase+x >> 1], 8).data()); cksum += data; } diff --git a/src/devices/base/hex_buffer.h b/src/devices/base/hex_buffer.h index 93b0640..fcbf1c5 100644 --- a/src/devices/base/hex_buffer.h +++ b/src/devices/base/hex_buffer.h @@ -12,9 +12,9 @@ #include "common/global/global.h" #include "common/common/bitvalue.h" -class QTextStream; +class TQTextStream; -class HexBuffer : public QMap +class HexBuffer : public TQMap { public: enum Format { /// Differents flavors of Intel HEX file formats @@ -26,26 +26,26 @@ public: }; static const char * const FORMATS[Nb_Formats]; - void savePartial(QTextStream &s, Format format) const; - void saveEnd(QTextStream &s) const; + void savePartial(TQTextStream &s, Format format) const; + void saveEnd(TQTextStream &s) const; enum ErrorType { UnrecognizedFormat, WrongCRC, UnexpectedEOF, UnexpectedEOL }; class ErrorData { public: ErrorData() {} ErrorData(uint _line, ErrorType _type) : line(_line), type(_type) {} - QString message() const; + TQString message() const; uint line; ErrorType type; }; - QValueList load(QTextStream &stream, Format &format); - bool load(QTextStream &stream, QStringList &errors); + TQValueList load(TQTextStream &stream, Format &format); + bool load(TQTextStream &stream, TQStringList &errors); private: enum { HEXBLKSIZE = 8 }; // line size in HEX files static bool fetchNextBlock(const_iterator& start, const const_iterator &end, int *len); - static void writeHexBlock(QTextStream &stream, int reclen, const_iterator& data, Format format); - void load(QTextStream &stream, Format &format, QValueList &errors); + static void writeHexBlock(TQTextStream &stream, int reclen, const_iterator& data, Format format); + void load(TQTextStream &stream, Format &format, TQValueList &errors); }; #endif diff --git a/src/devices/base/register.cpp b/src/devices/base/register.cpp index 85fc013..dcd4c18 100644 --- a/src/devices/base/register.cpp +++ b/src/devices/base/register.cpp @@ -25,12 +25,12 @@ Register::TypeData::TypeData(Address address, uint nbChars) { Q_ASSERT( address.isValid() && nbChars!=0 ); } -Register::TypeData::TypeData(const QString &name, uint nbChars) +Register::TypeData::TypeData(const TQString &name, uint nbChars) : _nbChars(nbChars), _name(name) { Q_ASSERT( !name.isEmpty() && nbChars!=0 ); } -Register::TypeData::TypeData(const QString &name, Address address, uint nbChars) +Register::TypeData::TypeData(const TQString &name, Address address, uint nbChars) : _nbChars(nbChars), _address(address), _name(name) { Q_ASSERT( address.isValid() && nbChars!=0 && !name.isEmpty() ); @@ -46,21 +46,21 @@ Register::Type Register::TypeData::type() const return Combined; } -QString Register::TypeData::toString() const +TQString Register::TypeData::toString() const { - return QString("%1 %2 %3").arg(toLabel(_address)).arg(_nbChars).arg(_name); + return TQString("%1 %2 %3").tqarg(toLabel(_address)).tqarg(_nbChars).tqarg(_name); } -Register::TypeData Register::TypeData::fromString(const QString &s) +Register::TypeData Register::TypeData::fromString(const TQString &s) { - QStringList list = QStringList::split(" ", s); + TQStringList list = TQStringList::split(" ", s); if ( list.count()<2 || list.count()>3 ) return TypeData(); bool ok; Address address = list[0].toUInt(&ok); if ( !ok ) return TypeData(); uint nbChars = list[1].toUInt(&ok); if ( !ok || nbChars==0 || (nbChars%2)!=0 ) return TypeData(); - QString name; + TQString name; if ( list.count()==3 ) name = list[2]; if ( !address.isValid() ) { if ( name.isEmpty() ) return TypeData(); @@ -83,7 +83,7 @@ void Register::List::init() void Register::List::setWatched(const TypeData &data, bool watched) { if (watched) { - if ( _watched.contains(data) ) return; + if ( _watched.tqcontains(data) ) return; _watched.append(data); } else _watched.remove(data); delayedChanged(); @@ -112,7 +112,7 @@ void Register::List::setValue(const TypeData &data, BitValue value) delayedChanged(); } -void Register::List::setPortData(uint index, const QMap &data) +void Register::List::setPortData(uint index, const TQMap &data) { _portDatas[index].old = _portDatas[index].current; _portDatas[index].current = data; @@ -122,7 +122,7 @@ void Register::List::setPortData(uint index, const QMap relatedRegisters(const Register::TypeData &data) const = 0; + virtual TQValueList relatedRegisters(const Register::TypeData &data) const = 0; virtual bool hasPort(uint index) const = 0; virtual int portIndex(Address address) const = 0; - virtual QString portName(uint index) const = 0; + virtual TQString portName(uint index) const = 0; virtual bool hasPortBit(uint index, uint bit) const = 0; - virtual QString portBitName(uint index, uint bit) const = 0; + virtual TQString portBitName(uint index, uint bit) const = 0; }; } // namespace @@ -96,33 +96,34 @@ extern List &list(); class List : public GenericStorage { Q_OBJECT + TQ_OBJECT public: List() : GenericStorage(0, "register_list") {} void init(); void setWatched(const TypeData &data, bool watched); void clearWatched(); - const QValueList &watched() const { return _watched; } - bool isWatched(const TypeData &data) const { return _watched.contains(data); } + const TQValueList &watched() const { return _watched; } + bool isWatched(const TypeData &data) const { return _watched.tqcontains(data); } void setValue(const TypeData &data, BitValue value); BitValue value(const TypeData &data) const; BitValue oldValue(const TypeData &data) const; - void setPortData(uint index, const QMap &data); - QMap portData(uint index) const { return _portDatas[index].current; } - QMap oldPortData(uint index) const { return _portDatas[index].old; } + void setPortData(uint index, const TQMap &data); + TQMap portData(uint index) const { return _portDatas[index].current; } + TQMap oldPortData(uint index) const { return _portDatas[index].old; } private: class StateData { public: BitValue current, old; }; - QMap _regulars; // registers with address - QMap _specials; // registers with no address + TQMap _regulars; // registers with address + TQMap _specials; // registers with no address class PortData { public: - QMap current, old; + TQMap current, old; }; - QMap _portDatas; // port index - QValueList _watched; + TQMap _portDatas; // port index + TQValueList _watched; }; } // namespace diff --git a/src/devices/gui/device_group_ui.h b/src/devices/gui/device_group_ui.h index 3b2fa91..d123d7d 100644 --- a/src/devices/gui/device_group_ui.h +++ b/src/devices/gui/device_group_ui.h @@ -9,8 +9,8 @@ #ifndef DEVICE_GROUP_UI_H #define DEVICE_GROUP_UI_H -#include -class QWidget; +#include +class TQWidget; class KPopupMenu; class KListViewItem; class KAction; @@ -31,11 +31,11 @@ class MemoryEditor; class GroupUI : public ::Group::BaseGui { public: - virtual HexView *createHexView(const HexEditor &editor, QWidget *parent) const = 0; - virtual Register::View *createRegisterView(QWidget *parent) const = 0; - virtual MemoryEditor *createConfigEditor(Device::Memory &memory, QWidget *parent) const = 0; - virtual void fillWatchListContainer(ListContainer *container, QValueVector &ids) const = 0; - virtual Register::ListViewItem *createWatchItem(const Register::TypeData &data, KListViewItem *parent) const = 0; + virtual HexView *createHexView(const HexEditor &editor, TQWidget *tqparent) const = 0; + virtual Register::View *createRegisterView(TQWidget *tqparent) const = 0; + virtual MemoryEditor *createConfigEditor(Device::Memory &memory, TQWidget *tqparent) const = 0; + virtual void fillWatchListContainer(ListContainer *container, TQValueVector &ids) const = 0; + virtual Register::ListViewItem *createWatchItem(const Register::TypeData &data, KListViewItem *tqparent) const = 0; }; inline const Device::GroupUI &groupui(const Device::Data &data) { return static_cast(*data.group().gui()); } diff --git a/src/devices/gui/hex_view.cpp b/src/devices/gui/hex_view.cpp index 6b26b0a..ac82ddf 100644 --- a/src/devices/gui/hex_view.cpp +++ b/src/devices/gui/hex_view.cpp @@ -9,8 +9,8 @@ ***************************************************************************/ #include "hex_view.h" -Device::HexView::HexView(const HexEditor &editor, QWidget *parent, const char *name) - : MemoryEditorGroup(0, parent, name), _editor(editor) +Device::HexView::HexView(const HexEditor &editor, TQWidget *tqparent, const char *name) + : MemoryEditorGroup(0, tqparent, name), _editor(editor) {} void Device::HexView::display(Memory *memory) diff --git a/src/devices/gui/hex_view.h b/src/devices/gui/hex_view.h index d73710e..f1b953b 100644 --- a/src/devices/gui/hex_view.h +++ b/src/devices/gui/hex_view.h @@ -19,8 +19,9 @@ namespace Device class HexView : public MemoryEditorGroup { Q_OBJECT + TQ_OBJECT public: - HexView(const HexEditor &editor, QWidget *parent, const char *name); + HexView(const HexEditor &editor, TQWidget *tqparent, const char *name); virtual void display(Memory *memory); virtual uint nbChecksumChars() const = 0; virtual BitValue checksum() const = 0; diff --git a/src/devices/gui/hex_word_editor.cpp b/src/devices/gui/hex_word_editor.cpp index fd64e13..5e8ab7a 100644 --- a/src/devices/gui/hex_word_editor.cpp +++ b/src/devices/gui/hex_word_editor.cpp @@ -9,15 +9,15 @@ ***************************************************************************/ #include "hex_word_editor.h" -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include //----------------------------------------------------------------------------- -Device::HexWordEditor::HexWordEditor(Memory &memory, uint nbChars, QWidget *parent) - : GenericHexWordEditor(nbChars, true, parent), _memory(memory) +Device::HexWordEditor::HexWordEditor(Memory &memory, uint nbChars, TQWidget *tqparent) + : GenericHexWordEditor(nbChars, true, tqparent), _memory(memory) { setOffset(-1); } @@ -29,8 +29,8 @@ void Device::HexWordEditor::setOffset(int offset) } //----------------------------------------------------------------------------- -Device::RegisterHexWordEditor::RegisterHexWordEditor(QWidget *parent, uint nbChars, BitValue mask) - : GenericHexWordEditor(nbChars, true, parent), _mask(mask) +Device::RegisterHexWordEditor::RegisterHexWordEditor(TQWidget *tqparent, uint nbChars, BitValue tqmask) + : GenericHexWordEditor(nbChars, true, tqparent), _tqmask(tqmask) { clear(); } diff --git a/src/devices/gui/hex_word_editor.h b/src/devices/gui/hex_word_editor.h index bd9fadb..db9374c 100644 --- a/src/devices/gui/hex_word_editor.h +++ b/src/devices/gui/hex_word_editor.h @@ -19,8 +19,9 @@ namespace Device class HexWordEditor : public GenericHexWordEditor { Q_OBJECT + TQ_OBJECT public: - HexWordEditor(Memory &memory, uint nbChars, QWidget *parent); + HexWordEditor(Memory &memory, uint nbChars, TQWidget *tqparent); void setOffset(int offset); int offset() const { return _offset; } @@ -29,7 +30,7 @@ protected: int _offset; virtual bool isValid() const { return _offset!=-1; } - virtual BitValue mask() const = 0; + virtual BitValue tqmask() const = 0; virtual BitValue normalizeWord(BitValue value) const = 0; virtual BitValue word() const = 0; virtual void setWord(BitValue value) = 0; @@ -40,20 +41,21 @@ protected: class RegisterHexWordEditor : public GenericHexWordEditor { Q_OBJECT + TQ_OBJECT public: - RegisterHexWordEditor(QWidget *parent, uint nbChars, BitValue mask); + RegisterHexWordEditor(TQWidget *tqparent, uint nbChars, BitValue tqmask); void clear() { setValue(BitValue()); } void setValue(BitValue word); BitValue value() const { return _word; } - void setColor(QColor color) { setPaletteForegroundColor(color); } + void setColor(TQColor color) { setPaletteForegroundColor(color); } void unsetColor() { unsetPalette(); } private: - BitValue _mask, _word; + BitValue _tqmask, _word; virtual bool isValid() const { return true; } - virtual BitValue mask() const { return _mask; } - virtual BitValue normalizeWord(BitValue value) const { return value.maskWith(_mask); } + virtual BitValue tqmask() const { return _tqmask; } + virtual BitValue normalizeWord(BitValue value) const { return value.tqmaskWith(_tqmask); } virtual BitValue word() const { return _word; } virtual void setWord(BitValue value) { _word = value; } virtual BitValue blankValue() const { return BitValue(); } diff --git a/src/devices/gui/memory_editor.cpp b/src/devices/gui/memory_editor.cpp index 175f011..4504e6b 100644 --- a/src/devices/gui/memory_editor.cpp +++ b/src/devices/gui/memory_editor.cpp @@ -9,12 +9,12 @@ ***************************************************************************/ #include "memory_editor.h" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include #include @@ -28,17 +28,17 @@ #include "libgui/gui_prog_manager.h" //----------------------------------------------------------------------------- -Device::MemoryEditor::MemoryEditor(Device::Memory *memory, QWidget *parent, const char *name) - : QFrame(parent, name), _memory(memory) +Device::MemoryEditor::MemoryEditor(Device::Memory *memory, TQWidget *tqparent, const char *name) + : TQFrame(tqparent, name), _memory(memory) { - _top = new QVBoxLayout(this, 5, 10); + _top = new TQVBoxLayout(this, 5, 10); } //----------------------------------------------------------------------------- Device::MemoryRangeEditor::MemoryRangeEditor(Device::Memory &memory, uint nbLines, uint nbCols, uint offset, int nb, - QWidget *parent, const char *name) - : MemoryEditor(&memory, parent, name), + TQWidget *tqparent, const char *name) + : MemoryEditor(&memory, tqparent, name), _nbLines(nbLines), _nbCols(nbCols), _offset(offset), _nb(nb) {} @@ -48,60 +48,60 @@ void Device::MemoryRangeEditor::init() uint totalNbLines = _nb / _nbCols; if ( (_nb % _nbCols)!=0 ) totalNbLines++; - QHBoxLayout *hbox = new QHBoxLayout(_top); + TQHBoxLayout *hbox = new TQHBoxLayout(_top); - QVBoxLayout *vbox = new QVBoxLayout(hbox); - QFrame *frame = new QFrame(this); - frame->setFrameStyle(QFrame::Panel | QFrame::Raised); + TQVBoxLayout *vbox = new TQVBoxLayout(hbox); + TQFrame *frame = new TQFrame(this); + frame->setFrameStyle(TQFrame::Panel | TQFrame::Raised); frame->setMargin(5); vbox->addWidget(frame); vbox->addStretch(1); - QHBoxLayout *fbox = new QHBoxLayout(frame, 5, 5); - QGrid *grid = new QGrid(3+_nbCols, QGrid::Horizontal, frame, "memory_range_editor_grid"); + TQHBoxLayout *fbox = new TQHBoxLayout(frame, 5, 5); + TQGrid *grid = new TQGrid(3+_nbCols, Qt::Horizontal, frame, "memory_range_editor_grid"); fbox->addWidget(grid); grid->setSpacing(0); grid->setMargin(3); - QFont f("courier", font().pointSize()); + TQFont f("courier", font().pointSize()); grid->setFont(f); for (uint k=0; k<_nbLines; ++k) { // addresses - QWidget *w = new QWidget(grid); + TQWidget *w = new TQWidget(grid); w->setFixedWidth(10); _blocks.append(w); - QLabel *label = new QLabel(toHex(0, 2*_memory->device().nbBytesAddress()), grid, "address_label"); + TQLabel *label = new TQLabel(toHex(0, 2*_memory->device().nbBytesAddress()), grid, "address_label"); _addresses.append(label); - label = new QLabel(":", grid); + label = new TQLabel(":", grid); // memory for (uint i = 0; i<_nbCols; ++i) { HexWordEditor *h = createHexWordEditor(grid); _editors.append(h); - connect(h, SIGNAL(modified()), SIGNAL(modified())); - connect(h, SIGNAL(moveNext()), SLOT(moveNext())); - connect(h, SIGNAL(movePrev()), SLOT(movePrev())); - connect(h, SIGNAL(moveFirst()), SLOT(moveFirst())); - connect(h, SIGNAL(moveLast()), SLOT(moveLast())); - connect(h, SIGNAL(moveUp()), SLOT(moveUp())); - connect(h, SIGNAL(moveDown()), SLOT(moveDown())); - connect(h, SIGNAL(moveNextPage()), SLOT(moveNextPage())); - connect(h, SIGNAL(movePrevPage()), SLOT(movePrevPage())); + connect(h, TQT_SIGNAL(modified()), TQT_SIGNAL(modified())); + connect(h, TQT_SIGNAL(moveNext()), TQT_SLOT(moveNext())); + connect(h, TQT_SIGNAL(movePrev()), TQT_SLOT(movePrev())); + connect(h, TQT_SIGNAL(moveFirst()), TQT_SLOT(moveFirst())); + connect(h, TQT_SIGNAL(moveLast()), TQT_SLOT(moveLast())); + connect(h, TQT_SIGNAL(moveUp()), TQT_SLOT(moveUp())); + connect(h, TQT_SIGNAL(moveDown()), TQT_SLOT(moveDown())); + connect(h, TQT_SIGNAL(moveNextPage()), TQT_SLOT(moveNextPage())); + connect(h, TQT_SIGNAL(movePrevPage()), TQT_SLOT(movePrevPage())); } } // scrollbar if there are more lines to display than visible - _scrollbar = new QScrollBar(0, QMAX(_nbLines, totalNbLines)-_nbLines, 1, _nbLines, 0, - QScrollBar::Vertical, frame, "memory_range_editor_scrollbar"); - connect(_scrollbar, SIGNAL(valueChanged(int)), SLOT(setIndex(int))) ; + _scrollbar = new TQScrollBar(0, TQMAX(_nbLines, totalNbLines)-_nbLines, 1, _nbLines, 0, + Qt::Vertical, frame, "memory_range_editor_scrollbar"); + connect(_scrollbar, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(setIndex(int))) ; if ( totalNbLines<=_nbLines ) _scrollbar->hide(); fbox->addWidget(_scrollbar); fbox->addStretch(1); vbox->addStretch(1); - QVBoxLayout *vboxc = new QVBoxLayout(hbox); + TQVBoxLayout *vboxc = new TQVBoxLayout(hbox); vboxc->setSpacing(0); - _comment = new QLabel(this); + _comment = new TQLabel(this); _comment->hide(); vboxc->addWidget(_comment); - _spacer = new QLabel(this); + _spacer = new TQLabel(this); _spacer->setFixedHeight(10); _spacer->hide(); vboxc->addWidget(_spacer); @@ -113,7 +113,7 @@ void Device::MemoryRangeEditor::init() setIndex(0); } -void Device::MemoryRangeEditor::setComment(const QString &text) +void Device::MemoryRangeEditor::setComment(const TQString &text) { _comment->setText(text); _comment->show(); @@ -167,7 +167,7 @@ void Device::MemoryRangeEditor::setIndex(int index) void Device::MemoryRangeEditor::moveNext() { - QValueList::iterator it = _editors.find((HexWordEditor *)sender()); + TQValueList::iterator it = _editors.tqfind((HexWordEditor *)sender()); ++it; if ( it==_editors.end() || (*it)->offset()==-1 ) { if ( current()==uint(_scrollbar->maxValue()) ) return; // at end @@ -178,7 +178,7 @@ void Device::MemoryRangeEditor::moveNext() void Device::MemoryRangeEditor::movePrev() { - QValueList::iterator it = _editors.find((HexWordEditor *)sender()); + TQValueList::iterator it = _editors.tqfind((HexWordEditor *)sender()); if ( it==_editors.begin() ) { if ( current()==0 ) return; // at beginning setIndex(current()-1); @@ -209,7 +209,7 @@ void Device::MemoryRangeEditor::moveLast() void Device::MemoryRangeEditor::moveUp() { - int i = _editors.findIndex((HexWordEditor *)sender()); + int i = _editors.tqfindIndex((HexWordEditor *)sender()); uint line = i / _nbCols; if ( line==0 ) { if ( current()==0 ) return; // on first line @@ -220,7 +220,7 @@ void Device::MemoryRangeEditor::moveUp() void Device::MemoryRangeEditor::moveDown() { - int i = _editors.findIndex((HexWordEditor *)sender()); + int i = _editors.tqfindIndex((HexWordEditor *)sender()); uint line = i / _nbCols; if ( line+1==_nbLines ) { if ( current()==uint(_scrollbar->maxValue()) ) return; // on last line @@ -232,7 +232,7 @@ void Device::MemoryRangeEditor::moveDown() void Device::MemoryRangeEditor::moveNextPage() { - int i = _editors.findIndex((HexWordEditor *)sender()); + int i = _editors.tqfindIndex((HexWordEditor *)sender()); if ( _nbLines>(uint(_scrollbar->maxValue()) - current()) ) i = (_nbLines-1) * _nbCols + (i % _nbCols); else setIndex(current()+_nbLines); if ( _editors[i]->offset()==-1 ) _editors[i-_nbCols]->setFocus(); @@ -241,20 +241,20 @@ void Device::MemoryRangeEditor::moveNextPage() void Device::MemoryRangeEditor::movePrevPage() { - int i = _editors.findIndex((HexWordEditor *)sender()); + int i = _editors.tqfindIndex((HexWordEditor *)sender()); if ( current()<_nbLines ) i = (i % _nbCols); else setIndex(current()-_nbLines); _editors[i]->setFocus(); } //----------------------------------------------------------------------------- -Device::MemoryEditorGroup::MemoryEditorGroup(Device::Memory *memory, QWidget *parent, const char *name) - : MemoryEditor(memory, parent, name) +Device::MemoryEditorGroup::MemoryEditorGroup(Device::Memory *memory, TQWidget *tqparent, const char *name) + : MemoryEditor(memory, tqparent, name) {} void Device::MemoryEditorGroup::addEditor(MemoryEditor *editor) { - connect(editor, SIGNAL(modified()), SIGNAL(modified())); + connect(editor, TQT_SIGNAL(modified()), TQT_SIGNAL(modified())); _editors.append(editor); } @@ -284,8 +284,8 @@ const Device::ActionData Device::ACTION_DATA[Nb_Actions] = { }; Device::MemoryTypeEditor::MemoryTypeEditor(const HexView *hexview, Device::Memory &memory, - QWidget *parent, const char *name) - : MemoryEditorGroup(&memory, parent, name), + TQWidget *tqparent, const char *name) + : MemoryEditorGroup(&memory, tqparent, name), _title(0), _comment(0), _hexview(hexview) { for (uint i=0; iaddWidget(new SeparatorWidget(this)); - QHBoxLayout *hbox = new QHBoxLayout(_top); + TQHBoxLayout *hbox = new TQHBoxLayout(_top); _title = new PopupButton(this); for (uint i=0; iappendSeparator(); @@ -308,11 +308,11 @@ void Device::MemoryTypeEditor::init(bool first) _title->appendSeparator(); hbox->addWidget(_title); - _comment = new QLabel(this); + _comment = new TQLabel(this); hbox->addWidget(_comment); hbox->addStretch(1); - connect(&Main::toplevel(), SIGNAL(stateChanged()), SLOT(stateChanged())); + connect(&Main::toplevel(), TQT_SIGNAL(stateChanged()), TQT_SLOT(stateChanged())); } void Device::MemoryTypeEditor::addAction(KAction *action) diff --git a/src/devices/gui/memory_editor.h b/src/devices/gui/memory_editor.h index 9836261..2ef60d8 100644 --- a/src/devices/gui/memory_editor.h +++ b/src/devices/gui/memory_editor.h @@ -9,14 +9,14 @@ #ifndef MEMORY_EDITOR_H #define MEMORY_EDITOR_H -#include -#include -#include +#include +#include +#include #include "common/common/qflags.h" #include "common/common/bitvalue.h" -class QVBoxLayout; -class QHBoxLayout; -class QHBox; +class TQVBoxLayout; +class TQHBoxLayout; +class TQHBox; class KAction; class PopupButton; @@ -30,8 +30,8 @@ enum Action { Clear = 0, Zero, ChecksumCheck, Reload, Program, Verify, Read, Erase, BlankCheck, Nb_Actions }; enum ActionProperty { NoProperty = 0, SeparatorAfter = 1, NeedProgrammer = 2, NeedWrite = 4, NeedModified = 8 }; -Q_DECLARE_FLAGS(ActionProperties, ActionProperty) -Q_DECLARE_OPERATORS_FOR_FLAGS(ActionProperties) +TQ_DECLARE_FLAGS(ActionProperties, ActionProperty) +TQ_DECLARE_OPERATORS_FOR_FLAGS(ActionProperties) struct ActionData { const char *label, *icon; ActionProperties properties; @@ -39,11 +39,12 @@ struct ActionData { extern const ActionData ACTION_DATA[Nb_Actions]; //---------------------------------------------------------------------------- -class MemoryEditor : public QFrame +class MemoryEditor : public TQFrame { Q_OBJECT + TQ_OBJECT public: - MemoryEditor(Device::Memory *memory, QWidget *parent, const char *name); + MemoryEditor(Device::Memory *memory, TQWidget *tqparent, const char *name); virtual void setReadOnly(bool readOnly) = 0; public slots: @@ -54,19 +55,20 @@ signals: protected: Device::Memory *_memory; - QVBoxLayout *_top; + TQVBoxLayout *_top; }; //---------------------------------------------------------------------------- class MemoryRangeEditor : public MemoryEditor { Q_OBJECT + TQ_OBJECT public: MemoryRangeEditor(Device::Memory &memory, uint nbLines, uint nbCols, - uint offset, int nb, QWidget *parent, const char *name); + uint offset, int nb, TQWidget *tqparent, const char *name); virtual void init(); virtual void setReadOnly(bool readOnly); - void setComment(const QString &text); + void setComment(const TQString &text); public slots: virtual void updateDisplay(); @@ -87,30 +89,31 @@ protected slots: protected: uint _nbLines, _nbCols, _offset; int _nb; - QValueList _addresses; - QValueList _blocks; - QValueList _editors; - QScrollBar *_scrollbar; - QLabel *_comment; - QWidget *_spacer; + TQValueList _addresses; + TQValueList _blocks; + TQValueList _editors; + TQScrollBar *_scrollbar; + TQLabel *_comment; + TQWidget *_spacer; uint wordOffset() const { return _offset + current() * _nbCols; } uint current() const { return _scrollbar->value(); } virtual uint nbWords() const = 0; virtual uint addressIncrement() const = 0; virtual Address startAddress() const = 0; - virtual HexWordEditor *createHexWordEditor(QWidget *parent) = 0; + virtual HexWordEditor *createHexWordEditor(TQWidget *tqparent) = 0; virtual bool isRangeReadOnly() const = 0; virtual void updateAddressColor(uint i, Address address) { Q_UNUSED(i); Q_UNUSED(address); } - virtual void addLegend(QVBoxLayout *vbox) { Q_UNUSED(vbox); } + virtual void addLegend(TQVBoxLayout *vbox) { Q_UNUSED(vbox); } }; //---------------------------------------------------------------------------- class MemoryEditorGroup : public MemoryEditor { Q_OBJECT + TQ_OBJECT public: - MemoryEditorGroup(Device::Memory *memory, QWidget *parent, const char *name); + MemoryEditorGroup(Device::Memory *memory, TQWidget *tqparent, const char *name); void addEditor(MemoryEditor *editor); virtual void setReadOnly(bool readOnly); @@ -119,15 +122,16 @@ public slots: protected: bool _modified; - QValueList _editors; + TQValueList _editors; }; //---------------------------------------------------------------------------- class MemoryTypeEditor : public MemoryEditorGroup { Q_OBJECT + TQ_OBJECT public: - MemoryTypeEditor(const HexView *hexview, Device::Memory &memory, QWidget *parent, const char *name); + MemoryTypeEditor(const HexView *hexview, Device::Memory &memory, TQWidget *tqparent, const char *name); virtual void init(bool first); virtual void setReadOnly(bool readOnly); @@ -137,7 +141,7 @@ protected slots: protected: PopupButton *_title; - QLabel *_comment; + TQLabel *_comment; const HexView *_hexview; virtual bool internalDoAction(Action action) = 0; // return true if memory modified virtual bool hasAction(Action) const { return true; } diff --git a/src/devices/gui/register_view.cpp b/src/devices/gui/register_view.cpp index 70dedc9..bf49574 100644 --- a/src/devices/gui/register_view.cpp +++ b/src/devices/gui/register_view.cpp @@ -12,8 +12,8 @@ #include "libgui/gui_debug_manager.h" //---------------------------------------------------------------------------- -Register::PortBitListViewItem::PortBitListViewItem(uint index, uint bit, KListViewItem *parent) - : KListViewItem(parent), _index(index), _bit(bit) +Register::PortBitListViewItem::PortBitListViewItem(uint index, uint bit, KListViewItem *tqparent) + : KListViewItem(tqparent), _index(index), _bit(bit) { const Device::RegistersData *rdata = Main::deviceData()->registersData(); setText(1, rdata->portBitName(_index, _bit)); @@ -22,8 +22,8 @@ Register::PortBitListViewItem::PortBitListViewItem(uint index, uint bit, KListVi void Register::PortBitListViewItem::updateView() { - const QMap &pdata = Register::list().portData(_index); - QString text; + const TQMap &pdata = Register::list().portData(_index); + TQString text; if ( pdata.isEmpty() ) text = "--"; else { /* @@ -43,25 +43,25 @@ void Register::PortBitListViewItem::updateView() else text += (pdata[_bit].drivenState==Device::IoHigh ? "1" : "0"); } setText(2, text); - repaint(); + tqrepaint(); } -void Register::PortBitListViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int align) +void Register::PortBitListViewItem::paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int align) { - QColorGroup ncg = cg; - const QMap &data = Register::list().portData(_index); - const QMap &odata = Register::list().oldPortData(_index); + TQColorGroup ncg = cg; + const TQMap &data = Register::list().portData(_index); + const TQMap &odata = Register::list().oldPortData(_index); bool changed = ( !data.isEmpty() && data[_bit]!=odata[_bit] ); - if ( column==2 && changed ) ncg.setColor(QColorGroup::Text, red); + if ( column==2 && changed ) ncg.setColor(TQColorGroup::Text, red); KListViewItem::paintCell(p, ncg, column, width, align); } -QString Register::PortBitListViewItem::tooltip(int col) const +TQString Register::PortBitListViewItem::tooltip(int col) const { - if ( col!=2 ) return QString::null; - const QMap &pdata = Register::list().portData(_index); - if ( pdata.isEmpty() ) return QString::null; - QString s = text(1) + ": "; + if ( col!=2 ) return TQString(); + const TQMap &pdata = Register::list().portData(_index); + if ( pdata.isEmpty() ) return TQString(); + TQString s = text(1) + ": "; if (pdata[_bit].driving) { if ( pdata[_bit].drivingState!=Device::IoUnknown ) s += i18n("unknown state"); else s += (pdata[_bit].drivingState==Device::IoHigh ? i18n("driving high") : i18n("driving low")); @@ -75,8 +75,8 @@ QString Register::PortBitListViewItem::tooltip(int col) const } //----------------------------------------------------------------------------- -Register::ListViewItem::ListViewItem(const TypeData &data, KListViewItem *parent) - : EditListViewItem(parent), _data(data), _base(NumberBase::Hex) +Register::ListViewItem::ListViewItem(const TypeData &data, KListViewItem *tqparent) + : EditListViewItem(tqparent), _data(data), _base(NumberBase::Hex) { setSelectable(false); const Device::RegistersData *rdata = Main::deviceData()->registersData(); @@ -92,19 +92,19 @@ Register::ListViewItem::ListViewItem(const TypeData &data, KListViewItem *parent } } -QString Register::ListViewItem::text() const +TQString Register::ListViewItem::text() const { BitValue value = Register::list().value(_data); uint nbChars = convertNbChars(_data.nbChars(), NumberBase::Hex, _base); return (value.isInitialized() ? toLabel(_base, value, nbChars) : "--"); } -int Register::ListViewItem::compare(QListViewItem *item, int, bool) const +int Register::ListViewItem::compare(TQListViewItem *item, int, bool) const { const TypeData &data = static_cast(item)->data(); - int i1 = list().watched().findIndex(data); + int i1 = list().watched().tqfindIndex(data); Q_ASSERT( i1!=-1 ); - int i2 = list().watched().findIndex(_data); + int i2 = list().watched().tqfindIndex(_data); Q_ASSERT( i2!=-1 ); return ( i1-i2 ); } @@ -114,7 +114,7 @@ void Register::ListViewItem::updateView() if ( _data.type()!=Special ) setText(0, toHexLabel(_data.address(), nbCharsAddress()) + ":"); setText(1, label()); setText(2, text()); - repaint(); + tqrepaint(); for (uint i=0; i<_items.count(); i++) _items[i]->updateView(); } @@ -124,38 +124,38 @@ void Register::ListViewItem::setBase(NumberBase base) updateView(); } -void Register::ListViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int align) +void Register::ListViewItem::paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int align) { - QColorGroup ncg = cg; + TQColorGroup ncg = cg; BitValue value = Register::list().value(_data); BitValue oldValue = Register::list().oldValue(_data); - if ( column==2 && value!=oldValue ) ncg.setColor(QColorGroup::Text, red); + if ( column==2 && value!=oldValue ) ncg.setColor(TQColorGroup::Text, red); EditListViewItem::paintCell(p, ncg, column, width, align); } -QString Register::ListViewItem::tooltip(int col) const +TQString Register::ListViewItem::tooltip(int col) const { - if ( col!=2 ) return QString::null; + if ( col!=2 ) return TQString(); BitValue value = Register::list().value(_data); - if ( !value.isInitialized() ) return QString::null; + if ( !value.isInitialized() ) return TQString(); BitValue v = value; - QString s; + TQString s; for (uint i=0; i<_data.nbChars(); i++) { char c = v.nybble(i); if ( isprint(c) ) s = c + s; else s = "." + s; } - return QString("%1 - %2 - \"%3\"").arg(toHexLabel(value, _data.nbChars())) - .arg(toLabel(NumberBase::Bin, value, 4*_data.nbChars())).arg(s); + return TQString("%1 - %2 - \"%3\"").tqarg(toHexLabel(value, _data.nbChars())) + .tqarg(toLabel(NumberBase::Bin, value, 4*_data.nbChars())).tqarg(s); } -QWidget *Register::ListViewItem::editWidgetFactory(int col) const +TQWidget *Register::ListViewItem::editWidgetFactory(int col) const { if ( col!=2 || Main::programmerState()!=Programmer::Halted ) return 0; return new NumberLineEdit(text(), 0); } -void Register::ListViewItem::editDone(int col, const QWidget *edit) +void Register::ListViewItem::editDone(int col, const TQWidget *edit) { if ( col!=2 ) return; bool ok; @@ -164,11 +164,11 @@ void Register::ListViewItem::editDone(int col, const QWidget *edit) } //---------------------------------------------------------------------------- -Register::LineEdit::LineEdit(QWidget *parent, const char *name) - : NumberLineEdit(parent, name), _base(NumberBase::Nb_Types) +Register::LineEdit::LineEdit(TQWidget *tqparent, const char *name) + : NumberLineEdit(tqparent, name), _base(NumberBase::Nb_Types) { - connect(this, SIGNAL(lostFocus()), SLOT(updateText())); - connect(this, SIGNAL(returnPressed()), SLOT(returnPressedSlot())); + connect(this, TQT_SIGNAL(lostFocus()), TQT_SLOT(updateText())); + connect(this, TQT_SIGNAL(returnPressed()), TQT_SLOT(returnPressedSlot())); } void Register::LineEdit::updateText() @@ -176,7 +176,7 @@ void Register::LineEdit::updateText() setText(_value.isInitialized() ? toLabel(_base, _value, _nbChars) : "--"); uint w = 2*frameWidth() + maxLabelWidth(_base, _nbChars, font()); setFixedWidth(w+5); - setFixedHeight(minimumSizeHint().height()); + setFixedHeight(tqminimumSizeHint().height()); } void Register::LineEdit::setValue(NumberBase base, BitValue value, uint nbChars) @@ -196,13 +196,13 @@ void Register::LineEdit::returnPressedSlot() emit modified(); } -void Register::LineEdit::keyPressEvent(QKeyEvent *e) +void Register::LineEdit::keyPressEvent(TQKeyEvent *e) { if ( e->key()==Key_Escape ) clearFocus(); else NumberLineEdit::keyPressEvent(e); } //---------------------------------------------------------------------------- -Register::View::View(QWidget *parent, const char *name) - : QFrame(parent, name), GenericView(list()) +Register::View::View(TQWidget *tqparent, const char *name) + : TQFrame(tqparent, name), GenericView(list()) {} diff --git a/src/devices/gui/register_view.h b/src/devices/gui/register_view.h index 7ef8a54..60c8194 100644 --- a/src/devices/gui/register_view.h +++ b/src/devices/gui/register_view.h @@ -9,7 +9,7 @@ #ifndef REGISTER_VIEW_H #define REGISTER_VIEW_H -#include +#include #include "devices/base/register.h" #include "common/gui/number_gui.h" @@ -23,15 +23,15 @@ enum { PortBitRtti = 1000, RegisterRtti = 1001 }; class PortBitListViewItem : public KListViewItem { public: - PortBitListViewItem(uint address, uint bit, KListViewItem *parent); + PortBitListViewItem(uint address, uint bit, KListViewItem *tqparent); virtual int rtti() const { return PortBitRtti; } void updateView(); - QString tooltip(int column) const; + TQString tooltip(int column) const; private: uint _index, _bit; - virtual void paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int align); + virtual void paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int align); }; //----------------------------------------------------------------------------- @@ -42,23 +42,23 @@ public: virtual int rtti() const { return RegisterRtti; } virtual void updateView(); const TypeData &data() const { return _data; } - QString tooltip(int column) const; + TQString tooltip(int column) const; NumberBase base() const { return _base; } void setBase(NumberBase base); - virtual QString label() const = 0; - virtual int compare(QListViewItem *item, int, bool) const; + virtual TQString label() const = 0; + virtual int compare(TQListViewItem *item, int, bool) const; protected: TypeData _data; - QValueList _items; + TQValueList _items; NumberBase _base; - virtual void paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int align); - virtual QWidget *editWidgetFactory(int col) const; + virtual void paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int align); + virtual TQWidget *editWidgetFactory(int col) const; virtual bool alwaysAcceptEdit(int) const { return false; } - virtual void editDone(int col, const QWidget *editWidget); + virtual void editDone(int col, const TQWidget *editWidget); virtual uint nbCharsAddress() const = 0; - virtual QString text() const; + virtual TQString text() const; virtual void activate() {} }; @@ -66,8 +66,9 @@ protected: class LineEdit : public NumberLineEdit { Q_OBJECT + TQ_OBJECT public: - LineEdit(QWidget *parent, const char *name = 0); + LineEdit(TQWidget *tqparent, const char *name = 0); void setValue(NumberBase base, BitValue value, uint nbChars); BitValue value() const { return _value; } @@ -75,7 +76,7 @@ signals: void modified(); protected: - virtual void keyPressEvent(QKeyEvent *e); + virtual void keyPressEvent(TQKeyEvent *e); private slots: void updateText(); @@ -88,11 +89,12 @@ private: }; //----------------------------------------------------------------------------- -class View : public QFrame, public GenericView +class View : public TQFrame, public GenericView { Q_OBJECT + TQ_OBJECT public: - View(QWidget *parent, const char *name); + View(TQWidget *tqparent, const char *name); signals: void readSignal(uint address); diff --git a/src/devices/list/device_list.cpp b/src/devices/list/device_list.cpp index 1434ec8..87ea495 100644 --- a/src/devices/list/device_list.cpp +++ b/src/devices/list/device_list.cpp @@ -8,14 +8,14 @@ ***************************************************************************/ #include "device_list.h" -#include +#include #include "devices/pic/pic/pic_group.h" #include "devices/mem24/mem24/mem24_group.h" const Device::AutoData Device::AUTO_DATA = { "*", I18N_NOOP("") }; -const Device::Data *Device::Lister::data(const QString &device) const +const Device::Data *Device::Lister::data(const TQString &device) const { for (ConstIterator it=begin(); it!=end(); it++) { const Data *data = static_cast(it.data()->deviceData(device).data); @@ -24,7 +24,7 @@ const Device::Data *Device::Lister::data(const QString &device) const return 0; } -QString Device::Lister::checkName(const QString &device) const +TQString Device::Lister::checkName(const TQString &device) const { if ( device==AUTO_DATA.name ) return device; if ( isSupported(device) ) return device; diff --git a/src/devices/list/device_list.h b/src/devices/list/device_list.h index 3d9fb78..6f00046 100644 --- a/src/devices/list/device_list.h +++ b/src/devices/list/device_list.h @@ -24,8 +24,8 @@ class Lister : public ::Group::Lister { public: Lister(); - const Data *data(const QString &device) const; - QString checkName(const QString &device) const; + const Data *data(const TQString &device) const; + TQString checkName(const TQString &device) const; }; extern const Lister &lister(); diff --git a/src/devices/mem24/base/mem24.cpp b/src/devices/mem24/base/mem24.cpp index 03bffe3..147c199 100644 --- a/src/devices/mem24/base/mem24.cpp +++ b/src/devices/mem24/base/mem24.cpp @@ -8,13 +8,13 @@ ***************************************************************************/ #include "mem24.h" -QDataStream &Mem24::operator <<(QDataStream &s, const Data &data) +TQDataStream &Mem24::operator <<(TQDataStream &s, const Data &data) { s << static_cast(data); s << data._nbBytes << data._nbBlocks << data._nbBytesPage; return s; } -QDataStream &Mem24::operator >>(QDataStream &s, Data &data) +TQDataStream &Mem24::operator >>(TQDataStream &s, Data &data) { s >> static_cast(data); s >> data._nbBytes >> data._nbBlocks >> data._nbBytesPage; diff --git a/src/devices/mem24/base/mem24.h b/src/devices/mem24/base/mem24.h index d66ff47..7e0b5e7 100644 --- a/src/devices/mem24/base/mem24.h +++ b/src/devices/mem24/base/mem24.h @@ -22,7 +22,7 @@ class Data : public Device::Data { public: Data() : Device::Data(0) {} - virtual QString listViewGroup() const { return i18n("24 EEPROM"); } + virtual TQString listViewGroup() const { return i18n("24 EEPROM"); } uint nbBytes() const { return _nbBytes; } virtual bool matchId(BitValue, Device::IdData &) const { return false; } virtual uint nbBitsAddress() const { return nbBits(_nbBytes-1); } @@ -35,12 +35,12 @@ private: friend class XmlToData; friend class Group; - friend QDataStream &operator <<(QDataStream &s, const Data &data); - friend QDataStream &operator >>(QDataStream &s, Data &data); + friend TQDataStream &operator <<(TQDataStream &s, const Data &data); + friend TQDataStream &operator >>(TQDataStream &s, Data &data); }; -QDataStream &operator <<(QDataStream &s, const Data &data); -QDataStream &operator >>(QDataStream &s, Data &data); +TQDataStream &operator <<(TQDataStream &s, const Data &data); +TQDataStream &operator >>(TQDataStream &s, Data &data); } // namespace diff --git a/src/devices/mem24/gui/mem24_group_ui.cpp b/src/devices/mem24/gui/mem24_group_ui.cpp index 751e5a7..8a8bb5a 100644 --- a/src/devices/mem24/gui/mem24_group_ui.cpp +++ b/src/devices/mem24/gui/mem24_group_ui.cpp @@ -10,7 +10,7 @@ #include "mem24_hex_view.h" -Device::HexView *Mem24::GroupUI::createHexView(const HexEditor &editor, QWidget *parent) const +Device::HexView *Mem24::GroupUI::createHexView(const HexEditor &editor, TQWidget *tqparent) const { - return new HexView(editor, parent); + return new HexView(editor, tqparent); } diff --git a/src/devices/mem24/gui/mem24_group_ui.h b/src/devices/mem24/gui/mem24_group_ui.h index 37766b5..c2b3360 100644 --- a/src/devices/mem24/gui/mem24_group_ui.h +++ b/src/devices/mem24/gui/mem24_group_ui.h @@ -16,10 +16,10 @@ namespace Mem24 class GroupUI : public Device::GroupUI { public: - virtual Device::HexView *createHexView(const HexEditor &editor, QWidget *parent) const; - virtual Register::View *createRegisterView(QWidget *) const { return 0; } - virtual Device::MemoryEditor *createConfigEditor(Device::Memory &, QWidget *) const { return 0; } - virtual void fillWatchListContainer(ListContainer *, QValueVector &) const {} + virtual Device::HexView *createHexView(const HexEditor &editor, TQWidget *tqparent) const; + virtual Register::View *createRegisterView(TQWidget *) const { return 0; } + virtual Device::MemoryEditor *createConfigEditor(Device::Memory &, TQWidget *) const { return 0; } + virtual void fillWatchListContainer(ListContainer *, TQValueVector &) const {} virtual Register::ListViewItem *createWatchItem(const Register::TypeData &, KListViewItem *) const { return 0; } }; diff --git a/src/devices/mem24/gui/mem24_hex_view.cpp b/src/devices/mem24/gui/mem24_hex_view.cpp index 0ada8d0..7ded854 100644 --- a/src/devices/mem24/gui/mem24_hex_view.cpp +++ b/src/devices/mem24/gui/mem24_hex_view.cpp @@ -8,14 +8,14 @@ ***************************************************************************/ #include "mem24_hex_view.h" -#include -#include +#include +#include #include #include "mem24_memory_editor.h" -Mem24::HexView::HexView(const HexEditor &editor, QWidget *parent) - : Device::HexView(editor, parent, "mem24_hex_view") +Mem24::HexView::HexView(const HexEditor &editor, TQWidget *tqparent) + : Device::HexView(editor, tqparent, "mem24_hex_view") {} void Mem24::HexView::display() @@ -34,5 +34,5 @@ BitValue Mem24::HexView::checksum() const BitValue cs = 0x0000; for (uint i=0; i(_memory->device()).nbBytes(); i++) cs += static_cast(_memory)->byte(i); - return cs.maskWith(0xFFFF); + return cs.tqmaskWith(0xFFFF); } diff --git a/src/devices/mem24/gui/mem24_hex_view.h b/src/devices/mem24/gui/mem24_hex_view.h index 378a25e..199865a 100644 --- a/src/devices/mem24/gui/mem24_hex_view.h +++ b/src/devices/mem24/gui/mem24_hex_view.h @@ -9,7 +9,7 @@ #ifndef MEM24_HEX_VIEW_H #define MEM24_HEX_VIEW_H -class QVBoxLayout; +class TQVBoxLayout; #include "devices/gui/hex_view.h" @@ -19,8 +19,9 @@ namespace Mem24 class HexView : public Device::HexView { Q_OBJECT + TQ_OBJECT public: - HexView(const HexEditor &editor, QWidget *parent); + HexView(const HexEditor &editor, TQWidget *tqparent); virtual uint nbChecksumChars() const { return 4; } virtual BitValue checksum() const; diff --git a/src/devices/mem24/gui/mem24_memory_editor.cpp b/src/devices/mem24/gui/mem24_memory_editor.cpp index 61f98fe..a5203b9 100644 --- a/src/devices/mem24/gui/mem24_memory_editor.cpp +++ b/src/devices/mem24/gui/mem24_memory_editor.cpp @@ -8,7 +8,7 @@ ***************************************************************************/ #include "mem24_memory_editor.h" -#include +#include #include #include @@ -19,19 +19,19 @@ #include "devices/base/device_group.h" //----------------------------------------------------------------------------- -Mem24::MemoryRangeEditor::MemoryRangeEditor(Memory &memory, QWidget *parent) - : Device::MemoryRangeEditor(memory, 16, 16, 0, -1, parent, "mem24_memory_range_editor"), +Mem24::MemoryRangeEditor::MemoryRangeEditor(Memory &memory, TQWidget *tqparent) + : Device::MemoryRangeEditor(memory, 16, 16, 0, -1, tqparent, "mem24_memory_range_editor"), MemoryCaster(memory) {} -Device::HexWordEditor *Mem24::MemoryRangeEditor::createHexWordEditor(QWidget *parent) +Device::HexWordEditor *Mem24::MemoryRangeEditor::createHexWordEditor(TQWidget *tqparent) { - return new HexWordEditor(memory(), parent); + return new HexWordEditor(memory(), tqparent); } //----------------------------------------------------------------------------- -Mem24::MemoryTypeEditor::MemoryTypeEditor(const HexView *hexview, Memory &memory, QWidget *parent) - : Device::MemoryTypeEditor(hexview, memory, parent, "mem24_memory_type_editor"), +Mem24::MemoryTypeEditor::MemoryTypeEditor(const HexView *hexview, Memory &memory, TQWidget *tqparent) + : Device::MemoryTypeEditor(hexview, memory, tqparent, "mem24_memory_type_editor"), MemoryCaster(memory) {} diff --git a/src/devices/mem24/gui/mem24_memory_editor.h b/src/devices/mem24/gui/mem24_memory_editor.h index eb99e97..657810a 100644 --- a/src/devices/mem24/gui/mem24_memory_editor.h +++ b/src/devices/mem24/gui/mem24_memory_editor.h @@ -34,12 +34,13 @@ private: class HexWordEditor : public Device::HexWordEditor, public MemoryCaster { Q_OBJECT + TQ_OBJECT public: - HexWordEditor(Memory &memory, QWidget *parent) - : Device::HexWordEditor(memory, 2, parent), MemoryCaster(memory) {} + HexWordEditor(Memory &memory, TQWidget *tqparent) + : Device::HexWordEditor(memory, 2, tqparent), MemoryCaster(memory) {} private: - virtual BitValue mask() const { return 0xFF; } + virtual BitValue tqmask() const { return 0xFF; } virtual BitValue normalizeWord(BitValue value) const { return value; } virtual BitValue word() const { return memory().byte(_offset); } virtual void setWord(BitValue value) { memory().setByte(_offset, value); } @@ -49,14 +50,15 @@ private: class MemoryRangeEditor : public Device::MemoryRangeEditor, public MemoryCaster { Q_OBJECT + TQ_OBJECT public: - MemoryRangeEditor(Memory &memory, QWidget *parent); + MemoryRangeEditor(Memory &memory, TQWidget *tqparent); private: virtual uint nbWords() const { return device().nbBytes(); } virtual uint addressIncrement() const { return 1; } virtual Address startAddress() const { return 0x0; } - virtual Device::HexWordEditor *createHexWordEditor(QWidget *parent); + virtual Device::HexWordEditor *createHexWordEditor(TQWidget *tqparent); virtual bool isRangeReadOnly() const { return false; } }; @@ -64,8 +66,9 @@ private: class MemoryTypeEditor : public Device::MemoryTypeEditor, public MemoryCaster { Q_OBJECT + TQ_OBJECT public: - MemoryTypeEditor(const HexView *hexview, Memory &memory, QWidget *parent); + MemoryTypeEditor(const HexView *hexview, Memory &memory, TQWidget *tqparent); virtual void init(bool first); private: diff --git a/src/devices/mem24/mem24/mem24_group.cpp b/src/devices/mem24/mem24/mem24_group.cpp index 53cad5b..f396027 100644 --- a/src/devices/mem24/mem24/mem24_group.cpp +++ b/src/devices/mem24/mem24/mem24_group.cpp @@ -15,19 +15,19 @@ Device::Memory *Mem24::Group::createMemory(const Device::Data &data) const return new Memory(static_cast(data)); } -QString Mem24::Group::informationHtml(const Device::Data &data) const +TQString Mem24::Group::informationHtml(const Device::Data &data) const { const Mem24::Data &mdata = static_cast(data); - QString tmp = i18n("%1 bytes").arg(formatNumber(mdata.nbBytes())); + TQString tmp = i18n("%1 bytes").tqarg(formatNumber(mdata.nbBytes())); return htmlTableRow(i18n("Memory Size"), tmp); } #if !defined(NO_KDE) -QPixmap Mem24::Group::memoryGraph(const Device::Data &data) const +TQPixmap Mem24::Group::memoryGraph(const Device::Data &data) const { const Mem24::Data &mdata = static_cast(data); uint offset = 0x0; - QValueList ranges; + TQValueList ranges; for (uint i=0; i { public: - virtual QString name() const { return "mem24"; } - virtual QString label() const { return i18n("Serial Memory 24"); } + virtual TQString name() const { return "mem24"; } + virtual TQString label() const { return i18n("Serial Memory 24"); } virtual Device::Memory *createMemory(const Device::Data &data) const; - virtual QString informationHtml(const Device::Data &data) const; + virtual TQString informationHtml(const Device::Data &data) const; #if !defined(NO_KDE) - virtual QPixmap memoryGraph(const Device::Data &data) const; + virtual TQPixmap memoryGraph(const Device::Data &data) const; #endif private: diff --git a/src/devices/mem24/mem24/mem24_memory.cpp b/src/devices/mem24/mem24/mem24_memory.cpp index a4296ea..b09aa79 100644 --- a/src/devices/mem24/mem24/mem24_memory.cpp +++ b/src/devices/mem24/mem24/mem24_memory.cpp @@ -8,7 +8,7 @@ ***************************************************************************/ #include "mem24_memory.h" -#include +#include #include "common/global/global.h" #include "common/common/misc.h" @@ -34,7 +34,7 @@ void Mem24::Memory::copyFrom(const Device::Memory &memory) Device::Array Mem24::Memory::arrayForWriting() const { Device::Array data(_data.count()); - for (uint i=0; i &inRange) + TQStringList &warnings, TQMap &inRange) { - BitValue mask = 0xFF; + BitValue tqmask = 0xFF; for (uint k=0; k &inRange); + TQStringList &warnings, TQMap &inRange); }; } // namespace diff --git a/src/devices/mem24/prog/mem24_prog.cpp b/src/devices/mem24/prog/mem24_prog.cpp index 4c4b201..338c217 100644 --- a/src/devices/mem24/prog/mem24_prog.cpp +++ b/src/devices/mem24/prog/mem24_prog.cpp @@ -32,15 +32,15 @@ bool Programmer::Mem24DeviceSpecific::write(const Device::Array &data) bool Programmer::Mem24DeviceSpecific::verifyByte(uint index, BitValue d, const VerifyData &vdata) { BitValue v = static_cast(vdata.memory).byte(index); - v = v.maskWith(0xFF); - d = d.maskWith(0xFF); + v = v.tqmaskWith(0xFF); + d = d.tqmaskWith(0xFF); if ( v==d ) return true; Address address = index; if ( vdata.actions & BlankCheckVerify ) log(Log::LineType::Error, i18n("Device memory is not blank (at address %1: reading %2 and expecting %3).") - .arg(toHexLabel(address, device().nbCharsAddress())).arg(toHexLabel(d, 2)).arg(toHexLabel(v, 2))); + .tqarg(toHexLabel(address, device().nbCharsAddress())).tqarg(toHexLabel(d, 2)).tqarg(toHexLabel(v, 2))); else log(Log::LineType::Error, i18n("Device memory doesn't match hex file (at address %1: reading %2 and expecting %3).") - .arg(toHexLabel(address, device().nbCharsAddress())).arg(toHexLabel(d, 2)).arg(toHexLabel(v, 2))); + .tqarg(toHexLabel(address, device().nbCharsAddress())).tqarg(toHexLabel(d, 2)).tqarg(toHexLabel(v, 2))); return false; } diff --git a/src/devices/mem24/prog/mem24_prog.h b/src/devices/mem24/prog/mem24_prog.h index 86948c2..b2d699f 100644 --- a/src/devices/mem24/prog/mem24_prog.h +++ b/src/devices/mem24/prog/mem24_prog.h @@ -34,7 +34,7 @@ protected: class Mem24Hardware : public Hardware { public: - Mem24Hardware(::Programmer::Base &base, Port::Base *port, const QString &name) : Hardware(base, port, name) {} + Mem24Hardware(::Programmer::Base &base, Port::Base *port, const TQString &name) : Hardware(base, port, name) {} const Mem24::Data &device() const { return static_cast(*_base.device()); } }; diff --git a/src/devices/mem24/xml/mem24_xml_to_data.cpp b/src/devices/mem24/xml/mem24_xml_to_data.cpp index 734ebca..d38d669 100644 --- a/src/devices/mem24/xml/mem24_xml_to_data.cpp +++ b/src/devices/mem24/xml/mem24_xml_to_data.cpp @@ -6,8 +6,8 @@ * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * ***************************************************************************/ -#include -#include +#include +#include #include "xml_to_data/device_xml_to_data.h" #include "common/common/misc.h" @@ -21,13 +21,13 @@ class XmlToData : public Device::XmlToData private: virtual uint nbOutputFiles(uint) const { return 1; } virtual bool isIncluded(uint, uint) const { return true; } - virtual QString namespaceName() const { return "Mem24"; } + virtual TQString namespaceName() const { return "Mem24"; } -virtual void processDevice(QDomElement device) +virtual void processDevice(TQDomElement device) { Device::XmlToDataBase::processDevice(device); - QDomElement e = findUniqueElement(device, "memory", "name", QString::null); + TQDomElement e = findUniqueElement(device, "memory", "name", TQString()); bool ok; data()->_nbBytes = fromHexLabel(e.attribute("size"), &ok); if ( !ok ) qFatal("Missing or invalid size"); @@ -38,18 +38,18 @@ virtual void processDevice(QDomElement device) data()->_nbBytesPage = e.attribute("page_size").toUInt(&ok); if ( !ok || data()->_nbBytesPage==0 ) qFatal("Missing, zero, or invalid page_size"); if ( ((data()->_nbBytes/data()->_nbBlocks) % data()->_nbBytesPage)!=0 ) qFatal("page_size should divide size/nb_blocks"); - QStringList names; - names.append(QString::null); + TQStringList names; + names.append(TQString()); checkTagNames(device, "memory", names); } -virtual void checkPins(const QMap &pinLabels) const +virtual void checkPins(const TQMap &pinLabels) const { - if ( !pinLabels.contains("VCC") ) qFatal("No VDD pin specified"); - if ( !pinLabels.contains("VSS") ) qFatal("No VSS pin specified"); - QMap::const_iterator it; + if ( !pinLabels.tqcontains("VCC") ) qFatal("No VDD pin specified"); + if ( !pinLabels.tqcontains("VSS") ) qFatal("No VSS pin specified"); + TQMap::const_iterator it; for (it=pinLabels.begin(); it!=pinLabels.end(); ++it) - if ( it.data()!=1 ) qFatal(QString("Duplicated pin %1").arg(it.key())); + if ( it.data()!=1 ) qFatal(TQString("Duplicated pin %1").tqarg(it.key())); } }; // class diff --git a/src/devices/pic/base/pic.cpp b/src/devices/pic/base/pic.cpp index 8f81540..b58f480 100644 --- a/src/devices/pic/base/pic.cpp +++ b/src/devices/pic/base/pic.cpp @@ -138,9 +138,9 @@ uint Pic::Data::nbAddresses(MemoryRangeType type) const return (range(type).end - range(type).start + 1); } -QString Pic::Data::fname(Device::Special special) const +TQString Pic::Data::fname(Device::Special special) const { - QString s = name(); + TQString s = name(); switch (special.type()) { case Device::Special::Normal: break; case Device::Special::LowPower: @@ -149,11 +149,11 @@ QString Pic::Data::fname(Device::Special special) const break; case Device::Special::LowVoltage: // assume name is of form "NNXN..." - s.replace(2, 1, "LV"); + s.tqreplace(2, 1, "LV"); break; case Device::Special::HighVoltage: // assume name is of form "NNXN..." - s.replace(2, 1, "HV"); + s.tqreplace(2, 1, "HV"); break; case Device::Special::Nb_Types: Q_ASSERT(false); break; } @@ -163,7 +163,7 @@ QString Pic::Data::fname(Device::Special special) const bool Pic::Data::matchId(BitValue rawId, Device::IdData &idata) const { if ( !isPresent(MemoryRangeType::DeviceId) ) return false; - QMap::const_iterator it; + TQMap::const_iterator it; for (it=_ids.begin(); it!=_ids.end(); ++it) { idata.special = it.key(); BitValue nid = 0x0; @@ -175,23 +175,23 @@ bool Pic::Data::matchId(BitValue rawId, Device::IdData &idata) const case Architecture::P18F: case Architecture::P18J: nid = rawId.clearMaskBits(0x1F); - idata.revision = rawId.maskWith(0x1F); + idata.revision = rawId.tqmaskWith(0x1F); break; case Architecture::P24F: - nid = (rawId >> 16).maskWith(0x3FFF); - idata.revision = (rawId >> 6).maskWith(0x7); - idata.minorRevision = rawId.maskWith(0x7); + nid = (rawId >> 16).tqmaskWith(0x3FFF); + idata.revision = (rawId >> 6).tqmaskWith(0x7); + idata.minorRevision = rawId.tqmaskWith(0x7); break; case Architecture::P30F: - nid = (rawId >> 16).maskWith(0xFFFF); - idata.revision = (rawId >> 6).maskWith(0x3F); - idata.minorRevision = rawId.maskWith(0x3F); - idata.process = (rawId >> 12).maskWith(0xF); + nid = (rawId >> 16).tqmaskWith(0xFFFF); + idata.revision = (rawId >> 6).tqmaskWith(0x3F); + idata.minorRevision = rawId.tqmaskWith(0x3F); + idata.process = (rawId >> 12).tqmaskWith(0xF); break; case Architecture::P24H: case Architecture::P33F: - nid = (rawId >> 16).maskWith(0xFFFF); - idata.revision = rawId.maskWith(0xFFFF); // ?? + nid = (rawId >> 16).tqmaskWith(0xFFFF); + idata.revision = rawId.tqmaskWith(0xFFFF); // ?? break; case Architecture::Nb_Types: Q_ASSERT(false); break; } @@ -200,10 +200,10 @@ bool Pic::Data::matchId(BitValue rawId, Device::IdData &idata) const return false; } -QStringList Pic::Data::idNames(const QMap &ids) const +TQStringList Pic::Data::idNames(const TQMap &ids) const { - QStringList list; - QMap::const_iterator it; + TQStringList list; + TQMap::const_iterator it; for (it=ids.begin(); it!=ids.end(); ++it) { switch (_architecture.type()) { case Architecture::P10X: @@ -212,17 +212,17 @@ QStringList Pic::Data::idNames(const QMap &ids) const case Architecture::P18C: case Architecture::P18F: case Architecture::P18J: - list += i18n("%1 (rev. %2)").arg(it.key()).arg(toLabel(it.data().revision)); + list += i18n("%1 (rev. %2)").tqarg(it.key()).tqarg(toLabel(it.data().revision)); break; case Architecture::P24F: - list += i18n("%1 (rev. %2.%3)").arg(it.key()).arg(toLabel(it.data().revision)).arg(toLabel(it.data().minorRevision)); + list += i18n("%1 (rev. %2.%3)").tqarg(it.key()).tqarg(toLabel(it.data().revision)).tqarg(toLabel(it.data().minorRevision)); break; case Architecture::P30F: - list += i18n("%1 (proc. %2; rev. %3.%4)").arg(it.key()).arg(toLabel(it.data().process)).arg(toLabel(it.data().revision)).arg(toLabel(it.data().minorRevision)); + list += i18n("%1 (proc. %2; rev. %3.%4)").tqarg(it.key()).tqarg(toLabel(it.data().process)).tqarg(toLabel(it.data().revision)).tqarg(toLabel(it.data().minorRevision)); break; case Architecture::P24H: case Architecture::P33F: - list += i18n("%1 (rev. %2)").arg(it.key()).arg(toLabel(it.data().revision)); + list += i18n("%1 (rev. %2)").tqarg(it.key()).tqarg(toLabel(it.data().revision)); break; case Architecture::Nb_Types: Q_ASSERT(false); break; } @@ -230,20 +230,20 @@ QStringList Pic::Data::idNames(const QMap &ids) const return list; } -bool Pic::Data::checkCalibration(const Device::Array &data, QString *message) const +bool Pic::Data::checkCalibration(const Device::Array &data, TQString *message) const { Q_ASSERT( nbWords(MemoryRangeType::Cal)==data.count() ); for (uint i=0; i>(QDataStream &s, Pic::VoltageData &vd) +TQDataStream &operator >>(TQDataStream &s, Pic::VoltageData &vd) { s >> vd.min >> vd.max >> vd.nominal; return s; } -QDataStream &operator <<(QDataStream &s, const Pic::MemoryRangeData &mrd) +TQDataStream &operator <<(TQDataStream &s, const Pic::MemoryRangeData &mrd) { - s << Q_UINT8(mrd.properties) << mrd.start << mrd.end << mrd.hexFileOffset; + s << TQ_UINT8(mrd.properties) << mrd.start << mrd.end << mrd.hexFileOffset; return s; } -QDataStream &operator >>(QDataStream &s, Pic::MemoryRangeData &mrd) +TQDataStream &operator >>(TQDataStream &s, Pic::MemoryRangeData &mrd) { - Q_UINT8 properties; + TQ_UINT8 properties; s >> properties >> mrd.start >> mrd.end >> mrd.hexFileOffset; mrd.properties = Pic::MemoryRangeProperties(properties); return s; } -QDataStream &operator <<(QDataStream &s, const Pic::Checksum::Data &cd) +TQDataStream &operator <<(TQDataStream &s, const Pic::Checksum::Data &cd) { s << cd.constant << cd.bbsize << cd.algorithm << cd.protectedMaskNames; s << cd.blankChecksum << cd.checkChecksum; return s; } -QDataStream &operator >>(QDataStream &s, Pic::Checksum::Data &cd) +TQDataStream &operator >>(TQDataStream &s, Pic::Checksum::Data &cd) { s >> cd.constant >> cd.bbsize >> cd.algorithm >> cd.protectedMaskNames; s >> cd.blankChecksum >> cd.checkChecksum; return s; } -QDataStream &operator <<(QDataStream &s, const Pic::CalibrationData &cd) +TQDataStream &operator <<(TQDataStream &s, const Pic::CalibrationData &cd) { s << cd.opcode << cd.opcodeMask; return s; } -QDataStream &operator >>(QDataStream &s, Pic::CalibrationData &cd) +TQDataStream &operator >>(TQDataStream &s, Pic::CalibrationData &cd) { s >> cd.opcode >> cd.opcodeMask; return s; } -QDataStream &Pic::operator <<(QDataStream &s, const Pic::Data &data) +TQDataStream &Pic::operator <<(TQDataStream &s, const Pic::Data &data) { s << static_cast(data); s << data._architecture << data._ids << data._nbBitsPC; @@ -410,7 +410,7 @@ QDataStream &Pic::operator <<(QDataStream &s, const Pic::Data &data) s << data._selfWrite; return s; } -QDataStream &Pic::operator >>(QDataStream &s, Pic::Data &data) +TQDataStream &Pic::operator >>(TQDataStream &s, Pic::Data &data) { s >> static_cast(data); s >> data._architecture >> data._ids >> data._nbBitsPC; diff --git a/src/devices/pic/base/pic.h b/src/devices/pic/base/pic.h index 7b0dfc4..17fb96a 100644 --- a/src/devices/pic/base/pic.h +++ b/src/devices/pic/base/pic.h @@ -9,8 +9,8 @@ #ifndef PIC_H #define PIC_H -#include -#include +#include +#include #include "common/global/global.h" #include "common/common/bitvalue.h" @@ -38,8 +38,8 @@ struct CalibrationData { }; enum MemoryRangeTypeProperty { ReadOnly = 0, Writable = 1 }; -Q_DECLARE_FLAGS(MemoryRangeTypeProperties, MemoryRangeTypeProperty) -Q_DECLARE_OPERATORS_FOR_FLAGS(MemoryRangeTypeProperties) +TQ_DECLARE_FLAGS(MemoryRangeTypeProperties, MemoryRangeTypeProperty) +TQ_DECLARE_OPERATORS_FOR_FLAGS(MemoryRangeTypeProperties) struct MemoryRangeTypeData { const char *key, *label; MemoryRangeTypeProperties properties; @@ -73,8 +73,8 @@ BEGIN_DECLARE_ENUM(Architecture) END_DECLARE_ENUM(Architecture, ArchitectureData) enum MemoryRangeProperty { NotPresent = 0, Present = 1, Programmable = 2 }; -Q_DECLARE_FLAGS(MemoryRangeProperties, MemoryRangeProperty) -Q_DECLARE_OPERATORS_FOR_FLAGS(MemoryRangeProperties) +TQ_DECLARE_FLAGS(MemoryRangeProperties, MemoryRangeProperty) +TQ_DECLARE_OPERATORS_FOR_FLAGS(MemoryRangeProperties) struct MemoryRangeData { MemoryRangeProperties properties; Address start, end; @@ -90,8 +90,8 @@ namespace Checksum public: BitValue constant; Algorithm algorithm; - QStringList protectedMaskNames; - QString bbsize; + TQStringList protectedMaskNames; + TQString bbsize; BitValue blankChecksum, checkChecksum; }; } // namespace @@ -107,8 +107,8 @@ class Data : public Device::Data public: Data(); virtual ~Data(); - virtual QString fname(Device::Special special) const; - virtual QString listViewGroup() const { return _architecture.label(); } + virtual TQString fname(Device::Special special) const; + virtual TQString listViewGroup() const { return _architecture.label(); } bool isPresent(MemoryRangeType type) const { return (range(type).properties & Present); } bool isReadable(MemoryRangeType type) const; bool isWritable(MemoryRangeType type) const; @@ -121,7 +121,7 @@ public: uint nbBitsWord(MemoryRangeType type) const { return _architecture.data().nbBits[type.type()]; } uint nbBytesWord(MemoryRangeType type) const { return nbBitsToNbBytes(nbBitsWord(type)); } uint nbCharsWord(MemoryRangeType type) const { return nbBitsToNbChars(nbBitsWord(type)); } - BitValue mask(MemoryRangeType type) const { return uint(1 << nbBitsWord(type))-1; } + BitValue tqmask(MemoryRangeType type) const { return uint(1 << nbBitsWord(type))-1; } BitValue userIdRecommendedMask() const { return _userIdRecommendedMask; } const Config &config() const { return *_config; } Architecture architecture() const { return _architecture; } @@ -129,11 +129,11 @@ public: bool is16bitFamily() const { return ( _architecture.data().nbBitsRegister==16 ); } VoltageData voltage(ProgVoltageType type) const { return _voltages[type]; } virtual bool canWriteCalibration() const { return isWritable(MemoryRangeType::Cal); } - bool checkCalibration(const Device::Array &data, QString *message = 0) const; - const QMap ids() const { return _ids; } + bool checkCalibration(const Device::Array &data, TQString *message = 0) const; + const TQMap ids() const { return _ids; } virtual bool matchId(BitValue rawId, Device::IdData &data) const; - QStringList idNames(const QMap &ids) const; - const QMap checksums() const { return _checksums; } + TQStringList idNames(const TQMap &ids) const; + const TQMap checksums() const { return _checksums; } const RegistersData ®istersData() const; const CalibrationData &calibrationData() const { return _calibration; } @@ -144,36 +144,36 @@ public: private: Architecture _architecture; - QMap _ids; + TQMap _ids; uint _nbBitsPC; uint _nbWordsCodeWrite; // #### only for 18F/18J devices [0 for other devices] uint _nbWordsCodeRowErase; // #### only for 18F/18J devices [0 for other devices or if not available] - QMap _voltages; - QMap _ranges; + TQMap _voltages; + TQMap _ranges; BitValue _userIdRecommendedMask; Config *_config; - QMap _checksums; + TQMap _checksums; CalibrationData _calibration; SelfWrite _selfWrite; friend class XmlToData; friend class Group; - friend QDataStream &operator <<(QDataStream &s, const Data &data); - friend QDataStream &operator >>(QDataStream &s, Data &data); + friend TQDataStream &operator <<(TQDataStream &s, const Data &data); + friend TQDataStream &operator >>(TQDataStream &s, Data &data); }; -QDataStream &operator <<(QDataStream &s, const Data &data); -QDataStream &operator >>(QDataStream &s, Data &data); +TQDataStream &operator <<(TQDataStream &s, const Data &data); +TQDataStream &operator >>(TQDataStream &s, Data &data); } // namespace -QDataStream &operator <<(QDataStream &s, const Pic::VoltageData &vd); -QDataStream &operator >>(QDataStream &s, Pic::VoltageData &vd); -QDataStream &operator <<(QDataStream &s, const Pic::MemoryRangeData &mrd); -QDataStream &operator >>(QDataStream &s, Pic::MemoryRangeData &mrd); -QDataStream &operator <<(QDataStream &s, const Pic::Checksum::Data &cd); -QDataStream &operator >>(QDataStream &s, Pic::Checksum::Data &cd); -QDataStream &operator <<(QDataStream &s, const Pic::CalibrationData &cd); -QDataStream &operator >>(QDataStream &s, Pic::CalibrationData &cd); +TQDataStream &operator <<(TQDataStream &s, const Pic::VoltageData &vd); +TQDataStream &operator >>(TQDataStream &s, Pic::VoltageData &vd); +TQDataStream &operator <<(TQDataStream &s, const Pic::MemoryRangeData &mrd); +TQDataStream &operator >>(TQDataStream &s, Pic::MemoryRangeData &mrd); +TQDataStream &operator <<(TQDataStream &s, const Pic::Checksum::Data &cd); +TQDataStream &operator >>(TQDataStream &s, Pic::Checksum::Data &cd); +TQDataStream &operator <<(TQDataStream &s, const Pic::CalibrationData &cd); +TQDataStream &operator >>(TQDataStream &s, Pic::CalibrationData &cd); #endif diff --git a/src/devices/pic/base/pic_config.cpp b/src/devices/pic/base/pic_config.cpp index 6672794..811a38e 100644 --- a/src/devices/pic/base/pic_config.cpp +++ b/src/devices/pic/base/pic_config.cpp @@ -8,7 +8,7 @@ ***************************************************************************/ #include "pic_config.h" -#include +#include const Pic::ConfigNameType::Data Pic::ConfigNameType::DATA[Nb_Types] = { { "cname", 0 }, @@ -218,8 +218,8 @@ const Pic::Config::Data Pic::Config::DATA[] = { { "20BIT", I18N_NOOP("20-bit external bus") }, { 0, 0 } } }, { { "EASHFT", I18N_NOOP("External address bus shift") }, Toggle, { { 0, 0 } } }, { { "MSSPSEL", I18N_NOOP("MSSP address select bit") }, Fixed, { - { "7BIT", I18N_NOOP("7-bit address mask mode") }, - { "5BIT", I18N_NOOP("5-bit address mask mode") }, { 0, 0 } } }, + { "7BIT", I18N_NOOP("7-bit address tqmask mode") }, + { "5BIT", I18N_NOOP("5-bit address tqmask mode") }, { 0, 0 } } }, { { "PMPMX", I18N_NOOP("PMP pin select bit") }, Fixed, { { "Connected", I18N_NOOP("Connected to EMB") }, { "NotConnected", I18N_NOOP("Not connected to EMB") }, { 0, 0 } } }, @@ -280,60 +280,60 @@ const Pic::Config::Data Pic::Config::DATA[] = { { { 0, 0 }, Fixed, { { 0, 0 } } } }; -QMap *Pic::Config::_masks = 0; -QMap &Pic::Config::masks() +TQMap *Pic::Config::_tqmasks = 0; +TQMap &Pic::Config::tqmasks() { - if ( _masks==0 ) { - _masks = new QMap; - for (uint i=0; DATA[i].mask.name; i++) { - (*_masks)[DATA[i].mask.name] = MapData(i, -1); + if ( _tqmasks==0 ) { + _tqmasks = new TQMap; + for (uint i=0; DATA[i].tqmask.name; i++) { + (*_tqmasks)[DATA[i].tqmask.name] = MapData(i, -1); if ( DATA[i].type==MemoryRange ) { for (uint k=0; k=0 ) return i18n("%1 for block %2").arg(s).arg(mp.block); + const MapData &mp = tqmasks()[tqmask]; + TQString s = i18n(DATA[mp.index].tqmask.label); + if ( mp.block>=0 ) return i18n("%1 for block %2").tqarg(s).tqarg(mp.block); return s; } -const Pic::Config::Mask *Pic::Config::findMask(const QString &mask, uint *wordIndex) const +const Pic::Config::Mask *Pic::Config::findMask(const TQString &tqmask, uint *wordIndex) const { for (uint i=0; ivalues.count()); i++) - if ( cmask->values[i].name==value ) return &cmask->values[i]; + const Mask *ctqmask = findMask(tqmask); + if ( ctqmask==0 ) return 0; + for (uint i=0; ivalues.count()); i++) + if ( ctqmask->values[i].name==value ) return &ctqmask->values[i]; return 0; } -bool Pic::Config::checkValueName(const QString &mask, const QString &name) const +bool Pic::Config::checkValueName(const TQString &tqmask, const TQString &name) const { - const Data &data = DATA[masks()[mask].index]; - QString pinRegexp = "[A-Z]+\\d*(/[A-Z]+\\d*)?"; + const Data &data = DATA[tqmasks()[tqmask].index]; + TQString pinRegexp = "[A-Z]+\\d*(/[A-Z]+\\d*)?"; switch (data.type) { case Fixed: break; case ValueDouble: { @@ -349,7 +349,7 @@ bool Pic::Config::checkValueName(const QString &mask, const QString &name) const break; } case Ratio: { - QRegExp regexp("(\\d+):(\\d+)"); + TQRegExp regexp("(\\d+):(\\d+)"); if ( regexp.exactMatch(name) ) { bool ok1, ok2; (void)regexp.cap(1).toUInt(&ok1); @@ -359,17 +359,17 @@ bool Pic::Config::checkValueName(const QString &mask, const QString &name) const break; } case MemoryRange: - return _protection.checkRange(mask, name); + return _protection.checkRange(tqmask, name); case Toggle: if ( name=="On" || name=="Off" ) return true; break; case Pin: { - QRegExp regexp(pinRegexp); + TQRegExp regexp(pinRegexp); if ( regexp.exactMatch(name) ) return true; break; } case Pins: { - QRegExp regexp(pinRegexp + "(, " + pinRegexp + ")+"); + TQRegExp regexp(pinRegexp + "(, " + pinRegexp + ")+"); if ( regexp.exactMatch(name) ) return true; break; } @@ -379,9 +379,9 @@ bool Pic::Config::checkValueName(const QString &mask, const QString &name) const return false; } -QString Pic::Config::valueLabel(const QString &mask, const QString &name) +TQString Pic::Config::valueLabel(const TQString &tqmask, const TQString &name) { - const Data &data = DATA[masks()[mask].index]; + const Data &data = DATA[tqmasks()[tqmask].index]; switch (data.type) { case Fixed: case ValueDouble: @@ -405,51 +405,51 @@ QString Pic::Config::valueLabel(const QString &mask, const QString &name) BitValue Pic::Config::Word::usedMask() const { - BitValue mask = 0x0; - for (uint i=0; i>(QDataStream &s, Config::Value &value) +TQDataStream &Pic::operator >>(TQDataStream &s, Config::Value &value) { s >> value.name >> value.configNames >> value.value; return s; } -QDataStream &Pic::operator <<(QDataStream &s, const Config::Mask &mask) +TQDataStream &Pic::operator <<(TQDataStream &s, const Config::Mask &tqmask) { - s << mask.name << mask.value << mask.values; + s << tqmask.name << tqmask.value << tqmask.values; return s; } -QDataStream &Pic::operator >>(QDataStream &s, Config::Mask &mask) +TQDataStream &Pic::operator >>(TQDataStream &s, Config::Mask &tqmask) { - s >> mask.name >> mask.value >> mask.values; + s >> tqmask.name >> tqmask.value >> tqmask.values; return s; } -QDataStream &Pic::operator <<(QDataStream &s, const Config::Word &word) +TQDataStream &Pic::operator <<(TQDataStream &s, const Config::Word &word) { - s << word.name << word.ignoredCNames << word.wmask << word.pmask << word.cmask << word.bvalue << word.masks; + s << word.name << word.ignoredCNames << word.wtqmask << word.ptqmask << word.ctqmask << word.bvalue << word.tqmasks; return s; } -QDataStream &Pic::operator >>(QDataStream &s, Config::Word &word) +TQDataStream &Pic::operator >>(TQDataStream &s, Config::Word &word) { - s >> word.name >> word.ignoredCNames >> word.wmask >> word.pmask >> word.cmask >> word.bvalue >> word.masks; + s >> word.name >> word.ignoredCNames >> word.wtqmask >> word.ptqmask >> word.ctqmask >> word.bvalue >> word.tqmasks; return s; } -QDataStream &Pic::operator <<(QDataStream &s, const Config &config) +TQDataStream &Pic::operator <<(TQDataStream &s, const Config &config) { s << config._words; return s; } -QDataStream &Pic::operator >>(QDataStream &s, Config &config) +TQDataStream &Pic::operator >>(TQDataStream &s, Config &config) { s >> config._words; return s; diff --git a/src/devices/pic/base/pic_config.h b/src/devices/pic/base/pic_config.h index 185a19e..67c0b1c 100644 --- a/src/devices/pic/base/pic_config.h +++ b/src/devices/pic/base/pic_config.h @@ -9,8 +9,8 @@ #ifndef PIC_CONFIG_H #define PIC_CONFIG_H -#include -#include +#include +#include #include "common/common/bitvalue.h" #include "pic_protection.h" @@ -29,8 +29,8 @@ class Config public: class Value { public: - QString name; - QMap configNames; + TQString name; + TQMap configNames; BitValue value; bool operator <(const Value &cv) const { return value values; // ordered from lower to higher + TQValueVector values; // ordered from lower to higher bool operator <(const Mask &cm) const { return value masks; // ordered from lower to higher + TQValueVector tqmasks; // ordered from lower to higher BitValue usedMask() const; }; public: Config(const Pic::Data &data) : _data(data), _protection(data, *this) {} - QValueVector _words; + TQValueVector _words; const Protection &protection() const { return _protection; } - const Value *findValue(const QString &mask, const QString &value) const; - const Mask *findMask(const QString &mask, uint *wordIndex = 0) const; - static bool hasMaskName(const QString &mask); - static QString maskLabel(const QString &mask); - bool checkValueName(const QString &mask, const QString &name) const; - static QString valueLabel(const QString &mask, const QString &name); + const Value *findValue(const TQString &tqmask, const TQString &value) const; + const Mask *findMask(const TQString &tqmask, uint *wordIndex = 0) const; + static bool hasMaskName(const TQString &tqmask); + static TQString tqmaskLabel(const TQString &tqmask); + bool checkValueName(const TQString &tqmask, const TQString &name) const; + static TQString valueLabel(const TQString &tqmask, const TQString &name); private: class MapData { @@ -73,8 +73,8 @@ private: MapData(int i, int b) : index(i), block(b) {} int index, block; }; - static QMap &masks(); - static QMap *_masks; // mask name -> index in DATA + static TQMap &tqmasks(); + static TQMap *_tqmasks; // tqmask name -> index in DATA struct NameData { const char *name, *label; @@ -82,7 +82,7 @@ private: enum Type { Fixed, ValueDouble, ValueUInt, Ratio, MemoryRange, Toggle, Pin, Pins }; class Data { public: - const NameData mask; + const NameData tqmask; Type type; const NameData values[50]; }; @@ -93,14 +93,14 @@ private: Protection _protection; }; -QDataStream &operator <<(QDataStream &s, const Config::Value &value); -QDataStream &operator >>(QDataStream &s, Config::Value &value); -QDataStream &operator <<(QDataStream &s, const Config::Mask &mask); -QDataStream &operator >>(QDataStream &s, Config::Mask &mask); -QDataStream &operator <<(QDataStream &s, const Config::Word &word); -QDataStream &operator >>(QDataStream &s, Config::Word &word); -QDataStream &operator <<(QDataStream &s, const Config &config); -QDataStream &operator >>(QDataStream &s, Config &config); +TQDataStream &operator <<(TQDataStream &s, const Config::Value &value); +TQDataStream &operator >>(TQDataStream &s, Config::Value &value); +TQDataStream &operator <<(TQDataStream &s, const Config::Mask &tqmask); +TQDataStream &operator >>(TQDataStream &s, Config::Mask &tqmask); +TQDataStream &operator <<(TQDataStream &s, const Config::Word &word); +TQDataStream &operator >>(TQDataStream &s, Config::Word &word); +TQDataStream &operator <<(TQDataStream &s, const Config &config); +TQDataStream &operator >>(TQDataStream &s, Config &config); } //namespace diff --git a/src/devices/pic/base/pic_protection.cpp b/src/devices/pic/base/pic_protection.cpp index da77881..7af925c 100644 --- a/src/devices/pic/base/pic_protection.cpp +++ b/src/devices/pic/base/pic_protection.cpp @@ -10,16 +10,16 @@ #include "pic_config.h" -#include +#include -bool Pic::Protection::isNoneProtectedValueName(const QString &name) const +bool Pic::Protection::isNoneProtectedValueName(const TQString &name) const { if ( name=="Off" ) return true; if ( _data.architecture()==Architecture::P17C ) return !isAllProtectedValueName(name); return false; } -bool Pic::Protection::isAllProtectedValueName(const QString &name) const +bool Pic::Protection::isAllProtectedValueName(const TQString &name) const { if ( name=="All" ) return true; if ( _data.architecture()==Architecture::P17C ) return ( name=="Code-protected microcontroller" ); @@ -29,13 +29,13 @@ bool Pic::Protection::isAllProtectedValueName(const QString &name) const Pic::Protection::Family Pic::Protection::family() const { if ( _config.findMask("WRTBS") ) return CodeGuard; - QString mask = maskName(ProgramProtected, MemoryRangeType::Code); - if ( _config.findMask(QString("%1_%2").arg(mask).arg(0)) ) return BlockProtection; - if ( _config.findMask(mask) ) return BasicProtection; + TQString tqmask = tqmaskName(ProgramProtected, MemoryRangeType::Code); + if ( _config.findMask(TQString("%1_%2").tqarg(tqmask).tqarg(0)) ) return BlockProtection; + if ( _config.findMask(tqmask) ) return BasicProtection; return NoProtection; } -QString Pic::Protection::securityValueName(Type type) const +TQString Pic::Protection::securityValueName(Type type) const { if ( type==StandardSecurity ) return "Standard Security"; if ( type==HighSecurity ) return "High Security"; @@ -43,12 +43,12 @@ QString Pic::Protection::securityValueName(Type type) const return "Off"; } -QString Pic::Protection::bootSizeMaskName() const +TQString Pic::Protection::bootSizeMaskName() const { return (family()==CodeGuard ? "BSSIZ" : "BBSIZ"); } -QString Pic::Protection::bootMaskName(Type type) const +TQString Pic::Protection::bootMaskName(Type type) const { Q_ASSERT( type!=Nb_Types ); if ( family()==CodeGuard ) { @@ -59,10 +59,10 @@ QString Pic::Protection::bootMaskName(Type type) const if ( type==WriteProtected ) return "WRTB"; if ( type==ReadProtected ) return "EBTRB"; } - return QString::null; + return TQString(); } -QString Pic::Protection::blockSizeMaskName(uint block) const +TQString Pic::Protection::blockSizeMaskName(uint block) const { if ( family()==CodeGuard ) { Q_ASSERT( block==0 ); @@ -71,18 +71,18 @@ QString Pic::Protection::blockSizeMaskName(uint block) const return blockMaskName(ProgramProtected, block); } -QString Pic::Protection::blockMaskName(Type type, uint block) const +TQString Pic::Protection::blockMaskName(Type type, uint block) const { Q_ASSERT( type!=Nb_Types ); if ( family()==CodeGuard ) { if ( type==WriteProtected ) return (block==0 ? "WRTSS" : "WRTGS"); if ( type==StandardSecurity || type==HighSecurity ) return (block==0 ? "SSSEC" : "GSSEC"); - return QString::null; + return TQString(); } - return QString("%1_%2").arg(maskName(type, MemoryRangeType::Code)).arg(block); + return TQString("%1_%2").tqarg(tqmaskName(type, MemoryRangeType::Code)).tqarg(block); } -QString Pic::Protection::maskName(Type type, MemoryRangeType mtype) const +TQString Pic::Protection::tqmaskName(Type type, MemoryRangeType mtype) const { Q_ASSERT( type!=Nb_Types ); switch (mtype.type()) { @@ -112,13 +112,13 @@ QString Pic::Protection::maskName(Type type, MemoryRangeType mtype) const case MemoryRangeType::Nb_Types: Q_ASSERT(false); break; default: break; } - return QString::null; + return TQString(); } -bool Pic::Protection::extractRanges(const QString &name, QValueVector
&starts, Address &end, bool &ok) +bool Pic::Protection::extractRanges(const TQString &name, TQValueVector
&starts, Address &end, bool &ok) { ok = false; - QRegExp regexp("([A-F0-9]+)(/[A-F0-9]+)?(/[A-F0-9]+)?:([A-F0-9]+)"); + TQRegExp regexp("([A-F0-9]+)(/[A-F0-9]+)?(/[A-F0-9]+)?:([A-F0-9]+)"); if ( !regexp.exactMatch(name) ) return false; bool ok1; end = fromHex(regexp.cap(regexp.numCaptures()), &ok1); @@ -130,7 +130,7 @@ bool Pic::Protection::extractRanges(const QString &name, QValueVector
& for (int i=1; i & return true; } -AddressRangeVector Pic::Protection::extractRanges(const QString &name, MemoryRangeType type) const +AddressRangeVector Pic::Protection::extractRanges(const TQString &name, MemoryRangeType type) const { if ( isNoneProtectedValueName(name) ) return AddressRange(); if ( isAllProtectedValueName(name) ) { @@ -154,7 +154,7 @@ AddressRangeVector Pic::Protection::extractRanges(const QString &name, MemoryRan return AddressRange(rdata.start, rdata.end); } bool ok1; - QValueVector
starts; + TQValueVector
starts; Address end; bool ok2 = extractRanges(name, starts, end, ok1); Q_ASSERT(ok1); @@ -165,11 +165,11 @@ AddressRangeVector Pic::Protection::extractRanges(const QString &name, MemoryRan return rv; } -bool Pic::Protection::checkRange(const QString &mask, const QString &name) const +bool Pic::Protection::checkRange(const TQString &tqmask, const TQString &name) const { if ( family()!=CodeGuard ) { bool ok; - (void)extractRange(mask, name, ok); + (void)extractRange(tqmask, name, ok); return ok; } @@ -180,8 +180,8 @@ bool Pic::Protection::checkRange(const QString &mask, const QString &name) const isBootBlock = ( i==0 ); block = i - 1; for (uint k=0; kvalues.count()); k++) { + for (uint k=0; kvalues.count()); k++) { bool ok1; - uint size = bsmask->values[k].name.toUInt(&ok1); + uint size = bstqmask->values[k].name.toUInt(&ok1); if ( !ok1 ) { qDebug("Could not recognize boot size value"); return pr; @@ -277,7 +277,7 @@ Pic::Protection::ProtectedRange Pic::Protection::extractRange(const QString &mas ok = true; return pr; } - if ( isBootBlock && bsmask ) { + if ( isBootBlock && bstqmask ) { qDebug("Protected range should not be explicit when boot size is present"); return pr; } @@ -294,7 +294,7 @@ Pic::Protection::ProtectedRange Pic::Protection::extractRange(const QString &mas qDebug("End is beyond memory range"); return pr; } - if ( (rtype!=MemoryRangeType::Code || isBootBlock) && (pr.starts.count()>1 || !rexp.cap(2).isEmpty() || bmask==0) ) { + if ( (rtype!=MemoryRangeType::Code || isBootBlock) && (pr.starts.count()>1 || !rexp.cap(2).isEmpty() || btqmask==0) ) { qDebug("Only code with blocks and boot can have multiple protected ranges"); return pr; } @@ -306,14 +306,14 @@ Pic::Protection::ProtectedRange Pic::Protection::extractRange(const QString &mas // check with boot block if ( pr.starts.count()>1 ) { - if ( bmask==0 ) { - qDebug("No boot mask"); + if ( btqmask==0 ) { + qDebug("No boot tqmask"); return pr; } - for (uint i=0; ivalues.count()); i++) { - if ( bmask->values[i].name=="Off" ) continue; + for (uint i=0; ivalues.count()); i++) { + if ( btqmask->values[i].name=="Off" ) continue; bool ok1; - ProtectedRange bpr = extractRange(bmask->name, bmask->values[i].name, ok1); + ProtectedRange bpr = extractRange(btqmask->name, btqmask->values[i].name, ok1); if ( !ok1 ) return pr; if ( bpr.ends.count()!=pr.starts.count() ) { qDebug("Boot number of ends (%i) should be the same as code number of starts (%i)", int(bpr.ends.count()), int(pr.starts.count())); @@ -341,21 +341,21 @@ uint Pic::Protection::nbBlocks() const { if ( family()==CodeGuard ) return 2; // codeguard : secure segment + general segment for (uint i=0; i &starts, Address &end, bool &ok); + static bool extractRanges(const TQString &name, TQValueVector
&starts, Address &end, bool &ok); class ProtectedRange { public: - QValueVector
starts, ends; + TQValueVector
starts, ends; }; - ProtectedRange extractRange(const QString &mask, const QString &name, bool &ok) const; + ProtectedRange extractRange(const TQString &tqmask, const TQString &name, bool &ok) const; }; } //namespace diff --git a/src/devices/pic/base/pic_register.cpp b/src/devices/pic/base/pic_register.cpp index fcfe5ef..b5dc616 100644 --- a/src/devices/pic/base/pic_register.cpp +++ b/src/devices/pic/base/pic_register.cpp @@ -28,7 +28,7 @@ Address Pic::RegistersData::mirroredAddress(Address address) const } if ( delta==-1 ) continue; for (uint k=0; k::const_iterator it; + TQMap::const_iterator it; for (it=sfrs.begin(); it!=sfrs.end(); ++it) { if ( it.data().address!=address ) continue; for (uint i=0; i"; case Sfr: return sfrNames[address]; } Q_ASSERT(false); - return QString::null; + return TQString(); } bool Pic::RegistersData::hasPort(uint index) const { Q_ASSERT( index Pic::RegistersData::relatedRegisters(const Register::TypeData &data) const +TQValueList Pic::RegistersData::relatedRegisters(const Register::TypeData &data) const { - QValueList list; + TQValueList list; if ( data.type()==Register::Regular ) { int i = portIndex(data.address()); if ( i==-1 ) list.append(data); @@ -185,7 +185,7 @@ bool Pic::RegistersData::bankHasSfrs(uint i) const if ( i==0 ) return true; if ( (_data.architecture()==Pic::Architecture::P18F || _data.architecture()==Pic::Architecture::P18J) && i==15 ) return true; if ( !isBankUsed(i) ) return false; - QMap::const_iterator it; + TQMap::const_iterator it; for (it=sfrNames.begin(); it!=sfrNames.end(); ++it) if ( bankFromAddress(it.key())==i ) return true; return false; @@ -220,25 +220,25 @@ uint Pic::RegistersData::firstGprIndex() const } //---------------------------------------------------------------------------- -QDataStream &Pic::operator <<(QDataStream &s, const RangeData &rd) +TQDataStream &Pic::operator <<(TQDataStream &s, const RangeData &rd) { s << rd.start << rd.length; return s; } -QDataStream &Pic::operator >>(QDataStream &s, RangeData &rd) +TQDataStream &Pic::operator >>(TQDataStream &s, RangeData &rd) { s >> rd.start >> rd.length; return s; } -QDataStream &Pic::operator <<(QDataStream &s, const RegisterBitData &rbd) +TQDataStream &Pic::operator <<(TQDataStream &s, const RegisterBitData &rbd) { - s << Q_UINT8(rbd.properties) << Q_UINT8(rbd.por) << Q_UINT8(rbd.mclr); + s << TQ_UINT8(rbd.properties) << TQ_UINT8(rbd.por) << TQ_UINT8(rbd.mclr); return s; } -QDataStream &Pic::operator >>(QDataStream &s, RegisterBitData &rbd) +TQDataStream &Pic::operator >>(TQDataStream &s, RegisterBitData &rbd) { - Q_UINT8 properties, por, mclr; + TQ_UINT8 properties, por, mclr; s >> properties >> por >> mclr; rbd.properties = RegisterBitProperties(properties); rbd.por = RegisterBitState(por); @@ -246,42 +246,42 @@ QDataStream &Pic::operator >>(QDataStream &s, RegisterBitData &rbd) return s; } -QDataStream &Pic::operator <<(QDataStream &s, const RegisterData &rd) +TQDataStream &Pic::operator <<(TQDataStream &s, const RegisterData &rd) { s << rd.address; for (int i=0; i>(QDataStream &s, RegisterData &rd) +TQDataStream &Pic::operator >>(TQDataStream &s, RegisterData &rd) { s >> rd.address; for (int i=0; i> rd.bits[i]; return s; } -QDataStream &Pic::operator <<(QDataStream &s, const CombinedData &rd) +TQDataStream &Pic::operator <<(TQDataStream &s, const CombinedData &rd) { s << rd.address << rd.nbChars; return s; } -QDataStream &Pic::operator >>(QDataStream &s, CombinedData &rd) +TQDataStream &Pic::operator >>(TQDataStream &s, CombinedData &rd) { s >> rd.address >> rd.nbChars; return s; } -QDataStream &Pic::operator <<(QDataStream &s, const RegistersData &rd) +TQDataStream &Pic::operator <<(TQDataStream &s, const RegistersData &rd) { s << rd.nbBanks << rd.accessBankSplit << rd.unusedBankMask; s << rd.sfrs << rd.mirrored << rd.unused << rd.combined; return s; } -QDataStream &Pic::operator >>(QDataStream &s, RegistersData &rd) +TQDataStream &Pic::operator >>(TQDataStream &s, RegistersData &rd) { s >> rd.nbBanks >> rd.accessBankSplit >> rd.unusedBankMask; s >> rd.sfrs >> rd.mirrored >> rd.unused >> rd.combined; rd.sfrNames.clear(); - QMap::const_iterator it; + TQMap::const_iterator it; for(it=rd.sfrs.begin(); it!=rd.sfrs.end(); ++it) rd.sfrNames[it.data().address] = it.key(); return s; } diff --git a/src/devices/pic/base/pic_register.h b/src/devices/pic/base/pic_register.h index 41da020..bb12657 100644 --- a/src/devices/pic/base/pic_register.h +++ b/src/devices/pic/base/pic_register.h @@ -9,7 +9,7 @@ #ifndef PIC_REGISTER_H #define PIC_REGISTER_H -#include +#include #include "devices/base/register.h" #include "pic.h" @@ -29,8 +29,8 @@ enum RegisterBitProperty { RegisterBitUnused = 0x0, RegisterBitOnlySoftwareClear = 0x4, RegisterBitOnlySoftwareSet = 0x8, MaxRegisterBitProperty = 0x15 }; -Q_DECLARE_FLAGS(RegisterBitProperties, RegisterBitProperty) -Q_DECLARE_OPERATORS_FOR_FLAGS(RegisterBitProperties) +TQ_DECLARE_FLAGS(RegisterBitProperties, RegisterBitProperty) +TQ_DECLARE_OPERATORS_FOR_FLAGS(RegisterBitProperties) enum RegisterBitState { RegisterBitUnknown = 0, RegisterBitLow, RegisterBitHigh, RegisterBitUnchanged, RegisterBitDepends, RegisterBitDependsConfig, Nb_RegisterBitStates }; @@ -72,26 +72,26 @@ public: uint firstGprIndex() const; // in first bank uint nbBanks, accessBankSplit, unusedBankMask; - QMap sfrs; - QMap sfrNames; // address -> name - QValueVector > mirrored; - QValueVector unused; - QMap combined; + TQMap sfrs; + TQMap sfrNames; // address -> name + TQValueVector > mirrored; + TQValueVector unused; + TQMap combined; virtual Device::RegisterProperties properties(Address address) const; RegisterType type(Address address) const; - QString label(Address address) const; - virtual QValueList relatedRegisters(const Register::TypeData &data) const; + TQString label(Address address) const; + virtual TQValueList relatedRegisters(const Register::TypeData &data) const; virtual bool hasPort(uint index) const; virtual int portIndex(Address address) const; - virtual QString portName(uint index) const; + virtual TQString portName(uint index) const; bool hasTris(uint index) const; - QString trisName(uint index) const; + TQString trisName(uint index) const; bool hasLatch(uint index) const; - QString latchName(uint index) const; + TQString latchName(uint index) const; virtual bool hasPortBit(uint index, uint bit) const; - virtual QString portBitName(uint index, uint bit) const; + virtual TQString portBitName(uint index, uint bit) const; private: const Data &_data; @@ -99,16 +99,16 @@ private: }; //----------------------------------------------------------------------------- -QDataStream &operator <<(QDataStream &s, const RangeData &rd); -QDataStream &operator >>(QDataStream &s, RangeData &rd); -QDataStream &operator <<(QDataStream &s, const RegisterBitData &rbd); -QDataStream &operator >>(QDataStream &s, RegisterBitData &rbd); -QDataStream &operator <<(QDataStream &s, const RegisterData &rd); -QDataStream &operator >>(QDataStream &s, RegisterData &rd); -QDataStream &operator <<(QDataStream &s, const CombinedData &rd); -QDataStream &operator >>(QDataStream &s, CombinedData &rd); -QDataStream &operator <<(QDataStream &s, const RegistersData &rd); -QDataStream &operator >>(QDataStream &s, RegistersData &rd); +TQDataStream &operator <<(TQDataStream &s, const RangeData &rd); +TQDataStream &operator >>(TQDataStream &s, RangeData &rd); +TQDataStream &operator <<(TQDataStream &s, const RegisterBitData &rbd); +TQDataStream &operator >>(TQDataStream &s, RegisterBitData &rbd); +TQDataStream &operator <<(TQDataStream &s, const RegisterData &rd); +TQDataStream &operator >>(TQDataStream &s, RegisterData &rd); +TQDataStream &operator <<(TQDataStream &s, const CombinedData &rd); +TQDataStream &operator >>(TQDataStream &s, CombinedData &rd); +TQDataStream &operator <<(TQDataStream &s, const RegistersData &rd); +TQDataStream &operator >>(TQDataStream &s, RegistersData &rd); } // namespace diff --git a/src/devices/pic/gui/pic_config_editor.cpp b/src/devices/pic/gui/pic_config_editor.cpp index 1812bbf..5cbb5b1 100644 --- a/src/devices/pic/gui/pic_config_editor.cpp +++ b/src/devices/pic/gui/pic_config_editor.cpp @@ -8,20 +8,20 @@ ***************************************************************************/ #include "pic_config_editor.h" -#include -#include -#include +#include +#include +#include #include "pic_config_word_editor.h" #include "common/common/misc.h" #include "common/gui/misc_gui.h" //---------------------------------------------------------------------------- -Pic::MemoryConfigEditorWidget::MemoryConfigEditorWidget(Memory &memory, bool withWordEditor, QWidget *parent) - : Device::MemoryEditorGroup(&memory, parent, "pic_config_editor_widget"), +Pic::MemoryConfigEditorWidget::MemoryConfigEditorWidget(Memory &memory, bool withWordEditor, TQWidget *tqparent) + : Device::MemoryEditorGroup(&memory, tqparent, "pic_config_editor_widget"), MemoryCaster(MemoryRangeType::Config, memory) { - QHBoxLayout *hb = new QHBoxLayout(_top); + TQHBoxLayout *hb = new TQHBoxLayout(_top); TabWidget *tabw = 0; uint nbWords = device().nbWords(MemoryRangeType::Config); @@ -34,18 +34,18 @@ Pic::MemoryConfigEditorWidget::MemoryConfigEditorWidget(Memory &memory, bool wit for(uint i=0; i1 ) { - page = new QWidget(tabw); + page = new TQWidget(tabw); tabw->addTab(page, device().config()._words[i].name); } else { - page = new QGroupBox(this); + page = new TQGroupBox(this); hb->addWidget(page); } - QVBoxLayout *vbox = new QVBoxLayout(page, 10, 10); - QHBoxLayout *hbox = new QHBoxLayout(vbox); + TQVBoxLayout *vbox = new TQVBoxLayout(page, 10, 10); + TQHBoxLayout *hbox = new TQHBoxLayout(vbox); ConfigWordEditor *we = new ConfigWordEditor(memory, i, withWordEditor, page); addEditor(we); hbox->addWidget(we); @@ -55,8 +55,8 @@ Pic::MemoryConfigEditorWidget::MemoryConfigEditorWidget(Memory &memory, bool wit } //---------------------------------------------------------------------------- -Pic::MemoryConfigEditor::MemoryConfigEditor(const HexView *hexview, Memory &memory, QWidget *parent) - : MemoryTypeEditor(hexview, MemoryRangeType::Config, memory, parent, "pic_config_editor") +Pic::MemoryConfigEditor::MemoryConfigEditor(const HexView *hexview, Memory &memory, TQWidget *tqparent) + : MemoryTypeEditor(hexview, MemoryRangeType::Config, memory, tqparent, "pic_config_editor") {} void Pic::MemoryConfigEditor::init(bool first) diff --git a/src/devices/pic/gui/pic_config_editor.h b/src/devices/pic/gui/pic_config_editor.h index 888debf..d8072ca 100644 --- a/src/devices/pic/gui/pic_config_editor.h +++ b/src/devices/pic/gui/pic_config_editor.h @@ -19,16 +19,18 @@ class HexView; class MemoryConfigEditorWidget : public Device::MemoryEditorGroup, public MemoryCaster { Q_OBJECT + TQ_OBJECT public: - MemoryConfigEditorWidget(Memory &memory, bool withWordEditor, QWidget *parent); + MemoryConfigEditorWidget(Memory &memory, bool withWordEditor, TQWidget *tqparent); }; //---------------------------------------------------------------------------- class MemoryConfigEditor : public MemoryTypeEditor { Q_OBJECT + TQ_OBJECT public: - MemoryConfigEditor(const HexView *hexview, Memory &memory, QWidget *parent); + MemoryConfigEditor(const HexView *hexview, Memory &memory, TQWidget *tqparent); virtual void init(bool first); }; diff --git a/src/devices/pic/gui/pic_config_word_editor.cpp b/src/devices/pic/gui/pic_config_word_editor.cpp index 23e4bce..bfa55e4 100644 --- a/src/devices/pic/gui/pic_config_word_editor.cpp +++ b/src/devices/pic/gui/pic_config_word_editor.cpp @@ -9,17 +9,17 @@ ***************************************************************************/ #include "pic_config_word_editor.h" -#include -#include -#include +#include +#include +#include #include #include "common/common/misc.h" #include "common/gui/misc_gui.h" //---------------------------------------------------------------------------- -Pic::ConfigWordComboBox::ConfigWordComboBox(QWidget *parent) - : ComboBox(parent) +Pic::ConfigWordComboBox::ConfigWordComboBox(TQWidget *tqparent) + : ComboBox(tqparent) { setIgnoreWheelEvent(true); } @@ -38,7 +38,7 @@ void Pic::ConfigWordComboBox::setItem(uint i) if ( _map[l]==i ) setCurrentItem(l); } -void Pic::ConfigWordComboBox::setInvalidItem(uint i, const QString &label) +void Pic::ConfigWordComboBox::setInvalidItem(uint i, const TQString &label) { if ( !isValid() ) changeItem(label, 0); else insertItem(label, 0); @@ -47,98 +47,98 @@ void Pic::ConfigWordComboBox::setInvalidItem(uint i, const QString &label) } //---------------------------------------------------------------------------- -Pic::ConfigWordDialog::ConfigWordDialog(const Memory &memory, uint ci, QWidget *parent) - : Dialog(parent, "config_word_dialog", true, i18n("Config Word Details"), Close, Close, false) +Pic::ConfigWordDialog::ConfigWordDialog(const Memory &memory, uint ci, TQWidget *tqparent) + : Dialog(tqparent, "config_word_dialog", true, i18n("Config Word Details"), Close, Close, false) { uint nbChars = memory.device().nbCharsWord(MemoryRangeType::Config); const Config::Word &cword = memory.device().config()._words[ci]; - QGridLayout *grid = new QGridLayout(mainWidget(), 0, 0, 10, 10); + TQGridLayout *grid = new TQGridLayout(mainWidget(), 0, 0, 10, 10); uint row = 0; - QLabel *label = new QLabel(i18n("Name:"), mainWidget()); + TQLabel *label = new TQLabel(i18n("Name:"), mainWidget()); grid->addWidget(label, row, 0); - label = new QLabel(cword.name, mainWidget()); + label = new TQLabel(cword.name, mainWidget()); grid->addWidget(label, row, 1); row++; - label = new QLabel(i18n("Index:"), mainWidget()); + label = new TQLabel(i18n("Index:"), mainWidget()); grid->addWidget(label, row, 0); - label = new QLabel(QString::number(ci), mainWidget()); + label = new TQLabel(TQString::number(ci), mainWidget()); grid->addWidget(label, row, 1); row++; - label = new QLabel(i18n("Raw Value:"), mainWidget()); + label = new TQLabel(i18n("Raw Value:"), mainWidget()); grid->addWidget(label, row, 0); - label = new QLabel(toHexLabel(memory.word(MemoryRangeType::Config, ci), nbChars), mainWidget()); + label = new TQLabel(toHexLabel(memory.word(MemoryRangeType::Config, ci), nbChars), mainWidget()); grid->addWidget(label, row, 1); row++; - label = new QLabel(i18n("Value:"), mainWidget()); + label = new TQLabel(i18n("Value:"), mainWidget()); grid->addWidget(label, row, 0); - label = new QLabel(toHexLabel(memory.normalizedWord(MemoryRangeType::Config, ci), nbChars), mainWidget()); + label = new TQLabel(toHexLabel(memory.normalizedWord(MemoryRangeType::Config, ci), nbChars), mainWidget()); grid->addWidget(label, row, 1); row++; - label = new QLabel(i18n("Raw Blank Value:"), mainWidget()); + label = new TQLabel(i18n("Raw Blank Value:"), mainWidget()); grid->addWidget(label, row, 0); - label = new QLabel(toHexLabel(cword.bvalue, nbChars), mainWidget()); + label = new TQLabel(toHexLabel(cword.bvalue, nbChars), mainWidget()); grid->addWidget(label, row, 1); row++; - label = new QLabel(i18n("Used Mask:"), mainWidget()); + label = new TQLabel(i18n("Used Mask:"), mainWidget()); grid->addWidget(label, row, 0); - label = new QLabel(toHexLabel(cword.usedMask(), nbChars), mainWidget()); + label = new TQLabel(toHexLabel(cword.usedMask(), nbChars), mainWidget()); grid->addWidget(label, row, 1); row++; - label = new QLabel(i18n("Write Mask:"), mainWidget()); + label = new TQLabel(i18n("Write Mask:"), mainWidget()); grid->addWidget(label, row, 0); - label = new QLabel(toHexLabel(cword.wmask, nbChars), mainWidget()); + label = new TQLabel(toHexLabel(cword.wtqmask, nbChars), mainWidget()); grid->addWidget(label, row, 1); row++; - label = new QLabel(i18n("Protected Mask:"), mainWidget()); + label = new TQLabel(i18n("Protected Mask:"), mainWidget()); grid->addWidget(label, row, 0); - label = new QLabel(toHexLabel(cword.pmask, nbChars), mainWidget()); + label = new TQLabel(toHexLabel(cword.ptqmask, nbChars), mainWidget()); grid->addWidget(label, row, 1); row++; - label = new QLabel(i18n("Checksum Mask:"), mainWidget()); + label = new TQLabel(i18n("Checksum Mask:"), mainWidget()); grid->addWidget(label, row, 0); - label = new QLabel(toHexLabel(cword.cmask, nbChars), mainWidget()); + label = new TQLabel(toHexLabel(cword.ctqmask, nbChars), mainWidget()); grid->addWidget(label, row, 1); row++; } //---------------------------------------------------------------------------- -Pic::ConfigWordEditor::ConfigWordEditor(Memory &memory, uint ci, bool withWordEditor, QWidget *parent) - : MemoryEditor(MemoryRangeType::Config, memory, parent, "pic_config_word_editor"), _configIndex(ci) +Pic::ConfigWordEditor::ConfigWordEditor(Memory &memory, uint ci, bool withWordEditor, TQWidget *tqparent) + : MemoryEditor(MemoryRangeType::Config, memory, tqparent, "pic_config_word_editor"), _configIndex(ci) { if (withWordEditor) { - QHBoxLayout *hbox = new QHBoxLayout(_top); + TQHBoxLayout *hbox = new TQHBoxLayout(_top); _mdb = new MemoryRangeEditor(MemoryRangeType::Config, memory, 1, 1, ci, 1, this); _mdb->init(); - connect(_mdb, SIGNAL(modified()), SIGNAL(modified())); - connect(_mdb, SIGNAL(modified()), SLOT(updateDisplay())); + connect(_mdb, TQT_SIGNAL(modified()), TQT_SIGNAL(modified())); + connect(_mdb, TQT_SIGNAL(modified()), TQT_SLOT(updateDisplay())); hbox->addWidget(_mdb); KPushButton *button = new KPushButton(i18n("Details..."), this); - button->setFixedHeight(button->sizeHint().height()); - connect(button, SIGNAL(clicked()), SLOT(showDialog())); + button->setFixedHeight(button->tqsizeHint().height()); + connect(button, TQT_SIGNAL(clicked()), TQT_SLOT(showDialog())); hbox->addWidget(button); hbox->addStretch(1); } else _mdb = 0; - QGridLayout *grid = new QGridLayout(_top); + TQGridLayout *grid = new TQGridLayout(_top); grid->setColStretch(2, 1); const Config::Word &cword = device().config()._words[ci]; - _combos.resize(cword.masks.count()); + _combos.resize(cword.tqmasks.count()); uint nbChars = device().nbCharsWord(MemoryRangeType::Config); for (uint k=0; k<_combos.count(); k++) { - const Config::Mask &cmask = cword.masks[k]; - QLabel *label = new QLabel(Config::maskLabel(cmask.name) + ":", this); + const Config::Mask &ctqmask = cword.tqmasks[k]; + TQLabel *label = new TQLabel(Config::tqmaskLabel(ctqmask.name) + ":", this); grid->addWidget(label, k, 0); - label = new QLabel(cmask.name, this); + label = new TQLabel(ctqmask.name, this); grid->addWidget(label, k, 1); _combos[k] = new ConfigWordComboBox(this); - for (uint i=0; iappendItem(label, i); } - connect(_combos[k], SIGNAL(activated(int)), SLOT(slotModified())); + connect(_combos[k], TQT_SIGNAL(activated(int)), TQT_SLOT(slotModified())); grid->addWidget(_combos[k], k, 2); } } @@ -148,8 +148,8 @@ void Pic::ConfigWordEditor::setReadOnly(bool readOnly) if (_mdb) _mdb->setReadOnly(readOnly); const Config::Word &cword = device().config()._words[_configIndex]; for (uint k=0; k<_combos.count(); k++) { - const Config::Mask &cmask = cword.masks[k]; - _combos[k]->setEnabled(!readOnly && !cmask.value.isOverlapping(cword.pmask) && cmask.values.count()!=1); + const Config::Mask &ctqmask = cword.tqmasks[k]; + _combos[k]->setEnabled(!readOnly && !ctqmask.value.isOverlapping(cword.ptqmask) && ctqmask.values.count()!=1); } } @@ -158,9 +158,9 @@ void Pic::ConfigWordEditor::slotModified() BitValue v = memory().word(MemoryRangeType::Config, _configIndex); //qDebug("BinWordEditor::slotModified %i: %s", _configIndex, toHex(v, 4).data()); for (uint k=0; k<_combos.count(); k++) { - const Config::Mask &cmask = device().config()._words[_configIndex].masks[k]; - v = v.clearMaskBits(cmask.value); - v |= cmask.values[_combos[k]->index()].value; // set value + const Config::Mask &ctqmask = device().config()._words[_configIndex].tqmasks[k]; + v = v.clearMaskBits(ctqmask.value); + v |= ctqmask.values[_combos[k]->index()].value; // set value } memory().setWord(MemoryRangeType::Config, _configIndex, v); //qDebug(" now: %s", toHex(v, 4).data()); @@ -174,12 +174,12 @@ void Pic::ConfigWordEditor::updateDisplay() uint nbChars = device().nbCharsWord(MemoryRangeType::Config); //qDebug("BinWordEditor::updateDisplay %i: %s", _configIndex, toHex(v, 4).data()); for (uint k=0; k<_combos.count(); k++) { - const Config::Mask &cmask = device().config()._words[_configIndex].masks[k]; - for (int i=cmask.values.count()-1; i>=0; i--) { - if ( cmask.values[i].value.isInside(v) ) { - if ( cmask.values[i].isValid() ) _combos[k]->setItem(i); + const Config::Mask &ctqmask = device().config()._words[_configIndex].tqmasks[k]; + for (int i=ctqmask.values.count()-1; i>=0; i--) { + if ( ctqmask.values[i].value.isInside(v) ) { + if ( ctqmask.values[i].isValid() ) _combos[k]->setItem(i); else { - QString label = i18n("") + " (" + toHexLabel(cmask.values[i].value, nbChars) + ")"; + TQString label = i18n("") + " (" + toHexLabel(ctqmask.values[i].value, nbChars) + ")"; _combos[k]->setInvalidItem(i, label); } break; diff --git a/src/devices/pic/gui/pic_config_word_editor.h b/src/devices/pic/gui/pic_config_word_editor.h index 8f483c7..1b4077b 100644 --- a/src/devices/pic/gui/pic_config_word_editor.h +++ b/src/devices/pic/gui/pic_config_word_editor.h @@ -10,7 +10,7 @@ #ifndef PIC_CONFIG_WORD_EDITOR_H #define PIC_CONFIG_WORD_EDITOR_H -#include +#include #include "common/gui/dialog.h" #include "common/gui/misc_gui.h" @@ -22,23 +22,25 @@ namespace Pic class ConfigWordDialog : public Dialog { Q_OBJECT + TQ_OBJECT public: - ConfigWordDialog(const Memory &memory, uint index, QWidget *parent); + ConfigWordDialog(const Memory &memory, uint index, TQWidget *tqparent); }; //---------------------------------------------------------------------------- class ConfigWordComboBox : public ComboBox { Q_OBJECT + TQ_OBJECT public: - ConfigWordComboBox(QWidget *parent); - void appendItem(const QString &text, uint index) { insertItem(text); _map.append(index); } + ConfigWordComboBox(TQWidget *tqparent); + void appendItem(const TQString &text, uint index) { insertItem(text); _map.append(index); } uint index() const; void setItem(uint index); - void setInvalidItem(uint index, const QString &label); + void setInvalidItem(uint index, const TQString &label); private: - QValueVector _map; // item index -> value index + TQValueVector _map; // item index -> value index uint _invalidIndex; // if invalid -> value index bool isValid() const { return uint(count())==_map.count(); } @@ -48,8 +50,9 @@ private: class ConfigWordEditor : public MemoryEditor { Q_OBJECT + TQ_OBJECT public: - ConfigWordEditor(Memory &memory, uint index, bool withWordEditor, QWidget *parent); + ConfigWordEditor(Memory &memory, uint index, bool withWordEditor, TQWidget *tqparent); virtual void setReadOnly(bool readOnly); public slots: @@ -62,7 +65,7 @@ private slots: private: uint _configIndex; MemoryRangeEditor *_mdb; - QValueVector _combos; + TQValueVector _combos; }; } // namespace diff --git a/src/devices/pic/gui/pic_group_ui.cpp b/src/devices/pic/gui/pic_group_ui.cpp index 3f7a84c..5483ee4 100644 --- a/src/devices/pic/gui/pic_group_ui.cpp +++ b/src/devices/pic/gui/pic_group_ui.cpp @@ -18,28 +18,28 @@ #include "libgui/gui_debug_manager.h" #include "common/gui/list_container.h" -Device::HexView *Pic::GroupUI::createHexView(const HexEditor &editor, QWidget *parent) const +Device::HexView *Pic::GroupUI::createHexView(const HexEditor &editor, TQWidget *tqparent) const { - return new HexView(editor, parent); + return new HexView(editor, tqparent); } -Register::View *Pic::GroupUI::createRegisterView(QWidget *parent) const +Register::View *Pic::GroupUI::createRegisterView(TQWidget *tqparent) const { - return new RegisterView(parent); + return new RegisterView(tqparent); } -Device::MemoryEditor *Pic::GroupUI::createConfigEditor(Device::Memory &memory, QWidget *parent) const +Device::MemoryEditor *Pic::GroupUI::createConfigEditor(Device::Memory &memory, TQWidget *tqparent) const { - return new MemoryConfigEditorWidget(static_cast(memory), false, parent); + return new MemoryConfigEditorWidget(static_cast(memory), false, tqparent); } -void Pic::GroupUI::fillWatchListContainer(ListContainer *container, QValueVector &ids) const +void Pic::GroupUI::fillWatchListContainer(ListContainer *container, TQValueVector &ids) const { ids.clear(); const Pic::Data &data = static_cast(*Main::deviceData()); const Pic::RegistersData &rdata = data.registersData(); ListContainer *branch = container->appendBranch(i18n("SFRs")); - QValueVector list = Pic::sfrList(data); + TQValueVector list = Pic::sfrList(data); for (uint i=0; iappendItem(list[i].label(), ids.count(), ListContainer::UnChecked); ids.append(list[i].data()); @@ -47,7 +47,7 @@ void Pic::GroupUI::fillWatchListContainer(ListContainer *container, QValueVector branch = container->appendBranch(i18n("I/Os")); for (uint i=0; iappendItem(name, ids.count(), ListContainer::UnChecked); ids.append(Register::TypeData(rdata.sfrs[name].address, rdata.nbChars())); } @@ -56,7 +56,7 @@ void Pic::GroupUI::fillWatchListContainer(ListContainer *container, QValueVector list = Pic::gprList(data, coff); for (uint k=0; kappendBranch(i18n("Bank %1").arg(k))); + ListContainer *bbranch = (rdata.nbBanks==1 ? branch : branch->appendBranch(i18n("Bank %1").tqarg(k))); uint nb = 0; for (uint i=0; i &ids) const; - virtual Register::ListViewItem *createWatchItem(const Register::TypeData &data, KListViewItem *parent) const; + virtual Device::HexView *createHexView(const HexEditor &editor, TQWidget *tqparent) const; + virtual Register::View *createRegisterView(TQWidget *tqparent) const; + virtual Device::MemoryEditor *createConfigEditor(Device::Memory &memory, TQWidget *tqparent) const; + virtual void fillWatchListContainer(ListContainer *container, TQValueVector &ids) const; + virtual Register::ListViewItem *createWatchItem(const Register::TypeData &data, KListViewItem *tqparent) const; }; } // namespace diff --git a/src/devices/pic/gui/pic_hex_view.cpp b/src/devices/pic/gui/pic_hex_view.cpp index 07a1938..760b1ed 100644 --- a/src/devices/pic/gui/pic_hex_view.cpp +++ b/src/devices/pic/gui/pic_hex_view.cpp @@ -9,16 +9,16 @@ ***************************************************************************/ #include "pic_hex_view.h" -#include -#include +#include +#include #include #include "pic_memory_editor.h" #include "pic_config_editor.h" -Pic::HexView::HexView(const HexEditor &editor, QWidget *parent) - : Device::HexView(editor, parent, "pic_hex_view") +Pic::HexView::HexView(const HexEditor &editor, TQWidget *tqparent) + : Device::HexView(editor, tqparent, "pic_hex_view") {} const Pic::MemoryRangeType::Type Pic::HexView::MEMORY_DATA[] = { diff --git a/src/devices/pic/gui/pic_hex_view.h b/src/devices/pic/gui/pic_hex_view.h index 2086ccb..54b679d 100644 --- a/src/devices/pic/gui/pic_hex_view.h +++ b/src/devices/pic/gui/pic_hex_view.h @@ -10,7 +10,7 @@ #ifndef PIC_HEX_VIEW_H #define PIC_HEX_VIEW_H -class QVBoxLayout; +class TQVBoxLayout; #include "devices/gui/hex_view.h" #include "devices/pic/pic/pic_memory.h" @@ -21,8 +21,9 @@ namespace Pic class HexView : public Device::HexView { Q_OBJECT + TQ_OBJECT public: - HexView(const HexEditor &editor, QWidget *parent); + HexView(const HexEditor &editor, TQWidget *tqparent); Memory *memory() { return static_cast(_memory); } const Memory *memory() const { return static_cast(_memory); } virtual uint nbChecksumChars() const { return 4; } diff --git a/src/devices/pic/gui/pic_memory_editor.cpp b/src/devices/pic/gui/pic_memory_editor.cpp index 3d78097..50f686a 100644 --- a/src/devices/pic/gui/pic_memory_editor.cpp +++ b/src/devices/pic/gui/pic_memory_editor.cpp @@ -9,17 +9,17 @@ ***************************************************************************/ #include "pic_memory_editor.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -34,17 +34,17 @@ #include "pic_hex_view.h" //----------------------------------------------------------------------------- -Pic::MemoryEditorLegend::Data::Data(const QString &text, QWidget *parent) +Pic::MemoryEditorLegend::Data::Data(const TQString &text, TQWidget *tqparent) { - button = new PopupButton(text, parent); + button = new PopupButton(text, tqparent); KActionCollection *ac = 0; - KAction *a = new KAction(i18n("Go to start"), "top", 0, parent, SLOT(gotoStart()), ac); + KAction *a = new KAction(i18n("Go to start"), "top", 0, TQT_TQOBJECT(tqparent), TQT_SLOT(gotoStart()), ac); actions.append(a); button->appendAction(a); - a = new KAction(i18n("Go to end"), "bottom", 0, parent, SLOT(gotoEnd()), ac); + a = new KAction(i18n("Go to end"), "bottom", 0, TQT_TQOBJECT(tqparent), TQT_SLOT(gotoEnd()), ac); actions.append(a); button->appendAction(a); - label = new QLabel(parent); + label = new TQLabel(tqparent); } void Pic::MemoryEditorLegend::Data::setProtected(bool on) @@ -64,24 +64,24 @@ const char * const Pic::MemoryEditorLegend::BLOCK_COLORS[Protection::MAX_NB_BLOC "#88FF88", "#88FFFF", "#FFFF88", "#FF88FF", "#0088FF", "#88FF00", "#00FF88", "#FF8800" }; -Pic::MemoryEditorLegend::MemoryEditorLegend(MemoryRangeType type, Memory &memory, QWidget *parent) - : MemoryEditor(type, memory, parent, "memory_displayer_legend") +Pic::MemoryEditorLegend::MemoryEditorLegend(MemoryRangeType type, Memory &memory, TQWidget *tqparent) + : MemoryEditor(type, memory, tqparent, "memory_displayer_legend") { - QGridLayout *grid = new QGridLayout(_top); + TQGridLayout *grid = new TQGridLayout(_top); - QWidget *w = new QWidget(this); + TQWidget *w = new TQWidget(this); w->setFixedWidth(20); w->setPaletteBackgroundColor(protectedColor()); grid->addWidget(w, 0, 0); const Protection &protection = device().config().protection(); - QString s = (protection.family()==Protection::CodeGuard ? i18n("High Security") : i18n("Code protection")); - QLabel *label = new QLabel(s, this); + TQString s = (protection.family()==Protection::CodeGuard ? i18n("High Security") : i18n("Code protection")); + TQLabel *label = new TQLabel(s, this); grid->addMultiCellWidget(label, 0,0, 1,2); grid->addRowSpacing(1, 10); uint row = 2; if ( type==MemoryRangeType::Code && protection.hasBootBlock() ) { - w = new QWidget(this); + w = new TQWidget(this); w->setFixedWidth(20); w->setPaletteBackgroundColor(bootColor()); grid->addWidget(w, row, 0); @@ -93,7 +93,7 @@ Pic::MemoryEditorLegend::MemoryEditorLegend(MemoryRangeType type, Memory &memory uint nb = (type==MemoryRangeType::Code ? protection.nbBlocks() : 0); for (uint i=0; isetFixedWidth(20); w->setPaletteBackgroundColor(blockColor(i)); grid->addWidget(w, row, 0); @@ -112,14 +112,14 @@ void Pic::MemoryEditorLegend::updateDisplay() if (_boot.label) { AddressRange r = memory().bootRange(); if ( r.isEmpty() ) _boot.label->setText(i18n("not present")); - else _boot.label->setText(QString("[%1:%2]").arg(toHex(r.start, nbChars)).arg(toHex(r.end, nbChars))); + else _boot.label->setText(TQString("[%1:%2]").tqarg(toHex(r.start, nbChars)).tqarg(toHex(r.end, nbChars))); _boot.button->setEnabled(!r.isEmpty()); _boot.setProtected(memory().isBootProtected(ptype)); } for (uint i=0; i<_blocks.count(); i++) { AddressRange r = memory().blockRange(i); if ( r.isEmpty() ) _blocks[i].label->setText(i18n("not present")); - else _blocks[i].label->setText(QString("[%1:%2]").arg(toHex(r.start, nbChars)).arg(toHex(r.end, nbChars))); + else _blocks[i].label->setText(TQString("[%1:%2]").tqarg(toHex(r.start, nbChars)).tqarg(toHex(r.end, nbChars))); _blocks[i].button->setEnabled(!r.isEmpty()); _blocks[i].setProtected(memory().isBlockProtected(ptype, i)); } @@ -165,8 +165,8 @@ void Pic::MemoryEditorLegend::gotoEnd() //----------------------------------------------------------------------------- -Pic::HexWordEditor::HexWordEditor(MemoryRangeType type, Memory &memory, QWidget *parent) - : Device::HexWordEditor(memory, memory.device().nbCharsWord(type), parent), +Pic::HexWordEditor::HexWordEditor(MemoryRangeType type, Memory &memory, TQWidget *tqparent) + : Device::HexWordEditor(memory, memory.device().nbCharsWord(type), tqparent), MemoryCaster(type, memory) {} @@ -174,7 +174,7 @@ void Pic::HexWordEditor::setWord(BitValue value) { if ( type()==MemoryRangeType::Config ) { const Config::Word &cword = device().config()._words[_offset]; - value |= cword.usedMask().complementInMask(device().mask(MemoryRangeType::Config)); + value |= cword.usedMask().complementInMask(device().tqmask(MemoryRangeType::Config)); } memory().setWord(type(), _offset, value); } @@ -182,19 +182,19 @@ void Pic::HexWordEditor::setWord(BitValue value) //----------------------------------------------------------------------------- Pic::MemoryRangeEditor::MemoryRangeEditor(MemoryRangeType type, Memory &memory, uint nbLines, uint nbCols, - uint wordOffset, int nbWords, QWidget *parent) - : Device::MemoryRangeEditor(memory, nbLines, nbCols, wordOffset, nbWords, parent, "pic_memory_range_editor"), + uint wordOffset, int nbWords, TQWidget *tqparent) + : Device::MemoryRangeEditor(memory, nbLines, nbCols, wordOffset, nbWords, tqparent, "pic_memory_range_editor"), MemoryCaster(type, memory), _legend(0) { if ( type==MemoryRangeType::Code ) _blockRanges.resize(memory.device().config().protection().nbBlocks()); } -void Pic::MemoryRangeEditor::addLegend(QVBoxLayout *vbox) +void Pic::MemoryRangeEditor::addLegend(TQVBoxLayout *vbox) { if ( type()==MemoryRangeType::Code || type()==MemoryRangeType::Eeprom ) { _legend = new MemoryEditorLegend(type(), memory(), this); - connect(_legend, SIGNAL(setStartWord(int)), SLOT(setStartWord(int))); - connect(_legend, SIGNAL(setEndWord(int)), SLOT(setEndWord(int))); + connect(_legend, TQT_SIGNAL(setStartWord(int)), TQT_SLOT(setStartWord(int))); + connect(_legend, TQT_SIGNAL(setEndWord(int)), TQT_SLOT(setEndWord(int))); vbox->addWidget(_legend); } } @@ -220,28 +220,28 @@ void Pic::MemoryRangeEditor::updateDisplay() void Pic::MemoryRangeEditor::updateAddressColor(uint i, Address address) { - if ( _codeProtected.contains(address) ) + if ( _codeProtected.tqcontains(address) ) _addresses[i]->setPaletteBackgroundColor(MemoryEditorLegend::protectedColor()); else _addresses[i]->unsetPalette(); _blocks[i]->unsetPalette(); if ( type()==MemoryRangeType::Code ) { - if ( _bootRange.contains(address) ) _blocks[i]->setPaletteBackgroundColor(MemoryEditorLegend::bootColor()); + if ( _bootRange.tqcontains(address) ) _blocks[i]->setPaletteBackgroundColor(MemoryEditorLegend::bootColor()); else for (uint k=0; k<_blockRanges.count(); k++) { - if ( !_blockRanges[k].contains(address) ) continue; + if ( !_blockRanges[k].tqcontains(address) ) continue; _blocks[i]->setPaletteBackgroundColor(MemoryEditorLegend::blockColor(k)); break; } } } -Device::HexWordEditor *Pic::MemoryRangeEditor::createHexWordEditor(QWidget *parent) +Device::HexWordEditor *Pic::MemoryRangeEditor::createHexWordEditor(TQWidget *tqparent) { - return new HexWordEditor(type(), memory(), parent); + return new HexWordEditor(type(), memory(), tqparent); } //----------------------------------------------------------------------------- -Pic::MemoryTypeEditor::MemoryTypeEditor(const HexView *hexview, MemoryRangeType type, Memory &memory, QWidget *parent, const char *name) - : Device::MemoryTypeEditor(hexview, memory, parent, name), MemoryCaster(type, memory) +Pic::MemoryTypeEditor::MemoryTypeEditor(const HexView *hexview, MemoryRangeType type, Memory &memory, TQWidget *tqparent, const char *name) + : Device::MemoryTypeEditor(hexview, memory, tqparent, name), MemoryCaster(type, memory) {} void Pic::MemoryTypeEditor::init(bool first) @@ -250,11 +250,11 @@ void Pic::MemoryTypeEditor::init(bool first) _title->setText(type().label()); uint nbChars = device().nbCharsWord(type()); - QString add; - if ( type()==MemoryRangeType::UserId ) add = i18n(" - recommended mask: %1").arg(toHexLabel(device().userIdRecommendedMask(), nbChars)); + TQString add; + if ( type()==MemoryRangeType::UserId ) add = i18n(" - recommended tqmask: %1").tqarg(toHexLabel(device().userIdRecommendedMask(), nbChars)); if ( type()==MemoryRangeType::Cal && _hexview ) add = i18n(" - not programmed by default"); - QString comment = i18n("%1-bit words - mask: %2") - .arg(device().nbBitsWord(type())).arg(toHexLabel(device().mask(type()), nbChars)); + TQString comment = i18n("%1-bit words - tqmask: %2") + .tqarg(device().nbBitsWord(type())).tqarg(toHexLabel(device().tqmask(type()), nbChars)); _comment->setText(comment + add); } @@ -291,8 +291,8 @@ bool Pic::MemoryTypeEditor::internalDoAction(Device::Action action) } //----------------------------------------------------------------------------- -Pic::MemoryTypeRangeEditor::MemoryTypeRangeEditor(const HexView *hexview, MemoryRangeType type, Memory &memory, QWidget *parent) - : MemoryTypeEditor(hexview, type, memory, parent, "pic_memory_type_range_editor"), _mre(0) +Pic::MemoryTypeRangeEditor::MemoryTypeRangeEditor(const HexView *hexview, MemoryRangeType type, Memory &memory, TQWidget *tqparent) + : MemoryTypeEditor(hexview, type, memory, tqparent, "pic_memory_type_range_editor"), _mre(0) {} void Pic::MemoryTypeRangeEditor::init(bool first) @@ -309,15 +309,15 @@ void Pic::MemoryTypeRangeEditor::init(bool first) } //----------------------------------------------------------------------------- -Pic::MemoryUserIdEditor::MemoryUserIdEditor(const HexView *hexview, Memory &memory, QWidget *parent) - : MemoryTypeRangeEditor(hexview, MemoryRangeType::UserId, memory, parent), _saveReadOnly(false) +Pic::MemoryUserIdEditor::MemoryUserIdEditor(const HexView *hexview, Memory &memory, TQWidget *tqparent) + : MemoryTypeRangeEditor(hexview, MemoryRangeType::UserId, memory, tqparent), _saveReadOnly(false) {} void Pic::MemoryUserIdEditor::init(bool first) { MemoryTypeRangeEditor::init(first); _setToChecksum = new KToggleAction(i18n("Set to unprotected checksum"), 0, 0, - this, SLOT(toggleSetToChecksum()), Main::toplevel().actionCollection()); + TQT_TQOBJECT(this), TQT_SLOT(toggleSetToChecksum()), Main::toplevel().actionCollection()); addAction(_setToChecksum); if ( readConfigEntry(BaseGlobalConfig::UserIdSetToChecksum).toBool() && memory().isClear(MemoryRangeType::UserId) ) { _setToChecksum->activate(); @@ -330,7 +330,7 @@ void Pic::MemoryUserIdEditor::toggleSetToChecksum() if ( _setToChecksum->isChecked() ) { _mre->setComment(i18n("Set to unprotected checksum")); emit modified(); - } else _mre->setComment(QString::null); + } else _mre->setComment(TQString()); setReadOnly(_saveReadOnly); } @@ -347,8 +347,8 @@ void Pic::MemoryUserIdEditor::setReadOnly(bool readOnly) } //----------------------------------------------------------------------------- -Pic::MemoryCalibrationEditor::MemoryCalibrationEditor(const HexView *hexview, Memory &memory, QWidget *parent) - : MemoryTypeEditor(hexview, MemoryRangeType::Cal, memory, parent, "pic_memory_calibration_editor") +Pic::MemoryCalibrationEditor::MemoryCalibrationEditor(const HexView *hexview, Memory &memory, TQWidget *tqparent) + : MemoryTypeEditor(hexview, MemoryRangeType::Cal, memory, tqparent, "pic_memory_calibration_editor") {} void Pic::MemoryCalibrationEditor::init(bool first) diff --git a/src/devices/pic/gui/pic_memory_editor.h b/src/devices/pic/gui/pic_memory_editor.h index bf67cd1..2a6f72f 100644 --- a/src/devices/pic/gui/pic_memory_editor.h +++ b/src/devices/pic/gui/pic_memory_editor.h @@ -10,8 +10,8 @@ #ifndef PIC_MEMORY_EDITOR_H #define PIC_MEMORY_EDITOR_H -#include -#include +#include +#include class KToggleAction; #include "devices/gui/memory_editor.h" @@ -42,22 +42,24 @@ private: class MemoryEditor : public Device::MemoryEditor, public MemoryCaster { Q_OBJECT + TQ_OBJECT public: - MemoryEditor(MemoryRangeType type, Memory &memory, QWidget *parent, const char *name) - : Device::MemoryEditor(&memory, parent, name), MemoryCaster(type, memory) {} + MemoryEditor(MemoryRangeType type, Memory &memory, TQWidget *tqparent, const char *name) + : Device::MemoryEditor(&memory, tqparent, name), MemoryCaster(type, memory) {} }; //----------------------------------------------------------------------------- class MemoryEditorLegend : public MemoryEditor { Q_OBJECT + TQ_OBJECT public: - MemoryEditorLegend(MemoryRangeType type, Memory &memory, QWidget *parent); + MemoryEditorLegend(MemoryRangeType type, Memory &memory, TQWidget *tqparent); virtual void setReadOnly(bool) {} - static QColor protectedColor() { return QColor("#FF8888"); } - static QColor bootColor() { return QColor("#8888FF"); } - static QColor blockColor(uint i) { return QColor(BLOCK_COLORS[i]); } + static TQColor protectedColor() { return TQColor("#FF8888"); } + static TQColor bootColor() { return TQColor("#8888FF"); } + static TQColor blockColor(uint i) { return TQColor(BLOCK_COLORS[i]); } signals: void setStartWord(int i); @@ -74,15 +76,15 @@ private: class Data { public: Data() : button(0), label(0) {} - Data(const QString &text, QWidget *parent); + Data(const TQString &text, TQWidget *tqparent); void setProtected(bool on); bool hasAction(const KAction *action) const; PopupButton *button; - QLabel *label; - QValueVector actions; + TQLabel *label; + TQValueVector actions; }; Data _boot; - QValueVector _blocks; + TQValueVector _blocks; static const char * const BLOCK_COLORS[Protection::MAX_NB_BLOCKS]; }; @@ -91,11 +93,12 @@ private: class HexWordEditor : public Device::HexWordEditor, public MemoryCaster { Q_OBJECT + TQ_OBJECT public: - HexWordEditor(MemoryRangeType type, Memory &memory, QWidget *parent); + HexWordEditor(MemoryRangeType type, Memory &memory, TQWidget *tqparent); private: - virtual BitValue mask() const { return memory().device().mask(type()); } + virtual BitValue tqmask() const { return memory().device().tqmask(type()); } virtual BitValue normalizeWord(BitValue value) const { return memory().normalizeWord(type(), _offset, value); } virtual BitValue word() const { return memory().word(type(), _offset); } virtual void setWord(BitValue value); @@ -105,9 +108,10 @@ private: class MemoryRangeEditor : public Device::MemoryRangeEditor, public MemoryCaster { Q_OBJECT + TQ_OBJECT public: MemoryRangeEditor(MemoryRangeType type, Memory &memory, - uint nbLines, uint nbCols, uint wordOffset, int nbWords, QWidget *parent); + uint nbLines, uint nbCols, uint wordOffset, int nbWords, TQWidget *tqparent); public slots: virtual void updateDisplay(); @@ -121,18 +125,19 @@ private: virtual uint nbWords() const { return device().nbWords(type()); } virtual uint addressIncrement() const { return device().addressIncrement(type()); } virtual Address startAddress() const { return device().range(type()).start; } - virtual Device::HexWordEditor *createHexWordEditor(QWidget *parent); + virtual Device::HexWordEditor *createHexWordEditor(TQWidget *tqparent); virtual void updateAddressColor(uint i, Address address); virtual bool isRangeReadOnly() const; - virtual void addLegend(QVBoxLayout *vbox); + virtual void addLegend(TQVBoxLayout *vbox); }; //----------------------------------------------------------------------------- class MemoryTypeEditor : public Device::MemoryTypeEditor, public MemoryCaster { Q_OBJECT + TQ_OBJECT public: - MemoryTypeEditor(const HexView *hexview, MemoryRangeType type, Memory &memory, QWidget *parent, const char *name); + MemoryTypeEditor(const HexView *hexview, MemoryRangeType type, Memory &memory, TQWidget *tqparent, const char *name); virtual void init(bool first); private: @@ -143,8 +148,9 @@ private: class MemoryTypeRangeEditor : public MemoryTypeEditor { Q_OBJECT + TQ_OBJECT public: - MemoryTypeRangeEditor(const HexView *hexview, MemoryRangeType type, Memory &memory, QWidget *parent); + MemoryTypeRangeEditor(const HexView *hexview, MemoryRangeType type, Memory &memory, TQWidget *tqparent); virtual void init(bool first); protected: @@ -155,8 +161,9 @@ protected: class MemoryUserIdEditor : public MemoryTypeRangeEditor { Q_OBJECT + TQ_OBJECT public: - MemoryUserIdEditor(const HexView *hexview, Memory &memory, QWidget *parent); + MemoryUserIdEditor(const HexView *hexview, Memory &memory, TQWidget *tqparent); virtual void init(bool first); virtual void setReadOnly(bool readOnly); @@ -175,8 +182,9 @@ private: class MemoryCalibrationEditor : public MemoryTypeEditor { Q_OBJECT + TQ_OBJECT public: - MemoryCalibrationEditor(const HexView *hexview, Memory &memory, QWidget *parent); + MemoryCalibrationEditor(const HexView *hexview, Memory &memory, TQWidget *tqparent); virtual void init(bool first); private: diff --git a/src/devices/pic/gui/pic_prog_group_ui.cpp b/src/devices/pic/gui/pic_prog_group_ui.cpp index e063b77..8f2f225 100644 --- a/src/devices/pic/gui/pic_prog_group_ui.cpp +++ b/src/devices/pic/gui/pic_prog_group_ui.cpp @@ -11,17 +11,17 @@ #include "progs/gui/prog_config_widget.h" #include "progs/base/prog_group.h" -Programmer::PicAdvancedDialog::PicAdvancedDialog(PicBase &base, QWidget *parent, const char *name) - : AdvancedDialog(base, parent, name) +Programmer::PicAdvancedDialog::PicAdvancedDialog(PicBase &base, TQWidget *tqparent, const char *name) + : AdvancedDialog(base, tqparent, name) { if (_voltagesContainer) { uint k = _voltagesContainer->numRows(); for (uint i=0; iaddWidget(label, k,k, 0,0); - _voltages[i] = new QLabel(_voltagesContainer); + _voltages[i] = new TQLabel(_voltagesContainer); _voltagesContainer->addWidget(_voltages[i], k,k, 1,1); k++; } @@ -36,6 +36,6 @@ void Programmer::PicAdvancedDialog::updateDisplay() if ( !base().group().canReadVoltage(Pic::VoltageType(i)) ) continue; double v = base().voltage(Pic::VoltageType(i)); if ( v==::Programmer::UNKNOWN_VOLTAGE ) _voltages[i]->setText("---"); - else _voltages[i]->setText(QString("%1 V").arg(v)); + else _voltages[i]->setText(TQString("%1 V").tqarg(v)); } } diff --git a/src/devices/pic/gui/pic_prog_group_ui.h b/src/devices/pic/gui/pic_prog_group_ui.h index 75821b5..1a8540e 100644 --- a/src/devices/pic/gui/pic_prog_group_ui.h +++ b/src/devices/pic/gui/pic_prog_group_ui.h @@ -17,12 +17,13 @@ namespace Programmer class PicAdvancedDialog : public ::Programmer::AdvancedDialog { Q_OBJECT + TQ_OBJECT public: - PicAdvancedDialog(PicBase &base, QWidget *parent, const char *name); + PicAdvancedDialog(PicBase &base, TQWidget *tqparent, const char *name); virtual void updateDisplay(); private: - QLabel *_voltages[Pic::Nb_VoltageTypes]; + TQLabel *_voltages[Pic::Nb_VoltageTypes]; PicBase &base() { return static_cast(_base); } }; diff --git a/src/devices/pic/gui/pic_register_view.cpp b/src/devices/pic/gui/pic_register_view.cpp index ef7de9b..ced5085 100644 --- a/src/devices/pic/gui/pic_register_view.cpp +++ b/src/devices/pic/gui/pic_register_view.cpp @@ -8,12 +8,12 @@ ***************************************************************************/ #include "pic_register_view.h" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include @@ -29,13 +29,13 @@ #include "coff/base/text_coff.h" //----------------------------------------------------------------------------- -Pic::BankWidget::BankWidget(uint i, QWidget *parent) - : QFrame(parent, "bank_widget"), _bindex(i), _bankCombo(0) +Pic::BankWidget::BankWidget(uint i, TQWidget *tqparent) + : TQFrame(tqparent, "bank_widget"), _bindex(i), _bankCombo(0) { setFrameStyle(WinPanel | Sunken); - QGridLayout *top = new QGridLayout(this, 1, 1, 5, 0); + TQGridLayout *top = new TQGridLayout(this, 1, 1, 5, 0); top->setColSpacing(1, 4); - QFont f("courier", font().pointSize()); + TQFont f("courier", font().pointSize()); const Pic::Data &data = static_cast(*Main::deviceData()); const Pic::RegistersData &rdata = data.registersData(); @@ -44,22 +44,22 @@ Pic::BankWidget::BankWidget(uint i, QWidget *parent) if ( rdata.nbBanks!=1 ) { if ( data.is18Family() ) { if ( (i/2)==0 ) { - QString title = ((i%2)==0 ? i18n("Access Bank (low)") : i18n("Access Bank (high)")); - QLabel *label = new QLabel(title, this); - label->setAlignment(AlignCenter); + TQString title = ((i%2)==0 ? i18n("Access Bank (low)") : i18n("Access Bank (high)")); + TQLabel *label = new TQLabel(title, this); + label->tqsetAlignment(AlignCenter); top->addMultiCellWidget(label, row,row, 0,6, AlignHCenter); } else { - _bankCombo = new QComboBox(this); + _bankCombo = new TQComboBox(this); for (uint k=1; k<2*rdata.nbBanks-1; k++) { - _bankCombo->insertItem((k%2)==0 ? i18n("Bank %1 (low)").arg(k/2) : i18n("Bank %1 (high)").arg(k/2)); + _bankCombo->insertItem((k%2)==0 ? i18n("Bank %1 (low)").tqarg(k/2) : i18n("Bank %1 (high)").tqarg(k/2)); } if ( _bindex==3 ) _bankCombo->setCurrentItem(1); - connect(_bankCombo, SIGNAL(activated(int)), SLOT(bankChanged())); + connect(_bankCombo, TQT_SIGNAL(activated(int)), TQT_SLOT(bankChanged())); top->addMultiCellWidget(_bankCombo, row,row, 0,6, AlignHCenter); } } else { - QLabel *label = new QLabel(i18n("Bank %1").arg(i), this); - label->setAlignment(AlignCenter); + TQLabel *label = new TQLabel(i18n("Bank %1").tqarg(i), this); + label->tqsetAlignment(AlignCenter); top->addMultiCellWidget(label, row,row, 0,6, AlignHCenter); } row++; @@ -68,14 +68,14 @@ Pic::BankWidget::BankWidget(uint i, QWidget *parent) } KIconLoader loader; - QPixmap readIcon = loader.loadIcon("viewmag", KIcon::Small); - QPixmap editIcon = loader.loadIcon("edit", KIcon::Small); + TQPixmap readIcon = loader.loadIcon("viewmag", KIcon::Small); + TQPixmap editIcon = loader.loadIcon("edit", KIcon::Small); uint nb; if ( !data.is18Family() ) nb = rdata.nbRegistersPerBank(); else nb = kMax(rdata.accessBankSplit, rdata.nbRegistersPerBank() - rdata.accessBankSplit); _registers.resize(nb); for (uint k=0; ksetFont(f); top->addWidget(_registers[k].alabel, row, 0); if (debugging) { @@ -83,14 +83,14 @@ Pic::BankWidget::BankWidget(uint i, QWidget *parent) _registers[k].button->appendItem(i18n("Read"), readIcon, ReadId); _registers[k].button->appendItem(i18n("Edit"), editIcon, EditId); _registers[k].button->appendItem(i18n("Watch"), WatchId); - connect(_registers[k].button, SIGNAL(activated(int)), SLOT(buttonActivated(int))); + connect(_registers[k].button, TQT_SIGNAL(activated(int)), TQT_SLOT(buttonActivated(int))); top->addWidget(_registers[k].button, row, 2); _registers[k].edit = new Register::LineEdit(this); - connect(_registers[k].edit, SIGNAL(modified()), SLOT(write())); + connect(_registers[k].edit, TQT_SIGNAL(modified()), TQT_SLOT(write())); _registers[k].edit->setFont(f); top->addWidget(_registers[k].edit, row, 6); } else { - _registers[k].label = new QLabel(this); + _registers[k].label = new TQLabel(this); top->addWidget(_registers[k].label, row, 2); } row++; @@ -203,11 +203,11 @@ void Pic::BankWidget::updateView() for (uint i=0; i<_registers.count(); i++) { uint address = _registers[i].address; Device::RegisterProperties rp = rdata.properties(address); - QString label = rdata.label(address); + TQString label = rdata.label(address); Register::TypeData rtd(address, rdata.nbChars()); bool isWatched = Register::list().isWatched(rtd); if (coff) { - QString name = coff->variableName(address); + TQString name = coff->variableName(address); if ( !name.isEmpty() ) label = "<" + name + ">"; } if (_registers[i].button) { @@ -215,7 +215,7 @@ void Pic::BankWidget::updateView() _registers[i].button->show(); _registers[i].button->setText(label); if (isWatched) { - QFont f = _registers[i].button->font(); + TQFont f = _registers[i].button->font(); f.setBold(true); _registers[i].button->setFont(f); } else _registers[i].button->unsetFont(); @@ -245,36 +245,36 @@ void Pic::BankWidget::updateView() } //----------------------------------------------------------------------------- -Pic::RegisterView::RegisterView(QWidget *parent) - : Register::View(parent, "pic_register_view"), +Pic::RegisterView::RegisterView(TQWidget *tqparent) + : Register::View(tqparent, "pic_register_view"), _readAllButton(0), _clearAllButton(0) { - QVBoxLayout *vbox = new QVBoxLayout(this, 10, 10); - QHBoxLayout *hbox = new QHBoxLayout(vbox); + TQVBoxLayout *vbox = new TQVBoxLayout(this, 10, 10); + TQHBoxLayout *hbox = new TQHBoxLayout(vbox); bool debugging = Main::programmerGroup().isDebugger(); const Pic::Data &data = static_cast(*Main::deviceData()); uint nb = data.registersData().nbBanks; if ( debugging && nb!=0 ) { - QWidget *w = new QWidget(this); + TQWidget *w = new TQWidget(this); hbox->addWidget(w); - QGridLayout *grid = new QGridLayout(w, 1, 1, 0, 10); - _readAllButton = new QPushButton(i18n("Read All"), w); - connect(_readAllButton, SIGNAL(clicked()), Debugger::manager, SLOT(readAllRegisters())); + TQGridLayout *grid = new TQGridLayout(w, 1, 1, 0, 10); + _readAllButton = new TQPushButton(i18n("Read All"), w); + connect(_readAllButton, TQT_SIGNAL(clicked()), Debugger::manager, TQT_SLOT(readAllRegisters())); grid->addWidget(_readAllButton, 0, 0); - _clearAllButton = new QPushButton(i18n("Clear all watching"), w); - connect(_clearAllButton, SIGNAL(clicked()), SLOT(stopWatchAllRegisters())); + _clearAllButton = new TQPushButton(i18n("Clear all watching"), w); + connect(_clearAllButton, TQT_SIGNAL(clicked()), TQT_SLOT(stopWatchAllRegisters())); grid->addWidget(_clearAllButton, 0, 1); grid->setColStretch(2, 1); } - QHBoxLayout *hbox2 = 0; + TQHBoxLayout *hbox2 = 0; if ( nb==0 ) { - QLabel *label = new QLabel(i18n("Registers information not available."), this); + TQLabel *label = new TQLabel(i18n("Registers information not available."), this); vbox->addWidget(label); } else { - hbox = new QHBoxLayout(vbox); - hbox2 = new QHBoxLayout(hbox); + hbox = new TQHBoxLayout(vbox); + hbox2 = new TQHBoxLayout(hbox); hbox->addStretch(1); if ( data.is18Family() ) { nb = 2; @@ -306,8 +306,8 @@ void Pic::RegisterView::stopWatchAllRegisters() } //---------------------------------------------------------------------------- -Pic::RegisterListViewItem::RegisterListViewItem(const Register::TypeData &data, KListViewItem *parent) - : Register::ListViewItem(data, parent) +Pic::RegisterListViewItem::RegisterListViewItem(const Register::TypeData &data, KListViewItem *tqparent) + : Register::ListViewItem(data, tqparent) {} uint Pic::RegisterListViewItem::nbCharsAddress() const @@ -316,12 +316,12 @@ uint Pic::RegisterListViewItem::nbCharsAddress() const return data.registersData().nbCharsAddress(); } -QString Pic::RegisterListViewItem::label() const +TQString Pic::RegisterListViewItem::label() const { if ( _data.type()!=Register::Regular ) return _data.name(); const Coff::Object *coff = Debugger::manager->coff(); if (coff) { - QString name = coff->variableName(_data.address()); + TQString name = coff->variableName(_data.address()); if ( !name.isEmpty() ) return "<" + name + ">"; } const Pic::Data &data = static_cast(*Main::deviceData()); diff --git a/src/devices/pic/gui/pic_register_view.h b/src/devices/pic/gui/pic_register_view.h index f5b9d4b..0f347e4 100644 --- a/src/devices/pic/gui/pic_register_view.h +++ b/src/devices/pic/gui/pic_register_view.h @@ -9,11 +9,11 @@ #ifndef PIC_REGISTER_VIEW_H #define PIC_REGISTER_VIEW_H -#include -class QPushButton; -class QCheckBox; -class QLabel; -class QComboBox; +#include +class TQPushButton; +class TQCheckBox; +class TQLabel; +class TQComboBox; #include "devices/gui/register_view.h" #include "devices/pic/base/pic.h" @@ -24,11 +24,12 @@ namespace Device { class RegisterHexWordEditor; } namespace Pic { //----------------------------------------------------------------------------- -class BankWidget : public QFrame +class BankWidget : public TQFrame { Q_OBJECT + TQ_OBJECT public: - BankWidget(uint bank, QWidget *parent); + BankWidget(uint bank, TQWidget *tqparent); void updateView(); private slots: @@ -42,13 +43,13 @@ private: public: Data() : label(0), button(0), edit(0) {} uint address; - QLabel *alabel, *label; + TQLabel *alabel, *label; PopupButton *button; Register::LineEdit *edit; }; uint _bindex; - QComboBox *_bankCombo; - QValueVector _registers; + TQComboBox *_bankCombo; + TQValueVector _registers; uint bank() const; uint nbRegisters() const; @@ -60,27 +61,28 @@ private: class RegisterView : public Register::View { Q_OBJECT + TQ_OBJECT public: - RegisterView(QWidget *parent); + RegisterView(TQWidget *tqparent); virtual void updateView(); private slots: void stopWatchAllRegisters(); private: - QPushButton *_readAllButton, *_clearAllButton; - QValueVector _banks; + TQPushButton *_readAllButton, *_clearAllButton; + TQValueVector _banks; }; //----------------------------------------------------------------------------- class RegisterListViewItem : public Register::ListViewItem { public: - RegisterListViewItem(const Register::TypeData &data, KListViewItem *parent); + RegisterListViewItem(const Register::TypeData &data, KListViewItem *tqparent); private: virtual uint nbCharsAddress() const; - virtual QString label() const; + virtual TQString label() const; }; } // namespace diff --git a/src/devices/pic/pic/pic_group.cpp b/src/devices/pic/pic/pic_group.cpp index 639d2cf..311bff3 100644 --- a/src/devices/pic/pic/pic_group.cpp +++ b/src/devices/pic/pic/pic_group.cpp @@ -9,7 +9,7 @@ #include "pic_group.h" #if !defined(NO_KDE) -# include +# include #endif #include "pic_memory.h" @@ -20,35 +20,35 @@ Device::Memory *Pic::Group::createMemory(const Device::Data &data) const return new Memory(static_cast(data)); } -QString Pic::Group::informationHtml(const Device::Data &data) const +TQString Pic::Group::informationHtml(const Device::Data &data) const { const Pic::Data &pdata = static_cast(data); // memory type - QString s = htmlTableRow(i18n("Memory Type"), data.memoryTechnology().label()); + TQString s = htmlTableRow(i18n("Memory Type"), data.memoryTechnology().label()); if ( pdata.isPresent(MemoryRangeType::Code) ) { uint nbw = pdata.nbWords(MemoryRangeType::Code); - QString tmp = i18n("%1 words").arg(formatNumber(nbw)); - tmp += i18n(" (%2 bits)").arg(pdata.nbBitsWord(MemoryRangeType::Code)); + TQString tmp = i18n("%1 words").tqarg(formatNumber(nbw)); + tmp += i18n(" (%2 bits)").tqarg(pdata.nbBitsWord(MemoryRangeType::Code)); s += htmlTableRow(MemoryRangeType(MemoryRangeType::Code).label(), tmp); } if ( pdata.isPresent(MemoryRangeType::Eeprom) ) { uint nbw = pdata.nbWords(MemoryRangeType::Eeprom); - QString tmp = i18n("%1 bytes").arg(formatNumber(nbw)); - tmp += i18n(" (%2 bits)").arg(pdata.nbBitsWord(MemoryRangeType::Eeprom)); + TQString tmp = i18n("%1 bytes").tqarg(formatNumber(nbw)); + tmp += i18n(" (%2 bits)").tqarg(pdata.nbBitsWord(MemoryRangeType::Eeprom)); if ( !(pdata.range(MemoryRangeType::Eeprom).properties & Programmable) ) tmp += i18n(" (not programmable)"); s += htmlTableRow(MemoryRangeType(MemoryRangeType::Eeprom).label(), tmp); } // io ports const Pic::RegistersData &rdata = pdata.registersData(); - QString tmp; + TQString tmp; if ( rdata.nbBanks!=0 ) { uint nb = 0; for (uint i=0; i"); @@ -56,7 +56,7 @@ QString Pic::Group::informationHtml(const Device::Data &data) const } // features - tmp = QString::null; + tmp = TQString(); FOR_EACH(Feature, feature) { if ( !pdata.hasFeature(feature) ) continue; if ( !tmp.isEmpty() ) tmp += ", "; @@ -68,10 +68,10 @@ QString Pic::Group::informationHtml(const Device::Data &data) const } #if !defined(NO_KDE) -QPixmap Pic::Group::memoryGraph(const Device::Data &data) const +TQPixmap Pic::Group::memoryGraph(const Device::Data &data) const { const Pic::Data &pdata = static_cast(data); - QValueList ranges; + TQValueList ranges; FOR_EACH(Pic::MemoryRangeType, type) { if ( type==Pic::MemoryRangeType::Eeprom || !pdata.isPresent(type) ) continue; Device::MemoryGraphData data; diff --git a/src/devices/pic/pic/pic_group.h b/src/devices/pic/pic/pic_group.h index 1b95e09..844e370 100644 --- a/src/devices/pic/pic/pic_group.h +++ b/src/devices/pic/pic/pic_group.h @@ -21,12 +21,12 @@ extern const char *DATA_STREAM; class Group : public Device::Group { public: - virtual QString name() const { return "pic"; } - virtual QString label() const { return i18n("PIC"); } + virtual TQString name() const { return "pic"; } + virtual TQString label() const { return i18n("PIC"); } virtual Device::Memory *createMemory(const Device::Data &data) const; - virtual QString informationHtml(const Device::Data &data) const; + virtual TQString informationHtml(const Device::Data &data) const; #if !defined(NO_KDE) - virtual QPixmap memoryGraph(const Device::Data &data) const; + virtual TQPixmap memoryGraph(const Device::Data &data) const; #endif private: diff --git a/src/devices/pic/pic/pic_memory.cpp b/src/devices/pic/pic/pic_memory.cpp index cccb2f9..8567790 100644 --- a/src/devices/pic/pic/pic_memory.cpp +++ b/src/devices/pic/pic/pic_memory.cpp @@ -8,7 +8,7 @@ ***************************************************************************/ #include "pic_memory.h" -#include +#include #include "common/common/misc.h" @@ -58,7 +58,7 @@ Device::Array Pic::Memory::arrayForWriting(MemoryRangeType type) const { Device::Array data = _ranges[type]; for (uint i=0; ivalue); - for (uint k=0; kvalues.count()); k++) - if ( v.isInside(mask->values[k].value) ) return mask->values[k].name; + const Config::Mask *tqmask = device().config().findMask(tqmaskName, &i); + if ( tqmask==0 ) return TQString(); + BitValue v = word(MemoryRangeType::Config, i).tqmaskWith(tqmask->value); + for (uint k=0; kvalues.count()); k++) + if ( v.isInside(tqmask->values[k].value) ) return tqmask->values[k].name; Q_ASSERT(false); - return QString::null; + return TQString(); } AddressRange Pic::Memory::bootRange() const { const Protection &protection = device().config().protection(); // with boot size - QString value = findValue(protection.bootSizeMaskName()); + TQString value = findValue(protection.bootSizeMaskName()); if ( !value.isEmpty() ) { uint size = value.toUInt(); if ( size==0 ) return AddressRange(); @@ -122,10 +122,10 @@ AddressRange Pic::Memory::bootRange() const return AddressRange(start, 2 * size - 1); // instruction words } // only CPB - QString maskName = protection.bootMaskName(Protection::ProgramProtected); - const Config::Mask *mask = device().config().findMask(maskName); - for (uint k=0; kvalues.count()); k++) { - AddressRangeVector rv = protection.extractRanges(mask->values[k].name, MemoryRangeType::Code); + TQString tqmaskName = protection.bootMaskName(Protection::ProgramProtected); + const Config::Mask *tqmask = device().config().findMask(tqmaskName); + for (uint k=0; kvalues.count()); k++) { + AddressRangeVector rv = protection.extractRanges(tqmask->values[k].name, MemoryRangeType::Code); if ( !rv.isEmpty() ) return rv[0]; } Q_ASSERT(false); @@ -142,9 +142,9 @@ AddressRange Pic::Memory::blockRange(uint i) const Address start = (previous.isEmpty() ? device().range(MemoryRangeType::Code).start : previous.end + 1); return AddressRange(start, device().range(MemoryRangeType::Code).end); } - QString maskName = protection.blockSizeMaskName(i); + TQString tqmaskName = protection.blockSizeMaskName(i); if ( protection.family()==Protection::CodeGuard ) { // secure segment - QString value = findValue(maskName); + TQString value = findValue(tqmaskName); Q_ASSERT( !value.isEmpty() ); uint size = value.toUInt(); if ( size==0 ) return AddressRange(); @@ -153,9 +153,9 @@ AddressRange Pic::Memory::blockRange(uint i) const return AddressRange(start, 2 * size - 1); } AddressRange previous = (i==0 ? bootRange() : blockRange(i-1)); - const Config::Mask *mask = device().config().findMask(maskName); - for (uint k=0; kvalues.count()); k++) { - AddressRangeVector rv = protection.extractRanges(mask->values[k].name, MemoryRangeType::Code); + const Config::Mask *tqmask = device().config().findMask(tqmaskName); + for (uint k=0; kvalues.count()); k++) { + AddressRangeVector rv = protection.extractRanges(tqmask->values[k].name, MemoryRangeType::Code); if ( !rv.isEmpty() ) return AddressRange(previous.end + 1, rv[0].end); } Q_ASSERT(false); @@ -165,8 +165,8 @@ AddressRange Pic::Memory::blockRange(uint i) const AddressRange Pic::Memory::bootProtectedRange(Protection::Type ptype) const { const Protection &protection = device().config().protection(); - QString maskName = protection.bootMaskName(ptype); - QString value = findValue(maskName); + TQString tqmaskName = protection.bootMaskName(ptype); + TQString value = findValue(tqmaskName); if ( value.isEmpty() ) return AddressRange(); if ( protection.family()!=Protection::CodeGuard ) { if ( protection.extractRanges(value, MemoryRangeType::Code).isEmpty() ) return AddressRange(); @@ -179,8 +179,8 @@ AddressRange Pic::Memory::bootProtectedRange(Protection::Type ptype) const AddressRange Pic::Memory::blockProtectedRange(Protection::Type ptype, uint i) const { const Protection &protection = device().config().protection(); - QString maskName = protection.blockMaskName(ptype, i); - QString value = findValue(maskName); + TQString tqmaskName = protection.blockMaskName(ptype, i); + TQString value = findValue(tqmaskName); if ( value.isEmpty() ) return AddressRange(); if ( protection.family()!=Protection::CodeGuard ) { if ( protection.extractRanges(value, MemoryRangeType::Code).isEmpty() ) return AddressRange(); @@ -202,9 +202,9 @@ AddressRangeVector Pic::Memory::protectedRanges(Protection::Type ptype, MemoryRa } } if ( protection.family()!=Protection::CodeGuard ) { - QString maskName = protection.maskName(ptype, type); - QString value = findValue(maskName); - //qDebug("%s %s", maskName.latin1(), value.latin1()); + TQString tqmaskName = protection.tqmaskName(ptype, type); + TQString value = findValue(tqmaskName); + //qDebug("%s %s", tqmaskName.latin1(), value.latin1()); if ( !value.isEmpty() ) { AddressRangeVector tmp = protection.extractRanges(value, type); Q_ASSERT( tmp.count()==1 ); @@ -216,14 +216,14 @@ AddressRangeVector Pic::Memory::protectedRanges(Protection::Type ptype, MemoryRa void Pic::Memory::setBootProtection(bool on, Protection::Type ptype) { - QString maskName = device().config().protection().bootMaskName(ptype); - setProtection(on, maskName, ptype); + TQString tqmaskName = device().config().protection().bootMaskName(ptype); + setProtection(on, tqmaskName, ptype); } void Pic::Memory::setBlockProtection(bool on, Protection::Type ptype, uint block) { - QString maskName = device().config().protection().blockMaskName(ptype, block); - setProtection(on, maskName, ptype); + TQString tqmaskName = device().config().protection().blockMaskName(ptype, block); + setProtection(on, tqmaskName, ptype); } void Pic::Memory::setProtection(bool on, Protection::Type ptype, MemoryRangeType type) @@ -236,57 +236,57 @@ void Pic::Memory::setProtection(bool on, Protection::Type ptype, MemoryRangeType return; } } - setProtection(on, protection.maskName(ptype, type), ptype); + setProtection(on, protection.tqmaskName(ptype, type), ptype); } -void Pic::Memory::setConfigValue(const QString &maskName, const QString &valueName) +void Pic::Memory::setConfigValue(const TQString &tqmaskName, const TQString &valueName) { uint i; - const Config::Mask *mask = device().config().findMask(maskName, &i); - Q_ASSERT(mask); + const Config::Mask *tqmask = device().config().findMask(tqmaskName, &i); + Q_ASSERT(tqmask); BitValue v = word(MemoryRangeType::Config, i); - v = v.clearMaskBits(mask->value); - for (int k=mask->values.count()-1; k>=0; k--) { // important to get the highest value in case of identical values - if ( mask->values[k].name!=valueName ) continue; - setWord(MemoryRangeType::Config, i, v | mask->values[k].value); + v = v.clearMaskBits(tqmask->value); + for (int k=tqmask->values.count()-1; k>=0; k--) { // important to get the highest value in case of identical values + if ( tqmask->values[k].name!=valueName ) continue; + setWord(MemoryRangeType::Config, i, v | tqmask->values[k].value); return; } Q_ASSERT(false); } -void Pic::Memory::setProtection(bool on, const QString &maskName, Protection::Type ptype) +void Pic::Memory::setProtection(bool on, const TQString &tqmaskName, Protection::Type ptype) { - const Config::Mask *mask = device().config().findMask(maskName, 0); - if( mask==0 ) return; + const Config::Mask *tqmask = device().config().findMask(tqmaskName, 0); + if( tqmask==0 ) return; const Protection &protection = device().config().protection(); - QString valueName; + TQString valueName; if ( ptype==Protection::StandardSecurity || ptype==Protection::HighSecurity ) valueName = protection.securityValueName(ptype); else { - for (int k=mask->values.count()-1; k>=0; k--) { - if ( (on && protection.isAllProtectedValueName(mask->values[k].name)) - || (!on && protection.isNoneProtectedValueName(mask->values[k].name)) ) valueName = mask->values[k].name; + for (int k=tqmask->values.count()-1; k>=0; k--) { + if ( (on && protection.isAllProtectedValueName(tqmask->values[k].name)) + || (!on && protection.isNoneProtectedValueName(tqmask->values[k].name)) ) valueName = tqmask->values[k].name; } } - setConfigValue(maskName, valueName); + setConfigValue(tqmaskName, valueName); } -bool Pic::Memory::hasFlagOn(const QString &maskName, bool valueIfNotPresent) const +bool Pic::Memory::hasFlagOn(const TQString &tqmaskName, bool valueIfNotPresent) const { - const Config::Mask *mask = device().config().findMask(maskName, 0); - if ( mask==0 ) return valueIfNotPresent; - Q_ASSERT(mask); - Q_ASSERT( mask->values.count()==2 ); - return ( findValue(maskName)=="On" ); + const Config::Mask *tqmask = device().config().findMask(tqmaskName, 0); + if ( tqmask==0 ) return valueIfNotPresent; + Q_ASSERT(tqmask); + Q_ASSERT( tqmask->values.count()==2 ); + return ( findValue(tqmaskName)=="On" ); } -void Pic::Memory::setFlagOn(const QString &maskName, bool on) +void Pic::Memory::setFlagOn(const TQString &tqmaskName, bool on) { - const Config::Mask *mask = device().config().findMask(maskName, 0); - Q_UNUSED(mask); - Q_ASSERT(mask); - Q_ASSERT( mask->values.count()==2 ); - setConfigValue(maskName, on ? "On" : "Off"); + const Config::Mask *tqmask = device().config().findMask(tqmaskName, 0); + Q_UNUSED(tqmask); + Q_ASSERT(tqmask); + Q_ASSERT( tqmask->values.count()==2 ); + setConfigValue(tqmaskName, on ? "On" : "Off"); } void Pic::Memory::checksumCheckFill() @@ -331,12 +331,12 @@ void Pic::Memory::checksumCheckFill() BitValue Pic::Memory::checksum() const { // code - BitValue mask = device().mask(MemoryRangeType::Code); + BitValue tqmask = device().tqmask(MemoryRangeType::Code); AddressRangeVector rv = protectedRanges(Protection::ProgramProtected, MemoryRangeType::Code); bool isProtected = !rv.isEmpty(); uint inc = device().addressIncrement(MemoryRangeType::Code); //uint nbChars = device().nbCharsWord(MemoryRangeType::Code); - //qDebug("protected: %i nb: %s (%s)", isProtected, toHexLabelAbs(inc*device().nbWords(MemoryRangeType::Code)).latin1(), toHexLabel(mask, nbChars).latin1()); + //qDebug("protected: %i nb: %s (%s)", isProtected, toHexLabelAbs(inc*device().nbWords(MemoryRangeType::Code)).latin1(), toHexLabel(tqmask, nbChars).latin1()); //for (uint i=0; i &checksums = device().checksums(); - if ( checksums.contains(valueName) ) { // #### REMOVE ME !! + TQString tqmaskName = protection.tqmaskName(Protection::ProgramProtected, MemoryRangeType::Code); + TQString valueName = findValue(tqmaskName); + const TQMap &checksums = device().checksums(); + if ( checksums.tqcontains(valueName) ) { // #### REMOVE ME !! algorithm = checksums[valueName].algorithm; cs = checksums[valueName].constant; } @@ -356,14 +356,14 @@ BitValue Pic::Memory::checksum() const //qDebug("constant: %s", toHexLabelAbs(cs).data()); //qDebug("algo: %s", Checksum::ALGORITHM_DATA[algorithm].name); for (uint i=0; i &inRange) + TQStringList &warnings, TQMap &inRange) { if ( !device().isWritable(type) ) return; uint nbBytes = device().architecture().data().nbBytesWord; bool packed = device().architecture().data().packed; uint offset = device().range(type).hexFileOffset; if ( offset==0 ) offset = device().range(type).start.toUInt(); - BitValue mask = device().mask(type); + BitValue tqmask = device().tqmask(type); uint wNbBytes = nbBytes; if ( packed && type!=Pic::MemoryRangeType::Code ) { offset /= 2; @@ -523,7 +523,7 @@ void Pic::Memory::fromHexBuffer(MemoryRangeType type, const HexBuffer &hb, Warni BitValue s = hb[offset]; //if ( k<4 ) qDebug("s=%s so=%s sb=%i wo=%i wb=%i", toHex(s, 8).data(), toHex(offset, 8).data(), byte, wOffset, wByte); if ( !s.isInitialized() ) { - if ( type==MemoryRangeType::Config ) _ranges[type][wOffset] = mask; + if ( type==MemoryRangeType::Config ) _ranges[type][wOffset] = tqmask; else _ranges[type][wOffset] = BitValue(); } else { inRange[offset] = true; @@ -540,12 +540,12 @@ void Pic::Memory::fromHexBuffer(MemoryRangeType type, const HexBuffer &hb, Warni wByte++; if ( (wByte%wNbBytes)==0 ) { if ( _ranges[type][wOffset].isInitialized() ) { - if ( !(result & ValueTooLarge) && _ranges[type][wOffset].maskWith(mask)!=_ranges[type][wOffset] ) { + if ( !(result & ValueTooLarge) && _ranges[type][wOffset].tqmaskWith(tqmask)!=_ranges[type][wOffset] ) { result |= ValueTooLarge; - warnings += i18n("At least one word (at offset %1) is larger (%2) than the corresponding mask (%3).") - .arg(toHexLabel(offset, 8)).arg(toHexLabel(_ranges[type][wOffset], 8)).arg(toHexLabel(mask, 8)); + warnings += i18n("At least one word (at offset %1) is larger (%2) than the corresponding tqmask (%3).") + .tqarg(toHexLabel(offset, 8)).tqarg(toHexLabel(_ranges[type][wOffset], 8)).tqarg(toHexLabel(tqmask, 8)); } - _ranges[type][wOffset] = _ranges[type][wOffset].maskWith(mask); + _ranges[type][wOffset] = _ranges[type][wOffset].tqmaskWith(tqmask); } wByte = 0; wOffset++; @@ -554,7 +554,7 @@ void Pic::Memory::fromHexBuffer(MemoryRangeType type, const HexBuffer &hb, Warni } void Pic::Memory::fromHexBuffer(const HexBuffer &hb, WarningTypes &result, - QStringList &warnings, QMap &inRange) + TQStringList &warnings, TQMap &inRange) { FOR_EACH(MemoryRangeType, i) fromHexBuffer(i, hb, result, warnings, inRange); } diff --git a/src/devices/pic/pic/pic_memory.h b/src/devices/pic/pic/pic_memory.h index f7c98ba..7d00c01 100644 --- a/src/devices/pic/pic/pic_memory.h +++ b/src/devices/pic/pic/pic_memory.h @@ -41,7 +41,7 @@ public: bool isBlockProtected(Protection::Type ptype, uint i) const { return !blockProtectedRange(ptype, i).isEmpty(); } bool isProtected(Protection::Type ptype, MemoryRangeType type) const { return !protectedRanges(ptype, type).isEmpty(); } AddressRangeVector protectedRanges(Protection::Type ptype, MemoryRangeType type) const; - void setConfigValue(const QString &maskName, const QString &valueName); + void setConfigValue(const TQString &tqmaskName, const TQString &valueName); bool hasDebugOn() const { return hasFlagOn("DEBUG", false); } void setDebugOn(bool on) { setFlagOn("DEBUG", on); } bool hasWatchdogTimerOn() const { return hasFlagOn("WDT", false); } @@ -58,19 +58,19 @@ public: virtual void copyFrom(const Device::Memory &memory); void copyFrom(MemoryRangeType type, const Memory &memory); void fromHexBuffer(MemoryRangeType type, const HexBuffer &hb, WarningTypes &warningTypes, - QStringList &warnings, QMap &inRange); + TQStringList &warnings, TQMap &inRange); private: - QMap _ranges; + TQMap _ranges; void toHexBuffer(MemoryRangeType type, HexBuffer &hb) const; - virtual void savePartial(QTextStream &stream, HexBuffer::Format format) const; + virtual void savePartial(TQTextStream &stream, HexBuffer::Format format) const; virtual void fromHexBuffer(const HexBuffer &hb, WarningTypes &warningTypes, - QStringList &warnings, QMap &inRange); - QString findValue(const QString &maskName) const; - bool hasFlagOn(const QString &maskName, bool valueIfNotPresent) const; - void setFlagOn(const QString &maskName, bool on); - void setProtection(bool on, const QString &maskName, Protection::Type ptype); + TQStringList &warnings, TQMap &inRange); + TQString findValue(const TQString &tqmaskName) const; + bool hasFlagOn(const TQString &tqmaskName, bool valueIfNotPresent) const; + void setFlagOn(const TQString &tqmaskName, bool on); + void setProtection(bool on, const TQString &tqmaskName, Protection::Type ptype); AddressRange bootProtectedRange(Protection::Type ptype) const; AddressRange blockProtectedRange(Protection::Type ptype, uint block) const; }; diff --git a/src/devices/pic/prog/pic_debug.cpp b/src/devices/pic/prog/pic_debug.cpp index 443bb10..ebdcd75 100644 --- a/src/devices/pic/prog/pic_debug.cpp +++ b/src/devices/pic/prog/pic_debug.cpp @@ -13,14 +13,14 @@ #include "progs/manager/debug_manager.h" //---------------------------------------------------------------------------- -Register::TypeData Debugger::PicBase::registerTypeData(const QString &name) const +Register::TypeData Debugger::PicBase::registerTypeData(const TQString &name) const { const Pic::RegistersData &rdata = device()->registersData(); - Q_ASSERT(rdata.sfrs.contains(name)); + Q_ASSERT(rdata.sfrs.tqcontains(name)); return Register::TypeData(rdata.sfrs[name].address, rdata.nbChars()); } -bool Debugger::PicBase::updatePortStatus(uint index, QMap &bits) +bool Debugger::PicBase::updatePorttqStatus(uint index, TQMap &bits) { const Pic::RegistersData &rdata = device()->registersData(); BitValue tris; @@ -65,7 +65,7 @@ const Debugger::PicBase &Debugger::PicSpecific::base() const return static_cast(_base); } -bool Debugger::PicSpecific::updateStatus() +bool Debugger::PicSpecific::updatetqStatus() { if ( !Debugger::manager->readRegister(base().pcTypeData()) ) return false; if ( !Debugger::manager->readRegister(base().registerTypeData("STATUS")) ) return false; @@ -79,22 +79,22 @@ Register::TypeData Debugger::P16FSpecific::wregTypeData() const return Register::TypeData("WREG", device().registersData().nbChars()); } -QString Debugger::P16FSpecific::statusString() const +TQString Debugger::P16FSpecific::statusString() const { const Pic::RegistersData &rdata = device().registersData(); BitValue status = Register::list().value(base().registerTypeData("STATUS")); uint bank = (status.bit(5) ? 1 : 0) + (status.bit(6) ? 2 : 0); BitValue wreg = Register::list().value(wregTypeData()); - return QString("W:%1 %2 %3 %4 PC:%5 Bank:%6") - .arg(toHexLabel(wreg, rdata.nbChars())).arg(status.bit(2) ? "Z" : "z") - .arg(status.bit(1) ? "DC" : "dc").arg(status.bit(0) ? "C" : "c") - .arg(toHexLabel(_base.pc(), device().nbCharsAddress())).arg(bank); + return TQString("W:%1 %2 %3 %4 PC:%5 Bank:%6") + .tqarg(toHexLabel(wreg, rdata.nbChars())).tqarg(status.bit(2) ? "Z" : "z") + .tqarg(status.bit(1) ? "DC" : "dc").tqarg(status.bit(0) ? "C" : "c") + .tqarg(toHexLabel(_base.pc(), device().nbCharsAddress())).tqarg(bank); } //---------------------------------------------------------------------------- -bool Debugger::P18FSpecific::updateStatus() +bool Debugger::P18FSpecific::updatetqStatus() { - if ( !PicSpecific::updateStatus() ) return false; + if ( !PicSpecific::updatetqStatus() ) return false; if ( !Debugger::manager->readRegister(base().registerTypeData("BSR")) ) return false; return true; } @@ -104,15 +104,15 @@ Register::TypeData Debugger::P18FSpecific::wregTypeData() const return base().registerTypeData("WREG"); } -QString Debugger::P18FSpecific::statusString() const +TQString Debugger::P18FSpecific::statusString() const { const Pic::RegistersData &rdata = device().registersData(); BitValue status = Register::list().value(base().registerTypeData("STATUS")); BitValue bsr = Register::list().value(base().registerTypeData("BSR")); BitValue wreg = Register::list().value(wregTypeData()); - return QString("W:%1 %2 %3 %4 %5 %6 PC:%7 Bank:%8") - .arg(toHexLabel(wreg, rdata.nbChars())).arg(status.bit(4) ? "N" : "n") - .arg(status.bit(3) ? "OV" : "ov").arg(status.bit(2) ? "Z" : "z") - .arg(status.bit(1) ? "DC" : "dc").arg(status.bit(0) ? "C" : "c") - .arg(toHexLabel(base().pc(), device().nbCharsAddress())).arg(toLabel(bsr)); + return TQString("W:%1 %2 %3 %4 %5 %6 PC:%7 Bank:%8") + .tqarg(toHexLabel(wreg, rdata.nbChars())).tqarg(status.bit(4) ? "N" : "n") + .tqarg(status.bit(3) ? "OV" : "ov").tqarg(status.bit(2) ? "Z" : "z") + .tqarg(status.bit(1) ? "DC" : "dc").tqarg(status.bit(0) ? "C" : "c") + .tqarg(toHexLabel(base().pc(), device().nbCharsAddress())).tqarg(toLabel(bsr)); } diff --git a/src/devices/pic/prog/pic_debug.h b/src/devices/pic/prog/pic_debug.h index dfb8af6..ce08387 100644 --- a/src/devices/pic/prog/pic_debug.h +++ b/src/devices/pic/prog/pic_debug.h @@ -25,7 +25,7 @@ public: const Pic::Data &device() const { return static_cast(*_base.device()); } PicBase &base(); const PicBase &base() const; - virtual bool updateStatus(); + virtual bool updatetqStatus(); virtual Register::TypeData wregTypeData() const = 0; }; @@ -34,7 +34,7 @@ class P16FSpecific : public PicSpecific { public: P16FSpecific(Debugger::Base &base) : PicSpecific(base) {} - virtual QString statusString() const; + virtual TQString statusString() const; virtual Register::TypeData wregTypeData() const; }; @@ -43,8 +43,8 @@ class P18FSpecific : public PicSpecific { public: P18FSpecific(Debugger::Base &base) : PicSpecific(base) {} - virtual QString statusString() const; - virtual bool updateStatus(); + virtual TQString statusString() const; + virtual bool updatetqStatus(); virtual Register::TypeData wregTypeData() const; }; @@ -56,8 +56,8 @@ public: PicSpecific *deviceSpecific() { return static_cast(_deviceSpecific); } const PicSpecific *deviceSpecific() const { return static_cast(_deviceSpecific); } const Pic::Data *device() const { return static_cast(Debugger::Base::device()); } - Register::TypeData registerTypeData(const QString &name) const; - virtual bool updatePortStatus(uint index, QMap &bits); + Register::TypeData registerTypeData(const TQString &name) const; + virtual bool updatePorttqStatus(uint index, TQMap &bits); }; } // namespace diff --git a/src/devices/pic/prog/pic_prog.cpp b/src/devices/pic/prog/pic_prog.cpp index bc7dcd1..e882529 100644 --- a/src/devices/pic/prog/pic_prog.cpp +++ b/src/devices/pic/prog/pic_prog.cpp @@ -79,7 +79,7 @@ uint Programmer::PicBase::nbSteps(Task task, const Device::MemoryRange *range) c if ( !prange->all() && prange->_type!=type ) continue; nb += device()->nbWords(type); } - return QMAX(nb, uint(1)); + return TQMAX(nb, uint(1)); } case Task::Write: { uint nb = 0; @@ -90,7 +90,7 @@ uint Programmer::PicBase::nbSteps(Task task, const Device::MemoryRange *range) c nb += device()->nbWords(type); if ( readConfigEntry(Config::VerifyAfterProgram).toBool() ) nb += device()->nbWords(type); } - return QMAX(nb, uint(1)); + return TQMAX(nb, uint(1)); } case Task::Nb_Types: break; } @@ -106,9 +106,9 @@ bool Programmer::PicBase::readVoltages() if ( !group().canReadVoltage(Pic::VoltageType(i)) ) continue; if ( _voltages[i].error==true ) { ok = false; - log(Log::LineType::Error, i18n(" %1 = %2 V: error in voltage level.").arg(i18n(Pic::VOLTAGE_TYPE_LABELS[i])).arg(_voltages[i].value)); + log(Log::LineType::Error, i18n(" %1 = %2 V: error in voltage level.").tqarg(i18n(Pic::VOLTAGE_TYPE_LABELS[i])).tqarg(_voltages[i].value)); } else if ( _voltages[i].value!=UNKNOWN_VOLTAGE ) - log(Log::DebugLevel::Normal, QString(" %1 = %2 V").arg(i18n(Pic::VOLTAGE_TYPE_LABELS[i])).arg(_voltages[i].value)); + log(Log::DebugLevel::Normal, TQString(" %1 = %2 V").tqarg(i18n(Pic::VOLTAGE_TYPE_LABELS[i])).tqarg(_voltages[i].value)); } return ok; } @@ -136,10 +136,10 @@ bool Programmer::PicBase::initProgramming(Task) const Pic::VoltageData &tvpp = device()->voltage(Pic::Vpp); if ( vpp()tvpp.max ) { - QString s = i18n("Vpp (%1 V) is higher than the maximum voltage (%2 V). You may damage the device.") - .arg(vpp()).arg(tvpp.max); + TQString s = i18n("Vpp (%1 V) is higher than the maximum voltage (%2 V). You may damage the device.") + .tqarg(vpp()).tqarg(tvpp.max); log(Log::LineType::Warning, s); if ( !askContinue(s) ) { logUserAbort(); @@ -153,15 +153,15 @@ bool Programmer::PicBase::initProgramming(Task) if ( vdd()voltage(Pic::VddWrite).min!=tvdd.min ) log(Log::LineType::Warning, i18n("Vdd (%1 V) is too low for high-voltage programming\n(piklab only supports high-voltage programming at the moment).\nMinimum required is %2 V.") - .arg(vdd()).arg(tvdd.min)); + .tqarg(vdd()).tqarg(tvdd.min)); else if ( type==Pic::VddRead && device()->voltage(Pic::VddWrite).min!=tvdd.min ) log(Log::LineType::Warning, i18n("Vdd (%1 V) is too low for reading\nMinimum required is %2 V.") - .arg(vdd()).arg(tvdd.min)); + .tqarg(vdd()).tqarg(tvdd.min)); else log(Log::LineType::Warning, i18n("Vdd (%1 V) is too low for programming\nMinimum required is %2 V.") - .arg(vdd()).arg(tvdd.min)); + .tqarg(vdd()).tqarg(tvdd.min)); } else if ( vdd()>tvdd.max ) { - QString s = i18n("Vdd (%1 V) is higher than the maximum voltage (%2 V). You may damage the device.") - .arg(vdd()).arg(tvdd.max); + TQString s = i18n("Vdd (%1 V) is higher than the maximum voltage (%2 V). You may damage the device.") + .tqarg(vdd()).tqarg(tvdd.max); log(Log::LineType::Warning, s); if ( !askContinue(s) ) { logUserAbort(); @@ -177,8 +177,8 @@ bool Programmer::PicBase::initProgramming(Task) _deviceMemory->setArray(Pic::MemoryRangeType::Config, data); _hasProtectedCode = _deviceMemory->isProtected(Pic::Protection::ProgramProtected, Pic::MemoryRangeType::Code); _hasProtectedEeprom = _deviceMemory->isProtected(Pic::Protection::ProgramProtected, Pic::MemoryRangeType::Eeprom); - log(Log::DebugLevel::Normal, QString(" protected: code=%1 data=%2") - .arg(_hasProtectedCode ? "true" : "false").arg(_hasProtectedEeprom ? "true" : "false")); + log(Log::DebugLevel::Normal, TQString(" protected: code=%1 data=%2") + .tqarg(_hasProtectedCode ? "true" : "false").tqarg(_hasProtectedEeprom ? "true" : "false")); // read calibration if ( !readCalibration() ) return false; } @@ -250,45 +250,45 @@ bool Programmer::PicBase::verifyDeviceId() { if ( !specific()->canReadRange(Pic::MemoryRangeType::DeviceId ) ) return true; if ( !device()->isReadable(Pic::MemoryRangeType::DeviceId) ) { - log(Log::LineType::Information, i18n("Device not autodetectable: continuing with the specified device name \"%1\"...").arg(device()->name())); + log(Log::LineType::Information, i18n("Device not autodetectable: continuing with the specified device name \"%1\"...").tqarg(device()->name())); return true; } BitValue rawId = readDeviceId(); if ( hasError() ) return false; uint nbChars = device()->nbWords(Pic::MemoryRangeType::DeviceId) * device()->nbCharsWord(Pic::MemoryRangeType::DeviceId); - if ( rawId==0x0 || rawId==device()->mask(Pic::MemoryRangeType::DeviceId) ) { - log(Log::LineType::Error, i18n("Missing or incorrect device (Read id is %1).").arg(toHexLabel(rawId, nbChars))); + if ( rawId==0x0 || rawId==device()->tqmask(Pic::MemoryRangeType::DeviceId) ) { + log(Log::LineType::Error, i18n("Missing or incorrect device (Read id is %1).").tqarg(toHexLabel(rawId, nbChars))); return false; } - QMap ids; - QValueVector names = group().supportedDevices(); + TQMap ids; + TQValueVector names = group().supportedDevices(); for (uint k=0; k(group().deviceData(names[k]).data); if ( data->architecture()!=device()->architecture() ) continue; Device::IdData idata; if ( data->matchId(rawId, idata) ) ids[names[k]] = idata; } - QString message; + TQString message; if ( ids.count()!=0 ) { - log(Log::LineType::Information, i18n("Read id: %1").arg(device()->idNames(ids).join("; "))); - if ( ids.contains(device()->name()) ) return true; - message = i18n("Read id does not match the specified device name \"%1\".").arg(device()->name()); + log(Log::LineType::Information, i18n("Read id: %1").tqarg(device()->idNames(ids).join("; "))); + if ( ids.tqcontains(device()->name()) ) return true; + message = i18n("Read id does not match the specified device name \"%1\".").tqarg(device()->name()); } else { - log(Log::LineType::Warning, i18n(" Unknown or incorrect device (Read id is %1).").arg(toHexLabel(rawId, nbChars))); + log(Log::LineType::Warning, i18n(" Unknown or incorrect device (Read id is %1).").tqarg(toHexLabel(rawId, nbChars))); message = i18n("Unknown device."); } if ( !askContinue(message) ) { logUserAbort(); return false; } - log(Log::LineType::Information, i18n("Continue with the specified device name: \"%1\"...").arg(device()->name())); + log(Log::LineType::Information, i18n("Continue with the specified device name: \"%1\"...").tqarg(device()->name())); return true; } //----------------------------------------------------------------------------- -QString Programmer::PicBase::prettyCalibration(const Device::Array &data) const +TQString Programmer::PicBase::prettyCalibration(const Device::Array &data) const { - QString s; + TQString s; for (uint i=0; inbCharsWord(Pic::MemoryRangeType::Cal)); @@ -306,8 +306,8 @@ bool Programmer::PicBase::readCalibration() Device::Array data; if ( !specific()->read(Pic::MemoryRangeType::Cal, data, 0) ) return false; _deviceMemory->setArray(Pic::MemoryRangeType::Cal, data); - log(Log::DebugLevel::Normal, QString(" Read osccal: %1").arg(prettyCalibration(data))); - QString message; + log(Log::DebugLevel::Normal, TQString(" Read osccal: %1").tqarg(prettyCalibration(data))); + TQString message; if ( !device()->checkCalibration(data, &message) ) log(Log::LineType::Warning, " " + message); if ( device()->isReadable(Pic::MemoryRangeType::CalBackup) ) { if ( !specific()->canReadRange(Pic::MemoryRangeType::CalBackup) ) { @@ -316,7 +316,7 @@ bool Programmer::PicBase::readCalibration() } if ( !specific()->read(Pic::MemoryRangeType::CalBackup, data, 0) ) return false; _deviceMemory->setArray(Pic::MemoryRangeType::CalBackup, data); - log(Log::DebugLevel::Normal, QString(" Read osccal backup: %1").arg(prettyCalibration(data))); + log(Log::DebugLevel::Normal, TQString(" Read osccal backup: %1").tqarg(prettyCalibration(data))); if ( !device()->checkCalibration(data, &message) ) log(Log::LineType::Warning, " " + message); } } @@ -366,22 +366,22 @@ bool Programmer::PicBase::restoreBandGapBits() if ( !specific()->canReadRange(Pic::MemoryRangeType::Config) ) return true; bool hasProtectedBits = false; for (uint i=0; inbWords(Pic::MemoryRangeType::Config); i++) - if ( device()->config()._words[i].pmask!=0 ) hasProtectedBits = true; + if ( device()->config()._words[i].ptqmask!=0 ) hasProtectedBits = true; if ( !hasProtectedBits ) return true; Device::Array cdata; if ( !specific()->read(Pic::MemoryRangeType::Config, cdata, 0) ) return false; Device::Array data = _deviceMemory->arrayForWriting(Pic::MemoryRangeType::Config); for (uint i=0; iconfig()._words[i].pmask; - if ( pmask==0 ) continue; - cdata[i] = cdata[i].clearMaskBits(pmask); - cdata[i] |= data[i].maskWith(pmask); + BitValue ptqmask = device()->config()._words[i].ptqmask; + if ( ptqmask==0 ) continue; + cdata[i] = cdata[i].clearMaskBits(ptqmask); + cdata[i] |= data[i].tqmaskWith(ptqmask); } if ( !specific()->canWriteRange(Pic::MemoryRangeType::Config) ) { log(Log::LineType::Warning, i18n("Could not restore band gap bits because programmer does not support writing config bits.")); return true; } - log(Log::DebugLevel::Normal, QString(" Write config with band gap bits: %2").arg(toHexLabel(cdata[0], device()->nbCharsWord(Pic::MemoryRangeType::Config)))); + log(Log::DebugLevel::Normal, TQString(" Write config with band gap bits: %2").tqarg(toHexLabel(cdata[0], device()->nbCharsWord(Pic::MemoryRangeType::Config)))); if ( !programRange(Pic::MemoryRangeType::Config, cdata) ) return false; if ( !specific()->read(Pic::MemoryRangeType::Config, data, 0) ) return false; if ( data==cdata ) log(Log::LineType::Information, i18n(" Band gap bits have been preserved.")); @@ -464,7 +464,7 @@ bool Programmer::PicBase::internalEraseRange(Pic::MemoryRangeType type) log(Log::LineType::SoftError, i18n("Cannot erase specified range because of programmer limitations.")); return false; } - if ( !askContinue(i18n("%1: Erasing this range only is not supported with this programmer. This will erase the whole chip and restore the other memory ranges.").arg(type.label())) ) { + if ( !askContinue(i18n("%1: Erasing this range only is not supported with this programmer. This will erase the whole chip and restore the other memory ranges.").tqarg(type.label())) ) { logUserAbort(); return false; } @@ -497,19 +497,19 @@ bool Programmer::PicBase::readRange(Pic::MemoryRangeType type, Pic::Memory *memo { if ( !device()->isReadable(type) ) return true; if ( !specific()->canReadRange(type) ) { - log(Log::LineType::Information, i18n("The selected programmer cannot read %1: operation skipped.").arg(type.label())); + log(Log::LineType::Information, i18n("The selected programmer cannot read %1: operation skipped.").tqarg(type.label())); return true; } VerifyData *vdata = (vd ? new VerifyData(vd->actions, vd->memory) : 0); if (vdata) { - log(Log::LineType::Information, i18n(" Verify memory: %1").arg(type.label())); + log(Log::LineType::Information, i18n(" Verify memory: %1").tqarg(type.label())); if ( !(vdata->actions & IgnoreProtectedVerify) ) { vdata->protectedRanges = static_cast(vdata->memory).protectedRanges(Pic::Protection::ProgramProtected, type); if ( !vdata->protectedRanges.isEmpty() ) log(Log::LineType::Warning, i18n(" Part of device memory is protected (in %1) and cannot be verified.") - .arg(type.label())); + .tqarg(type.label())); } else vdata->protectedRanges.clear(); } else { - log(Log::LineType::Information, i18n(" Read memory: %1").arg(type.label())); + log(Log::LineType::Information, i18n(" Read memory: %1").tqarg(type.label())); CRASH_ASSERT(memory); } Device::Array data; @@ -562,7 +562,7 @@ bool Programmer::PicBase::programSingle(Pic::MemoryRangeType type, const Pic::Me bool Programmer::PicBase::programRange(Pic::MemoryRangeType mtype, const Device::Array &data) { - log(Log::LineType::Information, i18n(" Write memory: %1").arg(mtype.label())); + log(Log::LineType::Information, i18n(" Write memory: %1").tqarg(mtype.label())); bool only = ( readConfigEntry(Config::OnlyProgramNonMask).toBool() && (mtype==Pic::MemoryRangeType::Code || mtype==Pic::MemoryRangeType::Eeprom) ); return specific()->write(mtype, data, !only); @@ -670,17 +670,17 @@ bool Programmer::PicBase::internalProgram(const Device::Memory &memory, const De //----------------------------------------------------------------------------- bool Programmer::PicBase::checkProgramCalibration(const Device::Array &data) { - QString message, s = prettyCalibration(data); + TQString message, s = prettyCalibration(data); if ( !device()->checkCalibration(data, &message) ) { - sorry(i18n("The calibration word %1 is not valid.").arg(s), message); + sorry(i18n("The calibration word %1 is not valid.").tqarg(s), message); return false; } - return askContinue(i18n("Do you want to overwrite the device calibration with %1?").arg(s)); + return askContinue(i18n("Do you want to overwrite the device calibration with %1?").tqarg(s)); } bool Programmer::PicBase::tryProgramCalibration(const Device::Array &data, bool &success) { - log(Log::LineType::Information, i18n(" Write memory: %1").arg(Pic::MemoryRangeType(Pic::MemoryRangeType::Cal).label())); + log(Log::LineType::Information, i18n(" Write memory: %1").tqarg(Pic::MemoryRangeType(Pic::MemoryRangeType::Cal).label())); success = true; if ( !specific()->write(Pic::MemoryRangeType::Cal, data, true) ) return false; Device::Array read; @@ -691,7 +691,7 @@ bool Programmer::PicBase::tryProgramCalibration(const Device::Array &data, bool if ( device()->isWritable(Pic::MemoryRangeType::CalBackup) ) { if ( !specific()->read(Pic::MemoryRangeType::CalBackup, read, 0) ) return false; if ( device()->checkCalibration(read) ) return true; // do not overwrite correct backup value - log(Log::LineType::Information, i18n(" Write memory: %1").arg(Pic::MemoryRangeType(Pic::MemoryRangeType::CalBackup).label())); + log(Log::LineType::Information, i18n(" Write memory: %1").tqarg(Pic::MemoryRangeType(Pic::MemoryRangeType::CalBackup).label())); if ( !specific()->write(Pic::MemoryRangeType::CalBackup, data, true) ) return false; if ( !specific()->read(Pic::MemoryRangeType::CalBackup, read, 0) ) return false; for (uint i=0; i(this)->log(Log::DebugLevel::Normal, QString("start before align: %1").arg(start)); + if ( data[start]!=device().tqmask(type) ) break; + const_cast(this)->log(Log::DebugLevel::Normal, TQString("start before align: %1").tqarg(start)); uint align = device().nbWordsWriteAlignment(type); start -= start % align; - const_cast(this)->log(Log::DebugLevel::Normal, QString("start after align: %1 (align=%2)").arg(start).arg(align)); + const_cast(this)->log(Log::DebugLevel::Normal, TQString("start after align: %1 (align=%2)").tqarg(start).tqarg(align)); return start; } @@ -40,11 +40,11 @@ uint Programmer::PicDeviceSpecific::findNonMaskEnd(Pic::MemoryRangeType type, co { uint end = data.count()-1; for (; end>0; end--) - if ( data[end]!=device().mask(type) ) break; - const_cast(this)->log(Log::DebugLevel::Normal, QString("end before align: %1").arg(end)); + if ( data[end]!=device().tqmask(type) ) break; + const_cast(this)->log(Log::DebugLevel::Normal, TQString("end before align: %1").tqarg(end)); uint align = device().nbWordsWriteAlignment(type); if ( (end+1) % align ) end += align - (end+1) % align; - const_cast(this)->log(Log::DebugLevel::Normal, QString("end after align: %1 (align=%2)").arg(end).arg(align)); + const_cast(this)->log(Log::DebugLevel::Normal, TQString("end after align: %1 (align=%2)").tqarg(end).tqarg(align)); Q_ASSERT(end(vdata.memory).normalizedWord(type, i); BitValue d = static_cast(vdata.memory).normalizeWord(type, i, word); if ( type==Pic::MemoryRangeType::Config ) { - BitValue pmask = device().config()._words[i].pmask; - v = v.clearMaskBits(pmask); - d = d.clearMaskBits(pmask); + BitValue ptqmask = device().config()._words[i].ptqmask; + v = v.clearMaskBits(ptqmask); + d = d.clearMaskBits(ptqmask); } return compareWords(type, i, v, d, vdata.actions); } diff --git a/src/devices/pic/prog/pic_prog_specific.h b/src/devices/pic/prog/pic_prog_specific.h index fef8a61..249aba6 100644 --- a/src/devices/pic/prog/pic_prog_specific.h +++ b/src/devices/pic/prog/pic_prog_specific.h @@ -66,13 +66,13 @@ public: double value; bool error; }; - class VoltagesData : public QValueVector { + class VoltagesData : public TQValueVector { public: - VoltagesData() : QValueVector(Pic::Nb_VoltageTypes) {} + VoltagesData() : TQValueVector(Pic::Nb_VoltageTypes) {} }; public: - PicHardware(::Programmer::Base &base, Port::Base *port, const QString &name) : Hardware(base, port, name) {} + PicHardware(::Programmer::Base &base, Port::Base *port, const TQString &name) : Hardware(base, port, name) {} const Pic::Data &device() const { return static_cast(*_base.device()); } virtual bool readVoltages(VoltagesData &) { return true; } virtual bool getTargetMode(Pic::TargetMode &mode) { mode = Pic::TargetInProgramming; return true; } diff --git a/src/devices/pic/xml/pic_xml_to_data.cpp b/src/devices/pic/xml/pic_xml_to_data.cpp index f3675de..7f727ff 100644 --- a/src/devices/pic/xml/pic_xml_to_data.cpp +++ b/src/devices/pic/xml/pic_xml_to_data.cpp @@ -6,8 +6,8 @@ * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * ***************************************************************************/ -#include -#include +#include +#include #include "xml_to_data/device_xml_to_data.h" #include "common/common/misc.h" @@ -19,17 +19,17 @@ namespace Pic class XmlToData : public Device::XmlToData { private: - virtual QString namespaceName() const { return "Pic"; } + virtual TQString namespaceName() const { return "Pic"; } -bool getVoltages(ProgVoltageType type, QDomElement element) +bool getVoltages(ProgVoltageType type, TQDomElement element) { - QDomElement voltages = findUniqueElement(element, "voltages", "name", type.key()); + TQDomElement voltages = findUniqueElement(element, "voltages", "name", type.key()); if ( voltages.isNull() ) return false; bool ok1, ok2, ok3; data()->_voltages[type].min = voltages.attribute("min").toDouble(&ok1); data()->_voltages[type].max = voltages.attribute("max").toDouble(&ok2); data()->_voltages[type].nominal = voltages.attribute("nominal").toDouble(&ok3); - if ( !ok1 || !ok2 || !ok3 ) qFatal(QString("Cannot extract voltage value for \"%1\"").arg(type.key())); + if ( !ok1 || !ok2 || !ok3 ) qFatal(TQString("Cannot extract voltage value for \"%1\"").tqarg(type.key())); if ( data()->_voltages[type].min>data()->_voltages[type].max || data()->_voltages[type].nominal_voltages[type].min || data()->_voltages[type].nominal>data()->_voltages[type].max ) @@ -37,9 +37,9 @@ bool getVoltages(ProgVoltageType type, QDomElement element) return true; } -bool getMemoryRange(MemoryRangeType type, QDomElement element) +bool getMemoryRange(MemoryRangeType type, TQDomElement element) { - QDomElement range = findUniqueElement(element, "memory", "name", type.key()); + TQDomElement range = findUniqueElement(element, "memory", "name", type.key()); if ( range.isNull() ) return false; data()->_ranges[type].properties = Present; bool ok; @@ -50,11 +50,11 @@ bool getMemoryRange(MemoryRangeType type, QDomElement element) if ( !ok ) qFatal("Cannot extract end address"); if ( data()->_ranges[type].end_ranges[type].start ) qFatal("Memory range end is before its start"); uint nbCharsWord = data()->nbCharsWord(type); - if ( data()->nbBitsWord(type)==0 ) qFatal(QString("Architecture doesn't contain memory range %1").arg(type.key())); + if ( data()->nbBitsWord(type)==0 ) qFatal(TQString("Architecture doesn't contain memory range %1").tqarg(type.key())); if ( type==MemoryRangeType::UserId ) { - data()->_userIdRecommendedMask = fromHexLabel(range.attribute("rmask"), nbCharsWord, &ok); - if ( !ok ) qFatal("Cannot extract rmask value for user id"); - if ( !data()->_userIdRecommendedMask.isInside(data()->mask(type)) ) qFatal(QString("rmask is not inside mask %1 (%2)").arg(toHexLabel(data()->_userIdRecommendedMask, 8)).arg(toHexLabel(data()->mask(type), 8))); + data()->_userIdRecommendedMask = fromHexLabel(range.attribute("rtqmask"), nbCharsWord, &ok); + if ( !ok ) qFatal("Cannot extract rtqmask value for user id"); + if ( !data()->_userIdRecommendedMask.isInside(data()->tqmask(type)) ) qFatal(TQString("rtqmask is not inside tqmask %1 (%2)").tqarg(toHexLabel(data()->_userIdRecommendedMask, 8)).tqarg(toHexLabel(data()->tqmask(type), 8))); } if ( range.attribute("hexfile_offset")!="?" ) { data()->_ranges[type].properties |= Programmable; @@ -64,15 +64,15 @@ bool getMemoryRange(MemoryRangeType type, QDomElement element) } } if ( type==MemoryRangeType::Cal && !data()->is18Family() ) { - data()->_calibration.opcodeMask = fromHexLabel(range.attribute("cal_opmask"), nbCharsWord, &ok); - if ( !ok ) qFatal("Cannot extract calibration opcode mask"); + data()->_calibration.opcodeMask = fromHexLabel(range.attribute("cal_optqmask"), nbCharsWord, &ok); + if ( !ok ) qFatal("Cannot extract calibration opcode tqmask"); data()->_calibration.opcode = fromHexLabel(range.attribute("cal_opcode"), nbCharsWord, &ok); if ( !ok ) qFatal("Cannot extract calibration opcode"); - if ( !data()->_calibration.opcode.isInside(data()->_calibration.opcodeMask) ) qFatal("Calibration opcode should be inside opcode mask"); - if ( !data()->_calibration.opcodeMask.isInside(data()->mask(type)) ) qFatal("Calibration mask should be inside opcode mask"); + if ( !data()->_calibration.opcode.isInside(data()->_calibration.opcodeMask) ) qFatal("Calibration opcode should be inside opcode tqmask"); + if ( !data()->_calibration.opcodeMask.isInside(data()->tqmask(type)) ) qFatal("Calibration tqmask should be inside opcode tqmask"); } - QString wwa = range.attribute("word_write_align"); - QString wea = range.attribute("word_erase_align"); + TQString wwa = range.attribute("word_write_align"); + TQString wea = range.attribute("word_erase_align"); if ( type==MemoryRangeType::Code ) { if ( data()->_architecture==Architecture::P18F || data()->_architecture==Architecture::P18J ) { data()->_nbWordsCodeWrite = wwa.toUInt(&ok); @@ -88,31 +88,31 @@ bool getMemoryRange(MemoryRangeType type, QDomElement element) return true; } -bool hasValue(const Pic::Config::Mask &mask, BitValue value) +bool hasValue(const Pic::Config::Mask &tqmask, BitValue value) { - for (uint i=0; iarchitecture()!=Pic::Architecture::P18J && data()->architecture()!=Pic::Architecture::P24H && data()->architecture()!=Pic::Architecture::P24F && data()->architecture()!=Pic::Architecture::P33F && data()->name()!="30F1010" && data()->name()!="30F2020" && data()->name()!="30F2023" ) - qFatal(QString("cname not defined for \"%1\" (%2)").arg(cvalue.name).arg(cmask.name)); + qFatal(TQString("cname not defined for \"%1\" (%2)").tqarg(cvalue.name).tqarg(ctqmask.name)); } if ( cnames.count()==1 && cnames[0]=="_" ) cnames.clear(); for (uint i=0; inbCharsWord(MemoryRangeType::Config); - BitValue mask = cmask.value.complementInMask(maxValue(NumberBase::Hex, nbChars)); - if ( ok && v==(mask | cvalue.value) ) continue; + BitValue tqmask = ctqmask.value.complementInMask(maxValue(NumberBase::Hex, nbChars)); + if ( ok && v==(tqmask | cvalue.value) ) continue; } else if ( XOR(cnames[i].startsWith("_"), data()->architecture()==Pic::Architecture::P30F) ) continue; - qFatal(QString("Invalid config name for \"%1\"/\"%2\"").arg(cmask.name).arg(cvalue.name)); + qFatal(TQString("Invalid config name for \"%1\"/\"%2\"").tqarg(ctqmask.name).tqarg(cvalue.name)); } - QStringList &ecnames = cvalue.configNames[Pic::ConfigNameType::Extra]; + TQStringList &ecnames = cvalue.configNames[Pic::ConfigNameType::Extra]; for (uint i=0; inbCharsWord(MemoryRangeType::Config); bool ok; - QString defName; - QMap defConfigNames; - Config::Mask cmask; - cmask.name = mask.attribute("name"); - if ( !Config::hasMaskName(cmask.name) ) qFatal(QString("Unknown mask name %1").arg(cmask.name)); - cmask.value = fromHexLabel(mask.attribute("value"), nbChars, &ok); - if ( !ok || cmask.value==0 || cmask.value>data()->mask(MemoryRangeType::Config) ) - qFatal(QString("Malformed mask value in mask %1").arg(mask.attribute("name"))); - //QStringList names; - QDomNode child = mask.firstChild(); + TQString defName; + TQMap defConfigNames; + Config::Mask ctqmask; + ctqmask.name = tqmask.attribute("name"); + if ( !Config::hasMaskName(ctqmask.name) ) qFatal(TQString("Unknown tqmask name %1").tqarg(ctqmask.name)); + ctqmask.value = fromHexLabel(tqmask.attribute("value"), nbChars, &ok); + if ( !ok || ctqmask.value==0 || ctqmask.value>data()->tqmask(MemoryRangeType::Config) ) + qFatal(TQString("Malformed tqmask value in tqmask %1").tqarg(tqmask.attribute("name"))); + //TQStringList names; + TQDomNode child = tqmask.firstChild(); while ( !child.isNull() ) { - QDomElement value = child.toElement(); + TQDomElement value = child.toElement(); child = child.nextSibling(); if ( value.isNull() ) continue; - if ( value.nodeName()!="value" ) qFatal(QString("Non value child in mask %1").arg(cmask.name)); + if ( value.nodeName()!="value" ) qFatal(TQString("Non value child in tqmask %1").tqarg(ctqmask.name)); if ( value.attribute("value")=="default" ) { - if ( !defName.isEmpty() ) qFatal(QString("Default value already defined for mask %1").arg(cmask.name)); + if ( !defName.isEmpty() ) qFatal(TQString("Default value already defined for tqmask %1").tqarg(ctqmask.name)); defName = value.attribute("name"); - //if ( names.contains(defName) ) qFatal(QString("Value name duplicated in mask %1").arg(cmask.name)); + //if ( names.tqcontains(defName) ) qFatal(TQString("Value name duplicated in tqmask %1").tqarg(ctqmask.name)); //names.append(defName); - FOR_EACH(Pic::ConfigNameType, type) defConfigNames[type] = QStringList::split(' ', value.attribute(type.data().key)); + FOR_EACH(Pic::ConfigNameType, type) defConfigNames[type] = TQStringList::split(' ', value.attribute(type.data().key)); continue; } Config::Value cvalue; cvalue.value = fromHexLabel(value.attribute("value"), nbChars, &ok); - if ( !ok || !cvalue.value.isInside(cmask.value) ) qFatal(QString("Malformed value in mask %1").arg(cmask.name)); + if ( !ok || !cvalue.value.isInside(ctqmask.value) ) qFatal(TQString("Malformed value in tqmask %1").tqarg(ctqmask.name)); cvalue.name = value.attribute("name"); - //if ( names.contains(cvalue.name) ) qFatal(QString("Value name duplicated in mask %1").arg(cmask.name)); + //if ( names.tqcontains(cvalue.name) ) qFatal(TQString("Value name duplicated in tqmask %1").tqarg(ctqmask.name)); //names.append(cvalue.name); - FOR_EACH(Pic::ConfigNameType, type) cvalue.configNames[type] = QStringList::split(' ', value.attribute(type.data().key)); - processName(cmask, pmask, cvalue); - cmask.values.append(cvalue); + FOR_EACH(Pic::ConfigNameType, type) cvalue.configNames[type] = TQStringList::split(' ', value.attribute(type.data().key)); + processName(ctqmask, ptqmask, cvalue); + ctqmask.values.append(cvalue); } // add default values if ( !defName.isEmpty() ) { uint nb = 0; BitValue::const_iterator it; - for (it=cmask.value.begin(); it!=cmask.value.end(); ++it) { - if ( hasValue(cmask, *it) ) continue; // already set + for (it=ctqmask.value.begin(); it!=ctqmask.value.end(); ++it) { + if ( hasValue(ctqmask, *it) ) continue; // already set nb++; Config::Value cvalue; cvalue.value = *it; cvalue.name = defName; cvalue.configNames = defConfigNames; - processName(cmask, pmask, cvalue); - cmask.values.append(cvalue); + processName(ctqmask, ptqmask, cvalue); + ctqmask.values.append(cvalue); } - if ( nb<=1 ) qFatal(QString("Default value used less than twice in mask %1").arg(cmask.name)); + if ( nb<=1 ) qFatal(TQString("Default value used less than twice in tqmask %1").tqarg(ctqmask.name)); } - qHeapSort(cmask.values); - return cmask; + qHeapSort(ctqmask.values); + return ctqmask; } -Pic::Config::Word toConfigWord(QDomElement config) +Pic::Config::Word toConfigWord(TQDomElement config) { uint nbChars = data()->nbCharsWord(MemoryRangeType::Config); Config::Word cword; cword.name = config.attribute("name"); if ( cword.name.isNull() ) qFatal("Config word name not specified."); bool ok; - cword.wmask = fromHexLabel(config.attribute("wmask"), nbChars, &ok); - BitValue gmask = data()->mask(MemoryRangeType::Config); - if ( !ok || cword.wmask>gmask ) qFatal(QString("Missing or malformed config wmask \"%1\"").arg(config.attribute("wmask"))); + cword.wtqmask = fromHexLabel(config.attribute("wtqmask"), nbChars, &ok); + BitValue gtqmask = data()->tqmask(MemoryRangeType::Config); + if ( !ok || cword.wtqmask>gtqmask ) qFatal(TQString("Missing or malformed config wtqmask \"%1\"").tqarg(config.attribute("wtqmask"))); cword.bvalue = fromHexLabel(config.attribute("bvalue"), nbChars, &ok); - if ( !ok ) qFatal(QString("Missing or malformed config bvalue \"%1\"").arg(config.attribute("bvalue"))); - if ( config.attribute("pmask").isEmpty() ) cword.pmask = 0; + if ( !ok ) qFatal(TQString("Missing or malformed config bvalue \"%1\"").tqarg(config.attribute("bvalue"))); + if ( config.attribute("ptqmask").isEmpty() ) cword.ptqmask = 0; else { bool ok; - cword.pmask = fromHexLabel(config.attribute("pmask"), nbChars, &ok); - if ( !ok || cword.pmask>gmask ) qFatal("Missing or malformed config pmask"); + cword.ptqmask = fromHexLabel(config.attribute("ptqmask"), nbChars, &ok); + if ( !ok || cword.ptqmask>gtqmask ) qFatal("Missing or malformed config ptqmask"); } - cword.ignoredCNames = QStringList::split(' ', config.attribute("icnames")); + cword.ignoredCNames = TQStringList::split(' ', config.attribute("icnames")); for (uint i=0; i_architecture==Pic::Architecture::P30F ) cword.cmask = cword.wmask; - else cword.cmask = mask; + qHeapSort(cword.tqmasks); + BitValue tqmask = (cword.usedMask() | cword.bvalue).clearMaskBits(cword.ptqmask); + if ( config.attribute("ctqmask").isEmpty() ) { + if ( data()->_architecture==Pic::Architecture::P30F ) cword.ctqmask = cword.wtqmask; + else cword.ctqmask = tqmask; } else { bool ok; - cword.cmask = fromHexLabel(config.attribute("cmask"), nbChars, &ok); - if ( !ok || cword.cmask>gmask ) qFatal("Missing or malformed config cmask"); - //if ( data()->_architecture==Pic::Architecture::P30X &&cword.cmask==cword.wmask ) qFatal(QString("Redundant cmask in %1").arg(cword.name)); - if ( cword.cmask==mask ) qFatal(QString("Redundant cmask in %1").arg(cword.name)); + cword.ctqmask = fromHexLabel(config.attribute("ctqmask"), nbChars, &ok); + if ( !ok || cword.ctqmask>gtqmask ) qFatal("Missing or malformed config ctqmask"); + //if ( data()->_architecture==Pic::Architecture::P30X &&cword.ctqmask==cword.wtqmask ) qFatal(TQString("Redundant ctqmask in %1").tqarg(cword.name)); + if ( cword.ctqmask==tqmask ) qFatal(TQString("Redundant ctqmask in %1").tqarg(cword.name)); } - if ( !cword.pmask.isInside(cword.usedMask()) ) qFatal("pmask should be inside or'ed mask values."); + if ( !cword.ptqmask.isInside(cword.usedMask()) ) qFatal("ptqmask should be inside or'ed tqmask values."); return cword; } -QValueVector getConfigWords(QDomElement element) +TQValueVector getConfigWords(TQDomElement element) { uint nbWords = data()->nbWords(MemoryRangeType::Config); - QValueVector configWords(nbWords); - QDomNode child = element.firstChild(); + TQValueVector configWords(nbWords); + TQDomNode child = element.firstChild(); while ( !child.isNull() ) { - QDomElement config = child.toElement(); + TQDomElement config = child.toElement(); child = child.nextSibling(); if ( config.isNull() || config.nodeName()!="config" ) continue; bool ok; @@ -255,25 +255,25 @@ QValueVector getConfigWords(QDomElement element) if ( !ok ) qFatal("Missing or malformed config offset"); if ( (offset % data()->addressIncrement(MemoryRangeType::Config))!=0 ) qFatal("Config offset not aligned"); offset /= data()->addressIncrement(MemoryRangeType::Config); - if ( offset>=nbWords ) qFatal(QString("Offset too big %1/%2").arg(offset).arg(nbWords)); - if ( !configWords[offset].name.isNull() ) qFatal(QString("Config offset %1 is duplicated").arg(offset)); + if ( offset>=nbWords ) qFatal(TQString("Offset too big %1/%2").tqarg(offset).tqarg(nbWords)); + if ( !configWords[offset].name.isNull() ) qFatal(TQString("Config offset %1 is duplicated").tqarg(offset)); for (uint i=0; i_config->protection(); - QString valueName; + TQString valueName; if ( protection.family()==Protection::BlockProtection ) { valueName = checksum.attribute("protected_blocks"); bool ok; @@ -281,10 +281,10 @@ QString getChecksumData(QDomElement checksum) uint max = (protection.hasBootBlock() ? 1 : 0) + protection.nbBlocks(); if ( !ok || nb>max ) qFatal("Invalid number of protected blocks for checksum"); if ( nb>0 ) cdata.protectedMaskNames += "CPB"; - for (uint i=1; i_config->findMask(protection.bootSizeMaskName()); - if ( mask==0 ) { + const Config::Mask *tqmask = data()->_config->findMask(protection.bootSizeMaskName()); + if ( tqmask==0 ) { if ( !cdata.bbsize.isEmpty() ) qFatal("Device does not have a variable boot size (no \"bbsize\" allowed in checksum)"); } else if ( cdata.bbsize.isEmpty() ) { if ( nb==1 ) qFatal("\"bbsize\" should be define in checksum for \"protected_blocks\"==1"); @@ -298,9 +298,9 @@ QString getChecksumData(QDomElement checksum) if ( protection.family()==Protection::NoProtection && !valueName.isEmpty() ) qFatal("Checksum protected attribute for device with no code protection"); } - if ( data()->_checksums.contains(valueName) ) qFatal("Duplicate checksum protected range"); + if ( data()->_checksums.tqcontains(valueName) ) qFatal("Duplicate checksum protected range"); - QString s = checksum.attribute("constant"); + TQString s = checksum.attribute("constant"); if ( s.isEmpty() ) cdata.constant = 0x0000; else { bool ok; @@ -317,16 +317,16 @@ QString getChecksumData(QDomElement checksum) s = checksum.attribute("mprotected"); if ( !s.isEmpty() ) { - QStringList list = QStringList::split(" ", s); + TQStringList list = TQStringList::split(" ", s); for (uint i=0; iconfig().findMask(list[i]); - if ( mask==0 ) qFatal(QString("Not valid mask name for \"protected\" tag in checksum: %1").arg(list[i])); - if ( mask->values.count()==2 ) continue; - for (uint k=0; kvalues.count()); k++) { - QString valueName = mask->values[k].name; + const Config::Mask *tqmask = data()->config().findMask(list[i]); + if ( tqmask==0 ) qFatal(TQString("Not valid tqmask name for \"protected\" tag in checksum: %1").tqarg(list[i])); + if ( tqmask->values.count()==2 ) continue; + for (uint k=0; kvalues.count()); k++) { + TQString valueName = tqmask->values[k].name; if ( valueName.isEmpty() ) continue; if ( !protection.isNoneProtectedValueName(valueName) && !protection.isAllProtectedValueName(valueName) ) - qFatal(QString("Not switch protection from mask name for \"protected\" tag in checksum: %1").arg(list[i])); + qFatal(TQString("Not switch protection from tqmask name for \"protected\" tag in checksum: %1").tqarg(list[i])); } } cdata.protectedMaskNames = list; @@ -352,25 +352,25 @@ QString getChecksumData(QDomElement checksum) return valueName; } -virtual void processDevice(QDomElement device) +virtual void processDevice(TQDomElement device) { Device::XmlToDataBase::processDevice(device); - QString arch = device.attribute("architecture"); + TQString arch = device.attribute("architecture"); data()->_architecture = Architecture::fromKey(arch); - if ( data()->_architecture==Architecture::Nb_Types ) qFatal(QString("Unrecognized architecture \"%1\"").arg(arch)); - if ( (data()->_architecture==Architecture::P18F && data()->_name.contains("C")) - || (data()->_architecture==Architecture::P18F && data()->_name.contains("J")) ) qFatal("Not matching family"); + if ( data()->_architecture==Architecture::Nb_Types ) qFatal(TQString("Unrecognized architecture \"%1\"").tqarg(arch)); + if ( (data()->_architecture==Architecture::P18F && data()->_name.tqcontains("C")) + || (data()->_architecture==Architecture::P18F && data()->_name.tqcontains("J")) ) qFatal("Not matching family"); bool ok; - QString pc = device.attribute("pc"); + TQString pc = device.attribute("pc"); data()->_nbBitsPC = data()->_architecture.data().nbBitsPC; if ( data()->_nbBitsPC==0 ) { data()->_nbBitsPC = pc.toUInt(&ok); if ( !ok || data()->_nbBitsPC==0 ) qFatal("Malformed or missing PC"); } else if ( !pc.isEmpty() ) qFatal("No PC should be provided for this device architecture"); - QString sw = device.attribute("self_write"); + TQString sw = device.attribute("self_write"); data()->_selfWrite = (data()->_memoryTechnology!=Device::MemoryTechnology::Flash ? SelfWrite::No : data()->_architecture.data().selfWrite); if ( data()->_selfWrite==SelfWrite::Nb_Types ) { data()->_selfWrite = SelfWrite::fromKey(sw); @@ -379,8 +379,8 @@ virtual void processDevice(QDomElement device) // device ids FOR_EACH(Device::Special, special) { - QString key = "id" + (special==Device::Special::Normal ? QString::null : QString("_") + special.key()); - QString id = device.attribute(key); + TQString key = "id" + (special==Device::Special::Normal ? TQString() : TQString("_") + special.key()); + TQString id = device.attribute(key); if ( id.isEmpty() ) { if ( special==Device::Special::Normal ) data()->_ids[special] = 0x0000; } else { @@ -390,13 +390,13 @@ virtual void processDevice(QDomElement device) } // voltages - QStringList names; + TQStringList names; FOR_EACH(ProgVoltageType, vtype) { names += vtype.key(); if ( !getVoltages(vtype, device) ) { switch (vtype.type()) { case ProgVoltageType::Vpp: - case ProgVoltageType::VddBulkErase: qFatal(QString("Voltage \"%1\" not defined").arg(vtype.key())); + case ProgVoltageType::VddBulkErase: qFatal(TQString("Voltage \"%1\" not defined").tqarg(vtype.key())); case ProgVoltageType::VddWrite: data()->_voltages[ProgVoltageType::VddWrite] = data()->_voltages[ProgVoltageType::VddBulkErase]; break; case ProgVoltageType::Nb_Types: Q_ASSERT(false); break; } @@ -426,7 +426,7 @@ virtual void processDevice(QDomElement device) Address start2 = data()->_ranges[i].start + data()->_ranges[i].hexFileOffset; Address end2 = data()->_ranges[i].end + data()->_ranges[i].hexFileOffset; if ( end1>=start2 && start1<=end2 ) - qFatal(QString("Overlapping memory ranges (%1 and %2)").arg(k.key()).arg(i.key())); + qFatal(TQString("Overlapping memory ranges (%1 and %2)").tqarg(k.key()).tqarg(i.key())); } } checkTagNames(device, "memory", names); @@ -434,24 +434,24 @@ virtual void processDevice(QDomElement device) qFatal("Id present and device id memory range absent or the opposite"); // config words - QValueVector cwords = getConfigWords(device); + TQValueVector cwords = getConfigWords(device); uint nbWords = data()->nbWords(MemoryRangeType::Config); data()->_config->_words.resize(nbWords); FOR_EACH(Pic::ConfigNameType, type) { - QMap cnames; // cname -> mask name + TQMap cnames; // cname -> tqmask name for (uint i=0; i_config->_words[i] = cwords[i]; const Config::Word &word = data()->_config->_words[i]; - for (uint j=0; j_config->_words[i]; - for (uint j=0; j_config->checkValueName(mask.name, value.name) ) - qFatal(QString("Malformed value name \"%1\" in mask %2").arg(value.name).arg(mask.name)); + if ( !data()->_config->checkValueName(tqmask.name, value.name) ) + qFatal(TQString("Malformed value name \"%1\" in tqmask %2").tqarg(value.name).tqarg(tqmask.name)); } } } // check if all values are explicit for (uint i=0; i_config->_words[i]; - for (uint j=0; jnbCharsWord(MemoryRangeType::Config))).arg(mask.name)); + for (it=tqmask.value.begin(); it!=tqmask.value.end(); ++it) + if ( !hasValue(tqmask, *it) ) qFatal(TQString("Value %1 not defined in tqmask %2").tqarg(toHexLabel(*it, data()->nbCharsWord(MemoryRangeType::Config))).tqarg(tqmask.name)); } } // checksums (after config bits!) - QDomElement checksums = findUniqueElement(device, "checksums", QString::null, QString::null); + TQDomElement checksums = findUniqueElement(device, "checksums", TQString(), TQString()); if ( checksums.isNull() ) { // qFatal("No checksum defined"); // #### FIXME } else { - QMap valueNames; + TQMap valueNames; const Pic::Protection &protection = data()->_config->protection(); if ( protection.family()==Protection::BasicProtection ) { - QString maskName = protection.maskName(Protection::ProgramProtected, MemoryRangeType::Code); - const Pic::Config::Mask *mask = data()->_config->findMask(maskName); - Q_ASSERT(mask); - for (uint i=0; ivalues.count()); i++) valueNames[mask->values[i].name] = false; + TQString tqmaskName = protection.tqmaskName(Protection::ProgramProtected, MemoryRangeType::Code); + const Pic::Config::Mask *tqmask = data()->_config->findMask(tqmaskName); + Q_ASSERT(tqmask); + for (uint i=0; ivalues.count()); i++) valueNames[tqmask->values[i].name] = false; } - QDomNode child = checksums.firstChild(); + TQDomNode child = checksums.firstChild(); while ( !child.isNull() ) { if ( !child.isElement() ) continue; if ( child.nodeName()!="checksum" ) qFatal("Childs of \"checksums\" should \"checksum\""); - QString valueName = getChecksumData(child.toElement()); + TQString valueName = getChecksumData(child.toElement()); if ( protection.family()==Protection::BasicProtection ) { - if ( !valueNames.contains(valueName) ) qFatal("Unknown protected attribute"); + if ( !valueNames.tqcontains(valueName) ) qFatal("Unknown protected attribute"); valueNames[valueName] = true; } child = child.nextSibling(); } - QMap::const_iterator it; + TQMap::const_iterator it; for (it=valueNames.begin(); it!=valueNames.end(); ++it) - if ( !it.key().isEmpty() && !it.data() ) qFatal(QString("Missing checksum \"%1\"").arg(it.key())); + if ( !it.key().isEmpty() && !it.data() ) qFatal(TQString("Missing checksum \"%1\"").tqarg(it.key())); } } -void processMirrored(QDomElement element) +void processMirrored(TQDomElement element) { - QValueVector mirrored; - QDomNode child = element.firstChild(); + TQValueVector mirrored; + TQDomNode child = element.firstChild(); while ( !child.isNull() ) { if ( !child.isElement() ) qFatal("\"mirror\" child should be an element"); - QDomElement e = child.toElement(); + TQDomElement e = child.toElement(); if ( e.nodeName()!="range" ) qFatal("\"mirror\" child should be \"range\""); RangeData rd; bool ok; @@ -532,7 +532,7 @@ void processMirrored(QDomElement element) if ( !mirrored.isEmpty() ) static_cast(data()->_registersData)->mirrored.append(mirrored); } -void processUnused(QDomElement e) +void processUnused(TQDomElement e) { RangeData rd; bool ok; @@ -544,64 +544,64 @@ void processUnused(QDomElement e) static_cast(data()->_registersData)->unused.append(rd); } -void processSfr(QDomElement e) +void processSfr(TQDomElement e) { - QString name = e.attribute("name"); + TQString name = e.attribute("name"); if ( name.isEmpty() ) qFatal("SFR cannot have empty name"); - if ( data()->registersData().sfrs.contains(name) || data()->registersData().combined.contains(name) ) + if ( data()->registersData().sfrs.tqcontains(name) || data()->registersData().combined.tqcontains(name) ) qFatal("SFR name is duplicated"); bool ok; uint address = fromHexLabel(e.attribute("address"), &ok); - if ( !ok ) qFatal(QString("SFR %1 address %2 is malformed").arg(name).arg(e.attribute("address"))); + if ( !ok ) qFatal(TQString("SFR %1 address %2 is malformed").tqarg(name).tqarg(e.attribute("address"))); uint rlength = data()->registersData().nbBanks * data()->architecture().data().registerBankLength; - if ( address>=rlength ) qFatal(QString("Address %1 outside register range").arg(toHexLabel(address, 3))); + if ( address>=rlength ) qFatal(TQString("Address %1 outside register range").tqarg(toHexLabel(address, 3))); RegisterData rdata; rdata.address = address; uint nb = data()->registersData().nbBits(); - if ( nb>Device::MAX_NB_PORT_BITS ) qFatal(QString("Need higher MAX_NB_PORT_BITS: %1").arg(nb)); - QString access = e.attribute("access"); + if ( nb>Device::MAX_NB_PORT_BITS ) qFatal(TQString("Need higher MAX_NB_PORT_BITS: %1").tqarg(nb)); + TQString access = e.attribute("access"); if ( uint(access.length())!=nb ) qFatal("access is missing or malformed"); - QString mclr = e.attribute("mclr"); + TQString mclr = e.attribute("mclr"); if ( uint(mclr.length())!=nb ) qFatal("mclr is missing or malformed"); - QString por = e.attribute("por"); + TQString por = e.attribute("por"); if ( uint(por.length())!=nb ) qFatal("por is missing or malformed"); for (uint i=0; iMaxRegisterBitProperty ) qFatal(QString("Malformed access bit %1").arg(k)); + if ( !ok || rdata.bits[k].properties>MaxRegisterBitProperty ) qFatal(TQString("Malformed access bit %1").tqarg(k)); rdata.bits[k].mclr = RegisterBitState(fromHex(mclr[i].latin1(), &ok)); - if ( !ok || rdata.bits[k].mclr>Nb_RegisterBitStates ) qFatal(QString("Malformed mclr bit %1").arg(k)); + if ( !ok || rdata.bits[k].mclr>Nb_RegisterBitStates ) qFatal(TQString("Malformed mclr bit %1").tqarg(k)); rdata.bits[k].por = RegisterBitState(fromHex(por[i].latin1(), &ok)); - if ( !ok || rdata.bits[k].por>Nb_RegisterBitStates ) qFatal(QString("Malformed por bit %1").arg(k)); + if ( !ok || rdata.bits[k].por>Nb_RegisterBitStates ) qFatal(TQString("Malformed por bit %1").tqarg(k)); } static_cast(data()->_registersData)->sfrs[name] = rdata; } -void processCombined(QDomElement e) +void processCombined(TQDomElement e) { - QString name = e.attribute("name"); + TQString name = e.attribute("name"); if ( name.isEmpty() ) qFatal("Combined register cannot have empty name"); - if ( data()->registersData().sfrs.contains(name) || data()->registersData().combined.contains(name) ) + if ( data()->registersData().sfrs.tqcontains(name) || data()->registersData().combined.tqcontains(name) ) qFatal("Combined register name is duplicated"); bool ok; CombinedData rdata; rdata.address = fromHexLabel(e.attribute("address"), &ok); - if ( !ok ) qFatal(QString("Combined %1 address %2 is malformed").arg(name).arg(e.attribute("address"))); + if ( !ok ) qFatal(TQString("Combined %1 address %2 is malformed").tqarg(name).tqarg(e.attribute("address"))); uint rlength = data()->registersData().nbBanks * data()->architecture().data().registerBankLength; - if ( rdata.address>=rlength ) qFatal(QString("Address %1 outside register range").arg(toHexLabel(rdata.address, 3))); + if ( rdata.address>=rlength ) qFatal(TQString("Address %1 outside register range").tqarg(toHexLabel(rdata.address, 3))); rdata.nbChars = 2*e.attribute("size").toUInt(&ok); - if ( !ok || rdata.nbChars<2 ) qFatal(QString("Combined %1 size %2 is malformed").arg(name).arg(e.attribute("size"))); + if ( !ok || rdata.nbChars<2 ) qFatal(TQString("Combined %1 size %2 is malformed").tqarg(name).tqarg(e.attribute("size"))); Address end = rdata.address + rdata.nbChars/2 - 1; - if ( end>=rlength ) qFatal(QString("Address %1 outside register range").arg(toHexLabel(end, 3))); + if ( end>=rlength ) qFatal(TQString("Address %1 outside register range").tqarg(toHexLabel(end, 3))); static_cast(data()->_registersData)->combined[name] = rdata; } -void processDeviceRegisters(QDomElement element) +void processDeviceRegisters(TQDomElement element) { - QString s = element.attribute("same_as"); + TQString s = element.attribute("same_as"); if ( !s.isEmpty() ) { - if ( !_map.contains(s) ) qFatal(QString("Registers same as unknown device %1").arg(s)); + if ( !_map.tqcontains(s) ) qFatal(TQString("Registers same as unknown device %1").tqarg(s)); const Pic::Data *d = static_cast(_map[s]); data()->_registersData = d->_registersData; return; @@ -614,54 +614,54 @@ void processDeviceRegisters(QDomElement element) if ( data()->is18Family() ) { rdata.accessBankSplit = fromHexLabel(element.attribute("access_bank_split_offset"), &ok); if ( !ok || rdata.accessBankSplit==0 || rdata.accessBankSplit>=0xFF ) qFatal("Malformed access bank split offset"); - rdata.unusedBankMask = fromHexLabel(element.attribute("unused_bank_mask"), &ok); - if ( !ok || rdata.unusedBankMask>=maxValue(NumberBase::Hex, rdata.nbBanks) ) qFatal("Malformed access unused bank mask"); + rdata.unusedBankMask = fromHexLabel(element.attribute("unused_bank_tqmask"), &ok); + if ( !ok || rdata.unusedBankMask>=maxValue(NumberBase::Hex, rdata.nbBanks) ) qFatal("Malformed access unused bank tqmask"); } else { rdata.accessBankSplit = 0; rdata.unusedBankMask = 0; } - QDomNode child = element.firstChild(); + TQDomNode child = element.firstChild(); while ( !child.isNull() ) { if ( !child.isElement() ) qFatal("\"device\" child should be an element"); - QDomElement e = child.toElement(); + TQDomElement e = child.toElement(); if ( e.nodeName()=="mirror" ) processMirrored(e); else if ( e.nodeName()=="unused" ) processUnused(e); else if ( e.nodeName()=="combined" ) processCombined(e); else if ( e.nodeName()=="sfr" ) processSfr(e); - else qFatal(QString("Node name \"%1\" is not recognized").arg(e.nodeName())); + else qFatal(TQString("Node name \"%1\" is not recognized").tqarg(e.nodeName())); child = child.nextSibling(); } for (uint i=0; i::const_iterator it = _map.begin(); + TQMap::const_iterator it = _map.begin(); for (; it!=_map.end(); ++it) { _data = it.data(); - if ( !devices.contains(it.key()) ) qWarning("Register description not found for %s", it.key().latin1()); + if ( !devices.tqcontains(it.key()) ) qWarning("Register description not found for %s", it.key().latin1()); } } -virtual void checkPins(const QMap &pinLabels) const +virtual void checkPins(const TQMap &pinLabels) const { - if ( !pinLabels.contains("VDD") ) qFatal("No VDD pin specified"); - if ( !pinLabels.contains("VSS") ) qFatal("No VSS pin specified"); - QMap::const_iterator it; + if ( !pinLabels.tqcontains("VDD") ) qFatal("No VDD pin specified"); + if ( !pinLabels.tqcontains("VSS") ) qFatal("No VSS pin specified"); + TQMap::const_iterator it; for (it=pinLabels.begin(); it!=pinLabels.end(); ++it) { if ( it.key()=="VDD" || it.key()=="VSS" || it.key().startsWith("CCP") ) continue; - if ( it.data()!=1 ) qFatal(QString("Duplicated pin \"%1\"").arg(it.key())); + if ( it.data()!=1 ) qFatal(TQString("Duplicated pin \"%1\"").tqarg(it.key())); } const Pic::RegistersData &rdata = static_cast(*_data->registersData()); for (uint i=0; i - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/10F202.xml b/src/devices/pic/xml_data/10F202.xml index 25ce72a..f7c420e 100644 --- a/src/devices/pic/xml_data/10F202.xml +++ b/src/devices/pic/xml_data/10F202.xml @@ -27,29 +27,29 @@ - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/10F204.xml b/src/devices/pic/xml_data/10F204.xml index e2d2e6d..40631ef 100644 --- a/src/devices/pic/xml_data/10F204.xml +++ b/src/devices/pic/xml_data/10F204.xml @@ -27,29 +27,29 @@ - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/10F206.xml b/src/devices/pic/xml_data/10F206.xml index 4e66268..c5030eb 100644 --- a/src/devices/pic/xml_data/10F206.xml +++ b/src/devices/pic/xml_data/10F206.xml @@ -27,29 +27,29 @@ - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/10F220.xml b/src/devices/pic/xml_data/10F220.xml index 694d161..99e7019 100644 --- a/src/devices/pic/xml_data/10F220.xml +++ b/src/devices/pic/xml_data/10F220.xml @@ -28,33 +28,33 @@ - - + + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/10F222.xml b/src/devices/pic/xml_data/10F222.xml index 4cba906..3597849 100644 --- a/src/devices/pic/xml_data/10F222.xml +++ b/src/devices/pic/xml_data/10F222.xml @@ -28,33 +28,33 @@ - - + + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/12C508.xml b/src/devices/pic/xml_data/12C508.xml index cb39eae..2639704 100644 --- a/src/devices/pic/xml_data/12C508.xml +++ b/src/devices/pic/xml_data/12C508.xml @@ -30,30 +30,30 @@ - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/12C508A.xml b/src/devices/pic/xml_data/12C508A.xml index f1ffb3f..a5c9497 100644 --- a/src/devices/pic/xml_data/12C508A.xml +++ b/src/devices/pic/xml_data/12C508A.xml @@ -27,30 +27,30 @@ - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/12C509.xml b/src/devices/pic/xml_data/12C509.xml index dbe885b..7b10e99 100644 --- a/src/devices/pic/xml_data/12C509.xml +++ b/src/devices/pic/xml_data/12C509.xml @@ -30,30 +30,30 @@ - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/12C509A.xml b/src/devices/pic/xml_data/12C509A.xml index 240783f..0c41121 100644 --- a/src/devices/pic/xml_data/12C509A.xml +++ b/src/devices/pic/xml_data/12C509A.xml @@ -27,30 +27,30 @@ - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/12C671.xml b/src/devices/pic/xml_data/12C671.xml index f675723..bcb6217 100644 --- a/src/devices/pic/xml_data/12C671.xml +++ b/src/devices/pic/xml_data/12C671.xml @@ -35,13 +35,13 @@ - - + + - - + + @@ -50,24 +50,24 @@ - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/12C672.xml b/src/devices/pic/xml_data/12C672.xml index 80511f1..17e100c 100644 --- a/src/devices/pic/xml_data/12C672.xml +++ b/src/devices/pic/xml_data/12C672.xml @@ -36,13 +36,13 @@ - - + + - - + + @@ -51,25 +51,25 @@ - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/12CE518.xml b/src/devices/pic/xml_data/12CE518.xml index e27cbb3..619dadc 100644 --- a/src/devices/pic/xml_data/12CE518.xml +++ b/src/devices/pic/xml_data/12CE518.xml @@ -27,31 +27,31 @@ - - + + - + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/12CE519.xml b/src/devices/pic/xml_data/12CE519.xml index 210e186..483a926 100644 --- a/src/devices/pic/xml_data/12CE519.xml +++ b/src/devices/pic/xml_data/12CE519.xml @@ -27,31 +27,31 @@ - - + + - + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/12CE673.xml b/src/devices/pic/xml_data/12CE673.xml index 3007c29..4d8ea34 100644 --- a/src/devices/pic/xml_data/12CE673.xml +++ b/src/devices/pic/xml_data/12CE673.xml @@ -35,14 +35,14 @@ - - + + - - + + @@ -51,24 +51,24 @@ - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/12CE674.xml b/src/devices/pic/xml_data/12CE674.xml index 7670f3f..2f9198a 100644 --- a/src/devices/pic/xml_data/12CE674.xml +++ b/src/devices/pic/xml_data/12CE674.xml @@ -36,14 +36,14 @@ - - + + - - + + @@ -52,25 +52,25 @@ - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/12CR509A.xml b/src/devices/pic/xml_data/12CR509A.xml index 9a795da..80d4d36 100644 --- a/src/devices/pic/xml_data/12CR509A.xml +++ b/src/devices/pic/xml_data/12CR509A.xml @@ -27,30 +27,30 @@ - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/12F508.xml b/src/devices/pic/xml_data/12F508.xml index 19fd956..4bd60df 100644 --- a/src/devices/pic/xml_data/12F508.xml +++ b/src/devices/pic/xml_data/12F508.xml @@ -29,31 +29,31 @@ - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/12F509.xml b/src/devices/pic/xml_data/12F509.xml index 8f3ae12..449e009 100644 --- a/src/devices/pic/xml_data/12F509.xml +++ b/src/devices/pic/xml_data/12F509.xml @@ -29,31 +29,31 @@ - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/12F510.xml b/src/devices/pic/xml_data/12F510.xml index 15a2d81..ce2ab4a 100644 --- a/src/devices/pic/xml_data/12F510.xml +++ b/src/devices/pic/xml_data/12F510.xml @@ -28,35 +28,35 @@ - - + + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/12F519.xml b/src/devices/pic/xml_data/12F519.xml index 600618c..02dd3d1 100644 --- a/src/devices/pic/xml_data/12F519.xml +++ b/src/devices/pic/xml_data/12F519.xml @@ -31,40 +31,40 @@ - + - + - - + + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/12F609.xml b/src/devices/pic/xml_data/12F609.xml index d3409ee..07f4b1f 100644 --- a/src/devices/pic/xml_data/12F609.xml +++ b/src/devices/pic/xml_data/12F609.xml @@ -39,15 +39,15 @@ - - + + - - + + @@ -56,32 +56,32 @@ - - + + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/12F615.xml b/src/devices/pic/xml_data/12F615.xml index d59445e..e90d419 100644 --- a/src/devices/pic/xml_data/12F615.xml +++ b/src/devices/pic/xml_data/12F615.xml @@ -39,15 +39,15 @@ - - + + - - + + @@ -56,32 +56,32 @@ - - + + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/12F629.xml b/src/devices/pic/xml_data/12F629.xml index 53c0cf4..9c4553a 100644 --- a/src/devices/pic/xml_data/12F629.xml +++ b/src/devices/pic/xml_data/12F629.xml @@ -36,16 +36,16 @@ - - + + - - + + @@ -54,37 +54,37 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/12F635.xml b/src/devices/pic/xml_data/12F635.xml index f06c3b6..3bf332d 100644 --- a/src/devices/pic/xml_data/12F635.xml +++ b/src/devices/pic/xml_data/12F635.xml @@ -30,16 +30,16 @@ - - + + - - + + @@ -48,45 +48,45 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/12F675.xml b/src/devices/pic/xml_data/12F675.xml index 6e0f054..e226b4f 100644 --- a/src/devices/pic/xml_data/12F675.xml +++ b/src/devices/pic/xml_data/12F675.xml @@ -36,16 +36,16 @@ - - + + - - + + @@ -54,37 +54,37 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/12F683.xml b/src/devices/pic/xml_data/12F683.xml index 1c23260..d80b5c1 100644 --- a/src/devices/pic/xml_data/12F683.xml +++ b/src/devices/pic/xml_data/12F683.xml @@ -30,16 +30,16 @@ - - + + - - + + @@ -48,41 +48,41 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/14000.xml b/src/devices/pic/xml_data/14000.xml index 8cf2db6..9ee23ed 100644 --- a/src/devices/pic/xml_data/14000.xml +++ b/src/devices/pic/xml_data/14000.xml @@ -28,40 +28,40 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16C432.xml b/src/devices/pic/xml_data/16C432.xml index e112d5c..bed76d2 100644 --- a/src/devices/pic/xml_data/16C432.xml +++ b/src/devices/pic/xml_data/16C432.xml @@ -29,36 +29,36 @@ - + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16C433.xml b/src/devices/pic/xml_data/16C433.xml index cf07aaa..6dad096 100644 --- a/src/devices/pic/xml_data/16C433.xml +++ b/src/devices/pic/xml_data/16C433.xml @@ -29,13 +29,13 @@ - - + + - - + + @@ -44,26 +44,26 @@ - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16C505.xml b/src/devices/pic/xml_data/16C505.xml index 2cbe2c9..6fa7f11 100644 --- a/src/devices/pic/xml_data/16C505.xml +++ b/src/devices/pic/xml_data/16C505.xml @@ -35,13 +35,13 @@ - - + + - - + + @@ -50,20 +50,20 @@ - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16C52.xml b/src/devices/pic/xml_data/16C52.xml index 6ef7753..f9c1a59 100644 --- a/src/devices/pic/xml_data/16C52.xml +++ b/src/devices/pic/xml_data/16C52.xml @@ -30,16 +30,16 @@ - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16C54.xml b/src/devices/pic/xml_data/16C54.xml index 06455ee..2620238 100644 --- a/src/devices/pic/xml_data/16C54.xml +++ b/src/devices/pic/xml_data/16C54.xml @@ -36,25 +36,25 @@ - + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16C54A.xml b/src/devices/pic/xml_data/16C54A.xml index c264f10..ae365d8 100644 --- a/src/devices/pic/xml_data/16C54A.xml +++ b/src/devices/pic/xml_data/16C54A.xml @@ -45,26 +45,26 @@ - + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16C54B.xml b/src/devices/pic/xml_data/16C54B.xml index d20ae0e..da0ae9a 100644 --- a/src/devices/pic/xml_data/16C54B.xml +++ b/src/devices/pic/xml_data/16C54B.xml @@ -40,26 +40,26 @@ - + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16C54C.xml b/src/devices/pic/xml_data/16C54C.xml index 0d1907b..629d54e 100644 --- a/src/devices/pic/xml_data/16C54C.xml +++ b/src/devices/pic/xml_data/16C54C.xml @@ -40,26 +40,26 @@ - + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16C55.xml b/src/devices/pic/xml_data/16C55.xml index 0d93443..30d2d4e 100644 --- a/src/devices/pic/xml_data/16C55.xml +++ b/src/devices/pic/xml_data/16C55.xml @@ -36,25 +36,25 @@ - + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16C554.xml b/src/devices/pic/xml_data/16C554.xml index 1723220..42bb60f 100644 --- a/src/devices/pic/xml_data/16C554.xml +++ b/src/devices/pic/xml_data/16C554.xml @@ -38,30 +38,30 @@ - + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16C557.xml b/src/devices/pic/xml_data/16C557.xml index 3a9ddab..0d37913 100644 --- a/src/devices/pic/xml_data/16C557.xml +++ b/src/devices/pic/xml_data/16C557.xml @@ -43,32 +43,32 @@ - + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16C558.xml b/src/devices/pic/xml_data/16C558.xml index 484efee..36cd4e8 100644 --- a/src/devices/pic/xml_data/16C558.xml +++ b/src/devices/pic/xml_data/16C558.xml @@ -40,32 +40,32 @@ - + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16C55A.xml b/src/devices/pic/xml_data/16C55A.xml index 27b9eac..6bcc1be 100644 --- a/src/devices/pic/xml_data/16C55A.xml +++ b/src/devices/pic/xml_data/16C55A.xml @@ -40,26 +40,26 @@ - + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16C56.xml b/src/devices/pic/xml_data/16C56.xml index a8ec195..cddfd3e 100644 --- a/src/devices/pic/xml_data/16C56.xml +++ b/src/devices/pic/xml_data/16C56.xml @@ -36,25 +36,25 @@ - + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16C56A.xml b/src/devices/pic/xml_data/16C56A.xml index 0543765..6e29f70 100644 --- a/src/devices/pic/xml_data/16C56A.xml +++ b/src/devices/pic/xml_data/16C56A.xml @@ -40,26 +40,26 @@ - + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16C57.xml b/src/devices/pic/xml_data/16C57.xml index 4aef05a..4791ee9 100644 --- a/src/devices/pic/xml_data/16C57.xml +++ b/src/devices/pic/xml_data/16C57.xml @@ -36,25 +36,25 @@ - + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16C57C.xml b/src/devices/pic/xml_data/16C57C.xml index 4d5f180..4477c00 100644 --- a/src/devices/pic/xml_data/16C57C.xml +++ b/src/devices/pic/xml_data/16C57C.xml @@ -40,26 +40,26 @@ - + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16C58A.xml b/src/devices/pic/xml_data/16C58A.xml index a12abb6..e4798ce 100644 --- a/src/devices/pic/xml_data/16C58A.xml +++ b/src/devices/pic/xml_data/16C58A.xml @@ -45,25 +45,25 @@ - + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16C58B.xml b/src/devices/pic/xml_data/16C58B.xml index 04f56ce..48e910e 100644 --- a/src/devices/pic/xml_data/16C58B.xml +++ b/src/devices/pic/xml_data/16C58B.xml @@ -40,26 +40,26 @@ - + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16C61.xml b/src/devices/pic/xml_data/16C61.xml index 0b62c88..6812ee7 100644 --- a/src/devices/pic/xml_data/16C61.xml +++ b/src/devices/pic/xml_data/16C61.xml @@ -34,29 +34,29 @@ - + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16C62.xml b/src/devices/pic/xml_data/16C62.xml index 8eebe47..e1a3764 100644 --- a/src/devices/pic/xml_data/16C62.xml +++ b/src/devices/pic/xml_data/16C62.xml @@ -33,31 +33,31 @@ - + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16C620.xml b/src/devices/pic/xml_data/16C620.xml index 8a676af..522beaa 100644 --- a/src/devices/pic/xml_data/16C620.xml +++ b/src/devices/pic/xml_data/16C620.xml @@ -35,34 +35,34 @@ - + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16C620A.xml b/src/devices/pic/xml_data/16C620A.xml index 9770da4..a36b1c6 100644 --- a/src/devices/pic/xml_data/16C620A.xml +++ b/src/devices/pic/xml_data/16C620A.xml @@ -39,34 +39,34 @@ - + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16C621.xml b/src/devices/pic/xml_data/16C621.xml index 401ee06..745ba82 100644 --- a/src/devices/pic/xml_data/16C621.xml +++ b/src/devices/pic/xml_data/16C621.xml @@ -36,35 +36,35 @@ - + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16C621A.xml b/src/devices/pic/xml_data/16C621A.xml index 97e136e..3e48bd4 100644 --- a/src/devices/pic/xml_data/16C621A.xml +++ b/src/devices/pic/xml_data/16C621A.xml @@ -40,35 +40,35 @@ - + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16C622.xml b/src/devices/pic/xml_data/16C622.xml index f1675bc..9617071 100644 --- a/src/devices/pic/xml_data/16C622.xml +++ b/src/devices/pic/xml_data/16C622.xml @@ -37,36 +37,36 @@ - + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16C622A.xml b/src/devices/pic/xml_data/16C622A.xml index 04e0d9b..26b691e 100644 --- a/src/devices/pic/xml_data/16C622A.xml +++ b/src/devices/pic/xml_data/16C622A.xml @@ -41,36 +41,36 @@ - + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16C62A.xml b/src/devices/pic/xml_data/16C62A.xml index 71bf13f..00c16ea 100644 --- a/src/devices/pic/xml_data/16C62A.xml +++ b/src/devices/pic/xml_data/16C62A.xml @@ -33,36 +33,36 @@ - + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16C62B.xml b/src/devices/pic/xml_data/16C62B.xml index 6550cbb..749c9c8 100644 --- a/src/devices/pic/xml_data/16C62B.xml +++ b/src/devices/pic/xml_data/16C62B.xml @@ -33,36 +33,36 @@ - + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16C63.xml b/src/devices/pic/xml_data/16C63.xml index 7d21001..16432ee 100644 --- a/src/devices/pic/xml_data/16C63.xml +++ b/src/devices/pic/xml_data/16C63.xml @@ -33,36 +33,36 @@ - + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16C63A.xml b/src/devices/pic/xml_data/16C63A.xml index 2a3eac3..6499148 100644 --- a/src/devices/pic/xml_data/16C63A.xml +++ b/src/devices/pic/xml_data/16C63A.xml @@ -34,36 +34,36 @@ - + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16C64.xml b/src/devices/pic/xml_data/16C64.xml index 2bd6f77..fa3998d 100644 --- a/src/devices/pic/xml_data/16C64.xml +++ b/src/devices/pic/xml_data/16C64.xml @@ -33,31 +33,31 @@ - + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16C641.xml b/src/devices/pic/xml_data/16C641.xml index 2a819ff..74e5fd5 100644 --- a/src/devices/pic/xml_data/16C641.xml +++ b/src/devices/pic/xml_data/16C641.xml @@ -28,40 +28,40 @@ - + - - + + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16C642.xml b/src/devices/pic/xml_data/16C642.xml index c5847a9..e9bc07a 100644 --- a/src/devices/pic/xml_data/16C642.xml +++ b/src/devices/pic/xml_data/16C642.xml @@ -33,40 +33,40 @@ - + - - + + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16C64A.xml b/src/devices/pic/xml_data/16C64A.xml index c5331e6..274da63 100644 --- a/src/devices/pic/xml_data/16C64A.xml +++ b/src/devices/pic/xml_data/16C64A.xml @@ -33,36 +33,36 @@ - + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16C65.xml b/src/devices/pic/xml_data/16C65.xml index 1d5de06..13ff265 100644 --- a/src/devices/pic/xml_data/16C65.xml +++ b/src/devices/pic/xml_data/16C65.xml @@ -33,31 +33,31 @@ - + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16C65A.xml b/src/devices/pic/xml_data/16C65A.xml index 4220f2d..32d4280 100644 --- a/src/devices/pic/xml_data/16C65A.xml +++ b/src/devices/pic/xml_data/16C65A.xml @@ -33,36 +33,36 @@ - + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16C65B.xml b/src/devices/pic/xml_data/16C65B.xml index c5eae8a..6463d62 100644 --- a/src/devices/pic/xml_data/16C65B.xml +++ b/src/devices/pic/xml_data/16C65B.xml @@ -34,36 +34,36 @@ - + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16C66.xml b/src/devices/pic/xml_data/16C66.xml index bfa3307..08f25d5 100644 --- a/src/devices/pic/xml_data/16C66.xml +++ b/src/devices/pic/xml_data/16C66.xml @@ -33,36 +33,36 @@ - + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16C661.xml b/src/devices/pic/xml_data/16C661.xml index 612f636..36f2bd0 100644 --- a/src/devices/pic/xml_data/16C661.xml +++ b/src/devices/pic/xml_data/16C661.xml @@ -28,40 +28,40 @@ - + - - + + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16C662.xml b/src/devices/pic/xml_data/16C662.xml index a09c5c5..ffd6fdc 100644 --- a/src/devices/pic/xml_data/16C662.xml +++ b/src/devices/pic/xml_data/16C662.xml @@ -33,40 +33,40 @@ - + - - + + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16C67.xml b/src/devices/pic/xml_data/16C67.xml index 43c1aa1..26cbb43 100644 --- a/src/devices/pic/xml_data/16C67.xml +++ b/src/devices/pic/xml_data/16C67.xml @@ -33,36 +33,36 @@ - + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16C71.xml b/src/devices/pic/xml_data/16C71.xml index d23acc3..e453bfa 100644 --- a/src/devices/pic/xml_data/16C71.xml +++ b/src/devices/pic/xml_data/16C71.xml @@ -31,29 +31,29 @@ - + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16C710.xml b/src/devices/pic/xml_data/16C710.xml index d6a90c2..62b36a3 100644 --- a/src/devices/pic/xml_data/16C710.xml +++ b/src/devices/pic/xml_data/16C710.xml @@ -34,34 +34,34 @@ - + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16C711.xml b/src/devices/pic/xml_data/16C711.xml index 29518e3..b57c9f5 100644 --- a/src/devices/pic/xml_data/16C711.xml +++ b/src/devices/pic/xml_data/16C711.xml @@ -34,34 +34,34 @@ - + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16C712.xml b/src/devices/pic/xml_data/16C712.xml index 6979deb..400aa43 100644 --- a/src/devices/pic/xml_data/16C712.xml +++ b/src/devices/pic/xml_data/16C712.xml @@ -29,35 +29,35 @@ - + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16C715.xml b/src/devices/pic/xml_data/16C715.xml index 501018f..8df94d0 100644 --- a/src/devices/pic/xml_data/16C715.xml +++ b/src/devices/pic/xml_data/16C715.xml @@ -33,40 +33,40 @@ - + - - + + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16C716.xml b/src/devices/pic/xml_data/16C716.xml index f34e760..6885b77 100644 --- a/src/devices/pic/xml_data/16C716.xml +++ b/src/devices/pic/xml_data/16C716.xml @@ -32,36 +32,36 @@ - + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16C717.xml b/src/devices/pic/xml_data/16C717.xml index 19c6f6a..9045ec7 100644 --- a/src/devices/pic/xml_data/16C717.xml +++ b/src/devices/pic/xml_data/16C717.xml @@ -36,13 +36,13 @@ - + - - + + @@ -51,34 +51,34 @@ - - + + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16C72.xml b/src/devices/pic/xml_data/16C72.xml index e6b88a2..ac7d9b7 100644 --- a/src/devices/pic/xml_data/16C72.xml +++ b/src/devices/pic/xml_data/16C72.xml @@ -33,36 +33,36 @@ - + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16C72A.xml b/src/devices/pic/xml_data/16C72A.xml index cabb079..7eb3705 100644 --- a/src/devices/pic/xml_data/16C72A.xml +++ b/src/devices/pic/xml_data/16C72A.xml @@ -33,36 +33,36 @@ - + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16C73.xml b/src/devices/pic/xml_data/16C73.xml index 78b69fa..37f92de 100644 --- a/src/devices/pic/xml_data/16C73.xml +++ b/src/devices/pic/xml_data/16C73.xml @@ -33,31 +33,31 @@ - + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16C73A.xml b/src/devices/pic/xml_data/16C73A.xml index df9a672..ee67734 100644 --- a/src/devices/pic/xml_data/16C73A.xml +++ b/src/devices/pic/xml_data/16C73A.xml @@ -33,36 +33,36 @@ - + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16C73B.xml b/src/devices/pic/xml_data/16C73B.xml index b2418f1..35694d2 100644 --- a/src/devices/pic/xml_data/16C73B.xml +++ b/src/devices/pic/xml_data/16C73B.xml @@ -34,36 +34,36 @@ - + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16C74.xml b/src/devices/pic/xml_data/16C74.xml index 091501d..9f5747e 100644 --- a/src/devices/pic/xml_data/16C74.xml +++ b/src/devices/pic/xml_data/16C74.xml @@ -33,31 +33,31 @@ - + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16C745.xml b/src/devices/pic/xml_data/16C745.xml index 1a4ab42..daf0552 100644 --- a/src/devices/pic/xml_data/16C745.xml +++ b/src/devices/pic/xml_data/16C745.xml @@ -29,32 +29,32 @@ - + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16C74A.xml b/src/devices/pic/xml_data/16C74A.xml index 0d784c9..d859fc2 100644 --- a/src/devices/pic/xml_data/16C74A.xml +++ b/src/devices/pic/xml_data/16C74A.xml @@ -33,36 +33,36 @@ - + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16C74B.xml b/src/devices/pic/xml_data/16C74B.xml index ce7274f..325fda9 100644 --- a/src/devices/pic/xml_data/16C74B.xml +++ b/src/devices/pic/xml_data/16C74B.xml @@ -34,36 +34,36 @@ - + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16C76.xml b/src/devices/pic/xml_data/16C76.xml index c5819a2..7c6ed42 100644 --- a/src/devices/pic/xml_data/16C76.xml +++ b/src/devices/pic/xml_data/16C76.xml @@ -33,36 +33,36 @@ - + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16C765.xml b/src/devices/pic/xml_data/16C765.xml index c441e17..360985e 100644 --- a/src/devices/pic/xml_data/16C765.xml +++ b/src/devices/pic/xml_data/16C765.xml @@ -29,32 +29,32 @@ - + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16C77.xml b/src/devices/pic/xml_data/16C77.xml index f863d24..60d0a72 100644 --- a/src/devices/pic/xml_data/16C77.xml +++ b/src/devices/pic/xml_data/16C77.xml @@ -33,36 +33,36 @@ - + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16C770.xml b/src/devices/pic/xml_data/16C770.xml index de1d9e9..cb00a24 100644 --- a/src/devices/pic/xml_data/16C770.xml +++ b/src/devices/pic/xml_data/16C770.xml @@ -36,13 +36,13 @@ - + - - + + @@ -51,34 +51,34 @@ - - + + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16C771.xml b/src/devices/pic/xml_data/16C771.xml index 4bf7fcd..6f59244 100644 --- a/src/devices/pic/xml_data/16C771.xml +++ b/src/devices/pic/xml_data/16C771.xml @@ -36,13 +36,13 @@ - + - - + + @@ -51,34 +51,34 @@ - - + + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16C773.xml b/src/devices/pic/xml_data/16C773.xml index 1b74ed5..d5d4e06 100644 --- a/src/devices/pic/xml_data/16C773.xml +++ b/src/devices/pic/xml_data/16C773.xml @@ -33,42 +33,42 @@ - + - - + + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16C774.xml b/src/devices/pic/xml_data/16C774.xml index 1d577ee..7915805 100644 --- a/src/devices/pic/xml_data/16C774.xml +++ b/src/devices/pic/xml_data/16C774.xml @@ -33,42 +33,42 @@ - + - - + + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16C781.xml b/src/devices/pic/xml_data/16C781.xml index 2861a67..7533b24 100644 --- a/src/devices/pic/xml_data/16C781.xml +++ b/src/devices/pic/xml_data/16C781.xml @@ -32,13 +32,13 @@ - + - - + + @@ -47,34 +47,34 @@ - - + + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16C782.xml b/src/devices/pic/xml_data/16C782.xml index 6192a30..2b863ed 100644 --- a/src/devices/pic/xml_data/16C782.xml +++ b/src/devices/pic/xml_data/16C782.xml @@ -32,13 +32,13 @@ - + - - + + @@ -47,34 +47,34 @@ - - + + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16C84.xml b/src/devices/pic/xml_data/16C84.xml index 595bcd9..708ba95 100644 --- a/src/devices/pic/xml_data/16C84.xml +++ b/src/devices/pic/xml_data/16C84.xml @@ -25,30 +25,30 @@ - + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16C923.xml b/src/devices/pic/xml_data/16C923.xml index a670a59..3e438d2 100644 --- a/src/devices/pic/xml_data/16C923.xml +++ b/src/devices/pic/xml_data/16C923.xml @@ -33,32 +33,32 @@ - + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16C924.xml b/src/devices/pic/xml_data/16C924.xml index 614ff48..a9096d1 100644 --- a/src/devices/pic/xml_data/16C924.xml +++ b/src/devices/pic/xml_data/16C924.xml @@ -33,32 +33,32 @@ - + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16C925.xml b/src/devices/pic/xml_data/16C925.xml index b9c703d..c7a494f 100644 --- a/src/devices/pic/xml_data/16C925.xml +++ b/src/devices/pic/xml_data/16C925.xml @@ -25,36 +25,36 @@ - + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16C926.xml b/src/devices/pic/xml_data/16C926.xml index 4120d43..8a71ca5 100644 --- a/src/devices/pic/xml_data/16C926.xml +++ b/src/devices/pic/xml_data/16C926.xml @@ -25,36 +25,36 @@ - + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16CE623.xml b/src/devices/pic/xml_data/16CE623.xml index 18e6848..00dbeee 100644 --- a/src/devices/pic/xml_data/16CE623.xml +++ b/src/devices/pic/xml_data/16CE623.xml @@ -35,35 +35,35 @@ - + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16CE624.xml b/src/devices/pic/xml_data/16CE624.xml index 4f205a7..f480f85 100644 --- a/src/devices/pic/xml_data/16CE624.xml +++ b/src/devices/pic/xml_data/16CE624.xml @@ -36,36 +36,36 @@ - + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16CE625.xml b/src/devices/pic/xml_data/16CE625.xml index d7aa576..9d156e9 100644 --- a/src/devices/pic/xml_data/16CE625.xml +++ b/src/devices/pic/xml_data/16CE625.xml @@ -37,36 +37,36 @@ - + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16CR54.xml_broken b/src/devices/pic/xml_data/16CR54.xml_broken index cef44cb..e78487e 100644 --- a/src/devices/pic/xml_data/16CR54.xml_broken +++ b/src/devices/pic/xml_data/16CR54.xml_broken @@ -18,25 +18,25 @@ - + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16CR54A.xml b/src/devices/pic/xml_data/16CR54A.xml index c3a5d2a..cbe7ef1 100644 --- a/src/devices/pic/xml_data/16CR54A.xml +++ b/src/devices/pic/xml_data/16CR54A.xml @@ -37,26 +37,26 @@ - + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16CR54B.xml b/src/devices/pic/xml_data/16CR54B.xml index 43456d8..d561ca9 100644 --- a/src/devices/pic/xml_data/16CR54B.xml +++ b/src/devices/pic/xml_data/16CR54B.xml @@ -40,26 +40,26 @@ - + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16CR54C.xml b/src/devices/pic/xml_data/16CR54C.xml index 3667ce3..c5d9876 100644 --- a/src/devices/pic/xml_data/16CR54C.xml +++ b/src/devices/pic/xml_data/16CR54C.xml @@ -40,26 +40,26 @@ - + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16CR56A.xml b/src/devices/pic/xml_data/16CR56A.xml index 0b28931..92ed41d 100644 --- a/src/devices/pic/xml_data/16CR56A.xml +++ b/src/devices/pic/xml_data/16CR56A.xml @@ -40,26 +40,26 @@ - + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16CR57B.xml b/src/devices/pic/xml_data/16CR57B.xml index caba4c3..d4f218a 100644 --- a/src/devices/pic/xml_data/16CR57B.xml +++ b/src/devices/pic/xml_data/16CR57B.xml @@ -37,26 +37,26 @@ - + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16CR57C.xml b/src/devices/pic/xml_data/16CR57C.xml index 379f1bc..1bee66c 100644 --- a/src/devices/pic/xml_data/16CR57C.xml +++ b/src/devices/pic/xml_data/16CR57C.xml @@ -40,26 +40,26 @@ - + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16CR58A.xml b/src/devices/pic/xml_data/16CR58A.xml index 3841400..8834988 100644 --- a/src/devices/pic/xml_data/16CR58A.xml +++ b/src/devices/pic/xml_data/16CR58A.xml @@ -37,26 +37,26 @@ - + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16CR58B.xml b/src/devices/pic/xml_data/16CR58B.xml index b450e31..17b9c83 100644 --- a/src/devices/pic/xml_data/16CR58B.xml +++ b/src/devices/pic/xml_data/16CR58B.xml @@ -40,26 +40,26 @@ - + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16CR62.xml b/src/devices/pic/xml_data/16CR62.xml index 0b27a3c..5e18732 100644 --- a/src/devices/pic/xml_data/16CR62.xml +++ b/src/devices/pic/xml_data/16CR62.xml @@ -33,36 +33,36 @@ - + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16CR620A.xml b/src/devices/pic/xml_data/16CR620A.xml index a2e6db3..891e699 100644 --- a/src/devices/pic/xml_data/16CR620A.xml +++ b/src/devices/pic/xml_data/16CR620A.xml @@ -35,34 +35,34 @@ - + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16CR63.xml b/src/devices/pic/xml_data/16CR63.xml index 08d6f3f..0279f84 100644 --- a/src/devices/pic/xml_data/16CR63.xml +++ b/src/devices/pic/xml_data/16CR63.xml @@ -33,36 +33,36 @@ - + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16CR64.xml b/src/devices/pic/xml_data/16CR64.xml index e155a97..4ade4a5 100644 --- a/src/devices/pic/xml_data/16CR64.xml +++ b/src/devices/pic/xml_data/16CR64.xml @@ -33,36 +33,36 @@ - + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16CR65.xml b/src/devices/pic/xml_data/16CR65.xml index df4d3f4..b83c4e2 100644 --- a/src/devices/pic/xml_data/16CR65.xml +++ b/src/devices/pic/xml_data/16CR65.xml @@ -33,36 +33,36 @@ - + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16CR72.xml b/src/devices/pic/xml_data/16CR72.xml index efaa9f8..18ba26f 100644 --- a/src/devices/pic/xml_data/16CR72.xml +++ b/src/devices/pic/xml_data/16CR72.xml @@ -33,36 +33,36 @@ - + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16CR73.xml b/src/devices/pic/xml_data/16CR73.xml index 6513255..c368a1b 100644 --- a/src/devices/pic/xml_data/16CR73.xml +++ b/src/devices/pic/xml_data/16CR73.xml @@ -31,34 +31,34 @@ - + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16CR74.xml b/src/devices/pic/xml_data/16CR74.xml index 6fec92e..c724d90 100644 --- a/src/devices/pic/xml_data/16CR74.xml +++ b/src/devices/pic/xml_data/16CR74.xml @@ -31,34 +31,34 @@ - + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16CR76.xml b/src/devices/pic/xml_data/16CR76.xml index dd9916a..00576fb 100644 --- a/src/devices/pic/xml_data/16CR76.xml +++ b/src/devices/pic/xml_data/16CR76.xml @@ -31,34 +31,34 @@ - + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16CR77.xml b/src/devices/pic/xml_data/16CR77.xml index 661ebf0..04c6f68 100644 --- a/src/devices/pic/xml_data/16CR77.xml +++ b/src/devices/pic/xml_data/16CR77.xml @@ -31,34 +31,34 @@ - + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16CR83.xml b/src/devices/pic/xml_data/16CR83.xml index 01c4166..24f9ed0 100644 --- a/src/devices/pic/xml_data/16CR83.xml +++ b/src/devices/pic/xml_data/16CR83.xml @@ -31,35 +31,35 @@ - + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16CR84.xml b/src/devices/pic/xml_data/16CR84.xml index 5d93205..a22db42 100644 --- a/src/devices/pic/xml_data/16CR84.xml +++ b/src/devices/pic/xml_data/16CR84.xml @@ -31,35 +31,35 @@ - + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16F505.xml b/src/devices/pic/xml_data/16F505.xml index bbc2607..250adf4 100644 --- a/src/devices/pic/xml_data/16F505.xml +++ b/src/devices/pic/xml_data/16F505.xml @@ -29,14 +29,14 @@ - - + + - - + + @@ -45,19 +45,19 @@ - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16F506.xml b/src/devices/pic/xml_data/16F506.xml index 4fa7a47..a472914 100644 --- a/src/devices/pic/xml_data/16F506.xml +++ b/src/devices/pic/xml_data/16F506.xml @@ -30,14 +30,14 @@ - - + + - - + + @@ -46,23 +46,23 @@ - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16F54.xml b/src/devices/pic/xml_data/16F54.xml index 4b55624..c5abd78 100644 --- a/src/devices/pic/xml_data/16F54.xml +++ b/src/devices/pic/xml_data/16F54.xml @@ -29,25 +29,25 @@ - + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16F57.xml b/src/devices/pic/xml_data/16F57.xml index e84e053..26afb61 100644 --- a/src/devices/pic/xml_data/16F57.xml +++ b/src/devices/pic/xml_data/16F57.xml @@ -29,25 +29,25 @@ - + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16F59.xml b/src/devices/pic/xml_data/16F59.xml index b29659a..4ecfae8 100644 --- a/src/devices/pic/xml_data/16F59.xml +++ b/src/devices/pic/xml_data/16F59.xml @@ -29,25 +29,25 @@ - + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16F610.xml b/src/devices/pic/xml_data/16F610.xml index 46795b1..acf84ca 100644 --- a/src/devices/pic/xml_data/16F610.xml +++ b/src/devices/pic/xml_data/16F610.xml @@ -38,15 +38,15 @@ - - + + - - + + @@ -55,32 +55,32 @@ - - + + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16F616.xml b/src/devices/pic/xml_data/16F616.xml index 9f8ca55..890aac4 100644 --- a/src/devices/pic/xml_data/16F616.xml +++ b/src/devices/pic/xml_data/16F616.xml @@ -39,15 +39,15 @@ - - + + - - + + @@ -56,32 +56,32 @@ - - + + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16F627.xml b/src/devices/pic/xml_data/16F627.xml index 7ce03a5..2656e1a 100644 --- a/src/devices/pic/xml_data/16F627.xml +++ b/src/devices/pic/xml_data/16F627.xml @@ -46,22 +46,22 @@ - + - - + + - - + + - - + + @@ -70,29 +70,29 @@ - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16F627A.xml b/src/devices/pic/xml_data/16F627A.xml index de43d7a..3992f2a 100644 --- a/src/devices/pic/xml_data/16F627A.xml +++ b/src/devices/pic/xml_data/16F627A.xml @@ -37,23 +37,23 @@ - + - - + + - - + + - - + + @@ -62,27 +62,27 @@ - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16F628.xml b/src/devices/pic/xml_data/16F628.xml index fed16fa..1261707 100644 --- a/src/devices/pic/xml_data/16F628.xml +++ b/src/devices/pic/xml_data/16F628.xml @@ -47,22 +47,22 @@ - + - - + + - - + + - - + + @@ -71,30 +71,30 @@ - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16F628A.xml b/src/devices/pic/xml_data/16F628A.xml index 8c5a4cc..8a194f9 100644 --- a/src/devices/pic/xml_data/16F628A.xml +++ b/src/devices/pic/xml_data/16F628A.xml @@ -37,23 +37,23 @@ - + - - + + - - + + - - + + @@ -62,27 +62,27 @@ - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16F630.xml b/src/devices/pic/xml_data/16F630.xml index a82ffdb..2096457 100644 --- a/src/devices/pic/xml_data/16F630.xml +++ b/src/devices/pic/xml_data/16F630.xml @@ -36,16 +36,16 @@ - - + + - - + + @@ -54,37 +54,37 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16F631.xml b/src/devices/pic/xml_data/16F631.xml index e6a5274..9a0bb10 100644 --- a/src/devices/pic/xml_data/16F631.xml +++ b/src/devices/pic/xml_data/16F631.xml @@ -30,16 +30,16 @@ - - + + - - + + @@ -48,41 +48,41 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16F636.xml b/src/devices/pic/xml_data/16F636.xml index e47314e..d996191 100644 --- a/src/devices/pic/xml_data/16F636.xml +++ b/src/devices/pic/xml_data/16F636.xml @@ -30,16 +30,16 @@ - - + + - - + + @@ -48,45 +48,45 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16F639.xml b/src/devices/pic/xml_data/16F639.xml index 7affb7b..6cb669e 100644 --- a/src/devices/pic/xml_data/16F639.xml +++ b/src/devices/pic/xml_data/16F639.xml @@ -30,16 +30,16 @@ - - + + - - + + @@ -48,45 +48,45 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16F648A.xml b/src/devices/pic/xml_data/16F648A.xml index 17b4f83..6ece38e 100644 --- a/src/devices/pic/xml_data/16F648A.xml +++ b/src/devices/pic/xml_data/16F648A.xml @@ -37,23 +37,23 @@ - + - - + + - - + + - - + + @@ -62,27 +62,27 @@ - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16F676.xml b/src/devices/pic/xml_data/16F676.xml index b608d48..6dc78bc 100644 --- a/src/devices/pic/xml_data/16F676.xml +++ b/src/devices/pic/xml_data/16F676.xml @@ -36,16 +36,16 @@ - - + + - - + + @@ -54,37 +54,37 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16F677.xml b/src/devices/pic/xml_data/16F677.xml index d27b2eb..f819715 100644 --- a/src/devices/pic/xml_data/16F677.xml +++ b/src/devices/pic/xml_data/16F677.xml @@ -30,16 +30,16 @@ - - + + - - + + @@ -48,41 +48,41 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16F684.xml b/src/devices/pic/xml_data/16F684.xml index f330925..c620fc1 100644 --- a/src/devices/pic/xml_data/16F684.xml +++ b/src/devices/pic/xml_data/16F684.xml @@ -30,16 +30,16 @@ - - + + - - + + @@ -48,41 +48,41 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16F685.xml b/src/devices/pic/xml_data/16F685.xml index aa35aa3..a0c5713 100644 --- a/src/devices/pic/xml_data/16F685.xml +++ b/src/devices/pic/xml_data/16F685.xml @@ -30,16 +30,16 @@ - - + + - - + + @@ -48,41 +48,41 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16F687.xml b/src/devices/pic/xml_data/16F687.xml index 2e58780..093f879 100644 --- a/src/devices/pic/xml_data/16F687.xml +++ b/src/devices/pic/xml_data/16F687.xml @@ -30,16 +30,16 @@ - - + + - - + + @@ -48,41 +48,41 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16F688.xml b/src/devices/pic/xml_data/16F688.xml index 2692159..bde2461 100644 --- a/src/devices/pic/xml_data/16F688.xml +++ b/src/devices/pic/xml_data/16F688.xml @@ -30,16 +30,16 @@ - - + + - - + + @@ -48,41 +48,41 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16F689.xml b/src/devices/pic/xml_data/16F689.xml index f22fdcd..af0651f 100644 --- a/src/devices/pic/xml_data/16F689.xml +++ b/src/devices/pic/xml_data/16F689.xml @@ -30,16 +30,16 @@ - - + + - - + + @@ -48,41 +48,41 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16F690.xml b/src/devices/pic/xml_data/16F690.xml index 7a51bac..f606062 100644 --- a/src/devices/pic/xml_data/16F690.xml +++ b/src/devices/pic/xml_data/16F690.xml @@ -30,16 +30,16 @@ - - + + - - + + @@ -48,41 +48,41 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16F716.xml b/src/devices/pic/xml_data/16F716.xml index 8ebaa00..d0cc586 100644 --- a/src/devices/pic/xml_data/16F716.xml +++ b/src/devices/pic/xml_data/16F716.xml @@ -36,39 +36,39 @@ - + - - + + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16F72.xml b/src/devices/pic/xml_data/16F72.xml index d49b2cd..a8c789d 100644 --- a/src/devices/pic/xml_data/16F72.xml +++ b/src/devices/pic/xml_data/16F72.xml @@ -34,34 +34,34 @@ - + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16F73.xml b/src/devices/pic/xml_data/16F73.xml index 157cb74..8659896 100644 --- a/src/devices/pic/xml_data/16F73.xml +++ b/src/devices/pic/xml_data/16F73.xml @@ -25,34 +25,34 @@ - + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16F737.xml b/src/devices/pic/xml_data/16F737.xml index 0184aa9..c17c0f8 100644 --- a/src/devices/pic/xml_data/16F737.xml +++ b/src/devices/pic/xml_data/16F737.xml @@ -34,22 +34,22 @@ - + - - + + - - + + - - + + @@ -58,48 +58,48 @@ - - + + - - + + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16F74.xml b/src/devices/pic/xml_data/16F74.xml index fc2b312..7bfc1b3 100644 --- a/src/devices/pic/xml_data/16F74.xml +++ b/src/devices/pic/xml_data/16F74.xml @@ -25,34 +25,34 @@ - + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16F747.xml b/src/devices/pic/xml_data/16F747.xml index ec03640..1200a6c 100644 --- a/src/devices/pic/xml_data/16F747.xml +++ b/src/devices/pic/xml_data/16F747.xml @@ -34,22 +34,22 @@ - + - - + + - - + + - - + + @@ -58,48 +58,48 @@ - - + + - - + + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16F76.xml b/src/devices/pic/xml_data/16F76.xml index 3b6fcf3..8fde14a 100644 --- a/src/devices/pic/xml_data/16F76.xml +++ b/src/devices/pic/xml_data/16F76.xml @@ -25,34 +25,34 @@ - + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16F767.xml b/src/devices/pic/xml_data/16F767.xml index 77ed134..0dc2c9f 100644 --- a/src/devices/pic/xml_data/16F767.xml +++ b/src/devices/pic/xml_data/16F767.xml @@ -34,22 +34,22 @@ - + - - + + - - + + - - + + @@ -58,48 +58,48 @@ - - + + - - + + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16F77.xml b/src/devices/pic/xml_data/16F77.xml index e02e2cb..b17a20a 100644 --- a/src/devices/pic/xml_data/16F77.xml +++ b/src/devices/pic/xml_data/16F77.xml @@ -25,34 +25,34 @@ - + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16F777.xml b/src/devices/pic/xml_data/16F777.xml index 71899b2..54f6eb3 100644 --- a/src/devices/pic/xml_data/16F777.xml +++ b/src/devices/pic/xml_data/16F777.xml @@ -34,22 +34,22 @@ - + - - + + - - + + - - + + @@ -58,48 +58,48 @@ - - + + - - + + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16F785.xml b/src/devices/pic/xml_data/16F785.xml index 80c9091..29fd083 100644 --- a/src/devices/pic/xml_data/16F785.xml +++ b/src/devices/pic/xml_data/16F785.xml @@ -38,16 +38,16 @@ - - + + - - + + @@ -56,41 +56,41 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16F818.xml b/src/devices/pic/xml_data/16F818.xml index 0ff73b5..86d9f5b 100644 --- a/src/devices/pic/xml_data/16F818.xml +++ b/src/devices/pic/xml_data/16F818.xml @@ -35,23 +35,23 @@ - + - - + + - - + + - - + + @@ -60,41 +60,41 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16F819.xml b/src/devices/pic/xml_data/16F819.xml index e7ee0a6..76d1de1 100644 --- a/src/devices/pic/xml_data/16F819.xml +++ b/src/devices/pic/xml_data/16F819.xml @@ -35,23 +35,23 @@ - + - - + + - - + + - - + + @@ -60,41 +60,41 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16F83.xml b/src/devices/pic/xml_data/16F83.xml index 25b80a3..ff9af73 100644 --- a/src/devices/pic/xml_data/16F83.xml +++ b/src/devices/pic/xml_data/16F83.xml @@ -31,31 +31,31 @@ - + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16F84.xml b/src/devices/pic/xml_data/16F84.xml index 62c1f8d..88cd1ae 100644 --- a/src/devices/pic/xml_data/16F84.xml +++ b/src/devices/pic/xml_data/16F84.xml @@ -31,31 +31,31 @@ - + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16F84A.xml b/src/devices/pic/xml_data/16F84A.xml index ffffba1..a179de1 100644 --- a/src/devices/pic/xml_data/16F84A.xml +++ b/src/devices/pic/xml_data/16F84A.xml @@ -32,32 +32,32 @@ - + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16F87.xml b/src/devices/pic/xml_data/16F87.xml index 835b481..987ef0c 100644 --- a/src/devices/pic/xml_data/16F87.xml +++ b/src/devices/pic/xml_data/16F87.xml @@ -34,23 +34,23 @@ - + - - + + - - + + - - + + @@ -59,52 +59,52 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16F870.xml b/src/devices/pic/xml_data/16F870.xml index ec66b54..005a948 100644 --- a/src/devices/pic/xml_data/16F870.xml +++ b/src/devices/pic/xml_data/16F870.xml @@ -36,53 +36,53 @@ - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16F871.xml b/src/devices/pic/xml_data/16F871.xml index 8b918ca..ddfd932 100644 --- a/src/devices/pic/xml_data/16F871.xml +++ b/src/devices/pic/xml_data/16F871.xml @@ -36,53 +36,53 @@ - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16F872.xml b/src/devices/pic/xml_data/16F872.xml index 7702922..da5fe20 100644 --- a/src/devices/pic/xml_data/16F872.xml +++ b/src/devices/pic/xml_data/16F872.xml @@ -36,53 +36,53 @@ - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16F873.xml b/src/devices/pic/xml_data/16F873.xml index 4bbb1cb..b010152 100644 --- a/src/devices/pic/xml_data/16F873.xml +++ b/src/devices/pic/xml_data/16F873.xml @@ -41,55 +41,55 @@ - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16F873A.xml b/src/devices/pic/xml_data/16F873A.xml index ee26828..e9dd61a 100644 --- a/src/devices/pic/xml_data/16F873A.xml +++ b/src/devices/pic/xml_data/16F873A.xml @@ -35,54 +35,54 @@ - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16F874.xml b/src/devices/pic/xml_data/16F874.xml index fe20128..7135150 100644 --- a/src/devices/pic/xml_data/16F874.xml +++ b/src/devices/pic/xml_data/16F874.xml @@ -41,55 +41,55 @@ - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16F874A.xml b/src/devices/pic/xml_data/16F874A.xml index c89b407..c827c6e 100644 --- a/src/devices/pic/xml_data/16F874A.xml +++ b/src/devices/pic/xml_data/16F874A.xml @@ -35,54 +35,54 @@ - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16F876.xml b/src/devices/pic/xml_data/16F876.xml index 19264e8..cf59664 100644 --- a/src/devices/pic/xml_data/16F876.xml +++ b/src/devices/pic/xml_data/16F876.xml @@ -41,55 +41,55 @@ - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16F876A.xml b/src/devices/pic/xml_data/16F876A.xml index f1c23ce..11b3214 100644 --- a/src/devices/pic/xml_data/16F876A.xml +++ b/src/devices/pic/xml_data/16F876A.xml @@ -35,54 +35,54 @@ - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16F877.xml b/src/devices/pic/xml_data/16F877.xml index f83da05..d9e65fc 100644 --- a/src/devices/pic/xml_data/16F877.xml +++ b/src/devices/pic/xml_data/16F877.xml @@ -41,55 +41,55 @@ - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16F877A.xml b/src/devices/pic/xml_data/16F877A.xml index 3a16d77..b47b113 100644 --- a/src/devices/pic/xml_data/16F877A.xml +++ b/src/devices/pic/xml_data/16F877A.xml @@ -35,54 +35,54 @@ - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16F88.xml b/src/devices/pic/xml_data/16F88.xml index b2325c3..09fd755 100644 --- a/src/devices/pic/xml_data/16F88.xml +++ b/src/devices/pic/xml_data/16F88.xml @@ -32,23 +32,23 @@ - + - - + + - - + + - - + + @@ -57,52 +57,52 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16F882.xml b/src/devices/pic/xml_data/16F882.xml index db2c723..79cec09 100644 --- a/src/devices/pic/xml_data/16F882.xml +++ b/src/devices/pic/xml_data/16F882.xml @@ -33,16 +33,16 @@ - - + + - - + + @@ -51,62 +51,62 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16F883.xml b/src/devices/pic/xml_data/16F883.xml index 1140b72..1ec6702 100644 --- a/src/devices/pic/xml_data/16F883.xml +++ b/src/devices/pic/xml_data/16F883.xml @@ -33,16 +33,16 @@ - - + + - - + + @@ -51,62 +51,62 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16F884.xml b/src/devices/pic/xml_data/16F884.xml index fbe9423..538d214 100644 --- a/src/devices/pic/xml_data/16F884.xml +++ b/src/devices/pic/xml_data/16F884.xml @@ -33,16 +33,16 @@ - - + + - - + + @@ -51,62 +51,62 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16F886.xml b/src/devices/pic/xml_data/16F886.xml index 3205cd7..fe07fe7 100644 --- a/src/devices/pic/xml_data/16F886.xml +++ b/src/devices/pic/xml_data/16F886.xml @@ -33,16 +33,16 @@ - - + + - - + + @@ -51,62 +51,62 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16F887.xml b/src/devices/pic/xml_data/16F887.xml index 78be11e..bbfdf91 100644 --- a/src/devices/pic/xml_data/16F887.xml +++ b/src/devices/pic/xml_data/16F887.xml @@ -33,16 +33,16 @@ - - + + - - + + @@ -51,62 +51,62 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16F913.xml b/src/devices/pic/xml_data/16F913.xml index c904d5d..c793c72 100644 --- a/src/devices/pic/xml_data/16F913.xml +++ b/src/devices/pic/xml_data/16F913.xml @@ -31,16 +31,16 @@ - - + + - - + + @@ -49,45 +49,45 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16F914.xml b/src/devices/pic/xml_data/16F914.xml index d74a0d5..1bdd6ad 100644 --- a/src/devices/pic/xml_data/16F914.xml +++ b/src/devices/pic/xml_data/16F914.xml @@ -31,16 +31,16 @@ - - + + - - + + @@ -49,45 +49,45 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16F916.xml b/src/devices/pic/xml_data/16F916.xml index b066f93..f2a139a 100644 --- a/src/devices/pic/xml_data/16F916.xml +++ b/src/devices/pic/xml_data/16F916.xml @@ -31,16 +31,16 @@ - - + + - - + + @@ -49,45 +49,45 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16F917.xml b/src/devices/pic/xml_data/16F917.xml index 9e17dcc..b2fb425 100644 --- a/src/devices/pic/xml_data/16F917.xml +++ b/src/devices/pic/xml_data/16F917.xml @@ -31,16 +31,16 @@ - - + + - - + + @@ -49,45 +49,45 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16F946.xml b/src/devices/pic/xml_data/16F946.xml index 53df522..df3ac70 100644 --- a/src/devices/pic/xml_data/16F946.xml +++ b/src/devices/pic/xml_data/16F946.xml @@ -31,16 +31,16 @@ - - + + - - + + @@ -49,45 +49,45 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/16HV540.xml b/src/devices/pic/xml_data/16HV540.xml index 439aa82..4acd802 100644 --- a/src/devices/pic/xml_data/16HV540.xml +++ b/src/devices/pic/xml_data/16HV540.xml @@ -28,25 +28,25 @@ - + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/17C42.xml b/src/devices/pic/xml_data/17C42.xml index e072c94..7ca1e0f 100644 --- a/src/devices/pic/xml_data/17C42.xml +++ b/src/devices/pic/xml_data/17C42.xml @@ -30,25 +30,25 @@ - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/17C42A.xml b/src/devices/pic/xml_data/17C42A.xml index 58c59b3..2c068ae 100644 --- a/src/devices/pic/xml_data/17C42A.xml +++ b/src/devices/pic/xml_data/17C42A.xml @@ -33,26 +33,26 @@ - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/17C43.xml b/src/devices/pic/xml_data/17C43.xml index 4c91f40..b49734a 100644 --- a/src/devices/pic/xml_data/17C43.xml +++ b/src/devices/pic/xml_data/17C43.xml @@ -33,26 +33,26 @@ - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/17C44.xml b/src/devices/pic/xml_data/17C44.xml index da4be7b..ac0d8f6 100644 --- a/src/devices/pic/xml_data/17C44.xml +++ b/src/devices/pic/xml_data/17C44.xml @@ -33,26 +33,26 @@ - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/17C752.xml b/src/devices/pic/xml_data/17C752.xml index 20f798f..adb759c 100644 --- a/src/devices/pic/xml_data/17C752.xml +++ b/src/devices/pic/xml_data/17C752.xml @@ -33,30 +33,30 @@ - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/17C756.xml b/src/devices/pic/xml_data/17C756.xml index a5df4c4..68b0ae7 100644 --- a/src/devices/pic/xml_data/17C756.xml +++ b/src/devices/pic/xml_data/17C756.xml @@ -33,30 +33,30 @@ - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/17C756A.xml b/src/devices/pic/xml_data/17C756A.xml index f20ee31..39c9b81 100644 --- a/src/devices/pic/xml_data/17C756A.xml +++ b/src/devices/pic/xml_data/17C756A.xml @@ -33,30 +33,30 @@ - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/17C762.xml b/src/devices/pic/xml_data/17C762.xml index 10e3a86..311caa6 100644 --- a/src/devices/pic/xml_data/17C762.xml +++ b/src/devices/pic/xml_data/17C762.xml @@ -33,30 +33,30 @@ - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/17C766.xml b/src/devices/pic/xml_data/17C766.xml index 0d2559d..059decd 100644 --- a/src/devices/pic/xml_data/17C766.xml +++ b/src/devices/pic/xml_data/17C766.xml @@ -33,30 +33,30 @@ - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/17CR42.xml b/src/devices/pic/xml_data/17CR42.xml index b691cd8..21893f8 100644 --- a/src/devices/pic/xml_data/17CR42.xml +++ b/src/devices/pic/xml_data/17CR42.xml @@ -33,26 +33,26 @@ - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/17CR43.xml b/src/devices/pic/xml_data/17CR43.xml index 13c1f2c..1e43eec 100644 --- a/src/devices/pic/xml_data/17CR43.xml +++ b/src/devices/pic/xml_data/17CR43.xml @@ -33,26 +33,26 @@ - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/18C242.xml b/src/devices/pic/xml_data/18C242.xml index 798c478..32495ab 100644 --- a/src/devices/pic/xml_data/18C242.xml +++ b/src/devices/pic/xml_data/18C242.xml @@ -29,21 +29,21 @@ - + - - + + - + - - + + @@ -52,36 +52,36 @@ - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -90,26 +90,26 @@ - + - + - - + + - + - - + + - + - + diff --git a/src/devices/pic/xml_data/18C252.xml b/src/devices/pic/xml_data/18C252.xml index 81f370b..d5a7161 100644 --- a/src/devices/pic/xml_data/18C252.xml +++ b/src/devices/pic/xml_data/18C252.xml @@ -29,21 +29,21 @@ - + - - + + - + - - + + @@ -52,36 +52,36 @@ - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -90,26 +90,26 @@ - + - + - - + + - + - - + + - + - + diff --git a/src/devices/pic/xml_data/18C442.xml b/src/devices/pic/xml_data/18C442.xml index 419ee29..5ecb3b4 100644 --- a/src/devices/pic/xml_data/18C442.xml +++ b/src/devices/pic/xml_data/18C442.xml @@ -29,21 +29,21 @@ - + - - + + - + - - + + @@ -52,36 +52,36 @@ - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -90,26 +90,26 @@ - + - + - - + + - + - - + + - + - + diff --git a/src/devices/pic/xml_data/18C452.xml b/src/devices/pic/xml_data/18C452.xml index 73e3610..5a6a07c 100644 --- a/src/devices/pic/xml_data/18C452.xml +++ b/src/devices/pic/xml_data/18C452.xml @@ -29,21 +29,21 @@ - + - - + + - + - - + + @@ -52,36 +52,36 @@ - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -90,26 +90,26 @@ - + - + - - + + - + - - + + - + - + diff --git a/src/devices/pic/xml_data/18C601.xml b/src/devices/pic/xml_data/18C601.xml index 6d41b1c..9469902 100644 --- a/src/devices/pic/xml_data/18C601.xml +++ b/src/devices/pic/xml_data/18C601.xml @@ -27,34 +27,34 @@ - + - - + + - + - - + + - - + + - + - - + + - - + + @@ -63,25 +63,25 @@ - + - + - + - - + + - - + + - + - + diff --git a/src/devices/pic/xml_data/18C658.xml b/src/devices/pic/xml_data/18C658.xml index 9ca140c..5f115ee 100644 --- a/src/devices/pic/xml_data/18C658.xml +++ b/src/devices/pic/xml_data/18C658.xml @@ -29,21 +29,21 @@ - + - - + + - + - - + + @@ -52,36 +52,36 @@ - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -90,21 +90,21 @@ - + - + - + - - + + - + - + diff --git a/src/devices/pic/xml_data/18C801.xml b/src/devices/pic/xml_data/18C801.xml index 3e067ad..186230c 100644 --- a/src/devices/pic/xml_data/18C801.xml +++ b/src/devices/pic/xml_data/18C801.xml @@ -27,34 +27,34 @@ - + - - + + - + - - + + - - + + - + - - + + - - + + @@ -63,25 +63,25 @@ - + - + - + - - + + - - + + - + - + diff --git a/src/devices/pic/xml_data/18C858.xml b/src/devices/pic/xml_data/18C858.xml index 7ce8087..33eb056 100644 --- a/src/devices/pic/xml_data/18C858.xml +++ b/src/devices/pic/xml_data/18C858.xml @@ -29,21 +29,21 @@ - + - - + + - + - - + + @@ -52,36 +52,36 @@ - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -90,21 +90,21 @@ - + - + - + - - + + - + - + diff --git a/src/devices/pic/xml_data/18F1220.xml b/src/devices/pic/xml_data/18F1220.xml index e46f7f0..1cd826b 100644 --- a/src/devices/pic/xml_data/18F1220.xml +++ b/src/devices/pic/xml_data/18F1220.xml @@ -34,17 +34,17 @@ - + - + - - + + @@ -55,40 +55,40 @@ - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -105,99 +105,99 @@ - + - + - - + + - + - - + + - - + + - - + + - + - + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F1230.xml b/src/devices/pic/xml_data/18F1230.xml index 043687a..c84d79f 100644 --- a/src/devices/pic/xml_data/18F1230.xml +++ b/src/devices/pic/xml_data/18F1230.xml @@ -39,17 +39,17 @@ - + - + - - + + @@ -60,42 +60,42 @@ - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -112,124 +112,124 @@ - + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F1320.xml b/src/devices/pic/xml_data/18F1320.xml index d4dd214..8cee921 100644 --- a/src/devices/pic/xml_data/18F1320.xml +++ b/src/devices/pic/xml_data/18F1320.xml @@ -34,17 +34,17 @@ - + - + - - + + @@ -56,40 +56,40 @@ - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -106,99 +106,99 @@ - + - + - - + + - + - - + + - - + + - - + + - + - + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F1330.xml b/src/devices/pic/xml_data/18F1330.xml index 14130ce..fb11bbb 100644 --- a/src/devices/pic/xml_data/18F1330.xml +++ b/src/devices/pic/xml_data/18F1330.xml @@ -40,17 +40,17 @@ - + - + - - + + @@ -61,42 +61,42 @@ - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -113,125 +113,125 @@ - + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F2220.xml b/src/devices/pic/xml_data/18F2220.xml index 43f6fbc..7ea415b 100644 --- a/src/devices/pic/xml_data/18F2220.xml +++ b/src/devices/pic/xml_data/18F2220.xml @@ -35,17 +35,17 @@ - + - + - - + + @@ -56,40 +56,40 @@ - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -106,107 +106,107 @@ - + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F2221.xml b/src/devices/pic/xml_data/18F2221.xml index f2a58d6..b3436d5 100644 --- a/src/devices/pic/xml_data/18F2221.xml +++ b/src/devices/pic/xml_data/18F2221.xml @@ -27,17 +27,17 @@ - + - + - - + + @@ -48,42 +48,42 @@ - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -100,119 +100,119 @@ - + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - + - + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F2320.xml b/src/devices/pic/xml_data/18F2320.xml index 80e8250..d17d96a 100644 --- a/src/devices/pic/xml_data/18F2320.xml +++ b/src/devices/pic/xml_data/18F2320.xml @@ -37,17 +37,17 @@ - + - + - - + + @@ -59,40 +59,40 @@ - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -109,131 +109,131 @@ - + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F2321.xml b/src/devices/pic/xml_data/18F2321.xml index a016fc7..f00f7dc 100644 --- a/src/devices/pic/xml_data/18F2321.xml +++ b/src/devices/pic/xml_data/18F2321.xml @@ -27,17 +27,17 @@ - + - + - - + + @@ -48,42 +48,42 @@ - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -100,120 +100,120 @@ - + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - + - + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F2331.xml b/src/devices/pic/xml_data/18F2331.xml index 46a8872..7f73a7d 100644 --- a/src/devices/pic/xml_data/18F2331.xml +++ b/src/devices/pic/xml_data/18F2331.xml @@ -34,17 +34,17 @@ - + - + - - + + @@ -55,40 +55,40 @@ - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -105,120 +105,120 @@ - - + + - + - - + + - - + + - - + + - - + + - + - - + + - + - - + + - - + + - - + + - + - + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F2410.xml b/src/devices/pic/xml_data/18F2410.xml index 15d6179..76968f8 100644 --- a/src/devices/pic/xml_data/18F2410.xml +++ b/src/devices/pic/xml_data/18F2410.xml @@ -27,16 +27,16 @@ - + - + - - + + @@ -47,42 +47,42 @@ - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -99,107 +99,107 @@ - + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - + - - + + - - + + - + - - + + - + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F242.xml b/src/devices/pic/xml_data/18F242.xml index d09dd83..8588203 100644 --- a/src/devices/pic/xml_data/18F242.xml +++ b/src/devices/pic/xml_data/18F242.xml @@ -34,17 +34,17 @@ - + - + - - + + @@ -53,36 +53,36 @@ - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -91,99 +91,99 @@ - + - + - - + + - + - - + + - - + + - - + + - + - + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F2420.xml b/src/devices/pic/xml_data/18F2420.xml index aba9ace..d50dd2a 100644 --- a/src/devices/pic/xml_data/18F2420.xml +++ b/src/devices/pic/xml_data/18F2420.xml @@ -27,17 +27,17 @@ - + - + - - + + @@ -48,42 +48,42 @@ - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -100,115 +100,115 @@ - + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F2423.xml b/src/devices/pic/xml_data/18F2423.xml index 0905f18..29ff971 100644 --- a/src/devices/pic/xml_data/18F2423.xml +++ b/src/devices/pic/xml_data/18F2423.xml @@ -24,17 +24,17 @@ - + - + - - + + @@ -45,42 +45,42 @@ - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -97,115 +97,115 @@ - + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F2431.xml b/src/devices/pic/xml_data/18F2431.xml index f898f99..f162ef2 100644 --- a/src/devices/pic/xml_data/18F2431.xml +++ b/src/devices/pic/xml_data/18F2431.xml @@ -35,17 +35,17 @@ - + - + - - + + @@ -56,40 +56,40 @@ - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -106,120 +106,120 @@ - - + + - + - - + + - - + + - - + + - - + + - + - - + + - + - - + + - - + + - - + + - + - + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F2439.xml b/src/devices/pic/xml_data/18F2439.xml index ad389e3..edc3696 100644 --- a/src/devices/pic/xml_data/18F2439.xml +++ b/src/devices/pic/xml_data/18F2439.xml @@ -35,48 +35,48 @@ - + - + - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -85,94 +85,94 @@ - + - + - + - - + + - - + + - - + + - + - + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F2450.xml b/src/devices/pic/xml_data/18F2450.xml index 2388a92..ad3994f 100644 --- a/src/devices/pic/xml_data/18F2450.xml +++ b/src/devices/pic/xml_data/18F2450.xml @@ -27,14 +27,14 @@ - + - - + + @@ -43,21 +43,21 @@ - - + + - - + + - + - - + + @@ -74,46 +74,46 @@ - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - - + + @@ -130,107 +130,107 @@ - + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - + - + - - + + - - + + - + - - + + - + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F2455.xml b/src/devices/pic/xml_data/18F2455.xml index 7097218..c42923a 100644 --- a/src/devices/pic/xml_data/18F2455.xml +++ b/src/devices/pic/xml_data/18F2455.xml @@ -26,15 +26,15 @@ - + - - + + @@ -43,21 +43,21 @@ - - + + - - + + - + - - + + @@ -74,46 +74,46 @@ - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - - + + @@ -130,127 +130,127 @@ - + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F248.xml b/src/devices/pic/xml_data/18F248.xml index 973ba90..a7078ba 100644 --- a/src/devices/pic/xml_data/18F248.xml +++ b/src/devices/pic/xml_data/18F248.xml @@ -34,17 +34,17 @@ - + - + - - + + @@ -53,36 +53,36 @@ - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -91,94 +91,94 @@ - + - + - + - - + + - - + + - - + + - + - + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F2480.xml b/src/devices/pic/xml_data/18F2480.xml index 7f8929b..4282365 100644 --- a/src/devices/pic/xml_data/18F2480.xml +++ b/src/devices/pic/xml_data/18F2480.xml @@ -27,17 +27,17 @@ - + - + - - + + @@ -54,42 +54,42 @@ - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -106,115 +106,115 @@ - + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - + - + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F24J10.xml b/src/devices/pic/xml_data/18F24J10.xml index c4ae257..b88c8f0 100644 --- a/src/devices/pic/xml_data/18F24J10.xml +++ b/src/devices/pic/xml_data/18F24J10.xml @@ -31,55 +31,55 @@ - - + + - - + + - - + + - - + + - + - - + + - + - - + + - - + + - - + + - - + + - + - - + + @@ -96,23 +96,23 @@ - + - + - - + + - + - + - + diff --git a/src/devices/pic/xml_data/18F2510.xml b/src/devices/pic/xml_data/18F2510.xml index 1950de1..55c62f8 100644 --- a/src/devices/pic/xml_data/18F2510.xml +++ b/src/devices/pic/xml_data/18F2510.xml @@ -27,16 +27,16 @@ - + - + - - + + @@ -53,42 +53,42 @@ - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -105,131 +105,131 @@ - + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - + - - + + - - + + - - + + - - + + - + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F2515.xml b/src/devices/pic/xml_data/18F2515.xml index 89960ae..fa07b14 100644 --- a/src/devices/pic/xml_data/18F2515.xml +++ b/src/devices/pic/xml_data/18F2515.xml @@ -27,16 +27,16 @@ - + - + - - + + @@ -53,42 +53,42 @@ - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -105,119 +105,119 @@ - + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - + - - + + - - + + - - + + - + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F252.xml b/src/devices/pic/xml_data/18F252.xml index b1d4153..595eb74 100644 --- a/src/devices/pic/xml_data/18F252.xml +++ b/src/devices/pic/xml_data/18F252.xml @@ -35,17 +35,17 @@ - + - + - - + + @@ -54,36 +54,36 @@ - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -92,123 +92,123 @@ - + - + - - + + - + - - + + - - + + - - + + - + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F2520.xml b/src/devices/pic/xml_data/18F2520.xml index 3c77df0..07a97db 100644 --- a/src/devices/pic/xml_data/18F2520.xml +++ b/src/devices/pic/xml_data/18F2520.xml @@ -27,17 +27,17 @@ - + - + - - + + @@ -54,42 +54,42 @@ - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -106,139 +106,139 @@ - + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F2523.xml b/src/devices/pic/xml_data/18F2523.xml index 6a92c8d..e630c60 100644 --- a/src/devices/pic/xml_data/18F2523.xml +++ b/src/devices/pic/xml_data/18F2523.xml @@ -24,17 +24,17 @@ - + - + - - + + @@ -45,42 +45,42 @@ - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -97,139 +97,139 @@ - + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F2525.xml b/src/devices/pic/xml_data/18F2525.xml index 2ff5bc7..eb2f3fe 100644 --- a/src/devices/pic/xml_data/18F2525.xml +++ b/src/devices/pic/xml_data/18F2525.xml @@ -27,17 +27,17 @@ - + - + - - + + @@ -54,42 +54,42 @@ - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -106,127 +106,127 @@ - + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F2539.xml b/src/devices/pic/xml_data/18F2539.xml index 0f4a17a..8e5f2cc 100644 --- a/src/devices/pic/xml_data/18F2539.xml +++ b/src/devices/pic/xml_data/18F2539.xml @@ -35,48 +35,48 @@ - + - + - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -85,106 +85,106 @@ - + - + - + - - + + - - + + - - + + - + - + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F2550.xml b/src/devices/pic/xml_data/18F2550.xml index 21ab9ae..af87dd0 100644 --- a/src/devices/pic/xml_data/18F2550.xml +++ b/src/devices/pic/xml_data/18F2550.xml @@ -26,15 +26,15 @@ - + - - + + @@ -43,21 +43,21 @@ - - + + - - + + - + - - + + @@ -74,46 +74,46 @@ - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - - + + @@ -130,131 +130,131 @@ - + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - + - - + + - - + + - - + + - - + + - + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F258.xml b/src/devices/pic/xml_data/18F258.xml index bb27ca5..c24567e 100644 --- a/src/devices/pic/xml_data/18F258.xml +++ b/src/devices/pic/xml_data/18F258.xml @@ -35,17 +35,17 @@ - + - + - - + + @@ -54,36 +54,36 @@ - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -92,118 +92,118 @@ - + - + - + - - + + - - + + - - + + - + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F2580.xml b/src/devices/pic/xml_data/18F2580.xml index 6721af5..4458519 100644 --- a/src/devices/pic/xml_data/18F2580.xml +++ b/src/devices/pic/xml_data/18F2580.xml @@ -27,17 +27,17 @@ - + - + - - + + @@ -54,42 +54,42 @@ - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -106,139 +106,139 @@ - + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F2585.xml b/src/devices/pic/xml_data/18F2585.xml index 12b38f1..fa6d739 100644 --- a/src/devices/pic/xml_data/18F2585.xml +++ b/src/devices/pic/xml_data/18F2585.xml @@ -27,17 +27,17 @@ - + - + - - + + @@ -54,42 +54,42 @@ - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -106,129 +106,129 @@ - + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - + - + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F25J10.xml b/src/devices/pic/xml_data/18F25J10.xml index 57f37d4..e6b94e0 100644 --- a/src/devices/pic/xml_data/18F25J10.xml +++ b/src/devices/pic/xml_data/18F25J10.xml @@ -31,55 +31,55 @@ - - + + - - + + - - + + - - + + - + - - + + - + - - + + - - + + - - + + - - + + - + - - + + @@ -96,23 +96,23 @@ - + - + - - + + - + - + - + diff --git a/src/devices/pic/xml_data/18F2610.xml b/src/devices/pic/xml_data/18F2610.xml index e38c6d2..3de5893 100644 --- a/src/devices/pic/xml_data/18F2610.xml +++ b/src/devices/pic/xml_data/18F2610.xml @@ -27,16 +27,16 @@ - + - + - - + + @@ -53,42 +53,42 @@ - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -105,131 +105,131 @@ - + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - + - - + + - - + + - - + + - - + + - + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F2620.xml b/src/devices/pic/xml_data/18F2620.xml index 7c25f21..faacae3 100644 --- a/src/devices/pic/xml_data/18F2620.xml +++ b/src/devices/pic/xml_data/18F2620.xml @@ -30,17 +30,17 @@ - + - + - - + + @@ -51,42 +51,42 @@ - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -103,131 +103,131 @@ - + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - + - - + + - - + + - - + + - - + + - + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F2680.xml b/src/devices/pic/xml_data/18F2680.xml index 2dcd013..09c4863 100644 --- a/src/devices/pic/xml_data/18F2680.xml +++ b/src/devices/pic/xml_data/18F2680.xml @@ -27,17 +27,17 @@ - + - + - - + + @@ -54,42 +54,42 @@ - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -106,141 +106,141 @@ - + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F2682.xml b/src/devices/pic/xml_data/18F2682.xml index 8c13b2d..9f5501f 100644 --- a/src/devices/pic/xml_data/18F2682.xml +++ b/src/devices/pic/xml_data/18F2682.xml @@ -27,17 +27,17 @@ - + - + - - + + @@ -48,42 +48,42 @@ - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -100,153 +100,153 @@ - + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - + - + - - + + - - + + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F2685.xml b/src/devices/pic/xml_data/18F2685.xml index bca6818..cba2b20 100644 --- a/src/devices/pic/xml_data/18F2685.xml +++ b/src/devices/pic/xml_data/18F2685.xml @@ -27,17 +27,17 @@ - + - + - - + + @@ -48,42 +48,42 @@ - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -100,165 +100,165 @@ - + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - + - + - - + + - - + + - - + + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F4220.xml b/src/devices/pic/xml_data/18F4220.xml index f1c19c7..12dda87 100644 --- a/src/devices/pic/xml_data/18F4220.xml +++ b/src/devices/pic/xml_data/18F4220.xml @@ -35,17 +35,17 @@ - + - + - - + + @@ -57,40 +57,40 @@ - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -107,107 +107,107 @@ - + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F4221.xml b/src/devices/pic/xml_data/18F4221.xml index d4a7e11..417ae32 100644 --- a/src/devices/pic/xml_data/18F4221.xml +++ b/src/devices/pic/xml_data/18F4221.xml @@ -27,17 +27,17 @@ - + - + - - + + @@ -54,42 +54,42 @@ - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -106,125 +106,125 @@ - + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - - + + - + - + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F4320.xml b/src/devices/pic/xml_data/18F4320.xml index 734bb11..141b008 100644 --- a/src/devices/pic/xml_data/18F4320.xml +++ b/src/devices/pic/xml_data/18F4320.xml @@ -37,17 +37,17 @@ - + - + - - + + @@ -59,40 +59,40 @@ - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -109,131 +109,131 @@ - + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F4321.xml b/src/devices/pic/xml_data/18F4321.xml index 6bdd265..a7f5bd9 100644 --- a/src/devices/pic/xml_data/18F4321.xml +++ b/src/devices/pic/xml_data/18F4321.xml @@ -27,17 +27,17 @@ - + - + - - + + @@ -54,42 +54,42 @@ - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -106,125 +106,125 @@ - + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - - + + - + - + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F4331.xml b/src/devices/pic/xml_data/18F4331.xml index a22e667..7709516 100644 --- a/src/devices/pic/xml_data/18F4331.xml +++ b/src/devices/pic/xml_data/18F4331.xml @@ -34,17 +34,17 @@ - + - + - - + + @@ -61,40 +61,40 @@ - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -111,136 +111,136 @@ - - + + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F4410.xml b/src/devices/pic/xml_data/18F4410.xml index 8ca9b17..42557f8 100644 --- a/src/devices/pic/xml_data/18F4410.xml +++ b/src/devices/pic/xml_data/18F4410.xml @@ -27,16 +27,16 @@ - + - + - - + + @@ -53,42 +53,42 @@ - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -105,107 +105,107 @@ - + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - + - - + + - - + + - + - - + + - + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F442.xml b/src/devices/pic/xml_data/18F442.xml index 61f6a63..1a864f5 100644 --- a/src/devices/pic/xml_data/18F442.xml +++ b/src/devices/pic/xml_data/18F442.xml @@ -34,17 +34,17 @@ - + - + - - + + @@ -53,36 +53,36 @@ - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -91,99 +91,99 @@ - + - + - - + + - + - - + + - - + + - - + + - + - + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F4420.xml b/src/devices/pic/xml_data/18F4420.xml index 83a0022..19e9c62 100644 --- a/src/devices/pic/xml_data/18F4420.xml +++ b/src/devices/pic/xml_data/18F4420.xml @@ -27,17 +27,17 @@ - + - + - - + + @@ -54,42 +54,42 @@ - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -106,115 +106,115 @@ - + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F4423.xml b/src/devices/pic/xml_data/18F4423.xml index 1760494..540c8e4 100644 --- a/src/devices/pic/xml_data/18F4423.xml +++ b/src/devices/pic/xml_data/18F4423.xml @@ -24,17 +24,17 @@ - + - + - - + + @@ -45,42 +45,42 @@ - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -97,115 +97,115 @@ - + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F4431.xml b/src/devices/pic/xml_data/18F4431.xml index c19b48a..dc8edc0 100644 --- a/src/devices/pic/xml_data/18F4431.xml +++ b/src/devices/pic/xml_data/18F4431.xml @@ -35,17 +35,17 @@ - + - + - - + + @@ -62,40 +62,40 @@ - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -112,160 +112,160 @@ - - + + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F4439.xml b/src/devices/pic/xml_data/18F4439.xml index 3441809..9104408 100644 --- a/src/devices/pic/xml_data/18F4439.xml +++ b/src/devices/pic/xml_data/18F4439.xml @@ -35,48 +35,48 @@ - + - + - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -85,94 +85,94 @@ - + - + - + - - + + - - + + - - + + - + - + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F4450.xml b/src/devices/pic/xml_data/18F4450.xml index e634df1..208518e 100644 --- a/src/devices/pic/xml_data/18F4450.xml +++ b/src/devices/pic/xml_data/18F4450.xml @@ -27,14 +27,14 @@ - + - - + + @@ -43,21 +43,21 @@ - - + + - - + + - + - - + + @@ -74,46 +74,46 @@ - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - - + + @@ -130,111 +130,111 @@ - + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - - + + - + - + - - + + - - + + - + - - + + - + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F4455.xml b/src/devices/pic/xml_data/18F4455.xml index 282decb..6a77cfb 100644 --- a/src/devices/pic/xml_data/18F4455.xml +++ b/src/devices/pic/xml_data/18F4455.xml @@ -26,15 +26,15 @@ - + - - + + @@ -43,21 +43,21 @@ - - + + - - + + - + - - + + @@ -74,46 +74,46 @@ - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - - + + @@ -130,131 +130,131 @@ - + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - + - + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F448.xml b/src/devices/pic/xml_data/18F448.xml index 40de124..137b34a 100644 --- a/src/devices/pic/xml_data/18F448.xml +++ b/src/devices/pic/xml_data/18F448.xml @@ -34,17 +34,17 @@ - + - + - - + + @@ -53,36 +53,36 @@ - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -91,94 +91,94 @@ - + - + - + - - + + - - + + - - + + - + - + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F4480.xml b/src/devices/pic/xml_data/18F4480.xml index b9a87da..14b60cb 100644 --- a/src/devices/pic/xml_data/18F4480.xml +++ b/src/devices/pic/xml_data/18F4480.xml @@ -27,17 +27,17 @@ - + - + - - + + @@ -54,42 +54,42 @@ - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -106,115 +106,115 @@ - + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - + - + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F44J10.xml b/src/devices/pic/xml_data/18F44J10.xml index ddf2019..c9ce5b8 100644 --- a/src/devices/pic/xml_data/18F44J10.xml +++ b/src/devices/pic/xml_data/18F44J10.xml @@ -31,55 +31,55 @@ - - + + - - + + - - + + - - + + - + - - + + - + - - + + - - + + - - + + - - + + - + - - + + @@ -96,23 +96,23 @@ - + - + - - + + - + - + - + diff --git a/src/devices/pic/xml_data/18F4510.xml b/src/devices/pic/xml_data/18F4510.xml index b038b39..bcfec9c 100644 --- a/src/devices/pic/xml_data/18F4510.xml +++ b/src/devices/pic/xml_data/18F4510.xml @@ -27,16 +27,16 @@ - + - + - - + + @@ -53,42 +53,42 @@ - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -105,131 +105,131 @@ - + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - + - - + + - - + + - - + + - - + + - + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F4515.xml b/src/devices/pic/xml_data/18F4515.xml index 4325432..671198c 100644 --- a/src/devices/pic/xml_data/18F4515.xml +++ b/src/devices/pic/xml_data/18F4515.xml @@ -27,16 +27,16 @@ - + - + - - + + @@ -53,42 +53,42 @@ - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -105,119 +105,119 @@ - + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - + - - + + - - + + - - + + - + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F452.xml b/src/devices/pic/xml_data/18F452.xml index 12ad5ce..24d1e3d 100644 --- a/src/devices/pic/xml_data/18F452.xml +++ b/src/devices/pic/xml_data/18F452.xml @@ -35,17 +35,17 @@ - + - + - - + + @@ -54,36 +54,36 @@ - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -92,123 +92,123 @@ - + - + - - + + - + - - + + - - + + - - + + - + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F4520.xml b/src/devices/pic/xml_data/18F4520.xml index a1a1e75..4699c01 100644 --- a/src/devices/pic/xml_data/18F4520.xml +++ b/src/devices/pic/xml_data/18F4520.xml @@ -27,17 +27,17 @@ - + - + - - + + @@ -54,42 +54,42 @@ - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -106,139 +106,139 @@ - + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F4523.xml b/src/devices/pic/xml_data/18F4523.xml index 29b2583..26db550 100644 --- a/src/devices/pic/xml_data/18F4523.xml +++ b/src/devices/pic/xml_data/18F4523.xml @@ -24,17 +24,17 @@ - + - + - - + + @@ -51,42 +51,42 @@ - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -103,139 +103,139 @@ - + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F4525.xml b/src/devices/pic/xml_data/18F4525.xml index f37d90b..0928756 100644 --- a/src/devices/pic/xml_data/18F4525.xml +++ b/src/devices/pic/xml_data/18F4525.xml @@ -27,17 +27,17 @@ - + - + - - + + @@ -54,42 +54,42 @@ - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -106,127 +106,127 @@ - + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F4539.xml b/src/devices/pic/xml_data/18F4539.xml index 71a1f4c..2733301 100644 --- a/src/devices/pic/xml_data/18F4539.xml +++ b/src/devices/pic/xml_data/18F4539.xml @@ -35,48 +35,48 @@ - + - + - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -85,106 +85,106 @@ - + - + - + - - + + - - + + - - + + - + - + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F4550.xml b/src/devices/pic/xml_data/18F4550.xml index b0e26c8..d988438 100644 --- a/src/devices/pic/xml_data/18F4550.xml +++ b/src/devices/pic/xml_data/18F4550.xml @@ -26,15 +26,15 @@ - + - - + + @@ -43,21 +43,21 @@ - - + + - - + + - + - - + + @@ -74,46 +74,46 @@ - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - - + + @@ -130,135 +130,135 @@ - + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - + - + - - + + - - + + - - + + - - + + - + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F458.xml b/src/devices/pic/xml_data/18F458.xml index 33069dd..758acc8 100644 --- a/src/devices/pic/xml_data/18F458.xml +++ b/src/devices/pic/xml_data/18F458.xml @@ -35,17 +35,17 @@ - + - + - - + + @@ -54,36 +54,36 @@ - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -92,118 +92,118 @@ - + - + - + - - + + - - + + - - + + - + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F4580.xml b/src/devices/pic/xml_data/18F4580.xml index e6e105a..cd1e077 100644 --- a/src/devices/pic/xml_data/18F4580.xml +++ b/src/devices/pic/xml_data/18F4580.xml @@ -27,17 +27,17 @@ - + - + - - + + @@ -54,42 +54,42 @@ - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -106,139 +106,139 @@ - + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F4585.xml b/src/devices/pic/xml_data/18F4585.xml index fb438b8..dca0022 100644 --- a/src/devices/pic/xml_data/18F4585.xml +++ b/src/devices/pic/xml_data/18F4585.xml @@ -27,17 +27,17 @@ - + - + - - + + @@ -54,42 +54,42 @@ - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -106,129 +106,129 @@ - + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - + - + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F45J10.xml b/src/devices/pic/xml_data/18F45J10.xml index af2c752..aede454 100644 --- a/src/devices/pic/xml_data/18F45J10.xml +++ b/src/devices/pic/xml_data/18F45J10.xml @@ -31,55 +31,55 @@ - - + + - - + + - - + + - - + + - + - - + + - + - - + + - - + + - - + + - - + + - + - - + + @@ -96,23 +96,23 @@ - + - + - - + + - + - + - + diff --git a/src/devices/pic/xml_data/18F4610.xml b/src/devices/pic/xml_data/18F4610.xml index d105cdb..9c3fe13 100644 --- a/src/devices/pic/xml_data/18F4610.xml +++ b/src/devices/pic/xml_data/18F4610.xml @@ -27,16 +27,16 @@ - + - + - - + + @@ -53,42 +53,42 @@ - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -105,131 +105,131 @@ - + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - + - - + + - - + + - - + + - - + + - + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F4620.xml b/src/devices/pic/xml_data/18F4620.xml index 5964590..ff74392 100644 --- a/src/devices/pic/xml_data/18F4620.xml +++ b/src/devices/pic/xml_data/18F4620.xml @@ -30,17 +30,17 @@ - + - + - - + + @@ -51,42 +51,42 @@ - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -103,131 +103,131 @@ - + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - + - - + + - - + + - - + + - - + + - + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F4680.xml b/src/devices/pic/xml_data/18F4680.xml index f5ef137..155abb9 100644 --- a/src/devices/pic/xml_data/18F4680.xml +++ b/src/devices/pic/xml_data/18F4680.xml @@ -27,17 +27,17 @@ - + - + - - + + @@ -54,42 +54,42 @@ - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -106,141 +106,141 @@ - + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F4682.xml b/src/devices/pic/xml_data/18F4682.xml index 19b387b..c6ce618 100644 --- a/src/devices/pic/xml_data/18F4682.xml +++ b/src/devices/pic/xml_data/18F4682.xml @@ -27,17 +27,17 @@ - + - + - - + + @@ -48,42 +48,42 @@ - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -100,153 +100,153 @@ - + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - + - + - - + + - - + + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F4685.xml b/src/devices/pic/xml_data/18F4685.xml index 7b68ee2..1e73ffd 100644 --- a/src/devices/pic/xml_data/18F4685.xml +++ b/src/devices/pic/xml_data/18F4685.xml @@ -27,17 +27,17 @@ - + - + - - + + @@ -48,42 +48,42 @@ - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -100,165 +100,165 @@ - + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - + - + - - + + - - + + - - + + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F6310.xml b/src/devices/pic/xml_data/18F6310.xml index 9bdbfb7..f975990 100644 --- a/src/devices/pic/xml_data/18F6310.xml +++ b/src/devices/pic/xml_data/18F6310.xml @@ -33,16 +33,16 @@ - + - + - - + + @@ -53,42 +53,42 @@ - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -105,79 +105,79 @@ - + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - + - - + + - + - + - + - + - - + + - + - + diff --git a/src/devices/pic/xml_data/18F6390.xml b/src/devices/pic/xml_data/18F6390.xml index 02f2498..ec6b10c 100644 --- a/src/devices/pic/xml_data/18F6390.xml +++ b/src/devices/pic/xml_data/18F6390.xml @@ -33,16 +33,16 @@ - + - + - - + + @@ -53,42 +53,42 @@ - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -105,79 +105,79 @@ - + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - + - - + + - + - + - + - + - - + + - + - + diff --git a/src/devices/pic/xml_data/18F6393.xml b/src/devices/pic/xml_data/18F6393.xml index bc778f4..bb48cbe 100644 --- a/src/devices/pic/xml_data/18F6393.xml +++ b/src/devices/pic/xml_data/18F6393.xml @@ -36,16 +36,16 @@ - + - + - - + + @@ -56,42 +56,42 @@ - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -108,79 +108,79 @@ - + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - + - - + + - + - + - + - + - - + + - + - + diff --git a/src/devices/pic/xml_data/18F63J11.xml b/src/devices/pic/xml_data/18F63J11.xml index 37273bc..481e5e8 100644 --- a/src/devices/pic/xml_data/18F63J11.xml +++ b/src/devices/pic/xml_data/18F63J11.xml @@ -29,55 +29,55 @@ - - + + - - + + - - + + - - + + - + - - + + - + - - + + - - + + - - + + - - + + - + - - + + @@ -94,23 +94,23 @@ - + - + - - + + - + - + - + diff --git a/src/devices/pic/xml_data/18F63J90.xml b/src/devices/pic/xml_data/18F63J90.xml index ef1310c..48f5c8e 100644 --- a/src/devices/pic/xml_data/18F63J90.xml +++ b/src/devices/pic/xml_data/18F63J90.xml @@ -28,55 +28,55 @@ - - + + - - + + - - + + - - + + - + - - + + - + - - + + - - + + - - + + - - + + - + - - + + @@ -93,23 +93,23 @@ - + - + - - + + - + - + - + diff --git a/src/devices/pic/xml_data/18F6410.xml b/src/devices/pic/xml_data/18F6410.xml index c270208..670937b 100644 --- a/src/devices/pic/xml_data/18F6410.xml +++ b/src/devices/pic/xml_data/18F6410.xml @@ -33,16 +33,16 @@ - + - + - - + + @@ -53,42 +53,42 @@ - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -105,79 +105,79 @@ - + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - + - - + + - + - + - + - + - - + + - + - + diff --git a/src/devices/pic/xml_data/18F6490.xml b/src/devices/pic/xml_data/18F6490.xml index 1727686..bd4ae20 100644 --- a/src/devices/pic/xml_data/18F6490.xml +++ b/src/devices/pic/xml_data/18F6490.xml @@ -33,16 +33,16 @@ - + - + - - + + @@ -53,42 +53,42 @@ - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -105,79 +105,79 @@ - + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - + - - + + - + - + - + - + - - + + - + - + diff --git a/src/devices/pic/xml_data/18F6493.xml b/src/devices/pic/xml_data/18F6493.xml index 89f409d..f980eca 100644 --- a/src/devices/pic/xml_data/18F6493.xml +++ b/src/devices/pic/xml_data/18F6493.xml @@ -36,16 +36,16 @@ - + - + - - + + @@ -56,42 +56,42 @@ - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -108,79 +108,79 @@ - + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - + - - + + - + - + - + - + - - + + - + - + diff --git a/src/devices/pic/xml_data/18F64J11.xml b/src/devices/pic/xml_data/18F64J11.xml index fd126a0..d3e9696 100644 --- a/src/devices/pic/xml_data/18F64J11.xml +++ b/src/devices/pic/xml_data/18F64J11.xml @@ -29,55 +29,55 @@ - - + + - - + + - - + + - - + + - + - - + + - + - - + + - - + + - - + + - - + + - + - - + + @@ -94,23 +94,23 @@ - + - + - - + + - + - + - + diff --git a/src/devices/pic/xml_data/18F64J90.xml b/src/devices/pic/xml_data/18F64J90.xml index fedf592..70df11f 100644 --- a/src/devices/pic/xml_data/18F64J90.xml +++ b/src/devices/pic/xml_data/18F64J90.xml @@ -29,55 +29,55 @@ - - + + - - + + - - + + - - + + - + - - + + - + - - + + - - + + - - + + - - + + - + - - + + @@ -94,23 +94,23 @@ - + - + - - + + - + - + - + diff --git a/src/devices/pic/xml_data/18F6520.xml b/src/devices/pic/xml_data/18F6520.xml index a022295..20eac42 100644 --- a/src/devices/pic/xml_data/18F6520.xml +++ b/src/devices/pic/xml_data/18F6520.xml @@ -36,17 +36,17 @@ - + - + - - + + @@ -55,36 +55,36 @@ - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -93,123 +93,123 @@ - + - + - - + + - + - - + + - - + + - - + + - + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F6525.xml b/src/devices/pic/xml_data/18F6525.xml index 953e12a..c3206cb 100644 --- a/src/devices/pic/xml_data/18F6525.xml +++ b/src/devices/pic/xml_data/18F6525.xml @@ -35,17 +35,17 @@ - + - + - - + + @@ -59,36 +59,36 @@ - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -105,115 +105,115 @@ - + - + - - + + - - + + - + - - + + - - + + - - + + - + - + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F6527.xml b/src/devices/pic/xml_data/18F6527.xml index 04a2bf1..8779fa8 100644 --- a/src/devices/pic/xml_data/18F6527.xml +++ b/src/devices/pic/xml_data/18F6527.xml @@ -27,17 +27,17 @@ - + - + - - + + @@ -54,42 +54,42 @@ - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -106,129 +106,129 @@ - + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - + - + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F6585.xml b/src/devices/pic/xml_data/18F6585.xml index 0bf9bab..d602f95 100644 --- a/src/devices/pic/xml_data/18F6585.xml +++ b/src/devices/pic/xml_data/18F6585.xml @@ -27,17 +27,17 @@ - + - + - - + + @@ -51,36 +51,36 @@ - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -97,115 +97,115 @@ - + - + - - + + - - + + - + - - + + - - + + - - + + - + - + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F65J10.xml b/src/devices/pic/xml_data/18F65J10.xml index a67fe87..473c590 100644 --- a/src/devices/pic/xml_data/18F65J10.xml +++ b/src/devices/pic/xml_data/18F65J10.xml @@ -29,55 +29,55 @@ - - + + - - + + - - + + - - + + - + - - + + - + - - + + - - + + - - + + - - + + - + - - + + @@ -94,23 +94,23 @@ - + - + - - + + - + - + - + diff --git a/src/devices/pic/xml_data/18F65J11.xml b/src/devices/pic/xml_data/18F65J11.xml index 2ef5b3d..c4284fc 100644 --- a/src/devices/pic/xml_data/18F65J11.xml +++ b/src/devices/pic/xml_data/18F65J11.xml @@ -29,55 +29,55 @@ - - + + - - + + - - + + - - + + - + - - + + - + - - + + - - + + - - + + - - + + - + - - + + @@ -94,23 +94,23 @@ - + - + - - + + - + - + - + diff --git a/src/devices/pic/xml_data/18F65J15.xml b/src/devices/pic/xml_data/18F65J15.xml index f5f310a..6c212d2 100644 --- a/src/devices/pic/xml_data/18F65J15.xml +++ b/src/devices/pic/xml_data/18F65J15.xml @@ -29,55 +29,55 @@ - - + + - - + + - - + + - - + + - + - - + + - + - - + + - - + + - - + + - - + + - + - - + + @@ -94,23 +94,23 @@ - + - + - - + + - + - + - + diff --git a/src/devices/pic/xml_data/18F65J50.xml b/src/devices/pic/xml_data/18F65J50.xml index d0cdd2b..ad5bc75 100644 --- a/src/devices/pic/xml_data/18F65J50.xml +++ b/src/devices/pic/xml_data/18F65J50.xml @@ -29,12 +29,12 @@ - - + + - - + + @@ -43,51 +43,51 @@ - - + + - - + + - - + + - + - - + + - + - - + + - - + + - - + + - - + + - + - - + + @@ -104,27 +104,27 @@ - + - + - - + + - - + + - + - + - + diff --git a/src/devices/pic/xml_data/18F65J90.xml b/src/devices/pic/xml_data/18F65J90.xml index 91997da..34e7be9 100644 --- a/src/devices/pic/xml_data/18F65J90.xml +++ b/src/devices/pic/xml_data/18F65J90.xml @@ -29,55 +29,55 @@ - - + + - - + + - - + + - - + + - + - - + + - + - - + + - - + + - - + + - - + + - + - - + + @@ -94,23 +94,23 @@ - + - + - - + + - + - + - + diff --git a/src/devices/pic/xml_data/18F6620.xml b/src/devices/pic/xml_data/18F6620.xml index e88ee06..8159b62 100644 --- a/src/devices/pic/xml_data/18F6620.xml +++ b/src/devices/pic/xml_data/18F6620.xml @@ -38,17 +38,17 @@ - + - + - - + + @@ -57,36 +57,36 @@ - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -95,123 +95,123 @@ - + - + - - + + - + - - + + - - + + - - + + - + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F6621.xml b/src/devices/pic/xml_data/18F6621.xml index 664de3f..e043ddf 100644 --- a/src/devices/pic/xml_data/18F6621.xml +++ b/src/devices/pic/xml_data/18F6621.xml @@ -35,17 +35,17 @@ - + - + - - + + @@ -59,36 +59,36 @@ - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -105,127 +105,127 @@ - + - + - - + + - - + + - + - - + + - - + + - - + + - + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F6622.xml b/src/devices/pic/xml_data/18F6622.xml index 6fb81d7..b8e0bb7 100644 --- a/src/devices/pic/xml_data/18F6622.xml +++ b/src/devices/pic/xml_data/18F6622.xml @@ -27,17 +27,17 @@ - + - + - - + + @@ -54,42 +54,42 @@ - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -106,141 +106,141 @@ - + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F6627.xml b/src/devices/pic/xml_data/18F6627.xml index 74248c6..1b0bbc8 100644 --- a/src/devices/pic/xml_data/18F6627.xml +++ b/src/devices/pic/xml_data/18F6627.xml @@ -27,17 +27,17 @@ - + - + - - + + @@ -48,42 +48,42 @@ - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -100,165 +100,165 @@ - + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - + - + - - + + - - + + - - + + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F6680.xml b/src/devices/pic/xml_data/18F6680.xml index d0a9922..6780e23 100644 --- a/src/devices/pic/xml_data/18F6680.xml +++ b/src/devices/pic/xml_data/18F6680.xml @@ -27,17 +27,17 @@ - + - + - - + + @@ -51,36 +51,36 @@ - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -97,127 +97,127 @@ - + - + - - + + - - + + - + - - + + - - + + - - + + - + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F66J10.xml b/src/devices/pic/xml_data/18F66J10.xml index 7bb9aa7..6df51e5 100644 --- a/src/devices/pic/xml_data/18F66J10.xml +++ b/src/devices/pic/xml_data/18F66J10.xml @@ -29,55 +29,55 @@ - - + + - - + + - - + + - - + + - + - - + + - + - - + + - - + + - - + + - - + + - + - - + + @@ -94,23 +94,23 @@ - + - + - - + + - + - + - + diff --git a/src/devices/pic/xml_data/18F66J11.xml b/src/devices/pic/xml_data/18F66J11.xml index 8fd1314..11d7f05 100644 --- a/src/devices/pic/xml_data/18F66J11.xml +++ b/src/devices/pic/xml_data/18F66J11.xml @@ -30,55 +30,55 @@ - - + + - - + + - - + + - - + + - + - - + + - + - - + + - - + + - - + + - - + + - + - - + + @@ -95,27 +95,27 @@ - + - + - - + + - - + + - + - + - + diff --git a/src/devices/pic/xml_data/18F66J15.xml b/src/devices/pic/xml_data/18F66J15.xml index c1c5c95..651b2d4 100644 --- a/src/devices/pic/xml_data/18F66J15.xml +++ b/src/devices/pic/xml_data/18F66J15.xml @@ -29,55 +29,55 @@ - - + + - - + + - - + + - - + + - + - - + + - + - - + + - - + + - - + + - - + + - + - - + + @@ -94,23 +94,23 @@ - + - + - - + + - + - + - + diff --git a/src/devices/pic/xml_data/18F66J16.xml b/src/devices/pic/xml_data/18F66J16.xml index cf84f44..8a15ffd 100644 --- a/src/devices/pic/xml_data/18F66J16.xml +++ b/src/devices/pic/xml_data/18F66J16.xml @@ -29,55 +29,55 @@ - - + + - - + + - - + + - - + + - + - - + + - + - - + + - - + + - - + + - - + + - + - - + + @@ -94,27 +94,27 @@ - + - + - - + + - - + + - + - + - + diff --git a/src/devices/pic/xml_data/18F66J50.xml b/src/devices/pic/xml_data/18F66J50.xml index 34dbe21..4d60faa 100644 --- a/src/devices/pic/xml_data/18F66J50.xml +++ b/src/devices/pic/xml_data/18F66J50.xml @@ -29,12 +29,12 @@ - - + + - - + + @@ -43,51 +43,51 @@ - - + + - - + + - - + + - + - - + + - + - - + + - - + + - - + + - - + + - + - - + + @@ -104,27 +104,27 @@ - + - + - - + + - - + + - + - + - + diff --git a/src/devices/pic/xml_data/18F66J55.xml b/src/devices/pic/xml_data/18F66J55.xml index 7e95978..d97b54a 100644 --- a/src/devices/pic/xml_data/18F66J55.xml +++ b/src/devices/pic/xml_data/18F66J55.xml @@ -29,12 +29,12 @@ - - + + - - + + @@ -43,51 +43,51 @@ - - + + - - + + - - + + - + - - + + - + - - + + - - + + - - + + - - + + - + - - + + @@ -104,27 +104,27 @@ - + - + - - + + - - + + - + - + - + diff --git a/src/devices/pic/xml_data/18F66J60.xml b/src/devices/pic/xml_data/18F66J60.xml index e4ac5ea..430812c 100644 --- a/src/devices/pic/xml_data/18F66J60.xml +++ b/src/devices/pic/xml_data/18F66J60.xml @@ -29,55 +29,55 @@ - - + + - - + + - - + + - - + + - + - - + + - + - - + + - - + + - - + + - - + + - + - - + + @@ -94,23 +94,23 @@ - + - + - - + + - + - + - + diff --git a/src/devices/pic/xml_data/18F66J65.xml b/src/devices/pic/xml_data/18F66J65.xml index 8431ec8..3a54046 100644 --- a/src/devices/pic/xml_data/18F66J65.xml +++ b/src/devices/pic/xml_data/18F66J65.xml @@ -29,55 +29,55 @@ - - + + - - + + - - + + - - + + - + - - + + - + - - + + - - + + - - + + - - + + - + - - + + @@ -94,23 +94,23 @@ - + - + - - + + - + - + - + diff --git a/src/devices/pic/xml_data/18F6720.xml b/src/devices/pic/xml_data/18F6720.xml index c023b5e..a609ee9 100644 --- a/src/devices/pic/xml_data/18F6720.xml +++ b/src/devices/pic/xml_data/18F6720.xml @@ -35,17 +35,17 @@ - + - + - - + + @@ -54,36 +54,36 @@ - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -92,171 +92,171 @@ - + - + - - + + - + - - + + - - + + - - + + - + - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F6722.xml b/src/devices/pic/xml_data/18F6722.xml index fb30985..6a3c8ad 100644 --- a/src/devices/pic/xml_data/18F6722.xml +++ b/src/devices/pic/xml_data/18F6722.xml @@ -27,17 +27,17 @@ - + - + - - + + @@ -48,42 +48,42 @@ - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -100,189 +100,189 @@ - + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - + - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F67J10.xml b/src/devices/pic/xml_data/18F67J10.xml index 78223c3..4c6f875 100644 --- a/src/devices/pic/xml_data/18F67J10.xml +++ b/src/devices/pic/xml_data/18F67J10.xml @@ -29,55 +29,55 @@ - - + + - - + + - - + + - - + + - + - - + + - + - - + + - - + + - - + + - - + + - + - - + + @@ -94,23 +94,23 @@ - + - + - - + + - + - + - + diff --git a/src/devices/pic/xml_data/18F67J11.xml b/src/devices/pic/xml_data/18F67J11.xml index d13e7dc..3f12d71 100644 --- a/src/devices/pic/xml_data/18F67J11.xml +++ b/src/devices/pic/xml_data/18F67J11.xml @@ -30,55 +30,55 @@ - - + + - - + + - - + + - - + + - + - - + + - + - - + + - - + + - - + + - - + + - + - - + + @@ -95,27 +95,27 @@ - + - + - - + + - - + + - + - + - + diff --git a/src/devices/pic/xml_data/18F67J50.xml b/src/devices/pic/xml_data/18F67J50.xml index 91eade3..d704f33 100644 --- a/src/devices/pic/xml_data/18F67J50.xml +++ b/src/devices/pic/xml_data/18F67J50.xml @@ -29,12 +29,12 @@ - - + + - - + + @@ -43,51 +43,51 @@ - - + + - - + + - - + + - + - - + + - + - - + + - - + + - - + + - - + + - + - - + + @@ -104,27 +104,27 @@ - + - + - - + + - - + + - + - + - + diff --git a/src/devices/pic/xml_data/18F67J60.xml b/src/devices/pic/xml_data/18F67J60.xml index 29922db..a5bfdcf 100644 --- a/src/devices/pic/xml_data/18F67J60.xml +++ b/src/devices/pic/xml_data/18F67J60.xml @@ -29,55 +29,55 @@ - - + + - - + + - - + + - - + + - + - - + + - + - - + + - - + + - - + + - - + + - + - - + + @@ -94,23 +94,23 @@ - + - + - - + + - + - + - + diff --git a/src/devices/pic/xml_data/18F8310.xml b/src/devices/pic/xml_data/18F8310.xml index 1fe084d..5a16736 100644 --- a/src/devices/pic/xml_data/18F8310.xml +++ b/src/devices/pic/xml_data/18F8310.xml @@ -33,16 +33,16 @@ - + - + - - + + @@ -53,42 +53,42 @@ - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -105,79 +105,79 @@ - + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - + - - + + - + - + - + - + - - + + - + - + diff --git a/src/devices/pic/xml_data/18F8390.xml b/src/devices/pic/xml_data/18F8390.xml index 4dbff0c..182acf1 100644 --- a/src/devices/pic/xml_data/18F8390.xml +++ b/src/devices/pic/xml_data/18F8390.xml @@ -33,16 +33,16 @@ - + - + - - + + @@ -53,42 +53,42 @@ - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -105,79 +105,79 @@ - + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - + - - + + - + - + - + - + - - + + - + - + diff --git a/src/devices/pic/xml_data/18F8393.xml b/src/devices/pic/xml_data/18F8393.xml index ce846db..bd27973 100644 --- a/src/devices/pic/xml_data/18F8393.xml +++ b/src/devices/pic/xml_data/18F8393.xml @@ -36,16 +36,16 @@ - + - + - - + + @@ -56,42 +56,42 @@ - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -108,64 +108,64 @@ - + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - + - - + + - + - + - + - + - - + + - + - + diff --git a/src/devices/pic/xml_data/18F83J11.xml b/src/devices/pic/xml_data/18F83J11.xml index 4a9d249..6fbfbc0 100644 --- a/src/devices/pic/xml_data/18F83J11.xml +++ b/src/devices/pic/xml_data/18F83J11.xml @@ -29,55 +29,55 @@ - - + + - - + + - - + + - - + + - + - - + + - + - - + + - - + + - - + + - - + + - + - - + + @@ -94,45 +94,45 @@ - + - - + + - - + + - - + + - - + + - + - - + + - - + + - + - + - + diff --git a/src/devices/pic/xml_data/18F83J90.xml b/src/devices/pic/xml_data/18F83J90.xml index 8e10c27..c8fc70e 100644 --- a/src/devices/pic/xml_data/18F83J90.xml +++ b/src/devices/pic/xml_data/18F83J90.xml @@ -29,55 +29,55 @@ - - + + - - + + - - + + - - + + - + - - + + - + - - + + - - + + - - + + - - + + - + - - + + @@ -94,45 +94,45 @@ - + - - + + - - + + - - + + - - + + - + - - + + - - + + - + - + - + diff --git a/src/devices/pic/xml_data/18F8410.xml b/src/devices/pic/xml_data/18F8410.xml index b5c49cd..46d46a3 100644 --- a/src/devices/pic/xml_data/18F8410.xml +++ b/src/devices/pic/xml_data/18F8410.xml @@ -33,16 +33,16 @@ - + - + - - + + @@ -53,42 +53,42 @@ - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -105,64 +105,64 @@ - + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - + - - + + - + - + - + - + - - + + - + - + diff --git a/src/devices/pic/xml_data/18F8490.xml b/src/devices/pic/xml_data/18F8490.xml index 3871a60..0f2e987 100644 --- a/src/devices/pic/xml_data/18F8490.xml +++ b/src/devices/pic/xml_data/18F8490.xml @@ -33,16 +33,16 @@ - + - + - - + + @@ -53,42 +53,42 @@ - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -105,64 +105,64 @@ - + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - + - - + + - + - + - + - + - - + + - + - + diff --git a/src/devices/pic/xml_data/18F8493.xml b/src/devices/pic/xml_data/18F8493.xml index 4e8bc52..4d61277 100644 --- a/src/devices/pic/xml_data/18F8493.xml +++ b/src/devices/pic/xml_data/18F8493.xml @@ -36,16 +36,16 @@ - + - + - - + + @@ -56,42 +56,42 @@ - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -108,64 +108,64 @@ - + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - + - - + + - + - + - + - + - - + + - + - + diff --git a/src/devices/pic/xml_data/18F84J11.xml b/src/devices/pic/xml_data/18F84J11.xml index 9c69d2b..efdf05a 100644 --- a/src/devices/pic/xml_data/18F84J11.xml +++ b/src/devices/pic/xml_data/18F84J11.xml @@ -29,55 +29,55 @@ - - + + - - + + - - + + - - + + - + - - + + - + - - + + - - + + - - + + - - + + - + - - + + @@ -94,45 +94,45 @@ - + - - + + - - + + - - + + - - + + - + - - + + - - + + - + - + - + diff --git a/src/devices/pic/xml_data/18F84J90.xml b/src/devices/pic/xml_data/18F84J90.xml index 59711f3..1236e43 100644 --- a/src/devices/pic/xml_data/18F84J90.xml +++ b/src/devices/pic/xml_data/18F84J90.xml @@ -29,55 +29,55 @@ - - + + - - + + - - + + - - + + - + - - + + - + - - + + - - + + - - + + - - + + - + - - + + @@ -94,45 +94,45 @@ - + - - + + - - + + - - + + - - + + - + - - + + - - + + - + - + - + diff --git a/src/devices/pic/xml_data/18F8520.xml b/src/devices/pic/xml_data/18F8520.xml index 6bc1aae..ed9b7c7 100644 --- a/src/devices/pic/xml_data/18F8520.xml +++ b/src/devices/pic/xml_data/18F8520.xml @@ -37,17 +37,17 @@ - + - + - - + + @@ -56,36 +56,36 @@ - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -94,134 +94,134 @@ - + - - + + - - + + - + - - + + - + - - + + - - + + - - + + - + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F8525.xml b/src/devices/pic/xml_data/18F8525.xml index e7b5219..7e016eb 100644 --- a/src/devices/pic/xml_data/18F8525.xml +++ b/src/devices/pic/xml_data/18F8525.xml @@ -29,17 +29,17 @@ - + - + - - + + @@ -53,36 +53,36 @@ - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -99,130 +99,130 @@ - + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F8527.xml b/src/devices/pic/xml_data/18F8527.xml index 62c01d4..e5159bd 100644 --- a/src/devices/pic/xml_data/18F8527.xml +++ b/src/devices/pic/xml_data/18F8527.xml @@ -30,17 +30,17 @@ - + - + - - + + @@ -57,42 +57,42 @@ - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -109,154 +109,154 @@ - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - + - + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F8585.xml b/src/devices/pic/xml_data/18F8585.xml index 08367ab..85b3561 100644 --- a/src/devices/pic/xml_data/18F8585.xml +++ b/src/devices/pic/xml_data/18F8585.xml @@ -29,17 +29,17 @@ - + - + - - + + @@ -53,36 +53,36 @@ - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -99,130 +99,130 @@ - + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F85J10.xml b/src/devices/pic/xml_data/18F85J10.xml index 99b998c..6fab213 100644 --- a/src/devices/pic/xml_data/18F85J10.xml +++ b/src/devices/pic/xml_data/18F85J10.xml @@ -29,55 +29,55 @@ - - + + - - + + - - + + - - + + - + - - + + - + - - + + - - + + - - + + - - + + - + - - + + @@ -94,45 +94,45 @@ - + - - + + - - + + - - + + - - + + - + - - + + - - + + - + - + - + diff --git a/src/devices/pic/xml_data/18F85J11.xml b/src/devices/pic/xml_data/18F85J11.xml index 91b4cc2..0193782 100644 --- a/src/devices/pic/xml_data/18F85J11.xml +++ b/src/devices/pic/xml_data/18F85J11.xml @@ -29,55 +29,55 @@ - - + + - - + + - - + + - - + + - + - - + + - + - - + + - - + + - - + + - - + + - + - - + + @@ -94,45 +94,45 @@ - + - - + + - - + + - - + + - - + + - + - - + + - - + + - + - + - + diff --git a/src/devices/pic/xml_data/18F85J15.xml b/src/devices/pic/xml_data/18F85J15.xml index c2445ab..3011a51 100644 --- a/src/devices/pic/xml_data/18F85J15.xml +++ b/src/devices/pic/xml_data/18F85J15.xml @@ -29,55 +29,55 @@ - - + + - - + + - - + + - - + + - + - - + + - + - - + + - - + + - - + + - - + + - + - - + + @@ -94,45 +94,45 @@ - + - - + + - - + + - - + + - - + + - + - - + + - - + + - + - + - + diff --git a/src/devices/pic/xml_data/18F85J50.xml b/src/devices/pic/xml_data/18F85J50.xml index dee0637..80199eb 100644 --- a/src/devices/pic/xml_data/18F85J50.xml +++ b/src/devices/pic/xml_data/18F85J50.xml @@ -29,16 +29,16 @@ - - + + - - + + - - + + @@ -47,47 +47,47 @@ - - + + - - + + - + - - + + - + - - + + - - + + - - + + - - + + - + - - + + @@ -104,53 +104,53 @@ - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - + - + diff --git a/src/devices/pic/xml_data/18F85J90.xml b/src/devices/pic/xml_data/18F85J90.xml index 61e7571..51d6085 100644 --- a/src/devices/pic/xml_data/18F85J90.xml +++ b/src/devices/pic/xml_data/18F85J90.xml @@ -28,55 +28,55 @@ - - + + - - + + - - + + - - + + - + - - + + - + - - + + - - + + - - + + - - + + - + - - + + @@ -93,45 +93,45 @@ - + - - + + - - + + - - + + - - + + - + - - + + - - + + - + - + - + diff --git a/src/devices/pic/xml_data/18F8620.xml b/src/devices/pic/xml_data/18F8620.xml index 8503556..fe596c1 100644 --- a/src/devices/pic/xml_data/18F8620.xml +++ b/src/devices/pic/xml_data/18F8620.xml @@ -37,17 +37,17 @@ - + - + - - + + @@ -56,36 +56,36 @@ - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -94,134 +94,134 @@ - + - - + + - - + + - + - - + + - + - - + + - - + + - - + + - + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F8621.xml b/src/devices/pic/xml_data/18F8621.xml index e5689ae..654f4a2 100644 --- a/src/devices/pic/xml_data/18F8621.xml +++ b/src/devices/pic/xml_data/18F8621.xml @@ -29,17 +29,17 @@ - + - + - - + + @@ -53,36 +53,36 @@ - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -99,142 +99,142 @@ - + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F8622.xml b/src/devices/pic/xml_data/18F8622.xml index fe29be9..9a38941 100644 --- a/src/devices/pic/xml_data/18F8622.xml +++ b/src/devices/pic/xml_data/18F8622.xml @@ -30,17 +30,17 @@ - + - + - - + + @@ -57,42 +57,42 @@ - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -109,166 +109,166 @@ - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F8627.xml b/src/devices/pic/xml_data/18F8627.xml index 2b7f70b..3a5ab09 100644 --- a/src/devices/pic/xml_data/18F8627.xml +++ b/src/devices/pic/xml_data/18F8627.xml @@ -30,17 +30,17 @@ - + - + - - + + @@ -51,42 +51,42 @@ - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -103,190 +103,190 @@ - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - + - + - - + + - - + + - - + + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F8680.xml b/src/devices/pic/xml_data/18F8680.xml index 97ec3c0..607bf0f 100644 --- a/src/devices/pic/xml_data/18F8680.xml +++ b/src/devices/pic/xml_data/18F8680.xml @@ -29,17 +29,17 @@ - + - + - - + + @@ -53,36 +53,36 @@ - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -99,142 +99,142 @@ - + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F86J10.xml b/src/devices/pic/xml_data/18F86J10.xml index 6cc1ec1..1974a92 100644 --- a/src/devices/pic/xml_data/18F86J10.xml +++ b/src/devices/pic/xml_data/18F86J10.xml @@ -29,55 +29,55 @@ - - + + - - + + - - + + - - + + - + - - + + - + - - + + - - + + - - + + - - + + - + - - + + @@ -94,45 +94,45 @@ - + - - + + - - + + - - + + - - + + - + - - + + - - + + - + - + - + diff --git a/src/devices/pic/xml_data/18F86J11.xml b/src/devices/pic/xml_data/18F86J11.xml index 05e065e..844b0e1 100644 --- a/src/devices/pic/xml_data/18F86J11.xml +++ b/src/devices/pic/xml_data/18F86J11.xml @@ -30,55 +30,55 @@ - - + + - - + + - - + + - - + + - + - - + + - + - - + + - - + + - - + + - - + + - + - - + + @@ -95,53 +95,53 @@ - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - + - + diff --git a/src/devices/pic/xml_data/18F86J15.xml b/src/devices/pic/xml_data/18F86J15.xml index bcebf10..e5f94df 100644 --- a/src/devices/pic/xml_data/18F86J15.xml +++ b/src/devices/pic/xml_data/18F86J15.xml @@ -29,55 +29,55 @@ - - + + - - + + - - + + - - + + - + - - + + - + - - + + - - + + - - + + - - + + - + - - + + @@ -94,45 +94,45 @@ - + - - + + - - + + - - + + - - + + - + - - + + - - + + - + - + - + diff --git a/src/devices/pic/xml_data/18F86J16.xml b/src/devices/pic/xml_data/18F86J16.xml index b06b858..ce5d2c4 100644 --- a/src/devices/pic/xml_data/18F86J16.xml +++ b/src/devices/pic/xml_data/18F86J16.xml @@ -29,55 +29,55 @@ - - + + - - + + - - + + - - + + - + - - + + - + - - + + - - + + - - + + - - + + - + - - + + @@ -94,53 +94,53 @@ - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - + - + diff --git a/src/devices/pic/xml_data/18F86J50.xml b/src/devices/pic/xml_data/18F86J50.xml index fa67e08..44acae5 100644 --- a/src/devices/pic/xml_data/18F86J50.xml +++ b/src/devices/pic/xml_data/18F86J50.xml @@ -29,16 +29,16 @@ - - + + - - + + - - + + @@ -47,47 +47,47 @@ - - + + - - + + - + - - + + - + - - + + - - + + - - + + - - + + - + - - + + @@ -104,53 +104,53 @@ - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - + - + diff --git a/src/devices/pic/xml_data/18F86J55.xml b/src/devices/pic/xml_data/18F86J55.xml index 9b29823..1b9d553 100644 --- a/src/devices/pic/xml_data/18F86J55.xml +++ b/src/devices/pic/xml_data/18F86J55.xml @@ -29,16 +29,16 @@ - - + + - - + + - - + + @@ -47,47 +47,47 @@ - - + + - - + + - + - - + + - + - - + + - - + + - - + + - - + + - + - - + + @@ -104,53 +104,53 @@ - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - + - + diff --git a/src/devices/pic/xml_data/18F86J60.xml b/src/devices/pic/xml_data/18F86J60.xml index 42f3d20..3fa4f03 100644 --- a/src/devices/pic/xml_data/18F86J60.xml +++ b/src/devices/pic/xml_data/18F86J60.xml @@ -32,55 +32,55 @@ - - + + - - + + - - + + - - + + - + - - + + - + - - + + - - + + - - + + - - + + - + - - + + @@ -97,31 +97,31 @@ - + - + - - + + - - + + - - + + - + - + - + diff --git a/src/devices/pic/xml_data/18F86J65.xml b/src/devices/pic/xml_data/18F86J65.xml index c2cdf41..d482c93 100644 --- a/src/devices/pic/xml_data/18F86J65.xml +++ b/src/devices/pic/xml_data/18F86J65.xml @@ -29,55 +29,55 @@ - - + + - - + + - - + + - - + + - + - - + + - + - - + + - - + + - - + + - - + + - + - - + + @@ -94,31 +94,31 @@ - + - + - - + + - - + + - - + + - + - + - + diff --git a/src/devices/pic/xml_data/18F8720.xml b/src/devices/pic/xml_data/18F8720.xml index f634b25..8905720 100644 --- a/src/devices/pic/xml_data/18F8720.xml +++ b/src/devices/pic/xml_data/18F8720.xml @@ -37,17 +37,17 @@ - + - + - - + + @@ -56,36 +56,36 @@ - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -94,182 +94,182 @@ - + - - + + - - + + - + - - + + - + - - + + - - + + - - + + - + - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F8722.xml b/src/devices/pic/xml_data/18F8722.xml index 3db0bbd..8cdffbb 100644 --- a/src/devices/pic/xml_data/18F8722.xml +++ b/src/devices/pic/xml_data/18F8722.xml @@ -30,17 +30,17 @@ - + - + - - + + @@ -51,42 +51,42 @@ - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + @@ -103,214 +103,214 @@ - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - + - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + - - + + - + diff --git a/src/devices/pic/xml_data/18F87J10.xml b/src/devices/pic/xml_data/18F87J10.xml index bc21af2..d7790cb 100644 --- a/src/devices/pic/xml_data/18F87J10.xml +++ b/src/devices/pic/xml_data/18F87J10.xml @@ -29,55 +29,55 @@ - - + + - - + + - - + + - - + + - + - - + + - + - - + + - - + + - - + + - - + + - + - - + + @@ -94,45 +94,45 @@ - + - - + + - - + + - - + + - - + + - + - - + + - - + + - + - + - + diff --git a/src/devices/pic/xml_data/18F87J11.xml b/src/devices/pic/xml_data/18F87J11.xml index d3c84fb..495ecda 100644 --- a/src/devices/pic/xml_data/18F87J11.xml +++ b/src/devices/pic/xml_data/18F87J11.xml @@ -29,55 +29,55 @@ - - + + - - + + - - + + - - + + - + - - + + - + - - + + - - + + - - + + - - + + - + - - + + @@ -94,53 +94,53 @@ - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - + - + diff --git a/src/devices/pic/xml_data/18F87J50.xml b/src/devices/pic/xml_data/18F87J50.xml index 1749435..24207fe 100644 --- a/src/devices/pic/xml_data/18F87J50.xml +++ b/src/devices/pic/xml_data/18F87J50.xml @@ -29,16 +29,16 @@ - - + + - - + + - - + + @@ -47,47 +47,47 @@ - - + + - - + + - + - - + + - + - - + + - - + + - - + + - - + + - + - - + + @@ -104,53 +104,53 @@ - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - + - + diff --git a/src/devices/pic/xml_data/18F87J60.xml b/src/devices/pic/xml_data/18F87J60.xml index d101ed3..fcf788a 100644 --- a/src/devices/pic/xml_data/18F87J60.xml +++ b/src/devices/pic/xml_data/18F87J60.xml @@ -29,55 +29,55 @@ - - + + - - + + - - + + - - + + - + - - + + - + - - + + - - + + - - + + - - + + - + - - + + @@ -94,31 +94,31 @@ - + - + - - + + - - + + - - + + - + - + - + diff --git a/src/devices/pic/xml_data/18F96J60.xml b/src/devices/pic/xml_data/18F96J60.xml index 655b586..9b3dca7 100644 --- a/src/devices/pic/xml_data/18F96J60.xml +++ b/src/devices/pic/xml_data/18F96J60.xml @@ -29,55 +29,55 @@ - - + + - - + + - - + + - - + + - + - - + + - + - - + + - - + + - - + + - - + + - + - - + + @@ -94,49 +94,49 @@ - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - + - + diff --git a/src/devices/pic/xml_data/18F96J65.xml b/src/devices/pic/xml_data/18F96J65.xml index a61bb94..678e2f3 100644 --- a/src/devices/pic/xml_data/18F96J65.xml +++ b/src/devices/pic/xml_data/18F96J65.xml @@ -29,55 +29,55 @@ - - + + - - + + - - + + - - + + - + - - + + - + - - + + - - + + - - + + - - + + - + - - + + @@ -94,49 +94,49 @@ - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - + - + diff --git a/src/devices/pic/xml_data/18F97J60.xml b/src/devices/pic/xml_data/18F97J60.xml index ce570ba..a47d6d1 100644 --- a/src/devices/pic/xml_data/18F97J60.xml +++ b/src/devices/pic/xml_data/18F97J60.xml @@ -29,55 +29,55 @@ - - + + - - + + - - + + - - + + - + - - + + - + - - + + - - + + - - + + - - + + - + - - + + @@ -94,49 +94,49 @@ - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - + - + diff --git a/src/devices/pic/xml_data/24FJ128GA006.xml b/src/devices/pic/xml_data/24FJ128GA006.xml index 7f264b9..a68bc37 100644 --- a/src/devices/pic/xml_data/24FJ128GA006.xml +++ b/src/devices/pic/xml_data/24FJ128GA006.xml @@ -24,13 +24,13 @@ - + - - + + @@ -47,59 +47,59 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + @@ -108,11 +108,11 @@ - - + + - + diff --git a/src/devices/pic/xml_data/24FJ128GA008.xml b/src/devices/pic/xml_data/24FJ128GA008.xml index b8d43d8..14e4f29 100644 --- a/src/devices/pic/xml_data/24FJ128GA008.xml +++ b/src/devices/pic/xml_data/24FJ128GA008.xml @@ -24,13 +24,13 @@ - + - - + + @@ -47,59 +47,59 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + @@ -108,11 +108,11 @@ - - + + - + diff --git a/src/devices/pic/xml_data/24FJ128GA010.xml b/src/devices/pic/xml_data/24FJ128GA010.xml index d57c7ff..cb01c2d 100644 --- a/src/devices/pic/xml_data/24FJ128GA010.xml +++ b/src/devices/pic/xml_data/24FJ128GA010.xml @@ -24,13 +24,13 @@ - + - - + + @@ -47,59 +47,59 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + @@ -108,11 +108,11 @@ - - + + - + diff --git a/src/devices/pic/xml_data/24FJ64GA002.xml b/src/devices/pic/xml_data/24FJ64GA002.xml index e051b07..90b9f05 100644 --- a/src/devices/pic/xml_data/24FJ64GA002.xml +++ b/src/devices/pic/xml_data/24FJ64GA002.xml @@ -24,13 +24,13 @@ - + - - + + @@ -47,69 +47,69 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - - + + @@ -118,11 +118,11 @@ - - + + - + diff --git a/src/devices/pic/xml_data/24FJ64GA004.xml b/src/devices/pic/xml_data/24FJ64GA004.xml index c87748e..8cda66c 100644 --- a/src/devices/pic/xml_data/24FJ64GA004.xml +++ b/src/devices/pic/xml_data/24FJ64GA004.xml @@ -24,13 +24,13 @@ - + - - + + @@ -47,69 +47,69 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - - + + @@ -118,11 +118,11 @@ - - + + - + diff --git a/src/devices/pic/xml_data/24FJ64GA006.xml b/src/devices/pic/xml_data/24FJ64GA006.xml index 6492f51..dab1819 100644 --- a/src/devices/pic/xml_data/24FJ64GA006.xml +++ b/src/devices/pic/xml_data/24FJ64GA006.xml @@ -24,13 +24,13 @@ - + - - + + @@ -47,59 +47,59 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + @@ -108,11 +108,11 @@ - - + + - + diff --git a/src/devices/pic/xml_data/24FJ64GA008.xml b/src/devices/pic/xml_data/24FJ64GA008.xml index 2ead302..5149c82 100644 --- a/src/devices/pic/xml_data/24FJ64GA008.xml +++ b/src/devices/pic/xml_data/24FJ64GA008.xml @@ -24,13 +24,13 @@ - + - - + + @@ -47,59 +47,59 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + @@ -108,11 +108,11 @@ - - + + - + diff --git a/src/devices/pic/xml_data/24FJ64GA010.xml b/src/devices/pic/xml_data/24FJ64GA010.xml index 627da04..43f2806 100644 --- a/src/devices/pic/xml_data/24FJ64GA010.xml +++ b/src/devices/pic/xml_data/24FJ64GA010.xml @@ -24,13 +24,13 @@ - + - - + + @@ -47,59 +47,59 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + @@ -108,11 +108,11 @@ - - + + - + diff --git a/src/devices/pic/xml_data/24FJ96GA006.xml b/src/devices/pic/xml_data/24FJ96GA006.xml index 9f02be4..2b17512 100644 --- a/src/devices/pic/xml_data/24FJ96GA006.xml +++ b/src/devices/pic/xml_data/24FJ96GA006.xml @@ -24,13 +24,13 @@ - + - - + + @@ -47,59 +47,59 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + @@ -108,11 +108,11 @@ - - + + - + diff --git a/src/devices/pic/xml_data/24FJ96GA008.xml b/src/devices/pic/xml_data/24FJ96GA008.xml index eeba6d2..ee3212e 100644 --- a/src/devices/pic/xml_data/24FJ96GA008.xml +++ b/src/devices/pic/xml_data/24FJ96GA008.xml @@ -24,13 +24,13 @@ - + - - + + @@ -47,59 +47,59 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + @@ -108,11 +108,11 @@ - - + + - + diff --git a/src/devices/pic/xml_data/24FJ96GA010.xml b/src/devices/pic/xml_data/24FJ96GA010.xml index 700d288..e609719 100644 --- a/src/devices/pic/xml_data/24FJ96GA010.xml +++ b/src/devices/pic/xml_data/24FJ96GA010.xml @@ -24,13 +24,13 @@ - + - - + + @@ -47,59 +47,59 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + @@ -108,11 +108,11 @@ - - + + - + diff --git a/src/devices/pic/xml_data/24HJ128GP206.xml b/src/devices/pic/xml_data/24HJ128GP206.xml index c065e99..60c824c 100644 --- a/src/devices/pic/xml_data/24HJ128GP206.xml +++ b/src/devices/pic/xml_data/24HJ128GP206.xml @@ -21,72 +21,72 @@ - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - + - - + + @@ -95,38 +95,38 @@ - - + + - - + + - + - - + + - - + + - - + + - + - - + + @@ -143,23 +143,23 @@ - - + + - - + + - - + + - + - - + + @@ -168,28 +168,28 @@ - + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/24HJ128GP210.xml b/src/devices/pic/xml_data/24HJ128GP210.xml index b0922d0..6e1983d 100644 --- a/src/devices/pic/xml_data/24HJ128GP210.xml +++ b/src/devices/pic/xml_data/24HJ128GP210.xml @@ -21,72 +21,72 @@ - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - + - - + + @@ -95,38 +95,38 @@ - - + + - - + + - + - - + + - - + + - - + + - + - - + + @@ -143,23 +143,23 @@ - - + + - - + + - - + + - + - - + + @@ -168,28 +168,28 @@ - + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/24HJ128GP306.xml b/src/devices/pic/xml_data/24HJ128GP306.xml index 97f23e1..7e8f67e 100644 --- a/src/devices/pic/xml_data/24HJ128GP306.xml +++ b/src/devices/pic/xml_data/24HJ128GP306.xml @@ -21,72 +21,72 @@ - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - + - - + + @@ -95,38 +95,38 @@ - - + + - - + + - + - - + + - - + + - - + + - + - - + + @@ -143,23 +143,23 @@ - - + + - - + + - - + + - + - - + + @@ -168,28 +168,28 @@ - + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/24HJ128GP310.xml b/src/devices/pic/xml_data/24HJ128GP310.xml index a600601..8e148b0 100644 --- a/src/devices/pic/xml_data/24HJ128GP310.xml +++ b/src/devices/pic/xml_data/24HJ128GP310.xml @@ -21,72 +21,72 @@ - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - + - - + + @@ -95,38 +95,38 @@ - - + + - - + + - + - - + + - - + + - - + + - + - - + + @@ -143,23 +143,23 @@ - - + + - - + + - - + + - + - - + + @@ -168,28 +168,28 @@ - + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/24HJ128GP506.xml b/src/devices/pic/xml_data/24HJ128GP506.xml index ae2fd06..ddb2d13 100644 --- a/src/devices/pic/xml_data/24HJ128GP506.xml +++ b/src/devices/pic/xml_data/24HJ128GP506.xml @@ -21,72 +21,72 @@ - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - + - - + + @@ -95,38 +95,38 @@ - - + + - - + + - + - - + + - - + + - - + + - + - - + + @@ -143,23 +143,23 @@ - - + + - - + + - - + + - + - - + + @@ -168,28 +168,28 @@ - + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/24HJ128GP510.xml b/src/devices/pic/xml_data/24HJ128GP510.xml index 7195e60..80a0f24 100644 --- a/src/devices/pic/xml_data/24HJ128GP510.xml +++ b/src/devices/pic/xml_data/24HJ128GP510.xml @@ -21,72 +21,72 @@ - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - + - - + + @@ -95,38 +95,38 @@ - - + + - - + + - + - - + + - - + + - - + + - + - - + + @@ -143,23 +143,23 @@ - - + + - - + + - - + + - + - - + + @@ -168,28 +168,28 @@ - + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/24HJ12GP201.xml b/src/devices/pic/xml_data/24HJ12GP201.xml index b0c3357..3dccc43 100644 --- a/src/devices/pic/xml_data/24HJ12GP201.xml +++ b/src/devices/pic/xml_data/24HJ12GP201.xml @@ -21,46 +21,46 @@ - + - - + + - - + + - - + + - + - + - - + + - - + + - + - - + + @@ -69,38 +69,38 @@ - - + + - + - - + + - - + + - - + + - - + + - + - - + + @@ -117,23 +117,23 @@ - - + + - - + + - - + + - + - - + + @@ -142,32 +142,32 @@ - - + + - + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/24HJ12GP202.xml b/src/devices/pic/xml_data/24HJ12GP202.xml index 60fdce8..10dfdbb 100644 --- a/src/devices/pic/xml_data/24HJ12GP202.xml +++ b/src/devices/pic/xml_data/24HJ12GP202.xml @@ -21,46 +21,46 @@ - + - - + + - - + + - - + + - + - + - - + + - - + + - + - - + + @@ -69,38 +69,38 @@ - - + + - + - - + + - - + + - - + + - - + + - + - - + + @@ -117,23 +117,23 @@ - - + + - - + + - - + + - + - - + + @@ -142,32 +142,32 @@ - - + + - + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/24HJ16GP304.xml b/src/devices/pic/xml_data/24HJ16GP304.xml index f4d50d8..09096ec 100644 --- a/src/devices/pic/xml_data/24HJ16GP304.xml +++ b/src/devices/pic/xml_data/24HJ16GP304.xml @@ -24,46 +24,46 @@ - + - - + + - - + + - - + + - + - + - - + + - - + + - + - - + + @@ -72,38 +72,38 @@ - - + + - + - - + + - - + + - - + + - - + + - + - - + + @@ -120,23 +120,23 @@ - - + + - - + + - - + + - + - - + + @@ -145,32 +145,32 @@ - - + + - + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/24HJ256GP206.xml b/src/devices/pic/xml_data/24HJ256GP206.xml index d977b29..3335305 100644 --- a/src/devices/pic/xml_data/24HJ256GP206.xml +++ b/src/devices/pic/xml_data/24HJ256GP206.xml @@ -21,72 +21,72 @@ - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - + - - + + @@ -95,38 +95,38 @@ - - + + - - + + - + - - + + - - + + - - + + - + - - + + @@ -143,23 +143,23 @@ - - + + - - + + - - + + - + - - + + @@ -168,28 +168,28 @@ - + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/24HJ256GP210.xml b/src/devices/pic/xml_data/24HJ256GP210.xml index 000bc00..60f9102 100644 --- a/src/devices/pic/xml_data/24HJ256GP210.xml +++ b/src/devices/pic/xml_data/24HJ256GP210.xml @@ -21,72 +21,72 @@ - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - + - - + + @@ -95,38 +95,38 @@ - - + + - - + + - + - - + + - - + + - - + + - + - - + + @@ -143,23 +143,23 @@ - - + + - - + + - - + + - + - - + + @@ -168,28 +168,28 @@ - + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/24HJ256GP610.xml b/src/devices/pic/xml_data/24HJ256GP610.xml index 4c1e714..3189c39 100644 --- a/src/devices/pic/xml_data/24HJ256GP610.xml +++ b/src/devices/pic/xml_data/24HJ256GP610.xml @@ -21,72 +21,72 @@ - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - + - - + + @@ -95,38 +95,38 @@ - - + + - - + + - + - - + + - - + + - - + + - + - - + + @@ -143,23 +143,23 @@ - - + + - - + + - - + + - + - - + + @@ -168,28 +168,28 @@ - + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/24HJ32GP202.xml b/src/devices/pic/xml_data/24HJ32GP202.xml index d93607a..6f67086 100644 --- a/src/devices/pic/xml_data/24HJ32GP202.xml +++ b/src/devices/pic/xml_data/24HJ32GP202.xml @@ -24,46 +24,46 @@ - + - - + + - - + + - - + + - + - + - - + + - - + + - + - - + + @@ -72,38 +72,38 @@ - - + + - + - - + + - - + + - - + + - - + + - + - - + + @@ -120,23 +120,23 @@ - - + + - - + + - - + + - + - - + + @@ -145,32 +145,32 @@ - - + + - + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/24HJ32GP204.xml b/src/devices/pic/xml_data/24HJ32GP204.xml index 5a9e126..40d90b2 100644 --- a/src/devices/pic/xml_data/24HJ32GP204.xml +++ b/src/devices/pic/xml_data/24HJ32GP204.xml @@ -24,46 +24,46 @@ - + - - + + - - + + - - + + - + - + - - + + - - + + - + - - + + @@ -72,38 +72,38 @@ - - + + - + - - + + - - + + - - + + - - + + - + - - + + @@ -120,23 +120,23 @@ - - + + - - + + - - + + - + - - + + @@ -145,32 +145,32 @@ - - + + - + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/24HJ64GP206.xml b/src/devices/pic/xml_data/24HJ64GP206.xml index a3266fa..42b47d2 100644 --- a/src/devices/pic/xml_data/24HJ64GP206.xml +++ b/src/devices/pic/xml_data/24HJ64GP206.xml @@ -21,72 +21,72 @@ - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - + - - + + @@ -95,38 +95,38 @@ - - + + - - + + - + - - + + - - + + - - + + - + - - + + @@ -143,23 +143,23 @@ - - + + - - + + - - + + - + - - + + @@ -168,28 +168,28 @@ - + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/24HJ64GP210.xml b/src/devices/pic/xml_data/24HJ64GP210.xml index 630a12a..734ce51 100644 --- a/src/devices/pic/xml_data/24HJ64GP210.xml +++ b/src/devices/pic/xml_data/24HJ64GP210.xml @@ -21,72 +21,72 @@ - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - + - - + + @@ -95,38 +95,38 @@ - - + + - - + + - + - - + + - - + + - - + + - + - - + + @@ -143,23 +143,23 @@ - - + + - - + + - - + + - + - - + + @@ -168,28 +168,28 @@ - + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/24HJ64GP506.xml b/src/devices/pic/xml_data/24HJ64GP506.xml index 372c767..74a6cfa 100644 --- a/src/devices/pic/xml_data/24HJ64GP506.xml +++ b/src/devices/pic/xml_data/24HJ64GP506.xml @@ -21,72 +21,72 @@ - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - + - - + + @@ -95,38 +95,38 @@ - - + + - - + + - + - - + + - - + + - - + + - + - - + + @@ -143,23 +143,23 @@ - - + + - - + + - - + + - + - - + + @@ -168,28 +168,28 @@ - + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/24HJ64GP510.xml b/src/devices/pic/xml_data/24HJ64GP510.xml index 8711793..099ab2a 100644 --- a/src/devices/pic/xml_data/24HJ64GP510.xml +++ b/src/devices/pic/xml_data/24HJ64GP510.xml @@ -21,72 +21,72 @@ - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - + - - + + @@ -95,38 +95,38 @@ - - + + - - + + - + - - + + - - + + - - + + - + - - + + @@ -143,23 +143,23 @@ - - + + - - + + - - + + - + - - + + @@ -168,28 +168,28 @@ - + - - + + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/30F1010.xml b/src/devices/pic/xml_data/30F1010.xml index 1d59008..7aa7c07 100644 --- a/src/devices/pic/xml_data/30F1010.xml +++ b/src/devices/pic/xml_data/30F1010.xml @@ -27,77 +27,77 @@ - + - - + + - - + + - - + + - + - + - - + + - - + + - + - - + + - + - - + + - - + + - - + + - - + + - + - - + + @@ -114,23 +114,23 @@ - - + + - - + + - - + + - + - - + + @@ -139,20 +139,20 @@ - + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/30F2010.xml b/src/devices/pic/xml_data/30F2010.xml index f252785..85ec165 100644 --- a/src/devices/pic/xml_data/30F2010.xml +++ b/src/devices/pic/xml_data/30F2010.xml @@ -36,13 +36,13 @@ - + - - + + @@ -59,22 +59,22 @@ - - + + - - + + - + - - + + @@ -91,84 +91,84 @@ - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + - + - + - - + + - - + + - + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/30F2011.xml b/src/devices/pic/xml_data/30F2011.xml index a767855..54886ed 100644 --- a/src/devices/pic/xml_data/30F2011.xml +++ b/src/devices/pic/xml_data/30F2011.xml @@ -27,13 +27,13 @@ - + - - + + @@ -53,16 +53,16 @@ - - + + - + - - + + @@ -79,72 +79,72 @@ - - + + - - + + - + - - + + - - + + - - + + - - + + - + - + - + - - + + - - + + - + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/30F2012.xml b/src/devices/pic/xml_data/30F2012.xml index 6da9eb7..3f0d7ec 100644 --- a/src/devices/pic/xml_data/30F2012.xml +++ b/src/devices/pic/xml_data/30F2012.xml @@ -27,13 +27,13 @@ - + - - + + @@ -53,16 +53,16 @@ - - + + - + - - + + @@ -79,72 +79,72 @@ - - + + - - + + - + - - + + - - + + - - + + - - + + - + - + - + - - + + - - + + - + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/30F2020.xml b/src/devices/pic/xml_data/30F2020.xml index 3aa30e9..cad9c22 100644 --- a/src/devices/pic/xml_data/30F2020.xml +++ b/src/devices/pic/xml_data/30F2020.xml @@ -27,77 +27,77 @@ - + - - + + - - + + - - + + - + - + - - + + - - + + - + - - + + - + - - + + - - + + - - + + - - + + - + - - + + @@ -114,23 +114,23 @@ - - + + - - + + - - + + - + - - + + @@ -139,20 +139,20 @@ - + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/30F2023.xml b/src/devices/pic/xml_data/30F2023.xml index 8241600..6871678 100644 --- a/src/devices/pic/xml_data/30F2023.xml +++ b/src/devices/pic/xml_data/30F2023.xml @@ -27,77 +27,77 @@ - + - - + + - - + + - - + + - + - + - - + + - - + + - + - - + + - + - - + + - - + + - - + + - - + + - + - - + + @@ -114,23 +114,23 @@ - - + + - - + + - - + + - + - - + + @@ -139,20 +139,20 @@ - + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/30F3010.xml b/src/devices/pic/xml_data/30F3010.xml index 1041c86..2d4170d 100644 --- a/src/devices/pic/xml_data/30F3010.xml +++ b/src/devices/pic/xml_data/30F3010.xml @@ -28,13 +28,13 @@ - + - - + + @@ -54,16 +54,16 @@ - - + + - + - - + + @@ -80,84 +80,84 @@ - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + - + - + - - + + - - + + - + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/30F3011.xml b/src/devices/pic/xml_data/30F3011.xml index b092d8b..6f84490 100644 --- a/src/devices/pic/xml_data/30F3011.xml +++ b/src/devices/pic/xml_data/30F3011.xml @@ -28,13 +28,13 @@ - + - - + + @@ -54,17 +54,17 @@ - - + + - + - - + + @@ -81,84 +81,84 @@ - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + - + - + - - + + - - + + - + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/30F3012.xml b/src/devices/pic/xml_data/30F3012.xml index b87d96a..4ecc5d3 100644 --- a/src/devices/pic/xml_data/30F3012.xml +++ b/src/devices/pic/xml_data/30F3012.xml @@ -28,13 +28,13 @@ - + - - + + @@ -54,16 +54,16 @@ - - + + - + - - + + @@ -80,72 +80,72 @@ - - + + - - + + - + - - + + - - + + - - + + - - + + - + - + - + - - + + - - + + - + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/30F3013.xml b/src/devices/pic/xml_data/30F3013.xml index 702e415..337316c 100644 --- a/src/devices/pic/xml_data/30F3013.xml +++ b/src/devices/pic/xml_data/30F3013.xml @@ -28,13 +28,13 @@ - + - - + + @@ -54,16 +54,16 @@ - - + + - + - - + + @@ -80,72 +80,72 @@ - - + + - - + + - + - - + + - - + + - - + + - - + + - + - + - + - - + + - - + + - + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/30F3014.xml b/src/devices/pic/xml_data/30F3014.xml index 13bd387..870b30b 100644 --- a/src/devices/pic/xml_data/30F3014.xml +++ b/src/devices/pic/xml_data/30F3014.xml @@ -28,13 +28,13 @@ - + - - + + @@ -54,16 +54,16 @@ - - + + - + - - + + @@ -80,72 +80,72 @@ - - + + - - + + - + - - + + - - + + - - + + - - + + - + - + - + - - + + - - + + - + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/30F4011.xml b/src/devices/pic/xml_data/30F4011.xml index 89791c2..91f6d83 100644 --- a/src/devices/pic/xml_data/30F4011.xml +++ b/src/devices/pic/xml_data/30F4011.xml @@ -28,13 +28,13 @@ - + - - + + @@ -51,23 +51,23 @@ - - + + - - + + - + - - + + @@ -84,84 +84,84 @@ - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + - + - + - - + + - - + + - + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/30F4012.xml b/src/devices/pic/xml_data/30F4012.xml index e42b34c..3bc430b 100644 --- a/src/devices/pic/xml_data/30F4012.xml +++ b/src/devices/pic/xml_data/30F4012.xml @@ -28,13 +28,13 @@ - + - - + + @@ -51,23 +51,23 @@ - - + + - - + + - + - - + + @@ -84,84 +84,84 @@ - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + - + - + - - + + - - + + - + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/30F4013.xml b/src/devices/pic/xml_data/30F4013.xml index 1732e6e..6177a81 100644 --- a/src/devices/pic/xml_data/30F4013.xml +++ b/src/devices/pic/xml_data/30F4013.xml @@ -28,13 +28,13 @@ - + - - + + @@ -54,17 +54,17 @@ - - + + - + - - + + @@ -81,72 +81,72 @@ - - + + - - + + - + - - + + - - + + - - + + - - + + - + - + - + - - + + - - + + - + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/30F5011.xml b/src/devices/pic/xml_data/30F5011.xml index a1f311d..dfd9f6f 100644 --- a/src/devices/pic/xml_data/30F5011.xml +++ b/src/devices/pic/xml_data/30F5011.xml @@ -28,13 +28,13 @@ - + - - + + @@ -51,23 +51,23 @@ - - + + - - + + - + - - + + @@ -84,125 +84,125 @@ - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/30F5013.xml b/src/devices/pic/xml_data/30F5013.xml index debd97f..2017b70 100644 --- a/src/devices/pic/xml_data/30F5013.xml +++ b/src/devices/pic/xml_data/30F5013.xml @@ -28,13 +28,13 @@ - + - - + + @@ -51,23 +51,23 @@ - - + + - - + + - + - - + + @@ -84,125 +84,125 @@ - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/30F5015.xml b/src/devices/pic/xml_data/30F5015.xml index af7c20a..489bed2 100644 --- a/src/devices/pic/xml_data/30F5015.xml +++ b/src/devices/pic/xml_data/30F5015.xml @@ -28,13 +28,13 @@ - + - - + + @@ -54,17 +54,17 @@ - - + + - + - - + + @@ -81,84 +81,84 @@ - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + - + - + - - + + - - + + - + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/30F5016.xml b/src/devices/pic/xml_data/30F5016.xml index aa2e7e1..6aa3e0e 100644 --- a/src/devices/pic/xml_data/30F5016.xml +++ b/src/devices/pic/xml_data/30F5016.xml @@ -28,13 +28,13 @@ - + - - + + @@ -54,17 +54,17 @@ - - + + - + - - + + @@ -81,84 +81,84 @@ - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + - + - + - - + + - - + + - + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/30F6010.xml b/src/devices/pic/xml_data/30F6010.xml index 8b26c7c..1038327 100644 --- a/src/devices/pic/xml_data/30F6010.xml +++ b/src/devices/pic/xml_data/30F6010.xml @@ -29,13 +29,13 @@ - + - - + + @@ -52,23 +52,23 @@ - - + + - - + + - + - - + + @@ -85,84 +85,84 @@ - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + - + - + - - + + - - + + - + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/30F6010A.xml b/src/devices/pic/xml_data/30F6010A.xml index 2f5e976..4f477d2 100644 --- a/src/devices/pic/xml_data/30F6010A.xml +++ b/src/devices/pic/xml_data/30F6010A.xml @@ -35,13 +35,13 @@ - + - - + + @@ -61,17 +61,17 @@ - - + + - + - - + + @@ -88,137 +88,137 @@ - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/30F6011.xml b/src/devices/pic/xml_data/30F6011.xml index 60e6f5f..94a1ba1 100644 --- a/src/devices/pic/xml_data/30F6011.xml +++ b/src/devices/pic/xml_data/30F6011.xml @@ -29,13 +29,13 @@ - + - - + + @@ -52,23 +52,23 @@ - - + + - - + + - + - - + + @@ -85,72 +85,72 @@ - - + + - - + + - + - - + + - - + + - - + + - - + + - + - + - + - - + + - - + + - + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/30F6011A.xml b/src/devices/pic/xml_data/30F6011A.xml index bb499b1..752f62b 100644 --- a/src/devices/pic/xml_data/30F6011A.xml +++ b/src/devices/pic/xml_data/30F6011A.xml @@ -28,13 +28,13 @@ - + - - + + @@ -54,17 +54,17 @@ - - + + - + - - + + @@ -81,125 +81,125 @@ - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/30F6012.xml b/src/devices/pic/xml_data/30F6012.xml index e7c1797..7d5f9b5 100644 --- a/src/devices/pic/xml_data/30F6012.xml +++ b/src/devices/pic/xml_data/30F6012.xml @@ -29,13 +29,13 @@ - + - - + + @@ -52,23 +52,23 @@ - - + + - - + + - + - - + + @@ -85,72 +85,72 @@ - - + + - - + + - + - - + + - - + + - - + + - - + + - + - + - + - - + + - - + + - + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/30F6012A.xml b/src/devices/pic/xml_data/30F6012A.xml index 6dd84fb..c2a0e42 100644 --- a/src/devices/pic/xml_data/30F6012A.xml +++ b/src/devices/pic/xml_data/30F6012A.xml @@ -28,13 +28,13 @@ - + - - + + @@ -54,17 +54,17 @@ - - + + - + - - + + @@ -81,125 +81,125 @@ - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/30F6013.xml b/src/devices/pic/xml_data/30F6013.xml index 34b66cf..81451a6 100644 --- a/src/devices/pic/xml_data/30F6013.xml +++ b/src/devices/pic/xml_data/30F6013.xml @@ -29,13 +29,13 @@ - + - - + + @@ -52,23 +52,23 @@ - - + + - - + + - + - - + + @@ -85,72 +85,72 @@ - - + + - - + + - + - - + + - - + + - - + + - - + + - + - + - + - - + + - - + + - + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/30F6013A.xml b/src/devices/pic/xml_data/30F6013A.xml index e0a5758..ff382ea 100644 --- a/src/devices/pic/xml_data/30F6013A.xml +++ b/src/devices/pic/xml_data/30F6013A.xml @@ -28,13 +28,13 @@ - + - - + + @@ -54,17 +54,17 @@ - - + + - + - - + + @@ -81,125 +81,125 @@ - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/30F6014.xml b/src/devices/pic/xml_data/30F6014.xml index 8cf7766..2e5353e 100644 --- a/src/devices/pic/xml_data/30F6014.xml +++ b/src/devices/pic/xml_data/30F6014.xml @@ -29,13 +29,13 @@ - + - - + + @@ -52,23 +52,23 @@ - - + + - - + + - + - - + + @@ -85,72 +85,72 @@ - - + + - - + + - + - - + + - - + + - - + + - - + + - + - + - + - - + + - - + + - + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/30F6014A.xml b/src/devices/pic/xml_data/30F6014A.xml index c6a6efe..6396aed 100644 --- a/src/devices/pic/xml_data/30F6014A.xml +++ b/src/devices/pic/xml_data/30F6014A.xml @@ -28,13 +28,13 @@ - + - - + + @@ -54,17 +54,17 @@ - - + + - + - - + + @@ -81,125 +81,125 @@ - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/30F6015.xml b/src/devices/pic/xml_data/30F6015.xml index 784f38d..4b5b5bd 100644 --- a/src/devices/pic/xml_data/30F6015.xml +++ b/src/devices/pic/xml_data/30F6015.xml @@ -28,13 +28,13 @@ - + - - + + @@ -54,17 +54,17 @@ - - + + - + - - + + @@ -81,137 +81,137 @@ - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - + diff --git a/src/devices/pic/xml_data/pic.xsd b/src/devices/pic/xml_data/pic.xsd index f358f68..52d1bb2 100644 --- a/src/devices/pic/xml_data/pic.xsd +++ b/src/devices/pic/xml_data/pic.xsd @@ -225,9 +225,9 @@ - + - + @@ -246,14 +246,14 @@ - + - + - - + + diff --git a/src/devices/pic/xml_data/registers/registers.xml b/src/devices/pic/xml_data/registers/registers.xml index d7c0884..509e4ff 100644 --- a/src/devices/pic/xml_data/registers/registers.xml +++ b/src/devices/pic/xml_data/registers/registers.xml @@ -20769,7 +20769,7 @@ - + @@ -20885,7 +20885,7 @@ - + @@ -21001,7 +21001,7 @@ - + @@ -21123,7 +21123,7 @@ - + @@ -21245,7 +21245,7 @@ - + @@ -21376,7 +21376,7 @@ - + @@ -21628,7 +21628,7 @@ - + @@ -21763,7 +21763,7 @@ - + @@ -22021,7 +22021,7 @@ - + @@ -22135,7 +22135,7 @@ - + @@ -22254,7 +22254,7 @@ - + @@ -22368,7 +22368,7 @@ - + @@ -22487,7 +22487,7 @@ - + @@ -22612,7 +22612,7 @@ - + @@ -22740,7 +22740,7 @@ - + @@ -22865,7 +22865,7 @@ - + @@ -22993,7 +22993,7 @@ - + @@ -23163,7 +23163,7 @@ - + @@ -23286,7 +23286,7 @@ - + @@ -23406,7 +23406,7 @@ - + @@ -23534,7 +23534,7 @@ - + @@ -23662,7 +23662,7 @@ - + @@ -23832,7 +23832,7 @@ - + @@ -23944,7 +23944,7 @@ - + @@ -24078,7 +24078,7 @@ - + @@ -24241,7 +24241,7 @@ - + @@ -24484,7 +24484,7 @@ - + @@ -24902,7 +24902,7 @@ - + @@ -25025,7 +25025,7 @@ - + @@ -25153,7 +25153,7 @@ - + @@ -25276,7 +25276,7 @@ - + @@ -25396,7 +25396,7 @@ - + @@ -25526,7 +25526,7 @@ - + @@ -25656,7 +25656,7 @@ - + @@ -25784,7 +25784,7 @@ - + @@ -25896,7 +25896,7 @@ - + @@ -26059,7 +26059,7 @@ - + @@ -26302,7 +26302,7 @@ - + @@ -26720,7 +26720,7 @@ - + @@ -27133,7 +27133,7 @@ - + @@ -27256,7 +27256,7 @@ - + @@ -27379,7 +27379,7 @@ - + @@ -27507,7 +27507,7 @@ - + @@ -27920,7 +27920,7 @@ - + @@ -28333,7 +28333,7 @@ - + @@ -28746,7 +28746,7 @@ - + @@ -28878,7 +28878,7 @@ - + @@ -29012,7 +29012,7 @@ - + @@ -29144,7 +29144,7 @@ - + @@ -29278,7 +29278,7 @@ - + @@ -29454,7 +29454,7 @@ - + @@ -29582,7 +29582,7 @@ - + @@ -29708,7 +29708,7 @@ - + @@ -29840,7 +29840,7 @@ - + @@ -29972,7 +29972,7 @@ - + @@ -30148,7 +30148,7 @@ - + @@ -30266,7 +30266,7 @@ - + @@ -30406,7 +30406,7 @@ - + @@ -30571,7 +30571,7 @@ - + @@ -30828,7 +30828,7 @@ - + @@ -31260,7 +31260,7 @@ - + @@ -31393,7 +31393,7 @@ - + @@ -31523,7 +31523,7 @@ - + @@ -31650,7 +31650,7 @@ - + @@ -31776,7 +31776,7 @@ - + @@ -31908,7 +31908,7 @@ - + @@ -32040,7 +32040,7 @@ - + @@ -32172,7 +32172,7 @@ - + @@ -32290,7 +32290,7 @@ - + @@ -32455,7 +32455,7 @@ - + @@ -32712,7 +32712,7 @@ - + @@ -33144,7 +33144,7 @@ - + @@ -33568,7 +33568,7 @@ - + @@ -33701,7 +33701,7 @@ - + @@ -33828,7 +33828,7 @@ - + @@ -33960,7 +33960,7 @@ - + @@ -34384,7 +34384,7 @@ - + @@ -34808,7 +34808,7 @@ - + @@ -35232,7 +35232,7 @@ - + @@ -35379,7 +35379,7 @@ - + @@ -35552,7 +35552,7 @@ - + @@ -35689,7 +35689,7 @@ - + @@ -35857,7 +35857,7 @@ - + @@ -36004,7 +36004,7 @@ - + @@ -36177,7 +36177,7 @@ - + @@ -36314,7 +36314,7 @@ - + @@ -36482,7 +36482,7 @@ - + @@ -36641,7 +36641,7 @@ - + @@ -36807,7 +36807,7 @@ - + @@ -36981,7 +36981,7 @@ - + @@ -37409,7 +37409,7 @@ - + @@ -37581,7 +37581,7 @@ - + @@ -37718,7 +37718,7 @@ - + @@ -37890,7 +37890,7 @@ - + @@ -38076,7 +38076,7 @@ - + @@ -38244,7 +38244,7 @@ - + @@ -38403,7 +38403,7 @@ - + @@ -38569,7 +38569,7 @@ - + @@ -38743,7 +38743,7 @@ - + @@ -38917,7 +38917,7 @@ - + @@ -39345,7 +39345,7 @@ - + @@ -39517,7 +39517,7 @@ - + @@ -39704,7 +39704,7 @@ - + @@ -39875,7 +39875,7 @@ - + @@ -40062,7 +40062,7 @@ - + @@ -40249,7 +40249,7 @@ - + @@ -40436,7 +40436,7 @@ - + @@ -40689,7 +40689,7 @@ - + @@ -40942,7 +40942,7 @@ - + @@ -41101,7 +41101,7 @@ - + @@ -41275,7 +41275,7 @@ - + @@ -41446,7 +41446,7 @@ - + @@ -41633,7 +41633,7 @@ - + @@ -41820,7 +41820,7 @@ - + @@ -42073,7 +42073,7 @@ - + @@ -42223,7 +42223,7 @@ - + @@ -42400,7 +42400,7 @@ - + @@ -42540,7 +42540,7 @@ - + @@ -42711,7 +42711,7 @@ - + @@ -42861,7 +42861,7 @@ - + @@ -43038,7 +43038,7 @@ - + @@ -43178,7 +43178,7 @@ - + @@ -43349,7 +43349,7 @@ - + @@ -43511,7 +43511,7 @@ - + @@ -43682,7 +43682,7 @@ - + @@ -43859,7 +43859,7 @@ - + @@ -44292,7 +44292,7 @@ - + @@ -44467,7 +44467,7 @@ - + @@ -44607,7 +44607,7 @@ - + @@ -44782,7 +44782,7 @@ - + @@ -44975,7 +44975,7 @@ - + @@ -45147,7 +45147,7 @@ - + @@ -45309,7 +45309,7 @@ - + @@ -45480,7 +45480,7 @@ - + @@ -45657,7 +45657,7 @@ - + @@ -45834,7 +45834,7 @@ - + @@ -46267,7 +46267,7 @@ - + @@ -46442,7 +46442,7 @@ - + @@ -46635,7 +46635,7 @@ - + @@ -46809,7 +46809,7 @@ - + @@ -47002,7 +47002,7 @@ - + @@ -47195,7 +47195,7 @@ - + @@ -47388,7 +47388,7 @@ - + @@ -47649,7 +47649,7 @@ - + @@ -47910,7 +47910,7 @@ - + @@ -48072,7 +48072,7 @@ - + @@ -48249,7 +48249,7 @@ - + @@ -48423,7 +48423,7 @@ - + @@ -48616,7 +48616,7 @@ - + @@ -48809,7 +48809,7 @@ - + @@ -49070,7 +49070,7 @@ - + @@ -49335,7 +49335,7 @@ - + @@ -49600,7 +49600,7 @@ - + diff --git a/src/libgui/breakpoint_view.cpp b/src/libgui/breakpoint_view.cpp index 6f49aac..99f711f 100644 --- a/src/libgui/breakpoint_view.cpp +++ b/src/libgui/breakpoint_view.cpp @@ -8,9 +8,9 @@ ***************************************************************************/ #include "breakpoint_view.h" -#include +#include #include -#include +#include #include "main_global.h" #include "editor_manager.h" @@ -20,7 +20,7 @@ //---------------------------------------------------------------------------- void Breakpoint::updateActions(const Data *data) { - bool hasBreakpoint = (data ? Breakpoint::list().contains(*data) : false); + bool hasBreakpoint = (data ? Breakpoint::list().tqcontains(*data) : false); Main::action("toggle_breakpoint")->setText(hasBreakpoint ? i18n("Remove breakpoint") : i18n("Set breakpoint")); Main::action("toggle_breakpoint")->setEnabled(data); bool isActive = (hasBreakpoint ? Breakpoint::list().state(*data)==Breakpoint::Active : false); @@ -29,22 +29,22 @@ void Breakpoint::updateActions(const Data *data) } //---------------------------------------------------------------------------- -Breakpoint::ListViewItem::ListViewItem(ListView *parent, const Data &data) - : KListViewItem(parent), _data(data) +Breakpoint::ListViewItem::ListViewItem(ListView *tqparent, const Data &data) + : KListViewItem(tqparent), _data(data) {} //---------------------------------------------------------------------------- -Breakpoint::View::View(QWidget *parent) - : QWidget(parent, "breakpoints_view"), GenericView(Breakpoint::list()), +Breakpoint::View::View(TQWidget *tqparent) + : TQWidget(tqparent, "breakpoints_view"), GenericView(Breakpoint::list()), _currentData(0) { - QVBoxLayout *top = new QVBoxLayout(this); + TQVBoxLayout *top = new TQVBoxLayout(this); _listview = new ListView(this); - connect(_listview, SIGNAL(clicked(QListViewItem *)), SLOT(itemClicked(QListViewItem *))); - connect(_listview, SIGNAL(contextMenuRequested(QListViewItem *, const QPoint &, int)), - SLOT(contextMenu(QListViewItem *, const QPoint &, int))); + connect(_listview, TQT_SIGNAL(clicked(TQListViewItem *)), TQT_SLOT(itemClicked(TQListViewItem *))); + connect(_listview, TQT_SIGNAL(contextMenuRequested(TQListViewItem *, const TQPoint &, int)), + TQT_SLOT(contextMenu(TQListViewItem *, const TQPoint &, int))); _listview->setAllColumnsShowFocus(true); - _listview->addColumn(i18n("Status")); + _listview->addColumn(i18n("tqStatus")); _listview->addColumn(i18n("Location")); _listview->addColumn(i18n("Address")); top->addWidget(_listview); @@ -58,7 +58,7 @@ void Breakpoint::View::updateView() const Data &data = Breakpoint::list().data(i); KListViewItem *item = new ListViewItem(_listview, data); item->setPixmap(0, TextEditor::pixmap(Debugger::manager->breakpointType(data))); - item->setText(1, data.url.filename() + ":" + QString::number(data.line)); + item->setText(1, data.url.filename() + ":" + TQString::number(data.line)); Address address = Breakpoint::list().address(data); if ( address.isValid() ) item->setText(2, toHexLabelAbs(address)); else if ( Debugger::manager->coff() ) item->setText(2, i18n("Non-code breakpoint")); @@ -66,18 +66,18 @@ void Breakpoint::View::updateView() } } -void Breakpoint::View::itemClicked(QListViewItem *item) +void Breakpoint::View::itemClicked(TQListViewItem *item) { if ( item==0 ) return; const Data &data = static_cast(item)->data(); Address address = Breakpoint::list().address(data); - TextEditor *editor = ::qt_cast(Main::currentEditor()); + TextEditor *editor = ::tqqt_cast(Main::currentEditor()); const Coff::TextObject *coff = Debugger::manager->coff(); int line = -1; if ( coff && editor && editor->fileType()==PURL::Coff && address.isValid() ) line = coff->lineForAddress(editor->url(), address); if ( line==-1 ) { - editor = ::qt_cast(Main::editorManager().openEditor(data.url)); + editor = ::tqqt_cast(Main::editorManager().openEditor(data.url)); line = data.line; } if ( editor==0 ) return; @@ -85,7 +85,7 @@ void Breakpoint::View::itemClicked(QListViewItem *item) editor->setCursor(line, 0); } -void Breakpoint::View::contextMenu(QListViewItem *item, const QPoint &pos, int) +void Breakpoint::View::contextMenu(TQListViewItem *item, const TQPoint &pos, int) { _currentData = (item ? &static_cast(item)->data() : 0); updateActions(_currentData); diff --git a/src/libgui/breakpoint_view.h b/src/libgui/breakpoint_view.h index 984a7ed..1f3543e 100644 --- a/src/libgui/breakpoint_view.h +++ b/src/libgui/breakpoint_view.h @@ -18,7 +18,7 @@ namespace Breakpoint class ListViewItem : public KListViewItem { public: - ListViewItem(ListView *parent, const Data &data); + ListViewItem(ListView *tqparent, const Data &data); const Data &data() const { return _data; } private: @@ -26,17 +26,18 @@ private: }; //---------------------------------------------------------------------------- -class View : public QWidget, public GenericView +class View : public TQWidget, public GenericView { Q_OBJECT + TQ_OBJECT public: - View(QWidget *parent); + View(TQWidget *tqparent); virtual void updateView(); const Data *currentData() const { return _currentData; } private slots: - void itemClicked(QListViewItem *item); - void contextMenu(QListViewItem *item, const QPoint &pos, int col); + void itemClicked(TQListViewItem *item); + void contextMenu(TQListViewItem *item, const TQPoint &pos, int col); private: ListView *_listview; diff --git a/src/libgui/config_center.cpp b/src/libgui/config_center.cpp index 530cbbf..237a89d 100644 --- a/src/libgui/config_center.cpp +++ b/src/libgui/config_center.cpp @@ -9,12 +9,12 @@ ***************************************************************************/ #include "config_center.h" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include #include @@ -48,7 +48,7 @@ void GlobalConfigWidget::saveConfig() GlobalConfig::writeDebugLevel(_showDebug->currentItem()); } -QPixmap GlobalConfigWidget::pixmap() const +TQPixmap GlobalConfigWidget::pixmap() const { KIconLoader loader; return loader.loadIcon("configure", KIcon::Toolbar, KIcon::SizeMedium); @@ -60,7 +60,7 @@ StandaloneConfigWidget::StandaloneConfigWidget() { uint row = 0; - QLabel *label = new QLabel(i18n("Device:"), this); + TQLabel *label = new TQLabel(i18n("Device:"), this); addWidget(label, row,row, 0,0); _device = new DeviceChooser::Button(true, this); addWidget(_device, row,row, 1,1); @@ -85,7 +85,7 @@ void StandaloneConfigWidget::saveConfig() _tools->saveConfig(); } -QPixmap StandaloneConfigWidget::pixmap() const +TQPixmap StandaloneConfigWidget::pixmap() const { KIconLoader loader; return loader.loadIcon("configure", KIcon::Toolbar, KIcon::SizeMedium); @@ -106,15 +106,15 @@ ConfigWidget *ConfigCenter::factory(Type type) return 0; } -ConfigCenter::ConfigCenter(Type showType, QWidget *parent) - : Dialog(IconList, i18n("Configure Piklab"), Ok|Cancel, Cancel, parent, "configure_piklab_dialog", true, false) +ConfigCenter::ConfigCenter(Type showType, TQWidget *tqparent) + : Dialog(IconList, i18n("Configure Piklab"), Ok|Cancel, Cancel, tqparent, "configure_piklab_dialog", true, false) { for (uint i=0; iloadConfig(); _pages[i] = addPage(_configWidgets[i]->title(), _configWidgets[i]->header(), _configWidgets[i]->pixmap()); - QVBoxLayout *vbox = new QVBoxLayout(_pages[i]); - _configWidgets[i]->reparent(_pages[i], QPoint(0,0)); + TQVBoxLayout *vbox = new TQVBoxLayout(_pages[i]); + _configWidgets[i]->reparent(_pages[i], TQPoint(0,0)); vbox->addWidget(_configWidgets[i]); } showPage(showType); diff --git a/src/libgui/config_center.h b/src/libgui/config_center.h index 1e543b7..9f50056 100644 --- a/src/libgui/config_center.h +++ b/src/libgui/config_center.h @@ -10,9 +10,9 @@ #ifndef CONFIG_CENTER_H #define CONFIG_CENTER_H -#include -#include -#include +#include +#include +#include #include "common/gui/key_gui.h" #include "common/gui/dialog.h" @@ -29,11 +29,12 @@ END_DECLARE_CONFIG_WIDGET class GlobalConfigWidget : public BaseGlobalConfigWidget { Q_OBJECT + TQ_OBJECT public: GlobalConfigWidget(); - virtual QString title() const { return i18n("General"); } - virtual QString header() const { return i18n("General Configuration"); } - virtual QPixmap pixmap() const; + virtual TQString title() const { return i18n("General"); } + virtual TQString header() const { return i18n("General Configuration"); } + virtual TQPixmap pixmap() const; virtual void loadConfig(); public slots: @@ -47,12 +48,13 @@ private: class StandaloneConfigWidget : public ConfigWidget { Q_OBJECT + TQ_OBJECT public: StandaloneConfigWidget(); virtual void loadConfig(); - virtual QString title() const { return i18n("Standalone File"); } - virtual QString header() const { return i18n("Standalone File Compilation"); } - virtual QPixmap pixmap() const; + virtual TQString title() const { return i18n("Standalone File"); } + virtual TQString header() const { return i18n("Standalone File Compilation"); } + virtual TQPixmap pixmap() const; public slots: virtual void saveConfig(); @@ -66,17 +68,18 @@ private: class ConfigCenter : public Dialog { Q_OBJECT + TQ_OBJECT public: enum Type { General = 0, ProgSelect, ProgOptions, DebugOptions, Standalone, Nb_Types }; - ConfigCenter(Type showType, QWidget *parent); + ConfigCenter(Type showType, TQWidget *tqparent); public slots: virtual void slotOk(); virtual void slotApply(); private: - QWidget *_pages[Nb_Types]; + TQWidget *_pages[Nb_Types]; ConfigWidget *_configWidgets[Nb_Types]; static ConfigWidget *factory(Type type); diff --git a/src/libgui/config_gen.cpp b/src/libgui/config_gen.cpp index 036e62e..8ef334d 100644 --- a/src/libgui/config_gen.cpp +++ b/src/libgui/config_gen.cpp @@ -8,8 +8,8 @@ ***************************************************************************/ #include "config_gen.h" -#include -#include +#include +#include #include #include "device_gui.h" @@ -23,44 +23,44 @@ #include "tools/list/tool_list.h" //----------------------------------------------------------------------------- -GeneratorDialog::GeneratorDialog(const QString &title, QWidget *parent, const char *name) - : Dialog(parent, name, true, title, Close|User1, Close, false, QSize(400, 300)) +GeneratorDialog::GeneratorDialog(const TQString &title, TQWidget *tqparent, const char *name) + : Dialog(tqparent, name, true, title, Close|User1, Close, false, TQSize(400, 300)) { - QVBoxLayout *top = new QVBoxLayout(mainWidget(), 10, 10); + TQVBoxLayout *top = new TQVBoxLayout(mainWidget(), 10, 10); - QHBoxLayout *hbox = new QHBoxLayout(top); - QLabel *label = new QLabel(i18n("Device:"), mainWidget()); + TQHBoxLayout *hbox = new TQHBoxLayout(top); + TQLabel *label = new TQLabel(i18n("Device:"), mainWidget()); hbox->addWidget(label); _deviceChooser = new DeviceChooser::Button(false, mainWidget()); - connect(_deviceChooser, SIGNAL(changed()), SLOT(reset())); + connect(_deviceChooser, TQT_SIGNAL(changed()), TQT_SLOT(reset())); hbox->addWidget(_deviceChooser); hbox->addSpacing(20); - label = new QLabel(i18n("Toolchain:"), mainWidget()); + label = new TQLabel(i18n("Toolchain:"), mainWidget()); hbox->addWidget(label); - _configType = new KeyComboBox(mainWidget()); + _configType = new KeyComboBox(mainWidget()); Tool::Lister::ConstIterator it; for (it=Tool::lister().begin(); it!=Tool::lister().end(); ++it) _configType->appendItem(it.key(), it.data()->label()); - connect(_configType->widget(), SIGNAL(activated(int)), SLOT(typeChanged())); + connect(_configType->widget(), TQT_SIGNAL(activated(int)), TQT_SLOT(typeChanged())); hbox->addWidget(_configType->widget()); - label = new QLabel(i18n("Tool Type:"), mainWidget()); + label = new TQLabel(i18n("Tool Type:"), mainWidget()); hbox->addWidget(label); _toolType = new KeyComboBox(mainWidget()); FOR_EACH(PURL::ToolType, type) _toolType->appendItem(type, type.label()); _toolType->fixMinimumWidth(); - connect(_toolType->widget(), SIGNAL(activated(int)), SLOT(compute())); + connect(_toolType->widget(), TQT_SIGNAL(activated(int)), TQT_SLOT(compute())); hbox->addWidget(_toolType->widget()); hbox->addStretch(1); - _hbox = new QHBoxLayout(top); + _hbox = new TQHBoxLayout(top); _text = new SimpleTextEditor(false, PURL::Nb_FileTypes, mainWidget()); _text->setReadOnly(true); top->addWidget(_text); - _warning = new QLabel(mainWidget()); + _warning = new TQLabel(mainWidget()); top->addWidget(_warning); setButtonText(User1, i18n("Copy to clipboard")); @@ -68,9 +68,9 @@ GeneratorDialog::GeneratorDialog(const QString &title, QWidget *parent, const ch void GeneratorDialog::set(const Device::Data *data, const Tool::Group &group, PURL::ToolType stype) { - QString device; + TQString device; if ( data==0 ) { - QValueVector devices = group.supportedDevices(); + TQValueVector devices = group.supportedDevices(); if ( devices.isEmpty() ) return; device = devices[0]; } else device = data->name(); @@ -141,8 +141,8 @@ void GeneratorDialog::slotUser1() } //----------------------------------------------------------------------------- -ConfigGenerator::ConfigGenerator(QWidget *parent) - : GeneratorDialog(i18n("Config Generator"), parent, "config_generator"), _memory(0), _configEditor(0) +ConfigGenerator::ConfigGenerator(TQWidget *tqparent) + : GeneratorDialog(i18n("Config Generator"), tqparent, "config_generator"), _memory(0), _configEditor(0) {} ConfigGenerator::~ConfigGenerator() @@ -159,7 +159,7 @@ void ConfigGenerator::reset() _configEditor = Device::groupui(*data).createConfigEditor(*_memory, mainWidget()); if (_configEditor) { _configEditor->show(); - connect(_configEditor, SIGNAL(modified()), SLOT(compute())); + connect(_configEditor, TQT_SIGNAL(modified()), TQT_SLOT(compute())); _configEditor->updateDisplay(); _hbox->addWidget(_configEditor); } @@ -175,8 +175,8 @@ SourceLine::List ConfigGenerator::generateLines(bool &ok) const } //----------------------------------------------------------------------------- -TemplateGenerator::TemplateGenerator(QWidget *parent) - : GeneratorDialog(i18n("Template Generator"), parent, "template_generator") +TemplateGenerator::TemplateGenerator(TQWidget *tqparent) + : GeneratorDialog(i18n("Template Generator"), tqparent, "template_generator") {} SourceLine::List TemplateGenerator::generateLines(bool &ok) const diff --git a/src/libgui/config_gen.h b/src/libgui/config_gen.h index fa9fd56..412e75c 100644 --- a/src/libgui/config_gen.h +++ b/src/libgui/config_gen.h @@ -9,8 +9,8 @@ #ifndef CONFIG_GEN_H #define CONFIG_GEN_H -class QHBoxLayout; -class QLabel; +class TQHBoxLayout; +class TQLabel; #include "common/gui/dialog.h" #include "tools/base/tool_group.h" @@ -26,8 +26,9 @@ class SimpleTextEditor; class GeneratorDialog : public Dialog { Q_OBJECT + TQ_OBJECT public: - GeneratorDialog(const QString &title, QWidget *parent, const char *name); + GeneratorDialog(const TQString &title, TQWidget *tqparent, const char *name); void set(const Device::Data *data, const Tool::Group &group, PURL::ToolType stype); protected slots: @@ -37,12 +38,12 @@ protected slots: virtual void slotUser1(); protected: - QHBoxLayout *_hbox; + TQHBoxLayout *_hbox; DeviceChooser::Button *_deviceChooser; - KeyComboBox *_configType; + KeyComboBox *_configType; KeyComboBox *_toolType; SimpleTextEditor *_text; - QLabel *_warning; + TQLabel *_warning; PURL::ToolType toolType() const; void setToolType(PURL::ToolType stype); @@ -53,8 +54,9 @@ protected: class ConfigGenerator : public GeneratorDialog { Q_OBJECT + TQ_OBJECT public: - ConfigGenerator(QWidget *parent); + ConfigGenerator(TQWidget *tqparent); virtual ~ConfigGenerator(); private slots: @@ -72,8 +74,9 @@ private: class TemplateGenerator : public GeneratorDialog { Q_OBJECT + TQ_OBJECT public: - TemplateGenerator(QWidget *parent); + TemplateGenerator(TQWidget *tqparent); private: virtual SourceLine::List generateLines(bool &ok) const; diff --git a/src/libgui/console.cpp b/src/libgui/console.cpp index 99c996c..cff0c42 100644 --- a/src/libgui/console.cpp +++ b/src/libgui/console.cpp @@ -8,35 +8,35 @@ ***************************************************************************/ #include "console.h" -#include -#include -#include +#include +#include +#include #include #include #include #include -ConsoleView::ConsoleView(QWidget *parent) - : QWidget(parent, "console_view"), _initialized(false) +ConsoleView::ConsoleView(TQWidget *tqparent) + : TQWidget(tqparent, "console_view"), _initialized(false) {} -void ConsoleView::showEvent(QShowEvent *e) +void ConsoleView::showEvent(TQShowEvent *e) { if ( !_initialized ) { _initialized = true; KLibFactory *factory = KLibLoader::self()->factory("libkonsolepart"); - QVBoxLayout *top = new QVBoxLayout(this, 0, 10); + TQVBoxLayout *top = new TQVBoxLayout(this, 0, 10); if ( factory==0 ) { - QLabel *label = new QLabel(i18n("Could not find \"konsolepart\"; please install kdebase."), this); + TQLabel *label = new TQLabel(i18n("Could not tqfind \"konsolepart\"; please install kdebase."), this); label->show(); top->addWidget(label); return; } else { - QWidget *pwidget = static_cast(factory->create(this, "konsole"))->widget(); + TQWidget *pwidget = static_cast(factory->create(TQT_TQOBJECT(this), "konsole"))->widget(); pwidget->show(); top->addWidget(pwidget); setFocusProxy(pwidget); } } - QWidget::showEvent(e); + TQWidget::showEvent(e); } diff --git a/src/libgui/console.h b/src/libgui/console.h index e073754..ca86fd1 100644 --- a/src/libgui/console.h +++ b/src/libgui/console.h @@ -9,16 +9,17 @@ #ifndef CONSOLE_H #define CONSOLE_H -#include +#include -class ConsoleView : public QWidget +class ConsoleView : public TQWidget { Q_OBJECT + TQ_OBJECT public: - ConsoleView(QWidget *parent); + ConsoleView(TQWidget *tqparent); protected: - virtual void showEvent(QShowEvent *e); + virtual void showEvent(TQShowEvent *e); private: bool _initialized; diff --git a/src/libgui/device_editor.cpp b/src/libgui/device_editor.cpp index 7a2a3c6..d3c2158 100644 --- a/src/libgui/device_editor.cpp +++ b/src/libgui/device_editor.cpp @@ -9,8 +9,8 @@ ***************************************************************************/ #include "device_editor.h" -#include -#include +#include +#include #include "devices/list/device_list.h" #include "toplevel.h" @@ -19,51 +19,51 @@ #include "common/global/pfile.h" #include "main_global.h" -DeviceEditor::DeviceEditor(const QString &title, const QString &tag, QWidget *parent, const char *name) - : Editor(title, tag, parent, name), _view(0) +DeviceEditor::DeviceEditor(const TQString &title, const TQString &tag, TQWidget *tqparent, const char *name) + : Editor(title, tag, tqparent, name), _view(0) { init(); } -DeviceEditor::DeviceEditor(QWidget *parent, const char *name) - : Editor(parent, name), _view(0) +DeviceEditor::DeviceEditor(TQWidget *tqparent, const char *name) + : Editor(tqparent, name), _view(0) { init(); } void DeviceEditor::init() { - QHBoxLayout *hbox = new QHBoxLayout(this, 0); - QScrollView *sview = new QScrollView(this, "scroll_view"); - sview->setResizePolicy(QScrollView::AutoOneFit); + TQHBoxLayout *hbox = new TQHBoxLayout(this, 0); + TQScrollView *sview = new TQScrollView(this, "scroll_view"); + sview->setResizePolicy(TQScrollView::AutoOneFit); hbox->addWidget(sview); - _widget = new QWidget(sview->viewport(), "main_scroll_widget"); + _widget = new TQWidget(sview->viewport(), "main_scroll_widget"); sview->addChild(_widget); - _top = new QVBoxLayout(_widget, 0, 0); - _labelDevice = new QLabel(_widget); + _top = new TQVBoxLayout(_widget, 0, 0); + _labelDevice = new TQLabel(_widget); _labelDevice->setMargin(10); _labelDevice->setTextFormat(RichText); _top->addWidget(_labelDevice); - _labelWarning = new QLabel(_widget); + _labelWarning = new TQLabel(_widget); _labelWarning->setMargin(10); _labelWarning->setTextFormat(RichText); _top->addWidget(_labelWarning); - _vbox = new QVBoxLayout(_top); + _vbox = new TQVBoxLayout(_top); - connect(&Main::toplevel(), SIGNAL(stateChanged()), SLOT(updateDevice())); + connect(&Main::toplevel(), TQT_SIGNAL(stateChanged()), TQT_SLOT(updateDevice())); } void DeviceEditor::setDevice(bool force) { if ( Main::device()==Device::AUTO_DATA.name ) { PURL::Url url = Main::projectManager().projectUrl(); - QString name = guessDeviceFromFile(url); + TQString name = guessDeviceFromFile(url); if ( !force && name==_device ) return; _device = name; if ( name==Device::AUTO_DATA.name ) _labelDevice->setText(i18n("The target device is not configured and cannot be guessed from source file. " "The source file either cannot be found or does not contain any processor directive.")); - else _labelDevice->setText(i18n("Device guessed from file: %1").arg(name)); + else _labelDevice->setText(i18n("Device guessed from file: %1").tqarg(name)); _labelDevice->show(); } else { if ( !force && Main::device()==_device ) return; @@ -71,7 +71,7 @@ void DeviceEditor::setDevice(bool force) _labelDevice->hide(); } if ( _view && isModified() ) { - if ( MessageBox::questionYesNo(i18n("File %1 not saved.").arg(filename()), KStdGuiItem::save(), KStdGuiItem::discard()) ) + if ( MessageBox::questionYesNo(i18n("File %1 not saved.").tqarg(filename()), KStdGuiItem::save(), KStdGuiItem::discard()) ) Editor::save(); } _labelWarning->hide(); @@ -103,7 +103,7 @@ PURL::Url DeviceEditor::findAsmFile(const PURL::Url &url) return PURL::Url(); } -QString DeviceEditor::guessDeviceFromFile(const PURL::Url &url) +TQString DeviceEditor::guessDeviceFromFile(const PURL::Url &url) { PURL::Url src = findAsmFile(url); if ( src.isEmpty() ) return Device::AUTO_DATA.name; @@ -111,12 +111,12 @@ QString DeviceEditor::guessDeviceFromFile(const PURL::Url &url) PURL::File file(src, sview); if ( !file.openForRead() ) return Device::AUTO_DATA.name; - QString device; - // QRegExp re1("^[ \\t]+(?:PROCESSOR|processor)[ \\t]+((?:p|sx|P|SX)[a-z0-9A-Z]+)" ) ; - QRegExp re1("^[ \\t]+(?:PROCESSOR|processor)[ \\t]+([a-z0-9A-Z]+)" ) ; - QRegExp re2("^[ \\t]+(?:LIST|list)[ \\t]+" ) ; + TQString device; + // TQRegExp re1("^[ \\t]+(?:PROCESSOR|processor)[ \\t]+((?:p|sx|P|SX)[a-z0-9A-Z]+)" ) ; + TQRegExp re1("^[ \\t]+(?:PROCESSOR|processor)[ \\t]+([a-z0-9A-Z]+)" ) ; + TQRegExp re2("^[ \\t]+(?:LIST|list)[ \\t]+" ) ; for (;;) { - QString line = file.readLine(); + TQString line = file.readLine(); if ( line.isNull() ) break; // search PROCESSOR directive if ( re1.search(line, 0)!=-1 ) { @@ -126,8 +126,8 @@ QString DeviceEditor::guessDeviceFromFile(const PURL::Url &url) // search LIST p=... directive int k = re2.search(line,0); if ( k!=-1 ) { - //QRegExp re3("(?:p|P)[ \\t]*=[ \\t]*((?:p|sx|P|SX)[a-z0-9A-Z]+)") ; - QRegExp re3("(?:p|P)[ \\t]*=[ \\t]*([a-z0-9A-Z]+)") ; + //TQRegExp re3("(?:p|P)[ \\t]*=[ \\t]*((?:p|sx|P|SX)[a-z0-9A-Z]+)") ; + TQRegExp re3("(?:p|P)[ \\t]*=[ \\t]*([a-z0-9A-Z]+)") ; if ( re3.search(line, k+5)!=-1 ) { device = re3.cap(1); break; diff --git a/src/libgui/device_editor.h b/src/libgui/device_editor.h index 8b7cab7..adbd2d0 100644 --- a/src/libgui/device_editor.h +++ b/src/libgui/device_editor.h @@ -15,29 +15,30 @@ namespace Device { class Data; } class DeviceEditor : public Editor { Q_OBJECT + TQ_OBJECT public: - DeviceEditor(const QString &title, const QString &tag, QWidget *parent, const char *name); - DeviceEditor(QWidget *parent, const char *name); + DeviceEditor(const TQString &title, const TQString &tag, TQWidget *tqparent, const char *name); + DeviceEditor(TQWidget *tqparent, const char *name); virtual PURL::FileType fileType() const { return PURL::Nb_FileTypes; } virtual PURL::Url url() const { return PURL::Url(); } virtual void setDevice(bool force = false); - static QString guessDeviceFromFile(const PURL::Url &url); + static TQString guessDeviceFromFile(const PURL::Url &url); virtual bool save(const PURL::Url &) { return false; } virtual bool open(const PURL::Url &) { return true; } - virtual QValueList bookmarkLines() const { return QValueList(); } - virtual void setBookmarkLines(const QValueList &) {} + virtual TQValueList bookmarkLines() const { return TQValueList(); } + virtual void setBookmarkLines(const TQValueList &) {} public slots: virtual void statusChanged() { emit statusTextChanged(" "); } protected: - QString _device; - QWidget *_widget, *_view; - QVBoxLayout *_top, *_vbox; - QLabel *_labelDevice, *_labelWarning; + TQString _device; + TQWidget *_widget, *_view; + TQVBoxLayout *_top, *_vbox; + TQLabel *_labelDevice, *_labelWarning; void init(); - virtual QWidget *createView(const Device::Data *data, QWidget *parent) = 0; + virtual TQWidget *createView(const Device::Data *data, TQWidget *tqparent) = 0; static PURL::Url findAsmFile(const PURL::Url &url); private slots: diff --git a/src/libgui/device_gui.cpp b/src/libgui/device_gui.cpp index 8183725..dc781a9 100644 --- a/src/libgui/device_gui.cpp +++ b/src/libgui/device_gui.cpp @@ -8,12 +8,12 @@ ***************************************************************************/ #include "device_gui.h" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include #include @@ -31,21 +31,21 @@ namespace DeviceChooser //----------------------------------------------------------------------------- void DeviceChooser::Config::writeProgrammerGroup(const Programmer::Group *group) { - writeEntry("programmer", group ? group->name() : QString::null); + writeEntry("programmer", group ? group->name() : TQString()); } const Programmer::Group *DeviceChooser::Config::programmerGroup() { - QString name = readEntry("programmer", QString::null); + TQString name = readEntry("programmer", TQString()); return Programmer::lister().group(name); } void DeviceChooser::Config::writeToolGroup(const Tool::Group *group) { - writeEntry("tool", group ? group->name() : QString::null); + writeEntry("tool", group ? group->name() : TQString()); } const Tool::Group *DeviceChooser::Config::toolGroup() { - QString name = readEntry("tool", QString::null); + TQString name = readEntry("tool", TQString()); return Tool::lister().group(name); } @@ -53,20 +53,20 @@ const Tool::Group *DeviceChooser::Config::toolGroup() class ListItem : public KListViewItem { public: - ListItem(KListView *list, const QString &name, bool selectable, bool isDevice) + ListItem(KListView *list, const TQString &name, bool selectable, bool isDevice) : KListViewItem(list, name), _device(isDevice) { setSelectable(selectable); } - ListItem(KListViewItem *item, const QString &name) + ListItem(KListViewItem *item, const TQString &name) : KListViewItem(item, name), _device(true) {} bool isDevice() const { return _device; } - virtual void paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int align) { - QColorGroup ncg = cg; + virtual void paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int align) { + TQColorGroup ncg = cg; if (_device) { const Device::Data *device = Device::lister().data(text(0)); Q_ASSERT(device); - ncg.setColor(QColorGroup::Text, Device::statusColor(device->status())); + ncg.setColor(TQColorGroup::Text, Device::statusColor(device->status())); } KListViewItem::paintCell(p, ncg, column, width, align); } @@ -83,38 +83,38 @@ const DeviceChooser::ListType::Data DeviceChooser::ListType::DATA[Nb_Types] = { { "flat", I18N_NOOP("Flat List") } }; -DeviceChooser::Dialog::Dialog(const QString &device, Type type, QWidget *parent) - : ::Dialog(parent, "device_chooser_dialog", true, i18n("Select a device"), - Ok|Close, Close, false, QSize(400, 300)), _withAuto(type==ChooseWithAuto) +DeviceChooser::Dialog::Dialog(const TQString &device, Type type, TQWidget *tqparent) + : ::Dialog(tqparent, "device_chooser_dialog", true, i18n("Select a device"), + Ok|Close, Close, false, TQSize(400, 300)), _withAuto(type==ChooseWithAuto) { setButtonOK(KGuiItem(i18n( "&Select"), "button_ok")); - QVBoxLayout *top = new QVBoxLayout(mainWidget(), 0, 10); + TQVBoxLayout *top = new TQVBoxLayout(mainWidget(), 0, 10); // view - QHBoxLayout *hbox = new QHBoxLayout(top, 10); - QVBoxLayout *vbox = new QVBoxLayout(hbox); + TQHBoxLayout *hbox = new TQHBoxLayout(top, 10); + TQVBoxLayout *vbox = new TQVBoxLayout(hbox); _listTypeCombo = new EnumComboBox("list_type", mainWidget()); - connect(_listTypeCombo->combo(), SIGNAL(activated(int)), SLOT(updateList())); + connect(_listTypeCombo->combo(), TQT_SIGNAL(activated(int)), TQT_SLOT(updateList())); vbox->addWidget(_listTypeCombo->combo()); - QPushButton *button = new KPushButton(KGuiItem(i18n("Reset Filters"), "reload"), mainWidget()); - connect(button, SIGNAL(clicked()), SLOT(resetFilters())); + TQPushButton *button = new KPushButton(KGuiItem(i18n("Reset Filters"), "reload"), mainWidget()); + connect(button, TQT_SIGNAL(clicked()), TQT_SLOT(resetFilters())); vbox->addWidget(button); vbox->addStretch(1); // filters - QFrame *frame = new QFrame(mainWidget()); - frame->setFrameStyle(QFrame::Panel | QFrame::Raised); + TQFrame *frame = new TQFrame(mainWidget()); + frame->setFrameStyle(TQFrame::Panel | TQFrame::Raised); frame->setMargin(5); hbox->addWidget(frame); - hbox = new QHBoxLayout(frame, 10, 10); - QLabel *label = new QLabel(i18n("Filters:"), frame); + hbox = new TQHBoxLayout(frame, 10, 10); + TQLabel *label = new TQLabel(i18n("Filters:"), frame); hbox->addWidget(label); - vbox = new QVBoxLayout(hbox); + vbox = new TQVBoxLayout(hbox); - QHBoxLayout *shbox = new QHBoxLayout(vbox); + TQHBoxLayout *shbox = new TQHBoxLayout(vbox); // programmer filter - _programmerCombo = new KeyComboBox(frame); + _programmerCombo = new KeyComboBox(frame); _programmerCombo->appendItem("", i18n("")); Programmer::Lister::ConstIterator pit; for (pit=Programmer::lister().begin(); pit!=Programmer::lister().end(); ++pit) @@ -122,11 +122,11 @@ DeviceChooser::Dialog::Dialog(const QString &device, Type type, QWidget *parent) Config config; const Programmer::Group *pgroup = config.programmerGroup(); if (pgroup) _programmerCombo->setCurrentItem(pgroup->name()); - connect(_programmerCombo->widget(), SIGNAL(activated(int)), SLOT(updateList())); + connect(_programmerCombo->widget(), TQT_SIGNAL(activated(int)), TQT_SLOT(updateList())); shbox->addWidget(_programmerCombo->widget()); // tool filter - _toolCombo = new KeyComboBox(frame); + _toolCombo = new KeyComboBox(frame); _toolCombo->appendItem("", i18n("")); Tool::Lister::ConstIterator tit; for (tit=Tool::lister().begin(); tit!=Tool::lister().end(); ++tit) { @@ -135,50 +135,50 @@ DeviceChooser::Dialog::Dialog(const QString &device, Type type, QWidget *parent) } const Tool::Group *tgroup = config.toolGroup(); if (tgroup) _toolCombo->setCurrentItem(tgroup->name()); - connect(_toolCombo->widget(), SIGNAL(activated(int)), SLOT(updateList())); + connect(_toolCombo->widget(), TQT_SIGNAL(activated(int)), TQT_SLOT(updateList())); shbox->addWidget(_toolCombo->widget()); // memory filter _memoryCombo = new EnumComboBox(i18n(""), "memory_technology", frame); - connect(_memoryCombo->combo(), SIGNAL(activated(int)), SLOT(updateList())); + connect(_memoryCombo->combo(), TQT_SIGNAL(activated(int)), TQT_SLOT(updateList())); shbox->addWidget(_memoryCombo->combo()); shbox->addStretch(1); - shbox = new QHBoxLayout(vbox); + shbox = new TQHBoxLayout(vbox); // status filter - _statusCombo = new EnumComboBox(i18n(""), "status", frame); - connect(_statusCombo->combo(), SIGNAL(activated(int)), SLOT(updateList())); + _statusCombo = new EnumComboBox(i18n(""), "status", frame); + connect(_statusCombo->combo(), TQT_SIGNAL(activated(int)), TQT_SLOT(updateList())); shbox->addWidget(_statusCombo->combo()); // features filter _featureCombo = new EnumComboBox(i18n(""), "feature", frame); - connect(_featureCombo->combo(), SIGNAL(activated(int)), SLOT(updateList())); + connect(_featureCombo->combo(), TQT_SIGNAL(activated(int)), TQT_SLOT(updateList())); shbox->addWidget(_featureCombo->combo()); shbox->addStretch(1); // list view - QValueList widths; + TQValueList widths; widths += 80; widths += 500; - Splitter *splitter = new Splitter(widths, Horizontal, mainWidget(), "device_shooser_splitter"); + Splitter *splitter = new Splitter(widths,Qt::Horizontal, mainWidget(), "device_shooser_splitter"); top->addWidget(splitter, 1); _listView = new KListView(splitter); - connect(_listView, SIGNAL(currentChanged(QListViewItem *)), - SLOT(currentChanged(QListViewItem *))); - connect(_listView, SIGNAL(doubleClicked(QListViewItem *, const QPoint &, int)), - SLOT(listDoubleClicked(QListViewItem *))); + connect(_listView, TQT_SIGNAL(currentChanged(TQListViewItem *)), + TQT_SLOT(currentChanged(TQListViewItem *))); + connect(_listView, TQT_SIGNAL(doubleClicked(TQListViewItem *, const TQPoint &, int)), + TQT_SLOT(listDoubleClicked(TQListViewItem *))); _listView->setAllColumnsShowFocus(true); _listView->setRootIsDecorated(true); _listView->setSorting(-1); _listView->addColumn(i18n("Device")); - _listView->setResizeMode(QListView::LastColumn); + _listView->setResizeMode(TQListView::LastColumn); // device view _deviceView = new View(splitter); - connect(_deviceView, SIGNAL(deviceChanged(const QString &)), - SLOT(deviceChange(const QString &))); + connect(_deviceView, TQT_SIGNAL(deviceChanged(const TQString &)), + TQT_SLOT(deviceChange(const TQString &))); updateList(device); } @@ -194,29 +194,29 @@ DeviceChooser::Dialog::~Dialog() _featureCombo->writeConfig(); } -QString DeviceChooser::Dialog::device() const +TQString DeviceChooser::Dialog::device() const { - QListViewItem *item = _listView->selectedItem(); + TQListViewItem *item = _listView->selectedItem(); if ( item==0 || !static_cast(item)->isDevice() ) return Device::AUTO_DATA.name; return item->text(0); } -void DeviceChooser::Dialog::listDoubleClicked(QListViewItem *item) +void DeviceChooser::Dialog::listDoubleClicked(TQListViewItem *item) { if ( item==0 ) return; if ( !static_cast(item)->isDevice() ) item->setOpen(!item->isOpen()); else accept(); } -void DeviceChooser::Dialog::currentChanged(QListViewItem *item) +void DeviceChooser::Dialog::currentChanged(TQListViewItem *item) { if ( item==0 || !static_cast(item)->isDevice() ) _deviceView->clear(); else _deviceView->setDevice(item->text(0), false); } -void DeviceChooser::Dialog::deviceChange(const QString &name) +void DeviceChooser::Dialog::deviceChange(const TQString &name) { - QListViewItemIterator it(_listView); + TQListViewItemIterator it(_listView); for (; it.current(); ++it) if ( it.current()->text(0)==name ) { _listView->setSelected(it.current(), true); @@ -237,8 +237,8 @@ void DeviceChooser::Dialog::resetFilters() void DeviceChooser::Dialog::updateList() { - QListViewItem *item = _listView->selectedItem(); - QString device = (item ? item->text(0) : QString::null); + TQListViewItem *item = _listView->selectedItem(); + TQString device = (item ? item->text(0) : TQString()); _listView->clear(); updateList(device); } @@ -253,19 +253,19 @@ const Tool::Group *DeviceChooser::Dialog::toolGroup() const return Tool::lister().group(_toolCombo->currentItem()); } -void DeviceChooser::Dialog::updateList(const QString &device) +void DeviceChooser::Dialog::updateList(const TQString &device) { - QValueVector list = Device::lister().supportedDevices(); - QMap groups; - QListViewItem *selected = 0; + TQValueVector list = Device::lister().supportedDevices(); + TQMap groups; + TQListViewItem *selected = 0; const Programmer::Group *pgroup = programmerGroup(); if ( pgroup && pgroup->supportedDevices().isEmpty() && pgroup->isSoftware() ) { - _deviceView->setText(i18n("Could not detect supported devices for \"%1\". Please check installation.").arg(pgroup->label())); + _deviceView->setText(i18n("Could not detect supported devices for \"%1\". Please check installation.").tqarg(pgroup->label())); return; } const Tool::Group *tgroup = toolGroup(); if ( tgroup && tgroup->supportedDevices().isEmpty() ) { - _deviceView->setText(i18n("Could not detect supported devices for toolchain \"%1\". Please check installation.").arg(tgroup->label())); + _deviceView->setText(i18n("Could not detect supported devices for toolchain \"%1\". Please check installation.").tqarg(tgroup->label())); return; } for (int i=list.count()-1; i>=0; i--) { @@ -274,7 +274,7 @@ void DeviceChooser::Dialog::updateList(const QString &device) const Device::Data *data = Device::lister().data(list[i]); Q_ASSERT(data); if ( _memoryCombo->value()!=Device::MemoryTechnology::Nb_Types && data->memoryTechnology()!=_memoryCombo->value() ) continue; - if ( _statusCombo->value()!=Device::Status::Nb_Types && data->status()!=_statusCombo->value() ) continue; + if ( _statusCombo->value()!=Device::tqStatus::Nb_Types && data->status()!=_statusCombo->value() ) continue; if ( _featureCombo->value()!=Pic::Feature::Nb_Types ) { if ( data->group().name()!="pic" ) continue; if ( !static_cast(data)->hasFeature(_featureCombo->value()) ) continue; @@ -282,8 +282,8 @@ void DeviceChooser::Dialog::updateList(const QString &device) KListViewItem *item = 0; switch (_listTypeCombo->value().type()) { case ListType::FamilyTree: { - QString gname = data->listViewGroup(); - if ( !groups.contains(gname) ) + TQString gname = data->listViewGroup(); + if ( !groups.tqcontains(gname) ) groups[gname] = new ListItem(_listView, gname, false, false); item = new ListItem(groups[gname], list[i]); break; @@ -305,23 +305,23 @@ void DeviceChooser::Dialog::updateList(const QString &device) } //----------------------------------------------------------------------------- -DeviceChooser::ComboBox::ComboBox(bool withAuto, QWidget *parent) - : QComboBox(parent, "device_chooser_combo"), _withAuto(withAuto) +DeviceChooser::ComboBox::ComboBox(bool withAuto, TQWidget *tqparent) + : TQComboBox(tqparent, "device_chooser_combo"), _withAuto(withAuto) { if (withAuto) insertItem(i18n(Device::AUTO_DATA.label)); Device::Lister::ConstIterator it; for (it=Device::lister().begin(); it!=Device::lister().end(); ++it) { - QValueVector devices = it.data()->supportedDevices(); + TQValueVector devices = it.data()->supportedDevices(); qHeapSort(devices); for (uint k=0; kaddWidget(_combo); KIconLoader loader; - QIconSet iconset = loader.loadIcon("fileopen", KIcon::Toolbar); - KPushButton *button = new KPushButton(iconset, QString::null, this); - connect(button, SIGNAL(clicked()), SLOT(chooseDevice())); + TQIconSet iconset = loader.loadIcon("fileopen", KIcon::Toolbar); + KPushButton *button = new KPushButton(iconset, TQString(), this); + connect(button, TQT_SIGNAL(clicked()), TQT_SLOT(chooseDevice())); hbox->addWidget(button); } @@ -361,16 +361,16 @@ void DeviceChooser::Button::chooseDevice() } //----------------------------------------------------------------------------- -DeviceChooser::Browser::Browser(QWidget *parent) - : KTextBrowser(parent, "device_browser") +DeviceChooser::Browser::Browser(TQWidget *tqparent) + : KTextBrowser(tqparent, "device_browser") {} -PURL::Url findDocumentUrl(const QString &prefix, const QString &baseName) +PURL::Url findDocumentUrl(const TQString &prefix, const TQString &baseName) { PURL::Url previous = KURL::fromPathOrURL(prefix + baseName + ".pdf"); bool previousExists = previous.exists(); for (uint i=0; i<26; i++) { - PURL::Url url = KURL::fromPathOrURL(prefix + baseName + QChar('a' + i) + ".pdf"); + PURL::Url url = KURL::fromPathOrURL(prefix + baseName + TQChar('a' + i) + ".pdf"); bool exists = url.exists(); if ( !exists && previousExists ) return previous; previous = url; @@ -379,12 +379,12 @@ PURL::Url findDocumentUrl(const QString &prefix, const QString &baseName) return previous; } -void DeviceChooser::Browser::setSource(const QString &name) +void DeviceChooser::Browser::setSource(const TQString &name) { - ::BusyCursor bc; + ::PBusyCursor bc; if ( name.startsWith("device://") ) emit deviceChanged(name.mid(9)); else if ( name.startsWith("document://") ) { - QString prefix = "http://ww1.microchip.com/downloads/en/DeviceDoc/"; + TQString prefix = "http://ww1.microchip.com/downloads/en/DeviceDoc/"; PURL::Url url = findDocumentUrl(prefix, name.mid(11, name.length()-11-1)); KTextBrowser::setSource(url.kurl().htmlURL()); } @@ -392,15 +392,15 @@ void DeviceChooser::Browser::setSource(const QString &name) } //----------------------------------------------------------------------------- -DeviceChooser::View::View(QWidget *parent) - : TabWidget(parent, "device_view") +DeviceChooser::View::View(TQWidget *tqparent) + : TabWidget(tqparent, "device_view") { // Information _info = new Browser(this); _info->setMimeSourceFactory(&_msf); insertTab(_info, i18n("Information")); - connect(_info, SIGNAL(deviceChanged(const QString &)), - SIGNAL(deviceChanged(const QString &))); + connect(_info, TQT_SIGNAL(deviceChanged(const TQString &)), + TQT_SIGNAL(deviceChanged(const TQString &))); // Memory Map _memory = new Browser(this); @@ -418,24 +418,24 @@ DeviceChooser::View::View(QWidget *parent) insertTab(_pins, i18n("Pin Diagrams")); } -void DeviceChooser::View::setDevice(const QString &name, bool cannotChangeDevice) +void DeviceChooser::View::setDevice(const TQString &name, bool cannotChangeDevice) { const Device::Data *data = Device::lister().data(name); if ( data==0 ) return; - QString doc = htmlInfo(*data, (cannotChangeDevice ? QString::null : "device:%1"), Device::documentHtml(*data)); + TQString doc = htmlInfo(*data, (cannotChangeDevice ? TQString() : "device:%1"), Device::documentHtml(*data)); doc += Device::supportedHtmlInfo(*data); _info->setText("" + doc + ""); - doc = htmlVoltageFrequencyGraphs(*data, QString::null, &_msf); - QPixmap pix = data->group().memoryGraph(*data); - QString label = data->name() + "_memory_map.png"; + doc = htmlVoltageFrequencyGraphs(*data, TQString(), &_msf); + TQPixmap pix = data->group().memoryGraph(*data); + TQString label = data->name() + "_memory_map.png"; _msf.setPixmap(label, pix); _memory->setText(""); _vfg->setText("" + doc + ""); - doc = htmlPinDiagrams(*data, QString::null, &_msf); + doc = htmlPinDiagrams(*data, TQString(), &_msf); _pins->setText("" + doc + ""); } -void DeviceChooser::View::setText(const QString &text) +void DeviceChooser::View::setText(const TQString &text) { _info->setText(text); _vfg->setText(text); @@ -450,14 +450,14 @@ void DeviceChooser::View::clear() } //----------------------------------------------------------------------------- -DeviceChooser::Editor::Editor(const QString &title, const QString &tag, QWidget *widget) +DeviceChooser::Editor::Editor(const TQString &title, const TQString &tag, TQWidget *widget) : DeviceEditor(title, tag, widget, "device_view_editor") {} -QWidget *DeviceChooser::Editor::createView(const Device::Data *, QWidget *parent) +TQWidget *DeviceChooser::Editor::createView(const Device::Data *, TQWidget *tqparent) { - DeviceChooser::View *view = new DeviceChooser::View(parent); - connect(view, SIGNAL(deviceChanged(const QString &)), SIGNAL(deviceChanged(const QString &))); + DeviceChooser::View *view = new DeviceChooser::View(tqparent); + connect(view, TQT_SIGNAL(deviceChanged(const TQString &)), TQT_SIGNAL(deviceChanged(const TQString &))); view->setDevice(_device, true); return view; } diff --git a/src/libgui/device_gui.h b/src/libgui/device_gui.h index a10c58a..53ad04f 100644 --- a/src/libgui/device_gui.h +++ b/src/libgui/device_gui.h @@ -9,11 +9,11 @@ #ifndef DEVICE_GUI_H #define DEVICE_GUI_H -#include -#include -#include -class QListViewItem; -class QCheckBox; +#include +#include +#include +class TQListViewItem; +class TQCheckBox; #include class KListView; @@ -50,22 +50,22 @@ template class EnumComboBox { public: - EnumComboBox(const QString &key, QWidget *parent) : _key(key) { - _combo = new QComboBox(parent); + EnumComboBox(const TQString &key, TQWidget *tqparent) : _key(key) { + _combo = new TQComboBox(tqparent); for (Enum type; typeinsertItem(type.label()); Config config; Enum type = config.readEnumEntry(key, Enum(Enum::Nb_Types)); if ( type!=Enum::Nb_Types ) _combo->setCurrentItem(type.type()); } - EnumComboBox(const QString &emptyLabel, const QString &key, QWidget *parent) : _key(key) { - _combo = new QComboBox(parent); + EnumComboBox(const TQString &emptyLabel, const TQString &key, TQWidget *tqparent) : _key(key) { + _combo = new TQComboBox(tqparent); _combo->insertItem(emptyLabel); for (Enum type; typeinsertItem(type.label()); Config config; Enum type = config.readEnumEntry(key, Enum(Enum::Nb_Types)); if ( type!=Enum::Nb_Types ) _combo->setCurrentItem(type.type()+1); } - QComboBox *combo() { return _combo; } + TQComboBox *combo() { return _combo; } Enum value() const { if ( _combo->count()==Enum::Nb_Types ) return typename Enum::Type(_combo->currentItem()); if ( _combo->currentItem()==0 ) return Enum::Nb_Types; @@ -78,50 +78,52 @@ public: } private: - QString _key; - QComboBox *_combo; + TQString _key; + TQComboBox *_combo; }; //----------------------------------------------------------------------------- class Dialog : public ::Dialog { Q_OBJECT + TQ_OBJECT public: - Dialog(const QString &device, Type type, QWidget *parent); + Dialog(const TQString &device, Type type, TQWidget *tqparent); virtual ~Dialog(); - QString device() const; + TQString device() const; private slots: - void listDoubleClicked(QListViewItem *item); - void currentChanged(QListViewItem *item); - void deviceChange(const QString &device); + void listDoubleClicked(TQListViewItem *item); + void currentChanged(TQListViewItem *item); + void deviceChange(const TQString &device); void updateList(); void resetFilters(); private: bool _withAuto; - KeyComboBox *_programmerCombo, *_toolCombo; + KeyComboBox *_programmerCombo, *_toolCombo; EnumComboBox *_listTypeCombo; EnumComboBox *_memoryCombo; - EnumComboBox *_statusCombo; + EnumComboBox *_statusCombo; EnumComboBox *_featureCombo; KListView *_listView; View *_deviceView; - void updateList(const QString &device); + void updateList(const TQString &device); const Programmer::Group *programmerGroup() const; const Tool::Group *toolGroup() const; }; //----------------------------------------------------------------------------- -class ComboBox : public QComboBox +class ComboBox : public TQComboBox { Q_OBJECT + TQ_OBJECT public: - ComboBox(bool withAuto, QWidget *parent); - void setDevice(const QString &device, const Device::Data *data = 0); - QString device() const; + ComboBox(bool withAuto, TQWidget *tqparent); + void setDevice(const TQString &device, const Device::Data *data = 0); + TQString device() const; bool withAuto() const { return _withAuto; } private: @@ -129,13 +131,14 @@ private: }; //----------------------------------------------------------------------------- -class Button : public QWidget +class Button : public TQWidget { Q_OBJECT + TQ_OBJECT public: - Button(bool withAuto, QWidget *parent); - void setDevice(const QString &device) { _combo->setDevice(device); } - QString device() const { return _combo->device(); } + Button(bool withAuto, TQWidget *tqparent); + void setDevice(const TQString &device) { _combo->setDevice(device); } + TQString device() const { return _combo->device(); } signals: void changed(); @@ -151,31 +154,33 @@ private: class Browser : public KTextBrowser { Q_OBJECT + TQ_OBJECT public: - Browser(QWidget *parent); + Browser(TQWidget *tqparent); signals: - void deviceChanged(const QString &device); + void deviceChanged(const TQString &device); public slots: - virtual void setSource(const QString &name); + virtual void setSource(const TQString &name); }; //----------------------------------------------------------------------------- class View : public TabWidget { Q_OBJECT + TQ_OBJECT public: - View(QWidget *parent); + View(TQWidget *tqparent); void clear(); - void setText(const QString &text); - void setDevice(const QString &name, bool cannotChangeDevice); + void setText(const TQString &text); + void setDevice(const TQString &name, bool cannotChangeDevice); signals: - void deviceChanged(const QString &device); + void deviceChanged(const TQString &device); private: - QMimeSourceFactory _msf; + TQMimeSourceFactory _msf; Browser *_info, *_memory, *_vfg, *_pins; }; @@ -183,8 +188,9 @@ private: class Editor : public DeviceEditor { Q_OBJECT + TQ_OBJECT public: - Editor(const QString &title, const QString &tag, QWidget *parent); + Editor(const TQString &title, const TQString &tag, TQWidget *tqparent); virtual bool isModified() const { return false; } virtual bool isReadOnly() const { return true; } virtual void addGui() {} @@ -192,10 +198,10 @@ public: virtual void setFocus() {} signals: - void deviceChanged(const QString &device); + void deviceChanged(const TQString &device); private: - virtual QWidget *createView(const Device::Data *data, QWidget *parent); + virtual TQWidget *createView(const Device::Data *data, TQWidget *tqparent); virtual void setModifiedInternal(bool) {} virtual void setReadOnlyInternal(bool) {} }; diff --git a/src/libgui/editor.cpp b/src/libgui/editor.cpp index c64d98f..1bbacb2 100644 --- a/src/libgui/editor.cpp +++ b/src/libgui/editor.cpp @@ -13,17 +13,17 @@ #include "common/gui/purl_gui.h" #include "common/gui/misc_gui.h" -Editor::Editor(const QString &title, const QString &tag, QWidget *parent, const char *name) - : QWidget(parent, name), _title(title), _tag(tag) +Editor::Editor(const TQString &title, const TQString &tag, TQWidget *tqparent, const char *name) + : TQWidget(tqparent, name), _title(title), _tag(tag) {} -Editor::Editor(QWidget *parent, const char *name) - : QWidget(parent, name) +Editor::Editor(TQWidget *tqparent, const char *name) + : TQWidget(tqparent, name) {} -QSizePolicy Editor::sizePolicy() const +TQSizePolicy Editor::sizePolicy() const { - return QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); + return TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); } void Editor::setModified(bool m) @@ -49,7 +49,7 @@ bool Editor::save() bool Editor::saveAs() { - QString filter = PURL::filter(fileType()); + TQString filter = PURL::filter(fileType()); PURL::Url purl = PURL::getSaveUrl(":save_file_as", filter, this, i18n("Save File"), PURL::AskOverwrite); if ( purl.isEmpty() ) return false; if ( !save(purl) ) return false; @@ -69,7 +69,7 @@ bool Editor::slotLoad() return true; } -QString Editor::filename() const +TQString Editor::filename() const { return (url().isEmpty() ? "<" + _title + ">" : "\"" + url().filepath() + "\""); } @@ -77,7 +77,7 @@ QString Editor::filename() const bool Editor::checkSaved() { if ( !isModified() ) return true; - MessageBox::Result res = MessageBox::questionYesNoCancel(i18n("File %1 not saved.").arg(filename()), + MessageBox::Result res = MessageBox::questionYesNoCancel(i18n("File %1 not saved.").tqarg(filename()), KStdGuiItem::save(), KStdGuiItem::discard()); if ( res==MessageBox::Cancel ) return false; if ( res==MessageBox::Yes ) save(); diff --git a/src/libgui/editor.h b/src/libgui/editor.h index 9247c80..1a4c54d 100644 --- a/src/libgui/editor.h +++ b/src/libgui/editor.h @@ -9,28 +9,29 @@ #ifndef EDITOR_H #define EDITOR_H -#include -#include -#include +#include +#include +#include #include "common/common/qflags.h" #include class KPopupMenu; #include "common/global/purl.h" -class Editor : public QWidget +class Editor : public TQWidget { Q_OBJECT + TQ_OBJECT public: - Editor(const QString &title, const QString &tag, QWidget *parent, const char *name); - Editor(QWidget *parent, const char *name); - virtual QSizePolicy sizePolicy() const; + Editor(const TQString &title, const TQString &tag, TQWidget *tqparent, const char *name); + Editor(TQWidget *tqparent, const char *name); + virtual TQSizePolicy sizePolicy() const; virtual PURL::FileType fileType() const = 0; virtual bool isModified() const = 0; void setModified(bool modified); virtual PURL::Url url() const = 0; - QString name() const { return _title; } - QString tag() const { return _tag; } + TQString name() const { return _title; } + TQString tag() const { return _tag; } void setReadOnly(bool readOnly); virtual bool isReadOnly() const = 0; bool checkSaved(); @@ -40,8 +41,8 @@ public: virtual bool save(const PURL::Url &url) = 0; virtual void addGui() = 0; virtual void removeGui() = 0; - virtual QValueList bookmarkLines() const = 0; - virtual void setBookmarkLines(const QValueList &lines) = 0; + virtual TQValueList bookmarkLines() const = 0; + virtual void setBookmarkLines(const TQValueList &lines) = 0; public slots: bool slotLoad(); @@ -53,16 +54,16 @@ public slots: signals: void modified(); void guiChanged(); - void statusTextChanged(const QString &text); - void dropEventPass(QDropEvent *e); + void statusTextChanged(const TQString &text); + void dropEventPass(TQDropEvent *e); protected: - QString filename() const; + TQString filename() const; virtual void setModifiedInternal(bool modified) = 0; virtual void setReadOnlyInternal(bool readOnly) = 0; private: - QString _title, _tag; + TQString _title, _tag; }; #endif diff --git a/src/libgui/editor_manager.cpp b/src/libgui/editor_manager.cpp index 2a42554..a9d6a24 100644 --- a/src/libgui/editor_manager.cpp +++ b/src/libgui/editor_manager.cpp @@ -9,9 +9,9 @@ ***************************************************************************/ #include "editor_manager.h" -#include -#include -#include +#include +#include +#include #include #include @@ -33,43 +33,43 @@ #include "project.h" //----------------------------------------------------------------------------- -SwitchToDialog::SwitchToDialog(const QStringList &names, QWidget *parent) - : Dialog(parent, "switch_to_dialog", true, i18n("Switch to editor"), Ok | Cancel, Ok, false) +SwitchToDialog::SwitchToDialog(const TQStringList &names, TQWidget *tqparent) + : Dialog(tqparent, "switch_to_dialog", true, i18n("Switch to editor"), Ok | Cancel, Ok, false) { - QVBoxLayout *top = new QVBoxLayout(mainWidget(), 10, 10); + TQVBoxLayout *top = new TQVBoxLayout(mainWidget(), 10, 10); _edit = new KLineEdit(mainWidget()); _edit->setCompletedItems(names); top->addWidget(_edit); } //----------------------------------------------------------------------------- -void EditorTabBar::paintLabel(QPainter *p, const QRect &br, QTab *t, bool has_focus) const +void EditorTabBar::paintLabel(TQPainter *p, const TQRect &br, TQTab *t, bool has_focus) const { - QFont f = p->font(); + TQFont f = p->font(); f.setItalic(_readOnly[t]); p->setFont(f); - QTabBar::paintLabel(p, br, t, has_focus); + TQTabBar::paintLabel(p, br, t, has_focus); } //----------------------------------------------------------------------------- -QString EditorHistory::goBack() +TQString EditorHistory::goBack() { - if ( !hasBack() ) return QString::null; + if ( !hasBack() ) return TQString(); _current--; return _names[_current]; } -QString EditorHistory::goForward() +TQString EditorHistory::goForward() { - if ( !hasForward() ) return QString::null; + if ( !hasForward() ) return TQString(); _current++; return _names[_current]; } -void EditorHistory::add(const QString &name) +void EditorHistory::add(const TQString &name) { if ( _names.count()!=0 ) { - _current = QMIN(_current, _names.count()-1); + _current = TQMIN(_current, _names.count()-1); if ( _names[_current]==name ) return; if ( _current!=0 && _names[_current-1]==name ) { _current--; @@ -92,11 +92,11 @@ void EditorHistory::closedLast() //----------------------------------------------------------------------------- const char * const EditorManager::EDITOR_TAGS[Nb_EditorTypes] = { "device", "registers" }; -EditorManager::EditorManager(QWidget *parent) - : TabWidget(parent, "editor_manager"), _current(0) +EditorManager::EditorManager(TQWidget *tqparent) + : TabWidget(tqparent, "editor_manager"), _current(0) { setTabBar(new EditorTabBar(this)); - connect(this, SIGNAL(currentChanged(QWidget *)), SLOT(showEditor(QWidget *))); + connect(this, TQT_SIGNAL(currentChanged(TQWidget *)), TQT_SLOT(showEditor(TQWidget *))); setHoverCloseButton(readConfigEntry(BaseGlobalConfig::ShowTabCloseButton).toBool()); setHoverCloseButtonDelayed(false); } @@ -106,7 +106,7 @@ bool EditorManager::openFile(const PURL::Url &url) if ( url.isEmpty() ) return false; Editor *e = findEditor(url); if (e) { // document already loaded - if ( !MessageBox::askContinue(i18n("File \"%1\" already loaded. Reload?").arg(url.kurl().prettyURL()), + if ( !MessageBox::askContinue(i18n("File \"%1\" already loaded. Reload?").tqarg(url.kurl().prettyURL()), i18n("Warning"), i18n("Reload")) ) return true; if ( !e->slotLoad() ) { closeEditor(e, false); @@ -127,10 +127,10 @@ void EditorManager::connectEditor(Editor *editor) disconnectEditor(currentEditor()); if ( editor==0 ) return; editor->addGui(); - connect(editor, SIGNAL(modified()), SLOT(modifiedSlot())); - connect(editor, SIGNAL(guiChanged()), SIGNAL(guiChanged())); - connect(editor, SIGNAL(dropEventPass(QDropEvent *)), SLOT(slotDropEvent(QDropEvent *))); - connect(editor, SIGNAL(statusTextChanged(const QString &)), SIGNAL(statusChanged(const QString &))); + connect(editor, TQT_SIGNAL(modified()), TQT_SLOT(modifiedSlot())); + connect(editor, TQT_SIGNAL(guiChanged()), TQT_SIGNAL(guiChanged())); + connect(editor, TQT_SIGNAL(dropEventPass(TQDropEvent *)), TQT_SLOT(slotDropEvent(TQDropEvent *))); + connect(editor, TQT_SIGNAL(statusTextChanged(const TQString &)), TQT_SIGNAL(statusChanged(const TQString &))); } void EditorManager::modifiedSlot() @@ -145,7 +145,7 @@ void EditorManager::disconnectEditor(Editor *editor) editor->removeGui(); } -QString EditorManager::title(const Editor &e) const +TQString EditorManager::title(const Editor &e) const { return (e.url().isEmpty() ? "<" + e.name() + ">" : e.url().filename()); } @@ -153,15 +153,15 @@ QString EditorManager::title(const Editor &e) const void EditorManager::updateTitles() { KIconLoader loader; - QPixmap def = loader.loadIcon("piklab", KIcon::Small); - QPixmap modified = loader.loadIcon("filesave", KIcon::Small); - QPixmap chip = loader.loadIcon("piklab_chip", KIcon::Small); - QValueList::iterator it = _editors.begin(); + TQPixmap def = loader.loadIcon("piklab", KIcon::Small); + TQPixmap modified = loader.loadIcon("filesave", KIcon::Small); + TQPixmap chip = loader.loadIcon("piklab_chip", KIcon::Small); + TQValueList::iterator it = _editors.begin(); for (; it!=_editors.end(); ++it) { static_cast(tabBar())->setReadOnly(indexOf(*it), (*it)->isReadOnly()); - QPixmap pixmap; + TQPixmap pixmap; if ( (*it)->isModified() ) pixmap = modified; - else if ( ::qt_cast< ::DeviceEditor *>(*it)==0 ) pixmap = PURL::icon((*it)->fileType()); + else if ( ::tqqt_cast< ::DeviceEditor *>(*it)==0 ) pixmap = PURL::icon((*it)->fileType()); else pixmap = chip; changeTab(*it, pixmap.isNull() ? def : pixmap, title(**it)); } @@ -186,9 +186,9 @@ bool EditorManager::closeAllEditors() bool EditorManager::closeAllOtherEditors() { if ( nbEditors()==1 ) return true; - QValueList list = _editors; + TQValueList list = _editors; list.remove(currentEditor()); - QValueList::iterator it = list.begin(); + TQValueList::iterator it = list.begin(); bool ok = true; for (; it!=list.end(); ++it) { if ( !closeEditor(*it, true) ) { @@ -231,14 +231,14 @@ bool EditorManager::closeEditor(Editor *e, bool ask) void EditorManager::saveBookmarks(const Editor &e) { if ( Main::project()==0 ) return; - QValueList lines = e.bookmarkLines(); + TQValueList lines = e.bookmarkLines(); Main::project()->setBookmarkLines(e.url(), lines); } void EditorManager::restoreBookmarks(Editor &e) { if ( Main::project()==0 ) return; - QValueList lines = Main::project()->bookmarkLines(e.url()); + TQValueList lines = Main::project()->bookmarkLines(e.url()); e.setBookmarkLines(lines); } @@ -260,21 +260,21 @@ void EditorManager::changeToEditor(Editor *e) e->statusChanged(); _history.add(name(*e)); } else { - emit statusChanged(QString::null); + emit statusChanged(TQString()); _history.closedLast(); } } -Editor *EditorManager::findEditor(const QString &tag) +Editor *EditorManager::findEditor(const TQString &tag) { - QValueList::iterator it = _editors.begin(); + TQValueList::iterator it = _editors.begin(); for (; it!=_editors.end(); ++it) if ( (*it)->tag()==tag ) return *it; return 0; } Editor *EditorManager::findEditor(const PURL::Url &url) { - QValueList::iterator it = _editors.begin(); + TQValueList::iterator it = _editors.begin(); for (; it!=_editors.end(); ++it) if ( (*it)->url()==url ) return *it; return 0; } @@ -334,20 +334,20 @@ Editor *EditorManager::createEditor(PURL::FileType type, const PURL::Url &url) void EditorManager::addEditor(Editor *e) { - QValueList::iterator it = _editors.begin(); + TQValueList::iterator it = _editors.begin(); for (; it!=_editors.end(); ++it) if ( *it==e ) return; _editors.append(e); - addTab(e, QString::null); + addTab(e, TQString()); setTabEnabled(e, true); restoreBookmarks(*e); showEditor(e); } -void EditorManager::slotDropEvent(QDropEvent *event) +void EditorManager::slotDropEvent(TQDropEvent *event) { - QStringList urls; - if ( !QUriDrag::decodeLocalFiles(event, urls)) return; - QStringList::const_iterator it = urls.begin(); + TQStringList urls; + if ( !TQUriDrag::decodeLocalFiles(event, urls)) return; + TQStringList::const_iterator it = urls.begin(); for(; it!=urls.end(); ++it) openEditor(PURL::Url::fromPathOrUrl(*it)); } @@ -368,7 +368,7 @@ Editor *EditorManager::openEditor(const PURL::Url &url) void EditorManager::saveAllFiles() { - QValueList::iterator it = _editors.begin(); + TQValueList::iterator it = _editors.begin(); for (; it!=_editors.end(); ++it) { if ( !(*it)->isModified() ) continue; (*it)->save(); @@ -379,7 +379,7 @@ void EditorManager::saveAllFiles() PURL::UrlList EditorManager::files() const { PURL::UrlList names; - QValueList::const_iterator it = _editors.begin(); + TQValueList::const_iterator it = _editors.begin(); for(; it!=_editors.end(); ++it) { if ( (*it)->url().isEmpty() ) continue; names.push_back((*it)->url()); @@ -387,16 +387,16 @@ PURL::UrlList EditorManager::files() const return names; } -void EditorManager::contextMenu(int i, const QPoint &p) +void EditorManager::contextMenu(int i, const TQPoint &p) { Editor *editor = static_cast(page(i)); if ( editor==0 ) return; KIconLoader loader; - QPixmap closeIcon = loader.loadIcon("fileclose", KIcon::Small); - QPixmap saveIcon = loader.loadIcon("filesave", KIcon::Small); - QPixmap saveAsIcon = loader.loadIcon("filesaveas", KIcon::Small); - QPixmap reloadIcon = loader.loadIcon("reload", KIcon::Small); + TQPixmap closeIcon = loader.loadIcon("fileclose", KIcon::Small); + TQPixmap saveIcon = loader.loadIcon("filesave", KIcon::Small); + TQPixmap saveAsIcon = loader.loadIcon("filesaveas", KIcon::Small); + TQPixmap reloadIcon = loader.loadIcon("reload", KIcon::Small); KPopupMenu *popup = new KPopupMenu; popup->insertTitle(title(*editor)); popup->insertItem(closeIcon, i18n("Close"), 1); @@ -434,18 +434,18 @@ void EditorManager::switchHeaderImplementation() void EditorManager::switchToEditor() { - QStringList names; + TQStringList names; for (uint i=0; i<_editors.count(); i++) names.append(title(*_editors[i])); SwitchToDialog dialog(names, this); - if ( dialog.exec()!=QDialog::Accepted ) return; + if ( dialog.exec()!=TQDialog::Accepted ) return; for (uint i=0; i(Debugger::manager)->addRegisterView(*static_cast(e)); created = true; diff --git a/src/libgui/editor_manager.h b/src/libgui/editor_manager.h index 0d180b9..8c5f626 100644 --- a/src/libgui/editor_manager.h +++ b/src/libgui/editor_manager.h @@ -10,7 +10,7 @@ #ifndef EDITOR_MANAGER_H #define EDITOR_MANAGER_H -class QEvent; +class TQEvent; #include #include #include @@ -23,9 +23,10 @@ class QEvent; class SwitchToDialog : public Dialog { Q_OBJECT + TQ_OBJECT public: - SwitchToDialog(const QStringList &names, QWidget *parent); - QString name() const { return _edit->text(); } + SwitchToDialog(const TQStringList &names, TQWidget *tqparent); + TQString name() const { return _edit->text(); } private: KLineEdit *_edit; @@ -35,13 +36,14 @@ private: class EditorTabBar : public TabBar { Q_OBJECT + TQ_OBJECT public: - EditorTabBar(QWidget *parent) : TabBar(parent, "editor_tab_bar") {} + EditorTabBar(TQWidget *tqparent) : TabBar(tqparent, "editor_tab_bar") {} void setReadOnly(uint index, bool readOnly) { _readOnly[tabAt(index)] = readOnly; } private: - QMap _readOnly; - virtual void paintLabel(QPainter *p, const QRect &br, QTab *t, bool has_focus) const; + TQMap _readOnly; + virtual void paintLabel(TQPainter *p, const TQRect &br, TQTab *t, bool has_focus) const; }; //----------------------------------------------------------------------------- @@ -51,31 +53,32 @@ public: EditorHistory() : _current(0) {} bool hasBack() const { return _current!=0; } bool hasForward() const { return (_current+1)<_names.count(); } - void add(const QString &name); + void add(const TQString &name); void closedLast(); - QString goBack(); - QString goForward(); + TQString goBack(); + TQString goForward(); private: uint _current; - QValueVector _names; + TQValueVector _names; }; //----------------------------------------------------------------------------- class EditorManager : public TabWidget { Q_OBJECT + TQ_OBJECT public: - EditorManager(QWidget *parent); + EditorManager(TQWidget *tqparent); PURL::UrlList files() const; - QValueList &editors() { return _editors; } + TQValueList &editors() { return _editors; } uint nbEditors() const { return _editors.count(); } Editor *createEditor(PURL::FileType type, const PURL::Url &url); void addEditor(Editor *e); Editor *currentEditor() const { return _current; } Editor *findEditor(const PURL::Url &file); - Editor *findEditor(const QString &tag); + Editor *findEditor(const TQString &tag); void showEditor(Editor *e); bool closeEditor(const PURL::Url &url); bool closeEditor(Editor *e, bool ask); @@ -89,7 +92,7 @@ public: public slots: void updateTitles(); - void slotDropEvent(QDropEvent *e); + void slotDropEvent(TQDropEvent *e); void saveAllFiles(); bool closeCurrentEditor(); bool closeAllEditors(); @@ -102,25 +105,25 @@ public slots: signals: void modified(const PURL::Url &url); void guiChanged(); - void statusChanged(const QString &); + void statusChanged(const TQString &); private: void changeToEditor(Editor *e); void enableActions(bool enable); - QString title(const Editor &e) const; - QString name(const Editor &e) const; - virtual void contextMenu(int i, const QPoint &p); + TQString title(const Editor &e) const; + TQString name(const Editor &e) const; + virtual void contextMenu(int i, const TQPoint &p); void saveBookmarks(const Editor &e); void restoreBookmarks(Editor &e); private slots: - void showEditor(QWidget *w) { showEditor(static_cast(w)); } + void showEditor(TQWidget *w) { showEditor(static_cast(w)); } void closeRequest(int i); void modifiedSlot(); private: Editor *_current; - QValueList _editors; + TQValueList _editors; EditorHistory _history; static const char * const EDITOR_TAGS[Nb_EditorTypes]; }; diff --git a/src/libgui/global_config.cpp b/src/libgui/global_config.cpp index 8424450..8d246fc 100644 --- a/src/libgui/global_config.cpp +++ b/src/libgui/global_config.cpp @@ -17,30 +17,30 @@ #include "tools/list/tool_list.h" const BaseGlobalConfig::Data BaseGlobalConfig::DATA[Nb_Types] = { - { "auto_rebuild_modified", I18N_NOOP("Automatically rebuild project before programming if it is modified."), QVariant(true, 0) }, - { "program_after_build", I18N_NOOP("Program device after successful build."), QVariant(false, 0) }, - { "user_id_set_to_checksum", I18N_NOOP("Set User Ids to unprotected checksum (if User Ids are empty)."), QVariant(false, 0) }, - { "show_tab_close_buttons", I18N_NOOP("Show close buttons on tabs (need restart to take effect)."), QVariant(true, 0) } + { "auto_rebuild_modified", I18N_NOOP("Automatically rebuild project before programming if it is modified."), TQVariant(true, 0) }, + { "program_after_build", I18N_NOOP("Program device after successful build."), TQVariant(false, 0) }, + { "user_id_set_to_checksum", I18N_NOOP("Set User Ids to unprotected checksum (if User Ids are empty)."), TQVariant(false, 0) }, + { "show_tab_close_buttons", I18N_NOOP("Show close buttons on tabs (need restart to take effect)."), TQVariant(true, 0) } }; PURL::Url GlobalConfig::openedProject() { - GenericConfig config(QString::null); - return PURL::Url::fromPathOrUrl(config.readEntry("project", QString::null)); + GenericConfig config(TQString::null); + return PURL::Url::fromPathOrUrl(config.readEntry("project", TQString::null)); } void GlobalConfig::writeOpenedProject(const PURL::Url &p) { - GenericConfig config(QString::null); + GenericConfig config(TQString::null); config.writeEntry("project", p.filepath()); } PURL::UrlList GlobalConfig::openedFiles() { - GenericConfig config(QString::null); + GenericConfig config(TQString::null); PURL::UrlList files; uint i = 0; for (;;) { - QString file = config.readEntry(QString("file%1").arg(i), QString::null); + TQString file = config.readEntry(TQString("file%1").tqarg(i), TQString::null); if ( file.isEmpty() ) break; files += PURL::Url::fromPathOrUrl(file); i++; @@ -49,22 +49,22 @@ PURL::UrlList GlobalConfig::openedFiles() } void GlobalConfig::writeOpenedFiles(const PURL::UrlList &files) { - GenericConfig config(QString::null); + GenericConfig config(TQString::null); for (uint i=0; i<=files.count(); i++) { - QString s = (i==files.count() ? QString::null : files[i].filepath()); - config.writeEntry(QString("file%1").arg(i), s); + TQString s = (i==files.count() ? TQString::null : files[i].filepath()); + config.writeEntry(TQString("file%1").tqarg(i), s); } } void GlobalConfig::writeProgrammerGroup(const Programmer::Group &group) { - GenericConfig config(QString::null); + GenericConfig config(TQString::null); config.writeEntry("programmer", group.name()); } const Programmer::Group &GlobalConfig::programmerGroup() { - GenericConfig config(QString::null); - QString s = config.readEntry("programmer"); + GenericConfig config(TQString::null); + TQString s = config.readEntry("programmer"); const Programmer::Group *group = Programmer::lister().group(s); if ( group==0 ) return *Programmer::lister().begin().data(); return *group; @@ -72,23 +72,23 @@ const Programmer::Group &GlobalConfig::programmerGroup() void GlobalConfig::writeDebugLevel(Log::DebugLevel level) { - GenericConfig config(QString::null); + GenericConfig config(TQString::null); config.writeEnumEntry("log_debug_level", level); } Log::DebugLevel GlobalConfig::debugLevel() { - GenericConfig config(QString::null); + GenericConfig config(TQString::null); return config.readEnumEntry("log_debug_level", Log::DebugLevel::Normal); } void GlobalConfig::writeLogOutputType(Log::OutputType type) { - GenericConfig config(QString::null); + GenericConfig config(TQString::null); config.writeEntry("log_output_type", type); } Log::OutputType GlobalConfig::logOutputType() { - GenericConfig config(QString::null); + GenericConfig config(TQString::null); uint output = config.readUIntEntry("log_output_type", Log::GuiOnly); if ( output>=Log::Nb_OutputTypes ) return Log::GuiOnly; return Log::OutputType(output); @@ -96,11 +96,11 @@ Log::OutputType GlobalConfig::logOutputType() void GlobalConfig::writeShowLineNumbers(bool show) { - GenericConfig config(QString::null); + GenericConfig config(TQString::null); config.writeEntry("show_line_numbers", show); } bool GlobalConfig::showLineNumbers() { - GenericConfig config(QString::null); + GenericConfig config(TQString::null); return config.readBoolEntry("show_line_numbers", false); } diff --git a/src/libgui/gui_debug_manager.cpp b/src/libgui/gui_debug_manager.cpp index adda68a..fdf0979 100644 --- a/src/libgui/gui_debug_manager.cpp +++ b/src/libgui/gui_debug_manager.cpp @@ -25,8 +25,8 @@ bool Debugger::GuiManager::addEditor(Editor &editor) { - if ( _editors.find(&editor)!=_editors.end() ) return false; - connect(&editor, SIGNAL(destroyed()), SLOT(editorDestroyed())); + if ( _editors.tqfind(&editor)!=_editors.end() ) return false; + connect(&editor, TQT_SIGNAL(destroyed()), TQT_SLOT(editorDestroyed())); _editors.append(&editor); return true; } @@ -45,14 +45,14 @@ void Debugger::GuiManager::addTextEditor(TextEditor &editor) void Debugger::GuiManager::clearEditors() { - QValueList::iterator it = _editors.begin(); + TQValueList::iterator it = _editors.begin(); for (; it!=_editors.end(); ++it) (*it)->disconnect(this); _editors.clear(); } void Debugger::GuiManager::editorDestroyed() { - QValueList::iterator it = _editors.begin(); + TQValueList::iterator it = _editors.begin(); for (; it!=_editors.end(); ++it) { if ( (*it)!=sender() ) continue; _editors.remove(it); @@ -74,7 +74,7 @@ PURL::Url Debugger::GuiManager::coffUrl() const bool Debugger::GuiManager::internalInit() { if ( !Manager::internalInit() ) return false; - if ( !Main::projectManager().contains(coffUrl()) ) + if ( !Main::projectManager().tqcontains(coffUrl()) ) Main::projectManager().addExternalFile(coffUrl(), ProjectManager::Generated); Main::watchView().init(true); if ( registerView() ) registerView()->view()->updateView(); @@ -93,7 +93,7 @@ Breakpoint::Data Debugger::GuiManager::currentBreakpointData() { const Breakpoint::Data *data = Main::breakpointsView().currentData(); if (data) return *data; - TextEditor *editor = ::qt_cast(Main::currentEditor()); + TextEditor *editor = ::tqqt_cast(Main::currentEditor()); Q_ASSERT(editor); return Breakpoint::Data(editor->url(), editor->cursorLine()); } @@ -105,7 +105,7 @@ void Debugger::GuiManager::toggleBreakpoint() return; } Breakpoint::Data data = currentBreakpointData(); - if ( Breakpoint::list().contains(data) ) { + if ( Breakpoint::list().tqcontains(data) ) { Breakpoint::list().remove(data); return; } @@ -148,7 +148,7 @@ void Debugger::GuiManager::updateEditorMarks(TextEditor &editor) const } // update pc if ( _coff && programmer() && programmer()->isActive() && pc().isInitialized() && !reached - && _currentSourceLines.contains(editor.url()) ) { + && _currentSourceLines.tqcontains(editor.url()) ) { int pcline = _currentSourceLines[editor.url()]; if ( programmer()->state()==Programmer::Halted ) editor.setMark(pcline, Breakpoint::ProgramCounterActive); else editor.setMark(pcline, Breakpoint::ProgramCounterDisabled); @@ -181,12 +181,12 @@ void Debugger::GuiManager::updateView(bool gotoPC) { Main::breakpointsView().updateView(); bool currentHasPC = false; - QValueList::iterator ite; + TQValueList::iterator ite; for (ite=_editors.begin(); ite!=_editors.end(); ++ite) { - TextEditor *e = ::qt_cast(*ite); + TextEditor *e = ::tqqt_cast(*ite); if ( e==0 ) continue; updateEditorMarks(*e); - if ( !_currentSourceLines.contains(e->url()) ) continue; + if ( !_currentSourceLines.tqcontains(e->url()) ) continue; if (gotoPC) e->setCursor(_currentSourceLines[e->url()], 0); if ( e==Main::currentEditor() ) currentHasPC = true; } @@ -195,16 +195,16 @@ void Debugger::GuiManager::updateView(bool gotoPC) // 2: look at files inside project // 3: look at existing files for (uint i=0; i<3; i++) { - QMap::const_iterator it; + TQMap::const_iterator it; for (it=_currentSourceLines.begin(); it!=_currentSourceLines.end(); ++it) { switch (i) { - case 0: if ( !Main::projectManager().contains(it.key()) || Main::projectManager().isExternalFile(it.key()) ) continue; break; - case 1: if ( !Main::projectManager().contains(it.key()) ) continue; break; + case 0: if ( !Main::projectManager().tqcontains(it.key()) || Main::projectManager().isExternalFile(it.key()) ) continue; break; + case 1: if ( !Main::projectManager().tqcontains(it.key()) ) continue; break; case 2: if ( !it.key().exists() ) continue; break; } - TextEditor *e = ::qt_cast(Main::editorManager().findEditor(it.key())); + TextEditor *e = ::tqqt_cast(Main::editorManager().findEditor(it.key())); if ( e==0 ) { - if (gotoPC) e = ::qt_cast(Main::editorManager().openEditor(it.key())); + if (gotoPC) e = ::tqqt_cast(Main::editorManager().openEditor(it.key())); if ( e==0 ) continue; } updateEditorMarks(*e); @@ -219,9 +219,9 @@ void Debugger::GuiManager::updateView(bool gotoPC) Register::MainView *Debugger::GuiManager::registerView() const { - QValueList::const_iterator it = _editors.begin(); + TQValueList::const_iterator it = _editors.begin(); for (; it!=_editors.end(); ++it) { - Register::MainView *rv = ::qt_cast(*it); + Register::MainView *rv = ::tqqt_cast(*it); if (rv) return rv; } return 0; @@ -229,21 +229,21 @@ Register::MainView *Debugger::GuiManager::registerView() const bool Debugger::GuiManager::isProjectSource(const PURL::Url &url) const { - return ( Main::projectManager().contains(url) && !Main::projectManager().isExternalFile(url) ); + return ( Main::projectManager().tqcontains(url) && !Main::projectManager().isExternalFile(url) ); } void Debugger::GuiManager::showDisassemblyLocation() { - TextEditor *editor = ::qt_cast(Main::currentEditor()); + TextEditor *editor = ::tqqt_cast(Main::currentEditor()); Q_ASSERT(editor); Q_ASSERT(_coff); - QValueVector
addresses = _coff->addresses(editor->url(), editor->cursorLine()); + TQValueVector
addresses = _coff->addresses(editor->url(), editor->cursorLine()); if ( addresses.isEmpty() ) { MessageBox::sorry(i18n("Cannot show disassembly location for non-code line."), Log::Show); return; } int line = _coff->lineForAddress(_coff->url(), addresses[0]); if ( line==-1 ) return; // possible ? - TextEditor *e = ::qt_cast(Main::editorManager().openEditor(_coff->url())); + TextEditor *e = ::tqqt_cast(Main::editorManager().openEditor(_coff->url())); if (e) e->setCursor(line, 0); } diff --git a/src/libgui/gui_debug_manager.h b/src/libgui/gui_debug_manager.h index 661f86a..c391c76 100644 --- a/src/libgui/gui_debug_manager.h +++ b/src/libgui/gui_debug_manager.h @@ -20,6 +20,7 @@ namespace Debugger class GuiManager : public Manager { Q_OBJECT + TQ_OBJECT public: GuiManager() {} virtual void updateDevice(); @@ -39,7 +40,7 @@ private slots: void editorDestroyed(); private: - QValueList _editors; + TQValueList _editors; static Breakpoint::Data currentBreakpointData(); void updateEditorMarks(TextEditor &editor) const; // return PC line diff --git a/src/libgui/gui_prog_manager.h b/src/libgui/gui_prog_manager.h index b19186e..b4e267d 100644 --- a/src/libgui/gui_prog_manager.h +++ b/src/libgui/gui_prog_manager.h @@ -17,8 +17,9 @@ namespace Programmer class GuiManager : public Manager { Q_OBJECT + TQ_OBJECT public: - GuiManager(QObject *parent) : Manager(parent) {} + GuiManager(TQObject *tqparent) : Manager(tqparent) {} virtual void createProgrammer(const Device::Data *data); virtual void setState(State state) { Main::setState(state==Idle ? Main::Idle : Main::Programming); } diff --git a/src/libgui/hex_editor.cpp b/src/libgui/hex_editor.cpp index 48ad7e8..197eb83 100644 --- a/src/libgui/hex_editor.cpp +++ b/src/libgui/hex_editor.cpp @@ -9,14 +9,14 @@ ***************************************************************************/ #include "hex_editor.h" -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -30,13 +30,13 @@ //----------------------------------------------------------------------------- HexEditorPart::HexEditorPart(HexEditor *editor) - : KParts::ReadWritePart(editor, "hex_editor_part") + : KParts::ReadWritePart(TQT_TQOBJECT(editor), "hex_editor_part") { setXMLFile("hexeditorpartui.rc"); - (void)KStdAction::save(editor, SLOT(save()), actionCollection()); - (void)KStdAction::saveAs(editor, SLOT(saveAs()), actionCollection()); - (void)new KToggleAction(i18n("Read Only Mode"), 0, 0, editor, SLOT(toggleReadOnly()), actionCollection(), "tools_toggle_write_lock"); + (void)KStdAction::save(TQT_TQOBJECT(editor), TQT_SLOT(save()), actionCollection()); + (void)KStdAction::saveAs(TQT_TQOBJECT(editor), TQT_SLOT(saveAs()), actionCollection()); + (void)new KToggleAction(i18n("Read Only Mode"), 0, 0, TQT_TQOBJECT(editor), TQT_SLOT(toggleReadOnly()), actionCollection(), "tools_toggle_write_lock"); } void HexEditorPart::setReadWrite(bool rw) @@ -46,14 +46,14 @@ void HexEditorPart::setReadWrite(bool rw) } //----------------------------------------------------------------------------- -HexEditor::HexEditor(const QString &name, QWidget *parent) - : DeviceEditor(name, QString::null, parent, "hex_editor") +HexEditor::HexEditor(const TQString &name, TQWidget *tqparent) + : DeviceEditor(name, TQString(), tqparent, "hex_editor") { init(); } -HexEditor::HexEditor(QWidget *parent) - : DeviceEditor(parent, "hex_editor") +HexEditor::HexEditor(TQWidget *tqparent) + : DeviceEditor(tqparent, "hex_editor") { init(); } @@ -76,18 +76,18 @@ void HexEditor::clear() _originalMemory = 0; } -QWidget *HexEditor::createView(const Device::Data *data, QWidget *parent) +TQWidget *HexEditor::createView(const Device::Data *data, TQWidget *tqparent) { clear(); if (data) { _originalMemory = data->group().createMemory(*data); _memory = data->group().createMemory(*data); } - if ( data==0 ) return new QWidget(parent); - Device::HexView *hv = Device::groupui(*data).createHexView(*this, parent); - connect(hv, SIGNAL(modified()), SLOT(slotModified())); + if ( data==0 ) return new TQWidget(tqparent); + Device::HexView *hv = Device::groupui(*data).createHexView(*this, tqparent); + connect(hv, TQT_SIGNAL(modified()), TQT_SLOT(slotModified())); _dirty = true; - QTimer::singleShot(0, this, SLOT(simpleLoad())); + TQTimer::singleShot(0, this, TQT_SLOT(simpleLoad())); return hv; } @@ -96,10 +96,10 @@ bool HexEditor::simpleLoad() if ( !_dirty ) return true; _dirty = false; if (_memory) { - QStringList warnings; + TQStringList warnings; if ( _memory->fromHexBuffer(_hexBuffer, warnings)!=Device::Memory::NoWarning ) { _labelWarning->setText(i18n("Warning: hex file seems to be incompatible with the selected device %1:
%2") - .arg(_memory->device().name()).arg(warnings.join("
"))); + .tqarg(_memory->device().name()).tqarg(warnings.join("
"))); _labelWarning->show(); } else _labelWarning->hide(); display(); @@ -128,7 +128,7 @@ bool HexEditor::open(const PURL::Url &url) _url = url; PURL::File file(url, Main::compileLog()); if ( !file.openForRead() ) return false; - QStringList errors; + TQStringList errors; if ( !_hexBuffer.load(file.stream(), errors) ) { MessageBox::detailedSorry(i18n("Error(s) reading hex file."), errors.join("\n"), Log::Show); return false; @@ -139,15 +139,15 @@ bool HexEditor::open(const PURL::Url &url) bool HexEditor::save(const PURL::Url &url) { - return save(url, i18n("File URL: \"%1\".").arg(url.pretty())); + return save(url, i18n("File URL: \"%1\".").tqarg(url.pretty())); } -bool HexEditor::save(const PURL::Url &url, const QString &fileErrorString) +bool HexEditor::save(const PURL::Url &url, const TQString &fileErrorString) { PURL::File file(url, Main::compileLog()); if ( !file.openForWrite() ) return false; if ( !_memory->save(file.stream(), HexBuffer::IHX32) ) { - MessageBox::detailedSorry(i18n("Error while writing file \"%1\".").arg(url.pretty()), fileErrorString, Log::Show); + MessageBox::detailedSorry(i18n("Error while writing file \"%1\".").tqarg(url.pretty()), fileErrorString, Log::Show); return false; } _originalMemory->copyFrom(*_memory); @@ -183,10 +183,10 @@ void HexEditor::slotModified() void HexEditor::statusChanged() { - QString s; + TQString s; if (_memory) { BitValue cs = static_cast(_view)->checksum(); - s = i18n("Checksum: %1").arg(toHexLabel(cs, 4)); + s = i18n("Checksum: %1").tqarg(toHexLabel(cs, 4)); } emit statusTextChanged(s); } diff --git a/src/libgui/hex_editor.h b/src/libgui/hex_editor.h index 86b7f2c..9418a59 100644 --- a/src/libgui/hex_editor.h +++ b/src/libgui/hex_editor.h @@ -22,6 +22,7 @@ class HexEditor; class HexEditorPart : public KParts::ReadWritePart { Q_OBJECT + TQ_OBJECT public: HexEditorPart(HexEditor *editor); virtual void setReadWrite(bool readWrite); @@ -35,9 +36,10 @@ private: class HexEditor : public DeviceEditor { Q_OBJECT + TQ_OBJECT public: - HexEditor(const QString &name, QWidget *parent); - HexEditor(QWidget *parent); + HexEditor(const TQString &name, TQWidget *tqparent); + HexEditor(TQWidget *tqparent); virtual bool isModified() const { return _modified; } virtual bool isReadOnly() const { return !_part->isReadWrite(); } virtual ~HexEditor() { clear(); } @@ -52,8 +54,8 @@ public: virtual void addGui(); virtual void removeGui(); virtual void setFocus() {} - virtual QValueList bookmarkLines() const { return QValueList(); } - virtual void setBookmarkLines(const QValueList &) {} + virtual TQValueList bookmarkLines() const { return TQValueList(); } + virtual void setBookmarkLines(const TQValueList &) {} public slots: virtual void statusChanged(); @@ -69,10 +71,10 @@ private: HexEditorPart *_part; PURL::Url _url; - virtual void dropEvent(QDropEvent *e) { emit dropEventPass(e); } - bool save(const PURL::Url &url, const QString &fileErrorString); + virtual void dropEvent(TQDropEvent *e) { emit dropEventPass(e); } + bool save(const PURL::Url &url, const TQString &fileErrorString); bool verifyDeviceType(); - virtual QWidget *createView(const Device::Data *data, QWidget *parent); + virtual TQWidget *createView(const Device::Data *data, TQWidget *tqparent); virtual void setModifiedInternal(bool modified) { _modified = modified; } virtual void setReadOnlyInternal(bool readOnly); void display(); diff --git a/src/libgui/likeback.cpp b/src/libgui/likeback.cpp index eac86ff..c174bbc 100644 --- a/src/libgui/likeback.cpp +++ b/src/libgui/likeback.cpp @@ -26,18 +26,18 @@ #include #include #include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include -#include +#include #include #include -#include +#include #include #include #include "netwm.h" @@ -52,53 +52,53 @@ #include "common/global/about.h" LikeBack::LikeBack(Button buttons) - : QWidget( 0, "LikeBack", Qt::WX11BypassWM | Qt::WStyle_NoBorder | Qt::WNoAutoErase | Qt::WStyle_StaysOnTop | Qt::WStyle_NoBorder | Qt::Qt::WGroupLeader) + : TQWidget( 0, "LikeBack", TQt::WX11BypassWM | TQt::WStyle_NoBorder | TQt::WNoAutoErase | TQt::WStyle_StaysOnTop | TQt::WStyle_NoBorder | TQt::TQt::WGroupLeader) , m_buttons(buttons) { - QHBoxLayout *layout = new QHBoxLayout(this); + TQHBoxLayout *tqlayout = new TQHBoxLayout(this); - QIconSet likeIconSet = kapp->iconLoader()->loadIconSet("likeback_like", KIcon::Small); - QIconSet dislikeIconSet = kapp->iconLoader()->loadIconSet("likeback_dislike", KIcon::Small); - QIconSet bugIconSet = kapp->iconLoader()->loadIconSet("likeback_bug", KIcon::Small); -// QIconSet configureIconSet = kapp->iconLoader()->loadIconSet("configure", KIcon::Small); + TQIconSet likeIconSet = kapp->iconLoader()->loadIconSet("likeback_like", KIcon::Small); + TQIconSet dislikeIconSet = kapp->iconLoader()->loadIconSet("likeback_dislike", KIcon::Small); + TQIconSet bugIconSet = kapp->iconLoader()->loadIconSet("likeback_bug", KIcon::Small); +// TQIconSet configureIconSet = kapp->iconLoader()->loadIconSet("configure", KIcon::Small); - QToolButton *m_likeButton = new QToolButton(this, "ilike"); + TQToolButton *m_likeButton = new TQToolButton(this, "ilike"); m_likeButton->setIconSet(likeIconSet); m_likeButton->setTextLabel(i18n("I Like...")); m_likeButton->setAutoRaise(true); - connect( m_likeButton, SIGNAL(clicked()), this, SLOT(iLike()) ); - layout->add(m_likeButton); + connect( m_likeButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(iLike()) ); + tqlayout->add(m_likeButton); - QToolButton *m_dislikeButton = new QToolButton(this, "idonotlike"); + TQToolButton *m_dislikeButton = new TQToolButton(this, "idonotlike"); m_dislikeButton->setIconSet(dislikeIconSet); m_dislikeButton->setTextLabel(i18n("I Do not Like...")); m_dislikeButton->setAutoRaise(true); - connect( m_dislikeButton, SIGNAL(clicked()), this, SLOT(iDoNotLike()) ); - layout->add(m_dislikeButton); + connect( m_dislikeButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(iDoNotLike()) ); + tqlayout->add(m_dislikeButton); - QToolButton *m_bugButton = new QToolButton(this, "ifoundabug"); + TQToolButton *m_bugButton = new TQToolButton(this, "ifoundabug"); m_bugButton->setIconSet(bugIconSet); m_bugButton->setTextLabel(i18n("I Found a Bug...")); m_bugButton->setAutoRaise(true); - connect( m_bugButton, SIGNAL(clicked()), this, SLOT(iFoundABug()) ); - layout->add(m_bugButton); + connect( m_bugButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(iFoundABug()) ); + tqlayout->add(m_bugButton); - m_configureButton = new QToolButton(this, "configure"); - QIconSet helpIconSet = kapp->iconLoader()->loadIconSet("help", KIcon::Small); + m_configureButton = new TQToolButton(this, "configure"); + TQIconSet helpIconSet = kapp->iconLoader()->loadIconSet("help", KIcon::Small); m_configureButton->setIconSet(helpIconSet); m_configureButton->setTextLabel(i18n("Configure...")); m_configureButton->setAutoRaise(true); - connect( m_likeButton, SIGNAL(clicked()), this, SLOT(configure()) ); - layout->add(m_configureButton); - - QPopupMenu *configureMenu = new QPopupMenu(this); - configureMenu->insertItem(helpIconSet, i18n("What's &This?"), this , SLOT(showWhatsThisMessage()) ); - QIconSet changeEmailIconSet = kapp->iconLoader()->loadIconSet("mail_generic", KIcon::Small); - configureMenu->insertItem(changeEmailIconSet, i18n("&Configure Email Address..."), this , SLOT(askEMail()) ); -// QIconSet dontHelpIconSet = kapp->iconLoader()->loadIconSet("stop", KIcon::Small); -// configureMenu->insertItem( dontHelpIconSet, i18n("&Do not Help Anymore"), this , SLOT(doNotHelpAnymore()) ); + connect( m_likeButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(configure()) ); + tqlayout->add(m_configureButton); + + TQPopupMenu *configureMenu = new TQPopupMenu(this); + configureMenu->insertItem(helpIconSet, i18n("What's &This?"), this , TQT_SLOT(showWhatsThisMessage()) ); + TQIconSet changeEmailIconSet = kapp->iconLoader()->loadIconSet("mail_generic", KIcon::Small); + configureMenu->insertItem(changeEmailIconSet, i18n("&Configure Email Address..."), this , TQT_SLOT(askEMail()) ); +// TQIconSet dontHelpIconSet = kapp->iconLoader()->loadIconSet("stop", KIcon::Small); +// configureMenu->insertItem( dontHelpIconSet, i18n("&Do not Help Anymore"), this , TQT_SLOT(doNotHelpAnymore()) ); m_configureButton->setPopup(configureMenu); - connect( m_configureButton, SIGNAL(pressed()), this, SLOT(openConfigurePopup()) ); + connect( m_configureButton, TQT_SIGNAL(pressed()), this, TQT_SLOT(openConfigurePopup()) ); if (!emailAddressAlreadyProvided()) //beginFetchingEmail(); // Begin before showing the message, so we have time! @@ -110,9 +110,9 @@ LikeBack::LikeBack(Button buttons) // KMessageBox::saveDontShowAgainContinue(messageShown); // } - resize(sizeHint()); + resize(tqsizeHint()); - connect( &m_timer, SIGNAL(timeout()), this, SLOT(autoMove()) ); + connect( &m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(autoMove()) ); m_timer.start(10); s_instance = this; @@ -131,7 +131,7 @@ void LikeBack::doNotHelpAnymore() { disable(); int result = KMessageBox::questionYesNo( - kapp->activeWindow(), + TQT_TQWIDGET(kapp->activeWindow()), i18n("Are you sure you do not want to participate anymore in the application enhancing program?"), i18n("Do not Help Anymore")); if (result == KMessageBox::No) { @@ -164,14 +164,14 @@ bool LikeBack::userWantToParticipate() void LikeBack::showInformationMessage() { - QPixmap likeIcon = kapp->iconLoader()->loadIcon("likeback_like", KIcon::Small); - QPixmap dislikeIcon = kapp->iconLoader()->loadIcon("likeback_dislike", KIcon::Small); - QPixmap bugIcon = kapp->iconLoader()->loadIcon("likeback_bug", KIcon::Small); - QMimeSourceFactory::defaultFactory()->setPixmap("likeback_icon_like", likeIcon); - QMimeSourceFactory::defaultFactory()->setPixmap("likeback_icon_dislike", dislikeIcon); - QMimeSourceFactory::defaultFactory()->setPixmap("likeback_icon_bug", bugIcon); + TQPixmap likeIcon = kapp->iconLoader()->loadIcon("likeback_like", KIcon::Small); + TQPixmap dislikeIcon = kapp->iconLoader()->loadIcon("likeback_dislike", KIcon::Small); + TQPixmap bugIcon = kapp->iconLoader()->loadIcon("likeback_bug", KIcon::Small); + TQMimeSourceFactory::defaultFactory()->setPixmap("likeback_icon_like", likeIcon); + TQMimeSourceFactory::defaultFactory()->setPixmap("likeback_icon_dislike", dislikeIcon); + TQMimeSourceFactory::defaultFactory()->setPixmap("likeback_icon_bug", bugIcon); KMessageBox::information(0, - "

" + i18n("This is a quick feedback system for %1.").arg(s_about->programName()) + "

" + "

" + i18n("This is a quick feedback system for %1.").tqarg(s_about->programName()) + "

" "

" + i18n("To help us improve it, your comments are important.") + "

" "

" + i18n("Each time you have a great or frustrating experience, " "please click the appropriate hand below the window title-bar, " @@ -182,17 +182,17 @@ void LikeBack::showInformationMessage() ": " + i18n("Report a bug.") + "" "

", i18n("Help Improve the Application")); - QMimeSourceFactory::defaultFactory()->setData("likeback_icon_like", 0L); - QMimeSourceFactory::defaultFactory()->setData("likeback_icon_dislike", 0L); - QMimeSourceFactory::defaultFactory()->setData("likeback_icon_bug", 0L); + TQMimeSourceFactory::defaultFactory()->setData("likeback_icon_like", 0L); + TQMimeSourceFactory::defaultFactory()->setData("likeback_icon_dislike", 0L); + TQMimeSourceFactory::defaultFactory()->setData("likeback_icon_bug", 0L); } -QString LikeBack::s_customLanguageMessage = QString(); +TQString LikeBack::s_customLanguageMessage = TQString(); bool LikeBack::s_allowFeatureWishes = false; LikeBack::WindowListing LikeBack::s_windowListing = LikeBack::NoListing; -QString LikeBack::s_hostName = QString(); -QString LikeBack::s_remotePath = QString(); -Q_UINT16 LikeBack::s_hostPort = 16; +TQString LikeBack::s_hostName = TQString(); +TQString LikeBack::s_remotePath = TQString(); +TQ_UINT16 LikeBack::s_hostPort = 16; int LikeBack::s_disabledCount = 0; LikeBack* LikeBack::s_instance = 0; KConfig* LikeBack::s_config = 0; @@ -203,22 +203,22 @@ LikeBack* LikeBack::instance() return s_instance; } -QString LikeBack::customLanguageMessage() +TQString LikeBack::customLanguageMessage() { return s_customLanguageMessage; } -QString LikeBack::hostName() +TQString LikeBack::hostName() { return s_hostName; } -QString LikeBack::remotePath() +TQString LikeBack::remotePath() { return s_remotePath; } -Q_UINT16 LikeBack::hostPort() +TQ_UINT16 LikeBack::hostPort() { return s_hostPort; } @@ -245,7 +245,7 @@ bool LikeBack::enabled() return s_disabledCount == 0; } -void LikeBack::setServer(QString hostName, QString remotePath, Q_UINT16 hostPort) +void LikeBack::setServer(TQString hostName, TQString remotePath, TQ_UINT16 hostPort) { s_hostName = hostName; s_remotePath = remotePath; @@ -257,7 +257,7 @@ void LikeBack::setWindowNamesListing(WindowListing windowListing) s_windowListing = windowListing; } -void LikeBack::setCustomLanguageMessage(const QString &message) +void LikeBack::setCustomLanguageMessage(const TQString &message) { s_customLanguageMessage = message; } @@ -274,17 +274,17 @@ bool LikeBack::allowFeatureWishes() void LikeBack::autoMove() { - static QWidget *lastWindow = 0; + static TQWidget *lastWindow = 0; - QWidget *window = kapp->activeWindow(); - // When a Kicker applet has the focus, like the Commandline QLineEdit, + TQWidget *window = TQT_TQWIDGET(kapp->activeWindow()); + // When a Kicker applet has the focus, like the Commandline TQLineEdit, // the systemtray icon indicates to be the current window and the LikeBack is shown next to the system tray icon. // It's obviously bad ;-) : bool shouldShow = false;//(enabled() && window && window->inherits("KMainWindow") ); if (shouldShow) { //move(window->x() + window->width() - 100 - width(), window->y()); - //move(window->x() + window->width() - 100 - width(), window->mapToGlobal(QPoint(0, 0)).y() - height()); - move(window->mapToGlobal(QPoint(0, 0)).x() + window->width() - width(), window->mapToGlobal(QPoint(0, 0)).y() + 1); + //move(window->x() + window->width() - 100 - width(), window->mapToGlobal(TQPoint(0, 0)).y() - height()); + move(window->mapToGlobal(TQPoint(0, 0)).x() + window->width() - width(), window->mapToGlobal(TQPoint(0, 0)).y() + 1); if (window != lastWindow && s_windowListing != NoListing) // if (qstricmp(window->name(), "") == 0 || qstricmp(window->name(), "unnamed") == 0) ; @@ -319,24 +319,24 @@ void LikeBack::configure() { } -QString LikeBack::activeWindowPath() +TQString LikeBack::activeWindowPath() { - QStringList windowNames; - QWidget *window = kapp->activeWindow(); + TQStringList windowNames; + TQWidget *window = TQT_TQWIDGET(kapp->activeWindow()); while (window) { - QString name = window->name(); + TQString name = window->name(); if (name == "unnamed") - name += QString(":") + window->className(); + name += TQString(":") + window->className(); windowNames.append(name); - window = dynamic_cast(window->parent()); + window = dynamic_cast(window->tqparent()); } - QString windowName; + TQString windowName; for (int i = ((int)windowNames.count()) - 1; i >= 0; i--) { if (windowName.isEmpty()) windowName = windowNames[i]; else - windowName += QString("~~") + windowNames[i]; + windowName += TQString("~~") + windowNames[i]; } return windowName; @@ -357,7 +357,7 @@ bool LikeBack::emailAddressAlreadyProvided() return s_config->readBoolEntry("emailAlreadyAsked", false); } -QString LikeBack::emailAddress() +TQString LikeBack::emailAddress() { if (!emailAddressAlreadyProvided()) instance()->askEMail(); @@ -365,7 +365,7 @@ QString LikeBack::emailAddress() return s_config->readEntry("emailAddress", ""); } -void LikeBack::setEmailAddress(const QString &address) +void LikeBack::setEmailAddress(const TQString &address) { s_config->setGroup("LikeBack"); s_config->writeEntry("emailAddress", address); @@ -376,27 +376,27 @@ void LikeBack::askEMail() { s_config->setGroup("LikeBack"); - QString currentEMailAddress = s_config->readEntry("emailAddress", ""); + TQString currentEMailAddress = s_config->readEntry("emailAddress", ""); if (!emailAddressAlreadyProvided() && !instance()->m_fetchedEmail.isEmpty()) currentEMailAddress = instance()->m_fetchedEmail; bool ok; - QString mailExpString = "[\\w-\\.]+@[\\w-\\.]+\\.[\\w]+"; - //QString namedMailExpString = "[.]*[ \\t]+<" + mailExpString + ">"; - //QRegExp mailExp("^(|" + mailExpString + "|" + namedMailExpString + ")$"); - QRegExp mailExp("^(|" + mailExpString + ")$"); - QRegExpValidator emailValidator(mailExp, this); + TQString mailExpString = "[\\w-\\.]+@[\\w-\\.]+\\.[\\w]+"; + //TQString namedMailExpString = "[.]*[ \\t]+<" + mailExpString + ">"; + //TQRegExp mailExp("^(|" + mailExpString + "|" + namedMailExpString + ")$"); + TQRegExp mailExp("^(|" + mailExpString + ")$"); + TQRegExpValidator emailValidator(mailExp, TQT_TQOBJECT(this)); disable(); - QString email = KInputDialog::getText( + TQString email = KInputDialog::getText( i18n("Set Email Address"), "

" + i18n("Please provide your email address.") + "

" + "

" + i18n("It will only be used to contact you back if more information is needed about your comments, how to reproduce the bugs you report, send bug corrections for you to test...") + "

" + "

" + i18n("The email address is optional. If you do not provide any, your comments will be sent anonymously. Just click OK in that case.") + "

" + "

" + i18n("You can change or remove your email address whenever you want. For that, use the little arrow icon at the top-right corner of a window.") + "

" + "

" + i18n("Your email address (keep empty to post comments anonymously):"), - currentEMailAddress, &ok, kapp->activeWindow(), /*name=*/(const char*)0, &emailValidator); + currentEMailAddress, &ok, TQT_TQWIDGET(kapp->activeWindow()), /*name=*/(const char*)0, &emailValidator); enable(); if (ok) @@ -404,15 +404,15 @@ void LikeBack::askEMail() } // FIXME: Should be moved to KAboutData? Cigogne will also need it. -bool LikeBack::isDevelopmentVersion(const QString &version) +bool LikeBack::isDevelopmentVersion(const TQString &version) { - QString theVersion = (version.isEmpty() ? s_about->version() : version); + TQString theVersion = (version.isEmpty() ? s_about->version() : version); - return theVersion.find("alpha", /*index=*/0, /*caseSensitive=*/false) != -1 || - theVersion.find("beta", /*index=*/0, /*caseSensitive=*/false) != -1 || - theVersion.find("rc", /*index=*/0, /*caseSensitive=*/false) != -1 || - theVersion.find("svn", /*index=*/0, /*caseSensitive=*/false) != -1 || - theVersion.find("cvs", /*index=*/0, /*caseSensitive=*/false) != -1; + return theVersion.tqfind("alpha", /*index=*/0, /*caseSensitive=*/false) != -1 || + theVersion.tqfind("beta", /*index=*/0, /*caseSensitive=*/false) != -1 || + theVersion.tqfind("rc", /*index=*/0, /*caseSensitive=*/false) != -1 || + theVersion.tqfind("svn", /*index=*/0, /*caseSensitive=*/false) != -1 || + theVersion.tqfind("cvs", /*index=*/0, /*caseSensitive=*/false) != -1; } void LikeBack::init(KConfig* config, KAboutData* about, Button buttons) @@ -452,8 +452,8 @@ void LikeBack::init(bool isDevelopmentVersion, Button buttons) if (m_process) return; m_process = new KProcess(); - *m_process << QString::fromLatin1("kcmshell") << QString::fromLatin1("kcm_useraccount"); - connect( m_process, SIGNAL(processExited(KProcess*)), SLOT(endFetchingEmailFrom()) ); + *m_process << TQString::tqfromLatin1("kcmshell") << TQString::tqfromLatin1("kcm_useraccount"); + connect( m_process, TQT_SIGNAL(processExited(KProcess*)), TQT_SLOT(endFetchingEmailFrom()) ); if (!m_process->start()) { kdDebug() << "Couldn't start kcmshell.." << endl; delete m_process; @@ -473,23 +473,23 @@ void LikeBack::endFetchingEmailFrom() // m_configureEmail->setEnabled(true); // ### KDE4: why oh why is KEmailSettings in kio? - KConfig emailConf( QString::fromLatin1("emaildefaults") ); + KConfig emailConf( TQString::tqfromLatin1("emaildefaults") ); // find out the default profile - emailConf.setGroup(QString::fromLatin1("Defaults")); - QString profile = QString::fromLatin1("PROFILE_"); - profile += emailConf.readEntry(QString::fromLatin1("Profile"), QString::fromLatin1("Default")); + emailConf.setGroup(TQString::tqfromLatin1("Defaults")); + TQString profile = TQString::tqfromLatin1("PROFILE_"); + profile += emailConf.readEntry(TQString::tqfromLatin1("Profile"), TQString::tqfromLatin1("Default")); emailConf.setGroup(profile); - QString fromaddr = emailConf.readEntry(QString::fromLatin1("EmailAddress")); + TQString fromaddr = emailConf.readEntry(TQString::tqfromLatin1("EmailAddress")); if (fromaddr.isEmpty()) { struct passwd *p; p = getpwuid(getuid()); - m_fetchedEmail = QString::fromLatin1(p->pw_name); + m_fetchedEmail = TQString::tqfromLatin1(p->pw_name); } else { - QString name = emailConf.readEntry(QString::fromLatin1("FullName")); + TQString name = emailConf.readEntry(TQString::tqfromLatin1("FullName")); if (!name.isEmpty()) - m_fetchedEmail = /*name + QString::fromLatin1(" <") +*/ fromaddr /*+ QString::fromLatin1(">")*/; + m_fetchedEmail = /*name + TQString::tqfromLatin1(" <") +*/ fromaddr /*+ TQString::tqfromLatin1(">")*/; } // m_from->setText( fromaddr ); } @@ -502,44 +502,44 @@ void LikeBack::endFetchingEmailFrom() /** class LikeBackDialog: */ -LikeBackDialog::LikeBackDialog(LikeBack::Button reason, QString windowName, QString context) - : KDialog(kapp->activeWindow(), "_likeback_feedback_window_") +LikeBackDialog::LikeBackDialog(LikeBack::Button reason, TQString windowName, TQString context) + : KDialog(TQT_TQWIDGET(kapp->activeWindow()), "_likeback_feedback_window_") , m_reason(reason) , m_windowName(windowName) , m_context(context) { setModal(true); - QVBoxLayout *mainLayout = new QVBoxLayout(this); + TQVBoxLayout *mainLayout = new TQVBoxLayout(this); - QWidget *coloredWidget = new QWidget(this); - QLabel *explainings = new QLabel(this); - QHBoxLayout *explainingLayout = new QHBoxLayout((QWidget*)0, KDialogBase::marginHint()); + TQWidget *coloredWidget = new TQWidget(this); + TQLabel *explainings = new TQLabel(this); + TQHBoxLayout *explainingLayout = new TQHBoxLayout((TQWidget*)0, KDialogBase::marginHint()); explainingLayout->addWidget(explainings); mainLayout->addWidget(coloredWidget); - QColor color; - QColor lineColor; - QPixmap icon; - QString title; - QString please; + TQColor color; + TQColor lineColor; + TQPixmap icon; + TQString title; + TQString please; switch (reason) { case LikeBack::ILike: - color = QColor("#DFFFDF"); - lineColor = Qt::green; + color = TQColor("#DFFFDF"); + lineColor = TQt::green; icon = kapp->iconLoader()->loadIcon("likeback_like", KIcon::Small); title = i18n("I like..."); please = i18n("Please briefly describe what you like."); break; case LikeBack::IDoNotLike: - color = QColor("#FFDFDF"); - lineColor = Qt::red; + color = TQColor("#FFDFDF"); + lineColor = TQt::red; icon = kapp->iconLoader()->loadIcon("likeback_dislike", KIcon::Small); title = i18n("I do not like..."); please = i18n("Please briefly describe what you do not like."); break; case LikeBack::IFoundABug: - color = QColor("#C0C0C0"); - lineColor = Qt::black; + color = TQColor("#C0C0C0"); + lineColor = TQt::black; icon = kapp->iconLoader()->loadIcon("bug", KIcon::Small); title = i18n("I found a bug..."); please = i18n("Please briefly describe the bug you encountered."); @@ -549,41 +549,41 @@ LikeBackDialog::LikeBackDialog(LikeBack::Button reason, QString windowName, QStr return; } - QWidget *line = new QWidget(this); + TQWidget *line = new TQWidget(this); line->setPaletteBackgroundColor(lineColor); line->setFixedHeight(1); mainLayout->addWidget(line); mainLayout->addLayout(explainingLayout); - QHBoxLayout *titleLayout = new QHBoxLayout(0); + TQHBoxLayout *titleLayout = new TQHBoxLayout(0); coloredWidget->setPaletteBackgroundColor(color); - QLabel *iconLabel = new QLabel(coloredWidget); + TQLabel *iconLabel = new TQLabel(coloredWidget); iconLabel->setPixmap(icon); - QLabel *titleLabel = new QLabel(title, coloredWidget); - QFont font = titleLabel->font(); + TQLabel *titleLabel = new TQLabel(title, coloredWidget); + TQFont font = titleLabel->font(); font.setBold(true); titleLabel->setFont(font); - titleLabel->setPaletteForegroundColor(Qt::black); + titleLabel->setPaletteForegroundColor(TQt::black); titleLayout->addWidget(iconLabel); titleLayout->addSpacing(4); titleLayout->addWidget(titleLabel); titleLayout->addStretch(); - QVBoxLayout *coloredWidgetLayout = new QVBoxLayout(coloredWidget); + TQVBoxLayout *coloredWidgetLayout = new TQVBoxLayout(coloredWidget); coloredWidgetLayout->setMargin(KDialogBase::marginHint()); coloredWidgetLayout->setSpacing(KDialogBase::spacingHint()); coloredWidgetLayout->addLayout(titleLayout); - QHBoxLayout *commentLayout = new QHBoxLayout((QWidget*)0); + TQHBoxLayout *commentLayout = new TQHBoxLayout((TQWidget*)0); commentLayout->setMargin(0); commentLayout->setSpacing(KDialogBase::spacingHint()); - m_comment = new QTextEdit(coloredWidget); - QIconSet sendIconSet = kapp->iconLoader()->loadIconSet("mail_send", KIcon::Toolbar); - m_sendButton = new QPushButton(sendIconSet, i18n("Send"), coloredWidget); - m_sendButton->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding); + m_comment = new TQTextEdit(coloredWidget); + TQIconSet sendIconSet = kapp->iconLoader()->loadIconSet("mail_send", KIcon::Toolbar); + m_sendButton = new TQPushButton(sendIconSet, i18n("Send"), coloredWidget); + m_sendButton->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Expanding); m_sendButton->setEnabled(false); - connect( m_sendButton, SIGNAL(clicked()), this, SLOT(send()) ); - connect( m_comment, SIGNAL(textChanged()), this, SLOT(commentChanged()) ); + connect( m_sendButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(send()) ); + connect( m_comment, TQT_SIGNAL(textChanged()), this, TQT_SLOT(commentChanged()) ); commentLayout->addWidget(m_comment); commentLayout->addWidget(m_sendButton); coloredWidgetLayout->addLayout(commentLayout); @@ -607,21 +607,21 @@ LikeBackDialog::LikeBackDialog(LikeBack::Button reason, QString windowName, QStr resize(kapp->desktop()->width() / 2, kapp->desktop()->height() / 3); setCaption(kapp->makeStdCaption(i18n("Send a Comment"))); - // setMinimumSize(mainLayout->sizeHint()); // FIXME: Doesn't work! + // setMinimumSize(mainLayout->tqsizeHint()); // FIXME: Doesn't work! } LikeBackDialog::~LikeBackDialog() { } -QHttp *http ; +TQHttp *http ; void LikeBackDialog::send() { - QString emailAddress = LikeBack::instance()->emailAddress(); + TQString emailAddress = LikeBack::instance()->emailAddress(); - QString type = (m_reason == LikeBack::ILike ? "Like" : (m_reason == LikeBack::IDoNotLike ? "Dislike" : "Bug")); - QString data = + TQString type = (m_reason == LikeBack::ILike ? "Like" : (m_reason == LikeBack::IDoNotLike ? "Dislike" : "Bug")); + TQString data = "protocol=" + KURL::encode_string("1.0") + "&" + "type=" + KURL::encode_string(type) + "&" + "version=" + KURL::encode_string(LikeBack::about()->version()) + "&" + @@ -630,15 +630,15 @@ void LikeBackDialog::send() "context=" + KURL::encode_string(m_context) + "&" + "comment=" + KURL::encode_string(m_comment->text()) + "&" + "email=" + KURL::encode_string(emailAddress); - //QByteArray *data = new QByteArray(); - /*QHttp **/http = new QHttp(LikeBack::hostName(), LikeBack::hostPort()); + //TQByteArray *data = new TQByteArray(); + /*TQHttp **/http = new TQHttp(LikeBack::hostName(), LikeBack::hostPort()); // std::cout << "http://" << LikeBack::hostName() << ":" << LikeBack::hostPort() << LikeBack::remotePath() << std::endl; // std::cout << data << std::endl; - connect( http, SIGNAL(requestFinished(int, bool)), this, SLOT(requestFinished(int, bool)) ); + connect( http, TQT_SIGNAL(requestFinished(int, bool)), this, TQT_SLOT(requestFinished(int, bool)) ); // http->post(LikeBack::remotePath(), data.utf8()); - QHttpRequestHeader header("POST", LikeBack::remotePath()); + TQHttpRequestHeader header("POST", LikeBack::remotePath()); header.setValue("Host", LikeBack::hostName()); header.setValue("Content-Type", "application/x-www-form-urlencoded"); http->setHost(LikeBack::hostName()); @@ -656,7 +656,7 @@ void LikeBackDialog::requestFinished(int /*id*/, bool error) if (error) { KMessageBox::error(this, i18n("

Error while trying to send the report.

Please retry later.

"), i18n("Transfer Error")); } else { - KMessageBox::information(this, i18n("

Your comment has been sent successfully. It will help improve the application.

Thanks for your time.

") /*+ QString(http->readAll())*/, i18n("Comment Sent")); + KMessageBox::information(this, i18n("

Your comment has been sent successfully. It will help improve the application.

Thanks for your time.

") /*+ TQString(http->readAll())*/, i18n("Comment Sent")); close(); } LikeBack::enable(); diff --git a/src/libgui/likeback.h b/src/libgui/likeback.h index 70a68dd..1fdb165 100644 --- a/src/libgui/likeback.h +++ b/src/libgui/likeback.h @@ -21,11 +21,11 @@ #define LIKEBACK_H #include -#include +#include -class QTextEdit; -class QToolButton; -class QPushButton; +class TQTextEdit; +class TQToolButton; +class TQPushButton; class KProcess; class KConfig; class KAboutData; @@ -33,9 +33,10 @@ class KAboutData; /** * @author S�astien Laot */ -class LikeBack : public QWidget +class LikeBack : public TQWidget { Q_OBJECT + TQ_OBJECT public: enum Button { ILike = 0x01, IDoNotLike = 0x02, IFoundABug = 0x04, Configure = 0x10, AllButtons = ILike | IDoNotLike | IFoundABug | Configure }; @@ -44,27 +45,27 @@ class LikeBack : public QWidget ~LikeBack(); static void showInformationMessage(); static LikeBack* instance(); - static QString customLanguageMessage(); + static TQString customLanguageMessage(); static bool allowFeatureWishes(); - static QString hostName(); - static QString remotePath(); - static Q_UINT16 hostPort(); - static void setServer(QString hostName, QString remotePath, Q_UINT16 hostPort = 80); + static TQString hostName(); + static TQString remotePath(); + static TQ_UINT16 hostPort(); + static void setServer(TQString hostName, TQString remotePath, TQ_UINT16 hostPort = 80); static void setWindowNamesListing(WindowListing windowListing); - static void setCustomLanguageMessage(const QString &message); + static void setCustomLanguageMessage(const TQString &message); static void setAllowFeatureWishes(bool allow); static bool enabled(); static void disable(); static void enable(); static bool userWantToParticipate(); /// << @Returns true if the user have not disabled LikeBack for this version static bool emailAddressAlreadyProvided(); - static QString emailAddress(); /// << @Returns the email user address, or ask it to the user if he haven't provided or ignored it - static void setEmailAddress(const QString &address); /// << Calling emailAddress() will ask it to the user the first time - static bool isDevelopmentVersion(const QString &version = QString::null); /// << @Returns true if version is an alpha/beta/rc/svn/cvs version. Use kapp->aboutData()->version is @p version is empty + static TQString emailAddress(); /// << @Returns the email user address, or ask it to the user if he haven't provided or ignored it + static void setEmailAddress(const TQString &address); /// << Calling emailAddress() will ask it to the user the first time + static bool isDevelopmentVersion(const TQString &version = TQString()); /// << @Returns true if version is an alpha/beta/rc/svn/cvs version. Use kapp->aboutData()->version is @p version is empty static void init(Button buttons = AllButtons); /// << Initialize the LikeBack system: enable it if the application version is a development one. static void init(bool isDevelopmentVersion, Button buttons = AllButtons); /// << Initialize the LikeBack system: enable it if @p isDevelopmentVersion is true. static void init(KConfig* config, KAboutData* about, Button buttons = AllButtons); - static QString activeWindowPath(); + static TQString activeWindowPath(); static KAboutData* about(); public slots: void iLike(); @@ -80,17 +81,17 @@ class LikeBack : public QWidget void showWhatsThisMessage(); void askEMail(); // void beginFetchingEmail(); - void endFetchingEmailFrom(); // static QString fetchingEmail(); + void endFetchingEmailFrom(); // static TQString fetchingEmail(); private: - QTimer m_timer; + TQTimer m_timer; Button m_buttons; - QToolButton *m_configureButton; - QString m_fetchedEmail; + TQToolButton *m_configureButton; + TQString m_fetchedEmail; KProcess *m_process; - static QString s_hostName; - static QString s_remotePath; - static Q_UINT16 s_hostPort; - static QString s_customLanguageMessage; + static TQString s_hostName; + static TQString s_remotePath; + static TQ_UINT16 s_hostPort; + static TQString s_customLanguageMessage; static bool s_allowFeatureWishes; static WindowListing s_windowListing; static LikeBack *s_instance; @@ -102,15 +103,16 @@ class LikeBack : public QWidget class LikeBackDialog : public KDialog { Q_OBJECT + TQ_OBJECT public: - LikeBackDialog(LikeBack::Button reason, QString windowName, QString context); + LikeBackDialog(LikeBack::Button reason, TQString windowName, TQString context); ~LikeBackDialog(); private: LikeBack::Button m_reason; - QTextEdit *m_comment; - QPushButton *m_sendButton; - QString m_windowName; - QString m_context; + TQTextEdit *m_comment; + TQPushButton *m_sendButton; + TQString m_windowName; + TQString m_context; private slots: void send(); void requestFinished(int id, bool error); diff --git a/src/libgui/log_view.cpp b/src/libgui/log_view.cpp index 158c281..f0a1830 100644 --- a/src/libgui/log_view.cpp +++ b/src/libgui/log_view.cpp @@ -8,17 +8,17 @@ ***************************************************************************/ #include "log_view.h" -#include -#include -#include +#include +#include +#include #include #include "global_config.h" #include "common/gui/purl_gui.h" #include "common/gui/misc_gui.h" -Log::Widget::Widget(QWidget *parent, const char *name) - : QTextEdit(parent, name) +Log::Widget::Widget(TQWidget *tqparent, const char *name) + : TQTextEdit(tqparent, name) { setTextFormat(LogText); setMinimumWidth(300); @@ -29,66 +29,66 @@ void Log::Widget::updateDebugLevel() setDebugLevel(GlobalConfig::debugLevel()); } -void Log::Widget::logExtra(const QString &text) +void Log::Widget::logExtra(const TQString &text) { _text += text; if ( GlobalConfig::logOutputType()==GuiConsole ) fprintf(stdout, "%s", text.latin1()); } -void Log::Widget::doLog(LineType type, const QString &text, Action action) +void Log::Widget::doLog(LineType type, const TQString &text, Action action) { doLog(text, type.data().color, type.data().bold, action); } -void Log::Widget::doLog(DebugLevel level, const QString &text, Action action) +void Log::Widget::doLog(DebugLevel level, const TQString &text, Action action) { doLog(text, level.data().color, false, action); } -void Log::Widget::doLog(const QString &text, const QString &color, bool bold, Action action) +void Log::Widget::doLog(const TQString &text, const TQString &color, bool bold, Action action) { logExtra(text + "\n"); - QString s = QString("").arg(color); + TQString s = TQString("").tqarg(color); if (bold) s += ""; s += escapeXml(text); if (bold) s += ""; s += ""; - QTextEdit::append(s); - updateContents(); // #### fix bug in Qt (display is messed up) + TQTextEdit::append(s); + updateContents(); // #### fix bug in TQt (display is messed up) ensureVisible(0, contentsHeight()); if ( action==Immediate) - QApplication::eventLoop()->processEvents(QEventLoop::ExcludeUserInput); + TQApplication::eventLoop()->processEvents(TQEventLoop::ExcludeUserInput); } -void Log::Widget::appendToLastLine(const QString &text) +void Log::Widget::appendToLastLine(const TQString &text) { logExtra(text); uint p = paragraphs() - 1; insertAt(escapeXml(text), p, paragraphLength(p)); - updateContents(); // #### fix bug in Qt (display is messed up) + updateContents(); // #### fix bug in TQt (display is messed up) ensureVisible(0, contentsHeight()); // immediately visible... - QApplication::eventLoop()->processEvents(QEventLoop::ExcludeUserInput); + TQApplication::eventLoop()->processEvents(TQEventLoop::ExcludeUserInput); } -QPopupMenu *Log::Widget::createPopupMenu(const QPoint &pos) +TQPopupMenu *Log::Widget::createPopupMenu(const TQPoint &pos) { updateDebugLevel(); - _popup = QTextEdit::createPopupMenu(pos); + _popup = TQTextEdit::createPopupMenu(pos); KIconLoader loader; - QIconSet iset = loader.loadIconSet("filesave", KIcon::Small, 0); - _popup->insertItem(iset, "Save As...", this, SLOT(saveAs())); + TQIconSet iset = loader.loadIconSet("filesave", KIcon::Small, 0); + _popup->insertItem(iset, "Save As...", this, TQT_SLOT(saveAs())); iset = loader.loadIconSet("fileclose", KIcon::Small, 0); - _popup->insertItem(iset, "Clear", this, SLOT(clear())); + _popup->insertItem(iset, "Clear", this, TQT_SLOT(clear())); _popup->insertSeparator(); FOR_EACH(DebugLevel, level) { _id[level.type()] = _popup->insertItem(level.label()); _popup->setItemChecked(_id[level.type()], _debugLevel==level); } _popup->insertSeparator(); - int id = _popup->insertItem(i18n("Output in console"), this, SLOT(toggleConsoleOutput())); + int id = _popup->insertItem(i18n("Output in console"), this, TQT_SLOT(toggleConsoleOutput())); _popup->setItemChecked(id, GlobalConfig::logOutputType()==GuiConsole); - connect(_popup, SIGNAL(activated(int)), SLOT(toggleVisible(int))); + connect(_popup, TQT_SIGNAL(activated(int)), TQT_SLOT(toggleVisible(int))); return _popup; } @@ -108,13 +108,13 @@ void Log::Widget::toggleConsoleOutput() GlobalConfig::writeLogOutputType(GlobalConfig::logOutputType()==GuiOnly ? GuiConsole : GuiOnly); } -void Log::Widget::sorry(const QString &message, const QString &details) +void Log::Widget::sorry(const TQString &message, const TQString &details) { logExtra(message + " [" + details + "]\n"); MessageBox::detailedSorry(message, details, Log::Show); } -bool Log::Widget::askContinue(const QString &message) +bool Log::Widget::askContinue(const TQString &message) { bool ok = MessageBox::askContinue(message); logExtra(message + " [" + (ok ? "continue" : "cancel") + "]\n"); @@ -123,8 +123,8 @@ bool Log::Widget::askContinue(const QString &message) void Log::Widget::clear() { - QTextEdit::clear(); - _text = QString::null; + TQTextEdit::clear(); + _text = TQString(); } void Log::Widget::saveAs() diff --git a/src/libgui/log_view.h b/src/libgui/log_view.h index c84849e..75e2481 100644 --- a/src/libgui/log_view.h +++ b/src/libgui/log_view.h @@ -9,25 +9,26 @@ #ifndef LOG_VIEW_H #define LOG_VIEW_H -#include +#include #include "common/global/log.h" namespace Log { enum OutputType { GuiOnly = 0, GuiConsole, Nb_OutputTypes }; -class Widget : public QTextEdit, public View +class Widget : public TQTextEdit, public View { Q_OBJECT + TQ_OBJECT public: - Widget(QWidget *parent = 0, const char *name = 0); - virtual void appendToLastLine(const QString &text); + Widget(TQWidget *tqparent = 0, const char *name = 0); + virtual void appendToLastLine(const TQString &text); virtual void clear(); - virtual void sorry(const QString &message, const QString &details); - virtual bool askContinue(const QString &message); + virtual void sorry(const TQString &message, const TQString &details); + virtual bool askContinue(const TQString &message); protected: - QPopupMenu *createPopupMenu(const QPoint &pos); + TQPopupMenu *createPopupMenu(const TQPoint &pos); private slots: void toggleVisible(int i); @@ -36,14 +37,14 @@ private slots: private: int _id[DebugLevel::Nb_Types]; - QPopupMenu *_popup; - QString _text; + TQPopupMenu *_popup; + TQString _text; virtual void updateDebugLevel(); - virtual void doLog(LineType type, const QString &text, Action action = Immediate); - virtual void doLog(DebugLevel level, const QString &text, Action action = Immediate); - void doLog(const QString &text, const QString &color, bool bold, Action action = Immediate); - void logExtra(const QString &text); + virtual void doLog(LineType type, const TQString &text, Action action = Immediate); + virtual void doLog(DebugLevel level, const TQString &text, Action action = Immediate); + void doLog(const TQString &text, const TQString &color, bool bold, Action action = Immediate); + void logExtra(const TQString &text); }; } // namespace diff --git a/src/libgui/main_global.cpp b/src/libgui/main_global.cpp index 8741a44..283149d 100644 --- a/src/libgui/main_global.cpp +++ b/src/libgui/main_global.cpp @@ -8,7 +8,7 @@ ***************************************************************************/ #include "main_global.h" -#include +#include #include "toplevel.h" #include "common/global/about.h" @@ -60,16 +60,16 @@ KAction *Main::action(KStdAction::StdAction action) return _toplevel->KMainWindow::action(KStdAction::name(action)); } -QPopupMenu &Main::popup(const char *name) +TQPopupMenu &Main::popup(const char *name) { - QPopupMenu *popup = static_cast(_toplevel->factory()->container(name, _toplevel)); + TQPopupMenu *popup = static_cast(_toplevel->factory()->container(name, _toplevel)); Q_ASSERT(popup); return *popup; } const Device::Data *Main::deviceData() { - QString name = device(); + TQString name = device(); if ( name==Device::AUTO_DATA.name ) name = DeviceEditor::guessDeviceFromFile(_projectManager->projectUrl()); return Device::lister().data(name); @@ -77,5 +77,5 @@ const Device::Data *Main::deviceData() Editor *Main::currentEditor() { return _editorManager->currentEditor(); } Project *Main::project() { return _projectManager->project(); } -QString Main::device() { return Compile::Config::device(project()); } +TQString Main::device() { return Compile::Config::device(project()); } const Tool::Group &Main::toolGroup() { return Compile::Config::toolGroup(project()); } diff --git a/src/libgui/main_global.h b/src/libgui/main_global.h index 020253e..a3dc901 100644 --- a/src/libgui/main_global.h +++ b/src/libgui/main_global.h @@ -9,8 +9,8 @@ #ifndef MAIN_GLOBAL_H #define MAIN_GLOBAL_H -#include -#include +#include +#include #include #include "progs/base/generic_prog.h" @@ -41,10 +41,10 @@ public: static Programmer::State programmerState(); static KAction *action(const char *name); static KAction *action(KStdAction::StdAction action); - static QPopupMenu &popup(const char *name); + static TQPopupMenu &popup(const char *name); static EditorManager &editorManager() { return *_editorManager; } static Editor *currentEditor(); - static QString device(); + static TQString device(); static const Device::Data *deviceData(); static Breakpoint::View &breakpointsView() { return *_breakpointsView; } static ProjectManager::View &projectManager() { return *_projectManager; } diff --git a/src/libgui/new_dialogs.cpp b/src/libgui/new_dialogs.cpp index d26c15c..f5fbc4a 100644 --- a/src/libgui/new_dialogs.cpp +++ b/src/libgui/new_dialogs.cpp @@ -17,27 +17,27 @@ #include "project.h" //---------------------------------------------------------------------------- -NewDialog::NewDialog(const QString &caption, QWidget *parent) - : Dialog(parent, "new_dialog", true, caption, Ok|Cancel, Ok, false) +NewDialog::NewDialog(const TQString &caption, TQWidget *tqparent) + : Dialog(tqparent, "new_dialog", true, caption, Ok|Cancel, Ok, false) { - _top = new QGridLayout(mainWidget(), 0, 0, 10, 10); + _top = new TQGridLayout(mainWidget(), 0, 0, 10, 10); _top->setColStretch(2, 1); - _fLabel = new QLabel(mainWidget()); + _fLabel = new TQLabel(mainWidget()); _top->addWidget(_fLabel, 0, 0); - _filename = new QLineEdit(mainWidget()); - connect(_filename, SIGNAL(textChanged(const QString &)), SLOT(changed())); + _filename = new TQLineEdit(mainWidget()); + connect(_filename, TQT_SIGNAL(textChanged(const TQString &)), TQT_SLOT(changed())); _top->addMultiCellWidget(_filename, 0,0, 1,3); - QLabel *label= new QLabel(i18n("Location:"), mainWidget()); + TQLabel *label= new TQLabel(i18n("Location:"), mainWidget()); _top->addWidget(label, 1, 0); - _dir = new QLineEdit(mainWidget()); - connect(_dir, SIGNAL(textChanged(const QString &)), SLOT(changed())); + _dir = new TQLineEdit(mainWidget()); + connect(_dir, TQT_SIGNAL(textChanged(const TQString &)), TQT_SLOT(changed())); _top->addMultiCellWidget(_dir, 1,1, 1,2); KIconLoader loader; - QIconSet iconset = loader.loadIcon("fileopen", KIcon::Toolbar); - KPushButton *button = new KPushButton(iconset, QString::null, mainWidget()); - connect(button, SIGNAL(clicked()), SLOT(browse())); + TQIconSet iconset = loader.loadIcon("fileopen", KIcon::Toolbar); + KPushButton *button = new KPushButton(iconset, TQString(), mainWidget()); + connect(button, TQT_SIGNAL(clicked()), TQT_SLOT(browse())); _top->addWidget(button, 1, 3); _filename->setFocus(); @@ -51,19 +51,19 @@ void NewDialog::changed() void NewDialog::browse() { - PURL::Directory dir = PURL::getExistingDirectory(startDir(), this, QString::null); + PURL::Directory dir = PURL::getExistingDirectory(startDir(), this, TQString()); if ( dir.isEmpty() ) return; _dir->setText(dir.path()); } //---------------------------------------------------------------------------- -NewFileDialog::NewFileDialog(Project *project, QWidget *parent) - : NewDialog(i18n("Create New File"), parent), _project(project) +NewFileDialog::NewFileDialog(Project *project, TQWidget *tqparent) + : NewDialog(i18n("Create New File"), tqparent), _project(project) { _fLabel->setText(i18n("File Name:")); if (project) { - _add = new QCheckBox(i18n("Add to project"), mainWidget()); + _add = new TQCheckBox(i18n("Add to project"), mainWidget()); _add->setChecked(project); _top->addMultiCellWidget(_add, 2,2, 1,2); _top->setRowStretch(3, 1); @@ -71,7 +71,7 @@ NewFileDialog::NewFileDialog(Project *project, QWidget *parent) } } -QString NewFileDialog::startDir() const +TQString NewFileDialog::startDir() const { if (_project) return _project->directory().path(); return ":new_file"; diff --git a/src/libgui/new_dialogs.h b/src/libgui/new_dialogs.h index 26e3cf7..b3d2846 100644 --- a/src/libgui/new_dialogs.h +++ b/src/libgui/new_dialogs.h @@ -10,11 +10,11 @@ #ifndef NEW_DIALOGS_H #define NEW_DIALOGS_H -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include "common/global/purl.h" @@ -25,15 +25,16 @@ class Project; class NewDialog : public Dialog { Q_OBJECT + TQ_OBJECT public: - NewDialog(const QString &caption, QWidget *parent); + NewDialog(const TQString &caption, TQWidget *tqparent); protected: - QGridLayout *_top; - QLabel *_fLabel; - QLineEdit *_filename, *_dir; + TQGridLayout *_top; + TQLabel *_fLabel; + TQLineEdit *_filename, *_dir; - virtual QString startDir() const = 0; + virtual TQString startDir() const = 0; private slots: void changed(); @@ -44,16 +45,17 @@ private slots: class NewFileDialog : public NewDialog { Q_OBJECT + TQ_OBJECT public: - NewFileDialog(Project *project, QWidget *parent); + NewFileDialog(Project *project, TQWidget *tqparent); PURL::Url url() const; bool addToProject() const { return (_project ? _add->isChecked() : false); } private: Project *_project; - QCheckBox *_add; + TQCheckBox *_add; - virtual QString startDir() const; + virtual TQString startDir() const; }; #endif diff --git a/src/libgui/object_view.cpp b/src/libgui/object_view.cpp index 91625fb..dd606fc 100644 --- a/src/libgui/object_view.cpp +++ b/src/libgui/object_view.cpp @@ -22,8 +22,8 @@ #include "common/gui/misc_gui.h" //----------------------------------------------------------------------------- -Coff::BaseEditor::BaseEditor(const PURL::Url &source, const Device::Data *data, QWidget *parent) - : SimpleTextEditor(true, parent), _source(source), _ok(false), _created(0), _device(data) +Coff::BaseEditor::BaseEditor(const PURL::Url &source, const Device::Data *data, TQWidget *tqparent) + : SimpleTextEditor(true, tqparent), _source(source), _ok(false), _created(0), _device(data) { setReadOnly(true); _view->setDynWordWrap(false); @@ -36,12 +36,12 @@ Coff::BaseEditor::~BaseEditor() } //----------------------------------------------------------------------------- -Coff::CoffEditor::CoffEditor(const PURL::Url &source, const Device::Data &data, QWidget *parent) - : BaseEditor(source, &data, parent), _provided(0) +Coff::CoffEditor::CoffEditor(const PURL::Url &source, const Device::Data &data, TQWidget *tqparent) + : BaseEditor(source, &data, tqparent), _provided(0) {} -Coff::CoffEditor::CoffEditor(const TextObject &object, QWidget *parent) - : BaseEditor(PURL::Url(), object.device(), parent), _provided(&object) +Coff::CoffEditor::CoffEditor(const TextObject &object, TQWidget *tqparent) + : BaseEditor(PURL::Url(), object.device(), tqparent), _provided(&object) {} bool Coff::CoffEditor::open(const PURL::Url &url) @@ -56,8 +56,8 @@ bool Coff::CoffEditor::open(const PURL::Url &url) } //----------------------------------------------------------------------------- -Coff::ObjectEditor::ObjectEditor(const PURL::Url &source, QWidget *parent) - : BaseEditor(source, 0, parent) +Coff::ObjectEditor::ObjectEditor(const PURL::Url &source, TQWidget *tqparent) + : BaseEditor(source, 0, tqparent) {} bool Coff::ObjectEditor::open(const PURL::Url &url) @@ -68,13 +68,13 @@ bool Coff::ObjectEditor::open(const PURL::Url &url) _ok = _created->parse(*this); } if ( !_ok ) return setText(i18n("Error parsing object:\n") + error()); - QString s = coff()->information().text() + "\n"; + TQString s = coff()->information().text() + "\n"; return setText(s); } //----------------------------------------------------------------------------- -Coff::LibraryEditor::LibraryEditor(const PURL::Url &source, QWidget *parent) - : BaseEditor(source, 0, parent) +Coff::LibraryEditor::LibraryEditor(const PURL::Url &source, TQWidget *tqparent) + : BaseEditor(source, 0, tqparent) {} bool Coff::LibraryEditor::open(const PURL::Url &url) @@ -85,23 +85,23 @@ bool Coff::LibraryEditor::open(const PURL::Url &url) _ok = _created->parse(*this); } if ( !_ok ) return setText(i18n("Error parsing library:\n") + error()); - QString s = coff()->information().text() + "\n"; + TQString s = coff()->information().text() + "\n"; if ( coff()->members().count()!=0 ) s += coff()->membersInformation().text() + "\n"; if ( coff()->symbols().count()!=0 ) s += coff()->symbolsInformation().text() + "\n"; return setText(s); } //----------------------------------------------------------------------------- -DisassemblyEditor::DisassemblyEditor(const PURL::Url &source, const Device::Data &data, QWidget *parent) - : SimpleTextEditor(true, parent), _source(source), _device(data), _editor(0) +DisassemblyEditor::DisassemblyEditor(const PURL::Url &source, const Device::Data &data, TQWidget *tqparent) + : SimpleTextEditor(true, tqparent), _source(source), _device(data), _editor(0) { setReadOnly(true); _view->setDynWordWrap(false); setView(&Main::compileLog()); } -DisassemblyEditor::DisassemblyEditor(const HexEditor &e, const Device::Data &data, QWidget *parent) - : SimpleTextEditor(true, parent), _device(data), _editor(&e) +DisassemblyEditor::DisassemblyEditor(const HexEditor &e, const Device::Data &data, TQWidget *tqparent) + : SimpleTextEditor(true, tqparent), _device(data), _editor(&e) { setReadOnly(true); _view->setDynWordWrap(false); @@ -123,11 +123,11 @@ bool DisassemblyEditor::open(const PURL::Url &url) Device::Memory *memory = 0; if ( _editor==0 ) { - log(Log::LineType::Information, i18n("Disassembling hex file: %1").arg(_source.pretty())); + log(Log::LineType::Information, i18n("Disassembling hex file: %1").tqarg(_source.pretty())); PURL::File file(_source, Main::compileLog()); if ( !file.openForRead() ) return false; memory = _device.group().createMemory(_device); - QStringList errors, warnings; + TQStringList errors, warnings; Device::Memory::WarningTypes warningTypes; if ( !memory->load(file.stream(), errors, warningTypes, warnings) ) { delete memory; diff --git a/src/libgui/object_view.h b/src/libgui/object_view.h index 358101b..9b7ea65 100644 --- a/src/libgui/object_view.h +++ b/src/libgui/object_view.h @@ -24,8 +24,9 @@ class TextObject; class BaseEditor : public SimpleTextEditor, public Log::Base { Q_OBJECT + TQ_OBJECT public: - BaseEditor(const PURL::Url &source, const Device::Data *data, QWidget *parent); + BaseEditor(const PURL::Url &source, const Device::Data *data, TQWidget *tqparent); virtual ~BaseEditor(); virtual PURL::Url url() const { return _url; } @@ -40,9 +41,10 @@ protected: class CoffEditor : public BaseEditor { Q_OBJECT + TQ_OBJECT public: - CoffEditor(const PURL::Url &source, const Device::Data &data, QWidget *parent); - CoffEditor(const TextObject &object, QWidget *parent); + CoffEditor(const PURL::Url &source, const Device::Data &data, TQWidget *tqparent); + CoffEditor(const TextObject &object, TQWidget *tqparent); virtual PURL::FileType fileType() const { return PURL::Coff; } virtual bool open(const PURL::Url &url); @@ -54,8 +56,9 @@ private: class ObjectEditor : public BaseEditor { Q_OBJECT + TQ_OBJECT public: - ObjectEditor(const PURL::Url &source, QWidget *parent); + ObjectEditor(const PURL::Url &source, TQWidget *tqparent); virtual PURL::FileType fileType() const { return PURL::Unknown; } virtual bool open(const PURL::Url &url); @@ -67,8 +70,9 @@ private: class LibraryEditor : public BaseEditor { Q_OBJECT + TQ_OBJECT public: - LibraryEditor(const PURL::Url &source, QWidget *parent); + LibraryEditor(const PURL::Url &source, TQWidget *tqparent); virtual PURL::FileType fileType() const { return PURL::Unknown; } virtual bool open(const PURL::Url &url); @@ -82,9 +86,10 @@ private: class DisassemblyEditor : public SimpleTextEditor, public Log::Base { Q_OBJECT + TQ_OBJECT public: - DisassemblyEditor(const PURL::Url &hexUrl, const Device::Data &data, QWidget *parent); - DisassemblyEditor(const HexEditor &e, const Device::Data &data, QWidget *parent); + DisassemblyEditor(const PURL::Url &hexUrl, const Device::Data &data, TQWidget *tqparent); + DisassemblyEditor(const HexEditor &e, const Device::Data &data, TQWidget *tqparent); virtual PURL::FileType fileType() const { return PURL::AsmGPAsm; } virtual bool open(const PURL::Url &url); virtual PURL::Url url() const { return _url; } diff --git a/src/libgui/project.cpp b/src/libgui/project.cpp index dcf34c3..8ece518 100644 --- a/src/libgui/project.cpp +++ b/src/libgui/project.cpp @@ -16,12 +16,12 @@ #include "global_config.h" #include "tools/gputils/gputils_config.h" -bool Project::load(QString &error) +bool Project::load(TQString &error) { if ( _url.fileType()==PURL::Project ) return XmlDataFile::load(error); if ( !_url.exists() ) { - error = i18n("Project file %1 does not exist.").arg(_url.pretty()); + error = i18n("Project file %1 does not exist.").tqarg(_url.pretty()); return false; } PURL::Url tmp = _url; @@ -30,29 +30,29 @@ bool Project::load(QString &error) KConfig *config = new KSimpleConfig(tmp.filepath(), false); config->setGroup("Files"); - QStringList list = config->readListEntry("inputFiles"); - QStringList::const_iterator it = list.begin(); + TQStringList list = config->readListEntry("inputFiles"); + TQStringList::const_iterator it = list.begin(); for (; it!=list.end(); ++it) addFile(PURL::Url(directory(), *it)); config->setGroup("General"); setVersion(config->readEntry("version", "0.1")); - setDescription(config->readEntry("description", QString::null)); + setDescription(config->readEntry("description", TQString())); config->setGroup("Assembler"); - QString device = config->readEntry("target-device"); + TQString device = config->readEntry("target-device"); if ( device=="*" ) device = GlobalConfig::programmerGroup().supportedDevices()[0]; // compatibility Compile::Config::setDevice(this, Device::lister().checkName(device)); GPUtils::Config *gconfig = new GPUtils::Config(this); - gconfig->setGPAsmWarningLevel(QMIN(config->readUnsignedNumEntry("warn-level", 0), uint(GPUtils::Config::Nb_WarningLevels))); - gconfig->setRawIncludeDirs(Tool::Category::Assembler, config->readEntry("include-dir", QString::null)); - gconfig->setRawCustomOptions(Tool::Category::Assembler, config->readEntry("other-options", QString::null)); + gconfig->setGPAsmWarningLevel(TQMIN(config->readUnsignedNumEntry("warn-level", 0), uint(GPUtils::Config::Nb_WarningLevels))); + gconfig->setRawIncludeDirs(Tool::Category::Assembler, config->readEntry("include-dir", TQString())); + gconfig->setRawCustomOptions(Tool::Category::Assembler, config->readEntry("other-options", TQString())); config->setGroup("Linker") ; - QString hexFormatString = config->readEntry("hex-format", HexBuffer::FORMATS[HexBuffer::IHX32]); + TQString hexFormatString = config->readEntry("hex-format", HexBuffer::FORMATS[HexBuffer::IHX32]); for (uint i=0; isetHexFormat(HexBuffer::Format(i)); - gconfig->setRawIncludeDirs(Tool::Category::Linker, config->readEntry("objs-libs-dir", QString::null)); - gconfig->setRawCustomOptions(Tool::Category::Linker, config->readEntry("other-options", QString::null)); + gconfig->setRawIncludeDirs(Tool::Category::Linker, config->readEntry("objs-libs-dir", TQString())); + gconfig->setRawCustomOptions(Tool::Category::Linker, config->readEntry("other-options", TQString())); delete gconfig; delete config; @@ -62,8 +62,8 @@ bool Project::load(QString &error) PURL::UrlList Project::openedFiles() const { PURL::UrlList files; - QStringList list = listValues("general", "opened_files", QStringList()); - QStringList::const_iterator it = list.begin(); + TQStringList list = listValues("general", "opened_files", TQStringList()); + TQStringList::const_iterator it = list.begin(); for (; it!=list.end(); ++it) { if ( PURL::Url::fromPathOrUrl(*it).isRelative() ) files += PURL::Url(directory(), *it); else files += PURL::Url::fromPathOrUrl(*it); @@ -81,8 +81,8 @@ void Project::setOpenedFiles(const PURL::UrlList &list) PURL::UrlList Project::absoluteFiles() const { PURL::UrlList abs; - QStringList files = listValues("general", "files", QStringList()); - QStringList::const_iterator it = files.begin(); + TQStringList files = listValues("general", "files", TQStringList()); + TQStringList::const_iterator it = files.begin(); for (; it!=files.end(); ++it) abs += PURL::Url::fromPathOrUrl(*it).toAbsolute(directory()); return abs; } @@ -99,7 +99,7 @@ void Project::clearFiles() clearList("general", "files"); } -QString Project::toSourceObject(const PURL::Url &url, const QString &extension, bool forWindows) const +TQString Project::toSourceObject(const PURL::Url &url, const TQString &extension, bool forWindows) const { PURL::Url tmp; if ( extension.isEmpty() ) tmp = url.toFileType(PURL::Object); @@ -107,9 +107,9 @@ QString Project::toSourceObject(const PURL::Url &url, const QString &extension, return tmp.relativeTo(directory(), forWindows ? PURL::WindowsSeparator : PURL::UnixSeparator); } -QStringList Project::objectsForLinker(const QString &extension, bool forWindows) const +TQStringList Project::objectsForLinker(const TQString &extension, bool forWindows) const { - QStringList objs; + TQStringList objs; // objects files corresponding to src files PURL::UrlList files = absoluteFiles(); PURL::UrlList::const_iterator it; @@ -121,9 +121,9 @@ QStringList Project::objectsForLinker(const QString &extension, bool forWindows) return objs; } -QStringList Project::librariesForLinker(const QString &prefix, bool forWindows) const +TQStringList Project::librariesForLinker(const TQString &prefix, bool forWindows) const { - QStringList libs; + TQStringList libs; PURL::UrlList files = absoluteFiles(); PURL::UrlList::const_iterator it; for (it=files.begin(); it!=files.end(); ++it) @@ -131,11 +131,11 @@ QStringList Project::librariesForLinker(const QString &prefix, bool forWindows) return libs; } -QString Project::version() const +TQString Project::version() const { return Compile::Config::globalValue(this, "version", "0.1"); } -void Project::setVersion(const QString &version) +void Project::setVersion(const TQString &version) { Compile::Config::setGlobalValue(this, "version", version); } @@ -149,18 +149,18 @@ void Project::setOutputType(Tool::OutputType type) Compile::Config::setGlobalValue(this, "output_type", type.key()); } -QString Project::description() const +TQString Project::description() const { - return Compile::Config::globalValue(this, "description", QString::null); + return Compile::Config::globalValue(this, "description", TQString()); } -void Project::setDescription(const QString &description) +void Project::setDescription(const TQString &description) { Compile::Config::setGlobalValue(this, "description", description); } PURL::Url Project::customLinkerScript() const { - QString s = Compile::Config::globalValue(this, "custom_linker_script", QString::null); + TQString s = Compile::Config::globalValue(this, "custom_linker_script", TQString()); return PURL::Url::fromPathOrUrl(s); } void Project::setCustomLinkerScript(const PURL::Url &url) @@ -168,33 +168,33 @@ void Project::setCustomLinkerScript(const PURL::Url &url) Compile::Config::setGlobalValue(this, "custom_linker_script", url.filepath()); } -QValueList Project::watchedRegisters() const +TQValueList Project::watchedRegisters() const { - QValueList watched; - QStringList list = listValues("general", "watched_registers", QStringList()); - QStringList::const_iterator it; + TQValueList watched; + TQStringList list = listValues("general", "watched_registers", TQStringList()); + TQStringList::const_iterator it; for (it=list.begin(); it!=list.end(); ++it) { Register::TypeData rtd = Register::TypeData::fromString(*it); if ( rtd.type()!=Register::Invalid ) watched.append(rtd); } return watched; } -void Project::setWatchedRegisters(const QValueList &watched) +void Project::setWatchedRegisters(const TQValueList &watched) { clearList("general", "watched_registers"); - QValueList::const_iterator it; + TQValueList::const_iterator it; for (it=watched.begin(); it!=watched.end(); ++it) appendListValue("general", "watched_registers", (*it).toString()); } -QValueList Project::bookmarkLines(const PURL::Url &url) const +TQValueList Project::bookmarkLines(const PURL::Url &url) const { - QValueList lines; - QStringList list = listValues("editors", "bookmarks", QStringList()); - QStringList::const_iterator it; + TQValueList lines; + TQStringList list = listValues("editors", "bookmarks", TQStringList()); + TQStringList::const_iterator it; for (it=list.begin(); it!=list.end(); ++it) { - QStringList slist = QStringList::split(",", *it); - QStringList::const_iterator sit = slist.begin(); + TQStringList slist = TQStringList::split(",", *it); + TQStringList::const_iterator sit = slist.begin(); if ( sit==slist.end() || (*sit)!=url.kurl().url() ) continue; for (; sit!=slist.end(); ++sit) { bool ok; @@ -206,20 +206,20 @@ QValueList Project::bookmarkLines(const PURL::Url &url) const } return lines; } -void Project::setBookmarkLines(const PURL::Url &url, const QValueList &lines) +void Project::setBookmarkLines(const PURL::Url &url, const TQValueList &lines) { - QStringList list = listValues("editors", "bookmarks", QStringList()); - QStringList nlist; - QStringList::const_iterator it; + TQStringList list = listValues("editors", "bookmarks", TQStringList()); + TQStringList nlist; + TQStringList::const_iterator it; for (it=list.begin(); it!=list.end(); ++it) { - QStringList slist = QStringList::split(",", *it); - QStringList::const_iterator sit = slist.begin(); + TQStringList slist = TQStringList::split(",", *it); + TQStringList::const_iterator sit = slist.begin(); if ( sit!=slist.end() && slist.count()>1 && (*sit)!=url.kurl().url() ) nlist += *it; } if ( lines.count()!=0 ) { - QStringList slist = url.kurl().url(); - QValueList::const_iterator lit; - for (lit=lines.begin(); lit!=lines.end(); ++lit) slist += QString::number(*lit); + TQStringList slist = url.kurl().url(); + TQValueList::const_iterator lit; + for (lit=lines.begin(); lit!=lines.end(); ++lit) slist += TQString::number(*lit); nlist += slist.join(","); } setListValues("editors", "bookmarks", nlist); diff --git a/src/libgui/project.h b/src/libgui/project.h index 0dfdeab..b8bf491 100644 --- a/src/libgui/project.h +++ b/src/libgui/project.h @@ -18,32 +18,32 @@ class Project : public XmlDataFile { public: Project(const PURL::Url &url) : XmlDataFile(url, "piklab") {} - virtual bool load(QString &error); + virtual bool load(TQString &error); PURL::Directory directory() const { return url().directory(); } - QString name() const { return url().basename(); } + TQString name() const { return url().basename(); } PURL::UrlList absoluteFiles() const; - QString version() const; - QString description() const; + TQString version() const; + TQString description() const; Tool::OutputType outputType() const; PURL::UrlList openedFiles() const; PURL::Url customLinkerScript() const; - QValueList watchedRegisters() const; - QString toSourceObject(const PURL::Url &url, const QString &extension, bool forWindows) const; - QStringList objectsForLinker(const QString &extension, bool forWindows) const; - QStringList librariesForLinker(const QString &prefix, bool forWindows) const; - QValueList bookmarkLines(const PURL::Url &url) const; // absolute filepath + TQValueList watchedRegisters() const; + TQString toSourceObject(const PURL::Url &url, const TQString &extension, bool forWindows) const; + TQStringList objectsForLinker(const TQString &extension, bool forWindows) const; + TQStringList librariesForLinker(const TQString &prefix, bool forWindows) const; + TQValueList bookmarkLines(const PURL::Url &url) const; // absolute filepath void removeFile(const PURL::Url &url); // take absolute filepath (but inside project dir) void addFile(const PURL::Url &url); // take absolute filePath (but inside project dir) void clearFiles(); - void setVersion(const QString &version); - void setDescription(const QString &description); + void setVersion(const TQString &version); + void setDescription(const TQString &description); void setOutputType(Tool::OutputType type); void setOpenedFiles(const PURL::UrlList &list); void setCustomLinkerScript(const PURL::Url &url); - void setWatchedRegisters(const QValueList &watched); - void setBookmarkLines(const PURL::Url &url, const QValueList &lines); // absolute filepath + void setWatchedRegisters(const TQValueList &watched); + void setBookmarkLines(const PURL::Url &url, const TQValueList &lines); // absolute filepath }; #endif diff --git a/src/libgui/project_editor.cpp b/src/libgui/project_editor.cpp index 4b86429..bfb2d8c 100644 --- a/src/libgui/project_editor.cpp +++ b/src/libgui/project_editor.cpp @@ -9,41 +9,41 @@ ***************************************************************************/ #include "project_editor.h" -#include -#include +#include +#include #include #include "project.h" #include "tools/list/compile_config.h" #include "device_gui.h" -ProjectEditor::ProjectEditor(Project &project, QWidget *parent) - : Dialog(parent, "project_options", true, i18n("Project Options"), Ok|Cancel, Ok, false), +ProjectEditor::ProjectEditor(Project &project, TQWidget *tqparent) + : Dialog(tqparent, "project_options", true, i18n("Project Options"), Ok|Cancel, Ok, false), _project(project) { - QVBoxLayout *top = new QVBoxLayout(mainWidget(), 0, 10); + TQVBoxLayout *top = new TQVBoxLayout(mainWidget(), 0, 10); TabWidget *tabWidget = new TabWidget(mainWidget()); top->addWidget(tabWidget); // global - QWidget *tab = new QWidget(tabWidget); + TQWidget *tab = new TQWidget(tabWidget); tabWidget->addTab(tab, i18n("General")); - QGridLayout *grid = new QGridLayout(tab, 0, 0, 10, 10); - QLabel *label = new QLabel(i18n("Name:"), tab); + TQGridLayout *grid = new TQGridLayout(tab, 0, 0, 10, 10); + TQLabel *label = new TQLabel(i18n("Name:"), tab); grid->addWidget(label, 0, 0); - label = new QLabel(project.name(), tab); + label = new TQLabel(project.name(), tab); grid->addWidget(label, 0, 1); - label = new QLabel(i18n("Description:"), tab); + label = new TQLabel(i18n("Description:"), tab); grid->addWidget(label, 1, 0); - _description = new QTextEdit(tab); + _description = new TQTextEdit(tab); _description->setText(_project.description()); grid->addMultiCellWidget(_description, 1,1, 1,2); - label = new QLabel(i18n("Version:"), tab); + label = new TQLabel(i18n("Version:"), tab); grid->addWidget(label, 2, 0); - _version = new QLineEdit(tab); + _version = new TQLineEdit(tab); _version->setText(_project.version()); grid->addWidget(_version, 2, 1); - label = new QLabel(i18n("Device:"), tab); + label = new TQLabel(i18n("Device:"), tab); grid->addWidget(label, 3, 0); _device = new DeviceChooser::Button(false, tab); _device->setDevice(Compile::Config::device(&_project)); @@ -52,9 +52,9 @@ ProjectEditor::ProjectEditor(Project &project, QWidget *parent) grid->setColStretch(2, 1); // toochain - tab = new QWidget(tabWidget); + tab = new TQWidget(tabWidget); tabWidget->addTab(tab, i18n("Toochain")); - grid = new QGridLayout(tab, 0, 0, 10, 10); + grid = new TQGridLayout(tab, 0, 0, 10, 10); _tools = new ToolsConfigWidget(&project, tab); _tools->loadConfig(); grid->addMultiCellWidget(_tools, 0,0, 0,2); diff --git a/src/libgui/project_editor.h b/src/libgui/project_editor.h index 5e83fe2..8ae4df6 100644 --- a/src/libgui/project_editor.h +++ b/src/libgui/project_editor.h @@ -17,10 +17,10 @@ #ifndef PROJECT_EDITOR_H #define PROJECT_EDITOR_H -#include -#include -#include -#include +#include +#include +#include +#include #include "tools/list/tools_config_widget.h" #include "common/gui/misc_gui.h" @@ -30,16 +30,17 @@ namespace DeviceChooser { class Button; } class ProjectEditor : public Dialog { Q_OBJECT + TQ_OBJECT public: - ProjectEditor(Project &project, QWidget *parent); + ProjectEditor(Project &project, TQWidget *tqparent); private slots: virtual void slotOk(); private: Project &_project; - QTextEdit *_description; - QLineEdit *_version; + TQTextEdit *_description; + TQLineEdit *_version; DeviceChooser::Button *_device; ToolsConfigWidget *_tools; }; diff --git a/src/libgui/project_manager.cpp b/src/libgui/project_manager.cpp index dcc4941..e606370 100644 --- a/src/libgui/project_manager.cpp +++ b/src/libgui/project_manager.cpp @@ -9,11 +9,11 @@ ***************************************************************************/ #include "project_manager.h" -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -35,26 +35,26 @@ #include "device_gui.h" //---------------------------------------------------------------------------- -ProjectManager::View::View(QWidget *parent) - : ListView(parent, "project_manager"), _project(0), _modified(false) +ProjectManager::View::View(TQWidget *tqparent) + : ListView(tqparent, "project_manager"), _project(0), _modified(false) { - connect(this, SIGNAL(mouseButtonClicked(int, QListViewItem *, const QPoint &, int)), - SLOT(clicked(int, QListViewItem *, const QPoint &, int))); - connect(this, SIGNAL(contextMenuRequested(QListViewItem *, const QPoint &, int)), - SLOT(contextMenu(QListViewItem *, const QPoint &, int))); - connect(this, SIGNAL(itemRenamed(QListViewItem *, int, const QString &)), - SLOT(renamed(QListViewItem *, int, const QString &))); - connect(this, SIGNAL(moved()), SLOT(filesReordered())); + connect(TQT_TQOBJECT(this), TQT_SIGNAL(mouseButtonClicked(int, TQListViewItem *, const TQPoint &, int)), + TQT_SLOT(clicked(int, TQListViewItem *, const TQPoint &, int))); + connect(TQT_TQOBJECT(this), TQT_SIGNAL(contextMenuRequested(TQListViewItem *, const TQPoint &, int)), + TQT_SLOT(contextMenu(TQListViewItem *, const TQPoint &, int))); + connect(TQT_TQOBJECT(this), TQT_SIGNAL(itemRenamed(TQListViewItem *, int, const TQString &)), + TQT_SLOT(renamed(TQListViewItem *, int, const TQString &))); + connect(TQT_TQOBJECT(this), TQT_SIGNAL(moved()), TQT_SLOT(filesReordered())); header()->hide(); setSorting(-1); - addColumn(QString::null, 170); + addColumn(TQString(), 170); setFullWidth(true); setRootIsDecorated(false); setAcceptDrops(true); setDragEnabled(true); setDropVisualizer(true); - QTimer::singleShot(0, this, SLOT(init()));; + TQTimer::singleShot(0, TQT_TQOBJECT(this), TQT_SLOT(init()));; } ProjectManager::View::~View() @@ -77,7 +77,7 @@ void ProjectManager::View::init() ProjectManager::HeaderItem *ProjectManager::View::findHeaderItem(Group group) const { - QListViewItemIterator it(const_cast(this)); + TQListViewItemIterator it(const_cast(this)); for(; it.current(); ++it) { if ( it.current()->rtti()!=HeaderRtti ) continue; HeaderItem *hi = static_cast(it.current()); @@ -106,7 +106,7 @@ ProjectManager::HeaderItem *ProjectManager::View::headerItem(Group group) ProjectManager::FileItem *ProjectManager::View::findFileItem(const PURL::Url &url) const { - QListViewItemIterator it(const_cast(this)); + TQListViewItemIterator it(const_cast(this)); for(; it.current(); ++it) { if ( it.current()->rtti()!=FileRtti ) continue; FileItem *fi = static_cast(it.current()); @@ -117,7 +117,7 @@ ProjectManager::FileItem *ProjectManager::View::findFileItem(const PURL::Url &ur ProjectManager::FileItem *ProjectManager::View::findFileItem(PURL::FileType type) const { - QListViewItemIterator it(const_cast(this)); + TQListViewItemIterator it(const_cast(this)); for(; it.current(); ++it) { if ( it.current()->rtti()!=FileRtti ) continue; FileItem *fi = static_cast(it.current()); @@ -126,9 +126,9 @@ ProjectManager::FileItem *ProjectManager::View::findFileItem(PURL::FileType type return 0; } -QListViewItem *ProjectManager::View::findItem(const QString &tag) const +TQListViewItem *ProjectManager::View::findItem(const TQString &tag) const { - QListViewItemIterator it(const_cast(this)); + TQListViewItemIterator it(const_cast(this)); for(; it.current(); ++it) { switch (Rtti(it.current()->rtti())) { case RootRtti: @@ -145,14 +145,14 @@ QListViewItem *ProjectManager::View::findItem(const QString &tag) const void ProjectManager::View::select(const Editor *e) { - QListViewItem *item = 0; + TQListViewItem *item = 0; if ( e->url().isEmpty() ) item = findItem(e->tag()); else item = findFileItem(e->url()); if (item) setSelected(item, true); else clearSelection(); } -void ProjectManager::View::contextMenu(QListViewItem *item, const QPoint &p, int) +void ProjectManager::View::contextMenu(TQListViewItem *item, const TQPoint &p, int) { if ( item==0 ) return; @@ -178,8 +178,8 @@ void ProjectManager::View::contextMenu(QListViewItem *item, const QPoint &p, int RootItem *ri = static_cast(item); if ( _project==0 ) { if ( ri->url().isEmpty() ) { - pop.insertItem("piklab_createproject", i18n("New Project..."), &Main::toplevel(), SLOT(newProject())); - pop.insertItem("piklab_openproject", i18n("Open Project..."), &Main::toplevel(), SLOT(openProject())); + pop.insertItem("piklab_createproject", i18n("New Project..."), TQT_TQOBJECT(&Main::toplevel()), TQT_SLOT(newProject())); + pop.insertItem("piklab_openproject", i18n("Open Project..."), TQT_TQOBJECT(&Main::toplevel()), TQT_SLOT(openProject())); pop.exec(p); } else { pop.insertTitle(i18n("Standalone File")); @@ -188,16 +188,16 @@ void ProjectManager::View::contextMenu(QListViewItem *item, const QPoint &p, int } } else { pop.insertTitle(i18n("Project")); - pop.insertItem("configure", i18n("Options..."), &Main::toplevel(), SLOT(configureProject())); - pop.insertItem("find", i18n("Find Files..."), &Main::toplevel(), SLOT(runKfind())); + pop.insertItem("configure", i18n("Options..."), TQT_TQOBJECT(&Main::toplevel()), TQT_SLOT(configureProject())); + pop.insertItem("tqfind", i18n("Find Files..."), TQT_TQOBJECT(&Main::toplevel()), TQT_SLOT(runKtqfind())); pop.insertSeparator(); - pop.insertItem("piklab_compile", i18n("Build Project"), &Main::toplevel(), SLOT(buildProject())); - pop.insertItem("trashcan_empty", i18n("Clean Project"), &Main::toplevel(), SLOT(cleanBuild())); + pop.insertItem("piklab_compile", i18n("Build Project"), TQT_TQOBJECT(&Main::toplevel()), TQT_SLOT(buildProject())); + pop.insertItem("trashcan_empty", i18n("Clean Project"), TQT_TQOBJECT(&Main::toplevel()), TQT_SLOT(cleanBuild())); pop.insertSeparator(); - pop.insertItem("filenew", i18n("New Source File..."), &Main::toplevel(), SLOT(newSourceFile())); - pop.insertItem("piklab_addfile", i18n("Add Source Files..."), this, SLOT(insertSourceFiles())); - pop.insertItem("piklab_addfile", i18n("Add Object Files..."), this, SLOT(insertObjectFiles())); - if ( Main::currentEditor() ) pop.insertItem("piklab_addcurrentfile", i18n("Add Current File"), this, SLOT(insertCurrentFile())); + pop.insertItem("filenew", i18n("New Source File..."), TQT_TQOBJECT(&Main::toplevel()), TQT_SLOT(newSourceFile())); + pop.insertItem("piklab_addfile", i18n("Add Source Files..."), TQT_TQOBJECT(this), TQT_SLOT(insertSourceFiles())); + pop.insertItem("piklab_addfile", i18n("Add Object Files..."), TQT_TQOBJECT(this), TQT_SLOT(insertObjectFiles())); + if ( Main::currentEditor() ) pop.insertItem("piklab_addcurrentfile", i18n("Add Current File"), TQT_TQOBJECT(this), TQT_SLOT(insertCurrentFile())); pop.exec(p); } } else if ( item->rtti()==FileRtti ) { @@ -211,15 +211,15 @@ void ProjectManager::View::contextMenu(QListViewItem *item, const QPoint &p, int if ( _project==0 ) return; if ( group==LinkerObjectGroup ) { pop.insertTitle(i18n("Objects")); - pop.insertItem("piklab_addfile", i18n("Add Object Files..."), this, SLOT(insertObjectFiles())); + pop.insertItem("piklab_addfile", i18n("Add Object Files..."), TQT_TQOBJECT(this), TQT_SLOT(insertObjectFiles())); pop.exec(p); } else if ( group==SourceGroup || group==HeaderGroup ) { pop.insertTitle(i18n("Sources")); - pop.insertItem("filenew", i18n("New File..."), &Main::toplevel(), SLOT(newSourceFile())); - pop.insertItem("piklab_addfile", i18n("Add Source Files..."), this, SLOT(insertSourceFiles())); + pop.insertItem("filenew", i18n("New File..."), TQT_TQOBJECT(&Main::toplevel()), TQT_SLOT(newSourceFile())); + pop.insertItem("piklab_addfile", i18n("Add Source Files..."), TQT_TQOBJECT(this), TQT_SLOT(insertSourceFiles())); pop.exec(p); } else if ( group==DeviceGroup ) { - pop.insertItem("filenew", i18n("Select Device..."), &Main::toplevel(), SLOT(showDeviceInfo())); + pop.insertItem("filenew", i18n("Select Device..."), TQT_TQOBJECT(&Main::toplevel()), TQT_SLOT(showDeviceInfo())); pop.exec(p); } } @@ -240,9 +240,9 @@ void ProjectManager::View::closeProject() _project->setOpenedFiles(opened); // save watched registers _project->setWatchedRegisters(Register::list().watched()); - QString error; + TQString error; if ( !_project->save(error) ) - MessageBox::detailedSorry(i18n("Could not save project file \"%1\".").arg(_project->url().pretty()), error, Log::Show); + MessageBox::detailedSorry(i18n("Could not save project file \"%1\".").tqarg(_project->url().pretty()), error, Log::Show); delete _project; _project = 0; } @@ -252,8 +252,8 @@ void ProjectManager::View::closeProject() void ProjectManager::View::addExternalFiles() { - const QMap &ext = projectData().externals; - QMap::const_iterator it; + const TQMap &ext = projectData().externals; + TQMap::const_iterator it; for (it=ext.begin(); it!=ext.end(); ++it) { if ( !it.key().exists() ) continue; addFile(it.key(), it.key().fileType(), it.data()); @@ -272,9 +272,9 @@ void ProjectManager::View::setStandalone(const PURL::Url &url, PURL::FileType ty PURL::Url ProjectManager::View::standaloneGenerator(const PURL::Url &url, PURL::FileType &type) const { - QMap::const_iterator it; + TQMap::const_iterator it; for (it=_standaloneData.begin(); it!=_standaloneData.end(); ++it) { - if ( !it.data().externals.contains(url) ) continue; + if ( !it.data().externals.tqcontains(url) ) continue; if ( !it.key().exists() ) continue; type = it.data().type; return it.key(); @@ -304,25 +304,25 @@ void ProjectManager::View::insertObjectFiles() void ProjectManager::View::insertFile(const PURL::Url &url) { if ( !url.exists() ) { - MessageBox::detailedSorry(i18n("Could not find file."), i18n("File: %1").arg(url.pretty()), Log::Show); + MessageBox::detailedSorry(i18n("Could not find file."), i18n("File: %1").tqarg(url.pretty()), Log::Show); return; } PURL::Url purl = url; MessageBox::Result copy = MessageBox::No; if ( !url.isInto(_project->directory()) ) { - copy = MessageBox::questionYesNoCancel(i18n("File \"%1\" is not inside the project directory. Do you want to copy the file to your project directory?").arg(url.pretty()), + copy = MessageBox::questionYesNoCancel(i18n("File \"%1\" is not inside the project directory. Do you want to copy the file to your project directory?").tqarg(url.pretty()), i18n("Copy and Add"), i18n("Add only")); if ( copy==MessageBox::Cancel ) return; if ( copy==MessageBox::Yes ) purl = PURL::Url(_project->directory(), url.filename()); } - if ( _project->absoluteFiles().contains(purl) ) { - MessageBox::detailedSorry(i18n("File is already in the project."), i18n("File: %1").arg(purl.pretty()), Log::Show); + if ( _project->absoluteFiles().tqcontains(purl) ) { + MessageBox::detailedSorry(i18n("File is already in the project."), i18n("File: %1").tqarg(purl.pretty()), Log::Show); return; } if ( copy==MessageBox::Yes ) { Log::StringView sview; if ( !url.copyTo(purl, sview) ) { - MessageBox::detailedSorry(i18n("Copying file to project directory failed."), i18n("File: %1\n").arg(url.pretty()) + sview.string(), Log::Show); + MessageBox::detailedSorry(i18n("Copying file to project directory failed."), i18n("File: %1\n").tqarg(url.pretty()) + sview.string(), Log::Show); return; } } @@ -356,8 +356,8 @@ ProjectManager::View::ProjectData &ProjectManager::View::projectData() void ProjectManager::View::addFile(const PURL::Url &url, PURL::FileType type, FileOrigin origin) { - if ( contains(url) ) return; - QMap &ext = projectData().externals; + if ( tqcontains(url) ) return; + TQMap &ext = projectData().externals; if ( type.data().group==PURL::LinkerScript && _linkerScriptItem ) { _linkerScriptItem->set(url); ext[url] = Included; @@ -371,12 +371,12 @@ void ProjectManager::View::addFile(const PURL::Url &url, PURL::FileType type, Fi case Included: grp = IncludedGroup; break; } HeaderItem *hitem = headerItem(grp); - QListViewItem *item = new FileItem(hitem, type, url, origin!=Intrinsic); + TQListViewItem *item = new FileItem(hitem, type, url, origin!=Intrinsic); item->moveItem(hitem->lastChild()); ensureItemVisible(item); if ( origin!=Intrinsic ) ext[url] = origin; if ( type==PURL::Hex && _project==0 ) { - QString extension = PURL::extension(PURL::AsmGPAsm); + TQString extension = PURL::extension(PURL::AsmGPAsm); PURL::Url durl = PURL::Url::fromPathOrUrl("<" + (url.isEmpty() ? i18n("Disassembly") : url.appendExtension(extension).filename()) + ">"); if ( findFileItem(durl)==0 ) { (void)new FileItem(headerItem(ViewGroup), PURL::Coff, durl, true); @@ -388,8 +388,8 @@ void ProjectManager::View::addFile(const PURL::Url &url, PURL::FileType type, Fi void ProjectManager::View::removeExternalFiles() { - QMap &ext = projectData().externals; - QMap::const_iterator it; + TQMap &ext = projectData().externals; + TQMap::const_iterator it; for (it=ext.begin(); it!=ext.end(); ++it) { Main::editorManager().closeEditor(it.key()); removeFile(it.key()); @@ -403,17 +403,17 @@ void ProjectManager::View::removeFile(const PURL::Url &url) if ( _project && !isExternalFile(url) ) _project->removeFile(url); FileItem *item = findFileItem(url); if ( item==0 ) return; - HeaderItem *group = static_cast(item->parent()); + HeaderItem *group = static_cast(item->tqparent()); delete item; if ( group->childCount()==0 ) delete group; _modified = true; emit guiChanged(); } -void ProjectManager::View::clicked(int button, QListViewItem *item, const QPoint &, int) +void ProjectManager::View::clicked(int button, TQListViewItem *item, const TQPoint &, int) { if ( item==0 ) return; - if ( button!=LeftButton ) return; + if ( button!=Qt::LeftButton ) return; const Device::Data *data = Main::deviceData(); Rtti rtti = Rtti(item->rtti()); if ( data==0 && rtti!=DeviceRtti && rtti!=RootRtti ) { @@ -421,7 +421,7 @@ void ProjectManager::View::clicked(int button, QListViewItem *item, const QPoint return; } Editor *e = 0; - ::BusyCursor bc; + ::PBusyCursor bc; switch (rtti) { case RootRtti: Main::toplevel().configureProject(); @@ -458,7 +458,7 @@ void ProjectManager::View::clicked(int button, QListViewItem *item, const QPoint if ( fi->ftype()==PURL::Coff && _project==0 && !fi->url().exists() ) { PURL::Url url = findFileItem(PURL::Hex)->url(); if ( url.isEmpty() ) { - HexEditor *he = ::qt_cast(Main::currentEditor()); + HexEditor *he = ::tqqt_cast(Main::currentEditor()); if ( he==0 ) break; e = new DisassemblyEditor(*he, *data, this); } else e = new DisassemblyEditor(url, *data, this); @@ -487,7 +487,7 @@ void ProjectManager::View::insertCurrentFile() bool ProjectManager::View::editProject() { ProjectEditor dialog(*_project, this); - if ( dialog.exec()!=QDialog::Accepted ) return false; + if ( dialog.exec()!=TQDialog::Accepted ) return false; _modified = true; if (_linkerScriptItem) _linkerScriptItem->init(); return true; @@ -496,9 +496,9 @@ bool ProjectManager::View::editProject() bool ProjectManager::View::newProject() { ProjectWizard wizard(this); - if ( wizard.exec()==QDialog::Rejected ) return false; + if ( wizard.exec()==TQDialog::Rejected ) return false; closeProject(); - QString error; + TQString error; if ( !wizard.project()->save(error) ) { MessageBox::detailedSorry(i18n("Failed to create new project file"), error, Log::Show); return false; @@ -526,7 +526,7 @@ bool ProjectManager::View::openProject(const PURL::Url &url) if ( reload && !MessageBox::askContinue(i18n("Project already loaded. Reload?"), i18n("Reload")) ) return false; static_cast< KRecentFilesAction *>(Main::action("project_open_recent"))->removeURL(url.kurl()); Project *p = new Project(url); - QString error; + TQString error; if ( !p->load(error) ) { MessageBox::detailedSorry(i18n("Could not open project file."), error, Log::Show); delete p; @@ -542,8 +542,8 @@ bool ProjectManager::View::openProject(const PURL::Url &url) files = _project->openedFiles(); for(it = files.begin(); it!=files.end(); ++it) Main::editorManager().openFile(*it); Register::list().init(); - QValueList watched = _project->watchedRegisters(); - QValueList::const_iterator wit; + TQValueList watched = _project->watchedRegisters(); + TQValueList::const_iterator wit; for (wit=watched.begin(); wit!=watched.end(); ++wit) Register::list().setWatched(*wit, true); return true; } @@ -551,7 +551,7 @@ bool ProjectManager::View::openProject(const PURL::Url &url) bool ProjectManager::View::isExternalFile(const PURL::Url &url) const { if ( projectUrl().isEmpty() ) return false; - return projectData().externals.contains(url); + return projectData().externals.tqcontains(url); } void ProjectManager::View::modified(const PURL::Url &url) @@ -560,7 +560,7 @@ void ProjectManager::View::modified(const PURL::Url &url) if ( item && !isExternalFile(url) ) _modified = true; } -void ProjectManager::View::renamed(QListViewItem *item, int, const QString &text) +void ProjectManager::View::renamed(TQListViewItem *item, int, const TQString &text) { Q_ASSERT ( item->rtti()==DeviceRtti ); Main::toplevel().setDevice(text); @@ -571,23 +571,23 @@ void ProjectManager::View::updateGUI() _deviceItem->updateText(); } -QDragObject *ProjectManager::View::dragObject() +TQDragObject *ProjectManager::View::dragObject() { if ( currentItem()==0 || currentItem()->rtti()!=FileRtti ) return 0; const FileItem *item = static_cast(currentItem()); - const HeaderItem *hitem = static_cast(item->parent()); + const HeaderItem *hitem = static_cast(item->tqparent()); if ( hitem->group()!=SourceGroup ) return 0; - QStrList uris; - uris.append(QUriDrag::localFileToUri(item->url().filepath())); - return new QUriDrag(uris, viewport()); + TQStrList uris; + uris.append(TQUriDrag::localFileToUri(item->url().filepath())); + return new TQUriDrag(uris, viewport()); } -bool ProjectManager::View::acceptDrag(QDropEvent* e) const +bool ProjectManager::View::acceptDrag(TQDropEvent* e) const { if ( e->source()!=viewport() ) return false; - const QListViewItem *item = itemAt(e->pos()); + const TQListViewItem *item = itemAt(e->pos()); if ( item==0 || item->rtti()!=FileRtti ) return false; - const HeaderItem *hitem = static_cast(item->parent()); + const HeaderItem *hitem = static_cast(item->tqparent()); return ( hitem->group()==SourceGroup ); } @@ -595,12 +595,12 @@ void ProjectManager::View::filesReordered() { if ( _project==0 ) return; _project->clearFiles(); - QListViewItem *item = headerItem(SourceGroup)->firstChild(); + TQListViewItem *item = headerItem(SourceGroup)->firstChild(); for (;item; item=item->nextSibling()) _project->addFile(static_cast(item)->url()); } -QString ProjectManager::View::tooltip(QListViewItem *item, int) const +TQString ProjectManager::View::tooltip(TQListViewItem *item, int) const { switch (Rtti(item->rtti())) { case RootRtti: @@ -610,12 +610,12 @@ QString ProjectManager::View::tooltip(QListViewItem *item, int) const case RegisterRtti: case HeaderRtti: break; } - return QString::null; + return TQString(); } PURL::Url ProjectManager::View::linkerScriptUrl() const { - QListViewItemIterator it(const_cast(this)); + TQListViewItemIterator it(const_cast(this)); for(; it.current(); ++it) { if ( it.current()->rtti()!=LinkerScriptRtti ) continue; return static_cast(it.current())->url(); @@ -627,14 +627,14 @@ bool ProjectManager::View::needsRecompile() const { // ### this could be perfected... PURL::Url output = projectUrl().toFileType(PURL::Hex); - QDateTime outputLastModified; + TQDateTime outputLastModified; if ( !output.exists(&outputLastModified) ) return true; PURL::UrlList files; if ( Main::project() ) files = Main::project()->absoluteFiles(); else files.append(projectUrl()); PURL::UrlList::const_iterator it; for (it=files.begin(); it!=files.end(); ++it) { - QDateTime lastModified; + TQDateTime lastModified; if ( !(*it).exists(&lastModified) ) continue; if ( lastModified>outputLastModified ) return true; } @@ -643,7 +643,7 @@ bool ProjectManager::View::needsRecompile() const PURL::Url ProjectManager::View::selectedUrl() const { - QListViewItem *item = currentItem(); + TQListViewItem *item = currentItem(); if ( item==0 ) return PURL::Url(); Rtti rtti = Rtti(item->rtti()); if ( rtti!=FileRtti ) return PURL::Url(); diff --git a/src/libgui/project_manager.h b/src/libgui/project_manager.h index 2939f33..6151713 100644 --- a/src/libgui/project_manager.h +++ b/src/libgui/project_manager.h @@ -24,8 +24,9 @@ namespace ProjectManager class View : public ListView { Q_OBJECT + TQ_OBJECT public: - View(QWidget *parent); + View(TQWidget *tqparent); virtual ~View(); bool editProject(); @@ -43,7 +44,7 @@ public: void removeFile(const PURL::Url &url); void select(const Editor *e); void insertFile(const PURL::Url &url); - bool contains(const PURL::Url &url) const { return findFileItem(url); } + bool tqcontains(const PURL::Url &url) const { return findFileItem(url); } void addExternalFile(const PURL::Url &url, FileOrigin fileOrigin); bool isExternalFile(const PURL::Url &url) const; void removeExternalFiles(); @@ -60,9 +61,9 @@ public slots: private slots: void init(); - void contextMenu(QListViewItem *item, const QPoint &pos, int column); - void clicked(int button, QListViewItem *item, const QPoint &pos, int column); - void renamed(QListViewItem *item, int column, const QString &text); + void contextMenu(TQListViewItem *item, const TQPoint &pos, int column); + void clicked(int button, TQListViewItem *item, const TQPoint &pos, int column); + void renamed(TQListViewItem *item, int column, const TQString &text); void modified(const PURL::Url &url); void filesReordered(); @@ -77,9 +78,9 @@ private: class ProjectData { public: PURL::FileType type; - QMap externals; + TQMap externals; }; - QMap _standaloneData; + TQMap _standaloneData; ProjectData _projectData; bool _modified; @@ -87,13 +88,13 @@ private: HeaderItem *headerItem(Group group); FileItem *findFileItem(const PURL::Url &url) const; FileItem *findFileItem(PURL::FileType type) const; - QListViewItem *findItem(const QString &name) const; - virtual QDragObject *dragObject(); - virtual bool acceptDrag(QDropEvent* e) const; - virtual QString tooltip(QListViewItem *item, int col) const; + TQListViewItem *findItem(const TQString &name) const; + virtual TQDragObject *dragObject(); + virtual bool acceptDrag(TQDropEvent* e) const; + virtual TQString tooltip(TQListViewItem *item, int col) const; void addExternalFiles(); - void rightClicked(QListViewItem *item, const QPoint &pos); - void leftClicked(QListViewItem *item); + void rightClicked(TQListViewItem *item, const TQPoint &pos); + void leftClicked(TQListViewItem *item); void addFile(const PURL::Url &url, PURL::FileType type, FileOrigin origin); void setProject(Project *project); void initListView(); diff --git a/src/libgui/project_manager_ui.cpp b/src/libgui/project_manager_ui.cpp index 235d360..2d2bd15 100644 --- a/src/libgui/project_manager_ui.cpp +++ b/src/libgui/project_manager_ui.cpp @@ -9,7 +9,7 @@ ***************************************************************************/ #include "project_manager_ui.h" -#include +#include #include #include "project.h" @@ -19,10 +19,10 @@ #include "device_gui.h" //---------------------------------------------------------------------------- -void PopupMenu::insertItem(const QString &icon, const QString &label, QObject *receiver, const char *slot) +void PopupMenu::insertItem(const TQString &icon, const TQString &label, TQObject *receiver, const char *slot) { KIconLoader loader; - QPixmap pixmap = loader.loadIcon(icon, KIcon::Small); + TQPixmap pixmap = loader.loadIcon(icon, KIcon::Small); if (receiver) KPopupMenu::insertItem(pixmap, label, receiver, slot, 0, _index); else KPopupMenu::insertItem(pixmap, label, _index); _index++; @@ -71,9 +71,9 @@ ProjectManager::HeaderItem::HeaderItem(RootItem *item, Group group) setText(0, i18n(GROUP_LABELS[group])); } -QListViewItem *ProjectManager::HeaderItem::lastChild() const +TQListViewItem *ProjectManager::HeaderItem::lastChild() const { - QListViewItem *item = firstChild(); + TQListViewItem *item = firstChild(); if ( item==0 ) return 0; for (;;) { if ( item->nextSibling()==0 ) break; @@ -101,7 +101,7 @@ void ProjectManager::FileItem::set(const PURL::Url &url) case PURL::Project: case PURL::Nb_FileTypes: Q_ASSERT(false); break; default: { - QString s = url.filename(); + TQString s = url.filename(); if ( _external && group(_ftype)==LinkerScriptGroup ) s += i18n(" (default)"); setText(0, s); break; @@ -109,10 +109,10 @@ void ProjectManager::FileItem::set(const PURL::Url &url) } } -void ProjectManager::FileItem::paintCell(QPainter *p, const QColorGroup &cg, +void ProjectManager::FileItem::paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int align) { - QFont f = p->font(); + TQFont f = p->font(); f.setItalic(group(_ftype)!=ViewGroup && _external); p->setFont(f); KListViewItem::paintCell(p, cg, column, width, align); @@ -122,7 +122,7 @@ ProjectManager::RegisterItem::RegisterItem(HeaderItem *item) : KListViewItem(item) { KIconLoader loader; - QPixmap chip = loader.loadIcon("piklab_chip", KIcon::Small); + TQPixmap chip = loader.loadIcon("piklab_chip", KIcon::Small); setPixmap(0, chip); setText(0, i18n("Registers")); } @@ -131,18 +131,18 @@ ProjectManager::DeviceItem::DeviceItem(HeaderItem *item) : EditListViewItem(item) {} -QWidget *ProjectManager::DeviceItem::editWidgetFactory(int) const +TQWidget *ProjectManager::DeviceItem::editWidgetFactory(int) const { - QComboBox *combo = new DeviceChooser::ComboBox(Main::project()==0, 0); - QString device = Main::device(); + TQComboBox *combo = new DeviceChooser::ComboBox(Main::project()==0, 0); + TQString device = Main::device(); if ( device!=Device::AUTO_DATA.name ) combo->setCurrentText(device); - QObject::connect(combo, SIGNAL(activated(int)), listView(), SLOT(finishRenaming())); + TQObject::connect(combo, TQT_SIGNAL(activated(int)), listView(), TQT_SLOT(finishRenaming())); return combo; } void ProjectManager::DeviceItem::updateText() { - QString device = Main::device(); + TQString device = Main::device(); if ( device==Device::AUTO_DATA.name ) { const Device::Data *data = Main::deviceData(); if (data) device = data->name() + " " + i18n(Device::AUTO_DATA.label); @@ -163,13 +163,13 @@ void ProjectManager::LinkerScriptItem::init() PURL::Url lkr; if ( Main::project() ) lkr = Main::project()->customLinkerScript(); setText(0, lkr.isEmpty() ? i18n("") : lkr.filename()); - setPixmap(0, lkr.isEmpty() ? QPixmap() : PURL::icon(PURL::Lkr)); + setPixmap(0, lkr.isEmpty() ? TQPixmap() : PURL::icon(PURL::Lkr)); } void ProjectManager::LinkerScriptItem::set(const PURL::Url &url) { _url = url; - QString s = url.filename(); + TQString s = url.filename(); PURL::Url lkr; if ( Main::project() ) lkr = Main::project()->customLinkerScript(); if ( lkr.isEmpty() ) s += i18n(" (default)"); diff --git a/src/libgui/project_manager_ui.h b/src/libgui/project_manager_ui.h index 012eb64..ea8676e 100644 --- a/src/libgui/project_manager_ui.h +++ b/src/libgui/project_manager_ui.h @@ -20,9 +20,10 @@ class PopupMenu : public KPopupMenu { Q_OBJECT + TQ_OBJECT public: PopupMenu() : _index(1) {} - void insertItem(const QString &icon, const QString &label, QObject *receiver = 0, const char *slot = 0); + void insertItem(const TQString &icon, const TQString &label, TQObject *receiver = 0, const char *slot = 0); private: uint _index; @@ -65,7 +66,7 @@ public: HeaderItem(RootItem *item, Group group); virtual int rtti() const { return HeaderRtti; } Group group() const { return _group; } - QListViewItem *lastChild() const; + TQListViewItem *lastChild() const; private: static const char *GROUP_LABELS[Nb_Groups]; @@ -84,7 +85,7 @@ private: bool _external; void set(const PURL::Url &url); - virtual void paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int align); + virtual void paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int align); }; class RegisterItem : public KListViewItem @@ -102,7 +103,7 @@ public: virtual int rtti() const { return DeviceRtti; } private: - virtual QWidget *editWidgetFactory(int) const; + virtual TQWidget *editWidgetFactory(int) const; virtual bool alwaysAcceptEdit(int) const { return true; } }; diff --git a/src/libgui/project_wizard.cpp b/src/libgui/project_wizard.cpp index b4d26df..72ecefc 100644 --- a/src/libgui/project_wizard.cpp +++ b/src/libgui/project_wizard.cpp @@ -8,10 +8,10 @@ ***************************************************************************/ #include "project_wizard.h" -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -36,7 +36,7 @@ FileListItem::FileListItem(KListView *view) void FileListItem::toggle() { _copy = !_copy; - repaint(); + tqrepaint(); } PURL::FileGroup FileListItem::fileGroup() const @@ -60,7 +60,7 @@ PURL::FileGroup FileListItem::fileGroup() const return PURL::Nb_FileGroups; } -const QPixmap *FileListItem::pixmap(int column) const +const TQPixmap *FileListItem::pixmap(int column) const { if ( column==0 && _copy ) return &_pixmap; @@ -68,35 +68,35 @@ const QPixmap *FileListItem::pixmap(int column) const } //----------------------------------------------------------------------------- -FileListBox::FileListBox(QWidget *parent) - : EditListBox(2, 0, 0, parent, "file_list_box") +FileListBox::FileListBox(TQWidget *tqparent) + : EditListBox(2, 0, 0, tqparent, "file_list_box") { _listView->header()->show(); _listView->header()->setClickEnabled(false); _listView->header()->setResizeEnabled(false); _listView->header()->setMovingEnabled(false); _listView->setColumnText(0, i18n("Copy")); - int spacing = style().pixelMetric(QStyle::PM_HeaderMargin); - QFontMetrics fm(font()); + int spacing = tqstyle().tqpixelMetric(TQStyle::PM_HeaderMargin); + TQFontMetrics fm(font()); _listView->header()->resizeSection(0, fm.width(i18n("Copy")) + 2*spacing); // hack _listView->setColumnText(1, i18n("Filename")); _listView->setAllColumnsShowFocus(true); - connect(_listView, SIGNAL(clicked(QListViewItem *, const QPoint &, int)), SLOT(clicked(QListViewItem *, const QPoint &, int))); + connect(_listView, TQT_SIGNAL(clicked(TQListViewItem *, const TQPoint &, int)), TQT_SLOT(clicked(TQListViewItem *, const TQPoint &, int))); } void FileListBox::addItem() { - PURL::UrlList urls = PURL::getOpenUrls(_directory.path(), QString::null, this, i18n("Select Files")); + PURL::UrlList urls = PURL::getOpenUrls(_directory.path(), TQString(), this, i18n("Select Files")); PURL::UrlList::const_iterator it; for (it=urls.begin(); it!=urls.end(); ++it) EditListBox::addItem((*it).pretty()); } -QListViewItem *FileListBox::createItem() +TQListViewItem *FileListBox::createItem() { return new FileListItem(_listView); } -void FileListBox::clicked(QListViewItem *item, const QPoint &, int column) +void FileListBox::clicked(TQListViewItem *item, const TQPoint &, int column) { if ( item==0 || column!=0 ) return; static_cast(item)->toggle(); @@ -104,36 +104,36 @@ void FileListBox::clicked(QListViewItem *item, const QPoint &, int column) void FileListBox::setToolGroup(const Tool::Group &group) { - QListViewItem *item = _listView->firstChild(); + TQListViewItem *item = _listView->firstChild(); for (; item; item = item->nextSibling()) static_cast(item)->setToolGroup(group); } //----------------------------------------------------------------------------- -ProjectWizard::ProjectWizard(QWidget *parent) - : KWizard(parent, "project_wizard"), _project(0) +ProjectWizard::ProjectWizard(TQWidget *tqparent) + : KWizard(tqparent, "project_wizard"), _project(0) { // first page - _first = new QWidget(this); + _first = new TQWidget(this); addPage(_first, i18n("New Project: Basic Settings")); setHelpEnabled(_first, false); - QGridLayout *grid = new QGridLayout(_first, 1, 1, 10, 10); - QLabel *label = new QLabel(i18n("Name:"), _first); + TQGridLayout *grid = new TQGridLayout(_first, 1, 1, 10, 10); + TQLabel *label = new TQLabel(i18n("Name:"), _first); grid->addWidget(label, 0, 0); _name = new KLineEdit(_first); _name->setFocus(); grid->addMultiCellWidget(_name, 0,0, 1,2); - label = new QLabel(i18n("Directory:"), _first); + label = new TQLabel(i18n("Directory:"), _first); grid->addWidget(label, 1, 0); _directory = new PURL::DirectoryWidget(":new_project", _first); grid->addMultiCellWidget(_directory, 1,1, 1,2); - label = new QLabel(i18n("Device:"), _first); + label = new TQLabel(i18n("Device:"), _first); grid->addWidget(label, 2, 0); _device = new DeviceChooser::Button(false, _first); _device->setDevice(Main::device()); grid->addWidget(_device, 2, 1); - label = new QLabel(i18n("Toolchain:"), _first); + label = new TQLabel(i18n("Toolchain:"), _first); grid->addWidget(label, 3, 0); - _toolchain = new KeyComboBox(_first); + _toolchain = new KeyComboBox(_first); Tool::Lister::ConstIterator it; for (it=Tool::lister().begin(); it!=Tool::lister().end(); ++it) _toolchain->appendItem(it.key(), it.data()->label()); @@ -143,22 +143,22 @@ ProjectWizard::ProjectWizard(QWidget *parent) grid->setRowStretch(4, 1); // second page - _second = new QWidget(this); + _second = new TQWidget(this); addPage(_second, i18n("New Project: Source Files")); - grid = new QGridLayout(_second, 1, 1, 10, 10); - _bgroup = new QVButtonGroup(i18n("Add Source Files"), _second); - _templateButton = new QRadioButton(i18n("Create template source file."), _bgroup); - _addButton = new QRadioButton(i18n("Add existing files."), _bgroup); - (void)new QRadioButton(i18n("Do not add files now."), _bgroup); - connect(_bgroup, SIGNAL(clicked(int)), SLOT(buttonClicked(int))); + grid = new TQGridLayout(_second, 1, 1, 10, 10); + _bgroup = new TQVButtonGroup(i18n("Add Source Files"), _second); + _templateButton = new TQRadioButton(i18n("Create template source file."), _bgroup); + _addButton = new TQRadioButton(i18n("Add existing files."), _bgroup); + (void)new TQRadioButton(i18n("Do not add files now."), _bgroup); + connect(_bgroup, TQT_SIGNAL(clicked(int)), TQT_SLOT(buttonClicked(int))); grid->addWidget(_bgroup, 0, 0); // third page - _third = new QWidget(this); + _third = new TQWidget(this); addPage(_third, i18n("New Project: Add Files")); setHelpEnabled(_third, false); setFinishEnabled(_third, true); - grid = new QGridLayout(_third, 1, 1, 10, 10); + grid = new TQGridLayout(_third, 1, 1, 10, 10); _files = new FileListBox(_third); grid->addWidget(_files, 0, 0); } @@ -166,7 +166,7 @@ ProjectWizard::ProjectWizard(QWidget *parent) void ProjectWizard::next() { if ( currentPage()==_first ) { - QString name = _name->text().stripWhiteSpace(); + TQString name = _name->text().stripWhiteSpace(); if ( name.isEmpty() ) { MessageBox::sorry(i18n("Project name is empty."), Log::Show); return; @@ -184,7 +184,7 @@ void ProjectWizard::next() return; } } else if ( url().exists() ) { - if ( !MessageBox::askContinue(i18n("Project \"%1\"already exists. Overwrite it?").arg(url().filename())) ) return; + if ( !MessageBox::askContinue(i18n("Project \"%1\"already exists. Overwrite it?").tqarg(url().filename())) ) return; } if ( !toolchain().check(device(), &Main::compileLog()) ) return; _files->setDirectory(_directory->directory()); @@ -203,7 +203,7 @@ void ProjectWizard::next() for (uint i=0; i<_files->count(); i++) if ( static_cast(_files->item(i))->fileGroup()==PURL::Source ) nb++; if ( toolchain().compileType()==Tool::SingleFile && nb>1 ) { - if ( !MessageBox::askContinue(i18n("The selected toolchain can only compile a single source file and you have selected %1 source files. Continue anyway? ").arg(nb)) ) return; + if ( !MessageBox::askContinue(i18n("The selected toolchain can only compile a single source file and you have selected %1 source files. Continue anyway? ").tqarg(nb)) ) return; } } KWizard::next(); @@ -229,7 +229,7 @@ void ProjectWizard::done(int r) } Q_ASSERT( ftype!=PURL::Nb_FileTypes ); PURL::Url turl = url().toFileType(ftype); - QString text; + TQString text; const Tool::SourceGenerator *generator = toolchain().sourceGenerator(); if ( generator==0 ) text = i18n("Template source file generation not implemented yet for this toolchain..."); else { @@ -243,7 +243,7 @@ void ProjectWizard::done(int r) } Log::StringView sview; if ( turl.write(text, sview) ) files += turl; - else MessageBox::detailedSorry(i18n("Error creating template file."), i18n("File: %1\n").arg(turl.pretty()) + sview.string(), Log::Show); + else MessageBox::detailedSorry(i18n("Error creating template file."), i18n("File: %1\n").tqarg(turl.pretty()) + sview.string(), Log::Show); _project->setOpenedFiles(files); } else { Log::StringView sview; @@ -271,7 +271,7 @@ const Tool::Group &ProjectWizard::toolchain() const return *Tool::lister().group(_toolchain->currentItem()); } -QString ProjectWizard::device() const +TQString ProjectWizard::device() const { return _device->device(); } diff --git a/src/libgui/project_wizard.h b/src/libgui/project_wizard.h index 312ef01..4a47e3c 100644 --- a/src/libgui/project_wizard.h +++ b/src/libgui/project_wizard.h @@ -9,8 +9,8 @@ #ifndef PROJECT_WIZARD_H #define PROJECT_WIZARD_H -#include -#include +#include +#include #include #include #include @@ -32,39 +32,41 @@ public: bool copy() const { return _copy; } void toggle(); PURL::FileGroup fileGroup() const; - virtual const QPixmap *pixmap(int column) const; + virtual const TQPixmap *pixmap(int column) const; private: const Tool::Group *_group; - QPixmap _pixmap; + TQPixmap _pixmap; bool _copy; }; class FileListBox : public EditListBox { Q_OBJECT + TQ_OBJECT public: - FileListBox(QWidget *parent); + FileListBox(TQWidget *tqparent); void setDirectory(const PURL::Directory &directory) { _directory = directory; } void setToolGroup(const Tool::Group &group); protected slots: virtual void addItem(); - virtual void clicked(QListViewItem *item, const QPoint &point, int column); + virtual void clicked(TQListViewItem *item, const TQPoint &point, int column); private: PURL::Directory _directory; virtual uint textColumn() const { return 1; } - virtual QListViewItem *createItem(); + virtual TQListViewItem *createItem(); }; //----------------------------------------------------------------------------- class ProjectWizard : public KWizard { Q_OBJECT + TQ_OBJECT public: - ProjectWizard(QWidget *parent); + ProjectWizard(TQWidget *tqparent); PURL::Url url() const; Project *project() const { return _project; } @@ -74,17 +76,17 @@ protected slots: virtual void done(int r); private: - QWidget *_first, *_second, *_third; + TQWidget *_first, *_second, *_third; KLineEdit *_name; PURL::DirectoryWidget *_directory; DeviceChooser::Button *_device; - KeyComboBox *_toolchain; - QButtonGroup *_bgroup; - QRadioButton *_templateButton, *_addButton; + KeyComboBox *_toolchain; + TQButtonGroup *_bgroup; + TQRadioButton *_templateButton, *_addButton; FileListBox *_files; Project *_project; - QString device() const; + TQString device() const; const Tool::Group &toolchain() const; }; diff --git a/src/libgui/register_view.cpp b/src/libgui/register_view.cpp index 3c244e8..fe4b4d6 100644 --- a/src/libgui/register_view.cpp +++ b/src/libgui/register_view.cpp @@ -8,10 +8,10 @@ ***************************************************************************/ #include "register_view.h" -#include -#include -#include -#include +#include +#include +#include +#include #include #include "devices/base/device_group.h" @@ -23,8 +23,8 @@ #include "gui_debug_manager.h" //----------------------------------------------------------------------------- -Register::MainView::MainView(const QString &title, const QString &tag, QWidget *parent) - : DeviceEditor(title, tag, parent, "register_view"), _debugging(false) +Register::MainView::MainView(const TQString &title, const TQString &tag, TQWidget *tqparent) + : DeviceEditor(title, tag, tqparent, "register_view"), _debugging(false) {} void Register::MainView::setDevice(bool force) @@ -34,15 +34,15 @@ void Register::MainView::setDevice(bool force) DeviceEditor::setDevice(force || oldDebugging!=_debugging); } -QWidget *Register::MainView::createView(const Device::Data *data, QWidget *parent) +TQWidget *Register::MainView::createView(const Device::Data *data, TQWidget *tqparent) { - if ( data==0 ) return new QWidget(parent); - Register::View *view = Device::groupui(*data).createRegisterView(parent); + if ( data==0 ) return new TQWidget(tqparent); + Register::View *view = Device::groupui(*data).createRegisterView(tqparent); if (view) view->updateView(); else { - QWidget *w = new QWidget(parent); - QVBoxLayout *vbox = new QVBoxLayout(w, 10, 10); - QLabel *label = new QLabel(i18n("The selected device has no register."), w); + TQWidget *w = new TQWidget(tqparent); + TQVBoxLayout *vbox = new TQVBoxLayout(w, 10, 10); + TQLabel *label = new TQLabel(i18n("The selected device has no register."), w); vbox->addWidget(label); vbox->addStretch(1); return w; diff --git a/src/libgui/register_view.h b/src/libgui/register_view.h index 7d12f0d..98868e4 100644 --- a/src/libgui/register_view.h +++ b/src/libgui/register_view.h @@ -20,8 +20,9 @@ class View; class MainView : public DeviceEditor { Q_OBJECT + TQ_OBJECT public: - MainView(const QString &title, const QString &tag, QWidget *parent = 0); + MainView(const TQString &title, const TQString &tag, TQWidget *tqparent = 0); virtual bool isModified() const { return false; } virtual bool isReadOnly() const { return true; } virtual void addGui() {} @@ -32,7 +33,7 @@ public: private: bool _debugging; - virtual QWidget *createView(const Device::Data *, QWidget *parent); + virtual TQWidget *createView(const Device::Data *, TQWidget *tqparent); virtual void setModifiedInternal(bool) {} virtual void setReadOnlyInternal(bool) {} }; diff --git a/src/libgui/text_editor.cpp b/src/libgui/text_editor.cpp index aecbc99..eb9d16f 100644 --- a/src/libgui/text_editor.cpp +++ b/src/libgui/text_editor.cpp @@ -9,9 +9,9 @@ ***************************************************************************/ #include "text_editor.h" -#include -#include -#include +#include +#include +#include #include #include @@ -37,33 +37,33 @@ const TextEditor::MarkTypeData TextEditor::MARK_TYPE_DATA[Breakpoint::Nb_MarkTyp { KTextEditor::MarkInterface::Error, "piklab_breakpoint_invalid" } }; -QPixmap TextEditor::pixmap(Breakpoint::MarkType type) +TQPixmap TextEditor::pixmap(Breakpoint::MarkType type) { return SmallIcon(MARK_TYPE_DATA[type].pixmap); } -TextEditor::TextEditor(bool withDebugger, QWidget *parent, const char *name) - : Editor(parent, name), _view(0) +TextEditor::TextEditor(bool withDebugger, TQWidget *tqparent, const char *name) + : Editor(tqparent, name), _view(0) { KLibFactory *factory = KLibLoader::self()->factory("libkatepart"); if ( factory==0 ) qFatal("Could not find katepart"); - _document = static_cast(factory->create(this, "kate", "KTextEditor::Document")); + _document = static_cast(factory->create(TQT_TQOBJECT(this), "kate", "KTextEditor::Document")); _oldModified = _document->isModified(); _oldReadOnly = !_document->isReadWrite(); - QVBoxLayout *top = new QVBoxLayout(this, 0, 10); - _split = new QSplitter(this); - _split->setFrameStyle(QFrame::TabWidgetPanel | QFrame::Sunken); + TQVBoxLayout *top = new TQVBoxLayout(this, 0, 10); + _split = new TQSplitter(this); + _split->setFrameStyle(TQFrame::TabWidgetPanel | TQFrame::Sunken); top->addWidget(_split); - connect(_document, SIGNAL(hlChanged()), SLOT(highlightChanged())); + connect(_document, TQT_SIGNAL(hlChanged()), TQT_SLOT(highlightChanged())); setAcceptDrops(true); addView(); for (uint i=0; isetPixmap(KTextEditor::MarkInterface::MarkTypes(MARK_TYPE_DATA[i].type), pixmap(Breakpoint::MarkType(i))); - if (withDebugger) QTimer::singleShot(0, this, SLOT(addToDebugManager())); + if (withDebugger) TQTimer::singleShot(0, this, TQT_SLOT(addToDebugManager())); } bool TextEditor::open(const PURL::Url &url) @@ -80,10 +80,10 @@ void TextEditor::addToDebugManager() static_cast(Debugger::manager)->addTextEditor(*this); } -bool TextEditor::eventFilter(QObject *, QEvent *e) +bool TextEditor::eventFilter(TQObject *, TQEvent *e) { - if ( e->type()==QEvent::KeyPress ) { - if ( static_cast(e)->key()==Key_Escape ) return true; + if ( e->type()==TQEvent::KeyPress ) { + if ( TQT_TQKEYEVENT(e)->key()==Key_Escape ) return true; } return false; } @@ -93,10 +93,10 @@ void TextEditor::addView() KTextEditor::View *v = _document->createView(_split); if ( _view==0 ) _view = static_cast(v); Q_ASSERT(v); - connect(v, SIGNAL(gotFocus(Kate::View *)), SLOT(gotFocus(Kate::View *))); - connect(v, SIGNAL(cursorPositionChanged()), SLOT(statusChanged())); - connect(v, SIGNAL(dropEventPass(QDropEvent *)), SIGNAL(dropEventPass(QDropEvent *))); - connect(v, SIGNAL(newStatus()), SLOT(statusChanged())); + connect(v, TQT_SIGNAL(gotFocus(Kate::View *)), TQT_SLOT(gotFocus(Kate::View *))); + connect(v, TQT_SIGNAL(cursorPositionChanged()), TQT_SLOT(statusChanged())); + connect(v, TQT_SIGNAL(dropEventPass(TQDropEvent *)), TQT_SIGNAL(dropEventPass(TQDropEvent *))); + connect(v, TQT_SIGNAL(newtqStatus()), TQT_SLOT(statusChanged())); v->show(); v->setFocus(); v->child(0, "KateViewInternal")->installEventFilter(this); @@ -104,8 +104,8 @@ void TextEditor::addView() pmi->installPopup(&Main::popup("ktexteditor_popup")); // dispatch available space between views - QValueList list = _split->sizes(); - QValueList::Iterator it; + TQValueList list = _split->sizes(); + TQValueList::Iterator it; int sum = 0; for (it = list.begin(); it!= list.end(); ++it) sum += *it; sum /= list.size(); @@ -167,7 +167,7 @@ void TextEditor::statusChanged() { uint line, col; _view->cursorPosition(&line, &col) ; - QString text = i18n("Line: %1 Col: %2").arg(line+1).arg(col+1); + TQString text = i18n("Line: %1 Col: %2").tqarg(line+1).tqarg(col+1); if( isReadOnly() ) text += " " + i18n("R/O"); emit statusTextChanged(" " + text + " "); if ( isReadOnly()!=_oldReadOnly || isModified()!=_oldModified ) emit guiChanged(); @@ -178,7 +178,7 @@ void TextEditor::statusChanged() Breakpoint::updateActions(&data); } -uint TextEditor::highlightMode(const QString &name) const +uint TextEditor::highlightMode(const TQString &name) const { uint mode = 0; for (; mode<_document->hlModeCount(); mode++) @@ -213,8 +213,8 @@ void TextEditor::setMark(uint line, Breakpoint::MarkType type) void TextEditor::clearMarks(uint type) { - QPtrList marks = _document->marks(); - QPtrListIterator it(marks); + TQPtrList marks = _document->marks(); + TQPtrListIterator it(marks); for (; it.current(); ++it) if ( it.current()->type==type ) _document->removeMark(it.current()->line, it.current()->type); } @@ -224,20 +224,20 @@ void TextEditor::clearBreakpointMarks() for (uint i=0; i TextEditor::bookmarkLines() const +TQValueList TextEditor::bookmarkLines() const { - QValueList lines; - QPtrList marks = _document->marks(); - QPtrListIterator it(marks); + TQValueList lines; + TQPtrList marks = _document->marks(); + TQPtrListIterator it(marks); for (; it.current(); ++it) if ( it.current()->type==KTextEditor::MarkInterface::Bookmark ) lines.append(it.current()->line); return lines; } -void TextEditor::setBookmarkLines(const QValueList &lines) +void TextEditor::setBookmarkLines(const TQValueList &lines) { clearMarks(KTextEditor::MarkInterface::Bookmark); - QValueList::const_iterator it; + TQValueList::const_iterator it; for (it=lines.begin(); it!=lines.end(); ++it) _document->setMark(*it, KTextEditor::MarkInterface::Bookmark); } @@ -251,8 +251,8 @@ void TextEditor::slotChangedText() //Found in the descript Qstringlist. - QString currentword; - QString testval; + TQString currentword; + TQString testval; Kate::View *v = currentView(); currentword = v->currentTextLine(); @@ -260,7 +260,7 @@ void TextEditor::slotChangedText() currentword = currentword.simplifyWhiteSpace(); currentword = currentword.upper(); - for ( QStringList::Iterator it = descript.begin(); it != descript.end(); ++it ) + for ( TQStringList::Iterator it = descript.begin(); it != descript.end(); ++it ) { testval = *it; if(testval.startsWith(currentword.left(5))) @@ -321,12 +321,12 @@ void TextEditor::populateList() #endif //----------------------------------------------------------------------------- -SimpleTextEditor::SimpleTextEditor(bool withDebugger, PURL::FileType type, QWidget *parent, const char *name) - : TextEditor(withDebugger, parent, name), _type(type), _file(_sview) +SimpleTextEditor::SimpleTextEditor(bool withDebugger, PURL::FileType type, TQWidget *tqparent, const char *name) + : TextEditor(withDebugger, tqparent, name), _type(type), _file(_sview) {} -SimpleTextEditor::SimpleTextEditor(bool withDebugger, QWidget *parent, const char *name) - : TextEditor(withDebugger, parent, name), _type(PURL::Nb_FileTypes), _file(_sview) +SimpleTextEditor::SimpleTextEditor(bool withDebugger, TQWidget *tqparent, const char *name) + : TextEditor(withDebugger, tqparent, name), _type(PURL::Nb_FileTypes), _file(_sview) {} bool SimpleTextEditor::open(const PURL::Url &url) @@ -335,7 +335,7 @@ bool SimpleTextEditor::open(const PURL::Url &url) return TextEditor::open(url); } -bool SimpleTextEditor::setText(const QString &text) +bool SimpleTextEditor::setText(const TQString &text) { _file.openForWrite(); _file.appendText(text); diff --git a/src/libgui/text_editor.h b/src/libgui/text_editor.h index 9c5a994..5b76734 100644 --- a/src/libgui/text_editor.h +++ b/src/libgui/text_editor.h @@ -10,9 +10,9 @@ #ifndef TEXT_EDITOR_H #define TEXT_EDITOR_H -#include -#include -class QSplitter; +#include +#include +class TQSplitter; #include #include @@ -25,8 +25,9 @@ class QSplitter; class TextEditor : public Editor { Q_OBJECT + TQ_OBJECT public: - TextEditor(bool withDebugger, QWidget *parent, const char *name = 0); + TextEditor(bool withDebugger, TQWidget *tqparent, const char *name = 0); virtual PURL::FileType fileType() const { return url().fileType(); } virtual PURL::Url url() const { return _document->url(); } virtual bool isModified() const; @@ -34,16 +35,16 @@ public: virtual void addGui(); virtual void removeGui(); virtual void setFocus() { _view->setFocus(); } - static QPixmap pixmap(Breakpoint::MarkType type); + static TQPixmap pixmap(Breakpoint::MarkType type); void setMark(uint line, Breakpoint::MarkType type); void clearBreakpointMarks(); void setCursor(uint line, uint column) { _view->setCursorPosition(line, column); } uint cursorLine() const; virtual bool open(const PURL::Url &url); virtual bool save(const PURL::Url &url) { return _document->saveAs(url.kurl()); } - virtual bool eventFilter(QObject *o, QEvent *e); - virtual QValueList bookmarkLines() const; - virtual void setBookmarkLines(const QValueList &lines); + virtual bool eventFilter(TQObject *o, TQEvent *e); + virtual TQValueList bookmarkLines() const; + virtual void setBookmarkLines(const TQValueList &lines); public slots: void addView(); @@ -64,7 +65,7 @@ private slots: void addToDebugManager(); private: - QSplitter *_split; + TQSplitter *_split; bool _oldModified, _oldReadOnly; struct MarkTypeData { uint type; @@ -75,7 +76,7 @@ private: private: virtual void setModifiedInternal(bool modified); virtual void setReadOnlyInternal(bool readOnly); - uint highlightMode(const QString &name) const; + uint highlightMode(const TQString &name) const; void clearMarks(uint type); }; @@ -83,12 +84,13 @@ private: class SimpleTextEditor : public TextEditor { Q_OBJECT + TQ_OBJECT public: - SimpleTextEditor(bool withDebugger, PURL::FileType type, QWidget *parent, const char *name = 0); - SimpleTextEditor(bool withDebugger, QWidget *parent, const char *name = 0); + SimpleTextEditor(bool withDebugger, PURL::FileType type, TQWidget *tqparent, const char *name = 0); + SimpleTextEditor(bool withDebugger, TQWidget *tqparent, const char *name = 0); void setFileType(PURL::FileType type) { _type = type; } virtual PURL::FileType fileType() const { return _type; } - bool setText(const QString &text); + bool setText(const TQString &text); virtual bool open(const PURL::Url &url); protected: diff --git a/src/libgui/toplevel.cpp b/src/libgui/toplevel.cpp index c757ace..1acb52e 100644 --- a/src/libgui/toplevel.cpp +++ b/src/libgui/toplevel.cpp @@ -9,16 +9,16 @@ ***************************************************************************/ #include "toplevel.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -68,8 +68,8 @@ #include "global_config.h" //---------------------------------------------------------------------------- -KDockWidget *MainWindow::createDock(const QString &name, const QPixmap &icon, - const QString &title, const DockPosition &position) +KDockWidget *MainWindow::createDock(const TQString &name, const TQPixmap &icon, + const TQString &title, const DockPosition &position) { KDockWidget *dock = createDockWidget(name, icon, 0, title); dock->setDockSite(KDockWidget::DockCenter); @@ -78,7 +78,7 @@ KDockWidget *MainWindow::createDock(const QString &name, const QPixmap &icon, ddata.position = position; ddata.dock = dock; ddata.action = new ViewMenuAction(dock); - connect(ddata.action, SIGNAL(activated(QWidget *)), SLOT(toggleToolView(QWidget *))); + connect(ddata.action, TQT_SIGNAL(activated(TQWidget *)), TQT_SLOT(toggleToolView(TQWidget *))); _docks += ddata; initDockPosition(ddata); return dock; @@ -91,26 +91,26 @@ MainWindow::MainWindow() Main::_toplevel = this; // status bar - _actionStatus = new QLabel(statusBar()); - statusBar()->addWidget(_actionStatus); - _actionProgress = new QProgressBar(statusBar()); + _actiontqStatus = new TQLabel(statusBar()); + statusBar()->addWidget(_actiontqStatus); + _actionProgress = new TQProgressBar(statusBar()); statusBar()->addWidget(_actionProgress); - _debugStatus = new QLabel(statusBar()); - statusBar()->addWidget(_debugStatus, 0, true); - _editorStatus = new QLabel(statusBar()); - statusBar()->addWidget(_editorStatus, 0, true); - _programmerStatus = new ProgrammerStatusWidget(statusBar()); - connect(_programmerStatus, SIGNAL(configure()), SLOT(configureProgrammer())); - connect(_programmerStatus, SIGNAL(selected(const Programmer::Group &)), SLOT(selectProgrammer(const Programmer::Group &))); - statusBar()->addWidget(_programmerStatus->widget(), 0, true); - _toolStatus = new ToolStatusWidget(statusBar()); - connect(_toolStatus, SIGNAL(configureToolchain()), SLOT(configureToolchains())); - connect(_toolStatus, SIGNAL(configure()), SLOT(configureProject())); - connect(_toolStatus, SIGNAL(selected(const Tool::Group &)), SLOT(selectTool(const Tool::Group &))); - statusBar()->addWidget(_toolStatus->widget(), 0, true); + _debugtqStatus = new TQLabel(statusBar()); + statusBar()->addWidget(_debugtqStatus, 0, true); + _editortqStatus = new TQLabel(statusBar()); + statusBar()->addWidget(_editortqStatus, 0, true); + _programmertqStatus = new ProgrammerStatusWidget(statusBar()); + connect(_programmertqStatus, TQT_SIGNAL(configure()), TQT_SLOT(configureProgrammer())); + connect(_programmertqStatus, TQT_SIGNAL(selected(const Programmer::Group &)), TQT_SLOT(selectProgrammer(const Programmer::Group &))); + statusBar()->addWidget(_programmertqStatus->widget(), 0, true); + _tooltqStatus = new ToolStatusWidget(statusBar()); + connect(_tooltqStatus, TQT_SIGNAL(configureToolchain()), TQT_SLOT(configureToolchains())); + connect(_tooltqStatus, TQT_SIGNAL(configure()), TQT_SLOT(configureProject())); + connect(_tooltqStatus, TQT_SIGNAL(selected(const Tool::Group &)), TQT_SLOT(selectTool(const Tool::Group &))); + statusBar()->addWidget(_tooltqStatus->widget(), 0, true); // interface - _mainDock = createDockWidget("main_dock_widget", QPixmap()); + _mainDock = createDockWidget("main_dock_widget", TQPixmap()); _mainDock->setDockSite(KDockWidget::DockCorner); _mainDock->setEnableDocking(KDockWidget::DockNone); setView(_mainDock); @@ -120,7 +120,7 @@ MainWindow::MainWindow() KDockWidget *dock = createDock("project_manager_dock_widget", PURL::icon(PURL::Project), i18n("Project Manager"), DockPosition(KDockWidget::DockLeft, 20)); Main::_projectManager = new ProjectManager::View(dock); - connect(Main::_projectManager, SIGNAL(guiChanged()), SLOT(updateGUI())); + connect(TQT_TQOBJECT(Main::_projectManager), TQT_SIGNAL(guiChanged()), TQT_SLOT(updateGUI())); dock->setWidget(Main::_projectManager); dock = createDock("watch_view_dock_widget", loader.loadIcon("viewmag", KIcon::Small), @@ -130,26 +130,26 @@ MainWindow::MainWindow() Main::_editorManager = new EditorManager(_mainDock); _mainDock->setWidget(Main::_editorManager); - connect(Main::_editorManager, SIGNAL(guiChanged()), SLOT(updateGUI())); - connect(Main::_editorManager, SIGNAL(modified(const PURL::Url &)), Main::_projectManager, SLOT(modified(const PURL::Url &))); - connect(Main::_editorManager, SIGNAL(statusChanged(const QString &)), _editorStatus, SLOT(setText(const QString &))); + connect(TQT_TQOBJECT(Main::_editorManager), TQT_SIGNAL(guiChanged()), TQT_SLOT(updateGUI())); + connect(TQT_TQOBJECT(Main::_editorManager), TQT_SIGNAL(modified(const PURL::Url &)), TQT_TQOBJECT(Main::_projectManager), TQT_SLOT(modified(const PURL::Url &))); + connect(TQT_TQOBJECT(Main::_editorManager), TQT_SIGNAL(statusChanged(const TQString &)), _editortqStatus, TQT_SLOT(setText(const TQString &))); dock = createDock("compile_log_dock_widget", loader.loadIcon("piklab_compile", KIcon::Small), i18n("Compile Log"), DockPosition(KDockWidget::DockBottom, 80)); Main::_compileLog = new Compile::LogWidget(dock); - Main::_compileLog->setFocusPolicy(NoFocus); + Main::_compileLog->setFocusPolicy(TQ_NoFocus); dock->setWidget(Main::_compileLog); dock = createDock("program_log_dock_widget", loader.loadIcon("piklab_burnchip", KIcon::Small), i18n("Program Log"), DockPosition("compile_log_dock_widget")); _programLog = new Log::Widget(dock, "program_log"); - _programLog->setFocusPolicy(NoFocus); + _programLog->setFocusPolicy(TQ_NoFocus); dock->setWidget(_programLog); dock = createDock("breakpoints_dock_widget", loader.loadIcon("piklab_breakpoint_active", KIcon::Small), i18n("Breakpoints"), DockPosition("compile_log_dock_widget")); Main::_breakpointsView = new Breakpoint::View(dock); - Main::_breakpointsView->setFocusPolicy(NoFocus); + Main::_breakpointsView->setFocusPolicy(TQ_NoFocus); dock->setWidget(Main::_breakpointsView); dock = createDock("console_dock_widget", loader.loadIcon("konsole", KIcon::Small), @@ -158,199 +158,199 @@ MainWindow::MainWindow() dock->setWidget(Main::_consoleView); // managers - Programmer::manager = new Programmer::GuiManager(this); + Programmer::manager = new Programmer::GuiManager(TQT_TQOBJECT(this)); Programmer::manager->setView(_programLog); - connect(Programmer::manager, SIGNAL(actionMessage(const QString &)), _actionStatus, SLOT(setText(const QString &))); - connect(Programmer::manager, SIGNAL(showProgress(bool)), SLOT(showProgress(bool))); - connect(Programmer::manager, SIGNAL(setTotalProgress(uint)), SLOT(setTotalProgress(uint))); - connect(Programmer::manager, SIGNAL(setProgress(uint)), SLOT(setProgress(uint))); + connect(Programmer::manager, TQT_SIGNAL(actionMessage(const TQString &)), _actiontqStatus, TQT_SLOT(setText(const TQString &))); + connect(Programmer::manager, TQT_SIGNAL(showProgress(bool)), TQT_SLOT(showProgress(bool))); + connect(Programmer::manager, TQT_SIGNAL(setTotalProgress(uint)), TQT_SLOT(setTotalProgress(uint))); + connect(Programmer::manager, TQT_SIGNAL(setProgress(uint)), TQT_SLOT(setProgress(uint))); Debugger::manager = new Debugger::GuiManager; - connect(Debugger::manager, SIGNAL(targetStateChanged()), SLOT(updateGUI())); - connect(Debugger::manager, SIGNAL(statusChanged(const QString &)), _debugStatus, SLOT(setText(const QString &))); - connect(Debugger::manager, SIGNAL(actionMessage(const QString &)), _actionStatus, SLOT(setText(const QString &))); + connect(Debugger::manager, TQT_SIGNAL(targetStateChanged()), TQT_SLOT(updateGUI())); + connect(Debugger::manager, TQT_SIGNAL(statusChanged(const TQString &)), _debugtqStatus, TQT_SLOT(setText(const TQString &))); + connect(Debugger::manager, TQT_SIGNAL(actionMessage(const TQString &)), _actiontqStatus, TQT_SLOT(setText(const TQString &))); - Main::_compileManager = new Compile::Manager(this); + Main::_compileManager = new Compile::Manager(TQT_TQOBJECT(this)); Main::_compileManager->setView(Main::_compileLog); - connect(Main::_compileManager, SIGNAL(success()), SLOT(compileSuccess())); - connect(Main::_compileManager, SIGNAL(failure()), SLOT(compileFailure())); - connect(Main::_compileManager, SIGNAL(updateFile(const Compile::FileData &)), - SLOT(updateFile(const Compile::FileData &))); + connect(Main::_compileManager, TQT_SIGNAL(success()), TQT_SLOT(compileSuccess())); + connect(Main::_compileManager, TQT_SIGNAL(failure()), TQT_SLOT(compileFailure())); + connect(Main::_compileManager, TQT_SIGNAL(updateFile(const Compile::FileData &)), + TQT_SLOT(updateFile(const Compile::FileData &))); // actions // file actions - KAction *a = KStdAction::openNew(this, SLOT(newSourceFile()), actionCollection()); + KAction *a = KStdAction::openNew(TQT_TQOBJECT(this), TQT_SLOT(newSourceFile()), actionCollection()); a->setText(i18n("&New Source File...")); - (void)new KAction(i18n("New hex File..."), "filenew", 0, this, SLOT(newHexFile()), + (void)new KAction(i18n("New hex File..."), "filenew", 0, TQT_TQOBJECT(this), TQT_SLOT(newHexFile()), actionCollection(), "file_new_hex"); - KStdAction::open(this, SLOT(openFile()), actionCollection()); - KRecentFilesAction *recent = KStdAction::openRecent(this, SLOT(openRecentFile(const KURL &)), actionCollection()); + KStdAction::open(TQT_TQOBJECT(this), TQT_SLOT(openFile()), actionCollection()); + KRecentFilesAction *recent = KStdAction::openRecent(TQT_TQOBJECT(this), TQT_SLOT(openRecentFile(const KURL &)), actionCollection()); recent->setMaxItems(20); recent->loadEntries(kapp->config(), "recent-files"); - (void)new KAction(i18n("Save All"), 0, 0, Main::_editorManager, SLOT(saveAllFiles()), + (void)new KAction(i18n("Save All"), 0, 0, TQT_TQOBJECT(Main::_editorManager), TQT_SLOT(saveAllFiles()), actionCollection(), "file_save_all"); - KStdAction::close(Main::_editorManager, SLOT(closeCurrentEditor()), actionCollection()); - (void)new KAction(i18n("C&lose All"), 0, 0, Main::_editorManager, SLOT(closeAllEditors()), + KStdAction::close(TQT_TQOBJECT(Main::_editorManager), TQT_SLOT(closeCurrentEditor()), actionCollection()); + (void)new KAction(i18n("C&lose All"), 0, 0, TQT_TQOBJECT(Main::_editorManager), TQT_SLOT(closeAllEditors()), actionCollection(), "file_close_all"); - (void)new KAction(i18n("Close All Others"), 0, 0, Main::_editorManager, SLOT(closeAllOtherEditors()), + (void)new KAction(i18n("Close All Others"), 0, 0, TQT_TQOBJECT(Main::_editorManager), TQT_SLOT(closeAllOtherEditors()), actionCollection(), "file_closeother"); - KStdAction::quit(this, SLOT(close()), actionCollection()); + KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT(close()), actionCollection()); // edit actions // view actions - (void)new KAction(i18n("Back"), "back", Qt::ALT + Qt::Key_Left, - Main::_editorManager, SLOT(goBack()), actionCollection(), "history_back"); - (void)new KAction(i18n("Forward"), "forward", Qt::ALT + Qt::Key_Right, - Main::_editorManager, SLOT(goForward()), actionCollection(), "history_forward"); - (void)new KAction(i18n("Switch to..."), 0, Qt::CTRL + Qt::Key_Slash, - Main::_editorManager, SLOT(switchToEditor()), actionCollection(), "file_switchto"); - (void)new KAction(i18n("Switch Header/Implementation"), 0, Qt::SHIFT + Qt::Key_F12, - Main::_editorManager, SLOT(switchHeaderImplementation()), actionCollection(), "view_switch_source"); - (void)new KAction(QString::null, 0, 0, - Debugger::manager, SLOT(toggleBreakpoint()), actionCollection(), "toggle_breakpoint"); - (void)new KAction(QString::null, 0, 0, - Debugger::manager, SLOT(toggleEnableBreakpoint()), actionCollection(), "enable_breakpoint"); + (void)new KAction(i18n("Back"), "back", TQt::ALT + TQt::Key_Left, + TQT_TQOBJECT(Main::_editorManager), TQT_SLOT(goBack()), actionCollection(), "history_back"); + (void)new KAction(i18n("Forward"), "forward", TQt::ALT + TQt::Key_Right, + TQT_TQOBJECT(Main::_editorManager), TQT_SLOT(goForward()), actionCollection(), "history_forward"); + (void)new KAction(i18n("Switch to..."), 0, TQt::CTRL + TQt::Key_Slash, + TQT_TQOBJECT(Main::_editorManager), TQT_SLOT(switchToEditor()), actionCollection(), "file_switchto"); + (void)new KAction(i18n("Switch Header/Implementation"), 0, TQt::SHIFT + TQt::Key_F12, + TQT_TQOBJECT(Main::_editorManager), TQT_SLOT(switchHeaderImplementation()), actionCollection(), "view_switch_source"); + (void)new KAction(TQString(), 0, 0, + Debugger::manager, TQT_SLOT(toggleBreakpoint()), actionCollection(), "toggle_breakpoint"); + (void)new KAction(TQString(), 0, 0, + Debugger::manager, TQT_SLOT(toggleEnableBreakpoint()), actionCollection(), "enable_breakpoint"); (void)new KAction(i18n("Show disassembly location"), 0, 0, - Debugger::manager, SLOT(showDisassemblyLocation()), actionCollection(), "show_disassembly_location"); + Debugger::manager, TQT_SLOT(showDisassemblyLocation()), actionCollection(), "show_disassembly_location"); KActionMenu *toolViewsMenu = new KActionMenu( i18n("Tool Views"), 0, "view_tool_views"); - connect(toolViewsMenu->popupMenu(), SIGNAL(aboutToShow()), SLOT(updateToolViewsActions())); + connect(toolViewsMenu->popupMenu(), TQT_SIGNAL(aboutToShow()), TQT_SLOT(updateToolViewsActions())); actionCollection()->insert(toolViewsMenu); - a = new KAction(i18n("&Reset Layout"), 0, 0, this, SLOT(resetDockLayout()), actionCollection(), "view_reset_layout"); + a = new KAction(i18n("&Reset Layout"), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(resetDockLayout()), actionCollection(), "view_reset_layout"); toolViewsMenu->insert(a); toolViewsMenu->popupMenu()->insertSeparator(); - QValueList::iterator it; + TQValueList::iterator it; for(it=_docks.begin(); it!=_docks.end(); ++it) toolViewsMenu->insert((*it).action); // project actions (void)new KAction(i18n("New Project..."), "piklab_createproject", 0, - this, SLOT(newProject()), actionCollection(), "project_new"); + TQT_TQOBJECT(this), TQT_SLOT(newProject()), actionCollection(), "project_new"); (void)new KAction(i18n("Open Project..."), "piklab_openproject", 0, - this , SLOT(openProject()), actionCollection(), "project_open"); + TQT_TQOBJECT(this), TQT_SLOT(openProject()), actionCollection(), "project_open"); recent = new KRecentFilesAction(i18n("Open Recent Project"), 0, - this, SLOT(openRecentProject(const KURL &)), actionCollection(), "project_open_recent"); + TQT_TQOBJECT(this), TQT_SLOT(openRecentProject(const KURL &)), actionCollection(), "project_open_recent"); recent->setMaxItems(20); recent->loadEntries(kapp->config(), "recent-projects"); (void)new KAction(i18n("Project Options..."), "configure", 0, - this, SLOT(configureProject()), actionCollection(), "project_options"); + TQT_TQOBJECT(this), TQT_SLOT(configureProject()), actionCollection(), "project_options"); (void)new KAction(i18n("Close Project"), "fileclose", 0, - this, SLOT(closeProject()), actionCollection(), "project_close"); + TQT_TQOBJECT(this), TQT_SLOT(closeProject()), actionCollection(), "project_close"); (void)new KAction(i18n("Add Source File..."), "piklab_addfile", 0, - Main::_projectManager, SLOT(insertSourceFiles()), actionCollection(), "project_add_source_file"); + TQT_TQOBJECT(Main::_projectManager), TQT_SLOT(insertSourceFiles()), actionCollection(), "project_add_source_file"); (void)new KAction(i18n("Add Object File..."), "piklab_addfile", 0, - Main::_projectManager, SLOT(insertObjectFiles()), actionCollection(), "project_add_object_file"); + TQT_TQOBJECT(Main::_projectManager), TQT_SLOT(insertObjectFiles()), actionCollection(), "project_add_object_file"); (void)new KAction(i18n("Add Current File"), "piklab_addcurrentfile", 0, - Main::_projectManager, SLOT(insertCurrentFile()), actionCollection(), "project_add_current_file"); + TQT_TQOBJECT(Main::_projectManager), TQT_SLOT(insertCurrentFile()), actionCollection(), "project_add_current_file"); // build actions - (void)new KAction(i18n("&Build Project"), "piklab_compile", Qt::Key_F8, - this, SLOT(buildProject()), actionCollection(), "build_build_project"); - (void)new KAction(i18n("&Compile File"), 0, Qt::SHIFT + Qt::Key_F8, - this, SLOT(compileFile()), actionCollection(), "build_compile_file"); + (void)new KAction(i18n("&Build Project"), "piklab_compile", TQt::Key_F8, + TQT_TQOBJECT(this), TQT_SLOT(buildProject()), actionCollection(), "build_build_project"); + (void)new KAction(i18n("&Compile File"), 0, TQt::SHIFT + TQt::Key_F8, + TQT_TQOBJECT(this), TQT_SLOT(compileFile()), actionCollection(), "build_compile_file"); (void)new KAction(i18n("Clean"), "trashcan_empty", 0, - this, SLOT(cleanBuild()), actionCollection(), "build_clean"); + TQT_TQOBJECT(this), TQT_SLOT(cleanBuild()), actionCollection(), "build_clean"); (void)new KAction(i18n("Stop"), "stop", 0, - this, SLOT(stopBuild()), actionCollection(), "build_stop"); + TQT_TQOBJECT(this), TQT_SLOT(stopBuild()), actionCollection(), "build_stop"); // programmer actions (void)new KAction(i18n("&Connect"), "connect_creating", 0, - Programmer::manager, SLOT(connectDevice()), actionCollection(), "prog_connect"); + Programmer::manager, TQT_SLOT(connectDevice()), actionCollection(), "prog_connect"); (void)new KToggleAction(i18n("Device Power"), "piklab_power", 0, - Programmer::manager, SLOT(toggleDevicePower()), actionCollection(), "prog_power"); + Programmer::manager, TQT_SLOT(toggleDevicePower()), actionCollection(), "prog_power"); (void)new KAction(i18n("&Disconnect"), "connect_no", 0, - Programmer::manager, SLOT(disconnectDevice()), actionCollection(), "prog_disconnect"); - (void)new KAction(i18n("&Program"), "piklab_burnchip", Qt::SHIFT + Qt::Key_F5, - this , SLOT(program()), actionCollection(), "prog_program"); - (void)new KAction(i18n("&Verify"), "piklab_verifychip", Qt::SHIFT + Qt::Key_F6, - this , SLOT(verify()), actionCollection(), "prog_verify"); - (void)new KAction(i18n("&Read"), "piklab_readchip", Qt::SHIFT + Qt::Key_F7, - this , SLOT(read()), actionCollection(), "prog_read"); + Programmer::manager, TQT_SLOT(disconnectDevice()), actionCollection(), "prog_disconnect"); + (void)new KAction(i18n("&Program"), "piklab_burnchip", TQt::SHIFT + TQt::Key_F5, + TQT_TQOBJECT(this), TQT_SLOT(program()), actionCollection(), "prog_program"); + (void)new KAction(i18n("&Verify"), "piklab_verifychip", TQt::SHIFT + TQt::Key_F6, + TQT_TQOBJECT(this), TQT_SLOT(verify()), actionCollection(), "prog_verify"); + (void)new KAction(i18n("&Read"), "piklab_readchip", TQt::SHIFT + TQt::Key_F7, + TQT_TQOBJECT(this), TQT_SLOT(read()), actionCollection(), "prog_read"); (void)new KAction(i18n("&Erase"), "piklab_erasechip", 0, - this, SLOT(erase()), actionCollection(), "prog_erase"); + TQT_TQOBJECT(this), TQT_SLOT(erase()), actionCollection(), "prog_erase"); (void)new KAction(i18n("&Blank Check"), "piklab_blankcheck", 0, - this, SLOT(blankCheck()), actionCollection(), "prog_blank_check"); - (void)new KAction(i18n("&Run"), "launch", Qt::SHIFT + Qt::Key_F9, - Programmer::manager, SLOT(run()), actionCollection(), "prog_run"); + TQT_TQOBJECT(this), TQT_SLOT(blankCheck()), actionCollection(), "prog_blank_check"); + (void)new KAction(i18n("&Run"), "launch", TQt::SHIFT + TQt::Key_F9, + Programmer::manager, TQT_SLOT(run()), actionCollection(), "prog_run"); (void)new KAction(i18n("&Stop"), "piklab_stop", 0, - Programmer::manager, SLOT(halt()), actionCollection(), "prog_stop"); + Programmer::manager, TQT_SLOT(halt()), actionCollection(), "prog_stop"); (void)new KAction(i18n("R&estart"), "piklab_restart", 0, - Programmer::manager, SLOT(restart()), actionCollection(), "prog_restart"); + Programmer::manager, TQT_SLOT(restart()), actionCollection(), "prog_restart"); (void)new KAction(i18n("&Advanced..."), 0, 0, - Programmer::manager , SLOT(showAdvancedDialog()), actionCollection(), "prog_advanced"); + Programmer::manager , TQT_SLOT(showAdvancedDialog()), actionCollection(), "prog_advanced"); (void)new KAction(i18n("Settings..."), "configure", 0, - this , SLOT(showProgrammerSettings()), actionCollection(), "prog_settings"); + TQT_TQOBJECT(this), TQT_SLOT(showProgrammerSettings()), actionCollection(), "prog_settings"); // debugger actions - (void)new KAction(i18n("&Start"), "launch", Qt::SHIFT + Qt::Key_F9, - Programmer::manager, SLOT(restart()), actionCollection(), "debug_start"); - (void)new KAction(i18n("&Run"), "piklab_run", Qt::SHIFT + Qt::Key_F9, - Programmer::manager, SLOT(run()), actionCollection(), "debug_run"); + (void)new KAction(i18n("&Start"), "launch", TQt::SHIFT + TQt::Key_F9, + Programmer::manager, TQT_SLOT(restart()), actionCollection(), "debug_start"); + (void)new KAction(i18n("&Run"), "piklab_run", TQt::SHIFT + TQt::Key_F9, + Programmer::manager, TQT_SLOT(run()), actionCollection(), "debug_run"); (void)new KAction(i18n("&Step"), "piklab_debug_step", 0, - Programmer::manager, SLOT(step()), actionCollection(), "debug_next"); + Programmer::manager, TQT_SLOT(step()), actionCollection(), "debug_next"); //(void)new KAction(i18n("Step &In"), "piklab_debug_stepin", - // 0, this, SLOT(debugStepIn()), actionCollection(), "debug_step_in"); + // 0, TQT_TQOBJECT(this), TQT_SLOT(debugStepIn()), actionCollection(), "debug_step_in"); //(void)new KAction(i18n("Step &Out"), "piklab_debug_stepout", - // 0, this, SLOT(debugStepOut()), actionCollection(), "debug_step_out"); + // 0, TQT_TQOBJECT(this), TQT_SLOT(debugStepOut()), actionCollection(), "debug_step_out"); (void)new KAction(i18n("&Break", "&Halt"), "piklab_debughalt", 0, - Programmer::manager, SLOT(halt()), actionCollection(), "debug_halt"); + Programmer::manager, TQT_SLOT(halt()), actionCollection(), "debug_halt"); (void)new KAction(i18n("&Disconnect/Stop"), "piklab_stop", 0, - Programmer::manager, SLOT(disconnectDevice()), actionCollection(), "debug_stop"); + Programmer::manager, TQT_SLOT(disconnectDevice()), actionCollection(), "debug_stop"); (void)new KAction(i18n("R&eset"), "piklab_restart", 0, - Programmer::manager, SLOT(restart()), actionCollection(), "debug_reset"); + Programmer::manager, TQT_SLOT(restart()), actionCollection(), "debug_reset"); (void)new KAction(i18n("Show Program Counter"), "piklab_program_counter", 0, - Debugger::manager, SLOT(showPC()), actionCollection(), "debug_show_pc"); + Debugger::manager, TQT_SLOT(showPC()), actionCollection(), "debug_show_pc"); (void)new KAction(i18n("Clear All Breakpoints"), "remove", 0, - Debugger::manager, SLOT(clearBreakpoints()), actionCollection(), "debug_clear_breakpoints"); + Debugger::manager, TQT_SLOT(clearBreakpoints()), actionCollection(), "debug_clear_breakpoints"); (void)new KAction(i18n("Settings..."), "configure", 0, - this , SLOT(showDebuggerSettings()), actionCollection(), "debug_settings"); + TQT_TQOBJECT(this), TQT_SLOT(showDebuggerSettings()), actionCollection(), "debug_settings"); // tools (void)new KAction(i18n("&Pikloops..."), 0, 0, - this , SLOT(runPikloops()), actionCollection(), "tools_pikloops"); - (void)new KAction(i18n("&Find Files..."), "find", 0, - this , SLOT(runKfind()), actionCollection(), "tools_kfind"); + TQT_TQOBJECT(this), TQT_SLOT(runPikloops()), actionCollection(), "tools_pikloops"); + (void)new KAction(i18n("&Find Files..."), "tqfind", 0, + TQT_TQOBJECT(this), TQT_SLOT(runKtqfind()), actionCollection(), "tools_ktqfind"); (void)new KAction(i18n("&Device Information..."), "info", 0, - this , SLOT(showDeviceInfo()), actionCollection(), "tools_device_information"); + TQT_TQOBJECT(this), TQT_SLOT(showDeviceInfo()), actionCollection(), "tools_device_information"); (void)new KAction(i18n("&Config Generator..."), 0, 0, - this , SLOT(configGenerator()), actionCollection(), "tools_config_generator"); + TQT_TQOBJECT(this), TQT_SLOT(configGenerator()), actionCollection(), "tools_config_generator"); (void)new KAction(i18n("&Template Generator..."), 0, 0, - this , SLOT(templateGenerator()), actionCollection(), "tools_template_generator"); + TQT_TQOBJECT(this), TQT_SLOT(templateGenerator()), actionCollection(), "tools_template_generator"); // settings actions (void)new KAction(i18n("Configure Toolchains..."), 0, 0, - this, SLOT(configureToolchains()), actionCollection(), "options_configure_toolchains"); - (void)KStdAction::preferences(this, SLOT(configure()), actionCollection()); + TQT_TQOBJECT(this), TQT_SLOT(configureToolchains()), actionCollection(), "options_configure_toolchains"); + (void)KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(configure()), actionCollection()); // help (void)new KAction(i18n("Report Bug..."), "likeback_bug", 0, - LikeBack::instance(), SLOT(iFoundABug()), actionCollection(), "help_report_bug_piklab"); + TQT_TQOBJECT(LikeBack::instance()), TQT_SLOT(iFoundABug()), actionCollection(), "help_report_bug_piklab"); setupGUI(); readDockConfig(); // LikeBack buttons - menuBar()->insertItem(new QLabel(menuBar())); // #### first widget is put left-most... + menuBar()->insertItem(new TQLabel(menuBar())); // #### first widget is put left-most... MenuBarButton *button = new MenuBarButton("likeback_like", menuBar()); - QToolTip::add(button, i18n("I like...")); - connect(button, SIGNAL(clicked()), LikeBack::instance(), SLOT(iLike())); + TQToolTip::add(button, i18n("I like...")); + connect(button, TQT_SIGNAL(clicked()), TQT_TQOBJECT(LikeBack::instance()), TQT_SLOT(iLike())); menuBar()->insertItem(button); button = new MenuBarButton("likeback_dislike", menuBar()); - QToolTip::add(button, i18n("I do not like...")); - connect(button, SIGNAL(clicked()), LikeBack::instance(), SLOT(iDoNotLike())); + TQToolTip::add(button, i18n("I do not like...")); + connect(button, TQT_SIGNAL(clicked()), TQT_TQOBJECT(LikeBack::instance()), TQT_SLOT(iDoNotLike())); menuBar()->insertItem(button); button = new MenuBarButton("likeback_bug", menuBar()); - QToolTip::add(button, i18n("I found a bug...")); - connect(button, SIGNAL(clicked()), LikeBack::instance(), SLOT(iFoundABug())); + TQToolTip::add(button, i18n("I found a bug...")); + connect(button, TQT_SIGNAL(clicked()), TQT_TQOBJECT(LikeBack::instance()), TQT_SLOT(iFoundABug())); menuBar()->insertItem(button); button = new MenuBarButton("configure", menuBar()); - QToolTip::add(button, i18n("Configure email...")); - connect(button, SIGNAL(clicked()), LikeBack::instance(), SLOT(askEMail())); + TQToolTip::add(button, i18n("Configure email...")); + connect(button, TQT_SIGNAL(clicked()), TQT_TQOBJECT(LikeBack::instance()), TQT_SLOT(askEMail())); menuBar()->insertItem(button); button = new MenuBarButton("help", menuBar()); - connect(button, SIGNAL(clicked()), LikeBack::instance(), SLOT(showWhatsThisMessage())); + connect(button, TQT_SIGNAL(clicked()), TQT_TQOBJECT(LikeBack::instance()), TQT_SLOT(showWhatsThisMessage())); menuBar()->insertItem(button); - QTimer::singleShot(0, this, SLOT(initialLoading())); + TQTimer::singleShot(0, TQT_TQOBJECT(this), TQT_SLOT(initialLoading())); } MainWindow::~MainWindow() @@ -361,10 +361,10 @@ void MainWindow::readDockConfig() KDockMainWindow::readDockConfig(kapp->config(), "dock_config"); // if there is a new dock: it is not displayed by default... - QMap entries = kapp->config()->entryMap("dock_config"); - QValueList::iterator it; + TQMap entries = kapp->config()->entryMap("dock_config"); + TQValueList::iterator it; for(it=_docks.begin(); it!=_docks.end(); ++it) { - QMap::const_iterator eit; + TQMap::const_iterator eit; for(eit=entries.begin(); eit!=entries.end(); ++eit) if ( eit.key().startsWith((*it).dock->name()) ) break; if ( eit==entries.end() ) initDockPosition(*it); @@ -372,12 +372,12 @@ void MainWindow::readDockConfig() // readDockConfig also restore the names/tooltips: what if a new version of the application changes these names... for(it=_docks.begin(); it!=_docks.end(); ++it) (*it).dock->setTabPageLabel((*it).title); - QApplication::postEvent(this, new QEvent(QEvent::CaptionChange)); + TQApplication::postEvent(this, new TQEvent(TQEvent::CaptionChange)); } void MainWindow::initialLoading() { - ::BusyCursor bc; + ::PBusyCursor bc; KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); if ( args->count()!=0 ) { // opened urls provided on the command line for (int i = 0; icount(); i++) { @@ -404,7 +404,7 @@ void MainWindow::configureToolbar() { saveMainWindowSettings(KGlobal::config(), "MainWindow"); KEditToolbar dlg(actionCollection()); - connect(&dlg, SIGNAL(newToolbarConfig()), SLOT(applyToolbarSettings())); + connect(&dlg, TQT_SIGNAL(newToolbarConfig()), TQT_SLOT(applyToolbarSettings())); dlg.exec(); } @@ -457,7 +457,7 @@ void MainWindow::selectTool(const Tool::Group &group) else Debugger::manager->update(true); } -void MainWindow::setDevice(const QString &device) +void MainWindow::setDevice(const TQString &device) { if ( device==i18n(Device::AUTO_DATA.label) ) Compile::Config::setDevice(Main::project(), Device::AUTO_DATA.name); else Compile::Config::setDevice(Main::project(), device); @@ -510,7 +510,7 @@ bool MainWindow::queryClose() return false; } // save other settings - ::BusyCursor bc; + ::PBusyCursor bc; writeDockConfig(kapp->config(), "dock_config"); static_cast(Main::action("project_open_recent"))->saveEntries(kapp->config(), "recent-projects"); static_cast(Main::action("file_open_recent"))->saveEntries(kapp->config(), "recent-files"); @@ -522,7 +522,7 @@ bool MainWindow::queryClose() void MainWindow::newSourceFile() { NewFileDialog dialog(Main::project(), this); - if ( dialog.exec()!=QDialog::Accepted ) return; + if ( dialog.exec()!=TQDialog::Accepted ) return; if ( !dialog.url().exists() && !dialog.url().create(*Main::_compileLog) ) return; Main::_editorManager->openEditor(dialog.url()); if ( dialog.addToProject() ) Main::_projectManager->insertFile(dialog.url()); @@ -534,9 +534,9 @@ void MainWindow::newHexFile() MessageBox::sorry(i18n("You need to specify a device to create a new hex file."), Log::Show); return; } - QString s; + TQString s; for (uint i=0; true; i++) { - s = i18n("Hex") + (i==0 ? QString::null : QString::number(i)); + s = i18n("Hex") + (i==0 ? TQString() : TQString::number(i)); if ( Main::_editorManager->findEditor(s)==0 ) break; } HexEditor *editor = new HexEditor(s, Main::_editorManager); @@ -546,7 +546,7 @@ void MainWindow::newHexFile() bool MainWindow::openFile() { - QString filter; + TQString filter; filter += PURL::sourceFilter(PURL::SimpleFilter); filter += "\n" + PURL::filter(PURL::Hex); filter += "\n" + PURL::projectFilter(PURL::SimpleFilter); @@ -570,7 +570,7 @@ void MainWindow::updateGUI() showProgress(false); break; case Main::Compiling: - _actionStatus->setText(Main::_compileManager->label()); + _actiontqStatus->setText(Main::_compileManager->label()); showProgress(true); makeWidgetDockVisible(Main::_compileLog); break; @@ -595,7 +595,7 @@ void MainWindow::updateGUI() Main::action("show_disassembly_location")->setEnabled(Debugger::manager->coff()!=0 && (isSource || isHeader)); // update project - bool inProject = ( Main::currentEditor() && (currentType==PURL::Nb_FileTypes || Main::currentEditor()->url().isEmpty() || Main::_projectManager->contains(Main::currentEditor()->url())) ); + bool inProject = ( Main::currentEditor() && (currentType==PURL::Nb_FileTypes || Main::currentEditor()->url().isEmpty() || Main::_projectManager->tqcontains(Main::currentEditor()->url())) ); if ( Main::project()==0 && !inProject ) { if ( Main::currentEditor()==0 ) Main::_projectManager->closeProject(); else if ( isSource ) Main::_projectManager->setStandalone(Main::currentEditor()->url(), currentType); @@ -618,7 +618,7 @@ void MainWindow::updateGUI() Main::action("project_add_current_file")->setEnabled(Main::project() && !inProject && idle && isSource); // update build actions - static_cast(_toolStatus->widget())->setText(" " + Main::toolGroup().label() + " "); + static_cast(_tooltqStatus->widget())->setText(" " + Main::toolGroup().label() + " "); bool hexProject = ( Main::_projectManager->projectUrl().fileType()==PURL::Hex ); bool customTool = Main::toolGroup().isCustom(); Main::action("build_build_project")->setEnabled((Main::project() || (inProject && !hexProject) ) && idle); @@ -630,14 +630,14 @@ void MainWindow::updateGUI() // update programmer status PortType ptype = Programmer::GroupConfig::portType(Main::programmerGroup()); - static_cast(_programmerStatus->widget())->setText(" " + Main::programmerGroup().statusLabel(ptype) + " "); - QFont f = font(); + static_cast(_programmertqStatus->widget())->setText(" " + Main::programmerGroup().statusLabel(ptype) + " "); + TQFont f = font(); bool supported = (Main::deviceData() ? Main::programmerGroup().isSupported(Main::deviceData()->name()) : false); f.setItalic(!supported); - _programmerStatus->widget()->setFont(f); + _programmertqStatus->widget()->setFont(f); bool isProgrammer = ( Main::programmerGroup().properties() & ::Programmer::Programmer ); PURL::Url purl = Main::_projectManager->projectUrl(); - bool hasHex = ( currentType==PURL::Hex || Main::_projectManager->contains(purl.toFileType(PURL::Hex)) ); + bool hasHex = ( currentType==PURL::Hex || Main::_projectManager->tqcontains(purl.toFileType(PURL::Hex)) ); Main::action("prog_connect")->setEnabled(isProgrammer && idle); Main::action("prog_read")->setEnabled(isProgrammer && idle); Main::action("prog_program")->setEnabled(isProgrammer && hasHex && idle); @@ -668,7 +668,7 @@ void MainWindow::updateGUI() Main::_projectManager->updateGUI(); // caption - QString caption; + TQString caption; if ( Main::project() ) caption += Main::project()->name(); if ( Main::currentEditor() ) { if ( Main::project() ) caption += " - "; @@ -681,38 +681,38 @@ void MainWindow::updateGUI() void MainWindow::updateToolViewsActions() { - QValueList::iterator it; + TQValueList::iterator it; for(it=_docks.begin(); it!=_docks.end(); ++it) (*it).action->setChecked((*it).dock->mayBeHide()); } void MainWindow::initDockPosition(const DockData &ddata) { const DockPosition &pos = ddata.position; - ddata.dock->manualDock(manager()->getDockWidgetFromName(pos.parent), pos.pos, pos.space); + ddata.dock->manualDock(manager()->getDockWidgetFromName(pos.tqparent), pos.pos, pos.space); } void MainWindow::resetDockLayout() { - QValueList::iterator it; + TQValueList::iterator it; for (it=_docks.begin(); it!=_docks.end(); ++it) initDockPosition(*it); } -void MainWindow::toggleToolView(QWidget *widget) +void MainWindow::toggleToolView(TQWidget *widget) { static_cast(widget)->changeHideShowState(); } -void MainWindow::runKfind() +void MainWindow::runKtqfind() { if (_kfindProcess) return; _kfindProcess = new ::Process::StringOutput; - QString path; + TQString path; PURL::Url url = Main::projectManager().projectUrl(); if ( !url.isEmpty() ) path = url.path(); - _kfindProcess->setup("kfind", path, false); - connect(_kfindProcess, SIGNAL(done(int)), SLOT(kfindDone())); + _kfindProcess->setup("ktqfind", path, false); + connect(_kfindProcess, TQT_SIGNAL(done(int)), TQT_SLOT(kfindDone())); if ( !_kfindProcess->start(0) ) - MessageBox::sorry(i18n("Could not run \"kfind\""), Log::Show); + MessageBox::sorry(i18n("Could not run \"ktqfind\""), Log::Show); } void MainWindow::kfindDone() @@ -725,10 +725,10 @@ void MainWindow::runPikloops() { if (_pikloopsProcess) return; _pikloopsProcess = new ::Process::StringOutput; - _pikloopsProcess->setup("pikloops", QStringList(), false); - connect(_pikloopsProcess, SIGNAL(done(int)), SLOT(pikloopsDone())); + _pikloopsProcess->setup("pikloops", TQStringList(), false); + connect(_pikloopsProcess, TQT_SIGNAL(done(int)), TQT_SLOT(pikloopsDone())); if ( !_pikloopsProcess->start(0) ) - MessageBox::detailedSorry(i18n("Could not run \"pikloops\""), i18n("The Pikloops utility (%1) is not installed in your system.").arg("http://pikloops.sourceforge.net"), Log::Show); + MessageBox::detailedSorry(i18n("Could not run \"pikloops\""), i18n("The Pikloops utility (%1) is not installed in your system.").tqarg("http://pikloops.sourceforge.net"), Log::Show); } void MainWindow::pikloopsDone() @@ -788,8 +788,8 @@ void MainWindow::compileSuccess() Main::_projectManager->setModified(false); if ( Main::project()->outputType()==Tool::OutputType::Executable ) { if ( Debugger::manager->init() ) { - const QStringList &included = Debugger::manager->coff()->filenames(); - QStringList::const_iterator it; + const TQStringList &included = Debugger::manager->coff()->filenames(); + TQStringList::const_iterator it; for (it=included.begin(); it!=included.end(); ++it) { PURL::Directory dir = (Main::project() ? Main::project()->directory() : Main::projectManager().projectUrl().directory()); PURL::Url url = PURL::Url::fromPathOrUrl(*it).toAbsolute(dir); @@ -838,7 +838,7 @@ void MainWindow::stopBuild() } //----------------------------------------------------------------------------- -void MainWindow::keyPressEvent(QKeyEvent *e) +void MainWindow::keyPressEvent(TQKeyEvent *e) { if ( e->key()==Key_Escape ) stopOperations(); } @@ -934,7 +934,7 @@ void MainWindow::program() { HexEditor *editor = getHexEditor(); if ( editor==0 ) return; - if ( Main::programmerGroup().isDebugger() && !Main::_projectManager->contains(editor->url()) ) { + if ( Main::programmerGroup().isDebugger() && !Main::_projectManager->tqcontains(editor->url()) ) { MessageBox::sorry(i18n("It is not possible to start a debugging session with an hex file not generated with the current project."), Log::Show); return; } @@ -950,7 +950,7 @@ void MainWindow::verify() void MainWindow::read() { - QString s = i18n("Read"); + TQString s = i18n("Read"); Editor *e = Main::_editorManager->findEditor(s); if (e) Main::_editorManager->closeEditor(e, true); HexEditor *editor = new HexEditor(s, Main::_editorManager); @@ -964,12 +964,12 @@ void MainWindow::read() void MainWindow::showProgress(bool show) { if (show) { - BusyCursor::start(); - _actionStatus->show(); + PBusyCursor::start(); + _actiontqStatus->show(); _actionProgress->show(); } else { - BusyCursor::stop(); - _actionStatus->hide(); + PBusyCursor::stop(); + _actiontqStatus->hide(); _actionProgress->hide(); } } @@ -983,11 +983,11 @@ void MainWindow::setTotalProgress(uint nb) //qDebug("set total steps: %i", total); _actionProgress->setTotalSteps(nb); _actionProgress->setProgress(0); - QApplication::eventLoop()->processEvents(QEventLoop::ExcludeUserInput); // #### DANGER !!!! + TQApplication::eventLoop()->processEvents(TQEventLoop::ExcludeUserInput); // #### DANGER !!!! } void MainWindow::setProgress(uint nb) { _actionProgress->setProgress(nb); - QApplication::eventLoop()->processEvents(QEventLoop::ExcludeUserInput); // #### DANGER !!!! + TQApplication::eventLoop()->processEvents(TQEventLoop::ExcludeUserInput); // #### DANGER !!!! } diff --git a/src/libgui/toplevel.h b/src/libgui/toplevel.h index 11a4316..d3e78be 100644 --- a/src/libgui/toplevel.h +++ b/src/libgui/toplevel.h @@ -10,8 +10,8 @@ #ifndef TOPLEVEL_H #define TOPLEVEL_H -#include -#include +#include +#include #include #include "config_center.h" @@ -26,10 +26,11 @@ namespace Process { class Base; } class MainWindow : public KDockMainWindow { Q_OBJECT + TQ_OBJECT public: MainWindow(); virtual ~MainWindow(); - void setDevice(const QString &device); + void setDevice(const TQString &device); public slots: void newSourceFile(); @@ -41,7 +42,7 @@ public slots: void configureProject(); void showDeviceInfo(); void runPikloops(); - void runKfind(); + void runKtqfind(); void configGenerator(); void templateGenerator(); void updateGUI(); @@ -77,7 +78,7 @@ private slots: void updateToolViewsActions(); void resetDockLayout(); - void toggleToolView(QWidget *widget); + void toggleToolView(TQWidget *widget); void pikloopsDone(); void kfindDone(); @@ -92,10 +93,10 @@ signals: private: Log::Widget *_programLog; - QLabel *_actionStatus, *_debugStatus, *_editorStatus; - ProgrammerStatusWidget *_programmerStatus; - ToolStatusWidget *_toolStatus; - QProgressBar *_actionProgress; + TQLabel *_actiontqStatus, *_debugtqStatus, *_editortqStatus; + ProgrammerStatusWidget *_programmertqStatus; + ToolStatusWidget *_tooltqStatus; + TQProgressBar *_actionProgress; ConfigGenerator *_configGenerator; ::Process::Base *_pikloopsProcess, *_kfindProcess; bool _forceProgramAfterBuild; @@ -103,9 +104,9 @@ private: class DockPosition { public: DockPosition() {} - DockPosition(const QString &pparent) : parent(pparent), pos(KDockWidget::DockCenter), space(0) {} - DockPosition(KDockWidget::DockPosition ppos, uint pspace) : parent("main_dock_widget"), pos(ppos), space(pspace) {} - QString parent; + DockPosition(const TQString &ptqparent) : tqparent(ptqparent), pos(KDockWidget::DockCenter), space(0) {} + DockPosition(KDockWidget::DockPosition ppos, uint pspace) : tqparent("main_dock_widget"), pos(ppos), space(pspace) {} + TQString tqparent; KDockWidget::DockPosition pos; uint space; }; @@ -113,19 +114,19 @@ private: public: ViewMenuAction *action; KDockWidget *dock; - QString title; + TQString title; DockPosition position; }; - QValueList _docks; + TQValueList _docks; KDockWidget *_mainDock; HexEditor *getHexEditor(); virtual bool queryClose(); bool stopOperations(); void cleanBuild(bool singleFile); - virtual void keyPressEvent(QKeyEvent *e); + virtual void keyPressEvent(TQKeyEvent *e); void readDockConfig(); - KDockWidget *createDock(const QString &name, const QPixmap &icon, const QString &title, const DockPosition &position); + KDockWidget *createDock(const TQString &name, const TQPixmap &icon, const TQString &title, const DockPosition &position); void initDockPosition(const DockData &ddata); }; diff --git a/src/libgui/toplevel_ui.cpp b/src/libgui/toplevel_ui.cpp index 5e8db32..2bb50ee 100644 --- a/src/libgui/toplevel_ui.cpp +++ b/src/libgui/toplevel_ui.cpp @@ -8,18 +8,18 @@ ***************************************************************************/ #include "toplevel_ui.h" -#include +#include #include #include "progs/list/prog_list.h" #include "tools/list/tool_list.h" //---------------------------------------------------------------------------- -ProgrammerStatusWidget::ProgrammerStatusWidget(QWidget *parent) - : QObject(parent), KeyPopupButton(parent) +ProgrammerStatusWidget::ProgrammerStatusWidget(TQWidget *tqparent) + : TQObject(tqparent), KeyPopupButton(tqparent) { - connect(widget(), SIGNAL(activated(int)), SLOT(activatedSlot(int))); - widget()->appendAction(i18n("Configure..."), "configure", this, SIGNAL(configure())); + connect(widget(), TQT_SIGNAL(activated(int)), TQT_SLOT(activatedSlot(int))); + widget()->appendAction(i18n("Configure..."), "configure", this, TQT_SIGNAL(configure())); widget()->appendSeparator(); Programmer::Lister::ConstIterator it; for (it=Programmer::lister().begin(); it!=Programmer::lister().end(); ++it) @@ -32,12 +32,12 @@ void ProgrammerStatusWidget::activatedSlot(int id) } //---------------------------------------------------------------------------- -ToolStatusWidget::ToolStatusWidget(QWidget *parent) - : QObject(parent), KeyPopupButton(parent) +ToolStatusWidget::ToolStatusWidget(TQWidget *tqparent) + : TQObject(tqparent), KeyPopupButton(tqparent) { - connect(widget(), SIGNAL(activated(int)), SLOT(activatedSlot(int))); - widget()->appendAction(i18n("Configure Toolchain..."), "configure", this, SIGNAL(configureToolchain())); - widget()->appendAction(i18n("Configure Compilation..."), "configure", this, SIGNAL(configure())); + connect(widget(), TQT_SIGNAL(activated(int)), TQT_SLOT(activatedSlot(int))); + widget()->appendAction(i18n("Configure Toolchain..."), "configure", this, TQT_SIGNAL(configureToolchain())); + widget()->appendAction(i18n("Configure Compilation..."), "configure", this, TQT_SIGNAL(configure())); widget()->appendSeparator(); Tool::Lister::ConstIterator it; for (it=Tool::lister().begin(); it!=Tool::lister().end(); ++it) @@ -61,11 +61,11 @@ void ViewMenuAction::slotActivated() } //---------------------------------------------------------------------------- -MenuBarButton::MenuBarButton(const QString &icon, QWidget *parent) - : QToolButton(parent, "menu_bar_button") +MenuBarButton::MenuBarButton(const TQString &icon, TQWidget *tqparent) + : TQToolButton(tqparent, "menu_bar_button") { - QFontMetrics fm(font()); - int h = fm.height() + 2*style().pixelMetric(QStyle::PM_DefaultFrameWidth, this); + TQFontMetrics fm(font()); + int h = fm.height() + 2*tqstyle().tqpixelMetric(TQStyle::PM_DefaultFrameWidth, this); setFixedHeight(h); KIconLoader loader; setIconSet(loader.loadIconSet(icon, KIcon::Small, fm.height()-2)); @@ -73,7 +73,7 @@ MenuBarButton::MenuBarButton(const QString &icon, QWidget *parent) setAutoRaise(true); } -QSize MenuBarButton::sizeHint() const +TQSize MenuBarButton::tqsizeHint() const { - return QSize(QToolButton::sizeHint().width(), height()); + return TQSize(TQToolButton::tqsizeHint().width(), height()); } diff --git a/src/libgui/toplevel_ui.h b/src/libgui/toplevel_ui.h index 8a5f631..b4e99b8 100644 --- a/src/libgui/toplevel_ui.h +++ b/src/libgui/toplevel_ui.h @@ -9,7 +9,7 @@ #ifndef TOPLEVEL_UI_H #define TOPLEVEL_UI_H -#include +#include #include #include @@ -18,11 +18,12 @@ namespace Programmer { class Group; } namespace Tool { class Group; } //---------------------------------------------------------------------------- -class ProgrammerStatusWidget : public QObject, public KeyPopupButton +class ProgrammerStatusWidget : public TQObject, public KeyPopupButton { Q_OBJECT + TQ_OBJECT public: - ProgrammerStatusWidget(QWidget *parent); + ProgrammerStatusWidget(TQWidget *tqparent); signals: void configure(); @@ -33,11 +34,12 @@ private slots: }; //---------------------------------------------------------------------------- -class ToolStatusWidget : public QObject, public KeyPopupButton +class ToolStatusWidget : public TQObject, public KeyPopupButton { Q_OBJECT + TQ_OBJECT public: - ToolStatusWidget(QWidget *parent); + ToolStatusWidget(TQWidget *tqparent); signals: void configureToolchain(); @@ -52,11 +54,12 @@ private slots: class ViewMenuAction : public KToggleAction { Q_OBJECT + TQ_OBJECT public: ViewMenuAction(KDockWidget *widget); signals: - void activated(QWidget *); + void activated(TQWidget *); private slots: virtual void slotActivated(); @@ -66,12 +69,13 @@ private: }; //---------------------------------------------------------------------------- -class MenuBarButton : public QToolButton +class MenuBarButton : public TQToolButton { Q_OBJECT + TQ_OBJECT public: - MenuBarButton(const QString &icon, QWidget *parent); - virtual QSize sizeHint() const; + MenuBarButton(const TQString &icon, TQWidget *tqparent); + virtual TQSize tqsizeHint() const; }; #endif diff --git a/src/libgui/watch_view.cpp b/src/libgui/watch_view.cpp index 984dc7c..4f5ef89 100644 --- a/src/libgui/watch_view.cpp +++ b/src/libgui/watch_view.cpp @@ -8,8 +8,8 @@ ***************************************************************************/ #include "watch_view.h" -#include -#include +#include +#include #include #include "main_global.h" @@ -21,25 +21,25 @@ #include "common/gui/list_container.h" //----------------------------------------------------------------------------- -Register::BaseListView::BaseListView(QWidget *parent) - : ListView(parent), _root(0) +Register::BaseListView::BaseListView(TQWidget *tqparent) + : ListView(tqparent), _root(0) { header()->hide(); setSorting(-1); setFullWidth(true); setRootIsDecorated(false); setAllColumnsShowFocus(true); - connect(this, SIGNAL(mouseButtonClicked(int, QListViewItem *, const QPoint &, int)), - SLOT(itemClicked(int, QListViewItem *, const QPoint &, int))); - connect(this, SIGNAL(contextMenuRequested(QListViewItem *, const QPoint &, int)), - SLOT(contextMenu(QListViewItem *, const QPoint &, int))); + connect(this, TQT_SIGNAL(mouseButtonClicked(int, TQListViewItem *, const TQPoint &, int)), + TQT_SLOT(itemClicked(int, TQListViewItem *, const TQPoint &, int))); + connect(this, TQT_SIGNAL(contextMenuRequested(TQListViewItem *, const TQPoint &, int)), + TQT_SLOT(contextMenu(TQListViewItem *, const TQPoint &, int))); } //----------------------------------------------------------------------------- -Register::RegisterListView::RegisterListView(QWidget *parent) - : BaseListView(parent) +Register::RegisterListView::RegisterListView(TQWidget *tqparent) + : BaseListView(tqparent) { - addColumn(QString::null); + addColumn(TQString()); } void Register::RegisterListView::init(const Device::Data *data) @@ -55,34 +55,34 @@ void Register::RegisterListView::init(const Device::Data *data) void Register::RegisterListView::updateView() { - QListViewItemIterator it(_root); + TQListViewItemIterator it(_root); for (; it.current(); ++it) { int id = _root->id(it.current()); if ( id==-1 || _ids[id].type()==Invalid ) continue; bool watched = Register::list().isWatched(_ids[id]); - static_cast(it.current())->setOn(watched); + static_cast(it.current())->setOn(watched); } } -void Register::RegisterListView::itemClicked(int button, QListViewItem *item, const QPoint &, int) +void Register::RegisterListView::itemClicked(int button, TQListViewItem *item, const TQPoint &, int) { - if ( item==0 || button!=LeftButton ) return; + if ( item==0 || button!=Qt::LeftButton ) return; if ( item==firstChild() ) Main::editorManager().openEditor(EditorManager::RegisterEditor); int id = _root->id(item); if ( id==-1 || _ids[id].type()==Invalid ) return; bool watched = Register::list().isWatched(_ids[id]); - static_cast(item)->setOn(!watched); + static_cast(item)->setOn(!watched); Debugger::manager->setRegisterWatched(_ids[id], !watched); } //----------------------------------------------------------------------------- -Register::WatchedListView::WatchedListView(QWidget *parent) - : BaseListView(parent), _popup(0), _base(NumberBase::Hex) +Register::WatchedListView::WatchedListView(TQWidget *tqparent) + : BaseListView(tqparent), _popup(0), _base(NumberBase::Hex) { setSorting(0); - addColumn(QString::null); - addColumn(QString::null); - addColumn(QString::null); + addColumn(TQString()); + addColumn(TQString()); + addColumn(TQString()); _root = new ListViewItemContainer(i18n("Watched"), this); KIconLoader loader; @@ -91,14 +91,14 @@ Register::WatchedListView::WatchedListView(QWidget *parent) _root->setOpen(true); } -KPopupMenu *Register::WatchedListView::appendFormatMenu(KPopupMenu *parent, uint offset) +KPopupMenu *Register::WatchedListView::appendFormatMenu(KPopupMenu *tqparent, uint offset) { KIconLoader loader; - QPixmap icon = loader.loadIcon("fonts", KIcon::Small); + TQPixmap icon = loader.loadIcon("fonts", KIcon::Small); KPopupMenu *popup = new KPopupMenu; popup->insertTitle(i18n("Format")); FOR_EACH(NumberBase, base) popup->insertItem(base.label(), offset + base.type()); - parent->insertItem(icon, i18n("Format"), popup); + tqparent->insertItem(icon, i18n("Format"), popup); return popup; } @@ -112,24 +112,24 @@ void Register::WatchedListView::init(const Device::Data *data) _popup->insertSeparator(); _formatPopup = appendFormatMenu(_popup, _ids.count()); KIconLoader loader; - QPixmap icon = loader.loadIcon("cancel", KIcon::Small); - _popup->insertItem(icon, i18n("Clear"), Debugger::manager, SLOT(stopWatchAll())); + TQPixmap icon = loader.loadIcon("cancel", KIcon::Small); + _popup->insertItem(icon, i18n("Clear"), Debugger::manager, TQT_SLOT(stopWatchAll())); } void Register::WatchedListView::updateView() { // delete items not watched anymore - for (QListViewItem *item=_root->firstChild(); item;) { + for (TQListViewItem *item=_root->firstChild(); item;) { ListViewItem *ritem = static_cast(item); item = item->nextSibling(); if ( !Register::list().isWatched(ritem->data()) ) delete ritem; } // add new items bool added = false; - QValueList watched = Register::list().watched(); - QValueVector items(watched.count()); + TQValueList watched = Register::list().watched(); + TQValueVector items(watched.count()); for (uint k=0; kfirstChild(); + TQListViewItem *item = _root->firstChild(); for (; item; item=item->nextSibling()) if ( static_cast(item)->data()==watched[k] ) break; if (item) { @@ -143,23 +143,23 @@ void Register::WatchedListView::updateView() } } -QString Register::WatchedListView::tooltip(const QListViewItem &item, int col) const +TQString Register::WatchedListView::tooltip(const TQListViewItem &item, int col) const { if ( item.rtti()==Register::PortBitRtti ) return static_cast(item).tooltip(col); if ( item.rtti()==Register::RegisterRtti ) return static_cast(item).tooltip(col); - return QString::null; + return TQString(); } -void Register::WatchedListView::itemClicked(int button, QListViewItem *item, const QPoint &, int col) +void Register::WatchedListView::itemClicked(int button, TQListViewItem *item, const TQPoint &, int col) { - if ( item==0 || button!=LeftButton ) return; + if ( item==0 || button!=Qt::LeftButton ) return; else if ( item->rtti()==RegisterRtti ) { if ( col==2 && Main::programmerState()==Programmer::Halted ) static_cast(item)->startRename(); else item->setOpen(!item->isOpen()); } } -void Register::WatchedListView::contextMenu(QListViewItem *item, const QPoint &p, int) +void Register::WatchedListView::contextMenu(TQListViewItem *item, const TQPoint &p, int) { if ( item==0 ) return; if ( item==firstChild() ) { @@ -170,7 +170,7 @@ void Register::WatchedListView::contextMenu(QListViewItem *item, const QPoint &p if ( ressetRegisterWatched(_ids[res], true); else { _base = NumberBase::Type(res-_ids.count()); - for (QListViewItem *item=_root->firstChild(); item; item=item->nextSibling()) + for (TQListViewItem *item=_root->firstChild(); item; item=item->nextSibling()) static_cast(item)->setBase(_base); } } else { @@ -178,11 +178,11 @@ void Register::WatchedListView::contextMenu(QListViewItem *item, const QPoint &p Register::ListViewItem *ritem = static_cast(item); KPopupMenu *pop = new KPopupMenu; pop->insertTitle(ritem->label()); - QPopupMenu *fpop = appendFormatMenu(pop, 0); + TQPopupMenu *fpop = appendFormatMenu(pop, 0); FOR_EACH(NumberBase, base) fpop->setItemChecked(base.type(), ritem->base()==base); pop->insertSeparator(); KIconLoader loader; - QPixmap icon = loader.loadIcon("edit", KIcon::Small); + TQPixmap icon = loader.loadIcon("edit", KIcon::Small); int editId = pop->insertItem(icon, i18n("Edit")); pop->setItemEnabled(editId, Main::programmerState()==Programmer::Halted); icon = loader.loadIcon("cancel", KIcon::Small); @@ -196,11 +196,11 @@ void Register::WatchedListView::contextMenu(QListViewItem *item, const QPoint &p } //----------------------------------------------------------------------------- -Register::WatchView::WatchView(QWidget *parent) - : QWidget(parent, "watch_view"), GenericView(Register::list()), _data(0) +Register::WatchView::WatchView(TQWidget *tqparent) + : TQWidget(tqparent, "watch_view"), GenericView(Register::list()), _data(0) { - QVBoxLayout *top = new QVBoxLayout(this); - QValueList sizes; + TQVBoxLayout *top = new TQVBoxLayout(this); + TQValueList sizes; sizes.append(50); Splitter *splitter = new Splitter(sizes, Qt::Vertical, this, "watch_window_splitter"); top->addWidget(splitter); diff --git a/src/libgui/watch_view.h b/src/libgui/watch_view.h index a7ac24c..f5090d1 100644 --- a/src/libgui/watch_view.h +++ b/src/libgui/watch_view.h @@ -22,62 +22,66 @@ namespace Register class BaseListView : public ListView { Q_OBJECT + TQ_OBJECT public: - BaseListView(QWidget *parent); + BaseListView(TQWidget *tqparent); virtual void init(const Device::Data *data) = 0; virtual void updateView() = 0; private slots: - virtual void itemClicked(int button, QListViewItem *item, const QPoint &p, int col) = 0; - virtual void contextMenu(QListViewItem *item, const QPoint &p, int col) = 0; + virtual void itemClicked(int button, TQListViewItem *item, const TQPoint &p, int col) = 0; + virtual void contextMenu(TQListViewItem *item, const TQPoint &p, int col) = 0; protected: ListViewItemContainer *_root; - QValueVector _ids; + TQValueVector _ids; }; //----------------------------------------------------------------------------- class RegisterListView : public BaseListView { Q_OBJECT + TQ_OBJECT public: - RegisterListView(QWidget *parent); + RegisterListView(TQWidget *tqparent); virtual void init(const Device::Data *data); virtual void updateView(); private slots: - virtual void itemClicked(int button, QListViewItem *item, const QPoint &p, int col); - virtual void contextMenu(QListViewItem *, const QPoint &, int) {} + virtual void itemClicked(int button, TQListViewItem *item, const TQPoint &p, int col); + virtual void contextMenu(TQListViewItem *, const TQPoint &, int) {} }; //----------------------------------------------------------------------------- class WatchedListView : public BaseListView { Q_OBJECT + TQ_OBJECT public: - WatchedListView(QWidget *parent); - virtual QString tooltip(const QListViewItem &item, int col) const; + WatchedListView(TQWidget *tqparent); + virtual TQString tooltip(const TQListViewItem &item, int col) const; virtual void init(const Device::Data *data); virtual void updateView(); private slots: - virtual void itemClicked(int button, QListViewItem *item, const QPoint &p, int col); - virtual void contextMenu(QListViewItem *item, const QPoint &p, int col); + virtual void itemClicked(int button, TQListViewItem *item, const TQPoint &p, int col); + virtual void contextMenu(TQListViewItem *item, const TQPoint &p, int col); private: PopupContainer *_popup; KPopupMenu *_formatPopup; NumberBase _base; - static KPopupMenu *appendFormatMenu(KPopupMenu *parent, uint offset); + static KPopupMenu *appendFormatMenu(KPopupMenu *tqparent, uint offset); }; //----------------------------------------------------------------------------- -class WatchView : public QWidget, public GenericView +class WatchView : public TQWidget, public GenericView { Q_OBJECT + TQ_OBJECT public: - WatchView(QWidget *parent); + WatchView(TQWidget *tqparent); void init(bool force); public slots: diff --git a/src/piklab-coff/main.cpp b/src/piklab-coff/main.cpp index bc24b53..9e865e7 100644 --- a/src/piklab-coff/main.cpp +++ b/src/piklab-coff/main.cpp @@ -51,7 +51,7 @@ CLI::Main::Main() CLI::Main::~Main() {} -CLI::ExitCode CLI::Main::prepareCommand(const QString &command) +CLI::ExitCode CLI::Main::prepareCommand(const TQString &command) { const CommandData *data = findCommandData(command); CommandProperties properties = static_cast(data->properties); @@ -76,9 +76,9 @@ CLI::ExitCode CLI::Main::prepareCommand(const QString &command) return OK; } -QString CLI::Main::prettyAuxSymbol(const Coff::AuxSymbol &aux) +TQString CLI::Main::prettyAuxSymbol(const Coff::AuxSymbol &aux) { - QString s = (aux.type()==Coff::AuxSymbolType::Nb_Types ? "?" : aux.type().label()); + TQString s = (aux.type()==Coff::AuxSymbolType::Nb_Types ? "?" : aux.type().label()); switch (aux.type().type()) { case Coff::AuxSymbolType::Direct: break; case Coff::AuxSymbolType::File: s += "=" + static_cast(aux).filename(); break; @@ -89,29 +89,29 @@ QString CLI::Main::prettyAuxSymbol(const Coff::AuxSymbol &aux) return s; } -QString CLI::Main::prettySymbol(const Coff::Symbol &sym) +TQString CLI::Main::prettySymbol(const Coff::Symbol &sym) { - QStringList saux; + TQStringList saux; for (uint i=0; i::const_iterator it; + TQMap::const_iterator it; for (it=coff.variables().begin(); it!=coff.variables().end(); ++it) keys.append(it.key(), toHexLabelAbs(it.data())); return OK; @@ -165,8 +165,8 @@ CLI::ExitCode CLI::Main::executeCommandObject(const QString &command, Log::KeyLi for (uint i=0; iname(), i18n("type=\"%1\" address=%2 size=%3 flags=%4") - .arg(s->type()==Coff::SectionType::Nb_Types ? "?" : s->type().label()) - .arg(toHexLabel(s->address(), nbCharsAddress)).arg(toHexLabel(s->size(), nbCharsAddress)).arg(toHexLabel(s->flags(), 8))); + .tqarg(s->type()==Coff::SectionType::Nb_Types ? "?" : s->type().label()) + .tqarg(toHexLabel(s->address(), nbCharsAddress)).tqarg(toHexLabel(s->size(), nbCharsAddress)).tqarg(toHexLabel(s->flags(), 8))); } return OK; } @@ -180,13 +180,13 @@ CLI::ExitCode CLI::Main::executeCommandObject(const QString &command, Log::KeyLi for (uint k=0; klines().count()); k++) { if (first) { first = false; - keys.append(i18n("section \"%1\":").arg(s->name()), QString::null); + keys.append(i18n("section \"%1\":").tqarg(s->name()), TQString()); } const Coff::CodeLine *cl = s->lines()[k]; - QString key = cl->filename() + ":" + QString::number(cl->line()); + TQString key = cl->filename() + ":" + TQString::number(cl->line()); if ( !cl->address().isValid() ) { const Coff::Symbol &sym = *cl->symbol(); - keys.append(key, i18n("symbol \"%1\"").arg(sym.name()) + prettySymbol(sym)); + keys.append(key, i18n("symbol \"%1\"").tqarg(sym.name()) + prettySymbol(sym)); } else keys.append(key, toHexLabel(cl->address(), nbCharsAddress)); } } @@ -195,16 +195,16 @@ CLI::ExitCode CLI::Main::executeCommandObject(const QString &command, Log::KeyLi if ( command=="files" ) { keys.setTitle(i18n("Files:")); - QStringList::const_iterator it; + TQStringList::const_iterator it; for (it=coff.filenames().begin(); it!=coff.filenames().end(); ++it) - keys.append(*it, QString::null); + keys.append(*it, TQString()); return OK; } return errorExit(i18n("Command not available for COFF of type Object."), ARG_ERROR); } -CLI::ExitCode CLI::Main::executeCommand(const QString &command) +CLI::ExitCode CLI::Main::executeCommand(const TQString &command) { CoffType type = Coff::identify(_source, *this); if ( type==CoffType::Nb_Types ) return ARG_ERROR; @@ -226,32 +226,32 @@ CLI::ExitCode CLI::Main::prepareRun(bool &interactive) return OK; } -CLI::ExitCode CLI::Main::executeSetCommand(const QString &property, const QString &value) +CLI::ExitCode CLI::Main::executeSetCommand(const TQString &property, const TQString &value) { if ( property=="device" || property=="processor" ) { if ( value.isEmpty() ) { _device = 0; return OK; } - QString s = value.upper(); + TQString s = value.upper(); _device = Device::lister().data(s); - if ( _device==0 ) return errorExit(i18n("Unknown device \"%1\".").arg(s), ARG_ERROR); + if ( _device==0 ) return errorExit(i18n("Unknown device \"%1\".").tqarg(s), ARG_ERROR); return OK; } - return errorExit(i18n("Unknown property \"%1\".").arg(property), ARG_ERROR); + return errorExit(i18n("Unknown property \"%1\".").tqarg(property), ARG_ERROR); } -QString CLI::Main::executeGetCommand(const QString &property) +TQString CLI::Main::executeGetCommand(const TQString &property) { if ( property=="device" || property=="processor" ) { if ( _device==0 ) return i18n(""); return _device->name(); } - log(Log::LineType::SoftError, i18n("Unknown property \"%1\".").arg(property)); - return QString::null; + log(Log::LineType::SoftError, i18n("Unknown property \"%1\".").tqarg(property)); + return TQString(); } -CLI::ExitCode CLI::Main::list(const QString &command) +CLI::ExitCode CLI::Main::list(const TQString &command) { if ( MainBase::list(command)==OK ) return OK; if ( command=="device-list" ) return deviceList(); @@ -261,11 +261,11 @@ CLI::ExitCode CLI::Main::list(const QString &command) CLI::ExitCode CLI::Main::deviceList() { - QValueVector devices; + TQValueVector devices; log(Log::LineType::Normal, i18n("Supported devices:")); devices = Device::lister().supportedDevices(); qHeapSort(devices); - QString s; + TQString s; for (uint i=0; i(data->properties); @@ -79,7 +79,7 @@ CLI::ExitCode CLI::Main::prepareCommand(const QString &command) if ( !file.openForRead() ) return FILE_ERROR; _errors = _source1.load(file.stream(), _format); if ( (properties & NeedCorrectInput) && !_errors.isEmpty() ) { - QString s = (properties & NeedSource2 ? i18n("First hex file: ") : QString::null); + TQString s = (properties & NeedSource2 ? i18n("First hex file: ") : TQString()); for (uint i=0; ifromHexBuffer(_source1, warnings); - if ( wtypes==Device::Memory::NoWarning ) return okExit(i18n("Hex file is compatible with device \"%1\".").arg(_device->name())); + if ( wtypes==Device::Memory::NoWarning ) return okExit(i18n("Hex file is compatible with device \"%1\".").tqarg(_device->name())); return errorExit(warnings.join("\n"), EXEC_ERROR); } if ( command=="info" ) { @@ -159,28 +159,28 @@ CLI::ExitCode CLI::Main::executeCommand(const QString &command) bool firstInSecond = true, secondInFirst = true; HexBuffer::const_iterator it; for (it=_source1.begin(); it!=_source1.end(); ++it) { - if ( it.data().maskWith(0xFFFF)==_source2[it.key()].maskWith(0xFFFF) ) continue; + if ( it.data().tqmaskWith(0xFFFF)==_source2[it.key()].tqmaskWith(0xFFFF) ) continue; firstInSecond = false; } for (it=_source2.begin(); it!=_source2.end(); ++it) { - if ( it.data().maskWith(0xFFFF)==_source1[it.key()].maskWith(0xFFFF) ) continue; + if ( it.data().tqmaskWith(0xFFFF)==_source1[it.key()].tqmaskWith(0xFFFF) ) continue; secondInFirst = false; } if ( firstInSecond && secondInFirst ) return okExit(i18n("The two hex files have the same content.")); if (firstInSecond) log(Log::LineType::Information, i18n("The first hex file is a subset of the second one.")); if (secondInFirst) log(Log::LineType::Information, i18n("The second hex file is a subset of the first one.")); - return errorExit(i18n("The two hex files are different at address %1.").arg(toHexLabel(it.key(), 8)), EXEC_ERROR); + return errorExit(i18n("The two hex files are different at address %1.").tqarg(toHexLabel(it.key(), 8)), EXEC_ERROR); } if ( command=="checksum" ) { - QStringList warnings; + TQStringList warnings; Device::Memory::WarningTypes wtypes = _memory->fromHexBuffer(_source1, warnings); for (uint i=0; ichecksum(); - log(Log::LineType::Normal, i18n("Checksum: %1").arg(toHexLabel(cs, 4))); + log(Log::LineType::Normal, i18n("Checksum: %1").tqarg(toHexLabel(cs, 4))); if ( _device->group().name()=="pic" ) { BitValue ucs = static_cast(_memory)->unprotectedChecksum(); - if ( ucs!=cs ) log(Log::LineType::Information, i18n("Unprotected checksum: %1").arg(toHexLabel(ucs, 4))); + if ( ucs!=cs ) log(Log::LineType::Information, i18n("Unprotected checksum: %1").tqarg(toHexLabel(ucs, 4))); } return OK; } @@ -211,16 +211,16 @@ CLI::ExitCode CLI::Main::prepareRun(bool &interactive) return OK; } -CLI::ExitCode CLI::Main::executeSetCommand(const QString &property, const QString &value) +CLI::ExitCode CLI::Main::executeSetCommand(const TQString &property, const TQString &value) { if ( property=="device" || property=="processor" ) { if ( value.isEmpty() ) { _device = 0; return OK; } - QString s = value.upper(); + TQString s = value.upper(); _device = Device::lister().data(s); - if ( _device==0 ) return errorExit(i18n("Unknown device \"%1\".").arg(s), ARG_ERROR); + if ( _device==0 ) return errorExit(i18n("Unknown device \"%1\".").tqarg(s), ARG_ERROR); return OK; } if ( property=="fill" ) { @@ -232,10 +232,10 @@ CLI::ExitCode CLI::Main::executeSetCommand(const QString &property, const QStrin if ( !ok ) return errorExit(i18n("Number format not recognized."), ARG_ERROR); return OK; } - return errorExit(i18n("Unknown property \"%1\".").arg(property), ARG_ERROR); + return errorExit(i18n("Unknown property \"%1\".").tqarg(property), ARG_ERROR); } -QString CLI::Main::executeGetCommand(const QString &property) +TQString CLI::Main::executeGetCommand(const TQString &property) { if ( property=="device" || property=="processor" ) { if ( _device==0 ) return i18n(""); @@ -245,11 +245,11 @@ QString CLI::Main::executeGetCommand(const QString &property) if ( _fill.isEmpty() ) return i18n(""); return _fill; } - log(Log::LineType::SoftError, i18n("Unknown property \"%1\".").arg(property)); - return QString::null; + log(Log::LineType::SoftError, i18n("Unknown property \"%1\".").tqarg(property)); + return TQString(); } -CLI::ExitCode CLI::Main::list(const QString &command) +CLI::ExitCode CLI::Main::list(const TQString &command) { if ( MainBase::list(command)==OK ) return OK; if ( command=="device-list" ) return deviceList(); @@ -260,11 +260,11 @@ CLI::ExitCode CLI::Main::list(const QString &command) CLI::ExitCode CLI::Main::deviceList() { - QValueVector devices; + TQValueVector devices; log(Log::LineType::Normal, i18n("Supported devices:")); devices = Device::lister().supportedDevices(); qHeapSort(devices); - QString s; + TQString s; for (uint i=0; i _errors; + TQValueList _errors; const Device::Data *_device; Device::Memory *_memory; - QString _fill; + TQString _fill; - virtual ExitCode prepareCommand(const QString &command); - virtual ExitCode executeCommand(const QString &command); + virtual ExitCode prepareCommand(const TQString &command); + virtual ExitCode executeCommand(const TQString &command); virtual ExitCode prepareRun(bool &interactive); - virtual ExitCode executeSetCommand(const QString &property, const QString &value); - virtual QString executeGetCommand(const QString &property); - virtual ExitCode list(const QString &listName); + virtual ExitCode executeSetCommand(const TQString &property, const TQString &value); + virtual TQString executeGetCommand(const TQString &property); + virtual ExitCode list(const TQString &listName); ExitCode deviceList(); ExitCode fillOptionList(); }; diff --git a/src/piklab-prog/cli_debug_manager.h b/src/piklab-prog/cli_debug_manager.h index 8da14fa..10c61ec 100644 --- a/src/piklab-prog/cli_debug_manager.h +++ b/src/piklab-prog/cli_debug_manager.h @@ -17,6 +17,7 @@ namespace Debugger class CliManager : public Manager { Q_OBJECT + TQ_OBJECT public: CliManager() {} virtual PURL::Url coffUrl() const { return CLI::_coffUrl; } diff --git a/src/piklab-prog/cli_interactive.cpp b/src/piklab-prog/cli_interactive.cpp index 148ba62..872a53e 100644 --- a/src/piklab-prog/cli_interactive.cpp +++ b/src/piklab-prog/cli_interactive.cpp @@ -15,7 +15,7 @@ # include #endif #include -#include +#include #include #include "progs/base/generic_prog.h" @@ -74,8 +74,8 @@ void CLI::Interactive::signalHandler(int n) _interactive->redisplayPrompt(); } -CLI::Interactive::Interactive(QObject *parent) - : QObject(parent, "interactive") +CLI::Interactive::Interactive(TQObject *tqparent) + : TQObject(tqparent, "interactive") { setView(_view); ::signal(SIGINT, signalHandler); @@ -84,7 +84,7 @@ CLI::Interactive::Interactive(QObject *parent) #else _stdin.open(IO_ReadOnly, stdin); #endif - QTimer::singleShot(0, this, SLOT(displayPrompt())); + TQTimer::singleShot(0, this, TQT_SLOT(displayPrompt())); } void CLI::Interactive::redisplayPrompt() @@ -101,7 +101,7 @@ void CLI::Interactive::displayPrompt() { #if defined(HAVE_READLINE) char *line = readline("> "); - _input = QString(line); + _input = TQString(line); if ( !_input.isEmpty() ) add_history(line); free(line); #else @@ -109,14 +109,14 @@ void CLI::Interactive::displayPrompt() fflush(stdout); char buffer[1000]; _stdin.readLine(buffer, 1000); - _input = QString(buffer); + _input = TQString(buffer); #endif lineRead(); } -CLI::ExitCode CLI::Interactive::processLine(const QString &s) +CLI::ExitCode CLI::Interactive::processLine(const TQString &s) { - QStringList words = QStringList::split(" ", s); + TQStringList words = TQStringList::split(" ", s); if ( words.count()==0 ) return ARG_ERROR; if ( words[0]=="command-list" || words[0]=="property-list" || words[0]=="range-list" || isPropertyList(words[0]) ) return static_cast
(_main)->list(words[0]); @@ -131,24 +131,24 @@ CLI::ExitCode CLI::Interactive::processLine(const QString &s) const CommandData *data = findCommandData(words[0]); if ( words[0]=="quit" ) return EXITING; if ( words[0]=="set" ) { - if ( words.count()==2 ) return static_cast
(_main)->executeSetCommand(words[1], QString::null); + if ( words.count()==2 ) return static_cast
(_main)->executeSetCommand(words[1], TQString()); if ( words.count()!=3 ) return errorExit(i18n("This command takes two arguments."), ARG_ERROR); return static_cast
(_main)->executeSetCommand(words[1], words[2]); } if ( words[0]=="unset" ) { if ( words.count()!=2 ) return errorExit(i18n("This command takes one argument."), ARG_ERROR); - return static_cast
(_main)->executeSetCommand(words[1], QString::null); + return static_cast
(_main)->executeSetCommand(words[1], TQString()); } if ( words[0]=="get" ) { if ( words.count()!=2 ) return errorExit(i18n("This command takes one argument."), ARG_ERROR); - QString s = static_cast
(_main)->executeGetCommand(words[1]); + TQString s = static_cast
(_main)->executeGetCommand(words[1]); if ( !s.isEmpty() ) log(Log::LineType::Normal, words[1] + ": " + s); return OK; } if ( words[0]=="help" ) return static_cast
(_main)->list("command-list"); if ( words[0]=="x" ) { if ( words.count()!=2 && words.count()!=3 ) return errorExit(i18n("This command takes one or two argument."), ARG_ERROR); - return executeRegister(words[1], words.count()==3 ? words[2] : QString::null); + return executeRegister(words[1], words.count()==3 ? words[2] : TQString()); } if ( words[0]=="break" ) { if ( words.count()==3 ) { @@ -158,11 +158,11 @@ CLI::ExitCode CLI::Interactive::processLine(const QString &s) if ( !ok ) return errorExit(i18n("Number format not recognized."), ARG_ERROR); PURL::Url dummy; Breakpoint::Data data(dummy, address); - if ( Breakpoint::list().contains(data) ) return okExit(i18n("Breakpoint already set at %1.").arg(toHexLabel(address, nbChars(NumberBase::Hex, address)))); + if ( Breakpoint::list().tqcontains(data) ) return okExit(i18n("Breakpoint already set at %1.").tqarg(toHexLabel(address, nbChars(NumberBase::Hex, address)))); Breakpoint::list().append(data); Breakpoint::list().setAddress(data, address); Breakpoint::list().setState(data, Breakpoint::Active); - return okExit(i18n("Breakpoint set at %1.").arg(toHexLabel(address, nbChars(NumberBase::Hex, address)))); + return okExit(i18n("Breakpoint set at %1.").tqarg(toHexLabel(address, nbChars(NumberBase::Hex, address)))); } return errorExit(i18n("The first argument should be \"e\"."), ARG_ERROR); } @@ -174,11 +174,11 @@ CLI::ExitCode CLI::Interactive::processLine(const QString &s) if (_device) nbc = _device->nbCharsAddress(); else for (uint i=0; iexit(OK); -#else - QCoreApplication::exit(OK); -#endif + tqApp->exit(OK); return; } - QTimer::singleShot(0, this, SLOT(displayPrompt())); + TQTimer::singleShot(0, this, TQT_SLOT(displayPrompt())); } CLI::ExitCode CLI::Interactive::registerList() @@ -246,11 +242,11 @@ CLI::ExitCode CLI::Interactive::registerList() const Coff::Object *coff = Debugger::manager->coff(); const Pic::RegistersData &rdata = data.registersData(); log(Log::LineType::Normal, i18n("Special Function Registers:")); - QValueVector list = Pic::sfrList(data); - for (uint i=0; i list = Pic::sfrList(data); + for (uint i=0; igroup().name()!="pic" ) return errorExit(i18n("No register."), NOT_SUPPORTED_ERROR); const Pic::Data &data = static_cast(*_device); const Pic::RegistersData &rdata = data.registersData(); - QValueVector list = Pic::variableList(data, *coff); + TQValueVector list = Pic::variableList(data, *coff); if ( list.count()==0 ) log(Log::LineType::Normal, i18n("No variable.")); - for (uint i=0; i(*_device); const Coff::Object *coff = Debugger::manager->coff(); @@ -279,15 +275,15 @@ Address CLI::Interactive::findRegisterAddress(const QString &name) if ( address>rdata.addressFromIndex(rdata.nbRegisters()-1) ) return Address(); return address; } - QValueVector sfrs = Pic::sfrList(data); + TQValueVector sfrs = Pic::sfrList(data); for (uint i=0; i variables = coff->variables(); - if ( variables.contains(name) ) return variables[name]; + TQMap variables = coff->variables(); + if ( variables.tqcontains(name) ) return variables[name]; return Address(); } -CLI::ExitCode CLI::Interactive::executeRegister(const QString &name, const QString &value) +CLI::ExitCode CLI::Interactive::executeRegister(const TQString &name, const TQString &value) { if ( Debugger::manager->debugger()==0 ) return errorExit(i18n("You need to start the debugging session first (with \"start\")."), ARG_ERROR); const Pic::Data &data = static_cast(*_device); @@ -296,7 +292,7 @@ CLI::ExitCode CLI::Interactive::executeRegister(const QString &name, const QStri bool ok; ulong v = fromAnyLabel(value, &ok); if ( !ok ) return errorExit(i18n("Number format not recognized."), ARG_ERROR); - if ( v>maxValue(NumberBase::Hex, nbChars) ) return errorExit(i18n("The given value is too large (max: %1).").arg(toHexLabel(maxValue(NumberBase::Hex, nbChars), nbChars)), ARG_ERROR); + if ( v>maxValue(NumberBase::Hex, nbChars) ) return errorExit(i18n("The given value is too large (max: %1).").tqarg(toHexLabel(maxValue(NumberBase::Hex, nbChars), nbChars)), ARG_ERROR); Register::TypeData rtd; if ( name.lower()=="w" || name.lower()=="wreg" ) rtd = static_cast(Debugger::manager->debugger())->deviceSpecific()->wregTypeData(); @@ -309,38 +305,32 @@ CLI::ExitCode CLI::Interactive::executeRegister(const QString &name, const QStri } if ( value.isEmpty() ) { if ( !Debugger::manager->readRegister(rtd) ) return ARG_ERROR; - return okExit(i18n("%1 = %2").arg(name.upper()).arg(toHexLabel(Register::list().value(rtd), nbChars))); + return okExit(i18n("%1 = %2").tqarg(name.upper()).tqarg(toHexLabel(Register::list().value(rtd), nbChars))); } return (Debugger::manager->writeRegister(rtd, v) ? OK : EXEC_ERROR); } -CLI::ExitCode CLI::Interactive::executeRawCommands(const QString &filename) +CLI::ExitCode CLI::Interactive::executeRawCommands(const TQString &filename) { - QFile file(filename); - if ( !file.open(IO_ReadOnly) ) return errorExit(i18n("Could not open filename \"%1\".").arg(filename), ARG_ERROR); + TQFile file(filename); + if ( !file.open(IO_ReadOnly) ) return errorExit(i18n("Could not open filename \"%1\".").tqarg(filename), ARG_ERROR); if ( Programmer::manager->programmer()==0 ) { Programmer::manager->createProgrammer(_device); if ( !Programmer::manager->programmer()->simpleConnectHardware() ) return EXEC_ERROR; } Programmer::Base *programmer = Programmer::manager->programmer(); for (;;) { - QString s; -#if QT_VERSION<0x040000 + TQString s; if ( file.readLine(s, 1000)==-1 ) break; -#else - char buffer[1000]; - if ( file.readLine(buffer, 1000)==-1 ) break; - s += buffer; -#endif bool write = !s.startsWith(" "); s = s.stripWhiteSpace(); if ( s.isEmpty() ) continue; if (write) { if ( !programmer->hardware()->rawWrite(s) ) return EXEC_ERROR; } else { - QString rs; + TQString rs; if ( !programmer->hardware()->rawRead(s.length(), rs) ) return EXEC_ERROR; - if ( rs!=s ) log(Log::LineType::Warning, i18n("Read string is different than expected: %1 (%2).").arg(rs).arg(s)); + if ( rs!=s ) log(Log::LineType::Warning, i18n("Read string is different than expected: %1 (%2).").tqarg(rs).tqarg(s)); } } return okExit(i18n("End of command file reached.")); diff --git a/src/piklab-prog/cli_interactive.h b/src/piklab-prog/cli_interactive.h index fad6e9d..8509fc0 100644 --- a/src/piklab-prog/cli_interactive.h +++ b/src/piklab-prog/cli_interactive.h @@ -9,7 +9,7 @@ #ifndef CLI_INTERACTIVE_H #define CLI_INTERACTIVE_H -#include +#include #include "common/global/global.h" #include "common/cli/cli_global.h" #include "common/global/log.h" @@ -20,30 +20,31 @@ namespace CLI //---------------------------------------------------------------------------- enum CommandProperty { NoCommandProperty = 0, NeedProgrammer = 1, InputHex = 2, OutputHex = 4, NeedDevice = 8 }; -Q_DECLARE_FLAGS(CommandProperties, CommandProperty) -Q_DECLARE_OPERATORS_FOR_FLAGS(CommandProperties) +TQ_DECLARE_FLAGS(CommandProperties, CommandProperty) +TQ_DECLARE_OPERATORS_FOR_FLAGS(CommandProperties) //---------------------------------------------------------------------------- -class Interactive : public QObject, public Log::Base +class Interactive : public TQObject, public Log::Base { Q_OBJECT + TQ_OBJECT public: - Interactive(QObject *parent); + Interactive(TQObject *tqparent); void redisplayPrompt(); private slots: void displayPrompt(); private: - QFile _stdin; - QString _input; + TQFile _stdin; + TQString _input; void lineRead(); - ExitCode processLine(const QString &s); - ExitCode executeRegister(const QString &name, const QString &value); + ExitCode processLine(const TQString &s); + ExitCode executeRegister(const TQString &name, const TQString &value); ExitCode registerList(); ExitCode variableList(); - ExitCode executeRawCommands(const QString &filename); - Address findRegisterAddress(const QString &name); + ExitCode executeRawCommands(const TQString &filename); + Address findRegisterAddress(const TQString &name); ExitCode start(); static void signalHandler(int n); }; diff --git a/src/piklab-prog/cli_prog_manager.cpp b/src/piklab-prog/cli_prog_manager.cpp index 472757a..f8b73d1 100644 --- a/src/piklab-prog/cli_prog_manager.cpp +++ b/src/piklab-prog/cli_prog_manager.cpp @@ -22,10 +22,10 @@ Port::Description Programmer::CliManager::portDescription() const log->log(Log::LineType::Information, i18n("Using port from configuration file.")); return Programmer::GroupConfig::portDescription(group()); } - if ( CLI::_port=="usb" ) return Port::Description(PortType::USB, QString::null); + if ( CLI::_port=="usb" ) return Port::Description(PortType::USB, TQString()); PortType type = Port::findType(CLI::_port); if ( type==PortType::Nb_Types ) { - log->log(Log::LineType::Warning, i18n("Could not find device \"%1\" as serial or parallel port. Will try to open as serial port.").arg(CLI::_port)); + log->log(Log::LineType::Warning, i18n("Could not find device \"%1\" as serial or parallel port. Will try to open as serial port.").tqarg(CLI::_port)); type = PortType::Serial; } return Port::Description(type, CLI::_port); diff --git a/src/piklab-prog/cli_prog_manager.h b/src/piklab-prog/cli_prog_manager.h index 27775a4..b5b37f2 100644 --- a/src/piklab-prog/cli_prog_manager.h +++ b/src/piklab-prog/cli_prog_manager.h @@ -18,8 +18,9 @@ namespace Programmer class CliManager : public Manager { Q_OBJECT + TQ_OBJECT public: - CliManager(QObject *parent) : Manager(parent), _state(Idle) {} + CliManager(TQObject *tqparent) : Manager(tqparent), _state(Idle) {} Port::Description portDescription() const; virtual void createProgrammer(const Device::Data *data); diff --git a/src/piklab-prog/cli_purl.cpp b/src/piklab-prog/cli_purl.cpp index 2cd38a5..954e00c 100644 --- a/src/piklab-prog/cli_purl.cpp +++ b/src/piklab-prog/cli_purl.cpp @@ -8,12 +8,12 @@ ***************************************************************************/ #include "common/global/purl.h" -#include -#include +#include +#include bool PURL::Base::probablyExists() const { - QFileInfo fi(_url.path()); + TQFileInfo fi(_url.path()); return fi.exists(); } @@ -21,9 +21,9 @@ bool PURL::Url::isDestinationUpToDate(FileType type) const { if ( !(data().properties & Source) ) return true; Url dest = toFileType(type); - QFileInfo sfi(_url.path()); + TQFileInfo sfi(_url.path()); if ( !sfi.exists() ) return true; // source does not exists - QFileInfo dfi(dest._url.path()); + TQFileInfo dfi(dest._url.path()); if ( !dfi.exists() ) return false; // destination does not exists return sfi.lastModified() #endif #include -#include +#include #include "devices/list/device_list.h" #include "devices/base/device_group.h" @@ -63,7 +63,7 @@ const KCmdLineOptions CLI::OPTIONS[] = { const Programmer::Group *CLI::_progGroup = 0; const Device::Data *CLI::_device = 0; HexBuffer::Format CLI::_format = HexBuffer::IHX32; -QString CLI::_port, CLI::_targetSelfPowered, CLI::_hardware; +TQString CLI::_port, CLI::_targetSelfPowered, CLI::_hardware; PURL::Directory CLI::_firmwareDir; PURL::Url CLI::_hexUrl, CLI::_coffUrl; Device::Memory *CLI::_memory = 0; @@ -74,7 +74,7 @@ CLI::ExitCode CLI::Main::formatList() { log(Log::LineType::Normal, i18n("Supported hex file formats:")); for (uint i=0; iname())); + log(Log::LineType::Normal, " " + TQString(it.data()->name())); return OK; } @@ -96,8 +96,8 @@ CLI::ExitCode CLI::Main::hardwareList() if ( config==0 ) continue; FOR_EACH(PortType, type) { if ( !it.data()->isPortSupported(type) ) continue; - log(Log::LineType::Normal, "-" + QString(it.data()->name()) + " [" + type.label() + "]:"); - QStringList list = config->hardwareNames(type); + log(Log::LineType::Normal, "-" + TQString(it.data()->name()) + " [" + type.label() + "]:"); + TQStringList list = config->hardwareNames(type); for (uint k=0; k devices; + TQValueVector devices; if ( _progGroup==0 ) { log(Log::LineType::Normal, i18n("Supported devices:")); devices = Programmer::lister().supportedDevices(); } else { - log(Log::LineType::Normal, i18n("Supported devices for \"%1\":").arg(_progGroup->label())); + log(Log::LineType::Normal, i18n("Supported devices for \"%1\":").tqarg(_progGroup->label())); devices = _progGroup->supportedDevices(); } qHeapSort(devices); - QString s; + TQString s; for (uint i=0; ilabel())); + if (_progGroup) log(Log::LineType::Normal, i18n("Detected ports supported by \"%1\":").tqarg(_progGroup->label())); else log(Log::LineType::Normal, i18n("Detected ports:")); FOR_EACH(PortType, type) { if ( _progGroup && !_progGroup->isPortSupported(type) ) continue; - QString s = "- " + type.label() + ":"; + TQString s = "- " + type.label() + ":"; if ( !Port::isAvailable(type) ) { log(Log::LineType::Normal, s + i18n(" support disabled.")); continue; } - QStringList list = Port::probedDeviceList(type); + TQStringList list = Port::probedDeviceList(type); if ( list.count()==0 ) log(Log::LineType::Normal, s + i18n(" no port detected.")); else { log(Log::LineType::Normal, s); @@ -146,11 +146,11 @@ CLI::ExitCode CLI::Main::portList() CLI::ExitCode CLI::Main::rangeList() { log(Log::LineType::Normal, i18n("Memory ranges for PIC/dsPIC devices:")); - FOR_EACH(Pic::MemoryRangeType, type) log(Log::LineType::Normal, QString(" %1").arg(type.key())); + FOR_EACH(Pic::MemoryRangeType, type) log(Log::LineType::Normal, TQString(" %1").tqarg(type.key())); return OK; } -CLI::ExitCode CLI::Main::prepareCommand(const QString &command) +CLI::ExitCode CLI::Main::prepareCommand(const TQString &command) { const CommandData *data = findCommandData(command); CommandProperties properties = static_cast(data->properties); @@ -167,12 +167,12 @@ CLI::ExitCode CLI::Main::prepareCommand(const QString &command) if ( properties & InputHex ) { if (_memory) { if ( !file.openForRead() ) return FILE_ERROR; - QStringList errors, warnings; + TQStringList errors, warnings; Device::Memory::WarningTypes warningTypes; if ( !_memory->load(file.stream(), errors, warningTypes, warnings) ) - return errorExit(i18n("Could not load hex file \"%1\".").arg(errors[0]), FILE_ERROR); + return errorExit(i18n("Could not load hex file \"%1\".").tqarg(errors[0]), FILE_ERROR); if ( warningTypes!=Device::Memory::NoWarning ) - log(Log::LineType::Warning, i18n("Hex file seems incompatible with device \"%1\".").arg(warnings.join(" "))); + log(Log::LineType::Warning, i18n("Hex file seems incompatible with device \"%1\".").tqarg(warnings.join(" "))); } } else if ( properties & OutputHex ) { if ( !_force && _hexUrl.exists() ) return errorExit(i18n("Output hex filename already exists."), FILE_ERROR); @@ -196,7 +196,7 @@ CLI::Main::~Main() delete _range; } -CLI::ExitCode CLI::Main::list(const QString &command) +CLI::ExitCode CLI::Main::list(const TQString &command) { if ( MainBase::list(command)==OK ) return OK; if ( command=="format-list" ) return formatList(); @@ -226,12 +226,8 @@ CLI::ExitCode CLI::Main::prepareRun(bool &interactive) if (interactive) { _interactive = new Interactive(this); log(Log::LineType::Normal, i18n("Interactive mode: type help for help")); - log(Log::LineType::Normal, QString::null); -#if QT_VERSION<0x040000 - return ExitCode(qApp->exec()); -#else - return ExitCode(QCoreApplication::exec()); -#endif + log(Log::LineType::Normal, TQString()); + return ExitCode(tqApp->exec()); } // range @@ -242,7 +238,7 @@ CLI::ExitCode CLI::Main::prepareRun(bool &interactive) return OK; } -CLI::ExitCode CLI::Main::extractRange(const QString &range) +CLI::ExitCode CLI::Main::extractRange(const TQString &range) { delete _range; _range = 0; @@ -261,7 +257,7 @@ CLI::ExitCode CLI::Main::extractRange(const QString &range) return OK; } -CLI::ExitCode CLI::Main::executeCommand(const QString &command) +CLI::ExitCode CLI::Main::executeCommand(const TQString &command) { Programmer::Base *programmer = Programmer::manager->programmer(); if ( command=="connect" ) return (Programmer::manager->connectDevice() ? OK : EXEC_ERROR); @@ -303,7 +299,7 @@ CLI::ExitCode CLI::Main::executeCommand(const QString &command) PURL::File file(_hexUrl, *_view); if ( !file.openForWrite() ) return FILE_ERROR; if ( !_memory->save(file.stream(), _format) ) - return errorExit(i18n("Error while writing file \"%1\".").arg(_hexUrl.pretty()), FILE_ERROR); + return errorExit(i18n("Error while writing file \"%1\".").tqarg(_hexUrl.pretty()), FILE_ERROR); return OK; } if ( command=="erase" ) { @@ -332,25 +328,25 @@ CLI::ExitCode CLI::Main::checkProgrammer() if ( _progGroup->isSoftware() && _progGroup->supportedDevices().isEmpty() ) return errorExit(i18n("Please check installation of selected software debugger."), NOT_SUPPORTED_ERROR); if ( _device && !_progGroup->isSupported(_device->name()) ) - return errorExit(i18n("The selected device \"%1\" is not supported by the selected programmer.").arg(_device->name()), NOT_SUPPORTED_ERROR); + return errorExit(i18n("The selected device \"%1\" is not supported by the selected programmer.").tqarg(_device->name()), NOT_SUPPORTED_ERROR); if ( !_hardware.isEmpty() ) { ::Hardware::Config *config = _progGroup->hardwareConfig(); Port::Description pd = static_cast(Programmer::manager)->portDescription(); - bool ok = (config==0 || config->hardwareNames(pd.type).contains(_hardware)); + bool ok = (config==0 || config->hardwareNames(pd.type).tqcontains(_hardware)); delete config; - if ( !ok ) return errorExit(i18n("The selected programmer does not supported the specified hardware configuration (\"%1\").").arg(_hardware), NOT_SUPPORTED_ERROR); + if ( !ok ) return errorExit(i18n("The selected programmer does not supported the specified hardware configuration (\"%1\").").tqarg(_hardware), NOT_SUPPORTED_ERROR); } return OK; } -CLI::ExitCode CLI::Main::executeSetCommand(const QString &property, const QString &value) +CLI::ExitCode CLI::Main::executeSetCommand(const TQString &property, const TQString &value) { if ( property=="programmer" ) { _progGroup = 0; if ( value.isEmpty() ) return OK; _progGroup = Programmer::lister().group(value.lower()); if (_progGroup) return checkProgrammer(); - return errorExit(i18n("Unknown programmer \"%1\".").arg(value.lower()), ARG_ERROR); + return errorExit(i18n("Unknown programmer \"%1\".").tqarg(value.lower()), ARG_ERROR); } if ( property=="hardware" ) { _hardware = value; return OK; } if ( property=="device" || property=="processor" ) { @@ -358,10 +354,10 @@ CLI::ExitCode CLI::Main::executeSetCommand(const QString &property, const QStrin _device = 0; return OK; } - QString s = value.upper(); + TQString s = value.upper(); _device = Device::lister().data(s); Debugger::manager->updateDevice(); - if ( _device==0 ) return errorExit(i18n("Unknown device \"%1\".").arg(s), ARG_ERROR); + if ( _device==0 ) return errorExit(i18n("Unknown device \"%1\".").tqarg(s), ARG_ERROR); Debugger::manager->init(); return checkProgrammer(); } @@ -370,13 +366,13 @@ CLI::ExitCode CLI::Main::executeSetCommand(const QString &property, const QStrin _format = HexBuffer::IHX32; return OK; } - QString s = value.lower(); + TQString s = value.lower(); for (uint i=0; iinit() ) return ARG_ERROR; return OK; } - return errorExit(i18n("Unknown property \"%1\"").arg(property), ARG_ERROR); + return errorExit(i18n("Unknown property \"%1\"").tqarg(property), ARG_ERROR); } -QString CLI::Main::executeGetCommand(const QString &property) +TQString CLI::Main::executeGetCommand(const TQString &property) { if ( property=="programmer" ) { if ( _progGroup==0 ) return i18n(""); @@ -421,7 +417,7 @@ QString CLI::Main::executeGetCommand(const QString &property) if ( !_port.isEmpty() ) return _port; if ( _progGroup==0 ) return i18n(""); Port::Description pd = Programmer::GroupConfig::portDescription(*_progGroup); - QString s = pd.type.key(); + TQString s = pd.type.key(); if (pd.type.data().withDevice) s += " (" + pd.device + ")"; return s + " " + i18n(""); } @@ -432,7 +428,7 @@ QString CLI::Main::executeGetCommand(const QString &property) } if ( property=="target-self-powered" ) { if ( !_targetSelfPowered.isEmpty() ) return _targetSelfPowered; - return QString(readConfigEntry(Programmer::Config::TargetSelfPowered).toBool() ? "true" : "false") + " " + i18n(""); + return TQString(readConfigEntry(Programmer::Config::TargetSelfPowered).toBool() ? "true" : "false") + " " + i18n(""); } if ( property=="hex" ) { if ( !_hexUrl.isEmpty() ) return _hexUrl.pretty(); @@ -442,8 +438,8 @@ QString CLI::Main::executeGetCommand(const QString &property) if ( !_coffUrl.isEmpty() ) return _coffUrl.pretty(); return i18n(""); } - log(Log::LineType::SoftError, i18n("Unknown property \"%1\"").arg(property)); - return QString::null; + log(Log::LineType::SoftError, i18n("Unknown property \"%1\"").tqarg(property)); + return TQString(); } //----------------------------------------------------------------------------- diff --git a/src/piklab-prog/cmdline.h b/src/piklab-prog/cmdline.h index 03d4091..6390ace 100644 --- a/src/piklab-prog/cmdline.h +++ b/src/piklab-prog/cmdline.h @@ -21,16 +21,17 @@ namespace CLI class Main : public MainBase { Q_OBJECT + TQ_OBJECT public: Main(); virtual ~Main(); virtual ExitCode prepareRun(bool &interactive); - virtual ExitCode prepareCommand(const QString &command); - virtual ExitCode executeCommand(const QString &command); - virtual ExitCode executeSetCommand(const QString &property, const QString &value); - virtual QString executeGetCommand(const QString &property); - virtual ExitCode list(const QString &command); - ExitCode extractRange(const QString &range); + virtual ExitCode prepareCommand(const TQString &command); + virtual ExitCode executeCommand(const TQString &command); + virtual ExitCode executeSetCommand(const TQString &property, const TQString &value); + virtual TQString executeGetCommand(const TQString &property); + virtual ExitCode list(const TQString &command); + ExitCode extractRange(const TQString &range); private: Device::MemoryRange *_range; @@ -45,10 +46,10 @@ private: }; extern const Programmer::Group *_progGroup; -extern QString _hardware; +extern TQString _hardware; extern const Device::Data *_device; extern HexBuffer::Format _format; -extern QString _port, _targetSelfPowered; +extern TQString _port, _targetSelfPowered; extern PURL::Directory _firmwareDir; extern PURL::Url _hexUrl, _coffUrl; extern Device::Memory *_memory; diff --git a/src/piklab-test/base/device_test.cpp b/src/piklab-test/base/device_test.cpp index 9346a13..07a5fdd 100644 --- a/src/piklab-test/base/device_test.cpp +++ b/src/piklab-test/base/device_test.cpp @@ -14,7 +14,7 @@ void DeviceTest::checkArguments() { if ( _args->count()==1 ) { - _device = QString(_args->arg(0)).upper(); + _device = TQString(_args->arg(0)).upper(); if ( !Device::lister().isSupported(_device) ) qFatal("Specified device \"%s\" not supported.", _device.latin1()); printf("Testing only %s\n", _device.latin1()); } diff --git a/src/piklab-test/base/device_test.h b/src/piklab-test/base/device_test.h index 24447ed..cd96edc 100644 --- a/src/piklab-test/base/device_test.h +++ b/src/piklab-test/base/device_test.h @@ -26,7 +26,7 @@ protected: virtual void checkArguments(); private: - QString _device; + TQString _device; }; #endif diff --git a/src/piklab-test/base/generator_check.cpp b/src/piklab-test/base/generator_check.cpp index 68ad2c5..5819188 100644 --- a/src/piklab-test/base/generator_check.cpp +++ b/src/piklab-test/base/generator_check.cpp @@ -92,21 +92,21 @@ bool GeneratorCheck::execute(const Device::Data &data) // run compiler Process::State state = Process::runSynchronously(*_helper->_cprocess, Process::Start, 2000); // 2s timeout if ( state!=Process::Exited ) TEST_FAILED_RETURN("Error while running compilation") - if ( _helper->_cprocess->exitCode()!=0 ) TEST_FAILED_RETURN(QString("Error in compilation for %1:\n%2%3").arg(data.name()).arg(_helper->_cprocess->sout()+_helper->_cprocess->serr()).arg(QString::null)) + if ( _helper->_cprocess->exitCode()!=0 ) TEST_FAILED_RETURN(TQString("Error in compilation for %1:\n%2%3").tqarg(data.name()).tqarg(_helper->_cprocess->sout()+_helper->_cprocess->serr()).tqarg(TQString())) // run linker if (_helper->_lprocess) { state = Process::runSynchronously(*_helper->_lprocess, Process::Start, 2000); // 2s timeout if ( state!=Process::Exited ) TEST_FAILED_RETURN("Error while running linking") - if ( _helper->_lprocess->exitCode()!=0 ) TEST_FAILED_RETURN(QString("Error in linking for %1:\n%2%3").arg(data.name()).arg(_helper->_lprocess->sout()+_helper->_lprocess->serr()).arg(QString::null)) + if ( _helper->_lprocess->exitCode()!=0 ) TEST_FAILED_RETURN(TQString("Error in linking for %1:\n%2%3").tqarg(data.name()).tqarg(_helper->_lprocess->sout()+_helper->_lprocess->serr()).tqarg(TQString())) } // load hex file if ( !_fhex->openForRead() ) TEST_FAILED_RETURN("") - QStringList errors, warnings; + TQStringList errors, warnings; Device::Memory::WarningTypes warningTypes; - if ( !_memory1->load(_fhex->stream(), errors, warningTypes, warnings) ) TEST_FAILED_RETURN(QString("Error loading hex into memory: %1").arg(errors.join(" "))) - //if ( warningTypes!=Device::Memory::NoWarning ) TEST_FAILED(QString("Warning loading hex into memory: %1").arg(warnings.join(" "))) + if ( !_memory1->load(_fhex->stream(), errors, warningTypes, warnings) ) TEST_FAILED_RETURN(TQString("Error loading hex into memory: %1").tqarg(errors.join(" "))) + //if ( warningTypes!=Device::Memory::NoWarning ) TEST_FAILED(TQString("Warning loading hex into memory: %1").tqarg(warnings.join(" "))) TEST_PASSED return true; @@ -129,11 +129,11 @@ bool ConfigGeneratorCheck::execute(const Device::Data &data) bool ok = false; for (uint i=0; isetConfigValue(cmask.name, cmask.values[l].name); + if ( !ctqmask.values[l].name.isEmpty() ) _memory2->setConfigValue(ctqmask.name, ctqmask.values[l].name); } } } @@ -157,23 +157,23 @@ bool ConfigGeneratorCheck::execute(const Device::Data &data) BitValue word1 = _memory1->word(Pic::MemoryRangeType::Config, i); BitValue word2 = _memory2->word(Pic::MemoryRangeType::Config, i); if ( word1==word2 ) continue; - for (uint k=0; kgenerator()->templateSourceFile(ttype, data, ok); _source = SourceLine::text(sfamily, lines, 2); - if (!ok) TEST_FAILED_RETURN(QString("Incomplete template generator for %1").arg(data.name())) + if (!ok) TEST_FAILED_RETURN(TQString("Incomplete template generator for %1").tqarg(data.name())) return true; } @@ -211,7 +211,7 @@ GPUtilsGeneratorCheckHelper::GPUtilsGeneratorCheckHelper() void GPUtilsGeneratorCheckHelper::initSupported() { Process::StringOutput p; - QStringList options; + TQStringList options; options += "-l"; p.setup("gpasm", options, false); Process::runSynchronously(p, Process::Start, 2000); // 2s timeout @@ -221,7 +221,7 @@ void GPUtilsGeneratorCheckHelper::initSupported() bool GPUtilsGeneratorCheckHelper::init(const Device::Data &data) { _cprocess = new Process::StringOutput; - QStringList options; + TQStringList options; options = "-c"; options += "-p" + GPUtils::toDeviceName(data.name()); options += "test.asm"; @@ -257,8 +257,8 @@ void SDCCGeneratorCheckHelper::initSupported() _supported.clear(); for (uint i=0; i _supported; + TQValueList _supported; Process::StringOutput *_cprocess, *_lprocess; Tool::SourceGenerator *_generator; @@ -54,7 +54,7 @@ protected: CLI::View *_view; PURL::File *_fdest, *_fhex; Pic::Memory *_memory1; - QString _source; + TQString _source; }; //---------------------------------------------------------------------------- diff --git a/src/piklab-test/base/main_test.cpp b/src/piklab-test/base/main_test.cpp index 10d0414..bfacdf8 100644 --- a/src/piklab-test/base/main_test.cpp +++ b/src/piklab-test/base/main_test.cpp @@ -23,7 +23,7 @@ void Test::runTest() printf("RESULTS: %i PASSED / %i FAILED / %i SKIPPED \n", _nbPassed, _nbFailed, _nbSkipped); } -void Test::failed(const QString &message, const char *file, int line) +void Test::failed(const TQString &message, const char *file, int line) { _nbFailed++; printf("\n"); diff --git a/src/piklab-test/base/main_test.h b/src/piklab-test/base/main_test.h index 601b779..4006bd9 100644 --- a/src/piklab-test/base/main_test.h +++ b/src/piklab-test/base/main_test.h @@ -36,10 +36,10 @@ public: protected: KCmdLineArgs *_args; - QString _message; + TQString _message; void passed() { _nbPassed++; } - void failed(const QString &message, const char *file, int line); + void failed(const TQString &message, const char *file, int line); void skipped() { _nbSkipped++; } virtual bool execute() = 0; // returns false if failed or skipped virtual void checkArguments() {} diff --git a/src/piklab-test/checksum/checksum_check.cpp b/src/piklab-test/checksum/checksum_check.cpp index fdba104..86877c0 100644 --- a/src/piklab-test/checksum/checksum_check.cpp +++ b/src/piklab-test/checksum/checksum_check.cpp @@ -29,46 +29,46 @@ void ChecksumCheck::cleanup(const Device::Data &) } void ChecksumCheck::setProtection(const Pic::Data &data, const Pic::Checksum::Data &cdata, - const QString &maskName, const QString &valueName) + const TQString &tqmaskName, const TQString &valueName) { const Pic::Protection &protection = data.config().protection(); - if ( !maskName.isEmpty() && !valueName.isEmpty() ) _memory->setConfigValue(maskName, valueName); + if ( !tqmaskName.isEmpty() && !valueName.isEmpty() ) _memory->setConfigValue(tqmaskName, valueName); if ( !valueName.isEmpty() ) _memory->setUserIdToUnprotectedChecksum(); for (uint i=0; ivalues.count()-1; k>=0; k--) { - if ( mask->values[k].name.isEmpty() ) continue; - if ( protection.isNoneProtectedValueName(mask->values[k].name) ) continue; - _memory->setConfigValue(pmName, mask->values[k].name); + TQString pmName = cdata.protectedMaskNames[i]; + const Pic::Config::Mask *tqmask = data.config().findMask(pmName, 0); + for (int k=tqmask->values.count()-1; k>=0; k--) { + if ( tqmask->values[k].name.isEmpty() ) continue; + if ( protection.isNoneProtectedValueName(tqmask->values[k].name) ) continue; + _memory->setConfigValue(pmName, tqmask->values[k].name); break; } } if ( !cdata.bbsize.isEmpty() ) _memory->setConfigValue(protection.bootSizeMaskName(), cdata.bbsize); } -bool ChecksumCheck::checkChecksum(BitValue checksum, const QString &label) +bool ChecksumCheck::checkChecksum(BitValue checksum, const TQString &label) { BitValue c = _memory->checksum(); - if ( c!=checksum ) TEST_FAILED_RETURN(QString("%1 %2/%3").arg(label).arg(toHexLabel(c, 4)).arg(toHexLabel(checksum, 4))) + if ( c!=checksum ) TEST_FAILED_RETURN(TQString("%1 %2/%3").tqarg(label).tqarg(toHexLabel(c, 4)).tqarg(toHexLabel(checksum, 4))) return true; } -void ChecksumCheck::checkChecksum(const Pic::Data &pdata, const QString &maskName, const QString &valueName, bool &ok) +void ChecksumCheck::checkChecksum(const Pic::Data &pdata, const TQString &tqmaskName, const TQString &valueName, bool &ok) { - if ( !pdata.checksums().contains(valueName) ) { - const Pic::Config::Mask *mask = pdata.config().findMask(maskName); - QString label = valueName + (mask ? "/" + mask->name : QString::null); + if ( !pdata.checksums().tqcontains(valueName) ) { + const Pic::Config::Mask *tqmask = pdata.config().findMask(tqmaskName); + TQString label = valueName + (tqmask ? "/" + tqmask->name : TQString()); printf("Missing checksum for \"%s\"", label.latin1()); return; } const Pic::Checksum::Data &cdata = pdata.checksums()[valueName]; _memory->clear(); - setProtection(pdata, cdata, maskName, valueName); - if ( !checkChecksum(cdata.blankChecksum, maskName + ":" + valueName + "/" + "blank") ) ok = false; + setProtection(pdata, cdata, tqmaskName, valueName); + if ( !checkChecksum(cdata.blankChecksum, tqmaskName + ":" + valueName + "/" + "blank") ) ok = false; _memory->checksumCheckFill(); - setProtection(pdata, cdata, maskName, valueName); - if ( !checkChecksum(cdata.checkChecksum, maskName + ":" + valueName + "/" + "check") ) ok = false; + setProtection(pdata, cdata, tqmaskName, valueName); + if ( !checkChecksum(cdata.checkChecksum, tqmaskName + ":" + valueName + "/" + "check") ) ok = false; } bool ChecksumCheck::execute(const Device::Data &data) @@ -80,16 +80,16 @@ bool ChecksumCheck::execute(const Device::Data &data) const Pic::Protection &protection = pdata.config().protection(); switch ( protection.family() ) { case Pic::Protection::NoProtection: - checkChecksum(pdata, QString::null, QString::null, ok); + checkChecksum(pdata, TQString(), TQString(), ok); break; case Pic::Protection::BasicProtection: { - QString maskName = protection.maskName(Pic::Protection::ProgramProtected, Pic::MemoryRangeType::Code); - const Pic::Config::Mask *mask = pdata.config().findMask(maskName); - Q_ASSERT(mask); - for (uint i=0; ivalues.count(); i++) { - QString valueName = mask->values[i].name; + TQString tqmaskName = protection.tqmaskName(Pic::Protection::ProgramProtected, Pic::MemoryRangeType::Code); + const Pic::Config::Mask *tqmask = pdata.config().findMask(tqmaskName); + Q_ASSERT(tqmask); + for (uint i=0; ivalues.count(); i++) { + TQString valueName = tqmask->values[i].name; if ( valueName.isEmpty() ) continue; // invalid value - checkChecksum(pdata, maskName, valueName, ok); + checkChecksum(pdata, tqmaskName, valueName, ok); } break; } @@ -98,10 +98,10 @@ bool ChecksumCheck::execute(const Device::Data &data) checkChecksum(pdata, "GSSEC", "High Security", ok); break; case Pic::Protection::BlockProtection: { - const QMap &cmap = pdata.checksums(); - QMap::const_iterator it; + const TQMap &cmap = pdata.checksums(); + TQMap::const_iterator it; for (it=cmap.begin(); it!=cmap.end(); ++it) - checkChecksum(pdata, QString::null, it.key(), ok); + checkChecksum(pdata, TQString(), it.key(), ok); break; } case Pic::Protection::Nb_Families: Q_ASSERT(false); break; diff --git a/src/piklab-test/checksum/checksum_check.h b/src/piklab-test/checksum/checksum_check.h index 6483984..e56fd2b 100644 --- a/src/piklab-test/checksum/checksum_check.h +++ b/src/piklab-test/checksum/checksum_check.h @@ -27,9 +27,9 @@ private: Pic::Memory *_memory; void setProtection(const Pic::Data &data, const Pic::Checksum::Data &cdata, - const QString &maskName, const QString &valueName); - bool checkChecksum(BitValue checksum, const QString &label); - void checkChecksum(const Pic::Data &data, const QString &maskName, const QString &valueName, bool &ok); + const TQString &tqmaskName, const TQString &valueName); + bool checkChecksum(BitValue checksum, const TQString &label); + void checkChecksum(const Pic::Data &data, const TQString &tqmaskName, const TQString &valueName, bool &ok); }; #endif diff --git a/src/piklab-test/misc/misc_check.cpp b/src/piklab-test/misc/misc_check.cpp index 3f14287..7f8c710 100644 --- a/src/piklab-test/misc/misc_check.cpp +++ b/src/piklab-test/misc/misc_check.cpp @@ -14,7 +14,7 @@ bool MiscCheck::execute() { { - PURL::Url url = PURL::Url::fromPathOrUrl(QString::null); + PURL::Url url = PURL::Url::fromPathOrUrl(TQString()); if ( !url.isEmpty() ) TEST_FAILED("isEmpty"); TEST_PASSED; } diff --git a/src/piklab-test/save_load_memory/save_load_memory_check.cpp b/src/piklab-test/save_load_memory/save_load_memory_check.cpp index 22eb1ea..e6bb1be 100644 --- a/src/piklab-test/save_load_memory/save_load_memory_check.cpp +++ b/src/piklab-test/save_load_memory/save_load_memory_check.cpp @@ -50,9 +50,9 @@ bool SaveLoadMemoryCheck::execute(const Device::Data &data) // read hex file if ( !_fdest->openForRead() ) TEST_FAILED_RETURN("") - QStringList errors, warnings; + TQStringList errors, warnings; Device::Memory::WarningTypes wtypes; - if ( !_memory2->load(_fdest->stream(), errors, wtypes, warnings) ) TEST_FAILED_RETURN(QString("Error loading hex file into memory %1").arg(data.name())) + if ( !_memory2->load(_fdest->stream(), errors, wtypes, warnings) ) TEST_FAILED_RETURN(TQString("Error loading hex file into memory %1").tqarg(data.name())) // compare checksums if ( _memory1->checksum()!=_memory2->checksum() ) TEST_FAILED_RETURN("Memory saved and loaded is different") diff --git a/src/progs/base/debug_config.cpp b/src/progs/base/debug_config.cpp index 387941d..b1bbda4 100644 --- a/src/progs/base/debug_config.cpp +++ b/src/progs/base/debug_config.cpp @@ -9,6 +9,6 @@ #include "debug_config.h" const Debugger::Config::Data Debugger::Config::DATA[Nb_Types] = { - { "only_stop_on_source_line", I18N_NOOP("Only stop stepping on source line."), QVariant(true, 0) }, - { "only_stop_on_project_source_line", I18N_NOOP("Only stop stepping on project source line."), QVariant(true, 0) } + { "only_stop_on_source_line", I18N_NOOP("Only stop stepping on source line."), TQVariant(true, 0) }, + { "only_stop_on_project_source_line", I18N_NOOP("Only stop stepping on project source line."), TQVariant(true, 0) } }; diff --git a/src/progs/base/generic_debug.cpp b/src/progs/base/generic_debug.cpp index 252d239..46c6597 100644 --- a/src/progs/base/generic_debug.cpp +++ b/src/progs/base/generic_debug.cpp @@ -53,7 +53,7 @@ bool Debugger::Base::init() bool Debugger::Base::update() { if ( !updateState() ) return false; - if ( _programmer.state()==::Programmer::Halted ) return _deviceSpecific->updateStatus(); + if ( _programmer.state()==::Programmer::Halted ) return _deviceSpecific->updatetqStatus(); return true; } @@ -76,7 +76,7 @@ bool Debugger::Base::halt() if ( !softHalt(success) ) return false; if ( !success ) return hardHalt(); if ( !update() ) return false; - log(Log::LineType::Information, QString("Halted at %1").arg(toHexLabel(pc(), _programmer.device()->nbCharsAddress()))); + log(Log::LineType::Information, TQString("Halted at %1").tqarg(toHexLabel(pc(), _programmer.device()->nbCharsAddress()))); _programmer.setState(::Programmer::Halted); return true; } @@ -87,13 +87,13 @@ bool Debugger::Base::reset() return update(); } -QString Debugger::Base::statusString() const +TQString Debugger::Base::statusString() const { - if ( _programmer.state()!=::Programmer::Halted ) return QString::null; + if ( _programmer.state()!=::Programmer::Halted ) return TQString(); return _deviceSpecific->statusString(); } -void Debugger::Base::setupInput(PURL::FileType type, const QString &directory, const QString &filename) +void Debugger::Base::setupInput(PURL::FileType type, const TQString &directory, const TQString &filename) { _inputType = type; _directory = directory; diff --git a/src/progs/base/generic_debug.h b/src/progs/base/generic_debug.h index 903d451..48f9e60 100644 --- a/src/progs/base/generic_debug.h +++ b/src/progs/base/generic_debug.h @@ -29,29 +29,29 @@ public: virtual ~Base(); void init(DeviceSpecific *deviceSpecific, Specific *specific); const Device::Data *device() const; - void setupInput(PURL::FileType type, const QString &directory, const QString &filename); + void setupInput(PURL::FileType type, const TQString &directory, const TQString &filename); void setCoff(const Coff::TextObject *coff) { _coff = coff; } - QString directory() const { return _directory; } + TQString directory() const { return _directory; } bool init(); bool update(); bool reset(); bool run(); bool halt(); bool step(); - QString statusString() const; - virtual bool setBreakpoints(const QValueList
&addresses) = 0; + TQString statusString() const; + virtual bool setBreakpoints(const TQValueList
&addresses) = 0; BitValue pc() const; Register::TypeData pcTypeData() const; virtual bool readRegister(const Register::TypeData &data, BitValue &value) = 0; virtual bool writeRegister(const Register::TypeData &data, BitValue value) = 0; - virtual bool updatePortStatus(uint index, QMap &bits) = 0; + virtual bool updatePorttqStatus(uint index, TQMap &bits) = 0; protected: Programmer::Base &_programmer; DeviceSpecific *_deviceSpecific; Specific *_specific; PURL::FileType _inputType; - QString _directory, _filename; + TQString _directory, _filename; const Coff::TextObject *_coff; virtual bool internalInit() = 0; @@ -68,8 +68,8 @@ class DeviceSpecific : public Log::Base { public: DeviceSpecific(Debugger::Base &base) : Log::Base(base), _base(base) {} - virtual bool updateStatus() = 0; - virtual QString statusString() const = 0; + virtual bool updatetqStatus() = 0; + virtual TQString statusString() const = 0; protected: Debugger::Base &_base; diff --git a/src/progs/base/generic_prog.cpp b/src/progs/base/generic_prog.cpp index 6386eb2..e7e6e2e 100644 --- a/src/progs/base/generic_prog.cpp +++ b/src/progs/base/generic_prog.cpp @@ -8,7 +8,7 @@ ***************************************************************************/ #include "generic_prog.h" -#include +#include #include "common/global/global.h" #include "prog_group.h" @@ -70,15 +70,15 @@ bool Programmer::Base::simpleConnectHardware() disconnectHardware(); clear(); if (_device) { - QString label = _group.label(); + TQString label = _group.label(); if ( group().isSoftware() ) - log(Log::LineType::Information, i18n("Connecting %1 with device %2...").arg(label).arg(_device->name())); + log(Log::LineType::Information, i18n("Connecting %1 with device %2...").tqarg(label).tqarg(_device->name())); else { if ( !_hardware->name().isEmpty() ) label += "[" + _hardware->name() + "]"; Port::Description pd = _hardware->portDescription(); - QString s = pd.type.label(); + TQString s = pd.type.label(); if (pd.type.data().withDevice) s += " (" + pd.device + ")"; - log(Log::LineType::Information, i18n("Connecting %1 on %2 with device %3...").arg(label).arg(s).arg(_device->name())); + log(Log::LineType::Information, i18n("Connecting %1 on %2 with device %3...").tqarg(label).tqarg(s).tqarg(_device->name())); } } return _hardware->connectHardware(); @@ -98,7 +98,7 @@ bool Programmer::Base::connectHardware() if ( !checkFirmwareVersion() ) return false; if ( !setTargetPowerOn(false) ) return false; if ( !setTarget() ) return false; - log(Log::LineType::Information, i18n(" Set target self powered: %1").arg(_targetSelfPowered ? "true" : "false")); + log(Log::LineType::Information, i18n(" Set target self powered: %1").tqarg(_targetSelfPowered ? "true" : "false")); if ( !setTargetPowerOn(!_targetSelfPowered) ) return false; if ( !internalSetupHardware() ) return false; if ( !readVoltages() ) return false; @@ -133,30 +133,30 @@ bool Programmer::Base::checkFirmwareVersion() { if ( _mode==BootloadMode ) log(Log::LineType::Information, i18n("Programmer is in bootload mode.")); if ( !_firmwareVersion.isValid() ) return true; - log(Log::LineType::Information, i18n("Firmware version is %1").arg(_firmwareVersion.pretty())); + log(Log::LineType::Information, i18n("Firmware version is %1").tqarg(_firmwareVersion.pretty())); VersionData vd = _firmwareVersion.toWithoutDot(); VersionData tmp = firmwareVersion(FirmwareVersionType::Max); if ( tmp.isValid() && tmp.toWithoutDot()label); } -QString Hardware::Config::comment(const QString &name) const +TQString Hardware::Config::comment(const TQString &name) const { const DataInfo *info = standardHardwareDataInfo(name); - if ( info==0 || info->comment==0 ) return QString::null; + if ( info==0 || info->comment==0 ) return TQString(); return i18n(info->comment); } -void Hardware::Config::writeCustomHardware(const QString& name, const Hardware::Data &hdata) +void Hardware::Config::writeCustomHardware(const TQString& name, const Hardware::Data &hdata) { Q_ASSERT( !isStandardHardware(name) ); - QStringList customNames = readListEntry("custom_hardware_names", QStringList()); - if ( !customNames.contains(name) ) { + TQStringList customNames = readListEntry("custom_hardware_names", TQStringList()); + if ( !customNames.tqcontains(name) ) { customNames += name; writeEntry("custom_hardware_names", customNames); } @@ -63,16 +63,16 @@ void Hardware::Config::writeCustomHardware(const QString& name, const Hardware:: hdata.writeConfig(config); } -void Hardware::Config::deleteCustomHardware(const QString &name) +void Hardware::Config::deleteCustomHardware(const TQString &name) { Q_ASSERT( !isStandardHardware(name) ); - QStringList customNames = readListEntry("custom_hardware_names", QStringList()); + TQStringList customNames = readListEntry("custom_hardware_names", TQStringList()); customNames.remove(name); writeEntry("custom_hardware_names", customNames); GenericConfig::deleteGroup(group() + "_custom_hardware_" + name); } -Hardware::Data *Hardware::Config::hardwareData(const QString &name) const +Hardware::Data *Hardware::Config::hardwareData(const TQString &name) const { if ( isStandardHardware(name) ) return standardHardwareData(name); Hardware::Data *hdata = createHardwareData(); @@ -82,10 +82,10 @@ Hardware::Data *Hardware::Config::hardwareData(const QString &name) const return hdata; } -QStringList Hardware::Config::hardwareNames(PortType type) +TQStringList Hardware::Config::hardwareNames(PortType type) { - QStringList names = standardHardwareNames(type); - QStringList customNames = readListEntry("custom_hardware_names", QStringList()); + TQStringList names = standardHardwareNames(type); + TQStringList customNames = readListEntry("custom_hardware_names", TQStringList()); for (uint i=0; i("port_group", type); } -QString Programmer::GroupConfig::portDevice(const Group &group, PortType portType) +TQString Programmer::GroupConfig::portDevice(const Group &group, PortType portType) { GenericConfig config(group.name()); - QString device = config.readEntry(QString(portType.key()) + "_port_device" , QString::null); + TQString device = config.readEntry(TQString(portType.key()) + "_port_device" , TQString()); if ( device.isNull() ) { - QStringList list = Port::probedDeviceList(portType); - if ( list.isEmpty() ) return QString::null; + TQStringList list = Port::probedDeviceList(portType); + if ( list.isEmpty() ) return TQString(); return list[0]; } return device; } -void Programmer::GroupConfig::writePortDevice(const Group &group, PortType type, const QString &device) +void Programmer::GroupConfig::writePortDevice(const Group &group, PortType type, const TQString &device) { if ( type==PortType::Nb_Types ) return; GenericConfig config(group.name()); - config.writeEntry(QString(type.key()) + "_port_device", device); + config.writeEntry(TQString(type.key()) + "_port_device", device); } Port::Description Programmer::GroupConfig::portDescription(const Group &group) @@ -53,12 +53,12 @@ void Programmer::GroupConfig::writePortDescription(const Group &group, const Por writePortDevice(group, dp.type, dp.device); } -QString Programmer::GroupConfig::firmwareDirectory(const Group &group) +TQString Programmer::GroupConfig::firmwareDirectory(const Group &group) { GenericConfig config(group.name()); - return config.readEntry("firmware_directory", QString::null); + return config.readEntry("firmware_directory", TQString()); } -void Programmer::GroupConfig::writeFirmwareDirectory(const Group &group, const QString &path) +void Programmer::GroupConfig::writeFirmwareDirectory(const Group &group, const TQString &path) { GenericConfig config(group.name()); config.writeEntry("firmware_directory", path); @@ -66,13 +66,13 @@ void Programmer::GroupConfig::writeFirmwareDirectory(const Group &group, const Q //---------------------------------------------------------------------------- const Programmer::Config::Data Programmer::Config::DATA[Nb_Types] = { - { "only_program_non_mask", I18N_NOOP("Only program what is needed (faster)."), QVariant(true, 0) }, - { "verify_after_program", I18N_NOOP("Verify device memory after programming."), QVariant(true, 0) }, - { "only_verify_programmed", I18N_NOOP("Only verify programmed words in code memory (faster)."), QVariant(true, 0) }, - { "power_down_after_programming", I18N_NOOP("Power down target after programming."), QVariant(true, 0) }, - { "target_self_powered", I18N_NOOP("Target is self-powered (when possible)."), QVariant(true, 0) }, - { "blank_check_after_erase", I18N_NOOP("Blank check after erase."), QVariant(false, 0) }, - { "preserve_eeprom", I18N_NOOP("Preserve data EEPROM when programming."), QVariant(false, 0) }, - { "program_eeprom", I18N_NOOP("Program data EEPROM."), QVariant(true, 0) }, - { "run_after_program", I18N_NOOP("Run device after successful programming."), QVariant(false, 0) } + { "only_program_non_tqmask", I18N_NOOP("Only program what is needed (faster)."), TQVariant(true, 0) }, + { "verify_after_program", I18N_NOOP("Verify device memory after programming."), TQVariant(true, 0) }, + { "only_verify_programmed", I18N_NOOP("Only verify programmed words in code memory (faster)."), TQVariant(true, 0) }, + { "power_down_after_programming", I18N_NOOP("Power down target after programming."), TQVariant(true, 0) }, + { "target_self_powered", I18N_NOOP("Target is self-powered (when possible)."), TQVariant(true, 0) }, + { "blank_check_after_erase", I18N_NOOP("Blank check after erase."), TQVariant(false, 0) }, + { "preserve_eeprom", I18N_NOOP("Preserve data EEPROM when programming."), TQVariant(false, 0) }, + { "program_eeprom", I18N_NOOP("Program data EEPROM."), TQVariant(true, 0) }, + { "run_after_program", I18N_NOOP("Run device after successful programming."), TQVariant(false, 0) } }; diff --git a/src/progs/base/prog_config.h b/src/progs/base/prog_config.h index 0c772c2..425d92c 100644 --- a/src/progs/base/prog_config.h +++ b/src/progs/base/prog_config.h @@ -22,12 +22,12 @@ class GroupConfig public: static PortType portType(const Group &group); static void writePortType(const Group &group, PortType type); - static QString portDevice(const Group &group, PortType type); - static void writePortDevice(const Group &group, PortType type, const QString &device); + static TQString portDevice(const Group &group, PortType type); + static void writePortDevice(const Group &group, PortType type, const TQString &device); static Port::Description portDescription(const Group &group); static void writePortDescription(const Group &group, const Port::Description &pd); - static QString firmwareDirectory(const Group &group); - static void writeFirmwareDirectory(const Group &group, const QString &path); + static TQString firmwareDirectory(const Group &group); + static void writeFirmwareDirectory(const Group &group, const TQString &path); }; //---------------------------------------------------------------------------- diff --git a/src/progs/base/prog_group.cpp b/src/progs/base/prog_group.cpp index 5801318..d1a2a2b 100644 --- a/src/progs/base/prog_group.cpp +++ b/src/progs/base/prog_group.cpp @@ -19,7 +19,7 @@ const PURL::FileType Programmer::INPUT_FILE_TYPE_DATA[Nb_InputFileTypes] = { PURL::Coff, PURL::Cod, PURL::Hex }; -QString Programmer::Group::statusLabel(PortType type) const +TQString Programmer::Group::statusLabel(PortType type) const { uint nb = 0; FOR_EACH(PortType, ptype) if ( isPortSupported(ptype) ) nb++; diff --git a/src/progs/base/prog_group.h b/src/progs/base/prog_group.h index 07807fe..f72c783 100644 --- a/src/progs/base/prog_group.h +++ b/src/progs/base/prog_group.h @@ -9,7 +9,7 @@ #ifndef PROG_GROUP_H #define PROG_GROUP_H -class QWidget; +class TQWidget; #include "common/common/group.h" #include "common/port/port.h" #include "common/common/purl_base.h" @@ -29,8 +29,8 @@ enum Property { NoProperty = 0, Programmer = 1, Debugger = 2, CanReleaseReset = 4, HasFirmware = 8, CanUploadFirmware = 16, NeedDeviceSpecificFirmware = 32, HasSelfTest = 64, CanReadMemory = 128, HasConnectedState = 256 }; -Q_DECLARE_FLAGS(Properties, Property) -Q_DECLARE_OPERATORS_FOR_FLAGS(Properties) +TQ_DECLARE_FLAGS(Properties, Property) +TQ_DECLARE_OPERATORS_FOR_FLAGS(Properties) enum TargetPowerMode { TargetPowerModeFromConfig, TargetSelfPowered, TargetExternallyPowered }; @@ -40,10 +40,10 @@ extern const PURL::FileType INPUT_FILE_TYPE_DATA[Nb_InputFileTypes]; class Group : public ::Group::Base { public: - virtual QString xmlName() const { return name(); } + virtual TQString xmlName() const { return name(); } virtual ::Hardware::Config *hardwareConfig() const { return 0; } virtual Properties properties() const = 0; - virtual QString statusLabel(PortType type) const; + virtual TQString statusLabel(PortType type) const; virtual bool canReadVoltages() const = 0; virtual TargetPowerMode targetPowerMode() const = 0; bool isDebugger() const { return ( properties() & Debugger ); } diff --git a/src/progs/base/prog_specific.cpp b/src/progs/base/prog_specific.cpp index a372e92..32bc5e3 100644 --- a/src/progs/base/prog_specific.cpp +++ b/src/progs/base/prog_specific.cpp @@ -16,7 +16,7 @@ Programmer::DeviceSpecific::DeviceSpecific(Programmer::Base &base) {} //----------------------------------------------------------------------------- -Programmer::Hardware::Hardware(Programmer::Base &base, Port::Base *port, const QString &name) +Programmer::Hardware::Hardware(Programmer::Base &base, Port::Base *port, const TQString &name) : Log::Base(&base), _port(port), _name(name), _base(base) {} @@ -37,14 +37,14 @@ void Programmer::Hardware::disconnectHardware() internalDisconnectHardware(); } -bool Programmer::Hardware::rawWrite(const QString &data) +bool Programmer::Hardware::rawWrite(const TQString &data) { Q_ASSERT(_port); - QByteArray a = toAscii(data); + TQByteArray a = toAscii(data); return _port->send(a.data(), a.count()); } -bool Programmer::Hardware::rawRead(uint size, QString &data) +bool Programmer::Hardware::rawRead(uint size, TQString &data) { Q_ASSERT(_port); return _port->receive(size, data); diff --git a/src/progs/base/prog_specific.h b/src/progs/base/prog_specific.h index 1703bcb..732726e 100644 --- a/src/progs/base/prog_specific.h +++ b/src/progs/base/prog_specific.h @@ -9,7 +9,7 @@ #ifndef PROG_SPECIFIC_H #define PROG_SPECIFIC_H -#include +#include #include "common/global/log.h" #include "common/port/port_base.h" @@ -38,18 +38,18 @@ protected: class Hardware : public Log::Base { public: - Hardware(::Programmer::Base &base, Port::Base *port, const QString &name); + Hardware(::Programmer::Base &base, Port::Base *port, const TQString &name); virtual ~Hardware(); Port::Description portDescription() const { return _port->description(); } - QString name() const { return _name; } + TQString name() const { return _name; } bool connectHardware(); - bool rawWrite(const QString &data); - bool rawRead(uint size, QString &data); + bool rawWrite(const TQString &data); + bool rawRead(uint size, TQString &data); void disconnectHardware(); protected: Port::Base *_port; - QString _name; + TQString _name; ::Programmer::Base &_base; virtual bool internalConnectHardware() = 0; diff --git a/src/progs/bootloader/base/bootloader.h b/src/progs/bootloader/base/bootloader.h index 08a0730..8f358a4 100644 --- a/src/progs/bootloader/base/bootloader.h +++ b/src/progs/bootloader/base/bootloader.h @@ -17,7 +17,7 @@ namespace Bootloader class Hardware : public ::Programmer::PicHardware { public: - Hardware(::Programmer::Base &base, Port::Base *port) : ::Programmer::PicHardware(base, port, QString::null) {} + Hardware(::Programmer::Base &base, Port::Base *port) : ::Programmer::PicHardware(base, port, TQString()) {} virtual bool write(Pic::MemoryRangeType type, const Device::Array &data) = 0; virtual bool read(Pic::MemoryRangeType type, Device::Array &data, const ::Programmer::VerifyData *vdata) = 0; virtual bool internalConnectHardware() = 0; diff --git a/src/progs/bootloader/base/bootloader_prog.h b/src/progs/bootloader/base/bootloader_prog.h index 7b9749e..52e1b0d 100644 --- a/src/progs/bootloader/base/bootloader_prog.h +++ b/src/progs/bootloader/base/bootloader_prog.h @@ -18,6 +18,7 @@ namespace Bootloader class ProgrammerBase : public Programmer::PicBase { Q_OBJECT + TQ_OBJECT public: ProgrammerBase(const Programmer::Group &group, const Pic::Data *data, const char *name); diff --git a/src/progs/bootloader/gui/bootloader_ui.h b/src/progs/bootloader/gui/bootloader_ui.h index 386c412..0d6737a 100644 --- a/src/progs/bootloader/gui/bootloader_ui.h +++ b/src/progs/bootloader/gui/bootloader_ui.h @@ -9,7 +9,7 @@ #ifndef BOOTLOADER_UI_H #define BOOTLOADER_UI_H -#include +#include #include "progs/gui/prog_group_ui.h" #include "progs/gui/prog_config_widget.h" @@ -22,7 +22,7 @@ class GroupUI : public ::Programmer::GroupUI { public: virtual bool hasAdvancedDialog() const { return false; } - virtual ::Programmer::AdvancedDialog *createAdvancedDialog(::Programmer::Base &, QWidget *) const { return 0; } + virtual ::Programmer::AdvancedDialog *createAdvancedDialog(::Programmer::Base &, TQWidget *) const { return 0; } }; } // namespace diff --git a/src/progs/direct/base/direct.cpp b/src/progs/direct/base/direct.cpp index fc53cf3..c0d7de6 100644 --- a/src/progs/direct/base/direct.cpp +++ b/src/progs/direct/base/direct.cpp @@ -47,7 +47,7 @@ namespace Direct class SerialPort : public Port::Serial { public: - SerialPort(const QString &device, Log::Base &base) + SerialPort(const TQString &device, Log::Base &base) : Serial(device, NeedBreak, base) {} bool open() { @@ -83,7 +83,7 @@ void Direct::Hardware::setPin(PinType type, bool on) int pin = _data.pins[type]; if ( isGroundPin(pin) ) return; uint p = (pin<0 ? -pin : pin)-1; - //log(Log::DebugLevel::Extra, QString("Hardware::setPin %1 %2: %3 %4").arg(PIN_DATA[type].label).arg(pin).arg(on).arg(_data.clockDelay)); + //log(Log::DebugLevel::Extra, TQString("Hardware::setPin %1 %2: %3 %4").tqarg(PIN_DATA[type].label).tqarg(pin).tqarg(on).tqarg(_data.clockDelay)); _port->setPinOn(p, on, (pin<0 ? Port::NegativeLogic : Port::PositiveLogic)); if ( type==Clock ) Port::usleep(_data.clockDelay); } @@ -95,7 +95,7 @@ bool Direct::Hardware::readBit() uint p = (pin<0 ? -pin : pin)-1; bool on; _port->readPin(p, (pin<0 ? Port::NegativeLogic : Port::PositiveLogic), on); - //log(Log::DebugLevel::Extra, QString("Hardware::read DataIn %2: %3").arg(pin).arg(on)); + //log(Log::DebugLevel::Extra, TQString("Hardware::read DataIn %2: %3").tqarg(pin).tqarg(on)); return on; } @@ -104,10 +104,10 @@ uint Direct::Hardware::nbPins(Port::IODir dir) const return _port->pinData(dir).count(); } -QString Direct::Hardware::pinLabelForIndex(Port::IODir dir, uint i) const +TQString Direct::Hardware::pinLabelForIndex(Port::IODir dir, uint i) const { Port::PinData pd = _port->pinData(dir)[i]; - return QString("%1 (%2)").arg(pd.pin+1).arg(pd.label); + return TQString("%1 (%2)").tqarg(pd.pin+1).tqarg(pd.label); } Port::IODir Direct::Hardware::ioTypeForPin(int pin) const @@ -126,7 +126,7 @@ uint Direct::Hardware::pinForIndex(Port::IODir dir, uint i) const uint Direct::Hardware::indexForPin(Port::IODir dir, int pin) const { - QValueVector v = _port->pinData(dir); + TQValueVector v = _port->pinData(dir); Q_ASSERT( pin!=0 ); uint p = (pin<0 ? -pin : pin)-1; for (uint i=0; i>= 1; hardware().setPin(Clock, Low); Port::usleep(1+_clockDelay); @@ -87,10 +87,10 @@ bool Direct::pic16::doRead(Pic::MemoryRangeType type, Device::Array &data, const const Device::Array wdata = static_cast(vdata->memory).arrayForWriting(type); if (only) nbWords = findNonMaskEnd(type, wdata)+1; } - BitValue mask = device().mask(type); + BitValue tqmask = device().tqmask(type); for (uint i = 0; i> 8; if ( vdata && !hardware().verifyWord(offset+i+1, data[i+1], type, *vdata) ) return false; @@ -234,7 +234,7 @@ void Direct::P18F1220::program(Type type) { if ( type==Eeprom ) { pulseEngine("k0,X0000,"); // NOP - QString cmd = QString("k0;w%1;w%2;X0000").arg(programHighTime(type)).arg(programLowTime()); + TQString cmd = TQString("k0;w%1;w%2;X0000").tqarg(programHighTime(type)).tqarg(programLowTime()); pulseEngine(cmd); } else P18F::program(type); } @@ -249,7 +249,7 @@ void Direct::P18F242::configureSinglePanel() //----------------------------------------------------------------------------- bool Direct::P18F2539::doErase(bool) { - // apparently there is no chip erase... + // aptqparently there is no chip erase... return ( doEraseRange(Pic::MemoryRangeType::Code) && doEraseRange(Pic::MemoryRangeType::Eeprom) ); } diff --git a/src/progs/direct/base/direct_data.h b/src/progs/direct/base/direct_data.h index 0b84084..f1291bb 100644 --- a/src/progs/direct/base/direct_data.h +++ b/src/progs/direct/base/direct_data.h @@ -14,7 +14,7 @@ namespace Direct struct Data { }; -extern const Data &data(const QString &device); +extern const Data &data(const TQString &device); } // namespace diff --git a/src/progs/direct/base/direct_mem24.cpp b/src/progs/direct/base/direct_mem24.cpp index a719add..98b5f9a 100644 --- a/src/progs/direct/base/direct_mem24.cpp +++ b/src/progs/direct/base/direct_mem24.cpp @@ -8,7 +8,7 @@ ***************************************************************************/ #include "direct_mem24.h" -#include +#include #include "common/global/global.h" #include "common/common/misc.h" @@ -68,18 +68,18 @@ uint Direct::Mem24DeviceSpecific::controlByte(uint address, Operation operation) bool Direct::Mem24DeviceSpecific::setAddress(uint address) { - log(Log::DebugLevel::Extra, QString("set address %1").arg(toHexLabel(address, nbChars(NumberBase::Hex, address)))); + log(Log::DebugLevel::Extra, TQString("set address %1").tqarg(toHexLabel(address, nbChars(NumberBase::Hex, address)))); if ( !start() ) return false; uint bsize = device().nbBytes() / device().nbBlocks(); uint block = address / bsize; - log(Log::DebugLevel::Extra, QString(" in block #%1/%2").arg(block).arg(device().nbBlocks())); + log(Log::DebugLevel::Extra, TQString(" in block #%1/%2").tqarg(block).tqarg(device().nbBlocks())); uint cbyte = controlByte(address, Write); - log(Log::DebugLevel::Max, QString(" control byte is %1").arg(toHexLabel(cbyte, 2))); + log(Log::DebugLevel::Max, TQString(" control byte is %1").tqarg(toHexLabel(cbyte, 2))); if ( !writeByteAck(cbyte) ) return false; uint nb = nbBytes(bsize-1); for (int i=nb-1; i>=0; i--) { uint add = (address >> 8*i) & 0xFF; - log(Log::DebugLevel::Max, QString(" byte #%1: %2").arg(i).arg(toHexLabel(add, 2))); + log(Log::DebugLevel::Max, TQString(" byte #%1: %2").tqarg(i).tqarg(toHexLabel(add, 2))); if ( !writeByteAck(add) ) return false; } return true; @@ -103,11 +103,11 @@ bool Direct::Mem24DeviceSpecific::doRead(Device::Array &data, const ::Programmer bool Direct::Mem24DeviceSpecific::doWrite(const Device::Array &data) { - QTime time; + TQTime time; // page by page (page_size==1: byte by byte) uint nbPages = device().nbBytes() / device().nbBytesPage(); for (uint i=0; i200 ) { // 200 ms timeout - log(Log::LineType::Error, i18n("Timeout writing at address %1").arg(toHexLabel(address, nbChars(device().nbBytes())))); + log(Log::LineType::Error, i18n("Timeout writing at address %1").tqarg(toHexLabel(address, nbChars(device().nbBytes())))); return false; } } diff --git a/src/progs/direct/base/direct_pic.cpp b/src/progs/direct/base/direct_pic.cpp index 30e4722..c6316e9 100644 --- a/src/progs/direct/base/direct_pic.cpp +++ b/src/progs/direct/base/direct_pic.cpp @@ -17,10 +17,10 @@ Direct::PulseEngine::PulseEngine(::Programmer::Base &base) _clockDelay = 0; } -BitValue Direct::PulseEngine::pulseEngine(const QString &cmd, BitValue value) +BitValue Direct::PulseEngine::pulseEngine(const TQString &cmd, BitValue value) { - _pbase.log(Log::DebugLevel::Extra, QString("pulse engine: %1").arg(cmd)); - QByteArray a = toAscii(cmd); + _pbase.log(Log::DebugLevel::Extra, TQString("pulse engine: %1").tqarg(cmd)); + TQByteArray a = toAscii(cmd); BitValue res = 0; for (const char *ptr=a.data(); (ptr-a.data()) -#include -#include -#include +#include +#include +#include +#include #include "progs/direct/base/direct_prog_config.h" #include "progs/direct/base/direct_prog.h" //----------------------------------------------------------------------------- -::Programmer::ConfigWidget *Direct::GroupUI::createConfigWidget(QWidget *parent) const +::Programmer::ConfigWidget *Direct::GroupUI::createConfigWidget(TQWidget *tqparent) const { - return new ConfigWidget(static_cast(group()), parent); + return new ConfigWidget(static_cast(group()), tqparent); } //----------------------------------------------------------------------------- const char * const INV_PIN_LABEL = I18N_NOOP("Check this option if your hardware uses negative logic for this pin."); const char * const DELAY_LABEL = I18N_NOOP("Some programming cards need low clock rate:\nadding delay to clock pulses might help."); -Direct::HConfigWidget::HConfigWidget(::Programmer::Base &base, QWidget *parent, bool edit) - : ::Hardware::HConfigWidget(base, parent, edit) +Direct::HConfigWidget::HConfigWidget(::Programmer::Base &base, TQWidget *tqparent, bool edit) + : ::Hardware::HConfigWidget(base, tqparent, edit) { // pins assignment - QGroupBox *groupb = new QGroupBox(1, Horizontal, i18n("Pin assignment"), this); + TQGroupBox *groupb = new TQGroupBox(1,Qt::Horizontal, i18n("Pin assignment"), this); _mainVBox->addWidget(groupb); - QWidget *w = new QWidget(groupb); - QGridLayout *grid = new QGridLayout(w, 1, 1, 0, 10); + TQWidget *w = new TQWidget(groupb); + TQGridLayout *grid = new TQGridLayout(w, 1, 1, 0, 10); if (edit) grid->setColStretch(5, 1); for (uint i=0; iaddWidget(label, i, 0); - _combos[i] = new QComboBox(w); + _combos[i] = new TQComboBox(w); _combos[i]->setEnabled(edit); - connect(_combos[i], SIGNAL(activated(int)), SLOT(slotPinChanged())); - QToolTip::add(_combos[i], PIN_DATA[i].comment); + connect(_combos[i], TQT_SIGNAL(activated(int)), TQT_SLOT(slotPinChanged())); + TQToolTip::add(_combos[i], PIN_DATA[i].comment); grid->addWidget(_combos[i], i, 1); - _invcbs[i] = new QCheckBox(i18n("Inverted"), w); + _invcbs[i] = new TQCheckBox(i18n("Inverted"), w); _invcbs[i]->setEnabled(edit); - QToolTip::add(_invcbs[i], i18n(INV_PIN_LABEL)); + TQToolTip::add(_invcbs[i], i18n(INV_PIN_LABEL)); grid->addWidget(_invcbs[i], i, 2); if (edit) { - _testcbs[i] = new QCheckBox(i18n("on"), w); - QToolTip::add(_testcbs[i], PIN_DATA[i].testComment); - connect(_testcbs[i], SIGNAL(clicked()), SLOT(slotTestPin())); + _testcbs[i] = new TQCheckBox(i18n("on"), w); + TQToolTip::add(_testcbs[i], PIN_DATA[i].testComment); + connect(_testcbs[i], TQT_SIGNAL(clicked()), TQT_SLOT(slotTestPin())); grid->addWidget(_testcbs[i], i, 3); - _testLabels[i] = new QLabel(w); - QToolTip::add(_testcbs[i], PIN_DATA[i].testComment); + _testLabels[i] = new TQLabel(w); + TQToolTip::add(_testcbs[i], PIN_DATA[i].testComment); grid->addWidget(_testLabels[i], i, 4); - updateTestStatus(PinType(i), false); + updateTesttqStatus(PinType(i), false); } else { _testcbs[i] = 0; _testLabels[i] = 0; } } - QHBoxLayout *hbox = new QHBoxLayout(_mainVBox); - QLabel *label = new QLabel(i18n("Clock delay"), this); - QToolTip::add(label, i18n(DELAY_LABEL)); + TQHBoxLayout *hbox = new TQHBoxLayout(_mainVBox); + TQLabel *label = new TQLabel(i18n("Clock delay"), this); + TQToolTip::add(label, i18n(DELAY_LABEL)); hbox->addWidget(label); - _delay = new KIntNumInput(0, Horizontal, this); + _delay = new KIntNumInput(0,Qt::Horizontal, this); _delay->setRange(0, 50, 5); _delay->setEnabled(edit); - QToolTip::add(_delay, i18n(DELAY_LABEL)); + TQToolTip::add(_delay, i18n(DELAY_LABEL)); hbox->addWidget(_delay); if (edit) { - _sendBitsButton = new QPushButton(i18n("Send 0xA55A"), this); + _sendBitsButton = new TQPushButton(i18n("Send 0xA55A"), this); _sendBitsButton->setToggleButton(true); - connect(_sendBitsButton, SIGNAL(clicked()), SLOT(sendBits())); - QToolTip::add(_sendBitsButton, i18n("Continuously send 0xA55A on \"Data out\" pin.")); + connect(_sendBitsButton, TQT_SIGNAL(clicked()), TQT_SLOT(sendBits())); + TQToolTip::add(_sendBitsButton, i18n("Continuously send 0xA55A on \"Data out\" pin.")); _editVBox->addWidget(_sendBitsButton); _editVBox->addStretch(1); } else _sendBitsButton = 0; // timer for sending bits - _timerSendBits = new QTimer(this); - connect(_timerSendBits, SIGNAL(timeout()), SLOT(slotSendBits())); + _timerSendBits = new TQTimer(this); + connect(_timerSendBits, TQT_SIGNAL(timeout()), TQT_SLOT(slotSendBits())); // timer for automatically polling DataOut pin - _timerPollDataOut = new QTimer(this); - connect(_timerPollDataOut, SIGNAL(timeout()), SLOT(updateDataIn())); + _timerPollDataOut = new TQTimer(this); + connect(_timerPollDataOut, TQT_SIGNAL(timeout()), TQT_SLOT(updateDataIn())); } void Direct::HConfigWidget::sendBits() @@ -150,11 +150,11 @@ void Direct::HConfigWidget::updateTestPin(PinType ptype) Q_ASSERT( _connected && ptype!=DataIn ); bool on = _testcbs[ptype]->isChecked(); hardware()->setPin(ptype, on); - updateTestStatus(ptype, on); + updateTesttqStatus(ptype, on); if ( ptype==Vpp ) updateDataIn(); } -void Direct::HConfigWidget::updateTestStatus(PinType ptype, bool on) +void Direct::HConfigWidget::updateTesttqStatus(PinType ptype, bool on) { if (on) _testLabels[ptype]->setText(i18n(PIN_DATA[ptype].onLabel)); else _testLabels[ptype]->setText(i18n(PIN_DATA[ptype].offLabel)); @@ -163,7 +163,7 @@ void Direct::HConfigWidget::updateTestStatus(PinType ptype, bool on) void Direct::HConfigWidget::updateDataIn() { bool on = hardware()->readBit(); - updateTestStatus(DataIn, on); + updateTesttqStatus(DataIn, on); _testcbs[DataIn]->setChecked(on); } @@ -204,7 +204,7 @@ bool Direct::HConfigWidget::set(const Port::Description &pd, const ::Hardware::D if (_edit) { for (uint i=0; isetEnabled(_connected); - updateTestStatus(PinType(i), false); + updateTesttqStatus(PinType(i), false); } if ( _connected ) _timerPollDataOut->start(100); _sendBitsButton->setEnabled(_connected); @@ -239,11 +239,11 @@ Hardware::Data *Direct::HConfigWidget::data() const } //----------------------------------------------------------------------------- -Direct::ConfigWidget::ConfigWidget(const ::Programmer::Group &group, QWidget *parent) - : ::Hardware::ConfigWidget(new ::Direct::PicBase(group, 0), new Config, parent) +Direct::ConfigWidget::ConfigWidget(const ::Programmer::Group &group, TQWidget *tqparent) + : ::Hardware::ConfigWidget(new ::Direct::PicBase(group, 0), new Config, tqparent) {} -Hardware::HConfigWidget *Direct::ConfigWidget::createHardwareConfigWidget(QWidget *parent, bool edit) const +Hardware::HConfigWidget *Direct::ConfigWidget::createHardwareConfigWidget(TQWidget *tqparent, bool edit) const { - return new HConfigWidget(*_base, parent, edit); + return new HConfigWidget(*_base, tqparent, edit); } diff --git a/src/progs/direct/gui/direct_config_widget.h b/src/progs/direct/gui/direct_config_widget.h index 4a5e4c6..093e9fa 100644 --- a/src/progs/direct/gui/direct_config_widget.h +++ b/src/progs/direct/gui/direct_config_widget.h @@ -22,17 +22,18 @@ namespace Direct class GroupUI : public ::Programmer::GroupUI { public: - virtual ::Programmer::ConfigWidget *createConfigWidget(QWidget *parent) const; + virtual ::Programmer::ConfigWidget *createConfigWidget(TQWidget *tqparent) const; virtual bool hasAdvancedDialog() const { return false; } - virtual ::Programmer::AdvancedDialog *createAdvancedDialog(::Programmer::Base &, QWidget *) const { return 0; } + virtual ::Programmer::AdvancedDialog *createAdvancedDialog(::Programmer::Base &, TQWidget *) const { return 0; } }; //----------------------------------------------------------------------------- class HConfigWidget : public ::Hardware::HConfigWidget { Q_OBJECT + TQ_OBJECT public: - HConfigWidget(::Programmer::Base &base, QWidget *parent, bool edit); + HConfigWidget(::Programmer::Base &base, TQWidget *tqparent, bool edit); virtual bool set(const Port::Description &pd, const ::Hardware::Data &data); virtual ::Hardware::Data *data() const; @@ -44,17 +45,17 @@ private slots: void slotSendBits(); private: - QComboBox *_combos[Nb_PinTypes]; - QCheckBox *_invcbs[Nb_PinTypes]; - QCheckBox *_testcbs[Nb_PinTypes]; - QLabel *_testLabels[Nb_PinTypes]; + TQComboBox *_combos[Nb_PinTypes]; + TQCheckBox *_invcbs[Nb_PinTypes]; + TQCheckBox *_testcbs[Nb_PinTypes]; + TQLabel *_testLabels[Nb_PinTypes]; KIntNumInput *_delay; - QPushButton *_sendBitsButton; - QTimer *_timerSendBits, *_timerPollDataOut; + TQPushButton *_sendBitsButton; + TQTimer *_timerSendBits, *_timerPollDataOut; void sendBits(uint d, int nbb); void updateTestPin(PinType ptype); - void updateTestStatus(PinType ptype, bool on); + void updateTesttqStatus(PinType ptype, bool on); uint pin(PinType ptype) const; void updatePin(PinType ptype); Hardware *hardware() { return static_cast(_hardware); } @@ -64,9 +65,10 @@ private: class ConfigWidget : public ::Hardware::ConfigWidget { Q_OBJECT + TQ_OBJECT public: - ConfigWidget(const ::Programmer::Group &group, QWidget *parent); - virtual ::Hardware::HConfigWidget *createHardwareConfigWidget(QWidget *parent, bool edit) const; + ConfigWidget(const ::Programmer::Group &group, TQWidget *tqparent); + virtual ::Hardware::HConfigWidget *createHardwareConfigWidget(TQWidget *tqparent, bool edit) const; }; } // namespace diff --git a/src/progs/direct/xml/xml_direct_parser.cpp b/src/progs/direct/xml/xml_direct_parser.cpp index ee51674..bc77853 100644 --- a/src/progs/direct/xml/xml_direct_parser.cpp +++ b/src/progs/direct/xml/xml_direct_parser.cpp @@ -18,19 +18,19 @@ public: XmlToData() : ::Programmer::XmlToData("direct", "Direct") {} private: - virtual void parseData(QDomElement element, Data &data); - virtual void includes(QTextStream &s) const; - virtual void outputFunctions(QTextStream &s) const; + virtual void parseData(TQDomElement element, Data &data); + virtual void includes(TQTextStream &s) const; + virtual void outputFunctions(TQTextStream &s) const; }; -void Direct::XmlToData::parseData(QDomElement element, Data &) +void Direct::XmlToData::parseData(TQDomElement element, Data &) { - QString s = element.attribute("pwidth"); + TQString s = element.attribute("pwidth"); const Device::Data *d = Device::lister().data(currentDevice()); if ( d==0 ) qFatal("Invalid device name"); } -void Direct::XmlToData::includes(QTextStream &s) const +void Direct::XmlToData::includes(TQTextStream &s) const { Programmer::XmlToData::includes(s); s << "#include \"direct_baseline.h\"" << endl; @@ -38,7 +38,7 @@ void Direct::XmlToData::includes(QTextStream &s) const s << "#include \"direct_18F.h\"" << endl; } -void Direct::XmlToData::outputFunctions(QTextStream &s) const +void Direct::XmlToData::outputFunctions(TQTextStream &s) const { Programmer::XmlToData::outputFunctions(s); s << "::Programmer::DeviceSpecific *Direct::Group::createDeviceSpecific(::Programmer::Base &base) const" << endl; @@ -46,7 +46,7 @@ void Direct::XmlToData::outputFunctions(QTextStream &s) const s << " uint i = family(static_cast(base).device()->name());" << endl; s << " switch(i) {" << endl; for (uint i=0; i +#include #include "progs/base/generic_prog.h" #include "progs/base/generic_debug.h" @@ -16,7 +16,7 @@ GPSim::Process::Process(Log::Base *base) : ::Process::LineOutput(0, "gpsim_process"), Log::Base(base), _ready(false) { - connect(this, SIGNAL(stdoutDataReceived()), SLOT(stdoutDataReceivedSlot())); + connect(this, TQT_SIGNAL(stdoutDataReceived()), TQT_SLOT(stdoutDataReceivedSlot())); } void GPSim::Process::stdoutDataReceivedSlot() @@ -28,15 +28,15 @@ void GPSim::Process::stdoutDataReceivedSlot() } } -void GPSim::Process::addStdoutLine(const QString &line) +void GPSim::Process::addStdoutLine(const TQString &line) { log(Log::DebugLevel::Extra, " " + line, Log::Delayed); if ( line.startsWith("***ERROR:") ) { log(Log::LineType::Error, line); return; } - QString s = line; - QString prompt = "**gpsim> "; + TQString s = line; + TQString prompt = "**gpsim> "; while ( s.startsWith(prompt) ) { _ready = true; s = s.mid(prompt.length()); @@ -53,7 +53,7 @@ GPSim::ProcessManager::ProcessManager(Log::Base *base) bool GPSim::ProcessManager::start() { _process._ready = false; - _process.setup("gpsim", QStringList("-i"), false); + _process.setup("gpsim", TQStringList("-i"), false); if ( !_process.start(0) ) { log(Log::LineType::Error, i18n("Failed to start \"gpsim\".")); return false; @@ -75,11 +75,11 @@ bool GPSim::ProcessManager::runSynchronously() return true; } -bool GPSim::ProcessManager::sendCommand(const QString &cmd, bool synchronous) +bool GPSim::ProcessManager::sendCommand(const TQString &cmd, bool synchronous) { _process._ready = false; _process._stdoutLines.clear(); - _process._stdout = QString::null; + _process._stdout = TQString(); _process.writeToStdin(cmd + '\n'); if (synchronous) return runSynchronously(); return true; @@ -89,7 +89,7 @@ bool GPSim::ProcessManager::sendSignal(uint n, bool synchronous) { _process._ready = false; _process._stdoutLines.clear(); - _process._stdout = QString::null; + _process._stdout = TQString(); if ( !_process.signal(n) ) { log(Log::LineType::Error, i18n("Error send a signal to the subprocess.")); return false; @@ -101,7 +101,7 @@ bool GPSim::ProcessManager::sendSignal(uint n, bool synchronous) bool GPSim::ProcessManager::getVersion(VersionData &version) { if ( !sendCommand("version", true) ) return false; - QRegExp reg("\\w*\\s*(\\d+\\.\\d+\\.\\d+).*"); + TQRegExp reg("\\w*\\s*(\\d+\\.\\d+\\.\\d+).*"); if ( _process.sout().count()==0 || !reg.exactMatch(_process.sout()[0]) ) { version = VersionData(); return true; @@ -136,18 +136,18 @@ void GPSim::Hardware::internalDisconnectHardware() _manager = 0; } -bool GPSim::Hardware::execute(const QString &command, bool synchronous, QStringList *output) +bool GPSim::Hardware::execute(const TQString &command, bool synchronous, TQStringList *output) { - log(Log::DebugLevel::Normal, QString("command: %1").arg(command)); + log(Log::DebugLevel::Normal, TQString("command: %1").tqarg(command)); if (output) output->clear(); if ( !_manager->sendCommand(command, synchronous) ) return false; if (output) *output = _manager->process().sout(); return true; } -bool GPSim::Hardware::signal(uint n, bool synchronous, QStringList *output) +bool GPSim::Hardware::signal(uint n, bool synchronous, TQStringList *output) { - log(Log::DebugLevel::Normal, QString("signal: %1").arg(n)); + log(Log::DebugLevel::Normal, TQString("signal: %1").tqarg(n)); if (output) output->clear(); if ( !_manager->sendSignal(n, synchronous) ) return false; if (output) *output = _manager->process().sout(); diff --git a/src/progs/gpsim/base/gpsim.h b/src/progs/gpsim/base/gpsim.h index ab004a3..fcdabab 100644 --- a/src/progs/gpsim/base/gpsim.h +++ b/src/progs/gpsim/base/gpsim.h @@ -20,6 +20,7 @@ namespace GPSim class Process : public ::Process::LineOutput, public Log::Base { Q_OBJECT + TQ_OBJECT public: Process(Log::Base *base); @@ -29,7 +30,7 @@ private slots: private: bool _ready; - virtual void addStdoutLine(const QString &line); + virtual void addStdoutLine(const TQString &line); friend class ProcessManager; }; @@ -43,7 +44,7 @@ public: bool isReady() const { return _process._ready; } bool start(); bool runSynchronously(); - bool sendCommand(const QString &cmd, bool synchronous); + bool sendCommand(const TQString &cmd, bool synchronous); bool sendSignal(uint n, bool synchronous); bool getVersion(VersionData &version); @@ -55,11 +56,11 @@ private: class Hardware : public Programmer::Hardware { public: - Hardware(::Programmer::Base &base) : Programmer::Hardware(base, 0, QString::null), _manager(0) {} + Hardware(::Programmer::Base &base) : Programmer::Hardware(base, 0, TQString()), _manager(0) {} virtual ~Hardware(); bool isReady() const { return _manager->isReady(); } - bool execute(const QString &command, bool synchronous, QStringList *output = 0); - bool signal(uint n, bool synchronous, QStringList *output = 0); + bool execute(const TQString &command, bool synchronous, TQStringList *output = 0); + bool signal(uint n, bool synchronous, TQStringList *output = 0); const VersionData &version() const { return _version; } private: diff --git a/src/progs/gpsim/base/gpsim_debug.cpp b/src/progs/gpsim/base/gpsim_debug.cpp index b2bcec5..eca9841 100644 --- a/src/progs/gpsim/base/gpsim_debug.cpp +++ b/src/progs/gpsim/base/gpsim_debug.cpp @@ -9,7 +9,7 @@ #include "gpsim_debug.h" #include -#include +#include #include "devices/list/device_list.h" #include "devices/pic/base/pic_register.h" @@ -52,10 +52,10 @@ bool GPSim::Debugger::internalStep() return hardware()->execute("step", true); } -bool GPSim::Debugger::setBreakpoints(const QValueList
&list) +bool GPSim::Debugger::setBreakpoints(const TQValueList
&list) { for (uint i=0; i<_nbBreakpoints; i++) - if ( !hardware()->execute("clear " + QString::number(i), true) ) return false; + if ( !hardware()->execute("clear " + TQString::number(i), true) ) return false; for (uint i=0; iexecute("break e 0x" + toHex(list[i], nbChars(list[i].toUInt())), true) ) return false; _nbBreakpoints = list.count(); @@ -75,15 +75,15 @@ bool GPSim::Debugger::updateState() return true; } -bool GPSim::Debugger::findRegExp(const QStringList &lines, const QString &pattern, - const QString &label, QString &value) const +bool GPSim::Debugger::findRegExp(const TQStringList &lines, const TQString &pattern, + const TQString &label, TQString &value) const { - QRegExp rexp(pattern); + TQRegExp rexp(pattern); uint i = 0; for (; iversion()<=VersionData(0, 21, 7) || hardware()->version()>=VersionData(0, 22, 0) ) return getRegister("W", value); - QStringList lines; + TQStringList lines; if ( !hardware()->execute("dump s", true, &lines) ) return false; - QString w = (_coff->symbol("_WREG") ? "_WREG" : "W"); - QString s; + TQString w = (_coff->symbol("_WREG") ? "_WREG" : "W"); + TQString s; if ( !findRegExp(lines, "^\\s*[0-9A-Fa-f]+\\s+(\\w+)\\s*=\\s*([0-9A-Fa-f]+)", w, s) ) { - log(Log::LineType::Error, i18n("Error reading register \"%1\"").arg(w)); + log(Log::LineType::Error, i18n("Error reading register \"%1\"").tqarg(w)); return false; } value = fromHex(s, 0); return true; } -bool GPSim::Debugger::getRegister(const QString &name, BitValue &value) +bool GPSim::Debugger::getRegister(const TQString &name, BitValue &value) { - QStringList lines; - QRegExp r; + TQStringList lines; + TQRegExp r; if ( hardware()->version()execute("x " + name, true, &lines) ) return false; r.setPattern("\\w+\\s*[][\\w]+\\s*=\\s*(?:0x|)([0-9A-Fa-f]+)(?:\\W.*|)"); @@ -126,7 +126,7 @@ bool GPSim::Debugger::getRegister(const QString &name, BitValue &value) for (; iregistersData(); - QString name = toHex(address, rdata.nbCharsAddress()); + TQString name = toHex(address, rdata.nbCharsAddress()); if ( hardware()->version()registersData().sfrNames[data.address()]; + TQString name = device()->registersData().sfrNames[data.address()]; if ( name=="WREG" ) return readWreg(value); if ( !name.isEmpty() ) return getRegister(name.lower(), value); return getRegister(data.address(), value); } -bool GPSim::Debugger::setRegister(const QString &name, BitValue value) +bool GPSim::Debugger::setRegister(const TQString &name, BitValue value) { if ( hardware()->version()registersData(); - QString s = QString("%1 = %2").arg(name).arg(toHexLabel(value, rdata.nbChars())); + TQString s = TQString("%1 = %2").tqarg(name).tqarg(toHexLabel(value, rdata.nbChars())); return hardware()->execute(s, true); } bool GPSim::Debugger::setRegister(Address address, BitValue value) { const Pic::RegistersData &rdata = device()->registersData(); - QString s = QString("ramData[$%1]").arg(toHex(address, rdata.nbCharsAddress())); + TQString s = TQString("ramData[$%1]").tqarg(toHex(address, rdata.nbCharsAddress())); return setRegister(s, value); } @@ -185,7 +185,7 @@ bool GPSim::Debugger::writeRegister(const Register::TypeData &data, BitValue val return false; } const Pic::RegistersData &rdata = device()->registersData(); - QString name = rdata.sfrNames[data.address()]; + TQString name = rdata.sfrNames[data.address()]; if ( !name.isEmpty() ) return setRegister(name.lower(), value); return setRegister(data.address(), value); } @@ -195,16 +195,16 @@ bool GPSim::Debugger::writeWreg(BitValue value) return setRegister("W", value); } -bool GPSim::Debugger::updatePortStatus(uint index, QMap &bits) +bool GPSim::Debugger::updatePorttqStatus(uint index, TQMap &bits) { for (uint i=0; iregistersData().hasPortBit(index, i) ) continue; - QString name = device()->registersData().portName(index).lower() + QString::number(i); - QStringList lines; + TQString name = device()->registersData().portName(index).lower() + TQString::number(i); + TQStringList lines; if ( !hardware()->execute("symbol " + name, true, &lines) ) return false; - QString pattern = "^(\\w+)=([^\\s])+\\s*", value; + TQString pattern = "^(\\w+)=([^\\s])+\\s*", value; if ( !findRegExp(lines, pattern, "bitState", value) || value.length()!=1 ) { - log(Log::LineType::Error, i18n("Error reading state of IO bit: %1").arg(name)); + log(Log::LineType::Error, i18n("Error reading state of IO bit: %1").tqarg(name)); return false; } switch (value[0].latin1()) { @@ -218,24 +218,24 @@ bool GPSim::Debugger::updatePortStatus(uint index, QMap(Device::lister().data(s)); if (data) { diff --git a/src/progs/gpsim/base/gpsim_debug.h b/src/progs/gpsim/base/gpsim_debug.h index ad838b2..7c258d9 100644 --- a/src/progs/gpsim/base/gpsim_debug.h +++ b/src/progs/gpsim/base/gpsim_debug.h @@ -19,6 +19,7 @@ namespace GPSim class Programmer : public ::Programmer::PicBase { Q_OBJECT + TQ_OBJECT public: Programmer(const ::Programmer::Group &group, const Pic::Data *data) : Programmer::PicBase(group, data, "gpsim_programmer") {} @@ -41,18 +42,18 @@ class Debugger : public ::Debugger::PicBase { public: Debugger(Programmer &programmer); - virtual bool setBreakpoints(const QValueList
&list); + virtual bool setBreakpoints(const TQValueList
&list); virtual bool readRegister(const Register::TypeData &data, BitValue &value); virtual bool writeRegister(const Register::TypeData &data, BitValue value); - virtual bool updatePortStatus(uint index, QMap &bits); + virtual bool updatePorttqStatus(uint index, TQMap &bits); private: uint _nbBreakpoints; - bool findRegExp(const QStringList &lines, const QString &pattern, - const QString &label, QString &value) const; - bool getRegister(const QString &name, BitValue &value); - bool setRegister(const QString &name, BitValue value); + bool findRegExp(const TQStringList &lines, const TQString &pattern, + const TQString &label, TQString &value) const; + bool getRegister(const TQString &name, BitValue &value); + bool setRegister(const TQString &name, BitValue value); bool getRegister(Address address, BitValue &value); bool setRegister(Address address, BitValue value); Hardware *hardware() { return static_cast(_programmer.hardware()); } @@ -72,9 +73,9 @@ private: class Group : public ::Programmer::PicGroup { public: - virtual QString name() const { return "gpsim"; } - virtual QString label() const { return i18n("GPSim"); } - virtual QString statusLabel() const; + virtual TQString name() const { return "gpsim"; } + virtual TQString label() const { return i18n("GPSim"); } + virtual TQString statusLabel() const; virtual ::Programmer::Properties properties() const { return ::Programmer::Debugger | ::Programmer::HasConnectedState; } virtual ::Programmer::TargetPowerMode targetPowerMode() const { return ::Programmer::TargetSelfPowered; } virtual bool isPortSupported(PortType) const { return false; } diff --git a/src/progs/gpsim/gui/gpsim_group_ui.cpp b/src/progs/gpsim/gui/gpsim_group_ui.cpp index 3949b8e..f3375cc 100644 --- a/src/progs/gpsim/gui/gpsim_group_ui.cpp +++ b/src/progs/gpsim/gui/gpsim_group_ui.cpp @@ -8,35 +8,35 @@ ***************************************************************************/ #include "gpsim_group_ui.h" -#include +#include #include "progs/base/prog_group.h" #include "progs/gpsim/base/gpsim.h" //---------------------------------------------------------------------------- -GPSim::ConfigWidget::ConfigWidget(const ::Programmer::Group &group, QWidget *parent) - : ::Programmer::ConfigWidget(group, parent) +GPSim::ConfigWidget::ConfigWidget(const ::Programmer::Group &group, TQWidget *tqparent) + : ::Programmer::ConfigWidget(group, tqparent) { uint row = numRows(); - QLabel *label = new QLabel(i18n("Status:"), this); + TQLabel *label = new TQLabel(i18n("tqStatus:"), this); addWidget(label, row,row, 0,0); - _status = new QLabel(this); + _status = new TQLabel(this); addWidget(_status, row,row, 1,1); - QTimer::singleShot(0, this, SLOT(updateStatus())); + TQTimer::singleShot(0, this, TQT_SLOT(updatetqStatus())); } -void GPSim::ConfigWidget::updateStatus() +void GPSim::ConfigWidget::updatetqStatus() { VersionData version; ProcessManager manager(0); if ( !manager.start() ) _status->setText(i18n("Could not start \"gpsim\"")); else if ( !manager.getVersion(version) || !version.isValid() ) _status->setText(i18n("Could not detect \"gpsim\" version")); - else _status->setText(i18n("Found version \"%1\"").arg(version.pretty())); + else _status->setText(i18n("Found version \"%1\"").tqarg(version.pretty())); } //---------------------------------------------------------------------------- -::Programmer::ConfigWidget *GPSim::GroupUI::createConfigWidget(QWidget *parent) const +::Programmer::ConfigWidget *GPSim::GroupUI::createConfigWidget(TQWidget *tqparent) const { - return new ConfigWidget(static_cast(group()), parent); + return new ConfigWidget(static_cast(group()), tqparent); } diff --git a/src/progs/gpsim/gui/gpsim_group_ui.h b/src/progs/gpsim/gui/gpsim_group_ui.h index 485aa69..7916a1d 100644 --- a/src/progs/gpsim/gui/gpsim_group_ui.h +++ b/src/progs/gpsim/gui/gpsim_group_ui.h @@ -18,23 +18,24 @@ namespace GPSim class ConfigWidget : public ::Programmer::ConfigWidget { Q_OBJECT + TQ_OBJECT public: - ConfigWidget(const ::Programmer::Group &group, QWidget *parent); + ConfigWidget(const ::Programmer::Group &group, TQWidget *tqparent); private slots: - void updateStatus(); + void updatetqStatus(); private: - QLabel *_status; + TQLabel *_status; }; //---------------------------------------------------------------------------- class GroupUI : public ::Programmer::GroupUI { public: - virtual ::Programmer::ConfigWidget *createConfigWidget(QWidget *parent) const; + virtual ::Programmer::ConfigWidget *createConfigWidget(TQWidget *tqparent) const; virtual bool hasAdvancedDialog() const { return false; } - virtual ::Programmer::AdvancedDialog *createAdvancedDialog(::Programmer::Base &, QWidget *) const { return 0; } + virtual ::Programmer::AdvancedDialog *createAdvancedDialog(::Programmer::Base &, TQWidget *) const { return 0; } }; } // namespace diff --git a/src/progs/gui/debug_config_center.cpp b/src/progs/gui/debug_config_center.cpp index 9286e3e..a35eeba 100644 --- a/src/progs/gui/debug_config_center.cpp +++ b/src/progs/gui/debug_config_center.cpp @@ -10,7 +10,7 @@ #include -QPixmap Debugger::OptionsConfigWidget::pixmap() const +TQPixmap Debugger::OptionsConfigWidget::pixmap() const { KIconLoader loader; return loader.loadIcon("piklab_config_debugger", KIcon::Toolbar, KIcon::SizeMedium); diff --git a/src/progs/gui/debug_config_center.h b/src/progs/gui/debug_config_center.h index a8e496e..169829e 100644 --- a/src/progs/gui/debug_config_center.h +++ b/src/progs/gui/debug_config_center.h @@ -9,7 +9,7 @@ #ifndef DEBUG_CONFIG_CENTER_H #define DEBUG_CONFIG_CENTER_H -#include +#include #include "common/gui/config_widget.h" #include "progs/base/debug_config.h" @@ -18,9 +18,9 @@ namespace Debugger { BEGIN_DECLARE_CONFIG_WIDGET(Config, OptionsConfigWidget) - virtual QString header() const { return i18n("Debugging Options"); } - virtual QString title() const { return i18n("Debugging Options"); } - virtual QPixmap pixmap() const; + virtual TQString header() const { return i18n("Debugging Options"); } + virtual TQString title() const { return i18n("Debugging Options"); } + virtual TQPixmap pixmap() const; END_DECLARE_CONFIG_WIDGET } // namespace diff --git a/src/progs/gui/hardware_config_widget.cpp b/src/progs/gui/hardware_config_widget.cpp index 8d82ddb..4dbaac6 100644 --- a/src/progs/gui/hardware_config_widget.cpp +++ b/src/progs/gui/hardware_config_widget.cpp @@ -9,7 +9,7 @@ ***************************************************************************/ #include "hardware_config_widget.h" -#include +#include #include #include "progs/base/prog_config.h" @@ -17,39 +17,39 @@ #include "common/gui/misc_gui.h" //----------------------------------------------------------------------------- -Hardware::HConfigWidget::HConfigWidget(::Programmer::Base &base, QWidget *parent, bool edit) - : QFrame(parent, "hardware_config_widget"), _edit(edit), _connected(false), _base(base) +Hardware::HConfigWidget::HConfigWidget(::Programmer::Base &base, TQWidget *tqparent, bool edit) + : TQFrame(tqparent, "hardware_config_widget"), _edit(edit), _connected(false), _base(base) { _hardware = 0; - QHBoxLayout *top = new QHBoxLayout(this, 0, 10); - _mainVBox = new QVBoxLayout(top); + TQHBoxLayout *top = new TQHBoxLayout(this, 0, 10); + _mainVBox = new TQVBoxLayout(top); if (edit) { - _editVBox = new QVBoxLayout(top); + _editVBox = new TQVBoxLayout(top); top->setStretchFactor(_editVBox, 1); } else _editVBox = 0; } //----------------------------------------------------------------------------- -Hardware::EditDialog::EditDialog(ConfigWidget *cwidget, const QString &name, const Port::Description &pd, Data *data) +Hardware::EditDialog::EditDialog(ConfigWidget *cwidget, const TQString &name, const Port::Description &pd, Data *data) : KDialogBase(Plain, i18n("Edit and test hardware"), Ok|Cancel, Cancel, cwidget, "hardware_edit_dialog", true, true), _cwidget(cwidget), _savedName(name), _oldData(data) { setButtonOK(i18n("Save")); setButtonCancel(i18n("Close")); - QGridLayout *grid = new QGridLayout(plainPage(), 1, 1, 0, 10); + TQGridLayout *grid = new TQGridLayout(plainPage(), 1, 1, 0, 10); grid->setColStretch(2, 1); - QLabel *label = new QLabel(i18n("Hardware name:"), plainPage()); + TQLabel *label = new TQLabel(i18n("Hardware name:"), plainPage()); grid->addWidget(label, 0, 0); - _name = new QLineEdit(name, plainPage()); + _name = new TQLineEdit(name, plainPage()); grid->addWidget(_name, 0, 1); - label = new QLabel(i18n("%1 at %2:").arg(pd.type.label()).arg(pd.device), plainPage()); + label = new TQLabel(i18n("%1 at %2:").tqarg(pd.type.label()).tqarg(pd.device), plainPage()); grid->addWidget(label, 1, 0); - label = new QLabel(plainPage()); + label = new TQLabel(plainPage()); grid->addWidget(label, 1, 1); _hc = cwidget->createHardwareConfigWidget(plainPage(), true); @@ -71,9 +71,9 @@ void Hardware::EditDialog::slotOk() MessageBox::sorry(i18n("The hardware name is already used for a standard hardware."), Log::Show); return; } - QStringList names = _cwidget->_config->hardwareNames(PortType::Nb_Types); // all hardwares - if ( names.contains(_name->text()) ) { - if ( !MessageBox::askContinue(i18n("Do you want to overwrite this custom hardware \"%1\"?").arg(_name->text()), + TQStringList names = _cwidget->_config->hardwareNames(PortType::Nb_Types); // all hardwares + if ( names.tqcontains(_name->text()) ) { + if ( !MessageBox::askContinue(i18n("Do you want to overwrite this custom hardware \"%1\"?").tqarg(_name->text()), KStdGuiItem::save()) ) return; } delete _oldData; @@ -94,19 +94,19 @@ void Hardware::EditDialog::slotCancel() } //----------------------------------------------------------------------------- -Hardware::ConfigWidget::ConfigWidget(::Programmer::Base *base, Config *config, QWidget *parent) - : ::Programmer::ConfigWidget(base->group(), parent), _base(base), _config(config), _hc(0) +Hardware::ConfigWidget::ConfigWidget(::Programmer::Base *base, Config *config, TQWidget *tqparent) + : ::Programmer::ConfigWidget(base->group(), tqparent), _base(base), _config(config), _hc(0) { // programmer combo uint row = numRows(); - _configCombo = new QComboBox(this); - connect(_configCombo, SIGNAL(activated(int)), SLOT(configChanged(int))); + _configCombo = new TQComboBox(this); + connect(_configCombo, TQT_SIGNAL(activated(int)), TQT_SLOT(configChanged(int))); addWidget(_configCombo, row,row, 0,0); row++; // hardware config - QHBoxLayout *hbox = new QHBoxLayout(10); - _hbox = new QHBoxLayout(10); + TQHBoxLayout *hbox = new TQHBoxLayout(10); + _hbox = new TQHBoxLayout(10); hbox->addLayout(_hbox); addLayout(hbox, row,row, 0,1); row++; @@ -117,12 +117,12 @@ Hardware::ConfigWidget::ConfigWidget(::Programmer::Base *base, Config *config, Q row++; // buttons - QVBoxLayout *vbox = new QVBoxLayout(hbox); + TQVBoxLayout *vbox = new TQVBoxLayout(hbox); _editButton = new KPushButton(this); - connect(_editButton, SIGNAL(clicked()), SLOT(editClicked())); + connect(_editButton, TQT_SIGNAL(clicked()), TQT_SLOT(editClicked())); vbox->addWidget(_editButton); _deleteButton = new KPushButton(i18n("Delete"), this); - connect(_deleteButton, SIGNAL(clicked()), SLOT(deleteClicked())); + connect(_deleteButton, TQT_SIGNAL(clicked()), TQT_SLOT(deleteClicked())); vbox->addWidget(_deleteButton); vbox->addStretch(1); } @@ -148,7 +148,7 @@ bool Hardware::ConfigWidget::set(const Port::Description &pd, uint i) } bool ok = _hc->set(pd, *hd); delete hd; - QString s = _config->comment(_names[i]); + TQString s = _config->comment(_names[i]); if ( s.isEmpty() ) _comment->hide(); else { _comment->setText(s); @@ -163,7 +163,7 @@ bool Hardware::ConfigWidget::set(const Port::Description &pd, uint i) bool Hardware::ConfigWidget::setPort(const ::Programmer::HardwareDescription &hd) { updateList(hd.port.type); - int i = _names.findIndex(_config->currentHardware(hd.port.type)); + int i = _names.tqfindIndex(_config->currentHardware(hd.port.type)); if ( i!=-1 ) _configCombo->setCurrentItem(i); return set(hd.port, _configCombo->currentItem()); } @@ -174,29 +174,29 @@ void Hardware::ConfigWidget::updateList(PortType type) _names = _config->hardwareNames(type); for (uint i=0; i<_names.count(); i++) { bool standard = _config->isStandardHardware(_names[i]); - QString s = (standard ? _config->label(_names[i]) : i18n("%1 ").arg(_names[i])); + TQString s = (standard ? _config->label(_names[i]) : i18n("%1 ").tqarg(_names[i])); _configCombo->insertItem(s); } } void Hardware::ConfigWidget::editClicked() { - QString name = _names[_configCombo->currentItem()]; - QString cname = (_config->isStandardHardware(name) ? QString::null : name); + TQString name = _names[_configCombo->currentItem()]; + TQString cname = (_config->isStandardHardware(name) ? TQString() : name); Port::Description pd = _hc->portDescription(); EditDialog *hcd = new EditDialog(this, cname, pd, _hc->data()); int res = hcd->exec(); - if ( res==QDialog::Rejected ) return; + if ( res==TQDialog::Rejected ) return; updateList(pd.type); - int index = _names.findIndex(hcd->savedName()); + int index = _names.tqfindIndex(hcd->savedName()); _configCombo->setCurrentItem(index); configChanged(_configCombo->currentItem()); } void Hardware::ConfigWidget::deleteClicked() { - QString name = _names[_configCombo->currentItem()]; - if ( !MessageBox::askContinue(i18n("Do you want to delete custom hardware \"%1\"?").arg(name), + TQString name = _names[_configCombo->currentItem()]; + if ( !MessageBox::askContinue(i18n("Do you want to delete custom hardware \"%1\"?").tqarg(name), KStdGuiItem::del()) ) return; _config->deleteCustomHardware(name); updateList(_hc->portDescription().type); diff --git a/src/progs/gui/hardware_config_widget.h b/src/progs/gui/hardware_config_widget.h index d373990..2f94e81 100644 --- a/src/progs/gui/hardware_config_widget.h +++ b/src/progs/gui/hardware_config_widget.h @@ -10,8 +10,8 @@ #ifndef HARDWARE_CONFIG_WIDGET #define HARDWARE_CONFIG_WIDGET -#include -#include +#include +#include #include #include @@ -24,11 +24,12 @@ namespace Hardware { //----------------------------------------------------------------------------- -class HConfigWidget : public QFrame +class HConfigWidget : public TQFrame { Q_OBJECT + TQ_OBJECT public: - HConfigWidget(::Programmer::Base &base, QWidget *parent, bool edit); + HConfigWidget(::Programmer::Base &base, TQWidget *tqparent, bool edit); virtual ~HConfigWidget() { delete _hardware; } virtual bool set(const Port::Description &pd, const Data &data) = 0; virtual Data *data() const = 0; @@ -36,7 +37,7 @@ public: protected: ::Programmer::Hardware *_hardware; - QVBoxLayout *_mainVBox, *_editVBox; + TQVBoxLayout *_mainVBox, *_editVBox; bool _edit, _connected; ::Programmer::Base &_base; }; @@ -47,9 +48,10 @@ class ConfigWidget; class EditDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - EditDialog(ConfigWidget *parent, const QString &name, const Port::Description &pd, Data *data); - QString savedName() const { return _savedName; } + EditDialog(ConfigWidget *tqparent, const TQString &name, const Port::Description &pd, Data *data); + TQString savedName() const { return _savedName; } private slots: virtual void slotOk(); @@ -57,22 +59,23 @@ private slots: private: ConfigWidget *_cwidget; - QString _savedName; + TQString _savedName; Data *_oldData; HConfigWidget *_hc; - QLineEdit *_name; + TQLineEdit *_name; }; //----------------------------------------------------------------------------- class ConfigWidget : public ::Programmer::ConfigWidget { Q_OBJECT + TQ_OBJECT public: - ConfigWidget(::Programmer::Base *base, Config *config, QWidget *parent); + ConfigWidget(::Programmer::Base *base, Config *config, TQWidget *tqparent); virtual ~ConfigWidget() { delete _base; } virtual void saveConfig(); virtual bool setPort(const ::Programmer::HardwareDescription &hd); - virtual HConfigWidget *createHardwareConfigWidget(QWidget *parent, bool edit) const = 0; + virtual HConfigWidget *createHardwareConfigWidget(TQWidget *tqparent, bool edit) const = 0; private slots: void editClicked(); @@ -84,12 +87,12 @@ protected: private: Config *_config; - QStringList _names; + TQStringList _names; HConfigWidget *_hc; - QPushButton *_editButton, *_deleteButton; - QComboBox *_configCombo; + TQPushButton *_editButton, *_deleteButton; + TQComboBox *_configCombo; KTextBrowser *_comment; - QHBoxLayout *_hbox; + TQHBoxLayout *_hbox; void updateList(PortType type); bool set(const Port::Description &pd, uint i); diff --git a/src/progs/gui/port_selector.cpp b/src/progs/gui/port_selector.cpp index 2aaaabf..4bb4539 100644 --- a/src/progs/gui/port_selector.cpp +++ b/src/progs/gui/port_selector.cpp @@ -8,7 +8,7 @@ ***************************************************************************/ #include "port_selector.h" -#include +#include #include #include "common/port/serial.h" @@ -21,23 +21,23 @@ const char * const PortSelector::LABELS[PortType::Nb_Types] = { I18N_NOOP("Serial"), I18N_NOOP("Parallel"), I18N_NOOP("USB") }; -PortSelector::PortSelector(QWidget *parent) - : QFrame(parent, "port_selector"), _group(0), _main(0) +PortSelector::PortSelector(TQWidget *tqparent) + : TQFrame(tqparent, "port_selector"), _group(0), _main(0) { - _top = new QGridLayout(this, 1, 1, 0, 10); + _top = new TQGridLayout(this, 1, 1, 0, 10); _top->setRowStretch(1, 1); - _bgroup = new QButtonGroup; - connect(_bgroup, SIGNAL(clicked(int)), SIGNAL(changed())); + _bgroup = new TQButtonGroup; + connect(_bgroup, TQT_SIGNAL(clicked(int)), TQT_SIGNAL(changed())); } void PortSelector::setGroup(const Programmer::Group &group) { _group = &group; delete _main; - _main = new QWidget(this); + _main = new TQWidget(this); _top->addWidget(_main, 0, 0); - _grid = new QGridLayout(_main, 1, 1, 0, 10); + _grid = new TQGridLayout(_main, 1, 1, 0, 10); _grid->setColStretch(3, 1); FOR_EACH(PortType, type) { _combos[type.type()] = 0; @@ -52,7 +52,7 @@ void PortSelector::setGroup(const Programmer::Group &group) void PortSelector::addPortType(const Port::Description &pd) { - QString noDeviceMessage, notAvailableMessage; + TQString noDeviceMessage, notAvailableMessage; switch (pd.type.type()) { case PortType::Serial: noDeviceMessage = i18n("Your computer might not have any serial port."); @@ -70,38 +70,38 @@ void PortSelector::addPortType(const Port::Description &pd) case PortType::Nb_Types: Q_ASSERT(false); break; } - QRadioButton *rb = new QRadioButton(i18n(LABELS[pd.type.type()]), _main); + TQRadioButton *rb = new TQRadioButton(i18n(LABELS[pd.type.type()]), _main); _bgroup->insert(rb, pd.type.type()); if ( _bgroup->count()==1 ) _bgroup->setButton(pd.type.type()); _grid->addWidget(rb, 3*(_bgroup->count()-1), 0); - _status[pd.type.type()] = new QLabel(_main); + _status[pd.type.type()] = new TQLabel(_main); _grid->addWidget(_status[pd.type.type()], 3*(_bgroup->count()-1), 2); - QStringList list = Port::probedDeviceList(pd.type); + TQStringList list = Port::probedDeviceList(pd.type); bool noDevice = ( list.isEmpty() && pd.type.data().withDevice ); bool notAvailable = !Port::isAvailable(pd.type); rb->setEnabled(!notAvailable); if ( noDevice || notAvailable ) { KTextBrowser *comment = new KTextBrowser(_main); - QString text = (notAvailable ? notAvailableMessage : noDeviceMessage); + TQString text = (notAvailable ? notAvailableMessage : noDeviceMessage); text += "

"; - text += i18n("See Piklab homepage for help.").arg(Piklab::URLS[Piklab::Support]); + text += i18n("See Piklab homepage for help.").tqarg(Piklab::URLS[Piklab::Support]); comment->setText(text); _grid->addMultiCellWidget(comment, 3*(_bgroup->count()-1)+1,3*(_bgroup->count()-1)+1, 0,3); } if (pd.type.data().withDevice) { - _combos[pd.type.type()] = new QComboBox(true, _main); + _combos[pd.type.type()] = new TQComboBox(true, _main); for (uint i=0; iinsertItem(list[i]); - if ( !pd.device.isEmpty() && !list.contains(pd.device) ) _combos[pd.type.type()]->insertItem(pd.device); + if ( !pd.device.isEmpty() && !list.tqcontains(pd.device) ) _combos[pd.type.type()]->insertItem(pd.device); _combos[pd.type.type()]->setCurrentText(pd.device); - connect(_combos[pd.type.type()], SIGNAL(activated(int)), SIGNAL(changed())); - connect(_combos[pd.type.type()], SIGNAL(textChanged(const QString &)), SLOT(textChanged())); + connect(_combos[pd.type.type()], TQT_SIGNAL(activated(int)), TQT_SIGNAL(changed())); + connect(_combos[pd.type.type()], TQT_SIGNAL(textChanged(const TQString &)), TQT_SLOT(textChanged())); _grid->addWidget(_combos[pd.type.type()], 3*(_bgroup->count()-1), 1); } } -void PortSelector::setStatus(PortType ptype, const QString &message) +void PortSelector::settqStatus(PortType ptype, const TQString &message) { _pending = false; FOR_EACH(PortType, type) { @@ -114,9 +114,9 @@ void PortSelector::setStatus(PortType ptype, const QString &message) } } -QString PortSelector::device(PortType type) const +TQString PortSelector::device(PortType type) const { - if ( type==PortType::Nb_Types || _combos[type.type()]==0 || !type.data().withDevice ) return QString::null; + if ( type==PortType::Nb_Types || _combos[type.type()]==0 || !type.data().withDevice ) return TQString(); return _combos[type.type()]->currentText(); } @@ -140,5 +140,5 @@ void PortSelector::textChanged() if (_pending) return; _status[type().type()]->hide(); _pending = true; - QTimer::singleShot(1000, this, SIGNAL(changed())); + TQTimer::singleShot(1000, this, TQT_SIGNAL(changed())); } diff --git a/src/progs/gui/port_selector.h b/src/progs/gui/port_selector.h index 6304d1a..86a0d4d 100644 --- a/src/progs/gui/port_selector.h +++ b/src/progs/gui/port_selector.h @@ -9,24 +9,25 @@ #ifndef PORT_SELECTOR_H #define PORT_SELECTOR_H -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "common/port/port.h" namespace Programmer { class Group; } -class PortSelector : public QFrame +class PortSelector : public TQFrame { Q_OBJECT + TQ_OBJECT public: - PortSelector(QWidget *parent); + PortSelector(TQWidget *tqparent); void setGroup(const Programmer::Group &group); Port::Description portDescription() const { return Port::Description(type(), device(type())); } void saveConfig(); - void setStatus(PortType type, const QString &message); + void settqStatus(PortType type, const TQString &message); signals: void changed(); @@ -36,17 +37,17 @@ private slots: private: const Programmer::Group *_group; - QGridLayout *_top, *_grid; - QWidget *_main; - QButtonGroup *_bgroup; - QComboBox *_combos[PortType::Nb_Types]; - QLabel *_status[PortType::Nb_Types]; + TQGridLayout *_top, *_grid; + TQWidget *_main; + TQButtonGroup *_bgroup; + TQComboBox *_combos[PortType::Nb_Types]; + TQLabel *_status[PortType::Nb_Types]; bool _pending; static const char * const LABELS[PortType::Nb_Types]; void addPortType(const Port::Description &pd); PortType type() const; - QString device(PortType type) const; + TQString device(PortType type) const; }; #endif diff --git a/src/progs/gui/prog_config_center.cpp b/src/progs/gui/prog_config_center.cpp index 3210921..f781280 100644 --- a/src/progs/gui/prog_config_center.cpp +++ b/src/progs/gui/prog_config_center.cpp @@ -8,13 +8,13 @@ ***************************************************************************/ #include "prog_config_center.h" -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include "progs/list/prog_list.h" @@ -25,7 +25,7 @@ #include "libgui/main_global.h" //---------------------------------------------------------------------------- -QPixmap Programmer::OptionsConfigWidget::pixmap() const +TQPixmap Programmer::OptionsConfigWidget::pixmap() const { KIconLoader loader; return loader.loadIcon("piklab_config_programmer", KIcon::Toolbar, KIcon::SizeMedium); @@ -37,15 +37,15 @@ Programmer::SelectConfigWidget::SelectConfigWidget() uint row = 0; // programmer type - QLabel *label = new QLabel(i18n("Programmer in use:"), this); + TQLabel *label = new TQLabel(i18n("Programmer in use:"), this); addWidget(label, row,row, 0,0); - _combo = new KeyComboBox(this); - connect(_combo->widget(), SIGNAL(activated(int)), SLOT(programmerChanged())); + _combo = new KeyComboBox(this); + connect(_combo->widget(), TQT_SIGNAL(activated(int)), TQT_SLOT(programmerChanged())); addWidget(_combo->widget(), row,row, 1,1); row++; // tab widget - _tabWidget = new QTabWidget(this); + _tabWidget = new TQTabWidget(this); addWidget(_tabWidget, row,row, 0,2); row++; @@ -53,14 +53,14 @@ Programmer::SelectConfigWidget::SelectConfigWidget() _portSelectorContainer = new Container; _portSelectorContainer->setMargin(10); _portSelector = new PortSelector(_portSelectorContainer); - connect(_portSelector, SIGNAL(changed()), SLOT(portChanged())); + connect(_portSelector, TQT_SIGNAL(changed()), TQT_SLOT(portChanged())); _portSelectorContainer->addWidget(_portSelector, 0,0, 0,0); // specific programmer config - _stack = new KeyWidgetStack(_tabWidget); - static_cast(_stack->widget())->setMargin(10); + _stack = new KeyWidgetStack(_tabWidget); + static_cast(_stack->widget())->setMargin(10); KIconLoader loader; - QPixmap icon = loader.loadIcon("configure", KIcon::Small); + TQPixmap icon = loader.loadIcon("configure", KIcon::Small); _tabWidget->addTab(_stack->widget(), icon, i18n("Specific")); ::Programmer::Lister::ConstIterator it; for (it=::Programmer::lister().begin(); it!=::Programmer::lister().end(); ++it) { @@ -73,23 +73,23 @@ Programmer::SelectConfigWidget::SelectConfigWidget() // init _combo->setCurrentItem(GlobalConfig::programmerGroup().name()); _stack->setCurrentItem(GlobalConfig::programmerGroup().name()); - QTimer::singleShot(0, this, SLOT(programmerChanged())); + TQTimer::singleShot(0, this, TQT_SLOT(programmerChanged())); } void Programmer::SelectConfigWidget::portChanged() { - ::BusyCursor bc; // can take a few seconds to connect programmer... + ::PBusyCursor bc; // can take a few seconds to connect programmer... HardwareDescription hd; hd.port = _portSelector->portDescription(); ::Hardware::Config *config = Main::programmerGroup().hardwareConfig(); if (config) hd.name = config->currentHardware(hd.port.type); delete config; - QWidget *w = _stack->item(_combo->currentItem()); + TQWidget *w = _stack->item(_combo->currentItem()); bool ok = static_cast< ::Programmer::ConfigWidget *>(w)->setPort(hd); - _portSelector->setStatus(hd.port.type, ok ? i18n("Connection: Ok") : i18n("Connection: Error")); + _portSelector->settqStatus(hd.port.type, ok ? i18n("Connection: Ok") : i18n("Connection: Error")); } -QPixmap Programmer::SelectConfigWidget::pixmap() const +TQPixmap Programmer::SelectConfigWidget::pixmap() const { KIconLoader loader; return loader.loadIcon("piklab_config_programmer", KIcon::Toolbar, KIcon::SizeMedium); @@ -98,25 +98,25 @@ QPixmap Programmer::SelectConfigWidget::pixmap() const void Programmer::SelectConfigWidget::saveConfig() { _portSelector->saveConfig(); - QString key = _combo->currentItem(); + TQString key = _combo->currentItem(); static_cast(_stack->item(key))->saveConfig(); GlobalConfig::writeProgrammerGroup(*::Programmer::lister().group(key)); } void Programmer::SelectConfigWidget::programmerChanged() { - QString key = _combo->currentItem(); + TQString key = _combo->currentItem(); const ::Programmer::Group &group = *::Programmer::lister().group(key); bool isHardware = !group.isSoftware(); bool hasTab = ( _tabWidget->indexOf(_portSelectorContainer)!=-1 ); if (isHardware) { if ( !hasTab ) { KIconLoader loader; - QPixmap icon = loader.loadIcon("connect_creating", KIcon::Small); + TQPixmap icon = loader.loadIcon("connect_creating", KIcon::Small); _tabWidget->insertTab(_portSelectorContainer, icon, i18n("Port Selection"), 0); } } else if (hasTab) _tabWidget->removePage(_portSelectorContainer); _portSelector->setGroup(group); _stack->setCurrentItem(key); - if (isHardware) QTimer::singleShot(0, this, SLOT(portChanged())); + if (isHardware) TQTimer::singleShot(0, this, TQT_SLOT(portChanged())); } diff --git a/src/progs/gui/prog_config_center.h b/src/progs/gui/prog_config_center.h index ea5ee6d..e2f13c8 100644 --- a/src/progs/gui/prog_config_center.h +++ b/src/progs/gui/prog_config_center.h @@ -9,7 +9,7 @@ #ifndef PROG_CONFIG_CENTER_H #define PROG_CONFIG_CENTER_H -#include +#include #include "common/gui/config_widget.h" #include "common/gui/key_gui.h" @@ -20,21 +20,22 @@ class PortSelector; namespace Programmer { BEGIN_DECLARE_CONFIG_WIDGET(Config, OptionsConfigWidget) - virtual QString header() const { return i18n("Programmer Options"); } - virtual QString title() const { return i18n("Programmer Options"); } - virtual QPixmap pixmap() const; + virtual TQString header() const { return i18n("Programmer Options"); } + virtual TQString title() const { return i18n("Programmer Options"); } + virtual TQPixmap pixmap() const; END_DECLARE_CONFIG_WIDGET //---------------------------------------------------------------------------- class SelectConfigWidget : public ::ConfigWidget { Q_OBJECT + TQ_OBJECT public: SelectConfigWidget(); virtual void loadConfig() {} - virtual QString header() const { return i18n("Programmer Selection"); } - virtual QString title() const { return i18n("Programmer Selection"); } - virtual QPixmap pixmap() const; + virtual TQString header() const { return i18n("Programmer Selection"); } + virtual TQString title() const { return i18n("Programmer Selection"); } + virtual TQPixmap pixmap() const; public slots: virtual void saveConfig(); @@ -44,11 +45,11 @@ private slots: void portChanged(); private: - KeyComboBox *_combo; + KeyComboBox *_combo; PortSelector *_portSelector; - KeyWidgetStack *_stack; + KeyWidgetStack *_stack; Container *_portSelectorContainer; - QTabWidget *_tabWidget; + TQTabWidget *_tabWidget; }; } // namespace diff --git a/src/progs/gui/prog_config_widget.cpp b/src/progs/gui/prog_config_widget.cpp index be767c2..5ff6047 100644 --- a/src/progs/gui/prog_config_widget.cpp +++ b/src/progs/gui/prog_config_widget.cpp @@ -8,21 +8,21 @@ ***************************************************************************/ #include "prog_config_widget.h" -#include -#include -#include -#include +#include +#include +#include +#include #include #include "progs/base/prog_config.h" #include "progs/base/prog_group.h" -Programmer::ConfigWidget::ConfigWidget(const Group &group, QWidget *parent) - : ::ConfigWidget(parent), _group(group) +Programmer::ConfigWidget::ConfigWidget(const Group &group, TQWidget *tqparent) + : ::ConfigWidget(tqparent), _group(group) { if ( group.properties() & NeedDeviceSpecificFirmware ) { uint row = numRows(); - QLabel *label = new QLabel(i18n("Firmware directory:"), this); + TQLabel *label = new TQLabel(i18n("Firmware directory:"), this); addWidget(label, row,row, 0,0); _firmwareDir = new KURLRequester(this); _firmwareDir->setMode(KFile::Directory | KFile::ExistingOnly); diff --git a/src/progs/gui/prog_config_widget.h b/src/progs/gui/prog_config_widget.h index d201cea..2dc8b7e 100644 --- a/src/progs/gui/prog_config_widget.h +++ b/src/progs/gui/prog_config_widget.h @@ -9,7 +9,7 @@ #ifndef PROG_CONFIG_WIDGET #define PROG_CONFIG_WIDGET -class QCheckBox; +class TQCheckBox; class KURLRequester; #include "common/gui/config_widget.h" @@ -23,15 +23,16 @@ class HardwareDescription; class ConfigWidget: public ::ConfigWidget { Q_OBJECT + TQ_OBJECT public: - ConfigWidget(const Group &group, QWidget *parent); + ConfigWidget(const Group &group, TQWidget *tqparent); virtual void loadConfig(); const Group &group() const { return _group; } virtual void saveConfig(); virtual bool setPort(const HardwareDescription &hd); signals: - void updatePortStatus(bool ok); + void updatePorttqStatus(bool ok); protected: const Group &_group; diff --git a/src/progs/gui/prog_group_ui.cpp b/src/progs/gui/prog_group_ui.cpp index 14cf7b0..90643a0 100644 --- a/src/progs/gui/prog_group_ui.cpp +++ b/src/progs/gui/prog_group_ui.cpp @@ -24,50 +24,50 @@ #include "devices/pic/prog/pic_prog.h" //---------------------------------------------------------------------------- -Programmer::StandaloneMemoryCalibrationEditor::StandaloneMemoryCalibrationEditor(const Pic::Memory &memory, QWidget *parent) - : Pic::MemoryCalibrationEditor(0, const_cast(memory), parent) +Programmer::StandaloneMemoryCalibrationEditor::StandaloneMemoryCalibrationEditor(const Pic::Memory &memory, TQWidget *tqparent) + : Pic::MemoryCalibrationEditor(0, const_cast(memory), tqparent) {} void Programmer::StandaloneMemoryCalibrationEditor::init(bool first) { Pic::MemoryCalibrationEditor::init(first); - KAction *action = new KAction(i18n("Read"), "reload", 0, this, SIGNAL(updateCalibration()), Main::toplevel().actionCollection()); + KAction *action = new KAction(i18n("Read"), "reload", 0, TQT_TQOBJECT(this), TQT_SIGNAL(updateCalibration()), Main::toplevel().actionCollection()); addAction(action); - action = new KAction(i18n("Regenerating..."), 0, 0, this, SIGNAL(regenerate()), Main::toplevel().actionCollection()); + action = new KAction(i18n("Regenerating..."), 0, 0, TQT_TQOBJECT(this), TQT_SIGNAL(regenerate()), Main::toplevel().actionCollection()); addAction(action); } //---------------------------------------------------------------------------- -Programmer::ButtonContainer::ButtonContainer(const QString &title, - QObject *receiver, const char *updateSlot, QWidget *parent) - : ::ButtonContainer(title, parent) +Programmer::ButtonContainer::ButtonContainer(const TQString &title, + TQObject *receiver, const char *updateSlot, TQWidget *tqparent) + : ::ButtonContainer(title, tqparent) { if (receiver) button().appendAction(i18n("Read"), "reload", receiver, updateSlot); } //---------------------------------------------------------------------------- -Programmer::AdvancedDialog::AdvancedDialog(Base &base, QWidget *parent, const char *name) - : Dialog(IconList, i18n("Advanced Dialog"), Close, Close, parent, name, true, false), +Programmer::AdvancedDialog::AdvancedDialog(Base &base, TQWidget *tqparent, const char *name) + : Dialog(IconList, i18n("Advanced Dialog"), Close, Close, tqparent, name, true, false), _base(base), _calEditor(0) { // programmer KIconLoader loader; - QPixmap pixmap = loader.loadIcon("piklab_burnchip", KIcon::Toolbar, KIcon::SizeMedium); - QFrame *page = addPage(i18n("Programmer"), _base.group().label(), pixmap); - QVBoxLayout *vbox = new QVBoxLayout(page); + TQPixmap pixmap = loader.loadIcon("piklab_burnchip", KIcon::Toolbar, KIcon::SizeMedium); + TQFrame *page = addPage(i18n("Programmer"), _base.group().label(), pixmap); + TQVBoxLayout *vbox = new TQVBoxLayout(page); _programmerContainer = new Container(page); vbox->addWidget(_programmerContainer); Properties properties = _base.group().properties(); uint row = _programmerContainer->numRows(); if ( properties & HasFirmware ) { - _firmwareContainer = new ButtonContainer(i18n("Firmware"), this, SLOT(updateFirmware()), _programmerContainer); + _firmwareContainer = new ButtonContainer(i18n("Firmware"), TQT_TQOBJECT(this), TQT_SLOT(updateFirmware()), _programmerContainer); _programmerContainer->addWidget(_firmwareContainer, row,row, 0,1); if ( _base.group().properties() & CanUploadFirmware ) - _firmwareContainer->button().appendAction(i18n("Uploading..."), "piklab_burnchip", this, SLOT(uploadFirmware())); - QLabel *label = new QLabel(i18n("Version:"), _firmwareContainer); + _firmwareContainer->button().appendAction(i18n("Uploading..."), "piklab_burnchip", TQT_TQOBJECT(this), TQT_SLOT(uploadFirmware())); + TQLabel *label = new TQLabel(i18n("Version:"), _firmwareContainer); _firmwareContainer->addWidget(label, 1,1, 0,0); - _firmwareLabel = new QLabel(_firmwareContainer); + _firmwareLabel = new TQLabel(_firmwareContainer); _firmwareContainer->addWidget(_firmwareLabel, 1,1, 1,1); row++; } else { @@ -76,13 +76,13 @@ Programmer::AdvancedDialog::AdvancedDialog(Base &base, QWidget *parent, const ch } if ( _base.group().canReadVoltages() ) { - _voltagesContainer = new ButtonContainer(i18n("Voltages"), this, SLOT(updateVoltages()), _programmerContainer); + _voltagesContainer = new ButtonContainer(i18n("Voltages"), TQT_TQOBJECT(this), TQT_SLOT(updateVoltages()), _programmerContainer); _programmerContainer->addWidget(_voltagesContainer, row,row, 0,1); row++; } else _voltagesContainer = 0; if ( properties & HasSelfTest ) { - _selfTestContainer = new ButtonContainer(i18n("Self-test"), this, SLOT(updateSelfTest()), _programmerContainer); + _selfTestContainer = new ButtonContainer(i18n("Self-test"), TQT_TQOBJECT(this), TQT_SLOT(updateSelfTest()), _programmerContainer); _programmerContainer->addWidget(_selfTestContainer, row,row, 0,1); row++; } else _selfTestContainer = 0; @@ -90,11 +90,11 @@ Programmer::AdvancedDialog::AdvancedDialog(Base &base, QWidget *parent, const ch // calibration pixmap = loader.loadIcon("configure", KIcon::Toolbar, KIcon::SizeMedium); page = addPage(i18n("Calibration"), i18n("Calibration"), pixmap); - vbox = new QVBoxLayout(page); + vbox = new TQVBoxLayout(page); _calibrationContainer = new Container(page); vbox->addWidget(_calibrationContainer); const Device::Data *data = Main::deviceData(); - QString s; + TQString s; if ( data==0 ) s = i18n("No device selected."); else if ( data->group().name()!="pic" || !static_cast(data)->isReadable(Pic::MemoryRangeType::Cal) ) s = i18n("This device has no calibration information."); @@ -102,14 +102,14 @@ Programmer::AdvancedDialog::AdvancedDialog(Base &base, QWidget *parent, const ch else { const ::Programmer::PicBase &pbase = static_cast(_base); _calEditor = new StandaloneMemoryCalibrationEditor(pbase.deviceMemory(), _calibrationContainer); - connect(_calEditor, SIGNAL(updateCalibration()), SLOT(updateCalibration())); - connect(_calEditor, SIGNAL(regenerate()), SLOT(regenerateCalibration())); + connect(_calEditor, TQT_SIGNAL(updateCalibration()), TQT_SLOT(updateCalibration())); + connect(_calEditor, TQT_SIGNAL(regenerate()), TQT_SLOT(regenerateCalibration())); _calEditor->init(true); _calEditor->setReadOnly(true); _calibrationContainer->addWidget(_calEditor, 0,0, 0,0); } if ( !s.isEmpty() ) { - QLabel *label = new QLabel(s, _calibrationContainer); + TQLabel *label = new TQLabel(s, _calibrationContainer); _calibrationContainer->addWidget(label, 0,0, 0,0); } } @@ -132,7 +132,7 @@ bool Programmer::AdvancedDialog::ensureConnected() void Programmer::AdvancedDialog::updateFirmware() { - ::BusyCursor bc; + ::PBusyCursor bc; if ( ensureConnected() ) _base.readFirmwareVersion(); updateDisplay(); } @@ -141,7 +141,7 @@ void Programmer::AdvancedDialog::uploadFirmware() { PURL::Url url = PURL::getOpenUrl(":open_firmware", PURL::filter(PURL::Hex), this ,i18n("Open Firmware")); if ( url.isEmpty() ) return; - ::BusyCursor bc; + ::PBusyCursor bc; if ( !connectProgrammer() ) return; if ( _base.uploadFirmware(url) ) MessageBox::information(i18n("Firmware uploaded successfully."), Log::Show); @@ -151,21 +151,21 @@ void Programmer::AdvancedDialog::uploadFirmware() void Programmer::AdvancedDialog::updateVoltages() { - ::BusyCursor bc; + ::PBusyCursor bc; if ( ensureConnected() ) _base.readVoltages(); updateDisplay(); } void Programmer::AdvancedDialog::updateSelfTest() { - ::BusyCursor bc; + ::PBusyCursor bc; if ( ensureConnected() ) _base.selfTest(false); updateDisplay(); } void Programmer::AdvancedDialog::updateCalibration() { - ::BusyCursor bc; + ::PBusyCursor bc; if ( ensureConnected() ) static_cast< ::Programmer::PicBase &>(_base).readCalibration(); updateDisplay(); } diff --git a/src/progs/gui/prog_group_ui.h b/src/progs/gui/prog_group_ui.h index cd97834..edc15ee 100644 --- a/src/progs/gui/prog_group_ui.h +++ b/src/progs/gui/prog_group_ui.h @@ -27,8 +27,9 @@ class Group; class StandaloneMemoryCalibrationEditor : public Pic::MemoryCalibrationEditor { Q_OBJECT + TQ_OBJECT public: - StandaloneMemoryCalibrationEditor(const Pic::Memory &memory, QWidget *parent); + StandaloneMemoryCalibrationEditor(const Pic::Memory &memory, TQWidget *tqparent); virtual void init(bool first); virtual bool hasAction(Device::Action) const { return false; } @@ -41,16 +42,18 @@ signals: class ButtonContainer : public ::ButtonContainer { Q_OBJECT + TQ_OBJECT public: - ButtonContainer(const QString &title, QObject *receiver, const char *updateSlot, QWidget *parent); + ButtonContainer(const TQString &title, TQObject *receiver, const char *updateSlot, TQWidget *tqparent); }; //---------------------------------------------------------------------------- class AdvancedDialog : public Dialog { Q_OBJECT + TQ_OBJECT public: - AdvancedDialog(Base &base, QWidget *parent, const char *name); + AdvancedDialog(Base &base, TQWidget *tqparent, const char *name); virtual void updateDisplay(); protected: @@ -70,16 +73,16 @@ protected slots: virtual void regenerateCalibration(); private: - QLabel *_firmwareLabel; + TQLabel *_firmwareLabel; }; //---------------------------------------------------------------------------- class GroupUI : public ::Group::BaseGui { public: - virtual ::Programmer::ConfigWidget *createConfigWidget(QWidget *parent) const = 0; + virtual ::Programmer::ConfigWidget *createConfigWidget(TQWidget *tqparent) const = 0; virtual bool hasAdvancedDialog() const = 0; - virtual AdvancedDialog *createAdvancedDialog(Base &base, QWidget *parent) const = 0; + virtual AdvancedDialog *createAdvancedDialog(Base &base, TQWidget *tqparent) const = 0; }; inline const ::Programmer::GroupUI &groupui(const ::Programmer::Base &base) { return static_cast(*base.group().gui()); } diff --git a/src/progs/icd1/base/icd1.cpp b/src/progs/icd1/base/icd1.cpp index 8c2704a..2ce3c80 100644 --- a/src/progs/icd1/base/icd1.cpp +++ b/src/progs/icd1/base/icd1.cpp @@ -14,24 +14,24 @@ #include "common/port/port_base.h" //----------------------------------------------------------------------------- -Icd1::Hardware::Hardware(::Programmer::Base &base, const QString &portDevice) +Icd1::Hardware::Hardware(::Programmer::Base &base, const TQString &portDevice) : Icd::Hardware(base, new SerialPort(portDevice, base)) {} -bool Icd1::Hardware::internalConnect(const QString &mode) +bool Icd1::Hardware::internalConnect(const TQString &mode) { if ( !port()->open() ) return false; if ( !port()->reset() ) return false; if ( hasError() ) return false; - QByteArray a = toAscii(mode); + TQByteArray a = toAscii(mode); if ( !port()->send(a.data(), a.count()) ) return false; - QString s; + TQString s; if ( !port()->receive(1, s) ) return false; port()->setPinOn(Port::Serial::RTS, false, Port::PositiveLogic); Port::msleep(1); port()->setPinOn(Port::Serial::RTS, true, Port::PositiveLogic); if ( s.upper()!=mode ) { - log(Log::LineType::Error, i18n("Failed to set port mode to '%1'.").arg(mode)); + log(Log::LineType::Error, i18n("Failed to set port mode to '%1'.").tqarg(mode)); return false; } return true; @@ -52,10 +52,10 @@ bool Icd1::Hardware::readBlockCommand(uint nbBytes) { Q_ASSERT( nbBytes<=0xFF ); if ( !port()->sendCommand(0x7D00 + nbBytes) ) return false; - QByteArray a(nbBytes); + TQByteArray a(nbBytes); for (uint i=0; ireceiveByte(*(a.data()+i), i!=0) ) return false; - _rx = QString(a); + _rx = TQString(a); return true; } @@ -79,12 +79,12 @@ bool Icd1::Hardware::readVoltages(VoltagesData &voltages) if ( !sendCommand(0x701C, &res) ) return false; voltages[Pic::TargetVdd].value = (2.050 / 256) * res.toUInt(); // voltage at AN0 pin voltages[Pic::TargetVdd].value /= (4.7 / 14.7); // voltage at Vcc - log(Log::DebugLevel::Max, QString("Vdd: %1 %2").arg(toHexLabel(res, 4)).arg(voltages[Pic::TargetVdd].value)); + log(Log::DebugLevel::Max, TQString("Vdd: %1 %2").tqarg(toHexLabel(res, 4)).tqarg(voltages[Pic::TargetVdd].value)); voltages[Pic::TargetVdd].error = false; if ( !sendCommand(0x701D, &res) ) return false; voltages[Pic::TargetVpp].value = (2.050 / 256) * res.byte(0); // voltage at AN1 pin voltages[Pic::TargetVpp].value /= (10.0 / 110.0); // voltage at Vpp - log(Log::DebugLevel::Max, QString("Vpp: %1 %2").arg(toHexLabel(res, 4)).arg(voltages[Pic::TargetVpp].value)); + log(Log::DebugLevel::Max, TQString("Vpp: %1 %2").tqarg(toHexLabel(res, 4)).tqarg(voltages[Pic::TargetVpp].value)); voltages[Pic::TargetVpp].error = false; return sendCommand(0x7001); } @@ -106,7 +106,7 @@ bool Icd1::Hardware::selfTest() BitValue res; if ( !sendCommand(0x700B, &res, 5000) ) return false; if ( res!=0 ) { - log(Log::LineType::Warning, i18n("Self-test failed (returned value is %1)").arg(toLabel(res))); + log(Log::LineType::Warning, i18n("Self-test failed (returned value is %1)").tqarg(toLabel(res))); return false; } return true; @@ -152,7 +152,7 @@ bool Icd1::Hardware::eraseAll() if ( !sendCommand(0x7007, &res) ) return false; if ( !sendCommand(0x7001) ) return false; // disable Vpp if ( res!=0x3FFF ) { - log(Log::LineType::Error, i18n("Erase failed (returned value is %1)").arg(toHexLabel(res, 4))); + log(Log::LineType::Error, i18n("Erase failed (returned value is %1)").tqarg(toHexLabel(res, 4))); return false; } return true; diff --git a/src/progs/icd1/base/icd1.h b/src/progs/icd1/base/icd1.h index d1ae1d0..4026c8e 100644 --- a/src/progs/icd1/base/icd1.h +++ b/src/progs/icd1/base/icd1.h @@ -20,7 +20,7 @@ namespace Icd1 class Hardware : public Icd::Hardware { public: - Hardware(::Programmer::Base &base, const QString &portDevice); + Hardware(::Programmer::Base &base, const TQString &portDevice); SerialPort *port() { return static_cast(_port); } // initialization virtual bool uploadFirmware(const Pic::Memory &memory); @@ -46,8 +46,8 @@ public: virtual BitValue getProgramCounter(); private: - virtual bool internalConnect(const QString &mode); - virtual QString receivedData() const { return _rx; } + virtual bool internalConnect(const TQString &mode); + virtual TQString receivedData() const { return _rx; } bool sendCommand(uint cmd, BitValue *res = 0, uint timeout = Port::Serial::DEFAULT_TIMEOUT); bool readBlockCommand(uint nbBytes); bool gotoMemory(Pic::MemoryRangeType type, uint offset); diff --git a/src/progs/icd1/base/icd1_data.h b/src/progs/icd1/base/icd1_data.h index 4200578..a3aeec0 100644 --- a/src/progs/icd1/base/icd1_data.h +++ b/src/progs/icd1/base/icd1_data.h @@ -9,14 +9,14 @@ #ifndef ICD1_DATA_H #define ICD1_DATA_H -#include +#include namespace Icd1 { struct Data { uchar part; }; - extern const Data &data(const QString &device); + extern const Data &data(const TQString &device); } // namespace #endif diff --git a/src/progs/icd1/base/icd1_prog.cpp b/src/progs/icd1/base/icd1_prog.cpp index 13d0d4c..0f79270 100644 --- a/src/progs/icd1/base/icd1_prog.cpp +++ b/src/progs/icd1/base/icd1_prog.cpp @@ -8,7 +8,7 @@ ***************************************************************************/ #include "icd1_prog.h" -#include +#include #include "progs/base/prog_config.h" #include "devices/list/device_list.h" diff --git a/src/progs/icd1/base/icd1_prog.h b/src/progs/icd1/base/icd1_prog.h index 721be49..5df72ab 100644 --- a/src/progs/icd1/base/icd1_prog.h +++ b/src/progs/icd1/base/icd1_prog.h @@ -22,6 +22,7 @@ class Hardware; class ProgrammerBase : public Icd::ProgrammerBase { Q_OBJECT + TQ_OBJECT public: ProgrammerBase(const Programmer::Group &group, const Pic::Data *data) : Icd::ProgrammerBase(group, data, "icd1_programmer_base") {} @@ -40,9 +41,9 @@ private: class Group : public Icd::Group { public: - virtual QString name() const { return "icd1"; } - virtual QString label() const { return i18n("ICD1 Programmer"); } - virtual QString xmlName() const { return "icd1"; } + virtual TQString name() const { return "icd1"; } + virtual TQString label() const { return i18n("ICD1 Programmer"); } + virtual TQString xmlName() const { return "icd1"; } virtual ::Programmer::Properties properties() const; virtual ::Programmer::TargetPowerMode targetPowerMode() const { return ::Programmer::TargetExternallyPowered; } virtual bool isPortSupported(PortType type) const { return ( type==PortType::Serial ); } diff --git a/src/progs/icd1/base/icd1_serial.cpp b/src/progs/icd1/base/icd1_serial.cpp index a506fdb..8d40697 100644 --- a/src/progs/icd1/base/icd1_serial.cpp +++ b/src/progs/icd1/base/icd1_serial.cpp @@ -9,13 +9,13 @@ ***************************************************************************/ #include "icd1_serial.h" -#include +#include #include "common/global/global.h" #include "common/common/misc.h" #include "common/common/number.h" //----------------------------------------------------------------------------- -Icd1::SerialPort::SerialPort(const QString &device, Log::Base &log) +Icd1::SerialPort::SerialPort(const TQString &device, Log::Base &log) : Port::Serial(device, NeedDrain | NeedFlush, log) {} @@ -41,7 +41,7 @@ bool Icd1::SerialPort::reset() bool Icd1::SerialPort::synchronize() { if ( !setPinOn(RTS, false, Port::PositiveLogic) ) return false; - QTime time; + TQTime time; time.start(); for (;;) { bool bit; @@ -60,8 +60,8 @@ bool Icd1::SerialPort::sendCommand(uint cmd) Q_ASSERT( cmd<=0xFFFF ); synchronize(); char c[7] = "$XXXX\r"; - QString cs = toHex(cmd, 4); - log(Log::DebugLevel::Extra, QString("Send command: %1").arg(toPrintable(cs, PrintAlphaNum))); + TQString cs = toHex(cmd, 4); + log(Log::DebugLevel::Extra, TQString("Send command: %1").tqarg(toPrintable(cs, PrintAlphaNum))); c[1] = cs[0].latin1(); c[2] = cs[1].latin1(); c[3] = cs[2].latin1(); diff --git a/src/progs/icd1/base/icd1_serial.h b/src/progs/icd1/base/icd1_serial.h index e8d03da..e86dbaa 100644 --- a/src/progs/icd1/base/icd1_serial.h +++ b/src/progs/icd1/base/icd1_serial.h @@ -18,7 +18,7 @@ namespace Icd1 class SerialPort : public Port::Serial { public: - SerialPort(const QString &portDevice, Log::Base &log); + SerialPort(const TQString &portDevice, Log::Base &log); bool open(); bool reset(); bool synchronize(); diff --git a/src/progs/icd1/gui/icd1_group_ui.cpp b/src/progs/icd1/gui/icd1_group_ui.cpp index 34f28d5..1ae73a3 100644 --- a/src/progs/icd1/gui/icd1_group_ui.cpp +++ b/src/progs/icd1/gui/icd1_group_ui.cpp @@ -13,13 +13,13 @@ #include "progs/icd1/base/icd1_prog.h" //---------------------------------------------------------------------------- -Icd1::AdvancedDialog::AdvancedDialog(ProgrammerBase &base, QWidget *parent) - : ::Programmer::PicAdvancedDialog(base, parent, "icd1_advanced_dialog") +Icd1::AdvancedDialog::AdvancedDialog(ProgrammerBase &base, TQWidget *tqparent) + : ::Programmer::PicAdvancedDialog(base, tqparent, "icd1_advanced_dialog") { uint row = _selfTestContainer->numRows(); - QLabel *label = new QLabel(i18n("Result:"), _selfTestContainer); + TQLabel *label = new TQLabel(i18n("Result:"), _selfTestContainer); _selfTestContainer->addWidget(label, row,row, 0,0); - _selfTestLabel = new QLabel(_selfTestContainer); + _selfTestLabel = new TQLabel(_selfTestContainer); _selfTestContainer->addWidget(_selfTestLabel, row,row, 1,1); } @@ -30,12 +30,12 @@ void Icd1::AdvancedDialog::updateDisplay() } //---------------------------------------------------------------------------- -::Programmer::ConfigWidget *Icd1::GroupUI::createConfigWidget(QWidget *parent) const +::Programmer::ConfigWidget *Icd1::GroupUI::createConfigWidget(TQWidget *tqparent) const { - return new ::Programmer::ConfigWidget(static_cast(group()), parent); + return new ::Programmer::ConfigWidget(static_cast(group()), tqparent); } -::Programmer::AdvancedDialog *Icd1::GroupUI::createAdvancedDialog(::Programmer::Base &base, QWidget *parent) const +::Programmer::AdvancedDialog *Icd1::GroupUI::createAdvancedDialog(::Programmer::Base &base, TQWidget *tqparent) const { - return new AdvancedDialog(static_cast(base), parent); + return new AdvancedDialog(static_cast(base), tqparent); } diff --git a/src/progs/icd1/gui/icd1_group_ui.h b/src/progs/icd1/gui/icd1_group_ui.h index f60562a..c4f1c33 100644 --- a/src/progs/icd1/gui/icd1_group_ui.h +++ b/src/progs/icd1/gui/icd1_group_ui.h @@ -20,12 +20,13 @@ class Group; class AdvancedDialog : public ::Programmer::PicAdvancedDialog { Q_OBJECT + TQ_OBJECT public: - AdvancedDialog(ProgrammerBase &base, QWidget *parent); + AdvancedDialog(ProgrammerBase &base, TQWidget *tqparent); virtual void updateDisplay(); private: - QLabel *_selfTestLabel; + TQLabel *_selfTestLabel; ProgrammerBase &base() { return static_cast(_base); } }; @@ -33,9 +34,9 @@ private: class GroupUI : public ::Programmer::GroupUI { public: - virtual ::Programmer::ConfigWidget *createConfigWidget(QWidget *parent) const; + virtual ::Programmer::ConfigWidget *createConfigWidget(TQWidget *tqparent) const; virtual bool hasAdvancedDialog() const { return true; } - virtual ::Programmer::AdvancedDialog *createAdvancedDialog(::Programmer::Base &base, QWidget *parent) const; + virtual ::Programmer::AdvancedDialog *createAdvancedDialog(::Programmer::Base &base, TQWidget *tqparent) const; }; } // namespace diff --git a/src/progs/icd1/xml/xml_icd1_parser.cpp b/src/progs/icd1/xml/xml_icd1_parser.cpp index e09f51c..3296134 100644 --- a/src/progs/icd1/xml/xml_icd1_parser.cpp +++ b/src/progs/icd1/xml/xml_icd1_parser.cpp @@ -19,18 +19,18 @@ public: XmlToData() : Programmer::XmlToData("icd1", "Icd1") {} private: - virtual void parseData(QDomElement element, Data &data); - virtual void outputData(const Data &data, QTextStream &s) const; + virtual void parseData(TQDomElement element, Data &data); + virtual void outputData(const Data &data, TQTextStream &s) const; }; -void Icd1::XmlToData::parseData(QDomElement element, Data &data) +void Icd1::XmlToData::parseData(TQDomElement element, Data &data) { bool ok; data.part = fromHexLabel(element.attribute("family"), 2, &ok); if ( !ok ) qFatal("Missing or malformed family attribute"); } -void Icd1::XmlToData::outputData(const Data &data, QTextStream &s) const +void Icd1::XmlToData::outputData(const Data &data, TQTextStream &s) const { s << toHexLabel(data.part, 2); } diff --git a/src/progs/icd2/base/icd.cpp b/src/progs/icd2/base/icd.cpp index bfb1129..d458981 100644 --- a/src/progs/icd2/base/icd.cpp +++ b/src/progs/icd2/base/icd.cpp @@ -37,9 +37,9 @@ Device::Array Icd::DeviceSpecific::prepareRange(Pic::MemoryRangeType type, const if ( wordOffset!=data.count() ) { uint end = (force ? data.count() : findNonMaskEnd(type, data)); nbWords = end - wordOffset + 1; - log(Log::DebugLevel::Normal, QString(" start=%1 nbWords=%2 total=%3 force=%4") - .arg(toHexLabel(wordOffset, device().nbCharsAddress())).arg(toHexLabel(nbWords, device().nbCharsAddress())) - .arg(toHexLabel(data.count(), device().nbCharsAddress())).arg(force ? "true" : "false")); + log(Log::DebugLevel::Normal, TQString(" start=%1 nbWords=%2 total=%3 force=%4") + .tqarg(toHexLabel(wordOffset, device().nbCharsAddress())).tqarg(toHexLabel(nbWords, device().nbCharsAddress())) + .tqarg(toHexLabel(data.count(), device().nbCharsAddress())).tqarg(force ? "true" : "false")); } _base.progressMonitor().addTaskProgress(data.count()-nbWords); return data.mid(wordOffset, nbWords); @@ -52,7 +52,7 @@ bool Icd::DeviceSpecific::doWrite(Pic::MemoryRangeType type, const Device::Array uint nb = device().nbWordsWriteAlignment(Pic::MemoryRangeType::Code); if ( device().architecture()==Pic::Architecture::P18J && type==Pic::MemoryRangeType::Config ) { Q_ASSERT( data.count()%2==0 ); - int delta = nb - data.count()/2; // config memory words contains 1 byte + int delta = nb - data.count()/2; // config memory words tqcontains 1 byte Q_ASSERT( delta>=0 ); Device::Array rdata(delta); uint wordOffset = device().nbWords(Pic::MemoryRangeType::Code) - delta; @@ -87,7 +87,7 @@ bool Icd::DeviceSpecific::doErase(bool) { if ( device().architecture()==Pic::Architecture::P18J ) { // ### also true for others ? Device::Array data(device().nbWords(Pic::MemoryRangeType::Config)); - for (uint i=0; isend("$7F00\x0D", 6); - QString s; + TQString s; if ( !_port->receive(2, s) ) return false; if ( s!="02" ) { - log(Log::LineType::Error, i18n("Unexpected answer ($7F00) from ICD2 (%1).").arg(s)); + log(Log::LineType::Error, i18n("Unexpected answer ($7F00) from ICD2 (%1).").tqarg(s)); return false; } // ?? if ( !command("08", 2) ) return false; if ( _rx.mid(5, 2)!="00" ) { - log(Log::LineType::Error, i18n("Unexpected answer (08) from ICD2 (%1).").arg(_rx)); + log(Log::LineType::Error, i18n("Unexpected answer (08) from ICD2 (%1).").tqarg(_rx)); return false; } return !hasError(); } -bool Icd2::Hardware::sendCommand(const QString &s) +bool Icd2::Hardware::sendCommand(const TQString &s) { //format: - QString cs = s.upper(); - QString tx = "<"; + TQString cs = s.upper(); + TQString tx = "<"; tx += toHex(cs.length() + 6, 2); tx += cs; uchar chk = tx[1].latin1() + tx[2].latin1(); for (uint i=0; isend(a.data(), a.count()); } -bool Icd2::Hardware::receiveResponse(const QString &command, uint responseSize, bool poll) +bool Icd2::Hardware::receiveResponse(const TQString &command, uint responseSize, bool poll) { // format: [LLXX...CC] uint size = responseSize + 8; if ( poll && _port->type()==PortType::USB ) { if ( !static_cast(_port)->poll(size, _rx) ) return false; } else if ( !_port->receive(size, _rx, 180000) ) return false; // is 3 minutes enough ?? (we should really have an abort button here...) - log(Log::DebugLevel::Extra, QString("received answer: '%1'").arg(_rx)); + log(Log::DebugLevel::Extra, TQString("received answer: '%1'").tqarg(_rx)); if ( size!=fromHex(_rx.mid(1, 2), 0) ) { log(Log::LineType::Error, i18n("Received length too short.")); return false; @@ -217,12 +217,12 @@ bool Icd2::Hardware::receiveResponse(const QString &command, uint responseSize, return false; } if ( _rx[0]!='[' || _rx[size-1]!=']' ) { - log(Log::LineType::Error, i18n("Malformed string received \"%1\"").arg(_rx)); + log(Log::LineType::Error, i18n("Malformed string received \"%1\"").tqarg(_rx)); return false; } if ( command.mid(0, 2)!=_rx.mid(3, 2) ) { log(Log::LineType::Error, i18n("Wrong return value (\"%1\"; was expecting \"%2\")") - .arg(_rx.mid(3, 2)).arg(command.mid(0, 2))); + .tqarg(_rx.mid(3, 2)).tqarg(command.mid(0, 2))); return false; } // verify the checksum @@ -235,7 +235,7 @@ bool Icd2::Hardware::receiveResponse(const QString &command, uint responseSize, return true; } -bool Icd2::Hardware::command(const QString &command, uint responseSize) +bool Icd2::Hardware::command(const TQString &command, uint responseSize) { if ( hasError() ) return false; if ( !sendCommand(command) ) return false; @@ -265,7 +265,7 @@ bool Icd2::Hardware::getDebugExecVersion(VersionData &version) bool Icd2::Hardware::setTargetPowerOn(bool on) { - return command(QString("05") + (on ? "FF" : "00"), 0); + return command(TQString("05") + (on ? "FF" : "00"), 0); } bool Icd2::Hardware::readVoltage(Pic::VoltageType type, double &value) @@ -299,7 +299,7 @@ bool Icd2::Hardware::getTargetMode(Pic::TargetMode &tmode) bool Icd2::Hardware::setTargetReset(Pic::ResetMode mode) { - return command(QString("33") + RESET_MODE_VALUES[mode], 0); + return command(TQString("33") + RESET_MODE_VALUES[mode], 0); } bool Icd2::Hardware::selfTest(TestData &test) @@ -314,12 +314,12 @@ bool Icd2::Hardware::readBlock(uint nbBytesWord, uint nbWords, Device::Array &da //qDebug("readBlock %i %s", nbBytesWord, toHex(nbWords, 8).data()); // receive data uint length = 2*nbBytesWord*nbWords+4; - QString s; + TQString s; uint i = 0; while ( itype()==PortType::Serial ? 2*nbBytesWord : 0x100); - uint size = QMIN(maxSize, length-i); - QString tmp; + uint size = TQMIN(maxSize, length-i); + TQString tmp; if ( _port->type()==PortType::USB ) { if ( !static_cast(_port)->dataReceive(size, tmp) ) return false; } else if ( !_port->receive(size, tmp) ) return false; @@ -334,9 +334,9 @@ bool Icd2::Hardware::readBlock(uint nbBytesWord, uint nbWords, Device::Array &da } log(Log::DebugLevel::Max, "received: " + s); data.resize(nbWords); - Q_UINT8 chk = 0; + TQ_UINT8 chk = 0; for (uint i=0; i=0; k--) { @@ -346,9 +346,9 @@ bool Icd2::Hardware::readBlock(uint nbBytesWord, uint nbWords, Device::Array &da } } - QString cs = s.mid(s.length()-3, 2); + TQString cs = s.mid(s.length()-3, 2); if ( chk!=fromHex(cs, 0) ) { - log(Log::LineType::Error, i18n("Bad checksum for read block: %1 (%2 expected).").arg(cs).arg(toHex(chk, 2))); + log(Log::LineType::Error, i18n("Bad checksum for read block: %1 (%2 expected).").tqarg(cs).tqarg(toHex(chk, 2))); return false; } return true; @@ -369,10 +369,10 @@ bool Icd2::Hardware::readMemory(Pic::MemoryRangeType type, uint wordOffset, //qDebug("read size=%s div=%i nbBytes=%i", toHex(size, 8).data(), div, nbBytesWord); data.resize(0); do { - uint size = QMIN(todo, uint(0x1000)); // addresses + uint size = TQMIN(todo, uint(0x1000)); // addresses uint nb = size / inc; // word //qDebug("read %s start=%s size=%s", Pic::MEMORY_RANGE_TYPE_DATA[type].label, toHex(start+offset, 8).data(), toHex(nb, 8).data()); - QString cmd = r + toHex(start+offset, 8) + toHex(nb/div, 8); + TQString cmd = r + toHex(start+offset, 8) + toHex(nb/div, 8); if ( !command(cmd, 0) ) return false; Device::Array pdata; if ( !readBlock(nbBytesWord, nb, pdata) ) return false; @@ -392,13 +392,13 @@ bool Icd2::Hardware::readMemory(Pic::MemoryRangeType type, uint wordOffset, bool Icd2::Hardware::writeBlock(uint nbBytesWord, const Device::Array &data, uint wordIndex, uint nbWords) { - log(Log::DebugLevel::Extra, QString("writeBlock offset:%1 nbWords:%2 (size: %3)").arg(toHex(wordIndex, 8)).arg(toHex(nbWords, 8)).arg(toHex(data.size(), 8))); + log(Log::DebugLevel::Extra, TQString("writeBlock offset:%1 nbWords:%2 (size: %3)").tqarg(toHex(wordIndex, 8)).tqarg(toHex(nbWords, 8)).tqarg(toHex(data.size(), 8))); Q_ASSERT( wordIndex+nbWords<=data.size() ); // prepare data - QString s = "{"; + TQString s = "{"; uchar chk = 0; for (uint i=0; i=0; k--) { //if ( i<10 || i>=nbWords-10 ) qDebug("send: %i-%i %s", i, k, ts.mid(2*k, 2).data()); s += ts.mid(2*k, 2); @@ -414,8 +414,8 @@ bool Icd2::Hardware::writeBlock(uint nbBytesWord, const Device::Array &data, uin while ( idescription().type==PortType::Serial ? 2*nbBytesWord : 0x100); if ( _port->description().type==PortType::Serial && i==0 ) maxSize = 1; - uint size = QMIN(maxSize, s.length()-i); - QByteArray a = toAscii(s); + uint size = TQMIN(maxSize, s.length()-i); + TQByteArray a = toAscii(s); if ( _port->type()==PortType::USB ) { if ( !static_cast(_port)->dataSend(a.data()+i, size) ) return false; } else if ( !_port->send(a.data()+i, size) ) return false; @@ -441,10 +441,10 @@ bool Icd2::Hardware::writeMemory(Pic::MemoryRangeType type, uint wordOffset, con uint index = 0; //qDebug("write todo=%s div=%i nbBytes=%i dataSize=%i", toHex(todo, 8).data(), div, nbBytesWord, data.size()); do { - uint size = QMIN(todo, uint(0x1000)); // address + uint size = TQMIN(todo, uint(0x1000)); // address uint nb = size / inc; // word //qDebug("write %s start=%s nbWords=%s", Pic::MEMORY_RANGE_TYPE_DATA[type].label, toHex(start+offset, 8).data(), toHex(nb, 8).data()); - QString cmd = w + toHex(start+offset+index, 8) + toHex(nb/div, 8); + TQString cmd = w + toHex(start+offset+index, 8) + toHex(nb/div, 8); if ( !command(cmd, 0) ) return false; if ( !writeBlock(nbBytesWord, data, index/inc, nb) ) return false; if ( !receiveResponse(cmd, 0, false) ) return false; @@ -482,12 +482,12 @@ bool Icd2::Hardware::resumeRun() bool Icd2::Hardware::setWriteMode(Pic::WriteMode mode) { - return command(QString("4B") + WRITE_MODE_VALUES[mode], 0); + return command(TQString("4B") + WRITE_MODE_VALUES[mode], 0); } bool Icd2::Hardware::writeRegister(Address address, BitValue value, uint nbBytes) { - QString cmd = "1B" + toHex(address, 8) + toHex(nbBytes, 8); + TQString cmd = "1B" + toHex(address, 8) + toHex(nbBytes, 8); if ( !command(cmd, 0) ) return false; Device::Array data(nbBytes); for (uint i=0; i &addresses) +bool Icd2::Debugger::setBreakpoints(const TQValueList

&addresses) { if ( addresses.count()==0 ) return specific()->setBreakpoint(Address()); for (uint i=0; inbCharsAddress()))); + log(Log::DebugLevel::Normal, TQString("Set breakpoint at %1").tqarg(toHexLabel(addresses[i], device()->nbCharsAddress()))); if ( !specific()->setBreakpoint(addresses[i]) ) return false; } return true; @@ -97,14 +97,14 @@ bool Icd2::Debugger::readRegister(const Register::TypeData &data, BitValue &valu { if ( data.type()==Register::Special ) { if ( data.name()=="WREG" ) return hardware()->readRegister(specific()->addressWREG(), value, 1); - if ( data.name()=="PC" ) { value = hardware()->getProgramCounter().maskWith(specific()->maskPC()); return !hasError(); } + if ( data.name()=="PC" ) { value = hardware()->getProgramCounter().tqmaskWith(specific()->tqmaskPC()); return !hasError(); } Q_ASSERT(false); return true; } - QString name = device()->registersData().sfrNames[data.address()]; + TQString name = device()->registersData().sfrNames[data.address()]; if ( name=="WREG" ) return hardware()->readRegister(specific()->addressWREG(), value, 1); - if ( name=="PCL" ) { value = hardware()->getProgramCounter().maskWith(specific()->maskPC()).byte(0); return !hasError(); } - if ( name=="PCLATH" ) { value = hardware()->getProgramCounter().maskWith(specific()->maskPC()).byte(1); return !hasError(); } + if ( name=="PCL" ) { value = hardware()->getProgramCounter().tqmaskWith(specific()->tqmaskPC()).byte(0); return !hasError(); } + if ( name=="PCLATH" ) { value = hardware()->getProgramCounter().tqmaskWith(specific()->tqmaskPC()).byte(1); return !hasError(); } return hardware()->readRegister(specific()->addressRegister(data.address()), value, 1); } @@ -115,7 +115,7 @@ bool Icd2::Debugger::writeRegister(const Register::TypeData &data, BitValue valu Q_ASSERT(false); return true; } - QString name = device()->registersData().sfrNames[data.address()]; + TQString name = device()->registersData().sfrNames[data.address()]; if ( name=="WREG" ) return hardware()->writeRegister(specific()->addressWREG(), value, 1); return hardware()->writeRegister(specific()->addressRegister(data.address()), value, 1); } @@ -143,29 +143,29 @@ bool Icd2::DebugProgrammer::internalSetupHardware() return false; } uint reservedBank = 0; - QString filename; + TQString filename; if ( device()->is18Family() ) { Debugger *debug = static_cast(debugger()); reservedBank = static_cast(debug->specific())->reservedBank(); - filename = QString("de18F_BANK%1.hex").arg(QString(toString(NumberBase::Dec, reservedBank, 2))); - } else filename = QString("de%1.hex").arg(fdata.debugExec); + filename = TQString("de18F_BANK%1.hex").tqarg(TQString(toString(NumberBase::Dec, reservedBank, 2))); + } else filename = TQString("de%1.hex").tqarg(fdata.debugExec); PURL::Url url = dir.findMatchingFilename(filename); - log(Log::DebugLevel::Normal, QString(" Debug executive file: %1").arg(url.pretty())); + log(Log::DebugLevel::Normal, TQString(" Debug executive file: %1").tqarg(url.pretty())); if ( !url.exists() ) { - log(Log::LineType::Error, i18n("Could not find debug executive file \"%1\".").arg(url.pretty())); + log(Log::LineType::Error, i18n("Could not find debug executive file \"%1\".").tqarg(url.pretty())); return false; } // upload hex file Log::StringView sview; PURL::File file(url, sview); if ( !file.openForRead() ) { - log(Log::LineType::Error, i18n("Could not open firmware file \"%1\".").arg(url.pretty())); + log(Log::LineType::Error, i18n("Could not open firmware file \"%1\".").tqarg(url.pretty())); return false; } - QStringList errors; + TQStringList errors; HexBuffer hbuffer; if ( !hbuffer.load(file.stream(), errors) ) { - log(Log::LineType::Error, i18n("Could not read debug executive file \"%1\": %2.").arg(url.pretty()).arg(errors[0])); + log(Log::LineType::Error, i18n("Could not read debug executive file \"%1\": %2.").tqarg(url.pretty()).tqarg(errors[0])); return false; } uint nbWords = device()->nbWords(Pic::MemoryRangeType::Code); @@ -173,8 +173,8 @@ bool Icd2::DebugProgrammer::internalSetupHardware() if ( fdata.debugExecOffset!=0 && fdata.debugExecOffset!=offset ) for (uint i=0; i<0x100; i++) hbuffer.insert(offset+i, hbuffer[fdata.debugExecOffset+i]); Pic::Memory::WarningTypes warningTypes; - QStringList warnings; - QMap inRange; + TQStringList warnings; + TQMap inRange; Pic::Memory memory(*device()); memory.fromHexBuffer(Pic::MemoryRangeType::Code, hbuffer, warningTypes, warnings, inRange); _deArray = memory.arrayForWriting(Pic::MemoryRangeType::Code); @@ -199,7 +199,7 @@ bool Icd2::DebugProgrammer::internalSetupHardware() _deStart = specific()->findNonMaskStart(Pic::MemoryRangeType::Code, _deArray); _deEnd = specific()->findNonMaskEnd(Pic::MemoryRangeType::Code, _deArray); } - log(Log::DebugLevel::Extra, QString("debug executive: \"%1\" %2:%3").arg(url.pretty()).arg(toHexLabel(_deStart, 4)).arg(toHexLabel(_deEnd, 4))); + log(Log::DebugLevel::Extra, TQString("debug executive: \"%1\" %2:%3").tqarg(url.pretty()).tqarg(toHexLabel(_deStart, 4)).tqarg(toHexLabel(_deEnd, 4))); return Icd2::ProgrammerBase::internalSetupHardware(); } @@ -251,9 +251,9 @@ bool Icd2::DebugProgrammer::writeDebugExecutive() uint inc = device()->addressIncrement(Pic::MemoryRangeType::Code); Address address = device()->range(Pic::MemoryRangeType::Code).start + inc * (_deStart + i); log(Log::LineType::Error, i18n("Device memory doesn't match debug executive (at address %1: reading %2 and expecting %3).") - .arg(toHexLabel(address, device()->nbCharsAddress())) - .arg(toHexLabel(data[i], device()->nbCharsWord(Pic::MemoryRangeType::Code))) - .arg(toHexLabel(_deArray[_deStart+i], device()->nbCharsWord(Pic::MemoryRangeType::Code)))); + .tqarg(toHexLabel(address, device()->nbCharsAddress())) + .tqarg(toHexLabel(data[i], device()->nbCharsWord(Pic::MemoryRangeType::Code))) + .tqarg(toHexLabel(_deArray[_deStart+i], device()->nbCharsWord(Pic::MemoryRangeType::Code)))); return false; } return true; @@ -265,7 +265,7 @@ bool Icd2::DebugProgrammer::doProgram(const Device::Memory &memory, const Device if ( !doConnectDevice() ) return false; _progressMonitor.startNextTask(); // probably needed for all devices that don't have a "erase and write" mode - if ( range.all() && FAMILY_DATA[family(device()->name())].debugExec==QString("16F7X7") ) { + if ( range.all() && FAMILY_DATA[family(device()->name())].debugExec==TQString("16F7X7") ) { Pic::Memory dmemory(*device()); dmemory.setWord(Pic::MemoryRangeType::Code, 0, 0x0028); dmemory.setWord(Pic::MemoryRangeType::Code, 1, 0x0030); @@ -290,7 +290,7 @@ bool Icd2::DebugProgrammer::programAll(const Pic::Memory &mem) if ( !programAndVerifyRange(Pic::MemoryRangeType::UserId, memory) ) return false; if ( device()->is18Family() ) { if ( !hardware()->command("0C00", 0) ) return false; // #### ?? - QString com = "42" + toHex(0xFB5, 8) + toHex(1, 8); // write RSBUG (?) + TQString com = "42" + toHex(0xFB5, 8) + toHex(1, 8); // write RSBUG (?) if ( !hardware()->command(com, 0) ) return false; if ( !hardware()->command("0C01", 0) ) return false; // #### ?? } @@ -311,12 +311,12 @@ bool Icd2::DebugProgrammer::internalRead(Device::Memory *mem, const Device::Memo bool Icd2::DebugProgrammer::readDebugExecutiveVersion() { if ( !hardware()->getDebugExecVersion(_debugExecutiveVersion) ) return false; - log(Log::LineType::Information, i18n(" Debug executive version: %1").arg(_debugExecutiveVersion.pretty())); + log(Log::LineType::Information, i18n(" Debug executive version: %1").tqarg(_debugExecutiveVersion.pretty())); return true; } //---------------------------------------------------------------------------- -void Icd2::DebuggerGroup::addDevice(const QString &name, const Device::Data *ddata, ::Group::Support) +void Icd2::DebuggerGroup::addDevice(const TQString &name, const Device::Data *ddata, ::Group::Support) { if ( FAMILY_DATA[family(name)].debugExec==0 ) return; Group::addDevice(name, ddata, data(name).debugSupport); @@ -326,7 +326,7 @@ void Icd2::DebuggerGroup::addDevice(const QString &name, const Device::Data *dda { const Pic::Data *data = static_cast< ::Debugger::PicBase &>(base).device(); if ( data==0 ) return 0; - QString debugExec = FAMILY_DATA[family(data->name())].debugExec; + TQString debugExec = FAMILY_DATA[family(data->name())].debugExec; switch (data->architecture().type()) { case Pic::Architecture::P16X: if ( debugExec=="16F872" ) return new P16F872DebuggerSpecific(base); diff --git a/src/progs/icd2/base/icd2_debug.h b/src/progs/icd2/base/icd2_debug.h index bd2a6fe..7042a22 100644 --- a/src/progs/icd2/base/icd2_debug.h +++ b/src/progs/icd2/base/icd2_debug.h @@ -20,6 +20,7 @@ class DebuggerSpecific; class DebugProgrammer : public ProgrammerBase { Q_OBJECT + TQ_OBJECT public: DebugProgrammer(const ::Programmer::Group &group, const Pic::Data *data); bool readDebugExecutiveVersion(); @@ -46,7 +47,7 @@ class Debugger : public ::Debugger::PicBase { public: Debugger(DebugProgrammer &programmer) : ::Debugger::PicBase(programmer) {} - virtual bool setBreakpoints(const QValueList
&addresses); + virtual bool setBreakpoints(const TQValueList
&addresses); Hardware *hardware() { return static_cast(_programmer.hardware()); } DebugProgrammer &programmer() { return static_cast(_programmer); } DebuggerSpecific *specific(); @@ -72,13 +73,13 @@ private: class DebuggerGroup : public Group { public: - virtual QString name() const { return "icd2_debugger"; } - virtual QString label() const { return i18n("ICD2 Debugger"); } + virtual TQString name() const { return "icd2_debugger"; } + virtual TQString label() const { return i18n("ICD2 Debugger"); } virtual ::Programmer::Properties properties() const { return Group::properties() | ::Programmer::Debugger; } virtual uint maxNbBreakpoints(const Device::Data *) const { return 1; } protected: - virtual void addDevice(const QString &name, const Device::Data *data, ::Group::Support support); + virtual void addDevice(const TQString &name, const Device::Data *data, ::Group::Support support); virtual ::Programmer::Base *createBase(const Device::Data *data) const { return new DebugProgrammer(*this, static_cast(data)); } virtual ::Debugger::Base *createDebuggerBase(::Programmer::Base &base) const { return new Debugger(static_cast(base)); } virtual ::Debugger::Specific *createDebuggerSpecific(::Debugger::Base &base) const; diff --git a/src/progs/icd2/base/icd2_debug_specific.cpp b/src/progs/icd2/base/icd2_debug_specific.cpp index 56cc178..61bc373 100644 --- a/src/progs/icd2/base/icd2_debug_specific.cpp +++ b/src/progs/icd2/base/icd2_debug_specific.cpp @@ -19,7 +19,7 @@ Address Icd2::P16FDebuggerSpecific::addressWREG() const Address Icd2::P16FDebuggerSpecific::addressRegister(Address address) const { - QString name = device()->registersData().sfrNames[address]; + TQString name = device()->registersData().sfrNames[address]; if ( name=="FSR" ) return FAMILY_DATA[family(device()->name())].fsr; if ( name=="STATUS" ) return FAMILY_DATA[family(device()->name())].status; return address; @@ -41,7 +41,7 @@ bool Icd2::P16FDebuggerSpecific::setBreakpoint(Address address) bool Icd2::P16FDebuggerSpecific::readBreakpoint(BitValue &value) { if ( !hardware()->readRegister(0x18E, value, 2) ) return false; - value = value.maskWith(0x1FFF); + value = value.tqmaskWith(0x1FFF); return true; } @@ -50,7 +50,7 @@ bool Icd2::P16FDebuggerSpecific::beginInit(Device::Array *saved) if ( !hardware()->setTargetReset(Pic::ResetHeld) ) return false; double vdd; if ( !hardware()->readVoltage(Pic::TargetVdd, vdd) ) return false; - log(Log::DebugLevel::Normal, QString(" Target Vdd: %1 V").arg(vdd)); + log(Log::DebugLevel::Normal, TQString(" Target Vdd: %1 V").tqarg(vdd)); if (saved) { saved->resize(1); @@ -73,14 +73,14 @@ bool Icd2::P16FDebuggerSpecific::endInit(BitValue expectedPC) //log(Log::LineType::Information, i18n("Detected custom ICD2")); } if ( value!=expectedPC ) { - log(Log::LineType::Error, i18n(" PC is not at address %1 (%2)").arg(toHexLabel(expectedPC, 4)).arg(toHexLabel(value, 4))); + log(Log::LineType::Error, i18n(" PC is not at address %1 (%2)").tqarg(toHexLabel(expectedPC, 4)).tqarg(toHexLabel(value, 4))); return false; } if ( !setBreakpoint(0x0000) ) return false; if ( !base().update() ) return false; if ( base().pc()!=expectedPC ) { - log(Log::LineType::Error, i18n(" PC is not at address %1 (%2)").arg(toHexLabel(expectedPC, 4)).arg(toHexLabel(base().pc(), 4))); + log(Log::LineType::Error, i18n(" PC is not at address %1 (%2)").tqarg(toHexLabel(expectedPC, 4)).tqarg(toHexLabel(base().pc(), 4))); return false; } return true; @@ -163,7 +163,7 @@ bool Icd2::P16F7X7DebuggerSpecific::init(bool last) log(Log::DebugLevel::Normal, "Probably detected custom ICD2"); } if ( value!=expectedPC ) - log(Log::DebugLevel::Normal, i18n(" PC is not at address %1 (%2)").arg(toHexLabel(expectedPC, 4)).arg(toHexLabel(value, 4))); + log(Log::DebugLevel::Normal, i18n(" PC is not at address %1 (%2)").tqarg(toHexLabel(expectedPC, 4)).tqarg(toHexLabel(value, 4))); if ( !setBreakpoint(0x0000) ) return false; if ( !base().update() ) return false; @@ -205,7 +205,7 @@ Address Icd2::P18FDebuggerSpecific::addressWREG()const Address Icd2::P18FDebuggerSpecific::addressRegister(Address address) const { - QString name = device()->registersData().sfrNames[address]; + TQString name = device()->registersData().sfrNames[address]; if ( name=="PCLATU" ) return reservedRegisterOffset() | 0x0F4; if ( name=="PCLATH" ) return reservedRegisterOffset() | 0x0F5; if ( name=="FSR0H" ) return reservedRegisterOffset() | 0x0FB; @@ -241,7 +241,7 @@ bool Icd2::P18FDebuggerSpecific::reset() log(Log::LineType::Information, i18n("Detected custom ICD2")); } if ( base().pc()!=expectedPC ) { - log(Log::LineType::Error, i18n(" PC is not at address %1 (%2)").arg(toHexLabel(expectedPC, 4)).arg(toHexLabel(base().pc(), 4))); + log(Log::LineType::Error, i18n(" PC is not at address %1 (%2)").tqarg(toHexLabel(expectedPC, 4)).tqarg(toHexLabel(base().pc(), 4))); return false; } return true; diff --git a/src/progs/icd2/base/icd2_debug_specific.h b/src/progs/icd2/base/icd2_debug_specific.h index d14887b..830ab0f 100644 --- a/src/progs/icd2/base/icd2_debug_specific.h +++ b/src/progs/icd2/base/icd2_debug_specific.h @@ -25,7 +25,7 @@ public: DebugProgrammer &programmer() { return base().programmer(); } ::Debugger::PicSpecific *deviceSpecific() { return base().deviceSpecific(); } virtual Address addressWREG() const = 0; - virtual BitValue maskPC() const = 0; + virtual BitValue tqmaskPC() const = 0; virtual Address addressRegister(Address address) const = 0; virtual bool setBreakpoint(Address address) = 0; virtual bool readBreakpoint(BitValue &value) = 0; @@ -42,7 +42,7 @@ public: virtual BitValue writeMaskBreakpointRegister() const { return 0x8000; } virtual BitValue readMaskBreakpointRegister() const { return 0x1FFF; } virtual Address addressWREG() const; - virtual BitValue maskPC() const { return 0x1FFF; } + virtual BitValue tqmaskPC() const { return 0x1FFF; } virtual Address addressRegister(Address address) const; virtual bool setBreakpoint(Address address); virtual bool readBreakpoint(BitValue &value); @@ -80,7 +80,7 @@ class P18FDebuggerSpecific : public DebuggerSpecific public: P18FDebuggerSpecific(::Debugger::Base &base); virtual Address addressWREG() const; - virtual BitValue maskPC() const { return 0xFFFF; } + virtual BitValue tqmaskPC() const { return 0xFFFF; } virtual Address addressRegister(Address address) const; virtual bool setBreakpoint(Address address); virtual bool readBreakpoint(BitValue &value); diff --git a/src/progs/icd2/base/icd2_prog.cpp b/src/progs/icd2/base/icd2_prog.cpp index 7b2a59b..dbea1d3 100644 --- a/src/progs/icd2/base/icd2_prog.cpp +++ b/src/progs/icd2/base/icd2_prog.cpp @@ -47,13 +47,13 @@ bool Icd2::ProgrammerBase::selfTest(bool ask) log(Log::DebugLevel::Normal, " Self-test"); if ( !hardware()->selfTest(_testData) ) return false; if ( !_testData.pass() ) { - QString s; + TQString s; for (uint i=0; iname())]; - log(Log::DebugLevel::Normal, QString(" Firmware id is %1 and we want %2").arg(_firmwareId).arg(fdata.efid)); + log(Log::DebugLevel::Normal, TQString(" Firmware id is %1 and we want %2").tqarg(_firmwareId).tqarg(fdata.efid)); if ( fdata.efid==_firmwareId ) return true; log(Log::LineType::Information, i18n(" Incorrect firmware loaded.")); // find firmware file PURL::Directory dir = firmwareDirectory(); if ( dir.isEmpty() ) return false; - QString nameFilter = "ICD" + QString::number(fdata.efid).rightJustify(2, '0') + "??????.hex"; - QStringList files = dir.files(nameFilter); + TQString nameFilter = "ICD" + TQString::number(fdata.efid).rightJustify(2, '0') + "??????.hex"; + TQStringList files = dir.files(nameFilter); if ( files.isEmpty() ) { - log(Log::LineType::Error, i18n("Could not find firmware file \"%1\" in directory \"%2\".").arg(nameFilter).arg(dir.path())); + log(Log::LineType::Error, i18n("Could not find firmware file \"%1\" in directory \"%2\".").tqarg(nameFilter).tqarg(dir.path())); return false; } // upload hex file PURL::Url url(dir, files[files.count()-1]); - log(Log::DebugLevel::Normal, QString(" Firmware file: %1").arg(url.pretty())); + log(Log::DebugLevel::Normal, TQString(" Firmware file: %1").tqarg(url.pretty())); Log::StringView sview; PURL::File file(url, sview); if ( !file.openForRead() ) { - log(Log::LineType::Error, i18n("Could not open firmware file \"%1\".").arg(url.pretty())); + log(Log::LineType::Error, i18n("Could not open firmware file \"%1\".").tqarg(url.pretty())); return false; } if ( !doUploadFirmware(file) ) return false; diff --git a/src/progs/icd2/base/icd2_prog.h b/src/progs/icd2/base/icd2_prog.h index e8be727..14df438 100644 --- a/src/progs/icd2/base/icd2_prog.h +++ b/src/progs/icd2/base/icd2_prog.h @@ -22,6 +22,7 @@ class Hardware; class ProgrammerBase : public Icd::ProgrammerBase { Q_OBJECT + TQ_OBJECT public: ProgrammerBase(const Programmer::Group &group, const Pic::Data *data, const char *name) : Icd::ProgrammerBase(group, data, name) {} @@ -48,6 +49,7 @@ private: class Programmer : public ProgrammerBase { Q_OBJECT + TQ_OBJECT public: Programmer(const ::Programmer::Group &group, const Pic::Data *data); }; @@ -56,7 +58,7 @@ public: class Group : public Icd::Group { public: - virtual QString xmlName() const { return "icd2"; } + virtual TQString xmlName() const { return "icd2"; } virtual ::Programmer::Properties properties() const; virtual ::Programmer::TargetPowerMode targetPowerMode() const { return ::Programmer::TargetPowerModeFromConfig; } virtual bool isPortSupported(PortType type) const { return ( type==PortType::Serial || type==PortType::USB ); } @@ -72,8 +74,8 @@ protected: class ProgrammerGroup : public Group { public: - virtual QString name() const { return "icd2"; } - virtual QString label() const { return i18n("ICD2 Programmer"); } + virtual TQString name() const { return "icd2"; } + virtual TQString label() const { return i18n("ICD2 Programmer"); } protected: virtual ::Programmer::Base *createBase(const Device::Data *data) const { return new Programmer(*this, static_cast(data)); } diff --git a/src/progs/icd2/base/icd2_serial.cpp b/src/progs/icd2/base/icd2_serial.cpp index 1ab738c..7f276f0 100644 --- a/src/progs/icd2/base/icd2_serial.cpp +++ b/src/progs/icd2/base/icd2_serial.cpp @@ -13,7 +13,7 @@ #include "common/common/misc.h" //----------------------------------------------------------------------------- -Icd2::SerialPort::SerialPort(const QString &device, Log::Base &log) +Icd2::SerialPort::SerialPort(const TQString &device, Log::Base &log) : Port::Serial(device, NeedDrain | NeedFlush, log) {} @@ -24,23 +24,23 @@ bool Icd2::SerialPort::open(Speed speed) } //----------------------------------------------------------------------------- -Icd2::SerialHardware::SerialHardware(::Programmer::Base &base, const QString &portDevice) +Icd2::SerialHardware::SerialHardware(::Programmer::Base &base, const TQString &portDevice) : Hardware(base, new SerialPort(portDevice, base)) {} -bool Icd2::SerialHardware::internalConnect(const QString &mode) +bool Icd2::SerialHardware::internalConnect(const TQString &mode) { if ( !static_cast(_port)->open(Port::Serial::S19200) ) return false; if ( !reset() ) return false; if ( !_port->send("Z", 1) ) return false; - QString s; + TQString s; if ( !_port->receive(4, s) ) return false; if ( !reset() ) return false; - QByteArray a = toAscii(mode); + TQByteArray a = toAscii(mode); if ( !_port->send(a.data(), a.count()) ) return false; if ( !_port->receive(1, s) ) return false; if ( s.upper()!=mode ) { - log(Log::LineType::Error, i18n("Failed to set port mode to '%1'.").arg(mode)); + log(Log::LineType::Error, i18n("Failed to set port mode to '%1'.").tqarg(mode)); return false; } //log(Log::Debug, "set fast speed"); diff --git a/src/progs/icd2/base/icd2_serial.h b/src/progs/icd2/base/icd2_serial.h index 546e7b3..0291f49 100644 --- a/src/progs/icd2/base/icd2_serial.h +++ b/src/progs/icd2/base/icd2_serial.h @@ -20,7 +20,7 @@ namespace Icd2 class SerialPort : public Port::Serial { public: - SerialPort(const QString &portDevice, Log::Base &log); + SerialPort(const TQString &portDevice, Log::Base &log); bool open(Speed speed); }; @@ -28,12 +28,12 @@ public: class SerialHardware : public Hardware { public: - SerialHardware(::Programmer::Base &base, const QString &portDevice); + SerialHardware(::Programmer::Base &base, const TQString &portDevice); private: bool setFastSpeed(); bool reset(); - virtual bool internalConnect(const QString &mode); + virtual bool internalConnect(const TQString &mode); }; } // namespace diff --git a/src/progs/icd2/base/icd2_usb.cpp b/src/progs/icd2/base/icd2_usb.cpp index 945ef6f..7cc2458 100644 --- a/src/progs/icd2/base/icd2_usb.cpp +++ b/src/progs/icd2/base/icd2_usb.cpp @@ -27,7 +27,7 @@ Icd2::USBPort::USBPort(uint deviceId, Log::Base &log) bool Icd2::USBPort::doSequence(SequenceType type, char *data, uint size) { - QByteArray tx(0x12); + TQByteArray tx(0x12); for (uint i=0; i a; + TQMemArray a; if ( !poll(size, a) ) return false; s.fill(0, size); for (uint i=0; i &a) +bool Icd2::USBPort::poll(uint size, TQMemArray &a) { a.resize(size); for (;;) { @@ -128,7 +128,7 @@ bool Icd2::USBPort::poll(uint size, QMemArray &a) if ( !doSequence(Poll, (char *)a.data(), size) ) return false; if (_poll) break; } - //log(Log::DebugLevel::Max, QString("Receiced: \"%1\"").arg(toPrintable((const char *)a.data(), size))); + //log(Log::DebugLevel::Max, TQString("Receiced: \"%1\"").tqarg(toPrintable((const char *)a.data(), size))); return true; } @@ -138,7 +138,7 @@ bool Icd2::USBPort::dataSend(const char *data, uint size) return Port::USB::send(data, size); } -bool Icd2::USBPort::dataReceive(uint size, QString &s) +bool Icd2::USBPort::dataReceive(uint size, TQString &s) { _dataSend = true; return Port::USB::receive(size, s); @@ -149,10 +149,10 @@ Icd2::USBHardware::USBHardware(::Programmer::Base &base) : Hardware(base, new USBPort(ID_CLIENT, base)) {} -bool Icd2::USBHardware::internalConnect(const QString &mode) +bool Icd2::USBHardware::internalConnect(const TQString &mode) { // load control messages for USB device if needed - log(Log::DebugLevel::Extra, QString("need firmware ? %1").arg(USBPort::findDevice(Microchip::VENDOR_ID, ID_FIRMWARE)!=0)); + log(Log::DebugLevel::Extra, TQString("need firmware ? %1").tqarg(USBPort::findDevice(Microchip::VENDOR_ID, ID_FIRMWARE)!=0)); if ( Port::USB::findDevice(Microchip::VENDOR_ID, ID_FIRMWARE) ) { USBPort port(ID_FIRMWARE, *this); if ( !port.open() ) return false; @@ -163,7 +163,7 @@ bool Icd2::USBHardware::internalConnect(const QString &mode) } port.close(); for (uint i=0; i<10; i++) { - log(Log::DebugLevel::Extra, QString("client here ? %1").arg(USBPort::findDevice(Microchip::VENDOR_ID, ID_CLIENT)!=0)); + log(Log::DebugLevel::Extra, TQString("client here ? %1").tqarg(USBPort::findDevice(Microchip::VENDOR_ID, ID_CLIENT)!=0)); if ( Port::USB::findDevice(Microchip::VENDOR_ID, ID_CLIENT) ) break; Port::msleep(1000); } diff --git a/src/progs/icd2/base/icd2_usb.h b/src/progs/icd2/base/icd2_usb.h index c2677a6..30d9065 100644 --- a/src/progs/icd2/base/icd2_usb.h +++ b/src/progs/icd2/base/icd2_usb.h @@ -22,11 +22,11 @@ class USBPort : public Port::USB { public: USBPort(uint deviceId, Log::Base &log); - bool connectDevice(const QString &mode); - bool poll(uint size, QString &s); - bool poll(uint size, QMemArray &data); + bool connectDevice(const TQString &mode); + bool poll(uint size, TQString &s); + bool poll(uint size, TQMemArray &data); bool dataSend(const char *data, uint size); - bool dataReceive(uint size, QString &s); + bool dataReceive(uint size, TQString &s); private: uchar _seqnum; @@ -55,7 +55,7 @@ private: enum { ID_FIRMWARE = 0x8000, // ICD2 id before usb firmware is transmitted ID_CLIENT = 0x8001 // ICD2 id after firmware is transmitted }; - virtual bool internalConnect(const QString &mode); + virtual bool internalConnect(const TQString &mode); }; } // namespace diff --git a/src/progs/icd2/base/icd_prog.cpp b/src/progs/icd2/base/icd_prog.cpp index 6fadf06..00f7c25 100644 --- a/src/progs/icd2/base/icd_prog.cpp +++ b/src/progs/icd2/base/icd_prog.cpp @@ -16,10 +16,10 @@ bool Icd::ProgrammerBase::doUploadFirmware(PURL::File &file) { const Device::Data &data = *Device::lister().data("16F876"); Pic::Memory memory(static_cast(data)); - QStringList errors, warnings; + TQStringList errors, warnings; Pic::Memory::WarningTypes warningTypes; if ( !memory.load(file.stream(), errors, warningTypes, warnings) ) { - log(Log::LineType::Error, i18n("Could not read firmware hex file \"%1\": %2.").arg(file.url().pretty()).arg(errors[0])); + log(Log::LineType::Error, i18n("Could not read firmware hex file \"%1\": %2.").tqarg(file.url().pretty()).tqarg(errors[0])); return false; } if ( warningTypes!=Pic::Memory::NoWarning ) { diff --git a/src/progs/icd2/base/icd_prog.h b/src/progs/icd2/base/icd_prog.h index ba6d9bb..8a0ab2e 100644 --- a/src/progs/icd2/base/icd_prog.h +++ b/src/progs/icd2/base/icd_prog.h @@ -19,6 +19,7 @@ namespace Icd class ProgrammerBase : public ::Programmer::PicBase { Q_OBJECT + TQ_OBJECT public: ProgrammerBase(const Programmer::Group &group, const Pic::Data *data, const char *name) : ::Programmer::PicBase(group, data, name) {} diff --git a/src/progs/icd2/base/microchip.h b/src/progs/icd2/base/microchip.h index 627b2ad..20ac4ed 100644 --- a/src/progs/icd2/base/microchip.h +++ b/src/progs/icd2/base/microchip.h @@ -9,7 +9,7 @@ #ifndef MICROCHIP_H #define MICROCHIP_H -#include +#include namespace Microchip { diff --git a/src/progs/icd2/gui/icd2_group_ui.cpp b/src/progs/icd2/gui/icd2_group_ui.cpp index 6f00788..b8d71df 100644 --- a/src/progs/icd2/gui/icd2_group_ui.cpp +++ b/src/progs/icd2/gui/icd2_group_ui.cpp @@ -14,38 +14,38 @@ #include "progs/icd2/base/icd2_debug.h" //---------------------------------------------------------------------------- -Icd2::AdvancedDialog::AdvancedDialog(ProgrammerBase &base, QWidget *parent) - : ::Programmer::PicAdvancedDialog(base, parent, "icd2_advanced_dialog") +Icd2::AdvancedDialog::AdvancedDialog(ProgrammerBase &base, TQWidget *tqparent) + : ::Programmer::PicAdvancedDialog(base, tqparent, "icd2_advanced_dialog") { uint row = _firmwareContainer->numRows(); - QLabel *label = new QLabel(i18n("Id:"), _firmwareContainer); + TQLabel *label = new TQLabel(i18n("Id:"), _firmwareContainer); _firmwareContainer->addWidget(label, row,row, 0,0); - _firmwareIdLabel = new QLabel(_firmwareContainer); + _firmwareIdLabel = new TQLabel(_firmwareContainer); _firmwareContainer->addWidget(_firmwareIdLabel, row,row, 1,1); row++; row = _programmerContainer->numRows(); if ( base.group().properties() & ::Programmer::Debugger ) { - ButtonContainer *container = new ::Programmer::ButtonContainer(i18n("Debug Executive"), this, SLOT(updateDebugExecutive()), _programmerContainer); + ButtonContainer *container = new ::Programmer::ButtonContainer(i18n("Debug Executive"), TQT_TQOBJECT(this), TQT_SLOT(updateDebugExecutive()), _programmerContainer); _programmerContainer->addWidget(container, row,row, 0,1); - label = new QLabel(i18n("Version:"), container); + label = new TQLabel(i18n("Version:"), container); container->addWidget(label, 1,1, 0,0); - _debugExecLabel = new QLabel(container); + _debugExecLabel = new TQLabel(container); container->addWidget(_debugExecLabel, 1,1, 1,1); row++; } else _debugExecLabel = 0; for (uint i=0; iaddWidget(label, 1+i,1+i, 0,0); - _tests[i] = new QLabel(_selfTestContainer); + _tests[i] = new TQLabel(_selfTestContainer); _selfTestContainer->addWidget(_tests[i], 1+i,1+i, 1,1); } } void Icd2::AdvancedDialog::updateDebugExecutive() { - ::BusyCursor bc; + ::PBusyCursor bc; if ( ensureConnected() ) { Pic::TargetMode mode; if ( !base().getTargetMode(mode) ) return; @@ -70,12 +70,12 @@ void Icd2::AdvancedDialog::updateDisplay() } //---------------------------------------------------------------------------- -::Programmer::ConfigWidget *Icd2::GroupUI::createConfigWidget(QWidget *parent) const +::Programmer::ConfigWidget *Icd2::GroupUI::createConfigWidget(TQWidget *tqparent) const { - return new ::Programmer::ConfigWidget(static_cast(group()), parent); + return new ::Programmer::ConfigWidget(static_cast(group()), tqparent); } -::Programmer::AdvancedDialog *Icd2::GroupUI::createAdvancedDialog(::Programmer::Base &base, QWidget *parent) const +::Programmer::AdvancedDialog *Icd2::GroupUI::createAdvancedDialog(::Programmer::Base &base, TQWidget *tqparent) const { - return new AdvancedDialog(static_cast(base), parent); + return new AdvancedDialog(static_cast(base), tqparent); } diff --git a/src/progs/icd2/gui/icd2_group_ui.h b/src/progs/icd2/gui/icd2_group_ui.h index 93d66e7..14c0fdb 100644 --- a/src/progs/icd2/gui/icd2_group_ui.h +++ b/src/progs/icd2/gui/icd2_group_ui.h @@ -21,16 +21,17 @@ class Group; class AdvancedDialog : public ::Programmer::PicAdvancedDialog { Q_OBJECT + TQ_OBJECT public: - AdvancedDialog(ProgrammerBase &base, QWidget *parent); + AdvancedDialog(ProgrammerBase &base, TQWidget *tqparent); virtual void updateDisplay(); private slots: void updateDebugExecutive(); private: - QLabel *_firmwareIdLabel, *_debugExecLabel; - QLabel *_tests[TestData::Nb_VoltageTypes]; + TQLabel *_firmwareIdLabel, *_debugExecLabel; + TQLabel *_tests[TestData::Nb_VoltageTypes]; ProgrammerBase &base() { return static_cast(_base); } }; @@ -38,9 +39,9 @@ private: class GroupUI : public ::Programmer::GroupUI { public: - virtual ::Programmer::ConfigWidget *createConfigWidget(QWidget *parent) const; + virtual ::Programmer::ConfigWidget *createConfigWidget(TQWidget *tqparent) const; virtual bool hasAdvancedDialog() const { return true; } - virtual ::Programmer::AdvancedDialog *createAdvancedDialog(::Programmer::Base &base, QWidget *parent) const; + virtual ::Programmer::AdvancedDialog *createAdvancedDialog(::Programmer::Base &base, TQWidget *tqparent) const; }; } // namespace diff --git a/src/progs/icd2/xml/xml_icd2_parser.cpp b/src/progs/icd2/xml/xml_icd2_parser.cpp index 7ce2ad9..06eed27 100644 --- a/src/progs/icd2/xml/xml_icd2_parser.cpp +++ b/src/progs/icd2/xml/xml_icd2_parser.cpp @@ -19,21 +19,21 @@ public: XmlToData() : Programmer::XmlToData("icd2", "Icd2") {} private: - virtual uint familyIndex(const QString &family) const; - virtual void parseData(QDomElement element, Data &data); - virtual void outputData(const Data &data, QTextStream &s) const; + virtual uint familyIndex(const TQString &family) const; + virtual void parseData(TQDomElement element, Data &data); + virtual void outputData(const Data &data, TQTextStream &s) const; }; -uint Icd2::XmlToData::familyIndex(const QString &family) const +uint Icd2::XmlToData::familyIndex(const TQString &family) const { uint i = 0; for (; Icd2::FAMILY_DATA[i].efid!=0; i++) if ( family==Icd2::FAMILY_DATA[i].name ) break; - if ( Icd2::FAMILY_DATA[i].efid==0 ) qFatal(QString("Family \"%1\" is unknown").arg(family)); + if ( Icd2::FAMILY_DATA[i].efid==0 ) qFatal(TQString("Family \"%1\" is unknown").tqarg(family)); return i; } -void Icd2::XmlToData::parseData(QDomElement element, Data &data) +void Icd2::XmlToData::parseData(TQDomElement element, Data &data) { bool ok; data.famid = fromHexLabel(element.attribute("famid"), 2, &ok); @@ -41,7 +41,7 @@ void Icd2::XmlToData::parseData(QDomElement element, Data &data) data.debugSupport = extractSupport(element.attribute("debug_support_type")); } -void Icd2::XmlToData::outputData(const Data &data, QTextStream &s) const +void Icd2::XmlToData::outputData(const Data &data, TQTextStream &s) const { s << toHexLabel(data.famid, 2) << ", "; s << "::Group::Support::Type(" << data.debugSupport.type() << ")"; diff --git a/src/progs/manager/breakpoint.cpp b/src/progs/manager/breakpoint.cpp index 15e08e0..dc7d836 100644 --- a/src/progs/manager/breakpoint.cpp +++ b/src/progs/manager/breakpoint.cpp @@ -23,7 +23,7 @@ Breakpoint::List &Breakpoint::list() void Breakpoint::List::append(const Data &data) { - Q_ASSERT( !contains(data) ); + Q_ASSERT( !tqcontains(data) ); StateData sdata; sdata.data = data; _list.append(sdata); @@ -32,8 +32,8 @@ void Breakpoint::List::append(const Data &data) void Breakpoint::List::remove(const Data &data) { - Q_ASSERT( contains(data) ); - _list.remove(find(data)); + Q_ASSERT( tqcontains(data) ); + _list.remove(tqfind(data)); delayedChanged(); } @@ -43,17 +43,17 @@ void Breakpoint::List::clear() delayedChanged(); } -QValueList::iterator Breakpoint::List::find(const Data &data) +TQValueList::iterator Breakpoint::List::tqfind(const Data &data) { - QValueList::iterator it; + TQValueList::iterator it; for (it=_list.begin(); it!=_list.end(); ++it) if ( (*it).data==data ) return it; return _list.end(); } -QValueList::const_iterator Breakpoint::List::find(const Data &data) const +TQValueList::const_iterator Breakpoint::List::tqfind(const Data &data) const { - QValueList::const_iterator it; + TQValueList::const_iterator it; for (it=_list.begin(); it!=_list.end(); ++it) if ( (*it).data==data ) return it; return _list.end(); @@ -61,14 +61,14 @@ QValueList::const_iterator Breakpoint::List::find(c void Breakpoint::List::setState(const Data &data, State state) { - Q_ASSERT( contains(data) ); - (*find(data)).state = state; + Q_ASSERT( tqcontains(data) ); + (*tqfind(data)).state = state; delayedChanged(); } void Breakpoint::List::setAddress(const Data &data, Address address) { - Q_ASSERT( contains(data) ); - (*find(data)).address = address; + Q_ASSERT( tqcontains(data) ); + (*tqfind(data)).address = address; delayedChanged(); } diff --git a/src/progs/manager/breakpoint.h b/src/progs/manager/breakpoint.h index fca0570..07f5263 100644 --- a/src/progs/manager/breakpoint.h +++ b/src/progs/manager/breakpoint.h @@ -39,6 +39,7 @@ extern List &list(); class List : public GenericStorage { Q_OBJECT + TQ_OBJECT public: List() {} void append(const Data &data); @@ -46,9 +47,9 @@ public: void clear(); uint count() const { return _list.count(); } const Data &data(uint i) const { return _list[i].data; } - bool contains(const Data &data) const { return find(data)!=_list.end(); } - State state(const Data &data) const { return (*find(data)).state; } - Address address(const Data &data) const { return (*find(data)).address; } + bool tqcontains(const Data &data) const { return tqfind(data)!=_list.end(); } + State state(const Data &data) const { return (*tqfind(data)).state; } + Address address(const Data &data) const { return (*tqfind(data)).address; } void setState(const Data &data, State state); void setAddress(const Data &data, Address address); @@ -60,9 +61,9 @@ private: Address address; State state; }; - QValueList _list; - QValueList::const_iterator find(const Data &data) const; - QValueList::iterator find(const Data &data); + TQValueList _list; + TQValueList::const_iterator tqfind(const Data &data) const; + TQValueList::iterator tqfind(const Data &data); }; } // namespace diff --git a/src/progs/manager/debug_manager.cpp b/src/progs/manager/debug_manager.cpp index 7889432..631a4bd 100644 --- a/src/progs/manager/debug_manager.cpp +++ b/src/progs/manager/debug_manager.cpp @@ -8,8 +8,8 @@ ***************************************************************************/ #include "debug_manager.h" -#include -#include +#include +#include #include "coff/base/text_coff.h" #include "coff/base/cdb_parser.h" @@ -23,11 +23,11 @@ Debugger::Manager *Debugger::manager = 0; Debugger::Manager::Manager() - : QObject(Programmer::manager, "debug_manager"), Log::Base(Programmer::manager), GenericView(Breakpoint::list()), + : TQObject(Programmer::manager, "debug_manager"), Log::Base(Programmer::manager), GenericView(Breakpoint::list()), _coff(0), _data(0) { - connect(&_runTimer, SIGNAL(timeout()), SLOT(slotRunTimeout())); - connect(&_stepTimer, SIGNAL(timeout()), SLOT(doStep())); + connect(&_runTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotRunTimeout())); + connect(&_stepTimer, TQT_SIGNAL(timeout()), TQT_SLOT(doStep())); } Debugger::Manager::~Manager() @@ -81,7 +81,7 @@ bool Debugger::Manager::internalInit() if ( !coffUrl().exists() ) return false; Log::Base log; log.setView(compileView()); - log.log(Log::LineType::Information, i18n("Parsing COFF file: %1").arg(coffUrl().pretty())); + log.log(Log::LineType::Information, i18n("Parsing COFF file: %1").tqarg(coffUrl().pretty())); _coff = new Coff::TextObject(_data, coffUrl()); if ( !_coff->parse(log) ) { delete _coff; @@ -110,7 +110,7 @@ void Debugger::Manager::freeActiveBreakpoint() uint max = programmerGroup()->maxNbBreakpoints(deviceData()); Q_ASSERT( nb<=max && max!=0 ); if ( nb==max ) { - log(Log::LineType::Warning, i18n("The number of active breakpoints is higher than the maximum for the current debugger (%1): disabling the last breakpoint.").arg(max)); + log(Log::LineType::Warning, i18n("The number of active breakpoints is higher than the maximum for the current debugger (%1): disabling the last breakpoint.").tqarg(max)); Breakpoint::list().setState(last, Breakpoint::Disabled); } } @@ -137,9 +137,9 @@ bool Debugger::Manager::checkBreakpoint(const Breakpoint::Data &bdata, bool only { address = Address(); if ( _coff==0 ) return true; - QValueVector
addresses = _coff->addresses(bdata.url, bdata.line); + TQValueVector
addresses = _coff->addresses(bdata.url, bdata.line); if ( addresses.isEmpty() ) { - QString s = i18n("Breakpoint at non-code line."); + TQString s = i18n("Breakpoint at non-code line."); if (onlyWarn) log(Log::LineType::Warning, s); else sorry(s); return false; @@ -166,9 +166,9 @@ void Debugger::Manager::computeBreakpointAddresses() } } -QValueList
Debugger::Manager::activeBreakpointAddresses() const +TQValueList
Debugger::Manager::activeBreakpointAddresses() const { - QValueList
addresses; + TQValueList
addresses; for (uint i=0; istatusString()); - else emit statusChanged(QString::null); + else emit statusChanged(TQString()); _currentSourceLines.clear(); if (_coff) _currentSourceLines = _coff->sourceLinesForAddress(pc().toUInt()); updateView(gotoPC); @@ -205,15 +205,15 @@ bool Debugger::Manager::updateRegister(const Register::TypeData &data) // read related registers const Device::RegistersData *rdata = deviceData()->registersData(); Q_ASSERT(rdata); - QValueList related = rdata->relatedRegisters(data); + TQValueList related = rdata->relatedRegisters(data); for (uint k=0; kportIndex(data.address()); if ( index!=-1 ) { - QMap data; - if ( !debugger()->updatePortStatus(index, data) ) return false; + TQMap data; + if ( !debugger()->updatePorttqStatus(index, data) ) return false; Register::list().setPortData(index, data); } } @@ -223,7 +223,7 @@ bool Debugger::Manager::updateRegister(const Register::TypeData &data) bool Debugger::Manager::updateRegisters() { if ( programmer()==0 || programmer()->state()!=Programmer::Halted ) return true; - QValueList watched = Register::list().watched(); + TQValueList watched = Register::list().watched(); for (uint i=0; i::const_iterator it; + TQMap::const_iterator it; for (it=_currentSourceLines.begin(); it!=_currentSourceLines.end(); ++it) { PURL::FileGroup group = it.key().fileType().data().group; if ( group!=PURL::Source && group!=PURL::Header ) continue; if ( !it.key().exists() ) continue; if ( readConfigEntry(Config::OnlyStopOnProjectSourceLine).toBool() && !isProjectSource(it.key()) ) continue; - QValueVector
addresses = _coff->addresses(it.key(), it.data()); + TQValueVector
addresses = _coff->addresses(it.key(), it.data()); qHeapSort(addresses); Q_ASSERT( addresses.count()!=0 ); if ( pc()!=addresses[0] ) continue; // we only break if pc is on the first instruction of the source line @@ -331,7 +331,7 @@ void Debugger::Manager::setRegisterWatched(const Register::TypeData &data, bool bool Debugger::Manager::readRegister(const Register::TypeData &data) { Q_ASSERT( data.type()==Register::Regular || data.type()==Register::Special ); - if ( _readRegisters.contains(data) ) return true; + if ( _readRegisters.tqcontains(data) ) return true; BitValue value; if ( !debugger()->readRegister(data, value) ) return false; Register::list().setValue(data, value); @@ -384,7 +384,7 @@ bool Debugger::Manager::prepareDebugging() break; } if ( i==Programmer::Nb_InputFileTypes ) { - log(Log::LineType::Error, i18n("Cannot start debugging session without input file (%1).").arg(first.pretty())); + log(Log::LineType::Error, i18n("Cannot start debugging session without input file (%1).").tqarg(first.pretty())); return false; } } diff --git a/src/progs/manager/debug_manager.h b/src/progs/manager/debug_manager.h index 90b8584..1598287 100644 --- a/src/progs/manager/debug_manager.h +++ b/src/progs/manager/debug_manager.h @@ -9,7 +9,7 @@ #ifndef DEBUG_MANAGER_H #define DEBUG_MANAGER_H -#include +#include #include "common/global/log.h" #include "common/global/purl.h" @@ -24,9 +24,10 @@ namespace CDB { class Object; } namespace Debugger { -class Manager : public QObject, public Log::Base, public GenericView +class Manager : public TQObject, public Log::Base, public GenericView { Q_OBJECT + TQ_OBJECT public: Manager(); virtual ~Manager(); @@ -58,13 +59,13 @@ public slots: void stopWatchAll(); signals: - void statusChanged(const QString &text); + void statusChanged(const TQString &text); void targetStateChanged(); - void actionMessage(const QString &text); + void actionMessage(const TQString &text); protected: Coff::TextObject *_coff; - QMap _currentSourceLines; + TQMap _currentSourceLines; void freeActiveBreakpoint(); bool checkBreakpoint(const Breakpoint::Data &bdata, bool onlyWarn, Address &address); @@ -81,11 +82,11 @@ private slots: private: const Device::Data *_data; - QTimer _runTimer, _stepTimer; - QValueList _readRegisters; + TQTimer _runTimer, _stepTimer; + TQValueList _readRegisters; void computeBreakpointAddresses(); - QValueList
activeBreakpointAddresses() const; + TQValueList
activeBreakpointAddresses() const; void updateBreakpointsDisplay(); virtual void updateView() { updateView(false); } virtual void updateView(bool gotoPC) = 0; diff --git a/src/progs/manager/prog_manager.cpp b/src/progs/manager/prog_manager.cpp index bc824c9..c39d955 100644 --- a/src/progs/manager/prog_manager.cpp +++ b/src/progs/manager/prog_manager.cpp @@ -18,8 +18,8 @@ //---------------------------------------------------------------------------- Programmer::Manager *Programmer::manager = 0; -Programmer::Manager::Manager(QObject *parent) - : QObject(parent, "programmer_manager"), _programmer(0) +Programmer::Manager::Manager(TQObject *tqparent) + : TQObject(tqparent, "programmer_manager"), _programmer(0) {} Programmer::Manager::~Manager() @@ -39,11 +39,11 @@ void Programmer::Manager::createProgrammer(const Device::Data *data, const Hardw delete _programmer; _programmer = group().createProgrammer(isTargetSelfPowered(), data, hd); _programmer->Log::Base::setParent(this); - connect(_programmer, SIGNAL(actionMessage(const QString &)), SIGNAL(actionMessage(const QString &))); - connect(&_programmer->progressMonitor(), SIGNAL(setLabel(const QString &)), SIGNAL(actionMessage(const QString &))); - connect(&_programmer->progressMonitor(), SIGNAL(setTotalProgress(uint)), SIGNAL(setTotalProgress(uint))); - connect(&_programmer->progressMonitor(), SIGNAL(setProgress(uint)), SIGNAL(setProgress(uint))); - connect(&_programmer->progressMonitor(), SIGNAL(showProgress(bool)), SIGNAL(showProgress(bool))); + connect(_programmer, TQT_SIGNAL(actionMessage(const TQString &)), TQT_SIGNAL(actionMessage(const TQString &))); + connect(&_programmer->progressMonitor(), TQT_SIGNAL(setLabel(const TQString &)), TQT_SIGNAL(actionMessage(const TQString &))); + connect(&_programmer->progressMonitor(), TQT_SIGNAL(setTotalProgress(uint)), TQT_SIGNAL(setTotalProgress(uint))); + connect(&_programmer->progressMonitor(), TQT_SIGNAL(setProgress(uint)), TQT_SIGNAL(setProgress(uint))); + connect(&_programmer->progressMonitor(), TQT_SIGNAL(showProgress(bool)), TQT_SIGNAL(showProgress(bool))); } bool Programmer::Manager::initProgramming(bool debugging) @@ -61,8 +61,8 @@ bool Programmer::Manager::internalInitProgramming(bool) } if ( !group().isSupported(device()->name()) ) { if ( group().isSoftware() && group().supportedDevices().isEmpty() ) - sorry(i18n("Could not detect supported devices for \"%1\". Please check installation.").arg(group().label())); - else sorry(i18n("The current programmer \"%1\" does not support device \"%2\".").arg(group().label()).arg(device()->name())); + sorry(i18n("Could not detect supported devices for \"%1\". Please check installation.").tqarg(group().label())); + else sorry(i18n("The current programmer \"%1\" does not support device \"%2\".").tqarg(group().label()).tqarg(device()->name())); return false; } createProgrammer(device()); @@ -135,7 +135,7 @@ bool Programmer::Manager::setDevicePower(bool on) if ( !initProgramming(false) ) return false; bool ok = true; if ( _programmer->isTargetSelfPowered() ) - sorry(i18n("Cannot toggle target power since target is self-powered."), QString::null); + sorry(i18n("Cannot toggle target power since target is self-powered."), TQString()); else { emit actionMessage(i18n("Toggle Device Power...")); ok = _programmer->setTargetPowerOn(on); diff --git a/src/progs/manager/prog_manager.h b/src/progs/manager/prog_manager.h index 11f7401..233013b 100644 --- a/src/progs/manager/prog_manager.h +++ b/src/progs/manager/prog_manager.h @@ -10,7 +10,7 @@ #ifndef PROG_MANAGER_H #define PROG_MANAGER_H -#include +#include #include "common/global/log.h" namespace Device { class Data; class Memory; class MemoryRange; } @@ -22,11 +22,12 @@ class Base; class Group; class HardwareDescription; -class Manager : public QObject, public Log::Base +class Manager : public TQObject, public Log::Base { Q_OBJECT + TQ_OBJECT public: - Manager(QObject *parent); + Manager(TQObject *tqparent); virtual ~Manager(); ::Programmer::Base *programmer() { return _programmer; } virtual void createProgrammer(const Device::Data *data) = 0; @@ -52,7 +53,7 @@ public slots: bool step(); signals: - void actionMessage(const QString &message); + void actionMessage(const TQString &message); void showProgress(bool show); void setTotalProgress(uint steps); void setProgress(uint steps); diff --git a/src/progs/picdem_bootloader/base/picdem_bootloader.cpp b/src/progs/picdem_bootloader/base/picdem_bootloader.cpp index f22eecb..90fed61 100644 --- a/src/progs/picdem_bootloader/base/picdem_bootloader.cpp +++ b/src/progs/picdem_bootloader/base/picdem_bootloader.cpp @@ -38,29 +38,29 @@ PicdemBootloader::Port::Port(Log::Base &log) : Port::USB(log, Config::readVendorId(), Config::readProductId(), 1, 0) {} -bool PicdemBootloader::Port::receive(uint nb, QMemArray &data) +bool PicdemBootloader::Port::receive(uint nb, TQMemArray &data) { data.resize(nb); if ( !read(0x81, (char *)data.data(), nb) ) return false; - log(Log::DebugLevel::Max, QString("received: \"%1\"").arg(toPrintable(data, PrintEscapeAll))); + log(Log::DebugLevel::Max, TQString("received: \"%1\"").tqarg(toPrintable(data, PrintEscapeAll))); return true; } -bool PicdemBootloader::Port::send(const QMemArray &cmd) +bool PicdemBootloader::Port::send(const TQMemArray &cmd) { - log(Log::DebugLevel::Extra, QString("send: \"%1\"").arg(toPrintable(cmd, PrintEscapeAll))); + log(Log::DebugLevel::Extra, TQString("send: \"%1\"").tqarg(toPrintable(cmd, PrintEscapeAll))); return write(0x01, (const char *)cmd.data(), cmd.count()); } -bool PicdemBootloader::Port::sendAndReceive(QMemArray &data, uint nb) +bool PicdemBootloader::Port::sendAndReceive(TQMemArray &data, uint nb) { if ( !send(data) ) return false; return receive(nb, data); } -QMemArray PicdemBootloader::Port::command(uchar instruction, uint address, uint len, uint nb) const +TQMemArray PicdemBootloader::Port::command(uchar instruction, uint address, uint len, uint nb) const { - QMemArray cmd(5+nb); + TQMemArray cmd(5+nb); cmd[0] = instruction; cmd[1] = len; cmd[2] = address & 0xFF; @@ -77,11 +77,11 @@ PicdemBootloader::Hardware::Hardware(::Programmer::Base &base) bool PicdemBootloader::Hardware::internalConnectHardware() { if ( !openPort() ) return false; - QMemArray cmd(5); + TQMemArray cmd(5); cmd.fill(0); if ( !port().sendAndReceive(cmd, 4) ) return false; VersionData version(cmd[3], cmd[2], 0); - log(Log::LineType::Information, i18n("Bootloader version %1 detected").arg(version.pretty())); + log(Log::LineType::Information, i18n("Bootloader version %1 detected").tqarg(version.pretty())); if ( version.majorNum()!=1 ) { log(Log::LineType::Error, i18n("Only bootloader version 1.x is supported")); return false; @@ -106,9 +106,9 @@ bool PicdemBootloader::Hardware::write(Pic::MemoryRangeType type, const Device:: if ( type==Pic::MemoryRangeType::Code ) { // check that there is nothing in bootloader reserved area for (uint i=0; i=0x400 ) continue; - if ( data[i]==device().mask(Pic::MemoryRangeType::Code) ) continue; + if ( data[i]==device().tqmask(Pic::MemoryRangeType::Code) ) continue; uint address = device().addressIncrement(Pic::MemoryRangeType::Code) * i; - log(Log::LineType::Warning, " " + i18n("Code is present in bootloader reserved area (at address %1). It will be ignored.").arg(toHexLabel(address, device().nbCharsAddress()))); + log(Log::LineType::Warning, " " + i18n("Code is present in bootloader reserved area (at address %1). It will be ignored.").tqarg(toHexLabel(address, device().nbCharsAddress()))); break; } } @@ -116,7 +116,7 @@ bool PicdemBootloader::Hardware::write(Pic::MemoryRangeType type, const Device:: uint nbBytes = nbBytesWord * device().nbWords(type); uint offset = (type==Pic::MemoryRangeType::Code ? 0x0800 : 0x00); for (; offset cmd = port().command(0x02, device().range(type).start.toUInt() + offset, 16, 16); + TQMemArray cmd = port().command(0x02, device().range(type).start.toUInt() + offset, 16, 16); for (uint k=0; k<16; k += nbBytesWord) { uint index = (offset + k) / nbBytesWord; cmd[5 + k] = data[index].byte(0); @@ -147,9 +147,9 @@ bool PicdemBootloader::Hardware::read(Pic::MemoryRangeType type, Device::Array & if (vdata) varray = static_cast(vdata->memory).arrayForWriting(type); uint nbBytesWord = device().nbBytesWord(type); uint nbBytes = nbBytesWord * device().nbWords(type); - uint nb = QMIN(uint(16), nbBytes); + uint nb = TQMIN(uint(16), nbBytes); for (uint offset=0; offset cmd = port().command(readInstruction(type), device().range(type).start.toUInt() + offset, nb, 0); + TQMemArray cmd = port().command(readInstruction(type), device().range(type).start.toUInt() + offset, nb, 0); if ( !port().sendAndReceive(cmd, 5+nb) ) return false; for (uint k=0; k=0x0800 && data[index]!=varray[index] ) { log(Log::LineType::Error, i18n("Device memory does not match hex file (at address 0x%2: reading 0x%3 and expecting 0x%4).") - .arg(QString(toHex(index/2, device().nbCharsAddress()))) - .arg(QString(toHex(data[index], device().nbCharsWord(type)))) - .arg(QString(toHex(varray[index], device().nbCharsWord(type))))); + .tqarg(TQString(toHex(index/2, device().nbCharsAddress()))) + .tqarg(TQString(toHex(data[index], device().nbCharsWord(type)))) + .tqarg(TQString(toHex(varray[index], device().nbCharsWord(type))))); return false; } } @@ -177,7 +177,7 @@ bool PicdemBootloader::Hardware::erase(Pic::MemoryRangeType type) uint nbBytesWord = device().nbBytesWord(type); uint nbBytes = nbBytesWord * device().nbWords(type); for (uint offset=0x0800; offset cmd = port().command(0x03, device().range(type).start.toUInt() + offset, 1, 0); + TQMemArray cmd = port().command(0x03, device().range(type).start.toUInt() + offset, 1, 0); if ( !port().sendAndReceive(cmd, 1) ) return false; } return true; diff --git a/src/progs/picdem_bootloader/base/picdem_bootloader.h b/src/progs/picdem_bootloader/base/picdem_bootloader.h index 3081382..e0b9cac 100644 --- a/src/progs/picdem_bootloader/base/picdem_bootloader.h +++ b/src/progs/picdem_bootloader/base/picdem_bootloader.h @@ -32,10 +32,10 @@ class Port : public ::Port::USB { public: Port(Log::Base &base); - bool receive(uint nb, QMemArray &array); - bool send(const QMemArray &array); - bool sendAndReceive(QMemArray &data, uint nb); - QMemArray command(uchar instruction, uint address, uint len, uint nb) const; + bool receive(uint nb, TQMemArray &array); + bool send(const TQMemArray &array); + bool sendAndReceive(TQMemArray &data, uint nb); + TQMemArray command(uchar instruction, uint address, uint len, uint nb) const; }; //----------------------------------------------------------------------------- diff --git a/src/progs/picdem_bootloader/base/picdem_bootloader_data.h b/src/progs/picdem_bootloader/base/picdem_bootloader_data.h index bf2a40f..a27dc48 100644 --- a/src/progs/picdem_bootloader/base/picdem_bootloader_data.h +++ b/src/progs/picdem_bootloader/base/picdem_bootloader_data.h @@ -12,8 +12,8 @@ namespace PicdemBootloader { struct Data {}; - extern bool isSupported(const QString &device); - extern const Data &data(const QString &device); + extern bool isSupported(const TQString &device); + extern const Data &data(const TQString &device); } // namespace #endif diff --git a/src/progs/picdem_bootloader/base/picdem_bootloader_prog.h b/src/progs/picdem_bootloader/base/picdem_bootloader_prog.h index 698d612..cb82da0 100644 --- a/src/progs/picdem_bootloader/base/picdem_bootloader_prog.h +++ b/src/progs/picdem_bootloader/base/picdem_bootloader_prog.h @@ -19,6 +19,7 @@ namespace PicdemBootloader class ProgrammerBase : public Bootloader::ProgrammerBase { Q_OBJECT + TQ_OBJECT public: ProgrammerBase(const Programmer::Group &group, const Pic::Data *data); }; @@ -27,8 +28,8 @@ public: class Group : public ::Bootloader::Group { public: - virtual QString name() const { return "picdem_bootloader"; } - virtual QString label() const { return i18n("Picdem Bootloader"); } + virtual TQString name() const { return "picdem_bootloader"; } + virtual TQString label() const { return i18n("Picdem Bootloader"); } virtual ::Programmer::Properties properties() const { return ::Programmer::Programmer | ::Programmer::CanReadMemory; } virtual ::Programmer::TargetPowerMode targetPowerMode() const { return ::Programmer::TargetSelfPowered; } virtual bool isPortSupported(PortType type) const { return type==PortType::USB; } diff --git a/src/progs/picdem_bootloader/gui/picdem_bootloader_ui.cpp b/src/progs/picdem_bootloader/gui/picdem_bootloader_ui.cpp index c958249..fdfa3d1 100644 --- a/src/progs/picdem_bootloader/gui/picdem_bootloader_ui.cpp +++ b/src/progs/picdem_bootloader/gui/picdem_bootloader_ui.cpp @@ -11,18 +11,18 @@ #include "progs/picdem_bootloader/base/picdem_bootloader.h" //----------------------------------------------------------------------------- -PicdemBootloader::ConfigWidget::ConfigWidget(const ::Programmer::Group &group, QWidget *parent) - : ::Programmer::ConfigWidget(group, parent) +PicdemBootloader::ConfigWidget::ConfigWidget(const ::Programmer::Group &group, TQWidget *tqparent) + : ::Programmer::ConfigWidget(group, tqparent) { uint row = numRows(); - QLabel *label = new QLabel(i18n("USB Vendor Id:"), this); + TQLabel *label = new TQLabel(i18n("USB Vendor Id:"), this); addWidget(label, row,row, 0,0); _vendorId = new HexWordEditor(4, this); addWidget(_vendorId, row,row, 1,1); row++; - label = new QLabel(i18n("USB Product Id:"), this); + label = new TQLabel(i18n("USB Product Id:"), this); addWidget(label, row,row, 0,0); _productId = new HexWordEditor(4, this); addWidget(_productId, row,row, 1,1); @@ -42,7 +42,7 @@ void PicdemBootloader::ConfigWidget::loadConfig() } //----------------------------------------------------------------------------- -::Programmer::ConfigWidget *PicdemBootloader::GroupUI::createConfigWidget(QWidget *parent) const +::Programmer::ConfigWidget *PicdemBootloader::GroupUI::createConfigWidget(TQWidget *tqparent) const { - return new ConfigWidget(static_cast(group()), parent); + return new ConfigWidget(static_cast(group()), tqparent); } diff --git a/src/progs/picdem_bootloader/gui/picdem_bootloader_ui.h b/src/progs/picdem_bootloader/gui/picdem_bootloader_ui.h index 50777af..0540625 100644 --- a/src/progs/picdem_bootloader/gui/picdem_bootloader_ui.h +++ b/src/progs/picdem_bootloader/gui/picdem_bootloader_ui.h @@ -17,8 +17,9 @@ namespace PicdemBootloader class ConfigWidget: public ::Programmer::ConfigWidget { Q_OBJECT + TQ_OBJECT public: - ConfigWidget(const ::Programmer::Group &group, QWidget *parent); + ConfigWidget(const ::Programmer::Group &group, TQWidget *tqparent); virtual void loadConfig(); virtual void saveConfig(); @@ -30,7 +31,7 @@ private: class GroupUI : public ::Bootloader::GroupUI { public: - virtual ::Programmer::ConfigWidget *createConfigWidget(QWidget *parent) const; + virtual ::Programmer::ConfigWidget *createConfigWidget(TQWidget *tqparent) const; }; } // namespace diff --git a/src/progs/picdem_bootloader/xml/xml_picdem_bootloader_parser.cpp b/src/progs/picdem_bootloader/xml/xml_picdem_bootloader_parser.cpp index 745b6a0..04c6e17 100644 --- a/src/progs/picdem_bootloader/xml/xml_picdem_bootloader_parser.cpp +++ b/src/progs/picdem_bootloader/xml/xml_picdem_bootloader_parser.cpp @@ -22,10 +22,10 @@ public: XmlToData() : Programmer::XmlToData("picdem_bootloader", "PicdemBootloader") {} private: - virtual void parseData(QDomElement element, Data &data); + virtual void parseData(TQDomElement element, Data &data); }; -void PicdemBootloader::XmlToData::parseData(QDomElement, Data &) +void PicdemBootloader::XmlToData::parseData(TQDomElement, Data &) { const Device::Data *ddata = Device::lister().data(currentDevice()); if ( ddata->group().name()!="pic" ) qFatal("non-pic device not supported"); diff --git a/src/progs/pickit1/base/pickit1.cpp b/src/progs/pickit1/base/pickit1.cpp index c5ab021..55d98e4 100644 --- a/src/progs/pickit1/base/pickit1.cpp +++ b/src/progs/pickit1/base/pickit1.cpp @@ -37,8 +37,8 @@ bool Pickit1::Baseline::incrementPC(uint nb) // work around bugs in firmware Array cmd; uint high = (nb >> 8) & 0xFF; - log(Log::DebugLevel::Extra, QString("work around bug in firmware (nb_inc=%1 high=%2)") - .arg(toHexLabel(nb, 4)).arg(toHexLabel(high, 2))); + log(Log::DebugLevel::Extra, TQString("work around bug in firmware (nb_inc=%1 high=%2)") + .tqarg(toHexLabel(nb, 4)).tqarg(toHexLabel(high, 2))); if ( high==1 ) { cmd[0] = 'I'; cmd[1] = 0x40; diff --git a/src/progs/pickit1/base/pickit1_data.h b/src/progs/pickit1/base/pickit1_data.h index 767fc4b..75a65ea 100644 --- a/src/progs/pickit1/base/pickit1_data.h +++ b/src/progs/pickit1/base/pickit1_data.h @@ -9,7 +9,7 @@ #ifndef PICKIT1_DATA_H #define PICKIT1_DATA_H -#include +#include namespace Pickit1 { @@ -17,7 +17,7 @@ namespace Pickit1 char entryMode; bool regenerateOsccal; }; - extern const Data &data(const QString &device); + extern const Data &data(const TQString &device); } // namespace #endif diff --git a/src/progs/pickit1/base/pickit1_prog.h b/src/progs/pickit1/base/pickit1_prog.h index c0763b4..341e879 100644 --- a/src/progs/pickit1/base/pickit1_prog.h +++ b/src/progs/pickit1/base/pickit1_prog.h @@ -17,6 +17,7 @@ namespace Pickit1 class Base : public Pickit::Base { Q_OBJECT + TQ_OBJECT public: Base(const Programmer::Group &group, const Pic::Data *data) : Pickit::Base(group, data) {} virtual bool deviceHasOsccalRegeneration() const; @@ -31,8 +32,8 @@ private: class Group : public Pickit::Group { public: - virtual QString name() const { return "pickit1"; } - virtual QString label() const { return i18n("PICkit1"); } + virtual TQString name() const { return "pickit1"; } + virtual TQString label() const { return i18n("PICkit1"); } virtual Programmer::Properties properties() const { return ::Programmer::Programmer | ::Programmer::HasFirmware | ::Programmer::CanReadMemory | ::Programmer::HasConnectedState; } protected: diff --git a/src/progs/pickit1/gui/pickit1_group_ui.cpp b/src/progs/pickit1/gui/pickit1_group_ui.cpp index 2c862fb..795533e 100644 --- a/src/progs/pickit1/gui/pickit1_group_ui.cpp +++ b/src/progs/pickit1/gui/pickit1_group_ui.cpp @@ -12,12 +12,12 @@ #include "progs/pickit2/gui/pickit2_group_ui.h" #include "progs/pickit1/base/pickit1_prog.h" -::Programmer::ConfigWidget *Pickit1::GroupUI::createConfigWidget(QWidget *parent) const +::Programmer::ConfigWidget *Pickit1::GroupUI::createConfigWidget(TQWidget *tqparent) const { - return new ::Programmer::ConfigWidget(static_cast(group()), parent); + return new ::Programmer::ConfigWidget(static_cast(group()), tqparent); } -::Programmer::AdvancedDialog *Pickit1::GroupUI::createAdvancedDialog(::Programmer::Base &base, QWidget *parent) const +::Programmer::AdvancedDialog *Pickit1::GroupUI::createAdvancedDialog(::Programmer::Base &base, TQWidget *tqparent) const { - return new Pickit::AdvancedDialog(static_cast(base), parent, "pickit1_advanced_dialog"); + return new Pickit::AdvancedDialog(static_cast(base), tqparent, "pickit1_advanced_dialog"); } diff --git a/src/progs/pickit1/gui/pickit1_group_ui.h b/src/progs/pickit1/gui/pickit1_group_ui.h index 5fb8ad6..147f99c 100644 --- a/src/progs/pickit1/gui/pickit1_group_ui.h +++ b/src/progs/pickit1/gui/pickit1_group_ui.h @@ -17,9 +17,9 @@ namespace Pickit1 class GroupUI : public ::Programmer::GroupUI { public: - virtual ::Programmer::ConfigWidget *createConfigWidget(QWidget *parent) const; + virtual ::Programmer::ConfigWidget *createConfigWidget(TQWidget *tqparent) const; virtual bool hasAdvancedDialog() const { return true; } - virtual ::Programmer::AdvancedDialog *createAdvancedDialog(::Programmer::Base &base, QWidget *parent) const; + virtual ::Programmer::AdvancedDialog *createAdvancedDialog(::Programmer::Base &base, TQWidget *tqparent) const; }; } // namespace diff --git a/src/progs/pickit1/xml/xml_pickit1_parser.cpp b/src/progs/pickit1/xml/xml_pickit1_parser.cpp index e5d1b78..9fbfafc 100644 --- a/src/progs/pickit1/xml/xml_pickit1_parser.cpp +++ b/src/progs/pickit1/xml/xml_pickit1_parser.cpp @@ -18,14 +18,14 @@ public: XmlToData() : Programmer::XmlToData("pickit1", "Pickit1") {} private: - virtual void parseData(QDomElement element, Data &data); - virtual void outputData(const Data &data, QTextStream &s) const; - virtual void outputFunctions(QTextStream &s) const; + virtual void parseData(TQDomElement element, Data &data); + virtual void outputData(const Data &data, TQTextStream &s) const; + virtual void outputFunctions(TQTextStream &s) const; }; -void Pickit1::XmlToData::parseData(QDomElement element, Data &data) +void Pickit1::XmlToData::parseData(TQDomElement element, Data &data) { - QString s = element.attribute("entry"); + TQString s = element.attribute("entry"); if ( s.length()!=1 || (s[0]!='O' && s[0]!='P') ) qFatal("Invalid or missing entry mode"); data.entryMode = s[0].latin1(); s = element.attribute("regen"); @@ -34,12 +34,12 @@ void Pickit1::XmlToData::parseData(QDomElement element, Data &data) else qFatal("Invalid regen value"); } -void Pickit1::XmlToData::outputData(const Data &data, QTextStream &s) const +void Pickit1::XmlToData::outputData(const Data &data, TQTextStream &s) const { s << "'" << data.entryMode << "', " << (data.regenerateOsccal ? "true" : "false"); } -void Pickit1::XmlToData::outputFunctions(QTextStream &s) const +void Pickit1::XmlToData::outputFunctions(TQTextStream &s) const { Programmer::XmlToData::outputFunctions(s); s << "::Programmer::DeviceSpecific *Group::createDeviceSpecific(Programmer::Base &base) const" << endl; @@ -47,7 +47,7 @@ void Pickit1::XmlToData::outputFunctions(QTextStream &s) const s << " uint i = family(static_cast< ::Pickit1::Base &>(base).device()->name());" << endl; s << " switch(i) {" << endl; for (uint i=0; i=0; end--) if ( _data[end]!=_fillChar ) break; - QString s; + TQString s; for (int i=0; i<=end; i++) s += toPrintable(_data[i], _mode); return s; } @@ -52,14 +52,14 @@ bool Pickit::USBPort::command(const char *s) bool Pickit::USBPort::command(const Array &cmd) { - log(Log::DebugLevel::Extra, QString("send command: \"%1\"").arg(cmd.pretty())); + log(Log::DebugLevel::Extra, TQString("send command: \"%1\"").tqarg(cmd.pretty())); return write(writeEndPoint(), (const char *)cmd._data.data(), cmd.length()); } bool Pickit::USBPort::receive(Pickit::Array &array) { if ( !read(readEndPoint(), (char *)array._data.data(), array.length()) ) return false; - log(Log::DebugLevel::Max, QString("received: \"%1\"").arg(array.pretty())); + log(Log::DebugLevel::Max, TQString("received: \"%1\"").tqarg(array.pretty())); return true; } @@ -78,11 +78,11 @@ bool Pickit::USBPort::getMode(VersionData &version, ::Programmer::Mode &mode) return true; } -bool Pickit::USBPort::receiveWords(uint nbBytesWord, uint nbRead, QValueVector &words, uint offset) +bool Pickit::USBPort::receiveWords(uint nbBytesWord, uint nbRead, TQValueVector &words, uint offset) { - log(Log::DebugLevel::Max, QString("receive words nbBytesWord=%1 nbRead=%2 offset=%3").arg(nbBytesWord).arg(nbRead).arg(offset)); + log(Log::DebugLevel::Max, TQString("receive words nbBytesWord=%1 nbRead=%2 offset=%3").tqarg(nbBytesWord).tqarg(nbRead).tqarg(offset)); Array a = array(); - QMemArray data(nbRead*a.length()); + TQMemArray data(nbRead*a.length()); uint l = 0; for (uint i=0; i words; + TQValueVector words; if ( !port().receiveWords(1, 1, words) ) return false; newValue = words[7] | 0x3400; return true; @@ -176,7 +176,7 @@ bool Pickit::BMDeviceSpecific::doRead(Pic::MemoryRangeType type, Device::Array & { data.resize(device().nbWords(type)); gotoMemory(type); - QValueVector words; + TQValueVector words; switch (type.type()) { case Pic::MemoryRangeType::Config: case Pic::MemoryRangeType::Code: diff --git a/src/progs/pickit2/base/pickit.h b/src/progs/pickit2/base/pickit.h index 741ed61..184a110 100644 --- a/src/progs/pickit2/base/pickit.h +++ b/src/progs/pickit2/base/pickit.h @@ -23,7 +23,7 @@ class Array { public: uint length() const { return _data.count(); } - QString pretty() const; + TQString pretty() const; uchar &operator[](uint i) { return _data[i]; } uchar operator[](uint i) const { return _data[i]; } @@ -33,7 +33,7 @@ protected: private: uchar _fillChar; PrintMode _mode; - QMemArray _data; + TQMemArray _data; friend class USBPort; }; @@ -49,7 +49,7 @@ public: bool command(const char *s); bool receive(Array &data); bool getMode(VersionData &version, ::Programmer::Mode &mode); - bool receiveWords(uint nbBytesWord, uint nbRead, QValueVector &data, uint offset = 0); + bool receiveWords(uint nbBytesWord, uint nbRead, TQValueVector &data, uint offset = 0); protected: virtual uint writeEndPoint() const = 0; diff --git a/src/progs/pickit2/base/pickit2.cpp b/src/progs/pickit2/base/pickit2.cpp index 6458fa2..6a010ff 100644 --- a/src/progs/pickit2/base/pickit2.cpp +++ b/src/progs/pickit2/base/pickit2.cpp @@ -43,16 +43,16 @@ bool Pickit2::USBPort::readFirmwareCodeMemory(Device::Array &data, const Device: uint nb = end - start + 1; Pickit::Array cmd = createCommand(1, 2*nb, 2*i); if ( !command(cmd) ) return false; - QValueVector read; + TQValueVector read; if ( !receiveWords(1, 1, read) ) return false; for (uint k=0; k=0x1000 && index<0x3FF0 && data[index]!=(*vdata)[index] ) { log(Log::LineType::Error, i18n("Firmware memory does not match hex file (at address 0x%2: reading 0x%3 and expecting 0x%4).") - .arg(QString(toHex(index/2, device->nbCharsAddress()))) - .arg(QString(toHex(data[index], device->nbCharsWord(Pic::MemoryRangeType::Code)))) - .arg(QString(toHex((*vdata)[index], device->nbCharsWord(Pic::MemoryRangeType::Code))))); + .tqarg(TQString(toHex(index/2, device->nbCharsAddress()))) + .tqarg(TQString(toHex(data[index], device->nbCharsWord(Pic::MemoryRangeType::Code)))) + .tqarg(TQString(toHex((*vdata)[index], device->nbCharsWord(Pic::MemoryRangeType::Code))))); return false; } } @@ -111,7 +111,7 @@ bool Pickit2::USBPort::uploadFirmware(const Pic::Memory &memory, ProgressMonitor //----------------------------------------------------------------------------- bool Pickit2::Hardware::readVoltages(VoltagesData &voltages) { - log(Log::DebugLevel::Extra, QString("readVoltages: Firmware is %1").arg(_base.firmwareVersion().pretty())); + log(Log::DebugLevel::Extra, TQString("readVoltages: Firmware is %1").tqarg(_base.firmwareVersion().pretty())); if ( _base.firmwareVersion()(hardware().port()); data.resize(device().nbWords(type)); - QValueVector words; + TQValueVector words; switch (type.type()) { case Pic::MemoryRangeType::DeviceId: case Pic::MemoryRangeType::UserId: diff --git a/src/progs/pickit2/base/pickit2_data.h b/src/progs/pickit2/base/pickit2_data.h index abae867..7eece69 100644 --- a/src/progs/pickit2/base/pickit2_data.h +++ b/src/progs/pickit2/base/pickit2_data.h @@ -9,7 +9,7 @@ #ifndef PICKIT2_DATA_H #define PICKIT2_DATA_H -#include +#include namespace Pickit2 { @@ -18,7 +18,7 @@ namespace Pickit2 uchar progWidth; bool regenerateOsccal; }; - extern const Data &data(const QString &device); + extern const Data &data(const TQString &device); } // namespace #endif diff --git a/src/progs/pickit2/base/pickit2_prog.cpp b/src/progs/pickit2/base/pickit2_prog.cpp index 88b73b9..3e3a2bd 100644 --- a/src/progs/pickit2/base/pickit2_prog.cpp +++ b/src/progs/pickit2/base/pickit2_prog.cpp @@ -50,10 +50,10 @@ bool Pickit2::Base::doUploadFirmware(PURL::File &file) { const Pic::Data &data = static_cast(*Device::lister().data("18F2550")); Pic::Memory memory(static_cast(data)); - QStringList errors, warnings; + TQStringList errors, warnings; Pic::Memory::WarningTypes warningTypes; if ( !memory.load(file.stream(), errors, warningTypes, warnings) ) { - log(Log::LineType::Error, i18n("Could not read firmware hex file \"%1\" (%2).").arg(file.url().pretty()).arg(errors[0])); + log(Log::LineType::Error, i18n("Could not read firmware hex file \"%1\" (%2).").tqarg(file.url().pretty()).tqarg(errors[0])); return false; } if ( warningTypes!=Pic::Memory::NoWarning ) { diff --git a/src/progs/pickit2/base/pickit2_prog.h b/src/progs/pickit2/base/pickit2_prog.h index 5a67e2a..31efb44 100644 --- a/src/progs/pickit2/base/pickit2_prog.h +++ b/src/progs/pickit2/base/pickit2_prog.h @@ -18,6 +18,7 @@ namespace Pickit2 class Base : public Pickit::Base { Q_OBJECT + TQ_OBJECT public: Base(const Programmer::Group &group, const Pic::Data *data) : Pickit::Base(group, data) {} virtual bool deviceHasOsccalRegeneration() const; @@ -33,8 +34,8 @@ private: class Group : public Pickit::Group { public: - virtual QString name() const { return "pickit2"; } - virtual QString label() const { return i18n("PICkit2 Firmware 1.x"); } + virtual TQString name() const { return "pickit2"; } + virtual TQString label() const { return i18n("PICkit2 Firmware 1.x"); } virtual Programmer::Properties properties() const { return ::Programmer::Programmer | ::Programmer::HasFirmware | ::Programmer::CanUploadFirmware | ::Programmer::CanReadMemory | ::Programmer::HasConnectedState; } virtual bool canReadVoltage(Pic::VoltageType type) const { return ( type==Pic::TargetVdd || type==Pic::TargetVpp ); } diff --git a/src/progs/pickit2/base/pickit_prog.cpp b/src/progs/pickit2/base/pickit_prog.cpp index c11dd08..f894906 100644 --- a/src/progs/pickit2/base/pickit_prog.cpp +++ b/src/progs/pickit2/base/pickit_prog.cpp @@ -28,22 +28,22 @@ bool Pickit::Base::readFirmwareVersion() bool Pickit::Base::regenerateOsccal(const PURL::Url &url) { - log(Log::DebugLevel::Normal, QString(" Calibration firmware file: %1").arg(url.pretty())); + log(Log::DebugLevel::Normal, TQString(" Calibration firmware file: %1").tqarg(url.pretty())); Log::StringView sview; PURL::File file(url, sview); if ( !file.openForRead() ) { - log(Log::LineType::Error, i18n("Could not open firmware file \"%1\".").arg(url.pretty())); + log(Log::LineType::Error, i18n("Could not open firmware file \"%1\".").tqarg(url.pretty())); return false; } Pic::Memory memory(*device()); - QStringList errors, warnings; + TQStringList errors, warnings; Pic::Memory::WarningTypes warningTypes; if ( !memory.load(file.stream(), errors, warningTypes, warnings) ) { - log(Log::LineType::Error, i18n("Could not read calibration firmware file \"%1\" (%2).").arg(url.pretty()).arg(errors[0])); + log(Log::LineType::Error, i18n("Could not read calibration firmware file \"%1\" (%2).").tqarg(url.pretty()).tqarg(errors[0])); return false; } if ( warningTypes!=Pic::Memory::NoWarning ) { - log(Log::LineType::Error, i18n("Calibration firmware file seems incompatible with selected device %1.").arg(device()->name())); + log(Log::LineType::Error, i18n("Calibration firmware file seems incompatible with selected device %1.").tqarg(device()->name())); return false; } if ( !askContinue(i18n("This will overwrite the device code memory. Continue anyway?")) ) return false; diff --git a/src/progs/pickit2/base/pickit_prog.h b/src/progs/pickit2/base/pickit_prog.h index b35fc92..7d2e76d 100644 --- a/src/progs/pickit2/base/pickit_prog.h +++ b/src/progs/pickit2/base/pickit_prog.h @@ -22,6 +22,7 @@ class Hardware; class Base : public Programmer::PicBase { Q_OBJECT + TQ_OBJECT public: Base(const Programmer::Group &group, const Pic::Data *data); virtual bool deviceHasOsccalRegeneration() const = 0; diff --git a/src/progs/pickit2/gui/pickit2_group_ui.cpp b/src/progs/pickit2/gui/pickit2_group_ui.cpp index f36395a..473dea7 100644 --- a/src/progs/pickit2/gui/pickit2_group_ui.cpp +++ b/src/progs/pickit2/gui/pickit2_group_ui.cpp @@ -18,8 +18,8 @@ #include "progs/pickit2/base/pickit2.h" //---------------------------------------------------------------------------- -Pickit::AdvancedDialog::AdvancedDialog(Base &base, QWidget *parent, const char *name) - : ::Programmer::PicAdvancedDialog(base, parent, name) +Pickit::AdvancedDialog::AdvancedDialog(Base &base, TQWidget *tqparent, const char *name) + : ::Programmer::PicAdvancedDialog(base, tqparent, name) {} void Pickit::AdvancedDialog::regenerateCalibration() @@ -41,12 +41,12 @@ void Pickit::AdvancedDialog::regenerateCalibration() } //---------------------------------------------------------------------------- -::Programmer::ConfigWidget *Pickit2::GroupUI::createConfigWidget(QWidget *parent) const +::Programmer::ConfigWidget *Pickit2::GroupUI::createConfigWidget(TQWidget *tqparent) const { - return new ::Programmer::ConfigWidget(static_cast(group()), parent); + return new ::Programmer::ConfigWidget(static_cast(group()), tqparent); } -::Programmer::AdvancedDialog *Pickit2::GroupUI::createAdvancedDialog(::Programmer::Base &base, QWidget *parent) const +::Programmer::AdvancedDialog *Pickit2::GroupUI::createAdvancedDialog(::Programmer::Base &base, TQWidget *tqparent) const { - return new Pickit::AdvancedDialog(static_cast(base), parent, "pickit2_advanced_dialog"); + return new Pickit::AdvancedDialog(static_cast(base), tqparent, "pickit2_advanced_dialog"); } diff --git a/src/progs/pickit2/gui/pickit2_group_ui.h b/src/progs/pickit2/gui/pickit2_group_ui.h index f79aa1f..78da904 100644 --- a/src/progs/pickit2/gui/pickit2_group_ui.h +++ b/src/progs/pickit2/gui/pickit2_group_ui.h @@ -18,8 +18,9 @@ namespace Pickit class AdvancedDialog : public ::Programmer::PicAdvancedDialog { Q_OBJECT + TQ_OBJECT public: - AdvancedDialog(Base &base, QWidget *parent, const char *name); + AdvancedDialog(Base &base, TQWidget *tqparent, const char *name); Base &base() { return static_cast(_base); } public slots: @@ -33,9 +34,9 @@ namespace Pickit2 class GroupUI : public ::Programmer::GroupUI { public: - virtual ::Programmer::ConfigWidget *createConfigWidget(QWidget *parent) const; + virtual ::Programmer::ConfigWidget *createConfigWidget(TQWidget *tqparent) const; virtual bool hasAdvancedDialog() const { return true; } - virtual ::Programmer::AdvancedDialog *createAdvancedDialog(::Programmer::Base &base, QWidget *parent) const; + virtual ::Programmer::AdvancedDialog *createAdvancedDialog(::Programmer::Base &base, TQWidget *tqparent) const; }; } // namespace diff --git a/src/progs/pickit2/xml/xml_pickit2_parser.cpp b/src/progs/pickit2/xml/xml_pickit2_parser.cpp index ffc82f7..686e4b2e 100644 --- a/src/progs/pickit2/xml/xml_pickit2_parser.cpp +++ b/src/progs/pickit2/xml/xml_pickit2_parser.cpp @@ -18,14 +18,14 @@ public: XmlToData() : Programmer::XmlToData("pickit2", "Pickit2") {} private: - virtual void parseData(QDomElement element, Data &data); - virtual void outputData(const Data &data, QTextStream &s) const; - virtual void outputFunctions(QTextStream &s) const; + virtual void parseData(TQDomElement element, Data &data); + virtual void outputData(const Data &data, TQTextStream &s) const; + virtual void outputFunctions(TQTextStream &s) const; }; -void Pickit2::XmlToData::parseData(QDomElement element, Data &data) +void Pickit2::XmlToData::parseData(TQDomElement element, Data &data) { - QString s = element.attribute("entry"); + TQString s = element.attribute("entry"); if ( s.length()!=1 || (s[0]!='O' && s[0]!='P') ) qFatal("Invalid or missing entry mode"); data.entryMode = s[0].latin1(); s = element.attribute("pmode"); @@ -47,13 +47,13 @@ void Pickit2::XmlToData::parseData(QDomElement element, Data &data) else qFatal("Invalid regen value"); } -void Pickit2::XmlToData::outputData(const Data &data, QTextStream &s) const +void Pickit2::XmlToData::outputData(const Data &data, TQTextStream &s) const { s << "'" << data.entryMode << "', '" << data.progMode; s << "', " << data.progWidth << ", " << (data.regenerateOsccal ? "true" : "false"); } -void Pickit2::XmlToData::outputFunctions(QTextStream &s) const +void Pickit2::XmlToData::outputFunctions(TQTextStream &s) const { Programmer::XmlToData::outputFunctions(s); s << "::Programmer::DeviceSpecific *Group::createDeviceSpecific(::Programmer::Base &base) const" << endl; @@ -61,7 +61,7 @@ void Pickit2::XmlToData::outputFunctions(QTextStream &s) const s << " uint i = family(static_cast< ::Pickit2::Base &>(base).device()->name());" << endl; s << " switch(i) {" << endl; for (uint i=0; i=0x1000 && i<0x3FF0 ) continue; - if ( data[i]==device().mask(Pic::MemoryRangeType::Code) ) continue; + if ( data[i]==device().tqmask(Pic::MemoryRangeType::Code) ) continue; uint address = device().addressIncrement(Pic::MemoryRangeType::Code) * i; - log(Log::LineType::Warning, " " + i18n("Code is present in bootloader reserved area (at address %1). It will be ignored.").arg(toHexLabel(address, device().nbCharsAddress()))); + log(Log::LineType::Warning, " " + i18n("Code is present in bootloader reserved area (at address %1). It will be ignored.").tqarg(toHexLabel(address, device().nbCharsAddress()))); break; } return port().writeFirmwareCodeMemory(data, _base.progressMonitor()); diff --git a/src/progs/pickit2_bootloader/base/pickit2_bootloader_data.h b/src/progs/pickit2_bootloader/base/pickit2_bootloader_data.h index 87aead1..92ca6fa 100644 --- a/src/progs/pickit2_bootloader/base/pickit2_bootloader_data.h +++ b/src/progs/pickit2_bootloader/base/pickit2_bootloader_data.h @@ -12,8 +12,8 @@ namespace Pickit2Bootloader { struct Data {}; - extern bool isSupported(const QString &device); - extern const Data &data(const QString &device); + extern bool isSupported(const TQString &device); + extern const Data &data(const TQString &device); } // namespace #endif diff --git a/src/progs/pickit2_bootloader/base/pickit2_bootloader_prog.h b/src/progs/pickit2_bootloader/base/pickit2_bootloader_prog.h index 461d734..b7e8bd8 100644 --- a/src/progs/pickit2_bootloader/base/pickit2_bootloader_prog.h +++ b/src/progs/pickit2_bootloader/base/pickit2_bootloader_prog.h @@ -19,6 +19,7 @@ namespace Pickit2Bootloader class ProgrammerBase : public ::Bootloader::ProgrammerBase { Q_OBJECT + TQ_OBJECT public: ProgrammerBase(const Programmer::Group &group, const Pic::Data *data); virtual bool verifyDeviceId() { return true; } @@ -28,8 +29,8 @@ public: class Group : public ::Bootloader::Group { public: - virtual QString name() const { return "pickit2_bootloader"; } - virtual QString label() const { return i18n("Pickit2 Bootloader"); } + virtual TQString name() const { return "pickit2_bootloader"; } + virtual TQString label() const { return i18n("Pickit2 Bootloader"); } virtual ::Programmer::Properties properties() const { return ::Programmer::Programmer | ::Programmer::CanReadMemory; } virtual ::Programmer::TargetPowerMode targetPowerMode() const { return ::Programmer::TargetSelfPowered; } virtual bool isPortSupported(PortType type) const { return type==PortType::USB; } diff --git a/src/progs/pickit2_bootloader/gui/pickit2_bootloader_ui.cpp b/src/progs/pickit2_bootloader/gui/pickit2_bootloader_ui.cpp index 89bf5c7..f68e39a 100644 --- a/src/progs/pickit2_bootloader/gui/pickit2_bootloader_ui.cpp +++ b/src/progs/pickit2_bootloader/gui/pickit2_bootloader_ui.cpp @@ -9,12 +9,12 @@ #include "pickit2_bootloader_ui.h" //----------------------------------------------------------------------------- -Pickit2Bootloader::ConfigWidget::ConfigWidget(const::Programmer::Group &group, QWidget *parent) - : ::Programmer::ConfigWidget(group, parent) +Pickit2Bootloader::ConfigWidget::ConfigWidget(const::Programmer::Group &group, TQWidget *tqparent) + : ::Programmer::ConfigWidget(group, tqparent) {} //----------------------------------------------------------------------------- -::Programmer::ConfigWidget *Pickit2Bootloader::GroupUI::createConfigWidget(QWidget *parent) const +::Programmer::ConfigWidget *Pickit2Bootloader::GroupUI::createConfigWidget(TQWidget *tqparent) const { - return new ConfigWidget(static_cast(group()), parent); + return new ConfigWidget(static_cast(group()), tqparent); } diff --git a/src/progs/pickit2_bootloader/gui/pickit2_bootloader_ui.h b/src/progs/pickit2_bootloader/gui/pickit2_bootloader_ui.h index d715574..e1c88fc 100644 --- a/src/progs/pickit2_bootloader/gui/pickit2_bootloader_ui.h +++ b/src/progs/pickit2_bootloader/gui/pickit2_bootloader_ui.h @@ -17,8 +17,9 @@ namespace Pickit2Bootloader class ConfigWidget: public ::Programmer::ConfigWidget { Q_OBJECT + TQ_OBJECT public: - ConfigWidget(const::Programmer::Group &group, QWidget *parent); + ConfigWidget(const::Programmer::Group &group, TQWidget *tqparent); virtual void loadConfig() {} virtual void saveConfig() {} }; @@ -28,7 +29,7 @@ public: class GroupUI : public ::Bootloader::GroupUI { public: - virtual ::Programmer::ConfigWidget *createConfigWidget(QWidget *parent) const; + virtual ::Programmer::ConfigWidget *createConfigWidget(TQWidget *tqparent) const; }; } // namespace diff --git a/src/progs/pickit2_bootloader/xml/xml_pickit2_bootloader_parser.cpp b/src/progs/pickit2_bootloader/xml/xml_pickit2_bootloader_parser.cpp index 150e814..f718c03 100644 --- a/src/progs/pickit2_bootloader/xml/xml_pickit2_bootloader_parser.cpp +++ b/src/progs/pickit2_bootloader/xml/xml_pickit2_bootloader_parser.cpp @@ -22,10 +22,10 @@ public: XmlToData() : Programmer::XmlToData("pickit2_bootloader", "Pickit2Bootloader") {} private: - virtual void parseData(QDomElement element, Data &data); + virtual void parseData(TQDomElement element, Data &data); }; -void Pickit2Bootloader::XmlToData::parseData(QDomElement, Data &) +void Pickit2Bootloader::XmlToData::parseData(TQDomElement, Data &) { const Device::Data *ddata = Device::lister().data(currentDevice()); if ( ddata->group().name()!="pic" ) qFatal("non-pic device not supported"); diff --git a/src/progs/pickit2v2/base/pickit2v2.cpp b/src/progs/pickit2v2/base/pickit2v2.cpp index 31dd6ca..d813a52 100644 --- a/src/progs/pickit2v2/base/pickit2v2.cpp +++ b/src/progs/pickit2v2/base/pickit2v2.cpp @@ -23,7 +23,7 @@ const Pickit2V2::FamilyData *Pickit2V2::familyData(const Pic::Data &device) //----------------------------------------------------------------------------- Pickit2V2::Hardware::Hardware(::Programmer::Base &base) - : ::Programmer::PicHardware(base, new USBPort(base), QString::null), + : ::Programmer::PicHardware(base, new USBPort(base), TQString()), _scriptBufferChecksum(0), _deviceSet(false) {} @@ -45,9 +45,9 @@ bool Pickit2V2::Hardware::setTarget() return true; } -bool Pickit2V2::Hardware::readStatus(ushort &status) +bool Pickit2V2::Hardware::readtqStatus(ushort &status) { - if ( !port().command(ReadStatus) ) return false; + if ( !port().command(ReadtqStatus) ) return false; Array a; if ( !port().receive(a) ) return false; status = (a[1] << 8) + a[0]; @@ -68,7 +68,7 @@ bool Pickit2V2::Hardware::executeScript(uint i) { Q_ASSERT( i!=0 ); const ScriptData &sdata = SCRIPT_DATA[i-1]; - log(Log::DebugLevel::Extra, QString("execute script #%1: %2").arg(i).arg(sdata.name)); + log(Log::DebugLevel::Extra, TQString("execute script #%1: %2").tqarg(i).tqarg(sdata.name)); return sendScript(sdata.data, sdata.length); } @@ -78,7 +78,7 @@ bool Pickit2V2::Hardware::getScriptBufferChecksum(uint &checksum) Array array; if ( !port().receive(array) ) return false; checksum = (array[0] << 24) + (array[1] << 16) + (array[2] << 8) + array[3]; - log(Log::DebugLevel::Extra, QString("get script buffer checksum: %1").arg(toHexLabel(checksum, 8))); + log(Log::DebugLevel::Extra, TQString("get script buffer checksum: %1").tqarg(toHexLabel(checksum, 8))); return true; } @@ -86,8 +86,8 @@ bool Pickit2V2::Hardware::downloadScript(ScriptType type, uint i) { if (i==0 ) return true; // empty script const ScriptData &sdata = SCRIPT_DATA[i-1]; - log(Log::DebugLevel::Max, QString(" download script #%1 (\"%2\") at position #%3") - .arg(i-1).arg(sdata.name).arg(toHexLabel(type, 2))); + log(Log::DebugLevel::Max, TQString(" download script #%1 (\"%2\") at position #%3") + .tqarg(i-1).tqarg(sdata.name).tqarg(toHexLabel(type, 2))); Array cmd; cmd[0] = DownloadScript; cmd[1] = type; @@ -145,8 +145,8 @@ bool Pickit2V2::Hardware::setTargetReset(Pic::ResetMode mode) bool Pickit2V2::Hardware::setVddVoltage(double value, double threshold) { - ushort v = ushort(qRound(32.0*value + 10.5)) << 6; - uchar vfault = uchar(qRound(256.0 * (threshold * value) / 5.0)); + ushort v = ushort(tqRound(32.0*value + 10.5)) << 6; + uchar vfault = uchar(tqRound(256.0 * (threshold * value) / 5.0)); if ( vfault>210 ) vfault = 210; Array cmd; cmd[0] = SetVdd; @@ -161,14 +161,14 @@ bool Pickit2V2::Hardware::setVppVoltage(double value, double threshold) Array cmd; cmd[0] = SetVpp; cmd[1] = 0x40; - cmd[2] = uchar(qRound(18.61*value)); - cmd[3] = uchar(qRound(18.61*value*threshold)); + cmd[2] = uchar(tqRound(18.61*value)); + cmd[3] = uchar(tqRound(18.61*value*threshold)); return port().command(cmd); } bool Pickit2V2::Hardware::setVddOn(bool on) { - log(Log::DebugLevel::Extra, QString("Vdd set to %1, self powered is %2").arg(on).arg(_base.isTargetSelfPowered())); + log(Log::DebugLevel::Extra, TQString("Vdd set to %1, self powered is %2").tqarg(on).tqarg(_base.isTargetSelfPowered())); ushort script[2]; script[0] = (on ? VddGroundOff : VddOff); if ( _base.isTargetSelfPowered() ) script[1] = (on ? VddOff : VddGroundOff); @@ -215,7 +215,7 @@ bool Pickit2V2::Hardware::readVoltages(VoltagesData &voltagesData) bool Pickit2V2::Hardware::downloadAddress(Address address) { - log(Log::DebugLevel::Max, QString("download address %1").arg(toHexLabel(address, 6))); + log(Log::DebugLevel::Max, TQString("download address %1").tqarg(toHexLabel(address, 6))); Array cmd; cmd[0] = ClearDownloadBuffer; cmd[1] = DownloadData; @@ -228,8 +228,8 @@ bool Pickit2V2::Hardware::downloadAddress(Address address) bool Pickit2V2::Hardware::runScript(ScriptType stype, uint repetitions, uint nbNoLens) { - log(Log::DebugLevel::Max, QString("run script %1: repetitions=%2 nbNoLen=%3") - .arg(toHexLabel(stype, 2)).arg(repetitions).arg(nbNoLens)); + log(Log::DebugLevel::Max, TQString("run script %1: repetitions=%2 nbNoLen=%3") + .tqarg(toHexLabel(stype, 2)).tqarg(repetitions).tqarg(nbNoLens)); #if 0 // ALTERNATE METHOD const Data &d = data(device().name()); for (uint i=0; i words; + TQValueVector words; if ( type==Pic::MemoryRangeType::Config || type==Pic::MemoryRangeType::Cal ) { if ( !runScript(stype, 1, 0) ) return false; if ( !port().command(UploadData) ) return false; @@ -322,12 +322,12 @@ bool Pickit2V2::Hardware::readMemory(Pic::MemoryRangeType otype, Device::Array & if ( !runScript(stype, nbRuns, nbReceive) ) return false; if ( !port().receiveWords(nbBytesWord, nbReceive, words) ) return false; } - log(Log::DebugLevel::Max, QString("nbRunWords=%1 readNbWords=%2 index=%3/%4").arg(nbRunWords).arg(words.count()).arg(i).arg(nbWords)); + log(Log::DebugLevel::Max, TQString("nbRunWords=%1 readNbWords=%2 index=%3/%4").tqarg(nbRunWords).tqarg(words.count()).tqarg(i).tqarg(nbWords)); for (uint k=0; k=nbWords ) break; data[i] = words[k]; if (fdata->progMemShift) data[i] >>= 1; - data[i] = data[i].maskWith(device().mask(type)); // ### correct ? + data[i] = data[i].tqmaskWith(device().tqmask(type)); // ### correct ? if ( vdata && !verifyWord(i, data[i], type, *vdata) ) return false; if ( type==Pic::MemoryRangeType::Code && i!=0x0 && i%0x8000==0 ) setAddress = true; i++; diff --git a/src/progs/pickit2v2/base/pickit2v2.h b/src/progs/pickit2v2/base/pickit2v2.h index 7c6f294..d1bd567 100644 --- a/src/progs/pickit2v2/base/pickit2v2.h +++ b/src/progs/pickit2v2/base/pickit2v2.h @@ -18,7 +18,7 @@ namespace Pickit2V2 enum FirmwareCommand { EnterBootloader = 0x42, NoOperation = 0x5A, FirmwareVersion = 0x76, - SetVdd = 0xA0, SetVpp = 0xA1, ReadStatus = 0xA2, ReadVoltages = 0xA3, + SetVdd = 0xA0, SetVpp = 0xA1, ReadtqStatus = 0xA2, ReadVoltages = 0xA3, DownloadScript = 0xA4, RunScript = 0xA5, ExecuteScript = 0xA6, ClearDownloadBuffer = 0xA7, DownloadData = 0xA8, ClearUploadBuffer = 0xA9, UploadData = 0xAA, ClearScriptBuffer = 0xAB, UploadDataNoLen = 0xAC, @@ -74,8 +74,8 @@ enum StatusFlag { ButtonPressed = 0x0040, VppError = 0x0020, VddError = 0x0010, VppIsOn = 0x0008, VppGroundIsOn = 0x0004, VddIsOn = 0x0002, VddGroundIsOn = 0x0001 }; -Q_DECLARE_FLAGS(StatusFlags, StatusFlag) -Q_DECLARE_OPERATORS_FOR_FLAGS(StatusFlags) +TQ_DECLARE_FLAGS(StatusFlags, StatusFlag) +TQ_DECLARE_OPERATORS_FOR_FLAGS(StatusFlags) //----------------------------------------------------------------------------- class Hardware : public ::Programmer::PicHardware @@ -94,7 +94,7 @@ public: bool setTarget(); bool setFastProgramming(bool fast); virtual bool readVoltages(VoltagesData &voltagesData); - bool readStatus(ushort &status); + bool readtqStatus(ushort &status); bool readMemory(Pic::MemoryRangeType type, ::Device::Array &data, const ::Programmer::VerifyData *vdata); bool writeMemory(Pic::MemoryRangeType type, const ::Device::Array &data, bool force); bool eraseAll(); diff --git a/src/progs/pickit2v2/base/pickit2v2_data.cpp b/src/progs/pickit2v2/base/pickit2v2_data.cpp index b93fad4..68a41aa 100644 --- a/src/progs/pickit2v2/base/pickit2v2_data.cpp +++ b/src/progs/pickit2v2/base/pickit2v2_data.cpp @@ -686,17 +686,17 @@ const CData *DATA_LIST[] = { &PIC33FJ64GP708_DATA,&PIC33FJ64GP710_DATA,&PIC33FJ64MC506_DATA,&PIC33FJ64MC508_DATA,&PIC33FJ64MC510_DATA,&PIC33FJ64MC706_DATA,&PIC33FJ64MC710_DATA,0 }; -const CData *cdata(const QString &device) +const CData *cdata(const TQString &device) { for(uint i=0; DATA_LIST[i]; i++) if ( device==DATA_LIST[i]->name ) return DATA_LIST[i]; return 0; } -::Group::Support support(const QString &) +::Group::Support support(const TQString &) { return ::Group::Support::Untested; } -const Data &data(const QString &device) +const Data &data(const TQString &device) { return cdata(device)->data; } @@ -736,7 +736,7 @@ const ScriptData SCRIPT_DATA[] = { { "DBG_BulkWrData.1", 1, 18, { 0xAAF5, 0xAADF, 0xBB04, 0xAAE0, 0xAAE6, 0xBB00, 0x000C, 0xAADE, 0xAADE, 0xAADE, 0xAADE, 0xAADE, 0xAADD, 0xBB01, 0xAAF4, 0xAAE3, 0xAAE0, 0xAAF4 } }, { "DBG_BulkRdData.1", 1, 18, { 0xAAF5, 0xAADF, 0xBB03, 0xAAE0, 0xAAE6, 0xBB00, 0x000C, 0xAADE, 0xAADE, 0xAADE, 0xAADE, 0xAAE0, 0xAADD, 0xBB01, 0xAAF4, 0xAAE3, 0xAAE0, 0xAAF4 } }, { "DBG_SStep.1", 1, 10, { 0xAAF5, 0xAADF, 0xBB1A, 0xAAE0, 0xAAF4, 0xAAE6, 0xBB00, 0xBB04, 0xAAE3, 0xAAE0 } }, - { "DBG_Status.1", 0, 1, { 0xAADC } }, + { "DBG_tqStatus.1", 0, 1, { 0xAADC } }, { "24_ProgEntry.1", 1, 31, { 0xAAFA, 0xAAF7, 0xAAF9, 0xAAF5, 0xAAF3, 0xBB00, 0xAAE8, 0x0014, 0xAAF6, 0xAAFB, 0xAAE7, 0x00EB, 0xAAFA, 0xAAF7, 0xAAE7, 0x002F, 0xAAF2, 0xBBB2, 0xAAF2, 0xBBC2, 0xAAF2, 0xBB12, 0xAAF2, 0xBB8A, 0xAAF6, 0xAAFB, 0xAAE8, 0x0009, 0xAAEE, 0xBB05, 0xBB00 } }, { "24_RdDevID.1", 0, 47, { 0xAAD9, 0xBB00, 0xBB02, 0xBB04, 0xAAD9, 0xBB00, 0xBB02, 0xBB04, 0xAAD8, 0xAAD8, 0xAAD8, 0xAAD9, 0xBB00, 0xBB02, 0xBB04, 0xAAD8, 0xAAD9, 0xBBF0, 0xBB0F, 0xBB20, 0xAAD9, 0xBB90, 0xBB01, 0xBB88, 0xAAD9, 0xBB06, 0xBB00, 0xBB20, 0xAAD8, 0xAAD8, 0xAAD9, 0xBB07, 0xBB00, 0xBB20, 0xAAD9, 0xBBB6, 0xBB0B, 0xBBBA, 0xAAD8, 0xAAD8, 0xAAD9, 0xBB20, 0xBB3C, 0xBB88, 0xAAD8, 0xAAD7, 0xAAD8 } }, { "24_SetAddr.1", 0, 29, { 0xAAD9, 0xBB00, 0xBB02, 0xBB04, 0xAAD9, 0xBB00, 0xBB02, 0xBB04, 0xAAD8, 0xAAD8, 0xAAD8, 0xAAD9, 0xBB00, 0xBB02, 0xBB04, 0xAAD8, 0xAAD4, 0xBB06, 0xAAD3, 0xBB00, 0xAAD9, 0xBB90, 0xBB01, 0xBB88, 0xAAD9, 0xBB47, 0xBB78, 0xBB20, 0xAAD8 } }, diff --git a/src/progs/pickit2v2/base/pickit2v2_data.h b/src/progs/pickit2v2/base/pickit2v2_data.h index 272fe92..582c485 100644 --- a/src/progs/pickit2v2/base/pickit2v2_data.h +++ b/src/progs/pickit2v2/base/pickit2v2_data.h @@ -9,7 +9,7 @@ #ifndef PICKIT2V2_DATA_H #define PICKIT2V2_DATA_H -#include +#include namespace Pickit2V2 { @@ -81,7 +81,7 @@ struct Data { uchar codeMemoryNbWriteWords, eepromMemoryNbWriteWords; uchar scriptIndexes[Nb_ScriptTypes]; }; -extern const Data &data(const QString &device); +extern const Data &data(const TQString &device); struct FamilyData { Pic::Architecture architecture; diff --git a/src/progs/pickit2v2/base/pickit2v2_prog.cpp b/src/progs/pickit2v2/base/pickit2v2_prog.cpp index 3a44bca..b75cc56 100644 --- a/src/progs/pickit2v2/base/pickit2v2_prog.cpp +++ b/src/progs/pickit2v2/base/pickit2v2_prog.cpp @@ -40,7 +40,7 @@ bool Pickit2V2::Base::identifyDevice() if ( !_targetSelfPowered ) { if ( !hardware().setVddVoltage(vdd, 0.85)) return false; } - QString message = i18n("Unknown device"); + TQString message = i18n("Unknown device"); for (uint i=0; FAMILY_DATA[i].architecture!=Pic::Architecture::Nb_Types; i++) { const FamilyData &fdata = FAMILY_DATA[i]; if ( fdata.readDevIdScript==0 ) { @@ -59,8 +59,8 @@ bool Pickit2V2::Base::identifyDevice() if ( !hardware().executeScript(fdata.progExitScript) ) return false; uint rawId = (data[2]<<8) + data[1]; if (fdata.progMemShift) rawId >>= 1; - log(Log::DebugLevel::Normal, QString("Read id for family %1: %2").arg(fdata.architecture.key()).arg(toHexLabelAbs(rawId))); - QMap ids; + log(Log::DebugLevel::Normal, TQString("Read id for family %1: %2").tqarg(fdata.architecture.key()).tqarg(toHexLabelAbs(rawId))); + TQMap ids; ::Group::Base::ConstIterator it; for (it=group().begin(); it!=group().end(); ++it) { const Pic::Data *data = static_cast(it.data().data); @@ -69,9 +69,9 @@ bool Pickit2V2::Base::identifyDevice() if ( data->matchId(rawId, idata) ) ids[it.key()] = idata; } if ( ids.count()!=0 ) { - log(Log::LineType::Information, i18n("Read id: %1").arg(device()->idNames(ids).join("; "))); - if ( ids.contains(device()->name()) ) return true; - message = i18n("Read id does not match the specified device name \"%1\".").arg(device()->name()); + log(Log::LineType::Information, i18n("Read id: %1").tqarg(device()->idNames(ids).join("; "))); + if ( ids.tqcontains(device()->name()) ) return true; + message = i18n("Read id does not match the specified device name \"%1\".").tqarg(device()->name()); break; } } @@ -79,7 +79,7 @@ bool Pickit2V2::Base::identifyDevice() logUserAbort(); return false; } - log(Log::LineType::Information, i18n("Continue with the specified device name: \"%1\"...").arg(device()->name())); + log(Log::LineType::Information, i18n("Continue with the specified device name: \"%1\"...").tqarg(device()->name())); return true; } @@ -92,13 +92,13 @@ bool Pickit2V2::Base::setTarget() bool Pickit2V2::Base::selfTest(bool ask) { ushort status; - if ( !hardware().readStatus(status) ) return false; - QString error; + if ( !hardware().readtqStatus(status) ) return false; + TQString error; if ( status & VppError ) error += i18n("Vpp voltage level error; "); if ( status & VddError ) error += i18n("Vdd voltage level error; "); if ( error.isEmpty() ) return true; - log(Log::LineType::Warning, i18n("Self-test failed: %1").arg(error)); - if ( ask && !askContinue(i18n("Self-test failed (%1). Do you want to continue anyway?").arg(error)) ) { + log(Log::LineType::Warning, i18n("Self-test failed: %1").tqarg(error)); + if ( ask && !askContinue(i18n("Self-test failed (%1). Do you want to continue anyway?").tqarg(error)) ) { logUserAbort(); return false; } diff --git a/src/progs/pickit2v2/base/pickit2v2_prog.h b/src/progs/pickit2v2/base/pickit2v2_prog.h index 3653649..5c9f764 100644 --- a/src/progs/pickit2v2/base/pickit2v2_prog.h +++ b/src/progs/pickit2v2/base/pickit2v2_prog.h @@ -19,6 +19,7 @@ class Hardware; class Base : public Pickit2::Base { Q_OBJECT + TQ_OBJECT public: Base(const Programmer::Group &group, const Pic::Data *data); virtual bool setTarget(); @@ -35,8 +36,8 @@ private: class Group : public Programmer::PicGroup { public: - virtual QString name() const { return "pickit2v2"; } - virtual QString label() const { return i18n("PICkit2 Firmware 2.x"); } + virtual TQString name() const { return "pickit2v2"; } + virtual TQString label() const { return i18n("PICkit2 Firmware 2.x"); } virtual Programmer::Properties properties() const { return ::Programmer::Programmer | ::Programmer::HasFirmware | ::Programmer::CanUploadFirmware | ::Programmer::CanReadMemory | ::Programmer::HasConnectedState; } virtual bool canReadVoltage(Pic::VoltageType type) const { return ( type==Pic::TargetVdd || type==Pic::TargetVpp ); } virtual ::Programmer::TargetPowerMode targetPowerMode() const { return ::Programmer::TargetPowerModeFromConfig; } diff --git a/src/progs/pickit2v2/gui/pickit2v2_group_ui.cpp b/src/progs/pickit2v2/gui/pickit2v2_group_ui.cpp index b3596fd..1deff68 100644 --- a/src/progs/pickit2v2/gui/pickit2v2_group_ui.cpp +++ b/src/progs/pickit2v2/gui/pickit2v2_group_ui.cpp @@ -11,12 +11,12 @@ #include "progs/gui/prog_config_widget.h" #include "progs/pickit2v2/base/pickit2v2_prog.h" -::Programmer::ConfigWidget *Pickit2V2::GroupUI::createConfigWidget(QWidget *parent) const +::Programmer::ConfigWidget *Pickit2V2::GroupUI::createConfigWidget(TQWidget *tqparent) const { - return new ::Programmer::ConfigWidget(static_cast(group()), parent); + return new ::Programmer::ConfigWidget(static_cast(group()), tqparent); } -::Programmer::AdvancedDialog *Pickit2V2::GroupUI::createAdvancedDialog(::Programmer::Base &base, QWidget *parent) const +::Programmer::AdvancedDialog *Pickit2V2::GroupUI::createAdvancedDialog(::Programmer::Base &base, TQWidget *tqparent) const { - return new ::Programmer::AdvancedDialog(static_cast(base), parent, "pickit2v2_advanced_dialog"); + return new ::Programmer::AdvancedDialog(static_cast(base), tqparent, "pickit2v2_advanced_dialog"); } diff --git a/src/progs/pickit2v2/gui/pickit2v2_group_ui.h b/src/progs/pickit2v2/gui/pickit2v2_group_ui.h index 6c5ff64..7023367 100644 --- a/src/progs/pickit2v2/gui/pickit2v2_group_ui.h +++ b/src/progs/pickit2v2/gui/pickit2v2_group_ui.h @@ -16,9 +16,9 @@ namespace Pickit2V2 class GroupUI : public ::Programmer::GroupUI { public: - virtual ::Programmer::ConfigWidget *createConfigWidget(QWidget *parent) const; + virtual ::Programmer::ConfigWidget *createConfigWidget(TQWidget *tqparent) const; virtual bool hasAdvancedDialog() const { return true; } - virtual ::Programmer::AdvancedDialog *createAdvancedDialog(::Programmer::Base &base, QWidget *parent) const; + virtual ::Programmer::AdvancedDialog *createAdvancedDialog(::Programmer::Base &base, TQWidget *tqparent) const; }; } // namespace diff --git a/src/progs/psp/base/psp.cpp b/src/progs/psp/base/psp.cpp index 1b76bf5..188fbcb 100644 --- a/src/progs/psp/base/psp.cpp +++ b/src/progs/psp/base/psp.cpp @@ -13,9 +13,9 @@ #include "common/common/misc.h" //----------------------------------------------------------------------------- -QMemArray Psp::createConfigInfo(const Pic::Data &data) +TQMemArray Psp::createConfigInfo(const Pic::Data &data) { - QMemArray array(33); + TQMemArray array(33); array.fill(0x00); const Pic::Config &config = data.config(); @@ -35,10 +35,10 @@ QMemArray Psp::createConfigInfo(const Pic::Data &data) return array; } -QMemArray Psp::createDeviceInfo(const Pic::Data &data) +TQMemArray Psp::createDeviceInfo(const Pic::Data &data) { - QMemArray config = createConfigInfo(data); - QMemArray array(45); + TQMemArray config = createConfigInfo(data); + TQMemArray array(45); array.fill(0x00); // memory code length @@ -46,7 +46,7 @@ QMemArray Psp::createDeviceInfo(const Pic::Data &data) array[0] = v.byte(1); array[1] = v.byte(0); // address word width - v = data.mask(Pic::MemoryRangeType::Code); + v = data.tqmask(Pic::MemoryRangeType::Code); array[2] = v.byte(1); array[3] = v.byte(0); // data word width @@ -59,12 +59,12 @@ QMemArray Psp::createDeviceInfo(const Pic::Data &data) if ( data.nbBytesWord(Pic::MemoryRangeType::UserId)==1 ) v += v << 8; array[6] = v.byte(1); array[7] = v.byte(0); - // user id mask + // user id tqmask array[8] = v.byte(1); array[9] = v.byte(0); } - // memory config mask + // memory config tqmask array[10] = config[0]; array[11] = config[1]; array[12] = config[16]; @@ -72,20 +72,20 @@ QMemArray Psp::createDeviceInfo(const Pic::Data &data) if ( data.isReadable(Pic::MemoryRangeType::Eeprom) ) { // memory eeprom width - v = data.mask(Pic::MemoryRangeType::Eeprom); + v = data.tqmask(Pic::MemoryRangeType::Eeprom); array[14] = v.byte(1); array[15] = v.byte(0); - // memory eeprom mask + // memory eeprom tqmask array[16] = v.byte(1); array[17] = v.byte(0); } if ( data.isReadable(Pic::MemoryRangeType::Cal) ) { // memory calibration width - v = data.mask(Pic::MemoryRangeType::Cal); + v = data.tqmask(Pic::MemoryRangeType::Cal); array[18] = v.byte(1); array[19] = v.byte(0); - // memory calibration mask + // memory calibration tqmask array[20] = v.byte(1); array[21] = v.byte(0); } @@ -159,8 +159,8 @@ QMemArray Psp::createDeviceInfo(const Pic::Data &data) } //----------------------------------------------------------------------------- -Psp::Hardware::Hardware(::Programmer::Base &base, const QString &portDevice) - : Programmer::PicHardware(base, new SerialPort(portDevice, base), QString::null) +Psp::Hardware::Hardware(::Programmer::Base &base, const TQString &portDevice) + : Programmer::PicHardware(base, new SerialPort(portDevice, base), TQString()) {} bool Psp::Hardware::internalConnectHardware() @@ -168,7 +168,7 @@ bool Psp::Hardware::internalConnectHardware() if ( !port()->open() ) return false; if ( !port()->reset() ) return false; // #### TODO: detect Warp13 or JuPic - QMemArray a; + TQMemArray a; if ( !port()->command(0x88, 1, a) ) return false; if ( a[0]!=0xAB ) { log(Log::LineType::Error, i18n("Wrong programmer connected")); @@ -179,13 +179,13 @@ bool Psp::Hardware::internalConnectHardware() bool Psp::Hardware::getFirmwareVersion(VersionData &version) { - QMemArray a1; + TQMemArray a1; if ( !port()->commandAck(0x8D, 2, &a1) ) return false; if ( a1[1]==0xFF ) { log(Log::LineType::Warning, i18n("Invalid firmware version")); version = VersionData(0xFF, 0, 0); } else { - QMemArray a2; + TQMemArray a2; if ( !port()->receive(2, a2) ) return false; version = VersionData(a1[1], a2[0], a2[1]); } @@ -197,7 +197,7 @@ bool Psp::Hardware::setTarget() log(Log::DebugLevel::Max, "set target"); // load device info if ( !port()->commandAck(0x81) ) return false; - QMemArray a = createDeviceInfo(device()); + TQMemArray a = createDeviceInfo(device()); if ( !port()->send(a) ) return false; if ( !port()->receiveEnd() ) return false; @@ -212,7 +212,7 @@ bool Psp::Hardware::setTarget() bool Psp::Hardware::setRange(uint start, uint size) { - QMemArray a(6); + TQMemArray a(6); a[0] = 0x8E; a[1] = start >> 16; a[2] = (start >> 8) & 0xFF; @@ -220,7 +220,7 @@ bool Psp::Hardware::setRange(uint start, uint size) a[4] = size >> 8; a[5] = size & 0xFF; if ( !port()->send(a) ) return false; - QMemArray r; + TQMemArray r; if ( !port()->receive(6, r) ) return false; for (uint i=0; i<6; i++) { if ( r[i]!=a[i] ) { @@ -269,7 +269,7 @@ char Psp::Hardware::writeCommand(Pic::MemoryRangeType type) bool Psp::Hardware::readMemory(Pic::MemoryRangeType type, Device::Array &data, const ::Programmer::VerifyData *vdata) { - QMemArray a; + TQMemArray a; uint nbWords = device().nbWords(type); data.resize(nbWords); uint nbBytes = nbWords * device().nbBytesWord(type); @@ -281,8 +281,8 @@ bool Psp::Hardware::readMemory(Pic::MemoryRangeType type, Device::Array &data, c for (uint i=0; ireceive(2, a) ) return false; data[i] = (a[0] << 8) + a[1]; -// log(Log::DebugLevel::Max, QString("code data %1: %2 (%3, %4)").arg(i).arg(toHexLabel(data[i], 4)) -// .arg(toHexLabel(a[0], 2)).arg(toHexLabel(a[1], 2))); +// log(Log::DebugLevel::Max, TQString("code data %1: %2 (%3, %4)").tqarg(i).tqarg(toHexLabel(data[i], 4)) +// .tqarg(toHexLabel(a[0], 2)).tqarg(toHexLabel(a[1], 2))); } if ( !port()->receiveEnd() ) return false; break; @@ -336,7 +336,7 @@ bool Psp::Hardware::writeMemory(Pic::MemoryRangeType type, const Device::Array & bool Psp::Hardware::eraseAll() { - QMemArray a; + TQMemArray a; if ( !port()->commandAck(0x8F, 2, &a) ) return false; if ( a[1]!=0x00 ) { log(Log::LineType::Error, i18n("Erase failed")); diff --git a/src/progs/psp/base/psp.h b/src/progs/psp/base/psp.h index ad4a160..087b1aa 100644 --- a/src/progs/psp/base/psp.h +++ b/src/progs/psp/base/psp.h @@ -16,14 +16,14 @@ namespace Psp { - extern QMemArray createConfigInfo(const Pic::Data &data); - extern QMemArray createDeviceInfo(const Pic::Data &data); + extern TQMemArray createConfigInfo(const Pic::Data &data); + extern TQMemArray createDeviceInfo(const Pic::Data &data); //----------------------------------------------------------------------------- class Hardware : public Programmer::PicHardware { public: - Hardware(::Programmer::Base &base, const QString &portDevice); + Hardware(::Programmer::Base &base, const TQString &portDevice); SerialPort *port() { return static_cast(_port); } virtual bool uploadFirmware(const Pic::Memory &) { return false; } virtual bool setTarget(); diff --git a/src/progs/psp/base/psp_data.h b/src/progs/psp/base/psp_data.h index c643961..509ee71 100644 --- a/src/progs/psp/base/psp_data.h +++ b/src/progs/psp/base/psp_data.h @@ -9,15 +9,15 @@ #ifndef PSP_DATA_H #define PSP_DATA_H -#include +#include namespace Psp { struct Data { uint algorithm, overprogram, tries; }; - extern bool isSupported(const QString &device); - extern const Data &data(const QString &device); + extern bool isSupported(const TQString &device); + extern const Data &data(const TQString &device); } // namespace #endif diff --git a/src/progs/psp/base/psp_prog.h b/src/progs/psp/base/psp_prog.h index ef525cd..02d0c68 100644 --- a/src/progs/psp/base/psp_prog.h +++ b/src/progs/psp/base/psp_prog.h @@ -18,6 +18,7 @@ namespace Psp class Base : public Programmer::PicBase { Q_OBJECT + TQ_OBJECT public: Base(const Programmer::Group &group, const Pic::Data *data) : Programmer::PicBase(group, data, "psp_programmer_base") {} @@ -33,9 +34,9 @@ protected: class Group : public ::Programmer::PicGroup { public: - virtual QString name() const { return "psp"; } - virtual QString label() const { return i18n("Picstart Plus"); } - virtual QString xmlName() const { return "psp"; } + virtual TQString name() const { return "psp"; } + virtual TQString label() const { return i18n("Picstart Plus"); } + virtual TQString xmlName() const { return "psp"; } virtual ::Programmer::Properties properties() const; virtual ::Programmer::TargetPowerMode targetPowerMode() const { return ::Programmer::TargetExternallyPowered; } virtual bool isPortSupported(PortType type) const { return ( type==PortType::Serial ); } diff --git a/src/progs/psp/base/psp_serial.cpp b/src/progs/psp/base/psp_serial.cpp index 964d604..7da4c00 100644 --- a/src/progs/psp/base/psp_serial.cpp +++ b/src/progs/psp/base/psp_serial.cpp @@ -14,7 +14,7 @@ #include "common/common/number.h" //----------------------------------------------------------------------------- -Psp::SerialPort::SerialPort(const QString &device, Log::Base &log) +Psp::SerialPort::SerialPort(const TQString &device, Log::Base &log) : Port::Serial(device, NeedFlush, log) {} @@ -46,9 +46,9 @@ bool Psp::SerialPort::reset() return flush(0); } -bool Psp::SerialPort::command(uchar c, uint nbBytes, QMemArray &a) +bool Psp::SerialPort::command(uchar c, uint nbBytes, TQMemArray &a) { - log(Log::DebugLevel::Extra, QString("Command %1").arg(toHexLabel(c, 2))); + log(Log::DebugLevel::Extra, TQString("Command %1").tqarg(toHexLabel(c, 2))); if ( !sendChar(c) ) return false; return receive(nbBytes, a); } @@ -57,7 +57,7 @@ bool Psp::SerialPort::checkAck(uchar ec, uchar rc) { if ( ec==rc ) return true; log(Log::LineType::Error, i18n("Incorrect ack: expecting %1, received %2") - .arg(QString(toHex(ec, 2))).arg(QString(toHex(rc, 2)))); + .tqarg(TQString(toHex(ec, 2))).tqarg(TQString(toHex(rc, 2)))); return false; } @@ -65,14 +65,14 @@ bool Psp::SerialPort::checkEnd(uchar c) { if ( c==0 ) return true; log(Log::LineType::Error, i18n("Incorrect received data end: expecting 00, received %1") - .arg(QString(toHex(c, 2)))); + .tqarg(TQString(toHex(c, 2)))); return false; } -bool Psp::SerialPort::commandAck(uchar c, uint nbBytes, QMemArray *a) +bool Psp::SerialPort::commandAck(uchar c, uint nbBytes, TQMemArray *a) { Q_ASSERT( nbBytes>=1 ); - QMemArray tmp; + TQMemArray tmp; if ( !command(c, nbBytes, tmp) ) return false; if ( !checkAck(c, tmp[0]) ) return false; if (a) *a = tmp; @@ -81,13 +81,13 @@ bool Psp::SerialPort::commandAck(uchar c, uint nbBytes, QMemArray *a) bool Psp::SerialPort::receiveEnd() { - QMemArray a; + TQMemArray a; if ( !receive(1, a) ) return false; if ( !checkEnd(a[0]) ) return false; return true; } -bool Psp::SerialPort::commandAckEnd(uchar c, uint nbBytes, QMemArray &a) +bool Psp::SerialPort::commandAckEnd(uchar c, uint nbBytes, TQMemArray &a) { Q_ASSERT( nbBytes>=2 ); if ( !command(c, nbBytes, a) ) return false; @@ -100,7 +100,7 @@ bool Psp::SerialPort::sendData(uint value, uint nbBytes) { Q_ASSERT( nbBytes==1 || nbBytes==2 ); Q_ASSERT( value a(nbBytes); + TQMemArray a(nbBytes); if ( nbBytes==2 ) { a[0] = value / 256; a[1] = value & 0xFF; diff --git a/src/progs/psp/base/psp_serial.h b/src/progs/psp/base/psp_serial.h index 6f379dd..a7ebf77 100644 --- a/src/progs/psp/base/psp_serial.h +++ b/src/progs/psp/base/psp_serial.h @@ -18,12 +18,12 @@ namespace Psp class SerialPort : public Port::Serial { public: - SerialPort(const QString &portDevice, Log::Base &log); + SerialPort(const TQString &portDevice, Log::Base &log); bool open(); bool reset(); - bool command(uchar c, uint nbBytes, QMemArray &a); - bool commandAck(uchar c, uint nbBytes = 1, QMemArray *a = 0); - bool commandAckEnd(uchar c, uint nbBytes, QMemArray &a); + bool command(uchar c, uint nbBytes, TQMemArray &a); + bool commandAck(uchar c, uint nbBytes = 1, TQMemArray *a = 0); + bool commandAckEnd(uchar c, uint nbBytes, TQMemArray &a); bool receiveEnd(); bool sendData(uint value, uint nbBytes); diff --git a/src/progs/psp/gui/psp_group_ui.cpp b/src/progs/psp/gui/psp_group_ui.cpp index e3f2546..ac9c70c 100644 --- a/src/progs/psp/gui/psp_group_ui.cpp +++ b/src/progs/psp/gui/psp_group_ui.cpp @@ -11,12 +11,12 @@ #include "progs/gui/prog_config_widget.h" #include "devices/pic/gui/pic_prog_group_ui.h" -::Programmer::ConfigWidget *Psp::GroupUI::createConfigWidget(QWidget *parent) const +::Programmer::ConfigWidget *Psp::GroupUI::createConfigWidget(TQWidget *tqparent) const { - return new ::Programmer::ConfigWidget(static_cast(group()), parent); + return new ::Programmer::ConfigWidget(static_cast(group()), tqparent); } -::Programmer::AdvancedDialog *Psp::GroupUI::createAdvancedDialog(::Programmer::Base &base, QWidget *parent) const +::Programmer::AdvancedDialog *Psp::GroupUI::createAdvancedDialog(::Programmer::Base &base, TQWidget *tqparent) const { - return new ::Programmer::PicAdvancedDialog(static_cast< ::Programmer::PicBase &>(base), parent, "psp_advanced_dialog"); + return new ::Programmer::PicAdvancedDialog(static_cast< ::Programmer::PicBase &>(base), tqparent, "psp_advanced_dialog"); } diff --git a/src/progs/psp/gui/psp_group_ui.h b/src/progs/psp/gui/psp_group_ui.h index fc1534a..be0b4ac 100644 --- a/src/progs/psp/gui/psp_group_ui.h +++ b/src/progs/psp/gui/psp_group_ui.h @@ -18,9 +18,9 @@ class Group; class GroupUI : public ::Programmer::GroupUI { public: - virtual ::Programmer::ConfigWidget *createConfigWidget(QWidget *parent) const; + virtual ::Programmer::ConfigWidget *createConfigWidget(TQWidget *tqparent) const; virtual bool hasAdvancedDialog() const { return true; } - virtual ::Programmer::AdvancedDialog *createAdvancedDialog(::Programmer::Base &base, QWidget *parent) const; + virtual ::Programmer::AdvancedDialog *createAdvancedDialog(::Programmer::Base &base, TQWidget *tqparent) const; }; } // namespace diff --git a/src/progs/psp/xml/xml_psp_parser.cpp b/src/progs/psp/xml/xml_psp_parser.cpp index 5cdd289..8b8875b 100644 --- a/src/progs/psp/xml/xml_psp_parser.cpp +++ b/src/progs/psp/xml/xml_psp_parser.cpp @@ -19,11 +19,11 @@ public: XmlToData() : Programmer::XmlToData("psp", "Psp") {} private: - virtual void parseData(QDomElement element, Data &data); - virtual void outputData(const Data &data, QTextStream &s) const; + virtual void parseData(TQDomElement element, Data &data); + virtual void outputData(const Data &data, TQTextStream &s) const; }; -void Psp::XmlToData::parseData(QDomElement element, Data &data) +void Psp::XmlToData::parseData(TQDomElement element, Data &data) { bool ok; data.algorithm = element.attribute("algorithm").toUInt(&ok); @@ -34,7 +34,7 @@ void Psp::XmlToData::parseData(QDomElement element, Data &data) if ( !ok ) qFatal("Missing or invalid tries"); } -void Psp::XmlToData::outputData(const Data &data, QTextStream &s) const +void Psp::XmlToData::outputData(const Data &data, TQTextStream &s) const { s << data.algorithm << ", " << data.overprogram << ", " << data.tries; } diff --git a/src/progs/sdcdb/base/sdcdb_debug.cpp b/src/progs/sdcdb/base/sdcdb_debug.cpp index fcccf22..d8d4ad4 100644 --- a/src/progs/sdcdb/base/sdcdb_debug.cpp +++ b/src/progs/sdcdb/base/sdcdb_debug.cpp @@ -9,7 +9,7 @@ #include "gpsim_debug.h" #include -#include +#include #include "devices/list/device_list.h" #include "devices/pic/pic/pic_debug.h" @@ -52,10 +52,10 @@ bool GPSim::Debugger::internalStep() return hardware()->execute("step", true); } -bool GPSim::Debugger::setBreakpoints(const QValueList
&list) +bool GPSim::Debugger::setBreakpoints(const TQValueList
&list) { for (uint i=0; i<_nbBreakpoints; i++) - if ( !hardware()->execute("clear " + QString::number(i), true) ) return false; + if ( !hardware()->execute("clear " + TQString::number(i), true) ) return false; for (uint i=0; iexecute("break e 0x" + toHex(list[i], nbChars(list[i].toUInt())), true) ) return false; _nbBreakpoints = list.count(); @@ -75,15 +75,15 @@ bool GPSim::Debugger::updateState() return true; } -bool GPSim::Debugger::findRegExp(const QStringList &lines, const QString &pattern, - const QString &label, QString &value) const +bool GPSim::Debugger::findRegExp(const TQStringList &lines, const TQString &pattern, + const TQString &label, TQString &value) const { - QRegExp rexp(pattern); + TQRegExp rexp(pattern); uint i = 0; for (; iversion()<=VersionData(0, 21, 7) || hardware()->version()>=VersionData(0, 22, 0) ) return getRegister("W", value); - QStringList lines; + TQStringList lines; if ( !hardware()->execute("dump s", true, &lines) ) return false; - QString s; + TQString s; if ( !findRegExp(lines, "^\\s*[0-9A-Fa-f]+\\s+(\\w+)\\s*=\\s*([0-9A-Fa-f]+)", "W", s) ) { log(Log::Error, i18n("Error reading register \"W\"")); return false; @@ -110,10 +110,10 @@ bool GPSim::Debugger::readWreg(BitValue &value) return true; } -bool GPSim::Debugger::getRegister(const QString &name, BitValue &value) +bool GPSim::Debugger::getRegister(const TQString &name, BitValue &value) { - QStringList lines; - QRegExp r; + TQStringList lines; + TQRegExp r; if ( hardware()->version()execute("x " + name, true, &lines) ) return false; r.setPattern("\\w+\\s*[][\\w]+\\s*=\\s*(?:0x|)([0-9A-Fa-f]+)(?:\\W.*|)"); @@ -125,7 +125,7 @@ bool GPSim::Debugger::getRegister(const QString &name, BitValue &value) for (; iregistersData(); - QString name = toHex(address, rdata.nbCharsAddress()); + TQString name = toHex(address, rdata.nbCharsAddress()); if ( hardware()->version()registersData().sfrNames[data.address()]; + TQString name = device()->registersData().sfrNames[data.address()]; if ( name=="WREG" ) return readWreg(value); if ( !name.isEmpty() ) return getRegister(name.lower(), value); return getRegister(data.address(), value); } -bool GPSim::Debugger::setRegister(const QString &name, BitValue value) +bool GPSim::Debugger::setRegister(const TQString &name, BitValue value) { if ( hardware()->version()registersData(); - QString s = QString("%1 = %2").arg(name).arg(toHexLabel(value, rdata.nbChars())); + TQString s = TQString("%1 = %2").tqarg(name).tqarg(toHexLabel(value, rdata.nbChars())); return hardware()->execute(s, true); } bool GPSim::Debugger::setRegister(Address address, BitValue value) { const Pic::RegistersData &rdata = device()->registersData(); - QString s = QString("ramData[$%1]").arg(toHex(address, rdata.nbCharsAddress())); + TQString s = TQString("ramData[$%1]").tqarg(toHex(address, rdata.nbCharsAddress())); return setRegister(s, value); } @@ -184,7 +184,7 @@ bool GPSim::Debugger::writeRegister(const Register::TypeData &data, BitValue val return false; } const Pic::RegistersData &rdata = device()->registersData(); - QString name = rdata.sfrNames[data.address()]; + TQString name = rdata.sfrNames[data.address()]; if ( !name.isEmpty() ) return setRegister(name.lower(), value); return setRegister(data.address(), value); } @@ -194,16 +194,16 @@ bool GPSim::Debugger::writeWreg(BitValue value) return setRegister("W", value); } -bool GPSim::Debugger::updatePortStatus(uint index, QMap &bits) +bool GPSim::Debugger::updatePorttqStatus(uint index, TQMap &bits) { for (uint i=0; iregistersData().hasPortBit(index, i) ) continue; - QString name = device()->registersData().portName(index).lower() + QString::number(i); - QStringList lines; + TQString name = device()->registersData().portName(index).lower() + TQString::number(i); + TQStringList lines; if ( !hardware()->execute("symbol " + name, true, &lines) ) return false; - QString pattern = "^(\\w+)=([^\\s])+\\s*", value; + TQString pattern = "^(\\w+)=([^\\s])+\\s*", value; if ( !findRegExp(lines, pattern, "bitState", value) || value.length()!=1 ) { - log(Log::Error, i18n("Error reading state of IO bit: %1").arg(name)); + log(Log::Error, i18n("Error reading state of IO bit: %1").tqarg(name)); return false; } switch (value[0].latin1()) { @@ -217,24 +217,24 @@ bool GPSim::Debugger::updatePortStatus(uint index, QMap(Device::lister().data(s)); if (data) { diff --git a/src/progs/sdcdb/base/sdcdb_debug.h b/src/progs/sdcdb/base/sdcdb_debug.h index 55cda75..e1f109b 100644 --- a/src/progs/sdcdb/base/sdcdb_debug.h +++ b/src/progs/sdcdb/base/sdcdb_debug.h @@ -19,6 +19,7 @@ namespace SDCDB class Programmer : public ::Programmer::PicBase { Q_OBJECT + TQ_OBJECT public: Programmer(const ::Programmer::Group &group, const Pic::Data *data) : Programmer::PicBase(group, data, "sdcdb_programmer") {} @@ -41,18 +42,18 @@ class Debugger : public ::Debugger::PicBase { public: Debugger(Programmer &programmer); - virtual bool setBreakpoints(const QValueList
&list); + virtual bool setBreakpoints(const TQValueList
&list); virtual bool readRegister(const Register::TypeData &data, BitValue &value); virtual bool writeRegister(const Register::TypeData &data, BitValue value); - virtual bool updatePortStatus(uint index, QMap &bits); + virtual bool updatePorttqStatus(uint index, TQMap &bits); private: uint _nbBreakpoints; - bool findRegExp(const QStringList &lines, const QString &pattern, - const QString &label, QString &value) const; - bool getRegister(const QString &name, BitValue &value); - bool setRegister(const QString &name, BitValue value); + bool findRegExp(const TQStringList &lines, const TQString &pattern, + const TQString &label, TQString &value) const; + bool getRegister(const TQString &name, BitValue &value); + bool setRegister(const TQString &name, BitValue value); bool getRegister(Address address, BitValue &value); bool setRegister(Address address, BitValue value); Hardware *hardware() { return static_cast(_programmer.hardware()); } @@ -72,9 +73,9 @@ private: class Group : public ::Programmer::PicGroup { public: - virtual QString name() const { return "sdcdb"; } - virtual QString label() const { return i18n("SDCDB"); } - virtual QString statusLabel() const; + virtual TQString name() const { return "sdcdb"; } + virtual TQString label() const { return i18n("SDCDB"); } + virtual TQString statusLabel() const; virtual ::Programmer::Properties properties() const { return ::Programmer::Debugger | ::Programmer::HasConnectedState; } virtual ::Programmer::TargetPowerMode targetPowerMode() const { return ::Programmer::TargetSelfPowered; } virtual bool isPortSupported(Port::Type) const { return false; } diff --git a/src/progs/tbl_bootloader/base/tbl_bootloader.cpp b/src/progs/tbl_bootloader/base/tbl_bootloader.cpp index 419ad86..9c52fb7 100644 --- a/src/progs/tbl_bootloader/base/tbl_bootloader.cpp +++ b/src/progs/tbl_bootloader/base/tbl_bootloader.cpp @@ -43,7 +43,7 @@ void TinyBootloader::Config::writeRetries(uint nb) } //----------------------------------------------------------------------------- -TinyBootloader::Hardware::Hardware(::Programmer::Base &base, const QString &portDevice) +TinyBootloader::Hardware::Hardware(::Programmer::Base &base, const TQString &portDevice) : ::Bootloader::Hardware(base, new Port::Serial(portDevice, Port::Serial::NoProperty, base)) { Config config; @@ -76,17 +76,17 @@ bool TinyBootloader::Hardware::internalConnectHardware() bool TinyBootloader::Hardware::verifyDeviceId() { uchar id = data(device().name()).id; - QValueVector list = _base.group().supportedDevices(); - QStringList devices; + TQValueVector list = _base.group().supportedDevices(); + TQStringList devices; for (uint i=0; i(_port); } bool verifyDeviceId(); virtual bool write(Pic::MemoryRangeType type, const Device::Array &data); diff --git a/src/progs/tbl_bootloader/base/tbl_bootloader_data.h b/src/progs/tbl_bootloader/base/tbl_bootloader_data.h index 51be528..d8e7f79 100644 --- a/src/progs/tbl_bootloader/base/tbl_bootloader_data.h +++ b/src/progs/tbl_bootloader/base/tbl_bootloader_data.h @@ -14,8 +14,8 @@ namespace TinyBootloader struct Data { uchar id; }; - extern bool isSupported(const QString &device); - extern const Data &data(const QString &device); + extern bool isSupported(const TQString &device); + extern const Data &data(const TQString &device); } // namespace #endif diff --git a/src/progs/tbl_bootloader/base/tbl_bootloader_prog.h b/src/progs/tbl_bootloader/base/tbl_bootloader_prog.h index 75b986d..08cbf3f 100644 --- a/src/progs/tbl_bootloader/base/tbl_bootloader_prog.h +++ b/src/progs/tbl_bootloader/base/tbl_bootloader_prog.h @@ -18,6 +18,7 @@ namespace TinyBootloader class ProgrammerBase : public ::Bootloader::ProgrammerBase { Q_OBJECT + TQ_OBJECT public: ProgrammerBase(const Programmer::Group &group, const Pic::Data *data); virtual bool verifyDeviceId() { return static_cast(hardware()).verifyDeviceId(); } @@ -27,8 +28,8 @@ public: class Group : public ::Bootloader::Group { public: - virtual QString name() const { return "tbl_bootloader"; } - virtual QString label() const { return i18n("Tiny Bootloader"); } + virtual TQString name() const { return "tbl_bootloader"; } + virtual TQString label() const { return i18n("Tiny Bootloader"); } virtual ::Programmer::Properties properties() const { return ::Programmer::Programmer; } virtual ::Programmer::TargetPowerMode targetPowerMode() const { return ::Programmer::TargetSelfPowered; } virtual bool isPortSupported(PortType type) const { return type==PortType::Serial; } diff --git a/src/progs/tbl_bootloader/gui/tbl_bootloader_ui.cpp b/src/progs/tbl_bootloader/gui/tbl_bootloader_ui.cpp index 5b576b9..f0c1725 100644 --- a/src/progs/tbl_bootloader/gui/tbl_bootloader_ui.cpp +++ b/src/progs/tbl_bootloader/gui/tbl_bootloader_ui.cpp @@ -12,29 +12,29 @@ #include "common/port/serial.h" //----------------------------------------------------------------------------- -TinyBootloader::ConfigWidget::ConfigWidget(const::Programmer::Group &group, QWidget *parent) - : ::Programmer::ConfigWidget(group, parent) +TinyBootloader::ConfigWidget::ConfigWidget(const::Programmer::Group &group, TQWidget *tqparent) + : ::Programmer::ConfigWidget(group, tqparent) { uint row = numRows(); - QLabel *label = new QLabel(i18n("Port Speed:"), this); + TQLabel *label = new TQLabel(i18n("Port Speed:"), this); addWidget(label, row,row, 0,0); _speed = new KComboBox(this); for (uint i=0; iinsertItem(QString::number(Port::Serial::SPEED_VALUES[i])); + _speed->insertItem(TQString::number(Port::Serial::SPEED_VALUES[i])); } addWidget(_speed, row,row, 1,1); row++; - label = new QLabel(i18n("Timeout (ms):"), this); + label = new TQLabel(i18n("Timeout (ms):"), this); addWidget(label, row,row, 0,0); _timeout = new KIntNumInput(this); _timeout->setMinValue(0); addWidget(_timeout, row,row, 1,1); row++; - label = new QLabel(i18n("No of Retries:"), this); + label = new TQLabel(i18n("No of Retries:"), this); addWidget(label, row,row, 0,0); _retries = new KIntNumInput(this); _retries->setMinValue(0); @@ -74,7 +74,7 @@ void TinyBootloader::ConfigWidget::loadConfig() } //----------------------------------------------------------------------------- -::Programmer::ConfigWidget *TinyBootloader::GroupUI::createConfigWidget(QWidget *parent) const +::Programmer::ConfigWidget *TinyBootloader::GroupUI::createConfigWidget(TQWidget *tqparent) const { - return new ConfigWidget(static_cast(group()), parent); + return new ConfigWidget(static_cast(group()), tqparent); } diff --git a/src/progs/tbl_bootloader/gui/tbl_bootloader_ui.h b/src/progs/tbl_bootloader/gui/tbl_bootloader_ui.h index d0285af..442b879 100644 --- a/src/progs/tbl_bootloader/gui/tbl_bootloader_ui.h +++ b/src/progs/tbl_bootloader/gui/tbl_bootloader_ui.h @@ -20,8 +20,9 @@ namespace TinyBootloader class ConfigWidget: public ::Programmer::ConfigWidget { Q_OBJECT + TQ_OBJECT public: - ConfigWidget(const ::Programmer::Group &group, QWidget *parent); + ConfigWidget(const ::Programmer::Group &group, TQWidget *tqparent); virtual void loadConfig(); virtual void saveConfig(); @@ -34,7 +35,7 @@ private: class GroupUI : public ::Bootloader::GroupUI { public: - virtual ::Programmer::ConfigWidget *createConfigWidget(QWidget *parent) const; + virtual ::Programmer::ConfigWidget *createConfigWidget(TQWidget *tqparent) const; }; } // namespace diff --git a/src/progs/tbl_bootloader/xml/xml_tbl_bootloader_parser.cpp b/src/progs/tbl_bootloader/xml/xml_tbl_bootloader_parser.cpp index 62ed806..0960cd1 100644 --- a/src/progs/tbl_bootloader/xml/xml_tbl_bootloader_parser.cpp +++ b/src/progs/tbl_bootloader/xml/xml_tbl_bootloader_parser.cpp @@ -22,11 +22,11 @@ public: XmlToData() : Programmer::XmlToData("tbl_bootloader", "TinyBootloader") {} private: - virtual void parseData(QDomElement element, Data &data); - virtual void outputData(const Data &data, QTextStream &s) const; + virtual void parseData(TQDomElement element, Data &data); + virtual void outputData(const Data &data, TQTextStream &s) const; }; -void TinyBootloader::XmlToData::parseData(QDomElement element, Data &data) +void TinyBootloader::XmlToData::parseData(TQDomElement element, Data &data) { const Device::Data *ddata = Device::lister().data(currentDevice()); if ( ddata->group().name()!="pic" ) qFatal("non-pic device not supported"); @@ -37,7 +37,7 @@ void TinyBootloader::XmlToData::parseData(QDomElement element, Data &data) if ( !ok ) qFatal("Invalid \"id\" tag"); } -void TinyBootloader::XmlToData::outputData(const Data &data, QTextStream &s) const +void TinyBootloader::XmlToData::outputData(const Data &data, TQTextStream &s) const { s << data.id; } diff --git a/src/tools/base/generic_tool.h b/src/tools/base/generic_tool.h index 3b3299d..86cd3f2 100644 --- a/src/tools/base/generic_tool.h +++ b/src/tools/base/generic_tool.h @@ -47,11 +47,11 @@ namespace Compile class Data { public: Data() {} - Data(Tool::Category c, const QValueList &i, const QString &d, const Project *p, LinkType lt) + Data(Tool::Category c, const TQValueList &i, const TQString &d, const Project *p, LinkType lt) : category(c), items(i), device(d), project(p), linkType(lt) {} Tool::Category category; - QValueList items; - QString device; + TQValueList items; + TQString device; const Project *project; LinkType linkType; }; @@ -84,13 +84,13 @@ class Base public: virtual ~Base() {} const Group &group() const { return *_group; } - virtual QString baseExecutable(bool withWine, OutputExecutableType type) const = 0; + virtual TQString baseExecutable(bool withWine, OutputExecutableType type) const = 0; PURL::Directory executableDirectory() const; virtual bool checkExecutable() const { return true; } - virtual QStringList checkExecutableOptions(bool withWine) const = 0; + virtual TQStringList checkExecutableOptions(bool withWine) const = 0; virtual PURL::Directory checkExecutableWorkingDirectory() const { return PURL::Directory(); } virtual ::Process::LineOutput *checkExecutableProcess(const PURL::Directory &dir, bool withWine, OutputExecutableType type) const; - virtual bool checkExecutableResult(bool withWine, QStringList &lines) const = 0; + virtual bool checkExecutableResult(bool withWine, TQStringList &lines) const = 0; protected: Category _category; diff --git a/src/tools/base/tool_group.cpp b/src/tools/base/tool_group.cpp index fb347ce..ac5c75e 100644 --- a/src/tools/base/tool_group.cpp +++ b/src/tools/base/tool_group.cpp @@ -58,9 +58,9 @@ PURL::Directory Tool::Group::autodetectDirectory(Compile::DirectoryType, const P return PURL::Directory(); } -QString Tool::Group::defaultLinkerScriptFilename(Compile::LinkType type, const QString &device) const +TQString Tool::Group::defaultLinkerScriptFilename(Compile::LinkType type, const TQString &device) const { - QString basename = device.lower(); + TQString basename = device.lower(); if ( type==Compile::Icd2Linking ) basename += 'i'; return basename + '.' + PURL::extension(PURL::Lkr); } @@ -73,7 +73,7 @@ bool Tool::Group::hasCustomLinkerScript(const ::Project *project) const PURL::Url Tool::Group::linkerScript(const ::Project *project, Compile::LinkType type) const { if ( hasCustomLinkerScript(project) ) return project->customLinkerScript(); - QString filename = defaultLinkerScriptFilename(type, Compile::Config::device(project)); + TQString filename = defaultLinkerScriptFilename(type, Compile::Config::device(project)); return PURL::Url(Compile::Config::directory(*this, Compile::DirectoryType::LinkerScript), filename); } @@ -81,12 +81,12 @@ PURL::Url Tool::Group::linkerScript(const ::Project *project, Compile::LinkType { ::Process::LineOutput *process = new ::Process::LineOutput; Tool::Category cat = checkDevicesCategory(); - QString exec = base(cat)->baseExecutable(withWine, Compile::Config::outputExecutableType(*this)); + TQString exec = base(cat)->baseExecutable(withWine, Compile::Config::outputExecutableType(*this)); process->setup(dir.path() + exec, checkDevicesOptions(i), withWine); return process; } -bool Tool::Group::checkExecutable(Tool::Category category, QStringList &lines) +bool Tool::Group::checkExecutable(Tool::Category category, TQStringList &lines) { PURL::Directory dir = Compile::Config::directory(*this, Compile::DirectoryType::Executable); bool withWine = Compile::Config::withWine(*this); @@ -102,32 +102,32 @@ void Tool::Group::initSupported() { _checkDevicesError = false; Tool::Category cat = checkDevicesCategory(); - QValueList list; - if ( cat==Tool::Category::Nb_Types ) list = getSupportedDevices(QString::null); + TQValueList list; + if ( cat==Tool::Category::Nb_Types ) list = getSupportedDevices(TQString()); else { PURL::Directory dir = Compile::Config::directory(*this, Compile::DirectoryType::Executable); for (uint i=0; isout() + process->serr(); + TQStringList lines = process->sout() + process->serr(); list += getSupportedDevices(lines.join("\n")); } else _checkDevicesError = true; delete process; } } - QValueList::const_iterator it; + TQValueList::const_iterator it; for (it=list.begin(); it!=list.end(); ++it) addDevice((*it)->name(), *it, ::Group::Support::Tested); } -bool Tool::Group::check(const QString &device, Log::Generic *log) const +bool Tool::Group::check(const TQString &device, Log::Generic *log) const { const_cast(this)->checkInitSupported(); if ( hasCheckDevicesError() ) - return (log ? log->askContinue(i18n("There were errors detecting supported devices for the selected toolchain (%1). Please check the toolchain configuration. Continue anyway?").arg(label())) : false); + return (log ? log->askContinue(i18n("There were errors detecting supported devices for the selected toolchain (%1). Please check the toolchain configuration. Continue anyway?").tqarg(label())) : false); if ( !device.isEmpty() && device!=Device::AUTO_DATA.name && !isSupported(device) ) - return (log ? log->askContinue(i18n("The selected toolchain (%1) does not support device %2. Continue anyway?").arg(label()).arg(device)) : false); + return (log ? log->askContinue(i18n("The selected toolchain (%1) does not support device %2. Continue anyway?").tqarg(label()).tqarg(device)) : false); return true; } diff --git a/src/tools/base/tool_group.h b/src/tools/base/tool_group.h index c4adb84..86cfc64 100644 --- a/src/tools/base/tool_group.h +++ b/src/tools/base/tool_group.h @@ -28,10 +28,10 @@ public: static const char *CUSTOM_NAME; Group(); bool isCustom() const { return ( name()==CUSTOM_NAME ); } - virtual QString comment() const { return QString::null; } + virtual TQString comment() const { return TQString(); } virtual void init(); virtual const ::Tool::Base *base(Category category) const { return _bases[category].base; } - virtual QString informationText() const = 0; + virtual TQString informationText() const = 0; virtual ExecutableType preferedExecutableType() const = 0; virtual bool hasDirectory(Compile::DirectoryType) const { return false; } virtual PURL::FileType linkerScriptType() const { return PURL::Nb_FileTypes; } @@ -40,9 +40,9 @@ public: virtual uint nbCheckDevices() const { return 1; } bool hasCheckDevicesError() const { return _checkDevicesError; } virtual Tool::Category checkDevicesCategory() const = 0; - virtual QStringList checkDevicesOptions(uint) const { return QStringList(); } + virtual TQStringList checkDevicesOptions(uint) const { return TQStringList(); } ::Process::LineOutput *checkDevicesProcess(uint i, const PURL::Directory &execDir, bool withWine) const; - virtual QValueList getSupportedDevices(const QString &s) const = 0; + virtual TQValueList getSupportedDevices(const TQString &s) const = 0; virtual CompileType compileType() const = 0; virtual bool needs(bool withProject, Category category) const; Compile::Process *createCompileProcess(const Compile::Data &data, Compile::Manager *manager) const; @@ -52,9 +52,9 @@ public: virtual PURL::FileType implementationType(PURL::ToolType type) const = 0; virtual Compile::Process *processFactory(const Compile::Data &data) const = 0; const SourceGenerator *sourceGenerator() const { return _sourceGenerator; } - bool check(const QString &device, Log::Generic *log) const; + bool check(const TQString &device, Log::Generic *log) const; const VersionData &version() const { return _version; } - virtual bool generateDebugInformation(const QString &device) const { Q_UNUSED(device); return true; } + virtual bool generateDebugInformation(const TQString &device) const { Q_UNUSED(device); return true; } protected: enum NeedType { StandaloneOnly, ProjectOnly, Both }; @@ -67,15 +67,15 @@ protected: }; virtual void initSupported(); virtual BaseData baseFactory(Category category) const = 0; - virtual QString defaultLinkerScriptFilename(Compile::LinkType type, const QString &device) const; + virtual TQString defaultLinkerScriptFilename(Compile::LinkType type, const TQString &device) const; virtual Compile::Config *configFactory(::Project *project) const = 0; virtual SourceGenerator *sourceGeneratorFactory() const = 0; - bool checkExecutable(Tool::Category category, QStringList &lines); + bool checkExecutable(Tool::Category category, TQStringList &lines); virtual VersionData getToolchainVersion() { return VersionData(); } private: SourceGenerator *_sourceGenerator; - QMap _bases; + TQMap _bases; bool _checkDevicesError; VersionData _version; }; diff --git a/src/tools/boost/boost.cpp b/src/tools/boost/boost.cpp index 86e304c..e67f833 100644 --- a/src/tools/boost/boost.cpp +++ b/src/tools/boost/boost.cpp @@ -15,7 +15,7 @@ #include "devices/base/device_group.h" //---------------------------------------------------------------------------- -bool Boost::Linker::checkExecutableResult(bool, QStringList &lines) const +bool Boost::Linker::checkExecutableResult(bool, TQStringList &lines) const { return ( lines.count()>0 && lines[0].startsWith("BoostLink ") ); } @@ -25,26 +25,26 @@ PURL::Directory Boost::Linker::checkExecutableWorkingDirectory() const return static_cast(_group)->checkExecutableUrl().directory(); } -QStringList Boost::Linker16::checkExecutableOptions(bool) const +TQStringList Boost::Linker16::checkExecutableOptions(bool) const { // #### otherwise may stall... - QStringList args; + TQStringList args; args += "-t PIC16F873"; args += static_cast(_group)->checkExecutableUrl().toExtension("obj").filename(); return args; } -QStringList Boost::Linker18::checkExecutableOptions(bool) const +TQStringList Boost::Linker18::checkExecutableOptions(bool) const { // #### otherwise may stall... - QStringList args; + TQStringList args; args += "-t PIC18F452"; args += static_cast(_group)->checkExecutableUrl().toExtension("obj").filename(); return args; } //---------------------------------------------------------------------------- -QStringList Boost::Compiler::checkExecutableOptions(bool) const +TQStringList Boost::Compiler::checkExecutableOptions(bool) const { // #### otherwise may stall... return static_cast(_group)->checkExecutableUrl().filename(); @@ -56,14 +56,14 @@ PURL::Directory Boost::Compiler::checkExecutableWorkingDirectory() const } //---------------------------------------------------------------------------- -Boost::Group::Group(const QString &extension, const QString &text) +Boost::Group::Group(const TQString &extension, const TQString &text) : _checkExecTmp(_sview, extension) { if ( _checkExecTmp.openForWrite() ) _checkExecTmp.appendText(text); _checkExecTmp.close(); } -QString Boost::Group::comment() const +TQString Boost::Group::comment() const { return i18n("The Boost toolchain needs to be run by Wine with \"Windows NT 4.0\" compatibility. This can be configured with the Wine configuration utility."); } @@ -90,10 +90,10 @@ Compile::Config *Boost::Group::configFactory(::Project *project) const return new Boost::Config(project); } -QValueList Boost::Group::getSupportedDevices(const QString &) const +TQValueList Boost::Group::getSupportedDevices(const TQString &) const { - QValueList list; - QValueVector devices = Device::lister().group("pic")->supportedDevices(); + TQValueList list; + TQValueVector devices = Device::lister().group("pic")->supportedDevices(); for (uint i=0; i(data)->architecture()) ) list.append(data); diff --git a/src/tools/boost/boost.h b/src/tools/boost/boost.h index d6142c9..34d1414 100644 --- a/src/tools/boost/boost.h +++ b/src/tools/boost/boost.h @@ -19,28 +19,28 @@ namespace Boost class Linker : public Tool::Base { private: - virtual QString baseExecutable(bool, Tool::OutputExecutableType) const { return "boostlink.pic.exe"; } - virtual bool checkExecutableResult(bool withWine, QStringList &lines) const; + virtual TQString baseExecutable(bool, Tool::OutputExecutableType) const { return "boostlink.pic.exe"; } + virtual bool checkExecutableResult(bool withWine, TQStringList &lines) const; virtual PURL::Directory checkExecutableWorkingDirectory() const; }; class Linker16 : public Linker { private: - virtual QStringList checkExecutableOptions(bool withWine) const; + virtual TQStringList checkExecutableOptions(bool withWine) const; }; class Linker18 : public Linker { private: - virtual QStringList checkExecutableOptions(bool withWine) const; + virtual TQStringList checkExecutableOptions(bool withWine) const; }; //---------------------------------------------------------------------------- class Compiler : public Tool::Base { private: - virtual QStringList checkExecutableOptions(bool withWine) const; + virtual TQStringList checkExecutableOptions(bool withWine) const; virtual PURL::Directory checkExecutableWorkingDirectory() const; }; @@ -48,9 +48,9 @@ private: class Group : public Tool::Group { public: - Group(const QString &extension, const QString &text); + Group(const TQString &extension, const TQString &text); PURL::Url checkExecutableUrl() const { return _checkExecTmp.url(); } - virtual QString comment() const; + virtual TQString comment() const; virtual Tool::Category checkDevicesCategory() const { return Tool::Category::Nb_Types; } virtual Tool::ExecutableType preferedExecutableType() const { return Tool::ExecutableType::Windows; } virtual Tool::CompileType compileType() const { return Tool::SeparateFiles; } @@ -64,7 +64,7 @@ private: Log::StringView _sview; PURL::TempFile _checkExecTmp; - virtual QValueList getSupportedDevices(const QString &s) const; + virtual TQValueList getSupportedDevices(const TQString &s) const; virtual Compile::Process *processFactory(const Compile::Data &data) const; virtual Compile::Config *configFactory(::Project *project) const; }; diff --git a/src/tools/boost/boost_generator.cpp b/src/tools/boost/boost_generator.cpp index 2fa1393..0d204ad 100644 --- a/src/tools/boost/boost_generator.cpp +++ b/src/tools/boost/boost_generator.cpp @@ -20,9 +20,9 @@ SourceLine::List Boost::CSourceGenerator::configLines(PURL::ToolType, const Devi Address address = data.range(Pic::MemoryRangeType::Config).start; for (uint i=0; i>"); + lines.appendIndentedCode(TQString(), "<< " + i18n("insert interrupt code") + " >>"); lines.appendNotIndentedCode("}"); lines.appendEmpty(); lines.appendTitle(i18n("main program")); lines.appendNotIndentedCode("void main() {"); - lines.appendIndentedCode(QString::null, "<< " + i18n("insert code") + " >>"); + lines.appendIndentedCode(TQString(), "<< " + i18n("insert code") + " >>"); lines.appendNotIndentedCode("}"); return lines; } @@ -73,7 +73,7 @@ SourceLine::List Boost::BasicSourceGenerator::sourceFileContent(PURL::ToolType, ok = true; lines.appendTitle(i18n("main program")); lines.appendNotIndentedCode("Sub main()"); - lines.appendIndentedCode(QString::null, "<< " + i18n("insert code") + " >>"); + lines.appendIndentedCode(TQString(), "<< " + i18n("insert code") + " >>"); lines.appendIndentedCode("Do while 1", i18n("loop forever")); lines.appendIndentedCode("Loop"); lines.appendNotIndentedCode("End Sub"); diff --git a/src/tools/boost/boostbasic.cpp b/src/tools/boost/boostbasic.cpp index 9983874..dc449f8 100644 --- a/src/tools/boost/boostbasic.cpp +++ b/src/tools/boost/boostbasic.cpp @@ -11,15 +11,15 @@ #include "boost_generator.h" //---------------------------------------------------------------------------- -bool Boost::CompilerBasic::checkExecutableResult(bool, QStringList &lines) const +bool Boost::CompilerBasic::checkExecutableResult(bool, TQStringList &lines) const { return ( lines.count()>0 && lines[0].startsWith("BoostBasic ") ); } //---------------------------------------------------------------------------- -QString Boost::GroupBasic::informationText() const +TQString Boost::GroupBasic::informationText() const { - return i18n("BoostBasic Compiler is a Basic compiler distributed by SourceBoost Technologies.").arg("http://www.sourceboost.com/Products/BoostBasic/Overview.html"); + return i18n("BoostBasic Compiler is a Basic compiler distributed by SourceBoost Technologies.").tqarg("http://www.sourceboost.com/Products/BoostBasic/Overview.html"); } Tool::SourceGenerator *Boost::GroupBasic::sourceGeneratorFactory() const diff --git a/src/tools/boost/boostbasic.h b/src/tools/boost/boostbasic.h index 5f3b820..26cd90c 100644 --- a/src/tools/boost/boostbasic.h +++ b/src/tools/boost/boostbasic.h @@ -17,19 +17,19 @@ namespace Boost class CompilerBasic : public Compiler { private: - virtual bool checkExecutableResult(bool withWine, QStringList &lines) const; + virtual bool checkExecutableResult(bool withWine, TQStringList &lines) const; }; class CompilerBasic16 : public CompilerBasic { public: - virtual QString baseExecutable(bool, Tool::OutputExecutableType) const { return "boostbasic.pic16.exe"; } + virtual TQString baseExecutable(bool, Tool::OutputExecutableType) const { return "boostbasic.pic16.exe"; } }; class CompilerBasic18 : public CompilerBasic { public: - virtual QString baseExecutable(bool, Tool::OutputExecutableType) const { return "boostbasic.pic18.exe"; } + virtual TQString baseExecutable(bool, Tool::OutputExecutableType) const { return "boostbasic.pic18.exe"; } }; //---------------------------------------------------------------------------- @@ -37,7 +37,7 @@ class GroupBasic : public Group { public: GroupBasic() : Group(".bas", "Sub main()\nEnd Sub\n") {} - virtual QString informationText() const; + virtual TQString informationText() const; virtual PURL::FileType implementationType(PURL::ToolType type) const { return (type==PURL::ToolType::Compiler ? PURL::BasicSource : PURL::Nb_FileTypes); } private: @@ -47,8 +47,8 @@ private: class GroupBasic16 : public GroupBasic { public: - virtual QString name() const { return "boostbasic16"; } - virtual QString label() const { return i18n("BoostBasic Compiler for PIC16"); } + virtual TQString name() const { return "boostbasic16"; } + virtual TQString label() const { return i18n("BoostBasic Compiler for PIC16"); } private: virtual BaseData baseFactory(Tool::Category) const; @@ -58,8 +58,8 @@ private: class GroupBasic18 : public GroupBasic { public: - virtual QString name() const { return "boostbasic18"; } - virtual QString label() const { return i18n("BoostBasic Compiler for PIC18"); } + virtual TQString name() const { return "boostbasic18"; } + virtual TQString label() const { return i18n("BoostBasic Compiler for PIC18"); } private: virtual BaseData baseFactory(Tool::Category) const; diff --git a/src/tools/boost/boostc.cpp b/src/tools/boost/boostc.cpp index 9a6ada9..74047a0 100644 --- a/src/tools/boost/boostc.cpp +++ b/src/tools/boost/boostc.cpp @@ -11,15 +11,15 @@ #include "boost_generator.h" //---------------------------------------------------------------------------- -bool Boost::CompilerC::checkExecutableResult(bool, QStringList &lines) const +bool Boost::CompilerC::checkExecutableResult(bool, TQStringList &lines) const { return ( lines.count()>0 && lines[0].startsWith("BoostC ") ); } //---------------------------------------------------------------------------- -QString Boost::GroupC::informationText() const +TQString Boost::GroupC::informationText() const { - return i18n("BoostC Compiler is a C compiler distributed by SourceBoost Technologies.").arg("http://www.sourceboost.com/Products/BoostC/Overview.html"); + return i18n("BoostC Compiler is a C compiler distributed by SourceBoost Technologies.").tqarg("http://www.sourceboost.com/Products/BoostC/Overview.html"); } Tool::SourceGenerator *Boost::GroupC::sourceGeneratorFactory() const diff --git a/src/tools/boost/boostc.h b/src/tools/boost/boostc.h index 5191560..1e30b12 100644 --- a/src/tools/boost/boostc.h +++ b/src/tools/boost/boostc.h @@ -17,19 +17,19 @@ namespace Boost class CompilerC : public Compiler { private: - virtual bool checkExecutableResult(bool withWine, QStringList &lines) const; + virtual bool checkExecutableResult(bool withWine, TQStringList &lines) const; }; class CompilerC16 : public CompilerC { public: - virtual QString baseExecutable(bool, Tool::OutputExecutableType) const { return "boostc.pic16.exe"; } + virtual TQString baseExecutable(bool, Tool::OutputExecutableType) const { return "boostc.pic16.exe"; } }; class CompilerC18 : public CompilerC { public: - virtual QString baseExecutable(bool, Tool::OutputExecutableType) const { return "boostc.pic18.exe"; } + virtual TQString baseExecutable(bool, Tool::OutputExecutableType) const { return "boostc.pic18.exe"; } }; //---------------------------------------------------------------------------- @@ -37,7 +37,7 @@ class GroupC : public Group { public: GroupC() : Group(".c", "void main(void) {}\n") {} - virtual QString informationText() const; + virtual TQString informationText() const; virtual PURL::FileType implementationType(PURL::ToolType type) const { return (type==PURL::ToolType::Compiler ? PURL::CSource : PURL::Nb_FileTypes); } private: @@ -47,8 +47,8 @@ private: class GroupC16 : public GroupC { public: - virtual QString name() const { return "boostc16"; } - virtual QString label() const { return i18n("BoostC Compiler for PIC16"); } + virtual TQString name() const { return "boostc16"; } + virtual TQString label() const { return i18n("BoostC Compiler for PIC16"); } private: virtual BaseData baseFactory(Tool::Category) const; @@ -58,8 +58,8 @@ private: class GroupC18 : public GroupC { public: - virtual QString name() const { return "boostc18"; } - virtual QString label() const { return i18n("BoostC Compiler for PIC18"); } + virtual TQString name() const { return "boostc18"; } + virtual TQString label() const { return i18n("BoostC Compiler for PIC18"); } private: virtual BaseData baseFactory(Tool::Category) const; diff --git a/src/tools/boost/boostc_compile.cpp b/src/tools/boost/boostc_compile.cpp index 2298361..3c18fbe 100644 --- a/src/tools/boost/boostc_compile.cpp +++ b/src/tools/boost/boostc_compile.cpp @@ -11,33 +11,33 @@ #include "boost_config.h" //---------------------------------------------------------------------------- -void Boost::Process::logStderrLine(const QString &line) +void Boost::Process::logStderrLine(const TQString &line) { if ( parseErrorLine(line, Compile::ParseErrorData("(.*)\\((\\d+).*\\): (error|warning):(.*)", 1, 2, 4, 3)) ) return; - doLog(Log::LineType::Normal, line, QString::null, 0); + doLog(Log::LineType::Normal, line, TQString(), 0); } //---------------------------------------------------------------------------- -QStringList Boost::CompileFile::genericArguments(const Compile::Config &config) const +TQStringList Boost::CompileFile::genericArguments(const Compile::Config &config) const { - QStringList args; + TQStringList args; args += "-t %DEVICE"; args += "-i"; - args += config.includeDirs(Tool::Category::Compiler, "-I", QString::null, ";"); + args += config.includeDirs(Tool::Category::Compiler, "-I", TQString(), ";"); args += config.customOptions(Tool::Category::Compiler); args += "%I"; return args; } -QString Boost::CompileFile::outputFiles() const +TQString Boost::CompileFile::outputFiles() const { return "obj"; } //---------------------------------------------------------------------------- -QStringList Boost::Link::genericArguments(const Compile::Config &config) const +TQStringList Boost::Link::genericArguments(const Compile::Config &config) const { - QStringList args; + TQStringList args; args += "-t %DEVICE"; args += "-p"; args += "%PROJECT"; @@ -49,7 +49,7 @@ QStringList Boost::Link::genericArguments(const Compile::Config &config) const return args; } -QString Boost::Link::outputFiles() const +TQString Boost::Link::outputFiles() const { return "PURL::Lst PURL::Hex PURL::Coff PURL::AsmGPAsm stat tree casm"; } diff --git a/src/tools/boost/boostc_compile.h b/src/tools/boost/boostc_compile.h index 5c3696a..a6a95d1 100644 --- a/src/tools/boost/boostc_compile.h +++ b/src/tools/boost/boostc_compile.h @@ -17,28 +17,31 @@ namespace Boost class Process : public Compile::Process { Q_OBJECT + TQ_OBJECT protected: - virtual QString deviceName() const { return "PIC" + _data.device; } - virtual void logStderrLine(const QString &line); + virtual TQString deviceName() const { return "PIC" + _data.device; } + virtual void logStderrLine(const TQString &line); }; //---------------------------------------------------------------------------- class CompileFile : public Process { Q_OBJECT + TQ_OBJECT protected: - virtual QStringList genericArguments(const Compile::Config &config) const; - virtual QString outputFiles() const; + virtual TQStringList genericArguments(const Compile::Config &config) const; + virtual TQString outputFiles() const; }; //---------------------------------------------------------------------------- class Link : public Process { Q_OBJECT + TQ_OBJECT protected: - virtual QString objectExtension() const { return "obj"; } - virtual QStringList genericArguments(const Compile::Config &config) const; - virtual QString outputFiles() const; + virtual TQString objectExtension() const { return "obj"; } + virtual TQStringList genericArguments(const Compile::Config &config) const; + virtual TQString outputFiles() const; }; } // namespace diff --git a/src/tools/boost/boostcpp.cpp b/src/tools/boost/boostcpp.cpp index 8991de7..7b83314 100644 --- a/src/tools/boost/boostcpp.cpp +++ b/src/tools/boost/boostcpp.cpp @@ -12,15 +12,15 @@ #include "boost_generator.h" //---------------------------------------------------------------------------- -bool Boost::CompilerCpp::checkExecutableResult(bool, QStringList &lines) const +bool Boost::CompilerCpp::checkExecutableResult(bool, TQStringList &lines) const { return ( lines.count()>0 && lines[0].startsWith("BoostC++ ") ); } //---------------------------------------------------------------------------- -QString Boost::GroupCpp::informationText() const +TQString Boost::GroupCpp::informationText() const { - return i18n("BoostC++ Compiler is a C compiler distributed by SourceBoost Technologies.").arg("http://www.sourceboost.com/Products/BoostCpp/Overview.html"); + return i18n("BoostC++ Compiler is a C compiler distributed by SourceBoost Technologies.").tqarg("http://www.sourceboost.com/Products/BoostCpp/Overview.html"); } Tool::SourceGenerator *Boost::GroupCpp::sourceGeneratorFactory() const diff --git a/src/tools/boost/boostcpp.h b/src/tools/boost/boostcpp.h index bf5e2ee..7e3607d 100644 --- a/src/tools/boost/boostcpp.h +++ b/src/tools/boost/boostcpp.h @@ -17,19 +17,19 @@ namespace Boost class CompilerCpp : public Compiler { private: - virtual bool checkExecutableResult(bool withWine, QStringList &lines) const; + virtual bool checkExecutableResult(bool withWine, TQStringList &lines) const; }; class CompilerCpp16 : public CompilerCpp { public: - virtual QString baseExecutable(bool, Tool::OutputExecutableType) const { return "boostc++.pic16.exe"; } + virtual TQString baseExecutable(bool, Tool::OutputExecutableType) const { return "boostc++.pic16.exe"; } }; class CompilerCpp18 : public CompilerCpp { public: - virtual QString baseExecutable(bool, Tool::OutputExecutableType) const { return "boostc++.pic18.exe"; } + virtual TQString baseExecutable(bool, Tool::OutputExecutableType) const { return "boostc++.pic18.exe"; } }; //---------------------------------------------------------------------------- @@ -37,7 +37,7 @@ class GroupCpp : public Group { public: GroupCpp() : Group(".cpp", "void main(void) {}\n") {} - virtual QString informationText() const; + virtual TQString informationText() const; virtual PURL::FileType implementationType(PURL::ToolType type) const { return (type==PURL::ToolType::Compiler ? PURL::CppSource : PURL::Nb_FileTypes); } private: @@ -47,8 +47,8 @@ private: class GroupCpp16 : public GroupCpp { public: - virtual QString name() const { return "boostc++16"; } - virtual QString label() const { return i18n("BoostC++ Compiler for PIC16"); } + virtual TQString name() const { return "boostc++16"; } + virtual TQString label() const { return i18n("BoostC++ Compiler for PIC16"); } private: virtual BaseData baseFactory(Tool::Category) const; @@ -58,8 +58,8 @@ private: class GroupCpp18 : public GroupCpp { public: - virtual QString name() const { return "boostc++18"; } - virtual QString label() const { return i18n("BoostC++ Compiler for PIC18"); } + virtual TQString name() const { return "boostc++18"; } + virtual TQString label() const { return i18n("BoostC++ Compiler for PIC18"); } private: virtual BaseData baseFactory(Tool::Category) const; diff --git a/src/tools/boost/gui/boost_ui.h b/src/tools/boost/gui/boost_ui.h index 6cafcf6..daa5047 100644 --- a/src/tools/boost/gui/boost_ui.h +++ b/src/tools/boost/gui/boost_ui.h @@ -18,6 +18,7 @@ namespace Boost class ConfigWidget : public ToolConfigWidget { Q_OBJECT + TQ_OBJECT public: ConfigWidget(Project *project); virtual void initEntries(); diff --git a/src/tools/c18/c18.cpp b/src/tools/c18/c18.cpp index 4eb5bfd..5c2b725 100644 --- a/src/tools/c18/c18.cpp +++ b/src/tools/c18/c18.cpp @@ -8,7 +8,7 @@ ***************************************************************************/ #include "c18.h" -#include +#include #include "c18_compile.h" #include "c18_config.h" @@ -18,21 +18,21 @@ #include "common/global/process.h" //---------------------------------------------------------------------------- -bool C18::Compiler::checkExecutableResult(bool, QStringList &lines) const +bool C18::Compiler::checkExecutableResult(bool, TQStringList &lines) const { return ( lines.count()>0 && lines[0].startsWith("MPLAB C18") ); } -bool C18::Linker::checkExecutableResult(bool, QStringList &lines) const +bool C18::Linker::checkExecutableResult(bool, TQStringList &lines) const { return ( lines.count()>0 && lines[0].startsWith("MPLINK") ); } //---------------------------------------------------------------------------- -QValueList C18::Group::getSupportedDevices(const QString &) const +TQValueList C18::Group::getSupportedDevices(const TQString &) const { - QValueVector devices = Device::lister().group("pic")->supportedDevices(); - QValueList list; + TQValueVector devices = Device::lister().group("pic")->supportedDevices(); + TQValueList list; for (uint i=0; i(data)->is18Family() ) list.append(data); @@ -49,7 +49,7 @@ Compile::Process *C18::Group::processFactory(const Compile::Data &data) const PURL::Directory C18::Group::autodetectDirectory(Compile::DirectoryType type, const PURL::Directory &execDir, bool) const { - QDir dir(execDir.path()); + TQDir dir(execDir.path()); if ( !dir.cdUp() ) return PURL::Directory(); switch (type.type()) { case Compile::DirectoryType::LinkerScript: @@ -80,7 +80,7 @@ Tool::Group::BaseData C18::Group::baseFactory(Tool::Category category) const return BaseData(); } -QString C18::Group::informationText() const +TQString C18::Group::informationText() const { - return i18n("C18 is a C compiler distributed by Microchip.").arg("http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en010014&part=SW006011"); + return i18n("C18 is a C compiler distributed by Microchip.").tqarg("http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en010014&part=SW006011"); } diff --git a/src/tools/c18/c18.h b/src/tools/c18/c18.h index fac739e..7560f78 100644 --- a/src/tools/c18/c18.h +++ b/src/tools/c18/c18.h @@ -17,30 +17,30 @@ namespace C18 class Compiler : public Tool::Base { public: - virtual QString baseExecutable(bool, Tool::OutputExecutableType) const { return "mcc18"; } + virtual TQString baseExecutable(bool, Tool::OutputExecutableType) const { return "mcc18"; } private: - virtual QStringList checkExecutableOptions(bool) const { return "-v"; } - virtual bool checkExecutableResult(bool withWine, QStringList &lines) const; + virtual TQStringList checkExecutableOptions(bool) const { return "-v"; } + virtual bool checkExecutableResult(bool withWine, TQStringList &lines) const; }; class Linker : public Tool::Base { public: - virtual QString baseExecutable(bool, Tool::OutputExecutableType) const { return "mplink"; } + virtual TQString baseExecutable(bool, Tool::OutputExecutableType) const { return "mplink"; } private: - virtual QStringList checkExecutableOptions(bool) const { return "/v"; } - virtual bool checkExecutableResult(bool withWine, QStringList &lines) const; + virtual TQStringList checkExecutableOptions(bool) const { return "/v"; } + virtual bool checkExecutableResult(bool withWine, TQStringList &lines) const; }; //---------------------------------------------------------------------------- class Group : public Tool::Group { public: - virtual QString name() const { return "c18"; } - virtual QString label() const { return i18n("C18 Compiler"); } - virtual QString informationText() const; + virtual TQString name() const { return "c18"; } + virtual TQString label() const { return i18n("C18 Compiler"); } + virtual TQString informationText() const; virtual Tool::Category checkDevicesCategory() const { return Tool::Category::Nb_Types; } virtual bool hasDirectory(Compile::DirectoryType type) const { return ( type!=Compile::DirectoryType::Source ); } virtual PURL::FileType linkerScriptType() const { return PURL::Lkr; } @@ -50,7 +50,7 @@ public: virtual PURL::FileType implementationType(PURL::ToolType type) const { return (type==PURL::ToolType::Compiler ? PURL::CSource : PURL::Nb_FileTypes); } private: - virtual QValueList getSupportedDevices(const QString &s) const; + virtual TQValueList getSupportedDevices(const TQString &s) const; virtual Compile::Process *processFactory(const Compile::Data &data) const; virtual Compile::Config *configFactory(::Project *project) const; virtual BaseData baseFactory(Tool::Category category) const; diff --git a/src/tools/c18/c18_compile.cpp b/src/tools/c18/c18_compile.cpp index 181da36..d3ca920 100644 --- a/src/tools/c18/c18_compile.cpp +++ b/src/tools/c18/c18_compile.cpp @@ -13,9 +13,9 @@ #include "devices/list/device_list.h" //----------------------------------------------------------------------------- -QStringList C18::CompileFile::genericArguments(const Compile::Config &config) const +TQStringList C18::CompileFile::genericArguments(const Compile::Config &config) const { - QStringList args; + TQStringList args; args += config.includeDirs(Tool::Category::Compiler, "-I"); args += "-I" + Compile::Config::directory(group(), Compile::DirectoryType::Header).path(); args += "$NO_AUTO_DEVICE(-p)"; @@ -26,21 +26,21 @@ QStringList C18::CompileFile::genericArguments(const Compile::Config &config) co return args; } -QString C18::CompileFile::outputFiles() const +TQString C18::CompileFile::outputFiles() const { return "PURL::Object"; } -void C18::CompileFile::logStderrLine(const QString &line) +void C18::CompileFile::logStderrLine(const TQString &line) { // #### TODO - doLog(Log::LineType::Normal, line, QString::null, 0); + doLog(Log::LineType::Normal, line, TQString(), 0); } //----------------------------------------------------------------------------- -QStringList C18::Link::genericArguments(const Compile::Config &config) const +TQStringList C18::Link::genericArguments(const Compile::Config &config) const { - QStringList args; + TQStringList args; args += "/k%LKR_PATH"; args += "%LKR_NAME"; args += "/l" + Compile::Config::directory(group(), Compile::DirectoryType::Library).path(); @@ -53,13 +53,13 @@ QStringList C18::Link::genericArguments(const Compile::Config &config) const return args; } -QString C18::Link::outputFiles() const +TQString C18::Link::outputFiles() const { return "PURL::Lkr PURL::Map PURL::Hex PURL::Coff PURL::Lst PURL::Cod"; } -void C18::Link::logStderrLine(const QString &line) +void C18::Link::logStderrLine(const TQString &line) { // #### TODO - doLog(Log::LineType::Normal, line, QString::null, 0); + doLog(Log::LineType::Normal, line, TQString(), 0); } diff --git a/src/tools/c18/c18_compile.h b/src/tools/c18/c18_compile.h index 74f0f06..1d690df 100644 --- a/src/tools/c18/c18_compile.h +++ b/src/tools/c18/c18_compile.h @@ -17,28 +17,31 @@ namespace C18 class Process : public Compile::Process { Q_OBJECT + TQ_OBJECT protected: - virtual QString deviceName() const { return _data.device.lower(); } + virtual TQString deviceName() const { return _data.device.lower(); } }; //----------------------------------------------------------------------------- class CompileFile : public Process { Q_OBJECT + TQ_OBJECT protected: - virtual QStringList genericArguments(const Compile::Config &config) const; - virtual QString outputFiles() const; - virtual void logStderrLine(const QString &line); + virtual TQStringList genericArguments(const Compile::Config &config) const; + virtual TQString outputFiles() const; + virtual void logStderrLine(const TQString &line); }; //----------------------------------------------------------------------------- class Link : public Process { Q_OBJECT + TQ_OBJECT protected: - virtual QStringList genericArguments(const Compile::Config &config) const; - virtual QString outputFiles() const; - virtual void logStderrLine(const QString &line); + virtual TQStringList genericArguments(const Compile::Config &config) const; + virtual TQString outputFiles() const; + virtual void logStderrLine(const TQString &line); }; } // namespace diff --git a/src/tools/c18/c18_config.h b/src/tools/c18/c18_config.h index dead1a1..db49ad7 100644 --- a/src/tools/c18/c18_config.h +++ b/src/tools/c18/c18_config.h @@ -20,7 +20,7 @@ public: Config(Project *project) : Compile::Config(project) {} enum { Nb_WarningLevels = 3 }; static const char * const WARNING_LEVEL_LABELS[Nb_WarningLevels]; - uint warningLevel() const { return QMIN(Compile::Config::warningLevel(Tool::Category::Compiler), uint(Nb_WarningLevels)); } + uint warningLevel() const { return TQMIN(Compile::Config::warningLevel(Tool::Category::Compiler), uint(Nb_WarningLevels)); } void setWarningLevel(uint level) { Compile::Config::setWarningLevel(Tool::Category::Compiler, level); } }; diff --git a/src/tools/c18/gui/c18_ui.cpp b/src/tools/c18/gui/c18_ui.cpp index c10f328..5d0c167 100644 --- a/src/tools/c18/gui/c18_ui.cpp +++ b/src/tools/c18/gui/c18_ui.cpp @@ -8,7 +8,7 @@ ***************************************************************************/ #include "c18_ui.h" -#include +#include #include "tools/c18/c18_config.h" //---------------------------------------------------------------------------- @@ -20,10 +20,10 @@ void C18::ConfigWidget::initEntries() { if ( _category==Tool::Category::Compiler ) { uint row = container()->numRows(); - QLabel *label = new QLabel(i18n("Warning level:"), container()); + TQLabel *label = new TQLabel(i18n("Warning level:"), container()); container()->addWidget(label, row,row, 0,0); - _warningLevel = new QComboBox(container()); - connect(_warningLevel, SIGNAL(activated(int)), SIGNAL(changed())); + _warningLevel = new TQComboBox(container()); + connect(_warningLevel, TQT_SIGNAL(activated(int)), TQT_SIGNAL(changed())); for (uint i=0; iinsertItem(i18n(Config::WARNING_LEVEL_LABELS[i])); container()->addWidget(_warningLevel, row,row, 1,1); diff --git a/src/tools/c18/gui/c18_ui.h b/src/tools/c18/gui/c18_ui.h index d7d45c4..8ccb638 100644 --- a/src/tools/c18/gui/c18_ui.h +++ b/src/tools/c18/gui/c18_ui.h @@ -18,11 +18,12 @@ namespace C18 class ConfigWidget : public ToolConfigWidget { Q_OBJECT + TQ_OBJECT public: ConfigWidget(Project *project); private: - QComboBox *_warningLevel; + TQComboBox *_warningLevel; virtual void initEntries(); virtual void loadConfig(const Compile::Config &config); virtual void saveConfig(Compile::Config &config) const; diff --git a/src/tools/cc5x/cc5x.cpp b/src/tools/cc5x/cc5x.cpp index 5b28397..65b7b98 100644 --- a/src/tools/cc5x/cc5x.cpp +++ b/src/tools/cc5x/cc5x.cpp @@ -8,7 +8,7 @@ ***************************************************************************/ #include "cc5x.h" -#include +#include #include "cc5x_compile.h" #include "cc5x_config.h" @@ -17,16 +17,16 @@ #include "devices/base/device_group.h" //---------------------------------------------------------------------------- -bool CC5X::Base::checkExecutableResult(bool, QStringList &lines) const +bool CC5X::Base::checkExecutableResult(bool, TQStringList &lines) const { return ( lines.count()>0 && lines[0].startsWith("CC5X") ); } //---------------------------------------------------------------------------- -QValueList CC5X::Group::getSupportedDevices(const QString &) const +TQValueList CC5X::Group::getSupportedDevices(const TQString &) const { - QValueList list; - QValueVector devices = Device::lister().group("pic")->supportedDevices(); + TQValueList list; + TQValueVector devices = Device::lister().group("pic")->supportedDevices(); for (uint i=0; i(Device::lister().data(devices[i])); if ( data->architecture()!=Pic::Architecture::P10X && data->architecture()!=Pic::Architecture::P16X ) continue; @@ -50,9 +50,9 @@ Compile::Config *CC5X::Group::configFactory(::Project *project) const return new Config(project); } -QString CC5X::Group::informationText() const +TQString CC5X::Group::informationText() const { - return i18n("CC5X is a C compiler distributed by B Knudsen Data.").arg("http://www.bknd.com/cc5x/index.shtml"); + return i18n("CC5X is a C compiler distributed by B Knudsen Data.").tqarg("http://www.bknd.com/cc5x/index.shtml"); } Tool::Group::BaseData CC5X::Group::baseFactory(Tool::Category category) const diff --git a/src/tools/cc5x/cc5x.h b/src/tools/cc5x/cc5x.h index 054a9ef..85a25ba 100644 --- a/src/tools/cc5x/cc5x.h +++ b/src/tools/cc5x/cc5x.h @@ -18,27 +18,27 @@ namespace CC5X class Base : public Tool::Base { public: - virtual QString baseExecutable(bool, Tool::OutputExecutableType) const { return "cc5x"; } + virtual TQString baseExecutable(bool, Tool::OutputExecutableType) const { return "cc5x"; } private: - virtual QStringList checkExecutableOptions(bool) const { return QStringList(); } - virtual bool checkExecutableResult(bool withWine, QStringList &lines) const; + virtual TQStringList checkExecutableOptions(bool) const { return TQStringList(); } + virtual bool checkExecutableResult(bool withWine, TQStringList &lines) const; }; //---------------------------------------------------------------------------- class Group : public Tool::Group { public: - virtual QString name() const { return "cc5x"; } - virtual QString label() const { return i18n("CC5X Compiler"); } - virtual QString informationText() const; + virtual TQString name() const { return "cc5x"; } + virtual TQString label() const { return i18n("CC5X Compiler"); } + virtual TQString informationText() const; virtual Tool::Category checkDevicesCategory() const { return Tool::Category::Nb_Types; } virtual Tool::ExecutableType preferedExecutableType() const { return Tool::ExecutableType::Windows; } virtual Tool::CompileType compileType() const { return Tool::SingleFile; } virtual PURL::FileType implementationType(PURL::ToolType type) const { return (type==PURL::ToolType::Compiler ? PURL::CSource : PURL::Nb_FileTypes); } private: - virtual QValueList getSupportedDevices(const QString &s) const; + virtual TQValueList getSupportedDevices(const TQString &s) const; virtual Compile::Process *processFactory(const Compile::Data &data) const; virtual Compile::Config *configFactory(::Project *project) const; virtual BaseData baseFactory(Tool::Category) const; diff --git a/src/tools/cc5x/cc5x_compile.cpp b/src/tools/cc5x/cc5x_compile.cpp index 6956eb8..fb17755 100644 --- a/src/tools/cc5x/cc5x_compile.cpp +++ b/src/tools/cc5x/cc5x_compile.cpp @@ -10,9 +10,9 @@ #include "cc5x_config.h" -QStringList CC5X::CompileFile::genericArguments(const Compile::Config &config) const +TQStringList CC5X::CompileFile::genericArguments(const Compile::Config &config) const { - QStringList args; + TQStringList args; args += "-a"; // produce asm file args += "-CC"; // produce cod c file args += "-L"; // produce list file @@ -25,13 +25,13 @@ QStringList CC5X::CompileFile::genericArguments(const Compile::Config &config) c return args; } -void CC5X::CompileFile::logStderrLine(const QString &line) +void CC5X::CompileFile::logStderrLine(const TQString &line) { if ( parseErrorLine(line, Compile::ParseErrorData("(.*):([0-9]+):(.+)\\[([0-9]+)\\](.+)", 1, 2, 5, 3)) ) return; - doLog(Log::LineType::Normal, line, QString::null, 0); // unrecognized + doLog(Log::LineType::Normal, line, TQString(), 0); // unrecognized } -QString CC5X::CompileFile::outputFiles() const +TQString CC5X::CompileFile::outputFiles() const { return "PURL::Lst PURL::AsmGPAsm PURL::Hex PURL::Cod occ"; } diff --git a/src/tools/cc5x/cc5x_compile.h b/src/tools/cc5x/cc5x_compile.h index f400380..e17bb6f 100644 --- a/src/tools/cc5x/cc5x_compile.h +++ b/src/tools/cc5x/cc5x_compile.h @@ -17,11 +17,12 @@ namespace CC5X class CompileFile : public Compile::Process { Q_OBJECT + TQ_OBJECT protected: - virtual QString deviceName() const { return QString::null; } - virtual QStringList genericArguments(const Compile::Config &config) const; - virtual void logStderrLine(const QString &line); - virtual QString outputFiles() const; + virtual TQString deviceName() const { return TQString(); } + virtual TQStringList genericArguments(const Compile::Config &config) const; + virtual void logStderrLine(const TQString &line); + virtual TQString outputFiles() const; }; } // namespace diff --git a/src/tools/cc5x/gui/cc5x_ui.h b/src/tools/cc5x/gui/cc5x_ui.h index 7bf0a37..f234643 100644 --- a/src/tools/cc5x/gui/cc5x_ui.h +++ b/src/tools/cc5x/gui/cc5x_ui.h @@ -18,6 +18,7 @@ namespace CC5X class ConfigWidget : public ToolConfigWidget { Q_OBJECT + TQ_OBJECT public: ConfigWidget(Project *project); virtual void initEntries(); diff --git a/src/tools/ccsc/ccsc.cpp b/src/tools/ccsc/ccsc.cpp index b28f29a..c7b3098 100644 --- a/src/tools/ccsc/ccsc.cpp +++ b/src/tools/ccsc/ccsc.cpp @@ -8,7 +8,7 @@ ***************************************************************************/ #include "ccsc.h" -#include +#include #include "ccsc_compile.h" #include "ccsc_config.h" @@ -17,9 +17,9 @@ #include "devices/base/device_group.h" //---------------------------------------------------------------------------- -QStringList CCSC::Base::checkExecutableOptions(bool withWine) const +TQStringList CCSC::Base::checkExecutableOptions(bool withWine) const { - QStringList args; + TQStringList args; if (withWine) { args += "+STDOUT"; args += "+FM"; @@ -33,7 +33,7 @@ PURL::Directory CCSC::Base::checkExecutableWorkingDirectory() const return static_cast(_group)->checkExecutableUrl().directory(); } -bool CCSC::Base::checkExecutableResult(bool withWine, QStringList &lines) const +bool CCSC::Base::checkExecutableResult(bool withWine, TQStringList &lines) const { if (withWine) { PURL::Url url = static_cast(_group)->checkExecutableUrl().toExtension("err"); @@ -57,10 +57,10 @@ CCSC::Group::Group() _checkExecTmp.close(); } -QValueList CCSC::Group::getSupportedDevices(const QString &) const +TQValueList CCSC::Group::getSupportedDevices(const TQString &) const { - QValueList list; - QValueVector devices = Device::lister().group("pic")->supportedDevices(); + TQValueList list; + TQValueVector devices = Device::lister().group("pic")->supportedDevices(); for (uint i=0; i(data)->architecture(); @@ -85,9 +85,9 @@ Compile::Config *CCSC::Group::configFactory(::Project *project) const return new Config(project); } -QString CCSC::Group::informationText() const +TQString CCSC::Group::informationText() const { - return i18n("CCS Compiler is a C compiler distributed by CCS.").arg("http://www.ccsinfo.com/content.php?page=compilers"); + return i18n("CCS Compiler is a C compiler distributed by CCS.").tqarg("http://www.ccsinfo.com/content.php?page=compilers"); } Tool::Group::BaseData CCSC::Group::baseFactory(Tool::Category category) const @@ -99,8 +99,8 @@ Tool::Group::BaseData CCSC::Group::baseFactory(Tool::Category category) const VersionData CCSC::Group::getToolchainVersion() { if ( !Compile::Config::withWine(*this) ) { - QStringList lines; - if ( checkExecutable(Tool::Category::Compiler, lines) && lines.count()>=1 && lines[0].contains("3.") ) return VersionData(3, 0, 0); + TQStringList lines; + if ( checkExecutable(Tool::Category::Compiler, lines) && lines.count()>=1 && lines[0].tqcontains("3.") ) return VersionData(3, 0, 0); } return VersionData(4, 0, 0); // default } diff --git a/src/tools/ccsc/ccsc.h b/src/tools/ccsc/ccsc.h index aef2005..dd8d286 100644 --- a/src/tools/ccsc/ccsc.h +++ b/src/tools/ccsc/ccsc.h @@ -18,11 +18,11 @@ namespace CCSC class Base : public Tool::Base { public: - virtual QString baseExecutable(bool, Tool::OutputExecutableType) const { return "ccsc"; } + virtual TQString baseExecutable(bool, Tool::OutputExecutableType) const { return "ccsc"; } private: - virtual QStringList checkExecutableOptions(bool withWine) const; - virtual bool checkExecutableResult(bool withWine, QStringList &lines) const; + virtual TQStringList checkExecutableOptions(bool withWine) const; + virtual bool checkExecutableResult(bool withWine, TQStringList &lines) const; virtual PURL::Directory checkExecutableWorkingDirectory() const; }; @@ -32,9 +32,9 @@ class Group : public Tool::Group public: Group(); PURL::Url checkExecutableUrl() const { return _checkExecTmp.url(); } - virtual QString name() const { return "ccsc"; } - virtual QString label() const { return i18n("CCS Compiler"); } - virtual QString informationText() const; + virtual TQString name() const { return "ccsc"; } + virtual TQString label() const { return i18n("CCS Compiler"); } + virtual TQString informationText() const; virtual Tool::Category checkDevicesCategory() const { return Tool::Category::Nb_Types; } virtual Tool::ExecutableType preferedExecutableType() const { return Tool::ExecutableType::Unix; } virtual Tool::CompileType compileType() const { return Tool::SingleFile; } @@ -44,7 +44,7 @@ private: Log::StringView _sview; PURL::TempFile _checkExecTmp; - virtual QValueList getSupportedDevices(const QString &s) const; + virtual TQValueList getSupportedDevices(const TQString &s) const; virtual Compile::Process *processFactory(const Compile::Data &data) const; virtual Compile::Config *configFactory(::Project *project) const; virtual BaseData baseFactory(Tool::Category) const; diff --git a/src/tools/ccsc/ccsc_compile.cpp b/src/tools/ccsc/ccsc_compile.cpp index 56897e8..15ccedf 100644 --- a/src/tools/ccsc/ccsc_compile.cpp +++ b/src/tools/ccsc/ccsc_compile.cpp @@ -14,7 +14,7 @@ #include "devices/list/device_list.h" #include "devices/pic/base/pic.h" -QString CCSC::CompileFile::familyName() const +TQString CCSC::CompileFile::familyName() const { const Pic::Data *pdata = static_cast(Device::lister().data(_data.device)); switch (pdata->architecture().type()) { @@ -31,13 +31,13 @@ QString CCSC::CompileFile::familyName() const case Pic::Architecture::Nb_Types: break; } Q_ASSERT(false); - return QString::null; + return TQString(); } -QStringList CCSC::CompileFile::genericArguments(const Compile::Config &config) const +TQStringList CCSC::CompileFile::genericArguments(const Compile::Config &config) const { bool isVersion3 = ( static_cast(Main::toolGroup()).version().majorNum()==3 ); - QStringList args; + TQStringList args; args += "+STDOUT"; // output messages on stdout if ( !isVersion3 ) args += "+EA"; // show all messages and warnings args += "-P"; // close compile windows after compilation done @@ -55,25 +55,25 @@ QStringList CCSC::CompileFile::genericArguments(const Compile::Config &config) c return args; } -void CCSC::CompileFile::logStderrLine(const QString &line) +void CCSC::CompileFile::logStderrLine(const TQString &line) { // ignore output for wine if ( !Compile::Config::withWine(group()) ) parseLine(line); } -void CCSC::CompileFile::parseLine(const QString &line) +void CCSC::CompileFile::parseLine(const TQString &line) { Log::LineType type; if ( line.startsWith(">>>") ) type = Log::LineType::Warning; else if ( line.startsWith("***") ) type = Log::LineType::Error; else if ( line.startsWith("---") ) type = Log::LineType::Information; else { - doLog(Log::LineType::Normal, line, QString::null, 0); // unrecognized + doLog(Log::LineType::Normal, line, TQString(), 0); // unrecognized return; } if ( parseErrorLine(line, Compile::ParseErrorData("[*>-]+\\s\\w+\\s\\d+\\s\"([^\"]*)\"\\sLine\\s(\\d+)\\([^)]*\\):(.*)", 1, 2, 3, type)) ) return; if ( parseErrorLine(line, Compile::ParseErrorData("[*>-]+\\s\"([^\"]*)\"\\sLine\\s(\\d+):\\s\\w+\\s#\\d+:(.*)", 1, 2, 3, type)) ) return; - doLog(type, line, QString::null, 0); + doLog(type, line, TQString(), 0); } void CCSC::CompileFile::done(int code) @@ -83,9 +83,9 @@ void CCSC::CompileFile::done(int code) PURL::Url url = PURL::Url(directory(), inputFilepath(0)).toExtension("err"); Log::StringView sview; PURL::File file(url, sview); - if ( !file.openForRead() ) doLog(Log::LineType::Error, i18n("Could not find error file (%1).").arg(url.pretty()), QString::null, 0); + if ( !file.openForRead() ) doLog(Log::LineType::Error, i18n("Could not find error file (%1).").tqarg(url.pretty()), TQString(), 0); else { - QStringList lines = file.readLines(); + TQStringList lines = file.readLines(); for (uint i=0; i CustomTool::Group::getSupportedDevices(const QString &) const +TQValueList CustomTool::Group::getSupportedDevices(const TQString &) const { - QValueVector devices = Device::lister().supportedDevices(); - QValueList list; + TQValueVector devices = Device::lister().supportedDevices(); + TQValueList list; for (uint i=0; i getSupportedDevices(const QString &s) const; + virtual TQValueList getSupportedDevices(const TQString &s) const; virtual Compile::Process *processFactory(const Compile::Data &) const { return 0; } virtual Compile::Config *configFactory(::Project *) const { return 0; } virtual Tool::SourceGenerator *sourceGeneratorFactory() const { return 0; } diff --git a/src/tools/gputils/gputils.cpp b/src/tools/gputils/gputils.cpp index 3219598..ba30f2c 100644 --- a/src/tools/gputils/gputils.cpp +++ b/src/tools/gputils/gputils.cpp @@ -9,7 +9,7 @@ ***************************************************************************/ #include "gputils.h" -#include +#include #include "gputils_compile.h" #include "gputils_config.h" @@ -18,7 +18,7 @@ #include "gputils_generator.h" //---------------------------------------------------------------------------- -QString GPUtils::Base::baseExecutable(bool, Tool::OutputExecutableType) const +TQString GPUtils::Base::baseExecutable(bool, Tool::OutputExecutableType) const { switch (_category.type()) { case Tool::Category::Assembler: return "gpasm"; @@ -26,18 +26,18 @@ QString GPUtils::Base::baseExecutable(bool, Tool::OutputExecutableType) const case Tool::Category::Librarian: return "gplib"; default: break; } - return QString::null; + return TQString(); } -bool GPUtils::Base::checkExecutableResult(bool withWine, QStringList &lines) const +bool GPUtils::Base::checkExecutableResult(bool withWine, TQStringList &lines) const { return ( lines.count()>0 && lines[0].startsWith(baseExecutable(withWine, Tool::OutputExecutableType::Coff)) ); } //---------------------------------------------------------------------------- -QString GPUtils::Group::informationText() const +TQString GPUtils::Group::informationText() const { - return i18n("GPUtils is an open-source assembler and linker suite.
").arg("http://gputils.sourceforge.net"); + return i18n("GPUtils is an open-source assembler and linker suite.
").tqarg("http://gputils.sourceforge.net"); } Tool::Group::BaseData GPUtils::Group::baseFactory(Tool::Category category) const @@ -51,22 +51,22 @@ PURL::Directory GPUtils::Group::autodetectDirectory(Compile::DirectoryType type, { switch (type.type()) { case Compile::DirectoryType::LinkerScript: { - QString exec = execDir.path() + base(Tool::Category::Linker)->baseExecutable(withWine, Tool::OutputExecutableType::Coff); + TQString exec = execDir.path() + base(Tool::Category::Linker)->baseExecutable(withWine, Tool::OutputExecutableType::Coff); ::Process::StringOutput process; process.setup(exec, "-h", withWine); if ( ::Process::runSynchronously(process, ::Process::Start, 1000)!=::Process::Exited ) return PURL::Directory(); - QString s = process.sout() + process.serr(); - QRegExp re(".*Default linker script path ([^\\n]*)\\n.*"); + TQString s = process.sout() + process.serr(); + TQRegExp re(".*Default linker script path ([^\\n]*)\\n.*"); if ( !re.exactMatch(s) ) return PURL::Directory(); return PURL::Directory(re.cap(1)); } case Compile::DirectoryType::Header: { - QString exec = execDir.path() + base(Tool::Category::Assembler)->baseExecutable(withWine, Tool::OutputExecutableType::Coff); + TQString exec = execDir.path() + base(Tool::Category::Assembler)->baseExecutable(withWine, Tool::OutputExecutableType::Coff); ::Process::StringOutput process; process.setup(exec, "-h", withWine); if ( ::Process::runSynchronously(process, ::Process::Start, 1000)!=::Process::Exited ) return PURL::Directory(); - QString s = process.sout() + process.serr(); - QRegExp re(".*Default header file path ([^\\n]*)\\n.*"); + TQString s = process.sout() + process.serr(); + TQRegExp re(".*Default header file path ([^\\n]*)\\n.*"); if ( !re.exactMatch(s) ) return PURL::Directory(); return PURL::Directory(re.cap(1)); } diff --git a/src/tools/gputils/gputils.h b/src/tools/gputils/gputils.h index b8bcded..844bbde 100644 --- a/src/tools/gputils/gputils.h +++ b/src/tools/gputils/gputils.h @@ -18,22 +18,22 @@ namespace GPUtils class Base : public Tool::Base { public: - virtual QString baseExecutable(bool withWine, Tool::OutputExecutableType type) const; + virtual TQString baseExecutable(bool withWine, Tool::OutputExecutableType type) const; private: - virtual QStringList checkExecutableOptions(bool) const { return "-v"; } - virtual bool checkExecutableResult(bool withWine, QStringList &lines) const; + virtual TQStringList checkExecutableOptions(bool) const { return "-v"; } + virtual bool checkExecutableResult(bool withWine, TQStringList &lines) const; }; //---------------------------------------------------------------------------- class Group : public Tool::Group { public: - virtual QString name() const { return "gputils"; } - virtual QString label() const { return i18n("GPUtils"); } - virtual QString informationText() const; + virtual TQString name() const { return "gputils"; } + virtual TQString label() const { return i18n("GPUtils"); } + virtual TQString informationText() const; virtual Tool::Category checkDevicesCategory() const { return Tool::Category::Assembler; } - virtual QStringList checkDevicesOptions(uint) const { return "-l"; } + virtual TQStringList checkDevicesOptions(uint) const { return "-l"; } virtual PURL::Directory autodetectDirectory(Compile::DirectoryType type, const PURL::Directory &execDir, bool withWine) const; virtual bool hasDirectory(Compile::DirectoryType type) const { return type==Compile::DirectoryType::Header || type==Compile::DirectoryType::LinkerScript; } virtual PURL::FileType linkerScriptType() const { return PURL::Lkr; } @@ -43,7 +43,7 @@ public: protected: virtual BaseData baseFactory(Tool::Category c) const; - virtual QValueList getSupportedDevices(const QString &s) const { return GPUtils::getSupportedDevices(s); } + virtual TQValueList getSupportedDevices(const TQString &s) const { return GPUtils::getSupportedDevices(s); } virtual Compile::Process *processFactory(const Compile::Data &data) const; virtual Compile::Config *configFactory(::Project *project) const; virtual Tool::SourceGenerator *sourceGeneratorFactory() const; diff --git a/src/tools/gputils/gputils_compile.cpp b/src/tools/gputils/gputils_compile.cpp index c59828c..cbe2309 100644 --- a/src/tools/gputils/gputils_compile.cpp +++ b/src/tools/gputils/gputils_compile.cpp @@ -15,68 +15,68 @@ #include "coff/base/disassembler.h" //----------------------------------------------------------------------------- -QString GPUtils::Process::deviceName() const +TQString GPUtils::Process::deviceName() const { return toDeviceName(_data.device); } //----------------------------------------------------------------------------- -void GPUtils::AssembleFile::logStderrLine(const QString &line) +void GPUtils::AssembleFile::logStderrLine(const TQString &line) { if ( parseErrorLine(line, Compile::ParseErrorData("([^:]*):([0-9]+):(.+)\\[[0-9]+\\](.+)", 1, 2, 4, 3)) ) return; if ( parseErrorLine(line, Compile::ParseErrorData("([^:]*):([^:]+):([0-9]+):(.+)", 2, 3, 4, Log::LineType::Warning)) ) return; - doLog(Log::LineType::Normal, line, QString::null, 0); // unrecognized + doLog(Log::LineType::Normal, line, TQString(), 0); // unrecognized } //----------------------------------------------------------------------------- -QStringList GPUtils::AssembleStandaloneFile::genericArguments(const Compile::Config &config) const +TQStringList GPUtils::AssembleStandaloneFile::genericArguments(const Compile::Config &config) const { - QStringList args; + TQStringList args; args += "-L"; // force list args += "-o%O"; uint wl = static_cast(config).gpasmWarningLevel(); - if ( wl!=Config::Nb_WarningLevels ) args += "-w" + QString::number(wl); + if ( wl!=Config::Nb_WarningLevels ) args += "-w" + TQString::number(wl); args += config.includeDirs(Tool::Category::Assembler, "-I"); args += "$NO_AUTO_DEVICE(-p%DEVICE)"; HexBuffer::Format format = config.hexFormat(); - if( format!=HexBuffer::Nb_Formats ) args += QString("-a") + HexBuffer::FORMATS[format]; + if( format!=HexBuffer::Nb_Formats ) args += TQString("-a") + HexBuffer::FORMATS[format]; args += config.customOptions(Tool::Category::Assembler); args += "%I"; return args; } -QString GPUtils::AssembleStandaloneFile::outputFiles() const +TQString GPUtils::AssembleStandaloneFile::outputFiles() const { return "PURL::Lst PURL::Cod PURL::Hex"; } //----------------------------------------------------------------------------- -QStringList GPUtils::AssembleProjectFile::genericArguments(const Compile::Config &config) const +TQStringList GPUtils::AssembleProjectFile::genericArguments(const Compile::Config &config) const { - QStringList args; + TQStringList args; args += "-c"; // relocatable code args += config.includeDirs(Tool::Category::Assembler, "-I"); if ( !_data.items[0].generated ) args += "-p%DEVICE"; uint wl = static_cast(config).gpasmWarningLevel() ; - if( wl!=Config::Nb_WarningLevels ) args += "-w" + QString::number(wl); + if( wl!=Config::Nb_WarningLevels ) args += "-w" + TQString::number(wl); args += config.customOptions(Tool::Category::Assembler); args += "%I"; return args; } -QString GPUtils::AssembleProjectFile::outputFiles() const +TQString GPUtils::AssembleProjectFile::outputFiles() const { return "PURL::Object PURL::Lst"; } //----------------------------------------------------------------------------- -QStringList GPUtils::LinkProject::genericArguments(const Compile::Config &config) const +TQStringList GPUtils::LinkProject::genericArguments(const Compile::Config &config) const { - QStringList args; + TQStringList args; args += "-o%O"; args += "-c"; // create coff file HexBuffer::Format f = config.hexFormat(); - if ( f!=HexBuffer::Nb_Formats ) args += QString("-a") + HexBuffer::FORMATS[f]; + if ( f!=HexBuffer::Nb_Formats ) args += TQString("-a") + HexBuffer::FORMATS[f]; args += "-m"; // with map args += config.includeDirs(Tool::Category::Linker, "-I"); args += "$LKR(-s%LKR)"; @@ -86,15 +86,15 @@ QStringList GPUtils::LinkProject::genericArguments(const Compile::Config &config return args; } -QString GPUtils::LinkProject::outputFiles() const +TQString GPUtils::LinkProject::outputFiles() const { return "PURL::Lkr PURL::Map PURL::Lst PURL::Cod PURL::Coff PURL::Hex"; } //----------------------------------------------------------------------------- -QStringList GPUtils::LibraryProject::genericArguments(const Compile::Config &config) const +TQStringList GPUtils::LibraryProject::genericArguments(const Compile::Config &config) const { - QStringList args; + TQStringList args; args += "-c"; // create archive args += "%O"; args += config.customOptions(Tool::Category::Librarian); @@ -103,7 +103,7 @@ QStringList GPUtils::LibraryProject::genericArguments(const Compile::Config &con return args; } -QString GPUtils::LibraryProject::outputFiles() const +TQString GPUtils::LibraryProject::outputFiles() const { return "PURL::Library"; } diff --git a/src/tools/gputils/gputils_compile.h b/src/tools/gputils/gputils_compile.h index a6a09c9..97706b1 100644 --- a/src/tools/gputils/gputils_compile.h +++ b/src/tools/gputils/gputils_compile.h @@ -17,8 +17,9 @@ namespace GPUtils class Process : public Compile::Process { Q_OBJECT + TQ_OBJECT private: - virtual QString deviceName() const; + virtual TQString deviceName() const; virtual bool hasLinkerScript() const { return ( _data.linkType==Compile::Icd2Linking || Compile::Process::hasLinkerScript() ); } }; @@ -26,46 +27,51 @@ private: class AssembleFile : public Process { Q_OBJECT + TQ_OBJECT private: - virtual void logStderrLine(const QString &line); + virtual void logStderrLine(const TQString &line); }; //----------------------------------------------------------------------------- class AssembleStandaloneFile : public AssembleFile { Q_OBJECT + TQ_OBJECT private: - virtual QString outputFiles() const; - virtual QStringList genericArguments(const Compile::Config &config) const; + virtual TQString outputFiles() const; + virtual TQStringList genericArguments(const Compile::Config &config) const; }; //----------------------------------------------------------------------------- class AssembleProjectFile : public AssembleFile { Q_OBJECT + TQ_OBJECT private: - virtual QString outputFiles() const; - virtual QStringList genericArguments(const Compile::Config &config) const; + virtual TQString outputFiles() const; + virtual TQStringList genericArguments(const Compile::Config &config) const; }; //----------------------------------------------------------------------------- class LinkProject : public Process { Q_OBJECT + TQ_OBJECT private: - virtual QString outputFiles() const; - virtual QStringList genericArguments(const Compile::Config &config) const; - virtual void logStderrLine(const QString &line) { doLog(filterType(line), line, QString::null, 0); } + virtual TQString outputFiles() const; + virtual TQStringList genericArguments(const Compile::Config &config) const; + virtual void logStderrLine(const TQString &line) { doLog(filterType(line), line, TQString(), 0); } }; //----------------------------------------------------------------------------- class LibraryProject : public Process { Q_OBJECT + TQ_OBJECT private: - virtual QString outputFiles() const; - virtual QStringList genericArguments(const Compile::Config &config) const; - virtual void logStderrLine(const QString &line) { doLog(filterType(line), line, QString::null, 0); } + virtual TQString outputFiles() const; + virtual TQStringList genericArguments(const Compile::Config &config) const; + virtual void logStderrLine(const TQString &line) { doLog(filterType(line), line, TQString(), 0); } }; } // namespace diff --git a/src/tools/gputils/gputils_config.cpp b/src/tools/gputils/gputils_config.cpp index 8f7bca2..7a264e6 100644 --- a/src/tools/gputils/gputils_config.cpp +++ b/src/tools/gputils/gputils_config.cpp @@ -15,5 +15,5 @@ const char * const GPUtils::Config::WARNING_LEVEL_LABELS[Nb_WarningLevels] = { uint GPUtils::Config::gpasmWarningLevel() const { - return QMIN(warningLevel(Tool::Category::Assembler), uint(Nb_WarningLevels)); + return TQMIN(warningLevel(Tool::Category::Assembler), uint(Nb_WarningLevels)); } diff --git a/src/tools/gputils/gputils_generator.cpp b/src/tools/gputils/gputils_generator.cpp index 3bcebac..7fd9a1f 100644 --- a/src/tools/gputils/gputils_generator.cpp +++ b/src/tools/gputils/gputils_generator.cpp @@ -13,12 +13,12 @@ #include "devices/list/device_list.h" //---------------------------------------------------------------------------- -QValueList GPUtils::getSupportedDevices(const QString &s) +TQValueList GPUtils::getSupportedDevices(const TQString &s) { - QStringList devices = QStringList::split(' ', s.simplifyWhiteSpace().upper()); - QValueList list; + TQStringList devices = TQStringList::split(' ', s.simplifyWhiteSpace().upper()); + TQValueList list; for (uint i=0; i>"); + lines.appendIndentedCode(TQString(), "<< " + i18n("insert code") + " >>"); lines.appendIndentedCode("goto $", i18n("loop forever")); lines.appendEmpty(); lines.appendNotIndentedCode("END"); @@ -77,8 +77,8 @@ SourceLine::List GPUtils::SourceGenerator::sourceFileContent(PURL::ToolType, con if ( !hasShared ) { for (uint i=1; i>"); + lines.appendIndentedCode(TQString(), "<< " + i18n("insert interrupt code") + " >>"); if (needPCLATH) { lines.appendIndentedCode("movf pclath_saved,w", i18n("restore context")); lines.appendIndentedCode("movwf PCLATH"); @@ -118,7 +118,7 @@ SourceLine::List GPUtils::SourceGenerator::sourceFileContent(PURL::ToolType, con lines.appendIndentedCode("retfie"); lines.appendEmpty(); lines.appendNotIndentedCode("start"); - lines.appendIndentedCode(QString::null, "<< " + i18n("insert main code") + " >>"); + lines.appendIndentedCode(TQString(), "<< " + i18n("insert main code") + " >>"); lines.appendIndentedCode("goto $", i18n("loop forever")); lines.appendEmpty(); lines.appendNotIndentedCode("END"); @@ -173,30 +173,30 @@ SourceLine::List GPUtils::SourceGenerator::sourceFileContent(PURL::ToolType, con lines.appendIndentedCode("goto peripheral_isr", i18n("go to start of peripheral interrupt code")); lines.appendEmpty(); lines.appendNotIndentedCode("start:"); - lines.appendIndentedCode(QString::null, "<< " + i18n("insert main code") + " >>"); + lines.appendIndentedCode(TQString(), "<< " + i18n("insert main code") + " >>"); lines.appendIndentedCode("goto $", i18n("loop forever")); lines.appendEmpty(); lines.appendTitle(i18n("INT pin interrupt service routine")); lines.appendNotIndentedCode("int_pin_isr:"); - lines.appendIndentedCode(QString::null, "<< " + i18n("insert INT pin interrupt code") + " >>"); + lines.appendIndentedCode(TQString(), "<< " + i18n("insert INT pin interrupt code") + " >>"); lines.appendIndentedCode("POP"); lines.appendIndentedCode("retfie"); lines.appendEmpty(); lines.appendTitle(i18n("TIMER0 interrupt service routine")); lines.appendNotIndentedCode("timer0_isr:"); - lines.appendIndentedCode(QString::null, "<< " + i18n("insert TIMER0 interrupt code") + " >>"); + lines.appendIndentedCode(TQString(), "<< " + i18n("insert TIMER0 interrupt code") + " >>"); lines.appendIndentedCode("POP"); lines.appendIndentedCode("retfie"); lines.appendEmpty(); lines.appendTitle(i18n("T0CKI interrupt service routine")); lines.appendNotIndentedCode("t0cki_isr:"); - lines.appendIndentedCode(QString::null, "<< " + i18n("insert T0CKI interrupt code") + " >>"); + lines.appendIndentedCode(TQString(), "<< " + i18n("insert T0CKI interrupt code") + " >>"); lines.appendIndentedCode("POP"); lines.appendIndentedCode("retfie"); lines.appendEmpty(); lines.appendTitle(i18n("peripheral interrupt service routine")); lines.appendNotIndentedCode("peripheral_isr:"); - lines.appendIndentedCode(QString::null, "<< " + i18n("insert peripheral interrupt code") + " >>"); + lines.appendIndentedCode(TQString(), "<< " + i18n("insert peripheral interrupt code") + " >>"); lines.appendIndentedCode("POP"); lines.appendIndentedCode("retfie"); lines.appendEmpty(); @@ -229,7 +229,7 @@ SourceLine::List GPUtils::SourceGenerator::sourceFileContent(PURL::ToolType, con lines.appendIndentedCode("movff STATUS,status_saved", i18n("save context")); lines.appendIndentedCode("movff WREG,w_saved"); lines.appendIndentedCode("movff BSR,bsr_saved"); - lines.appendIndentedCode(QString::null, "<< " + i18n("insert low priority interrupt code") + " >>"); + lines.appendIndentedCode(TQString(), "<< " + i18n("insert low priority interrupt code") + " >>"); lines.appendIndentedCode("movff bsr_saved,BSR", i18n("restore context")); lines.appendIndentedCode("movff w_saved,WREG"); lines.appendIndentedCode("movff status_saved,STATUS"); @@ -237,11 +237,11 @@ SourceLine::List GPUtils::SourceGenerator::sourceFileContent(PURL::ToolType, con lines.appendEmpty(); lines.appendTitle(i18n("high priority interrupt service routine")); lines.appendNotIndentedCode("high_interrupt:"); - lines.appendIndentedCode(QString::null, "<< " + i18n("insert high priority interrupt code") + " >>"); + lines.appendIndentedCode(TQString(), "<< " + i18n("insert high priority interrupt code") + " >>"); lines.appendIndentedCode("retfie FAST"); lines.appendEmpty(); lines.appendNotIndentedCode("start:"); - lines.appendIndentedCode(QString::null, "<< " + i18n("insert main code") + " >>"); + lines.appendIndentedCode(TQString(), "<< " + i18n("insert main code") + " >>"); lines.appendIndentedCode("goto $", i18n("loop forever")); lines.appendEmpty(); lines.appendNotIndentedCode("END"); diff --git a/src/tools/gputils/gputils_generator.h b/src/tools/gputils/gputils_generator.h index 38da66d..9f2e7ac 100644 --- a/src/tools/gputils/gputils_generator.h +++ b/src/tools/gputils/gputils_generator.h @@ -14,7 +14,7 @@ namespace GPUtils { -extern QValueList getSupportedDevices(const QString &s); +extern TQValueList getSupportedDevices(const TQString &s); class SourceGenerator : public Tool::SourceGenerator { diff --git a/src/tools/gputils/gui/gputils_ui.cpp b/src/tools/gputils/gui/gputils_ui.cpp index 35cdce8..bab898e 100644 --- a/src/tools/gputils/gui/gputils_ui.cpp +++ b/src/tools/gputils/gui/gputils_ui.cpp @@ -9,7 +9,7 @@ ***************************************************************************/ #include "gputils_ui.h" -#include +#include #include "tools/gputils/gputils_config.h" //---------------------------------------------------------------------------- @@ -21,10 +21,10 @@ void GPUtils::ConfigWidget::initEntries() { if ( _category==Tool::Category::Assembler ) { uint row = container()->numRows(); - QLabel *label = new QLabel(i18n("Warning level:"), container()); + TQLabel *label = new TQLabel(i18n("Warning level:"), container()); container()->addWidget(label, row,row, 0,0); - _gpasmWarning = new QComboBox(container()); - connect(_gpasmWarning, SIGNAL(activated(int)), SIGNAL(changed())); + _gpasmWarning = new TQComboBox(container()); + connect(_gpasmWarning, TQT_SIGNAL(activated(int)), TQT_SIGNAL(changed())); for (uint i=0; iinsertItem(i18n(GPUtils::Config::WARNING_LEVEL_LABELS[i])); _gpasmWarning->insertItem(i18n("as in LIST directive")); diff --git a/src/tools/gputils/gui/gputils_ui.h b/src/tools/gputils/gui/gputils_ui.h index 8d6daea..70b88ff 100644 --- a/src/tools/gputils/gui/gputils_ui.h +++ b/src/tools/gputils/gui/gputils_ui.h @@ -19,12 +19,13 @@ namespace GPUtils class ConfigWidget : public ToolConfigWidget { Q_OBJECT + TQ_OBJECT public: ConfigWidget(Project *project); virtual void initEntries(); protected: - QComboBox *_gpasmWarning; + TQComboBox *_gpasmWarning; virtual void loadConfig(const Compile::Config &config); virtual void saveConfig(Compile::Config &config) const; }; diff --git a/src/tools/gui/tool_config_widget.cpp b/src/tools/gui/tool_config_widget.cpp index 308e61b..ea2fd80 100644 --- a/src/tools/gui/tool_config_widget.cpp +++ b/src/tools/gui/tool_config_widget.cpp @@ -9,9 +9,9 @@ ***************************************************************************/ #include "tool_config_widget.h" -#include -#include -#include +#include +#include +#include #include #include "devices/base/hex_buffer.h" @@ -33,32 +33,32 @@ ToolConfigWidget::ToolConfigWidget(Project *project) Container *container = new Container(this); container->setColStretch(2, 1); addWidget(container, 0,0, 0,0); - QLabel *label = new QLabel(i18n("Configuration:"), container); + TQLabel *label = new TQLabel(i18n("Configuration:"), container); container->addWidget(label, 0,0, 0,0); _argumentsType = new KComboBox(container); for (uint i=0; iinsertItem(i18n(ARGUMENTS_TYPE_LABELS[i]), i); - connect(_argumentsType, SIGNAL(activated(int)), SLOT(updateArguments())); + connect(_argumentsType, TQT_SIGNAL(activated(int)), TQT_SLOT(updateArguments())); container->addWidget(_argumentsType, 0,0, 1,1); - label = new QLabel(i18n("Arguments:"), container); + label = new TQLabel(i18n("Arguments:"), container); container->addWidget(label, 1,1, 0,0); _arguments = new KLineEdit(container); _arguments->setReadOnly(true); container->addWidget(_arguments, 1,1, 1,2); - KPushButton *button = new KPushButton(KGuiItem(QString::null, "help"), container); - connect(button, SIGNAL(clicked()), SIGNAL(displayHelp())); + KPushButton *button = new KPushButton(KGuiItem(TQString(), "help"), container); + connect(button, TQT_SIGNAL(clicked()), TQT_SIGNAL(displayHelp())); container->addWidget(button, 1,1, 3,3); _argumentsEditor = new EditListBox(1, container, "arguments_editor", EditListBox::DuplicatesAllowed, EditListBox::Add | EditListBox::Remove | EditListBox::UpDown | EditListBox::RemoveAll | EditListBox::Reset); - connect(_argumentsEditor, SIGNAL(changed()), SLOT(updateArguments())); - connect(_argumentsEditor, SIGNAL(reset()), SLOT(resetCustomArguments())); + connect(_argumentsEditor, TQT_SIGNAL(changed()), TQT_SLOT(updateArguments())); + connect(_argumentsEditor, TQT_SIGNAL(reset()), TQT_SLOT(resetCustomArguments())); container->addWidget(_argumentsEditor, 2,2, 0,3); _container = new Container(container); _container->setColStretch(2, 1); container->addWidget(_container, 3,3, 0,3); - connect(this, SIGNAL(changed()), SLOT(updateArguments())); + connect(this, TQT_SIGNAL(changed()), TQT_SLOT(updateArguments())); } void ToolConfigWidget::init(Tool::Category category, const Tool::Group &group) @@ -68,7 +68,7 @@ void ToolConfigWidget::init(Tool::Category category, const Tool::Group &group) _config = _group->createConfig(_project); _tmpProject = new Project(PURL::Url()); _tmpConfig = _group->createConfig(_tmpProject); - Compile::Data data(_category, QValueList(), QString::null, _project, Compile::NormalLinking); + Compile::Data data(_category, TQValueList(), TQString(), _project, Compile::NormalLinking); _process = _group->createCompileProcess(data, 0); initEntries(); @@ -83,11 +83,11 @@ ToolConfigWidget::~ToolConfigWidget() delete _config; } -PURL::DirectoriesWidget *ToolConfigWidget::createDirectoriesEntry(const QString &text) +PURL::DirectoriesWidget *ToolConfigWidget::createDirectoriesEntry(const TQString &text) { uint row = container()->numRows(); - PURL::DirectoriesWidget *sdw = new PURL::DirectoriesWidget(text, _project ? _project->directory().path() : QString::null, container()); - connect(sdw, SIGNAL(changed()), SIGNAL(changed())); + PURL::DirectoriesWidget *sdw = new PURL::DirectoriesWidget(text, _project ? _project->directory().path() : TQString(), container()); + connect(sdw, TQT_SIGNAL(changed()), TQT_SIGNAL(changed())); container()->addWidget(sdw, row,row, 0,2); return sdw; } @@ -95,31 +95,31 @@ PURL::DirectoriesWidget *ToolConfigWidget::createDirectoriesEntry(const QString void ToolConfigWidget::createCustomOptionsEntry() { uint row = container()->numRows(); - QLabel *label = new QLabel(i18n("Custom options:"), container()); + TQLabel *label = new TQLabel(i18n("Custom options:"), container()); container()->addWidget(label, row,row, 0,0); - _customOptions = new QLineEdit(container()); - connect(_customOptions, SIGNAL(textChanged(const QString &)), SIGNAL(changed())); + _customOptions = new TQLineEdit(container()); + connect(_customOptions, TQT_SIGNAL(textChanged(const TQString &)), TQT_SIGNAL(changed())); container()->addWidget(_customOptions, row,row, 1,2); } void ToolConfigWidget::createCustomLibrariesEntry() { uint row = container()->numRows(); - QLabel *label = new QLabel(i18n("Custom libraries:"), container()); + TQLabel *label = new TQLabel(i18n("Custom libraries:"), container()); container()->addWidget(label, row,row, 0,0); - _customLibraries = new QLineEdit(container()); - connect(_customLibraries, SIGNAL(textChanged(const QString &)), SIGNAL(changed())); - QToolTip::add(_customLibraries, i18n("This values will be placed after the linked objects.")) ; + _customLibraries = new TQLineEdit(container()); + connect(_customLibraries, TQT_SIGNAL(textChanged(const TQString &)), TQT_SIGNAL(changed())); + TQToolTip::add(_customLibraries, i18n("This values will be placed after the linked objects.")) ; container()->addWidget(_customLibraries, row,row, 1,2); } void ToolConfigWidget::createHexFormatEntry() { uint row = container()->numRows(); - QLabel *label = new QLabel(i18n("Hex file format:"), container()); + TQLabel *label = new TQLabel(i18n("Hex file format:"), container()); container()->addWidget(label, row,row, 0,0); - _hexFormat = new QComboBox(container()); - connect(_hexFormat, SIGNAL(activated(int)), SIGNAL(changed())); + _hexFormat = new TQComboBox(container()); + connect(_hexFormat, TQT_SIGNAL(activated(int)), TQT_SIGNAL(changed())); for (uint i=0; iinsertItem(HexBuffer::FORMATS[i]); _hexFormat->insertItem(i18n("as in LIST directive")); @@ -159,9 +159,9 @@ void ToolConfigWidget::saveConfig(Compile::Config &config) const if (_hexFormat) config.setHexFormat(HexBuffer::Format(_hexFormat->currentItem())); } -QStringList ToolConfigWidget::arguments(ArgumentsType type) const +TQStringList ToolConfigWidget::arguments(ArgumentsType type) const { - if ( _tmpConfig==0 ) return QStringList(); + if ( _tmpConfig==0 ) return TQStringList(); saveConfig(*_tmpConfig); if ( type==AutomaticArguments ) return _process->genericArguments(*_tmpConfig); return _argumentsEditor->texts(); diff --git a/src/tools/gui/tool_config_widget.h b/src/tools/gui/tool_config_widget.h index 5b38753..f9239b3 100644 --- a/src/tools/gui/tool_config_widget.h +++ b/src/tools/gui/tool_config_widget.h @@ -10,10 +10,10 @@ #ifndef TOOL_CONFIG_WIDGET_H #define TOOL_CONFIG_WIDGET_H -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -27,6 +27,7 @@ namespace PURL { class DirectoriesWidget; } class ToolConfigWidget : public ::ConfigWidget { Q_OBJECT + TQ_OBJECT public: ToolConfigWidget(Project *project); void init(Tool::Category category, const Tool::Group &group); @@ -48,12 +49,12 @@ protected: const Tool::Group *_group; Tool::Category _category; Project *_project; - QLineEdit *_customOptions, *_customLibraries; + TQLineEdit *_customOptions, *_customLibraries; PURL::DirectoriesWidget *_includeDirs; - QComboBox *_hexFormat; + TQComboBox *_hexFormat; Container *container() { return _container; } - PURL::DirectoriesWidget * createDirectoriesEntry(const QString &label); + PURL::DirectoriesWidget * createDirectoriesEntry(const TQString &label); void createIncludeDirectoriesEntry() { _includeDirs = createDirectoriesEntry(i18n("Include directories:")); } void createCustomOptionsEntry(); void createCustomLibrariesEntry(); @@ -73,7 +74,7 @@ private: EditListBox *_argumentsEditor; Container *_container; - QStringList arguments(ArgumentsType type) const; + TQStringList arguments(ArgumentsType type) const; }; #endif diff --git a/src/tools/gui/tool_group_ui.cpp b/src/tools/gui/tool_group_ui.cpp index 9bb02dd..118b8c7 100644 --- a/src/tools/gui/tool_group_ui.cpp +++ b/src/tools/gui/tool_group_ui.cpp @@ -11,9 +11,9 @@ #include "tool_config_widget.h" #include "toolchain_config_widget.h" -ToolchainConfigWidget *Tool::GroupUI::toolchainConfigWidgetFactory(QWidget *parent) const +ToolchainConfigWidget *Tool::GroupUI::toolchainConfigWidgetFactory(TQWidget *tqparent) const { - return new ToolchainConfigWidget(static_cast(group()), parent); + return new ToolchainConfigWidget(static_cast(group()), tqparent); } ToolConfigWidget *Tool::GroupUI::createConfigWidget(Category category, ::Project *project) const diff --git a/src/tools/gui/tool_group_ui.h b/src/tools/gui/tool_group_ui.h index 4d1f42c..f03d633 100644 --- a/src/tools/gui/tool_group_ui.h +++ b/src/tools/gui/tool_group_ui.h @@ -22,7 +22,7 @@ class GroupUI : public ::Group::BaseGui public: ToolConfigWidget *createConfigWidget(Category category, ::Project *project) const; virtual ToolConfigWidget *configWidgetFactory(Category category, ::Project *project) const = 0; - virtual ToolchainConfigWidget *toolchainConfigWidgetFactory(QWidget *parent) const; + virtual ToolchainConfigWidget *toolchainConfigWidgetFactory(TQWidget *tqparent) const; }; inline const GroupUI &groupui(const Base &base) { return static_cast(*base.group().gui()); } diff --git a/src/tools/gui/toolchain_config_center.cpp b/src/tools/gui/toolchain_config_center.cpp index c8b889d..60df0f8 100644 --- a/src/tools/gui/toolchain_config_center.cpp +++ b/src/tools/gui/toolchain_config_center.cpp @@ -9,8 +9,8 @@ ***************************************************************************/ #include "toolchain_config_center.h" -#include -#include +#include +#include #include #include "tools/list/tools_config_widget.h" @@ -19,29 +19,29 @@ #include "toolchain_config_widget.h" #include "tool_group_ui.h" -ToolchainsConfigCenter::ToolchainsConfigCenter(const Tool::Group &sgroup, QWidget *parent) - : TreeListDialog(parent, "configure_toolchains_dialog", true, +ToolchainsConfigCenter::ToolchainsConfigCenter(const Tool::Group &sgroup, TQWidget *tqparent) + : TreeListDialog(tqparent, "configure_toolchains_dialog", true, i18n("Configure Toolchains"), Ok|User1|User2|Cancel, Cancel, false) { setButtonGuiItem(User1, KStdGuiItem::reset()); setButtonGuiItem(User2, KGuiItem(i18n("Update"), "reload")); _titleBox->addStretch(1); - _infoButton = new KPushButton(KGuiItem(QString::null, "viewmag"), _frame); - connect(_infoButton, SIGNAL(clicked()), SLOT(showInformationDialog())); + _infoButton = new KPushButton(KGuiItem(TQString(), "viewmag"), _frame); + connect(_infoButton, TQT_SIGNAL(clicked()), TQT_SLOT(showInformationDialog())); _titleBox->addWidget(_infoButton); - QWidget *current = 0; + TQWidget *current = 0; FOR_EACH(PURL::SourceFamily, family) { Tool::Lister::ConstIterator it; for (it=Tool::lister().begin(); it!=Tool::lister().end(); ++it) { PURL::FileType type = it.data()->implementationType(family.data().toolType); if ( type==PURL::Nb_FileTypes || type.data().sourceFamily!=family ) continue; if ( family==PURL::SourceFamily::Asm && it.data()->implementationType(PURL::ToolType::Compiler)!=PURL::Nb_FileTypes ) continue; - QStringList names = family.label(); + TQStringList names = family.label(); names += it.data()->label(); - QWidget *page = addPage(names); - QVBoxLayout *vbox = new QVBoxLayout(page); + TQWidget *page = addPage(names); + TQVBoxLayout *vbox = new TQVBoxLayout(page); ToolchainConfigWidget *tcw = static_cast(it.data()->gui())->toolchainConfigWidgetFactory(page); tcw->init(); tcw->loadConfig(); @@ -52,21 +52,21 @@ ToolchainsConfigCenter::ToolchainsConfigCenter(const Tool::Group &sgroup, QWidge } showPage(current); aboutToShowPageSlot(current); - connect(this, SIGNAL(aboutToShowPage(QWidget *)), SLOT(aboutToShowPageSlot(QWidget *))); + connect(this, TQT_SIGNAL(aboutToShowPage(TQWidget *)), TQT_SLOT(aboutToShowPageSlot(TQWidget *))); } -void ToolchainsConfigCenter::aboutToShowPageSlot(QWidget *page) +void ToolchainsConfigCenter::aboutToShowPageSlot(TQWidget *page) { - if ( !_pages.contains(page) ) _infoButton->hide(); + if ( !_pages.tqcontains(page) ) _infoButton->hide(); else { _infoButton->show(); - QTimer::singleShot(0, _pages[page], SLOT(detect())); + TQTimer::singleShot(0, _pages[page], TQT_SLOT(detect())); } } void ToolchainsConfigCenter::slotApply() { - QMap::iterator it; + TQMap::iterator it; for (it=_pages.begin(); it!=_pages.end(); ++it) it.data()->saveConfig(); } @@ -80,7 +80,7 @@ ToolchainConfigWidget *ToolchainsConfigCenter::current() const { int i = activePageIndex(); if ( i==-1 ) return 0; - QMap::const_iterator it; + TQMap::const_iterator it; for (it=_pages.begin(); it!=_pages.end(); ++it) if ( pageIndex(it.key())==i ) return it.data(); Q_ASSERT(false); diff --git a/src/tools/gui/toolchain_config_center.h b/src/tools/gui/toolchain_config_center.h index 4b2110b..6b02f91 100644 --- a/src/tools/gui/toolchain_config_center.h +++ b/src/tools/gui/toolchain_config_center.h @@ -10,10 +10,10 @@ #ifndef TOOLCHAIN_CONFIG_CENTER_H #define TOOLCHAIN_CONFIG_CENTER_H -#include -#include -#include -#include +#include +#include +#include +#include #include "tools/gui/tool_config_widget.h" #include "common/gui/dialog.h" @@ -22,8 +22,9 @@ class ToolchainConfigWidget; class ToolchainsConfigCenter : public TreeListDialog { Q_OBJECT + TQ_OBJECT public: - ToolchainsConfigCenter(const Tool::Group &group, QWidget *parent); + ToolchainsConfigCenter(const Tool::Group &group, TQWidget *tqparent); public slots: virtual void slotOk(); @@ -32,12 +33,12 @@ public slots: virtual void slotUser2(); private slots: - void aboutToShowPageSlot(QWidget *page); + void aboutToShowPageSlot(TQWidget *page); void showInformationDialog(); private: KPushButton *_infoButton; - QMap _pages; + TQMap _pages; ToolchainConfigWidget *current() const; }; diff --git a/src/tools/gui/toolchain_config_widget.cpp b/src/tools/gui/toolchain_config_widget.cpp index aede699..d735f09 100644 --- a/src/tools/gui/toolchain_config_widget.cpp +++ b/src/tools/gui/toolchain_config_widget.cpp @@ -8,11 +8,11 @@ ***************************************************************************/ #include "toolchain_config_widget.h" -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -22,8 +22,8 @@ #include "common/gui/container.h" //---------------------------------------------------------------------------- -ToolchainConfigWidget::ToolchainConfigWidget(const Tool::Group &group, QWidget *parent) - : ::ConfigWidget(parent), +ToolchainConfigWidget::ToolchainConfigWidget(const Tool::Group &group, TQWidget *tqparent) + : ::ConfigWidget(tqparent), _group(group), _dirty(false), _outputType(0), _devicesData(group.nbCheckDevices()) { _config = group.createConfig(0); @@ -41,18 +41,18 @@ void ToolchainConfigWidget::init() container->setColStretch(3, 1); uint row = 0; - QLabel *label = new QLabel(Compile::DirectoryType(Compile::DirectoryType::Executable).label() + ":", container); + TQLabel *label = new TQLabel(Compile::DirectoryType(Compile::DirectoryType::Executable).label() + ":", container); container->addWidget(label, row,row, 0,0); _dirs[Compile::DirectoryType::Executable] = new PURL::DirectoryWidget(container); - connect(_dirs[Compile::DirectoryType::Executable], SIGNAL(changed()), SLOT(forceDetect())); + connect(_dirs[Compile::DirectoryType::Executable], TQT_SIGNAL(changed()), TQT_SLOT(forceDetect())); container->addWidget(_dirs[Compile::DirectoryType::Executable], row,row, 1,3); row++; - label = new QLabel(i18n("Executable Type:"), container); + label = new TQLabel(i18n("Executable Type:"), container); container->addWidget(label, row,row, 0,0); - _execType = new QComboBox(container); + _execType = new TQComboBox(container); FOR_EACH(Tool::ExecutableType, type) _execType->insertItem(type.label()); - connect(_execType, SIGNAL(activated(int)), SLOT(forceDetect())); + connect(_execType, TQT_SIGNAL(activated(int)), TQT_SLOT(forceDetect())); container->addWidget(_execType, row,row, 1,2); row++; @@ -60,12 +60,12 @@ void ToolchainConfigWidget::init() FOR_EACH(Tool::OutputExecutableType, type) if ( _group.hasOutputExecutableType(type) ) nbOutputTypes++; if ( nbOutputTypes>1 ) { - label = new QLabel(i18n("Output Executable Type:"), container); + label = new TQLabel(i18n("Output Executable Type:"), container); container->addWidget(label, row,row, 0,0); _outputType = new KeyComboBox(container); FOR_EACH(Tool::OutputExecutableType, type) if ( _group.hasOutputExecutableType(type) ) _outputType->appendItem(type, type.label()); - connect(_outputType->widget(), SIGNAL(activated(int)), SLOT(forceDetect())); + connect(_outputType->widget(), TQT_SIGNAL(activated(int)), TQT_SLOT(forceDetect())); container->addWidget(_outputType->widget(), row,row, 1,1); row++; } @@ -75,22 +75,22 @@ void ToolchainConfigWidget::init() FOR_EACH(Tool::Category, k) { const Tool::Base *base = _group.base(k); if ( base==0 ) continue; - label = new QLabel(k.label(), container); + label = new TQLabel(k.label(), container); container->addWidget(label, row,row, 0,0); - _data[k].label = new QLabel(container); + _data[k].label = new TQLabel(container); container->addWidget(_data[k].label, row,row, 1,1); - _data[k].button = new KPushButton(KGuiItem(QString::null, "viewmag"), container); - connect(_data[k].button, SIGNAL(clicked()), SLOT(showDetails())); + _data[k].button = new KPushButton(KGuiItem(TQString(), "viewmag"), container); + connect(_data[k].button, TQT_SIGNAL(clicked()), TQT_SLOT(showDetails())); container->addWidget(_data[k].button, row,row, 2,2); row++; } - label = new QLabel(i18n("Device detection:"), container); + label = new TQLabel(i18n("Device detection:"), container); container->addWidget(label, row,row, 0,0); - _devicesLabel = new QLabel(container); + _devicesLabel = new TQLabel(container); container->addWidget(_devicesLabel, row,row, 1,1); - KPushButton *button = new KPushButton(KGuiItem(QString::null, "viewmag"), container); - connect(button, SIGNAL(clicked()), SLOT(showDeviceDetails())); + KPushButton *button = new KPushButton(KGuiItem(TQString(), "viewmag"), container); + connect(button, TQT_SIGNAL(clicked()), TQT_SLOT(showDeviceDetails())); container->addWidget(button, row,row, 2,2); row++; @@ -99,7 +99,7 @@ void ToolchainConfigWidget::init() if ( type==Compile::DirectoryType::Executable ) continue; if ( !_group.hasDirectory(type) ) _dirs[type] = 0; else { - label = new QLabel(type.label() + ":", this); + label = new TQLabel(type.label() + ":", this); addWidget(label, row,row, 0,0); _dirs[type] = new PURL::DirectoryWidget(this); addWidget(_dirs[type], row,row, 1,3); @@ -108,9 +108,9 @@ void ToolchainConfigWidget::init() } if ( !_group.comment().isEmpty() ) { - KTextEdit *w = new KTextEdit(_group.comment(), QString::null, this); + KTextEdit *w = new KTextEdit(_group.comment(), TQString(), this); w->setReadOnly(true); - w->setWordWrap(QTextEdit::WidgetWidth); + w->setWordWrap(TQTextEdit::WidgetWidth); addWidget(w, row,row, 0,3); row++; } @@ -161,9 +161,9 @@ void ToolchainConfigWidget::checkExecutableDone() } _data[i].checkLines = _data[i].process->sout() + _data[i].process->serr(); const Tool::Base *base = _group.base(i); - QString exec = base->baseExecutable(withWine(), outputType()); - if ( base->checkExecutableResult(withWine(), _data[i].checkLines) ) _data[i].label->setText(i18n("\"%1\" found").arg(exec)); - else _data[i].label->setText(i18n("\"%1\" not recognized").arg(exec)); + TQString exec = base->baseExecutable(withWine(), outputType()); + if ( base->checkExecutableResult(withWine(), _data[i].checkLines) ) _data[i].label->setText(i18n("\"%1\" found").tqarg(exec)); + else _data[i].label->setText(i18n("\"%1\" not recognized").tqarg(exec)); break; } } @@ -180,12 +180,12 @@ void ToolchainConfigWidget::checkDevicesDone() _devicesData[i].done = true; break; } - QValueList list; + TQValueList list; for(uint i=0; i<_devicesData.count(); i++) { if ( !_devicesData[i].done ) return; list += _group.getSupportedDevices(_devicesData[i].checkLines.join("\n")); } - _devicesLabel->setText(i18n("Detected (%1)").arg(list.count())); + _devicesLabel->setText(i18n("Detected (%1)").tqarg(list.count())); } bool ToolchainConfigWidget::withWine() const @@ -198,7 +198,7 @@ Tool::OutputExecutableType ToolchainConfigWidget::outputType() const return (_outputType==0 ? Compile::Config::outputExecutableType(_group) : _outputType->currentItem()); } -QString ToolchainConfigWidget::baseExecutable(Tool::Category category) const +TQString ToolchainConfigWidget::baseExecutable(Tool::Category category) const { return _group.base(category)->baseExecutable(withWine(), outputType()); } @@ -226,23 +226,23 @@ void ToolchainConfigWidget::detect() _data[k].checkLines.clear(); _data[k].process = checkExecutableProcess(k); _data[k].command = _data[k].process->prettyCommand(); - connect(_data[k].process, SIGNAL(done(int)), SLOT(checkExecutableDone())); - connect(_data[k].process, SIGNAL(timeout()), SLOT(checkExecutableDone())); - QString exec = baseExecutable(k); - if ( !_data[k].process->start(10000) ) _data[k].label->setText(i18n("\"%1\" not found").arg(exec)); - else _data[k].label->setText(i18n("Detecting \"%1\"...").arg(exec)); + connect(_data[k].process, TQT_SIGNAL(done(int)), TQT_SLOT(checkExecutableDone())); + connect(_data[k].process, TQT_SIGNAL(timeout()), TQT_SLOT(checkExecutableDone())); + TQString exec = baseExecutable(k); + if ( !_data[k].process->start(10000) ) _data[k].label->setText(i18n("\"%1\" not found").tqarg(exec)); + else _data[k].label->setText(i18n("Detecting \"%1\"...").tqarg(exec)); } } if ( _group.checkDevicesCategory()==Tool::Category::Nb_Types ) { - QValueVector supported = _group.supportedDevices(); - _devicesLabel->setText(i18n("Hardcoded (%1)").arg(supported.count())); + TQValueVector supported = _group.supportedDevices(); + _devicesLabel->setText(i18n("Hardcoded (%1)").tqarg(supported.count())); } else { for (uint i=0; i<_devicesData.count(); i++) { delete _devicesData[i].process; _devicesData[i].process = checkDevicesProcess(i); _devicesData[i].command = _devicesData[i].process->prettyCommand(); - connect(_devicesData[i].process, SIGNAL(done(int)), SLOT(checkDevicesDone())); - connect(_devicesData[i].process, SIGNAL(timeout()), SLOT(checkDevicesDone())); + connect(_devicesData[i].process, TQT_SIGNAL(done(int)), TQT_SLOT(checkDevicesDone())); + connect(_devicesData[i].process, TQT_SIGNAL(timeout()), TQT_SLOT(checkDevicesDone())); _devicesData[i].done = false; _devicesData[i].checkLines.clear(); if ( !_devicesData[i].process->start(10000) ) _devicesLabel->setText(i18n("Failed")); @@ -262,11 +262,11 @@ void ToolchainConfigWidget::showDetails() { FOR_EACH(Tool::Category, k) { if ( sender()!=_data[k].button ) continue; - QString s; + TQString s; const Tool::Base *base = _group.base(k); if ( base->checkExecutable() ) { - s += i18n("Command for executable detection:
%1
").arg(_data[k].command); - s += i18n("Version string:
%1
").arg(_data[k].checkLines.join("
")); + s += i18n("Command for executable detection:
%1
").tqarg(_data[k].command); + s += i18n("Version string:
%1
").tqarg(_data[k].checkLines.join("
")); } else s += i18n("This tool cannot be automatically detected."); MessageBox::text(s, Log::Show); break; @@ -275,10 +275,10 @@ void ToolchainConfigWidget::showDetails() void ToolchainConfigWidget::showDeviceDetails() { - QString s; + TQString s; if ( _group.checkDevicesCategory()==Tool::Category::Nb_Types ) { s += ""; - QValueVector supported = _group.supportedDevices(); + TQValueVector supported = _group.supportedDevices(); for (uint i=0; iCommand for devices detection:
%1
").arg(_devicesData[i].command); - else s += i18n("Command #%1 for devices detection:
%2
").arg(i+1).arg(_devicesData[i].command); - QString ss = _devicesData[i].checkLines.join("
"); - if ( nb==1 ) s += i18n("Device string:
%1
").arg(ss); - else s += i18n("Device string #%1:
%2
").arg(i+1).arg(ss); + if ( nb==1 ) s += i18n("Command for devices detection:
%1
").tqarg(_devicesData[i].command); + else s += i18n("Command #%1 for devices detection:
%2
").tqarg(i+1).tqarg(_devicesData[i].command); + TQString ss = _devicesData[i].checkLines.join("
"); + if ( nb==1 ) s += i18n("Device string:
%1
").tqarg(ss); + else s += i18n("Device string #%1:
%2
").tqarg(i+1).tqarg(ss); } } MessageBox::text(s, Log::Show); diff --git a/src/tools/gui/toolchain_config_widget.h b/src/tools/gui/toolchain_config_widget.h index ad7978a..b1e795d 100644 --- a/src/tools/gui/toolchain_config_widget.h +++ b/src/tools/gui/toolchain_config_widget.h @@ -9,8 +9,8 @@ #ifndef TOOLCHAIN_CONFIG_WIDGET_H #define TOOLCHAIN_CONFIG_WIDGET_H -#include -#include +#include +#include #include #include @@ -26,8 +26,9 @@ namespace Tool { class Group; } class ToolchainConfigWidget : public ::ConfigWidget { Q_OBJECT + TQ_OBJECT public: - ToolchainConfigWidget(const Tool::Group &group, QWidget *parent); + ToolchainConfigWidget(const Tool::Group &group, TQWidget *tqparent); virtual ~ToolchainConfigWidget(); const Tool::Group &group() const { return _group; } void init(); @@ -42,7 +43,7 @@ protected: bool withWine() const; Tool::OutputExecutableType outputType() const; virtual void addCustomExecutableOptions(Container *) {} - virtual QString baseExecutable(Tool::Category category) const; + virtual TQString baseExecutable(Tool::Category category) const; virtual ::Process::LineOutput *checkExecutableProcess(Tool::Category category) const; virtual ::Process::LineOutput *checkDevicesProcess(uint i) const; @@ -56,30 +57,30 @@ protected: const Tool::Group &_group; Compile::Config *_config; bool _dirty; - QComboBox *_execType; + TQComboBox *_execType; KeyComboBox *_outputType; - QLabel *_devicesLabel; - QMap _dirs; + TQLabel *_devicesLabel; + TQMap _dirs; class ExecData { public: ExecData() : label(0), button(0), process(0) {} ~ExecData() { delete process; } - QLabel *label; - QString command; - QStringList checkLines; + TQLabel *label; + TQString command; + TQStringList checkLines; KPushButton *button; ::Process::LineOutput *process; }; - QMap _data; + TQMap _data; class DevicesData { public: DevicesData() : process(0) {} bool done; - QString command; - QStringList checkLines; + TQString command; + TQStringList checkLines; ::Process::LineOutput *process; }; - QValueVector _devicesData; + TQValueVector _devicesData; }; #endif diff --git a/src/tools/jal/gui/jal_ui.h b/src/tools/jal/gui/jal_ui.h index aa6957e..d87d3e2 100644 --- a/src/tools/jal/gui/jal_ui.h +++ b/src/tools/jal/gui/jal_ui.h @@ -18,6 +18,7 @@ namespace JAL class ConfigWidget : public ToolConfigWidget { Q_OBJECT + TQ_OBJECT public: ConfigWidget(Project *project); virtual void initEntries() {} diff --git a/src/tools/jal/jal.cpp b/src/tools/jal/jal.cpp index 009ea21..11e503d 100644 --- a/src/tools/jal/jal.cpp +++ b/src/tools/jal/jal.cpp @@ -16,19 +16,19 @@ #include "jal_generator.h" //---------------------------------------------------------------------------- -bool JAL::Base::checkExecutableResult(bool, QStringList &lines) const +bool JAL::Base::checkExecutableResult(bool, TQStringList &lines) const { - QStringList tmp; + TQStringList tmp; for (uint i=0; i0 && lines[0].startsWith("jal") ); } //---------------------------------------------------------------------------- -QString JAL::Group::informationText() const +TQString JAL::Group::informationText() const { - return i18n("JAL is a high-level language for PIC microcontrollers.").arg("http://jal.sourceforge.net"); + return i18n("JAL is a high-level language for PIC microcontrollers.").tqarg("http://jal.sourceforge.net"); } Tool::Group::BaseData JAL::Group::baseFactory(Tool::Category category) const @@ -44,9 +44,9 @@ const char * const SUPPORTED_DEVICES[] = { 0 }; -QValueList JAL::Group::getSupportedDevices(const QString &) const +TQValueList JAL::Group::getSupportedDevices(const TQString &) const { - QValueList list; + TQValueList list; for (uint i=0; SUPPORTED_DEVICES[i]; i++) { const Device::Data *data = Device::lister().data(SUPPORTED_DEVICES[i]); Q_ASSERT(data); diff --git a/src/tools/jal/jal.h b/src/tools/jal/jal.h index 0c0d790..3aa3cae 100644 --- a/src/tools/jal/jal.h +++ b/src/tools/jal/jal.h @@ -17,20 +17,20 @@ namespace JAL class Base : public Tool::Base { public: - virtual QString baseExecutable(bool, Tool::OutputExecutableType) const { return "jal"; } + virtual TQString baseExecutable(bool, Tool::OutputExecutableType) const { return "jal"; } private: - virtual QStringList checkExecutableOptions(bool) const { return QStringList(); } - virtual bool checkExecutableResult(bool withWine, QStringList &lines) const; + virtual TQStringList checkExecutableOptions(bool) const { return TQStringList(); } + virtual bool checkExecutableResult(bool withWine, TQStringList &lines) const; }; //---------------------------------------------------------------------------- class Group : public Tool::Group { public: - virtual QString name() const { return "jal"; } - virtual QString label() const { return i18n("JAL"); } - virtual QString informationText() const; + virtual TQString name() const { return "jal"; } + virtual TQString label() const { return i18n("JAL"); } + virtual TQString informationText() const; virtual Tool::Category checkDevicesCategory() const { return Tool::Category::Nb_Types; } virtual Tool::ExecutableType preferedExecutableType() const { return Tool::ExecutableType::Unix; } virtual Tool::CompileType compileType() const { return Tool::AllFiles; } @@ -38,7 +38,7 @@ public: private: virtual BaseData baseFactory(Tool::Category c) const; - virtual QValueList getSupportedDevices(const QString &s) const; + virtual TQValueList getSupportedDevices(const TQString &s) const; virtual Compile::Process *processFactory(const Compile::Data &data) const; virtual Compile::Config *configFactory(::Project *project) const; virtual Tool::SourceGenerator *sourceGeneratorFactory() const; diff --git a/src/tools/jal/jal_compile.cpp b/src/tools/jal/jal_compile.cpp index 4d62e68..aa7d42f 100644 --- a/src/tools/jal/jal_compile.cpp +++ b/src/tools/jal/jal_compile.cpp @@ -8,19 +8,19 @@ ***************************************************************************/ #include "jal_compile.h" -void JAL::CompileFile::logStderrLine(const QString &line) +void JAL::CompileFile::logStderrLine(const TQString &line) { - if ( line.contains('\r') ) return; // what are those lines ? + if ( line.tqcontains('\r') ) return; // what are those lines ? // #### TODO - doLog(Log::LineType::Normal, line, QString::null, 0); // unrecognized + doLog(Log::LineType::Normal, line, TQString(), 0); // unrecognized } -QStringList JAL::CompileFile::genericArguments(const Compile::Config &) const +TQStringList JAL::CompileFile::genericArguments(const Compile::Config &) const { return "%I"; } -QString JAL::CompileFile::outputFiles() const +TQString JAL::CompileFile::outputFiles() const { return "PURL::AsmGPAsm PURL::Hex"; } diff --git a/src/tools/jal/jal_compile.h b/src/tools/jal/jal_compile.h index e63f603..c3fae70 100644 --- a/src/tools/jal/jal_compile.h +++ b/src/tools/jal/jal_compile.h @@ -17,11 +17,12 @@ namespace JAL class CompileFile : public Compile::Process { Q_OBJECT + TQ_OBJECT protected: - virtual QString deviceName() const { return _data.device; } - virtual void logStderrLine(const QString &line); - virtual QStringList genericArguments(const Compile::Config &config) const; - virtual QString outputFiles() const; + virtual TQString deviceName() const { return _data.device; } + virtual void logStderrLine(const TQString &line); + virtual TQStringList genericArguments(const Compile::Config &config) const; + virtual TQString outputFiles() const; }; } // namespace diff --git a/src/tools/jal/jal_generator.cpp b/src/tools/jal/jal_generator.cpp index 6aa9b08..ce76846 100644 --- a/src/tools/jal/jal_generator.cpp +++ b/src/tools/jal/jal_generator.cpp @@ -28,7 +28,7 @@ SourceLine::List JAL::SourceGenerator::sourceFileContent(PURL::ToolType, const D { SourceLine::List lines; lines.appendTitle(i18n("main code")); - lines.appendNotIndentedCode(QString::null, "<< " + i18n("insert code") + " >>"); + lines.appendNotIndentedCode(TQString(), "<< " + i18n("insert code") + " >>"); lines.appendNotIndentedCode("forever loop", i18n("loop forever")); lines.appendNotIndentedCode("end loop"); return lines; diff --git a/src/tools/jalv2/gui/jalv2_ui.h b/src/tools/jalv2/gui/jalv2_ui.h index 93085c1..4944860 100644 --- a/src/tools/jalv2/gui/jalv2_ui.h +++ b/src/tools/jalv2/gui/jalv2_ui.h @@ -18,6 +18,7 @@ namespace JALV2 class ConfigWidget : public ToolConfigWidget { Q_OBJECT + TQ_OBJECT public: ConfigWidget(Project *project); virtual void initEntries(); diff --git a/src/tools/jalv2/jalv2.cpp b/src/tools/jalv2/jalv2.cpp index 1d910b8..8ea6d1e 100644 --- a/src/tools/jalv2/jalv2.cpp +++ b/src/tools/jalv2/jalv2.cpp @@ -16,19 +16,19 @@ #include "tools/jal/jal_generator.h" //---------------------------------------------------------------------------- -bool JALV2::Base::checkExecutableResult(bool, QStringList &lines) const +bool JALV2::Base::checkExecutableResult(bool, TQStringList &lines) const { - QStringList tmp; + TQStringList tmp; for (uint i=0; i0 && lines[0].startsWith("jal") ); } //---------------------------------------------------------------------------- -QString JALV2::Group::informationText() const +TQString JALV2::Group::informationText() const { - return i18n("JAL V2 is a new compiler for the high-level language JAL.").arg("http://www.casadeyork.com/jalv2"); + return i18n("JAL V2 is a new compiler for the high-level language JAL.").tqarg("http://www.casadeyork.com/jalv2"); } Tool::Group::BaseData JALV2::Group::baseFactory(Tool::Category category) const @@ -49,9 +49,9 @@ const char * const SUPPORTED_DEVICES[] = { 0 }; -QValueList JALV2::Group::getSupportedDevices(const QString &) const +TQValueList JALV2::Group::getSupportedDevices(const TQString &) const { - QValueList list; + TQValueList list; for (uint i=0; SUPPORTED_DEVICES[i]; i++) { const Device::Data *data = Device::lister().data(SUPPORTED_DEVICES[i]); Q_ASSERT(data); diff --git a/src/tools/jalv2/jalv2.h b/src/tools/jalv2/jalv2.h index 80c3d02..3f1348c 100644 --- a/src/tools/jalv2/jalv2.h +++ b/src/tools/jalv2/jalv2.h @@ -17,20 +17,20 @@ namespace JALV2 class Base : public Tool::Base { public: - virtual QString baseExecutable(bool, Tool::OutputExecutableType) const { return "jalv2"; } + virtual TQString baseExecutable(bool, Tool::OutputExecutableType) const { return "jalv2"; } private: - virtual QStringList checkExecutableOptions(bool) const { return QStringList(); } - virtual bool checkExecutableResult(bool withWine, QStringList &lines) const; + virtual TQStringList checkExecutableOptions(bool) const { return TQStringList(); } + virtual bool checkExecutableResult(bool withWine, TQStringList &lines) const; }; //---------------------------------------------------------------------------- class Group : public Tool::Group { public: - virtual QString name() const { return "jalv2"; } - virtual QString label() const { return i18n("JAL V2"); } - virtual QString informationText() const; + virtual TQString name() const { return "jalv2"; } + virtual TQString label() const { return i18n("JAL V2"); } + virtual TQString informationText() const; virtual bool hasDirectory(Compile::DirectoryType type) const { return type==Compile::DirectoryType::Header; } virtual Tool::Category checkDevicesCategory() const { return Tool::Category::Nb_Types; } virtual Tool::ExecutableType preferedExecutableType() const { return Tool::ExecutableType::Unix; } @@ -39,7 +39,7 @@ public: private: virtual BaseData baseFactory(Tool::Category c) const; - virtual QValueList getSupportedDevices(const QString &s) const; + virtual TQValueList getSupportedDevices(const TQString &s) const; virtual Compile::Process *processFactory(const Compile::Data &data) const; virtual Compile::Config *configFactory(::Project *project) const; virtual Tool::SourceGenerator *sourceGeneratorFactory() const; diff --git a/src/tools/jalv2/jalv2_compile.cpp b/src/tools/jalv2/jalv2_compile.cpp index 0b1e7f5..73274aa 100644 --- a/src/tools/jalv2/jalv2_compile.cpp +++ b/src/tools/jalv2/jalv2_compile.cpp @@ -12,11 +12,11 @@ #include "common/common/misc.h" #include "tools/list/compile_config.h" -QStringList JALV2::CompileFile::genericArguments(const Compile::Config &config) const +TQStringList JALV2::CompileFile::genericArguments(const Compile::Config &config) const { - QStringList args; - QStringList includes = config.includeDirs(Tool::Category::Compiler, QString::null, QString::null, ";"); - QString s = (includes.isEmpty() ? QString::null : includes[0]); + TQStringList args; + TQStringList includes = config.includeDirs(Tool::Category::Compiler, TQString(), TQString(), ";"); + TQString s = (includes.isEmpty() ? TQString() : includes[0]); PURL::Directory dir = Compile::Config::directory(group(), Compile::DirectoryType::Header).path(); if ( !dir.isEmpty() ) { if ( !s.isEmpty() ) s += ";"; @@ -30,14 +30,14 @@ QStringList JALV2::CompileFile::genericArguments(const Compile::Config &config) return args; } -void JALV2::CompileFile::logStderrLine(const QString &line) +void JALV2::CompileFile::logStderrLine(const TQString &line) { if ( parseErrorLine(line, Compile::ParseErrorData("([^:]*):([0-9]+):\\s*(warning)(.+)", 1, 2, 4, 3)) ) return; if ( parseErrorLine(line, Compile::ParseErrorData("([^:]*):([0-9]+):\\s*(.+)", 1, 2, 3, Log::LineType::Error)) ) return; - doLog(Log::LineType::Normal, line, QString::null, 0); // unrecognized + doLog(Log::LineType::Normal, line, TQString(), 0); // unrecognized } -QString JALV2::CompileFile::outputFiles() const +TQString JALV2::CompileFile::outputFiles() const { return "PURL::AsmGPAsm PURL::Hex"; } diff --git a/src/tools/jalv2/jalv2_compile.h b/src/tools/jalv2/jalv2_compile.h index de0257d..d145c4b 100644 --- a/src/tools/jalv2/jalv2_compile.h +++ b/src/tools/jalv2/jalv2_compile.h @@ -16,11 +16,12 @@ namespace JALV2 class CompileFile : public Compile::Process { Q_OBJECT + TQ_OBJECT protected: - virtual QString deviceName() const { return _data.device; } - virtual void logStderrLine(const QString &line); - virtual QStringList genericArguments(const Compile::Config &config) const; - virtual QString outputFiles() const; + virtual TQString deviceName() const { return _data.device; } + virtual void logStderrLine(const TQString &line); + virtual TQStringList genericArguments(const Compile::Config &config) const; + virtual TQString outputFiles() const; }; } // namespace diff --git a/src/tools/list/compile_config.cpp b/src/tools/list/compile_config.cpp index 5ec8dfc..ffa1895 100644 --- a/src/tools/list/compile_config.cpp +++ b/src/tools/list/compile_config.cpp @@ -16,68 +16,68 @@ //---------------------------------------------------------------------------- PURL::Directory Compile::Config::directory(const Tool::Group &group, DirectoryType type) { - QString def; + TQString def; if ( type!=DirectoryType::Executable ) def = group.autodetectDirectory(type, directory(group, DirectoryType::Executable), withWine(group)).path(); - return PURL::Directory(value(group.name(), QString::null, type.key() + QString("_path"), def)); + return PURL::Directory(value(group.name(), TQString(), type.key() + TQString("_path"), def)); } void Compile::Config::setDirectory(const Tool::Group &group, DirectoryType type, const PURL::Directory &dir) { - setValue(group.name(), QString::null, type.key() + QString("_path"), dir.path()); + setValue(group.name(), TQString(), type.key() + TQString("_path"), dir.path()); if ( type==DirectoryType::Executable ) const_cast(group).init(); } bool Compile::Config::withWine(const Tool::Group &group) { - QString def = (group.preferedExecutableType()==Tool::ExecutableType::Unix ? "false" : "true"); - return ( value(group.name(), QString::null, "with_wine", def)=="true" ); + TQString def = (group.preferedExecutableType()==Tool::ExecutableType::Unix ? "false" : "true"); + return ( value(group.name(), TQString(), "with_wine", def)=="true" ); } void Compile::Config::setWithWine(const Tool::Group &group, bool withWine) { - setValue(group.name(), QString::null, "with_wine", withWine ? "true" : "false"); + setValue(group.name(), TQString(), "with_wine", withWine ? "true" : "false"); const_cast(group).init(); } Tool::OutputExecutableType Compile::Config::outputExecutableType(const Tool::Group &group) { - QString s = value(group.name(), QString::null, "output_type", Tool::OutputExecutableType(Tool::OutputExecutableType::Coff).key()); + TQString s = value(group.name(), TQString(), "output_type", Tool::OutputExecutableType(Tool::OutputExecutableType::Coff).key()); return Tool::OutputExecutableType::fromKey(s); } void Compile::Config::setOutputExecutableType(const Tool::Group &group, Tool::OutputExecutableType type) { - setValue(group.name(), QString::null, "output_type", type.key()); + setValue(group.name(), TQString(), "output_type", type.key()); const_cast(group).init(); } -QString Compile::Config::value(const QString &group, const QString &subGroup, const QString &key, const QString &defaultValue) +TQString Compile::Config::value(const TQString &group, const TQString &subGroup, const TQString &key, const TQString &defaultValue) { - QString grp = (subGroup.isEmpty() ? group : group + '-' + subGroup); + TQString grp = (subGroup.isEmpty() ? group : group + '-' + subGroup); GenericConfig gc(grp); return gc.readEntry(key, defaultValue); } -void Compile::Config::setValue(const QString &group, const QString &subGroup, const QString &key, const QString &value) +void Compile::Config::setValue(const TQString &group, const TQString &subGroup, const TQString &key, const TQString &value) { - QString grp = (subGroup.isEmpty() ? group : group + '-' + subGroup); + TQString grp = (subGroup.isEmpty() ? group : group + '-' + subGroup); GenericConfig gc(grp); gc.writeEntry(key, value); } -QStringList Compile::Config::listValues(const QString &group, const QString &subGroup, const QString &key, const QStringList &defaultValues) +TQStringList Compile::Config::listValues(const TQString &group, const TQString &subGroup, const TQString &key, const TQStringList &defaultValues) { - QString grp = (subGroup.isEmpty() ? group : group + '-' + subGroup); + TQString grp = (subGroup.isEmpty() ? group : group + '-' + subGroup); GenericConfig gc(grp); return gc.readListEntry(key, defaultValues); } -void Compile::Config::setListValues(const QString &group, const QString &subGroup, const QString &key, const QStringList &values) +void Compile::Config::setListValues(const TQString &group, const TQString &subGroup, const TQString &key, const TQStringList &values) { - QString grp = (subGroup.isEmpty() ? group : group + '-' + subGroup); + TQString grp = (subGroup.isEmpty() ? group : group + '-' + subGroup); GenericConfig gc(grp); gc.writeEntry(key, values); } -QStringList Compile::Config::includeDirs(Tool::Category category, const QString &prefix, const QString &suffix, const QString &separator) const +TQStringList Compile::Config::includeDirs(Tool::Category category, const TQString &prefix, const TQString &suffix, const TQString &separator) const { - QStringList list; - QStringList raw = rawIncludeDirs(category); + TQStringList list; + TQStringList raw = rawIncludeDirs(category); for (uint i=0; isetValue(category.key(), key, value); else Config::setValue(_group->name(), category.key(), key, value); } -QString Compile::Config::value(Tool::Category category, const QString &key, const QString &defaultValue) const +TQString Compile::Config::value(Tool::Category category, const TQString &key, const TQString &defaultValue) const { Q_ASSERT( category!=Tool::Category::Nb_Types ); Q_ASSERT( _project || _group ); if (_project) return _project->value(category.key(), key, defaultValue); return Config::value(_group->name(), category.key(), key, defaultValue); } -void Compile::Config::setListValues(Tool::Category category, const QString &key, const QStringList &values) +void Compile::Config::setListValues(Tool::Category category, const TQString &key, const TQStringList &values) { Q_ASSERT( category!=Tool::Category::Nb_Types ); Q_ASSERT( _project || _group ); if (_project) _project->setListValues(category.key(), key, values); else Config::setListValues(_group->name(), category.key(), key, values); } -QStringList Compile::Config::listValues(Tool::Category category, const QString &key, const QStringList &defaultValues) const +TQStringList Compile::Config::listValues(Tool::Category category, const TQString &key, const TQStringList &defaultValues) const { Q_ASSERT( category!=Tool::Category::Nb_Types ); Q_ASSERT( _project || _group ); if (_project) return _project->listValues(category.key(), key, defaultValues); return Config::listValues(_group->name(), category.key(), key, defaultValues); } -bool Compile::Config::boolValue(Tool::Category category, const QString &key, bool defaultValue) const +bool Compile::Config::boolValue(Tool::Category category, const TQString &key, bool defaultValue) const { - QString s = value(category, key, QString::null); + TQString s = value(category, key, TQString()); if ( s.isNull() ) return defaultValue; return !( s=="false" || s=="0" ); } -uint Compile::Config::uintValue(Tool::Category category, const QString &key, uint defaultValue) const +uint Compile::Config::uintValue(Tool::Category category, const TQString &key, uint defaultValue) const { bool ok; - uint i = value(category, key, QString::null).toUInt(&ok); + uint i = value(category, key, TQString()).toUInt(&ok); if ( !ok ) return defaultValue; return i; } -QString Compile::Config::globalValue(const Project *project, const QString &key, const QString &defaultValue) +TQString Compile::Config::globalValue(const Project *project, const TQString &key, const TQString &defaultValue) { if (project) return project->value("general", key, defaultValue); - return Config::value("general", QString::null, key, defaultValue); + return Config::value("general", TQString(), key, defaultValue); } -void Compile::Config::setGlobalValue(Project *project, const QString &key, const QString &value) +void Compile::Config::setGlobalValue(Project *project, const TQString &key, const TQString &value) { if (project) project->setValue("general", key, value); - else Config::setValue("general", QString::null, key, value); + else Config::setValue("general", TQString(), key, value); } -QStringList Compile::Config::globalListValues(const Project *project, const QString &key, const QStringList &defaultValues) +TQStringList Compile::Config::globalListValues(const Project *project, const TQString &key, const TQStringList &defaultValues) { if (project) return project->listValues("general", key, defaultValues); - return Config::listValues("general", QString::null, key, defaultValues); + return Config::listValues("general", TQString(), key, defaultValues); } -void Compile::Config::setGlobalListValues(Project *project, const QString &key, const QStringList &values) +void Compile::Config::setGlobalListValues(Project *project, const TQString &key, const TQStringList &values) { if (project) project->setListValues("general", key, values); - else Config::setListValues("general", QString::null, key, values); + else Config::setListValues("general", TQString(), key, values); } diff --git a/src/tools/list/compile_config.h b/src/tools/list/compile_config.h index 13beff4..7e032a1 100644 --- a/src/tools/list/compile_config.h +++ b/src/tools/list/compile_config.h @@ -24,32 +24,32 @@ public: bool hasCustomArguments(Tool::Category category) const { return boolValue(category, "has_custom_arguments", false); } void setHasCustomArguments(Tool::Category category, bool custom) { setValue(category, "has_custom_arguments", custom); } - QStringList customArguments(Tool::Category category) const { return listValues(category, "custom_arguments", QStringList()); } - void setCustomArguments(Tool::Category category, const QStringList &args) { return setListValues(category, "custom_arguments", args); } - QStringList rawIncludeDirs(Tool::Category category) const { return listValues(category, "includes", "$(SRCPATH)"); } - QStringList includeDirs(Tool::Category category, const QString &prefix, const QString &suffix = QString::null, const QString &separator = QString::null) const; - void setRawIncludeDirs(Tool::Category category, const QStringList &dirs) { setListValues(category, "includes", dirs); } - QString rawCustomOptions(Tool::Category category) const { return value(category, "custom_options", QString::null); } - QStringList customOptions(Tool::Category category) const; - void setRawCustomOptions(Tool::Category category, const QString &value) { setValue(category, "custom_options", value); } - QString rawCustomLibraries(Tool::Category category) const { return value(category, "custom_libraries", QString::null); } - QStringList customLibraries(Tool::Category category) const; - void setRawCustomLibraries(Tool::Category category, const QString &value) { setValue(category, "custom_libraries", value); } + TQStringList customArguments(Tool::Category category) const { return listValues(category, "custom_arguments", TQStringList()); } + void setCustomArguments(Tool::Category category, const TQStringList &args) { return setListValues(category, "custom_arguments", args); } + TQStringList rawIncludeDirs(Tool::Category category) const { return listValues(category, "includes", "$(SRCPATH)"); } + TQStringList includeDirs(Tool::Category category, const TQString &prefix, const TQString &suffix = TQString(), const TQString &separator = TQString()) const; + void setRawIncludeDirs(Tool::Category category, const TQStringList &dirs) { setListValues(category, "includes", dirs); } + TQString rawCustomOptions(Tool::Category category) const { return value(category, "custom_options", TQString()); } + TQStringList customOptions(Tool::Category category) const; + void setRawCustomOptions(Tool::Category category, const TQString &value) { setValue(category, "custom_options", value); } + TQString rawCustomLibraries(Tool::Category category) const { return value(category, "custom_libraries", TQString()); } + TQStringList customLibraries(Tool::Category category) const; + void setRawCustomLibraries(Tool::Category category, const TQString &value) { setValue(category, "custom_libraries", value); } uint warningLevel(Tool::Category category) const { return uintValue(category, "warning_level", 0); } - void setWarningLevel(Tool::Category category, uint level) { setValue(category, "warning_level", QString::number(level)); } + void setWarningLevel(Tool::Category category, uint level) { setValue(category, "warning_level", TQString::number(level)); } HexBuffer::Format hexFormat() const; void setHexFormat(HexBuffer::Format format); static const Tool::Group &toolGroup(const Project *project); static void setToolGroup(Project *project, const Tool::Group &group) { setGlobalValue(project, "tool", group.name()); } - static QString device(const Project *project); - static void setDevice(Project *project, const QString &device) { setGlobalValue(project, "device", device); } - static QStringList customCommands(Project *project) { return globalListValues(project, "custom_shell_commands", QStringList()); } - static void setCustomCommands(Project *project, const QStringList &commands) { setGlobalListValues(project, "custom_shell_commands", commands); } - static QString globalValue(const Project *project, const QString &key, const QString &defaultValue); - static void setGlobalValue(Project *project, const QString &key, const QString &value); - static QStringList globalListValues(const Project *project, const QString &key, const QStringList &defaultValues); - static void setGlobalListValues(Project *project, const QString &key, const QStringList &value); + static TQString device(const Project *project); + static void setDevice(Project *project, const TQString &device) { setGlobalValue(project, "device", device); } + static TQStringList customCommands(Project *project) { return globalListValues(project, "custom_shell_commands", TQStringList()); } + static void setCustomCommands(Project *project, const TQStringList &commands) { setGlobalListValues(project, "custom_shell_commands", commands); } + static TQString globalValue(const Project *project, const TQString &key, const TQString &defaultValue); + static void setGlobalValue(Project *project, const TQString &key, const TQString &value); + static TQStringList globalListValues(const Project *project, const TQString &key, const TQStringList &defaultValues); + static void setGlobalListValues(Project *project, const TQString &key, const TQStringList &value); static PURL::Directory directory(const Tool::Group &group, DirectoryType type); static void setDirectory(const Tool::Group &group, DirectoryType type, const PURL::Directory &dir); @@ -62,19 +62,19 @@ protected: const Tool::Group *_group; Project *_project; - void setValue(Tool::Category category, const QString &key, const QString &value); - QString value(Tool::Category category, const QString &key, const QString &defaultValue) const; - void setListValues(Tool::Category category, const QString &key, const QStringList &values); - QStringList listValues(Tool::Category category, const QString &key, const QStringList &defaultValues) const; - void setValue(Tool::Category category, const QString &key, bool value) { setValue(category, key, QString(value ? "true" : "false")); } - bool boolValue(Tool::Category category, const QString &key, bool defaultValue) const; - void setValue(Tool::Category category, const QString &key, uint value) { setValue(category, key, QString::number(value)); } - uint uintValue(Tool::Category category, const QString &key, uint defaultValue) const; + void setValue(Tool::Category category, const TQString &key, const TQString &value); + TQString value(Tool::Category category, const TQString &key, const TQString &defaultValue) const; + void setListValues(Tool::Category category, const TQString &key, const TQStringList &values); + TQStringList listValues(Tool::Category category, const TQString &key, const TQStringList &defaultValues) const; + void setValue(Tool::Category category, const TQString &key, bool value) { setValue(category, key, TQString(value ? "true" : "false")); } + bool boolValue(Tool::Category category, const TQString &key, bool defaultValue) const; + void setValue(Tool::Category category, const TQString &key, uint value) { setValue(category, key, TQString::number(value)); } + uint uintValue(Tool::Category category, const TQString &key, uint defaultValue) const; - static QString value(const QString &group, const QString &subGroup, const QString &key, const QString &defaultValue); - static void setValue(const QString &group, const QString &subGroup, const QString &key, const QString &value); - static QStringList listValues(const QString &group, const QString &subGroup, const QString &key, const QStringList &defaultValues); - static void setListValues(const QString &group, const QString &subGroup, const QString &key, const QStringList &values); + static TQString value(const TQString &group, const TQString &subGroup, const TQString &key, const TQString &defaultValue); + static void setValue(const TQString &group, const TQString &subGroup, const TQString &key, const TQString &value); + static TQStringList listValues(const TQString &group, const TQString &subGroup, const TQString &key, const TQStringList &defaultValues); + static void setListValues(const TQString &group, const TQString &subGroup, const TQString &key, const TQStringList &values); friend class Tool::Group; }; diff --git a/src/tools/list/compile_manager.cpp b/src/tools/list/compile_manager.cpp index 00a4182..92f33a5 100644 --- a/src/tools/list/compile_manager.cpp +++ b/src/tools/list/compile_manager.cpp @@ -9,14 +9,14 @@ ***************************************************************************/ #include "compile_manager.h" -#include +#include #include "libgui/project.h" #include "common/gui/misc_gui.h" #include "compile_config.h" -Compile::Manager::Manager(QObject *parent) - : QObject(parent, "compile_manager"), _base(0) +Compile::Manager::Manager(TQObject *tqparent) + : TQObject(tqparent, "compile_manager"), _base(0) {} void Compile::Manager::cleanFile(const PURL::Url &url) @@ -39,7 +39,7 @@ bool Compile::Manager::setupFile(Operations op, const TodoItem &item) _todo.append(item); _action = Compiling; _wholeProject = false; - QTimer::singleShot(0, this, SLOT(start())); + TQTimer::singleShot(0, this, TQT_SLOT(start())); return true; } @@ -74,7 +74,7 @@ bool Compile::Manager::setupProject(Operations op, LinkType type) } _action = Compiling; _wholeProject = true; - QTimer::singleShot(0, this, SLOT(start())); + TQTimer::singleShot(0, this, TQT_SLOT(start())); return true; } @@ -106,9 +106,9 @@ bool Compile::Manager::setupCompile() for (uint i=0; i<_items.count(); i++) { if ( _items[i].url.fileType()!=type ) { if ( _operations!=Clean ) { - QString e = PURL::extensions(type); + TQString e = PURL::extensions(type); MessageBox::detailedSorry(i18n("The selected toolchain (%1) cannot compile file. It only supports files with extensions: %2") - .arg(Main::toolGroup().label()).arg(e), i18n("File: %1").arg(_items[i].url.pretty()), Log::Show); + .tqarg(Main::toolGroup().label()).tqarg(e), i18n("File: %1").tqarg(_items[i].url.pretty()), Log::Show); Log::Base::log(Log::LineType::Error, i18n("*** Aborted ***"), Log::Delayed); processFailed(); } @@ -131,9 +131,9 @@ bool Compile::Manager::setupAssemble() if ( _items[i].url.fileType()!=type ) { if ( _operations!=Clean ) { if ( type==PURL::Nb_FileTypes ) type = Main::toolGroup().implementationType(PURL::ToolType::Compiler); - QString e = PURL::extensions(type); + TQString e = PURL::extensions(type); MessageBox::detailedSorry(i18n("The selected toolchain (%1) cannot assemble file. It only supports files with extensions: %2") - .arg(Main::toolGroup().label()).arg(e), i18n("File: %1").arg(_items[i].url.pretty()), Log::Show); + .tqarg(Main::toolGroup().label()).tqarg(e), i18n("File: %1").tqarg(_items[i].url.pretty()), Log::Show); Log::Base::log(Log::LineType::Error, i18n("*** Aborted ***"), Log::Delayed); processFailed(); } @@ -216,7 +216,7 @@ void Compile::Manager::start() } if ( _operations & Clean ) { _base->files(0).onlyExistingFiles().cleanGenerated(); - QTimer::singleShot(0, this, SLOT(start())); + TQTimer::singleShot(0, this, TQT_SLOT(start())); return; } if ( !_base->start() ) { @@ -225,13 +225,13 @@ void Compile::Manager::start() } } -void Compile::Manager::log(Log::LineType type, const QString &message, const QString &filepath, uint line) +void Compile::Manager::log(Log::LineType type, const TQString &message, const TQString &filepath, uint line) { if ( type==Log::LineType::Error ) setError(message); static_cast(view())->appendLine(type, message, filepath, line); } -void Compile::Manager::log(Log::DebugLevel level, const QString &message, const QString &filepath, uint line) +void Compile::Manager::log(Log::DebugLevel level, const TQString &message, const TQString &filepath, uint line) { static_cast(view())->appendLine(level, message, filepath, line); } @@ -249,7 +249,7 @@ void Compile::Manager::processDone() FileData::List list = _base->files(0).onlyExistingFiles(); FileData::List::iterator it; for (it=list.begin(); it!=list.end(); ++it) emit updateFile(*it); - QTimer::singleShot(0, this, SLOT(start())); + TQTimer::singleShot(0, this, TQT_SLOT(start())); } } @@ -263,18 +263,18 @@ void Compile::Manager::startCustomCommand() { delete _base; _base = 0; - QStringList commands = Compile::Config::customCommands(Main::project()); + TQStringList commands = Compile::Config::customCommands(Main::project()); if ( _customCommandIndex==commands.count() ) { Log::Base::log(Log::LineType::Information, i18n("*** Success ***"), Log::Delayed); emit success(); return; } - QString command = commands[_customCommandIndex]; + TQString command = commands[_customCommandIndex]; _base = new CustomProcess(command); Compile::Data data(Tool::Category::Nb_Types, _todo, Main::device(), Main::project(), _type); _base->init(data, this); if ( !_base->start() ) { - Log::Base::log(Log::LineType::Error, i18n("Failed to execute custom command #%1.").arg(_customCommandIndex+1), Log::Delayed); + Log::Base::log(Log::LineType::Error, i18n("Failed to execute custom command #%1.").tqarg(_customCommandIndex+1), Log::Delayed); processFailed(); } } diff --git a/src/tools/list/compile_manager.h b/src/tools/list/compile_manager.h index 6f617b4..0d144e6 100644 --- a/src/tools/list/compile_manager.h +++ b/src/tools/list/compile_manager.h @@ -14,16 +14,17 @@ namespace Compile { -class Manager : public QObject, public Log::Base +class Manager : public TQObject, public Log::Base { Q_OBJECT + TQ_OBJECT public: enum Operation { NoOperation = 0, Clean = 1, CompileOnly = 2, Build = 4 }; - Q_DECLARE_FLAGS(Operations, Operation) + TQ_DECLARE_FLAGS(Operations, Operation) public: - Manager(QObject *parent); - QString label() const { return _label; } + Manager(TQObject *tqparent); + TQString label() const { return _label; } bool compileFile(const TodoItem &item); void cleanFile(const PURL::Url &url); bool buildProject(LinkType type); @@ -32,8 +33,8 @@ public: bool compileOnly() const { return (_operations & CompileOnly); } void processDone(); void processFailed(); - void log(Log::LineType type, const QString &message, const QString &filepath = QString::null, uint line = 0); - void log(Log::DebugLevel debug, const QString &message, const QString &filepath = QString::null, uint line = 0); + void log(Log::LineType type, const TQString &message, const TQString &filepath = TQString(), uint line = 0); + void log(Log::DebugLevel debug, const TQString &message, const TQString &filepath = TQString(), uint line = 0); signals: void success(); @@ -47,9 +48,9 @@ private: Operations _operations; enum Action { Compiling, Linking, BinToHex }; Action _action; - QValueList _todo, _items; + TQValueList _todo, _items; BaseProcess *_base; - QString _label; + TQString _label; LinkType _type; bool _wholeProject; uint _customCommandIndex; @@ -67,7 +68,7 @@ private: void startCustomCommand(); void executeCustomCommands(); }; -Q_DECLARE_OPERATORS_FOR_FLAGS(Manager::Operations) +TQ_DECLARE_OPERATORS_FOR_FLAGS(Manager::Operations) } // namespace diff --git a/src/tools/list/compile_process.cpp b/src/tools/list/compile_process.cpp index 4f251bc..4d24e88 100644 --- a/src/tools/list/compile_process.cpp +++ b/src/tools/list/compile_process.cpp @@ -9,8 +9,8 @@ ***************************************************************************/ #include "compile_process.h" -#include -#include +#include +#include #include "devices/list/device_list.h" #include "common/global/process.h" @@ -67,10 +67,10 @@ void Compile::FileData::List::cleanGenerated() const } //----------------------------------------------------------------------------- -Compile::LogWidget::LogWidget(QWidget *parent) - : Log::Widget(parent, "compile_log") +Compile::LogWidget::LogWidget(TQWidget *tqparent) + : Log::Widget(tqparent, "compile_log") { - connect(this, SIGNAL(clicked(int, int)), SLOT(lineClicked(int))); + connect(this, TQT_SIGNAL(clicked(int, int)), TQT_SLOT(lineClicked(int))); } void Compile::LogWidget::clear() @@ -79,13 +79,13 @@ void Compile::LogWidget::clear() _map.clear(); } -void Compile::LogWidget::appendLine(Log::LineType type, const QString &message, const QString &filepath, uint line) +void Compile::LogWidget::appendLine(Log::LineType type, const TQString &message, const TQString &filepath, uint line) { log(type, message, Log::Delayed); if ( !filepath.isEmpty() ) _map[paragraphs()-1] = Data(filepath, line); } -void Compile::LogWidget::appendLine(Log::DebugLevel level, const QString &message, const QString &filepath, uint line) +void Compile::LogWidget::appendLine(Log::DebugLevel level, const TQString &message, const TQString &filepath, uint line) { log(level, message, Log::Delayed); if ( !filepath.isEmpty() ) _map[paragraphs()-1] = Data(filepath, line); @@ -93,16 +93,16 @@ void Compile::LogWidget::appendLine(Log::DebugLevel level, const QString &messag void Compile::LogWidget::lineClicked(int line) { - if ( !_map.contains(line) ) return; + if ( !_map.tqcontains(line) ) return; PURL::Url url = PURL::Url::fromPathOrUrl(_map[line].filepath); - TextEditor *e = ::qt_cast(Main::editorManager().openEditor(url)); + TextEditor *e = ::tqqt_cast(Main::editorManager().openEditor(url)); if ( e==0 ) return; e->setCursor(_map[line].line, 0); } //----------------------------------------------------------------------------- Compile::BaseProcess::BaseProcess() - : QObject(0, "compile_process"), _manager(0), _process(0) + : TQObject(0, "compile_process"), _manager(0), _process(0) {} void Compile::BaseProcess::init(const Data &data, Manager *manager) @@ -120,14 +120,14 @@ PURL::Directory Compile::BaseProcess::directory(uint i) const bool Compile::BaseProcess::start() { - _stdout = QString::null; - _stderr = QString::null; + _stdout = TQString(); + _stderr = TQString(); delete _process; _process = new ::Process::LineSignal; - connect(_process, SIGNAL(done(int)), SLOT(done(int))); - connect(_process, SIGNAL(timeout()), SLOT(timeout())); - connect(_process, SIGNAL(logStdoutLine(const QString &)), SLOT(logStdoutLine(const QString &))); - connect(_process, SIGNAL(logStderrLine(const QString &)), SLOT(logStderrLine(const QString &))); + connect(_process, TQT_SIGNAL(done(int)), TQT_SLOT(done(int))); + connect(_process, TQT_SIGNAL(timeout()), TQT_SLOT(timeout())); + connect(_process, TQT_SIGNAL(logStdoutLine(const TQString &)), TQT_SLOT(logStdoutLine(const TQString &))); + connect(_process, TQT_SIGNAL(logStderrLine(const TQString &)), TQT_SLOT(logStderrLine(const TQString &))); _process->setWorkingDirectory(directory().path()); setupProcess(); _manager->log(Log::LineType::Command, _process->arguments().join(" ")); @@ -137,7 +137,7 @@ bool Compile::BaseProcess::start() void Compile::BaseProcess::done(int code) { if ( code!=0 ) { - _manager->log(Log::LineType::Error, i18n("*** Exited with status: %1 ***").arg(code)); + _manager->log(Log::LineType::Error, i18n("*** Exited with status: %1 ***").tqarg(code)); _manager->processFailed(); } else if ( _manager->hasError() ) { _manager->log(Log::LineType::Error, i18n("*** Error ***")); @@ -183,12 +183,12 @@ PURL::Url Compile::Process::url(PURL::FileType type, uint i) const return url.toFileType(type); } -QString Compile::Process::filepath(PURL::FileType type, uint i) const +TQString Compile::Process::filepath(PURL::FileType type, uint i) const { return url(type, i).relativeTo(directory(), Compile::Config::withWine(group()) ? PURL::WindowsSeparator : PURL::UnixSeparator); } -QString Compile::Process::outputFilepath() const +TQString Compile::Process::outputFilepath() const { if ( _data.category==Tool::Category::Librarian ) return filepath(PURL::Library); return filepath(PURL::Hex); @@ -203,8 +203,8 @@ Compile::FileData::List Compile::Process::files(bool *ok) const { if (ok) *ok = true; FileData::List list; - QRegExp rexp("PURL::(.*)"); - QStringList files = QStringList::split(" ", outputFiles()); + TQRegExp rexp("PURL::(.*)"); + TQStringList files = TQStringList::split(" ", outputFiles()); for (uint i=0; ihasCustomArguments(_data.category); bool withWine = Compile::Config::withWine(group()); - QStringList args = (custom ? _config->customArguments(_data.category) : genericArguments(*_config)); + TQStringList args = (custom ? _config->customArguments(_data.category) : genericArguments(*_config)); PURL::Url lkr = Main::toolGroup().linkerScript(_data.project, _data.linkType); - QStringList nargs; + TQStringList nargs; for (uint i=0; ilibrariesForLinker(QString::null, withWine); + if (_data.project) nargs += _data.project->librariesForLinker(TQString(), withWine); continue; } - args[i].replace("%OBJECT", filepath(PURL::Object)); // before %O - args[i].replace("%O", outputFilepath()); - args[i].replace("%COFF", filepath(PURL::Coff)); - if (_data.project) args[i].replace("%PROJECT", _data.project->name()); - else args[i].replace("%PROJECT", url().basename()); - args[i].replace("%MAP", filepath(PURL::Map)); - args[i].replace("%SYM", url().toExtension("sym").relativeTo(directory(), withWine ? PURL::WindowsSeparator : PURL::UnixSeparator)); - args[i].replace("%LIST", filepath(PURL::Lst)); - args[i].replace("%DEVICE", deviceName()); - args[i].replace("%FAMILY", familyName()); - args[i].replace("%LKR_PATH", lkr.path()); // before %LKR - args[i].replace("%LKR_NAME", lkr.filename()); // before LKR - args[i].replace("%LKR", lkr.filepath()); + args[i].tqreplace("%OBJECT", filepath(PURL::Object)); // before %O + args[i].tqreplace("%O", outputFilepath()); + args[i].tqreplace("%COFF", filepath(PURL::Coff)); + if (_data.project) args[i].tqreplace("%PROJECT", _data.project->name()); + else args[i].tqreplace("%PROJECT", url().basename()); + args[i].tqreplace("%MAP", filepath(PURL::Map)); + args[i].tqreplace("%SYM", url().toExtension("sym").relativeTo(directory(), withWine ? PURL::WindowsSeparator : PURL::UnixSeparator)); + args[i].tqreplace("%LIST", filepath(PURL::Lst)); + args[i].tqreplace("%DEVICE", deviceName()); + args[i].tqreplace("%FAMILY", familyName()); + args[i].tqreplace("%LKR_PATH", lkr.path()); // before %LKR + args[i].tqreplace("%LKR_NAME", lkr.filename()); // before LKR + args[i].tqreplace("%LKR", lkr.filepath()); if ( checkIs(args[i], "%I") ) { for (uint k=0; kbaseExecutable(withWine, Compile::Config::outputExecutableType(group())); - QString path = tool()->executableDirectory().path(); + TQString exec = tool()->baseExecutable(withWine, Compile::Config::outputExecutableType(group())); + TQString path = tool()->executableDirectory().path(); _process->setup(path + exec, arguments(), withWine); } -Log::LineType Compile::Process::filterType(const QString &type) const +Log::LineType Compile::Process::filterType(const TQString &type) const { - QString s = type.lower(); + TQString s = type.lower(); if ( s.startsWith("warning") ) return Log::LineType::Warning; if ( s.startsWith("error") ) return Log::LineType::Error; if ( s.startsWith("message") ) return Log::LineType::Information; return Log::LineType::Normal; } -bool Compile::Process::parseErrorLine(const QString &s, const ParseErrorData &data) +bool Compile::Process::parseErrorLine(const TQString &s, const ParseErrorData &data) { - QRegExp re(data.pattern); + TQRegExp re(data.pattern); if ( !re.exactMatch(s) ) return false; - QString file; + TQString file; if ( data.indexFile>=0 ) { file = re.cap(data.indexFile).stripWhiteSpace(); if ( file.endsWith(".") ) file = file.mid(0, file.length()-1); - if ( file=="-" ) file = QString::null; + if ( file=="-" ) file = TQString(); } bool ok; int line = -1; if ( data.indexLine>=0 ) line = re.cap(data.indexLine).stripWhiteSpace().toUInt(&ok) - 1; if ( !ok ) line = -1; - QString message; + TQString message; if ( data.indexMessage>=0 ) message= re.cap(data.indexMessage).stripWhiteSpace(); Log::LineType type = data.defaultLineType; if ( data.indexLogType>=0 ) { - QString s = re.cap(data.indexLogType).stripWhiteSpace(); + TQString s = re.cap(data.indexLogType).stripWhiteSpace(); if ( s.isEmpty() ) type = data.defaultLineType; else type = filterType(s); } @@ -337,22 +337,22 @@ bool Compile::Process::parseErrorLine(const QString &s, const ParseErrorData &da return true; } -void Compile::Process::doLog(const QString &type, const QString &message, const QString &surl, uint line) +void Compile::Process::doLog(const TQString &type, const TQString &message, const TQString &surl, uint line) { doLog(filterType(type), message, surl, line); } -void Compile::Process::doLog(Log::LineType type, const QString &message, const QString &surl, uint line) +void Compile::Process::doLog(Log::LineType type, const TQString &message, const TQString &surl, uint line) { if ( surl.isEmpty() ) { _manager->log(type, message); return; } PURL::Url url = PURL::Url::fromPathOrUrl(surl); - QString s; + TQString s; if ( !url.isEmpty() ) { if ( !url.exists() && !url.isInto(directory()) ) url = PURL::Url(directory(), surl); - s += url.filename() + ":" + QString::number(line+1) + ": "; + s += url.filename() + ":" + TQString::number(line+1) + ": "; } switch (type.type()) { case Log::LineType::Warning: s += i18n("warning: "); break; @@ -367,10 +367,10 @@ void Compile::Process::doLog(Log::LineType type, const QString &message, const Q void Compile::CustomProcess::setupProcess() { _process->setUseShell(true); - _process->setup(_command, QStringList(), false); + _process->setup(_command, TQStringList(), false); } -void Compile::CustomProcess::logStderrLine(const QString &line) +void Compile::CustomProcess::logStderrLine(const TQString &line) { _manager->log(Log::LineType::Normal, line); } diff --git a/src/tools/list/compile_process.h b/src/tools/list/compile_process.h index 4fe396e..dd5ce3b 100644 --- a/src/tools/list/compile_process.h +++ b/src/tools/list/compile_process.h @@ -22,8 +22,8 @@ namespace Compile { class Manager; enum FileAction { NoAction = 0, Show = 1, InProject = 2, Generated = 8, Included = 16 }; - Q_DECLARE_FLAGS(FileActions, FileAction) - Q_DECLARE_OPERATORS_FOR_FLAGS(FileActions) + TQ_DECLARE_FLAGS(FileActions, FileAction) + TQ_DECLARE_OPERATORS_FOR_FLAGS(FileActions) class FileData { public: @@ -31,7 +31,7 @@ namespace Compile FileData(const PURL::Url &u, FileActions a) : url(u), actions(a) {} PURL::Url url; FileActions actions; - class List : public QValueList { + class List : public TQValueList { public: List() {} List(const FileData &data) { append(data); } @@ -47,14 +47,14 @@ namespace Compile class ParseErrorData { public: - ParseErrorData(const QString &p, int iFile, int iLine, int iMessage, Log::LineType dLineType) + ParseErrorData(const TQString &p, int iFile, int iLine, int iMessage, Log::LineType dLineType) : pattern(p), indexFile(iFile), indexLine(iLine), indexMessage(iMessage), indexLogType(-1), defaultLineType(dLineType) {} - ParseErrorData(const QString &p, int iFile, int iLine, int iMessage, uint iLogType, + ParseErrorData(const TQString &p, int iFile, int iLine, int iMessage, uint iLogType, Log::LineType dLineType = Log::LineType::Error) : pattern(p), indexFile(iFile), indexLine(iLine), indexMessage(iMessage), indexLogType(iLogType), defaultLineType(dLineType) {} - QString pattern; + TQString pattern; int indexFile, indexLine, indexMessage, indexLogType; Log::LineType defaultLineType; }; @@ -63,10 +63,11 @@ namespace Compile class LogWidget : public Log::Widget { Q_OBJECT + TQ_OBJECT public: - LogWidget(QWidget *parent); - void appendLine(Log::LineType type, const QString &message, const QString &filepath, uint line); - void appendLine(Log::DebugLevel debug, const QString &message, const QString &filepath, uint line); + LogWidget(TQWidget *tqparent); + void appendLine(Log::LineType type, const TQString &message, const TQString &filepath, uint line); + void appendLine(Log::DebugLevel debug, const TQString &message, const TQString &filepath, uint line); virtual void clear(); private slots: @@ -76,17 +77,18 @@ private: class Data { public: Data() {} - Data(const QString &fp, uint l) : filepath(fp), line(l) {} - QString filepath; + Data(const TQString &fp, uint l) : filepath(fp), line(l) {} + TQString filepath; uint line; }; - QMap _map; + TQMap _map; }; //----------------------------------------------------------------------------- -class BaseProcess : public QObject +class BaseProcess : public TQObject { Q_OBJECT + TQ_OBJECT public: BaseProcess(); virtual void init(const Data &data, Manager *manager); @@ -102,15 +104,15 @@ protected: Manager *_manager; Data _data; ::Process::LineSignal *_process; - QString _stdout, _stderr; + TQString _stdout, _stderr; const Tool::Group &group() const { return Main::toolGroup(); } PURL::Directory directory(uint i = 0) const; virtual void setupProcess() = 0; protected slots: - virtual void logStdoutLine(const QString &line) { logStderrLine(line); } - virtual void logStderrLine(const QString &line) = 0; + virtual void logStdoutLine(const TQString &line) { logStderrLine(line); } + virtual void logStderrLine(const TQString &line) = 0; virtual void done(int code); void timeout(); }; @@ -119,48 +121,50 @@ protected slots: class Process : public BaseProcess { Q_OBJECT + TQ_OBJECT public: virtual ~Process(); virtual void init(const Data &data, Manager *manager); virtual bool check() const; virtual FileData::List files(bool *ok) const; - virtual QStringList genericArguments(const Compile::Config &config) const = 0; + virtual TQStringList genericArguments(const Compile::Config &config) const = 0; void checkArguments() const; protected: Config *_config; virtual PURL::Url url(PURL::FileType type = PURL::Nb_FileTypes, uint i = 0) const; - QString filepath(PURL::FileType type, uint i=0) const; - virtual QString outputFilepath() const; - virtual QString outputFiles() const = 0; + TQString filepath(PURL::FileType type, uint i=0) const; + virtual TQString outputFilepath() const; + virtual TQString outputFiles() const = 0; uint nbFiles() const { return _data.items.count(); } - virtual QString inputFilepath(uint i) const { return filepath(PURL::Nb_FileTypes, i); } - virtual QString deviceName() const = 0; - virtual QString familyName() const { return QString::null; } - virtual QString objectExtension() const { return QString::null; } - virtual QString libraryExtension() const { return "lib"; } + virtual TQString inputFilepath(uint i) const { return filepath(PURL::Nb_FileTypes, i); } + virtual TQString deviceName() const = 0; + virtual TQString familyName() const { return TQString(); } + virtual TQString objectExtension() const { return TQString(); } + virtual TQString libraryExtension() const { return "lib"; } virtual bool hasLinkerScript() const { return group().hasCustomLinkerScript(_data.project); } FileData fileData(PURL::FileType type, FileActions actions) const; - bool parseErrorLine(const QString &s, const ParseErrorData &data); - virtual Log::LineType filterType(const QString &type) const; - void doLog(const QString &type, const QString &message, const QString &surl, uint line); - void doLog(Log::LineType type, const QString &message, const QString &surl, uint line); + bool parseErrorLine(const TQString &s, const ParseErrorData &data); + virtual Log::LineType filterType(const TQString &type) const; + void doLog(const TQString &type, const TQString &message, const TQString &surl, uint line); + void doLog(Log::LineType type, const TQString &message, const TQString &surl, uint line); virtual void setupProcess(); - QStringList arguments() const; + TQStringList arguments() const; const Tool::Base *tool() const { return group().base(_data.category); } private: - static bool checkIs(const QString &s, const QString &key); - static QString replaceIf(const QString &s, const QString &key, bool condition); + static bool checkIs(const TQString &s, const TQString &key); + static TQString replaceIf(const TQString &s, const TQString &key, bool condition); }; //----------------------------------------------------------------------------- class CustomProcess : public BaseProcess { Q_OBJECT + TQ_OBJECT public: - CustomProcess(const QString &command) : _command(command) {} + CustomProcess(const TQString &command) : _command(command) {} virtual bool check() const { return true; } virtual FileData::List files(bool *ok) const { if (ok) *ok = true; return FileData::List(); } @@ -168,10 +172,10 @@ protected: virtual void setupProcess(); protected slots: - virtual void logStderrLine(const QString &line); + virtual void logStderrLine(const TQString &line); private: - QString _command; + TQString _command; }; } // namespace diff --git a/src/tools/list/device_info.cpp b/src/tools/list/device_info.cpp index 78ca7a7..be4169a 100644 --- a/src/tools/list/device_info.cpp +++ b/src/tools/list/device_info.cpp @@ -12,35 +12,35 @@ #include "progs/list/prog_list.h" #include "tool_list.h" -QString Device::webpageHtml(const Device::Data &data) +TQString Device::webpageHtml(const Device::Data &data) { const Device::Documents &documents = data.documents(); - QString url = "http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId="; + TQString url = "http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId="; if ( documents.webpage.isEmpty() ) url += "2044&AllWords=" + data.name(); else url += "1335&dDocName=en" + documents.webpage; return "" + i18n("Device Page") + " "; } -QString documentHtml(const QString &document, const QString &label) +TQString documentHtml(const TQString &document, const TQString &label) { - if ( document.isEmpty() ) return QString::null; + if ( document.isEmpty() ) return TQString(); return ", " + label + ""; } -QString Device::documentHtml(const Device::Data &data) +TQString Device::documentHtml(const Device::Data &data) { - QString s = webpageHtml(data); + TQString s = webpageHtml(data); s += documentHtml(data.documents().datasheet, i18n("Datasheet")); s += documentHtml(data.documents().progsheet, i18n("Programming Specifications")); return htmlTableRow(i18n("Documents"), s); } -QString Device::supportedHtmlInfo(const Device::Data &data) +TQString Device::supportedHtmlInfo(const Device::Data &data) { - QString doc; + TQString doc; doc += "
\n"; doc += "\n"; - QString tools; + TQString tools; Tool::Lister::ConstIterator tit; for (tit=Tool::lister().begin(); tit!=Tool::lister().end(); ++tit) { if ( !tit.data()->isSupported(data.name()) ) continue; @@ -49,7 +49,7 @@ QString Device::supportedHtmlInfo(const Device::Data &data) tools += tit.data()->label(); } doc += htmlTableRow(i18n("Tools"), tools) + "\n"; - QString progs; + TQString progs; Programmer::Lister::ConstIterator pit; for (pit=Programmer::lister().begin(); pit!=Programmer::lister().end(); ++pit) { if ( !pit.data()->isSupported(data.name()) ) continue; diff --git a/src/tools/list/device_info.h b/src/tools/list/device_info.h index ad69c59..036aac3 100644 --- a/src/tools/list/device_info.h +++ b/src/tools/list/device_info.h @@ -9,14 +9,14 @@ #ifndef DEVICE_INFO_H #define DEVICE_INFO_H -#include +#include namespace Device { class Data; } namespace Device { - extern QString webpageHtml(const Device::Data &data); - extern QString documentHtml(const Device::Data &data); - extern QString supportedHtmlInfo(const Device::Data &data); + extern TQString webpageHtml(const Device::Data &data); + extern TQString documentHtml(const Device::Data &data); + extern TQString supportedHtmlInfo(const Device::Data &data); } // namespace #endif diff --git a/src/tools/list/tools_config_widget.cpp b/src/tools/list/tools_config_widget.cpp index 449183d..43ca04c 100644 --- a/src/tools/list/tools_config_widget.cpp +++ b/src/tools/list/tools_config_widget.cpp @@ -9,8 +9,8 @@ ***************************************************************************/ #include "tools_config_widget.h" -#include -#include +#include +#include #include "tool_list.h" #include "tools/gui/tool_config_widget.h" @@ -20,15 +20,15 @@ #include "libgui/project.h" //---------------------------------------------------------------------------- -HelpDialog::HelpDialog(QWidget *parent) - : Dialog(parent, "help_dialog", false, i18n("Help Dialog"), Close, Close, false) +HelpDialog::HelpDialog(TQWidget *tqparent) + : Dialog(tqparent, "help_dialog", false, i18n("Help Dialog"), Close, Close, false) { - QGridLayout *top = new QGridLayout(mainWidget(), 1, 1, 10, 10); + TQGridLayout *top = new TQGridLayout(mainWidget(), 1, 1, 10, 10); uint k = 0; for (; Compile::ARGUMENT_DATA[k].key; k++) { - QLabel *label = new QLabel(Compile::ARGUMENT_DATA[k].key, mainWidget()); + TQLabel *label = new TQLabel(Compile::ARGUMENT_DATA[k].key, mainWidget()); top->addWidget(label, k, 0); - label = new QLabel(i18n(Compile::ARGUMENT_DATA[k].description), mainWidget()); + label = new TQLabel(i18n(Compile::ARGUMENT_DATA[k].description), mainWidget()); top->addWidget(label, k, 1); } top->setColStretch(2, 1); @@ -36,33 +36,33 @@ HelpDialog::HelpDialog(QWidget *parent) } //---------------------------------------------------------------------------- -ToolsConfigWidget::ToolsConfigWidget(Project *project, QWidget *parent) - : ::ConfigWidget(parent), _project(project), _helpDialog(0) +ToolsConfigWidget::ToolsConfigWidget(Project *project, TQWidget *tqparent) + : ::ConfigWidget(tqparent), _project(project), _helpDialog(0) { uint row = 0; - QLabel *label = new QLabel(i18n("Toolchain:"), this); + TQLabel *label = new TQLabel(i18n("Toolchain:"), this); addWidget(label, row,row, 0,0); - _tool = new KeyComboBox(this); + _tool = new KeyComboBox(this); Tool::Lister::ConstIterator it; for (it=Tool::lister().begin(); it!=Tool::lister().end(); ++it) _tool->appendItem(it.key(), it.data()->label()); - connect(_tool->widget(), SIGNAL(activated(int)), SLOT(toolChanged())); + connect(_tool->widget(), TQT_SIGNAL(activated(int)), TQT_SLOT(toolChanged())); addWidget(_tool->widget(), row,row, 1,1); - label = new QLabel(i18n("Output type:"), this); + label = new TQLabel(i18n("Output type:"), this); addWidget(label, row,row, 2,2); _output = new KeyComboBox(this); FOR_EACH(Tool::OutputType, type) _output->appendItem(type, type.label()); addWidget(_output->widget(), row,row, 3,3); row++; - _mainStack = new QWidgetStack(this); + _mainStack = new TQWidgetStack(this); addWidget(_mainStack, row,row, 0,4); row++; - _tabWidget = new QTabWidget(_mainStack); + _tabWidget = new TQTabWidget(_mainStack); _mainStack->addWidget(_tabWidget); FOR_EACH(Tool::Category, category) { - _stacks[category] = new KeyWidgetStack(_tabWidget); + _stacks[category] = new KeyWidgetStack(_tabWidget); _stacks[category]->widget()->setMargin(10); Tool::Lister::ConstIterator it; for (it=Tool::lister().begin(); it!=Tool::lister().end(); ++it) { @@ -71,13 +71,13 @@ ToolsConfigWidget::ToolsConfigWidget(Project *project, QWidget *parent) ToolConfigWidget *cw = static_cast(it.data()->gui())->createConfigWidget(category, project); Q_ASSERT(cw); _stacks[category]->appendItem(it.key(), cw); - connect(cw, SIGNAL(displayHelp()), SLOT(displayHelp())); + connect(cw, TQT_SIGNAL(displayHelp()), TQT_SLOT(displayHelp())); } } - _customWidget = new QWidget(_mainStack); + _customWidget = new TQWidget(_mainStack); _mainStack->addWidget(_customWidget); - QVBoxLayout *vbox = new QVBoxLayout(_customWidget); - label = new QLabel(i18n("Custom shell commands:"), _customWidget); + TQVBoxLayout *vbox = new TQVBoxLayout(_customWidget); + label = new TQLabel(i18n("Custom shell commands:"), _customWidget); vbox->addWidget(label); _commandsEditor = new EditListBox(1, _customWidget, "command_editor", EditListBox::DuplicatesAllowed); vbox->addWidget(_commandsEditor); @@ -87,7 +87,7 @@ ToolsConfigWidget::ToolsConfigWidget(Project *project, QWidget *parent) void ToolsConfigWidget::toolChanged() { - QString name = _tool->currentItem(); + TQString name = _tool->currentItem(); bool canMakeLibrary = Tool::lister().group(name)->needs(_project, Tool::Category::Librarian); _output->widget()->setEnabled(canMakeLibrary); if ( !canMakeLibrary ) _output->setCurrentItem(Tool::OutputType::Executable); @@ -97,7 +97,7 @@ void ToolsConfigWidget::toolChanged() FOR_EACH(Tool::Category, k) { _tabWidget->removePage(_stacks[k]->widget()); _stacks[k]->widget()->hide(); - if ( _stacks[k]->contains(name) ) { + if ( _stacks[k]->tqcontains(name) ) { _stacks[k]->setCurrentItem(name); _stacks[k]->widget()->show(); _tabWidget->addTab(_stacks[k]->widget(), i18n(k.data().title)); @@ -112,11 +112,11 @@ void ToolsConfigWidget::loadConfig() const Tool::Group &group = Compile::Config::toolGroup(_project); _tool->setCurrentItem(group.name()); _output->setCurrentItem(_project->outputType()); - QStringList commands = Compile::Config::customCommands(_project); + TQStringList commands = Compile::Config::customCommands(_project); _commandsEditor->setTexts(commands); toolChanged(); FOR_EACH(Tool::Category, k) { - KeyWidgetStack::ConstIterator it; + KeyWidgetStack::ConstIterator it; for (it=_stacks[k]->begin(); it!=_stacks[k]->end(); ++it) { if ( it.key()==Tool::Group::CUSTOM_NAME ) continue; static_cast(_stacks[k]->item(it.key()))->loadConfig(); @@ -126,13 +126,13 @@ void ToolsConfigWidget::loadConfig() void ToolsConfigWidget::saveConfig() { - QString name = _tool->currentItem(); + TQString name = _tool->currentItem(); Compile::Config::setToolGroup(_project, *Tool::lister().group(name)); _project->setOutputType(_output->currentItem()); Compile::Config::setCustomCommands(_project, _commandsEditor->texts()); FOR_EACH(Tool::Category, k) { - if ( !_stacks[k]->contains(name) ) continue; - QWidget *w = _stacks[k]->item(name); + if ( !_stacks[k]->tqcontains(name) ) continue; + TQWidget *w = _stacks[k]->item(name); static_cast(w)->saveConfig(); } } diff --git a/src/tools/list/tools_config_widget.h b/src/tools/list/tools_config_widget.h index 0f41b6a..bd4561a 100644 --- a/src/tools/list/tools_config_widget.h +++ b/src/tools/list/tools_config_widget.h @@ -10,9 +10,9 @@ #ifndef TOOLS_CONFIG_WIDGET_H #define TOOLS_CONFIG_WIDGET_H -#include -#include -#include +#include +#include +#include #include "common/gui/config_widget.h" #include "common/gui/dialog.h" @@ -26,16 +26,18 @@ class ToolConfigWidget; class HelpDialog : public Dialog { Q_OBJECT + TQ_OBJECT public: - HelpDialog(QWidget *parent); + HelpDialog(TQWidget *tqparent); }; //---------------------------------------------------------------------------- class ToolsConfigWidget : public ConfigWidget { Q_OBJECT + TQ_OBJECT public: - ToolsConfigWidget(Project *project, QWidget *parent); + ToolsConfigWidget(Project *project, TQWidget *tqparent); virtual void loadConfig(); public slots: @@ -47,14 +49,14 @@ private slots: private: Project *_project; - KeyComboBox *_tool; + KeyComboBox *_tool; KeyComboBox *_output; - QWidgetStack *_mainStack; - QWidget *_customWidget; + TQWidgetStack *_mainStack; + TQWidget *_customWidget; EditListBox *_commandsEditor; - QTabWidget *_tabWidget; - QMap *> _stacks; - QGuardedPtr _helpDialog; + TQTabWidget *_tabWidget; + TQMap *> _stacks; + TQGuardedPtr _helpDialog; }; #endif diff --git a/src/tools/mpc/gui/mpc_ui.h b/src/tools/mpc/gui/mpc_ui.h index 2fc51f9..38c0e7b 100644 --- a/src/tools/mpc/gui/mpc_ui.h +++ b/src/tools/mpc/gui/mpc_ui.h @@ -18,6 +18,7 @@ namespace MPC class ConfigWidget : public ToolConfigWidget { Q_OBJECT + TQ_OBJECT public: ConfigWidget(Project *project); virtual void initEntries() {} diff --git a/src/tools/mpc/mpc.cpp b/src/tools/mpc/mpc.cpp index 88f9ec2..8abb74e 100644 --- a/src/tools/mpc/mpc.cpp +++ b/src/tools/mpc/mpc.cpp @@ -8,7 +8,7 @@ ***************************************************************************/ #include "mpc.h" -#include +#include #include "mpc_compile.h" #include "mpc_config.h" @@ -17,10 +17,10 @@ #include "devices/base/device_group.h" //---------------------------------------------------------------------------- -QValueList MPC::Group::getSupportedDevices(const QString &) const +TQValueList MPC::Group::getSupportedDevices(const TQString &) const { - QValueList list; - QValueVector devices = Device::lister().group("pic")->supportedDevices(); + TQValueList list; + TQValueVector devices = Device::lister().group("pic")->supportedDevices(); for (uint i=0; i(data)->architecture(); @@ -45,9 +45,9 @@ Compile::Config *MPC::Group::configFactory(::Project *project) const return new Config(project); } -QString MPC::Group::informationText() const +TQString MPC::Group::informationText() const { - return i18n("MPC Compiler is a C compiler distributed by Byte Craft.").arg("http://www.bytecraft.com/mpccaps.html"); + return i18n("MPC Compiler is a C compiler distributed by Byte Craft.").tqarg("http://www.bytecraft.com/mpccaps.html"); } Tool::Group::BaseData MPC::Group::baseFactory(Tool::Category category) const diff --git a/src/tools/mpc/mpc.h b/src/tools/mpc/mpc.h index a378307..754221a 100644 --- a/src/tools/mpc/mpc.h +++ b/src/tools/mpc/mpc.h @@ -18,26 +18,26 @@ namespace MPC class Base : public Tool::Base { public: - virtual QString baseExecutable(bool, Tool::OutputExecutableType) const { return "mpcw"; } + virtual TQString baseExecutable(bool, Tool::OutputExecutableType) const { return "mpcw"; } virtual bool checkExecutable() const { return false; } - virtual QStringList checkExecutableOptions(bool) const { return QStringList(); } - virtual bool checkExecutableResult(bool, QStringList &) const { return true; } + virtual TQStringList checkExecutableOptions(bool) const { return TQStringList(); } + virtual bool checkExecutableResult(bool, TQStringList &) const { return true; } }; //---------------------------------------------------------------------------- class Group : public Tool::Group { public: - virtual QString name() const { return "mpcw"; } - virtual QString label() const { return i18n("MPC Compiler"); } - virtual QString informationText() const; + virtual TQString name() const { return "mpcw"; } + virtual TQString label() const { return i18n("MPC Compiler"); } + virtual TQString informationText() const; virtual Tool::Category checkDevicesCategory() const { return Tool::Category::Nb_Types; } virtual Tool::ExecutableType preferedExecutableType() const { return Tool::ExecutableType::Windows; } virtual Tool::CompileType compileType() const { return Tool::SingleFile; } virtual PURL::FileType implementationType(PURL::ToolType type) const { return (type==PURL::ToolType::Compiler ? PURL::CSource : PURL::Nb_FileTypes); } private: - virtual QValueList getSupportedDevices(const QString &s) const; + virtual TQValueList getSupportedDevices(const TQString &s) const; virtual Compile::Process *processFactory(const Compile::Data &data) const; virtual Compile::Config *configFactory(::Project *project) const; virtual BaseData baseFactory(Tool::Category) const; diff --git a/src/tools/mpc/mpc_compile.cpp b/src/tools/mpc/mpc_compile.cpp index 69ee994..8c39e3c 100644 --- a/src/tools/mpc/mpc_compile.cpp +++ b/src/tools/mpc/mpc_compile.cpp @@ -13,22 +13,22 @@ #include "devices/list/device_list.h" #include "devices/pic/base/pic.h" -QStringList MPC::CompileFile::genericArguments(const Compile::Config &) const +TQStringList MPC::CompileFile::genericArguments(const Compile::Config &) const { - QStringList args; + TQStringList args; args += "%I"; return args; } -void MPC::CompileFile::logStderrLine(const QString &) +void MPC::CompileFile::logStderrLine(const TQString &) { // ignore output } -void MPC::CompileFile::parseLine(const QString &line) +void MPC::CompileFile::parseLine(const TQString &line) { if ( parseErrorLine(line, Compile::ParseErrorData("(\\w+)\\s+(.*)\\s+(\\d+):\\d+:(.*)", 2, 3, 4, 1)) ) return; - doLog(Log::LineType::Normal, line, QString::null, 0); // unrecognized + doLog(Log::LineType::Normal, line, TQString(), 0); // unrecognized } void MPC::CompileFile::done(int code) @@ -37,15 +37,15 @@ void MPC::CompileFile::done(int code) PURL::Url url = PURL::Url(directory(), inputFilepath(0)).toExtension("err"); Log::StringView sview; PURL::File file(url, sview); - if ( !file.openForRead() ) doLog(Log::LineType::Error, i18n("Could not find error file (%1).").arg(url.pretty()), QString::null, 0); + if ( !file.openForRead() ) doLog(Log::LineType::Error, i18n("Could not find error file (%1).").tqarg(url.pretty()), TQString(), 0); else { - QStringList lines = file.readLines(); + TQStringList lines = file.readLines(); for (uint i=0; i +#include #include "common/gui/purl_gui.h" #include "tools/pic30/pic30_config.h" diff --git a/src/tools/pic30/gui/pic30_ui.h b/src/tools/pic30/gui/pic30_ui.h index d9890e7..85f798c 100644 --- a/src/tools/pic30/gui/pic30_ui.h +++ b/src/tools/pic30/gui/pic30_ui.h @@ -19,6 +19,7 @@ namespace PIC30 class ConfigWidget : public ToolConfigWidget { Q_OBJECT + TQ_OBJECT public: ConfigWidget(Project *project); virtual void initEntries(); diff --git a/src/tools/pic30/pic30.cpp b/src/tools/pic30/pic30.cpp index 45b9270..e846719 100644 --- a/src/tools/pic30/pic30.cpp +++ b/src/tools/pic30/pic30.cpp @@ -17,9 +17,9 @@ #include "pic30_generator.h" //---------------------------------------------------------------------------- -QString PIC30::Base::baseExecutable(bool, Tool::OutputExecutableType type) const +TQString PIC30::Base::baseExecutable(bool, Tool::OutputExecutableType type) const { - QString s = "pic30-"; + TQString s = "pic30-"; if ( type==Tool::OutputExecutableType::Coff ) s += "coff"; else s += "elf"; s += "-"; @@ -32,16 +32,16 @@ QString PIC30::Base::baseExecutable(bool, Tool::OutputExecutableType type) const case Tool::Category::Nb_Types: break; } Q_ASSERT(false); - return QString::null; + return TQString(); } -QStringList PIC30::Base::checkExecutableOptions(bool) const +TQStringList PIC30::Base::checkExecutableOptions(bool) const { if ( _category!=Tool::Category::BinToHex ) return "--version"; - return QStringList(); + return TQStringList(); } -bool PIC30::Base::checkExecutableResult(bool, QStringList &lines) const +bool PIC30::Base::checkExecutableResult(bool, TQStringList &lines) const { if ( lines.count()==0 ) return false; lines[0] = lines[0].stripWhiteSpace(); @@ -49,7 +49,7 @@ bool PIC30::Base::checkExecutableResult(bool, QStringList &lines) const case Tool::Category::Compiler: return lines[0].startsWith("pic30"); case Tool::Category::Assembler: return lines[0].startsWith("GNU assembler"); case Tool::Category::Linker: return lines[0].startsWith("GNU ld"); - case Tool::Category::BinToHex: return lines.join(" ").contains("Microchip "); + case Tool::Category::BinToHex: return lines.join(" ").tqcontains("Microchip "); case Tool::Category::Librarian: return lines[0].startsWith("GNU ar"); case Tool::Category::Nb_Types: break; } @@ -58,9 +58,9 @@ bool PIC30::Base::checkExecutableResult(bool, QStringList &lines) const } //---------------------------------------------------------------------------- -QString PIC30::Group::informationText() const +TQString PIC30::Group::informationText() const { - return i18n("The PIC30 ToolChain is a toolsuite for 16-bit PICs available from Microchip. Most of it is available under the GNU Public License.").arg("http://microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en010065&part=SW006012"); + return i18n("The PIC30 ToolChain is a toolsuite for 16-bit PICs available from Microchip. Most of it is available under the GNU Public License.").tqarg("http://microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en010065&part=SW006012"); } Tool::Group::BaseData PIC30::Group::baseFactory(Tool::Category category) const @@ -71,10 +71,10 @@ Tool::Group::BaseData PIC30::Group::baseFactory(Tool::Category category) const return BaseData(); } -QValueList PIC30::Group::getSupportedDevices(const QString &) const +TQValueList PIC30::Group::getSupportedDevices(const TQString &) const { - QValueList list; - QValueVector devices = Device::lister().group("pic")->supportedDevices(); + TQValueList list; + TQValueVector devices = Device::lister().group("pic")->supportedDevices(); for (uint i=0; i(data)->is16bitFamily() ) list.append(data); diff --git a/src/tools/pic30/pic30.h b/src/tools/pic30/pic30.h index a490ed0..93e54c7 100644 --- a/src/tools/pic30/pic30.h +++ b/src/tools/pic30/pic30.h @@ -18,20 +18,20 @@ namespace PIC30 class Base : public Tool::Base { public: - virtual QString baseExecutable(bool withWine, Tool::OutputExecutableType type) const; + virtual TQString baseExecutable(bool withWine, Tool::OutputExecutableType type) const; private: - virtual QStringList checkExecutableOptions(bool withWine) const; - virtual bool checkExecutableResult(bool withWine, QStringList &lines) const; + virtual TQStringList checkExecutableOptions(bool withWine) const; + virtual bool checkExecutableResult(bool withWine, TQStringList &lines) const; }; //---------------------------------------------------------------------------- class Group : public Tool::Group { public: - virtual QString name() const { return "pic30"; } - virtual QString label() const { return i18n("PIC30 Toolchain"); } - virtual QString informationText() const; + virtual TQString name() const { return "pic30"; } + virtual TQString label() const { return i18n("PIC30 Toolchain"); } + virtual TQString informationText() const; virtual bool hasDirectory(Compile::DirectoryType type) const { return type==Compile::DirectoryType::Header || type==Compile::DirectoryType::LinkerScript || type==Compile::DirectoryType::Library; } virtual PURL::Directory autodetectDirectory(Compile::DirectoryType type, const PURL::Directory &execDir, bool withWine) const; virtual bool hasOutputExecutableType(Tool::OutputExecutableType type) const { return ( type==Tool::OutputExecutableType::Coff || type==Tool::OutputExecutableType::Elf ); } @@ -43,7 +43,7 @@ public: private: virtual BaseData baseFactory(Tool::Category category) const; - virtual QValueList getSupportedDevices(const QString &s) const; + virtual TQValueList getSupportedDevices(const TQString &s) const; virtual Compile::Process *processFactory(const Compile::Data &data) const; virtual Compile::Config *configFactory(::Project *project) const; virtual Tool::SourceGenerator *sourceGeneratorFactory() const; diff --git a/src/tools/pic30/pic30_compile.cpp b/src/tools/pic30/pic30_compile.cpp index 02cbb35..3674e4b 100644 --- a/src/tools/pic30/pic30_compile.cpp +++ b/src/tools/pic30/pic30_compile.cpp @@ -13,9 +13,9 @@ #include "devices/list/device_list.h" //----------------------------------------------------------------------------- -QStringList PIC30::CompileFile::genericArguments(const Compile::Config &config) const +TQStringList PIC30::CompileFile::genericArguments(const Compile::Config &config) const { - QStringList args; + TQStringList args; args += "-S"; // compile only args += "$NO_AUTO_DEVICE(-mcpu=%DEVICE)"; args += config.includeDirs(Tool::Category::Compiler, "-I"); @@ -25,43 +25,43 @@ QStringList PIC30::CompileFile::genericArguments(const Compile::Config &config) return args; } -QString PIC30::CompileFile::outputFiles() const +TQString PIC30::CompileFile::outputFiles() const { return "PURL::AsmPIC30"; } -void PIC30::CompileFile::logStderrLine(const QString &line) +void PIC30::CompileFile::logStderrLine(const TQString &line) { // #### TODO - doLog(Log::LineType::Normal, line, QString::null, 0); // unrecognized + doLog(Log::LineType::Normal, line, TQString(), 0); // unrecognized } //----------------------------------------------------------------------------- -QStringList PIC30::CompileStandaloneFile::genericArguments(const Compile::Config &config) const +TQStringList PIC30::CompileStandaloneFile::genericArguments(const Compile::Config &config) const { - QStringList args = CompileFile::genericArguments(config); + TQStringList args = CompileFile::genericArguments(config); args += "%I"; return args; } -QString PIC30::CompileStandaloneFile::outputFiles() const +TQString PIC30::CompileStandaloneFile::outputFiles() const { return CompileFile::outputFiles() + " PURL::Object PURL::Elf"; } //----------------------------------------------------------------------------- -QStringList PIC30::CompileProjectFile::genericArguments(const Compile::Config &config) const +TQStringList PIC30::CompileProjectFile::genericArguments(const Compile::Config &config) const { - QStringList args = CompileFile::genericArguments(config); + TQStringList args = CompileFile::genericArguments(config); args += "-g"; args += "%I"; return args; } //----------------------------------------------------------------------------- -QStringList PIC30::AssembleFile::genericArguments(const Compile::Config &config) const +TQStringList PIC30::AssembleFile::genericArguments(const Compile::Config &config) const { - QStringList args; + TQStringList args; args += "-g"; args += "-a=%LIST"; // listing args += "-o%O"; @@ -70,45 +70,45 @@ QStringList PIC30::AssembleFile::genericArguments(const Compile::Config &config) return args; } -QString PIC30::AssembleFile::outputFiles() const +TQString PIC30::AssembleFile::outputFiles() const { return "PURL::Object PURL::Lst"; } -void PIC30::AssembleFile::logStderrLine(const QString &line) +void PIC30::AssembleFile::logStderrLine(const TQString &line) { // #### TODO - doLog(Log::LineType::Normal, line, QString::null, 0); // unrecognized + doLog(Log::LineType::Normal, line, TQString(), 0); // unrecognized } //----------------------------------------------------------------------------- -QStringList PIC30::AssembleStandaloneFile::genericArguments(const Compile::Config &config) const +TQStringList PIC30::AssembleStandaloneFile::genericArguments(const Compile::Config &config) const { - QStringList args = AssembleFile::genericArguments(config); + TQStringList args = AssembleFile::genericArguments(config); args += "$NO_AUTO_DEVICE(-p%DEVICE)"; args += "%I"; return args; } //----------------------------------------------------------------------------- -QStringList PIC30::AssembleProjectFile::genericArguments(const Compile::Config &config) const +TQStringList PIC30::AssembleProjectFile::genericArguments(const Compile::Config &config) const { - QStringList args = AssembleFile::genericArguments(config); + TQStringList args = AssembleFile::genericArguments(config); if ( !_data.items[0].generated ) args += "-p%DEVICE"; args += "%I"; return args; } //----------------------------------------------------------------------------- -QString PIC30::Link::outputFilepath() const +TQString PIC30::Link::outputFilepath() const { PURL::FileType type = Compile::Config::outputExecutableType(group()).data().type; return filepath(type); } -QStringList PIC30::Link::genericArguments(const Compile::Config &config) const +TQStringList PIC30::Link::genericArguments(const Compile::Config &config) const { - QStringList args; + TQStringList args; args += "-Map"; args += "%MAP"; args += "-o%O"; @@ -121,39 +121,39 @@ QStringList PIC30::Link::genericArguments(const Compile::Config &config) const return args; } -QString PIC30::Link::outputFiles() const +TQString PIC30::Link::outputFiles() const { PURL::FileType type = Compile::Config::outputExecutableType(group()).data().type; - return QString("PURL::Map PURL::") + type.key(); + return TQString("PURL::Map PURL::") + type.key(); } -void PIC30::Link::logStderrLine(const QString &line) +void PIC30::Link::logStderrLine(const TQString &line) { // #### TODO - doLog(Log::LineType::Normal, line, QString::null, 0); // unrecognized + doLog(Log::LineType::Normal, line, TQString(), 0); // unrecognized } //----------------------------------------------------------------------------- -QStringList PIC30::LinkStandalone::genericArguments(const Compile::Config &config) const +TQStringList PIC30::LinkStandalone::genericArguments(const Compile::Config &config) const { - QStringList args = Link::genericArguments(config); + TQStringList args = Link::genericArguments(config); args += config.customLibraries(Tool::Category::Linker); return args; } //----------------------------------------------------------------------------- -QStringList PIC30::LinkProject::genericArguments(const Compile::Config &config) const +TQStringList PIC30::LinkProject::genericArguments(const Compile::Config &config) const { - QStringList args = Link::genericArguments(config); + TQStringList args = Link::genericArguments(config); args += "%LIBS"; args += config.customLibraries(Tool::Category::Linker); return args; } //----------------------------------------------------------------------------- -QStringList PIC30::LibraryProject::genericArguments(const Compile::Config &) const +TQStringList PIC30::LibraryProject::genericArguments(const Compile::Config &) const { - QStringList args; + TQStringList args; args += "-rc"; // insert new + do not warn if creating library args += "%O"; args += "%LIBS"; @@ -161,36 +161,36 @@ QStringList PIC30::LibraryProject::genericArguments(const Compile::Config &) con return args; } -void PIC30::LibraryProject::logStderrLine(const QString &line) +void PIC30::LibraryProject::logStderrLine(const TQString &line) { // #### TODO - doLog(Log::LineType::Normal, line, QString::null, 0); // unrecognized + doLog(Log::LineType::Normal, line, TQString(), 0); // unrecognized } -QString PIC30::LibraryProject::outputFiles() const +TQString PIC30::LibraryProject::outputFiles() const { return "PURL::Library"; } //----------------------------------------------------------------------------- -QString PIC30::BinToHex::inputFilepath(uint) const +TQString PIC30::BinToHex::inputFilepath(uint) const { PURL::FileType type = Compile::Config::outputExecutableType(group()).data().type; return filepath(type); } -QStringList PIC30::BinToHex::genericArguments(const Compile::Config &) const +TQStringList PIC30::BinToHex::genericArguments(const Compile::Config &) const { return "%I"; } -QString PIC30::BinToHex::outputFiles() const +TQString PIC30::BinToHex::outputFiles() const { return "PURL::Hex"; } -void PIC30::BinToHex::logStderrLine(const QString &line) +void PIC30::BinToHex::logStderrLine(const TQString &line) { // #### TODO - doLog(Log::LineType::Normal, line, QString::null, 0); // unrecognized + doLog(Log::LineType::Normal, line, TQString(), 0); // unrecognized } diff --git a/src/tools/pic30/pic30_compile.h b/src/tools/pic30/pic30_compile.h index c298eac..39bc243 100644 --- a/src/tools/pic30/pic30_compile.h +++ b/src/tools/pic30/pic30_compile.h @@ -17,110 +17,122 @@ namespace PIC30 class Process : public Compile::Process { Q_OBJECT + TQ_OBJECT protected: - virtual QString deviceName() const { return _data.device; } + virtual TQString deviceName() const { return _data.device; } }; //----------------------------------------------------------------------------- class CompileFile : public Process { Q_OBJECT + TQ_OBJECT protected: - virtual QStringList genericArguments(const Compile::Config &config) const; - virtual QString outputFiles() const; - virtual void logStderrLine(const QString &line); + virtual TQStringList genericArguments(const Compile::Config &config) const; + virtual TQString outputFiles() const; + virtual void logStderrLine(const TQString &line); }; //----------------------------------------------------------------------------- class CompileStandaloneFile : public CompileFile { Q_OBJECT + TQ_OBJECT protected: - virtual QStringList genericArguments(const Compile::Config &config) const; - virtual QString outputFiles() const; + virtual TQStringList genericArguments(const Compile::Config &config) const; + virtual TQString outputFiles() const; }; //----------------------------------------------------------------------------- class CompileProjectFile : public CompileFile { Q_OBJECT + TQ_OBJECT protected: - virtual QStringList genericArguments(const Compile::Config &config) const; + virtual TQStringList genericArguments(const Compile::Config &config) const; }; //----------------------------------------------------------------------------- class AssembleFile : public Process { Q_OBJECT + TQ_OBJECT protected: - virtual QString outputFilepath() const { return filepath(PURL::Object); } - virtual QStringList genericArguments(const Compile::Config &config) const; - virtual QString outputFiles() const; - virtual void logStderrLine(const QString &line); + virtual TQString outputFilepath() const { return filepath(PURL::Object); } + virtual TQStringList genericArguments(const Compile::Config &config) const; + virtual TQString outputFiles() const; + virtual void logStderrLine(const TQString &line); }; //----------------------------------------------------------------------------- class AssembleStandaloneFile : public AssembleFile { Q_OBJECT + TQ_OBJECT protected: - virtual QStringList genericArguments(const Compile::Config &config) const; + virtual TQStringList genericArguments(const Compile::Config &config) const; }; //----------------------------------------------------------------------------- class AssembleProjectFile : public AssembleFile { Q_OBJECT + TQ_OBJECT protected: - virtual QStringList genericArguments(const Compile::Config &config) const; + virtual TQStringList genericArguments(const Compile::Config &config) const; }; //----------------------------------------------------------------------------- class Link : public Process { Q_OBJECT + TQ_OBJECT protected: - virtual QString outputFilepath() const; - virtual QStringList genericArguments(const Compile::Config &config) const; - virtual QString outputFiles() const; - virtual void logStderrLine(const QString &line); + virtual TQString outputFilepath() const; + virtual TQStringList genericArguments(const Compile::Config &config) const; + virtual TQString outputFiles() const; + virtual void logStderrLine(const TQString &line); }; //----------------------------------------------------------------------------- class LinkStandalone : public Link { Q_OBJECT + TQ_OBJECT protected: - virtual QStringList genericArguments(const Compile::Config &config) const; + virtual TQStringList genericArguments(const Compile::Config &config) const; }; //----------------------------------------------------------------------------- class LinkProject : public Link { Q_OBJECT + TQ_OBJECT protected: - virtual QStringList genericArguments(const Compile::Config &config) const; + virtual TQStringList genericArguments(const Compile::Config &config) const; }; //----------------------------------------------------------------------------- class LibraryProject : public Process { Q_OBJECT + TQ_OBJECT protected: - virtual QStringList genericArguments(const Compile::Config &config) const; - virtual QString outputFiles() const; - virtual void logStderrLine(const QString &line); + virtual TQStringList genericArguments(const Compile::Config &config) const; + virtual TQString outputFiles() const; + virtual void logStderrLine(const TQString &line); }; //----------------------------------------------------------------------------- class BinToHex : public Process { Q_OBJECT + TQ_OBJECT protected: - virtual QString inputFilepath(uint i) const; - virtual QStringList genericArguments(const Compile::Config &config) const; - virtual QString outputFiles() const; - virtual void logStderrLine(const QString &line); + virtual TQString inputFilepath(uint i) const; + virtual TQStringList genericArguments(const Compile::Config &config) const; + virtual TQString outputFiles() const; + virtual void logStderrLine(const TQString &line); }; } // namespace diff --git a/src/tools/pic30/pic30_generator.cpp b/src/tools/pic30/pic30_generator.cpp index fe874e3..119c466 100644 --- a/src/tools/pic30/pic30_generator.cpp +++ b/src/tools/pic30/pic30_generator.cpp @@ -18,9 +18,9 @@ SourceLine::List PIC30::SourceGenerator::configLines(PURL::ToolType type, const SourceLine::List lines; for (uint i=0; i>"); + lines.appendIndentedCode(TQString(), "<<" + i18n("insert code") + ">>"); lines.appendEmpty(); lines.appendNotIndentedCode("done:"); lines.appendIndentedCode("BRA done", i18n("loop forever")); @@ -95,7 +95,7 @@ SourceLine::List PIC30::SourceGenerator::sourceFileContent(PURL::ToolType type, lines.appendTitle(i18n("Timer1 interrupt service routine")); lines.appendNotIndentedCode("__T1Interrupt:"); lines.appendIndentedCode("PUSH.D W4", i18n("example of context saving (push W4 and W5)")); - lines.appendIndentedCode(QString::null, "<<" + i18n("insert interrupt code") + ">>"); + lines.appendIndentedCode(TQString(), "<<" + i18n("insert interrupt code") + ">>"); lines.appendIndentedCode("BCLR IFS0, #T1IF", i18n("clear Timer1 interrupt flag status bit")); lines.appendIndentedCode("POP.D W4", i18n("restore context from stack")); lines.appendIndentedCode("RETFIE"); diff --git a/src/tools/picc/gui/picc_ui.h b/src/tools/picc/gui/picc_ui.h index ec096c2..261e4dc 100644 --- a/src/tools/picc/gui/picc_ui.h +++ b/src/tools/picc/gui/picc_ui.h @@ -18,6 +18,7 @@ namespace PICC class ConfigWidget : public ToolConfigWidget { Q_OBJECT + TQ_OBJECT public: ConfigWidget(Project *project); virtual void initEntries(); diff --git a/src/tools/picc/picc.cpp b/src/tools/picc/picc.cpp index f0d6e83..060aa4c 100644 --- a/src/tools/picc/picc.cpp +++ b/src/tools/picc/picc.cpp @@ -8,7 +8,7 @@ ***************************************************************************/ #include "picc.h" -#include +#include #include "picc_compile.h" #include "picc_config.h" @@ -17,36 +17,36 @@ #include "common/global/process.h" //---------------------------------------------------------------------------- -bool PICC::Base::checkExecutableResult(bool, QStringList &lines) const +bool PICC::Base::checkExecutableResult(bool, TQStringList &lines) const { - return lines.join(" ").contains("HI-TECH"); + return lines.join(" ").tqcontains("HI-TECH"); } -QString PICC::BaseLite::baseExecutable(bool, Tool::OutputExecutableType) const +TQString PICC::BaseLite::baseExecutable(bool, Tool::OutputExecutableType) const { if ( _category.type()==Tool::Category::Librarian ) return "libr"; return "picl"; } -QString PICC::BaseNormal::baseExecutable(bool, Tool::OutputExecutableType) const +TQString PICC::BaseNormal::baseExecutable(bool, Tool::OutputExecutableType) const { if ( _category.type()==Tool::Category::Librarian ) return "libr"; return "picc"; } -QString PICC::Base18::baseExecutable(bool, Tool::OutputExecutableType) const +TQString PICC::Base18::baseExecutable(bool, Tool::OutputExecutableType) const { if ( _category.type()==Tool::Category::Librarian ) return "libr"; return "picc18"; } //---------------------------------------------------------------------------- -QValueList PICC::Group::getSupportedDevices(const QString &s) const +TQValueList PICC::Group::getSupportedDevices(const TQString &s) const { - QValueList list; - QStringList lines = QStringList::split('\n', s); + TQValueList list; + TQStringList lines = TQStringList::split('\n', s); for (uint i=0; iPICC-Lite is a freeware C compiler distributed by HTSoft.").arg("http://www.htsoft.com"); + return i18n("PICC-Lite is a freeware C compiler distributed by HTSoft.").tqarg("http://www.htsoft.com"); } Tool::Group::BaseData PICC::PICCLiteGroup::baseFactory(Tool::Category category) const @@ -101,9 +101,9 @@ Tool::Group::BaseData PICC::PICCLiteGroup::baseFactory(Tool::Category category) } //---------------------------------------------------------------------------- -QString PICC::PICCGroup::informationText() const +TQString PICC::PICCGroup::informationText() const { - return i18n("PICC is a C compiler distributed by HTSoft.").arg("http://www.htsoft.com"); + return i18n("PICC is a C compiler distributed by HTSoft.").tqarg("http://www.htsoft.com"); } Tool::Group::BaseData PICC::PICCGroup::baseFactory(Tool::Category category) const @@ -114,9 +114,9 @@ Tool::Group::BaseData PICC::PICCGroup::baseFactory(Tool::Category category) cons } //---------------------------------------------------------------------------- -QString PICC::PICC18Group::informationText() const +TQString PICC::PICC18Group::informationText() const { - return i18n("PICC 18 is a C compiler distributed by HTSoft.").arg("http://www.htsoft.com"); + return i18n("PICC 18 is a C compiler distributed by HTSoft.").tqarg("http://www.htsoft.com"); } Tool::Group::BaseData PICC::PICC18Group::baseFactory(Tool::Category category) const diff --git a/src/tools/picc/picc.h b/src/tools/picc/picc.h index af44d02..ec017b9 100644 --- a/src/tools/picc/picc.h +++ b/src/tools/picc/picc.h @@ -17,26 +17,26 @@ namespace PICC class Base : public Tool::Base { private: - virtual QStringList checkExecutableOptions(bool) const { return "--ver"; } - virtual bool checkExecutableResult(bool withWine, QStringList &lines) const; + virtual TQStringList checkExecutableOptions(bool) const { return "--ver"; } + virtual bool checkExecutableResult(bool withWine, TQStringList &lines) const; }; class BaseLite : public Base { public: - virtual QString baseExecutable(bool, Tool::OutputExecutableType) const; + virtual TQString baseExecutable(bool, Tool::OutputExecutableType) const; }; class BaseNormal : public Base { public: - virtual QString baseExecutable(bool, Tool::OutputExecutableType) const; + virtual TQString baseExecutable(bool, Tool::OutputExecutableType) const; }; class Base18 : public Base { public: - virtual QString baseExecutable(bool, Tool::OutputExecutableType) const; + virtual TQString baseExecutable(bool, Tool::OutputExecutableType) const; }; //---------------------------------------------------------------------------- @@ -44,13 +44,13 @@ class Group : public Tool::Group { public: virtual Tool::Category checkDevicesCategory() const { return Tool::Category::Compiler; } - virtual QStringList checkDevicesOptions(uint) const { return "--CHIPINFO"; } + virtual TQStringList checkDevicesOptions(uint) const { return "--CHIPINFO"; } virtual Tool::ExecutableType preferedExecutableType() const { return Tool::ExecutableType::Unix; } virtual Tool::CompileType compileType() const { return Tool::SeparateFiles; } virtual PURL::FileType implementationType(PURL::ToolType type) const; private: - virtual QValueList getSupportedDevices(const QString &s) const; + virtual TQValueList getSupportedDevices(const TQString &s) const; virtual Compile::Process *processFactory(const Compile::Data &data) const; virtual Compile::Config *configFactory(::Project *project) const; virtual Tool::SourceGenerator *sourceGeneratorFactory() const { /*TODO*/ return 0; } @@ -60,9 +60,9 @@ private: class PICCLiteGroup : public Group { public: - virtual QString name() const { return "picclite"; } - virtual QString label() const { return i18n("PICC Lite Compiler"); } - virtual QString informationText() const; + virtual TQString name() const { return "picclite"; } + virtual TQString label() const { return i18n("PICC Lite Compiler"); } + virtual TQString informationText() const; private: virtual BaseData baseFactory(Tool::Category) const; @@ -72,9 +72,9 @@ private: class PICCGroup : public Group { public: - virtual QString name() const { return "picc"; } - virtual QString label() const { return i18n("PICC Compiler"); } - virtual QString informationText() const; + virtual TQString name() const { return "picc"; } + virtual TQString label() const { return i18n("PICC Compiler"); } + virtual TQString informationText() const; private: virtual BaseData baseFactory(Tool::Category) const; @@ -84,9 +84,9 @@ private: class PICC18Group : public Group { public: - virtual QString name() const { return "picc18"; } - virtual QString label() const { return i18n("PICC-18 Compiler"); } - virtual QString informationText() const; + virtual TQString name() const { return "picc18"; } + virtual TQString label() const { return i18n("PICC-18 Compiler"); } + virtual TQString informationText() const; private: virtual BaseData baseFactory(Tool::Category) const; diff --git a/src/tools/picc/picc_compile.cpp b/src/tools/picc/picc_compile.cpp index 63fd127..ca390fc 100644 --- a/src/tools/picc/picc_compile.cpp +++ b/src/tools/picc/picc_compile.cpp @@ -11,9 +11,9 @@ #include "picc_config.h" //----------------------------------------------------------------------------- -QStringList PICC::Process::genericArguments(const Compile::Config &) const +TQStringList PICC::Process::genericArguments(const Compile::Config &) const { - QStringList args; + TQStringList args; args += "--ERRFORMAT"; args += "--WARNFORMAT"; args += "--MSGFORMAT"; @@ -23,16 +23,16 @@ QStringList PICC::Process::genericArguments(const Compile::Config &) const return args; } -void PICC::Process::logStderrLine(const QString &line) +void PICC::Process::logStderrLine(const TQString &line) { // #### TODO - doLog(Log::LineType::Normal, line, QString::null, 0); + doLog(Log::LineType::Normal, line, TQString(), 0); } //----------------------------------------------------------------------------- -QStringList PICC::CompileStandaloneFile::genericArguments(const Compile::Config &config) const +TQStringList PICC::CompileStandaloneFile::genericArguments(const Compile::Config &config) const { - QStringList args = Process::genericArguments(config); + TQStringList args = Process::genericArguments(config); args += "-M%MAP"; args += "-G%SYM"; args += "--ASMLIST"; @@ -42,15 +42,15 @@ QStringList PICC::CompileStandaloneFile::genericArguments(const Compile::Config return args; } -QString PICC::CompileStandaloneFile::outputFiles() const +TQString PICC::CompileStandaloneFile::outputFiles() const { return "PURL::Lst PURL::Map obj PURL::Hex PURL::Coff sym sdb hxl rlf"; } //----------------------------------------------------------------------------- -QStringList PICC::CompileProjectFile::genericArguments(const Compile::Config &config) const +TQStringList PICC::CompileProjectFile::genericArguments(const Compile::Config &config) const { - QStringList args = Process::genericArguments(config); + TQStringList args = Process::genericArguments(config); args += "-S"; args += config.includeDirs(Tool::Category::Compiler, "-I"); args += config.customOptions(Tool::Category::Compiler); @@ -58,15 +58,15 @@ QStringList PICC::CompileProjectFile::genericArguments(const Compile::Config &co return args; } -QString PICC::CompileProjectFile::outputFiles() const +TQString PICC::CompileProjectFile::outputFiles() const { return "PURL::AsmPICC"; } //----------------------------------------------------------------------------- -QStringList PICC::AssembleStandaloneFile::genericArguments(const Compile::Config &config) const +TQStringList PICC::AssembleStandaloneFile::genericArguments(const Compile::Config &config) const { - QStringList args = Process::genericArguments(config); + TQStringList args = Process::genericArguments(config); args += "-M%MAP"; args += "-G%SYM"; args += "--ASMLIST"; @@ -76,15 +76,15 @@ QStringList PICC::AssembleStandaloneFile::genericArguments(const Compile::Config return args; } -QString PICC::AssembleStandaloneFile::outputFiles() const +TQString PICC::AssembleStandaloneFile::outputFiles() const { return "PURL::Lst PURL::Map obj PURL::Hex sym sdb hxl rlf"; } //----------------------------------------------------------------------------- -QStringList PICC::AssembleProjectFile::genericArguments(const Compile::Config &config) const +TQStringList PICC::AssembleProjectFile::genericArguments(const Compile::Config &config) const { - QStringList args = Process::genericArguments(config); + TQStringList args = Process::genericArguments(config); args += "-C"; args += "--ASMLIST"; args += config.includeDirs(Tool::Category::Assembler, "-I"); @@ -93,15 +93,15 @@ QStringList PICC::AssembleProjectFile::genericArguments(const Compile::Config &c return args; } -QString PICC::AssembleProjectFile::outputFiles() const +TQString PICC::AssembleProjectFile::outputFiles() const { return "obj PURL::Lst rlf"; } //----------------------------------------------------------------------------- -QStringList PICC::LinkProject::genericArguments(const Compile::Config &config) const +TQStringList PICC::LinkProject::genericArguments(const Compile::Config &config) const { - QStringList args = Process::genericArguments(config); + TQStringList args = Process::genericArguments(config); args += "-O%O"; args += "-M%MAP"; args += "-G%SYM"; @@ -113,15 +113,15 @@ QStringList PICC::LinkProject::genericArguments(const Compile::Config &config) c return args; } -QString PICC::LinkProject::outputFiles() const +TQString PICC::LinkProject::outputFiles() const { return "PURL::Map PURL::Hex PURL::Coff sym sdb hxl"; } //----------------------------------------------------------------------------- -QStringList PICC::LibraryProject::genericArguments(const Compile::Config &config) const +TQStringList PICC::LibraryProject::genericArguments(const Compile::Config &config) const { - QStringList args; + TQStringList args; args += config.customOptions(Tool::Category::Librarian); args += "r"; args += "%O"; @@ -130,7 +130,7 @@ QStringList PICC::LibraryProject::genericArguments(const Compile::Config &config return args; } -QString PICC::LibraryProject::outputFiles() const +TQString PICC::LibraryProject::outputFiles() const { return "PURL::Library"; } diff --git a/src/tools/picc/picc_compile.h b/src/tools/picc/picc_compile.h index 6db92ca..972a6d0 100644 --- a/src/tools/picc/picc_compile.h +++ b/src/tools/picc/picc_compile.h @@ -17,65 +17,72 @@ namespace PICC class Process : public Compile::Process { Q_OBJECT + TQ_OBJECT protected: - virtual QString deviceName() const { return _data.device; } - virtual QStringList genericArguments(const Compile::Config &config) const; - virtual void logStderrLine(const QString &line); - virtual QString objectExtension() const { return "obj"; } + virtual TQString deviceName() const { return _data.device; } + virtual TQStringList genericArguments(const Compile::Config &config) const; + virtual void logStderrLine(const TQString &line); + virtual TQString objectExtension() const { return "obj"; } }; //----------------------------------------------------------------------------- class CompileStandaloneFile : public Process { Q_OBJECT + TQ_OBJECT protected: - virtual QString outputFiles() const; - virtual QStringList genericArguments(const Compile::Config &config) const; + virtual TQString outputFiles() const; + virtual TQStringList genericArguments(const Compile::Config &config) const; }; //----------------------------------------------------------------------------- class CompileProjectFile : public Process { Q_OBJECT + TQ_OBJECT protected: - virtual QString outputFiles() const; - virtual QStringList genericArguments(const Compile::Config &config) const; + virtual TQString outputFiles() const; + virtual TQStringList genericArguments(const Compile::Config &config) const; }; //----------------------------------------------------------------------------- class AssembleStandaloneFile : public Process { Q_OBJECT + TQ_OBJECT protected: - virtual QString outputFiles() const; - virtual QStringList genericArguments(const Compile::Config &config) const; + virtual TQString outputFiles() const; + virtual TQStringList genericArguments(const Compile::Config &config) const; }; //----------------------------------------------------------------------------- class AssembleProjectFile : public Process { Q_OBJECT + TQ_OBJECT protected: - virtual QString outputFiles() const; - virtual QStringList genericArguments(const Compile::Config &config) const; + virtual TQString outputFiles() const; + virtual TQStringList genericArguments(const Compile::Config &config) const; }; //----------------------------------------------------------------------------- class LinkProject : public Process { Q_OBJECT + TQ_OBJECT protected: - virtual QString outputFiles() const; - virtual QStringList genericArguments(const Compile::Config &config) const; + virtual TQString outputFiles() const; + virtual TQStringList genericArguments(const Compile::Config &config) const; }; //----------------------------------------------------------------------------- class LibraryProject : public Process { Q_OBJECT + TQ_OBJECT protected: - virtual QString outputFiles() const; - virtual QStringList genericArguments(const Compile::Config &config) const; + virtual TQString outputFiles() const; + virtual TQStringList genericArguments(const Compile::Config &config) const; }; } // namespace diff --git a/src/tools/sdcc/gui/sdcc_ui.h b/src/tools/sdcc/gui/sdcc_ui.h index a0f0ffc..1b39fce 100644 --- a/src/tools/sdcc/gui/sdcc_ui.h +++ b/src/tools/sdcc/gui/sdcc_ui.h @@ -18,6 +18,7 @@ namespace SDCC class ConfigWidget : public ToolConfigWidget { Q_OBJECT + TQ_OBJECT public: ConfigWidget(Project *project); virtual void initEntries(); diff --git a/src/tools/sdcc/sdcc.cpp b/src/tools/sdcc/sdcc.cpp index ba86273..bc3724d 100644 --- a/src/tools/sdcc/sdcc.cpp +++ b/src/tools/sdcc/sdcc.cpp @@ -17,15 +17,15 @@ #include "sdcc_generator.h" //---------------------------------------------------------------------------- -bool SDCC::Base::checkExecutableResult(bool, QStringList &lines) const +bool SDCC::Base::checkExecutableResult(bool, TQStringList &lines) const { return ( lines.count()>0 && lines[0].startsWith("SDCC") ); } //---------------------------------------------------------------------------- -QString SDCC::Group::informationText() const +TQString SDCC::Group::informationText() const { - return i18n("The Small Devices C Compiler is an open-source C compiler for several families of microcontrollers.").arg("http://sdcc.sourceforge.net"); + return i18n("The Small Devices C Compiler is an open-source C compiler for several families of microcontrollers.").tqarg("http://sdcc.sourceforge.net"); } const ::Tool::Base *SDCC::Group::base(Tool::Category category) const @@ -50,10 +50,10 @@ SDCC::Group::Group() _checkDevicesTmp.close(); } -QStringList SDCC::Group::checkDevicesOptions(uint i) const +TQStringList SDCC::Group::checkDevicesOptions(uint i) const { - QStringList options; - options += QString("-m") + SDCC::FAMILY_DATA[i].name; + TQStringList options; + options += TQString("-m") + SDCC::FAMILY_DATA[i].name; options += "-phelp"; options += _checkDevicesTmp.url().filepath(); return options; @@ -103,7 +103,7 @@ Tool::SourceGenerator *SDCC::Group::sourceGeneratorFactory() const return new SourceGenerator; } -bool SDCC::Group::generateDebugInformation(const QString &device) const +bool SDCC::Group::generateDebugInformation(const TQString &device) const { switch (family(device)) { case P14: return false; diff --git a/src/tools/sdcc/sdcc.h b/src/tools/sdcc/sdcc.h index 3155273..f088bec 100644 --- a/src/tools/sdcc/sdcc.h +++ b/src/tools/sdcc/sdcc.h @@ -19,11 +19,11 @@ namespace SDCC class Base : public Tool::Base { public: - virtual QString baseExecutable(bool, Tool::OutputExecutableType) const { return "sdcc"; } + virtual TQString baseExecutable(bool, Tool::OutputExecutableType) const { return "sdcc"; } private: - virtual QStringList checkExecutableOptions(bool) const { return "-v"; } - virtual bool checkExecutableResult(bool withWine, QStringList &lines) const; + virtual TQStringList checkExecutableOptions(bool) const { return "-v"; } + virtual bool checkExecutableResult(bool withWine, TQStringList &lines) const; }; //---------------------------------------------------------------------------- @@ -31,9 +31,9 @@ class Group : public Tool::Group { public: Group(); - virtual QString name() const { return "sdcc"; } - virtual QString label() const { return i18n("Small Device C Compiler"); } - virtual QString informationText() const; + virtual TQString name() const { return "sdcc"; } + virtual TQString label() const { return i18n("Small Device C Compiler"); } + virtual TQString informationText() const; virtual const ::Tool::Base *base(Tool::Category category) const; virtual uint nbCheckDevices() const { return SDCC::Nb_Families; } virtual bool hasDirectory(Compile::DirectoryType type) const { return type==Compile::DirectoryType::Header || type==Compile::DirectoryType::LinkerScript; } @@ -43,16 +43,16 @@ public: virtual Tool::ExecutableType preferedExecutableType() const { return Tool::ExecutableType::Unix; } virtual Tool::CompileType compileType() const { return Tool::SeparateFiles; } virtual Tool::Category checkDevicesCategory() const { return Tool::Category::Compiler; } - virtual QStringList checkDevicesOptions(uint i) const; + virtual TQStringList checkDevicesOptions(uint i) const; virtual bool needs(bool withProject, Tool::Category category) const; virtual PURL::FileType implementationType(PURL::ToolType type) const; - virtual bool generateDebugInformation(const QString &device) const; + virtual bool generateDebugInformation(const TQString &device) const; private: Log::StringView _sview; PURL::TempFile _checkDevicesTmp; virtual BaseData baseFactory(Tool::Category category) const; - virtual QValueList getSupportedDevices(const QString &s) const { return SDCC::getSupportedDevices(s); } + virtual TQValueList getSupportedDevices(const TQString &s) const { return SDCC::getSupportedDevices(s); } virtual Compile::Process *processFactory(const Compile::Data &data) const; virtual Compile::Config *configFactory(::Project *project) const; virtual Tool::SourceGenerator *sourceGeneratorFactory() const; diff --git a/src/tools/sdcc/sdcc_compile.cpp b/src/tools/sdcc/sdcc_compile.cpp index a3c072f..1c2e04d 100644 --- a/src/tools/sdcc/sdcc_compile.cpp +++ b/src/tools/sdcc/sdcc_compile.cpp @@ -14,19 +14,19 @@ #include "sdcc_generator.h" //----------------------------------------------------------------------------- -QString SDCC::Process::familyName() const +TQString SDCC::Process::familyName() const { return FAMILY_DATA[family(_data.device)].name; } -QString SDCC::Process::deviceName() const +TQString SDCC::Process::deviceName() const { return toDeviceName(_data.device); } -QStringList SDCC::Process::genericArguments(const Compile::Config &) const +TQStringList SDCC::Process::genericArguments(const Compile::Config &) const { - QStringList args; + TQStringList args; args += "-m%FAMILY"; args += "-%DEVICE"; args += "-V"; // verbose @@ -34,12 +34,12 @@ QStringList SDCC::Process::genericArguments(const Compile::Config &) const return args; } -QString SDCC::Process::outputFiles() const +TQString SDCC::Process::outputFiles() const { return "PURL::Object PURL::AsmGPAsm adb p d PURL::Lst"; } -void SDCC::Process::logStderrLine(const QString &line) +void SDCC::Process::logStderrLine(const TQString &line) { if ( parseErrorLine(line, Compile::ParseErrorData("([^:]*):([0-9]+):(error|warning|message):(.+)", 1, 2, 4, 3)) ) return; if ( parseErrorLine(line, Compile::ParseErrorData("([^:]*):([0-9]+):(\\w+)\\s*\\[[0-9]+\\](.+)", 1, 2, 4, 3)) ) return; @@ -47,33 +47,33 @@ void SDCC::Process::logStderrLine(const QString &line) if ( parseErrorLine(line, Compile::ParseErrorData("([^:]*):([0-9]+):(.+)", 1, 2, 3, Log::LineType::Warning)) ) return; if ( parseErrorLine(line, Compile::ParseErrorData("([^:]*):([^:]+):([0-9]+):(.+)", 2, 3, 4, Log::LineType::Warning)) ) return; if ( parseErrorLine(line, Compile::ParseErrorData("([^:]+):(.+)", -1, -1, 2, 1, Log::LineType::Warning)) ) return; - doLog(filterType(line), line, QString::null, 0); + doLog(filterType(line), line, TQString(), 0); } //----------------------------------------------------------------------------- -QStringList SDCC::CompileStandaloneFile::genericArguments(const Compile::Config &config) const +TQStringList SDCC::CompileStandaloneFile::genericArguments(const Compile::Config &config) const { - QStringList args = Process::genericArguments(config); + TQStringList args = Process::genericArguments(config); args += config.includeDirs(Tool::Category::Compiler, "-I"); args += config.customOptions(Tool::Category::Compiler); args += "-Wl-o%O"; args += "-Wl-m"; // output map file HexBuffer::Format format = config.hexFormat(); if( format!=HexBuffer::Nb_Formats ) - args += QString("-Wl-a") + HexBuffer::FORMATS[format]; + args += TQString("-Wl-a") + HexBuffer::FORMATS[format]; args += "%I"; return args; } -QString SDCC::CompileStandaloneFile::outputFiles() const +TQString SDCC::CompileStandaloneFile::outputFiles() const { return Process::outputFiles() + " PURL::Map PURL::Hex PURL::Cod rst sym mem lnk"; } //----------------------------------------------------------------------------- -QStringList SDCC::CompileProjectFile::genericArguments(const Compile::Config &config) const +TQStringList SDCC::CompileProjectFile::genericArguments(const Compile::Config &config) const { - QStringList args = Process::genericArguments(config); + TQStringList args = Process::genericArguments(config); args += config.includeDirs(Tool::Category::Compiler, "-I"); args += config.customOptions(Tool::Category::Compiler); args += "-c"; // compile only @@ -82,9 +82,9 @@ QStringList SDCC::CompileProjectFile::genericArguments(const Compile::Config &co } //----------------------------------------------------------------------------- -QStringList SDCC::LinkProjectFile::genericArguments(const Compile::Config &config) const +TQStringList SDCC::LinkProjectFile::genericArguments(const Compile::Config &config) const { - QStringList args = Process::genericArguments(config); + TQStringList args = Process::genericArguments(config); args += "-Wl-c"; // create coff file args += "-Wl-m"; // output map file args += "$LKR(-Wl-s%LKR)"; @@ -97,7 +97,7 @@ QStringList SDCC::LinkProjectFile::genericArguments(const Compile::Config &confi return args; } -QString SDCC::LinkProjectFile::outputFiles() const +TQString SDCC::LinkProjectFile::outputFiles() const { return Process::outputFiles() + " PURL::Lkr PURL::Hex PURL::Cod PURL::Coff PURL::Map"; } diff --git a/src/tools/sdcc/sdcc_compile.h b/src/tools/sdcc/sdcc_compile.h index 8ba4c30..c5067e6 100644 --- a/src/tools/sdcc/sdcc_compile.h +++ b/src/tools/sdcc/sdcc_compile.h @@ -17,12 +17,13 @@ namespace SDCC class Process : public Compile::Process { Q_OBJECT + TQ_OBJECT protected: - virtual QString deviceName() const; - virtual QString familyName() const; - virtual QStringList genericArguments(const Compile::Config &config) const; - virtual QString outputFiles() const; - virtual void logStderrLine(const QString &line); + virtual TQString deviceName() const; + virtual TQString familyName() const; + virtual TQStringList genericArguments(const Compile::Config &config) const; + virtual TQString outputFiles() const; + virtual void logStderrLine(const TQString &line); virtual bool hasLinkerScript() const { return ( _data.linkType==Compile::Icd2Linking || Main::toolGroup().hasCustomLinkerScript(_data.project) ); } }; @@ -30,27 +31,30 @@ protected: class CompileStandaloneFile : public Process { Q_OBJECT + TQ_OBJECT private: - virtual QStringList genericArguments(const Compile::Config &config) const; - virtual QString outputFiles() const; + virtual TQStringList genericArguments(const Compile::Config &config) const; + virtual TQString outputFiles() const; }; //----------------------------------------------------------------------------- class CompileProjectFile : public Process { Q_OBJECT + TQ_OBJECT private: - virtual QStringList genericArguments(const Compile::Config &config) const; + virtual TQStringList genericArguments(const Compile::Config &config) const; }; //----------------------------------------------------------------------------- class LinkProjectFile : public Process { Q_OBJECT + TQ_OBJECT private: - virtual QStringList genericArguments(const Compile::Config &config) const; - virtual QString outputFiles() const; - virtual QString objectExtension() const { return "o"; } + virtual TQStringList genericArguments(const Compile::Config &config) const; + virtual TQString outputFiles() const; + virtual TQString objectExtension() const { return "o"; } }; } // namespace diff --git a/src/tools/sdcc/sdcc_generator.cpp b/src/tools/sdcc/sdcc_generator.cpp index fb57ab6..0a2b0ee 100644 --- a/src/tools/sdcc/sdcc_generator.cpp +++ b/src/tools/sdcc/sdcc_generator.cpp @@ -18,7 +18,7 @@ const SDCC::FamilyData SDCC::FAMILY_DATA[Nb_Families] = { { "pic16" } }; -SDCC::Family SDCC::family(const QString &device) +SDCC::Family SDCC::family(const TQString &device) { const Device::Data *data = Device::lister().data(device); switch (static_cast(data)->architecture().type()) { @@ -38,12 +38,12 @@ SDCC::Family SDCC::family(const QString &device) return Nb_Families; } -QString SDCC::toDeviceName(const QString &device) +TQString SDCC::toDeviceName(const TQString &device) { return GPUtils::toDeviceName(device); } -QValueList SDCC::getSupportedDevices(const QString &s) +TQValueList SDCC::getSupportedDevices(const TQString &s) { return GPUtils::getSupportedDevices(s); } @@ -60,12 +60,12 @@ SourceLine::List SDCC::SourceGenerator::configLines(PURL::ToolType type, const D SourceLine::List lines; if ( !data.is18Family() ) lines.appendNotIndentedCode("typedef unsigned int word;"); Address address = data.range(Pic::MemoryRangeType::Config).start; - QString prefix = (data.nbWords(Pic::MemoryRangeType::Config)==2 || data.name().startsWith("16F9") ? "_" : "__"); + TQString prefix = (data.nbWords(Pic::MemoryRangeType::Config)==2 || data.name().startsWith("16F9") ? "_" : "__"); for (uint i=0; i(data).architecture().type()) { case Pic::Architecture::P16X: lines.appendNotIndentedCode("void isr() interrupt 0 {", i18n("interrupt service routine")); - lines.appendIndentedCode(QString::null, "<< " + i18n("insert interrupt code") + " >>"); + lines.appendIndentedCode(TQString(), "<< " + i18n("insert interrupt code") + " >>"); lines.appendNotIndentedCode("}"); lines.appendEmpty(); break; @@ -111,7 +111,7 @@ SourceLine::List SDCC::SourceGenerator::sourceFileContent(PURL::ToolType type, c default: Q_ASSERT(false); break; } lines.appendNotIndentedCode("void main() {"); - lines.appendIndentedCode(QString::null, "<< " + i18n("insert code") + " >>"); + lines.appendIndentedCode(TQString(), "<< " + i18n("insert code") + " >>"); lines.appendNotIndentedCode("}"); return lines; } diff --git a/src/tools/sdcc/sdcc_generator.h b/src/tools/sdcc/sdcc_generator.h index e5f0101..a0f0f7e 100644 --- a/src/tools/sdcc/sdcc_generator.h +++ b/src/tools/sdcc/sdcc_generator.h @@ -19,9 +19,9 @@ struct FamilyData { const char *name; }; extern const FamilyData FAMILY_DATA[Nb_Families]; -extern Family family(const QString &device); -extern QString toDeviceName(const QString &device); -extern QValueList getSupportedDevices(const QString &s); +extern Family family(const TQString &device); +extern TQString toDeviceName(const TQString &device); +extern TQValueList getSupportedDevices(const TQString &s); //---------------------------------------------------------------------------- class SourceGenerator : public Tool::SourceGenerator @@ -36,7 +36,7 @@ private: const char *cname, *sdccName; }; static const P16CNameData P16_CNAME_DATA[]; - static void transformCName(QString &cname, const Pic::Data &data); + static void transformCName(TQString &cname, const Pic::Data &data); }; diff --git a/src/xml_to_data/device_xml_to_data.cpp b/src/xml_to_data/device_xml_to_data.cpp index 9ad1940..515c6c9 100644 --- a/src/xml_to_data/device_xml_to_data.cpp +++ b/src/xml_to_data/device_xml_to_data.cpp @@ -8,15 +8,15 @@ ***************************************************************************/ #include "device_xml_to_data.h" -#include -#include -#include -#include +#include +#include +#include +#include -bool Device::XmlToDataBase::getFrequencyRange(OperatingCondition oc, Special special, QDomElement element) +bool Device::XmlToDataBase::getFrequencyRange(OperatingCondition oc, Special special, TQDomElement element) { - QDomElement range; - for (QDomNode child=element.firstChild(); !child.isNull(); child=child.nextSibling()) { + TQDomElement range; + for (TQDomNode child=element.firstChild(); !child.isNull(); child=child.nextSibling()) { if ( child.nodeName()!="frequency_range" ) continue; if ( !child.isElement() ) qFatal("\"frequency_range\" should be an element"); if ( child.toElement().attribute("name")!=oc.key() ) continue; @@ -30,10 +30,10 @@ bool Device::XmlToDataBase::getFrequencyRange(OperatingCondition oc, Special spe FrequencyRange frange; frange.operatingCondition = oc; frange.special = special; - for (QDomNode child=range.firstChild(); !child.isNull(); child=child.nextSibling()) { + for (TQDomNode child=range.firstChild(); !child.isNull(); child=child.nextSibling()) { if ( child.nodeName()=="frequency" ) { if ( !child.isElement() ) qFatal("Frequency is not an element"); - QDomElement frequency = child.toElement(); + TQDomElement frequency = child.toElement(); bool ok1, ok2, ok3, ok4; RangeBox box; box.start.x = frequency.attribute("start").toDouble(&ok1); @@ -71,45 +71,45 @@ bool Device::XmlToDataBase::getFrequencyRange(OperatingCondition oc, Special spe return true; } -bool Device::XmlToDataBase::getMemoryTechnology(QDomElement element) +bool Device::XmlToDataBase::getMemoryTechnology(TQDomElement element) { - QString s = element.attribute("memory_technology"); + TQString s = element.attribute("memory_technology"); _data->_memoryTechnology = MemoryTechnology::fromKey(s); if ( _data->_memoryTechnology!=MemoryTechnology::Nb_Types ) return true; if ( !s.isNull() ) qFatal("Unrecognized memory technology"); return false; } -void Device::XmlToDataBase::processDevice(QDomElement device) +void Device::XmlToDataBase::processDevice(TQDomElement device) { - QString name = device.attribute("name").upper(); + TQString name = device.attribute("name").upper(); if ( name.isEmpty() ) qFatal("Device has no name"); - if ( _map.contains(name) ) qFatal(QString("Device \"%1\" already defined").arg(name)); + if ( _map.tqcontains(name) ) qFatal(TQString("Device \"%1\" already defined").tqarg(name)); _data = createData(); _map[name] = _data; _data->_name = name; - _data->_alternatives = QStringList::split(' ', device.attribute("alternative")); + _data->_alternatives = TQStringList::split(' ', device.attribute("alternative")); if ( _data->_alternatives.count() ) _alternatives[name] = _data->_alternatives; - _data->_status = Status::fromKey(device.attribute("status")); + _data->_status = tqStatus::fromKey(device.attribute("status")); switch (_data->_status.type()) { - case Status::Nb_Types: + case tqStatus::Nb_Types: qFatal("Unrecognized or absent device status"); break; - case Status::Future: + case tqStatus::Future: if ( _data->_alternatives.count() ) qFatal("Future device has alternative"); break; - case Status::NotRecommended: - case Status::Mature: + case tqStatus::NotRecommended: + case tqStatus::Mature: if ( _data->_alternatives.count()==0 ) warning("Not-recommended/mature device has no alternative"); break; - case Status::InProduction: - case Status::EOL: - case Status::Unknown: break; + case tqStatus::InProduction: + case tqStatus::EOL: + case tqStatus::Unknown: break; } // document _data->_documents.webpage = device.attribute("document"); // ### REMOVE ME - QDomElement documents = findUniqueElement(device, "documents", QString::null, QString::null); + TQDomElement documents = findUniqueElement(device, "documents", TQString(), TQString()); if ( documents.isNull() ) { if ( _data->_documents.webpage.isEmpty() ) qFatal("Missing \"documents\" element"); } else { @@ -117,33 +117,33 @@ void Device::XmlToDataBase::processDevice(QDomElement device) _data->_documents.webpage = documents.attribute("webpage"); if ( _data->_documents.webpage.isEmpty() ) qFatal("Missing webpage"); _data->_documents.datasheet = documents.attribute("datasheet"); - QRegExp rexp("\\d{5}"); + TQRegExp rexp("\\d{5}"); if ( _data->_documents.datasheet=="?" ) warning("No datasheet specified"); - if ( !rexp.exactMatch(_data->_documents.datasheet) ) qFatal(QString("Malformed datasheet \"%1\" (5 digits)").arg(_data->_documents.datasheet)); + if ( !rexp.exactMatch(_data->_documents.datasheet) ) qFatal(TQString("Malformed datasheet \"%1\" (5 digits)").tqarg(_data->_documents.datasheet)); _data->_documents.progsheet = documents.attribute("progsheet"); if ( _data->_documents.progsheet=="?" ) warning("No progsheet specified"); - if ( !rexp.exactMatch(_data->_documents.datasheet) ) qFatal(QString("Malformed progsheet \"%1\" (5 digits)").arg(_data->_documents.progsheet)); - _data->_documents.erratas = QStringList::split(" ", documents.attribute("erratas")); + if ( !rexp.exactMatch(_data->_documents.datasheet) ) qFatal(TQString("Malformed progsheet \"%1\" (5 digits)").tqarg(_data->_documents.progsheet)); + _data->_documents.erratas = TQStringList::split(" ", documents.attribute("erratas")); for (uint i=0; i_documents.erratas.count()); i++) { - QString errata = _data->_documents.erratas[i]; + TQString errata = _data->_documents.erratas[i]; if ( !rexp.exactMatch(errata) ) { - QRegExp rexp2("\\d{5}e\\d"); + TQRegExp rexp2("\\d{5}e\\d"); if ( !rexp2.exactMatch(errata) && !errata.startsWith("er") && errata.mid(2)!=_data->_name.lower() ) - qFatal(QString("Malformed erratas \"%1\" (5 digits or 5 digits + e + 1 digit or \"er\" + name)").arg(errata)); + qFatal(TQString("Malformed erratas \"%1\" (5 digits or 5 digits + e + 1 digit or \"er\" + name)").tqarg(errata)); } } } if ( _data->_documents.webpage=="?" ) warning("No webpage specified"); else { - QRegExp rexp("\\d{6}"); - if ( !rexp.exactMatch(_data->_documents.webpage) ) qFatal(QString("Malformed webpage \"%1\" (6 digits)").arg(_data->_documents.webpage)); - if ( _documents.contains(_data->_documents.webpage) ) - qFatal(QString("webpage duplicated (already used for %1)").arg(_documents[_data->_documents.webpage])); + TQRegExp rexp("\\d{6}"); + if ( !rexp.exactMatch(_data->_documents.webpage) ) qFatal(TQString("Malformed webpage \"%1\" (6 digits)").tqarg(_data->_documents.webpage)); + if ( _documents.tqcontains(_data->_documents.webpage) ) + qFatal(TQString("webpage duplicated (already used for %1)").tqarg(_documents[_data->_documents.webpage])); _documents[_data->_documents.webpage] = name; } // frequency ranges - QStringList names; + TQStringList names; bool ok = false; FOR_EACH(OperatingCondition, oc) { names += oc.key(); @@ -157,15 +157,15 @@ void Device::XmlToDataBase::processDevice(QDomElement device) if ( !getMemoryTechnology(device) ) qFatal("Memory technology not defined"); // packages - for (QDomNode child=device.firstChild(); !child.isNull(); child=child.nextSibling()) { + for (TQDomNode child=device.firstChild(); !child.isNull(); child=child.nextSibling()) { if ( !child.isElement() || child.nodeName()!="package" ) continue; Package p = processPackage(child.toElement()); - QMap pinLabels; + TQMap pinLabels; for (uint i=0; i found(nb); + TQMemArray found(nb); found.fill(false); - QDomNode child = element.firstChild(); + TQDomNode child = element.firstChild(); while ( !child.isNull() ) { if ( child.nodeName()=="pin" ) { if ( !child.isElement() ) qFatal("\"pin\" is not an element"); - QDomElement pin = child.toElement(); + TQDomElement pin = child.toElement(); bool ok; uint i = pin.attribute("index").toUInt(&ok); if ( !ok || i==0 || i>nb ) qFatal("Malformed pin index"); if (found[i-1]) qFatal("Duplicated pin index"); found[i-1] = true; - QString name = pin.attribute("name"); + TQString name = pin.attribute("name"); if ( !name.isEmpty() && name!="N/C" ) { - QStringList labels = QStringList::split("/", name); - if ( name.contains(" ") || labels.count()==0 ) qFatal("Malformed pin name"); + TQStringList labels = TQStringList::split("/", name); + if ( name.tqcontains(" ") || labels.count()==0 ) qFatal("Malformed pin name"); if ( name!=name.upper() ) qFatal("Pin name should be uppercase"); } package.pins[i-1] = name; @@ -234,27 +234,27 @@ Device::Package Device::XmlToDataBase::processPackage(QDomElement element) child = child.nextSibling(); } if ( !have_pins ) ;//warning("Pins not specified"); // #### REMOVE ME !! - else for (uint i=0; i::const_iterator ait = _alternatives.begin(); + TQMap::const_iterator ait = _alternatives.begin(); for (; ait!=_alternatives.end(); ++ait) { - QStringList::const_iterator lit = ait.data().begin(); + TQStringList::const_iterator lit = ait.data().begin(); for (; lit!=ait.data().end(); ++lit) - if ( !_map.contains(*lit) ) qFatal(QString("Unknown alternative %1 for device %2").arg((*lit)).arg(ait.key())); + if ( !_map.tqcontains(*lit) ) qFatal(TQString("Unknown alternative %1 for device %2").tqarg((*lit)).tqarg(ait.key())); } } diff --git a/src/xml_to_data/device_xml_to_data.h b/src/xml_to_data/device_xml_to_data.h index a1d0529..f9874e4 100644 --- a/src/xml_to_data/device_xml_to_data.h +++ b/src/xml_to_data/device_xml_to_data.h @@ -9,9 +9,9 @@ #ifndef DEVICE_XML_TO_DATA_H #define DEVICE_XML_TO_DATA_H -#include -#include -#include +#include +#include +#include #include "common/common/misc.h" #include "common/common/streamer.h" @@ -27,22 +27,22 @@ public: protected: mutable Data *_data; - QMap _map; // device -> data + TQMap _map; // device -> data virtual void parse(); - virtual QString currentDevice() const { return (_data ? _data->name() : QString::null); } - virtual QString namespaceName() const = 0; + virtual TQString currentDevice() const { return (_data ? _data->name() : TQString()); } + virtual TQString namespaceName() const = 0; virtual Data *createData() const = 0; - virtual void processDevice(QDomElement device); - virtual void checkPins(const QMap &pinLabels) const = 0; + virtual void processDevice(TQDomElement device); + virtual void checkPins(const TQMap &pinLabels) const = 0; private: - QMap _documents; // document -> device - QMap _alternatives; // device -> alternatives + TQMap _documents; // document -> device + TQMap _alternatives; // device -> alternatives - bool getFrequencyRange(OperatingCondition oc, Special special, QDomElement element); - bool getMemoryTechnology(QDomElement element); - Device::Package processPackage(QDomElement element); + bool getFrequencyRange(OperatingCondition oc, Special special, TQDomElement element); + bool getMemoryTechnology(TQDomElement element); + Device::Package processPackage(TQDomElement element); }; template @@ -53,12 +53,12 @@ public: DataType *data() { return static_cast(_data); } const DataType *data() const { return static_cast(_data); } virtual void output() { - QFile dfile("deps.mak"); + TQFile dfile("deps.mak"); if ( !dfile.open(IO_WriteOnly) ) return; - QTextStream dts(&dfile); + TQTextStream dts(&dfile); dts << "noinst_DATA = "; uint i = 0; - QMap::const_iterator it; + TQMap::const_iterator it; for (it=_map.begin(); it!=_map.end(); ++it) { if ( (i%10)==0 ) dts << "\\" << endl << " "; dts << " " << it.key() << ".xml"; @@ -67,13 +67,13 @@ public: dts << endl; dfile.close(); - QFile file(namespaceName().lower() + "_data.cpp"); + TQFile file(namespaceName().lower() + "_data.cpp"); if ( !file.open(IO_WriteOnly) ) return; - QTextStream ts(&file); + TQTextStream ts(&file); ts << "#include \"devices/" << namespaceName().lower() << "/" << namespaceName().lower() << "/" << namespaceName().lower() << "_group.h\"" << endl << endl; ts << "const char *" << namespaceName() << "::DATA_STREAM =" << endl; - QValueList list; + TQValueList list; for (it=_map.begin(); it!=_map.end(); ++it) list.append(static_cast(it.data())); uint size = toCppString(list, ts); diff --git a/src/xml_to_data/prog_xml_to_data.h b/src/xml_to_data/prog_xml_to_data.h index f4e820b..6eea337 100644 --- a/src/xml_to_data/prog_xml_to_data.h +++ b/src/xml_to_data/prog_xml_to_data.h @@ -9,9 +9,9 @@ #ifndef PROG_XML_TO_DATA_H #define PROG_XML_TO_DATA_H -#include -#include -#include +#include +#include +#include #include "xml_to_data.h" #include "devices/list/device_list.h" @@ -21,40 +21,40 @@ template class ExtXmlToData : public ::XmlToData { public: - ExtXmlToData(const QString &basename, const QString &namespac) + ExtXmlToData(const TQString &basename, const TQString &namespac) : _basename(basename), _namespace(namespac) {} protected: - QString _basename, _namespace; + TQString _basename, _namespace; virtual bool hasFamilies() const { return true; } - const QStringList &families() const { return _families; } - virtual uint familyIndex(const QString &family) const { return _families.findIndex(family); } - virtual void parseData(QDomElement, Data &) = 0; - virtual void includes(QTextStream &) const {} - virtual void outputData(const Data &, QTextStream &) const {} - virtual void outputFunctions(QTextStream &) const {} - virtual QString currentDevice() const { return _current; } - virtual void parseDevice(QDomElement element); - ::Group::Support extractSupport(const QString &s) const; - bool hasDevice(const QString &device) const { return _map.contains(device); } + const TQStringList &families() const { return _families; } + virtual uint familyIndex(const TQString &family) const { return _families.tqfindIndex(family); } + virtual void parseData(TQDomElement, Data &) = 0; + virtual void includes(TQTextStream &) const {} + virtual void outputData(const Data &, TQTextStream &) const {} + virtual void outputFunctions(TQTextStream &) const {} + virtual TQString currentDevice() const { return _current; } + virtual void parseDevice(TQDomElement element); + ::Group::Support extractSupport(const TQString &s) const; + bool hasDevice(const TQString &device) const { return _map.tqcontains(device); } virtual void parse(); protected: - QString _current; + TQString _current; class PData { public: uint family; ::Group::Support support; Data data; }; - QMap _map; - QStringList _families; + TQMap _map; + TQStringList _families; virtual void output(); }; template -Group::Support ExtXmlToData::extractSupport(const QString &s) const +Group::Support ExtXmlToData::extractSupport(const TQString &s) const { if ( s.isEmpty() ) return Group::Support::Untested; Group::Support support = Group::Support::fromKey(s); @@ -64,17 +64,17 @@ Group::Support ExtXmlToData::extractSupport(const QString &s) const } template -void ExtXmlToData::parseDevice(QDomElement element) +void ExtXmlToData::parseDevice(TQDomElement element) { if ( element.nodeName()!="device" ) qFatal("Root node child should be named \"device\""); _current = element.attribute("name").upper(); - if ( Device::lister().data(_current)==0 ) qFatal(QString("Device name \"%1\" unknown").arg(_current)); - if ( _map.contains(_current) ) qFatal(QString("Device \"%1\" already parsed").arg(_current)); + if ( Device::lister().data(_current)==0 ) qFatal(TQString("Device name \"%1\" unknown").tqarg(_current)); + if ( _map.tqcontains(_current) ) qFatal(TQString("Device \"%1\" already parsed").tqarg(_current)); PData data; if ( hasFamilies() ) { - QString family = element.attribute("family"); - if ( family.isEmpty() ) qFatal(QString("Family is empty").arg(family)); - if ( _families.find(family)==_families.end() ) _families.append(family); + TQString family = element.attribute("family"); + if ( family.isEmpty() ) qFatal(TQString("Family is empty").tqarg(family)); + if ( _families.tqfind(family)==_families.end() ) _families.append(family); data.family = familyIndex(family); } data.support = extractSupport(element.attribute("support_type")); @@ -85,11 +85,11 @@ void ExtXmlToData::parseDevice(QDomElement element) template void ExtXmlToData::parse() { - QDomDocument doc = parseFile(_basename + ".xml"); - QDomElement root = doc.documentElement(); + TQDomDocument doc = parseFile(_basename + ".xml"); + TQDomElement root = doc.documentElement(); if ( root.nodeName()!="type" ) qFatal("Root node should be \"type\""); - if ( root.attribute("name")!=_basename ) qFatal(QString("Root node name is not \"%1\"").arg(_basename)); - QDomNode child = root.firstChild(); + if ( root.attribute("name")!=_basename ) qFatal(TQString("Root node name is not \"%1\"").tqarg(_basename)); + TQDomNode child = root.firstChild(); while ( !child.isNull() ) { if ( child.isComment() ) qDebug("comment: %s", child.toComment().data().latin1()); else { @@ -104,9 +104,9 @@ template void ExtXmlToData::output() { // write .cpp file - QFile file(_basename + "_data.cpp"); - if ( !file.open(IO_WriteOnly) ) qFatal(QString("Cannot open output file \"%1\"").arg(file.name())); - QTextStream s(&file); + TQFile file(_basename + "_data.cpp"); + if ( !file.open(IO_WriteOnly) ) qFatal(TQString("Cannot open output file \"%1\"").tqarg(file.name())); + TQTextStream s(&file); s << "// #### Do not edit: this file is autogenerated !!!" << endl << endl; s << "#include \"devices/list/device_list.h\"" << endl; s << "#include \"" + _basename + ".h\"" << endl; @@ -124,7 +124,7 @@ void ExtXmlToData::output() s << endl; // data list - typename QMap::const_iterator it = _map.begin(); + typename TQMap::const_iterator it = _map.begin(); for (; it!=_map.end(); ++it) { s << "const CData PIC" << it.key() << "_DATA = {"; s << " \"" << it.key() << "\", "; @@ -149,27 +149,27 @@ void ExtXmlToData::output() // functions s << endl; - s << "const CData *cdata(const QString &device)" << endl; + s << "const CData *cdata(const TQString &device)" << endl; s << "{" << endl; s << " for(uint i=0; DATA_LIST[i]; i++)" << endl; s << " if ( device==DATA_LIST[i]->name ) return DATA_LIST[i];" << endl; s << " return 0;" << endl; s << "}" << endl; - s << "bool isSupported(const QString &device)" << endl; + s << "bool isSupported(const TQString &device)" << endl; s << "{" << endl; s << " return cdata(device);" << endl; s << "}" << endl; if ( hasFamilies() ) { - s << "uint family(const QString &device)" << endl; + s << "uint family(const TQString &device)" << endl; s << "{" << endl; s << " return cdata(device)->family;" << endl; s << "}" << endl; } - s << "::Group::Support support(const QString &device)" << endl; + s << "::Group::Support support(const TQString &device)" << endl; s << "{" << endl; s << " return ::Group::Support::Type(cdata(device)->support);" << endl; s << "}" << endl; - s << "const Data &data(const QString &device)" << endl; + s << "const Data &data(const TQString &device)" << endl; s << "{" << endl; s << " return cdata(device)->data;" << endl; s << "}" << endl; @@ -186,16 +186,16 @@ template class XmlToData : public ExtXmlToData { public: - XmlToData(const QString &basename, const QString &namespac) + XmlToData(const TQString &basename, const TQString &namespac) : ExtXmlToData(basename, namespac) {} protected: - virtual void outputFunctions(QTextStream &s) const; - virtual void includes(QTextStream &) const; + virtual void outputFunctions(TQTextStream &s) const; + virtual void includes(TQTextStream &) const; }; template -void Programmer::XmlToData::outputFunctions(QTextStream &s) const +void Programmer::XmlToData::outputFunctions(TQTextStream &s) const { s << "void Group::initSupported()" << endl; s << "{" << endl; @@ -208,7 +208,7 @@ void Programmer::XmlToData::outputFunctions(QTextStream &s) const } template -void Programmer::XmlToData::includes(QTextStream &s) const +void Programmer::XmlToData::includes(TQTextStream &s) const { s << "#include \"" << ExtXmlToData::_basename << "_prog.h\"" << endl; } diff --git a/src/xml_to_data/xml_to_data.cpp b/src/xml_to_data/xml_to_data.cpp index d31ded0..65dc463 100644 --- a/src/xml_to_data/xml_to_data.cpp +++ b/src/xml_to_data/xml_to_data.cpp @@ -8,18 +8,18 @@ ***************************************************************************/ #include "xml_to_data.h" -#include -#include +#include +#include -QDomElement XmlToData::findUniqueElement(QDomElement parent, const QString &tag, - const QString &attribute, const QString &value) const +TQDomElement XmlToData::findUniqueElement(TQDomElement tqparent, const TQString &tag, + const TQString &attribute, const TQString &value) const { - QDomElement element; - QDomNode child = parent.firstChild(); + TQDomElement element; + TQDomNode child = tqparent.firstChild(); while ( !child.isNull() ) { if ( child.nodeName()==tag && child.isElement() && (attribute.isEmpty() || child.toElement().attribute(attribute)==value) ) { - if ( !element.isNull() ) qFatal(QString("Duplicated element \"%1/%2\"").arg(tag).arg(value)); + if ( !element.isNull() ) qFatal(TQString("Duplicated element \"%1/%2\"").tqarg(tag).tqarg(value)); element = child.toElement(); } child = child.nextSibling(); @@ -27,36 +27,36 @@ QDomElement XmlToData::findUniqueElement(QDomElement parent, const QString &tag, return element; } -void XmlToData::checkTagNames(QDomElement element, const QString &tag, - const QStringList &names) const +void XmlToData::checkTagNames(TQDomElement element, const TQString &tag, + const TQStringList &names) const { - QDomNodeList list = element.elementsByTagName(tag); + TQDomNodeList list = element.elementsByTagName(tag); for (uint i=0; i -#else -# include -#endif -#include +# include +#include class XmlToData { @@ -27,13 +23,13 @@ public: protected: virtual void parse() = 0; virtual void output() = 0; - virtual QString currentDevice() const = 0; - virtual void warning(const QString &message) const; - virtual void qFatal(const QString &message) const; - QDomElement findUniqueElement(QDomElement parent, const QString &nodeName, - const QString &attribute, const QString &value) const; - void checkTagNames(QDomElement element, const QString &tag, const QStringList &names) const; - QDomDocument parseFile(const QString &filename) const; + virtual TQString currentDevice() const = 0; + virtual void warning(const TQString &message) const; + virtual void qFatal(const TQString &message) const; + TQDomElement findUniqueElement(TQDomElement tqparent, const TQString &nodeName, + const TQString &attribute, const TQString &value) const; + void checkTagNames(TQDomElement element, const TQString &tag, const TQStringList &names) const; + TQDomDocument parseFile(const TQString &filename) const; }; #define XML_MAIN(_type) \ diff --git a/test/pic30/standalone_test.s b/test/pic30/standalone_test.s index 98a8d5c..1682fed 100644 --- a/test/pic30/standalone_test.s +++ b/test/pic30/standalone_test.s @@ -9,7 +9,7 @@ hello: .text .global __reset __reset: - ; set PSVPAG to page that contains 'hello' + ; set PSVPAG to page that tqcontains 'hello' mov #psvpage(hello),w0 mov w0,PSVPAG ; enable Program Space Visibility diff --git a/test/pic30/test.s b/test/pic30/test.s index 98a8d5c..1682fed 100644 --- a/test/pic30/test.s +++ b/test/pic30/test.s @@ -9,7 +9,7 @@ hello: .text .global __reset __reset: - ; set PSVPAG to page that contains 'hello' + ; set PSVPAG to page that tqcontains 'hello' mov #psvpage(hello),w0 mov w0,PSVPAG ; enable Program Space Visibility diff --git a/test/picc/standalone_test.c b/test/picc/standalone_test.c index 4173cf8..ac229a1 100644 --- a/test/picc/standalone_test.c +++ b/test/picc/standalone_test.c @@ -13,7 +13,7 @@ * * Use PICCLITE to compile this program for the PIC16F877. * - * Status: Sept 25, 2003 + * tqStatus: Sept 25, 2003 * Working. The code is pretty brute force and the resolution isn't * what I expected. Need to review calculations for angle vs. accel * (gravity). I determined the zero offsets empirically and hard coded diff --git a/test/picc/test.c b/test/picc/test.c index 5fc2e81..f397459 100644 --- a/test/picc/test.c +++ b/test/picc/test.c @@ -10,7 +10,7 @@ * * Use PICCLITE to compile this program for the PIC16F877. * - * Status: Sept 25, 2003 + * tqStatus: Sept 25, 2003 * Working. The code is pretty brute force and the resolution isn't * what I expected. Need to review calculations for angle vs. accel * (gravity). I determined the zero offsets empirically and hard coded -- cgit v1.2.1